lang
stringclasses 2
values | license
stringclasses 13
values | stderr
stringlengths 0
343
| commit
stringlengths 40
40
| returncode
int64 0
128
| repos
stringlengths 6
87.7k
| new_contents
stringlengths 0
6.23M
| new_file
stringlengths 3
311
| old_contents
stringlengths 0
6.23M
| message
stringlengths 6
9.1k
| old_file
stringlengths 3
311
| subject
stringlengths 0
4k
| git_diff
stringlengths 0
6.31M
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
Java | apache-2.0 | 141ab783503bc8f790d6578115568d7ab44f256b | 0 | vroyer/elasticassandra,vroyer/elasticassandra,vroyer/elasticassandra | /*
* Copyright (c) 2017 Strapdata (http://www.strapdata.com)
* Contains some code from Elasticsearch (http://www.elastic.co)
*
* 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 org.elassandra.gateway;
import org.elasticsearch.cluster.ClusterState;
import org.elasticsearch.cluster.ClusterStateUpdateTask;
import org.elasticsearch.cluster.block.ClusterBlock;
import org.elasticsearch.cluster.block.ClusterBlockLevel;
import org.elasticsearch.cluster.block.ClusterBlocks;
import org.elasticsearch.cluster.metadata.IndexMetaData;
import org.elasticsearch.cluster.metadata.MetaData;
import org.elasticsearch.cluster.routing.RoutingTable;
import org.elasticsearch.cluster.routing.allocation.AllocationService;
import org.elasticsearch.cluster.service.ClusterService;
import org.elasticsearch.common.inject.Inject;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.gateway.Gateway;
import org.elasticsearch.gateway.GatewayMetaState;
import org.elasticsearch.gateway.GatewayService;
import org.elasticsearch.gateway.TransportNodesListGatewayMetaState;
import org.elasticsearch.indices.IndicesService;
import org.elasticsearch.rest.RestStatus;
import org.elasticsearch.threadpool.ThreadPool;
import java.util.EnumSet;
import java.util.concurrent.atomic.AtomicBoolean;
public class CassandraGatewayService extends GatewayService {
public static final ClusterBlock NO_CASSANDRA_RING_BLOCK = new ClusterBlock(12, "no cassandra ring", true, true, true, RestStatus.SERVICE_UNAVAILABLE, EnumSet.of(ClusterBlockLevel.READ));
private final ClusterService clusterService;
private final AtomicBoolean recovered = new AtomicBoolean();
@Inject
public CassandraGatewayService(Settings settings,
AllocationService allocationService,
ClusterService clusterService,
ThreadPool threadPool,
GatewayMetaState metaState,
TransportNodesListGatewayMetaState listGatewayMetaState,
IndicesService indicesService) {
super(settings, allocationService, clusterService, threadPool, metaState, listGatewayMetaState, indicesService);
this.clusterService = clusterService;
}
/**
* release the NO_CASSANDRA_RING_BLOCK and update routingTable since the node'state = NORMAL (i.e a member of the ring)
* (may be update when replaying the cassandra logs)
*/
public void enableMetaDataPersictency() {
clusterService.submitStateUpdateTask("gateway-cassandra-ring-ready", new ClusterStateUpdateTask() {
@Override
public ClusterState execute(ClusterState currentState) {
logger.debug("releasing the cassandra ring block...");
// remove the block, since we recovered from gateway
ClusterBlocks.Builder blocks = ClusterBlocks.builder().blocks(currentState.blocks()).removeGlobalBlock(NO_CASSANDRA_RING_BLOCK);
// update the state to reflect
ClusterState updatedState = ClusterState.builder(currentState).blocks(blocks).build();
// update routing table
RoutingTable routingTable = RoutingTable.build(clusterService, updatedState);
return ClusterState.builder(updatedState).routingTable(routingTable).build();
}
@Override
public void onFailure(String source, Exception t) {
logger.error("unexpected failure during [{}]", t, source);
}
@Override
public void clusterStateProcessed(String source, ClusterState oldState, ClusterState newState) {
logger.info("cassandra ring block released");
}
});
}
@Override
protected void performStateRecovery(boolean enforceRecoverAfterTime, String reason) {
final Gateway.GatewayStateRecoveredListener recoveryListener = new GatewayRecoveryListener();
gateway().performStateRecovery(recoveryListener);
}
class GatewayRecoveryListener implements Gateway.GatewayStateRecoveredListener {
@Override
public void onSuccess(final ClusterState recoveredState) {
logger.trace("Successful state recovery, importing cluster state...");
clusterService.submitStateUpdateTask("cassandra-gateway-recovery-state", new ClusterStateUpdateTask() {
@Override
public ClusterState execute(ClusterState currentState) {
// remove the block, since we recovered from gateway
ClusterBlocks.Builder blocks = ClusterBlocks.builder()
.blocks(currentState.blocks())
.blocks(recoveredState.blocks())
.removeGlobalBlock(STATE_NOT_RECOVERED_BLOCK);
MetaData.Builder metaDataBuilder = MetaData.builder(recoveredState.metaData());
// automatically generate a UID for the metadata if we need to
metaDataBuilder.generateClusterUuidIfNeeded();
if (recoveredState.metaData().settings().getAsBoolean("cluster.blocks.read_only", false)) {
blocks.addGlobalBlock(MetaData.CLUSTER_READ_ONLY_BLOCK);
}
for (IndexMetaData indexMetaData : recoveredState.metaData()) {
metaDataBuilder.put(indexMetaData, false);
blocks.addBlocks(indexMetaData);
}
// update the state to reflect the new metadata and routing
ClusterState updatedState = ClusterState.builder(currentState)
.blocks(blocks)
.metaData(metaDataBuilder)
.build();
RoutingTable newRoutingTable = RoutingTable.build(CassandraGatewayService.this.clusterService, updatedState);
return ClusterState.builder(updatedState).routingTable(newRoutingTable).build();
}
@Override
public void onFailure(String source, Exception t) {
logger.error("Unexpected failure during [{}]", t, source);
GatewayRecoveryListener.this.onFailure("failed to updated cluster state");
}
@Override
public void clusterStateProcessed(String source, ClusterState oldState, ClusterState newState) {
logger.info("Recovered [{}] indices into cluster_state metadata={}/{}",
newState.metaData().indices().size(), newState.metaData().clusterUUID(), newState.metaData().version());
}
});
}
@Override
public void onFailure(String message) {
recovered.set(false);
// don't remove the block here, we don't want to allow anything in such a case
logger.info("Metadata state not restored, reason: {}", message);
}
}
}
| server/src/main/java/org/elassandra/gateway/CassandraGatewayService.java | /*
* Copyright (c) 2017 Strapdata (http://www.strapdata.com)
* Contains some code from Elasticsearch (http://www.elastic.co)
*
* 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 org.elassandra.gateway;
import org.elasticsearch.cluster.ClusterState;
import org.elasticsearch.cluster.ClusterStateUpdateTask;
import org.elasticsearch.cluster.block.ClusterBlock;
import org.elasticsearch.cluster.block.ClusterBlockLevel;
import org.elasticsearch.cluster.block.ClusterBlocks;
import org.elasticsearch.cluster.metadata.IndexMetaData;
import org.elasticsearch.cluster.metadata.MetaData;
import org.elasticsearch.cluster.routing.RoutingTable;
import org.elasticsearch.cluster.routing.allocation.AllocationService;
import org.elasticsearch.cluster.service.ClusterService;
import org.elasticsearch.common.inject.Inject;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.gateway.Gateway;
import org.elasticsearch.gateway.GatewayMetaState;
import org.elasticsearch.gateway.GatewayService;
import org.elasticsearch.gateway.TransportNodesListGatewayMetaState;
import org.elasticsearch.indices.IndicesService;
import org.elasticsearch.rest.RestStatus;
import org.elasticsearch.threadpool.ThreadPool;
import java.util.EnumSet;
import java.util.concurrent.atomic.AtomicBoolean;
public class CassandraGatewayService extends GatewayService {
public static final ClusterBlock NO_CASSANDRA_RING_BLOCK = new ClusterBlock(12, "no cassandra ring", true, true, true, RestStatus.SERVICE_UNAVAILABLE, EnumSet.of(ClusterBlockLevel.READ));
private final ClusterService clusterService;
private final AtomicBoolean recovered = new AtomicBoolean();
@Inject
public CassandraGatewayService(Settings settings,
AllocationService allocationService,
ClusterService clusterService,
ThreadPool threadPool,
GatewayMetaState metaState,
TransportNodesListGatewayMetaState listGatewayMetaState,
IndicesService indicesService) {
super(settings, allocationService, clusterService, threadPool, metaState, listGatewayMetaState, indicesService);
this.clusterService = clusterService;
}
/**
* release the NO_CASSANDRA_RING_BLOCK and update routingTable since the node'state = NORMAL (i.e a member of the ring)
* (may be update when replaying the cassandra logs)
*/
public void enableMetaDataPersictency() {
clusterService.submitStateUpdateTask("gateway-cassandra-ring-ready", new ClusterStateUpdateTask() {
@Override
public ClusterState execute(ClusterState currentState) {
logger.debug("releasing the cassandra ring block...");
// remove the block, since we recovered from gateway
ClusterBlocks.Builder blocks = ClusterBlocks.builder().blocks(currentState.blocks()).removeGlobalBlock(NO_CASSANDRA_RING_BLOCK);
// update the state to reflect
ClusterState updatedState = ClusterState.builder(currentState).blocks(blocks).build();
return updatedState;
}
@Override
public void onFailure(String source, Exception t) {
logger.error("unexpected failure during [{}]", t, source);
}
@Override
public void clusterStateProcessed(String source, ClusterState oldState, ClusterState newState) {
logger.info("cassandra ring block released");
}
});
}
@Override
protected void performStateRecovery(boolean enforceRecoverAfterTime, String reason) {
final Gateway.GatewayStateRecoveredListener recoveryListener = new GatewayRecoveryListener();
gateway().performStateRecovery(recoveryListener);
}
class GatewayRecoveryListener implements Gateway.GatewayStateRecoveredListener {
@Override
public void onSuccess(final ClusterState recoveredState) {
logger.trace("Successful state recovery, importing cluster state...");
clusterService.submitStateUpdateTask("cassandra-gateway-recovery-state", new ClusterStateUpdateTask() {
@Override
public ClusterState execute(ClusterState currentState) {
// remove the block, since we recovered from gateway
ClusterBlocks.Builder blocks = ClusterBlocks.builder()
.blocks(currentState.blocks())
.blocks(recoveredState.blocks())
.removeGlobalBlock(STATE_NOT_RECOVERED_BLOCK);
MetaData.Builder metaDataBuilder = MetaData.builder(recoveredState.metaData());
// automatically generate a UID for the metadata if we need to
metaDataBuilder.generateClusterUuidIfNeeded();
if (recoveredState.metaData().settings().getAsBoolean("cluster.blocks.read_only", false)) {
blocks.addGlobalBlock(MetaData.CLUSTER_READ_ONLY_BLOCK);
}
for (IndexMetaData indexMetaData : recoveredState.metaData()) {
metaDataBuilder.put(indexMetaData, false);
blocks.addBlocks(indexMetaData);
}
// update the state to reflect the new metadata and routing
ClusterState updatedState = ClusterState.builder(currentState)
.blocks(blocks)
.metaData(metaDataBuilder)
.build();
RoutingTable newRoutingTable = RoutingTable.build(CassandraGatewayService.this.clusterService, updatedState);
return ClusterState.builder(updatedState).routingTable(newRoutingTable).build();
}
@Override
public void onFailure(String source, Exception t) {
logger.error("Unexpected failure during [{}]", t, source);
GatewayRecoveryListener.this.onFailure("failed to updated cluster state");
}
@Override
public void clusterStateProcessed(String source, ClusterState oldState, ClusterState newState) {
logger.info("Recovered [{}] indices into cluster_state metadata={}/{}",
newState.metaData().indices().size(), newState.metaData().clusterUUID(), newState.metaData().version());
}
});
}
@Override
public void onFailure(String message) {
recovered.set(false);
// don't remove the block here, we don't want to allow anything in such a case
logger.info("Metadata state not restored, reason: {}", message);
}
}
}
| fixup startup race condition on routing table update
| server/src/main/java/org/elassandra/gateway/CassandraGatewayService.java | fixup startup race condition on routing table update | <ide><path>erver/src/main/java/org/elassandra/gateway/CassandraGatewayService.java
<ide>
<ide> // update the state to reflect
<ide> ClusterState updatedState = ClusterState.builder(currentState).blocks(blocks).build();
<del> return updatedState;
<add>
<add> // update routing table
<add> RoutingTable routingTable = RoutingTable.build(clusterService, updatedState);
<add> return ClusterState.builder(updatedState).routingTable(routingTable).build();
<ide> }
<ide>
<ide> @Override |
|
Java | apache-2.0 | 449dc5cf2b9fb405fac8e3ddadfc988520d1f2ff | 0 | maheshika/carbon4-kernel,maheshika/carbon4-kernel,maheshika/carbon4-kernel,maheshika/carbon4-kernel | /*
* Copyright 2004,2005 The Apache Software Foundation.
*
* 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 org.wso2.carbon.core.multitenancy;
import org.apache.axiom.attachments.Attachments;
import org.apache.axiom.om.util.UUIDGenerator;
import org.apache.axiom.util.UIDGenerator;
import org.apache.axis2.AxisFault;
import org.apache.axis2.Constants;
import org.apache.axis2.addressing.EndpointReference;
import org.apache.axis2.builder.BuilderUtil;
import org.apache.axis2.client.Options;
import org.apache.axis2.context.ConfigurationContext;
import org.apache.axis2.context.MessageContext;
import org.apache.axis2.context.OperationContext;
import org.apache.axis2.description.AxisBindingOperation;
import org.apache.axis2.description.AxisEndpoint;
import org.apache.axis2.description.AxisOperation;
import org.apache.axis2.description.AxisService;
import org.apache.axis2.description.TransportInDescription;
import org.apache.axis2.description.TransportOutDescription;
import org.apache.axis2.description.WSDL2Constants;
import org.apache.axis2.dispatchers.HTTPLocationBasedDispatcher;
import org.apache.axis2.dispatchers.RequestURIBasedDispatcher;
import org.apache.axis2.dispatchers.RequestURIOperationDispatcher;
import org.apache.axis2.engine.AxisEngine;
import org.apache.axis2.engine.Handler;
import org.apache.axis2.engine.MessageReceiver;
import org.apache.axis2.transport.RequestResponseTransport;
import org.apache.axis2.transport.http.HTTPConstants;
import org.apache.axis2.util.MessageContextBuilder;
import org.apache.axis2.util.Utils;
import org.apache.axis2.wsdl.WSDLConstants;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.wso2.carbon.context.PrivilegedCarbonContext;
import org.wso2.carbon.core.multitenancy.utils.TenantAxisUtils;
import org.wso2.carbon.utils.multitenancy.MultitenantConstants;
import org.wso2.carbon.utils.multitenancy.MultitenantUtils;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.Iterator;
/**
* This MessageReceiver will try to locate the tenant specific AxisConfiguration and dispatch the
* request to that AxisConfiguration. Dispatching to the actual service & operation will happen
* within the tenant specific AxisConfiguration.
*/
public class MultitenantMessageReceiver implements MessageReceiver {
private static final String TENANT_DELIMITER = "/t/";
private static final Log log = LogFactory.getLog(MultitenantMessageReceiver.class);
public void receive(MessageContext mainInMsgContext) throws AxisFault {
EndpointReference toEpr = getDestinationEPR(mainInMsgContext);
if (toEpr != null) {
// this is a request coming in to the multitenant environment
processRequest(mainInMsgContext);
} else {
// this is a response coming from a dual channel invocation or a
// non blocking transport like esb
processResponse(mainInMsgContext);
}
}
/**
* Process a response message coming in the multitenant environment
*
* @param mainInMsgContext supertenant MessageContext
* @throws AxisFault if an error occurs
*/
private void processResponse(MessageContext mainInMsgContext) throws AxisFault {
MessageContext requestMsgCtx = mainInMsgContext.getOperationContext().
getMessageContext(WSDL2Constants.MESSAGE_LABEL_IN);
if (requestMsgCtx != null) {
MessageContext tenantRequestMsgCtx = (MessageContext)
requestMsgCtx.getProperty(MultitenantConstants.TENANT_REQUEST_MSG_CTX);
if (tenantRequestMsgCtx != null) {
MessageContext tenantResponseMsgCtx = tenantRequestMsgCtx.getOperationContext().
getMessageContext(WSDL2Constants.MESSAGE_LABEL_IN);
if (tenantResponseMsgCtx == null) {
tenantResponseMsgCtx = new MessageContext();
tenantResponseMsgCtx.setOperationContext(tenantRequestMsgCtx.getOperationContext());
}
tenantResponseMsgCtx.setServerSide(true);
tenantResponseMsgCtx.setDoingREST(tenantRequestMsgCtx.isDoingREST());
Iterator itr = mainInMsgContext.getPropertyNames();
while (itr.hasNext()) {
String key = (String) itr.next();
if (key != null) {
tenantResponseMsgCtx.setProperty(key, mainInMsgContext.getProperty(key));
}
}
tenantResponseMsgCtx.setProperty(MessageContext.TRANSPORT_IN, tenantRequestMsgCtx
.getProperty(MessageContext.TRANSPORT_IN));
tenantResponseMsgCtx.setTransportIn(tenantRequestMsgCtx.getTransportIn());
tenantResponseMsgCtx.setTransportOut(tenantRequestMsgCtx.getTransportOut());
tenantResponseMsgCtx.setProperty(MessageContext.TRANSPORT_HEADERS,
mainInMsgContext.getProperty(MessageContext.TRANSPORT_HEADERS));
tenantResponseMsgCtx.setAxisMessage(
tenantRequestMsgCtx.getOperationContext().getAxisOperation().
getMessage(WSDLConstants.MESSAGE_LABEL_IN_VALUE));
tenantResponseMsgCtx.setOperationContext(tenantRequestMsgCtx.getOperationContext());
tenantResponseMsgCtx.setConfigurationContext(
tenantRequestMsgCtx.getConfigurationContext());
tenantResponseMsgCtx.setTo(null);
tenantResponseMsgCtx.setSoapAction(mainInMsgContext.getSoapAction());
tenantResponseMsgCtx.setEnvelope(mainInMsgContext.getEnvelope());
if(mainInMsgContext.getProperty(MultitenantConstants.PASS_THROUGH_PIPE) != null){
tenantResponseMsgCtx.setProperty(MultitenantConstants.PASS_THROUGH_PIPE, mainInMsgContext.getProperty(MultitenantConstants.PASS_THROUGH_PIPE));
tenantResponseMsgCtx.setProperty(MultitenantConstants.PASS_THROUGH_SOURCE_CONFIGURATION, mainInMsgContext.getProperty(MultitenantConstants.PASS_THROUGH_SOURCE_CONFIGURATION));
tenantResponseMsgCtx.setProperty("READY2ROCK", mainInMsgContext.getProperty("READY2ROCK"));
tenantResponseMsgCtx.setProperty(MultitenantConstants.PASS_THROUGH_SOURCE_CONNECTION, mainInMsgContext.getProperty(MultitenantConstants.PASS_THROUGH_SOURCE_CONNECTION));
}
tenantResponseMsgCtx.setProperty(MultitenantConstants.MESSAGE_BUILDER_INVOKED,Boolean.FALSE);
tenantResponseMsgCtx.setProperty(MultitenantConstants.CONTENT_TYPE, mainInMsgContext.getProperty(MultitenantConstants.CONTENT_TYPE));
AxisEngine.receive(tenantResponseMsgCtx);
}
}
}
/**
* Process a request message coming in to the multitenant environment
*
* @param mainInMsgContext super tenant's MessageContext
* @throws AxisFault if an error occurs
*/
private void processRequest(MessageContext mainInMsgContext) throws AxisFault {
ConfigurationContext mainConfigCtx = mainInMsgContext.getConfigurationContext();
String to = mainInMsgContext.getTo().getAddress();
int tenantDelimiterIndex = to.indexOf(TENANT_DELIMITER);
String tenant;
String serviceAndOperation;
//for synapse nhttp transport we need to destroy the existing thread contexts and initialise the new value holders
if (mainInMsgContext.getTransportIn() != null){
String transportInClassName = mainInMsgContext.getTransportIn().getReceiver().getClass().getName();
if ("org.apache.synapse.transport.nhttp.HttpCoreNIOListener".equals(transportInClassName) ||
"org.apache.synapse.transport.nhttp.HttpCoreNIOSSLListener".equals(transportInClassName) ||
"org.apache.synapse.transport.passthru.PassThroughHttpListener".equals(transportInClassName) ||
"org.apache.synapse.transport.passthru.PassThroughHttpSSLListener".equals(transportInClassName)
){
PrivilegedCarbonContext.destroyCurrentContext();
}
}
if (tenantDelimiterIndex != -1) {
tenant = MultitenantUtils.getTenantDomainFromUrl(to);
serviceAndOperation = to.substring(tenantDelimiterIndex + tenant.length() + 4);
} else {
// in this case tenant detail is not with the url but user may have send it
// with a soap header or an http header.
// in that case TenantDomainHandler may have set it.
tenant = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantDomain();
serviceAndOperation = Utils.getServiceAndOperationPart(to,
mainInMsgContext.getConfigurationContext().getServiceContextPath());
}
if (tenant == null) {
// Throw an AxisFault: Tenant not specified
handleException(mainInMsgContext, new AxisFault("Tenant not specified"));
return;
}
// this is to prevent non-blocking transports from sending 202
mainInMsgContext.getOperationContext().setProperty(
Constants.RESPONSE_WRITTEN, "SKIP");
ConfigurationContext tenantConfigCtx =
TenantAxisUtils.getTenantConfigurationContext(tenant, mainConfigCtx);
if (tenantConfigCtx == null) {
// Throw AxisFault: Tenant does not exist
handleException(mainInMsgContext, new AxisFault("Tenant " + tenant + " not found"));
return;
}
if (mainInMsgContext.isDoingREST()) { // Handle REST requests
doREST(mainInMsgContext, to, tenant, tenantConfigCtx, serviceAndOperation);
} else {
doSOAP(mainInMsgContext, tenant, tenantConfigCtx, serviceAndOperation);
}
}
/**
* Process a SOAP request coming in to the multitenant environment
* @param mainInMsgContext super tenant's message context
* @param tenant nameof the tenant
* @param tenantConfigCtx tenant's ConfigurationContext
* @param serviceName name of the service
* @throws AxisFault if an error occurs
*/
private void doSOAP(MessageContext mainInMsgContext,
String tenant,
ConfigurationContext tenantConfigCtx,
String serviceName) throws AxisFault {
// Call the correct tenant's configuration
MessageContext tenantInMsgCtx = tenantConfigCtx.createMessageContext();
tenantInMsgCtx.setMessageID(UUIDGenerator.getUUID());
Options options = tenantInMsgCtx.getOptions();
options.setTo(new EndpointReference("local://" + tenantConfigCtx.getServicePath() +
"/" + serviceName));
options.setAction(mainInMsgContext.getSoapAction());
tenantInMsgCtx.setEnvelope(mainInMsgContext.getEnvelope());
tenantInMsgCtx.setServerSide(true);
copyProperties(mainInMsgContext, tenantInMsgCtx);
PrivilegedCarbonContext.getThreadLocalCarbonContext().setTenantDomain(tenant, true);
try {
// set a dummy transport out description
String transportOutName = mainInMsgContext.getTransportOut().getName();
TransportOutDescription transportOutDescription =
tenantConfigCtx.getAxisConfiguration().getTransportOut(transportOutName);
tenantInMsgCtx.setTransportOut(transportOutDescription);
TransportInDescription incomingTransport =
tenantConfigCtx.getAxisConfiguration().
getTransportIn(mainInMsgContext.getIncomingTransportName());
tenantInMsgCtx.setTransportIn(incomingTransport);
tenantInMsgCtx.setProperty(MessageContext.TRANSPORT_OUT,
mainInMsgContext.getProperty(MessageContext.TRANSPORT_OUT));
tenantInMsgCtx.setProperty(Constants.OUT_TRANSPORT_INFO,
mainInMsgContext.getProperty(Constants.OUT_TRANSPORT_INFO));
tenantInMsgCtx.setIncomingTransportName(mainInMsgContext.getIncomingTransportName());
tenantInMsgCtx.setProperty(RequestResponseTransport.TRANSPORT_CONTROL,
mainInMsgContext.getProperty(RequestResponseTransport.TRANSPORT_CONTROL));
// inject the message to the tenant inflow handlers
AxisEngine.receive(tenantInMsgCtx);
mainInMsgContext.getOperationContext().setProperty(Constants.RESPONSE_WRITTEN,
tenantInMsgCtx.getOperationContext().getProperty(Constants.RESPONSE_WRITTEN));
} catch (AxisFault axisFault) {
// at a fault flow message receiver throws a fault.
// we need to first catch this fault and invoke the fault flow
// then thorw the AxisFault for main flow which is catch by the carbon servlet
// and invoke the fault handlers.
MessageContext faultContext =
MessageContextBuilder.createFaultMessageContext(tenantInMsgCtx, axisFault);
faultContext.setTransportOut(tenantInMsgCtx.getTransportOut());
faultContext.setProperty(MultitenantConstants.TENANT_MR_STARTED_FAULT,
Constants.VALUE_TRUE);
AxisEngine.sendFault(faultContext);
// we need to set the detial to null. otherwise the details element is copied to
// new message context and removed from the original one
axisFault.setDetail(null);
MessageContext mainFaultContext = MessageContextBuilder.createFaultMessageContext(
mainInMsgContext, axisFault);
mainFaultContext.setTo(faultContext.getTo());
mainFaultContext.setSoapAction(faultContext.getSoapAction());
mainFaultContext.setEnvelope(faultContext.getEnvelope());
throw new AxisFault(axisFault.getMessage(), mainFaultContext);
}
}
/**
* Process a REST message coming in to the multitenant environment
* @param mainInMsgContext SuperTenant's Message Context
* @param to the to address
* @param tenant tenant name
* @param tenantConfigCtx Tentnat's configuration context
* @param serviceName service name
* @throws AxisFault if an error occurs
*/
private void doREST(MessageContext mainInMsgContext,
String to,
String tenant,
ConfigurationContext tenantConfigCtx,
String serviceName) throws AxisFault {
HttpServletRequest request =
(HttpServletRequest) mainInMsgContext.getProperty(
HTTPConstants.MC_HTTP_SERVLETREQUEST);
if (request != null) {
HttpServletResponse response =
(HttpServletResponse) mainInMsgContext.getProperty(
HTTPConstants.MC_HTTP_SERVLETRESPONSE);
doServletRest(mainInMsgContext, to, tenant, tenantConfigCtx,
serviceName, request, response);
} else {
doNhttpREST(mainInMsgContext, to, tenant,
tenantConfigCtx, serviceName);
}
}
/**
* Process a REST message coming in from the Servlet transport.
* @param mainInMsgContext supertenant's MessageContext
* @param to the full transport url
* @param tenant name of the tenant
* @param tenantConfigCtx tenant ConfigurationContext
* @param serviceName the part of the to url after the service
* @param request servlet request
* @param response servlet response
* @throws AxisFault if an error occcus
*/
private void doServletRest(MessageContext mainInMsgContext, String to,
String tenant, ConfigurationContext tenantConfigCtx,
String serviceName, HttpServletRequest request,
HttpServletResponse response) throws AxisFault {
String serviceWithSlashT = TENANT_DELIMITER + tenant + "/" + serviceName;
String requestUri = "local://" + tenantConfigCtx.getServicePath() + "/" + serviceName +
(to.endsWith(serviceWithSlashT) ?
"" :
"/" + to.substring(to.indexOf(serviceWithSlashT) +
serviceWithSlashT.length() + 1));
MultitenantRESTServlet restServlet = new MultitenantRESTServlet(
tenantConfigCtx, requestUri, tenant);
String httpMethod = (String) mainInMsgContext.getProperty(HTTPConstants.HTTP_METHOD);
try {
if (httpMethod.equals(Constants.Configuration.HTTP_METHOD_GET)) {
restServlet.doGet(request, response);
} else if (httpMethod.equals(Constants.Configuration.HTTP_METHOD_POST)) {
restServlet.doPost(request, response);
} else if (httpMethod.equals(Constants.Configuration.HTTP_METHOD_PUT)) {
restServlet.doPut(request, response);
} else if (httpMethod.equals(Constants.Configuration.HTTP_METHOD_DELETE)) {
restServlet.doDelete(request, response);
} else {
// TODO: throw exception: Invalid verb
}
} catch (ServletException e) {
throw new AxisFault(e.getMessage(), e);
} catch (IOException e) {
throw new AxisFault(e.getMessage(), e);
}
// Send the response
MessageContext tenantOutMsgContext = restServlet.getOutMessageContext();
MessageContext tenantOutFaultMsgContext = restServlet.getOutFaultMessageContext();
// for a fault case both out and fault contexts are not null. so first we need to
// check the fault context
if (tenantOutFaultMsgContext != null) {
// TODO: set the fault exception
MessageContext mainOutFaultMsgContext =
MessageContextBuilder.createFaultMessageContext(mainInMsgContext, null);
mainOutFaultMsgContext.setEnvelope(tenantOutFaultMsgContext.getEnvelope());
throw new AxisFault("Problem with executing the message", mainOutFaultMsgContext);
} else if (tenantOutMsgContext != null) {
MessageContext mainOutMsgContext =
MessageContextBuilder.createOutMessageContext(mainInMsgContext);
mainOutMsgContext.getOperationContext().addMessageContext(mainOutMsgContext);
mainOutMsgContext.setEnvelope(tenantOutMsgContext.getEnvelope());
mainOutMsgContext.setProperty(Constants.Configuration.MESSAGE_TYPE,
tenantOutMsgContext.getProperty(Constants.Configuration.MESSAGE_TYPE));
AxisEngine.send(mainOutMsgContext);
}
}
/**
* Process a REST message coming in from the NHTTP transport.
* @param mainInMsgContext supertenant's MessageContext
* @param to the full transport url
* @param tenant name of the tenant
* @param tenantConfigCtx tenant ConfigurationContext
* @param servicePart the part of the to url after the service
* @throws AxisFault if an error occcus
*/
public void doNhttpREST(MessageContext mainInMsgContext,
String to,
String tenant,
ConfigurationContext tenantConfigCtx,
String servicePart) throws AxisFault {
String serviceWithSlashT = TENANT_DELIMITER + tenant + "/" + servicePart;
String requestUri = "local://" + tenantConfigCtx.getServicePath() + "/" + servicePart +
(to.endsWith(serviceWithSlashT) ?
"" :
"/" + to.substring(to.indexOf(serviceWithSlashT) +
serviceWithSlashT.length() + 1));
// Now create the message context to invoke
MessageContext tenantInMsgCtx = tenantConfigCtx.createMessageContext();
String trsPrefix = (String) mainInMsgContext.getProperty(
Constants.Configuration.TRANSPORT_IN_URL);
int sepindex = trsPrefix.indexOf(':');
if (sepindex > -1) {
trsPrefix = trsPrefix.substring(0, sepindex);
tenantInMsgCtx.setIncomingTransportName(trsPrefix);
} else {
tenantInMsgCtx.setIncomingTransportName(Constants.TRANSPORT_HTTP);
}
tenantInMsgCtx.setMessageID(UIDGenerator.generateURNString());
tenantInMsgCtx.setServerSide(true);
tenantInMsgCtx.setDoingREST(true);
copyProperties(mainInMsgContext, tenantInMsgCtx);
tenantInMsgCtx.setTo(new EndpointReference(requestUri));
// set a dummy transport out description
String transportOutName = mainInMsgContext.getTransportOut().getName();
TransportOutDescription transportOutDescription =
tenantConfigCtx.getAxisConfiguration().getTransportOut(transportOutName);
tenantInMsgCtx.setTransportOut(transportOutDescription);
TransportInDescription incomingTransport =
tenantConfigCtx.getAxisConfiguration().
getTransportIn(mainInMsgContext.getIncomingTransportName());
tenantInMsgCtx.setTransportIn(incomingTransport);
tenantInMsgCtx.setProperty(MessageContext.TRANSPORT_OUT,
mainInMsgContext.getProperty(MessageContext.TRANSPORT_OUT));
tenantInMsgCtx.setProperty(Constants.OUT_TRANSPORT_INFO,
mainInMsgContext.getProperty(Constants.OUT_TRANSPORT_INFO));
tenantInMsgCtx.setIncomingTransportName(mainInMsgContext.getIncomingTransportName());
// When initializing caching, cache manager fetches the tenant domain from threadLocalCarbonContext
// Without setting this, caching cannot be initialised on the API Gateway.
String transportInClassName = mainInMsgContext.getTransportIn().getReceiver().getClass().getName();
if ("org.apache.synapse.transport.nhttp.HttpCoreNIOListener".equals(transportInClassName) ||
"org.apache.synapse.transport.nhttp.HttpCoreNIOSSLListener".equals(transportInClassName)||
"org.apache.synapse.transport.passthru.PassThroughHttpListener".equals(transportInClassName) ||
"org.apache.synapse.transport.passthru.PassThroughHttpSSLListener".equals(transportInClassName)){
PrivilegedCarbonContext.getThreadLocalCarbonContext().setTenantDomain(tenant, true);
}
/* // extract the part of the user after the actual service and set it as
int index = servicePart.indexOf('/');
String service = (index > 0 ?
servicePart.substring(servicePart.indexOf('/') + 1) : servicePart);
//String servicePath = TENANT_DELIMITER + tenant + "/" + service;
//String restSuffic = (to.endsWith(servicePath) ? "" :
// to.substring(to.indexOf(servicePath) + servicePath.length() + 1));
tenantInMsgCtx.setProperty("REST_URL_POSTFIX", service);*/
String service = "";
String postFix = "";
int index = servicePart.indexOf("/");
if (index > 0) {
service = servicePart.substring(0, index);
postFix = servicePart.substring(index + 1);
}
if (service.equals("")) {
service = servicePart;
}
tenantInMsgCtx.setProperty("REST_URL_POSTFIX", postFix);
// handling requests with invalid service portion
if (tenantConfigCtx.getAxisConfiguration().getService(service) == null) {
// we assume that the request should go to the default service
tenantInMsgCtx.setAxisService(tenantConfigCtx.getAxisConfiguration()
.getService("__SynapseService"));
}
tenantInMsgCtx.setEnvelope(mainInMsgContext.getEnvelope());;
InputStream in = (InputStream) mainInMsgContext.getProperty("nhttp.input.stream");
OutputStream os = (OutputStream) mainInMsgContext.getProperty("nhttp.output.stream");
String contentType = (String) mainInMsgContext.getProperty("ContentType");
try {
// String httpMethod = (String) mainInMsgContext.getProperty(HTTPConstants.HTTP_METHOD);
String httpMethod = (String) mainInMsgContext.getProperty(Constants.Configuration.HTTP_METHOD);
if (httpMethod.equals(Constants.Configuration.HTTP_METHOD_GET) ||
httpMethod.equals(Constants.Configuration.HTTP_METHOD_DELETE) ||
httpMethod.equals("OPTIONS")) {
//RESTUtil.processURLRequest(tenantInMsgCtx, os, contentType);
this.processRESTRequest(tenantInMsgCtx,os,contentType);
} else if (httpMethod.equals(Constants.Configuration.HTTP_METHOD_POST) ||
httpMethod.equals(Constants.Configuration.HTTP_METHOD_PUT)) {
//RESTUtil.processXMLRequest(tenantInMsgCtx, in, os, contentType);
this.processRESTRequest(tenantInMsgCtx,os,contentType);
} else {
// TODO: throw exception: Invalid verb
}
} catch (AxisFault axisFault) {
// at a fault flow message receiver throws a fault.
// we need to first catch this fault and invoke the fault flow
// then thorw the AxisFault for main flow which is catch by the carbon servlet
// and invoke the fault handlers.
MessageContext faultContext =
MessageContextBuilder.createFaultMessageContext(tenantInMsgCtx, axisFault);
faultContext.setTransportOut(tenantInMsgCtx.getTransportOut());
faultContext.setProperty(MultitenantConstants.TENANT_MR_STARTED_FAULT,
Constants.VALUE_TRUE);
AxisEngine.sendFault(faultContext);
// we need to set the detial to null. otherwise the details element is copied to
// new message context and removed from the original one
axisFault.setDetail(null);
MessageContext mainFaultContext = MessageContextBuilder.
createFaultMessageContext(mainInMsgContext, axisFault);
mainFaultContext.setTo(faultContext.getTo());
mainFaultContext.setSoapAction(faultContext.getSoapAction());
mainFaultContext.setEnvelope(faultContext.getEnvelope());
throw new AxisFault(axisFault.getMessage(), mainFaultContext);
}
}
/**
* This is temporary fix to handle REST API invocations requests comes via
* multitenancy dispatch service,
*
* @param msgContext
* @param os
* @param contentType
* @return
* @throws AxisFault
*/
private Handler.InvocationResponse processRESTRequest(MessageContext msgContext, OutputStream os, String contentType) throws AxisFault{
try {
msgContext.setDoingREST(true);
String charSetEncoding = BuilderUtil.getCharSetEncoding(contentType);
msgContext.setProperty(Constants.Configuration.CHARACTER_SET_ENCODING, charSetEncoding);
dispatchAndVerify(msgContext);
} catch (AxisFault axisFault) {
throw axisFault;
} finally {
String messageType = (String) msgContext.getProperty(Constants.Configuration.MESSAGE_TYPE);
if (HTTPConstants.MEDIA_TYPE_X_WWW_FORM.equals(messageType)
|| HTTPConstants.MEDIA_TYPE_MULTIPART_FORM_DATA.equals(messageType)) {
msgContext.setProperty(Constants.Configuration.MESSAGE_TYPE, HTTPConstants.MEDIA_TYPE_APPLICATION_XML);
}
}
return AxisEngine.receive(msgContext);
}
private static void dispatchAndVerify(MessageContext msgContext) throws AxisFault {
RequestURIBasedDispatcher requestDispatcher = new RequestURIBasedDispatcher();
requestDispatcher.invoke(msgContext);
AxisService axisService = msgContext.getAxisService();
if (axisService != null) {
HTTPLocationBasedDispatcher httpLocationBasedDispatcher =
new HTTPLocationBasedDispatcher();
httpLocationBasedDispatcher.invoke(msgContext);
if (msgContext.getAxisOperation() == null) {
RequestURIOperationDispatcher requestURIOperationDispatcher =
new RequestURIOperationDispatcher();
requestURIOperationDispatcher.invoke(msgContext);
}
AxisOperation axisOperation;
if ((axisOperation = msgContext.getAxisOperation()) != null) {
AxisEndpoint axisEndpoint =
(AxisEndpoint) msgContext.getProperty(WSDL2Constants.ENDPOINT_LOCAL_NAME);
if (axisEndpoint != null) {
AxisBindingOperation axisBindingOperation = (AxisBindingOperation) axisEndpoint
.getBinding().getChild(axisOperation.getName());
msgContext.setProperty(Constants.AXIS_BINDING_OPERATION, axisBindingOperation);
}
msgContext.setAxisOperation(axisOperation);
}
}
}
/**
* Copy the properties from main message context to the tenant message context.
*
* @param mainMsgCtx super tenant message context
* @param tenantMsgCtx tenant message context
*/
private void copyProperties(MessageContext mainMsgCtx, MessageContext tenantMsgCtx) {
// do not copy options from the original
tenantMsgCtx.setSoapAction(mainMsgCtx.getSoapAction());
tenantMsgCtx.setDoingREST(mainMsgCtx.isDoingREST());
tenantMsgCtx.setDoingMTOM(mainMsgCtx.isDoingMTOM());
tenantMsgCtx.setDoingSwA(mainMsgCtx.isDoingSwA());
// if the original request carries any attachments, copy them to the clone
// as well, except for the soap part if any
Attachments attachments = mainMsgCtx.getAttachmentMap();
if (attachments != null && attachments.getAllContentIDs().length > 0) {
String[] cIDs = attachments.getAllContentIDs();
String soapPart = attachments.getSOAPPartContentID();
for (String cID : cIDs) {
if (!cID.equals(soapPart)) {
tenantMsgCtx.addAttachment(cID, attachments.getDataHandler(cID));
}
}
}
Iterator itr = mainMsgCtx.getPropertyNames();
while (itr.hasNext()) {
String key = (String) itr.next();
if (key != null) {
tenantMsgCtx.setProperty(key, mainMsgCtx.getProperty(key));
}
}
}
private void handleException(MessageContext mainInMsgContext, AxisFault fault)
throws AxisFault {
MessageContext mainOutMsgContext =
MessageContextBuilder.createFaultMessageContext(mainInMsgContext, fault);
OperationContext mainOpContext = mainInMsgContext.getOperationContext();
mainOpContext.addMessageContext(mainOutMsgContext);
mainOutMsgContext.setOperationContext(mainOpContext);
AxisEngine.sendFault(mainOutMsgContext);
}
/**
* Get the EPR for the message passed in
* @param msgContext the message context
* @return the destination EPR
*/
public static EndpointReference getDestinationEPR(MessageContext msgContext) {
// Trasnport URL can be different from the WSA-To
String transportURL = (String) msgContext.getProperty(
Constants.Configuration.TRANSPORT_URL);
if (transportURL != null) {
return new EndpointReference(transportURL);
} else if (
(msgContext.getTo() != null) && !msgContext.getTo().hasAnonymousAddress()) {
return msgContext.getTo();
}
return null;
}
}
| core/org.wso2.carbon.core/src/main/java/org/wso2/carbon/core/multitenancy/MultitenantMessageReceiver.java | /*
* Copyright 2004,2005 The Apache Software Foundation.
*
* 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 org.wso2.carbon.core.multitenancy;
import org.apache.axiom.attachments.Attachments;
import org.apache.axiom.om.util.UUIDGenerator;
import org.apache.axiom.util.UIDGenerator;
import org.apache.axis2.AxisFault;
import org.apache.axis2.Constants;
import org.apache.axis2.addressing.EndpointReference;
import org.apache.axis2.builder.BuilderUtil;
import org.apache.axis2.client.Options;
import org.apache.axis2.context.ConfigurationContext;
import org.apache.axis2.context.MessageContext;
import org.apache.axis2.context.OperationContext;
import org.apache.axis2.description.AxisBindingOperation;
import org.apache.axis2.description.AxisEndpoint;
import org.apache.axis2.description.AxisOperation;
import org.apache.axis2.description.AxisService;
import org.apache.axis2.description.TransportInDescription;
import org.apache.axis2.description.TransportOutDescription;
import org.apache.axis2.description.WSDL2Constants;
import org.apache.axis2.dispatchers.HTTPLocationBasedDispatcher;
import org.apache.axis2.dispatchers.RequestURIBasedDispatcher;
import org.apache.axis2.dispatchers.RequestURIOperationDispatcher;
import org.apache.axis2.engine.AxisEngine;
import org.apache.axis2.engine.Handler;
import org.apache.axis2.engine.MessageReceiver;
import org.apache.axis2.transport.RequestResponseTransport;
import org.apache.axis2.transport.http.HTTPConstants;
import org.apache.axis2.util.MessageContextBuilder;
import org.apache.axis2.util.Utils;
import org.apache.axis2.wsdl.WSDLConstants;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.wso2.carbon.context.PrivilegedCarbonContext;
import org.wso2.carbon.core.multitenancy.utils.TenantAxisUtils;
import org.wso2.carbon.utils.multitenancy.MultitenantConstants;
import org.wso2.carbon.utils.multitenancy.MultitenantUtils;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.Iterator;
/**
* This MessageReceiver will try to locate the tenant specific AxisConfiguration and dispatch the
* request to that AxisConfiguration. Dispatching to the actual service & operation will happen
* within the tenant specific AxisConfiguration.
*/
public class MultitenantMessageReceiver implements MessageReceiver {
private static final String TENANT_DELIMITER = "/t/";
private static final Log log = LogFactory.getLog(MultitenantMessageReceiver.class);
public void receive(MessageContext mainInMsgContext) throws AxisFault {
EndpointReference toEpr = getDestinationEPR(mainInMsgContext);
if (toEpr != null) {
// this is a request coming in to the multitenant environment
processRequest(mainInMsgContext);
} else {
// this is a response coming from a dual channel invocation or a
// non blocking transport like esb
processResponse(mainInMsgContext);
}
}
/**
* Process a response message coming in the multitenant environment
*
* @param mainInMsgContext supertenant MessageContext
* @throws AxisFault if an error occurs
*/
private void processResponse(MessageContext mainInMsgContext) throws AxisFault {
MessageContext requestMsgCtx = mainInMsgContext.getOperationContext().
getMessageContext(WSDL2Constants.MESSAGE_LABEL_IN);
if (requestMsgCtx != null) {
MessageContext tenantRequestMsgCtx = (MessageContext)
requestMsgCtx.getProperty(MultitenantConstants.TENANT_REQUEST_MSG_CTX);
if (tenantRequestMsgCtx != null) {
MessageContext tenantResponseMsgCtx = tenantRequestMsgCtx.getOperationContext().
getMessageContext(WSDL2Constants.MESSAGE_LABEL_IN);
if (tenantResponseMsgCtx == null) {
tenantResponseMsgCtx = new MessageContext();
tenantResponseMsgCtx.setOperationContext(tenantRequestMsgCtx.getOperationContext());
}
tenantResponseMsgCtx.setServerSide(true);
tenantResponseMsgCtx.setDoingREST(tenantRequestMsgCtx.isDoingREST());
Iterator itr = mainInMsgContext.getPropertyNames();
while (itr.hasNext()) {
String key = (String) itr.next();
if (key != null) {
tenantResponseMsgCtx.setProperty(key, mainInMsgContext.getProperty(key));
}
}
tenantResponseMsgCtx.setProperty(MessageContext.TRANSPORT_IN, tenantRequestMsgCtx
.getProperty(MessageContext.TRANSPORT_IN));
tenantResponseMsgCtx.setTransportIn(tenantRequestMsgCtx.getTransportIn());
tenantResponseMsgCtx.setTransportOut(tenantRequestMsgCtx.getTransportOut());
tenantResponseMsgCtx.setProperty(MessageContext.TRANSPORT_HEADERS,
mainInMsgContext.getProperty(MessageContext.TRANSPORT_HEADERS));
tenantResponseMsgCtx.setAxisMessage(
tenantRequestMsgCtx.getOperationContext().getAxisOperation().
getMessage(WSDLConstants.MESSAGE_LABEL_IN_VALUE));
tenantResponseMsgCtx.setOperationContext(tenantRequestMsgCtx.getOperationContext());
tenantResponseMsgCtx.setConfigurationContext(
tenantRequestMsgCtx.getConfigurationContext());
tenantResponseMsgCtx.setTo(null);
tenantResponseMsgCtx.setSoapAction(mainInMsgContext.getSoapAction());
tenantResponseMsgCtx.setEnvelope(mainInMsgContext.getEnvelope());
if(mainInMsgContext.getProperty(MultitenantConstants.PASS_THROUGH_PIPE) != null){
tenantResponseMsgCtx.setProperty(MultitenantConstants.PASS_THROUGH_PIPE, mainInMsgContext.getProperty(MultitenantConstants.PASS_THROUGH_PIPE));
tenantResponseMsgCtx.setProperty(MultitenantConstants.PASS_THROUGH_SOURCE_CONFIGURATION, mainInMsgContext.getProperty(MultitenantConstants.PASS_THROUGH_SOURCE_CONFIGURATION));
tenantResponseMsgCtx.setProperty("READY2ROCK", mainInMsgContext.getProperty("READY2ROCK"));
tenantResponseMsgCtx.setProperty(MultitenantConstants.PASS_THROUGH_SOURCE_CONNECTION, mainInMsgContext.getProperty(MultitenantConstants.PASS_THROUGH_SOURCE_CONNECTION));
}
tenantResponseMsgCtx.setProperty(MultitenantConstants.MESSAGE_BUILDER_INVOKED,Boolean.FALSE);
tenantResponseMsgCtx.setProperty(MultitenantConstants.CONTENT_TYPE, mainInMsgContext.getProperty(MultitenantConstants.CONTENT_TYPE));
AxisEngine.receive(tenantResponseMsgCtx);
}
}
}
/**
* Process a request message coming in to the multitenant environment
*
* @param mainInMsgContext super tenant's MessageContext
* @throws AxisFault if an error occurs
*/
private void processRequest(MessageContext mainInMsgContext) throws AxisFault {
ConfigurationContext mainConfigCtx = mainInMsgContext.getConfigurationContext();
String to = mainInMsgContext.getTo().getAddress();
int tenantDelimiterIndex = to.indexOf(TENANT_DELIMITER);
String tenant;
String serviceAndOperation;
//for synapse nhttp transport we need to destroy the existing thread contexts and initialise the new value holders
if (mainInMsgContext.getTransportIn() != null){
String transportInClassName = mainInMsgContext.getTransportIn().getReceiver().getClass().getName();
if ("org.apache.synapse.transport.nhttp.HttpCoreNIOListener".equals(transportInClassName) ||
"org.apache.synapse.transport.nhttp.HttpCoreNIOSSLListener".equals(transportInClassName) ||
"org.apache.synapse.transport.passthru.PassThroughHttpListener".equals(transportInClassName) ||
"org.apache.synapse.transport.passthru.PassThroughHttpSSLListener".equals(transportInClassName)
){
PrivilegedCarbonContext.destroyCurrentContext();
}
}
if (tenantDelimiterIndex != -1) {
tenant = MultitenantUtils.getTenantDomainFromUrl(to);
serviceAndOperation = to.substring(tenantDelimiterIndex + tenant.length() + 4);
} else {
// in this case tenant detail is not with the url but user may have send it
// with a soap header or an http header.
// in that case TenantDomainHandler may have set it.
tenant = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantDomain();
serviceAndOperation = Utils.getServiceAndOperationPart(to,
mainInMsgContext.getConfigurationContext().getServiceContextPath());
}
if (tenant == null) {
// Throw an AxisFault: Tenant not specified
handleException(mainInMsgContext, new AxisFault("Tenant not specified"));
return;
}
// this is to prevent non-blocking transports from sending 202
mainInMsgContext.getOperationContext().setProperty(
Constants.RESPONSE_WRITTEN, "SKIP");
ConfigurationContext tenantConfigCtx =
TenantAxisUtils.getTenantConfigurationContext(tenant, mainConfigCtx);
if (tenantConfigCtx == null) {
// Throw AxisFault: Tenant does not exist
handleException(mainInMsgContext, new AxisFault("Tenant " + tenant + " not found"));
return;
}
if (mainInMsgContext.isDoingREST()) { // Handle REST requests
doREST(mainInMsgContext, to, tenant, tenantConfigCtx, serviceAndOperation);
} else {
doSOAP(mainInMsgContext, tenant, tenantConfigCtx, serviceAndOperation);
}
}
/**
* Process a SOAP request coming in to the multitenant environment
* @param mainInMsgContext super tenant's message context
* @param tenant nameof the tenant
* @param tenantConfigCtx tenant's ConfigurationContext
* @param serviceName name of the service
* @throws AxisFault if an error occurs
*/
private void doSOAP(MessageContext mainInMsgContext,
String tenant,
ConfigurationContext tenantConfigCtx,
String serviceName) throws AxisFault {
// Call the correct tenant's configuration
MessageContext tenantInMsgCtx = tenantConfigCtx.createMessageContext();
tenantInMsgCtx.setMessageID(UUIDGenerator.getUUID());
Options options = tenantInMsgCtx.getOptions();
options.setTo(new EndpointReference("local://" + tenantConfigCtx.getServicePath() +
"/" + serviceName));
options.setAction(mainInMsgContext.getSoapAction());
tenantInMsgCtx.setEnvelope(mainInMsgContext.getEnvelope());
tenantInMsgCtx.setServerSide(true);
copyProperties(mainInMsgContext, tenantInMsgCtx);
PrivilegedCarbonContext.getThreadLocalCarbonContext().setTenantDomain(tenant, true);
try {
// set a dummy transport out description
String transportOutName = mainInMsgContext.getTransportOut().getName();
TransportOutDescription transportOutDescription =
tenantConfigCtx.getAxisConfiguration().getTransportOut(transportOutName);
tenantInMsgCtx.setTransportOut(transportOutDescription);
TransportInDescription incomingTransport =
tenantConfigCtx.getAxisConfiguration().
getTransportIn(mainInMsgContext.getIncomingTransportName());
tenantInMsgCtx.setTransportIn(incomingTransport);
tenantInMsgCtx.setProperty(MessageContext.TRANSPORT_OUT,
mainInMsgContext.getProperty(MessageContext.TRANSPORT_OUT));
tenantInMsgCtx.setProperty(Constants.OUT_TRANSPORT_INFO,
mainInMsgContext.getProperty(Constants.OUT_TRANSPORT_INFO));
tenantInMsgCtx.setIncomingTransportName(mainInMsgContext.getIncomingTransportName());
tenantInMsgCtx.setProperty(RequestResponseTransport.TRANSPORT_CONTROL,
mainInMsgContext.getProperty(RequestResponseTransport.TRANSPORT_CONTROL));
// inject the message to the tenant inflow handlers
AxisEngine.receive(tenantInMsgCtx);
} catch (AxisFault axisFault) {
// at a fault flow message receiver throws a fault.
// we need to first catch this fault and invoke the fault flow
// then thorw the AxisFault for main flow which is catch by the carbon servlet
// and invoke the fault handlers.
MessageContext faultContext =
MessageContextBuilder.createFaultMessageContext(tenantInMsgCtx, axisFault);
faultContext.setTransportOut(tenantInMsgCtx.getTransportOut());
faultContext.setProperty(MultitenantConstants.TENANT_MR_STARTED_FAULT,
Constants.VALUE_TRUE);
AxisEngine.sendFault(faultContext);
// we need to set the detial to null. otherwise the details element is copied to
// new message context and removed from the original one
axisFault.setDetail(null);
MessageContext mainFaultContext = MessageContextBuilder.createFaultMessageContext(
mainInMsgContext, axisFault);
mainFaultContext.setTo(faultContext.getTo());
mainFaultContext.setSoapAction(faultContext.getSoapAction());
mainFaultContext.setEnvelope(faultContext.getEnvelope());
throw new AxisFault(axisFault.getMessage(), mainFaultContext);
}
}
/**
* Process a REST message coming in to the multitenant environment
* @param mainInMsgContext SuperTenant's Message Context
* @param to the to address
* @param tenant tenant name
* @param tenantConfigCtx Tentnat's configuration context
* @param serviceName service name
* @throws AxisFault if an error occurs
*/
private void doREST(MessageContext mainInMsgContext,
String to,
String tenant,
ConfigurationContext tenantConfigCtx,
String serviceName) throws AxisFault {
HttpServletRequest request =
(HttpServletRequest) mainInMsgContext.getProperty(
HTTPConstants.MC_HTTP_SERVLETREQUEST);
if (request != null) {
HttpServletResponse response =
(HttpServletResponse) mainInMsgContext.getProperty(
HTTPConstants.MC_HTTP_SERVLETRESPONSE);
doServletRest(mainInMsgContext, to, tenant, tenantConfigCtx,
serviceName, request, response);
} else {
doNhttpREST(mainInMsgContext, to, tenant,
tenantConfigCtx, serviceName);
}
}
/**
* Process a REST message coming in from the Servlet transport.
* @param mainInMsgContext supertenant's MessageContext
* @param to the full transport url
* @param tenant name of the tenant
* @param tenantConfigCtx tenant ConfigurationContext
* @param serviceName the part of the to url after the service
* @param request servlet request
* @param response servlet response
* @throws AxisFault if an error occcus
*/
private void doServletRest(MessageContext mainInMsgContext, String to,
String tenant, ConfigurationContext tenantConfigCtx,
String serviceName, HttpServletRequest request,
HttpServletResponse response) throws AxisFault {
String serviceWithSlashT = TENANT_DELIMITER + tenant + "/" + serviceName;
String requestUri = "local://" + tenantConfigCtx.getServicePath() + "/" + serviceName +
(to.endsWith(serviceWithSlashT) ?
"" :
"/" + to.substring(to.indexOf(serviceWithSlashT) +
serviceWithSlashT.length() + 1));
MultitenantRESTServlet restServlet = new MultitenantRESTServlet(
tenantConfigCtx, requestUri, tenant);
String httpMethod = (String) mainInMsgContext.getProperty(HTTPConstants.HTTP_METHOD);
try {
if (httpMethod.equals(Constants.Configuration.HTTP_METHOD_GET)) {
restServlet.doGet(request, response);
} else if (httpMethod.equals(Constants.Configuration.HTTP_METHOD_POST)) {
restServlet.doPost(request, response);
} else if (httpMethod.equals(Constants.Configuration.HTTP_METHOD_PUT)) {
restServlet.doPut(request, response);
} else if (httpMethod.equals(Constants.Configuration.HTTP_METHOD_DELETE)) {
restServlet.doDelete(request, response);
} else {
// TODO: throw exception: Invalid verb
}
} catch (ServletException e) {
throw new AxisFault(e.getMessage(), e);
} catch (IOException e) {
throw new AxisFault(e.getMessage(), e);
}
// Send the response
MessageContext tenantOutMsgContext = restServlet.getOutMessageContext();
MessageContext tenantOutFaultMsgContext = restServlet.getOutFaultMessageContext();
// for a fault case both out and fault contexts are not null. so first we need to
// check the fault context
if (tenantOutFaultMsgContext != null) {
// TODO: set the fault exception
MessageContext mainOutFaultMsgContext =
MessageContextBuilder.createFaultMessageContext(mainInMsgContext, null);
mainOutFaultMsgContext.setEnvelope(tenantOutFaultMsgContext.getEnvelope());
throw new AxisFault("Problem with executing the message", mainOutFaultMsgContext);
} else if (tenantOutMsgContext != null) {
MessageContext mainOutMsgContext =
MessageContextBuilder.createOutMessageContext(mainInMsgContext);
mainOutMsgContext.getOperationContext().addMessageContext(mainOutMsgContext);
mainOutMsgContext.setEnvelope(tenantOutMsgContext.getEnvelope());
mainOutMsgContext.setProperty(Constants.Configuration.MESSAGE_TYPE,
tenantOutMsgContext.getProperty(Constants.Configuration.MESSAGE_TYPE));
AxisEngine.send(mainOutMsgContext);
}
}
/**
* Process a REST message coming in from the NHTTP transport.
* @param mainInMsgContext supertenant's MessageContext
* @param to the full transport url
* @param tenant name of the tenant
* @param tenantConfigCtx tenant ConfigurationContext
* @param servicePart the part of the to url after the service
* @throws AxisFault if an error occcus
*/
public void doNhttpREST(MessageContext mainInMsgContext,
String to,
String tenant,
ConfigurationContext tenantConfigCtx,
String servicePart) throws AxisFault {
String serviceWithSlashT = TENANT_DELIMITER + tenant + "/" + servicePart;
String requestUri = "local://" + tenantConfigCtx.getServicePath() + "/" + servicePart +
(to.endsWith(serviceWithSlashT) ?
"" :
"/" + to.substring(to.indexOf(serviceWithSlashT) +
serviceWithSlashT.length() + 1));
// Now create the message context to invoke
MessageContext tenantInMsgCtx = tenantConfigCtx.createMessageContext();
String trsPrefix = (String) mainInMsgContext.getProperty(
Constants.Configuration.TRANSPORT_IN_URL);
int sepindex = trsPrefix.indexOf(':');
if (sepindex > -1) {
trsPrefix = trsPrefix.substring(0, sepindex);
tenantInMsgCtx.setIncomingTransportName(trsPrefix);
} else {
tenantInMsgCtx.setIncomingTransportName(Constants.TRANSPORT_HTTP);
}
tenantInMsgCtx.setMessageID(UIDGenerator.generateURNString());
tenantInMsgCtx.setServerSide(true);
tenantInMsgCtx.setDoingREST(true);
copyProperties(mainInMsgContext, tenantInMsgCtx);
tenantInMsgCtx.setTo(new EndpointReference(requestUri));
// set a dummy transport out description
String transportOutName = mainInMsgContext.getTransportOut().getName();
TransportOutDescription transportOutDescription =
tenantConfigCtx.getAxisConfiguration().getTransportOut(transportOutName);
tenantInMsgCtx.setTransportOut(transportOutDescription);
TransportInDescription incomingTransport =
tenantConfigCtx.getAxisConfiguration().
getTransportIn(mainInMsgContext.getIncomingTransportName());
tenantInMsgCtx.setTransportIn(incomingTransport);
tenantInMsgCtx.setProperty(MessageContext.TRANSPORT_OUT,
mainInMsgContext.getProperty(MessageContext.TRANSPORT_OUT));
tenantInMsgCtx.setProperty(Constants.OUT_TRANSPORT_INFO,
mainInMsgContext.getProperty(Constants.OUT_TRANSPORT_INFO));
tenantInMsgCtx.setIncomingTransportName(mainInMsgContext.getIncomingTransportName());
// When initializing caching, cache manager fetches the tenant domain from threadLocalCarbonContext
// Without setting this, caching cannot be initialised on the API Gateway.
String transportInClassName = mainInMsgContext.getTransportIn().getReceiver().getClass().getName();
if ("org.apache.synapse.transport.nhttp.HttpCoreNIOListener".equals(transportInClassName) ||
"org.apache.synapse.transport.nhttp.HttpCoreNIOSSLListener".equals(transportInClassName)||
"org.apache.synapse.transport.passthru.PassThroughHttpListener".equals(transportInClassName) ||
"org.apache.synapse.transport.passthru.PassThroughHttpSSLListener".equals(transportInClassName)){
PrivilegedCarbonContext.getThreadLocalCarbonContext().setTenantDomain(tenant, true);
}
/* // extract the part of the user after the actual service and set it as
int index = servicePart.indexOf('/');
String service = (index > 0 ?
servicePart.substring(servicePart.indexOf('/') + 1) : servicePart);
//String servicePath = TENANT_DELIMITER + tenant + "/" + service;
//String restSuffic = (to.endsWith(servicePath) ? "" :
// to.substring(to.indexOf(servicePath) + servicePath.length() + 1));
tenantInMsgCtx.setProperty("REST_URL_POSTFIX", service);*/
String service = "";
String postFix = "";
int index = servicePart.indexOf("/");
if (index > 0) {
service = servicePart.substring(0, index);
postFix = servicePart.substring(index + 1);
}
if (service.equals("")) {
service = servicePart;
}
tenantInMsgCtx.setProperty("REST_URL_POSTFIX", postFix);
// handling requests with invalid service portion
if (tenantConfigCtx.getAxisConfiguration().getService(service) == null) {
// we assume that the request should go to the default service
tenantInMsgCtx.setAxisService(tenantConfigCtx.getAxisConfiguration()
.getService("__SynapseService"));
}
tenantInMsgCtx.setEnvelope(mainInMsgContext.getEnvelope());;
InputStream in = (InputStream) mainInMsgContext.getProperty("nhttp.input.stream");
OutputStream os = (OutputStream) mainInMsgContext.getProperty("nhttp.output.stream");
String contentType = (String) mainInMsgContext.getProperty("ContentType");
try {
// String httpMethod = (String) mainInMsgContext.getProperty(HTTPConstants.HTTP_METHOD);
String httpMethod = (String) mainInMsgContext.getProperty(Constants.Configuration.HTTP_METHOD);
if (httpMethod.equals(Constants.Configuration.HTTP_METHOD_GET) ||
httpMethod.equals(Constants.Configuration.HTTP_METHOD_DELETE) ||
httpMethod.equals("OPTIONS")) {
//RESTUtil.processURLRequest(tenantInMsgCtx, os, contentType);
this.processRESTRequest(tenantInMsgCtx,os,contentType);
} else if (httpMethod.equals(Constants.Configuration.HTTP_METHOD_POST) ||
httpMethod.equals(Constants.Configuration.HTTP_METHOD_PUT)) {
//RESTUtil.processXMLRequest(tenantInMsgCtx, in, os, contentType);
this.processRESTRequest(tenantInMsgCtx,os,contentType);
} else {
// TODO: throw exception: Invalid verb
}
} catch (AxisFault axisFault) {
// at a fault flow message receiver throws a fault.
// we need to first catch this fault and invoke the fault flow
// then thorw the AxisFault for main flow which is catch by the carbon servlet
// and invoke the fault handlers.
MessageContext faultContext =
MessageContextBuilder.createFaultMessageContext(tenantInMsgCtx, axisFault);
faultContext.setTransportOut(tenantInMsgCtx.getTransportOut());
faultContext.setProperty(MultitenantConstants.TENANT_MR_STARTED_FAULT,
Constants.VALUE_TRUE);
AxisEngine.sendFault(faultContext);
// we need to set the detial to null. otherwise the details element is copied to
// new message context and removed from the original one
axisFault.setDetail(null);
MessageContext mainFaultContext = MessageContextBuilder.
createFaultMessageContext(mainInMsgContext, axisFault);
mainFaultContext.setTo(faultContext.getTo());
mainFaultContext.setSoapAction(faultContext.getSoapAction());
mainFaultContext.setEnvelope(faultContext.getEnvelope());
throw new AxisFault(axisFault.getMessage(), mainFaultContext);
}
}
/**
* This is temporary fix to handle REST API invocations requests comes via
* multitenancy dispatch service,
*
* @param msgContext
* @param os
* @param contentType
* @return
* @throws AxisFault
*/
private Handler.InvocationResponse processRESTRequest(MessageContext msgContext, OutputStream os, String contentType) throws AxisFault{
try {
msgContext.setDoingREST(true);
String charSetEncoding = BuilderUtil.getCharSetEncoding(contentType);
msgContext.setProperty(Constants.Configuration.CHARACTER_SET_ENCODING, charSetEncoding);
dispatchAndVerify(msgContext);
} catch (AxisFault axisFault) {
throw axisFault;
} finally {
String messageType = (String) msgContext.getProperty(Constants.Configuration.MESSAGE_TYPE);
if (HTTPConstants.MEDIA_TYPE_X_WWW_FORM.equals(messageType)
|| HTTPConstants.MEDIA_TYPE_MULTIPART_FORM_DATA.equals(messageType)) {
msgContext.setProperty(Constants.Configuration.MESSAGE_TYPE, HTTPConstants.MEDIA_TYPE_APPLICATION_XML);
}
}
return AxisEngine.receive(msgContext);
}
private static void dispatchAndVerify(MessageContext msgContext) throws AxisFault {
RequestURIBasedDispatcher requestDispatcher = new RequestURIBasedDispatcher();
requestDispatcher.invoke(msgContext);
AxisService axisService = msgContext.getAxisService();
if (axisService != null) {
HTTPLocationBasedDispatcher httpLocationBasedDispatcher =
new HTTPLocationBasedDispatcher();
httpLocationBasedDispatcher.invoke(msgContext);
if (msgContext.getAxisOperation() == null) {
RequestURIOperationDispatcher requestURIOperationDispatcher =
new RequestURIOperationDispatcher();
requestURIOperationDispatcher.invoke(msgContext);
}
AxisOperation axisOperation;
if ((axisOperation = msgContext.getAxisOperation()) != null) {
AxisEndpoint axisEndpoint =
(AxisEndpoint) msgContext.getProperty(WSDL2Constants.ENDPOINT_LOCAL_NAME);
if (axisEndpoint != null) {
AxisBindingOperation axisBindingOperation = (AxisBindingOperation) axisEndpoint
.getBinding().getChild(axisOperation.getName());
msgContext.setProperty(Constants.AXIS_BINDING_OPERATION, axisBindingOperation);
}
msgContext.setAxisOperation(axisOperation);
}
}
}
/**
* Copy the properties from main message context to the tenant message context.
*
* @param mainMsgCtx super tenant message context
* @param tenantMsgCtx tenant message context
*/
private void copyProperties(MessageContext mainMsgCtx, MessageContext tenantMsgCtx) {
// do not copy options from the original
tenantMsgCtx.setSoapAction(mainMsgCtx.getSoapAction());
tenantMsgCtx.setDoingREST(mainMsgCtx.isDoingREST());
tenantMsgCtx.setDoingMTOM(mainMsgCtx.isDoingMTOM());
tenantMsgCtx.setDoingSwA(mainMsgCtx.isDoingSwA());
// if the original request carries any attachments, copy them to the clone
// as well, except for the soap part if any
Attachments attachments = mainMsgCtx.getAttachmentMap();
if (attachments != null && attachments.getAllContentIDs().length > 0) {
String[] cIDs = attachments.getAllContentIDs();
String soapPart = attachments.getSOAPPartContentID();
for (String cID : cIDs) {
if (!cID.equals(soapPart)) {
tenantMsgCtx.addAttachment(cID, attachments.getDataHandler(cID));
}
}
}
Iterator itr = mainMsgCtx.getPropertyNames();
while (itr.hasNext()) {
String key = (String) itr.next();
if (key != null) {
tenantMsgCtx.setProperty(key, mainMsgCtx.getProperty(key));
}
}
}
private void handleException(MessageContext mainInMsgContext, AxisFault fault)
throws AxisFault {
MessageContext mainOutMsgContext =
MessageContextBuilder.createFaultMessageContext(mainInMsgContext, fault);
OperationContext mainOpContext = mainInMsgContext.getOperationContext();
mainOpContext.addMessageContext(mainOutMsgContext);
mainOutMsgContext.setOperationContext(mainOpContext);
AxisEngine.sendFault(mainOutMsgContext);
}
/**
* Get the EPR for the message passed in
* @param msgContext the message context
* @return the destination EPR
*/
public static EndpointReference getDestinationEPR(MessageContext msgContext) {
// Trasnport URL can be different from the WSA-To
String transportURL = (String) msgContext.getProperty(
Constants.Configuration.TRANSPORT_URL);
if (transportURL != null) {
return new EndpointReference(transportURL);
} else if (
(msgContext.getTo() != null) && !msgContext.getTo().hasAnonymousAddress()) {
return msgContext.getTo();
}
return null;
}
}
| CARBON-14814 - tenant mode axis Client never received the 202 accepted
| core/org.wso2.carbon.core/src/main/java/org/wso2/carbon/core/multitenancy/MultitenantMessageReceiver.java | CARBON-14814 - tenant mode axis Client never received the 202 accepted | <ide><path>ore/org.wso2.carbon.core/src/main/java/org/wso2/carbon/core/multitenancy/MultitenantMessageReceiver.java
<ide>
<ide> // inject the message to the tenant inflow handlers
<ide> AxisEngine.receive(tenantInMsgCtx);
<add> mainInMsgContext.getOperationContext().setProperty(Constants.RESPONSE_WRITTEN,
<add> tenantInMsgCtx.getOperationContext().getProperty(Constants.RESPONSE_WRITTEN));
<ide> } catch (AxisFault axisFault) {
<ide> // at a fault flow message receiver throws a fault.
<ide> // we need to first catch this fault and invoke the fault flow |
|
Java | lgpl-2.1 | 2424dbfffd15733f39c1e8c4d6ef8455966810e9 | 0 | Moderbord/Droidforce-UserInterface,Moderbord/Droidforce-UserInterface,secure-software-engineering/DroidForce,Moderbord/DroidForce | package de.ecspride.util;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
import java.nio.file.Files;
import java.nio.file.StandardCopyOption;
import java.util.Collections;
import java.util.List;
import org.xmlpull.v1.XmlPullParserException;
import soot.Body;
import soot.Scene;
import soot.SootClass;
import soot.SootMethod;
import soot.Unit;
import soot.jimple.AssignStmt;
import soot.jimple.StringConstant;
import soot.jimple.infoflow.android.axml.AXmlAttribute;
import soot.jimple.infoflow.android.axml.AXmlHandler;
import soot.jimple.infoflow.android.axml.AXmlNode;
import soot.jimple.infoflow.android.axml.ApkHandler;
import soot.jimple.infoflow.android.manifest.ProcessManifest;
import de.ecspride.Settings;
/**
* This class contains methods to update the AndroidManifest.xml,
* the code and resource files of the instrumented application to
* add an Activity that will be the first Activity instantiated when
* a user clicks on the icon to launch the application.
*
* @author alex
*
*/
public class UpdateManifestAndCodeForWaitPDP {
/**
*
* @param apkFileLocation
* @return
*/
public static String redirectMainActivity(String apkFileLocation){
String mainActivityName = null;
try {
ProcessManifest pm = new ProcessManifest(apkFileLocation);
AXmlHandler axmlh = pm.getAXml();
// Find main activity and remove main intent-filter
List<AXmlNode> anodes = axmlh.getNodesWithTag("activity");
for (AXmlNode an: anodes) {
boolean hasMain = false;
boolean hasLauncher = false;
AXmlNode filter = null;
AXmlAttribute aname = an.getAttribute("name");
String aval = (String)aname.getValue();
System.out.println("activity: "+ aval);
for (AXmlNode ch : an.getChildren()) {
System.out.println("children: "+ ch);
}
List<AXmlNode> fnodes = an.getChildrenWithTag("intent-filter");
for (AXmlNode fn: fnodes) {
hasMain = false;
hasLauncher = false;
// check action
List<AXmlNode> acnodes = fn.getChildrenWithTag("action");
for (AXmlNode acn: acnodes) {
AXmlAttribute acname = acn.getAttribute("name");
String acval = (String)acname.getValue();
System.out.println("action: "+ acval);
if (acval.equals("android.intent.action.MAIN")) {
hasMain = true;
}
}
// check category
List<AXmlNode> catnodes = fn.getChildrenWithTag("category");
for (AXmlNode catn: catnodes) {
AXmlAttribute catname = catn.getAttribute("name");
String catval = (String)catname.getValue();
System.out.println("category: "+ catval);
if (catval.equals("android.intent.category.LAUNCHER")) {
hasLauncher = true;
filter = fn;
}
}
if (hasLauncher && hasMain) {
break;
}
}
if (hasLauncher && hasMain) {
// replace name with the activity waiting for the connection to the PDP
System.out.println("main activity is: "+ aval);
System.out.println("excluding filter: "+ filter);
filter.exclude();
mainActivityName = aval;
break;
}
}
// add new 'main' intent-filter for our activity that waits for a pdp connection
axmlh.getDocument().getRootNode();
List<AXmlNode> appnodes = axmlh.getNodesWithTag("application");
if (appnodes.size() != 1) {
throw new RuntimeException("error: number of application node != 1 (= "+ appnodes.size() +")");
}
AXmlNode appnode = appnodes.get(0);
String attr_ns = "http://schemas.android.com/apk/res/android";
String tag_ns = null;
System.out.println("attr_ns: "+ attr_ns +" tag_ns: "+ tag_ns);
AXmlNode mainActivity = new AXmlNode("activity", tag_ns, null);
mainActivity.addAttribute(new AXmlAttribute<String>("name", "de.ecspride.javaclasses.WaitPDPActivity", attr_ns));
appnode.addChild(mainActivity);
AXmlNode filter = new AXmlNode("intent-filter", tag_ns, null);
mainActivity.addChild(filter);
AXmlNode action = new AXmlNode("action", tag_ns, null);
action.addAttribute(new AXmlAttribute<String>("name", "android.intent.action.MAIN", attr_ns));
filter.addChild(action);
AXmlNode category = new AXmlNode("category", tag_ns, null);
category.addAttribute(new AXmlAttribute<String>("name", "android.intent.category.LAUNCHER", attr_ns));
filter.addChild(category);
byte[] newManifestBytes = axmlh.toByteArray();
FileOutputStream fileOuputStream = new FileOutputStream(Settings.sootOutput + File.separatorChar + "AndroidManifest.xml");
fileOuputStream.write(newManifestBytes);
fileOuputStream.close();
}
catch (IOException | XmlPullParserException ex) {
System.err.println("Could not read Android manifest file: " + ex.getMessage());
throw new RuntimeException(ex);
}
return mainActivityName;
}
/**
*
* @param originalApk
*/
public static void replaceManifest(String originalApk) {
File originalApkFile = new File(originalApk);
String newManifest = Settings.sootOutput + File.separatorChar + "AndroidManifest.xml";
String targetApk = Settings.sootOutput + File.separatorChar + originalApkFile.getName();
File newMFile = new File(newManifest);
try {
ApkHandler apkH = new ApkHandler(targetApk);
apkH.addFilesToApk(Collections.singletonList(newMFile));
} catch (IOException e) {
e.printStackTrace();
throw new RuntimeException("error when writing new manifest: "+ e);
}
newMFile.delete();
}
/**
*
* @param mainActivityClass
*/
public static void updateWaitPDPActivity(String mainActivityClass) {
SootClass sc = Scene.v().getSootClass("de.ecspride.javaclasses.WaitPDPActivity");
SootMethod sm = sc.getMethodByName("<init>");
Body b = sm.retrieveActiveBody();
for (Unit u: b.getUnits()) {
if (u instanceof AssignStmt) {
AssignStmt asg = (AssignStmt)u;
if (asg.getRightOp() instanceof StringConstant) {
StringConstant cst = (StringConstant)asg.getRightOp();
if (cst.value.equals("")) {
asg.setRightOp(StringConstant.v(mainActivityClass));
}
}
}
}
}
/**
*
* @param originalApk
*/
public static void addBackgroundFile(String originalApk) {
File tempFile = null;
try {
File background_picture = new File("resources", "protect.png");
if (!background_picture.exists()) {
// Load the file from the JAR
URL fileURL = UpdateManifestAndCodeForWaitPDP.class.getResource("/protect.png");
// Copy the file local
tempFile = File.createTempFile("droidForce", null);
InputStream is = fileURL.openStream();
try {
Files.copy(is, tempFile.toPath(), StandardCopyOption.REPLACE_EXISTING);
background_picture = tempFile;
}
finally {
is.close();
}
}
// By now, we must have a file
if (background_picture == null ||!background_picture.exists())
throw new RuntimeException("Background image file not found");
File originalApkFile = new File(originalApk);
String targetApk = Settings.sootOutput + File.separatorChar + originalApkFile.getName();
try {
ApkHandler apkH = new ApkHandler(targetApk);
apkH.addFilesToApk(Collections.singletonList(background_picture), Collections.singletonMap(background_picture.getPath(), "assets/protect.png"));
} catch (IOException e) {
e.printStackTrace();
throw new RuntimeException("error when adding background image: "+ e);
}
} catch (IOException ex) {
System.err.println("File handling failed: " + ex.getMessage());
ex.printStackTrace();
}
finally {
if (tempFile != null)
tempFile.delete();
}
}
}
| Instrumentation-PEP/src/de/ecspride/util/UpdateManifestAndCodeForWaitPDP.java | package de.ecspride.util;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.net.URL;
import java.util.Collections;
import java.util.List;
import org.xmlpull.v1.XmlPullParserException;
import soot.Body;
import soot.Scene;
import soot.SootClass;
import soot.SootMethod;
import soot.Unit;
import soot.jimple.AssignStmt;
import soot.jimple.StringConstant;
import soot.jimple.infoflow.android.axml.AXmlAttribute;
import soot.jimple.infoflow.android.axml.AXmlHandler;
import soot.jimple.infoflow.android.axml.AXmlNode;
import soot.jimple.infoflow.android.axml.ApkHandler;
import soot.jimple.infoflow.android.manifest.ProcessManifest;
import de.ecspride.Settings;
/**
* This class contains methods to update the AndroidManifest.xml,
* the code and resource files of the instrumented application to
* add an Activity that will be the first Activity instantiated when
* a user clicks on the icon to launch the application.
*
* @author alex
*
*/
public class UpdateManifestAndCodeForWaitPDP {
/**
*
* @param apkFileLocation
* @return
*/
public static String redirectMainActivity(String apkFileLocation){
String mainActivityName = null;
try {
ProcessManifest pm = new ProcessManifest(apkFileLocation);
AXmlHandler axmlh = pm.getAXml();
// Find main activity and remove main intent-filter
List<AXmlNode> anodes = axmlh.getNodesWithTag("activity");
for (AXmlNode an: anodes) {
boolean hasMain = false;
boolean hasLauncher = false;
AXmlNode filter = null;
AXmlAttribute aname = an.getAttribute("name");
String aval = (String)aname.getValue();
System.out.println("activity: "+ aval);
for (AXmlNode ch : an.getChildren()) {
System.out.println("children: "+ ch);
}
List<AXmlNode> fnodes = an.getChildrenWithTag("intent-filter");
for (AXmlNode fn: fnodes) {
hasMain = false;
hasLauncher = false;
// check action
List<AXmlNode> acnodes = fn.getChildrenWithTag("action");
for (AXmlNode acn: acnodes) {
AXmlAttribute acname = acn.getAttribute("name");
String acval = (String)acname.getValue();
System.out.println("action: "+ acval);
if (acval.equals("android.intent.action.MAIN")) {
hasMain = true;
}
}
// check category
List<AXmlNode> catnodes = fn.getChildrenWithTag("category");
for (AXmlNode catn: catnodes) {
AXmlAttribute catname = catn.getAttribute("name");
String catval = (String)catname.getValue();
System.out.println("category: "+ catval);
if (catval.equals("android.intent.category.LAUNCHER")) {
hasLauncher = true;
filter = fn;
}
}
if (hasLauncher && hasMain) {
break;
}
}
if (hasLauncher && hasMain) {
// replace name with the activity waiting for the connection to the PDP
System.out.println("main activity is: "+ aval);
System.out.println("excluding filter: "+ filter);
filter.exclude();
mainActivityName = aval;
break;
}
}
// add new 'main' intent-filter for our activity that waits for a pdp connection
axmlh.getDocument().getRootNode();
List<AXmlNode> appnodes = axmlh.getNodesWithTag("application");
if (appnodes.size() != 1) {
throw new RuntimeException("error: number of application node != 1 (= "+ appnodes.size() +")");
}
AXmlNode appnode = appnodes.get(0);
String attr_ns = "http://schemas.android.com/apk/res/android";
String tag_ns = null;
System.out.println("attr_ns: "+ attr_ns +" tag_ns: "+ tag_ns);
AXmlNode mainActivity = new AXmlNode("activity", tag_ns, null);
mainActivity.addAttribute(new AXmlAttribute<String>("name", "de.ecspride.javaclasses.WaitPDPActivity", attr_ns));
appnode.addChild(mainActivity);
AXmlNode filter = new AXmlNode("intent-filter", tag_ns, null);
mainActivity.addChild(filter);
AXmlNode action = new AXmlNode("action", tag_ns, null);
action.addAttribute(new AXmlAttribute<String>("name", "android.intent.action.MAIN", attr_ns));
filter.addChild(action);
AXmlNode category = new AXmlNode("category", tag_ns, null);
category.addAttribute(new AXmlAttribute<String>("name", "android.intent.category.LAUNCHER", attr_ns));
filter.addChild(category);
byte[] newManifestBytes = axmlh.toByteArray();
FileOutputStream fileOuputStream = new FileOutputStream(Settings.sootOutput + File.separatorChar + "AndroidManifest.xml");
fileOuputStream.write(newManifestBytes);
fileOuputStream.close();
}
catch (IOException | XmlPullParserException ex) {
System.err.println("Could not read Android manifest file: " + ex.getMessage());
throw new RuntimeException(ex);
}
return mainActivityName;
}
/**
*
* @param originalApk
*/
public static void replaceManifest(String originalApk) {
File originalApkFile = new File(originalApk);
String newManifest = Settings.sootOutput + File.separatorChar + "AndroidManifest.xml";
String targetApk = Settings.sootOutput + File.separatorChar + originalApkFile.getName();
File newMFile = new File(newManifest);
try {
ApkHandler apkH = new ApkHandler(targetApk);
apkH.addFilesToApk(Collections.singletonList(newMFile));
} catch (IOException e) {
e.printStackTrace();
throw new RuntimeException("error when writing new manifest: "+ e);
}
newMFile.delete();
}
/**
*
* @param mainActivityClass
*/
public static void updateWaitPDPActivity(String mainActivityClass) {
SootClass sc = Scene.v().getSootClass("de.ecspride.javaclasses.WaitPDPActivity");
SootMethod sm = sc.getMethodByName("<init>");
Body b = sm.retrieveActiveBody();
for (Unit u: b.getUnits()) {
if (u instanceof AssignStmt) {
AssignStmt asg = (AssignStmt)u;
if (asg.getRightOp() instanceof StringConstant) {
StringConstant cst = (StringConstant)asg.getRightOp();
if (cst.value.equals("")) {
asg.setRightOp(StringConstant.v(mainActivityClass));
}
}
}
}
}
/**
*
* @param originalApk
*/
public static void addBackgroundFile(String originalApk) {
ClassLoader classLoader = UpdateManifestAndCodeForWaitPDP.class.getClassLoader();
URL fileURL = classLoader.getResource("/protect.png");
File background_picture = null;
if (fileURL != null)
background_picture = new File(fileURL.getPath());
if (background_picture == null || !background_picture.exists())
background_picture = new File("resources", "protect.png");
if (background_picture == null ||!background_picture.exists())
throw new RuntimeException("Background image file not found");
File originalApkFile = new File(originalApk);
String targetApk = Settings.sootOutput + File.separatorChar + originalApkFile.getName();
try {
ApkHandler apkH = new ApkHandler(targetApk);
apkH.addFilesToApk(Collections.singletonList(background_picture), Collections.singletonMap(background_picture.getPath(), "assets/protect.png"));
} catch (IOException e) {
e.printStackTrace();
throw new RuntimeException("error when adding background image: "+ e);
}
}
}
| made adding the image file a bit more stable
| Instrumentation-PEP/src/de/ecspride/util/UpdateManifestAndCodeForWaitPDP.java | made adding the image file a bit more stable | <ide><path>nstrumentation-PEP/src/de/ecspride/util/UpdateManifestAndCodeForWaitPDP.java
<ide> import java.io.File;
<ide> import java.io.FileOutputStream;
<ide> import java.io.IOException;
<add>import java.io.InputStream;
<ide> import java.net.URL;
<add>import java.nio.file.Files;
<add>import java.nio.file.StandardCopyOption;
<ide> import java.util.Collections;
<ide> import java.util.List;
<ide>
<ide> * @param originalApk
<ide> */
<ide> public static void addBackgroundFile(String originalApk) {
<del> ClassLoader classLoader = UpdateManifestAndCodeForWaitPDP.class.getClassLoader();
<del> URL fileURL = classLoader.getResource("/protect.png");
<del> File background_picture = null;
<del> if (fileURL != null)
<del> background_picture = new File(fileURL.getPath());
<del> if (background_picture == null || !background_picture.exists())
<del> background_picture = new File("resources", "protect.png");
<del> if (background_picture == null ||!background_picture.exists())
<del> throw new RuntimeException("Background image file not found");
<del>
<del> File originalApkFile = new File(originalApk);
<del> String targetApk = Settings.sootOutput + File.separatorChar + originalApkFile.getName();
<add> File tempFile = null;
<ide> try {
<del> ApkHandler apkH = new ApkHandler(targetApk);
<del> apkH.addFilesToApk(Collections.singletonList(background_picture), Collections.singletonMap(background_picture.getPath(), "assets/protect.png"));
<del> } catch (IOException e) {
<del> e.printStackTrace();
<del> throw new RuntimeException("error when adding background image: "+ e);
<del> }
<del>
<add> File background_picture = new File("resources", "protect.png");
<add> if (!background_picture.exists()) {
<add> // Load the file from the JAR
<add> URL fileURL = UpdateManifestAndCodeForWaitPDP.class.getResource("/protect.png");
<add>
<add> // Copy the file local
<add> tempFile = File.createTempFile("droidForce", null);
<add> InputStream is = fileURL.openStream();
<add> try {
<add> Files.copy(is, tempFile.toPath(), StandardCopyOption.REPLACE_EXISTING);
<add> background_picture = tempFile;
<add> }
<add> finally {
<add> is.close();
<add> }
<add> }
<add>
<add> // By now, we must have a file
<add> if (background_picture == null ||!background_picture.exists())
<add> throw new RuntimeException("Background image file not found");
<add>
<add> File originalApkFile = new File(originalApk);
<add> String targetApk = Settings.sootOutput + File.separatorChar + originalApkFile.getName();
<add> try {
<add> ApkHandler apkH = new ApkHandler(targetApk);
<add> apkH.addFilesToApk(Collections.singletonList(background_picture), Collections.singletonMap(background_picture.getPath(), "assets/protect.png"));
<add> } catch (IOException e) {
<add> e.printStackTrace();
<add> throw new RuntimeException("error when adding background image: "+ e);
<add> }
<add> } catch (IOException ex) {
<add> System.err.println("File handling failed: " + ex.getMessage());
<add> ex.printStackTrace();
<add> }
<add> finally {
<add> if (tempFile != null)
<add> tempFile.delete();
<add> }
<ide> }
<ide>
<ide> |
|
JavaScript | mit | 0d9fb5b90da6cfaffc5338c36b47e1b9dc700ff0 | 0 | dosten-xx/watermap,dosten-xx/watermap,dosten-xx/watermap | //****************************
// Global variables
// ****************************
var map;
var mapLayers;
var mapCenters;
//****************************
// Custom controls
// ****************************
window.app = {};
var app = window.app;
app.generateTrailControl = function(opt_options) {
//alert("creating new control...");
var options = opt_options || {};
var select = document.createElement('select');
select.id = 'trailSelect';
select.className = 'trailSelect';
select.innerHTML = '<option value="0">All</option><option value="1">San Gorgonio</option><option value="2">PCT</option><option value="3">San Mateo Canyon</option>';
var this_ = this;
var getTrail = function(e) {
// prevent #export-geojson anchor from getting appended to the url
e.preventDefault();
//alert("in getTrail e=" + e);
var selectedTrail = document.getElementById('trailSelect');
//alert("selected trail=" + selectedTrail.value);
var currentLayerCount = map.getLayers().getLength();
//alert("map has " + currentLayerCount + " layers");
// 0th layer is the map layer
// clear all trail layers
for (var i = 1; i < mapLayers.length; i++) {
map.removeLayer(mapLayers[i]);
//alert("removing layer " + i);
}
//alert("map has " + map.getLayers().getLength() + " layers");
if (selectedTrail.value == 0) {
// show all trails
for (var i = 1; i < mapLayers.length; i++) {
map.addLayer(mapLayers[i]);
}
}
else {
// show just one trail
// hide the value'th layer (i.e. 1=SanG, 2=PCT) in the map
// zoom to that trail
//alert("adding layer " + selectedTrail.value);
map.addLayer(mapLayers[selectedTrail.value]);
}
//alert("map has " + map.getLayers().getLength() + " layers on exit");
view.setCenter(mapCenters[selectedTrail.value]);
map.render();
};
select.addEventListener('change', getTrail, false);
var anchor = document.createElement('a');
anchor.id = 'trailSelect';
anchor.className = 'trailSelect';
anchor.href = 'about.html';
anchor.innerHTML = 'About';
var element = document.createElement('div');
element.className = 'export-geojson ol-unselectable';
element.appendChild(select);
element.appendChild(anchor);
ol.control.Control.call(this, {
element : element,
target : options.target
});
};
ol.inherits(app.generateTrailControl, ol.control.Control);
//****************************
// Vector layer styles
//****************************
var alpha = 0.4;
var colorBlue = [0, 0, 255, alpha];
var colorYellow = [255, 255, 0, alpha];
var colorRed = [255, 0, 0, alpha];
var colorWhite = [255, 255, 255, alpha];
var colorGray = [60, 60, 60, alpha];
var styleCache = {};
styleCache['DRY'] = new ol.style.Style({
//text: feature.get('name'), // TODO DEO add name to text style
image : new ol.style.Circle({
radius : 5,
stroke : new ol.style.Stroke({
color : colorRed,
width : 1.25
}),
fill : new ol.style.Fill({
color : colorRed
})
}),
fill : new ol.style.Fill({
color : colorRed
}),
stroke : new ol.style.Stroke({
color : colorRed,
width : 1.25
})
});
styleCache['LOW'] = new ol.style.Style({
image : new ol.style.Circle({
radius : 5,
stroke : new ol.style.Stroke({
color : colorRed,
width : 1.25
}),
fill : new ol.style.Fill({
color : colorRed
})
}),
fill : new ol.style.Fill({
color : colorRed
}),
stroke : new ol.style.Stroke({
color : colorRed,
width : 1.25
})
});
styleCache['MEDIUM'] = new ol.style.Style({
image : new ol.style.Circle({
radius : 5,
stroke : new ol.style.Stroke({
color : colorYellow,
width : 1.25
}),
fill : new ol.style.Fill({
color : colorYellow
})
}),
fill : new ol.style.Fill({
color : colorYellow
}),
stroke : new ol.style.Stroke({
color : colorYellow,
width : 1.25
})
});
styleCache['HIGH'] = new ol.style.Style({
image : new ol.style.Circle({
radius : 5,
stroke : new ol.style.Stroke({
color : colorBlue,
width : 1.25
}),
fill : new ol.style.Fill({
color : colorBlue
})
}),
fill : new ol.style.Fill({
color : colorBlue
}),
stroke : new ol.style.Stroke({
color : colorBlue,
width : 1.25
})
});
styleCache['UNKNOWN'] = new ol.style.Style({
image : new ol.style.Circle({
radius : 5,
stroke : new ol.style.Stroke({
color : colorGray,
width : 1.25
}),
fill : new ol.style.Fill({
color : colorGray
})
}),
fill : new ol.style.Fill({
color : colorGray
}),
stroke : new ol.style.Stroke({
color : colorGray,
width : 1.25
})
});
function wrStyle(feature, resolution) {
var state = feature.get('state');
return [styleCache[state]];
};
//****************************
// water report vector layers
//****************************
var sangSource = new ol.source.GeoJSON({
projection: 'EPSG:3857',
url : 'http://' + hostName + ':' + hostPort + '/rest/sang'
});
var sangLayer = new ol.layer.Vector({
source: sangSource,
style: wrStyle
});
var pctSource = new ol.source.GeoJSON({
projection: 'EPSG:3857',
url : 'http://' + hostName + ':' + hostPort + '/rest/pct'
});
var pctLayer = new ol.layer.Vector({
source: pctSource,
style: wrStyle
});
var sanmateoSource = new ol.source.GeoJSON({
projection: 'EPSG:3857',
url : 'http://' + hostName + ':' + hostPort + '/rest/sanmateowild'
});
var sanmateoLayer = new ol.layer.Vector({
source: sanmateoSource,
style: wrStyle
});
//****************************
// OSM layer
//****************************
var osmLayer = new ol.layer.Tile({
source : new ol.source.OSM()
});
// EPSG:4326 == WGS 84
var sangCenter = ol.proj.transform([ -116.853084, 34.121955 ], 'EPSG:4326', 'EPSG:3857');
var pctCenter = ol.proj.transform([ -116.853084, 34.121955 ], 'EPSG:4326', 'EPSG:3857');
var sanmateoCenter = ol.proj.transform([ -117.4279, 33.5681 ], 'EPSG:4326', 'EPSG:3857');
var view = new ol.View({
center : sangCenter,
zoom : 10
});
mapLayers = [ osmLayer, sangLayer, pctLayer, sanmateoLayer ];
mapCenters = [ null, sangCenter, pctCenter, sanmateoCenter ];
map = new ol.Map({
target : 'map',
layers : [ osmLayer, sangLayer, pctLayer, sanmateoLayer ],
controls: ol.control.defaults().extend([
new app.generateTrailControl({
source: null
}),
new ol.control.MousePosition({
coordinateFormat: ol.coordinate.createStringXY(3),
projection: 'EPSG:4326'
})
]),
view : view
});
// ****************************
// popup handling
// ****************************
var element = document.getElementById('popup');
var popup = new ol.Overlay({
element : element,
positioning : 'bottom-center',
stopEvent : false
});
map.addOverlay(popup);
// display popup on click
map.on('click', function(evt) {
var feature = map.forEachFeatureAtPixel(evt.pixel, function(feature, layer) {
return feature;
});
if (feature) {
var geometry = feature.getGeometry();
var coord = geometry.getCoordinates();
popup.setPosition(coord);
// DEO need to destroy here to ensure the content is refreshed when
// clicked directly from one feature to another
$(element).popover('destroy');
$(element).popover({
'placement' : 'right',
'html' : true,
'title' : feature.get('name'),
'content' : feature.get('state') + '<br />' + feature.get('location') + '<br />' + feature.get('description') + '<br />Last Report:' + formatDate(feature.get('lastReport')) + '<br />Source: ' + '<a target=\'_new\' href=\'' + feature.get('url') + '\'>' + feature.get('source') + '</a>'
});
$(element).popover('show');
} else {
$(element).popover('destroy');
}
});
// change mouse cursor when over marker
map.on('pointermove', function(e) {
if (e.dragging) {
$(element).popover('destroy');
return;
}
var pixel = map.getEventPixel(e.originalEvent);
var hit = map.hasFeatureAtPixel(pixel);
var mapTarget = document.getElementById(map.getTarget());
mapTarget.style.cursor = hit ? 'pointer' : '';
});
function formatDate(date)
{
if (date) {
return new Date(date).toLocaleDateString();
}
return 'n/a';
}
| src/main/webapp/resources/js/main.js | //****************************
// Global variables
// ****************************
var map;
var mapLayers;
var mapCenters;
//****************************
// Custom controls
// ****************************
window.app = {};
var app = window.app;
app.generateTrailControl = function(opt_options) {
//alert("creating new control...");
var options = opt_options || {};
var select = document.createElement('select');
select.id = 'trailSelect';
select.className = 'trailSelect';
select.innerHTML = '<option value="0">All</option><option value="1">San Gorgonio</option><option value="2">PCT</option><option value="3">San Mateo Canyon</option>';
var this_ = this;
var getTrail = function(e) {
// prevent #export-geojson anchor from getting appended to the url
e.preventDefault();
//alert("in getTrail e=" + e);
var selectedTrail = document.getElementById('trailSelect');
//alert("selected trail=" + selectedTrail.value);
var currentLayerCount = map.getLayers().getLength();
//alert("map has " + currentLayerCount + " layers");
// 0th layer is the map layer
// clear all trail layers
for (var i = 1; i < mapLayers.length; i++) {
map.removeLayer(mapLayers[i]);
//alert("removing layer " + i);
}
//alert("map has " + map.getLayers().getLength() + " layers");
if (selectedTrail.value == 0) {
// show all trails
for (var i = 1; i < mapLayers.length; i++) {
map.addLayer(mapLayers[i]);
}
}
else {
// show just one trail
// hide the value'th layer (i.e. 1=SanG, 2=PCT) in the map
// zoom to that trail
//alert("adding layer " + selectedTrail.value);
map.addLayer(mapLayers[selectedTrail.value]);
}
//alert("map has " + map.getLayers().getLength() + " layers on exit");
view.setCenter(mapCenters[selectedTrail.value]);
map.render();
};
select.addEventListener('change', getTrail, false);
var anchor = document.createElement('a');
anchor.id = 'trailSelect';
anchor.className = 'trailSelect';
anchor.href = 'about.html';
anchor.innerHTML = 'About';
var element = document.createElement('div');
element.className = 'export-geojson ol-unselectable';
element.appendChild(select);
element.appendChild(anchor);
ol.control.Control.call(this, {
element : element,
target : options.target
});
};
ol.inherits(app.generateTrailControl, ol.control.Control);
//****************************
// Vector layer styles
//****************************
var alpha = 0.4;
var colorBlue = [0, 0, 255, alpha];
var colorYellow = [255, 255, 0, alpha];
var colorRed = [255, 0, 0, alpha];
var colorWhite = [255, 255, 255, alpha];
var colorGray = [165, 165, 165, alpha];
var styleCache = {};
styleCache['DRY'] = new ol.style.Style({
//text: feature.get('name'), // TODO DEO add name to text style
image : new ol.style.Circle({
radius : 5,
stroke : new ol.style.Stroke({
color : colorRed,
width : 1.25
}),
fill : new ol.style.Fill({
color : colorRed
})
}),
fill : new ol.style.Fill({
color : colorRed
}),
stroke : new ol.style.Stroke({
color : colorRed,
width : 1.25
})
});
styleCache['LOW'] = new ol.style.Style({
image : new ol.style.Circle({
radius : 5,
stroke : new ol.style.Stroke({
color : colorRed,
width : 1.25
}),
fill : new ol.style.Fill({
color : colorRed
})
}),
fill : new ol.style.Fill({
color : colorRed
}),
stroke : new ol.style.Stroke({
color : colorRed,
width : 1.25
})
});
styleCache['MEDIUM'] = new ol.style.Style({
image : new ol.style.Circle({
radius : 5,
stroke : new ol.style.Stroke({
color : colorYellow,
width : 1.25
}),
fill : new ol.style.Fill({
color : colorYellow
})
}),
fill : new ol.style.Fill({
color : colorYellow
}),
stroke : new ol.style.Stroke({
color : colorYellow,
width : 1.25
})
});
styleCache['HIGH'] = new ol.style.Style({
image : new ol.style.Circle({
radius : 5,
stroke : new ol.style.Stroke({
color : colorBlue,
width : 1.25
}),
fill : new ol.style.Fill({
color : colorBlue
})
}),
fill : new ol.style.Fill({
color : colorBlue
}),
stroke : new ol.style.Stroke({
color : colorBlue,
width : 1.25
})
});
styleCache['UNKNOWN'] = new ol.style.Style({
image : new ol.style.Circle({
radius : 5,
stroke : new ol.style.Stroke({
color : colorGray,
width : 1.25
}),
fill : new ol.style.Fill({
color : colorGray
})
}),
fill : new ol.style.Fill({
color : colorGray
}),
stroke : new ol.style.Stroke({
color : colorGray,
width : 1.25
})
});
function wrStyle(feature, resolution) {
var state = feature.get('state');
return [styleCache[state]];
};
//****************************
// water report vector layers
//****************************
var sangSource = new ol.source.GeoJSON({
projection: 'EPSG:3857',
url : 'http://' + hostName + ':' + hostPort + '/rest/sang'
});
var sangLayer = new ol.layer.Vector({
source: sangSource,
style: wrStyle
});
var pctSource = new ol.source.GeoJSON({
projection: 'EPSG:3857',
url : 'http://' + hostName + ':' + hostPort + '/rest/pct'
});
var pctLayer = new ol.layer.Vector({
source: pctSource,
style: wrStyle
});
var sanmateoSource = new ol.source.GeoJSON({
projection: 'EPSG:3857',
url : 'http://' + hostName + ':' + hostPort + '/rest/sanmateowild'
});
var sanmateoLayer = new ol.layer.Vector({
source: sanmateoSource,
style: wrStyle
});
//****************************
// OSM layer
//****************************
var osmLayer = new ol.layer.Tile({
source : new ol.source.OSM()
});
// EPSG:4326 == WGS 84
var sangCenter = ol.proj.transform([ -116.853084, 34.121955 ], 'EPSG:4326', 'EPSG:3857');
var pctCenter = ol.proj.transform([ -116.853084, 34.121955 ], 'EPSG:4326', 'EPSG:3857');
var sanmateoCenter = ol.proj.transform([ -117.4279, 33.5681 ], 'EPSG:4326', 'EPSG:3857');
var view = new ol.View({
center : sangCenter,
zoom : 10
});
mapLayers = [ osmLayer, sangLayer, pctLayer, sanmateoLayer ];
mapCenters = [ null, sangCenter, pctCenter, sanmateoCenter ];
map = new ol.Map({
target : 'map',
layers : [ osmLayer, sangLayer, pctLayer, sanmateoLayer ],
controls: ol.control.defaults().extend([
new app.generateTrailControl({
source: null
}),
new ol.control.MousePosition({
coordinateFormat: ol.coordinate.createStringXY(3),
projection: 'EPSG:4326'
})
]),
view : view
});
// ****************************
// popup handling
// ****************************
var element = document.getElementById('popup');
var popup = new ol.Overlay({
element : element,
positioning : 'bottom-center',
stopEvent : false
});
map.addOverlay(popup);
// display popup on click
map.on('click', function(evt) {
var feature = map.forEachFeatureAtPixel(evt.pixel, function(feature, layer) {
return feature;
});
if (feature) {
var geometry = feature.getGeometry();
var coord = geometry.getCoordinates();
popup.setPosition(coord);
// DEO need to destroy here to ensure the content is refreshed when
// clicked directly from one feature to another
$(element).popover('destroy');
$(element).popover({
'placement' : 'right',
'html' : true,
'title' : feature.get('name'),
'content' : feature.get('state') + '<br />' + feature.get('location') + '<br />' + feature.get('description') + '<br />Last Report:' + formatDate(feature.get('lastReport')) + '<br />Source: ' + '<a target=\'_new\' href=\'' + feature.get('url') + '\'>' + feature.get('source') + '</a>'
});
$(element).popover('show');
} else {
$(element).popover('destroy');
}
});
// change mouse cursor when over marker
map.on('pointermove', function(e) {
if (e.dragging) {
$(element).popover('destroy');
return;
}
var pixel = map.getEventPixel(e.originalEvent);
var hit = map.hasFeatureAtPixel(pixel);
var mapTarget = document.getElementById(map.getTarget());
mapTarget.style.cursor = hit ? 'pointer' : '';
});
function formatDate(date)
{
if (date) {
return new Date(date).toLocaleDateString();
}
return 'n/a';
}
| modified gray color
| src/main/webapp/resources/js/main.js | modified gray color | <ide><path>rc/main/webapp/resources/js/main.js
<ide> var colorYellow = [255, 255, 0, alpha];
<ide> var colorRed = [255, 0, 0, alpha];
<ide> var colorWhite = [255, 255, 255, alpha];
<del>var colorGray = [165, 165, 165, alpha];
<add>var colorGray = [60, 60, 60, alpha];
<ide>
<ide> var styleCache = {};
<ide> |
|
Java | apache-2.0 | a592bcc60eed5e44bb736e02de8dc942ea2e8f36 | 0 | Prosjekt2-09arduino/ArduinoStore,Prosjekt2-09arduino/ArduinoStore,Prosjekt2-09arduino/ArduinoStore | package no.group09.utils;
/*
* Licensed to UbiCollab.org under one or more contributor
* license agreements. See the NOTICE file distributed
* with this work for additional information regarding
* copyright ownership. UbiCollab.org 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.
*/
import no.group09.ucsoftwarestore.R;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Timer;
import java.util.TimerTask;
import java.util.concurrent.TimeoutException;
import no.group09.connection.BluetoothConnection;
import no.group09.connection.BluetoothConnection.ConnectionState;
import no.group09.connection.ConnectionMetadata;
import no.group09.connection.ConnectionMetadata.DefaultServices;
import no.group09.fragments.BluetoothDeviceAdapter;
import android.annotation.SuppressLint;
import android.app.Activity;
import android.app.ActivityManager;
import android.app.ActivityManager.RunningServiceInfo;
import android.app.AlertDialog;
import android.app.Dialog;
import android.app.ProgressDialog;
import android.app.SearchManager;
import android.bluetooth.BluetoothAdapter;
import android.bluetooth.BluetoothDevice;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.SharedPreferences;
import android.content.SharedPreferences.Editor;
import android.os.AsyncTask;
import android.os.Bundle;
import android.os.Vibrator;
import android.preference.PreferenceManager;
import android.util.Log;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemLongClickListener;
import android.widget.Button;
import android.widget.ListView;
import android.widget.ProgressBar;
import android.widget.SearchView;
import android.widget.Toast;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.TextView;
import android.view.View.OnClickListener;
/**
* This class searches for the BT devices in range and put them in a list
*/
public class Devices extends Activity {
/**Should be true if only arduinos is to be showed. False otherwise */
private boolean ONLY_SHOW_ARDUINOS = false;
private SharedPreferences sharedPref;
private ProgressDialog progressDialog;
private static final String TAG = "DEVICES";
private static final int REQUEST_ENABLE_BT = 1;
private ListView deviceList;
private BluetoothDeviceAdapter listAdapter;
private BluetoothAdapter btAdapter;
private ArrayList<HashMap<String, String>> category_list;
private IntentFilter filter;
private Button refresh;
private Button addDeviceButton, browseShowButton;
private ProgressBar progressBar;
private ArrayList<HashMap<String, String>> device_list;
private boolean alreadyChecked = false;
private ArrayList<BluetoothDevice> btDeviceList = new ArrayList<BluetoothDevice>();
private MyBroadcastReceiver actionFoundReceiver;
public static final String MAC_ADDRESS = "MAC_ADDRESS";
private View linearLayout;
private TextView workingText;
static Context context;
private boolean secondClick = false;
private int savedPosition;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
//Set the xml layout
setContentView(R.layout.devices);
//Fetching the shared preferences object used to write the preference file
sharedPref = PreferenceManager.getDefaultSharedPreferences(getApplicationContext());
//Progressdialog used to indicate that the program is connecting to a BT device
progressDialog = new ProgressDialog(this);
//progressBar = (ProgressBar) findViewById(R.id.progressBar1);
progressBar = (ProgressBar) findViewById(R.id.progbar);
registerBroadcastReceiver();
// Getting the Bluetooth adapter
btAdapter = BluetoothAdapter.getDefaultAdapter();
category_list = new ArrayList<HashMap<String, String>>();
// Getting adapter by passing xml data ArrayList
listAdapter = new BluetoothDeviceAdapter(getBaseContext(), category_list);
//List of devices
device_list = new ArrayList<HashMap<String, String>>();
//Get the xml to how the list is structured
deviceList = (ListView) findViewById(R.id.bluetooth_devices_list);
//Get the adapter for the device list
listAdapter = new BluetoothDeviceAdapter(getBaseContext(), device_list);
//Set the adapter
deviceList.setAdapter(listAdapter);
//Initialize the device list
initializeDeviceList();
//Add refresh button to UI
refresh = (Button) findViewById(R.id.refresh);
refresh.setVisibility(View.GONE);
//Layout on top, used by textView
// linearLayout = findViewById(R.id.device_top_horizontal_linearlayout);
// workingText = new TextView(this);
// workingText.setText("Working...");
// workingText.setLayoutParams(new LayoutParams(LayoutParams.WRAP_CONTENT,LayoutParams.WRAP_CONTENT));
// workingText.setTextColor(getResources().getColor(R.color.white));
//Check the BT state
checkBTState();
//Add the button that opens the 'Add device' screen
addDeviceButton = (Button) findViewById(R.id.add_device_button);
//Add the button that takes you directly to the shop.
browseShowButton = (Button) findViewById(R.id.browse_shop_button);
addButtonFunctionality();
}
/**
* Method that initializes the device list and creates a service if an
* item is clicked.
*/
public void initializeDeviceList() {
//Click event for single list row
deviceList.setOnItemClickListener(new OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
//Cancel discovery when an item in the list is clicked
btAdapter.cancelDiscovery();
String macAddress = listAdapter.getMacAddress(position);
Intent serviceIntent = new Intent(getApplicationContext(), no.group09.utils.BtArduinoService.class);
serviceIntent.putExtra(MAC_ADDRESS, macAddress);
//FIXME: If the service allready is running, it does not start over.
//This might be a problem if it needs to change the connected device.
if(isMyServiceRunning()){
BtArduinoService.getBtService().getBluetoothConnection().setConnectionState(ConnectionState.STATE_DISCONNECTED);
BtArduinoService.getBtService().getBluetoothConnection().disconnect();
stopService(serviceIntent);
}
startService(serviceIntent);
ProgressDialogTask task = new ProgressDialogTask();
task.execute();
savedPosition = position;
}
});
deviceList.setOnItemLongClickListener(new OnItemLongClickListener() {
@Override
public boolean onItemLongClick(AdapterView<?> parent, View view, int position, long id){
//This gives a popup box with functionality to the arduino
// dialogBoxForTestingPurposes();
disconnectButton(position);
return false;
}
});
}
/** Checks wether a service is running or not */
private boolean isMyServiceRunning() {
ActivityManager manager = (ActivityManager) getSystemService(Context.ACTIVITY_SERVICE);
for (RunningServiceInfo service : manager.getRunningServices(Integer.MAX_VALUE)) {
if (BtArduinoService.class.getName().equals(service.service.getClassName())) {
return true;
}
}
return false;
}
/**
* Adds the functionality to all the buttons in Devices screen
*/
public void addButtonFunctionality() {
refresh.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
//Clear the list of BT devices
device_list.clear();
//Clear the list of BT device objects
btDeviceList.clear();
//Notify the adapter that the list is now empty
listAdapter.notifyDataSetChanged();
if(BtArduinoService.getBtService() != null){
if(BtArduinoService.getBtService().getBluetoothConnection() != null){
if(!BtArduinoService.getBtService().getBluetoothConnection().isConnected()){
setTitle("Devices");
}
else{
HashMap<String, String> map = new HashMap<String, String>();
map.put("name", sharedPref.getString("connected_device_name", "null"));
map.put("mac", sharedPref.getString("connected_device_mac", "null"));
map.put("pager", "708");
if(!device_list.contains(map)){
device_list.add(map);
deviceList.setItemChecked(0, true);
}
}
}
}
//Scan for new BT devices
checkBTState();
}
});
addDeviceButton.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
startActivity(new Intent(getBaseContext(), AddDeviceScreen.class));
}
});
browseShowButton.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
//Finishes this activity and goes back to the parent
finish();
//TODO: use finish() and delete this call when you want to browse shop instead for debug
// dialogBoxForTestingPurposes();
}
});
}
//Disse to er en del av en stygg hack, men det funker. Fix senere.
private void setContext(Context context) {
Devices.context = context;
}
public static Context getContext() {
return context;
}
/**
* Method used to register the broadcast receiver for communicating with
* bluetooth API
*/
private void registerBroadcastReceiver() {
//Register the BroadcastReceiver
filter = new IntentFilter(BluetoothDevice.ACTION_FOUND);
filter.addAction(BluetoothAdapter.ACTION_DISCOVERY_STARTED);
filter.addAction(BluetoothAdapter.ACTION_DISCOVERY_FINISHED);
filter.addAction(BluetoothDevice.ACTION_ACL_CONNECTED); //connected devices
actionFoundReceiver = new MyBroadcastReceiver();
//Registers the BT receiver with the requested filters
//Don't forget to unregister during onDestroy
registerReceiver(actionFoundReceiver, filter);
}
/** This routine is called when an activity completes.*/
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if (requestCode == REQUEST_ENABLE_BT) {
checkBTState();
}
}
@Override
public void onBackPressed() {
super.onBackPressed();
}
@Override
/**
* Called when this activity is destroyed. If a discovery is ongoing, it is
* cancelled. The broadcastreceiver is also unregistered.
*/
protected void onDestroy() {
super.onDestroy();
unregisterReceiver(actionFoundReceiver);
if (btAdapter != null) {
btAdapter.cancelDiscovery();
}
}
/**
* Called when Devices screen is resumed. Clears the list of visible
* bluetooth devices and starts a new search.
*/
@Override
public void onResume() {
super.onResume();
//Clear the list of BT devices
device_list.clear();
//Clear the list of BT device objects
btDeviceList.clear();
//Notify the adapter that the list is now empty
listAdapter.notifyDataSetChanged();
if(BtArduinoService.getBtService() != null){
if(BtArduinoService.getBtService().getBluetoothConnection() != null){
if(BtArduinoService.getBtService().getBluetoothConnection().isConnected()){
HashMap<String, String> map = new HashMap<String, String>();
map.put("name", sharedPref.getString("connected_device_name", "null"));
map.put("mac", sharedPref.getString("connected_device_mac", "null"));
map.put("pager", "708");
if(!device_list.contains(map)){
device_list.add(map);
deviceList.setItemChecked(0, true);
}
}
}
}
setActivityTitle();
}
/** Add the connected device name to the title if connected */
private void setActivityTitle(){
String appName = sharedPref.getString("connected_device_name", "null");
if(BtArduinoService.getBtService() != null && !appName.equals("null")){
if(BtArduinoService.getBtService().getBluetoothConnection() != null){
setTitle("Devices - " + appName);
}
else{
setTitle("Devices");
}
}
else{
setTitle("Devices");
}
}
/**
* Method used to check the state of the bluetooth connection. First checks
* if the Android device supports bluetooth connections. Starts a bluetooth
* discovery and sets the progress bar visible if bluetooth is enabled on the
* Android device. If bluetooth is disabled, it asks the user if he wants to
* enable it.
*/
@SuppressWarnings("deprecation")
private void checkBTState() {
//Check if the Android support bluetooth
if(btAdapter==null) return;
else {
//Check if the BT is turned on
if (btAdapter.isEnabled()) {
//Show the progress bar
progressBar.setVisibility(View.VISIBLE);
refresh.setVisibility(View.GONE);
// int SDK_INT = android.os.Build.VERSION.SDK_INT;
// if(SDK_INT < 11)
// showTextView(true);
// Starting the device discovery
btAdapter.startDiscovery();
}
//If the BT is not turned on, request the user to turn it on
else if (!btAdapter.isEnabled() && !alreadyChecked){
Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);
startActivityForResult(enableBtIntent, REQUEST_ENABLE_BT);
//The user have already turned it on or off: don't request again
alreadyChecked = true;
}
}
}
/**
* Method used to only show valid arduinos in the device list. Should be called
* each time a new device is to be added to the device list.
*
* The code used for a valid arduino device is 708. This is originally the
* code used a pager.
*
* @param device The device to be checked if it is valid
* @return true if the device is valid, false if not
*/
private boolean onlyShowArduinos(BluetoothDevice device){
if(ONLY_SHOW_ARDUINOS){
if((device.getBluetoothClass().toString()).equals("708")){
return true;
}
//Only return false if we only should show pagers, and that the device is not a pager
else return false;
}
return true;
}
/**
* checks if it should show textview in place of progressbar
* @param show
*/
// private void showTextView(boolean show){
//
//
//
// if(show){
// ((LinearLayout) linearLayout).addView(workingText);
// }
// else if(!show){
// ((LinearLayout) linearLayout).removeView(workingText);
// }
//
// }
/**
* Broadcast receiver class. Used to receive Android Bluetooth API communication
*/
private class MyBroadcastReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
String action = intent.getAction();
//If discovery started
if(BluetoothAdapter.ACTION_DISCOVERY_STARTED.equals(action)) {
Log.d(TAG, "\nDiscovery Started...");
}
//If a device is found
if (BluetoothDevice.ACTION_FOUND.equals(action)){
BluetoothDevice device = intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE);
//If the bluetooth class is named 708 that we made as a 'standard' for recognizing arduinos
if(onlyShowArduinos(device) || !btDeviceList.contains(device)){
//Adding found device
HashMap<String, String> map = new HashMap<String, String>();
map.put("name", device.getName());
map.put("mac", device.getAddress());
map.put("pager", device.getBluetoothClass().toString());
device_list.add(map);
//List of device objects
btDeviceList.add(device);
listAdapter.notifyDataSetChanged();
}
}
//If discovery finished
if(BluetoothAdapter.ACTION_DISCOVERY_FINISHED.equals(action)) {
//Hide the progress bar
progressBar.setVisibility(View.GONE);
//int SDK_INT = android.os.Build.VERSION.SDK_INT;
refresh.setVisibility(View.VISIBLE);
Log.d(TAG, "\nDiscovery Finished");
//if(SDK_INT < 11)
//showTextView(false);
}
}
}
public Dialog createDialog(String message) {
AlertDialog.Builder responseDialog = new AlertDialog.Builder(this);
responseDialog.setMessage(message)
.setPositiveButton("Ok", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
}
});
return responseDialog.show();
}
private class ProgressDialogTask extends AsyncTask<Void, Void, Boolean> {
private long timeout;
@Override
protected void onPreExecute() {
timeout = System.currentTimeMillis() + 8000;
progressDialog.setMessage("Connecting, please wait...");
progressDialog.setCancelable(true);
progressDialog.show();
}
@Override
protected Boolean doInBackground(Void... params) {
while(true) {
if(BtArduinoService.getBtService() != null){
if(BtArduinoService.getBtService().getBluetoothConnection() != null){
if(BtArduinoService.getBtService().getBluetoothConnection().isConnected()){
return true;
}
}
}
if (System.currentTimeMillis() > timeout) {
return false;
}
try {
Thread.sleep(1);
} catch (InterruptedException e) {}
}
}
@Override
protected void onPostExecute(Boolean success) {
BluetoothConnection connection = BtArduinoService.getBtService().getBluetoothConnection();
progressDialog.dismiss();
String message, title;
if (success && connection.isConnected()) {
message = "The connection was successful.";
String appName = sharedPref.getString("connected_device_name", "could not find connected device name");
title = "Devices - " + appName;
String lastConnectedDevice = "Device name: " + listAdapter.getName(savedPosition)
+ "\nMAC Address: " + listAdapter.getMacAddress(savedPosition);
//Saves the full information about the last connected device to sharedPreferences
Editor edit = sharedPref.edit();
edit.putString("connected_device_dialog", lastConnectedDevice);
edit.putString("connected_device_name", listAdapter.getName(savedPosition));
edit.putString("connected_device_mac", listAdapter.getMacAddress(savedPosition));
edit.commit();
Log.d(TAG, "The information about the last connected device was written to shared preferences");
}
else {
message = "The connection was not successfull." + "\nPlease try again.";
title = "Devices";
}
createDialog(message);
Log.d(TAG, message);
setTitle(title);
Log.d(TAG, "ConnectionState was: " + connection.getConnectionState());
}
}
/**
* This only shows a dialog box with functions to the arduino
* TODO: delete me when you dont need me anymore
*/
private void dialogBoxForTestingPurposes(){
final BluetoothConnection connection = BtArduinoService.getBtService().getBluetoothConnection();
if(connection.isConnected()){
// custom dialog
final Dialog dialog = new Dialog(Devices.this);
dialog.setContentView(R.layout.dialog_box_for_test_purposes);
Button LED = (Button) dialog.findViewById(R.id.LED);
Button VIBRATE = (Button) dialog.findViewById(R.id.VIBRATE);
Button SPEAKER = (Button) dialog.findViewById(R.id.SPEAKER);
Button LCD = (Button) dialog.findViewById(R.id.LCD);
ConnectionMetadata meta = connection.getConnectionData();
for(String service : meta.getServicesSupported()) {
Integer pins[] = meta.getServicePins(service);
if(pins.length > 0) {
if(service.equals(DefaultServices.SERVICE_LED_LAMP.name())){
LED.setOnClickListener(new OnClickListener() {
boolean ledIsToggled;
int pinID;
@Override
public void onClick(View v) {
ledIsToggled = !ledIsToggled;
try {
connection.write(pinID, ledIsToggled, false);
} catch (TimeoutException e) {}
}
});
}
if(service.equals(DefaultServices.SERVICE_VIBRATION.name())){
VIBRATE.setOnClickListener(new OnClickListener() {
Timer timer = new Timer();
int pin;
@Override
public void onClick(View v) {
timer.schedule(new TimerTask(){
@Override
public void run(){
try {
//Vibrate mobile
Vibrator vib = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE);
vib.vibrate(2000);
//Vibrate remote module
connection.write(pin, true, false);
Thread.sleep(2000);
connection.write(pin, false, false);
}
catch (Exception e) {
}
}
}, 0);
}
});
}
if(service.equals(DefaultServices.SERVICE_SPEAKER.name())){
SPEAKER.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
try {
connection.data(new byte[]{100, 75, 52, 15}, false);
} catch (TimeoutException e) {}
}
});
}
}
else if(service.equals(DefaultServices.SERVICE_LCD_SCREEN.name())){
LCD.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
try {
if(secondClick){
connection.print("hallo robin", false);
secondClick = false;
}
else{
connection.print(connection.getConnectionState().toString(), false);
secondClick = true;
}
} catch (TimeoutException e) {}
}
});
}
}
dialog.show();
}
}
/** Button for disconnecting from a connected BT device */
public void disconnectButton(final int position){
//Check if the selected element is a connected device
if(BtArduinoService.getBtService() != null){
if(BtArduinoService.getBtService().getBluetoothConnection() != null){
//Get the BT connection
final BluetoothConnection connection = BtArduinoService.getBtService().getBluetoothConnection();
if(connection.isConnected()){
//Custom dialog
final Dialog dialog = new Dialog(Devices.this);
dialog.setContentView(R.layout.dialog_box_for_disconnect);
Button disconnect = (Button) dialog.findViewById(R.id.disconnect);
disconnect.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
//Disconnect the connection
connection.disconnect();
connection.setConnectionState(ConnectionState.STATE_DISCONNECTED);
//Stop the service
BtArduinoService.getBtService().stopSelf();
BtArduinoService.getBtService().onDestroy();
//Clear the preferences
Editor edit = sharedPref.edit();
edit.remove("connected_device_name");
edit.remove("connected_device_mac");
edit.remove("connected_device_dialog");
edit.commit();
//Update the Activity's title
setActivityTitle();
//Unselect the view in the list
deviceList.setItemChecked(position, false);
//Notify the adapter about the changes
listAdapter.notifyDataSetInvalidated();
//Close the dialog box
dialog.cancel();
}
});
dialog.show();
}
}
}
}
/**
* Creates options menus
*/
@Override
@SuppressLint("NewApi")
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.device_menu, menu);
return true;
}
/**
* Returns true as long as item corresponds with a proper options action.
*/
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
//Start the preferences class
case R.id.settings:
//Create an intent to start the preferences activity
Intent myIntent = new Intent(getApplicationContext(), Preferences.class);
this.startActivity(myIntent);
return true;
default : return false;
}
}
} | src/no/group09/utils/Devices.java | package no.group09.utils;
/*
* Licensed to UbiCollab.org under one or more contributor
* license agreements. See the NOTICE file distributed
* with this work for additional information regarding
* copyright ownership. UbiCollab.org 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.
*/
import no.group09.ucsoftwarestore.R;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Timer;
import java.util.TimerTask;
import java.util.concurrent.TimeoutException;
import no.group09.connection.BluetoothConnection;
import no.group09.connection.BluetoothConnection.ConnectionState;
import no.group09.connection.ConnectionMetadata;
import no.group09.connection.ConnectionMetadata.DefaultServices;
import no.group09.fragments.BluetoothDeviceAdapter;
import android.annotation.SuppressLint;
import android.app.Activity;
import android.app.ActivityManager;
import android.app.ActivityManager.RunningServiceInfo;
import android.app.AlertDialog;
import android.app.Dialog;
import android.app.ProgressDialog;
import android.app.SearchManager;
import android.bluetooth.BluetoothAdapter;
import android.bluetooth.BluetoothDevice;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.SharedPreferences;
import android.content.SharedPreferences.Editor;
import android.os.AsyncTask;
import android.os.Bundle;
import android.os.Vibrator;
import android.preference.PreferenceManager;
import android.util.Log;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemLongClickListener;
import android.widget.Button;
import android.widget.ListView;
import android.widget.ProgressBar;
import android.widget.SearchView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.TextView;
import android.view.View.OnClickListener;
/**
* This class searches for the BT devices in range and put them in a list
*/
public class Devices extends Activity {
/**Should be true if only arduinos is to be showed. False otherwise */
private boolean ONLY_SHOW_ARDUINOS = false;
private SharedPreferences sharedPref;
private ProgressDialog progressDialog;
private static final String TAG = "DEVICES";
private static final int REQUEST_ENABLE_BT = 1;
private ListView deviceList;
private BluetoothDeviceAdapter listAdapter;
private BluetoothAdapter btAdapter;
private ArrayList<HashMap<String, String>> category_list;
private IntentFilter filter;
private Button refresh;
private Button addDeviceButton, browseShowButton;
private ProgressBar progressBar;
private ArrayList<HashMap<String, String>> device_list;
private boolean alreadyChecked = false;
private ArrayList<BluetoothDevice> btDeviceList = new ArrayList<BluetoothDevice>();
private MyBroadcastReceiver actionFoundReceiver;
public static final String MAC_ADDRESS = "MAC_ADDRESS";
private View linearLayout;
private TextView workingText;
static Context context;
private boolean secondClick = false;
private int savedPosition;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
//Set the xml layout
setContentView(R.layout.devices);
//Fetching the shared preferences object used to write the preference file
sharedPref = PreferenceManager.getDefaultSharedPreferences(getApplicationContext());
//Progressdialog used to indicate that the program is connecting to a BT device
progressDialog = new ProgressDialog(this);
//progressBar = (ProgressBar) findViewById(R.id.progressBar1);
progressBar = (ProgressBar) findViewById(R.id.progbar);
registerBroadcastReceiver();
// Getting the Bluetooth adapter
btAdapter = BluetoothAdapter.getDefaultAdapter();
category_list = new ArrayList<HashMap<String, String>>();
// Getting adapter by passing xml data ArrayList
listAdapter = new BluetoothDeviceAdapter(getBaseContext(), category_list);
//List of devices
device_list = new ArrayList<HashMap<String, String>>();
//Get the xml to how the list is structured
deviceList = (ListView) findViewById(R.id.bluetooth_devices_list);
//Get the adapter for the device list
listAdapter = new BluetoothDeviceAdapter(getBaseContext(), device_list);
//Set the adapter
deviceList.setAdapter(listAdapter);
//Initialize the device list
initializeDeviceList();
//Add refresh button to UI
refresh = (Button) findViewById(R.id.refresh);
refresh.setVisibility(View.GONE);
//Layout on top, used by textView
// linearLayout = findViewById(R.id.device_top_horizontal_linearlayout);
// workingText = new TextView(this);
// workingText.setText("Working...");
// workingText.setLayoutParams(new LayoutParams(LayoutParams.WRAP_CONTENT,LayoutParams.WRAP_CONTENT));
// workingText.setTextColor(getResources().getColor(R.color.white));
//Check the BT state
checkBTState();
//Add the button that opens the 'Add device' screen
addDeviceButton = (Button) findViewById(R.id.add_device_button);
//Add the button that takes you directly to the shop.
browseShowButton = (Button) findViewById(R.id.browse_shop_button);
addButtonFunctionality();
}
/**
* Method that initializes the device list and creates a service if an
* item is clicked.
*/
public void initializeDeviceList() {
//Click event for single list row
deviceList.setOnItemClickListener(new OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
//Cancel discovery when an item in the list is clicked
btAdapter.cancelDiscovery();
String macAddress = listAdapter.getMacAddress(position);
Intent serviceIntent = new Intent(getApplicationContext(), no.group09.utils.BtArduinoService.class);
serviceIntent.putExtra(MAC_ADDRESS, macAddress);
//FIXME: If the service allready is running, it does not start over.
//This might be a problem if it needs to change the connected device.
if(isMyServiceRunning()){
BtArduinoService.getBtService().getBluetoothConnection().setConnectionState(ConnectionState.STATE_DISCONNECTED);
BtArduinoService.getBtService().getBluetoothConnection().disconnect();
stopService(serviceIntent);
}
startService(serviceIntent);
ProgressDialogTask task = new ProgressDialogTask();
task.execute();
savedPosition = position;
}
});
deviceList.setOnItemLongClickListener(new OnItemLongClickListener() {
@Override
public boolean onItemLongClick(AdapterView<?> parent, View view, int position, long id){
//This gives a popup box with functionality to the arduino
// dialogBoxForTestingPurposes();
disconnectButton();
return false;
}
});
}
/** Checks wether a service is running or not */
private boolean isMyServiceRunning() {
ActivityManager manager = (ActivityManager) getSystemService(Context.ACTIVITY_SERVICE);
for (RunningServiceInfo service : manager.getRunningServices(Integer.MAX_VALUE)) {
if (BtArduinoService.class.getName().equals(service.service.getClassName())) {
return true;
}
}
return false;
}
/**
* Adds the functionality to all the buttons in Devices screen
*/
public void addButtonFunctionality() {
refresh.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
//Clear the list of BT devices
device_list.clear();
//Clear the list of BT device objects
btDeviceList.clear();
//Notify the adapter that the list is now empty
listAdapter.notifyDataSetChanged();
if(BtArduinoService.getBtService() != null){
if(BtArduinoService.getBtService().getBluetoothConnection() != null){
if(!BtArduinoService.getBtService().getBluetoothConnection().isConnected()){
setTitle("Devices");
}
else{
HashMap<String, String> map = new HashMap<String, String>();
map.put("name", sharedPref.getString("connected_device_name", "null"));
map.put("mac", sharedPref.getString("connected_device_mac", "null"));
map.put("pager", "708");
if(!device_list.contains(map)){
device_list.add(map);
deviceList.setItemChecked(0, true);
}
}
}
}
//Scan for new BT devices
checkBTState();
}
});
addDeviceButton.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
startActivity(new Intent(getBaseContext(), AddDeviceScreen.class));
}
});
browseShowButton.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
//Finishes this activity and goes back to the parent
finish();
//TODO: use finish() and delete this call when you want to browse shop instead for debug
// dialogBoxForTestingPurposes();
}
});
}
//Disse to er en del av en stygg hack, men det funker. Fix senere.
private void setContext(Context context) {
Devices.context = context;
}
public static Context getContext() {
return context;
}
/**
* Method used to register the broadcast receiver for communicating with
* bluetooth API
*/
private void registerBroadcastReceiver() {
//Register the BroadcastReceiver
filter = new IntentFilter(BluetoothDevice.ACTION_FOUND);
filter.addAction(BluetoothAdapter.ACTION_DISCOVERY_STARTED);
filter.addAction(BluetoothAdapter.ACTION_DISCOVERY_FINISHED);
filter.addAction(BluetoothDevice.ACTION_ACL_CONNECTED); //connected devices
actionFoundReceiver = new MyBroadcastReceiver();
//Registers the BT receiver with the requested filters
//Don't forget to unregister during onDestroy
registerReceiver(actionFoundReceiver, filter);
}
/** This routine is called when an activity completes.*/
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if (requestCode == REQUEST_ENABLE_BT) {
checkBTState();
}
}
@Override
public void onBackPressed() {
super.onBackPressed();
}
@Override
/**
* Called when this activity is destroyed. If a discovery is ongoing, it is
* cancelled. The broadcastreceiver is also unregistered.
*/
protected void onDestroy() {
super.onDestroy();
unregisterReceiver(actionFoundReceiver);
if (btAdapter != null) {
btAdapter.cancelDiscovery();
}
}
/**
* Called when Devices screen is resumed. Clears the list of visible
* bluetooth devices and starts a new search.
*/
@Override
public void onResume() {
super.onResume();
//Clear the list of BT devices
device_list.clear();
//Clear the list of BT device objects
btDeviceList.clear();
//Notify the adapter that the list is now empty
listAdapter.notifyDataSetChanged();
if(BtArduinoService.getBtService() != null){
if(BtArduinoService.getBtService().getBluetoothConnection() != null){
if(BtArduinoService.getBtService().getBluetoothConnection().isConnected()){
HashMap<String, String> map = new HashMap<String, String>();
map.put("name", sharedPref.getString("connected_device_name", "null"));
map.put("mac", sharedPref.getString("connected_device_mac", "null"));
map.put("pager", "708");
if(!device_list.contains(map)){
device_list.add(map);
deviceList.setItemChecked(0, true);
}
}
}
}
setActivityTitle();
}
/** Add the connected device name to the title if connected */
private void setActivityTitle(){
String appName = sharedPref.getString("connected_device_name", "null");
if(BtArduinoService.getBtService() != null && !appName.equals("null")){
if(BtArduinoService.getBtService().getBluetoothConnection() != null){
setTitle("Devices - " + appName);
}
else{
setTitle("Devices");
}
}
else{
setTitle("Devices");
}
}
/**
* Method used to check the state of the bluetooth connection. First checks
* if the Android device supports bluetooth connections. Starts a bluetooth
* discovery and sets the progress bar visible if bluetooth is enabled on the
* Android device. If bluetooth is disabled, it asks the user if he wants to
* enable it.
*/
@SuppressWarnings("deprecation")
private void checkBTState() {
//Check if the Android support bluetooth
if(btAdapter==null) return;
else {
//Check if the BT is turned on
if (btAdapter.isEnabled()) {
//Show the progress bar
progressBar.setVisibility(View.VISIBLE);
refresh.setVisibility(View.GONE);
// int SDK_INT = android.os.Build.VERSION.SDK_INT;
// if(SDK_INT < 11)
// showTextView(true);
// Starting the device discovery
btAdapter.startDiscovery();
}
//If the BT is not turned on, request the user to turn it on
else if (!btAdapter.isEnabled() && !alreadyChecked){
Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);
startActivityForResult(enableBtIntent, REQUEST_ENABLE_BT);
//The user have already turned it on or off: don't request again
alreadyChecked = true;
}
}
}
/**
* Method used to only show valid arduinos in the device list. Should be called
* each time a new device is to be added to the device list.
*
* The code used for a valid arduino device is 708. This is originally the
* code used a pager.
*
* @param device The device to be checked if it is valid
* @return true if the device is valid, false if not
*/
private boolean onlyShowArduinos(BluetoothDevice device){
if(ONLY_SHOW_ARDUINOS){
if((device.getBluetoothClass().toString()).equals("708")){
return true;
}
//Only return false if we only should show pagers, and that the device is not a pager
else return false;
}
return true;
}
/**
* checks if it should show textview in place of progressbar
* @param show
*/
// private void showTextView(boolean show){
//
//
//
// if(show){
// ((LinearLayout) linearLayout).addView(workingText);
// }
// else if(!show){
// ((LinearLayout) linearLayout).removeView(workingText);
// }
//
// }
/**
* Broadcast receiver class. Used to receive Android Bluetooth API communication
*/
private class MyBroadcastReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
String action = intent.getAction();
//If discovery started
if(BluetoothAdapter.ACTION_DISCOVERY_STARTED.equals(action)) {
Log.d(TAG, "\nDiscovery Started...");
}
//If a device is found
if (BluetoothDevice.ACTION_FOUND.equals(action)){
BluetoothDevice device = intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE);
//If the bluetooth class is named 708 that we made as a 'standard' for recognizing arduinos
if(onlyShowArduinos(device) || !btDeviceList.contains(device)){
//Adding found device
HashMap<String, String> map = new HashMap<String, String>();
map.put("name", device.getName());
map.put("mac", device.getAddress());
map.put("pager", device.getBluetoothClass().toString());
device_list.add(map);
//List of device objects
btDeviceList.add(device);
listAdapter.notifyDataSetChanged();
}
}
//If discovery finished
if(BluetoothAdapter.ACTION_DISCOVERY_FINISHED.equals(action)) {
//Hide the progress bar
progressBar.setVisibility(View.GONE);
//int SDK_INT = android.os.Build.VERSION.SDK_INT;
refresh.setVisibility(View.VISIBLE);
Log.d(TAG, "\nDiscovery Finished");
//if(SDK_INT < 11)
//showTextView(false);
}
}
}
public Dialog createDialog(String message) {
AlertDialog.Builder responseDialog = new AlertDialog.Builder(this);
responseDialog.setMessage(message)
.setPositiveButton("Ok", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
}
});
return responseDialog.show();
}
private class ProgressDialogTask extends AsyncTask<Void, Void, Boolean> {
private long timeout;
@Override
protected void onPreExecute() {
timeout = System.currentTimeMillis() + 8000;
progressDialog.setMessage("Connecting, please wait...");
progressDialog.setCancelable(true);
progressDialog.show();
}
@Override
protected Boolean doInBackground(Void... params) {
while(true) {
if(BtArduinoService.getBtService() != null){
if(BtArduinoService.getBtService().getBluetoothConnection() != null){
if(BtArduinoService.getBtService().getBluetoothConnection().isConnected()){
return true;
}
}
}
if (System.currentTimeMillis() > timeout) {
return false;
}
try {
Thread.sleep(1);
} catch (InterruptedException e) {}
}
}
@Override
protected void onPostExecute(Boolean success) {
BluetoothConnection connection = BtArduinoService.getBtService().getBluetoothConnection();
progressDialog.dismiss();
String message, title;
String appName = sharedPref.getString("connected_device_name", "could not find connected device name");
if (success && connection.isConnected()) {
message = "The connection was successful.";
title = "Devices - " + appName;
String lastConnectedDevice = "Device name: " + listAdapter.getName(savedPosition)
+ "\nMAC Address: " + listAdapter.getMacAddress(savedPosition);
//Saves the full information about the last connected device to sharedPreferences
Editor edit = sharedPref.edit();
edit.putString("connected_device_dialog", lastConnectedDevice);
edit.putString("connected_device_name", listAdapter.getName(savedPosition));
edit.putString("connected_device_mac", listAdapter.getMacAddress(savedPosition));
edit.commit();
Log.d(TAG, "The information about the last connected device was written to shared preferences");
}
else {
message = "The connection was not successfull." + "\nPlease try again.";
title = "Devices";
}
createDialog(message);
Log.d(TAG, message);
setTitle(title);
Log.d(TAG, "ConnectionState was: " + connection.getConnectionState());
}
}
/**
* This only shows a dialog box with functions to the arduino
* TODO: delete me when you dont need me anymore
*/
private void dialogBoxForTestingPurposes(){
final BluetoothConnection connection = BtArduinoService.getBtService().getBluetoothConnection();
if(connection.isConnected()){
// custom dialog
final Dialog dialog = new Dialog(Devices.this);
dialog.setContentView(R.layout.dialog_box_for_test_purposes);
Button LED = (Button) dialog.findViewById(R.id.LED);
Button VIBRATE = (Button) dialog.findViewById(R.id.VIBRATE);
Button SPEAKER = (Button) dialog.findViewById(R.id.SPEAKER);
Button LCD = (Button) dialog.findViewById(R.id.LCD);
ConnectionMetadata meta = connection.getConnectionData();
for(String service : meta.getServicesSupported()) {
Integer pins[] = meta.getServicePins(service);
if(pins.length > 0) {
if(service.equals(DefaultServices.SERVICE_LED_LAMP.name())){
LED.setOnClickListener(new OnClickListener() {
boolean ledIsToggled;
int pinID;
@Override
public void onClick(View v) {
ledIsToggled = !ledIsToggled;
try {
connection.write(pinID, ledIsToggled, false);
} catch (TimeoutException e) {}
}
});
}
if(service.equals(DefaultServices.SERVICE_VIBRATION.name())){
VIBRATE.setOnClickListener(new OnClickListener() {
Timer timer = new Timer();
int pin;
@Override
public void onClick(View v) {
timer.schedule(new TimerTask(){
@Override
public void run(){
try {
//Vibrate mobile
Vibrator vib = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE);
vib.vibrate(2000);
//Vibrate remote module
connection.write(pin, true, false);
Thread.sleep(2000);
connection.write(pin, false, false);
}
catch (Exception e) {
}
}
}, 0);
}
});
}
if(service.equals(DefaultServices.SERVICE_SPEAKER.name())){
SPEAKER.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
try {
connection.data(new byte[]{100, 75, 52, 15}, false);
} catch (TimeoutException e) {}
}
});
}
}
else if(service.equals(DefaultServices.SERVICE_LCD_SCREEN.name())){
LCD.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
try {
if(secondClick){
connection.print("hallo robin", false);
secondClick = false;
}
else{
connection.print(connection.getConnectionState().toString(), false);
secondClick = true;
}
} catch (TimeoutException e) {}
}
});
}
}
dialog.show();
}
}
/** Button for disconnecting from a connected BT device */
public void disconnectButton(){
//Check if the selected element is a connected device
if(BtArduinoService.getBtService() != null){
if(BtArduinoService.getBtService().getBluetoothConnection() != null){
//Get the BT connection
final BluetoothConnection connection = BtArduinoService.getBtService().getBluetoothConnection();
if(connection.isConnected()){
//Custom dialog
final Dialog dialog = new Dialog(Devices.this);
dialog.setContentView(R.layout.dialog_box_for_disconnect);
Button disconnect = (Button) dialog.findViewById(R.id.disconnect);
disconnect.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
//Disconnect the connection
connection.disconnect();
connection.setConnectionState(ConnectionState.STATE_DISCONNECTED);
//Stop the service
BtArduinoService.getBtService().stopSelf();
BtArduinoService.getBtService().onDestroy();
//Clear the preferences
Editor edit = sharedPref.edit();
edit.remove("connected_device_name");
edit.remove("connected_device_mac");
edit.remove("connected_device_dialog");
edit.commit();
//Update the Activity's title
setActivityTitle();
deviceList.setSelected(false);
//Close the dialog box
dialog.cancel();
}
});
dialog.show();
}
}
}
}
/**
* Creates options menus
*/
@Override
@SuppressLint("NewApi")
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.device_menu, menu);
return true;
}
/**
* Returns true as long as item corresponds with a proper options action.
*/
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
//Start the preferences class
case R.id.settings:
//Create an intent to start the preferences activity
Intent myIntent = new Intent(getApplicationContext(), Preferences.class);
this.startActivity(myIntent);
return true;
default : return false;
}
}
} | fixed disconnect button, it now unselects the list element
| src/no/group09/utils/Devices.java | fixed disconnect button, it now unselects the list element | <ide><path>rc/no/group09/utils/Devices.java
<ide> import android.widget.ListView;
<ide> import android.widget.ProgressBar;
<ide> import android.widget.SearchView;
<add>import android.widget.Toast;
<ide> import android.widget.AdapterView.OnItemClickListener;
<ide> import android.widget.TextView;
<ide> import android.view.View.OnClickListener;
<ide> //This gives a popup box with functionality to the arduino
<ide> // dialogBoxForTestingPurposes();
<ide>
<del> disconnectButton();
<add> disconnectButton(position);
<ide>
<ide> return false;
<ide> }
<ide> BluetoothConnection connection = BtArduinoService.getBtService().getBluetoothConnection();
<ide> progressDialog.dismiss();
<ide> String message, title;
<del> String appName = sharedPref.getString("connected_device_name", "could not find connected device name");
<ide>
<ide> if (success && connection.isConnected()) {
<ide> message = "The connection was successful.";
<add>
<add> String appName = sharedPref.getString("connected_device_name", "could not find connected device name");
<ide> title = "Devices - " + appName;
<ide>
<ide> String lastConnectedDevice = "Device name: " + listAdapter.getName(savedPosition)
<ide> }
<ide>
<ide> /** Button for disconnecting from a connected BT device */
<del> public void disconnectButton(){
<add> public void disconnectButton(final int position){
<ide>
<ide> //Check if the selected element is a connected device
<ide> if(BtArduinoService.getBtService() != null){
<ide>
<ide> //Update the Activity's title
<ide> setActivityTitle();
<add>
<add> //Unselect the view in the list
<add> deviceList.setItemChecked(position, false);
<ide>
<del> deviceList.setSelected(false);
<add> //Notify the adapter about the changes
<add> listAdapter.notifyDataSetInvalidated();
<add>
<ide>
<ide> //Close the dialog box
<ide> dialog.cancel(); |
|
Java | apache-2.0 | ada9e9f52d6499af684ca5ef435f3294556a933e | 0 | wso2-extensions/identity-governance | /*
* Copyright (c) 2020, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
*
* WSO2 Inc. 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.
*/
package org.wso2.carbon.identity.recovery.handler;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.wso2.carbon.identity.application.authentication.framework.util.FrameworkUtils;
import org.wso2.carbon.identity.base.IdentityException;
import org.wso2.carbon.identity.configuration.mgt.core.constant.ConfigurationConstants;
import org.wso2.carbon.identity.configuration.mgt.core.exception.ConfigurationManagementClientException;
import org.wso2.carbon.identity.configuration.mgt.core.exception.ConfigurationManagementException;
import org.wso2.carbon.identity.configuration.mgt.core.model.Resource;
import org.wso2.carbon.identity.recovery.IdentityRecoveryClientException;
import org.wso2.carbon.identity.recovery.IdentityRecoveryConstants;
import org.wso2.carbon.identity.recovery.handler.function.ResourceToProperties;
import org.wso2.carbon.identity.recovery.internal.IdentityRecoveryServiceDataHolder;
import org.wso2.carbon.identity.recovery.util.Utils;
import java.util.HashMap;
import java.util.Map;
/**
* Config store based property handler.
*/
public class ConfigStoreFunctionalityLockPropertyHandler {
private static final Log log = LogFactory.getLog(ConfigStoreFunctionalityLockPropertyHandler.class);
private static final boolean isDetailedErrorMessagesEnabled = Utils.isDetailedErrorResponseEnabled();
private static ConfigStoreFunctionalityLockPropertyHandler
instance = new ConfigStoreFunctionalityLockPropertyHandler();
private ConfigStoreFunctionalityLockPropertyHandler() {
}
public static ConfigStoreFunctionalityLockPropertyHandler getInstance() {
return instance;
}
public Map<String, String> getConfigStoreProperties(String tenantDomain, String functionalityIdentifier)
throws IdentityRecoveryClientException {
Map<String, String> properties;
try {
FrameworkUtils.startTenantFlow(tenantDomain);
try {
if (isFunctionalityLockResourceTypeExists()) {
Resource resource =
IdentityRecoveryServiceDataHolder.getInstance().getConfigurationManager()
.getResource(IdentityRecoveryConstants.FUNCTIONALITY_LOCK_RESOURCE_TYPE,
functionalityIdentifier);
properties = new ResourceToProperties().apply(resource);
} else {
if (log.isDebugEnabled()) {
log.debug("User Functionality properties are not configured. Resorting to default values.");
}
return getDefaultConfigurationPropertiesMap();
}
} catch (ConfigurationManagementException e) {
StringBuilder message = new StringBuilder(
IdentityRecoveryConstants.ErrorMessages.ERROR_CODE_FAILED_TO_FETCH_RESOURCE_FROM_CONFIG_STORE
.getMessage());
if (isDetailedErrorMessagesEnabled) {
message.append("\nresource type: ")
.append(IdentityRecoveryConstants.FUNCTIONALITY_LOCK_RESOURCE_TYPE);
message.append("\nresource: ").append(functionalityIdentifier);
}
throw IdentityException.error(IdentityRecoveryClientException.class,
IdentityRecoveryConstants.ErrorMessages.ERROR_CODE_FAILED_TO_FETCH_RESOURCE_FROM_CONFIG_STORE
.getCode(), message.toString());
}
} finally {
FrameworkUtils.endTenantFlow();
}
return properties;
}
private Map<String, String> getDefaultConfigurationPropertiesMap() {
Map<String, String> properties = new HashMap<>();
properties.put(IdentityRecoveryConstants.FUNCTION_MAX_ATTEMPTS_PROPERTY,
IdentityRecoveryConstants.MAX_ATTEMPTS_DEFAULT);
properties.put(IdentityRecoveryConstants.FUNCTION_LOCKOUT_TIME_PROPERTY,
IdentityRecoveryConstants.LOCKOUT_TIME_DEFAULT);
properties.put(IdentityRecoveryConstants.FUNCTION_LOGIN_FAIL_TIMEOUT_RATIO_PROPERTY,
IdentityRecoveryConstants.LOGIN_FAIL_TIMEOUT_RATIO_DEFAULT);
return properties;
}
/**
* Returns true if the Functionality Lock type is already in the ConfigurationManager.
*
* @return {@code true} if the Functionality Lock resource type is already in the ConfigurationManager,
* {@code false} otherwise.
* @throws ConfigurationManagementException
*/
private boolean isFunctionalityLockResourceTypeExists() throws ConfigurationManagementException {
try {
IdentityRecoveryServiceDataHolder.getInstance().getConfigurationManager()
.getResourceType(IdentityRecoveryConstants.FUNCTIONALITY_LOCK_RESOURCE_TYPE);
} catch (ConfigurationManagementClientException e) {
if (ConfigurationConstants.ErrorMessages.ERROR_CODE_RESOURCE_TYPE_DOES_NOT_EXISTS.getCode()
.equals(e.getErrorCode())) {
return false;
}
throw e;
}
return true;
}
}
| components/org.wso2.carbon.identity.recovery/src/main/java/org/wso2/carbon/identity/recovery/handler/ConfigStoreFunctionalityLockPropertyHandler.java | /*
* Copyright (c) 2020, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
*
* WSO2 Inc. 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.
*/
package org.wso2.carbon.identity.recovery.handler;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.wso2.carbon.identity.application.authentication.framework.util.FrameworkUtils;
import org.wso2.carbon.identity.base.IdentityException;
import org.wso2.carbon.identity.configuration.mgt.core.constant.ConfigurationConstants;
import org.wso2.carbon.identity.configuration.mgt.core.exception.ConfigurationManagementClientException;
import org.wso2.carbon.identity.configuration.mgt.core.exception.ConfigurationManagementException;
import org.wso2.carbon.identity.configuration.mgt.core.model.Resource;
import org.wso2.carbon.identity.recovery.IdentityRecoveryClientException;
import org.wso2.carbon.identity.recovery.IdentityRecoveryConstants;
import org.wso2.carbon.identity.recovery.IdentityRecoveryServerException;
import org.wso2.carbon.identity.recovery.handler.function.ResourceToProperties;
import org.wso2.carbon.identity.recovery.internal.IdentityRecoveryServiceDataHolder;
import org.wso2.carbon.identity.recovery.util.Utils;
import java.util.HashMap;
import java.util.Map;
/**
* Config store based property handler.
*/
public class ConfigStoreFunctionalityLockPropertyHandler {
private static final Log log = LogFactory.getLog(ConfigStoreFunctionalityLockPropertyHandler.class);
private static final boolean isDetailedErrorMessagesEnabled = Utils.isDetailedErrorResponseEnabled();
private static ConfigStoreFunctionalityLockPropertyHandler
instance = new ConfigStoreFunctionalityLockPropertyHandler();
private ConfigStoreFunctionalityLockPropertyHandler() {
}
public static ConfigStoreFunctionalityLockPropertyHandler getInstance() {
return instance;
}
public Map<String, String> getConfigStoreProperties(String tenantDomain, String functionalityIdentifier)
throws IdentityRecoveryClientException {
Map<String, String> properties;
try {
FrameworkUtils.startTenantFlow(tenantDomain);
try {
if (isFunctionalityLockResourceTypeExists()) {
Resource resource =
IdentityRecoveryServiceDataHolder.getInstance().getConfigurationManager()
.getResource(IdentityRecoveryConstants.FUNCTIONALITY_LOCK_RESOURCE_TYPE,
functionalityIdentifier);
properties = new ResourceToProperties().apply(resource);
} else {
log.trace("User Functionality properties are not configured. Resorting to default values.");
return getDefaultConfigurationPropertiesMap();
}
} catch (ConfigurationManagementException e) {
StringBuilder message = new StringBuilder(
IdentityRecoveryConstants.ErrorMessages.ERROR_CODE_FAILED_TO_FETCH_RESOURCE_FROM_CONFIG_STORE
.getMessage());
if (isDetailedErrorMessagesEnabled) {
message.append("\nresource type: ")
.append(IdentityRecoveryConstants.FUNCTIONALITY_LOCK_RESOURCE_TYPE);
message.append("\nresource: ").append(functionalityIdentifier);
}
throw IdentityException.error(IdentityRecoveryClientException.class,
IdentityRecoveryConstants.ErrorMessages.ERROR_CODE_FAILED_TO_FETCH_RESOURCE_FROM_CONFIG_STORE
.getCode(), message.toString());
}
} finally {
FrameworkUtils.endTenantFlow();
}
return properties;
}
private Map<String, String> getDefaultConfigurationPropertiesMap() {
Map<String, String> properties = new HashMap<>();
properties.put(IdentityRecoveryConstants.FUNCTION_MAX_ATTEMPTS_PROPERTY,
IdentityRecoveryConstants.MAX_ATTEMPTS_DEFAULT);
properties.put(IdentityRecoveryConstants.FUNCTION_LOCKOUT_TIME_PROPERTY,
IdentityRecoveryConstants.LOCKOUT_TIME_DEFAULT);
properties.put(IdentityRecoveryConstants.FUNCTION_LOGIN_FAIL_TIMEOUT_RATIO_PROPERTY,
IdentityRecoveryConstants.LOGIN_FAIL_TIMEOUT_RATIO_DEFAULT);
return properties;
}
/**
* Returns true if the Functionality Lock type is already in the ConfigurationManager.
*
* @return {@code true} if the Functionality Lock resource type is already in the ConfigurationManager,
* {@code false} otherwise.
* @throws ConfigurationManagementException
*/
private boolean isFunctionalityLockResourceTypeExists() throws ConfigurationManagementException {
try {
IdentityRecoveryServiceDataHolder.getInstance().getConfigurationManager()
.getResourceType(IdentityRecoveryConstants.FUNCTIONALITY_LOCK_RESOURCE_TYPE);
} catch (ConfigurationManagementClientException e) {
if (ConfigurationConstants.ErrorMessages.ERROR_CODE_RESOURCE_TYPE_DOES_NOT_EXISTS.getCode()
.equals(e.getErrorCode())) {
return false;
}
throw e;
}
return true;
}
}
| Resolve minor issues.
| components/org.wso2.carbon.identity.recovery/src/main/java/org/wso2/carbon/identity/recovery/handler/ConfigStoreFunctionalityLockPropertyHandler.java | Resolve minor issues. | <ide><path>omponents/org.wso2.carbon.identity.recovery/src/main/java/org/wso2/carbon/identity/recovery/handler/ConfigStoreFunctionalityLockPropertyHandler.java
<ide> import org.wso2.carbon.identity.configuration.mgt.core.model.Resource;
<ide> import org.wso2.carbon.identity.recovery.IdentityRecoveryClientException;
<ide> import org.wso2.carbon.identity.recovery.IdentityRecoveryConstants;
<del>import org.wso2.carbon.identity.recovery.IdentityRecoveryServerException;
<ide> import org.wso2.carbon.identity.recovery.handler.function.ResourceToProperties;
<ide> import org.wso2.carbon.identity.recovery.internal.IdentityRecoveryServiceDataHolder;
<ide> import org.wso2.carbon.identity.recovery.util.Utils;
<ide> functionalityIdentifier);
<ide> properties = new ResourceToProperties().apply(resource);
<ide> } else {
<del> log.trace("User Functionality properties are not configured. Resorting to default values.");
<add> if (log.isDebugEnabled()) {
<add> log.debug("User Functionality properties are not configured. Resorting to default values.");
<add> }
<ide> return getDefaultConfigurationPropertiesMap();
<ide> }
<ide> |
|
Java | apache-2.0 | 498ec4d839f90707fd07fc33a02f377bf8f7da49 | 0 | google/paco,google/paco,google/paco,google/paco,google/paco,google/paco,google/paco | package com.google.sampling.experiential.server;
import java.util.List;
import com.google.common.collect.Lists;
import com.google.sampling.experiential.shared.EventDAO;
import com.pacoapp.paco.shared.util.Constants;
public class EventQueryStatus {
private String status = Constants.SUCCESS;
private String errorMessage;
private List<EventDAO> events = Lists.newArrayList();
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public String getErrorMessage() {
return errorMessage;
}
public void setErrorMessage(String errorMessage) {
this.errorMessage = errorMessage;
this.status = Constants.FAILURE;
}
public List<EventDAO> getEvents() {
return events;
}
public void setEvents(List<EventDAO> events) {
this.events = events;
}
}
| Paco-Server/src/com/google/sampling/experiential/server/EventQueryStatus.java | package com.google.sampling.experiential.server;
import java.util.List;
import com.google.common.collect.Lists;
import com.google.sampling.experiential.shared.EventDAO;
public class EventQueryStatus {
private String status;
private String errorMessage;
private List<EventDAO> events = Lists.newArrayList();
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public String getErrorMessage() {
return errorMessage;
}
public void setErrorMessage(String errorMessage) {
this.errorMessage = errorMessage;
}
public List<EventDAO> getEvents() {
return events;
}
public void setEvents(List<EventDAO> events) {
this.events = events;
}
}
| set default error status to false
| Paco-Server/src/com/google/sampling/experiential/server/EventQueryStatus.java | set default error status to false | <ide><path>aco-Server/src/com/google/sampling/experiential/server/EventQueryStatus.java
<ide>
<ide> import com.google.common.collect.Lists;
<ide> import com.google.sampling.experiential.shared.EventDAO;
<add>import com.pacoapp.paco.shared.util.Constants;
<ide>
<ide> public class EventQueryStatus {
<ide>
<del> private String status;
<add> private String status = Constants.SUCCESS;
<ide> private String errorMessage;
<ide> private List<EventDAO> events = Lists.newArrayList();
<ide>
<ide>
<ide> public void setErrorMessage(String errorMessage) {
<ide> this.errorMessage = errorMessage;
<add> this.status = Constants.FAILURE;
<ide> }
<ide>
<ide> public List<EventDAO> getEvents() { |
|
Java | bsd-3-clause | 607300704dda1285bd88b49846d5708e6e07c8d7 | 0 | luxiaohan/openxal-csns-luxh,luxiaohan/openxal-csns-luxh,luxiaohan/openxal-csns-luxh,openxal/openxal,EuropeanSpallationSource/openxal,EuropeanSpallationSource/openxal,openxal/openxal,EuropeanSpallationSource/openxal,openxal/openxal,luxiaohan/openxal-csns-luxh,EuropeanSpallationSource/openxal,openxal/openxal,EuropeanSpallationSource/openxal,openxal/openxal | package xal.app.injdumpwizard.utils;
import java.util.*;
import xal.extension.solver.*;
import xal.extension.solver.hint.*;
import xal.extension.widgets.plot.BasicGraphData;
/**
* This is a accelerator sequence class.
* The sequence includes a quad, two H and V correctors, two BPMs, and one WS.
*
*@author shishlo
*/
class IDmpAccSeq{
//dignostics
AccElem bpm00 = new AccElem();
AccElem bpm01 = new AccElem();
AccElem bpm02 = new AccElem();
AccElem bpm03 = new AccElem();
AccElem ws01 = new AccElem();
AccElem dump = new AccElem();
//usage of diagnostics
boolean bpm00_use = true;
boolean bpm01_use = true;
boolean bpm02_use = true;
boolean bpm03_use = true;
boolean ws01_use = true;
//magnets 0.673 is an effective length of magnets
//QV01, DCH01, DCV01 in IDmp
AccElem quad = new AccElemQuad(0.673);
AccElem dch = new AccElemCorrH(0.673);
AccElem dcv = new AccElemCorrV(0.673);
//Vector with elements
Vector<AccElem> accElmV = new Vector<AccElem>();
//coords of particle
double[] coords_in = new double[4];
double[] coords_out = new double[4];
//Live data
double bpm00_x = 0.;
double bpm00_y = 0.;
double bpm01_x = 0.;
double bpm01_y = 0.;
double bpm02_x = 0.;
double bpm02_y = 0.;
double bpm03_x = 0.;
double bpm03_y = 0.;
double ws01_x = 0.;
double ws01_y = 0.;
//Init. cond. (x,xp,y,yp)
final private Vector<ValueRef> initProxyV = new Vector<>();
private Problem _problem;
public IDmpAccSeq(){
//make sequence
accElmV.add(bpm00);
accElmV.add(new AccElemDrift(10.029 - 6.48));
accElmV.add(quad);
accElmV.add(new AccElemDrift(10.278 - 10.029));
accElmV.add(bpm01);
accElmV.add(new AccElemDrift(10.6825-10.278));
accElmV.add(dch);
accElmV.add(dcv);
accElmV.add(new AccElemDrift(14.672-10.6825));
accElmV.add(bpm02);
accElmV.add(new AccElemDrift(16.612-14.672));
accElmV.add(ws01);
accElmV.add(new AccElemDrift(17.380 - 16.612));
accElmV.add(bpm03);
accElmV.add(new AccElemDrift(12.998));
accElmV.add(dump);
//set positions
bpm00.setPosition(6.48);
for(int i = 1; i < accElmV.size(); i++){
double end_pos = accElmV.get(i-1).getPosition() + accElmV.get(i-1).length/2.0;
accElmV.get(i).setPosition(end_pos + accElmV.get(i).length/2.0);
}
// minimize inverse square of score
_problem = new Problem();
//variables for initial coordinates
final String[] variableNames = { "x", "xp", "y", "yp" };
for ( final String variableName : variableNames ) {
final Variable variable = new Variable( variableName, 0.0, -10.0, 10.0 );
_problem.addVariable( variable );
initProxyV.add( _problem.getValueReference( variable ) );
}
}
public void setMagnetCoefs(double quad_coef, double dch_coef, double dcv_coef){
quad.field_coef = quad_coef;
dch.field_coef = dch_coef;
dcv.field_coef = dcv_coef;
}
public void setMagnetFields(double quad_f, double dch_f, double dcv_f){
quad.field = quad_f;
dch.field = dch_f;
dcv.field = dcv_f;
}
public void setMagnetOffsetsX(double quad_o, double dch_o, double dcv_o){
quad.offSetX = quad_o*0.001;
dch.offSetX = dch_o*0.001;
dcv.offSetX = dcv_o*0.001;
}
public void setMagnetOffsetsY(double quad_o, double dch_o, double dcv_o){
quad.offSetY = quad_o*0.001;
dch.offSetY = dch_o*0.001;
dcv.offSetY = dcv_o*0.001;
}
public void setDiagUsage(boolean bpm00_u, boolean bpm01_u, boolean bpm02_u, boolean bpm03_u, boolean ws01_u){
bpm00_use = bpm00_u;
bpm01_use = bpm01_u;
bpm02_use = bpm02_u;
bpm03_use = bpm03_u;
ws01_use = ws01_u;
}
public void setLiveOrbitX(double bpm00_u, double bpm01_u, double bpm02_u, double bpm03_u, double ws01_u){
bpm00_x = bpm00_u*0.001;
bpm01_x = bpm01_u*0.001;
bpm02_x = bpm02_u*0.001;
bpm03_x = bpm03_u*0.001;
ws01_x = ws01_u*0.001;
}
public void setLiveOrbitY(double bpm00_u, double bpm01_u, double bpm02_u, double bpm03_u, double ws01_u){
bpm00_y = bpm00_u*0.001;
bpm01_y = bpm01_u*0.001;
bpm02_y = bpm02_u*0.001;
bpm03_y = bpm03_u*0.001;
ws01_y = ws01_u*0.001;
}
private void track(){
coords_in[0] = initProxyV.get(0).getValue();
coords_in[1] = initProxyV.get(1).getValue();
coords_in[2] = initProxyV.get(2).getValue();
coords_in[3] = initProxyV.get(3).getValue();
for(int i = 0, n = accElmV.size(); i < n; i++){
accElmV.get(i).track(coords_in,coords_out);
// System.out.println("debug track from IDmpAccSeq ind="+i+" init x,xp,y,yp="+coords_in[0]+" "+coords_in[1]+" "+coords_in[2]+" "+coords_in[3]+" ");
// System.out.println("debug track from IDmpAccSeq ind="+i+" out x,xp,y,yp="+coords_out[0]+" "+coords_out[1]+" "+coords_out[2]+" "+coords_out[3]+" ");
for(int j = 0; j < 4; j++){
coords_in[j] = coords_out[j];
}
}
//System.out.println("debug track from IDmpAccSeq ========================");
}
public void findOrbit() {
// minimize inverse square of score
initProxyV.clear();
_problem = new Problem();
final double tolerance = 0.1; // 90% tolerance level for score of 1.0 mm error
final Objective objective = new MinimizingObjective( tolerance );
_problem.addObjective( objective );
_problem.addHint( new InitialDelta( 0.01 ) ); // initial delta for all variables
//variables for initial coordinates
final String[] variableNames = { "x", "xp", "y", "yp" };
for ( final String variableName : variableNames ) {
final Variable variable = new Variable( variableName, 0.0, -10.0, 10.0 );
_problem.addVariable( variable );
initProxyV.add( _problem.getValueReference( variable ) );
}
final Evaluator evaluator = new ScoringEvaluator( new OrbitScorer(), _problem.getVariables(), objective );
_problem.setEvaluator( evaluator );
Solver solver = new Solver( SolveStopperFactory.maxEvaluationsStopper( 500 ) );
solver.solve( _problem );
final Trial bestSolution = solver.getScoreBoard().getBestSolution();
_problem.evaluate( bestSolution ); // force the variable references to take the optimal values
track();
}
// internal class providing the score for problem to minimize the RMS orbit difference in millimeters
private class OrbitScorer implements Scorer {
public double score( final Trial trial, final List<Variable> variables ) {
track();
double diff = 0.;
if(bpm00_use){
diff = diff + (bpm00.outX - bpm00_x)*(bpm00.outX - bpm00_x);
diff = diff + (bpm00.outY - bpm00_y)*(bpm00.outY - bpm00_y);
}
if(bpm01_use){
diff = diff + (bpm01.outX - bpm01_x)*(bpm01.outX - bpm01_x);
diff = diff + (bpm01.outY - bpm01_y)*(bpm01.outY - bpm01_y);
}
if(bpm02_use){
diff = diff + (bpm02.outX - bpm02_x)*(bpm02.outX - bpm02_x);
diff = diff + (bpm02.outY - bpm02_y)*(bpm02.outY - bpm02_y);
}
if(bpm03_use){
diff = diff + (bpm03.outX - bpm03_x)*(bpm03.outX - bpm03_x);
diff = diff + (bpm03.outY - bpm03_y)*(bpm03.outY - bpm03_y);
}
if(ws01_use){
diff = diff + (ws01.outX - ws01_x)*(ws01.outX - ws01_x);
diff = diff + (ws01.outY - ws01_y)*(ws01.outY - ws01_y);
}
return Math.sqrt( diff*1000. );
}
}
/**
* Sets the momentum of the protons in eV/c.
*/
public void setMomentum(double momentum){
for(int i = 0; i < accElmV.size(); i++){
accElmV.get(i).momentum = momentum;
}
}
public double getDumpX(){
return dump.outX*1000.0;
}
public double getDumpY(){
return dump.outY*1000.0;
}
public void makeGraphsX(BasicGraphData expGr,BasicGraphData modelGr){
expGr.removeAllPoints();
modelGr.removeAllPoints();
if(bpm00_use == true){ expGr.addPoint(bpm00.position,bpm00_x*1000.0);}
if(bpm01_use == true){ expGr.addPoint(bpm01.position,bpm01_x*1000.0);}
if(bpm02_use == true){ expGr.addPoint(bpm02.position,bpm02_x*1000.0);}
if(bpm03_use == true){ expGr.addPoint(bpm03.position,bpm03_x*1000.0);}
if(ws01_use == true){ expGr.addPoint(ws01.position,ws01_x*1000.0);}
modelGr.addPoint(bpm00.position,bpm00.outX*1000.0);
modelGr.addPoint(bpm01.position,bpm01.outX*1000.0);
modelGr.addPoint(bpm02.position,bpm02.outX*1000.0);
modelGr.addPoint(bpm03.position,bpm03.outX*1000.0);
modelGr.addPoint(ws01.position,ws01.outX*1000.0);
modelGr.addPoint(dump.position,dump.outX*1000.0);
modelGr.addPoint(quad.position,quad.outX*1000.0);
modelGr.addPoint(dch.position,dch.outX*1000.0);
}
public void makeGraphsY(BasicGraphData expGr,BasicGraphData modelGr){
expGr.removeAllPoints();
modelGr.removeAllPoints();
if(bpm00_use == true){ expGr.addPoint(bpm00.position,bpm00_y*1000.0);}
if(bpm01_use == true){ expGr.addPoint(bpm01.position,bpm01_y*1000.0);}
if(bpm02_use == true){ expGr.addPoint(bpm02.position,bpm02_y*1000.0);}
if(bpm03_use == true){ expGr.addPoint(bpm03.position,bpm03_y*1000.0);}
if(ws01_use == true){ expGr.addPoint(ws01.position,ws01_y*1000.0);}
modelGr.addPoint(bpm00.position,bpm00.outY*1000.0);
modelGr.addPoint(bpm01.position,bpm01.outY*1000.0);
modelGr.addPoint(bpm02.position,bpm02.outY*1000.0);
modelGr.addPoint(bpm03.position,bpm03.outY*1000.0);
modelGr.addPoint(ws01.position,ws01.outY*1000.0);
modelGr.addPoint(dump.position,dump.outY*1000.0);
modelGr.addPoint(quad.position,quad.outY*1000.0);
modelGr.addPoint(dch.position,dch.outY*1000.0);
}
class AccElem{
double field_coef = 1.0;
double field = 0.0;
//------it is 4x4 matrix and add value
double [][] trM = new double[4][5];
double offSetX = 0.;
double offSetY = 0.;
double eff_length = 0.;
double length = 0.;
double position = 0.;
double inX = 0.;
double inY = 0.;
double outX = 0.;
double outY = 0.;
double c = 2.997924e+8;
// momentum of the parcticle in eV/c
double momentum = 0.00001;
public AccElem(){
init();
}
void init(){
for(int i = 0; i < 4; i++){
for(int j = 0; j < 5; j++){
if(i == j){
trM[i][j] = 1.;
} else {
trM[i][j] = 0.;
}
}
}
}
void setPosition(double pos){
position = pos;
}
double getPosition(){
return position;
}
void setMomentum(double P){
momentum = P;
}
void setField(double f){
field = f;
}
void setFieldCoeff(double coeff){
field_coef = coeff;
}
double getInX(){
return inX;
}
double getInY(){
return inY;
}
double getOutX(){
return outX;
}
double getOutY(){
return outY;
}
void makeTrM(){
}
void track(double[] coords_in, double[] coords_out){
makeTrM();
inX = coords_in[0];
inY = coords_in[2];
coords_in[0] = coords_in[0] + offSetX;
coords_in[2] = coords_in[2] + offSetY;
for(int i = 0; i < 4; i++){
coords_out[i] = 0.;
for(int j = 0; j < 4; j++){
coords_out[i] = coords_out[i] + trM[i][j]*coords_in[j];
}
coords_out[i] = coords_out[i] + trM[i][4];
}
coords_in[0] = coords_in[0] - offSetX;
coords_in[2] = coords_in[2] - offSetY;
outX = coords_out[0];
outY = coords_out[2];
}
}
class AccElemDrift extends AccElem{
public AccElemDrift(double L){
init();
length = L;
trM[0][1] = L;
trM[2][3] = L;
}
}
class AccElemQuad extends AccElem{
public AccElemQuad(double effL){
init();
eff_length = effL;
}
void makeTrM(){
double k2 = field_coef*field/(3.33564*momentum/1.0e+9);
double k = Math.sqrt(k2);
double sinKL = Math.sin(k*eff_length);
double sinhKL = Math.sinh(k*eff_length);
trM[3][2] = -k*sinKL;
trM[1][0] = k*sinhKL;
}
}
class AccElemCorrH extends AccElem{
public AccElemCorrH(double effL){
init();
eff_length = effL;
}
void makeTrM(){
trM[1][4] = field*field_coef*c*eff_length/momentum;
}
}
class AccElemCorrV extends AccElem{
public AccElemCorrV(double effL){
init();
eff_length = effL;
}
void makeTrM(){
trM[3][4] = field*field_coef*c*eff_length/momentum;
}
}
}
/** objective for minimization with tolerance */
class MinimizingObjective extends Objective {
/** tolerance for offset from minimum */
private final double TOLERANCE;
/** Constructor */
public MinimizingObjective( final double tolerance ) {
super( "MinimizingObjective" );
TOLERANCE = tolerance;
}
/** satisfaction with the specifies score */
public double satisfaction( final double score ) {
final double satisfaction = SatisfactionCurve.inverseSatisfaction( score, TOLERANCE );
return satisfaction;
}
}
/** evaluator for scoring the objectives */
class ScoringEvaluator implements Evaluator {
/** scorer */
final private Scorer SCORER;
/** objective to score */
final private Objective OBJECTIVE;
/** variables */
final List<Variable> VARIABLES;
/** Constructor */
public ScoringEvaluator( final Scorer scorer, final List<Variable> variables, final Objective objective ) {
SCORER = scorer;
VARIABLES = variables;
OBJECTIVE = objective;
}
/** evaluate the trial */
public void evaluate( final Trial trial ) {
final double score = SCORER.score( trial, VARIABLES );
trial.setScore( OBJECTIVE, score );
}
}
| apps/injdumpwizard/src/xal/app/injdumpwizard/utils/IDmpAccSeq.java | package xal.app.injdumpwizard.utils;
import java.util.*;
import xal.extension.solver.*;
import xal.extension.solver.hint.*;
import xal.extension.widgets.plot.BasicGraphData;
/**
* This is a accelerator sequence class.
* The sequence includes a quad, two H and V correctors, two BPMs, and one WS.
*
*@author shishlo
*/
class IDmpAccSeq{
//dignostics
AccElem bpm00 = new AccElem();
AccElem bpm01 = new AccElem();
AccElem bpm02 = new AccElem();
AccElem bpm03 = new AccElem();
AccElem ws01 = new AccElem();
AccElem dump = new AccElem();
//usage of diagnostics
boolean bpm00_use = true;
boolean bpm01_use = true;
boolean bpm02_use = true;
boolean bpm03_use = true;
boolean ws01_use = true;
//magnets 0.673 is an effective length of magnets
//QV01, DCH01, DCV01 in IDmp
AccElem quad = new AccElemQuad(0.673);
AccElem dch = new AccElemCorrH(0.673);
AccElem dcv = new AccElemCorrV(0.673);
//Vector with elements
Vector<AccElem> accElmV = new Vector<AccElem>();
//coords of particle
double[] coords_in = new double[4];
double[] coords_out = new double[4];
//Live data
double bpm00_x = 0.;
double bpm00_y = 0.;
double bpm01_x = 0.;
double bpm01_y = 0.;
double bpm02_x = 0.;
double bpm02_y = 0.;
double bpm03_x = 0.;
double bpm03_y = 0.;
double ws01_x = 0.;
double ws01_y = 0.;
//Init. cond. (x,xp,y,yp)
final private Vector<ValueRef> initProxyV = new Vector<>();
private Problem _problem;
public IDmpAccSeq(){
//make sequence
accElmV.add(bpm00);
accElmV.add(new AccElemDrift(10.029 - 6.48));
accElmV.add(quad);
accElmV.add(new AccElemDrift(10.278 - 10.029));
accElmV.add(bpm01);
accElmV.add(new AccElemDrift(10.6825-10.278));
accElmV.add(dch);
accElmV.add(dcv);
accElmV.add(new AccElemDrift(14.672-10.6825));
accElmV.add(bpm02);
accElmV.add(new AccElemDrift(16.612-14.672));
accElmV.add(ws01);
accElmV.add(new AccElemDrift(17.380 - 16.612));
accElmV.add(bpm03);
accElmV.add(new AccElemDrift(12.998));
accElmV.add(dump);
//set positions
bpm00.setPosition(6.48);
for(int i = 1; i < accElmV.size(); i++){
double end_pos = accElmV.get(i-1).getPosition() + accElmV.get(i-1).length/2.0;
accElmV.get(i).setPosition(end_pos + accElmV.get(i).length/2.0);
}
// minimize inverse square of score
_problem = new Problem();
//variables for initial coordinates
final String[] variableNames = { "x", "xp", "y", "yp" };
for ( final String variableName : variableNames ) {
final Variable variable = new Variable( variableName, 0.0, -10.0, 10.0 );
_problem.addVariable( variable );
initProxyV.add( _problem.getValueReference( variable ) );
}
}
public void setMagnetCoefs(double quad_coef, double dch_coef, double dcv_coef){
quad.field_coef = quad_coef;
dch.field_coef = dch_coef;
dcv.field_coef = dcv_coef;
}
public void setMagnetFields(double quad_f, double dch_f, double dcv_f){
quad.field = quad_f;
dch.field = dch_f;
dcv.field = dcv_f;
}
public void setMagnetOffsetsX(double quad_o, double dch_o, double dcv_o){
quad.offSetX = quad_o*0.001;
dch.offSetX = dch_o*0.001;
dcv.offSetX = dcv_o*0.001;
}
public void setMagnetOffsetsY(double quad_o, double dch_o, double dcv_o){
quad.offSetY = quad_o*0.001;
dch.offSetY = dch_o*0.001;
dcv.offSetY = dcv_o*0.001;
}
public void setDiagUsage(boolean bpm00_u, boolean bpm01_u, boolean bpm02_u, boolean bpm03_u, boolean ws01_u){
bpm00_use = bpm00_u;
bpm01_use = bpm01_u;
bpm02_use = bpm02_u;
bpm03_use = bpm03_u;
ws01_use = ws01_u;
}
public void setLiveOrbitX(double bpm00_u, double bpm01_u, double bpm02_u, double bpm03_u, double ws01_u){
bpm00_x = bpm00_u*0.001;
bpm01_x = bpm01_u*0.001;
bpm02_x = bpm02_u*0.001;
bpm03_x = bpm03_u*0.001;
ws01_x = ws01_u*0.001;
}
public void setLiveOrbitY(double bpm00_u, double bpm01_u, double bpm02_u, double bpm03_u, double ws01_u){
bpm00_y = bpm00_u*0.001;
bpm01_y = bpm01_u*0.001;
bpm02_y = bpm02_u*0.001;
bpm03_y = bpm03_u*0.001;
ws01_y = ws01_u*0.001;
}
private void track(){
coords_in[0] = initProxyV.get(0).getValue();
coords_in[1] = initProxyV.get(1).getValue();
coords_in[2] = initProxyV.get(2).getValue();
coords_in[3] = initProxyV.get(3).getValue();
for(int i = 0, n = accElmV.size(); i < n; i++){
accElmV.get(i).track(coords_in,coords_out);
// System.out.println("debug track from IDmpAccSeq ind="+i+" init x,xp,y,yp="+coords_in[0]+" "+coords_in[1]+" "+coords_in[2]+" "+coords_in[3]+" ");
// System.out.println("debug track from IDmpAccSeq ind="+i+" out x,xp,y,yp="+coords_out[0]+" "+coords_out[1]+" "+coords_out[2]+" "+coords_out[3]+" ");
for(int j = 0; j < 4; j++){
coords_in[j] = coords_out[j];
}
}
//System.out.println("debug track from IDmpAccSeq ========================");
}
public void findOrbit() {
// minimize inverse square of score
initProxyV.clear();
_problem = new Problem();
final double tolerance = 0.1; // 90% tolerance level for score of 1.0 mm error
final Objective objective = new MinimizingObjective( tolerance );
_problem.addObjective( objective );
_problem.addHint( new InitialDelta( 0.01 ) ); // initial delta for all variables
//variables for initial coordinates
final String[] variableNames = { "x", "xp", "y", "yp" };
for ( final String variableName : variableNames ) {
final Variable variable = new Variable( variableName, 0.0, -10.0, 10.0 );
_problem.addVariable( variable );
initProxyV.add( _problem.getValueReference( variable ) );
}
final Evaluator evaluator = new ScoringEvaluator( new OrbitScorer(), _problem.getVariables(), objective );
_problem.setEvaluator( evaluator );
Solver solver = new Solver( SolveStopperFactory.maxEvaluationsStopper( 500 ) );
solver.solve( _problem );
track();
}
// internal class providing the score for problem to minimize the RMS orbit difference in millimeters
private class OrbitScorer implements Scorer {
public double score( final Trial trial, final List<Variable> variables ) {
track();
double diff = 0.;
if(bpm00_use){
diff = diff + (bpm00.outX - bpm00_x)*(bpm00.outX - bpm00_x);
diff = diff + (bpm00.outY - bpm00_y)*(bpm00.outY - bpm00_y);
}
if(bpm01_use){
diff = diff + (bpm01.outX - bpm01_x)*(bpm01.outX - bpm01_x);
diff = diff + (bpm01.outY - bpm01_y)*(bpm01.outY - bpm01_y);
}
if(bpm02_use){
diff = diff + (bpm02.outX - bpm02_x)*(bpm02.outX - bpm02_x);
diff = diff + (bpm02.outY - bpm02_y)*(bpm02.outY - bpm02_y);
}
if(bpm03_use){
diff = diff + (bpm03.outX - bpm03_x)*(bpm03.outX - bpm03_x);
diff = diff + (bpm03.outY - bpm03_y)*(bpm03.outY - bpm03_y);
}
if(ws01_use){
diff = diff + (ws01.outX - ws01_x)*(ws01.outX - ws01_x);
diff = diff + (ws01.outY - ws01_y)*(ws01.outY - ws01_y);
}
return Math.sqrt( diff*1000. );
}
}
/**
* Sets the momentum of the protons in eV/c.
*/
public void setMomentum(double momentum){
for(int i = 0; i < accElmV.size(); i++){
accElmV.get(i).momentum = momentum;
}
}
public double getDumpX(){
return dump.outX*1000.0;
}
public double getDumpY(){
return dump.outY*1000.0;
}
public void makeGraphsX(BasicGraphData expGr,BasicGraphData modelGr){
expGr.removeAllPoints();
modelGr.removeAllPoints();
if(bpm00_use == true){ expGr.addPoint(bpm00.position,bpm00_x*1000.0);}
if(bpm01_use == true){ expGr.addPoint(bpm01.position,bpm01_x*1000.0);}
if(bpm02_use == true){ expGr.addPoint(bpm02.position,bpm02_x*1000.0);}
if(bpm03_use == true){ expGr.addPoint(bpm03.position,bpm03_x*1000.0);}
if(ws01_use == true){ expGr.addPoint(ws01.position,ws01_x*1000.0);}
modelGr.addPoint(bpm00.position,bpm00.outX*1000.0);
modelGr.addPoint(bpm01.position,bpm01.outX*1000.0);
modelGr.addPoint(bpm02.position,bpm02.outX*1000.0);
modelGr.addPoint(bpm03.position,bpm03.outX*1000.0);
modelGr.addPoint(ws01.position,ws01.outX*1000.0);
modelGr.addPoint(dump.position,dump.outX*1000.0);
modelGr.addPoint(quad.position,quad.outX*1000.0);
modelGr.addPoint(dch.position,dch.outX*1000.0);
}
public void makeGraphsY(BasicGraphData expGr,BasicGraphData modelGr){
expGr.removeAllPoints();
modelGr.removeAllPoints();
if(bpm00_use == true){ expGr.addPoint(bpm00.position,bpm00_y*1000.0);}
if(bpm01_use == true){ expGr.addPoint(bpm01.position,bpm01_y*1000.0);}
if(bpm02_use == true){ expGr.addPoint(bpm02.position,bpm02_y*1000.0);}
if(bpm03_use == true){ expGr.addPoint(bpm03.position,bpm03_y*1000.0);}
if(ws01_use == true){ expGr.addPoint(ws01.position,ws01_y*1000.0);}
modelGr.addPoint(bpm00.position,bpm00.outY*1000.0);
modelGr.addPoint(bpm01.position,bpm01.outY*1000.0);
modelGr.addPoint(bpm02.position,bpm02.outY*1000.0);
modelGr.addPoint(bpm03.position,bpm03.outY*1000.0);
modelGr.addPoint(ws01.position,ws01.outY*1000.0);
modelGr.addPoint(dump.position,dump.outY*1000.0);
modelGr.addPoint(quad.position,quad.outY*1000.0);
modelGr.addPoint(dch.position,dch.outY*1000.0);
}
class AccElem{
double field_coef = 1.0;
double field = 0.0;
//------it is 4x4 matrix and add value
double [][] trM = new double[4][5];
double offSetX = 0.;
double offSetY = 0.;
double eff_length = 0.;
double length = 0.;
double position = 0.;
double inX = 0.;
double inY = 0.;
double outX = 0.;
double outY = 0.;
double c = 2.997924e+8;
// momentum of the parcticle in eV/c
double momentum = 0.00001;
public AccElem(){
init();
}
void init(){
for(int i = 0; i < 4; i++){
for(int j = 0; j < 5; j++){
if(i == j){
trM[i][j] = 1.;
} else {
trM[i][j] = 0.;
}
}
}
}
void setPosition(double pos){
position = pos;
}
double getPosition(){
return position;
}
void setMomentum(double P){
momentum = P;
}
void setField(double f){
field = f;
}
void setFieldCoeff(double coeff){
field_coef = coeff;
}
double getInX(){
return inX;
}
double getInY(){
return inY;
}
double getOutX(){
return outX;
}
double getOutY(){
return outY;
}
void makeTrM(){
}
void track(double[] coords_in, double[] coords_out){
makeTrM();
inX = coords_in[0];
inY = coords_in[2];
coords_in[0] = coords_in[0] + offSetX;
coords_in[2] = coords_in[2] + offSetY;
for(int i = 0; i < 4; i++){
coords_out[i] = 0.;
for(int j = 0; j < 4; j++){
coords_out[i] = coords_out[i] + trM[i][j]*coords_in[j];
}
coords_out[i] = coords_out[i] + trM[i][4];
}
coords_in[0] = coords_in[0] - offSetX;
coords_in[2] = coords_in[2] - offSetY;
outX = coords_out[0];
outY = coords_out[2];
}
}
class AccElemDrift extends AccElem{
public AccElemDrift(double L){
init();
length = L;
trM[0][1] = L;
trM[2][3] = L;
}
}
class AccElemQuad extends AccElem{
public AccElemQuad(double effL){
init();
eff_length = effL;
}
void makeTrM(){
double k2 = field_coef*field/(3.33564*momentum/1.0e+9);
double k = Math.sqrt(k2);
double sinKL = Math.sin(k*eff_length);
double sinhKL = Math.sinh(k*eff_length);
trM[3][2] = -k*sinKL;
trM[1][0] = k*sinhKL;
}
}
class AccElemCorrH extends AccElem{
public AccElemCorrH(double effL){
init();
eff_length = effL;
}
void makeTrM(){
trM[1][4] = field*field_coef*c*eff_length/momentum;
}
}
class AccElemCorrV extends AccElem{
public AccElemCorrV(double effL){
init();
eff_length = effL;
}
void makeTrM(){
trM[3][4] = field*field_coef*c*eff_length/momentum;
}
}
}
/** objective for minimization with tolerance */
class MinimizingObjective extends Objective {
/** tolerance for offset from minimum */
private final double TOLERANCE;
/** Constructor */
public MinimizingObjective( final double tolerance ) {
super( "MinimizingObjective" );
TOLERANCE = tolerance;
}
/** satisfaction with the specifies score */
public double satisfaction( final double score ) {
final double satisfaction = SatisfactionCurve.inverseSatisfaction( score, TOLERANCE );
return satisfaction;
}
}
/** evaluator for scoring the objectives */
class ScoringEvaluator implements Evaluator {
/** scorer */
final private Scorer SCORER;
/** objective to score */
final private Objective OBJECTIVE;
/** variables */
final List<Variable> VARIABLES;
/** Constructor */
public ScoringEvaluator( final Scorer scorer, final List<Variable> variables, final Objective objective ) {
SCORER = scorer;
VARIABLES = variables;
OBJECTIVE = objective;
}
/** evaluate the trial */
public void evaluate( final Trial trial ) {
final double score = SCORER.score( trial, VARIABLES );
trial.setScore( OBJECTIVE, score );
}
}
| Set the variable references to the optimal values at the end of the solver session.
| apps/injdumpwizard/src/xal/app/injdumpwizard/utils/IDmpAccSeq.java | Set the variable references to the optimal values at the end of the solver session. | <ide><path>pps/injdumpwizard/src/xal/app/injdumpwizard/utils/IDmpAccSeq.java
<ide>
<ide> Solver solver = new Solver( SolveStopperFactory.maxEvaluationsStopper( 500 ) );
<ide> solver.solve( _problem );
<del>
<add>
<add> final Trial bestSolution = solver.getScoreBoard().getBestSolution();
<add> _problem.evaluate( bestSolution ); // force the variable references to take the optimal values
<add>
<ide> track();
<ide> }
<ide> |
|
Java | lgpl-2.1 | 4512480f808ae6d4e07ddf82df899cdc21b1583d | 0 | levants/lightmare | package org.lightmare.jpa.datasource.tomcat;
import java.io.IOException;
import java.util.Map;
import java.util.Properties;
import javax.naming.Context;
import org.apache.tomcat.jdbc.pool.DataSource;
import org.apache.tomcat.jdbc.pool.PoolProperties;
import org.lightmare.jpa.datasource.InitDataSource;
import org.lightmare.jpa.datasource.PoolConfig;
import org.lightmare.utils.ObjectUtils;
import org.lightmare.utils.StringUtils;
/**
* Initializes and bind to {@link Context} tomcat pooled {@link DataSource}
* object
*
* @author Levan Tsinadze
* @since 0.0.79-SNAPSHOT
*/
public class InitTomcat extends InitDataSource {
/**
* Container for Tomcat default configurations
*
* @author Levan Tsinadze
* @since 0.0.81-SNAPSHOT
*/
protected static enum TomcatConfig {
JDBC_INTERCEPTOR(
"org.apache.tomcat.jdbc.pool.interceptor.ConnectionState;",
"org.apache.tomcat.jdbc.pool.interceptor.StatementFinalizer"); //Intercepts JDBC statement
public String key;
public String value;
private TomcatConfig(String key, String value) {
this.key = key;
this.value = value;
}
}
private static final String TEST_SQL = "SELECT 1";
public InitTomcat(Properties properties) {
super(properties);
}
@Override
public DataSource initializeDataSource() throws IOException {
Map<Object, Object> configMap = poolConfig.merge(properties);
int checkOutTimeout = PoolConfig.asInt(configMap,
PoolConfig.Defaults.CHECK_OUT_TIMEOUT);
int exeededTimeout = PoolConfig.asInt(configMap,
PoolConfig.Defaults.MAX_IDLE_TIME_EXCESS_CONN);
DataSource dataSource;
PoolProperties poolProperties = new PoolProperties();
poolProperties.setUrl(url);
poolProperties.setDriverClassName(driver);
poolProperties.setUsername(user);
poolProperties.setPassword(password);
poolProperties.setJmxEnabled(Boolean.TRUE);
poolProperties.setTestWhileIdle(Boolean.FALSE);
poolProperties.setTestOnBorrow(Boolean.TRUE);
poolProperties.setValidationQuery(TEST_SQL);
poolProperties.setTestOnReturn(Boolean.FALSE);
poolProperties.setValidationInterval(checkOutTimeout);
poolProperties.setTimeBetweenEvictionRunsMillis(checkOutTimeout);
poolProperties.setMaxActive(PoolConfig.asInt(configMap,
PoolConfig.Defaults.MAX_POOL_SIZE));
poolProperties.setInitialSize(PoolConfig.asInt(configMap,
PoolConfig.Defaults.INITIAL_POOL_SIZE));
poolProperties.setMaxWait(10000);
poolProperties.setRemoveAbandonedTimeout(exeededTimeout);
poolProperties.setMinEvictableIdleTimeMillis(checkOutTimeout);
poolProperties.setMinIdle(10);
poolProperties.setLogAbandoned(Boolean.TRUE);
poolProperties.setRemoveAbandoned(Boolean.TRUE);
poolProperties.setJdbcInterceptors(StringUtils.concat(
TomcatConfig.JDBC_INTERCEPTOR.key,
TomcatConfig.JDBC_INTERCEPTOR.value));
dataSource = new DataSource();
dataSource.setPoolProperties(poolProperties);
return dataSource;
}
@Override
protected boolean checkInstance(javax.sql.DataSource dataSource)
throws IOException {
boolean valid = (dataSource instanceof DataSource);
return valid;
}
@Override
public void cleanUp(javax.sql.DataSource dataSource) {
DataSource pooledDataSource;
if (dataSource instanceof DataSource) {
pooledDataSource = ObjectUtils.cast(dataSource, DataSource.class);
pooledDataSource.close();
}
}
}
| src/main/java/org/lightmare/jpa/datasource/tomcat/InitTomcat.java | package org.lightmare.jpa.datasource.tomcat;
import java.io.IOException;
import java.util.Map;
import java.util.Properties;
import javax.naming.Context;
import org.apache.tomcat.jdbc.pool.DataSource;
import org.apache.tomcat.jdbc.pool.PoolProperties;
import org.lightmare.jpa.datasource.InitDataSource;
import org.lightmare.jpa.datasource.PoolConfig;
import org.lightmare.utils.ObjectUtils;
import org.lightmare.utils.StringUtils;
/**
* Initializes and bind to {@link Context} tomcat pooled {@link DataSource}
* object
*
* @author Levan Tsinadze
* @since 0.0.79-SNAPSHOT
*/
public class InitTomcat extends InitDataSource {
/**
* Container for Tomcat default configurations
*
* @author Levan Tsinadze
* @since 0.0.81-SNAPSHOT
*/
protected static enum TomcatConfig {
JDBC_INTERCEPTOR(
"org.apache.tomcat.jdbc.pool.interceptor.ConnectionState;",
"org.apache.tomcat.jdbc.pool.interceptor.StatementFinalizer");
public String key;
public String value;
private TomcatConfig(String key, String value) {
this.key = key;
this.value = value;
}
}
private static final String TEST_SQL = "SELECT 1";
public InitTomcat(Properties properties) {
super(properties);
}
@Override
public DataSource initializeDataSource() throws IOException {
Map<Object, Object> configMap = poolConfig.merge(properties);
int checkOutTimeout = PoolConfig.asInt(configMap,
PoolConfig.Defaults.CHECK_OUT_TIMEOUT);
int exeededTimeout = PoolConfig.asInt(configMap,
PoolConfig.Defaults.MAX_IDLE_TIME_EXCESS_CONN);
DataSource dataSource;
PoolProperties poolProperties = new PoolProperties();
poolProperties.setUrl(url);
poolProperties.setDriverClassName(driver);
poolProperties.setUsername(user);
poolProperties.setPassword(password);
poolProperties.setJmxEnabled(Boolean.TRUE);
poolProperties.setTestWhileIdle(Boolean.FALSE);
poolProperties.setTestOnBorrow(Boolean.TRUE);
poolProperties.setValidationQuery(TEST_SQL);
poolProperties.setTestOnReturn(Boolean.FALSE);
poolProperties.setValidationInterval(checkOutTimeout);
poolProperties.setTimeBetweenEvictionRunsMillis(checkOutTimeout);
poolProperties.setMaxActive(PoolConfig.asInt(configMap,
PoolConfig.Defaults.MAX_POOL_SIZE));
poolProperties.setInitialSize(PoolConfig.asInt(configMap,
PoolConfig.Defaults.INITIAL_POOL_SIZE));
poolProperties.setMaxWait(10000);
poolProperties.setRemoveAbandonedTimeout(exeededTimeout);
poolProperties.setMinEvictableIdleTimeMillis(checkOutTimeout);
poolProperties.setMinIdle(10);
poolProperties.setLogAbandoned(Boolean.TRUE);
poolProperties.setRemoveAbandoned(Boolean.TRUE);
poolProperties.setJdbcInterceptors(StringUtils.concat(
TomcatConfig.JDBC_INTERCEPTOR.key,
TomcatConfig.JDBC_INTERCEPTOR.value));
dataSource = new DataSource();
dataSource.setPoolProperties(poolProperties);
return dataSource;
}
@Override
protected boolean checkInstance(javax.sql.DataSource dataSource)
throws IOException {
boolean valid = (dataSource instanceof DataSource);
return valid;
}
@Override
public void cleanUp(javax.sql.DataSource dataSource) {
DataSource pooledDataSource;
if (dataSource instanceof DataSource) {
pooledDataSource = ObjectUtils.cast(dataSource, DataSource.class);
pooledDataSource.close();
}
}
}
| commented / improved code in utility classes | src/main/java/org/lightmare/jpa/datasource/tomcat/InitTomcat.java | commented / improved code in utility classes | <ide><path>rc/main/java/org/lightmare/jpa/datasource/tomcat/InitTomcat.java
<ide>
<ide> JDBC_INTERCEPTOR(
<ide> "org.apache.tomcat.jdbc.pool.interceptor.ConnectionState;",
<del> "org.apache.tomcat.jdbc.pool.interceptor.StatementFinalizer");
<add> "org.apache.tomcat.jdbc.pool.interceptor.StatementFinalizer"); //Intercepts JDBC statement
<ide>
<ide> public String key;
<ide> |
|
Java | apache-2.0 | 2d1f59399ad64d3fe90f28c2c700ae1815503f8a | 0 | venukb/any23,venukb/any23,venukb/any23,venukb/any23 | /*
* Copyright 2008-2010 Digital Enterprise Research Institute (DERI)
*
* 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 org.deri.any23.util;
import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.FileWriter;
import java.io.FilenameFilter;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.List;
/**
* Utility class for handling files.
*
* @author Michele Mostarda ([email protected])
*/
public class FileUtils {
/**
* Moves a <code>target</code> file to a new <code>dest</code> location.
*
* @param target file to be moved.
* @param dest dest dir.
* @return destination file.
*/
public static File mv(File target, File dest) {
if (!dest.isDirectory()) {
throw new IllegalArgumentException("destination must be a directory.");
}
final File newFile = new File(dest, target.getName());
boolean success = target.renameTo(newFile);
if (!success) {
throw new IllegalStateException(
String.format("Cannot move target file [%s] to destination [%s]", target, newFile)
);
}
return newFile;
}
/**
* Copies the content of the input stream within the given dest file.
* The dest file must not exist.
*
* @param is
* @param dest
*/
public static void cp(InputStream is, File dest) {
if (dest.exists()) {
throw new IllegalArgumentException("Destination must not exist.");
}
BufferedInputStream bis = null;
BufferedOutputStream bos = null;
try {
bis = new BufferedInputStream(is);
FileOutputStream fos = new FileOutputStream(dest);
bos = new BufferedOutputStream(fos);
final byte[] buffer = new byte[1024 * 4];
int read;
while (true) {
read = bis.read(buffer);
if (read == -1) {
break;
}
bos.write(buffer, 0, read);
}
} catch (Exception e) {
throw new RuntimeException("Error while copying stream into file.", e);
} finally {
StreamUtils.closeGracefully(bis);
StreamUtils.closeGracefully(bos);
}
}
/**
* Copies a file <code>src</code> to the <code>dest</code>.
*
* @param src source file.
* @param dest destination file.
* @throws java.io.FileNotFoundException if file cannot be copied or created.
*/
public static void cp(File src, File dest) throws FileNotFoundException {
FileInputStream fis = null;
try {
fis = new FileInputStream(src);
cp(fis, dest);
} finally {
StreamUtils.closeGracefully(fis);
}
}
/**
* Dumps the given string within a file.
*
* @param f file target.
* @param content content to be dumped.
* @throws IOException
*/
public static void dumpContent(File f, String content) throws IOException {
FileWriter fw = new FileWriter(f);
try {
fw.write(content);
} finally {
StreamUtils.closeGracefully(fw);
}
}
/**
* Dumps the stack trace of the given exception into the specified file.
*
* @param f file to generate dump.
* @param t exception to be dumped.
* @throws IOException
*/
public static void dumpContent(File f, Throwable t) throws IOException {
final ByteArrayOutputStream baos = new ByteArrayOutputStream();
final PrintWriter pw = new PrintWriter(baos);
t.printStackTrace(pw);
pw.close();
dumpContent(f, baos.toString());
}
/**
* Reads a resource file and returns the content as a string.
*
* @param clazz the class to use load the resource.
* @param resource the resource to be load.
* @return the string representing the file content.
* @throws java.io.IOException
*/
public static String readResourceContent(Class clazz, String resource) throws IOException {
return StreamUtils.asString( clazz.getResourceAsStream(resource) );
}
/**
* Reads a resource file and returns the content as a string.
*
* @param resource the resource to be load.
* @return the string representing the file content.
* @throws java.io.IOException
*/
public static String readResourceContent(String resource) throws IOException {
return readResourceContent(FileUtils.class, resource);
}
/**
* Reads the content of a file and return it in a string.
*
* @param f the file to read.
* @return the content of file.
* @throws IOException if an exception occurs while locating or accessing the file.
*/
public static String readFileContent(File f) throws IOException {
FileInputStream fis = new FileInputStream(f);
return StreamUtils.asString(fis, true);
}
/**
* Lists the content of a dir applying the specified filter.
*
* @param dir directory root.
* @param filenameFilter filter to be applied.
* @return list of matching files.
*/
public static File[] listFilesRecursively(File dir, FilenameFilter filenameFilter) {
if( ! dir.isDirectory() ) {
throw new IllegalArgumentException(dir.getAbsolutePath() + " must be a directory.");
}
final List<File> result = new ArrayList<File>();
visitFilesRecursively(dir, filenameFilter, result);
return result.toArray( new File[result.size()] );
}
/**
* Visits a directory recursively, applying the given filter and adding matches to the result list.
*
* @param dir directory to find.
* @param filenameFilter filter to apply.
* @param result result list.
*/
private static void visitFilesRecursively(File dir, FilenameFilter filenameFilter, List<File> result) {
for (File file : dir.listFiles()) {
if (!file.isDirectory()) {
if (filenameFilter == null || filenameFilter.accept(dir, file.getName())) {
result.add(file);
}
} else {
visitFilesRecursively(file, filenameFilter, result);
}
}
}
/**
* Function class.
*/
private FileUtils() {}
}
| any23-core/src/main/java/org/deri/any23/util/FileUtils.java | /*
* Copyright 2008-2010 Digital Enterprise Research Institute (DERI)
*
* 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 org.deri.any23.util;
import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
/**
* Utility class for handling files.
*
* @author Michele Mostarda ([email protected])
*/
public class FileUtils {
/**
* Moves a <code>target</code> file to a new <code>dest</code> location.
*
* @param target file to be moved.
* @param dest dest dir.
* @return destination file.
*/
public static File mv(File target, File dest) {
if (!dest.isDirectory()) {
throw new IllegalArgumentException("destination must be a directory.");
}
final File newFile = new File(dest, target.getName());
boolean success = target.renameTo(newFile);
if (!success) {
throw new IllegalStateException(
String.format("Cannot move target file [%s] to destination [%s]", target, newFile)
);
}
return newFile;
}
/**
* Copies the content of the input stream within the given dest file.
* The dest file must not exist.
*
* @param is
* @param dest
*/
public static void cp(InputStream is, File dest) {
if (dest.exists()) {
throw new IllegalArgumentException("Destination must not exist.");
}
BufferedInputStream bis = null;
BufferedOutputStream bos = null;
try {
bis = new BufferedInputStream(is);
FileOutputStream fos = new FileOutputStream(dest);
bos = new BufferedOutputStream(fos);
final byte[] buffer = new byte[1024 * 4];
int read;
while (true) {
read = bis.read(buffer);
if (read == -1) {
break;
}
bos.write(buffer, 0, read);
}
} catch (Exception e) {
throw new RuntimeException("Error while copying stream into file.", e);
} finally {
StreamUtils.closeGracefully(bis);
StreamUtils.closeGracefully(bos);
}
}
/**
* Copies a file <code>src</code> to the <code>dest</code>.
*
* @param src source file.
* @param dest destination file.
* @throws java.io.FileNotFoundException if file cannot be copied or created.
*/
public static void cp(File src, File dest) throws FileNotFoundException {
FileInputStream fis = null;
try {
fis = new FileInputStream(src);
cp(fis, dest);
} finally {
StreamUtils.closeGracefully(fis);
}
}
/**
* Dumps the given string within a file.
*
* @param f file target.
* @param content content to be dumped.
* @throws IOException
*/
public static void dumpContent(File f, String content) throws IOException {
FileWriter fw = new FileWriter(f);
try {
fw.write(content);
} finally {
StreamUtils.closeGracefully(fw);
}
}
/**
* Dumps the stack trace of the given exception into the specified file.
*
* @param f file to generate dump.
* @param t exception to be dumped.
* @throws IOException
*/
public static void dumpContent(File f, Throwable t) throws IOException {
final ByteArrayOutputStream baos = new ByteArrayOutputStream();
final PrintWriter pw = new PrintWriter(baos);
t.printStackTrace(pw);
pw.close();
dumpContent(f, baos.toString());
}
/**
* Reads a resource file and returns the content as a string.
*
* @param clazz the class to use load the resource.
* @param resource the resource to be load.
* @return the string representing the file content.
* @throws java.io.IOException
*/
public static String readResourceContent(Class clazz, String resource) throws IOException {
return StreamUtils.asString( clazz.getResourceAsStream(resource) );
}
/**
* Reads a resource file and returns the content as a string.
*
* @param resource the resource to be load.
* @return the string representing the file content.
* @throws java.io.IOException
*/
public static String readResourceContent(String resource) throws IOException {
return readResourceContent(FileUtils.class, resource);
}
/**
* Reads the content of a file and return it in a string.
*
* @param f the file to read.
* @return the content of file.
* @throws IOException if an exception occurs while locating or accessing the file.
*/
public static String readFileContent(File f) throws IOException {
FileInputStream fis = new FileInputStream(f);
return StreamUtils.asString(fis, true);
}
/**
* Function class.
*/
private FileUtils() {}
}
| Added listFilesRecursively() method.
| any23-core/src/main/java/org/deri/any23/util/FileUtils.java | Added listFilesRecursively() method. | <ide><path>ny23-core/src/main/java/org/deri/any23/util/FileUtils.java
<ide> import java.io.FileNotFoundException;
<ide> import java.io.FileOutputStream;
<ide> import java.io.FileWriter;
<add>import java.io.FilenameFilter;
<ide> import java.io.IOException;
<ide> import java.io.InputStream;
<ide> import java.io.PrintWriter;
<add>import java.util.ArrayList;
<add>import java.util.List;
<ide>
<ide> /**
<ide> * Utility class for handling files.
<ide> }
<ide>
<ide> /**
<add> * Lists the content of a dir applying the specified filter.
<add> *
<add> * @param dir directory root.
<add> * @param filenameFilter filter to be applied.
<add> * @return list of matching files.
<add> */
<add> public static File[] listFilesRecursively(File dir, FilenameFilter filenameFilter) {
<add> if( ! dir.isDirectory() ) {
<add> throw new IllegalArgumentException(dir.getAbsolutePath() + " must be a directory.");
<add> }
<add> final List<File> result = new ArrayList<File>();
<add> visitFilesRecursively(dir, filenameFilter, result);
<add> return result.toArray( new File[result.size()] );
<add> }
<add>
<add> /**
<add> * Visits a directory recursively, applying the given filter and adding matches to the result list.
<add> *
<add> * @param dir directory to find.
<add> * @param filenameFilter filter to apply.
<add> * @param result result list.
<add> */
<add> private static void visitFilesRecursively(File dir, FilenameFilter filenameFilter, List<File> result) {
<add> for (File file : dir.listFiles()) {
<add> if (!file.isDirectory()) {
<add> if (filenameFilter == null || filenameFilter.accept(dir, file.getName())) {
<add> result.add(file);
<add> }
<add> } else {
<add> visitFilesRecursively(file, filenameFilter, result);
<add> }
<add> }
<add> }
<add>
<add> /**
<ide> * Function class.
<ide> */
<ide> private FileUtils() {} |
|
Java | apache-2.0 | c2ba524e3e01747be892405f9e93ebfb6adfe89b | 0 | 99soft/autobind | package org.nnsoft.guice.autobind.scanner.asm;
/*
* Copyright 2012 The 99 Software Foundation
*
* 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.
*/
import java.lang.annotation.Annotation;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.nnsoft.guice.autobind.scanner.features.ScannerFeature;
import org.objectweb.asm.AnnotationVisitor;
import org.objectweb.asm.ClassReader;
import org.objectweb.asm.ClassVisitor;
import org.objectweb.asm.Opcodes;
/**
* Visitor implementation to collect field annotation information from class.
*/
final class AnnotationCollector
extends ClassVisitor
{
public static final int ASM_FLAGS = ClassReader.SKIP_CODE | ClassReader.SKIP_DEBUG | ClassReader.SKIP_FRAMES;
private final Logger _logger = Logger.getLogger( AnnotationCollector.class.getName() );
private String _name;
private Class<?> _class;
private boolean _ignore;
private Map<String, Annotation> _annotations;
private List<ScannerFeature> _features;
public AnnotationCollector()
{
super( Opcodes.ASM4 );
_features = new LinkedList<ScannerFeature>();
_annotations = new HashMap<String, Annotation>();
}
public void addScannerFeature( ScannerFeature listener )
{
_features.add( listener );
}
public void removerScannerFeature( ScannerFeature listener )
{
_features.remove( listener );
}
public List<ScannerFeature> getScannerFeatures()
{
return new ArrayList<ScannerFeature>( _features );
}
public void destroy()
{
_annotations.clear();
_annotations = null;
_class = null;
_features.clear();
_features = null;
}
@Override
public void visit( int version, int access, String name, String signature, String superName, String[] interfaces )
{
_name = name.replace( '/', '.' );
for ( String interf : interfaces )
{
if ( interf.equals( "java/lang/annotation/Annotation" ) )
{
_ignore = true;
return;
}
}
}
@SuppressWarnings( "unchecked" )
public AnnotationVisitor visitAnnotation( String sig, boolean visible )
{
if ( _ignore )
{
return null;
}
String annotationClassStr = sig.replace( '/', '.' ).substring( 1, sig.length() - 1 );
if ( _class == null )
{
try
{
_class = Thread.currentThread().getContextClassLoader().loadClass( _name );
}
catch ( ClassNotFoundException e )
{
_logger.log( Level.WARNING, "Failure while visitAnnotation. Class could not be loaded.", e );
return null;
}
}
try
{
Class<Annotation> annotationClass =
(Class<Annotation>) getClass().getClassLoader().loadClass( annotationClassStr );
Annotation annotation = _class.getAnnotation( annotationClass );
_annotations.put( annotationClassStr, annotation );
}
catch ( ClassNotFoundException e )
{
e.printStackTrace();
_logger.log( Level.WARNING, "Failure while visitAnnotation. Class could not be loaded.", e );
}
return null;
}
@SuppressWarnings( "unchecked" )
@Override
public void visitEnd()
{
if ( !_ignore && _annotations.size() > 0 && !_annotations.containsKey( "javax.enterprise.inject.Alternative" ) )
{
for ( ScannerFeature listener : _features )
{
listener.found( (Class<Object>) _class, _annotations );
}
}
_name = null;
_class = null;
_ignore = false;
_annotations.clear();
}
}
| scanner/asm/src/main/java/org/nnsoft/guice/autobind/scanner/asm/AnnotationCollector.java | package org.nnsoft.guice.autobind.scanner.asm;
/*
* Copyright 2012 The 99 Software Foundation
*
* 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.
*/
import java.lang.annotation.Annotation;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.nnsoft.guice.autobind.scanner.features.ScannerFeature;
import org.objectweb.asm.AnnotationVisitor;
import org.objectweb.asm.ClassReader;
import org.objectweb.asm.ClassVisitor;
import org.objectweb.asm.Opcodes;
/**
* Visitor implementation to collect field annotation information from class.
*/
final class AnnotationCollector
extends ClassVisitor
{
public static final int ASM_FLAGS = ClassReader.SKIP_CODE | ClassReader.SKIP_DEBUG | ClassReader.SKIP_FRAMES;
private Logger _logger = Logger.getLogger( AnnotationCollector.class.getName() );
private String _name;
private Class<?> _class;
private boolean _ignore;
private Map<String, Annotation> _annotations;
private List<ScannerFeature> _features;
public AnnotationCollector()
{
super( Opcodes.ASM4 );
_features = new LinkedList<ScannerFeature>();
_annotations = new HashMap<String, Annotation>();
}
public void addScannerFeature( ScannerFeature listener )
{
_features.add( listener );
}
public void removerScannerFeature( ScannerFeature listener )
{
_features.remove( listener );
}
public List<ScannerFeature> getScannerFeatures()
{
return new ArrayList<ScannerFeature>( _features );
}
public void destroy()
{
_annotations.clear();
_annotations = null;
_class = null;
_features.clear();
_features = null;
}
@Override
public void visit( int version, int access, String name, String signature, String superName, String[] interfaces )
{
_name = name.replace( '/', '.' );
for ( String interf : interfaces )
{
if ( interf.equals( "java/lang/annotation/Annotation" ) )
{
_ignore = true;
return;
}
}
}
@SuppressWarnings( "unchecked" )
public AnnotationVisitor visitAnnotation( String sig, boolean visible )
{
if ( _ignore )
{
return null;
}
String annotationClassStr = sig.replace( '/', '.' ).substring( 1, sig.length() - 1 );
if ( _class == null )
{
try
{
_class = Thread.currentThread().getContextClassLoader().loadClass( _name );
}
catch ( ClassNotFoundException e )
{
_logger.log( Level.WARNING, "Failure while visitAnnotation. Class could not be loaded.", e );
return null;
}
}
try
{
Class<Annotation> annotationClass =
(Class<Annotation>) getClass().getClassLoader().loadClass( annotationClassStr );
Annotation annotation = _class.getAnnotation( annotationClass );
_annotations.put( annotationClassStr, annotation );
}
catch ( ClassNotFoundException e )
{
e.printStackTrace();
_logger.log( Level.WARNING, "Failure while visitAnnotation. Class could not be loaded.", e );
}
return null;
}
@SuppressWarnings( "unchecked" )
@Override
public void visitEnd()
{
if ( !_ignore && _annotations.size() > 0 && !_annotations.containsKey( "javax.enterprise.inject.Alternative" ) )
{
for ( ScannerFeature listener : _features )
{
listener.found( (Class<Object>) _class, _annotations );
}
}
_name = null;
_class = null;
_ignore = false;
_annotations.clear();
}
}
| logger can be final | scanner/asm/src/main/java/org/nnsoft/guice/autobind/scanner/asm/AnnotationCollector.java | logger can be final | <ide><path>canner/asm/src/main/java/org/nnsoft/guice/autobind/scanner/asm/AnnotationCollector.java
<ide>
<ide> public static final int ASM_FLAGS = ClassReader.SKIP_CODE | ClassReader.SKIP_DEBUG | ClassReader.SKIP_FRAMES;
<ide>
<del> private Logger _logger = Logger.getLogger( AnnotationCollector.class.getName() );
<add> private final Logger _logger = Logger.getLogger( AnnotationCollector.class.getName() );
<ide>
<ide> private String _name;
<ide> |
|
Java | apache-2.0 | 0f1792340cca46d46acb6c9a1487d50f73c124f2 | 0 | gentics/mesh,gentics/mesh,gentics/mesh,gentics/mesh | package com.gentics.mesh.cli;
import static org.junit.Assert.fail;
import java.io.File;
import java.io.IOException;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
import org.apache.commons.io.FileUtils;
import org.junit.Before;
import org.junit.Test;
import com.gentics.mesh.Mesh;
import com.gentics.mesh.test.AbstractIntegrationTest;
public class MeshIntegerationTest extends AbstractIntegrationTest {
@Before
public void cleanup() throws IOException {
new File("mesh.json").delete();
FileUtils.deleteDirectory(new File("data"));
}
@Test
public void testStartup() throws Exception {
long timeout = DEFAULT_TIMEOUT_SECONDS * 20;
final CountDownLatch latch = new CountDownLatch(2);
final Mesh mesh = Mesh.mesh();
mesh.getVertx().eventBus().consumer(Mesh.STARTUP_EVENT_ADDRESS, mh -> {
latch.countDown();
});
mesh.setCustomLoader((vertx) -> {
latch.countDown();
});
new Thread(() -> {
try {
mesh.run();
} catch (Exception e) {
e.printStackTrace();
fail("Error while starting instance: " + e.getMessage());
}
}).start();
if (!latch.await(timeout, TimeUnit.SECONDS)) {
fail("Mesh did not startup on time. Timeout {" + timeout + "} seconds reached.");
}
}
}
| core/src/test/java/com/gentics/mesh/cli/MeshIntegerationTest.java | package com.gentics.mesh.cli;
import static org.junit.Assert.fail;
import java.io.File;
import java.io.IOException;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
import org.apache.commons.io.FileUtils;
import org.junit.Before;
import org.junit.Test;
import com.gentics.mesh.Mesh;
import com.gentics.mesh.test.AbstractIntegrationTest;
public class MeshIntegerationTest extends AbstractIntegrationTest {
@Before
public void cleanup() throws IOException {
new File("mesh.json").delete();
FileUtils.deleteDirectory(new File("data"));
}
@Test
public void testStartup() throws Exception {
long timeout = DEFAULT_TIMEOUT_SECONDS * 6;
final CountDownLatch latch = new CountDownLatch(2);
final Mesh mesh = Mesh.mesh();
mesh.getVertx().eventBus().consumer(Mesh.STARTUP_EVENT_ADDRESS, mh -> {
latch.countDown();
});
mesh.setCustomLoader((vertx) -> {
latch.countDown();
});
new Thread(() -> {
try {
mesh.run();
} catch (Exception e) {
e.printStackTrace();
fail("Error while starting instance: " + e.getMessage());
}
}).start();
if (!latch.await(timeout, TimeUnit.SECONDS)) {
fail("Mesh did not startup on time. Timeout {" + timeout + "} seconds reached.");
}
}
}
| Bump ci timeout
| core/src/test/java/com/gentics/mesh/cli/MeshIntegerationTest.java | Bump ci timeout | <ide><path>ore/src/test/java/com/gentics/mesh/cli/MeshIntegerationTest.java
<ide> @Test
<ide> public void testStartup() throws Exception {
<ide>
<del> long timeout = DEFAULT_TIMEOUT_SECONDS * 6;
<add> long timeout = DEFAULT_TIMEOUT_SECONDS * 20;
<ide> final CountDownLatch latch = new CountDownLatch(2);
<ide> final Mesh mesh = Mesh.mesh();
<ide> mesh.getVertx().eventBus().consumer(Mesh.STARTUP_EVENT_ADDRESS, mh -> { |
|
Java | apache-2.0 | 76335ec4a120efa880767b9e56da4f7c0be96286 | 0 | quarkusio/quarkus,quarkusio/quarkus,quarkusio/quarkus,quarkusio/quarkus,quarkusio/quarkus | package io.quarkus.runtime.configuration;
import java.lang.reflect.Field;
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Optional;
import java.util.OptionalDouble;
import java.util.OptionalInt;
import java.util.OptionalLong;
import java.util.Set;
import java.util.regex.Pattern;
import org.eclipse.microprofile.config.ConfigProvider;
import io.quarkus.runtime.annotations.ConfigGroup;
import io.quarkus.runtime.annotations.ConfigItem;
import io.smallrye.config.SmallRyeConfig;
/**
* Utility class for manually instantiating a config object
* <p>
* This should only be used in specific circumstances, generally when normal start
* has failed and we are attempting to do some form of recovery via hot deployment
* <p>
* TODO: fully implement this as required, at the moment this is mostly to read the HTTP config when startup fails
*/
public class ConfigInstantiator {
private static final Pattern COMMA_PATTERN = Pattern.compile(",");
// certain well-known classname suffixes that we support
private static Set<String> supportedClassNameSuffix;
static {
final Set<String> suffixes = new HashSet<>();
suffixes.add("Config");
suffixes.add("Configuration");
supportedClassNameSuffix = Collections.unmodifiableSet(suffixes);
}
public static void handleObject(Object o) {
final SmallRyeConfig config = (SmallRyeConfig) ConfigProvider.getConfig();
final Class cls = o.getClass();
final String clsNameSuffix = getClassNameSuffix(o);
if (clsNameSuffix == null) {
// unsupported object type
return;
}
final String name = dashify(cls.getSimpleName().substring(0, cls.getSimpleName().length() - clsNameSuffix.length()));
handleObject("quarkus." + name, o, config);
}
private static void handleObject(String prefix, Object o, SmallRyeConfig config) {
try {
final Class cls = o.getClass();
if (!isClassNameSuffixSupported(o)) {
return;
}
for (Field field : cls.getDeclaredFields()) {
ConfigItem configItem = field.getDeclaredAnnotation(ConfigItem.class);
final Class<?> fieldClass = field.getType();
if (configItem == null || fieldClass.isAnnotationPresent(ConfigGroup.class)) {
Object newInstance = fieldClass.getConstructor().newInstance();
field.set(o, newInstance);
handleObject(prefix + "." + dashify(field.getName()), newInstance, config);
} else {
String name = configItem.name();
if (name.equals(ConfigItem.HYPHENATED_ELEMENT_NAME)) {
name = dashify(field.getName());
}
String fullName = prefix + "." + name;
String defaultValue = configItem.defaultValue();
if (defaultValue.equals(ConfigItem.NO_DEFAULT)) {
defaultValue = null;
}
final Type genericType = field.getGenericType();
Optional<?> val;
final boolean fieldIsOptional = fieldClass.equals(Optional.class);
final boolean fieldIsList = fieldClass.equals(List.class);
if (fieldIsOptional) {
Class<?> actualType = (Class<?>) ((ParameterizedType) genericType)
.getActualTypeArguments()[0];
val = config.getOptionalValue(fullName, actualType);
} else if (fieldIsList) {
Class<?> actualType = (Class<?>) ((ParameterizedType) genericType)
.getActualTypeArguments()[0];
val = config.getOptionalValues(fullName, actualType, ArrayList::new);
} else {
val = config.getOptionalValue(fullName, fieldClass);
}
if (val.isPresent()) {
field.set(o, fieldIsOptional ? val : val.get());
} else if (defaultValue != null) {
if (fieldIsList) {
Class<?> listType = (Class<?>) ((ParameterizedType) genericType)
.getActualTypeArguments()[0];
String[] parts = COMMA_PATTERN.split(defaultValue);
List<Object> list = new ArrayList<>();
for (String i : parts) {
list.add(config.convert(i, listType));
}
field.set(o, list);
} else if (fieldIsOptional) {
Class<?> optionalType = (Class<?>) ((ParameterizedType) genericType)
.getActualTypeArguments()[0];
field.set(o, Optional.of(config.convert(defaultValue, optionalType)));
} else {
field.set(o, config.convert(defaultValue, fieldClass));
}
} else if (fieldIsOptional) {
field.set(o, Optional.empty());
} else if (fieldClass.equals(OptionalInt.class)) {
field.set(o, OptionalInt.empty());
} else if (fieldClass.equals(OptionalDouble.class)) {
field.set(o, OptionalDouble.empty());
} else if (fieldClass.equals(OptionalLong.class)) {
field.set(o, OptionalLong.empty());
}
}
}
} catch (Exception e) {
throw new RuntimeException(e);
}
}
// Configuration keys are normally derived from the field names that they are tied to.
// This is done by de-camel-casing the name and then joining the segments with hyphens (-).
// Some examples:
// bindAddress becomes bind-address
// keepAliveTime becomes keep-alive-time
// requestDNSTimeout becomes request-dns-timeout
private static String dashify(String substring) {
final StringBuilder ret = new StringBuilder();
final char[] chars = substring.toCharArray();
for (int i = 0; i < chars.length; i++) {
final char c = chars[i];
if (i != 0 && i != (chars.length - 1) && c >= 'A' && c <= 'Z') {
ret.append('-');
}
ret.append(Character.toLowerCase(c));
}
return ret.toString();
}
private static String getClassNameSuffix(final Object o) {
if (o == null) {
return null;
}
final String klassName = o.getClass().getName();
for (final String supportedSuffix : supportedClassNameSuffix) {
if (klassName.endsWith(supportedSuffix)) {
return supportedSuffix;
}
}
return null;
}
private static boolean isClassNameSuffixSupported(final Object o) {
if (o == null) {
return false;
}
final String klassName = o.getClass().getName();
for (final String supportedSuffix : supportedClassNameSuffix) {
if (klassName.endsWith(supportedSuffix)) {
return true;
}
}
return false;
}
}
| core/runtime/src/main/java/io/quarkus/runtime/configuration/ConfigInstantiator.java | package io.quarkus.runtime.configuration;
import java.lang.reflect.Field;
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.List;
import java.util.Optional;
import java.util.OptionalDouble;
import java.util.OptionalInt;
import java.util.OptionalLong;
import java.util.regex.Pattern;
import org.eclipse.microprofile.config.ConfigProvider;
import io.quarkus.runtime.annotations.ConfigGroup;
import io.quarkus.runtime.annotations.ConfigItem;
import io.smallrye.config.SmallRyeConfig;
/**
* Utility class for manually instantiating a config object
* <p>
* This should only be used in specific circumstances, generally when normal start
* has failed and we are attempting to do some form of recovery via hot deployment
* <p>
* TODO: fully implement this as required, at the moment this is mostly to read the HTTP config when startup fails
*/
public class ConfigInstantiator {
private static final Pattern COMMA_PATTERN = Pattern.compile(",");
public static void handleObject(Object o) {
SmallRyeConfig config = (SmallRyeConfig) ConfigProvider.getConfig();
Class cls = o.getClass();
String name = dashify(cls.getSimpleName().substring(0, cls.getSimpleName().length() - "Config".length()));
handleObject("quarkus." + name, o, config);
}
private static void handleObject(String prefix, Object o, SmallRyeConfig config) {
try {
Class cls = o.getClass();
if (!cls.getName().endsWith("Config") && !cls.getName().endsWith("Configuration")) {
return;
}
for (Field field : cls.getDeclaredFields()) {
ConfigItem configItem = field.getDeclaredAnnotation(ConfigItem.class);
final Class<?> fieldClass = field.getType();
if (configItem == null || fieldClass.isAnnotationPresent(ConfigGroup.class)) {
Object newInstance = fieldClass.getConstructor().newInstance();
field.set(o, newInstance);
handleObject(prefix + "." + dashify(field.getName()), newInstance, config);
} else {
String name = configItem.name();
if (name.equals(ConfigItem.HYPHENATED_ELEMENT_NAME)) {
name = dashify(field.getName());
}
String fullName = prefix + "." + name;
String defaultValue = configItem.defaultValue();
if (defaultValue.equals(ConfigItem.NO_DEFAULT)) {
defaultValue = null;
}
final Type genericType = field.getGenericType();
Optional<?> val;
final boolean fieldIsOptional = fieldClass.equals(Optional.class);
final boolean fieldIsList = fieldClass.equals(List.class);
if (fieldIsOptional) {
Class<?> actualType = (Class<?>) ((ParameterizedType) genericType)
.getActualTypeArguments()[0];
val = config.getOptionalValue(fullName, actualType);
} else if (fieldIsList) {
Class<?> actualType = (Class<?>) ((ParameterizedType) genericType)
.getActualTypeArguments()[0];
val = config.getOptionalValues(fullName, actualType, ArrayList::new);
} else {
val = config.getOptionalValue(fullName, fieldClass);
}
if (val.isPresent()) {
field.set(o, fieldIsOptional ? val : val.get());
} else if (defaultValue != null) {
if (fieldIsList) {
Class<?> listType = (Class<?>) ((ParameterizedType) genericType)
.getActualTypeArguments()[0];
String[] parts = COMMA_PATTERN.split(defaultValue);
List<Object> list = new ArrayList<>();
for (String i : parts) {
list.add(config.convert(i, listType));
}
field.set(o, list);
} else if (fieldIsOptional) {
Class<?> optionalType = (Class<?>) ((ParameterizedType) genericType)
.getActualTypeArguments()[0];
field.set(o, Optional.of(config.convert(defaultValue, optionalType)));
} else {
field.set(o, config.convert(defaultValue, fieldClass));
}
} else if (fieldIsOptional) {
field.set(o, Optional.empty());
} else if (fieldClass.equals(OptionalInt.class)) {
field.set(o, OptionalInt.empty());
} else if (fieldClass.equals(OptionalDouble.class)) {
field.set(o, OptionalDouble.empty());
} else if (fieldClass.equals(OptionalLong.class)) {
field.set(o, OptionalLong.empty());
}
}
}
} catch (Exception e) {
throw new RuntimeException(e);
}
}
private static String dashify(String substring) {
StringBuilder ret = new StringBuilder();
for (char i : substring.toCharArray()) {
if (i >= 'A' && i <= 'Z') {
ret.append('-');
}
ret.append(Character.toLowerCase(i));
}
return ret.toString();
}
}
| Fix config instantiation to account for both "Config" and "Configuration" class name suffixes
| core/runtime/src/main/java/io/quarkus/runtime/configuration/ConfigInstantiator.java | Fix config instantiation to account for both "Config" and "Configuration" class name suffixes | <ide><path>ore/runtime/src/main/java/io/quarkus/runtime/configuration/ConfigInstantiator.java
<ide> import java.lang.reflect.ParameterizedType;
<ide> import java.lang.reflect.Type;
<ide> import java.util.ArrayList;
<add>import java.util.Collections;
<add>import java.util.HashSet;
<ide> import java.util.List;
<ide> import java.util.Optional;
<ide> import java.util.OptionalDouble;
<ide> import java.util.OptionalInt;
<ide> import java.util.OptionalLong;
<add>import java.util.Set;
<ide> import java.util.regex.Pattern;
<ide>
<ide> import org.eclipse.microprofile.config.ConfigProvider;
<ide> public class ConfigInstantiator {
<ide>
<ide> private static final Pattern COMMA_PATTERN = Pattern.compile(",");
<add> // certain well-known classname suffixes that we support
<add> private static Set<String> supportedClassNameSuffix;
<add>
<add> static {
<add> final Set<String> suffixes = new HashSet<>();
<add> suffixes.add("Config");
<add> suffixes.add("Configuration");
<add> supportedClassNameSuffix = Collections.unmodifiableSet(suffixes);
<add> }
<ide>
<ide> public static void handleObject(Object o) {
<del> SmallRyeConfig config = (SmallRyeConfig) ConfigProvider.getConfig();
<del> Class cls = o.getClass();
<del> String name = dashify(cls.getSimpleName().substring(0, cls.getSimpleName().length() - "Config".length()));
<add> final SmallRyeConfig config = (SmallRyeConfig) ConfigProvider.getConfig();
<add> final Class cls = o.getClass();
<add> final String clsNameSuffix = getClassNameSuffix(o);
<add> if (clsNameSuffix == null) {
<add> // unsupported object type
<add> return;
<add> }
<add> final String name = dashify(cls.getSimpleName().substring(0, cls.getSimpleName().length() - clsNameSuffix.length()));
<ide> handleObject("quarkus." + name, o, config);
<ide> }
<ide>
<ide> private static void handleObject(String prefix, Object o, SmallRyeConfig config) {
<ide>
<ide> try {
<del> Class cls = o.getClass();
<del> if (!cls.getName().endsWith("Config") && !cls.getName().endsWith("Configuration")) {
<add> final Class cls = o.getClass();
<add> if (!isClassNameSuffixSupported(o)) {
<ide> return;
<ide> }
<ide> for (Field field : cls.getDeclaredFields()) {
<ide> }
<ide> }
<ide>
<add> // Configuration keys are normally derived from the field names that they are tied to.
<add> // This is done by de-camel-casing the name and then joining the segments with hyphens (-).
<add> // Some examples:
<add> // bindAddress becomes bind-address
<add> // keepAliveTime becomes keep-alive-time
<add> // requestDNSTimeout becomes request-dns-timeout
<ide> private static String dashify(String substring) {
<del> StringBuilder ret = new StringBuilder();
<del> for (char i : substring.toCharArray()) {
<del> if (i >= 'A' && i <= 'Z') {
<add> final StringBuilder ret = new StringBuilder();
<add> final char[] chars = substring.toCharArray();
<add> for (int i = 0; i < chars.length; i++) {
<add> final char c = chars[i];
<add> if (i != 0 && i != (chars.length - 1) && c >= 'A' && c <= 'Z') {
<ide> ret.append('-');
<ide> }
<del> ret.append(Character.toLowerCase(i));
<add> ret.append(Character.toLowerCase(c));
<ide> }
<ide> return ret.toString();
<ide> }
<add>
<add> private static String getClassNameSuffix(final Object o) {
<add> if (o == null) {
<add> return null;
<add> }
<add> final String klassName = o.getClass().getName();
<add> for (final String supportedSuffix : supportedClassNameSuffix) {
<add> if (klassName.endsWith(supportedSuffix)) {
<add> return supportedSuffix;
<add> }
<add> }
<add> return null;
<add> }
<add>
<add> private static boolean isClassNameSuffixSupported(final Object o) {
<add> if (o == null) {
<add> return false;
<add> }
<add> final String klassName = o.getClass().getName();
<add> for (final String supportedSuffix : supportedClassNameSuffix) {
<add> if (klassName.endsWith(supportedSuffix)) {
<add> return true;
<add> }
<add> }
<add> return false;
<add> }
<ide> } |
|
Java | epl-1.0 | 08f38df37dad5c3a6ad64842566780c7cc04cd0d | 0 | uci-sdcl/lighthouse,uci-sdcl/lighthouse | package edu.uci.lighthouse.model;
import java.io.Serializable;
import java.security.NoSuchAlgorithmException;
import java.util.Date;
import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToOne;
import javax.persistence.Temporal;
import org.apache.log4j.Logger;
import edu.uci.lighthouse.model.util.LHStringUtil;
/**
* Select new events by using the timestamp and NOT Author
* */
@NamedQueries ({
//Lee
//@NamedQuery(name = "LighthouseEvent.findByTimestampAndAuthor",
@NamedQuery(name = "LighthouseEvent.findByTimestamp",
query = "SELECT event " +
"FROM LighthouseEvent event " +
"WHERE ( event.timestamp > :timestamp " +
"OR event.committedTime > :timestamp ) " +
"AND event.author <> :author"),
//Lee: Kyle was using this but it was actually creating
//an exception. PullModel line 66 tries to pass an argument
//for author but there is no author parameter in this query!
/*
/@NamedQuery(name = "LighthouseEvent.findByTimestamp",
query = "SELECT event " +
"FROM LighthouseEvent event " +
"WHERE ( event.timestamp > :timestamp " +
"OR event.committedTime > :timestamp )")*/
})
/**
* Represents a event (ADD, REMOVE, MODIFY) generated by a developer.
*/
@Entity
public class LighthouseEvent implements Serializable{
private static final long serialVersionUID = 7247791395122774431L;
private static Logger logger = Logger.getLogger(LighthouseEvent.class);
@Id /** hash, combination of author+type+artifact*/
private String id = "";
/** User that generates the event. */
@OneToOne(cascade = CascadeType.ALL)
private LighthouseAuthor author;
@Temporal(javax.persistence.TemporalType.TIMESTAMP)
private Date timestamp = new Date(0);
@OneToOne(cascade = CascadeType.ALL)
private LighthouseEntity entity = null;
@OneToOne(cascade = CascadeType.ALL)
private LighthouseRelationship relationship = null;
private boolean isCommitted = false;
@Temporal(javax.persistence.TemporalType.TIMESTAMP)
private Date committedTime = new Date(0);
public static enum TYPE {
ADD, REMOVE, MODIFY, CUSTOM
}
private TYPE type;
protected LighthouseEvent() {
}
/**
* Create an event
*
* @param type
* Event Type
*
* @param author
* User that generates the Event
*
* @param artifact
* {@link LighthouseEntity}
* OR
* {@link LighthouseRelationship}
* */
public LighthouseEvent(TYPE type, LighthouseAuthor author, Object artifact) {
this.author = author;
this.type = type;
this.setArtifact(artifact);
try {
String hashStringId = author.toString()+type+artifact;
this.id = LHStringUtil.getMD5Hash(hashStringId);
} catch (NoSuchAlgorithmException e) {
logger.error(e,e);
}
}
public String getId() {
return id;
}
protected void setId(String id) {
this.id = id;
}
public LighthouseAuthor getAuthor() {
return author;
}
protected void setAuthor(LighthouseAuthor author) {
this.author = author;
}
public Date getTimestamp() {
return timestamp;
}
public void setTimestamp(Date timestamp) {
this.timestamp = timestamp;
}
public LighthouseEntity getEntity() {
return entity;
}
protected void setEntity(LighthouseEntity entity) {
this.entity = entity;
}
public LighthouseRelationship getRelationship() {
return relationship;
}
protected void setRelationship(LighthouseRelationship relationship) {
this.relationship = relationship;
}
public boolean isCommitted() {
return isCommitted;
}
public void setCommitted(boolean isCommitted) {
this.isCommitted = isCommitted;
}
public Date getCommittedTime() {
return committedTime;
}
public void setCommittedTime(Date committedTime) {
this.committedTime = committedTime;
}
public TYPE getType() {
return type;
}
protected void setType(TYPE type) {
this.type = type;
}
/**
* Get the Artifact (Entity or Relationship) related with this event
*
* @return
* {@link LighthouseEntity}
* OR
* {@link LighthouseRelationship}
* */
public Object getArtifact() {
if (entity == null && relationship == null) {
logger.error(this.toString() + " has a NULL artifact");
return null;
} else if (entity != null) {
return entity;
} else {
return relationship;
}
}
/**
* Set the Artifact (Entity or Relationship) related with this event
*
* @param obj
* {@link LighthouseEntity}
* OR
* {@link LighthouseRelationship}
* */
protected void setArtifact(Object obj) {
if (obj instanceof LighthouseEntity) {
if (relationship == null) {
this.entity = (LighthouseEntity) obj;
}
} else if (obj instanceof LighthouseRelationship) {
if (entity == null) {
this.relationship = (LighthouseRelationship) obj;
}
}
}
@Override
public String toString() {
return
"LighthouseEvent ["
+ "getArtifact()=" + getArtifact()
+ ", type=" + type
+ ", timestamp=" + timestamp
+ ", committedTime=" + committedTime
+ ", isCommitted=" + isCommitted
+ ", author=" + author
+ "]";
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((id == null) ? 0 : id.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
LighthouseEvent other = (LighthouseEvent) obj;
if (id == null) {
if (other.id != null)
return false;
} else if (!id.equals(other.id))
return false;
return true;
}
}
| LighthouseModel/src/edu/uci/lighthouse/model/LighthouseEvent.java | package edu.uci.lighthouse.model;
import java.io.Serializable;
import java.security.NoSuchAlgorithmException;
import java.util.Date;
import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToOne;
import javax.persistence.Temporal;
import org.apache.log4j.Logger;
import edu.uci.lighthouse.model.util.LHStringUtil;
/**
* Select new events by using the timestamp and NOT Author
* */
@NamedQueries ({
@NamedQuery(name = "LighthouseEvent.findByTimestampAndAuthor",
query = "SELECT event " +
"FROM LighthouseEvent event " +
"WHERE ( event.timestamp > :timestamp " +
"OR event.committedTime > :timestamp ) " +
"AND event.author <> :author"),
@NamedQuery(name = "LighthouseEvent.findByTimestamp",
query = "SELECT event " +
"FROM LighthouseEvent event " +
"WHERE ( event.timestamp > :timestamp " +
"OR event.committedTime > :timestamp )")
})
/**
* Represents a event (ADD, REMOVE, MODIFY) generated by a developer.
*/
@Entity
public class LighthouseEvent implements Serializable{
private static final long serialVersionUID = 7247791395122774431L;
private static Logger logger = Logger.getLogger(LighthouseEvent.class);
@Id /** hash, combination of author+type+artifact*/
private String id = "";
/** User that generates the event. */
@OneToOne(cascade = CascadeType.ALL)
private LighthouseAuthor author;
@Temporal(javax.persistence.TemporalType.TIMESTAMP)
private Date timestamp = new Date(0);
@OneToOne(cascade = CascadeType.ALL)
private LighthouseEntity entity = null;
@OneToOne(cascade = CascadeType.ALL)
private LighthouseRelationship relationship = null;
private boolean isCommitted = false;
@Temporal(javax.persistence.TemporalType.TIMESTAMP)
private Date committedTime = new Date(0);
public static enum TYPE {
ADD, REMOVE, MODIFY, CUSTOM
}
private TYPE type;
protected LighthouseEvent() {
}
/**
* Create an event
*
* @param type
* Event Type
*
* @param author
* User that generates the Event
*
* @param artifact
* {@link LighthouseEntity}
* OR
* {@link LighthouseRelationship}
* */
public LighthouseEvent(TYPE type, LighthouseAuthor author, Object artifact) {
this.author = author;
this.type = type;
this.setArtifact(artifact);
try {
String hashStringId = author.toString()+type+artifact;
this.id = LHStringUtil.getMD5Hash(hashStringId);
} catch (NoSuchAlgorithmException e) {
logger.error(e,e);
}
}
public String getId() {
return id;
}
protected void setId(String id) {
this.id = id;
}
public LighthouseAuthor getAuthor() {
return author;
}
protected void setAuthor(LighthouseAuthor author) {
this.author = author;
}
public Date getTimestamp() {
return timestamp;
}
public void setTimestamp(Date timestamp) {
this.timestamp = timestamp;
}
public LighthouseEntity getEntity() {
return entity;
}
protected void setEntity(LighthouseEntity entity) {
this.entity = entity;
}
public LighthouseRelationship getRelationship() {
return relationship;
}
protected void setRelationship(LighthouseRelationship relationship) {
this.relationship = relationship;
}
public boolean isCommitted() {
return isCommitted;
}
public void setCommitted(boolean isCommitted) {
this.isCommitted = isCommitted;
}
public Date getCommittedTime() {
return committedTime;
}
public void setCommittedTime(Date committedTime) {
this.committedTime = committedTime;
}
public TYPE getType() {
return type;
}
protected void setType(TYPE type) {
this.type = type;
}
/**
* Get the Artifact (Entity or Relationship) related with this event
*
* @return
* {@link LighthouseEntity}
* OR
* {@link LighthouseRelationship}
* */
public Object getArtifact() {
if (entity == null && relationship == null) {
logger.error(this.toString() + " has a NULL artifact");
return null;
} else if (entity != null) {
return entity;
} else {
return relationship;
}
}
/**
* Set the Artifact (Entity or Relationship) related with this event
*
* @param obj
* {@link LighthouseEntity}
* OR
* {@link LighthouseRelationship}
* */
protected void setArtifact(Object obj) {
if (obj instanceof LighthouseEntity) {
if (relationship == null) {
this.entity = (LighthouseEntity) obj;
}
} else if (obj instanceof LighthouseRelationship) {
if (entity == null) {
this.relationship = (LighthouseRelationship) obj;
}
}
}
@Override
public String toString() {
return
"LighthouseEvent ["
+ "getArtifact()=" + getArtifact()
+ ", type=" + type
+ ", timestamp=" + timestamp
+ ", committedTime=" + committedTime
+ ", isCommitted=" + isCommitted
+ ", author=" + author
+ "]";
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((id == null) ? 0 : id.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
LighthouseEvent other = (LighthouseEvent) obj;
if (id == null) {
if (other.id != null)
return false;
} else if (!id.equals(other.id))
return false;
return true;
}
}
| A named query (LighthouseEvent.findByTimestamp) was rewritten in the LighthouseEvent class and it dropped the parameter "author" (the history says it was for a student named Kyle).
This created an exception because the method, executeNamedQuery, in class PullModel (line 68) was trying to pass an argument to the parameter authur, but there was not one.
This was resolved by changing the query in the named query (LighthouseEvent.findByTimestamp) to its previously defined query. The demo now works.
| LighthouseModel/src/edu/uci/lighthouse/model/LighthouseEvent.java | A named query (LighthouseEvent.findByTimestamp) was rewritten in the LighthouseEvent class and it dropped the parameter "author" (the history says it was for a student named Kyle). This created an exception because the method, executeNamedQuery, in class PullModel (line 68) was trying to pass an argument to the parameter authur, but there was not one. This was resolved by changing the query in the named query (LighthouseEvent.findByTimestamp) to its previously defined query. The demo now works. | <ide><path>ighthouseModel/src/edu/uci/lighthouse/model/LighthouseEvent.java
<ide> * Select new events by using the timestamp and NOT Author
<ide> * */
<ide> @NamedQueries ({
<del> @NamedQuery(name = "LighthouseEvent.findByTimestampAndAuthor",
<add> //Lee
<add> //@NamedQuery(name = "LighthouseEvent.findByTimestampAndAuthor",
<add> @NamedQuery(name = "LighthouseEvent.findByTimestamp",
<ide> query = "SELECT event " +
<ide> "FROM LighthouseEvent event " +
<ide> "WHERE ( event.timestamp > :timestamp " +
<ide> "OR event.committedTime > :timestamp ) " +
<ide> "AND event.author <> :author"),
<ide>
<del> @NamedQuery(name = "LighthouseEvent.findByTimestamp",
<add> //Lee: Kyle was using this but it was actually creating
<add> //an exception. PullModel line 66 tries to pass an argument
<add> //for author but there is no author parameter in this query!
<add>/*
<add> /@NamedQuery(name = "LighthouseEvent.findByTimestamp",
<ide> query = "SELECT event " +
<ide> "FROM LighthouseEvent event " +
<ide> "WHERE ( event.timestamp > :timestamp " +
<del> "OR event.committedTime > :timestamp )")
<add> "OR event.committedTime > :timestamp )")*/
<ide> })
<ide>
<ide> |
|
Java | mit | e8d0fef04ea120d9fd297cc4b4295bcebcd7e724 | 0 | xemime-lang/xemime,xemime-lang/xemime | package net.zero918nobita.Xemime;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.TreeMap;
/**
* エントリーポイント
* @author Kodai Matsumoto
*/
public class Main {
/** 構文解析器 */
private static Parser parser;
/** グローバル環境 */
static X_Default defaultObj = new X_Default();
/** 実体テーブル */
private static TreeMap<X_Address, X_Code> entities = new TreeMap<X_Address, X_Code>() {{
put(new X_Address(0,0), X_Bool.T);
}};
/** ローカル変数のフレーム */
static Frame frame = new Frame();
/** 仮想メモリモニタ */
private static VirtualMemoryMonitor vmm = null;
/** 仮想メモリモニタ実行用スレッド */
private static Thread vmmThread = null;
/**
* ローカル変数のフレームを追加します。
* @param table フレーム
*/
static void loadLocalFrame(X_Handler table) {
frame.loadLocalFrame(table);
}
/** 最後に追加したフレームを破棄します。 */
static void unloadLocalFrame() {
frame.unloadLocalFrame();
}
/**
* 指定したシンボルがすでに変数テーブルに記録されているかを調べます。
* @param sym シンボル
* @return 記録されていれば true 、そうでなければ false
*/
static boolean hasSymbol(X_Symbol sym) {
return frame.hasSymbol(sym) || defaultObj.hasMember(sym);
}
/**
* シンボルの参照先アドレスを取得します。
* @param sym シンボル
* @return 参照
*/
static X_Address getAddressOfSymbol(X_Symbol sym) throws Exception {
return (frame.hasSymbol(sym)) ?
frame.getAddressOfSymbol(sym) :
(X_Address) defaultObj.getMember(sym);
}
/**
* シンボルの値を取得します。
* @param sym シンボル
* @return 値
*/
static X_Code getValueOfSymbol(X_Symbol sym) throws Exception {
if (frame.hasSymbol(sym)) {
return frame.getValueOfSymbol(sym);
} else {
return (defaultObj.hasMember(sym)) ?
defaultObj.message(0, sym) : null;
}
}
/**
* 参照先の実体を取得します。
* @param address アドレス
* @return 実体
*/
static X_Code getValueOfReference(X_Address address) {
return entities.get(address);
}
/**
* シンボルに参照をセットします。
* @param sym シンボル
* @param ref 参照
*/
static void setAddress(X_Symbol sym, X_Address ref) throws Exception {
if (frame.hasSymbol(sym)) { frame.setAddress(sym, ref); return; }
if (!defaultObj.hasMember(sym)) throw new Exception(parser.getLocation() + ": 変数 `" + sym.getName() + "` は宣言されていません");
defaultObj.setMember(sym, ref);
}
/**
* 宣言済みの変数に値をセットします。
* @param sym シンボル
* @param obj 値
* @throws Exception 変数が宣言されていなかった場合に例外を発生させます。
*/
static void setValue(X_Symbol sym, X_Code obj) throws Exception {
if (frame.hasSymbol(sym)) { frame.setValue(sym, obj); return; }
X_Address ref = register(obj);
if (!defaultObj.hasMember(sym)) throw new Exception(parser.getLocation() + ": 変数 `" + sym.getName() + "` は宣言されていません");
defaultObj.setMember(sym, ref);
}
/**
* 変数を参照で宣言します。
* @param sym 変数
* @param ref 参照
*/
static void defAddress(X_Symbol sym, X_Address ref) throws Exception {
if (frame.numberOfLayers() != 0) { frame.defAddress(sym, ref); return; }
defaultObj.setMember(sym, ref);
}
/**
* 変数を値で宣言します。
* @param sym 変数
* @param obj 値
*/
static void defValue(X_Symbol sym, X_Code obj) throws Exception {
if (frame.numberOfLayers() != 0) { frame.defValue(sym, obj); return; }
X_Address ref = register(obj);
defaultObj.setMember(sym, ref);
}
/**
* 指定した実体を実体テーブルに追加し、そのテーブル上での位置を記録した X_Address インスタンスを返します。
* @param obj 追加する実体
* @return 実体テーブル上の、追加された実体の位置を記録した X_Address インスタンス
*/
static X_Address register(X_Code obj) {
entities.put(new X_Address(0,entities.lastKey().getAddress() + 1), obj);
return new X_Address(0, entities.lastKey().getAddress());
}
/**
* Xemime インタプリタにおいて最初に呼び出され、
* コマンドライン引数によって実行モード(対話的実行 or ソースファイル実行)を設定し、
* 実際にパーサも読み込んで解釈と実行を開始します。<br>
* -debug オプションが設定されていた場合、仮想メモリモニタを別スレッドで起動します。
* @param args コマンドライン引数
*/
public static void main(String[] args) {
boolean debug = Arrays.asList(args).contains("-debug");
if ((debug && args.length >= 3) || (!debug && args.length >= 2)) {
usage();
System.out.println(System.lineSeparator() + "Usage: java -jar Xemime.jar [source file name]");
return;
}
if (debug) {
vmm = new VirtualMemoryMonitor();
vmmThread = new Thread(vmm);
vmmThread.start();
}
defaultObj.setMember(X_Symbol.intern(0, "this"), defaultObj);
defaultObj.setMember(X_Symbol.intern(0, "THIS"), defaultObj);
defaultObj.setMember(X_Symbol.intern(0, "Default"), defaultObj);
defaultObj.setMember(X_Symbol.intern(0, "Core"), register(new X_Core()));
defaultObj.setMember(X_Symbol.intern(0, "Object"), register(new X_Object()));
try {
parser = new Parser();
BufferedReader in;
if ((debug && args.length == 1) || (!debug && args.length == 0)) {
usage();
in = new BufferedReader(new InputStreamReader(System.in));
System.out.print(System.lineSeparator() + "[1]> ");
String line;
while (true) {
line = in.readLine();
if (line != null && !line.equals("")) {
ArrayList<X_Code> result = parser.parse(line);
for (X_Code c : result) System.out.println(c.run());
System.out.print("[" + (parser.getLocation() + 1) + "]> ");
parser.goDown(1);
} else if (line == null) {
break;
}
}
} else {
in = new BufferedReader(new FileReader(args[0]));
StringBuilder stringBuilder = new StringBuilder();
String line;
while ((line = in.readLine()) != null) {
stringBuilder.append(line);
stringBuilder.append('\n');
}
ArrayList<X_Code> result = parser.parse(stringBuilder.toString());
for (X_Code c : result) c.run();
}
in.close();
} catch(Exception e) {
e.printStackTrace();
}
}
/**
* ロゴとバージョン情報を出力します。
*/
private static void usage() {
System.out.println(" _ __ _ \n" +
" | |/ /__ ____ ___ (_)___ ___ ___ \n" +
" | / _ \\/ __ `__ \\/ / __ `__ \\/ _ \\\n" +
" / / __/ / / / / / / / / / / / __/\n" +
"/_/|_\\___/_/ /_/ /_/_/_/ /_/ /_/\\___/ \n\n" +
"Xemime Version 1.0.0 2017-08-07");
}
/**
* Object 組み込みオブジェクト<br>
* オブジェクト生成、クローン処理を担うメソッドを実装した最も基本的なオブジェクトです。<br>
* これをクローンして新たなオブジェクトを用意することを推奨しています。
*/
private static class X_Object extends X_Handler {
X_Object() {
super(0);
setMember(X_Symbol.intern(0, "clone"), new X_Clone());
}
/**
* Object.clone メソッド<br>
* clone メソッドのみを実装した、最も単純なオブジェクトを生成してその参照を返します。
*/
private static class X_Clone extends X_Native {
X_Clone() {
super(0, 0);
}
@Override
protected X_Address exec(ArrayList<X_Code> params, X_Address self) throws Exception {
return Main.register(params.get(0).run());
}
}
}
/**
* Core 組み込みオブジェクト<br>
* 条件分岐や、繰り返し、入出力、インタプリタの終了処理などを担うメソッドを実装した組み込みオブジェクトです。
*/
private static class X_Core extends X_Handler {
X_Core() {
super(0);
setMember(X_Symbol.intern(0, "if"), new X_If());
setMember(X_Symbol.intern(0, "print"), new X_Print());
setMember(X_Symbol.intern(0, "println"), new X_Println());
setMember(X_Symbol.intern(0, "exit"), new X_Exit());
}
/**
* Core.exit メソッド<br>
* Xemime インタプリタを終了します。
*/
private static class X_Exit extends X_Native {
X_Exit() {
super(0, 0);
}
@Override
protected X_Code exec(ArrayList<X_Code> params, X_Address self) throws Exception {
System.exit(0);
return new X_Int(0, 0);
}
}
/**
* Core.print メソッド<br>
* 1つの引数を受け取り、それを文字列化して標準出力に出力します。
*/
private static class X_Print extends X_Native {
X_Print() {
super(0, 1);
}
@Override
protected X_Code exec(ArrayList<X_Code> params, X_Address self) throws Exception {
X_Code o = params.get(1).run();
System.out.print(o);
return o;
}
}
/**
* Core.println メソッド<br>
* 1つの引数を受け取り、それを文字列化し末尾に改行コードを付与して標準出力に出力します。
*/
private static class X_Println extends X_Native {
X_Println() {
super(0, 1);
}
@Override
protected X_Code exec(ArrayList<X_Code> params, X_Address self) throws Exception {
X_Code o = params.get(1).run();
System.out.println(o);
return o;
}
}
/**
* Core.if メソッド<br>
* 条件式と2つの引数を受け取り、条件式を評価してNIL以外となった場合は2つ目の引数を、
* NILとなった場合は3つ目の引数を評価して返します。
*/
private static class X_If extends X_Native {
X_If(){
super(0, 3);
}
@Override
protected X_Code exec(ArrayList<X_Code> params, X_Address self) throws Exception {
return (params.get(1).run().equals(X_Bool.Nil)) ? params.get(3).run() : params.get(2).run();
}
}
}
}
| src/main/java/net/zero918nobita/Xemime/Main.java | package net.zero918nobita.Xemime;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.TreeMap;
/**
* エントリーポイント
* @author Kodai Matsumoto
*/
public class Main {
private static VirtualMemoryMonitor vmm = null;
private static Thread vmmThread = null;
private static Parser parser;
static X_Default defaultObj = new X_Default();
private static TreeMap<X_Address, X_Code> entities = new TreeMap<X_Address, X_Code>() {{
put(new X_Address(0,0), X_Bool.T);
}};
static Frame frame = new Frame();
static void loadLocalFrame(X_Handler table) {
frame.loadLocalFrame(table);
}
static void unloadLocalFrame() {
frame.unloadLocalFrame();
}
static boolean hasSymbol(X_Symbol sym) {
return frame.hasSymbol(sym) || defaultObj.hasMember(sym);
}
/**
* シンボルの参照先アドレスを取得する
* @param sym シンボル
* @return 参照
*/
static X_Address getAddressOfSymbol(X_Symbol sym) throws Exception {
return (frame.hasSymbol(sym)) ?
frame.getAddressOfSymbol(sym) :
(X_Address) defaultObj.getMember(sym);
}
/**
* シンボルの値を取得する
* @param sym シンボル
* @return 値
*/
static X_Code getValueOfSymbol(X_Symbol sym) throws Exception {
if (frame.hasSymbol(sym)) {
return frame.getValueOfSymbol(sym);
} else {
return (defaultObj.hasMember(sym)) ?
defaultObj.message(0, sym) : null;
}
}
/**
* 参照先の実体を取得する
* @param address アドレス
* @return 実体
*/
static X_Code getValueOfReference(X_Address address) {
return entities.get(address);
}
/**
* シンボルに参照をセットする
* @param sym シンボル
* @param ref 参照
*/
static void setAddress(X_Symbol sym, X_Address ref) throws Exception {
if (frame.hasSymbol(sym)) { frame.setAddress(sym, ref); return; }
if (!defaultObj.hasMember(sym)) throw new Exception(parser.getLocation() + ": 変数 `" + sym.getName() + "` は宣言されていません");
defaultObj.setMember(sym, ref);
}
/**
* 宣言済みの変数に値をセットします。
* @param sym シンボル
* @param obj 値
* @throws Exception 変数が宣言されていなかった場合に例外を発生させます。
*/
static void setValue(X_Symbol sym, X_Code obj) throws Exception {
if (frame.hasSymbol(sym)) { frame.setValue(sym, obj); return; }
X_Address ref = register(obj);
if (!defaultObj.hasMember(sym)) throw new Exception(parser.getLocation() + ": 変数 `" + sym.getName() + "` は宣言されていません");
defaultObj.setMember(sym, ref);
}
/**
* 変数を参照で宣言します。
* @param sym 変数
* @param ref 参照
*/
static void defAddress(X_Symbol sym, X_Address ref) throws Exception {
if (frame.numberOfLayers() != 0) { frame.defAddress(sym, ref); return; }
defaultObj.setMember(sym, ref);
}
/**
* 変数を値で宣言します。
* @param sym 変数
* @param obj 値
*/
static void defValue(X_Symbol sym, X_Code obj) throws Exception {
if (frame.numberOfLayers() != 0) { frame.defValue(sym, obj); return; }
X_Address ref = register(obj);
defaultObj.setMember(sym, ref);
}
static X_Address register(X_Code obj) {
entities.put(new X_Address(0,entities.lastKey().getAddress() + 1), obj);
return new X_Address(0, entities.lastKey().getAddress());
}
public static void main(String[] args) {
boolean debug = Arrays.asList(args).contains("-debug");
if ((debug && args.length >= 3) || (!debug && args.length >= 2)) {
usage();
System.out.println(System.lineSeparator() + "Usage: java -jar Xemime.jar [source file name]");
return;
}
if (debug) {
vmm = new VirtualMemoryMonitor();
vmmThread = new Thread(vmm);
vmmThread.start();
}
defaultObj.setMember(X_Symbol.intern(0, "this"), defaultObj);
defaultObj.setMember(X_Symbol.intern(0, "THIS"), defaultObj);
defaultObj.setMember(X_Symbol.intern(0, "Default"), defaultObj);
defaultObj.setMember(X_Symbol.intern(0, "Core"), register(new X_Core()));
defaultObj.setMember(X_Symbol.intern(0, "Object"), register(new X_Object()));
try {
parser = new Parser();
BufferedReader in;
if ((debug && args.length == 1) || (!debug && args.length == 0)) {
usage();
in = new BufferedReader(new InputStreamReader(System.in));
System.out.print(System.lineSeparator() + "[1]> ");
String line;
while (true) {
line = in.readLine();
if (line != null && !line.equals("")) {
ArrayList<X_Code> result = parser.parse(line);
for (X_Code c : result) System.out.println(c.run());
System.out.print("[" + (parser.getLocation() + 1) + "]> ");
parser.goDown(1);
} else if (line == null) {
break;
}
}
} else {
in = new BufferedReader(new FileReader(args[0]));
StringBuilder stringBuilder = new StringBuilder();
String line;
while ((line = in.readLine()) != null) {
stringBuilder.append(line);
stringBuilder.append('\n');
}
ArrayList<X_Code> result = parser.parse(stringBuilder.toString());
for (X_Code c : result) c.run();
}
in.close();
} catch(Exception e) {
e.printStackTrace();
}
}
private static void usage() {
System.out.println(" _ __ _ \n" +
" | |/ /__ ____ ___ (_)___ ___ ___ \n" +
" | / _ \\/ __ `__ \\/ / __ `__ \\/ _ \\\n" +
" / / __/ / / / / / / / / / / / __/\n" +
"/_/|_\\___/_/ /_/ /_/_/_/ /_/ /_/\\___/ \n\n" +
"Xemime Version 1.0.0 2017-08-07");
}
private static class X_Object extends X_Handler {
X_Object() {
super(0);
setMember(X_Symbol.intern(0, "clone"), new X_Clone());
}
private static class X_Clone extends X_Native {
X_Clone() {
super(0, 0);
}
@Override
protected X_Address exec(ArrayList<X_Code> params, X_Address self) throws Exception {
return Main.register(params.get(0).run());
}
}
}
private static class X_Core extends X_Handler {
X_Core() {
super(0);
setMember(X_Symbol.intern(0, "if"), new X_If());
setMember(X_Symbol.intern(0, "print"), new X_Print());
setMember(X_Symbol.intern(0, "println"), new X_Println());
setMember(X_Symbol.intern(0, "exit"), new X_Exit());
}
private static class X_Exit extends X_Native {
X_Exit() {
super(0, 0);
}
@Override
protected X_Code exec(ArrayList<X_Code> params, X_Address self) throws Exception {
System.exit(0);
return new X_Int(0, 0);
}
}
private static class X_Print extends X_Native {
X_Print() {
super(0, 1);
}
@Override
protected X_Code exec(ArrayList<X_Code> params, X_Address self) throws Exception {
X_Code o = params.get(1).run();
System.out.print(o);
return o;
}
}
private static class X_Println extends X_Native {
X_Println() {
super(0, 1);
}
@Override
protected X_Code exec(ArrayList<X_Code> params, X_Address self) throws Exception {
X_Code o = params.get(1).run();
System.out.println(o);
return o;
}
}
private static class X_If extends X_Native {
X_If(){
super(0, 3);
}
@Override
protected X_Code exec(ArrayList<X_Code> params, X_Address self) throws Exception {
return (params.get(1).run().equals(X_Bool.Nil)) ? params.get(3).run() : params.get(2).run();
}
}
}
}
| Improve readability
| src/main/java/net/zero918nobita/Xemime/Main.java | Improve readability | <ide><path>rc/main/java/net/zero918nobita/Xemime/Main.java
<ide> import java.io.InputStreamReader;
<ide> import java.util.ArrayList;
<ide> import java.util.Arrays;
<del>import java.util.HashMap;
<ide> import java.util.TreeMap;
<ide>
<ide> /**
<ide> */
<ide>
<ide> public class Main {
<del> private static VirtualMemoryMonitor vmm = null;
<del> private static Thread vmmThread = null;
<add>
<add> /** 構文解析器 */
<ide> private static Parser parser;
<add>
<add> /** グローバル環境 */
<ide> static X_Default defaultObj = new X_Default();
<add>
<add> /** 実体テーブル */
<ide> private static TreeMap<X_Address, X_Code> entities = new TreeMap<X_Address, X_Code>() {{
<ide> put(new X_Address(0,0), X_Bool.T);
<ide> }};
<add>
<add> /** ローカル変数のフレーム */
<ide> static Frame frame = new Frame();
<ide>
<add> /** 仮想メモリモニタ */
<add> private static VirtualMemoryMonitor vmm = null;
<add>
<add> /** 仮想メモリモニタ実行用スレッド */
<add> private static Thread vmmThread = null;
<add>
<add> /**
<add> * ローカル変数のフレームを追加します。
<add> * @param table フレーム
<add> */
<ide> static void loadLocalFrame(X_Handler table) {
<ide> frame.loadLocalFrame(table);
<ide> }
<ide>
<add> /** 最後に追加したフレームを破棄します。 */
<ide> static void unloadLocalFrame() {
<ide> frame.unloadLocalFrame();
<ide> }
<ide>
<add> /**
<add> * 指定したシンボルがすでに変数テーブルに記録されているかを調べます。
<add> * @param sym シンボル
<add> * @return 記録されていれば true 、そうでなければ false
<add> */
<ide> static boolean hasSymbol(X_Symbol sym) {
<ide> return frame.hasSymbol(sym) || defaultObj.hasMember(sym);
<ide> }
<ide>
<ide> /**
<del> * シンボルの参照先アドレスを取得する
<add> * シンボルの参照先アドレスを取得します。
<ide> * @param sym シンボル
<ide> * @return 参照
<ide> */
<ide> }
<ide>
<ide> /**
<del> * シンボルの値を取得する
<add> * シンボルの値を取得します。
<ide> * @param sym シンボル
<ide> * @return 値
<ide> */
<ide> }
<ide>
<ide> /**
<del> * 参照先の実体を取得する
<add> * 参照先の実体を取得します。
<ide> * @param address アドレス
<ide> * @return 実体
<ide> */
<ide> }
<ide>
<ide> /**
<del> * シンボルに参照をセットする
<add> * シンボルに参照をセットします。
<ide> * @param sym シンボル
<ide> * @param ref 参照
<ide> */
<ide> defaultObj.setMember(sym, ref);
<ide> }
<ide>
<add> /**
<add> * 指定した実体を実体テーブルに追加し、そのテーブル上での位置を記録した X_Address インスタンスを返します。
<add> * @param obj 追加する実体
<add> * @return 実体テーブル上の、追加された実体の位置を記録した X_Address インスタンス
<add> */
<ide> static X_Address register(X_Code obj) {
<ide> entities.put(new X_Address(0,entities.lastKey().getAddress() + 1), obj);
<ide> return new X_Address(0, entities.lastKey().getAddress());
<ide> }
<ide>
<add> /**
<add> * Xemime インタプリタにおいて最初に呼び出され、
<add> * コマンドライン引数によって実行モード(対話的実行 or ソースファイル実行)を設定し、
<add> * 実際にパーサも読み込んで解釈と実行を開始します。<br>
<add> * -debug オプションが設定されていた場合、仮想メモリモニタを別スレッドで起動します。
<add> * @param args コマンドライン引数
<add> */
<ide> public static void main(String[] args) {
<ide> boolean debug = Arrays.asList(args).contains("-debug");
<ide>
<ide> }
<ide> }
<ide>
<add> /**
<add> * ロゴとバージョン情報を出力します。
<add> */
<ide> private static void usage() {
<ide> System.out.println(" _ __ _ \n" +
<ide> " | |/ /__ ____ ___ (_)___ ___ ___ \n" +
<ide> "Xemime Version 1.0.0 2017-08-07");
<ide> }
<ide>
<add> /**
<add> * Object 組み込みオブジェクト<br>
<add> * オブジェクト生成、クローン処理を担うメソッドを実装した最も基本的なオブジェクトです。<br>
<add> * これをクローンして新たなオブジェクトを用意することを推奨しています。
<add> */
<ide> private static class X_Object extends X_Handler {
<ide> X_Object() {
<ide> super(0);
<ide> setMember(X_Symbol.intern(0, "clone"), new X_Clone());
<ide> }
<ide>
<add> /**
<add> * Object.clone メソッド<br>
<add> * clone メソッドのみを実装した、最も単純なオブジェクトを生成してその参照を返します。
<add> */
<ide> private static class X_Clone extends X_Native {
<ide> X_Clone() {
<ide> super(0, 0);
<ide> }
<ide> }
<ide>
<add> /**
<add> * Core 組み込みオブジェクト<br>
<add> * 条件分岐や、繰り返し、入出力、インタプリタの終了処理などを担うメソッドを実装した組み込みオブジェクトです。
<add> */
<ide> private static class X_Core extends X_Handler {
<ide> X_Core() {
<ide> super(0);
<ide> setMember(X_Symbol.intern(0, "exit"), new X_Exit());
<ide> }
<ide>
<add> /**
<add> * Core.exit メソッド<br>
<add> * Xemime インタプリタを終了します。
<add> */
<ide> private static class X_Exit extends X_Native {
<ide> X_Exit() {
<ide> super(0, 0);
<ide> }
<ide> }
<ide>
<add> /**
<add> * Core.print メソッド<br>
<add> * 1つの引数を受け取り、それを文字列化して標準出力に出力します。
<add> */
<ide> private static class X_Print extends X_Native {
<ide> X_Print() {
<ide> super(0, 1);
<ide> }
<ide> }
<ide>
<add> /**
<add> * Core.println メソッド<br>
<add> * 1つの引数を受け取り、それを文字列化し末尾に改行コードを付与して標準出力に出力します。
<add> */
<ide> private static class X_Println extends X_Native {
<ide> X_Println() {
<ide> super(0, 1);
<ide> }
<ide> }
<ide>
<add> /**
<add> * Core.if メソッド<br>
<add> * 条件式と2つの引数を受け取り、条件式を評価してNIL以外となった場合は2つ目の引数を、
<add> * NILとなった場合は3つ目の引数を評価して返します。
<add> */
<ide> private static class X_If extends X_Native {
<ide> X_If(){
<ide> super(0, 3); |
|
Java | apache-2.0 | 5a7cffaa5055e790a4ed95d5d6e85b0a3eec1eeb | 0 | JA-VON/UWI-Research-Days-Android,rajaybitter/UWI-Research-Days-Android | package com.uwics.uwidiscover.activities;
import android.annotation.SuppressLint;
import android.graphics.Bitmap;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.NavUtils;
import android.support.v7.app.AppCompatActivity;
import android.view.MenuItem;
import android.view.View;
import android.view.Window;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.ProgressBar;
import android.widget.Spinner;
import android.widget.TextView;
import com.uwics.uwidiscover.R;
import java.util.Calendar;
import java.util.GregorianCalendar;
public class LiveActivity extends AppCompatActivity {
private final static Calendar CURRENT_DAY = Calendar.getInstance();
private final static Calendar DAY_ONE = new GregorianCalendar(2016, 1, 14);
private final static Calendar DAY_TWO = new GregorianCalendar(2016, 1, 18);
private final static Calendar DAY_THREE = new GregorianCalendar(2016, 1, 19);
private WebView mWebView;
private ProgressBar progressBar;
private Spinner streamChannelSpinner;
private TextView noStreamTextView;
@Override
protected void onCreate(Bundle savedInstanceState) {
getWindow().requestFeature(Window.FEATURE_PROGRESS);
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_live);
if (getActionBar() != null) {
getActionBar().setTitle("Live");
getActionBar().setDisplayHomeAsUpEnabled(true);
}
mWebView = (WebView) findViewById(R.id.webview);
streamChannelSpinner = (Spinner) findViewById(R.id.channel_selector_spinner);
noStreamTextView = (TextView) findViewById(R.id.text_no_stream_available);
progressBar = (ProgressBar) findViewById(R.id.progress_bar);
progressBar.setMax(100);
setUpChannelSpinner();
setUpWebView();
}
private void setUpChannelSpinner() {
ArrayAdapter<String> streamChannelOptionsAdapter = new ArrayAdapter<String>(
this,
android.R.layout.simple_spinner_item,
getResources().getStringArray(R.array.array_stream_channels));
streamChannelOptionsAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
streamChannelSpinner.setAdapter(streamChannelOptionsAdapter);
streamChannelSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
@Override
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
int channelIndex = parent.getSelectedItemPosition();
showStream(channelIndex);
}
@Override
public void onNothingSelected(AdapterView<?> parent) {
}
});
}
@SuppressWarnings("StatementWithEmptyBody")
private void showStream(int channelIndex) {
// TODO: Gonna probably run this through an Async after testing
// TODO: Do some check to show unavailable stream if user is on screen and the stream ends
int i = currResearchDay();
if (i != 0) {
String streamUrl = validLinkToStreamForTime(i, channelIndex);
if (streamUrl != null) {
noStreamTextView.setVisibility(View.GONE);
mWebView.setVisibility(View.VISIBLE);
mWebView.loadUrl(streamUrl);
} else {
mWebView.setVisibility(View.GONE);
noStreamTextView.setVisibility(View.VISIBLE);
}
} else {
mWebView.setVisibility(View.GONE);
noStreamTextView.setVisibility(View.VISIBLE);
}
}
private int currResearchDay() {
if (isResearchDay(DAY_ONE)) {
return 1;
} else if (isResearchDay(DAY_TWO)) {
return 2;
} else if (isResearchDay(DAY_THREE)) {
return 3;
} else {
return 0;
}
}
private boolean isResearchDay(Calendar rDay) {
// TODO: DAY_OF_YEAR being incremented/decremented by 1 when it gets here after initial run. Figure out why
return (CURRENT_DAY.get(Calendar.YEAR) == rDay.get(Calendar.YEAR))
&& (CURRENT_DAY.get(Calendar.DAY_OF_YEAR) == rDay.get(Calendar.DAY_OF_YEAR));
}
/* D1
9 - 12 : C1 - S1
10:30 - 3 : C2 - S2
12 - ?? : C1 - S3
2 - 7 : C3 - S4
5:16 - 9 : C2 - S5
D2
11 - 1:30 : C1 - S1
12 - 3 : C2 - S2
1:30 - 4 : C1 - S3
1:30 - 5 : C3 - S4
2:30 - 5:30 : C4 - S5
4 - 9 : C1 - S6
4 - 9 : C2 - S7
D3
(9:30 (10 - 12) 12:30) : C1 - S1
(11:45 (12 - 12:45) 1) : C2 - S2
3 - ?? : C1 - S3 */
@Nullable
private String validLinkToStreamForTime(int rDayIndex, int cStream) {
if (rDayIndex == 1) {
if (cStream == 0) {
if (CURRENT_DAY.after(tempDay(rDayIndex, 9, 0)) && CURRENT_DAY.before(tempDay(rDayIndex, 12, 0))) {
return getString(R.string.string_d1_s1_c1);
} else if (CURRENT_DAY.after(tempDay(rDayIndex, 12, 0)) && CURRENT_DAY.before(tempDay(rDayIndex, 12, 45))) {
// TODO: Verify this time
return getString(R.string.string_d1_s3_c1);
}
} else if (cStream == 1) {
if (CURRENT_DAY.after(tempDay(rDayIndex, 10, 30)) && CURRENT_DAY.before(tempDay(rDayIndex, 3, 0))) {
return getString(R.string.string_d1_s2_c2);
} else if (CURRENT_DAY.after(tempDay(rDayIndex, 5, 16)) && CURRENT_DAY.before(tempDay(rDayIndex, 9, 0))) {
return getString(R.string.string_d1_s5_c2);
}
} else if (cStream == 2) {
if (CURRENT_DAY.after(tempDay(rDayIndex, 2, 0)) && CURRENT_DAY.before(tempDay(rDayIndex, 7, 0))) {
return getString(R.string.string_d1_s4_c3);
}
} else if (cStream == 3) {
return null;
}
} else if (rDayIndex == 2) {
if (cStream == 0) {
if (CURRENT_DAY.after(tempDay(rDayIndex, 21, 0)) && CURRENT_DAY.before(tempDay(rDayIndex, 23, 30))) {
return getString(R.string.string_d2_s1_c1);
} else if (CURRENT_DAY.after(tempDay(rDayIndex, 1, 30)) && CURRENT_DAY.before(tempDay(rDayIndex, 4, 0))) {
return getString(R.string.string_d2_s3_c1);
} else if (CURRENT_DAY.after(tempDay(rDayIndex, 4, 0)) && CURRENT_DAY.before(tempDay(rDayIndex, 9, 0))) {
return getString(R.string.string_d2_s6_c1);
}
} else if (cStream == 1) {
if (CURRENT_DAY.after(tempDay(rDayIndex, 21, 0)) && CURRENT_DAY.before(tempDay(rDayIndex, 23, 0))) {
return getString(R.string.string_d2_s2_c2);
} else if (CURRENT_DAY.after(tempDay(rDayIndex, 4, 0)) && CURRENT_DAY.before(tempDay(rDayIndex, 9, 0))) {
return getString(R.string.string_d2_s7_c2);
}
} else if (cStream == 2) {
if (CURRENT_DAY.after(tempDay(rDayIndex, 1, 30)) && CURRENT_DAY.before(tempDay(rDayIndex, 5, 0))) {
return getString(R.string.string_d2_s4_c3);
}
} else if (cStream == 3) {
if (CURRENT_DAY.after(tempDay(rDayIndex, 2, 30)) && CURRENT_DAY.before(tempDay(rDayIndex, 5, 30))) {
return getString(R.string.string_d2_s5_c4);
}
}
} else if (rDayIndex == 3) {
if (cStream == 0) {
if (CURRENT_DAY.after(tempDay(rDayIndex, 10, 0)) && CURRENT_DAY.before(tempDay(rDayIndex, 12, 0))) {
// TODO: Verify this time
return getString(R.string.string_d3_s1_c1);
} else if (CURRENT_DAY.after(tempDay(rDayIndex, 3, 0)) && CURRENT_DAY.before(tempDay(rDayIndex, 5, 0))) {
// TODO: Verify this time
return getString(R.string.string_d3_s3_c1);
}
} else if (cStream == 1) {
if (CURRENT_DAY.after(tempDay(rDayIndex, 12, 0)) && CURRENT_DAY.before(tempDay(rDayIndex, 12, 45))) {
// TODO: Verify this time
return getString(R.string.string_d3_s2_c2);
}
} else if (cStream == 2) {
return null;
} else if (cStream == 3) {
return null;
}
}
return null;
}
@Nullable
private Calendar tempDay(int cal, int hourOfDay, int min) {
Calendar temp;
switch (cal) {
case 1:
temp = DAY_ONE;
temp.add(Calendar.HOUR_OF_DAY, hourOfDay);
temp.add(Calendar.MINUTE, min);
return temp;
case 2:
temp = DAY_TWO;
temp.add(Calendar.HOUR_OF_DAY, hourOfDay);
temp.add(Calendar.MINUTE, min);
return temp;
case 3:
temp = DAY_THREE;
temp.add(Calendar.HOUR_OF_DAY, hourOfDay);
temp.add(Calendar.MINUTE, min);
return temp;
default:
return null;
}
}
@SuppressLint("SetJavaScriptEnabled")
private void setUpWebView() {
mWebView.setWebViewClient(new WebClient());
WebSettings webSettings = mWebView.getSettings();
webSettings.setJavaScriptEnabled(true);
// mWebView.loadUrl("http://tv.mona.uwi.edu/");
// mWebView.loadUrl("http://player.twitch.tv/?volume=0.5&channel=esl_sc2&time=14");
// mWebView.loadUrl("http://www.uwicfptv.com/livestream");
// mWebView.loadUrl("http://tv.mona.uwi.edu/research-days-2016-fhe-lunch-hour-concert");
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case android.R.id.home:
NavUtils.navigateUpFromSameTask(this);
return true;
default:
return super.onOptionsItemSelected(item);
}
}
private class WebClient extends WebViewClient {
@Override
public boolean shouldOverrideUrlLoading(WebView view, String url) {
view.loadUrl(url);
return true;
}
@Override
public void onPageStarted(WebView view, String url, Bitmap favicon) {
progressBar.setVisibility(View.VISIBLE);
progressBar.setProgress(0);
super.onPageStarted(view, url, favicon);
}
@Override
public void onPageFinished(WebView view, String url) {
progressBar.setProgress(100);
progressBar.setVisibility(View.GONE);
super.onPageFinished(view, url);
}
}
}
| app/src/main/java/com/uwics/uwidiscover/activities/LiveActivity.java | package com.uwics.uwidiscover.activities;
import android.annotation.SuppressLint;
import android.graphics.Bitmap;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.NavUtils;
import android.support.v7.app.AppCompatActivity;
import android.view.MenuItem;
import android.view.View;
import android.view.Window;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.ProgressBar;
import android.widget.Spinner;
import android.widget.TextView;
import com.uwics.uwidiscover.R;
import java.util.Calendar;
import java.util.GregorianCalendar;
public class LiveActivity extends AppCompatActivity {
private final static Calendar CURRENT_DAY = Calendar.getInstance();
private final static Calendar DAY_ONE = new GregorianCalendar(2016, 1, 14);
private final static Calendar DAY_TWO = new GregorianCalendar(2016, 1, 18);
private final static Calendar DAY_THREE = new GregorianCalendar(2016, 1, 19);
private WebView mWebView;
private ProgressBar progressBar;
private Spinner streamChannelSpinner;
private TextView noStreamTextView;
@Override
protected void onCreate(Bundle savedInstanceState) {
getWindow().requestFeature(Window.FEATURE_PROGRESS);
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_live);
if (getActionBar() != null) {
getActionBar().setTitle("Live");
getActionBar().setDisplayHomeAsUpEnabled(true);
}
mWebView = (WebView) findViewById(R.id.webview);
streamChannelSpinner = (Spinner) findViewById(R.id.channel_selector_spinner);
noStreamTextView = (TextView) findViewById(R.id.text_no_stream_available);
progressBar = (ProgressBar) findViewById(R.id.progress_bar);
progressBar.setMax(100);
setUpChannelSpinner();
setUpWebView();
}
private void setUpChannelSpinner() {
ArrayAdapter<String> streamChannelOptionsAdapter = new ArrayAdapter<String>(
this,
android.R.layout.simple_spinner_item,
getResources().getStringArray(R.array.array_stream_channels));
streamChannelOptionsAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
streamChannelSpinner.setAdapter(streamChannelOptionsAdapter);
streamChannelSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
@Override
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
int channelIndex = parent.getSelectedItemPosition();
showStream(channelIndex);
}
@Override
public void onNothingSelected(AdapterView<?> parent) {
}
});
}
@SuppressWarnings("StatementWithEmptyBody")
private void showStream(int channelIndex) {
// TODO: Gonna probably run this through an Async after testing
// TODO: Do some check to show unavailable stream if user is on screen and the stream ends
int i = currResearchDay();
if (i != 0) {
String streamUrl = validLinkToStreamForTime(i, channelIndex);
if (streamUrl != null) {
noStreamTextView.setVisibility(View.GONE);
mWebView.setVisibility(View.VISIBLE);
mWebView.loadUrl(streamUrl);
}
// switch (channelIndex) {
// case 0:
// switch (rDay) {
// case 1:
// if (streamUrl != null) {
// noStreamTextView.setVisibility(View.GONE);
// mWebView.setVisibility(View.VISIBLE);
// mWebView.loadUrl(streamUrl);
// }
// break;
// case 2:
// if (streamUrl != null) {
// noStreamTextView.setVisibility(View.GONE);
// mWebView.setVisibility(View.VISIBLE);
// mWebView.loadUrl(streamUrl);
// }
// break;
// case 3:
// if (streamUrl != null) {
// noStreamTextView.setVisibility(View.GONE);
// mWebView.setVisibility(View.VISIBLE);
// mWebView.loadUrl(streamUrl);
// }
// break;
// }
// break;
// case 1:
// switch (rDay) {
// case 1:
// if (streamUrl != null) {
// noStreamTextView.setVisibility(View.GONE);
// mWebView.setVisibility(View.VISIBLE);
// mWebView.loadUrl(streamUrl);
// }
// break;
// case 2:
// if (streamUrl != null) {
// noStreamTextView.setVisibility(View.GONE);
// mWebView.setVisibility(View.VISIBLE);
// mWebView.loadUrl(streamUrl);
// }
// break;
// case 3:
// if (streamUrl != null) {
// noStreamTextView.setVisibility(View.GONE);
// mWebView.setVisibility(View.VISIBLE);
// mWebView.loadUrl(streamUrl);
// }
// break;
// }
// break;
// case 2:
// switch (rDay) {
// case 1:
// if (streamUrl != null) {
// noStreamTextView.setVisibility(View.GONE);
// mWebView.setVisibility(View.VISIBLE);
// mWebView.loadUrl(streamUrl);
// }
// break;
// case 2:
// if (streamUrl != null) {
// noStreamTextView.setVisibility(View.GONE);
// mWebView.setVisibility(View.VISIBLE);
// mWebView.loadUrl(streamUrl);
// }
// break;
// case 3:
// if (streamUrl != null) {
// noStreamTextView.setVisibility(View.GONE);
// mWebView.setVisibility(View.VISIBLE);
// mWebView.loadUrl(streamUrl);
// }
// break;
// }
// break;
// case 3:
// switch (rDay) {
// case 1:
// if (streamUrl != null) {
// noStreamTextView.setVisibility(View.GONE);
// mWebView.setVisibility(View.VISIBLE);
// mWebView.loadUrl(streamUrl);
// }
// break;
// case 2:
// if (streamUrl != null) {
// noStreamTextView.setVisibility(View.GONE);
// mWebView.setVisibility(View.VISIBLE);
// mWebView.loadUrl(streamUrl);
// }
// break;
// case 3:
// if (streamUrl != null) {
// noStreamTextView.setVisibility(View.GONE);
// mWebView.setVisibility(View.VISIBLE);
// mWebView.loadUrl(streamUrl);
// }
// break;
// }
// break;
// }
} else {
mWebView.setVisibility(View.GONE);
noStreamTextView.setVisibility(View.VISIBLE);
}
}
private int currResearchDay() {
if (isResearchDay(DAY_ONE)) {
return 1;
} else if (isResearchDay(DAY_TWO)) {
return 2;
} else if (isResearchDay(DAY_THREE)) {
return 3;
} else {
return 0;
}
}
private boolean isResearchDay(Calendar rDay) {
// TODO: DAY_OF_YEAR being incremented/decremented by 1 when it gets here after initial run. Figure out why
return (CURRENT_DAY.get(Calendar.YEAR) == rDay.get(Calendar.YEAR))
&& (CURRENT_DAY.get(Calendar.DAY_OF_YEAR) == rDay.get(Calendar.DAY_OF_YEAR));
}
/* D1
9 - 12 : C1 - S1
10:30 - 3 : C2 - S2
12 - ?? : C1 - S3
2 - 7 : C3 - S4
5:16 - 9 : C2 - S5
D2
11 - 1:30 : C1 - S1
12 - 3 : C2 - S2
1:30 - 4 : C1 - S3
1:30 - 5 : C3 - S4
2:30 - 5:30 : C4 - S5
4 - 9 : C1 - S6
4 - 9 : C2 - S7
D3
(9:30 (10 - 12) 12:30) : C1 - S1
(11:45 (12 - 12:45) 1) : C2 - S2
3 - ?? : C1 - S3 */
@Nullable
private String validLinkToStreamForTime(int rDayIndex, int cStream) {
if (rDayIndex == 1) {
if (cStream == 0) {
if (CURRENT_DAY.after(tempDay(rDayIndex, 20, 0)) && CURRENT_DAY.before(tempDay(rDayIndex, 23, 0))) {
return getString(R.string.string_d1_s1_c1);
} else if (CURRENT_DAY.after(tempDay(rDayIndex, 12, 0)) && CURRENT_DAY.before(tempDay(rDayIndex, 12, 45))) {
// TODO: Verify this time
return getString(R.string.string_d1_s3_c1);
}
} else if (cStream == 1) {
if (CURRENT_DAY.after(tempDay(rDayIndex, 20, 30)) && CURRENT_DAY.before(tempDay(rDayIndex, 23, 0))) {
return getString(R.string.string_d1_s2_c2);
} else if (CURRENT_DAY.after(tempDay(rDayIndex, 5, 16)) && CURRENT_DAY.before(tempDay(rDayIndex, 9, 0))) {
return getString(R.string.string_d1_s5_c2);
}
} else if (cStream == 2) {
if (CURRENT_DAY.after(tempDay(rDayIndex, 2, 0)) && CURRENT_DAY.before(tempDay(rDayIndex, 7, 0))) {
return getString(R.string.string_d1_s4_c3);
}
} else if (cStream == 3) {
return null;
}
} else if (rDayIndex == 2) {
if (cStream == 0) {
if (CURRENT_DAY.after(tempDay(rDayIndex, 21, 0)) && CURRENT_DAY.before(tempDay(rDayIndex, 23, 30))) {
return getString(R.string.string_d2_s1_c1);
} else if (CURRENT_DAY.after(tempDay(rDayIndex, 1, 30)) && CURRENT_DAY.before(tempDay(rDayIndex, 4, 0))) {
return getString(R.string.string_d2_s3_c1);
} else if (CURRENT_DAY.after(tempDay(rDayIndex, 4, 0)) && CURRENT_DAY.before(tempDay(rDayIndex, 9, 0))) {
return getString(R.string.string_d2_s6_c1);
}
} else if (cStream == 1) {
if (CURRENT_DAY.after(tempDay(rDayIndex, 21, 0)) && CURRENT_DAY.before(tempDay(rDayIndex, 23, 0))) {
return getString(R.string.string_d2_s2_c2);
} else if (CURRENT_DAY.after(tempDay(rDayIndex, 4, 0)) && CURRENT_DAY.before(tempDay(rDayIndex, 9, 0))) {
return getString(R.string.string_d2_s7_c2);
}
} else if (cStream == 2) {
if (CURRENT_DAY.after(tempDay(rDayIndex, 1, 30)) && CURRENT_DAY.before(tempDay(rDayIndex, 5, 0))) {
return getString(R.string.string_d2_s4_c3);
}
} else if (cStream == 3) {
if (CURRENT_DAY.after(tempDay(rDayIndex, 2, 30)) && CURRENT_DAY.before(tempDay(rDayIndex, 5, 30))) {
return getString(R.string.string_d2_s5_c4);
}
}
} else if (rDayIndex == 3) {
if (cStream == 0) {
if (CURRENT_DAY.after(tempDay(rDayIndex, 10, 0)) && CURRENT_DAY.before(tempDay(rDayIndex, 12, 0))) {
// TODO: Verify this time
return getString(R.string.string_d3_s1_c1);
} else if (CURRENT_DAY.after(tempDay(rDayIndex, 3, 0)) && CURRENT_DAY.before(tempDay(rDayIndex, 5, 0))) {
// TODO: Verify this time
return getString(R.string.string_d3_s3_c1);
}
} else if (cStream == 1) {
if (CURRENT_DAY.after(tempDay(rDayIndex, 12, 0)) && CURRENT_DAY.before(tempDay(rDayIndex, 12, 45))) {
// TODO: Verify this time
return getString(R.string.string_d3_s2_c2);
}
} else if (cStream == 2) {
return null;
} else if (cStream == 3) {
return null;
}
}
return null;
}
@Nullable
private Calendar tempDay(int cal, int hourOfDay, int min) {
Calendar temp;
switch (cal) {
case 1:
temp = DAY_ONE;
temp.add(Calendar.HOUR_OF_DAY, hourOfDay);
temp.add(Calendar.MINUTE, min);
return temp;
case 2:
temp = DAY_TWO;
temp.add(Calendar.HOUR_OF_DAY, hourOfDay);
temp.add(Calendar.MINUTE, min);
return temp;
case 3:
temp = DAY_THREE;
temp.add(Calendar.HOUR_OF_DAY, hourOfDay);
temp.add(Calendar.MINUTE, min);
return temp;
default:
return null;
}
}
@SuppressLint("SetJavaScriptEnabled")
private void setUpWebView() {
mWebView.setWebViewClient(new WebClient());
WebSettings webSettings = mWebView.getSettings();
webSettings.setJavaScriptEnabled(true);
// mWebView.loadUrl("http://tv.mona.uwi.edu/");
// mWebView.loadUrl("http://player.twitch.tv/?volume=0.5&channel=esl_sc2&time=14");
// mWebView.loadUrl("http://www.uwicfptv.com/livestream");
// mWebView.loadUrl("http://tv.mona.uwi.edu/research-days-2016-fhe-lunch-hour-concert");
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case android.R.id.home:
NavUtils.navigateUpFromSameTask(this);
return true;
default:
return super.onOptionsItemSelected(item);
}
}
private class WebClient extends WebViewClient {
@Override
public boolean shouldOverrideUrlLoading(WebView view, String url) {
view.loadUrl(url);
return true;
}
@Override
public void onPageStarted(WebView view, String url, Bitmap favicon) {
progressBar.setVisibility(View.VISIBLE);
progressBar.setProgress(0);
super.onPageStarted(view, url, favicon);
}
@Override
public void onPageFinished(WebView view, String url) {
progressBar.setProgress(100);
progressBar.setVisibility(View.GONE);
super.onPageFinished(view, url);
}
}
}
| little fix
| app/src/main/java/com/uwics/uwidiscover/activities/LiveActivity.java | little fix | <ide><path>pp/src/main/java/com/uwics/uwidiscover/activities/LiveActivity.java
<ide> noStreamTextView.setVisibility(View.GONE);
<ide> mWebView.setVisibility(View.VISIBLE);
<ide> mWebView.loadUrl(streamUrl);
<del> }
<del>// switch (channelIndex) {
<del>// case 0:
<del>// switch (rDay) {
<del>// case 1:
<del>// if (streamUrl != null) {
<del>// noStreamTextView.setVisibility(View.GONE);
<del>// mWebView.setVisibility(View.VISIBLE);
<del>// mWebView.loadUrl(streamUrl);
<del>// }
<del>// break;
<del>// case 2:
<del>// if (streamUrl != null) {
<del>// noStreamTextView.setVisibility(View.GONE);
<del>// mWebView.setVisibility(View.VISIBLE);
<del>// mWebView.loadUrl(streamUrl);
<del>// }
<del>// break;
<del>// case 3:
<del>// if (streamUrl != null) {
<del>// noStreamTextView.setVisibility(View.GONE);
<del>// mWebView.setVisibility(View.VISIBLE);
<del>// mWebView.loadUrl(streamUrl);
<del>// }
<del>// break;
<del>// }
<del>// break;
<del>// case 1:
<del>// switch (rDay) {
<del>// case 1:
<del>// if (streamUrl != null) {
<del>// noStreamTextView.setVisibility(View.GONE);
<del>// mWebView.setVisibility(View.VISIBLE);
<del>// mWebView.loadUrl(streamUrl);
<del>// }
<del>// break;
<del>// case 2:
<del>// if (streamUrl != null) {
<del>// noStreamTextView.setVisibility(View.GONE);
<del>// mWebView.setVisibility(View.VISIBLE);
<del>// mWebView.loadUrl(streamUrl);
<del>// }
<del>// break;
<del>// case 3:
<del>// if (streamUrl != null) {
<del>// noStreamTextView.setVisibility(View.GONE);
<del>// mWebView.setVisibility(View.VISIBLE);
<del>// mWebView.loadUrl(streamUrl);
<del>// }
<del>// break;
<del>// }
<del>// break;
<del>// case 2:
<del>// switch (rDay) {
<del>// case 1:
<del>// if (streamUrl != null) {
<del>// noStreamTextView.setVisibility(View.GONE);
<del>// mWebView.setVisibility(View.VISIBLE);
<del>// mWebView.loadUrl(streamUrl);
<del>// }
<del>// break;
<del>// case 2:
<del>// if (streamUrl != null) {
<del>// noStreamTextView.setVisibility(View.GONE);
<del>// mWebView.setVisibility(View.VISIBLE);
<del>// mWebView.loadUrl(streamUrl);
<del>// }
<del>// break;
<del>// case 3:
<del>// if (streamUrl != null) {
<del>// noStreamTextView.setVisibility(View.GONE);
<del>// mWebView.setVisibility(View.VISIBLE);
<del>// mWebView.loadUrl(streamUrl);
<del>// }
<del>// break;
<del>// }
<del>// break;
<del>// case 3:
<del>// switch (rDay) {
<del>// case 1:
<del>// if (streamUrl != null) {
<del>// noStreamTextView.setVisibility(View.GONE);
<del>// mWebView.setVisibility(View.VISIBLE);
<del>// mWebView.loadUrl(streamUrl);
<del>// }
<del>// break;
<del>// case 2:
<del>// if (streamUrl != null) {
<del>// noStreamTextView.setVisibility(View.GONE);
<del>// mWebView.setVisibility(View.VISIBLE);
<del>// mWebView.loadUrl(streamUrl);
<del>// }
<del>// break;
<del>// case 3:
<del>// if (streamUrl != null) {
<del>// noStreamTextView.setVisibility(View.GONE);
<del>// mWebView.setVisibility(View.VISIBLE);
<del>// mWebView.loadUrl(streamUrl);
<del>// }
<del>// break;
<del>// }
<del>// break;
<del>// }
<add> } else {
<add> mWebView.setVisibility(View.GONE);
<add> noStreamTextView.setVisibility(View.VISIBLE);
<add> }
<ide> } else {
<ide> mWebView.setVisibility(View.GONE);
<ide> noStreamTextView.setVisibility(View.VISIBLE);
<ide> private String validLinkToStreamForTime(int rDayIndex, int cStream) {
<ide> if (rDayIndex == 1) {
<ide> if (cStream == 0) {
<del> if (CURRENT_DAY.after(tempDay(rDayIndex, 20, 0)) && CURRENT_DAY.before(tempDay(rDayIndex, 23, 0))) {
<add> if (CURRENT_DAY.after(tempDay(rDayIndex, 9, 0)) && CURRENT_DAY.before(tempDay(rDayIndex, 12, 0))) {
<ide> return getString(R.string.string_d1_s1_c1);
<ide> } else if (CURRENT_DAY.after(tempDay(rDayIndex, 12, 0)) && CURRENT_DAY.before(tempDay(rDayIndex, 12, 45))) {
<ide> // TODO: Verify this time
<ide> return getString(R.string.string_d1_s3_c1);
<ide> }
<ide> } else if (cStream == 1) {
<del> if (CURRENT_DAY.after(tempDay(rDayIndex, 20, 30)) && CURRENT_DAY.before(tempDay(rDayIndex, 23, 0))) {
<add> if (CURRENT_DAY.after(tempDay(rDayIndex, 10, 30)) && CURRENT_DAY.before(tempDay(rDayIndex, 3, 0))) {
<ide> return getString(R.string.string_d1_s2_c2);
<ide> } else if (CURRENT_DAY.after(tempDay(rDayIndex, 5, 16)) && CURRENT_DAY.before(tempDay(rDayIndex, 9, 0))) {
<ide> return getString(R.string.string_d1_s5_c2); |
|
JavaScript | mit | 075df0f715e381483f641fcfc0cfdff6889014d6 | 0 | jimboy3100/jimboy3100.github.io,jimboy3100/jimboy3100.github.io,jimboy3100/jimboy3100.github.io,jimboy3100/jimboy3100.github.io | /*************
* LEGEND mod Express v1, by Jimboy3100 email:[email protected]
* Main Script
* Semiversion 23.91
*************/
var _0xaf82=["\x31\x30","\x75\x73\x65\x72\x4C\x61\x6E\x67\x75\x61\x67\x65","\x70\x72\x6F\x4C\x69\x63\x65\x6E\x63\x65\x55\x49\x44","\x67\x65\x74\x49\x74\x65\x6D","\x6E\x75\x6C\x6C","\x30\x2E\x30\x2E\x30\x2E\x30\x3A\x30","","\x67\x61\x6D\x65\x6D\x6F\x64\x65","\x63\x68\x65\x63\x6B\x6F\x6E\x6C\x79\x6F\x6E\x63\x65","\x63\x68\x65\x63\x6B\x6F\x6E\x6C\x79\x74\x77\x65\x6C\x76\x74\x68","\x63\x68\x65\x63\x6B\x6F\x6E\x6C\x79\x65\x6C\x65\x76\x65\x6E\x74\x68","\x63\x68\x65\x63\x6B\x6F\x6E\x6C\x79\x72\x65\x77\x61\x72\x64\x64\x61\x79\x31","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x77\x77\x77\x2E\x79\x6F\x75\x74\x75\x62\x65\x2E\x63\x6F\x6D\x2F\x77\x61\x74\x63\x68\x3F\x76\x3D\x6E\x6A\x33\x33\x4D\x41\x72\x4E\x6A\x43\x38","\x62\x61\x72","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x69\x2E\x69\x6D\x67\x75\x72\x2E\x63\x6F\x6D\x2F\x52\x56\x42\x69\x33\x54\x31\x2E\x67\x69\x66","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x69\x2E\x69\x6D\x67\x75\x72\x2E\x63\x6F\x6D\x2F\x70\x32\x54\x32\x39\x51\x45\x2E\x67\x69\x66","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x69\x2E\x69\x6D\x67\x75\x72\x2E\x63\x6F\x6D\x2F\x45\x75\x63\x49\x66\x59\x59\x2E\x67\x69\x66","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x69\x2E\x69\x6D\x67\x75\x72\x2E\x63\x6F\x6D\x2F\x4B\x4F\x6F\x42\x44\x61\x4B\x2E\x67\x69\x66","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x69\x2E\x69\x6D\x67\x75\x72\x2E\x63\x6F\x6D\x2F\x43\x53\x30\x33\x78\x57\x76\x2E\x67\x69\x66","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x69\x2E\x69\x6D\x67\x75\x72\x2E\x63\x6F\x6D\x2F\x74\x66\x4D\x55\x75\x32\x4A\x2E\x67\x69\x66","\x42\x61\x64\x20\x43\x68\x6F\x69\x63\x65\x21","\x57\x68\x79\x3F","\x59\x6F\x77\x21\x21","\x44\x65\x61\x74\x68\x21","\x52\x65\x6C\x61\x78\x21","\x4C\x65\x67\x65\x6E\x64\x20\x4D\x6F\x64\x21","\x64\x51\x77\x34\x77\x39\x57\x67\x58\x63\x51","\x62\x74\x50\x4A\x50\x46\x6E\x65\x73\x56\x34","\x55\x44\x2D\x4D\x6B\x69\x68\x6E\x4F\x58\x67","\x76\x70\x6F\x71\x57\x73\x36\x42\x75\x49\x59","\x56\x55\x76\x66\x6E\x35\x2D\x42\x4C\x4D\x38","\x43\x6E\x49\x66\x4E\x53\x70\x43\x66\x37\x30","\x52\x69\x63\x6B\x20\x41\x73\x74\x6C\x65\x79\x20\x2D\x20\x4E\x65\x76\x65\x72\x20\x47\x6F\x6E\x6E\x61\x20\x47\x69\x76\x65\x20\x59\x6F\x75\x20\x55\x70","\x53\x75\x72\x76\x69\x76\x6F\x72\x20\x2D\x20\x45\x79\x65\x20\x4F\x66\x20\x54\x68\x65\x20\x54\x69\x67\x65\x72","\x4C\x69\x6F\x6E\x20\x6B\x69\x6E\x67\x20\x2D\x20\x54\x68\x65\x20\x4C\x69\x6F\x6E\x20\x53\x6C\x65\x65\x70\x73\x20\x54\x6F\x6E\x69\x67\x68\x74","\x41\x67\x61\x72\x69\x6F\x20\x2D\x20\x4A\x75\x6D\x62\x6F\x20\x53\x6F\x6C\x6F\x20\x76\x73\x20\x54\x65\x61\x6D\x73","\x41\x67\x61\x72\x69\x6F\x20\x2D\x20\x4B\x69\x6C\x6C\x33\x72\x20\x76\x73\x20\x54\x65\x61\x6D\x73","\x50\x72\x6F\x6D\x6F\x74\x69\x6F\x6E\x61\x6C","\x6C\x61\x73\x74\x49\x50","\x70\x72\x65\x76\x69\x6F\x75\x73\x6E\x69\x63\x6B\x6E\x61\x6D\x65","\x6D\x69\x6E\x62\x74\x65\x78\x74","\x6C\x65\x61\x64\x62\x74\x65\x78\x74","\x74\x65\x61\x6D\x62\x74\x65\x78\x74","\x69\x6D\x67\x55\x72\x6C","\x69\x6D\x67\x48\x72\x65\x66","\x73\x68\x6F\x77\x54\x4B","\x73\x68\x6F\x77\x50\x6C\x61\x79\x65\x72","\x53\x48\x4F\x53\x48\x4F\x42\x74\x6E","\x58\x50\x42\x74\x6E","\x4D\x41\x49\x4E\x42\x54\x42\x74\x6E","\x41\x6E\x69\x6D\x61\x74\x65\x64\x53\x6B\x69\x6E\x42\x74\x6E","\x54\x49\x4D\x45\x63\x61\x6C\x42\x74\x6E","\x74\x69\x6D\x65\x73\x6F\x70\x65\x6E\x65\x64","\x75\x72\x6C","\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C","\x69\x6E\x63\x6C\x75\x64\x65\x73","\x55\x52\x4C","\x63\x68\x61\x6E\x67\x65","\x50\x72\x69\x76\x61\x74\x65","\x76\x61\x6C","\x23\x72\x65\x67\x69\x6F\x6E","\x68\x69\x64\x65","\x31\x2E\x38","\x63\x6C\x61\x73\x73\x4E\x61\x6D\x65","\x63\x68\x69\x6C\x64\x72\x65\x6E","\x2E\x62\x74\x6E\x2E\x62\x74\x6E\x2D\x77\x61\x72\x6E\x69\x6E\x67\x2E\x62\x74\x6E\x2D\x73\x70\x65\x63\x74\x61\x74\x65\x2E\x62\x74\x6E\x2D\x6E\x65\x65\x64\x73\x2D\x73\x65\x72\x76\x65\x72","\x6F\x67\x69\x63\x6F\x6E\x2D\x65\x79\x65","\x67\x61\x6D\x65\x4D\x6F\x64\x65","\x3A\x70\x61\x72\x74\x79","\x23\x67\x61\x6D\x65\x6D\x6F\x64\x65","\x2E\x62\x74\x6E\x2E\x62\x74\x6E\x2D\x77\x61\x72\x6E\x69\x6E\x67\x2E\x62\x74\x6E\x2D\x6C\x6F\x67\x69\x6E\x2D\x70\x6C\x61\x79\x2E\x62\x74\x6E\x2D\x6E\x65\x65\x64\x73\x2D\x73\x65\x72\x76\x65\x72","\x77\x69\x64\x74\x68","\x31\x30\x30\x25","\x63\x73\x73","\x2E\x62\x74\x6E\x2E\x62\x74\x6E\x2D\x70\x6C\x61\x79\x2D\x67\x75\x65\x73\x74\x2E\x62\x74\x6E\x2D\x73\x75\x63\x63\x65\x73\x73\x2E\x62\x74\x6E\x2D\x6E\x65\x65\x64\x73\x2D\x73\x65\x72\x76\x65\x72","\x50\x6C\x61\x79","\x74\x65\x78\x74","\x23\x6F\x67\x61\x72\x69\x6F\x2D\x70\x61\x72\x74\x79","\x23\x6F\x70\x65\x6E\x73\x6B\x69\x6E\x63\x68\x61\x6E\x67\x65\x72","\x2E\x71\x75\x69\x63\x6B\x2E\x71\x75\x69\x63\x6B\x2D\x62\x6F\x74\x73\x2E\x6F\x67\x69\x63\x6F\x6E\x2D\x74\x72\x6F\x70\x68\x79","\x2E\x61\x67\x61\x72\x69\x6F\x2D\x70\x61\x6E\x65\x6C\x2E\x72\x61\x64\x69\x6F\x2D\x70\x61\x6E\x65\x6C","\x2E\x61\x67\x61\x72\x69\x6F\x2D\x70\x61\x6E\x65\x6C\x2E\x6F\x67\x61\x72\x69\x6F\x2D\x79\x74\x2D\x70\x61\x6E\x65\x6C","\x2E\x70\x72\x6F\x66\x69\x6C\x65\x2D\x74\x61\x62","\x31\x36\x2E\x36\x25","\x2E\x6D\x65\x6E\x75\x2D\x74\x61\x62\x73","\x37\x30\x25","\x38\x37\x25","\x73\x68\x6F\x77","\x23\x68\x6F\x74\x6B\x65\x79\x73\x2D\x63\x66\x67","\x72","\x6D","\x73\x65\x61\x72\x63\x68","\x73\x69\x70","\x70\x61\x73\x73","\x70\x6C\x61\x79\x65\x72","\x61\x75\x74\x6F\x70\x6C\x61\x79\x65\x72","\x72\x65\x70\x6C\x61\x79","\x72\x65\x70\x6C\x61\x79\x53\x74\x61\x72\x74","\x72\x65\x70\x6C\x61\x79\x45\x6E\x64","\x59\x45\x53","\x4E\x4F","\x30","\x23\x6D\x65\x6E\x75\x50\x61\x6E\x65\x6C\x43\x6F\x6C\x6F\x72","\x23\x6D\x65\x6E\x75\x42\x67","\x23\x68\x75\x64\x4D\x61\x69\x6E\x43\x6F\x6C\x6F\x72\x20","\x64\x79\x69\x6E\x67\x6C\x69\x67\x68\x74\x31\x6C\x6F\x61\x64","\x75\x73\x65\x72\x44\x61\x74\x61","\x70\x61\x72\x73\x65","\x4E\x6F\x74\x46\x6F\x75\x6E\x64","\x75\x73\x65\x72\x66\x69\x72\x73\x74\x6E\x61\x6D\x65","\x75\x73\x65\x72\x6C\x61\x73\x74\x6E\x61\x6D\x65","\x75\x73\x65\x72\x67\x65\x6E\x64\x65\x72","\x75\x73\x65\x72\x69\x64","\x6C\x61\x6E\x67\x75\x61\x67\x65\x6D\x6F\x64","\x54\x72\x75\x65","\x74\x72\x75\x65","\x66\x61\x6C\x73\x65","\x73\x65\x74\x49\x74\x65\x6D","\x50\x4F\x53\x54","\x6F\x70\x65\x6E","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x73\x65\x74\x52\x65\x71\x75\x65\x73\x74\x48\x65\x61\x64\x65\x72","\x70\x61\x73\x73\x77\x6F\x72\x64","\x73\x65\x6E\x64","\x47\x45\x54","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x6F\x6C\x64","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65\x73","\x62\x65\x66\x6F\x72\x65","\x61\x70\x70\x6C\x79","\x61\x66\x74\x65\x72","\x23\x66\x66\x30\x30\x30\x30","\x23\x30\x30\x66\x66\x30\x30","\x23\x30\x30\x30\x30\x66\x66","\x23\x66\x66\x66\x66\x30\x30","\x23\x30\x30\x66\x66\x66\x66","\x23\x66\x66\x30\x30\x66\x66","\x63\x61\x6E\x76\x61\x73","\x63\x72\x65\x61\x74\x65\x4C\x69\x6E\x65\x61\x72\x47\x72\x61\x64\x69\x65\x6E\x74","\x72\x61\x6E\x64\x6F\x6D","\x6C\x65\x6E\x67\x74\x68","\x66\x6C\x6F\x6F\x72","\x61\x64\x64\x43\x6F\x6C\x6F\x72\x53\x74\x6F\x70","\x66\x69\x6C\x6C\x54\x65\x78\x74","\x69\x64","\x6D\x69\x6E\x69\x6D\x61\x70","\x6D\x69\x6E\x69\x6D\x61\x70\x2D\x73\x65\x63\x74\x6F\x72\x73","\x61\x6F\x32\x74\x2D\x6D\x69\x6E\x69\x6D\x61\x70","\x66\x69\x6C\x6C\x53\x74\x79\x6C\x65","\x67\x72\x61\x64\x69\x65\x6E\x74","\x66","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65\x5F\x6F\x76\x65\x72\x72\x69\x64\x65","\x4C\x4D\x73\x74\x61\x72\x74\x65\x64","\x4C\x4D\x56\x65\x72\x73\x69\x6F\x6E","\x4D\x6F\x64\x20\x3C\x66\x6F\x6E\x74\x20\x63\x6F\x6C\x6F\x72\x3D\x22\x79\x65\x6C\x6C\x6F\x77\x22\x3E\x3C\x62\x3E\x76","\x3C\x2F\x62\x3E\x3C\x2F\x66\x6F\x6E\x74\x3E\x20\x20","\x20\x3C\x66\x6F\x6E\x74\x20\x63\x6F\x6C\x6F\x72\x3D\x22\x79\x65\x6C\x6C\x6F\x77\x22\x3E\x3C\x62\x3E\x76\x31\x2E\x38\x3C\x2F\x62\x3E\x3C\x2F\x66\x6F\x6E\x74\x3E\x2E\x20\x3C\x62\x72\x3E\x76\x69\x73\x69\x74\x3A\x20\x3C\x61\x20\x74\x61\x72\x67\x65\x74\x3D\x22\x5F\x62\x6C\x61\x6E\x6B\x22\x20\x68\x72\x65\x66\x3D\x22\x68\x74\x74\x70\x73\x3A\x2F\x2F\x77\x77\x77\x2E\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x22\x3E\x3C\x66\x6F\x6E\x74\x20\x63\x6F\x6C\x6F\x72\x3D\x22\x79\x65\x6C\x6C\x6F\x77\x22\x3E\x3C\x62\x3E\x3C\x75\x3E\x77\x77\x77\x2E\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x3C\x2F\x75\x3E\x3C\x2F\x62\x3E\x3C\x2F\x66\x6F\x6E\x74\x3E\x3C\x2F\x61\x3E","\x69\x6E\x66\x6F","\x74\x72\x69\x6D","\x73\x68\x6F\x77\x69\x6E\x66\x6F\x3D\x30\x26\x63\x6F\x6E\x74\x72\x6F\x6C\x73\x3D\x30\x26\x72\x65\x6C\x3D\x30\x26\x76\x71\x3D\x74\x69\x6E\x79\x26\x65\x6E\x61\x62\x6C\x65\x6A\x73\x61\x70\x69\x3D\x31","\x76","\x6C\x69\x73\x74","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x77\x77\x77\x2E\x79\x6F\x75\x74\x75\x62\x65\x2E\x63\x6F\x6D\x2F\x65\x6D\x62\x65\x64\x2F","\x3F","\x3F\x6C\x69\x73\x74\x3D","\x26","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x79\x6F\x75\x74\x75\x2E\x62\x65\x2F","\x73\x74\x61\x72\x74\x73\x57\x69\x74\x68","\x72\x65\x70\x6C\x61\x63\x65","\x33\x30\x30\x70\x78","\x3C\x2F\x62\x72\x3E\x20\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x65\x6E\x61\x62\x6C\x65\x73\x68\x6F\x72\x74\x63\x75\x74\x73\x31\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x73\x6D\x20\x62\x74\x6E\x2D\x70\x72\x69\x6D\x61\x72\x79\x20\x62\x74\x6E\x2D\x70\x6C\x61\x79\x20\x62\x74\x6E\x2D\x65\x6E\x61\x62\x6C\x65\x2D\x73\x68\x6F\x72\x74\x63\x75\x74\x73\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x65\x6E\x61\x62\x6C\x65\x73\x68\x6F\x72\x74\x63\x75\x74\x73\x28\x29\x3B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x31\x30\x70\x78\x3B\x62\x6F\x72\x64\x65\x72\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x64\x61\x72\x6B\x62\x6C\x75\x65\x3B\x22\x3E","\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E\x3C\x62\x72\x3E\x3C\x62\x75\x74\x74\x6F\x6E\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x73\x6D\x20\x62\x74\x6E\x2D\x77\x61\x72\x6E\x69\x6E\x67\x20\x62\x74\x6E\x2D\x73\x70\x65\x63\x74\x61\x74\x65\x20\x62\x74\x6E\x2D\x70\x6C\x61\x79\x20\x62\x74\x6E\x2D\x65\x6E\x61\x62\x6C\x65\x2D\x73\x68\x6F\x72\x74\x63\x75\x74\x73\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x77\x69\x64\x74\x68\x3A\x20\x31\x30\x30\x25\x3B\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x31\x30\x70\x78\x3B\x22\x3E","\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x65\x72\x72\x6F\x72","\x66\x61\x64\x65\x4F\x75\x74","\x23\x69\x6D\x61\x67\x65\x62\x69\x67","\x72\x65\x6D\x6F\x76\x65","\x4D\x65\x67\x61\x46\x46\x41","\x54","\x69\x6E\x64\x65\x78\x4F\x66","\x74\x6F\x49\x53\x4F\x53\x74\x72\x69\x6E\x67","\x73\x6C\x69\x63\x65","\x33\x35\x30\x70\x78","\x3C\x62\x3E\x5B\x53\x45\x52\x56\x45\x52\x5D\x3A\x3C\x2F\x62\x3E\x20\x59\x6F\x75\x72\x20\x47\x69\x76\x65\x61\x77\x61\x79\x20\x6C\x69\x63\x65\x6E\x63\x65\x20\x68\x61\x73\x20\x65\x6E\x64\x65\x64\x2E\x20\x54\x68\x61\x6E\x6B\x20\x79\x6F\x75\x20\x66\x6F\x72\x20\x75\x73\x69\x6E\x67\x20\x6F\x75\x72\x20\x6D\x6F\x64\x21","\x77\x61\x72\x6E\x69\x6E\x67","\x47\x69\x76\x65","\x61\x67\x61\x72\x69\x6F\x55\x49\x44","\x50\x72\x6F\x4C\x69\x63\x65\x6E\x63\x65\x55\x73\x65\x72\x73","\x72\x65\x61\x73\x6F\x6E","\x40","\x73\x70\x6C\x69\x74","\x3C\x62\x3E\x5B\x53\x45\x52\x56\x45\x52\x5D\x3A\x3C\x2F\x62\x3E\x20\x20\x59\x6F\x75\x72\x20\x6C\x69\x63\x65\x6E\x63\x65\x20\x69\x73\x20\x73\x74\x6F\x72\x65\x64\x20\x61\x73\x20\x47\x69\x76\x65\x61\x77\x61\x79\x20\x50\x72\x65\x6D\x69\x75\x6D\x20\x75\x6E\x74\x69\x6C\x20","\x2F","\x2E\x20\x54\x68\x61\x6E\x6B\x20\x79\x6F\x75\x20\x66\x6F\x72\x20\x75\x73\x69\x6E\x67\x20\x6F\x75\x72\x20\x6D\x6F\x64\x21","\x3C\x62\x3E\x5B\x53\x45\x52\x56\x45\x52\x5D\x3A\x3C\x2F\x62\x3E\x20\x59\x6F\x75\x72\x20\x6C\x69\x63\x65\x6E\x63\x65\x20\x69\x73\x20\x73\x74\x6F\x72\x65\x64\x20\x61\x73\x20\x50\x72\x65\x6D\x69\x75\x6D\x2E\x20\x54\x68\x61\x6E\x6B\x20\x79\x6F\x75\x20\x66\x6F\x72\x20\x75\x73\x69\x6E\x67\x20\x6F\x75\x72\x20\x6D\x6F\x64\x21","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x41\x6A\x61\x78\x44\x61\x74\x61\x2F\x61\x63\x63\x65\x73\x73\x74\x6F\x6B\x65\x6E\x2E\x68\x74\x6D\x6C","\x6A\x73\x6F\x6E","\x61\x6A\x61\x78","\x61","\x3C\x62\x3E\x5B","\x5D\x3A\x3C\x2F\x62\x3E\x20","\x2C\x20\x3C\x62\x72\x3E","\x3A\x20\x3C\x61\x20\x74\x61\x72\x67\x65\x74\x3D\x22\x5F\x62\x6C\x61\x6E\x6B\x22\x20\x68\x72\x65\x66\x3D\x22\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x75\x73\x65\x72\x2E\x6A\x73\x22\x3E\x3C\x66\x6F\x6E\x74\x20\x63\x6F\x6C\x6F\x72\x3D\x22\x62\x6C\x75\x65\x22\x3E\x3C\x62\x3E\x3C\x75\x3E\x77\x77\x77\x2E\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x3C\x2F\x75\x3E\x3C\x2F\x62\x3E\x3C\x2F\x66\x6F\x6E\x74\x3E\x3C\x2F\x61\x3E\x3C\x62\x72\x3E","\x69\x6E\x6E\x65\x72\x48\x54\x4D\x4C","\x64\x6F\x63\x75\x6D\x65\x6E\x74\x45\x6C\x65\x6D\x65\x6E\x74","\x61\x72\x69\x61\x2D\x70\x72\x65\x73\x73\x65\x64","\x61\x74\x74\x72","\x23\x49\x50\x42\x74\x6E","\x63\x6C\x69\x63\x6B","\x23\x53\x48\x4F\x53\x48\x4F\x42\x74\x6E","\x23\x4D\x41\x49\x4E\x42\x54\x42\x74\x6E","\x23\x58\x50\x42\x74\x6E","\x6C\x69\x76\x65\x2D\x61\x72\x65\x6E\x61\x2D","\x23\x73\x65\x72\x76\x65\x72\x2D\x74\x6F\x6B\x65\x6E","\x2E\x61\x67\x61\x72\x2E\x69\x6F","\x69\x6E\x74\x65\x67\x72\x69\x74\x79","\x70\x61\x67\x65\x20\x32","\x2F\x70\x6C\x61\x79\x3F\x73\x69\x70\x3D","\x26\x3F\x72\x3D","\x26\x3F\x6D\x3D","\x70\x75\x73\x68\x53\x74\x61\x74\x65","\x3F\x73\x69\x70\x3D","\x70\x61\x74\x68\x6E\x61\x6D\x65","\x6C\x6F\x63\x61\x74\x69\x6F\x6E","\x68\x69\x73\x74\x6F\x72\x79","\x68\x72\x65\x66","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x61\x67\x61\x72\x2E\x69\x6F\x2F\x23","\x23\x70\x61\x72\x74\x79\x2D\x74\x6F\x6B\x65\x6E","\x6A\x51\x75\x65\x72\x79","\x67\x65\x74\x54\x69\x6D\x65","\x73\x65\x74\x54\x69\x6D\x65","\x3B\x20\x65\x78\x70\x69\x72\x65\x73\x3D","\x74\x6F\x47\x4D\x54\x53\x74\x72\x69\x6E\x67","\x63\x6F\x6F\x6B\x69\x65","\x61\x67\x61\x72\x69\x6F\x5F\x72\x65\x64\x69\x72\x65\x63\x74\x3D","\x3B\x20\x70\x61\x74\x68\x3D\x2F","\x2A\x5B\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x70\x61\x67\x65\x5F\x70\x6C\x61\x79\x22\x5D","\x23\x73\x65\x72\x76\x65\x72\x2D\x72\x65\x63\x6F\x6E\x6E\x65\x63\x74","\x23\x6C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x2D\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x3A","\x2E","\x65\x76\x65\x72\x79","\x23\x6A\x6F\x69\x6E\x50\x61\x72\x74\x79\x54\x6F\x6B\x65\x6E","\x23\x6A\x6F\x69\x6E\x2D\x70\x61\x72\x74\x79\x2D\x62\x74\x6E","\x66\x61\x20\x66\x61\x2D\x73\x65\x61\x72\x63\x68","\x61\x64\x64\x43\x6C\x61\x73\x73","\x66\x61\x20\x66\x61\x2D\x74\x69\x6D\x65\x73","\x72\x65\x6D\x6F\x76\x65\x43\x6C\x61\x73\x73","\x23\x73\x65\x61\x72\x63\x68\x53\x70\x61\x6E\x3E\x69","\x61\x67\x61\x72\x2E\x69\x6F\x2F\x23","\x23\x72\x65\x67\x69\x6F\x6E\x63\x68\x65\x63\x6B","\x23\x67\x61\x6D\x65\x6D\x6F\x64\x65\x63\x68\x65\x63\x6B","\x23\x42\x61\x63\x6B\x74\x6F\x6D\x65\x6E\x75","\x77\x73\x73\x3A\x2F\x2F","\x61\x67\x61\x72\x2E\x69\x6F\x2F\x3F\x73\x65\x61\x72\x63\x68\x3D\x77\x73\x73\x3A\x2F\x2F","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x61\x67\x61\x72\x2E\x69\x6F\x2F\x3F\x73\x65\x61\x72\x63\x68\x3D\x77\x73\x73\x3A\x2F\x2F","\x73\x65\x6C\x65\x63\x74\x65\x64","\x70\x72\x6F\x70","\x23\x72\x65\x67\x69\x6F\x6E\x20\x6F\x70\x74\x69\x6F\x6E\x5B\x76\x61\x6C\x75\x65\x3D\x22","\x22\x5D","\x23\x67\x61\x6D\x65\x6D\x6F\x64\x65\x20\x6F\x70\x74\x69\x6F\x6E\x5B\x76\x61\x6C\x75\x65\x3D\x22\x3A\x70\x61\x72\x74\x79\x22\x5D","\x3A\x66\x66\x61","\x23\x67\x61\x6D\x65\x6D\x6F\x64\x65\x20\x6F\x70\x74\x69\x6F\x6E\x5B\x76\x61\x6C\x75\x65\x3D\x22\x22\x5D","\x3A\x74\x65\x61\x6D\x73","\x23\x67\x61\x6D\x65\x6D\x6F\x64\x65\x20\x6F\x70\x74\x69\x6F\x6E\x5B\x76\x61\x6C\x75\x65\x3D\x22\x3A\x74\x65\x61\x6D\x73\x22\x5D","\x3A\x65\x78\x70\x65\x72\x69\x6D\x65\x6E\x74\x61\x6C","\x23\x67\x61\x6D\x65\x6D\x6F\x64\x65\x20\x6F\x70\x74\x69\x6F\x6E\x5B\x76\x61\x6C\x75\x65\x3D\x22\x3A\x65\x78\x70\x65\x72\x69\x6D\x65\x6E\x74\x61\x6C\x22\x5D","\x32\x31\x30\x70\x78","\x20\x27\x77\x73\x73\x3A\x2F\x2F","\x27\x2E\x2E\x2E","\x73\x75\x63\x63\x65\x73\x73","\x21\x20\x3C\x2F\x62\x72\x3E\x20\x3C\x62\x75\x74\x74\x6F\x6E\x20\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x70\x6C\x61\x79\x20\x62\x74\x6E\x2D\x70\x72\x69\x6D\x61\x72\x79\x20\x62\x74\x6E\x2D\x6E\x65\x65\x64\x73\x2D\x73\x65\x72\x76\x65\x72\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x68\x69\x64\x65\x53\x65\x61\x72\x63\x68\x48\x75\x64\x28\x29\x3B\x70\x6C\x61\x79\x28\x29\x3B\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x31\x30\x70\x78\x3B\x62\x6F\x72\x64\x65\x72\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x64\x61\x72\x6B\x62\x6C\x75\x65\x3B\x22\x3E","\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E\x3C\x62\x72\x3E\x3C\x62\x75\x74\x74\x6F\x6E\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x73\x6D\x20\x62\x74\x6E\x2D\x77\x61\x72\x6E\x69\x6E\x67\x20\x62\x74\x6E\x2D\x73\x70\x65\x63\x74\x61\x74\x65\x20\x62\x74\x6E\x2D\x73\x70\x65\x63\x74\x61\x74\x65\x2D\x73\x68\x6F\x72\x74\x63\x75\x74\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x68\x69\x64\x65\x53\x65\x61\x72\x63\x68\x48\x75\x64\x28\x29\x3B\x20\x73\x74\x79\x6C\x65\x3D\x22\x77\x69\x64\x74\x68\x3A\x20\x31\x30\x30\x25\x3B\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x31\x30\x70\x78\x3B\x22\x3E","\x3A\x20","\x21","\x20\x27","\x66\x69\x6C\x74\x65\x72","\x6E\x6F\x74\x68\x69\x6E\x67","\x3C\x74\x65\x78\x74\x61\x72\x65\x61\x3E","\x61\x70\x70\x65\x6E\x64","\x62\x6F\x64\x79","\x68\x74\x6D\x6C","\x0A","\x6C\x6F\x67","\x73\x65\x6C\x65\x63\x74","\x63\x6F\x70\x79","\x65\x78\x65\x63\x43\x6F\x6D\x6D\x61\x6E\x64","\x23\x43\x6F\x70\x79\x54\x6B\x50\x77\x4C\x62","\x23\x74\x6F\x70\x35\x2D\x70\x6F\x73","\x3C\x65\x72\x20\x69\x64\x3D\x22\x43\x6F\x70\x79\x54\x6B\x50\x77\x4C\x62\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x3E\x53\x65\x72\x76\x65\x72\x3A\x20","\x3C\x62\x72\x3E\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x3A\x20","\x3C\x62\x72\x3E\x54\x65\x61\x6D\x62\x6F\x61\x72\x64\x3A","\x3C\x62\x72\x3E\x4D\x79\x20\x47\x61\x6D\x65\x20\x4E\x61\x6D\x65\x3A\x20","\x23\x6E\x69\x63\x6B","\x3C\x2F\x65\x72\x3E","\x23\x73\x65\x72\x76\x65\x72\x2D\x6A\x6F\x69\x6E","\x65\x72\x23\x43\x6F\x70\x79\x54\x6B\x50\x77\x4C\x62","\x67\x65\x74\x50\x6C\x61\x79\x65\x72\x53\x74\x61\x74\x65","\x70\x6C\x61\x79\x56\x69\x64\x65\x6F","\x70\x61\x75\x73\x65\x56\x69\x64\x65\x6F","\x23\x73\x65\x72\x76\x65\x72","\x23\x6A\x6F\x69\x6E\x2D\x70\x61\x72\x74\x79\x2D\x62\x74\x6E\x2D\x32","\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64","\x54\x65\x61\x6D\x62\x6F\x61\x72\x64","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x53\x6B\x69\x6E\x43\x68\x61\x6E\x67\x65\x72\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x69\x6D\x61\x67\x65\x3A\x20\x75\x72\x6C\x28","\x29\x3B\x20\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20","\x3B\x20\x62\x6F\x72\x64\x65\x72\x3A\x20\x31\x70\x78\x20\x73\x6F\x6C\x69\x64\x20\x62\x6C\x61\x63\x6B\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x35\x34\x30\x70\x78\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x35\x30\x30\x70\x78\x3B\x20\x22\x3B\x3E","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x53\x6B\x69\x6E\x43\x68\x61\x6E\x67\x65\x72\x68\x75\x64\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x64\x69\x73\x70\x6C\x61\x79\x3A\x62\x6C\x6F\x63\x6B\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x6C\x65\x66\x74\x3A\x20\x31\x30\x70\x78\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x72\x69\x67\x68\x74\x3A\x20\x31\x30\x70\x78\x3B\x22\x3E","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x53\x6B\x69\x6E\x43\x68\x61\x6E\x67\x65\x72\x74\x6F\x6F\x6C\x73\x68\x75\x64\x31\x22\x20\x61\x6C\x69\x67\x6E\x3D\x22\x6D\x69\x64\x64\x6C\x65\x22\x3E\x3C\x68\x35\x20\x63\x6C\x61\x73\x73\x3D\x22\x6D\x61\x69\x6E\x2D\x63\x6F\x6C\x6F\x72\x22\x3E\x3C\x62\x3E","\x3C\x2F\x62\x3E\x3C\x2F\x68\x35\x3E","\x3C\x70\x20\x73\x74\x79\x6C\x65\x3D\x22\x63\x6F\x6C\x6F\x72\x3A\x77\x68\x69\x74\x65\x3B\x20\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x31\x32\x70\x78\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x62\x6F\x74\x74\x6F\x6D\x3A\x20\x2D\x34\x70\x78\x3B\x22\x20\x61\x6C\x69\x67\x6E\x3D\x22\x6D\x69\x64\x64\x6C\x65\x22\x3E","\x3C\x62\x72\x3E\x3C\x62\x72\x3E\x3C\x66\x6F\x6E\x74\x20\x69\x64\x3D\x20\x22\x4C\x65\x61\x64\x62\x6F\x61\x72\x64\x6C\x65\x74\x31\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x63\x6F\x6C\x6F\x72\x3A\x77\x68\x69\x74\x65\x3B\x20\x73\x69\x7A\x65\x3A\x31\x32\x70\x78\x3B\x20\x22\x3E","\x3C\x2F\x70\x3E\x3C\x62\x72\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x49\x6E\x70\x75\x74\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x4E\x69\x63\x6B\x6E\x61\x6D\x65\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x30\x70\x78\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x72\x69\x67\x68\x74\x3A\x20\x32\x70\x78\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x33\x30\x25\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x69\x6E\x6C\x69\x6E\x65\x3B\x20\x22\x20\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x74\x6F\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x22\x20\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x49\x6E\x70\x75\x74\x32\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x4E\x69\x63\x6B\x6E\x61\x6D\x65\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x30\x70\x78\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x72\x69\x67\x68\x74\x3A\x20\x32\x70\x78\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x33\x30\x25\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x69\x6E\x6C\x69\x6E\x65\x3B\x22\x20\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x74\x6F\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x22\x20\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x49\x6E\x70\x75\x74\x33\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x4E\x69\x63\x6B\x6E\x61\x6D\x65\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x30\x70\x78\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x72\x69\x67\x68\x74\x3A\x20\x32\x70\x78\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x33\x30\x25\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x69\x6E\x6C\x69\x6E\x65\x3B\x22\x20\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x74\x6F\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x22\x20\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x49\x6E\x70\x75\x74\x34\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x4E\x69\x63\x6B\x6E\x61\x6D\x65\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x30\x70\x78\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x72\x69\x67\x68\x74\x3A\x20\x32\x70\x78\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x33\x30\x25\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x69\x6E\x6C\x69\x6E\x65\x3B\x22\x20\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x74\x6F\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x22\x20\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x49\x6E\x70\x75\x74\x35\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x4E\x69\x63\x6B\x6E\x61\x6D\x65\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x30\x70\x78\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x72\x69\x67\x68\x74\x3A\x20\x32\x70\x78\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x33\x30\x25\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x69\x6E\x6C\x69\x6E\x65\x3B\x22\x20\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x74\x6F\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x22\x20\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x49\x6E\x70\x75\x74\x36\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x4E\x69\x63\x6B\x6E\x61\x6D\x65\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x30\x70\x78\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x72\x69\x67\x68\x74\x3A\x20\x32\x70\x78\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x33\x30\x25\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x69\x6E\x6C\x69\x6E\x65\x3B\x22\x20\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x74\x6F\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x22\x20\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x49\x6E\x70\x75\x74\x37\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x4E\x69\x63\x6B\x6E\x61\x6D\x65\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x30\x70\x78\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x72\x69\x67\x68\x74\x3A\x20\x32\x70\x78\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x33\x30\x25\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x69\x6E\x6C\x69\x6E\x65\x3B\x22\x20\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x74\x6F\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x22\x20\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x49\x6E\x70\x75\x74\x38\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x4E\x69\x63\x6B\x6E\x61\x6D\x65\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x30\x70\x78\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x72\x69\x67\x68\x74\x3A\x20\x32\x70\x78\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x33\x30\x25\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x69\x6E\x6C\x69\x6E\x65\x3B\x22\x20\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x74\x6F\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x22\x20\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x49\x6E\x70\x75\x74\x39\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x4E\x69\x63\x6B\x6E\x61\x6D\x65\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x30\x70\x78\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x72\x69\x67\x68\x74\x3A\x20\x32\x70\x78\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x33\x30\x25\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x69\x6E\x6C\x69\x6E\x65\x3B\x22\x20\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x74\x6F\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x22\x20\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x49\x6E\x70\x75\x74\x31\x30\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x4E\x69\x63\x6B\x6E\x61\x6D\x65\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x30\x70\x78\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x72\x69\x67\x68\x74\x3A\x20\x32\x70\x78\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x33\x30\x25\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x69\x6E\x6C\x69\x6E\x65\x3B\x22\x20\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x74\x6F\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x22\x20\x3E","\x3C\x2F\x64\x69\x76\x3E\x3C\x70\x20\x73\x74\x79\x6C\x65\x3D\x22\x63\x6F\x6C\x6F\x72\x3A\x77\x68\x69\x74\x65\x3B\x20\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x31\x32\x70\x78\x22\x3B\x22\x20\x61\x6C\x69\x67\x6E\x3D\x22\x6D\x69\x64\x64\x6C\x65\x22\x3E","\x3C\x62\x72\x3E","\x3C\x2F\x75\x3E\x3C\x2F\x70\x3E","\x3C\x2F\x64\x69\x76\x3E\x3C\x2F\x64\x69\x76\x3E","\x23\x6D\x65\x6E\x75\x2D\x66\x6F\x6F\x74\x65\x72","\x36\x30\x25","\x23\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x49\x6E\x70\x75\x74\x31","\x23\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x49\x6E\x70\x75\x74\x32","\x23\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x49\x6E\x70\x75\x74\x33","\x23\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x49\x6E\x70\x75\x74\x34","\x23\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x49\x6E\x70\x75\x74\x35","\x23\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x49\x6E\x70\x75\x74\x36","\x23\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x49\x6E\x70\x75\x74\x37","\x23\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x49\x6E\x70\x75\x74\x38","\x23\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x49\x6E\x70\x75\x74\x39","\x23\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x49\x6E\x70\x75\x74\x31\x30","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x53\x6B\x69\x6E\x42\x61\x63\x6B\x74\x6F\x6D\x65\x6E\x75\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x65\x78\x69\x74\x53\x6B\x69\x6E\x43\x68\x61\x6E\x67\x65\x72\x28\x29\x3B\x20\x72\x65\x74\x75\x72\x6E\x20\x66\x61\x6C\x73\x65\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x64\x61\x6E\x67\x65\x72\x22\x20\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x6C\x65\x66\x74\x3A\x20\x31\x30\x70\x78\x3B\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x22\x20\x74\x69\x74\x6C\x65\x3D\x22\x22\x3E","\x23\x53\x6B\x69\x6E\x43\x68\x61\x6E\x67\x65\x72\x68\x75\x64","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x49\x63\x6F\x6E\x46\x61\x6B\x65\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x69\x6E\x66\x6F\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x4C\x65\x61\x64\x65\x72\x31\x31\x28\x29\x3B\x72\x65\x74\x75\x72\x6E\x20\x66\x61\x6C\x73\x65\x3B\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x77\x70\x65\x78\x70\x6C\x6F\x72\x65\x72\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x49\x63\x6F\x6E\x46\x61\x6B\x65\x32\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x69\x6E\x66\x6F\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x4C\x65\x61\x64\x65\x72\x31\x32\x28\x29\x3B\x72\x65\x74\x75\x72\x6E\x20\x66\x61\x6C\x73\x65\x3B\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x77\x70\x65\x78\x70\x6C\x6F\x72\x65\x72\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x49\x63\x6F\x6E\x46\x61\x6B\x65\x33\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x69\x6E\x66\x6F\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x4C\x65\x61\x64\x65\x72\x31\x33\x28\x29\x3B\x72\x65\x74\x75\x72\x6E\x20\x66\x61\x6C\x73\x65\x3B\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x77\x70\x65\x78\x70\x6C\x6F\x72\x65\x72\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x49\x63\x6F\x6E\x46\x61\x6B\x65\x34\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x69\x6E\x66\x6F\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x4C\x65\x61\x64\x65\x72\x31\x34\x28\x29\x3B\x72\x65\x74\x75\x72\x6E\x20\x66\x61\x6C\x73\x65\x3B\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x77\x70\x65\x78\x70\x6C\x6F\x72\x65\x72\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x49\x63\x6F\x6E\x46\x61\x6B\x65\x35\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x69\x6E\x66\x6F\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x4C\x65\x61\x64\x65\x72\x31\x35\x28\x29\x3B\x72\x65\x74\x75\x72\x6E\x20\x66\x61\x6C\x73\x65\x3B\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x77\x70\x65\x78\x70\x6C\x6F\x72\x65\x72\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x49\x63\x6F\x6E\x46\x61\x6B\x65\x36\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x69\x6E\x66\x6F\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x4C\x65\x61\x64\x65\x72\x31\x36\x28\x29\x3B\x72\x65\x74\x75\x72\x6E\x20\x66\x61\x6C\x73\x65\x3B\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x77\x70\x65\x78\x70\x6C\x6F\x72\x65\x72\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x49\x63\x6F\x6E\x46\x61\x6B\x65\x37\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x69\x6E\x66\x6F\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x4C\x65\x61\x64\x65\x72\x31\x37\x28\x29\x3B\x72\x65\x74\x75\x72\x6E\x20\x66\x61\x6C\x73\x65\x3B\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x77\x70\x65\x78\x70\x6C\x6F\x72\x65\x72\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x49\x63\x6F\x6E\x46\x61\x6B\x65\x38\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x69\x6E\x66\x6F\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x4C\x65\x61\x64\x65\x72\x31\x38\x28\x29\x3B\x72\x65\x74\x75\x72\x6E\x20\x66\x61\x6C\x73\x65\x3B\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x77\x70\x65\x78\x70\x6C\x6F\x72\x65\x72\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x49\x63\x6F\x6E\x46\x61\x6B\x65\x39\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x69\x6E\x66\x6F\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x4C\x65\x61\x64\x65\x72\x31\x39\x28\x29\x3B\x72\x65\x74\x75\x72\x6E\x20\x66\x61\x6C\x73\x65\x3B\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x77\x70\x65\x78\x70\x6C\x6F\x72\x65\x72\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x49\x63\x6F\x6E\x46\x61\x6B\x65\x31\x30\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x69\x6E\x66\x6F\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x4C\x65\x61\x64\x65\x72\x32\x30\x28\x29\x3B\x72\x65\x74\x75\x72\x6E\x20\x66\x61\x6C\x73\x65\x3B\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x77\x70\x65\x78\x70\x6C\x6F\x72\x65\x72\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x54\x65\x61\x6D\x62\x6F\x61\x72\x64\x49\x63\x6F\x6E\x46\x61\x6B\x65\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x69\x6E\x66\x6F\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x54\x65\x61\x6D\x65\x72\x31\x31\x28\x29\x3B\x72\x65\x74\x75\x72\x6E\x20\x66\x61\x6C\x73\x65\x3B\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x77\x70\x65\x78\x70\x6C\x6F\x72\x65\x72\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x23\x54\x65\x61\x6D\x62\x6F\x61\x72\x64\x49\x6E\x70\x75\x74\x31","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x54\x65\x61\x6D\x62\x6F\x61\x72\x64\x49\x63\x6F\x6E\x46\x61\x6B\x65\x32\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x69\x6E\x66\x6F\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x54\x65\x61\x6D\x65\x72\x31\x32\x28\x29\x3B\x72\x65\x74\x75\x72\x6E\x20\x66\x61\x6C\x73\x65\x3B\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x77\x70\x65\x78\x70\x6C\x6F\x72\x65\x72\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x23\x54\x65\x61\x6D\x62\x6F\x61\x72\x64\x49\x6E\x70\x75\x74\x32","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x54\x65\x61\x6D\x62\x6F\x61\x72\x64\x49\x63\x6F\x6E\x46\x61\x6B\x65\x33\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x69\x6E\x66\x6F\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x54\x65\x61\x6D\x65\x72\x31\x33\x28\x29\x3B\x72\x65\x74\x75\x72\x6E\x20\x66\x61\x6C\x73\x65\x3B\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x77\x70\x65\x78\x70\x6C\x6F\x72\x65\x72\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x23\x54\x65\x61\x6D\x62\x6F\x61\x72\x64\x49\x6E\x70\x75\x74\x33","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x54\x65\x61\x6D\x62\x6F\x61\x72\x64\x49\x63\x6F\x6E\x46\x61\x6B\x65\x34\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x69\x6E\x66\x6F\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x54\x65\x61\x6D\x65\x72\x31\x34\x28\x29\x3B\x72\x65\x74\x75\x72\x6E\x20\x66\x61\x6C\x73\x65\x3B\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x77\x70\x65\x78\x70\x6C\x6F\x72\x65\x72\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x23\x54\x65\x61\x6D\x62\x6F\x61\x72\x64\x49\x6E\x70\x75\x74\x34","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x54\x65\x61\x6D\x62\x6F\x61\x72\x64\x49\x63\x6F\x6E\x46\x61\x6B\x65\x35\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x69\x6E\x66\x6F\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x54\x65\x61\x6D\x65\x72\x31\x35\x28\x29\x3B\x72\x65\x74\x75\x72\x6E\x20\x66\x61\x6C\x73\x65\x3B\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x77\x70\x65\x78\x70\x6C\x6F\x72\x65\x72\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x23\x54\x65\x61\x6D\x62\x6F\x61\x72\x64\x49\x6E\x70\x75\x74\x35","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x54\x65\x61\x6D\x62\x6F\x61\x72\x64\x49\x63\x6F\x6E\x46\x61\x6B\x65\x36\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x69\x6E\x66\x6F\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x54\x65\x61\x6D\x65\x72\x31\x36\x28\x29\x3B\x72\x65\x74\x75\x72\x6E\x20\x66\x61\x6C\x73\x65\x3B\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x77\x70\x65\x78\x70\x6C\x6F\x72\x65\x72\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x23\x54\x65\x61\x6D\x62\x6F\x61\x72\x64\x49\x6E\x70\x75\x74\x36","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x54\x65\x61\x6D\x62\x6F\x61\x72\x64\x49\x63\x6F\x6E\x46\x61\x6B\x65\x37\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x69\x6E\x66\x6F\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x54\x65\x61\x6D\x65\x72\x31\x37\x28\x29\x3B\x72\x65\x74\x75\x72\x6E\x20\x66\x61\x6C\x73\x65\x3B\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x77\x70\x65\x78\x70\x6C\x6F\x72\x65\x72\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x23\x54\x65\x61\x6D\x62\x6F\x61\x72\x64\x49\x6E\x70\x75\x74\x37","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x54\x65\x61\x6D\x62\x6F\x61\x72\x64\x49\x63\x6F\x6E\x46\x61\x6B\x65\x38\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x69\x6E\x66\x6F\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x54\x65\x61\x6D\x65\x72\x31\x38\x28\x29\x3B\x72\x65\x74\x75\x72\x6E\x20\x66\x61\x6C\x73\x65\x3B\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x77\x70\x65\x78\x70\x6C\x6F\x72\x65\x72\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x23\x54\x65\x61\x6D\x62\x6F\x61\x72\x64\x49\x6E\x70\x75\x74\x38","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x54\x65\x61\x6D\x62\x6F\x61\x72\x64\x49\x63\x6F\x6E\x46\x61\x6B\x65\x39\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x69\x6E\x66\x6F\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x54\x65\x61\x6D\x65\x72\x31\x39\x28\x29\x3B\x72\x65\x74\x75\x72\x6E\x20\x66\x61\x6C\x73\x65\x3B\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x77\x70\x65\x78\x70\x6C\x6F\x72\x65\x72\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x23\x54\x65\x61\x6D\x62\x6F\x61\x72\x64\x49\x6E\x70\x75\x74\x39","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x54\x65\x61\x6D\x62\x6F\x61\x72\x64\x49\x63\x6F\x6E\x46\x61\x6B\x65\x31\x30\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x69\x6E\x66\x6F\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x54\x65\x61\x6D\x65\x72\x32\x30\x28\x29\x3B\x72\x65\x74\x75\x72\x6E\x20\x66\x61\x6C\x73\x65\x3B\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x77\x70\x65\x78\x70\x6C\x6F\x72\x65\x72\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x23\x54\x65\x61\x6D\x62\x6F\x61\x72\x64\x49\x6E\x70\x75\x74\x31\x30","\x74\x65\x61\x6D\x50\x6C\x61\x79\x65\x72\x73","\x6E\x69\x63\x6B","\x23\x54\x65\x61\x6D\x62\x6F\x61\x72\x64\x49\x6E\x70\x75\x74","\x6C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64","\x23\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x49\x6E\x70\x75\x74","\x23\x6D\x61\x69\x6E\x2D\x6D\x65\x6E\x75","\x23\x73\x6B\x69\x6E\x73\x2D\x70\x61\x6E\x65\x6C","\x23\x71\x75\x69\x63\x6B\x2D\x6D\x65\x6E\x75","\x23\x65\x78\x70\x2D\x62\x61\x72","\x23\x53\x6B\x69\x6E\x43\x68\x61\x6E\x67\x65\x72","\x73\x6B\x69\x6E\x55\x52\x4C\x42\x65\x66\x6F\x72\x65","\x73\x6B\x69\x6E\x55\x52\x4C","\x6E\x69\x63\x6B\x42\x65\x66\x6F\x72\x65","\x70\x6C\x61\x79\x65\x72\x43\x6F\x6C\x6F\x72\x42\x65\x66\x6F\x72\x65","\x70\x6C\x61\x79\x65\x72\x43\x6F\x6C\x6F\x72","\x70\x6C\x61\x79\x42\x65\x66\x6F\x72\x65","\x70\x6C\x61\x79","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x62\x61\x6E\x6E\x65\x72\x73\x2F\x69\x63\x6F\x6E\x66\x61\x6B\x65\x31\x2E\x70\x6E\x67","\x73\x65\x6E\x64\x53\x65\x72\x76\x65\x72\x4A\x6F\x69\x6E","\x73\x65\x6E\x64\x50\x6C\x61\x79\x65\x72\x55\x70\x64\x61\x74\x65","\x73\x65\x6E\x64\x50\x6C\x61\x79\x65\x72\x4A\x6F\x69\x6E","\x23\x74\x65\x6D\x70\x43\x6F\x70\x79","\x3C\x6C\x61\x62\x65\x6C\x3E\x3C\x69\x6E\x70\x75\x74\x20\x74\x79\x70\x65\x3D\x22\x63\x68\x65\x63\x6B\x62\x6F\x78\x22\x20\x69\x64\x3D\x22\x65\x78\x70\x6F\x72\x74\x2D\x4C\x65\x67\x65\x6E\x64\x53\x65\x74\x74\x69\x6E\x67\x73\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x6A\x73\x2D\x73\x77\x69\x74\x63\x68\x22\x20\x64\x61\x74\x61\x2D\x73\x77\x69\x74\x63\x68\x65\x72\x79\x3D\x22\x74\x72\x75\x65\x22\x20\x63\x68\x65\x63\x6B\x65\x64\x20\x73\x74\x79\x6C\x65\x3D\x22\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x3E\x20\x41\x50\x49\x3C\x2F\x6C\x61\x62\x65\x6C\x3E","\x23\x65\x78\x70\x6F\x72\x74\x2D\x73\x65\x74\x74\x69\x6E\x67\x73","\x23\x65\x78\x70\x6F\x72\x74\x2D\x4C\x65\x67\x65\x6E\x64\x53\x65\x74\x74\x69\x6E\x67\x73","\x71\x75\x65\x72\x79\x53\x65\x6C\x65\x63\x74\x6F\x72","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72","\x6E\x65\x78\x74","\x69\x6E\x70\x75\x74\x23\x65\x78\x70\x6F\x72\x74\x2D\x6F\x67\x61\x72\x69\x6F\x54\x68\x65\x6D\x65\x53\x65\x74\x74\x69\x6E\x67\x73\x2E\x6A\x73\x2D\x73\x77\x69\x74\x63\x68","\x73\x6D\x61\x6C\x6C","\x72\x67\x62\x28\x32\x35\x30\x2C\x20\x32\x35\x30\x2C\x20\x32\x35\x30\x29","\x3C\x6C\x61\x62\x65\x6C\x3E\x3C\x69\x6E\x70\x75\x74\x20\x74\x79\x70\x65\x3D\x22\x63\x68\x65\x63\x6B\x62\x6F\x78\x22\x20\x69\x64\x3D\x22\x69\x6D\x70\x6F\x72\x74\x2D\x4C\x65\x67\x65\x6E\x64\x53\x65\x74\x74\x69\x6E\x67\x73\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x6A\x73\x2D\x73\x77\x69\x74\x63\x68\x22\x20\x64\x61\x74\x61\x2D\x73\x77\x69\x74\x63\x68\x65\x72\x79\x3D\x22\x74\x72\x75\x65\x22\x20\x63\x68\x65\x63\x6B\x65\x64\x20\x73\x74\x79\x6C\x65\x3D\x22\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x3E\x20\x41\x50\x49\x3C\x2F\x6C\x61\x62\x65\x6C\x3E","\x23\x69\x6D\x70\x6F\x72\x74\x2D\x73\x65\x74\x74\x69\x6E\x67\x73","\x23\x69\x6D\x70\x6F\x72\x74\x2D\x4C\x65\x67\x65\x6E\x64\x53\x65\x74\x74\x69\x6E\x67\x73","\x76\x61\x6C\x75\x65","\x65\x78\x70\x6F\x72\x74\x2D\x73\x65\x74\x74\x69\x6E\x67\x73","\x67\x65\x74\x45\x6C\x65\x6D\x65\x6E\x74\x42\x79\x49\x64","\x23\x65\x78\x70\x6F\x72\x74\x2D\x73\x65\x74\x74\x69\x6E\x67\x73\x2D\x62\x74\x6E","\x69\x6D\x70\x6F\x72\x74\x2D\x73\x65\x74\x74\x69\x6E\x67\x73\x2D\x62\x74\x6E\x32","\x23\x69\x6D\x70\x6F\x72\x74\x2D\x73\x65\x74\x74\x69\x6E\x67\x73\x2D\x62\x74\x6E","\x69\x6E\x73\x65\x72\x74\x41\x66\x74\x65\x72","\x63\x6C\x6F\x6E\x65","\x23\x69\x6D\x70\x6F\x72\x74\x2D\x73\x65\x74\x74\x69\x6E\x67\x73\x2D\x62\x74\x6E\x32","\x69\x73\x43\x68\x65\x63\x6B\x65\x64","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x6C\x65\x67\x65\x6E\x64\x53\x65\x74\x74\x69\x6E\x67\x73","\x70\x72\x65\x76\x69\x6F\x75\x73\x4D\x6F\x64\x65","\x73\x68\x6F\x77\x54\x6F\x6B\x65\x6E","\x69\x6E\x69\x74\x69\x61\x6C\x4D\x75\x73\x69\x63\x55\x72\x6C","\x6D\x75\x73\x69\x63\x55\x72\x6C","\x6E\x6F\x74\x65\x31","\x6E\x6F\x74\x65\x32","\x6E\x6F\x74\x65\x33","\x6E\x6F\x74\x65\x34","\x6E\x6F\x74\x65\x35","\x6E\x6F\x74\x65\x36","\x6E\x6F\x74\x65\x37","\x6D\x69\x6E\x69\x6D\x61\x70\x62\x63\x6B\x69\x6D\x67","\x74\x65\x61\x6D\x62\x69\x6D\x67","\x63\x61\x6E\x76\x61\x73\x62\x69\x6D\x67","\x6C\x65\x61\x64\x62\x69\x6D\x67","\x70\x69\x63\x31\x75\x72\x6C\x69\x6D\x67","\x70\x69\x63\x32\x75\x72\x6C\x69\x6D\x67","\x70\x69\x63\x33\x75\x72\x6C\x69\x6D\x67","\x70\x69\x63\x34\x75\x72\x6C\x69\x6D\x67","\x70\x69\x63\x35\x75\x72\x6C\x69\x6D\x67","\x70\x69\x63\x36\x75\x72\x6C\x69\x6D\x67","\x79\x74\x31\x75\x72\x6C\x69\x6D\x67","\x79\x74\x32\x75\x72\x6C\x69\x6D\x67","\x79\x74\x33\x75\x72\x6C\x69\x6D\x67","\x79\x74\x34\x75\x72\x6C\x69\x6D\x67","\x79\x74\x35\x75\x72\x6C\x69\x6D\x67","\x79\x74\x36\x75\x72\x6C\x69\x6D\x67","\x70\x69\x63\x31\x64\x61\x74\x61\x69\x6D\x67","\x70\x69\x63\x32\x64\x61\x74\x61\x69\x6D\x67","\x70\x69\x63\x33\x64\x61\x74\x61\x69\x6D\x67","\x70\x69\x63\x34\x64\x61\x74\x61\x69\x6D\x67","\x70\x69\x63\x35\x64\x61\x74\x61\x69\x6D\x67","\x70\x69\x63\x36\x64\x61\x74\x61\x69\x6D\x67","\x79\x74\x31\x64\x61\x74\x61\x69\x6D\x67","\x79\x74\x32\x64\x61\x74\x61\x69\x6D\x67","\x79\x74\x33\x64\x61\x74\x61\x69\x6D\x67","\x79\x74\x34\x64\x61\x74\x61\x69\x6D\x67","\x79\x74\x35\x64\x61\x74\x61\x69\x6D\x67","\x79\x74\x36\x64\x61\x74\x61\x69\x6D\x67","\x64\x69\x73\x63\x77\x65\x62\x68\x6F\x6F\x6B\x31","\x64\x69\x73\x63\x77\x65\x62\x68\x6F\x6F\x6B\x32","\x55\x73\x65\x72\x73\x63\x72\x69\x70\x74\x31","\x55\x73\x65\x72\x73\x63\x72\x69\x70\x74\x32","\x55\x73\x65\x72\x73\x63\x72\x69\x70\x74\x33","\x55\x73\x65\x72\x73\x63\x72\x69\x70\x74\x34","\x55\x73\x65\x72\x73\x63\x72\x69\x70\x74\x35","\x55\x73\x65\x72\x73\x63\x72\x69\x70\x74\x74\x65\x78\x74\x75\x72\x65\x31","\x55\x73\x65\x72\x73\x63\x72\x69\x70\x74\x74\x65\x78\x74\x75\x72\x65\x32","\x55\x73\x65\x72\x73\x63\x72\x69\x70\x74\x74\x65\x78\x74\x75\x72\x65\x33","\x55\x73\x65\x72\x73\x63\x72\x69\x70\x74\x74\x65\x78\x74\x75\x72\x65\x34","\x55\x73\x65\x72\x73\x63\x72\x69\x70\x74\x74\x65\x78\x74\x75\x72\x65\x35","\x69\x6D\x70\x6F\x72\x74\x2D\x73\x65\x74\x74\x69\x6E\x67\x73","\x23\x6D\x75\x73\x69\x63\x55\x72\x6C","\x73\x72\x63","\x23\x6D\x75\x73\x69\x63\x46\x72\x61\x6D\x65","\x5B\x75\x72\x6C\x5D","\x2E\x6D\x65\x73\x73\x61\x67\x65\x2D\x74\x65\x78\x74","\x2E\x74\x6F\x61\x73\x74\x2E\x74\x6F\x61\x73\x74\x2D\x73\x75\x63\x63\x65\x73\x73","\x70\x6F\x70","\x5B\x2F\x75\x72\x6C\x5D","\x68\x74\x74\x70\x73\x3A\x2F\x2F","\x48\x54\x54\x50\x3A\x2F\x2F","\x48\x54\x54\x50\x53\x3A\x2F\x2F","\x32\x35\x30\x70\x78","\x20","\x3A\x20\x3C\x61\x20\x69\x64\x3D\x22\x76\x69\x73\x69\x74\x75\x72\x6C\x22\x20\x68\x72\x65\x66\x3D","\x20\x74\x61\x72\x67\x65\x74\x3D\x22\x5F\x62\x6C\x61\x6E\x6B\x22\x3E\x3C\x66\x6F\x6E\x74\x20\x63\x6F\x6C\x6F\x72\x3D\x22\x62\x6C\x75\x65\x22\x3E","\x3C\x2F\x66\x6F\x6E\x74\x3E\x3C\x2F\x61\x3E\x3C\x2F\x62\x72\x3E\x20\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x61\x63\x63\x65\x70\x74\x55\x52\x4C\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x62\x6C\x6F\x63\x6B\x20\x62\x74\x6E\x2D\x69\x6E\x66\x6F\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x31\x30\x70\x78\x3B\x62\x6F\x72\x64\x65\x72\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x64\x61\x72\x6B\x62\x6C\x75\x65\x3B\x22\x3E","\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E\x3C\x62\x72\x3E\x3C\x62\x75\x74\x74\x6F\x6E\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x73\x6D\x20\x62\x74\x6E\x2D\x77\x61\x72\x6E\x69\x6E\x67\x20\x62\x74\x6E\x2D\x73\x70\x65\x63\x74\x61\x74\x65\x20\x62\x74\x6E\x2D\x6E\x6F\x64\x6F\x2D\x68\x69\x64\x65\x61\x6C\x6C\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x77\x69\x64\x74\x68\x3A\x20\x31\x30\x30\x25\x3B\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x2D\x31\x30\x70\x78\x3B\x22\x3E","\x5F\x62\x6C\x61\x6E\x6B","\x23\x61\x63\x63\x65\x70\x74\x55\x52\x4C","\x5B\x74\x61\x67\x5D","\x74\x61\x67","\x5B\x2F\x74\x61\x67\x5D","\x3A\x20\x3C\x69\x20\x69\x64\x3D\x22\x76\x69\x73\x69\x74\x75\x72\x6C\x22\x20\x68\x72\x65\x66\x3D","\x3C\x2F\x66\x6F\x6E\x74\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x72\x3E\x20\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x61\x63\x63\x65\x70\x74\x55\x52\x4C\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x62\x6C\x6F\x63\x6B\x20\x62\x74\x6E\x2D\x69\x6E\x66\x6F\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x31\x30\x70\x78\x3B\x62\x6F\x72\x64\x65\x72\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x64\x61\x72\x6B\x62\x6C\x75\x65\x3B\x22\x3E","\x23\x63\x6C\x61\x6E\x74\x61\x67","\x23\x66\x66\x36\x33\x34\x37","\x5B\x79\x75\x74\x5D","\x79\x75\x74","\x5B\x2F\x79\x75\x74\x5D","\x3C\x2F\x66\x6F\x6E\x74\x3E\x3C\x2F\x61\x3E\x3C\x2F\x62\x72\x3E\x20\x3C\x69\x66\x72\x61\x6D\x65\x20\x74\x79\x70\x65\x3D\x22\x74\x65\x78\x74\x2F\x68\x74\x6D\x6C\x22\x20\x77\x69\x64\x74\x68\x3D\x22\x31\x30\x30\x25\x22\x20\x68\x65\x69\x67\x68\x74\x3D\x22\x61\x75\x74\x6F\x22\x20\x73\x72\x63\x3D\x22\x68\x74\x74\x70\x73\x3A\x2F\x2F\x77\x77\x77\x2E\x79\x6F\x75\x74\x75\x62\x65\x2E\x63\x6F\x6D\x2F\x65\x6D\x62\x65\x64\x2F","\x3F\x61\x75\x74\x6F\x70\x6C\x61\x79\x3D\x31\x26\x61\x6D\x70\x3B\x76\x71\x3D\x74\x69\x6E\x79\x22\x20\x66\x72\x61\x6D\x65\x62\x6F\x72\x64\x65\x72\x3D\x22\x30\x22\x3E\x3C\x2F\x69\x66\x72\x61\x6D\x65\x3E\x3C\x2F\x62\x72\x3E\x20\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x61\x63\x63\x65\x70\x74\x59\x6F\x75\x74\x75\x62\x65\x45\x6D\x62\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x62\x6C\x6F\x63\x6B\x20\x62\x74\x6E\x2D\x69\x6E\x66\x6F\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x31\x30\x70\x78\x3B\x62\x6F\x72\x64\x65\x72\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x64\x61\x72\x6B\x62\x6C\x75\x65\x3B\x22\x3E","\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E\x3C\x62\x72\x3E\x3C\x62\x75\x74\x74\x6F\x6E\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x73\x6D\x20\x62\x74\x6E\x2D\x77\x61\x72\x6E\x69\x6E\x67\x20\x62\x74\x6E\x2D\x73\x70\x65\x63\x74\x61\x74\x65\x20\x62\x74\x6E\x2D\x6E\x6F\x64\x6F\x2D\x68\x69\x64\x65\x61\x6C\x6C\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x2D\x31\x30\x70\x78\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x30\x30\x25\x22\x3E","\x23\x61\x63\x63\x65\x70\x74\x59\x6F\x75\x74\x75\x62\x65\x45\x6D\x62","\x5B\x73\x6B\x79\x70\x65\x5D","\x73\x6B\x79\x70\x65","\x5B\x2F\x73\x6B\x79\x70\x65\x5D","\x6A\x6F\x69\x6E\x2E\x73\x6B\x79\x70\x65\x2E\x63\x6F\x6D\x2F","\x3C\x69\x6D\x67\x20\x73\x72\x63\x3D\x22\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x62\x61\x6E\x6E\x65\x72\x73\x2F\x69\x63\x6F\x6E\x73\x6B\x79\x70\x65\x2E\x70\x6E\x67\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x66\x6C\x6F\x61\x74\x3A\x6C\x65\x66\x74\x3B\x77\x69\x64\x74\x68\x3A\x31\x30\x30\x70\x78\x3B\x68\x65\x69\x67\x68\x74\x3A\x31\x30\x30\x70\x78\x3B\x22\x3E","\x5B\x64\x69\x73\x63\x6F\x72\x64\x5D","\x64\x69\x73\x63\x6F\x72\x64","\x5B\x2F\x64\x69\x73\x63\x6F\x72\x64\x5D","\x64\x69\x73\x63\x6F\x72\x64\x61\x70\x70\x2E\x63\x6F\x6D\x2F\x69\x6E\x76\x69\x74\x65","\x64\x69\x73\x63\x6F\x72\x64\x2E\x67\x67","\x64\x69\x73\x63\x6F\x72\x64\x2E\x63\x6F\x6D","\x3C\x69\x6D\x67\x20\x73\x72\x63\x3D\x22\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x62\x61\x6E\x6E\x65\x72\x73\x2F\x69\x63\x6F\x6E\x64\x69\x73\x63\x6F\x72\x64\x2E\x70\x6E\x67\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x66\x6C\x6F\x61\x74\x3A\x6C\x65\x66\x74\x3B\x77\x69\x64\x74\x68\x3A\x31\x30\x30\x70\x78\x3B\x68\x65\x69\x67\x68\x74\x3A\x31\x30\x30\x70\x78\x3B\x22\x3E","\x4C\x65\x67\x65\x6E\x64\x2E\x4D\x6F\x64","\x63\x6F\x6D","\x64\x6F","\x54\x65\x61\x6D\x35","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x69\x6D\x61\x67\x65","\x75\x72\x6C\x28\x22\x20\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x62\x61\x6E\x6E\x65\x72\x73\x2F\x69\x63\x6F\x67\x65\x6E\x65\x72\x61\x6C\x2E\x67\x69\x66\x20\x22\x29","\x23\x74\x6F\x70\x35\x2D\x68\x75\x64","\x75\x72\x6C\x28\x22\x20\x22\x29","\x48\x65\x6C\x6C\x6F","\x64\x69\x73\x70\x6C\x61\x79","\x23\x6D\x65\x73\x73\x61\x67\x65\x2D\x62\x6F\x78","\x6E\x6F\x6E\x65","\x48\x65\x6C\x6C\x6F\x20\x54\x65\x61\x6D","\x23\x68\x65\x6C\x6C\x6F\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x48\x69\x64\x65\x41\x6C\x6C","\x3C\x2F\x62\x72\x3E\x20\x3C\x62\x75\x74\x74\x6F\x6E\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x73\x6D\x20\x62\x74\x6E\x2D\x70\x72\x69\x6D\x61\x72\x79\x20\x62\x74\x6E\x2D\x70\x6C\x61\x79\x20\x62\x74\x6E\x2D\x64\x6F\x2D\x68\x69\x64\x65\x61\x6C\x6C\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x31\x30\x70\x78\x3B\x62\x6F\x72\x64\x65\x72\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x64\x61\x72\x6B\x62\x6C\x75\x65\x3B\x22\x3E","\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E\x3C\x62\x72\x3E\x3C\x62\x75\x74\x74\x6F\x6E\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x73\x6D\x20\x62\x74\x6E\x2D\x77\x61\x72\x6E\x69\x6E\x67\x20\x62\x74\x6E\x2D\x73\x70\x65\x63\x74\x61\x74\x65\x20\x62\x74\x6E\x2D\x6E\x6F\x64\x6F\x2D\x68\x69\x64\x65\x61\x6C\x6C\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x77\x69\x64\x74\x68\x3A\x20\x31\x30\x30\x25\x3B\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x31\x30\x70\x78\x3B\x22\x3E","\x23\x48\x69\x64\x65\x41\x6C\x6C\x42\x74\x68\x6E","\x2E\x62\x74\x6E\x2E\x62\x74\x6E\x2D\x73\x6D\x2E\x62\x74\x6E\x2D\x70\x72\x69\x6D\x61\x72\x79\x2E\x62\x74\x6E\x2D\x70\x6C\x61\x79\x2E\x62\x74\x6E\x2D\x64\x6F\x2D\x68\x69\x64\x65\x61\x6C\x6C","\x4E\x61\x6D\x65\x50\x65\x72\x6D","\x20\x3C\x2F\x62\x72\x3E\x20\x3C\x62\x75\x74\x74\x6F\x6E\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x73\x6D\x20\x62\x74\x6E\x2D\x70\x72\x69\x6D\x61\x72\x79\x20\x62\x74\x6E\x2D\x70\x6C\x61\x79\x20\x62\x74\x6E\x2D\x64\x6F\x2D\x4E\x61\x6D\x65\x50\x65\x72\x6D\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x31\x30\x70\x78\x3B\x62\x6F\x72\x64\x65\x72\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x64\x61\x72\x6B\x62\x6C\x75\x65\x3B\x22\x3E","\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E\x3C\x62\x72\x3E\x3C\x62\x75\x74\x74\x6F\x6E\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x73\x6D\x20\x62\x74\x6E\x2D\x77\x61\x72\x6E\x69\x6E\x67\x20\x62\x74\x6E\x2D\x73\x70\x65\x63\x74\x61\x74\x65\x20\x62\x74\x6E\x2D\x6E\x6F\x64\x6F\x2D\x4E\x61\x6D\x65\x50\x65\x72\x6D\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x77\x69\x64\x74\x68\x3A\x20\x31\x30\x30\x25\x3B\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x31\x30\x70\x78\x3B\x22\x3E","\x2E\x62\x74\x6E\x2E\x62\x74\x6E\x2D\x73\x6D\x2E\x62\x74\x6E\x2D\x70\x72\x69\x6D\x61\x72\x79\x2E\x62\x74\x6E\x2D\x70\x6C\x61\x79\x2E\x62\x74\x6E\x2D\x64\x6F\x2D\x4E\x61\x6D\x65\x50\x65\x72\x6D","\x64\x54\x72\x6F\x6C\x6C\x32","\x3C\x2F\x62\x72\x3E\x20\x3C\x62\x75\x74\x74\x6F\x6E\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x73\x6D\x20\x62\x74\x6E\x2D\x70\x72\x69\x6D\x61\x72\x79\x20\x62\x74\x6E\x2D\x70\x6C\x61\x79\x20\x62\x74\x6E\x2D\x64\x6F\x2D\x74\x72\x6F\x6C\x6C\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x31\x30\x70\x78\x3B\x62\x6F\x72\x64\x65\x72\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x64\x61\x72\x6B\x62\x6C\x75\x65\x3B\x22\x3E","\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E\x3C\x62\x72\x3E\x3C\x62\x75\x74\x74\x6F\x6E\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x73\x6D\x20\x62\x74\x6E\x2D\x77\x61\x72\x6E\x69\x6E\x67\x20\x62\x74\x6E\x2D\x73\x70\x65\x63\x74\x61\x74\x65\x20\x62\x74\x6E\x2D\x6E\x6F\x64\x6F\x2D\x74\x72\x6F\x6C\x6C\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x77\x69\x64\x74\x68\x3A\x20\x31\x30\x30\x25\x3B\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x31\x30\x70\x78\x3B\x22\x3E","\x2E\x62\x74\x6E\x2E\x62\x74\x6E\x2D\x73\x6D\x2E\x62\x74\x6E\x2D\x70\x72\x69\x6D\x61\x72\x79\x2E\x62\x74\x6E\x2D\x70\x6C\x61\x79\x2E\x62\x74\x6E\x2D\x64\x6F\x2D\x74\x72\x6F\x6C\x6C","\x59\x6F\x75\x74\x75\x62\x65","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x73\x6D\x20\x62\x74\x6E\x2D\x70\x72\x69\x6D\x61\x72\x79\x20\x62\x74\x6E\x2D\x70\x6C\x61\x79\x20\x62\x74\x6E\x2D\x70\x6C\x61\x79\x2D\x79\x6F\x75\x74\x75\x62\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x31\x30\x70\x78\x3B\x62\x6F\x72\x64\x65\x72\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x64\x61\x72\x6B\x62\x6C\x75\x65\x3B\x22\x3E","\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E\x3C\x62\x72\x3E\x3C\x62\x75\x74\x74\x6F\x6E\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x73\x6D\x20\x62\x74\x6E\x2D\x77\x61\x72\x6E\x69\x6E\x67\x20\x62\x74\x6E\x2D\x73\x70\x65\x63\x74\x61\x74\x65\x20\x62\x74\x6E\x2D\x6E\x6F\x70\x6C\x61\x79\x2D\x79\x6F\x75\x74\x75\x62\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x77\x69\x64\x74\x68\x3A\x20\x31\x30\x30\x25\x3B\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x31\x30\x70\x78\x3B\x22\x3E","\x23\x70\x6C\x61\x79\x65\x72\x42\x74\x6E","\x66\x6F\x63\x75\x73\x6F\x75\x74","\x2E\x62\x74\x6E\x2E\x62\x74\x6E\x2D\x73\x6D\x2E\x62\x74\x6E\x2D\x70\x72\x69\x6D\x61\x72\x79\x2E\x62\x74\x6E\x2D\x70\x6C\x61\x79\x2E\x62\x74\x6E\x2D\x70\x6C\x61\x79\x2D\x79\x6F\x75\x74\x75\x62\x65","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x61\x67\x61\x72\x2E\x69\x6F\x2F\x73\x69\x70\x3D\x31\x35\x31\x2E\x38\x30\x2E\x39\x31\x2E\x37\x33\x3A\x31\x35\x31\x31","\x53\x74\x65\x70\x31","\u2104","\x53\x74\x65\x70\x32","\x45\x55\x2D\x4C\x6F\x6E\x64\x6F\x6E","\x52\x55\x2D\x52\x75\x73\x73\x69\x61","\x5B\x44\x6F\x73\x41\x74\x74\x61\x63\x6B\x5D","\x44\x6F\x73\x41\x74\x74\x61\x63\x6B","\x5B\x2F\x44\x6F\x73\x41\x74\x74\x61\x63\x6B\x5D","\x2C","\x74\x61\x72\x67\x65\x74\x69\x6E\x67\x4C\x65\x61\x64\x63\x6C\x69\x65\x6E\x74\x58","\x74\x61\x72\x67\x65\x74\x69\x6E\x67\x4C\x65\x61\x64\x63\x6C\x69\x65\x6E\x74\x59","\x74\x61\x72\x67\x65\x74\x69\x6E\x67\x4C\x65\x61\x64\x58","\x6D\x61\x70\x4F\x66\x66\x73\x65\x74\x58","\x74\x61\x72\x67\x65\x74\x69\x6E\x67\x4C\x65\x61\x64\x59","\x6D\x61\x70\x4F\x66\x66\x73\x65\x74\x59","\x64\x72\x61\x77\x43\x6F\x6D\x6D\x61\x6E\x64\x65\x72\x32","\x3C\x62\x3E","\x3A\x3C\x2F\x62\x3E\x20\x41\x74\x74\x61\x63\x6B\x20","\x63\x61\x6C\x63\x75\x6C\x61\x74\x65\x4D\x61\x70\x53\x65\x63\x74\x6F\x72","\x5B\x44\x6F\x73\x46\x69\x67\x68\x74\x5D","\x44\x6F\x73\x46\x69\x67\x68\x74","\x5B\x2F\x44\x6F\x73\x46\x69\x67\x68\x74\x5D","\x3A\x3C\x2F\x62\x3E\x20\x46\x69\x67\x68\x74\x20","\x5B\x44\x6F\x73\x52\x75\x6E\x5D","\x44\x6F\x73\x52\x75\x6E","\x5B\x2F\x44\x6F\x73\x52\x75\x6E\x5D","\x3A\x3C\x2F\x62\x3E\x20\x52\x75\x6E\x20\x66\x72\x6F\x6D\x20","\x31","\x46\x61\x6C\x73\x65","\x5B\x73\x72\x76\x5D","\x5B\x2F\x73\x72\x76\x5D","\x23","\x3C\x64\x69\x76\x3E\x3C\x69\x6D\x67\x20\x73\x72\x63\x3D\x22\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x62\x61\x6E\x6E\x65\x72\x73\x2F\x69\x63\x6F\x6E\x61\x67\x61\x72\x69\x6F\x2E\x70\x6E\x67\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x66\x6C\x6F\x61\x74\x3A\x6C\x65\x66\x74\x3B\x77\x69\x64\x74\x68\x3A\x31\x30\x30\x70\x78\x3B\x68\x65\x69\x67\x68\x74\x3A\x31\x30\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x6D\x67\x3E","\x3C\x2F\x66\x6F\x6E\x74\x3E\x3C\x2F\x61\x3E\x3C\x2F\x62\x72\x3E\x53\x65\x72\x76\x65\x72\x20\x28\x50\x61\x72\x74\x79\x20\x6D\x6F\x64\x65\x29\x3A\x20","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x61\x63\x63\x65\x70\x74\x53\x65\x72\x76\x65\x72\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x62\x6C\x6F\x63\x6B\x20\x62\x74\x6E\x2D\x69\x6E\x66\x6F\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x31\x30\x70\x78\x3B\x62\x6F\x72\x64\x65\x72\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x64\x61\x72\x6B\x62\x6C\x75\x65\x3B\x22\x3E","\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E\x3C\x2F\x64\x69\x76\x3E","\x4E\x6F\x20\x50\x61\x73\x73\x77\x6F\x72\x64\x20\x4C\x6F\x61\x64\x65\x64","\x6D\x6F\x64\x65","\x55\x6E\x6B\x6E\x6F\x77\x6E","\x3C\x2F\x66\x6F\x6E\x74\x3E\x3C\x2F\x61\x3E\x3C\x2F\x62\x72\x3E\x53\x65\x72\x76\x65\x72\x3A\x20","\x3C\x2F\x62\x72\x3E\x4D\x6F\x64\x65\x3A\x20","\x3C\x2F\x62\x72\x3E\x20\x52\x65\x67\x69\x6F\x6E\x3A\x20","\x3C\x2F\x62\x72\x3E\x20\x50\x61\x73\x73\x77\x6F\x72\x64\x3A\x20","\x3C\x2F\x62\x72\x3E\x20\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x61\x63\x63\x65\x70\x74\x53\x65\x72\x76\x65\x72\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x62\x6C\x6F\x63\x6B\x20\x62\x74\x6E\x2D\x69\x6E\x66\x6F\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x31\x30\x70\x78\x3B\x62\x6F\x72\x64\x65\x72\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x64\x61\x72\x6B\x62\x6C\x75\x65\x3B\x22\x3E","\x73\x65\x74\x55\x6E\x69\x76\x65\x72\x73\x61\x6C\x43\x68\x61\x74","\x61\x75\x74\x68\x65\x6E\x74\x69\x63\x41\x67\x61\x72\x74\x6F\x6F\x6C\x49\x64","\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x27\x66\x61\x20\x66\x61\x2D\x75\x6E\x69\x76\x65\x72\x73\x61\x6C\x2D\x61\x63\x63\x65\x73\x73\x27\x20\x61\x72\x69\x61\x2D\x68\x69\x64\x64\x65\x6E\x3D\x27\x74\x72\x75\x65\x27\x3E\x3C\x2F\x69\x3E","\x3A\x76\x69\x73\x69\x62\x6C\x65","\x69\x73","\x23\x63\x68\x61\x74\x2D\x62\x6F\x78","\x52\x65\x63\x65\x69\x76\x65\x64\x20\x61\x20\x63\x6F\x6D\x6D\x61\x6E\x64\x20\x77\x69\x74\x68\x20\x61\x6E\x20\x75\x6E\x6B\x6E\x6F\x77\x6E\x20\x6E\x61\x6D\x65","\x52\x65\x63\x65\x69\x76\x65\x64\x20\x61\x20\x63\x6F\x6D\x6D\x61\x6E\x64\x20\x77\x69\x74\x68\x20\x61\x6E\x20\x75\x6E\x6B\x6E\x6F\x77\x6E\x20\x6E\x61\x6D\x65\x3A\x20\x63\x75\x73\x74\x6F\x6D\x53\x6B\x69\x6E\x73","\x3C\x64\x69\x76\x20\x63\x6C\x61\x73\x73\x3D\x22\x74\x6F\x61\x73\x74\x2D\x6D\x65\x73\x73\x61\x67\x65\x22\x3E\x3C\x73\x70\x61\x6E\x20\x63\x6C\x61\x73\x73\x3D\x22\x6D\x65\x73\x73\x61\x67\x65\x2D\x6E\x69\x63\x6B\x22\x3E","\x6E\x61\x6D\x65","\x3A\x20\x3C\x2F\x73\x70\x61\x6E\x3E\x3C\x73\x70\x61\x6E\x20\x63\x6C\x61\x73\x73\x3D\x22\x6D\x65\x73\x73\x61\x67\x65\x2D\x74\x65\x78\x74\x22\x3E","\x3C\x2F\x73\x70\x61\x6E\x3E\x3C\x61\x20\x68\x72\x65\x66\x3D\x22\x23\x22\x20\x64\x61\x74\x61\x2D\x75\x73\x65\x72\x2D\x69\x64\x3D\x22\x61\x67\x61\x72\x20\x74\x6F\x6F\x6C\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x6D\x75\x74\x65\x2D\x75\x73\x65\x72\x20\x6F\x67\x69\x63\x6F\x6E\x2D\x75\x73\x65\x72\x2D\x6D\x69\x6E\x75\x73\x22\x3E\x3C\x2F\x61\x3E\x20\x3C\x2F\x64\x69\x76\x3E","\x20\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F","\x6D\x69\x6E\x69\x6D\x61\x70\x20\x73\x65\x72\x76\x65\x72","\x6E\x6F\x4F\x67\x61\x72\x69\x6F\x53\x6F\x63\x6B\x65\x74","\x23\x6D\x65\x73\x73\x61\x67\x65\x53\x6F\x75\x6E\x64","\x5B\x55\x6E\x69\x76\x65\x72\x73\x61\x6C\x20\x63\x68\x61\x74\x5D\x3A","\x23\x63\x6F\x6D\x6D\x61\x6E\x64\x53\x6F\x75\x6E\x64","\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x77\x73\x73\x3A\x2F\x2F\x6D\x69\x6E\x69\x6D\x61\x70\x2E\x61\x67\x61\x72\x74\x6F\x6F\x6C\x2E\x69\x6F\x3A\x39\x30\x30\x30","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x45\x78\x61\x6D\x70\x6C\x65\x53\x63\x72\x69\x70\x74\x73\x2F\x73\x6F\x63\x6B\x65\x74\x2D\x69\x6F\x2E\x6D\x69\x6E\x2E\x6A\x73","\x37\x30\x30\x20\x31\x31\x70\x78\x20\x55\x62\x75\x6E\x74\x75","\x23\x66\x66\x66\x66\x66\x66","\x23\x30\x30\x30\x30\x30\x30","\x50\x49","\x38\x32\x70\x78","\x34\x30\x25","\x4F","\x23\x38\x43\x38\x31\x43\x37","\x4C\x2E\x4D","\x74\x6F\x70\x35\x2D\x68\x75\x64","\x70\x72\x65\x5F\x6C\x6F\x6F\x70\x5F\x74\x69\x6D\x65\x6F\x75\x74","\x77\x61\x69\x74\x20\x66\x6F\x72\x20\x6D\x6F\x64\x20\x74\x6F\x20\x6C\x6F\x61\x64","\x63\x6F\x6E\x66\x69\x67","\x7B\x7D","\x73\x74\x6F\x72\x61\x67\x65\x5F\x67\x65\x74\x56\x61\x6C\x75\x65","\x65\x78\x74\x65\x6E\x64","\x61\x6F\x32\x74","\x23\x61\x6F\x32\x74\x2D\x68\x75\x64\x20\x7B","\x20\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x20\x38\x30\x25\x3B\x20\x70\x6F\x69\x6E\x74\x65\x72\x2D\x65\x76\x65\x6E\x74\x73\x3A\x20\x61\x75\x74\x6F\x3B","\x7D","\x23\x61\x6F\x32\x74\x2D\x68\x75\x64\x20\x2A\x20\x7B","\x20\x75\x73\x65\x72\x2D\x73\x65\x6C\x65\x63\x74\x3A\x20\x61\x75\x74\x6F\x21\x69\x6D\x70\x6F\x72\x74\x61\x6E\x74\x3B","\x23\x61\x6F\x32\x74\x2D\x63\x66\x67\x2D\x64\x6C\x67\x20\x7B","\x20\x62\x6F\x72\x64\x65\x72\x2D\x72\x61\x64\x69\x75\x73\x3A\x30\x3B\x20\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x20\x38\x30\x25\x3B\x20\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x32\x70\x78\x20\x31\x30\x70\x78\x3B\x20\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x20\x66\x69\x78\x65\x64\x3B","\x20\x70\x6F\x69\x6E\x74\x65\x72\x2D\x65\x76\x65\x6E\x74\x73\x3A\x20\x61\x75\x74\x6F\x3B\x20\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x69\x6D\x61\x67\x65\x3A\x20\x75\x72\x6C\x28","\x20\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x66\x66\x66\x66\x66\x66\x3B","\x20\x6F\x76\x65\x72\x66\x6C\x6F\x77\x3A\x20\x68\x69\x64\x64\x65\x6E\x3B","\x23\x61\x6F\x32\x74\x2D\x63\x66\x67\x2D\x64\x6C\x67\x20\x2A\x20\x7B","\x20\x77\x69\x64\x74\x68\x3A\x20\x61\x75\x74\x6F\x3B\x20\x75\x73\x65\x72\x2D\x73\x65\x6C\x65\x63\x74\x3A\x20\x61\x75\x74\x6F\x21\x69\x6D\x70\x6F\x72\x74\x61\x6E\x74\x3B\x20\x70\x6F\x69\x6E\x74\x65\x72\x2D\x65\x76\x65\x6E\x74\x73\x3A\x20\x61\x75\x74\x6F\x3B","\x20\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x20\x72\x65\x6C\x61\x74\x69\x76\x65\x3B\x20\x66\x6C\x6F\x61\x74\x3A\x20\x69\x6E\x69\x74\x69\x61\x6C\x3B","\x23\x61\x6F\x32\x74\x2D\x63\x66\x67\x2D\x64\x6C\x67\x20\x69\x6E\x70\x75\x74\x20\x7B","\x20\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x72\x67\x62\x61\x28\x30\x2C\x30\x2C\x30\x2C\x30\x2E\x34\x29\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x66\x66\x66\x66\x66\x66\x3B","\x3C\x73\x74\x79\x6C\x65\x3E\x0A","\x0A\x3C\x2F\x73\x74\x79\x6C\x65\x3E","\x68\x65\x61\x64","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x61\x6F\x32\x74\x2D\x68\x75\x64\x22\x3E\x3C\x73\x70\x61\x6E\x20\x63\x6C\x61\x73\x73\x3D\x22\x68\x75\x64\x2D\x6D\x61\x69\x6E\x2D\x63\x6F\x6C\x6F\x72\x22\x3E\x55\x6E\x69\x76\x65\x72\x73\x61\x6C\x3A","\x20\x3C\x73\x70\x61\x6E\x20\x69\x64\x3D\x22\x61\x6F\x32\x74\x2D\x63\x61\x70\x74\x75\x72\x65\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x75\x6E\x69\x76\x65\x72\x73\x61\x6C\x2D\x61\x63\x63\x65\x73\x73\x22\x20\x61\x72\x69\x61\x2D\x68\x69\x64\x64\x65\x6E\x3D\x22\x74\x72\x75\x65\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x73\x70\x61\x6E\x3E","\x20\x3C\x73\x70\x61\x6E\x20\x69\x64\x3D\x22\x61\x6F\x32\x74\x2D\x63\x6F\x6E\x66\x69\x67\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x77\x72\x65\x6E\x63\x68\x22\x20\x61\x72\x69\x61\x2D\x68\x69\x64\x64\x65\x6E\x3D\x22\x74\x72\x75\x65\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x73\x70\x61\x6E\x3E\x3C\x2F\x73\x70\x61\x6E\x3E","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x61\x6F\x32\x74\x2D\x74\x6F\x70\x35\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x20\x31\x34\x70\x78\x3B\x22\x3E\x3C\x2F\x64\x69\x76\x3E","\x3C\x2F\x64\x69\x76\x3E","\x63\x61\x70\x74\x75\x72\x65","\x6F\x67\x61\x72\x69\x6F","\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64","\x23\x61\x6F\x32\x74\x2D\x63\x61\x70\x74\x75\x72\x65","\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x74\x69\x6D\x65\x73\x22\x20\x61\x72\x69\x61\x2D\x68\x69\x64\x64\x65\x6E\x3D\x22\x74\x72\x75\x65\x22\x3E\x3C\x2F\x69\x3E","\x63\x61\x70\x74\x75\x72\x65\x5F\x73\x74\x61\x72\x74","\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x75\x6E\x69\x76\x65\x72\x73\x61\x6C\x2D\x61\x63\x63\x65\x73\x73\x22\x20\x61\x72\x69\x61\x2D\x68\x69\x64\x64\x65\x6E\x3D\x22\x74\x72\x75\x65\x22\x3E\x3C\x2F\x69\x3E","\x63\x61\x70\x74\x75\x72\x65\x5F\x65\x6E\x64","\x63\x6F\x6C\x6F\x72","\x6D\x6F\x75\x73\x65\x6C\x65\x61\x76\x65","\x23\x68\x75\x64\x54\x65\x78\x74\x43\x6F\x6C\x6F\x72","\x6D\x6F\x75\x73\x65\x65\x6E\x74\x65\x72","\x23\x61\x6F\x32\x74\x2D\x63\x6F\x6E\x66\x69\x67","\x6C\x6D\x73\x61\x5F\x74\x65\x61\x6D\x74\x6F\x70","\x6D\x6F\x75\x73\x65\x64\x6F\x77\x6E","\x23\x61\x6F\x32\x74\x2D\x68\x75\x64","\x6C\x6D\x73\x61\x5F\x63\x68\x61\x74","\x63\x68\x61\x74\x5F\x63\x6C\x6F\x73\x65","\x3C\x61\x20\x68\x72\x65\x66\x3D\x22\x23\x22\x20\x69\x64\x3D\x22\x61\x6F\x32\x74\x2D\x63\x68\x61\x74\x2D\x63\x6C\x6F\x73\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x66\x6C\x6F\x61\x74\x3A\x72\x69\x67\x68\x74\x3B\x22\x3E\x58\x3C\x2F\x61\x3E","\x23\x6D\x65\x73\x73\x61\x67\x65\x2D\x6D\x65\x6E\x75","\x63\x68\x61\x74\x43\x6C\x6F\x73\x65","\x23\x61\x6F\x32\x74\x2D\x63\x68\x61\x74\x2D\x63\x6C\x6F\x73\x65","\x63\x68\x61\x74\x5F\x76\x63\x65\x6E\x74\x65\x72","\x62\x6F\x74\x74\x6F\x6D","\x6D\x65\x73\x73\x61\x67\x65\x42\x6F\x78\x42\x6F\x74\x74\x6F\x6D","\x61\x6C\x74\x4B\x65\x79","\x63\x74\x72\x6C\x4B\x65\x79","\x63","\x6D\x65\x74\x61\x4B\x65\x79","\x73\x68\x69\x66\x74\x4B\x65\x79","\x73","\x6B\x65\x79\x43\x6F\x64\x65","\x6B\x65\x79\x43\x6F\x64\x65\x45\x6E\x74\x65\x72","\x63\x68\x61\x74\x5F\x61\x6C\x74","\x63\x68\x61\x74\x53\x65\x6E\x64","\x61\x63","\x63\x68\x61\x74\x5F\x63\x74\x72\x6C\x61\x6C\x74","\x63\x68\x61\x74\x5F\x63\x74\x72\x6C","\x6B\x65\x79\x64\x6F\x77\x6E","\x23\x6D\x65\x73\x73\x61\x67\x65","\x73\x6B\x69\x6E\x54\x6F\x67\x67\x6C\x65\x5F\x73\x74\x61\x72\x74","\x64\x72\x61\x67\x67\x61\x62\x6C\x65","\x23\x61\x6F\x32\x74\x2D\x63\x66\x67\x2D\x64\x6C\x67","\x23\x61\x6F\x32\x74\x2D\x6D\x65\x73\x73\x61\x67\x65","\x23\x61\x6F\x32\x74\x2D\x6D\x69\x6E\x69\x6D\x61\x70","\x63\x61\x70\x74\x75\x72\x65\x5F\x69\x6E\x69\x74","\x74\x6F\x6B\x65\x6E","\x77\x73","\x77\x73\x73\x3A\x2F\x2F\x6C\x69\x76\x65\x2D\x61\x72\x65\x6E\x61\x2D","\x2E\x61\x67\x61\x72\x2E\x69\x6F\x3A\x38\x30","\x63\x6F\x6E\x6E\x65\x63\x74","\x75\x70\x64\x61\x74\x65\x5F\x74\x69\x6D\x65\x72\x69\x64","\x75\x70\x64\x61\x74\x65","\x75\x70\x64\x61\x74\x65\x5F\x69\x6E\x74\x65\x72\x76\x61\x6C","\x23\x61\x6F\x32\x74\x2D\x74\x6F\x70\x35","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x3C\x61\x20\x68\x72\x65\x66\x3D\x22\x23\x22\x20\x69\x64\x3D\x22\x61\x6F\x32\x74\x2D\x6D\x65\x73\x73\x61\x67\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x66\x6C\x6F\x61\x74\x3A\x6C\x65\x66\x74\x3B\x22\x3E","\x74\x6F\x6F\x6C\x5F\x73\x79\x6D\x62\x6F\x6C","\x3C\x2F\x61\x3E","\x70\x72\x65\x70\x65\x6E\x64","\x23\x6D\x69\x6E\x69\x6D\x61\x70","\x68\x65\x69\x67\x68\x74","\x3C\x63\x61\x6E\x76\x61\x73\x20\x69\x64\x3D\x22\x61\x6F\x32\x74\x2D\x6D\x69\x6E\x69\x6D\x61\x70\x22","\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x20\x61\x62\x73\x6F\x6C\x75\x74\x65\x3B\x22","\x20\x77\x69\x64\x74\x68\x3D\x22","\x22\x20\x68\x65\x69\x67\x68\x74\x3D\x22","\x22\x3E","\x68\x61\x73\x43\x6C\x61\x73\x73","\x4C\x2E\x4D\x3A\x2D\x3E\x41\x2E\x54\x3A\x20\x6E\x6F\x74\x20\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64","\x74\x6F\x61\x73\x74\x72","\x63\x68\x61\x74","\x4C\x4D\x3A","\x73\x65\x6E\x64\x4D\x69\x6E\x69\x6D\x61\x70\x53\x65\x72\x76\x65\x72\x43\x6F\x6D\x6D\x61\x6E\x64","\x6F\x67\x61\x72","\x74\x72\x69\x67\x67\x65\x72","\x4D\x65\x73\x73\x61\x67\x65\x20\x69\x6E\x63\x6C\x75\x64\x65\x64\x20\x53\x63\x72\x69\x70\x74\x20\x63\x6F\x6D\x6D\x61\x6E\x64\x2C\x20\x74\x68\x75\x73\x20\x69\x74\x20\x69\x73\x20\x6E\x6F\x74\x20\x73\x65\x6E\x74\x20\x74\x6F\x20\x61\x67\x61\x72\x20\x74\x6F\x6F\x6C","\x63\x68\x61\x74\x5F\x75\x6E\x70\x61\x75\x73\x65","\x23\x70\x61\x75\x73\x65\x2D\x68\x75\x64","\x62\x6C\x6F\x63\x6B","\x6B\x65\x79\x43\x6F\x64\x65\x52","\x6B\x65\x79\x75\x70","\x6F\x67\x61\x72\x49\x73\x41\x6C\x69\x76\x65","\x61\x6C\x69\x76\x65","\x74\x67\x61\x72\x41\x6C\x69\x76\x65","\x74\x67\x61\x72\x52\x65\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x6F\x67\x61\x72\x4D\x69\x6E\x69\x6D\x61\x70\x55\x70\x64\x61\x74\x65","\x63\x6F\x6E\x66\x69\x67\x5F\x69\x6E\x69\x74","\x63\x66\x67\x5F\x6C\x6F\x61\x64","\x23\x6F\x76\x65\x72\x6C\x61\x79\x73","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x61\x6F\x32\x74\x2D\x63\x66\x67\x2D\x64\x6C\x67\x22","\x20\x20\x73\x74\x79\x6C\x65\x3D\x22\x77\x69\x64\x74\x68\x3A\x34\x30\x30\x70\x78\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x34\x38\x30\x70\x78\x3B\x20\x74\x6F\x70\x3A\x31\x35\x30\x70\x78\x3B\x20\x6C\x65\x66\x74\x3A\x33\x30\x30\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B","\x41\x67\x61\x72\x20\x54\x6F\x6F\x6C\x2F\x4C\x65\x67\x65\x6E\x64\x20\x4D\x6F\x64\x20\x74\x6F\x6F\x6C\x73","\x3C\x64\x69\x76\x20\x73\x74\x79\x6C\x65\x3D\x22\x6F\x76\x65\x72\x66\x6C\x6F\x77\x3A\x20\x73\x63\x72\x6F\x6C\x6C\x3B\x20","\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x20\x72\x65\x6C\x61\x74\x69\x76\x65\x3B\x20\x74\x6F\x70\x3A\x31\x2E\x35\x65\x6D\x3B\x20\x6C\x65\x66\x74\x3A\x30\x2E\x35\x65\x6D\x3B\x20\x72\x69\x67\x68\x74\x3A\x30\x2E\x35\x65\x6D\x3B\x20\x62\x6F\x74\x74\x6F\x6D\x3A\x31\x2E\x35\x65\x6D\x3B\x22\x3E","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x61\x6F\x32\x74\x2D\x63\x66\x67\x2D\x62\x61\x73\x65\x22\x3E","\x3C\x2F\x64\x69\x76\x3E\x3C\x62\x72\x3E\x3C\x62\x72\x3E","\x26\x6E\x62\x73\x70\x3B\x3C\x73\x70\x61\x6E\x20\x69\x64\x3D\x22\x61\x6F\x32\x74\x2D\x63\x66\x67\x2D\x64\x65\x66\x61\x75\x6C\x74\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x70\x72\x69\x6D\x61\x72\x79\x22\x3E","\x74\x6F\x55\x70\x70\x65\x72\x43\x61\x73\x65","\x3C\x2F\x73\x70\x61\x6E\x3E","\x26\x6E\x62\x73\x70\x3B\x3C\x73\x70\x61\x6E\x20\x69\x64\x3D\x22\x61\x6F\x32\x74\x2D\x63\x66\x67\x2D\x6F\x6B\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x73\x75\x63\x63\x65\x73\x73\x22\x3E","\x26\x6E\x62\x73\x70\x3B\x3C\x73\x70\x61\x6E\x20\x69\x64\x3D\x22\x61\x6F\x32\x74\x2D\x63\x66\x67\x2D\x63\x61\x6E\x63\x65\x6C\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x64\x61\x6E\x67\x65\x72\x22\x3E","\x26\x6E\x62\x73\x70\x3B\x26\x6E\x62\x73\x70\x3B\x26\x6E\x62\x73\x70\x3B\x55\x70\x64\x61\x74\x65\x20\x66\x72\x65\x71\x75\x65\x6E\x63\x79\x20\x5B\x6D\x69\x6C\x6C\x69\x73\x65\x63\x6F\x6E\x64\x73\x5D\x3A\x3C\x69\x6E\x70\x75\x74\x20\x74\x79\x70\x65\x3D\x22\x74\x65\x78\x74\x22\x20\x64\x61\x74\x61\x2D\x61\x6F\x32\x74\x2D\x63\x6F\x6E\x66\x69\x67\x3D\x22\x75\x70\x64\x61\x74\x65\x5F\x69\x6E\x74\x65\x72\x76\x61\x6C\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x77\x69\x64\x74\x68\x3A\x36\x65\x6D\x3B\x22\x2F\x3E","\x3C\x62\x72\x2F\x3E\x41\x67\x61\x72\x20\x54\x6F\x6F\x6C\x20\x4F\x62\x74\x61\x69\x6E\x65\x64\x20\x66\x72\x6F\x6D","\x3C\x62\x72\x2F\x3E\x26\x6E\x62\x73\x70\x3B\x3C\x6C\x61\x62\x65\x6C\x3E\x3C\x69\x6E\x70\x75\x74\x20\x74\x79\x70\x65\x3D\x22\x63\x68\x65\x63\x6B\x62\x6F\x78\x22\x20\x64\x61\x74\x61\x2D\x61\x6F\x32\x74\x2D\x63\x6F\x6E\x66\x69\x67\x3D\x22\x75\x73\x65\x72\x5F\x73\x68\x6F\x77\x22\x2F\x3E\x75\x73\x65\x72\x20\x6C\x69\x73\x74\x3C\x2F\x6C\x61\x62\x65\x6C\x3E","\x3C\x62\x72\x2F\x3E\x26\x6E\x62\x73\x70\x3B\x3C\x6C\x61\x62\x65\x6C\x3E\x3C\x69\x6E\x70\x75\x74\x20\x74\x79\x70\x65\x3D\x22\x63\x68\x65\x63\x6B\x62\x6F\x78\x22\x20\x64\x61\x74\x61\x2D\x61\x6F\x32\x74\x2D\x63\x6F\x6E\x66\x69\x67\x3D\x22\x6D\x69\x6E\x69\x6D\x61\x70\x5F\x73\x68\x6F\x77\x22\x2F\x3E\x6D\x69\x6E\x69\x6D\x61\x70\x3C\x2F\x6C\x61\x62\x65\x6C\x3E","\x26\x6E\x62\x73\x70\x3B\x50\x72\x65\x66\x69\x78\x3A\x3C\x69\x6E\x70\x75\x74\x20\x74\x79\x70\x65\x3D\x22\x74\x65\x78\x74\x22\x20\x64\x61\x74\x61\x2D\x61\x6F\x32\x74\x2D\x63\x6F\x6E\x66\x69\x67\x3D\x22\x74\x67\x61\x72\x5F\x70\x72\x65\x66\x69\x78\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x77\x69\x64\x74\x68\x3A\x34\x65\x6D\x3B\x22\x2F\x3E","\x26\x6E\x62\x73\x70\x3B\x26\x6E\x62\x73\x70\x3B\x63\x6F\x6C\x6F\x72\x3A\x3C\x69\x6E\x70\x75\x74\x20\x74\x79\x70\x65\x3D\x22\x74\x65\x78\x74\x22\x20\x64\x61\x74\x61\x2D\x61\x6F\x32\x74\x2D\x63\x6F\x6E\x66\x69\x67\x3D\x22\x74\x67\x61\x72\x5F\x63\x6F\x6C\x6F\x72\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x77\x69\x64\x74\x68\x3A\x36\x65\x6D\x3B\x22\x2F\x3E","\x3C\x62\x72\x2F\x3E\x53\x65\x6E\x64\x20\x74\x6F\x20\x41\x67\x61\x72\x20\x54\x6F\x6F\x6C","\x3C\x62\x72\x2F\x3E\x26\x6E\x62\x73\x70\x3B\x3C\x6C\x61\x62\x65\x6C\x3E\x3C\x69\x6E\x70\x75\x74\x20\x74\x79\x70\x65\x3D\x22\x63\x68\x65\x63\x6B\x62\x6F\x78\x22\x20\x64\x61\x74\x61\x2D\x61\x6F\x32\x74\x2D\x63\x6F\x6E\x66\x69\x67\x3D\x22\x6F\x67\x61\x72\x5F\x75\x73\x65\x72\x22\x2F\x3E\x75\x73\x65\x72\x20\x69\x6E\x66\x6F\x3C\x2F\x6C\x61\x62\x65\x6C\x3E","\x26\x6E\x62\x73\x70\x3B\x50\x72\x65\x66\x69\x78\x3A\x3C\x69\x6E\x70\x75\x74\x20\x74\x79\x70\x65\x3D\x22\x74\x65\x78\x74\x22\x20\x64\x61\x74\x61\x2D\x61\x6F\x32\x74\x2D\x63\x6F\x6E\x66\x69\x67\x3D\x22\x6F\x67\x61\x72\x5F\x70\x72\x65\x66\x69\x78\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x77\x69\x64\x74\x68\x3A\x34\x65\x6D\x3B\x22\x2F\x3E","\x3C\x62\x72\x2F\x3E\x4C\x4D\x42\x2D\x4D\x6F\x75\x73\x65\x20\x73\x70\x6C\x69\x74\x20\x63\x6F\x72\x72\x65\x63\x74\x69\x6F\x6E","\x3C\x62\x72\x2F\x3E\x26\x6E\x62\x73\x70\x3B\x3C\x6C\x61\x62\x65\x6C\x3E\x3C\x69\x6E\x70\x75\x74\x20\x74\x79\x70\x65\x3D\x22\x63\x68\x65\x63\x6B\x62\x6F\x78\x22\x20\x64\x61\x74\x61\x2D\x61\x6F\x32\x74\x2D\x63\x6F\x6E\x66\x69\x67\x3D\x22\x6C\x6D\x73\x61\x5F\x74\x65\x61\x6D\x74\x6F\x70\x22\x2F\x3E\x54\x65\x61\x6D\x62\x6F\x61\x72\x64\x3C\x2F\x6C\x61\x62\x65\x6C\x3E","\x26\x6E\x62\x73\x70\x3B\x3C\x6C\x61\x62\x65\x6C\x3E\x3C\x69\x6E\x70\x75\x74\x20\x74\x79\x70\x65\x3D\x22\x63\x68\x65\x63\x6B\x62\x6F\x78\x22\x20\x64\x61\x74\x61\x2D\x61\x6F\x32\x74\x2D\x63\x6F\x6E\x66\x69\x67\x3D\x22\x6C\x6D\x73\x61\x5F\x63\x68\x61\x74\x22\x2F\x3E\x63\x68\x61\x74\x3C\x2F\x6C\x61\x62\x65\x6C\x3E","\x3C\x62\x72\x2F\x3E\x43\x68\x61\x74\x20\x6F\x70\x74\x69\x6F\x6E","\x3C\x62\x72\x2F\x3E\x26\x6E\x62\x73\x70\x3B\x3C\x6C\x61\x62\x65\x6C\x3E\x3C\x69\x6E\x70\x75\x74\x20\x74\x79\x70\x65\x3D\x22\x63\x68\x65\x63\x6B\x62\x6F\x78\x22\x20\x64\x61\x74\x61\x2D\x61\x6F\x32\x74\x2D\x63\x6F\x6E\x66\x69\x67\x3D\x22\x63\x68\x61\x74\x5F\x63\x6C\x6F\x73\x65\x22\x2F\x3E\x63\x6C\x6F\x73\x65\x3C\x2F\x6C\x61\x62\x65\x6C\x3E","\x26\x6E\x62\x73\x70\x3B\x3C\x6C\x61\x62\x65\x6C\x3E\x3C\x69\x6E\x70\x75\x74\x20\x74\x79\x70\x65\x3D\x22\x63\x68\x65\x63\x6B\x62\x6F\x78\x22\x20\x64\x61\x74\x61\x2D\x61\x6F\x32\x74\x2D\x63\x6F\x6E\x66\x69\x67\x3D\x22\x63\x68\x61\x74\x5F\x75\x6E\x70\x61\x75\x73\x65\x22\x2F\x3E\x75\x6E\x70\x61\x75\x73\x65\x3C\x2F\x6C\x61\x62\x65\x6C\x3E","\x26\x6E\x62\x73\x70\x3B\x3C\x6C\x61\x62\x65\x6C\x3E\x3C\x69\x6E\x70\x75\x74\x20\x74\x79\x70\x65\x3D\x22\x63\x68\x65\x63\x6B\x62\x6F\x78\x22\x20\x64\x61\x74\x61\x2D\x61\x6F\x32\x74\x2D\x63\x6F\x6E\x66\x69\x67\x3D\x22\x63\x68\x61\x74\x5F\x76\x63\x65\x6E\x74\x65\x72\x22\x2F\x3E\x76\x63\x65\x6E\x74\x65\x72\x3C\x2F\x6C\x61\x62\x65\x6C\x3E","\x3C\x62\x72\x2F\x3E\x26\x6E\x62\x73\x70\x3B\x3C\x6C\x61\x62\x65\x6C\x3E\x3C\x69\x6E\x70\x75\x74\x20\x74\x79\x70\x65\x3D\x22\x63\x68\x65\x63\x6B\x62\x6F\x78\x22\x20\x64\x61\x74\x61\x2D\x61\x6F\x32\x74\x2D\x63\x6F\x6E\x66\x69\x67\x3D\x22\x63\x68\x61\x74\x5F\x61\x6C\x74\x22\x2F\x3E\x41\x6C\x74\x3E\x54\x3C\x2F\x6C\x61\x62\x65\x6C\x3E","\x26\x6E\x62\x73\x70\x3B\x3C\x6C\x61\x62\x65\x6C\x3E\x3C\x69\x6E\x70\x75\x74\x20\x74\x79\x70\x65\x3D\x22\x63\x68\x65\x63\x6B\x62\x6F\x78\x22\x20\x64\x61\x74\x61\x2D\x61\x6F\x32\x74\x2D\x63\x6F\x6E\x66\x69\x67\x3D\x22\x63\x68\x61\x74\x5F\x63\x74\x72\x6C\x61\x6C\x74\x22\x2F\x3E\x43\x74\x72\x6C\x2B\x41\x6C\x74\x3E\x4F\x2B\x54\x3C\x2F\x6C\x61\x62\x65\x6C\x3E","\x26\x6E\x62\x73\x70\x3B\x3C\x6C\x61\x62\x65\x6C\x3E\x3C\x69\x6E\x70\x75\x74\x20\x74\x79\x70\x65\x3D\x22\x63\x68\x65\x63\x6B\x62\x6F\x78\x22\x20\x64\x61\x74\x61\x2D\x61\x6F\x32\x74\x2D\x63\x6F\x6E\x66\x69\x67\x3D\x22\x63\x68\x61\x74\x5F\x63\x74\x72\x6C\x22\x2F\x3E\x43\x74\x72\x6C\x3E\x43\x6C\x6F\x73\x65\x3C\x2F\x6C\x61\x62\x65\x6C\x3E","\x3C\x62\x72\x2F\x3E\x4F\x74\x68\x65\x72","\x3C\x62\x72\x2F\x3E\x26\x6E\x62\x73\x70\x3B\x3C\x6C\x61\x62\x65\x6C\x3E\x3C\x69\x6E\x70\x75\x74\x20\x74\x79\x70\x65\x3D\x22\x63\x68\x65\x63\x6B\x62\x6F\x78\x22\x20\x64\x61\x74\x61\x2D\x61\x6F\x32\x74\x2D\x63\x6F\x6E\x66\x69\x67\x3D\x22\x73\x6B\x69\x6E\x5F\x74\x6F\x67\x67\x6C\x65\x5F\x61\x75\x74\x6F\x22\x2F\x3E\x73\x6B\x69\x6E\x20\x61\x75\x74\x6F\x20\x74\x6F\x67\x67\x6C\x65\x3C\x2F\x6C\x61\x62\x65\x6C\x3E","\x26\x6E\x62\x73\x70\x3B\x26\x6E\x62\x73\x70\x3B\x26\x6E\x62\x73\x70\x3B\x46\x72\x65\x71\x75\x65\x6E\x63\x79\x20\x5B\x6D\x69\x6C\x6C\x69\x73\x65\x63\x6F\x6E\x64\x73\x5D\x3A\x3C\x69\x6E\x70\x75\x74\x20\x74\x79\x70\x65\x3D\x22\x74\x65\x78\x74\x22\x20\x64\x61\x74\x61\x2D\x61\x6F\x32\x74\x2D\x63\x6F\x6E\x66\x69\x67\x3D\x22\x73\x6B\x69\x6E\x5F\x74\x6F\x67\x67\x6C\x65\x5F\x69\x6E\x74\x65\x72\x76\x61\x6C\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x77\x69\x64\x74\x68\x3A\x36\x65\x6D\x3B\x22\x2F\x3E","\x3C\x62\x72\x2F\x3E\x26\x6E\x62\x73\x70\x3B\x26\x6E\x62\x73\x70\x3B\x2A\x20\x43\x68\x61\x6E\x67\x65\x73\x20\x77\x69\x6C\x6C\x20\x62\x65\x20\x72\x65\x66\x6C\x65\x63\x74\x65\x64\x20\x61\x66\x74\x65\x72\x20\x72\x65\x73\x74\x61\x72\x74","\x23\x61\x6F\x32\x74\x2D\x63\x66\x67\x2D\x62\x61\x73\x65","\x23\x61\x6F\x32\x74\x2D\x63\x66\x67\x2D\x64\x65\x66\x61\x75\x6C\x74","\x63\x66\x67\x5F\x73\x61\x76\x65","\x73\x74\x6F\x72\x61\x67\x65\x5F\x73\x65\x74\x56\x61\x6C\x75\x65","\x63\x6F\x6E\x66\x69\x67\x5F\x63\x61\x6E\x63\x65\x6C","\x23\x61\x6F\x32\x74\x2D\x63\x66\x67\x2D\x6F\x6B","\x23\x61\x6F\x32\x74\x2D\x63\x66\x67\x2D\x63\x61\x6E\x63\x65\x6C","\x73\x6B\x69\x6E\x54\x6F\x67\x67\x6C\x65\x5F\x74\x69\x6D\x65\x72\x69\x64","\x73\x6B\x69\x6E\x5F\x74\x6F\x67\x67\x6C\x65\x5F\x61\x75\x74\x6F","\x73\x6B\x69\x6E\x5F\x74\x6F\x67\x67\x6C\x65\x5F\x69\x6E\x74\x65\x72\x76\x61\x6C","\x73\x6B\x69\x6E\x54\x6F\x67\x67\x6C\x65\x5F\x75\x70\x64\x61\x74\x65","\x63\x75\x73\x74\x6F\x6D\x53\x6B\x69\x6E\x73","\x76\x61\x6E\x69\x6C\x6C\x61\x53\x6B\x69\x6E\x73","\x73\x6B\x69\x6E\x54\x6F\x67\x67\x6C\x65\x5F\x68\x61\x73\x42\x6F\x74\x68","\x73\x6B\x69\x6E\x54\x6F\x67\x67\x6C\x65\x5F\x75\x70\x64\x61\x74\x65\x5F\x73\x75\x62","\x6B\x65\x79\x43\x6F\x64\x65\x41","\x69\x6F","\x73\x6F\x63\x6B\x65\x74\x49\x6F\x55\x52\x4C","\x76\x65\x72\x73\x69\x6F\x6E\x3D","\x26\x73\x65\x72\x76\x65\x72\x3D","\x67\x72\x61\x62\x5F\x73\x6F\x63\x6B\x65\x74","\x6D\x69\x6E\x69\x6D\x61\x70\x5F\x69\x6E\x66\x6F","\x6D\x69\x6E\x69\x6D\x61\x70\x5F\x63\x6F\x6E\x6E\x65\x63\x74","\x6F\x6E","\x6D\x69\x6E\x69\x6D\x61\x70\x5F\x73\x6F\x63\x6B\x65\x74","\x4F\x6E\x63\x65\x55\x73\x65\x64","\x74\x6F\x4C\x6F\x77\x65\x72\x43\x61\x73\x65","\x3D","\x6D\x69\x6E\x69\x6D\x61\x70\x53\x65\x72\x76\x65\x72","\x72\x65\x73\x65\x74\x4D\x69\x6E\x69\x6D\x61\x70","\x73\x65\x72\x76\x65\x72\x3D","\x61\x67\x61\x72\x53\x65\x72\x76\x65\x72","\x26\x74\x61\x67\x3D","\x63\x6F\x6D\x6D\x61\x6E\x64","\x6D\x69\x6E\x69\x6D\x61\x70\x5F\x63\x6F\x6D\x6D\x61\x6E\x64","\x6D\x69\x6E\x69\x6D\x61\x70\x5F\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x63\x6F\x6E\x6E\x65\x63\x74\x5F\x65\x72\x72\x6F\x72","\x74\x65\x61\x6D\x6D\x61\x74\x65\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x6E\x69\x63\x6B\x73","\x70\x6C\x61\x79\x65\x72\x4E\x61\x6D\x65","\x41\x6E\x20\x75\x6E\x6E\x61\x6D\x65\x64\x20\x63\x65\x6C\x6C","\x73\x6F\x63\x6B\x65\x74\x49\x44","\x78","\x79","\x74\x67\x61\x72\x5F\x63\x6F\x6C\x6F\x72","\x61\x64\x64\x42\x61\x6C\x6C\x54\x6F\x4D\x69\x6E\x69\x6D\x61\x70","\x61\x64\x64","\x72\x65\x6D\x6F\x76\x65\x42\x61\x6C\x6C\x46\x72\x6F\x6D\x4D\x69\x6E\x69\x6D\x61\x70","\x6D\x6F\x76\x65\x42\x61\x6C\x6C\x4F\x6E\x4D\x69\x6E\x69\x6D\x61\x70","\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x61\x67\x74\x6F\x6F\x6C\x62\x61\x6C\x6C","\x63\x75\x73\x74\x6F\x6D\x73","\x73\x68\x6F\x77\x43\x75\x73\x74\x6F\x6D\x53\x6B\x69\x6E\x73","\x25","\x72\x65\x67\x69\x73\x74\x65\x72\x53\x6B\x69\x6E","\x66\x6F\x72\x45\x61\x63\x68","\x6B\x65\x79\x73","\x72\x65\x73\x65\x74","\x6D\x65\x73\x73\x61\x67\x65","\x6F\x67\x61\x72\x43\x68\x61\x74\x41\x64\x64","\x55\x6E\x6B\x6E\x6F\x77\x6E\x20\x63\x6F\x6D\x6D\x61\x6E\x64\x20\x6C\x73\x3A\x20","\x6C\x73","\x68\x63","\x52\x65\x63\x65\x69\x76\x65\x64\x20\x61\x20\x63\x6F\x6D\x6D\x61\x6E\x64\x20\x77\x69\x74\x68\x20\x61\x6E\x20\x75\x6E\x6B\x6E\x6F\x77\x6E\x20\x6E\x61\x6D\x65\x3A\x20","\x65\x6D\x69\x74","\x6D\x69\x6E\x69\x6D\x61\x70\x42\x61\x6C\x6C\x73","\x69\x73\x44\x65\x66\x61\x75\x6C\x74","\x6C\x61\x73\x74\x58","\x6C\x61\x73\x74\x59","\x76\x69\x73\x69\x62\x6C\x65","\x6F\x67\x61\x72\x5F\x75\x73\x65\x72","\x6F\x67\x61\x72\x5F\x70\x72\x65\x66\x69\x78","\x23\x73\x6B\x69\x6E","\x64\x65\x61\x64","\x70\x6C\x61\x79\x65\x72\x58","\x70\x6C\x61\x79\x65\x72\x59","\x24\x31","\x74\x6F\x54\x69\x6D\x65\x53\x74\x72\x69\x6E\x67","\x3C\x64\x69\x76\x20\x63\x6C\x61\x73\x73\x3D\x22\x6D\x65\x73\x73\x61\x67\x65\x22\x3E","\x3C\x73\x70\x61\x6E\x20\x63\x6C\x61\x73\x73\x3D\x22\x6D\x65\x73\x73\x61\x67\x65\x2D\x74\x69\x6D\x65\x22\x3E\x5B","\x5D\x20\x3C\x2F\x73\x70\x61\x6E\x3E","\x3C\x73\x70\x61\x6E\x20\x73\x74\x79\x6C\x65\x3D\x22\x63\x6F\x6C\x6F\x72\x3A","\x6D\x65\x73\x73\x61\x67\x65\x54\x65\x78\x74\x43\x6F\x6C\x6F\x72","\x3B\x20\x66\x6F\x6E\x74\x2D\x77\x65\x69\x67\x68\x74\x3A\x37\x30\x30\x3B\x22\x3E","\x3C\x2F\x73\x70\x61\x6E\x3E\x3A\x20","\x3C\x73\x70\x61\x6E\x20\x63\x6C\x61\x73\x73\x3D\x22\x6D\x65\x73\x73\x61\x67\x65\x2D\x74\x65\x78\x74\x22\x3E","\x70\x65\x72\x66\x65\x63\x74\x53\x63\x72\x6F\x6C\x6C\x62\x61\x72","\x73\x63\x72\x6F\x6C\x6C\x48\x65\x69\x67\x68\x74","\x61\x6E\x69\x6D\x61\x74\x65","\x61\x67\x61\x72\x74\x6F\x6F\x6C\x74\x65\x61\x6D\x6D\x61\x74\x65\x6E\x69\x63\x6B\x73","\x6F\x67\x61\x72\x47\x65\x74\x4D\x61\x70\x53\x69\x7A\x65","\x6F\x67\x61\x72\x47\x65\x74\x4D\x61\x70\x4F\x66\x66\x73\x65\x74","\x6D\x69\x6E\x69\x6D\x61\x70\x4F\x66\x66\x73\x65\x74\x58","\x6D\x69\x6E\x69\x6D\x61\x70\x4F\x66\x66\x73\x65\x74\x59","\x6D\x69\x6E\x69\x6D\x61\x70\x54\x65\x61\x6D\x6D\x61\x74\x65\x73\x53\x69\x7A\x65","\x32\x64","\x67\x65\x74\x43\x6F\x6E\x74\x65\x78\x74","\x63\x6C\x65\x61\x72\x52\x65\x63\x74","\x66\x6F\x6E\x74","\x6D\x69\x6E\x69\x6D\x61\x70\x4E\x69\x63\x6B\x46\x6F\x6E\x74","\x74\x6F\x70\x35\x73\x6B\x69\x6E\x73","\x31\x2E\x20","\x73\x6F\x72\x74","\x61\x67\x61\x72\x74\x6F\x6F\x6C\x6D\x69\x6E\x69\x6D\x61\x70\x42\x61\x6C\x6C\x73","\x70\x72\x65\x64\x69\x63\x74\x65\x64\x47\x68\x6F\x73\x74\x43\x65\x6C\x6C\x73\x41\x72\x72\x61\x79","\x70\x72\x65\x64\x69\x63\x74\x65\x64\x47\x68\x6F\x73\x74\x43\x65\x6C\x6C\x73","\x6C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x70\x6F\x73","\x73\x68\x69\x66\x74","\x70\x75\x73\x68","\x63\x75\x73\x74\x6F\x6D\x53\x6B\x69\x6E\x73\x4D\x61\x70","\x5F\x63\x61\x63\x68\x65\x64\x32","\x63\x75\x73\x74\x6F\x6D\x53\x6B\x69\x6E\x73\x43\x61\x63\x68\x65","\x3C\x61\x20\x68\x72\x65\x66\x3D\x22\x23\x22\x20\x69\x64\x3D\x22\x70\x6F\x73\x2D\x73\x6B\x69\x6E\x22\x20\x63\x6C\x61\x73\x73\x3D\x20\x22\x73\x65\x74\x2D\x74\x61\x72\x67\x65\x74\x22\x20\x64\x61\x74\x61\x2D\x75\x73\x65\x72\x2D\x69\x64\x3D\x22","\x22\x73\x74\x79\x6C\x65\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20","\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x33\x30\x70\x78\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x34\x30\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x69\x6E\x6C\x69\x6E\x65\x2D\x62\x6C\x6F\x63\x6B\x3B\x22\x3E\x3C\x73\x70\x61\x6E\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x20\x61\x62\x73\x6F\x6C\x75\x74\x65\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x6C\x65\x66\x74\x3A\x20\x32\x70\x78\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x32\x36\x70\x78\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x32\x36\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x69\x6E\x6C\x69\x6E\x65\x2D\x62\x6C\x6F\x63\x6B\x3B\x22\x20\x61\x6C\x74\x3D\x22\x22\x3E","\x6F\x75\x74\x65\x72\x48\x54\x4D\x4C","\x3C\x2F\x73\x70\x61\x6E\x3E\x20","\x3C\x2F\x61\x3E\x3C\x64\x69\x76\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x2D\x33\x30\x70\x78\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x6C\x65\x66\x74\x3A\x20\x33\x32\x70\x78\x3B\x22\x3E","\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x33\x30\x70\x78\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x34\x30\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x69\x6E\x6C\x69\x6E\x65\x2D\x62\x6C\x6F\x63\x6B\x3B\x22\x3E\x3C\x69\x6D\x67\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x20\x61\x62\x73\x6F\x6C\x75\x74\x65\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x6C\x65\x66\x74\x3A\x20\x32\x70\x78\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x32\x36\x70\x78\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x32\x36\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x69\x6E\x6C\x69\x6E\x65\x2D\x62\x6C\x6F\x63\x6B\x3B\x22\x20\x73\x72\x63\x20\x3D\x20\x22\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x62\x61\x6E\x6E\x65\x72\x73\x2F\x69\x63\x6F\x6E\x61\x67\x61\x72\x69\x6F\x74\x6F\x6F\x6C\x2E\x70\x6E\x67\x22\x20\x61\x6C\x74\x3D\x22\x22\x3E\x20","\x67\x68\x6F\x73\x74\x43\x65\x6C\x6C\x73","\x3C\x73\x70\x61\x6E\x20\x63\x6C\x61\x73\x73\x3D\x22\x68\x75\x64\x2D\x6D\x61\x69\x6E\x2D\x63\x6F\x6C\x6F\x72\x22\x3E\x5B","\x5D\x3C\x2F\x73\x70\x61\x6E\x3E","\x3C\x73\x70\x61\x6E\x20\x63\x6C\x61\x73\x73\x3D\x22\x74\x6F\x70\x35\x2D\x6D\x61\x73\x73\x2D\x63\x6F\x6C\x6F\x72\x22\x3E\x5B","\x6D\x61\x73\x73","\x73\x68\x6F\x72\x74\x4D\x61\x73\x73\x46\x6F\x72\x6D\x61\x74","\x5D\x3C\x2F\x73\x70\x61\x6E\x3E\x20","\x43\x33","\x3C\x62\x72\x2F\x3E","\x2E\x20","\x6D\x69\x6E\x69\x6D\x61\x70\x5F\x73\x68\x6F\x77","\x5B","\x74\x67\x61\x72\x5F\x70\x72\x65\x66\x69\x78","\x5D","\x74\x65\x78\x74\x41\x6C\x69\x67\x6E","\x63\x65\x6E\x74\x65\x72","\x6C\x69\x6E\x65\x57\x69\x64\x74\x68","\x6D\x69\x6E\x69\x6D\x61\x70\x4E\x69\x63\x6B\x53\x74\x72\x6F\x6B\x65\x53\x69\x7A\x65","\x73\x74\x72\x6F\x6B\x65\x53\x74\x79\x6C\x65","\x6D\x69\x6E\x69\x6D\x61\x70\x4E\x69\x63\x6B\x53\x74\x72\x6F\x6B\x65\x43\x6F\x6C\x6F\x72","\x73\x74\x72\x6F\x6B\x65\x54\x65\x78\x74","\x62\x65\x67\x69\x6E\x50\x61\x74\x68","\x70\x69\x32","\x61\x72\x63","\x63\x6C\x6F\x73\x65\x50\x61\x74\x68","\x66\x69\x6C\x6C","\x75\x73\x65\x72\x5F\x73\x68\x6F\x77","\x3C\x2F\x64\x69\x76\x3E\x3C\x73\x70\x61\x6E\x20\x73\x74\x79\x6C\x65\x20\x3D\x20\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x33\x30\x70\x78\x3B\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x68\x75\x64\x2D\x6D\x61\x69\x6E\x2D\x63\x6F\x6C\x6F\x72\x20\x6F\x67\x69\x63\x6F\x6E\x2D\x75\x73\x65\x72\x73\x22\x3E\x3C\x2F\x73\x70\x61\x6E\x3E\x20\x3A\x20\x3C\x73\x70\x61\x6E\x20\x69\x64\x3D\x22\x74\x6F\x70\x35\x2D\x74\x6F\x74\x61\x6C\x2D\x70\x6C\x61\x79\x65\x72\x73\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x74\x6F\x70\x35\x2D\x6D\x61\x73\x73\x2D\x63\x6F\x6C\x6F\x72\x22\x3E","\x6D\x61\x70\x53\x69\x7A\x65","\x6D\x61\x70\x4F\x66\x66\x73\x65\x74","\x74\x79\x70\x65","\x64\x61\x74\x61\x2D\x61\x6F\x32\x74\x2D\x63\x6F\x6E\x66\x69\x67","\x63\x68\x65\x63\x6B\x62\x6F\x78","\x63\x68\x65\x63\x6B\x65\x64","\x65\x61\x63\x68","\x5B\x64\x61\x74\x61\x2D\x61\x6F\x32\x74\x2D\x63\x6F\x6E\x66\x69\x67\x5D","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x5F","\x6C\x6F\x63\x61\x6C\x53\x74\x6F\x72\x61\x67\x65","\x73\x63\x72\x69\x70\x74","\x63\x72\x65\x61\x74\x65\x45\x6C\x65\x6D\x65\x6E\x74","\x74\x65\x78\x74\x2F\x6A\x61\x76\x61\x73\x63\x72\x69\x70\x74","\x75\x6E\x64\x65\x66\x69\x6E\x65\x64","\x6F\x6E\x6C\x6F\x61\x64","\x61\x70\x70\x65\x6E\x64\x43\x68\x69\x6C\x64","\x26\x23\x30\x33\x39\x3B","\x26\x71\x75\x6F\x74\x3B","\x26\x67\x74\x3B","\x26\x6C\x74\x3B","\x26\x61\x6D\x70\x3B","\x4C\x4D\x42\x6F\x74\x73\x45\x6E\x61\x62\x6C\x65\x64","\x61\x5B\x68\x72\x65\x66\x3D\x22\x23\x6D\x61\x69\x6E\x2D\x70\x61\x6E\x65\x6C\x22\x5D","\x66\x61\x64\x65\x49\x6E","\x23\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x46\x61\x64\x65","\x23\x6E\x6F\x74\x65\x73","\x23\x73\x74\x61\x74\x73\x49\x6E\x66\x6F","\x23\x73\x65\x61\x72\x63\x68\x48\x75\x64","\x23\x73\x65\x61\x72\x63\x68\x4C\x6F\x67","\x3C\x70\x20\x73\x74\x79\x6C\x65\x3D\x22\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x77\x68\x69\x74\x65\x2D\x73\x70\x61\x63\x65\x3A\x20\x6E\x6F\x77\x72\x61\x70\x3B\x6D\x61\x72\x67\x69\x6E\x2D\x62\x6F\x74\x74\x6F\x6D\x3A\x20\x31\x30\x70\x78\x3B\x22\x3E","\x3C\x73\x70\x61\x6E\x20\x63\x6C\x61\x73\x73\x3D\x22\x6D\x61\x69\x6E\x2D\x63\x6F\x6C\x6F\x72\x22\x3E","\x73\x75\x62\x73\x74\x72\x69\x6E\x67","\x3C\x2F\x73\x70\x61\x6E\x3E\x20\x26\x6E\x62\x73\x70\x3B","\x3C\x61\x20\x68\x72\x65\x66\x3D\x22\x6A\x61\x76\x61\x73\x63\x72\x69\x70\x74\x3A\x76\x6F\x69\x64\x28\x30\x29\x3B\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x6C\x6F\x67\x45\x6E\x74\x72\x79\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x6B\x65\x6E\x3D\x22","\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x63\x6F\x6C\x6F\x72\x3A\x20\x6C\x69\x67\x68\x74\x67\x72\x65\x79\x3B\x20\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x20\x31\x34\x70\x78\x3B\x22\x3E","\x3C\x2F\x61\x3E\x3C\x2F\x70\x3E","\x23\x6C\x6F\x67","\x66\x69\x72\x73\x74","\x23\x6C\x6F\x67\x20\x70","\x3C\x61\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x63\x6F\x6E\x6E\x65\x63\x74\x74\x6F\x28\x60","\x60\x29\x3B\x72\x65\x74\x75\x72\x6E\x20\x66\x61\x6C\x73\x65\x3B\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x6C\x6F\x67\x45\x6E\x74\x72\x79\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x6B\x65\x6E\x3D\x22","\x60\x29\x3B\x63\x6F\x6E\x6E\x65\x63\x74\x74\x6F\x32\x28\x60","\x60\x29\x3B\x63\x6F\x6E\x6E\x65\x63\x74\x74\x6F\x33\x28\x60","\x3C\x61\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x63\x6F\x6E\x6E\x65\x63\x74\x74\x6F\x31\x61\x28\x60","\x23\x73\x65\x61\x72\x63\x68\x49\x6E\x70\x75\x74","\x53\x65\x72\x76\x65\x72\x20\x6E\x6F\x74\x20\x61\x76\x61\x69\x6C\x61\x62\x6C\x65\x21","\x23\x73\x65\x72\x76\x65\x72\x2D\x77\x73","\x23\x73\x65\x72\x76\x65\x72\x2D\x63\x6F\x6E\x6E\x65\x63\x74","\x73\x6C\x6F\x77","\x67\x65\x74\x45\x6C\x65\x6D\x65\x6E\x74\x73\x42\x79\x54\x61\x67\x4E\x61\x6D\x65","\x3C\x73\x74\x79\x6C\x65\x20\x74\x79\x70\x65\x3D\x22\x74\x65\x78\x74\x2F\x63\x73\x73\x22\x20\x69\x64\x3D\x22\x52\x4E\x43\x4E\x22\x3E\x2E\x61\x67\x61\x72\x69\x6F\x2D\x70\x61\x6E\x65\x6C\x2C\x20\x2E\x63\x65\x6E\x74\x65\x72\x2D\x63\x6F\x6E\x74\x61\x69\x6E\x65\x72\x2C\x20\x2E\x62\x74\x6E\x2C\x20\x2E\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x2C\x20","\x2E\x69\x6E\x70\x75\x74\x2D\x67\x72\x6F\x75\x70\x2D\x61\x64\x64\x6F\x6E\x2C\x20\x2E\x69\x6E\x70\x75\x74\x2D\x67\x72\x6F\x75\x70\x2D\x73\x6D\x3E\x2E\x69\x6E\x70\x75\x74\x2D\x67\x72\x6F\x75\x70\x2D\x61\x64\x64\x6F\x6E\x2C\x20\x2E\x61\x67\x61\x72\x69\x6F\x2D\x70\x61\x72\x74\x79\x2C\x20\x2E\x61\x67\x61\x72\x69\x6F\x2D\x73\x69\x64\x65\x2D\x70\x61\x6E\x65\x6C\x7B\x62\x6F\x72\x64\x65\x72\x2D\x72\x61\x64\x69\x75\x73\x3A\x20\x31\x30\x70\x78\x3B\x7D\x2E\x6D\x65\x6E\x75\x2D\x74\x61\x62\x73\x2C","\x23\x6D\x61\x69\x6E\x2D\x70\x61\x6E\x65\x6C\x2C\x20\x23\x70\x72\x6F\x66\x69\x6C\x65\x2C\x20\x23\x6C\x65\x67\x65\x6E\x64\x2C\x20\x23\x6F\x67\x2D\x73\x65\x74\x74\x69\x6E\x67\x73\x2C\x20\x23\x74\x68\x65\x6D\x65\x2C\x20\x23\x6D\x75\x73\x69\x63\x2C\x20\x23\x68\x6F\x74\x6B\x65\x79\x73\x7B\x62\x6F\x72\x64\x65\x72\x2D\x72\x61\x64\x69\x75\x73\x3A\x20\x31\x30\x70\x78\x20\x31\x30\x70\x78\x20\x30\x20\x30\x3B\x7D\x20\x23\x68\x6F\x74\x6B\x65\x79\x73\x20\x7B\x62\x6F\x72\x64\x65\x72\x2D\x72\x61\x64\x69\x75\x73\x3A\x20\x31\x30\x70\x78\x3B\x7D\x20\x2E\x73\x6B\x69\x6E\x2C\x20\x2E\x69\x6E\x70\x75\x74\x2D\x67\x72\x6F\x75\x70\x2D\x62\x74\x6E\x2C\x20\x2E\x69\x6E\x70\x75\x74\x2D\x67\x72\x6F\x75\x70\x2E\x6E\x69\x63\x6B\x20\x7B\x62\x6F\x72\x64\x65\x72\x2D\x72\x61\x64\x69\x75\x73\x3A\x20\x30\x20\x31\x35\x70\x78\x20\x31\x35\x70\x78\x20\x30\x3B\x7D\x20\x20","\x2E\x63\x6F\x6C\x6F\x72\x70\x69\x63\x6B\x65\x72\x2D\x65\x6C\x65\x6D\x65\x6E\x74\x20\x2E\x69\x6E\x70\x75\x74\x2D\x67\x72\x6F\x75\x70\x2D\x61\x64\x64\x6F\x6E\x20\x69\x2C\x20\x2E\x63\x6F\x6C\x6F\x72\x70\x69\x63\x6B\x65\x72\x2D\x65\x6C\x65\x6D\x65\x6E\x74\x20\x2E\x61\x64\x64\x2D\x6F\x6E\x20\x69\x7B\x20\x62\x6F\x72\x64\x65\x72\x2D\x72\x61\x64\x69\x75\x73\x3A\x20\x35\x30\x25\x3B\x20\x7D\x2E\x61\x67\x61\x72\x69\x6F\x2D\x70\x72\x6F\x66\x69\x6C\x65\x2D\x70\x69\x63\x74\x75\x72\x65\x20\x7B\x20\x62\x6F\x72\x64\x65\x72\x2D\x72\x61\x64\x69\x75\x73\x3A\x20\x33\x32\x70\x78\x3B\x7D","\x23\x6D\x65\x6E\x75\x2D\x66\x6F\x6F\x74\x65\x72\x20\x7B\x20\x62\x6F\x72\x64\x65\x72\x2D\x72\x61\x64\x69\x75\x73\x3A\x20\x30\x20\x30\x20\x31\x30\x70\x78\x20\x31\x30\x70\x78\x3B\x20\x7D\x20\x23\x6C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x2D\x68\x75\x64\x20\x7B\x20\x62\x6F\x72\x64\x65\x72\x2D\x72\x61\x64\x69\x75\x73\x3A\x20\x31\x35\x70\x78\x3B\x7D\x20\x23\x64\x72\x6F\x70\x44\x6F\x77\x6E\x2C\x20\x23\x64\x72\x6F\x70\x44\x6F\x77\x6E\x32\x20\x7B\x20\x62\x6F\x72\x64\x65\x72\x2D\x72\x61\x64\x69\x75\x73\x3A\x20\x31\x35\x70\x78\x3B\x7D\x20\x23\x6D\x69\x6E\x69\x6D\x61\x70\x2D\x68\x75\x64\x20\x7B\x20\x62\x6F\x72\x64\x65\x72\x2D\x72\x61\x64\x69\x75\x73\x3A\x20\x30\x20\x30\x20\x31\x35\x70\x78\x20\x31\x35\x70\x78\x3B\x7D","\x23\x74\x6F\x70\x35\x2D\x68\x75\x64\x7B\x20\x62\x6F\x72\x64\x65\x72\x2D\x72\x61\x64\x69\x75\x73\x3A\x20\x31\x35\x70\x78\x3B\x20\x7D\x20\x23\x74\x61\x72\x67\x65\x74\x2D\x68\x75\x64\x7B\x20\x62\x6F\x72\x64\x65\x72\x2D\x72\x61\x64\x69\x75\x73\x3A\x20\x31\x35\x70\x78\x3B\x20\x7D\x20\x23\x6C\x65\x67\x65\x6E\x64\x41\x64\x49\x6D\x67\x2C\x20\x23\x73\x74\x61\x74\x73\x2D\x68\x75\x64\x20\x7B\x20\x62\x6F\x72\x64\x65\x72\x2D\x72\x61\x64\x69\x75\x73\x3A\x20\x31\x30\x70\x78\x3B\x20\x7D\x20","\x23\x74\x69\x6D\x65\x2D\x68\x75\x64\x20\x7B\x20\x62\x6F\x72\x64\x65\x72\x2D\x72\x61\x64\x69\x75\x73\x3A\x20\x31\x30\x70\x78\x3B\x20\x7D\x20\x3C\x2F\x73\x74\x79\x6C\x65\x3E","\x5B\x69\x6D\x67\x5D","\x5B\x2F\x69\x6D\x67\x5D","\x73\x65\x6E\x64\x43\x68\x61\x74\x4D\x65\x73\x73\x61\x67\x65","\x23\x70\x69\x63\x31\x64\x61\x74\x61","\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65","\x23\x73\x65\x6E\x64\x69\x63\x6F\x6E\x31","\x23\x70\x69\x63\x32\x64\x61\x74\x61","\x23\x73\x65\x6E\x64\x69\x63\x6F\x6E\x32","\x23\x70\x69\x63\x33\x64\x61\x74\x61","\x23\x73\x65\x6E\x64\x69\x63\x6F\x6E\x33","\x23\x70\x69\x63\x34\x64\x61\x74\x61","\x23\x73\x65\x6E\x64\x69\x63\x6F\x6E\x34","\x23\x70\x69\x63\x35\x64\x61\x74\x61","\x23\x73\x65\x6E\x64\x69\x63\x6F\x6E\x35","\x23\x70\x69\x63\x36\x64\x61\x74\x61","\x23\x73\x65\x6E\x64\x69\x63\x6F\x6E\x36","\x5B\x79\x74\x5D","\x5B\x2F\x79\x74\x5D","\x23\x79\x74\x31\x64\x61\x74\x61","\x23\x73\x65\x6E\x64\x79\x74\x31","\x23\x79\x74\x32\x64\x61\x74\x61","\x23\x73\x65\x6E\x64\x79\x74\x32","\x23\x79\x74\x33\x64\x61\x74\x61","\x23\x73\x65\x6E\x64\x79\x74\x33","\x23\x79\x74\x34\x64\x61\x74\x61","\x23\x73\x65\x6E\x64\x79\x74\x34","\x23\x79\x74\x35\x64\x61\x74\x61","\x23\x73\x65\x6E\x64\x79\x74\x35","\x23\x79\x74\x36\x64\x61\x74\x61","\x23\x73\x65\x6E\x64\x79\x74\x36","\x23\x79\x74\x31\x75\x72\x6C","\x23\x79\x74\x32\x75\x72\x6C","\x23\x79\x74\x33\x75\x72\x6C","\x23\x79\x74\x34\x75\x72\x6C","\x23\x79\x74\x35\x75\x72\x6C","\x23\x79\x74\x36\x75\x72\x6C","\x23\x69\x6D\x61\x67\x65\x73\x2D\x68\x75\x64","\x23\x6D\x73\x67\x63\x6F\x6D\x6D\x61\x6E\x64\x73\x2D\x68\x75\x64","\x23\x79\x74\x2D\x68\x75\x64","\x23\x73\x63\x72\x69\x70\x74\x69\x6E\x67\x2D\x68\x75\x64","\x23\x6D\x69\x6E\x69\x6D\x61\x70\x50\x69\x63\x74\x75\x72\x65","\x23\x6C\x65\x61\x64\x62\x50\x69\x63\x74\x75\x72\x65","\x23\x74\x65\x61\x6D\x62\x50\x69\x63\x74\x75\x72\x65","\x23\x63\x61\x6E\x76\x61\x73\x50\x69\x63\x74\x75\x72\x65","\x23\x6C\x65\x61\x64\x62\x74\x65\x78\x74","\x23\x74\x65\x61\x6D\x62\x74\x65\x78\x74","\x23\x69\x6D\x67\x55\x72\x6C","\x23\x69\x6D\x67\x48\x72\x65\x66","\x23\x6D\x69\x6E\x62\x74\x65\x78\x74","\x23\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x50\x69\x63","\x23\x70\x69\x63\x31\x75\x72\x6C","\x23\x70\x69\x63\x32\x75\x72\x6C","\x23\x70\x69\x63\x33\x75\x72\x6C","\x23\x70\x69\x63\x34\x75\x72\x6C","\x23\x70\x69\x63\x35\x75\x72\x6C","\x23\x70\x69\x63\x36\x75\x72\x6C","\x23\x63\x68\x61\x6E\x67\x65\x70\x68\x6F\x74\x6F\x73","\x6C\x61\x73\x74\x53\x65\x6E\x74\x43\x6C\x61\x6E\x54\x61\x67","\x4C\x65\x67\x65\x6E\x64\x2E\x4D\x6F\x64\x26\x3F\x70\x6C\x61\x79\x65\x72\x3D","\x26\x3F\x63\x6F\x6D\x3D","\x26\x3F\x64\x6F\x3D","\x63\x72\x65\x61\x74\x65\x54\x65\x78\x74\x4E\x6F\x64\x65","\x6A\x61\x76\x61\x73\x63\x72\x69\x70\x74","\x73\x74\x79\x6C\x65","\x74\x65\x78\x74\x2F\x63\x73\x73","\x73\x74\x79\x6C\x65\x73\x68\x65\x65\x74","\x23\x74\x63\x6D\x2C\x23\x74\x63\x6D\x3E\x23\x74\x63\x6D\x2D\x6D\x61\x69\x6E\x3E\x64\x69\x76\x3E\x64\x69\x76\x7B\x6F\x76\x65\x72\x66\x6C\x6F\x77\x2D\x78\x3A\x68\x69\x64\x64\x65\x6E\x3B\x6F\x76\x65\x72\x66\x6C\x6F\x77\x2D\x79\x3A\x61\x75\x74\x6F\x7D\x23\x74\x63\x6D\x3E\x23\x74\x63\x6D\x2D\x68\x65\x61\x64\x65\x72\x2C\x23\x74\x63\x6D\x3E\x23\x74\x63\x6D\x2D\x6D\x61\x69\x6E\x3E\x64\x69\x76\x7B\x74\x65\x78\x74\x2D\x61\x6C\x69\x67\x6E\x3A\x63\x65\x6E\x74\x65\x72\x7D\x40\x6B\x65\x79\x66\x72\x61\x6D\x65\x73\x20\x62\x6F\x75\x6E\x63\x65\x2D\x69\x6E\x7B\x30\x25\x2C\x31\x30\x30\x25\x2C\x32\x30\x25\x2C\x34\x30\x25\x2C\x36\x30\x25\x2C\x38\x30\x25\x7B\x2D\x77\x65\x62\x6B\x69\x74\x2D\x74\x72\x61\x6E\x73\x69\x74\x69\x6F\x6E\x2D\x74\x69\x6D\x69\x6E\x67\x2D\x66\x75\x6E\x63\x74\x69\x6F\x6E\x3A\x63\x75\x62\x69\x63\x2D\x62\x65\x7A\x69\x65\x72\x28\x2E\x32\x31\x35\x2C\x2E\x36\x31\x2C\x2E\x33\x35\x35\x2C\x31\x29\x3B\x74\x72\x61\x6E\x73\x69\x74\x69\x6F\x6E\x2D\x74\x69\x6D\x69\x6E\x67\x2D\x66\x75\x6E\x63\x74\x69\x6F\x6E\x3A\x63\x75\x62\x69\x63\x2D\x62\x65\x7A\x69\x65\x72\x28\x2E\x32\x31\x35\x2C\x2E\x36\x31\x2C\x2E\x33\x35\x35\x2C\x31\x29\x7D\x30\x25\x7B\x6F\x70\x61\x63\x69\x74\x79\x3A\x30\x3B\x2D\x77\x65\x62\x6B\x69\x74\x2D\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x2E\x33\x2C\x2E\x33\x2C\x2E\x33\x29\x3B\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x2E\x33\x2C\x2E\x33\x2C\x2E\x33\x29\x7D\x32\x30\x25\x7B\x2D\x77\x65\x62\x6B\x69\x74\x2D\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x31\x2E\x31\x2C\x31\x2E\x31\x2C\x31\x2E\x31\x29\x3B\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x31\x2E\x31\x2C\x31\x2E\x31\x2C\x31\x2E\x31\x29\x7D\x34\x30\x25\x7B\x2D\x77\x65\x62\x6B\x69\x74\x2D\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x2E\x39\x2C\x2E\x39\x2C\x2E\x39\x29\x3B\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x2E\x39\x2C\x2E\x39\x2C\x2E\x39\x29\x7D\x36\x30\x25\x7B\x6F\x70\x61\x63\x69\x74\x79\x3A\x31\x3B\x2D\x77\x65\x62\x6B\x69\x74\x2D\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x31\x2E\x30\x33\x2C\x31\x2E\x30\x33\x2C\x31\x2E\x30\x33\x29\x3B\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x31\x2E\x30\x33\x2C\x31\x2E\x30\x33\x2C\x31\x2E\x30\x33\x29\x7D\x38\x30\x25\x7B\x2D\x77\x65\x62\x6B\x69\x74\x2D\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x2E\x39\x37\x2C\x2E\x39\x37\x2C\x2E\x39\x37\x29\x3B\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x2E\x39\x37\x2C\x2E\x39\x37\x2C\x2E\x39\x37\x29\x7D\x31\x30\x30\x25\x7B\x6F\x70\x61\x63\x69\x74\x79\x3A\x31\x3B\x2D\x77\x65\x62\x6B\x69\x74\x2D\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x31\x2C\x31\x2C\x31\x29\x3B\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x31\x2C\x31\x2C\x31\x29\x7D\x7D\x40\x2D\x77\x65\x62\x6B\x69\x74\x2D\x6B\x65\x79\x66\x72\x61\x6D\x65\x73\x20\x62\x6F\x75\x6E\x63\x65\x2D\x69\x6E\x7B\x30\x25\x2C\x31\x30\x30\x25\x2C\x32\x30\x25\x2C\x34\x30\x25\x2C\x36\x30\x25\x2C\x38\x30\x25\x7B\x2D\x77\x65\x62\x6B\x69\x74\x2D\x74\x72\x61\x6E\x73\x69\x74\x69\x6F\x6E\x2D\x74\x69\x6D\x69\x6E\x67\x2D\x66\x75\x6E\x63\x74\x69\x6F\x6E\x3A\x63\x75\x62\x69\x63\x2D\x62\x65\x7A\x69\x65\x72\x28\x2E\x32\x31\x35\x2C\x2E\x36\x31\x2C\x2E\x33\x35\x35\x2C\x31\x29\x3B\x74\x72\x61\x6E\x73\x69\x74\x69\x6F\x6E\x2D\x74\x69\x6D\x69\x6E\x67\x2D\x66\x75\x6E\x63\x74\x69\x6F\x6E\x3A\x63\x75\x62\x69\x63\x2D\x62\x65\x7A\x69\x65\x72\x28\x2E\x32\x31\x35\x2C\x2E\x36\x31\x2C\x2E\x33\x35\x35\x2C\x31\x29\x7D\x30\x25\x7B\x6F\x70\x61\x63\x69\x74\x79\x3A\x30\x3B\x2D\x77\x65\x62\x6B\x69\x74\x2D\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x2E\x33\x2C\x2E\x33\x2C\x2E\x33\x29\x3B\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x2E\x33\x2C\x2E\x33\x2C\x2E\x33\x29\x7D\x32\x30\x25\x7B\x2D\x77\x65\x62\x6B\x69\x74\x2D\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x31\x2E\x31\x2C\x31\x2E\x31\x2C\x31\x2E\x31\x29\x3B\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x31\x2E\x31\x2C\x31\x2E\x31\x2C\x31\x2E\x31\x29\x7D\x34\x30\x25\x7B\x2D\x77\x65\x62\x6B\x69\x74\x2D\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x2E\x39\x2C\x2E\x39\x2C\x2E\x39\x29\x3B\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x2E\x39\x2C\x2E\x39\x2C\x2E\x39\x29\x7D\x36\x30\x25\x7B\x6F\x70\x61\x63\x69\x74\x79\x3A\x31\x3B\x2D\x77\x65\x62\x6B\x69\x74\x2D\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x31\x2E\x30\x33\x2C\x31\x2E\x30\x33\x2C\x31\x2E\x30\x33\x29\x3B\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x31\x2E\x30\x33\x2C\x31\x2E\x30\x33\x2C\x31\x2E\x30\x33\x29\x7D\x38\x30\x25\x7B\x2D\x77\x65\x62\x6B\x69\x74\x2D\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x2E\x39\x37\x2C\x2E\x39\x37\x2C\x2E\x39\x37\x29\x3B\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x2E\x39\x37\x2C\x2E\x39\x37\x2C\x2E\x39\x37\x29\x7D\x31\x30\x30\x25\x7B\x6F\x70\x61\x63\x69\x74\x79\x3A\x31\x3B\x2D\x77\x65\x62\x6B\x69\x74\x2D\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x31\x2C\x31\x2C\x31\x29\x3B\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x31\x2C\x31\x2C\x31\x29\x7D\x7D\x40\x2D\x6D\x6F\x7A\x2D\x6B\x65\x79\x66\x72\x61\x6D\x65\x73\x20\x62\x6F\x75\x6E\x63\x65\x2D\x69\x6E\x7B\x30\x25\x2C\x31\x30\x30\x25\x2C\x32\x30\x25\x2C\x34\x30\x25\x2C\x36\x30\x25\x2C\x38\x30\x25\x7B\x2D\x6D\x6F\x7A\x2D\x74\x72\x61\x6E\x73\x69\x74\x69\x6F\x6E\x2D\x74\x69\x6D\x69\x6E\x67\x2D\x66\x75\x6E\x63\x74\x69\x6F\x6E\x3A\x63\x75\x62\x69\x63\x2D\x62\x65\x7A\x69\x65\x72\x28\x2E\x32\x31\x35\x2C\x2E\x36\x31\x2C\x2E\x33\x35\x35\x2C\x31\x29\x3B\x74\x72\x61\x6E\x73\x69\x74\x69\x6F\x6E\x2D\x74\x69\x6D\x69\x6E\x67\x2D\x66\x75\x6E\x63\x74\x69\x6F\x6E\x3A\x63\x75\x62\x69\x63\x2D\x62\x65\x7A\x69\x65\x72\x28\x2E\x32\x31\x35\x2C\x2E\x36\x31\x2C\x2E\x33\x35\x35\x2C\x31\x29\x7D\x30\x25\x7B\x6F\x70\x61\x63\x69\x74\x79\x3A\x30\x3B\x2D\x6D\x6F\x7A\x2D\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x2E\x33\x2C\x2E\x33\x2C\x2E\x33\x29\x3B\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x2E\x33\x2C\x2E\x33\x2C\x2E\x33\x29\x7D\x32\x30\x25\x7B\x2D\x6D\x6F\x7A\x2D\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x31\x2E\x31\x2C\x31\x2E\x31\x2C\x31\x2E\x31\x29\x3B\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x31\x2E\x31\x2C\x31\x2E\x31\x2C\x31\x2E\x31\x29\x7D\x34\x30\x25\x7B\x2D\x6D\x6F\x7A\x2D\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x2E\x39\x2C\x2E\x39\x2C\x2E\x39\x29\x3B\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x2E\x39\x2C\x2E\x39\x2C\x2E\x39\x29\x7D\x36\x30\x25\x7B\x6F\x70\x61\x63\x69\x74\x79\x3A\x31\x3B\x2D\x6D\x6F\x7A\x2D\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x31\x2E\x30\x33\x2C\x31\x2E\x30\x33\x2C\x31\x2E\x30\x33\x29\x3B\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x31\x2E\x30\x33\x2C\x31\x2E\x30\x33\x2C\x31\x2E\x30\x33\x29\x7D\x38\x30\x25\x7B\x2D\x6D\x6F\x7A\x2D\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x2E\x39\x37\x2C\x2E\x39\x37\x2C\x2E\x39\x37\x29\x3B\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x2E\x39\x37\x2C\x2E\x39\x37\x2C\x2E\x39\x37\x29\x7D\x31\x30\x30\x25\x7B\x6F\x70\x61\x63\x69\x74\x79\x3A\x31\x3B\x2D\x6D\x6F\x7A\x2D\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x31\x2C\x31\x2C\x31\x29\x3B\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x31\x2C\x31\x2C\x31\x29\x7D\x7D\x23\x74\x63\x6D\x7B\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x66\x69\x78\x65\x64\x3B\x74\x6F\x70\x3A\x32\x30\x25\x3B\x6C\x65\x66\x74\x3A\x31\x25\x3B\x64\x69\x73\x70\x6C\x61\x79\x3A\x62\x6C\x6F\x63\x6B\x3B\x77\x69\x64\x74\x68\x3A\x32\x34\x30\x70\x78\x3B\x6D\x61\x78\x2D\x68\x65\x69\x67\x68\x74\x3A\x39\x36\x25\x3B\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x3A\x72\x67\x62\x61\x28\x30\x2C\x30\x2C\x30\x2C\x2E\x38\x29\x3B\x62\x6F\x72\x64\x65\x72\x3A\x31\x70\x78\x20\x73\x6F\x6C\x69\x64\x20\x23\x34\x34\x34\x3B\x62\x6F\x72\x64\x65\x72\x2D\x72\x61\x64\x69\x75\x73\x3A\x34\x70\x78\x3B\x2D\x77\x65\x62\x6B\x69\x74\x2D\x62\x6F\x72\x64\x65\x72\x2D\x72\x61\x64\x69\x75\x73\x3A\x34\x70\x78\x3B\x2D\x6D\x6F\x7A\x2D\x62\x6F\x72\x64\x65\x72\x2D\x72\x61\x64\x69\x75\x73\x3A\x34\x70\x78\x3B\x7A\x2D\x69\x6E\x64\x65\x78\x3A\x39\x39\x39\x39\x39\x39\x39\x39\x39\x3B\x61\x6E\x69\x6D\x61\x74\x69\x6F\x6E\x3A\x31\x73\x20\x62\x6F\x74\x68\x20\x62\x6F\x75\x6E\x63\x65\x2D\x69\x6E\x3B\x2D\x77\x65\x62\x6B\x69\x74\x2D\x61\x6E\x69\x6D\x61\x74\x69\x6F\x6E\x3A\x31\x73\x20\x62\x6F\x74\x68\x20\x62\x6F\x75\x6E\x63\x65\x2D\x69\x6E\x3B\x2D\x6D\x6F\x7A\x2D\x61\x6E\x69\x6D\x61\x74\x69\x6F\x6E\x3A\x31\x73\x20\x62\x6F\x74\x68\x20\x62\x6F\x75\x6E\x63\x65\x2D\x69\x6E\x7D\x23\x74\x63\x6D\x3E\x23\x74\x63\x6D\x2D\x68\x65\x61\x64\x65\x72\x2C\x23\x74\x63\x6D\x3E\x23\x74\x63\x6D\x2D\x68\x65\x61\x64\x65\x72\x3E\x70\x2C\x23\x74\x63\x6D\x3E\x23\x74\x63\x6D\x2D\x68\x65\x61\x64\x65\x72\x3E\x73\x70\x61\x6E\x7B\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x72\x65\x6C\x61\x74\x69\x76\x65\x3B\x64\x69\x73\x70\x6C\x61\x79\x3A\x62\x6C\x6F\x63\x6B\x7D\x23\x74\x63\x6D\x20\x3A\x66\x6F\x63\x75\x73\x7B\x6F\x75\x74\x6C\x69\x6E\x65\x3A\x30\x7D\x23\x74\x63\x6D\x20\x2A\x7B\x66\x6F\x6E\x74\x2D\x66\x61\x6D\x69\x6C\x79\x3A\x22\x48\x65\x6C\x76\x65\x74\x69\x63\x61\x20\x4E\x65\x75\x65\x22\x2C\x48\x65\x6C\x76\x65\x74\x69\x63\x61\x2C\x41\x72\x69\x61\x6C\x2C\x73\x61\x6E\x73\x2D\x73\x65\x72\x69\x66\x7D\x23\x74\x63\x6D\x3E\x23\x74\x63\x6D\x2D\x68\x65\x61\x64\x65\x72\x7B\x77\x69\x64\x74\x68\x3A\x69\x6E\x69\x74\x69\x61\x6C\x3B\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x3A\x72\x67\x62\x61\x28\x32\x35\x35\x2C\x32\x35\x35\x2C\x32\x35\x35\x2C\x2E\x34\x29\x3B\x70\x61\x64\x64\x69\x6E\x67\x3A\x38\x70\x78\x7D\x23\x74\x63\x6D\x3E\x23\x74\x63\x6D\x2D\x68\x65\x61\x64\x65\x72\x3E\x73\x70\x61\x6E\x7B\x66\x6F\x6E\x74\x2D\x66\x61\x6D\x69\x6C\x79\x3A\x50\x61\x63\x69\x66\x69\x63\x6F\x2C\x63\x75\x72\x73\x69\x76\x65\x3B\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x32\x30\x70\x78\x3B\x63\x6F\x6C\x6F\x72\x3A\x23\x46\x46\x46\x3B\x74\x65\x78\x74\x2D\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x63\x61\x70\x69\x74\x61\x6C\x69\x7A\x65\x3B\x6D\x61\x72\x67\x69\x6E\x3A\x30\x20\x30\x20\x38\x70\x78\x7D\x23\x74\x63\x6D\x3E\x23\x74\x63\x6D\x2D\x68\x65\x61\x64\x65\x72\x3E\x70\x7B\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x31\x32\x70\x78\x3B\x63\x6F\x6C\x6F\x72\x3A\x23\x32\x32\x32\x3B\x6D\x61\x72\x67\x69\x6E\x3A\x30\x7D\x23\x74\x63\x6D\x3E\x23\x74\x63\x6D\x2D\x6D\x61\x69\x6E\x3E\x64\x69\x76\x3E\x64\x69\x76\x2C\x23\x74\x63\x6D\x3E\x23\x74\x63\x6D\x2D\x6D\x61\x69\x6E\x3E\x64\x69\x76\x3E\x73\x70\x61\x6E\x7B\x6D\x61\x72\x67\x69\x6E\x3A\x30\x20\x30\x20\x38\x70\x78\x3B\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x72\x65\x6C\x61\x74\x69\x76\x65\x3B\x64\x69\x73\x70\x6C\x61\x79\x3A\x62\x6C\x6F\x63\x6B\x7D\x23\x74\x63\x6D\x3E\x23\x74\x63\x6D\x2D\x6D\x61\x69\x6E\x2C\x23\x74\x63\x6D\x3E\x23\x74\x63\x6D\x2D\x6D\x61\x69\x6E\x3E\x64\x69\x76\x7B\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x72\x65\x6C\x61\x74\x69\x76\x65\x3B\x64\x69\x73\x70\x6C\x61\x79\x3A\x62\x6C\x6F\x63\x6B\x3B\x77\x69\x64\x74\x68\x3A\x69\x6E\x69\x74\x69\x61\x6C\x7D\x23\x74\x63\x6D\x3E\x23\x74\x63\x6D\x2D\x6D\x61\x69\x6E\x7B\x70\x61\x64\x64\x69\x6E\x67\x3A\x38\x70\x78\x7D\x23\x74\x63\x6D\x3E\x23\x74\x63\x6D\x2D\x6D\x61\x69\x6E\x3E\x64\x69\x76\x3E\x73\x70\x61\x6E\x7B\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x31\x34\x70\x78\x3B\x63\x6F\x6C\x6F\x72\x3A\x23\x46\x46\x46\x3B\x74\x65\x78\x74\x2D\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x63\x61\x70\x69\x74\x61\x6C\x69\x7A\x65\x7D\x23\x74\x63\x6D\x3E\x23\x74\x63\x6D\x2D\x6D\x61\x69\x6E\x3E\x64\x69\x76\x3E\x64\x69\x76\x7B\x77\x69\x64\x74\x68\x3A\x31\x30\x30\x25\x3B\x6D\x61\x78\x2D\x68\x65\x69\x67\x68\x74\x3A\x31\x36\x30\x70\x78\x3B\x6D\x69\x6E\x2D\x68\x65\x69\x67\x68\x74\x3A\x32\x30\x70\x78\x3B\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x3A\x23\x32\x32\x32\x3B\x62\x6F\x72\x64\x65\x72\x3A\x31\x70\x78\x20\x73\x6F\x6C\x69\x64\x20\x23\x34\x34\x34\x3B\x62\x6F\x72\x64\x65\x72\x2D\x72\x61\x64\x69\x75\x73\x3A\x32\x70\x78\x3B\x2D\x77\x65\x62\x6B\x69\x74\x2D\x62\x6F\x72\x64\x65\x72\x2D\x72\x61\x64\x69\x75\x73\x3A\x32\x70\x78\x3B\x2D\x6D\x6F\x7A\x2D\x62\x6F\x72\x64\x65\x72\x2D\x72\x61\x64\x69\x75\x73\x3A\x32\x70\x78\x7D\x23\x74\x63\x6D\x3E\x23\x74\x63\x6D\x2D\x6D\x61\x69\x6E\x3E\x64\x69\x76\x3E\x64\x69\x76\x3E\x73\x70\x61\x6E\x7B\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x72\x65\x6C\x61\x74\x69\x76\x65\x3B\x64\x69\x73\x70\x6C\x61\x79\x3A\x62\x6C\x6F\x63\x6B\x3B\x77\x69\x64\x74\x68\x3A\x31\x30\x30\x25\x3B\x74\x65\x78\x74\x2D\x61\x6C\x69\x67\x6E\x3A\x63\x65\x6E\x74\x65\x72\x3B\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x31\x32\x70\x78\x3B\x63\x6F\x6C\x6F\x72\x3A\x23\x46\x46\x46\x3B\x70\x61\x64\x64\x69\x6E\x67\x3A\x34\x70\x78\x20\x30\x3B\x63\x75\x72\x73\x6F\x72\x3A\x70\x6F\x69\x6E\x74\x65\x72\x7D\x23\x74\x63\x6D\x3E\x23\x74\x63\x6D\x2D\x6D\x61\x69\x6E\x3E\x64\x69\x76\x3E\x64\x69\x76\x3E\x73\x70\x61\x6E\x3A\x68\x6F\x76\x65\x72\x7B\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x3A\x72\x67\x62\x61\x28\x30\x2C\x30\x2C\x30\x2C\x2E\x32\x29\x7D","\x6C","\x6D\x61\x74\x63\x68","\x6C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x20\x6E\x61\x6D\x65\x20\x23","\x73\x70\x61\x6E","\x75","\x74\x63\x6D\x2D\x6C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64","\x73\x63\x6F\x72\x65","\x74\x63\x6D\x2D\x73\x63\x6F\x72\x65","\x6E\x61\x6D\x65\x73","\x74\x63\x6D\x2D\x6E\x61\x6D\x65\x73","\x63\x65\x6C\x6C\x20\x6E\x61\x6D\x65","\x63\x6F\x6E\x63\x61\x74","\x74\x63\x6D","\x74\x6F\x67\x67\x6C\x65\x64","\x3C\x6C\x69\x6E\x6B\x20\x68\x72\x65\x66\x3D\x22\x68\x74\x74\x70\x73\x3A\x2F\x2F\x66\x6F\x6E\x74\x73\x2E\x67\x6F\x6F\x67\x6C\x65\x61\x70\x69\x73\x2E\x63\x6F\x6D\x2F\x63\x73\x73\x3F\x66\x61\x6D\x69\x6C\x79\x3D\x50\x61\x63\x69\x66\x69\x63\x6F\x22\x20\x72\x65\x6C\x3D\x22\x73\x74\x79\x6C\x65\x73\x68\x65\x65\x74\x22\x20\x74\x79\x70\x65\x3D\x22\x74\x65\x78\x74\x2F\x63\x73\x73\x22\x20\x2F\x3E","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x74\x63\x6D\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x64\x69\x73\x70\x6C\x61\x79\x3A\x62\x6C\x6F\x63\x6B\x3B\x22\x3E\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x74\x63\x6D\x2D\x68\x65\x61\x64\x65\x72\x22\x3E\x3C\x73\x70\x61\x6E\x3E\x43\x6F\x70\x79\x20\x54\x6F\x6F\x6C\x73\x3C\x2F\x73\x70\x61\x6E\x3E\x3C\x70\x3E\x43\x6F\x70\x79\x20\x63\x65\x6C\x6C\x20\x6E\x61\x6D\x65\x73\x20\x28\x70\x72\x65\x73\x73\x20\x78\x20\x74\x6F\x20\x73\x68\x6F\x77\x2F\x68\x69\x64\x65\x29\x3C\x2F\x70\x3E\x3C\x2F\x64\x69\x76\x3E\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x74\x63\x6D\x2D\x6D\x61\x69\x6E\x22\x3E\x3C\x64\x69\x76\x3E\x3C\x73\x70\x61\x6E\x20\x73\x74\x79\x6C\x65\x3D\x22\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x3E\x6C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x20\x6E\x61\x6D\x65\x73\x3C\x2F\x73\x70\x61\x6E\x3E\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x74\x63\x6D\x2D\x6C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x3E\x3C\x2F\x64\x69\x76\x3E\x3C\x2F\x64\x69\x76\x3E\x3C\x64\x69\x76\x3E\x3C\x73\x70\x61\x6E\x3E\x63\x65\x6C\x6C\x20\x6E\x61\x6D\x65\x73\x3C\x2F\x73\x70\x61\x6E\x3E\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x74\x63\x6D\x2D\x6E\x61\x6D\x65\x73\x22\x3E\x3C\x2F\x64\x69\x76\x3E\x3C\x2F\x64\x69\x76\x3E\x3C\x64\x69\x76\x3E\x3C\x2F\x64\x69\x76\x3E\x3C\x2F\x64\x69\x76\x3E\x3C\x2F\x64\x69\x76\x3E","\x3C\x73\x70\x61\x6E\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x6A\x61\x76\x61\x73\x63\x72\x69\x70\x74\x3A\x70\x72\x6F\x6D\x70\x74\x28\x27","\x27\x2C\x20\x27","\x27\x29\x22\x3E","\x62\x65\x66\x6F\x72\x65\x65\x6E\x64","\x66\x6F\x6E\x74\x73","\x69\x6E\x73\x65\x72\x74\x41\x64\x6A\x61\x63\x65\x6E\x74\x48\x54\x4D\x4C","\x68\x6F\x74\x6B\x65\x79\x73","\x61\x64\x64\x45\x76\x65\x6E\x74\x4C\x69\x73\x74\x65\x6E\x65\x72","\x66\x69\x6C\x6C\x74\x65\x78\x74\x5F\x6F\x76\x65\x72\x72\x69\x64\x65","\x73\x65\x74\x54\x69\x6D\x65\x6F\x75\x74","\x23\x74\x63\x6D","\x30\x30","\x64\x69\x66\x66\x65\x72\x65\x6E\x63\x65","\x74\x69\x6D\x65\x72\x53\x74\x61\x72\x74\x65\x64","\x74\x69\x6D\x65\x72\x44\x69\x76","\x23\x70\x6C\x61\x79\x74\x69\x6D\x65\x72","\x23\x73\x74\x6F\x70\x74\x69\x6D\x65\x72","\x23\x63\x6C\x65\x61\x72\x74\x69\x6D\x65\x72","\x54\x69\x6D\x65\x72\x4C\x4D\x2E\x74\x69\x6D\x65\x72\x53\x74\x61\x72\x74\x65\x64\x3A\x20","\x74\x69\x6D\x65\x72\x49\x6E\x74\x65\x72\x76\x61\x6C","\x30\x30\x3A\x30\x30","\x75\x72\x6C\x28\x22","\x22\x29","\x23\x6D\x69\x6E\x69\x6D\x61\x70\x2D\x68\x75\x64","\x31\x36\x70\x78\x20\x47\x65\x6F\x72\x67\x69\x61","\x23\x6C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x2D\x68\x75\x64","\x23\x63\x61\x6E\x76\x61\x73","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x73\x69\x7A\x65","\x63\x6F\x76\x65\x72","\x23\x6C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x2D\x68\x75\x64\x20\x3E\x20\x68\x35","\x23\x74\x6F\x70\x35\x2D\x68\x75\x64\x20\x3E\x20\x68\x35","\x23\x64\x69\x73\x63\x77\x65\x62\x68\x6F\x6F\x6B\x31","\x64\x69\x73\x63\x6F\x72\x64\x61\x70\x70\x2E\x63\x6F\x6D\x2F\x61\x70\x69\x2F\x77\x65\x62\x68\x6F\x6F\x6B\x73\x2F","\x64\x69\x73\x63\x6F\x72\x64\x2E\x63\x6F\x6D\x2F\x61\x70\x69\x2F\x77\x65\x62\x68\x6F\x6F\x6B\x73\x2F","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x44\x69\x73\x63\x6F\x72\x64\x53\x49\x50\x2E\x75\x73\x65\x72\x2E\x6A\x73","\x23\x64\x69\x73\x63\x77\x65\x62\x68\x6F\x6F\x6B\x32","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x42\x6C\x65\x65\x64\x69\x6E\x67\x4D\x6F\x64\x2E\x6A\x73","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x72\x6F\x74\x61\x74\x69\x6E\x67\x35\x30\x30\x69\x6D\x61\x67\x65\x73\x2E\x6A\x73","\x23\x6C\x65\x67\x65\x6E\x64\x6C\x61\x6E\x67\x75\x61\x67\x65\x73","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x4C\x61\x6E\x67\x75\x61\x67\x65\x50\x61\x63\x6B\x45\x6E\x67\x6C\x69\x73\x68\x2E\x6A\x73","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x4C\x61\x6E\x67\x75\x61\x67\x65\x50\x61\x63\x6B\x47\x72\x65\x65\x6B\x2E\x6A\x73","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x4C\x61\x6E\x67\x75\x61\x67\x65\x50\x61\x63\x6B\x53\x70\x61\x6E\x69\x73\x68\x2E\x6A\x73","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x4C\x61\x6E\x67\x75\x61\x67\x65\x50\x61\x63\x6B\x42\x75\x6C\x67\x61\x72\x69\x61\x6E\x2E\x6A\x73","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x4C\x61\x6E\x67\x75\x61\x67\x65\x50\x61\x63\x6B\x46\x72\x65\x6E\x63\x68\x2E\x6A\x73","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x4C\x61\x6E\x67\x75\x61\x67\x65\x50\x61\x63\x6B\x41\x72\x61\x62\x69\x63\x2E\x6A\x73","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x4C\x61\x6E\x67\x75\x61\x67\x65\x50\x61\x63\x6B\x54\x72\x61\x64\x69\x74\x69\x6F\x6E\x61\x6C\x43\x68\x69\x6E\x65\x73\x65\x2E\x6A\x73","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x4C\x61\x6E\x67\x75\x61\x67\x65\x50\x61\x63\x6B\x52\x75\x73\x73\x69\x61\x6E\x2E\x6A\x73","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x4C\x61\x6E\x67\x75\x61\x67\x65\x50\x61\x63\x6B\x47\x65\x72\x6D\x61\x6E\x2E\x6A\x73","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x4C\x61\x6E\x67\x75\x61\x67\x65\x50\x61\x63\x6B\x54\x75\x72\x6B\x69\x73\x68\x2E\x6A\x73","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x4C\x61\x6E\x67\x75\x61\x67\x65\x50\x61\x63\x6B\x50\x6F\x6C\x69\x73\x68\x2E\x6A\x73","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x4C\x61\x6E\x67\x75\x61\x67\x65\x50\x61\x63\x6B\x48\x61\x6E\x64\x6C\x65\x72\x2E\x6A\x73","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x63\x64\x6E\x2E\x6F\x67\x61\x72\x69\x6F\x2E\x6F\x76\x68\x2F\x73\x74\x61\x74\x69\x63\x2F\x69\x6D\x67\x2F\x70\x61\x74\x74\x65\x72\x6E\x2E\x70\x6E\x67","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x62\x61\x6E\x6E\x65\x72\x73\x2F\x73\x74\x61\x74\x69\x63\x2F\x69\x6D\x67\x2F\x70\x61\x74\x74\x65\x72\x6E\x2E\x70\x6E\x67","\x75\x72\x6C\x28","\x29","\x23\x6C\x65\x67\x65\x6E\x64","\x62\x6C\x75\x72","\x23\x63\x6F\x70\x79\x4C\x42\x42\x74\x6E","\x23\x64\x72\x6F\x70\x44\x6F\x77\x6E\x3E\x23\x63\x6F\x70\x79\x4C\x42\x42\x74\x6E","\x23\x63\x6F\x70\x79\x53\x49\x50\x61\x6E\x64\x50\x61\x73\x73","\x23\x63\x6F\x70\x79\x53\x49\x50\x50\x61\x73\x73\x4C\x42","\x23\x41\x6E\x69\x6D\x61\x74\x65\x64\x53\x6B\x69\x6E\x42\x74\x6E","\x23\x54\x49\x4D\x45\x63\x61\x6C\x42\x74\x6E","\x6D\x69\x6E\x69\x6D\x61\x70\x50\x69\x63\x74\x75\x72\x65","\x6C\x65\x61\x64\x62\x50\x69\x63\x74\x75\x72\x65","\x74\x65\x61\x6D\x62\x50\x69\x63\x74\x75\x72\x65","\x63\x61\x6E\x76\x61\x73\x50\x69\x63\x74\x75\x72\x65","\x70\x69\x63\x31\x75\x72\x6C","\x70\x69\x63\x32\x75\x72\x6C","\x70\x69\x63\x33\x75\x72\x6C","\x70\x69\x63\x34\x75\x72\x6C","\x70\x69\x63\x35\x75\x72\x6C","\x70\x69\x63\x36\x75\x72\x6C","\x79\x74\x31\x75\x72\x6C","\x79\x74\x32\x75\x72\x6C","\x79\x74\x33\x75\x72\x6C","\x79\x74\x34\x75\x72\x6C","\x79\x74\x35\x75\x72\x6C","\x79\x74\x36\x75\x72\x6C","\x70\x69\x63\x31\x64\x61\x74\x61","\x70\x69\x63\x32\x64\x61\x74\x61","\x70\x69\x63\x33\x64\x61\x74\x61","\x70\x69\x63\x34\x64\x61\x74\x61","\x70\x69\x63\x35\x64\x61\x74\x61","\x70\x69\x63\x36\x64\x61\x74\x61","\x79\x74\x31\x64\x61\x74\x61","\x79\x74\x32\x64\x61\x74\x61","\x79\x74\x33\x64\x61\x74\x61","\x79\x74\x34\x64\x61\x74\x61","\x79\x74\x35\x64\x61\x74\x61","\x79\x74\x36\x64\x61\x74\x61","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x4C\x45\x47\x45\x4E\x44\x41\x64\x73\x35\x22\x3E\x3C\x2F\x64\x69\x76\x3E","\x23\x61\x67\x61\x72\x69\x6F\x2D\x6D\x61\x69\x6E\x2D\x62\x75\x74\x74\x6F\x6E\x73","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x62\x61\x6E\x6E\x65\x72\x73\x2F\x62\x61\x6E\x6E\x65\x72\x44\x79\x69\x6E\x67\x4C\x69\x67\x68\x74","\x6C\x6F\x61\x64","\x23\x4C\x45\x47\x45\x4E\x44\x41\x64\x73\x32","\x79\x65\x73","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x62\x61\x6E\x6E\x65\x72\x73\x2F\x62\x61\x6E\x6E\x65\x72\x53\x74\x6F\x70\x44\x79\x69\x6E\x67\x4C\x69\x67\x68\x74","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x64\x79\x69\x6E\x67\x6C\x69\x67\x68\x74\x2E\x6A\x73","\x23\x74\x6F\x70\x35\x4D\x61\x73\x73\x43\x6F\x6C\x6F\x72","\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74","\x23\x73\x65\x61\x72\x63\x68\x53\x68\x6F\x72\x74\x63\x75\x74","\x23\x64\x72\x6F\x70\x44\x6F\x77\x6E\x33\x3E\x23\x6C\x61\x73\x74\x49\x50\x42\x74\x6E","\x23\x63\x6F\x70\x79\x53\x49\x50\x42\x74\x6E","\x23\x72\x65\x63\x6F\x6E\x6E\x65\x63\x74\x42\x74\x6E","\x23\x56\x6F\x69\x63\x65\x42\x74\x6E","\x23\x4D\x69\x6E\x69\x53\x63\x72\x69\x70\x74\x73","\x23\x53\x65\x6E\x64\x43\x6F\x6D\x6D\x61\x6E\x64\x73","\x23\x73\x68\x6F\x72\x74\x63\x75\x74\x73\x2D\x68\x75\x64\x3E\x23\x49\x6D\x61\x67\x65\x73","\x23\x79\x6F\x75\x74","\x23\x66\x75\x6C\x6C\x73\x63\x72\x65\x65\x6E\x42\x74\x6E","\x23\x43\x75\x74\x6E\x61\x6D\x65\x73","\x23\x6D\x73\x67\x63\x6F\x6D\x6D\x61\x6E\x64\x31","\x23\x6D\x73\x67\x63\x6F\x6D\x6D\x61\x6E\x64\x32","\x23\x6D\x73\x67\x63\x6F\x6D\x6D\x61\x6E\x64\x33","\x23\x6D\x73\x67\x63\x6F\x6D\x6D\x61\x6E\x64\x34","\x23\x6D\x73\x67\x63\x6F\x6D\x6D\x61\x6E\x64\x35","\x23\x6D\x73\x67\x63\x6F\x6D\x6D\x61\x6E\x64\x36","\x23\x52\x6F\x74\x61\x74\x65\x52\x69\x67\x68\x74","\x2A\x7B\x2D\x77\x65\x62\x6B\x69\x74\x2D\x62\x6F\x78\x2D\x73\x69\x7A\x69\x6E\x67\x3A\x20\x62\x6F\x72\x64\x65\x72\x2D\x62\x6F\x78\x3B\x62\x6F\x78\x2D\x73\x69\x7A\x69\x6E\x67\x3A\x20\x62\x6F\x72\x64\x65\x72\x2D\x62\x6F\x78\x7D","\x2E\x76\x69\x64\x65\x6F\x2D\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x7B\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x3A\x20\x23\x30\x30\x30\x3B\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x20\x66\x69\x78\x65\x64\x3B\x74\x6F\x70\x3A\x20\x30\x3B\x72\x69\x67\x68\x74\x3A\x20\x30\x3B\x62\x6F\x74\x74\x6F\x6D\x3A\x20\x30\x3B\x6C\x65\x66\x74\x3A\x20\x30\x3B\x7A\x2D\x69\x6E\x64\x65\x78\x3A\x20\x2D\x39\x39\x7D","\x2E\x76\x69\x64\x65\x6F\x2D\x66\x6F\x72\x65\x67\x72\x6F\x75\x6E\x64\x2C\x2E\x76\x69\x64\x65\x6F\x2D\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x20\x69\x66\x72\x61\x6D\x65\x7B\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x20\x61\x62\x73\x6F\x6C\x75\x74\x65\x3B\x74\x6F\x70\x3A\x20\x30\x3B\x6C\x65\x66\x74\x3A\x20\x30\x3B\x77\x69\x64\x74\x68\x3A\x20\x31\x30\x30\x25\x3B\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x70\x6F\x69\x6E\x74\x65\x72\x2D\x65\x76\x65\x6E\x74\x73\x3A\x20\x6E\x6F\x6E\x65\x7D","\x23\x76\x69\x64\x74\x6F\x70\x2D\x63\x6F\x6E\x74\x65\x6E\x74\x7B\x74\x6F\x70\x3A\x20\x30\x3B\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x66\x66\x66\x7D\x2E\x76\x69\x64\x2D\x69\x6E\x66\x6F\x7B\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x20\x61\x62\x73\x6F\x6C\x75\x74\x65\x3B\x74\x6F\x70\x3A\x20\x30\x3B\x72\x69\x67\x68\x74\x3A\x20\x30\x3B\x77\x69\x64\x74\x68\x3A\x20\x33\x33\x25\x3B\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x3A\x20\x72\x67\x62\x61\x28\x30\x2C\x30\x2C\x30\x2C\x30\x2E\x33\x29\x3B\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x66\x66\x66\x3B\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x31\x72\x65\x6D\x3B\x66\x6F\x6E\x74\x2D\x66\x61\x6D\x69\x6C\x79\x3A\x20\x41\x76\x65\x6E\x69\x72\x2C\x20\x48\x65\x6C\x76\x65\x74\x69\x63\x61\x2C\x20\x73\x61\x6E\x73\x2D\x73\x65\x72\x69\x66\x7D","\x2E\x76\x69\x64\x2D\x69\x6E\x66\x6F\x20\x68\x31\x7B\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x20\x32\x72\x65\x6D\x3B\x66\x6F\x6E\x74\x2D\x77\x65\x69\x67\x68\x74\x3A\x20\x37\x30\x30\x3B\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x30\x3B\x6C\x69\x6E\x65\x2D\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x2E\x32\x7D","\x2E\x76\x69\x64\x2D\x69\x6E\x66\x6F\x20\x61\x7B\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x62\x6C\x6F\x63\x6B\x3B\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x66\x66\x66\x3B\x74\x65\x78\x74\x2D\x64\x65\x63\x6F\x72\x61\x74\x69\x6F\x6E\x3A\x20\x6E\x6F\x6E\x65\x3B\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x3A\x20\x72\x67\x62\x61\x28\x30\x2C\x30\x2C\x30\x2C\x30\x2E\x35\x29\x3B\x2D\x77\x65\x62\x6B\x69\x74\x2D\x74\x72\x61\x6E\x73\x69\x74\x69\x6F\x6E\x3A\x20\x2E\x36\x73\x20\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x3B\x74\x72\x61\x6E\x73\x69\x74\x69\x6F\x6E\x3A\x20\x2E\x36\x73\x20\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x3B\x62\x6F\x72\x64\x65\x72\x2D\x62\x6F\x74\x74\x6F\x6D\x3A\x20\x6E\x6F\x6E\x65\x3B\x6D\x61\x72\x67\x69\x6E\x3A\x20\x31\x72\x65\x6D\x20\x61\x75\x74\x6F\x3B\x74\x65\x78\x74\x2D\x61\x6C\x69\x67\x6E\x3A\x20\x63\x65\x6E\x74\x65\x72\x7D","\x2E\x76\x69\x64\x2D\x69\x6E\x66\x6F\x20\x2E\x61\x63\x72\x6F\x6E\x79\x6D\x7B\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x7D\x7D","\x3C\x64\x69\x76\x20\x63\x6C\x61\x73\x73\x3D\x22\x76\x69\x64\x65\x6F\x2D\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x22\x3E\x3C\x64\x69\x76\x20\x63\x6C\x61\x73\x73\x3D\x22\x76\x69\x64\x65\x6F\x2D\x66\x6F\x72\x65\x67\x72\x6F\x75\x6E\x64\x22\x3E\x3C\x69\x66\x72\x61\x6D\x65\x20\x69\x64\x3D\x22\x76\x69\x64\x65\x6F\x2D\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x22\x20\x66\x72\x61\x6D\x65\x62\x6F\x72\x64\x65\x72\x3D\x22\x30\x22\x20\x68\x65\x69\x67\x68\x74\x3D\x22\x31\x30\x30\x25\x22\x20\x77\x69\x64\x74\x68\x3D\x22\x31\x30\x30\x25\x22\x20\x73\x72\x63\x3D\x22\x68\x74\x74\x70\x73\x3A\x2F\x2F\x77\x77\x77\x2E\x79\x6F\x75\x74\x75\x62\x65\x2E\x63\x6F\x6D\x2F\x65\x6D\x62\x65\x64\x2F","\x3F\x63\x6F\x6E\x74\x72\x6F\x6C\x73\x3D\x30\x26\x73\x68\x6F\x77\x69\x6E\x66\x6F\x3D\x30\x26\x72\x65\x6C\x3D\x30\x26\x61\x75\x74\x6F\x70\x6C\x61\x79\x3D\x31\x26\x6C\x6F\x6F\x70\x3D\x31\x26\x73\x74\x61\x72\x74\x5F\x72\x61\x64\x69\x6F\x3D\x31\x26\x70\x6C\x61\x79\x6C\x69\x73\x74\x3D","\x22\x3E\x3C\x2F\x69\x66\x72\x61\x6D\x65\x3E\x3C\x2F\x64\x69\x76\x3E\x3C\x2F\x64\x69\x76\x3E\x3C\x2F\x64\x69\x76\x3E","\x2E\x76\x69\x64\x65\x6F\x2D\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x62\x61\x6E\x6E\x65\x72\x73\x2F\x74\x72\x6F\x6C\x6C\x31\x2E\x6D\x70\x33","\x75\x72\x6C\x28\x22\x20\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6D\x65\x64\x69\x61\x2E\x67\x69\x70\x68\x79\x2E\x63\x6F\x6D\x2F\x6D\x65\x64\x69\x61\x2F\x65\x56\x79\x34\x36\x45\x57\x79\x63\x6C\x54\x49\x41\x2F\x67\x69\x70\x68\x79\x2E\x67\x69\x66\x20\x22\x29","\x75\x72\x6C\x28\x22\x20\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x62\x61\x6E\x6E\x65\x72\x73\x2F\x69\x63\x6F\x65\x75\x63\x69\x64\x2E\x67\x69\x66\x20\x22\x29","\x75\x72\x6C\x28\x22\x20\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6D\x65\x64\x69\x61\x2E\x67\x69\x70\x68\x79\x2E\x63\x6F\x6D\x2F\x6D\x65\x64\x69\x61\x2F\x56\x53\x75\x57\x66\x6C\x31\x71\x43\x69\x52\x73\x6B\x2F\x67\x69\x70\x68\x79\x2E\x67\x69\x66\x20\x22\x29","\x75\x72\x6C\x28\x22\x20\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6D\x65\x64\x69\x61\x2E\x67\x69\x70\x68\x79\x2E\x63\x6F\x6D\x2F\x6D\x65\x64\x69\x61\x2F\x61\x77\x39\x57\x67\x76\x67\x4E\x64\x31\x62\x51\x6B\x2F\x67\x69\x70\x68\x79\x2E\x67\x69\x66\x20\x22\x29","\x5F\x64\x72\x61\x77\x49\x6D\x61\x67\x65","\x64\x72\x61\x77\x49\x6D\x61\x67\x65","\x50\x72\x65\x76\x65\x6E\x74\x69\x6E\x67\x20\x63\x61\x6E\x76\x61\x73\x20\x74\x6F\x20\x63\x72\x61\x73\x68\x20\x66\x72\x6F\x6D\x20\x69\x6D\x61\x67\x65\x20\x77\x69\x64\x74\x68\x20\x61\x6E\x64\x20\x68\x65\x69\x67\x68\x74","\x4F\x43\x68\x61\x74\x42\x65\x74\x74\x65\x72","\x72\x67\x62\x61\x28\x31\x32\x38\x2C\x31\x32\x38\x2C\x31\x32\x38\x2C\x30\x2E\x39\x29","\x77\x61\x69\x74\x20\x66\x6F\x72\x20\x4F\x47\x41\x52\x69\x6F\x20\x6C\x6F\x61\x64","\x6F\x62\x73\x5F\x68\x69\x73\x74","\x61\x64\x64\x65\x64\x4E\x6F\x64\x65\x73","\x68\x69\x73\x74\x5F\x61\x64\x64","\x67\x65\x74","\x6F\x62\x73\x65\x72\x76\x65","\x6F\x62\x73\x5F\x69\x6E\x70\x74","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x4E\x61\x6D\x65","\x74\x61\x72\x67\x65\x74","\x69\x6E\x70\x74\x5F\x73\x68\x6F\x77","\x69\x6E\x70\x74\x5F\x68\x69\x64\x65","\x68\x69\x73\x74\x5F\x73\x68\x6F\x77","\x65\x6D\x70\x68\x61\x73\x69\x73\x5F\x62\x67\x63\x6F\x6C\x6F\x72","\x65\x6D\x70\x68\x61\x73\x69\x73\x5F\x74\x69\x6D\x65","\x73\x63\x72\x6F\x6C\x6C\x5F\x64\x75\x6C\x61\x74\x69\x6F\x6E","\x68\x69\x73\x74\x68\x69\x64\x65\x5F\x74\x69\x6D\x65\x49\x44","\x68\x69\x73\x74\x68\x69\x64\x65\x5F\x65\x6E\x61\x62\x6C\x65","\x68\x69\x73\x74\x68\x69\x64\x65\x5F\x74\x69\x6D\x65","\x23\x55\x73\x65\x72\x50\x72\x6F\x66\x69\x6C\x65\x49\x44\x32\x61","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x6D\x73\x65\x74\x74\x69\x6E\x67\x73\x2E\x73\x6E\x65\x7A\x2E\x6F\x72\x67\x2F","\x4C\x4D\x53\x65\x74\x74\x69\x6E\x67\x73","\x3A\x20\x3C\x66\x6F\x6E\x74\x20\x63\x6F\x6C\x6F\x72\x3D\x27\x79\x65\x6C\x6C\x6F\x77\x27\x3E\x3C\x62\x3E","\x3C\x2F\x62\x3E\x3C\x2F\x66\x6F\x6E\x74\x3E","\x72\x65\x73\x70\x6F\x6E\x73\x65","\x73\x65\x72\x76\x65\x72\x2D\x74\x6F\x6B\x65\x6E","\x63\x6C\x61\x6E\x74\x61\x67","\x73\x65\x72\x76\x65\x72\x2D\x72\x65\x63\x6F\x6E\x6E\x65\x63\x74","\x77\x73\x73\x3A\x2F\x2F\x61\x67\x61\x72\x2E\x73\x6E\x65\x7A\x2E\x6F\x72\x67\x3A\x36\x33\x30\x35\x31\x2F","\x63\x6C\x69\x65\x6E\x74","\x73\x65\x72\x76\x65\x72","\x6F\x6E\x6F\x70\x65\x6E","\x75\x70\x64\x61\x74\x65\x53\x65\x72\x76\x65\x72\x44\x65\x74\x61\x69\x6C\x73","\x6F\x6E\x63\x6C\x6F\x73\x65","\x72\x65\x63\x6F\x6E\x6E\x65\x63\x74","\x6F\x6E\x6D\x65\x73\x73\x61\x67\x65","\x6F\x6E\x4D\x65\x73\x73\x61\x67\x65","\x52\x65\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6E\x67\x20\x69\x6E\x20\x35\x20\x73\x65\x63\x6F\x6E\x64\x73\x2E\x2E\x2E","\x75\x70\x64\x61\x74\x65\x5F\x64\x65\x74\x61\x69\x6C\x73","\x6E\x69\x63\x6B\x6E\x61\x6D\x65","\x41\x49\x44","\x61\x67\x61\x72\x69\x6F\x49\x44","\x68\x69\x64\x65\x63\x6F\x75\x6E\x74\x72\x79","\x61\x67\x61\x72\x69\x6F\x4C\x45\x56\x45\x4C","\x72\x65\x61\x64\x79\x53\x74\x61\x74\x65","\x4F\x50\x45\x4E","\x64\x61\x74\x61","\x70\x6F\x6E\x67","\x70\x69\x6E\x67","\x72\x65\x63\x6F\x6E\x6E\x65\x63\x74\x42\x75\x74\x74\x6F\x6E","\x43\x6F\x75\x6C\x64\x20\x6E\x6F\x74\x20\x69\x6E\x69\x74\x69\x61\x6C\x69\x7A\x65\x20\x49\x6E\x66\x6F\x20\x73\x65\x6E\x64\x69\x6E\x67","\x75\x70\x64\x61\x74\x65\x44\x65\x74\x61\x69\x6C\x73","\x5F\x5F\x63\x66\x64\x75\x69\x64","\x3B","\x63\x68\x61\x72\x41\x74","\x6F\x6E\x4F\x70\x65\x6E","\x6F\x6E\x43\x6C\x6F\x73\x65","\x63\x6C\x6F\x73\x65","\x69\x73\x45\x6D\x70\x74\x79","\x75\x70\x64\x61\x74\x65\x50\x6C\x61\x79\x65\x72\x73","\x70\x6C\x61\x79\x65\x72\x73\x5F\x6C\x69\x73\x74","\x55\x73\x65\x72\x20\x46\x6F\x75\x6E\x64\x2E\x20\x52\x65\x76\x65\x61\x6C\x69\x6E\x67\x20\x73\x65\x72\x76\x65\x72\x2E\x2E\x2E","\x6E\x69\x63\x6B\x6E\x61\x6D\x65\x22\x3A\x22","\x22\x2C\x22\x73\x65\x72\x76\x65\x72","\x65\x78\x74\x72\x61","\x63\x6F\x75\x6E\x74\x72\x79","\x69\x70\x5F\x69\x6E\x66\x6F","\x55\x4E","\x22\x2C\x22\x68\x69\x64\x65\x63\x6F\x75\x6E\x74\x72\x79","\x22\x2C\x22\x41\x49\x44","\x22\x2C\x22\x74\x61\x67","\x52\x65\x67\x69\x6F\x6E\x3A\x3C\x73\x70\x61\x6E\x20\x69\x64\x3D\x27\x72\x65\x67\x69\x6F\x6E\x69\x6E\x66\x6F\x27\x3E","\x3C\x2F\x73\x70\x61\x6E\x3E\x2C\x20\x4D\x6F\x64\x65\x3C\x73\x70\x61\x6E\x20\x69\x64\x3D\x27\x6D\x6F\x64\x65\x69\x6E\x66\x6F\x27\x3E","\x3C\x2F\x73\x70\x61\x6E\x3E\x2E\x20\x3C\x73\x70\x61\x6E\x20\x63\x6C\x61\x73\x73\x3D\x27\x6D\x61\x69\x6E\x2D\x63\x6F\x6C\x6F\x72\x27\x3E\x3C\x73\x70\x61\x6E\x20\x69\x64\x3D\x27\x70\x6C\x61\x79\x65\x72\x69\x6E\x66\x6F\x27\x3E","\x3C\x2F\x73\x70\x61\x6E\x3E\x20\x3C\x73\x70\x61\x6E\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x27\x70\x6F\x70\x6F\x76\x65\x72\x27\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x27\x6C\x65\x66\x74\x27\x20\x74\x69\x74\x6C\x65\x3D\x27\x27\x20\x64\x61\x74\x61\x2D\x63\x6F\x6E\x74\x65\x6E\x74\x3D\x27\x64\x61\x74\x61\x2D\x68\x74\x6D\x6C\x3D\x27\x74\x72\x75\x65\x27\x20\x63\x6C\x61\x73\x73\x3D\x27\x63\x6F\x75\x6E\x74\x72\x79\x2D\x69\x63\x6F\x6E\x20\x66\x6C\x61\x67\x2D\x69\x63\x6F\x6E\x20\x66\x6C\x61\x67\x2D\x69\x63\x6F\x6E\x2D","\x27\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x27\x50\x6C\x61\x79\x65\x72\x20\x44\x65\x74\x61\x69\x6C\x73\x27\x3E\x3C\x2F\x73\x70\x61\x6E\x3E\x3C\x2F\x73\x70\x61\x6E\x3E","\x20\x28\x3C\x73\x70\x61\x6E\x20\x69\x64\x3D\x27\x74\x6F\x6B\x65\x6E\x69\x6E\x66\x6F\x27\x3E","\x3C\x2F\x73\x70\x61\x6E\x3E\x29","\x3C\x73\x70\x61\x6E\x20\x63\x6C\x61\x73\x73\x3D\x27\x6D\x61\x69\x6E\x2D\x63\x6F\x6C\x6F\x72\x27\x3E\x3C\x73\x70\x61\x6E\x20\x69\x64\x3D\x27\x70\x6C\x61\x79\x65\x72\x69\x6E\x66\x6F\x27\x3E","\x53\x65\x72\x76\x65\x72\x20\x46\x6F\x75\x6E\x64\x2E\x20\x52\x65\x76\x65\x61\x6C\x69\x6E\x67\x20\x75\x73\x65\x72\x73\x2E\x2E\x2E","\x3C\x2F\x73\x70\x61\x6E\x3E\x2E\x20\x3C\x73\x70\x61\x6E\x20\x69\x64\x3D\x27\x70\x6C\x61\x79\x65\x72\x69\x6E\x66\x6F\x27\x3E","\x20\x3C\x73\x70\x61\x6E\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x27\x70\x6F\x70\x6F\x76\x65\x72\x27\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x27\x6C\x65\x66\x74\x27\x20\x74\x69\x74\x6C\x65\x3D\x27\x27\x20\x64\x61\x74\x61\x2D\x63\x6F\x6E\x74\x65\x6E\x74\x3D\x27\x64\x61\x74\x61\x2D\x68\x74\x6D\x6C\x3D\x27\x74\x72\x75\x65\x27\x20\x63\x6C\x61\x73\x73\x3D\x27\x63\x6F\x75\x6E\x74\x72\x79\x2D\x69\x63\x6F\x6E\x20\x66\x6C\x61\x67\x2D\x69\x63\x6F\x6E\x20\x66\x6C\x61\x67\x2D\x69\x63\x6F\x6E\x2D","\x27\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x27\x50\x6C\x61\x79\x65\x72\x20\x44\x65\x74\x61\x69\x6C\x73\x27\x3E\x3C\x2F\x73\x70\x61\x6E\x3E\x3C\x2F\x73\x70\x61\x6E\x3E\x20\x28\x3C\x73\x70\x61\x6E\x20\x63\x6C\x61\x73\x73\x3D\x27\x6D\x61\x69\x6E\x2D\x63\x6F\x6C\x6F\x72\x27\x3E\x3C\x73\x70\x61\x6E\x20\x69\x64\x3D\x27\x74\x6F\x6B\x65\x6E\x69\x6E\x66\x6F\x27\x3E","\x3C\x2F\x73\x70\x61\x6E\x3E\x3C\x2F\x73\x70\x61\x6E\x3E\x29","\x3C\x73\x70\x61\x6E\x20\x69\x64\x3D\x27\x70\x6C\x61\x79\x65\x72\x69\x6E\x66\x6F\x27\x3E","\x53\x65\x72\x76\x65\x72\x20\x2F\x20\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x2C\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64\x2E\x20\x44\x6F\x20\x79\x6F\x75\x20\x77\x61\x6E\x74\x20\x74\x68\x65\x20\x31\x2D\x62\x79\x2D\x31\x20\x6D\x61\x6E\x75\x61\x6C\x20\x73\x65\x61\x72\x63\x68\x20\x6C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x73\x20\x6F\x66\x20\x3C\x66\x6F\x6E\x74\x20\x63\x6F\x6C\x6F\x72\x3D\x22\x79\x65\x6C\x6C\x6F\x77\x22\x3E","\x20\x2F\x20","\x3C\x2F\x66\x6F\x6E\x74\x3E\x20\x3F","\x3C\x2F\x62\x72\x3E\x20\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x20\x22\x6D\x61\x6E\x75\x61\x6C\x73\x65\x61\x72\x63\x68\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x62\x6C\x6F\x63\x6B\x20\x62\x74\x6E\x2D\x69\x6E\x66\x6F\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x31\x30\x70\x78\x3B\x62\x6F\x72\x64\x65\x72\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x64\x61\x72\x6B\x62\x6C\x75\x65\x3B\x22\x3E","\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E\x3C\x62\x72\x3E\x3C\x62\x75\x74\x74\x6F\x6E\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x73\x6D\x20\x62\x74\x6E\x2D\x77\x61\x72\x6E\x69\x6E\x67\x20\x62\x74\x6E\x2D\x65\x78\x69\x74\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x77\x69\x64\x74\x68\x3A\x20\x31\x30\x30\x25\x3B\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x2D\x32\x30\x70\x78\x3B\x22\x3E","\x23\x6D\x61\x6E\x75\x61\x6C\x73\x65\x61\x72\x63\x68","\x6D\x65\x73\x73\x61\x67\x65\x2D\x62\x6F\x78","\x6F\x67\x61\x72\x69\x6F\x2E\x6A\x73\x20\x6E\x6F\x74\x20\x6C\x6F\x61\x64\x65\x64","\x74\x69\x74\x6C\x65","\x53\x70\x65\x63\x74\x61\x74\x65","\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65","\x74\x6F\x6F\x6C\x74\x69\x70","\x3C\x73\x70\x61\x6E\x20\x63\x6C\x61\x73\x73\x3D\x22\x67\x6C\x79\x70\x68\x69\x63\x6F\x6E\x20\x67\x6C\x79\x70\x68\x69\x63\x6F\x6E\x2D\x67\x6C\x6F\x62\x65\x22\x3E\x3C\x2F\x73\x70\x61\x6E\x3E","\x62\x75\x74\x74\x6F\x6E\x3A\x63\x6F\x6E\x74\x61\x69\x6E\x73\x28\x27\x53\x70\x65\x63\x74\x61\x74\x65\x27\x29","\x4C\x6F\x67\x6F\x75\x74","\x3C\x73\x70\x61\x6E\x20\x63\x6C\x61\x73\x73\x3D\x22\x67\x6C\x79\x70\x68\x69\x63\x6F\x6E\x20\x67\x6C\x79\x70\x68\x69\x63\x6F\x6E\x2D\x6F\x66\x66\x22\x3E\x3C\x2F\x73\x70\x61\x6E\x3E","\x62\x75\x74\x74\x6F\x6E\x3A\x63\x6F\x6E\x74\x61\x69\x6E\x73\x28\x27\x4C\x6F\x67\x6F\x75\x74\x27\x29","\x62\x74\x6E\x2D\x6C\x69\x6E\x6B","\x62\x74\x6E\x2D\x69\x6E\x66\x6F","\x62\x75\x74\x74\x6F\x6E\x3A\x63\x6F\x6E\x74\x61\x69\x6E\x73\x28\x27\x43\x6F\x70\x79\x27\x29","\x3C\x73\x70\x61\x6E\x20\x63\x6C\x61\x73\x73\x3D\x22\x67\x6C\x79\x70\x68\x69\x63\x6F\x6E\x20\x67\x6C\x79\x70\x68\x69\x63\x6F\x6E\x2D\x70\x6C\x75\x73\x22\x3E\x3C\x2F\x73\x70\x61\x6E\x3E","\x23\x63\x72\x65\x61\x74\x65\x2D\x70\x61\x72\x74\x79\x2D\x62\x74\x6E\x2D\x32","\x43\x72\x65\x61\x74\x65\x20\x70\x61\x72\x74\x79","\x77\x69\x64\x74\x68\x3A\x20\x34\x39\x25\x20\x21\x69\x6D\x70\x6F\x72\x74\x61\x6E\x74\x3B\x20\x66\x6C\x6F\x61\x74\x3A\x20\x72\x69\x67\x68\x74\x3B","\x4A\x6F\x69\x6E\x20\x70\x61\x72\x74\x79","\x3C\x73\x70\x61\x6E\x20\x63\x6C\x61\x73\x73\x3D\x22\x67\x6C\x79\x70\x68\x69\x63\x6F\x6E\x20\x67\x6C\x79\x70\x68\x69\x63\x6F\x6E\x2D\x73\x61\x76\x65\x22\x3E\x3C\x2F\x73\x70\x61\x6E\x3E","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x46\x61\x64\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x77\x69\x64\x74\x68\x3A\x20\x31\x30\x30\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x20\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x20\x61\x62\x73\x6F\x6C\x75\x74\x65\x3B\x20\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x3A\x20\x62\x6C\x61\x63\x6B\x3B\x20\x7A\x2D\x69\x6E\x64\x65\x78\x3A\x20\x31\x30\x30\x3B\x20\x6F\x70\x61\x63\x69\x74\x79\x3A\x20\x30\x2E\x36\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x3E\x3C\x2F\x64\x69\x76\x3E","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x73\x74\x61\x74\x73\x49\x6E\x66\x6F\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x6D\x61\x69\x6E\x2D\x63\x6F\x6C\x6F\x72\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x6F\x69\x6E\x74\x65\x72\x2D\x65\x76\x65\x6E\x74\x73\x3A\x20\x61\x75\x74\x6F\x3B\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x20\x31\x33\x70\x78\x3B\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x33\x70\x78\x3B\x66\x6C\x6F\x61\x74\x3A\x20\x6C\x65\x66\x74\x3B\x66\x6F\x6E\x74\x2D\x77\x65\x69\x67\x68\x74\x3A\x20\x37\x30\x30\x3B\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x72\x67\x62\x61\x28\x30\x2C\x20\x30\x2C\x20\x30\x2C\x20\x30\x2E\x32\x29\x3B\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x33\x70\x78\x3B\x62\x6F\x72\x64\x65\x72\x2D\x72\x61\x64\x69\x75\x73\x3A\x20\x34\x70\x78\x3B\x77\x69\x64\x74\x68\x3A\x20\x36\x35\x25\x3B\x68\x65\x69\x67\x68\x74\x3A\x20\x34\x34\x70\x78\x3B\x7A\x2D\x69\x6E\x64\x65\x78\x3A\x20\x31\x35\x3B\x6D\x61\x72\x67\x69\x6E\x3A\x20\x61\x75\x74\x6F\x3B\x74\x6F\x70\x3A\x20\x30\x70\x78\x3B\x72\x69\x67\x68\x74\x3A\x20\x30\x70\x78\x3B\x6C\x65\x66\x74\x3A\x20\x30\x70\x78\x3B\x62\x6F\x74\x74\x6F\x6D\x3A\x20\x38\x35\x70\x78\x3B\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x20\x66\x69\x78\x65\x64\x3B\x70\x6F\x69\x6E\x74\x65\x72\x2D\x65\x76\x65\x6E\x74\x73\x3A\x20\x61\x75\x74\x6F\x3B\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x66\x66\x66\x66\x66\x66\x3B\x22\x3E","\x3C\x70\x20\x73\x74\x79\x6C\x65\x3D\x22\x66\x6C\x6F\x61\x74\x3A\x20\x72\x69\x67\x68\x74\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x72\x69\x67\x68\x74\x3A\x20\x31\x30\x70\x78\x3B\x22\x3E\x3C\x73\x70\x61\x6E\x20\x69\x64\x3D\x22\x6E\x6F\x74\x65\x73\x53\x65\x72\x76\x65\x72\x22\x3E\x53\x65\x72\x76\x65\x72\x73\x3A\x20\x3C\x2F\x73\x70\x61\x6E\x3E\x3C\x73\x70\x61\x6E\x20\x69\x64\x3D\x22\x6E\x75\x6D\x53\x65\x72\x76\x65\x72\x73\x22\x3E\x3C\x2F\x73\x70\x61\x6E\x3E\x20\x28\x3C\x73\x70\x61\x6E\x20\x69\x64\x3D\x22\x70\x70\x73\x22\x3E\x3C\x2F\x73\x70\x61\x6E\x3E\x20\x3C\x73\x70\x61\x6E\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x74\x6F\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x50\x6C\x61\x79\x65\x72\x73\x20\x70\x65\x72\x20\x73\x65\x72\x76\x65\x72\x22\x3E\x50\x50\x53\x3C\x2F\x73\x70\x61\x6E\x3E\x29\x3C\x2F\x70\x3E","\x3C\x70\x20\x73\x74\x79\x6C\x65\x3D\x22\x66\x6C\x6F\x61\x74\x3A\x20\x72\x69\x67\x68\x74\x3B\x6D\x61\x72\x67\x69\x6E\x2D\x72\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x70\x78\x3B\x22\x3E\x3C\x73\x70\x61\x6E\x20\x69\x64\x3D\x22\x6E\x6F\x74\x65\x73\x50\x6C\x61\x79\x65\x72\x73\x22\x3E\x50\x6C\x61\x79\x65\x72\x73\x3A\x20\x3C\x2F\x73\x70\x61\x6E\x3E\x3C\x73\x70\x61\x6E\x20\x69\x64\x3D\x22\x6E\x75\x6D\x50\x6C\x61\x79\x65\x72\x73\x22\x3E\x3C\x2F\x73\x70\x61\x6E\x3E\x20\x2F\x20\x3C\x73\x70\x61\x6E\x20\x69\x64\x3D\x22\x74\x6F\x74\x61\x6C\x50\x6C\x61\x79\x65\x72\x73\x22\x20\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x74\x6F\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x54\x6F\x74\x61\x6C\x20\x70\x6C\x61\x79\x65\x72\x73\x20\x6F\x6E\x6C\x69\x6E\x65\x22\x3E\x3C\x2F\x73\x70\x61\x6E\x3E\x3C\x2F\x70\x3E\x3C\x2F\x64\x69\x76\x3E","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x73\x65\x61\x72\x63\x68\x48\x75\x64\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x68\x75\x64\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x77\x69\x64\x74\x68\x3A\x20\x36\x35\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x36\x30\x70\x78\x3B\x20\x7A\x2D\x69\x6E\x64\x65\x78\x3A\x20\x31\x35\x3B\x20\x6D\x61\x72\x67\x69\x6E\x3A\x20\x61\x75\x74\x6F\x3B\x20\x74\x6F\x70\x3A\x20\x30\x3B\x20\x72\x69\x67\x68\x74\x3A\x20\x30\x3B\x20\x6C\x65\x66\x74\x3A\x20\x30\x3B\x20\x62\x6F\x74\x74\x6F\x6D\x3A\x20\x30\x3B\x20\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x20\x66\x69\x78\x65\x64\x3B\x22\x3E","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x31\x30\x70\x78\x3B\x22\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x73\x65\x61\x72\x63\x68\x49\x6E\x70\x75\x74\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x74\x69\x74\x6C\x65\x3D\x22\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x45\x6E\x74\x65\x72\x20\x66\x72\x69\x65\x6E\x64\x27\x73\x20\x74\x6F\x6B\x65\x6E\x2C\x20\x49\x50\x2C\x20\x6C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x2C\x20\x6E\x61\x6D\x65\x20\x6F\x72\x20\x63\x6C\x61\x6E\x20\x74\x61\x67\x2E\x2E\x2E\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x6F\x69\x6E\x74\x65\x72\x2D\x65\x76\x65\x6E\x74\x73\x3A\x20\x61\x75\x74\x6F\x3B\x6D\x61\x72\x67\x69\x6E\x2D\x62\x6F\x74\x74\x6F\x6D\x3A\x20\x31\x30\x70\x78\x3B\x66\x6C\x6F\x61\x74\x3A\x20\x6C\x65\x66\x74\x3B\x77\x69\x64\x74\x68\x3A\x20\x38\x30\x25\x20\x21\x69\x6D\x70\x6F\x72\x74\x61\x6E\x74\x3B\x74\x65\x78\x74\x2D\x61\x6C\x69\x67\x6E\x3A\x20\x63\x65\x6E\x74\x65\x72\x3B\x22\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x73\x65\x61\x72\x63\x68\x42\x74\x6E\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x63\x6F\x70\x79\x2D\x74\x6F\x6B\x65\x6E\x20\x63\x6F\x70\x79\x2D\x70\x61\x72\x74\x79\x2D\x74\x6F\x6B\x65\x6E\x20\x62\x74\x6E\x2D\x70\x72\x69\x6D\x61\x72\x79\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x62\x6F\x74\x74\x6F\x6D\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x43\x61\x6E\x63\x65\x6C\x20\x73\x65\x61\x72\x63\x68\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x6F\x69\x6E\x74\x65\x72\x2D\x65\x76\x65\x6E\x74\x73\x3A\x20\x61\x75\x74\x6F\x3B\x6D\x61\x72\x67\x69\x6E\x2D\x62\x6F\x74\x74\x6F\x6D\x3A\x31\x30\x70\x78\x3B\x77\x69\x64\x74\x68\x3A\x20\x31\x35\x25\x3B\x22\x3E\x3C\x73\x70\x61\x6E\x20\x69\x64\x3D\x22\x73\x65\x61\x72\x63\x68\x53\x70\x61\x6E\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x73\x65\x61\x72\x63\x68\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x73\x70\x61\x6E\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x23\x6F\x76\x65\x72\x6C\x61\x79\x73\x2D\x68\x75\x64","\x23\x72\x65\x67\x69\x6F\x6E\x6D\x6F\x64\x65\x63\x68\x65\x63\x6B","\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72","\x50\x61\x73\x73\x77\x6F\x72\x64","\x57\x68\x65\x6E\x20\x45\x4E\x41\x42\x4C\x45\x44\x3A\x20\x4F\x70\x74\x69\x6D\x69\x7A\x65\x64\x20\x6D\x61\x73\x73\x20\x28\x2B\x2F\x2D\x32\x25\x29\x20\x4F\x4E\x2C\x20\x4D\x65\x72\x67\x65\x20\x54\x69\x6D\x65\x72\x20\x42\x45\x54\x41\x20\x4F\x46\x46\x2E\x20\x53\x75\x67\x67\x65\x73\x74\x65\x64\x20\x74\x6F\x20\x62\x65\x20\x45\x4E\x41\x42\x4C\x45\x44\x20\x66\x6F\x72\x20\x4C\x61\x67\x20\x72\x65\x64\x75\x63\x65\x2E","\x70\x61\x72\x65\x6E\x74","\x23\x6F\x70\x74\x69\x6D\x69\x7A\x65\x64\x4D\x61\x73\x73","\x3C\x6C\x61\x62\x65\x6C\x20\x73\x74\x79\x6C\x65\x3D\x22\x66\x6C\x6F\x61\x74\x3A\x6C\x65\x66\x74\x3B\x20\x70\x61\x64\x64\x69\x6E\x67\x2D\x6C\x65\x66\x74\x3A\x30\x3B\x20\x70\x61\x64\x64\x69\x6E\x67\x2D\x72\x69\x67\x68\x74\x3A\x30\x22\x3E","\x75\x6E\x6C\x6F\x63\x6B\x65\x64\x46\x50\x53","\x3C\x73\x65\x6C\x65\x63\x74\x20\x69\x64\x3D\x22\x46\x72\x61\x6D\x65\x57\x6F\x72\x6B\x4F\x70\x74\x69\x6F\x6E\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x6F\x6E\x63\x68\x61\x6E\x67\x65\x3D\x22\x63\x68\x61\x6E\x67\x65\x46\x72\x61\x6D\x65\x57\x6F\x72\x6B\x28\x29\x3B\x22\x20\x72\x65\x71\x75\x69\x72\x65\x64\x3D\x22\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x22\x20\x74\x69\x74\x6C\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x64\x69\x73\x70\x6C\x61\x79\x3A\x69\x6E\x6C\x69\x6E\x65\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x37\x30\x25\x3B\x20\x66\x6C\x6F\x61\x74\x3A\x72\x69\x67\x68\x74\x3B\x22\x20\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x34\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x4C\x69\x6D\x69\x74\x65\x64\x20\x52\x61\x74\x65\x20\x2B\x20\x34\x6D\x73\x20\x64\x65\x6C\x61\x79\x20\x28\x73\x75\x67\x67\x65\x73\x74\x65\x64\x29\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x66\x61\x6C\x73\x65\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x4C\x69\x6D\x69\x74\x65\x64\x20\x52\x61\x74\x65\x20\x2B\x20\x4E\x6F\x20\x64\x65\x6C\x61\x79\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x32\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x4C\x69\x6D\x69\x74\x65\x64\x20\x52\x61\x74\x65\x20\x2B\x20\x32\x6D\x73\x20\x64\x65\x6C\x61\x79\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x38\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x4C\x69\x6D\x69\x74\x65\x64\x20\x52\x61\x74\x65\x20\x2B\x20\x38\x6D\x73\x20\x64\x65\x6C\x61\x79\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x31\x36\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x4C\x69\x6D\x69\x74\x65\x64\x20\x52\x61\x74\x65\x20\x2B\x20\x31\x36\x6D\x73\x20\x64\x65\x6C\x61\x79\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x33\x32\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x4C\x69\x6D\x69\x74\x65\x64\x20\x52\x61\x74\x65\x20\x2B\x20\x33\x32\x6D\x73\x20\x64\x65\x6C\x61\x79\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x36\x34\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x4C\x69\x6D\x69\x74\x65\x64\x20\x52\x61\x74\x65\x20\x2B\x20\x36\x34\x6D\x73\x20\x64\x65\x6C\x61\x79\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x74\x72\x75\x65\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x55\x6E\x6C\x69\x6D\x69\x74\x65\x64\x20\x52\x61\x74\x65\x20\x28\x6E\x6F\x74\x20\x73\x75\x67\x67\x65\x73\x74\x65\x64\x29\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x75\x6C\x74\x72\x61\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x55\x6C\x74\x72\x61\x20\x28\x6E\x6F\x74\x20\x73\x75\x67\x67\x65\x73\x74\x65\x64\x20\x2D\x20\x74\x65\x73\x74\x29\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x2F\x73\x65\x6C\x65\x63\x74\x3E\x3C\x2F\x6C\x61\x62\x65\x6C\x3E","\x23\x61\x6E\x69\x6D\x61\x74\x69\x6F\x6E\x2D\x76\x61\x6C\x75\x65","\x54\x79\x70\x65\x20\x6F\x6E\x20\x63\x68\x72\x6F\x6D\x65\x3A\x20\x63\x68\x72\x6F\x6D\x65\x3A\x2F\x2F\x73\x65\x74\x74\x69\x6E\x67\x73\x2F\x73\x79\x73\x74\x65\x6D\x20\x2C\x20\x65\x6E\x73\x75\x72\x65\x20\x55\x73\x65\x20\x68\x61\x72\x64\x77\x61\x72\x65\x20\x61\x63\x63\x65\x6C\x65\x72\x61\x74\x69\x6F\x6E\x20\x77\x68\x65\x6E\x20\x61\x76\x61\x69\x6C\x61\x62\x6C\x65\x20\x63\x68\x65\x63\x6B\x62\x6F\x78\x2C\x20\x69\x73\x20\x45\x4E\x41\x42\x4C\x45\x44","\x23\x46\x72\x61\x6D\x65\x57\x6F\x72\x6B\x4F\x70\x74\x69\x6F\x6E","\x46\x6F\x72\x20\x6D\x6F\x72\x65\x20\x69\x6E\x66\x6F\x20\x6F\x6E\x20\x68\x6F\x77\x20\x74\x6F\x20\x75\x73\x65\x20\x76\x69\x64\x65\x6F\x20\x73\x6B\x69\x6E\x73\x20\x76\x69\x73\x69\x74\x3A\x20\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x64\x65\x76\x65\x6C\x6F\x70\x65\x72\x73\x2F\x20\x76\x69\x64\x65\x6F\x73\x6B\x69\x6E\x73\x2E\x68\x74\x6D\x6C","\x74\x6F\x70","\x23\x76\x69\x64\x65\x6F\x53\x6B\x69\x6E\x73","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x6E\x6F\x74\x65\x73\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x6D\x61\x69\x6E\x2D\x63\x6F\x6C\x6F\x72\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x64\x69\x73\x70\x6C\x61\x79\x3A\x6E\x6F\x6E\x65\x3B\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x20\x31\x33\x70\x78\x3B\x66\x6C\x6F\x61\x74\x3A\x20\x6C\x65\x66\x74\x3B\x66\x6F\x6E\x74\x2D\x77\x65\x69\x67\x68\x74\x3A\x20\x37\x30\x30\x3B\x62\x6F\x72\x64\x65\x72\x2D\x72\x61\x64\x69\x75\x73\x3A\x20\x34\x70\x78\x3B\x77\x69\x64\x74\x68\x3A\x20\x36\x35\x25\x3B\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x34\x37\x70\x78\x3B\x7A\x2D\x69\x6E\x64\x65\x78\x3A\x20\x31\x35\x3B\x6D\x61\x72\x67\x69\x6E\x3A\x20\x61\x75\x74\x6F\x3B\x74\x6F\x70\x3A\x20\x30\x70\x78\x3B\x72\x69\x67\x68\x74\x3A\x20\x30\x70\x78\x3B\x6C\x65\x66\x74\x3A\x20\x30\x70\x78\x3B\x62\x6F\x74\x74\x6F\x6D\x3A\x20\x34\x30\x30\x70\x78\x3B\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x20\x66\x69\x78\x65\x64\x3B\x70\x6F\x69\x6E\x74\x65\x72\x2D\x65\x76\x65\x6E\x74\x73\x3A\x20\x61\x75\x74\x6F\x3B\x63\x6F\x6C\x6F\x72\x3A\x20\x72\x67\x62\x28\x32\x35\x35\x2C\x20\x32\x35\x35\x2C\x20\x32\x35\x35\x29\x3B\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x31\x30\x70\x78\x3B\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x72\x67\x62\x61\x28\x30\x2C\x20\x30\x2C\x20\x30\x2C\x20\x30\x2E\x32\x29\x3B\x22\x3E\x3C\x68\x35\x20\x69\x64\x3D\x22\x6E\x6F\x74\x65\x73\x61\x76\x65\x66\x6F\x72\x6C\x61\x74\x65\x72\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x6D\x61\x69\x6E\x2D\x63\x6F\x6C\x6F\x72\x20\x74\x65\x78\x74\x2D\x63\x65\x6E\x74\x65\x72\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x30\x70\x78\x3B\x22\x3E\x53\x61\x76\x65\x20\x66\x6F\x72\x20\x6C\x61\x74\x65\x72\x3C\x2F\x68\x35\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x6E\x6F\x74\x65\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x20\x6D\x61\x69\x6E\x2D\x63\x6F\x6C\x6F\x72\x20\x6E\x6F\x74\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x63\x6F\x6C\x6F\x72\x3A\x20\x6C\x69\x67\x68\x74\x67\x72\x65\x79\x3B\x20\x20\x77\x69\x64\x74\x68\x3A\x20\x32\x35\x25\x3B\x66\x6C\x6F\x61\x74\x3A\x6C\x65\x66\x74\x3B\x20\x62\x6F\x72\x64\x65\x72\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x62\x6F\x72\x64\x65\x72\x2D\x62\x6F\x74\x74\x6F\x6D\x3A\x20\x31\x70\x78\x20\x73\x6F\x6C\x69\x64\x3B\x20\x62\x6F\x72\x64\x65\x72\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x64\x61\x72\x6B\x67\x72\x65\x79\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x72\x69\x67\x68\x74\x3A\x20\x37\x70\x78\x3B\x20\x74\x65\x78\x74\x2D\x61\x6C\x69\x67\x6E\x3A\x20\x63\x65\x6E\x74\x65\x72\x3B\x22\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x6E\x6F\x74\x65\x32\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x20\x6D\x61\x69\x6E\x2D\x63\x6F\x6C\x6F\x72\x20\x6E\x6F\x74\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x6C\x69\x67\x68\x74\x67\x72\x65\x79\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x32\x34\x25\x3B\x20\x66\x6C\x6F\x61\x74\x3A\x20\x6C\x65\x66\x74\x3B\x20\x62\x6F\x72\x64\x65\x72\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x62\x6F\x72\x64\x65\x72\x2D\x62\x6F\x74\x74\x6F\x6D\x3A\x20\x31\x70\x78\x20\x73\x6F\x6C\x69\x64\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x6C\x65\x66\x74\x3A\x20\x30\x70\x78\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x72\x69\x67\x68\x74\x3A\x20\x37\x70\x78\x3B\x20\x74\x65\x78\x74\x2D\x61\x6C\x69\x67\x6E\x3A\x20\x63\x65\x6E\x74\x65\x72\x3B\x20\x62\x6F\x72\x64\x65\x72\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x64\x61\x72\x6B\x67\x72\x65\x79\x3B\x22\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x6E\x6F\x74\x65\x33\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x20\x6D\x61\x69\x6E\x2D\x63\x6F\x6C\x6F\x72\x20\x6E\x6F\x74\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x34\x39\x25\x3B\x20\x62\x6F\x72\x64\x65\x72\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x62\x6F\x72\x64\x65\x72\x2D\x62\x6F\x74\x74\x6F\x6D\x3A\x20\x31\x70\x78\x20\x73\x6F\x6C\x69\x64\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x6C\x65\x66\x74\x3A\x20\x31\x30\x70\x78\x3B\x20\x74\x65\x78\x74\x2D\x61\x6C\x69\x67\x6E\x3A\x20\x63\x65\x6E\x74\x65\x72\x3B\x20\x62\x6F\x72\x64\x65\x72\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x64\x61\x72\x6B\x67\x72\x65\x79\x3B\x22\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x6E\x6F\x74\x65\x34\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x20\x6D\x61\x69\x6E\x2D\x63\x6F\x6C\x6F\x72\x20\x6E\x6F\x74\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x6C\x69\x67\x68\x74\x67\x72\x65\x79\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x32\x35\x25\x3B\x20\x66\x6C\x6F\x61\x74\x3A\x20\x6C\x65\x66\x74\x3B\x20\x62\x6F\x72\x64\x65\x72\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x62\x6F\x72\x64\x65\x72\x2D\x62\x6F\x74\x74\x6F\x6D\x3A\x20\x31\x70\x78\x20\x73\x6F\x6C\x69\x64\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x72\x69\x67\x68\x74\x3A\x20\x37\x70\x78\x3B\x20\x74\x65\x78\x74\x2D\x61\x6C\x69\x67\x6E\x3A\x20\x63\x65\x6E\x74\x65\x72\x3B\x20\x62\x6F\x72\x64\x65\x72\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x64\x61\x72\x6B\x67\x72\x65\x79\x3B\x22\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x6E\x6F\x74\x65\x35\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x20\x6D\x61\x69\x6E\x2D\x63\x6F\x6C\x6F\x72\x20\x6E\x6F\x74\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x6C\x69\x67\x68\x74\x67\x72\x65\x79\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x32\x34\x25\x3B\x20\x66\x6C\x6F\x61\x74\x3A\x20\x6C\x65\x66\x74\x3B\x20\x62\x6F\x72\x64\x65\x72\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x62\x6F\x72\x64\x65\x72\x2D\x62\x6F\x74\x74\x6F\x6D\x3A\x20\x31\x70\x78\x20\x73\x6F\x6C\x69\x64\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x6C\x65\x66\x74\x3A\x20\x30\x70\x78\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x72\x69\x67\x68\x74\x3A\x20\x37\x70\x78\x3B\x20\x74\x65\x78\x74\x2D\x61\x6C\x69\x67\x6E\x3A\x20\x63\x65\x6E\x74\x65\x72\x3B\x20\x62\x6F\x72\x64\x65\x72\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x64\x61\x72\x6B\x67\x72\x65\x79\x3B\x22\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x6E\x6F\x74\x65\x36\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x20\x6D\x61\x69\x6E\x2D\x63\x6F\x6C\x6F\x72\x20\x6E\x6F\x74\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x6C\x69\x67\x68\x74\x67\x72\x65\x79\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x34\x39\x25\x3B\x20\x62\x6F\x72\x64\x65\x72\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x62\x6F\x72\x64\x65\x72\x2D\x62\x6F\x74\x74\x6F\x6D\x3A\x20\x31\x70\x78\x20\x73\x6F\x6C\x69\x64\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x6C\x65\x66\x74\x3A\x20\x31\x30\x70\x78\x3B\x20\x74\x65\x78\x74\x2D\x61\x6C\x69\x67\x6E\x3A\x20\x63\x65\x6E\x74\x65\x72\x3B\x20\x62\x6F\x72\x64\x65\x72\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x64\x61\x72\x6B\x67\x72\x65\x79\x3B\x22\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x6E\x6F\x74\x65\x37\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x20\x6D\x61\x69\x6E\x2D\x63\x6F\x6C\x6F\x72\x20\x6E\x6F\x74\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x6C\x69\x67\x68\x74\x67\x72\x65\x79\x3B\x20\x62\x6F\x72\x64\x65\x72\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x62\x6F\x72\x64\x65\x72\x2D\x62\x6F\x74\x74\x6F\x6D\x3A\x20\x31\x70\x78\x20\x73\x6F\x6C\x69\x64\x3B\x20\x74\x65\x78\x74\x2D\x61\x6C\x69\x67\x6E\x3A\x20\x63\x65\x6E\x74\x65\x72\x3B\x20\x62\x6F\x72\x64\x65\x72\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x64\x61\x72\x6B\x67\x72\x65\x79\x3B\x22\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x63\x6C\x6F\x73\x65\x42\x74\x6E\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x64\x61\x6E\x67\x65\x72\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x30\x70\x78\x3B\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x70\x61\x67\x65\x5F\x6C\x6F\x67\x69\x6E\x5F\x61\x6E\x64\x5F\x70\x6C\x61\x79\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x22\x20\x74\x69\x74\x6C\x65\x3D\x22\x22\x3E\x43\x6C\x6F\x73\x65\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x74\x69\x6D\x65\x72\x74\x6F\x6F\x6C\x73\x2D\x68\x75\x64\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x68\x75\x64\x22\x20\x61\x6C\x69\x67\x6E\x3D\x22\x63\x65\x6E\x74\x65\x72\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x77\x69\x64\x74\x68\x3A\x20\x35\x30\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x33\x30\x70\x78\x3B\x20\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x70\x6F\x69\x6E\x74\x65\x72\x2D\x65\x76\x65\x6E\x74\x73\x3A\x20\x61\x75\x74\x6F\x3B\x20\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x20\x61\x62\x73\x6F\x6C\x75\x74\x65\x3B\x20\x72\x69\x67\x68\x74\x3A\x20\x30\x70\x78\x3B\x20\x74\x6F\x70\x3A\x20\x2D\x39\x30\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x62\x6C\x6F\x63\x6B\x3B\x22\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x70\x6C\x61\x79\x74\x69\x6D\x65\x72\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x2D\x6C\x69\x6E\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x36\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x62\x6C\x6F\x63\x6B\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x73\x74\x61\x72\x74\x54\x69\x6D\x65\x72\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x53\x74\x61\x72\x74\x20\x54\x69\x6D\x65\x72\x22\x22\x20\x3E\x3C\x69\x20\x69\x64\x3D\x22\x70\x6C\x61\x79\x74\x69\x6D\x65\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x70\x6C\x61\x79\x2D\x63\x69\x72\x63\x6C\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x2D\x6C\x65\x66\x74\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x73\x74\x6F\x70\x74\x69\x6D\x65\x72\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x2D\x6C\x69\x6E\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x36\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x73\x74\x6F\x70\x54\x69\x6D\x65\x72\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x50\x61\x75\x73\x65\x20\x54\x69\x6D\x65\x72\x22\x22\x3E\x3C\x69\x20\x69\x64\x3D\x22\x70\x61\x75\x73\x65\x74\x69\x6D\x65\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x70\x61\x75\x73\x65\x2D\x63\x69\x72\x63\x6C\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x2D\x6C\x65\x66\x74\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x63\x6C\x65\x61\x72\x74\x69\x6D\x65\x72\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x2D\x6C\x69\x6E\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x36\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x63\x6C\x65\x61\x72\x54\x69\x6D\x65\x72\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x53\x74\x6F\x70\x20\x54\x69\x6D\x65\x72\x22\x3E\x3C\x69\x20\x69\x64\x3D\x22\x63\x6C\x65\x61\x72\x74\x69\x6D\x65\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x73\x74\x6F\x70\x2D\x63\x69\x72\x63\x6C\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x2D\x6C\x65\x66\x74\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x61\x20\x69\x64\x3D\x22\x74\x69\x6D\x65\x72\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x32\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x20\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x20\x61\x62\x73\x6F\x6C\x75\x74\x65\x3B\x20\x72\x69\x67\x68\x74\x3A\x20\x30\x70\x78\x3B\x22\x3E\x30\x30\x3A\x30\x30\x3C\x2F\x61\x3E","\x3C\x6C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x6C\x65\x67\x65\x6E\x64\x2D\x74\x61\x62\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x77\x69\x64\x74\x68\x3A\x20\x31\x36\x2E\x36\x36\x25\x3B\x20\x70\x61\x64\x64\x69\x6E\x67\x3A\x31\x32\x70\x78\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x41\x50\x49\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x74\x6F\x70\x22\x3E\x3C\x61\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x20\x70\x61\x64\x64\x69\x6E\x67\x3A\x31\x32\x70\x78\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x24\x28\x27\x23\x6D\x61\x69\x6E\x2D\x6D\x65\x6E\x75\x27\x29\x2E\x63\x68\x69\x6C\x64\x72\x65\x6E\x28\x27\x64\x69\x76\x27\x29\x2E\x68\x69\x64\x65\x28\x29\x3B\x20\x24\x28\x27\x2E\x6D\x65\x6E\x75\x2D\x74\x61\x62\x73\x27\x29\x2E\x63\x68\x69\x6C\x64\x72\x65\x6E\x28\x27\x6C\x69\x27\x29\x2E\x72\x65\x6D\x6F\x76\x65\x43\x6C\x61\x73\x73\x28\x27\x61\x63\x74\x69\x76\x65\x27\x29\x3B\x20\x24\x28\x27\x2E\x6D\x65\x6E\x75\x2D\x74\x61\x62\x73\x27\x29\x2E\x63\x68\x69\x6C\x64\x72\x65\x6E\x28\x27\x6C\x69\x27\x29\x2E\x63\x68\x69\x6C\x64\x72\x65\x6E\x28\x27\x61\x27\x29\x2E\x72\x65\x6D\x6F\x76\x65\x43\x6C\x61\x73\x73\x28\x27\x61\x63\x74\x69\x76\x65\x27\x29\x3B\x20\x24\x28\x27\x23\x6C\x65\x67\x65\x6E\x64\x27\x29\x2E\x66\x61\x64\x65\x49\x6E\x28\x29\x3B\x20\x24\x28\x74\x68\x69\x73\x29\x2E\x61\x64\x64\x43\x6C\x61\x73\x73\x28\x27\x61\x63\x74\x69\x76\x65\x27\x29\x3B\x20\x24\x28\x74\x68\x69\x73\x29\x2E\x70\x61\x72\x65\x6E\x74\x28\x29\x2E\x61\x64\x64\x43\x6C\x61\x73\x73\x28\x27\x61\x63\x74\x69\x76\x65\x27\x29\x3B\x20\x22\x20\x68\x72\x65\x66\x3D\x22\x6A\x61\x76\x61\x73\x63\x72\x69\x70\x74\x3A\x76\x6F\x69\x64\x28\x30\x29\x3B\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x70\x75\x7A\x7A\x6C\x65\x2D\x70\x69\x65\x63\x65\x20\x66\x61\x2D\x6C\x67\x22\x3E\x3C\x2F\x61\x3E\x3C\x2F\x6C\x69\x3E","\x2E\x6D\x65\x6E\x75\x2D\x74\x61\x62\x73\x3E\x3A\x6E\x74\x68\x2D\x63\x68\x69\x6C\x64\x28\x32\x29","\x77\x69\x64\x74\x68\x3A\x20\x31\x34\x2E\x32\x38\x25","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x6C\x65\x67\x65\x6E\x64\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x6D\x65\x6E\x75\x2D\x70\x61\x6E\x65\x6C\x22\x3E\x3C\x64\x69\x76\x20\x63\x6C\x61\x73\x73\x3D\x22\x61\x67\x61\x72\x69\x6F\x2D\x70\x61\x6E\x65\x6C\x20\x6C\x65\x67\x65\x6E\x64\x2D\x70\x61\x6E\x65\x6C\x22\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x53\x48\x4F\x53\x48\x4F\x42\x74\x6E\x22\x20\x74\x79\x70\x65\x3D\x22\x62\x75\x74\x74\x6F\x6E\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x73\x6D\x20\x62\x74\x6E\x2D\x77\x61\x72\x6E\x69\x6E\x67\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x62\x75\x74\x74\x6F\x6E\x22\x20\x61\x72\x69\x61\x2D\x70\x72\x65\x73\x73\x65\x64\x3D\x22\x66\x61\x6C\x73\x65\x22\x20\x61\x75\x74\x6F\x63\x6F\x6D\x70\x6C\x65\x74\x65\x3D\x22\x6F\x66\x66\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x34\x39\x2E\x35\x25\x3B\x20\x62\x6F\x72\x64\x65\x72\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x64\x61\x72\x6B\x73\x6C\x61\x74\x65\x67\x72\x65\x79\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x72\x69\x67\x68\x74\x3A\x20\x30\x2E\x35\x25\x3B\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x70\x75\x7A\x7A\x6C\x65\x2D\x70\x69\x65\x63\x65\x22\x3E\x3C\x2F\x69\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x58\x50\x42\x74\x6E\x22\x20\x74\x79\x70\x65\x3D\x22\x62\x75\x74\x74\x6F\x6E\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x73\x6D\x20\x62\x74\x6E\x2D\x77\x61\x72\x6E\x69\x6E\x67\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x62\x75\x74\x74\x6F\x6E\x22\x20\x61\x72\x69\x61\x2D\x70\x72\x65\x73\x73\x65\x64\x3D\x22\x66\x61\x6C\x73\x65\x22\x20\x61\x75\x74\x6F\x63\x6F\x6D\x70\x6C\x65\x74\x65\x3D\x22\x6F\x66\x66\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x34\x39\x2E\x35\x25\x3B\x20\x62\x6F\x72\x64\x65\x72\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x64\x61\x72\x6B\x73\x6C\x61\x74\x65\x67\x72\x65\x79\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x6C\x65\x66\x74\x3A\x20\x30\x2E\x35\x25\x3B\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x67\x61\x6D\x65\x70\x61\x64\x22\x3E\x3C\x2F\x69\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x4D\x41\x49\x4E\x42\x54\x42\x74\x6E\x22\x20\x74\x79\x70\x65\x3D\x22\x62\x75\x74\x74\x6F\x6E\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x73\x6D\x20\x62\x74\x6E\x2D\x77\x61\x72\x6E\x69\x6E\x67\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x62\x75\x74\x74\x6F\x6E\x22\x20\x61\x72\x69\x61\x2D\x70\x72\x65\x73\x73\x65\x64\x3D\x22\x66\x61\x6C\x73\x65\x22\x20\x61\x75\x74\x6F\x63\x6F\x6D\x70\x6C\x65\x74\x65\x3D\x22\x6F\x66\x66\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x34\x39\x2E\x35\x25\x3B\x20\x62\x6F\x72\x64\x65\x72\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x64\x61\x72\x6B\x73\x6C\x61\x74\x65\x67\x72\x65\x79\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x72\x69\x67\x68\x74\x3A\x20\x30\x2E\x35\x25\x3B\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x6D\x69\x6E\x75\x73\x22\x3E\x3C\x2F\x69\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x41\x6E\x69\x6D\x61\x74\x65\x64\x53\x6B\x69\x6E\x42\x74\x6E\x22\x20\x74\x79\x70\x65\x3D\x22\x62\x75\x74\x74\x6F\x6E\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x73\x6D\x20\x62\x74\x6E\x2D\x77\x61\x72\x6E\x69\x6E\x67\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x62\x75\x74\x74\x6F\x6E\x22\x20\x61\x72\x69\x61\x2D\x70\x72\x65\x73\x73\x65\x64\x3D\x22\x66\x61\x6C\x73\x65\x22\x20\x61\x75\x74\x6F\x63\x6F\x6D\x70\x6C\x65\x74\x65\x3D\x22\x6F\x66\x66\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x34\x39\x2E\x35\x25\x3B\x20\x62\x6F\x72\x64\x65\x72\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x64\x61\x72\x6B\x73\x6C\x61\x74\x65\x67\x72\x65\x79\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x6C\x65\x66\x74\x3A\x20\x30\x2E\x35\x25\x3B\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x67\x72\x61\x76\x22\x3E\x3C\x2F\x69\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x48\x69\x64\x65\x41\x6C\x6C\x42\x74\x68\x6E\x22\x20\x74\x79\x70\x65\x3D\x22\x62\x75\x74\x74\x6F\x6E\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x73\x6D\x20\x62\x74\x6E\x2D\x64\x61\x6E\x67\x65\x72\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x62\x75\x74\x74\x6F\x6E\x22\x20\x61\x72\x69\x61\x2D\x70\x72\x65\x73\x73\x65\x64\x3D\x22\x66\x61\x6C\x73\x65\x22\x20\x61\x75\x74\x6F\x63\x6F\x6D\x70\x6C\x65\x74\x65\x3D\x22\x6F\x66\x66\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x72\x69\x67\x68\x74\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x54\x65\x6D\x70\x6F\x72\x61\x72\x69\x6C\x79\x20\x48\x69\x64\x65\x2F\x53\x68\x6F\x77\x20\x45\x76\x65\x72\x79\x74\x68\x69\x6E\x67\x2E\x20\x46\x75\x6E\x63\x74\x69\x6F\x6E\x20\x66\x6F\x72\x20\x59\x6F\x75\x74\x75\x62\x65\x72\x73\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x34\x39\x2E\x35\x25\x3B\x20\x62\x6F\x72\x64\x65\x72\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x64\x61\x72\x6B\x73\x6C\x61\x74\x65\x67\x72\x65\x79\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x72\x69\x67\x68\x74\x3A\x20\x30\x2E\x35\x25\x3B\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x65\x78\x63\x6C\x61\x6D\x61\x74\x69\x6F\x6E\x2D\x74\x72\x69\x61\x6E\x67\x6C\x65\x22\x3E\x3C\x2F\x69\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x54\x49\x4D\x45\x63\x61\x6C\x42\x74\x6E\x22\x20\x74\x79\x70\x65\x3D\x22\x62\x75\x74\x74\x6F\x6E\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x73\x6D\x20\x62\x74\x6E\x2D\x77\x61\x72\x6E\x69\x6E\x67\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x62\x75\x74\x74\x6F\x6E\x22\x20\x61\x72\x69\x61\x2D\x70\x72\x65\x73\x73\x65\x64\x3D\x22\x66\x61\x6C\x73\x65\x22\x20\x61\x75\x74\x6F\x63\x6F\x6D\x70\x6C\x65\x74\x65\x3D\x22\x6F\x66\x66\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x34\x39\x2E\x35\x25\x3B\x20\x62\x6F\x72\x64\x65\x72\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x64\x61\x72\x6B\x73\x6C\x61\x74\x65\x67\x72\x65\x79\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x6C\x65\x66\x74\x3A\x20\x30\x2E\x35\x25\x3B\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x63\x61\x6C\x63\x75\x6C\x61\x74\x6F\x72\x22\x3E\x3C\x2F\x69\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x4F\x70\x65\x6E\x75\x73\x65\x72\x53\x63\x72\x69\x70\x74\x73\x22\x20\x74\x79\x70\x65\x3D\x22\x73\x75\x62\x6D\x69\x74\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x70\x72\x69\x6D\x61\x72\x79\x20\x62\x74\x6E\x20\x32\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x62\x6C\x6F\x63\x6B\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x30\x30\x25\x3B\x20\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x34\x70\x78\x20\x30\x20\x36\x70\x78\x20\x30\x3B\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x63\x6F\x64\x65\x22\x3E\x3C\x2F\x69\x3E\x55\x73\x65\x72\x20\x53\x63\x72\x69\x70\x74\x73\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x53\x70\x65\x63\x69\x61\x6C\x44\x65\x61\x6C\x73\x42\x74\x6E\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x70\x72\x69\x6D\x61\x72\x79\x20\x62\x74\x6E\x22\x20\x74\x79\x70\x65\x3D\x22\x73\x75\x62\x6D\x69\x74\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x42\x65\x66\x6F\x72\x65\x53\x70\x65\x63\x69\x61\x6C\x44\x65\x61\x6C\x73\x28\x29\x3B\x20\x72\x65\x74\x75\x72\x6E\x20\x66\x61\x6C\x73\x65\x3B\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x70\x72\x69\x6D\x61\x72\x79\x20\x62\x74\x6E\x2D\x73\x68\x6F\x70\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x30\x30\x25\x3B\x20\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x34\x70\x78\x20\x30\x70\x78\x20\x36\x70\x78\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x70\x61\x67\x65\x5F\x73\x68\x6F\x70\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x62\x72\x69\x65\x66\x63\x61\x73\x65\x22\x3E\x3C\x2F\x69\x3E\x53\x70\x65\x63\x69\x61\x6C\x20\x44\x65\x61\x6C\x73\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x4C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x53\x68\x6F\x70\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x70\x72\x69\x6D\x61\x72\x79\x20\x62\x74\x6E\x22\x20\x74\x79\x70\x65\x3D\x22\x73\x75\x62\x6D\x69\x74\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x42\x65\x66\x6F\x72\x65\x4C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x53\x68\x6F\x70\x28\x29\x3B\x20\x72\x65\x74\x75\x72\x6E\x20\x66\x61\x6C\x73\x65\x3B\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x70\x72\x69\x6D\x61\x72\x79\x20\x62\x74\x6E\x2D\x73\x68\x6F\x70\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x30\x30\x25\x3B\x20\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x34\x70\x78\x20\x30\x70\x78\x20\x36\x70\x78\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x70\x61\x67\x65\x5F\x73\x68\x6F\x70\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x62\x72\x69\x65\x66\x63\x61\x73\x65\x22\x3E\x3C\x2F\x69\x3E\x53\x68\x6F\x70\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x64\x69\x76\x20\x63\x6C\x61\x73\x73\x3D\x22\x69\x6E\x70\x75\x74\x2D\x62\x6F\x78\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x74\x65\x78\x74\x2D\x61\x6C\x69\x67\x6E\x3A\x20\x63\x65\x6E\x74\x65\x72\x3B\x20\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x20\x31\x32\x70\x78\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x34\x70\x78\x20\x30\x20\x30\x70\x78\x20\x30\x3B\x22\x3E\x3C\x73\x70\x61\x6E\x20\x69\x64\x3D\x22\x6C\x65\x67\x65\x6E\x64\x6D\x61\x6E\x75\x61\x6C\x62\x61\x63\x6B\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x74\x69\x74\x6C\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x22\x3E\x4D\x61\x6E\x75\x61\x6C\x20\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x3A\x20\x20\x3C\x2F\x73\x70\x61\x6E\x3E","\x3C\x73\x65\x6C\x65\x63\x74\x20\x69\x64\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x50\x69\x63\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x6F\x6E\x63\x68\x61\x6E\x67\x65\x3D\x22\x63\x68\x61\x6E\x67\x65\x50\x69\x63\x46\x75\x6E\x28\x29\x3B\x22\x20\x72\x65\x71\x75\x69\x72\x65\x64\x3D\x22\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x22\x20\x74\x69\x74\x6C\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x64\x69\x73\x70\x6C\x61\x79\x3A\x69\x6E\x6C\x69\x6E\x65\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x34\x30\x25\x22\x20\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x31\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x4D\x69\x6E\x69\x6D\x61\x70\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x32\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x33\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x54\x65\x61\x6D\x62\x6F\x61\x72\x64\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x34\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x4D\x61\x69\x6E\x20\x43\x61\x6E\x76\x61\x73\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x35\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x4D\x61\x69\x6E\x20\x42\x61\x6E\x6E\x65\x72\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x2F\x73\x65\x6C\x65\x63\x74\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x6D\x69\x6E\x69\x6D\x61\x70\x50\x69\x63\x74\x75\x72\x65\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x4D\x69\x6E\x69\x6D\x61\x70\x20\x49\x6D\x61\x67\x65\x20\x55\x52\x4C\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x62\x6C\x6F\x63\x6B\x3B\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x6D\x69\x6E\x62\x67\x6E\x61\x6D\x65\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x72\x69\x67\x68\x74\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x55\x72\x6C\x20\x6F\x66\x20\x69\x6D\x61\x67\x65\x20\x73\x74\x61\x72\x74\x69\x6E\x67\x20\x77\x69\x74\x68\x20\x68\x74\x74\x70\x73\x3A\x2F\x2F\x2E\x2E\x2E\x20\x6F\x72\x20\x68\x74\x74\x70\x73\x3A\x2F\x2F\x2E\x2E\x2E\x22\x20\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x6D\x69\x6E\x62\x74\x65\x78\x74\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x4D\x69\x6E\x69\x6D\x61\x70\x20\x54\x65\x78\x74\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x62\x6C\x6F\x63\x6B\x3B\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x6D\x69\x6E\x62\x74\x65\x78\x74\x28\x29\x3B\x22\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x6C\x65\x61\x64\x62\x50\x69\x63\x74\x75\x72\x65\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x20\x49\x6D\x61\x67\x65\x20\x55\x52\x4C\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x6C\x65\x61\x64\x62\x67\x6E\x61\x6D\x65\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x72\x69\x67\x68\x74\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x55\x72\x6C\x20\x6F\x66\x20\x69\x6D\x61\x67\x65\x20\x73\x74\x61\x72\x74\x69\x6E\x67\x20\x77\x69\x74\x68\x20\x68\x74\x74\x70\x73\x3A\x2F\x2F\x2E\x2E\x2E\x20\x6F\x72\x20\x68\x74\x74\x70\x73\x3A\x2F\x2F\x2E\x2E\x2E\x22\x20\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x6C\x65\x61\x64\x62\x74\x65\x78\x74\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x20\x4C\x6F\x67\x6F\x20\x54\x65\x78\x74\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x6C\x65\x61\x64\x62\x74\x65\x78\x74\x28\x29\x3B\x22\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x74\x65\x61\x6D\x62\x50\x69\x63\x74\x75\x72\x65\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x54\x65\x61\x6D\x62\x6F\x61\x72\x64\x20\x49\x6D\x61\x67\x65\x20\x55\x52\x4C\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x74\x65\x61\x6D\x62\x67\x6E\x61\x6D\x65\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x72\x69\x67\x68\x74\x22\x20\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x55\x72\x6C\x20\x6F\x66\x20\x69\x6D\x61\x67\x65\x20\x73\x74\x61\x72\x74\x69\x6E\x67\x20\x77\x69\x74\x68\x20\x68\x74\x74\x70\x73\x3A\x2F\x2F\x2E\x2E\x2E\x20\x6F\x72\x20\x68\x74\x74\x70\x73\x3A\x2F\x2F\x2E\x2E\x2E\x22\x20\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x74\x65\x61\x6D\x62\x74\x65\x78\x74\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x54\x65\x61\x6D\x62\x6F\x61\x72\x64\x20\x4C\x6F\x67\x6F\x20\x54\x65\x78\x74\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x74\x65\x61\x6D\x62\x74\x65\x78\x74\x28\x29\x3B\x22\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x63\x61\x6E\x76\x61\x73\x50\x69\x63\x74\x75\x72\x65\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x4D\x61\x69\x6E\x20\x43\x61\x6E\x76\x61\x73\x20\x49\x6D\x61\x67\x65\x20\x55\x52\x4C\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x63\x61\x6E\x76\x61\x73\x62\x67\x6E\x61\x6D\x65\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x72\x69\x67\x68\x74\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x55\x72\x6C\x20\x6F\x66\x20\x69\x6D\x61\x67\x65\x20\x73\x74\x61\x72\x74\x69\x6E\x67\x20\x77\x69\x74\x68\x20\x68\x74\x74\x70\x73\x3A\x2F\x2F\x2E\x2E\x2E\x20\x6F\x72\x20\x68\x74\x74\x70\x73\x3A\x2F\x2F\x2E\x2E\x2E\x22\x20\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x69\x6D\x67\x55\x72\x6C\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x4D\x61\x69\x6E\x20\x42\x61\x6E\x6E\x65\x72\x20\x49\x63\x6F\x6E\x20\x55\x52\x4C\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x69\x6D\x67\x55\x72\x6C\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x72\x69\x67\x68\x74\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x55\x72\x6C\x20\x6F\x66\x20\x69\x6D\x61\x67\x65\x20\x73\x74\x61\x72\x74\x69\x6E\x67\x20\x77\x69\x74\x68\x20\x68\x74\x74\x70\x3A\x2F\x2F\x2E\x2E\x2E\x20\x6F\x72\x20\x68\x74\x74\x70\x73\x3A\x2F\x2F\x2E\x2E\x2E\x22\x20\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x69\x6D\x67\x48\x72\x65\x66\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x4D\x61\x69\x6E\x20\x42\x61\x6E\x6E\x65\x72\x20\x4C\x69\x6E\x6B\x20\x55\x52\x4C\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x69\x6D\x67\x48\x72\x65\x66\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x72\x69\x67\x68\x74\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x55\x72\x6C\x20\x6F\x66\x20\x6C\x69\x6E\x6B\x20\x74\x6F\x20\x72\x65\x64\x69\x72\x65\x63\x74\x22\x20\x3E","\x3C\x64\x69\x76\x20\x63\x6C\x61\x73\x73\x3D\x22\x69\x6E\x70\x75\x74\x2D\x62\x6F\x78\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x74\x65\x78\x74\x2D\x61\x6C\x69\x67\x6E\x3A\x20\x63\x65\x6E\x74\x65\x72\x3B\x20\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x20\x31\x32\x70\x78\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x30\x70\x78\x3B\x20\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x34\x70\x78\x20\x30\x20\x30\x70\x78\x20\x30\x3B\x22\x3E\x3C\x73\x70\x61\x6E\x20\x69\x64\x3D\x22\x6C\x65\x67\x65\x6E\x64\x6D\x61\x6E\x75\x61\x6C\x6D\x65\x73\x73\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x74\x69\x74\x6C\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x22\x3E\x4D\x61\x6E\x75\x61\x6C\x20\x4D\x65\x73\x73\x61\x67\x65\x20\x49\x63\x6F\x6E\x73\x26\x59\x6F\x75\x74\x75\x62\x65\x3A\x20\x20\x3C\x2F\x73\x70\x61\x6E\x3E","\x3C\x73\x65\x6C\x65\x63\x74\x20\x69\x64\x3D\x22\x63\x68\x61\x6E\x67\x65\x70\x68\x6F\x74\x6F\x73\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x6F\x6E\x63\x68\x61\x6E\x67\x65\x3D\x22\x63\x68\x61\x6E\x67\x65\x50\x68\x6F\x74\x6F\x46\x75\x6E\x28\x29\x3B\x22\x20\x72\x65\x71\x75\x69\x72\x65\x64\x3D\x22\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x22\x20\x74\x69\x74\x6C\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x64\x69\x73\x70\x6C\x61\x79\x3A\x69\x6E\x6C\x69\x6E\x65\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x33\x35\x25\x22\x20\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x31\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x49\x63\x6F\x6E\x20\x31\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x32\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x49\x63\x6F\x6E\x20\x32\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x33\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x49\x63\x6F\x6E\x20\x33\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x34\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x49\x63\x6F\x6E\x20\x34\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x35\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x49\x63\x6F\x6E\x20\x35\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x36\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x49\x63\x6F\x6E\x20\x36\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x37\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x59\x6F\x75\x74\x75\x62\x65\x20\x31\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x38\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x59\x6F\x75\x74\x75\x62\x65\x20\x32\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x39\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x59\x6F\x75\x74\x75\x62\x65\x20\x33\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x31\x30\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x59\x6F\x75\x74\x75\x62\x65\x20\x34\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x31\x31\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x59\x6F\x75\x74\x75\x62\x65\x20\x35\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x31\x32\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x59\x6F\x75\x74\x75\x62\x65\x20\x36\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x70\x69\x63\x31\x64\x61\x74\x61\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x4D\x65\x73\x73\x61\x67\x65\x20\x49\x63\x6F\x6E\x20\x54\x65\x78\x74\x20\x31\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x62\x6C\x6F\x63\x6B\x3B\x20\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x70\x69\x63\x31\x64\x61\x74\x61\x28\x29\x3B\x22\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x70\x69\x63\x32\x64\x61\x74\x61\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x4D\x65\x73\x73\x61\x67\x65\x20\x49\x63\x6F\x6E\x20\x54\x65\x78\x74\x20\x32\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x70\x69\x63\x32\x64\x61\x74\x61\x28\x29\x3B\x22\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x70\x69\x63\x33\x64\x61\x74\x61\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x4D\x65\x73\x73\x61\x67\x65\x20\x49\x63\x6F\x6E\x20\x54\x65\x78\x74\x20\x33\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x70\x69\x63\x33\x64\x61\x74\x61\x28\x29\x3B\x22\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x70\x69\x63\x34\x64\x61\x74\x61\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x4D\x65\x73\x73\x61\x67\x65\x20\x49\x63\x6F\x6E\x20\x54\x65\x78\x74\x20\x34\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x70\x69\x63\x34\x64\x61\x74\x61\x28\x29\x3B\x22\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x70\x69\x63\x35\x64\x61\x74\x61\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x4D\x65\x73\x73\x61\x67\x65\x20\x49\x63\x6F\x6E\x20\x54\x65\x78\x74\x20\x35\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x70\x69\x63\x35\x64\x61\x74\x61\x28\x29\x3B\x22\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x70\x69\x63\x36\x64\x61\x74\x61\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x4D\x65\x73\x73\x61\x67\x65\x20\x49\x63\x6F\x6E\x20\x54\x65\x78\x74\x20\x36\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x70\x69\x63\x36\x64\x61\x74\x61\x28\x29\x3B\x22\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x79\x74\x31\x64\x61\x74\x61\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x59\x6F\x75\x74\x75\x62\x65\x20\x4D\x65\x73\x73\x61\x67\x65\x20\x54\x65\x78\x74\x20\x31\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x79\x74\x31\x64\x61\x74\x61\x28\x29\x3B\x22\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x79\x74\x32\x64\x61\x74\x61\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x59\x6F\x75\x74\x75\x62\x65\x20\x4D\x65\x73\x73\x61\x67\x65\x20\x54\x65\x78\x74\x20\x32\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x79\x74\x32\x64\x61\x74\x61\x28\x29\x3B\x22\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x79\x74\x33\x64\x61\x74\x61\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x59\x6F\x75\x74\x75\x62\x65\x20\x4D\x65\x73\x73\x61\x67\x65\x20\x54\x65\x78\x74\x20\x33\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x79\x74\x33\x64\x61\x74\x61\x28\x29\x3B\x22\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x79\x74\x34\x64\x61\x74\x61\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x59\x6F\x75\x74\x75\x62\x65\x20\x4D\x65\x73\x73\x61\x67\x65\x20\x54\x65\x78\x74\x20\x34\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x79\x74\x34\x64\x61\x74\x61\x28\x29\x3B\x22\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x79\x74\x35\x64\x61\x74\x61\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x59\x6F\x75\x74\x75\x62\x65\x20\x4D\x65\x73\x73\x61\x67\x65\x20\x54\x65\x78\x74\x20\x35\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x79\x74\x35\x64\x61\x74\x61\x28\x29\x3B\x22\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x79\x74\x36\x64\x61\x74\x61\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x59\x6F\x75\x74\x75\x62\x65\x20\x4D\x65\x73\x73\x61\x67\x65\x20\x54\x65\x78\x74\x20\x36\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x79\x74\x36\x64\x61\x74\x61\x28\x29\x3B\x22\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x70\x69\x63\x31\x75\x72\x6C\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x4D\x65\x73\x73\x61\x67\x65\x20\x49\x63\x6F\x6E\x20\x49\x6D\x67\x75\x72\x20\x55\x72\x6C\x20\x31\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x62\x6C\x6F\x63\x6B\x3B\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x70\x69\x63\x31\x75\x72\x6C\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x72\x69\x67\x68\x74\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x65\x2E\x67\x2E\x20\x68\x74\x74\x70\x73\x3A\x2F\x2F\x69\x2E\x69\x6D\x67\x75\x72\x2E\x63\x6F\x6D\x2F\x52\x56\x42\x69\x33\x54\x31\x2E\x67\x69\x66\x22\x20\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x70\x69\x63\x32\x75\x72\x6C\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x4D\x65\x73\x73\x61\x67\x65\x20\x49\x63\x6F\x6E\x20\x49\x6D\x67\x75\x72\x20\x55\x72\x6C\x20\x32\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x70\x69\x63\x32\x75\x72\x6C\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x72\x69\x67\x68\x74\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x65\x2E\x67\x2E\x20\x68\x74\x74\x70\x73\x3A\x2F\x2F\x69\x2E\x69\x6D\x67\x75\x72\x2E\x63\x6F\x6D\x2F\x52\x56\x42\x69\x33\x54\x31\x2E\x67\x69\x66\x22\x20\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x70\x69\x63\x33\x75\x72\x6C\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x4D\x65\x73\x73\x61\x67\x65\x20\x49\x63\x6F\x6E\x20\x49\x6D\x67\x75\x72\x20\x55\x72\x6C\x20\x33\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x70\x69\x63\x33\x75\x72\x6C\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x72\x69\x67\x68\x74\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x65\x2E\x67\x2E\x20\x68\x74\x74\x70\x73\x3A\x2F\x2F\x69\x2E\x69\x6D\x67\x75\x72\x2E\x63\x6F\x6D\x2F\x52\x56\x42\x69\x33\x54\x31\x2E\x67\x69\x66\x22\x20\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x70\x69\x63\x34\x75\x72\x6C\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x4D\x65\x73\x73\x61\x67\x65\x20\x49\x63\x6F\x6E\x20\x49\x6D\x67\x75\x72\x20\x55\x72\x6C\x20\x34\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x70\x69\x63\x34\x75\x72\x6C\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x72\x69\x67\x68\x74\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x65\x2E\x67\x2E\x20\x68\x74\x74\x70\x73\x3A\x2F\x2F\x69\x2E\x69\x6D\x67\x75\x72\x2E\x63\x6F\x6D\x2F\x52\x56\x42\x69\x33\x54\x31\x2E\x67\x69\x66\x22\x20\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x70\x69\x63\x35\x75\x72\x6C\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x4D\x65\x73\x73\x61\x67\x65\x20\x49\x63\x6F\x6E\x20\x49\x6D\x67\x75\x72\x20\x55\x72\x6C\x20\x35\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x70\x69\x63\x35\x75\x72\x6C\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x72\x69\x67\x68\x74\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x65\x2E\x67\x2E\x20\x68\x74\x74\x70\x73\x3A\x2F\x2F\x69\x2E\x69\x6D\x67\x75\x72\x2E\x63\x6F\x6D\x2F\x52\x56\x42\x69\x33\x54\x31\x2E\x67\x69\x66\x22\x20\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x70\x69\x63\x36\x75\x72\x6C\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x4D\x65\x73\x73\x61\x67\x65\x20\x49\x63\x6F\x6E\x20\x49\x6D\x67\x75\x72\x20\x55\x72\x6C\x20\x36\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x70\x69\x63\x36\x75\x72\x6C\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x72\x69\x67\x68\x74\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x65\x2E\x67\x2E\x20\x68\x74\x74\x70\x73\x3A\x2F\x2F\x69\x2E\x69\x6D\x67\x75\x72\x2E\x63\x6F\x6D\x2F\x52\x56\x42\x69\x33\x54\x31\x2E\x67\x69\x66\x22\x20\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x79\x74\x31\x75\x72\x6C\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x59\x6F\x75\x74\x75\x62\x65\x20\x4D\x65\x73\x73\x61\x67\x65\x20\x55\x72\x6C\x20\x31\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x79\x74\x31\x75\x72\x6C\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x72\x69\x67\x68\x74\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x55\x72\x6C\x20\x6F\x66\x20\x79\x6F\x75\x74\x75\x62\x65\x20\x74\x6F\x20\x62\x65\x20\x73\x68\x6F\x77\x6E\x22\x20\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x79\x74\x32\x75\x72\x6C\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x59\x6F\x75\x74\x75\x62\x65\x20\x4D\x65\x73\x73\x61\x67\x65\x20\x55\x72\x6C\x20\x32\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x79\x74\x32\x75\x72\x6C\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x72\x69\x67\x68\x74\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x55\x72\x6C\x20\x6F\x66\x20\x79\x6F\x75\x74\x75\x62\x65\x20\x74\x6F\x20\x62\x65\x20\x73\x68\x6F\x77\x6E\x22\x20\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x79\x74\x33\x75\x72\x6C\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x59\x6F\x75\x74\x75\x62\x65\x20\x4D\x65\x73\x73\x61\x67\x65\x20\x55\x72\x6C\x20\x33\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x79\x74\x33\x75\x72\x6C\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x72\x69\x67\x68\x74\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x55\x72\x6C\x20\x6F\x66\x20\x79\x6F\x75\x74\x75\x62\x65\x20\x74\x6F\x20\x62\x65\x20\x73\x68\x6F\x77\x6E\x22\x20\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x79\x74\x34\x75\x72\x6C\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x59\x6F\x75\x74\x75\x62\x65\x20\x4D\x65\x73\x73\x61\x67\x65\x20\x55\x72\x6C\x20\x34\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x79\x74\x34\x75\x72\x6C\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x72\x69\x67\x68\x74\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x55\x72\x6C\x20\x6F\x66\x20\x79\x6F\x75\x74\x75\x62\x65\x20\x74\x6F\x20\x62\x65\x20\x73\x68\x6F\x77\x6E\x22\x20\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x79\x74\x35\x75\x72\x6C\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x59\x6F\x75\x74\x75\x62\x65\x20\x4D\x65\x73\x73\x61\x67\x65\x20\x55\x72\x6C\x20\x35\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x79\x74\x35\x75\x72\x6C\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x72\x69\x67\x68\x74\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x55\x72\x6C\x20\x6F\x66\x20\x79\x6F\x75\x74\x75\x62\x65\x20\x74\x6F\x20\x62\x65\x20\x73\x68\x6F\x77\x6E\x22\x20\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x79\x74\x36\x75\x72\x6C\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x59\x6F\x75\x74\x75\x62\x65\x20\x4D\x65\x73\x73\x61\x67\x65\x20\x55\x72\x6C\x20\x36\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x79\x74\x36\x75\x72\x6C\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x72\x69\x67\x68\x74\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x55\x72\x6C\x20\x6F\x66\x20\x79\x6F\x75\x74\x75\x62\x65\x20\x74\x6F\x20\x62\x65\x20\x73\x68\x6F\x77\x6E\x22\x20\x3E","\x3C\x64\x69\x76\x20\x63\x6C\x61\x73\x73\x3D\x22\x69\x6E\x70\x75\x74\x2D\x62\x6F\x78\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x74\x65\x78\x74\x2D\x61\x6C\x69\x67\x6E\x3A\x20\x63\x65\x6E\x74\x65\x72\x3B\x20\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x20\x31\x32\x70\x78\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x30\x70\x78\x3B\x20\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x20\x30\x20\x30\x70\x78\x20\x30\x3B\x22\x3E\x3C\x73\x70\x61\x6E\x20\x69\x64\x3D\x22\x6C\x65\x67\x65\x6E\x64\x6C\x61\x6E\x67\x75\x61\x67\x65\x74\x65\x78\x74\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x74\x69\x74\x6C\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x72\x69\x67\x68\x74\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x56\x69\x73\x69\x74\x20\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x20\x4C\x61\x6E\x67\x75\x61\x67\x65\x50\x61\x63\x6B\x45\x6E\x67\x6C\x69\x73\x68\x2E\x6A\x73\x20\x74\x6F\x20\x55\x70\x6C\x6F\x61\x64\x20\x61\x20\x4C\x61\x6E\x67\x75\x61\x67\x65\x20\x50\x61\x63\x6B\x22\x3E\x43\x68\x6F\x6F\x73\x65\x20\x4C\x61\x6E\x67\x75\x61\x67\x65\x3A\x20\x20\x3C\x2F\x73\x70\x61\x6E\x3E","\x3C\x73\x65\x6C\x65\x63\x74\x20\x69\x64\x3D\x22\x6C\x65\x67\x65\x6E\x64\x6C\x61\x6E\x67\x75\x61\x67\x65\x73\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x6F\x6E\x63\x68\x61\x6E\x67\x65\x3D\x22\x63\x68\x61\x6E\x67\x65\x4D\x6F\x64\x4C\x61\x6E\x67\x75\x61\x67\x65\x28\x29\x3B\x22\x20\x72\x65\x71\x75\x69\x72\x65\x64\x3D\x22\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x22\x20\x74\x69\x74\x6C\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x64\x69\x73\x70\x6C\x61\x79\x3A\x69\x6E\x6C\x69\x6E\x65\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x35\x30\x25\x22\x20\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x31\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x20\x73\x65\x6C\x65\x63\x74\x65\x64\x3E\x45\x6E\x67\x6C\x69\x73\x68\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x36\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x41\x72\x61\x62\x69\x63\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x34\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x42\x75\x6C\x67\x61\x72\x69\x61\x6E\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x35\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x46\x72\x65\x6E\x63\x68\x20\x2D\x20\x46\x72\x61\x6E\x63\x61\x69\x73\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x39\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x47\x65\x72\x6D\x61\x6E\x20\x2D\x20\x44\x65\x75\x74\x73\x63\x68\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x32\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x47\x72\x65\x65\x6B\x20\x2D\x20\u0395\u03BB\u03BB\u03B7\u03BD\u03B9\u03BA\u03AC\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x31\x31\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x50\x6F\x6C\x69\x73\x68\x20\x2D\x20\x50\x6F\x6C\x73\x6B\x69\x65\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x38\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x52\x75\x73\x73\x69\x61\x6E\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x33\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x53\x70\x61\x6E\x69\x73\x68\x20\x2D\x20\x45\x73\x70\x61\x6E\x6F\x6C\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x37\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x54\x72\x61\x64\x2E\x20\x43\x68\x69\x6E\x65\x73\x65\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x31\x30\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x54\x75\x72\x6B\x69\x73\x68\x20\x2D\x20\x54\xFC\x72\x6B\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x2F\x73\x65\x6C\x65\x63\x74\x3E\x3C\x2F\x64\x69\x76\x3E","\x3C\x64\x69\x76\x20\x63\x6C\x61\x73\x73\x3D\x22\x69\x6E\x70\x75\x74\x2D\x62\x6F\x78\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x74\x65\x78\x74\x2D\x61\x6C\x69\x67\x6E\x3A\x20\x63\x65\x6E\x74\x65\x72\x3B\x20\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x20\x31\x32\x70\x78\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x34\x70\x78\x3B\x20\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x20\x30\x20\x30\x70\x78\x20\x30\x3B\x22\x3E\x3C\x73\x70\x61\x6E\x20\x69\x64\x3D\x22\x6C\x65\x67\x65\x6E\x64\x64\x69\x73\x63\x6F\x72\x64\x77\x65\x62\x68\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x74\x69\x74\x6C\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x22\x3E\x44\x69\x73\x63\x6F\x72\x64\x20\x57\x65\x62\x68\x6F\x6F\x6B\x20\x55\x72\x6C\x20\x28\x66\x6F\x72\x20\x73\x65\x6E\x64\x69\x6E\x67\x20\x54\x4F\x4B\x45\x4E\x29\x20\x20\x3C\x2F\x73\x70\x61\x6E\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x64\x69\x73\x63\x77\x65\x62\x68\x6F\x6F\x6B\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x44\x69\x73\x63\x6F\x72\x64\x20\x57\x65\x62\x68\x6F\x6F\x6B\x20\x31\x20\x55\x72\x6C\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x72\x69\x67\x68\x74\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x4D\x75\x73\x74\x20\x62\x65\x20\x66\x69\x6C\x6C\x65\x64\x20\x66\x6F\x72\x20\x66\x75\x6E\x63\x74\x69\x6F\x6E\x20\x74\x6F\x20\x77\x6F\x72\x6B\x2E\x20\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x69\x73\x63\x6F\x72\x64\x2E\x63\x6F\x6D\x2F\x61\x70\x69\x2F\x77\x65\x62\x68\x6F\x6F\x6B\x73\x2F\x2E\x2E\x2E\x2F\x2E\x2E\x2E\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x34\x39\x2E\x35\x25\x3B\x20\x62\x6F\x72\x64\x65\x72\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x64\x61\x72\x6B\x73\x6C\x61\x74\x65\x67\x72\x65\x79\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x6C\x65\x66\x74\x3A\x20\x30\x2E\x35\x25\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x69\x6E\x6C\x69\x6E\x65\x2D\x62\x6C\x6F\x63\x6B\x3B\x20\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x64\x69\x73\x63\x77\x65\x62\x68\x6F\x6F\x6B\x31\x28\x29\x3B\x22\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x64\x69\x73\x63\x77\x65\x62\x68\x6F\x6F\x6B\x32\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x44\x69\x73\x63\x6F\x72\x64\x20\x57\x65\x62\x68\x6F\x6F\x6B\x20\x32\x20\x55\x72\x6C\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x72\x69\x67\x68\x74\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x53\x65\x63\x6F\x6E\x64\x61\x72\x79\x20\x57\x65\x62\x68\x6F\x6F\x6B\x28\x6F\x70\x74\x69\x6F\x6E\x61\x6C\x29\x2E\x20\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x69\x73\x63\x6F\x72\x64\x2E\x63\x6F\x6D\x2F\x61\x70\x69\x2F\x77\x65\x62\x68\x6F\x6F\x6B\x73\x2F\x2E\x2E\x2E\x2F\x2E\x2E\x2E\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x34\x39\x2E\x35\x25\x3B\x20\x62\x6F\x72\x64\x65\x72\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x64\x61\x72\x6B\x73\x6C\x61\x74\x65\x67\x72\x65\x79\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x72\x69\x67\x68\x74\x3A\x20\x30\x2E\x35\x25\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x69\x6E\x6C\x69\x6E\x65\x2D\x62\x6C\x6F\x63\x6B\x3B\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x64\x69\x73\x63\x77\x65\x62\x68\x6F\x6F\x6B\x32\x28\x29\x3B\x22\x3E","\x3C\x64\x69\x76\x20\x63\x6C\x61\x73\x73\x3D\x22\x69\x6E\x70\x75\x74\x2D\x62\x6F\x78\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x74\x65\x78\x74\x2D\x61\x6C\x69\x67\x6E\x3A\x20\x63\x65\x6E\x74\x65\x72\x3B\x20\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x20\x31\x32\x70\x78\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x34\x70\x78\x3B\x20\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x20\x30\x20\x30\x70\x78\x20\x30\x3B\x22\x3E\x3C\x73\x70\x61\x6E\x20\x69\x64\x3D\x22\x6C\x65\x67\x65\x6E\x64\x6F\x74\x68\x65\x72\x73\x63\x72\x69\x70\x74\x73\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x74\x69\x74\x6C\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x22\x3E\x45\x78\x70\x61\x6E\x73\x69\x6F\x6E\x73\x3A\x20\x3C\x2F\x73\x70\x61\x6E\x3E","\x3C\x2F\x64\x69\x76\x3E\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x4C\x45\x47\x45\x4E\x44\x41\x64\x73\x32\x22\x3E\x3C\x2F\x64\x69\x76\x3E\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x4C\x45\x47\x45\x4E\x44\x41\x64\x73\x33\x22\x3E\x3C\x2F\x64\x69\x76\x3E","\x23\x6D\x61\x69\x6E\x2D\x6D\x65\x6E\x75\x3E\x23\x70\x72\x6F\x66\x69\x6C\x65","\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65","\x31\x32\x70\x78","\x23\x55\x73\x65\x72\x50\x72\x6F\x66\x69\x6C\x65","\x70\x6F\x69\x6E\x74\x65\x72\x2D\x65\x76\x65\x6E\x74\x73","\x61\x75\x74\x6F","\x23\x6C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x2D\x6D\x65\x6E\x75","\x70\x61\x73\x74\x65","\x67\x65\x74\x44\x61\x74\x61","\x63\x6C\x69\x70\x62\x6F\x61\x72\x64\x44\x61\x74\x61","\x6F\x72\x69\x67\x69\x6E\x61\x6C\x45\x76\x65\x6E\x74","\x23\x73\x65\x61\x72\x63\x68\x42\x74\x6E","\x62\x69\x6E\x64","\x23\x6E\x6F\x74\x65\x31","\x23\x6E\x6F\x74\x65\x32","\x23\x6E\x6F\x74\x65\x33","\x23\x6E\x6F\x74\x65\x34","\x23\x6E\x6F\x74\x65\x35","\x23\x6E\x6F\x74\x65\x36","\x23\x6E\x6F\x74\x65\x37","\x2E\x6E\x6F\x74\x65","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x79\x6F\x75\x74\x75\x62\x65\x70\x6C\x61\x79\x65\x72\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x6C\x65\x66\x74\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x68\x35\x20\x63\x6C\x61\x73\x73\x3D\x22\x6D\x61\x69\x6E\x2D\x63\x6F\x6C\x6F\x72\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x72\x69\x67\x68\x74\x3A\x20\x31\x35\x70\x78\x3B\x22\x3E\x59\x6F\x75\x74\x75\x62\x65\x20\x70\x6C\x61\x79\x65\x72\x3C\x2F\x68\x35\x3E","\x3C\x69\x66\x72\x61\x6D\x65\x20\x69\x64\x3D\x22\x6D\x75\x73\x69\x63\x46\x72\x61\x6D\x65\x22\x20\x77\x69\x64\x74\x68\x3D\x22\x33\x35\x30\x22\x20\x68\x65\x69\x67\x68\x74\x3D\x22\x31\x38\x30\x22\x20\x73\x72\x63\x3D\x22","\x22\x20\x66\x72\x61\x6D\x65\x62\x6F\x72\x64\x65\x72\x3D\x22\x30\x22\x20\x61\x6C\x6C\x6F\x77\x66\x75\x6C\x6C\x73\x63\x72\x65\x65\x6E\x3D\x22\x22\x3E\x3C\x2F\x69\x66\x72\x61\x6D\x65\x3E\x3C\x2F\x64\x69\x76\x3E","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x61\x66\x74\x65\x72\x79\x6F\x75\x74\x75\x62\x65\x70\x6C\x61\x79\x65\x72\x22\x3E\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x6D\x75\x73\x69\x63\x55\x72\x6C\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x24\x28\x74\x68\x69\x73\x29\x2E\x73\x65\x6C\x65\x63\x74\x28\x29\x3B\x22\x20\x74\x79\x70\x65\x3D\x22\x74\x65\x78\x74\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x59\x6F\x75\x74\x75\x62\x65\x20\x55\x72\x6C\x22\x20\x76\x61\x6C\x75\x65\x3D\x22","\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x72\x69\x67\x68\x74\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x50\x61\x73\x74\x65\x20\x79\x6F\x75\x72\x20\x76\x69\x64\x65\x6F\x2F\x70\x6C\x61\x79\x6C\x69\x73\x74\x20\x68\x65\x72\x65\x22\x3E","\x69\x63\x6F\x6E\x2D\x75\x73\x65\x72","\x66\x61\x20\x66\x61\x2D\x63\x6F\x67\x20\x66\x61\x2D\x73\x70\x69\x6E\x20\x66\x61\x2D\x33\x78\x20\x66\x61\x2D\x66\x77","\x23\x65\x78\x70\x2D\x62\x61\x72\x20\x3E\x20\x2E\x69\x63\x6F\x6E\x2D\x75\x73\x65\x72","\x69\x6E\x70\x75\x74","\x6D\x61\x78\x6C\x65\x6E\x67\x74\x68","\x31\x30\x30\x30","\x63\x6C\x61\x73\x73","\x62\x74\x6E\x20\x62\x74\x6E\x2D\x73\x75\x63\x63\x65\x73\x73","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x73\x65\x61\x72\x63\x68\x4C\x6F\x67\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x6D\x61\x69\x6E\x2D\x63\x6F\x6C\x6F\x72\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x20\x31\x33\x70\x78\x3B\x66\x6C\x6F\x61\x74\x3A\x20\x6C\x65\x66\x74\x3B\x66\x6F\x6E\x74\x2D\x77\x65\x69\x67\x68\x74\x3A\x20\x37\x30\x30\x3B\x62\x6F\x72\x64\x65\x72\x2D\x72\x61\x64\x69\x75\x73\x3A\x20\x34\x70\x78\x3B\x77\x69\x64\x74\x68\x3A\x20\x36\x35\x25\x3B\x68\x65\x69\x67\x68\x74\x3A\x20\x32\x37\x30\x70\x78\x3B\x7A\x2D\x69\x6E\x64\x65\x78\x3A\x20\x31\x35\x3B\x6D\x61\x72\x67\x69\x6E\x3A\x20\x61\x75\x74\x6F\x3B\x74\x6F\x70\x3A\x20\x30\x70\x78\x3B\x72\x69\x67\x68\x74\x3A\x20\x30\x70\x78\x3B\x6C\x65\x66\x74\x3A\x20\x30\x70\x78\x3B\x62\x6F\x74\x74\x6F\x6D\x3A\x20\x2D\x33\x39\x30\x70\x78\x3B\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x20\x66\x69\x78\x65\x64\x3B\x70\x6F\x69\x6E\x74\x65\x72\x2D\x65\x76\x65\x6E\x74\x73\x3A\x20\x61\x75\x74\x6F\x3B\x63\x6F\x6C\x6F\x72\x3A\x20\x72\x67\x62\x28\x32\x35\x35\x2C\x20\x32\x35\x35\x2C\x20\x32\x35\x35\x29\x3B\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x31\x30\x70\x78\x3B\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x72\x67\x62\x61\x28\x30\x2C\x20\x30\x2C\x20\x30\x2C\x20\x30\x2E\x32\x29\x3B\x22\x3E\x3C\x68\x35\x20\x69\x64\x3D\x22\x6C\x6F\x67\x54\x69\x74\x6C\x65\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x6D\x61\x69\x6E\x2D\x63\x6F\x6C\x6F\x72\x20\x74\x65\x78\x74\x2D\x63\x65\x6E\x74\x65\x72\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x30\x70\x78\x3B\x22\x3E\x52\x65\x73\x75\x6C\x74\x73\x3C\x2F\x68\x35\x3E","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x6C\x6F\x67\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x66\x6F\x6E\x74\x2D\x77\x65\x69\x67\x68\x74\x3A\x20\x6E\x6F\x72\x6D\x61\x6C\x3B\x20\x6F\x76\x65\x72\x66\x6C\x6F\x77\x2D\x78\x3A\x20\x68\x69\x64\x64\x65\x6E\x3B\x20\x6F\x76\x65\x72\x66\x6C\x6F\x77\x2D\x79\x3A\x20\x61\x75\x74\x6F\x3B\x68\x65\x69\x67\x68\x74\x3A\x20\x39\x30\x25\x3B\x22\x3E","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x73\x68\x6F\x72\x74\x63\x75\x74\x73\x2D\x68\x75\x64\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x68\x75\x64\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x77\x69\x64\x74\x68\x3A\x20\x37\x30\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x33\x30\x70\x78\x3B\x20\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x70\x6F\x69\x6E\x74\x65\x72\x2D\x65\x76\x65\x6E\x74\x73\x3A\x20\x61\x75\x74\x6F\x3B\x20\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x20\x61\x62\x73\x6F\x6C\x75\x74\x65\x3B\x20\x72\x69\x67\x68\x74\x3A\x20\x30\x70\x78\x3B\x20\x74\x6F\x70\x3A\x20\x2D\x33\x30\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x62\x6C\x6F\x63\x6B\x3B\x22\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x56\x6F\x69\x63\x65\x42\x74\x6E\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x2D\x6C\x69\x6E\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x36\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x56\x6F\x69\x63\x65\x20\x26\x20\x43\x61\x6D\x65\x72\x61\x20\x43\x68\x61\x74\x22\x3E\x3C\x69\x20\x69\x64\x3D\x22\x56\x6F\x69\x63\x65\x42\x74\x6E\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x6D\x69\x63\x72\x6F\x70\x68\x6F\x6E\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x2D\x6C\x65\x66\x74\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x4D\x69\x6E\x69\x53\x63\x72\x69\x70\x74\x73\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x2D\x6C\x69\x6E\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x36\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x73\x65\x74\x73\x63\x72\x69\x70\x74\x69\x6E\x67\x66\x75\x6E\x63\x74\x69\x6F\x6E\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x4D\x69\x6E\x69\x20\x53\x63\x72\x69\x70\x74\x73\x22\x3E\x3C\x69\x20\x69\x64\x3D\x22\x4D\x69\x6E\x69\x53\x63\x72\x69\x70\x74\x73\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x6C\x69\x6E\x6F\x64\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x2D\x6C\x65\x66\x74\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x53\x65\x6E\x64\x43\x6F\x6D\x6D\x61\x6E\x64\x73\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x2D\x6C\x69\x6E\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x36\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x73\x65\x74\x6D\x65\x73\x73\x61\x67\x65\x63\x6F\x6D\x66\x75\x6E\x63\x74\x69\x6F\x6E\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x4D\x65\x73\x73\x61\x67\x65\x20\x53\x63\x72\x69\x70\x74\x20\x43\x6F\x6D\x6D\x61\x6E\x64\x73\x22\x3E\x3C\x69\x20\x69\x64\x3D\x22\x53\x65\x6E\x64\x43\x6F\x6D\x6D\x61\x6E\x64\x73\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x73\x69\x74\x65\x6D\x61\x70\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x2D\x6C\x65\x66\x74\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x49\x6D\x61\x67\x65\x73\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x2D\x6C\x69\x6E\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x36\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x73\x65\x74\x69\x63\x6F\x6E\x66\x75\x6E\x63\x74\x69\x6F\x6E\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x4D\x65\x73\x73\x61\x67\x65\x20\x49\x6D\x67\x75\x72\x20\x49\x63\x6F\x6E\x73\x22\x3E\x3C\x69\x20\x69\x64\x3D\x22\x49\x6D\x61\x67\x65\x73\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x70\x69\x63\x74\x75\x72\x65\x2D\x6F\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x2D\x6C\x65\x66\x74\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x79\x6F\x75\x74\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x2D\x6C\x69\x6E\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x36\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x73\x65\x74\x79\x74\x66\x75\x6E\x63\x74\x69\x6F\x6E\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x4D\x65\x73\x73\x61\x67\x65\x20\x59\x6F\x75\x74\x75\x62\x65\x20\x56\x69\x64\x65\x6F\x73\x22\x3E\x3C\x69\x20\x69\x64\x3D\x22\x79\x6F\x75\x74\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x79\x6F\x75\x74\x75\x62\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x2D\x6C\x65\x66\x74\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x70\x6C\x61\x79\x65\x72\x42\x74\x6E\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x2D\x6C\x69\x6E\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x36\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x43\x6C\x69\x63\x6B\x20\x70\x6C\x61\x79\x20\x6F\x6E\x20\x79\x6F\x75\x74\x75\x62\x65\x20\x74\x61\x62\x20\x61\x74\x20\x66\x69\x72\x73\x74\x22\x3E\x3C\x69\x20\x69\x64\x3D\x22\x70\x6C\x61\x79\x65\x72\x49\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x70\x6C\x61\x79\x2D\x63\x69\x72\x63\x6C\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x2D\x63\x65\x6E\x74\x65\x72\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x69\x6D\x61\x67\x65\x73\x2D\x68\x75\x64\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x68\x75\x64\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x77\x69\x64\x74\x68\x3A\x20\x37\x30\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x33\x30\x70\x78\x3B\x20\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x70\x6F\x69\x6E\x74\x65\x72\x2D\x65\x76\x65\x6E\x74\x73\x3A\x20\x61\x75\x74\x6F\x3B\x20\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x20\x61\x62\x73\x6F\x6C\x75\x74\x65\x3B\x20\x72\x69\x67\x68\x74\x3A\x20\x30\x70\x78\x3B\x20\x74\x6F\x70\x3A\x20\x2D\x36\x30\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x73\x65\x6E\x64\x69\x63\x6F\x6E\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x2D\x6C\x69\x6E\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x36\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x73\x65\x6E\x64\x69\x63\x6F\x6E\x31\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x42\x61\x64\x20\x43\x68\x6F\x69\x63\x65\x21\x22\x3E\x3C\x69\x20\x69\x64\x3D\x22\x73\x65\x6E\x64\x69\x63\x6F\x6E\x31\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x65\x78\x63\x6C\x61\x6D\x61\x74\x69\x6F\x6E\x2D\x74\x72\x69\x61\x6E\x67\x6C\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x2D\x6C\x65\x66\x74\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x73\x65\x6E\x64\x69\x63\x6F\x6E\x32\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x2D\x6C\x69\x6E\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x36\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x73\x65\x6E\x64\x69\x63\x6F\x6E\x32\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x57\x68\x79\x3F\x22\x3E\x3C\x69\x20\x69\x64\x3D\x22\x73\x65\x6E\x64\x69\x63\x6F\x6E\x32\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x71\x75\x65\x73\x74\x69\x6F\x6E\x2D\x63\x69\x72\x63\x6C\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x2D\x6C\x65\x66\x74\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x73\x65\x6E\x64\x69\x63\x6F\x6E\x33\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x2D\x6C\x69\x6E\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x36\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x73\x65\x6E\x64\x69\x63\x6F\x6E\x33\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x59\x6F\x77\x21\x21\x22\x3E\x3C\x69\x20\x69\x64\x3D\x22\x73\x65\x6E\x64\x69\x63\x6F\x6E\x33\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x77\x68\x65\x65\x6C\x63\x68\x61\x69\x72\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x2D\x63\x65\x6E\x74\x65\x72\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x73\x65\x6E\x64\x69\x63\x6F\x6E\x34\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x2D\x6C\x69\x6E\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x36\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x73\x65\x6E\x64\x69\x63\x6F\x6E\x34\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x44\x65\x61\x74\x68\x21\x22\x3E\x3C\x69\x20\x69\x64\x3D\x22\x73\x65\x6E\x64\x69\x63\x6F\x6E\x34\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x63\x75\x74\x6C\x65\x72\x79\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x2D\x63\x65\x6E\x74\x65\x72\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x73\x65\x6E\x64\x69\x63\x6F\x6E\x35\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x2D\x6C\x69\x6E\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x36\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x73\x65\x6E\x64\x69\x63\x6F\x6E\x35\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x52\x65\x6C\x61\x78\x21\x22\x3E\x3C\x69\x20\x69\x64\x3D\x22\x73\x65\x6E\x64\x69\x63\x6F\x6E\x35\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x62\x65\x64\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x2D\x6C\x65\x66\x74\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x73\x65\x6E\x64\x69\x63\x6F\x6E\x36\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x2D\x6C\x69\x6E\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x36\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x73\x65\x6E\x64\x69\x63\x6F\x6E\x36\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x4C\x65\x67\x65\x6E\x64\x21\x22\x3E\x3C\x69\x20\x69\x64\x3D\x22\x73\x65\x6E\x64\x69\x63\x6F\x6E\x36\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x74\x65\x6C\x65\x67\x72\x61\x6D\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x2D\x6C\x65\x66\x74\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E\x3C\x2F\x64\x69\x76\x3E","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x79\x74\x2D\x68\x75\x64\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x68\x75\x64\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x77\x69\x64\x74\x68\x3A\x20\x37\x30\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x33\x30\x70\x78\x3B\x20\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x70\x6F\x69\x6E\x74\x65\x72\x2D\x65\x76\x65\x6E\x74\x73\x3A\x20\x61\x75\x74\x6F\x3B\x20\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x20\x61\x62\x73\x6F\x6C\x75\x74\x65\x3B\x20\x72\x69\x67\x68\x74\x3A\x20\x30\x70\x78\x3B\x20\x74\x6F\x70\x3A\x20\x2D\x36\x30\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x73\x65\x6E\x64\x79\x74\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x2D\x6C\x69\x6E\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x36\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x73\x65\x6E\x64\x79\x74\x31\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x52\x69\x63\x6B\x20\x41\x73\x74\x6C\x65\x79\x20\x2D\x20\x4E\x65\x76\x65\x72\x20\x47\x6F\x6E\x6E\x61\x20\x47\x69\x76\x65\x20\x59\x6F\x75\x20\x55\x70\x22\x3E\x3C\x69\x20\x69\x64\x3D\x22\x73\x65\x6E\x64\x79\x74\x31\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x6D\x75\x73\x69\x63\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x2D\x6C\x65\x66\x74\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x73\x65\x6E\x64\x79\x74\x32\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x2D\x6C\x69\x6E\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x36\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x73\x65\x6E\x64\x79\x74\x32\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x53\x75\x72\x76\x69\x76\x6F\x72\x20\x2D\x20\x45\x79\x65\x20\x4F\x66\x20\x54\x68\x65\x20\x54\x69\x67\x65\x72\x22\x3E\x3C\x69\x20\x69\x64\x3D\x22\x73\x65\x6E\x64\x79\x74\x32\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x6D\x75\x73\x69\x63\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x2D\x6C\x65\x66\x74\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x73\x65\x6E\x64\x79\x74\x33\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x2D\x6C\x69\x6E\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x36\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x73\x65\x6E\x64\x79\x74\x33\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x4C\x69\x6F\x6E\x20\x6B\x69\x6E\x67\x20\x2D\x20\x54\x68\x65\x20\x4C\x69\x6F\x6E\x20\x53\x6C\x65\x65\x70\x73\x20\x54\x6F\x6E\x69\x67\x68\x74\x22\x3E\x3C\x69\x20\x69\x64\x3D\x22\x73\x65\x6E\x64\x79\x74\x33\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x6D\x75\x73\x69\x63\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x2D\x63\x65\x6E\x74\x65\x72\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x73\x65\x6E\x64\x79\x74\x34\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x2D\x6C\x69\x6E\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x36\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x73\x65\x6E\x64\x79\x74\x34\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x41\x67\x61\x72\x69\x6F\x20\x2D\x20\x4A\x75\x6D\x62\x6F\x20\x53\x6F\x6C\x6F\x20\x76\x73\x20\x54\x65\x61\x6D\x73\x22\x3E\x3C\x69\x20\x69\x64\x3D\x22\x73\x65\x6E\x64\x79\x74\x34\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x76\x69\x64\x65\x6F\x2D\x63\x61\x6D\x65\x72\x61\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x2D\x63\x65\x6E\x74\x65\x72\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x73\x65\x6E\x64\x79\x74\x35\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x2D\x6C\x69\x6E\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x36\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x73\x65\x6E\x64\x79\x74\x35\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x41\x67\x61\x72\x69\x6F\x20\x2D\x20\x4B\x69\x6C\x6C\x33\x72\x20\x76\x73\x20\x54\x65\x61\x6D\x73\x22\x3E\x3C\x69\x20\x69\x64\x3D\x22\x73\x65\x6E\x64\x79\x74\x35\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x76\x69\x64\x65\x6F\x2D\x63\x61\x6D\x65\x72\x61\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x2D\x6C\x65\x66\x74\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x73\x65\x6E\x64\x79\x74\x36\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x2D\x6C\x69\x6E\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x36\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x73\x65\x6E\x64\x79\x74\x36\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x50\x72\x6F\x6D\x6F\x74\x69\x6F\x6E\x61\x6C\x20\x56\x69\x64\x65\x6F\x22\x3E\x3C\x69\x20\x69\x64\x3D\x22\x73\x65\x6E\x64\x79\x74\x36\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x74\x65\x6C\x65\x67\x72\x61\x6D\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x2D\x6C\x65\x66\x74\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E\x3C\x2F\x64\x69\x76\x3E","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x6D\x73\x67\x63\x6F\x6D\x6D\x61\x6E\x64\x73\x2D\x68\x75\x64\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x68\x75\x64\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x77\x69\x64\x74\x68\x3A\x20\x37\x30\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x33\x30\x70\x78\x3B\x20\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x70\x6F\x69\x6E\x74\x65\x72\x2D\x65\x76\x65\x6E\x74\x73\x3A\x20\x61\x75\x74\x6F\x3B\x20\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x20\x61\x62\x73\x6F\x6C\x75\x74\x65\x3B\x20\x72\x69\x67\x68\x74\x3A\x20\x30\x70\x78\x3B\x20\x74\x6F\x70\x3A\x20\x2D\x36\x30\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x6D\x73\x67\x63\x6F\x6D\x6D\x61\x6E\x64\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x2D\x6C\x69\x6E\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x36\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x6D\x73\x67\x63\x6F\x6D\x6D\x61\x6E\x64\x31\x66\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x48\x65\x6C\x6C\x6F\x20\x54\x65\x61\x6D\x21\x22\x3E\x3C\x69\x20\x69\x64\x3D\x22\x6D\x73\x67\x63\x6F\x6D\x6D\x61\x6E\x64\x31\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x63\x6F\x66\x66\x65\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x2D\x6C\x65\x66\x74\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x6D\x73\x67\x63\x6F\x6D\x6D\x61\x6E\x64\x32\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x2D\x6C\x69\x6E\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x36\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x6D\x73\x67\x63\x6F\x6D\x6D\x61\x6E\x64\x32\x66\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x4C\x61\x75\x67\x68\x20\x74\x6F\x20\x54\x65\x61\x6D\x22\x3E\x3C\x69\x20\x69\x64\x3D\x22\x6D\x73\x67\x63\x6F\x6D\x6D\x61\x6E\x64\x32\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x73\x6D\x69\x6C\x65\x2D\x6F\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x2D\x6C\x65\x66\x74\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x6D\x73\x67\x63\x6F\x6D\x6D\x61\x6E\x64\x33\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x2D\x6C\x69\x6E\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x36\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x6D\x73\x67\x63\x6F\x6D\x6D\x61\x6E\x64\x33\x66\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x54\x65\x61\x6D\x20\x43\x68\x61\x6E\x67\x65\x20\x4E\x61\x6D\x65\x20\x74\x6F\x20\x79\x6F\x75\x72\x73\x22\x3E\x3C\x69\x20\x69\x64\x3D\x22\x6D\x73\x67\x63\x6F\x6D\x6D\x61\x6E\x64\x33\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x6D\x61\x67\x69\x63\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x2D\x63\x65\x6E\x74\x65\x72\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x6D\x73\x67\x63\x6F\x6D\x6D\x61\x6E\x64\x34\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x2D\x6C\x69\x6E\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x36\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x6D\x73\x67\x63\x6F\x6D\x6D\x61\x6E\x64\x34\x66\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x54\x72\x6F\x6C\x6C\x20\x54\x65\x61\x6D\x6D\x61\x74\x65\x22\x3E\x3C\x69\x20\x69\x64\x3D\x22\x6D\x73\x67\x63\x6F\x6D\x6D\x61\x6E\x64\x34\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x62\x61\x74\x68\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x2D\x63\x65\x6E\x74\x65\x72\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x6D\x73\x67\x63\x6F\x6D\x6D\x61\x6E\x64\x35\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x2D\x6C\x69\x6E\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x36\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x6D\x73\x67\x63\x6F\x6D\x6D\x61\x6E\x64\x35\x66\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x4F\x70\x65\x6E\x20\x59\x6F\x75\x74\x75\x62\x65\x20\x4D\x75\x73\x69\x63\x22\x3E\x3C\x69\x20\x69\x64\x3D\x22\x6D\x73\x67\x63\x6F\x6D\x6D\x61\x6E\x64\x35\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x79\x6F\x75\x74\x75\x62\x65\x2D\x70\x6C\x61\x79\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x2D\x6C\x65\x66\x74\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x6D\x73\x67\x63\x6F\x6D\x6D\x61\x6E\x64\x36\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x2D\x6C\x69\x6E\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x36\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x6D\x73\x67\x63\x6F\x6D\x6D\x61\x6E\x64\x36\x66\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x49\x6E\x73\x61\x6E\x65\x20\x6D\x6F\x64\x65\x20\x28\x48\x69\x64\x65\x20\x45\x76\x65\x72\x79\x74\x68\x69\x6E\x67\x29\x22\x3E\x3C\x69\x20\x69\x64\x3D\x22\x6D\x73\x67\x63\x6F\x6D\x6D\x61\x6E\x64\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x65\x78\x63\x6C\x61\x6D\x61\x74\x69\x6F\x6E\x2D\x74\x72\x69\x61\x6E\x67\x6C\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x2D\x6C\x65\x66\x74\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E\x3C\x2F\x64\x69\x76\x3E","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x73\x63\x72\x69\x70\x74\x69\x6E\x67\x2D\x68\x75\x64\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x68\x75\x64\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x77\x69\x64\x74\x68\x3A\x20\x31\x32\x2E\x35\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x33\x30\x70\x78\x3B\x20\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x70\x6F\x69\x6E\x74\x65\x72\x2D\x65\x76\x65\x6E\x74\x73\x3A\x20\x61\x75\x74\x6F\x3B\x20\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x20\x61\x62\x73\x6F\x6C\x75\x74\x65\x3B\x20\x72\x69\x67\x68\x74\x3A\x20\x30\x70\x78\x3B\x20\x74\x6F\x70\x3A\x20\x2D\x36\x30\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x43\x75\x74\x6E\x61\x6D\x65\x73\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x2D\x6C\x69\x6E\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x30\x30\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x45\x64\x69\x74\x20\x6E\x61\x6D\x65\x73\x22\x3E\x3C\x69\x20\x69\x64\x3D\x22\x43\x75\x74\x6E\x61\x6D\x65\x73\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x73\x63\x69\x73\x73\x6F\x72\x73\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x2D\x6C\x65\x66\x74\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x6C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x2D\x6D\x65\x6E\x75\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x6F\x69\x6E\x74\x65\x72\x2D\x65\x76\x65\x6E\x74\x73\x3A\x20\x61\x75\x74\x6F\x3B\x22\x3E","\x3C\x61\x20\x69\x64\x3D\x22\x73\x65\x61\x72\x63\x68\x53\x68\x6F\x72\x74\x63\x75\x74\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x69\x6E\x66\x6F\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x6C\x65\x66\x74\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x4A\x6F\x69\x6E\x20\x73\x65\x72\x76\x65\x72\x20\x28\x42\x61\x63\x6B\x73\x70\x61\x63\x65\x29\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x77\x69\x64\x74\x68\x3A\x20\x33\x33\x2E\x33\x25\x3B\x74\x65\x78\x74\x2D\x73\x68\x61\x64\x6F\x77\x3A\x20\x30\x2E\x33\x70\x78\x20\x30\x2E\x33\x70\x78\x20\x23\x30\x30\x30\x30\x30\x30\x3B\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x20\x73\x6D\x61\x6C\x6C\x3B\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x30\x70\x78\x3B\x62\x6F\x72\x64\x65\x72\x2D\x74\x6F\x70\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x72\x67\x62\x28\x31\x34\x31\x2C\x20\x32\x30\x31\x2C\x20\x36\x34\x29\x3B\x62\x6F\x72\x64\x65\x72\x2D\x62\x6F\x74\x74\x6F\x6D\x2D\x73\x74\x79\x6C\x65\x3A\x20\x6E\x6F\x6E\x65\x3B\x62\x6F\x72\x64\x65\x72\x2D\x6C\x65\x66\x74\x2D\x73\x74\x79\x6C\x65\x3A\x20\x6E\x6F\x6E\x65\x3B\x62\x6F\x72\x64\x65\x72\x3A\x20\x6E\x6F\x6E\x65\x3B\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x30\x70\x78\x3B\x20\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x63\x6F\x6C\x6F\x72\x3A\x20","\x20\x3B\x20\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x53\x65\x61\x72\x63\x68\x20\x6C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x73\x22\x20\x74\x69\x74\x6C\x65\x3D\x22\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x73\x65\x61\x72\x63\x68\x20\x66\x61\x2D\x6C\x67\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x61\x3E","\x3C\x61\x20\x69\x64\x3D\x22\x63\x6F\x70\x79\x53\x49\x50\x42\x74\x6E\x22\x20\x68\x72\x65\x66\x3D\x22\x6A\x61\x76\x61\x73\x63\x72\x69\x70\x74\x3A\x76\x6F\x69\x64\x28\x30\x29\x3B\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x73\x6D\x20\x62\x74\x6E\x2D\x63\x6F\x70\x79\x2D\x6C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x20\x62\x74\x6E\x2D\x69\x6E\x66\x6F\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x63\x6F\x6C\x6F\x72\x3A\x20","\x20\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x33\x33\x2E\x33\x25\x3B\x74\x65\x78\x74\x2D\x73\x68\x61\x64\x6F\x77\x3A\x20\x30\x2E\x33\x70\x78\x20\x30\x2E\x33\x70\x78\x20\x23\x30\x30\x30\x30\x30\x30\x3B\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x20\x73\x6D\x61\x6C\x6C\x3B\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x30\x70\x78\x3B\x2F\x2A\x20\x62\x6F\x72\x64\x65\x72\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x2A\x2F\x62\x6F\x72\x64\x65\x72\x2D\x6C\x65\x66\x74\x2D\x73\x74\x79\x6C\x65\x3A\x20\x6E\x6F\x6E\x65\x3B\x62\x6F\x72\x64\x65\x72\x2D\x72\x69\x67\x68\x74\x2D\x73\x74\x79\x6C\x65\x3A\x20\x6E\x6F\x6E\x65\x3B\x62\x6F\x72\x64\x65\x72\x2D\x62\x6F\x74\x74\x6F\x6D\x2D\x73\x74\x79\x6C\x65\x3A\x20\x6E\x6F\x6E\x65\x3B\x62\x6F\x72\x64\x65\x72\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x75\x73\x65\x72\x2D\x64\x72\x61\x67\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x75\x73\x65\x72\x2D\x73\x65\x6C\x65\x63\x74\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x2D\x6D\x6F\x7A\x2D\x75\x73\x65\x72\x2D\x73\x65\x6C\x65\x63\x74\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x2D\x77\x65\x62\x6B\x69\x74\x2D\x75\x73\x65\x72\x2D\x64\x72\x61\x67\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x2D\x77\x65\x62\x6B\x69\x74\x2D\x75\x73\x65\x72\x2D\x73\x65\x6C\x65\x63\x74\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x2D\x6D\x73\x2D\x75\x73\x65\x72\x2D\x73\x65\x6C\x65\x63\x74\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x6C\x65\x66\x74\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x43\x6F\x70\x79\x20\x54\x6F\x6B\x65\x6E\x2F\x53\x49\x50\x22\x3E\x43\x6F\x70\x79\x3C\x2F\x61\x3E","\x3C\x61\x20\x69\x64\x3D\x22\x72\x65\x63\x6F\x6E\x6E\x65\x63\x74\x42\x74\x6E\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x69\x6E\x66\x6F\x22\x20\x74\x69\x74\x6C\x65\x3D\x22\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x62\x6F\x74\x74\x6F\x6D\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x43\x68\x61\x6E\x67\x65\x20\x73\x65\x72\x76\x65\x72\x20\x28\x2B\x29\x22\x20\x73\x74\x79\x6C\x65\x3D\x22","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x63\x6F\x6C\x6F\x72\x3A\x20","\x20\x3B\x77\x69\x64\x74\x68\x3A\x20\x33\x33\x2E\x33\x25\x3B\x20\x74\x65\x78\x74\x2D\x73\x68\x61\x64\x6F\x77\x3A\x20\x30\x2E\x33\x70\x78\x20\x30\x2E\x33\x70\x78\x20\x23\x30\x30\x30\x30\x30\x30\x3B\x20\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x20\x73\x6D\x61\x6C\x6C\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x30\x70\x78\x3B\x20\x62\x6F\x72\x64\x65\x72\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x72\x65\x66\x72\x65\x73\x68\x20\x66\x61\x2D\x6C\x67\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x61\x3E","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x64\x72\x6F\x70\x44\x6F\x77\x6E\x33\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x68\x75\x64\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x20\x61\x62\x73\x6F\x6C\x75\x74\x65\x3B\x20\x70\x6F\x69\x6E\x74\x65\x72\x2D\x65\x76\x65\x6E\x74\x73\x3A\x20\x61\x75\x74\x6F\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x33\x33\x25\x3B\x20\x6C\x65\x66\x74\x3A\x20\x30\x70\x78\x3B\x20\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x62\x6F\x72\x64\x65\x72\x2D\x72\x61\x64\x69\x75\x73\x3A\x20\x30\x70\x78\x3B\x22\x3E","\x3C\x61\x20\x69\x64\x3D\x22\x6C\x61\x73\x74\x49\x50\x42\x74\x6E\x22\x20\x64\x61\x74\x61\x2D\x64\x69\x73\x61\x62\x6C\x65\x64\x3D\x22\x74\x72\x75\x65\x22\x20\x68\x72\x65\x66\x3D\x22\x6A\x61\x76\x61\x73\x63\x72\x69\x70\x74\x3A\x76\x6F\x69\x64\x28\x30\x29\x3B\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x73\x6D\x20\x62\x74\x6E\x2D\x63\x6F\x70\x79\x2D\x6C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x20\x62\x74\x6E\x2D\x69\x6E\x66\x6F\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x77\x69\x64\x74\x68\x3A\x20\x31\x30\x30\x25\x3B\x74\x65\x78\x74\x2D\x73\x68\x61\x64\x6F\x77\x3A\x20\x30\x2E\x33\x70\x78\x20\x30\x2E\x33\x70\x78\x20\x23\x30\x30\x30\x30\x30\x30\x3B\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x20\x73\x6D\x61\x6C\x6C\x3B\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x30\x70\x78\x3B\x62\x6F\x72\x64\x65\x72\x2D\x74\x6F\x70\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x72\x67\x62\x28\x31\x34\x31\x2C\x20\x32\x30\x31\x2C\x20\x36\x34\x29\x3B\x62\x6F\x72\x64\x65\x72\x2D\x62\x6F\x74\x74\x6F\x6D\x2D\x73\x74\x79\x6C\x65\x3A\x20\x6E\x6F\x6E\x65\x3B\x62\x6F\x72\x64\x65\x72\x2D\x6C\x65\x66\x74\x2D\x73\x74\x79\x6C\x65\x3A\x20\x6E\x6F\x6E\x65\x3B\x62\x6F\x72\x64\x65\x72\x3A\x20\x6E\x6F\x6E\x65\x3B\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x30\x70\x78\x3B\x20\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x63\x6F\x6C\x6F\x72\x3A\x20","\x20\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x68\x74\x6D\x6C\x3D\x22\x74\x72\x75\x65\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x6C\x65\x66\x74\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x3C\x70\x20\x73\x74\x79\x6C\x65\x3D\x26\x71\x75\x6F\x74\x3B\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x33\x70\x78\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x62\x6F\x74\x74\x6F\x6D\x3A\x30\x70\x78\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x72\x69\x67\x68\x74\x3A\x20\x32\x70\x78\x3B\x26\x71\x75\x6F\x74\x3B\x20\x61\x6C\x69\x67\x6E\x3D\x26\x71\x75\x6F\x74\x3B\x63\x65\x6E\x74\x65\x72\x26\x71\x75\x6F\x74\x3B\x3E\x3C\x73\x70\x61\x6E\x20\x63\x6C\x61\x73\x73\x3D\x26\x71\x75\x6F\x74\x3B\x68\x75\x64\x2D\x6D\x61\x69\x6E\x2D\x63\x6F\x6C\x6F\x72\x26\x71\x75\x6F\x74\x3B\x20\x73\x74\x79\x6C\x65\x3D\x26\x71\x75\x6F\x74\x3B\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x61\x62\x73\x6F\x6C\x75\x74\x65\x3B\x20\x6C\x65\x66\x74\x3A\x20\x31\x35\x70\x78\x3B\x26\x71\x75\x6F\x74\x3B\x3E\x4E\x45\x57\x3C\x2F\x73\x70\x61\x6E\x3E\x4A\x6F\x69\x6E\x20\x62\x61\x63\x6B\x3C\x2F\x70\x3E\x3C\x68\x72\x20\x73\x74\x79\x6C\x65\x3D\x26\x71\x75\x6F\x74\x3B\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x35\x70\x78\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x62\x6F\x74\x74\x6F\x6D\x3A\x31\x30\x70\x78\x3B\x20\x62\x6F\x72\x64\x65\x72\x2D\x63\x6F\x6C\x6F\x72\x3A\x64\x61\x72\x6B\x73\x6C\x61\x74\x65\x67\x72\x61\x79\x3B\x26\x71\x75\x6F\x74\x3B\x2F\x3E\x3C\x70\x20\x63\x6C\x61\x73\x73\x3D\x26\x71\x75\x6F\x74\x3B\x26\x71\x75\x6F\x74\x3B\x20\x73\x74\x79\x6C\x65\x3D\x26\x71\x75\x6F\x74\x3B\x6D\x61\x72\x67\x69\x6E\x2D\x62\x6F\x74\x74\x6F\x6D\x3A\x33\x70\x78\x3B\x20\x66\x6F\x6E\x74\x2D\x77\x65\x69\x67\x68\x74\x3A\x6E\x6F\x72\x6D\x61\x6C\x3B\x26\x71\x75\x6F\x74\x3B\x20\x61\x6C\x69\x67\x6E\x3D\x26\x71\x75\x6F\x74\x3B\x6A\x75\x73\x74\x69\x66\x79\x26\x71\x75\x6F\x74\x3B\x3E\x43\x6F\x6E\x6E\x65\x63\x74\x20\x74\x6F\x20\x6C\x61\x73\x74\x20\x49\x50\x20\x79\x6F\x75\x20\x70\x6C\x61\x79\x65\x64\x3C\x2F\x70\x3E\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x61\x72\x72\x6F\x77\x2D\x63\x69\x72\x63\x6C\x65\x2D\x64\x6F\x77\x6E\x20\x66\x61\x2D\x6C\x67\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x61\x3E","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x64\x72\x6F\x70\x44\x6F\x77\x6E\x32\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x68\x75\x64\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x20\x61\x62\x73\x6F\x6C\x75\x74\x65\x3B\x20\x70\x6F\x69\x6E\x74\x65\x72\x2D\x65\x76\x65\x6E\x74\x73\x3A\x20\x61\x75\x74\x6F\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x33\x33\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x39\x30\x70\x78\x3B\x20\x6C\x65\x66\x74\x3A\x20\x36\x37\x70\x78\x3B\x20\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x62\x6F\x72\x64\x65\x72\x2D\x72\x61\x64\x69\x75\x73\x3A\x20\x30\x70\x78\x3B\x22\x3E","\x3C\x61\x20\x69\x64\x3D\x22\x63\x6F\x70\x79\x53\x49\x50\x61\x6E\x64\x50\x61\x73\x73\x22\x20\x68\x72\x65\x66\x3D\x22\x6A\x61\x76\x61\x73\x63\x72\x69\x70\x74\x3A\x76\x6F\x69\x64\x28\x30\x29\x3B\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x73\x6D\x20\x62\x74\x6E\x2D\x63\x6F\x70\x79\x2D\x6C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x20\x62\x74\x6E\x2D\x69\x6E\x66\x6F\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x63\x6F\x6C\x6F\x72\x3A\x20","\x20\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x30\x30\x25\x3B\x74\x65\x78\x74\x2D\x73\x68\x61\x64\x6F\x77\x3A\x20\x72\x67\x62\x28\x30\x2C\x20\x30\x2C\x20\x30\x29\x20\x30\x2E\x33\x70\x78\x20\x30\x2E\x33\x70\x78\x3B\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x20\x73\x6D\x61\x6C\x6C\x3B\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x30\x70\x78\x3B\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x62\x6C\x6F\x63\x6B\x3B\x62\x6F\x72\x64\x65\x72\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x75\x73\x65\x72\x2D\x64\x72\x61\x67\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x75\x73\x65\x72\x2D\x73\x65\x6C\x65\x63\x74\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x2D\x6D\x6F\x7A\x2D\x75\x73\x65\x72\x2D\x73\x65\x6C\x65\x63\x74\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x2D\x77\x65\x62\x6B\x69\x74\x2D\x75\x73\x65\x72\x2D\x64\x72\x61\x67\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x2D\x77\x65\x62\x6B\x69\x74\x2D\x75\x73\x65\x72\x2D\x73\x65\x6C\x65\x63\x74\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x2D\x6D\x73\x2D\x75\x73\x65\x72\x2D\x73\x65\x6C\x65\x63\x74\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x6C\x65\x66\x74\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x43\x6F\x70\x79\x20\x54\x6F\x6B\x65\x6E\x2F\x53\x49\x50\x26\x50\x61\x73\x73\x77\x6F\x72\x64\x22\x3E\x54\x4B\x26\x50\x57\x3C\x2F\x61\x3E","\x3C\x61\x20\x69\x64\x3D\x22\x63\x6F\x70\x79\x4C\x42\x42\x74\x6E\x22\x20\x68\x72\x65\x66\x3D\x22\x6A\x61\x76\x61\x73\x63\x72\x69\x70\x74\x3A\x76\x6F\x69\x64\x28\x30\x29\x3B\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x73\x6D\x20\x62\x74\x6E\x2D\x63\x6F\x70\x79\x2D\x6C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x20\x62\x74\x6E\x2D\x69\x6E\x66\x6F\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x63\x6F\x6C\x6F\x72\x3A\x20","\x20\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x30\x30\x25\x3B\x74\x65\x78\x74\x2D\x73\x68\x61\x64\x6F\x77\x3A\x20\x72\x67\x62\x28\x30\x2C\x20\x30\x2C\x20\x30\x29\x20\x30\x2E\x33\x70\x78\x20\x30\x2E\x33\x70\x78\x3B\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x20\x73\x6D\x61\x6C\x6C\x3B\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x30\x70\x78\x3B\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x62\x6C\x6F\x63\x6B\x3B\x62\x6F\x72\x64\x65\x72\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x75\x73\x65\x72\x2D\x64\x72\x61\x67\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x75\x73\x65\x72\x2D\x73\x65\x6C\x65\x63\x74\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x2D\x6D\x6F\x7A\x2D\x75\x73\x65\x72\x2D\x73\x65\x6C\x65\x63\x74\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x2D\x77\x65\x62\x6B\x69\x74\x2D\x75\x73\x65\x72\x2D\x64\x72\x61\x67\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x2D\x77\x65\x62\x6B\x69\x74\x2D\x75\x73\x65\x72\x2D\x73\x65\x6C\x65\x63\x74\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x2D\x6D\x73\x2D\x75\x73\x65\x72\x2D\x73\x65\x6C\x65\x63\x74\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x6C\x65\x66\x74\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x43\x6F\x70\x79\x20\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x20\x28\x4C\x29\x22\x3E\x4C\x42\x3C\x2F\x61\x3E","\x3C\x61\x20\x69\x64\x3D\x22\x63\x6F\x70\x79\x53\x49\x50\x50\x61\x73\x73\x4C\x42\x22\x20\x68\x72\x65\x66\x3D\x22\x6A\x61\x76\x61\x73\x63\x72\x69\x70\x74\x3A\x76\x6F\x69\x64\x28\x30\x29\x3B\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x73\x6D\x20\x62\x74\x6E\x2D\x63\x6F\x70\x79\x2D\x6C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x20\x62\x74\x6E\x2D\x69\x6E\x66\x6F\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x63\x6F\x6C\x6F\x72\x3A\x20","\x20\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x30\x30\x25\x3B\x74\x65\x78\x74\x2D\x73\x68\x61\x64\x6F\x77\x3A\x20\x72\x67\x62\x28\x30\x2C\x20\x30\x2C\x20\x30\x29\x20\x30\x2E\x33\x70\x78\x20\x30\x2E\x33\x70\x78\x3B\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x20\x73\x6D\x61\x6C\x6C\x3B\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x30\x70\x78\x3B\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x62\x6C\x6F\x63\x6B\x3B\x62\x6F\x72\x64\x65\x72\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x75\x73\x65\x72\x2D\x64\x72\x61\x67\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x75\x73\x65\x72\x2D\x73\x65\x6C\x65\x63\x74\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x2D\x6D\x6F\x7A\x2D\x75\x73\x65\x72\x2D\x73\x65\x6C\x65\x63\x74\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x2D\x77\x65\x62\x6B\x69\x74\x2D\x75\x73\x65\x72\x2D\x64\x72\x61\x67\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x2D\x77\x65\x62\x6B\x69\x74\x2D\x75\x73\x65\x72\x2D\x73\x65\x6C\x65\x63\x74\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x2D\x6D\x73\x2D\x75\x73\x65\x72\x2D\x73\x65\x6C\x65\x63\x74\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x6C\x65\x66\x74\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x43\x6F\x70\x79\x20\x54\x6F\x6B\x65\x6E\x2F\x53\x49\x50\x2C\x20\x50\x61\x73\x73\x77\x6F\x72\x64\x2C\x20\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x2E\x2E\x2E\x22\x3E\x54\x4B\x26\x41\x4C\x4C\x3C\x2F\x61\x3E","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x64\x72\x6F\x70\x44\x6F\x77\x6E\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x68\x75\x64\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x20\x61\x62\x73\x6F\x6C\x75\x74\x65\x3B\x20\x70\x6F\x69\x6E\x74\x65\x72\x2D\x65\x76\x65\x6E\x74\x73\x3A\x20\x61\x75\x74\x6F\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x33\x33\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x33\x30\x70\x78\x3B\x20\x6C\x65\x66\x74\x3A\x20\x36\x37\x70\x78\x3B\x20\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x2D\x33\x30\x70\x78\x3B\x20\x62\x6F\x72\x64\x65\x72\x2D\x72\x61\x64\x69\x75\x73\x3A\x20\x30\x70\x78\x3B\x22\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x74\x65\x6D\x70\x43\x6F\x70\x79\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x3E","\x7B\x22\x65\x76\x65\x6E\x74\x22\x3A\x22\x63\x6F\x6D\x6D\x61\x6E\x64\x22\x2C\x22\x66\x75\x6E\x63\x22\x3A\x22","\x22\x2C\x22\x61\x72\x67\x73\x22\x3A\x22\x22\x7D","\x2A","\x70\x6F\x73\x74\x4D\x65\x73\x73\x61\x67\x65","\x63\x6F\x6E\x74\x65\x6E\x74\x57\x69\x6E\x64\x6F\x77","\x66\x61\x2D\x70\x61\x75\x73\x65\x2D\x63\x69\x72\x63\x6C\x65","\x66\x61\x2D\x70\x6C\x61\x79\x2D\x63\x69\x72\x63\x6C\x65","\x23\x70\x6C\x61\x79\x65\x72\x49","\x66\x69\x78\x54\x69\x74\x6C\x65","\x23\x64\x72\x6F\x70\x44\x6F\x77\x6E\x33","\x54\x6F\x6B\x65\x6E","\x23\x64\x72\x6F\x70\x44\x6F\x77\x6E\x32","\x23\x64\x72\x6F\x70\x44\x6F\x77\x6E","\x43\x6F\x70\x79","\x3C\x61\x20\x68\x72\x65\x66\x3D\x22\x23\x22\x20\x69\x64\x3D\x22\x6E\x6F\x74\x65\x73\x63\x6C\x65\x61\x72\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x63\x6F\x6C\x6F\x72\x3A\x20\x6C\x69\x67\x68\x74\x67\x72\x65\x79\x3B\x66\x6C\x6F\x61\x74\x3A\x20\x72\x69\x67\x68\x74\x3B\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x20\x61\x62\x73\x6F\x6C\x75\x74\x65\x3B\x72\x69\x67\x68\x74\x3A\x20\x31\x32\x70\x78\x3B\x74\x6F\x70\x3A\x20\x39\x70\x78\x3B\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x6D\x61\x69\x6E\x2D\x63\x6F\x6C\x6F\x72\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x24\x28\x27\x23\x6C\x6F\x67\x27\x29\x2E\x68\x74\x6D\x6C\x28\x27\x27\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x6C\x65\x66\x74\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x43\x6C\x65\x61\x72\x20\x6C\x69\x73\x74\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x74\x72\x61\x73\x68\x20\x66\x61\x2D\x32\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x61\x3E","\x23\x6C\x6F\x67\x54\x69\x74\x6C\x65","\x64\x69\x73\x61\x62\x6C\x65","\x23\x6C\x61\x73\x74\x49\x50\x42\x74\x6E","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x61\x67\x61\x72\x2E\x69\x6F\x2F\x3F\x72\x3D","\x26\x6D\x3D","\x26\x73\x65\x61\x72\x63\x68\x3D\x77\x73\x73\x3A\x2F\x2F","\x23\x63\x6F\x70\x79\x49\x50\x42\x74\x6E","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x61\x67\x61\x72\x2E\x69\x6F\x2F\x3F\x73\x69\x70\x3D","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x61\x67\x61\x72\x2E\x69\x6F\x2F\x70\x6C\x61\x79\x3F\x73\x69\x70\x3D","\x26\x3F\x70\x61\x73\x73\x3D","\x66\x6F\x63\x75\x73","\x23\x63\x6C\x6F\x73\x65\x42\x74\x6E","\x23\x30\x30\x30\x30\x36\x36","\x4E\x69\x63\x6B\x6E\x61\x6D\x65\x20\x72\x65\x73\x65\x72\x76\x65\x64\x20\x66\x6F\x72\x20\x3C\x66\x6F\x6E\x74\x20\x63\x6F\x6C\x6F\x72\x3D\x27\x79\x65\x6C\x6C\x6F\x77\x27\x3E\x3C\x62\x3E\x41\x6E\x69\x6D\x61\x74\x65\x64\x20\x53\x6B\x69\x6E\x73\x3C\x2F\x66\x6F\x6E\x74\x3E\x3C\x2F\x62\x3E","\x3A\x3C\x62\x72\x3E","\x45\x61\x73\x74\x65\x72\x45\x67\x67\x31","\x45\x61\x73\x74\x65\x72\x20\x45\x67\x67","\x45\x61\x73\x74\x65\x72\x45\x67\x67\x32","\x45\x61\x73\x74\x65\x72\x45\x67\x67\x33","\x2C\x3C\x62\x72\x3E","\x3C\x61\x20\x74\x61\x72\x67\x65\x74\x3D\x22\x5F\x62\x6C\x61\x6E\x6B\x22\x20\x68\x72\x65\x66\x3D\x22\x68\x74\x74\x70\x73\x3A\x2F\x2F\x67\x69\x74\x68\x75\x62\x2E\x63\x6F\x6D\x2F\x6A\x69\x6D\x62\x6F\x79\x33\x31\x30\x30\x22\x3E\x68\x74\x74\x70\x73\x3A\x2F\x2F\x67\x69\x74\x68\x75\x62\x2E\x63\x6F\x6D\x2F\x6A\x69\x6D\x62\x6F\x79\x33\x31\x30\x30\x3C\x2F\x61\x3E","\x56\x69\x64\x65\x6F","\x77\x68\x69\x63\x68","\x69\x6E\x70\x75\x74\x3A\x66\x6F\x63\x75\x73","\x70\x61\x73\x73\x3D","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x74\x61\x6C\x6B\x79\x2E\x69\x6F\x2F","\x39\x35\x2E\x35\x70\x78","\x31\x37\x31\x70\x78","\x23\x30\x30\x33\x33\x30\x30","\x2E\x62\x74\x6E\x2E\x62\x74\x6E\x2D\x62\x6C\x6F\x63\x6B\x2E\x62\x74\x6E\x2D\x73\x75\x63\x63\x65\x73\x73\x2E\x62\x74\x6E\x2D\x65\x78\x70\x6F\x72\x74","\x4E\x4F\x4E\x45","\x67\x65\x74\x44\x61\x74\x65","\x67\x65\x74\x4D\x6F\x6E\x74\x68","\x67\x65\x74\x46\x75\x6C\x6C\x59\x65\x61\x72","\x67\x65\x74\x48\x6F\x75\x72\x73","\x67\x65\x74\x4D\x69\x6E\x75\x74\x65\x73","\x50\x61\x72\x74\x79\x2D","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x41\x4E\x3F","\x41\x49\x44\x3D","\x26\x4E\x69\x63\x6B\x3D","\x26\x44\x61\x74\x65\x3D","\x26\x73\x69\x70\x3D","\x26\x70\x77\x64\x3D","\x26\x6D\x6F\x64\x65\x3D","\x26\x72\x65\x67\x69\x6F\x6E\x3D","\x26\x55\x49\x44\x3D","\x26\x6C\x61\x73\x74\x6E\x61\x6D\x65\x3D","\x26\x66\x69\x72\x73\x74\x6E\x61\x6D\x65\x3D","\x26\x6A\x6F\x69\x6E\x3D\x55\x72\x6C","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x6C\x6F\x61\x64\x65\x72\x49\x66\x72\x61\x6D\x65\x49\x6E\x66\x6F\x31\x22\x3E\x3C\x69\x66\x72\x61\x6D\x65\x20\x69\x64\x3D\x22\x6C\x6F\x61\x64\x65\x72\x49\x66\x72\x61\x6D\x65\x49\x6E\x66\x6F\x22\x20\x73\x72\x63\x20\x3D\x20","\x20\x6E\x61\x6D\x65\x3D\x22\x64\x65\x74\x61\x69\x6C\x65\x64\x69\x6E\x66\x6F\x22\x20\x61\x6C\x6C\x6F\x77\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x63\x79\x3D\x22\x74\x72\x75\x65\x22\x20\x73\x63\x72\x6F\x6C\x6C\x69\x6E\x67\x3D\x22\x6E\x6F\x22\x20\x66\x72\x61\x6D\x65\x42\x6F\x72\x64\x65\x72\x3D\x22\x30\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x77\x69\x64\x74\x68\x3A\x30\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x30\x25\x3B\x20\x62\x6F\x72\x64\x65\x72\x3A\x6E\x6F\x6E\x65\x3B\x22\x3E\x3C\x2F\x69\x66\x72\x61\x6D\x65\x3E\x3C\x2F\x64\x69\x76\x3E","\x23\x6C\x6F\x61\x64\x65\x72\x49\x66\x72\x61\x6D\x65\x49\x6E\x66\x6F\x31","\x46\x72\x65\x73\x6B\x69\x6E\x73\x4D\x61\x70","\x46\x72\x65\x65\x53\x6B\x69\x6E\x73","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x63\x6F\x6E\x66\x69\x67\x73\x2D\x77\x65\x62\x2E\x61\x67\x61\x72\x69\x6F\x2E\x6D\x69\x6E\x69\x63\x6C\x69\x70\x70\x74\x2E\x63\x6F\x6D\x2F\x6C\x69\x76\x65\x2F","\x61\x67\x61\x72\x76\x65\x72\x73\x69\x6F\x6E","\x69\x6D\x61\x67\x65","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x61\x67\x61\x72\x69\x6F\x2F\x6C\x69\x76\x65\x2F\x66\x6C\x61\x67\x73\x2F","\x2E\x70\x6E\x67","\x23\x6C\x6F\x61\x64\x65\x72\x49\x66\x72\x61\x6D\x65\x49\x6E\x66\x6F","\x54\x65\x6D\x70\x6F\x72\x61\x72\x69\x6C\x79\x20\x48\x69\x64\x65\x2F\x53\x68\x6F\x77\x20\x45\x76\x65\x72\x79\x74\x68\x69\x6E\x67\x2E\x20\x46\x75\x6E\x63\x74\x69\x6F\x6E\x20\x66\x6F\x72\x20\x59\x6F\x75\x74\x75\x62\x65\x72\x73","\x23\x73\x68\x6F\x72\x74\x63\x75\x74\x73\x2D\x68\x75\x64","\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x70\x75\x7A\x7A\x6C\x65\x2D\x70\x69\x65\x63\x65\x22\x3E\x3C\x2F\x69\x3E","\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x67\x61\x6D\x65\x70\x61\x64\x22\x3E\x3C\x2F\x69\x3E","\x2E\x69\x6E\x70\x75\x74\x2D\x67\x72\x6F\x75\x70\x2D\x61\x64\x64\x6F\x6E\x2C\x23\x63\x68\x61\x74\x2D\x62\x6F\x78\x2C\x20\x2E\x69\x6E\x70\x75\x74\x2D\x67\x72\x6F\x75\x70\x2D\x73\x6D\x3E\x2E\x69\x6E\x70\x75\x74\x2D\x67\x72\x6F\x75\x70\x2D\x61\x64\x64\x6F\x6E\x2C\x20\x2E\x61\x67\x61\x72\x69\x6F\x2D\x70\x61\x72\x74\x79\x2C\x20\x2E\x61\x67\x61\x72\x69\x6F\x2D\x73\x69\x64\x65\x2D\x70\x61\x6E\x65\x6C\x7B\x62\x6F\x72\x64\x65\x72\x2D\x72\x61\x64\x69\x75\x73\x3A\x20\x31\x30\x70\x78\x3B\x7D\x2E\x6D\x65\x6E\x75\x2D\x74\x61\x62\x73\x2C","\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x6D\x69\x6E\x75\x73\x22\x3E\x3C\x2F\x69\x3E","\x2E\x69\x6E\x70\x75\x74\x2D\x67\x72\x6F\x75\x70\x2D\x61\x64\x64\x6F\x6E\x2C\x23\x63\x68\x61\x74\x2D\x62\x6F\x78\x2C\x20\x2E\x69\x6E\x70\x75\x74\x2D\x67\x72\x6F\x75\x70\x2D\x73\x6D\x3E\x2E\x69\x6E\x70\x75\x74\x2D\x67\x72\x6F\x75\x70\x2D\x61\x64\x64\x6F\x6E\x2C\x20\x2E\x61\x67\x61\x72\x69\x6F\x2D\x70\x61\x72\x74\x79\x2C\x20\x2E\x61\x67\x61\x72\x69\x6F\x2D\x73\x69\x64\x65\x2D\x70\x61\x6E\x65\x6C\x2C\x20\x2E\x6D\x65\x6E\x75\x2D\x74\x61\x62\x73\x2C","\x23\x6D\x61\x69\x6E\x2D\x70\x61\x6E\x65\x6C\x2C\x20\x23\x70\x72\x6F\x66\x69\x6C\x65\x2C\x20\x23\x6C\x65\x67\x65\x6E\x64\x2C\x20\x23\x6F\x67\x2D\x73\x65\x74\x74\x69\x6E\x67\x73\x2C\x20\x23\x74\x68\x65\x6D\x65\x2C\x20\x23\x6D\x75\x73\x69\x63\x2C\x20\x23\x68\x6F\x74\x6B\x65\x79\x73\x2C\x20\x20\x23\x68\x6F\x74\x6B\x65\x79\x73\x2C\x20\x2E\x73\x6B\x69\x6E\x2C\x20\x2E\x69\x6E\x70\x75\x74\x2D\x67\x72\x6F\x75\x70\x2D\x62\x74\x6E\x2C\x20\x2E\x69\x6E\x70\x75\x74\x2D\x67\x72\x6F\x75\x70\x2E\x6E\x69\x63\x6B\x2C\x20\x20","\x2E\x63\x6F\x6C\x6F\x72\x70\x69\x63\x6B\x65\x72\x2D\x65\x6C\x65\x6D\x65\x6E\x74\x20\x2E\x69\x6E\x70\x75\x74\x2D\x67\x72\x6F\x75\x70\x2D\x61\x64\x64\x6F\x6E\x20\x69\x2C\x20\x2E\x63\x6F\x6C\x6F\x72\x70\x69\x63\x6B\x65\x72\x2D\x65\x6C\x65\x6D\x65\x6E\x74\x20\x2E\x61\x64\x64\x2D\x6F\x6E\x20\x69\x2C\x20\x2E\x61\x67\x61\x72\x69\x6F\x2D\x70\x72\x6F\x66\x69\x6C\x65\x2D\x70\x69\x63\x74\x75\x72\x65\x2C","\x23\x6D\x65\x6E\x75\x2D\x66\x6F\x6F\x74\x65\x72\x2C\x20\x23\x6C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x2D\x68\x75\x64\x2C\x20\x23\x64\x72\x6F\x70\x44\x6F\x77\x6E\x2C\x20\x23\x64\x72\x6F\x70\x44\x6F\x77\x6E\x32\x2C\x20\x23\x6D\x69\x6E\x69\x6D\x61\x70\x2D\x68\x75\x64\x2C","\x23\x74\x6F\x70\x35\x2D\x68\x75\x64\x2C\x20\x23\x74\x61\x72\x67\x65\x74\x2D\x68\x75\x64\x2C\x20\x23\x6C\x65\x67\x65\x6E\x64\x41\x64\x49\x6D\x67\x2C\x20\x23\x73\x74\x61\x74\x73\x2D\x68\x75\x64\x2C\x20","\x23\x74\x69\x6D\x65\x2D\x68\x75\x64\x20\x7B\x20\x62\x6F\x72\x64\x65\x72\x2D\x72\x61\x64\x69\x75\x73\x3A\x20\x30\x20\x30\x20\x30\x20\x30\x20\x7D\x20\x3C\x2F\x73\x74\x79\x6C\x65\x3E","\x3C\x73\x74\x79\x6C\x65\x20\x74\x79\x70\x65\x3D\x22\x74\x65\x78\x74\x2F\x63\x73\x73\x22\x20\x69\x64\x3D\x22\x4D\x47\x78\x22\x3E\x09","\x23\x74\x6F\x70\x35\x2D\x68\x75\x64\x7B\x74\x6F\x70\x3A\x31\x30\x70\x78\x21\x69\x6D\x70\x6F\x72\x74\x61\x6E\x74\x3B\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x3A\x6C\x69\x6E\x65\x61\x72\x2D\x67\x72\x61\x64\x69\x65\x6E\x74\x28\x74\x6F\x20\x72\x69\x67\x68\x74\x2C","\x23\x68\x75\x64\x43\x6F\x6C\x6F\x72","\x2C\x72\x67\x62\x61\x28\x32\x35\x35\x2C\x32\x35\x35\x2C\x32\x35\x35\x2C\x30\x29\x29\x7D","\x23\x6C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x2D\x68\x75\x64\x7B\x74\x6F\x70\x3A\x31\x30\x70\x78\x21\x69\x6D\x70\x6F\x72\x74\x61\x6E\x74\x3B\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x3A\x6C\x69\x6E\x65\x61\x72\x2D\x67\x72\x61\x64\x69\x65\x6E\x74\x28\x74\x6F\x20\x6C\x65\x66\x74\x2C","\x23\x63\x68\x61\x74\x2D\x62\x6F\x78\x7B\x69\x6D\x70\x6F\x72\x74\x61\x6E\x74\x3B\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x3A\x6C\x69\x6E\x65\x61\x72\x2D\x67\x72\x61\x64\x69\x65\x6E\x74\x28\x74\x6F\x20\x72\x69\x67\x68\x74\x2C","\x23\x6D\x69\x6E\x69\x6D\x61\x70\x2D\x68\x75\x64\x2C\x23\x74\x69\x6D\x65\x72\x74\x6F\x6F\x6C\x73\x2D\x68\x75\x64\x2C\x20\x23\x73\x68\x6F\x72\x74\x63\x75\x74\x73\x2D\x68\x75\x64\x2C\x20\x23\x74\x69\x6D\x65\x2D\x68\x75\x64\x2C\x23\x6D\x73\x67\x63\x6F\x6D\x6D\x61\x6E\x64\x73\x2D\x68\x75\x64\x2C\x20\x23\x73\x63\x72\x69\x70\x74\x69\x6E\x67\x2D\x68\x75\x64\x2C\x20\x23\x69\x6D\x61\x67\x65\x73\x2D\x68\x75\x64\x2C\x20\x23\x79\x74\x2D\x68\x75\x64\x7B\x69\x6D\x70\x6F\x72\x74\x61\x6E\x74\x3B\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x3A\x6C\x69\x6E\x65\x61\x72\x2D\x67\x72\x61\x64\x69\x65\x6E\x74\x28\x74\x6F\x20\x6C\x65\x66\x74\x2C","\x23\x74\x61\x72\x67\x65\x74\x2D\x68\x75\x64\x2C\x23\x74\x61\x72\x67\x65\x74\x2D\x70\x61\x6E\x65\x6C\x2D\x68\x75\x64\x20\x7B\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x3A\x6C\x69\x6E\x65\x61\x72\x2D\x67\x72\x61\x64\x69\x65\x6E\x74\x28\x74\x6F\x20\x62\x6F\x74\x74\x6F\x6D\x2C","\x23\x73\x74\x61\x74\x73\x2D\x68\x75\x64\x7B\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x3A\x6C\x69\x6E\x65\x61\x72\x2D\x67\x72\x61\x64\x69\x65\x6E\x74\x28\x74\x6F\x20\x74\x6F\x70\x2C","\x23\x73\x74\x61\x74\x73\x2D\x68\x75\x64\x7B\x6C\x65\x66\x74\x3A\x20\x35\x30\x25\x21\x69\x6D\x70\x6F\x72\x74\x61\x6E\x74\x3B\x20\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x20\x74\x72\x61\x6E\x73\x6C\x61\x74\x65\x58\x28\x2D\x35\x30\x25\x29\x21\x69\x6D\x70\x6F\x72\x74\x61\x6E\x74\x3B\x20\x74\x65\x78\x74\x2D\x61\x6C\x69\x67\x6E\x3A\x20\x63\x65\x6E\x74\x65\x72\x3B\x7D","\x2E\x68\x75\x64\x2D\x74\x6F\x70\x7B\x74\x6F\x70\x3A\x20\x39\x33\x25\x21\x69\x6D\x70\x6F\x72\x74\x61\x6E\x74\x3B\x7D","\x23\x63\x68\x61\x74\x2D\x62\x6F\x78\x7B\x62\x6F\x74\x74\x6F\x6D\x3A\x20\x32\x25\x21\x69\x6D\x70\x6F\x72\x74\x61\x6E\x74\x3B\x7D","\x3C\x2F\x73\x74\x79\x6C\x65\x3E","\x23\x4D\x47\x78","\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x67\x72\x61\x76\x22\x3E\x3C\x2F\x69\x3E","\x23\x74\x69\x6D\x65\x72\x74\x6F\x6F\x6C\x73\x2D\x68\x75\x64","\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x63\x61\x6C\x63\x75\x6C\x61\x74\x6F\x72\x22\x3E\x3C\x2F\x69\x3E","\x74\x69\x6D\x65\x72","\x23\x74\x69\x6D\x65\x2D\x68\x75\x64","\x23\x73\x74\x61\x74\x73\x2D\x68\x75\x64","\x23\x74\x61\x72\x67\x65\x74\x2D\x68\x75\x64","\x23\x74\x61\x72\x67\x65\x74\x2D\x70\x61\x6E\x65\x6C\x2D\x68\x75\x64","\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x65\x78\x63\x6C\x61\x6D\x61\x74\x69\x6F\x6E\x2D\x74\x72\x69\x61\x6E\x67\x6C\x65\x22\x3E\x3C\x2F\x69\x3E","\x23\x75\x73\x65\x72\x73\x63\x72\x69\x70\x74\x73","\x23\x4F\x70\x65\x6E\x75\x73\x65\x72\x53\x63\x72\x69\x70\x74\x73","\x3C\x64\x69\x76\x20\x63\x6C\x61\x73\x73\x3D\x22\x61\x67\x61\x72\x69\x6F\x2D\x70\x61\x6E\x65\x6C\x20\x6F\x67\x61\x72\x69\x6F\x2D\x79\x74\x2D\x70\x61\x6E\x65\x6C\x22\x3E\x3C\x68\x36\x20\x63\x6C\x61\x73\x73\x3D\x22\x6D\x65\x6E\x75\x2D\x6D\x61\x69\x6E\x2D\x63\x6F\x6C\x6F\x72\x22\x3E\x3C\x69\x3E\x3C\x2F\x69\x3E\x3C\x2F\x68\x36\x3E\x3C\x2F\x64\x69\x76\x3E","\x3C\x73\x70\x61\x6E\x20\x73\x74\x79\x6C\x65\x3D\x22\x66\x6C\x6F\x61\x74\x3A\x20\x6C\x65\x66\x74\x3B\x20\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x20\x31\x33\x70\x78\x3B\x22\x3E\x3C\x61\x20\x74\x61\x72\x67\x65\x74\x3D\x22\x5F\x62\x6C\x61\x6E\x6B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x67\x61\x28\x27\x73\x65\x6E\x64\x27\x2C\x20\x27\x65\x76\x65\x6E\x74\x27\x2C\x20\x27\x4C\x69\x6E\x6B\x27\x2C\x20\x27\x63\x6C\x69\x63\x6B\x27\x2C\x20\x27\x6C\x65\x67\x65\x6E\x64\x57\x65\x62\x73\x69\x74\x65\x27\x29\x3B\x22\x20\x68\x72\x65\x66\x3D\x22\x68\x74\x74\x70\x73\x3A\x2F\x2F\x77\x77\x77\x2E\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x66\x66\x66\x66\x66\x66\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x74\x69\x74\x6C\x65\x3D\x22\x57\x65\x62\x73\x69\x74\x65\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x6C\x65\x66\x74\x22\x3E\x76","\x3C\x2F\x61\x3E\x3C\x2F\x73\x70\x61\x6E\x3E\x3C\x73\x70\x61\x6E\x20\x73\x74\x79\x6C\x65\x3D\x22\x66\x6C\x6F\x61\x74\x3A\x20\x6C\x65\x66\x74\x3B\x20\x20\x6D\x61\x72\x67\x69\x6E\x2D\x6C\x65\x66\x74\x3A\x20\x38\x30\x70\x78\x3B\x20\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x20\x31\x33\x70\x78\x3B\x22\x3E\x3C\x61\x20\x69\x64\x3D\x22\x4D\x6F\x72\x65\x66\x70\x73\x54\x65\x78\x74\x22\x20\x68\x72\x65\x66\x3D\x22\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x3F\x6E\x61\x76\x3D\x46\x50\x53\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x74\x69\x74\x6C\x65\x3D\x22\x48\x6F\x77\x20\x74\x6F\x20\x69\x6D\x70\x72\x6F\x76\x65\x20\x70\x65\x72\x66\x6F\x72\x6D\x61\x6E\x63\x65\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x74\x6F\x70\x22\x20\x73\x74\x79\x6C\x65\x20\x3D\x22\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x20\x31\x33\x70\x78\x22\x3B\x20\x74\x61\x72\x67\x65\x74\x3D\x22\x5F\x62\x6C\x61\x6E\x6B\x22\x3E\x4D\x6F\x72\x65\x20\x46\x50\x53\x3C\x2F\x61\x3E\x3C\x2F\x73\x70\x61\x6E\x3E","\x3C\x73\x70\x61\x6E\x20\x73\x74\x79\x6C\x65\x3D\x22\x66\x6C\x6F\x61\x74\x3A\x20\x72\x69\x67\x68\x74\x3B\x20\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x20\x31\x33\x70\x78\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x31\x30\x70\x78\x3B\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x2D\x32\x70\x78\x22\x3E\x3C\x66\x6F\x72\x6D\x20\x69\x64\x3D\x22\x64\x6F\x6E\x61\x74\x69\x6F\x6E\x62\x74\x6E\x22\x20\x61\x63\x74\x69\x6F\x6E\x3D\x22\x68\x74\x74\x70\x73\x3A\x2F\x2F\x77\x77\x77\x2E\x70\x61\x79\x70\x61\x6C\x2E\x63\x6F\x6D\x2F\x63\x67\x69\x2D\x62\x69\x6E\x2F\x77\x65\x62\x73\x63\x72\x22\x20\x6D\x65\x74\x68\x6F\x64\x3D\x22\x70\x6F\x73\x74\x22\x20\x74\x61\x72\x67\x65\x74\x3D\x22\x5F\x74\x6F\x70\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x6C\x65\x66\x74\x22\x20\x74\x61\x72\x67\x65\x74\x3D\x22\x5F\x62\x6C\x61\x6E\x6B\x22\x3E\x3C\x69\x6E\x70\x75\x74\x20\x74\x79\x70\x65\x3D\x22\x68\x69\x64\x64\x65\x6E\x22\x20\x6E\x61\x6D\x65\x3D\x22\x63\x6D\x64\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x5F\x73\x2D\x78\x63\x6C\x69\x63\x6B\x22\x3E\x3C\x69\x6E\x70\x75\x74\x20\x74\x79\x70\x65\x3D\x22\x68\x69\x64\x64\x65\x6E\x22\x20\x6E\x61\x6D\x65\x3D\x22\x68\x6F\x73\x74\x65\x64\x5F\x62\x75\x74\x74\x6F\x6E\x5F\x69\x64\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x43\x4D\x33\x47\x44\x56\x43\x57\x36\x50\x42\x46\x36\x22\x3E\x3C\x69\x6E\x70\x75\x74\x20\x74\x79\x70\x65\x3D\x22\x69\x6D\x61\x67\x65\x22\x20\x73\x72\x63\x3D\x22\x68\x74\x74\x70\x73\x3A\x2F\x2F\x77\x77\x77\x2E\x70\x61\x79\x70\x61\x6C\x6F\x62\x6A\x65\x63\x74\x73\x2E\x63\x6F\x6D\x2F\x65\x6E\x5F\x55\x53\x2F\x69\x2F\x62\x74\x6E\x2F\x62\x74\x6E\x5F\x64\x6F\x6E\x61\x74\x65\x5F\x53\x4D\x2E\x67\x69\x66\x22\x20\x62\x6F\x72\x64\x65\x72\x3D\x22\x30\x22\x20\x6E\x61\x6D\x65\x3D\x22\x73\x75\x62\x6D\x69\x74\x22\x20\x61\x6C\x74\x3D\x22\x50\x61\x79\x50\x61\x6C\x20\x2D\x20\x54\x68\x65\x20\x73\x61\x66\x65\x72\x2C\x20\x65\x61\x73\x69\x65\x72\x20\x77\x61\x79\x20\x74\x6F\x20\x70\x61\x79\x20\x6F\x6E\x6C\x69\x6E\x65\x21\x22\x3E\x3C\x69\x6D\x67\x20\x61\x6C\x74\x3D\x22\x22\x20\x62\x6F\x72\x64\x65\x72\x3D\x22\x30\x22\x20\x73\x72\x63\x3D\x22\x68\x74\x74\x70\x73\x3A\x2F\x2F\x77\x77\x77\x2E\x70\x61\x79\x70\x61\x6C\x6F\x62\x6A\x65\x63\x74\x73\x2E\x63\x6F\x6D\x2F\x65\x6E\x5F\x55\x53\x2F\x69\x2F\x73\x63\x72\x2F\x70\x69\x78\x65\x6C\x2E\x67\x69\x66\x22\x20\x77\x69\x64\x74\x68\x3D\x22\x31\x22\x20\x68\x65\x69\x67\x68\x74\x3D\x22\x31\x22\x3E\x3C\x2F\x66\x6F\x72\x6D\x3E\x3C\x2F\x73\x70\x61\x6E\x3E","\x23\x54\x69\x6D\x65\x73\x55\x73\x65\x64","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x53\x4E\x45\x5A\x4F\x67\x61\x72\x55\x70\x6C\x6F\x61\x64\x42\x74\x6E\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x53\x4E\x45\x5A\x4F\x67\x61\x72\x55\x70\x6C\x6F\x61\x64\x28\x29\x3B\x20\x72\x65\x74\x75\x72\x6E\x20\x66\x61\x6C\x73\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x72\x69\x67\x68\x74\x3A\x20\x32\x35\x70\x78\x3B\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x73\x75\x63\x63\x65\x73\x73\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x22\x20\x74\x69\x74\x6C\x65\x3D\x22\x22\x3E","\x23\x63\x6C\x6F\x73\x65\x2D\x65\x78\x70\x2D\x69\x6D\x70","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x53\x4E\x45\x5A\x4F\x67\x61\x72\x44\x6F\x77\x6E\x6C\x6F\x61\x64\x42\x74\x6E\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x53\x4E\x45\x5A\x4F\x67\x61\x72\x44\x6F\x77\x6E\x6C\x6F\x61\x64\x28\x29\x3B\x20\x72\x65\x74\x75\x72\x6E\x20\x66\x61\x6C\x73\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x72\x69\x67\x68\x74\x3A\x20\x32\x35\x70\x78\x3B\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x73\x75\x63\x63\x65\x73\x73\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x22\x20\x74\x69\x74\x6C\x65\x3D\x22\x22\x3E","\x3C\x62\x72\x3E\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x55\x73\x65\x72\x50\x72\x6F\x66\x69\x6C\x65\x55\x49\x44\x32\x22\x3E\x53\x6F\x63\x69\x61\x6C\x20\x49\x44\x3A\x20\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x55\x73\x65\x72\x50\x72\x6F\x66\x69\x6C\x65\x49\x44\x32\x61\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x75\x73\x65\x72\x2D\x6E\x61\x6D\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x64\x69\x73\x70\x6C\x61\x79\x3A\x69\x6E\x6C\x69\x6E\x65\x2D\x62\x6C\x6F\x63\x6B\x22\x3E\x3C\x2F\x64\x69\x76\x3E","\x5B\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x5D","\x44\x4F\x4D\x4E\x6F\x64\x65\x49\x6E\x73\x65\x72\x74\x65\x64","\x6C\x61\x73\x74","\x2E\x6D\x65\x73\x73\x61\x67\x65\x2D\x6E\x69\x63\x6B","\x44\x4F\x4D\x53\x75\x62\x74\x72\x65\x65\x4D\x6F\x64\x69\x66\x69\x65\x64","\x53\x65\x72\x76\x65\x72\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64\x21","\x4E\x6F\x54\x65\x78\x74","\x2E\x6C\x6F\x67\x45\x6E\x74\x72\x79","\x50\x6C\x61\x79\x65\x72\x20\x3C\x66\x6F\x6E\x74\x20\x63\x6F\x6C\x6F\x72\x3D\x27\x79\x65\x6C\x6C\x6F\x77\x27\x3E","\x2E\x6C\x6F\x67\x45\x6E\x74\x72\x79\x3E\x23\x70\x6C\x61\x79\x65\x72\x69\x6E\x66\x6F","\x3C\x2F\x66\x6F\x6E\x74\x3E\x20\x63\x6F\x6E\x74\x61\x69\x6E\x73\x20\x3C\x66\x6F\x6E\x74\x20\x63\x6F\x6C\x6F\x72\x3D\x27\x79\x65\x6C\x6C\x6F\x77\x27\x3E","\x21\x3C\x2F\x66\x6F\x6E\x74\x3E\x2E\x20\x43\x6F\x6E\x6E\x65\x63\x74\x65\x64\x20\x69\x6E\x74\x6F\x20\x53\x65\x72\x76\x65\x72","\x61\x75\x74\x6F\x50\x6C\x61\x79","\x4C\x4D\x20\x41\x75\x74\x6F\x70\x6C\x61\x79","\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x35","\x76\x69\x64\x65\x6F\x53\x6B\x69\x6E\x73","\x6A\x65\x6C\x6C\x79\x50\x68\x69\x73\x79\x63\x73","\x72\x61\x69\x6E\x62\x6F\x77\x46\x6F\x6F\x64","\x76\x69\x72\x75\x73\x47\x6C\x6F\x77","\x62\x6F\x72\x64\x65\x72\x47\x6C\x6F\x77","\x73\x68\x6F\x77\x42\x67\x53\x65\x63\x74\x6F\x72\x73","\x73\x68\x6F\x77\x4D\x61\x70\x42\x6F\x72\x64\x65\x72\x73","\x73\x68\x6F\x77\x4D\x69\x6E\x69\x4D\x61\x70\x47\x68\x6F\x73\x74\x43\x65\x6C\x6C\x73","\x73\x68\x6F\x77\x45\x78\x74\x72\x61\x4D\x69\x6E\x69\x4D\x61\x70\x47\x75\x69\x64\x65\x73","\x6F\x70\x70\x43\x6F\x6C\x6F\x72\x73","\x6F\x70\x70\x52\x69\x6E\x67\x73","\x76\x69\x72\x43\x6F\x6C\x6F\x72\x73","\x73\x70\x6C\x69\x74\x52\x61\x6E\x67\x65","\x76\x69\x72\x75\x73\x65\x73\x52\x61\x6E\x67\x65","\x74\x65\x61\x6D\x6D\x61\x74\x65\x73\x49\x6E\x64","\x73\x68\x6F\x77\x47\x68\x6F\x73\x74\x43\x65\x6C\x6C\x73","\x73\x68\x6F\x77\x47\x68\x6F\x73\x74\x43\x65\x6C\x6C\x73\x49\x6E\x66\x6F","\x73\x68\x6F\x77\x43\x68\x61\x74\x49\x6D\x61\x67\x65\x73","\x73\x68\x6F\x77\x43\x68\x61\x74\x56\x69\x64\x65\x6F\x73","\x63\x68\x61\x74\x53\x6F\x75\x6E\x64\x73","\x73\x70\x61\x77\x6E\x73\x70\x65\x63\x69\x61\x6C\x65\x66\x66\x65\x63\x74\x73","\x61\x75\x74\x6F\x52\x65\x73\x70","\x65\x71","\x2E\x6C\x6F\x67\x45\x6E\x74\x72\x79\x3E\x23\x72\x65\x67\x69\x6F\x6E\x69\x6E\x66\x6F","\x2E\x6C\x6F\x67\x45\x6E\x74\x72\x79\x3E\x23\x6D\x6F\x64\x65\x69\x6E\x66\x6F","\x6F\x70\x74\x69\x6F\x6E","\x66\x69\x6E\x64","\x3A\x62\x61\x74\x74\x6C\x65\x72\x6F\x79\x61\x6C\x65","\x20\x70\x6C\x61\x79\x65\x72\x28\x73\x29\x20\x77\x69\x73\x70\x65\x72\x65\x64\x20\x69\x74\x20\x69\x73\x3A","\x20\x70\x6C\x61\x79\x65\x72\x28\x73\x29\x20\x77\x69\x73\x70\x65\x72\x65\x64\x20\x69\x74\x20\x69\x73","\x3C\x66\x6F\x6E\x74\x20\x63\x6F\x6C\x6F\x72\x3D\x27\x79\x65\x6C\x6C\x6F\x77\x27\x3E\x42\x65\x73\x74\x20\x63\x68\x6F\x69\x63\x65\x3A\x20\x52\x65\x67\x69\x6F\x6E\x3A","\x2C\x20\x4D\x6F\x64\x65","\x3C\x2F\x66\x6F\x6E\x74\x3E\x3C\x62\x72\x3E","\x49\x6E\x66\x6F\x72\x6D\x61\x74\x69\x6F\x6E\x20\x63\x68\x61\x6E\x67\x65\x64\x21","\x72\x65\x67\x69\x6F\x6E","\x6D\x75\x73\x69\x63\x46\x72\x61\x6D\x65","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x4C\x4D\x65\x78\x70\x72\x65\x73\x73\x2F\x6F\x6C\x64\x64\x65\x61\x6C\x73\x2E\x6A\x73","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x4C\x4D\x65\x78\x70\x72\x65\x73\x73\x2F\x73\x68\x6F\x70\x2F\x73\x68\x6F\x70\x2E\x6A\x73","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x4C\x4D\x65\x78\x70\x72\x65\x73\x73\x2F\x72\x65\x70\x6C\x61\x79\x2E\x6A\x73","\x67\x65\x74\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79\x4E\x61\x6D\x65\x73","\x61\x67\x61\x72\x76\x65\x72\x73\x69\x6F\x6E\x44\x65\x73\x74\x69\x6E\x61\x74\x69\x6F\x6E\x46\x6F\x75\x6E\x64","\x61\x67\x61\x72\x76\x65\x72\x73\x69\x6F\x6E\x44\x65\x73\x74\x69\x6E\x61\x74\x69\x6F\x6E\x73","\x4C\x4D\x43\x6F\x6E\x66\x69\x67\x56\x65\x72\x73\x69\x6F\x6E","\x4C\x4D\x43\x6F\x6E\x66\x69\x67\x56\x65\x72\x73\x69\x6F\x6E\x50\x61\x73\x73","\x66\x75\x6E\x63\x74\x69\x6F\x6E","\x6F\x62\x6A\x65\x63\x74","\x62\x61\x6E\x6E\x65\x64\x55\x49\x44","\x48\x53\x4C\x4F\x5B\x53\x61\x69\x67\x6F\x5D\x3A\x73\x65\x74\x74\x69\x6E\x67\x73","\x6C\x62\x54\x65\x61\x6D\x6D\x61\x74\x65\x43\x6F\x6C\x6F\x72","\x59\x6F\x75\x20\x61\x72\x65\x20\x62\x61\x6E\x6E\x65\x64\x20\x66\x72\x6F\x6D\x20\x4C\x65\x67\x65\x6E\x64\x20\x6D\x6F\x64","\x20\x3C\x62\x72\x3E\x3C\x61\x20\x74\x61\x72\x67\x65\x74\x3D\x22\x5F\x62\x6C\x61\x6E\x6B\x22\x20\x68\x72\x65\x66\x3D\x22\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x22\x3E\x3C\x66\x6F\x6E\x74\x20\x63\x6F\x6C\x6F\x72\x3D\x22\x62\x6C\x75\x65\x22\x3E\x3C\x62\x3E\x3C\x75\x3E\x77\x77\x77\x2E\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x3C\x2F\x75\x3E\x3C\x2F\x62\x3E\x3C\x2F\x66\x6F\x6E\x74\x3E\x3C\x2F\x61\x3E\x3C\x62\x72\x3E","\x53\x63\x72\x69\x70\x74\x20\x54\x65\x72\x6D\x69\x6E\x61\x74\x65\x64","\x4C\x4D\x41\x67\x61\x72\x42\x61\x6E\x6E\x65\x64\x55\x49\x44\x73","\x4C\x4D\x41\x67\x61\x72\x42\x61\x6E\x6E\x65\x64\x55\x49\x44\x73\x50\x61\x73\x73","\x62\x61\x6E\x6E\x65\x64\x55\x73\x65\x72\x55\x49\x44\x73","\x41\x67\x61\x72\x42\x61\x6E\x6E\x65\x64\x55\x49\x44\x73\x41\x64\x64\x65\x64","\x2D","\x73\x70\x6C\x69\x63\x65","\x3C\x64\x69\x76\x20\x63\x6C\x61\x73\x73\x3D\x22\x6D\x6F\x64\x61\x6C\x20\x66\x61\x64\x65\x20\x69\x6E\x22\x20\x69\x64\x3D\x22\x42\x61\x6E\x6E\x65\x64\x55\x49\x44\x53\x4D\x6F\x64\x61\x6C\x22\x20\x61\x72\x69\x61\x2D\x68\x69\x64\x64\x65\x6E\x3D\x22\x66\x61\x6C\x73\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x62\x6C\x6F\x63\x6B\x3B\x22\x3E","\x3C\x64\x69\x76\x20\x63\x6C\x61\x73\x73\x3D\x22\x6D\x6F\x64\x61\x6C\x2D\x62\x61\x63\x6B\x64\x72\x6F\x70\x20\x66\x61\x64\x65\x20\x69\x6E\x22\x3E\x3C\x2F\x64\x69\x76\x3E","\x3C\x64\x69\x76\x20\x63\x6C\x61\x73\x73\x3D\x22\x6D\x6F\x64\x61\x6C\x2D\x64\x69\x61\x6C\x6F\x67\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x74\x6F\x70\x3A\x20\x63\x61\x6C\x63\x28\x35\x30\x76\x68\x20\x2D\x20\x32\x34\x31\x2E\x35\x70\x78\x29\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x35\x30\x30\x70\x78\x3B\x22\x3E","\x3C\x64\x69\x76\x20\x63\x6C\x61\x73\x73\x3D\x22\x6D\x6F\x64\x61\x6C\x2D\x63\x6F\x6E\x74\x65\x6E\x74\x22\x3E","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x43\x6C\x6F\x73\x65\x42\x61\x6E\x6E\x65\x64\x55\x49\x44\x53\x32\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x6D\x6F\x64\x61\x6C\x2D\x68\x65\x61\x64\x65\x72\x22\x3E\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x43\x6C\x6F\x73\x65\x42\x61\x6E\x6E\x65\x64\x55\x49\x44\x53\x22\x20\x74\x79\x70\x65\x3D\x22\x62\x75\x74\x74\x6F\x6E\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x63\x6C\x6F\x73\x65\x22\x20\x64\x61\x74\x61\x2D\x64\x69\x73\x6D\x69\x73\x73\x3D\x22\x6D\x6F\x64\x61\x6C\x22\x3E\x3C\x73\x70\x61\x6E\x20\x61\x72\x69\x61\x2D\x68\x69\x64\x64\x65\x6E\x3D\x22\x74\x72\x75\x65\x22\x3E\xD7\x3C\x2F\x73\x70\x61\x6E\x3E\x3C\x73\x70\x61\x6E\x20\x63\x6C\x61\x73\x73\x3D\x22\x73\x72\x2D\x6F\x6E\x6C\x79\x22\x3E","\x3C\x2F\x73\x70\x61\x6E\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E\x20\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x46\x41\x51\x42\x61\x6E\x6E\x65\x64\x55\x49\x44\x53\x22\x20\x74\x79\x70\x65\x3D\x22\x62\x75\x74\x74\x6F\x6E\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x63\x6C\x6F\x73\x65\x22\x20\x64\x61\x74\x61\x2D\x64\x69\x73\x6D\x69\x73\x73\x3D\x22\x6D\x6F\x64\x61\x6C\x22\x3E\x3C\x73\x70\x61\x6E\x20\x61\x72\x69\x61\x2D\x68\x69\x64\x64\x65\x6E\x3D\x22\x74\x72\x75\x65\x22\x3E\x3F\x3C\x2F\x73\x70\x61\x6E\x3E\x3C\x73\x70\x61\x6E\x20\x63\x6C\x61\x73\x73\x3D\x22\x73\x72\x2D\x6F\x6E\x6C\x79\x22\x3E","\x3C\x2F\x73\x70\x61\x6E\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x68\x34\x20\x63\x6C\x61\x73\x73\x3D\x22\x6D\x6F\x64\x61\x6C\x2D\x74\x69\x74\x6C\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x66\x6F\x6E\x74\x2D\x66\x61\x6D\x69\x6C\x79\x3A\x20\x52\x6F\x62\x6F\x74\x6F\x20\x43\x6F\x6E\x64\x65\x6E\x73\x65\x64\x2C\x20\x73\x61\x6E\x73\x2D\x73\x65\x72\x69\x66\x22\x3E","\x42\x61\x6E\x6E\x65\x64\x20\x55\x73\x65\x72\x20\x49\x44\x73","\x3C\x2F\x68\x34\x3E","\x3C\x64\x69\x76\x20\x63\x6C\x61\x73\x73\x3D\x22\x6D\x6F\x64\x61\x6C\x2D\x62\x6F\x64\x79\x22\x3E\x3C\x69\x6E\x70\x75\x74\x20\x74\x79\x70\x65\x3D\x22\x74\x65\x78\x74\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x69\x64\x3D\x22\x42\x61\x6E\x6E\x65\x64\x61\x67\x61\x72\x69\x6F\x5F\x75\x69\x64\x5F\x69\x6E\x70\x75\x74\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x2A\x55\x49\x44\x20\x28","\x74\x6F\x20\x62\x65\x20\x62\x61\x6E\x6E\x65\x64","\x29\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x77\x69\x64\x74\x68\x3A\x20\x38\x35\x25\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x69\x6E\x6C\x69\x6E\x65\x2D\x62\x6C\x6F\x63\x6B\x22\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x41\x64\x64\x42\x61\x6E\x6E\x65\x64\x55\x49\x44\x22\x20\x74\x79\x70\x65\x3D\x22\x73\x75\x62\x6D\x69\x74\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x70\x72\x69\x6D\x61\x72\x79\x20\x62\x74\x6E\x20\x32\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x62\x6C\x6F\x63\x6B\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x32\x30\x25\x3B\x20\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x34\x70\x78\x20\x30\x70\x78\x20\x36\x70\x78\x3B\x20\x74\x65\x78\x74\x2D\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x20\x63\x61\x70\x69\x74\x61\x6C\x69\x7A\x65\x3B\x22\x3E\x41\x64\x64\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x72\x3E\x3C\x63\x6F\x6C\x6F\x72\x3D\x22\x72\x65\x64\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x64\x69\x73\x70\x6C\x61\x79\x3A\x69\x6E\x6C\x69\x6E\x65\x22\x3E\x20","\x3C\x62\x3E\x42\x61\x6E\x6E\x65\x64\x20\x55\x49\x44\x73\x3A\x3C\x2F\x62\x3E","\x3C\x2F\x63\x6F\x6C\x6F\x72\x3E","\x3C\x62\x72\x3E\x3C\x62\x72\x3E","\x3C\x73\x65\x6C\x65\x63\x74\x20\x69\x64\x3D\x22\x73\x73\x2D\x73\x65\x6C\x65\x63\x74\x2D\x42\x61\x6E\x6E\x65\x64\x55\x49\x44\x53\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x72\x65\x71\x75\x69\x72\x65\x64\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x64\x69\x73\x70\x6C\x61\x79\x3A\x69\x6E\x6C\x69\x6E\x65\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x38\x30\x25\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x2D\x33\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x73\x65\x6C\x65\x63\x74\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x52\x65\x6D\x6F\x76\x65\x42\x61\x6E\x6E\x65\x64\x55\x49\x44\x22\x20\x74\x79\x70\x65\x3D\x22\x73\x75\x62\x6D\x69\x74\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x70\x72\x69\x6D\x61\x72\x79\x20\x62\x74\x6E\x20\x32\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x62\x6C\x6F\x63\x6B\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x32\x30\x25\x3B\x20\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x34\x70\x78\x20\x30\x70\x78\x20\x36\x70\x78\x3B\x20\x74\x65\x78\x74\x2D\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x20\x63\x61\x70\x69\x74\x61\x6C\x69\x7A\x65\x3B\x22\x3E\x52\x65\x6D\x6F\x76\x65\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x70\x20\x63\x6C\x61\x73\x73\x3D\x22\x61\x6C\x65\x72\x74\x2D\x77\x61\x72\x6E\x69\x6E\x67\x20\x74\x65\x78\x74\x2D\x63\x65\x6E\x74\x65\x72\x22\x3E","\x50\x6C\x65\x61\x73\x65\x20\x62\x65\x20\x63\x61\x72\x65\x66\x75\x6C\x20\x77\x69\x74\x68\x20\x74\x68\x65\x20\x55\x49\x44\x73\x2E","\x3C\x62\x72\x3E\x59\x6F\x75\x72\x20\x55\x49\x44\x20\x69\x73\x3A\x20\x3C\x73\x70\x61\x6E\x20\x63\x6C\x61\x73\x73\x3D\x22\x61\x6C\x65\x72\x74\x2D\x73\x75\x63\x63\x65\x73\x73\x22\x20\x69\x64\x3D\x22\x65\x78\x70\x2D\x75\x69\x64\x22\x3E","\x3C\x2F\x73\x70\x61\x6E\x3E\x3C\x2F\x70\x3E","\x23\x42\x61\x6E\x6E\x65\x64\x55\x49\x44\x53\x4D\x6F\x64\x61\x6C","\x23\x43\x6C\x6F\x73\x65\x42\x61\x6E\x6E\x65\x64\x55\x49\x44\x53","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x4C\x4D\x65\x78\x70\x72\x65\x73\x73\x2F\x6F\x6C\x64\x64\x65\x61\x6C\x73\x2E\x68\x74\x6D\x6C","\x23\x46\x41\x51\x42\x61\x6E\x6E\x65\x64\x55\x49\x44\x53","\x23\x42\x61\x6E\x6E\x65\x64\x61\x67\x61\x72\x69\x6F\x5F\x75\x69\x64\x5F\x69\x6E\x70\x75\x74","\x6F\x70\x74\x69\x6F\x6E\x73","\x73\x73\x2D\x73\x65\x6C\x65\x63\x74\x2D\x42\x61\x6E\x6E\x65\x64\x55\x49\x44\x53","\x55\x49\x44\x3A\x20","\x20\x73\x75\x63\x63\x65\x73\x73\x66\x75\x6C\x6C\x79\x20\x61\x64\x64\x65\x64\x20\x6F\x6E\x20\x55\x49\x44\x20\x42\x41\x4E\x20\x6C\x69\x73\x74","\x20\x73\x65\x65\x6D\x73\x20\x6D\x69\x73\x74\x61\x6B\x65\x6E\x20\x6F\x72\x20\x69\x73\x20\x61\x6C\x72\x65\x61\x64\x79\x20\x6F\x6E\x20\x74\x68\x65\x20\x6C\x69\x73\x74","\x23\x41\x64\x64\x42\x61\x6E\x6E\x65\x64\x55\x49\x44","\x23\x73\x73\x2D\x73\x65\x6C\x65\x63\x74\x2D\x42\x61\x6E\x6E\x65\x64\x55\x49\x44\x53","\x73\x65\x6C\x65\x63\x74\x65\x64\x49\x6E\x64\x65\x78","\x20\x73\x75\x63\x63\x65\x73\x73\x66\x75\x6C\x6C\x79\x20\x72\x65\x6D\x6F\x76\x65\x64\x20\x66\x72\x6F\x6D\x20\x55\x49\x44\x20\x42\x41\x4E\x20\x6C\x69\x73\x74","\x23\x52\x65\x6D\x6F\x76\x65\x42\x61\x6E\x6E\x65\x64\x55\x49\x44","\x50\x6C\x65\x61\x73\x65\x20\x70\x6C\x61\x79\x20\x74\x68\x65\x20\x67\x61\x6D\x65\x20\x62\x65\x66\x6F\x72\x65\x20\x79\x6F\x75\x20\x63\x61\x6E\x20\x75\x73\x65\x20\x74\x68\x61\x74\x20\x66\x65\x61\x74\x75\x72\x65","\x59\x6F\x75\x20\x64\x6F\x20\x6E\x6F\x74\x20\x6E\x61\x6D\x65\x20\x74\x68\x65\x20\x61\x75\x74\x68\x6F\x72\x69\x74\x79","\x6C\x61\x6E\x67\x75\x61\x67\x65\x73","\x6E\x61\x76\x69\x67\x61\x74\x6F\x72","\x65\x6E","\x73\x68\x6F\x77\x43\x68\x61\x74\x54\x72\x61\x6E\x73\x6C\x61\x74\x69\x6F\x6E","\x63\x6F\x6E\x74\x61\x69\x6E\x73","\x63\x6C\x61\x73\x73\x4C\x69\x73\x74","\x6C\x61\x73\x74\x43\x68\x69\x6C\x64","\x74\x65\x78\x74\x43\x6F\x6E\x74\x65\x6E\x74","\x66\x69\x72\x73\x74\x43\x68\x69\x6C\x64","\x64\x65\x65\x70\x73\x6B\x79\x62\x6C\x75\x65","\x74\x65\x78\x74\x53\x68\x61\x64\x6F\x77","\x31\x70\x78\x20\x31\x70\x78\x20\x31\x70\x78\x20\x77\x68\x69\x74\x65","\x47\x65\x74","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x74\x72\x61\x6E\x73\x6C\x61\x74\x65\x2E\x79\x61\x6E\x64\x65\x78\x2E\x6E\x65\x74\x2F\x61\x70\x69\x2F\x76\x31\x2E\x35\x2F\x74\x72\x2E\x6A\x73\x6F\x6E\x2F\x74\x72\x61\x6E\x73\x6C\x61\x74\x65\x3F\x6B\x65\x79\x3D\x74\x72\x6E\x73\x6C\x2E\x31\x2E\x31\x2E\x32\x30\x31\x39\x30\x34\x31\x33\x54\x31\x33\x33\x32\x33\x34\x5A\x2E\x65\x32\x62\x66\x38\x66\x36\x31\x64\x62\x38\x30\x35\x64\x32\x36\x2E\x31\x64\x63\x33\x33\x31\x62\x33\x33\x64\x31\x35\x36\x65\x34\x33\x36\x37\x39\x61\x31\x39\x33\x35\x37\x64\x31\x35\x64\x39\x65\x65\x36\x36\x34\x35\x30\x32\x64\x65\x26\x74\x65\x78\x74\x3D","\x26\x6C\x61\x6E\x67\x3D","\x26\x66\x6F\x72\x6D\x61\x74\x3D\x70\x6C\x61\x69\x6E\x26\x6F\x70\x74\x69\x6F\x6E\x73\x3D\x31","\x6F\x6E\x72\x65\x61\x64\x79\x73\x74\x61\x74\x65\x63\x68\x61\x6E\x67\x65","\x73\x74\x61\x74\x75\x73","\x72\x65\x73\x70\x6F\x6E\x73\x65\x54\x65\x78\x74","\x75\x6C\x74\x72\x61","\x73\x6F\x70\x68\x69\x73\x74\x69\x63\x61\x74\x65\x64","\x6F\x67\x61\x72\x69\x6F\x53\x65\x74\x74\x69\x6E\x67\x73","\x73\x61\x76\x65\x53\x65\x74\x74\x69\x6E\x67\x73","\x3C\x64\x69\x76\x20\x63\x6C\x61\x73\x73\x3D\x22\x6D\x6F\x64\x61\x6C\x20\x66\x61\x64\x65\x20\x69\x6E\x22\x20\x69\x64\x3D\x22\x4C\x4D\x50\x72\x6F\x6D\x6F\x22\x20\x61\x72\x69\x61\x2D\x68\x69\x64\x64\x65\x6E\x3D\x22\x66\x61\x6C\x73\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x62\x6C\x6F\x63\x6B\x3B\x22\x3E","\x3C\x64\x69\x76\x20\x63\x6C\x61\x73\x73\x3D\x22\x6D\x6F\x64\x61\x6C\x2D\x64\x69\x61\x6C\x6F\x67\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x74\x6F\x70\x3A\x20\x63\x61\x6C\x63\x28\x35\x30\x76\x68\x20\x2D\x20\x32\x34\x31\x2E\x35\x70\x78\x29\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x39\x32\x32\x70\x78\x3B\x22\x3E","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x43\x6C\x6F\x73\x65\x4C\x4D\x50\x72\x6F\x6D\x6F\x32\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x6D\x6F\x64\x61\x6C\x2D\x68\x65\x61\x64\x65\x72\x22\x3E\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x43\x6C\x6F\x73\x65\x4C\x4D\x50\x72\x6F\x6D\x6F\x22\x20\x74\x79\x70\x65\x3D\x22\x62\x75\x74\x74\x6F\x6E\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x63\x6C\x6F\x73\x65\x22\x20\x64\x61\x74\x61\x2D\x64\x69\x73\x6D\x69\x73\x73\x3D\x22\x6D\x6F\x64\x61\x6C\x22\x3E\x3C\x73\x70\x61\x6E\x20\x61\x72\x69\x61\x2D\x68\x69\x64\x64\x65\x6E\x3D\x22\x74\x72\x75\x65\x22\x3E\xD7\x3C\x2F\x73\x70\x61\x6E\x3E\x3C\x73\x70\x61\x6E\x20\x63\x6C\x61\x73\x73\x3D\x22\x73\x72\x2D\x6F\x6E\x6C\x79\x22\x3E","\x3C\x2F\x73\x70\x61\x6E\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E\x20\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x46\x41\x51\x4C\x4D\x50\x72\x6F\x6D\x6F\x22\x20\x74\x79\x70\x65\x3D\x22\x62\x75\x74\x74\x6F\x6E\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x63\x6C\x6F\x73\x65\x22\x20\x64\x61\x74\x61\x2D\x64\x69\x73\x6D\x69\x73\x73\x3D\x22\x6D\x6F\x64\x61\x6C\x22\x3E\x3C\x73\x70\x61\x6E\x20\x61\x72\x69\x61\x2D\x68\x69\x64\x64\x65\x6E\x3D\x22\x74\x72\x75\x65\x22\x3E\x3F\x3C\x2F\x73\x70\x61\x6E\x3E\x3C\x73\x70\x61\x6E\x20\x63\x6C\x61\x73\x73\x3D\x22\x73\x72\x2D\x6F\x6E\x6C\x79\x22\x3E","\x52\x65\x77\x61\x72\x64\x20\x44\x61\x79","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x4C\x4D\x61\x64\x76\x65\x72\x74\x69\x73\x65\x6D\x65\x6E\x74\x33\x22\x3E\x3C\x69\x66\x72\x61\x6D\x65\x20\x69\x64\x3D\x22\x63\x75\x73\x74\x6F\x6D\x73\x6B\x69\x6E\x73\x49\x66\x72\x61\x6D\x65\x32\x22\x20\x73\x72\x63\x3D\x22\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x65\x78\x74\x72\x61\x73\x2F\x72\x65\x77\x61\x72\x64\x64\x61\x79\x2E\x68\x74\x6D\x6C\x22\x20\x77\x69\x64\x74\x68\x3D\x22\x39\x32\x30\x22\x20\x68\x65\x69\x67\x68\x74\x3D\x22\x35\x35\x30\x22\x20\x3E","\x2E\x6D\x6F\x64\x61\x6C\x2D\x64\x69\x61\x6C\x6F\x67","\x23\x4C\x4D\x50\x72\x6F\x6D\x6F","\x23\x43\x6C\x6F\x73\x65\x4C\x4D\x50\x72\x6F\x6D\x6F","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F","\x23\x46\x41\x51\x4C\x4D\x50\x72\x6F\x6D\x6F","\x56\x69\x64\x65\x6F\x20\x53\x6B\x69\x6E\x20\x50\x72\x6F\x6D\x6F","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x4C\x4D\x61\x64\x76\x65\x72\x74\x69\x73\x65\x6D\x65\x6E\x74\x33\x22\x3E\x3C\x69\x66\x72\x61\x6D\x65\x20\x69\x64\x3D\x22\x63\x75\x73\x74\x6F\x6D\x73\x6B\x69\x6E\x73\x49\x66\x72\x61\x6D\x65\x32\x22\x20\x73\x72\x63\x3D\x22\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x64\x65\x76\x65\x6C\x6F\x70\x65\x72\x73\x2F\x76\x69\x64\x65\x6F\x73\x6B\x69\x6E\x73\x2E\x68\x74\x6D\x6C\x22\x20\x77\x69\x64\x74\x68\x3D\x22\x39\x32\x30\x22\x20\x68\x65\x69\x67\x68\x74\x3D\x22\x35\x35\x30\x22\x20\x3E","\x44\x75\x65\x20\x74\x6F\x20\x73\x70\x61\x6D\x6D\x69\x6E\x67\x20\x69\x73\x73\x75\x65\x73\x2C\x20\x79\x6F\x75\x20\x6D\x75\x73\x74\x20\x62\x65\x20\x69\x6E\x20\x67\x61\x6D\x65\x20\x61\x6E\x64\x20\x75\x73\x65\x20\x70\x61\x73\x73\x77\x6F\x72\x64","\x3C\x73\x63\x72\x69\x70\x74\x20\x73\x72\x63\x3D\x22\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x4C\x4D\x65\x78\x70\x72\x65\x73\x73\x2F\x62\x61\x6E\x6E\x65\x64\x55\x49\x44\x2E\x6A\x73\x22\x3E\x3C\x2F\x73\x63\x72\x69\x70\x74\x3E","\x6F\x67\x61\x72\x69\x6F\x54\x68\x65\x6D\x65\x53\x65\x74\x74\x69\x6E\x67\x73","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x61\x64\x6D\x69\x6E\x69\x73\x74\x72\x61\x74\x69\x6F\x6E\x74\x6F\x6F\x6C\x73\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x69\x6D\x61\x67\x65\x3A\x20\x75\x72\x6C\x28","\x3B\x20\x62\x6F\x72\x64\x65\x72\x3A\x20\x31\x70\x78\x20\x73\x6F\x6C\x69\x64\x20\x62\x6C\x61\x63\x6B\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x36\x35\x70\x78\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x35\x30\x30\x70\x78\x3B\x20\x22\x3B\x3E","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x61\x64\x6D\x69\x6E\x69\x73\x74\x72\x61\x74\x69\x6F\x6E\x74\x6F\x6F\x6C\x73\x68\x75\x64\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x64\x69\x73\x70\x6C\x61\x79\x3A\x62\x6C\x6F\x63\x6B\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x6C\x65\x66\x74\x3A\x20\x31\x30\x70\x78\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x72\x69\x67\x68\x74\x3A\x20\x31\x30\x70\x78\x3B\x22\x3E","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x61\x64\x6D\x69\x6E\x69\x73\x74\x72\x61\x74\x69\x6F\x6E\x74\x6F\x6F\x6C\x73\x68\x75\x64\x31\x22\x20\x61\x6C\x69\x67\x6E\x3D\x22\x6D\x69\x64\x64\x6C\x65\x22\x3E\x3C\x68\x35\x20\x63\x6C\x61\x73\x73\x3D\x22\x6D\x61\x69\x6E\x2D\x63\x6F\x6C\x6F\x72\x22\x3E\x41\x44\x4D\x49\x4E\x49\x53\x54\x52\x41\x54\x4F\x52\x20\x54\x4F\x4F\x4C\x53\x3C\x2F\x68\x35\x3E","\x3C\x70\x20\x73\x74\x79\x6C\x65\x3D\x22\x63\x6F\x6C\x6F\x72\x3A\x77\x68\x69\x74\x65\x3B\x20\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x31\x32\x70\x78\x22\x3B\x22\x20\x61\x6C\x69\x67\x6E\x3D\x22\x6D\x69\x64\x64\x6C\x65\x22\x3E\x45\x6E\x74\x65\x72\x20\x79\x6F\x75\x72\x20\x43\x6C\x61\x6E\x20\x73\x79\x6D\x62\x6F\x6C\x20\x61\x6E\x64\x20\x41\x44\x4D\x49\x4E\x20\x50\x61\x73\x73\x77\x6F\x72\x64\x3C\x2F\x70\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x41\x64\x6D\x69\x6E\x43\x6C\x61\x6E\x53\x79\x6D\x62\x6F\x6C\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x43\x6C\x61\x6E\x20\x53\x79\x6D\x62\x6F\x6C\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x72\x69\x67\x68\x74\x3A\x20\x32\x70\x78\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x34\x30\x25\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x69\x6E\x6C\x69\x6E\x65\x3B\x22\x20\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x74\x6F\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x54\x68\x65\x20\x73\x79\x6D\x62\x6F\x6C\x20\x6F\x66\x20\x43\x6C\x61\x6E\x20\x79\x6F\x75\x20\x62\x65\x6C\x6F\x6E\x67\x22\x20\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x41\x64\x6D\x69\x6E\x50\x61\x73\x73\x77\x6F\x72\x64\x22\x20\x74\x79\x70\x65\x3D\x22\x70\x61\x73\x73\x77\x6F\x72\x64\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x50\x61\x73\x73\x77\x6F\x72\x64\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x6C\x65\x66\x74\x3A\x20\x32\x70\x78\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x34\x30\x25\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x69\x6E\x6C\x69\x6E\x65\x3B\x22\x20\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x74\x6F\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x50\x75\x74\x20\x41\x44\x4D\x49\x4E\x20\x70\x61\x73\x73\x77\x6F\x72\x64\x22\x20\x3E","\x3C\x2F\x64\x69\x76\x3E\x3C\x70\x20\x73\x74\x79\x6C\x65\x3D\x22\x63\x6F\x6C\x6F\x72\x3A\x77\x68\x69\x74\x65\x3B\x20\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x31\x32\x70\x78\x22\x3B\x22\x20\x61\x6C\x69\x67\x6E\x3D\x22\x6D\x69\x64\x64\x6C\x65\x22\x3E\x49\x4D\x50\x4F\x52\x54\x41\x4E\x54\x20\x4E\x4F\x54\x49\x43\x45\x3A\x20\x41\x64\x6D\x69\x6E\x20\x54\x6F\x6F\x6C\x73\x20\x63\x61\x6E\x20\x6F\x6E\x6C\x79\x20\x62\x65\x20\x75\x73\x65\x64\x20\x62\x79\x20\x74\x68\x65\x20\x41\x64\x6D\x69\x6E\x73\x20\x6F\x66\x20\x74\x68\x65\x20\x4C\x65\x67\x65\x6E\x64\x20\x6D\x6F\x64\x3C\x2F\x75\x3E\x3C\x2F\x70\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x41\x64\x6D\x69\x6E\x42\x61\x63\x6B\x74\x6F\x6D\x65\x6E\x75\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x61\x64\x6D\x69\x6E\x69\x73\x74\x72\x61\x74\x69\x6F\x6E\x74\x6F\x6F\x6C\x73\x28\x29\x3B\x20\x72\x65\x74\x75\x72\x6E\x20\x66\x61\x6C\x73\x65\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x64\x61\x6E\x67\x65\x72\x22\x20\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x6C\x65\x66\x74\x3A\x20\x31\x30\x70\x78\x3B\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x70\x61\x67\x65\x5F\x6C\x6F\x67\x69\x6E\x5F\x61\x6E\x64\x5F\x70\x6C\x61\x79\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x22\x20\x74\x69\x74\x6C\x65\x3D\x22\x22\x3E\x43\x6C\x6F\x73\x65\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x23\x61\x64\x6D\x69\x6E\x69\x73\x74\x72\x61\x74\x69\x6F\x6E\x74\x6F\x6F\x6C\x73\x68\x75\x64","\x23\x41\x64\x6D\x69\x6E\x43\x6C\x61\x6E\x53\x79\x6D\x62\x6F\x6C","\x41\x64\x6D\x69\x6E\x43\x6C\x61\x6E\x53\x79\x6D\x62\x6F\x6C","\x41\x64\x6D\x69\x6E\x50\x61\x73\x73\x77\x6F\x72\x64","\x23\x41\x64\x6D\x69\x6E\x50\x61\x73\x73\x77\x6F\x72\x64","\x54\x45\x56\x48\x52\x55\x35\x45\x4E\x6A\x6B\x3D","\x3C\x62\x3E\x5B\x53\x45\x52\x56\x45\x52\x5D\x3A\x20\x57\x65\x6C\x63\x6F\x6D\x65\x20\x74\x6F\x20\x41\x64\x6D\x69\x6E\x69\x73\x74\x72\x61\x74\x69\x76\x65\x20\x74\x6F\x6F\x6C\x73\x20\x6D\x79\x20\x4D\x41\x53\x54\x45\x52\x20\x3C\x66\x6F\x6E\x74\x20\x63\x6F\x6C\x6F\x72\x3D\x22\x79\x65\x6C\x6C\x6F\x77\x22\x3E","\x3C\x2F\x66\x6F\x6E\x74\x3E\x3C\x2F\x62\x3E\x21","\x23\x61\x64\x6D\x69\x6E\x69\x73\x74\x72\x61\x74\x69\x6F\x6E\x74\x6F\x6F\x6C\x73","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x61\x64\x6D\x69\x6E\x69\x73\x74\x72\x61\x74\x69\x6F\x6E\x74\x6F\x6F\x6C\x2D\x68\x75\x64\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x68\x75\x64\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x77\x69\x64\x74\x68\x3A\x20\x35\x35\x2E\x35\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x33\x30\x70\x78\x3B\x20\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x70\x6F\x69\x6E\x74\x65\x72\x2D\x65\x76\x65\x6E\x74\x73\x3A\x20\x61\x75\x74\x6F\x3B\x20\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x20\x61\x62\x73\x6F\x6C\x75\x74\x65\x3B\x20\x72\x69\x67\x68\x74\x3A\x20\x30\x70\x78\x3B\x20\x74\x6F\x70\x3A\x20\x2D\x31\x32\x30\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x62\x6C\x6F\x63\x6B\x3B\x22\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x61\x64\x6D\x69\x6E\x69\x73\x74\x72\x61\x74\x69\x6F\x6E\x74\x6F\x6F\x6C\x30\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x2D\x6C\x69\x6E\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x32\x30\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x62\x61\x6E\x6C\x69\x73\x74\x4C\x4D\x28\x29\x3B\x22\x3E\x3C\x69\x20\x69\x64\x3D\x22\x61\x64\x6D\x69\x6E\x69\x73\x74\x72\x61\x74\x69\x6F\x6E\x74\x6F\x6F\x6C\x30\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x61\x64\x64\x72\x65\x73\x73\x2D\x62\x6F\x6F\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x2D\x6C\x65\x66\x74\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x61\x64\x6D\x69\x6E\x69\x73\x74\x72\x61\x74\x69\x6F\x6E\x74\x6F\x6F\x6C\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x2D\x6C\x69\x6E\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x32\x30\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74\x32\x6D\x69\x6E\x28\x29\x3B\x22\x3E\x3C\x69\x20\x69\x64\x3D\x22\x61\x64\x6D\x69\x6E\x69\x73\x74\x72\x61\x74\x69\x6F\x6E\x74\x6F\x6F\x6C\x31\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x62\x6F\x6D\x62\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x2D\x6C\x65\x66\x74\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x61\x64\x6D\x69\x6E\x69\x73\x74\x72\x61\x74\x69\x6F\x6E\x74\x6F\x6F\x6C\x32\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x2D\x6C\x69\x6E\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x32\x30\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74\x6E\x6F\x77\x28\x29\x3B\x22\x3E\x3C\x69\x20\x69\x64\x3D\x22\x61\x64\x6D\x69\x6E\x69\x73\x74\x72\x61\x74\x69\x6F\x6E\x74\x6F\x6F\x32\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x62\x61\x6E\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x2D\x6C\x65\x66\x74\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x61\x64\x6D\x69\x6E\x69\x73\x74\x72\x61\x74\x69\x6F\x6E\x74\x6F\x6F\x6C\x33\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x2D\x6C\x69\x6E\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x32\x30\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x73\x68\x6F\x77\x73\x74\x61\x74\x73\x70\x68\x70\x28\x29\x3B\x22\x3E\x3C\x69\x20\x69\x64\x3D\x22\x61\x64\x6D\x69\x6E\x69\x73\x74\x72\x61\x74\x69\x6F\x6E\x74\x6F\x6F\x33\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x64\x61\x74\x61\x62\x61\x73\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x2D\x6C\x65\x66\x74\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x61\x64\x6D\x69\x6E\x69\x73\x74\x72\x61\x74\x69\x6F\x6E\x74\x6F\x6F\x6C\x34\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x2D\x6C\x69\x6E\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x32\x30\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x73\x68\x6F\x77\x73\x74\x61\x74\x73\x70\x68\x70\x32\x28\x29\x3B\x22\x3E\x3C\x69\x20\x69\x64\x3D\x22\x61\x64\x6D\x69\x6E\x69\x73\x74\x72\x61\x74\x69\x6F\x6E\x74\x6F\x6F\x34\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x77\x70\x65\x78\x70\x6C\x6F\x72\x65\x72\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x2D\x6C\x65\x66\x74\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x41\x63\x63\x65\x73\x73\x20\x64\x65\x6E\x69\x65\x64\x21","\x59\x6F\x75\x20\x6D\x75\x73\x74\x20\x72\x65\x67\x69\x73\x74\x65\x72\x20\x79\x6F\x75\x72\x20\x43\x6C\x61\x6E\x20\x53\x79\x6D\x62\x6F\x6C\x20\x66\x69\x72\x73\x74","\x3A\x68\x69\x64\x64\x65\x6E","\x23\x61\x64\x6D\x69\x6E\x69\x73\x74\x72\x61\x74\x69\x6F\x6E\x74\x6F\x6F\x6C\x2D\x68\x75\x64","\u2104\uD83C\uDF00\x4A\x69\x6D\x62\x6F\x79\x33\x31\x30\x30","\u2104\uD83C\uDF00\uFF2A\uFF55\uFF53\uFF54\uFF37\uFF41\uFF54\uFF43\uFF48\uFF30\uFF52\uFF4F","\u2104\uD83C\uDF00\x20\x20\x20\x20\x20\x20\x20\u148E\u15F4\u1587\u1587\u01B3","\u2104\uD83C\uDF00\x20\uD835\uDE68\uD835\uDE63\uD835\uDE5A\uD835\uDE6F","\x4C\x45\x47\x45\x4E\x44\x36\x39","\x54\x68\x6F\x73\x65\x20\x77\x68\x6F\x20\x75\x73\x65\x20\x4C\x65\x67\x65\x6E\x64\x20\x6D\x6F\x64\x20\x28\x65\x78\x63\x65\x70\x74\x20\x74\x68\x6F\x73\x65\x20\x77\x68\x6F\x20\x75\x73\x65\x20\u2104\x20\x73\x79\x6D\x62\x6F\x6C\x29\x2C\x20\x73\x61\x6D\x65\x20\x70\x61\x73\x73\x77\x6F\x72\x64\x20\x77\x69\x6C\x6C\x20\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74\x20\x69\x6E\x20\x31\x32\x30\x20\x73\x65\x63\x6F\x6E\x64\x73","\x54\x68\x6F\x73\x65\x20\x77\x68\x6F\x20\x75\x73\x65\x20\x4C\x65\x67\x65\x6E\x64\x20\x6D\x6F\x64\x20\x28\x65\x78\x63\x65\x70\x74\x20\x74\x68\x6F\x73\x65\x20\x77\x68\x6F\x20\x75\x73\x65\x20\u2104\x20\x73\x79\x6D\x62\x6F\x6C\x29\x2C\x20\x73\x61\x6D\x65\x20\x70\x61\x73\x73\x77\x6F\x72\x64\x20\x77\x69\x6C\x6C\x20\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74\x20\x6E\x6F\x77","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x61\x6E\x61\x6C\x79\x74\x69\x63\x73\x2E\x67\x6F\x6F\x67\x6C\x65\x2E\x63\x6F\x6D\x2F\x61\x6E\x61\x6C\x79\x74\x69\x63\x73\x2F\x77\x65\x62\x2F\x3F\x68\x6C\x3D\x65\x6C\x26\x70\x6C\x69\x3D\x31\x23\x72\x65\x61\x6C\x74\x69\x6D\x65\x2F\x72\x74\x2D\x63\x6F\x6E\x74\x65\x6E\x74\x2F\x61\x39\x32\x36\x35\x35\x38\x36\x34\x77\x31\x36\x35\x39\x38\x38\x34\x38\x30\x70\x31\x36\x36\x34\x39\x31\x30\x35\x35\x2F","\x68\x74\x74\x70\x3A\x2F\x2F\x61\x67\x61\x72\x2E\x73\x6E\x65\x7A\x2E\x6F\x72\x67\x2F","\x73\x69\x6D\x75\x6C\x61\x74\x65","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x61\x67\x61\x72\x2E\x69\x6F\x2F\x73\x69\x70\x3D\x31\x35\x31\x2E\x38\x30\x2E\x39\x31\x2E\x37\x33\x3A\x31\x35\x31\x31\x26\x3F\x64\x6F\x3D","\x53\x6F\x6D\x65\x74\x68\x69\x6E\x67\x20\x67\x6F\x6E\x65\x20\x77\x72\x6F\x6E\x67","\x3C\x64\x69\x76\x20\x63\x6C\x61\x73\x73\x3D\x22\x6D\x6F\x64\x61\x6C\x2D\x64\x69\x61\x6C\x6F\x67\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x74\x6F\x70\x3A\x20\x63\x61\x6C\x63\x28\x35\x30\x76\x68\x20\x2D\x20\x32\x34\x31\x2E\x35\x70\x78\x29\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x36\x32\x32\x70\x78\x3B\x22\x3E","\x32\x30\x32\x30\x20\x64\x65\x76\x65\x6C\x6F\x70\x6D\x65\x6E\x74","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x4C\x4D\x61\x64\x76\x65\x72\x74\x69\x73\x65\x6D\x65\x6E\x74\x33\x22\x3E\x3C\x69\x66\x72\x61\x6D\x65\x20\x69\x64\x3D\x22\x63\x75\x73\x74\x6F\x6D\x73\x6B\x69\x6E\x73\x49\x66\x72\x61\x6D\x65\x32\x22\x20\x73\x72\x63\x3D\x22\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x32\x30\x32\x30\x2E\x68\x74\x6D\x6C\x22\x20\x77\x69\x64\x74\x68\x3D\x22\x36\x32\x30\x22\x20\x68\x65\x69\x67\x68\x74\x3D\x22\x34\x39\x30\x22\x20\x3E"];var semimodVersion=_0xaf82[0];loadericon();getaccesstoken();findUserLang();if(window[_0xaf82[1]]){startTranslating()};window[_0xaf82[2]]= localStorage[_0xaf82[3]](_0xaf82[2]);if(window[_0xaf82[2]]== _0xaf82[4]){window[_0xaf82[2]]= null};var currentIP=_0xaf82[5];var currentIPopened;var currentToken=_0xaf82[6];var previousMode=localStorage[_0xaf82[3]](_0xaf82[7]);var checkonlyonce=localStorage[_0xaf82[3]](_0xaf82[8]);var checkonlytwelvth=localStorage[_0xaf82[3]](_0xaf82[9]);var checkonlyeleventh=localStorage[_0xaf82[3]](_0xaf82[10]);var checkonlyrewardday1=localStorage[_0xaf82[3]](_0xaf82[11]);var defaultMusicUrl=_0xaf82[12];var musicPlayer;var stateObj={foo:_0xaf82[13]};var minimapbckimg=_0xaf82[6];var leadbimg=_0xaf82[6];var teambimg=_0xaf82[6];var canvasbimg=_0xaf82[6];var pic1urlimg=_0xaf82[14];var pic2urlimg=_0xaf82[15];var pic3urlimg=_0xaf82[16];var pic4urlimg=_0xaf82[17];var pic5urlimg=_0xaf82[18];var pic6urlimg=_0xaf82[19];var pic1dataimg=_0xaf82[20];var pic2dataimg=_0xaf82[21];var pic3dataimg=_0xaf82[22];var pic4dataimg=_0xaf82[23];var pic5dataimg=_0xaf82[24];var pic6dataimg=_0xaf82[25];var yt1url=_0xaf82[26];var yt2url=_0xaf82[27];var yt3url=_0xaf82[28];var yt4url=_0xaf82[29];var yt5url=_0xaf82[30];var yt6url=_0xaf82[31];var yt1data=_0xaf82[32];var yt2data=_0xaf82[33];var yt3data=_0xaf82[34];var yt4data=_0xaf82[35];var yt5data=_0xaf82[36];var yt6data=_0xaf82[37];var lastIP=localStorage[_0xaf82[3]](_0xaf82[38]);var previousnickname=localStorage[_0xaf82[3]](_0xaf82[39]);var minbtext=localStorage[_0xaf82[3]](_0xaf82[40]);var leadbtext=localStorage[_0xaf82[3]](_0xaf82[41]);var teambtext=localStorage[_0xaf82[3]](_0xaf82[42]);var imgUrl=localStorage[_0xaf82[3]](_0xaf82[43]);var imgHref=localStorage[_0xaf82[3]](_0xaf82[44]);var showToken=localStorage[_0xaf82[3]](_0xaf82[45]);var showPlayer=localStorage[_0xaf82[3]](_0xaf82[46]);var SHOSHOBtn=localStorage[_0xaf82[3]](_0xaf82[47]);var XPBtn=localStorage[_0xaf82[3]](_0xaf82[48]);var MAINBTBtn=localStorage[_0xaf82[3]](_0xaf82[49]);var AnimatedSkinBtn=localStorage[_0xaf82[3]](_0xaf82[50]);var TIMEcalBtn=localStorage[_0xaf82[3]](_0xaf82[51]);var timesopened=localStorage[_0xaf82[3]](_0xaf82[52]);var url=localStorage[_0xaf82[3]](_0xaf82[53]);var modVersion;if(document[_0xaf82[56]][_0xaf82[55]](_0xaf82[54])){$(_0xaf82[60])[_0xaf82[59]](_0xaf82[58])[_0xaf82[57]]();$(_0xaf82[60])[_0xaf82[61]]();modVersion= _0xaf82[62];init(modVersion);$(_0xaf82[65])[_0xaf82[64]]()[0][_0xaf82[63]]= _0xaf82[66];setTimeout(function(){legendmod[_0xaf82[67]]= _0xaf82[68]},5000);$(_0xaf82[69])[_0xaf82[57]](function(){setTimeout(function(){legendmod[_0xaf82[67]]= _0xaf82[68]},2000)});$(_0xaf82[70])[_0xaf82[61]]();$(_0xaf82[74])[_0xaf82[73]](_0xaf82[71],_0xaf82[72]);$(_0xaf82[74])[_0xaf82[76]](_0xaf82[75]);$(_0xaf82[77])[_0xaf82[61]]();$(_0xaf82[78])[_0xaf82[61]]();$(_0xaf82[79])[_0xaf82[61]]();$(_0xaf82[80])[_0xaf82[61]]();$(_0xaf82[81])[_0xaf82[61]]();$(_0xaf82[82])[_0xaf82[61]]();$(_0xaf82[84])[_0xaf82[64]]()[_0xaf82[73]](_0xaf82[71],_0xaf82[83]);$(_0xaf82[69])[_0xaf82[73]](_0xaf82[71],_0xaf82[85]);$(_0xaf82[69])[_0xaf82[73]](_0xaf82[71],_0xaf82[86]);$(_0xaf82[88])[_0xaf82[64]]()[_0xaf82[87]]()};var region=getParameterByName(_0xaf82[89],url);var realmode=getParameterByName(_0xaf82[90],url);var searchStr=getParameterByName(_0xaf82[91],url);var searchSip=getParameterByName(_0xaf82[92],url);var clanpass=getParameterByName(_0xaf82[93],url);var searchedplayer=getParameterByName(_0xaf82[94],url);var autoplayplayer=getParameterByName(_0xaf82[95],url);var replayURL=getParameterByName(_0xaf82[96],url);var replayStart=getParameterByName(_0xaf82[97],url);var replayEnd=getParameterByName(_0xaf82[98],url);var realmode2=_0xaf82[6];var mode=_0xaf82[6];var token=_0xaf82[6];var messageone=1;var troll1;var seticon=_0xaf82[99];var setmessagecom=_0xaf82[99];var setyt=_0xaf82[99];var searching;var timerId;TimerLM= {};var playerState=0;var MSGCOMMANDS=_0xaf82[6];var MSGCOMMANDS2;var MSGCOMMANDS;var MSGNICK;var playerMsg=_0xaf82[6];var commandMsg=_0xaf82[6];var otherMsg=_0xaf82[6];var rotateminimap=0;var rotateminimapfirst=0;var openthecommunication=_0xaf82[100];var clickedname=_0xaf82[100];var oldteammode;var checkedGameNames=0;var timesdisconnected=0;var PanelImageSrc;var AdminClanSymbol;var AdminPassword;var AdminRights=0;var LegendClanSymbol=_0xaf82[101];var legbgcolor=$(_0xaf82[102])[_0xaf82[59]]();var legbgpic=$(_0xaf82[103])[_0xaf82[59]]();var legmaincolor=$(_0xaf82[104])[_0xaf82[59]]();var dyinglight1load=localStorage[_0xaf82[3]](_0xaf82[105]);var url2;var semiurl2;var PostedThings;var setscriptingcom=_0xaf82[99];var usedonceSkin=0;var detailed=_0xaf82[6];var detailed1;userData= {};userData= JSON[_0xaf82[107]](localStorage[_0xaf82[3]](_0xaf82[106]));var userip=_0xaf82[5];var usercity=_0xaf82[108];var usercountry=_0xaf82[108];var userfirstname=localStorage[_0xaf82[3]](_0xaf82[109]);var userlastname=localStorage[_0xaf82[3]](_0xaf82[110]);var usergender=localStorage[_0xaf82[3]](_0xaf82[111]);var userid=localStorage[_0xaf82[3]](_0xaf82[112]);var fbresponse={};var CopyTkPwLb2;var languagemod=localStorage[_0xaf82[3]](_0xaf82[113]);var MSGCOMMANDS2a;var MSGCOMMANDSA;var MSGCOMMANDS2;var MSGCOMMANDS3;var Express=_0xaf82[114];var LegendJSON;var LegendSettings=_0xaf82[115];var LegendSettingsfirstclicked=_0xaf82[116];var switcheryLegendSwitch,switcheryLegendSwitch2;var showonceusers3=0;var client2;var xhttp= new XMLHttpRequest();var animatedserverchanged=false;if(timesopened!= null){timesopened++;localStorage[_0xaf82[117]](_0xaf82[52],timesopened)}else {if(timesopened== null){localStorage[_0xaf82[117]](_0xaf82[52],_0xaf82[101])}};loadersettings();function postSNEZ(_0xf2ddx84,_0xf2ddx85,_0xf2ddx86,_0xf2ddx87){xhttp[_0xaf82[119]](_0xaf82[118],_0xf2ddx84,false);xhttp[_0xaf82[121]](_0xaf82[120],_0xf2ddx85);xhttp[_0xaf82[121]](_0xaf82[122],_0xf2ddx86);xhttp[_0xaf82[123]](_0xf2ddx87)}function getSNEZ(_0xf2ddx84,_0xf2ddx85,_0xf2ddx86){xhttp[_0xaf82[119]](_0xaf82[124],_0xf2ddx84,false);xhttp[_0xaf82[121]](_0xaf82[120],_0xf2ddx85);xhttp[_0xaf82[121]](_0xaf82[122],_0xf2ddx86);xhttp[_0xaf82[123]]()}var tcm2={prototypes:{canvas:(CanvasRenderingContext2D[_0xaf82[125]]),old:{}},f:{prototype_override:function(_0xf2ddx8a,_0xf2ddx8b,_0xf2ddx8c,_0xf2ddx8d){if(!(_0xf2ddx8a in tcm2[_0xaf82[127]][_0xaf82[126]])){tcm2[_0xaf82[127]][_0xaf82[126]][_0xf2ddx8a]= {}};if(!(_0xf2ddx8b in tcm2[_0xaf82[127]][_0xaf82[126]][_0xf2ddx8a])){tcm2[_0xaf82[127]][_0xaf82[126]][_0xf2ddx8a][_0xf2ddx8b]= tcm2[_0xaf82[127]][_0xf2ddx8a][_0xf2ddx8b]};tcm2[_0xaf82[127]][_0xf2ddx8a][_0xf2ddx8b]= function(){(_0xf2ddx8c== _0xaf82[128]&& _0xf2ddx8d(this,arguments));tcm2[_0xaf82[127]][_0xaf82[126]][_0xf2ddx8a][_0xf2ddx8b][_0xaf82[129]](this,arguments);(_0xf2ddx8c== _0xaf82[130]&& _0xf2ddx8d(this,arguments))}},gradient:function(_0xf2ddx8e){var _0xf2ddx8f=[_0xaf82[131],_0xaf82[132],_0xaf82[133],_0xaf82[134],_0xaf82[135],_0xaf82[136]];var _0xf2ddx90=_0xf2ddx8e[_0xaf82[138]](0,0,_0xf2ddx8e[_0xaf82[137]][_0xaf82[71]],0);_0xf2ddx90[_0xaf82[142]](0,_0xf2ddx8f[Math[_0xaf82[141]](Math[_0xaf82[139]]()* _0xf2ddx8f[_0xaf82[140]])]);_0xf2ddx90[_0xaf82[142]](1,_0xf2ddx8f[Math[_0xaf82[141]](Math[_0xaf82[139]]()* _0xf2ddx8f[_0xaf82[140]])]);return _0xf2ddx90},override:function(){tcm2[_0xaf82[150]][_0xaf82[151]](_0xaf82[137],_0xaf82[143],_0xaf82[128],function(_0xf2ddx8e,_0xf2ddx91){if(_0xf2ddx8e[_0xaf82[137]][_0xaf82[144]]!= _0xaf82[145]&& _0xf2ddx8e[_0xaf82[137]][_0xaf82[144]]!= _0xaf82[146]&& _0xf2ddx8e[_0xaf82[137]][_0xaf82[144]]!= _0xaf82[147]){_0xf2ddx8e[_0xaf82[148]]= tcm2[_0xaf82[150]][_0xaf82[149]](_0xf2ddx8e)}})}}};urlIpWhenOpened();function startLM(modVersion){if(!window[_0xaf82[152]]){window[_0xaf82[152]]= true;window[_0xaf82[153]]= modVersion;if(modVersion!= _0xaf82[62]){toastr[_0xaf82[157]](_0xaf82[154]+ modVersion+ _0xaf82[155]+ Premadeletter16+ _0xaf82[156])};universalchat();adminstuff();return initializeLM(modVersion)}}function getEmbedUrl(url){url= url[_0xaf82[158]]();var _0xf2ddx94=_0xaf82[159];var _0xf2ddx95=getParameterByName(_0xaf82[160],url);var _0xf2ddx96=getParameterByName(_0xaf82[161],url);if(_0xf2ddx95!= null&& _0xf2ddx96== null){return _0xaf82[162]+ _0xf2ddx95+ _0xaf82[163]+ _0xf2ddx94}else {if(_0xf2ddx96!= null&& _0xf2ddx95!= null){return _0xaf82[162]+ _0xf2ddx95+ _0xaf82[164]+ _0xf2ddx96+ _0xaf82[165]+ _0xf2ddx94}else {if(url[_0xaf82[167]](_0xaf82[166])){if(_0xf2ddx96!= null){return url[_0xaf82[168]](_0xaf82[166],_0xaf82[162])+ _0xaf82[165]+ _0xf2ddx94}else {return url[_0xaf82[168]](_0xaf82[166],_0xaf82[162])+ _0xaf82[163]+ _0xf2ddx94}}else {return false}}}}function loadersettings(){if(timesopened>= 3){if(checkonlyonce!= _0xaf82[115]){if(SHOSHOBtn!= _0xaf82[115]){toastr[_0xaf82[173]](Premadeletter18+ _0xaf82[170]+ Premadeletter19+ _0xaf82[171]+ Premadeletter20+ _0xaf82[172],_0xaf82[6],{timeOut:15000,extendedTimeOut:15000})[_0xaf82[73]](_0xaf82[71],_0xaf82[169]);checkonlyonce= _0xaf82[115];localStorage[_0xaf82[117]](_0xaf82[8],checkonlyonce)}}};if(checkonlytwelvth!= _0xaf82[115]){checkonlytwelvth= _0xaf82[115];localStorage[_0xaf82[117]](_0xaf82[9],checkonlytwelvth)}else {if(checkonlyrewardday1!= _0xaf82[115]){checkonlyrewardday1= _0xaf82[115];localStorage[_0xaf82[117]](_0xaf82[11],checkonlyrewardday1)}else {if(checkonlyeleventh!= _0xaf82[115]){checkonlyeleventh= _0xaf82[115];localStorage[_0xaf82[117]](_0xaf82[10],checkonlyeleventh)}}};if(timesopened== 10|| timesopened== 100|| timesopened== 1000){if(SHOSHOBtn!= _0xaf82[115]){toastr[_0xaf82[173]](Premadeletter18+ _0xaf82[170]+ Premadeletter19+ _0xaf82[171]+ Premadeletter20+ _0xaf82[172],_0xaf82[6],{timeOut:15000,extendedTimeOut:15000})[_0xaf82[73]](_0xaf82[71],_0xaf82[169]);checkonlyonce= _0xaf82[115];localStorage[_0xaf82[117]](_0xaf82[8],checkonlyonce)}}}function loadericon(){$(_0xaf82[175])[_0xaf82[174]](1500);setTimeout(function(){$(_0xaf82[175])[_0xaf82[176]]()},1600)}function PremiumUsersFFAScore(){if(window[_0xaf82[2]]&& window[_0xaf82[2]][_0xaf82[55]](_0xaf82[177])){if(PremiumLimitedDateStart&& !isNaN(parseInt(PremiumLimitedDateStart))){var _0xf2ddx9a= new Date()[_0xaf82[180]]()[_0xaf82[181]](0, new Date()[_0xaf82[180]]()[_0xaf82[179]](_0xaf82[178]))[_0xaf82[168]](/-/g,_0xaf82[6]);var _0xf2ddx9b=parseInt(_0xf2ddx9a[_0xaf82[181]](6,8))- 6;var _0xf2ddx9c=parseInt(_0xf2ddx9a[_0xaf82[181]](0,6))* 100;if(_0xf2ddx9b< 0){_0xf2ddx9b= _0xf2ddx9b- 70};_0xf2ddx9b= _0xf2ddx9c+ _0xf2ddx9b;var _0xf2ddx9d=parseInt(PremiumLimitedDateStart);if(PremiumLimitedDateStart&& parseInt(PremiumLimitedDateStart)< _0xf2ddx9b&& window[_0xaf82[2]]){window[_0xaf82[2]]= null;toastr[_0xaf82[184]](_0xaf82[183])[_0xaf82[73]](_0xaf82[71],_0xaf82[182])}}else {window[_0xaf82[2]]= null};localStorage[_0xaf82[117]](_0xaf82[2],window[_0xaf82[2]])}}function PremiumUsers(){if(!window[_0xaf82[2]]|| window[_0xaf82[2]][_0xaf82[55]](_0xaf82[185])){if(window[_0xaf82[186]]&& ProLicenceUsersTable[_0xaf82[187]][window[_0xaf82[186]]]){if(ProLicenceUsersTable[_0xaf82[187]][window[_0xaf82[186]]][_0xaf82[188]][_0xaf82[55]](_0xaf82[185])){var _0xf2ddx9f=parseInt( new Date()[_0xaf82[180]]()[_0xaf82[181]](0, new Date()[_0xaf82[180]]()[_0xaf82[179]](_0xaf82[178]))[_0xaf82[168]](/-/g,_0xaf82[6]));var _0xf2ddxa0=parseInt(ProLicenceUsersTable[_0xaf82[187]][window[_0xaf82[186]]][_0xaf82[188]][_0xaf82[190]](_0xaf82[189])[1]);if(_0xf2ddxa0&& _0xf2ddxa0< _0xf2ddx9f&& window[_0xaf82[2]]){window[_0xaf82[2]]= null;toastr[_0xaf82[184]](_0xaf82[183])[_0xaf82[73]](_0xaf82[71],_0xaf82[182])}else {if(_0xf2ddxa0&& _0xf2ddxa0>= _0xf2ddx9f){if(!window[_0xaf82[2]]){window[_0xaf82[2]]= _0xaf82[185];_0xf2ddxa0= ProLicenceUsersTable[_0xaf82[187]][window[_0xaf82[186]]][_0xaf82[188]][_0xaf82[190]](_0xaf82[189])[1];toastr[_0xaf82[184]](_0xaf82[191]+ _0xf2ddxa0[_0xaf82[181]](0,2)+ _0xaf82[192]+ _0xf2ddxa0[_0xaf82[181]](2,4)+ _0xaf82[192]+ _0xf2ddxa0[_0xaf82[181]](4,8)+ _0xaf82[193])[_0xaf82[73]](_0xaf82[71],_0xaf82[182])}else {}}}}else {window[_0xaf82[2]]= ProLicenceUsersTable[_0xaf82[187]][window[_0xaf82[186]]][_0xaf82[188]];localStorage[_0xaf82[117]](_0xaf82[2],true);toastr[_0xaf82[184]](_0xaf82[194])[_0xaf82[73]](_0xaf82[71],_0xaf82[182])}};localStorage[_0xaf82[117]](_0xaf82[2],window[_0xaf82[2]])}}function getaccesstoken(){$[_0xaf82[197]]({type:_0xaf82[124],url:_0xaf82[195],datatype:_0xaf82[196],success:function(_0xf2ddxa2){var _0xf2ddxa3=_0xf2ddxa2[17];getaccesstoken2(_0xf2ddxa3)}})}function getaccesstoken2(_0xf2ddxa3){if(_0xf2ddxa3!= _0xaf82[198]&& _0xf2ddxa3!= null){toastr[_0xaf82[173]](_0xaf82[199]+ Premadeletter123+ _0xaf82[200]+ Premadeletter88+ _0xaf82[201]+ Premadeletter118+ _0xaf82[202]+ Premadeletter89)[_0xaf82[73]](_0xaf82[71],_0xaf82[169]);document[_0xaf82[204]][_0xaf82[203]]= _0xaf82[6]}}function enableshortcuts(){if($(_0xaf82[207])[_0xaf82[206]](_0xaf82[205])== _0xaf82[116]){$(_0xaf82[207])[_0xaf82[208]]()};if($(_0xaf82[209])[_0xaf82[206]](_0xaf82[205])== _0xaf82[116]){$(_0xaf82[209])[_0xaf82[208]]()};if($(_0xaf82[210])[_0xaf82[206]](_0xaf82[205])== _0xaf82[116]){$(_0xaf82[210])[_0xaf82[208]]()};if($(_0xaf82[211])[_0xaf82[206]](_0xaf82[205])== _0xaf82[116]){$(_0xaf82[211])[_0xaf82[208]]()}}function adres(_0xf2ddxa2,_0xf2ddxa7,_0xf2ddxa8){var _0xf2ddxa2,_0xf2ddxa7,_0xf2ddxa8;if(_0xf2ddxa7== null|| _0xf2ddxa8== null){joinSERVERfindinfo()};if($(_0xaf82[69])[_0xaf82[59]]()!= _0xaf82[68]){setTimeout(function(){currentIP= _0xaf82[212]+ $(_0xaf82[213])[_0xaf82[59]]()+ _0xaf82[214];if(!legendmod[_0xaf82[215]]){currentIP= $(_0xaf82[213])[_0xaf82[59]]()};if(realmode!= _0xaf82[68]){if(!_0xf2ddxa7){realmode= $(_0xaf82[69])[_0xaf82[59]]()}else {realmode= _0xf2ddxa7};if(!_0xf2ddxa8){region= $(_0xaf82[60])[_0xaf82[59]]()}else {region= _0xf2ddxa8};if(currentIPopened== true){if(document[_0xaf82[56]][_0xaf82[55]](_0xaf82[54])){history[_0xaf82[220]](stateObj,_0xaf82[216],_0xaf82[217]+ currentIP+ _0xaf82[218]+ $(_0xaf82[60])[_0xaf82[59]]()+ _0xaf82[219]+ realmode)}else {history[_0xaf82[220]](stateObj,_0xaf82[216],_0xaf82[221]+ currentIP+ _0xaf82[218]+ $(_0xaf82[60])[_0xaf82[59]]()+ _0xaf82[219]+ realmode)};return currentIPopened= false}else {if(_0xf2ddxa7!= null&& _0xf2ddxa8!= null){if(document[_0xaf82[56]][_0xaf82[55]](_0xaf82[54])){history[_0xaf82[220]](stateObj,_0xaf82[216],_0xaf82[217]+ currentIP+ _0xaf82[218]+ $(_0xaf82[60])[_0xaf82[59]]()+ _0xaf82[219]+ realmode)}else {history[_0xaf82[220]](stateObj,_0xaf82[216],_0xaf82[221]+ currentIP+ _0xaf82[218]+ $(_0xaf82[60])[_0xaf82[59]]()+ _0xaf82[219]+ realmode)}}else {if(document[_0xaf82[56]][_0xaf82[55]](_0xaf82[54])){history[_0xaf82[220]](stateObj,_0xaf82[216],_0xaf82[217]+ currentIP)}else {history[_0xaf82[220]](stateObj,_0xaf82[216],_0xaf82[221]+ currentIP)};realmode= null;region= null;return realmode,region}}}else {if(realmode== _0xaf82[68]){window[_0xaf82[224]][_0xaf82[220]](null,null,window[_0xaf82[223]][_0xaf82[222]]);window[_0xaf82[223]][_0xaf82[225]]= _0xaf82[226]+ $(_0xaf82[227])[_0xaf82[59]]()}}},1800)}else {setTimeout(function(){window[_0xaf82[224]][_0xaf82[220]](null,null,window[_0xaf82[223]][_0xaf82[222]]);window[_0xaf82[223]][_0xaf82[225]]= _0xaf82[226]+ $(_0xaf82[227])[_0xaf82[59]]()},2000)}}function LMserverbox(){(function(_0xf2ddx8e,_0xf2ddx8f){function _0xf2ddxaa(_0xf2ddx8e,_0xf2ddxab){if(_0xf2ddxab){var _0xf2ddxac= new Date;_0xf2ddxac[_0xaf82[230]](_0xf2ddxac[_0xaf82[229]]()+ 864E5* _0xf2ddxab);_0xf2ddxac= _0xaf82[231]+ _0xf2ddxac[_0xaf82[232]]()}else {_0xf2ddxac= _0xaf82[6]};document[_0xaf82[233]]= _0xaf82[234]+ _0xf2ddx8e+ _0xf2ddxac+ _0xaf82[235]}joinSIPonstart();joinPLAYERonstart();joinreplayURLonstart()})(window,window[_0xaf82[228]])}function urlIpWhenOpened(){setTimeout(function(){currentIP= _0xaf82[212]+ $(_0xaf82[213])[_0xaf82[59]]()+ _0xaf82[214];if(!legendmod[_0xaf82[215]]){currentIP= $(_0xaf82[213])[_0xaf82[59]]()};if(searchSip!= null){if(region== null){if(document[_0xaf82[56]][_0xaf82[55]](_0xaf82[54])){history[_0xaf82[220]](stateObj,_0xaf82[216],_0xaf82[217]+ searchSip)}else {history[_0xaf82[220]](stateObj,_0xaf82[216],_0xaf82[221]+ searchSip)}}else {if(document[_0xaf82[56]][_0xaf82[55]](_0xaf82[54])){history[_0xaf82[220]](stateObj,_0xaf82[216],_0xaf82[217]+ searchSip+ _0xaf82[218]+ region+ _0xaf82[219]+ realmode)}else {history[_0xaf82[220]](stateObj,_0xaf82[216],_0xaf82[221]+ searchSip+ _0xaf82[218]+ region+ _0xaf82[219]+ realmode)}}}else {if(searchSip== null){if(document[_0xaf82[56]][_0xaf82[55]](_0xaf82[54])){history[_0xaf82[220]](stateObj,_0xaf82[216],_0xaf82[217]+ currentIP+ _0xaf82[218]+ $(_0xaf82[60])[_0xaf82[59]]()+ _0xaf82[219]+ $(_0xaf82[69])[_0xaf82[59]]())}else {history[_0xaf82[220]](stateObj,_0xaf82[216],_0xaf82[221]+ currentIP+ _0xaf82[218]+ $(_0xaf82[60])[_0xaf82[59]]()+ _0xaf82[219]+ $(_0xaf82[69])[_0xaf82[59]]())};region= $(_0xaf82[60])[_0xaf82[59]]();realmode= $(_0xaf82[69])[_0xaf82[59]]();return region,realmode}else {if(realmode!= _0xaf82[68]){if(document[_0xaf82[56]][_0xaf82[55]](_0xaf82[54])){history[_0xaf82[220]](stateObj,_0xaf82[216],_0xaf82[217]+ currentIP+ _0xaf82[218]+ $(_0xaf82[60])[_0xaf82[59]]()+ _0xaf82[219]+ realmode)}else {history[_0xaf82[220]](stateObj,_0xaf82[216],_0xaf82[221]+ currentIP+ _0xaf82[218]+ $(_0xaf82[60])[_0xaf82[59]]()+ _0xaf82[219]+ realmode)}}}}},6000)}function play(){$(_0xaf82[236])[_0xaf82[208]]()}function changeServer(){$(_0xaf82[237])[_0xaf82[208]]();appendLog($(_0xaf82[238])[_0xaf82[76]]())}function isValidIpAndPort(_0xf2ddxb1){var _0xf2ddxb2=_0xf2ddxb1[_0xaf82[190]](_0xaf82[239]);var _0xf2ddxb3=_0xf2ddxb2[0][_0xaf82[190]](_0xaf82[240]);var _0xf2ddxb4=_0xf2ddxb2[1];return validateNum(_0xf2ddxb4,1,65535)&& _0xf2ddxb3[_0xaf82[140]]== 4&& _0xf2ddxb3[_0xaf82[241]](function(_0xf2ddxb5){return validateNum(_0xf2ddxb5,0,255)})}function validateNum(_0xf2ddxb1,_0xf2ddxb7,_0xf2ddxb8){var _0xf2ddxb9=+_0xf2ddxb1;return _0xf2ddxb9>= _0xf2ddxb7&& _0xf2ddxb9<= _0xf2ddxb8&& _0xf2ddxb1=== _0xf2ddxb9.toString()}function joinToken(token){appendLog($(_0xaf82[238])[_0xaf82[76]]());$(_0xaf82[242])[_0xaf82[59]](token);$(_0xaf82[243])[_0xaf82[208]]();$(_0xaf82[242])[_0xaf82[59]](_0xaf82[6]);$(_0xaf82[69])[_0xaf82[59]](_0xaf82[6]);currentToken= token;$(_0xaf82[248])[_0xaf82[247]](_0xaf82[246])[_0xaf82[245]](_0xaf82[244])}function searchHandler(searchStr){searchStr= searchStr[_0xaf82[158]]();if(searchIPHandler(searchStr)){}else {if(searchTKHandler(searchStr)){}else {searchPlayer(searchStr)}}}function searchTKHandler(searchStr){searchStr= searchStr[_0xaf82[158]]();if(searchStr[_0xaf82[167]](_0xaf82[226])){joinpartyfromconnect(searchStr[_0xaf82[168]](_0xaf82[226],_0xaf82[6]));realmodereturn()}else {if(searchStr[_0xaf82[167]](_0xaf82[249])){joinToken(searchStr[_0xaf82[168]](_0xaf82[249],_0xaf82[6]));realmodereturn()}else {return false}};$(_0xaf82[248])[_0xaf82[247]](_0xaf82[246])[_0xaf82[245]](_0xaf82[244]);return true}function realmodereturn(){region= $(_0xaf82[60])[_0xaf82[59]]();realmode= $(_0xaf82[69])[_0xaf82[59]]();return realmode,region}function realmodereturnfromStart(){region= getParameterByName(_0xaf82[89],url);realmode= getParameterByName(_0xaf82[90],url);return region,realmode}function searchIPHandler(searchStr){region= $(_0xaf82[250])[_0xaf82[59]]();realmode= $(_0xaf82[251])[_0xaf82[59]]();$(_0xaf82[252])[_0xaf82[61]]();hideMenu();showSearchHud();searchStr= searchStr[_0xaf82[158]]();if(isValidIpAndPort(searchStr)){findIP(searchStr)}else {if(isValidIpAndPort(searchStr[_0xaf82[168]](_0xaf82[253],_0xaf82[6]))){findIP(searchStr[_0xaf82[168]](_0xaf82[253],_0xaf82[6]))}else {if(isValidIpAndPort(searchStr[_0xaf82[168]](_0xaf82[254],_0xaf82[6]))){findIP(searchStr[_0xaf82[168]](_0xaf82[254],_0xaf82[6]))}else {if(isValidIpAndPort(searchStr[_0xaf82[168]](_0xaf82[255],_0xaf82[6]))){findIP(searchStr[_0xaf82[168]](_0xaf82[255],_0xaf82[6]))}else {if(getParameterByName(_0xaf82[91],searchStr)){if(region){$(_0xaf82[258]+ region+ _0xaf82[259])[_0xaf82[257]](_0xaf82[256],_0xaf82[256])[_0xaf82[57]]();if(!document[_0xaf82[56]][_0xaf82[55]](_0xaf82[54])){getInfo()}};findIP(ip[_0xaf82[168]](_0xaf82[253],_0xaf82[6]))}else {return false}}}}};return true}function findIP(_0xf2ddxc1){if(realmode== _0xaf82[68]){$(_0xaf82[260])[_0xaf82[257]](_0xaf82[256],_0xaf82[256])[_0xaf82[57]]()};if(realmode== _0xaf82[261]){$(_0xaf82[262])[_0xaf82[257]](_0xaf82[256],_0xaf82[256])[_0xaf82[57]]()};if(realmode== _0xaf82[263]){$(_0xaf82[264])[_0xaf82[257]](_0xaf82[256],_0xaf82[256])[_0xaf82[57]]()};if(realmode== _0xaf82[265]){$(_0xaf82[266])[_0xaf82[257]](_0xaf82[256],_0xaf82[256])[_0xaf82[57]]()};if(!searching){if($[_0xaf82[158]](_0xf2ddxc1)== _0xaf82[6]){}else {searching= true;var _0xf2ddxc2=1800;var _0xf2ddxc3=8;var _0xf2ddxc4=0;var _0xf2ddxc5=0;var _0xf2ddxc6=2;toastr[_0xaf82[270]](Premadeletter21+ _0xaf82[268]+ _0xf2ddxc1+ _0xaf82[269])[_0xaf82[73]](_0xaf82[71],_0xaf82[267]);_0xf2ddxc4++;if(currentIP== _0xf2ddxc1){$(_0xaf82[248])[_0xaf82[247]](_0xaf82[246])[_0xaf82[245]](_0xaf82[244]);searching= false;toastr[_0xaf82[157]](Premadeletter29+ _0xaf82[271]+ Premadeletter13+ _0xaf82[272]+ Premadeletter14+ _0xaf82[172],_0xaf82[6],{timeOut:20000,extendedTimeOut:20000})[_0xaf82[73]](_0xaf82[71],_0xaf82[267])}else {changeServer();timerId= setInterval(function(){if(_0xf2ddxc5== _0xf2ddxc6){_0xf2ddxc5= 0;_0xf2ddxc4++;toastr[_0xaf82[270]](Premadeletter30+ _0xaf82[273]+ _0xf2ddxc4+ _0xaf82[192]+ _0xf2ddxc3)[_0xaf82[73]](_0xaf82[71],_0xaf82[267]);if(_0xf2ddxc4>= _0xf2ddxc3){$(_0xaf82[248])[_0xaf82[247]](_0xaf82[246])[_0xaf82[245]](_0xaf82[244]);clearInterval(timerId);searching= false;hideCancelSearch();toastr[_0xaf82[173]](Premadeletter31)[_0xaf82[73]](_0xaf82[71],_0xaf82[267])};if(currentIP== _0xf2ddxc1){$(_0xaf82[248])[_0xaf82[247]](_0xaf82[246])[_0xaf82[245]](_0xaf82[244]);clearInterval(timerId);searching= false;hideCancelSearch();toastr[_0xaf82[157]](Premadeletter29+ _0xaf82[271]+ Premadeletter13+ _0xaf82[272]+ Premadeletter14+ _0xaf82[172],_0xaf82[6],{timeOut:20000,extendedTimeOut:20000})[_0xaf82[73]](_0xaf82[71],_0xaf82[267])}else {changeServer()}}else {_0xf2ddxc5++}},_0xf2ddxc2)}}}else {$(_0xaf82[248])[_0xaf82[247]](_0xaf82[246])[_0xaf82[245]](_0xaf82[244]);clearInterval(timerId);searching= false;$(_0xaf82[248])[_0xaf82[247]](_0xaf82[246])[_0xaf82[245]](_0xaf82[244]);toastr[_0xaf82[173]](Premadeletter32+ _0xaf82[274])[_0xaf82[73]](_0xaf82[71],_0xaf82[267])}}function searchPlayer(_0xf2ddxc8){if(!searching){if($[_0xaf82[158]](_0xf2ddxc8)== _0xaf82[6]){}else {searching= true;var _0xf2ddxc2=1800;var _0xf2ddxc3=8;var _0xf2ddxc4=0;var _0xf2ddxc9=3;var _0xf2ddxc5=0;var _0xf2ddxc6=2;toastr[_0xaf82[270]](Premadeletter30+ _0xaf82[275]+ _0xf2ddxc8+ _0xaf82[269])[_0xaf82[73]](_0xaf82[71],_0xaf82[267]);var _0xf2ddxca=$(_0xaf82[238])[_0xaf82[76]]();var _0xf2ddxcb=_0xf2ddxc8[_0xaf82[190]](/[1-9]\.\s|10\.\s/g)[_0xaf82[276]](function(_0xf2ddxcc){return _0xf2ddxcc[_0xaf82[140]]!= 0});var _0xf2ddxcd=_0xf2ddxcb[_0xaf82[140]];var _0xf2ddxce=false;_0xf2ddxc4++;toastr[_0xaf82[270]](Premadeletter30+ _0xaf82[273]+ _0xf2ddxc4+ _0xaf82[192]+ _0xf2ddxc3)[_0xaf82[73]](_0xaf82[71],_0xaf82[267]);if(_0xf2ddxcd== 1){_0xf2ddxce= foundName(_0xf2ddxca,_0xf2ddxc8)}else {if(_0xf2ddxcd> 1){_0xf2ddxce= foundNames(_0xf2ddxca,_0xf2ddxcb,_0xf2ddxc9)}};if(_0xf2ddxce){$(_0xaf82[248])[_0xaf82[247]](_0xaf82[246])[_0xaf82[245]](_0xaf82[244]);searching= false;toastr[_0xaf82[157]](Premadeletter29+ _0xaf82[271]+ Premadeletter13+ _0xaf82[272]+ Premadeletter14+ _0xaf82[172],_0xaf82[6],{timeOut:20000,extendedTimeOut:20000})[_0xaf82[73]](_0xaf82[71],_0xaf82[267]);$(_0xaf82[69])[_0xaf82[59]](_0xaf82[277])}else {changeServer();timerId= setInterval(function(){if(_0xf2ddxc5== _0xf2ddxc6){_0xf2ddxc5= 0;_0xf2ddxca= $(_0xaf82[238])[_0xaf82[76]]();if(_0xf2ddxcd== 1){_0xf2ddxce= foundName(_0xf2ddxca,_0xf2ddxc8)}else {if(_0xf2ddxcd> 1){_0xf2ddxce= foundNames(_0xf2ddxca,_0xf2ddxcb,_0xf2ddxc9)}};_0xf2ddxc4++;toastr[_0xaf82[270]](Premadeletter30+ _0xaf82[273]+ _0xf2ddxc4+ _0xaf82[192]+ _0xf2ddxc3)[_0xaf82[73]](_0xaf82[71],_0xaf82[267]);if(_0xf2ddxc4>= _0xf2ddxc3){clearInterval(timerId);searching= false;toastr[_0xaf82[173]](Premadeletter31)[_0xaf82[73]](_0xaf82[71],_0xaf82[267])};if(_0xf2ddxce){$(_0xaf82[248])[_0xaf82[247]](_0xaf82[246])[_0xaf82[245]](_0xaf82[244]);clearInterval(timerId);searching= false;toastr[_0xaf82[157]](Premadeletter29+ _0xaf82[271]+ Premadeletter13+ _0xaf82[272]+ Premadeletter14+ _0xaf82[172],_0xaf82[6],{timeOut:20000,extendedTimeOut:20000})[_0xaf82[73]](_0xaf82[71],_0xaf82[267])}else {changeServer()}}else {_0xf2ddxc5++}},_0xf2ddxc2)}}}else {clearInterval(timerId);searching= false;toastr[_0xaf82[173]](Premadeletter32)[_0xaf82[73]](_0xaf82[71],_0xaf82[267])}}function copyToClipboard(_0xf2ddxd0){var _0xf2ddxd1=$(_0xaf82[278]);$(_0xaf82[280])[_0xaf82[279]](_0xf2ddxd1);var _0xf2ddxd2=$(_0xf2ddxd0)[_0xaf82[281]]();_0xf2ddxd2= _0xf2ddxd2[_0xaf82[168]](/<br>/g,_0xaf82[282]);console[_0xaf82[283]](_0xf2ddxd2);_0xf2ddxd1[_0xaf82[59]](_0xf2ddxd2)[_0xaf82[284]]();document[_0xaf82[286]](_0xaf82[285]);_0xf2ddxd1[_0xaf82[176]]()}function copyToClipboardAll(){$(_0xaf82[287])[_0xaf82[176]]();if($(_0xaf82[288])[_0xaf82[76]]()!= _0xaf82[6]){$(_0xaf82[295])[_0xaf82[130]](_0xaf82[289]+ CopyTkPwLb2+ _0xaf82[290]+ $(_0xaf82[238])[_0xaf82[76]]()+ _0xaf82[291]+ $(_0xaf82[288])[_0xaf82[76]]()+ _0xaf82[292]+ $(_0xaf82[293])[_0xaf82[59]]()+ _0xaf82[294])}else {$(_0xaf82[295])[_0xaf82[130]](_0xaf82[289]+ CopyTkPwLb2+ _0xaf82[290]+ $(_0xaf82[238])[_0xaf82[76]]()+ _0xaf82[292]+ $(_0xaf82[293])[_0xaf82[59]]()+ _0xaf82[294])};copyToClipboard(_0xaf82[296])}function foundName(_0xf2ddxca,_0xf2ddx8b){return _0xf2ddxca[_0xaf82[55]](_0xf2ddx8b)}function playYoutube(){if(musicPlayer!= undefined){var playerState=musicPlayer[_0xaf82[297]]();if(playerState!= 1){musicPlayer[_0xaf82[298]]()}else {musicPlayer[_0xaf82[299]]()}}}function foundNames(_0xf2ddxca,_0xf2ddxcb,_0xf2ddxc9){var _0xf2ddxcd=_0xf2ddxcb[_0xaf82[140]];var _0xf2ddxd7=0;var _0xf2ddxce=false;for(var _0xf2ddxd8=0;_0xf2ddxd8< _0xf2ddxcd;_0xf2ddxd8++){_0xf2ddxce= foundName(_0xf2ddxca,_0xf2ddxcb[_0xf2ddxd8]);if(_0xf2ddxce){_0xf2ddxd7++}};return (_0xf2ddxd7>= _0xf2ddxc9)?true:false}function joinpartyfromconnect(_0xf2ddxa7){$(_0xaf82[227])[_0xaf82[59]]($(_0xaf82[300])[_0xaf82[59]]());$(_0xaf82[301])[_0xaf82[208]]();legendmod[_0xaf82[67]]= _0xaf82[68];return realmode= legendmod[_0xaf82[67]]}function BeforeReportFakesSkin(){ReportFakesSkin()}function ReportFakesSkin(){var _0xf2ddxdc;var _0xf2ddxdd;var _0xf2ddxde;var _0xf2ddxdf;if(_0xf2ddxde!= null){_0xf2ddxdd= _0xf2ddxde}else {_0xf2ddxdd= _0xaf82[302]};if(_0xf2ddxdf!= null){_0xf2ddxdc= _0xf2ddxdf}else {_0xf2ddxdc= _0xaf82[303]};$(_0xaf82[327])[_0xaf82[130]](_0xaf82[304]+ legbgpic+ _0xaf82[305]+ legbgcolor+ _0xaf82[306]+ _0xaf82[307]+ _0xaf82[308]+ Premadeletter119+ _0xaf82[309]+ _0xaf82[310]+ Premadeletter120+ _0xaf82[311]+ _0xf2ddxdd+ _0xaf82[312]+ _0xaf82[313]+ _0xaf82[314]+ _0xaf82[315]+ _0xaf82[316]+ _0xaf82[317]+ _0xaf82[318]+ _0xaf82[319]+ _0xaf82[320]+ _0xaf82[321]+ _0xaf82[322]+ _0xaf82[323]+ Premadeletter121+ _0xaf82[324]+ Premadeletter122+ _0xaf82[325]+ _0xaf82[326]);$(_0xaf82[329])[_0xaf82[73]](_0xaf82[71],_0xaf82[328]);$(_0xaf82[330])[_0xaf82[73]](_0xaf82[71],_0xaf82[328]);$(_0xaf82[331])[_0xaf82[73]](_0xaf82[71],_0xaf82[328]);$(_0xaf82[332])[_0xaf82[73]](_0xaf82[71],_0xaf82[328]);$(_0xaf82[333])[_0xaf82[73]](_0xaf82[71],_0xaf82[328]);$(_0xaf82[334])[_0xaf82[73]](_0xaf82[71],_0xaf82[328]);$(_0xaf82[335])[_0xaf82[73]](_0xaf82[71],_0xaf82[328]);$(_0xaf82[336])[_0xaf82[73]](_0xaf82[71],_0xaf82[328]);$(_0xaf82[337])[_0xaf82[73]](_0xaf82[71],_0xaf82[328]);$(_0xaf82[338])[_0xaf82[73]](_0xaf82[71],_0xaf82[328]);$(_0xaf82[340])[_0xaf82[130]](_0xaf82[339]+ Premadeletter113+ _0xaf82[172]);OthersSkinChanger();SkinBtnsPut();OpenSkinChanger()}function SkinBtnsPut(){$(_0xaf82[329])[_0xaf82[130]](_0xaf82[341]);$(_0xaf82[330])[_0xaf82[130]](_0xaf82[342]);$(_0xaf82[331])[_0xaf82[130]](_0xaf82[343]);$(_0xaf82[332])[_0xaf82[130]](_0xaf82[344]);$(_0xaf82[333])[_0xaf82[130]](_0xaf82[345]);$(_0xaf82[334])[_0xaf82[130]](_0xaf82[346]);$(_0xaf82[335])[_0xaf82[130]](_0xaf82[347]);$(_0xaf82[336])[_0xaf82[130]](_0xaf82[348]);$(_0xaf82[337])[_0xaf82[130]](_0xaf82[349]);$(_0xaf82[338])[_0xaf82[130]](_0xaf82[350]);$(_0xaf82[352])[_0xaf82[128]](_0xaf82[351]);$(_0xaf82[354])[_0xaf82[128]](_0xaf82[353]);$(_0xaf82[356])[_0xaf82[128]](_0xaf82[355]);$(_0xaf82[358])[_0xaf82[128]](_0xaf82[357]);$(_0xaf82[360])[_0xaf82[128]](_0xaf82[359]);$(_0xaf82[362])[_0xaf82[128]](_0xaf82[361]);$(_0xaf82[364])[_0xaf82[128]](_0xaf82[363]);$(_0xaf82[366])[_0xaf82[128]](_0xaf82[365]);$(_0xaf82[368])[_0xaf82[128]](_0xaf82[367]);$(_0xaf82[370])[_0xaf82[128]](_0xaf82[369])}function OthersSkinChanger(){for(var _0xf2ddxd8=0;_0xf2ddxd8< 10;_0xf2ddxd8++){var _0xf2ddxe2=_0xf2ddxd8+ 1;if(application[_0xaf82[371]][_0xf2ddxd8]){$(_0xaf82[373]+ _0xf2ddxe2)[_0xaf82[59]](application[_0xaf82[371]][_0xf2ddxd8][_0xaf82[372]])};if(legendmod[_0xaf82[374]][_0xf2ddxd8]){$(_0xaf82[375]+ _0xf2ddxe2)[_0xaf82[59]](legendmod[_0xaf82[374]][_0xf2ddxd8][_0xaf82[372]])}}}function exitSkinChanger(){$(_0xaf82[376])[_0xaf82[87]]();$(_0xaf82[377])[_0xaf82[87]]();$(_0xaf82[378])[_0xaf82[87]]();$(_0xaf82[379])[_0xaf82[87]]();$(_0xaf82[380])[_0xaf82[176]]()}function OpenSkinChanger(){$(_0xaf82[376])[_0xaf82[61]]();$(_0xaf82[377])[_0xaf82[61]]();$(_0xaf82[378])[_0xaf82[61]]();$(_0xaf82[379])[_0xaf82[61]]();$(_0xaf82[380])[_0xaf82[87]]()}function fakeSkinReport(_0xf2ddxe6){if(_0xf2ddxe6){ogarcopythelb[_0xaf82[381]]= ogarcopythelb[_0xaf82[382]];ogarcopythelb[_0xaf82[383]]= ogarcopythelb[_0xaf82[372]];ogarcopythelb[_0xaf82[384]]= ogario[_0xaf82[385]];ogarcopythelb[_0xaf82[386]]= ogario[_0xaf82[387]];ogarcopythelb[_0xaf82[372]]= _0xf2ddxe6;ogarcopythelb[_0xaf82[382]]= _0xaf82[388];ogario[_0xaf82[387]]= true;ogario[_0xaf82[385]]= true;application[_0xaf82[389]]();application[_0xaf82[390]]();application[_0xaf82[391]]();ogarcopythelb[_0xaf82[382]]= ogarcopythelb[_0xaf82[381]];ogarcopythelb[_0xaf82[372]]= ogarcopythelb[_0xaf82[383]];ogario[_0xaf82[385]]= ogarcopythelb[_0xaf82[384]];ogario[_0xaf82[387]]= ogarcopythelb[_0xaf82[386]];ogarcopythelb[_0xaf82[381]]= null;ogarcopythelb[_0xaf82[383]]= null;ogarcopythelb[_0xaf82[384]]= null;ogarcopythelb[_0xaf82[386]]= null}}function prevnamereturner(){return previousnickname= $(_0xaf82[293])[_0xaf82[59]]()}function ogarioplayfalse(){return ogario[_0xaf82[387]]= _0xaf82[116]}function Leader11(){fakeSkinReport($(_0xaf82[329])[_0xaf82[59]]())}function Leader12(){fakeSkinReport($(_0xaf82[330])[_0xaf82[59]]())}function Leader13(){fakeSkinReport($(_0xaf82[331])[_0xaf82[59]]())}function Leader14(){fakeSkinReport($(_0xaf82[332])[_0xaf82[59]]())}function Leader15(){fakeSkinReport($(_0xaf82[333])[_0xaf82[59]]())}function Leader16(){fakeSkinReport($(_0xaf82[334])[_0xaf82[59]]())}function Leader17(){fakeSkinReport($(_0xaf82[335])[_0xaf82[59]]())}function Leader18(){fakeSkinReport($(_0xaf82[336])[_0xaf82[59]]())}function Leader19(){fakeSkinReport($(_0xaf82[337])[_0xaf82[59]]())}function Leader20(){fakeSkinReport($(_0xaf82[338])[_0xaf82[59]]())}function Teamer11(){fakeSkinReport($(_0xaf82[352])[_0xaf82[59]]())}function Teamer12(){fakeSkinReport($(_0xaf82[354])[_0xaf82[59]]())}function Teamer13(){fakeSkinReport($(_0xaf82[356])[_0xaf82[59]]())}function Teamer14(){fakeSkinReport($(_0xaf82[358])[_0xaf82[59]]())}function Teamer15(){fakeSkinReport($(_0xaf82[360])[_0xaf82[59]]())}function Teamer16(){fakeSkinReport($(_0xaf82[362])[_0xaf82[59]]())}function Teamer17(){fakeSkinReport($(_0xaf82[364])[_0xaf82[59]]())}function Teamer18(){fakeSkinReport($(_0xaf82[366])[_0xaf82[59]]())}function Teamer19(){fakeSkinReport($(_0xaf82[368])[_0xaf82[59]]())}function Teamer20(){fakeSkinReport($(_0xaf82[370])[_0xaf82[59]]())}function copy(_0xf2ddxfe){$(_0xaf82[392])[_0xaf82[59]](_0xf2ddxfe);$(_0xaf82[392])[_0xaf82[87]]();$(_0xaf82[392])[_0xaf82[284]]();document[_0xaf82[286]](_0xaf82[285]);$(_0xaf82[392])[_0xaf82[61]]();$(_0xaf82[392])[_0xaf82[59]](_0xaf82[6])}function LegendSettingsfirst(){$(_0xaf82[394])[_0xaf82[128]](_0xaf82[393]);var _0xf2ddx100=document[_0xaf82[396]](_0xaf82[395]);var _0xf2ddx101=$(_0xaf82[399])[_0xaf82[398]]()[_0xaf82[73]](_0xaf82[397]);var switcheryLegendSwitch= new Switchery(_0xf2ddx100,{size:_0xaf82[400],color:_0xf2ddx101,jackColor:_0xaf82[401]});$(_0xaf82[403])[_0xaf82[128]](_0xaf82[402]);var _0xf2ddx102=document[_0xaf82[396]](_0xaf82[404]);var switcheryLegendSwitch2= new Switchery(_0xf2ddx102,{size:_0xaf82[400],color:_0xf2ddx101,jackColor:_0xaf82[401]});LegendJSON= JSON[_0xaf82[107]](document[_0xaf82[407]](_0xaf82[406])[_0xaf82[405]]);LegendSettingsfirstAPI(LegendJSON,switcheryLegendSwitch);$(_0xaf82[408])[_0xaf82[208]](function(){LegendSettingsfirstAPI(LegendJSON,switcheryLegendSwitch);setTimeout(function(){copy($(_0xaf82[394])[_0xaf82[59]]())},200)});$(_0xaf82[410])[_0xaf82[412]]()[_0xaf82[411]](_0xaf82[410])[_0xaf82[206]](_0xaf82[144],_0xaf82[409]);$(_0xaf82[410])[_0xaf82[61]]();$(_0xaf82[413])[_0xaf82[208]](function(){LegendSettingsImport(switcheryLegendSwitch2);return switcheryLegendSwitch,switcheryLegendSwitch2})}function LegendSettingsfirstAPI(LegendJSON,switcheryLegendSwitch){setTimeout(function(){if(switcheryLegendSwitch[_0xaf82[414]]()){LegendJSON= JSON[_0xaf82[107]](document[_0xaf82[407]](_0xaf82[406])[_0xaf82[405]]);parseLegendJSONAPI(LegendJSON);var _0xf2ddx104=JSON[_0xaf82[415]](LegendJSON,null,4);document[_0xaf82[407]](_0xaf82[406])[_0xaf82[405]]= _0xf2ddx104}else {LegendJSON= JSON[_0xaf82[107]](document[_0xaf82[407]](_0xaf82[406])[_0xaf82[405]]);parseLegendJSONAPI(LegendJSON);delete LegendJSON[_0xaf82[416]];var _0xf2ddx104=JSON[_0xaf82[415]](LegendJSON,null,4);document[_0xaf82[407]](_0xaf82[406])[_0xaf82[405]]= _0xf2ddx104};return LegendJSON},100)}function parseLegendJSONAPI(LegendJSON){LegendJSON[_0xaf82[416]]= {};LegendJSON[_0xaf82[416]][_0xaf82[417]]= localStorage[_0xaf82[3]](_0xaf82[7]);LegendJSON[_0xaf82[416]][_0xaf82[8]]= localStorage[_0xaf82[3]](_0xaf82[8]);LegendJSON[_0xaf82[416]][_0xaf82[39]]= localStorage[_0xaf82[3]](_0xaf82[39]);LegendJSON[_0xaf82[416]][_0xaf82[418]]= localStorage[_0xaf82[3]](_0xaf82[45]);LegendJSON[_0xaf82[416]][_0xaf82[46]]= localStorage[_0xaf82[3]](_0xaf82[46]);LegendJSON[_0xaf82[416]][_0xaf82[47]]= localStorage[_0xaf82[3]](_0xaf82[47]);LegendJSON[_0xaf82[416]][_0xaf82[48]]= localStorage[_0xaf82[3]](_0xaf82[48]);LegendJSON[_0xaf82[416]][_0xaf82[49]]= localStorage[_0xaf82[3]](_0xaf82[49]);LegendJSON[_0xaf82[416]][_0xaf82[50]]= localStorage[_0xaf82[3]](_0xaf82[50]);LegendJSON[_0xaf82[416]][_0xaf82[51]]= localStorage[_0xaf82[3]](_0xaf82[51]);LegendJSON[_0xaf82[416]][_0xaf82[52]]= localStorage[_0xaf82[3]](_0xaf82[52]);LegendJSON[_0xaf82[416]][_0xaf82[105]]= localStorage[_0xaf82[3]](_0xaf82[105]);LegendJSON[_0xaf82[416]][_0xaf82[113]]= localStorage[_0xaf82[3]](_0xaf82[113]);LegendJSON[_0xaf82[416]][_0xaf82[419]]= localStorage[_0xaf82[3]](_0xaf82[420]);if(LegendJSON[_0xaf82[416]][_0xaf82[419]]== _0xaf82[4]|| LegendJSON[_0xaf82[416]][_0xaf82[419]]== null){LegendJSON[_0xaf82[416]][_0xaf82[419]]= defaultMusicUrl};LegendJSON[_0xaf82[416]][_0xaf82[38]]= localStorage[_0xaf82[3]](_0xaf82[38]);if(LegendJSON[_0xaf82[416]][_0xaf82[38]]== _0xaf82[4]|| LegendJSON[_0xaf82[416]][_0xaf82[38]]== null){LegendJSON[_0xaf82[416]][_0xaf82[38]]= _0xaf82[5]};LegendJSON[_0xaf82[416]][_0xaf82[421]]= localStorage[_0xaf82[3]](_0xaf82[421]);if(LegendJSON[_0xaf82[416]][_0xaf82[421]]== _0xaf82[4]|| LegendJSON[_0xaf82[416]][_0xaf82[421]]== null){LegendJSON[_0xaf82[416]][_0xaf82[421]]= _0xaf82[6]};LegendJSON[_0xaf82[416]][_0xaf82[422]]= localStorage[_0xaf82[3]](_0xaf82[422]);if(LegendJSON[_0xaf82[416]][_0xaf82[422]]== _0xaf82[4]|| LegendJSON[_0xaf82[416]][_0xaf82[422]]== null){LegendJSON[_0xaf82[416]][_0xaf82[422]]= _0xaf82[6]};LegendJSON[_0xaf82[416]][_0xaf82[423]]= localStorage[_0xaf82[3]](_0xaf82[423]);if(LegendJSON[_0xaf82[416]][_0xaf82[423]]== _0xaf82[4]|| LegendJSON[_0xaf82[416]][_0xaf82[423]]== null){LegendJSON[_0xaf82[416]][_0xaf82[423]]= _0xaf82[6]};LegendJSON[_0xaf82[416]][_0xaf82[424]]= localStorage[_0xaf82[3]](_0xaf82[424]);if(LegendJSON[_0xaf82[416]][_0xaf82[424]]== _0xaf82[4]|| LegendJSON[_0xaf82[416]][_0xaf82[424]]== null){LegendJSON[_0xaf82[416]][_0xaf82[424]]= _0xaf82[6]};LegendJSON[_0xaf82[416]][_0xaf82[425]]= localStorage[_0xaf82[3]](_0xaf82[425]);if(LegendJSON[_0xaf82[416]][_0xaf82[425]]== _0xaf82[4]|| LegendJSON[_0xaf82[416]][_0xaf82[425]]== null){LegendJSON[_0xaf82[416]][_0xaf82[425]]= _0xaf82[6]};LegendJSON[_0xaf82[416]][_0xaf82[426]]= localStorage[_0xaf82[3]](_0xaf82[426]);if(LegendJSON[_0xaf82[416]][_0xaf82[426]]== _0xaf82[4]|| LegendJSON[_0xaf82[416]][_0xaf82[426]]== null){LegendJSON[_0xaf82[416]][_0xaf82[426]]= _0xaf82[6]};LegendJSON[_0xaf82[416]][_0xaf82[427]]= localStorage[_0xaf82[3]](_0xaf82[427]);if(LegendJSON[_0xaf82[416]][_0xaf82[427]]== _0xaf82[4]|| LegendJSON[_0xaf82[416]][_0xaf82[427]]== null){LegendJSON[_0xaf82[416]][_0xaf82[427]]= _0xaf82[6]};LegendJSON[_0xaf82[416]][_0xaf82[428]]= localStorage[_0xaf82[3]](_0xaf82[428]);if(LegendJSON[_0xaf82[416]][_0xaf82[428]]== _0xaf82[4]|| LegendJSON[_0xaf82[416]][_0xaf82[428]]== null){LegendJSON[_0xaf82[416]][_0xaf82[428]]= _0xaf82[6]};LegendJSON[_0xaf82[416]][_0xaf82[429]]= localStorage[_0xaf82[3]](_0xaf82[429]);if(LegendJSON[_0xaf82[416]][_0xaf82[429]]== _0xaf82[4]|| LegendJSON[_0xaf82[416]][_0xaf82[429]]== null){LegendJSON[_0xaf82[416]][_0xaf82[429]]= _0xaf82[6]};LegendJSON[_0xaf82[416]][_0xaf82[430]]= localStorage[_0xaf82[3]](_0xaf82[430]);if(LegendJSON[_0xaf82[416]][_0xaf82[430]]== _0xaf82[4]|| LegendJSON[_0xaf82[416]][_0xaf82[430]]== null){LegendJSON[_0xaf82[416]][_0xaf82[430]]= _0xaf82[6]};LegendJSON[_0xaf82[416]][_0xaf82[41]]= localStorage[_0xaf82[3]](_0xaf82[41]);if(LegendJSON[_0xaf82[416]][_0xaf82[41]]== _0xaf82[4]|| LegendJSON[_0xaf82[416]][_0xaf82[41]]== null){LegendJSON[_0xaf82[416]][_0xaf82[41]]= _0xaf82[6]};LegendJSON[_0xaf82[416]][_0xaf82[431]]= localStorage[_0xaf82[3]](_0xaf82[431]);if(LegendJSON[_0xaf82[416]][_0xaf82[431]]== _0xaf82[4]|| LegendJSON[_0xaf82[416]][_0xaf82[431]]== null){LegendJSON[_0xaf82[416]][_0xaf82[431]]= _0xaf82[6]};LegendJSON[_0xaf82[416]][_0xaf82[42]]= localStorage[_0xaf82[3]](_0xaf82[42]);if(LegendJSON[_0xaf82[416]][_0xaf82[42]]== _0xaf82[4]|| LegendJSON[_0xaf82[416]][_0xaf82[42]]== null){LegendJSON[_0xaf82[416]][_0xaf82[42]]= _0xaf82[6]};LegendJSON[_0xaf82[416]][_0xaf82[43]]= localStorage[_0xaf82[3]](_0xaf82[43]);if(LegendJSON[_0xaf82[416]][_0xaf82[43]]== _0xaf82[4]|| LegendJSON[_0xaf82[416]][_0xaf82[43]]== null){LegendJSON[_0xaf82[416]][_0xaf82[43]]= _0xaf82[6]};LegendJSON[_0xaf82[416]][_0xaf82[44]]= localStorage[_0xaf82[3]](_0xaf82[44]);if(LegendJSON[_0xaf82[416]][_0xaf82[44]]== _0xaf82[4]|| LegendJSON[_0xaf82[416]][_0xaf82[44]]== null){LegendJSON[_0xaf82[416]][_0xaf82[44]]= _0xaf82[6]};LegendJSON[_0xaf82[416]][_0xaf82[40]]= localStorage[_0xaf82[3]](_0xaf82[40]);if(LegendJSON[_0xaf82[416]][_0xaf82[40]]== _0xaf82[4]|| LegendJSON[_0xaf82[416]][_0xaf82[40]]== null){LegendJSON[_0xaf82[416]][_0xaf82[40]]= _0xaf82[6]};LegendJSON[_0xaf82[416]][_0xaf82[432]]= localStorage[_0xaf82[3]](_0xaf82[432]);if(LegendJSON[_0xaf82[416]][_0xaf82[432]]== _0xaf82[4]|| LegendJSON[_0xaf82[416]][_0xaf82[432]]== null){LegendJSON[_0xaf82[416]][_0xaf82[432]]= _0xaf82[6]};LegendJSON[_0xaf82[416]][_0xaf82[433]]= localStorage[_0xaf82[3]](_0xaf82[433]);if(LegendJSON[_0xaf82[416]][_0xaf82[433]]== _0xaf82[4]|| LegendJSON[_0xaf82[416]][_0xaf82[433]]== null){LegendJSON[_0xaf82[416]][_0xaf82[433]]= _0xaf82[6]};LegendJSON[_0xaf82[416]][_0xaf82[434]]= localStorage[_0xaf82[3]](_0xaf82[434]);if(LegendJSON[_0xaf82[416]][_0xaf82[434]]== _0xaf82[4]|| LegendJSON[_0xaf82[416]][_0xaf82[434]]== null){LegendJSON[_0xaf82[416]][_0xaf82[434]]= _0xaf82[6]};LegendJSON[_0xaf82[416]][_0xaf82[435]]= localStorage[_0xaf82[3]](_0xaf82[435]);if(LegendJSON[_0xaf82[416]][_0xaf82[435]]== _0xaf82[4]|| LegendJSON[_0xaf82[416]][_0xaf82[435]]== null){LegendJSON[_0xaf82[416]][_0xaf82[435]]= _0xaf82[6]};LegendJSON[_0xaf82[416]][_0xaf82[436]]= localStorage[_0xaf82[3]](_0xaf82[436]);if(LegendJSON[_0xaf82[416]][_0xaf82[436]]== _0xaf82[4]|| LegendJSON[_0xaf82[416]][_0xaf82[436]]== null){LegendJSON[_0xaf82[416]][_0xaf82[436]]= _0xaf82[6]};LegendJSON[_0xaf82[416]][_0xaf82[437]]= localStorage[_0xaf82[3]](_0xaf82[437]);if(LegendJSON[_0xaf82[416]][_0xaf82[437]]== _0xaf82[4]|| LegendJSON[_0xaf82[416]][_0xaf82[437]]== null){LegendJSON[_0xaf82[416]][_0xaf82[437]]= _0xaf82[6]};LegendJSON[_0xaf82[416]][_0xaf82[438]]= localStorage[_0xaf82[3]](_0xaf82[438]);if(LegendJSON[_0xaf82[416]][_0xaf82[438]]== _0xaf82[4]|| LegendJSON[_0xaf82[416]][_0xaf82[438]]== null){LegendJSON[_0xaf82[416]][_0xaf82[438]]= _0xaf82[6]};LegendJSON[_0xaf82[416]][_0xaf82[439]]= localStorage[_0xaf82[3]](_0xaf82[439]);if(LegendJSON[_0xaf82[416]][_0xaf82[439]]== _0xaf82[4]|| LegendJSON[_0xaf82[416]][_0xaf82[439]]== null){LegendJSON[_0xaf82[416]][_0xaf82[439]]= _0xaf82[6]};LegendJSON[_0xaf82[416]][_0xaf82[440]]= localStorage[_0xaf82[3]](_0xaf82[440]);if(LegendJSON[_0xaf82[416]][_0xaf82[440]]== _0xaf82[4]|| LegendJSON[_0xaf82[416]][_0xaf82[440]]== null){LegendJSON[_0xaf82[416]][_0xaf82[440]]= _0xaf82[6]};LegendJSON[_0xaf82[416]][_0xaf82[441]]= localStorage[_0xaf82[3]](_0xaf82[441]);if(LegendJSON[_0xaf82[416]][_0xaf82[441]]== _0xaf82[4]|| LegendJSON[_0xaf82[416]][_0xaf82[441]]== null){LegendJSON[_0xaf82[416]][_0xaf82[441]]= _0xaf82[6]};LegendJSON[_0xaf82[416]][_0xaf82[442]]= localStorage[_0xaf82[3]](_0xaf82[442]);if(LegendJSON[_0xaf82[416]][_0xaf82[442]]== _0xaf82[4]|| LegendJSON[_0xaf82[416]][_0xaf82[442]]== null){LegendJSON[_0xaf82[416]][_0xaf82[442]]= _0xaf82[6]};LegendJSON[_0xaf82[416]][_0xaf82[443]]= localStorage[_0xaf82[3]](_0xaf82[443]);if(LegendJSON[_0xaf82[416]][_0xaf82[443]]== _0xaf82[4]|| LegendJSON[_0xaf82[416]][_0xaf82[443]]== null){LegendJSON[_0xaf82[416]][_0xaf82[443]]= _0xaf82[6]};LegendJSON[_0xaf82[416]][_0xaf82[444]]= localStorage[_0xaf82[3]](_0xaf82[444]);if(LegendJSON[_0xaf82[416]][_0xaf82[444]]== _0xaf82[4]|| LegendJSON[_0xaf82[416]][_0xaf82[444]]== null){LegendJSON[_0xaf82[416]][_0xaf82[444]]= _0xaf82[6]};LegendJSON[_0xaf82[416]][_0xaf82[445]]= localStorage[_0xaf82[3]](_0xaf82[445]);if(LegendJSON[_0xaf82[416]][_0xaf82[445]]== _0xaf82[4]|| LegendJSON[_0xaf82[416]][_0xaf82[445]]== null){LegendJSON[_0xaf82[416]][_0xaf82[445]]= _0xaf82[6]};LegendJSON[_0xaf82[416]][_0xaf82[446]]= localStorage[_0xaf82[3]](_0xaf82[446]);if(LegendJSON[_0xaf82[416]][_0xaf82[446]]== _0xaf82[4]|| LegendJSON[_0xaf82[416]][_0xaf82[446]]== null){LegendJSON[_0xaf82[416]][_0xaf82[446]]= _0xaf82[6]};LegendJSON[_0xaf82[416]][_0xaf82[447]]= localStorage[_0xaf82[3]](_0xaf82[447]);if(LegendJSON[_0xaf82[416]][_0xaf82[447]]== _0xaf82[4]|| LegendJSON[_0xaf82[416]][_0xaf82[447]]== null){LegendJSON[_0xaf82[416]][_0xaf82[447]]= _0xaf82[6]};LegendJSON[_0xaf82[416]][_0xaf82[448]]= localStorage[_0xaf82[3]](_0xaf82[448]);if(LegendJSON[_0xaf82[416]][_0xaf82[448]]== _0xaf82[4]|| LegendJSON[_0xaf82[416]][_0xaf82[448]]== null){LegendJSON[_0xaf82[416]][_0xaf82[448]]= _0xaf82[6]};LegendJSON[_0xaf82[416]][_0xaf82[449]]= localStorage[_0xaf82[3]](_0xaf82[449]);if(LegendJSON[_0xaf82[416]][_0xaf82[449]]== _0xaf82[4]|| LegendJSON[_0xaf82[416]][_0xaf82[449]]== null){LegendJSON[_0xaf82[416]][_0xaf82[449]]= _0xaf82[6]};LegendJSON[_0xaf82[416]][_0xaf82[450]]= localStorage[_0xaf82[3]](_0xaf82[450]);if(LegendJSON[_0xaf82[416]][_0xaf82[450]]== _0xaf82[4]|| LegendJSON[_0xaf82[416]][_0xaf82[450]]== null){LegendJSON[_0xaf82[416]][_0xaf82[450]]= _0xaf82[6]};LegendJSON[_0xaf82[416]][_0xaf82[451]]= localStorage[_0xaf82[3]](_0xaf82[451]);if(LegendJSON[_0xaf82[416]][_0xaf82[451]]== _0xaf82[4]|| LegendJSON[_0xaf82[416]][_0xaf82[451]]== null){LegendJSON[_0xaf82[416]][_0xaf82[451]]= _0xaf82[6]};LegendJSON[_0xaf82[416]][_0xaf82[452]]= localStorage[_0xaf82[3]](_0xaf82[452]);if(LegendJSON[_0xaf82[416]][_0xaf82[452]]== _0xaf82[4]|| LegendJSON[_0xaf82[416]][_0xaf82[452]]== null){LegendJSON[_0xaf82[416]][_0xaf82[452]]= _0xaf82[6]};LegendJSON[_0xaf82[416]][_0xaf82[453]]= localStorage[_0xaf82[3]](_0xaf82[453]);if(LegendJSON[_0xaf82[416]][_0xaf82[453]]== _0xaf82[4]|| LegendJSON[_0xaf82[416]][_0xaf82[453]]== null){LegendJSON[_0xaf82[416]][_0xaf82[453]]= _0xaf82[6]};LegendJSON[_0xaf82[416]][_0xaf82[454]]= localStorage[_0xaf82[3]](_0xaf82[454]);if(LegendJSON[_0xaf82[416]][_0xaf82[454]]== _0xaf82[4]|| LegendJSON[_0xaf82[416]][_0xaf82[454]]== null){LegendJSON[_0xaf82[416]][_0xaf82[454]]= _0xaf82[6]};LegendJSON[_0xaf82[416]][_0xaf82[455]]= localStorage[_0xaf82[3]](_0xaf82[455]);if(LegendJSON[_0xaf82[416]][_0xaf82[455]]== _0xaf82[4]|| LegendJSON[_0xaf82[416]][_0xaf82[455]]== null){LegendJSON[_0xaf82[416]][_0xaf82[455]]= _0xaf82[6]};LegendJSON[_0xaf82[416]][_0xaf82[456]]= localStorage[_0xaf82[3]](_0xaf82[456]);if(LegendJSON[_0xaf82[416]][_0xaf82[456]]== _0xaf82[4]|| LegendJSON[_0xaf82[416]][_0xaf82[456]]== null){LegendJSON[_0xaf82[416]][_0xaf82[456]]= _0xaf82[6]};LegendJSON[_0xaf82[416]][_0xaf82[457]]= localStorage[_0xaf82[3]](_0xaf82[457]);if(LegendJSON[_0xaf82[416]][_0xaf82[457]]== _0xaf82[4]|| LegendJSON[_0xaf82[416]][_0xaf82[457]]== null){LegendJSON[_0xaf82[416]][_0xaf82[457]]= _0xaf82[6]};LegendJSON[_0xaf82[416]][_0xaf82[458]]= localStorage[_0xaf82[3]](_0xaf82[458]);if(LegendJSON[_0xaf82[416]][_0xaf82[458]]== _0xaf82[4]|| LegendJSON[_0xaf82[416]][_0xaf82[458]]== null){LegendJSON[_0xaf82[416]][_0xaf82[458]]= _0xaf82[6]};LegendJSON[_0xaf82[416]][_0xaf82[459]]= localStorage[_0xaf82[3]](_0xaf82[459]);if(LegendJSON[_0xaf82[416]][_0xaf82[459]]== _0xaf82[4]|| LegendJSON[_0xaf82[416]][_0xaf82[459]]== null){LegendJSON[_0xaf82[416]][_0xaf82[459]]= _0xaf82[6]};LegendJSON[_0xaf82[416]][_0xaf82[460]]= localStorage[_0xaf82[3]](_0xaf82[460]);if(LegendJSON[_0xaf82[416]][_0xaf82[460]]== _0xaf82[4]|| LegendJSON[_0xaf82[416]][_0xaf82[460]]== null){LegendJSON[_0xaf82[416]][_0xaf82[460]]= _0xaf82[6]};LegendJSON[_0xaf82[416]][_0xaf82[461]]= localStorage[_0xaf82[3]](_0xaf82[461]);if(LegendJSON[_0xaf82[416]][_0xaf82[461]]== _0xaf82[4]|| LegendJSON[_0xaf82[416]][_0xaf82[461]]== null){LegendJSON[_0xaf82[416]][_0xaf82[461]]= _0xaf82[6]};LegendJSON[_0xaf82[416]][_0xaf82[462]]= localStorage[_0xaf82[3]](_0xaf82[462]);if(LegendJSON[_0xaf82[416]][_0xaf82[462]]== _0xaf82[4]|| LegendJSON[_0xaf82[416]][_0xaf82[462]]== null){LegendJSON[_0xaf82[416]][_0xaf82[462]]= _0xaf82[6]};LegendJSON[_0xaf82[416]][_0xaf82[463]]= localStorage[_0xaf82[3]](_0xaf82[463]);if(LegendJSON[_0xaf82[416]][_0xaf82[463]]== _0xaf82[4]|| LegendJSON[_0xaf82[416]][_0xaf82[463]]== null){LegendJSON[_0xaf82[416]][_0xaf82[463]]= _0xaf82[6]};LegendJSON[_0xaf82[416]][_0xaf82[464]]= localStorage[_0xaf82[3]](_0xaf82[464]);if(LegendJSON[_0xaf82[416]][_0xaf82[464]]== _0xaf82[4]|| LegendJSON[_0xaf82[416]][_0xaf82[464]]== null){LegendJSON[_0xaf82[416]][_0xaf82[464]]= _0xaf82[6]};LegendJSON[_0xaf82[416]][_0xaf82[465]]= localStorage[_0xaf82[3]](_0xaf82[465]);if(LegendJSON[_0xaf82[416]][_0xaf82[465]]== _0xaf82[4]|| LegendJSON[_0xaf82[416]][_0xaf82[465]]== null){LegendJSON[_0xaf82[416]][_0xaf82[465]]= _0xaf82[6]};LegendJSON[_0xaf82[416]][_0xaf82[466]]= localStorage[_0xaf82[3]](_0xaf82[466]);if(LegendJSON[_0xaf82[416]][_0xaf82[466]]== _0xaf82[4]|| LegendJSON[_0xaf82[416]][_0xaf82[466]]== null){LegendJSON[_0xaf82[416]][_0xaf82[466]]= _0xaf82[6]};LegendJSON[_0xaf82[416]][_0xaf82[467]]= localStorage[_0xaf82[3]](_0xaf82[467]);if(LegendJSON[_0xaf82[416]][_0xaf82[467]]== _0xaf82[4]|| LegendJSON[_0xaf82[416]][_0xaf82[467]]== null){LegendJSON[_0xaf82[416]][_0xaf82[467]]= _0xaf82[6]};return LegendJSON}function LegendSettingsImport(switcheryLegendSwitch2){if(switcheryLegendSwitch2[_0xaf82[414]]()){LegendJSON= JSON[_0xaf82[107]](document[_0xaf82[407]](_0xaf82[468])[_0xaf82[405]]);saveLegendJSONAPI();setTimeout(function(){$(_0xaf82[410])[_0xaf82[208]]()},100)}else {$(_0xaf82[410])[_0xaf82[208]]()}}function saveLegendJSONAPI(){if(LegendJSON[_0xaf82[416]]!= undefined){localStorage[_0xaf82[117]](_0xaf82[7],LegendJSON[_0xaf82[416]][_0xaf82[417]]);localStorage[_0xaf82[117]](_0xaf82[8],LegendJSON[_0xaf82[416]][_0xaf82[8]]);localStorage[_0xaf82[117]](_0xaf82[39],LegendJSON[_0xaf82[416]][_0xaf82[39]]);localStorage[_0xaf82[117]](_0xaf82[45],LegendJSON[_0xaf82[416]][_0xaf82[418]]);localStorage[_0xaf82[117]](_0xaf82[46],LegendJSON[_0xaf82[416]][_0xaf82[46]]);localStorage[_0xaf82[117]](_0xaf82[47],LegendJSON[_0xaf82[416]].SHOSHOBtn);localStorage[_0xaf82[117]](_0xaf82[48],LegendJSON[_0xaf82[416]].XPBtn);localStorage[_0xaf82[117]](_0xaf82[49],LegendJSON[_0xaf82[416]].MAINBTBtn);localStorage[_0xaf82[117]](_0xaf82[50],LegendJSON[_0xaf82[416]].AnimatedSkinBtn);localStorage[_0xaf82[117]](_0xaf82[51],LegendJSON[_0xaf82[416]].TIMEcalBtn);localStorage[_0xaf82[117]](_0xaf82[52],LegendJSON[_0xaf82[416]][_0xaf82[52]]);localStorage[_0xaf82[117]](_0xaf82[105],LegendJSON[_0xaf82[416]][_0xaf82[105]]);localStorage[_0xaf82[117]](_0xaf82[113],LegendJSON[_0xaf82[416]][_0xaf82[113]]);localStorage[_0xaf82[117]](_0xaf82[420],LegendJSON[_0xaf82[416]][_0xaf82[419]]);localStorage[_0xaf82[117]](_0xaf82[38],LegendJSON[_0xaf82[416]][_0xaf82[38]]);localStorage[_0xaf82[117]](_0xaf82[421],LegendJSON[_0xaf82[416]][_0xaf82[421]]);localStorage[_0xaf82[117]](_0xaf82[422],LegendJSON[_0xaf82[416]][_0xaf82[422]]);localStorage[_0xaf82[117]](_0xaf82[423],LegendJSON[_0xaf82[416]][_0xaf82[423]]);localStorage[_0xaf82[117]](_0xaf82[424],LegendJSON[_0xaf82[416]][_0xaf82[424]]);localStorage[_0xaf82[117]](_0xaf82[425],LegendJSON[_0xaf82[416]][_0xaf82[425]]);localStorage[_0xaf82[117]](_0xaf82[426],LegendJSON[_0xaf82[416]][_0xaf82[426]]);localStorage[_0xaf82[117]](_0xaf82[427],LegendJSON[_0xaf82[416]][_0xaf82[427]]);localStorage[_0xaf82[117]](_0xaf82[428],LegendJSON[_0xaf82[416]][_0xaf82[428]]);localStorage[_0xaf82[117]](_0xaf82[429],LegendJSON[_0xaf82[416]][_0xaf82[429]]);localStorage[_0xaf82[117]](_0xaf82[430],LegendJSON[_0xaf82[416]][_0xaf82[430]]);localStorage[_0xaf82[117]](_0xaf82[41],LegendJSON[_0xaf82[416]][_0xaf82[41]]);localStorage[_0xaf82[117]](_0xaf82[431],LegendJSON[_0xaf82[416]][_0xaf82[431]]);localStorage[_0xaf82[117]](_0xaf82[42],LegendJSON[_0xaf82[416]][_0xaf82[42]]);localStorage[_0xaf82[117]](_0xaf82[43],LegendJSON[_0xaf82[416]][_0xaf82[43]]);localStorage[_0xaf82[117]](_0xaf82[44],LegendJSON[_0xaf82[416]][_0xaf82[44]]);localStorage[_0xaf82[117]](_0xaf82[40],LegendJSON[_0xaf82[416]][_0xaf82[40]]);localStorage[_0xaf82[117]](_0xaf82[432],LegendJSON[_0xaf82[416]][_0xaf82[432]]);localStorage[_0xaf82[117]](_0xaf82[433],LegendJSON[_0xaf82[416]][_0xaf82[433]]);localStorage[_0xaf82[117]](_0xaf82[434],LegendJSON[_0xaf82[416]][_0xaf82[434]]);localStorage[_0xaf82[117]](_0xaf82[435],LegendJSON[_0xaf82[416]][_0xaf82[435]]);localStorage[_0xaf82[117]](_0xaf82[436],LegendJSON[_0xaf82[416]][_0xaf82[436]]);localStorage[_0xaf82[117]](_0xaf82[437],LegendJSON[_0xaf82[416]][_0xaf82[437]]);localStorage[_0xaf82[117]](_0xaf82[438],LegendJSON[_0xaf82[416]][_0xaf82[438]]);localStorage[_0xaf82[117]](_0xaf82[439],LegendJSON[_0xaf82[416]][_0xaf82[439]]);localStorage[_0xaf82[117]](_0xaf82[440],LegendJSON[_0xaf82[416]][_0xaf82[440]]);localStorage[_0xaf82[117]](_0xaf82[441],LegendJSON[_0xaf82[416]][_0xaf82[441]]);localStorage[_0xaf82[117]](_0xaf82[442],LegendJSON[_0xaf82[416]][_0xaf82[442]]);localStorage[_0xaf82[117]](_0xaf82[443],LegendJSON[_0xaf82[416]][_0xaf82[443]]);localStorage[_0xaf82[117]](_0xaf82[444],LegendJSON[_0xaf82[416]][_0xaf82[444]]);localStorage[_0xaf82[117]](_0xaf82[445],LegendJSON[_0xaf82[416]][_0xaf82[445]]);localStorage[_0xaf82[117]](_0xaf82[446],LegendJSON[_0xaf82[416]][_0xaf82[446]]);localStorage[_0xaf82[117]](_0xaf82[447],LegendJSON[_0xaf82[416]][_0xaf82[447]]);localStorage[_0xaf82[117]](_0xaf82[448],LegendJSON[_0xaf82[416]][_0xaf82[448]]);localStorage[_0xaf82[117]](_0xaf82[449],LegendJSON[_0xaf82[416]][_0xaf82[449]]);localStorage[_0xaf82[117]](_0xaf82[450],LegendJSON[_0xaf82[416]][_0xaf82[450]]);localStorage[_0xaf82[117]](_0xaf82[451],LegendJSON[_0xaf82[416]][_0xaf82[451]]);localStorage[_0xaf82[117]](_0xaf82[452],LegendJSON[_0xaf82[416]][_0xaf82[452]]);localStorage[_0xaf82[117]](_0xaf82[453],LegendJSON[_0xaf82[416]][_0xaf82[453]]);localStorage[_0xaf82[117]](_0xaf82[454],LegendJSON[_0xaf82[416]][_0xaf82[454]]);localStorage[_0xaf82[117]](_0xaf82[455],LegendJSON[_0xaf82[416]][_0xaf82[455]]);localStorage[_0xaf82[117]](_0xaf82[456],LegendJSON[_0xaf82[416]][_0xaf82[456]]);localStorage[_0xaf82[117]](_0xaf82[457],LegendJSON[_0xaf82[416]][_0xaf82[457]]);localStorage[_0xaf82[117]](_0xaf82[458],LegendJSON[_0xaf82[416]].Userscript1);localStorage[_0xaf82[117]](_0xaf82[459],LegendJSON[_0xaf82[416]].Userscript2);localStorage[_0xaf82[117]](_0xaf82[460],LegendJSON[_0xaf82[416]].Userscript3);localStorage[_0xaf82[117]](_0xaf82[461],LegendJSON[_0xaf82[416]].Userscript4);localStorage[_0xaf82[117]](_0xaf82[462],LegendJSON[_0xaf82[416]].Userscript5);localStorage[_0xaf82[117]](_0xaf82[463],LegendJSON[_0xaf82[416]].Userscripttexture1);localStorage[_0xaf82[117]](_0xaf82[464],LegendJSON[_0xaf82[416]].Userscripttexture2);localStorage[_0xaf82[117]](_0xaf82[465],LegendJSON[_0xaf82[416]].Userscripttexture3);localStorage[_0xaf82[117]](_0xaf82[466],LegendJSON[_0xaf82[416]].Userscripttexture4);localStorage[_0xaf82[117]](_0xaf82[467],LegendJSON[_0xaf82[416]].Userscripttexture5)}}function YoutubeEmbPlayer(_0xf2ddx109){var _0xf2ddx10a=getEmbedUrl(_0xf2ddx109[_0xaf82[158]]());if(_0xf2ddx10a== false){toastr[_0xaf82[173]](Premadeletter1)[_0xaf82[73]](_0xaf82[71],_0xaf82[267]);if(localStorage[_0xaf82[3]](_0xaf82[420])== null){$(_0xaf82[469])[_0xaf82[59]](defaultMusicUrl)}else {$(_0xaf82[469])[_0xaf82[59]](localStorage[_0xaf82[3]](_0xaf82[420]))}}else {$(_0xaf82[471])[_0xaf82[206]](_0xaf82[470],_0xf2ddx10a);localStorage[_0xaf82[117]](_0xaf82[420],_0xf2ddx109[_0xaf82[158]]())}}function MsgCommands1(MSGCOMMANDS,MSGNICK){if(MSGCOMMANDS[_0xaf82[55]](_0xaf82[472])){if($(_0xaf82[293])[_0xaf82[59]]()[_0xaf82[55]](_0xaf82[53])== false){$(_0xaf82[473])[_0xaf82[176]]();$(_0xaf82[474])[_0xaf82[176]]()};MSGCOMMANDS= MSGCOMMANDS[_0xaf82[190]](_0xaf82[472])[_0xaf82[475]]();MSGCOMMANDS= MSGCOMMANDS[_0xaf82[190]](_0xaf82[476])[0];if(MSGCOMMANDS[_0xaf82[55]](_0xaf82[477])== false&& MSGCOMMANDS[_0xaf82[55]](_0xaf82[477])== false&& MSGCOMMANDS[_0xaf82[55]](_0xaf82[478])== false&& MSGCOMMANDS[_0xaf82[55]](_0xaf82[479])== false){MSGCOMMANDS= _0xaf82[477]+ MSGCOMMANDS};toastr[_0xaf82[184]](Premadeletter22+ _0xaf82[481]+ MSGNICK+ _0xaf82[481]+ Premadeletter63+ _0xaf82[482]+ MSGCOMMANDS+ _0xaf82[483]+ MSGCOMMANDS+ _0xaf82[484]+ Premadeletter24+ _0xaf82[485]+ Premadeletter25+ _0xaf82[172],_0xaf82[6],{timeOut:20000,extendedTimeOut:20000})[_0xaf82[73]](_0xaf82[71],_0xaf82[480]);$(_0xaf82[487])[_0xaf82[208]](function(){window[_0xaf82[119]](MSGCOMMANDS,_0xaf82[486])})}else {if(MSGCOMMANDS[_0xaf82[55]](_0xaf82[488])){if($(_0xaf82[293])[_0xaf82[59]]()[_0xaf82[55]](_0xaf82[489])== false){$(_0xaf82[473])[_0xaf82[176]]();$(_0xaf82[474])[_0xaf82[176]]()};MSGCOMMANDS= MSGCOMMANDS[_0xaf82[190]](_0xaf82[488])[_0xaf82[475]]();MSGCOMMANDS= MSGCOMMANDS[_0xaf82[190]](_0xaf82[490])[0];if(MSGCOMMANDS!= _0xaf82[6]){toastr[_0xaf82[184]](Premadeletter22+ _0xaf82[481]+ MSGNICK+ _0xaf82[481]+ Premadeletter63a+ _0xaf82[491]+ MSGCOMMANDS+ _0xaf82[483]+ MSGCOMMANDS+ _0xaf82[492]+ Premadeletter24+ _0xaf82[485]+ Premadeletter25+ _0xaf82[172],_0xaf82[6],{timeOut:20000,extendedTimeOut:20000})[_0xaf82[73]](_0xaf82[71],_0xaf82[480]);$(_0xaf82[487])[_0xaf82[208]](function(){$(_0xaf82[493])[_0xaf82[59]](MSGCOMMANDS);$(_0xaf82[493])[_0xaf82[73]](_0xaf82[397],_0xaf82[494]);newsubmit()})}else {toastr[_0xaf82[184]](Premadeletter22+ _0xaf82[481]+ MSGNICK+ _0xaf82[481]+ Premadeletter63b+ _0xaf82[491]+ MSGCOMMANDS+ _0xaf82[483]+ MSGCOMMANDS+ _0xaf82[492]+ Premadeletter24+ _0xaf82[485]+ Premadeletter25+ _0xaf82[172],_0xaf82[6],{timeOut:20000,extendedTimeOut:20000})[_0xaf82[73]](_0xaf82[71],_0xaf82[480]);$(_0xaf82[487])[_0xaf82[208]](function(){$(_0xaf82[493])[_0xaf82[59]](MSGCOMMANDS);$(_0xaf82[493])[_0xaf82[73]](_0xaf82[397],_0xaf82[494]);newsubmit()})}}else {if(MSGCOMMANDS[_0xaf82[55]](_0xaf82[495])){if($(_0xaf82[293])[_0xaf82[59]]()[_0xaf82[55]](_0xaf82[496])== false){$(_0xaf82[473])[_0xaf82[176]]();$(_0xaf82[474])[_0xaf82[176]]()};MSGCOMMANDS= MSGCOMMANDS[_0xaf82[190]](_0xaf82[495])[_0xaf82[475]]();MSGCOMMANDS= MSGCOMMANDS[_0xaf82[190]](_0xaf82[497])[0];if(MSGCOMMANDS[_0xaf82[55]](_0xaf82[477])== false&& MSGCOMMANDS[_0xaf82[55]](_0xaf82[477])== false&& MSGCOMMANDS[_0xaf82[55]](_0xaf82[479])== false&& MSGCOMMANDS[_0xaf82[55]](_0xaf82[479])== false){MSGCOMMANDS= _0xaf82[477]+ MSGCOMMANDS};toastr[_0xaf82[184]](Premadeletter22+ _0xaf82[481]+ MSGNICK+ _0xaf82[481]+ Premadeletter64+ _0xaf82[482]+ MSGCOMMANDS+ _0xaf82[483]+ MSGCOMMANDS+ _0xaf82[498]+ getParameterByName(_0xaf82[160],MSGCOMMANDS)+ _0xaf82[499]+ Premadeletter24+ _0xaf82[500]+ Premadeletter25+ _0xaf82[172],_0xaf82[6],{timeOut:20000,extendedTimeOut:20000})[_0xaf82[73]](_0xaf82[71],_0xaf82[169]);$(_0xaf82[501])[_0xaf82[208]](function(){YoutubeEmbPlayer(MSGCOMMANDS);$(_0xaf82[469])[_0xaf82[59]](MSGCOMMANDS);playYoutube()})}else {if(MSGCOMMANDS[_0xaf82[55]](_0xaf82[502])){if($(_0xaf82[293])[_0xaf82[59]]()[_0xaf82[55]](_0xaf82[503])== false){$(_0xaf82[473])[_0xaf82[176]]();$(_0xaf82[474])[_0xaf82[176]]()};MSGCOMMANDS= MSGCOMMANDS[_0xaf82[190]](_0xaf82[502])[_0xaf82[475]]();MSGCOMMANDS= MSGCOMMANDS[_0xaf82[190]](_0xaf82[504])[0];if(MSGCOMMANDS[_0xaf82[55]](_0xaf82[477])== false&& MSGCOMMANDS[_0xaf82[55]](_0xaf82[477])== false&& MSGCOMMANDS[_0xaf82[55]](_0xaf82[478])== false&& MSGCOMMANDS[_0xaf82[55]](_0xaf82[479])== false){MSGCOMMANDS= _0xaf82[477]+ MSGCOMMANDS};if(MSGCOMMANDS[_0xaf82[55]](_0xaf82[505])){toastr[_0xaf82[184]](_0xaf82[506]+ Premadeletter22+ _0xaf82[481]+ MSGNICK+ _0xaf82[481]+ Premadeletter65+ _0xaf82[482]+ MSGCOMMANDS+ _0xaf82[483]+ MSGCOMMANDS+ _0xaf82[484]+ Premadeletter24+ _0xaf82[485]+ Premadeletter25+ _0xaf82[172],_0xaf82[6],{timeOut:10000,extendedTimeOut:10000})[_0xaf82[73]](_0xaf82[71],_0xaf82[169]);$(_0xaf82[487])[_0xaf82[208]](function(){window[_0xaf82[119]](MSGCOMMANDS,_0xaf82[486])})}}else {if(MSGCOMMANDS[_0xaf82[55]](_0xaf82[507])){if($(_0xaf82[293])[_0xaf82[59]]()[_0xaf82[55]](_0xaf82[508])== false){$(_0xaf82[473])[_0xaf82[176]]();$(_0xaf82[474])[_0xaf82[176]]()};MSGCOMMANDS= MSGCOMMANDS[_0xaf82[190]](_0xaf82[507])[_0xaf82[475]]();MSGCOMMANDS= MSGCOMMANDS[_0xaf82[190]](_0xaf82[509])[0];if(MSGCOMMANDS[_0xaf82[55]](_0xaf82[477])== false&& MSGCOMMANDS[_0xaf82[55]](_0xaf82[477])== false&& MSGCOMMANDS[_0xaf82[55]](_0xaf82[479])== false&& MSGCOMMANDS[_0xaf82[55]](_0xaf82[479])== false){MSGCOMMANDS= _0xaf82[477]+ MSGCOMMANDS};if(MSGCOMMANDS[_0xaf82[55]](_0xaf82[510])|| MSGCOMMANDS[_0xaf82[55]](_0xaf82[511])|| MSGCOMMANDS[_0xaf82[55]](_0xaf82[512])){toastr[_0xaf82[184]](_0xaf82[513]+ Premadeletter22+ _0xaf82[481]+ MSGNICK+ _0xaf82[481]+ Premadeletter66+ _0xaf82[482]+ MSGCOMMANDS+ _0xaf82[483]+ MSGCOMMANDS+ _0xaf82[484]+ Premadeletter24+ _0xaf82[485]+ Premadeletter25+ _0xaf82[172],_0xaf82[6],{timeOut:20000,extendedTimeOut:20000})[_0xaf82[73]](_0xaf82[71],_0xaf82[169]);$(_0xaf82[487])[_0xaf82[208]](function(){window[_0xaf82[119]](MSGCOMMANDS,_0xaf82[486])})}}else {if(MSGCOMMANDS[_0xaf82[55]](_0xaf82[514])){playerMsg= getParameterByName(_0xaf82[94],MSGCOMMANDS);commandMsg= getParameterByName(_0xaf82[515],MSGCOMMANDS);otherMsg= getParameterByName(_0xaf82[516],MSGCOMMANDS);$(_0xaf82[473])[_0xaf82[176]]();$(_0xaf82[474])[_0xaf82[176]]();if(commandMsg== _0xaf82[517]){$(_0xaf82[520])[_0xaf82[73]](_0xaf82[518],_0xaf82[519])[_0xaf82[73]]({opacity:0.8});setTimeout(function(){$(_0xaf82[520])[_0xaf82[73]](_0xaf82[518],_0xaf82[521])[_0xaf82[73]]({opacity:1})},12000)}else {if(commandMsg== _0xaf82[522]){if($(_0xaf82[524])[_0xaf82[73]](_0xaf82[523])== _0xaf82[525]){if($(_0xaf82[493])[_0xaf82[59]]()!= _0xaf82[6]){var _0xf2ddx10c=$(_0xaf82[293])[_0xaf82[59]]();$(_0xaf82[293])[_0xaf82[59]](_0xaf82[526]);$(_0xaf82[527])[_0xaf82[87]]();newsubmit();setTimeout(function(){$(_0xaf82[293])[_0xaf82[59]](_0xf2ddx10c);$(_0xaf82[527])[_0xaf82[87]]();newsubmit()},5000)}}}else {if(commandMsg== _0xaf82[528]){toastr[_0xaf82[184]](Premadeletter22+ _0xaf82[481]+ playerMsg+ _0xaf82[481]+ Premadeletter23+ _0xaf82[529]+ Premadeletter24+ _0xaf82[530]+ Premadeletter25+ _0xaf82[172],_0xaf82[6],{timeOut:20000,extendedTimeOut:20000})[_0xaf82[73]](_0xaf82[71],_0xaf82[267]);$(_0xaf82[532])[_0xaf82[208]](function(){$(_0xaf82[531])[_0xaf82[208]]()})}else {if(commandMsg== _0xaf82[533]){toastr[_0xaf82[184]](Premadeletter22+ _0xaf82[481]+ playerMsg+ _0xaf82[481]+ Premadeletter26+ _0xaf82[273]+ playerMsg+ _0xaf82[534]+ Premadeletter24+ _0xaf82[535]+ Premadeletter25+ _0xaf82[172],_0xaf82[6],{timeOut:20000,extendedTimeOut:20000})[_0xaf82[73]](_0xaf82[71],_0xaf82[267]);$(_0xaf82[536])[_0xaf82[208]](function(){$(_0xaf82[293])[_0xaf82[59]](playerMsg);$(_0xaf82[527])[_0xaf82[87]]();newsubmit()})}else {if(commandMsg== _0xaf82[537]){toastr[_0xaf82[184]](Premadeletter22+ _0xaf82[481]+ playerMsg+ _0xaf82[481]+ Premadeletter27+ _0xaf82[538]+ Premadeletter24+ _0xaf82[539]+ Premadeletter25+ _0xaf82[172],_0xaf82[6],{timeOut:20000,extendedTimeOut:20000})[_0xaf82[73]](_0xaf82[71],_0xaf82[267]);$(_0xaf82[540])[_0xaf82[208]](function(){settrolling()})}else {if(commandMsg== _0xaf82[541]){toastr[_0xaf82[184]](Premadeletter22+ _0xaf82[481]+ playerMsg+ _0xaf82[481]+ Premadeletter28+ _0xaf82[542]+ Premadeletter24+ _0xaf82[543]+ Premadeletter25+ _0xaf82[172],_0xaf82[6],{timeOut:20000,extendedTimeOut:20000})[_0xaf82[73]](_0xaf82[71],_0xaf82[267]);$(_0xaf82[546])[_0xaf82[208]](function(){$(_0xaf82[544])[_0xaf82[208]]();setTimeout(function(){$(_0xaf82[544])[_0xaf82[545]]()},100)})}}}}}}}else {if(MSGCOMMANDS[_0xaf82[55]](_0xaf82[547])){commandMsg= getParameterByName(_0xaf82[515],MSGCOMMANDS);otherMsg= getParameterByName(_0xaf82[516],MSGCOMMANDS);$(_0xaf82[473])[_0xaf82[176]]();$(_0xaf82[474])[_0xaf82[176]]();LegendClanSymbol= $(_0xaf82[293])[_0xaf82[59]]();console[_0xaf82[283]](_0xaf82[548]);if(~LegendClanSymbol[_0xaf82[179]](_0xaf82[549])!= -1){console[_0xaf82[283]](_0xaf82[550]);if(commandMsg== _0xaf82[551]){setTimeout(function(){$(_0xaf82[295])[_0xaf82[208]]()},60000)}else {if(commandMsg== _0xaf82[552]){$(_0xaf82[295])[_0xaf82[208]]()}else {$(_0xaf82[295])[_0xaf82[208]]()}}}}else {if(MSGCOMMANDS[_0xaf82[55]](_0xaf82[553])){if($(_0xaf82[293])[_0xaf82[59]]()[_0xaf82[55]](_0xaf82[554])== false){$(_0xaf82[473])[_0xaf82[176]]();$(_0xaf82[474])[_0xaf82[176]]()};MSGCOMMANDS= MSGCOMMANDS[_0xaf82[190]](_0xaf82[553])[_0xaf82[475]]();MSGCOMMANDS= MSGCOMMANDS[_0xaf82[190]](_0xaf82[555])[0];var _0xf2ddx10d=MSGCOMMANDS[_0xaf82[190]](_0xaf82[556]);window[_0xaf82[557]]= _0xf2ddx10d[0];window[_0xaf82[558]]= _0xf2ddx10d[1];window[_0xaf82[559]]= parseFloat(window[_0xaf82[557]])- legendmod[_0xaf82[560]];window[_0xaf82[561]]= parseFloat(window[_0xaf82[558]])- legendmod[_0xaf82[562]];legendmod[_0xaf82[563]]= true;toastr[_0xaf82[184]](_0xaf82[564]+ MSGNICK+ _0xaf82[565]+ application[_0xaf82[566]](window[_0xaf82[559]],window[_0xaf82[561]],true))[_0xaf82[73]](_0xaf82[71],_0xaf82[267])}else {if(MSGCOMMANDS[_0xaf82[55]](_0xaf82[567])){if($(_0xaf82[293])[_0xaf82[59]]()[_0xaf82[55]](_0xaf82[568])== false){$(_0xaf82[473])[_0xaf82[176]]();$(_0xaf82[474])[_0xaf82[176]]()};MSGCOMMANDS= MSGCOMMANDS[_0xaf82[190]](_0xaf82[567])[_0xaf82[475]]();MSGCOMMANDS= MSGCOMMANDS[_0xaf82[190]](_0xaf82[569])[0];var _0xf2ddx10d=MSGCOMMANDS[_0xaf82[190]](_0xaf82[556]);window[_0xaf82[557]]= _0xf2ddx10d[0];window[_0xaf82[558]]= _0xf2ddx10d[1];window[_0xaf82[559]]= parseFloat(window[_0xaf82[557]])- legendmod[_0xaf82[560]];window[_0xaf82[561]]= parseFloat(window[_0xaf82[558]])- legendmod[_0xaf82[562]];legendmod[_0xaf82[563]]= true;toastr[_0xaf82[184]](_0xaf82[564]+ MSGNICK+ _0xaf82[570]+ application[_0xaf82[566]](window[_0xaf82[559]],window[_0xaf82[561]],true))[_0xaf82[73]](_0xaf82[71],_0xaf82[267])}else {if(MSGCOMMANDS[_0xaf82[55]](_0xaf82[571])){if($(_0xaf82[293])[_0xaf82[59]]()[_0xaf82[55]](_0xaf82[572])== false){$(_0xaf82[473])[_0xaf82[176]]();$(_0xaf82[474])[_0xaf82[176]]()};MSGCOMMANDS= MSGCOMMANDS[_0xaf82[190]](_0xaf82[571])[_0xaf82[475]]();MSGCOMMANDS= MSGCOMMANDS[_0xaf82[190]](_0xaf82[573])[0];var _0xf2ddx10d=MSGCOMMANDS[_0xaf82[190]](_0xaf82[556]);window[_0xaf82[557]]= _0xf2ddx10d[0];window[_0xaf82[558]]= _0xf2ddx10d[1];window[_0xaf82[559]]= parseFloat(window[_0xaf82[557]])- legendmod[_0xaf82[560]];window[_0xaf82[561]]= parseFloat(window[_0xaf82[558]])- legendmod[_0xaf82[562]];legendmod[_0xaf82[563]]= true;toastr[_0xaf82[184]](_0xaf82[564]+ MSGNICK+ _0xaf82[574]+ application[_0xaf82[566]](window[_0xaf82[559]],window[_0xaf82[561]],true))[_0xaf82[73]](_0xaf82[71],_0xaf82[267])}}}}}}}}}}}function isLegendExpress(Express){if(messageone!= _0xaf82[101]&& messageone!= _0xaf82[575]){return Express= _0xaf82[576]}else {return Express= _0xaf82[114]}}function MsgServCommandsreturner2(MSGCOMMANDS2a){return MSGCOMMANDS2a}function MsgServCommandsreturner(){MSGCOMMANDS2= MSGCOMMANDS;MSGCOMMANDS3= MSGCOMMANDS;MSGCOMMANDS2= MSGCOMMANDS2[_0xaf82[190]](_0xaf82[577])[_0xaf82[475]]();MSGCOMMANDS2= MSGCOMMANDS2[_0xaf82[190]](_0xaf82[578])[0];if(MSGCOMMANDS2[_0xaf82[55]](_0xaf82[477])== false&& MSGCOMMANDS2[_0xaf82[55]](_0xaf82[477])== false&& MSGCOMMANDS2[_0xaf82[55]](_0xaf82[478])== false&& MSGCOMMANDS2[_0xaf82[55]](_0xaf82[479])== false){MSGCOMMANDS2= _0xaf82[477]+ MSGCOMMANDS2};if(MSGCOMMANDS2[_0xaf82[55]](_0xaf82[249])){MSGCOMMANDS2a= MSGCOMMANDS2;MsgServCommandsreturner2(MSGCOMMANDS2a);MSGCOMMANDSA= _0xaf82[579]+ MSGCOMMANDS2a[_0xaf82[190]](_0xaf82[579])[_0xaf82[475]]();toastr[_0xaf82[184]](_0xaf82[580]+ Premadeletter22+ _0xaf82[481]+ MSGNICK+ _0xaf82[481]+ Premadeletter67+ _0xaf82[581]+ MSGCOMMANDSA+ _0xaf82[582]+ Premadeletter24+ _0xaf82[485]+ Premadeletter25+ _0xaf82[583],_0xaf82[6],{timeOut:10000,extendedTimeOut:10000})[_0xaf82[73]](_0xaf82[71],_0xaf82[169])}else {if(getParameterByName(_0xaf82[89],MSGCOMMANDS2a)!= null){var _0xf2ddx111,_0xf2ddx112;if(getParameterByName(_0xaf82[93],MSGCOMMANDS)== null){_0xf2ddx112= _0xaf82[584]}else {_0xf2ddx112= getParameterByName(_0xaf82[93],MSGCOMMANDS)};if(getParameterByName(_0xaf82[585],MSGCOMMANDS)== null){_0xf2ddx111= _0xaf82[586]}else {_0xf2ddx111= getParameterByName(_0xaf82[585],MSGCOMMANDS)};toastr[_0xaf82[184]](_0xaf82[580]+ Premadeletter22+ _0xaf82[481]+ MSGNICK+ _0xaf82[481]+ Premadeletter67+ _0xaf82[587]+ getParameterByName(_0xaf82[92],MSGCOMMANDS)[_0xaf82[168]](_0xaf82[212],_0xaf82[6])[_0xaf82[168]](_0xaf82[214],_0xaf82[6])+ _0xaf82[588]+ _0xf2ddx111+ _0xaf82[589]+ getParameterByName(_0xaf82[89],MSGCOMMANDS)+ _0xaf82[590]+ _0xf2ddx112+ _0xaf82[591]+ Premadeletter24+ _0xaf82[485]+ Premadeletter25+ _0xaf82[583],_0xaf82[6],{timeOut:10000,extendedTimeOut:10000})[_0xaf82[73]](_0xaf82[71],_0xaf82[169])}else {var _0xf2ddx112;if(getParameterByName(_0xaf82[93],MSGCOMMANDS)== null){_0xf2ddx112= _0xaf82[584]}else {_0xf2ddx112= getParameterByName(_0xaf82[93],MSGCOMMANDS)};toastr[_0xaf82[184]](_0xaf82[580]+ Premadeletter22+ _0xaf82[481]+ MSGNICK+ _0xaf82[481]+ Premadeletter67+ _0xaf82[587]+ getParameterByName(_0xaf82[92],MSGCOMMANDS)[_0xaf82[168]](_0xaf82[212],_0xaf82[6])[_0xaf82[168]](_0xaf82[214],_0xaf82[6])+ _0xaf82[590]+ _0xf2ddx112+ _0xaf82[582]+ Premadeletter24+ _0xaf82[485]+ Premadeletter25+ _0xaf82[583],_0xaf82[6],{timeOut:10000,extendedTimeOut:10000})[_0xaf82[73]](_0xaf82[71],_0xaf82[169])}};return MSGCOMMANDS,MSGCOMMANDS2,MSGCOMMANDS2a,MSGCOMMANDSA,MSGCOMMANDS3}function universalchat(){setTimeout(function(){if(application){application[_0xaf82[592]]()}},2000);var legbgpic=$(_0xaf82[103])[_0xaf82[59]]();var legbgcolor=$(_0xaf82[102])[_0xaf82[59]]();window[_0xaf82[593]]= [];var _0xf2ddx114=window;var _0xf2ddx115={"\x6E\x61\x6D\x65":_0xaf82[594],"\x6C\x6F\x67":function(_0xf2ddx116){if(($(_0xaf82[597])[_0xaf82[596]](_0xaf82[595])== false)){if(~_0xf2ddx116[_0xaf82[179]](_0xaf82[598])){if(~_0xf2ddx116[_0xaf82[179]](_0xaf82[599])){}else {toastr[_0xaf82[270]](_0xaf82[600]+ this[_0xaf82[601]]+ _0xaf82[602]+ _0xf2ddx116+ _0xaf82[603])}}else {if(~_0xf2ddx116[_0xaf82[179]](Premadeletter109b+ _0xaf82[604])){toastr[_0xaf82[184]](_0xaf82[600]+ this[_0xaf82[601]]+ _0xaf82[602]+ _0xf2ddx116+ _0xaf82[603])}else {if(~_0xf2ddx116[_0xaf82[179]](_0xaf82[605])){toastr[_0xaf82[184]](_0xaf82[600]+ this[_0xaf82[601]]+ _0xaf82[602]+ _0xf2ddx116+ _0xaf82[603])}else {if(~_0xf2ddx116[_0xaf82[179]]($(_0xaf82[293])[_0xaf82[59]]()+ _0xaf82[239])){if(window[_0xaf82[606]]){toastr[_0xaf82[270]](_0xaf82[600]+ this[_0xaf82[601]]+ _0xaf82[602]+ _0xf2ddx116+ _0xaf82[603]);playSound($(_0xaf82[607])[_0xaf82[59]]())}else {}}else {if(~_0xf2ddx116[_0xaf82[179]](_0xaf82[608])){}else {if(~_0xf2ddx116[_0xaf82[179]](_0xaf82[189])){_0xf2ddx116[_0xaf82[181]](1);toastr[_0xaf82[184]](_0xaf82[600]+ this[_0xaf82[601]]+ _0xaf82[602]+ _0xf2ddx116+ _0xaf82[603]);playSound($(_0xaf82[609])[_0xaf82[59]]())}else {toastr[_0xaf82[270]](_0xaf82[600]+ this[_0xaf82[601]]+ _0xaf82[602]+ _0xf2ddx116+ _0xaf82[603]);playSound($(_0xaf82[607])[_0xaf82[59]]())}}}}}}}},"\x74\x6F\x6F\x6C\x5F\x73\x79\x6D\x62\x6F\x6C":_0xaf82[6]};_0xaf82[610];var _0xf2ddx117={"\x41\x67\x61\x72\x54\x6F\x6F\x6C\x56\x65\x72\x73\x69\x6F\x6E":5,"\x41\x67\x61\x72\x54\x6F\x6F\x6C\x53\x65\x72\x76\x65\x72":_0xaf82[611],minimapBalls:{},"\x73\x6F\x63\x6B\x65\x74\x49\x6F\x55\x52\x4C":_0xaf82[612],"\x6D\x69\x6E\x69\x6D\x61\x70\x4E\x69\x63\x6B\x46\x6F\x6E\x74":_0xaf82[613],"\x6D\x69\x6E\x69\x6D\x61\x70\x4E\x69\x63\x6B\x43\x6F\x6C\x6F\x72":_0xaf82[614],"\x6D\x69\x6E\x69\x6D\x61\x70\x4E\x69\x63\x6B\x53\x74\x72\x6F\x6B\x65\x43\x6F\x6C\x6F\x72":_0xaf82[615],"\x6D\x69\x6E\x69\x6D\x61\x70\x4E\x69\x63\x6B\x53\x74\x72\x6F\x6B\x65\x53\x69\x7A\x65":2,"\x6D\x69\x6E\x69\x6D\x61\x70\x54\x6F\x70":24,"\x6D\x69\x6E\x69\x6D\x61\x70\x54\x65\x61\x6D\x6D\x61\x74\x65\x73\x53\x69\x7A\x65":5.5,"\x6D\x69\x6E\x69\x6D\x61\x70\x4F\x66\x66\x73\x65\x74\x58":71,"\x6D\x61\x70\x53\x69\x7A\x65":14142,"\x6D\x61\x70\x4F\x66\x66\x73\x65\x74":7071,"\x70\x69\x32":2* Math[_0xaf82[616]],"\x6D\x65\x73\x73\x61\x67\x65\x42\x6F\x78\x42\x6F\x74\x74\x6F\x6D":[_0xaf82[617],_0xaf82[618]],"\x6B\x65\x79\x43\x6F\x64\x65\x45\x6E\x74\x65\x72":13,"\x6B\x65\x79\x43\x6F\x64\x65\x41":65,"\x6B\x65\x79\x43\x6F\x64\x65\x52":82};var _0xf2ddx118={};var _0xf2ddx119={"\x75\x73\x65\x72\x5F\x73\x68\x6F\x77":true,"\x6D\x69\x6E\x69\x6D\x61\x70\x5F\x73\x68\x6F\x77":true,"\x74\x67\x61\x72\x5F\x70\x72\x65\x66\x69\x78":_0xaf82[619],"\x74\x67\x61\x72\x5F\x63\x6F\x6C\x6F\x72":_0xaf82[620],"\x75\x70\x64\x61\x74\x65\x5F\x69\x6E\x74\x65\x72\x76\x61\x6C":1000,"\x6F\x67\x61\x72\x5F\x75\x73\x65\x72":true,"\x6F\x67\x61\x72\x5F\x70\x72\x65\x66\x69\x78":_0xaf82[621],"\x6C\x6D\x73\x61\x5F\x74\x65\x61\x6D\x74\x6F\x70":false,"\x6C\x6D\x73\x61\x5F\x63\x68\x61\x74":false,"\x63\x68\x61\x74\x5F\x63\x6C\x6F\x73\x65":false,"\x63\x68\x61\x74\x5F\x75\x6E\x70\x61\x75\x73\x65":true,"\x63\x68\x61\x74\x5F\x76\x63\x65\x6E\x74\x65\x72":false,"\x63\x68\x61\x74\x5F\x61\x6C\x74":true,"\x63\x68\x61\x74\x5F\x63\x74\x72\x6C\x61\x6C\x74":true,"\x63\x68\x61\x74\x5F\x63\x74\x72\x6C":true,"\x73\x6B\x69\x6E\x5F\x74\x6F\x67\x67\x6C\x65\x5F\x61\x75\x74\x6F":false,"\x73\x6B\x69\x6E\x5F\x74\x6F\x67\x67\x6C\x65\x5F\x69\x6E\x74\x65\x72\x76\x61\x6C":10000};function _0xf2ddx11a(){if(!document[_0xaf82[407]](_0xaf82[622])){_0xf2ddx115[_0xaf82[623]]= (_0xf2ddx115[_0xaf82[623]]|| 1000)+ 1000;setTimeout(_0xf2ddx11a,_0xf2ddx115[_0xaf82[623]]);_0xf2ddx115[_0xaf82[283]](_0xaf82[624]);return};setTimeout(_0xf2ddx11b,1000)}_0xf2ddx11a();function _0xf2ddx11b(){$[_0xaf82[628]](_0xf2ddx118,_0xf2ddx119,JSON[_0xaf82[107]](_0xf2ddx115[_0xaf82[627]](_0xaf82[625],_0xaf82[626])));_0xf2ddx114[_0xaf82[629]]= {my:_0xf2ddx115,stat:_0xf2ddx117,cfg:_0xf2ddx118};var _0xf2ddx11c=_0xaf82[6];_0xf2ddx11c+= _0xaf82[630];_0xf2ddx11c+= _0xaf82[631];_0xf2ddx11c+= _0xaf82[632];_0xf2ddx11c+= _0xaf82[633];_0xf2ddx11c+= _0xaf82[634];_0xf2ddx11c+= _0xaf82[632];_0xf2ddx11c+= _0xaf82[635];_0xf2ddx11c+= _0xaf82[636];_0xf2ddx11c+= _0xaf82[637]+ legbgpic+ _0xaf82[305]+ legbgcolor+ _0xaf82[638];_0xf2ddx11c+= _0xaf82[639];_0xf2ddx11c+= _0xaf82[632];_0xf2ddx11c+= _0xaf82[640];_0xf2ddx11c+= _0xaf82[641];_0xf2ddx11c+= _0xaf82[642];_0xf2ddx11c+= _0xaf82[632];_0xf2ddx11c+= _0xaf82[643];_0xf2ddx11c+= _0xaf82[644];_0xf2ddx11c+= _0xaf82[632];$(_0xaf82[647])[_0xaf82[279]](_0xaf82[645]+ _0xf2ddx11c+ _0xaf82[646]);$(_0xaf82[520])[_0xaf82[279]](_0xaf82[6]+ _0xaf82[648]+ _0xaf82[649]+ _0xaf82[650]+ _0xaf82[651]+ _0xaf82[652]);$(_0xaf82[657])[_0xaf82[208]](function(_0xf2ddx11d){_0xf2ddx117[_0xaf82[653]]= !_0xf2ddx117[_0xaf82[653]];if(_0xf2ddx117[_0xaf82[653]]){if(_0xf2ddx114[_0xaf82[654]]){$(_0xaf82[657])[_0xaf82[247]](_0xaf82[656])[_0xaf82[245]](_0xaf82[655]);$(_0xaf82[657])[_0xaf82[281]](_0xaf82[658])}else {$(_0xaf82[657])[_0xaf82[247]](_0xaf82[656])[_0xaf82[245]](_0xaf82[655]);$(_0xaf82[657])[_0xaf82[281]](_0xaf82[658])};_0xf2ddx115[_0xaf82[659]]()}else {$(_0xaf82[657])[_0xaf82[247]](_0xaf82[655])[_0xaf82[245]](_0xaf82[656]);$(_0xaf82[657])[_0xaf82[281]](_0xaf82[660]);_0xf2ddx115[_0xaf82[661]]()}});$(_0xaf82[657])[_0xaf82[665]](function(){$(_0xaf82[657])[_0xaf82[73]](_0xaf82[662],$(_0xaf82[664])[_0xaf82[59]]());return clickedname= _0xaf82[99]})[_0xaf82[663]](function(){$(_0xaf82[657])[_0xaf82[73]](_0xaf82[662],_0xaf82[6])});$(_0xaf82[666])[_0xaf82[665]](function(){$(_0xaf82[666])[_0xaf82[73]](_0xaf82[662],$(_0xaf82[664])[_0xaf82[59]]());return clickedname= _0xaf82[99]})[_0xaf82[663]](function(){$(_0xaf82[666])[_0xaf82[73]](_0xaf82[662],_0xaf82[6])});$(_0xaf82[666])[_0xaf82[208]](_0xf2ddx115[_0xaf82[625]]);if(_0xf2ddx118[_0xaf82[667]]){$(_0xaf82[520])[_0xaf82[668]](function(){return false})}else {$(_0xaf82[669])[_0xaf82[668]](function(_0xf2ddx11d){return false})};if(_0xf2ddx118[_0xaf82[670]]){$(_0xaf82[524])[_0xaf82[668]](function(){return false})};if(_0xf2ddx118[_0xaf82[671]]){$(_0xaf82[673])[_0xaf82[279]](_0xaf82[672]);$(_0xaf82[675])[_0xaf82[208]](function(){_0xf2ddx115[_0xaf82[674]]()})};if(_0xf2ddx118[_0xaf82[676]]){$(_0xaf82[524])[_0xaf82[73]](_0xaf82[677],_0xf2ddx117[_0xaf82[678]][1])};$(_0xaf82[693])[_0xaf82[692]](function(_0xf2ddx11d){var _0xf2ddx11e=(_0xf2ddx11d[_0xaf82[679]]?_0xaf82[198]:_0xaf82[6])+ (_0xf2ddx11d[_0xaf82[680]]?_0xaf82[681]:_0xaf82[6])+ (_0xf2ddx11d[_0xaf82[682]]?_0xaf82[90]:_0xaf82[6])+ (_0xf2ddx11d[_0xaf82[683]]?_0xaf82[684]:_0xaf82[6]);if(_0xf2ddx11d[_0xaf82[685]]=== _0xf2ddx117[_0xaf82[686]]){if(_0xf2ddx11e=== _0xaf82[198]&& _0xf2ddx118[_0xaf82[687]]){_0xf2ddx115[_0xaf82[688]]();return false}else {if(_0xf2ddx11e=== _0xaf82[689]&& _0xf2ddx118[_0xaf82[690]]){_0xf2ddx115[_0xaf82[688]]({"\x6F\x67\x61\x72":true});return false}else {if(_0xf2ddx11e=== _0xaf82[681]&& _0xf2ddx118[_0xaf82[691]]){_0xf2ddx115[_0xaf82[674]]();return false}}}}});_0xf2ddx115[_0xaf82[694]]();$(_0xaf82[696])[_0xaf82[695]]()}_0xf2ddx115[_0xaf82[659]]= function(){if($(_0xaf82[697])[_0xaf82[140]]){$(_0xaf82[697])[_0xaf82[87]]();$(_0xaf82[698])[_0xaf82[87]]()}else {_0xf2ddx115[_0xaf82[699]]()};_0xf2ddx117[_0xaf82[489]]= $(_0xaf82[493])[_0xaf82[59]]();_0xf2ddx117[_0xaf82[372]]= $(_0xaf82[293])[_0xaf82[59]]();_0xf2ddx117[_0xaf82[700]]= $(_0xaf82[213])[_0xaf82[59]]();_0xf2ddx117[_0xaf82[701]]= _0xaf82[702]+ _0xf2ddx117[_0xaf82[700]]+ _0xaf82[703];_0xf2ddx115[_0xaf82[704]]();_0xf2ddx117[_0xaf82[705]]= setInterval(_0xf2ddx115[_0xaf82[706]],_0xf2ddx118[_0xaf82[707]])};_0xf2ddx115[_0xaf82[661]]= function(){$(_0xaf82[697])[_0xaf82[61]]();$(_0xaf82[708])[_0xaf82[281]](_0xaf82[6]);$(_0xaf82[698])[_0xaf82[61]]();_0xf2ddx115[_0xaf82[709]]();clearInterval(_0xf2ddx117[_0xaf82[705]]);_0xf2ddx117[_0xaf82[705]]= null};_0xf2ddx115[_0xaf82[699]]= function(){$(_0xaf82[673])[_0xaf82[713]](_0xaf82[710]+ _0xf2ddx115[_0xaf82[711]]+ _0xaf82[712]);$(_0xaf82[697])[_0xaf82[208]](_0xf2ddx115[_0xaf82[688]]);var _0xf2ddx11f=$(_0xaf82[714]);var _0xf2ddx120=_0xf2ddx11f[_0xaf82[206]](_0xaf82[71]);var _0xf2ddx121=_0xf2ddx11f[_0xaf82[206]](_0xaf82[715]);_0xf2ddx11f[_0xaf82[128]](_0xaf82[716]+ _0xaf82[717]+ _0xaf82[718]+ _0xf2ddx120+ _0xaf82[719]+ _0xf2ddx121+ _0xaf82[720])};_0xf2ddx115[_0xaf82[688]]= function(_0xf2ddx122){var _0xf2ddx123=_0xf2ddx122|| {};if(!_0xf2ddx117[_0xaf82[655]]){if($(_0xaf82[657])[_0xaf82[721]](_0xaf82[655])){_0xf2ddx114[_0xaf82[723]][_0xaf82[173]](_0xaf82[722]);return}};var _0xf2ddx116=_0xaf82[608]+ $(_0xaf82[693])[_0xaf82[59]]();var _0xf2ddx124=$(_0xaf82[693])[_0xaf82[59]]();if(_0xf2ddx124[_0xaf82[179]](_0xaf82[472])== -1&& _0xf2ddx124[_0xaf82[179]](_0xaf82[495])== -1&& _0xf2ddx124[_0xaf82[179]](_0xaf82[502])== -1&& _0xf2ddx124[_0xaf82[179]](_0xaf82[507])== -1&& _0xf2ddx124[_0xaf82[179]](_0xaf82[577])== -1&& _0xf2ddx124[_0xaf82[179]](_0xaf82[488])== -1&& _0xf2ddx124[_0xaf82[179]](_0xaf82[514])== -1&& _0xf2ddx124[_0xaf82[179]](_0xaf82[547])== -1){if(_0xf2ddx124[_0xaf82[140]]){_0xf2ddx115[_0xaf82[726]]({name:_0xaf82[724],nick:$(_0xaf82[293])[_0xaf82[59]](),message:_0xaf82[725]+ _0xf2ddx116});if(_0xf2ddx123[_0xaf82[727]]){$(document)[_0xaf82[728]](jQuery.Event(_0xaf82[692],{keyCode:_0xf2ddx117[_0xaf82[686]],which:_0xf2ddx117[_0xaf82[686]]}))}else {}}}else {console[_0xaf82[283]](_0xaf82[729])}};_0xf2ddx115[_0xaf82[674]]= function(){$(_0xaf82[524])[_0xaf82[73]](_0xaf82[523],_0xaf82[525]);if(_0xf2ddx118[_0xaf82[730]]&& $(_0xaf82[731])[_0xaf82[73]](_0xaf82[523])== _0xaf82[732]){$(document)[_0xaf82[728]](jQuery.Event(_0xaf82[692],{keyCode:_0xf2ddx117[_0xaf82[733]],which:_0xf2ddx117[_0xaf82[733]]}));$(document)[_0xaf82[728]](jQuery.Event(_0xaf82[734],{keyCode:_0xf2ddx117[_0xaf82[733]],which:_0xf2ddx117[_0xaf82[733]]}))}};_0xf2ddx115[_0xaf82[706]]= function(){var _0xf2ddx125=_0xf2ddx115[_0xaf82[735]]();if(_0xf2ddx125!= _0xf2ddx117[_0xaf82[736]]){_0xf2ddx115[_0xaf82[737]](_0xf2ddx125)};if(_0xf2ddx117[_0xaf82[736]]){_0xf2ddx115[_0xaf82[738]]()};_0xf2ddx115[_0xaf82[739]]()};_0xf2ddx115[_0xaf82[625]]= function(){if(!($(_0xaf82[696])[_0xaf82[140]])){_0xf2ddx115[_0xaf82[740]]()};_0xf2ddx115[_0xaf82[741]](_0xf2ddx118);$(_0xaf82[696])[_0xaf82[87]]();$(_0xaf82[742])[_0xaf82[87]]()};_0xf2ddx115[_0xaf82[740]]= function(){$(_0xaf82[742])[_0xaf82[279]](_0xaf82[743]+ _0xaf82[744]+ _0xaf82[720]+ _0xaf82[745]+ _0xaf82[746]+ _0xaf82[747]+ _0xaf82[748]+ _0xaf82[652]+ _0xaf82[749]+ _0xaf82[750]+ Languageletter309[_0xaf82[751]]()+ _0xaf82[752]+ _0xaf82[753]+ Languageletter171+ _0xaf82[752]+ _0xaf82[754]+ Languageletter283+ _0xaf82[752]+ _0xaf82[652]);$(_0xaf82[778])[_0xaf82[279]](_0xaf82[6]+ _0xaf82[755]+ _0xaf82[756]+ _0xaf82[757]+ _0xaf82[758]+ _0xaf82[759]+ _0xaf82[760]+ _0xaf82[761]+ _0xaf82[762]+ _0xaf82[763]+ _0xaf82[764]+ _0xaf82[765]+ _0xaf82[766]+ _0xaf82[767]+ _0xaf82[768]+ _0xaf82[769]+ _0xaf82[770]+ _0xaf82[771]+ _0xaf82[772]+ _0xaf82[773]+ _0xaf82[774]+ _0xaf82[775]+ _0xaf82[776]+ _0xaf82[777]+ _0xaf82[6]);$(_0xaf82[779])[_0xaf82[208]](function(){_0xf2ddx115[_0xaf82[741]](_0xf2ddx119)});$(_0xaf82[783])[_0xaf82[208]](function(){if($(_0xaf82[527])[_0xaf82[596]](_0xaf82[595])){showMenu2()};_0xf2ddx118= _0xf2ddx115[_0xaf82[780]]();_0xf2ddx115[_0xaf82[781]](_0xaf82[625],JSON[_0xaf82[415]](_0xf2ddx118));_0xf2ddx115[_0xaf82[782]]();$(_0xaf82[524])[_0xaf82[73]](_0xaf82[677],_0xf2ddx117[_0xaf82[678]][_0xf2ddx118[_0xaf82[676]]?1:0]);_0xf2ddx115[_0xaf82[694]]()});$(_0xaf82[784])[_0xaf82[208]](function(){if($(_0xaf82[527])[_0xaf82[596]](_0xaf82[595])){showMenu2()};_0xf2ddx115[_0xaf82[782]]()});_0xf2ddx115[_0xaf82[782]]= function(){$(_0xaf82[696])[_0xaf82[61]]()}};_0xf2ddx115[_0xaf82[694]]= function(){if(_0xf2ddx117[_0xaf82[785]]){clearInterval(_0xf2ddx117[_0xaf82[785]]);delete _0xf2ddx117[_0xaf82[785]]};if(_0xf2ddx118[_0xaf82[786]]&& _0xf2ddx118[_0xaf82[787]]> 0){_0xf2ddx117[_0xaf82[785]]= setInterval(_0xf2ddx115[_0xaf82[788]],_0xf2ddx118[_0xaf82[787]])}};_0xf2ddx115[_0xaf82[788]]= function(){if(_0xf2ddx114[_0xaf82[654]]&& _0xf2ddx114[_0xaf82[654]][_0xaf82[789]]&& _0xf2ddx114[_0xaf82[654]][_0xaf82[790]]){_0xf2ddx117[_0xaf82[791]]= true};_0xf2ddx115[_0xaf82[792]]();if(_0xf2ddx117[_0xaf82[791]]&& _0xf2ddx114[_0xaf82[654]][_0xaf82[789]]&& !_0xf2ddx114[_0xaf82[654]][_0xaf82[790]]){_0xf2ddx115[_0xaf82[792]]()}};_0xf2ddx115[_0xaf82[792]]= function(){$(document)[_0xaf82[728]](jQuery.Event(_0xaf82[692],{keyCode:_0xf2ddx117[_0xaf82[793]],which:_0xf2ddx117[_0xaf82[793]]}));$(document)[_0xaf82[728]](jQuery.Event(_0xaf82[734],{keyCode:_0xf2ddx117[_0xaf82[793]],which:_0xf2ddx117[_0xaf82[793]]}))};_0xf2ddx115[_0xaf82[704]]= function(){_0xf2ddx115[_0xaf82[709]]();if(!_0xf2ddx114[_0xaf82[794]]){return _0xf2ddx14e(_0xf2ddx117[_0xaf82[795]],_0xf2ddx115[_0xaf82[704]])};var _0xf2ddx126={query:_0xaf82[796]+ encodeURIComponent(_0xf2ddx117.AgarToolVersion)+ _0xaf82[797]+ encodeURIComponent(_0xf2ddx117[_0xaf82[701]])};_0xf2ddx117[_0xaf82[798]]= io[_0xaf82[704]](_0xf2ddx117.AgarToolServer,_0xf2ddx126);_0xf2ddx117[_0xaf82[798]][_0xaf82[801]](_0xaf82[157],function(_0xf2ddx127){_0xf2ddx117[_0xaf82[799]]= _0xf2ddx127;_0xf2ddx115[_0xaf82[800]]()})};_0xf2ddx115[_0xaf82[709]]= function(){if(_0xf2ddx117[_0xaf82[655]]&& _0xf2ddx117[_0xaf82[736]]){_0xf2ddx115[_0xaf82[737]](false)};_0xf2ddx117[_0xaf82[655]]= false;_0xf2ddx117[_0xaf82[736]]= false;var _0xf2ddx128=_0xf2ddx117[_0xaf82[798]];var _0xf2ddx129=_0xf2ddx117[_0xaf82[802]];_0xf2ddx117[_0xaf82[798]]= null;_0xf2ddx117[_0xaf82[802]]= null;if(_0xf2ddx128){_0xf2ddx128[_0xaf82[709]]()};if(_0xf2ddx129){_0xf2ddx129[_0xaf82[709]]()}};_0xf2ddx115[_0xaf82[800]]= function(){if($(_0xaf82[669])[_0xaf82[721]](_0xaf82[803])== false){$(_0xaf82[669])[_0xaf82[245]](_0xaf82[803])};_0xf2ddx115[_0xaf82[283]](Languageletter82a+ _0xaf82[481]+ Premadeletter123[_0xaf82[804]]()+ _0xaf82[805]+ _0xf2ddx117[_0xaf82[799]][_0xaf82[806]]);_0xf2ddx115[_0xaf82[807]]();var _0xf2ddx12a={reconnection:!1,query:_0xaf82[808]+ encodeURIComponent(_0xf2ddx117[_0xaf82[799]][_0xaf82[809]])+ _0xaf82[810]+ encodeURIComponent(_0xf2ddx117[_0xaf82[489]])};_0xf2ddx117[_0xaf82[802]]= io[_0xaf82[704]](_0xf2ddx117[_0xaf82[799]][_0xaf82[806]],_0xf2ddx12a);_0xf2ddx117[_0xaf82[802]][_0xaf82[801]](_0xaf82[811],_0xf2ddx115[_0xaf82[812]]);_0xf2ddx117[_0xaf82[802]][_0xaf82[801]](_0xaf82[704],function(){_0xf2ddx117[_0xaf82[655]]= true});_0xf2ddx117[_0xaf82[802]][_0xaf82[801]](_0xaf82[709],function(){_0xf2ddx117[_0xaf82[802]]= null;_0xf2ddx115[_0xaf82[813]]()});_0xf2ddx117[_0xaf82[802]][_0xaf82[801]](_0xaf82[814],function(){_0xf2ddx117[_0xaf82[802]]= null;_0xf2ddx115[_0xaf82[813]]()})};_0xf2ddx115[_0xaf82[813]]= function(){_0xf2ddx117[_0xaf82[655]]= false;var _0xf2ddx128=_0xf2ddx117[_0xaf82[798]];var _0xf2ddx129=_0xf2ddx117[_0xaf82[802]];_0xf2ddx117[_0xaf82[798]]= null;_0xf2ddx117[_0xaf82[802]]= null;if(_0xf2ddx128){_0xf2ddx128[_0xaf82[709]]()};if(_0xf2ddx129){_0xf2ddx129[_0xaf82[709]]()}};_0xf2ddx115[_0xaf82[812]]= function(_0xf2ddx12b){if(void(0)=== _0xf2ddx12b[_0xaf82[601]]){return};switch(_0xf2ddx12b[_0xaf82[601]]){case _0xaf82[823]:if(window[_0xaf82[815]]&& window[_0xaf82[815]][_0xaf82[55]](_0xf2ddx12b[_0xaf82[816]])|| _0xf2ddx12b[_0xaf82[816]][_0xaf82[55]](_0xaf82[621])){}else {if(!_0xf2ddx12b[_0xaf82[816]]){_0xf2ddx12b[_0xaf82[816]]= _0xaf82[817]};_0xf2ddx115[_0xaf82[822]](!1,_0xf2ddx12b[_0xaf82[818]],_0xf2ddx12b[_0xaf82[816]],_0xf2ddx12b[_0xaf82[819]],_0xf2ddx12b[_0xaf82[820]],_0xf2ddx118[_0xaf82[821]],!0)};break;case _0xaf82[176]:_0xf2ddx115[_0xaf82[824]](_0xf2ddx12b[_0xaf82[818]]);break;case _0xaf82[826]:_0xf2ddx115[_0xaf82[825]](_0xf2ddx12b[_0xaf82[818]],_0xf2ddx12b[_0xaf82[819]],_0xf2ddx12b[_0xaf82[820]]);break;case _0xaf82[789]:if(!window[_0xaf82[827]]|| !isEquivalent(window[_0xaf82[827]],_0xf2ddx12b[_0xaf82[828]])){window[_0xaf82[827]]= _0xf2ddx12b[_0xaf82[828]];if(legendmod[_0xaf82[829]]){Object[_0xaf82[833]](window[_0xaf82[827]])[_0xaf82[832]](function(_0xf2ddx12c){if(_0xf2ddx12c[_0xaf82[190]](_0xaf82[830])[0]!= 0){core[_0xaf82[831]](_0xf2ddx12c[_0xaf82[190]](_0xaf82[830])[0],null,window[_0xaf82[827]][_0xf2ddx12c],1,null)}})}};break;case _0xaf82[834]:_0xf2ddx115[_0xaf82[807]]();break;case _0xaf82[724]:if(window[_0xaf82[815]]&& window[_0xaf82[815]][_0xaf82[55]](_0xf2ddx12b[_0xaf82[816]])|| _0xf2ddx12b[_0xaf82[816]][_0xaf82[55]](_0xaf82[621])){}else {if(!_0xf2ddx12b[_0xaf82[816]]){_0xf2ddx12b[_0xaf82[816]]= _0xaf82[817]};_0xf2ddx115[_0xaf82[283]](_0xaf82[6]+ _0xf2ddx12b[_0xaf82[816]]+ _0xaf82[273]+ _0xf2ddx12b[_0xaf82[835]]);_0xf2ddx115[_0xaf82[836]](_0xf2ddx12b[_0xaf82[816]],_0xf2ddx12b[_0xaf82[835]])};break;case _0xaf82[811]:if(window[_0xaf82[815]]&& window[_0xaf82[815]][_0xaf82[55]](_0xf2ddx12b[_0xaf82[816]])|| _0xf2ddx12b[_0xaf82[816]][_0xaf82[55]](_0xaf82[621])){}else {if(!_0xf2ddx12b[_0xaf82[816]]){_0xf2ddx12b[_0xaf82[816]]= _0xaf82[817]};_0xf2ddx115[_0xaf82[283]](_0xaf82[189]+ _0xf2ddx12b[_0xaf82[816]]+ _0xaf82[273]+ _0xf2ddx12b[_0xaf82[835]]);_0xf2ddx115[_0xaf82[836]](_0xf2ddx12b[_0xaf82[816]],_0xf2ddx12b[_0xaf82[835]])};break;case _0xaf82[838]:console[_0xaf82[283]](_0xaf82[837]+ _0xf2ddx12b[_0xaf82[835]]);break;case _0xaf82[839]:console[_0xaf82[283]](_0xaf82[837]+ _0xf2ddx12b[_0xaf82[835]]);break;default:_0xf2ddx115[_0xaf82[283]](_0xaf82[840]+ _0xf2ddx12b[_0xaf82[601]])}};_0xf2ddx115[_0xaf82[726]]= function(_0xf2ddx12d){if(_0xf2ddx117[_0xaf82[802]]&& _0xf2ddx117[_0xaf82[802]][_0xaf82[655]]){_0xf2ddx117[_0xaf82[802]][_0xaf82[841]](_0xaf82[811],_0xf2ddx12d);return true};return false};_0xf2ddx115[_0xaf82[807]]= function(){window[_0xaf82[593]]= [];for(var _0xf2ddx12d in _0xf2ddx117[_0xaf82[842]]){if(!_0xf2ddx117[_0xaf82[842]][_0xf2ddx12d][_0xaf82[843]]){delete _0xf2ddx117[_0xaf82[842]][_0xf2ddx12d]}}};_0xf2ddx115[_0xaf82[822]]= function(_0xf2ddx12e,_0xf2ddx12f,_0xf2ddx8b,_0xf2ddxe2,_0xf2ddx130,_0xf2ddx131,_0xf2ddx132){window[_0xaf82[593]][_0xf2ddx12f]= _0xf2ddx8b;_0xf2ddx117[_0xaf82[842]][_0xf2ddx12f]= new _0xf2ddx133(_0xf2ddx12e,_0xf2ddx8b,_0xf2ddxe2,_0xf2ddx130,_0xf2ddx131,_0xf2ddx132)};_0xf2ddx115[_0xaf82[824]]= function(_0xf2ddx12f){window[_0xaf82[593]][_0xf2ddx12f]= null;if(_0xf2ddx117[_0xaf82[842]][_0xf2ddx12f]){delete _0xf2ddx117[_0xaf82[842]][_0xf2ddx12f]}};_0xf2ddx115[_0xaf82[825]]= function(_0xf2ddx12f,_0xf2ddxe2,_0xf2ddx130){if(_0xf2ddx117[_0xaf82[842]][_0xf2ddx12f]){_0xf2ddx117[_0xaf82[842]][_0xf2ddx12f][_0xaf82[819]]= _0xf2ddxe2;_0xf2ddx117[_0xaf82[842]][_0xf2ddx12f][_0xaf82[820]]= _0xf2ddx130}};function _0xf2ddx133(_0xf2ddx12e,_0xf2ddx8b,_0xf2ddxe2,_0xf2ddx130,_0xf2ddx131,_0xf2ddx132){this[_0xaf82[843]]= _0xf2ddx12e;this[_0xaf82[601]]= _0xf2ddx8b;this[_0xaf82[819]]= _0xf2ddxe2;this[_0xaf82[820]]= _0xf2ddx130;this[_0xaf82[844]]= _0xf2ddxe2;this[_0xaf82[845]]= _0xf2ddx130;this[_0xaf82[662]]= _0xf2ddx131;this[_0xaf82[846]]= _0xf2ddx132}_0xf2ddx115[_0xaf82[737]]= function(_0xf2ddx134){_0xf2ddx117[_0xaf82[736]]= _0xf2ddx134;if(_0xf2ddx118[_0xaf82[847]]){if(_0xf2ddx117[_0xaf82[736]]){_0xf2ddx117[_0xaf82[736]]= _0xf2ddx115[_0xaf82[726]]({name:_0xaf82[736],playerName:_0xf2ddx118[_0xaf82[848]]+ _0xf2ddx117[_0xaf82[372]],customSkins:$(_0xaf82[849])[_0xaf82[59]]()})}else {_0xf2ddx115[_0xaf82[726]]({name:_0xaf82[850]})}}};_0xf2ddx115[_0xaf82[738]]= function(){if(_0xf2ddx118[_0xaf82[847]]&& _0xf2ddx114[_0xaf82[654]]){_0xf2ddx115[_0xaf82[726]]({name:_0xaf82[826],x:ogario[_0xaf82[851]]+ ogario[_0xaf82[560]],y:ogario[_0xaf82[852]]+ ogario[_0xaf82[562]]})}};_0xf2ddx115[_0xaf82[836]]= function(_0xf2ddxe6,_0xf2ddx116){var _0xf2ddx135= new Date()[_0xaf82[854]]()[_0xaf82[168]](/^(\d{2}:\d{2}).*/,_0xaf82[853]);var _0xf2ddx136=_0xf2ddx115[_0xaf82[711]];var _0xf2ddx137=_0xaf82[855]+ _0xaf82[856]+ _0xf2ddx135+ _0xaf82[857]+ _0xaf82[858]+ defaultSettings[_0xaf82[859]]+ _0xaf82[860]+ _0xf2ddx136+ _0xaf82[481]+ _0xf2ddx150(_0xf2ddxe6)+ _0xaf82[861]+ _0xaf82[862]+ _0xf2ddx150(_0xf2ddx116)+ _0xaf82[752]+ _0xaf82[652];$(_0xaf82[597])[_0xaf82[279]](_0xf2ddx137);$(_0xaf82[597])[_0xaf82[863]](_0xaf82[706]);$(_0xaf82[597])[_0xaf82[865]]({'\x73\x63\x72\x6F\x6C\x6C\x54\x6F\x70':$(_0xaf82[597])[_0xaf82[257]](_0xaf82[864])},500)};_0xf2ddx115[_0xaf82[739]]= function(){window[_0xaf82[866]]= [];var _0xf2ddx138=document[_0xaf82[407]](_0xaf82[147]);var _0xf2ddx120=_0xf2ddx138[_0xaf82[71]];var _0xf2ddx121=_0xf2ddx138[_0xaf82[715]];var _0xf2ddx139=(_0xf2ddx120- 18)/ _0xf2ddx115[_0xaf82[867]]();var _0xf2ddx13a=_0xf2ddx115[_0xaf82[868]]();_0xf2ddx117[_0xaf82[869]]= 18/ 2;_0xf2ddx117[_0xaf82[870]]= _0xf2ddx117[_0xaf82[869]]+ (_0xf2ddx121- _0xf2ddx120);var _0xf2ddx13b=_0xf2ddx117[_0xaf82[869]];var _0xf2ddx13c=_0xf2ddx117[_0xaf82[870]];var _0xf2ddx13d=-(2* _0xf2ddx117[_0xaf82[871]]+ 2);var _0xf2ddx13e=_0xf2ddx138[_0xaf82[873]](_0xaf82[872]);_0xf2ddx13e[_0xaf82[874]](0,0,_0xf2ddx120,_0xf2ddx121);_0xf2ddx13e[_0xaf82[875]]= _0xf2ddx117[_0xaf82[876]];var _0xf2ddx13f=_0xaf82[6];var _0xf2ddx140=_0xaf82[6];if(!defaultmapsettings[_0xaf82[877]]){_0xf2ddx140= _0xaf82[878]};var _0xf2ddx141=Object[_0xaf82[833]](_0xf2ddx117[_0xaf82[842]])[_0xaf82[879]]();window[_0xaf82[880]]= _0xf2ddx117[_0xaf82[842]];window[_0xaf82[881]]= [];for(var _0xf2ddx142=0;_0xf2ddx142< window[_0xaf82[882]][_0xaf82[140]];_0xf2ddx142++){window[_0xaf82[881]][_0xf2ddx142]= window[_0xaf82[882]][_0xf2ddx142][_0xaf82[372]]};for(var _0xf2ddxd8=0;_0xf2ddxd8< _0xf2ddx141[_0xaf82[140]];_0xf2ddxd8++){for(var _0xf2ddx143=1;_0xf2ddx143<= _0xf2ddxd8;_0xf2ddx143++){if(_0xf2ddxd8- _0xf2ddx143>= 0&& _0xf2ddx117[_0xaf82[842]][_0xf2ddx141[_0xf2ddxd8]][_0xaf82[601]]== _0xf2ddx117[_0xaf82[842]][_0xf2ddx141[_0xf2ddxd8- _0xf2ddx143]][_0xaf82[601]]){if(window[_0xaf82[593]][_0xf2ddx141[_0xf2ddxd8]]!= _0xf2ddx117[_0xaf82[842]][_0xf2ddx141[_0xf2ddxd8]][_0xaf82[601]]){_0xf2ddx117[_0xaf82[842]][_0xf2ddx141[_0xf2ddxd8]][_0xaf82[601]]= window[_0xaf82[593]][_0xf2ddx141[_0xf2ddxd8]]}else {if(window[_0xaf82[593]][_0xf2ddx141[_0xf2ddxd8- _0xf2ddx143]]!= _0xf2ddx117[_0xaf82[842]][_0xf2ddx141[_0xf2ddxd8- _0xf2ddx143]][_0xaf82[601]]){_0xf2ddx117[_0xaf82[842]][_0xf2ddx141[_0xf2ddxd8- _0xf2ddx143]][_0xaf82[601]]= window[_0xaf82[593]][_0xf2ddx141[_0xf2ddxd8- _0xf2ddx143]]}}}};for(var _0xf2ddx12d=0;_0xf2ddx12d< legendmod[_0xaf82[374]][_0xaf82[140]];_0xf2ddx12d++){if(legendmod[_0xaf82[374]][_0xf2ddx12d]&& _0xf2ddx117[_0xaf82[842]][_0xf2ddx141[_0xf2ddxd8]]&& _0xf2ddx150(_0xf2ddx117[_0xaf82[842]][_0xf2ddx141[_0xf2ddxd8]][_0xaf82[601]])== legendmod[_0xaf82[374]][_0xf2ddx12d][_0xaf82[372]]){_0xf2ddx117[_0xaf82[842]][_0xf2ddx141[_0xf2ddxd8]][_0xaf82[883]]= _0xf2ddx12d;if(_0xf2ddxd8- 1>= 0&& _0xf2ddx117[_0xaf82[842]][_0xf2ddx141[_0xf2ddxd8]][_0xaf82[883]]< _0xf2ddx117[_0xaf82[842]][_0xf2ddx141[_0xf2ddxd8- 1]][_0xaf82[883]]){var _0xf2ddxe2=_0xf2ddx117[_0xaf82[842]][_0xf2ddx141[_0xf2ddxd8]];if(_0xf2ddxe2!= _0xf2ddx117[_0xaf82[842]][_0xf2ddx141[_0xf2ddxd8- 1]]&& _0xf2ddxe2!= _0xf2ddx117[_0xaf82[842]][_0xf2ddx141[_0xf2ddxd8- 2]]&& _0xf2ddxe2!= _0xf2ddx117[_0xaf82[842]][_0xf2ddx141[_0xf2ddxd8- 3]]&& _0xf2ddxe2!= _0xf2ddx117[_0xaf82[842]][_0xf2ddx141[_0xf2ddxd8- 4]]&& _0xf2ddxe2!= _0xf2ddx117[_0xaf82[842]][_0xf2ddx141[_0xf2ddxd8- 5]]&& window[_0xaf82[881]][_0xaf82[55]](_0xf2ddx117[_0xaf82[842]][_0xf2ddx141[_0xf2ddxd8]][_0xaf82[601]])&& _0xf2ddx117[_0xaf82[842]][_0xf2ddx141[_0xf2ddxd8]][_0xaf82[601]]!= _0xf2ddx117[_0xaf82[842]][_0xf2ddx141[_0xf2ddxd8- 1]][_0xaf82[601]]&& _0xf2ddx117[_0xaf82[842]][_0xf2ddx141[_0xf2ddxd8]]&& _0xf2ddx117[_0xaf82[842]][_0xf2ddx141[_0xf2ddxd8- 1]]){var _0xf2ddx9d=_0xf2ddx117[_0xaf82[842]][_0xf2ddx141[_0xf2ddxd8]];_0xf2ddx117[_0xaf82[842]][_0xf2ddx141[_0xf2ddxd8]]= _0xf2ddx117[_0xaf82[842]][_0xf2ddx141[_0xf2ddxd8- 1]];_0xf2ddx117[_0xaf82[842]][_0xf2ddx141[_0xf2ddxd8- 1]]= _0xf2ddx9d}}}}};if(_0xf2ddx141[_0xaf82[140]]=== 0){};var _0xf2ddx144=2;var _0xf2ddx145=0;for(var _0xf2ddx12c;(_0xf2ddx12c= _0xf2ddx141[_0xaf82[884]]());){var _0xf2ddx146=_0xf2ddx117[_0xaf82[842]][_0xf2ddx12c];window[_0xaf82[866]][_0xaf82[885]](_0xf2ddx150(_0xf2ddx146[_0xaf82[601]]));var _0xf2ddx147=false;if(defaultmapsettings[_0xaf82[877]]){if(application[_0xaf82[886]][_0xf2ddx146[_0xaf82[601]]]&& application[_0xaf82[888]][application[_0xaf82[886]][_0xf2ddx146[_0xaf82[601]]]+ _0xaf82[887]]){_0xf2ddx140= _0xf2ddx140+ (_0xaf82[889]+ _0xf2ddx12c+ _0xaf82[890]+ _0xf2ddx146[_0xaf82[662]]+ _0xaf82[891]+ application[_0xaf82[888]][application[_0xaf82[886]][_0xf2ddx146[_0xaf82[601]]]+ _0xaf82[887]][_0xaf82[892]]+ _0xaf82[893]+ _0xaf82[894])}else {_0xf2ddx140= _0xf2ddx140+ (_0xaf82[889]+ _0xf2ddx12c+ _0xaf82[890]+ _0xf2ddx146[_0xaf82[662]]+ _0xaf82[895]+ _0xaf82[894])}};for(var _0xf2ddx12d=0;_0xf2ddx12d< legendmod[_0xaf82[896]][_0xaf82[140]];_0xf2ddx12d++){if(legendmod[_0xaf82[374]][_0xf2ddx12d]&& _0xf2ddx150(_0xf2ddx146[_0xaf82[601]])== legendmod[_0xaf82[374]][_0xf2ddx12d][_0xaf82[372]]){if(_0xf2ddx147== false){_0xf2ddx140= _0xf2ddx140+ (_0xaf82[897]+ application[_0xaf82[566]](window[_0xaf82[882]][_0xf2ddx12d][_0xaf82[819]],window[_0xaf82[882]][_0xf2ddx12d][_0xaf82[820]])+ _0xaf82[898]);_0xf2ddx140= _0xf2ddx140+ (_0xaf82[899]+ application[_0xaf82[901]](window[_0xaf82[882]][_0xf2ddx12d][_0xaf82[900]])+ _0xaf82[902]);_0xf2ddx147= true}}};if(_0xf2ddx147== false){if(application[_0xaf82[566]](_0xf2ddx146[_0xaf82[819]],_0xf2ddx146[_0xaf82[820]])== _0xaf82[903]|| legendmod[_0xaf82[67]]== _0xaf82[68]){_0xf2ddx140= _0xf2ddx140+ (_0xaf82[897]+ application[_0xaf82[566]](_0xf2ddx146[_0xaf82[819]],_0xf2ddx146[_0xaf82[820]])+ _0xaf82[902])}};_0xf2ddx145++;_0xf2ddx13f+= _0xf2ddx140+ _0xf2ddx150(_0xf2ddx146[_0xaf82[601]]);_0xf2ddx140= _0xaf82[652];if(!defaultmapsettings[_0xaf82[877]]){_0xf2ddx140= _0xaf82[904]+ _0xf2ddx144+ _0xaf82[905];_0xf2ddx144++};if(_0xf2ddx118[_0xaf82[906]]){var _0xf2ddx8b=_0xf2ddx146[_0xaf82[601]]+ _0xaf82[907]+ _0xf2ddx118[_0xaf82[908]]+ _0xaf82[909];var _0xf2ddx148=(_0xf2ddx146[_0xaf82[819]]+ _0xf2ddx13a)* _0xf2ddx139+ _0xf2ddx13b;var _0xf2ddx149=(_0xf2ddx146[_0xaf82[820]]+ _0xf2ddx13a)* _0xf2ddx139+ _0xf2ddx13c;_0xf2ddx13e[_0xaf82[910]]= _0xaf82[911];_0xf2ddx13e[_0xaf82[912]]= _0xf2ddx117[_0xaf82[913]];_0xf2ddx13e[_0xaf82[914]]= _0xf2ddx117[_0xaf82[915]];_0xf2ddx13e[_0xaf82[916]](_0xf2ddx8b,_0xf2ddx148,_0xf2ddx149+ _0xf2ddx13d);_0xf2ddx13e[_0xaf82[148]]= _0xf2ddx118[_0xaf82[821]];_0xf2ddx13e[_0xaf82[143]](_0xf2ddx8b,_0xf2ddx148,_0xf2ddx149+ _0xf2ddx13d);_0xf2ddx13e[_0xaf82[917]]();_0xf2ddx13e[_0xaf82[919]](_0xf2ddx148,_0xf2ddx149,_0xf2ddx117[_0xaf82[871]],0,_0xf2ddx117[_0xaf82[918]],!1);_0xf2ddx13e[_0xaf82[920]]();_0xf2ddx13e[_0xaf82[148]]= _0xf2ddx146[_0xaf82[662]];_0xf2ddx13e[_0xaf82[921]]()}};if(_0xf2ddx118[_0xaf82[922]]){if(!defaultmapsettings[_0xaf82[877]]){_0xf2ddx13f+= _0xaf82[904]};_0xf2ddx13f+= _0xaf82[923]+ _0xf2ddx145+ _0xaf82[752];$(_0xaf82[708])[_0xaf82[281]](_0xf2ddx13f)}};_0xf2ddx115[_0xaf82[735]]= function(){return _0xf2ddx114[_0xaf82[654]]?_0xf2ddx114[_0xaf82[654]][_0xaf82[387]]:false};_0xf2ddx115[_0xaf82[867]]= function(){return _0xf2ddx114[_0xaf82[654]]?_0xf2ddx114[_0xaf82[654]][_0xaf82[924]]:_0xf2ddx117[_0xaf82[924]]};_0xf2ddx115[_0xaf82[868]]= function(){return _0xf2ddx114[_0xaf82[654]]?_0xf2ddx114[_0xaf82[654]][_0xaf82[925]]:_0xf2ddx117[_0xaf82[925]]};_0xf2ddx115[_0xaf82[780]]= function(){var _0xf2ddx14a={};$(_0xaf82[931])[_0xaf82[930]](function(){var _0xf2ddx14b=$(this);var _0xf2ddx8a=_0xf2ddx14b[_0xaf82[257]](_0xaf82[926]);var _0xf2ddx8b=_0xf2ddx14b[_0xaf82[206]](_0xaf82[927]);var _0xf2ddx14c;if(_0xf2ddx8a=== _0xaf82[928]){_0xf2ddx14c= _0xf2ddx14b[_0xaf82[257]](_0xaf82[929])}else {_0xf2ddx14c= $(this)[_0xaf82[59]]()};_0xf2ddx14a[_0xf2ddx8b]= _0xf2ddx14c});return _0xf2ddx14a};_0xf2ddx115[_0xaf82[741]]= function(_0xf2ddx14a){$(_0xaf82[931])[_0xaf82[930]](function(){var _0xf2ddx14b=$(this);var _0xf2ddx8a=_0xf2ddx14b[_0xaf82[257]](_0xaf82[926]);var _0xf2ddx8b=_0xf2ddx14b[_0xaf82[206]](_0xaf82[927]);if(_0xf2ddx14a[_0xaf82[932]](_0xf2ddx8b)){var _0xf2ddx14c=_0xf2ddx14a[_0xf2ddx8b];if(_0xf2ddx8a=== _0xaf82[928]){_0xf2ddx14b[_0xaf82[257]](_0xaf82[929],_0xf2ddx14c)}else {$(this)[_0xaf82[59]](_0xf2ddx14c)}}})};_0xf2ddx115[_0xaf82[627]]= function(_0xf2ddx8b,_0xf2ddx14d){return _0xf2ddx114[_0xaf82[934]][_0xf2ddx115[_0xaf82[601]]+ _0xaf82[933]+ _0xf2ddx8b]|| _0xf2ddx14d};_0xf2ddx115[_0xaf82[781]]= function(_0xf2ddx8b,_0xf2ddx14c){_0xf2ddx114[_0xaf82[934]][_0xf2ddx115[_0xaf82[601]]+ _0xaf82[933]+ _0xf2ddx8b]= _0xf2ddx14c};function _0xf2ddx14e(url,_0xf2ddx8d){var _0xf2ddx14f=document[_0xaf82[936]](_0xaf82[935]);_0xf2ddx14f[_0xaf82[926]]= _0xaf82[937];_0xf2ddx14f[_0xaf82[470]]= url;if( typeof _0xf2ddx8d!== _0xaf82[938]){_0xf2ddx14f[_0xaf82[939]]= _0xf2ddx8d};document[_0xaf82[647]][_0xaf82[940]](_0xf2ddx14f)}function _0xf2ddx150(_0xf2ddx12d){return _0xf2ddx12d[_0xaf82[168]](/&/g,_0xaf82[945])[_0xaf82[168]](/</g,_0xaf82[944])[_0xaf82[168]](/>/g,_0xaf82[943])[_0xaf82[168]](/"/g,_0xaf82[942])[_0xaf82[168]](/'/g,_0xaf82[941])}$(_0xaf82[693])[_0xaf82[692]](function(_0xf2ddx12d){if(_0xf2ddx12d[_0xaf82[685]]=== 13){$(_0xaf82[697])[_0xaf82[208]]()}})}function Universalchatfix(){if($(_0xaf82[657])[_0xaf82[721]](_0xaf82[655])){$(_0xaf82[657])[_0xaf82[208]]();$(_0xaf82[657])[_0xaf82[208]]()};if(window[_0xaf82[946]]){LegendModServerConnect()}}function showMenu(){$(_0xaf82[742])[_0xaf82[87]]();$(_0xaf82[947])[_0xaf82[208]]()}function showMenu2(){$(_0xaf82[742])[_0xaf82[87]]();$(_0xaf82[947])[_0xaf82[208]]()}function hideMenu(){$(_0xaf82[742])[_0xaf82[61]]()}function showSearchHud(){if(!document[_0xaf82[56]][_0xaf82[55]](_0xaf82[54])){getInfo()};$(_0xaf82[949])[_0xaf82[948]]();$(_0xaf82[950])[_0xaf82[948]]();$(_0xaf82[951])[_0xaf82[948]]();$(_0xaf82[952])[_0xaf82[948]]();$(_0xaf82[953])[_0xaf82[948]]()}function hideSearchHud(){$(_0xaf82[952])[_0xaf82[174]]();$(_0xaf82[949])[_0xaf82[174]]();$(_0xaf82[950])[_0xaf82[174]]();$(_0xaf82[951])[_0xaf82[174]]();$(_0xaf82[953])[_0xaf82[174]]()}function appendLog(_0xf2ddx158){var region=$(_0xaf82[60])[_0xaf82[59]]();$(_0xaf82[961])[_0xaf82[713]](_0xaf82[954]+ _0xaf82[955]+ region[_0xaf82[956]](0,2)+ _0xaf82[957]+ _0xaf82[958]+ currentToken+ _0xaf82[959]+ _0xf2ddx158+ _0xaf82[960]);$(_0xaf82[963])[_0xaf82[962]]()[_0xaf82[87]](100);bumpLog()}function appendLog2(_0xf2ddx158,_0xf2ddx15a){$(_0xaf82[961])[_0xaf82[713]](_0xaf82[954]+ _0xaf82[964]+ _0xf2ddx15a+ _0xaf82[965]+ currentToken+ _0xaf82[959]+ _0xf2ddx158+ _0xaf82[960]);$(_0xaf82[963])[_0xaf82[962]]()[_0xaf82[87]](100);bumpLog()}function appendLog3(_0xf2ddx158,_0xf2ddx15a,_0xf2ddx15c,_0xf2ddx15d){$(_0xaf82[961])[_0xaf82[713]](_0xaf82[954]+ _0xaf82[964]+ _0xf2ddx15a+ _0xaf82[966]+ _0xf2ddx15c+ _0xaf82[967]+ _0xf2ddx15d+ _0xaf82[965]+ currentToken+ _0xaf82[959]+ _0xf2ddx158+ _0xaf82[960]);$(_0xaf82[963])[_0xaf82[962]]()[_0xaf82[87]](100);bumpLog()}function appendLog4(_0xf2ddx158,_0xf2ddx15a){$(_0xaf82[961])[_0xaf82[713]](_0xaf82[954]+ _0xaf82[968]+ _0xf2ddx15a+ _0xaf82[965]+ currentToken+ _0xaf82[959]+ _0xf2ddx158+ _0xaf82[960]);$(_0xaf82[963])[_0xaf82[962]]()[_0xaf82[87]](100);bumpLog()}function connectto(_0xf2ddx15a){$(_0xaf82[213])[_0xaf82[59]](_0xf2ddx15a);$(_0xaf82[295])[_0xaf82[208]]();setTimeout(function(){if($(_0xaf82[213])[_0xaf82[59]]()!= $(_0xaf82[969])[_0xaf82[59]]()){toastr[_0xaf82[173]](_0xaf82[970])}},1500)}function connectto1a(_0xf2ddx15a){$(_0xaf82[971])[_0xaf82[59]](_0xaf82[253]+ _0xf2ddx15a);$(_0xaf82[972])[_0xaf82[208]]();setTimeout(function(){if($(_0xaf82[213])[_0xaf82[59]]()!= $(_0xaf82[969])[_0xaf82[59]]()){toastr[_0xaf82[173]](_0xaf82[970])}},1500)}function connectto2(_0xf2ddx15c){$(_0xaf82[60])[_0xaf82[59]](_0xf2ddx15c)}function connectto3(_0xf2ddx15d){$(_0xaf82[69])[_0xaf82[59]](_0xf2ddx15d)}function bumpLog(){$(_0xaf82[961])[_0xaf82[865]]({scrollTop:0},_0xaf82[973])}function SquareAgar(){var _0xf2ddx165=document[_0xaf82[974]](_0xaf82[647])[0];$(_0xf2ddx165)[_0xaf82[279]](_0xaf82[975]+ _0xaf82[976]+ _0xaf82[977]+ _0xaf82[978]+ _0xaf82[979]+ _0xaf82[980]+ _0xaf82[981])}function sendicon1(){application[_0xaf82[984]](101,_0xaf82[982]+ pic1urlimg+ _0xaf82[983])}function sendicon2(){application[_0xaf82[984]](101,_0xaf82[982]+ pic2urlimg+ _0xaf82[983])}function sendicon3(){application[_0xaf82[984]](101,_0xaf82[982]+ pic3urlimg+ _0xaf82[983])}function sendicon4(){application[_0xaf82[984]](101,_0xaf82[982]+ pic4urlimg+ _0xaf82[983])}function sendicon5(){application[_0xaf82[984]](101,_0xaf82[982]+ pic5urlimg+ _0xaf82[983])}function sendicon6(){application[_0xaf82[984]](101,_0xaf82[982]+ pic6urlimg+ _0xaf82[983])}function setpic1data(){localStorage[_0xaf82[117]](_0xaf82[444],$(_0xaf82[985])[_0xaf82[59]]());$(_0xaf82[987])[_0xaf82[206]](_0xaf82[986],$(_0xaf82[985])[_0xaf82[59]]())}function setpic2data(){localStorage[_0xaf82[117]](_0xaf82[445],$(_0xaf82[988])[_0xaf82[59]]());$(_0xaf82[989])[_0xaf82[206]](_0xaf82[986],$(_0xaf82[988])[_0xaf82[59]]())}function setpic3data(){localStorage[_0xaf82[117]](_0xaf82[446],$(_0xaf82[990])[_0xaf82[59]]());$(_0xaf82[991])[_0xaf82[206]](_0xaf82[986],$(_0xaf82[990])[_0xaf82[59]]())}function setpic4data(){localStorage[_0xaf82[117]](_0xaf82[447],$(_0xaf82[992])[_0xaf82[59]]());$(_0xaf82[993])[_0xaf82[206]](_0xaf82[986],$(_0xaf82[992])[_0xaf82[59]]())}function setpic5data(){localStorage[_0xaf82[117]](_0xaf82[448],$(_0xaf82[994])[_0xaf82[59]]());$(_0xaf82[995])[_0xaf82[206]](_0xaf82[986],$(_0xaf82[994])[_0xaf82[59]]())}function setpic6data(){localStorage[_0xaf82[117]](_0xaf82[449],$(_0xaf82[996])[_0xaf82[59]]());$(_0xaf82[997])[_0xaf82[206]](_0xaf82[986],$(_0xaf82[996])[_0xaf82[59]]())}function sendyt1(){if(($(_0xaf82[493])[_0xaf82[59]]()!= _0xaf82[6])|| document[_0xaf82[407]](_0xaf82[372])[_0xaf82[405]][_0xaf82[55]](_0xaf82[549])){application[_0xaf82[984]](101,_0xaf82[998]+ yt1url+ _0xaf82[999])}else {toastr[_0xaf82[157]](Premadeletter39)}}function sendyt2(){if(($(_0xaf82[493])[_0xaf82[59]]()!= _0xaf82[6])|| document[_0xaf82[407]](_0xaf82[372])[_0xaf82[405]][_0xaf82[55]](_0xaf82[549])){application[_0xaf82[984]](101,_0xaf82[998]+ yt2url+ _0xaf82[999])}else {toastr[_0xaf82[157]](Premadeletter39)}}function sendyt3(){if(($(_0xaf82[493])[_0xaf82[59]]()!= _0xaf82[6])|| document[_0xaf82[407]](_0xaf82[372])[_0xaf82[405]][_0xaf82[55]](_0xaf82[549])){application[_0xaf82[984]](101,_0xaf82[998]+ yt3url+ _0xaf82[999])}else {toastr[_0xaf82[157]](Premadeletter39)}}function sendyt4(){if(($(_0xaf82[493])[_0xaf82[59]]()!= _0xaf82[6])|| document[_0xaf82[407]](_0xaf82[372])[_0xaf82[405]][_0xaf82[55]](_0xaf82[549])){application[_0xaf82[984]](101,_0xaf82[998]+ yt4url+ _0xaf82[999])}else {toastr[_0xaf82[157]](Premadeletter39)}}function sendyt5(){if(($(_0xaf82[493])[_0xaf82[59]]()!= _0xaf82[6])|| document[_0xaf82[407]](_0xaf82[372])[_0xaf82[405]][_0xaf82[55]](_0xaf82[549])){application[_0xaf82[984]](101,_0xaf82[998]+ yt5url+ _0xaf82[999])}else {toastr[_0xaf82[157]](Premadeletter39)}}function sendyt6(){if(($(_0xaf82[493])[_0xaf82[59]]()!= _0xaf82[6])|| document[_0xaf82[407]](_0xaf82[372])[_0xaf82[405]][_0xaf82[55]](_0xaf82[549])){application[_0xaf82[984]](101,_0xaf82[998]+ yt6url+ _0xaf82[999])}else {toastr[_0xaf82[157]](Premadeletter39)}}function setyt1data(){localStorage[_0xaf82[117]](_0xaf82[450],$(_0xaf82[1000])[_0xaf82[59]]());$(_0xaf82[1001])[_0xaf82[206]](_0xaf82[986],$(_0xaf82[1000])[_0xaf82[59]]())}function setyt2data(){localStorage[_0xaf82[117]](_0xaf82[451],$(_0xaf82[1002])[_0xaf82[59]]());$(_0xaf82[1003])[_0xaf82[206]](_0xaf82[986],$(_0xaf82[1002])[_0xaf82[59]]())}function setyt3data(){localStorage[_0xaf82[117]](_0xaf82[452],$(_0xaf82[1004])[_0xaf82[59]]());$(_0xaf82[1005])[_0xaf82[206]](_0xaf82[986],$(_0xaf82[1004])[_0xaf82[59]]())}function setyt4data(){localStorage[_0xaf82[117]](_0xaf82[453],$(_0xaf82[1006])[_0xaf82[59]]());$(_0xaf82[1007])[_0xaf82[206]](_0xaf82[986],$(_0xaf82[1006])[_0xaf82[59]]())}function setyt5data(){localStorage[_0xaf82[117]](_0xaf82[454],$(_0xaf82[1008])[_0xaf82[59]]());$(_0xaf82[1009])[_0xaf82[206]](_0xaf82[986],$(_0xaf82[1008])[_0xaf82[59]]())}function setyt6data(){localStorage[_0xaf82[117]](_0xaf82[455],$(_0xaf82[1010])[_0xaf82[59]]());$(_0xaf82[1011])[_0xaf82[206]](_0xaf82[986],$(_0xaf82[1010])[_0xaf82[59]]())}function setyt1url(){yt1url= $(_0xaf82[1012])[_0xaf82[59]]();if(getParameterByName(_0xaf82[160],yt1url)!= null){yt1url= getParameterByName(_0xaf82[160],yt1url)};localStorage[_0xaf82[117]](_0xaf82[438],yt1url);return yt1url}function setyt2url(){yt2url= $(_0xaf82[1013])[_0xaf82[59]]();if(getParameterByName(_0xaf82[160],yt2url)!= null){yt2url= getParameterByName(_0xaf82[160],yt2url)};localStorage[_0xaf82[117]](_0xaf82[439],yt2url);return yt2url}function setyt3url(){yt3url= $(_0xaf82[1014])[_0xaf82[59]]();if(getParameterByName(_0xaf82[160],yt3url)!= null){yt3url= getParameterByName(_0xaf82[160],yt3url)};localStorage[_0xaf82[117]](_0xaf82[440],yt3url);return yt3url}function setyt4url(){yt4url= $(_0xaf82[1015])[_0xaf82[59]]();if(getParameterByName(_0xaf82[160],yt4url)!= null){yt4url= getParameterByName(_0xaf82[160],yt4url)};localStorage[_0xaf82[117]](_0xaf82[441],yt4url);return yt4url}function setyt5url(){yt5url= $(_0xaf82[1016])[_0xaf82[59]]();if(getParameterByName(_0xaf82[160],yt5url)!= null){yt5url= getParameterByName(_0xaf82[160],yt5url)};localStorage[_0xaf82[117]](_0xaf82[442],yt5url);return yt5url}function setyt6url(){yt6url= $(_0xaf82[1017])[_0xaf82[59]]();if(getParameterByName(_0xaf82[160],yt6url)!= null){yt6url= getParameterByName(_0xaf82[160],yt6url)};localStorage[_0xaf82[117]](_0xaf82[443],yt6url);return yt6url}function seticonfunction(){if(setmessagecom== _0xaf82[100]){YessetMsgComReturn()};if(setyt== _0xaf82[100]){YessetytReturn()};if(setscriptingcom== _0xaf82[100]){YessetScriptingComReturn()};if(seticon== _0xaf82[99]){NoseticonReturn()}else {if(seticon== _0xaf82[100]){YesseticonReturn()}}}function setmessagecomfunction(){if(seticon== _0xaf82[100]){YesseticonReturn()};if(setyt== _0xaf82[100]){YessetytReturn()};if(setscriptingcom== _0xaf82[100]){YessetScriptingComReturn()};if(setmessagecom== _0xaf82[99]){NosetMsgComReturn()}else {if(setmessagecom== _0xaf82[100]){YessetMsgComReturn()}}}function setytfunction(){if(setmessagecom== _0xaf82[100]){YessetMsgComReturn()};if(seticon== _0xaf82[100]){YesseticonReturn()};if(setscriptingcom== _0xaf82[100]){YessetScriptingComReturn()};if(setyt== _0xaf82[99]){NosetytReturn()}else {if(setyt== _0xaf82[100]){YessetytReturn()}}}function setscriptingfunction(){if(seticon== _0xaf82[100]){YesseticonReturn()};if(setyt== _0xaf82[100]){YessetytReturn()};if(setmessagecom== _0xaf82[100]){YessetMsgComReturn()};if(setscriptingcom== _0xaf82[99]){NosetScriptingComReturn()}else {if(setscriptingcom== _0xaf82[100]){YessetScriptingComReturn()}}}function NoseticonReturn(){$(_0xaf82[1018])[_0xaf82[87]]();return seticon= _0xaf82[100]}function YesseticonReturn(){$(_0xaf82[1018])[_0xaf82[61]]();return seticon= _0xaf82[99]}function NosetMsgComReturn(){$(_0xaf82[1019])[_0xaf82[87]]();return setmessagecom= _0xaf82[100]}function YessetMsgComReturn(){$(_0xaf82[1019])[_0xaf82[61]]();return setmessagecom= _0xaf82[99]}function NosetytReturn(){$(_0xaf82[1020])[_0xaf82[87]]();return setyt= _0xaf82[100]}function YessetytReturn(){$(_0xaf82[1020])[_0xaf82[61]]();return setyt= _0xaf82[99]}function NosetScriptingComReturn(){$(_0xaf82[1021])[_0xaf82[87]]();return setscriptingcom= _0xaf82[100]}function YessetScriptingComReturn(){$(_0xaf82[1021])[_0xaf82[61]]();return setscriptingcom= _0xaf82[99]}function changePicFun(){$(_0xaf82[1022])[_0xaf82[61]]();$(_0xaf82[1023])[_0xaf82[61]]();$(_0xaf82[1024])[_0xaf82[61]]();$(_0xaf82[1025])[_0xaf82[61]]();$(_0xaf82[1026])[_0xaf82[61]]();$(_0xaf82[1027])[_0xaf82[61]]();$(_0xaf82[1028])[_0xaf82[61]]();$(_0xaf82[1029])[_0xaf82[61]]();$(_0xaf82[1030])[_0xaf82[61]]();if($(_0xaf82[1031])[_0xaf82[59]]()== 1){$(_0xaf82[1022])[_0xaf82[87]]();$(_0xaf82[1030])[_0xaf82[87]]()};if($(_0xaf82[1031])[_0xaf82[59]]()== 2){$(_0xaf82[1023])[_0xaf82[87]]();$(_0xaf82[1026])[_0xaf82[87]]()};if($(_0xaf82[1031])[_0xaf82[59]]()== 3){$(_0xaf82[1024])[_0xaf82[87]]();$(_0xaf82[1027])[_0xaf82[87]]()};if($(_0xaf82[1031])[_0xaf82[59]]()== 4){$(_0xaf82[1025])[_0xaf82[87]]()};if($(_0xaf82[1031])[_0xaf82[59]]()== 5){$(_0xaf82[1028])[_0xaf82[87]]();$(_0xaf82[1029])[_0xaf82[87]]()}}function changePhotoFun(){$(_0xaf82[1032])[_0xaf82[61]]();$(_0xaf82[1033])[_0xaf82[61]]();$(_0xaf82[1034])[_0xaf82[61]]();$(_0xaf82[1035])[_0xaf82[61]]();$(_0xaf82[1036])[_0xaf82[61]]();$(_0xaf82[1037])[_0xaf82[61]]();$(_0xaf82[1012])[_0xaf82[61]]();$(_0xaf82[1013])[_0xaf82[61]]();$(_0xaf82[1014])[_0xaf82[61]]();$(_0xaf82[1015])[_0xaf82[61]]();$(_0xaf82[1016])[_0xaf82[61]]();$(_0xaf82[1017])[_0xaf82[61]]();$(_0xaf82[985])[_0xaf82[61]]();$(_0xaf82[988])[_0xaf82[61]]();$(_0xaf82[990])[_0xaf82[61]]();$(_0xaf82[992])[_0xaf82[61]]();$(_0xaf82[994])[_0xaf82[61]]();$(_0xaf82[996])[_0xaf82[61]]();$(_0xaf82[1000])[_0xaf82[61]]();$(_0xaf82[1002])[_0xaf82[61]]();$(_0xaf82[1004])[_0xaf82[61]]();$(_0xaf82[1006])[_0xaf82[61]]();$(_0xaf82[1008])[_0xaf82[61]]();$(_0xaf82[1010])[_0xaf82[61]]();if($(_0xaf82[1038])[_0xaf82[59]]()== 1){$(_0xaf82[1032])[_0xaf82[87]]();$(_0xaf82[985])[_0xaf82[87]]()};if($(_0xaf82[1038])[_0xaf82[59]]()== 2){$(_0xaf82[1033])[_0xaf82[87]]();$(_0xaf82[988])[_0xaf82[87]]()};if($(_0xaf82[1038])[_0xaf82[59]]()== 3){$(_0xaf82[1034])[_0xaf82[87]]();$(_0xaf82[990])[_0xaf82[87]]()};if($(_0xaf82[1038])[_0xaf82[59]]()== 4){$(_0xaf82[1035])[_0xaf82[87]]();$(_0xaf82[992])[_0xaf82[87]]()};if($(_0xaf82[1038])[_0xaf82[59]]()== 5){$(_0xaf82[1036])[_0xaf82[87]]();$(_0xaf82[994])[_0xaf82[87]]()};if($(_0xaf82[1038])[_0xaf82[59]]()== 6){$(_0xaf82[1037])[_0xaf82[87]]();$(_0xaf82[996])[_0xaf82[87]]()};if($(_0xaf82[1038])[_0xaf82[59]]()== 7){$(_0xaf82[1012])[_0xaf82[87]]();$(_0xaf82[1000])[_0xaf82[87]]()};if($(_0xaf82[1038])[_0xaf82[59]]()== 8){$(_0xaf82[1013])[_0xaf82[87]]();$(_0xaf82[1002])[_0xaf82[87]]()};if($(_0xaf82[1038])[_0xaf82[59]]()== 9){$(_0xaf82[1014])[_0xaf82[87]]();$(_0xaf82[1004])[_0xaf82[87]]()};if($(_0xaf82[1038])[_0xaf82[59]]()== 10){$(_0xaf82[1015])[_0xaf82[87]]();$(_0xaf82[1006])[_0xaf82[87]]()};if($(_0xaf82[1038])[_0xaf82[59]]()== 11){$(_0xaf82[1016])[_0xaf82[87]]();$(_0xaf82[1008])[_0xaf82[87]]()};if($(_0xaf82[1038])[_0xaf82[59]]()== 12){$(_0xaf82[1017])[_0xaf82[87]]();$(_0xaf82[1010])[_0xaf82[87]]()}}function msgcommand1f(){commandMsg= _0xaf82[522];otherMsg= _0xaf82[6];dosendmsgcommand()}function msgcommand2f(){commandMsg= _0xaf82[517];otherMsg= _0xaf82[6];dosendmsgcommand()}function msgcommand3f(){commandMsg= _0xaf82[533];otherMsg= _0xaf82[6];dosendmsgcommand()}function msgcommand4f(){commandMsg= _0xaf82[537];otherMsg= _0xaf82[6];dosendmsgcommand()}function msgcommand5f(){commandMsg= _0xaf82[541];otherMsg= _0xaf82[6];dosendmsgcommand()}function msgcommand6f(){commandMsg= _0xaf82[528];otherMsg= _0xaf82[6];dosendmsgcommand()}function dosendmsgcommand(){if(application[_0xaf82[1039]]== _0xaf82[6]|| $(_0xaf82[493])[_0xaf82[59]]()== _0xaf82[6]){toastr[_0xaf82[184]](_0xaf82[199]+ Premadeletter123+ _0xaf82[200]+ Premadeletter39)}else {application[_0xaf82[984]](101,_0xaf82[1040]+ $(_0xaf82[293])[_0xaf82[59]]()+ _0xaf82[1041]+ commandMsg+ _0xaf82[1042]+ otherMsg)}}function CutNameConflictwithMessageFunction(){return CutNameConflictwithMessage= true}function inject(_0xf2ddx8a,_0xf2ddx19b){switch(_0xf2ddx8a){case _0xaf82[1044]:var inject=document[_0xaf82[936]](_0xaf82[935]);inject[_0xaf82[926]]= _0xaf82[937];inject[_0xaf82[940]](document[_0xaf82[1043]](_0xf2ddx19b));break;case _0xaf82[1047]:var inject=document[_0xaf82[936]](_0xaf82[1045]);inject[_0xaf82[926]]= _0xaf82[1046];inject[_0xaf82[940]](document[_0xaf82[1043]](_0xf2ddx19b));break};(document[_0xaf82[647]]|| document[_0xaf82[204]])[_0xaf82[940]](inject)}function StartEditGameNames(){inject(_0xaf82[1047],_0xaf82[1048]);inject(_0xaf82[1044],!function _0xf2ddx12d(_0xf2ddx19d){if(_0xaf82[938]!= typeof document[_0xaf82[974]](_0xaf82[647])[0]&& _0xaf82[938]!= typeof document[_0xaf82[974]](_0xaf82[280])[0]){var _0xf2ddx19e={l:{score:0,names:[],leaderboard:{},toggled:!0,prototypes:{canvas:CanvasRenderingContext2D[_0xaf82[125]],old:{}}},f:{prototype_override:function(_0xf2ddx12d,_0xf2ddx19d,_0xf2ddx19f,_0xf2ddx8e){_0xf2ddx12d in _0xf2ddx19e[_0xaf82[1049]][_0xaf82[127]][_0xaf82[126]]|| (_0xf2ddx19e[_0xaf82[1049]][_0xaf82[127]][_0xaf82[126]][_0xf2ddx12d]= {}),_0xf2ddx19d in _0xf2ddx19e[_0xaf82[1049]][_0xaf82[127]][_0xaf82[126]][_0xf2ddx12d]|| (_0xf2ddx19e[_0xaf82[1049]][_0xaf82[127]][_0xaf82[126]][_0xf2ddx12d][_0xf2ddx19d]= _0xf2ddx19e[_0xaf82[1049]][_0xaf82[127]][_0xf2ddx12d][_0xf2ddx19d]),_0xf2ddx19e[_0xaf82[1049]][_0xaf82[127]][_0xf2ddx12d][_0xf2ddx19d]= function(){_0xaf82[128]== _0xf2ddx19f&& _0xf2ddx8e(this,arguments),_0xf2ddx19e[_0xaf82[1049]][_0xaf82[127]][_0xaf82[126]][_0xf2ddx12d][_0xf2ddx19d][_0xaf82[129]](this,arguments),_0xaf82[130]== _0xf2ddx19f&& _0xf2ddx8e(this,arguments)}},filltext_override:function(){_0xf2ddx19e[_0xaf82[150]][_0xaf82[151]](_0xaf82[137],_0xaf82[143],_0xaf82[128],function(_0xf2ddx12d,_0xf2ddx19d){var _0xf2ddx19f=_0xf2ddx19d[0];if(_0xf2ddx19d,_0xf2ddx19f[_0xaf82[1050]](/^(1|2|3|4|5|6|7|8|9|10)\.(.+?)$/)){var _0xf2ddx8e=_0xaf82[6],_0xf2ddx143=_0xf2ddx19f[_0xaf82[190]](/\.(.+)?/);_0xf2ddx19e[_0xaf82[1049]][_0xaf82[374]][_0xf2ddx143[0]]= _0xf2ddx143[1];for(k in _0xf2ddx19e[_0xaf82[1049]][_0xaf82[374]]){_0xf2ddx8e+= _0xf2ddx19e[_0xaf82[1053]][_0xaf82[1052]](_0xaf82[1051]+ k,_0xf2ddx19e[_0xaf82[1049]][_0xaf82[374]][k])};document[_0xaf82[407]](_0xaf82[1054])[_0xaf82[203]]= _0xf2ddx8e}else {_0xf2ddx19f[_0xaf82[1050]](/^score\:\s([0-9]+)$/i)?(_0xf2ddx19e[_0xaf82[1049]][_0xaf82[1055]]= parseInt(_0xf2ddx19f[_0xaf82[190]](/score:\s([0-9]+)?/i)[1]),document[_0xaf82[407]](_0xaf82[1056])[_0xaf82[203]]= _0xf2ddx19e[_0xaf82[1053]][_0xaf82[1052]](_0xaf82[1055],_0xf2ddx19e[_0xaf82[1049]][_0xaf82[1055]])):!(_0xaf82[6]!== _0xf2ddx19f&& _0xf2ddx19f[_0xaf82[140]]<= 15)|| _0xf2ddx19e[_0xaf82[1049]][_0xaf82[1057]][_0xaf82[179]](_0xf2ddx19f)> -1 || _0xf2ddx19f[_0xaf82[1050]](/(leaderboard|connect|loading|starting\smass|xp\sboost|open\sshop|([0-9]{2})m\s(([0-9]{2})h\s)?([0-9]{2})s)/i) || _0xf2ddx19f[_0xaf82[1050]](/^(free\scoins|\s?([0-9]+)\scoins|\s?with\soffers|collect\sin\:|hourly\scoins|come\sback\sin|to\searn\:|starter\spack|hourly\sbonus|level\s([0-9]+)|([0-9\.]+)|.([0-9\.]+)|([0-9\.]+)\%|mass\sboost|coins|skins|shop|banana|cookie|jupiter|birdie|mercury|apple|halo|neptune|black\shole|uranus|star\sball|target|galaxy|venus|breakfast|saturn|pluto|tiger|hot\sdog|heart|mouse|wolf|goldfish|piggie|blueberry|bomb|bowling|candy|frog|hamburger|nose|seal|panda|pizza|snowman|sun|baseball|basketball|bug|cloud|moo|tomato|mushroom|donuts|terrible|ghost|apple\sface|turtle|brofist|puppy|footprint|pineapple|zebra|toon|octopus|radar|eye|owl|virus|smile|army|cat|nuclear|toxic|dog|sad|facepalm|luchador|zombie|bite|crazy|hockey|brain|evil|pirate|evil\seye|halloween|monster|scarecrow|spy|fly|spider|wasp|lizard|bat|snake|fox|coyote|hunter|sumo|bear|cougar|panther|lion|crocodile|shark|mammoth|raptor|t-rex|kraken|gingerbread|santa|evil\self|cupcake|boy\skiss|girl\skiss|cupid|shuttle|astronaut|space\sdog|alien|meteor|ufo|rocket|boot|gold\spot|hat|horseshoe|lucky\sclover|leprechaun|rainbow|choco\segg|carrot|statue|rooster|rabbit|jester|earth\sday|chihuahua|cactus|sombrero|hot\spepper|chupacabra|taco|piAƒA£A‚A±ata|thirteen|black\scat|raven|mask|goblin|green\sman|slime\sface|blob|invader|space\shunter)$/i) || (_0xf2ddx19e[_0xaf82[1049]][_0xaf82[1057]][_0xaf82[885]](_0xf2ddx19f),document[_0xaf82[407]](_0xaf82[1058])[_0xaf82[203]]= document[_0xaf82[407]](_0xaf82[1058])[_0xaf82[203]][_0xaf82[1060]](_0xf2ddx19e[_0xaf82[1053]][_0xaf82[1052]](_0xaf82[1059],_0xf2ddx19f)))}})},hotkeys:function(_0xf2ddx12d){88== _0xf2ddx12d[_0xaf82[685]]&& (document[_0xaf82[407]](_0xaf82[1061])[_0xaf82[1045]][_0xaf82[523]]= _0xf2ddx19e[_0xaf82[1049]][_0xaf82[1062]]?_0xaf82[525]:_0xaf82[732],_0xf2ddx19e[_0xaf82[1049]][_0xaf82[1062]]= _0xf2ddx19e[_0xaf82[1049]][_0xaf82[1062]]?!1:!0)}},u:{fonts:function(){return _0xaf82[1063]},html:function(){return _0xaf82[1064]},span:function(_0xf2ddx12d,_0xf2ddx19d){return _0xaf82[1065]+ _0xf2ddx12d+ _0xaf82[1066]+ _0xf2ddx19d+ _0xaf82[1067]+ _0xf2ddx19d+ _0xaf82[752]}}};document[_0xaf82[974]](_0xaf82[647])[0][_0xaf82[1070]](_0xaf82[1068],_0xf2ddx19e[_0xaf82[1053]][_0xaf82[1069]]()),document[_0xaf82[974]](_0xaf82[280])[0][_0xaf82[1070]](_0xaf82[1068],_0xf2ddx19e[_0xaf82[1053]][_0xaf82[281]]()),_0xf2ddx19d[_0xaf82[1072]](_0xaf82[692],_0xf2ddx19e[_0xaf82[150]][_0xaf82[1071]]),_0xf2ddx19e[_0xaf82[150]][_0xaf82[1073]]()}else {_0xf2ddx19d[_0xaf82[1074]](function(){_0xf2ddx12d(_0xf2ddx19d)},100)}}(window))}function StopEditGameNames(){$(_0xaf82[1075])[_0xaf82[61]]()}function ContinueEditGameNames(){$(_0xaf82[1075])[_0xaf82[87]]()}function displayTimer(){var _0xf2ddx1a3=_0xaf82[1076],_0xf2ddx1a4=_0xaf82[1076],_0xf2ddx1a5=_0xaf82[6],_0xf2ddx1a6= new Date()[_0xaf82[229]]();TimerLM[_0xaf82[1077]]= _0xf2ddx1a6- TimerLM[_0xaf82[1078]];if(TimerLM[_0xaf82[1077]]> 1000){_0xf2ddx1a4= Math[_0xaf82[141]](TimerLM[_0xaf82[1077]]/ 1000);if(_0xf2ddx1a4> 60){_0xf2ddx1a4= _0xf2ddx1a4% 60};if(_0xf2ddx1a4< 10){_0xf2ddx1a4= _0xaf82[101]+ String(_0xf2ddx1a4)}};if(TimerLM[_0xaf82[1077]]> 60000){_0xf2ddx1a3= Math[_0xaf82[141]](TimerLM[_0xaf82[1077]]/ 60000);1;if(_0xf2ddx1a3> 60){_0xf2ddx1a3= _0xf2ddx1a3% 60};if(_0xf2ddx1a3< 10){_0xf2ddx1a3= _0xaf82[101]+ String(_0xf2ddx1a3)}};_0xf2ddx1a5+= _0xf2ddx1a3+ _0xaf82[239];_0xf2ddx1a5+= _0xf2ddx1a4;TimerLM[_0xaf82[1079]][_0xaf82[203]]= _0xf2ddx1a5}function startTimer(){$(_0xaf82[1080])[_0xaf82[61]]();$(_0xaf82[1081])[_0xaf82[87]]();$(_0xaf82[1082])[_0xaf82[87]]();TimerLM[_0xaf82[1078]]= new Date()[_0xaf82[229]]();console[_0xaf82[283]](_0xaf82[1083]+ TimerLM[_0xaf82[1078]]);if(TimerLM[_0xaf82[1077]]> 0){TimerLM[_0xaf82[1078]]= TimerLM[_0xaf82[1078]]- TimerLM[_0xaf82[1077]]};TimerLM[_0xaf82[1084]]= setInterval(function(){displayTimer()},10)}function stopTimer(){$(_0xaf82[1080])[_0xaf82[87]]();$(_0xaf82[1081])[_0xaf82[61]]();$(_0xaf82[1082])[_0xaf82[87]]();clearInterval(TimerLM[_0xaf82[1084]])}function clearTimer(){$(_0xaf82[1080])[_0xaf82[87]]();$(_0xaf82[1081])[_0xaf82[61]]();$(_0xaf82[1082])[_0xaf82[61]]();clearInterval(TimerLM[_0xaf82[1084]]);TimerLM[_0xaf82[1079]][_0xaf82[203]]= _0xaf82[1085];TimerLM[_0xaf82[1077]]= 0}function setminbgname(){minimapbckimg= $(_0xaf82[1022])[_0xaf82[59]]();localStorage[_0xaf82[117]](_0xaf82[428],minimapbckimg);$(_0xaf82[1088])[_0xaf82[73]](_0xaf82[518],_0xaf82[1086]+ minimapbckimg+ _0xaf82[1087])[_0xaf82[73]]({opacity:0.8})}function setminbtext(){minbtext= $(_0xaf82[1030])[_0xaf82[59]]();localStorage[_0xaf82[117]](_0xaf82[40],minbtext);var _0xf2ddx8f=document[_0xaf82[407]](_0xaf82[146]);var _0xf2ddx13e=_0xf2ddx8f[_0xaf82[873]](_0xaf82[872]);_0xf2ddx13e[_0xaf82[874]](0,0,_0xf2ddx8f[_0xaf82[71]],_0xf2ddx8f[_0xaf82[715]]/ 9);_0xf2ddx13e[_0xaf82[875]]= _0xaf82[1089];_0xf2ddx13e[_0xaf82[143]](minbtext,_0xf2ddx8f[_0xaf82[71]]/ 2,22)}function setleadbgname(){leadbimg= $(_0xaf82[1023])[_0xaf82[59]]();localStorage[_0xaf82[117]](_0xaf82[431],leadbimg);$(_0xaf82[1090])[_0xaf82[73]](_0xaf82[518],_0xaf82[1086]+ leadbimg+ _0xaf82[1087])[_0xaf82[73]]({opacity:0.8})}function setteambgname(){teambimg= $(_0xaf82[1024])[_0xaf82[59]]();localStorage[_0xaf82[117]](_0xaf82[429],teambimg);$(_0xaf82[520])[_0xaf82[73]](_0xaf82[518],_0xaf82[1086]+ teambimg+ _0xaf82[1087])[_0xaf82[73]]({opacity:0.8})}function setcanvasbgname(){canvasbimg= $(_0xaf82[1025])[_0xaf82[59]]();localStorage[_0xaf82[117]](_0xaf82[430],canvasbimg);$(_0xaf82[1091])[_0xaf82[73]](_0xaf82[518],_0xaf82[1086]+ canvasbimg+ _0xaf82[1087])[_0xaf82[73]]({opacity:1});$(_0xaf82[1091])[_0xaf82[73]](_0xaf82[1092],_0xaf82[1093])}function setleadbtext(){leadbtext= $(_0xaf82[1026])[_0xaf82[59]]();localStorage[_0xaf82[117]](_0xaf82[41],leadbtext);$(_0xaf82[1094])[_0xaf82[76]](leadbtext)}function setteambtext(){teambtext= $(_0xaf82[1027])[_0xaf82[59]]();localStorage[_0xaf82[117]](_0xaf82[42],teambtext);$(_0xaf82[1095])[_0xaf82[76]](teambtext)}function setimgUrl(){imgUrl= $(_0xaf82[1028])[_0xaf82[59]]();localStorage[_0xaf82[117]](_0xaf82[43],imgUrl)}function setimgHref(){imgHref= $(_0xaf82[1029])[_0xaf82[59]]();localStorage[_0xaf82[117]](_0xaf82[44],imgHref)}function setpic1url(){pic1urlimg= $(_0xaf82[1032])[_0xaf82[59]]();localStorage[_0xaf82[117]](_0xaf82[432],pic1urlimg);return pic1urlimg}function setpic2url(){pic2urlimg= $(_0xaf82[1033])[_0xaf82[59]]();localStorage[_0xaf82[117]](_0xaf82[433],pic2urlimg);return pic2urlimg}function setpic3url(){pic3urlimg= $(_0xaf82[1034])[_0xaf82[59]]();localStorage[_0xaf82[117]](_0xaf82[434],pic3urlimg);return pic3urlimg}function setpic4url(){pic4urlimg= $(_0xaf82[1035])[_0xaf82[59]]();localStorage[_0xaf82[117]](_0xaf82[435],pic4urlimg);return pic4urlimg}function setpic5url(){pic5urlimg= $(_0xaf82[1036])[_0xaf82[59]]();localStorage[_0xaf82[117]](_0xaf82[436],pic5urlimg);return pic5urlimg}function setpic6url(){pic6urlimg= $(_0xaf82[1037])[_0xaf82[59]]();localStorage[_0xaf82[117]](_0xaf82[437],pic6urlimg);return pic6urlimg}function setdiscwebhook1(){discwebhook1= $(_0xaf82[1096])[_0xaf82[59]]();var _0xf2ddx1ba=$(_0xaf82[1096])[_0xaf82[59]]();if(~_0xf2ddx1ba[_0xaf82[179]](_0xaf82[1097])|| ~_0xf2ddx1ba[_0xaf82[179]](_0xaf82[1098])){localStorage[_0xaf82[117]](_0xaf82[456],discwebhook1);var _0xf2ddx19f=document[_0xaf82[936]](_0xaf82[935]);_0xf2ddx19f[_0xaf82[926]]= _0xaf82[937];_0xf2ddx19f[_0xaf82[470]]= _0xaf82[1099];$(_0xaf82[280])[_0xaf82[279]](_0xf2ddx19f)}else {if(_0xf2ddx1ba== _0xaf82[6]){localStorage[_0xaf82[117]](_0xaf82[456],discwebhook1)}else {toastr[_0xaf82[173]](Premadeletter36)[_0xaf82[73]](_0xaf82[71],_0xaf82[267])}}}function setdiscwebhook2(){discwebhook2= $(_0xaf82[1100])[_0xaf82[59]]();var _0xf2ddx1ba=$(_0xaf82[1100])[_0xaf82[59]]();if(~_0xf2ddx1ba[_0xaf82[179]](_0xaf82[1097])|| ~_0xf2ddx1ba[_0xaf82[179]](_0xaf82[1098])){localStorage[_0xaf82[117]](_0xaf82[457],discwebhook2)}else {if(_0xf2ddx1ba== _0xaf82[6]){localStorage[_0xaf82[117]](_0xaf82[457],discwebhook2)}else {toastr[_0xaf82[173]](Premadeletter36)[_0xaf82[73]](_0xaf82[71],_0xaf82[267])}}}function openbleedmod(){var _0xf2ddx19f=document[_0xaf82[936]](_0xaf82[935]);_0xf2ddx19f[_0xaf82[926]]= _0xaf82[937];_0xf2ddx19f[_0xaf82[470]]= _0xaf82[1101];$(_0xaf82[280])[_0xaf82[279]](_0xf2ddx19f)}function openrotatingmod(){var _0xf2ddx19f=document[_0xaf82[936]](_0xaf82[935]);_0xf2ddx19f[_0xaf82[926]]= _0xaf82[937];_0xf2ddx19f[_0xaf82[470]]= _0xaf82[1102];$(_0xaf82[280])[_0xaf82[279]](_0xf2ddx19f)}function languagemodfun(){if(languagemod!= 1){$(_0xaf82[1103])[_0xaf82[59]](languagemod);changeModLanguage()}}function changeModLanguage(){localStorage[_0xaf82[117]](_0xaf82[113],$(_0xaf82[1103])[_0xaf82[59]]());if($(_0xaf82[1103])[_0xaf82[59]]()== 1){languageinjector(_0xaf82[1104])}else {if($(_0xaf82[1103])[_0xaf82[59]]()== 2){languageinjector(_0xaf82[1105])}else {if($(_0xaf82[1103])[_0xaf82[59]]()== 3){languageinjector(_0xaf82[1106])}else {if($(_0xaf82[1103])[_0xaf82[59]]()== 4){languageinjector(_0xaf82[1107])}else {if($(_0xaf82[1103])[_0xaf82[59]]()== 5){languageinjector(_0xaf82[1108])}else {if($(_0xaf82[1103])[_0xaf82[59]]()== 6){languageinjector(_0xaf82[1109])}else {if($(_0xaf82[1103])[_0xaf82[59]]()== 7){languageinjector(_0xaf82[1110])}else {if($(_0xaf82[1103])[_0xaf82[59]]()== 8){languageinjector(_0xaf82[1111])}else {if($(_0xaf82[1103])[_0xaf82[59]]()== 9){languageinjector(_0xaf82[1112])}else {if($(_0xaf82[1103])[_0xaf82[59]]()== 10){languageinjector(_0xaf82[1113])}else {if($(_0xaf82[1103])[_0xaf82[59]]()== 11){languageinjector(_0xaf82[1114])}}}}}}}}}}}}function injector2(_0xf2ddx1c1,url2){var _0xf2ddx14f=document[_0xaf82[936]](_0xaf82[935]);_0xf2ddx14f[_0xaf82[939]]= function(){var _0xf2ddx1c2=document[_0xaf82[936]](_0xaf82[935]);_0xf2ddx1c2[_0xaf82[470]]= url2;document[_0xaf82[974]](_0xaf82[647])[0][_0xaf82[940]](_0xf2ddx1c2)};_0xf2ddx14f[_0xaf82[470]]= _0xf2ddx1c1;document[_0xaf82[974]](_0xaf82[647])[0][_0xaf82[940]](_0xf2ddx14f)}function languageinjector(url){injector2(url,_0xaf82[1115])}function newsubmit(){if(legendmod[_0xaf82[387]]== true){$(_0xaf82[236])[_0xaf82[208]]()}}function triggerLMbtns(){PanelImageSrc= $(_0xaf82[103])[_0xaf82[59]]();if(PanelImageSrc!= _0xaf82[6]|| PanelImageSrc!= _0xaf82[1116]|| PanelImageSrc!= _0xaf82[1117]){$(_0xaf82[1120])[_0xaf82[73]](_0xaf82[518],_0xaf82[1118]+ PanelImageSrc+ _0xaf82[1119])};$(_0xaf82[1122])[_0xaf82[1121]](function(){if(PanelImageSrc!= _0xaf82[6]|| PanelImageSrc!= _0xaf82[1116]|| PanelImageSrc!= _0xaf82[1117]){$(_0xaf82[1120])[_0xaf82[73]](_0xaf82[518],_0xaf82[1118]+ PanelImageSrc+ _0xaf82[1119])}});$(_0xaf82[1123])[_0xaf82[1121]](function(){if(PanelImageSrc!= _0xaf82[6]|| PanelImageSrc!= _0xaf82[1116]|| PanelImageSrc!= _0xaf82[1117]){$(_0xaf82[1120])[_0xaf82[73]](_0xaf82[518],_0xaf82[1118]+ PanelImageSrc+ _0xaf82[1119])}});$(_0xaf82[1124])[_0xaf82[1121]](function(){if(PanelImageSrc!= _0xaf82[6]|| PanelImageSrc!= _0xaf82[1116]|| PanelImageSrc!= _0xaf82[1117]){$(_0xaf82[1120])[_0xaf82[73]](_0xaf82[518],_0xaf82[1118]+ PanelImageSrc+ _0xaf82[1119])}});$(_0xaf82[1125])[_0xaf82[1121]](function(){if(PanelImageSrc!= _0xaf82[6]|| PanelImageSrc!= _0xaf82[1116]|| PanelImageSrc!= _0xaf82[1117]){$(_0xaf82[1120])[_0xaf82[73]](_0xaf82[518],_0xaf82[1118]+ PanelImageSrc+ _0xaf82[1119])}});if(SHOSHOBtn== _0xaf82[115]){$(_0xaf82[209])[_0xaf82[208]]()};if(MAINBTBtn== _0xaf82[115]){$(_0xaf82[210])[_0xaf82[208]]()};if(AnimatedSkinBtn== _0xaf82[115]){$(_0xaf82[1126])[_0xaf82[208]]()};if(XPBtn== _0xaf82[115]){$(_0xaf82[211])[_0xaf82[208]]()};if(TIMEcalBtn== _0xaf82[115]){$(_0xaf82[1127])[_0xaf82[208]]()};document[_0xaf82[407]](_0xaf82[1128])[_0xaf82[405]]= localStorage[_0xaf82[3]](_0xaf82[428]);if($(_0xaf82[1022])[_0xaf82[59]]()!= _0xaf82[6]){setminbgname()};document[_0xaf82[407]](_0xaf82[1129])[_0xaf82[405]]= localStorage[_0xaf82[3]](_0xaf82[431]);if($(_0xaf82[1023])[_0xaf82[59]]()!= _0xaf82[6]){setleadbgname()};document[_0xaf82[407]](_0xaf82[1130])[_0xaf82[405]]= localStorage[_0xaf82[3]](_0xaf82[429]);if($(_0xaf82[1024])[_0xaf82[59]]()!= _0xaf82[6]){setteambgname()};document[_0xaf82[407]](_0xaf82[1131])[_0xaf82[405]]= localStorage[_0xaf82[3]](_0xaf82[430]);if($(_0xaf82[1025])[_0xaf82[59]]()!= _0xaf82[6]){setcanvasbgname()};document[_0xaf82[407]](_0xaf82[41])[_0xaf82[405]]= localStorage[_0xaf82[3]](_0xaf82[41]);if($(_0xaf82[1026])[_0xaf82[59]]()!= _0xaf82[6]){setleadbtext()};document[_0xaf82[407]](_0xaf82[42])[_0xaf82[405]]= localStorage[_0xaf82[3]](_0xaf82[42]);if($(_0xaf82[1027])[_0xaf82[59]]()!= _0xaf82[6]){setteambtext()};document[_0xaf82[407]](_0xaf82[43])[_0xaf82[405]]= localStorage[_0xaf82[3]](_0xaf82[43]);if($(_0xaf82[1028])[_0xaf82[59]]()!= _0xaf82[6]){setimgUrl()};document[_0xaf82[407]](_0xaf82[44])[_0xaf82[405]]= localStorage[_0xaf82[3]](_0xaf82[44]);if($(_0xaf82[1029])[_0xaf82[59]]()!= _0xaf82[6]){setimgHref()};document[_0xaf82[407]](_0xaf82[40])[_0xaf82[405]]= localStorage[_0xaf82[3]](_0xaf82[40]);if($(_0xaf82[1030])[_0xaf82[59]]()!= _0xaf82[6]&& $(_0xaf82[1030])[_0xaf82[59]]()!= null){setminbtext()};document[_0xaf82[407]](_0xaf82[1132])[_0xaf82[405]]= localStorage[_0xaf82[3]](_0xaf82[432]);if($(_0xaf82[1032])[_0xaf82[59]]()!= _0xaf82[6]){setpic1url()};document[_0xaf82[407]](_0xaf82[1133])[_0xaf82[405]]= localStorage[_0xaf82[3]](_0xaf82[433]);if($(_0xaf82[1033])[_0xaf82[59]]()!= _0xaf82[6]){setpic2url()};document[_0xaf82[407]](_0xaf82[1134])[_0xaf82[405]]= localStorage[_0xaf82[3]](_0xaf82[434]);if($(_0xaf82[1034])[_0xaf82[59]]()!= _0xaf82[6]){setpic3url()};document[_0xaf82[407]](_0xaf82[1135])[_0xaf82[405]]= localStorage[_0xaf82[3]](_0xaf82[435]);if($(_0xaf82[1035])[_0xaf82[59]]()!= _0xaf82[6]){setpic4url()};document[_0xaf82[407]](_0xaf82[1136])[_0xaf82[405]]= localStorage[_0xaf82[3]](_0xaf82[436]);if($(_0xaf82[1036])[_0xaf82[59]]()!= _0xaf82[6]){setpic5url()};document[_0xaf82[407]](_0xaf82[1137])[_0xaf82[405]]= localStorage[_0xaf82[3]](_0xaf82[437]);if($(_0xaf82[1037])[_0xaf82[59]]()!= _0xaf82[6]){setpic6url()};document[_0xaf82[407]](_0xaf82[1138])[_0xaf82[405]]= localStorage[_0xaf82[3]](_0xaf82[438]);if($(_0xaf82[1012])[_0xaf82[59]]()!= _0xaf82[6]){setyt1url()};document[_0xaf82[407]](_0xaf82[1139])[_0xaf82[405]]= localStorage[_0xaf82[3]](_0xaf82[439]);if($(_0xaf82[1013])[_0xaf82[59]]()!= _0xaf82[6]){setyt2url()};document[_0xaf82[407]](_0xaf82[1140])[_0xaf82[405]]= localStorage[_0xaf82[3]](_0xaf82[440]);if($(_0xaf82[1014])[_0xaf82[59]]()!= _0xaf82[6]){setyt3url()};document[_0xaf82[407]](_0xaf82[1141])[_0xaf82[405]]= localStorage[_0xaf82[3]](_0xaf82[441]);if($(_0xaf82[1015])[_0xaf82[59]]()!= _0xaf82[6]){setyt4url()};document[_0xaf82[407]](_0xaf82[1142])[_0xaf82[405]]= localStorage[_0xaf82[3]](_0xaf82[442]);if($(_0xaf82[1016])[_0xaf82[59]]()!= _0xaf82[6]){setyt5url()};document[_0xaf82[407]](_0xaf82[1143])[_0xaf82[405]]= localStorage[_0xaf82[3]](_0xaf82[443]);if($(_0xaf82[1017])[_0xaf82[59]]()!= _0xaf82[6]){setyt6url()};document[_0xaf82[407]](_0xaf82[1144])[_0xaf82[405]]= localStorage[_0xaf82[3]](_0xaf82[444]);if($(_0xaf82[985])[_0xaf82[59]]()!= _0xaf82[6]){setpic1data()};document[_0xaf82[407]](_0xaf82[1145])[_0xaf82[405]]= localStorage[_0xaf82[3]](_0xaf82[445]);if($(_0xaf82[988])[_0xaf82[59]]()!= _0xaf82[6]){setpic2data()};document[_0xaf82[407]](_0xaf82[1146])[_0xaf82[405]]= localStorage[_0xaf82[3]](_0xaf82[446]);if($(_0xaf82[990])[_0xaf82[59]]()!= _0xaf82[6]){setpic3data()};document[_0xaf82[407]](_0xaf82[1147])[_0xaf82[405]]= localStorage[_0xaf82[3]](_0xaf82[447]);if($(_0xaf82[992])[_0xaf82[59]]()!= _0xaf82[6]){setpic4data()};document[_0xaf82[407]](_0xaf82[1148])[_0xaf82[405]]= localStorage[_0xaf82[3]](_0xaf82[448]);if($(_0xaf82[994])[_0xaf82[59]]()!= _0xaf82[6]){setpic5data()};document[_0xaf82[407]](_0xaf82[1149])[_0xaf82[405]]= localStorage[_0xaf82[3]](_0xaf82[449]);if($(_0xaf82[996])[_0xaf82[59]]()!= _0xaf82[6]){setpic6data()};document[_0xaf82[407]](_0xaf82[1150])[_0xaf82[405]]= localStorage[_0xaf82[3]](_0xaf82[450]);if($(_0xaf82[1000])[_0xaf82[59]]()!= _0xaf82[6]){setyt1data()};document[_0xaf82[407]](_0xaf82[1151])[_0xaf82[405]]= localStorage[_0xaf82[3]](_0xaf82[451]);if($(_0xaf82[1002])[_0xaf82[59]]()!= _0xaf82[6]){setyt2data()};document[_0xaf82[407]](_0xaf82[1152])[_0xaf82[405]]= localStorage[_0xaf82[3]](_0xaf82[452]);if($(_0xaf82[1004])[_0xaf82[59]]()!= _0xaf82[6]){setyt3data()};document[_0xaf82[407]](_0xaf82[1153])[_0xaf82[405]]= localStorage[_0xaf82[3]](_0xaf82[453]);if($(_0xaf82[1006])[_0xaf82[59]]()!= _0xaf82[6]){setyt4data()};document[_0xaf82[407]](_0xaf82[1154])[_0xaf82[405]]= localStorage[_0xaf82[3]](_0xaf82[454]);if($(_0xaf82[1008])[_0xaf82[59]]()!= _0xaf82[6]){setyt5data()};document[_0xaf82[407]](_0xaf82[1155])[_0xaf82[405]]= localStorage[_0xaf82[3]](_0xaf82[455]);if($(_0xaf82[1010])[_0xaf82[59]]()!= _0xaf82[6]){setyt6data()};document[_0xaf82[407]](_0xaf82[456])[_0xaf82[405]]= localStorage[_0xaf82[3]](_0xaf82[456]);if($(_0xaf82[1096])[_0xaf82[59]]()!= _0xaf82[6]&& $(_0xaf82[1096])[_0xaf82[59]]()!= null){setdiscwebhook1()};document[_0xaf82[407]](_0xaf82[457])[_0xaf82[405]]= localStorage[_0xaf82[3]](_0xaf82[457]);if($(_0xaf82[1100])[_0xaf82[59]]()!= _0xaf82[6]&& $(_0xaf82[1100])[_0xaf82[59]]()!= null){setdiscwebhook2()};$(_0xaf82[1157])[_0xaf82[279]](_0xaf82[1156]);if(dyinglight1load== null|| dyinglight1load== _0xaf82[4]){$(_0xaf82[1160])[_0xaf82[1159]](_0xaf82[1158])}else {if(dyinglight1load== _0xaf82[1161]){opendyinglight();$(_0xaf82[1160])[_0xaf82[1159]](_0xaf82[1162])}}}function opendyinglight(){var _0xf2ddx19f=document[_0xaf82[936]](_0xaf82[935]);_0xf2ddx19f[_0xaf82[926]]= _0xaf82[937];_0xf2ddx19f[_0xaf82[470]]= _0xaf82[1163];$(_0xaf82[280])[_0xaf82[279]](_0xf2ddx19f)}function bluebtns(){var _0xf2ddx1c8=$(_0xaf82[1164])[_0xaf82[59]]();$(_0xaf82[1166])[_0xaf82[665]](function(){$(_0xaf82[1166])[_0xaf82[73]](_0xaf82[397],_0xf2ddx1c8)})[_0xaf82[663]](function(){$(_0xaf82[1166])[_0xaf82[73]](_0xaf82[397],_0xaf82[1165])});$(_0xaf82[1167])[_0xaf82[665]](function(){$(_0xaf82[1167])[_0xaf82[73]](_0xaf82[397],_0xf2ddx1c8)})[_0xaf82[663]](function(){$(_0xaf82[1167])[_0xaf82[73]](_0xaf82[397],_0xaf82[1165])});$(_0xaf82[1168])[_0xaf82[665]](function(){$(_0xaf82[1168])[_0xaf82[73]](_0xaf82[397],_0xf2ddx1c8)})[_0xaf82[663]](function(){$(_0xaf82[1168])[_0xaf82[73]](_0xaf82[397],_0xaf82[1165])});$(_0xaf82[1122])[_0xaf82[665]](function(){$(_0xaf82[1122])[_0xaf82[73]](_0xaf82[397],_0xf2ddx1c8)})[_0xaf82[663]](function(){$(_0xaf82[1122])[_0xaf82[73]](_0xaf82[397],_0xaf82[1165])});$(_0xaf82[1123])[_0xaf82[665]](function(){$(_0xaf82[1123])[_0xaf82[73]](_0xaf82[397],_0xf2ddx1c8)})[_0xaf82[663]](function(){$(_0xaf82[1123])[_0xaf82[73]](_0xaf82[397],_0xaf82[1165])});$(_0xaf82[1124])[_0xaf82[665]](function(){$(_0xaf82[1124])[_0xaf82[73]](_0xaf82[397],_0xf2ddx1c8)})[_0xaf82[663]](function(){$(_0xaf82[1124])[_0xaf82[73]](_0xaf82[397],_0xaf82[1165])});$(_0xaf82[1125])[_0xaf82[665]](function(){$(_0xaf82[1125])[_0xaf82[73]](_0xaf82[397],_0xf2ddx1c8)})[_0xaf82[663]](function(){$(_0xaf82[1125])[_0xaf82[73]](_0xaf82[397],_0xaf82[1165])});$(_0xaf82[1169])[_0xaf82[665]](function(){$(_0xaf82[1169])[_0xaf82[73]](_0xaf82[397],_0xf2ddx1c8)})[_0xaf82[663]](function(){$(_0xaf82[1169])[_0xaf82[73]](_0xaf82[397],_0xaf82[1165])});$(_0xaf82[1170])[_0xaf82[665]](function(){$(_0xaf82[1170])[_0xaf82[73]](_0xaf82[397],_0xf2ddx1c8)})[_0xaf82[663]](function(){$(_0xaf82[1170])[_0xaf82[73]](_0xaf82[397],_0xaf82[1165])});$(_0xaf82[1171])[_0xaf82[665]](function(){$(_0xaf82[1171])[_0xaf82[73]](_0xaf82[397],_0xf2ddx1c8)})[_0xaf82[663]](function(){$(_0xaf82[1171])[_0xaf82[73]](_0xaf82[397],_0xaf82[1165])});$(_0xaf82[1172])[_0xaf82[665]](function(){$(_0xaf82[1172])[_0xaf82[73]](_0xaf82[397],_0xf2ddx1c8)})[_0xaf82[663]](function(){$(_0xaf82[1172])[_0xaf82[73]](_0xaf82[397],_0xaf82[1165])});$(_0xaf82[1173])[_0xaf82[665]](function(){$(_0xaf82[1173])[_0xaf82[73]](_0xaf82[397],_0xf2ddx1c8)})[_0xaf82[663]](function(){$(_0xaf82[1173])[_0xaf82[73]](_0xaf82[397],_0xaf82[1165])});$(_0xaf82[1174])[_0xaf82[665]](function(){$(_0xaf82[1174])[_0xaf82[73]](_0xaf82[397],_0xf2ddx1c8)})[_0xaf82[663]](function(){$(_0xaf82[1174])[_0xaf82[73]](_0xaf82[397],_0xaf82[1165])});$(_0xaf82[544])[_0xaf82[665]](function(){$(_0xaf82[544])[_0xaf82[73]](_0xaf82[397],_0xf2ddx1c8)})[_0xaf82[663]](function(){$(_0xaf82[544])[_0xaf82[73]](_0xaf82[397],_0xaf82[1165])});$(_0xaf82[1175])[_0xaf82[665]](function(){$(_0xaf82[1175])[_0xaf82[73]](_0xaf82[397],_0xf2ddx1c8)})[_0xaf82[663]](function(){$(_0xaf82[1175])[_0xaf82[73]](_0xaf82[397],_0xaf82[1165])});$(_0xaf82[1176])[_0xaf82[665]](function(){$(_0xaf82[1176])[_0xaf82[73]](_0xaf82[397],_0xf2ddx1c8)})[_0xaf82[663]](function(){$(_0xaf82[1176])[_0xaf82[73]](_0xaf82[397],_0xaf82[1165])});$(_0xaf82[1177])[_0xaf82[665]](function(){$(_0xaf82[1177])[_0xaf82[73]](_0xaf82[397],_0xf2ddx1c8)})[_0xaf82[663]](function(){$(_0xaf82[1177])[_0xaf82[73]](_0xaf82[397],_0xaf82[1165])});$(_0xaf82[1178])[_0xaf82[665]](function(){$(_0xaf82[1178])[_0xaf82[73]](_0xaf82[397],_0xf2ddx1c8)})[_0xaf82[663]](function(){$(_0xaf82[1178])[_0xaf82[73]](_0xaf82[397],_0xaf82[1165])});$(_0xaf82[1179])[_0xaf82[665]](function(){$(_0xaf82[1179])[_0xaf82[73]](_0xaf82[397],_0xf2ddx1c8)})[_0xaf82[663]](function(){$(_0xaf82[1179])[_0xaf82[73]](_0xaf82[397],_0xaf82[1165])});$(_0xaf82[1180])[_0xaf82[665]](function(){$(_0xaf82[1180])[_0xaf82[73]](_0xaf82[397],_0xf2ddx1c8)})[_0xaf82[663]](function(){$(_0xaf82[1180])[_0xaf82[73]](_0xaf82[397],_0xaf82[1165])});$(_0xaf82[1181])[_0xaf82[665]](function(){$(_0xaf82[1181])[_0xaf82[73]](_0xaf82[397],_0xf2ddx1c8)})[_0xaf82[663]](function(){$(_0xaf82[1181])[_0xaf82[73]](_0xaf82[397],_0xaf82[1165])});$(_0xaf82[1182])[_0xaf82[665]](function(){$(_0xaf82[1182])[_0xaf82[73]](_0xaf82[397],_0xf2ddx1c8)})[_0xaf82[663]](function(){$(_0xaf82[1182])[_0xaf82[73]](_0xaf82[397],_0xaf82[1165])});$(_0xaf82[987])[_0xaf82[665]](function(){$(_0xaf82[987])[_0xaf82[73]](_0xaf82[397],_0xf2ddx1c8)})[_0xaf82[663]](function(){$(_0xaf82[987])[_0xaf82[73]](_0xaf82[397],_0xaf82[1165])});$(_0xaf82[989])[_0xaf82[665]](function(){$(_0xaf82[989])[_0xaf82[73]](_0xaf82[397],_0xf2ddx1c8)})[_0xaf82[663]](function(){$(_0xaf82[989])[_0xaf82[73]](_0xaf82[397],_0xaf82[1165])});$(_0xaf82[991])[_0xaf82[665]](function(){$(_0xaf82[991])[_0xaf82[73]](_0xaf82[397],_0xf2ddx1c8)})[_0xaf82[663]](function(){$(_0xaf82[991])[_0xaf82[73]](_0xaf82[397],_0xaf82[1165])});$(_0xaf82[993])[_0xaf82[665]](function(){$(_0xaf82[993])[_0xaf82[73]](_0xaf82[397],_0xf2ddx1c8)})[_0xaf82[663]](function(){$(_0xaf82[993])[_0xaf82[73]](_0xaf82[397],_0xaf82[1165])});$(_0xaf82[995])[_0xaf82[665]](function(){$(_0xaf82[995])[_0xaf82[73]](_0xaf82[397],_0xf2ddx1c8)})[_0xaf82[663]](function(){$(_0xaf82[995])[_0xaf82[73]](_0xaf82[397],_0xaf82[1165])});$(_0xaf82[997])[_0xaf82[665]](function(){$(_0xaf82[997])[_0xaf82[73]](_0xaf82[397],_0xf2ddx1c8)})[_0xaf82[663]](function(){$(_0xaf82[997])[_0xaf82[73]](_0xaf82[397],_0xaf82[1165])});$(_0xaf82[1001])[_0xaf82[665]](function(){$(_0xaf82[1001])[_0xaf82[73]](_0xaf82[397],_0xf2ddx1c8)})[_0xaf82[663]](function(){$(_0xaf82[1001])[_0xaf82[73]](_0xaf82[397],_0xaf82[1165])});$(_0xaf82[1003])[_0xaf82[665]](function(){$(_0xaf82[1003])[_0xaf82[73]](_0xaf82[397],_0xf2ddx1c8)})[_0xaf82[663]](function(){$(_0xaf82[1003])[_0xaf82[73]](_0xaf82[397],_0xaf82[1165])});$(_0xaf82[1005])[_0xaf82[665]](function(){$(_0xaf82[1005])[_0xaf82[73]](_0xaf82[397],_0xf2ddx1c8)})[_0xaf82[663]](function(){$(_0xaf82[1005])[_0xaf82[73]](_0xaf82[397],_0xaf82[1165])});$(_0xaf82[1007])[_0xaf82[665]](function(){$(_0xaf82[1007])[_0xaf82[73]](_0xaf82[397],_0xf2ddx1c8)})[_0xaf82[663]](function(){$(_0xaf82[1007])[_0xaf82[73]](_0xaf82[397],_0xaf82[1165])});$(_0xaf82[1009])[_0xaf82[665]](function(){$(_0xaf82[1009])[_0xaf82[73]](_0xaf82[397],_0xf2ddx1c8)})[_0xaf82[663]](function(){$(_0xaf82[1009])[_0xaf82[73]](_0xaf82[397],_0xaf82[1165])});$(_0xaf82[1011])[_0xaf82[665]](function(){$(_0xaf82[1011])[_0xaf82[73]](_0xaf82[397],_0xf2ddx1c8)})[_0xaf82[663]](function(){$(_0xaf82[1011])[_0xaf82[73]](_0xaf82[397],_0xaf82[1165])});$(_0xaf82[1183])[_0xaf82[665]](function(){$(_0xaf82[1183])[_0xaf82[73]](_0xaf82[397],_0xf2ddx1c8)})[_0xaf82[663]](function(){$(_0xaf82[1183])[_0xaf82[73]](_0xaf82[397],_0xaf82[1165])})}function YoutubebackgroundEnable(){inject(_0xaf82[1047],_0xaf82[1184]+ _0xaf82[1185]+ _0xaf82[1186]+ _0xaf82[1187]+ _0xaf82[1188]+ _0xaf82[1189]+ _0xaf82[1190]);$(_0xaf82[280])[_0xaf82[279]](_0xaf82[1191]+ getParameterByName(_0xaf82[160],$(_0xaf82[469])[_0xaf82[59]]())+ _0xaf82[1192]+ getParameterByName(_0xaf82[161],$(_0xaf82[469])[_0xaf82[59]]())+ _0xaf82[1193])}function YoutubebackgroundDisable(){$(_0xaf82[1194])[_0xaf82[176]]()}function settrolling(){playSound(_0xaf82[1195]);$(_0xaf82[1091])[_0xaf82[73]](_0xaf82[518],_0xaf82[1196])[_0xaf82[73]]({opacity:0.8});$(_0xaf82[1088])[_0xaf82[73]](_0xaf82[518],_0xaf82[1197])[_0xaf82[73]]({opacity:1});$(_0xaf82[1090])[_0xaf82[73]](_0xaf82[518],_0xaf82[1198])[_0xaf82[73]]({opacity:0.8});setTimeout(function(){$(_0xaf82[1091])[_0xaf82[73]](_0xaf82[518],_0xaf82[1199])[_0xaf82[73]]({opacity:0.8})},4000);setTimeout(function(){$(_0xaf82[1091])[_0xaf82[73]](_0xaf82[518],_0xaf82[521])[_0xaf82[73]]({opacity:1});$(_0xaf82[1090])[_0xaf82[73]](_0xaf82[518],_0xaf82[1086]+ leadbimg+ _0xaf82[1087])[_0xaf82[73]]({opacity:0.8})},8000);setTimeout(function(){$(_0xaf82[1088])[_0xaf82[73]](_0xaf82[518],_0xaf82[1086]+ minimapbckimg+ _0xaf82[1087])[_0xaf82[73]]({opacity:0.8})},27000)}function preventcanvasimagecrash(){CanvasRenderingContext2D[_0xaf82[125]][_0xaf82[1200]]= CanvasRenderingContext2D[_0xaf82[125]][_0xaf82[1201]];CanvasRenderingContext2D[_0xaf82[125]][_0xaf82[1201]]= function(){const _0xf2ddx1cd=arguments[0];if(!_0xf2ddx1cd|| _0xf2ddx1cd[_0xaf82[71]]< 1 || _0xf2ddx1cd[_0xaf82[715]]< 1){return void(console[_0xaf82[283]](_0xaf82[1202]))};this._drawImage(...arguments)}}function joint(_0xf2ddx8e){var _0xf2ddx91;return _0xf2ddx91= _0xf2ddx8e[_0xf2ddx8e[_0xaf82[140]]- 1],_0xf2ddx8e[_0xaf82[475]](),_0xf2ddx8e= _0xf2ddx8e[_0xaf82[140]]> 1?joint(_0xf2ddx8e):_0xf2ddx8e[0],function(){_0xf2ddx91[_0xaf82[129]]( new _0xf2ddx8e)}}function emphasischat(){var _0xf2ddx114=window;var _0xf2ddx115={"\x6E\x61\x6D\x65":_0xaf82[1203],"\x6C\x6F\x67":function(_0xf2ddx116){console[_0xaf82[283]](this[_0xaf82[601]]+ _0xaf82[239]+ _0xf2ddx116)}};var _0xf2ddx117={};var _0xf2ddx118={},_0xf2ddx119={"\x65\x6D\x70\x68\x61\x73\x69\x73\x5F\x62\x67\x63\x6F\x6C\x6F\x72":_0xaf82[1204],"\x65\x6D\x70\x68\x61\x73\x69\x73\x5F\x74\x69\x6D\x65":5000,"\x68\x69\x73\x74\x68\x69\x64\x65\x5F\x74\x69\x6D\x65":10000,"\x73\x63\x72\x6F\x6C\x6C\x5F\x64\x75\x6C\x61\x74\x69\x6F\x6E":200};function _0xf2ddx11a(){if(!document[_0xaf82[407]](_0xaf82[622])){_0xf2ddx115[_0xaf82[623]]= (_0xf2ddx115[_0xaf82[623]]|| 1000)+ 1000;setTimeout(_0xf2ddx11a,_0xf2ddx115[_0xaf82[623]]);_0xf2ddx115[_0xaf82[283]](_0xaf82[1205]);return};setTimeout(_0xf2ddx11b,1000)}_0xf2ddx11a();function _0xf2ddx11b(){_0xf2ddx118= _0xf2ddx119;_0xf2ddx114[_0xf2ddx115[_0xaf82[601]]]= {my:_0xf2ddx115,stat:_0xf2ddx117,cfg:_0xf2ddx118};_0xf2ddx117[_0xaf82[1206]]= new MutationObserver((_0xf2ddx1d0)=>{_0xf2ddx1d0[_0xaf82[832]]((_0xf2ddx1d1)=>{_0xf2ddx115[_0xaf82[1208]](_0xf2ddx1d1[_0xaf82[1207]])})});_0xf2ddx117[_0xaf82[1206]][_0xaf82[1210]]($(_0xaf82[597])[_0xaf82[1209]](0),{"\x63\x68\x69\x6C\x64\x4C\x69\x73\x74":true});_0xf2ddx117[_0xaf82[1211]]= new MutationObserver((_0xf2ddx1d0)=>{_0xf2ddx1d0[_0xaf82[832]]((_0xf2ddx1d1)=>{if(_0xf2ddx1d1[_0xaf82[1212]]!== _0xaf82[1045]){return};var _0xf2ddx1d2=_0xf2ddx1d1[_0xaf82[1213]][_0xaf82[1045]][_0xaf82[523]];if(_0xf2ddx1d2=== _0xaf82[732]){_0xf2ddx115[_0xaf82[1214]]()}else {if(_0xf2ddx1d2=== _0xaf82[525]){_0xf2ddx115[_0xaf82[1215]]()}}})});_0xf2ddx117[_0xaf82[1211]][_0xaf82[1210]]($(_0xaf82[524])[_0xaf82[1209]](0),{"\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73":true})}_0xf2ddx115[_0xaf82[1208]]= function(_0xf2ddx1d3){_0xf2ddx115[_0xaf82[1216]](true);_0xf2ddx1d3[_0xaf82[832]]((_0xf2ddx1d4)=>{var _0xf2ddx1d5=$(_0xf2ddx1d4);if(_0xf2ddx1d5[_0xaf82[721]](_0xaf82[835])){var _0xf2ddx1d6=_0xf2ddx1d5[_0xaf82[73]](_0xaf82[397]);_0xf2ddx1d5[_0xaf82[73]](_0xaf82[397],_0xf2ddx118[_0xaf82[1217]]);setTimeout(function(){_0xf2ddx1d5[_0xaf82[73]](_0xaf82[397],_0xf2ddx1d6)},_0xf2ddx118[_0xaf82[1218]])}});var _0xf2ddx1d7=$(_0xaf82[597]);_0xf2ddx1d7[_0xaf82[863]](_0xaf82[706]);_0xf2ddx1d7[_0xaf82[865]]({"\x73\x63\x72\x6F\x6C\x6C\x54\x6F\x70":_0xf2ddx1d7[_0xaf82[257]](_0xaf82[864])},_0xf2ddx118[_0xaf82[1219]])};_0xf2ddx115[_0xaf82[1216]]= function(_0xf2ddx1d8){if(_0xf2ddx117[_0xaf82[1220]]){clearTimeout(_0xf2ddx117[_0xaf82[1220]]);_0xf2ddx117[_0xaf82[1220]]= null};var _0xf2ddx1d2=$(_0xaf82[597])[_0xaf82[73]](_0xaf82[523]);if(_0xf2ddx1d2=== _0xaf82[525]){_0xf2ddx117[_0xaf82[1221]]= true};if(_0xf2ddx117[_0xaf82[1221]]&& _0xf2ddx1d8){_0xf2ddx117[_0xaf82[1220]]= setTimeout(function(){_0xf2ddx117[_0xaf82[1221]]= false},_0xf2ddx118[_0xaf82[1222]])}};_0xf2ddx115[_0xaf82[1214]]= function(){_0xf2ddx115[_0xaf82[1216]](false)};_0xf2ddx115[_0xaf82[1215]]= function(){}}function IdfromLegendmod(){if(document[_0xaf82[56]][_0xaf82[55]](_0xaf82[54])&& $(_0xaf82[1223])[_0xaf82[59]]()!= _0xaf82[6]){window[_0xaf82[112]]= $(_0xaf82[1223])[_0xaf82[59]]();localStorage[_0xaf82[117]](_0xaf82[112],window[_0xaf82[112]])}}function SNEZOgarUpload(){IdfromLegendmod();if(userid== _0xaf82[6]|| userid== null){toastr[_0xaf82[184]](_0xaf82[199]+ Premadeletter123+ _0xaf82[200]+ Premadeletter128)}else {postSNEZ(_0xaf82[1224],userid,_0xaf82[1225],escape($(_0xaf82[394])[_0xaf82[59]]()));toastr[_0xaf82[184]](_0xaf82[199]+ Premadeletter123+ _0xaf82[200]+ Premadeletter129+ _0xaf82[905]+ Languageletter363+ _0xaf82[1226]+ userid+ _0xaf82[1227])}}function SNEZOgarDownload(){IdfromLegendmod();if(userid== _0xaf82[6]|| userid== null){toastr[_0xaf82[184]](_0xaf82[199]+ Premadeletter123+ _0xaf82[200]+ Premadeletter128)}else {getSNEZ(_0xaf82[1224],userid,_0xaf82[1225]);var _0xf2ddx1dc=xhttp[_0xaf82[1228]];$(_0xaf82[403])[_0xaf82[59]](unescape(_0xf2ddx1dc));$(_0xaf82[413])[_0xaf82[208]]()}}function SNEZServers(){var _0xf2ddx1de=function(_0xf2ddx8d,_0xf2ddx1df){var _0xf2ddx1e0=setInterval(function(){var _0xf2ddx1e1=[_0xaf82[372],_0xaf82[1229],_0xaf82[1230],_0xaf82[1231]];var _0xf2ddx1e2=true;_0xf2ddx1e1[_0xaf82[832]](function(_0xf2ddx1e3){if(!document[_0xaf82[407]](_0xf2ddx1e3)){_0xf2ddx1e2= false}});if(_0xf2ddx1e2){clearInterval(_0xf2ddx1e0);_0xf2ddx8d(_0xf2ddx1df)}},100)};window[_0xaf82[109]]= localStorage[_0xaf82[3]](_0xaf82[109]);window[_0xaf82[110]]= localStorage[_0xaf82[3]](_0xaf82[110]);var _0xf2ddx1e4={nickname:null,server:null,tag:null,AID:null,hidecountry:false,userfirstname:null,userlastname:null,agarioUID:null};var _0xf2ddx1e1={nickname:_0xaf82[372],server:_0xaf82[1229],tag:_0xaf82[1230],reconnectButton:_0xaf82[1231]};var _0xf2ddx1e5={server:_0xaf82[1232],client:null,connect:function(){_0xf2ddx1e5[_0xaf82[1233]]= new WebSocket(_0xf2ddx1e5[_0xaf82[1234]]);_0xf2ddx1e5[_0xaf82[1233]][_0xaf82[1235]]= _0xf2ddx1e5[_0xaf82[1236]];_0xf2ddx1e5[_0xaf82[1233]][_0xaf82[1237]]= _0xf2ddx1e5[_0xaf82[1238]];_0xf2ddx1e5[_0xaf82[1233]][_0xaf82[1239]]= _0xf2ddx1e5[_0xaf82[1240]]},reconnect:function(){console[_0xaf82[283]](_0xaf82[1241]);setTimeout(function(){_0xf2ddx1e5[_0xaf82[704]]()},5000)},updateServerDetails:function(){_0xf2ddx1e5[_0xaf82[123]]({id:_0xf2ddx1eb(),type:_0xaf82[1242],data:_0xf2ddx1e4})},updateDetails:function(){var _0xf2ddxe6=document[_0xaf82[407]](_0xf2ddx1e1[_0xaf82[1243]]);var _0xf2ddx1e6;if(realmode!= null&& region!= null){_0xf2ddx1e6= _0xaf82[212]+ $(_0xaf82[213])[_0xaf82[59]]()+ _0xaf82[214]+ _0xaf82[218]+ $(_0xaf82[60])[_0xaf82[59]]()+ _0xaf82[219]+ realmode}else {_0xf2ddx1e6= _0xaf82[212]+ $(_0xaf82[213])[_0xaf82[59]]()+ _0xaf82[214]};var _0xf2ddx1e7=document[_0xaf82[407]](_0xf2ddx1e1[_0xaf82[489]]);if(_0xf2ddx1e4[_0xaf82[1243]]!= _0xf2ddxe6[_0xaf82[405]]|| _0xf2ddx1e4[_0xaf82[1234]]!= _0xf2ddx1e6|| _0xf2ddx1e4[_0xaf82[489]]!= _0xf2ddx1e7[_0xaf82[405]]){_0xf2ddx1e4[_0xaf82[1243]]= _0xf2ddxe6[_0xaf82[405]];_0xf2ddx1e4[_0xaf82[1234]]= _0xf2ddx1e6;_0xf2ddx1e4[_0xaf82[489]]= _0xf2ddx1e7[_0xaf82[405]];_0xf2ddx1e4[_0xaf82[1244]]= window[_0xaf82[1245]];_0xf2ddx1e4[_0xaf82[1246]]= defaultmapsettings[_0xaf82[1246]];_0xf2ddx1e4[_0xaf82[109]]= window[_0xaf82[109]];_0xf2ddx1e4[_0xaf82[110]]= window[_0xaf82[110]];_0xf2ddx1e4[_0xaf82[186]]= window[_0xaf82[186]];_0xf2ddx1e4[_0xaf82[1247]]= window[_0xaf82[1247]];_0xf2ddx1e5[_0xaf82[1236]]()}},send:function(_0xf2ddx116){if(_0xf2ddx1e5[_0xaf82[1233]][_0xaf82[1248]]!== _0xf2ddx1e5[_0xaf82[1233]][_0xaf82[1249]]){return};_0xf2ddx1e5[_0xaf82[1233]][_0xaf82[123]](JSON[_0xaf82[415]](_0xf2ddx116))},onMessage:function(_0xf2ddx158){try{var _0xf2ddx87=JSON[_0xaf82[107]](_0xf2ddx158[_0xaf82[1250]]);switch(_0xf2ddx87[_0xaf82[926]]){case _0xaf82[1252]:_0xf2ddx1e5[_0xaf82[123]]({type:_0xaf82[1251]});break}}catch(e){console[_0xaf82[283]](e)}}};var _0xf2ddx1e8=function(){var _0xf2ddxe6=document[_0xaf82[407]](_0xf2ddx1e1[_0xaf82[1243]]);var _0xf2ddx84=document[_0xaf82[407]](_0xf2ddx1e1[_0xaf82[1234]]);var _0xf2ddx1e7=document[_0xaf82[407]](_0xf2ddx1e1[_0xaf82[489]]);var _0xf2ddx1e9=document[_0xaf82[407]](_0xf2ddx1e1[_0xaf82[1253]]);if(!_0xf2ddxe6){console[_0xaf82[283]](_0xaf82[1254]);return};_0xf2ddxe6[_0xaf82[1072]](_0xaf82[57],_0xf2ddx1e5[_0xaf82[1255]]);_0xf2ddx84[_0xaf82[1072]](_0xaf82[57],_0xf2ddx1e5[_0xaf82[1255]]);_0xf2ddx1e7[_0xaf82[1072]](_0xaf82[57],_0xf2ddx1e5[_0xaf82[1255]]);var _0xf2ddx1ea=null;_0xf2ddx1e9[_0xaf82[1072]](_0xaf82[208],function(_0xf2ddx12d){clearTimeout(_0xf2ddx1ea);_0xf2ddx1ea= setTimeout(_0xf2ddx1e5[_0xaf82[1255]],5000)});_0xf2ddx1e5[_0xaf82[704]]();setInterval(_0xf2ddx1e5[_0xaf82[1255]],5000)};function _0xf2ddx1eb(){return _0xf2ddx1ec(_0xaf82[1256])}function _0xf2ddx1ec(_0xf2ddx1ed){var _0xf2ddx8b=_0xf2ddx1ed+ _0xaf82[805];var _0xf2ddx1ee=decodeURIComponent(document[_0xaf82[233]]);var _0xf2ddx1ef=_0xf2ddx1ee[_0xaf82[190]](_0xaf82[1257]);for(var _0xf2ddxd8=0;_0xf2ddxd8< _0xf2ddx1ef[_0xaf82[140]];_0xf2ddxd8++){var _0xf2ddx8f=_0xf2ddx1ef[_0xf2ddxd8];while(_0xf2ddx8f[_0xaf82[1258]](0)== _0xaf82[481]){_0xf2ddx8f= _0xf2ddx8f[_0xaf82[956]](1)};if(_0xf2ddx8f[_0xaf82[179]](_0xf2ddx8b)== 0){return _0xf2ddx8f[_0xaf82[956]](_0xf2ddx8b[_0xaf82[140]],_0xf2ddx8f[_0xaf82[140]])}};return _0xaf82[6]}_0xf2ddx1de(_0xf2ddx1e8,null)}function getSNEZServers(_0xf2ddx1f1){client2= {server:_0xaf82[1232],ws:null,isOpen:false,onOpenCallback:null,onCloseCallback:null,onMessageCallback:null,connect:function(){client2[_0xaf82[701]]= new WebSocket(client2[_0xaf82[1234]]);client2[_0xaf82[701]][_0xaf82[1235]]= client2[_0xaf82[1259]];client2[_0xaf82[701]][_0xaf82[1237]]= client2[_0xaf82[1260]];client2[_0xaf82[701]][_0xaf82[1239]]= client2[_0xaf82[1240]]},disconnect:function(){client2[_0xaf82[701]][_0xaf82[1261]]()},onOpen:function(){},onClose:function(){},onMessage:function(_0xf2ddx1f2){if(client2[_0xaf82[1262]](_0xf2ddx1f2)){return};try{var _0xf2ddx87=JSON[_0xaf82[107]](_0xf2ddx1f2[_0xaf82[1250]]);if(client2[_0xaf82[1262]](_0xf2ddx87)|| client2[_0xaf82[1262]](_0xf2ddx87[_0xaf82[926]])){return}}catch(e){console[_0xaf82[283]](e);return};switch(_0xf2ddx87[_0xaf82[926]]){case _0xaf82[1252]:client2[_0xaf82[123]]({type:_0xaf82[1251]});break;case _0xaf82[1264]:client2[_0xaf82[1263]](_0xf2ddx87[_0xaf82[1250]]);break}},isEmpty:function(_0xf2ddx1f3){if( typeof _0xf2ddx1f3== _0xaf82[938]){return true};if(_0xf2ddx1f3[_0xaf82[140]]=== 0){return true};for(var _0xf2ddx12c in _0xf2ddx1f3){if(_0xf2ddx1f3[_0xaf82[932]](_0xf2ddx12c)){return false}};return true},updatePlayers:function(_0xf2ddx87){var _0xf2ddx1f4=0;var _0xf2ddx1f5=0;showonceusers3= 0;var _0xf2ddx1f6=0;_0xf2ddx87= JSON[_0xaf82[107]](_0xf2ddx87);for(var _0xf2ddx1f7=0;_0xf2ddx1f7< _0xf2ddx87[_0xaf82[140]];_0xf2ddx1f7++){if(_0xf2ddx87[_0xf2ddx1f7][_0xaf82[1243]]){if(_0xf2ddx87[_0xf2ddx1f7][_0xaf82[1243]][_0xaf82[179]]($(_0xaf82[969])[_0xaf82[59]]())>= 0){if(_0xf2ddx1f4== 0){_0xf2ddx1f4++;if(_0xf2ddx1f1== null){toastr[_0xaf82[157]](_0xaf82[1265])}};var _0xf2ddx1f8=JSON[_0xaf82[415]](_0xf2ddx87[_0xf2ddx1f7]);var _0xf2ddx1f9;var _0xf2ddx1fa;var _0xf2ddx1fb=getParameterByName(_0xaf82[89],_0xf2ddx1f8);var _0xf2ddx1fc=getParameterByName(_0xaf82[90],_0xf2ddx1f8);_0xf2ddx1f8= _0xf2ddx1f8[_0xaf82[956]](0,_0xf2ddx1f8[_0xaf82[179]](_0xaf82[214]));_0xf2ddx1f9= _0xf2ddx1f8[_0xaf82[190]](_0xaf82[212])[_0xaf82[475]]();_0xf2ddx1fa= _0xf2ddx1f8[_0xaf82[190]](_0xaf82[1266])[_0xaf82[475]]();_0xf2ddx1fa= _0xf2ddx1fa[_0xaf82[956]](_0xf2ddx1fa,_0xf2ddx1fa[_0xaf82[179]](_0xaf82[1267]));if(_0xf2ddx87[_0xf2ddx1f7][_0xaf82[1246]]== true&& _0xf2ddx87[_0xf2ddx1f7][_0xaf82[1268]]){_0xf2ddx87[_0xf2ddx1f7][_0xaf82[1268]][_0xaf82[1270]][_0xaf82[1269]]= _0xaf82[1271]};if(_0xf2ddx1fc&& _0xf2ddx87[_0xf2ddx1f7][_0xaf82[1268]]&& _0xf2ddx87[_0xf2ddx1f7][_0xaf82[1268]][_0xaf82[1270]]){_0xf2ddx1fc= _0xf2ddx1fc[_0xaf82[190]](_0xaf82[1274])[0][_0xaf82[190]](_0xaf82[1273])[0][_0xaf82[190]](_0xaf82[1272])[0];appendLog3(_0xaf82[1275]+ _0xf2ddx1fb+ _0xaf82[1276]+ _0xf2ddx1fc+ _0xaf82[1277]+ _0xf2ddx1fa[_0xaf82[158]]()+ _0xaf82[1278]+ _0xf2ddx87[_0xf2ddx1f7][_0xaf82[1268]][_0xaf82[1270]][_0xaf82[1269]][_0xaf82[804]]()+ _0xaf82[1279]+ _0xaf82[1280]+ _0xf2ddx1f9+ _0xaf82[1281],_0xf2ddx1f9,_0xf2ddx1fb,_0xf2ddx1fc)}else {if(_0xf2ddx87[_0xf2ddx1f7][_0xaf82[1268]]&& _0xf2ddx87[_0xf2ddx1f7][_0xaf82[1268]][_0xaf82[1270]]){appendLog2(_0xaf82[1282]+ _0xf2ddx1fa[_0xaf82[158]]()+ _0xaf82[1278]+ _0xf2ddx87[_0xf2ddx1f7][_0xaf82[1268]][_0xaf82[1270]][_0xaf82[1269]][_0xaf82[804]]()+ _0xaf82[1279]+ _0xaf82[1280]+ _0xf2ddx1f9+ _0xaf82[1281],_0xf2ddx1f9)}};showonceusers3++;showonceusers3returner(showonceusers3)}else {if(_0xf2ddx87[_0xf2ddx1f7][_0xaf82[1234]][_0xaf82[179]]($(_0xaf82[969])[_0xaf82[59]]())>= 0){if($(_0xaf82[969])[_0xaf82[59]]()[_0xaf82[140]]>= 4){if(_0xf2ddx1f5== 0){_0xf2ddx1f5++;if(_0xf2ddx1f1== null){toastr[_0xaf82[157]](_0xaf82[1283])}};var _0xf2ddx1f8=JSON[_0xaf82[415]](_0xf2ddx87[_0xf2ddx1f7]);var _0xf2ddx1f9;var _0xf2ddx1fa;var _0xf2ddx1fb=getParameterByName(_0xaf82[89],_0xf2ddx1f8);var _0xf2ddx1fc=getParameterByName(_0xaf82[90],_0xf2ddx1f8);_0xf2ddx1f8= _0xf2ddx1f8[_0xaf82[956]](0,_0xf2ddx1f8[_0xaf82[179]](_0xaf82[214]));_0xf2ddx1f9= _0xf2ddx1f8[_0xaf82[190]](_0xaf82[212])[_0xaf82[475]]();_0xf2ddx1fa= _0xf2ddx1f8[_0xaf82[190]](_0xaf82[1266])[_0xaf82[475]]();_0xf2ddx1fa= _0xf2ddx1fa[_0xaf82[956]](_0xf2ddx1fa,_0xf2ddx1fa[_0xaf82[179]](_0xaf82[1267]));if(_0xf2ddx87[_0xf2ddx1f7][_0xaf82[1246]]== true){_0xf2ddx87[_0xf2ddx1f7][_0xaf82[1268]][_0xaf82[1270]][_0xaf82[1269]]= _0xaf82[1271]};if(_0xf2ddx1fc&& _0xf2ddx87[_0xf2ddx1f7][_0xaf82[1268]]&& _0xf2ddx87[_0xf2ddx1f7][_0xaf82[1268]][_0xaf82[1270]]){_0xf2ddx1fc= _0xf2ddx1fc[_0xaf82[190]](_0xaf82[1274])[0][_0xaf82[190]](_0xaf82[1273])[0][_0xaf82[190]](_0xaf82[1272])[0];appendLog3(_0xaf82[1275]+ _0xf2ddx1fb+ _0xaf82[1276]+ _0xf2ddx1fc+ _0xaf82[1284]+ _0xf2ddx1fa[_0xaf82[158]]()+ _0xaf82[1285]+ _0xf2ddx87[_0xf2ddx1f7][_0xaf82[1268]][_0xaf82[1270]][_0xaf82[1269]][_0xaf82[804]]()+ _0xaf82[1286]+ _0xf2ddx1f9+ _0xaf82[1287],_0xf2ddx1f9,_0xf2ddx1fb,_0xf2ddx1fc)}else {if(_0xf2ddx87[_0xf2ddx1f7][_0xaf82[1268]]&& _0xf2ddx87[_0xf2ddx1f7][_0xaf82[1268]][_0xaf82[1270]]){appendLog2(_0xaf82[1288]+ _0xf2ddx1fa[_0xaf82[158]]()+ _0xaf82[1285]+ _0xf2ddx87[_0xf2ddx1f7][_0xaf82[1268]][_0xaf82[1270]][_0xaf82[1269]][_0xaf82[804]]()+ _0xaf82[1286]+ _0xf2ddx1f9+ _0xaf82[1287],_0xf2ddx1f9)}};showonceusers3++;showonceusers3returner(showonceusers3)}}}}};client2[_0xaf82[701]][_0xaf82[1261]]();if(showonceusers3== 0){_0xf2ddx1f6++;if(_0xf2ddx1f6== 1){if(_0xf2ddx1f1== null){toastr[_0xaf82[184]](_0xaf82[1289]+ $(_0xaf82[60])[_0xaf82[59]]()+ _0xaf82[1290]+ $(_0xaf82[69])[_0xaf82[59]]()+ _0xaf82[1291]+ _0xaf82[1292]+ Premadeletter24+ _0xaf82[1293]+ Premadeletter25+ _0xaf82[172],_0xaf82[6],{timeOut:20000,extendedTimeOut:20000})[_0xaf82[73]](_0xaf82[71],_0xaf82[182])};$(_0xaf82[1294])[_0xaf82[208]](function(){$(_0xaf82[248])[_0xaf82[247]](_0xaf82[244])[_0xaf82[245]](_0xaf82[246]);var _0xf2ddxc8=$(_0xaf82[969])[_0xaf82[59]]();searchHandler(_0xf2ddxc8)})}};return client2},send:function(_0xf2ddx87){client2[_0xaf82[701]][_0xaf82[123]](JSON[_0xaf82[415]](_0xf2ddx87))}}}function showonceusers3returner(showonceusers3){return showonceusers3}function init(modVersion){if(!document[_0xaf82[407]](_0xaf82[1295])){setTimeout(init(modVersion),200);console[_0xaf82[283]](_0xaf82[1296]);return};return startLM(modVersion)}function initializeLM(modVersion){PremiumUsersFFAScore();$(_0xaf82[1302])[_0xaf82[281]](_0xaf82[1301])[_0xaf82[206]](_0xaf82[1299],_0xaf82[1300])[_0xaf82[257]](_0xaf82[1297],_0xaf82[1298]);$(_0xaf82[1305])[_0xaf82[281]](_0xaf82[1304])[_0xaf82[206]](_0xaf82[1299],_0xaf82[1300])[_0xaf82[257]](_0xaf82[1297],_0xaf82[1303]);$(_0xaf82[1308])[_0xaf82[247]](_0xaf82[1307])[_0xaf82[245]](_0xaf82[1306]);$(_0xaf82[1310])[_0xaf82[281]](_0xaf82[1309]);$(_0xaf82[1310])[_0xaf82[206]](_0xaf82[1299],_0xaf82[1300])[_0xaf82[257]](_0xaf82[1297],_0xaf82[1311]);$(_0xaf82[243])[_0xaf82[281]](_0xaf82[1314])[_0xaf82[206]](_0xaf82[1299],_0xaf82[1300])[_0xaf82[257]](_0xaf82[1297],_0xaf82[1313])[_0xaf82[206]](_0xaf82[1045],_0xaf82[1312]);$(_0xaf82[280])[_0xaf82[713]](_0xaf82[1315]);$(_0xaf82[1323])[_0xaf82[713]](_0xaf82[1316]+ _0xaf82[1317]+ _0xaf82[1318]+ _0xaf82[1319]+ _0xaf82[1320]+ _0xaf82[1321]+ _0xaf82[1322]+ _0xaf82[326]);$(_0xaf82[1324])[_0xaf82[61]]();$(_0xaf82[493])[_0xaf82[206]](_0xaf82[1325],_0xaf82[1326]);$(_0xaf82[1329])[_0xaf82[1328]]()[_0xaf82[1300]]({title:_0xaf82[1327],placement:_0xaf82[677]});$(_0xaf82[1343])[_0xaf82[1328]]()[_0xaf82[128]](_0xaf82[1330]+ textLanguage[_0xaf82[1331]]+ _0xaf82[1332]+ _0xaf82[1333]+ _0xaf82[1334]+ _0xaf82[1335]+ _0xaf82[1336]+ _0xaf82[1337]+ _0xaf82[1338]+ _0xaf82[1339]+ _0xaf82[1340]+ _0xaf82[1341]+ _0xaf82[1342]);$(_0xaf82[1345])[_0xaf82[1328]]()[_0xaf82[1300]]({title:_0xaf82[1344],placement:_0xaf82[677]});$(_0xaf82[1348])[_0xaf82[1328]]()[_0xaf82[1328]]()[_0xaf82[1300]]({title:_0xaf82[1346],placement:_0xaf82[1347]});$(_0xaf82[951])[_0xaf82[128]](_0xaf82[1349]+ _0xaf82[1350]+ _0xaf82[1351]+ _0xaf82[1352]+ _0xaf82[1353]+ _0xaf82[1354]+ _0xaf82[1355]+ _0xaf82[1356]+ _0xaf82[652]);$(_0xaf82[950])[_0xaf82[279]](_0xaf82[1357]);$(_0xaf82[1088])[_0xaf82[713]](_0xaf82[1358]+ _0xaf82[1359]+ _0xaf82[1360]+ _0xaf82[1361]+ _0xaf82[1362]);$(_0xaf82[1364])[_0xaf82[130]](_0xaf82[1363]);$(_0xaf82[84])[_0xaf82[64]]()[_0xaf82[206]](_0xaf82[1045],_0xaf82[1365]);$(_0xaf82[1450])[_0xaf82[130]](_0xaf82[1366]+ _0xaf82[1367]+ Premadeletter42+ _0xaf82[172]+ _0xaf82[1368]+ Premadeletter44+ _0xaf82[172]+ _0xaf82[1369]+ Premadeletter45a+ _0xaf82[172]+ _0xaf82[1370]+ Premadeletter46+ _0xaf82[172]+ _0xaf82[1371]+ Premadeletter49+ _0xaf82[172]+ _0xaf82[1372]+ Premadeletter50+ _0xaf82[172]+ _0xaf82[1373]+ _0xaf82[1374]+ _0xaf82[1375]+ _0xaf82[1376]+ _0xaf82[1377]+ _0xaf82[1378]+ _0xaf82[1379]+ _0xaf82[1380]+ _0xaf82[1381]+ _0xaf82[1382]+ _0xaf82[1383]+ _0xaf82[1384]+ _0xaf82[1385]+ _0xaf82[1386]+ _0xaf82[1387]+ _0xaf82[1388]+ _0xaf82[1389]+ _0xaf82[1390]+ _0xaf82[1391]+ _0xaf82[1392]+ _0xaf82[652]+ _0xaf82[1393]+ _0xaf82[1394]+ _0xaf82[1395]+ _0xaf82[1396]+ _0xaf82[1397]+ _0xaf82[1398]+ _0xaf82[1399]+ _0xaf82[1400]+ _0xaf82[1401]+ _0xaf82[1402]+ _0xaf82[1403]+ _0xaf82[1404]+ _0xaf82[1405]+ _0xaf82[1406]+ _0xaf82[1383]+ _0xaf82[1407]+ _0xaf82[1408]+ _0xaf82[1409]+ _0xaf82[1410]+ _0xaf82[1411]+ _0xaf82[1412]+ _0xaf82[1413]+ _0xaf82[1414]+ _0xaf82[1415]+ _0xaf82[1416]+ _0xaf82[1417]+ _0xaf82[1418]+ _0xaf82[1419]+ _0xaf82[1420]+ _0xaf82[1421]+ _0xaf82[1422]+ _0xaf82[1423]+ _0xaf82[1424]+ _0xaf82[1425]+ _0xaf82[1426]+ _0xaf82[1427]+ _0xaf82[1428]+ _0xaf82[1429]+ _0xaf82[1430]+ _0xaf82[326]+ _0xaf82[1431]+ _0xaf82[1432]+ _0xaf82[1433]+ _0xaf82[1434]+ _0xaf82[1435]+ _0xaf82[1436]+ _0xaf82[1437]+ _0xaf82[1438]+ _0xaf82[1439]+ _0xaf82[1440]+ _0xaf82[1441]+ _0xaf82[1442]+ _0xaf82[1443]+ _0xaf82[1444]+ _0xaf82[1445]+ _0xaf82[1446]+ _0xaf82[1447]+ _0xaf82[1448]+ _0xaf82[1449]+ _0xaf82[326]);$(_0xaf82[1453])[_0xaf82[73]](_0xaf82[1451],_0xaf82[1452]);$(_0xaf82[1456])[_0xaf82[73]](_0xaf82[1454],_0xaf82[1455]);changeFrameWorkStart();$(_0xaf82[969])[_0xaf82[1462]](_0xaf82[1457],function(_0xf2ddx12d){if(!searching){var _0xf2ddx200=_0xf2ddx12d[_0xaf82[1460]][_0xaf82[1459]][_0xaf82[1458]](_0xaf82[76]);$(_0xaf82[969])[_0xaf82[59]](_0xf2ddx200);$(_0xaf82[969])[_0xaf82[284]]();$(_0xaf82[1461])[_0xaf82[208]]()}});$(_0xaf82[1463])[_0xaf82[59]](localStorage[_0xaf82[3]](_0xaf82[421]));$(_0xaf82[1464])[_0xaf82[59]](localStorage[_0xaf82[3]](_0xaf82[422]));$(_0xaf82[1465])[_0xaf82[59]](localStorage[_0xaf82[3]](_0xaf82[423]));$(_0xaf82[1466])[_0xaf82[59]](localStorage[_0xaf82[3]](_0xaf82[424]));$(_0xaf82[1467])[_0xaf82[59]](localStorage[_0xaf82[3]](_0xaf82[425]));$(_0xaf82[1468])[_0xaf82[59]](localStorage[_0xaf82[3]](_0xaf82[426]));$(_0xaf82[1469])[_0xaf82[59]](localStorage[_0xaf82[3]](_0xaf82[427]));$(_0xaf82[1470])[_0xaf82[734]](function(_0xf2ddx11d){localStorage[_0xaf82[117]](_0xf2ddx11d[_0xaf82[1213]][_0xaf82[144]],$(_0xf2ddx11d[_0xaf82[1213]])[_0xaf82[59]]())});var _0xf2ddx201=(localStorage[_0xaf82[3]](_0xaf82[420])== null?defaultMusicUrl:localStorage[_0xaf82[3]](_0xaf82[420]));$(_0xaf82[80])[_0xaf82[130]](_0xaf82[1471]+ _0xaf82[1472]+ getEmbedUrl(_0xf2ddx201)+ _0xaf82[1473]+ _0xaf82[1474]+ _0xf2ddx201+ _0xaf82[1475]);$(_0xaf82[80])[_0xaf82[61]]();$(_0xaf82[81])[_0xaf82[61]]();ytFrame();$(_0xaf82[1478])[_0xaf82[245]](_0xaf82[1477])[_0xaf82[247]](_0xaf82[1476]);$(_0xaf82[469])[_0xaf82[801]](_0xaf82[1479],function(){$(this)[_0xaf82[206]](_0xaf82[1480],_0xaf82[1481])});$(_0xaf82[469])[_0xaf82[1462]](_0xaf82[1457],function(_0xf2ddx12d){$(this)[_0xaf82[206]](_0xaf82[1480],_0xaf82[1481]);var _0xf2ddx109=_0xf2ddx12d[_0xaf82[1460]][_0xaf82[1459]][_0xaf82[1458]](_0xaf82[76]);YoutubeEmbPlayer(_0xf2ddx109)});$(_0xaf82[410])[_0xaf82[206]](_0xaf82[1482],_0xaf82[1483]);$(_0xaf82[952])[_0xaf82[130]](_0xaf82[1484]+ _0xaf82[1485]+ _0xaf82[326]);$(_0xaf82[1088])[_0xaf82[713]](_0xaf82[1486]+ _0xaf82[1487]+ _0xaf82[1488]+ _0xaf82[1489]+ _0xaf82[1490]+ _0xaf82[1491]+ _0xaf82[1492]+ _0xaf82[652]);$(_0xaf82[1088])[_0xaf82[713]](_0xaf82[1493]+ _0xaf82[1494]+ _0xaf82[1495]+ _0xaf82[1496]+ _0xaf82[1497]+ _0xaf82[1498]+ _0xaf82[1499]);$(_0xaf82[1088])[_0xaf82[713]](_0xaf82[1500]+ _0xaf82[1501]+ _0xaf82[1502]+ _0xaf82[1503]+ _0xaf82[1504]+ _0xaf82[1505]+ _0xaf82[1506]);$(_0xaf82[1088])[_0xaf82[713]](_0xaf82[1507]+ _0xaf82[1508]+ _0xaf82[1509]+ _0xaf82[1510]+ _0xaf82[1511]+ _0xaf82[1512]+ _0xaf82[1513]);$(_0xaf82[1088])[_0xaf82[713]](_0xaf82[1514]+ _0xaf82[1515]+ _0xaf82[652]);$(_0xaf82[1090])[_0xaf82[279]](_0xaf82[1516]+ _0xaf82[1517]+ legmaincolor+ _0xaf82[1518]+ _0xaf82[1519]+ legmaincolor+ _0xaf82[1520]+ _0xaf82[1521]+ _0xaf82[1522]+ legmaincolor+ _0xaf82[1523]+ _0xaf82[1524]+ _0xaf82[1525]+ legmaincolor+ _0xaf82[1526]+ _0xaf82[652]+ _0xaf82[1527]+ _0xaf82[1528]+ legmaincolor+ _0xaf82[1529]+ _0xaf82[1530]+ legmaincolor+ _0xaf82[1531]+ _0xaf82[1532]+ legmaincolor+ _0xaf82[1533]+ _0xaf82[652]+ _0xaf82[1534]+ _0xaf82[1530]+ legmaincolor+ _0xaf82[1531]+ _0xaf82[652]+ _0xaf82[1535]+ _0xaf82[652]);$(_0xaf82[544])[_0xaf82[208]](function(){if(playerState!= 1){$(_0xaf82[471])[0][_0xaf82[1540]][_0xaf82[1539]](_0xaf82[1536]+ _0xaf82[298]+ _0xaf82[1537],_0xaf82[1538]);$(_0xaf82[1543])[_0xaf82[247]](_0xaf82[1542])[_0xaf82[245]](_0xaf82[1541]);$(this)[_0xaf82[206]](_0xaf82[986],Premadeletter60)[_0xaf82[1300]](_0xaf82[1544])[_0xaf82[1300]](_0xaf82[87]);return playerState= 1}else {$(_0xaf82[471])[0][_0xaf82[1540]][_0xaf82[1539]](_0xaf82[1536]+ _0xaf82[299]+ _0xaf82[1537],_0xaf82[1538]);$(_0xaf82[1543])[_0xaf82[247]](_0xaf82[1541])[_0xaf82[245]](_0xaf82[1542]);$(this)[_0xaf82[206]](_0xaf82[986],Premadeletter13)[_0xaf82[1300]](_0xaf82[1544])[_0xaf82[1300]](_0xaf82[87]);return playerState= 0}});$(_0xaf82[1168])[_0xaf82[665]](function(){$(_0xaf82[1545])[_0xaf82[61]]();$(_0xaf82[1168])[_0xaf82[76]](_0xaf82[1546]);if($(_0xaf82[493])[_0xaf82[59]]()!= _0xaf82[6]){$(_0xaf82[1547])[_0xaf82[87]](100)}else {$(_0xaf82[1548])[_0xaf82[87]](100)}});$(_0xaf82[1456])[_0xaf82[663]](function(){$(_0xaf82[1548])[_0xaf82[61]]();$(_0xaf82[1547])[_0xaf82[61]]();$(_0xaf82[1545])[_0xaf82[61]]();$(_0xaf82[1168])[_0xaf82[76]](_0xaf82[1549])});$(_0xaf82[1551])[_0xaf82[130]](_0xaf82[1550]);$(_0xaf82[1461])[_0xaf82[1300]](_0xaf82[1552]);$(_0xaf82[1122])[_0xaf82[208]](function(){copy($(_0xaf82[238])[_0xaf82[76]]())});$(_0xaf82[1123])[_0xaf82[208]](function(){copy($(_0xaf82[238])[_0xaf82[76]]())});$(_0xaf82[1553])[_0xaf82[208]](function(){lastIP= localStorage[_0xaf82[3]](_0xaf82[38]);if(lastIP== _0xaf82[6]|| lastIP== null){}else {$(_0xaf82[213])[_0xaf82[59]](lastIP);$(_0xaf82[295])[_0xaf82[208]]();setTimeout(function(){if($(_0xaf82[213])[_0xaf82[59]]()!= lastIP){toastr[_0xaf82[173]](Premadeletter31)[_0xaf82[73]](_0xaf82[71],_0xaf82[267])}},1000)}});$(_0xaf82[1557])[_0xaf82[208]](function(){if(searchSip!= null){copy(_0xaf82[1554]+ region+ _0xaf82[1555]+ realmode+ _0xaf82[1556]+ searchSip)}else {copy(_0xaf82[1554]+ $(_0xaf82[60])[_0xaf82[59]]()+ _0xaf82[1555]+ realmode+ _0xaf82[1556]+ currentIP)}});$(_0xaf82[1168])[_0xaf82[208]](function(){if(realmode== _0xaf82[68]){CopyTkPwLb2= _0xaf82[1558]+ $(_0xaf82[213])[_0xaf82[59]]();copy(CopyTkPwLb2)}else {if(realmode!= _0xaf82[68]){if(region!= null&& realmode!= null){if(document[_0xaf82[56]][_0xaf82[55]](_0xaf82[54])){CopyTkPwLb2= _0xaf82[1559]+ $(_0xaf82[213])[_0xaf82[59]]()+ _0xaf82[218]+ $(_0xaf82[60])[_0xaf82[59]]()+ _0xaf82[1555]+ realmode}else {CopyTkPwLb2= _0xaf82[1558]+ $(_0xaf82[213])[_0xaf82[59]]()+ _0xaf82[218]+ $(_0xaf82[60])[_0xaf82[59]]()+ _0xaf82[1555]+ realmode};copy(CopyTkPwLb2)}else {CopyTkPwLb2= _0xaf82[1558]+ $(_0xaf82[213])[_0xaf82[59]]();copy(CopyTkPwLb2)}}else {if(realmode== _0xaf82[68]){CopyTkPwLb2= _0xaf82[1558]+ $(_0xaf82[213])[_0xaf82[59]]();copy(CopyTkPwLb2)}else {if(realmode!= _0xaf82[68]){if(document[_0xaf82[56]][_0xaf82[55]](_0xaf82[54])){CopyTkPwLb2= _0xaf82[1559]+ $(_0xaf82[213])[_0xaf82[59]]()+ _0xaf82[218]+ $(_0xaf82[60])[_0xaf82[59]]()+ _0xaf82[1555]+ realmode}else {CopyTkPwLb2= _0xaf82[1558]+ $(_0xaf82[213])[_0xaf82[59]]()+ _0xaf82[218]+ $(_0xaf82[60])[_0xaf82[59]]()+ _0xaf82[1555]+ realmode};copy(CopyTkPwLb2)}}}}});$(_0xaf82[1124])[_0xaf82[208]](function(){if(searchSip!= null){if(realmode== _0xaf82[68]){CopyTkPwLb2= _0xaf82[1558]+ $(_0xaf82[213])[_0xaf82[59]]()+ _0xaf82[1560]+ $(_0xaf82[493])[_0xaf82[59]]();copy(CopyTkPwLb2)}else {if(realmode!= _0xaf82[68]){if(document[_0xaf82[56]][_0xaf82[55]](_0xaf82[54])){CopyTkPwLb2= _0xaf82[1559]+ $(_0xaf82[213])[_0xaf82[59]]()+ _0xaf82[1560]+ $(_0xaf82[493])[_0xaf82[59]]()+ _0xaf82[218]+ $(_0xaf82[60])[_0xaf82[59]]()+ _0xaf82[1555]+ realmode}else {CopyTkPwLb2= _0xaf82[1558]+ $(_0xaf82[213])[_0xaf82[59]]()+ _0xaf82[1560]+ $(_0xaf82[493])[_0xaf82[59]]()+ _0xaf82[218]+ $(_0xaf82[60])[_0xaf82[59]]()+ _0xaf82[1555]+ realmode};copy(CopyTkPwLb2)}}}else {if(realmode== _0xaf82[68]){CopyTkPwLb2= _0xaf82[1558]+ $(_0xaf82[213])[_0xaf82[59]]()+ _0xaf82[1560]+ $(_0xaf82[493])[_0xaf82[59]]();copy(CopyTkPwLb2)}else {if(realmode!= _0xaf82[68]){if(document[_0xaf82[56]][_0xaf82[55]](_0xaf82[54])){CopyTkPwLb2= _0xaf82[1559]+ $(_0xaf82[213])[_0xaf82[59]]()+ _0xaf82[1560]+ $(_0xaf82[493])[_0xaf82[59]]()+ _0xaf82[218]+ $(_0xaf82[60])[_0xaf82[59]]()+ _0xaf82[1555]+ realmode}else {CopyTkPwLb2= _0xaf82[1558]+ $(_0xaf82[213])[_0xaf82[59]]()+ _0xaf82[1560]+ $(_0xaf82[493])[_0xaf82[59]]()+ _0xaf82[218]+ $(_0xaf82[60])[_0xaf82[59]]()+ _0xaf82[1555]+ realmode};copy(CopyTkPwLb2)}}}});$(_0xaf82[1125])[_0xaf82[208]](function(){if(searchSip!= null){if(realmode== _0xaf82[68]){CopyTkPwLb2= _0xaf82[1558]+ $(_0xaf82[213])[_0xaf82[59]]()+ _0xaf82[1560]+ $(_0xaf82[493])[_0xaf82[59]]();copyToClipboardAll()}else {if(realmode!= _0xaf82[68]){if(document[_0xaf82[56]][_0xaf82[55]](_0xaf82[54])){CopyTkPwLb2= _0xaf82[1559]+ $(_0xaf82[213])[_0xaf82[59]]()+ _0xaf82[1560]+ $(_0xaf82[493])[_0xaf82[59]]()+ _0xaf82[218]+ $(_0xaf82[60])[_0xaf82[59]]()+ _0xaf82[1555]+ realmode}else {CopyTkPwLb2= _0xaf82[1558]+ $(_0xaf82[213])[_0xaf82[59]]()+ _0xaf82[1560]+ $(_0xaf82[493])[_0xaf82[59]]()+ _0xaf82[218]+ $(_0xaf82[60])[_0xaf82[59]]()+ _0xaf82[1555]+ realmode};copy(CopyTkPwLb2)}}}else {if(realmode== _0xaf82[68]){CopyTkPwLb2= _0xaf82[1558]+ $(_0xaf82[213])[_0xaf82[59]]()+ _0xaf82[1560]+ $(_0xaf82[493])[_0xaf82[59]]();copyToClipboardAll()}else {if(realmode!= _0xaf82[68]){if(document[_0xaf82[56]][_0xaf82[55]](_0xaf82[54])){CopyTkPwLb2= _0xaf82[1559]+ $(_0xaf82[213])[_0xaf82[59]]()+ _0xaf82[1560]+ $(_0xaf82[493])[_0xaf82[59]]()+ _0xaf82[218]+ $(_0xaf82[60])[_0xaf82[59]]()+ _0xaf82[1555]+ realmode}else {CopyTkPwLb2= _0xaf82[1558]+ $(_0xaf82[213])[_0xaf82[59]]()+ _0xaf82[1560]+ $(_0xaf82[493])[_0xaf82[59]]()+ _0xaf82[218]+ $(_0xaf82[60])[_0xaf82[59]]()+ _0xaf82[1555]+ realmode};copyToClipboardAll()}}}});$(_0xaf82[693])[_0xaf82[208]](function(){$(_0xaf82[693])[_0xaf82[1561]]()});$(_0xaf82[1169])[_0xaf82[208]](function(){$(_0xaf82[237])[_0xaf82[208]]()});$(_0xaf82[1169])[_0xaf82[665]](function(){$(_0xaf82[1548])[_0xaf82[61]]();$(_0xaf82[1547])[_0xaf82[61]]();$(_0xaf82[1168])[_0xaf82[76]](_0xaf82[1549])});$(_0xaf82[1461])[_0xaf82[208]](function(){if(!searching){getSNEZServers();client2[_0xaf82[704]]()}else {$(_0xaf82[248])[_0xaf82[247]](_0xaf82[246])[_0xaf82[245]](_0xaf82[244]);clearInterval(timerId);searching= false;toastr[_0xaf82[173]](Premadeletter32+ _0xaf82[274])[_0xaf82[73]](_0xaf82[71],_0xaf82[267])}});$(_0xaf82[969])[_0xaf82[734]](function(_0xf2ddx11d){if(_0xf2ddx11d[_0xaf82[685]]== 13){$(_0xaf82[1461])[_0xaf82[208]]()}});$(_0xaf82[1562])[_0xaf82[208]](function(){hideSearchHud();showMenu2()});$(_0xaf82[1166])[_0xaf82[665]](function(){$(_0xaf82[1548])[_0xaf82[61]]();$(_0xaf82[1545])[_0xaf82[87]](100);$(_0xaf82[1168])[_0xaf82[76]](_0xaf82[1549])});$(_0xaf82[952])[_0xaf82[73]](_0xaf82[1454],_0xaf82[1455]);$(_0xaf82[1166])[_0xaf82[208]](function(){hideMenu();$(_0xaf82[250])[_0xaf82[59]]($(_0xaf82[60])[_0xaf82[59]]());$(_0xaf82[251])[_0xaf82[59]]($(_0xaf82[69])[_0xaf82[59]]());showSearchHud();$(_0xaf82[969])[_0xaf82[1561]]()[_0xaf82[284]]()});$(_0xaf82[293])[_0xaf82[665]](function(){$(_0xaf82[293])[_0xaf82[73]](_0xaf82[397],_0xaf82[1563]);return clickedname= _0xaf82[99]})[_0xaf82[663]](function(){$(_0xaf82[293])[_0xaf82[73]](_0xaf82[397],_0xaf82[6])});$(_0xaf82[293])[_0xaf82[1121]](function(){previousnickname= $(_0xaf82[293])[_0xaf82[59]]();localStorage[_0xaf82[117]](_0xaf82[39],previousnickname);var _0xf2ddx202;for(_0xf2ddx202 in animatedskins){if(_0xf2ddx202== $(_0xaf82[293])[_0xaf82[59]]()){toastr[_0xaf82[157]](_0xaf82[1564])}};if(clickedname== _0xaf82[99]){if(fancyCount2($(_0xaf82[293])[_0xaf82[59]]())>= 16){toastr[_0xaf82[184]](_0xaf82[199]+ Premadeletter123+ _0xaf82[200]+ Premadeletter2+ _0xaf82[1565]+ $(_0xaf82[293])[_0xaf82[59]]())}};if($(_0xaf82[293])[_0xaf82[59]]()== _0xaf82[1566]){toastr[_0xaf82[157]](Premadeletter3)[_0xaf82[73]](_0xaf82[71],_0xaf82[267]);$(_0xaf82[293])[_0xaf82[59]](_0xaf82[1567]);$(_0xaf82[74])[_0xaf82[208]]();openbleedmod()}else {if($(_0xaf82[293])[_0xaf82[59]]()== _0xaf82[1568]){toastr[_0xaf82[157]](Premadeletter4)[_0xaf82[73]](_0xaf82[71],_0xaf82[267]);$(_0xaf82[293])[_0xaf82[59]](_0xaf82[1567]);$(_0xaf82[74])[_0xaf82[208]]();openrotatingmod()}else {if($(_0xaf82[293])[_0xaf82[59]]()== _0xaf82[1569]){toastr[_0xaf82[157]](Premadeletter5+ _0xaf82[1570]+ Premadeletter6+ _0xaf82[1571]);$(_0xaf82[293])[_0xaf82[59]](_0xaf82[1572]);openvidmod()}}}});$(_0xaf82[293])[_0xaf82[801]](_0xaf82[1479],function(){if(fancyCount2($(_0xaf82[293])[_0xaf82[59]]())> 15){while(fancyCount2($(_0xaf82[293])[_0xaf82[59]]())> 15){$(_0xaf82[293])[_0xaf82[59]]($(_0xaf82[293])[_0xaf82[59]]()[_0xaf82[181]](0,-1))}}});$(document)[_0xaf82[734]](function(_0xf2ddx11d){if(_0xf2ddx11d[_0xaf82[1573]]== 8){if($(_0xaf82[1574])[_0xaf82[140]]== 0){$(_0xaf82[1166])[_0xaf82[208]]()}}});$(_0xaf82[1176])[_0xaf82[208]](function(){CutNameConflictwithMessageFunction();if(checkedGameNames== 0){StartEditGameNames();return checkedGameNames= 2}else {if(checkedGameNames== 1){ContinueEditGameNames();return checkedGameNames= 2}else {if(checkedGameNames== 2){StopEditGameNames();return checkedGameNames= 1}}}});$(_0xaf82[1170])[_0xaf82[208]](function(){var _0xf2ddx203=$(_0xaf82[213])[_0xaf82[59]]();var _0xf2ddx204=$(_0xaf82[493])[_0xaf82[59]]();if(_0xf2ddx204!= _0xaf82[6]){semiurl2= _0xf2ddx203+ _0xaf82[1575]+ _0xf2ddx204}else {semiurl2= _0xf2ddx203};url2= _0xaf82[1576]+ semiurl2;setTimeout(function(){$(_0xaf82[1170])[_0xaf82[545]]()},100);var _0xf2ddx205=window[_0xaf82[119]](url2,_0xaf82[486])});$(_0xaf82[493])[_0xaf82[73]](_0xaf82[71],_0xaf82[1577]);$(_0xaf82[293])[_0xaf82[73]](_0xaf82[71],_0xaf82[1578]);$(_0xaf82[493])[_0xaf82[665]](function(){$(_0xaf82[493])[_0xaf82[73]](_0xaf82[397],_0xaf82[1563])})[_0xaf82[663]](function(){$(_0xaf82[493])[_0xaf82[73]](_0xaf82[397],_0xaf82[6])});$(_0xaf82[60])[_0xaf82[665]](function(){$(_0xaf82[60])[_0xaf82[73]](_0xaf82[397],_0xaf82[1579])})[_0xaf82[663]](function(){$(_0xaf82[60])[_0xaf82[73]](_0xaf82[397],_0xaf82[6])});$(_0xaf82[69])[_0xaf82[665]](function(){$(_0xaf82[69])[_0xaf82[73]](_0xaf82[397],_0xaf82[1579])})[_0xaf82[663]](function(){$(_0xaf82[69])[_0xaf82[73]](_0xaf82[397],_0xaf82[6])});$(_0xaf82[1580])[_0xaf82[208]](function(){setTimeout(function(){if(LegendSettingsfirstclicked== _0xaf82[116]){LegendSettingsfirst();return LegendSettingsfirstclicked= _0xaf82[115]}else {$(_0xaf82[408])[_0xaf82[208]]();return false}},100)});$(_0xaf82[236])[_0xaf82[208]](function(){localStorage[_0xaf82[117]](_0xaf82[38],$(_0xaf82[213])[_0xaf82[59]]());var _0xf2ddx206=_0xaf82[1581];var _0xf2ddx207=_0xaf82[108];var _0xf2ddx208=_0xaf82[108];var userfirstname=localStorage[_0xaf82[3]](_0xaf82[109]);var userlastname=localStorage[_0xaf82[3]](_0xaf82[110]);var _0xf2ddx111=_0xaf82[108];var _0xf2ddx209=_0xaf82[108];var _0xf2ddx20a= new Date();var _0xf2ddx20b=_0xf2ddx20a[_0xaf82[1582]]()+ _0xaf82[192]+ (_0xf2ddx20a[_0xaf82[1583]]()+ 1)+ _0xaf82[192]+ _0xf2ddx20a[_0xaf82[1584]]()+ _0xaf82[189]+ _0xf2ddx20a[_0xaf82[1585]]()+ _0xaf82[239]+ _0xf2ddx20a[_0xaf82[1586]]();if(searchSip== null){_0xf2ddx111= $(_0xaf82[69])[_0xaf82[59]]();_0xf2ddx209= $(_0xaf82[60])[_0xaf82[59]]()}else {if(searchSip== $(_0xaf82[300])[_0xaf82[59]]()){_0xf2ddx111= realmode;_0xf2ddx209= region}};if($(_0xaf82[300])[_0xaf82[59]]()!= _0xaf82[6]&& $(_0xaf82[300])[_0xaf82[59]]()!= null&& $(_0xaf82[300])[_0xaf82[59]]()!= undefined){_0xf2ddx207= $(_0xaf82[300])[_0xaf82[59]]()};if($(_0xaf82[493])[_0xaf82[59]]()!= _0xaf82[6]&& $(_0xaf82[493])[_0xaf82[59]]()!= undefined){_0xf2ddx206= $(_0xaf82[493])[_0xaf82[59]]()};var _0xf2ddxd8=0,_0xf2ddx20c=_0xf2ddx206[_0xaf82[140]];for(_0xf2ddxd8;_0xf2ddxd8< _0xf2ddx206;_0xf2ddxd8++){_0xf2ddx206= _0xf2ddx206[_0xaf82[168]](_0xaf82[481],_0xaf82[933])};if($(_0xaf82[293])[_0xaf82[59]]()!= undefined){_0xf2ddx208= $(_0xaf82[293])[_0xaf82[59]]()};var _0xf2ddxd8=0,_0xf2ddx20d=_0xf2ddx208[_0xaf82[140]];for(_0xf2ddxd8;_0xf2ddxd8< _0xf2ddx20d;_0xf2ddxd8++){_0xf2ddx208= removeEmojis(_0xf2ddx208[_0xaf82[168]](_0xaf82[481],_0xaf82[933]))};if($(_0xaf82[300])[_0xaf82[59]]()!= undefined){if(_0xf2ddx207[_0xaf82[179]](_0xaf82[579])== false){_0xf2ddx207= $(_0xaf82[300])[_0xaf82[59]]()[_0xaf82[168]](_0xaf82[579],_0xaf82[1587])}};if(searchSip== null){detailed1= _0xaf82[1588]+ _0xaf82[1589]+ window[_0xaf82[1245]]+ _0xaf82[1590]+ _0xf2ddx208+ _0xaf82[1591]+ _0xf2ddx20b+ _0xaf82[1592]+ _0xf2ddx207+ _0xaf82[1593]+ _0xf2ddx206+ _0xaf82[1594]+ _0xf2ddx111+ _0xaf82[1595]+ _0xf2ddx209+ _0xaf82[1596]+ window[_0xaf82[186]]+ _0xaf82[1597]+ userlastname+ _0xaf82[1598]+ userfirstname}else {if(searchSip!= null){detailed1= _0xaf82[1588]+ _0xaf82[1589]+ window[_0xaf82[1245]]+ _0xaf82[1590]+ _0xf2ddx208+ _0xaf82[1591]+ _0xf2ddx20b+ _0xaf82[1592]+ searchSip+ _0xaf82[1593]+ _0xf2ddx206+ _0xaf82[1599]+ _0xaf82[1594]+ _0xf2ddx111+ _0xaf82[1595]+ _0xf2ddx209+ _0xaf82[1596]+ window[_0xaf82[186]]+ _0xaf82[1597]+ userlastname+ _0xaf82[1598]+ userfirstname}else {detailed1= _0xaf82[1588]+ _0xaf82[1589]+ window[_0xaf82[1245]]+ _0xaf82[1590]+ _0xf2ddx208+ _0xaf82[1591]+ _0xf2ddx20b+ _0xaf82[1592]+ _0xf2ddx207+ _0xaf82[1593]+ _0xf2ddx206+ _0xaf82[1594]+ _0xf2ddx111+ _0xaf82[1595]+ _0xf2ddx209+ _0xaf82[1596]+ window[_0xaf82[186]]+ _0xaf82[1597]+ userlastname+ _0xaf82[1598]+ userfirstname}};$(_0xaf82[469])[_0xaf82[279]](_0xaf82[1600]+ detailed1+ _0xaf82[1601]);$(_0xaf82[1602])[_0xaf82[61]]();setTimeout(function(){if(window[_0xaf82[1603]]&& window[_0xaf82[1603]][_0xaf82[55]]($(_0xaf82[293])[_0xaf82[59]]())){for(var _0xf2ddx1f7=0;_0xf2ddx1f7< window[_0xaf82[1604]][_0xaf82[140]];_0xf2ddx1f7++){if($(_0xaf82[293])[_0xaf82[59]]()== window[_0xaf82[1604]][_0xf2ddx1f7][_0xaf82[144]]){core[_0xaf82[831]]($(_0xaf82[293])[_0xaf82[59]](),null,_0xaf82[1605]+ window[_0xaf82[1606]]+ window[_0xaf82[1604]][_0xf2ddx1f7][_0xaf82[1607]],null)}}}else {if(legendflags[_0xaf82[55]](LowerCase($(_0xaf82[293])[_0xaf82[59]]()))){core[_0xaf82[831]]($(_0xaf82[293])[_0xaf82[59]](),null,_0xaf82[1608]+ LowerCase($(_0xaf82[293])[_0xaf82[59]]())+ _0xaf82[1609],null)}}},1000);$(_0xaf82[1610])[_0xaf82[801]](_0xaf82[1159],function(){$(_0xaf82[1610])[_0xaf82[176]]()});return lastIP= $(_0xaf82[213])[_0xaf82[59]]()});$(_0xaf82[531])[_0xaf82[1300]]({title:_0xaf82[1611],placement:_0xaf82[677]});$(_0xaf82[209])[_0xaf82[208]](function(){var _0xf2ddx20e=!($(this)[_0xaf82[206]](_0xaf82[205])== _0xaf82[115]);if(_0xf2ddx20e){localStorage[_0xaf82[117]](_0xaf82[47],true);$(_0xaf82[1612])[_0xaf82[87]]();$(this)[_0xaf82[281]](_0xaf82[1613]+ Premadeletter43)}else {localStorage[_0xaf82[117]](_0xaf82[47],false);$(_0xaf82[1612])[_0xaf82[61]]();$(_0xaf82[1018])[_0xaf82[61]]();$(_0xaf82[1021])[_0xaf82[61]]();$(_0xaf82[1019])[_0xaf82[61]]();$(_0xaf82[1020])[_0xaf82[61]]();$(_0xaf82[1018])[_0xaf82[61]]();$(this)[_0xaf82[281]](_0xaf82[1613]+ Premadeletter42);return seticon= _0xaf82[99]}});$(_0xaf82[211])[_0xaf82[208]](function(){var _0xf2ddx20e=!($(this)[_0xaf82[206]](_0xaf82[205])== _0xaf82[115]);if(_0xf2ddx20e){localStorage[_0xaf82[117]](_0xaf82[48],true);$(_0xaf82[379])[_0xaf82[87]]();$(this)[_0xaf82[281]](_0xaf82[1614]+ Premadeletter45)}else {localStorage[_0xaf82[117]](_0xaf82[48],false);$(_0xaf82[379])[_0xaf82[61]]();$(this)[_0xaf82[281]](_0xaf82[1614]+ Premadeletter44)}});$(_0xaf82[210])[_0xaf82[208]](function(){var _0xf2ddx20e=!($(this)[_0xaf82[206]](_0xaf82[205])== _0xaf82[115]);if(_0xf2ddx20e){localStorage[_0xaf82[117]](_0xaf82[49],true);var _0xf2ddx165=document[_0xaf82[974]](_0xaf82[647])[0];$(_0xf2ddx165)[_0xaf82[279]](_0xaf82[975]+ _0xaf82[1615]+ _0xaf82[977]+ _0xaf82[978]+ _0xaf82[979]+ _0xaf82[980]+ _0xaf82[981]);$(this)[_0xaf82[281]](_0xaf82[1616]+ Premadeletter45b)}else {localStorage[_0xaf82[117]](_0xaf82[49],false);var _0xf2ddx165=document[_0xaf82[974]](_0xaf82[647])[0];$(_0xf2ddx165)[_0xaf82[279]](_0xaf82[975]+ _0xaf82[1617]+ _0xaf82[1618]+ _0xaf82[1619]+ _0xaf82[1620]+ _0xaf82[1621]+ _0xaf82[1622]);$(this)[_0xaf82[281]](_0xaf82[1616]+ Premadeletter45a)}});$(_0xaf82[1126])[_0xaf82[208]](function(){var _0xf2ddx20e=!($(this)[_0xaf82[206]](_0xaf82[205])== _0xaf82[115]);if(_0xf2ddx20e){localStorage[_0xaf82[117]](_0xaf82[50],true);var _0xf2ddx165=document[_0xaf82[974]](_0xaf82[647])[0];$(_0xf2ddx165)[_0xaf82[279]](_0xaf82[1623]+ _0xaf82[1624]+ $(_0xaf82[1625])[_0xaf82[59]]()+ _0xaf82[1626]+ _0xaf82[1627]+ $(_0xaf82[1625])[_0xaf82[59]]()+ _0xaf82[1626]+ _0xaf82[1628]+ $(_0xaf82[1625])[_0xaf82[59]]()+ _0xaf82[1626]+ _0xaf82[1629]+ $(_0xaf82[1625])[_0xaf82[59]]()+ _0xaf82[1626]+ _0xaf82[1627]+ $(_0xaf82[1625])[_0xaf82[59]]()+ _0xaf82[1626]+ _0xaf82[1630]+ $(_0xaf82[1625])[_0xaf82[59]]()+ _0xaf82[1626]+ _0xaf82[1631]+ $(_0xaf82[1625])[_0xaf82[59]]()+ _0xaf82[1626]+ _0xaf82[1632]+ _0xaf82[1633]+ _0xaf82[1634]+ _0xaf82[1635]);$(this)[_0xaf82[281]](_0xaf82[1616]+ Premadeletter47)}else {localStorage[_0xaf82[117]](_0xaf82[50],false);$(_0xaf82[1636])[_0xaf82[176]]();$(this)[_0xaf82[281]](_0xaf82[1637]+ Premadeletter46)}});$(_0xaf82[1127])[_0xaf82[208]](function(){var _0xf2ddx20e=!($(this)[_0xaf82[206]](_0xaf82[205])== _0xaf82[115]);if(_0xf2ddx20e){localStorage[_0xaf82[117]](_0xaf82[51],true);$(_0xaf82[1638])[_0xaf82[87]]();$(this)[_0xaf82[281]](_0xaf82[1639]+ Premadeletter51);TimerLM[_0xaf82[1079]]= document[_0xaf82[407]](_0xaf82[1640]);return TimerLM[_0xaf82[1079]]}else {localStorage[_0xaf82[117]](_0xaf82[51],false);$(_0xaf82[1638])[_0xaf82[61]]();$(this)[_0xaf82[281]](_0xaf82[1639]+ Premadeletter50)}});$(_0xaf82[531])[_0xaf82[208]](function(){var _0xf2ddx20e=!($(this)[_0xaf82[206]](_0xaf82[205])== _0xaf82[115]);if(_0xf2ddx20e){$(_0xaf82[1612])[_0xaf82[61]]();$(_0xaf82[379])[_0xaf82[61]]();$(_0xaf82[1641])[_0xaf82[61]]();$(_0xaf82[1090])[_0xaf82[61]]();$(_0xaf82[1088])[_0xaf82[61]]();$(_0xaf82[1642])[_0xaf82[61]]();$(_0xaf82[520])[_0xaf82[61]]();$(_0xaf82[1643])[_0xaf82[61]]();$(_0xaf82[1644])[_0xaf82[61]]();$(this)[_0xaf82[281]](_0xaf82[1645]+ Premadeletter48)}else {$(_0xaf82[1612])[_0xaf82[87]]();$(_0xaf82[379])[_0xaf82[87]]();$(_0xaf82[1090])[_0xaf82[87]]();$(_0xaf82[1088])[_0xaf82[87]]();$(_0xaf82[1642])[_0xaf82[87]]();$(_0xaf82[520])[_0xaf82[87]]();$(_0xaf82[1644])[_0xaf82[87]]();$(_0xaf82[1643])[_0xaf82[87]]();$(this)[_0xaf82[281]](_0xaf82[1645]+ Premadeletter49)}});$(_0xaf82[1647])[_0xaf82[208]](function(){$(_0xaf82[376])[_0xaf82[61]]();$(_0xaf82[377])[_0xaf82[61]]();$(_0xaf82[378])[_0xaf82[61]]();$(_0xaf82[379])[_0xaf82[61]]();$(_0xaf82[1646])[_0xaf82[87]]()});$(_0xaf82[81])[_0xaf82[281]](_0xaf82[1648]);$(_0xaf82[327])[_0xaf82[76]](_0xaf82[6]);$(_0xaf82[327])[_0xaf82[713]](_0xaf82[1649]+ modVersion+ semimodVersion+ _0xaf82[1650]+ _0xaf82[1651]);$(_0xaf82[1612])[_0xaf82[61]]();$(_0xaf82[379])[_0xaf82[61]]();$(_0xaf82[1641])[_0xaf82[61]]();$(_0xaf82[1638])[_0xaf82[61]]();$(_0xaf82[1652])[_0xaf82[76]](timesopened);LMserverbox();bluebtns();SNEZServers();$(_0xaf82[410])[_0xaf82[206]](_0xaf82[1482],_0xaf82[1483]);$(_0xaf82[1654])[_0xaf82[128]](_0xaf82[1653]+ Premadeletter109+ _0xaf82[172]);$(_0xaf82[1654])[_0xaf82[128]](_0xaf82[1655]+ Premadeletter109a+ _0xaf82[172]);if(document[_0xaf82[56]][_0xaf82[55]](_0xaf82[54])){$(_0xaf82[1654])[_0xaf82[130]](_0xaf82[1656]);if(localStorage[_0xaf82[3]](_0xaf82[112])!= _0xaf82[6]&& localStorage[_0xaf82[3]](_0xaf82[112])!= null&& localStorage[_0xaf82[3]](_0xaf82[112])!= _0xaf82[4]){userid= localStorage[_0xaf82[3]](_0xaf82[112]);$(_0xaf82[1223])[_0xaf82[59]](window[_0xaf82[112]])};$(_0xaf82[1223])[_0xaf82[1121]](function(){IdfromLegendmod()})};core[_0xaf82[709]]= function(){adres(null,$(_0xaf82[69])[_0xaf82[59]](),$(_0xaf82[60])[_0xaf82[59]]());pauseVideos()};$(_0xaf82[237])[_0xaf82[208]](function(){setTimeout(function(){adres(null,$(_0xaf82[69])[_0xaf82[59]](),$(_0xaf82[60])[_0xaf82[59]]())},100)});$(_0xaf82[69])[_0xaf82[57]](function(){setTimeout(function(){adres(null,$(_0xaf82[69])[_0xaf82[59]](),$(_0xaf82[60])[_0xaf82[59]]())},100)});$(_0xaf82[60])[_0xaf82[57]](function(){setTimeout(function(){adres(null,$(_0xaf82[69])[_0xaf82[59]](),$(_0xaf82[60])[_0xaf82[59]]())},100)});$(_0xaf82[295])[_0xaf82[208]](function(){adres(null,null,null)});$(_0xaf82[972])[_0xaf82[208]](function(){adres(null,null,null)});triggerLMbtns();languagemodfun();$(_0xaf82[1657])[_0xaf82[1300]]();$(_0xaf82[280])[_0xaf82[801]](_0xaf82[1658],_0xaf82[474],function(){MSGCOMMANDS= $(_0xaf82[474])[_0xaf82[76]]();MSGNICK= $(_0xaf82[1660])[_0xaf82[1659]]()[_0xaf82[76]]()[_0xaf82[168]](_0xaf82[273],_0xaf82[6]);MsgCommands1(MSGCOMMANDS,MSGNICK)});$(_0xaf82[280])[_0xaf82[801]](_0xaf82[1661],_0xaf82[597],function(){MSGCOMMANDS= $(_0xaf82[473])[_0xaf82[76]]();MSGNICK= $(_0xaf82[1660])[_0xaf82[1659]]()[_0xaf82[76]]()[_0xaf82[168]](_0xaf82[273],_0xaf82[6]);MsgCommands1(MSGCOMMANDS,MSGNICK)})}function joinSIPonstart(){setTimeout(function(){if(searchSip!= null){if(realmode!= null&& region!= null){$(_0xaf82[69])[_0xaf82[59]](realmode);if(region== _0xaf82[58]){deleteGamemode()}};if(getParameterByName(_0xaf82[92],url)[_0xaf82[168]](_0xaf82[212],_0xaf82[6])[_0xaf82[168]](_0xaf82[214],_0xaf82[6])!= $(_0xaf82[213])[_0xaf82[59]]()){joinSIPonstart1();joinSIPonstart2()}}else {if(url[_0xaf82[55]](_0xaf82[226])== true){$(_0xaf82[69])[_0xaf82[59]](_0xaf82[68]);realmodereturnfromStart();joinpartyfromconnect()}}},1000)}function joinSIPonstart2(){setTimeout(function(){if(getParameterByName(_0xaf82[92],url)[_0xaf82[168]](_0xaf82[212],_0xaf82[6])[_0xaf82[168]](_0xaf82[214],_0xaf82[6])!= $(_0xaf82[213])[_0xaf82[59]]()){joinSIPonstart1();joinSIPonstart3()}},1000)}function joinSIPonstart3(){setTimeout(function(){if(getParameterByName(_0xaf82[92],url)[_0xaf82[168]](_0xaf82[212],_0xaf82[6])[_0xaf82[168]](_0xaf82[214],_0xaf82[6])!= $(_0xaf82[213])[_0xaf82[59]]()){toastr[_0xaf82[173]](_0xaf82[1662])}},1500)}function joinSIPonstart1(){realmodereturnfromStart();$(_0xaf82[213])[_0xaf82[59]](getParameterByName(_0xaf82[92],url)[_0xaf82[168]](_0xaf82[212],_0xaf82[6])[_0xaf82[168]](_0xaf82[214],_0xaf82[6]));if(region!= null&& realmode!= null){currentIPopened= true;legendmod[_0xaf82[67]]= realmode};$(_0xaf82[295])[_0xaf82[208]]()}function joinPLAYERonstart(){setTimeout(function(){if(searchedplayer!= null){$(_0xaf82[969])[_0xaf82[59]](searchedplayer);getSNEZServers(_0xaf82[1663]);client2[_0xaf82[704]]();setTimeout(function(){if($(_0xaf82[1664])[_0xaf82[281]]()!= undefined){toastr[_0xaf82[157]](_0xaf82[1665]+ $(_0xaf82[1666])[_0xaf82[281]]()+ _0xaf82[1667]+ searchedplayer+ _0xaf82[1668]);$(_0xaf82[1664])[_0xaf82[208]]()}},1000)};if(autoplayplayer== _0xaf82[1161]){autoplayplaying();window[_0xaf82[1669]]= true}},1000)}function joinreplayURLonstart(){setTimeout(function(){if(replayURL){BeforeReplay();setTimeout(function(){loadReplayFromWeb(replayURL)},2000)}},1000)}function autoplayplaying(){$(_0xaf82[293])[_0xaf82[59]](_0xaf82[1670]);window[_0xaf82[1671]][_0xaf82[789]]= false;window[_0xaf82[1671]][_0xaf82[1672]]= false;window[_0xaf82[1671]][_0xaf82[1673]]= false;window[_0xaf82[1671]][_0xaf82[1674]]= false;window[_0xaf82[1671]][_0xaf82[1675]]= false;window[_0xaf82[1671]][_0xaf82[1676]]= false;window[_0xaf82[1671]][_0xaf82[1677]]= false;window[_0xaf82[1671]][_0xaf82[1678]]= false;window[_0xaf82[1671]][_0xaf82[1679]]= false;window[_0xaf82[1671]][_0xaf82[1680]]= false;window[_0xaf82[1671]][_0xaf82[1681]]= false;window[_0xaf82[1671]][_0xaf82[1682]]= false;window[_0xaf82[1671]][_0xaf82[1683]]= false;window[_0xaf82[1671]][_0xaf82[1684]]= false;window[_0xaf82[1671]][_0xaf82[1685]]= false;window[_0xaf82[1671]][_0xaf82[1686]]= false;window[_0xaf82[1671]][_0xaf82[1687]]= false;window[_0xaf82[1671]][_0xaf82[1688]]= false;defaultmapsettings[_0xaf82[877]]= false;window[_0xaf82[1671]][_0xaf82[1689]]= false;window[_0xaf82[1671]][_0xaf82[1690]]= false;window[_0xaf82[1671]][_0xaf82[1691]]= false;window[_0xaf82[1671]][_0xaf82[1692]]= false;window[_0xaf82[1671]][_0xaf82[1693]]= true;$(_0xaf82[74])[_0xaf82[208]]()}function joinSERVERfindinfo(){$(_0xaf82[961])[_0xaf82[281]](_0xaf82[6]);var _0xf2ddx217;setTimeout(function(){_0xf2ddx217= $(_0xaf82[213])[_0xaf82[59]]();if(_0xf2ddx217!= null){$(_0xaf82[969])[_0xaf82[59]](_0xf2ddx217);getSNEZServers(_0xaf82[1663]);client2[_0xaf82[704]]();setTimeout(function(){if($(_0xaf82[1664])[_0xaf82[281]]()!= undefined&& $(_0xaf82[1664])[_0xaf82[281]]()!= _0xaf82[6]){for(var _0xf2ddxd8=0;_0xf2ddxd8< $(_0xaf82[1664])[_0xaf82[140]];_0xf2ddxd8++){if($(_0xaf82[1666])[_0xaf82[1694]](_0xf2ddxd8)[_0xaf82[281]]()== $(_0xaf82[293])[_0xaf82[59]]()){$(_0xaf82[1664])[_0xaf82[1694]](_0xf2ddxd8)[_0xaf82[176]]()};if($(_0xaf82[1695])[_0xaf82[1694]](_0xf2ddxd8)[_0xaf82[281]]()== null|| $(_0xaf82[1695])[_0xaf82[1694]](_0xf2ddxd8)[_0xaf82[281]]()== _0xaf82[4]){$(_0xaf82[1664])[_0xaf82[1694]](_0xf2ddxd8)[_0xaf82[176]]()};if($(_0xaf82[1696])[_0xaf82[1694]](_0xf2ddxd8)[_0xaf82[281]]()== null|| $(_0xaf82[1696])[_0xaf82[1694]](_0xf2ddxd8)[_0xaf82[281]]()== _0xaf82[4]){$(_0xaf82[1664])[_0xaf82[1694]](_0xf2ddxd8)[_0xaf82[176]]()}};if($(_0xaf82[1664])[_0xaf82[281]]()!= undefined&& $(_0xaf82[1664])[_0xaf82[281]]()!= _0xaf82[6]){Regions= {};var _0xf2ddx145=0;$(_0xaf82[60])[_0xaf82[1698]](_0xaf82[1697])[_0xaf82[930]](function(){Regions[_0xf2ddx145]= $(this)[_0xaf82[59]]();_0xf2ddx145++});Modes= {};var _0xf2ddx144=0;$(_0xaf82[69])[_0xaf82[1698]](_0xaf82[1697])[_0xaf82[930]](function(){if($(this)[_0xaf82[59]]()== _0xaf82[261]|| $(this)[_0xaf82[59]]()== _0xaf82[1699]|| $(this)[_0xaf82[59]]()== _0xaf82[263]|| $(this)[_0xaf82[59]]()== _0xaf82[265]|| $(this)[_0xaf82[59]]()== _0xaf82[68]){Modes[_0xf2ddx144]= $(this)[_0xaf82[59]]();_0xf2ddx144++}});countRegions= new Array(8)[_0xaf82[921]](0);for(var _0xf2ddxd8=0;_0xf2ddxd8< $(_0xaf82[1664])[_0xaf82[140]];_0xf2ddxd8++){if($(_0xaf82[1695])[_0xaf82[1694]](_0xf2ddxd8)[_0xaf82[281]]()!= null&& $(_0xaf82[1695])[_0xaf82[1694]](_0xf2ddxd8)[_0xaf82[281]]()!= null){for(var _0xf2ddx143=0;_0xf2ddx143<= 8;_0xf2ddx143++){if($(_0xaf82[1695])[_0xaf82[1694]](_0xf2ddxd8)[_0xaf82[281]]()== Regions[_0xf2ddx143]){countRegions[_0xf2ddx143]++}}}};countModes= new Array(5)[_0xaf82[921]](0);for(var _0xf2ddxd8=0;_0xf2ddxd8< $(_0xaf82[1664])[_0xaf82[140]];_0xf2ddxd8++){if($(_0xaf82[1696])[_0xaf82[1694]](_0xf2ddxd8)[_0xaf82[281]]()!= null&& $(_0xaf82[1695])[_0xaf82[1694]](_0xf2ddxd8)[_0xaf82[281]]()!= null){for(var _0xf2ddx143=0;_0xf2ddx143< 5;_0xf2ddx143++){if($(_0xaf82[1696])[_0xaf82[1694]](_0xf2ddxd8)[_0xaf82[281]]()== Modes[_0xf2ddx143]){countModes[_0xf2ddx143]++}}}};var _0xf2ddx218=0;var _0xf2ddx219=0;var _0xf2ddx21a=0;var _0xf2ddx21b=0;var _0xf2ddx21c=_0xaf82[6];for(var _0xf2ddxd8=0;_0xf2ddxd8< countRegions[_0xaf82[140]];_0xf2ddxd8++){if(countRegions[_0xf2ddxd8]> 0){if(_0xf2ddxd8!= 0){_0xf2ddx21c= _0xf2ddx21c+ countRegions[_0xf2ddxd8]+ _0xaf82[1700]+ Regions[_0xf2ddxd8]+ _0xaf82[324];if(countRegions[_0xf2ddxd8]> _0xf2ddx218){_0xf2ddx218= countRegions[_0xf2ddxd8];_0xf2ddx21a= Regions[_0xf2ddxd8]}}}};for(var _0xf2ddxd8=-1;_0xf2ddxd8< countModes[_0xaf82[140]];_0xf2ddxd8++){if(countModes[_0xf2ddxd8]> 0){if(_0xf2ddxd8!= -1){_0xf2ddx21c= _0xf2ddx21c+ countModes[_0xf2ddxd8]+ _0xaf82[1701]+ Modes[_0xf2ddxd8]+ _0xaf82[324];if(countModes[_0xf2ddxd8]> _0xf2ddx219){_0xf2ddx219= countModes[_0xf2ddxd8];_0xf2ddx21b= Modes[_0xf2ddxd8]}}}};realmode= _0xf2ddx21b;region= _0xf2ddx21a;setTimeout(function(){if(_0xf2ddx21a!= 0&& _0xf2ddx21a!= null&& _0xf2ddx21b!= 0&& _0xf2ddx21b!= null){if(document[_0xaf82[56]][_0xaf82[55]](_0xaf82[54])){history[_0xaf82[220]](stateObj,_0xaf82[216],_0xaf82[217]+ currentIP)}else {if(legendmod[_0xaf82[215]]){history[_0xaf82[220]](stateObj,_0xaf82[216],_0xaf82[221]+ currentIP+ _0xaf82[218]+ _0xf2ddx21a+ _0xaf82[219]+ _0xf2ddx21b)}else {if(!legendmod[_0xaf82[215]]){history[_0xaf82[220]](stateObj,_0xaf82[216],_0xaf82[221]+ currentIP)}}}};ModeRegionregion()},1500);if($(_0xaf82[60])[_0xaf82[59]]()!= _0xf2ddx21a|| $(_0xaf82[69])[_0xaf82[59]]()!= _0xf2ddx21b){_0xf2ddx21c= _0xf2ddx21c+ _0xaf82[1702]+ _0xf2ddx21a+ _0xaf82[1703]+ _0xf2ddx21b+ _0xaf82[1704];_0xf2ddx21c= _0xf2ddx21c+ _0xaf82[1705];toastr[_0xaf82[157]](_0xf2ddx21c)[_0xaf82[73]](_0xaf82[71],_0xaf82[182]);if(_0xf2ddx21a!= 0&& _0xf2ddx21a!= null){$(_0xaf82[60])[_0xaf82[59]](_0xf2ddx21a);master[_0xaf82[1706]]= $(_0xaf82[60])[_0xaf82[59]]()};if(_0xf2ddx21b!= 0&& _0xf2ddx21b!= null){$(_0xaf82[69])[_0xaf82[59]](_0xf2ddx21b);master[_0xaf82[67]]= $(_0xaf82[69])[_0xaf82[59]]();legendmod[_0xaf82[67]]= master[_0xaf82[67]]}}}}},1500)}},100)}function ModeRegionregion(){realmode= $(_0xaf82[69])[_0xaf82[59]]();region= $(_0xaf82[60])[_0xaf82[59]]();return realmode,region}function ytFrame(){setTimeout(function(){if( typeof YT!== _0xaf82[938]){musicPlayer= new YT.Player(_0xaf82[1707],{events:{'\x6F\x6E\x53\x74\x61\x74\x65\x43\x68\x61\x6E\x67\x65':function(_0xf2ddx1e4){if(_0xf2ddx1e4[_0xaf82[1250]]== 1){$(_0xaf82[1543])[_0xaf82[247]](_0xaf82[1542])[_0xaf82[245]](_0xaf82[1541]);$(_0xaf82[544])[_0xaf82[206]](_0xaf82[986],Premadeletter60)[_0xaf82[1300]](_0xaf82[1544])}else {$(_0xaf82[1543])[_0xaf82[247]](_0xaf82[1541])[_0xaf82[245]](_0xaf82[1542]);$(_0xaf82[544])[_0xaf82[206]](_0xaf82[986],Premadeletter13)[_0xaf82[1300]](_0xaf82[1544])}}}})}},1500)}function BeforeSpecialDeals(){var _0xf2ddx220=document[_0xaf82[936]](_0xaf82[935]);_0xf2ddx220[_0xaf82[926]]= _0xaf82[937];_0xf2ddx220[_0xaf82[470]]= _0xaf82[1708];$(_0xaf82[280])[_0xaf82[279]](_0xf2ddx220)}function BeforeLegendmodShop(){var _0xf2ddx220=document[_0xaf82[936]](_0xaf82[935]);_0xf2ddx220[_0xaf82[926]]= _0xaf82[937];_0xf2ddx220[_0xaf82[470]]= _0xaf82[1709];$(_0xaf82[280])[_0xaf82[279]](_0xf2ddx220)}function BeforeReplay(){var _0xf2ddx223=document[_0xaf82[936]](_0xaf82[935]);_0xf2ddx223[_0xaf82[926]]= _0xaf82[937];_0xf2ddx223[_0xaf82[470]]= _0xaf82[1710];$(_0xaf82[280])[_0xaf82[279]](_0xf2ddx223)}function isEquivalent(_0xf2ddx8e,_0xf2ddx91){var _0xf2ddx225=Object[_0xaf82[1711]](_0xf2ddx8e);var _0xf2ddx226=Object[_0xaf82[1711]](_0xf2ddx91);if(_0xf2ddx225[_0xaf82[140]]!= _0xf2ddx226[_0xaf82[140]]){return false};for(var _0xf2ddxd8=0;_0xf2ddxd8< _0xf2ddx225[_0xaf82[140]];_0xf2ddxd8++){var _0xf2ddx227=_0xf2ddx225[_0xf2ddxd8];if(_0xf2ddx8e[_0xf2ddx227]!== _0xf2ddx91[_0xf2ddx227]){return false}};return true}function AgarVersionDestinations(){window[_0xaf82[1712]]= false;window[_0xaf82[1713]]= {};window[_0xaf82[1713]][Object[_0xaf82[833]](agarversionDestinations)[_0xaf82[140]]- 1]= window[_0xaf82[1606]];getSNEZ(_0xaf82[1224],_0xaf82[1714],_0xaf82[1715]);var _0xf2ddx229=JSON[_0xaf82[107]](xhttp[_0xaf82[1228]]);for(var _0xf2ddxd8=0;_0xf2ddxd8< Object[_0xaf82[833]](_0xf2ddx229)[_0xaf82[140]];_0xf2ddxd8++){if(_0xf2ddx229[_0xf2ddxd8]== window[_0xaf82[1606]]){window[_0xaf82[1712]]= true}};if(window[_0xaf82[1712]]== true){window[_0xaf82[1713]]= _0xf2ddx229;window[_0xaf82[1712]]= false}else {if(window[_0xaf82[1712]]== false&& isObject(_0xf2ddx229)){window[_0xaf82[1713]]= _0xf2ddx229;window[_0xaf82[1713]][Object[_0xaf82[833]](_0xf2ddx229)[_0xaf82[140]]]= window[_0xaf82[1606]];postSNEZ(_0xaf82[1224],_0xaf82[1714],_0xaf82[1715],JSON[_0xaf82[415]](window[_0xaf82[1713]]))}}}function isObject(_0xf2ddx22b){if(_0xf2ddx22b=== null){return false};return (( typeof _0xf2ddx22b=== _0xaf82[1716])|| ( typeof _0xf2ddx22b=== _0xaf82[1717]))}function LegendModServerConnect(){}function UIDcontroller(){PremiumUsers();AgarBannedUIDs();var _0xf2ddx22e=localStorage[_0xaf82[3]](_0xaf82[1718]);if(bannedUserUIDs[_0xaf82[55]](window[_0xaf82[186]])|| _0xf2ddx22e== _0xaf82[115]){localStorage[_0xaf82[117]](_0xaf82[1718],true);document[_0xaf82[204]][_0xaf82[203]]= _0xaf82[6];window[_0xaf82[934]][_0xaf82[117]](_0xaf82[1719],defaultSettings[_0xaf82[1720]]);toastr[_0xaf82[173]](_0xaf82[199]+ Premadeletter123+ _0xaf82[200]+ _0xaf82[1721]+ _0xaf82[1722]+ _0xaf82[1723])[_0xaf82[73]](_0xaf82[71],_0xaf82[182])}}function AgarBannedUIDs(){getSNEZ(_0xaf82[1224],_0xaf82[1724],_0xaf82[1725]);var _0xf2ddx230=JSON[_0xaf82[107]](xhttp[_0xaf82[1228]]);for(var _0xf2ddxd8=0;_0xf2ddxd8< Object[_0xaf82[833]](_0xf2ddx230)[_0xaf82[140]];_0xf2ddxd8++){if(window[_0xaf82[1726]]){_0xf2ddx230[_0xf2ddxd8][_0xaf82[190]](_0xaf82[189])[0];if(!bannedUserUIDs[_0xaf82[55]](_0xf2ddx230[_0xf2ddxd8])){window[_0xaf82[1726]][_0xaf82[885]](_0xf2ddx230[_0xf2ddxd8])}}};window[_0xaf82[1727]]= true}function AddAgarBannedUIDs(_0xf2ddx232){if(window[_0xaf82[1726]]&& window[_0xaf82[1727]]){if(!window[_0xaf82[1726]][_0xaf82[55]](_0xf2ddx232)&& _0xf2ddx232!= null && _0xf2ddx232!= _0xaf82[6] && window[_0xaf82[186]][_0xaf82[55]](_0xaf82[1728])){window[_0xaf82[1726]][window[_0xaf82[1726]][_0xaf82[140]]]= _0xf2ddx232;postSNEZ(_0xaf82[1224],_0xaf82[1724],_0xaf82[1725],JSON[_0xaf82[415]](window[_0xaf82[1726]]))}}}function RemoveAgarBannedUIDs(_0xf2ddx232){if(window[_0xaf82[1726]]&& window[_0xaf82[1727]]){if(_0xf2ddx232!= null){for(var _0xf2ddxd8=bannedUserUIDs[_0xaf82[140]]- 1;_0xf2ddxd8>= 0;_0xf2ddxd8--){if(bannedUserUIDs[_0xf2ddxd8]=== _0xf2ddx232){bannedUserUIDs[_0xaf82[1729]](_0xf2ddxd8,1)}};postSNEZ(_0xaf82[1224],_0xaf82[1724],_0xaf82[1725],JSON[_0xaf82[415]](window[_0xaf82[1726]]))}}}function BannedUIDS(){if(AdminRights== 1){if(window[_0xaf82[1727]]){$(_0xaf82[527])[_0xaf82[130]](_0xaf82[1730]+ _0xaf82[1731]+ _0xaf82[1732]+ _0xaf82[1733]+ _0xaf82[1734]+ Premadeletter113+ _0xaf82[1735]+ Premadeletter113+ _0xaf82[1736]+ _0xaf82[1737]+ _0xaf82[1738]+ _0xaf82[1739]+ _0xaf82[652]+ _0xaf82[1740]+ _0xaf82[1741]+ _0xaf82[1742]+ _0xaf82[1743]+ _0xaf82[1744]+ _0xaf82[1745]+ _0xaf82[1746]+ _0xaf82[1747]+ _0xaf82[1748]+ _0xaf82[1749]+ _0xaf82[324]+ _0xaf82[1750]+ _0xaf82[1751]+ _0xaf82[1752]+ window[_0xaf82[186]]+ _0xaf82[1753]+ _0xaf82[652]+ _0xaf82[652]+ _0xaf82[652]+ _0xaf82[652]);populateBanListConfig();$(_0xaf82[1755])[_0xaf82[208]](function(){$(_0xaf82[1754])[_0xaf82[176]]()});$(_0xaf82[1757])[_0xaf82[208]](function(){window[_0xaf82[119]](_0xaf82[1756],_0xaf82[486])});$(_0xaf82[1764])[_0xaf82[208]](function(){var _0xf2ddx9d=$(_0xaf82[1758])[_0xaf82[59]]();if(!bannedUserUIDs[_0xaf82[55]](_0xf2ddx9d)&& _0xf2ddx9d!= null && _0xf2ddx9d!= _0xaf82[6] && _0xf2ddx9d[_0xaf82[55]](_0xaf82[1728])){AddAgarBannedUIDs(_0xf2ddx9d);bannedUserUIDs[_0xaf82[885]](_0xf2ddx9d);var _0xf2ddx235=document[_0xaf82[936]](_0xaf82[1697]);_0xf2ddx235[_0xaf82[76]]= _0xf2ddx9d;document[_0xaf82[407]](_0xaf82[1760])[_0xaf82[1759]][_0xaf82[823]](_0xf2ddx235);toastr[_0xaf82[157]](_0xaf82[199]+ Premadeletter123+ _0xaf82[200]+ _0xaf82[1761]+ _0xf2ddx9d+ _0xaf82[1762])}else {toastr[_0xaf82[157]](_0xaf82[199]+ Premadeletter123+ _0xaf82[200]+ _0xaf82[1761]+ _0xf2ddx9d+ _0xaf82[1763])}});$(_0xaf82[1768])[_0xaf82[208]](function(){var _0xf2ddx9d=$(_0xaf82[1765])[_0xaf82[59]]();var _0xf2ddxe2=document[_0xaf82[407]](_0xaf82[1760]);_0xf2ddxe2[_0xaf82[176]](_0xf2ddxe2[_0xaf82[1766]]);RemoveAgarBannedUIDs(_0xf2ddx9d);toastr[_0xaf82[157]](_0xaf82[199]+ Premadeletter123+ _0xaf82[200]+ _0xaf82[1761]+ _0xf2ddx9d+ _0xaf82[1767])})}else {toastr[_0xaf82[157]](_0xaf82[199]+ Premadeletter123+ _0xaf82[200]+ _0xaf82[1769])}}else {toastr[_0xaf82[157]](_0xaf82[199]+ Premadeletter123+ _0xaf82[200]+ _0xaf82[1770])}}function populateBanListConfig(){var _0xf2ddx237=document[_0xaf82[407]](_0xaf82[1760]);for(i= 0;i< Object[_0xaf82[833]](window[_0xaf82[1726]])[_0xaf82[140]];i++){_0xf2ddx237[_0xaf82[1759]][_0xf2ddx237[_0xaf82[1759]][_0xaf82[140]]]= new Option(window[_0xaf82[1726]][i])}}function findUserLang(){if(window[_0xaf82[1772]][_0xaf82[1771]]){if(window[_0xaf82[1772]][_0xaf82[1771]][0]&& (window[_0xaf82[1772]][_0xaf82[1771]][0]== _0xaf82[1773]|| window[_0xaf82[1772]][_0xaf82[1771]][1][_0xaf82[55]](_0xaf82[1728]))){if(window[_0xaf82[1772]][_0xaf82[1771]][1]&& (window[_0xaf82[1772]][_0xaf82[1771]][1]== _0xaf82[1773]|| window[_0xaf82[1772]][_0xaf82[1771]][1][_0xaf82[55]](_0xaf82[1728]))){if(window[_0xaf82[1772]][_0xaf82[1771]][2]&& (window[_0xaf82[1772]][_0xaf82[1771]][2]== _0xaf82[1773]|| window[_0xaf82[1772]][_0xaf82[1771]][2][_0xaf82[55]](_0xaf82[1728]))){if(window[_0xaf82[1772]][_0xaf82[1771]][3]&& !(window[_0xaf82[1772]][_0xaf82[1771]][2]== _0xaf82[1773]|| window[_0xaf82[1772]][_0xaf82[1771]][2][_0xaf82[55]](_0xaf82[1728]))){window[_0xaf82[1]]= window[_0xaf82[1772]][_0xaf82[1771]][3]}}else {window[_0xaf82[1]]= window[_0xaf82[1772]][_0xaf82[1771]][2]}}else {window[_0xaf82[1]]= window[_0xaf82[1772]][_0xaf82[1771]][1]}}else {window[_0xaf82[1]]= window[_0xaf82[1772]][_0xaf82[1771]][0]}}}function startTranslating(){var _0xf2ddx23a=document[_0xaf82[396]](_0xaf82[597]);var _0xf2ddx23b={childList:true,attributes:false,subtree:false};var _0xf2ddx23c= new MutationObserver(_0xf2ddx23d);function _0xf2ddx23d(_0xf2ddx23e,_0xf2ddx23c){_0xf2ddx23e[_0xaf82[832]]((_0xf2ddx1d1)=>{if(defaultmapsettings[_0xaf82[1774]]&& _0xf2ddx23a[_0xaf82[1777]][_0xaf82[1776]][_0xaf82[1775]](_0xaf82[835])&& !_0xf2ddx23a[_0xaf82[1777]][_0xaf82[1776]][_0xaf82[1775]](_0xaf82[811])){doMainTranslation(_0xf2ddx23a,_0xf2ddx23a[_0xaf82[1777]][_0xaf82[1777]][_0xaf82[1779]][_0xaf82[1778]])}})}_0xf2ddx23c[_0xaf82[1210]](_0xf2ddx23a,_0xf2ddx23b)}function doMainTranslation(_0xf2ddx23a,_0xf2ddx240){var _0xf2ddx241=document[_0xaf82[936]](_0xaf82[1052]);var _0xf2ddx242;_0xf2ddx241[_0xaf82[1045]][_0xaf82[662]]= _0xaf82[1780];_0xf2ddx241[_0xaf82[1045]][_0xaf82[1781]]= _0xaf82[1782];var _0xf2ddx243= new XMLHttpRequest();_0xf2ddx243[_0xaf82[119]](_0xaf82[1783],_0xaf82[1784]+ encodeURIComponent(_0xf2ddx240)+ _0xaf82[1785]+ window[_0xaf82[1]]+ _0xaf82[1786],true);_0xf2ddx243[_0xaf82[1787]]= function(){if(_0xf2ddx243[_0xaf82[1248]]== 4){if(_0xf2ddx243[_0xaf82[1788]]== 200){var _0xf2ddxfe=_0xf2ddx243[_0xaf82[1789]];_0xf2ddxfe= JSON[_0xaf82[107]](_0xf2ddxfe);_0xf2ddxfe= _0xf2ddxfe[_0xaf82[76]][0];_0xf2ddx241[_0xaf82[1778]]= _0xaf82[907]+ _0xf2ddxfe+ _0xaf82[909];_0xf2ddx242= _0xaf82[907]+ _0xf2ddxfe+ _0xaf82[909]}}};_0xf2ddx243[_0xaf82[123]]();_0xf2ddx23a[_0xaf82[1777]][_0xaf82[1777]][_0xaf82[940]](_0xf2ddx241)}function changeFrameWork(){if($(_0xaf82[1345])[_0xaf82[59]]()== _0xaf82[116]){defaultmapsettings[_0xaf82[1331]]= false}else {if($(_0xaf82[1345])[_0xaf82[59]]()== _0xaf82[115]){defaultmapsettings[_0xaf82[1331]]= true}else {if($(_0xaf82[1345])[_0xaf82[59]]()== 2){defaultmapsettings[_0xaf82[1331]]= 2}else {if($(_0xaf82[1345])[_0xaf82[59]]()== 4){defaultmapsettings[_0xaf82[1331]]= 4}else {if($(_0xaf82[1345])[_0xaf82[59]]()== 8){defaultmapsettings[_0xaf82[1331]]= 8}else {if($(_0xaf82[1345])[_0xaf82[59]]()== 16){defaultmapsettings[_0xaf82[1331]]= 16}else {if($(_0xaf82[1345])[_0xaf82[59]]()== 32){defaultmapsettings[_0xaf82[1331]]= 32}else {if($(_0xaf82[1345])[_0xaf82[59]]()== 64){defaultmapsettings[_0xaf82[1331]]= 64}else {if($(_0xaf82[1345])[_0xaf82[59]]()== _0xaf82[1790]){defaultmapsettings[_0xaf82[1331]]= _0xaf82[1790]}else {if($(_0xaf82[1345])[_0xaf82[59]]()== _0xaf82[1791]){defaultmapsettings[_0xaf82[1331]]= _0xaf82[1791]}}}}}}}}}};application[_0xaf82[1793]](defaultmapsettings,_0xaf82[1792])}function changeFrameWorkStart(){if(defaultmapsettings[_0xaf82[1331]]== true){setTimeout(function(){$(_0xaf82[1345])[_0xaf82[59]](_0xaf82[115])},10)};if(defaultmapsettings[_0xaf82[1331]]){$(_0xaf82[1345])[_0xaf82[59]](defaultmapsettings[_0xaf82[1331]])}else {if(defaultmapsettings[_0xaf82[1331]]== false){$(_0xaf82[1345])[_0xaf82[59]](_0xaf82[116])}}}function LMrewardDay(){$(_0xaf82[527])[_0xaf82[130]](_0xaf82[1794]+ _0xaf82[1731]+ _0xaf82[1795]+ _0xaf82[1733]+ _0xaf82[1796]+ Premadeletter113+ _0xaf82[1797]+ Premadeletter113+ _0xaf82[1736]+ _0xaf82[1737]+ _0xaf82[1798]+ _0xaf82[1739]+ _0xaf82[652]+ _0xaf82[1799]+ _0xaf82[652]+ _0xaf82[652]+ _0xaf82[652]+ _0xaf82[652]);$(_0xaf82[1800])[_0xaf82[695]]();$(_0xaf82[1802])[_0xaf82[208]](function(){$(_0xaf82[1801])[_0xaf82[176]]()});$(_0xaf82[1804])[_0xaf82[208]](function(){window[_0xaf82[119]](_0xaf82[1803],_0xaf82[486])})}function VideoSkinsPromo(){$(_0xaf82[527])[_0xaf82[130]](_0xaf82[1794]+ _0xaf82[1731]+ _0xaf82[1795]+ _0xaf82[1733]+ _0xaf82[1796]+ Premadeletter113+ _0xaf82[1797]+ Premadeletter113+ _0xaf82[1736]+ _0xaf82[1737]+ _0xaf82[1805]+ _0xaf82[1739]+ _0xaf82[652]+ _0xaf82[1806]+ _0xaf82[652]+ _0xaf82[652]+ _0xaf82[652]+ _0xaf82[652]);$(_0xaf82[1800])[_0xaf82[695]]();$(_0xaf82[1802])[_0xaf82[208]](function(){$(_0xaf82[1801])[_0xaf82[176]]()});$(_0xaf82[1804])[_0xaf82[208]](function(){window[_0xaf82[119]](_0xaf82[1803],_0xaf82[486])})}Premadeletter39= _0xaf82[1807];function adminstuff(){defaultSettings[_0xaf82[1720]]= _0xaf82[1808];window[_0xaf82[934]][_0xaf82[117]](_0xaf82[1809],JSON[_0xaf82[415]](defaultSettings));var legbgpic=$(_0xaf82[103])[_0xaf82[59]]();var legbgcolor=$(_0xaf82[102])[_0xaf82[59]]();$(_0xaf82[327])[_0xaf82[130]](_0xaf82[1810]+ legbgpic+ _0xaf82[305]+ legbgcolor+ _0xaf82[1811]+ _0xaf82[1812]+ _0xaf82[1813]+ _0xaf82[1814]+ _0xaf82[1815]+ _0xaf82[1816]+ _0xaf82[1817]+ _0xaf82[326]);$(_0xaf82[1819])[_0xaf82[130]](_0xaf82[1818]);$(_0xaf82[1820])[_0xaf82[59]](_0xaf82[549]);if(localStorage[_0xaf82[3]](_0xaf82[1821])&& localStorage[_0xaf82[3]](_0xaf82[1821])!= _0xaf82[6]){$(_0xaf82[1820])[_0xaf82[59]](localStorage[_0xaf82[3]](_0xaf82[1821]))};$(_0xaf82[1823])[_0xaf82[59]](localStorage[_0xaf82[3]](_0xaf82[1822]));$(_0xaf82[1820])[_0xaf82[1121]](function(){AdminClanSymbol= $(_0xaf82[1820])[_0xaf82[59]]();localStorage[_0xaf82[117]](_0xaf82[1821],AdminClanSymbol)});$(_0xaf82[1823])[_0xaf82[1121]](function(){AdminPassword= $(_0xaf82[1823])[_0xaf82[59]]();if($(_0xaf82[1820])[_0xaf82[59]]()!= _0xaf82[6]){if(AdminPassword== atob(_0xaf82[1824])){localStorage[_0xaf82[117]](_0xaf82[1822],AdminPassword);toastr[_0xaf82[184]](_0xaf82[1825]+ document[_0xaf82[407]](_0xaf82[372])[_0xaf82[405]]+ _0xaf82[1826]);$(_0xaf82[376])[_0xaf82[87]]();$(_0xaf82[377])[_0xaf82[87]]();$(_0xaf82[378])[_0xaf82[87]]();$(_0xaf82[379])[_0xaf82[87]]();$(_0xaf82[1827])[_0xaf82[61]]();$(_0xaf82[1088])[_0xaf82[713]](_0xaf82[1828]+ _0xaf82[1829]+ _0xaf82[1830]+ _0xaf82[1831]+ _0xaf82[1832]+ _0xaf82[1833]+ _0xaf82[652]);return AdminRights= 1}else {toastr[_0xaf82[157]](_0xaf82[199]+ Premadeletter123+ _0xaf82[200]+ _0xaf82[1834])}}else {toastr[_0xaf82[157]](_0xaf82[199]+ Premadeletter123+ _0xaf82[200]+ _0xaf82[1835])}});$(_0xaf82[293])[_0xaf82[1121]](function(){if($(_0xaf82[1837])[_0xaf82[596]](_0xaf82[1836])|| $(_0xaf82[1837])[_0xaf82[140]]== 0){if($(_0xaf82[293])[_0xaf82[59]]()== _0xaf82[1838]|| $(_0xaf82[293])[_0xaf82[59]]()== _0xaf82[1839]|| $(_0xaf82[293])[_0xaf82[59]]()== _0xaf82[1840]|| $(_0xaf82[293])[_0xaf82[59]]()== _0xaf82[1841]){$(_0xaf82[376])[_0xaf82[61]]();$(_0xaf82[377])[_0xaf82[61]]();$(_0xaf82[378])[_0xaf82[61]]();$(_0xaf82[379])[_0xaf82[61]]();$(_0xaf82[1827])[_0xaf82[87]]()}}});if($(_0xaf82[1823])[_0xaf82[59]]()== _0xaf82[1842]){$(_0xaf82[1823])[_0xaf82[1121]]()}}function banlistLM(){BannedUIDS()}function disconnect2min(){if(AdminRights== 1){commandMsg= _0xaf82[551];otherMsg= _0xaf82[6];dosendadmincommand();toastr[_0xaf82[157]](_0xaf82[199]+ Premadeletter123+ _0xaf82[200]+ _0xaf82[1843])}}function disconnectnow(){if(AdminRights== 1){commandMsg= _0xaf82[552];otherMsg= _0xaf82[6];dosendadmincommand();toastr[_0xaf82[157]](_0xaf82[199]+ Premadeletter123+ _0xaf82[200]+ _0xaf82[1844])}}function showstatsphp(){window[_0xaf82[119]](_0xaf82[1845],_0xaf82[486])}function showstatsphp2(){window[_0xaf82[119]](_0xaf82[1846],_0xaf82[486])}function dosendadmincommand(){if(AdminRights== 1){if($(_0xaf82[524])[_0xaf82[73]](_0xaf82[523])== _0xaf82[525]){KeyEvent[_0xaf82[1847]](13,13)};setTimeout(function(){$(_0xaf82[693])[_0xaf82[59]](_0xaf82[1848]+ otherMsg+ _0xaf82[1041]+ commandMsg);KeyEvent[_0xaf82[1847]](13,13);if($(_0xaf82[693])[_0xaf82[73]](_0xaf82[523])== _0xaf82[732]){KeyEvent[_0xaf82[1847]](13,13)};if($(_0xaf82[524])[_0xaf82[73]](_0xaf82[523])== _0xaf82[732]){KeyEvent[_0xaf82[1847]](13,13)}},100)}else {toastr[_0xaf82[157]](_0xaf82[199]+ Premadeletter123+ _0xaf82[200]+ _0xaf82[1849])}}function administrationtools(){$(_0xaf82[376])[_0xaf82[87]]();$(_0xaf82[377])[_0xaf82[87]]();$(_0xaf82[378])[_0xaf82[87]]();$(_0xaf82[379])[_0xaf82[87]]();$(_0xaf82[1827])[_0xaf82[61]]()}function LMadvertisementMegaFFA(){$(_0xaf82[527])[_0xaf82[130]](_0xaf82[1794]+ _0xaf82[1731]+ _0xaf82[1850]+ _0xaf82[1733]+ _0xaf82[1796]+ Premadeletter113+ _0xaf82[1797]+ Premadeletter113+ _0xaf82[1736]+ _0xaf82[1737]+ _0xaf82[1851]+ _0xaf82[1739]+ _0xaf82[652]+ _0xaf82[1852]+ _0xaf82[652]+ _0xaf82[652]+ _0xaf82[652]+ _0xaf82[652]);$(_0xaf82[1800])[_0xaf82[695]]();$(_0xaf82[1802])[_0xaf82[208]](function(){$(_0xaf82[1801])[_0xaf82[176]]()});$(_0xaf82[1804])[_0xaf82[208]](function(){window[_0xaf82[119]](_0xaf82[1803],_0xaf82[486])})}
| LMexpress/LMexpress.js | /*************
* LEGEND mod Express v1, by Jimboy3100 email:[email protected]
* Main Script
* Semiversion 23.90
*************/
var _0x7c78=["\x31\x30","\x75\x73\x65\x72\x4C\x61\x6E\x67\x75\x61\x67\x65","\x70\x72\x6F\x4C\x69\x63\x65\x6E\x63\x65\x55\x49\x44","\x67\x65\x74\x49\x74\x65\x6D","\x6E\x75\x6C\x6C","\x30\x2E\x30\x2E\x30\x2E\x30\x3A\x30","","\x67\x61\x6D\x65\x6D\x6F\x64\x65","\x63\x68\x65\x63\x6B\x6F\x6E\x6C\x79\x6F\x6E\x63\x65","\x63\x68\x65\x63\x6B\x6F\x6E\x6C\x79\x74\x77\x65\x6C\x76\x74\x68","\x63\x68\x65\x63\x6B\x6F\x6E\x6C\x79\x65\x6C\x65\x76\x65\x6E\x74\x68","\x63\x68\x65\x63\x6B\x6F\x6E\x6C\x79\x72\x65\x77\x61\x72\x64\x64\x61\x79\x31","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x77\x77\x77\x2E\x79\x6F\x75\x74\x75\x62\x65\x2E\x63\x6F\x6D\x2F\x77\x61\x74\x63\x68\x3F\x76\x3D\x5A\x4A\x58\x50\x4F\x4E\x76\x34\x31\x6A\x77","\x62\x61\x72","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x69\x2E\x69\x6D\x67\x75\x72\x2E\x63\x6F\x6D\x2F\x52\x56\x42\x69\x33\x54\x31\x2E\x67\x69\x66","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x69\x2E\x69\x6D\x67\x75\x72\x2E\x63\x6F\x6D\x2F\x70\x32\x54\x32\x39\x51\x45\x2E\x67\x69\x66","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x69\x2E\x69\x6D\x67\x75\x72\x2E\x63\x6F\x6D\x2F\x45\x75\x63\x49\x66\x59\x59\x2E\x67\x69\x66","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x69\x2E\x69\x6D\x67\x75\x72\x2E\x63\x6F\x6D\x2F\x4B\x4F\x6F\x42\x44\x61\x4B\x2E\x67\x69\x66","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x69\x2E\x69\x6D\x67\x75\x72\x2E\x63\x6F\x6D\x2F\x43\x53\x30\x33\x78\x57\x76\x2E\x67\x69\x66","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x69\x2E\x69\x6D\x67\x75\x72\x2E\x63\x6F\x6D\x2F\x74\x66\x4D\x55\x75\x32\x4A\x2E\x67\x69\x66","\x42\x61\x64\x20\x43\x68\x6F\x69\x63\x65\x21","\x57\x68\x79\x3F","\x59\x6F\x77\x21\x21","\x44\x65\x61\x74\x68\x21","\x52\x65\x6C\x61\x78\x21","\x4C\x65\x67\x65\x6E\x64\x20\x4D\x6F\x64\x21","\x64\x51\x77\x34\x77\x39\x57\x67\x58\x63\x51","\x62\x74\x50\x4A\x50\x46\x6E\x65\x73\x56\x34","\x55\x44\x2D\x4D\x6B\x69\x68\x6E\x4F\x58\x67","\x76\x70\x6F\x71\x57\x73\x36\x42\x75\x49\x59","\x56\x55\x76\x66\x6E\x35\x2D\x42\x4C\x4D\x38","\x43\x6E\x49\x66\x4E\x53\x70\x43\x66\x37\x30","\x52\x69\x63\x6B\x20\x41\x73\x74\x6C\x65\x79\x20\x2D\x20\x4E\x65\x76\x65\x72\x20\x47\x6F\x6E\x6E\x61\x20\x47\x69\x76\x65\x20\x59\x6F\x75\x20\x55\x70","\x53\x75\x72\x76\x69\x76\x6F\x72\x20\x2D\x20\x45\x79\x65\x20\x4F\x66\x20\x54\x68\x65\x20\x54\x69\x67\x65\x72","\x4C\x69\x6F\x6E\x20\x6B\x69\x6E\x67\x20\x2D\x20\x54\x68\x65\x20\x4C\x69\x6F\x6E\x20\x53\x6C\x65\x65\x70\x73\x20\x54\x6F\x6E\x69\x67\x68\x74","\x41\x67\x61\x72\x69\x6F\x20\x2D\x20\x4A\x75\x6D\x62\x6F\x20\x53\x6F\x6C\x6F\x20\x76\x73\x20\x54\x65\x61\x6D\x73","\x41\x67\x61\x72\x69\x6F\x20\x2D\x20\x4B\x69\x6C\x6C\x33\x72\x20\x76\x73\x20\x54\x65\x61\x6D\x73","\x50\x72\x6F\x6D\x6F\x74\x69\x6F\x6E\x61\x6C","\x6C\x61\x73\x74\x49\x50","\x70\x72\x65\x76\x69\x6F\x75\x73\x6E\x69\x63\x6B\x6E\x61\x6D\x65","\x6D\x69\x6E\x62\x74\x65\x78\x74","\x6C\x65\x61\x64\x62\x74\x65\x78\x74","\x74\x65\x61\x6D\x62\x74\x65\x78\x74","\x69\x6D\x67\x55\x72\x6C","\x69\x6D\x67\x48\x72\x65\x66","\x73\x68\x6F\x77\x54\x4B","\x73\x68\x6F\x77\x50\x6C\x61\x79\x65\x72","\x53\x48\x4F\x53\x48\x4F\x42\x74\x6E","\x58\x50\x42\x74\x6E","\x4D\x41\x49\x4E\x42\x54\x42\x74\x6E","\x41\x6E\x69\x6D\x61\x74\x65\x64\x53\x6B\x69\x6E\x42\x74\x6E","\x54\x49\x4D\x45\x63\x61\x6C\x42\x74\x6E","\x74\x69\x6D\x65\x73\x6F\x70\x65\x6E\x65\x64","\x75\x72\x6C","\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C","\x69\x6E\x63\x6C\x75\x64\x65\x73","\x55\x52\x4C","\x63\x68\x61\x6E\x67\x65","\x50\x72\x69\x76\x61\x74\x65","\x76\x61\x6C","\x23\x72\x65\x67\x69\x6F\x6E","\x68\x69\x64\x65","\x31\x2E\x38","\x63\x6C\x61\x73\x73\x4E\x61\x6D\x65","\x63\x68\x69\x6C\x64\x72\x65\x6E","\x2E\x62\x74\x6E\x2E\x62\x74\x6E\x2D\x77\x61\x72\x6E\x69\x6E\x67\x2E\x62\x74\x6E\x2D\x73\x70\x65\x63\x74\x61\x74\x65\x2E\x62\x74\x6E\x2D\x6E\x65\x65\x64\x73\x2D\x73\x65\x72\x76\x65\x72","\x6F\x67\x69\x63\x6F\x6E\x2D\x65\x79\x65","\x67\x61\x6D\x65\x4D\x6F\x64\x65","\x3A\x70\x61\x72\x74\x79","\x23\x67\x61\x6D\x65\x6D\x6F\x64\x65","\x2E\x62\x74\x6E\x2E\x62\x74\x6E\x2D\x77\x61\x72\x6E\x69\x6E\x67\x2E\x62\x74\x6E\x2D\x6C\x6F\x67\x69\x6E\x2D\x70\x6C\x61\x79\x2E\x62\x74\x6E\x2D\x6E\x65\x65\x64\x73\x2D\x73\x65\x72\x76\x65\x72","\x77\x69\x64\x74\x68","\x31\x30\x30\x25","\x63\x73\x73","\x2E\x62\x74\x6E\x2E\x62\x74\x6E\x2D\x70\x6C\x61\x79\x2D\x67\x75\x65\x73\x74\x2E\x62\x74\x6E\x2D\x73\x75\x63\x63\x65\x73\x73\x2E\x62\x74\x6E\x2D\x6E\x65\x65\x64\x73\x2D\x73\x65\x72\x76\x65\x72","\x50\x6C\x61\x79","\x74\x65\x78\x74","\x23\x6F\x67\x61\x72\x69\x6F\x2D\x70\x61\x72\x74\x79","\x23\x6F\x70\x65\x6E\x73\x6B\x69\x6E\x63\x68\x61\x6E\x67\x65\x72","\x2E\x71\x75\x69\x63\x6B\x2E\x71\x75\x69\x63\x6B\x2D\x62\x6F\x74\x73\x2E\x6F\x67\x69\x63\x6F\x6E\x2D\x74\x72\x6F\x70\x68\x79","\x2E\x61\x67\x61\x72\x69\x6F\x2D\x70\x61\x6E\x65\x6C\x2E\x72\x61\x64\x69\x6F\x2D\x70\x61\x6E\x65\x6C","\x2E\x61\x67\x61\x72\x69\x6F\x2D\x70\x61\x6E\x65\x6C\x2E\x6F\x67\x61\x72\x69\x6F\x2D\x79\x74\x2D\x70\x61\x6E\x65\x6C","\x2E\x70\x72\x6F\x66\x69\x6C\x65\x2D\x74\x61\x62","\x31\x36\x2E\x36\x25","\x2E\x6D\x65\x6E\x75\x2D\x74\x61\x62\x73","\x37\x30\x25","\x38\x37\x25","\x73\x68\x6F\x77","\x23\x68\x6F\x74\x6B\x65\x79\x73\x2D\x63\x66\x67","\x72","\x6D","\x73\x65\x61\x72\x63\x68","\x73\x69\x70","\x70\x61\x73\x73","\x70\x6C\x61\x79\x65\x72","\x61\x75\x74\x6F\x70\x6C\x61\x79\x65\x72","\x72\x65\x70\x6C\x61\x79","\x72\x65\x70\x6C\x61\x79\x53\x74\x61\x72\x74","\x72\x65\x70\x6C\x61\x79\x45\x6E\x64","\x59\x45\x53","\x4E\x4F","\x30","\x23\x6D\x65\x6E\x75\x50\x61\x6E\x65\x6C\x43\x6F\x6C\x6F\x72","\x23\x6D\x65\x6E\x75\x42\x67","\x23\x68\x75\x64\x4D\x61\x69\x6E\x43\x6F\x6C\x6F\x72\x20","\x64\x79\x69\x6E\x67\x6C\x69\x67\x68\x74\x31\x6C\x6F\x61\x64","\x75\x73\x65\x72\x44\x61\x74\x61","\x70\x61\x72\x73\x65","\x4E\x6F\x74\x46\x6F\x75\x6E\x64","\x75\x73\x65\x72\x66\x69\x72\x73\x74\x6E\x61\x6D\x65","\x75\x73\x65\x72\x6C\x61\x73\x74\x6E\x61\x6D\x65","\x75\x73\x65\x72\x67\x65\x6E\x64\x65\x72","\x75\x73\x65\x72\x69\x64","\x6C\x61\x6E\x67\x75\x61\x67\x65\x6D\x6F\x64","\x54\x72\x75\x65","\x74\x72\x75\x65","\x66\x61\x6C\x73\x65","\x73\x65\x74\x49\x74\x65\x6D","\x50\x4F\x53\x54","\x6F\x70\x65\x6E","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x73\x65\x74\x52\x65\x71\x75\x65\x73\x74\x48\x65\x61\x64\x65\x72","\x70\x61\x73\x73\x77\x6F\x72\x64","\x73\x65\x6E\x64","\x47\x45\x54","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x6F\x6C\x64","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65\x73","\x62\x65\x66\x6F\x72\x65","\x61\x70\x70\x6C\x79","\x61\x66\x74\x65\x72","\x23\x66\x66\x30\x30\x30\x30","\x23\x30\x30\x66\x66\x30\x30","\x23\x30\x30\x30\x30\x66\x66","\x23\x66\x66\x66\x66\x30\x30","\x23\x30\x30\x66\x66\x66\x66","\x23\x66\x66\x30\x30\x66\x66","\x63\x61\x6E\x76\x61\x73","\x63\x72\x65\x61\x74\x65\x4C\x69\x6E\x65\x61\x72\x47\x72\x61\x64\x69\x65\x6E\x74","\x72\x61\x6E\x64\x6F\x6D","\x6C\x65\x6E\x67\x74\x68","\x66\x6C\x6F\x6F\x72","\x61\x64\x64\x43\x6F\x6C\x6F\x72\x53\x74\x6F\x70","\x66\x69\x6C\x6C\x54\x65\x78\x74","\x69\x64","\x6D\x69\x6E\x69\x6D\x61\x70","\x6D\x69\x6E\x69\x6D\x61\x70\x2D\x73\x65\x63\x74\x6F\x72\x73","\x61\x6F\x32\x74\x2D\x6D\x69\x6E\x69\x6D\x61\x70","\x66\x69\x6C\x6C\x53\x74\x79\x6C\x65","\x67\x72\x61\x64\x69\x65\x6E\x74","\x66","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65\x5F\x6F\x76\x65\x72\x72\x69\x64\x65","\x4C\x4D\x73\x74\x61\x72\x74\x65\x64","\x4C\x4D\x56\x65\x72\x73\x69\x6F\x6E","\x4D\x6F\x64\x20\x3C\x66\x6F\x6E\x74\x20\x63\x6F\x6C\x6F\x72\x3D\x22\x79\x65\x6C\x6C\x6F\x77\x22\x3E\x3C\x62\x3E\x76","\x3C\x2F\x62\x3E\x3C\x2F\x66\x6F\x6E\x74\x3E\x20\x20","\x20\x3C\x66\x6F\x6E\x74\x20\x63\x6F\x6C\x6F\x72\x3D\x22\x79\x65\x6C\x6C\x6F\x77\x22\x3E\x3C\x62\x3E\x76\x31\x2E\x38\x3C\x2F\x62\x3E\x3C\x2F\x66\x6F\x6E\x74\x3E\x2E\x20\x3C\x62\x72\x3E\x76\x69\x73\x69\x74\x3A\x20\x3C\x61\x20\x74\x61\x72\x67\x65\x74\x3D\x22\x5F\x62\x6C\x61\x6E\x6B\x22\x20\x68\x72\x65\x66\x3D\x22\x68\x74\x74\x70\x73\x3A\x2F\x2F\x77\x77\x77\x2E\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x22\x3E\x3C\x66\x6F\x6E\x74\x20\x63\x6F\x6C\x6F\x72\x3D\x22\x79\x65\x6C\x6C\x6F\x77\x22\x3E\x3C\x62\x3E\x3C\x75\x3E\x77\x77\x77\x2E\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x3C\x2F\x75\x3E\x3C\x2F\x62\x3E\x3C\x2F\x66\x6F\x6E\x74\x3E\x3C\x2F\x61\x3E","\x69\x6E\x66\x6F","\x74\x72\x69\x6D","\x73\x68\x6F\x77\x69\x6E\x66\x6F\x3D\x30\x26\x63\x6F\x6E\x74\x72\x6F\x6C\x73\x3D\x30\x26\x72\x65\x6C\x3D\x30\x26\x76\x71\x3D\x74\x69\x6E\x79\x26\x65\x6E\x61\x62\x6C\x65\x6A\x73\x61\x70\x69\x3D\x31","\x76","\x6C\x69\x73\x74","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x77\x77\x77\x2E\x79\x6F\x75\x74\x75\x62\x65\x2E\x63\x6F\x6D\x2F\x65\x6D\x62\x65\x64\x2F","\x3F","\x3F\x6C\x69\x73\x74\x3D","\x26","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x79\x6F\x75\x74\x75\x2E\x62\x65\x2F","\x73\x74\x61\x72\x74\x73\x57\x69\x74\x68","\x72\x65\x70\x6C\x61\x63\x65","\x33\x30\x30\x70\x78","\x3C\x2F\x62\x72\x3E\x20\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x65\x6E\x61\x62\x6C\x65\x73\x68\x6F\x72\x74\x63\x75\x74\x73\x31\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x73\x6D\x20\x62\x74\x6E\x2D\x70\x72\x69\x6D\x61\x72\x79\x20\x62\x74\x6E\x2D\x70\x6C\x61\x79\x20\x62\x74\x6E\x2D\x65\x6E\x61\x62\x6C\x65\x2D\x73\x68\x6F\x72\x74\x63\x75\x74\x73\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x65\x6E\x61\x62\x6C\x65\x73\x68\x6F\x72\x74\x63\x75\x74\x73\x28\x29\x3B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x31\x30\x70\x78\x3B\x62\x6F\x72\x64\x65\x72\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x64\x61\x72\x6B\x62\x6C\x75\x65\x3B\x22\x3E","\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E\x3C\x62\x72\x3E\x3C\x62\x75\x74\x74\x6F\x6E\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x73\x6D\x20\x62\x74\x6E\x2D\x77\x61\x72\x6E\x69\x6E\x67\x20\x62\x74\x6E\x2D\x73\x70\x65\x63\x74\x61\x74\x65\x20\x62\x74\x6E\x2D\x70\x6C\x61\x79\x20\x62\x74\x6E\x2D\x65\x6E\x61\x62\x6C\x65\x2D\x73\x68\x6F\x72\x74\x63\x75\x74\x73\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x77\x69\x64\x74\x68\x3A\x20\x31\x30\x30\x25\x3B\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x31\x30\x70\x78\x3B\x22\x3E","\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x65\x72\x72\x6F\x72","\x66\x61\x64\x65\x4F\x75\x74","\x23\x69\x6D\x61\x67\x65\x62\x69\x67","\x72\x65\x6D\x6F\x76\x65","\x4D\x65\x67\x61\x46\x46\x41","\x54","\x69\x6E\x64\x65\x78\x4F\x66","\x74\x6F\x49\x53\x4F\x53\x74\x72\x69\x6E\x67","\x73\x6C\x69\x63\x65","\x33\x35\x30\x70\x78","\x3C\x62\x3E\x5B\x53\x45\x52\x56\x45\x52\x5D\x3A\x3C\x2F\x62\x3E\x20\x59\x6F\x75\x72\x20\x47\x69\x76\x65\x61\x77\x61\x79\x20\x6C\x69\x63\x65\x6E\x63\x65\x20\x68\x61\x73\x20\x65\x6E\x64\x65\x64\x2E\x20\x54\x68\x61\x6E\x6B\x20\x79\x6F\x75\x20\x66\x6F\x72\x20\x75\x73\x69\x6E\x67\x20\x6F\x75\x72\x20\x6D\x6F\x64\x21","\x77\x61\x72\x6E\x69\x6E\x67","\x47\x69\x76\x65","\x61\x67\x61\x72\x69\x6F\x55\x49\x44","\x50\x72\x6F\x4C\x69\x63\x65\x6E\x63\x65\x55\x73\x65\x72\x73","\x72\x65\x61\x73\x6F\x6E","\x40","\x73\x70\x6C\x69\x74","\x3C\x62\x3E\x5B\x53\x45\x52\x56\x45\x52\x5D\x3A\x3C\x2F\x62\x3E\x20\x20\x59\x6F\x75\x72\x20\x6C\x69\x63\x65\x6E\x63\x65\x20\x69\x73\x20\x73\x74\x6F\x72\x65\x64\x20\x61\x73\x20\x47\x69\x76\x65\x61\x77\x61\x79\x20\x50\x72\x65\x6D\x69\x75\x6D\x20\x75\x6E\x74\x69\x6C\x20","\x2F","\x2E\x20\x54\x68\x61\x6E\x6B\x20\x79\x6F\x75\x20\x66\x6F\x72\x20\x75\x73\x69\x6E\x67\x20\x6F\x75\x72\x20\x6D\x6F\x64\x21","\x3C\x62\x3E\x5B\x53\x45\x52\x56\x45\x52\x5D\x3A\x3C\x2F\x62\x3E\x20\x59\x6F\x75\x72\x20\x6C\x69\x63\x65\x6E\x63\x65\x20\x69\x73\x20\x73\x74\x6F\x72\x65\x64\x20\x61\x73\x20\x50\x72\x65\x6D\x69\x75\x6D\x2E\x20\x54\x68\x61\x6E\x6B\x20\x79\x6F\x75\x20\x66\x6F\x72\x20\x75\x73\x69\x6E\x67\x20\x6F\x75\x72\x20\x6D\x6F\x64\x21","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x41\x6A\x61\x78\x44\x61\x74\x61\x2F\x61\x63\x63\x65\x73\x73\x74\x6F\x6B\x65\x6E\x2E\x68\x74\x6D\x6C","\x6A\x73\x6F\x6E","\x61\x6A\x61\x78","\x61","\x3C\x62\x3E\x5B","\x5D\x3A\x3C\x2F\x62\x3E\x20","\x2C\x20\x3C\x62\x72\x3E","\x3A\x20\x3C\x61\x20\x74\x61\x72\x67\x65\x74\x3D\x22\x5F\x62\x6C\x61\x6E\x6B\x22\x20\x68\x72\x65\x66\x3D\x22\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x75\x73\x65\x72\x2E\x6A\x73\x22\x3E\x3C\x66\x6F\x6E\x74\x20\x63\x6F\x6C\x6F\x72\x3D\x22\x62\x6C\x75\x65\x22\x3E\x3C\x62\x3E\x3C\x75\x3E\x77\x77\x77\x2E\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x3C\x2F\x75\x3E\x3C\x2F\x62\x3E\x3C\x2F\x66\x6F\x6E\x74\x3E\x3C\x2F\x61\x3E\x3C\x62\x72\x3E","\x69\x6E\x6E\x65\x72\x48\x54\x4D\x4C","\x64\x6F\x63\x75\x6D\x65\x6E\x74\x45\x6C\x65\x6D\x65\x6E\x74","\x61\x72\x69\x61\x2D\x70\x72\x65\x73\x73\x65\x64","\x61\x74\x74\x72","\x23\x49\x50\x42\x74\x6E","\x63\x6C\x69\x63\x6B","\x23\x53\x48\x4F\x53\x48\x4F\x42\x74\x6E","\x23\x4D\x41\x49\x4E\x42\x54\x42\x74\x6E","\x23\x58\x50\x42\x74\x6E","\x6C\x69\x76\x65\x2D\x61\x72\x65\x6E\x61\x2D","\x23\x73\x65\x72\x76\x65\x72\x2D\x74\x6F\x6B\x65\x6E","\x2E\x61\x67\x61\x72\x2E\x69\x6F","\x69\x6E\x74\x65\x67\x72\x69\x74\x79","\x70\x61\x67\x65\x20\x32","\x2F\x70\x6C\x61\x79\x3F\x73\x69\x70\x3D","\x26\x3F\x72\x3D","\x26\x3F\x6D\x3D","\x70\x75\x73\x68\x53\x74\x61\x74\x65","\x3F\x73\x69\x70\x3D","\x70\x61\x74\x68\x6E\x61\x6D\x65","\x6C\x6F\x63\x61\x74\x69\x6F\x6E","\x68\x69\x73\x74\x6F\x72\x79","\x68\x72\x65\x66","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x61\x67\x61\x72\x2E\x69\x6F\x2F\x23","\x23\x70\x61\x72\x74\x79\x2D\x74\x6F\x6B\x65\x6E","\x6A\x51\x75\x65\x72\x79","\x67\x65\x74\x54\x69\x6D\x65","\x73\x65\x74\x54\x69\x6D\x65","\x3B\x20\x65\x78\x70\x69\x72\x65\x73\x3D","\x74\x6F\x47\x4D\x54\x53\x74\x72\x69\x6E\x67","\x63\x6F\x6F\x6B\x69\x65","\x61\x67\x61\x72\x69\x6F\x5F\x72\x65\x64\x69\x72\x65\x63\x74\x3D","\x3B\x20\x70\x61\x74\x68\x3D\x2F","\x2A\x5B\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x70\x61\x67\x65\x5F\x70\x6C\x61\x79\x22\x5D","\x23\x73\x65\x72\x76\x65\x72\x2D\x72\x65\x63\x6F\x6E\x6E\x65\x63\x74","\x23\x6C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x2D\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x3A","\x2E","\x65\x76\x65\x72\x79","\x23\x6A\x6F\x69\x6E\x50\x61\x72\x74\x79\x54\x6F\x6B\x65\x6E","\x23\x6A\x6F\x69\x6E\x2D\x70\x61\x72\x74\x79\x2D\x62\x74\x6E","\x66\x61\x20\x66\x61\x2D\x73\x65\x61\x72\x63\x68","\x61\x64\x64\x43\x6C\x61\x73\x73","\x66\x61\x20\x66\x61\x2D\x74\x69\x6D\x65\x73","\x72\x65\x6D\x6F\x76\x65\x43\x6C\x61\x73\x73","\x23\x73\x65\x61\x72\x63\x68\x53\x70\x61\x6E\x3E\x69","\x61\x67\x61\x72\x2E\x69\x6F\x2F\x23","\x23\x72\x65\x67\x69\x6F\x6E\x63\x68\x65\x63\x6B","\x23\x67\x61\x6D\x65\x6D\x6F\x64\x65\x63\x68\x65\x63\x6B","\x23\x42\x61\x63\x6B\x74\x6F\x6D\x65\x6E\x75","\x77\x73\x73\x3A\x2F\x2F","\x61\x67\x61\x72\x2E\x69\x6F\x2F\x3F\x73\x65\x61\x72\x63\x68\x3D\x77\x73\x73\x3A\x2F\x2F","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x61\x67\x61\x72\x2E\x69\x6F\x2F\x3F\x73\x65\x61\x72\x63\x68\x3D\x77\x73\x73\x3A\x2F\x2F","\x73\x65\x6C\x65\x63\x74\x65\x64","\x70\x72\x6F\x70","\x23\x72\x65\x67\x69\x6F\x6E\x20\x6F\x70\x74\x69\x6F\x6E\x5B\x76\x61\x6C\x75\x65\x3D\x22","\x22\x5D","\x23\x67\x61\x6D\x65\x6D\x6F\x64\x65\x20\x6F\x70\x74\x69\x6F\x6E\x5B\x76\x61\x6C\x75\x65\x3D\x22\x3A\x70\x61\x72\x74\x79\x22\x5D","\x3A\x66\x66\x61","\x23\x67\x61\x6D\x65\x6D\x6F\x64\x65\x20\x6F\x70\x74\x69\x6F\x6E\x5B\x76\x61\x6C\x75\x65\x3D\x22\x22\x5D","\x3A\x74\x65\x61\x6D\x73","\x23\x67\x61\x6D\x65\x6D\x6F\x64\x65\x20\x6F\x70\x74\x69\x6F\x6E\x5B\x76\x61\x6C\x75\x65\x3D\x22\x3A\x74\x65\x61\x6D\x73\x22\x5D","\x3A\x65\x78\x70\x65\x72\x69\x6D\x65\x6E\x74\x61\x6C","\x23\x67\x61\x6D\x65\x6D\x6F\x64\x65\x20\x6F\x70\x74\x69\x6F\x6E\x5B\x76\x61\x6C\x75\x65\x3D\x22\x3A\x65\x78\x70\x65\x72\x69\x6D\x65\x6E\x74\x61\x6C\x22\x5D","\x32\x31\x30\x70\x78","\x20\x27\x77\x73\x73\x3A\x2F\x2F","\x27\x2E\x2E\x2E","\x73\x75\x63\x63\x65\x73\x73","\x21\x20\x3C\x2F\x62\x72\x3E\x20\x3C\x62\x75\x74\x74\x6F\x6E\x20\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x70\x6C\x61\x79\x20\x62\x74\x6E\x2D\x70\x72\x69\x6D\x61\x72\x79\x20\x62\x74\x6E\x2D\x6E\x65\x65\x64\x73\x2D\x73\x65\x72\x76\x65\x72\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x68\x69\x64\x65\x53\x65\x61\x72\x63\x68\x48\x75\x64\x28\x29\x3B\x70\x6C\x61\x79\x28\x29\x3B\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x31\x30\x70\x78\x3B\x62\x6F\x72\x64\x65\x72\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x64\x61\x72\x6B\x62\x6C\x75\x65\x3B\x22\x3E","\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E\x3C\x62\x72\x3E\x3C\x62\x75\x74\x74\x6F\x6E\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x73\x6D\x20\x62\x74\x6E\x2D\x77\x61\x72\x6E\x69\x6E\x67\x20\x62\x74\x6E\x2D\x73\x70\x65\x63\x74\x61\x74\x65\x20\x62\x74\x6E\x2D\x73\x70\x65\x63\x74\x61\x74\x65\x2D\x73\x68\x6F\x72\x74\x63\x75\x74\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x68\x69\x64\x65\x53\x65\x61\x72\x63\x68\x48\x75\x64\x28\x29\x3B\x20\x73\x74\x79\x6C\x65\x3D\x22\x77\x69\x64\x74\x68\x3A\x20\x31\x30\x30\x25\x3B\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x31\x30\x70\x78\x3B\x22\x3E","\x3A\x20","\x21","\x20\x27","\x66\x69\x6C\x74\x65\x72","\x6E\x6F\x74\x68\x69\x6E\x67","\x3C\x74\x65\x78\x74\x61\x72\x65\x61\x3E","\x61\x70\x70\x65\x6E\x64","\x62\x6F\x64\x79","\x68\x74\x6D\x6C","\x0A","\x6C\x6F\x67","\x73\x65\x6C\x65\x63\x74","\x63\x6F\x70\x79","\x65\x78\x65\x63\x43\x6F\x6D\x6D\x61\x6E\x64","\x23\x43\x6F\x70\x79\x54\x6B\x50\x77\x4C\x62","\x23\x74\x6F\x70\x35\x2D\x70\x6F\x73","\x3C\x65\x72\x20\x69\x64\x3D\x22\x43\x6F\x70\x79\x54\x6B\x50\x77\x4C\x62\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x3E\x53\x65\x72\x76\x65\x72\x3A\x20","\x3C\x62\x72\x3E\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x3A\x20","\x3C\x62\x72\x3E\x54\x65\x61\x6D\x62\x6F\x61\x72\x64\x3A","\x3C\x62\x72\x3E\x4D\x79\x20\x47\x61\x6D\x65\x20\x4E\x61\x6D\x65\x3A\x20","\x23\x6E\x69\x63\x6B","\x3C\x2F\x65\x72\x3E","\x23\x73\x65\x72\x76\x65\x72\x2D\x6A\x6F\x69\x6E","\x65\x72\x23\x43\x6F\x70\x79\x54\x6B\x50\x77\x4C\x62","\x67\x65\x74\x50\x6C\x61\x79\x65\x72\x53\x74\x61\x74\x65","\x70\x6C\x61\x79\x56\x69\x64\x65\x6F","\x70\x61\x75\x73\x65\x56\x69\x64\x65\x6F","\x23\x73\x65\x72\x76\x65\x72","\x23\x6A\x6F\x69\x6E\x2D\x70\x61\x72\x74\x79\x2D\x62\x74\x6E\x2D\x32","\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64","\x54\x65\x61\x6D\x62\x6F\x61\x72\x64","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x53\x6B\x69\x6E\x43\x68\x61\x6E\x67\x65\x72\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x69\x6D\x61\x67\x65\x3A\x20\x75\x72\x6C\x28","\x29\x3B\x20\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20","\x3B\x20\x62\x6F\x72\x64\x65\x72\x3A\x20\x31\x70\x78\x20\x73\x6F\x6C\x69\x64\x20\x62\x6C\x61\x63\x6B\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x35\x34\x30\x70\x78\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x35\x30\x30\x70\x78\x3B\x20\x22\x3B\x3E","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x53\x6B\x69\x6E\x43\x68\x61\x6E\x67\x65\x72\x68\x75\x64\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x64\x69\x73\x70\x6C\x61\x79\x3A\x62\x6C\x6F\x63\x6B\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x6C\x65\x66\x74\x3A\x20\x31\x30\x70\x78\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x72\x69\x67\x68\x74\x3A\x20\x31\x30\x70\x78\x3B\x22\x3E","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x53\x6B\x69\x6E\x43\x68\x61\x6E\x67\x65\x72\x74\x6F\x6F\x6C\x73\x68\x75\x64\x31\x22\x20\x61\x6C\x69\x67\x6E\x3D\x22\x6D\x69\x64\x64\x6C\x65\x22\x3E\x3C\x68\x35\x20\x63\x6C\x61\x73\x73\x3D\x22\x6D\x61\x69\x6E\x2D\x63\x6F\x6C\x6F\x72\x22\x3E\x3C\x62\x3E","\x3C\x2F\x62\x3E\x3C\x2F\x68\x35\x3E","\x3C\x70\x20\x73\x74\x79\x6C\x65\x3D\x22\x63\x6F\x6C\x6F\x72\x3A\x77\x68\x69\x74\x65\x3B\x20\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x31\x32\x70\x78\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x62\x6F\x74\x74\x6F\x6D\x3A\x20\x2D\x34\x70\x78\x3B\x22\x20\x61\x6C\x69\x67\x6E\x3D\x22\x6D\x69\x64\x64\x6C\x65\x22\x3E","\x3C\x62\x72\x3E\x3C\x62\x72\x3E\x3C\x66\x6F\x6E\x74\x20\x69\x64\x3D\x20\x22\x4C\x65\x61\x64\x62\x6F\x61\x72\x64\x6C\x65\x74\x31\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x63\x6F\x6C\x6F\x72\x3A\x77\x68\x69\x74\x65\x3B\x20\x73\x69\x7A\x65\x3A\x31\x32\x70\x78\x3B\x20\x22\x3E","\x3C\x2F\x70\x3E\x3C\x62\x72\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x49\x6E\x70\x75\x74\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x4E\x69\x63\x6B\x6E\x61\x6D\x65\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x30\x70\x78\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x72\x69\x67\x68\x74\x3A\x20\x32\x70\x78\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x33\x30\x25\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x69\x6E\x6C\x69\x6E\x65\x3B\x20\x22\x20\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x74\x6F\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x22\x20\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x49\x6E\x70\x75\x74\x32\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x4E\x69\x63\x6B\x6E\x61\x6D\x65\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x30\x70\x78\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x72\x69\x67\x68\x74\x3A\x20\x32\x70\x78\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x33\x30\x25\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x69\x6E\x6C\x69\x6E\x65\x3B\x22\x20\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x74\x6F\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x22\x20\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x49\x6E\x70\x75\x74\x33\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x4E\x69\x63\x6B\x6E\x61\x6D\x65\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x30\x70\x78\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x72\x69\x67\x68\x74\x3A\x20\x32\x70\x78\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x33\x30\x25\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x69\x6E\x6C\x69\x6E\x65\x3B\x22\x20\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x74\x6F\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x22\x20\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x49\x6E\x70\x75\x74\x34\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x4E\x69\x63\x6B\x6E\x61\x6D\x65\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x30\x70\x78\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x72\x69\x67\x68\x74\x3A\x20\x32\x70\x78\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x33\x30\x25\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x69\x6E\x6C\x69\x6E\x65\x3B\x22\x20\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x74\x6F\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x22\x20\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x49\x6E\x70\x75\x74\x35\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x4E\x69\x63\x6B\x6E\x61\x6D\x65\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x30\x70\x78\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x72\x69\x67\x68\x74\x3A\x20\x32\x70\x78\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x33\x30\x25\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x69\x6E\x6C\x69\x6E\x65\x3B\x22\x20\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x74\x6F\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x22\x20\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x49\x6E\x70\x75\x74\x36\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x4E\x69\x63\x6B\x6E\x61\x6D\x65\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x30\x70\x78\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x72\x69\x67\x68\x74\x3A\x20\x32\x70\x78\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x33\x30\x25\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x69\x6E\x6C\x69\x6E\x65\x3B\x22\x20\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x74\x6F\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x22\x20\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x49\x6E\x70\x75\x74\x37\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x4E\x69\x63\x6B\x6E\x61\x6D\x65\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x30\x70\x78\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x72\x69\x67\x68\x74\x3A\x20\x32\x70\x78\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x33\x30\x25\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x69\x6E\x6C\x69\x6E\x65\x3B\x22\x20\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x74\x6F\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x22\x20\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x49\x6E\x70\x75\x74\x38\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x4E\x69\x63\x6B\x6E\x61\x6D\x65\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x30\x70\x78\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x72\x69\x67\x68\x74\x3A\x20\x32\x70\x78\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x33\x30\x25\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x69\x6E\x6C\x69\x6E\x65\x3B\x22\x20\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x74\x6F\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x22\x20\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x49\x6E\x70\x75\x74\x39\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x4E\x69\x63\x6B\x6E\x61\x6D\x65\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x30\x70\x78\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x72\x69\x67\x68\x74\x3A\x20\x32\x70\x78\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x33\x30\x25\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x69\x6E\x6C\x69\x6E\x65\x3B\x22\x20\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x74\x6F\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x22\x20\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x49\x6E\x70\x75\x74\x31\x30\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x4E\x69\x63\x6B\x6E\x61\x6D\x65\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x30\x70\x78\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x72\x69\x67\x68\x74\x3A\x20\x32\x70\x78\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x33\x30\x25\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x69\x6E\x6C\x69\x6E\x65\x3B\x22\x20\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x74\x6F\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x22\x20\x3E","\x3C\x2F\x64\x69\x76\x3E\x3C\x70\x20\x73\x74\x79\x6C\x65\x3D\x22\x63\x6F\x6C\x6F\x72\x3A\x77\x68\x69\x74\x65\x3B\x20\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x31\x32\x70\x78\x22\x3B\x22\x20\x61\x6C\x69\x67\x6E\x3D\x22\x6D\x69\x64\x64\x6C\x65\x22\x3E","\x3C\x62\x72\x3E","\x3C\x2F\x75\x3E\x3C\x2F\x70\x3E","\x3C\x2F\x64\x69\x76\x3E\x3C\x2F\x64\x69\x76\x3E","\x23\x6D\x65\x6E\x75\x2D\x66\x6F\x6F\x74\x65\x72","\x36\x30\x25","\x23\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x49\x6E\x70\x75\x74\x31","\x23\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x49\x6E\x70\x75\x74\x32","\x23\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x49\x6E\x70\x75\x74\x33","\x23\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x49\x6E\x70\x75\x74\x34","\x23\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x49\x6E\x70\x75\x74\x35","\x23\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x49\x6E\x70\x75\x74\x36","\x23\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x49\x6E\x70\x75\x74\x37","\x23\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x49\x6E\x70\x75\x74\x38","\x23\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x49\x6E\x70\x75\x74\x39","\x23\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x49\x6E\x70\x75\x74\x31\x30","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x53\x6B\x69\x6E\x42\x61\x63\x6B\x74\x6F\x6D\x65\x6E\x75\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x65\x78\x69\x74\x53\x6B\x69\x6E\x43\x68\x61\x6E\x67\x65\x72\x28\x29\x3B\x20\x72\x65\x74\x75\x72\x6E\x20\x66\x61\x6C\x73\x65\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x64\x61\x6E\x67\x65\x72\x22\x20\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x6C\x65\x66\x74\x3A\x20\x31\x30\x70\x78\x3B\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x22\x20\x74\x69\x74\x6C\x65\x3D\x22\x22\x3E","\x23\x53\x6B\x69\x6E\x43\x68\x61\x6E\x67\x65\x72\x68\x75\x64","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x49\x63\x6F\x6E\x46\x61\x6B\x65\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x69\x6E\x66\x6F\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x4C\x65\x61\x64\x65\x72\x31\x31\x28\x29\x3B\x72\x65\x74\x75\x72\x6E\x20\x66\x61\x6C\x73\x65\x3B\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x77\x70\x65\x78\x70\x6C\x6F\x72\x65\x72\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x49\x63\x6F\x6E\x46\x61\x6B\x65\x32\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x69\x6E\x66\x6F\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x4C\x65\x61\x64\x65\x72\x31\x32\x28\x29\x3B\x72\x65\x74\x75\x72\x6E\x20\x66\x61\x6C\x73\x65\x3B\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x77\x70\x65\x78\x70\x6C\x6F\x72\x65\x72\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x49\x63\x6F\x6E\x46\x61\x6B\x65\x33\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x69\x6E\x66\x6F\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x4C\x65\x61\x64\x65\x72\x31\x33\x28\x29\x3B\x72\x65\x74\x75\x72\x6E\x20\x66\x61\x6C\x73\x65\x3B\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x77\x70\x65\x78\x70\x6C\x6F\x72\x65\x72\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x49\x63\x6F\x6E\x46\x61\x6B\x65\x34\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x69\x6E\x66\x6F\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x4C\x65\x61\x64\x65\x72\x31\x34\x28\x29\x3B\x72\x65\x74\x75\x72\x6E\x20\x66\x61\x6C\x73\x65\x3B\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x77\x70\x65\x78\x70\x6C\x6F\x72\x65\x72\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x49\x63\x6F\x6E\x46\x61\x6B\x65\x35\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x69\x6E\x66\x6F\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x4C\x65\x61\x64\x65\x72\x31\x35\x28\x29\x3B\x72\x65\x74\x75\x72\x6E\x20\x66\x61\x6C\x73\x65\x3B\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x77\x70\x65\x78\x70\x6C\x6F\x72\x65\x72\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x49\x63\x6F\x6E\x46\x61\x6B\x65\x36\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x69\x6E\x66\x6F\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x4C\x65\x61\x64\x65\x72\x31\x36\x28\x29\x3B\x72\x65\x74\x75\x72\x6E\x20\x66\x61\x6C\x73\x65\x3B\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x77\x70\x65\x78\x70\x6C\x6F\x72\x65\x72\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x49\x63\x6F\x6E\x46\x61\x6B\x65\x37\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x69\x6E\x66\x6F\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x4C\x65\x61\x64\x65\x72\x31\x37\x28\x29\x3B\x72\x65\x74\x75\x72\x6E\x20\x66\x61\x6C\x73\x65\x3B\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x77\x70\x65\x78\x70\x6C\x6F\x72\x65\x72\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x49\x63\x6F\x6E\x46\x61\x6B\x65\x38\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x69\x6E\x66\x6F\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x4C\x65\x61\x64\x65\x72\x31\x38\x28\x29\x3B\x72\x65\x74\x75\x72\x6E\x20\x66\x61\x6C\x73\x65\x3B\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x77\x70\x65\x78\x70\x6C\x6F\x72\x65\x72\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x49\x63\x6F\x6E\x46\x61\x6B\x65\x39\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x69\x6E\x66\x6F\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x4C\x65\x61\x64\x65\x72\x31\x39\x28\x29\x3B\x72\x65\x74\x75\x72\x6E\x20\x66\x61\x6C\x73\x65\x3B\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x77\x70\x65\x78\x70\x6C\x6F\x72\x65\x72\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x49\x63\x6F\x6E\x46\x61\x6B\x65\x31\x30\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x69\x6E\x66\x6F\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x4C\x65\x61\x64\x65\x72\x32\x30\x28\x29\x3B\x72\x65\x74\x75\x72\x6E\x20\x66\x61\x6C\x73\x65\x3B\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x77\x70\x65\x78\x70\x6C\x6F\x72\x65\x72\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x54\x65\x61\x6D\x62\x6F\x61\x72\x64\x49\x63\x6F\x6E\x46\x61\x6B\x65\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x69\x6E\x66\x6F\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x54\x65\x61\x6D\x65\x72\x31\x31\x28\x29\x3B\x72\x65\x74\x75\x72\x6E\x20\x66\x61\x6C\x73\x65\x3B\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x77\x70\x65\x78\x70\x6C\x6F\x72\x65\x72\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x23\x54\x65\x61\x6D\x62\x6F\x61\x72\x64\x49\x6E\x70\x75\x74\x31","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x54\x65\x61\x6D\x62\x6F\x61\x72\x64\x49\x63\x6F\x6E\x46\x61\x6B\x65\x32\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x69\x6E\x66\x6F\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x54\x65\x61\x6D\x65\x72\x31\x32\x28\x29\x3B\x72\x65\x74\x75\x72\x6E\x20\x66\x61\x6C\x73\x65\x3B\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x77\x70\x65\x78\x70\x6C\x6F\x72\x65\x72\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x23\x54\x65\x61\x6D\x62\x6F\x61\x72\x64\x49\x6E\x70\x75\x74\x32","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x54\x65\x61\x6D\x62\x6F\x61\x72\x64\x49\x63\x6F\x6E\x46\x61\x6B\x65\x33\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x69\x6E\x66\x6F\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x54\x65\x61\x6D\x65\x72\x31\x33\x28\x29\x3B\x72\x65\x74\x75\x72\x6E\x20\x66\x61\x6C\x73\x65\x3B\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x77\x70\x65\x78\x70\x6C\x6F\x72\x65\x72\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x23\x54\x65\x61\x6D\x62\x6F\x61\x72\x64\x49\x6E\x70\x75\x74\x33","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x54\x65\x61\x6D\x62\x6F\x61\x72\x64\x49\x63\x6F\x6E\x46\x61\x6B\x65\x34\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x69\x6E\x66\x6F\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x54\x65\x61\x6D\x65\x72\x31\x34\x28\x29\x3B\x72\x65\x74\x75\x72\x6E\x20\x66\x61\x6C\x73\x65\x3B\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x77\x70\x65\x78\x70\x6C\x6F\x72\x65\x72\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x23\x54\x65\x61\x6D\x62\x6F\x61\x72\x64\x49\x6E\x70\x75\x74\x34","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x54\x65\x61\x6D\x62\x6F\x61\x72\x64\x49\x63\x6F\x6E\x46\x61\x6B\x65\x35\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x69\x6E\x66\x6F\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x54\x65\x61\x6D\x65\x72\x31\x35\x28\x29\x3B\x72\x65\x74\x75\x72\x6E\x20\x66\x61\x6C\x73\x65\x3B\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x77\x70\x65\x78\x70\x6C\x6F\x72\x65\x72\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x23\x54\x65\x61\x6D\x62\x6F\x61\x72\x64\x49\x6E\x70\x75\x74\x35","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x54\x65\x61\x6D\x62\x6F\x61\x72\x64\x49\x63\x6F\x6E\x46\x61\x6B\x65\x36\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x69\x6E\x66\x6F\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x54\x65\x61\x6D\x65\x72\x31\x36\x28\x29\x3B\x72\x65\x74\x75\x72\x6E\x20\x66\x61\x6C\x73\x65\x3B\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x77\x70\x65\x78\x70\x6C\x6F\x72\x65\x72\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x23\x54\x65\x61\x6D\x62\x6F\x61\x72\x64\x49\x6E\x70\x75\x74\x36","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x54\x65\x61\x6D\x62\x6F\x61\x72\x64\x49\x63\x6F\x6E\x46\x61\x6B\x65\x37\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x69\x6E\x66\x6F\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x54\x65\x61\x6D\x65\x72\x31\x37\x28\x29\x3B\x72\x65\x74\x75\x72\x6E\x20\x66\x61\x6C\x73\x65\x3B\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x77\x70\x65\x78\x70\x6C\x6F\x72\x65\x72\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x23\x54\x65\x61\x6D\x62\x6F\x61\x72\x64\x49\x6E\x70\x75\x74\x37","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x54\x65\x61\x6D\x62\x6F\x61\x72\x64\x49\x63\x6F\x6E\x46\x61\x6B\x65\x38\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x69\x6E\x66\x6F\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x54\x65\x61\x6D\x65\x72\x31\x38\x28\x29\x3B\x72\x65\x74\x75\x72\x6E\x20\x66\x61\x6C\x73\x65\x3B\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x77\x70\x65\x78\x70\x6C\x6F\x72\x65\x72\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x23\x54\x65\x61\x6D\x62\x6F\x61\x72\x64\x49\x6E\x70\x75\x74\x38","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x54\x65\x61\x6D\x62\x6F\x61\x72\x64\x49\x63\x6F\x6E\x46\x61\x6B\x65\x39\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x69\x6E\x66\x6F\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x54\x65\x61\x6D\x65\x72\x31\x39\x28\x29\x3B\x72\x65\x74\x75\x72\x6E\x20\x66\x61\x6C\x73\x65\x3B\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x77\x70\x65\x78\x70\x6C\x6F\x72\x65\x72\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x23\x54\x65\x61\x6D\x62\x6F\x61\x72\x64\x49\x6E\x70\x75\x74\x39","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x54\x65\x61\x6D\x62\x6F\x61\x72\x64\x49\x63\x6F\x6E\x46\x61\x6B\x65\x31\x30\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x69\x6E\x66\x6F\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x54\x65\x61\x6D\x65\x72\x32\x30\x28\x29\x3B\x72\x65\x74\x75\x72\x6E\x20\x66\x61\x6C\x73\x65\x3B\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x77\x70\x65\x78\x70\x6C\x6F\x72\x65\x72\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x23\x54\x65\x61\x6D\x62\x6F\x61\x72\x64\x49\x6E\x70\x75\x74\x31\x30","\x74\x65\x61\x6D\x50\x6C\x61\x79\x65\x72\x73","\x6E\x69\x63\x6B","\x23\x54\x65\x61\x6D\x62\x6F\x61\x72\x64\x49\x6E\x70\x75\x74","\x6C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64","\x23\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x49\x6E\x70\x75\x74","\x23\x6D\x61\x69\x6E\x2D\x6D\x65\x6E\x75","\x23\x73\x6B\x69\x6E\x73\x2D\x70\x61\x6E\x65\x6C","\x23\x71\x75\x69\x63\x6B\x2D\x6D\x65\x6E\x75","\x23\x65\x78\x70\x2D\x62\x61\x72","\x23\x53\x6B\x69\x6E\x43\x68\x61\x6E\x67\x65\x72","\x73\x6B\x69\x6E\x55\x52\x4C\x42\x65\x66\x6F\x72\x65","\x73\x6B\x69\x6E\x55\x52\x4C","\x6E\x69\x63\x6B\x42\x65\x66\x6F\x72\x65","\x70\x6C\x61\x79\x65\x72\x43\x6F\x6C\x6F\x72\x42\x65\x66\x6F\x72\x65","\x70\x6C\x61\x79\x65\x72\x43\x6F\x6C\x6F\x72","\x70\x6C\x61\x79\x42\x65\x66\x6F\x72\x65","\x70\x6C\x61\x79","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x62\x61\x6E\x6E\x65\x72\x73\x2F\x69\x63\x6F\x6E\x66\x61\x6B\x65\x31\x2E\x70\x6E\x67","\x73\x65\x6E\x64\x53\x65\x72\x76\x65\x72\x4A\x6F\x69\x6E","\x73\x65\x6E\x64\x50\x6C\x61\x79\x65\x72\x55\x70\x64\x61\x74\x65","\x73\x65\x6E\x64\x50\x6C\x61\x79\x65\x72\x4A\x6F\x69\x6E","\x23\x74\x65\x6D\x70\x43\x6F\x70\x79","\x3C\x6C\x61\x62\x65\x6C\x3E\x3C\x69\x6E\x70\x75\x74\x20\x74\x79\x70\x65\x3D\x22\x63\x68\x65\x63\x6B\x62\x6F\x78\x22\x20\x69\x64\x3D\x22\x65\x78\x70\x6F\x72\x74\x2D\x4C\x65\x67\x65\x6E\x64\x53\x65\x74\x74\x69\x6E\x67\x73\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x6A\x73\x2D\x73\x77\x69\x74\x63\x68\x22\x20\x64\x61\x74\x61\x2D\x73\x77\x69\x74\x63\x68\x65\x72\x79\x3D\x22\x74\x72\x75\x65\x22\x20\x63\x68\x65\x63\x6B\x65\x64\x20\x73\x74\x79\x6C\x65\x3D\x22\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x3E\x20\x41\x50\x49\x3C\x2F\x6C\x61\x62\x65\x6C\x3E","\x23\x65\x78\x70\x6F\x72\x74\x2D\x73\x65\x74\x74\x69\x6E\x67\x73","\x23\x65\x78\x70\x6F\x72\x74\x2D\x4C\x65\x67\x65\x6E\x64\x53\x65\x74\x74\x69\x6E\x67\x73","\x71\x75\x65\x72\x79\x53\x65\x6C\x65\x63\x74\x6F\x72","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72","\x6E\x65\x78\x74","\x69\x6E\x70\x75\x74\x23\x65\x78\x70\x6F\x72\x74\x2D\x6F\x67\x61\x72\x69\x6F\x54\x68\x65\x6D\x65\x53\x65\x74\x74\x69\x6E\x67\x73\x2E\x6A\x73\x2D\x73\x77\x69\x74\x63\x68","\x73\x6D\x61\x6C\x6C","\x72\x67\x62\x28\x32\x35\x30\x2C\x20\x32\x35\x30\x2C\x20\x32\x35\x30\x29","\x3C\x6C\x61\x62\x65\x6C\x3E\x3C\x69\x6E\x70\x75\x74\x20\x74\x79\x70\x65\x3D\x22\x63\x68\x65\x63\x6B\x62\x6F\x78\x22\x20\x69\x64\x3D\x22\x69\x6D\x70\x6F\x72\x74\x2D\x4C\x65\x67\x65\x6E\x64\x53\x65\x74\x74\x69\x6E\x67\x73\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x6A\x73\x2D\x73\x77\x69\x74\x63\x68\x22\x20\x64\x61\x74\x61\x2D\x73\x77\x69\x74\x63\x68\x65\x72\x79\x3D\x22\x74\x72\x75\x65\x22\x20\x63\x68\x65\x63\x6B\x65\x64\x20\x73\x74\x79\x6C\x65\x3D\x22\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x3E\x20\x41\x50\x49\x3C\x2F\x6C\x61\x62\x65\x6C\x3E","\x23\x69\x6D\x70\x6F\x72\x74\x2D\x73\x65\x74\x74\x69\x6E\x67\x73","\x23\x69\x6D\x70\x6F\x72\x74\x2D\x4C\x65\x67\x65\x6E\x64\x53\x65\x74\x74\x69\x6E\x67\x73","\x76\x61\x6C\x75\x65","\x65\x78\x70\x6F\x72\x74\x2D\x73\x65\x74\x74\x69\x6E\x67\x73","\x67\x65\x74\x45\x6C\x65\x6D\x65\x6E\x74\x42\x79\x49\x64","\x23\x65\x78\x70\x6F\x72\x74\x2D\x73\x65\x74\x74\x69\x6E\x67\x73\x2D\x62\x74\x6E","\x69\x6D\x70\x6F\x72\x74\x2D\x73\x65\x74\x74\x69\x6E\x67\x73\x2D\x62\x74\x6E\x32","\x23\x69\x6D\x70\x6F\x72\x74\x2D\x73\x65\x74\x74\x69\x6E\x67\x73\x2D\x62\x74\x6E","\x69\x6E\x73\x65\x72\x74\x41\x66\x74\x65\x72","\x63\x6C\x6F\x6E\x65","\x23\x69\x6D\x70\x6F\x72\x74\x2D\x73\x65\x74\x74\x69\x6E\x67\x73\x2D\x62\x74\x6E\x32","\x69\x73\x43\x68\x65\x63\x6B\x65\x64","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x6C\x65\x67\x65\x6E\x64\x53\x65\x74\x74\x69\x6E\x67\x73","\x70\x72\x65\x76\x69\x6F\x75\x73\x4D\x6F\x64\x65","\x73\x68\x6F\x77\x54\x6F\x6B\x65\x6E","\x69\x6E\x69\x74\x69\x61\x6C\x4D\x75\x73\x69\x63\x55\x72\x6C","\x6D\x75\x73\x69\x63\x55\x72\x6C","\x6E\x6F\x74\x65\x31","\x6E\x6F\x74\x65\x32","\x6E\x6F\x74\x65\x33","\x6E\x6F\x74\x65\x34","\x6E\x6F\x74\x65\x35","\x6E\x6F\x74\x65\x36","\x6E\x6F\x74\x65\x37","\x6D\x69\x6E\x69\x6D\x61\x70\x62\x63\x6B\x69\x6D\x67","\x74\x65\x61\x6D\x62\x69\x6D\x67","\x63\x61\x6E\x76\x61\x73\x62\x69\x6D\x67","\x6C\x65\x61\x64\x62\x69\x6D\x67","\x70\x69\x63\x31\x75\x72\x6C\x69\x6D\x67","\x70\x69\x63\x32\x75\x72\x6C\x69\x6D\x67","\x70\x69\x63\x33\x75\x72\x6C\x69\x6D\x67","\x70\x69\x63\x34\x75\x72\x6C\x69\x6D\x67","\x70\x69\x63\x35\x75\x72\x6C\x69\x6D\x67","\x70\x69\x63\x36\x75\x72\x6C\x69\x6D\x67","\x79\x74\x31\x75\x72\x6C\x69\x6D\x67","\x79\x74\x32\x75\x72\x6C\x69\x6D\x67","\x79\x74\x33\x75\x72\x6C\x69\x6D\x67","\x79\x74\x34\x75\x72\x6C\x69\x6D\x67","\x79\x74\x35\x75\x72\x6C\x69\x6D\x67","\x79\x74\x36\x75\x72\x6C\x69\x6D\x67","\x70\x69\x63\x31\x64\x61\x74\x61\x69\x6D\x67","\x70\x69\x63\x32\x64\x61\x74\x61\x69\x6D\x67","\x70\x69\x63\x33\x64\x61\x74\x61\x69\x6D\x67","\x70\x69\x63\x34\x64\x61\x74\x61\x69\x6D\x67","\x70\x69\x63\x35\x64\x61\x74\x61\x69\x6D\x67","\x70\x69\x63\x36\x64\x61\x74\x61\x69\x6D\x67","\x79\x74\x31\x64\x61\x74\x61\x69\x6D\x67","\x79\x74\x32\x64\x61\x74\x61\x69\x6D\x67","\x79\x74\x33\x64\x61\x74\x61\x69\x6D\x67","\x79\x74\x34\x64\x61\x74\x61\x69\x6D\x67","\x79\x74\x35\x64\x61\x74\x61\x69\x6D\x67","\x79\x74\x36\x64\x61\x74\x61\x69\x6D\x67","\x64\x69\x73\x63\x77\x65\x62\x68\x6F\x6F\x6B\x31","\x64\x69\x73\x63\x77\x65\x62\x68\x6F\x6F\x6B\x32","\x55\x73\x65\x72\x73\x63\x72\x69\x70\x74\x31","\x55\x73\x65\x72\x73\x63\x72\x69\x70\x74\x32","\x55\x73\x65\x72\x73\x63\x72\x69\x70\x74\x33","\x55\x73\x65\x72\x73\x63\x72\x69\x70\x74\x34","\x55\x73\x65\x72\x73\x63\x72\x69\x70\x74\x35","\x55\x73\x65\x72\x73\x63\x72\x69\x70\x74\x74\x65\x78\x74\x75\x72\x65\x31","\x55\x73\x65\x72\x73\x63\x72\x69\x70\x74\x74\x65\x78\x74\x75\x72\x65\x32","\x55\x73\x65\x72\x73\x63\x72\x69\x70\x74\x74\x65\x78\x74\x75\x72\x65\x33","\x55\x73\x65\x72\x73\x63\x72\x69\x70\x74\x74\x65\x78\x74\x75\x72\x65\x34","\x55\x73\x65\x72\x73\x63\x72\x69\x70\x74\x74\x65\x78\x74\x75\x72\x65\x35","\x69\x6D\x70\x6F\x72\x74\x2D\x73\x65\x74\x74\x69\x6E\x67\x73","\x23\x6D\x75\x73\x69\x63\x55\x72\x6C","\x73\x72\x63","\x23\x6D\x75\x73\x69\x63\x46\x72\x61\x6D\x65","\x5B\x75\x72\x6C\x5D","\x2E\x6D\x65\x73\x73\x61\x67\x65\x2D\x74\x65\x78\x74","\x2E\x74\x6F\x61\x73\x74\x2E\x74\x6F\x61\x73\x74\x2D\x73\x75\x63\x63\x65\x73\x73","\x70\x6F\x70","\x5B\x2F\x75\x72\x6C\x5D","\x68\x74\x74\x70\x73\x3A\x2F\x2F","\x48\x54\x54\x50\x3A\x2F\x2F","\x48\x54\x54\x50\x53\x3A\x2F\x2F","\x32\x35\x30\x70\x78","\x20","\x3A\x20\x3C\x61\x20\x69\x64\x3D\x22\x76\x69\x73\x69\x74\x75\x72\x6C\x22\x20\x68\x72\x65\x66\x3D","\x20\x74\x61\x72\x67\x65\x74\x3D\x22\x5F\x62\x6C\x61\x6E\x6B\x22\x3E\x3C\x66\x6F\x6E\x74\x20\x63\x6F\x6C\x6F\x72\x3D\x22\x62\x6C\x75\x65\x22\x3E","\x3C\x2F\x66\x6F\x6E\x74\x3E\x3C\x2F\x61\x3E\x3C\x2F\x62\x72\x3E\x20\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x61\x63\x63\x65\x70\x74\x55\x52\x4C\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x62\x6C\x6F\x63\x6B\x20\x62\x74\x6E\x2D\x69\x6E\x66\x6F\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x31\x30\x70\x78\x3B\x62\x6F\x72\x64\x65\x72\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x64\x61\x72\x6B\x62\x6C\x75\x65\x3B\x22\x3E","\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E\x3C\x62\x72\x3E\x3C\x62\x75\x74\x74\x6F\x6E\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x73\x6D\x20\x62\x74\x6E\x2D\x77\x61\x72\x6E\x69\x6E\x67\x20\x62\x74\x6E\x2D\x73\x70\x65\x63\x74\x61\x74\x65\x20\x62\x74\x6E\x2D\x6E\x6F\x64\x6F\x2D\x68\x69\x64\x65\x61\x6C\x6C\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x77\x69\x64\x74\x68\x3A\x20\x31\x30\x30\x25\x3B\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x2D\x31\x30\x70\x78\x3B\x22\x3E","\x5F\x62\x6C\x61\x6E\x6B","\x23\x61\x63\x63\x65\x70\x74\x55\x52\x4C","\x5B\x74\x61\x67\x5D","\x74\x61\x67","\x5B\x2F\x74\x61\x67\x5D","\x3A\x20\x3C\x69\x20\x69\x64\x3D\x22\x76\x69\x73\x69\x74\x75\x72\x6C\x22\x20\x68\x72\x65\x66\x3D","\x3C\x2F\x66\x6F\x6E\x74\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x72\x3E\x20\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x61\x63\x63\x65\x70\x74\x55\x52\x4C\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x62\x6C\x6F\x63\x6B\x20\x62\x74\x6E\x2D\x69\x6E\x66\x6F\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x31\x30\x70\x78\x3B\x62\x6F\x72\x64\x65\x72\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x64\x61\x72\x6B\x62\x6C\x75\x65\x3B\x22\x3E","\x23\x63\x6C\x61\x6E\x74\x61\x67","\x23\x66\x66\x36\x33\x34\x37","\x5B\x79\x75\x74\x5D","\x79\x75\x74","\x5B\x2F\x79\x75\x74\x5D","\x3C\x2F\x66\x6F\x6E\x74\x3E\x3C\x2F\x61\x3E\x3C\x2F\x62\x72\x3E\x20\x3C\x69\x66\x72\x61\x6D\x65\x20\x74\x79\x70\x65\x3D\x22\x74\x65\x78\x74\x2F\x68\x74\x6D\x6C\x22\x20\x77\x69\x64\x74\x68\x3D\x22\x31\x30\x30\x25\x22\x20\x68\x65\x69\x67\x68\x74\x3D\x22\x61\x75\x74\x6F\x22\x20\x73\x72\x63\x3D\x22\x68\x74\x74\x70\x73\x3A\x2F\x2F\x77\x77\x77\x2E\x79\x6F\x75\x74\x75\x62\x65\x2E\x63\x6F\x6D\x2F\x65\x6D\x62\x65\x64\x2F","\x3F\x61\x75\x74\x6F\x70\x6C\x61\x79\x3D\x31\x26\x61\x6D\x70\x3B\x76\x71\x3D\x74\x69\x6E\x79\x22\x20\x66\x72\x61\x6D\x65\x62\x6F\x72\x64\x65\x72\x3D\x22\x30\x22\x3E\x3C\x2F\x69\x66\x72\x61\x6D\x65\x3E\x3C\x2F\x62\x72\x3E\x20\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x61\x63\x63\x65\x70\x74\x59\x6F\x75\x74\x75\x62\x65\x45\x6D\x62\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x62\x6C\x6F\x63\x6B\x20\x62\x74\x6E\x2D\x69\x6E\x66\x6F\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x31\x30\x70\x78\x3B\x62\x6F\x72\x64\x65\x72\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x64\x61\x72\x6B\x62\x6C\x75\x65\x3B\x22\x3E","\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E\x3C\x62\x72\x3E\x3C\x62\x75\x74\x74\x6F\x6E\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x73\x6D\x20\x62\x74\x6E\x2D\x77\x61\x72\x6E\x69\x6E\x67\x20\x62\x74\x6E\x2D\x73\x70\x65\x63\x74\x61\x74\x65\x20\x62\x74\x6E\x2D\x6E\x6F\x64\x6F\x2D\x68\x69\x64\x65\x61\x6C\x6C\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x2D\x31\x30\x70\x78\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x30\x30\x25\x22\x3E","\x23\x61\x63\x63\x65\x70\x74\x59\x6F\x75\x74\x75\x62\x65\x45\x6D\x62","\x5B\x73\x6B\x79\x70\x65\x5D","\x73\x6B\x79\x70\x65","\x5B\x2F\x73\x6B\x79\x70\x65\x5D","\x6A\x6F\x69\x6E\x2E\x73\x6B\x79\x70\x65\x2E\x63\x6F\x6D\x2F","\x3C\x69\x6D\x67\x20\x73\x72\x63\x3D\x22\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x62\x61\x6E\x6E\x65\x72\x73\x2F\x69\x63\x6F\x6E\x73\x6B\x79\x70\x65\x2E\x70\x6E\x67\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x66\x6C\x6F\x61\x74\x3A\x6C\x65\x66\x74\x3B\x77\x69\x64\x74\x68\x3A\x31\x30\x30\x70\x78\x3B\x68\x65\x69\x67\x68\x74\x3A\x31\x30\x30\x70\x78\x3B\x22\x3E","\x5B\x64\x69\x73\x63\x6F\x72\x64\x5D","\x64\x69\x73\x63\x6F\x72\x64","\x5B\x2F\x64\x69\x73\x63\x6F\x72\x64\x5D","\x64\x69\x73\x63\x6F\x72\x64\x61\x70\x70\x2E\x63\x6F\x6D\x2F\x69\x6E\x76\x69\x74\x65","\x64\x69\x73\x63\x6F\x72\x64\x2E\x67\x67","\x64\x69\x73\x63\x6F\x72\x64\x2E\x63\x6F\x6D","\x3C\x69\x6D\x67\x20\x73\x72\x63\x3D\x22\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x62\x61\x6E\x6E\x65\x72\x73\x2F\x69\x63\x6F\x6E\x64\x69\x73\x63\x6F\x72\x64\x2E\x70\x6E\x67\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x66\x6C\x6F\x61\x74\x3A\x6C\x65\x66\x74\x3B\x77\x69\x64\x74\x68\x3A\x31\x30\x30\x70\x78\x3B\x68\x65\x69\x67\x68\x74\x3A\x31\x30\x30\x70\x78\x3B\x22\x3E","\x4C\x65\x67\x65\x6E\x64\x2E\x4D\x6F\x64","\x63\x6F\x6D","\x64\x6F","\x54\x65\x61\x6D\x35","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x69\x6D\x61\x67\x65","\x75\x72\x6C\x28\x22\x20\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x62\x61\x6E\x6E\x65\x72\x73\x2F\x69\x63\x6F\x67\x65\x6E\x65\x72\x61\x6C\x2E\x67\x69\x66\x20\x22\x29","\x23\x74\x6F\x70\x35\x2D\x68\x75\x64","\x75\x72\x6C\x28\x22\x20\x22\x29","\x48\x65\x6C\x6C\x6F","\x64\x69\x73\x70\x6C\x61\x79","\x23\x6D\x65\x73\x73\x61\x67\x65\x2D\x62\x6F\x78","\x6E\x6F\x6E\x65","\x48\x65\x6C\x6C\x6F\x20\x54\x65\x61\x6D","\x23\x68\x65\x6C\x6C\x6F\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x48\x69\x64\x65\x41\x6C\x6C","\x3C\x2F\x62\x72\x3E\x20\x3C\x62\x75\x74\x74\x6F\x6E\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x73\x6D\x20\x62\x74\x6E\x2D\x70\x72\x69\x6D\x61\x72\x79\x20\x62\x74\x6E\x2D\x70\x6C\x61\x79\x20\x62\x74\x6E\x2D\x64\x6F\x2D\x68\x69\x64\x65\x61\x6C\x6C\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x31\x30\x70\x78\x3B\x62\x6F\x72\x64\x65\x72\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x64\x61\x72\x6B\x62\x6C\x75\x65\x3B\x22\x3E","\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E\x3C\x62\x72\x3E\x3C\x62\x75\x74\x74\x6F\x6E\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x73\x6D\x20\x62\x74\x6E\x2D\x77\x61\x72\x6E\x69\x6E\x67\x20\x62\x74\x6E\x2D\x73\x70\x65\x63\x74\x61\x74\x65\x20\x62\x74\x6E\x2D\x6E\x6F\x64\x6F\x2D\x68\x69\x64\x65\x61\x6C\x6C\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x77\x69\x64\x74\x68\x3A\x20\x31\x30\x30\x25\x3B\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x31\x30\x70\x78\x3B\x22\x3E","\x23\x48\x69\x64\x65\x41\x6C\x6C\x42\x74\x68\x6E","\x2E\x62\x74\x6E\x2E\x62\x74\x6E\x2D\x73\x6D\x2E\x62\x74\x6E\x2D\x70\x72\x69\x6D\x61\x72\x79\x2E\x62\x74\x6E\x2D\x70\x6C\x61\x79\x2E\x62\x74\x6E\x2D\x64\x6F\x2D\x68\x69\x64\x65\x61\x6C\x6C","\x4E\x61\x6D\x65\x50\x65\x72\x6D","\x20\x3C\x2F\x62\x72\x3E\x20\x3C\x62\x75\x74\x74\x6F\x6E\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x73\x6D\x20\x62\x74\x6E\x2D\x70\x72\x69\x6D\x61\x72\x79\x20\x62\x74\x6E\x2D\x70\x6C\x61\x79\x20\x62\x74\x6E\x2D\x64\x6F\x2D\x4E\x61\x6D\x65\x50\x65\x72\x6D\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x31\x30\x70\x78\x3B\x62\x6F\x72\x64\x65\x72\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x64\x61\x72\x6B\x62\x6C\x75\x65\x3B\x22\x3E","\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E\x3C\x62\x72\x3E\x3C\x62\x75\x74\x74\x6F\x6E\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x73\x6D\x20\x62\x74\x6E\x2D\x77\x61\x72\x6E\x69\x6E\x67\x20\x62\x74\x6E\x2D\x73\x70\x65\x63\x74\x61\x74\x65\x20\x62\x74\x6E\x2D\x6E\x6F\x64\x6F\x2D\x4E\x61\x6D\x65\x50\x65\x72\x6D\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x77\x69\x64\x74\x68\x3A\x20\x31\x30\x30\x25\x3B\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x31\x30\x70\x78\x3B\x22\x3E","\x2E\x62\x74\x6E\x2E\x62\x74\x6E\x2D\x73\x6D\x2E\x62\x74\x6E\x2D\x70\x72\x69\x6D\x61\x72\x79\x2E\x62\x74\x6E\x2D\x70\x6C\x61\x79\x2E\x62\x74\x6E\x2D\x64\x6F\x2D\x4E\x61\x6D\x65\x50\x65\x72\x6D","\x64\x54\x72\x6F\x6C\x6C\x32","\x3C\x2F\x62\x72\x3E\x20\x3C\x62\x75\x74\x74\x6F\x6E\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x73\x6D\x20\x62\x74\x6E\x2D\x70\x72\x69\x6D\x61\x72\x79\x20\x62\x74\x6E\x2D\x70\x6C\x61\x79\x20\x62\x74\x6E\x2D\x64\x6F\x2D\x74\x72\x6F\x6C\x6C\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x31\x30\x70\x78\x3B\x62\x6F\x72\x64\x65\x72\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x64\x61\x72\x6B\x62\x6C\x75\x65\x3B\x22\x3E","\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E\x3C\x62\x72\x3E\x3C\x62\x75\x74\x74\x6F\x6E\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x73\x6D\x20\x62\x74\x6E\x2D\x77\x61\x72\x6E\x69\x6E\x67\x20\x62\x74\x6E\x2D\x73\x70\x65\x63\x74\x61\x74\x65\x20\x62\x74\x6E\x2D\x6E\x6F\x64\x6F\x2D\x74\x72\x6F\x6C\x6C\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x77\x69\x64\x74\x68\x3A\x20\x31\x30\x30\x25\x3B\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x31\x30\x70\x78\x3B\x22\x3E","\x2E\x62\x74\x6E\x2E\x62\x74\x6E\x2D\x73\x6D\x2E\x62\x74\x6E\x2D\x70\x72\x69\x6D\x61\x72\x79\x2E\x62\x74\x6E\x2D\x70\x6C\x61\x79\x2E\x62\x74\x6E\x2D\x64\x6F\x2D\x74\x72\x6F\x6C\x6C","\x59\x6F\x75\x74\x75\x62\x65","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x73\x6D\x20\x62\x74\x6E\x2D\x70\x72\x69\x6D\x61\x72\x79\x20\x62\x74\x6E\x2D\x70\x6C\x61\x79\x20\x62\x74\x6E\x2D\x70\x6C\x61\x79\x2D\x79\x6F\x75\x74\x75\x62\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x31\x30\x70\x78\x3B\x62\x6F\x72\x64\x65\x72\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x64\x61\x72\x6B\x62\x6C\x75\x65\x3B\x22\x3E","\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E\x3C\x62\x72\x3E\x3C\x62\x75\x74\x74\x6F\x6E\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x73\x6D\x20\x62\x74\x6E\x2D\x77\x61\x72\x6E\x69\x6E\x67\x20\x62\x74\x6E\x2D\x73\x70\x65\x63\x74\x61\x74\x65\x20\x62\x74\x6E\x2D\x6E\x6F\x70\x6C\x61\x79\x2D\x79\x6F\x75\x74\x75\x62\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x77\x69\x64\x74\x68\x3A\x20\x31\x30\x30\x25\x3B\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x31\x30\x70\x78\x3B\x22\x3E","\x23\x70\x6C\x61\x79\x65\x72\x42\x74\x6E","\x66\x6F\x63\x75\x73\x6F\x75\x74","\x2E\x62\x74\x6E\x2E\x62\x74\x6E\x2D\x73\x6D\x2E\x62\x74\x6E\x2D\x70\x72\x69\x6D\x61\x72\x79\x2E\x62\x74\x6E\x2D\x70\x6C\x61\x79\x2E\x62\x74\x6E\x2D\x70\x6C\x61\x79\x2D\x79\x6F\x75\x74\x75\x62\x65","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x61\x67\x61\x72\x2E\x69\x6F\x2F\x73\x69\x70\x3D\x31\x35\x31\x2E\x38\x30\x2E\x39\x31\x2E\x37\x33\x3A\x31\x35\x31\x31","\x53\x74\x65\x70\x31","\u2104","\x53\x74\x65\x70\x32","\x45\x55\x2D\x4C\x6F\x6E\x64\x6F\x6E","\x52\x55\x2D\x52\x75\x73\x73\x69\x61","\x5B\x44\x6F\x73\x41\x74\x74\x61\x63\x6B\x5D","\x44\x6F\x73\x41\x74\x74\x61\x63\x6B","\x5B\x2F\x44\x6F\x73\x41\x74\x74\x61\x63\x6B\x5D","\x2C","\x74\x61\x72\x67\x65\x74\x69\x6E\x67\x4C\x65\x61\x64\x63\x6C\x69\x65\x6E\x74\x58","\x74\x61\x72\x67\x65\x74\x69\x6E\x67\x4C\x65\x61\x64\x63\x6C\x69\x65\x6E\x74\x59","\x74\x61\x72\x67\x65\x74\x69\x6E\x67\x4C\x65\x61\x64\x58","\x6D\x61\x70\x4F\x66\x66\x73\x65\x74\x58","\x74\x61\x72\x67\x65\x74\x69\x6E\x67\x4C\x65\x61\x64\x59","\x6D\x61\x70\x4F\x66\x66\x73\x65\x74\x59","\x64\x72\x61\x77\x43\x6F\x6D\x6D\x61\x6E\x64\x65\x72\x32","\x3C\x62\x3E","\x3A\x3C\x2F\x62\x3E\x20\x41\x74\x74\x61\x63\x6B\x20","\x63\x61\x6C\x63\x75\x6C\x61\x74\x65\x4D\x61\x70\x53\x65\x63\x74\x6F\x72","\x5B\x44\x6F\x73\x46\x69\x67\x68\x74\x5D","\x44\x6F\x73\x46\x69\x67\x68\x74","\x5B\x2F\x44\x6F\x73\x46\x69\x67\x68\x74\x5D","\x3A\x3C\x2F\x62\x3E\x20\x46\x69\x67\x68\x74\x20","\x5B\x44\x6F\x73\x52\x75\x6E\x5D","\x44\x6F\x73\x52\x75\x6E","\x5B\x2F\x44\x6F\x73\x52\x75\x6E\x5D","\x3A\x3C\x2F\x62\x3E\x20\x52\x75\x6E\x20\x66\x72\x6F\x6D\x20","\x31","\x46\x61\x6C\x73\x65","\x5B\x73\x72\x76\x5D","\x5B\x2F\x73\x72\x76\x5D","\x23","\x3C\x64\x69\x76\x3E\x3C\x69\x6D\x67\x20\x73\x72\x63\x3D\x22\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x62\x61\x6E\x6E\x65\x72\x73\x2F\x69\x63\x6F\x6E\x61\x67\x61\x72\x69\x6F\x2E\x70\x6E\x67\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x66\x6C\x6F\x61\x74\x3A\x6C\x65\x66\x74\x3B\x77\x69\x64\x74\x68\x3A\x31\x30\x30\x70\x78\x3B\x68\x65\x69\x67\x68\x74\x3A\x31\x30\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x6D\x67\x3E","\x3C\x2F\x66\x6F\x6E\x74\x3E\x3C\x2F\x61\x3E\x3C\x2F\x62\x72\x3E\x53\x65\x72\x76\x65\x72\x20\x28\x50\x61\x72\x74\x79\x20\x6D\x6F\x64\x65\x29\x3A\x20","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x61\x63\x63\x65\x70\x74\x53\x65\x72\x76\x65\x72\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x62\x6C\x6F\x63\x6B\x20\x62\x74\x6E\x2D\x69\x6E\x66\x6F\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x31\x30\x70\x78\x3B\x62\x6F\x72\x64\x65\x72\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x64\x61\x72\x6B\x62\x6C\x75\x65\x3B\x22\x3E","\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E\x3C\x2F\x64\x69\x76\x3E","\x4E\x6F\x20\x50\x61\x73\x73\x77\x6F\x72\x64\x20\x4C\x6F\x61\x64\x65\x64","\x6D\x6F\x64\x65","\x55\x6E\x6B\x6E\x6F\x77\x6E","\x3C\x2F\x66\x6F\x6E\x74\x3E\x3C\x2F\x61\x3E\x3C\x2F\x62\x72\x3E\x53\x65\x72\x76\x65\x72\x3A\x20","\x3C\x2F\x62\x72\x3E\x4D\x6F\x64\x65\x3A\x20","\x3C\x2F\x62\x72\x3E\x20\x52\x65\x67\x69\x6F\x6E\x3A\x20","\x3C\x2F\x62\x72\x3E\x20\x50\x61\x73\x73\x77\x6F\x72\x64\x3A\x20","\x3C\x2F\x62\x72\x3E\x20\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x61\x63\x63\x65\x70\x74\x53\x65\x72\x76\x65\x72\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x62\x6C\x6F\x63\x6B\x20\x62\x74\x6E\x2D\x69\x6E\x66\x6F\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x31\x30\x70\x78\x3B\x62\x6F\x72\x64\x65\x72\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x64\x61\x72\x6B\x62\x6C\x75\x65\x3B\x22\x3E","\x73\x65\x74\x55\x6E\x69\x76\x65\x72\x73\x61\x6C\x43\x68\x61\x74","\x61\x75\x74\x68\x65\x6E\x74\x69\x63\x41\x67\x61\x72\x74\x6F\x6F\x6C\x49\x64","\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x27\x66\x61\x20\x66\x61\x2D\x75\x6E\x69\x76\x65\x72\x73\x61\x6C\x2D\x61\x63\x63\x65\x73\x73\x27\x20\x61\x72\x69\x61\x2D\x68\x69\x64\x64\x65\x6E\x3D\x27\x74\x72\x75\x65\x27\x3E\x3C\x2F\x69\x3E","\x3A\x76\x69\x73\x69\x62\x6C\x65","\x69\x73","\x23\x63\x68\x61\x74\x2D\x62\x6F\x78","\x52\x65\x63\x65\x69\x76\x65\x64\x20\x61\x20\x63\x6F\x6D\x6D\x61\x6E\x64\x20\x77\x69\x74\x68\x20\x61\x6E\x20\x75\x6E\x6B\x6E\x6F\x77\x6E\x20\x6E\x61\x6D\x65","\x52\x65\x63\x65\x69\x76\x65\x64\x20\x61\x20\x63\x6F\x6D\x6D\x61\x6E\x64\x20\x77\x69\x74\x68\x20\x61\x6E\x20\x75\x6E\x6B\x6E\x6F\x77\x6E\x20\x6E\x61\x6D\x65\x3A\x20\x63\x75\x73\x74\x6F\x6D\x53\x6B\x69\x6E\x73","\x3C\x64\x69\x76\x20\x63\x6C\x61\x73\x73\x3D\x22\x74\x6F\x61\x73\x74\x2D\x6D\x65\x73\x73\x61\x67\x65\x22\x3E\x3C\x73\x70\x61\x6E\x20\x63\x6C\x61\x73\x73\x3D\x22\x6D\x65\x73\x73\x61\x67\x65\x2D\x6E\x69\x63\x6B\x22\x3E","\x6E\x61\x6D\x65","\x3A\x20\x3C\x2F\x73\x70\x61\x6E\x3E\x3C\x73\x70\x61\x6E\x20\x63\x6C\x61\x73\x73\x3D\x22\x6D\x65\x73\x73\x61\x67\x65\x2D\x74\x65\x78\x74\x22\x3E","\x3C\x2F\x73\x70\x61\x6E\x3E\x3C\x61\x20\x68\x72\x65\x66\x3D\x22\x23\x22\x20\x64\x61\x74\x61\x2D\x75\x73\x65\x72\x2D\x69\x64\x3D\x22\x61\x67\x61\x72\x20\x74\x6F\x6F\x6C\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x6D\x75\x74\x65\x2D\x75\x73\x65\x72\x20\x6F\x67\x69\x63\x6F\x6E\x2D\x75\x73\x65\x72\x2D\x6D\x69\x6E\x75\x73\x22\x3E\x3C\x2F\x61\x3E\x20\x3C\x2F\x64\x69\x76\x3E","\x20\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F","\x6D\x69\x6E\x69\x6D\x61\x70\x20\x73\x65\x72\x76\x65\x72","\x6E\x6F\x4F\x67\x61\x72\x69\x6F\x53\x6F\x63\x6B\x65\x74","\x23\x6D\x65\x73\x73\x61\x67\x65\x53\x6F\x75\x6E\x64","\x5B\x55\x6E\x69\x76\x65\x72\x73\x61\x6C\x20\x63\x68\x61\x74\x5D\x3A","\x23\x63\x6F\x6D\x6D\x61\x6E\x64\x53\x6F\x75\x6E\x64","\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x77\x73\x73\x3A\x2F\x2F\x6D\x69\x6E\x69\x6D\x61\x70\x2E\x61\x67\x61\x72\x74\x6F\x6F\x6C\x2E\x69\x6F\x3A\x39\x30\x30\x30","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x45\x78\x61\x6D\x70\x6C\x65\x53\x63\x72\x69\x70\x74\x73\x2F\x73\x6F\x63\x6B\x65\x74\x2D\x69\x6F\x2E\x6D\x69\x6E\x2E\x6A\x73","\x37\x30\x30\x20\x31\x31\x70\x78\x20\x55\x62\x75\x6E\x74\x75","\x23\x66\x66\x66\x66\x66\x66","\x23\x30\x30\x30\x30\x30\x30","\x50\x49","\x38\x32\x70\x78","\x34\x30\x25","\x4F","\x23\x38\x43\x38\x31\x43\x37","\x4C\x2E\x4D","\x74\x6F\x70\x35\x2D\x68\x75\x64","\x70\x72\x65\x5F\x6C\x6F\x6F\x70\x5F\x74\x69\x6D\x65\x6F\x75\x74","\x77\x61\x69\x74\x20\x66\x6F\x72\x20\x6D\x6F\x64\x20\x74\x6F\x20\x6C\x6F\x61\x64","\x63\x6F\x6E\x66\x69\x67","\x7B\x7D","\x73\x74\x6F\x72\x61\x67\x65\x5F\x67\x65\x74\x56\x61\x6C\x75\x65","\x65\x78\x74\x65\x6E\x64","\x61\x6F\x32\x74","\x23\x61\x6F\x32\x74\x2D\x68\x75\x64\x20\x7B","\x20\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x20\x38\x30\x25\x3B\x20\x70\x6F\x69\x6E\x74\x65\x72\x2D\x65\x76\x65\x6E\x74\x73\x3A\x20\x61\x75\x74\x6F\x3B","\x7D","\x23\x61\x6F\x32\x74\x2D\x68\x75\x64\x20\x2A\x20\x7B","\x20\x75\x73\x65\x72\x2D\x73\x65\x6C\x65\x63\x74\x3A\x20\x61\x75\x74\x6F\x21\x69\x6D\x70\x6F\x72\x74\x61\x6E\x74\x3B","\x23\x61\x6F\x32\x74\x2D\x63\x66\x67\x2D\x64\x6C\x67\x20\x7B","\x20\x62\x6F\x72\x64\x65\x72\x2D\x72\x61\x64\x69\x75\x73\x3A\x30\x3B\x20\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x20\x38\x30\x25\x3B\x20\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x32\x70\x78\x20\x31\x30\x70\x78\x3B\x20\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x20\x66\x69\x78\x65\x64\x3B","\x20\x70\x6F\x69\x6E\x74\x65\x72\x2D\x65\x76\x65\x6E\x74\x73\x3A\x20\x61\x75\x74\x6F\x3B\x20\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x69\x6D\x61\x67\x65\x3A\x20\x75\x72\x6C\x28","\x20\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x66\x66\x66\x66\x66\x66\x3B","\x20\x6F\x76\x65\x72\x66\x6C\x6F\x77\x3A\x20\x68\x69\x64\x64\x65\x6E\x3B","\x23\x61\x6F\x32\x74\x2D\x63\x66\x67\x2D\x64\x6C\x67\x20\x2A\x20\x7B","\x20\x77\x69\x64\x74\x68\x3A\x20\x61\x75\x74\x6F\x3B\x20\x75\x73\x65\x72\x2D\x73\x65\x6C\x65\x63\x74\x3A\x20\x61\x75\x74\x6F\x21\x69\x6D\x70\x6F\x72\x74\x61\x6E\x74\x3B\x20\x70\x6F\x69\x6E\x74\x65\x72\x2D\x65\x76\x65\x6E\x74\x73\x3A\x20\x61\x75\x74\x6F\x3B","\x20\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x20\x72\x65\x6C\x61\x74\x69\x76\x65\x3B\x20\x66\x6C\x6F\x61\x74\x3A\x20\x69\x6E\x69\x74\x69\x61\x6C\x3B","\x23\x61\x6F\x32\x74\x2D\x63\x66\x67\x2D\x64\x6C\x67\x20\x69\x6E\x70\x75\x74\x20\x7B","\x20\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x72\x67\x62\x61\x28\x30\x2C\x30\x2C\x30\x2C\x30\x2E\x34\x29\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x66\x66\x66\x66\x66\x66\x3B","\x3C\x73\x74\x79\x6C\x65\x3E\x0A","\x0A\x3C\x2F\x73\x74\x79\x6C\x65\x3E","\x68\x65\x61\x64","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x61\x6F\x32\x74\x2D\x68\x75\x64\x22\x3E\x3C\x73\x70\x61\x6E\x20\x63\x6C\x61\x73\x73\x3D\x22\x68\x75\x64\x2D\x6D\x61\x69\x6E\x2D\x63\x6F\x6C\x6F\x72\x22\x3E\x55\x6E\x69\x76\x65\x72\x73\x61\x6C\x3A","\x20\x3C\x73\x70\x61\x6E\x20\x69\x64\x3D\x22\x61\x6F\x32\x74\x2D\x63\x61\x70\x74\x75\x72\x65\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x75\x6E\x69\x76\x65\x72\x73\x61\x6C\x2D\x61\x63\x63\x65\x73\x73\x22\x20\x61\x72\x69\x61\x2D\x68\x69\x64\x64\x65\x6E\x3D\x22\x74\x72\x75\x65\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x73\x70\x61\x6E\x3E","\x20\x3C\x73\x70\x61\x6E\x20\x69\x64\x3D\x22\x61\x6F\x32\x74\x2D\x63\x6F\x6E\x66\x69\x67\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x77\x72\x65\x6E\x63\x68\x22\x20\x61\x72\x69\x61\x2D\x68\x69\x64\x64\x65\x6E\x3D\x22\x74\x72\x75\x65\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x73\x70\x61\x6E\x3E\x3C\x2F\x73\x70\x61\x6E\x3E","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x61\x6F\x32\x74\x2D\x74\x6F\x70\x35\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x20\x31\x34\x70\x78\x3B\x22\x3E\x3C\x2F\x64\x69\x76\x3E","\x3C\x2F\x64\x69\x76\x3E","\x63\x61\x70\x74\x75\x72\x65","\x6F\x67\x61\x72\x69\x6F","\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64","\x23\x61\x6F\x32\x74\x2D\x63\x61\x70\x74\x75\x72\x65","\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x74\x69\x6D\x65\x73\x22\x20\x61\x72\x69\x61\x2D\x68\x69\x64\x64\x65\x6E\x3D\x22\x74\x72\x75\x65\x22\x3E\x3C\x2F\x69\x3E","\x63\x61\x70\x74\x75\x72\x65\x5F\x73\x74\x61\x72\x74","\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x75\x6E\x69\x76\x65\x72\x73\x61\x6C\x2D\x61\x63\x63\x65\x73\x73\x22\x20\x61\x72\x69\x61\x2D\x68\x69\x64\x64\x65\x6E\x3D\x22\x74\x72\x75\x65\x22\x3E\x3C\x2F\x69\x3E","\x63\x61\x70\x74\x75\x72\x65\x5F\x65\x6E\x64","\x63\x6F\x6C\x6F\x72","\x6D\x6F\x75\x73\x65\x6C\x65\x61\x76\x65","\x23\x68\x75\x64\x54\x65\x78\x74\x43\x6F\x6C\x6F\x72","\x6D\x6F\x75\x73\x65\x65\x6E\x74\x65\x72","\x23\x61\x6F\x32\x74\x2D\x63\x6F\x6E\x66\x69\x67","\x6C\x6D\x73\x61\x5F\x74\x65\x61\x6D\x74\x6F\x70","\x6D\x6F\x75\x73\x65\x64\x6F\x77\x6E","\x23\x61\x6F\x32\x74\x2D\x68\x75\x64","\x6C\x6D\x73\x61\x5F\x63\x68\x61\x74","\x63\x68\x61\x74\x5F\x63\x6C\x6F\x73\x65","\x3C\x61\x20\x68\x72\x65\x66\x3D\x22\x23\x22\x20\x69\x64\x3D\x22\x61\x6F\x32\x74\x2D\x63\x68\x61\x74\x2D\x63\x6C\x6F\x73\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x66\x6C\x6F\x61\x74\x3A\x72\x69\x67\x68\x74\x3B\x22\x3E\x58\x3C\x2F\x61\x3E","\x23\x6D\x65\x73\x73\x61\x67\x65\x2D\x6D\x65\x6E\x75","\x63\x68\x61\x74\x43\x6C\x6F\x73\x65","\x23\x61\x6F\x32\x74\x2D\x63\x68\x61\x74\x2D\x63\x6C\x6F\x73\x65","\x63\x68\x61\x74\x5F\x76\x63\x65\x6E\x74\x65\x72","\x62\x6F\x74\x74\x6F\x6D","\x6D\x65\x73\x73\x61\x67\x65\x42\x6F\x78\x42\x6F\x74\x74\x6F\x6D","\x61\x6C\x74\x4B\x65\x79","\x63\x74\x72\x6C\x4B\x65\x79","\x63","\x6D\x65\x74\x61\x4B\x65\x79","\x73\x68\x69\x66\x74\x4B\x65\x79","\x73","\x6B\x65\x79\x43\x6F\x64\x65","\x6B\x65\x79\x43\x6F\x64\x65\x45\x6E\x74\x65\x72","\x63\x68\x61\x74\x5F\x61\x6C\x74","\x63\x68\x61\x74\x53\x65\x6E\x64","\x61\x63","\x63\x68\x61\x74\x5F\x63\x74\x72\x6C\x61\x6C\x74","\x63\x68\x61\x74\x5F\x63\x74\x72\x6C","\x6B\x65\x79\x64\x6F\x77\x6E","\x23\x6D\x65\x73\x73\x61\x67\x65","\x73\x6B\x69\x6E\x54\x6F\x67\x67\x6C\x65\x5F\x73\x74\x61\x72\x74","\x64\x72\x61\x67\x67\x61\x62\x6C\x65","\x23\x61\x6F\x32\x74\x2D\x63\x66\x67\x2D\x64\x6C\x67","\x23\x61\x6F\x32\x74\x2D\x6D\x65\x73\x73\x61\x67\x65","\x23\x61\x6F\x32\x74\x2D\x6D\x69\x6E\x69\x6D\x61\x70","\x63\x61\x70\x74\x75\x72\x65\x5F\x69\x6E\x69\x74","\x74\x6F\x6B\x65\x6E","\x77\x73","\x77\x73\x73\x3A\x2F\x2F\x6C\x69\x76\x65\x2D\x61\x72\x65\x6E\x61\x2D","\x2E\x61\x67\x61\x72\x2E\x69\x6F\x3A\x38\x30","\x63\x6F\x6E\x6E\x65\x63\x74","\x75\x70\x64\x61\x74\x65\x5F\x74\x69\x6D\x65\x72\x69\x64","\x75\x70\x64\x61\x74\x65","\x75\x70\x64\x61\x74\x65\x5F\x69\x6E\x74\x65\x72\x76\x61\x6C","\x23\x61\x6F\x32\x74\x2D\x74\x6F\x70\x35","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x3C\x61\x20\x68\x72\x65\x66\x3D\x22\x23\x22\x20\x69\x64\x3D\x22\x61\x6F\x32\x74\x2D\x6D\x65\x73\x73\x61\x67\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x66\x6C\x6F\x61\x74\x3A\x6C\x65\x66\x74\x3B\x22\x3E","\x74\x6F\x6F\x6C\x5F\x73\x79\x6D\x62\x6F\x6C","\x3C\x2F\x61\x3E","\x70\x72\x65\x70\x65\x6E\x64","\x23\x6D\x69\x6E\x69\x6D\x61\x70","\x68\x65\x69\x67\x68\x74","\x3C\x63\x61\x6E\x76\x61\x73\x20\x69\x64\x3D\x22\x61\x6F\x32\x74\x2D\x6D\x69\x6E\x69\x6D\x61\x70\x22","\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x20\x61\x62\x73\x6F\x6C\x75\x74\x65\x3B\x22","\x20\x77\x69\x64\x74\x68\x3D\x22","\x22\x20\x68\x65\x69\x67\x68\x74\x3D\x22","\x22\x3E","\x68\x61\x73\x43\x6C\x61\x73\x73","\x4C\x2E\x4D\x3A\x2D\x3E\x41\x2E\x54\x3A\x20\x6E\x6F\x74\x20\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64","\x74\x6F\x61\x73\x74\x72","\x63\x68\x61\x74","\x4C\x4D\x3A","\x73\x65\x6E\x64\x4D\x69\x6E\x69\x6D\x61\x70\x53\x65\x72\x76\x65\x72\x43\x6F\x6D\x6D\x61\x6E\x64","\x6F\x67\x61\x72","\x74\x72\x69\x67\x67\x65\x72","\x4D\x65\x73\x73\x61\x67\x65\x20\x69\x6E\x63\x6C\x75\x64\x65\x64\x20\x53\x63\x72\x69\x70\x74\x20\x63\x6F\x6D\x6D\x61\x6E\x64\x2C\x20\x74\x68\x75\x73\x20\x69\x74\x20\x69\x73\x20\x6E\x6F\x74\x20\x73\x65\x6E\x74\x20\x74\x6F\x20\x61\x67\x61\x72\x20\x74\x6F\x6F\x6C","\x63\x68\x61\x74\x5F\x75\x6E\x70\x61\x75\x73\x65","\x23\x70\x61\x75\x73\x65\x2D\x68\x75\x64","\x62\x6C\x6F\x63\x6B","\x6B\x65\x79\x43\x6F\x64\x65\x52","\x6B\x65\x79\x75\x70","\x6F\x67\x61\x72\x49\x73\x41\x6C\x69\x76\x65","\x61\x6C\x69\x76\x65","\x74\x67\x61\x72\x41\x6C\x69\x76\x65","\x74\x67\x61\x72\x52\x65\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x6F\x67\x61\x72\x4D\x69\x6E\x69\x6D\x61\x70\x55\x70\x64\x61\x74\x65","\x63\x6F\x6E\x66\x69\x67\x5F\x69\x6E\x69\x74","\x63\x66\x67\x5F\x6C\x6F\x61\x64","\x23\x6F\x76\x65\x72\x6C\x61\x79\x73","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x61\x6F\x32\x74\x2D\x63\x66\x67\x2D\x64\x6C\x67\x22","\x20\x20\x73\x74\x79\x6C\x65\x3D\x22\x77\x69\x64\x74\x68\x3A\x34\x30\x30\x70\x78\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x34\x38\x30\x70\x78\x3B\x20\x74\x6F\x70\x3A\x31\x35\x30\x70\x78\x3B\x20\x6C\x65\x66\x74\x3A\x33\x30\x30\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B","\x41\x67\x61\x72\x20\x54\x6F\x6F\x6C\x2F\x4C\x65\x67\x65\x6E\x64\x20\x4D\x6F\x64\x20\x74\x6F\x6F\x6C\x73","\x3C\x64\x69\x76\x20\x73\x74\x79\x6C\x65\x3D\x22\x6F\x76\x65\x72\x66\x6C\x6F\x77\x3A\x20\x73\x63\x72\x6F\x6C\x6C\x3B\x20","\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x20\x72\x65\x6C\x61\x74\x69\x76\x65\x3B\x20\x74\x6F\x70\x3A\x31\x2E\x35\x65\x6D\x3B\x20\x6C\x65\x66\x74\x3A\x30\x2E\x35\x65\x6D\x3B\x20\x72\x69\x67\x68\x74\x3A\x30\x2E\x35\x65\x6D\x3B\x20\x62\x6F\x74\x74\x6F\x6D\x3A\x31\x2E\x35\x65\x6D\x3B\x22\x3E","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x61\x6F\x32\x74\x2D\x63\x66\x67\x2D\x62\x61\x73\x65\x22\x3E","\x3C\x2F\x64\x69\x76\x3E\x3C\x62\x72\x3E\x3C\x62\x72\x3E","\x26\x6E\x62\x73\x70\x3B\x3C\x73\x70\x61\x6E\x20\x69\x64\x3D\x22\x61\x6F\x32\x74\x2D\x63\x66\x67\x2D\x64\x65\x66\x61\x75\x6C\x74\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x70\x72\x69\x6D\x61\x72\x79\x22\x3E","\x74\x6F\x55\x70\x70\x65\x72\x43\x61\x73\x65","\x3C\x2F\x73\x70\x61\x6E\x3E","\x26\x6E\x62\x73\x70\x3B\x3C\x73\x70\x61\x6E\x20\x69\x64\x3D\x22\x61\x6F\x32\x74\x2D\x63\x66\x67\x2D\x6F\x6B\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x73\x75\x63\x63\x65\x73\x73\x22\x3E","\x26\x6E\x62\x73\x70\x3B\x3C\x73\x70\x61\x6E\x20\x69\x64\x3D\x22\x61\x6F\x32\x74\x2D\x63\x66\x67\x2D\x63\x61\x6E\x63\x65\x6C\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x64\x61\x6E\x67\x65\x72\x22\x3E","\x26\x6E\x62\x73\x70\x3B\x26\x6E\x62\x73\x70\x3B\x26\x6E\x62\x73\x70\x3B\x55\x70\x64\x61\x74\x65\x20\x66\x72\x65\x71\x75\x65\x6E\x63\x79\x20\x5B\x6D\x69\x6C\x6C\x69\x73\x65\x63\x6F\x6E\x64\x73\x5D\x3A\x3C\x69\x6E\x70\x75\x74\x20\x74\x79\x70\x65\x3D\x22\x74\x65\x78\x74\x22\x20\x64\x61\x74\x61\x2D\x61\x6F\x32\x74\x2D\x63\x6F\x6E\x66\x69\x67\x3D\x22\x75\x70\x64\x61\x74\x65\x5F\x69\x6E\x74\x65\x72\x76\x61\x6C\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x77\x69\x64\x74\x68\x3A\x36\x65\x6D\x3B\x22\x2F\x3E","\x3C\x62\x72\x2F\x3E\x41\x67\x61\x72\x20\x54\x6F\x6F\x6C\x20\x4F\x62\x74\x61\x69\x6E\x65\x64\x20\x66\x72\x6F\x6D","\x3C\x62\x72\x2F\x3E\x26\x6E\x62\x73\x70\x3B\x3C\x6C\x61\x62\x65\x6C\x3E\x3C\x69\x6E\x70\x75\x74\x20\x74\x79\x70\x65\x3D\x22\x63\x68\x65\x63\x6B\x62\x6F\x78\x22\x20\x64\x61\x74\x61\x2D\x61\x6F\x32\x74\x2D\x63\x6F\x6E\x66\x69\x67\x3D\x22\x75\x73\x65\x72\x5F\x73\x68\x6F\x77\x22\x2F\x3E\x75\x73\x65\x72\x20\x6C\x69\x73\x74\x3C\x2F\x6C\x61\x62\x65\x6C\x3E","\x3C\x62\x72\x2F\x3E\x26\x6E\x62\x73\x70\x3B\x3C\x6C\x61\x62\x65\x6C\x3E\x3C\x69\x6E\x70\x75\x74\x20\x74\x79\x70\x65\x3D\x22\x63\x68\x65\x63\x6B\x62\x6F\x78\x22\x20\x64\x61\x74\x61\x2D\x61\x6F\x32\x74\x2D\x63\x6F\x6E\x66\x69\x67\x3D\x22\x6D\x69\x6E\x69\x6D\x61\x70\x5F\x73\x68\x6F\x77\x22\x2F\x3E\x6D\x69\x6E\x69\x6D\x61\x70\x3C\x2F\x6C\x61\x62\x65\x6C\x3E","\x26\x6E\x62\x73\x70\x3B\x50\x72\x65\x66\x69\x78\x3A\x3C\x69\x6E\x70\x75\x74\x20\x74\x79\x70\x65\x3D\x22\x74\x65\x78\x74\x22\x20\x64\x61\x74\x61\x2D\x61\x6F\x32\x74\x2D\x63\x6F\x6E\x66\x69\x67\x3D\x22\x74\x67\x61\x72\x5F\x70\x72\x65\x66\x69\x78\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x77\x69\x64\x74\x68\x3A\x34\x65\x6D\x3B\x22\x2F\x3E","\x26\x6E\x62\x73\x70\x3B\x26\x6E\x62\x73\x70\x3B\x63\x6F\x6C\x6F\x72\x3A\x3C\x69\x6E\x70\x75\x74\x20\x74\x79\x70\x65\x3D\x22\x74\x65\x78\x74\x22\x20\x64\x61\x74\x61\x2D\x61\x6F\x32\x74\x2D\x63\x6F\x6E\x66\x69\x67\x3D\x22\x74\x67\x61\x72\x5F\x63\x6F\x6C\x6F\x72\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x77\x69\x64\x74\x68\x3A\x36\x65\x6D\x3B\x22\x2F\x3E","\x3C\x62\x72\x2F\x3E\x53\x65\x6E\x64\x20\x74\x6F\x20\x41\x67\x61\x72\x20\x54\x6F\x6F\x6C","\x3C\x62\x72\x2F\x3E\x26\x6E\x62\x73\x70\x3B\x3C\x6C\x61\x62\x65\x6C\x3E\x3C\x69\x6E\x70\x75\x74\x20\x74\x79\x70\x65\x3D\x22\x63\x68\x65\x63\x6B\x62\x6F\x78\x22\x20\x64\x61\x74\x61\x2D\x61\x6F\x32\x74\x2D\x63\x6F\x6E\x66\x69\x67\x3D\x22\x6F\x67\x61\x72\x5F\x75\x73\x65\x72\x22\x2F\x3E\x75\x73\x65\x72\x20\x69\x6E\x66\x6F\x3C\x2F\x6C\x61\x62\x65\x6C\x3E","\x26\x6E\x62\x73\x70\x3B\x50\x72\x65\x66\x69\x78\x3A\x3C\x69\x6E\x70\x75\x74\x20\x74\x79\x70\x65\x3D\x22\x74\x65\x78\x74\x22\x20\x64\x61\x74\x61\x2D\x61\x6F\x32\x74\x2D\x63\x6F\x6E\x66\x69\x67\x3D\x22\x6F\x67\x61\x72\x5F\x70\x72\x65\x66\x69\x78\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x77\x69\x64\x74\x68\x3A\x34\x65\x6D\x3B\x22\x2F\x3E","\x3C\x62\x72\x2F\x3E\x4C\x4D\x42\x2D\x4D\x6F\x75\x73\x65\x20\x73\x70\x6C\x69\x74\x20\x63\x6F\x72\x72\x65\x63\x74\x69\x6F\x6E","\x3C\x62\x72\x2F\x3E\x26\x6E\x62\x73\x70\x3B\x3C\x6C\x61\x62\x65\x6C\x3E\x3C\x69\x6E\x70\x75\x74\x20\x74\x79\x70\x65\x3D\x22\x63\x68\x65\x63\x6B\x62\x6F\x78\x22\x20\x64\x61\x74\x61\x2D\x61\x6F\x32\x74\x2D\x63\x6F\x6E\x66\x69\x67\x3D\x22\x6C\x6D\x73\x61\x5F\x74\x65\x61\x6D\x74\x6F\x70\x22\x2F\x3E\x54\x65\x61\x6D\x62\x6F\x61\x72\x64\x3C\x2F\x6C\x61\x62\x65\x6C\x3E","\x26\x6E\x62\x73\x70\x3B\x3C\x6C\x61\x62\x65\x6C\x3E\x3C\x69\x6E\x70\x75\x74\x20\x74\x79\x70\x65\x3D\x22\x63\x68\x65\x63\x6B\x62\x6F\x78\x22\x20\x64\x61\x74\x61\x2D\x61\x6F\x32\x74\x2D\x63\x6F\x6E\x66\x69\x67\x3D\x22\x6C\x6D\x73\x61\x5F\x63\x68\x61\x74\x22\x2F\x3E\x63\x68\x61\x74\x3C\x2F\x6C\x61\x62\x65\x6C\x3E","\x3C\x62\x72\x2F\x3E\x43\x68\x61\x74\x20\x6F\x70\x74\x69\x6F\x6E","\x3C\x62\x72\x2F\x3E\x26\x6E\x62\x73\x70\x3B\x3C\x6C\x61\x62\x65\x6C\x3E\x3C\x69\x6E\x70\x75\x74\x20\x74\x79\x70\x65\x3D\x22\x63\x68\x65\x63\x6B\x62\x6F\x78\x22\x20\x64\x61\x74\x61\x2D\x61\x6F\x32\x74\x2D\x63\x6F\x6E\x66\x69\x67\x3D\x22\x63\x68\x61\x74\x5F\x63\x6C\x6F\x73\x65\x22\x2F\x3E\x63\x6C\x6F\x73\x65\x3C\x2F\x6C\x61\x62\x65\x6C\x3E","\x26\x6E\x62\x73\x70\x3B\x3C\x6C\x61\x62\x65\x6C\x3E\x3C\x69\x6E\x70\x75\x74\x20\x74\x79\x70\x65\x3D\x22\x63\x68\x65\x63\x6B\x62\x6F\x78\x22\x20\x64\x61\x74\x61\x2D\x61\x6F\x32\x74\x2D\x63\x6F\x6E\x66\x69\x67\x3D\x22\x63\x68\x61\x74\x5F\x75\x6E\x70\x61\x75\x73\x65\x22\x2F\x3E\x75\x6E\x70\x61\x75\x73\x65\x3C\x2F\x6C\x61\x62\x65\x6C\x3E","\x26\x6E\x62\x73\x70\x3B\x3C\x6C\x61\x62\x65\x6C\x3E\x3C\x69\x6E\x70\x75\x74\x20\x74\x79\x70\x65\x3D\x22\x63\x68\x65\x63\x6B\x62\x6F\x78\x22\x20\x64\x61\x74\x61\x2D\x61\x6F\x32\x74\x2D\x63\x6F\x6E\x66\x69\x67\x3D\x22\x63\x68\x61\x74\x5F\x76\x63\x65\x6E\x74\x65\x72\x22\x2F\x3E\x76\x63\x65\x6E\x74\x65\x72\x3C\x2F\x6C\x61\x62\x65\x6C\x3E","\x3C\x62\x72\x2F\x3E\x26\x6E\x62\x73\x70\x3B\x3C\x6C\x61\x62\x65\x6C\x3E\x3C\x69\x6E\x70\x75\x74\x20\x74\x79\x70\x65\x3D\x22\x63\x68\x65\x63\x6B\x62\x6F\x78\x22\x20\x64\x61\x74\x61\x2D\x61\x6F\x32\x74\x2D\x63\x6F\x6E\x66\x69\x67\x3D\x22\x63\x68\x61\x74\x5F\x61\x6C\x74\x22\x2F\x3E\x41\x6C\x74\x3E\x54\x3C\x2F\x6C\x61\x62\x65\x6C\x3E","\x26\x6E\x62\x73\x70\x3B\x3C\x6C\x61\x62\x65\x6C\x3E\x3C\x69\x6E\x70\x75\x74\x20\x74\x79\x70\x65\x3D\x22\x63\x68\x65\x63\x6B\x62\x6F\x78\x22\x20\x64\x61\x74\x61\x2D\x61\x6F\x32\x74\x2D\x63\x6F\x6E\x66\x69\x67\x3D\x22\x63\x68\x61\x74\x5F\x63\x74\x72\x6C\x61\x6C\x74\x22\x2F\x3E\x43\x74\x72\x6C\x2B\x41\x6C\x74\x3E\x4F\x2B\x54\x3C\x2F\x6C\x61\x62\x65\x6C\x3E","\x26\x6E\x62\x73\x70\x3B\x3C\x6C\x61\x62\x65\x6C\x3E\x3C\x69\x6E\x70\x75\x74\x20\x74\x79\x70\x65\x3D\x22\x63\x68\x65\x63\x6B\x62\x6F\x78\x22\x20\x64\x61\x74\x61\x2D\x61\x6F\x32\x74\x2D\x63\x6F\x6E\x66\x69\x67\x3D\x22\x63\x68\x61\x74\x5F\x63\x74\x72\x6C\x22\x2F\x3E\x43\x74\x72\x6C\x3E\x43\x6C\x6F\x73\x65\x3C\x2F\x6C\x61\x62\x65\x6C\x3E","\x3C\x62\x72\x2F\x3E\x4F\x74\x68\x65\x72","\x3C\x62\x72\x2F\x3E\x26\x6E\x62\x73\x70\x3B\x3C\x6C\x61\x62\x65\x6C\x3E\x3C\x69\x6E\x70\x75\x74\x20\x74\x79\x70\x65\x3D\x22\x63\x68\x65\x63\x6B\x62\x6F\x78\x22\x20\x64\x61\x74\x61\x2D\x61\x6F\x32\x74\x2D\x63\x6F\x6E\x66\x69\x67\x3D\x22\x73\x6B\x69\x6E\x5F\x74\x6F\x67\x67\x6C\x65\x5F\x61\x75\x74\x6F\x22\x2F\x3E\x73\x6B\x69\x6E\x20\x61\x75\x74\x6F\x20\x74\x6F\x67\x67\x6C\x65\x3C\x2F\x6C\x61\x62\x65\x6C\x3E","\x26\x6E\x62\x73\x70\x3B\x26\x6E\x62\x73\x70\x3B\x26\x6E\x62\x73\x70\x3B\x46\x72\x65\x71\x75\x65\x6E\x63\x79\x20\x5B\x6D\x69\x6C\x6C\x69\x73\x65\x63\x6F\x6E\x64\x73\x5D\x3A\x3C\x69\x6E\x70\x75\x74\x20\x74\x79\x70\x65\x3D\x22\x74\x65\x78\x74\x22\x20\x64\x61\x74\x61\x2D\x61\x6F\x32\x74\x2D\x63\x6F\x6E\x66\x69\x67\x3D\x22\x73\x6B\x69\x6E\x5F\x74\x6F\x67\x67\x6C\x65\x5F\x69\x6E\x74\x65\x72\x76\x61\x6C\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x77\x69\x64\x74\x68\x3A\x36\x65\x6D\x3B\x22\x2F\x3E","\x3C\x62\x72\x2F\x3E\x26\x6E\x62\x73\x70\x3B\x26\x6E\x62\x73\x70\x3B\x2A\x20\x43\x68\x61\x6E\x67\x65\x73\x20\x77\x69\x6C\x6C\x20\x62\x65\x20\x72\x65\x66\x6C\x65\x63\x74\x65\x64\x20\x61\x66\x74\x65\x72\x20\x72\x65\x73\x74\x61\x72\x74","\x23\x61\x6F\x32\x74\x2D\x63\x66\x67\x2D\x62\x61\x73\x65","\x23\x61\x6F\x32\x74\x2D\x63\x66\x67\x2D\x64\x65\x66\x61\x75\x6C\x74","\x63\x66\x67\x5F\x73\x61\x76\x65","\x73\x74\x6F\x72\x61\x67\x65\x5F\x73\x65\x74\x56\x61\x6C\x75\x65","\x63\x6F\x6E\x66\x69\x67\x5F\x63\x61\x6E\x63\x65\x6C","\x23\x61\x6F\x32\x74\x2D\x63\x66\x67\x2D\x6F\x6B","\x23\x61\x6F\x32\x74\x2D\x63\x66\x67\x2D\x63\x61\x6E\x63\x65\x6C","\x73\x6B\x69\x6E\x54\x6F\x67\x67\x6C\x65\x5F\x74\x69\x6D\x65\x72\x69\x64","\x73\x6B\x69\x6E\x5F\x74\x6F\x67\x67\x6C\x65\x5F\x61\x75\x74\x6F","\x73\x6B\x69\x6E\x5F\x74\x6F\x67\x67\x6C\x65\x5F\x69\x6E\x74\x65\x72\x76\x61\x6C","\x73\x6B\x69\x6E\x54\x6F\x67\x67\x6C\x65\x5F\x75\x70\x64\x61\x74\x65","\x63\x75\x73\x74\x6F\x6D\x53\x6B\x69\x6E\x73","\x76\x61\x6E\x69\x6C\x6C\x61\x53\x6B\x69\x6E\x73","\x73\x6B\x69\x6E\x54\x6F\x67\x67\x6C\x65\x5F\x68\x61\x73\x42\x6F\x74\x68","\x73\x6B\x69\x6E\x54\x6F\x67\x67\x6C\x65\x5F\x75\x70\x64\x61\x74\x65\x5F\x73\x75\x62","\x6B\x65\x79\x43\x6F\x64\x65\x41","\x69\x6F","\x73\x6F\x63\x6B\x65\x74\x49\x6F\x55\x52\x4C","\x76\x65\x72\x73\x69\x6F\x6E\x3D","\x26\x73\x65\x72\x76\x65\x72\x3D","\x67\x72\x61\x62\x5F\x73\x6F\x63\x6B\x65\x74","\x6D\x69\x6E\x69\x6D\x61\x70\x5F\x69\x6E\x66\x6F","\x6D\x69\x6E\x69\x6D\x61\x70\x5F\x63\x6F\x6E\x6E\x65\x63\x74","\x6F\x6E","\x6D\x69\x6E\x69\x6D\x61\x70\x5F\x73\x6F\x63\x6B\x65\x74","\x4F\x6E\x63\x65\x55\x73\x65\x64","\x74\x6F\x4C\x6F\x77\x65\x72\x43\x61\x73\x65","\x3D","\x6D\x69\x6E\x69\x6D\x61\x70\x53\x65\x72\x76\x65\x72","\x72\x65\x73\x65\x74\x4D\x69\x6E\x69\x6D\x61\x70","\x73\x65\x72\x76\x65\x72\x3D","\x61\x67\x61\x72\x53\x65\x72\x76\x65\x72","\x26\x74\x61\x67\x3D","\x63\x6F\x6D\x6D\x61\x6E\x64","\x6D\x69\x6E\x69\x6D\x61\x70\x5F\x63\x6F\x6D\x6D\x61\x6E\x64","\x6D\x69\x6E\x69\x6D\x61\x70\x5F\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x63\x6F\x6E\x6E\x65\x63\x74\x5F\x65\x72\x72\x6F\x72","\x74\x65\x61\x6D\x6D\x61\x74\x65\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x6E\x69\x63\x6B\x73","\x70\x6C\x61\x79\x65\x72\x4E\x61\x6D\x65","\x41\x6E\x20\x75\x6E\x6E\x61\x6D\x65\x64\x20\x63\x65\x6C\x6C","\x73\x6F\x63\x6B\x65\x74\x49\x44","\x78","\x79","\x74\x67\x61\x72\x5F\x63\x6F\x6C\x6F\x72","\x61\x64\x64\x42\x61\x6C\x6C\x54\x6F\x4D\x69\x6E\x69\x6D\x61\x70","\x61\x64\x64","\x72\x65\x6D\x6F\x76\x65\x42\x61\x6C\x6C\x46\x72\x6F\x6D\x4D\x69\x6E\x69\x6D\x61\x70","\x6D\x6F\x76\x65\x42\x61\x6C\x6C\x4F\x6E\x4D\x69\x6E\x69\x6D\x61\x70","\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x61\x67\x74\x6F\x6F\x6C\x62\x61\x6C\x6C","\x63\x75\x73\x74\x6F\x6D\x73","\x73\x68\x6F\x77\x43\x75\x73\x74\x6F\x6D\x53\x6B\x69\x6E\x73","\x25","\x72\x65\x67\x69\x73\x74\x65\x72\x53\x6B\x69\x6E","\x66\x6F\x72\x45\x61\x63\x68","\x6B\x65\x79\x73","\x72\x65\x73\x65\x74","\x6D\x65\x73\x73\x61\x67\x65","\x6F\x67\x61\x72\x43\x68\x61\x74\x41\x64\x64","\x55\x6E\x6B\x6E\x6F\x77\x6E\x20\x63\x6F\x6D\x6D\x61\x6E\x64\x20\x6C\x73\x3A\x20","\x6C\x73","\x68\x63","\x52\x65\x63\x65\x69\x76\x65\x64\x20\x61\x20\x63\x6F\x6D\x6D\x61\x6E\x64\x20\x77\x69\x74\x68\x20\x61\x6E\x20\x75\x6E\x6B\x6E\x6F\x77\x6E\x20\x6E\x61\x6D\x65\x3A\x20","\x65\x6D\x69\x74","\x6D\x69\x6E\x69\x6D\x61\x70\x42\x61\x6C\x6C\x73","\x69\x73\x44\x65\x66\x61\x75\x6C\x74","\x6C\x61\x73\x74\x58","\x6C\x61\x73\x74\x59","\x76\x69\x73\x69\x62\x6C\x65","\x6F\x67\x61\x72\x5F\x75\x73\x65\x72","\x6F\x67\x61\x72\x5F\x70\x72\x65\x66\x69\x78","\x23\x73\x6B\x69\x6E","\x64\x65\x61\x64","\x70\x6C\x61\x79\x65\x72\x58","\x70\x6C\x61\x79\x65\x72\x59","\x24\x31","\x74\x6F\x54\x69\x6D\x65\x53\x74\x72\x69\x6E\x67","\x3C\x64\x69\x76\x20\x63\x6C\x61\x73\x73\x3D\x22\x6D\x65\x73\x73\x61\x67\x65\x22\x3E","\x3C\x73\x70\x61\x6E\x20\x63\x6C\x61\x73\x73\x3D\x22\x6D\x65\x73\x73\x61\x67\x65\x2D\x74\x69\x6D\x65\x22\x3E\x5B","\x5D\x20\x3C\x2F\x73\x70\x61\x6E\x3E","\x3C\x73\x70\x61\x6E\x20\x73\x74\x79\x6C\x65\x3D\x22\x63\x6F\x6C\x6F\x72\x3A","\x6D\x65\x73\x73\x61\x67\x65\x54\x65\x78\x74\x43\x6F\x6C\x6F\x72","\x3B\x20\x66\x6F\x6E\x74\x2D\x77\x65\x69\x67\x68\x74\x3A\x37\x30\x30\x3B\x22\x3E","\x3C\x2F\x73\x70\x61\x6E\x3E\x3A\x20","\x3C\x73\x70\x61\x6E\x20\x63\x6C\x61\x73\x73\x3D\x22\x6D\x65\x73\x73\x61\x67\x65\x2D\x74\x65\x78\x74\x22\x3E","\x70\x65\x72\x66\x65\x63\x74\x53\x63\x72\x6F\x6C\x6C\x62\x61\x72","\x73\x63\x72\x6F\x6C\x6C\x48\x65\x69\x67\x68\x74","\x61\x6E\x69\x6D\x61\x74\x65","\x61\x67\x61\x72\x74\x6F\x6F\x6C\x74\x65\x61\x6D\x6D\x61\x74\x65\x6E\x69\x63\x6B\x73","\x6F\x67\x61\x72\x47\x65\x74\x4D\x61\x70\x53\x69\x7A\x65","\x6F\x67\x61\x72\x47\x65\x74\x4D\x61\x70\x4F\x66\x66\x73\x65\x74","\x6D\x69\x6E\x69\x6D\x61\x70\x4F\x66\x66\x73\x65\x74\x58","\x6D\x69\x6E\x69\x6D\x61\x70\x4F\x66\x66\x73\x65\x74\x59","\x6D\x69\x6E\x69\x6D\x61\x70\x54\x65\x61\x6D\x6D\x61\x74\x65\x73\x53\x69\x7A\x65","\x32\x64","\x67\x65\x74\x43\x6F\x6E\x74\x65\x78\x74","\x63\x6C\x65\x61\x72\x52\x65\x63\x74","\x66\x6F\x6E\x74","\x6D\x69\x6E\x69\x6D\x61\x70\x4E\x69\x63\x6B\x46\x6F\x6E\x74","\x74\x6F\x70\x35\x73\x6B\x69\x6E\x73","\x31\x2E\x20","\x73\x6F\x72\x74","\x61\x67\x61\x72\x74\x6F\x6F\x6C\x6D\x69\x6E\x69\x6D\x61\x70\x42\x61\x6C\x6C\x73","\x70\x72\x65\x64\x69\x63\x74\x65\x64\x47\x68\x6F\x73\x74\x43\x65\x6C\x6C\x73\x41\x72\x72\x61\x79","\x70\x72\x65\x64\x69\x63\x74\x65\x64\x47\x68\x6F\x73\x74\x43\x65\x6C\x6C\x73","\x6C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x70\x6F\x73","\x73\x68\x69\x66\x74","\x70\x75\x73\x68","\x63\x75\x73\x74\x6F\x6D\x53\x6B\x69\x6E\x73\x4D\x61\x70","\x5F\x63\x61\x63\x68\x65\x64\x32","\x63\x75\x73\x74\x6F\x6D\x53\x6B\x69\x6E\x73\x43\x61\x63\x68\x65","\x3C\x61\x20\x68\x72\x65\x66\x3D\x22\x23\x22\x20\x69\x64\x3D\x22\x70\x6F\x73\x2D\x73\x6B\x69\x6E\x22\x20\x63\x6C\x61\x73\x73\x3D\x20\x22\x73\x65\x74\x2D\x74\x61\x72\x67\x65\x74\x22\x20\x64\x61\x74\x61\x2D\x75\x73\x65\x72\x2D\x69\x64\x3D\x22","\x22\x73\x74\x79\x6C\x65\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20","\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x33\x30\x70\x78\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x34\x30\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x69\x6E\x6C\x69\x6E\x65\x2D\x62\x6C\x6F\x63\x6B\x3B\x22\x3E\x3C\x73\x70\x61\x6E\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x20\x61\x62\x73\x6F\x6C\x75\x74\x65\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x6C\x65\x66\x74\x3A\x20\x32\x70\x78\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x32\x36\x70\x78\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x32\x36\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x69\x6E\x6C\x69\x6E\x65\x2D\x62\x6C\x6F\x63\x6B\x3B\x22\x20\x61\x6C\x74\x3D\x22\x22\x3E","\x6F\x75\x74\x65\x72\x48\x54\x4D\x4C","\x3C\x2F\x73\x70\x61\x6E\x3E\x20","\x3C\x2F\x61\x3E\x3C\x64\x69\x76\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x2D\x33\x30\x70\x78\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x6C\x65\x66\x74\x3A\x20\x33\x32\x70\x78\x3B\x22\x3E","\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x33\x30\x70\x78\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x34\x30\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x69\x6E\x6C\x69\x6E\x65\x2D\x62\x6C\x6F\x63\x6B\x3B\x22\x3E\x3C\x69\x6D\x67\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x20\x61\x62\x73\x6F\x6C\x75\x74\x65\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x6C\x65\x66\x74\x3A\x20\x32\x70\x78\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x32\x36\x70\x78\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x32\x36\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x69\x6E\x6C\x69\x6E\x65\x2D\x62\x6C\x6F\x63\x6B\x3B\x22\x20\x73\x72\x63\x20\x3D\x20\x22\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x62\x61\x6E\x6E\x65\x72\x73\x2F\x69\x63\x6F\x6E\x61\x67\x61\x72\x69\x6F\x74\x6F\x6F\x6C\x2E\x70\x6E\x67\x22\x20\x61\x6C\x74\x3D\x22\x22\x3E\x20","\x67\x68\x6F\x73\x74\x43\x65\x6C\x6C\x73","\x3C\x73\x70\x61\x6E\x20\x63\x6C\x61\x73\x73\x3D\x22\x68\x75\x64\x2D\x6D\x61\x69\x6E\x2D\x63\x6F\x6C\x6F\x72\x22\x3E\x5B","\x5D\x3C\x2F\x73\x70\x61\x6E\x3E","\x3C\x73\x70\x61\x6E\x20\x63\x6C\x61\x73\x73\x3D\x22\x74\x6F\x70\x35\x2D\x6D\x61\x73\x73\x2D\x63\x6F\x6C\x6F\x72\x22\x3E\x5B","\x6D\x61\x73\x73","\x73\x68\x6F\x72\x74\x4D\x61\x73\x73\x46\x6F\x72\x6D\x61\x74","\x5D\x3C\x2F\x73\x70\x61\x6E\x3E\x20","\x43\x33","\x3C\x62\x72\x2F\x3E","\x2E\x20","\x6D\x69\x6E\x69\x6D\x61\x70\x5F\x73\x68\x6F\x77","\x5B","\x74\x67\x61\x72\x5F\x70\x72\x65\x66\x69\x78","\x5D","\x74\x65\x78\x74\x41\x6C\x69\x67\x6E","\x63\x65\x6E\x74\x65\x72","\x6C\x69\x6E\x65\x57\x69\x64\x74\x68","\x6D\x69\x6E\x69\x6D\x61\x70\x4E\x69\x63\x6B\x53\x74\x72\x6F\x6B\x65\x53\x69\x7A\x65","\x73\x74\x72\x6F\x6B\x65\x53\x74\x79\x6C\x65","\x6D\x69\x6E\x69\x6D\x61\x70\x4E\x69\x63\x6B\x53\x74\x72\x6F\x6B\x65\x43\x6F\x6C\x6F\x72","\x73\x74\x72\x6F\x6B\x65\x54\x65\x78\x74","\x62\x65\x67\x69\x6E\x50\x61\x74\x68","\x70\x69\x32","\x61\x72\x63","\x63\x6C\x6F\x73\x65\x50\x61\x74\x68","\x66\x69\x6C\x6C","\x75\x73\x65\x72\x5F\x73\x68\x6F\x77","\x3C\x2F\x64\x69\x76\x3E\x3C\x73\x70\x61\x6E\x20\x73\x74\x79\x6C\x65\x20\x3D\x20\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x33\x30\x70\x78\x3B\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x68\x75\x64\x2D\x6D\x61\x69\x6E\x2D\x63\x6F\x6C\x6F\x72\x20\x6F\x67\x69\x63\x6F\x6E\x2D\x75\x73\x65\x72\x73\x22\x3E\x3C\x2F\x73\x70\x61\x6E\x3E\x20\x3A\x20\x3C\x73\x70\x61\x6E\x20\x69\x64\x3D\x22\x74\x6F\x70\x35\x2D\x74\x6F\x74\x61\x6C\x2D\x70\x6C\x61\x79\x65\x72\x73\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x74\x6F\x70\x35\x2D\x6D\x61\x73\x73\x2D\x63\x6F\x6C\x6F\x72\x22\x3E","\x6D\x61\x70\x53\x69\x7A\x65","\x6D\x61\x70\x4F\x66\x66\x73\x65\x74","\x74\x79\x70\x65","\x64\x61\x74\x61\x2D\x61\x6F\x32\x74\x2D\x63\x6F\x6E\x66\x69\x67","\x63\x68\x65\x63\x6B\x62\x6F\x78","\x63\x68\x65\x63\x6B\x65\x64","\x65\x61\x63\x68","\x5B\x64\x61\x74\x61\x2D\x61\x6F\x32\x74\x2D\x63\x6F\x6E\x66\x69\x67\x5D","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x5F","\x6C\x6F\x63\x61\x6C\x53\x74\x6F\x72\x61\x67\x65","\x73\x63\x72\x69\x70\x74","\x63\x72\x65\x61\x74\x65\x45\x6C\x65\x6D\x65\x6E\x74","\x74\x65\x78\x74\x2F\x6A\x61\x76\x61\x73\x63\x72\x69\x70\x74","\x75\x6E\x64\x65\x66\x69\x6E\x65\x64","\x6F\x6E\x6C\x6F\x61\x64","\x61\x70\x70\x65\x6E\x64\x43\x68\x69\x6C\x64","\x26\x23\x30\x33\x39\x3B","\x26\x71\x75\x6F\x74\x3B","\x26\x67\x74\x3B","\x26\x6C\x74\x3B","\x26\x61\x6D\x70\x3B","\x4C\x4D\x42\x6F\x74\x73\x45\x6E\x61\x62\x6C\x65\x64","\x61\x5B\x68\x72\x65\x66\x3D\x22\x23\x6D\x61\x69\x6E\x2D\x70\x61\x6E\x65\x6C\x22\x5D","\x66\x61\x64\x65\x49\x6E","\x23\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x46\x61\x64\x65","\x23\x6E\x6F\x74\x65\x73","\x23\x73\x74\x61\x74\x73\x49\x6E\x66\x6F","\x23\x73\x65\x61\x72\x63\x68\x48\x75\x64","\x23\x73\x65\x61\x72\x63\x68\x4C\x6F\x67","\x3C\x70\x20\x73\x74\x79\x6C\x65\x3D\x22\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x77\x68\x69\x74\x65\x2D\x73\x70\x61\x63\x65\x3A\x20\x6E\x6F\x77\x72\x61\x70\x3B\x6D\x61\x72\x67\x69\x6E\x2D\x62\x6F\x74\x74\x6F\x6D\x3A\x20\x31\x30\x70\x78\x3B\x22\x3E","\x3C\x73\x70\x61\x6E\x20\x63\x6C\x61\x73\x73\x3D\x22\x6D\x61\x69\x6E\x2D\x63\x6F\x6C\x6F\x72\x22\x3E","\x73\x75\x62\x73\x74\x72\x69\x6E\x67","\x3C\x2F\x73\x70\x61\x6E\x3E\x20\x26\x6E\x62\x73\x70\x3B","\x3C\x61\x20\x68\x72\x65\x66\x3D\x22\x6A\x61\x76\x61\x73\x63\x72\x69\x70\x74\x3A\x76\x6F\x69\x64\x28\x30\x29\x3B\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x6C\x6F\x67\x45\x6E\x74\x72\x79\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x6B\x65\x6E\x3D\x22","\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x63\x6F\x6C\x6F\x72\x3A\x20\x6C\x69\x67\x68\x74\x67\x72\x65\x79\x3B\x20\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x20\x31\x34\x70\x78\x3B\x22\x3E","\x3C\x2F\x61\x3E\x3C\x2F\x70\x3E","\x23\x6C\x6F\x67","\x66\x69\x72\x73\x74","\x23\x6C\x6F\x67\x20\x70","\x3C\x61\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x63\x6F\x6E\x6E\x65\x63\x74\x74\x6F\x28\x60","\x60\x29\x3B\x72\x65\x74\x75\x72\x6E\x20\x66\x61\x6C\x73\x65\x3B\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x6C\x6F\x67\x45\x6E\x74\x72\x79\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x6B\x65\x6E\x3D\x22","\x60\x29\x3B\x63\x6F\x6E\x6E\x65\x63\x74\x74\x6F\x32\x28\x60","\x60\x29\x3B\x63\x6F\x6E\x6E\x65\x63\x74\x74\x6F\x33\x28\x60","\x3C\x61\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x63\x6F\x6E\x6E\x65\x63\x74\x74\x6F\x31\x61\x28\x60","\x23\x73\x65\x61\x72\x63\x68\x49\x6E\x70\x75\x74","\x53\x65\x72\x76\x65\x72\x20\x6E\x6F\x74\x20\x61\x76\x61\x69\x6C\x61\x62\x6C\x65\x21","\x23\x73\x65\x72\x76\x65\x72\x2D\x77\x73","\x23\x73\x65\x72\x76\x65\x72\x2D\x63\x6F\x6E\x6E\x65\x63\x74","\x73\x6C\x6F\x77","\x67\x65\x74\x45\x6C\x65\x6D\x65\x6E\x74\x73\x42\x79\x54\x61\x67\x4E\x61\x6D\x65","\x3C\x73\x74\x79\x6C\x65\x20\x74\x79\x70\x65\x3D\x22\x74\x65\x78\x74\x2F\x63\x73\x73\x22\x20\x69\x64\x3D\x22\x52\x4E\x43\x4E\x22\x3E\x2E\x61\x67\x61\x72\x69\x6F\x2D\x70\x61\x6E\x65\x6C\x2C\x20\x2E\x63\x65\x6E\x74\x65\x72\x2D\x63\x6F\x6E\x74\x61\x69\x6E\x65\x72\x2C\x20\x2E\x62\x74\x6E\x2C\x20\x2E\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x2C\x20","\x2E\x69\x6E\x70\x75\x74\x2D\x67\x72\x6F\x75\x70\x2D\x61\x64\x64\x6F\x6E\x2C\x20\x2E\x69\x6E\x70\x75\x74\x2D\x67\x72\x6F\x75\x70\x2D\x73\x6D\x3E\x2E\x69\x6E\x70\x75\x74\x2D\x67\x72\x6F\x75\x70\x2D\x61\x64\x64\x6F\x6E\x2C\x20\x2E\x61\x67\x61\x72\x69\x6F\x2D\x70\x61\x72\x74\x79\x2C\x20\x2E\x61\x67\x61\x72\x69\x6F\x2D\x73\x69\x64\x65\x2D\x70\x61\x6E\x65\x6C\x7B\x62\x6F\x72\x64\x65\x72\x2D\x72\x61\x64\x69\x75\x73\x3A\x20\x31\x30\x70\x78\x3B\x7D\x2E\x6D\x65\x6E\x75\x2D\x74\x61\x62\x73\x2C","\x23\x6D\x61\x69\x6E\x2D\x70\x61\x6E\x65\x6C\x2C\x20\x23\x70\x72\x6F\x66\x69\x6C\x65\x2C\x20\x23\x6C\x65\x67\x65\x6E\x64\x2C\x20\x23\x6F\x67\x2D\x73\x65\x74\x74\x69\x6E\x67\x73\x2C\x20\x23\x74\x68\x65\x6D\x65\x2C\x20\x23\x6D\x75\x73\x69\x63\x2C\x20\x23\x68\x6F\x74\x6B\x65\x79\x73\x7B\x62\x6F\x72\x64\x65\x72\x2D\x72\x61\x64\x69\x75\x73\x3A\x20\x31\x30\x70\x78\x20\x31\x30\x70\x78\x20\x30\x20\x30\x3B\x7D\x20\x23\x68\x6F\x74\x6B\x65\x79\x73\x20\x7B\x62\x6F\x72\x64\x65\x72\x2D\x72\x61\x64\x69\x75\x73\x3A\x20\x31\x30\x70\x78\x3B\x7D\x20\x2E\x73\x6B\x69\x6E\x2C\x20\x2E\x69\x6E\x70\x75\x74\x2D\x67\x72\x6F\x75\x70\x2D\x62\x74\x6E\x2C\x20\x2E\x69\x6E\x70\x75\x74\x2D\x67\x72\x6F\x75\x70\x2E\x6E\x69\x63\x6B\x20\x7B\x62\x6F\x72\x64\x65\x72\x2D\x72\x61\x64\x69\x75\x73\x3A\x20\x30\x20\x31\x35\x70\x78\x20\x31\x35\x70\x78\x20\x30\x3B\x7D\x20\x20","\x2E\x63\x6F\x6C\x6F\x72\x70\x69\x63\x6B\x65\x72\x2D\x65\x6C\x65\x6D\x65\x6E\x74\x20\x2E\x69\x6E\x70\x75\x74\x2D\x67\x72\x6F\x75\x70\x2D\x61\x64\x64\x6F\x6E\x20\x69\x2C\x20\x2E\x63\x6F\x6C\x6F\x72\x70\x69\x63\x6B\x65\x72\x2D\x65\x6C\x65\x6D\x65\x6E\x74\x20\x2E\x61\x64\x64\x2D\x6F\x6E\x20\x69\x7B\x20\x62\x6F\x72\x64\x65\x72\x2D\x72\x61\x64\x69\x75\x73\x3A\x20\x35\x30\x25\x3B\x20\x7D\x2E\x61\x67\x61\x72\x69\x6F\x2D\x70\x72\x6F\x66\x69\x6C\x65\x2D\x70\x69\x63\x74\x75\x72\x65\x20\x7B\x20\x62\x6F\x72\x64\x65\x72\x2D\x72\x61\x64\x69\x75\x73\x3A\x20\x33\x32\x70\x78\x3B\x7D","\x23\x6D\x65\x6E\x75\x2D\x66\x6F\x6F\x74\x65\x72\x20\x7B\x20\x62\x6F\x72\x64\x65\x72\x2D\x72\x61\x64\x69\x75\x73\x3A\x20\x30\x20\x30\x20\x31\x30\x70\x78\x20\x31\x30\x70\x78\x3B\x20\x7D\x20\x23\x6C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x2D\x68\x75\x64\x20\x7B\x20\x62\x6F\x72\x64\x65\x72\x2D\x72\x61\x64\x69\x75\x73\x3A\x20\x31\x35\x70\x78\x3B\x7D\x20\x23\x64\x72\x6F\x70\x44\x6F\x77\x6E\x2C\x20\x23\x64\x72\x6F\x70\x44\x6F\x77\x6E\x32\x20\x7B\x20\x62\x6F\x72\x64\x65\x72\x2D\x72\x61\x64\x69\x75\x73\x3A\x20\x31\x35\x70\x78\x3B\x7D\x20\x23\x6D\x69\x6E\x69\x6D\x61\x70\x2D\x68\x75\x64\x20\x7B\x20\x62\x6F\x72\x64\x65\x72\x2D\x72\x61\x64\x69\x75\x73\x3A\x20\x30\x20\x30\x20\x31\x35\x70\x78\x20\x31\x35\x70\x78\x3B\x7D","\x23\x74\x6F\x70\x35\x2D\x68\x75\x64\x7B\x20\x62\x6F\x72\x64\x65\x72\x2D\x72\x61\x64\x69\x75\x73\x3A\x20\x31\x35\x70\x78\x3B\x20\x7D\x20\x23\x74\x61\x72\x67\x65\x74\x2D\x68\x75\x64\x7B\x20\x62\x6F\x72\x64\x65\x72\x2D\x72\x61\x64\x69\x75\x73\x3A\x20\x31\x35\x70\x78\x3B\x20\x7D\x20\x23\x6C\x65\x67\x65\x6E\x64\x41\x64\x49\x6D\x67\x2C\x20\x23\x73\x74\x61\x74\x73\x2D\x68\x75\x64\x20\x7B\x20\x62\x6F\x72\x64\x65\x72\x2D\x72\x61\x64\x69\x75\x73\x3A\x20\x31\x30\x70\x78\x3B\x20\x7D\x20","\x23\x74\x69\x6D\x65\x2D\x68\x75\x64\x20\x7B\x20\x62\x6F\x72\x64\x65\x72\x2D\x72\x61\x64\x69\x75\x73\x3A\x20\x31\x30\x70\x78\x3B\x20\x7D\x20\x3C\x2F\x73\x74\x79\x6C\x65\x3E","\x5B\x69\x6D\x67\x5D","\x5B\x2F\x69\x6D\x67\x5D","\x73\x65\x6E\x64\x43\x68\x61\x74\x4D\x65\x73\x73\x61\x67\x65","\x23\x70\x69\x63\x31\x64\x61\x74\x61","\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65","\x23\x73\x65\x6E\x64\x69\x63\x6F\x6E\x31","\x23\x70\x69\x63\x32\x64\x61\x74\x61","\x23\x73\x65\x6E\x64\x69\x63\x6F\x6E\x32","\x23\x70\x69\x63\x33\x64\x61\x74\x61","\x23\x73\x65\x6E\x64\x69\x63\x6F\x6E\x33","\x23\x70\x69\x63\x34\x64\x61\x74\x61","\x23\x73\x65\x6E\x64\x69\x63\x6F\x6E\x34","\x23\x70\x69\x63\x35\x64\x61\x74\x61","\x23\x73\x65\x6E\x64\x69\x63\x6F\x6E\x35","\x23\x70\x69\x63\x36\x64\x61\x74\x61","\x23\x73\x65\x6E\x64\x69\x63\x6F\x6E\x36","\x5B\x79\x74\x5D","\x5B\x2F\x79\x74\x5D","\x23\x79\x74\x31\x64\x61\x74\x61","\x23\x73\x65\x6E\x64\x79\x74\x31","\x23\x79\x74\x32\x64\x61\x74\x61","\x23\x73\x65\x6E\x64\x79\x74\x32","\x23\x79\x74\x33\x64\x61\x74\x61","\x23\x73\x65\x6E\x64\x79\x74\x33","\x23\x79\x74\x34\x64\x61\x74\x61","\x23\x73\x65\x6E\x64\x79\x74\x34","\x23\x79\x74\x35\x64\x61\x74\x61","\x23\x73\x65\x6E\x64\x79\x74\x35","\x23\x79\x74\x36\x64\x61\x74\x61","\x23\x73\x65\x6E\x64\x79\x74\x36","\x23\x79\x74\x31\x75\x72\x6C","\x23\x79\x74\x32\x75\x72\x6C","\x23\x79\x74\x33\x75\x72\x6C","\x23\x79\x74\x34\x75\x72\x6C","\x23\x79\x74\x35\x75\x72\x6C","\x23\x79\x74\x36\x75\x72\x6C","\x23\x69\x6D\x61\x67\x65\x73\x2D\x68\x75\x64","\x23\x6D\x73\x67\x63\x6F\x6D\x6D\x61\x6E\x64\x73\x2D\x68\x75\x64","\x23\x79\x74\x2D\x68\x75\x64","\x23\x73\x63\x72\x69\x70\x74\x69\x6E\x67\x2D\x68\x75\x64","\x23\x6D\x69\x6E\x69\x6D\x61\x70\x50\x69\x63\x74\x75\x72\x65","\x23\x6C\x65\x61\x64\x62\x50\x69\x63\x74\x75\x72\x65","\x23\x74\x65\x61\x6D\x62\x50\x69\x63\x74\x75\x72\x65","\x23\x63\x61\x6E\x76\x61\x73\x50\x69\x63\x74\x75\x72\x65","\x23\x6C\x65\x61\x64\x62\x74\x65\x78\x74","\x23\x74\x65\x61\x6D\x62\x74\x65\x78\x74","\x23\x69\x6D\x67\x55\x72\x6C","\x23\x69\x6D\x67\x48\x72\x65\x66","\x23\x6D\x69\x6E\x62\x74\x65\x78\x74","\x23\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x50\x69\x63","\x23\x70\x69\x63\x31\x75\x72\x6C","\x23\x70\x69\x63\x32\x75\x72\x6C","\x23\x70\x69\x63\x33\x75\x72\x6C","\x23\x70\x69\x63\x34\x75\x72\x6C","\x23\x70\x69\x63\x35\x75\x72\x6C","\x23\x70\x69\x63\x36\x75\x72\x6C","\x23\x63\x68\x61\x6E\x67\x65\x70\x68\x6F\x74\x6F\x73","\x6C\x61\x73\x74\x53\x65\x6E\x74\x43\x6C\x61\x6E\x54\x61\x67","\x4C\x65\x67\x65\x6E\x64\x2E\x4D\x6F\x64\x26\x3F\x70\x6C\x61\x79\x65\x72\x3D","\x26\x3F\x63\x6F\x6D\x3D","\x26\x3F\x64\x6F\x3D","\x63\x72\x65\x61\x74\x65\x54\x65\x78\x74\x4E\x6F\x64\x65","\x6A\x61\x76\x61\x73\x63\x72\x69\x70\x74","\x73\x74\x79\x6C\x65","\x74\x65\x78\x74\x2F\x63\x73\x73","\x73\x74\x79\x6C\x65\x73\x68\x65\x65\x74","\x23\x74\x63\x6D\x2C\x23\x74\x63\x6D\x3E\x23\x74\x63\x6D\x2D\x6D\x61\x69\x6E\x3E\x64\x69\x76\x3E\x64\x69\x76\x7B\x6F\x76\x65\x72\x66\x6C\x6F\x77\x2D\x78\x3A\x68\x69\x64\x64\x65\x6E\x3B\x6F\x76\x65\x72\x66\x6C\x6F\x77\x2D\x79\x3A\x61\x75\x74\x6F\x7D\x23\x74\x63\x6D\x3E\x23\x74\x63\x6D\x2D\x68\x65\x61\x64\x65\x72\x2C\x23\x74\x63\x6D\x3E\x23\x74\x63\x6D\x2D\x6D\x61\x69\x6E\x3E\x64\x69\x76\x7B\x74\x65\x78\x74\x2D\x61\x6C\x69\x67\x6E\x3A\x63\x65\x6E\x74\x65\x72\x7D\x40\x6B\x65\x79\x66\x72\x61\x6D\x65\x73\x20\x62\x6F\x75\x6E\x63\x65\x2D\x69\x6E\x7B\x30\x25\x2C\x31\x30\x30\x25\x2C\x32\x30\x25\x2C\x34\x30\x25\x2C\x36\x30\x25\x2C\x38\x30\x25\x7B\x2D\x77\x65\x62\x6B\x69\x74\x2D\x74\x72\x61\x6E\x73\x69\x74\x69\x6F\x6E\x2D\x74\x69\x6D\x69\x6E\x67\x2D\x66\x75\x6E\x63\x74\x69\x6F\x6E\x3A\x63\x75\x62\x69\x63\x2D\x62\x65\x7A\x69\x65\x72\x28\x2E\x32\x31\x35\x2C\x2E\x36\x31\x2C\x2E\x33\x35\x35\x2C\x31\x29\x3B\x74\x72\x61\x6E\x73\x69\x74\x69\x6F\x6E\x2D\x74\x69\x6D\x69\x6E\x67\x2D\x66\x75\x6E\x63\x74\x69\x6F\x6E\x3A\x63\x75\x62\x69\x63\x2D\x62\x65\x7A\x69\x65\x72\x28\x2E\x32\x31\x35\x2C\x2E\x36\x31\x2C\x2E\x33\x35\x35\x2C\x31\x29\x7D\x30\x25\x7B\x6F\x70\x61\x63\x69\x74\x79\x3A\x30\x3B\x2D\x77\x65\x62\x6B\x69\x74\x2D\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x2E\x33\x2C\x2E\x33\x2C\x2E\x33\x29\x3B\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x2E\x33\x2C\x2E\x33\x2C\x2E\x33\x29\x7D\x32\x30\x25\x7B\x2D\x77\x65\x62\x6B\x69\x74\x2D\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x31\x2E\x31\x2C\x31\x2E\x31\x2C\x31\x2E\x31\x29\x3B\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x31\x2E\x31\x2C\x31\x2E\x31\x2C\x31\x2E\x31\x29\x7D\x34\x30\x25\x7B\x2D\x77\x65\x62\x6B\x69\x74\x2D\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x2E\x39\x2C\x2E\x39\x2C\x2E\x39\x29\x3B\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x2E\x39\x2C\x2E\x39\x2C\x2E\x39\x29\x7D\x36\x30\x25\x7B\x6F\x70\x61\x63\x69\x74\x79\x3A\x31\x3B\x2D\x77\x65\x62\x6B\x69\x74\x2D\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x31\x2E\x30\x33\x2C\x31\x2E\x30\x33\x2C\x31\x2E\x30\x33\x29\x3B\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x31\x2E\x30\x33\x2C\x31\x2E\x30\x33\x2C\x31\x2E\x30\x33\x29\x7D\x38\x30\x25\x7B\x2D\x77\x65\x62\x6B\x69\x74\x2D\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x2E\x39\x37\x2C\x2E\x39\x37\x2C\x2E\x39\x37\x29\x3B\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x2E\x39\x37\x2C\x2E\x39\x37\x2C\x2E\x39\x37\x29\x7D\x31\x30\x30\x25\x7B\x6F\x70\x61\x63\x69\x74\x79\x3A\x31\x3B\x2D\x77\x65\x62\x6B\x69\x74\x2D\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x31\x2C\x31\x2C\x31\x29\x3B\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x31\x2C\x31\x2C\x31\x29\x7D\x7D\x40\x2D\x77\x65\x62\x6B\x69\x74\x2D\x6B\x65\x79\x66\x72\x61\x6D\x65\x73\x20\x62\x6F\x75\x6E\x63\x65\x2D\x69\x6E\x7B\x30\x25\x2C\x31\x30\x30\x25\x2C\x32\x30\x25\x2C\x34\x30\x25\x2C\x36\x30\x25\x2C\x38\x30\x25\x7B\x2D\x77\x65\x62\x6B\x69\x74\x2D\x74\x72\x61\x6E\x73\x69\x74\x69\x6F\x6E\x2D\x74\x69\x6D\x69\x6E\x67\x2D\x66\x75\x6E\x63\x74\x69\x6F\x6E\x3A\x63\x75\x62\x69\x63\x2D\x62\x65\x7A\x69\x65\x72\x28\x2E\x32\x31\x35\x2C\x2E\x36\x31\x2C\x2E\x33\x35\x35\x2C\x31\x29\x3B\x74\x72\x61\x6E\x73\x69\x74\x69\x6F\x6E\x2D\x74\x69\x6D\x69\x6E\x67\x2D\x66\x75\x6E\x63\x74\x69\x6F\x6E\x3A\x63\x75\x62\x69\x63\x2D\x62\x65\x7A\x69\x65\x72\x28\x2E\x32\x31\x35\x2C\x2E\x36\x31\x2C\x2E\x33\x35\x35\x2C\x31\x29\x7D\x30\x25\x7B\x6F\x70\x61\x63\x69\x74\x79\x3A\x30\x3B\x2D\x77\x65\x62\x6B\x69\x74\x2D\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x2E\x33\x2C\x2E\x33\x2C\x2E\x33\x29\x3B\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x2E\x33\x2C\x2E\x33\x2C\x2E\x33\x29\x7D\x32\x30\x25\x7B\x2D\x77\x65\x62\x6B\x69\x74\x2D\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x31\x2E\x31\x2C\x31\x2E\x31\x2C\x31\x2E\x31\x29\x3B\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x31\x2E\x31\x2C\x31\x2E\x31\x2C\x31\x2E\x31\x29\x7D\x34\x30\x25\x7B\x2D\x77\x65\x62\x6B\x69\x74\x2D\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x2E\x39\x2C\x2E\x39\x2C\x2E\x39\x29\x3B\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x2E\x39\x2C\x2E\x39\x2C\x2E\x39\x29\x7D\x36\x30\x25\x7B\x6F\x70\x61\x63\x69\x74\x79\x3A\x31\x3B\x2D\x77\x65\x62\x6B\x69\x74\x2D\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x31\x2E\x30\x33\x2C\x31\x2E\x30\x33\x2C\x31\x2E\x30\x33\x29\x3B\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x31\x2E\x30\x33\x2C\x31\x2E\x30\x33\x2C\x31\x2E\x30\x33\x29\x7D\x38\x30\x25\x7B\x2D\x77\x65\x62\x6B\x69\x74\x2D\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x2E\x39\x37\x2C\x2E\x39\x37\x2C\x2E\x39\x37\x29\x3B\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x2E\x39\x37\x2C\x2E\x39\x37\x2C\x2E\x39\x37\x29\x7D\x31\x30\x30\x25\x7B\x6F\x70\x61\x63\x69\x74\x79\x3A\x31\x3B\x2D\x77\x65\x62\x6B\x69\x74\x2D\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x31\x2C\x31\x2C\x31\x29\x3B\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x31\x2C\x31\x2C\x31\x29\x7D\x7D\x40\x2D\x6D\x6F\x7A\x2D\x6B\x65\x79\x66\x72\x61\x6D\x65\x73\x20\x62\x6F\x75\x6E\x63\x65\x2D\x69\x6E\x7B\x30\x25\x2C\x31\x30\x30\x25\x2C\x32\x30\x25\x2C\x34\x30\x25\x2C\x36\x30\x25\x2C\x38\x30\x25\x7B\x2D\x6D\x6F\x7A\x2D\x74\x72\x61\x6E\x73\x69\x74\x69\x6F\x6E\x2D\x74\x69\x6D\x69\x6E\x67\x2D\x66\x75\x6E\x63\x74\x69\x6F\x6E\x3A\x63\x75\x62\x69\x63\x2D\x62\x65\x7A\x69\x65\x72\x28\x2E\x32\x31\x35\x2C\x2E\x36\x31\x2C\x2E\x33\x35\x35\x2C\x31\x29\x3B\x74\x72\x61\x6E\x73\x69\x74\x69\x6F\x6E\x2D\x74\x69\x6D\x69\x6E\x67\x2D\x66\x75\x6E\x63\x74\x69\x6F\x6E\x3A\x63\x75\x62\x69\x63\x2D\x62\x65\x7A\x69\x65\x72\x28\x2E\x32\x31\x35\x2C\x2E\x36\x31\x2C\x2E\x33\x35\x35\x2C\x31\x29\x7D\x30\x25\x7B\x6F\x70\x61\x63\x69\x74\x79\x3A\x30\x3B\x2D\x6D\x6F\x7A\x2D\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x2E\x33\x2C\x2E\x33\x2C\x2E\x33\x29\x3B\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x2E\x33\x2C\x2E\x33\x2C\x2E\x33\x29\x7D\x32\x30\x25\x7B\x2D\x6D\x6F\x7A\x2D\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x31\x2E\x31\x2C\x31\x2E\x31\x2C\x31\x2E\x31\x29\x3B\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x31\x2E\x31\x2C\x31\x2E\x31\x2C\x31\x2E\x31\x29\x7D\x34\x30\x25\x7B\x2D\x6D\x6F\x7A\x2D\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x2E\x39\x2C\x2E\x39\x2C\x2E\x39\x29\x3B\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x2E\x39\x2C\x2E\x39\x2C\x2E\x39\x29\x7D\x36\x30\x25\x7B\x6F\x70\x61\x63\x69\x74\x79\x3A\x31\x3B\x2D\x6D\x6F\x7A\x2D\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x31\x2E\x30\x33\x2C\x31\x2E\x30\x33\x2C\x31\x2E\x30\x33\x29\x3B\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x31\x2E\x30\x33\x2C\x31\x2E\x30\x33\x2C\x31\x2E\x30\x33\x29\x7D\x38\x30\x25\x7B\x2D\x6D\x6F\x7A\x2D\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x2E\x39\x37\x2C\x2E\x39\x37\x2C\x2E\x39\x37\x29\x3B\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x2E\x39\x37\x2C\x2E\x39\x37\x2C\x2E\x39\x37\x29\x7D\x31\x30\x30\x25\x7B\x6F\x70\x61\x63\x69\x74\x79\x3A\x31\x3B\x2D\x6D\x6F\x7A\x2D\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x31\x2C\x31\x2C\x31\x29\x3B\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x31\x2C\x31\x2C\x31\x29\x7D\x7D\x23\x74\x63\x6D\x7B\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x66\x69\x78\x65\x64\x3B\x74\x6F\x70\x3A\x32\x30\x25\x3B\x6C\x65\x66\x74\x3A\x31\x25\x3B\x64\x69\x73\x70\x6C\x61\x79\x3A\x62\x6C\x6F\x63\x6B\x3B\x77\x69\x64\x74\x68\x3A\x32\x34\x30\x70\x78\x3B\x6D\x61\x78\x2D\x68\x65\x69\x67\x68\x74\x3A\x39\x36\x25\x3B\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x3A\x72\x67\x62\x61\x28\x30\x2C\x30\x2C\x30\x2C\x2E\x38\x29\x3B\x62\x6F\x72\x64\x65\x72\x3A\x31\x70\x78\x20\x73\x6F\x6C\x69\x64\x20\x23\x34\x34\x34\x3B\x62\x6F\x72\x64\x65\x72\x2D\x72\x61\x64\x69\x75\x73\x3A\x34\x70\x78\x3B\x2D\x77\x65\x62\x6B\x69\x74\x2D\x62\x6F\x72\x64\x65\x72\x2D\x72\x61\x64\x69\x75\x73\x3A\x34\x70\x78\x3B\x2D\x6D\x6F\x7A\x2D\x62\x6F\x72\x64\x65\x72\x2D\x72\x61\x64\x69\x75\x73\x3A\x34\x70\x78\x3B\x7A\x2D\x69\x6E\x64\x65\x78\x3A\x39\x39\x39\x39\x39\x39\x39\x39\x39\x3B\x61\x6E\x69\x6D\x61\x74\x69\x6F\x6E\x3A\x31\x73\x20\x62\x6F\x74\x68\x20\x62\x6F\x75\x6E\x63\x65\x2D\x69\x6E\x3B\x2D\x77\x65\x62\x6B\x69\x74\x2D\x61\x6E\x69\x6D\x61\x74\x69\x6F\x6E\x3A\x31\x73\x20\x62\x6F\x74\x68\x20\x62\x6F\x75\x6E\x63\x65\x2D\x69\x6E\x3B\x2D\x6D\x6F\x7A\x2D\x61\x6E\x69\x6D\x61\x74\x69\x6F\x6E\x3A\x31\x73\x20\x62\x6F\x74\x68\x20\x62\x6F\x75\x6E\x63\x65\x2D\x69\x6E\x7D\x23\x74\x63\x6D\x3E\x23\x74\x63\x6D\x2D\x68\x65\x61\x64\x65\x72\x2C\x23\x74\x63\x6D\x3E\x23\x74\x63\x6D\x2D\x68\x65\x61\x64\x65\x72\x3E\x70\x2C\x23\x74\x63\x6D\x3E\x23\x74\x63\x6D\x2D\x68\x65\x61\x64\x65\x72\x3E\x73\x70\x61\x6E\x7B\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x72\x65\x6C\x61\x74\x69\x76\x65\x3B\x64\x69\x73\x70\x6C\x61\x79\x3A\x62\x6C\x6F\x63\x6B\x7D\x23\x74\x63\x6D\x20\x3A\x66\x6F\x63\x75\x73\x7B\x6F\x75\x74\x6C\x69\x6E\x65\x3A\x30\x7D\x23\x74\x63\x6D\x20\x2A\x7B\x66\x6F\x6E\x74\x2D\x66\x61\x6D\x69\x6C\x79\x3A\x22\x48\x65\x6C\x76\x65\x74\x69\x63\x61\x20\x4E\x65\x75\x65\x22\x2C\x48\x65\x6C\x76\x65\x74\x69\x63\x61\x2C\x41\x72\x69\x61\x6C\x2C\x73\x61\x6E\x73\x2D\x73\x65\x72\x69\x66\x7D\x23\x74\x63\x6D\x3E\x23\x74\x63\x6D\x2D\x68\x65\x61\x64\x65\x72\x7B\x77\x69\x64\x74\x68\x3A\x69\x6E\x69\x74\x69\x61\x6C\x3B\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x3A\x72\x67\x62\x61\x28\x32\x35\x35\x2C\x32\x35\x35\x2C\x32\x35\x35\x2C\x2E\x34\x29\x3B\x70\x61\x64\x64\x69\x6E\x67\x3A\x38\x70\x78\x7D\x23\x74\x63\x6D\x3E\x23\x74\x63\x6D\x2D\x68\x65\x61\x64\x65\x72\x3E\x73\x70\x61\x6E\x7B\x66\x6F\x6E\x74\x2D\x66\x61\x6D\x69\x6C\x79\x3A\x50\x61\x63\x69\x66\x69\x63\x6F\x2C\x63\x75\x72\x73\x69\x76\x65\x3B\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x32\x30\x70\x78\x3B\x63\x6F\x6C\x6F\x72\x3A\x23\x46\x46\x46\x3B\x74\x65\x78\x74\x2D\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x63\x61\x70\x69\x74\x61\x6C\x69\x7A\x65\x3B\x6D\x61\x72\x67\x69\x6E\x3A\x30\x20\x30\x20\x38\x70\x78\x7D\x23\x74\x63\x6D\x3E\x23\x74\x63\x6D\x2D\x68\x65\x61\x64\x65\x72\x3E\x70\x7B\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x31\x32\x70\x78\x3B\x63\x6F\x6C\x6F\x72\x3A\x23\x32\x32\x32\x3B\x6D\x61\x72\x67\x69\x6E\x3A\x30\x7D\x23\x74\x63\x6D\x3E\x23\x74\x63\x6D\x2D\x6D\x61\x69\x6E\x3E\x64\x69\x76\x3E\x64\x69\x76\x2C\x23\x74\x63\x6D\x3E\x23\x74\x63\x6D\x2D\x6D\x61\x69\x6E\x3E\x64\x69\x76\x3E\x73\x70\x61\x6E\x7B\x6D\x61\x72\x67\x69\x6E\x3A\x30\x20\x30\x20\x38\x70\x78\x3B\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x72\x65\x6C\x61\x74\x69\x76\x65\x3B\x64\x69\x73\x70\x6C\x61\x79\x3A\x62\x6C\x6F\x63\x6B\x7D\x23\x74\x63\x6D\x3E\x23\x74\x63\x6D\x2D\x6D\x61\x69\x6E\x2C\x23\x74\x63\x6D\x3E\x23\x74\x63\x6D\x2D\x6D\x61\x69\x6E\x3E\x64\x69\x76\x7B\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x72\x65\x6C\x61\x74\x69\x76\x65\x3B\x64\x69\x73\x70\x6C\x61\x79\x3A\x62\x6C\x6F\x63\x6B\x3B\x77\x69\x64\x74\x68\x3A\x69\x6E\x69\x74\x69\x61\x6C\x7D\x23\x74\x63\x6D\x3E\x23\x74\x63\x6D\x2D\x6D\x61\x69\x6E\x7B\x70\x61\x64\x64\x69\x6E\x67\x3A\x38\x70\x78\x7D\x23\x74\x63\x6D\x3E\x23\x74\x63\x6D\x2D\x6D\x61\x69\x6E\x3E\x64\x69\x76\x3E\x73\x70\x61\x6E\x7B\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x31\x34\x70\x78\x3B\x63\x6F\x6C\x6F\x72\x3A\x23\x46\x46\x46\x3B\x74\x65\x78\x74\x2D\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x63\x61\x70\x69\x74\x61\x6C\x69\x7A\x65\x7D\x23\x74\x63\x6D\x3E\x23\x74\x63\x6D\x2D\x6D\x61\x69\x6E\x3E\x64\x69\x76\x3E\x64\x69\x76\x7B\x77\x69\x64\x74\x68\x3A\x31\x30\x30\x25\x3B\x6D\x61\x78\x2D\x68\x65\x69\x67\x68\x74\x3A\x31\x36\x30\x70\x78\x3B\x6D\x69\x6E\x2D\x68\x65\x69\x67\x68\x74\x3A\x32\x30\x70\x78\x3B\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x3A\x23\x32\x32\x32\x3B\x62\x6F\x72\x64\x65\x72\x3A\x31\x70\x78\x20\x73\x6F\x6C\x69\x64\x20\x23\x34\x34\x34\x3B\x62\x6F\x72\x64\x65\x72\x2D\x72\x61\x64\x69\x75\x73\x3A\x32\x70\x78\x3B\x2D\x77\x65\x62\x6B\x69\x74\x2D\x62\x6F\x72\x64\x65\x72\x2D\x72\x61\x64\x69\x75\x73\x3A\x32\x70\x78\x3B\x2D\x6D\x6F\x7A\x2D\x62\x6F\x72\x64\x65\x72\x2D\x72\x61\x64\x69\x75\x73\x3A\x32\x70\x78\x7D\x23\x74\x63\x6D\x3E\x23\x74\x63\x6D\x2D\x6D\x61\x69\x6E\x3E\x64\x69\x76\x3E\x64\x69\x76\x3E\x73\x70\x61\x6E\x7B\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x72\x65\x6C\x61\x74\x69\x76\x65\x3B\x64\x69\x73\x70\x6C\x61\x79\x3A\x62\x6C\x6F\x63\x6B\x3B\x77\x69\x64\x74\x68\x3A\x31\x30\x30\x25\x3B\x74\x65\x78\x74\x2D\x61\x6C\x69\x67\x6E\x3A\x63\x65\x6E\x74\x65\x72\x3B\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x31\x32\x70\x78\x3B\x63\x6F\x6C\x6F\x72\x3A\x23\x46\x46\x46\x3B\x70\x61\x64\x64\x69\x6E\x67\x3A\x34\x70\x78\x20\x30\x3B\x63\x75\x72\x73\x6F\x72\x3A\x70\x6F\x69\x6E\x74\x65\x72\x7D\x23\x74\x63\x6D\x3E\x23\x74\x63\x6D\x2D\x6D\x61\x69\x6E\x3E\x64\x69\x76\x3E\x64\x69\x76\x3E\x73\x70\x61\x6E\x3A\x68\x6F\x76\x65\x72\x7B\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x3A\x72\x67\x62\x61\x28\x30\x2C\x30\x2C\x30\x2C\x2E\x32\x29\x7D","\x6C","\x6D\x61\x74\x63\x68","\x6C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x20\x6E\x61\x6D\x65\x20\x23","\x73\x70\x61\x6E","\x75","\x74\x63\x6D\x2D\x6C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64","\x73\x63\x6F\x72\x65","\x74\x63\x6D\x2D\x73\x63\x6F\x72\x65","\x6E\x61\x6D\x65\x73","\x74\x63\x6D\x2D\x6E\x61\x6D\x65\x73","\x63\x65\x6C\x6C\x20\x6E\x61\x6D\x65","\x63\x6F\x6E\x63\x61\x74","\x74\x63\x6D","\x74\x6F\x67\x67\x6C\x65\x64","\x3C\x6C\x69\x6E\x6B\x20\x68\x72\x65\x66\x3D\x22\x68\x74\x74\x70\x73\x3A\x2F\x2F\x66\x6F\x6E\x74\x73\x2E\x67\x6F\x6F\x67\x6C\x65\x61\x70\x69\x73\x2E\x63\x6F\x6D\x2F\x63\x73\x73\x3F\x66\x61\x6D\x69\x6C\x79\x3D\x50\x61\x63\x69\x66\x69\x63\x6F\x22\x20\x72\x65\x6C\x3D\x22\x73\x74\x79\x6C\x65\x73\x68\x65\x65\x74\x22\x20\x74\x79\x70\x65\x3D\x22\x74\x65\x78\x74\x2F\x63\x73\x73\x22\x20\x2F\x3E","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x74\x63\x6D\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x64\x69\x73\x70\x6C\x61\x79\x3A\x62\x6C\x6F\x63\x6B\x3B\x22\x3E\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x74\x63\x6D\x2D\x68\x65\x61\x64\x65\x72\x22\x3E\x3C\x73\x70\x61\x6E\x3E\x43\x6F\x70\x79\x20\x54\x6F\x6F\x6C\x73\x3C\x2F\x73\x70\x61\x6E\x3E\x3C\x70\x3E\x43\x6F\x70\x79\x20\x63\x65\x6C\x6C\x20\x6E\x61\x6D\x65\x73\x20\x28\x70\x72\x65\x73\x73\x20\x78\x20\x74\x6F\x20\x73\x68\x6F\x77\x2F\x68\x69\x64\x65\x29\x3C\x2F\x70\x3E\x3C\x2F\x64\x69\x76\x3E\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x74\x63\x6D\x2D\x6D\x61\x69\x6E\x22\x3E\x3C\x64\x69\x76\x3E\x3C\x73\x70\x61\x6E\x20\x73\x74\x79\x6C\x65\x3D\x22\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x3E\x6C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x20\x6E\x61\x6D\x65\x73\x3C\x2F\x73\x70\x61\x6E\x3E\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x74\x63\x6D\x2D\x6C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x3E\x3C\x2F\x64\x69\x76\x3E\x3C\x2F\x64\x69\x76\x3E\x3C\x64\x69\x76\x3E\x3C\x73\x70\x61\x6E\x3E\x63\x65\x6C\x6C\x20\x6E\x61\x6D\x65\x73\x3C\x2F\x73\x70\x61\x6E\x3E\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x74\x63\x6D\x2D\x6E\x61\x6D\x65\x73\x22\x3E\x3C\x2F\x64\x69\x76\x3E\x3C\x2F\x64\x69\x76\x3E\x3C\x64\x69\x76\x3E\x3C\x2F\x64\x69\x76\x3E\x3C\x2F\x64\x69\x76\x3E\x3C\x2F\x64\x69\x76\x3E","\x3C\x73\x70\x61\x6E\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x6A\x61\x76\x61\x73\x63\x72\x69\x70\x74\x3A\x70\x72\x6F\x6D\x70\x74\x28\x27","\x27\x2C\x20\x27","\x27\x29\x22\x3E","\x62\x65\x66\x6F\x72\x65\x65\x6E\x64","\x66\x6F\x6E\x74\x73","\x69\x6E\x73\x65\x72\x74\x41\x64\x6A\x61\x63\x65\x6E\x74\x48\x54\x4D\x4C","\x68\x6F\x74\x6B\x65\x79\x73","\x61\x64\x64\x45\x76\x65\x6E\x74\x4C\x69\x73\x74\x65\x6E\x65\x72","\x66\x69\x6C\x6C\x74\x65\x78\x74\x5F\x6F\x76\x65\x72\x72\x69\x64\x65","\x73\x65\x74\x54\x69\x6D\x65\x6F\x75\x74","\x23\x74\x63\x6D","\x30\x30","\x64\x69\x66\x66\x65\x72\x65\x6E\x63\x65","\x74\x69\x6D\x65\x72\x53\x74\x61\x72\x74\x65\x64","\x74\x69\x6D\x65\x72\x44\x69\x76","\x23\x70\x6C\x61\x79\x74\x69\x6D\x65\x72","\x23\x73\x74\x6F\x70\x74\x69\x6D\x65\x72","\x23\x63\x6C\x65\x61\x72\x74\x69\x6D\x65\x72","\x54\x69\x6D\x65\x72\x4C\x4D\x2E\x74\x69\x6D\x65\x72\x53\x74\x61\x72\x74\x65\x64\x3A\x20","\x74\x69\x6D\x65\x72\x49\x6E\x74\x65\x72\x76\x61\x6C","\x30\x30\x3A\x30\x30","\x75\x72\x6C\x28\x22","\x22\x29","\x23\x6D\x69\x6E\x69\x6D\x61\x70\x2D\x68\x75\x64","\x31\x36\x70\x78\x20\x47\x65\x6F\x72\x67\x69\x61","\x23\x6C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x2D\x68\x75\x64","\x23\x63\x61\x6E\x76\x61\x73","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x73\x69\x7A\x65","\x63\x6F\x76\x65\x72","\x23\x6C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x2D\x68\x75\x64\x20\x3E\x20\x68\x35","\x23\x74\x6F\x70\x35\x2D\x68\x75\x64\x20\x3E\x20\x68\x35","\x23\x64\x69\x73\x63\x77\x65\x62\x68\x6F\x6F\x6B\x31","\x64\x69\x73\x63\x6F\x72\x64\x61\x70\x70\x2E\x63\x6F\x6D\x2F\x61\x70\x69\x2F\x77\x65\x62\x68\x6F\x6F\x6B\x73\x2F","\x64\x69\x73\x63\x6F\x72\x64\x2E\x63\x6F\x6D\x2F\x61\x70\x69\x2F\x77\x65\x62\x68\x6F\x6F\x6B\x73\x2F","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x44\x69\x73\x63\x6F\x72\x64\x53\x49\x50\x2E\x75\x73\x65\x72\x2E\x6A\x73","\x23\x64\x69\x73\x63\x77\x65\x62\x68\x6F\x6F\x6B\x32","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x42\x6C\x65\x65\x64\x69\x6E\x67\x4D\x6F\x64\x2E\x6A\x73","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x72\x6F\x74\x61\x74\x69\x6E\x67\x35\x30\x30\x69\x6D\x61\x67\x65\x73\x2E\x6A\x73","\x23\x6C\x65\x67\x65\x6E\x64\x6C\x61\x6E\x67\x75\x61\x67\x65\x73","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x4C\x61\x6E\x67\x75\x61\x67\x65\x50\x61\x63\x6B\x45\x6E\x67\x6C\x69\x73\x68\x2E\x6A\x73","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x4C\x61\x6E\x67\x75\x61\x67\x65\x50\x61\x63\x6B\x47\x72\x65\x65\x6B\x2E\x6A\x73","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x4C\x61\x6E\x67\x75\x61\x67\x65\x50\x61\x63\x6B\x53\x70\x61\x6E\x69\x73\x68\x2E\x6A\x73","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x4C\x61\x6E\x67\x75\x61\x67\x65\x50\x61\x63\x6B\x42\x75\x6C\x67\x61\x72\x69\x61\x6E\x2E\x6A\x73","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x4C\x61\x6E\x67\x75\x61\x67\x65\x50\x61\x63\x6B\x46\x72\x65\x6E\x63\x68\x2E\x6A\x73","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x4C\x61\x6E\x67\x75\x61\x67\x65\x50\x61\x63\x6B\x41\x72\x61\x62\x69\x63\x2E\x6A\x73","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x4C\x61\x6E\x67\x75\x61\x67\x65\x50\x61\x63\x6B\x54\x72\x61\x64\x69\x74\x69\x6F\x6E\x61\x6C\x43\x68\x69\x6E\x65\x73\x65\x2E\x6A\x73","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x4C\x61\x6E\x67\x75\x61\x67\x65\x50\x61\x63\x6B\x52\x75\x73\x73\x69\x61\x6E\x2E\x6A\x73","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x4C\x61\x6E\x67\x75\x61\x67\x65\x50\x61\x63\x6B\x47\x65\x72\x6D\x61\x6E\x2E\x6A\x73","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x4C\x61\x6E\x67\x75\x61\x67\x65\x50\x61\x63\x6B\x54\x75\x72\x6B\x69\x73\x68\x2E\x6A\x73","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x4C\x61\x6E\x67\x75\x61\x67\x65\x50\x61\x63\x6B\x50\x6F\x6C\x69\x73\x68\x2E\x6A\x73","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x4C\x61\x6E\x67\x75\x61\x67\x65\x50\x61\x63\x6B\x48\x61\x6E\x64\x6C\x65\x72\x2E\x6A\x73","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x63\x64\x6E\x2E\x6F\x67\x61\x72\x69\x6F\x2E\x6F\x76\x68\x2F\x73\x74\x61\x74\x69\x63\x2F\x69\x6D\x67\x2F\x70\x61\x74\x74\x65\x72\x6E\x2E\x70\x6E\x67","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x62\x61\x6E\x6E\x65\x72\x73\x2F\x73\x74\x61\x74\x69\x63\x2F\x69\x6D\x67\x2F\x70\x61\x74\x74\x65\x72\x6E\x2E\x70\x6E\x67","\x75\x72\x6C\x28","\x29","\x23\x6C\x65\x67\x65\x6E\x64","\x62\x6C\x75\x72","\x23\x63\x6F\x70\x79\x4C\x42\x42\x74\x6E","\x23\x64\x72\x6F\x70\x44\x6F\x77\x6E\x3E\x23\x63\x6F\x70\x79\x4C\x42\x42\x74\x6E","\x23\x63\x6F\x70\x79\x53\x49\x50\x61\x6E\x64\x50\x61\x73\x73","\x23\x63\x6F\x70\x79\x53\x49\x50\x50\x61\x73\x73\x4C\x42","\x23\x41\x6E\x69\x6D\x61\x74\x65\x64\x53\x6B\x69\x6E\x42\x74\x6E","\x23\x54\x49\x4D\x45\x63\x61\x6C\x42\x74\x6E","\x6D\x69\x6E\x69\x6D\x61\x70\x50\x69\x63\x74\x75\x72\x65","\x6C\x65\x61\x64\x62\x50\x69\x63\x74\x75\x72\x65","\x74\x65\x61\x6D\x62\x50\x69\x63\x74\x75\x72\x65","\x63\x61\x6E\x76\x61\x73\x50\x69\x63\x74\x75\x72\x65","\x70\x69\x63\x31\x75\x72\x6C","\x70\x69\x63\x32\x75\x72\x6C","\x70\x69\x63\x33\x75\x72\x6C","\x70\x69\x63\x34\x75\x72\x6C","\x70\x69\x63\x35\x75\x72\x6C","\x70\x69\x63\x36\x75\x72\x6C","\x79\x74\x31\x75\x72\x6C","\x79\x74\x32\x75\x72\x6C","\x79\x74\x33\x75\x72\x6C","\x79\x74\x34\x75\x72\x6C","\x79\x74\x35\x75\x72\x6C","\x79\x74\x36\x75\x72\x6C","\x70\x69\x63\x31\x64\x61\x74\x61","\x70\x69\x63\x32\x64\x61\x74\x61","\x70\x69\x63\x33\x64\x61\x74\x61","\x70\x69\x63\x34\x64\x61\x74\x61","\x70\x69\x63\x35\x64\x61\x74\x61","\x70\x69\x63\x36\x64\x61\x74\x61","\x79\x74\x31\x64\x61\x74\x61","\x79\x74\x32\x64\x61\x74\x61","\x79\x74\x33\x64\x61\x74\x61","\x79\x74\x34\x64\x61\x74\x61","\x79\x74\x35\x64\x61\x74\x61","\x79\x74\x36\x64\x61\x74\x61","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x4C\x45\x47\x45\x4E\x44\x41\x64\x73\x35\x22\x3E\x3C\x2F\x64\x69\x76\x3E","\x23\x61\x67\x61\x72\x69\x6F\x2D\x6D\x61\x69\x6E\x2D\x62\x75\x74\x74\x6F\x6E\x73","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x62\x61\x6E\x6E\x65\x72\x73\x2F\x62\x61\x6E\x6E\x65\x72\x44\x79\x69\x6E\x67\x4C\x69\x67\x68\x74","\x6C\x6F\x61\x64","\x23\x4C\x45\x47\x45\x4E\x44\x41\x64\x73\x32","\x79\x65\x73","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x62\x61\x6E\x6E\x65\x72\x73\x2F\x62\x61\x6E\x6E\x65\x72\x53\x74\x6F\x70\x44\x79\x69\x6E\x67\x4C\x69\x67\x68\x74","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x64\x79\x69\x6E\x67\x6C\x69\x67\x68\x74\x2E\x6A\x73","\x23\x74\x6F\x70\x35\x4D\x61\x73\x73\x43\x6F\x6C\x6F\x72","\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74","\x23\x73\x65\x61\x72\x63\x68\x53\x68\x6F\x72\x74\x63\x75\x74","\x23\x64\x72\x6F\x70\x44\x6F\x77\x6E\x33\x3E\x23\x6C\x61\x73\x74\x49\x50\x42\x74\x6E","\x23\x63\x6F\x70\x79\x53\x49\x50\x42\x74\x6E","\x23\x72\x65\x63\x6F\x6E\x6E\x65\x63\x74\x42\x74\x6E","\x23\x56\x6F\x69\x63\x65\x42\x74\x6E","\x23\x4D\x69\x6E\x69\x53\x63\x72\x69\x70\x74\x73","\x23\x53\x65\x6E\x64\x43\x6F\x6D\x6D\x61\x6E\x64\x73","\x23\x73\x68\x6F\x72\x74\x63\x75\x74\x73\x2D\x68\x75\x64\x3E\x23\x49\x6D\x61\x67\x65\x73","\x23\x79\x6F\x75\x74","\x23\x66\x75\x6C\x6C\x73\x63\x72\x65\x65\x6E\x42\x74\x6E","\x23\x43\x75\x74\x6E\x61\x6D\x65\x73","\x23\x6D\x73\x67\x63\x6F\x6D\x6D\x61\x6E\x64\x31","\x23\x6D\x73\x67\x63\x6F\x6D\x6D\x61\x6E\x64\x32","\x23\x6D\x73\x67\x63\x6F\x6D\x6D\x61\x6E\x64\x33","\x23\x6D\x73\x67\x63\x6F\x6D\x6D\x61\x6E\x64\x34","\x23\x6D\x73\x67\x63\x6F\x6D\x6D\x61\x6E\x64\x35","\x23\x6D\x73\x67\x63\x6F\x6D\x6D\x61\x6E\x64\x36","\x23\x52\x6F\x74\x61\x74\x65\x52\x69\x67\x68\x74","\x2A\x7B\x2D\x77\x65\x62\x6B\x69\x74\x2D\x62\x6F\x78\x2D\x73\x69\x7A\x69\x6E\x67\x3A\x20\x62\x6F\x72\x64\x65\x72\x2D\x62\x6F\x78\x3B\x62\x6F\x78\x2D\x73\x69\x7A\x69\x6E\x67\x3A\x20\x62\x6F\x72\x64\x65\x72\x2D\x62\x6F\x78\x7D","\x2E\x76\x69\x64\x65\x6F\x2D\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x7B\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x3A\x20\x23\x30\x30\x30\x3B\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x20\x66\x69\x78\x65\x64\x3B\x74\x6F\x70\x3A\x20\x30\x3B\x72\x69\x67\x68\x74\x3A\x20\x30\x3B\x62\x6F\x74\x74\x6F\x6D\x3A\x20\x30\x3B\x6C\x65\x66\x74\x3A\x20\x30\x3B\x7A\x2D\x69\x6E\x64\x65\x78\x3A\x20\x2D\x39\x39\x7D","\x2E\x76\x69\x64\x65\x6F\x2D\x66\x6F\x72\x65\x67\x72\x6F\x75\x6E\x64\x2C\x2E\x76\x69\x64\x65\x6F\x2D\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x20\x69\x66\x72\x61\x6D\x65\x7B\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x20\x61\x62\x73\x6F\x6C\x75\x74\x65\x3B\x74\x6F\x70\x3A\x20\x30\x3B\x6C\x65\x66\x74\x3A\x20\x30\x3B\x77\x69\x64\x74\x68\x3A\x20\x31\x30\x30\x25\x3B\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x70\x6F\x69\x6E\x74\x65\x72\x2D\x65\x76\x65\x6E\x74\x73\x3A\x20\x6E\x6F\x6E\x65\x7D","\x23\x76\x69\x64\x74\x6F\x70\x2D\x63\x6F\x6E\x74\x65\x6E\x74\x7B\x74\x6F\x70\x3A\x20\x30\x3B\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x66\x66\x66\x7D\x2E\x76\x69\x64\x2D\x69\x6E\x66\x6F\x7B\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x20\x61\x62\x73\x6F\x6C\x75\x74\x65\x3B\x74\x6F\x70\x3A\x20\x30\x3B\x72\x69\x67\x68\x74\x3A\x20\x30\x3B\x77\x69\x64\x74\x68\x3A\x20\x33\x33\x25\x3B\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x3A\x20\x72\x67\x62\x61\x28\x30\x2C\x30\x2C\x30\x2C\x30\x2E\x33\x29\x3B\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x66\x66\x66\x3B\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x31\x72\x65\x6D\x3B\x66\x6F\x6E\x74\x2D\x66\x61\x6D\x69\x6C\x79\x3A\x20\x41\x76\x65\x6E\x69\x72\x2C\x20\x48\x65\x6C\x76\x65\x74\x69\x63\x61\x2C\x20\x73\x61\x6E\x73\x2D\x73\x65\x72\x69\x66\x7D","\x2E\x76\x69\x64\x2D\x69\x6E\x66\x6F\x20\x68\x31\x7B\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x20\x32\x72\x65\x6D\x3B\x66\x6F\x6E\x74\x2D\x77\x65\x69\x67\x68\x74\x3A\x20\x37\x30\x30\x3B\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x30\x3B\x6C\x69\x6E\x65\x2D\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x2E\x32\x7D","\x2E\x76\x69\x64\x2D\x69\x6E\x66\x6F\x20\x61\x7B\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x62\x6C\x6F\x63\x6B\x3B\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x66\x66\x66\x3B\x74\x65\x78\x74\x2D\x64\x65\x63\x6F\x72\x61\x74\x69\x6F\x6E\x3A\x20\x6E\x6F\x6E\x65\x3B\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x3A\x20\x72\x67\x62\x61\x28\x30\x2C\x30\x2C\x30\x2C\x30\x2E\x35\x29\x3B\x2D\x77\x65\x62\x6B\x69\x74\x2D\x74\x72\x61\x6E\x73\x69\x74\x69\x6F\x6E\x3A\x20\x2E\x36\x73\x20\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x3B\x74\x72\x61\x6E\x73\x69\x74\x69\x6F\x6E\x3A\x20\x2E\x36\x73\x20\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x3B\x62\x6F\x72\x64\x65\x72\x2D\x62\x6F\x74\x74\x6F\x6D\x3A\x20\x6E\x6F\x6E\x65\x3B\x6D\x61\x72\x67\x69\x6E\x3A\x20\x31\x72\x65\x6D\x20\x61\x75\x74\x6F\x3B\x74\x65\x78\x74\x2D\x61\x6C\x69\x67\x6E\x3A\x20\x63\x65\x6E\x74\x65\x72\x7D","\x2E\x76\x69\x64\x2D\x69\x6E\x66\x6F\x20\x2E\x61\x63\x72\x6F\x6E\x79\x6D\x7B\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x7D\x7D","\x3C\x64\x69\x76\x20\x63\x6C\x61\x73\x73\x3D\x22\x76\x69\x64\x65\x6F\x2D\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x22\x3E\x3C\x64\x69\x76\x20\x63\x6C\x61\x73\x73\x3D\x22\x76\x69\x64\x65\x6F\x2D\x66\x6F\x72\x65\x67\x72\x6F\x75\x6E\x64\x22\x3E\x3C\x69\x66\x72\x61\x6D\x65\x20\x69\x64\x3D\x22\x76\x69\x64\x65\x6F\x2D\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x22\x20\x66\x72\x61\x6D\x65\x62\x6F\x72\x64\x65\x72\x3D\x22\x30\x22\x20\x68\x65\x69\x67\x68\x74\x3D\x22\x31\x30\x30\x25\x22\x20\x77\x69\x64\x74\x68\x3D\x22\x31\x30\x30\x25\x22\x20\x73\x72\x63\x3D\x22\x68\x74\x74\x70\x73\x3A\x2F\x2F\x77\x77\x77\x2E\x79\x6F\x75\x74\x75\x62\x65\x2E\x63\x6F\x6D\x2F\x65\x6D\x62\x65\x64\x2F","\x3F\x63\x6F\x6E\x74\x72\x6F\x6C\x73\x3D\x30\x26\x73\x68\x6F\x77\x69\x6E\x66\x6F\x3D\x30\x26\x72\x65\x6C\x3D\x30\x26\x61\x75\x74\x6F\x70\x6C\x61\x79\x3D\x31\x26\x6C\x6F\x6F\x70\x3D\x31\x26\x73\x74\x61\x72\x74\x5F\x72\x61\x64\x69\x6F\x3D\x31\x26\x70\x6C\x61\x79\x6C\x69\x73\x74\x3D","\x22\x3E\x3C\x2F\x69\x66\x72\x61\x6D\x65\x3E\x3C\x2F\x64\x69\x76\x3E\x3C\x2F\x64\x69\x76\x3E\x3C\x2F\x64\x69\x76\x3E","\x2E\x76\x69\x64\x65\x6F\x2D\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x62\x61\x6E\x6E\x65\x72\x73\x2F\x74\x72\x6F\x6C\x6C\x31\x2E\x6D\x70\x33","\x75\x72\x6C\x28\x22\x20\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6D\x65\x64\x69\x61\x2E\x67\x69\x70\x68\x79\x2E\x63\x6F\x6D\x2F\x6D\x65\x64\x69\x61\x2F\x65\x56\x79\x34\x36\x45\x57\x79\x63\x6C\x54\x49\x41\x2F\x67\x69\x70\x68\x79\x2E\x67\x69\x66\x20\x22\x29","\x75\x72\x6C\x28\x22\x20\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x62\x61\x6E\x6E\x65\x72\x73\x2F\x69\x63\x6F\x65\x75\x63\x69\x64\x2E\x67\x69\x66\x20\x22\x29","\x75\x72\x6C\x28\x22\x20\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6D\x65\x64\x69\x61\x2E\x67\x69\x70\x68\x79\x2E\x63\x6F\x6D\x2F\x6D\x65\x64\x69\x61\x2F\x56\x53\x75\x57\x66\x6C\x31\x71\x43\x69\x52\x73\x6B\x2F\x67\x69\x70\x68\x79\x2E\x67\x69\x66\x20\x22\x29","\x75\x72\x6C\x28\x22\x20\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6D\x65\x64\x69\x61\x2E\x67\x69\x70\x68\x79\x2E\x63\x6F\x6D\x2F\x6D\x65\x64\x69\x61\x2F\x61\x77\x39\x57\x67\x76\x67\x4E\x64\x31\x62\x51\x6B\x2F\x67\x69\x70\x68\x79\x2E\x67\x69\x66\x20\x22\x29","\x5F\x64\x72\x61\x77\x49\x6D\x61\x67\x65","\x64\x72\x61\x77\x49\x6D\x61\x67\x65","\x50\x72\x65\x76\x65\x6E\x74\x69\x6E\x67\x20\x63\x61\x6E\x76\x61\x73\x20\x74\x6F\x20\x63\x72\x61\x73\x68\x20\x66\x72\x6F\x6D\x20\x69\x6D\x61\x67\x65\x20\x77\x69\x64\x74\x68\x20\x61\x6E\x64\x20\x68\x65\x69\x67\x68\x74","\x4F\x43\x68\x61\x74\x42\x65\x74\x74\x65\x72","\x72\x67\x62\x61\x28\x31\x32\x38\x2C\x31\x32\x38\x2C\x31\x32\x38\x2C\x30\x2E\x39\x29","\x77\x61\x69\x74\x20\x66\x6F\x72\x20\x4F\x47\x41\x52\x69\x6F\x20\x6C\x6F\x61\x64","\x6F\x62\x73\x5F\x68\x69\x73\x74","\x61\x64\x64\x65\x64\x4E\x6F\x64\x65\x73","\x68\x69\x73\x74\x5F\x61\x64\x64","\x67\x65\x74","\x6F\x62\x73\x65\x72\x76\x65","\x6F\x62\x73\x5F\x69\x6E\x70\x74","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x4E\x61\x6D\x65","\x74\x61\x72\x67\x65\x74","\x69\x6E\x70\x74\x5F\x73\x68\x6F\x77","\x69\x6E\x70\x74\x5F\x68\x69\x64\x65","\x68\x69\x73\x74\x5F\x73\x68\x6F\x77","\x65\x6D\x70\x68\x61\x73\x69\x73\x5F\x62\x67\x63\x6F\x6C\x6F\x72","\x65\x6D\x70\x68\x61\x73\x69\x73\x5F\x74\x69\x6D\x65","\x73\x63\x72\x6F\x6C\x6C\x5F\x64\x75\x6C\x61\x74\x69\x6F\x6E","\x68\x69\x73\x74\x68\x69\x64\x65\x5F\x74\x69\x6D\x65\x49\x44","\x68\x69\x73\x74\x68\x69\x64\x65\x5F\x65\x6E\x61\x62\x6C\x65","\x68\x69\x73\x74\x68\x69\x64\x65\x5F\x74\x69\x6D\x65","\x23\x55\x73\x65\x72\x50\x72\x6F\x66\x69\x6C\x65\x49\x44\x32\x61","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x6D\x73\x65\x74\x74\x69\x6E\x67\x73\x2E\x73\x6E\x65\x7A\x2E\x6F\x72\x67\x2F","\x4C\x4D\x53\x65\x74\x74\x69\x6E\x67\x73","\x3A\x20\x3C\x66\x6F\x6E\x74\x20\x63\x6F\x6C\x6F\x72\x3D\x27\x79\x65\x6C\x6C\x6F\x77\x27\x3E\x3C\x62\x3E","\x3C\x2F\x62\x3E\x3C\x2F\x66\x6F\x6E\x74\x3E","\x72\x65\x73\x70\x6F\x6E\x73\x65","\x73\x65\x72\x76\x65\x72\x2D\x74\x6F\x6B\x65\x6E","\x63\x6C\x61\x6E\x74\x61\x67","\x73\x65\x72\x76\x65\x72\x2D\x72\x65\x63\x6F\x6E\x6E\x65\x63\x74","\x77\x73\x73\x3A\x2F\x2F\x61\x67\x61\x72\x2E\x73\x6E\x65\x7A\x2E\x6F\x72\x67\x3A\x36\x33\x30\x35\x31\x2F","\x63\x6C\x69\x65\x6E\x74","\x73\x65\x72\x76\x65\x72","\x6F\x6E\x6F\x70\x65\x6E","\x75\x70\x64\x61\x74\x65\x53\x65\x72\x76\x65\x72\x44\x65\x74\x61\x69\x6C\x73","\x6F\x6E\x63\x6C\x6F\x73\x65","\x72\x65\x63\x6F\x6E\x6E\x65\x63\x74","\x6F\x6E\x6D\x65\x73\x73\x61\x67\x65","\x6F\x6E\x4D\x65\x73\x73\x61\x67\x65","\x52\x65\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6E\x67\x20\x69\x6E\x20\x35\x20\x73\x65\x63\x6F\x6E\x64\x73\x2E\x2E\x2E","\x75\x70\x64\x61\x74\x65\x5F\x64\x65\x74\x61\x69\x6C\x73","\x6E\x69\x63\x6B\x6E\x61\x6D\x65","\x41\x49\x44","\x61\x67\x61\x72\x69\x6F\x49\x44","\x68\x69\x64\x65\x63\x6F\x75\x6E\x74\x72\x79","\x61\x67\x61\x72\x69\x6F\x4C\x45\x56\x45\x4C","\x72\x65\x61\x64\x79\x53\x74\x61\x74\x65","\x4F\x50\x45\x4E","\x64\x61\x74\x61","\x70\x6F\x6E\x67","\x70\x69\x6E\x67","\x72\x65\x63\x6F\x6E\x6E\x65\x63\x74\x42\x75\x74\x74\x6F\x6E","\x43\x6F\x75\x6C\x64\x20\x6E\x6F\x74\x20\x69\x6E\x69\x74\x69\x61\x6C\x69\x7A\x65\x20\x49\x6E\x66\x6F\x20\x73\x65\x6E\x64\x69\x6E\x67","\x75\x70\x64\x61\x74\x65\x44\x65\x74\x61\x69\x6C\x73","\x5F\x5F\x63\x66\x64\x75\x69\x64","\x3B","\x63\x68\x61\x72\x41\x74","\x6F\x6E\x4F\x70\x65\x6E","\x6F\x6E\x43\x6C\x6F\x73\x65","\x63\x6C\x6F\x73\x65","\x69\x73\x45\x6D\x70\x74\x79","\x75\x70\x64\x61\x74\x65\x50\x6C\x61\x79\x65\x72\x73","\x70\x6C\x61\x79\x65\x72\x73\x5F\x6C\x69\x73\x74","\x55\x73\x65\x72\x20\x46\x6F\x75\x6E\x64\x2E\x20\x52\x65\x76\x65\x61\x6C\x69\x6E\x67\x20\x73\x65\x72\x76\x65\x72\x2E\x2E\x2E","\x6E\x69\x63\x6B\x6E\x61\x6D\x65\x22\x3A\x22","\x22\x2C\x22\x73\x65\x72\x76\x65\x72","\x65\x78\x74\x72\x61","\x63\x6F\x75\x6E\x74\x72\x79","\x69\x70\x5F\x69\x6E\x66\x6F","\x55\x4E","\x22\x2C\x22\x68\x69\x64\x65\x63\x6F\x75\x6E\x74\x72\x79","\x22\x2C\x22\x41\x49\x44","\x22\x2C\x22\x74\x61\x67","\x52\x65\x67\x69\x6F\x6E\x3A\x3C\x73\x70\x61\x6E\x20\x69\x64\x3D\x27\x72\x65\x67\x69\x6F\x6E\x69\x6E\x66\x6F\x27\x3E","\x3C\x2F\x73\x70\x61\x6E\x3E\x2C\x20\x4D\x6F\x64\x65\x3C\x73\x70\x61\x6E\x20\x69\x64\x3D\x27\x6D\x6F\x64\x65\x69\x6E\x66\x6F\x27\x3E","\x3C\x2F\x73\x70\x61\x6E\x3E\x2E\x20\x3C\x73\x70\x61\x6E\x20\x63\x6C\x61\x73\x73\x3D\x27\x6D\x61\x69\x6E\x2D\x63\x6F\x6C\x6F\x72\x27\x3E\x3C\x73\x70\x61\x6E\x20\x69\x64\x3D\x27\x70\x6C\x61\x79\x65\x72\x69\x6E\x66\x6F\x27\x3E","\x3C\x2F\x73\x70\x61\x6E\x3E\x20\x3C\x73\x70\x61\x6E\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x27\x70\x6F\x70\x6F\x76\x65\x72\x27\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x27\x6C\x65\x66\x74\x27\x20\x74\x69\x74\x6C\x65\x3D\x27\x27\x20\x64\x61\x74\x61\x2D\x63\x6F\x6E\x74\x65\x6E\x74\x3D\x27\x64\x61\x74\x61\x2D\x68\x74\x6D\x6C\x3D\x27\x74\x72\x75\x65\x27\x20\x63\x6C\x61\x73\x73\x3D\x27\x63\x6F\x75\x6E\x74\x72\x79\x2D\x69\x63\x6F\x6E\x20\x66\x6C\x61\x67\x2D\x69\x63\x6F\x6E\x20\x66\x6C\x61\x67\x2D\x69\x63\x6F\x6E\x2D","\x27\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x27\x50\x6C\x61\x79\x65\x72\x20\x44\x65\x74\x61\x69\x6C\x73\x27\x3E\x3C\x2F\x73\x70\x61\x6E\x3E\x3C\x2F\x73\x70\x61\x6E\x3E","\x20\x28\x3C\x73\x70\x61\x6E\x20\x69\x64\x3D\x27\x74\x6F\x6B\x65\x6E\x69\x6E\x66\x6F\x27\x3E","\x3C\x2F\x73\x70\x61\x6E\x3E\x29","\x3C\x73\x70\x61\x6E\x20\x63\x6C\x61\x73\x73\x3D\x27\x6D\x61\x69\x6E\x2D\x63\x6F\x6C\x6F\x72\x27\x3E\x3C\x73\x70\x61\x6E\x20\x69\x64\x3D\x27\x70\x6C\x61\x79\x65\x72\x69\x6E\x66\x6F\x27\x3E","\x53\x65\x72\x76\x65\x72\x20\x46\x6F\x75\x6E\x64\x2E\x20\x52\x65\x76\x65\x61\x6C\x69\x6E\x67\x20\x75\x73\x65\x72\x73\x2E\x2E\x2E","\x3C\x2F\x73\x70\x61\x6E\x3E\x2E\x20\x3C\x73\x70\x61\x6E\x20\x69\x64\x3D\x27\x70\x6C\x61\x79\x65\x72\x69\x6E\x66\x6F\x27\x3E","\x20\x3C\x73\x70\x61\x6E\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x27\x70\x6F\x70\x6F\x76\x65\x72\x27\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x27\x6C\x65\x66\x74\x27\x20\x74\x69\x74\x6C\x65\x3D\x27\x27\x20\x64\x61\x74\x61\x2D\x63\x6F\x6E\x74\x65\x6E\x74\x3D\x27\x64\x61\x74\x61\x2D\x68\x74\x6D\x6C\x3D\x27\x74\x72\x75\x65\x27\x20\x63\x6C\x61\x73\x73\x3D\x27\x63\x6F\x75\x6E\x74\x72\x79\x2D\x69\x63\x6F\x6E\x20\x66\x6C\x61\x67\x2D\x69\x63\x6F\x6E\x20\x66\x6C\x61\x67\x2D\x69\x63\x6F\x6E\x2D","\x27\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x27\x50\x6C\x61\x79\x65\x72\x20\x44\x65\x74\x61\x69\x6C\x73\x27\x3E\x3C\x2F\x73\x70\x61\x6E\x3E\x3C\x2F\x73\x70\x61\x6E\x3E\x20\x28\x3C\x73\x70\x61\x6E\x20\x63\x6C\x61\x73\x73\x3D\x27\x6D\x61\x69\x6E\x2D\x63\x6F\x6C\x6F\x72\x27\x3E\x3C\x73\x70\x61\x6E\x20\x69\x64\x3D\x27\x74\x6F\x6B\x65\x6E\x69\x6E\x66\x6F\x27\x3E","\x3C\x2F\x73\x70\x61\x6E\x3E\x3C\x2F\x73\x70\x61\x6E\x3E\x29","\x3C\x73\x70\x61\x6E\x20\x69\x64\x3D\x27\x70\x6C\x61\x79\x65\x72\x69\x6E\x66\x6F\x27\x3E","\x53\x65\x72\x76\x65\x72\x20\x2F\x20\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x2C\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64\x2E\x20\x44\x6F\x20\x79\x6F\x75\x20\x77\x61\x6E\x74\x20\x74\x68\x65\x20\x31\x2D\x62\x79\x2D\x31\x20\x6D\x61\x6E\x75\x61\x6C\x20\x73\x65\x61\x72\x63\x68\x20\x6C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x73\x20\x6F\x66\x20\x3C\x66\x6F\x6E\x74\x20\x63\x6F\x6C\x6F\x72\x3D\x22\x79\x65\x6C\x6C\x6F\x77\x22\x3E","\x20\x2F\x20","\x3C\x2F\x66\x6F\x6E\x74\x3E\x20\x3F","\x3C\x2F\x62\x72\x3E\x20\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x20\x22\x6D\x61\x6E\x75\x61\x6C\x73\x65\x61\x72\x63\x68\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x62\x6C\x6F\x63\x6B\x20\x62\x74\x6E\x2D\x69\x6E\x66\x6F\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x31\x30\x70\x78\x3B\x62\x6F\x72\x64\x65\x72\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x64\x61\x72\x6B\x62\x6C\x75\x65\x3B\x22\x3E","\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E\x3C\x62\x72\x3E\x3C\x62\x75\x74\x74\x6F\x6E\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x73\x6D\x20\x62\x74\x6E\x2D\x77\x61\x72\x6E\x69\x6E\x67\x20\x62\x74\x6E\x2D\x65\x78\x69\x74\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x77\x69\x64\x74\x68\x3A\x20\x31\x30\x30\x25\x3B\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x2D\x32\x30\x70\x78\x3B\x22\x3E","\x23\x6D\x61\x6E\x75\x61\x6C\x73\x65\x61\x72\x63\x68","\x6D\x65\x73\x73\x61\x67\x65\x2D\x62\x6F\x78","\x6F\x67\x61\x72\x69\x6F\x2E\x6A\x73\x20\x6E\x6F\x74\x20\x6C\x6F\x61\x64\x65\x64","\x74\x69\x74\x6C\x65","\x53\x70\x65\x63\x74\x61\x74\x65","\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65","\x74\x6F\x6F\x6C\x74\x69\x70","\x3C\x73\x70\x61\x6E\x20\x63\x6C\x61\x73\x73\x3D\x22\x67\x6C\x79\x70\x68\x69\x63\x6F\x6E\x20\x67\x6C\x79\x70\x68\x69\x63\x6F\x6E\x2D\x67\x6C\x6F\x62\x65\x22\x3E\x3C\x2F\x73\x70\x61\x6E\x3E","\x62\x75\x74\x74\x6F\x6E\x3A\x63\x6F\x6E\x74\x61\x69\x6E\x73\x28\x27\x53\x70\x65\x63\x74\x61\x74\x65\x27\x29","\x4C\x6F\x67\x6F\x75\x74","\x3C\x73\x70\x61\x6E\x20\x63\x6C\x61\x73\x73\x3D\x22\x67\x6C\x79\x70\x68\x69\x63\x6F\x6E\x20\x67\x6C\x79\x70\x68\x69\x63\x6F\x6E\x2D\x6F\x66\x66\x22\x3E\x3C\x2F\x73\x70\x61\x6E\x3E","\x62\x75\x74\x74\x6F\x6E\x3A\x63\x6F\x6E\x74\x61\x69\x6E\x73\x28\x27\x4C\x6F\x67\x6F\x75\x74\x27\x29","\x62\x74\x6E\x2D\x6C\x69\x6E\x6B","\x62\x74\x6E\x2D\x69\x6E\x66\x6F","\x62\x75\x74\x74\x6F\x6E\x3A\x63\x6F\x6E\x74\x61\x69\x6E\x73\x28\x27\x43\x6F\x70\x79\x27\x29","\x3C\x73\x70\x61\x6E\x20\x63\x6C\x61\x73\x73\x3D\x22\x67\x6C\x79\x70\x68\x69\x63\x6F\x6E\x20\x67\x6C\x79\x70\x68\x69\x63\x6F\x6E\x2D\x70\x6C\x75\x73\x22\x3E\x3C\x2F\x73\x70\x61\x6E\x3E","\x23\x63\x72\x65\x61\x74\x65\x2D\x70\x61\x72\x74\x79\x2D\x62\x74\x6E\x2D\x32","\x43\x72\x65\x61\x74\x65\x20\x70\x61\x72\x74\x79","\x77\x69\x64\x74\x68\x3A\x20\x34\x39\x25\x20\x21\x69\x6D\x70\x6F\x72\x74\x61\x6E\x74\x3B\x20\x66\x6C\x6F\x61\x74\x3A\x20\x72\x69\x67\x68\x74\x3B","\x4A\x6F\x69\x6E\x20\x70\x61\x72\x74\x79","\x3C\x73\x70\x61\x6E\x20\x63\x6C\x61\x73\x73\x3D\x22\x67\x6C\x79\x70\x68\x69\x63\x6F\x6E\x20\x67\x6C\x79\x70\x68\x69\x63\x6F\x6E\x2D\x73\x61\x76\x65\x22\x3E\x3C\x2F\x73\x70\x61\x6E\x3E","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x46\x61\x64\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x77\x69\x64\x74\x68\x3A\x20\x31\x30\x30\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x20\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x20\x61\x62\x73\x6F\x6C\x75\x74\x65\x3B\x20\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x3A\x20\x62\x6C\x61\x63\x6B\x3B\x20\x7A\x2D\x69\x6E\x64\x65\x78\x3A\x20\x31\x30\x30\x3B\x20\x6F\x70\x61\x63\x69\x74\x79\x3A\x20\x30\x2E\x36\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x3E\x3C\x2F\x64\x69\x76\x3E","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x73\x74\x61\x74\x73\x49\x6E\x66\x6F\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x6D\x61\x69\x6E\x2D\x63\x6F\x6C\x6F\x72\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x6F\x69\x6E\x74\x65\x72\x2D\x65\x76\x65\x6E\x74\x73\x3A\x20\x61\x75\x74\x6F\x3B\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x20\x31\x33\x70\x78\x3B\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x33\x70\x78\x3B\x66\x6C\x6F\x61\x74\x3A\x20\x6C\x65\x66\x74\x3B\x66\x6F\x6E\x74\x2D\x77\x65\x69\x67\x68\x74\x3A\x20\x37\x30\x30\x3B\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x72\x67\x62\x61\x28\x30\x2C\x20\x30\x2C\x20\x30\x2C\x20\x30\x2E\x32\x29\x3B\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x33\x70\x78\x3B\x62\x6F\x72\x64\x65\x72\x2D\x72\x61\x64\x69\x75\x73\x3A\x20\x34\x70\x78\x3B\x77\x69\x64\x74\x68\x3A\x20\x36\x35\x25\x3B\x68\x65\x69\x67\x68\x74\x3A\x20\x34\x34\x70\x78\x3B\x7A\x2D\x69\x6E\x64\x65\x78\x3A\x20\x31\x35\x3B\x6D\x61\x72\x67\x69\x6E\x3A\x20\x61\x75\x74\x6F\x3B\x74\x6F\x70\x3A\x20\x30\x70\x78\x3B\x72\x69\x67\x68\x74\x3A\x20\x30\x70\x78\x3B\x6C\x65\x66\x74\x3A\x20\x30\x70\x78\x3B\x62\x6F\x74\x74\x6F\x6D\x3A\x20\x38\x35\x70\x78\x3B\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x20\x66\x69\x78\x65\x64\x3B\x70\x6F\x69\x6E\x74\x65\x72\x2D\x65\x76\x65\x6E\x74\x73\x3A\x20\x61\x75\x74\x6F\x3B\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x66\x66\x66\x66\x66\x66\x3B\x22\x3E","\x3C\x70\x20\x73\x74\x79\x6C\x65\x3D\x22\x66\x6C\x6F\x61\x74\x3A\x20\x72\x69\x67\x68\x74\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x72\x69\x67\x68\x74\x3A\x20\x31\x30\x70\x78\x3B\x22\x3E\x3C\x73\x70\x61\x6E\x20\x69\x64\x3D\x22\x6E\x6F\x74\x65\x73\x53\x65\x72\x76\x65\x72\x22\x3E\x53\x65\x72\x76\x65\x72\x73\x3A\x20\x3C\x2F\x73\x70\x61\x6E\x3E\x3C\x73\x70\x61\x6E\x20\x69\x64\x3D\x22\x6E\x75\x6D\x53\x65\x72\x76\x65\x72\x73\x22\x3E\x3C\x2F\x73\x70\x61\x6E\x3E\x20\x28\x3C\x73\x70\x61\x6E\x20\x69\x64\x3D\x22\x70\x70\x73\x22\x3E\x3C\x2F\x73\x70\x61\x6E\x3E\x20\x3C\x73\x70\x61\x6E\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x74\x6F\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x50\x6C\x61\x79\x65\x72\x73\x20\x70\x65\x72\x20\x73\x65\x72\x76\x65\x72\x22\x3E\x50\x50\x53\x3C\x2F\x73\x70\x61\x6E\x3E\x29\x3C\x2F\x70\x3E","\x3C\x70\x20\x73\x74\x79\x6C\x65\x3D\x22\x66\x6C\x6F\x61\x74\x3A\x20\x72\x69\x67\x68\x74\x3B\x6D\x61\x72\x67\x69\x6E\x2D\x72\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x70\x78\x3B\x22\x3E\x3C\x73\x70\x61\x6E\x20\x69\x64\x3D\x22\x6E\x6F\x74\x65\x73\x50\x6C\x61\x79\x65\x72\x73\x22\x3E\x50\x6C\x61\x79\x65\x72\x73\x3A\x20\x3C\x2F\x73\x70\x61\x6E\x3E\x3C\x73\x70\x61\x6E\x20\x69\x64\x3D\x22\x6E\x75\x6D\x50\x6C\x61\x79\x65\x72\x73\x22\x3E\x3C\x2F\x73\x70\x61\x6E\x3E\x20\x2F\x20\x3C\x73\x70\x61\x6E\x20\x69\x64\x3D\x22\x74\x6F\x74\x61\x6C\x50\x6C\x61\x79\x65\x72\x73\x22\x20\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x74\x6F\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x54\x6F\x74\x61\x6C\x20\x70\x6C\x61\x79\x65\x72\x73\x20\x6F\x6E\x6C\x69\x6E\x65\x22\x3E\x3C\x2F\x73\x70\x61\x6E\x3E\x3C\x2F\x70\x3E\x3C\x2F\x64\x69\x76\x3E","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x73\x65\x61\x72\x63\x68\x48\x75\x64\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x68\x75\x64\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x77\x69\x64\x74\x68\x3A\x20\x36\x35\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x36\x30\x70\x78\x3B\x20\x7A\x2D\x69\x6E\x64\x65\x78\x3A\x20\x31\x35\x3B\x20\x6D\x61\x72\x67\x69\x6E\x3A\x20\x61\x75\x74\x6F\x3B\x20\x74\x6F\x70\x3A\x20\x30\x3B\x20\x72\x69\x67\x68\x74\x3A\x20\x30\x3B\x20\x6C\x65\x66\x74\x3A\x20\x30\x3B\x20\x62\x6F\x74\x74\x6F\x6D\x3A\x20\x30\x3B\x20\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x20\x66\x69\x78\x65\x64\x3B\x22\x3E","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x31\x30\x70\x78\x3B\x22\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x73\x65\x61\x72\x63\x68\x49\x6E\x70\x75\x74\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x74\x69\x74\x6C\x65\x3D\x22\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x45\x6E\x74\x65\x72\x20\x66\x72\x69\x65\x6E\x64\x27\x73\x20\x74\x6F\x6B\x65\x6E\x2C\x20\x49\x50\x2C\x20\x6C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x2C\x20\x6E\x61\x6D\x65\x20\x6F\x72\x20\x63\x6C\x61\x6E\x20\x74\x61\x67\x2E\x2E\x2E\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x6F\x69\x6E\x74\x65\x72\x2D\x65\x76\x65\x6E\x74\x73\x3A\x20\x61\x75\x74\x6F\x3B\x6D\x61\x72\x67\x69\x6E\x2D\x62\x6F\x74\x74\x6F\x6D\x3A\x20\x31\x30\x70\x78\x3B\x66\x6C\x6F\x61\x74\x3A\x20\x6C\x65\x66\x74\x3B\x77\x69\x64\x74\x68\x3A\x20\x38\x30\x25\x20\x21\x69\x6D\x70\x6F\x72\x74\x61\x6E\x74\x3B\x74\x65\x78\x74\x2D\x61\x6C\x69\x67\x6E\x3A\x20\x63\x65\x6E\x74\x65\x72\x3B\x22\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x73\x65\x61\x72\x63\x68\x42\x74\x6E\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x63\x6F\x70\x79\x2D\x74\x6F\x6B\x65\x6E\x20\x63\x6F\x70\x79\x2D\x70\x61\x72\x74\x79\x2D\x74\x6F\x6B\x65\x6E\x20\x62\x74\x6E\x2D\x70\x72\x69\x6D\x61\x72\x79\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x62\x6F\x74\x74\x6F\x6D\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x43\x61\x6E\x63\x65\x6C\x20\x73\x65\x61\x72\x63\x68\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x6F\x69\x6E\x74\x65\x72\x2D\x65\x76\x65\x6E\x74\x73\x3A\x20\x61\x75\x74\x6F\x3B\x6D\x61\x72\x67\x69\x6E\x2D\x62\x6F\x74\x74\x6F\x6D\x3A\x31\x30\x70\x78\x3B\x77\x69\x64\x74\x68\x3A\x20\x31\x35\x25\x3B\x22\x3E\x3C\x73\x70\x61\x6E\x20\x69\x64\x3D\x22\x73\x65\x61\x72\x63\x68\x53\x70\x61\x6E\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x73\x65\x61\x72\x63\x68\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x73\x70\x61\x6E\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x23\x6F\x76\x65\x72\x6C\x61\x79\x73\x2D\x68\x75\x64","\x23\x72\x65\x67\x69\x6F\x6E\x6D\x6F\x64\x65\x63\x68\x65\x63\x6B","\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72","\x50\x61\x73\x73\x77\x6F\x72\x64","\x57\x68\x65\x6E\x20\x45\x4E\x41\x42\x4C\x45\x44\x3A\x20\x4F\x70\x74\x69\x6D\x69\x7A\x65\x64\x20\x6D\x61\x73\x73\x20\x28\x2B\x2F\x2D\x32\x25\x29\x20\x4F\x4E\x2C\x20\x4D\x65\x72\x67\x65\x20\x54\x69\x6D\x65\x72\x20\x42\x45\x54\x41\x20\x4F\x46\x46\x2E\x20\x53\x75\x67\x67\x65\x73\x74\x65\x64\x20\x74\x6F\x20\x62\x65\x20\x45\x4E\x41\x42\x4C\x45\x44\x20\x66\x6F\x72\x20\x4C\x61\x67\x20\x72\x65\x64\x75\x63\x65\x2E","\x70\x61\x72\x65\x6E\x74","\x23\x6F\x70\x74\x69\x6D\x69\x7A\x65\x64\x4D\x61\x73\x73","\x3C\x6C\x61\x62\x65\x6C\x20\x73\x74\x79\x6C\x65\x3D\x22\x66\x6C\x6F\x61\x74\x3A\x6C\x65\x66\x74\x3B\x20\x70\x61\x64\x64\x69\x6E\x67\x2D\x6C\x65\x66\x74\x3A\x30\x3B\x20\x70\x61\x64\x64\x69\x6E\x67\x2D\x72\x69\x67\x68\x74\x3A\x30\x22\x3E","\x75\x6E\x6C\x6F\x63\x6B\x65\x64\x46\x50\x53","\x3C\x73\x65\x6C\x65\x63\x74\x20\x69\x64\x3D\x22\x46\x72\x61\x6D\x65\x57\x6F\x72\x6B\x4F\x70\x74\x69\x6F\x6E\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x6F\x6E\x63\x68\x61\x6E\x67\x65\x3D\x22\x63\x68\x61\x6E\x67\x65\x46\x72\x61\x6D\x65\x57\x6F\x72\x6B\x28\x29\x3B\x22\x20\x72\x65\x71\x75\x69\x72\x65\x64\x3D\x22\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x22\x20\x74\x69\x74\x6C\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x64\x69\x73\x70\x6C\x61\x79\x3A\x69\x6E\x6C\x69\x6E\x65\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x37\x30\x25\x3B\x20\x66\x6C\x6F\x61\x74\x3A\x72\x69\x67\x68\x74\x3B\x22\x20\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x34\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x4C\x69\x6D\x69\x74\x65\x64\x20\x52\x61\x74\x65\x20\x2B\x20\x34\x6D\x73\x20\x64\x65\x6C\x61\x79\x20\x28\x73\x75\x67\x67\x65\x73\x74\x65\x64\x29\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x66\x61\x6C\x73\x65\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x4C\x69\x6D\x69\x74\x65\x64\x20\x52\x61\x74\x65\x20\x2B\x20\x4E\x6F\x20\x64\x65\x6C\x61\x79\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x32\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x4C\x69\x6D\x69\x74\x65\x64\x20\x52\x61\x74\x65\x20\x2B\x20\x32\x6D\x73\x20\x64\x65\x6C\x61\x79\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x38\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x4C\x69\x6D\x69\x74\x65\x64\x20\x52\x61\x74\x65\x20\x2B\x20\x38\x6D\x73\x20\x64\x65\x6C\x61\x79\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x31\x36\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x4C\x69\x6D\x69\x74\x65\x64\x20\x52\x61\x74\x65\x20\x2B\x20\x31\x36\x6D\x73\x20\x64\x65\x6C\x61\x79\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x33\x32\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x4C\x69\x6D\x69\x74\x65\x64\x20\x52\x61\x74\x65\x20\x2B\x20\x33\x32\x6D\x73\x20\x64\x65\x6C\x61\x79\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x36\x34\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x4C\x69\x6D\x69\x74\x65\x64\x20\x52\x61\x74\x65\x20\x2B\x20\x36\x34\x6D\x73\x20\x64\x65\x6C\x61\x79\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x74\x72\x75\x65\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x55\x6E\x6C\x69\x6D\x69\x74\x65\x64\x20\x52\x61\x74\x65\x20\x28\x6E\x6F\x74\x20\x73\x75\x67\x67\x65\x73\x74\x65\x64\x29\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x75\x6C\x74\x72\x61\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x55\x6C\x74\x72\x61\x20\x28\x6E\x6F\x74\x20\x73\x75\x67\x67\x65\x73\x74\x65\x64\x20\x2D\x20\x74\x65\x73\x74\x29\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x2F\x73\x65\x6C\x65\x63\x74\x3E\x3C\x2F\x6C\x61\x62\x65\x6C\x3E","\x23\x61\x6E\x69\x6D\x61\x74\x69\x6F\x6E\x2D\x76\x61\x6C\x75\x65","\x54\x79\x70\x65\x20\x6F\x6E\x20\x63\x68\x72\x6F\x6D\x65\x3A\x20\x63\x68\x72\x6F\x6D\x65\x3A\x2F\x2F\x73\x65\x74\x74\x69\x6E\x67\x73\x2F\x73\x79\x73\x74\x65\x6D\x20\x2C\x20\x65\x6E\x73\x75\x72\x65\x20\x55\x73\x65\x20\x68\x61\x72\x64\x77\x61\x72\x65\x20\x61\x63\x63\x65\x6C\x65\x72\x61\x74\x69\x6F\x6E\x20\x77\x68\x65\x6E\x20\x61\x76\x61\x69\x6C\x61\x62\x6C\x65\x20\x63\x68\x65\x63\x6B\x62\x6F\x78\x2C\x20\x69\x73\x20\x45\x4E\x41\x42\x4C\x45\x44","\x23\x46\x72\x61\x6D\x65\x57\x6F\x72\x6B\x4F\x70\x74\x69\x6F\x6E","\x46\x6F\x72\x20\x6D\x6F\x72\x65\x20\x69\x6E\x66\x6F\x20\x6F\x6E\x20\x68\x6F\x77\x20\x74\x6F\x20\x75\x73\x65\x20\x76\x69\x64\x65\x6F\x20\x73\x6B\x69\x6E\x73\x20\x76\x69\x73\x69\x74\x3A\x20\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x64\x65\x76\x65\x6C\x6F\x70\x65\x72\x73\x2F\x20\x76\x69\x64\x65\x6F\x73\x6B\x69\x6E\x73\x2E\x68\x74\x6D\x6C","\x74\x6F\x70","\x23\x76\x69\x64\x65\x6F\x53\x6B\x69\x6E\x73","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x6E\x6F\x74\x65\x73\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x6D\x61\x69\x6E\x2D\x63\x6F\x6C\x6F\x72\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x64\x69\x73\x70\x6C\x61\x79\x3A\x6E\x6F\x6E\x65\x3B\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x20\x31\x33\x70\x78\x3B\x66\x6C\x6F\x61\x74\x3A\x20\x6C\x65\x66\x74\x3B\x66\x6F\x6E\x74\x2D\x77\x65\x69\x67\x68\x74\x3A\x20\x37\x30\x30\x3B\x62\x6F\x72\x64\x65\x72\x2D\x72\x61\x64\x69\x75\x73\x3A\x20\x34\x70\x78\x3B\x77\x69\x64\x74\x68\x3A\x20\x36\x35\x25\x3B\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x34\x37\x70\x78\x3B\x7A\x2D\x69\x6E\x64\x65\x78\x3A\x20\x31\x35\x3B\x6D\x61\x72\x67\x69\x6E\x3A\x20\x61\x75\x74\x6F\x3B\x74\x6F\x70\x3A\x20\x30\x70\x78\x3B\x72\x69\x67\x68\x74\x3A\x20\x30\x70\x78\x3B\x6C\x65\x66\x74\x3A\x20\x30\x70\x78\x3B\x62\x6F\x74\x74\x6F\x6D\x3A\x20\x34\x30\x30\x70\x78\x3B\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x20\x66\x69\x78\x65\x64\x3B\x70\x6F\x69\x6E\x74\x65\x72\x2D\x65\x76\x65\x6E\x74\x73\x3A\x20\x61\x75\x74\x6F\x3B\x63\x6F\x6C\x6F\x72\x3A\x20\x72\x67\x62\x28\x32\x35\x35\x2C\x20\x32\x35\x35\x2C\x20\x32\x35\x35\x29\x3B\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x31\x30\x70\x78\x3B\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x72\x67\x62\x61\x28\x30\x2C\x20\x30\x2C\x20\x30\x2C\x20\x30\x2E\x32\x29\x3B\x22\x3E\x3C\x68\x35\x20\x69\x64\x3D\x22\x6E\x6F\x74\x65\x73\x61\x76\x65\x66\x6F\x72\x6C\x61\x74\x65\x72\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x6D\x61\x69\x6E\x2D\x63\x6F\x6C\x6F\x72\x20\x74\x65\x78\x74\x2D\x63\x65\x6E\x74\x65\x72\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x30\x70\x78\x3B\x22\x3E\x53\x61\x76\x65\x20\x66\x6F\x72\x20\x6C\x61\x74\x65\x72\x3C\x2F\x68\x35\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x6E\x6F\x74\x65\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x20\x6D\x61\x69\x6E\x2D\x63\x6F\x6C\x6F\x72\x20\x6E\x6F\x74\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x63\x6F\x6C\x6F\x72\x3A\x20\x6C\x69\x67\x68\x74\x67\x72\x65\x79\x3B\x20\x20\x77\x69\x64\x74\x68\x3A\x20\x32\x35\x25\x3B\x66\x6C\x6F\x61\x74\x3A\x6C\x65\x66\x74\x3B\x20\x62\x6F\x72\x64\x65\x72\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x62\x6F\x72\x64\x65\x72\x2D\x62\x6F\x74\x74\x6F\x6D\x3A\x20\x31\x70\x78\x20\x73\x6F\x6C\x69\x64\x3B\x20\x62\x6F\x72\x64\x65\x72\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x64\x61\x72\x6B\x67\x72\x65\x79\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x72\x69\x67\x68\x74\x3A\x20\x37\x70\x78\x3B\x20\x74\x65\x78\x74\x2D\x61\x6C\x69\x67\x6E\x3A\x20\x63\x65\x6E\x74\x65\x72\x3B\x22\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x6E\x6F\x74\x65\x32\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x20\x6D\x61\x69\x6E\x2D\x63\x6F\x6C\x6F\x72\x20\x6E\x6F\x74\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x6C\x69\x67\x68\x74\x67\x72\x65\x79\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x32\x34\x25\x3B\x20\x66\x6C\x6F\x61\x74\x3A\x20\x6C\x65\x66\x74\x3B\x20\x62\x6F\x72\x64\x65\x72\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x62\x6F\x72\x64\x65\x72\x2D\x62\x6F\x74\x74\x6F\x6D\x3A\x20\x31\x70\x78\x20\x73\x6F\x6C\x69\x64\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x6C\x65\x66\x74\x3A\x20\x30\x70\x78\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x72\x69\x67\x68\x74\x3A\x20\x37\x70\x78\x3B\x20\x74\x65\x78\x74\x2D\x61\x6C\x69\x67\x6E\x3A\x20\x63\x65\x6E\x74\x65\x72\x3B\x20\x62\x6F\x72\x64\x65\x72\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x64\x61\x72\x6B\x67\x72\x65\x79\x3B\x22\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x6E\x6F\x74\x65\x33\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x20\x6D\x61\x69\x6E\x2D\x63\x6F\x6C\x6F\x72\x20\x6E\x6F\x74\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x34\x39\x25\x3B\x20\x62\x6F\x72\x64\x65\x72\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x62\x6F\x72\x64\x65\x72\x2D\x62\x6F\x74\x74\x6F\x6D\x3A\x20\x31\x70\x78\x20\x73\x6F\x6C\x69\x64\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x6C\x65\x66\x74\x3A\x20\x31\x30\x70\x78\x3B\x20\x74\x65\x78\x74\x2D\x61\x6C\x69\x67\x6E\x3A\x20\x63\x65\x6E\x74\x65\x72\x3B\x20\x62\x6F\x72\x64\x65\x72\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x64\x61\x72\x6B\x67\x72\x65\x79\x3B\x22\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x6E\x6F\x74\x65\x34\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x20\x6D\x61\x69\x6E\x2D\x63\x6F\x6C\x6F\x72\x20\x6E\x6F\x74\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x6C\x69\x67\x68\x74\x67\x72\x65\x79\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x32\x35\x25\x3B\x20\x66\x6C\x6F\x61\x74\x3A\x20\x6C\x65\x66\x74\x3B\x20\x62\x6F\x72\x64\x65\x72\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x62\x6F\x72\x64\x65\x72\x2D\x62\x6F\x74\x74\x6F\x6D\x3A\x20\x31\x70\x78\x20\x73\x6F\x6C\x69\x64\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x72\x69\x67\x68\x74\x3A\x20\x37\x70\x78\x3B\x20\x74\x65\x78\x74\x2D\x61\x6C\x69\x67\x6E\x3A\x20\x63\x65\x6E\x74\x65\x72\x3B\x20\x62\x6F\x72\x64\x65\x72\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x64\x61\x72\x6B\x67\x72\x65\x79\x3B\x22\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x6E\x6F\x74\x65\x35\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x20\x6D\x61\x69\x6E\x2D\x63\x6F\x6C\x6F\x72\x20\x6E\x6F\x74\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x6C\x69\x67\x68\x74\x67\x72\x65\x79\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x32\x34\x25\x3B\x20\x66\x6C\x6F\x61\x74\x3A\x20\x6C\x65\x66\x74\x3B\x20\x62\x6F\x72\x64\x65\x72\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x62\x6F\x72\x64\x65\x72\x2D\x62\x6F\x74\x74\x6F\x6D\x3A\x20\x31\x70\x78\x20\x73\x6F\x6C\x69\x64\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x6C\x65\x66\x74\x3A\x20\x30\x70\x78\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x72\x69\x67\x68\x74\x3A\x20\x37\x70\x78\x3B\x20\x74\x65\x78\x74\x2D\x61\x6C\x69\x67\x6E\x3A\x20\x63\x65\x6E\x74\x65\x72\x3B\x20\x62\x6F\x72\x64\x65\x72\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x64\x61\x72\x6B\x67\x72\x65\x79\x3B\x22\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x6E\x6F\x74\x65\x36\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x20\x6D\x61\x69\x6E\x2D\x63\x6F\x6C\x6F\x72\x20\x6E\x6F\x74\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x6C\x69\x67\x68\x74\x67\x72\x65\x79\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x34\x39\x25\x3B\x20\x62\x6F\x72\x64\x65\x72\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x62\x6F\x72\x64\x65\x72\x2D\x62\x6F\x74\x74\x6F\x6D\x3A\x20\x31\x70\x78\x20\x73\x6F\x6C\x69\x64\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x6C\x65\x66\x74\x3A\x20\x31\x30\x70\x78\x3B\x20\x74\x65\x78\x74\x2D\x61\x6C\x69\x67\x6E\x3A\x20\x63\x65\x6E\x74\x65\x72\x3B\x20\x62\x6F\x72\x64\x65\x72\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x64\x61\x72\x6B\x67\x72\x65\x79\x3B\x22\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x6E\x6F\x74\x65\x37\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x20\x6D\x61\x69\x6E\x2D\x63\x6F\x6C\x6F\x72\x20\x6E\x6F\x74\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x6C\x69\x67\x68\x74\x67\x72\x65\x79\x3B\x20\x62\x6F\x72\x64\x65\x72\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x62\x6F\x72\x64\x65\x72\x2D\x62\x6F\x74\x74\x6F\x6D\x3A\x20\x31\x70\x78\x20\x73\x6F\x6C\x69\x64\x3B\x20\x74\x65\x78\x74\x2D\x61\x6C\x69\x67\x6E\x3A\x20\x63\x65\x6E\x74\x65\x72\x3B\x20\x62\x6F\x72\x64\x65\x72\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x64\x61\x72\x6B\x67\x72\x65\x79\x3B\x22\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x63\x6C\x6F\x73\x65\x42\x74\x6E\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x64\x61\x6E\x67\x65\x72\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x30\x70\x78\x3B\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x70\x61\x67\x65\x5F\x6C\x6F\x67\x69\x6E\x5F\x61\x6E\x64\x5F\x70\x6C\x61\x79\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x22\x20\x74\x69\x74\x6C\x65\x3D\x22\x22\x3E\x43\x6C\x6F\x73\x65\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x74\x69\x6D\x65\x72\x74\x6F\x6F\x6C\x73\x2D\x68\x75\x64\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x68\x75\x64\x22\x20\x61\x6C\x69\x67\x6E\x3D\x22\x63\x65\x6E\x74\x65\x72\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x77\x69\x64\x74\x68\x3A\x20\x35\x30\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x33\x30\x70\x78\x3B\x20\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x70\x6F\x69\x6E\x74\x65\x72\x2D\x65\x76\x65\x6E\x74\x73\x3A\x20\x61\x75\x74\x6F\x3B\x20\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x20\x61\x62\x73\x6F\x6C\x75\x74\x65\x3B\x20\x72\x69\x67\x68\x74\x3A\x20\x30\x70\x78\x3B\x20\x74\x6F\x70\x3A\x20\x2D\x39\x30\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x62\x6C\x6F\x63\x6B\x3B\x22\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x70\x6C\x61\x79\x74\x69\x6D\x65\x72\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x2D\x6C\x69\x6E\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x36\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x62\x6C\x6F\x63\x6B\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x73\x74\x61\x72\x74\x54\x69\x6D\x65\x72\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x53\x74\x61\x72\x74\x20\x54\x69\x6D\x65\x72\x22\x22\x20\x3E\x3C\x69\x20\x69\x64\x3D\x22\x70\x6C\x61\x79\x74\x69\x6D\x65\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x70\x6C\x61\x79\x2D\x63\x69\x72\x63\x6C\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x2D\x6C\x65\x66\x74\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x73\x74\x6F\x70\x74\x69\x6D\x65\x72\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x2D\x6C\x69\x6E\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x36\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x73\x74\x6F\x70\x54\x69\x6D\x65\x72\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x50\x61\x75\x73\x65\x20\x54\x69\x6D\x65\x72\x22\x22\x3E\x3C\x69\x20\x69\x64\x3D\x22\x70\x61\x75\x73\x65\x74\x69\x6D\x65\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x70\x61\x75\x73\x65\x2D\x63\x69\x72\x63\x6C\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x2D\x6C\x65\x66\x74\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x63\x6C\x65\x61\x72\x74\x69\x6D\x65\x72\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x2D\x6C\x69\x6E\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x36\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x63\x6C\x65\x61\x72\x54\x69\x6D\x65\x72\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x53\x74\x6F\x70\x20\x54\x69\x6D\x65\x72\x22\x3E\x3C\x69\x20\x69\x64\x3D\x22\x63\x6C\x65\x61\x72\x74\x69\x6D\x65\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x73\x74\x6F\x70\x2D\x63\x69\x72\x63\x6C\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x2D\x6C\x65\x66\x74\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x61\x20\x69\x64\x3D\x22\x74\x69\x6D\x65\x72\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x32\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x20\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x20\x61\x62\x73\x6F\x6C\x75\x74\x65\x3B\x20\x72\x69\x67\x68\x74\x3A\x20\x30\x70\x78\x3B\x22\x3E\x30\x30\x3A\x30\x30\x3C\x2F\x61\x3E","\x3C\x6C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x6C\x65\x67\x65\x6E\x64\x2D\x74\x61\x62\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x77\x69\x64\x74\x68\x3A\x20\x31\x36\x2E\x36\x36\x25\x3B\x20\x70\x61\x64\x64\x69\x6E\x67\x3A\x31\x32\x70\x78\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x41\x50\x49\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x74\x6F\x70\x22\x3E\x3C\x61\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x20\x70\x61\x64\x64\x69\x6E\x67\x3A\x31\x32\x70\x78\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x24\x28\x27\x23\x6D\x61\x69\x6E\x2D\x6D\x65\x6E\x75\x27\x29\x2E\x63\x68\x69\x6C\x64\x72\x65\x6E\x28\x27\x64\x69\x76\x27\x29\x2E\x68\x69\x64\x65\x28\x29\x3B\x20\x24\x28\x27\x2E\x6D\x65\x6E\x75\x2D\x74\x61\x62\x73\x27\x29\x2E\x63\x68\x69\x6C\x64\x72\x65\x6E\x28\x27\x6C\x69\x27\x29\x2E\x72\x65\x6D\x6F\x76\x65\x43\x6C\x61\x73\x73\x28\x27\x61\x63\x74\x69\x76\x65\x27\x29\x3B\x20\x24\x28\x27\x2E\x6D\x65\x6E\x75\x2D\x74\x61\x62\x73\x27\x29\x2E\x63\x68\x69\x6C\x64\x72\x65\x6E\x28\x27\x6C\x69\x27\x29\x2E\x63\x68\x69\x6C\x64\x72\x65\x6E\x28\x27\x61\x27\x29\x2E\x72\x65\x6D\x6F\x76\x65\x43\x6C\x61\x73\x73\x28\x27\x61\x63\x74\x69\x76\x65\x27\x29\x3B\x20\x24\x28\x27\x23\x6C\x65\x67\x65\x6E\x64\x27\x29\x2E\x66\x61\x64\x65\x49\x6E\x28\x29\x3B\x20\x24\x28\x74\x68\x69\x73\x29\x2E\x61\x64\x64\x43\x6C\x61\x73\x73\x28\x27\x61\x63\x74\x69\x76\x65\x27\x29\x3B\x20\x24\x28\x74\x68\x69\x73\x29\x2E\x70\x61\x72\x65\x6E\x74\x28\x29\x2E\x61\x64\x64\x43\x6C\x61\x73\x73\x28\x27\x61\x63\x74\x69\x76\x65\x27\x29\x3B\x20\x22\x20\x68\x72\x65\x66\x3D\x22\x6A\x61\x76\x61\x73\x63\x72\x69\x70\x74\x3A\x76\x6F\x69\x64\x28\x30\x29\x3B\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x70\x75\x7A\x7A\x6C\x65\x2D\x70\x69\x65\x63\x65\x20\x66\x61\x2D\x6C\x67\x22\x3E\x3C\x2F\x61\x3E\x3C\x2F\x6C\x69\x3E","\x2E\x6D\x65\x6E\x75\x2D\x74\x61\x62\x73\x3E\x3A\x6E\x74\x68\x2D\x63\x68\x69\x6C\x64\x28\x32\x29","\x77\x69\x64\x74\x68\x3A\x20\x31\x34\x2E\x32\x38\x25","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x6C\x65\x67\x65\x6E\x64\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x6D\x65\x6E\x75\x2D\x70\x61\x6E\x65\x6C\x22\x3E\x3C\x64\x69\x76\x20\x63\x6C\x61\x73\x73\x3D\x22\x61\x67\x61\x72\x69\x6F\x2D\x70\x61\x6E\x65\x6C\x20\x6C\x65\x67\x65\x6E\x64\x2D\x70\x61\x6E\x65\x6C\x22\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x53\x48\x4F\x53\x48\x4F\x42\x74\x6E\x22\x20\x74\x79\x70\x65\x3D\x22\x62\x75\x74\x74\x6F\x6E\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x73\x6D\x20\x62\x74\x6E\x2D\x77\x61\x72\x6E\x69\x6E\x67\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x62\x75\x74\x74\x6F\x6E\x22\x20\x61\x72\x69\x61\x2D\x70\x72\x65\x73\x73\x65\x64\x3D\x22\x66\x61\x6C\x73\x65\x22\x20\x61\x75\x74\x6F\x63\x6F\x6D\x70\x6C\x65\x74\x65\x3D\x22\x6F\x66\x66\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x34\x39\x2E\x35\x25\x3B\x20\x62\x6F\x72\x64\x65\x72\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x64\x61\x72\x6B\x73\x6C\x61\x74\x65\x67\x72\x65\x79\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x72\x69\x67\x68\x74\x3A\x20\x30\x2E\x35\x25\x3B\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x70\x75\x7A\x7A\x6C\x65\x2D\x70\x69\x65\x63\x65\x22\x3E\x3C\x2F\x69\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x58\x50\x42\x74\x6E\x22\x20\x74\x79\x70\x65\x3D\x22\x62\x75\x74\x74\x6F\x6E\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x73\x6D\x20\x62\x74\x6E\x2D\x77\x61\x72\x6E\x69\x6E\x67\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x62\x75\x74\x74\x6F\x6E\x22\x20\x61\x72\x69\x61\x2D\x70\x72\x65\x73\x73\x65\x64\x3D\x22\x66\x61\x6C\x73\x65\x22\x20\x61\x75\x74\x6F\x63\x6F\x6D\x70\x6C\x65\x74\x65\x3D\x22\x6F\x66\x66\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x34\x39\x2E\x35\x25\x3B\x20\x62\x6F\x72\x64\x65\x72\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x64\x61\x72\x6B\x73\x6C\x61\x74\x65\x67\x72\x65\x79\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x6C\x65\x66\x74\x3A\x20\x30\x2E\x35\x25\x3B\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x67\x61\x6D\x65\x70\x61\x64\x22\x3E\x3C\x2F\x69\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x4D\x41\x49\x4E\x42\x54\x42\x74\x6E\x22\x20\x74\x79\x70\x65\x3D\x22\x62\x75\x74\x74\x6F\x6E\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x73\x6D\x20\x62\x74\x6E\x2D\x77\x61\x72\x6E\x69\x6E\x67\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x62\x75\x74\x74\x6F\x6E\x22\x20\x61\x72\x69\x61\x2D\x70\x72\x65\x73\x73\x65\x64\x3D\x22\x66\x61\x6C\x73\x65\x22\x20\x61\x75\x74\x6F\x63\x6F\x6D\x70\x6C\x65\x74\x65\x3D\x22\x6F\x66\x66\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x34\x39\x2E\x35\x25\x3B\x20\x62\x6F\x72\x64\x65\x72\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x64\x61\x72\x6B\x73\x6C\x61\x74\x65\x67\x72\x65\x79\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x72\x69\x67\x68\x74\x3A\x20\x30\x2E\x35\x25\x3B\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x6D\x69\x6E\x75\x73\x22\x3E\x3C\x2F\x69\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x41\x6E\x69\x6D\x61\x74\x65\x64\x53\x6B\x69\x6E\x42\x74\x6E\x22\x20\x74\x79\x70\x65\x3D\x22\x62\x75\x74\x74\x6F\x6E\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x73\x6D\x20\x62\x74\x6E\x2D\x77\x61\x72\x6E\x69\x6E\x67\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x62\x75\x74\x74\x6F\x6E\x22\x20\x61\x72\x69\x61\x2D\x70\x72\x65\x73\x73\x65\x64\x3D\x22\x66\x61\x6C\x73\x65\x22\x20\x61\x75\x74\x6F\x63\x6F\x6D\x70\x6C\x65\x74\x65\x3D\x22\x6F\x66\x66\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x34\x39\x2E\x35\x25\x3B\x20\x62\x6F\x72\x64\x65\x72\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x64\x61\x72\x6B\x73\x6C\x61\x74\x65\x67\x72\x65\x79\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x6C\x65\x66\x74\x3A\x20\x30\x2E\x35\x25\x3B\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x67\x72\x61\x76\x22\x3E\x3C\x2F\x69\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x48\x69\x64\x65\x41\x6C\x6C\x42\x74\x68\x6E\x22\x20\x74\x79\x70\x65\x3D\x22\x62\x75\x74\x74\x6F\x6E\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x73\x6D\x20\x62\x74\x6E\x2D\x64\x61\x6E\x67\x65\x72\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x62\x75\x74\x74\x6F\x6E\x22\x20\x61\x72\x69\x61\x2D\x70\x72\x65\x73\x73\x65\x64\x3D\x22\x66\x61\x6C\x73\x65\x22\x20\x61\x75\x74\x6F\x63\x6F\x6D\x70\x6C\x65\x74\x65\x3D\x22\x6F\x66\x66\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x72\x69\x67\x68\x74\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x54\x65\x6D\x70\x6F\x72\x61\x72\x69\x6C\x79\x20\x48\x69\x64\x65\x2F\x53\x68\x6F\x77\x20\x45\x76\x65\x72\x79\x74\x68\x69\x6E\x67\x2E\x20\x46\x75\x6E\x63\x74\x69\x6F\x6E\x20\x66\x6F\x72\x20\x59\x6F\x75\x74\x75\x62\x65\x72\x73\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x34\x39\x2E\x35\x25\x3B\x20\x62\x6F\x72\x64\x65\x72\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x64\x61\x72\x6B\x73\x6C\x61\x74\x65\x67\x72\x65\x79\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x72\x69\x67\x68\x74\x3A\x20\x30\x2E\x35\x25\x3B\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x65\x78\x63\x6C\x61\x6D\x61\x74\x69\x6F\x6E\x2D\x74\x72\x69\x61\x6E\x67\x6C\x65\x22\x3E\x3C\x2F\x69\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x54\x49\x4D\x45\x63\x61\x6C\x42\x74\x6E\x22\x20\x74\x79\x70\x65\x3D\x22\x62\x75\x74\x74\x6F\x6E\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x73\x6D\x20\x62\x74\x6E\x2D\x77\x61\x72\x6E\x69\x6E\x67\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x62\x75\x74\x74\x6F\x6E\x22\x20\x61\x72\x69\x61\x2D\x70\x72\x65\x73\x73\x65\x64\x3D\x22\x66\x61\x6C\x73\x65\x22\x20\x61\x75\x74\x6F\x63\x6F\x6D\x70\x6C\x65\x74\x65\x3D\x22\x6F\x66\x66\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x34\x39\x2E\x35\x25\x3B\x20\x62\x6F\x72\x64\x65\x72\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x64\x61\x72\x6B\x73\x6C\x61\x74\x65\x67\x72\x65\x79\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x6C\x65\x66\x74\x3A\x20\x30\x2E\x35\x25\x3B\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x63\x61\x6C\x63\x75\x6C\x61\x74\x6F\x72\x22\x3E\x3C\x2F\x69\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x4F\x70\x65\x6E\x75\x73\x65\x72\x53\x63\x72\x69\x70\x74\x73\x22\x20\x74\x79\x70\x65\x3D\x22\x73\x75\x62\x6D\x69\x74\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x70\x72\x69\x6D\x61\x72\x79\x20\x62\x74\x6E\x20\x32\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x62\x6C\x6F\x63\x6B\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x30\x30\x25\x3B\x20\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x34\x70\x78\x20\x30\x20\x36\x70\x78\x20\x30\x3B\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x63\x6F\x64\x65\x22\x3E\x3C\x2F\x69\x3E\x55\x73\x65\x72\x20\x53\x63\x72\x69\x70\x74\x73\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x53\x70\x65\x63\x69\x61\x6C\x44\x65\x61\x6C\x73\x42\x74\x6E\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x70\x72\x69\x6D\x61\x72\x79\x20\x62\x74\x6E\x22\x20\x74\x79\x70\x65\x3D\x22\x73\x75\x62\x6D\x69\x74\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x42\x65\x66\x6F\x72\x65\x53\x70\x65\x63\x69\x61\x6C\x44\x65\x61\x6C\x73\x28\x29\x3B\x20\x72\x65\x74\x75\x72\x6E\x20\x66\x61\x6C\x73\x65\x3B\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x70\x72\x69\x6D\x61\x72\x79\x20\x62\x74\x6E\x2D\x73\x68\x6F\x70\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x30\x30\x25\x3B\x20\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x34\x70\x78\x20\x30\x70\x78\x20\x36\x70\x78\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x70\x61\x67\x65\x5F\x73\x68\x6F\x70\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x62\x72\x69\x65\x66\x63\x61\x73\x65\x22\x3E\x3C\x2F\x69\x3E\x53\x70\x65\x63\x69\x61\x6C\x20\x44\x65\x61\x6C\x73\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x4C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x53\x68\x6F\x70\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x70\x72\x69\x6D\x61\x72\x79\x20\x62\x74\x6E\x22\x20\x74\x79\x70\x65\x3D\x22\x73\x75\x62\x6D\x69\x74\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x42\x65\x66\x6F\x72\x65\x4C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x53\x68\x6F\x70\x28\x29\x3B\x20\x72\x65\x74\x75\x72\x6E\x20\x66\x61\x6C\x73\x65\x3B\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x70\x72\x69\x6D\x61\x72\x79\x20\x62\x74\x6E\x2D\x73\x68\x6F\x70\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x30\x30\x25\x3B\x20\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x34\x70\x78\x20\x30\x70\x78\x20\x36\x70\x78\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x70\x61\x67\x65\x5F\x73\x68\x6F\x70\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x62\x72\x69\x65\x66\x63\x61\x73\x65\x22\x3E\x3C\x2F\x69\x3E\x53\x68\x6F\x70\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x64\x69\x76\x20\x63\x6C\x61\x73\x73\x3D\x22\x69\x6E\x70\x75\x74\x2D\x62\x6F\x78\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x74\x65\x78\x74\x2D\x61\x6C\x69\x67\x6E\x3A\x20\x63\x65\x6E\x74\x65\x72\x3B\x20\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x20\x31\x32\x70\x78\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x34\x70\x78\x20\x30\x20\x30\x70\x78\x20\x30\x3B\x22\x3E\x3C\x73\x70\x61\x6E\x20\x69\x64\x3D\x22\x6C\x65\x67\x65\x6E\x64\x6D\x61\x6E\x75\x61\x6C\x62\x61\x63\x6B\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x74\x69\x74\x6C\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x22\x3E\x4D\x61\x6E\x75\x61\x6C\x20\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x3A\x20\x20\x3C\x2F\x73\x70\x61\x6E\x3E","\x3C\x73\x65\x6C\x65\x63\x74\x20\x69\x64\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x50\x69\x63\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x6F\x6E\x63\x68\x61\x6E\x67\x65\x3D\x22\x63\x68\x61\x6E\x67\x65\x50\x69\x63\x46\x75\x6E\x28\x29\x3B\x22\x20\x72\x65\x71\x75\x69\x72\x65\x64\x3D\x22\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x22\x20\x74\x69\x74\x6C\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x64\x69\x73\x70\x6C\x61\x79\x3A\x69\x6E\x6C\x69\x6E\x65\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x34\x30\x25\x22\x20\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x31\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x4D\x69\x6E\x69\x6D\x61\x70\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x32\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x33\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x54\x65\x61\x6D\x62\x6F\x61\x72\x64\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x34\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x4D\x61\x69\x6E\x20\x43\x61\x6E\x76\x61\x73\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x35\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x4D\x61\x69\x6E\x20\x42\x61\x6E\x6E\x65\x72\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x2F\x73\x65\x6C\x65\x63\x74\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x6D\x69\x6E\x69\x6D\x61\x70\x50\x69\x63\x74\x75\x72\x65\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x4D\x69\x6E\x69\x6D\x61\x70\x20\x49\x6D\x61\x67\x65\x20\x55\x52\x4C\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x62\x6C\x6F\x63\x6B\x3B\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x6D\x69\x6E\x62\x67\x6E\x61\x6D\x65\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x72\x69\x67\x68\x74\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x55\x72\x6C\x20\x6F\x66\x20\x69\x6D\x61\x67\x65\x20\x73\x74\x61\x72\x74\x69\x6E\x67\x20\x77\x69\x74\x68\x20\x68\x74\x74\x70\x73\x3A\x2F\x2F\x2E\x2E\x2E\x20\x6F\x72\x20\x68\x74\x74\x70\x73\x3A\x2F\x2F\x2E\x2E\x2E\x22\x20\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x6D\x69\x6E\x62\x74\x65\x78\x74\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x4D\x69\x6E\x69\x6D\x61\x70\x20\x54\x65\x78\x74\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x62\x6C\x6F\x63\x6B\x3B\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x6D\x69\x6E\x62\x74\x65\x78\x74\x28\x29\x3B\x22\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x6C\x65\x61\x64\x62\x50\x69\x63\x74\x75\x72\x65\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x20\x49\x6D\x61\x67\x65\x20\x55\x52\x4C\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x6C\x65\x61\x64\x62\x67\x6E\x61\x6D\x65\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x72\x69\x67\x68\x74\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x55\x72\x6C\x20\x6F\x66\x20\x69\x6D\x61\x67\x65\x20\x73\x74\x61\x72\x74\x69\x6E\x67\x20\x77\x69\x74\x68\x20\x68\x74\x74\x70\x73\x3A\x2F\x2F\x2E\x2E\x2E\x20\x6F\x72\x20\x68\x74\x74\x70\x73\x3A\x2F\x2F\x2E\x2E\x2E\x22\x20\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x6C\x65\x61\x64\x62\x74\x65\x78\x74\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x20\x4C\x6F\x67\x6F\x20\x54\x65\x78\x74\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x6C\x65\x61\x64\x62\x74\x65\x78\x74\x28\x29\x3B\x22\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x74\x65\x61\x6D\x62\x50\x69\x63\x74\x75\x72\x65\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x54\x65\x61\x6D\x62\x6F\x61\x72\x64\x20\x49\x6D\x61\x67\x65\x20\x55\x52\x4C\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x74\x65\x61\x6D\x62\x67\x6E\x61\x6D\x65\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x72\x69\x67\x68\x74\x22\x20\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x55\x72\x6C\x20\x6F\x66\x20\x69\x6D\x61\x67\x65\x20\x73\x74\x61\x72\x74\x69\x6E\x67\x20\x77\x69\x74\x68\x20\x68\x74\x74\x70\x73\x3A\x2F\x2F\x2E\x2E\x2E\x20\x6F\x72\x20\x68\x74\x74\x70\x73\x3A\x2F\x2F\x2E\x2E\x2E\x22\x20\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x74\x65\x61\x6D\x62\x74\x65\x78\x74\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x54\x65\x61\x6D\x62\x6F\x61\x72\x64\x20\x4C\x6F\x67\x6F\x20\x54\x65\x78\x74\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x74\x65\x61\x6D\x62\x74\x65\x78\x74\x28\x29\x3B\x22\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x63\x61\x6E\x76\x61\x73\x50\x69\x63\x74\x75\x72\x65\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x4D\x61\x69\x6E\x20\x43\x61\x6E\x76\x61\x73\x20\x49\x6D\x61\x67\x65\x20\x55\x52\x4C\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x63\x61\x6E\x76\x61\x73\x62\x67\x6E\x61\x6D\x65\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x72\x69\x67\x68\x74\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x55\x72\x6C\x20\x6F\x66\x20\x69\x6D\x61\x67\x65\x20\x73\x74\x61\x72\x74\x69\x6E\x67\x20\x77\x69\x74\x68\x20\x68\x74\x74\x70\x73\x3A\x2F\x2F\x2E\x2E\x2E\x20\x6F\x72\x20\x68\x74\x74\x70\x73\x3A\x2F\x2F\x2E\x2E\x2E\x22\x20\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x69\x6D\x67\x55\x72\x6C\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x4D\x61\x69\x6E\x20\x42\x61\x6E\x6E\x65\x72\x20\x49\x63\x6F\x6E\x20\x55\x52\x4C\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x69\x6D\x67\x55\x72\x6C\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x72\x69\x67\x68\x74\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x55\x72\x6C\x20\x6F\x66\x20\x69\x6D\x61\x67\x65\x20\x73\x74\x61\x72\x74\x69\x6E\x67\x20\x77\x69\x74\x68\x20\x68\x74\x74\x70\x3A\x2F\x2F\x2E\x2E\x2E\x20\x6F\x72\x20\x68\x74\x74\x70\x73\x3A\x2F\x2F\x2E\x2E\x2E\x22\x20\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x69\x6D\x67\x48\x72\x65\x66\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x4D\x61\x69\x6E\x20\x42\x61\x6E\x6E\x65\x72\x20\x4C\x69\x6E\x6B\x20\x55\x52\x4C\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x69\x6D\x67\x48\x72\x65\x66\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x72\x69\x67\x68\x74\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x55\x72\x6C\x20\x6F\x66\x20\x6C\x69\x6E\x6B\x20\x74\x6F\x20\x72\x65\x64\x69\x72\x65\x63\x74\x22\x20\x3E","\x3C\x64\x69\x76\x20\x63\x6C\x61\x73\x73\x3D\x22\x69\x6E\x70\x75\x74\x2D\x62\x6F\x78\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x74\x65\x78\x74\x2D\x61\x6C\x69\x67\x6E\x3A\x20\x63\x65\x6E\x74\x65\x72\x3B\x20\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x20\x31\x32\x70\x78\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x30\x70\x78\x3B\x20\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x34\x70\x78\x20\x30\x20\x30\x70\x78\x20\x30\x3B\x22\x3E\x3C\x73\x70\x61\x6E\x20\x69\x64\x3D\x22\x6C\x65\x67\x65\x6E\x64\x6D\x61\x6E\x75\x61\x6C\x6D\x65\x73\x73\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x74\x69\x74\x6C\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x22\x3E\x4D\x61\x6E\x75\x61\x6C\x20\x4D\x65\x73\x73\x61\x67\x65\x20\x49\x63\x6F\x6E\x73\x26\x59\x6F\x75\x74\x75\x62\x65\x3A\x20\x20\x3C\x2F\x73\x70\x61\x6E\x3E","\x3C\x73\x65\x6C\x65\x63\x74\x20\x69\x64\x3D\x22\x63\x68\x61\x6E\x67\x65\x70\x68\x6F\x74\x6F\x73\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x6F\x6E\x63\x68\x61\x6E\x67\x65\x3D\x22\x63\x68\x61\x6E\x67\x65\x50\x68\x6F\x74\x6F\x46\x75\x6E\x28\x29\x3B\x22\x20\x72\x65\x71\x75\x69\x72\x65\x64\x3D\x22\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x22\x20\x74\x69\x74\x6C\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x64\x69\x73\x70\x6C\x61\x79\x3A\x69\x6E\x6C\x69\x6E\x65\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x33\x35\x25\x22\x20\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x31\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x49\x63\x6F\x6E\x20\x31\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x32\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x49\x63\x6F\x6E\x20\x32\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x33\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x49\x63\x6F\x6E\x20\x33\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x34\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x49\x63\x6F\x6E\x20\x34\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x35\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x49\x63\x6F\x6E\x20\x35\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x36\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x49\x63\x6F\x6E\x20\x36\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x37\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x59\x6F\x75\x74\x75\x62\x65\x20\x31\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x38\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x59\x6F\x75\x74\x75\x62\x65\x20\x32\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x39\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x59\x6F\x75\x74\x75\x62\x65\x20\x33\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x31\x30\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x59\x6F\x75\x74\x75\x62\x65\x20\x34\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x31\x31\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x59\x6F\x75\x74\x75\x62\x65\x20\x35\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x31\x32\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x59\x6F\x75\x74\x75\x62\x65\x20\x36\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x70\x69\x63\x31\x64\x61\x74\x61\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x4D\x65\x73\x73\x61\x67\x65\x20\x49\x63\x6F\x6E\x20\x54\x65\x78\x74\x20\x31\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x62\x6C\x6F\x63\x6B\x3B\x20\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x70\x69\x63\x31\x64\x61\x74\x61\x28\x29\x3B\x22\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x70\x69\x63\x32\x64\x61\x74\x61\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x4D\x65\x73\x73\x61\x67\x65\x20\x49\x63\x6F\x6E\x20\x54\x65\x78\x74\x20\x32\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x70\x69\x63\x32\x64\x61\x74\x61\x28\x29\x3B\x22\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x70\x69\x63\x33\x64\x61\x74\x61\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x4D\x65\x73\x73\x61\x67\x65\x20\x49\x63\x6F\x6E\x20\x54\x65\x78\x74\x20\x33\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x70\x69\x63\x33\x64\x61\x74\x61\x28\x29\x3B\x22\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x70\x69\x63\x34\x64\x61\x74\x61\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x4D\x65\x73\x73\x61\x67\x65\x20\x49\x63\x6F\x6E\x20\x54\x65\x78\x74\x20\x34\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x70\x69\x63\x34\x64\x61\x74\x61\x28\x29\x3B\x22\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x70\x69\x63\x35\x64\x61\x74\x61\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x4D\x65\x73\x73\x61\x67\x65\x20\x49\x63\x6F\x6E\x20\x54\x65\x78\x74\x20\x35\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x70\x69\x63\x35\x64\x61\x74\x61\x28\x29\x3B\x22\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x70\x69\x63\x36\x64\x61\x74\x61\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x4D\x65\x73\x73\x61\x67\x65\x20\x49\x63\x6F\x6E\x20\x54\x65\x78\x74\x20\x36\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x70\x69\x63\x36\x64\x61\x74\x61\x28\x29\x3B\x22\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x79\x74\x31\x64\x61\x74\x61\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x59\x6F\x75\x74\x75\x62\x65\x20\x4D\x65\x73\x73\x61\x67\x65\x20\x54\x65\x78\x74\x20\x31\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x79\x74\x31\x64\x61\x74\x61\x28\x29\x3B\x22\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x79\x74\x32\x64\x61\x74\x61\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x59\x6F\x75\x74\x75\x62\x65\x20\x4D\x65\x73\x73\x61\x67\x65\x20\x54\x65\x78\x74\x20\x32\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x79\x74\x32\x64\x61\x74\x61\x28\x29\x3B\x22\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x79\x74\x33\x64\x61\x74\x61\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x59\x6F\x75\x74\x75\x62\x65\x20\x4D\x65\x73\x73\x61\x67\x65\x20\x54\x65\x78\x74\x20\x33\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x79\x74\x33\x64\x61\x74\x61\x28\x29\x3B\x22\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x79\x74\x34\x64\x61\x74\x61\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x59\x6F\x75\x74\x75\x62\x65\x20\x4D\x65\x73\x73\x61\x67\x65\x20\x54\x65\x78\x74\x20\x34\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x79\x74\x34\x64\x61\x74\x61\x28\x29\x3B\x22\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x79\x74\x35\x64\x61\x74\x61\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x59\x6F\x75\x74\x75\x62\x65\x20\x4D\x65\x73\x73\x61\x67\x65\x20\x54\x65\x78\x74\x20\x35\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x79\x74\x35\x64\x61\x74\x61\x28\x29\x3B\x22\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x79\x74\x36\x64\x61\x74\x61\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x59\x6F\x75\x74\x75\x62\x65\x20\x4D\x65\x73\x73\x61\x67\x65\x20\x54\x65\x78\x74\x20\x36\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x79\x74\x36\x64\x61\x74\x61\x28\x29\x3B\x22\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x70\x69\x63\x31\x75\x72\x6C\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x4D\x65\x73\x73\x61\x67\x65\x20\x49\x63\x6F\x6E\x20\x49\x6D\x67\x75\x72\x20\x55\x72\x6C\x20\x31\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x62\x6C\x6F\x63\x6B\x3B\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x70\x69\x63\x31\x75\x72\x6C\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x72\x69\x67\x68\x74\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x65\x2E\x67\x2E\x20\x68\x74\x74\x70\x73\x3A\x2F\x2F\x69\x2E\x69\x6D\x67\x75\x72\x2E\x63\x6F\x6D\x2F\x52\x56\x42\x69\x33\x54\x31\x2E\x67\x69\x66\x22\x20\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x70\x69\x63\x32\x75\x72\x6C\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x4D\x65\x73\x73\x61\x67\x65\x20\x49\x63\x6F\x6E\x20\x49\x6D\x67\x75\x72\x20\x55\x72\x6C\x20\x32\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x70\x69\x63\x32\x75\x72\x6C\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x72\x69\x67\x68\x74\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x65\x2E\x67\x2E\x20\x68\x74\x74\x70\x73\x3A\x2F\x2F\x69\x2E\x69\x6D\x67\x75\x72\x2E\x63\x6F\x6D\x2F\x52\x56\x42\x69\x33\x54\x31\x2E\x67\x69\x66\x22\x20\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x70\x69\x63\x33\x75\x72\x6C\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x4D\x65\x73\x73\x61\x67\x65\x20\x49\x63\x6F\x6E\x20\x49\x6D\x67\x75\x72\x20\x55\x72\x6C\x20\x33\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x70\x69\x63\x33\x75\x72\x6C\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x72\x69\x67\x68\x74\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x65\x2E\x67\x2E\x20\x68\x74\x74\x70\x73\x3A\x2F\x2F\x69\x2E\x69\x6D\x67\x75\x72\x2E\x63\x6F\x6D\x2F\x52\x56\x42\x69\x33\x54\x31\x2E\x67\x69\x66\x22\x20\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x70\x69\x63\x34\x75\x72\x6C\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x4D\x65\x73\x73\x61\x67\x65\x20\x49\x63\x6F\x6E\x20\x49\x6D\x67\x75\x72\x20\x55\x72\x6C\x20\x34\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x70\x69\x63\x34\x75\x72\x6C\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x72\x69\x67\x68\x74\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x65\x2E\x67\x2E\x20\x68\x74\x74\x70\x73\x3A\x2F\x2F\x69\x2E\x69\x6D\x67\x75\x72\x2E\x63\x6F\x6D\x2F\x52\x56\x42\x69\x33\x54\x31\x2E\x67\x69\x66\x22\x20\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x70\x69\x63\x35\x75\x72\x6C\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x4D\x65\x73\x73\x61\x67\x65\x20\x49\x63\x6F\x6E\x20\x49\x6D\x67\x75\x72\x20\x55\x72\x6C\x20\x35\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x70\x69\x63\x35\x75\x72\x6C\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x72\x69\x67\x68\x74\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x65\x2E\x67\x2E\x20\x68\x74\x74\x70\x73\x3A\x2F\x2F\x69\x2E\x69\x6D\x67\x75\x72\x2E\x63\x6F\x6D\x2F\x52\x56\x42\x69\x33\x54\x31\x2E\x67\x69\x66\x22\x20\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x70\x69\x63\x36\x75\x72\x6C\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x4D\x65\x73\x73\x61\x67\x65\x20\x49\x63\x6F\x6E\x20\x49\x6D\x67\x75\x72\x20\x55\x72\x6C\x20\x36\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x70\x69\x63\x36\x75\x72\x6C\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x72\x69\x67\x68\x74\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x65\x2E\x67\x2E\x20\x68\x74\x74\x70\x73\x3A\x2F\x2F\x69\x2E\x69\x6D\x67\x75\x72\x2E\x63\x6F\x6D\x2F\x52\x56\x42\x69\x33\x54\x31\x2E\x67\x69\x66\x22\x20\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x79\x74\x31\x75\x72\x6C\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x59\x6F\x75\x74\x75\x62\x65\x20\x4D\x65\x73\x73\x61\x67\x65\x20\x55\x72\x6C\x20\x31\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x79\x74\x31\x75\x72\x6C\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x72\x69\x67\x68\x74\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x55\x72\x6C\x20\x6F\x66\x20\x79\x6F\x75\x74\x75\x62\x65\x20\x74\x6F\x20\x62\x65\x20\x73\x68\x6F\x77\x6E\x22\x20\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x79\x74\x32\x75\x72\x6C\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x59\x6F\x75\x74\x75\x62\x65\x20\x4D\x65\x73\x73\x61\x67\x65\x20\x55\x72\x6C\x20\x32\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x79\x74\x32\x75\x72\x6C\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x72\x69\x67\x68\x74\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x55\x72\x6C\x20\x6F\x66\x20\x79\x6F\x75\x74\x75\x62\x65\x20\x74\x6F\x20\x62\x65\x20\x73\x68\x6F\x77\x6E\x22\x20\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x79\x74\x33\x75\x72\x6C\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x59\x6F\x75\x74\x75\x62\x65\x20\x4D\x65\x73\x73\x61\x67\x65\x20\x55\x72\x6C\x20\x33\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x79\x74\x33\x75\x72\x6C\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x72\x69\x67\x68\x74\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x55\x72\x6C\x20\x6F\x66\x20\x79\x6F\x75\x74\x75\x62\x65\x20\x74\x6F\x20\x62\x65\x20\x73\x68\x6F\x77\x6E\x22\x20\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x79\x74\x34\x75\x72\x6C\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x59\x6F\x75\x74\x75\x62\x65\x20\x4D\x65\x73\x73\x61\x67\x65\x20\x55\x72\x6C\x20\x34\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x79\x74\x34\x75\x72\x6C\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x72\x69\x67\x68\x74\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x55\x72\x6C\x20\x6F\x66\x20\x79\x6F\x75\x74\x75\x62\x65\x20\x74\x6F\x20\x62\x65\x20\x73\x68\x6F\x77\x6E\x22\x20\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x79\x74\x35\x75\x72\x6C\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x59\x6F\x75\x74\x75\x62\x65\x20\x4D\x65\x73\x73\x61\x67\x65\x20\x55\x72\x6C\x20\x35\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x79\x74\x35\x75\x72\x6C\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x72\x69\x67\x68\x74\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x55\x72\x6C\x20\x6F\x66\x20\x79\x6F\x75\x74\x75\x62\x65\x20\x74\x6F\x20\x62\x65\x20\x73\x68\x6F\x77\x6E\x22\x20\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x79\x74\x36\x75\x72\x6C\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x59\x6F\x75\x74\x75\x62\x65\x20\x4D\x65\x73\x73\x61\x67\x65\x20\x55\x72\x6C\x20\x36\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x79\x74\x36\x75\x72\x6C\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x72\x69\x67\x68\x74\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x55\x72\x6C\x20\x6F\x66\x20\x79\x6F\x75\x74\x75\x62\x65\x20\x74\x6F\x20\x62\x65\x20\x73\x68\x6F\x77\x6E\x22\x20\x3E","\x3C\x64\x69\x76\x20\x63\x6C\x61\x73\x73\x3D\x22\x69\x6E\x70\x75\x74\x2D\x62\x6F\x78\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x74\x65\x78\x74\x2D\x61\x6C\x69\x67\x6E\x3A\x20\x63\x65\x6E\x74\x65\x72\x3B\x20\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x20\x31\x32\x70\x78\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x30\x70\x78\x3B\x20\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x20\x30\x20\x30\x70\x78\x20\x30\x3B\x22\x3E\x3C\x73\x70\x61\x6E\x20\x69\x64\x3D\x22\x6C\x65\x67\x65\x6E\x64\x6C\x61\x6E\x67\x75\x61\x67\x65\x74\x65\x78\x74\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x74\x69\x74\x6C\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x72\x69\x67\x68\x74\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x56\x69\x73\x69\x74\x20\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x20\x4C\x61\x6E\x67\x75\x61\x67\x65\x50\x61\x63\x6B\x45\x6E\x67\x6C\x69\x73\x68\x2E\x6A\x73\x20\x74\x6F\x20\x55\x70\x6C\x6F\x61\x64\x20\x61\x20\x4C\x61\x6E\x67\x75\x61\x67\x65\x20\x50\x61\x63\x6B\x22\x3E\x43\x68\x6F\x6F\x73\x65\x20\x4C\x61\x6E\x67\x75\x61\x67\x65\x3A\x20\x20\x3C\x2F\x73\x70\x61\x6E\x3E","\x3C\x73\x65\x6C\x65\x63\x74\x20\x69\x64\x3D\x22\x6C\x65\x67\x65\x6E\x64\x6C\x61\x6E\x67\x75\x61\x67\x65\x73\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x6F\x6E\x63\x68\x61\x6E\x67\x65\x3D\x22\x63\x68\x61\x6E\x67\x65\x4D\x6F\x64\x4C\x61\x6E\x67\x75\x61\x67\x65\x28\x29\x3B\x22\x20\x72\x65\x71\x75\x69\x72\x65\x64\x3D\x22\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x22\x20\x74\x69\x74\x6C\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x64\x69\x73\x70\x6C\x61\x79\x3A\x69\x6E\x6C\x69\x6E\x65\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x35\x30\x25\x22\x20\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x31\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x20\x73\x65\x6C\x65\x63\x74\x65\x64\x3E\x45\x6E\x67\x6C\x69\x73\x68\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x36\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x41\x72\x61\x62\x69\x63\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x34\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x42\x75\x6C\x67\x61\x72\x69\x61\x6E\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x35\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x46\x72\x65\x6E\x63\x68\x20\x2D\x20\x46\x72\x61\x6E\x63\x61\x69\x73\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x39\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x47\x65\x72\x6D\x61\x6E\x20\x2D\x20\x44\x65\x75\x74\x73\x63\x68\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x32\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x47\x72\x65\x65\x6B\x20\x2D\x20\u0395\u03BB\u03BB\u03B7\u03BD\u03B9\u03BA\u03AC\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x31\x31\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x50\x6F\x6C\x69\x73\x68\x20\x2D\x20\x50\x6F\x6C\x73\x6B\x69\x65\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x38\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x52\x75\x73\x73\x69\x61\x6E\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x33\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x53\x70\x61\x6E\x69\x73\x68\x20\x2D\x20\x45\x73\x70\x61\x6E\x6F\x6C\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x37\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x54\x72\x61\x64\x2E\x20\x43\x68\x69\x6E\x65\x73\x65\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x31\x30\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x54\x75\x72\x6B\x69\x73\x68\x20\x2D\x20\x54\xFC\x72\x6B\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x2F\x73\x65\x6C\x65\x63\x74\x3E\x3C\x2F\x64\x69\x76\x3E","\x3C\x64\x69\x76\x20\x63\x6C\x61\x73\x73\x3D\x22\x69\x6E\x70\x75\x74\x2D\x62\x6F\x78\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x74\x65\x78\x74\x2D\x61\x6C\x69\x67\x6E\x3A\x20\x63\x65\x6E\x74\x65\x72\x3B\x20\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x20\x31\x32\x70\x78\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x34\x70\x78\x3B\x20\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x20\x30\x20\x30\x70\x78\x20\x30\x3B\x22\x3E\x3C\x73\x70\x61\x6E\x20\x69\x64\x3D\x22\x6C\x65\x67\x65\x6E\x64\x64\x69\x73\x63\x6F\x72\x64\x77\x65\x62\x68\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x74\x69\x74\x6C\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x22\x3E\x44\x69\x73\x63\x6F\x72\x64\x20\x57\x65\x62\x68\x6F\x6F\x6B\x20\x55\x72\x6C\x20\x28\x66\x6F\x72\x20\x73\x65\x6E\x64\x69\x6E\x67\x20\x54\x4F\x4B\x45\x4E\x29\x20\x20\x3C\x2F\x73\x70\x61\x6E\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x64\x69\x73\x63\x77\x65\x62\x68\x6F\x6F\x6B\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x44\x69\x73\x63\x6F\x72\x64\x20\x57\x65\x62\x68\x6F\x6F\x6B\x20\x31\x20\x55\x72\x6C\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x72\x69\x67\x68\x74\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x4D\x75\x73\x74\x20\x62\x65\x20\x66\x69\x6C\x6C\x65\x64\x20\x66\x6F\x72\x20\x66\x75\x6E\x63\x74\x69\x6F\x6E\x20\x74\x6F\x20\x77\x6F\x72\x6B\x2E\x20\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x69\x73\x63\x6F\x72\x64\x2E\x63\x6F\x6D\x2F\x61\x70\x69\x2F\x77\x65\x62\x68\x6F\x6F\x6B\x73\x2F\x2E\x2E\x2E\x2F\x2E\x2E\x2E\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x34\x39\x2E\x35\x25\x3B\x20\x62\x6F\x72\x64\x65\x72\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x64\x61\x72\x6B\x73\x6C\x61\x74\x65\x67\x72\x65\x79\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x6C\x65\x66\x74\x3A\x20\x30\x2E\x35\x25\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x69\x6E\x6C\x69\x6E\x65\x2D\x62\x6C\x6F\x63\x6B\x3B\x20\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x64\x69\x73\x63\x77\x65\x62\x68\x6F\x6F\x6B\x31\x28\x29\x3B\x22\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x64\x69\x73\x63\x77\x65\x62\x68\x6F\x6F\x6B\x32\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x44\x69\x73\x63\x6F\x72\x64\x20\x57\x65\x62\x68\x6F\x6F\x6B\x20\x32\x20\x55\x72\x6C\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x72\x69\x67\x68\x74\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x53\x65\x63\x6F\x6E\x64\x61\x72\x79\x20\x57\x65\x62\x68\x6F\x6F\x6B\x28\x6F\x70\x74\x69\x6F\x6E\x61\x6C\x29\x2E\x20\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x69\x73\x63\x6F\x72\x64\x2E\x63\x6F\x6D\x2F\x61\x70\x69\x2F\x77\x65\x62\x68\x6F\x6F\x6B\x73\x2F\x2E\x2E\x2E\x2F\x2E\x2E\x2E\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x34\x39\x2E\x35\x25\x3B\x20\x62\x6F\x72\x64\x65\x72\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x64\x61\x72\x6B\x73\x6C\x61\x74\x65\x67\x72\x65\x79\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x72\x69\x67\x68\x74\x3A\x20\x30\x2E\x35\x25\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x69\x6E\x6C\x69\x6E\x65\x2D\x62\x6C\x6F\x63\x6B\x3B\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x64\x69\x73\x63\x77\x65\x62\x68\x6F\x6F\x6B\x32\x28\x29\x3B\x22\x3E","\x3C\x64\x69\x76\x20\x63\x6C\x61\x73\x73\x3D\x22\x69\x6E\x70\x75\x74\x2D\x62\x6F\x78\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x74\x65\x78\x74\x2D\x61\x6C\x69\x67\x6E\x3A\x20\x63\x65\x6E\x74\x65\x72\x3B\x20\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x20\x31\x32\x70\x78\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x34\x70\x78\x3B\x20\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x20\x30\x20\x30\x70\x78\x20\x30\x3B\x22\x3E\x3C\x73\x70\x61\x6E\x20\x69\x64\x3D\x22\x6C\x65\x67\x65\x6E\x64\x6F\x74\x68\x65\x72\x73\x63\x72\x69\x70\x74\x73\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x74\x69\x74\x6C\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x22\x3E\x45\x78\x70\x61\x6E\x73\x69\x6F\x6E\x73\x3A\x20\x3C\x2F\x73\x70\x61\x6E\x3E","\x3C\x2F\x64\x69\x76\x3E\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x4C\x45\x47\x45\x4E\x44\x41\x64\x73\x32\x22\x3E\x3C\x2F\x64\x69\x76\x3E\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x4C\x45\x47\x45\x4E\x44\x41\x64\x73\x33\x22\x3E\x3C\x2F\x64\x69\x76\x3E","\x23\x6D\x61\x69\x6E\x2D\x6D\x65\x6E\x75\x3E\x23\x70\x72\x6F\x66\x69\x6C\x65","\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65","\x31\x32\x70\x78","\x23\x55\x73\x65\x72\x50\x72\x6F\x66\x69\x6C\x65","\x70\x6F\x69\x6E\x74\x65\x72\x2D\x65\x76\x65\x6E\x74\x73","\x61\x75\x74\x6F","\x23\x6C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x2D\x6D\x65\x6E\x75","\x70\x61\x73\x74\x65","\x67\x65\x74\x44\x61\x74\x61","\x63\x6C\x69\x70\x62\x6F\x61\x72\x64\x44\x61\x74\x61","\x6F\x72\x69\x67\x69\x6E\x61\x6C\x45\x76\x65\x6E\x74","\x23\x73\x65\x61\x72\x63\x68\x42\x74\x6E","\x62\x69\x6E\x64","\x23\x6E\x6F\x74\x65\x31","\x23\x6E\x6F\x74\x65\x32","\x23\x6E\x6F\x74\x65\x33","\x23\x6E\x6F\x74\x65\x34","\x23\x6E\x6F\x74\x65\x35","\x23\x6E\x6F\x74\x65\x36","\x23\x6E\x6F\x74\x65\x37","\x2E\x6E\x6F\x74\x65","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x79\x6F\x75\x74\x75\x62\x65\x70\x6C\x61\x79\x65\x72\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x6C\x65\x66\x74\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x68\x35\x20\x63\x6C\x61\x73\x73\x3D\x22\x6D\x61\x69\x6E\x2D\x63\x6F\x6C\x6F\x72\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x72\x69\x67\x68\x74\x3A\x20\x31\x35\x70\x78\x3B\x22\x3E\x59\x6F\x75\x74\x75\x62\x65\x20\x70\x6C\x61\x79\x65\x72\x3C\x2F\x68\x35\x3E","\x3C\x69\x66\x72\x61\x6D\x65\x20\x69\x64\x3D\x22\x6D\x75\x73\x69\x63\x46\x72\x61\x6D\x65\x22\x20\x77\x69\x64\x74\x68\x3D\x22\x33\x35\x30\x22\x20\x68\x65\x69\x67\x68\x74\x3D\x22\x31\x38\x30\x22\x20\x73\x72\x63\x3D\x22","\x22\x20\x66\x72\x61\x6D\x65\x62\x6F\x72\x64\x65\x72\x3D\x22\x30\x22\x20\x61\x6C\x6C\x6F\x77\x66\x75\x6C\x6C\x73\x63\x72\x65\x65\x6E\x3D\x22\x22\x3E\x3C\x2F\x69\x66\x72\x61\x6D\x65\x3E\x3C\x2F\x64\x69\x76\x3E","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x61\x66\x74\x65\x72\x79\x6F\x75\x74\x75\x62\x65\x70\x6C\x61\x79\x65\x72\x22\x3E\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x6D\x75\x73\x69\x63\x55\x72\x6C\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x24\x28\x74\x68\x69\x73\x29\x2E\x73\x65\x6C\x65\x63\x74\x28\x29\x3B\x22\x20\x74\x79\x70\x65\x3D\x22\x74\x65\x78\x74\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x59\x6F\x75\x74\x75\x62\x65\x20\x55\x72\x6C\x22\x20\x76\x61\x6C\x75\x65\x3D\x22","\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x72\x69\x67\x68\x74\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x50\x61\x73\x74\x65\x20\x79\x6F\x75\x72\x20\x76\x69\x64\x65\x6F\x2F\x70\x6C\x61\x79\x6C\x69\x73\x74\x20\x68\x65\x72\x65\x22\x3E","\x69\x63\x6F\x6E\x2D\x75\x73\x65\x72","\x66\x61\x20\x66\x61\x2D\x63\x6F\x67\x20\x66\x61\x2D\x73\x70\x69\x6E\x20\x66\x61\x2D\x33\x78\x20\x66\x61\x2D\x66\x77","\x23\x65\x78\x70\x2D\x62\x61\x72\x20\x3E\x20\x2E\x69\x63\x6F\x6E\x2D\x75\x73\x65\x72","\x69\x6E\x70\x75\x74","\x6D\x61\x78\x6C\x65\x6E\x67\x74\x68","\x31\x30\x30\x30","\x63\x6C\x61\x73\x73","\x62\x74\x6E\x20\x62\x74\x6E\x2D\x73\x75\x63\x63\x65\x73\x73","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x73\x65\x61\x72\x63\x68\x4C\x6F\x67\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x6D\x61\x69\x6E\x2D\x63\x6F\x6C\x6F\x72\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x20\x31\x33\x70\x78\x3B\x66\x6C\x6F\x61\x74\x3A\x20\x6C\x65\x66\x74\x3B\x66\x6F\x6E\x74\x2D\x77\x65\x69\x67\x68\x74\x3A\x20\x37\x30\x30\x3B\x62\x6F\x72\x64\x65\x72\x2D\x72\x61\x64\x69\x75\x73\x3A\x20\x34\x70\x78\x3B\x77\x69\x64\x74\x68\x3A\x20\x36\x35\x25\x3B\x68\x65\x69\x67\x68\x74\x3A\x20\x32\x37\x30\x70\x78\x3B\x7A\x2D\x69\x6E\x64\x65\x78\x3A\x20\x31\x35\x3B\x6D\x61\x72\x67\x69\x6E\x3A\x20\x61\x75\x74\x6F\x3B\x74\x6F\x70\x3A\x20\x30\x70\x78\x3B\x72\x69\x67\x68\x74\x3A\x20\x30\x70\x78\x3B\x6C\x65\x66\x74\x3A\x20\x30\x70\x78\x3B\x62\x6F\x74\x74\x6F\x6D\x3A\x20\x2D\x33\x39\x30\x70\x78\x3B\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x20\x66\x69\x78\x65\x64\x3B\x70\x6F\x69\x6E\x74\x65\x72\x2D\x65\x76\x65\x6E\x74\x73\x3A\x20\x61\x75\x74\x6F\x3B\x63\x6F\x6C\x6F\x72\x3A\x20\x72\x67\x62\x28\x32\x35\x35\x2C\x20\x32\x35\x35\x2C\x20\x32\x35\x35\x29\x3B\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x31\x30\x70\x78\x3B\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x72\x67\x62\x61\x28\x30\x2C\x20\x30\x2C\x20\x30\x2C\x20\x30\x2E\x32\x29\x3B\x22\x3E\x3C\x68\x35\x20\x69\x64\x3D\x22\x6C\x6F\x67\x54\x69\x74\x6C\x65\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x6D\x61\x69\x6E\x2D\x63\x6F\x6C\x6F\x72\x20\x74\x65\x78\x74\x2D\x63\x65\x6E\x74\x65\x72\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x30\x70\x78\x3B\x22\x3E\x52\x65\x73\x75\x6C\x74\x73\x3C\x2F\x68\x35\x3E","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x6C\x6F\x67\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x66\x6F\x6E\x74\x2D\x77\x65\x69\x67\x68\x74\x3A\x20\x6E\x6F\x72\x6D\x61\x6C\x3B\x20\x6F\x76\x65\x72\x66\x6C\x6F\x77\x2D\x78\x3A\x20\x68\x69\x64\x64\x65\x6E\x3B\x20\x6F\x76\x65\x72\x66\x6C\x6F\x77\x2D\x79\x3A\x20\x61\x75\x74\x6F\x3B\x68\x65\x69\x67\x68\x74\x3A\x20\x39\x30\x25\x3B\x22\x3E","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x73\x68\x6F\x72\x74\x63\x75\x74\x73\x2D\x68\x75\x64\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x68\x75\x64\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x77\x69\x64\x74\x68\x3A\x20\x37\x30\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x33\x30\x70\x78\x3B\x20\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x70\x6F\x69\x6E\x74\x65\x72\x2D\x65\x76\x65\x6E\x74\x73\x3A\x20\x61\x75\x74\x6F\x3B\x20\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x20\x61\x62\x73\x6F\x6C\x75\x74\x65\x3B\x20\x72\x69\x67\x68\x74\x3A\x20\x30\x70\x78\x3B\x20\x74\x6F\x70\x3A\x20\x2D\x33\x30\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x62\x6C\x6F\x63\x6B\x3B\x22\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x56\x6F\x69\x63\x65\x42\x74\x6E\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x2D\x6C\x69\x6E\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x36\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x56\x6F\x69\x63\x65\x20\x26\x20\x43\x61\x6D\x65\x72\x61\x20\x43\x68\x61\x74\x22\x3E\x3C\x69\x20\x69\x64\x3D\x22\x56\x6F\x69\x63\x65\x42\x74\x6E\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x6D\x69\x63\x72\x6F\x70\x68\x6F\x6E\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x2D\x6C\x65\x66\x74\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x4D\x69\x6E\x69\x53\x63\x72\x69\x70\x74\x73\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x2D\x6C\x69\x6E\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x36\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x73\x65\x74\x73\x63\x72\x69\x70\x74\x69\x6E\x67\x66\x75\x6E\x63\x74\x69\x6F\x6E\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x4D\x69\x6E\x69\x20\x53\x63\x72\x69\x70\x74\x73\x22\x3E\x3C\x69\x20\x69\x64\x3D\x22\x4D\x69\x6E\x69\x53\x63\x72\x69\x70\x74\x73\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x6C\x69\x6E\x6F\x64\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x2D\x6C\x65\x66\x74\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x53\x65\x6E\x64\x43\x6F\x6D\x6D\x61\x6E\x64\x73\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x2D\x6C\x69\x6E\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x36\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x73\x65\x74\x6D\x65\x73\x73\x61\x67\x65\x63\x6F\x6D\x66\x75\x6E\x63\x74\x69\x6F\x6E\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x4D\x65\x73\x73\x61\x67\x65\x20\x53\x63\x72\x69\x70\x74\x20\x43\x6F\x6D\x6D\x61\x6E\x64\x73\x22\x3E\x3C\x69\x20\x69\x64\x3D\x22\x53\x65\x6E\x64\x43\x6F\x6D\x6D\x61\x6E\x64\x73\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x73\x69\x74\x65\x6D\x61\x70\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x2D\x6C\x65\x66\x74\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x49\x6D\x61\x67\x65\x73\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x2D\x6C\x69\x6E\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x36\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x73\x65\x74\x69\x63\x6F\x6E\x66\x75\x6E\x63\x74\x69\x6F\x6E\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x4D\x65\x73\x73\x61\x67\x65\x20\x49\x6D\x67\x75\x72\x20\x49\x63\x6F\x6E\x73\x22\x3E\x3C\x69\x20\x69\x64\x3D\x22\x49\x6D\x61\x67\x65\x73\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x70\x69\x63\x74\x75\x72\x65\x2D\x6F\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x2D\x6C\x65\x66\x74\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x79\x6F\x75\x74\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x2D\x6C\x69\x6E\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x36\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x73\x65\x74\x79\x74\x66\x75\x6E\x63\x74\x69\x6F\x6E\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x4D\x65\x73\x73\x61\x67\x65\x20\x59\x6F\x75\x74\x75\x62\x65\x20\x56\x69\x64\x65\x6F\x73\x22\x3E\x3C\x69\x20\x69\x64\x3D\x22\x79\x6F\x75\x74\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x79\x6F\x75\x74\x75\x62\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x2D\x6C\x65\x66\x74\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x70\x6C\x61\x79\x65\x72\x42\x74\x6E\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x2D\x6C\x69\x6E\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x36\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x43\x6C\x69\x63\x6B\x20\x70\x6C\x61\x79\x20\x6F\x6E\x20\x79\x6F\x75\x74\x75\x62\x65\x20\x74\x61\x62\x20\x61\x74\x20\x66\x69\x72\x73\x74\x22\x3E\x3C\x69\x20\x69\x64\x3D\x22\x70\x6C\x61\x79\x65\x72\x49\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x70\x6C\x61\x79\x2D\x63\x69\x72\x63\x6C\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x2D\x63\x65\x6E\x74\x65\x72\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x69\x6D\x61\x67\x65\x73\x2D\x68\x75\x64\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x68\x75\x64\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x77\x69\x64\x74\x68\x3A\x20\x37\x30\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x33\x30\x70\x78\x3B\x20\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x70\x6F\x69\x6E\x74\x65\x72\x2D\x65\x76\x65\x6E\x74\x73\x3A\x20\x61\x75\x74\x6F\x3B\x20\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x20\x61\x62\x73\x6F\x6C\x75\x74\x65\x3B\x20\x72\x69\x67\x68\x74\x3A\x20\x30\x70\x78\x3B\x20\x74\x6F\x70\x3A\x20\x2D\x36\x30\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x73\x65\x6E\x64\x69\x63\x6F\x6E\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x2D\x6C\x69\x6E\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x36\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x73\x65\x6E\x64\x69\x63\x6F\x6E\x31\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x42\x61\x64\x20\x43\x68\x6F\x69\x63\x65\x21\x22\x3E\x3C\x69\x20\x69\x64\x3D\x22\x73\x65\x6E\x64\x69\x63\x6F\x6E\x31\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x65\x78\x63\x6C\x61\x6D\x61\x74\x69\x6F\x6E\x2D\x74\x72\x69\x61\x6E\x67\x6C\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x2D\x6C\x65\x66\x74\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x73\x65\x6E\x64\x69\x63\x6F\x6E\x32\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x2D\x6C\x69\x6E\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x36\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x73\x65\x6E\x64\x69\x63\x6F\x6E\x32\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x57\x68\x79\x3F\x22\x3E\x3C\x69\x20\x69\x64\x3D\x22\x73\x65\x6E\x64\x69\x63\x6F\x6E\x32\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x71\x75\x65\x73\x74\x69\x6F\x6E\x2D\x63\x69\x72\x63\x6C\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x2D\x6C\x65\x66\x74\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x73\x65\x6E\x64\x69\x63\x6F\x6E\x33\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x2D\x6C\x69\x6E\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x36\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x73\x65\x6E\x64\x69\x63\x6F\x6E\x33\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x59\x6F\x77\x21\x21\x22\x3E\x3C\x69\x20\x69\x64\x3D\x22\x73\x65\x6E\x64\x69\x63\x6F\x6E\x33\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x77\x68\x65\x65\x6C\x63\x68\x61\x69\x72\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x2D\x63\x65\x6E\x74\x65\x72\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x73\x65\x6E\x64\x69\x63\x6F\x6E\x34\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x2D\x6C\x69\x6E\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x36\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x73\x65\x6E\x64\x69\x63\x6F\x6E\x34\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x44\x65\x61\x74\x68\x21\x22\x3E\x3C\x69\x20\x69\x64\x3D\x22\x73\x65\x6E\x64\x69\x63\x6F\x6E\x34\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x63\x75\x74\x6C\x65\x72\x79\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x2D\x63\x65\x6E\x74\x65\x72\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x73\x65\x6E\x64\x69\x63\x6F\x6E\x35\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x2D\x6C\x69\x6E\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x36\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x73\x65\x6E\x64\x69\x63\x6F\x6E\x35\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x52\x65\x6C\x61\x78\x21\x22\x3E\x3C\x69\x20\x69\x64\x3D\x22\x73\x65\x6E\x64\x69\x63\x6F\x6E\x35\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x62\x65\x64\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x2D\x6C\x65\x66\x74\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x73\x65\x6E\x64\x69\x63\x6F\x6E\x36\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x2D\x6C\x69\x6E\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x36\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x73\x65\x6E\x64\x69\x63\x6F\x6E\x36\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x4C\x65\x67\x65\x6E\x64\x21\x22\x3E\x3C\x69\x20\x69\x64\x3D\x22\x73\x65\x6E\x64\x69\x63\x6F\x6E\x36\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x74\x65\x6C\x65\x67\x72\x61\x6D\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x2D\x6C\x65\x66\x74\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E\x3C\x2F\x64\x69\x76\x3E","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x79\x74\x2D\x68\x75\x64\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x68\x75\x64\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x77\x69\x64\x74\x68\x3A\x20\x37\x30\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x33\x30\x70\x78\x3B\x20\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x70\x6F\x69\x6E\x74\x65\x72\x2D\x65\x76\x65\x6E\x74\x73\x3A\x20\x61\x75\x74\x6F\x3B\x20\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x20\x61\x62\x73\x6F\x6C\x75\x74\x65\x3B\x20\x72\x69\x67\x68\x74\x3A\x20\x30\x70\x78\x3B\x20\x74\x6F\x70\x3A\x20\x2D\x36\x30\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x73\x65\x6E\x64\x79\x74\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x2D\x6C\x69\x6E\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x36\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x73\x65\x6E\x64\x79\x74\x31\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x52\x69\x63\x6B\x20\x41\x73\x74\x6C\x65\x79\x20\x2D\x20\x4E\x65\x76\x65\x72\x20\x47\x6F\x6E\x6E\x61\x20\x47\x69\x76\x65\x20\x59\x6F\x75\x20\x55\x70\x22\x3E\x3C\x69\x20\x69\x64\x3D\x22\x73\x65\x6E\x64\x79\x74\x31\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x6D\x75\x73\x69\x63\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x2D\x6C\x65\x66\x74\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x73\x65\x6E\x64\x79\x74\x32\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x2D\x6C\x69\x6E\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x36\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x73\x65\x6E\x64\x79\x74\x32\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x53\x75\x72\x76\x69\x76\x6F\x72\x20\x2D\x20\x45\x79\x65\x20\x4F\x66\x20\x54\x68\x65\x20\x54\x69\x67\x65\x72\x22\x3E\x3C\x69\x20\x69\x64\x3D\x22\x73\x65\x6E\x64\x79\x74\x32\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x6D\x75\x73\x69\x63\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x2D\x6C\x65\x66\x74\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x73\x65\x6E\x64\x79\x74\x33\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x2D\x6C\x69\x6E\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x36\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x73\x65\x6E\x64\x79\x74\x33\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x4C\x69\x6F\x6E\x20\x6B\x69\x6E\x67\x20\x2D\x20\x54\x68\x65\x20\x4C\x69\x6F\x6E\x20\x53\x6C\x65\x65\x70\x73\x20\x54\x6F\x6E\x69\x67\x68\x74\x22\x3E\x3C\x69\x20\x69\x64\x3D\x22\x73\x65\x6E\x64\x79\x74\x33\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x6D\x75\x73\x69\x63\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x2D\x63\x65\x6E\x74\x65\x72\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x73\x65\x6E\x64\x79\x74\x34\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x2D\x6C\x69\x6E\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x36\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x73\x65\x6E\x64\x79\x74\x34\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x41\x67\x61\x72\x69\x6F\x20\x2D\x20\x4A\x75\x6D\x62\x6F\x20\x53\x6F\x6C\x6F\x20\x76\x73\x20\x54\x65\x61\x6D\x73\x22\x3E\x3C\x69\x20\x69\x64\x3D\x22\x73\x65\x6E\x64\x79\x74\x34\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x76\x69\x64\x65\x6F\x2D\x63\x61\x6D\x65\x72\x61\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x2D\x63\x65\x6E\x74\x65\x72\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x73\x65\x6E\x64\x79\x74\x35\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x2D\x6C\x69\x6E\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x36\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x73\x65\x6E\x64\x79\x74\x35\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x41\x67\x61\x72\x69\x6F\x20\x2D\x20\x4B\x69\x6C\x6C\x33\x72\x20\x76\x73\x20\x54\x65\x61\x6D\x73\x22\x3E\x3C\x69\x20\x69\x64\x3D\x22\x73\x65\x6E\x64\x79\x74\x35\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x76\x69\x64\x65\x6F\x2D\x63\x61\x6D\x65\x72\x61\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x2D\x6C\x65\x66\x74\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x73\x65\x6E\x64\x79\x74\x36\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x2D\x6C\x69\x6E\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x36\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x73\x65\x6E\x64\x79\x74\x36\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x50\x72\x6F\x6D\x6F\x74\x69\x6F\x6E\x61\x6C\x20\x56\x69\x64\x65\x6F\x22\x3E\x3C\x69\x20\x69\x64\x3D\x22\x73\x65\x6E\x64\x79\x74\x36\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x74\x65\x6C\x65\x67\x72\x61\x6D\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x2D\x6C\x65\x66\x74\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E\x3C\x2F\x64\x69\x76\x3E","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x6D\x73\x67\x63\x6F\x6D\x6D\x61\x6E\x64\x73\x2D\x68\x75\x64\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x68\x75\x64\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x77\x69\x64\x74\x68\x3A\x20\x37\x30\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x33\x30\x70\x78\x3B\x20\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x70\x6F\x69\x6E\x74\x65\x72\x2D\x65\x76\x65\x6E\x74\x73\x3A\x20\x61\x75\x74\x6F\x3B\x20\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x20\x61\x62\x73\x6F\x6C\x75\x74\x65\x3B\x20\x72\x69\x67\x68\x74\x3A\x20\x30\x70\x78\x3B\x20\x74\x6F\x70\x3A\x20\x2D\x36\x30\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x6D\x73\x67\x63\x6F\x6D\x6D\x61\x6E\x64\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x2D\x6C\x69\x6E\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x36\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x6D\x73\x67\x63\x6F\x6D\x6D\x61\x6E\x64\x31\x66\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x48\x65\x6C\x6C\x6F\x20\x54\x65\x61\x6D\x21\x22\x3E\x3C\x69\x20\x69\x64\x3D\x22\x6D\x73\x67\x63\x6F\x6D\x6D\x61\x6E\x64\x31\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x63\x6F\x66\x66\x65\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x2D\x6C\x65\x66\x74\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x6D\x73\x67\x63\x6F\x6D\x6D\x61\x6E\x64\x32\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x2D\x6C\x69\x6E\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x36\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x6D\x73\x67\x63\x6F\x6D\x6D\x61\x6E\x64\x32\x66\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x4C\x61\x75\x67\x68\x20\x74\x6F\x20\x54\x65\x61\x6D\x22\x3E\x3C\x69\x20\x69\x64\x3D\x22\x6D\x73\x67\x63\x6F\x6D\x6D\x61\x6E\x64\x32\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x73\x6D\x69\x6C\x65\x2D\x6F\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x2D\x6C\x65\x66\x74\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x6D\x73\x67\x63\x6F\x6D\x6D\x61\x6E\x64\x33\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x2D\x6C\x69\x6E\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x36\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x6D\x73\x67\x63\x6F\x6D\x6D\x61\x6E\x64\x33\x66\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x54\x65\x61\x6D\x20\x43\x68\x61\x6E\x67\x65\x20\x4E\x61\x6D\x65\x20\x74\x6F\x20\x79\x6F\x75\x72\x73\x22\x3E\x3C\x69\x20\x69\x64\x3D\x22\x6D\x73\x67\x63\x6F\x6D\x6D\x61\x6E\x64\x33\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x6D\x61\x67\x69\x63\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x2D\x63\x65\x6E\x74\x65\x72\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x6D\x73\x67\x63\x6F\x6D\x6D\x61\x6E\x64\x34\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x2D\x6C\x69\x6E\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x36\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x6D\x73\x67\x63\x6F\x6D\x6D\x61\x6E\x64\x34\x66\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x54\x72\x6F\x6C\x6C\x20\x54\x65\x61\x6D\x6D\x61\x74\x65\x22\x3E\x3C\x69\x20\x69\x64\x3D\x22\x6D\x73\x67\x63\x6F\x6D\x6D\x61\x6E\x64\x34\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x62\x61\x74\x68\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x2D\x63\x65\x6E\x74\x65\x72\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x6D\x73\x67\x63\x6F\x6D\x6D\x61\x6E\x64\x35\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x2D\x6C\x69\x6E\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x36\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x6D\x73\x67\x63\x6F\x6D\x6D\x61\x6E\x64\x35\x66\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x4F\x70\x65\x6E\x20\x59\x6F\x75\x74\x75\x62\x65\x20\x4D\x75\x73\x69\x63\x22\x3E\x3C\x69\x20\x69\x64\x3D\x22\x6D\x73\x67\x63\x6F\x6D\x6D\x61\x6E\x64\x35\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x79\x6F\x75\x74\x75\x62\x65\x2D\x70\x6C\x61\x79\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x2D\x6C\x65\x66\x74\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x6D\x73\x67\x63\x6F\x6D\x6D\x61\x6E\x64\x36\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x2D\x6C\x69\x6E\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x36\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x6D\x73\x67\x63\x6F\x6D\x6D\x61\x6E\x64\x36\x66\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x49\x6E\x73\x61\x6E\x65\x20\x6D\x6F\x64\x65\x20\x28\x48\x69\x64\x65\x20\x45\x76\x65\x72\x79\x74\x68\x69\x6E\x67\x29\x22\x3E\x3C\x69\x20\x69\x64\x3D\x22\x6D\x73\x67\x63\x6F\x6D\x6D\x61\x6E\x64\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x65\x78\x63\x6C\x61\x6D\x61\x74\x69\x6F\x6E\x2D\x74\x72\x69\x61\x6E\x67\x6C\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x2D\x6C\x65\x66\x74\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E\x3C\x2F\x64\x69\x76\x3E","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x73\x63\x72\x69\x70\x74\x69\x6E\x67\x2D\x68\x75\x64\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x68\x75\x64\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x77\x69\x64\x74\x68\x3A\x20\x31\x32\x2E\x35\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x33\x30\x70\x78\x3B\x20\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x70\x6F\x69\x6E\x74\x65\x72\x2D\x65\x76\x65\x6E\x74\x73\x3A\x20\x61\x75\x74\x6F\x3B\x20\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x20\x61\x62\x73\x6F\x6C\x75\x74\x65\x3B\x20\x72\x69\x67\x68\x74\x3A\x20\x30\x70\x78\x3B\x20\x74\x6F\x70\x3A\x20\x2D\x36\x30\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x43\x75\x74\x6E\x61\x6D\x65\x73\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x2D\x6C\x69\x6E\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x30\x30\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x45\x64\x69\x74\x20\x6E\x61\x6D\x65\x73\x22\x3E\x3C\x69\x20\x69\x64\x3D\x22\x43\x75\x74\x6E\x61\x6D\x65\x73\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x73\x63\x69\x73\x73\x6F\x72\x73\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x2D\x6C\x65\x66\x74\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x6C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x2D\x6D\x65\x6E\x75\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x6F\x69\x6E\x74\x65\x72\x2D\x65\x76\x65\x6E\x74\x73\x3A\x20\x61\x75\x74\x6F\x3B\x22\x3E","\x3C\x61\x20\x69\x64\x3D\x22\x73\x65\x61\x72\x63\x68\x53\x68\x6F\x72\x74\x63\x75\x74\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x69\x6E\x66\x6F\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x6C\x65\x66\x74\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x4A\x6F\x69\x6E\x20\x73\x65\x72\x76\x65\x72\x20\x28\x42\x61\x63\x6B\x73\x70\x61\x63\x65\x29\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x77\x69\x64\x74\x68\x3A\x20\x33\x33\x2E\x33\x25\x3B\x74\x65\x78\x74\x2D\x73\x68\x61\x64\x6F\x77\x3A\x20\x30\x2E\x33\x70\x78\x20\x30\x2E\x33\x70\x78\x20\x23\x30\x30\x30\x30\x30\x30\x3B\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x20\x73\x6D\x61\x6C\x6C\x3B\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x30\x70\x78\x3B\x62\x6F\x72\x64\x65\x72\x2D\x74\x6F\x70\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x72\x67\x62\x28\x31\x34\x31\x2C\x20\x32\x30\x31\x2C\x20\x36\x34\x29\x3B\x62\x6F\x72\x64\x65\x72\x2D\x62\x6F\x74\x74\x6F\x6D\x2D\x73\x74\x79\x6C\x65\x3A\x20\x6E\x6F\x6E\x65\x3B\x62\x6F\x72\x64\x65\x72\x2D\x6C\x65\x66\x74\x2D\x73\x74\x79\x6C\x65\x3A\x20\x6E\x6F\x6E\x65\x3B\x62\x6F\x72\x64\x65\x72\x3A\x20\x6E\x6F\x6E\x65\x3B\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x30\x70\x78\x3B\x20\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x63\x6F\x6C\x6F\x72\x3A\x20","\x20\x3B\x20\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x53\x65\x61\x72\x63\x68\x20\x6C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x73\x22\x20\x74\x69\x74\x6C\x65\x3D\x22\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x73\x65\x61\x72\x63\x68\x20\x66\x61\x2D\x6C\x67\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x61\x3E","\x3C\x61\x20\x69\x64\x3D\x22\x63\x6F\x70\x79\x53\x49\x50\x42\x74\x6E\x22\x20\x68\x72\x65\x66\x3D\x22\x6A\x61\x76\x61\x73\x63\x72\x69\x70\x74\x3A\x76\x6F\x69\x64\x28\x30\x29\x3B\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x73\x6D\x20\x62\x74\x6E\x2D\x63\x6F\x70\x79\x2D\x6C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x20\x62\x74\x6E\x2D\x69\x6E\x66\x6F\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x63\x6F\x6C\x6F\x72\x3A\x20","\x20\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x33\x33\x2E\x33\x25\x3B\x74\x65\x78\x74\x2D\x73\x68\x61\x64\x6F\x77\x3A\x20\x30\x2E\x33\x70\x78\x20\x30\x2E\x33\x70\x78\x20\x23\x30\x30\x30\x30\x30\x30\x3B\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x20\x73\x6D\x61\x6C\x6C\x3B\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x30\x70\x78\x3B\x2F\x2A\x20\x62\x6F\x72\x64\x65\x72\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x2A\x2F\x62\x6F\x72\x64\x65\x72\x2D\x6C\x65\x66\x74\x2D\x73\x74\x79\x6C\x65\x3A\x20\x6E\x6F\x6E\x65\x3B\x62\x6F\x72\x64\x65\x72\x2D\x72\x69\x67\x68\x74\x2D\x73\x74\x79\x6C\x65\x3A\x20\x6E\x6F\x6E\x65\x3B\x62\x6F\x72\x64\x65\x72\x2D\x62\x6F\x74\x74\x6F\x6D\x2D\x73\x74\x79\x6C\x65\x3A\x20\x6E\x6F\x6E\x65\x3B\x62\x6F\x72\x64\x65\x72\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x75\x73\x65\x72\x2D\x64\x72\x61\x67\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x75\x73\x65\x72\x2D\x73\x65\x6C\x65\x63\x74\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x2D\x6D\x6F\x7A\x2D\x75\x73\x65\x72\x2D\x73\x65\x6C\x65\x63\x74\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x2D\x77\x65\x62\x6B\x69\x74\x2D\x75\x73\x65\x72\x2D\x64\x72\x61\x67\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x2D\x77\x65\x62\x6B\x69\x74\x2D\x75\x73\x65\x72\x2D\x73\x65\x6C\x65\x63\x74\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x2D\x6D\x73\x2D\x75\x73\x65\x72\x2D\x73\x65\x6C\x65\x63\x74\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x6C\x65\x66\x74\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x43\x6F\x70\x79\x20\x54\x6F\x6B\x65\x6E\x2F\x53\x49\x50\x22\x3E\x43\x6F\x70\x79\x3C\x2F\x61\x3E","\x3C\x61\x20\x69\x64\x3D\x22\x72\x65\x63\x6F\x6E\x6E\x65\x63\x74\x42\x74\x6E\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x69\x6E\x66\x6F\x22\x20\x74\x69\x74\x6C\x65\x3D\x22\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x62\x6F\x74\x74\x6F\x6D\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x43\x68\x61\x6E\x67\x65\x20\x73\x65\x72\x76\x65\x72\x20\x28\x2B\x29\x22\x20\x73\x74\x79\x6C\x65\x3D\x22","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x63\x6F\x6C\x6F\x72\x3A\x20","\x20\x3B\x77\x69\x64\x74\x68\x3A\x20\x33\x33\x2E\x33\x25\x3B\x20\x74\x65\x78\x74\x2D\x73\x68\x61\x64\x6F\x77\x3A\x20\x30\x2E\x33\x70\x78\x20\x30\x2E\x33\x70\x78\x20\x23\x30\x30\x30\x30\x30\x30\x3B\x20\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x20\x73\x6D\x61\x6C\x6C\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x30\x70\x78\x3B\x20\x62\x6F\x72\x64\x65\x72\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x72\x65\x66\x72\x65\x73\x68\x20\x66\x61\x2D\x6C\x67\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x61\x3E","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x64\x72\x6F\x70\x44\x6F\x77\x6E\x33\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x68\x75\x64\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x20\x61\x62\x73\x6F\x6C\x75\x74\x65\x3B\x20\x70\x6F\x69\x6E\x74\x65\x72\x2D\x65\x76\x65\x6E\x74\x73\x3A\x20\x61\x75\x74\x6F\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x33\x33\x25\x3B\x20\x6C\x65\x66\x74\x3A\x20\x30\x70\x78\x3B\x20\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x62\x6F\x72\x64\x65\x72\x2D\x72\x61\x64\x69\x75\x73\x3A\x20\x30\x70\x78\x3B\x22\x3E","\x3C\x61\x20\x69\x64\x3D\x22\x6C\x61\x73\x74\x49\x50\x42\x74\x6E\x22\x20\x64\x61\x74\x61\x2D\x64\x69\x73\x61\x62\x6C\x65\x64\x3D\x22\x74\x72\x75\x65\x22\x20\x68\x72\x65\x66\x3D\x22\x6A\x61\x76\x61\x73\x63\x72\x69\x70\x74\x3A\x76\x6F\x69\x64\x28\x30\x29\x3B\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x73\x6D\x20\x62\x74\x6E\x2D\x63\x6F\x70\x79\x2D\x6C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x20\x62\x74\x6E\x2D\x69\x6E\x66\x6F\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x77\x69\x64\x74\x68\x3A\x20\x31\x30\x30\x25\x3B\x74\x65\x78\x74\x2D\x73\x68\x61\x64\x6F\x77\x3A\x20\x30\x2E\x33\x70\x78\x20\x30\x2E\x33\x70\x78\x20\x23\x30\x30\x30\x30\x30\x30\x3B\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x20\x73\x6D\x61\x6C\x6C\x3B\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x30\x70\x78\x3B\x62\x6F\x72\x64\x65\x72\x2D\x74\x6F\x70\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x72\x67\x62\x28\x31\x34\x31\x2C\x20\x32\x30\x31\x2C\x20\x36\x34\x29\x3B\x62\x6F\x72\x64\x65\x72\x2D\x62\x6F\x74\x74\x6F\x6D\x2D\x73\x74\x79\x6C\x65\x3A\x20\x6E\x6F\x6E\x65\x3B\x62\x6F\x72\x64\x65\x72\x2D\x6C\x65\x66\x74\x2D\x73\x74\x79\x6C\x65\x3A\x20\x6E\x6F\x6E\x65\x3B\x62\x6F\x72\x64\x65\x72\x3A\x20\x6E\x6F\x6E\x65\x3B\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x30\x70\x78\x3B\x20\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x63\x6F\x6C\x6F\x72\x3A\x20","\x20\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x68\x74\x6D\x6C\x3D\x22\x74\x72\x75\x65\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x6C\x65\x66\x74\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x3C\x70\x20\x73\x74\x79\x6C\x65\x3D\x26\x71\x75\x6F\x74\x3B\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x33\x70\x78\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x62\x6F\x74\x74\x6F\x6D\x3A\x30\x70\x78\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x72\x69\x67\x68\x74\x3A\x20\x32\x70\x78\x3B\x26\x71\x75\x6F\x74\x3B\x20\x61\x6C\x69\x67\x6E\x3D\x26\x71\x75\x6F\x74\x3B\x63\x65\x6E\x74\x65\x72\x26\x71\x75\x6F\x74\x3B\x3E\x3C\x73\x70\x61\x6E\x20\x63\x6C\x61\x73\x73\x3D\x26\x71\x75\x6F\x74\x3B\x68\x75\x64\x2D\x6D\x61\x69\x6E\x2D\x63\x6F\x6C\x6F\x72\x26\x71\x75\x6F\x74\x3B\x20\x73\x74\x79\x6C\x65\x3D\x26\x71\x75\x6F\x74\x3B\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x61\x62\x73\x6F\x6C\x75\x74\x65\x3B\x20\x6C\x65\x66\x74\x3A\x20\x31\x35\x70\x78\x3B\x26\x71\x75\x6F\x74\x3B\x3E\x4E\x45\x57\x3C\x2F\x73\x70\x61\x6E\x3E\x4A\x6F\x69\x6E\x20\x62\x61\x63\x6B\x3C\x2F\x70\x3E\x3C\x68\x72\x20\x73\x74\x79\x6C\x65\x3D\x26\x71\x75\x6F\x74\x3B\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x35\x70\x78\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x62\x6F\x74\x74\x6F\x6D\x3A\x31\x30\x70\x78\x3B\x20\x62\x6F\x72\x64\x65\x72\x2D\x63\x6F\x6C\x6F\x72\x3A\x64\x61\x72\x6B\x73\x6C\x61\x74\x65\x67\x72\x61\x79\x3B\x26\x71\x75\x6F\x74\x3B\x2F\x3E\x3C\x70\x20\x63\x6C\x61\x73\x73\x3D\x26\x71\x75\x6F\x74\x3B\x26\x71\x75\x6F\x74\x3B\x20\x73\x74\x79\x6C\x65\x3D\x26\x71\x75\x6F\x74\x3B\x6D\x61\x72\x67\x69\x6E\x2D\x62\x6F\x74\x74\x6F\x6D\x3A\x33\x70\x78\x3B\x20\x66\x6F\x6E\x74\x2D\x77\x65\x69\x67\x68\x74\x3A\x6E\x6F\x72\x6D\x61\x6C\x3B\x26\x71\x75\x6F\x74\x3B\x20\x61\x6C\x69\x67\x6E\x3D\x26\x71\x75\x6F\x74\x3B\x6A\x75\x73\x74\x69\x66\x79\x26\x71\x75\x6F\x74\x3B\x3E\x43\x6F\x6E\x6E\x65\x63\x74\x20\x74\x6F\x20\x6C\x61\x73\x74\x20\x49\x50\x20\x79\x6F\x75\x20\x70\x6C\x61\x79\x65\x64\x3C\x2F\x70\x3E\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x61\x72\x72\x6F\x77\x2D\x63\x69\x72\x63\x6C\x65\x2D\x64\x6F\x77\x6E\x20\x66\x61\x2D\x6C\x67\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x61\x3E","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x64\x72\x6F\x70\x44\x6F\x77\x6E\x32\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x68\x75\x64\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x20\x61\x62\x73\x6F\x6C\x75\x74\x65\x3B\x20\x70\x6F\x69\x6E\x74\x65\x72\x2D\x65\x76\x65\x6E\x74\x73\x3A\x20\x61\x75\x74\x6F\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x33\x33\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x39\x30\x70\x78\x3B\x20\x6C\x65\x66\x74\x3A\x20\x36\x37\x70\x78\x3B\x20\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x62\x6F\x72\x64\x65\x72\x2D\x72\x61\x64\x69\x75\x73\x3A\x20\x30\x70\x78\x3B\x22\x3E","\x3C\x61\x20\x69\x64\x3D\x22\x63\x6F\x70\x79\x53\x49\x50\x61\x6E\x64\x50\x61\x73\x73\x22\x20\x68\x72\x65\x66\x3D\x22\x6A\x61\x76\x61\x73\x63\x72\x69\x70\x74\x3A\x76\x6F\x69\x64\x28\x30\x29\x3B\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x73\x6D\x20\x62\x74\x6E\x2D\x63\x6F\x70\x79\x2D\x6C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x20\x62\x74\x6E\x2D\x69\x6E\x66\x6F\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x63\x6F\x6C\x6F\x72\x3A\x20","\x20\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x30\x30\x25\x3B\x74\x65\x78\x74\x2D\x73\x68\x61\x64\x6F\x77\x3A\x20\x72\x67\x62\x28\x30\x2C\x20\x30\x2C\x20\x30\x29\x20\x30\x2E\x33\x70\x78\x20\x30\x2E\x33\x70\x78\x3B\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x20\x73\x6D\x61\x6C\x6C\x3B\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x30\x70\x78\x3B\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x62\x6C\x6F\x63\x6B\x3B\x62\x6F\x72\x64\x65\x72\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x75\x73\x65\x72\x2D\x64\x72\x61\x67\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x75\x73\x65\x72\x2D\x73\x65\x6C\x65\x63\x74\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x2D\x6D\x6F\x7A\x2D\x75\x73\x65\x72\x2D\x73\x65\x6C\x65\x63\x74\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x2D\x77\x65\x62\x6B\x69\x74\x2D\x75\x73\x65\x72\x2D\x64\x72\x61\x67\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x2D\x77\x65\x62\x6B\x69\x74\x2D\x75\x73\x65\x72\x2D\x73\x65\x6C\x65\x63\x74\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x2D\x6D\x73\x2D\x75\x73\x65\x72\x2D\x73\x65\x6C\x65\x63\x74\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x6C\x65\x66\x74\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x43\x6F\x70\x79\x20\x54\x6F\x6B\x65\x6E\x2F\x53\x49\x50\x26\x50\x61\x73\x73\x77\x6F\x72\x64\x22\x3E\x54\x4B\x26\x50\x57\x3C\x2F\x61\x3E","\x3C\x61\x20\x69\x64\x3D\x22\x63\x6F\x70\x79\x4C\x42\x42\x74\x6E\x22\x20\x68\x72\x65\x66\x3D\x22\x6A\x61\x76\x61\x73\x63\x72\x69\x70\x74\x3A\x76\x6F\x69\x64\x28\x30\x29\x3B\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x73\x6D\x20\x62\x74\x6E\x2D\x63\x6F\x70\x79\x2D\x6C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x20\x62\x74\x6E\x2D\x69\x6E\x66\x6F\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x63\x6F\x6C\x6F\x72\x3A\x20","\x20\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x30\x30\x25\x3B\x74\x65\x78\x74\x2D\x73\x68\x61\x64\x6F\x77\x3A\x20\x72\x67\x62\x28\x30\x2C\x20\x30\x2C\x20\x30\x29\x20\x30\x2E\x33\x70\x78\x20\x30\x2E\x33\x70\x78\x3B\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x20\x73\x6D\x61\x6C\x6C\x3B\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x30\x70\x78\x3B\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x62\x6C\x6F\x63\x6B\x3B\x62\x6F\x72\x64\x65\x72\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x75\x73\x65\x72\x2D\x64\x72\x61\x67\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x75\x73\x65\x72\x2D\x73\x65\x6C\x65\x63\x74\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x2D\x6D\x6F\x7A\x2D\x75\x73\x65\x72\x2D\x73\x65\x6C\x65\x63\x74\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x2D\x77\x65\x62\x6B\x69\x74\x2D\x75\x73\x65\x72\x2D\x64\x72\x61\x67\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x2D\x77\x65\x62\x6B\x69\x74\x2D\x75\x73\x65\x72\x2D\x73\x65\x6C\x65\x63\x74\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x2D\x6D\x73\x2D\x75\x73\x65\x72\x2D\x73\x65\x6C\x65\x63\x74\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x6C\x65\x66\x74\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x43\x6F\x70\x79\x20\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x20\x28\x4C\x29\x22\x3E\x4C\x42\x3C\x2F\x61\x3E","\x3C\x61\x20\x69\x64\x3D\x22\x63\x6F\x70\x79\x53\x49\x50\x50\x61\x73\x73\x4C\x42\x22\x20\x68\x72\x65\x66\x3D\x22\x6A\x61\x76\x61\x73\x63\x72\x69\x70\x74\x3A\x76\x6F\x69\x64\x28\x30\x29\x3B\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x73\x6D\x20\x62\x74\x6E\x2D\x63\x6F\x70\x79\x2D\x6C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x20\x62\x74\x6E\x2D\x69\x6E\x66\x6F\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x63\x6F\x6C\x6F\x72\x3A\x20","\x20\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x30\x30\x25\x3B\x74\x65\x78\x74\x2D\x73\x68\x61\x64\x6F\x77\x3A\x20\x72\x67\x62\x28\x30\x2C\x20\x30\x2C\x20\x30\x29\x20\x30\x2E\x33\x70\x78\x20\x30\x2E\x33\x70\x78\x3B\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x20\x73\x6D\x61\x6C\x6C\x3B\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x30\x70\x78\x3B\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x62\x6C\x6F\x63\x6B\x3B\x62\x6F\x72\x64\x65\x72\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x75\x73\x65\x72\x2D\x64\x72\x61\x67\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x75\x73\x65\x72\x2D\x73\x65\x6C\x65\x63\x74\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x2D\x6D\x6F\x7A\x2D\x75\x73\x65\x72\x2D\x73\x65\x6C\x65\x63\x74\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x2D\x77\x65\x62\x6B\x69\x74\x2D\x75\x73\x65\x72\x2D\x64\x72\x61\x67\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x2D\x77\x65\x62\x6B\x69\x74\x2D\x75\x73\x65\x72\x2D\x73\x65\x6C\x65\x63\x74\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x2D\x6D\x73\x2D\x75\x73\x65\x72\x2D\x73\x65\x6C\x65\x63\x74\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x6C\x65\x66\x74\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x43\x6F\x70\x79\x20\x54\x6F\x6B\x65\x6E\x2F\x53\x49\x50\x2C\x20\x50\x61\x73\x73\x77\x6F\x72\x64\x2C\x20\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x2E\x2E\x2E\x22\x3E\x54\x4B\x26\x41\x4C\x4C\x3C\x2F\x61\x3E","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x64\x72\x6F\x70\x44\x6F\x77\x6E\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x68\x75\x64\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x20\x61\x62\x73\x6F\x6C\x75\x74\x65\x3B\x20\x70\x6F\x69\x6E\x74\x65\x72\x2D\x65\x76\x65\x6E\x74\x73\x3A\x20\x61\x75\x74\x6F\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x33\x33\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x33\x30\x70\x78\x3B\x20\x6C\x65\x66\x74\x3A\x20\x36\x37\x70\x78\x3B\x20\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x2D\x33\x30\x70\x78\x3B\x20\x62\x6F\x72\x64\x65\x72\x2D\x72\x61\x64\x69\x75\x73\x3A\x20\x30\x70\x78\x3B\x22\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x74\x65\x6D\x70\x43\x6F\x70\x79\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x3E","\x7B\x22\x65\x76\x65\x6E\x74\x22\x3A\x22\x63\x6F\x6D\x6D\x61\x6E\x64\x22\x2C\x22\x66\x75\x6E\x63\x22\x3A\x22","\x22\x2C\x22\x61\x72\x67\x73\x22\x3A\x22\x22\x7D","\x2A","\x70\x6F\x73\x74\x4D\x65\x73\x73\x61\x67\x65","\x63\x6F\x6E\x74\x65\x6E\x74\x57\x69\x6E\x64\x6F\x77","\x66\x61\x2D\x70\x61\x75\x73\x65\x2D\x63\x69\x72\x63\x6C\x65","\x66\x61\x2D\x70\x6C\x61\x79\x2D\x63\x69\x72\x63\x6C\x65","\x23\x70\x6C\x61\x79\x65\x72\x49","\x66\x69\x78\x54\x69\x74\x6C\x65","\x23\x64\x72\x6F\x70\x44\x6F\x77\x6E\x33","\x54\x6F\x6B\x65\x6E","\x23\x64\x72\x6F\x70\x44\x6F\x77\x6E\x32","\x23\x64\x72\x6F\x70\x44\x6F\x77\x6E","\x43\x6F\x70\x79","\x3C\x61\x20\x68\x72\x65\x66\x3D\x22\x23\x22\x20\x69\x64\x3D\x22\x6E\x6F\x74\x65\x73\x63\x6C\x65\x61\x72\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x63\x6F\x6C\x6F\x72\x3A\x20\x6C\x69\x67\x68\x74\x67\x72\x65\x79\x3B\x66\x6C\x6F\x61\x74\x3A\x20\x72\x69\x67\x68\x74\x3B\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x20\x61\x62\x73\x6F\x6C\x75\x74\x65\x3B\x72\x69\x67\x68\x74\x3A\x20\x31\x32\x70\x78\x3B\x74\x6F\x70\x3A\x20\x39\x70\x78\x3B\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x6D\x61\x69\x6E\x2D\x63\x6F\x6C\x6F\x72\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x24\x28\x27\x23\x6C\x6F\x67\x27\x29\x2E\x68\x74\x6D\x6C\x28\x27\x27\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x6C\x65\x66\x74\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x43\x6C\x65\x61\x72\x20\x6C\x69\x73\x74\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x74\x72\x61\x73\x68\x20\x66\x61\x2D\x32\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x61\x3E","\x23\x6C\x6F\x67\x54\x69\x74\x6C\x65","\x64\x69\x73\x61\x62\x6C\x65","\x23\x6C\x61\x73\x74\x49\x50\x42\x74\x6E","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x61\x67\x61\x72\x2E\x69\x6F\x2F\x3F\x72\x3D","\x26\x6D\x3D","\x26\x73\x65\x61\x72\x63\x68\x3D\x77\x73\x73\x3A\x2F\x2F","\x23\x63\x6F\x70\x79\x49\x50\x42\x74\x6E","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x61\x67\x61\x72\x2E\x69\x6F\x2F\x3F\x73\x69\x70\x3D","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x61\x67\x61\x72\x2E\x69\x6F\x2F\x70\x6C\x61\x79\x3F\x73\x69\x70\x3D","\x26\x3F\x70\x61\x73\x73\x3D","\x66\x6F\x63\x75\x73","\x23\x63\x6C\x6F\x73\x65\x42\x74\x6E","\x23\x30\x30\x30\x30\x36\x36","\x4E\x69\x63\x6B\x6E\x61\x6D\x65\x20\x72\x65\x73\x65\x72\x76\x65\x64\x20\x66\x6F\x72\x20\x3C\x66\x6F\x6E\x74\x20\x63\x6F\x6C\x6F\x72\x3D\x27\x79\x65\x6C\x6C\x6F\x77\x27\x3E\x3C\x62\x3E\x41\x6E\x69\x6D\x61\x74\x65\x64\x20\x53\x6B\x69\x6E\x73\x3C\x2F\x66\x6F\x6E\x74\x3E\x3C\x2F\x62\x3E","\x3A\x3C\x62\x72\x3E","\x45\x61\x73\x74\x65\x72\x45\x67\x67\x31","\x45\x61\x73\x74\x65\x72\x20\x45\x67\x67","\x45\x61\x73\x74\x65\x72\x45\x67\x67\x32","\x45\x61\x73\x74\x65\x72\x45\x67\x67\x33","\x2C\x3C\x62\x72\x3E","\x3C\x61\x20\x74\x61\x72\x67\x65\x74\x3D\x22\x5F\x62\x6C\x61\x6E\x6B\x22\x20\x68\x72\x65\x66\x3D\x22\x68\x74\x74\x70\x73\x3A\x2F\x2F\x67\x69\x74\x68\x75\x62\x2E\x63\x6F\x6D\x2F\x6A\x69\x6D\x62\x6F\x79\x33\x31\x30\x30\x22\x3E\x68\x74\x74\x70\x73\x3A\x2F\x2F\x67\x69\x74\x68\x75\x62\x2E\x63\x6F\x6D\x2F\x6A\x69\x6D\x62\x6F\x79\x33\x31\x30\x30\x3C\x2F\x61\x3E","\x56\x69\x64\x65\x6F","\x77\x68\x69\x63\x68","\x69\x6E\x70\x75\x74\x3A\x66\x6F\x63\x75\x73","\x70\x61\x73\x73\x3D","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x74\x61\x6C\x6B\x79\x2E\x69\x6F\x2F","\x39\x35\x2E\x35\x70\x78","\x31\x37\x31\x70\x78","\x23\x30\x30\x33\x33\x30\x30","\x2E\x62\x74\x6E\x2E\x62\x74\x6E\x2D\x62\x6C\x6F\x63\x6B\x2E\x62\x74\x6E\x2D\x73\x75\x63\x63\x65\x73\x73\x2E\x62\x74\x6E\x2D\x65\x78\x70\x6F\x72\x74","\x4E\x4F\x4E\x45","\x67\x65\x74\x44\x61\x74\x65","\x67\x65\x74\x4D\x6F\x6E\x74\x68","\x67\x65\x74\x46\x75\x6C\x6C\x59\x65\x61\x72","\x67\x65\x74\x48\x6F\x75\x72\x73","\x67\x65\x74\x4D\x69\x6E\x75\x74\x65\x73","\x50\x61\x72\x74\x79\x2D","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x41\x4E\x3F","\x41\x49\x44\x3D","\x26\x4E\x69\x63\x6B\x3D","\x26\x44\x61\x74\x65\x3D","\x26\x73\x69\x70\x3D","\x26\x70\x77\x64\x3D","\x26\x6D\x6F\x64\x65\x3D","\x26\x72\x65\x67\x69\x6F\x6E\x3D","\x26\x55\x49\x44\x3D","\x26\x6C\x61\x73\x74\x6E\x61\x6D\x65\x3D","\x26\x66\x69\x72\x73\x74\x6E\x61\x6D\x65\x3D","\x26\x6A\x6F\x69\x6E\x3D\x55\x72\x6C","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x6C\x6F\x61\x64\x65\x72\x49\x66\x72\x61\x6D\x65\x49\x6E\x66\x6F\x31\x22\x3E\x3C\x69\x66\x72\x61\x6D\x65\x20\x69\x64\x3D\x22\x6C\x6F\x61\x64\x65\x72\x49\x66\x72\x61\x6D\x65\x49\x6E\x66\x6F\x22\x20\x73\x72\x63\x20\x3D\x20","\x20\x6E\x61\x6D\x65\x3D\x22\x64\x65\x74\x61\x69\x6C\x65\x64\x69\x6E\x66\x6F\x22\x20\x61\x6C\x6C\x6F\x77\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x63\x79\x3D\x22\x74\x72\x75\x65\x22\x20\x73\x63\x72\x6F\x6C\x6C\x69\x6E\x67\x3D\x22\x6E\x6F\x22\x20\x66\x72\x61\x6D\x65\x42\x6F\x72\x64\x65\x72\x3D\x22\x30\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x77\x69\x64\x74\x68\x3A\x30\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x30\x25\x3B\x20\x62\x6F\x72\x64\x65\x72\x3A\x6E\x6F\x6E\x65\x3B\x22\x3E\x3C\x2F\x69\x66\x72\x61\x6D\x65\x3E\x3C\x2F\x64\x69\x76\x3E","\x23\x6C\x6F\x61\x64\x65\x72\x49\x66\x72\x61\x6D\x65\x49\x6E\x66\x6F\x31","\x46\x72\x65\x73\x6B\x69\x6E\x73\x4D\x61\x70","\x46\x72\x65\x65\x53\x6B\x69\x6E\x73","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x63\x6F\x6E\x66\x69\x67\x73\x2D\x77\x65\x62\x2E\x61\x67\x61\x72\x69\x6F\x2E\x6D\x69\x6E\x69\x63\x6C\x69\x70\x70\x74\x2E\x63\x6F\x6D\x2F\x6C\x69\x76\x65\x2F","\x61\x67\x61\x72\x76\x65\x72\x73\x69\x6F\x6E","\x69\x6D\x61\x67\x65","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x61\x67\x61\x72\x69\x6F\x2F\x6C\x69\x76\x65\x2F\x66\x6C\x61\x67\x73\x2F","\x2E\x70\x6E\x67","\x23\x6C\x6F\x61\x64\x65\x72\x49\x66\x72\x61\x6D\x65\x49\x6E\x66\x6F","\x54\x65\x6D\x70\x6F\x72\x61\x72\x69\x6C\x79\x20\x48\x69\x64\x65\x2F\x53\x68\x6F\x77\x20\x45\x76\x65\x72\x79\x74\x68\x69\x6E\x67\x2E\x20\x46\x75\x6E\x63\x74\x69\x6F\x6E\x20\x66\x6F\x72\x20\x59\x6F\x75\x74\x75\x62\x65\x72\x73","\x23\x73\x68\x6F\x72\x74\x63\x75\x74\x73\x2D\x68\x75\x64","\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x70\x75\x7A\x7A\x6C\x65\x2D\x70\x69\x65\x63\x65\x22\x3E\x3C\x2F\x69\x3E","\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x67\x61\x6D\x65\x70\x61\x64\x22\x3E\x3C\x2F\x69\x3E","\x2E\x69\x6E\x70\x75\x74\x2D\x67\x72\x6F\x75\x70\x2D\x61\x64\x64\x6F\x6E\x2C\x23\x63\x68\x61\x74\x2D\x62\x6F\x78\x2C\x20\x2E\x69\x6E\x70\x75\x74\x2D\x67\x72\x6F\x75\x70\x2D\x73\x6D\x3E\x2E\x69\x6E\x70\x75\x74\x2D\x67\x72\x6F\x75\x70\x2D\x61\x64\x64\x6F\x6E\x2C\x20\x2E\x61\x67\x61\x72\x69\x6F\x2D\x70\x61\x72\x74\x79\x2C\x20\x2E\x61\x67\x61\x72\x69\x6F\x2D\x73\x69\x64\x65\x2D\x70\x61\x6E\x65\x6C\x7B\x62\x6F\x72\x64\x65\x72\x2D\x72\x61\x64\x69\x75\x73\x3A\x20\x31\x30\x70\x78\x3B\x7D\x2E\x6D\x65\x6E\x75\x2D\x74\x61\x62\x73\x2C","\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x6D\x69\x6E\x75\x73\x22\x3E\x3C\x2F\x69\x3E","\x2E\x69\x6E\x70\x75\x74\x2D\x67\x72\x6F\x75\x70\x2D\x61\x64\x64\x6F\x6E\x2C\x23\x63\x68\x61\x74\x2D\x62\x6F\x78\x2C\x20\x2E\x69\x6E\x70\x75\x74\x2D\x67\x72\x6F\x75\x70\x2D\x73\x6D\x3E\x2E\x69\x6E\x70\x75\x74\x2D\x67\x72\x6F\x75\x70\x2D\x61\x64\x64\x6F\x6E\x2C\x20\x2E\x61\x67\x61\x72\x69\x6F\x2D\x70\x61\x72\x74\x79\x2C\x20\x2E\x61\x67\x61\x72\x69\x6F\x2D\x73\x69\x64\x65\x2D\x70\x61\x6E\x65\x6C\x2C\x20\x2E\x6D\x65\x6E\x75\x2D\x74\x61\x62\x73\x2C","\x23\x6D\x61\x69\x6E\x2D\x70\x61\x6E\x65\x6C\x2C\x20\x23\x70\x72\x6F\x66\x69\x6C\x65\x2C\x20\x23\x6C\x65\x67\x65\x6E\x64\x2C\x20\x23\x6F\x67\x2D\x73\x65\x74\x74\x69\x6E\x67\x73\x2C\x20\x23\x74\x68\x65\x6D\x65\x2C\x20\x23\x6D\x75\x73\x69\x63\x2C\x20\x23\x68\x6F\x74\x6B\x65\x79\x73\x2C\x20\x20\x23\x68\x6F\x74\x6B\x65\x79\x73\x2C\x20\x2E\x73\x6B\x69\x6E\x2C\x20\x2E\x69\x6E\x70\x75\x74\x2D\x67\x72\x6F\x75\x70\x2D\x62\x74\x6E\x2C\x20\x2E\x69\x6E\x70\x75\x74\x2D\x67\x72\x6F\x75\x70\x2E\x6E\x69\x63\x6B\x2C\x20\x20","\x2E\x63\x6F\x6C\x6F\x72\x70\x69\x63\x6B\x65\x72\x2D\x65\x6C\x65\x6D\x65\x6E\x74\x20\x2E\x69\x6E\x70\x75\x74\x2D\x67\x72\x6F\x75\x70\x2D\x61\x64\x64\x6F\x6E\x20\x69\x2C\x20\x2E\x63\x6F\x6C\x6F\x72\x70\x69\x63\x6B\x65\x72\x2D\x65\x6C\x65\x6D\x65\x6E\x74\x20\x2E\x61\x64\x64\x2D\x6F\x6E\x20\x69\x2C\x20\x2E\x61\x67\x61\x72\x69\x6F\x2D\x70\x72\x6F\x66\x69\x6C\x65\x2D\x70\x69\x63\x74\x75\x72\x65\x2C","\x23\x6D\x65\x6E\x75\x2D\x66\x6F\x6F\x74\x65\x72\x2C\x20\x23\x6C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x2D\x68\x75\x64\x2C\x20\x23\x64\x72\x6F\x70\x44\x6F\x77\x6E\x2C\x20\x23\x64\x72\x6F\x70\x44\x6F\x77\x6E\x32\x2C\x20\x23\x6D\x69\x6E\x69\x6D\x61\x70\x2D\x68\x75\x64\x2C","\x23\x74\x6F\x70\x35\x2D\x68\x75\x64\x2C\x20\x23\x74\x61\x72\x67\x65\x74\x2D\x68\x75\x64\x2C\x20\x23\x6C\x65\x67\x65\x6E\x64\x41\x64\x49\x6D\x67\x2C\x20\x23\x73\x74\x61\x74\x73\x2D\x68\x75\x64\x2C\x20","\x23\x74\x69\x6D\x65\x2D\x68\x75\x64\x20\x7B\x20\x62\x6F\x72\x64\x65\x72\x2D\x72\x61\x64\x69\x75\x73\x3A\x20\x30\x20\x30\x20\x30\x20\x30\x20\x7D\x20\x3C\x2F\x73\x74\x79\x6C\x65\x3E","\x3C\x73\x74\x79\x6C\x65\x20\x74\x79\x70\x65\x3D\x22\x74\x65\x78\x74\x2F\x63\x73\x73\x22\x20\x69\x64\x3D\x22\x4D\x47\x78\x22\x3E\x09","\x23\x74\x6F\x70\x35\x2D\x68\x75\x64\x7B\x74\x6F\x70\x3A\x31\x30\x70\x78\x21\x69\x6D\x70\x6F\x72\x74\x61\x6E\x74\x3B\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x3A\x6C\x69\x6E\x65\x61\x72\x2D\x67\x72\x61\x64\x69\x65\x6E\x74\x28\x74\x6F\x20\x72\x69\x67\x68\x74\x2C","\x23\x68\x75\x64\x43\x6F\x6C\x6F\x72","\x2C\x72\x67\x62\x61\x28\x32\x35\x35\x2C\x32\x35\x35\x2C\x32\x35\x35\x2C\x30\x29\x29\x7D","\x23\x6C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x2D\x68\x75\x64\x7B\x74\x6F\x70\x3A\x31\x30\x70\x78\x21\x69\x6D\x70\x6F\x72\x74\x61\x6E\x74\x3B\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x3A\x6C\x69\x6E\x65\x61\x72\x2D\x67\x72\x61\x64\x69\x65\x6E\x74\x28\x74\x6F\x20\x6C\x65\x66\x74\x2C","\x23\x63\x68\x61\x74\x2D\x62\x6F\x78\x7B\x69\x6D\x70\x6F\x72\x74\x61\x6E\x74\x3B\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x3A\x6C\x69\x6E\x65\x61\x72\x2D\x67\x72\x61\x64\x69\x65\x6E\x74\x28\x74\x6F\x20\x72\x69\x67\x68\x74\x2C","\x23\x6D\x69\x6E\x69\x6D\x61\x70\x2D\x68\x75\x64\x2C\x23\x74\x69\x6D\x65\x72\x74\x6F\x6F\x6C\x73\x2D\x68\x75\x64\x2C\x20\x23\x73\x68\x6F\x72\x74\x63\x75\x74\x73\x2D\x68\x75\x64\x2C\x20\x23\x74\x69\x6D\x65\x2D\x68\x75\x64\x2C\x23\x6D\x73\x67\x63\x6F\x6D\x6D\x61\x6E\x64\x73\x2D\x68\x75\x64\x2C\x20\x23\x73\x63\x72\x69\x70\x74\x69\x6E\x67\x2D\x68\x75\x64\x2C\x20\x23\x69\x6D\x61\x67\x65\x73\x2D\x68\x75\x64\x2C\x20\x23\x79\x74\x2D\x68\x75\x64\x7B\x69\x6D\x70\x6F\x72\x74\x61\x6E\x74\x3B\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x3A\x6C\x69\x6E\x65\x61\x72\x2D\x67\x72\x61\x64\x69\x65\x6E\x74\x28\x74\x6F\x20\x6C\x65\x66\x74\x2C","\x23\x74\x61\x72\x67\x65\x74\x2D\x68\x75\x64\x2C\x23\x74\x61\x72\x67\x65\x74\x2D\x70\x61\x6E\x65\x6C\x2D\x68\x75\x64\x20\x7B\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x3A\x6C\x69\x6E\x65\x61\x72\x2D\x67\x72\x61\x64\x69\x65\x6E\x74\x28\x74\x6F\x20\x62\x6F\x74\x74\x6F\x6D\x2C","\x23\x73\x74\x61\x74\x73\x2D\x68\x75\x64\x7B\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x3A\x6C\x69\x6E\x65\x61\x72\x2D\x67\x72\x61\x64\x69\x65\x6E\x74\x28\x74\x6F\x20\x74\x6F\x70\x2C","\x23\x73\x74\x61\x74\x73\x2D\x68\x75\x64\x7B\x6C\x65\x66\x74\x3A\x20\x35\x30\x25\x21\x69\x6D\x70\x6F\x72\x74\x61\x6E\x74\x3B\x20\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x20\x74\x72\x61\x6E\x73\x6C\x61\x74\x65\x58\x28\x2D\x35\x30\x25\x29\x21\x69\x6D\x70\x6F\x72\x74\x61\x6E\x74\x3B\x20\x74\x65\x78\x74\x2D\x61\x6C\x69\x67\x6E\x3A\x20\x63\x65\x6E\x74\x65\x72\x3B\x7D","\x2E\x68\x75\x64\x2D\x74\x6F\x70\x7B\x74\x6F\x70\x3A\x20\x39\x33\x25\x21\x69\x6D\x70\x6F\x72\x74\x61\x6E\x74\x3B\x7D","\x23\x63\x68\x61\x74\x2D\x62\x6F\x78\x7B\x62\x6F\x74\x74\x6F\x6D\x3A\x20\x32\x25\x21\x69\x6D\x70\x6F\x72\x74\x61\x6E\x74\x3B\x7D","\x3C\x2F\x73\x74\x79\x6C\x65\x3E","\x23\x4D\x47\x78","\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x67\x72\x61\x76\x22\x3E\x3C\x2F\x69\x3E","\x23\x74\x69\x6D\x65\x72\x74\x6F\x6F\x6C\x73\x2D\x68\x75\x64","\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x63\x61\x6C\x63\x75\x6C\x61\x74\x6F\x72\x22\x3E\x3C\x2F\x69\x3E","\x74\x69\x6D\x65\x72","\x23\x74\x69\x6D\x65\x2D\x68\x75\x64","\x23\x73\x74\x61\x74\x73\x2D\x68\x75\x64","\x23\x74\x61\x72\x67\x65\x74\x2D\x68\x75\x64","\x23\x74\x61\x72\x67\x65\x74\x2D\x70\x61\x6E\x65\x6C\x2D\x68\x75\x64","\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x65\x78\x63\x6C\x61\x6D\x61\x74\x69\x6F\x6E\x2D\x74\x72\x69\x61\x6E\x67\x6C\x65\x22\x3E\x3C\x2F\x69\x3E","\x23\x75\x73\x65\x72\x73\x63\x72\x69\x70\x74\x73","\x23\x4F\x70\x65\x6E\x75\x73\x65\x72\x53\x63\x72\x69\x70\x74\x73","\x3C\x64\x69\x76\x20\x63\x6C\x61\x73\x73\x3D\x22\x61\x67\x61\x72\x69\x6F\x2D\x70\x61\x6E\x65\x6C\x20\x6F\x67\x61\x72\x69\x6F\x2D\x79\x74\x2D\x70\x61\x6E\x65\x6C\x22\x3E\x3C\x68\x36\x20\x63\x6C\x61\x73\x73\x3D\x22\x6D\x65\x6E\x75\x2D\x6D\x61\x69\x6E\x2D\x63\x6F\x6C\x6F\x72\x22\x3E\x3C\x69\x3E\x3C\x2F\x69\x3E\x3C\x2F\x68\x36\x3E\x3C\x2F\x64\x69\x76\x3E","\x3C\x73\x70\x61\x6E\x20\x73\x74\x79\x6C\x65\x3D\x22\x66\x6C\x6F\x61\x74\x3A\x20\x6C\x65\x66\x74\x3B\x20\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x20\x31\x33\x70\x78\x3B\x22\x3E\x3C\x61\x20\x74\x61\x72\x67\x65\x74\x3D\x22\x5F\x62\x6C\x61\x6E\x6B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x67\x61\x28\x27\x73\x65\x6E\x64\x27\x2C\x20\x27\x65\x76\x65\x6E\x74\x27\x2C\x20\x27\x4C\x69\x6E\x6B\x27\x2C\x20\x27\x63\x6C\x69\x63\x6B\x27\x2C\x20\x27\x6C\x65\x67\x65\x6E\x64\x57\x65\x62\x73\x69\x74\x65\x27\x29\x3B\x22\x20\x68\x72\x65\x66\x3D\x22\x68\x74\x74\x70\x73\x3A\x2F\x2F\x77\x77\x77\x2E\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x66\x66\x66\x66\x66\x66\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x74\x69\x74\x6C\x65\x3D\x22\x57\x65\x62\x73\x69\x74\x65\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x6C\x65\x66\x74\x22\x3E\x76","\x3C\x2F\x61\x3E\x3C\x2F\x73\x70\x61\x6E\x3E\x3C\x73\x70\x61\x6E\x20\x73\x74\x79\x6C\x65\x3D\x22\x66\x6C\x6F\x61\x74\x3A\x20\x6C\x65\x66\x74\x3B\x20\x20\x6D\x61\x72\x67\x69\x6E\x2D\x6C\x65\x66\x74\x3A\x20\x38\x30\x70\x78\x3B\x20\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x20\x31\x33\x70\x78\x3B\x22\x3E\x3C\x61\x20\x69\x64\x3D\x22\x4D\x6F\x72\x65\x66\x70\x73\x54\x65\x78\x74\x22\x20\x68\x72\x65\x66\x3D\x22\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x3F\x6E\x61\x76\x3D\x46\x50\x53\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x74\x69\x74\x6C\x65\x3D\x22\x48\x6F\x77\x20\x74\x6F\x20\x69\x6D\x70\x72\x6F\x76\x65\x20\x70\x65\x72\x66\x6F\x72\x6D\x61\x6E\x63\x65\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x74\x6F\x70\x22\x20\x73\x74\x79\x6C\x65\x20\x3D\x22\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x20\x31\x33\x70\x78\x22\x3B\x20\x74\x61\x72\x67\x65\x74\x3D\x22\x5F\x62\x6C\x61\x6E\x6B\x22\x3E\x4D\x6F\x72\x65\x20\x46\x50\x53\x3C\x2F\x61\x3E\x3C\x2F\x73\x70\x61\x6E\x3E","\x3C\x73\x70\x61\x6E\x20\x73\x74\x79\x6C\x65\x3D\x22\x66\x6C\x6F\x61\x74\x3A\x20\x72\x69\x67\x68\x74\x3B\x20\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x20\x31\x33\x70\x78\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x31\x30\x70\x78\x3B\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x2D\x32\x70\x78\x22\x3E\x3C\x66\x6F\x72\x6D\x20\x69\x64\x3D\x22\x64\x6F\x6E\x61\x74\x69\x6F\x6E\x62\x74\x6E\x22\x20\x61\x63\x74\x69\x6F\x6E\x3D\x22\x68\x74\x74\x70\x73\x3A\x2F\x2F\x77\x77\x77\x2E\x70\x61\x79\x70\x61\x6C\x2E\x63\x6F\x6D\x2F\x63\x67\x69\x2D\x62\x69\x6E\x2F\x77\x65\x62\x73\x63\x72\x22\x20\x6D\x65\x74\x68\x6F\x64\x3D\x22\x70\x6F\x73\x74\x22\x20\x74\x61\x72\x67\x65\x74\x3D\x22\x5F\x74\x6F\x70\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x6C\x65\x66\x74\x22\x20\x74\x61\x72\x67\x65\x74\x3D\x22\x5F\x62\x6C\x61\x6E\x6B\x22\x3E\x3C\x69\x6E\x70\x75\x74\x20\x74\x79\x70\x65\x3D\x22\x68\x69\x64\x64\x65\x6E\x22\x20\x6E\x61\x6D\x65\x3D\x22\x63\x6D\x64\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x5F\x73\x2D\x78\x63\x6C\x69\x63\x6B\x22\x3E\x3C\x69\x6E\x70\x75\x74\x20\x74\x79\x70\x65\x3D\x22\x68\x69\x64\x64\x65\x6E\x22\x20\x6E\x61\x6D\x65\x3D\x22\x68\x6F\x73\x74\x65\x64\x5F\x62\x75\x74\x74\x6F\x6E\x5F\x69\x64\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x43\x4D\x33\x47\x44\x56\x43\x57\x36\x50\x42\x46\x36\x22\x3E\x3C\x69\x6E\x70\x75\x74\x20\x74\x79\x70\x65\x3D\x22\x69\x6D\x61\x67\x65\x22\x20\x73\x72\x63\x3D\x22\x68\x74\x74\x70\x73\x3A\x2F\x2F\x77\x77\x77\x2E\x70\x61\x79\x70\x61\x6C\x6F\x62\x6A\x65\x63\x74\x73\x2E\x63\x6F\x6D\x2F\x65\x6E\x5F\x55\x53\x2F\x69\x2F\x62\x74\x6E\x2F\x62\x74\x6E\x5F\x64\x6F\x6E\x61\x74\x65\x5F\x53\x4D\x2E\x67\x69\x66\x22\x20\x62\x6F\x72\x64\x65\x72\x3D\x22\x30\x22\x20\x6E\x61\x6D\x65\x3D\x22\x73\x75\x62\x6D\x69\x74\x22\x20\x61\x6C\x74\x3D\x22\x50\x61\x79\x50\x61\x6C\x20\x2D\x20\x54\x68\x65\x20\x73\x61\x66\x65\x72\x2C\x20\x65\x61\x73\x69\x65\x72\x20\x77\x61\x79\x20\x74\x6F\x20\x70\x61\x79\x20\x6F\x6E\x6C\x69\x6E\x65\x21\x22\x3E\x3C\x69\x6D\x67\x20\x61\x6C\x74\x3D\x22\x22\x20\x62\x6F\x72\x64\x65\x72\x3D\x22\x30\x22\x20\x73\x72\x63\x3D\x22\x68\x74\x74\x70\x73\x3A\x2F\x2F\x77\x77\x77\x2E\x70\x61\x79\x70\x61\x6C\x6F\x62\x6A\x65\x63\x74\x73\x2E\x63\x6F\x6D\x2F\x65\x6E\x5F\x55\x53\x2F\x69\x2F\x73\x63\x72\x2F\x70\x69\x78\x65\x6C\x2E\x67\x69\x66\x22\x20\x77\x69\x64\x74\x68\x3D\x22\x31\x22\x20\x68\x65\x69\x67\x68\x74\x3D\x22\x31\x22\x3E\x3C\x2F\x66\x6F\x72\x6D\x3E\x3C\x2F\x73\x70\x61\x6E\x3E","\x23\x54\x69\x6D\x65\x73\x55\x73\x65\x64","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x53\x4E\x45\x5A\x4F\x67\x61\x72\x55\x70\x6C\x6F\x61\x64\x42\x74\x6E\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x53\x4E\x45\x5A\x4F\x67\x61\x72\x55\x70\x6C\x6F\x61\x64\x28\x29\x3B\x20\x72\x65\x74\x75\x72\x6E\x20\x66\x61\x6C\x73\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x72\x69\x67\x68\x74\x3A\x20\x32\x35\x70\x78\x3B\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x73\x75\x63\x63\x65\x73\x73\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x22\x20\x74\x69\x74\x6C\x65\x3D\x22\x22\x3E","\x23\x63\x6C\x6F\x73\x65\x2D\x65\x78\x70\x2D\x69\x6D\x70","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x53\x4E\x45\x5A\x4F\x67\x61\x72\x44\x6F\x77\x6E\x6C\x6F\x61\x64\x42\x74\x6E\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x53\x4E\x45\x5A\x4F\x67\x61\x72\x44\x6F\x77\x6E\x6C\x6F\x61\x64\x28\x29\x3B\x20\x72\x65\x74\x75\x72\x6E\x20\x66\x61\x6C\x73\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x72\x69\x67\x68\x74\x3A\x20\x32\x35\x70\x78\x3B\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x73\x75\x63\x63\x65\x73\x73\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x22\x20\x74\x69\x74\x6C\x65\x3D\x22\x22\x3E","\x3C\x62\x72\x3E\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x55\x73\x65\x72\x50\x72\x6F\x66\x69\x6C\x65\x55\x49\x44\x32\x22\x3E\x53\x6F\x63\x69\x61\x6C\x20\x49\x44\x3A\x20\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x55\x73\x65\x72\x50\x72\x6F\x66\x69\x6C\x65\x49\x44\x32\x61\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x75\x73\x65\x72\x2D\x6E\x61\x6D\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x64\x69\x73\x70\x6C\x61\x79\x3A\x69\x6E\x6C\x69\x6E\x65\x2D\x62\x6C\x6F\x63\x6B\x22\x3E\x3C\x2F\x64\x69\x76\x3E","\x5B\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x5D","\x44\x4F\x4D\x4E\x6F\x64\x65\x49\x6E\x73\x65\x72\x74\x65\x64","\x6C\x61\x73\x74","\x2E\x6D\x65\x73\x73\x61\x67\x65\x2D\x6E\x69\x63\x6B","\x44\x4F\x4D\x53\x75\x62\x74\x72\x65\x65\x4D\x6F\x64\x69\x66\x69\x65\x64","\x53\x65\x72\x76\x65\x72\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64\x21","\x4E\x6F\x54\x65\x78\x74","\x2E\x6C\x6F\x67\x45\x6E\x74\x72\x79","\x50\x6C\x61\x79\x65\x72\x20\x3C\x66\x6F\x6E\x74\x20\x63\x6F\x6C\x6F\x72\x3D\x27\x79\x65\x6C\x6C\x6F\x77\x27\x3E","\x2E\x6C\x6F\x67\x45\x6E\x74\x72\x79\x3E\x23\x70\x6C\x61\x79\x65\x72\x69\x6E\x66\x6F","\x3C\x2F\x66\x6F\x6E\x74\x3E\x20\x63\x6F\x6E\x74\x61\x69\x6E\x73\x20\x3C\x66\x6F\x6E\x74\x20\x63\x6F\x6C\x6F\x72\x3D\x27\x79\x65\x6C\x6C\x6F\x77\x27\x3E","\x21\x3C\x2F\x66\x6F\x6E\x74\x3E\x2E\x20\x43\x6F\x6E\x6E\x65\x63\x74\x65\x64\x20\x69\x6E\x74\x6F\x20\x53\x65\x72\x76\x65\x72","\x61\x75\x74\x6F\x50\x6C\x61\x79","\x4C\x4D\x20\x41\x75\x74\x6F\x70\x6C\x61\x79","\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x35","\x76\x69\x64\x65\x6F\x53\x6B\x69\x6E\x73","\x6A\x65\x6C\x6C\x79\x50\x68\x69\x73\x79\x63\x73","\x72\x61\x69\x6E\x62\x6F\x77\x46\x6F\x6F\x64","\x76\x69\x72\x75\x73\x47\x6C\x6F\x77","\x62\x6F\x72\x64\x65\x72\x47\x6C\x6F\x77","\x73\x68\x6F\x77\x42\x67\x53\x65\x63\x74\x6F\x72\x73","\x73\x68\x6F\x77\x4D\x61\x70\x42\x6F\x72\x64\x65\x72\x73","\x73\x68\x6F\x77\x4D\x69\x6E\x69\x4D\x61\x70\x47\x68\x6F\x73\x74\x43\x65\x6C\x6C\x73","\x73\x68\x6F\x77\x45\x78\x74\x72\x61\x4D\x69\x6E\x69\x4D\x61\x70\x47\x75\x69\x64\x65\x73","\x6F\x70\x70\x43\x6F\x6C\x6F\x72\x73","\x6F\x70\x70\x52\x69\x6E\x67\x73","\x76\x69\x72\x43\x6F\x6C\x6F\x72\x73","\x73\x70\x6C\x69\x74\x52\x61\x6E\x67\x65","\x76\x69\x72\x75\x73\x65\x73\x52\x61\x6E\x67\x65","\x74\x65\x61\x6D\x6D\x61\x74\x65\x73\x49\x6E\x64","\x73\x68\x6F\x77\x47\x68\x6F\x73\x74\x43\x65\x6C\x6C\x73","\x73\x68\x6F\x77\x47\x68\x6F\x73\x74\x43\x65\x6C\x6C\x73\x49\x6E\x66\x6F","\x73\x68\x6F\x77\x43\x68\x61\x74\x49\x6D\x61\x67\x65\x73","\x73\x68\x6F\x77\x43\x68\x61\x74\x56\x69\x64\x65\x6F\x73","\x63\x68\x61\x74\x53\x6F\x75\x6E\x64\x73","\x73\x70\x61\x77\x6E\x73\x70\x65\x63\x69\x61\x6C\x65\x66\x66\x65\x63\x74\x73","\x61\x75\x74\x6F\x52\x65\x73\x70","\x65\x71","\x2E\x6C\x6F\x67\x45\x6E\x74\x72\x79\x3E\x23\x72\x65\x67\x69\x6F\x6E\x69\x6E\x66\x6F","\x2E\x6C\x6F\x67\x45\x6E\x74\x72\x79\x3E\x23\x6D\x6F\x64\x65\x69\x6E\x66\x6F","\x6F\x70\x74\x69\x6F\x6E","\x66\x69\x6E\x64","\x3A\x62\x61\x74\x74\x6C\x65\x72\x6F\x79\x61\x6C\x65","\x20\x70\x6C\x61\x79\x65\x72\x28\x73\x29\x20\x77\x69\x73\x70\x65\x72\x65\x64\x20\x69\x74\x20\x69\x73\x3A","\x20\x70\x6C\x61\x79\x65\x72\x28\x73\x29\x20\x77\x69\x73\x70\x65\x72\x65\x64\x20\x69\x74\x20\x69\x73","\x3C\x66\x6F\x6E\x74\x20\x63\x6F\x6C\x6F\x72\x3D\x27\x79\x65\x6C\x6C\x6F\x77\x27\x3E\x42\x65\x73\x74\x20\x63\x68\x6F\x69\x63\x65\x3A\x20\x52\x65\x67\x69\x6F\x6E\x3A","\x2C\x20\x4D\x6F\x64\x65","\x3C\x2F\x66\x6F\x6E\x74\x3E\x3C\x62\x72\x3E","\x49\x6E\x66\x6F\x72\x6D\x61\x74\x69\x6F\x6E\x20\x63\x68\x61\x6E\x67\x65\x64\x21","\x72\x65\x67\x69\x6F\x6E","\x6D\x75\x73\x69\x63\x46\x72\x61\x6D\x65","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x4C\x4D\x65\x78\x70\x72\x65\x73\x73\x2F\x6F\x6C\x64\x64\x65\x61\x6C\x73\x2E\x6A\x73","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x4C\x4D\x65\x78\x70\x72\x65\x73\x73\x2F\x73\x68\x6F\x70\x2F\x73\x68\x6F\x70\x2E\x6A\x73","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x4C\x4D\x65\x78\x70\x72\x65\x73\x73\x2F\x72\x65\x70\x6C\x61\x79\x2E\x6A\x73","\x67\x65\x74\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79\x4E\x61\x6D\x65\x73","\x61\x67\x61\x72\x76\x65\x72\x73\x69\x6F\x6E\x44\x65\x73\x74\x69\x6E\x61\x74\x69\x6F\x6E\x46\x6F\x75\x6E\x64","\x61\x67\x61\x72\x76\x65\x72\x73\x69\x6F\x6E\x44\x65\x73\x74\x69\x6E\x61\x74\x69\x6F\x6E\x73","\x4C\x4D\x43\x6F\x6E\x66\x69\x67\x56\x65\x72\x73\x69\x6F\x6E","\x4C\x4D\x43\x6F\x6E\x66\x69\x67\x56\x65\x72\x73\x69\x6F\x6E\x50\x61\x73\x73","\x66\x75\x6E\x63\x74\x69\x6F\x6E","\x6F\x62\x6A\x65\x63\x74","\x62\x61\x6E\x6E\x65\x64\x55\x49\x44","\x48\x53\x4C\x4F\x5B\x53\x61\x69\x67\x6F\x5D\x3A\x73\x65\x74\x74\x69\x6E\x67\x73","\x6C\x62\x54\x65\x61\x6D\x6D\x61\x74\x65\x43\x6F\x6C\x6F\x72","\x59\x6F\x75\x20\x61\x72\x65\x20\x62\x61\x6E\x6E\x65\x64\x20\x66\x72\x6F\x6D\x20\x4C\x65\x67\x65\x6E\x64\x20\x6D\x6F\x64","\x20\x3C\x62\x72\x3E\x3C\x61\x20\x74\x61\x72\x67\x65\x74\x3D\x22\x5F\x62\x6C\x61\x6E\x6B\x22\x20\x68\x72\x65\x66\x3D\x22\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x22\x3E\x3C\x66\x6F\x6E\x74\x20\x63\x6F\x6C\x6F\x72\x3D\x22\x62\x6C\x75\x65\x22\x3E\x3C\x62\x3E\x3C\x75\x3E\x77\x77\x77\x2E\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x3C\x2F\x75\x3E\x3C\x2F\x62\x3E\x3C\x2F\x66\x6F\x6E\x74\x3E\x3C\x2F\x61\x3E\x3C\x62\x72\x3E","\x53\x63\x72\x69\x70\x74\x20\x54\x65\x72\x6D\x69\x6E\x61\x74\x65\x64","\x4C\x4D\x41\x67\x61\x72\x42\x61\x6E\x6E\x65\x64\x55\x49\x44\x73","\x4C\x4D\x41\x67\x61\x72\x42\x61\x6E\x6E\x65\x64\x55\x49\x44\x73\x50\x61\x73\x73","\x62\x61\x6E\x6E\x65\x64\x55\x73\x65\x72\x55\x49\x44\x73","\x41\x67\x61\x72\x42\x61\x6E\x6E\x65\x64\x55\x49\x44\x73\x41\x64\x64\x65\x64","\x2D","\x73\x70\x6C\x69\x63\x65","\x3C\x64\x69\x76\x20\x63\x6C\x61\x73\x73\x3D\x22\x6D\x6F\x64\x61\x6C\x20\x66\x61\x64\x65\x20\x69\x6E\x22\x20\x69\x64\x3D\x22\x42\x61\x6E\x6E\x65\x64\x55\x49\x44\x53\x4D\x6F\x64\x61\x6C\x22\x20\x61\x72\x69\x61\x2D\x68\x69\x64\x64\x65\x6E\x3D\x22\x66\x61\x6C\x73\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x62\x6C\x6F\x63\x6B\x3B\x22\x3E","\x3C\x64\x69\x76\x20\x63\x6C\x61\x73\x73\x3D\x22\x6D\x6F\x64\x61\x6C\x2D\x62\x61\x63\x6B\x64\x72\x6F\x70\x20\x66\x61\x64\x65\x20\x69\x6E\x22\x3E\x3C\x2F\x64\x69\x76\x3E","\x3C\x64\x69\x76\x20\x63\x6C\x61\x73\x73\x3D\x22\x6D\x6F\x64\x61\x6C\x2D\x64\x69\x61\x6C\x6F\x67\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x74\x6F\x70\x3A\x20\x63\x61\x6C\x63\x28\x35\x30\x76\x68\x20\x2D\x20\x32\x34\x31\x2E\x35\x70\x78\x29\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x35\x30\x30\x70\x78\x3B\x22\x3E","\x3C\x64\x69\x76\x20\x63\x6C\x61\x73\x73\x3D\x22\x6D\x6F\x64\x61\x6C\x2D\x63\x6F\x6E\x74\x65\x6E\x74\x22\x3E","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x43\x6C\x6F\x73\x65\x42\x61\x6E\x6E\x65\x64\x55\x49\x44\x53\x32\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x6D\x6F\x64\x61\x6C\x2D\x68\x65\x61\x64\x65\x72\x22\x3E\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x43\x6C\x6F\x73\x65\x42\x61\x6E\x6E\x65\x64\x55\x49\x44\x53\x22\x20\x74\x79\x70\x65\x3D\x22\x62\x75\x74\x74\x6F\x6E\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x63\x6C\x6F\x73\x65\x22\x20\x64\x61\x74\x61\x2D\x64\x69\x73\x6D\x69\x73\x73\x3D\x22\x6D\x6F\x64\x61\x6C\x22\x3E\x3C\x73\x70\x61\x6E\x20\x61\x72\x69\x61\x2D\x68\x69\x64\x64\x65\x6E\x3D\x22\x74\x72\x75\x65\x22\x3E\xD7\x3C\x2F\x73\x70\x61\x6E\x3E\x3C\x73\x70\x61\x6E\x20\x63\x6C\x61\x73\x73\x3D\x22\x73\x72\x2D\x6F\x6E\x6C\x79\x22\x3E","\x3C\x2F\x73\x70\x61\x6E\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E\x20\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x46\x41\x51\x42\x61\x6E\x6E\x65\x64\x55\x49\x44\x53\x22\x20\x74\x79\x70\x65\x3D\x22\x62\x75\x74\x74\x6F\x6E\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x63\x6C\x6F\x73\x65\x22\x20\x64\x61\x74\x61\x2D\x64\x69\x73\x6D\x69\x73\x73\x3D\x22\x6D\x6F\x64\x61\x6C\x22\x3E\x3C\x73\x70\x61\x6E\x20\x61\x72\x69\x61\x2D\x68\x69\x64\x64\x65\x6E\x3D\x22\x74\x72\x75\x65\x22\x3E\x3F\x3C\x2F\x73\x70\x61\x6E\x3E\x3C\x73\x70\x61\x6E\x20\x63\x6C\x61\x73\x73\x3D\x22\x73\x72\x2D\x6F\x6E\x6C\x79\x22\x3E","\x3C\x2F\x73\x70\x61\x6E\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x68\x34\x20\x63\x6C\x61\x73\x73\x3D\x22\x6D\x6F\x64\x61\x6C\x2D\x74\x69\x74\x6C\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x66\x6F\x6E\x74\x2D\x66\x61\x6D\x69\x6C\x79\x3A\x20\x52\x6F\x62\x6F\x74\x6F\x20\x43\x6F\x6E\x64\x65\x6E\x73\x65\x64\x2C\x20\x73\x61\x6E\x73\x2D\x73\x65\x72\x69\x66\x22\x3E","\x42\x61\x6E\x6E\x65\x64\x20\x55\x73\x65\x72\x20\x49\x44\x73","\x3C\x2F\x68\x34\x3E","\x3C\x64\x69\x76\x20\x63\x6C\x61\x73\x73\x3D\x22\x6D\x6F\x64\x61\x6C\x2D\x62\x6F\x64\x79\x22\x3E\x3C\x69\x6E\x70\x75\x74\x20\x74\x79\x70\x65\x3D\x22\x74\x65\x78\x74\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x69\x64\x3D\x22\x42\x61\x6E\x6E\x65\x64\x61\x67\x61\x72\x69\x6F\x5F\x75\x69\x64\x5F\x69\x6E\x70\x75\x74\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x2A\x55\x49\x44\x20\x28","\x74\x6F\x20\x62\x65\x20\x62\x61\x6E\x6E\x65\x64","\x29\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x77\x69\x64\x74\x68\x3A\x20\x38\x35\x25\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x69\x6E\x6C\x69\x6E\x65\x2D\x62\x6C\x6F\x63\x6B\x22\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x41\x64\x64\x42\x61\x6E\x6E\x65\x64\x55\x49\x44\x22\x20\x74\x79\x70\x65\x3D\x22\x73\x75\x62\x6D\x69\x74\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x70\x72\x69\x6D\x61\x72\x79\x20\x62\x74\x6E\x20\x32\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x62\x6C\x6F\x63\x6B\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x32\x30\x25\x3B\x20\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x34\x70\x78\x20\x30\x70\x78\x20\x36\x70\x78\x3B\x20\x74\x65\x78\x74\x2D\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x20\x63\x61\x70\x69\x74\x61\x6C\x69\x7A\x65\x3B\x22\x3E\x41\x64\x64\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x72\x3E\x3C\x63\x6F\x6C\x6F\x72\x3D\x22\x72\x65\x64\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x64\x69\x73\x70\x6C\x61\x79\x3A\x69\x6E\x6C\x69\x6E\x65\x22\x3E\x20","\x3C\x62\x3E\x42\x61\x6E\x6E\x65\x64\x20\x55\x49\x44\x73\x3A\x3C\x2F\x62\x3E","\x3C\x2F\x63\x6F\x6C\x6F\x72\x3E","\x3C\x62\x72\x3E\x3C\x62\x72\x3E","\x3C\x73\x65\x6C\x65\x63\x74\x20\x69\x64\x3D\x22\x73\x73\x2D\x73\x65\x6C\x65\x63\x74\x2D\x42\x61\x6E\x6E\x65\x64\x55\x49\x44\x53\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x72\x65\x71\x75\x69\x72\x65\x64\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x64\x69\x73\x70\x6C\x61\x79\x3A\x69\x6E\x6C\x69\x6E\x65\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x38\x30\x25\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x2D\x33\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x73\x65\x6C\x65\x63\x74\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x52\x65\x6D\x6F\x76\x65\x42\x61\x6E\x6E\x65\x64\x55\x49\x44\x22\x20\x74\x79\x70\x65\x3D\x22\x73\x75\x62\x6D\x69\x74\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x70\x72\x69\x6D\x61\x72\x79\x20\x62\x74\x6E\x20\x32\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x62\x6C\x6F\x63\x6B\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x32\x30\x25\x3B\x20\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x34\x70\x78\x20\x30\x70\x78\x20\x36\x70\x78\x3B\x20\x74\x65\x78\x74\x2D\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x20\x63\x61\x70\x69\x74\x61\x6C\x69\x7A\x65\x3B\x22\x3E\x52\x65\x6D\x6F\x76\x65\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x70\x20\x63\x6C\x61\x73\x73\x3D\x22\x61\x6C\x65\x72\x74\x2D\x77\x61\x72\x6E\x69\x6E\x67\x20\x74\x65\x78\x74\x2D\x63\x65\x6E\x74\x65\x72\x22\x3E","\x50\x6C\x65\x61\x73\x65\x20\x62\x65\x20\x63\x61\x72\x65\x66\x75\x6C\x20\x77\x69\x74\x68\x20\x74\x68\x65\x20\x55\x49\x44\x73\x2E","\x3C\x62\x72\x3E\x59\x6F\x75\x72\x20\x55\x49\x44\x20\x69\x73\x3A\x20\x3C\x73\x70\x61\x6E\x20\x63\x6C\x61\x73\x73\x3D\x22\x61\x6C\x65\x72\x74\x2D\x73\x75\x63\x63\x65\x73\x73\x22\x20\x69\x64\x3D\x22\x65\x78\x70\x2D\x75\x69\x64\x22\x3E","\x3C\x2F\x73\x70\x61\x6E\x3E\x3C\x2F\x70\x3E","\x23\x42\x61\x6E\x6E\x65\x64\x55\x49\x44\x53\x4D\x6F\x64\x61\x6C","\x23\x43\x6C\x6F\x73\x65\x42\x61\x6E\x6E\x65\x64\x55\x49\x44\x53","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x4C\x4D\x65\x78\x70\x72\x65\x73\x73\x2F\x6F\x6C\x64\x64\x65\x61\x6C\x73\x2E\x68\x74\x6D\x6C","\x23\x46\x41\x51\x42\x61\x6E\x6E\x65\x64\x55\x49\x44\x53","\x23\x42\x61\x6E\x6E\x65\x64\x61\x67\x61\x72\x69\x6F\x5F\x75\x69\x64\x5F\x69\x6E\x70\x75\x74","\x6F\x70\x74\x69\x6F\x6E\x73","\x73\x73\x2D\x73\x65\x6C\x65\x63\x74\x2D\x42\x61\x6E\x6E\x65\x64\x55\x49\x44\x53","\x55\x49\x44\x3A\x20","\x20\x73\x75\x63\x63\x65\x73\x73\x66\x75\x6C\x6C\x79\x20\x61\x64\x64\x65\x64\x20\x6F\x6E\x20\x55\x49\x44\x20\x42\x41\x4E\x20\x6C\x69\x73\x74","\x20\x73\x65\x65\x6D\x73\x20\x6D\x69\x73\x74\x61\x6B\x65\x6E\x20\x6F\x72\x20\x69\x73\x20\x61\x6C\x72\x65\x61\x64\x79\x20\x6F\x6E\x20\x74\x68\x65\x20\x6C\x69\x73\x74","\x23\x41\x64\x64\x42\x61\x6E\x6E\x65\x64\x55\x49\x44","\x23\x73\x73\x2D\x73\x65\x6C\x65\x63\x74\x2D\x42\x61\x6E\x6E\x65\x64\x55\x49\x44\x53","\x73\x65\x6C\x65\x63\x74\x65\x64\x49\x6E\x64\x65\x78","\x20\x73\x75\x63\x63\x65\x73\x73\x66\x75\x6C\x6C\x79\x20\x72\x65\x6D\x6F\x76\x65\x64\x20\x66\x72\x6F\x6D\x20\x55\x49\x44\x20\x42\x41\x4E\x20\x6C\x69\x73\x74","\x23\x52\x65\x6D\x6F\x76\x65\x42\x61\x6E\x6E\x65\x64\x55\x49\x44","\x50\x6C\x65\x61\x73\x65\x20\x70\x6C\x61\x79\x20\x74\x68\x65\x20\x67\x61\x6D\x65\x20\x62\x65\x66\x6F\x72\x65\x20\x79\x6F\x75\x20\x63\x61\x6E\x20\x75\x73\x65\x20\x74\x68\x61\x74\x20\x66\x65\x61\x74\x75\x72\x65","\x59\x6F\x75\x20\x64\x6F\x20\x6E\x6F\x74\x20\x6E\x61\x6D\x65\x20\x74\x68\x65\x20\x61\x75\x74\x68\x6F\x72\x69\x74\x79","\x6C\x61\x6E\x67\x75\x61\x67\x65\x73","\x6E\x61\x76\x69\x67\x61\x74\x6F\x72","\x65\x6E","\x73\x68\x6F\x77\x43\x68\x61\x74\x54\x72\x61\x6E\x73\x6C\x61\x74\x69\x6F\x6E","\x63\x6F\x6E\x74\x61\x69\x6E\x73","\x63\x6C\x61\x73\x73\x4C\x69\x73\x74","\x6C\x61\x73\x74\x43\x68\x69\x6C\x64","\x74\x65\x78\x74\x43\x6F\x6E\x74\x65\x6E\x74","\x66\x69\x72\x73\x74\x43\x68\x69\x6C\x64","\x64\x65\x65\x70\x73\x6B\x79\x62\x6C\x75\x65","\x74\x65\x78\x74\x53\x68\x61\x64\x6F\x77","\x31\x70\x78\x20\x31\x70\x78\x20\x31\x70\x78\x20\x77\x68\x69\x74\x65","\x47\x65\x74","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x74\x72\x61\x6E\x73\x6C\x61\x74\x65\x2E\x79\x61\x6E\x64\x65\x78\x2E\x6E\x65\x74\x2F\x61\x70\x69\x2F\x76\x31\x2E\x35\x2F\x74\x72\x2E\x6A\x73\x6F\x6E\x2F\x74\x72\x61\x6E\x73\x6C\x61\x74\x65\x3F\x6B\x65\x79\x3D\x74\x72\x6E\x73\x6C\x2E\x31\x2E\x31\x2E\x32\x30\x31\x39\x30\x34\x31\x33\x54\x31\x33\x33\x32\x33\x34\x5A\x2E\x65\x32\x62\x66\x38\x66\x36\x31\x64\x62\x38\x30\x35\x64\x32\x36\x2E\x31\x64\x63\x33\x33\x31\x62\x33\x33\x64\x31\x35\x36\x65\x34\x33\x36\x37\x39\x61\x31\x39\x33\x35\x37\x64\x31\x35\x64\x39\x65\x65\x36\x36\x34\x35\x30\x32\x64\x65\x26\x74\x65\x78\x74\x3D","\x26\x6C\x61\x6E\x67\x3D","\x26\x66\x6F\x72\x6D\x61\x74\x3D\x70\x6C\x61\x69\x6E\x26\x6F\x70\x74\x69\x6F\x6E\x73\x3D\x31","\x6F\x6E\x72\x65\x61\x64\x79\x73\x74\x61\x74\x65\x63\x68\x61\x6E\x67\x65","\x73\x74\x61\x74\x75\x73","\x72\x65\x73\x70\x6F\x6E\x73\x65\x54\x65\x78\x74","\x75\x6C\x74\x72\x61","\x73\x6F\x70\x68\x69\x73\x74\x69\x63\x61\x74\x65\x64","\x6F\x67\x61\x72\x69\x6F\x53\x65\x74\x74\x69\x6E\x67\x73","\x73\x61\x76\x65\x53\x65\x74\x74\x69\x6E\x67\x73","\x3C\x64\x69\x76\x20\x63\x6C\x61\x73\x73\x3D\x22\x6D\x6F\x64\x61\x6C\x20\x66\x61\x64\x65\x20\x69\x6E\x22\x20\x69\x64\x3D\x22\x4C\x4D\x50\x72\x6F\x6D\x6F\x22\x20\x61\x72\x69\x61\x2D\x68\x69\x64\x64\x65\x6E\x3D\x22\x66\x61\x6C\x73\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x62\x6C\x6F\x63\x6B\x3B\x22\x3E","\x3C\x64\x69\x76\x20\x63\x6C\x61\x73\x73\x3D\x22\x6D\x6F\x64\x61\x6C\x2D\x64\x69\x61\x6C\x6F\x67\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x74\x6F\x70\x3A\x20\x63\x61\x6C\x63\x28\x35\x30\x76\x68\x20\x2D\x20\x32\x34\x31\x2E\x35\x70\x78\x29\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x39\x32\x32\x70\x78\x3B\x22\x3E","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x43\x6C\x6F\x73\x65\x4C\x4D\x50\x72\x6F\x6D\x6F\x32\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x6D\x6F\x64\x61\x6C\x2D\x68\x65\x61\x64\x65\x72\x22\x3E\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x43\x6C\x6F\x73\x65\x4C\x4D\x50\x72\x6F\x6D\x6F\x22\x20\x74\x79\x70\x65\x3D\x22\x62\x75\x74\x74\x6F\x6E\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x63\x6C\x6F\x73\x65\x22\x20\x64\x61\x74\x61\x2D\x64\x69\x73\x6D\x69\x73\x73\x3D\x22\x6D\x6F\x64\x61\x6C\x22\x3E\x3C\x73\x70\x61\x6E\x20\x61\x72\x69\x61\x2D\x68\x69\x64\x64\x65\x6E\x3D\x22\x74\x72\x75\x65\x22\x3E\xD7\x3C\x2F\x73\x70\x61\x6E\x3E\x3C\x73\x70\x61\x6E\x20\x63\x6C\x61\x73\x73\x3D\x22\x73\x72\x2D\x6F\x6E\x6C\x79\x22\x3E","\x3C\x2F\x73\x70\x61\x6E\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E\x20\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x46\x41\x51\x4C\x4D\x50\x72\x6F\x6D\x6F\x22\x20\x74\x79\x70\x65\x3D\x22\x62\x75\x74\x74\x6F\x6E\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x63\x6C\x6F\x73\x65\x22\x20\x64\x61\x74\x61\x2D\x64\x69\x73\x6D\x69\x73\x73\x3D\x22\x6D\x6F\x64\x61\x6C\x22\x3E\x3C\x73\x70\x61\x6E\x20\x61\x72\x69\x61\x2D\x68\x69\x64\x64\x65\x6E\x3D\x22\x74\x72\x75\x65\x22\x3E\x3F\x3C\x2F\x73\x70\x61\x6E\x3E\x3C\x73\x70\x61\x6E\x20\x63\x6C\x61\x73\x73\x3D\x22\x73\x72\x2D\x6F\x6E\x6C\x79\x22\x3E","\x52\x65\x77\x61\x72\x64\x20\x44\x61\x79","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x4C\x4D\x61\x64\x76\x65\x72\x74\x69\x73\x65\x6D\x65\x6E\x74\x33\x22\x3E\x3C\x69\x66\x72\x61\x6D\x65\x20\x69\x64\x3D\x22\x63\x75\x73\x74\x6F\x6D\x73\x6B\x69\x6E\x73\x49\x66\x72\x61\x6D\x65\x32\x22\x20\x73\x72\x63\x3D\x22\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x65\x78\x74\x72\x61\x73\x2F\x72\x65\x77\x61\x72\x64\x64\x61\x79\x2E\x68\x74\x6D\x6C\x22\x20\x77\x69\x64\x74\x68\x3D\x22\x39\x32\x30\x22\x20\x68\x65\x69\x67\x68\x74\x3D\x22\x35\x35\x30\x22\x20\x3E","\x2E\x6D\x6F\x64\x61\x6C\x2D\x64\x69\x61\x6C\x6F\x67","\x23\x4C\x4D\x50\x72\x6F\x6D\x6F","\x23\x43\x6C\x6F\x73\x65\x4C\x4D\x50\x72\x6F\x6D\x6F","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F","\x23\x46\x41\x51\x4C\x4D\x50\x72\x6F\x6D\x6F","\x56\x69\x64\x65\x6F\x20\x53\x6B\x69\x6E\x20\x50\x72\x6F\x6D\x6F","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x4C\x4D\x61\x64\x76\x65\x72\x74\x69\x73\x65\x6D\x65\x6E\x74\x33\x22\x3E\x3C\x69\x66\x72\x61\x6D\x65\x20\x69\x64\x3D\x22\x63\x75\x73\x74\x6F\x6D\x73\x6B\x69\x6E\x73\x49\x66\x72\x61\x6D\x65\x32\x22\x20\x73\x72\x63\x3D\x22\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x64\x65\x76\x65\x6C\x6F\x70\x65\x72\x73\x2F\x76\x69\x64\x65\x6F\x73\x6B\x69\x6E\x73\x2E\x68\x74\x6D\x6C\x22\x20\x77\x69\x64\x74\x68\x3D\x22\x39\x32\x30\x22\x20\x68\x65\x69\x67\x68\x74\x3D\x22\x35\x35\x30\x22\x20\x3E","\x44\x75\x65\x20\x74\x6F\x20\x73\x70\x61\x6D\x6D\x69\x6E\x67\x20\x69\x73\x73\x75\x65\x73\x2C\x20\x79\x6F\x75\x20\x6D\x75\x73\x74\x20\x62\x65\x20\x69\x6E\x20\x67\x61\x6D\x65\x20\x61\x6E\x64\x20\x75\x73\x65\x20\x70\x61\x73\x73\x77\x6F\x72\x64","\x3C\x73\x63\x72\x69\x70\x74\x20\x73\x72\x63\x3D\x22\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x4C\x4D\x65\x78\x70\x72\x65\x73\x73\x2F\x62\x61\x6E\x6E\x65\x64\x55\x49\x44\x2E\x6A\x73\x22\x3E\x3C\x2F\x73\x63\x72\x69\x70\x74\x3E","\x6F\x67\x61\x72\x69\x6F\x54\x68\x65\x6D\x65\x53\x65\x74\x74\x69\x6E\x67\x73","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x61\x64\x6D\x69\x6E\x69\x73\x74\x72\x61\x74\x69\x6F\x6E\x74\x6F\x6F\x6C\x73\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x69\x6D\x61\x67\x65\x3A\x20\x75\x72\x6C\x28","\x3B\x20\x62\x6F\x72\x64\x65\x72\x3A\x20\x31\x70\x78\x20\x73\x6F\x6C\x69\x64\x20\x62\x6C\x61\x63\x6B\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x36\x35\x70\x78\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x35\x30\x30\x70\x78\x3B\x20\x22\x3B\x3E","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x61\x64\x6D\x69\x6E\x69\x73\x74\x72\x61\x74\x69\x6F\x6E\x74\x6F\x6F\x6C\x73\x68\x75\x64\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x64\x69\x73\x70\x6C\x61\x79\x3A\x62\x6C\x6F\x63\x6B\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x6C\x65\x66\x74\x3A\x20\x31\x30\x70\x78\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x72\x69\x67\x68\x74\x3A\x20\x31\x30\x70\x78\x3B\x22\x3E","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x61\x64\x6D\x69\x6E\x69\x73\x74\x72\x61\x74\x69\x6F\x6E\x74\x6F\x6F\x6C\x73\x68\x75\x64\x31\x22\x20\x61\x6C\x69\x67\x6E\x3D\x22\x6D\x69\x64\x64\x6C\x65\x22\x3E\x3C\x68\x35\x20\x63\x6C\x61\x73\x73\x3D\x22\x6D\x61\x69\x6E\x2D\x63\x6F\x6C\x6F\x72\x22\x3E\x41\x44\x4D\x49\x4E\x49\x53\x54\x52\x41\x54\x4F\x52\x20\x54\x4F\x4F\x4C\x53\x3C\x2F\x68\x35\x3E","\x3C\x70\x20\x73\x74\x79\x6C\x65\x3D\x22\x63\x6F\x6C\x6F\x72\x3A\x77\x68\x69\x74\x65\x3B\x20\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x31\x32\x70\x78\x22\x3B\x22\x20\x61\x6C\x69\x67\x6E\x3D\x22\x6D\x69\x64\x64\x6C\x65\x22\x3E\x45\x6E\x74\x65\x72\x20\x79\x6F\x75\x72\x20\x43\x6C\x61\x6E\x20\x73\x79\x6D\x62\x6F\x6C\x20\x61\x6E\x64\x20\x41\x44\x4D\x49\x4E\x20\x50\x61\x73\x73\x77\x6F\x72\x64\x3C\x2F\x70\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x41\x64\x6D\x69\x6E\x43\x6C\x61\x6E\x53\x79\x6D\x62\x6F\x6C\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x43\x6C\x61\x6E\x20\x53\x79\x6D\x62\x6F\x6C\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x72\x69\x67\x68\x74\x3A\x20\x32\x70\x78\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x34\x30\x25\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x69\x6E\x6C\x69\x6E\x65\x3B\x22\x20\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x74\x6F\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x54\x68\x65\x20\x73\x79\x6D\x62\x6F\x6C\x20\x6F\x66\x20\x43\x6C\x61\x6E\x20\x79\x6F\x75\x20\x62\x65\x6C\x6F\x6E\x67\x22\x20\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x41\x64\x6D\x69\x6E\x50\x61\x73\x73\x77\x6F\x72\x64\x22\x20\x74\x79\x70\x65\x3D\x22\x70\x61\x73\x73\x77\x6F\x72\x64\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x50\x61\x73\x73\x77\x6F\x72\x64\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x6C\x65\x66\x74\x3A\x20\x32\x70\x78\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x34\x30\x25\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x69\x6E\x6C\x69\x6E\x65\x3B\x22\x20\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x74\x6F\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x50\x75\x74\x20\x41\x44\x4D\x49\x4E\x20\x70\x61\x73\x73\x77\x6F\x72\x64\x22\x20\x3E","\x3C\x2F\x64\x69\x76\x3E\x3C\x70\x20\x73\x74\x79\x6C\x65\x3D\x22\x63\x6F\x6C\x6F\x72\x3A\x77\x68\x69\x74\x65\x3B\x20\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x31\x32\x70\x78\x22\x3B\x22\x20\x61\x6C\x69\x67\x6E\x3D\x22\x6D\x69\x64\x64\x6C\x65\x22\x3E\x49\x4D\x50\x4F\x52\x54\x41\x4E\x54\x20\x4E\x4F\x54\x49\x43\x45\x3A\x20\x41\x64\x6D\x69\x6E\x20\x54\x6F\x6F\x6C\x73\x20\x63\x61\x6E\x20\x6F\x6E\x6C\x79\x20\x62\x65\x20\x75\x73\x65\x64\x20\x62\x79\x20\x74\x68\x65\x20\x41\x64\x6D\x69\x6E\x73\x20\x6F\x66\x20\x74\x68\x65\x20\x4C\x65\x67\x65\x6E\x64\x20\x6D\x6F\x64\x3C\x2F\x75\x3E\x3C\x2F\x70\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x41\x64\x6D\x69\x6E\x42\x61\x63\x6B\x74\x6F\x6D\x65\x6E\x75\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x61\x64\x6D\x69\x6E\x69\x73\x74\x72\x61\x74\x69\x6F\x6E\x74\x6F\x6F\x6C\x73\x28\x29\x3B\x20\x72\x65\x74\x75\x72\x6E\x20\x66\x61\x6C\x73\x65\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x64\x61\x6E\x67\x65\x72\x22\x20\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x6C\x65\x66\x74\x3A\x20\x31\x30\x70\x78\x3B\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x70\x61\x67\x65\x5F\x6C\x6F\x67\x69\x6E\x5F\x61\x6E\x64\x5F\x70\x6C\x61\x79\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x22\x20\x74\x69\x74\x6C\x65\x3D\x22\x22\x3E\x43\x6C\x6F\x73\x65\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x23\x61\x64\x6D\x69\x6E\x69\x73\x74\x72\x61\x74\x69\x6F\x6E\x74\x6F\x6F\x6C\x73\x68\x75\x64","\x23\x41\x64\x6D\x69\x6E\x43\x6C\x61\x6E\x53\x79\x6D\x62\x6F\x6C","\x41\x64\x6D\x69\x6E\x43\x6C\x61\x6E\x53\x79\x6D\x62\x6F\x6C","\x41\x64\x6D\x69\x6E\x50\x61\x73\x73\x77\x6F\x72\x64","\x23\x41\x64\x6D\x69\x6E\x50\x61\x73\x73\x77\x6F\x72\x64","\x54\x45\x56\x48\x52\x55\x35\x45\x4E\x6A\x6B\x3D","\x3C\x62\x3E\x5B\x53\x45\x52\x56\x45\x52\x5D\x3A\x20\x57\x65\x6C\x63\x6F\x6D\x65\x20\x74\x6F\x20\x41\x64\x6D\x69\x6E\x69\x73\x74\x72\x61\x74\x69\x76\x65\x20\x74\x6F\x6F\x6C\x73\x20\x6D\x79\x20\x4D\x41\x53\x54\x45\x52\x20\x3C\x66\x6F\x6E\x74\x20\x63\x6F\x6C\x6F\x72\x3D\x22\x79\x65\x6C\x6C\x6F\x77\x22\x3E","\x3C\x2F\x66\x6F\x6E\x74\x3E\x3C\x2F\x62\x3E\x21","\x23\x61\x64\x6D\x69\x6E\x69\x73\x74\x72\x61\x74\x69\x6F\x6E\x74\x6F\x6F\x6C\x73","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x61\x64\x6D\x69\x6E\x69\x73\x74\x72\x61\x74\x69\x6F\x6E\x74\x6F\x6F\x6C\x2D\x68\x75\x64\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x68\x75\x64\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x77\x69\x64\x74\x68\x3A\x20\x35\x35\x2E\x35\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x33\x30\x70\x78\x3B\x20\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x70\x6F\x69\x6E\x74\x65\x72\x2D\x65\x76\x65\x6E\x74\x73\x3A\x20\x61\x75\x74\x6F\x3B\x20\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x20\x61\x62\x73\x6F\x6C\x75\x74\x65\x3B\x20\x72\x69\x67\x68\x74\x3A\x20\x30\x70\x78\x3B\x20\x74\x6F\x70\x3A\x20\x2D\x31\x32\x30\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x62\x6C\x6F\x63\x6B\x3B\x22\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x61\x64\x6D\x69\x6E\x69\x73\x74\x72\x61\x74\x69\x6F\x6E\x74\x6F\x6F\x6C\x30\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x2D\x6C\x69\x6E\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x32\x30\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x62\x61\x6E\x6C\x69\x73\x74\x4C\x4D\x28\x29\x3B\x22\x3E\x3C\x69\x20\x69\x64\x3D\x22\x61\x64\x6D\x69\x6E\x69\x73\x74\x72\x61\x74\x69\x6F\x6E\x74\x6F\x6F\x6C\x30\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x61\x64\x64\x72\x65\x73\x73\x2D\x62\x6F\x6F\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x2D\x6C\x65\x66\x74\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x61\x64\x6D\x69\x6E\x69\x73\x74\x72\x61\x74\x69\x6F\x6E\x74\x6F\x6F\x6C\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x2D\x6C\x69\x6E\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x32\x30\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74\x32\x6D\x69\x6E\x28\x29\x3B\x22\x3E\x3C\x69\x20\x69\x64\x3D\x22\x61\x64\x6D\x69\x6E\x69\x73\x74\x72\x61\x74\x69\x6F\x6E\x74\x6F\x6F\x6C\x31\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x62\x6F\x6D\x62\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x2D\x6C\x65\x66\x74\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x61\x64\x6D\x69\x6E\x69\x73\x74\x72\x61\x74\x69\x6F\x6E\x74\x6F\x6F\x6C\x32\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x2D\x6C\x69\x6E\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x32\x30\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74\x6E\x6F\x77\x28\x29\x3B\x22\x3E\x3C\x69\x20\x69\x64\x3D\x22\x61\x64\x6D\x69\x6E\x69\x73\x74\x72\x61\x74\x69\x6F\x6E\x74\x6F\x6F\x32\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x62\x61\x6E\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x2D\x6C\x65\x66\x74\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x61\x64\x6D\x69\x6E\x69\x73\x74\x72\x61\x74\x69\x6F\x6E\x74\x6F\x6F\x6C\x33\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x2D\x6C\x69\x6E\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x32\x30\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x73\x68\x6F\x77\x73\x74\x61\x74\x73\x70\x68\x70\x28\x29\x3B\x22\x3E\x3C\x69\x20\x69\x64\x3D\x22\x61\x64\x6D\x69\x6E\x69\x73\x74\x72\x61\x74\x69\x6F\x6E\x74\x6F\x6F\x33\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x64\x61\x74\x61\x62\x61\x73\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x2D\x6C\x65\x66\x74\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x61\x64\x6D\x69\x6E\x69\x73\x74\x72\x61\x74\x69\x6F\x6E\x74\x6F\x6F\x6C\x34\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x2D\x6C\x69\x6E\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x32\x30\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x73\x68\x6F\x77\x73\x74\x61\x74\x73\x70\x68\x70\x32\x28\x29\x3B\x22\x3E\x3C\x69\x20\x69\x64\x3D\x22\x61\x64\x6D\x69\x6E\x69\x73\x74\x72\x61\x74\x69\x6F\x6E\x74\x6F\x6F\x34\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x77\x70\x65\x78\x70\x6C\x6F\x72\x65\x72\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x2D\x6C\x65\x66\x74\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x41\x63\x63\x65\x73\x73\x20\x64\x65\x6E\x69\x65\x64\x21","\x59\x6F\x75\x20\x6D\x75\x73\x74\x20\x72\x65\x67\x69\x73\x74\x65\x72\x20\x79\x6F\x75\x72\x20\x43\x6C\x61\x6E\x20\x53\x79\x6D\x62\x6F\x6C\x20\x66\x69\x72\x73\x74","\x3A\x68\x69\x64\x64\x65\x6E","\x23\x61\x64\x6D\x69\x6E\x69\x73\x74\x72\x61\x74\x69\x6F\x6E\x74\x6F\x6F\x6C\x2D\x68\x75\x64","\u2104\uD83C\uDF00\x4A\x69\x6D\x62\x6F\x79\x33\x31\x30\x30","\u2104\uD83C\uDF00\uFF2A\uFF55\uFF53\uFF54\uFF37\uFF41\uFF54\uFF43\uFF48\uFF30\uFF52\uFF4F","\u2104\uD83C\uDF00\x20\x20\x20\x20\x20\x20\x20\u148E\u15F4\u1587\u1587\u01B3","\u2104\uD83C\uDF00\x20\uD835\uDE68\uD835\uDE63\uD835\uDE5A\uD835\uDE6F","\x4C\x45\x47\x45\x4E\x44\x36\x39","\x54\x68\x6F\x73\x65\x20\x77\x68\x6F\x20\x75\x73\x65\x20\x4C\x65\x67\x65\x6E\x64\x20\x6D\x6F\x64\x20\x28\x65\x78\x63\x65\x70\x74\x20\x74\x68\x6F\x73\x65\x20\x77\x68\x6F\x20\x75\x73\x65\x20\u2104\x20\x73\x79\x6D\x62\x6F\x6C\x29\x2C\x20\x73\x61\x6D\x65\x20\x70\x61\x73\x73\x77\x6F\x72\x64\x20\x77\x69\x6C\x6C\x20\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74\x20\x69\x6E\x20\x31\x32\x30\x20\x73\x65\x63\x6F\x6E\x64\x73","\x54\x68\x6F\x73\x65\x20\x77\x68\x6F\x20\x75\x73\x65\x20\x4C\x65\x67\x65\x6E\x64\x20\x6D\x6F\x64\x20\x28\x65\x78\x63\x65\x70\x74\x20\x74\x68\x6F\x73\x65\x20\x77\x68\x6F\x20\x75\x73\x65\x20\u2104\x20\x73\x79\x6D\x62\x6F\x6C\x29\x2C\x20\x73\x61\x6D\x65\x20\x70\x61\x73\x73\x77\x6F\x72\x64\x20\x77\x69\x6C\x6C\x20\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74\x20\x6E\x6F\x77","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x61\x6E\x61\x6C\x79\x74\x69\x63\x73\x2E\x67\x6F\x6F\x67\x6C\x65\x2E\x63\x6F\x6D\x2F\x61\x6E\x61\x6C\x79\x74\x69\x63\x73\x2F\x77\x65\x62\x2F\x3F\x68\x6C\x3D\x65\x6C\x26\x70\x6C\x69\x3D\x31\x23\x72\x65\x61\x6C\x74\x69\x6D\x65\x2F\x72\x74\x2D\x63\x6F\x6E\x74\x65\x6E\x74\x2F\x61\x39\x32\x36\x35\x35\x38\x36\x34\x77\x31\x36\x35\x39\x38\x38\x34\x38\x30\x70\x31\x36\x36\x34\x39\x31\x30\x35\x35\x2F","\x68\x74\x74\x70\x3A\x2F\x2F\x61\x67\x61\x72\x2E\x73\x6E\x65\x7A\x2E\x6F\x72\x67\x2F","\x73\x69\x6D\x75\x6C\x61\x74\x65","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x61\x67\x61\x72\x2E\x69\x6F\x2F\x73\x69\x70\x3D\x31\x35\x31\x2E\x38\x30\x2E\x39\x31\x2E\x37\x33\x3A\x31\x35\x31\x31\x26\x3F\x64\x6F\x3D","\x53\x6F\x6D\x65\x74\x68\x69\x6E\x67\x20\x67\x6F\x6E\x65\x20\x77\x72\x6F\x6E\x67","\x3C\x64\x69\x76\x20\x63\x6C\x61\x73\x73\x3D\x22\x6D\x6F\x64\x61\x6C\x2D\x64\x69\x61\x6C\x6F\x67\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x74\x6F\x70\x3A\x20\x63\x61\x6C\x63\x28\x35\x30\x76\x68\x20\x2D\x20\x32\x34\x31\x2E\x35\x70\x78\x29\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x36\x32\x32\x70\x78\x3B\x22\x3E","\x32\x30\x32\x30\x20\x64\x65\x76\x65\x6C\x6F\x70\x6D\x65\x6E\x74","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x4C\x4D\x61\x64\x76\x65\x72\x74\x69\x73\x65\x6D\x65\x6E\x74\x33\x22\x3E\x3C\x69\x66\x72\x61\x6D\x65\x20\x69\x64\x3D\x22\x63\x75\x73\x74\x6F\x6D\x73\x6B\x69\x6E\x73\x49\x66\x72\x61\x6D\x65\x32\x22\x20\x73\x72\x63\x3D\x22\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x32\x30\x32\x30\x2E\x68\x74\x6D\x6C\x22\x20\x77\x69\x64\x74\x68\x3D\x22\x36\x32\x30\x22\x20\x68\x65\x69\x67\x68\x74\x3D\x22\x34\x39\x30\x22\x20\x3E"];var semimodVersion=_0x7c78[0];loadericon();getaccesstoken();findUserLang();if(window[_0x7c78[1]]){startTranslating()};window[_0x7c78[2]]= localStorage[_0x7c78[3]](_0x7c78[2]);if(window[_0x7c78[2]]== _0x7c78[4]){window[_0x7c78[2]]= null};var currentIP=_0x7c78[5];var currentIPopened;var currentToken=_0x7c78[6];var previousMode=localStorage[_0x7c78[3]](_0x7c78[7]);var checkonlyonce=localStorage[_0x7c78[3]](_0x7c78[8]);var checkonlytwelvth=localStorage[_0x7c78[3]](_0x7c78[9]);var checkonlyeleventh=localStorage[_0x7c78[3]](_0x7c78[10]);var checkonlyrewardday1=localStorage[_0x7c78[3]](_0x7c78[11]);var defaultMusicUrl=_0x7c78[12];var musicPlayer;var stateObj={foo:_0x7c78[13]};var minimapbckimg=_0x7c78[6];var leadbimg=_0x7c78[6];var teambimg=_0x7c78[6];var canvasbimg=_0x7c78[6];var pic1urlimg=_0x7c78[14];var pic2urlimg=_0x7c78[15];var pic3urlimg=_0x7c78[16];var pic4urlimg=_0x7c78[17];var pic5urlimg=_0x7c78[18];var pic6urlimg=_0x7c78[19];var pic1dataimg=_0x7c78[20];var pic2dataimg=_0x7c78[21];var pic3dataimg=_0x7c78[22];var pic4dataimg=_0x7c78[23];var pic5dataimg=_0x7c78[24];var pic6dataimg=_0x7c78[25];var yt1url=_0x7c78[26];var yt2url=_0x7c78[27];var yt3url=_0x7c78[28];var yt4url=_0x7c78[29];var yt5url=_0x7c78[30];var yt6url=_0x7c78[31];var yt1data=_0x7c78[32];var yt2data=_0x7c78[33];var yt3data=_0x7c78[34];var yt4data=_0x7c78[35];var yt5data=_0x7c78[36];var yt6data=_0x7c78[37];var lastIP=localStorage[_0x7c78[3]](_0x7c78[38]);var previousnickname=localStorage[_0x7c78[3]](_0x7c78[39]);var minbtext=localStorage[_0x7c78[3]](_0x7c78[40]);var leadbtext=localStorage[_0x7c78[3]](_0x7c78[41]);var teambtext=localStorage[_0x7c78[3]](_0x7c78[42]);var imgUrl=localStorage[_0x7c78[3]](_0x7c78[43]);var imgHref=localStorage[_0x7c78[3]](_0x7c78[44]);var showToken=localStorage[_0x7c78[3]](_0x7c78[45]);var showPlayer=localStorage[_0x7c78[3]](_0x7c78[46]);var SHOSHOBtn=localStorage[_0x7c78[3]](_0x7c78[47]);var XPBtn=localStorage[_0x7c78[3]](_0x7c78[48]);var MAINBTBtn=localStorage[_0x7c78[3]](_0x7c78[49]);var AnimatedSkinBtn=localStorage[_0x7c78[3]](_0x7c78[50]);var TIMEcalBtn=localStorage[_0x7c78[3]](_0x7c78[51]);var timesopened=localStorage[_0x7c78[3]](_0x7c78[52]);var url=localStorage[_0x7c78[3]](_0x7c78[53]);var modVersion;if(document[_0x7c78[56]][_0x7c78[55]](_0x7c78[54])){$(_0x7c78[60])[_0x7c78[59]](_0x7c78[58])[_0x7c78[57]]();$(_0x7c78[60])[_0x7c78[61]]();modVersion= _0x7c78[62];init(modVersion);$(_0x7c78[65])[_0x7c78[64]]()[0][_0x7c78[63]]= _0x7c78[66];setTimeout(function(){legendmod[_0x7c78[67]]= _0x7c78[68]},5000);$(_0x7c78[69])[_0x7c78[57]](function(){setTimeout(function(){legendmod[_0x7c78[67]]= _0x7c78[68]},2000)});$(_0x7c78[70])[_0x7c78[61]]();$(_0x7c78[74])[_0x7c78[73]](_0x7c78[71],_0x7c78[72]);$(_0x7c78[74])[_0x7c78[76]](_0x7c78[75]);$(_0x7c78[77])[_0x7c78[61]]();$(_0x7c78[78])[_0x7c78[61]]();$(_0x7c78[79])[_0x7c78[61]]();$(_0x7c78[80])[_0x7c78[61]]();$(_0x7c78[81])[_0x7c78[61]]();$(_0x7c78[82])[_0x7c78[61]]();$(_0x7c78[84])[_0x7c78[64]]()[_0x7c78[73]](_0x7c78[71],_0x7c78[83]);$(_0x7c78[69])[_0x7c78[73]](_0x7c78[71],_0x7c78[85]);$(_0x7c78[69])[_0x7c78[73]](_0x7c78[71],_0x7c78[86]);$(_0x7c78[88])[_0x7c78[64]]()[_0x7c78[87]]()};var region=getParameterByName(_0x7c78[89],url);var realmode=getParameterByName(_0x7c78[90],url);var searchStr=getParameterByName(_0x7c78[91],url);var searchSip=getParameterByName(_0x7c78[92],url);var clanpass=getParameterByName(_0x7c78[93],url);var searchedplayer=getParameterByName(_0x7c78[94],url);var autoplayplayer=getParameterByName(_0x7c78[95],url);var replayURL=getParameterByName(_0x7c78[96],url);var replayStart=getParameterByName(_0x7c78[97],url);var replayEnd=getParameterByName(_0x7c78[98],url);var realmode2=_0x7c78[6];var mode=_0x7c78[6];var token=_0x7c78[6];var messageone=1;var troll1;var seticon=_0x7c78[99];var setmessagecom=_0x7c78[99];var setyt=_0x7c78[99];var searching;var timerId;TimerLM= {};var playerState=0;var MSGCOMMANDS=_0x7c78[6];var MSGCOMMANDS2;var MSGCOMMANDS;var MSGNICK;var playerMsg=_0x7c78[6];var commandMsg=_0x7c78[6];var otherMsg=_0x7c78[6];var rotateminimap=0;var rotateminimapfirst=0;var openthecommunication=_0x7c78[100];var clickedname=_0x7c78[100];var oldteammode;var checkedGameNames=0;var timesdisconnected=0;var PanelImageSrc;var AdminClanSymbol;var AdminPassword;var AdminRights=0;var LegendClanSymbol=_0x7c78[101];var legbgcolor=$(_0x7c78[102])[_0x7c78[59]]();var legbgpic=$(_0x7c78[103])[_0x7c78[59]]();var legmaincolor=$(_0x7c78[104])[_0x7c78[59]]();var dyinglight1load=localStorage[_0x7c78[3]](_0x7c78[105]);var url2;var semiurl2;var PostedThings;var setscriptingcom=_0x7c78[99];var usedonceSkin=0;var detailed=_0x7c78[6];var detailed1;userData= {};userData= JSON[_0x7c78[107]](localStorage[_0x7c78[3]](_0x7c78[106]));var userip=_0x7c78[5];var usercity=_0x7c78[108];var usercountry=_0x7c78[108];var userfirstname=localStorage[_0x7c78[3]](_0x7c78[109]);var userlastname=localStorage[_0x7c78[3]](_0x7c78[110]);var usergender=localStorage[_0x7c78[3]](_0x7c78[111]);var userid=localStorage[_0x7c78[3]](_0x7c78[112]);var fbresponse={};var CopyTkPwLb2;var languagemod=localStorage[_0x7c78[3]](_0x7c78[113]);var MSGCOMMANDS2a;var MSGCOMMANDSA;var MSGCOMMANDS2;var MSGCOMMANDS3;var Express=_0x7c78[114];var LegendJSON;var LegendSettings=_0x7c78[115];var LegendSettingsfirstclicked=_0x7c78[116];var switcheryLegendSwitch,switcheryLegendSwitch2;var showonceusers3=0;var client2;var xhttp= new XMLHttpRequest();var animatedserverchanged=false;if(timesopened!= null){timesopened++;localStorage[_0x7c78[117]](_0x7c78[52],timesopened)}else {if(timesopened== null){localStorage[_0x7c78[117]](_0x7c78[52],_0x7c78[101])}};loadersettings();function postSNEZ(_0x1499x84,_0x1499x85,_0x1499x86,_0x1499x87){xhttp[_0x7c78[119]](_0x7c78[118],_0x1499x84,false);xhttp[_0x7c78[121]](_0x7c78[120],_0x1499x85);xhttp[_0x7c78[121]](_0x7c78[122],_0x1499x86);xhttp[_0x7c78[123]](_0x1499x87)}function getSNEZ(_0x1499x84,_0x1499x85,_0x1499x86){xhttp[_0x7c78[119]](_0x7c78[124],_0x1499x84,false);xhttp[_0x7c78[121]](_0x7c78[120],_0x1499x85);xhttp[_0x7c78[121]](_0x7c78[122],_0x1499x86);xhttp[_0x7c78[123]]()}var tcm2={prototypes:{canvas:(CanvasRenderingContext2D[_0x7c78[125]]),old:{}},f:{prototype_override:function(_0x1499x8a,_0x1499x8b,_0x1499x8c,_0x1499x8d){if(!(_0x1499x8a in tcm2[_0x7c78[127]][_0x7c78[126]])){tcm2[_0x7c78[127]][_0x7c78[126]][_0x1499x8a]= {}};if(!(_0x1499x8b in tcm2[_0x7c78[127]][_0x7c78[126]][_0x1499x8a])){tcm2[_0x7c78[127]][_0x7c78[126]][_0x1499x8a][_0x1499x8b]= tcm2[_0x7c78[127]][_0x1499x8a][_0x1499x8b]};tcm2[_0x7c78[127]][_0x1499x8a][_0x1499x8b]= function(){(_0x1499x8c== _0x7c78[128]&& _0x1499x8d(this,arguments));tcm2[_0x7c78[127]][_0x7c78[126]][_0x1499x8a][_0x1499x8b][_0x7c78[129]](this,arguments);(_0x1499x8c== _0x7c78[130]&& _0x1499x8d(this,arguments))}},gradient:function(_0x1499x8e){var _0x1499x8f=[_0x7c78[131],_0x7c78[132],_0x7c78[133],_0x7c78[134],_0x7c78[135],_0x7c78[136]];var _0x1499x90=_0x1499x8e[_0x7c78[138]](0,0,_0x1499x8e[_0x7c78[137]][_0x7c78[71]],0);_0x1499x90[_0x7c78[142]](0,_0x1499x8f[Math[_0x7c78[141]](Math[_0x7c78[139]]()* _0x1499x8f[_0x7c78[140]])]);_0x1499x90[_0x7c78[142]](1,_0x1499x8f[Math[_0x7c78[141]](Math[_0x7c78[139]]()* _0x1499x8f[_0x7c78[140]])]);return _0x1499x90},override:function(){tcm2[_0x7c78[150]][_0x7c78[151]](_0x7c78[137],_0x7c78[143],_0x7c78[128],function(_0x1499x8e,_0x1499x91){if(_0x1499x8e[_0x7c78[137]][_0x7c78[144]]!= _0x7c78[145]&& _0x1499x8e[_0x7c78[137]][_0x7c78[144]]!= _0x7c78[146]&& _0x1499x8e[_0x7c78[137]][_0x7c78[144]]!= _0x7c78[147]){_0x1499x8e[_0x7c78[148]]= tcm2[_0x7c78[150]][_0x7c78[149]](_0x1499x8e)}})}}};urlIpWhenOpened();function startLM(modVersion){if(!window[_0x7c78[152]]){window[_0x7c78[152]]= true;window[_0x7c78[153]]= modVersion;if(modVersion!= _0x7c78[62]){toastr[_0x7c78[157]](_0x7c78[154]+ modVersion+ _0x7c78[155]+ Premadeletter16+ _0x7c78[156])};universalchat();adminstuff();return initializeLM(modVersion)}}function getEmbedUrl(url){url= url[_0x7c78[158]]();var _0x1499x94=_0x7c78[159];var _0x1499x95=getParameterByName(_0x7c78[160],url);var _0x1499x96=getParameterByName(_0x7c78[161],url);if(_0x1499x95!= null&& _0x1499x96== null){return _0x7c78[162]+ _0x1499x95+ _0x7c78[163]+ _0x1499x94}else {if(_0x1499x96!= null&& _0x1499x95!= null){return _0x7c78[162]+ _0x1499x95+ _0x7c78[164]+ _0x1499x96+ _0x7c78[165]+ _0x1499x94}else {if(url[_0x7c78[167]](_0x7c78[166])){if(_0x1499x96!= null){return url[_0x7c78[168]](_0x7c78[166],_0x7c78[162])+ _0x7c78[165]+ _0x1499x94}else {return url[_0x7c78[168]](_0x7c78[166],_0x7c78[162])+ _0x7c78[163]+ _0x1499x94}}else {return false}}}}function loadersettings(){if(timesopened>= 3){if(checkonlyonce!= _0x7c78[115]){if(SHOSHOBtn!= _0x7c78[115]){toastr[_0x7c78[173]](Premadeletter18+ _0x7c78[170]+ Premadeletter19+ _0x7c78[171]+ Premadeletter20+ _0x7c78[172],_0x7c78[6],{timeOut:15000,extendedTimeOut:15000})[_0x7c78[73]](_0x7c78[71],_0x7c78[169]);checkonlyonce= _0x7c78[115];localStorage[_0x7c78[117]](_0x7c78[8],checkonlyonce)}}};if(checkonlytwelvth!= _0x7c78[115]){checkonlytwelvth= _0x7c78[115];localStorage[_0x7c78[117]](_0x7c78[9],checkonlytwelvth)}else {if(checkonlyrewardday1!= _0x7c78[115]){checkonlyrewardday1= _0x7c78[115];localStorage[_0x7c78[117]](_0x7c78[11],checkonlyrewardday1)}else {if(checkonlyeleventh!= _0x7c78[115]){checkonlyeleventh= _0x7c78[115];localStorage[_0x7c78[117]](_0x7c78[10],checkonlyeleventh)}}};if(timesopened== 10|| timesopened== 100|| timesopened== 1000){if(SHOSHOBtn!= _0x7c78[115]){toastr[_0x7c78[173]](Premadeletter18+ _0x7c78[170]+ Premadeletter19+ _0x7c78[171]+ Premadeletter20+ _0x7c78[172],_0x7c78[6],{timeOut:15000,extendedTimeOut:15000})[_0x7c78[73]](_0x7c78[71],_0x7c78[169]);checkonlyonce= _0x7c78[115];localStorage[_0x7c78[117]](_0x7c78[8],checkonlyonce)}}}function loadericon(){$(_0x7c78[175])[_0x7c78[174]](1500);setTimeout(function(){$(_0x7c78[175])[_0x7c78[176]]()},1600)}function PremiumUsersFFAScore(){if(window[_0x7c78[2]]&& window[_0x7c78[2]][_0x7c78[55]](_0x7c78[177])){if(PremiumLimitedDateStart&& !isNaN(parseInt(PremiumLimitedDateStart))){var _0x1499x9a= new Date()[_0x7c78[180]]()[_0x7c78[181]](0, new Date()[_0x7c78[180]]()[_0x7c78[179]](_0x7c78[178]))[_0x7c78[168]](/-/g,_0x7c78[6]);var _0x1499x9b=parseInt(_0x1499x9a[_0x7c78[181]](6,8))- 6;var _0x1499x9c=parseInt(_0x1499x9a[_0x7c78[181]](0,6))* 100;if(_0x1499x9b< 0){_0x1499x9b= _0x1499x9b- 70};_0x1499x9b= _0x1499x9c+ _0x1499x9b;var _0x1499x9d=parseInt(PremiumLimitedDateStart);if(PremiumLimitedDateStart&& parseInt(PremiumLimitedDateStart)< _0x1499x9b&& window[_0x7c78[2]]){window[_0x7c78[2]]= null;toastr[_0x7c78[184]](_0x7c78[183])[_0x7c78[73]](_0x7c78[71],_0x7c78[182])}}else {window[_0x7c78[2]]= null};localStorage[_0x7c78[117]](_0x7c78[2],window[_0x7c78[2]])}}function PremiumUsers(){if(!window[_0x7c78[2]]|| window[_0x7c78[2]][_0x7c78[55]](_0x7c78[185])){if(window[_0x7c78[186]]&& ProLicenceUsersTable[_0x7c78[187]][window[_0x7c78[186]]]){if(ProLicenceUsersTable[_0x7c78[187]][window[_0x7c78[186]]][_0x7c78[188]][_0x7c78[55]](_0x7c78[185])){var _0x1499x9f=parseInt( new Date()[_0x7c78[180]]()[_0x7c78[181]](0, new Date()[_0x7c78[180]]()[_0x7c78[179]](_0x7c78[178]))[_0x7c78[168]](/-/g,_0x7c78[6]));var _0x1499xa0=parseInt(ProLicenceUsersTable[_0x7c78[187]][window[_0x7c78[186]]][_0x7c78[188]][_0x7c78[190]](_0x7c78[189])[1]);if(_0x1499xa0&& _0x1499xa0< _0x1499x9f&& window[_0x7c78[2]]){window[_0x7c78[2]]= null;toastr[_0x7c78[184]](_0x7c78[183])[_0x7c78[73]](_0x7c78[71],_0x7c78[182])}else {if(_0x1499xa0&& _0x1499xa0>= _0x1499x9f){if(!window[_0x7c78[2]]){window[_0x7c78[2]]= _0x7c78[185];_0x1499xa0= ProLicenceUsersTable[_0x7c78[187]][window[_0x7c78[186]]][_0x7c78[188]][_0x7c78[190]](_0x7c78[189])[1];toastr[_0x7c78[184]](_0x7c78[191]+ _0x1499xa0[_0x7c78[181]](0,2)+ _0x7c78[192]+ _0x1499xa0[_0x7c78[181]](2,4)+ _0x7c78[192]+ _0x1499xa0[_0x7c78[181]](4,8)+ _0x7c78[193])[_0x7c78[73]](_0x7c78[71],_0x7c78[182])}else {}}}}else {window[_0x7c78[2]]= ProLicenceUsersTable[_0x7c78[187]][window[_0x7c78[186]]][_0x7c78[188]];localStorage[_0x7c78[117]](_0x7c78[2],true);toastr[_0x7c78[184]](_0x7c78[194])[_0x7c78[73]](_0x7c78[71],_0x7c78[182])}};localStorage[_0x7c78[117]](_0x7c78[2],window[_0x7c78[2]])}}function getaccesstoken(){$[_0x7c78[197]]({type:_0x7c78[124],url:_0x7c78[195],datatype:_0x7c78[196],success:function(_0x1499xa2){var _0x1499xa3=_0x1499xa2[17];getaccesstoken2(_0x1499xa3)}})}function getaccesstoken2(_0x1499xa3){if(_0x1499xa3!= _0x7c78[198]&& _0x1499xa3!= null){toastr[_0x7c78[173]](_0x7c78[199]+ Premadeletter123+ _0x7c78[200]+ Premadeletter88+ _0x7c78[201]+ Premadeletter118+ _0x7c78[202]+ Premadeletter89)[_0x7c78[73]](_0x7c78[71],_0x7c78[169]);document[_0x7c78[204]][_0x7c78[203]]= _0x7c78[6]}}function enableshortcuts(){if($(_0x7c78[207])[_0x7c78[206]](_0x7c78[205])== _0x7c78[116]){$(_0x7c78[207])[_0x7c78[208]]()};if($(_0x7c78[209])[_0x7c78[206]](_0x7c78[205])== _0x7c78[116]){$(_0x7c78[209])[_0x7c78[208]]()};if($(_0x7c78[210])[_0x7c78[206]](_0x7c78[205])== _0x7c78[116]){$(_0x7c78[210])[_0x7c78[208]]()};if($(_0x7c78[211])[_0x7c78[206]](_0x7c78[205])== _0x7c78[116]){$(_0x7c78[211])[_0x7c78[208]]()}}function adres(_0x1499xa2,_0x1499xa7,_0x1499xa8){var _0x1499xa2,_0x1499xa7,_0x1499xa8;if(_0x1499xa7== null|| _0x1499xa8== null){joinSERVERfindinfo()};if($(_0x7c78[69])[_0x7c78[59]]()!= _0x7c78[68]){setTimeout(function(){currentIP= _0x7c78[212]+ $(_0x7c78[213])[_0x7c78[59]]()+ _0x7c78[214];if(!legendmod[_0x7c78[215]]){currentIP= $(_0x7c78[213])[_0x7c78[59]]()};if(realmode!= _0x7c78[68]){if(!_0x1499xa7){realmode= $(_0x7c78[69])[_0x7c78[59]]()}else {realmode= _0x1499xa7};if(!_0x1499xa8){region= $(_0x7c78[60])[_0x7c78[59]]()}else {region= _0x1499xa8};if(currentIPopened== true){if(document[_0x7c78[56]][_0x7c78[55]](_0x7c78[54])){history[_0x7c78[220]](stateObj,_0x7c78[216],_0x7c78[217]+ currentIP+ _0x7c78[218]+ $(_0x7c78[60])[_0x7c78[59]]()+ _0x7c78[219]+ realmode)}else {history[_0x7c78[220]](stateObj,_0x7c78[216],_0x7c78[221]+ currentIP+ _0x7c78[218]+ $(_0x7c78[60])[_0x7c78[59]]()+ _0x7c78[219]+ realmode)};return currentIPopened= false}else {if(_0x1499xa7!= null&& _0x1499xa8!= null){if(document[_0x7c78[56]][_0x7c78[55]](_0x7c78[54])){history[_0x7c78[220]](stateObj,_0x7c78[216],_0x7c78[217]+ currentIP+ _0x7c78[218]+ $(_0x7c78[60])[_0x7c78[59]]()+ _0x7c78[219]+ realmode)}else {history[_0x7c78[220]](stateObj,_0x7c78[216],_0x7c78[221]+ currentIP+ _0x7c78[218]+ $(_0x7c78[60])[_0x7c78[59]]()+ _0x7c78[219]+ realmode)}}else {if(document[_0x7c78[56]][_0x7c78[55]](_0x7c78[54])){history[_0x7c78[220]](stateObj,_0x7c78[216],_0x7c78[217]+ currentIP)}else {history[_0x7c78[220]](stateObj,_0x7c78[216],_0x7c78[221]+ currentIP)};realmode= null;region= null;return realmode,region}}}else {if(realmode== _0x7c78[68]){window[_0x7c78[224]][_0x7c78[220]](null,null,window[_0x7c78[223]][_0x7c78[222]]);window[_0x7c78[223]][_0x7c78[225]]= _0x7c78[226]+ $(_0x7c78[227])[_0x7c78[59]]()}}},1800)}else {setTimeout(function(){window[_0x7c78[224]][_0x7c78[220]](null,null,window[_0x7c78[223]][_0x7c78[222]]);window[_0x7c78[223]][_0x7c78[225]]= _0x7c78[226]+ $(_0x7c78[227])[_0x7c78[59]]()},2000)}}function LMserverbox(){(function(_0x1499x8e,_0x1499x8f){function _0x1499xaa(_0x1499x8e,_0x1499xab){if(_0x1499xab){var _0x1499xac= new Date;_0x1499xac[_0x7c78[230]](_0x1499xac[_0x7c78[229]]()+ 864E5* _0x1499xab);_0x1499xac= _0x7c78[231]+ _0x1499xac[_0x7c78[232]]()}else {_0x1499xac= _0x7c78[6]};document[_0x7c78[233]]= _0x7c78[234]+ _0x1499x8e+ _0x1499xac+ _0x7c78[235]}joinSIPonstart();joinPLAYERonstart();joinreplayURLonstart()})(window,window[_0x7c78[228]])}function urlIpWhenOpened(){setTimeout(function(){currentIP= _0x7c78[212]+ $(_0x7c78[213])[_0x7c78[59]]()+ _0x7c78[214];if(!legendmod[_0x7c78[215]]){currentIP= $(_0x7c78[213])[_0x7c78[59]]()};if(searchSip!= null){if(region== null){if(document[_0x7c78[56]][_0x7c78[55]](_0x7c78[54])){history[_0x7c78[220]](stateObj,_0x7c78[216],_0x7c78[217]+ searchSip)}else {history[_0x7c78[220]](stateObj,_0x7c78[216],_0x7c78[221]+ searchSip)}}else {if(document[_0x7c78[56]][_0x7c78[55]](_0x7c78[54])){history[_0x7c78[220]](stateObj,_0x7c78[216],_0x7c78[217]+ searchSip+ _0x7c78[218]+ region+ _0x7c78[219]+ realmode)}else {history[_0x7c78[220]](stateObj,_0x7c78[216],_0x7c78[221]+ searchSip+ _0x7c78[218]+ region+ _0x7c78[219]+ realmode)}}}else {if(searchSip== null){if(document[_0x7c78[56]][_0x7c78[55]](_0x7c78[54])){history[_0x7c78[220]](stateObj,_0x7c78[216],_0x7c78[217]+ currentIP+ _0x7c78[218]+ $(_0x7c78[60])[_0x7c78[59]]()+ _0x7c78[219]+ $(_0x7c78[69])[_0x7c78[59]]())}else {history[_0x7c78[220]](stateObj,_0x7c78[216],_0x7c78[221]+ currentIP+ _0x7c78[218]+ $(_0x7c78[60])[_0x7c78[59]]()+ _0x7c78[219]+ $(_0x7c78[69])[_0x7c78[59]]())};region= $(_0x7c78[60])[_0x7c78[59]]();realmode= $(_0x7c78[69])[_0x7c78[59]]();return region,realmode}else {if(realmode!= _0x7c78[68]){if(document[_0x7c78[56]][_0x7c78[55]](_0x7c78[54])){history[_0x7c78[220]](stateObj,_0x7c78[216],_0x7c78[217]+ currentIP+ _0x7c78[218]+ $(_0x7c78[60])[_0x7c78[59]]()+ _0x7c78[219]+ realmode)}else {history[_0x7c78[220]](stateObj,_0x7c78[216],_0x7c78[221]+ currentIP+ _0x7c78[218]+ $(_0x7c78[60])[_0x7c78[59]]()+ _0x7c78[219]+ realmode)}}}}},6000)}function play(){$(_0x7c78[236])[_0x7c78[208]]()}function changeServer(){$(_0x7c78[237])[_0x7c78[208]]();appendLog($(_0x7c78[238])[_0x7c78[76]]())}function isValidIpAndPort(_0x1499xb1){var _0x1499xb2=_0x1499xb1[_0x7c78[190]](_0x7c78[239]);var _0x1499xb3=_0x1499xb2[0][_0x7c78[190]](_0x7c78[240]);var _0x1499xb4=_0x1499xb2[1];return validateNum(_0x1499xb4,1,65535)&& _0x1499xb3[_0x7c78[140]]== 4&& _0x1499xb3[_0x7c78[241]](function(_0x1499xb5){return validateNum(_0x1499xb5,0,255)})}function validateNum(_0x1499xb1,_0x1499xb7,_0x1499xb8){var _0x1499xb9=+_0x1499xb1;return _0x1499xb9>= _0x1499xb7&& _0x1499xb9<= _0x1499xb8&& _0x1499xb1=== _0x1499xb9.toString()}function joinToken(token){appendLog($(_0x7c78[238])[_0x7c78[76]]());$(_0x7c78[242])[_0x7c78[59]](token);$(_0x7c78[243])[_0x7c78[208]]();$(_0x7c78[242])[_0x7c78[59]](_0x7c78[6]);$(_0x7c78[69])[_0x7c78[59]](_0x7c78[6]);currentToken= token;$(_0x7c78[248])[_0x7c78[247]](_0x7c78[246])[_0x7c78[245]](_0x7c78[244])}function searchHandler(searchStr){searchStr= searchStr[_0x7c78[158]]();if(searchIPHandler(searchStr)){}else {if(searchTKHandler(searchStr)){}else {searchPlayer(searchStr)}}}function searchTKHandler(searchStr){searchStr= searchStr[_0x7c78[158]]();if(searchStr[_0x7c78[167]](_0x7c78[226])){joinpartyfromconnect(searchStr[_0x7c78[168]](_0x7c78[226],_0x7c78[6]));realmodereturn()}else {if(searchStr[_0x7c78[167]](_0x7c78[249])){joinToken(searchStr[_0x7c78[168]](_0x7c78[249],_0x7c78[6]));realmodereturn()}else {return false}};$(_0x7c78[248])[_0x7c78[247]](_0x7c78[246])[_0x7c78[245]](_0x7c78[244]);return true}function realmodereturn(){region= $(_0x7c78[60])[_0x7c78[59]]();realmode= $(_0x7c78[69])[_0x7c78[59]]();return realmode,region}function realmodereturnfromStart(){region= getParameterByName(_0x7c78[89],url);realmode= getParameterByName(_0x7c78[90],url);return region,realmode}function searchIPHandler(searchStr){region= $(_0x7c78[250])[_0x7c78[59]]();realmode= $(_0x7c78[251])[_0x7c78[59]]();$(_0x7c78[252])[_0x7c78[61]]();hideMenu();showSearchHud();searchStr= searchStr[_0x7c78[158]]();if(isValidIpAndPort(searchStr)){findIP(searchStr)}else {if(isValidIpAndPort(searchStr[_0x7c78[168]](_0x7c78[253],_0x7c78[6]))){findIP(searchStr[_0x7c78[168]](_0x7c78[253],_0x7c78[6]))}else {if(isValidIpAndPort(searchStr[_0x7c78[168]](_0x7c78[254],_0x7c78[6]))){findIP(searchStr[_0x7c78[168]](_0x7c78[254],_0x7c78[6]))}else {if(isValidIpAndPort(searchStr[_0x7c78[168]](_0x7c78[255],_0x7c78[6]))){findIP(searchStr[_0x7c78[168]](_0x7c78[255],_0x7c78[6]))}else {if(getParameterByName(_0x7c78[91],searchStr)){if(region){$(_0x7c78[258]+ region+ _0x7c78[259])[_0x7c78[257]](_0x7c78[256],_0x7c78[256])[_0x7c78[57]]();if(!document[_0x7c78[56]][_0x7c78[55]](_0x7c78[54])){getInfo()}};findIP(ip[_0x7c78[168]](_0x7c78[253],_0x7c78[6]))}else {return false}}}}};return true}function findIP(_0x1499xc1){if(realmode== _0x7c78[68]){$(_0x7c78[260])[_0x7c78[257]](_0x7c78[256],_0x7c78[256])[_0x7c78[57]]()};if(realmode== _0x7c78[261]){$(_0x7c78[262])[_0x7c78[257]](_0x7c78[256],_0x7c78[256])[_0x7c78[57]]()};if(realmode== _0x7c78[263]){$(_0x7c78[264])[_0x7c78[257]](_0x7c78[256],_0x7c78[256])[_0x7c78[57]]()};if(realmode== _0x7c78[265]){$(_0x7c78[266])[_0x7c78[257]](_0x7c78[256],_0x7c78[256])[_0x7c78[57]]()};if(!searching){if($[_0x7c78[158]](_0x1499xc1)== _0x7c78[6]){}else {searching= true;var _0x1499xc2=1800;var _0x1499xc3=8;var _0x1499xc4=0;var _0x1499xc5=0;var _0x1499xc6=2;toastr[_0x7c78[270]](Premadeletter21+ _0x7c78[268]+ _0x1499xc1+ _0x7c78[269])[_0x7c78[73]](_0x7c78[71],_0x7c78[267]);_0x1499xc4++;if(currentIP== _0x1499xc1){$(_0x7c78[248])[_0x7c78[247]](_0x7c78[246])[_0x7c78[245]](_0x7c78[244]);searching= false;toastr[_0x7c78[157]](Premadeletter29+ _0x7c78[271]+ Premadeletter13+ _0x7c78[272]+ Premadeletter14+ _0x7c78[172],_0x7c78[6],{timeOut:20000,extendedTimeOut:20000})[_0x7c78[73]](_0x7c78[71],_0x7c78[267])}else {changeServer();timerId= setInterval(function(){if(_0x1499xc5== _0x1499xc6){_0x1499xc5= 0;_0x1499xc4++;toastr[_0x7c78[270]](Premadeletter30+ _0x7c78[273]+ _0x1499xc4+ _0x7c78[192]+ _0x1499xc3)[_0x7c78[73]](_0x7c78[71],_0x7c78[267]);if(_0x1499xc4>= _0x1499xc3){$(_0x7c78[248])[_0x7c78[247]](_0x7c78[246])[_0x7c78[245]](_0x7c78[244]);clearInterval(timerId);searching= false;hideCancelSearch();toastr[_0x7c78[173]](Premadeletter31)[_0x7c78[73]](_0x7c78[71],_0x7c78[267])};if(currentIP== _0x1499xc1){$(_0x7c78[248])[_0x7c78[247]](_0x7c78[246])[_0x7c78[245]](_0x7c78[244]);clearInterval(timerId);searching= false;hideCancelSearch();toastr[_0x7c78[157]](Premadeletter29+ _0x7c78[271]+ Premadeletter13+ _0x7c78[272]+ Premadeletter14+ _0x7c78[172],_0x7c78[6],{timeOut:20000,extendedTimeOut:20000})[_0x7c78[73]](_0x7c78[71],_0x7c78[267])}else {changeServer()}}else {_0x1499xc5++}},_0x1499xc2)}}}else {$(_0x7c78[248])[_0x7c78[247]](_0x7c78[246])[_0x7c78[245]](_0x7c78[244]);clearInterval(timerId);searching= false;$(_0x7c78[248])[_0x7c78[247]](_0x7c78[246])[_0x7c78[245]](_0x7c78[244]);toastr[_0x7c78[173]](Premadeletter32+ _0x7c78[274])[_0x7c78[73]](_0x7c78[71],_0x7c78[267])}}function searchPlayer(_0x1499xc8){if(!searching){if($[_0x7c78[158]](_0x1499xc8)== _0x7c78[6]){}else {searching= true;var _0x1499xc2=1800;var _0x1499xc3=8;var _0x1499xc4=0;var _0x1499xc9=3;var _0x1499xc5=0;var _0x1499xc6=2;toastr[_0x7c78[270]](Premadeletter30+ _0x7c78[275]+ _0x1499xc8+ _0x7c78[269])[_0x7c78[73]](_0x7c78[71],_0x7c78[267]);var _0x1499xca=$(_0x7c78[238])[_0x7c78[76]]();var _0x1499xcb=_0x1499xc8[_0x7c78[190]](/[1-9]\.\s|10\.\s/g)[_0x7c78[276]](function(_0x1499xcc){return _0x1499xcc[_0x7c78[140]]!= 0});var _0x1499xcd=_0x1499xcb[_0x7c78[140]];var _0x1499xce=false;_0x1499xc4++;toastr[_0x7c78[270]](Premadeletter30+ _0x7c78[273]+ _0x1499xc4+ _0x7c78[192]+ _0x1499xc3)[_0x7c78[73]](_0x7c78[71],_0x7c78[267]);if(_0x1499xcd== 1){_0x1499xce= foundName(_0x1499xca,_0x1499xc8)}else {if(_0x1499xcd> 1){_0x1499xce= foundNames(_0x1499xca,_0x1499xcb,_0x1499xc9)}};if(_0x1499xce){$(_0x7c78[248])[_0x7c78[247]](_0x7c78[246])[_0x7c78[245]](_0x7c78[244]);searching= false;toastr[_0x7c78[157]](Premadeletter29+ _0x7c78[271]+ Premadeletter13+ _0x7c78[272]+ Premadeletter14+ _0x7c78[172],_0x7c78[6],{timeOut:20000,extendedTimeOut:20000})[_0x7c78[73]](_0x7c78[71],_0x7c78[267]);$(_0x7c78[69])[_0x7c78[59]](_0x7c78[277])}else {changeServer();timerId= setInterval(function(){if(_0x1499xc5== _0x1499xc6){_0x1499xc5= 0;_0x1499xca= $(_0x7c78[238])[_0x7c78[76]]();if(_0x1499xcd== 1){_0x1499xce= foundName(_0x1499xca,_0x1499xc8)}else {if(_0x1499xcd> 1){_0x1499xce= foundNames(_0x1499xca,_0x1499xcb,_0x1499xc9)}};_0x1499xc4++;toastr[_0x7c78[270]](Premadeletter30+ _0x7c78[273]+ _0x1499xc4+ _0x7c78[192]+ _0x1499xc3)[_0x7c78[73]](_0x7c78[71],_0x7c78[267]);if(_0x1499xc4>= _0x1499xc3){clearInterval(timerId);searching= false;toastr[_0x7c78[173]](Premadeletter31)[_0x7c78[73]](_0x7c78[71],_0x7c78[267])};if(_0x1499xce){$(_0x7c78[248])[_0x7c78[247]](_0x7c78[246])[_0x7c78[245]](_0x7c78[244]);clearInterval(timerId);searching= false;toastr[_0x7c78[157]](Premadeletter29+ _0x7c78[271]+ Premadeletter13+ _0x7c78[272]+ Premadeletter14+ _0x7c78[172],_0x7c78[6],{timeOut:20000,extendedTimeOut:20000})[_0x7c78[73]](_0x7c78[71],_0x7c78[267])}else {changeServer()}}else {_0x1499xc5++}},_0x1499xc2)}}}else {clearInterval(timerId);searching= false;toastr[_0x7c78[173]](Premadeletter32)[_0x7c78[73]](_0x7c78[71],_0x7c78[267])}}function copyToClipboard(_0x1499xd0){var _0x1499xd1=$(_0x7c78[278]);$(_0x7c78[280])[_0x7c78[279]](_0x1499xd1);var _0x1499xd2=$(_0x1499xd0)[_0x7c78[281]]();_0x1499xd2= _0x1499xd2[_0x7c78[168]](/<br>/g,_0x7c78[282]);console[_0x7c78[283]](_0x1499xd2);_0x1499xd1[_0x7c78[59]](_0x1499xd2)[_0x7c78[284]]();document[_0x7c78[286]](_0x7c78[285]);_0x1499xd1[_0x7c78[176]]()}function copyToClipboardAll(){$(_0x7c78[287])[_0x7c78[176]]();if($(_0x7c78[288])[_0x7c78[76]]()!= _0x7c78[6]){$(_0x7c78[295])[_0x7c78[130]](_0x7c78[289]+ CopyTkPwLb2+ _0x7c78[290]+ $(_0x7c78[238])[_0x7c78[76]]()+ _0x7c78[291]+ $(_0x7c78[288])[_0x7c78[76]]()+ _0x7c78[292]+ $(_0x7c78[293])[_0x7c78[59]]()+ _0x7c78[294])}else {$(_0x7c78[295])[_0x7c78[130]](_0x7c78[289]+ CopyTkPwLb2+ _0x7c78[290]+ $(_0x7c78[238])[_0x7c78[76]]()+ _0x7c78[292]+ $(_0x7c78[293])[_0x7c78[59]]()+ _0x7c78[294])};copyToClipboard(_0x7c78[296])}function foundName(_0x1499xca,_0x1499x8b){return _0x1499xca[_0x7c78[55]](_0x1499x8b)}function playYoutube(){if(musicPlayer!= undefined){var playerState=musicPlayer[_0x7c78[297]]();if(playerState!= 1){musicPlayer[_0x7c78[298]]()}else {musicPlayer[_0x7c78[299]]()}}}function foundNames(_0x1499xca,_0x1499xcb,_0x1499xc9){var _0x1499xcd=_0x1499xcb[_0x7c78[140]];var _0x1499xd7=0;var _0x1499xce=false;for(var _0x1499xd8=0;_0x1499xd8< _0x1499xcd;_0x1499xd8++){_0x1499xce= foundName(_0x1499xca,_0x1499xcb[_0x1499xd8]);if(_0x1499xce){_0x1499xd7++}};return (_0x1499xd7>= _0x1499xc9)?true:false}function joinpartyfromconnect(_0x1499xa7){$(_0x7c78[227])[_0x7c78[59]]($(_0x7c78[300])[_0x7c78[59]]());$(_0x7c78[301])[_0x7c78[208]]();legendmod[_0x7c78[67]]= _0x7c78[68];return realmode= legendmod[_0x7c78[67]]}function BeforeReportFakesSkin(){ReportFakesSkin()}function ReportFakesSkin(){var _0x1499xdc;var _0x1499xdd;var _0x1499xde;var _0x1499xdf;if(_0x1499xde!= null){_0x1499xdd= _0x1499xde}else {_0x1499xdd= _0x7c78[302]};if(_0x1499xdf!= null){_0x1499xdc= _0x1499xdf}else {_0x1499xdc= _0x7c78[303]};$(_0x7c78[327])[_0x7c78[130]](_0x7c78[304]+ legbgpic+ _0x7c78[305]+ legbgcolor+ _0x7c78[306]+ _0x7c78[307]+ _0x7c78[308]+ Premadeletter119+ _0x7c78[309]+ _0x7c78[310]+ Premadeletter120+ _0x7c78[311]+ _0x1499xdd+ _0x7c78[312]+ _0x7c78[313]+ _0x7c78[314]+ _0x7c78[315]+ _0x7c78[316]+ _0x7c78[317]+ _0x7c78[318]+ _0x7c78[319]+ _0x7c78[320]+ _0x7c78[321]+ _0x7c78[322]+ _0x7c78[323]+ Premadeletter121+ _0x7c78[324]+ Premadeletter122+ _0x7c78[325]+ _0x7c78[326]);$(_0x7c78[329])[_0x7c78[73]](_0x7c78[71],_0x7c78[328]);$(_0x7c78[330])[_0x7c78[73]](_0x7c78[71],_0x7c78[328]);$(_0x7c78[331])[_0x7c78[73]](_0x7c78[71],_0x7c78[328]);$(_0x7c78[332])[_0x7c78[73]](_0x7c78[71],_0x7c78[328]);$(_0x7c78[333])[_0x7c78[73]](_0x7c78[71],_0x7c78[328]);$(_0x7c78[334])[_0x7c78[73]](_0x7c78[71],_0x7c78[328]);$(_0x7c78[335])[_0x7c78[73]](_0x7c78[71],_0x7c78[328]);$(_0x7c78[336])[_0x7c78[73]](_0x7c78[71],_0x7c78[328]);$(_0x7c78[337])[_0x7c78[73]](_0x7c78[71],_0x7c78[328]);$(_0x7c78[338])[_0x7c78[73]](_0x7c78[71],_0x7c78[328]);$(_0x7c78[340])[_0x7c78[130]](_0x7c78[339]+ Premadeletter113+ _0x7c78[172]);OthersSkinChanger();SkinBtnsPut();OpenSkinChanger()}function SkinBtnsPut(){$(_0x7c78[329])[_0x7c78[130]](_0x7c78[341]);$(_0x7c78[330])[_0x7c78[130]](_0x7c78[342]);$(_0x7c78[331])[_0x7c78[130]](_0x7c78[343]);$(_0x7c78[332])[_0x7c78[130]](_0x7c78[344]);$(_0x7c78[333])[_0x7c78[130]](_0x7c78[345]);$(_0x7c78[334])[_0x7c78[130]](_0x7c78[346]);$(_0x7c78[335])[_0x7c78[130]](_0x7c78[347]);$(_0x7c78[336])[_0x7c78[130]](_0x7c78[348]);$(_0x7c78[337])[_0x7c78[130]](_0x7c78[349]);$(_0x7c78[338])[_0x7c78[130]](_0x7c78[350]);$(_0x7c78[352])[_0x7c78[128]](_0x7c78[351]);$(_0x7c78[354])[_0x7c78[128]](_0x7c78[353]);$(_0x7c78[356])[_0x7c78[128]](_0x7c78[355]);$(_0x7c78[358])[_0x7c78[128]](_0x7c78[357]);$(_0x7c78[360])[_0x7c78[128]](_0x7c78[359]);$(_0x7c78[362])[_0x7c78[128]](_0x7c78[361]);$(_0x7c78[364])[_0x7c78[128]](_0x7c78[363]);$(_0x7c78[366])[_0x7c78[128]](_0x7c78[365]);$(_0x7c78[368])[_0x7c78[128]](_0x7c78[367]);$(_0x7c78[370])[_0x7c78[128]](_0x7c78[369])}function OthersSkinChanger(){for(var _0x1499xd8=0;_0x1499xd8< 10;_0x1499xd8++){var _0x1499xe2=_0x1499xd8+ 1;if(application[_0x7c78[371]][_0x1499xd8]){$(_0x7c78[373]+ _0x1499xe2)[_0x7c78[59]](application[_0x7c78[371]][_0x1499xd8][_0x7c78[372]])};if(legendmod[_0x7c78[374]][_0x1499xd8]){$(_0x7c78[375]+ _0x1499xe2)[_0x7c78[59]](legendmod[_0x7c78[374]][_0x1499xd8][_0x7c78[372]])}}}function exitSkinChanger(){$(_0x7c78[376])[_0x7c78[87]]();$(_0x7c78[377])[_0x7c78[87]]();$(_0x7c78[378])[_0x7c78[87]]();$(_0x7c78[379])[_0x7c78[87]]();$(_0x7c78[380])[_0x7c78[176]]()}function OpenSkinChanger(){$(_0x7c78[376])[_0x7c78[61]]();$(_0x7c78[377])[_0x7c78[61]]();$(_0x7c78[378])[_0x7c78[61]]();$(_0x7c78[379])[_0x7c78[61]]();$(_0x7c78[380])[_0x7c78[87]]()}function fakeSkinReport(_0x1499xe6){if(_0x1499xe6){ogarcopythelb[_0x7c78[381]]= ogarcopythelb[_0x7c78[382]];ogarcopythelb[_0x7c78[383]]= ogarcopythelb[_0x7c78[372]];ogarcopythelb[_0x7c78[384]]= ogario[_0x7c78[385]];ogarcopythelb[_0x7c78[386]]= ogario[_0x7c78[387]];ogarcopythelb[_0x7c78[372]]= _0x1499xe6;ogarcopythelb[_0x7c78[382]]= _0x7c78[388];ogario[_0x7c78[387]]= true;ogario[_0x7c78[385]]= true;application[_0x7c78[389]]();application[_0x7c78[390]]();application[_0x7c78[391]]();ogarcopythelb[_0x7c78[382]]= ogarcopythelb[_0x7c78[381]];ogarcopythelb[_0x7c78[372]]= ogarcopythelb[_0x7c78[383]];ogario[_0x7c78[385]]= ogarcopythelb[_0x7c78[384]];ogario[_0x7c78[387]]= ogarcopythelb[_0x7c78[386]];ogarcopythelb[_0x7c78[381]]= null;ogarcopythelb[_0x7c78[383]]= null;ogarcopythelb[_0x7c78[384]]= null;ogarcopythelb[_0x7c78[386]]= null}}function prevnamereturner(){return previousnickname= $(_0x7c78[293])[_0x7c78[59]]()}function ogarioplayfalse(){return ogario[_0x7c78[387]]= _0x7c78[116]}function Leader11(){fakeSkinReport($(_0x7c78[329])[_0x7c78[59]]())}function Leader12(){fakeSkinReport($(_0x7c78[330])[_0x7c78[59]]())}function Leader13(){fakeSkinReport($(_0x7c78[331])[_0x7c78[59]]())}function Leader14(){fakeSkinReport($(_0x7c78[332])[_0x7c78[59]]())}function Leader15(){fakeSkinReport($(_0x7c78[333])[_0x7c78[59]]())}function Leader16(){fakeSkinReport($(_0x7c78[334])[_0x7c78[59]]())}function Leader17(){fakeSkinReport($(_0x7c78[335])[_0x7c78[59]]())}function Leader18(){fakeSkinReport($(_0x7c78[336])[_0x7c78[59]]())}function Leader19(){fakeSkinReport($(_0x7c78[337])[_0x7c78[59]]())}function Leader20(){fakeSkinReport($(_0x7c78[338])[_0x7c78[59]]())}function Teamer11(){fakeSkinReport($(_0x7c78[352])[_0x7c78[59]]())}function Teamer12(){fakeSkinReport($(_0x7c78[354])[_0x7c78[59]]())}function Teamer13(){fakeSkinReport($(_0x7c78[356])[_0x7c78[59]]())}function Teamer14(){fakeSkinReport($(_0x7c78[358])[_0x7c78[59]]())}function Teamer15(){fakeSkinReport($(_0x7c78[360])[_0x7c78[59]]())}function Teamer16(){fakeSkinReport($(_0x7c78[362])[_0x7c78[59]]())}function Teamer17(){fakeSkinReport($(_0x7c78[364])[_0x7c78[59]]())}function Teamer18(){fakeSkinReport($(_0x7c78[366])[_0x7c78[59]]())}function Teamer19(){fakeSkinReport($(_0x7c78[368])[_0x7c78[59]]())}function Teamer20(){fakeSkinReport($(_0x7c78[370])[_0x7c78[59]]())}function copy(_0x1499xfe){$(_0x7c78[392])[_0x7c78[59]](_0x1499xfe);$(_0x7c78[392])[_0x7c78[87]]();$(_0x7c78[392])[_0x7c78[284]]();document[_0x7c78[286]](_0x7c78[285]);$(_0x7c78[392])[_0x7c78[61]]();$(_0x7c78[392])[_0x7c78[59]](_0x7c78[6])}function LegendSettingsfirst(){$(_0x7c78[394])[_0x7c78[128]](_0x7c78[393]);var _0x1499x100=document[_0x7c78[396]](_0x7c78[395]);var _0x1499x101=$(_0x7c78[399])[_0x7c78[398]]()[_0x7c78[73]](_0x7c78[397]);var switcheryLegendSwitch= new Switchery(_0x1499x100,{size:_0x7c78[400],color:_0x1499x101,jackColor:_0x7c78[401]});$(_0x7c78[403])[_0x7c78[128]](_0x7c78[402]);var _0x1499x102=document[_0x7c78[396]](_0x7c78[404]);var switcheryLegendSwitch2= new Switchery(_0x1499x102,{size:_0x7c78[400],color:_0x1499x101,jackColor:_0x7c78[401]});LegendJSON= JSON[_0x7c78[107]](document[_0x7c78[407]](_0x7c78[406])[_0x7c78[405]]);LegendSettingsfirstAPI(LegendJSON,switcheryLegendSwitch);$(_0x7c78[408])[_0x7c78[208]](function(){LegendSettingsfirstAPI(LegendJSON,switcheryLegendSwitch);setTimeout(function(){copy($(_0x7c78[394])[_0x7c78[59]]())},200)});$(_0x7c78[410])[_0x7c78[412]]()[_0x7c78[411]](_0x7c78[410])[_0x7c78[206]](_0x7c78[144],_0x7c78[409]);$(_0x7c78[410])[_0x7c78[61]]();$(_0x7c78[413])[_0x7c78[208]](function(){LegendSettingsImport(switcheryLegendSwitch2);return switcheryLegendSwitch,switcheryLegendSwitch2})}function LegendSettingsfirstAPI(LegendJSON,switcheryLegendSwitch){setTimeout(function(){if(switcheryLegendSwitch[_0x7c78[414]]()){LegendJSON= JSON[_0x7c78[107]](document[_0x7c78[407]](_0x7c78[406])[_0x7c78[405]]);parseLegendJSONAPI(LegendJSON);var _0x1499x104=JSON[_0x7c78[415]](LegendJSON,null,4);document[_0x7c78[407]](_0x7c78[406])[_0x7c78[405]]= _0x1499x104}else {LegendJSON= JSON[_0x7c78[107]](document[_0x7c78[407]](_0x7c78[406])[_0x7c78[405]]);parseLegendJSONAPI(LegendJSON);delete LegendJSON[_0x7c78[416]];var _0x1499x104=JSON[_0x7c78[415]](LegendJSON,null,4);document[_0x7c78[407]](_0x7c78[406])[_0x7c78[405]]= _0x1499x104};return LegendJSON},100)}function parseLegendJSONAPI(LegendJSON){LegendJSON[_0x7c78[416]]= {};LegendJSON[_0x7c78[416]][_0x7c78[417]]= localStorage[_0x7c78[3]](_0x7c78[7]);LegendJSON[_0x7c78[416]][_0x7c78[8]]= localStorage[_0x7c78[3]](_0x7c78[8]);LegendJSON[_0x7c78[416]][_0x7c78[39]]= localStorage[_0x7c78[3]](_0x7c78[39]);LegendJSON[_0x7c78[416]][_0x7c78[418]]= localStorage[_0x7c78[3]](_0x7c78[45]);LegendJSON[_0x7c78[416]][_0x7c78[46]]= localStorage[_0x7c78[3]](_0x7c78[46]);LegendJSON[_0x7c78[416]][_0x7c78[47]]= localStorage[_0x7c78[3]](_0x7c78[47]);LegendJSON[_0x7c78[416]][_0x7c78[48]]= localStorage[_0x7c78[3]](_0x7c78[48]);LegendJSON[_0x7c78[416]][_0x7c78[49]]= localStorage[_0x7c78[3]](_0x7c78[49]);LegendJSON[_0x7c78[416]][_0x7c78[50]]= localStorage[_0x7c78[3]](_0x7c78[50]);LegendJSON[_0x7c78[416]][_0x7c78[51]]= localStorage[_0x7c78[3]](_0x7c78[51]);LegendJSON[_0x7c78[416]][_0x7c78[52]]= localStorage[_0x7c78[3]](_0x7c78[52]);LegendJSON[_0x7c78[416]][_0x7c78[105]]= localStorage[_0x7c78[3]](_0x7c78[105]);LegendJSON[_0x7c78[416]][_0x7c78[113]]= localStorage[_0x7c78[3]](_0x7c78[113]);LegendJSON[_0x7c78[416]][_0x7c78[419]]= localStorage[_0x7c78[3]](_0x7c78[420]);if(LegendJSON[_0x7c78[416]][_0x7c78[419]]== _0x7c78[4]|| LegendJSON[_0x7c78[416]][_0x7c78[419]]== null){LegendJSON[_0x7c78[416]][_0x7c78[419]]= defaultMusicUrl};LegendJSON[_0x7c78[416]][_0x7c78[38]]= localStorage[_0x7c78[3]](_0x7c78[38]);if(LegendJSON[_0x7c78[416]][_0x7c78[38]]== _0x7c78[4]|| LegendJSON[_0x7c78[416]][_0x7c78[38]]== null){LegendJSON[_0x7c78[416]][_0x7c78[38]]= _0x7c78[5]};LegendJSON[_0x7c78[416]][_0x7c78[421]]= localStorage[_0x7c78[3]](_0x7c78[421]);if(LegendJSON[_0x7c78[416]][_0x7c78[421]]== _0x7c78[4]|| LegendJSON[_0x7c78[416]][_0x7c78[421]]== null){LegendJSON[_0x7c78[416]][_0x7c78[421]]= _0x7c78[6]};LegendJSON[_0x7c78[416]][_0x7c78[422]]= localStorage[_0x7c78[3]](_0x7c78[422]);if(LegendJSON[_0x7c78[416]][_0x7c78[422]]== _0x7c78[4]|| LegendJSON[_0x7c78[416]][_0x7c78[422]]== null){LegendJSON[_0x7c78[416]][_0x7c78[422]]= _0x7c78[6]};LegendJSON[_0x7c78[416]][_0x7c78[423]]= localStorage[_0x7c78[3]](_0x7c78[423]);if(LegendJSON[_0x7c78[416]][_0x7c78[423]]== _0x7c78[4]|| LegendJSON[_0x7c78[416]][_0x7c78[423]]== null){LegendJSON[_0x7c78[416]][_0x7c78[423]]= _0x7c78[6]};LegendJSON[_0x7c78[416]][_0x7c78[424]]= localStorage[_0x7c78[3]](_0x7c78[424]);if(LegendJSON[_0x7c78[416]][_0x7c78[424]]== _0x7c78[4]|| LegendJSON[_0x7c78[416]][_0x7c78[424]]== null){LegendJSON[_0x7c78[416]][_0x7c78[424]]= _0x7c78[6]};LegendJSON[_0x7c78[416]][_0x7c78[425]]= localStorage[_0x7c78[3]](_0x7c78[425]);if(LegendJSON[_0x7c78[416]][_0x7c78[425]]== _0x7c78[4]|| LegendJSON[_0x7c78[416]][_0x7c78[425]]== null){LegendJSON[_0x7c78[416]][_0x7c78[425]]= _0x7c78[6]};LegendJSON[_0x7c78[416]][_0x7c78[426]]= localStorage[_0x7c78[3]](_0x7c78[426]);if(LegendJSON[_0x7c78[416]][_0x7c78[426]]== _0x7c78[4]|| LegendJSON[_0x7c78[416]][_0x7c78[426]]== null){LegendJSON[_0x7c78[416]][_0x7c78[426]]= _0x7c78[6]};LegendJSON[_0x7c78[416]][_0x7c78[427]]= localStorage[_0x7c78[3]](_0x7c78[427]);if(LegendJSON[_0x7c78[416]][_0x7c78[427]]== _0x7c78[4]|| LegendJSON[_0x7c78[416]][_0x7c78[427]]== null){LegendJSON[_0x7c78[416]][_0x7c78[427]]= _0x7c78[6]};LegendJSON[_0x7c78[416]][_0x7c78[428]]= localStorage[_0x7c78[3]](_0x7c78[428]);if(LegendJSON[_0x7c78[416]][_0x7c78[428]]== _0x7c78[4]|| LegendJSON[_0x7c78[416]][_0x7c78[428]]== null){LegendJSON[_0x7c78[416]][_0x7c78[428]]= _0x7c78[6]};LegendJSON[_0x7c78[416]][_0x7c78[429]]= localStorage[_0x7c78[3]](_0x7c78[429]);if(LegendJSON[_0x7c78[416]][_0x7c78[429]]== _0x7c78[4]|| LegendJSON[_0x7c78[416]][_0x7c78[429]]== null){LegendJSON[_0x7c78[416]][_0x7c78[429]]= _0x7c78[6]};LegendJSON[_0x7c78[416]][_0x7c78[430]]= localStorage[_0x7c78[3]](_0x7c78[430]);if(LegendJSON[_0x7c78[416]][_0x7c78[430]]== _0x7c78[4]|| LegendJSON[_0x7c78[416]][_0x7c78[430]]== null){LegendJSON[_0x7c78[416]][_0x7c78[430]]= _0x7c78[6]};LegendJSON[_0x7c78[416]][_0x7c78[41]]= localStorage[_0x7c78[3]](_0x7c78[41]);if(LegendJSON[_0x7c78[416]][_0x7c78[41]]== _0x7c78[4]|| LegendJSON[_0x7c78[416]][_0x7c78[41]]== null){LegendJSON[_0x7c78[416]][_0x7c78[41]]= _0x7c78[6]};LegendJSON[_0x7c78[416]][_0x7c78[431]]= localStorage[_0x7c78[3]](_0x7c78[431]);if(LegendJSON[_0x7c78[416]][_0x7c78[431]]== _0x7c78[4]|| LegendJSON[_0x7c78[416]][_0x7c78[431]]== null){LegendJSON[_0x7c78[416]][_0x7c78[431]]= _0x7c78[6]};LegendJSON[_0x7c78[416]][_0x7c78[42]]= localStorage[_0x7c78[3]](_0x7c78[42]);if(LegendJSON[_0x7c78[416]][_0x7c78[42]]== _0x7c78[4]|| LegendJSON[_0x7c78[416]][_0x7c78[42]]== null){LegendJSON[_0x7c78[416]][_0x7c78[42]]= _0x7c78[6]};LegendJSON[_0x7c78[416]][_0x7c78[43]]= localStorage[_0x7c78[3]](_0x7c78[43]);if(LegendJSON[_0x7c78[416]][_0x7c78[43]]== _0x7c78[4]|| LegendJSON[_0x7c78[416]][_0x7c78[43]]== null){LegendJSON[_0x7c78[416]][_0x7c78[43]]= _0x7c78[6]};LegendJSON[_0x7c78[416]][_0x7c78[44]]= localStorage[_0x7c78[3]](_0x7c78[44]);if(LegendJSON[_0x7c78[416]][_0x7c78[44]]== _0x7c78[4]|| LegendJSON[_0x7c78[416]][_0x7c78[44]]== null){LegendJSON[_0x7c78[416]][_0x7c78[44]]= _0x7c78[6]};LegendJSON[_0x7c78[416]][_0x7c78[40]]= localStorage[_0x7c78[3]](_0x7c78[40]);if(LegendJSON[_0x7c78[416]][_0x7c78[40]]== _0x7c78[4]|| LegendJSON[_0x7c78[416]][_0x7c78[40]]== null){LegendJSON[_0x7c78[416]][_0x7c78[40]]= _0x7c78[6]};LegendJSON[_0x7c78[416]][_0x7c78[432]]= localStorage[_0x7c78[3]](_0x7c78[432]);if(LegendJSON[_0x7c78[416]][_0x7c78[432]]== _0x7c78[4]|| LegendJSON[_0x7c78[416]][_0x7c78[432]]== null){LegendJSON[_0x7c78[416]][_0x7c78[432]]= _0x7c78[6]};LegendJSON[_0x7c78[416]][_0x7c78[433]]= localStorage[_0x7c78[3]](_0x7c78[433]);if(LegendJSON[_0x7c78[416]][_0x7c78[433]]== _0x7c78[4]|| LegendJSON[_0x7c78[416]][_0x7c78[433]]== null){LegendJSON[_0x7c78[416]][_0x7c78[433]]= _0x7c78[6]};LegendJSON[_0x7c78[416]][_0x7c78[434]]= localStorage[_0x7c78[3]](_0x7c78[434]);if(LegendJSON[_0x7c78[416]][_0x7c78[434]]== _0x7c78[4]|| LegendJSON[_0x7c78[416]][_0x7c78[434]]== null){LegendJSON[_0x7c78[416]][_0x7c78[434]]= _0x7c78[6]};LegendJSON[_0x7c78[416]][_0x7c78[435]]= localStorage[_0x7c78[3]](_0x7c78[435]);if(LegendJSON[_0x7c78[416]][_0x7c78[435]]== _0x7c78[4]|| LegendJSON[_0x7c78[416]][_0x7c78[435]]== null){LegendJSON[_0x7c78[416]][_0x7c78[435]]= _0x7c78[6]};LegendJSON[_0x7c78[416]][_0x7c78[436]]= localStorage[_0x7c78[3]](_0x7c78[436]);if(LegendJSON[_0x7c78[416]][_0x7c78[436]]== _0x7c78[4]|| LegendJSON[_0x7c78[416]][_0x7c78[436]]== null){LegendJSON[_0x7c78[416]][_0x7c78[436]]= _0x7c78[6]};LegendJSON[_0x7c78[416]][_0x7c78[437]]= localStorage[_0x7c78[3]](_0x7c78[437]);if(LegendJSON[_0x7c78[416]][_0x7c78[437]]== _0x7c78[4]|| LegendJSON[_0x7c78[416]][_0x7c78[437]]== null){LegendJSON[_0x7c78[416]][_0x7c78[437]]= _0x7c78[6]};LegendJSON[_0x7c78[416]][_0x7c78[438]]= localStorage[_0x7c78[3]](_0x7c78[438]);if(LegendJSON[_0x7c78[416]][_0x7c78[438]]== _0x7c78[4]|| LegendJSON[_0x7c78[416]][_0x7c78[438]]== null){LegendJSON[_0x7c78[416]][_0x7c78[438]]= _0x7c78[6]};LegendJSON[_0x7c78[416]][_0x7c78[439]]= localStorage[_0x7c78[3]](_0x7c78[439]);if(LegendJSON[_0x7c78[416]][_0x7c78[439]]== _0x7c78[4]|| LegendJSON[_0x7c78[416]][_0x7c78[439]]== null){LegendJSON[_0x7c78[416]][_0x7c78[439]]= _0x7c78[6]};LegendJSON[_0x7c78[416]][_0x7c78[440]]= localStorage[_0x7c78[3]](_0x7c78[440]);if(LegendJSON[_0x7c78[416]][_0x7c78[440]]== _0x7c78[4]|| LegendJSON[_0x7c78[416]][_0x7c78[440]]== null){LegendJSON[_0x7c78[416]][_0x7c78[440]]= _0x7c78[6]};LegendJSON[_0x7c78[416]][_0x7c78[441]]= localStorage[_0x7c78[3]](_0x7c78[441]);if(LegendJSON[_0x7c78[416]][_0x7c78[441]]== _0x7c78[4]|| LegendJSON[_0x7c78[416]][_0x7c78[441]]== null){LegendJSON[_0x7c78[416]][_0x7c78[441]]= _0x7c78[6]};LegendJSON[_0x7c78[416]][_0x7c78[442]]= localStorage[_0x7c78[3]](_0x7c78[442]);if(LegendJSON[_0x7c78[416]][_0x7c78[442]]== _0x7c78[4]|| LegendJSON[_0x7c78[416]][_0x7c78[442]]== null){LegendJSON[_0x7c78[416]][_0x7c78[442]]= _0x7c78[6]};LegendJSON[_0x7c78[416]][_0x7c78[443]]= localStorage[_0x7c78[3]](_0x7c78[443]);if(LegendJSON[_0x7c78[416]][_0x7c78[443]]== _0x7c78[4]|| LegendJSON[_0x7c78[416]][_0x7c78[443]]== null){LegendJSON[_0x7c78[416]][_0x7c78[443]]= _0x7c78[6]};LegendJSON[_0x7c78[416]][_0x7c78[444]]= localStorage[_0x7c78[3]](_0x7c78[444]);if(LegendJSON[_0x7c78[416]][_0x7c78[444]]== _0x7c78[4]|| LegendJSON[_0x7c78[416]][_0x7c78[444]]== null){LegendJSON[_0x7c78[416]][_0x7c78[444]]= _0x7c78[6]};LegendJSON[_0x7c78[416]][_0x7c78[445]]= localStorage[_0x7c78[3]](_0x7c78[445]);if(LegendJSON[_0x7c78[416]][_0x7c78[445]]== _0x7c78[4]|| LegendJSON[_0x7c78[416]][_0x7c78[445]]== null){LegendJSON[_0x7c78[416]][_0x7c78[445]]= _0x7c78[6]};LegendJSON[_0x7c78[416]][_0x7c78[446]]= localStorage[_0x7c78[3]](_0x7c78[446]);if(LegendJSON[_0x7c78[416]][_0x7c78[446]]== _0x7c78[4]|| LegendJSON[_0x7c78[416]][_0x7c78[446]]== null){LegendJSON[_0x7c78[416]][_0x7c78[446]]= _0x7c78[6]};LegendJSON[_0x7c78[416]][_0x7c78[447]]= localStorage[_0x7c78[3]](_0x7c78[447]);if(LegendJSON[_0x7c78[416]][_0x7c78[447]]== _0x7c78[4]|| LegendJSON[_0x7c78[416]][_0x7c78[447]]== null){LegendJSON[_0x7c78[416]][_0x7c78[447]]= _0x7c78[6]};LegendJSON[_0x7c78[416]][_0x7c78[448]]= localStorage[_0x7c78[3]](_0x7c78[448]);if(LegendJSON[_0x7c78[416]][_0x7c78[448]]== _0x7c78[4]|| LegendJSON[_0x7c78[416]][_0x7c78[448]]== null){LegendJSON[_0x7c78[416]][_0x7c78[448]]= _0x7c78[6]};LegendJSON[_0x7c78[416]][_0x7c78[449]]= localStorage[_0x7c78[3]](_0x7c78[449]);if(LegendJSON[_0x7c78[416]][_0x7c78[449]]== _0x7c78[4]|| LegendJSON[_0x7c78[416]][_0x7c78[449]]== null){LegendJSON[_0x7c78[416]][_0x7c78[449]]= _0x7c78[6]};LegendJSON[_0x7c78[416]][_0x7c78[450]]= localStorage[_0x7c78[3]](_0x7c78[450]);if(LegendJSON[_0x7c78[416]][_0x7c78[450]]== _0x7c78[4]|| LegendJSON[_0x7c78[416]][_0x7c78[450]]== null){LegendJSON[_0x7c78[416]][_0x7c78[450]]= _0x7c78[6]};LegendJSON[_0x7c78[416]][_0x7c78[451]]= localStorage[_0x7c78[3]](_0x7c78[451]);if(LegendJSON[_0x7c78[416]][_0x7c78[451]]== _0x7c78[4]|| LegendJSON[_0x7c78[416]][_0x7c78[451]]== null){LegendJSON[_0x7c78[416]][_0x7c78[451]]= _0x7c78[6]};LegendJSON[_0x7c78[416]][_0x7c78[452]]= localStorage[_0x7c78[3]](_0x7c78[452]);if(LegendJSON[_0x7c78[416]][_0x7c78[452]]== _0x7c78[4]|| LegendJSON[_0x7c78[416]][_0x7c78[452]]== null){LegendJSON[_0x7c78[416]][_0x7c78[452]]= _0x7c78[6]};LegendJSON[_0x7c78[416]][_0x7c78[453]]= localStorage[_0x7c78[3]](_0x7c78[453]);if(LegendJSON[_0x7c78[416]][_0x7c78[453]]== _0x7c78[4]|| LegendJSON[_0x7c78[416]][_0x7c78[453]]== null){LegendJSON[_0x7c78[416]][_0x7c78[453]]= _0x7c78[6]};LegendJSON[_0x7c78[416]][_0x7c78[454]]= localStorage[_0x7c78[3]](_0x7c78[454]);if(LegendJSON[_0x7c78[416]][_0x7c78[454]]== _0x7c78[4]|| LegendJSON[_0x7c78[416]][_0x7c78[454]]== null){LegendJSON[_0x7c78[416]][_0x7c78[454]]= _0x7c78[6]};LegendJSON[_0x7c78[416]][_0x7c78[455]]= localStorage[_0x7c78[3]](_0x7c78[455]);if(LegendJSON[_0x7c78[416]][_0x7c78[455]]== _0x7c78[4]|| LegendJSON[_0x7c78[416]][_0x7c78[455]]== null){LegendJSON[_0x7c78[416]][_0x7c78[455]]= _0x7c78[6]};LegendJSON[_0x7c78[416]][_0x7c78[456]]= localStorage[_0x7c78[3]](_0x7c78[456]);if(LegendJSON[_0x7c78[416]][_0x7c78[456]]== _0x7c78[4]|| LegendJSON[_0x7c78[416]][_0x7c78[456]]== null){LegendJSON[_0x7c78[416]][_0x7c78[456]]= _0x7c78[6]};LegendJSON[_0x7c78[416]][_0x7c78[457]]= localStorage[_0x7c78[3]](_0x7c78[457]);if(LegendJSON[_0x7c78[416]][_0x7c78[457]]== _0x7c78[4]|| LegendJSON[_0x7c78[416]][_0x7c78[457]]== null){LegendJSON[_0x7c78[416]][_0x7c78[457]]= _0x7c78[6]};LegendJSON[_0x7c78[416]][_0x7c78[458]]= localStorage[_0x7c78[3]](_0x7c78[458]);if(LegendJSON[_0x7c78[416]][_0x7c78[458]]== _0x7c78[4]|| LegendJSON[_0x7c78[416]][_0x7c78[458]]== null){LegendJSON[_0x7c78[416]][_0x7c78[458]]= _0x7c78[6]};LegendJSON[_0x7c78[416]][_0x7c78[459]]= localStorage[_0x7c78[3]](_0x7c78[459]);if(LegendJSON[_0x7c78[416]][_0x7c78[459]]== _0x7c78[4]|| LegendJSON[_0x7c78[416]][_0x7c78[459]]== null){LegendJSON[_0x7c78[416]][_0x7c78[459]]= _0x7c78[6]};LegendJSON[_0x7c78[416]][_0x7c78[460]]= localStorage[_0x7c78[3]](_0x7c78[460]);if(LegendJSON[_0x7c78[416]][_0x7c78[460]]== _0x7c78[4]|| LegendJSON[_0x7c78[416]][_0x7c78[460]]== null){LegendJSON[_0x7c78[416]][_0x7c78[460]]= _0x7c78[6]};LegendJSON[_0x7c78[416]][_0x7c78[461]]= localStorage[_0x7c78[3]](_0x7c78[461]);if(LegendJSON[_0x7c78[416]][_0x7c78[461]]== _0x7c78[4]|| LegendJSON[_0x7c78[416]][_0x7c78[461]]== null){LegendJSON[_0x7c78[416]][_0x7c78[461]]= _0x7c78[6]};LegendJSON[_0x7c78[416]][_0x7c78[462]]= localStorage[_0x7c78[3]](_0x7c78[462]);if(LegendJSON[_0x7c78[416]][_0x7c78[462]]== _0x7c78[4]|| LegendJSON[_0x7c78[416]][_0x7c78[462]]== null){LegendJSON[_0x7c78[416]][_0x7c78[462]]= _0x7c78[6]};LegendJSON[_0x7c78[416]][_0x7c78[463]]= localStorage[_0x7c78[3]](_0x7c78[463]);if(LegendJSON[_0x7c78[416]][_0x7c78[463]]== _0x7c78[4]|| LegendJSON[_0x7c78[416]][_0x7c78[463]]== null){LegendJSON[_0x7c78[416]][_0x7c78[463]]= _0x7c78[6]};LegendJSON[_0x7c78[416]][_0x7c78[464]]= localStorage[_0x7c78[3]](_0x7c78[464]);if(LegendJSON[_0x7c78[416]][_0x7c78[464]]== _0x7c78[4]|| LegendJSON[_0x7c78[416]][_0x7c78[464]]== null){LegendJSON[_0x7c78[416]][_0x7c78[464]]= _0x7c78[6]};LegendJSON[_0x7c78[416]][_0x7c78[465]]= localStorage[_0x7c78[3]](_0x7c78[465]);if(LegendJSON[_0x7c78[416]][_0x7c78[465]]== _0x7c78[4]|| LegendJSON[_0x7c78[416]][_0x7c78[465]]== null){LegendJSON[_0x7c78[416]][_0x7c78[465]]= _0x7c78[6]};LegendJSON[_0x7c78[416]][_0x7c78[466]]= localStorage[_0x7c78[3]](_0x7c78[466]);if(LegendJSON[_0x7c78[416]][_0x7c78[466]]== _0x7c78[4]|| LegendJSON[_0x7c78[416]][_0x7c78[466]]== null){LegendJSON[_0x7c78[416]][_0x7c78[466]]= _0x7c78[6]};LegendJSON[_0x7c78[416]][_0x7c78[467]]= localStorage[_0x7c78[3]](_0x7c78[467]);if(LegendJSON[_0x7c78[416]][_0x7c78[467]]== _0x7c78[4]|| LegendJSON[_0x7c78[416]][_0x7c78[467]]== null){LegendJSON[_0x7c78[416]][_0x7c78[467]]= _0x7c78[6]};return LegendJSON}function LegendSettingsImport(switcheryLegendSwitch2){if(switcheryLegendSwitch2[_0x7c78[414]]()){LegendJSON= JSON[_0x7c78[107]](document[_0x7c78[407]](_0x7c78[468])[_0x7c78[405]]);saveLegendJSONAPI();setTimeout(function(){$(_0x7c78[410])[_0x7c78[208]]()},100)}else {$(_0x7c78[410])[_0x7c78[208]]()}}function saveLegendJSONAPI(){if(LegendJSON[_0x7c78[416]]!= undefined){localStorage[_0x7c78[117]](_0x7c78[7],LegendJSON[_0x7c78[416]][_0x7c78[417]]);localStorage[_0x7c78[117]](_0x7c78[8],LegendJSON[_0x7c78[416]][_0x7c78[8]]);localStorage[_0x7c78[117]](_0x7c78[39],LegendJSON[_0x7c78[416]][_0x7c78[39]]);localStorage[_0x7c78[117]](_0x7c78[45],LegendJSON[_0x7c78[416]][_0x7c78[418]]);localStorage[_0x7c78[117]](_0x7c78[46],LegendJSON[_0x7c78[416]][_0x7c78[46]]);localStorage[_0x7c78[117]](_0x7c78[47],LegendJSON[_0x7c78[416]].SHOSHOBtn);localStorage[_0x7c78[117]](_0x7c78[48],LegendJSON[_0x7c78[416]].XPBtn);localStorage[_0x7c78[117]](_0x7c78[49],LegendJSON[_0x7c78[416]].MAINBTBtn);localStorage[_0x7c78[117]](_0x7c78[50],LegendJSON[_0x7c78[416]].AnimatedSkinBtn);localStorage[_0x7c78[117]](_0x7c78[51],LegendJSON[_0x7c78[416]].TIMEcalBtn);localStorage[_0x7c78[117]](_0x7c78[52],LegendJSON[_0x7c78[416]][_0x7c78[52]]);localStorage[_0x7c78[117]](_0x7c78[105],LegendJSON[_0x7c78[416]][_0x7c78[105]]);localStorage[_0x7c78[117]](_0x7c78[113],LegendJSON[_0x7c78[416]][_0x7c78[113]]);localStorage[_0x7c78[117]](_0x7c78[420],LegendJSON[_0x7c78[416]][_0x7c78[419]]);localStorage[_0x7c78[117]](_0x7c78[38],LegendJSON[_0x7c78[416]][_0x7c78[38]]);localStorage[_0x7c78[117]](_0x7c78[421],LegendJSON[_0x7c78[416]][_0x7c78[421]]);localStorage[_0x7c78[117]](_0x7c78[422],LegendJSON[_0x7c78[416]][_0x7c78[422]]);localStorage[_0x7c78[117]](_0x7c78[423],LegendJSON[_0x7c78[416]][_0x7c78[423]]);localStorage[_0x7c78[117]](_0x7c78[424],LegendJSON[_0x7c78[416]][_0x7c78[424]]);localStorage[_0x7c78[117]](_0x7c78[425],LegendJSON[_0x7c78[416]][_0x7c78[425]]);localStorage[_0x7c78[117]](_0x7c78[426],LegendJSON[_0x7c78[416]][_0x7c78[426]]);localStorage[_0x7c78[117]](_0x7c78[427],LegendJSON[_0x7c78[416]][_0x7c78[427]]);localStorage[_0x7c78[117]](_0x7c78[428],LegendJSON[_0x7c78[416]][_0x7c78[428]]);localStorage[_0x7c78[117]](_0x7c78[429],LegendJSON[_0x7c78[416]][_0x7c78[429]]);localStorage[_0x7c78[117]](_0x7c78[430],LegendJSON[_0x7c78[416]][_0x7c78[430]]);localStorage[_0x7c78[117]](_0x7c78[41],LegendJSON[_0x7c78[416]][_0x7c78[41]]);localStorage[_0x7c78[117]](_0x7c78[431],LegendJSON[_0x7c78[416]][_0x7c78[431]]);localStorage[_0x7c78[117]](_0x7c78[42],LegendJSON[_0x7c78[416]][_0x7c78[42]]);localStorage[_0x7c78[117]](_0x7c78[43],LegendJSON[_0x7c78[416]][_0x7c78[43]]);localStorage[_0x7c78[117]](_0x7c78[44],LegendJSON[_0x7c78[416]][_0x7c78[44]]);localStorage[_0x7c78[117]](_0x7c78[40],LegendJSON[_0x7c78[416]][_0x7c78[40]]);localStorage[_0x7c78[117]](_0x7c78[432],LegendJSON[_0x7c78[416]][_0x7c78[432]]);localStorage[_0x7c78[117]](_0x7c78[433],LegendJSON[_0x7c78[416]][_0x7c78[433]]);localStorage[_0x7c78[117]](_0x7c78[434],LegendJSON[_0x7c78[416]][_0x7c78[434]]);localStorage[_0x7c78[117]](_0x7c78[435],LegendJSON[_0x7c78[416]][_0x7c78[435]]);localStorage[_0x7c78[117]](_0x7c78[436],LegendJSON[_0x7c78[416]][_0x7c78[436]]);localStorage[_0x7c78[117]](_0x7c78[437],LegendJSON[_0x7c78[416]][_0x7c78[437]]);localStorage[_0x7c78[117]](_0x7c78[438],LegendJSON[_0x7c78[416]][_0x7c78[438]]);localStorage[_0x7c78[117]](_0x7c78[439],LegendJSON[_0x7c78[416]][_0x7c78[439]]);localStorage[_0x7c78[117]](_0x7c78[440],LegendJSON[_0x7c78[416]][_0x7c78[440]]);localStorage[_0x7c78[117]](_0x7c78[441],LegendJSON[_0x7c78[416]][_0x7c78[441]]);localStorage[_0x7c78[117]](_0x7c78[442],LegendJSON[_0x7c78[416]][_0x7c78[442]]);localStorage[_0x7c78[117]](_0x7c78[443],LegendJSON[_0x7c78[416]][_0x7c78[443]]);localStorage[_0x7c78[117]](_0x7c78[444],LegendJSON[_0x7c78[416]][_0x7c78[444]]);localStorage[_0x7c78[117]](_0x7c78[445],LegendJSON[_0x7c78[416]][_0x7c78[445]]);localStorage[_0x7c78[117]](_0x7c78[446],LegendJSON[_0x7c78[416]][_0x7c78[446]]);localStorage[_0x7c78[117]](_0x7c78[447],LegendJSON[_0x7c78[416]][_0x7c78[447]]);localStorage[_0x7c78[117]](_0x7c78[448],LegendJSON[_0x7c78[416]][_0x7c78[448]]);localStorage[_0x7c78[117]](_0x7c78[449],LegendJSON[_0x7c78[416]][_0x7c78[449]]);localStorage[_0x7c78[117]](_0x7c78[450],LegendJSON[_0x7c78[416]][_0x7c78[450]]);localStorage[_0x7c78[117]](_0x7c78[451],LegendJSON[_0x7c78[416]][_0x7c78[451]]);localStorage[_0x7c78[117]](_0x7c78[452],LegendJSON[_0x7c78[416]][_0x7c78[452]]);localStorage[_0x7c78[117]](_0x7c78[453],LegendJSON[_0x7c78[416]][_0x7c78[453]]);localStorage[_0x7c78[117]](_0x7c78[454],LegendJSON[_0x7c78[416]][_0x7c78[454]]);localStorage[_0x7c78[117]](_0x7c78[455],LegendJSON[_0x7c78[416]][_0x7c78[455]]);localStorage[_0x7c78[117]](_0x7c78[456],LegendJSON[_0x7c78[416]][_0x7c78[456]]);localStorage[_0x7c78[117]](_0x7c78[457],LegendJSON[_0x7c78[416]][_0x7c78[457]]);localStorage[_0x7c78[117]](_0x7c78[458],LegendJSON[_0x7c78[416]].Userscript1);localStorage[_0x7c78[117]](_0x7c78[459],LegendJSON[_0x7c78[416]].Userscript2);localStorage[_0x7c78[117]](_0x7c78[460],LegendJSON[_0x7c78[416]].Userscript3);localStorage[_0x7c78[117]](_0x7c78[461],LegendJSON[_0x7c78[416]].Userscript4);localStorage[_0x7c78[117]](_0x7c78[462],LegendJSON[_0x7c78[416]].Userscript5);localStorage[_0x7c78[117]](_0x7c78[463],LegendJSON[_0x7c78[416]].Userscripttexture1);localStorage[_0x7c78[117]](_0x7c78[464],LegendJSON[_0x7c78[416]].Userscripttexture2);localStorage[_0x7c78[117]](_0x7c78[465],LegendJSON[_0x7c78[416]].Userscripttexture3);localStorage[_0x7c78[117]](_0x7c78[466],LegendJSON[_0x7c78[416]].Userscripttexture4);localStorage[_0x7c78[117]](_0x7c78[467],LegendJSON[_0x7c78[416]].Userscripttexture5)}}function YoutubeEmbPlayer(_0x1499x109){var _0x1499x10a=getEmbedUrl(_0x1499x109[_0x7c78[158]]());if(_0x1499x10a== false){toastr[_0x7c78[173]](Premadeletter1)[_0x7c78[73]](_0x7c78[71],_0x7c78[267]);if(localStorage[_0x7c78[3]](_0x7c78[420])== null){$(_0x7c78[469])[_0x7c78[59]](defaultMusicUrl)}else {$(_0x7c78[469])[_0x7c78[59]](localStorage[_0x7c78[3]](_0x7c78[420]))}}else {$(_0x7c78[471])[_0x7c78[206]](_0x7c78[470],_0x1499x10a);localStorage[_0x7c78[117]](_0x7c78[420],_0x1499x109[_0x7c78[158]]())}}function MsgCommands1(MSGCOMMANDS,MSGNICK){if(MSGCOMMANDS[_0x7c78[55]](_0x7c78[472])){if($(_0x7c78[293])[_0x7c78[59]]()[_0x7c78[55]](_0x7c78[53])== false){$(_0x7c78[473])[_0x7c78[176]]();$(_0x7c78[474])[_0x7c78[176]]()};MSGCOMMANDS= MSGCOMMANDS[_0x7c78[190]](_0x7c78[472])[_0x7c78[475]]();MSGCOMMANDS= MSGCOMMANDS[_0x7c78[190]](_0x7c78[476])[0];if(MSGCOMMANDS[_0x7c78[55]](_0x7c78[477])== false&& MSGCOMMANDS[_0x7c78[55]](_0x7c78[477])== false&& MSGCOMMANDS[_0x7c78[55]](_0x7c78[478])== false&& MSGCOMMANDS[_0x7c78[55]](_0x7c78[479])== false){MSGCOMMANDS= _0x7c78[477]+ MSGCOMMANDS};toastr[_0x7c78[184]](Premadeletter22+ _0x7c78[481]+ MSGNICK+ _0x7c78[481]+ Premadeletter63+ _0x7c78[482]+ MSGCOMMANDS+ _0x7c78[483]+ MSGCOMMANDS+ _0x7c78[484]+ Premadeletter24+ _0x7c78[485]+ Premadeletter25+ _0x7c78[172],_0x7c78[6],{timeOut:20000,extendedTimeOut:20000})[_0x7c78[73]](_0x7c78[71],_0x7c78[480]);$(_0x7c78[487])[_0x7c78[208]](function(){window[_0x7c78[119]](MSGCOMMANDS,_0x7c78[486])})}else {if(MSGCOMMANDS[_0x7c78[55]](_0x7c78[488])){if($(_0x7c78[293])[_0x7c78[59]]()[_0x7c78[55]](_0x7c78[489])== false){$(_0x7c78[473])[_0x7c78[176]]();$(_0x7c78[474])[_0x7c78[176]]()};MSGCOMMANDS= MSGCOMMANDS[_0x7c78[190]](_0x7c78[488])[_0x7c78[475]]();MSGCOMMANDS= MSGCOMMANDS[_0x7c78[190]](_0x7c78[490])[0];if(MSGCOMMANDS!= _0x7c78[6]){toastr[_0x7c78[184]](Premadeletter22+ _0x7c78[481]+ MSGNICK+ _0x7c78[481]+ Premadeletter63a+ _0x7c78[491]+ MSGCOMMANDS+ _0x7c78[483]+ MSGCOMMANDS+ _0x7c78[492]+ Premadeletter24+ _0x7c78[485]+ Premadeletter25+ _0x7c78[172],_0x7c78[6],{timeOut:20000,extendedTimeOut:20000})[_0x7c78[73]](_0x7c78[71],_0x7c78[480]);$(_0x7c78[487])[_0x7c78[208]](function(){$(_0x7c78[493])[_0x7c78[59]](MSGCOMMANDS);$(_0x7c78[493])[_0x7c78[73]](_0x7c78[397],_0x7c78[494]);newsubmit()})}else {toastr[_0x7c78[184]](Premadeletter22+ _0x7c78[481]+ MSGNICK+ _0x7c78[481]+ Premadeletter63b+ _0x7c78[491]+ MSGCOMMANDS+ _0x7c78[483]+ MSGCOMMANDS+ _0x7c78[492]+ Premadeletter24+ _0x7c78[485]+ Premadeletter25+ _0x7c78[172],_0x7c78[6],{timeOut:20000,extendedTimeOut:20000})[_0x7c78[73]](_0x7c78[71],_0x7c78[480]);$(_0x7c78[487])[_0x7c78[208]](function(){$(_0x7c78[493])[_0x7c78[59]](MSGCOMMANDS);$(_0x7c78[493])[_0x7c78[73]](_0x7c78[397],_0x7c78[494]);newsubmit()})}}else {if(MSGCOMMANDS[_0x7c78[55]](_0x7c78[495])){if($(_0x7c78[293])[_0x7c78[59]]()[_0x7c78[55]](_0x7c78[496])== false){$(_0x7c78[473])[_0x7c78[176]]();$(_0x7c78[474])[_0x7c78[176]]()};MSGCOMMANDS= MSGCOMMANDS[_0x7c78[190]](_0x7c78[495])[_0x7c78[475]]();MSGCOMMANDS= MSGCOMMANDS[_0x7c78[190]](_0x7c78[497])[0];if(MSGCOMMANDS[_0x7c78[55]](_0x7c78[477])== false&& MSGCOMMANDS[_0x7c78[55]](_0x7c78[477])== false&& MSGCOMMANDS[_0x7c78[55]](_0x7c78[479])== false&& MSGCOMMANDS[_0x7c78[55]](_0x7c78[479])== false){MSGCOMMANDS= _0x7c78[477]+ MSGCOMMANDS};toastr[_0x7c78[184]](Premadeletter22+ _0x7c78[481]+ MSGNICK+ _0x7c78[481]+ Premadeletter64+ _0x7c78[482]+ MSGCOMMANDS+ _0x7c78[483]+ MSGCOMMANDS+ _0x7c78[498]+ getParameterByName(_0x7c78[160],MSGCOMMANDS)+ _0x7c78[499]+ Premadeletter24+ _0x7c78[500]+ Premadeletter25+ _0x7c78[172],_0x7c78[6],{timeOut:20000,extendedTimeOut:20000})[_0x7c78[73]](_0x7c78[71],_0x7c78[169]);$(_0x7c78[501])[_0x7c78[208]](function(){YoutubeEmbPlayer(MSGCOMMANDS);$(_0x7c78[469])[_0x7c78[59]](MSGCOMMANDS);playYoutube()})}else {if(MSGCOMMANDS[_0x7c78[55]](_0x7c78[502])){if($(_0x7c78[293])[_0x7c78[59]]()[_0x7c78[55]](_0x7c78[503])== false){$(_0x7c78[473])[_0x7c78[176]]();$(_0x7c78[474])[_0x7c78[176]]()};MSGCOMMANDS= MSGCOMMANDS[_0x7c78[190]](_0x7c78[502])[_0x7c78[475]]();MSGCOMMANDS= MSGCOMMANDS[_0x7c78[190]](_0x7c78[504])[0];if(MSGCOMMANDS[_0x7c78[55]](_0x7c78[477])== false&& MSGCOMMANDS[_0x7c78[55]](_0x7c78[477])== false&& MSGCOMMANDS[_0x7c78[55]](_0x7c78[478])== false&& MSGCOMMANDS[_0x7c78[55]](_0x7c78[479])== false){MSGCOMMANDS= _0x7c78[477]+ MSGCOMMANDS};if(MSGCOMMANDS[_0x7c78[55]](_0x7c78[505])){toastr[_0x7c78[184]](_0x7c78[506]+ Premadeletter22+ _0x7c78[481]+ MSGNICK+ _0x7c78[481]+ Premadeletter65+ _0x7c78[482]+ MSGCOMMANDS+ _0x7c78[483]+ MSGCOMMANDS+ _0x7c78[484]+ Premadeletter24+ _0x7c78[485]+ Premadeletter25+ _0x7c78[172],_0x7c78[6],{timeOut:10000,extendedTimeOut:10000})[_0x7c78[73]](_0x7c78[71],_0x7c78[169]);$(_0x7c78[487])[_0x7c78[208]](function(){window[_0x7c78[119]](MSGCOMMANDS,_0x7c78[486])})}}else {if(MSGCOMMANDS[_0x7c78[55]](_0x7c78[507])){if($(_0x7c78[293])[_0x7c78[59]]()[_0x7c78[55]](_0x7c78[508])== false){$(_0x7c78[473])[_0x7c78[176]]();$(_0x7c78[474])[_0x7c78[176]]()};MSGCOMMANDS= MSGCOMMANDS[_0x7c78[190]](_0x7c78[507])[_0x7c78[475]]();MSGCOMMANDS= MSGCOMMANDS[_0x7c78[190]](_0x7c78[509])[0];if(MSGCOMMANDS[_0x7c78[55]](_0x7c78[477])== false&& MSGCOMMANDS[_0x7c78[55]](_0x7c78[477])== false&& MSGCOMMANDS[_0x7c78[55]](_0x7c78[479])== false&& MSGCOMMANDS[_0x7c78[55]](_0x7c78[479])== false){MSGCOMMANDS= _0x7c78[477]+ MSGCOMMANDS};if(MSGCOMMANDS[_0x7c78[55]](_0x7c78[510])|| MSGCOMMANDS[_0x7c78[55]](_0x7c78[511])|| MSGCOMMANDS[_0x7c78[55]](_0x7c78[512])){toastr[_0x7c78[184]](_0x7c78[513]+ Premadeletter22+ _0x7c78[481]+ MSGNICK+ _0x7c78[481]+ Premadeletter66+ _0x7c78[482]+ MSGCOMMANDS+ _0x7c78[483]+ MSGCOMMANDS+ _0x7c78[484]+ Premadeletter24+ _0x7c78[485]+ Premadeletter25+ _0x7c78[172],_0x7c78[6],{timeOut:20000,extendedTimeOut:20000})[_0x7c78[73]](_0x7c78[71],_0x7c78[169]);$(_0x7c78[487])[_0x7c78[208]](function(){window[_0x7c78[119]](MSGCOMMANDS,_0x7c78[486])})}}else {if(MSGCOMMANDS[_0x7c78[55]](_0x7c78[514])){playerMsg= getParameterByName(_0x7c78[94],MSGCOMMANDS);commandMsg= getParameterByName(_0x7c78[515],MSGCOMMANDS);otherMsg= getParameterByName(_0x7c78[516],MSGCOMMANDS);$(_0x7c78[473])[_0x7c78[176]]();$(_0x7c78[474])[_0x7c78[176]]();if(commandMsg== _0x7c78[517]){$(_0x7c78[520])[_0x7c78[73]](_0x7c78[518],_0x7c78[519])[_0x7c78[73]]({opacity:0.8});setTimeout(function(){$(_0x7c78[520])[_0x7c78[73]](_0x7c78[518],_0x7c78[521])[_0x7c78[73]]({opacity:1})},12000)}else {if(commandMsg== _0x7c78[522]){if($(_0x7c78[524])[_0x7c78[73]](_0x7c78[523])== _0x7c78[525]){if($(_0x7c78[493])[_0x7c78[59]]()!= _0x7c78[6]){var _0x1499x10c=$(_0x7c78[293])[_0x7c78[59]]();$(_0x7c78[293])[_0x7c78[59]](_0x7c78[526]);$(_0x7c78[527])[_0x7c78[87]]();newsubmit();setTimeout(function(){$(_0x7c78[293])[_0x7c78[59]](_0x1499x10c);$(_0x7c78[527])[_0x7c78[87]]();newsubmit()},5000)}}}else {if(commandMsg== _0x7c78[528]){toastr[_0x7c78[184]](Premadeletter22+ _0x7c78[481]+ playerMsg+ _0x7c78[481]+ Premadeletter23+ _0x7c78[529]+ Premadeletter24+ _0x7c78[530]+ Premadeletter25+ _0x7c78[172],_0x7c78[6],{timeOut:20000,extendedTimeOut:20000})[_0x7c78[73]](_0x7c78[71],_0x7c78[267]);$(_0x7c78[532])[_0x7c78[208]](function(){$(_0x7c78[531])[_0x7c78[208]]()})}else {if(commandMsg== _0x7c78[533]){toastr[_0x7c78[184]](Premadeletter22+ _0x7c78[481]+ playerMsg+ _0x7c78[481]+ Premadeletter26+ _0x7c78[273]+ playerMsg+ _0x7c78[534]+ Premadeletter24+ _0x7c78[535]+ Premadeletter25+ _0x7c78[172],_0x7c78[6],{timeOut:20000,extendedTimeOut:20000})[_0x7c78[73]](_0x7c78[71],_0x7c78[267]);$(_0x7c78[536])[_0x7c78[208]](function(){$(_0x7c78[293])[_0x7c78[59]](playerMsg);$(_0x7c78[527])[_0x7c78[87]]();newsubmit()})}else {if(commandMsg== _0x7c78[537]){toastr[_0x7c78[184]](Premadeletter22+ _0x7c78[481]+ playerMsg+ _0x7c78[481]+ Premadeletter27+ _0x7c78[538]+ Premadeletter24+ _0x7c78[539]+ Premadeletter25+ _0x7c78[172],_0x7c78[6],{timeOut:20000,extendedTimeOut:20000})[_0x7c78[73]](_0x7c78[71],_0x7c78[267]);$(_0x7c78[540])[_0x7c78[208]](function(){settrolling()})}else {if(commandMsg== _0x7c78[541]){toastr[_0x7c78[184]](Premadeletter22+ _0x7c78[481]+ playerMsg+ _0x7c78[481]+ Premadeletter28+ _0x7c78[542]+ Premadeletter24+ _0x7c78[543]+ Premadeletter25+ _0x7c78[172],_0x7c78[6],{timeOut:20000,extendedTimeOut:20000})[_0x7c78[73]](_0x7c78[71],_0x7c78[267]);$(_0x7c78[546])[_0x7c78[208]](function(){$(_0x7c78[544])[_0x7c78[208]]();setTimeout(function(){$(_0x7c78[544])[_0x7c78[545]]()},100)})}}}}}}}else {if(MSGCOMMANDS[_0x7c78[55]](_0x7c78[547])){commandMsg= getParameterByName(_0x7c78[515],MSGCOMMANDS);otherMsg= getParameterByName(_0x7c78[516],MSGCOMMANDS);$(_0x7c78[473])[_0x7c78[176]]();$(_0x7c78[474])[_0x7c78[176]]();LegendClanSymbol= $(_0x7c78[293])[_0x7c78[59]]();console[_0x7c78[283]](_0x7c78[548]);if(~LegendClanSymbol[_0x7c78[179]](_0x7c78[549])!= -1){console[_0x7c78[283]](_0x7c78[550]);if(commandMsg== _0x7c78[551]){setTimeout(function(){$(_0x7c78[295])[_0x7c78[208]]()},60000)}else {if(commandMsg== _0x7c78[552]){$(_0x7c78[295])[_0x7c78[208]]()}else {$(_0x7c78[295])[_0x7c78[208]]()}}}}else {if(MSGCOMMANDS[_0x7c78[55]](_0x7c78[553])){if($(_0x7c78[293])[_0x7c78[59]]()[_0x7c78[55]](_0x7c78[554])== false){$(_0x7c78[473])[_0x7c78[176]]();$(_0x7c78[474])[_0x7c78[176]]()};MSGCOMMANDS= MSGCOMMANDS[_0x7c78[190]](_0x7c78[553])[_0x7c78[475]]();MSGCOMMANDS= MSGCOMMANDS[_0x7c78[190]](_0x7c78[555])[0];var _0x1499x10d=MSGCOMMANDS[_0x7c78[190]](_0x7c78[556]);window[_0x7c78[557]]= _0x1499x10d[0];window[_0x7c78[558]]= _0x1499x10d[1];window[_0x7c78[559]]= parseFloat(window[_0x7c78[557]])- legendmod[_0x7c78[560]];window[_0x7c78[561]]= parseFloat(window[_0x7c78[558]])- legendmod[_0x7c78[562]];legendmod[_0x7c78[563]]= true;toastr[_0x7c78[184]](_0x7c78[564]+ MSGNICK+ _0x7c78[565]+ application[_0x7c78[566]](window[_0x7c78[559]],window[_0x7c78[561]],true))[_0x7c78[73]](_0x7c78[71],_0x7c78[267])}else {if(MSGCOMMANDS[_0x7c78[55]](_0x7c78[567])){if($(_0x7c78[293])[_0x7c78[59]]()[_0x7c78[55]](_0x7c78[568])== false){$(_0x7c78[473])[_0x7c78[176]]();$(_0x7c78[474])[_0x7c78[176]]()};MSGCOMMANDS= MSGCOMMANDS[_0x7c78[190]](_0x7c78[567])[_0x7c78[475]]();MSGCOMMANDS= MSGCOMMANDS[_0x7c78[190]](_0x7c78[569])[0];var _0x1499x10d=MSGCOMMANDS[_0x7c78[190]](_0x7c78[556]);window[_0x7c78[557]]= _0x1499x10d[0];window[_0x7c78[558]]= _0x1499x10d[1];window[_0x7c78[559]]= parseFloat(window[_0x7c78[557]])- legendmod[_0x7c78[560]];window[_0x7c78[561]]= parseFloat(window[_0x7c78[558]])- legendmod[_0x7c78[562]];legendmod[_0x7c78[563]]= true;toastr[_0x7c78[184]](_0x7c78[564]+ MSGNICK+ _0x7c78[570]+ application[_0x7c78[566]](window[_0x7c78[559]],window[_0x7c78[561]],true))[_0x7c78[73]](_0x7c78[71],_0x7c78[267])}else {if(MSGCOMMANDS[_0x7c78[55]](_0x7c78[571])){if($(_0x7c78[293])[_0x7c78[59]]()[_0x7c78[55]](_0x7c78[572])== false){$(_0x7c78[473])[_0x7c78[176]]();$(_0x7c78[474])[_0x7c78[176]]()};MSGCOMMANDS= MSGCOMMANDS[_0x7c78[190]](_0x7c78[571])[_0x7c78[475]]();MSGCOMMANDS= MSGCOMMANDS[_0x7c78[190]](_0x7c78[573])[0];var _0x1499x10d=MSGCOMMANDS[_0x7c78[190]](_0x7c78[556]);window[_0x7c78[557]]= _0x1499x10d[0];window[_0x7c78[558]]= _0x1499x10d[1];window[_0x7c78[559]]= parseFloat(window[_0x7c78[557]])- legendmod[_0x7c78[560]];window[_0x7c78[561]]= parseFloat(window[_0x7c78[558]])- legendmod[_0x7c78[562]];legendmod[_0x7c78[563]]= true;toastr[_0x7c78[184]](_0x7c78[564]+ MSGNICK+ _0x7c78[574]+ application[_0x7c78[566]](window[_0x7c78[559]],window[_0x7c78[561]],true))[_0x7c78[73]](_0x7c78[71],_0x7c78[267])}}}}}}}}}}}function isLegendExpress(Express){if(messageone!= _0x7c78[101]&& messageone!= _0x7c78[575]){return Express= _0x7c78[576]}else {return Express= _0x7c78[114]}}function MsgServCommandsreturner2(MSGCOMMANDS2a){return MSGCOMMANDS2a}function MsgServCommandsreturner(){MSGCOMMANDS2= MSGCOMMANDS;MSGCOMMANDS3= MSGCOMMANDS;MSGCOMMANDS2= MSGCOMMANDS2[_0x7c78[190]](_0x7c78[577])[_0x7c78[475]]();MSGCOMMANDS2= MSGCOMMANDS2[_0x7c78[190]](_0x7c78[578])[0];if(MSGCOMMANDS2[_0x7c78[55]](_0x7c78[477])== false&& MSGCOMMANDS2[_0x7c78[55]](_0x7c78[477])== false&& MSGCOMMANDS2[_0x7c78[55]](_0x7c78[478])== false&& MSGCOMMANDS2[_0x7c78[55]](_0x7c78[479])== false){MSGCOMMANDS2= _0x7c78[477]+ MSGCOMMANDS2};if(MSGCOMMANDS2[_0x7c78[55]](_0x7c78[249])){MSGCOMMANDS2a= MSGCOMMANDS2;MsgServCommandsreturner2(MSGCOMMANDS2a);MSGCOMMANDSA= _0x7c78[579]+ MSGCOMMANDS2a[_0x7c78[190]](_0x7c78[579])[_0x7c78[475]]();toastr[_0x7c78[184]](_0x7c78[580]+ Premadeletter22+ _0x7c78[481]+ MSGNICK+ _0x7c78[481]+ Premadeletter67+ _0x7c78[581]+ MSGCOMMANDSA+ _0x7c78[582]+ Premadeletter24+ _0x7c78[485]+ Premadeletter25+ _0x7c78[583],_0x7c78[6],{timeOut:10000,extendedTimeOut:10000})[_0x7c78[73]](_0x7c78[71],_0x7c78[169])}else {if(getParameterByName(_0x7c78[89],MSGCOMMANDS2a)!= null){var _0x1499x111,_0x1499x112;if(getParameterByName(_0x7c78[93],MSGCOMMANDS)== null){_0x1499x112= _0x7c78[584]}else {_0x1499x112= getParameterByName(_0x7c78[93],MSGCOMMANDS)};if(getParameterByName(_0x7c78[585],MSGCOMMANDS)== null){_0x1499x111= _0x7c78[586]}else {_0x1499x111= getParameterByName(_0x7c78[585],MSGCOMMANDS)};toastr[_0x7c78[184]](_0x7c78[580]+ Premadeletter22+ _0x7c78[481]+ MSGNICK+ _0x7c78[481]+ Premadeletter67+ _0x7c78[587]+ getParameterByName(_0x7c78[92],MSGCOMMANDS)[_0x7c78[168]](_0x7c78[212],_0x7c78[6])[_0x7c78[168]](_0x7c78[214],_0x7c78[6])+ _0x7c78[588]+ _0x1499x111+ _0x7c78[589]+ getParameterByName(_0x7c78[89],MSGCOMMANDS)+ _0x7c78[590]+ _0x1499x112+ _0x7c78[591]+ Premadeletter24+ _0x7c78[485]+ Premadeletter25+ _0x7c78[583],_0x7c78[6],{timeOut:10000,extendedTimeOut:10000})[_0x7c78[73]](_0x7c78[71],_0x7c78[169])}else {var _0x1499x112;if(getParameterByName(_0x7c78[93],MSGCOMMANDS)== null){_0x1499x112= _0x7c78[584]}else {_0x1499x112= getParameterByName(_0x7c78[93],MSGCOMMANDS)};toastr[_0x7c78[184]](_0x7c78[580]+ Premadeletter22+ _0x7c78[481]+ MSGNICK+ _0x7c78[481]+ Premadeletter67+ _0x7c78[587]+ getParameterByName(_0x7c78[92],MSGCOMMANDS)[_0x7c78[168]](_0x7c78[212],_0x7c78[6])[_0x7c78[168]](_0x7c78[214],_0x7c78[6])+ _0x7c78[590]+ _0x1499x112+ _0x7c78[582]+ Premadeletter24+ _0x7c78[485]+ Premadeletter25+ _0x7c78[583],_0x7c78[6],{timeOut:10000,extendedTimeOut:10000})[_0x7c78[73]](_0x7c78[71],_0x7c78[169])}};return MSGCOMMANDS,MSGCOMMANDS2,MSGCOMMANDS2a,MSGCOMMANDSA,MSGCOMMANDS3}function universalchat(){setTimeout(function(){if(application){application[_0x7c78[592]]()}},2000);var legbgpic=$(_0x7c78[103])[_0x7c78[59]]();var legbgcolor=$(_0x7c78[102])[_0x7c78[59]]();window[_0x7c78[593]]= [];var _0x1499x114=window;var _0x1499x115={"\x6E\x61\x6D\x65":_0x7c78[594],"\x6C\x6F\x67":function(_0x1499x116){if(($(_0x7c78[597])[_0x7c78[596]](_0x7c78[595])== false)){if(~_0x1499x116[_0x7c78[179]](_0x7c78[598])){if(~_0x1499x116[_0x7c78[179]](_0x7c78[599])){}else {toastr[_0x7c78[270]](_0x7c78[600]+ this[_0x7c78[601]]+ _0x7c78[602]+ _0x1499x116+ _0x7c78[603])}}else {if(~_0x1499x116[_0x7c78[179]](Premadeletter109b+ _0x7c78[604])){toastr[_0x7c78[184]](_0x7c78[600]+ this[_0x7c78[601]]+ _0x7c78[602]+ _0x1499x116+ _0x7c78[603])}else {if(~_0x1499x116[_0x7c78[179]](_0x7c78[605])){toastr[_0x7c78[184]](_0x7c78[600]+ this[_0x7c78[601]]+ _0x7c78[602]+ _0x1499x116+ _0x7c78[603])}else {if(~_0x1499x116[_0x7c78[179]]($(_0x7c78[293])[_0x7c78[59]]()+ _0x7c78[239])){if(window[_0x7c78[606]]){toastr[_0x7c78[270]](_0x7c78[600]+ this[_0x7c78[601]]+ _0x7c78[602]+ _0x1499x116+ _0x7c78[603]);playSound($(_0x7c78[607])[_0x7c78[59]]())}else {}}else {if(~_0x1499x116[_0x7c78[179]](_0x7c78[608])){}else {if(~_0x1499x116[_0x7c78[179]](_0x7c78[189])){_0x1499x116[_0x7c78[181]](1);toastr[_0x7c78[184]](_0x7c78[600]+ this[_0x7c78[601]]+ _0x7c78[602]+ _0x1499x116+ _0x7c78[603]);playSound($(_0x7c78[609])[_0x7c78[59]]())}else {toastr[_0x7c78[270]](_0x7c78[600]+ this[_0x7c78[601]]+ _0x7c78[602]+ _0x1499x116+ _0x7c78[603]);playSound($(_0x7c78[607])[_0x7c78[59]]())}}}}}}}},"\x74\x6F\x6F\x6C\x5F\x73\x79\x6D\x62\x6F\x6C":_0x7c78[6]};_0x7c78[610];var _0x1499x117={"\x41\x67\x61\x72\x54\x6F\x6F\x6C\x56\x65\x72\x73\x69\x6F\x6E":5,"\x41\x67\x61\x72\x54\x6F\x6F\x6C\x53\x65\x72\x76\x65\x72":_0x7c78[611],minimapBalls:{},"\x73\x6F\x63\x6B\x65\x74\x49\x6F\x55\x52\x4C":_0x7c78[612],"\x6D\x69\x6E\x69\x6D\x61\x70\x4E\x69\x63\x6B\x46\x6F\x6E\x74":_0x7c78[613],"\x6D\x69\x6E\x69\x6D\x61\x70\x4E\x69\x63\x6B\x43\x6F\x6C\x6F\x72":_0x7c78[614],"\x6D\x69\x6E\x69\x6D\x61\x70\x4E\x69\x63\x6B\x53\x74\x72\x6F\x6B\x65\x43\x6F\x6C\x6F\x72":_0x7c78[615],"\x6D\x69\x6E\x69\x6D\x61\x70\x4E\x69\x63\x6B\x53\x74\x72\x6F\x6B\x65\x53\x69\x7A\x65":2,"\x6D\x69\x6E\x69\x6D\x61\x70\x54\x6F\x70":24,"\x6D\x69\x6E\x69\x6D\x61\x70\x54\x65\x61\x6D\x6D\x61\x74\x65\x73\x53\x69\x7A\x65":5.5,"\x6D\x69\x6E\x69\x6D\x61\x70\x4F\x66\x66\x73\x65\x74\x58":71,"\x6D\x61\x70\x53\x69\x7A\x65":14142,"\x6D\x61\x70\x4F\x66\x66\x73\x65\x74":7071,"\x70\x69\x32":2* Math[_0x7c78[616]],"\x6D\x65\x73\x73\x61\x67\x65\x42\x6F\x78\x42\x6F\x74\x74\x6F\x6D":[_0x7c78[617],_0x7c78[618]],"\x6B\x65\x79\x43\x6F\x64\x65\x45\x6E\x74\x65\x72":13,"\x6B\x65\x79\x43\x6F\x64\x65\x41":65,"\x6B\x65\x79\x43\x6F\x64\x65\x52":82};var _0x1499x118={};var _0x1499x119={"\x75\x73\x65\x72\x5F\x73\x68\x6F\x77":true,"\x6D\x69\x6E\x69\x6D\x61\x70\x5F\x73\x68\x6F\x77":true,"\x74\x67\x61\x72\x5F\x70\x72\x65\x66\x69\x78":_0x7c78[619],"\x74\x67\x61\x72\x5F\x63\x6F\x6C\x6F\x72":_0x7c78[620],"\x75\x70\x64\x61\x74\x65\x5F\x69\x6E\x74\x65\x72\x76\x61\x6C":1000,"\x6F\x67\x61\x72\x5F\x75\x73\x65\x72":true,"\x6F\x67\x61\x72\x5F\x70\x72\x65\x66\x69\x78":_0x7c78[621],"\x6C\x6D\x73\x61\x5F\x74\x65\x61\x6D\x74\x6F\x70":false,"\x6C\x6D\x73\x61\x5F\x63\x68\x61\x74":false,"\x63\x68\x61\x74\x5F\x63\x6C\x6F\x73\x65":false,"\x63\x68\x61\x74\x5F\x75\x6E\x70\x61\x75\x73\x65":true,"\x63\x68\x61\x74\x5F\x76\x63\x65\x6E\x74\x65\x72":false,"\x63\x68\x61\x74\x5F\x61\x6C\x74":true,"\x63\x68\x61\x74\x5F\x63\x74\x72\x6C\x61\x6C\x74":true,"\x63\x68\x61\x74\x5F\x63\x74\x72\x6C":true,"\x73\x6B\x69\x6E\x5F\x74\x6F\x67\x67\x6C\x65\x5F\x61\x75\x74\x6F":false,"\x73\x6B\x69\x6E\x5F\x74\x6F\x67\x67\x6C\x65\x5F\x69\x6E\x74\x65\x72\x76\x61\x6C":10000};function _0x1499x11a(){if(!document[_0x7c78[407]](_0x7c78[622])){_0x1499x115[_0x7c78[623]]= (_0x1499x115[_0x7c78[623]]|| 1000)+ 1000;setTimeout(_0x1499x11a,_0x1499x115[_0x7c78[623]]);_0x1499x115[_0x7c78[283]](_0x7c78[624]);return};setTimeout(_0x1499x11b,1000)}_0x1499x11a();function _0x1499x11b(){$[_0x7c78[628]](_0x1499x118,_0x1499x119,JSON[_0x7c78[107]](_0x1499x115[_0x7c78[627]](_0x7c78[625],_0x7c78[626])));_0x1499x114[_0x7c78[629]]= {my:_0x1499x115,stat:_0x1499x117,cfg:_0x1499x118};var _0x1499x11c=_0x7c78[6];_0x1499x11c+= _0x7c78[630];_0x1499x11c+= _0x7c78[631];_0x1499x11c+= _0x7c78[632];_0x1499x11c+= _0x7c78[633];_0x1499x11c+= _0x7c78[634];_0x1499x11c+= _0x7c78[632];_0x1499x11c+= _0x7c78[635];_0x1499x11c+= _0x7c78[636];_0x1499x11c+= _0x7c78[637]+ legbgpic+ _0x7c78[305]+ legbgcolor+ _0x7c78[638];_0x1499x11c+= _0x7c78[639];_0x1499x11c+= _0x7c78[632];_0x1499x11c+= _0x7c78[640];_0x1499x11c+= _0x7c78[641];_0x1499x11c+= _0x7c78[642];_0x1499x11c+= _0x7c78[632];_0x1499x11c+= _0x7c78[643];_0x1499x11c+= _0x7c78[644];_0x1499x11c+= _0x7c78[632];$(_0x7c78[647])[_0x7c78[279]](_0x7c78[645]+ _0x1499x11c+ _0x7c78[646]);$(_0x7c78[520])[_0x7c78[279]](_0x7c78[6]+ _0x7c78[648]+ _0x7c78[649]+ _0x7c78[650]+ _0x7c78[651]+ _0x7c78[652]);$(_0x7c78[657])[_0x7c78[208]](function(_0x1499x11d){_0x1499x117[_0x7c78[653]]= !_0x1499x117[_0x7c78[653]];if(_0x1499x117[_0x7c78[653]]){if(_0x1499x114[_0x7c78[654]]){$(_0x7c78[657])[_0x7c78[247]](_0x7c78[656])[_0x7c78[245]](_0x7c78[655]);$(_0x7c78[657])[_0x7c78[281]](_0x7c78[658])}else {$(_0x7c78[657])[_0x7c78[247]](_0x7c78[656])[_0x7c78[245]](_0x7c78[655]);$(_0x7c78[657])[_0x7c78[281]](_0x7c78[658])};_0x1499x115[_0x7c78[659]]()}else {$(_0x7c78[657])[_0x7c78[247]](_0x7c78[655])[_0x7c78[245]](_0x7c78[656]);$(_0x7c78[657])[_0x7c78[281]](_0x7c78[660]);_0x1499x115[_0x7c78[661]]()}});$(_0x7c78[657])[_0x7c78[665]](function(){$(_0x7c78[657])[_0x7c78[73]](_0x7c78[662],$(_0x7c78[664])[_0x7c78[59]]());return clickedname= _0x7c78[99]})[_0x7c78[663]](function(){$(_0x7c78[657])[_0x7c78[73]](_0x7c78[662],_0x7c78[6])});$(_0x7c78[666])[_0x7c78[665]](function(){$(_0x7c78[666])[_0x7c78[73]](_0x7c78[662],$(_0x7c78[664])[_0x7c78[59]]());return clickedname= _0x7c78[99]})[_0x7c78[663]](function(){$(_0x7c78[666])[_0x7c78[73]](_0x7c78[662],_0x7c78[6])});$(_0x7c78[666])[_0x7c78[208]](_0x1499x115[_0x7c78[625]]);if(_0x1499x118[_0x7c78[667]]){$(_0x7c78[520])[_0x7c78[668]](function(){return false})}else {$(_0x7c78[669])[_0x7c78[668]](function(_0x1499x11d){return false})};if(_0x1499x118[_0x7c78[670]]){$(_0x7c78[524])[_0x7c78[668]](function(){return false})};if(_0x1499x118[_0x7c78[671]]){$(_0x7c78[673])[_0x7c78[279]](_0x7c78[672]);$(_0x7c78[675])[_0x7c78[208]](function(){_0x1499x115[_0x7c78[674]]()})};if(_0x1499x118[_0x7c78[676]]){$(_0x7c78[524])[_0x7c78[73]](_0x7c78[677],_0x1499x117[_0x7c78[678]][1])};$(_0x7c78[693])[_0x7c78[692]](function(_0x1499x11d){var _0x1499x11e=(_0x1499x11d[_0x7c78[679]]?_0x7c78[198]:_0x7c78[6])+ (_0x1499x11d[_0x7c78[680]]?_0x7c78[681]:_0x7c78[6])+ (_0x1499x11d[_0x7c78[682]]?_0x7c78[90]:_0x7c78[6])+ (_0x1499x11d[_0x7c78[683]]?_0x7c78[684]:_0x7c78[6]);if(_0x1499x11d[_0x7c78[685]]=== _0x1499x117[_0x7c78[686]]){if(_0x1499x11e=== _0x7c78[198]&& _0x1499x118[_0x7c78[687]]){_0x1499x115[_0x7c78[688]]();return false}else {if(_0x1499x11e=== _0x7c78[689]&& _0x1499x118[_0x7c78[690]]){_0x1499x115[_0x7c78[688]]({"\x6F\x67\x61\x72":true});return false}else {if(_0x1499x11e=== _0x7c78[681]&& _0x1499x118[_0x7c78[691]]){_0x1499x115[_0x7c78[674]]();return false}}}}});_0x1499x115[_0x7c78[694]]();$(_0x7c78[696])[_0x7c78[695]]()}_0x1499x115[_0x7c78[659]]= function(){if($(_0x7c78[697])[_0x7c78[140]]){$(_0x7c78[697])[_0x7c78[87]]();$(_0x7c78[698])[_0x7c78[87]]()}else {_0x1499x115[_0x7c78[699]]()};_0x1499x117[_0x7c78[489]]= $(_0x7c78[493])[_0x7c78[59]]();_0x1499x117[_0x7c78[372]]= $(_0x7c78[293])[_0x7c78[59]]();_0x1499x117[_0x7c78[700]]= $(_0x7c78[213])[_0x7c78[59]]();_0x1499x117[_0x7c78[701]]= _0x7c78[702]+ _0x1499x117[_0x7c78[700]]+ _0x7c78[703];_0x1499x115[_0x7c78[704]]();_0x1499x117[_0x7c78[705]]= setInterval(_0x1499x115[_0x7c78[706]],_0x1499x118[_0x7c78[707]])};_0x1499x115[_0x7c78[661]]= function(){$(_0x7c78[697])[_0x7c78[61]]();$(_0x7c78[708])[_0x7c78[281]](_0x7c78[6]);$(_0x7c78[698])[_0x7c78[61]]();_0x1499x115[_0x7c78[709]]();clearInterval(_0x1499x117[_0x7c78[705]]);_0x1499x117[_0x7c78[705]]= null};_0x1499x115[_0x7c78[699]]= function(){$(_0x7c78[673])[_0x7c78[713]](_0x7c78[710]+ _0x1499x115[_0x7c78[711]]+ _0x7c78[712]);$(_0x7c78[697])[_0x7c78[208]](_0x1499x115[_0x7c78[688]]);var _0x1499x11f=$(_0x7c78[714]);var _0x1499x120=_0x1499x11f[_0x7c78[206]](_0x7c78[71]);var _0x1499x121=_0x1499x11f[_0x7c78[206]](_0x7c78[715]);_0x1499x11f[_0x7c78[128]](_0x7c78[716]+ _0x7c78[717]+ _0x7c78[718]+ _0x1499x120+ _0x7c78[719]+ _0x1499x121+ _0x7c78[720])};_0x1499x115[_0x7c78[688]]= function(_0x1499x122){var _0x1499x123=_0x1499x122|| {};if(!_0x1499x117[_0x7c78[655]]){if($(_0x7c78[657])[_0x7c78[721]](_0x7c78[655])){_0x1499x114[_0x7c78[723]][_0x7c78[173]](_0x7c78[722]);return}};var _0x1499x116=_0x7c78[608]+ $(_0x7c78[693])[_0x7c78[59]]();var _0x1499x124=$(_0x7c78[693])[_0x7c78[59]]();if(_0x1499x124[_0x7c78[179]](_0x7c78[472])== -1&& _0x1499x124[_0x7c78[179]](_0x7c78[495])== -1&& _0x1499x124[_0x7c78[179]](_0x7c78[502])== -1&& _0x1499x124[_0x7c78[179]](_0x7c78[507])== -1&& _0x1499x124[_0x7c78[179]](_0x7c78[577])== -1&& _0x1499x124[_0x7c78[179]](_0x7c78[488])== -1&& _0x1499x124[_0x7c78[179]](_0x7c78[514])== -1&& _0x1499x124[_0x7c78[179]](_0x7c78[547])== -1){if(_0x1499x124[_0x7c78[140]]){_0x1499x115[_0x7c78[726]]({name:_0x7c78[724],nick:$(_0x7c78[293])[_0x7c78[59]](),message:_0x7c78[725]+ _0x1499x116});if(_0x1499x123[_0x7c78[727]]){$(document)[_0x7c78[728]](jQuery.Event(_0x7c78[692],{keyCode:_0x1499x117[_0x7c78[686]],which:_0x1499x117[_0x7c78[686]]}))}else {}}}else {console[_0x7c78[283]](_0x7c78[729])}};_0x1499x115[_0x7c78[674]]= function(){$(_0x7c78[524])[_0x7c78[73]](_0x7c78[523],_0x7c78[525]);if(_0x1499x118[_0x7c78[730]]&& $(_0x7c78[731])[_0x7c78[73]](_0x7c78[523])== _0x7c78[732]){$(document)[_0x7c78[728]](jQuery.Event(_0x7c78[692],{keyCode:_0x1499x117[_0x7c78[733]],which:_0x1499x117[_0x7c78[733]]}));$(document)[_0x7c78[728]](jQuery.Event(_0x7c78[734],{keyCode:_0x1499x117[_0x7c78[733]],which:_0x1499x117[_0x7c78[733]]}))}};_0x1499x115[_0x7c78[706]]= function(){var _0x1499x125=_0x1499x115[_0x7c78[735]]();if(_0x1499x125!= _0x1499x117[_0x7c78[736]]){_0x1499x115[_0x7c78[737]](_0x1499x125)};if(_0x1499x117[_0x7c78[736]]){_0x1499x115[_0x7c78[738]]()};_0x1499x115[_0x7c78[739]]()};_0x1499x115[_0x7c78[625]]= function(){if(!($(_0x7c78[696])[_0x7c78[140]])){_0x1499x115[_0x7c78[740]]()};_0x1499x115[_0x7c78[741]](_0x1499x118);$(_0x7c78[696])[_0x7c78[87]]();$(_0x7c78[742])[_0x7c78[87]]()};_0x1499x115[_0x7c78[740]]= function(){$(_0x7c78[742])[_0x7c78[279]](_0x7c78[743]+ _0x7c78[744]+ _0x7c78[720]+ _0x7c78[745]+ _0x7c78[746]+ _0x7c78[747]+ _0x7c78[748]+ _0x7c78[652]+ _0x7c78[749]+ _0x7c78[750]+ Languageletter309[_0x7c78[751]]()+ _0x7c78[752]+ _0x7c78[753]+ Languageletter171+ _0x7c78[752]+ _0x7c78[754]+ Languageletter283+ _0x7c78[752]+ _0x7c78[652]);$(_0x7c78[778])[_0x7c78[279]](_0x7c78[6]+ _0x7c78[755]+ _0x7c78[756]+ _0x7c78[757]+ _0x7c78[758]+ _0x7c78[759]+ _0x7c78[760]+ _0x7c78[761]+ _0x7c78[762]+ _0x7c78[763]+ _0x7c78[764]+ _0x7c78[765]+ _0x7c78[766]+ _0x7c78[767]+ _0x7c78[768]+ _0x7c78[769]+ _0x7c78[770]+ _0x7c78[771]+ _0x7c78[772]+ _0x7c78[773]+ _0x7c78[774]+ _0x7c78[775]+ _0x7c78[776]+ _0x7c78[777]+ _0x7c78[6]);$(_0x7c78[779])[_0x7c78[208]](function(){_0x1499x115[_0x7c78[741]](_0x1499x119)});$(_0x7c78[783])[_0x7c78[208]](function(){if($(_0x7c78[527])[_0x7c78[596]](_0x7c78[595])){showMenu2()};_0x1499x118= _0x1499x115[_0x7c78[780]]();_0x1499x115[_0x7c78[781]](_0x7c78[625],JSON[_0x7c78[415]](_0x1499x118));_0x1499x115[_0x7c78[782]]();$(_0x7c78[524])[_0x7c78[73]](_0x7c78[677],_0x1499x117[_0x7c78[678]][_0x1499x118[_0x7c78[676]]?1:0]);_0x1499x115[_0x7c78[694]]()});$(_0x7c78[784])[_0x7c78[208]](function(){if($(_0x7c78[527])[_0x7c78[596]](_0x7c78[595])){showMenu2()};_0x1499x115[_0x7c78[782]]()});_0x1499x115[_0x7c78[782]]= function(){$(_0x7c78[696])[_0x7c78[61]]()}};_0x1499x115[_0x7c78[694]]= function(){if(_0x1499x117[_0x7c78[785]]){clearInterval(_0x1499x117[_0x7c78[785]]);delete _0x1499x117[_0x7c78[785]]};if(_0x1499x118[_0x7c78[786]]&& _0x1499x118[_0x7c78[787]]> 0){_0x1499x117[_0x7c78[785]]= setInterval(_0x1499x115[_0x7c78[788]],_0x1499x118[_0x7c78[787]])}};_0x1499x115[_0x7c78[788]]= function(){if(_0x1499x114[_0x7c78[654]]&& _0x1499x114[_0x7c78[654]][_0x7c78[789]]&& _0x1499x114[_0x7c78[654]][_0x7c78[790]]){_0x1499x117[_0x7c78[791]]= true};_0x1499x115[_0x7c78[792]]();if(_0x1499x117[_0x7c78[791]]&& _0x1499x114[_0x7c78[654]][_0x7c78[789]]&& !_0x1499x114[_0x7c78[654]][_0x7c78[790]]){_0x1499x115[_0x7c78[792]]()}};_0x1499x115[_0x7c78[792]]= function(){$(document)[_0x7c78[728]](jQuery.Event(_0x7c78[692],{keyCode:_0x1499x117[_0x7c78[793]],which:_0x1499x117[_0x7c78[793]]}));$(document)[_0x7c78[728]](jQuery.Event(_0x7c78[734],{keyCode:_0x1499x117[_0x7c78[793]],which:_0x1499x117[_0x7c78[793]]}))};_0x1499x115[_0x7c78[704]]= function(){_0x1499x115[_0x7c78[709]]();if(!_0x1499x114[_0x7c78[794]]){return _0x1499x14e(_0x1499x117[_0x7c78[795]],_0x1499x115[_0x7c78[704]])};var _0x1499x126={query:_0x7c78[796]+ encodeURIComponent(_0x1499x117.AgarToolVersion)+ _0x7c78[797]+ encodeURIComponent(_0x1499x117[_0x7c78[701]])};_0x1499x117[_0x7c78[798]]= io[_0x7c78[704]](_0x1499x117.AgarToolServer,_0x1499x126);_0x1499x117[_0x7c78[798]][_0x7c78[801]](_0x7c78[157],function(_0x1499x127){_0x1499x117[_0x7c78[799]]= _0x1499x127;_0x1499x115[_0x7c78[800]]()})};_0x1499x115[_0x7c78[709]]= function(){if(_0x1499x117[_0x7c78[655]]&& _0x1499x117[_0x7c78[736]]){_0x1499x115[_0x7c78[737]](false)};_0x1499x117[_0x7c78[655]]= false;_0x1499x117[_0x7c78[736]]= false;var _0x1499x128=_0x1499x117[_0x7c78[798]];var _0x1499x129=_0x1499x117[_0x7c78[802]];_0x1499x117[_0x7c78[798]]= null;_0x1499x117[_0x7c78[802]]= null;if(_0x1499x128){_0x1499x128[_0x7c78[709]]()};if(_0x1499x129){_0x1499x129[_0x7c78[709]]()}};_0x1499x115[_0x7c78[800]]= function(){if($(_0x7c78[669])[_0x7c78[721]](_0x7c78[803])== false){$(_0x7c78[669])[_0x7c78[245]](_0x7c78[803])};_0x1499x115[_0x7c78[283]](Languageletter82a+ _0x7c78[481]+ Premadeletter123[_0x7c78[804]]()+ _0x7c78[805]+ _0x1499x117[_0x7c78[799]][_0x7c78[806]]);_0x1499x115[_0x7c78[807]]();var _0x1499x12a={reconnection:!1,query:_0x7c78[808]+ encodeURIComponent(_0x1499x117[_0x7c78[799]][_0x7c78[809]])+ _0x7c78[810]+ encodeURIComponent(_0x1499x117[_0x7c78[489]])};_0x1499x117[_0x7c78[802]]= io[_0x7c78[704]](_0x1499x117[_0x7c78[799]][_0x7c78[806]],_0x1499x12a);_0x1499x117[_0x7c78[802]][_0x7c78[801]](_0x7c78[811],_0x1499x115[_0x7c78[812]]);_0x1499x117[_0x7c78[802]][_0x7c78[801]](_0x7c78[704],function(){_0x1499x117[_0x7c78[655]]= true});_0x1499x117[_0x7c78[802]][_0x7c78[801]](_0x7c78[709],function(){_0x1499x117[_0x7c78[802]]= null;_0x1499x115[_0x7c78[813]]()});_0x1499x117[_0x7c78[802]][_0x7c78[801]](_0x7c78[814],function(){_0x1499x117[_0x7c78[802]]= null;_0x1499x115[_0x7c78[813]]()})};_0x1499x115[_0x7c78[813]]= function(){_0x1499x117[_0x7c78[655]]= false;var _0x1499x128=_0x1499x117[_0x7c78[798]];var _0x1499x129=_0x1499x117[_0x7c78[802]];_0x1499x117[_0x7c78[798]]= null;_0x1499x117[_0x7c78[802]]= null;if(_0x1499x128){_0x1499x128[_0x7c78[709]]()};if(_0x1499x129){_0x1499x129[_0x7c78[709]]()}};_0x1499x115[_0x7c78[812]]= function(_0x1499x12b){if(void(0)=== _0x1499x12b[_0x7c78[601]]){return};switch(_0x1499x12b[_0x7c78[601]]){case _0x7c78[823]:if(window[_0x7c78[815]]&& window[_0x7c78[815]][_0x7c78[55]](_0x1499x12b[_0x7c78[816]])|| _0x1499x12b[_0x7c78[816]][_0x7c78[55]](_0x7c78[621])){}else {if(!_0x1499x12b[_0x7c78[816]]){_0x1499x12b[_0x7c78[816]]= _0x7c78[817]};_0x1499x115[_0x7c78[822]](!1,_0x1499x12b[_0x7c78[818]],_0x1499x12b[_0x7c78[816]],_0x1499x12b[_0x7c78[819]],_0x1499x12b[_0x7c78[820]],_0x1499x118[_0x7c78[821]],!0)};break;case _0x7c78[176]:_0x1499x115[_0x7c78[824]](_0x1499x12b[_0x7c78[818]]);break;case _0x7c78[826]:_0x1499x115[_0x7c78[825]](_0x1499x12b[_0x7c78[818]],_0x1499x12b[_0x7c78[819]],_0x1499x12b[_0x7c78[820]]);break;case _0x7c78[789]:if(!window[_0x7c78[827]]|| !isEquivalent(window[_0x7c78[827]],_0x1499x12b[_0x7c78[828]])){window[_0x7c78[827]]= _0x1499x12b[_0x7c78[828]];if(legendmod[_0x7c78[829]]){Object[_0x7c78[833]](window[_0x7c78[827]])[_0x7c78[832]](function(_0x1499x12c){if(_0x1499x12c[_0x7c78[190]](_0x7c78[830])[0]!= 0){core[_0x7c78[831]](_0x1499x12c[_0x7c78[190]](_0x7c78[830])[0],null,window[_0x7c78[827]][_0x1499x12c],1,null)}})}};break;case _0x7c78[834]:_0x1499x115[_0x7c78[807]]();break;case _0x7c78[724]:if(window[_0x7c78[815]]&& window[_0x7c78[815]][_0x7c78[55]](_0x1499x12b[_0x7c78[816]])|| _0x1499x12b[_0x7c78[816]][_0x7c78[55]](_0x7c78[621])){}else {if(!_0x1499x12b[_0x7c78[816]]){_0x1499x12b[_0x7c78[816]]= _0x7c78[817]};_0x1499x115[_0x7c78[283]](_0x7c78[6]+ _0x1499x12b[_0x7c78[816]]+ _0x7c78[273]+ _0x1499x12b[_0x7c78[835]]);_0x1499x115[_0x7c78[836]](_0x1499x12b[_0x7c78[816]],_0x1499x12b[_0x7c78[835]])};break;case _0x7c78[811]:if(window[_0x7c78[815]]&& window[_0x7c78[815]][_0x7c78[55]](_0x1499x12b[_0x7c78[816]])|| _0x1499x12b[_0x7c78[816]][_0x7c78[55]](_0x7c78[621])){}else {if(!_0x1499x12b[_0x7c78[816]]){_0x1499x12b[_0x7c78[816]]= _0x7c78[817]};_0x1499x115[_0x7c78[283]](_0x7c78[189]+ _0x1499x12b[_0x7c78[816]]+ _0x7c78[273]+ _0x1499x12b[_0x7c78[835]]);_0x1499x115[_0x7c78[836]](_0x1499x12b[_0x7c78[816]],_0x1499x12b[_0x7c78[835]])};break;case _0x7c78[838]:console[_0x7c78[283]](_0x7c78[837]+ _0x1499x12b[_0x7c78[835]]);break;case _0x7c78[839]:console[_0x7c78[283]](_0x7c78[837]+ _0x1499x12b[_0x7c78[835]]);break;default:_0x1499x115[_0x7c78[283]](_0x7c78[840]+ _0x1499x12b[_0x7c78[601]])}};_0x1499x115[_0x7c78[726]]= function(_0x1499x12d){if(_0x1499x117[_0x7c78[802]]&& _0x1499x117[_0x7c78[802]][_0x7c78[655]]){_0x1499x117[_0x7c78[802]][_0x7c78[841]](_0x7c78[811],_0x1499x12d);return true};return false};_0x1499x115[_0x7c78[807]]= function(){window[_0x7c78[593]]= [];for(var _0x1499x12d in _0x1499x117[_0x7c78[842]]){if(!_0x1499x117[_0x7c78[842]][_0x1499x12d][_0x7c78[843]]){delete _0x1499x117[_0x7c78[842]][_0x1499x12d]}}};_0x1499x115[_0x7c78[822]]= function(_0x1499x12e,_0x1499x12f,_0x1499x8b,_0x1499xe2,_0x1499x130,_0x1499x131,_0x1499x132){window[_0x7c78[593]][_0x1499x12f]= _0x1499x8b;_0x1499x117[_0x7c78[842]][_0x1499x12f]= new _0x1499x133(_0x1499x12e,_0x1499x8b,_0x1499xe2,_0x1499x130,_0x1499x131,_0x1499x132)};_0x1499x115[_0x7c78[824]]= function(_0x1499x12f){window[_0x7c78[593]][_0x1499x12f]= null;if(_0x1499x117[_0x7c78[842]][_0x1499x12f]){delete _0x1499x117[_0x7c78[842]][_0x1499x12f]}};_0x1499x115[_0x7c78[825]]= function(_0x1499x12f,_0x1499xe2,_0x1499x130){if(_0x1499x117[_0x7c78[842]][_0x1499x12f]){_0x1499x117[_0x7c78[842]][_0x1499x12f][_0x7c78[819]]= _0x1499xe2;_0x1499x117[_0x7c78[842]][_0x1499x12f][_0x7c78[820]]= _0x1499x130}};function _0x1499x133(_0x1499x12e,_0x1499x8b,_0x1499xe2,_0x1499x130,_0x1499x131,_0x1499x132){this[_0x7c78[843]]= _0x1499x12e;this[_0x7c78[601]]= _0x1499x8b;this[_0x7c78[819]]= _0x1499xe2;this[_0x7c78[820]]= _0x1499x130;this[_0x7c78[844]]= _0x1499xe2;this[_0x7c78[845]]= _0x1499x130;this[_0x7c78[662]]= _0x1499x131;this[_0x7c78[846]]= _0x1499x132}_0x1499x115[_0x7c78[737]]= function(_0x1499x134){_0x1499x117[_0x7c78[736]]= _0x1499x134;if(_0x1499x118[_0x7c78[847]]){if(_0x1499x117[_0x7c78[736]]){_0x1499x117[_0x7c78[736]]= _0x1499x115[_0x7c78[726]]({name:_0x7c78[736],playerName:_0x1499x118[_0x7c78[848]]+ _0x1499x117[_0x7c78[372]],customSkins:$(_0x7c78[849])[_0x7c78[59]]()})}else {_0x1499x115[_0x7c78[726]]({name:_0x7c78[850]})}}};_0x1499x115[_0x7c78[738]]= function(){if(_0x1499x118[_0x7c78[847]]&& _0x1499x114[_0x7c78[654]]){_0x1499x115[_0x7c78[726]]({name:_0x7c78[826],x:ogario[_0x7c78[851]]+ ogario[_0x7c78[560]],y:ogario[_0x7c78[852]]+ ogario[_0x7c78[562]]})}};_0x1499x115[_0x7c78[836]]= function(_0x1499xe6,_0x1499x116){var _0x1499x135= new Date()[_0x7c78[854]]()[_0x7c78[168]](/^(\d{2}:\d{2}).*/,_0x7c78[853]);var _0x1499x136=_0x1499x115[_0x7c78[711]];var _0x1499x137=_0x7c78[855]+ _0x7c78[856]+ _0x1499x135+ _0x7c78[857]+ _0x7c78[858]+ defaultSettings[_0x7c78[859]]+ _0x7c78[860]+ _0x1499x136+ _0x7c78[481]+ _0x1499x150(_0x1499xe6)+ _0x7c78[861]+ _0x7c78[862]+ _0x1499x150(_0x1499x116)+ _0x7c78[752]+ _0x7c78[652];$(_0x7c78[597])[_0x7c78[279]](_0x1499x137);$(_0x7c78[597])[_0x7c78[863]](_0x7c78[706]);$(_0x7c78[597])[_0x7c78[865]]({'\x73\x63\x72\x6F\x6C\x6C\x54\x6F\x70':$(_0x7c78[597])[_0x7c78[257]](_0x7c78[864])},500)};_0x1499x115[_0x7c78[739]]= function(){window[_0x7c78[866]]= [];var _0x1499x138=document[_0x7c78[407]](_0x7c78[147]);var _0x1499x120=_0x1499x138[_0x7c78[71]];var _0x1499x121=_0x1499x138[_0x7c78[715]];var _0x1499x139=(_0x1499x120- 18)/ _0x1499x115[_0x7c78[867]]();var _0x1499x13a=_0x1499x115[_0x7c78[868]]();_0x1499x117[_0x7c78[869]]= 18/ 2;_0x1499x117[_0x7c78[870]]= _0x1499x117[_0x7c78[869]]+ (_0x1499x121- _0x1499x120);var _0x1499x13b=_0x1499x117[_0x7c78[869]];var _0x1499x13c=_0x1499x117[_0x7c78[870]];var _0x1499x13d=-(2* _0x1499x117[_0x7c78[871]]+ 2);var _0x1499x13e=_0x1499x138[_0x7c78[873]](_0x7c78[872]);_0x1499x13e[_0x7c78[874]](0,0,_0x1499x120,_0x1499x121);_0x1499x13e[_0x7c78[875]]= _0x1499x117[_0x7c78[876]];var _0x1499x13f=_0x7c78[6];var _0x1499x140=_0x7c78[6];if(!defaultmapsettings[_0x7c78[877]]){_0x1499x140= _0x7c78[878]};var _0x1499x141=Object[_0x7c78[833]](_0x1499x117[_0x7c78[842]])[_0x7c78[879]]();window[_0x7c78[880]]= _0x1499x117[_0x7c78[842]];window[_0x7c78[881]]= [];for(var _0x1499x142=0;_0x1499x142< window[_0x7c78[882]][_0x7c78[140]];_0x1499x142++){window[_0x7c78[881]][_0x1499x142]= window[_0x7c78[882]][_0x1499x142][_0x7c78[372]]};for(var _0x1499xd8=0;_0x1499xd8< _0x1499x141[_0x7c78[140]];_0x1499xd8++){for(var _0x1499x143=1;_0x1499x143<= _0x1499xd8;_0x1499x143++){if(_0x1499xd8- _0x1499x143>= 0&& _0x1499x117[_0x7c78[842]][_0x1499x141[_0x1499xd8]][_0x7c78[601]]== _0x1499x117[_0x7c78[842]][_0x1499x141[_0x1499xd8- _0x1499x143]][_0x7c78[601]]){if(window[_0x7c78[593]][_0x1499x141[_0x1499xd8]]!= _0x1499x117[_0x7c78[842]][_0x1499x141[_0x1499xd8]][_0x7c78[601]]){_0x1499x117[_0x7c78[842]][_0x1499x141[_0x1499xd8]][_0x7c78[601]]= window[_0x7c78[593]][_0x1499x141[_0x1499xd8]]}else {if(window[_0x7c78[593]][_0x1499x141[_0x1499xd8- _0x1499x143]]!= _0x1499x117[_0x7c78[842]][_0x1499x141[_0x1499xd8- _0x1499x143]][_0x7c78[601]]){_0x1499x117[_0x7c78[842]][_0x1499x141[_0x1499xd8- _0x1499x143]][_0x7c78[601]]= window[_0x7c78[593]][_0x1499x141[_0x1499xd8- _0x1499x143]]}}}};for(var _0x1499x12d=0;_0x1499x12d< legendmod[_0x7c78[374]][_0x7c78[140]];_0x1499x12d++){if(legendmod[_0x7c78[374]][_0x1499x12d]&& _0x1499x117[_0x7c78[842]][_0x1499x141[_0x1499xd8]]&& _0x1499x150(_0x1499x117[_0x7c78[842]][_0x1499x141[_0x1499xd8]][_0x7c78[601]])== legendmod[_0x7c78[374]][_0x1499x12d][_0x7c78[372]]){_0x1499x117[_0x7c78[842]][_0x1499x141[_0x1499xd8]][_0x7c78[883]]= _0x1499x12d;if(_0x1499xd8- 1>= 0&& _0x1499x117[_0x7c78[842]][_0x1499x141[_0x1499xd8]][_0x7c78[883]]< _0x1499x117[_0x7c78[842]][_0x1499x141[_0x1499xd8- 1]][_0x7c78[883]]){var _0x1499xe2=_0x1499x117[_0x7c78[842]][_0x1499x141[_0x1499xd8]];if(_0x1499xe2!= _0x1499x117[_0x7c78[842]][_0x1499x141[_0x1499xd8- 1]]&& _0x1499xe2!= _0x1499x117[_0x7c78[842]][_0x1499x141[_0x1499xd8- 2]]&& _0x1499xe2!= _0x1499x117[_0x7c78[842]][_0x1499x141[_0x1499xd8- 3]]&& _0x1499xe2!= _0x1499x117[_0x7c78[842]][_0x1499x141[_0x1499xd8- 4]]&& _0x1499xe2!= _0x1499x117[_0x7c78[842]][_0x1499x141[_0x1499xd8- 5]]&& window[_0x7c78[881]][_0x7c78[55]](_0x1499x117[_0x7c78[842]][_0x1499x141[_0x1499xd8]][_0x7c78[601]])&& _0x1499x117[_0x7c78[842]][_0x1499x141[_0x1499xd8]][_0x7c78[601]]!= _0x1499x117[_0x7c78[842]][_0x1499x141[_0x1499xd8- 1]][_0x7c78[601]]&& _0x1499x117[_0x7c78[842]][_0x1499x141[_0x1499xd8]]&& _0x1499x117[_0x7c78[842]][_0x1499x141[_0x1499xd8- 1]]){var _0x1499x9d=_0x1499x117[_0x7c78[842]][_0x1499x141[_0x1499xd8]];_0x1499x117[_0x7c78[842]][_0x1499x141[_0x1499xd8]]= _0x1499x117[_0x7c78[842]][_0x1499x141[_0x1499xd8- 1]];_0x1499x117[_0x7c78[842]][_0x1499x141[_0x1499xd8- 1]]= _0x1499x9d}}}}};if(_0x1499x141[_0x7c78[140]]=== 0){};var _0x1499x144=2;var _0x1499x145=0;for(var _0x1499x12c;(_0x1499x12c= _0x1499x141[_0x7c78[884]]());){var _0x1499x146=_0x1499x117[_0x7c78[842]][_0x1499x12c];window[_0x7c78[866]][_0x7c78[885]](_0x1499x150(_0x1499x146[_0x7c78[601]]));var _0x1499x147=false;if(defaultmapsettings[_0x7c78[877]]){if(application[_0x7c78[886]][_0x1499x146[_0x7c78[601]]]&& application[_0x7c78[888]][application[_0x7c78[886]][_0x1499x146[_0x7c78[601]]]+ _0x7c78[887]]){_0x1499x140= _0x1499x140+ (_0x7c78[889]+ _0x1499x12c+ _0x7c78[890]+ _0x1499x146[_0x7c78[662]]+ _0x7c78[891]+ application[_0x7c78[888]][application[_0x7c78[886]][_0x1499x146[_0x7c78[601]]]+ _0x7c78[887]][_0x7c78[892]]+ _0x7c78[893]+ _0x7c78[894])}else {_0x1499x140= _0x1499x140+ (_0x7c78[889]+ _0x1499x12c+ _0x7c78[890]+ _0x1499x146[_0x7c78[662]]+ _0x7c78[895]+ _0x7c78[894])}};for(var _0x1499x12d=0;_0x1499x12d< legendmod[_0x7c78[896]][_0x7c78[140]];_0x1499x12d++){if(legendmod[_0x7c78[374]][_0x1499x12d]&& _0x1499x150(_0x1499x146[_0x7c78[601]])== legendmod[_0x7c78[374]][_0x1499x12d][_0x7c78[372]]){if(_0x1499x147== false){_0x1499x140= _0x1499x140+ (_0x7c78[897]+ application[_0x7c78[566]](window[_0x7c78[882]][_0x1499x12d][_0x7c78[819]],window[_0x7c78[882]][_0x1499x12d][_0x7c78[820]])+ _0x7c78[898]);_0x1499x140= _0x1499x140+ (_0x7c78[899]+ application[_0x7c78[901]](window[_0x7c78[882]][_0x1499x12d][_0x7c78[900]])+ _0x7c78[902]);_0x1499x147= true}}};if(_0x1499x147== false){if(application[_0x7c78[566]](_0x1499x146[_0x7c78[819]],_0x1499x146[_0x7c78[820]])== _0x7c78[903]|| legendmod[_0x7c78[67]]== _0x7c78[68]){_0x1499x140= _0x1499x140+ (_0x7c78[897]+ application[_0x7c78[566]](_0x1499x146[_0x7c78[819]],_0x1499x146[_0x7c78[820]])+ _0x7c78[902])}};_0x1499x145++;_0x1499x13f+= _0x1499x140+ _0x1499x150(_0x1499x146[_0x7c78[601]]);_0x1499x140= _0x7c78[652];if(!defaultmapsettings[_0x7c78[877]]){_0x1499x140= _0x7c78[904]+ _0x1499x144+ _0x7c78[905];_0x1499x144++};if(_0x1499x118[_0x7c78[906]]){var _0x1499x8b=_0x1499x146[_0x7c78[601]]+ _0x7c78[907]+ _0x1499x118[_0x7c78[908]]+ _0x7c78[909];var _0x1499x148=(_0x1499x146[_0x7c78[819]]+ _0x1499x13a)* _0x1499x139+ _0x1499x13b;var _0x1499x149=(_0x1499x146[_0x7c78[820]]+ _0x1499x13a)* _0x1499x139+ _0x1499x13c;_0x1499x13e[_0x7c78[910]]= _0x7c78[911];_0x1499x13e[_0x7c78[912]]= _0x1499x117[_0x7c78[913]];_0x1499x13e[_0x7c78[914]]= _0x1499x117[_0x7c78[915]];_0x1499x13e[_0x7c78[916]](_0x1499x8b,_0x1499x148,_0x1499x149+ _0x1499x13d);_0x1499x13e[_0x7c78[148]]= _0x1499x118[_0x7c78[821]];_0x1499x13e[_0x7c78[143]](_0x1499x8b,_0x1499x148,_0x1499x149+ _0x1499x13d);_0x1499x13e[_0x7c78[917]]();_0x1499x13e[_0x7c78[919]](_0x1499x148,_0x1499x149,_0x1499x117[_0x7c78[871]],0,_0x1499x117[_0x7c78[918]],!1);_0x1499x13e[_0x7c78[920]]();_0x1499x13e[_0x7c78[148]]= _0x1499x146[_0x7c78[662]];_0x1499x13e[_0x7c78[921]]()}};if(_0x1499x118[_0x7c78[922]]){if(!defaultmapsettings[_0x7c78[877]]){_0x1499x13f+= _0x7c78[904]};_0x1499x13f+= _0x7c78[923]+ _0x1499x145+ _0x7c78[752];$(_0x7c78[708])[_0x7c78[281]](_0x1499x13f)}};_0x1499x115[_0x7c78[735]]= function(){return _0x1499x114[_0x7c78[654]]?_0x1499x114[_0x7c78[654]][_0x7c78[387]]:false};_0x1499x115[_0x7c78[867]]= function(){return _0x1499x114[_0x7c78[654]]?_0x1499x114[_0x7c78[654]][_0x7c78[924]]:_0x1499x117[_0x7c78[924]]};_0x1499x115[_0x7c78[868]]= function(){return _0x1499x114[_0x7c78[654]]?_0x1499x114[_0x7c78[654]][_0x7c78[925]]:_0x1499x117[_0x7c78[925]]};_0x1499x115[_0x7c78[780]]= function(){var _0x1499x14a={};$(_0x7c78[931])[_0x7c78[930]](function(){var _0x1499x14b=$(this);var _0x1499x8a=_0x1499x14b[_0x7c78[257]](_0x7c78[926]);var _0x1499x8b=_0x1499x14b[_0x7c78[206]](_0x7c78[927]);var _0x1499x14c;if(_0x1499x8a=== _0x7c78[928]){_0x1499x14c= _0x1499x14b[_0x7c78[257]](_0x7c78[929])}else {_0x1499x14c= $(this)[_0x7c78[59]]()};_0x1499x14a[_0x1499x8b]= _0x1499x14c});return _0x1499x14a};_0x1499x115[_0x7c78[741]]= function(_0x1499x14a){$(_0x7c78[931])[_0x7c78[930]](function(){var _0x1499x14b=$(this);var _0x1499x8a=_0x1499x14b[_0x7c78[257]](_0x7c78[926]);var _0x1499x8b=_0x1499x14b[_0x7c78[206]](_0x7c78[927]);if(_0x1499x14a[_0x7c78[932]](_0x1499x8b)){var _0x1499x14c=_0x1499x14a[_0x1499x8b];if(_0x1499x8a=== _0x7c78[928]){_0x1499x14b[_0x7c78[257]](_0x7c78[929],_0x1499x14c)}else {$(this)[_0x7c78[59]](_0x1499x14c)}}})};_0x1499x115[_0x7c78[627]]= function(_0x1499x8b,_0x1499x14d){return _0x1499x114[_0x7c78[934]][_0x1499x115[_0x7c78[601]]+ _0x7c78[933]+ _0x1499x8b]|| _0x1499x14d};_0x1499x115[_0x7c78[781]]= function(_0x1499x8b,_0x1499x14c){_0x1499x114[_0x7c78[934]][_0x1499x115[_0x7c78[601]]+ _0x7c78[933]+ _0x1499x8b]= _0x1499x14c};function _0x1499x14e(url,_0x1499x8d){var _0x1499x14f=document[_0x7c78[936]](_0x7c78[935]);_0x1499x14f[_0x7c78[926]]= _0x7c78[937];_0x1499x14f[_0x7c78[470]]= url;if( typeof _0x1499x8d!== _0x7c78[938]){_0x1499x14f[_0x7c78[939]]= _0x1499x8d};document[_0x7c78[647]][_0x7c78[940]](_0x1499x14f)}function _0x1499x150(_0x1499x12d){return _0x1499x12d[_0x7c78[168]](/&/g,_0x7c78[945])[_0x7c78[168]](/</g,_0x7c78[944])[_0x7c78[168]](/>/g,_0x7c78[943])[_0x7c78[168]](/"/g,_0x7c78[942])[_0x7c78[168]](/'/g,_0x7c78[941])}$(_0x7c78[693])[_0x7c78[692]](function(_0x1499x12d){if(_0x1499x12d[_0x7c78[685]]=== 13){$(_0x7c78[697])[_0x7c78[208]]()}})}function Universalchatfix(){if($(_0x7c78[657])[_0x7c78[721]](_0x7c78[655])){$(_0x7c78[657])[_0x7c78[208]]();$(_0x7c78[657])[_0x7c78[208]]()};if(window[_0x7c78[946]]){LegendModServerConnect()}}function showMenu(){$(_0x7c78[742])[_0x7c78[87]]();$(_0x7c78[947])[_0x7c78[208]]()}function showMenu2(){$(_0x7c78[742])[_0x7c78[87]]();$(_0x7c78[947])[_0x7c78[208]]()}function hideMenu(){$(_0x7c78[742])[_0x7c78[61]]()}function showSearchHud(){if(!document[_0x7c78[56]][_0x7c78[55]](_0x7c78[54])){getInfo()};$(_0x7c78[949])[_0x7c78[948]]();$(_0x7c78[950])[_0x7c78[948]]();$(_0x7c78[951])[_0x7c78[948]]();$(_0x7c78[952])[_0x7c78[948]]();$(_0x7c78[953])[_0x7c78[948]]()}function hideSearchHud(){$(_0x7c78[952])[_0x7c78[174]]();$(_0x7c78[949])[_0x7c78[174]]();$(_0x7c78[950])[_0x7c78[174]]();$(_0x7c78[951])[_0x7c78[174]]();$(_0x7c78[953])[_0x7c78[174]]()}function appendLog(_0x1499x158){var region=$(_0x7c78[60])[_0x7c78[59]]();$(_0x7c78[961])[_0x7c78[713]](_0x7c78[954]+ _0x7c78[955]+ region[_0x7c78[956]](0,2)+ _0x7c78[957]+ _0x7c78[958]+ currentToken+ _0x7c78[959]+ _0x1499x158+ _0x7c78[960]);$(_0x7c78[963])[_0x7c78[962]]()[_0x7c78[87]](100);bumpLog()}function appendLog2(_0x1499x158,_0x1499x15a){$(_0x7c78[961])[_0x7c78[713]](_0x7c78[954]+ _0x7c78[964]+ _0x1499x15a+ _0x7c78[965]+ currentToken+ _0x7c78[959]+ _0x1499x158+ _0x7c78[960]);$(_0x7c78[963])[_0x7c78[962]]()[_0x7c78[87]](100);bumpLog()}function appendLog3(_0x1499x158,_0x1499x15a,_0x1499x15c,_0x1499x15d){$(_0x7c78[961])[_0x7c78[713]](_0x7c78[954]+ _0x7c78[964]+ _0x1499x15a+ _0x7c78[966]+ _0x1499x15c+ _0x7c78[967]+ _0x1499x15d+ _0x7c78[965]+ currentToken+ _0x7c78[959]+ _0x1499x158+ _0x7c78[960]);$(_0x7c78[963])[_0x7c78[962]]()[_0x7c78[87]](100);bumpLog()}function appendLog4(_0x1499x158,_0x1499x15a){$(_0x7c78[961])[_0x7c78[713]](_0x7c78[954]+ _0x7c78[968]+ _0x1499x15a+ _0x7c78[965]+ currentToken+ _0x7c78[959]+ _0x1499x158+ _0x7c78[960]);$(_0x7c78[963])[_0x7c78[962]]()[_0x7c78[87]](100);bumpLog()}function connectto(_0x1499x15a){$(_0x7c78[213])[_0x7c78[59]](_0x1499x15a);$(_0x7c78[295])[_0x7c78[208]]();setTimeout(function(){if($(_0x7c78[213])[_0x7c78[59]]()!= $(_0x7c78[969])[_0x7c78[59]]()){toastr[_0x7c78[173]](_0x7c78[970])}},1500)}function connectto1a(_0x1499x15a){$(_0x7c78[971])[_0x7c78[59]](_0x7c78[253]+ _0x1499x15a);$(_0x7c78[972])[_0x7c78[208]]();setTimeout(function(){if($(_0x7c78[213])[_0x7c78[59]]()!= $(_0x7c78[969])[_0x7c78[59]]()){toastr[_0x7c78[173]](_0x7c78[970])}},1500)}function connectto2(_0x1499x15c){$(_0x7c78[60])[_0x7c78[59]](_0x1499x15c)}function connectto3(_0x1499x15d){$(_0x7c78[69])[_0x7c78[59]](_0x1499x15d)}function bumpLog(){$(_0x7c78[961])[_0x7c78[865]]({scrollTop:0},_0x7c78[973])}function SquareAgar(){var _0x1499x165=document[_0x7c78[974]](_0x7c78[647])[0];$(_0x1499x165)[_0x7c78[279]](_0x7c78[975]+ _0x7c78[976]+ _0x7c78[977]+ _0x7c78[978]+ _0x7c78[979]+ _0x7c78[980]+ _0x7c78[981])}function sendicon1(){application[_0x7c78[984]](101,_0x7c78[982]+ pic1urlimg+ _0x7c78[983])}function sendicon2(){application[_0x7c78[984]](101,_0x7c78[982]+ pic2urlimg+ _0x7c78[983])}function sendicon3(){application[_0x7c78[984]](101,_0x7c78[982]+ pic3urlimg+ _0x7c78[983])}function sendicon4(){application[_0x7c78[984]](101,_0x7c78[982]+ pic4urlimg+ _0x7c78[983])}function sendicon5(){application[_0x7c78[984]](101,_0x7c78[982]+ pic5urlimg+ _0x7c78[983])}function sendicon6(){application[_0x7c78[984]](101,_0x7c78[982]+ pic6urlimg+ _0x7c78[983])}function setpic1data(){localStorage[_0x7c78[117]](_0x7c78[444],$(_0x7c78[985])[_0x7c78[59]]());$(_0x7c78[987])[_0x7c78[206]](_0x7c78[986],$(_0x7c78[985])[_0x7c78[59]]())}function setpic2data(){localStorage[_0x7c78[117]](_0x7c78[445],$(_0x7c78[988])[_0x7c78[59]]());$(_0x7c78[989])[_0x7c78[206]](_0x7c78[986],$(_0x7c78[988])[_0x7c78[59]]())}function setpic3data(){localStorage[_0x7c78[117]](_0x7c78[446],$(_0x7c78[990])[_0x7c78[59]]());$(_0x7c78[991])[_0x7c78[206]](_0x7c78[986],$(_0x7c78[990])[_0x7c78[59]]())}function setpic4data(){localStorage[_0x7c78[117]](_0x7c78[447],$(_0x7c78[992])[_0x7c78[59]]());$(_0x7c78[993])[_0x7c78[206]](_0x7c78[986],$(_0x7c78[992])[_0x7c78[59]]())}function setpic5data(){localStorage[_0x7c78[117]](_0x7c78[448],$(_0x7c78[994])[_0x7c78[59]]());$(_0x7c78[995])[_0x7c78[206]](_0x7c78[986],$(_0x7c78[994])[_0x7c78[59]]())}function setpic6data(){localStorage[_0x7c78[117]](_0x7c78[449],$(_0x7c78[996])[_0x7c78[59]]());$(_0x7c78[997])[_0x7c78[206]](_0x7c78[986],$(_0x7c78[996])[_0x7c78[59]]())}function sendyt1(){if(($(_0x7c78[493])[_0x7c78[59]]()!= _0x7c78[6])|| document[_0x7c78[407]](_0x7c78[372])[_0x7c78[405]][_0x7c78[55]](_0x7c78[549])){application[_0x7c78[984]](101,_0x7c78[998]+ yt1url+ _0x7c78[999])}else {toastr[_0x7c78[157]](Premadeletter39)}}function sendyt2(){if(($(_0x7c78[493])[_0x7c78[59]]()!= _0x7c78[6])|| document[_0x7c78[407]](_0x7c78[372])[_0x7c78[405]][_0x7c78[55]](_0x7c78[549])){application[_0x7c78[984]](101,_0x7c78[998]+ yt2url+ _0x7c78[999])}else {toastr[_0x7c78[157]](Premadeletter39)}}function sendyt3(){if(($(_0x7c78[493])[_0x7c78[59]]()!= _0x7c78[6])|| document[_0x7c78[407]](_0x7c78[372])[_0x7c78[405]][_0x7c78[55]](_0x7c78[549])){application[_0x7c78[984]](101,_0x7c78[998]+ yt3url+ _0x7c78[999])}else {toastr[_0x7c78[157]](Premadeletter39)}}function sendyt4(){if(($(_0x7c78[493])[_0x7c78[59]]()!= _0x7c78[6])|| document[_0x7c78[407]](_0x7c78[372])[_0x7c78[405]][_0x7c78[55]](_0x7c78[549])){application[_0x7c78[984]](101,_0x7c78[998]+ yt4url+ _0x7c78[999])}else {toastr[_0x7c78[157]](Premadeletter39)}}function sendyt5(){if(($(_0x7c78[493])[_0x7c78[59]]()!= _0x7c78[6])|| document[_0x7c78[407]](_0x7c78[372])[_0x7c78[405]][_0x7c78[55]](_0x7c78[549])){application[_0x7c78[984]](101,_0x7c78[998]+ yt5url+ _0x7c78[999])}else {toastr[_0x7c78[157]](Premadeletter39)}}function sendyt6(){if(($(_0x7c78[493])[_0x7c78[59]]()!= _0x7c78[6])|| document[_0x7c78[407]](_0x7c78[372])[_0x7c78[405]][_0x7c78[55]](_0x7c78[549])){application[_0x7c78[984]](101,_0x7c78[998]+ yt6url+ _0x7c78[999])}else {toastr[_0x7c78[157]](Premadeletter39)}}function setyt1data(){localStorage[_0x7c78[117]](_0x7c78[450],$(_0x7c78[1000])[_0x7c78[59]]());$(_0x7c78[1001])[_0x7c78[206]](_0x7c78[986],$(_0x7c78[1000])[_0x7c78[59]]())}function setyt2data(){localStorage[_0x7c78[117]](_0x7c78[451],$(_0x7c78[1002])[_0x7c78[59]]());$(_0x7c78[1003])[_0x7c78[206]](_0x7c78[986],$(_0x7c78[1002])[_0x7c78[59]]())}function setyt3data(){localStorage[_0x7c78[117]](_0x7c78[452],$(_0x7c78[1004])[_0x7c78[59]]());$(_0x7c78[1005])[_0x7c78[206]](_0x7c78[986],$(_0x7c78[1004])[_0x7c78[59]]())}function setyt4data(){localStorage[_0x7c78[117]](_0x7c78[453],$(_0x7c78[1006])[_0x7c78[59]]());$(_0x7c78[1007])[_0x7c78[206]](_0x7c78[986],$(_0x7c78[1006])[_0x7c78[59]]())}function setyt5data(){localStorage[_0x7c78[117]](_0x7c78[454],$(_0x7c78[1008])[_0x7c78[59]]());$(_0x7c78[1009])[_0x7c78[206]](_0x7c78[986],$(_0x7c78[1008])[_0x7c78[59]]())}function setyt6data(){localStorage[_0x7c78[117]](_0x7c78[455],$(_0x7c78[1010])[_0x7c78[59]]());$(_0x7c78[1011])[_0x7c78[206]](_0x7c78[986],$(_0x7c78[1010])[_0x7c78[59]]())}function setyt1url(){yt1url= $(_0x7c78[1012])[_0x7c78[59]]();if(getParameterByName(_0x7c78[160],yt1url)!= null){yt1url= getParameterByName(_0x7c78[160],yt1url)};localStorage[_0x7c78[117]](_0x7c78[438],yt1url);return yt1url}function setyt2url(){yt2url= $(_0x7c78[1013])[_0x7c78[59]]();if(getParameterByName(_0x7c78[160],yt2url)!= null){yt2url= getParameterByName(_0x7c78[160],yt2url)};localStorage[_0x7c78[117]](_0x7c78[439],yt2url);return yt2url}function setyt3url(){yt3url= $(_0x7c78[1014])[_0x7c78[59]]();if(getParameterByName(_0x7c78[160],yt3url)!= null){yt3url= getParameterByName(_0x7c78[160],yt3url)};localStorage[_0x7c78[117]](_0x7c78[440],yt3url);return yt3url}function setyt4url(){yt4url= $(_0x7c78[1015])[_0x7c78[59]]();if(getParameterByName(_0x7c78[160],yt4url)!= null){yt4url= getParameterByName(_0x7c78[160],yt4url)};localStorage[_0x7c78[117]](_0x7c78[441],yt4url);return yt4url}function setyt5url(){yt5url= $(_0x7c78[1016])[_0x7c78[59]]();if(getParameterByName(_0x7c78[160],yt5url)!= null){yt5url= getParameterByName(_0x7c78[160],yt5url)};localStorage[_0x7c78[117]](_0x7c78[442],yt5url);return yt5url}function setyt6url(){yt6url= $(_0x7c78[1017])[_0x7c78[59]]();if(getParameterByName(_0x7c78[160],yt6url)!= null){yt6url= getParameterByName(_0x7c78[160],yt6url)};localStorage[_0x7c78[117]](_0x7c78[443],yt6url);return yt6url}function seticonfunction(){if(setmessagecom== _0x7c78[100]){YessetMsgComReturn()};if(setyt== _0x7c78[100]){YessetytReturn()};if(setscriptingcom== _0x7c78[100]){YessetScriptingComReturn()};if(seticon== _0x7c78[99]){NoseticonReturn()}else {if(seticon== _0x7c78[100]){YesseticonReturn()}}}function setmessagecomfunction(){if(seticon== _0x7c78[100]){YesseticonReturn()};if(setyt== _0x7c78[100]){YessetytReturn()};if(setscriptingcom== _0x7c78[100]){YessetScriptingComReturn()};if(setmessagecom== _0x7c78[99]){NosetMsgComReturn()}else {if(setmessagecom== _0x7c78[100]){YessetMsgComReturn()}}}function setytfunction(){if(setmessagecom== _0x7c78[100]){YessetMsgComReturn()};if(seticon== _0x7c78[100]){YesseticonReturn()};if(setscriptingcom== _0x7c78[100]){YessetScriptingComReturn()};if(setyt== _0x7c78[99]){NosetytReturn()}else {if(setyt== _0x7c78[100]){YessetytReturn()}}}function setscriptingfunction(){if(seticon== _0x7c78[100]){YesseticonReturn()};if(setyt== _0x7c78[100]){YessetytReturn()};if(setmessagecom== _0x7c78[100]){YessetMsgComReturn()};if(setscriptingcom== _0x7c78[99]){NosetScriptingComReturn()}else {if(setscriptingcom== _0x7c78[100]){YessetScriptingComReturn()}}}function NoseticonReturn(){$(_0x7c78[1018])[_0x7c78[87]]();return seticon= _0x7c78[100]}function YesseticonReturn(){$(_0x7c78[1018])[_0x7c78[61]]();return seticon= _0x7c78[99]}function NosetMsgComReturn(){$(_0x7c78[1019])[_0x7c78[87]]();return setmessagecom= _0x7c78[100]}function YessetMsgComReturn(){$(_0x7c78[1019])[_0x7c78[61]]();return setmessagecom= _0x7c78[99]}function NosetytReturn(){$(_0x7c78[1020])[_0x7c78[87]]();return setyt= _0x7c78[100]}function YessetytReturn(){$(_0x7c78[1020])[_0x7c78[61]]();return setyt= _0x7c78[99]}function NosetScriptingComReturn(){$(_0x7c78[1021])[_0x7c78[87]]();return setscriptingcom= _0x7c78[100]}function YessetScriptingComReturn(){$(_0x7c78[1021])[_0x7c78[61]]();return setscriptingcom= _0x7c78[99]}function changePicFun(){$(_0x7c78[1022])[_0x7c78[61]]();$(_0x7c78[1023])[_0x7c78[61]]();$(_0x7c78[1024])[_0x7c78[61]]();$(_0x7c78[1025])[_0x7c78[61]]();$(_0x7c78[1026])[_0x7c78[61]]();$(_0x7c78[1027])[_0x7c78[61]]();$(_0x7c78[1028])[_0x7c78[61]]();$(_0x7c78[1029])[_0x7c78[61]]();$(_0x7c78[1030])[_0x7c78[61]]();if($(_0x7c78[1031])[_0x7c78[59]]()== 1){$(_0x7c78[1022])[_0x7c78[87]]();$(_0x7c78[1030])[_0x7c78[87]]()};if($(_0x7c78[1031])[_0x7c78[59]]()== 2){$(_0x7c78[1023])[_0x7c78[87]]();$(_0x7c78[1026])[_0x7c78[87]]()};if($(_0x7c78[1031])[_0x7c78[59]]()== 3){$(_0x7c78[1024])[_0x7c78[87]]();$(_0x7c78[1027])[_0x7c78[87]]()};if($(_0x7c78[1031])[_0x7c78[59]]()== 4){$(_0x7c78[1025])[_0x7c78[87]]()};if($(_0x7c78[1031])[_0x7c78[59]]()== 5){$(_0x7c78[1028])[_0x7c78[87]]();$(_0x7c78[1029])[_0x7c78[87]]()}}function changePhotoFun(){$(_0x7c78[1032])[_0x7c78[61]]();$(_0x7c78[1033])[_0x7c78[61]]();$(_0x7c78[1034])[_0x7c78[61]]();$(_0x7c78[1035])[_0x7c78[61]]();$(_0x7c78[1036])[_0x7c78[61]]();$(_0x7c78[1037])[_0x7c78[61]]();$(_0x7c78[1012])[_0x7c78[61]]();$(_0x7c78[1013])[_0x7c78[61]]();$(_0x7c78[1014])[_0x7c78[61]]();$(_0x7c78[1015])[_0x7c78[61]]();$(_0x7c78[1016])[_0x7c78[61]]();$(_0x7c78[1017])[_0x7c78[61]]();$(_0x7c78[985])[_0x7c78[61]]();$(_0x7c78[988])[_0x7c78[61]]();$(_0x7c78[990])[_0x7c78[61]]();$(_0x7c78[992])[_0x7c78[61]]();$(_0x7c78[994])[_0x7c78[61]]();$(_0x7c78[996])[_0x7c78[61]]();$(_0x7c78[1000])[_0x7c78[61]]();$(_0x7c78[1002])[_0x7c78[61]]();$(_0x7c78[1004])[_0x7c78[61]]();$(_0x7c78[1006])[_0x7c78[61]]();$(_0x7c78[1008])[_0x7c78[61]]();$(_0x7c78[1010])[_0x7c78[61]]();if($(_0x7c78[1038])[_0x7c78[59]]()== 1){$(_0x7c78[1032])[_0x7c78[87]]();$(_0x7c78[985])[_0x7c78[87]]()};if($(_0x7c78[1038])[_0x7c78[59]]()== 2){$(_0x7c78[1033])[_0x7c78[87]]();$(_0x7c78[988])[_0x7c78[87]]()};if($(_0x7c78[1038])[_0x7c78[59]]()== 3){$(_0x7c78[1034])[_0x7c78[87]]();$(_0x7c78[990])[_0x7c78[87]]()};if($(_0x7c78[1038])[_0x7c78[59]]()== 4){$(_0x7c78[1035])[_0x7c78[87]]();$(_0x7c78[992])[_0x7c78[87]]()};if($(_0x7c78[1038])[_0x7c78[59]]()== 5){$(_0x7c78[1036])[_0x7c78[87]]();$(_0x7c78[994])[_0x7c78[87]]()};if($(_0x7c78[1038])[_0x7c78[59]]()== 6){$(_0x7c78[1037])[_0x7c78[87]]();$(_0x7c78[996])[_0x7c78[87]]()};if($(_0x7c78[1038])[_0x7c78[59]]()== 7){$(_0x7c78[1012])[_0x7c78[87]]();$(_0x7c78[1000])[_0x7c78[87]]()};if($(_0x7c78[1038])[_0x7c78[59]]()== 8){$(_0x7c78[1013])[_0x7c78[87]]();$(_0x7c78[1002])[_0x7c78[87]]()};if($(_0x7c78[1038])[_0x7c78[59]]()== 9){$(_0x7c78[1014])[_0x7c78[87]]();$(_0x7c78[1004])[_0x7c78[87]]()};if($(_0x7c78[1038])[_0x7c78[59]]()== 10){$(_0x7c78[1015])[_0x7c78[87]]();$(_0x7c78[1006])[_0x7c78[87]]()};if($(_0x7c78[1038])[_0x7c78[59]]()== 11){$(_0x7c78[1016])[_0x7c78[87]]();$(_0x7c78[1008])[_0x7c78[87]]()};if($(_0x7c78[1038])[_0x7c78[59]]()== 12){$(_0x7c78[1017])[_0x7c78[87]]();$(_0x7c78[1010])[_0x7c78[87]]()}}function msgcommand1f(){commandMsg= _0x7c78[522];otherMsg= _0x7c78[6];dosendmsgcommand()}function msgcommand2f(){commandMsg= _0x7c78[517];otherMsg= _0x7c78[6];dosendmsgcommand()}function msgcommand3f(){commandMsg= _0x7c78[533];otherMsg= _0x7c78[6];dosendmsgcommand()}function msgcommand4f(){commandMsg= _0x7c78[537];otherMsg= _0x7c78[6];dosendmsgcommand()}function msgcommand5f(){commandMsg= _0x7c78[541];otherMsg= _0x7c78[6];dosendmsgcommand()}function msgcommand6f(){commandMsg= _0x7c78[528];otherMsg= _0x7c78[6];dosendmsgcommand()}function dosendmsgcommand(){if(application[_0x7c78[1039]]== _0x7c78[6]|| $(_0x7c78[493])[_0x7c78[59]]()== _0x7c78[6]){toastr[_0x7c78[184]](_0x7c78[199]+ Premadeletter123+ _0x7c78[200]+ Premadeletter39)}else {application[_0x7c78[984]](101,_0x7c78[1040]+ $(_0x7c78[293])[_0x7c78[59]]()+ _0x7c78[1041]+ commandMsg+ _0x7c78[1042]+ otherMsg)}}function CutNameConflictwithMessageFunction(){return CutNameConflictwithMessage= true}function inject(_0x1499x8a,_0x1499x19b){switch(_0x1499x8a){case _0x7c78[1044]:var inject=document[_0x7c78[936]](_0x7c78[935]);inject[_0x7c78[926]]= _0x7c78[937];inject[_0x7c78[940]](document[_0x7c78[1043]](_0x1499x19b));break;case _0x7c78[1047]:var inject=document[_0x7c78[936]](_0x7c78[1045]);inject[_0x7c78[926]]= _0x7c78[1046];inject[_0x7c78[940]](document[_0x7c78[1043]](_0x1499x19b));break};(document[_0x7c78[647]]|| document[_0x7c78[204]])[_0x7c78[940]](inject)}function StartEditGameNames(){inject(_0x7c78[1047],_0x7c78[1048]);inject(_0x7c78[1044],!function _0x1499x12d(_0x1499x19d){if(_0x7c78[938]!= typeof document[_0x7c78[974]](_0x7c78[647])[0]&& _0x7c78[938]!= typeof document[_0x7c78[974]](_0x7c78[280])[0]){var _0x1499x19e={l:{score:0,names:[],leaderboard:{},toggled:!0,prototypes:{canvas:CanvasRenderingContext2D[_0x7c78[125]],old:{}}},f:{prototype_override:function(_0x1499x12d,_0x1499x19d,_0x1499x19f,_0x1499x8e){_0x1499x12d in _0x1499x19e[_0x7c78[1049]][_0x7c78[127]][_0x7c78[126]]|| (_0x1499x19e[_0x7c78[1049]][_0x7c78[127]][_0x7c78[126]][_0x1499x12d]= {}),_0x1499x19d in _0x1499x19e[_0x7c78[1049]][_0x7c78[127]][_0x7c78[126]][_0x1499x12d]|| (_0x1499x19e[_0x7c78[1049]][_0x7c78[127]][_0x7c78[126]][_0x1499x12d][_0x1499x19d]= _0x1499x19e[_0x7c78[1049]][_0x7c78[127]][_0x1499x12d][_0x1499x19d]),_0x1499x19e[_0x7c78[1049]][_0x7c78[127]][_0x1499x12d][_0x1499x19d]= function(){_0x7c78[128]== _0x1499x19f&& _0x1499x8e(this,arguments),_0x1499x19e[_0x7c78[1049]][_0x7c78[127]][_0x7c78[126]][_0x1499x12d][_0x1499x19d][_0x7c78[129]](this,arguments),_0x7c78[130]== _0x1499x19f&& _0x1499x8e(this,arguments)}},filltext_override:function(){_0x1499x19e[_0x7c78[150]][_0x7c78[151]](_0x7c78[137],_0x7c78[143],_0x7c78[128],function(_0x1499x12d,_0x1499x19d){var _0x1499x19f=_0x1499x19d[0];if(_0x1499x19d,_0x1499x19f[_0x7c78[1050]](/^(1|2|3|4|5|6|7|8|9|10)\.(.+?)$/)){var _0x1499x8e=_0x7c78[6],_0x1499x143=_0x1499x19f[_0x7c78[190]](/\.(.+)?/);_0x1499x19e[_0x7c78[1049]][_0x7c78[374]][_0x1499x143[0]]= _0x1499x143[1];for(k in _0x1499x19e[_0x7c78[1049]][_0x7c78[374]]){_0x1499x8e+= _0x1499x19e[_0x7c78[1053]][_0x7c78[1052]](_0x7c78[1051]+ k,_0x1499x19e[_0x7c78[1049]][_0x7c78[374]][k])};document[_0x7c78[407]](_0x7c78[1054])[_0x7c78[203]]= _0x1499x8e}else {_0x1499x19f[_0x7c78[1050]](/^score\:\s([0-9]+)$/i)?(_0x1499x19e[_0x7c78[1049]][_0x7c78[1055]]= parseInt(_0x1499x19f[_0x7c78[190]](/score:\s([0-9]+)?/i)[1]),document[_0x7c78[407]](_0x7c78[1056])[_0x7c78[203]]= _0x1499x19e[_0x7c78[1053]][_0x7c78[1052]](_0x7c78[1055],_0x1499x19e[_0x7c78[1049]][_0x7c78[1055]])):!(_0x7c78[6]!== _0x1499x19f&& _0x1499x19f[_0x7c78[140]]<= 15)|| _0x1499x19e[_0x7c78[1049]][_0x7c78[1057]][_0x7c78[179]](_0x1499x19f)> -1 || _0x1499x19f[_0x7c78[1050]](/(leaderboard|connect|loading|starting\smass|xp\sboost|open\sshop|([0-9]{2})m\s(([0-9]{2})h\s)?([0-9]{2})s)/i) || _0x1499x19f[_0x7c78[1050]](/^(free\scoins|\s?([0-9]+)\scoins|\s?with\soffers|collect\sin\:|hourly\scoins|come\sback\sin|to\searn\:|starter\spack|hourly\sbonus|level\s([0-9]+)|([0-9\.]+)|.([0-9\.]+)|([0-9\.]+)\%|mass\sboost|coins|skins|shop|banana|cookie|jupiter|birdie|mercury|apple|halo|neptune|black\shole|uranus|star\sball|target|galaxy|venus|breakfast|saturn|pluto|tiger|hot\sdog|heart|mouse|wolf|goldfish|piggie|blueberry|bomb|bowling|candy|frog|hamburger|nose|seal|panda|pizza|snowman|sun|baseball|basketball|bug|cloud|moo|tomato|mushroom|donuts|terrible|ghost|apple\sface|turtle|brofist|puppy|footprint|pineapple|zebra|toon|octopus|radar|eye|owl|virus|smile|army|cat|nuclear|toxic|dog|sad|facepalm|luchador|zombie|bite|crazy|hockey|brain|evil|pirate|evil\seye|halloween|monster|scarecrow|spy|fly|spider|wasp|lizard|bat|snake|fox|coyote|hunter|sumo|bear|cougar|panther|lion|crocodile|shark|mammoth|raptor|t-rex|kraken|gingerbread|santa|evil\self|cupcake|boy\skiss|girl\skiss|cupid|shuttle|astronaut|space\sdog|alien|meteor|ufo|rocket|boot|gold\spot|hat|horseshoe|lucky\sclover|leprechaun|rainbow|choco\segg|carrot|statue|rooster|rabbit|jester|earth\sday|chihuahua|cactus|sombrero|hot\spepper|chupacabra|taco|piAƒA£A‚A±ata|thirteen|black\scat|raven|mask|goblin|green\sman|slime\sface|blob|invader|space\shunter)$/i) || (_0x1499x19e[_0x7c78[1049]][_0x7c78[1057]][_0x7c78[885]](_0x1499x19f),document[_0x7c78[407]](_0x7c78[1058])[_0x7c78[203]]= document[_0x7c78[407]](_0x7c78[1058])[_0x7c78[203]][_0x7c78[1060]](_0x1499x19e[_0x7c78[1053]][_0x7c78[1052]](_0x7c78[1059],_0x1499x19f)))}})},hotkeys:function(_0x1499x12d){88== _0x1499x12d[_0x7c78[685]]&& (document[_0x7c78[407]](_0x7c78[1061])[_0x7c78[1045]][_0x7c78[523]]= _0x1499x19e[_0x7c78[1049]][_0x7c78[1062]]?_0x7c78[525]:_0x7c78[732],_0x1499x19e[_0x7c78[1049]][_0x7c78[1062]]= _0x1499x19e[_0x7c78[1049]][_0x7c78[1062]]?!1:!0)}},u:{fonts:function(){return _0x7c78[1063]},html:function(){return _0x7c78[1064]},span:function(_0x1499x12d,_0x1499x19d){return _0x7c78[1065]+ _0x1499x12d+ _0x7c78[1066]+ _0x1499x19d+ _0x7c78[1067]+ _0x1499x19d+ _0x7c78[752]}}};document[_0x7c78[974]](_0x7c78[647])[0][_0x7c78[1070]](_0x7c78[1068],_0x1499x19e[_0x7c78[1053]][_0x7c78[1069]]()),document[_0x7c78[974]](_0x7c78[280])[0][_0x7c78[1070]](_0x7c78[1068],_0x1499x19e[_0x7c78[1053]][_0x7c78[281]]()),_0x1499x19d[_0x7c78[1072]](_0x7c78[692],_0x1499x19e[_0x7c78[150]][_0x7c78[1071]]),_0x1499x19e[_0x7c78[150]][_0x7c78[1073]]()}else {_0x1499x19d[_0x7c78[1074]](function(){_0x1499x12d(_0x1499x19d)},100)}}(window))}function StopEditGameNames(){$(_0x7c78[1075])[_0x7c78[61]]()}function ContinueEditGameNames(){$(_0x7c78[1075])[_0x7c78[87]]()}function displayTimer(){var _0x1499x1a3=_0x7c78[1076],_0x1499x1a4=_0x7c78[1076],_0x1499x1a5=_0x7c78[6],_0x1499x1a6= new Date()[_0x7c78[229]]();TimerLM[_0x7c78[1077]]= _0x1499x1a6- TimerLM[_0x7c78[1078]];if(TimerLM[_0x7c78[1077]]> 1000){_0x1499x1a4= Math[_0x7c78[141]](TimerLM[_0x7c78[1077]]/ 1000);if(_0x1499x1a4> 60){_0x1499x1a4= _0x1499x1a4% 60};if(_0x1499x1a4< 10){_0x1499x1a4= _0x7c78[101]+ String(_0x1499x1a4)}};if(TimerLM[_0x7c78[1077]]> 60000){_0x1499x1a3= Math[_0x7c78[141]](TimerLM[_0x7c78[1077]]/ 60000);1;if(_0x1499x1a3> 60){_0x1499x1a3= _0x1499x1a3% 60};if(_0x1499x1a3< 10){_0x1499x1a3= _0x7c78[101]+ String(_0x1499x1a3)}};_0x1499x1a5+= _0x1499x1a3+ _0x7c78[239];_0x1499x1a5+= _0x1499x1a4;TimerLM[_0x7c78[1079]][_0x7c78[203]]= _0x1499x1a5}function startTimer(){$(_0x7c78[1080])[_0x7c78[61]]();$(_0x7c78[1081])[_0x7c78[87]]();$(_0x7c78[1082])[_0x7c78[87]]();TimerLM[_0x7c78[1078]]= new Date()[_0x7c78[229]]();console[_0x7c78[283]](_0x7c78[1083]+ TimerLM[_0x7c78[1078]]);if(TimerLM[_0x7c78[1077]]> 0){TimerLM[_0x7c78[1078]]= TimerLM[_0x7c78[1078]]- TimerLM[_0x7c78[1077]]};TimerLM[_0x7c78[1084]]= setInterval(function(){displayTimer()},10)}function stopTimer(){$(_0x7c78[1080])[_0x7c78[87]]();$(_0x7c78[1081])[_0x7c78[61]]();$(_0x7c78[1082])[_0x7c78[87]]();clearInterval(TimerLM[_0x7c78[1084]])}function clearTimer(){$(_0x7c78[1080])[_0x7c78[87]]();$(_0x7c78[1081])[_0x7c78[61]]();$(_0x7c78[1082])[_0x7c78[61]]();clearInterval(TimerLM[_0x7c78[1084]]);TimerLM[_0x7c78[1079]][_0x7c78[203]]= _0x7c78[1085];TimerLM[_0x7c78[1077]]= 0}function setminbgname(){minimapbckimg= $(_0x7c78[1022])[_0x7c78[59]]();localStorage[_0x7c78[117]](_0x7c78[428],minimapbckimg);$(_0x7c78[1088])[_0x7c78[73]](_0x7c78[518],_0x7c78[1086]+ minimapbckimg+ _0x7c78[1087])[_0x7c78[73]]({opacity:0.8})}function setminbtext(){minbtext= $(_0x7c78[1030])[_0x7c78[59]]();localStorage[_0x7c78[117]](_0x7c78[40],minbtext);var _0x1499x8f=document[_0x7c78[407]](_0x7c78[146]);var _0x1499x13e=_0x1499x8f[_0x7c78[873]](_0x7c78[872]);_0x1499x13e[_0x7c78[874]](0,0,_0x1499x8f[_0x7c78[71]],_0x1499x8f[_0x7c78[715]]/ 9);_0x1499x13e[_0x7c78[875]]= _0x7c78[1089];_0x1499x13e[_0x7c78[143]](minbtext,_0x1499x8f[_0x7c78[71]]/ 2,22)}function setleadbgname(){leadbimg= $(_0x7c78[1023])[_0x7c78[59]]();localStorage[_0x7c78[117]](_0x7c78[431],leadbimg);$(_0x7c78[1090])[_0x7c78[73]](_0x7c78[518],_0x7c78[1086]+ leadbimg+ _0x7c78[1087])[_0x7c78[73]]({opacity:0.8})}function setteambgname(){teambimg= $(_0x7c78[1024])[_0x7c78[59]]();localStorage[_0x7c78[117]](_0x7c78[429],teambimg);$(_0x7c78[520])[_0x7c78[73]](_0x7c78[518],_0x7c78[1086]+ teambimg+ _0x7c78[1087])[_0x7c78[73]]({opacity:0.8})}function setcanvasbgname(){canvasbimg= $(_0x7c78[1025])[_0x7c78[59]]();localStorage[_0x7c78[117]](_0x7c78[430],canvasbimg);$(_0x7c78[1091])[_0x7c78[73]](_0x7c78[518],_0x7c78[1086]+ canvasbimg+ _0x7c78[1087])[_0x7c78[73]]({opacity:1});$(_0x7c78[1091])[_0x7c78[73]](_0x7c78[1092],_0x7c78[1093])}function setleadbtext(){leadbtext= $(_0x7c78[1026])[_0x7c78[59]]();localStorage[_0x7c78[117]](_0x7c78[41],leadbtext);$(_0x7c78[1094])[_0x7c78[76]](leadbtext)}function setteambtext(){teambtext= $(_0x7c78[1027])[_0x7c78[59]]();localStorage[_0x7c78[117]](_0x7c78[42],teambtext);$(_0x7c78[1095])[_0x7c78[76]](teambtext)}function setimgUrl(){imgUrl= $(_0x7c78[1028])[_0x7c78[59]]();localStorage[_0x7c78[117]](_0x7c78[43],imgUrl)}function setimgHref(){imgHref= $(_0x7c78[1029])[_0x7c78[59]]();localStorage[_0x7c78[117]](_0x7c78[44],imgHref)}function setpic1url(){pic1urlimg= $(_0x7c78[1032])[_0x7c78[59]]();localStorage[_0x7c78[117]](_0x7c78[432],pic1urlimg);return pic1urlimg}function setpic2url(){pic2urlimg= $(_0x7c78[1033])[_0x7c78[59]]();localStorage[_0x7c78[117]](_0x7c78[433],pic2urlimg);return pic2urlimg}function setpic3url(){pic3urlimg= $(_0x7c78[1034])[_0x7c78[59]]();localStorage[_0x7c78[117]](_0x7c78[434],pic3urlimg);return pic3urlimg}function setpic4url(){pic4urlimg= $(_0x7c78[1035])[_0x7c78[59]]();localStorage[_0x7c78[117]](_0x7c78[435],pic4urlimg);return pic4urlimg}function setpic5url(){pic5urlimg= $(_0x7c78[1036])[_0x7c78[59]]();localStorage[_0x7c78[117]](_0x7c78[436],pic5urlimg);return pic5urlimg}function setpic6url(){pic6urlimg= $(_0x7c78[1037])[_0x7c78[59]]();localStorage[_0x7c78[117]](_0x7c78[437],pic6urlimg);return pic6urlimg}function setdiscwebhook1(){discwebhook1= $(_0x7c78[1096])[_0x7c78[59]]();var _0x1499x1ba=$(_0x7c78[1096])[_0x7c78[59]]();if(~_0x1499x1ba[_0x7c78[179]](_0x7c78[1097])|| ~_0x1499x1ba[_0x7c78[179]](_0x7c78[1098])){localStorage[_0x7c78[117]](_0x7c78[456],discwebhook1);var _0x1499x19f=document[_0x7c78[936]](_0x7c78[935]);_0x1499x19f[_0x7c78[926]]= _0x7c78[937];_0x1499x19f[_0x7c78[470]]= _0x7c78[1099];$(_0x7c78[280])[_0x7c78[279]](_0x1499x19f)}else {if(_0x1499x1ba== _0x7c78[6]){localStorage[_0x7c78[117]](_0x7c78[456],discwebhook1)}else {toastr[_0x7c78[173]](Premadeletter36)[_0x7c78[73]](_0x7c78[71],_0x7c78[267])}}}function setdiscwebhook2(){discwebhook2= $(_0x7c78[1100])[_0x7c78[59]]();var _0x1499x1ba=$(_0x7c78[1100])[_0x7c78[59]]();if(~_0x1499x1ba[_0x7c78[179]](_0x7c78[1097])|| ~_0x1499x1ba[_0x7c78[179]](_0x7c78[1098])){localStorage[_0x7c78[117]](_0x7c78[457],discwebhook2)}else {if(_0x1499x1ba== _0x7c78[6]){localStorage[_0x7c78[117]](_0x7c78[457],discwebhook2)}else {toastr[_0x7c78[173]](Premadeletter36)[_0x7c78[73]](_0x7c78[71],_0x7c78[267])}}}function openbleedmod(){var _0x1499x19f=document[_0x7c78[936]](_0x7c78[935]);_0x1499x19f[_0x7c78[926]]= _0x7c78[937];_0x1499x19f[_0x7c78[470]]= _0x7c78[1101];$(_0x7c78[280])[_0x7c78[279]](_0x1499x19f)}function openrotatingmod(){var _0x1499x19f=document[_0x7c78[936]](_0x7c78[935]);_0x1499x19f[_0x7c78[926]]= _0x7c78[937];_0x1499x19f[_0x7c78[470]]= _0x7c78[1102];$(_0x7c78[280])[_0x7c78[279]](_0x1499x19f)}function languagemodfun(){if(languagemod!= 1){$(_0x7c78[1103])[_0x7c78[59]](languagemod);changeModLanguage()}}function changeModLanguage(){localStorage[_0x7c78[117]](_0x7c78[113],$(_0x7c78[1103])[_0x7c78[59]]());if($(_0x7c78[1103])[_0x7c78[59]]()== 1){languageinjector(_0x7c78[1104])}else {if($(_0x7c78[1103])[_0x7c78[59]]()== 2){languageinjector(_0x7c78[1105])}else {if($(_0x7c78[1103])[_0x7c78[59]]()== 3){languageinjector(_0x7c78[1106])}else {if($(_0x7c78[1103])[_0x7c78[59]]()== 4){languageinjector(_0x7c78[1107])}else {if($(_0x7c78[1103])[_0x7c78[59]]()== 5){languageinjector(_0x7c78[1108])}else {if($(_0x7c78[1103])[_0x7c78[59]]()== 6){languageinjector(_0x7c78[1109])}else {if($(_0x7c78[1103])[_0x7c78[59]]()== 7){languageinjector(_0x7c78[1110])}else {if($(_0x7c78[1103])[_0x7c78[59]]()== 8){languageinjector(_0x7c78[1111])}else {if($(_0x7c78[1103])[_0x7c78[59]]()== 9){languageinjector(_0x7c78[1112])}else {if($(_0x7c78[1103])[_0x7c78[59]]()== 10){languageinjector(_0x7c78[1113])}else {if($(_0x7c78[1103])[_0x7c78[59]]()== 11){languageinjector(_0x7c78[1114])}}}}}}}}}}}}function injector2(_0x1499x1c1,url2){var _0x1499x14f=document[_0x7c78[936]](_0x7c78[935]);_0x1499x14f[_0x7c78[939]]= function(){var _0x1499x1c2=document[_0x7c78[936]](_0x7c78[935]);_0x1499x1c2[_0x7c78[470]]= url2;document[_0x7c78[974]](_0x7c78[647])[0][_0x7c78[940]](_0x1499x1c2)};_0x1499x14f[_0x7c78[470]]= _0x1499x1c1;document[_0x7c78[974]](_0x7c78[647])[0][_0x7c78[940]](_0x1499x14f)}function languageinjector(url){injector2(url,_0x7c78[1115])}function newsubmit(){if(legendmod[_0x7c78[387]]== true){$(_0x7c78[236])[_0x7c78[208]]()}}function triggerLMbtns(){PanelImageSrc= $(_0x7c78[103])[_0x7c78[59]]();if(PanelImageSrc!= _0x7c78[6]|| PanelImageSrc!= _0x7c78[1116]|| PanelImageSrc!= _0x7c78[1117]){$(_0x7c78[1120])[_0x7c78[73]](_0x7c78[518],_0x7c78[1118]+ PanelImageSrc+ _0x7c78[1119])};$(_0x7c78[1122])[_0x7c78[1121]](function(){if(PanelImageSrc!= _0x7c78[6]|| PanelImageSrc!= _0x7c78[1116]|| PanelImageSrc!= _0x7c78[1117]){$(_0x7c78[1120])[_0x7c78[73]](_0x7c78[518],_0x7c78[1118]+ PanelImageSrc+ _0x7c78[1119])}});$(_0x7c78[1123])[_0x7c78[1121]](function(){if(PanelImageSrc!= _0x7c78[6]|| PanelImageSrc!= _0x7c78[1116]|| PanelImageSrc!= _0x7c78[1117]){$(_0x7c78[1120])[_0x7c78[73]](_0x7c78[518],_0x7c78[1118]+ PanelImageSrc+ _0x7c78[1119])}});$(_0x7c78[1124])[_0x7c78[1121]](function(){if(PanelImageSrc!= _0x7c78[6]|| PanelImageSrc!= _0x7c78[1116]|| PanelImageSrc!= _0x7c78[1117]){$(_0x7c78[1120])[_0x7c78[73]](_0x7c78[518],_0x7c78[1118]+ PanelImageSrc+ _0x7c78[1119])}});$(_0x7c78[1125])[_0x7c78[1121]](function(){if(PanelImageSrc!= _0x7c78[6]|| PanelImageSrc!= _0x7c78[1116]|| PanelImageSrc!= _0x7c78[1117]){$(_0x7c78[1120])[_0x7c78[73]](_0x7c78[518],_0x7c78[1118]+ PanelImageSrc+ _0x7c78[1119])}});if(SHOSHOBtn== _0x7c78[115]){$(_0x7c78[209])[_0x7c78[208]]()};if(MAINBTBtn== _0x7c78[115]){$(_0x7c78[210])[_0x7c78[208]]()};if(AnimatedSkinBtn== _0x7c78[115]){$(_0x7c78[1126])[_0x7c78[208]]()};if(XPBtn== _0x7c78[115]){$(_0x7c78[211])[_0x7c78[208]]()};if(TIMEcalBtn== _0x7c78[115]){$(_0x7c78[1127])[_0x7c78[208]]()};document[_0x7c78[407]](_0x7c78[1128])[_0x7c78[405]]= localStorage[_0x7c78[3]](_0x7c78[428]);if($(_0x7c78[1022])[_0x7c78[59]]()!= _0x7c78[6]){setminbgname()};document[_0x7c78[407]](_0x7c78[1129])[_0x7c78[405]]= localStorage[_0x7c78[3]](_0x7c78[431]);if($(_0x7c78[1023])[_0x7c78[59]]()!= _0x7c78[6]){setleadbgname()};document[_0x7c78[407]](_0x7c78[1130])[_0x7c78[405]]= localStorage[_0x7c78[3]](_0x7c78[429]);if($(_0x7c78[1024])[_0x7c78[59]]()!= _0x7c78[6]){setteambgname()};document[_0x7c78[407]](_0x7c78[1131])[_0x7c78[405]]= localStorage[_0x7c78[3]](_0x7c78[430]);if($(_0x7c78[1025])[_0x7c78[59]]()!= _0x7c78[6]){setcanvasbgname()};document[_0x7c78[407]](_0x7c78[41])[_0x7c78[405]]= localStorage[_0x7c78[3]](_0x7c78[41]);if($(_0x7c78[1026])[_0x7c78[59]]()!= _0x7c78[6]){setleadbtext()};document[_0x7c78[407]](_0x7c78[42])[_0x7c78[405]]= localStorage[_0x7c78[3]](_0x7c78[42]);if($(_0x7c78[1027])[_0x7c78[59]]()!= _0x7c78[6]){setteambtext()};document[_0x7c78[407]](_0x7c78[43])[_0x7c78[405]]= localStorage[_0x7c78[3]](_0x7c78[43]);if($(_0x7c78[1028])[_0x7c78[59]]()!= _0x7c78[6]){setimgUrl()};document[_0x7c78[407]](_0x7c78[44])[_0x7c78[405]]= localStorage[_0x7c78[3]](_0x7c78[44]);if($(_0x7c78[1029])[_0x7c78[59]]()!= _0x7c78[6]){setimgHref()};document[_0x7c78[407]](_0x7c78[40])[_0x7c78[405]]= localStorage[_0x7c78[3]](_0x7c78[40]);if($(_0x7c78[1030])[_0x7c78[59]]()!= _0x7c78[6]&& $(_0x7c78[1030])[_0x7c78[59]]()!= null){setminbtext()};document[_0x7c78[407]](_0x7c78[1132])[_0x7c78[405]]= localStorage[_0x7c78[3]](_0x7c78[432]);if($(_0x7c78[1032])[_0x7c78[59]]()!= _0x7c78[6]){setpic1url()};document[_0x7c78[407]](_0x7c78[1133])[_0x7c78[405]]= localStorage[_0x7c78[3]](_0x7c78[433]);if($(_0x7c78[1033])[_0x7c78[59]]()!= _0x7c78[6]){setpic2url()};document[_0x7c78[407]](_0x7c78[1134])[_0x7c78[405]]= localStorage[_0x7c78[3]](_0x7c78[434]);if($(_0x7c78[1034])[_0x7c78[59]]()!= _0x7c78[6]){setpic3url()};document[_0x7c78[407]](_0x7c78[1135])[_0x7c78[405]]= localStorage[_0x7c78[3]](_0x7c78[435]);if($(_0x7c78[1035])[_0x7c78[59]]()!= _0x7c78[6]){setpic4url()};document[_0x7c78[407]](_0x7c78[1136])[_0x7c78[405]]= localStorage[_0x7c78[3]](_0x7c78[436]);if($(_0x7c78[1036])[_0x7c78[59]]()!= _0x7c78[6]){setpic5url()};document[_0x7c78[407]](_0x7c78[1137])[_0x7c78[405]]= localStorage[_0x7c78[3]](_0x7c78[437]);if($(_0x7c78[1037])[_0x7c78[59]]()!= _0x7c78[6]){setpic6url()};document[_0x7c78[407]](_0x7c78[1138])[_0x7c78[405]]= localStorage[_0x7c78[3]](_0x7c78[438]);if($(_0x7c78[1012])[_0x7c78[59]]()!= _0x7c78[6]){setyt1url()};document[_0x7c78[407]](_0x7c78[1139])[_0x7c78[405]]= localStorage[_0x7c78[3]](_0x7c78[439]);if($(_0x7c78[1013])[_0x7c78[59]]()!= _0x7c78[6]){setyt2url()};document[_0x7c78[407]](_0x7c78[1140])[_0x7c78[405]]= localStorage[_0x7c78[3]](_0x7c78[440]);if($(_0x7c78[1014])[_0x7c78[59]]()!= _0x7c78[6]){setyt3url()};document[_0x7c78[407]](_0x7c78[1141])[_0x7c78[405]]= localStorage[_0x7c78[3]](_0x7c78[441]);if($(_0x7c78[1015])[_0x7c78[59]]()!= _0x7c78[6]){setyt4url()};document[_0x7c78[407]](_0x7c78[1142])[_0x7c78[405]]= localStorage[_0x7c78[3]](_0x7c78[442]);if($(_0x7c78[1016])[_0x7c78[59]]()!= _0x7c78[6]){setyt5url()};document[_0x7c78[407]](_0x7c78[1143])[_0x7c78[405]]= localStorage[_0x7c78[3]](_0x7c78[443]);if($(_0x7c78[1017])[_0x7c78[59]]()!= _0x7c78[6]){setyt6url()};document[_0x7c78[407]](_0x7c78[1144])[_0x7c78[405]]= localStorage[_0x7c78[3]](_0x7c78[444]);if($(_0x7c78[985])[_0x7c78[59]]()!= _0x7c78[6]){setpic1data()};document[_0x7c78[407]](_0x7c78[1145])[_0x7c78[405]]= localStorage[_0x7c78[3]](_0x7c78[445]);if($(_0x7c78[988])[_0x7c78[59]]()!= _0x7c78[6]){setpic2data()};document[_0x7c78[407]](_0x7c78[1146])[_0x7c78[405]]= localStorage[_0x7c78[3]](_0x7c78[446]);if($(_0x7c78[990])[_0x7c78[59]]()!= _0x7c78[6]){setpic3data()};document[_0x7c78[407]](_0x7c78[1147])[_0x7c78[405]]= localStorage[_0x7c78[3]](_0x7c78[447]);if($(_0x7c78[992])[_0x7c78[59]]()!= _0x7c78[6]){setpic4data()};document[_0x7c78[407]](_0x7c78[1148])[_0x7c78[405]]= localStorage[_0x7c78[3]](_0x7c78[448]);if($(_0x7c78[994])[_0x7c78[59]]()!= _0x7c78[6]){setpic5data()};document[_0x7c78[407]](_0x7c78[1149])[_0x7c78[405]]= localStorage[_0x7c78[3]](_0x7c78[449]);if($(_0x7c78[996])[_0x7c78[59]]()!= _0x7c78[6]){setpic6data()};document[_0x7c78[407]](_0x7c78[1150])[_0x7c78[405]]= localStorage[_0x7c78[3]](_0x7c78[450]);if($(_0x7c78[1000])[_0x7c78[59]]()!= _0x7c78[6]){setyt1data()};document[_0x7c78[407]](_0x7c78[1151])[_0x7c78[405]]= localStorage[_0x7c78[3]](_0x7c78[451]);if($(_0x7c78[1002])[_0x7c78[59]]()!= _0x7c78[6]){setyt2data()};document[_0x7c78[407]](_0x7c78[1152])[_0x7c78[405]]= localStorage[_0x7c78[3]](_0x7c78[452]);if($(_0x7c78[1004])[_0x7c78[59]]()!= _0x7c78[6]){setyt3data()};document[_0x7c78[407]](_0x7c78[1153])[_0x7c78[405]]= localStorage[_0x7c78[3]](_0x7c78[453]);if($(_0x7c78[1006])[_0x7c78[59]]()!= _0x7c78[6]){setyt4data()};document[_0x7c78[407]](_0x7c78[1154])[_0x7c78[405]]= localStorage[_0x7c78[3]](_0x7c78[454]);if($(_0x7c78[1008])[_0x7c78[59]]()!= _0x7c78[6]){setyt5data()};document[_0x7c78[407]](_0x7c78[1155])[_0x7c78[405]]= localStorage[_0x7c78[3]](_0x7c78[455]);if($(_0x7c78[1010])[_0x7c78[59]]()!= _0x7c78[6]){setyt6data()};document[_0x7c78[407]](_0x7c78[456])[_0x7c78[405]]= localStorage[_0x7c78[3]](_0x7c78[456]);if($(_0x7c78[1096])[_0x7c78[59]]()!= _0x7c78[6]&& $(_0x7c78[1096])[_0x7c78[59]]()!= null){setdiscwebhook1()};document[_0x7c78[407]](_0x7c78[457])[_0x7c78[405]]= localStorage[_0x7c78[3]](_0x7c78[457]);if($(_0x7c78[1100])[_0x7c78[59]]()!= _0x7c78[6]&& $(_0x7c78[1100])[_0x7c78[59]]()!= null){setdiscwebhook2()};$(_0x7c78[1157])[_0x7c78[279]](_0x7c78[1156]);if(dyinglight1load== null|| dyinglight1load== _0x7c78[4]){$(_0x7c78[1160])[_0x7c78[1159]](_0x7c78[1158])}else {if(dyinglight1load== _0x7c78[1161]){opendyinglight();$(_0x7c78[1160])[_0x7c78[1159]](_0x7c78[1162])}}}function opendyinglight(){var _0x1499x19f=document[_0x7c78[936]](_0x7c78[935]);_0x1499x19f[_0x7c78[926]]= _0x7c78[937];_0x1499x19f[_0x7c78[470]]= _0x7c78[1163];$(_0x7c78[280])[_0x7c78[279]](_0x1499x19f)}function bluebtns(){var _0x1499x1c8=$(_0x7c78[1164])[_0x7c78[59]]();$(_0x7c78[1166])[_0x7c78[665]](function(){$(_0x7c78[1166])[_0x7c78[73]](_0x7c78[397],_0x1499x1c8)})[_0x7c78[663]](function(){$(_0x7c78[1166])[_0x7c78[73]](_0x7c78[397],_0x7c78[1165])});$(_0x7c78[1167])[_0x7c78[665]](function(){$(_0x7c78[1167])[_0x7c78[73]](_0x7c78[397],_0x1499x1c8)})[_0x7c78[663]](function(){$(_0x7c78[1167])[_0x7c78[73]](_0x7c78[397],_0x7c78[1165])});$(_0x7c78[1168])[_0x7c78[665]](function(){$(_0x7c78[1168])[_0x7c78[73]](_0x7c78[397],_0x1499x1c8)})[_0x7c78[663]](function(){$(_0x7c78[1168])[_0x7c78[73]](_0x7c78[397],_0x7c78[1165])});$(_0x7c78[1122])[_0x7c78[665]](function(){$(_0x7c78[1122])[_0x7c78[73]](_0x7c78[397],_0x1499x1c8)})[_0x7c78[663]](function(){$(_0x7c78[1122])[_0x7c78[73]](_0x7c78[397],_0x7c78[1165])});$(_0x7c78[1123])[_0x7c78[665]](function(){$(_0x7c78[1123])[_0x7c78[73]](_0x7c78[397],_0x1499x1c8)})[_0x7c78[663]](function(){$(_0x7c78[1123])[_0x7c78[73]](_0x7c78[397],_0x7c78[1165])});$(_0x7c78[1124])[_0x7c78[665]](function(){$(_0x7c78[1124])[_0x7c78[73]](_0x7c78[397],_0x1499x1c8)})[_0x7c78[663]](function(){$(_0x7c78[1124])[_0x7c78[73]](_0x7c78[397],_0x7c78[1165])});$(_0x7c78[1125])[_0x7c78[665]](function(){$(_0x7c78[1125])[_0x7c78[73]](_0x7c78[397],_0x1499x1c8)})[_0x7c78[663]](function(){$(_0x7c78[1125])[_0x7c78[73]](_0x7c78[397],_0x7c78[1165])});$(_0x7c78[1169])[_0x7c78[665]](function(){$(_0x7c78[1169])[_0x7c78[73]](_0x7c78[397],_0x1499x1c8)})[_0x7c78[663]](function(){$(_0x7c78[1169])[_0x7c78[73]](_0x7c78[397],_0x7c78[1165])});$(_0x7c78[1170])[_0x7c78[665]](function(){$(_0x7c78[1170])[_0x7c78[73]](_0x7c78[397],_0x1499x1c8)})[_0x7c78[663]](function(){$(_0x7c78[1170])[_0x7c78[73]](_0x7c78[397],_0x7c78[1165])});$(_0x7c78[1171])[_0x7c78[665]](function(){$(_0x7c78[1171])[_0x7c78[73]](_0x7c78[397],_0x1499x1c8)})[_0x7c78[663]](function(){$(_0x7c78[1171])[_0x7c78[73]](_0x7c78[397],_0x7c78[1165])});$(_0x7c78[1172])[_0x7c78[665]](function(){$(_0x7c78[1172])[_0x7c78[73]](_0x7c78[397],_0x1499x1c8)})[_0x7c78[663]](function(){$(_0x7c78[1172])[_0x7c78[73]](_0x7c78[397],_0x7c78[1165])});$(_0x7c78[1173])[_0x7c78[665]](function(){$(_0x7c78[1173])[_0x7c78[73]](_0x7c78[397],_0x1499x1c8)})[_0x7c78[663]](function(){$(_0x7c78[1173])[_0x7c78[73]](_0x7c78[397],_0x7c78[1165])});$(_0x7c78[1174])[_0x7c78[665]](function(){$(_0x7c78[1174])[_0x7c78[73]](_0x7c78[397],_0x1499x1c8)})[_0x7c78[663]](function(){$(_0x7c78[1174])[_0x7c78[73]](_0x7c78[397],_0x7c78[1165])});$(_0x7c78[544])[_0x7c78[665]](function(){$(_0x7c78[544])[_0x7c78[73]](_0x7c78[397],_0x1499x1c8)})[_0x7c78[663]](function(){$(_0x7c78[544])[_0x7c78[73]](_0x7c78[397],_0x7c78[1165])});$(_0x7c78[1175])[_0x7c78[665]](function(){$(_0x7c78[1175])[_0x7c78[73]](_0x7c78[397],_0x1499x1c8)})[_0x7c78[663]](function(){$(_0x7c78[1175])[_0x7c78[73]](_0x7c78[397],_0x7c78[1165])});$(_0x7c78[1176])[_0x7c78[665]](function(){$(_0x7c78[1176])[_0x7c78[73]](_0x7c78[397],_0x1499x1c8)})[_0x7c78[663]](function(){$(_0x7c78[1176])[_0x7c78[73]](_0x7c78[397],_0x7c78[1165])});$(_0x7c78[1177])[_0x7c78[665]](function(){$(_0x7c78[1177])[_0x7c78[73]](_0x7c78[397],_0x1499x1c8)})[_0x7c78[663]](function(){$(_0x7c78[1177])[_0x7c78[73]](_0x7c78[397],_0x7c78[1165])});$(_0x7c78[1178])[_0x7c78[665]](function(){$(_0x7c78[1178])[_0x7c78[73]](_0x7c78[397],_0x1499x1c8)})[_0x7c78[663]](function(){$(_0x7c78[1178])[_0x7c78[73]](_0x7c78[397],_0x7c78[1165])});$(_0x7c78[1179])[_0x7c78[665]](function(){$(_0x7c78[1179])[_0x7c78[73]](_0x7c78[397],_0x1499x1c8)})[_0x7c78[663]](function(){$(_0x7c78[1179])[_0x7c78[73]](_0x7c78[397],_0x7c78[1165])});$(_0x7c78[1180])[_0x7c78[665]](function(){$(_0x7c78[1180])[_0x7c78[73]](_0x7c78[397],_0x1499x1c8)})[_0x7c78[663]](function(){$(_0x7c78[1180])[_0x7c78[73]](_0x7c78[397],_0x7c78[1165])});$(_0x7c78[1181])[_0x7c78[665]](function(){$(_0x7c78[1181])[_0x7c78[73]](_0x7c78[397],_0x1499x1c8)})[_0x7c78[663]](function(){$(_0x7c78[1181])[_0x7c78[73]](_0x7c78[397],_0x7c78[1165])});$(_0x7c78[1182])[_0x7c78[665]](function(){$(_0x7c78[1182])[_0x7c78[73]](_0x7c78[397],_0x1499x1c8)})[_0x7c78[663]](function(){$(_0x7c78[1182])[_0x7c78[73]](_0x7c78[397],_0x7c78[1165])});$(_0x7c78[987])[_0x7c78[665]](function(){$(_0x7c78[987])[_0x7c78[73]](_0x7c78[397],_0x1499x1c8)})[_0x7c78[663]](function(){$(_0x7c78[987])[_0x7c78[73]](_0x7c78[397],_0x7c78[1165])});$(_0x7c78[989])[_0x7c78[665]](function(){$(_0x7c78[989])[_0x7c78[73]](_0x7c78[397],_0x1499x1c8)})[_0x7c78[663]](function(){$(_0x7c78[989])[_0x7c78[73]](_0x7c78[397],_0x7c78[1165])});$(_0x7c78[991])[_0x7c78[665]](function(){$(_0x7c78[991])[_0x7c78[73]](_0x7c78[397],_0x1499x1c8)})[_0x7c78[663]](function(){$(_0x7c78[991])[_0x7c78[73]](_0x7c78[397],_0x7c78[1165])});$(_0x7c78[993])[_0x7c78[665]](function(){$(_0x7c78[993])[_0x7c78[73]](_0x7c78[397],_0x1499x1c8)})[_0x7c78[663]](function(){$(_0x7c78[993])[_0x7c78[73]](_0x7c78[397],_0x7c78[1165])});$(_0x7c78[995])[_0x7c78[665]](function(){$(_0x7c78[995])[_0x7c78[73]](_0x7c78[397],_0x1499x1c8)})[_0x7c78[663]](function(){$(_0x7c78[995])[_0x7c78[73]](_0x7c78[397],_0x7c78[1165])});$(_0x7c78[997])[_0x7c78[665]](function(){$(_0x7c78[997])[_0x7c78[73]](_0x7c78[397],_0x1499x1c8)})[_0x7c78[663]](function(){$(_0x7c78[997])[_0x7c78[73]](_0x7c78[397],_0x7c78[1165])});$(_0x7c78[1001])[_0x7c78[665]](function(){$(_0x7c78[1001])[_0x7c78[73]](_0x7c78[397],_0x1499x1c8)})[_0x7c78[663]](function(){$(_0x7c78[1001])[_0x7c78[73]](_0x7c78[397],_0x7c78[1165])});$(_0x7c78[1003])[_0x7c78[665]](function(){$(_0x7c78[1003])[_0x7c78[73]](_0x7c78[397],_0x1499x1c8)})[_0x7c78[663]](function(){$(_0x7c78[1003])[_0x7c78[73]](_0x7c78[397],_0x7c78[1165])});$(_0x7c78[1005])[_0x7c78[665]](function(){$(_0x7c78[1005])[_0x7c78[73]](_0x7c78[397],_0x1499x1c8)})[_0x7c78[663]](function(){$(_0x7c78[1005])[_0x7c78[73]](_0x7c78[397],_0x7c78[1165])});$(_0x7c78[1007])[_0x7c78[665]](function(){$(_0x7c78[1007])[_0x7c78[73]](_0x7c78[397],_0x1499x1c8)})[_0x7c78[663]](function(){$(_0x7c78[1007])[_0x7c78[73]](_0x7c78[397],_0x7c78[1165])});$(_0x7c78[1009])[_0x7c78[665]](function(){$(_0x7c78[1009])[_0x7c78[73]](_0x7c78[397],_0x1499x1c8)})[_0x7c78[663]](function(){$(_0x7c78[1009])[_0x7c78[73]](_0x7c78[397],_0x7c78[1165])});$(_0x7c78[1011])[_0x7c78[665]](function(){$(_0x7c78[1011])[_0x7c78[73]](_0x7c78[397],_0x1499x1c8)})[_0x7c78[663]](function(){$(_0x7c78[1011])[_0x7c78[73]](_0x7c78[397],_0x7c78[1165])});$(_0x7c78[1183])[_0x7c78[665]](function(){$(_0x7c78[1183])[_0x7c78[73]](_0x7c78[397],_0x1499x1c8)})[_0x7c78[663]](function(){$(_0x7c78[1183])[_0x7c78[73]](_0x7c78[397],_0x7c78[1165])})}function YoutubebackgroundEnable(){inject(_0x7c78[1047],_0x7c78[1184]+ _0x7c78[1185]+ _0x7c78[1186]+ _0x7c78[1187]+ _0x7c78[1188]+ _0x7c78[1189]+ _0x7c78[1190]);$(_0x7c78[280])[_0x7c78[279]](_0x7c78[1191]+ getParameterByName(_0x7c78[160],$(_0x7c78[469])[_0x7c78[59]]())+ _0x7c78[1192]+ getParameterByName(_0x7c78[161],$(_0x7c78[469])[_0x7c78[59]]())+ _0x7c78[1193])}function YoutubebackgroundDisable(){$(_0x7c78[1194])[_0x7c78[176]]()}function settrolling(){playSound(_0x7c78[1195]);$(_0x7c78[1091])[_0x7c78[73]](_0x7c78[518],_0x7c78[1196])[_0x7c78[73]]({opacity:0.8});$(_0x7c78[1088])[_0x7c78[73]](_0x7c78[518],_0x7c78[1197])[_0x7c78[73]]({opacity:1});$(_0x7c78[1090])[_0x7c78[73]](_0x7c78[518],_0x7c78[1198])[_0x7c78[73]]({opacity:0.8});setTimeout(function(){$(_0x7c78[1091])[_0x7c78[73]](_0x7c78[518],_0x7c78[1199])[_0x7c78[73]]({opacity:0.8})},4000);setTimeout(function(){$(_0x7c78[1091])[_0x7c78[73]](_0x7c78[518],_0x7c78[521])[_0x7c78[73]]({opacity:1});$(_0x7c78[1090])[_0x7c78[73]](_0x7c78[518],_0x7c78[1086]+ leadbimg+ _0x7c78[1087])[_0x7c78[73]]({opacity:0.8})},8000);setTimeout(function(){$(_0x7c78[1088])[_0x7c78[73]](_0x7c78[518],_0x7c78[1086]+ minimapbckimg+ _0x7c78[1087])[_0x7c78[73]]({opacity:0.8})},27000)}function preventcanvasimagecrash(){CanvasRenderingContext2D[_0x7c78[125]][_0x7c78[1200]]= CanvasRenderingContext2D[_0x7c78[125]][_0x7c78[1201]];CanvasRenderingContext2D[_0x7c78[125]][_0x7c78[1201]]= function(){const _0x1499x1cd=arguments[0];if(!_0x1499x1cd|| _0x1499x1cd[_0x7c78[71]]< 1 || _0x1499x1cd[_0x7c78[715]]< 1){return void(console[_0x7c78[283]](_0x7c78[1202]))};this._drawImage(...arguments)}}function joint(_0x1499x8e){var _0x1499x91;return _0x1499x91= _0x1499x8e[_0x1499x8e[_0x7c78[140]]- 1],_0x1499x8e[_0x7c78[475]](),_0x1499x8e= _0x1499x8e[_0x7c78[140]]> 1?joint(_0x1499x8e):_0x1499x8e[0],function(){_0x1499x91[_0x7c78[129]]( new _0x1499x8e)}}function emphasischat(){var _0x1499x114=window;var _0x1499x115={"\x6E\x61\x6D\x65":_0x7c78[1203],"\x6C\x6F\x67":function(_0x1499x116){console[_0x7c78[283]](this[_0x7c78[601]]+ _0x7c78[239]+ _0x1499x116)}};var _0x1499x117={};var _0x1499x118={},_0x1499x119={"\x65\x6D\x70\x68\x61\x73\x69\x73\x5F\x62\x67\x63\x6F\x6C\x6F\x72":_0x7c78[1204],"\x65\x6D\x70\x68\x61\x73\x69\x73\x5F\x74\x69\x6D\x65":5000,"\x68\x69\x73\x74\x68\x69\x64\x65\x5F\x74\x69\x6D\x65":10000,"\x73\x63\x72\x6F\x6C\x6C\x5F\x64\x75\x6C\x61\x74\x69\x6F\x6E":200};function _0x1499x11a(){if(!document[_0x7c78[407]](_0x7c78[622])){_0x1499x115[_0x7c78[623]]= (_0x1499x115[_0x7c78[623]]|| 1000)+ 1000;setTimeout(_0x1499x11a,_0x1499x115[_0x7c78[623]]);_0x1499x115[_0x7c78[283]](_0x7c78[1205]);return};setTimeout(_0x1499x11b,1000)}_0x1499x11a();function _0x1499x11b(){_0x1499x118= _0x1499x119;_0x1499x114[_0x1499x115[_0x7c78[601]]]= {my:_0x1499x115,stat:_0x1499x117,cfg:_0x1499x118};_0x1499x117[_0x7c78[1206]]= new MutationObserver((_0x1499x1d0)=>{_0x1499x1d0[_0x7c78[832]]((_0x1499x1d1)=>{_0x1499x115[_0x7c78[1208]](_0x1499x1d1[_0x7c78[1207]])})});_0x1499x117[_0x7c78[1206]][_0x7c78[1210]]($(_0x7c78[597])[_0x7c78[1209]](0),{"\x63\x68\x69\x6C\x64\x4C\x69\x73\x74":true});_0x1499x117[_0x7c78[1211]]= new MutationObserver((_0x1499x1d0)=>{_0x1499x1d0[_0x7c78[832]]((_0x1499x1d1)=>{if(_0x1499x1d1[_0x7c78[1212]]!== _0x7c78[1045]){return};var _0x1499x1d2=_0x1499x1d1[_0x7c78[1213]][_0x7c78[1045]][_0x7c78[523]];if(_0x1499x1d2=== _0x7c78[732]){_0x1499x115[_0x7c78[1214]]()}else {if(_0x1499x1d2=== _0x7c78[525]){_0x1499x115[_0x7c78[1215]]()}}})});_0x1499x117[_0x7c78[1211]][_0x7c78[1210]]($(_0x7c78[524])[_0x7c78[1209]](0),{"\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73":true})}_0x1499x115[_0x7c78[1208]]= function(_0x1499x1d3){_0x1499x115[_0x7c78[1216]](true);_0x1499x1d3[_0x7c78[832]]((_0x1499x1d4)=>{var _0x1499x1d5=$(_0x1499x1d4);if(_0x1499x1d5[_0x7c78[721]](_0x7c78[835])){var _0x1499x1d6=_0x1499x1d5[_0x7c78[73]](_0x7c78[397]);_0x1499x1d5[_0x7c78[73]](_0x7c78[397],_0x1499x118[_0x7c78[1217]]);setTimeout(function(){_0x1499x1d5[_0x7c78[73]](_0x7c78[397],_0x1499x1d6)},_0x1499x118[_0x7c78[1218]])}});var _0x1499x1d7=$(_0x7c78[597]);_0x1499x1d7[_0x7c78[863]](_0x7c78[706]);_0x1499x1d7[_0x7c78[865]]({"\x73\x63\x72\x6F\x6C\x6C\x54\x6F\x70":_0x1499x1d7[_0x7c78[257]](_0x7c78[864])},_0x1499x118[_0x7c78[1219]])};_0x1499x115[_0x7c78[1216]]= function(_0x1499x1d8){if(_0x1499x117[_0x7c78[1220]]){clearTimeout(_0x1499x117[_0x7c78[1220]]);_0x1499x117[_0x7c78[1220]]= null};var _0x1499x1d2=$(_0x7c78[597])[_0x7c78[73]](_0x7c78[523]);if(_0x1499x1d2=== _0x7c78[525]){_0x1499x117[_0x7c78[1221]]= true};if(_0x1499x117[_0x7c78[1221]]&& _0x1499x1d8){_0x1499x117[_0x7c78[1220]]= setTimeout(function(){_0x1499x117[_0x7c78[1221]]= false},_0x1499x118[_0x7c78[1222]])}};_0x1499x115[_0x7c78[1214]]= function(){_0x1499x115[_0x7c78[1216]](false)};_0x1499x115[_0x7c78[1215]]= function(){}}function IdfromLegendmod(){if(document[_0x7c78[56]][_0x7c78[55]](_0x7c78[54])&& $(_0x7c78[1223])[_0x7c78[59]]()!= _0x7c78[6]){window[_0x7c78[112]]= $(_0x7c78[1223])[_0x7c78[59]]();localStorage[_0x7c78[117]](_0x7c78[112],window[_0x7c78[112]])}}function SNEZOgarUpload(){IdfromLegendmod();if(userid== _0x7c78[6]|| userid== null){toastr[_0x7c78[184]](_0x7c78[199]+ Premadeletter123+ _0x7c78[200]+ Premadeletter128)}else {postSNEZ(_0x7c78[1224],userid,_0x7c78[1225],escape($(_0x7c78[394])[_0x7c78[59]]()));toastr[_0x7c78[184]](_0x7c78[199]+ Premadeletter123+ _0x7c78[200]+ Premadeletter129+ _0x7c78[905]+ Languageletter363+ _0x7c78[1226]+ userid+ _0x7c78[1227])}}function SNEZOgarDownload(){IdfromLegendmod();if(userid== _0x7c78[6]|| userid== null){toastr[_0x7c78[184]](_0x7c78[199]+ Premadeletter123+ _0x7c78[200]+ Premadeletter128)}else {getSNEZ(_0x7c78[1224],userid,_0x7c78[1225]);var _0x1499x1dc=xhttp[_0x7c78[1228]];$(_0x7c78[403])[_0x7c78[59]](unescape(_0x1499x1dc));$(_0x7c78[413])[_0x7c78[208]]()}}function SNEZServers(){var _0x1499x1de=function(_0x1499x8d,_0x1499x1df){var _0x1499x1e0=setInterval(function(){var _0x1499x1e1=[_0x7c78[372],_0x7c78[1229],_0x7c78[1230],_0x7c78[1231]];var _0x1499x1e2=true;_0x1499x1e1[_0x7c78[832]](function(_0x1499x1e3){if(!document[_0x7c78[407]](_0x1499x1e3)){_0x1499x1e2= false}});if(_0x1499x1e2){clearInterval(_0x1499x1e0);_0x1499x8d(_0x1499x1df)}},100)};window[_0x7c78[109]]= localStorage[_0x7c78[3]](_0x7c78[109]);window[_0x7c78[110]]= localStorage[_0x7c78[3]](_0x7c78[110]);var _0x1499x1e4={nickname:null,server:null,tag:null,AID:null,hidecountry:false,userfirstname:null,userlastname:null,agarioUID:null};var _0x1499x1e1={nickname:_0x7c78[372],server:_0x7c78[1229],tag:_0x7c78[1230],reconnectButton:_0x7c78[1231]};var _0x1499x1e5={server:_0x7c78[1232],client:null,connect:function(){_0x1499x1e5[_0x7c78[1233]]= new WebSocket(_0x1499x1e5[_0x7c78[1234]]);_0x1499x1e5[_0x7c78[1233]][_0x7c78[1235]]= _0x1499x1e5[_0x7c78[1236]];_0x1499x1e5[_0x7c78[1233]][_0x7c78[1237]]= _0x1499x1e5[_0x7c78[1238]];_0x1499x1e5[_0x7c78[1233]][_0x7c78[1239]]= _0x1499x1e5[_0x7c78[1240]]},reconnect:function(){console[_0x7c78[283]](_0x7c78[1241]);setTimeout(function(){_0x1499x1e5[_0x7c78[704]]()},5000)},updateServerDetails:function(){_0x1499x1e5[_0x7c78[123]]({id:_0x1499x1eb(),type:_0x7c78[1242],data:_0x1499x1e4})},updateDetails:function(){var _0x1499xe6=document[_0x7c78[407]](_0x1499x1e1[_0x7c78[1243]]);var _0x1499x1e6;if(realmode!= null&& region!= null){_0x1499x1e6= _0x7c78[212]+ $(_0x7c78[213])[_0x7c78[59]]()+ _0x7c78[214]+ _0x7c78[218]+ $(_0x7c78[60])[_0x7c78[59]]()+ _0x7c78[219]+ realmode}else {_0x1499x1e6= _0x7c78[212]+ $(_0x7c78[213])[_0x7c78[59]]()+ _0x7c78[214]};var _0x1499x1e7=document[_0x7c78[407]](_0x1499x1e1[_0x7c78[489]]);if(_0x1499x1e4[_0x7c78[1243]]!= _0x1499xe6[_0x7c78[405]]|| _0x1499x1e4[_0x7c78[1234]]!= _0x1499x1e6|| _0x1499x1e4[_0x7c78[489]]!= _0x1499x1e7[_0x7c78[405]]){_0x1499x1e4[_0x7c78[1243]]= _0x1499xe6[_0x7c78[405]];_0x1499x1e4[_0x7c78[1234]]= _0x1499x1e6;_0x1499x1e4[_0x7c78[489]]= _0x1499x1e7[_0x7c78[405]];_0x1499x1e4[_0x7c78[1244]]= window[_0x7c78[1245]];_0x1499x1e4[_0x7c78[1246]]= defaultmapsettings[_0x7c78[1246]];_0x1499x1e4[_0x7c78[109]]= window[_0x7c78[109]];_0x1499x1e4[_0x7c78[110]]= window[_0x7c78[110]];_0x1499x1e4[_0x7c78[186]]= window[_0x7c78[186]];_0x1499x1e4[_0x7c78[1247]]= window[_0x7c78[1247]];_0x1499x1e5[_0x7c78[1236]]()}},send:function(_0x1499x116){if(_0x1499x1e5[_0x7c78[1233]][_0x7c78[1248]]!== _0x1499x1e5[_0x7c78[1233]][_0x7c78[1249]]){return};_0x1499x1e5[_0x7c78[1233]][_0x7c78[123]](JSON[_0x7c78[415]](_0x1499x116))},onMessage:function(_0x1499x158){try{var _0x1499x87=JSON[_0x7c78[107]](_0x1499x158[_0x7c78[1250]]);switch(_0x1499x87[_0x7c78[926]]){case _0x7c78[1252]:_0x1499x1e5[_0x7c78[123]]({type:_0x7c78[1251]});break}}catch(e){console[_0x7c78[283]](e)}}};var _0x1499x1e8=function(){var _0x1499xe6=document[_0x7c78[407]](_0x1499x1e1[_0x7c78[1243]]);var _0x1499x84=document[_0x7c78[407]](_0x1499x1e1[_0x7c78[1234]]);var _0x1499x1e7=document[_0x7c78[407]](_0x1499x1e1[_0x7c78[489]]);var _0x1499x1e9=document[_0x7c78[407]](_0x1499x1e1[_0x7c78[1253]]);if(!_0x1499xe6){console[_0x7c78[283]](_0x7c78[1254]);return};_0x1499xe6[_0x7c78[1072]](_0x7c78[57],_0x1499x1e5[_0x7c78[1255]]);_0x1499x84[_0x7c78[1072]](_0x7c78[57],_0x1499x1e5[_0x7c78[1255]]);_0x1499x1e7[_0x7c78[1072]](_0x7c78[57],_0x1499x1e5[_0x7c78[1255]]);var _0x1499x1ea=null;_0x1499x1e9[_0x7c78[1072]](_0x7c78[208],function(_0x1499x12d){clearTimeout(_0x1499x1ea);_0x1499x1ea= setTimeout(_0x1499x1e5[_0x7c78[1255]],5000)});_0x1499x1e5[_0x7c78[704]]();setInterval(_0x1499x1e5[_0x7c78[1255]],5000)};function _0x1499x1eb(){return _0x1499x1ec(_0x7c78[1256])}function _0x1499x1ec(_0x1499x1ed){var _0x1499x8b=_0x1499x1ed+ _0x7c78[805];var _0x1499x1ee=decodeURIComponent(document[_0x7c78[233]]);var _0x1499x1ef=_0x1499x1ee[_0x7c78[190]](_0x7c78[1257]);for(var _0x1499xd8=0;_0x1499xd8< _0x1499x1ef[_0x7c78[140]];_0x1499xd8++){var _0x1499x8f=_0x1499x1ef[_0x1499xd8];while(_0x1499x8f[_0x7c78[1258]](0)== _0x7c78[481]){_0x1499x8f= _0x1499x8f[_0x7c78[956]](1)};if(_0x1499x8f[_0x7c78[179]](_0x1499x8b)== 0){return _0x1499x8f[_0x7c78[956]](_0x1499x8b[_0x7c78[140]],_0x1499x8f[_0x7c78[140]])}};return _0x7c78[6]}_0x1499x1de(_0x1499x1e8,null)}function getSNEZServers(_0x1499x1f1){client2= {server:_0x7c78[1232],ws:null,isOpen:false,onOpenCallback:null,onCloseCallback:null,onMessageCallback:null,connect:function(){client2[_0x7c78[701]]= new WebSocket(client2[_0x7c78[1234]]);client2[_0x7c78[701]][_0x7c78[1235]]= client2[_0x7c78[1259]];client2[_0x7c78[701]][_0x7c78[1237]]= client2[_0x7c78[1260]];client2[_0x7c78[701]][_0x7c78[1239]]= client2[_0x7c78[1240]]},disconnect:function(){client2[_0x7c78[701]][_0x7c78[1261]]()},onOpen:function(){},onClose:function(){},onMessage:function(_0x1499x1f2){if(client2[_0x7c78[1262]](_0x1499x1f2)){return};try{var _0x1499x87=JSON[_0x7c78[107]](_0x1499x1f2[_0x7c78[1250]]);if(client2[_0x7c78[1262]](_0x1499x87)|| client2[_0x7c78[1262]](_0x1499x87[_0x7c78[926]])){return}}catch(e){console[_0x7c78[283]](e);return};switch(_0x1499x87[_0x7c78[926]]){case _0x7c78[1252]:client2[_0x7c78[123]]({type:_0x7c78[1251]});break;case _0x7c78[1264]:client2[_0x7c78[1263]](_0x1499x87[_0x7c78[1250]]);break}},isEmpty:function(_0x1499x1f3){if( typeof _0x1499x1f3== _0x7c78[938]){return true};if(_0x1499x1f3[_0x7c78[140]]=== 0){return true};for(var _0x1499x12c in _0x1499x1f3){if(_0x1499x1f3[_0x7c78[932]](_0x1499x12c)){return false}};return true},updatePlayers:function(_0x1499x87){var _0x1499x1f4=0;var _0x1499x1f5=0;showonceusers3= 0;var _0x1499x1f6=0;_0x1499x87= JSON[_0x7c78[107]](_0x1499x87);for(var _0x1499x1f7=0;_0x1499x1f7< _0x1499x87[_0x7c78[140]];_0x1499x1f7++){if(_0x1499x87[_0x1499x1f7][_0x7c78[1243]]){if(_0x1499x87[_0x1499x1f7][_0x7c78[1243]][_0x7c78[179]]($(_0x7c78[969])[_0x7c78[59]]())>= 0){if(_0x1499x1f4== 0){_0x1499x1f4++;if(_0x1499x1f1== null){toastr[_0x7c78[157]](_0x7c78[1265])}};var _0x1499x1f8=JSON[_0x7c78[415]](_0x1499x87[_0x1499x1f7]);var _0x1499x1f9;var _0x1499x1fa;var _0x1499x1fb=getParameterByName(_0x7c78[89],_0x1499x1f8);var _0x1499x1fc=getParameterByName(_0x7c78[90],_0x1499x1f8);_0x1499x1f8= _0x1499x1f8[_0x7c78[956]](0,_0x1499x1f8[_0x7c78[179]](_0x7c78[214]));_0x1499x1f9= _0x1499x1f8[_0x7c78[190]](_0x7c78[212])[_0x7c78[475]]();_0x1499x1fa= _0x1499x1f8[_0x7c78[190]](_0x7c78[1266])[_0x7c78[475]]();_0x1499x1fa= _0x1499x1fa[_0x7c78[956]](_0x1499x1fa,_0x1499x1fa[_0x7c78[179]](_0x7c78[1267]));if(_0x1499x87[_0x1499x1f7][_0x7c78[1246]]== true&& _0x1499x87[_0x1499x1f7][_0x7c78[1268]]){_0x1499x87[_0x1499x1f7][_0x7c78[1268]][_0x7c78[1270]][_0x7c78[1269]]= _0x7c78[1271]};if(_0x1499x1fc&& _0x1499x87[_0x1499x1f7][_0x7c78[1268]]&& _0x1499x87[_0x1499x1f7][_0x7c78[1268]][_0x7c78[1270]]){_0x1499x1fc= _0x1499x1fc[_0x7c78[190]](_0x7c78[1274])[0][_0x7c78[190]](_0x7c78[1273])[0][_0x7c78[190]](_0x7c78[1272])[0];appendLog3(_0x7c78[1275]+ _0x1499x1fb+ _0x7c78[1276]+ _0x1499x1fc+ _0x7c78[1277]+ _0x1499x1fa[_0x7c78[158]]()+ _0x7c78[1278]+ _0x1499x87[_0x1499x1f7][_0x7c78[1268]][_0x7c78[1270]][_0x7c78[1269]][_0x7c78[804]]()+ _0x7c78[1279]+ _0x7c78[1280]+ _0x1499x1f9+ _0x7c78[1281],_0x1499x1f9,_0x1499x1fb,_0x1499x1fc)}else {if(_0x1499x87[_0x1499x1f7][_0x7c78[1268]]&& _0x1499x87[_0x1499x1f7][_0x7c78[1268]][_0x7c78[1270]]){appendLog2(_0x7c78[1282]+ _0x1499x1fa[_0x7c78[158]]()+ _0x7c78[1278]+ _0x1499x87[_0x1499x1f7][_0x7c78[1268]][_0x7c78[1270]][_0x7c78[1269]][_0x7c78[804]]()+ _0x7c78[1279]+ _0x7c78[1280]+ _0x1499x1f9+ _0x7c78[1281],_0x1499x1f9)}};showonceusers3++;showonceusers3returner(showonceusers3)}else {if(_0x1499x87[_0x1499x1f7][_0x7c78[1234]][_0x7c78[179]]($(_0x7c78[969])[_0x7c78[59]]())>= 0){if($(_0x7c78[969])[_0x7c78[59]]()[_0x7c78[140]]>= 4){if(_0x1499x1f5== 0){_0x1499x1f5++;if(_0x1499x1f1== null){toastr[_0x7c78[157]](_0x7c78[1283])}};var _0x1499x1f8=JSON[_0x7c78[415]](_0x1499x87[_0x1499x1f7]);var _0x1499x1f9;var _0x1499x1fa;var _0x1499x1fb=getParameterByName(_0x7c78[89],_0x1499x1f8);var _0x1499x1fc=getParameterByName(_0x7c78[90],_0x1499x1f8);_0x1499x1f8= _0x1499x1f8[_0x7c78[956]](0,_0x1499x1f8[_0x7c78[179]](_0x7c78[214]));_0x1499x1f9= _0x1499x1f8[_0x7c78[190]](_0x7c78[212])[_0x7c78[475]]();_0x1499x1fa= _0x1499x1f8[_0x7c78[190]](_0x7c78[1266])[_0x7c78[475]]();_0x1499x1fa= _0x1499x1fa[_0x7c78[956]](_0x1499x1fa,_0x1499x1fa[_0x7c78[179]](_0x7c78[1267]));if(_0x1499x87[_0x1499x1f7][_0x7c78[1246]]== true){_0x1499x87[_0x1499x1f7][_0x7c78[1268]][_0x7c78[1270]][_0x7c78[1269]]= _0x7c78[1271]};if(_0x1499x1fc&& _0x1499x87[_0x1499x1f7][_0x7c78[1268]]&& _0x1499x87[_0x1499x1f7][_0x7c78[1268]][_0x7c78[1270]]){_0x1499x1fc= _0x1499x1fc[_0x7c78[190]](_0x7c78[1274])[0][_0x7c78[190]](_0x7c78[1273])[0][_0x7c78[190]](_0x7c78[1272])[0];appendLog3(_0x7c78[1275]+ _0x1499x1fb+ _0x7c78[1276]+ _0x1499x1fc+ _0x7c78[1284]+ _0x1499x1fa[_0x7c78[158]]()+ _0x7c78[1285]+ _0x1499x87[_0x1499x1f7][_0x7c78[1268]][_0x7c78[1270]][_0x7c78[1269]][_0x7c78[804]]()+ _0x7c78[1286]+ _0x1499x1f9+ _0x7c78[1287],_0x1499x1f9,_0x1499x1fb,_0x1499x1fc)}else {if(_0x1499x87[_0x1499x1f7][_0x7c78[1268]]&& _0x1499x87[_0x1499x1f7][_0x7c78[1268]][_0x7c78[1270]]){appendLog2(_0x7c78[1288]+ _0x1499x1fa[_0x7c78[158]]()+ _0x7c78[1285]+ _0x1499x87[_0x1499x1f7][_0x7c78[1268]][_0x7c78[1270]][_0x7c78[1269]][_0x7c78[804]]()+ _0x7c78[1286]+ _0x1499x1f9+ _0x7c78[1287],_0x1499x1f9)}};showonceusers3++;showonceusers3returner(showonceusers3)}}}}};client2[_0x7c78[701]][_0x7c78[1261]]();if(showonceusers3== 0){_0x1499x1f6++;if(_0x1499x1f6== 1){if(_0x1499x1f1== null){toastr[_0x7c78[184]](_0x7c78[1289]+ $(_0x7c78[60])[_0x7c78[59]]()+ _0x7c78[1290]+ $(_0x7c78[69])[_0x7c78[59]]()+ _0x7c78[1291]+ _0x7c78[1292]+ Premadeletter24+ _0x7c78[1293]+ Premadeletter25+ _0x7c78[172],_0x7c78[6],{timeOut:20000,extendedTimeOut:20000})[_0x7c78[73]](_0x7c78[71],_0x7c78[182])};$(_0x7c78[1294])[_0x7c78[208]](function(){$(_0x7c78[248])[_0x7c78[247]](_0x7c78[244])[_0x7c78[245]](_0x7c78[246]);var _0x1499xc8=$(_0x7c78[969])[_0x7c78[59]]();searchHandler(_0x1499xc8)})}};return client2},send:function(_0x1499x87){client2[_0x7c78[701]][_0x7c78[123]](JSON[_0x7c78[415]](_0x1499x87))}}}function showonceusers3returner(showonceusers3){return showonceusers3}function init(modVersion){if(!document[_0x7c78[407]](_0x7c78[1295])){setTimeout(init(modVersion),200);console[_0x7c78[283]](_0x7c78[1296]);return};return startLM(modVersion)}function initializeLM(modVersion){PremiumUsersFFAScore();$(_0x7c78[1302])[_0x7c78[281]](_0x7c78[1301])[_0x7c78[206]](_0x7c78[1299],_0x7c78[1300])[_0x7c78[257]](_0x7c78[1297],_0x7c78[1298]);$(_0x7c78[1305])[_0x7c78[281]](_0x7c78[1304])[_0x7c78[206]](_0x7c78[1299],_0x7c78[1300])[_0x7c78[257]](_0x7c78[1297],_0x7c78[1303]);$(_0x7c78[1308])[_0x7c78[247]](_0x7c78[1307])[_0x7c78[245]](_0x7c78[1306]);$(_0x7c78[1310])[_0x7c78[281]](_0x7c78[1309]);$(_0x7c78[1310])[_0x7c78[206]](_0x7c78[1299],_0x7c78[1300])[_0x7c78[257]](_0x7c78[1297],_0x7c78[1311]);$(_0x7c78[243])[_0x7c78[281]](_0x7c78[1314])[_0x7c78[206]](_0x7c78[1299],_0x7c78[1300])[_0x7c78[257]](_0x7c78[1297],_0x7c78[1313])[_0x7c78[206]](_0x7c78[1045],_0x7c78[1312]);$(_0x7c78[280])[_0x7c78[713]](_0x7c78[1315]);$(_0x7c78[1323])[_0x7c78[713]](_0x7c78[1316]+ _0x7c78[1317]+ _0x7c78[1318]+ _0x7c78[1319]+ _0x7c78[1320]+ _0x7c78[1321]+ _0x7c78[1322]+ _0x7c78[326]);$(_0x7c78[1324])[_0x7c78[61]]();$(_0x7c78[493])[_0x7c78[206]](_0x7c78[1325],_0x7c78[1326]);$(_0x7c78[1329])[_0x7c78[1328]]()[_0x7c78[1300]]({title:_0x7c78[1327],placement:_0x7c78[677]});$(_0x7c78[1343])[_0x7c78[1328]]()[_0x7c78[128]](_0x7c78[1330]+ textLanguage[_0x7c78[1331]]+ _0x7c78[1332]+ _0x7c78[1333]+ _0x7c78[1334]+ _0x7c78[1335]+ _0x7c78[1336]+ _0x7c78[1337]+ _0x7c78[1338]+ _0x7c78[1339]+ _0x7c78[1340]+ _0x7c78[1341]+ _0x7c78[1342]);$(_0x7c78[1345])[_0x7c78[1328]]()[_0x7c78[1300]]({title:_0x7c78[1344],placement:_0x7c78[677]});$(_0x7c78[1348])[_0x7c78[1328]]()[_0x7c78[1328]]()[_0x7c78[1300]]({title:_0x7c78[1346],placement:_0x7c78[1347]});$(_0x7c78[951])[_0x7c78[128]](_0x7c78[1349]+ _0x7c78[1350]+ _0x7c78[1351]+ _0x7c78[1352]+ _0x7c78[1353]+ _0x7c78[1354]+ _0x7c78[1355]+ _0x7c78[1356]+ _0x7c78[652]);$(_0x7c78[950])[_0x7c78[279]](_0x7c78[1357]);$(_0x7c78[1088])[_0x7c78[713]](_0x7c78[1358]+ _0x7c78[1359]+ _0x7c78[1360]+ _0x7c78[1361]+ _0x7c78[1362]);$(_0x7c78[1364])[_0x7c78[130]](_0x7c78[1363]);$(_0x7c78[84])[_0x7c78[64]]()[_0x7c78[206]](_0x7c78[1045],_0x7c78[1365]);$(_0x7c78[1450])[_0x7c78[130]](_0x7c78[1366]+ _0x7c78[1367]+ Premadeletter42+ _0x7c78[172]+ _0x7c78[1368]+ Premadeletter44+ _0x7c78[172]+ _0x7c78[1369]+ Premadeletter45a+ _0x7c78[172]+ _0x7c78[1370]+ Premadeletter46+ _0x7c78[172]+ _0x7c78[1371]+ Premadeletter49+ _0x7c78[172]+ _0x7c78[1372]+ Premadeletter50+ _0x7c78[172]+ _0x7c78[1373]+ _0x7c78[1374]+ _0x7c78[1375]+ _0x7c78[1376]+ _0x7c78[1377]+ _0x7c78[1378]+ _0x7c78[1379]+ _0x7c78[1380]+ _0x7c78[1381]+ _0x7c78[1382]+ _0x7c78[1383]+ _0x7c78[1384]+ _0x7c78[1385]+ _0x7c78[1386]+ _0x7c78[1387]+ _0x7c78[1388]+ _0x7c78[1389]+ _0x7c78[1390]+ _0x7c78[1391]+ _0x7c78[1392]+ _0x7c78[652]+ _0x7c78[1393]+ _0x7c78[1394]+ _0x7c78[1395]+ _0x7c78[1396]+ _0x7c78[1397]+ _0x7c78[1398]+ _0x7c78[1399]+ _0x7c78[1400]+ _0x7c78[1401]+ _0x7c78[1402]+ _0x7c78[1403]+ _0x7c78[1404]+ _0x7c78[1405]+ _0x7c78[1406]+ _0x7c78[1383]+ _0x7c78[1407]+ _0x7c78[1408]+ _0x7c78[1409]+ _0x7c78[1410]+ _0x7c78[1411]+ _0x7c78[1412]+ _0x7c78[1413]+ _0x7c78[1414]+ _0x7c78[1415]+ _0x7c78[1416]+ _0x7c78[1417]+ _0x7c78[1418]+ _0x7c78[1419]+ _0x7c78[1420]+ _0x7c78[1421]+ _0x7c78[1422]+ _0x7c78[1423]+ _0x7c78[1424]+ _0x7c78[1425]+ _0x7c78[1426]+ _0x7c78[1427]+ _0x7c78[1428]+ _0x7c78[1429]+ _0x7c78[1430]+ _0x7c78[326]+ _0x7c78[1431]+ _0x7c78[1432]+ _0x7c78[1433]+ _0x7c78[1434]+ _0x7c78[1435]+ _0x7c78[1436]+ _0x7c78[1437]+ _0x7c78[1438]+ _0x7c78[1439]+ _0x7c78[1440]+ _0x7c78[1441]+ _0x7c78[1442]+ _0x7c78[1443]+ _0x7c78[1444]+ _0x7c78[1445]+ _0x7c78[1446]+ _0x7c78[1447]+ _0x7c78[1448]+ _0x7c78[1449]+ _0x7c78[326]);$(_0x7c78[1453])[_0x7c78[73]](_0x7c78[1451],_0x7c78[1452]);$(_0x7c78[1456])[_0x7c78[73]](_0x7c78[1454],_0x7c78[1455]);changeFrameWorkStart();$(_0x7c78[969])[_0x7c78[1462]](_0x7c78[1457],function(_0x1499x12d){if(!searching){var _0x1499x200=_0x1499x12d[_0x7c78[1460]][_0x7c78[1459]][_0x7c78[1458]](_0x7c78[76]);$(_0x7c78[969])[_0x7c78[59]](_0x1499x200);$(_0x7c78[969])[_0x7c78[284]]();$(_0x7c78[1461])[_0x7c78[208]]()}});$(_0x7c78[1463])[_0x7c78[59]](localStorage[_0x7c78[3]](_0x7c78[421]));$(_0x7c78[1464])[_0x7c78[59]](localStorage[_0x7c78[3]](_0x7c78[422]));$(_0x7c78[1465])[_0x7c78[59]](localStorage[_0x7c78[3]](_0x7c78[423]));$(_0x7c78[1466])[_0x7c78[59]](localStorage[_0x7c78[3]](_0x7c78[424]));$(_0x7c78[1467])[_0x7c78[59]](localStorage[_0x7c78[3]](_0x7c78[425]));$(_0x7c78[1468])[_0x7c78[59]](localStorage[_0x7c78[3]](_0x7c78[426]));$(_0x7c78[1469])[_0x7c78[59]](localStorage[_0x7c78[3]](_0x7c78[427]));$(_0x7c78[1470])[_0x7c78[734]](function(_0x1499x11d){localStorage[_0x7c78[117]](_0x1499x11d[_0x7c78[1213]][_0x7c78[144]],$(_0x1499x11d[_0x7c78[1213]])[_0x7c78[59]]())});var _0x1499x201=(localStorage[_0x7c78[3]](_0x7c78[420])== null?defaultMusicUrl:localStorage[_0x7c78[3]](_0x7c78[420]));$(_0x7c78[80])[_0x7c78[130]](_0x7c78[1471]+ _0x7c78[1472]+ getEmbedUrl(_0x1499x201)+ _0x7c78[1473]+ _0x7c78[1474]+ _0x1499x201+ _0x7c78[1475]);$(_0x7c78[80])[_0x7c78[61]]();$(_0x7c78[81])[_0x7c78[61]]();ytFrame();$(_0x7c78[1478])[_0x7c78[245]](_0x7c78[1477])[_0x7c78[247]](_0x7c78[1476]);$(_0x7c78[469])[_0x7c78[801]](_0x7c78[1479],function(){$(this)[_0x7c78[206]](_0x7c78[1480],_0x7c78[1481])});$(_0x7c78[469])[_0x7c78[1462]](_0x7c78[1457],function(_0x1499x12d){$(this)[_0x7c78[206]](_0x7c78[1480],_0x7c78[1481]);var _0x1499x109=_0x1499x12d[_0x7c78[1460]][_0x7c78[1459]][_0x7c78[1458]](_0x7c78[76]);YoutubeEmbPlayer(_0x1499x109)});$(_0x7c78[410])[_0x7c78[206]](_0x7c78[1482],_0x7c78[1483]);$(_0x7c78[952])[_0x7c78[130]](_0x7c78[1484]+ _0x7c78[1485]+ _0x7c78[326]);$(_0x7c78[1088])[_0x7c78[713]](_0x7c78[1486]+ _0x7c78[1487]+ _0x7c78[1488]+ _0x7c78[1489]+ _0x7c78[1490]+ _0x7c78[1491]+ _0x7c78[1492]+ _0x7c78[652]);$(_0x7c78[1088])[_0x7c78[713]](_0x7c78[1493]+ _0x7c78[1494]+ _0x7c78[1495]+ _0x7c78[1496]+ _0x7c78[1497]+ _0x7c78[1498]+ _0x7c78[1499]);$(_0x7c78[1088])[_0x7c78[713]](_0x7c78[1500]+ _0x7c78[1501]+ _0x7c78[1502]+ _0x7c78[1503]+ _0x7c78[1504]+ _0x7c78[1505]+ _0x7c78[1506]);$(_0x7c78[1088])[_0x7c78[713]](_0x7c78[1507]+ _0x7c78[1508]+ _0x7c78[1509]+ _0x7c78[1510]+ _0x7c78[1511]+ _0x7c78[1512]+ _0x7c78[1513]);$(_0x7c78[1088])[_0x7c78[713]](_0x7c78[1514]+ _0x7c78[1515]+ _0x7c78[652]);$(_0x7c78[1090])[_0x7c78[279]](_0x7c78[1516]+ _0x7c78[1517]+ legmaincolor+ _0x7c78[1518]+ _0x7c78[1519]+ legmaincolor+ _0x7c78[1520]+ _0x7c78[1521]+ _0x7c78[1522]+ legmaincolor+ _0x7c78[1523]+ _0x7c78[1524]+ _0x7c78[1525]+ legmaincolor+ _0x7c78[1526]+ _0x7c78[652]+ _0x7c78[1527]+ _0x7c78[1528]+ legmaincolor+ _0x7c78[1529]+ _0x7c78[1530]+ legmaincolor+ _0x7c78[1531]+ _0x7c78[1532]+ legmaincolor+ _0x7c78[1533]+ _0x7c78[652]+ _0x7c78[1534]+ _0x7c78[1530]+ legmaincolor+ _0x7c78[1531]+ _0x7c78[652]+ _0x7c78[1535]+ _0x7c78[652]);$(_0x7c78[544])[_0x7c78[208]](function(){if(playerState!= 1){$(_0x7c78[471])[0][_0x7c78[1540]][_0x7c78[1539]](_0x7c78[1536]+ _0x7c78[298]+ _0x7c78[1537],_0x7c78[1538]);$(_0x7c78[1543])[_0x7c78[247]](_0x7c78[1542])[_0x7c78[245]](_0x7c78[1541]);$(this)[_0x7c78[206]](_0x7c78[986],Premadeletter60)[_0x7c78[1300]](_0x7c78[1544])[_0x7c78[1300]](_0x7c78[87]);return playerState= 1}else {$(_0x7c78[471])[0][_0x7c78[1540]][_0x7c78[1539]](_0x7c78[1536]+ _0x7c78[299]+ _0x7c78[1537],_0x7c78[1538]);$(_0x7c78[1543])[_0x7c78[247]](_0x7c78[1541])[_0x7c78[245]](_0x7c78[1542]);$(this)[_0x7c78[206]](_0x7c78[986],Premadeletter13)[_0x7c78[1300]](_0x7c78[1544])[_0x7c78[1300]](_0x7c78[87]);return playerState= 0}});$(_0x7c78[1168])[_0x7c78[665]](function(){$(_0x7c78[1545])[_0x7c78[61]]();$(_0x7c78[1168])[_0x7c78[76]](_0x7c78[1546]);if($(_0x7c78[493])[_0x7c78[59]]()!= _0x7c78[6]){$(_0x7c78[1547])[_0x7c78[87]](100)}else {$(_0x7c78[1548])[_0x7c78[87]](100)}});$(_0x7c78[1456])[_0x7c78[663]](function(){$(_0x7c78[1548])[_0x7c78[61]]();$(_0x7c78[1547])[_0x7c78[61]]();$(_0x7c78[1545])[_0x7c78[61]]();$(_0x7c78[1168])[_0x7c78[76]](_0x7c78[1549])});$(_0x7c78[1551])[_0x7c78[130]](_0x7c78[1550]);$(_0x7c78[1461])[_0x7c78[1300]](_0x7c78[1552]);$(_0x7c78[1122])[_0x7c78[208]](function(){copy($(_0x7c78[238])[_0x7c78[76]]())});$(_0x7c78[1123])[_0x7c78[208]](function(){copy($(_0x7c78[238])[_0x7c78[76]]())});$(_0x7c78[1553])[_0x7c78[208]](function(){lastIP= localStorage[_0x7c78[3]](_0x7c78[38]);if(lastIP== _0x7c78[6]|| lastIP== null){}else {$(_0x7c78[213])[_0x7c78[59]](lastIP);$(_0x7c78[295])[_0x7c78[208]]();setTimeout(function(){if($(_0x7c78[213])[_0x7c78[59]]()!= lastIP){toastr[_0x7c78[173]](Premadeletter31)[_0x7c78[73]](_0x7c78[71],_0x7c78[267])}},1000)}});$(_0x7c78[1557])[_0x7c78[208]](function(){if(searchSip!= null){copy(_0x7c78[1554]+ region+ _0x7c78[1555]+ realmode+ _0x7c78[1556]+ searchSip)}else {copy(_0x7c78[1554]+ $(_0x7c78[60])[_0x7c78[59]]()+ _0x7c78[1555]+ realmode+ _0x7c78[1556]+ currentIP)}});$(_0x7c78[1168])[_0x7c78[208]](function(){if(realmode== _0x7c78[68]){CopyTkPwLb2= _0x7c78[1558]+ $(_0x7c78[213])[_0x7c78[59]]();copy(CopyTkPwLb2)}else {if(realmode!= _0x7c78[68]){if(region!= null&& realmode!= null){if(document[_0x7c78[56]][_0x7c78[55]](_0x7c78[54])){CopyTkPwLb2= _0x7c78[1559]+ $(_0x7c78[213])[_0x7c78[59]]()+ _0x7c78[218]+ $(_0x7c78[60])[_0x7c78[59]]()+ _0x7c78[1555]+ realmode}else {CopyTkPwLb2= _0x7c78[1558]+ $(_0x7c78[213])[_0x7c78[59]]()+ _0x7c78[218]+ $(_0x7c78[60])[_0x7c78[59]]()+ _0x7c78[1555]+ realmode};copy(CopyTkPwLb2)}else {CopyTkPwLb2= _0x7c78[1558]+ $(_0x7c78[213])[_0x7c78[59]]();copy(CopyTkPwLb2)}}else {if(realmode== _0x7c78[68]){CopyTkPwLb2= _0x7c78[1558]+ $(_0x7c78[213])[_0x7c78[59]]();copy(CopyTkPwLb2)}else {if(realmode!= _0x7c78[68]){if(document[_0x7c78[56]][_0x7c78[55]](_0x7c78[54])){CopyTkPwLb2= _0x7c78[1559]+ $(_0x7c78[213])[_0x7c78[59]]()+ _0x7c78[218]+ $(_0x7c78[60])[_0x7c78[59]]()+ _0x7c78[1555]+ realmode}else {CopyTkPwLb2= _0x7c78[1558]+ $(_0x7c78[213])[_0x7c78[59]]()+ _0x7c78[218]+ $(_0x7c78[60])[_0x7c78[59]]()+ _0x7c78[1555]+ realmode};copy(CopyTkPwLb2)}}}}});$(_0x7c78[1124])[_0x7c78[208]](function(){if(searchSip!= null){if(realmode== _0x7c78[68]){CopyTkPwLb2= _0x7c78[1558]+ $(_0x7c78[213])[_0x7c78[59]]()+ _0x7c78[1560]+ $(_0x7c78[493])[_0x7c78[59]]();copy(CopyTkPwLb2)}else {if(realmode!= _0x7c78[68]){if(document[_0x7c78[56]][_0x7c78[55]](_0x7c78[54])){CopyTkPwLb2= _0x7c78[1559]+ $(_0x7c78[213])[_0x7c78[59]]()+ _0x7c78[1560]+ $(_0x7c78[493])[_0x7c78[59]]()+ _0x7c78[218]+ $(_0x7c78[60])[_0x7c78[59]]()+ _0x7c78[1555]+ realmode}else {CopyTkPwLb2= _0x7c78[1558]+ $(_0x7c78[213])[_0x7c78[59]]()+ _0x7c78[1560]+ $(_0x7c78[493])[_0x7c78[59]]()+ _0x7c78[218]+ $(_0x7c78[60])[_0x7c78[59]]()+ _0x7c78[1555]+ realmode};copy(CopyTkPwLb2)}}}else {if(realmode== _0x7c78[68]){CopyTkPwLb2= _0x7c78[1558]+ $(_0x7c78[213])[_0x7c78[59]]()+ _0x7c78[1560]+ $(_0x7c78[493])[_0x7c78[59]]();copy(CopyTkPwLb2)}else {if(realmode!= _0x7c78[68]){if(document[_0x7c78[56]][_0x7c78[55]](_0x7c78[54])){CopyTkPwLb2= _0x7c78[1559]+ $(_0x7c78[213])[_0x7c78[59]]()+ _0x7c78[1560]+ $(_0x7c78[493])[_0x7c78[59]]()+ _0x7c78[218]+ $(_0x7c78[60])[_0x7c78[59]]()+ _0x7c78[1555]+ realmode}else {CopyTkPwLb2= _0x7c78[1558]+ $(_0x7c78[213])[_0x7c78[59]]()+ _0x7c78[1560]+ $(_0x7c78[493])[_0x7c78[59]]()+ _0x7c78[218]+ $(_0x7c78[60])[_0x7c78[59]]()+ _0x7c78[1555]+ realmode};copy(CopyTkPwLb2)}}}});$(_0x7c78[1125])[_0x7c78[208]](function(){if(searchSip!= null){if(realmode== _0x7c78[68]){CopyTkPwLb2= _0x7c78[1558]+ $(_0x7c78[213])[_0x7c78[59]]()+ _0x7c78[1560]+ $(_0x7c78[493])[_0x7c78[59]]();copyToClipboardAll()}else {if(realmode!= _0x7c78[68]){if(document[_0x7c78[56]][_0x7c78[55]](_0x7c78[54])){CopyTkPwLb2= _0x7c78[1559]+ $(_0x7c78[213])[_0x7c78[59]]()+ _0x7c78[1560]+ $(_0x7c78[493])[_0x7c78[59]]()+ _0x7c78[218]+ $(_0x7c78[60])[_0x7c78[59]]()+ _0x7c78[1555]+ realmode}else {CopyTkPwLb2= _0x7c78[1558]+ $(_0x7c78[213])[_0x7c78[59]]()+ _0x7c78[1560]+ $(_0x7c78[493])[_0x7c78[59]]()+ _0x7c78[218]+ $(_0x7c78[60])[_0x7c78[59]]()+ _0x7c78[1555]+ realmode};copy(CopyTkPwLb2)}}}else {if(realmode== _0x7c78[68]){CopyTkPwLb2= _0x7c78[1558]+ $(_0x7c78[213])[_0x7c78[59]]()+ _0x7c78[1560]+ $(_0x7c78[493])[_0x7c78[59]]();copyToClipboardAll()}else {if(realmode!= _0x7c78[68]){if(document[_0x7c78[56]][_0x7c78[55]](_0x7c78[54])){CopyTkPwLb2= _0x7c78[1559]+ $(_0x7c78[213])[_0x7c78[59]]()+ _0x7c78[1560]+ $(_0x7c78[493])[_0x7c78[59]]()+ _0x7c78[218]+ $(_0x7c78[60])[_0x7c78[59]]()+ _0x7c78[1555]+ realmode}else {CopyTkPwLb2= _0x7c78[1558]+ $(_0x7c78[213])[_0x7c78[59]]()+ _0x7c78[1560]+ $(_0x7c78[493])[_0x7c78[59]]()+ _0x7c78[218]+ $(_0x7c78[60])[_0x7c78[59]]()+ _0x7c78[1555]+ realmode};copyToClipboardAll()}}}});$(_0x7c78[693])[_0x7c78[208]](function(){$(_0x7c78[693])[_0x7c78[1561]]()});$(_0x7c78[1169])[_0x7c78[208]](function(){$(_0x7c78[237])[_0x7c78[208]]()});$(_0x7c78[1169])[_0x7c78[665]](function(){$(_0x7c78[1548])[_0x7c78[61]]();$(_0x7c78[1547])[_0x7c78[61]]();$(_0x7c78[1168])[_0x7c78[76]](_0x7c78[1549])});$(_0x7c78[1461])[_0x7c78[208]](function(){if(!searching){getSNEZServers();client2[_0x7c78[704]]()}else {$(_0x7c78[248])[_0x7c78[247]](_0x7c78[246])[_0x7c78[245]](_0x7c78[244]);clearInterval(timerId);searching= false;toastr[_0x7c78[173]](Premadeletter32+ _0x7c78[274])[_0x7c78[73]](_0x7c78[71],_0x7c78[267])}});$(_0x7c78[969])[_0x7c78[734]](function(_0x1499x11d){if(_0x1499x11d[_0x7c78[685]]== 13){$(_0x7c78[1461])[_0x7c78[208]]()}});$(_0x7c78[1562])[_0x7c78[208]](function(){hideSearchHud();showMenu2()});$(_0x7c78[1166])[_0x7c78[665]](function(){$(_0x7c78[1548])[_0x7c78[61]]();$(_0x7c78[1545])[_0x7c78[87]](100);$(_0x7c78[1168])[_0x7c78[76]](_0x7c78[1549])});$(_0x7c78[952])[_0x7c78[73]](_0x7c78[1454],_0x7c78[1455]);$(_0x7c78[1166])[_0x7c78[208]](function(){hideMenu();$(_0x7c78[250])[_0x7c78[59]]($(_0x7c78[60])[_0x7c78[59]]());$(_0x7c78[251])[_0x7c78[59]]($(_0x7c78[69])[_0x7c78[59]]());showSearchHud();$(_0x7c78[969])[_0x7c78[1561]]()[_0x7c78[284]]()});$(_0x7c78[293])[_0x7c78[665]](function(){$(_0x7c78[293])[_0x7c78[73]](_0x7c78[397],_0x7c78[1563]);return clickedname= _0x7c78[99]})[_0x7c78[663]](function(){$(_0x7c78[293])[_0x7c78[73]](_0x7c78[397],_0x7c78[6])});$(_0x7c78[293])[_0x7c78[1121]](function(){previousnickname= $(_0x7c78[293])[_0x7c78[59]]();localStorage[_0x7c78[117]](_0x7c78[39],previousnickname);var _0x1499x202;for(_0x1499x202 in animatedskins){if(_0x1499x202== $(_0x7c78[293])[_0x7c78[59]]()){toastr[_0x7c78[157]](_0x7c78[1564])}};if(clickedname== _0x7c78[99]){if(fancyCount2($(_0x7c78[293])[_0x7c78[59]]())>= 16){toastr[_0x7c78[184]](_0x7c78[199]+ Premadeletter123+ _0x7c78[200]+ Premadeletter2+ _0x7c78[1565]+ $(_0x7c78[293])[_0x7c78[59]]())}};if($(_0x7c78[293])[_0x7c78[59]]()== _0x7c78[1566]){toastr[_0x7c78[157]](Premadeletter3)[_0x7c78[73]](_0x7c78[71],_0x7c78[267]);$(_0x7c78[293])[_0x7c78[59]](_0x7c78[1567]);$(_0x7c78[74])[_0x7c78[208]]();openbleedmod()}else {if($(_0x7c78[293])[_0x7c78[59]]()== _0x7c78[1568]){toastr[_0x7c78[157]](Premadeletter4)[_0x7c78[73]](_0x7c78[71],_0x7c78[267]);$(_0x7c78[293])[_0x7c78[59]](_0x7c78[1567]);$(_0x7c78[74])[_0x7c78[208]]();openrotatingmod()}else {if($(_0x7c78[293])[_0x7c78[59]]()== _0x7c78[1569]){toastr[_0x7c78[157]](Premadeletter5+ _0x7c78[1570]+ Premadeletter6+ _0x7c78[1571]);$(_0x7c78[293])[_0x7c78[59]](_0x7c78[1572]);openvidmod()}}}});$(_0x7c78[293])[_0x7c78[801]](_0x7c78[1479],function(){if(fancyCount2($(_0x7c78[293])[_0x7c78[59]]())> 15){while(fancyCount2($(_0x7c78[293])[_0x7c78[59]]())> 15){$(_0x7c78[293])[_0x7c78[59]]($(_0x7c78[293])[_0x7c78[59]]()[_0x7c78[181]](0,-1))}}});$(document)[_0x7c78[734]](function(_0x1499x11d){if(_0x1499x11d[_0x7c78[1573]]== 8){if($(_0x7c78[1574])[_0x7c78[140]]== 0){$(_0x7c78[1166])[_0x7c78[208]]()}}});$(_0x7c78[1176])[_0x7c78[208]](function(){CutNameConflictwithMessageFunction();if(checkedGameNames== 0){StartEditGameNames();return checkedGameNames= 2}else {if(checkedGameNames== 1){ContinueEditGameNames();return checkedGameNames= 2}else {if(checkedGameNames== 2){StopEditGameNames();return checkedGameNames= 1}}}});$(_0x7c78[1170])[_0x7c78[208]](function(){var _0x1499x203=$(_0x7c78[213])[_0x7c78[59]]();var _0x1499x204=$(_0x7c78[493])[_0x7c78[59]]();if(_0x1499x204!= _0x7c78[6]){semiurl2= _0x1499x203+ _0x7c78[1575]+ _0x1499x204}else {semiurl2= _0x1499x203};url2= _0x7c78[1576]+ semiurl2;setTimeout(function(){$(_0x7c78[1170])[_0x7c78[545]]()},100);var _0x1499x205=window[_0x7c78[119]](url2,_0x7c78[486])});$(_0x7c78[493])[_0x7c78[73]](_0x7c78[71],_0x7c78[1577]);$(_0x7c78[293])[_0x7c78[73]](_0x7c78[71],_0x7c78[1578]);$(_0x7c78[493])[_0x7c78[665]](function(){$(_0x7c78[493])[_0x7c78[73]](_0x7c78[397],_0x7c78[1563])})[_0x7c78[663]](function(){$(_0x7c78[493])[_0x7c78[73]](_0x7c78[397],_0x7c78[6])});$(_0x7c78[60])[_0x7c78[665]](function(){$(_0x7c78[60])[_0x7c78[73]](_0x7c78[397],_0x7c78[1579])})[_0x7c78[663]](function(){$(_0x7c78[60])[_0x7c78[73]](_0x7c78[397],_0x7c78[6])});$(_0x7c78[69])[_0x7c78[665]](function(){$(_0x7c78[69])[_0x7c78[73]](_0x7c78[397],_0x7c78[1579])})[_0x7c78[663]](function(){$(_0x7c78[69])[_0x7c78[73]](_0x7c78[397],_0x7c78[6])});$(_0x7c78[1580])[_0x7c78[208]](function(){setTimeout(function(){if(LegendSettingsfirstclicked== _0x7c78[116]){LegendSettingsfirst();return LegendSettingsfirstclicked= _0x7c78[115]}else {$(_0x7c78[408])[_0x7c78[208]]();return false}},100)});$(_0x7c78[236])[_0x7c78[208]](function(){localStorage[_0x7c78[117]](_0x7c78[38],$(_0x7c78[213])[_0x7c78[59]]());var _0x1499x206=_0x7c78[1581];var _0x1499x207=_0x7c78[108];var _0x1499x208=_0x7c78[108];var userfirstname=localStorage[_0x7c78[3]](_0x7c78[109]);var userlastname=localStorage[_0x7c78[3]](_0x7c78[110]);var _0x1499x111=_0x7c78[108];var _0x1499x209=_0x7c78[108];var _0x1499x20a= new Date();var _0x1499x20b=_0x1499x20a[_0x7c78[1582]]()+ _0x7c78[192]+ (_0x1499x20a[_0x7c78[1583]]()+ 1)+ _0x7c78[192]+ _0x1499x20a[_0x7c78[1584]]()+ _0x7c78[189]+ _0x1499x20a[_0x7c78[1585]]()+ _0x7c78[239]+ _0x1499x20a[_0x7c78[1586]]();if(searchSip== null){_0x1499x111= $(_0x7c78[69])[_0x7c78[59]]();_0x1499x209= $(_0x7c78[60])[_0x7c78[59]]()}else {if(searchSip== $(_0x7c78[300])[_0x7c78[59]]()){_0x1499x111= realmode;_0x1499x209= region}};if($(_0x7c78[300])[_0x7c78[59]]()!= _0x7c78[6]&& $(_0x7c78[300])[_0x7c78[59]]()!= null&& $(_0x7c78[300])[_0x7c78[59]]()!= undefined){_0x1499x207= $(_0x7c78[300])[_0x7c78[59]]()};if($(_0x7c78[493])[_0x7c78[59]]()!= _0x7c78[6]&& $(_0x7c78[493])[_0x7c78[59]]()!= undefined){_0x1499x206= $(_0x7c78[493])[_0x7c78[59]]()};var _0x1499xd8=0,_0x1499x20c=_0x1499x206[_0x7c78[140]];for(_0x1499xd8;_0x1499xd8< _0x1499x206;_0x1499xd8++){_0x1499x206= _0x1499x206[_0x7c78[168]](_0x7c78[481],_0x7c78[933])};if($(_0x7c78[293])[_0x7c78[59]]()!= undefined){_0x1499x208= $(_0x7c78[293])[_0x7c78[59]]()};var _0x1499xd8=0,_0x1499x20d=_0x1499x208[_0x7c78[140]];for(_0x1499xd8;_0x1499xd8< _0x1499x20d;_0x1499xd8++){_0x1499x208= removeEmojis(_0x1499x208[_0x7c78[168]](_0x7c78[481],_0x7c78[933]))};if($(_0x7c78[300])[_0x7c78[59]]()!= undefined){if(_0x1499x207[_0x7c78[179]](_0x7c78[579])== false){_0x1499x207= $(_0x7c78[300])[_0x7c78[59]]()[_0x7c78[168]](_0x7c78[579],_0x7c78[1587])}};if(searchSip== null){detailed1= _0x7c78[1588]+ _0x7c78[1589]+ window[_0x7c78[1245]]+ _0x7c78[1590]+ _0x1499x208+ _0x7c78[1591]+ _0x1499x20b+ _0x7c78[1592]+ _0x1499x207+ _0x7c78[1593]+ _0x1499x206+ _0x7c78[1594]+ _0x1499x111+ _0x7c78[1595]+ _0x1499x209+ _0x7c78[1596]+ window[_0x7c78[186]]+ _0x7c78[1597]+ userlastname+ _0x7c78[1598]+ userfirstname}else {if(searchSip!= null){detailed1= _0x7c78[1588]+ _0x7c78[1589]+ window[_0x7c78[1245]]+ _0x7c78[1590]+ _0x1499x208+ _0x7c78[1591]+ _0x1499x20b+ _0x7c78[1592]+ searchSip+ _0x7c78[1593]+ _0x1499x206+ _0x7c78[1599]+ _0x7c78[1594]+ _0x1499x111+ _0x7c78[1595]+ _0x1499x209+ _0x7c78[1596]+ window[_0x7c78[186]]+ _0x7c78[1597]+ userlastname+ _0x7c78[1598]+ userfirstname}else {detailed1= _0x7c78[1588]+ _0x7c78[1589]+ window[_0x7c78[1245]]+ _0x7c78[1590]+ _0x1499x208+ _0x7c78[1591]+ _0x1499x20b+ _0x7c78[1592]+ _0x1499x207+ _0x7c78[1593]+ _0x1499x206+ _0x7c78[1594]+ _0x1499x111+ _0x7c78[1595]+ _0x1499x209+ _0x7c78[1596]+ window[_0x7c78[186]]+ _0x7c78[1597]+ userlastname+ _0x7c78[1598]+ userfirstname}};$(_0x7c78[469])[_0x7c78[279]](_0x7c78[1600]+ detailed1+ _0x7c78[1601]);$(_0x7c78[1602])[_0x7c78[61]]();setTimeout(function(){if(window[_0x7c78[1603]]&& window[_0x7c78[1603]][_0x7c78[55]]($(_0x7c78[293])[_0x7c78[59]]())){for(var _0x1499x1f7=0;_0x1499x1f7< window[_0x7c78[1604]][_0x7c78[140]];_0x1499x1f7++){if($(_0x7c78[293])[_0x7c78[59]]()== window[_0x7c78[1604]][_0x1499x1f7][_0x7c78[144]]){core[_0x7c78[831]]($(_0x7c78[293])[_0x7c78[59]](),null,_0x7c78[1605]+ window[_0x7c78[1606]]+ window[_0x7c78[1604]][_0x1499x1f7][_0x7c78[1607]],null)}}}else {if(legendflags[_0x7c78[55]](LowerCase($(_0x7c78[293])[_0x7c78[59]]()))){core[_0x7c78[831]]($(_0x7c78[293])[_0x7c78[59]](),null,_0x7c78[1608]+ LowerCase($(_0x7c78[293])[_0x7c78[59]]())+ _0x7c78[1609],null)}}},1000);$(_0x7c78[1610])[_0x7c78[801]](_0x7c78[1159],function(){$(_0x7c78[1610])[_0x7c78[176]]()});return lastIP= $(_0x7c78[213])[_0x7c78[59]]()});$(_0x7c78[531])[_0x7c78[1300]]({title:_0x7c78[1611],placement:_0x7c78[677]});$(_0x7c78[209])[_0x7c78[208]](function(){var _0x1499x20e=!($(this)[_0x7c78[206]](_0x7c78[205])== _0x7c78[115]);if(_0x1499x20e){localStorage[_0x7c78[117]](_0x7c78[47],true);$(_0x7c78[1612])[_0x7c78[87]]();$(this)[_0x7c78[281]](_0x7c78[1613]+ Premadeletter43)}else {localStorage[_0x7c78[117]](_0x7c78[47],false);$(_0x7c78[1612])[_0x7c78[61]]();$(_0x7c78[1018])[_0x7c78[61]]();$(_0x7c78[1021])[_0x7c78[61]]();$(_0x7c78[1019])[_0x7c78[61]]();$(_0x7c78[1020])[_0x7c78[61]]();$(_0x7c78[1018])[_0x7c78[61]]();$(this)[_0x7c78[281]](_0x7c78[1613]+ Premadeletter42);return seticon= _0x7c78[99]}});$(_0x7c78[211])[_0x7c78[208]](function(){var _0x1499x20e=!($(this)[_0x7c78[206]](_0x7c78[205])== _0x7c78[115]);if(_0x1499x20e){localStorage[_0x7c78[117]](_0x7c78[48],true);$(_0x7c78[379])[_0x7c78[87]]();$(this)[_0x7c78[281]](_0x7c78[1614]+ Premadeletter45)}else {localStorage[_0x7c78[117]](_0x7c78[48],false);$(_0x7c78[379])[_0x7c78[61]]();$(this)[_0x7c78[281]](_0x7c78[1614]+ Premadeletter44)}});$(_0x7c78[210])[_0x7c78[208]](function(){var _0x1499x20e=!($(this)[_0x7c78[206]](_0x7c78[205])== _0x7c78[115]);if(_0x1499x20e){localStorage[_0x7c78[117]](_0x7c78[49],true);var _0x1499x165=document[_0x7c78[974]](_0x7c78[647])[0];$(_0x1499x165)[_0x7c78[279]](_0x7c78[975]+ _0x7c78[1615]+ _0x7c78[977]+ _0x7c78[978]+ _0x7c78[979]+ _0x7c78[980]+ _0x7c78[981]);$(this)[_0x7c78[281]](_0x7c78[1616]+ Premadeletter45b)}else {localStorage[_0x7c78[117]](_0x7c78[49],false);var _0x1499x165=document[_0x7c78[974]](_0x7c78[647])[0];$(_0x1499x165)[_0x7c78[279]](_0x7c78[975]+ _0x7c78[1617]+ _0x7c78[1618]+ _0x7c78[1619]+ _0x7c78[1620]+ _0x7c78[1621]+ _0x7c78[1622]);$(this)[_0x7c78[281]](_0x7c78[1616]+ Premadeletter45a)}});$(_0x7c78[1126])[_0x7c78[208]](function(){var _0x1499x20e=!($(this)[_0x7c78[206]](_0x7c78[205])== _0x7c78[115]);if(_0x1499x20e){localStorage[_0x7c78[117]](_0x7c78[50],true);var _0x1499x165=document[_0x7c78[974]](_0x7c78[647])[0];$(_0x1499x165)[_0x7c78[279]](_0x7c78[1623]+ _0x7c78[1624]+ $(_0x7c78[1625])[_0x7c78[59]]()+ _0x7c78[1626]+ _0x7c78[1627]+ $(_0x7c78[1625])[_0x7c78[59]]()+ _0x7c78[1626]+ _0x7c78[1628]+ $(_0x7c78[1625])[_0x7c78[59]]()+ _0x7c78[1626]+ _0x7c78[1629]+ $(_0x7c78[1625])[_0x7c78[59]]()+ _0x7c78[1626]+ _0x7c78[1627]+ $(_0x7c78[1625])[_0x7c78[59]]()+ _0x7c78[1626]+ _0x7c78[1630]+ $(_0x7c78[1625])[_0x7c78[59]]()+ _0x7c78[1626]+ _0x7c78[1631]+ $(_0x7c78[1625])[_0x7c78[59]]()+ _0x7c78[1626]+ _0x7c78[1632]+ _0x7c78[1633]+ _0x7c78[1634]+ _0x7c78[1635]);$(this)[_0x7c78[281]](_0x7c78[1616]+ Premadeletter47)}else {localStorage[_0x7c78[117]](_0x7c78[50],false);$(_0x7c78[1636])[_0x7c78[176]]();$(this)[_0x7c78[281]](_0x7c78[1637]+ Premadeletter46)}});$(_0x7c78[1127])[_0x7c78[208]](function(){var _0x1499x20e=!($(this)[_0x7c78[206]](_0x7c78[205])== _0x7c78[115]);if(_0x1499x20e){localStorage[_0x7c78[117]](_0x7c78[51],true);$(_0x7c78[1638])[_0x7c78[87]]();$(this)[_0x7c78[281]](_0x7c78[1639]+ Premadeletter51);TimerLM[_0x7c78[1079]]= document[_0x7c78[407]](_0x7c78[1640]);return TimerLM[_0x7c78[1079]]}else {localStorage[_0x7c78[117]](_0x7c78[51],false);$(_0x7c78[1638])[_0x7c78[61]]();$(this)[_0x7c78[281]](_0x7c78[1639]+ Premadeletter50)}});$(_0x7c78[531])[_0x7c78[208]](function(){var _0x1499x20e=!($(this)[_0x7c78[206]](_0x7c78[205])== _0x7c78[115]);if(_0x1499x20e){$(_0x7c78[1612])[_0x7c78[61]]();$(_0x7c78[379])[_0x7c78[61]]();$(_0x7c78[1641])[_0x7c78[61]]();$(_0x7c78[1090])[_0x7c78[61]]();$(_0x7c78[1088])[_0x7c78[61]]();$(_0x7c78[1642])[_0x7c78[61]]();$(_0x7c78[520])[_0x7c78[61]]();$(_0x7c78[1643])[_0x7c78[61]]();$(_0x7c78[1644])[_0x7c78[61]]();$(this)[_0x7c78[281]](_0x7c78[1645]+ Premadeletter48)}else {$(_0x7c78[1612])[_0x7c78[87]]();$(_0x7c78[379])[_0x7c78[87]]();$(_0x7c78[1090])[_0x7c78[87]]();$(_0x7c78[1088])[_0x7c78[87]]();$(_0x7c78[1642])[_0x7c78[87]]();$(_0x7c78[520])[_0x7c78[87]]();$(_0x7c78[1644])[_0x7c78[87]]();$(_0x7c78[1643])[_0x7c78[87]]();$(this)[_0x7c78[281]](_0x7c78[1645]+ Premadeletter49)}});$(_0x7c78[1647])[_0x7c78[208]](function(){$(_0x7c78[376])[_0x7c78[61]]();$(_0x7c78[377])[_0x7c78[61]]();$(_0x7c78[378])[_0x7c78[61]]();$(_0x7c78[379])[_0x7c78[61]]();$(_0x7c78[1646])[_0x7c78[87]]()});$(_0x7c78[81])[_0x7c78[281]](_0x7c78[1648]);$(_0x7c78[327])[_0x7c78[76]](_0x7c78[6]);$(_0x7c78[327])[_0x7c78[713]](_0x7c78[1649]+ modVersion+ semimodVersion+ _0x7c78[1650]+ _0x7c78[1651]);$(_0x7c78[1612])[_0x7c78[61]]();$(_0x7c78[379])[_0x7c78[61]]();$(_0x7c78[1641])[_0x7c78[61]]();$(_0x7c78[1638])[_0x7c78[61]]();$(_0x7c78[1652])[_0x7c78[76]](timesopened);LMserverbox();bluebtns();SNEZServers();$(_0x7c78[410])[_0x7c78[206]](_0x7c78[1482],_0x7c78[1483]);$(_0x7c78[1654])[_0x7c78[128]](_0x7c78[1653]+ Premadeletter109+ _0x7c78[172]);$(_0x7c78[1654])[_0x7c78[128]](_0x7c78[1655]+ Premadeletter109a+ _0x7c78[172]);if(document[_0x7c78[56]][_0x7c78[55]](_0x7c78[54])){$(_0x7c78[1654])[_0x7c78[130]](_0x7c78[1656]);if(localStorage[_0x7c78[3]](_0x7c78[112])!= _0x7c78[6]&& localStorage[_0x7c78[3]](_0x7c78[112])!= null&& localStorage[_0x7c78[3]](_0x7c78[112])!= _0x7c78[4]){userid= localStorage[_0x7c78[3]](_0x7c78[112]);$(_0x7c78[1223])[_0x7c78[59]](window[_0x7c78[112]])};$(_0x7c78[1223])[_0x7c78[1121]](function(){IdfromLegendmod()})};core[_0x7c78[709]]= function(){adres(null,$(_0x7c78[69])[_0x7c78[59]](),$(_0x7c78[60])[_0x7c78[59]]());pauseVideos()};$(_0x7c78[237])[_0x7c78[208]](function(){setTimeout(function(){adres(null,$(_0x7c78[69])[_0x7c78[59]](),$(_0x7c78[60])[_0x7c78[59]]())},100)});$(_0x7c78[69])[_0x7c78[57]](function(){setTimeout(function(){adres(null,$(_0x7c78[69])[_0x7c78[59]](),$(_0x7c78[60])[_0x7c78[59]]())},100)});$(_0x7c78[60])[_0x7c78[57]](function(){setTimeout(function(){adres(null,$(_0x7c78[69])[_0x7c78[59]](),$(_0x7c78[60])[_0x7c78[59]]())},100)});$(_0x7c78[295])[_0x7c78[208]](function(){adres(null,null,null)});$(_0x7c78[972])[_0x7c78[208]](function(){adres(null,null,null)});triggerLMbtns();languagemodfun();$(_0x7c78[1657])[_0x7c78[1300]]();$(_0x7c78[280])[_0x7c78[801]](_0x7c78[1658],_0x7c78[474],function(){MSGCOMMANDS= $(_0x7c78[474])[_0x7c78[76]]();MSGNICK= $(_0x7c78[1660])[_0x7c78[1659]]()[_0x7c78[76]]()[_0x7c78[168]](_0x7c78[273],_0x7c78[6]);MsgCommands1(MSGCOMMANDS,MSGNICK)});$(_0x7c78[280])[_0x7c78[801]](_0x7c78[1661],_0x7c78[597],function(){MSGCOMMANDS= $(_0x7c78[473])[_0x7c78[76]]();MSGNICK= $(_0x7c78[1660])[_0x7c78[1659]]()[_0x7c78[76]]()[_0x7c78[168]](_0x7c78[273],_0x7c78[6]);MsgCommands1(MSGCOMMANDS,MSGNICK)})}function joinSIPonstart(){setTimeout(function(){if(searchSip!= null){if(realmode!= null&& region!= null){$(_0x7c78[69])[_0x7c78[59]](realmode);if(region== _0x7c78[58]){deleteGamemode()}};if(getParameterByName(_0x7c78[92],url)[_0x7c78[168]](_0x7c78[212],_0x7c78[6])[_0x7c78[168]](_0x7c78[214],_0x7c78[6])!= $(_0x7c78[213])[_0x7c78[59]]()){joinSIPonstart1();joinSIPonstart2()}}else {if(url[_0x7c78[55]](_0x7c78[226])== true){$(_0x7c78[69])[_0x7c78[59]](_0x7c78[68]);realmodereturnfromStart();joinpartyfromconnect()}}},1000)}function joinSIPonstart2(){setTimeout(function(){if(getParameterByName(_0x7c78[92],url)[_0x7c78[168]](_0x7c78[212],_0x7c78[6])[_0x7c78[168]](_0x7c78[214],_0x7c78[6])!= $(_0x7c78[213])[_0x7c78[59]]()){joinSIPonstart1();joinSIPonstart3()}},1000)}function joinSIPonstart3(){setTimeout(function(){if(getParameterByName(_0x7c78[92],url)[_0x7c78[168]](_0x7c78[212],_0x7c78[6])[_0x7c78[168]](_0x7c78[214],_0x7c78[6])!= $(_0x7c78[213])[_0x7c78[59]]()){toastr[_0x7c78[173]](_0x7c78[1662])}},1500)}function joinSIPonstart1(){realmodereturnfromStart();$(_0x7c78[213])[_0x7c78[59]](getParameterByName(_0x7c78[92],url)[_0x7c78[168]](_0x7c78[212],_0x7c78[6])[_0x7c78[168]](_0x7c78[214],_0x7c78[6]));if(region!= null&& realmode!= null){currentIPopened= true;legendmod[_0x7c78[67]]= realmode};$(_0x7c78[295])[_0x7c78[208]]()}function joinPLAYERonstart(){setTimeout(function(){if(searchedplayer!= null){$(_0x7c78[969])[_0x7c78[59]](searchedplayer);getSNEZServers(_0x7c78[1663]);client2[_0x7c78[704]]();setTimeout(function(){if($(_0x7c78[1664])[_0x7c78[281]]()!= undefined){toastr[_0x7c78[157]](_0x7c78[1665]+ $(_0x7c78[1666])[_0x7c78[281]]()+ _0x7c78[1667]+ searchedplayer+ _0x7c78[1668]);$(_0x7c78[1664])[_0x7c78[208]]()}},1000)};if(autoplayplayer== _0x7c78[1161]){autoplayplaying();window[_0x7c78[1669]]= true}},1000)}function joinreplayURLonstart(){setTimeout(function(){if(replayURL){BeforeReplay();setTimeout(function(){loadReplayFromWeb(replayURL)},2000)}},1000)}function autoplayplaying(){$(_0x7c78[293])[_0x7c78[59]](_0x7c78[1670]);window[_0x7c78[1671]][_0x7c78[789]]= false;window[_0x7c78[1671]][_0x7c78[1672]]= false;window[_0x7c78[1671]][_0x7c78[1673]]= false;window[_0x7c78[1671]][_0x7c78[1674]]= false;window[_0x7c78[1671]][_0x7c78[1675]]= false;window[_0x7c78[1671]][_0x7c78[1676]]= false;window[_0x7c78[1671]][_0x7c78[1677]]= false;window[_0x7c78[1671]][_0x7c78[1678]]= false;window[_0x7c78[1671]][_0x7c78[1679]]= false;window[_0x7c78[1671]][_0x7c78[1680]]= false;window[_0x7c78[1671]][_0x7c78[1681]]= false;window[_0x7c78[1671]][_0x7c78[1682]]= false;window[_0x7c78[1671]][_0x7c78[1683]]= false;window[_0x7c78[1671]][_0x7c78[1684]]= false;window[_0x7c78[1671]][_0x7c78[1685]]= false;window[_0x7c78[1671]][_0x7c78[1686]]= false;window[_0x7c78[1671]][_0x7c78[1687]]= false;window[_0x7c78[1671]][_0x7c78[1688]]= false;defaultmapsettings[_0x7c78[877]]= false;window[_0x7c78[1671]][_0x7c78[1689]]= false;window[_0x7c78[1671]][_0x7c78[1690]]= false;window[_0x7c78[1671]][_0x7c78[1691]]= false;window[_0x7c78[1671]][_0x7c78[1692]]= false;window[_0x7c78[1671]][_0x7c78[1693]]= true;$(_0x7c78[74])[_0x7c78[208]]()}function joinSERVERfindinfo(){$(_0x7c78[961])[_0x7c78[281]](_0x7c78[6]);var _0x1499x217;setTimeout(function(){_0x1499x217= $(_0x7c78[213])[_0x7c78[59]]();if(_0x1499x217!= null){$(_0x7c78[969])[_0x7c78[59]](_0x1499x217);getSNEZServers(_0x7c78[1663]);client2[_0x7c78[704]]();setTimeout(function(){if($(_0x7c78[1664])[_0x7c78[281]]()!= undefined&& $(_0x7c78[1664])[_0x7c78[281]]()!= _0x7c78[6]){for(var _0x1499xd8=0;_0x1499xd8< $(_0x7c78[1664])[_0x7c78[140]];_0x1499xd8++){if($(_0x7c78[1666])[_0x7c78[1694]](_0x1499xd8)[_0x7c78[281]]()== $(_0x7c78[293])[_0x7c78[59]]()){$(_0x7c78[1664])[_0x7c78[1694]](_0x1499xd8)[_0x7c78[176]]()};if($(_0x7c78[1695])[_0x7c78[1694]](_0x1499xd8)[_0x7c78[281]]()== null|| $(_0x7c78[1695])[_0x7c78[1694]](_0x1499xd8)[_0x7c78[281]]()== _0x7c78[4]){$(_0x7c78[1664])[_0x7c78[1694]](_0x1499xd8)[_0x7c78[176]]()};if($(_0x7c78[1696])[_0x7c78[1694]](_0x1499xd8)[_0x7c78[281]]()== null|| $(_0x7c78[1696])[_0x7c78[1694]](_0x1499xd8)[_0x7c78[281]]()== _0x7c78[4]){$(_0x7c78[1664])[_0x7c78[1694]](_0x1499xd8)[_0x7c78[176]]()}};if($(_0x7c78[1664])[_0x7c78[281]]()!= undefined&& $(_0x7c78[1664])[_0x7c78[281]]()!= _0x7c78[6]){Regions= {};var _0x1499x145=0;$(_0x7c78[60])[_0x7c78[1698]](_0x7c78[1697])[_0x7c78[930]](function(){Regions[_0x1499x145]= $(this)[_0x7c78[59]]();_0x1499x145++});Modes= {};var _0x1499x144=0;$(_0x7c78[69])[_0x7c78[1698]](_0x7c78[1697])[_0x7c78[930]](function(){if($(this)[_0x7c78[59]]()== _0x7c78[261]|| $(this)[_0x7c78[59]]()== _0x7c78[1699]|| $(this)[_0x7c78[59]]()== _0x7c78[263]|| $(this)[_0x7c78[59]]()== _0x7c78[265]|| $(this)[_0x7c78[59]]()== _0x7c78[68]){Modes[_0x1499x144]= $(this)[_0x7c78[59]]();_0x1499x144++}});countRegions= new Array(8)[_0x7c78[921]](0);for(var _0x1499xd8=0;_0x1499xd8< $(_0x7c78[1664])[_0x7c78[140]];_0x1499xd8++){if($(_0x7c78[1695])[_0x7c78[1694]](_0x1499xd8)[_0x7c78[281]]()!= null&& $(_0x7c78[1695])[_0x7c78[1694]](_0x1499xd8)[_0x7c78[281]]()!= null){for(var _0x1499x143=0;_0x1499x143<= 8;_0x1499x143++){if($(_0x7c78[1695])[_0x7c78[1694]](_0x1499xd8)[_0x7c78[281]]()== Regions[_0x1499x143]){countRegions[_0x1499x143]++}}}};countModes= new Array(5)[_0x7c78[921]](0);for(var _0x1499xd8=0;_0x1499xd8< $(_0x7c78[1664])[_0x7c78[140]];_0x1499xd8++){if($(_0x7c78[1696])[_0x7c78[1694]](_0x1499xd8)[_0x7c78[281]]()!= null&& $(_0x7c78[1695])[_0x7c78[1694]](_0x1499xd8)[_0x7c78[281]]()!= null){for(var _0x1499x143=0;_0x1499x143< 5;_0x1499x143++){if($(_0x7c78[1696])[_0x7c78[1694]](_0x1499xd8)[_0x7c78[281]]()== Modes[_0x1499x143]){countModes[_0x1499x143]++}}}};var _0x1499x218=0;var _0x1499x219=0;var _0x1499x21a=0;var _0x1499x21b=0;var _0x1499x21c=_0x7c78[6];for(var _0x1499xd8=0;_0x1499xd8< countRegions[_0x7c78[140]];_0x1499xd8++){if(countRegions[_0x1499xd8]> 0){if(_0x1499xd8!= 0){_0x1499x21c= _0x1499x21c+ countRegions[_0x1499xd8]+ _0x7c78[1700]+ Regions[_0x1499xd8]+ _0x7c78[324];if(countRegions[_0x1499xd8]> _0x1499x218){_0x1499x218= countRegions[_0x1499xd8];_0x1499x21a= Regions[_0x1499xd8]}}}};for(var _0x1499xd8=-1;_0x1499xd8< countModes[_0x7c78[140]];_0x1499xd8++){if(countModes[_0x1499xd8]> 0){if(_0x1499xd8!= -1){_0x1499x21c= _0x1499x21c+ countModes[_0x1499xd8]+ _0x7c78[1701]+ Modes[_0x1499xd8]+ _0x7c78[324];if(countModes[_0x1499xd8]> _0x1499x219){_0x1499x219= countModes[_0x1499xd8];_0x1499x21b= Modes[_0x1499xd8]}}}};realmode= _0x1499x21b;region= _0x1499x21a;setTimeout(function(){if(_0x1499x21a!= 0&& _0x1499x21a!= null&& _0x1499x21b!= 0&& _0x1499x21b!= null){if(document[_0x7c78[56]][_0x7c78[55]](_0x7c78[54])){history[_0x7c78[220]](stateObj,_0x7c78[216],_0x7c78[217]+ currentIP)}else {if(legendmod[_0x7c78[215]]){history[_0x7c78[220]](stateObj,_0x7c78[216],_0x7c78[221]+ currentIP+ _0x7c78[218]+ _0x1499x21a+ _0x7c78[219]+ _0x1499x21b)}else {if(!legendmod[_0x7c78[215]]){history[_0x7c78[220]](stateObj,_0x7c78[216],_0x7c78[221]+ currentIP)}}}};ModeRegionregion()},1500);if($(_0x7c78[60])[_0x7c78[59]]()!= _0x1499x21a|| $(_0x7c78[69])[_0x7c78[59]]()!= _0x1499x21b){_0x1499x21c= _0x1499x21c+ _0x7c78[1702]+ _0x1499x21a+ _0x7c78[1703]+ _0x1499x21b+ _0x7c78[1704];_0x1499x21c= _0x1499x21c+ _0x7c78[1705];toastr[_0x7c78[157]](_0x1499x21c)[_0x7c78[73]](_0x7c78[71],_0x7c78[182]);if(_0x1499x21a!= 0&& _0x1499x21a!= null){$(_0x7c78[60])[_0x7c78[59]](_0x1499x21a);master[_0x7c78[1706]]= $(_0x7c78[60])[_0x7c78[59]]()};if(_0x1499x21b!= 0&& _0x1499x21b!= null){$(_0x7c78[69])[_0x7c78[59]](_0x1499x21b);master[_0x7c78[67]]= $(_0x7c78[69])[_0x7c78[59]]();legendmod[_0x7c78[67]]= master[_0x7c78[67]]}}}}},1500)}},100)}function ModeRegionregion(){realmode= $(_0x7c78[69])[_0x7c78[59]]();region= $(_0x7c78[60])[_0x7c78[59]]();return realmode,region}function ytFrame(){setTimeout(function(){if( typeof YT!== _0x7c78[938]){musicPlayer= new YT.Player(_0x7c78[1707],{events:{'\x6F\x6E\x53\x74\x61\x74\x65\x43\x68\x61\x6E\x67\x65':function(_0x1499x1e4){if(_0x1499x1e4[_0x7c78[1250]]== 1){$(_0x7c78[1543])[_0x7c78[247]](_0x7c78[1542])[_0x7c78[245]](_0x7c78[1541]);$(_0x7c78[544])[_0x7c78[206]](_0x7c78[986],Premadeletter60)[_0x7c78[1300]](_0x7c78[1544])}else {$(_0x7c78[1543])[_0x7c78[247]](_0x7c78[1541])[_0x7c78[245]](_0x7c78[1542]);$(_0x7c78[544])[_0x7c78[206]](_0x7c78[986],Premadeletter13)[_0x7c78[1300]](_0x7c78[1544])}}}})}},1500)}function BeforeSpecialDeals(){var _0x1499x220=document[_0x7c78[936]](_0x7c78[935]);_0x1499x220[_0x7c78[926]]= _0x7c78[937];_0x1499x220[_0x7c78[470]]= _0x7c78[1708];$(_0x7c78[280])[_0x7c78[279]](_0x1499x220)}function BeforeLegendmodShop(){var _0x1499x220=document[_0x7c78[936]](_0x7c78[935]);_0x1499x220[_0x7c78[926]]= _0x7c78[937];_0x1499x220[_0x7c78[470]]= _0x7c78[1709];$(_0x7c78[280])[_0x7c78[279]](_0x1499x220)}function BeforeReplay(){var _0x1499x223=document[_0x7c78[936]](_0x7c78[935]);_0x1499x223[_0x7c78[926]]= _0x7c78[937];_0x1499x223[_0x7c78[470]]= _0x7c78[1710];$(_0x7c78[280])[_0x7c78[279]](_0x1499x223)}function isEquivalent(_0x1499x8e,_0x1499x91){var _0x1499x225=Object[_0x7c78[1711]](_0x1499x8e);var _0x1499x226=Object[_0x7c78[1711]](_0x1499x91);if(_0x1499x225[_0x7c78[140]]!= _0x1499x226[_0x7c78[140]]){return false};for(var _0x1499xd8=0;_0x1499xd8< _0x1499x225[_0x7c78[140]];_0x1499xd8++){var _0x1499x227=_0x1499x225[_0x1499xd8];if(_0x1499x8e[_0x1499x227]!== _0x1499x91[_0x1499x227]){return false}};return true}function AgarVersionDestinations(){window[_0x7c78[1712]]= false;window[_0x7c78[1713]]= {};window[_0x7c78[1713]][Object[_0x7c78[833]](agarversionDestinations)[_0x7c78[140]]- 1]= window[_0x7c78[1606]];getSNEZ(_0x7c78[1224],_0x7c78[1714],_0x7c78[1715]);var _0x1499x229=JSON[_0x7c78[107]](xhttp[_0x7c78[1228]]);for(var _0x1499xd8=0;_0x1499xd8< Object[_0x7c78[833]](_0x1499x229)[_0x7c78[140]];_0x1499xd8++){if(_0x1499x229[_0x1499xd8]== window[_0x7c78[1606]]){window[_0x7c78[1712]]= true}};if(window[_0x7c78[1712]]== true){window[_0x7c78[1713]]= _0x1499x229;window[_0x7c78[1712]]= false}else {if(window[_0x7c78[1712]]== false&& isObject(_0x1499x229)){window[_0x7c78[1713]]= _0x1499x229;window[_0x7c78[1713]][Object[_0x7c78[833]](_0x1499x229)[_0x7c78[140]]]= window[_0x7c78[1606]];postSNEZ(_0x7c78[1224],_0x7c78[1714],_0x7c78[1715],JSON[_0x7c78[415]](window[_0x7c78[1713]]))}}}function isObject(_0x1499x22b){if(_0x1499x22b=== null){return false};return (( typeof _0x1499x22b=== _0x7c78[1716])|| ( typeof _0x1499x22b=== _0x7c78[1717]))}function LegendModServerConnect(){}function UIDcontroller(){PremiumUsers();AgarBannedUIDs();var _0x1499x22e=localStorage[_0x7c78[3]](_0x7c78[1718]);if(bannedUserUIDs[_0x7c78[55]](window[_0x7c78[186]])|| _0x1499x22e== _0x7c78[115]){localStorage[_0x7c78[117]](_0x7c78[1718],true);document[_0x7c78[204]][_0x7c78[203]]= _0x7c78[6];window[_0x7c78[934]][_0x7c78[117]](_0x7c78[1719],defaultSettings[_0x7c78[1720]]);toastr[_0x7c78[173]](_0x7c78[199]+ Premadeletter123+ _0x7c78[200]+ _0x7c78[1721]+ _0x7c78[1722]+ _0x7c78[1723])[_0x7c78[73]](_0x7c78[71],_0x7c78[182])}}function AgarBannedUIDs(){getSNEZ(_0x7c78[1224],_0x7c78[1724],_0x7c78[1725]);var _0x1499x230=JSON[_0x7c78[107]](xhttp[_0x7c78[1228]]);for(var _0x1499xd8=0;_0x1499xd8< Object[_0x7c78[833]](_0x1499x230)[_0x7c78[140]];_0x1499xd8++){if(window[_0x7c78[1726]]){_0x1499x230[_0x1499xd8][_0x7c78[190]](_0x7c78[189])[0];if(!bannedUserUIDs[_0x7c78[55]](_0x1499x230[_0x1499xd8])){window[_0x7c78[1726]][_0x7c78[885]](_0x1499x230[_0x1499xd8])}}};window[_0x7c78[1727]]= true}function AddAgarBannedUIDs(_0x1499x232){if(window[_0x7c78[1726]]&& window[_0x7c78[1727]]){if(!window[_0x7c78[1726]][_0x7c78[55]](_0x1499x232)&& _0x1499x232!= null && _0x1499x232!= _0x7c78[6] && window[_0x7c78[186]][_0x7c78[55]](_0x7c78[1728])){window[_0x7c78[1726]][window[_0x7c78[1726]][_0x7c78[140]]]= _0x1499x232;postSNEZ(_0x7c78[1224],_0x7c78[1724],_0x7c78[1725],JSON[_0x7c78[415]](window[_0x7c78[1726]]))}}}function RemoveAgarBannedUIDs(_0x1499x232){if(window[_0x7c78[1726]]&& window[_0x7c78[1727]]){if(_0x1499x232!= null){for(var _0x1499xd8=bannedUserUIDs[_0x7c78[140]]- 1;_0x1499xd8>= 0;_0x1499xd8--){if(bannedUserUIDs[_0x1499xd8]=== _0x1499x232){bannedUserUIDs[_0x7c78[1729]](_0x1499xd8,1)}};postSNEZ(_0x7c78[1224],_0x7c78[1724],_0x7c78[1725],JSON[_0x7c78[415]](window[_0x7c78[1726]]))}}}function BannedUIDS(){if(AdminRights== 1){if(window[_0x7c78[1727]]){$(_0x7c78[527])[_0x7c78[130]](_0x7c78[1730]+ _0x7c78[1731]+ _0x7c78[1732]+ _0x7c78[1733]+ _0x7c78[1734]+ Premadeletter113+ _0x7c78[1735]+ Premadeletter113+ _0x7c78[1736]+ _0x7c78[1737]+ _0x7c78[1738]+ _0x7c78[1739]+ _0x7c78[652]+ _0x7c78[1740]+ _0x7c78[1741]+ _0x7c78[1742]+ _0x7c78[1743]+ _0x7c78[1744]+ _0x7c78[1745]+ _0x7c78[1746]+ _0x7c78[1747]+ _0x7c78[1748]+ _0x7c78[1749]+ _0x7c78[324]+ _0x7c78[1750]+ _0x7c78[1751]+ _0x7c78[1752]+ window[_0x7c78[186]]+ _0x7c78[1753]+ _0x7c78[652]+ _0x7c78[652]+ _0x7c78[652]+ _0x7c78[652]);populateBanListConfig();$(_0x7c78[1755])[_0x7c78[208]](function(){$(_0x7c78[1754])[_0x7c78[176]]()});$(_0x7c78[1757])[_0x7c78[208]](function(){window[_0x7c78[119]](_0x7c78[1756],_0x7c78[486])});$(_0x7c78[1764])[_0x7c78[208]](function(){var _0x1499x9d=$(_0x7c78[1758])[_0x7c78[59]]();if(!bannedUserUIDs[_0x7c78[55]](_0x1499x9d)&& _0x1499x9d!= null && _0x1499x9d!= _0x7c78[6] && _0x1499x9d[_0x7c78[55]](_0x7c78[1728])){AddAgarBannedUIDs(_0x1499x9d);bannedUserUIDs[_0x7c78[885]](_0x1499x9d);var _0x1499x235=document[_0x7c78[936]](_0x7c78[1697]);_0x1499x235[_0x7c78[76]]= _0x1499x9d;document[_0x7c78[407]](_0x7c78[1760])[_0x7c78[1759]][_0x7c78[823]](_0x1499x235);toastr[_0x7c78[157]](_0x7c78[199]+ Premadeletter123+ _0x7c78[200]+ _0x7c78[1761]+ _0x1499x9d+ _0x7c78[1762])}else {toastr[_0x7c78[157]](_0x7c78[199]+ Premadeletter123+ _0x7c78[200]+ _0x7c78[1761]+ _0x1499x9d+ _0x7c78[1763])}});$(_0x7c78[1768])[_0x7c78[208]](function(){var _0x1499x9d=$(_0x7c78[1765])[_0x7c78[59]]();var _0x1499xe2=document[_0x7c78[407]](_0x7c78[1760]);_0x1499xe2[_0x7c78[176]](_0x1499xe2[_0x7c78[1766]]);RemoveAgarBannedUIDs(_0x1499x9d);toastr[_0x7c78[157]](_0x7c78[199]+ Premadeletter123+ _0x7c78[200]+ _0x7c78[1761]+ _0x1499x9d+ _0x7c78[1767])})}else {toastr[_0x7c78[157]](_0x7c78[199]+ Premadeletter123+ _0x7c78[200]+ _0x7c78[1769])}}else {toastr[_0x7c78[157]](_0x7c78[199]+ Premadeletter123+ _0x7c78[200]+ _0x7c78[1770])}}function populateBanListConfig(){var _0x1499x237=document[_0x7c78[407]](_0x7c78[1760]);for(i= 0;i< Object[_0x7c78[833]](window[_0x7c78[1726]])[_0x7c78[140]];i++){_0x1499x237[_0x7c78[1759]][_0x1499x237[_0x7c78[1759]][_0x7c78[140]]]= new Option(window[_0x7c78[1726]][i])}}function findUserLang(){if(window[_0x7c78[1772]][_0x7c78[1771]]){if(window[_0x7c78[1772]][_0x7c78[1771]][0]&& (window[_0x7c78[1772]][_0x7c78[1771]][0]== _0x7c78[1773]|| window[_0x7c78[1772]][_0x7c78[1771]][1][_0x7c78[55]](_0x7c78[1728]))){if(window[_0x7c78[1772]][_0x7c78[1771]][1]&& (window[_0x7c78[1772]][_0x7c78[1771]][1]== _0x7c78[1773]|| window[_0x7c78[1772]][_0x7c78[1771]][1][_0x7c78[55]](_0x7c78[1728]))){if(window[_0x7c78[1772]][_0x7c78[1771]][2]&& (window[_0x7c78[1772]][_0x7c78[1771]][2]== _0x7c78[1773]|| window[_0x7c78[1772]][_0x7c78[1771]][2][_0x7c78[55]](_0x7c78[1728]))){if(window[_0x7c78[1772]][_0x7c78[1771]][3]&& !(window[_0x7c78[1772]][_0x7c78[1771]][2]== _0x7c78[1773]|| window[_0x7c78[1772]][_0x7c78[1771]][2][_0x7c78[55]](_0x7c78[1728]))){window[_0x7c78[1]]= window[_0x7c78[1772]][_0x7c78[1771]][3]}}else {window[_0x7c78[1]]= window[_0x7c78[1772]][_0x7c78[1771]][2]}}else {window[_0x7c78[1]]= window[_0x7c78[1772]][_0x7c78[1771]][1]}}else {window[_0x7c78[1]]= window[_0x7c78[1772]][_0x7c78[1771]][0]}}}function startTranslating(){var _0x1499x23a=document[_0x7c78[396]](_0x7c78[597]);var _0x1499x23b={childList:true,attributes:false,subtree:false};var _0x1499x23c= new MutationObserver(_0x1499x23d);function _0x1499x23d(_0x1499x23e,_0x1499x23c){_0x1499x23e[_0x7c78[832]]((_0x1499x1d1)=>{if(defaultmapsettings[_0x7c78[1774]]&& _0x1499x23a[_0x7c78[1777]][_0x7c78[1776]][_0x7c78[1775]](_0x7c78[835])&& !_0x1499x23a[_0x7c78[1777]][_0x7c78[1776]][_0x7c78[1775]](_0x7c78[811])){doMainTranslation(_0x1499x23a,_0x1499x23a[_0x7c78[1777]][_0x7c78[1777]][_0x7c78[1779]][_0x7c78[1778]])}})}_0x1499x23c[_0x7c78[1210]](_0x1499x23a,_0x1499x23b)}function doMainTranslation(_0x1499x23a,_0x1499x240){var _0x1499x241=document[_0x7c78[936]](_0x7c78[1052]);var _0x1499x242;_0x1499x241[_0x7c78[1045]][_0x7c78[662]]= _0x7c78[1780];_0x1499x241[_0x7c78[1045]][_0x7c78[1781]]= _0x7c78[1782];var _0x1499x243= new XMLHttpRequest();_0x1499x243[_0x7c78[119]](_0x7c78[1783],_0x7c78[1784]+ encodeURIComponent(_0x1499x240)+ _0x7c78[1785]+ window[_0x7c78[1]]+ _0x7c78[1786],true);_0x1499x243[_0x7c78[1787]]= function(){if(_0x1499x243[_0x7c78[1248]]== 4){if(_0x1499x243[_0x7c78[1788]]== 200){var _0x1499xfe=_0x1499x243[_0x7c78[1789]];_0x1499xfe= JSON[_0x7c78[107]](_0x1499xfe);_0x1499xfe= _0x1499xfe[_0x7c78[76]][0];_0x1499x241[_0x7c78[1778]]= _0x7c78[907]+ _0x1499xfe+ _0x7c78[909];_0x1499x242= _0x7c78[907]+ _0x1499xfe+ _0x7c78[909]}}};_0x1499x243[_0x7c78[123]]();_0x1499x23a[_0x7c78[1777]][_0x7c78[1777]][_0x7c78[940]](_0x1499x241)}function changeFrameWork(){if($(_0x7c78[1345])[_0x7c78[59]]()== _0x7c78[116]){defaultmapsettings[_0x7c78[1331]]= false}else {if($(_0x7c78[1345])[_0x7c78[59]]()== _0x7c78[115]){defaultmapsettings[_0x7c78[1331]]= true}else {if($(_0x7c78[1345])[_0x7c78[59]]()== 2){defaultmapsettings[_0x7c78[1331]]= 2}else {if($(_0x7c78[1345])[_0x7c78[59]]()== 4){defaultmapsettings[_0x7c78[1331]]= 4}else {if($(_0x7c78[1345])[_0x7c78[59]]()== 8){defaultmapsettings[_0x7c78[1331]]= 8}else {if($(_0x7c78[1345])[_0x7c78[59]]()== 16){defaultmapsettings[_0x7c78[1331]]= 16}else {if($(_0x7c78[1345])[_0x7c78[59]]()== 32){defaultmapsettings[_0x7c78[1331]]= 32}else {if($(_0x7c78[1345])[_0x7c78[59]]()== 64){defaultmapsettings[_0x7c78[1331]]= 64}else {if($(_0x7c78[1345])[_0x7c78[59]]()== _0x7c78[1790]){defaultmapsettings[_0x7c78[1331]]= _0x7c78[1790]}else {if($(_0x7c78[1345])[_0x7c78[59]]()== _0x7c78[1791]){defaultmapsettings[_0x7c78[1331]]= _0x7c78[1791]}}}}}}}}}};application[_0x7c78[1793]](defaultmapsettings,_0x7c78[1792])}function changeFrameWorkStart(){if(defaultmapsettings[_0x7c78[1331]]== true){setTimeout(function(){$(_0x7c78[1345])[_0x7c78[59]](_0x7c78[115])},10)};if(defaultmapsettings[_0x7c78[1331]]){$(_0x7c78[1345])[_0x7c78[59]](defaultmapsettings[_0x7c78[1331]])}else {if(defaultmapsettings[_0x7c78[1331]]== false){$(_0x7c78[1345])[_0x7c78[59]](_0x7c78[116])}}}function LMrewardDay(){$(_0x7c78[527])[_0x7c78[130]](_0x7c78[1794]+ _0x7c78[1731]+ _0x7c78[1795]+ _0x7c78[1733]+ _0x7c78[1796]+ Premadeletter113+ _0x7c78[1797]+ Premadeletter113+ _0x7c78[1736]+ _0x7c78[1737]+ _0x7c78[1798]+ _0x7c78[1739]+ _0x7c78[652]+ _0x7c78[1799]+ _0x7c78[652]+ _0x7c78[652]+ _0x7c78[652]+ _0x7c78[652]);$(_0x7c78[1800])[_0x7c78[695]]();$(_0x7c78[1802])[_0x7c78[208]](function(){$(_0x7c78[1801])[_0x7c78[176]]()});$(_0x7c78[1804])[_0x7c78[208]](function(){window[_0x7c78[119]](_0x7c78[1803],_0x7c78[486])})}function VideoSkinsPromo(){$(_0x7c78[527])[_0x7c78[130]](_0x7c78[1794]+ _0x7c78[1731]+ _0x7c78[1795]+ _0x7c78[1733]+ _0x7c78[1796]+ Premadeletter113+ _0x7c78[1797]+ Premadeletter113+ _0x7c78[1736]+ _0x7c78[1737]+ _0x7c78[1805]+ _0x7c78[1739]+ _0x7c78[652]+ _0x7c78[1806]+ _0x7c78[652]+ _0x7c78[652]+ _0x7c78[652]+ _0x7c78[652]);$(_0x7c78[1800])[_0x7c78[695]]();$(_0x7c78[1802])[_0x7c78[208]](function(){$(_0x7c78[1801])[_0x7c78[176]]()});$(_0x7c78[1804])[_0x7c78[208]](function(){window[_0x7c78[119]](_0x7c78[1803],_0x7c78[486])})}Premadeletter39= _0x7c78[1807];function adminstuff(){defaultSettings[_0x7c78[1720]]= _0x7c78[1808];window[_0x7c78[934]][_0x7c78[117]](_0x7c78[1809],JSON[_0x7c78[415]](defaultSettings));var legbgpic=$(_0x7c78[103])[_0x7c78[59]]();var legbgcolor=$(_0x7c78[102])[_0x7c78[59]]();$(_0x7c78[327])[_0x7c78[130]](_0x7c78[1810]+ legbgpic+ _0x7c78[305]+ legbgcolor+ _0x7c78[1811]+ _0x7c78[1812]+ _0x7c78[1813]+ _0x7c78[1814]+ _0x7c78[1815]+ _0x7c78[1816]+ _0x7c78[1817]+ _0x7c78[326]);$(_0x7c78[1819])[_0x7c78[130]](_0x7c78[1818]);$(_0x7c78[1820])[_0x7c78[59]](_0x7c78[549]);if(localStorage[_0x7c78[3]](_0x7c78[1821])&& localStorage[_0x7c78[3]](_0x7c78[1821])!= _0x7c78[6]){$(_0x7c78[1820])[_0x7c78[59]](localStorage[_0x7c78[3]](_0x7c78[1821]))};$(_0x7c78[1823])[_0x7c78[59]](localStorage[_0x7c78[3]](_0x7c78[1822]));$(_0x7c78[1820])[_0x7c78[1121]](function(){AdminClanSymbol= $(_0x7c78[1820])[_0x7c78[59]]();localStorage[_0x7c78[117]](_0x7c78[1821],AdminClanSymbol)});$(_0x7c78[1823])[_0x7c78[1121]](function(){AdminPassword= $(_0x7c78[1823])[_0x7c78[59]]();if($(_0x7c78[1820])[_0x7c78[59]]()!= _0x7c78[6]){if(AdminPassword== atob(_0x7c78[1824])){localStorage[_0x7c78[117]](_0x7c78[1822],AdminPassword);toastr[_0x7c78[184]](_0x7c78[1825]+ document[_0x7c78[407]](_0x7c78[372])[_0x7c78[405]]+ _0x7c78[1826]);$(_0x7c78[376])[_0x7c78[87]]();$(_0x7c78[377])[_0x7c78[87]]();$(_0x7c78[378])[_0x7c78[87]]();$(_0x7c78[379])[_0x7c78[87]]();$(_0x7c78[1827])[_0x7c78[61]]();$(_0x7c78[1088])[_0x7c78[713]](_0x7c78[1828]+ _0x7c78[1829]+ _0x7c78[1830]+ _0x7c78[1831]+ _0x7c78[1832]+ _0x7c78[1833]+ _0x7c78[652]);return AdminRights= 1}else {toastr[_0x7c78[157]](_0x7c78[199]+ Premadeletter123+ _0x7c78[200]+ _0x7c78[1834])}}else {toastr[_0x7c78[157]](_0x7c78[199]+ Premadeletter123+ _0x7c78[200]+ _0x7c78[1835])}});$(_0x7c78[293])[_0x7c78[1121]](function(){if($(_0x7c78[1837])[_0x7c78[596]](_0x7c78[1836])|| $(_0x7c78[1837])[_0x7c78[140]]== 0){if($(_0x7c78[293])[_0x7c78[59]]()== _0x7c78[1838]|| $(_0x7c78[293])[_0x7c78[59]]()== _0x7c78[1839]|| $(_0x7c78[293])[_0x7c78[59]]()== _0x7c78[1840]|| $(_0x7c78[293])[_0x7c78[59]]()== _0x7c78[1841]){$(_0x7c78[376])[_0x7c78[61]]();$(_0x7c78[377])[_0x7c78[61]]();$(_0x7c78[378])[_0x7c78[61]]();$(_0x7c78[379])[_0x7c78[61]]();$(_0x7c78[1827])[_0x7c78[87]]()}}});if($(_0x7c78[1823])[_0x7c78[59]]()== _0x7c78[1842]){$(_0x7c78[1823])[_0x7c78[1121]]()}}function banlistLM(){BannedUIDS()}function disconnect2min(){if(AdminRights== 1){commandMsg= _0x7c78[551];otherMsg= _0x7c78[6];dosendadmincommand();toastr[_0x7c78[157]](_0x7c78[199]+ Premadeletter123+ _0x7c78[200]+ _0x7c78[1843])}}function disconnectnow(){if(AdminRights== 1){commandMsg= _0x7c78[552];otherMsg= _0x7c78[6];dosendadmincommand();toastr[_0x7c78[157]](_0x7c78[199]+ Premadeletter123+ _0x7c78[200]+ _0x7c78[1844])}}function showstatsphp(){window[_0x7c78[119]](_0x7c78[1845],_0x7c78[486])}function showstatsphp2(){window[_0x7c78[119]](_0x7c78[1846],_0x7c78[486])}function dosendadmincommand(){if(AdminRights== 1){if($(_0x7c78[524])[_0x7c78[73]](_0x7c78[523])== _0x7c78[525]){KeyEvent[_0x7c78[1847]](13,13)};setTimeout(function(){$(_0x7c78[693])[_0x7c78[59]](_0x7c78[1848]+ otherMsg+ _0x7c78[1041]+ commandMsg);KeyEvent[_0x7c78[1847]](13,13);if($(_0x7c78[693])[_0x7c78[73]](_0x7c78[523])== _0x7c78[732]){KeyEvent[_0x7c78[1847]](13,13)};if($(_0x7c78[524])[_0x7c78[73]](_0x7c78[523])== _0x7c78[732]){KeyEvent[_0x7c78[1847]](13,13)}},100)}else {toastr[_0x7c78[157]](_0x7c78[199]+ Premadeletter123+ _0x7c78[200]+ _0x7c78[1849])}}function administrationtools(){$(_0x7c78[376])[_0x7c78[87]]();$(_0x7c78[377])[_0x7c78[87]]();$(_0x7c78[378])[_0x7c78[87]]();$(_0x7c78[379])[_0x7c78[87]]();$(_0x7c78[1827])[_0x7c78[61]]()}function LMadvertisementMegaFFA(){$(_0x7c78[527])[_0x7c78[130]](_0x7c78[1794]+ _0x7c78[1731]+ _0x7c78[1850]+ _0x7c78[1733]+ _0x7c78[1796]+ Premadeletter113+ _0x7c78[1797]+ Premadeletter113+ _0x7c78[1736]+ _0x7c78[1737]+ _0x7c78[1851]+ _0x7c78[1739]+ _0x7c78[652]+ _0x7c78[1852]+ _0x7c78[652]+ _0x7c78[652]+ _0x7c78[652]+ _0x7c78[652]);$(_0x7c78[1800])[_0x7c78[695]]();$(_0x7c78[1802])[_0x7c78[208]](function(){$(_0x7c78[1801])[_0x7c78[176]]()});$(_0x7c78[1804])[_0x7c78[208]](function(){window[_0x7c78[119]](_0x7c78[1803],_0x7c78[486])})}
| Update LMexpress.js | LMexpress/LMexpress.js | Update LMexpress.js | <ide><path>Mexpress/LMexpress.js
<ide> /*************
<ide> * LEGEND mod Express v1, by Jimboy3100 email:[email protected]
<ide> * Main Script
<del>* Semiversion 23.90
<add>* Semiversion 23.91
<ide> *************/
<ide>
<del>var _0x7c78=["\x31\x30","\x75\x73\x65\x72\x4C\x61\x6E\x67\x75\x61\x67\x65","\x70\x72\x6F\x4C\x69\x63\x65\x6E\x63\x65\x55\x49\x44","\x67\x65\x74\x49\x74\x65\x6D","\x6E\x75\x6C\x6C","\x30\x2E\x30\x2E\x30\x2E\x30\x3A\x30","","\x67\x61\x6D\x65\x6D\x6F\x64\x65","\x63\x68\x65\x63\x6B\x6F\x6E\x6C\x79\x6F\x6E\x63\x65","\x63\x68\x65\x63\x6B\x6F\x6E\x6C\x79\x74\x77\x65\x6C\x76\x74\x68","\x63\x68\x65\x63\x6B\x6F\x6E\x6C\x79\x65\x6C\x65\x76\x65\x6E\x74\x68","\x63\x68\x65\x63\x6B\x6F\x6E\x6C\x79\x72\x65\x77\x61\x72\x64\x64\x61\x79\x31","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x77\x77\x77\x2E\x79\x6F\x75\x74\x75\x62\x65\x2E\x63\x6F\x6D\x2F\x77\x61\x74\x63\x68\x3F\x76\x3D\x5A\x4A\x58\x50\x4F\x4E\x76\x34\x31\x6A\x77","\x62\x61\x72","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x69\x2E\x69\x6D\x67\x75\x72\x2E\x63\x6F\x6D\x2F\x52\x56\x42\x69\x33\x54\x31\x2E\x67\x69\x66","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x69\x2E\x69\x6D\x67\x75\x72\x2E\x63\x6F\x6D\x2F\x70\x32\x54\x32\x39\x51\x45\x2E\x67\x69\x66","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x69\x2E\x69\x6D\x67\x75\x72\x2E\x63\x6F\x6D\x2F\x45\x75\x63\x49\x66\x59\x59\x2E\x67\x69\x66","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x69\x2E\x69\x6D\x67\x75\x72\x2E\x63\x6F\x6D\x2F\x4B\x4F\x6F\x42\x44\x61\x4B\x2E\x67\x69\x66","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x69\x2E\x69\x6D\x67\x75\x72\x2E\x63\x6F\x6D\x2F\x43\x53\x30\x33\x78\x57\x76\x2E\x67\x69\x66","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x69\x2E\x69\x6D\x67\x75\x72\x2E\x63\x6F\x6D\x2F\x74\x66\x4D\x55\x75\x32\x4A\x2E\x67\x69\x66","\x42\x61\x64\x20\x43\x68\x6F\x69\x63\x65\x21","\x57\x68\x79\x3F","\x59\x6F\x77\x21\x21","\x44\x65\x61\x74\x68\x21","\x52\x65\x6C\x61\x78\x21","\x4C\x65\x67\x65\x6E\x64\x20\x4D\x6F\x64\x21","\x64\x51\x77\x34\x77\x39\x57\x67\x58\x63\x51","\x62\x74\x50\x4A\x50\x46\x6E\x65\x73\x56\x34","\x55\x44\x2D\x4D\x6B\x69\x68\x6E\x4F\x58\x67","\x76\x70\x6F\x71\x57\x73\x36\x42\x75\x49\x59","\x56\x55\x76\x66\x6E\x35\x2D\x42\x4C\x4D\x38","\x43\x6E\x49\x66\x4E\x53\x70\x43\x66\x37\x30","\x52\x69\x63\x6B\x20\x41\x73\x74\x6C\x65\x79\x20\x2D\x20\x4E\x65\x76\x65\x72\x20\x47\x6F\x6E\x6E\x61\x20\x47\x69\x76\x65\x20\x59\x6F\x75\x20\x55\x70","\x53\x75\x72\x76\x69\x76\x6F\x72\x20\x2D\x20\x45\x79\x65\x20\x4F\x66\x20\x54\x68\x65\x20\x54\x69\x67\x65\x72","\x4C\x69\x6F\x6E\x20\x6B\x69\x6E\x67\x20\x2D\x20\x54\x68\x65\x20\x4C\x69\x6F\x6E\x20\x53\x6C\x65\x65\x70\x73\x20\x54\x6F\x6E\x69\x67\x68\x74","\x41\x67\x61\x72\x69\x6F\x20\x2D\x20\x4A\x75\x6D\x62\x6F\x20\x53\x6F\x6C\x6F\x20\x76\x73\x20\x54\x65\x61\x6D\x73","\x41\x67\x61\x72\x69\x6F\x20\x2D\x20\x4B\x69\x6C\x6C\x33\x72\x20\x76\x73\x20\x54\x65\x61\x6D\x73","\x50\x72\x6F\x6D\x6F\x74\x69\x6F\x6E\x61\x6C","\x6C\x61\x73\x74\x49\x50","\x70\x72\x65\x76\x69\x6F\x75\x73\x6E\x69\x63\x6B\x6E\x61\x6D\x65","\x6D\x69\x6E\x62\x74\x65\x78\x74","\x6C\x65\x61\x64\x62\x74\x65\x78\x74","\x74\x65\x61\x6D\x62\x74\x65\x78\x74","\x69\x6D\x67\x55\x72\x6C","\x69\x6D\x67\x48\x72\x65\x66","\x73\x68\x6F\x77\x54\x4B","\x73\x68\x6F\x77\x50\x6C\x61\x79\x65\x72","\x53\x48\x4F\x53\x48\x4F\x42\x74\x6E","\x58\x50\x42\x74\x6E","\x4D\x41\x49\x4E\x42\x54\x42\x74\x6E","\x41\x6E\x69\x6D\x61\x74\x65\x64\x53\x6B\x69\x6E\x42\x74\x6E","\x54\x49\x4D\x45\x63\x61\x6C\x42\x74\x6E","\x74\x69\x6D\x65\x73\x6F\x70\x65\x6E\x65\x64","\x75\x72\x6C","\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C","\x69\x6E\x63\x6C\x75\x64\x65\x73","\x55\x52\x4C","\x63\x68\x61\x6E\x67\x65","\x50\x72\x69\x76\x61\x74\x65","\x76\x61\x6C","\x23\x72\x65\x67\x69\x6F\x6E","\x68\x69\x64\x65","\x31\x2E\x38","\x63\x6C\x61\x73\x73\x4E\x61\x6D\x65","\x63\x68\x69\x6C\x64\x72\x65\x6E","\x2E\x62\x74\x6E\x2E\x62\x74\x6E\x2D\x77\x61\x72\x6E\x69\x6E\x67\x2E\x62\x74\x6E\x2D\x73\x70\x65\x63\x74\x61\x74\x65\x2E\x62\x74\x6E\x2D\x6E\x65\x65\x64\x73\x2D\x73\x65\x72\x76\x65\x72","\x6F\x67\x69\x63\x6F\x6E\x2D\x65\x79\x65","\x67\x61\x6D\x65\x4D\x6F\x64\x65","\x3A\x70\x61\x72\x74\x79","\x23\x67\x61\x6D\x65\x6D\x6F\x64\x65","\x2E\x62\x74\x6E\x2E\x62\x74\x6E\x2D\x77\x61\x72\x6E\x69\x6E\x67\x2E\x62\x74\x6E\x2D\x6C\x6F\x67\x69\x6E\x2D\x70\x6C\x61\x79\x2E\x62\x74\x6E\x2D\x6E\x65\x65\x64\x73\x2D\x73\x65\x72\x76\x65\x72","\x77\x69\x64\x74\x68","\x31\x30\x30\x25","\x63\x73\x73","\x2E\x62\x74\x6E\x2E\x62\x74\x6E\x2D\x70\x6C\x61\x79\x2D\x67\x75\x65\x73\x74\x2E\x62\x74\x6E\x2D\x73\x75\x63\x63\x65\x73\x73\x2E\x62\x74\x6E\x2D\x6E\x65\x65\x64\x73\x2D\x73\x65\x72\x76\x65\x72","\x50\x6C\x61\x79","\x74\x65\x78\x74","\x23\x6F\x67\x61\x72\x69\x6F\x2D\x70\x61\x72\x74\x79","\x23\x6F\x70\x65\x6E\x73\x6B\x69\x6E\x63\x68\x61\x6E\x67\x65\x72","\x2E\x71\x75\x69\x63\x6B\x2E\x71\x75\x69\x63\x6B\x2D\x62\x6F\x74\x73\x2E\x6F\x67\x69\x63\x6F\x6E\x2D\x74\x72\x6F\x70\x68\x79","\x2E\x61\x67\x61\x72\x69\x6F\x2D\x70\x61\x6E\x65\x6C\x2E\x72\x61\x64\x69\x6F\x2D\x70\x61\x6E\x65\x6C","\x2E\x61\x67\x61\x72\x69\x6F\x2D\x70\x61\x6E\x65\x6C\x2E\x6F\x67\x61\x72\x69\x6F\x2D\x79\x74\x2D\x70\x61\x6E\x65\x6C","\x2E\x70\x72\x6F\x66\x69\x6C\x65\x2D\x74\x61\x62","\x31\x36\x2E\x36\x25","\x2E\x6D\x65\x6E\x75\x2D\x74\x61\x62\x73","\x37\x30\x25","\x38\x37\x25","\x73\x68\x6F\x77","\x23\x68\x6F\x74\x6B\x65\x79\x73\x2D\x63\x66\x67","\x72","\x6D","\x73\x65\x61\x72\x63\x68","\x73\x69\x70","\x70\x61\x73\x73","\x70\x6C\x61\x79\x65\x72","\x61\x75\x74\x6F\x70\x6C\x61\x79\x65\x72","\x72\x65\x70\x6C\x61\x79","\x72\x65\x70\x6C\x61\x79\x53\x74\x61\x72\x74","\x72\x65\x70\x6C\x61\x79\x45\x6E\x64","\x59\x45\x53","\x4E\x4F","\x30","\x23\x6D\x65\x6E\x75\x50\x61\x6E\x65\x6C\x43\x6F\x6C\x6F\x72","\x23\x6D\x65\x6E\x75\x42\x67","\x23\x68\x75\x64\x4D\x61\x69\x6E\x43\x6F\x6C\x6F\x72\x20","\x64\x79\x69\x6E\x67\x6C\x69\x67\x68\x74\x31\x6C\x6F\x61\x64","\x75\x73\x65\x72\x44\x61\x74\x61","\x70\x61\x72\x73\x65","\x4E\x6F\x74\x46\x6F\x75\x6E\x64","\x75\x73\x65\x72\x66\x69\x72\x73\x74\x6E\x61\x6D\x65","\x75\x73\x65\x72\x6C\x61\x73\x74\x6E\x61\x6D\x65","\x75\x73\x65\x72\x67\x65\x6E\x64\x65\x72","\x75\x73\x65\x72\x69\x64","\x6C\x61\x6E\x67\x75\x61\x67\x65\x6D\x6F\x64","\x54\x72\x75\x65","\x74\x72\x75\x65","\x66\x61\x6C\x73\x65","\x73\x65\x74\x49\x74\x65\x6D","\x50\x4F\x53\x54","\x6F\x70\x65\x6E","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x73\x65\x74\x52\x65\x71\x75\x65\x73\x74\x48\x65\x61\x64\x65\x72","\x70\x61\x73\x73\x77\x6F\x72\x64","\x73\x65\x6E\x64","\x47\x45\x54","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x6F\x6C\x64","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65\x73","\x62\x65\x66\x6F\x72\x65","\x61\x70\x70\x6C\x79","\x61\x66\x74\x65\x72","\x23\x66\x66\x30\x30\x30\x30","\x23\x30\x30\x66\x66\x30\x30","\x23\x30\x30\x30\x30\x66\x66","\x23\x66\x66\x66\x66\x30\x30","\x23\x30\x30\x66\x66\x66\x66","\x23\x66\x66\x30\x30\x66\x66","\x63\x61\x6E\x76\x61\x73","\x63\x72\x65\x61\x74\x65\x4C\x69\x6E\x65\x61\x72\x47\x72\x61\x64\x69\x65\x6E\x74","\x72\x61\x6E\x64\x6F\x6D","\x6C\x65\x6E\x67\x74\x68","\x66\x6C\x6F\x6F\x72","\x61\x64\x64\x43\x6F\x6C\x6F\x72\x53\x74\x6F\x70","\x66\x69\x6C\x6C\x54\x65\x78\x74","\x69\x64","\x6D\x69\x6E\x69\x6D\x61\x70","\x6D\x69\x6E\x69\x6D\x61\x70\x2D\x73\x65\x63\x74\x6F\x72\x73","\x61\x6F\x32\x74\x2D\x6D\x69\x6E\x69\x6D\x61\x70","\x66\x69\x6C\x6C\x53\x74\x79\x6C\x65","\x67\x72\x61\x64\x69\x65\x6E\x74","\x66","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65\x5F\x6F\x76\x65\x72\x72\x69\x64\x65","\x4C\x4D\x73\x74\x61\x72\x74\x65\x64","\x4C\x4D\x56\x65\x72\x73\x69\x6F\x6E","\x4D\x6F\x64\x20\x3C\x66\x6F\x6E\x74\x20\x63\x6F\x6C\x6F\x72\x3D\x22\x79\x65\x6C\x6C\x6F\x77\x22\x3E\x3C\x62\x3E\x76","\x3C\x2F\x62\x3E\x3C\x2F\x66\x6F\x6E\x74\x3E\x20\x20","\x20\x3C\x66\x6F\x6E\x74\x20\x63\x6F\x6C\x6F\x72\x3D\x22\x79\x65\x6C\x6C\x6F\x77\x22\x3E\x3C\x62\x3E\x76\x31\x2E\x38\x3C\x2F\x62\x3E\x3C\x2F\x66\x6F\x6E\x74\x3E\x2E\x20\x3C\x62\x72\x3E\x76\x69\x73\x69\x74\x3A\x20\x3C\x61\x20\x74\x61\x72\x67\x65\x74\x3D\x22\x5F\x62\x6C\x61\x6E\x6B\x22\x20\x68\x72\x65\x66\x3D\x22\x68\x74\x74\x70\x73\x3A\x2F\x2F\x77\x77\x77\x2E\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x22\x3E\x3C\x66\x6F\x6E\x74\x20\x63\x6F\x6C\x6F\x72\x3D\x22\x79\x65\x6C\x6C\x6F\x77\x22\x3E\x3C\x62\x3E\x3C\x75\x3E\x77\x77\x77\x2E\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x3C\x2F\x75\x3E\x3C\x2F\x62\x3E\x3C\x2F\x66\x6F\x6E\x74\x3E\x3C\x2F\x61\x3E","\x69\x6E\x66\x6F","\x74\x72\x69\x6D","\x73\x68\x6F\x77\x69\x6E\x66\x6F\x3D\x30\x26\x63\x6F\x6E\x74\x72\x6F\x6C\x73\x3D\x30\x26\x72\x65\x6C\x3D\x30\x26\x76\x71\x3D\x74\x69\x6E\x79\x26\x65\x6E\x61\x62\x6C\x65\x6A\x73\x61\x70\x69\x3D\x31","\x76","\x6C\x69\x73\x74","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x77\x77\x77\x2E\x79\x6F\x75\x74\x75\x62\x65\x2E\x63\x6F\x6D\x2F\x65\x6D\x62\x65\x64\x2F","\x3F","\x3F\x6C\x69\x73\x74\x3D","\x26","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x79\x6F\x75\x74\x75\x2E\x62\x65\x2F","\x73\x74\x61\x72\x74\x73\x57\x69\x74\x68","\x72\x65\x70\x6C\x61\x63\x65","\x33\x30\x30\x70\x78","\x3C\x2F\x62\x72\x3E\x20\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x65\x6E\x61\x62\x6C\x65\x73\x68\x6F\x72\x74\x63\x75\x74\x73\x31\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x73\x6D\x20\x62\x74\x6E\x2D\x70\x72\x69\x6D\x61\x72\x79\x20\x62\x74\x6E\x2D\x70\x6C\x61\x79\x20\x62\x74\x6E\x2D\x65\x6E\x61\x62\x6C\x65\x2D\x73\x68\x6F\x72\x74\x63\x75\x74\x73\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x65\x6E\x61\x62\x6C\x65\x73\x68\x6F\x72\x74\x63\x75\x74\x73\x28\x29\x3B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x31\x30\x70\x78\x3B\x62\x6F\x72\x64\x65\x72\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x64\x61\x72\x6B\x62\x6C\x75\x65\x3B\x22\x3E","\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E\x3C\x62\x72\x3E\x3C\x62\x75\x74\x74\x6F\x6E\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x73\x6D\x20\x62\x74\x6E\x2D\x77\x61\x72\x6E\x69\x6E\x67\x20\x62\x74\x6E\x2D\x73\x70\x65\x63\x74\x61\x74\x65\x20\x62\x74\x6E\x2D\x70\x6C\x61\x79\x20\x62\x74\x6E\x2D\x65\x6E\x61\x62\x6C\x65\x2D\x73\x68\x6F\x72\x74\x63\x75\x74\x73\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x77\x69\x64\x74\x68\x3A\x20\x31\x30\x30\x25\x3B\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x31\x30\x70\x78\x3B\x22\x3E","\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x65\x72\x72\x6F\x72","\x66\x61\x64\x65\x4F\x75\x74","\x23\x69\x6D\x61\x67\x65\x62\x69\x67","\x72\x65\x6D\x6F\x76\x65","\x4D\x65\x67\x61\x46\x46\x41","\x54","\x69\x6E\x64\x65\x78\x4F\x66","\x74\x6F\x49\x53\x4F\x53\x74\x72\x69\x6E\x67","\x73\x6C\x69\x63\x65","\x33\x35\x30\x70\x78","\x3C\x62\x3E\x5B\x53\x45\x52\x56\x45\x52\x5D\x3A\x3C\x2F\x62\x3E\x20\x59\x6F\x75\x72\x20\x47\x69\x76\x65\x61\x77\x61\x79\x20\x6C\x69\x63\x65\x6E\x63\x65\x20\x68\x61\x73\x20\x65\x6E\x64\x65\x64\x2E\x20\x54\x68\x61\x6E\x6B\x20\x79\x6F\x75\x20\x66\x6F\x72\x20\x75\x73\x69\x6E\x67\x20\x6F\x75\x72\x20\x6D\x6F\x64\x21","\x77\x61\x72\x6E\x69\x6E\x67","\x47\x69\x76\x65","\x61\x67\x61\x72\x69\x6F\x55\x49\x44","\x50\x72\x6F\x4C\x69\x63\x65\x6E\x63\x65\x55\x73\x65\x72\x73","\x72\x65\x61\x73\x6F\x6E","\x40","\x73\x70\x6C\x69\x74","\x3C\x62\x3E\x5B\x53\x45\x52\x56\x45\x52\x5D\x3A\x3C\x2F\x62\x3E\x20\x20\x59\x6F\x75\x72\x20\x6C\x69\x63\x65\x6E\x63\x65\x20\x69\x73\x20\x73\x74\x6F\x72\x65\x64\x20\x61\x73\x20\x47\x69\x76\x65\x61\x77\x61\x79\x20\x50\x72\x65\x6D\x69\x75\x6D\x20\x75\x6E\x74\x69\x6C\x20","\x2F","\x2E\x20\x54\x68\x61\x6E\x6B\x20\x79\x6F\x75\x20\x66\x6F\x72\x20\x75\x73\x69\x6E\x67\x20\x6F\x75\x72\x20\x6D\x6F\x64\x21","\x3C\x62\x3E\x5B\x53\x45\x52\x56\x45\x52\x5D\x3A\x3C\x2F\x62\x3E\x20\x59\x6F\x75\x72\x20\x6C\x69\x63\x65\x6E\x63\x65\x20\x69\x73\x20\x73\x74\x6F\x72\x65\x64\x20\x61\x73\x20\x50\x72\x65\x6D\x69\x75\x6D\x2E\x20\x54\x68\x61\x6E\x6B\x20\x79\x6F\x75\x20\x66\x6F\x72\x20\x75\x73\x69\x6E\x67\x20\x6F\x75\x72\x20\x6D\x6F\x64\x21","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x41\x6A\x61\x78\x44\x61\x74\x61\x2F\x61\x63\x63\x65\x73\x73\x74\x6F\x6B\x65\x6E\x2E\x68\x74\x6D\x6C","\x6A\x73\x6F\x6E","\x61\x6A\x61\x78","\x61","\x3C\x62\x3E\x5B","\x5D\x3A\x3C\x2F\x62\x3E\x20","\x2C\x20\x3C\x62\x72\x3E","\x3A\x20\x3C\x61\x20\x74\x61\x72\x67\x65\x74\x3D\x22\x5F\x62\x6C\x61\x6E\x6B\x22\x20\x68\x72\x65\x66\x3D\x22\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x75\x73\x65\x72\x2E\x6A\x73\x22\x3E\x3C\x66\x6F\x6E\x74\x20\x63\x6F\x6C\x6F\x72\x3D\x22\x62\x6C\x75\x65\x22\x3E\x3C\x62\x3E\x3C\x75\x3E\x77\x77\x77\x2E\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x3C\x2F\x75\x3E\x3C\x2F\x62\x3E\x3C\x2F\x66\x6F\x6E\x74\x3E\x3C\x2F\x61\x3E\x3C\x62\x72\x3E","\x69\x6E\x6E\x65\x72\x48\x54\x4D\x4C","\x64\x6F\x63\x75\x6D\x65\x6E\x74\x45\x6C\x65\x6D\x65\x6E\x74","\x61\x72\x69\x61\x2D\x70\x72\x65\x73\x73\x65\x64","\x61\x74\x74\x72","\x23\x49\x50\x42\x74\x6E","\x63\x6C\x69\x63\x6B","\x23\x53\x48\x4F\x53\x48\x4F\x42\x74\x6E","\x23\x4D\x41\x49\x4E\x42\x54\x42\x74\x6E","\x23\x58\x50\x42\x74\x6E","\x6C\x69\x76\x65\x2D\x61\x72\x65\x6E\x61\x2D","\x23\x73\x65\x72\x76\x65\x72\x2D\x74\x6F\x6B\x65\x6E","\x2E\x61\x67\x61\x72\x2E\x69\x6F","\x69\x6E\x74\x65\x67\x72\x69\x74\x79","\x70\x61\x67\x65\x20\x32","\x2F\x70\x6C\x61\x79\x3F\x73\x69\x70\x3D","\x26\x3F\x72\x3D","\x26\x3F\x6D\x3D","\x70\x75\x73\x68\x53\x74\x61\x74\x65","\x3F\x73\x69\x70\x3D","\x70\x61\x74\x68\x6E\x61\x6D\x65","\x6C\x6F\x63\x61\x74\x69\x6F\x6E","\x68\x69\x73\x74\x6F\x72\x79","\x68\x72\x65\x66","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x61\x67\x61\x72\x2E\x69\x6F\x2F\x23","\x23\x70\x61\x72\x74\x79\x2D\x74\x6F\x6B\x65\x6E","\x6A\x51\x75\x65\x72\x79","\x67\x65\x74\x54\x69\x6D\x65","\x73\x65\x74\x54\x69\x6D\x65","\x3B\x20\x65\x78\x70\x69\x72\x65\x73\x3D","\x74\x6F\x47\x4D\x54\x53\x74\x72\x69\x6E\x67","\x63\x6F\x6F\x6B\x69\x65","\x61\x67\x61\x72\x69\x6F\x5F\x72\x65\x64\x69\x72\x65\x63\x74\x3D","\x3B\x20\x70\x61\x74\x68\x3D\x2F","\x2A\x5B\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x70\x61\x67\x65\x5F\x70\x6C\x61\x79\x22\x5D","\x23\x73\x65\x72\x76\x65\x72\x2D\x72\x65\x63\x6F\x6E\x6E\x65\x63\x74","\x23\x6C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x2D\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x3A","\x2E","\x65\x76\x65\x72\x79","\x23\x6A\x6F\x69\x6E\x50\x61\x72\x74\x79\x54\x6F\x6B\x65\x6E","\x23\x6A\x6F\x69\x6E\x2D\x70\x61\x72\x74\x79\x2D\x62\x74\x6E","\x66\x61\x20\x66\x61\x2D\x73\x65\x61\x72\x63\x68","\x61\x64\x64\x43\x6C\x61\x73\x73","\x66\x61\x20\x66\x61\x2D\x74\x69\x6D\x65\x73","\x72\x65\x6D\x6F\x76\x65\x43\x6C\x61\x73\x73","\x23\x73\x65\x61\x72\x63\x68\x53\x70\x61\x6E\x3E\x69","\x61\x67\x61\x72\x2E\x69\x6F\x2F\x23","\x23\x72\x65\x67\x69\x6F\x6E\x63\x68\x65\x63\x6B","\x23\x67\x61\x6D\x65\x6D\x6F\x64\x65\x63\x68\x65\x63\x6B","\x23\x42\x61\x63\x6B\x74\x6F\x6D\x65\x6E\x75","\x77\x73\x73\x3A\x2F\x2F","\x61\x67\x61\x72\x2E\x69\x6F\x2F\x3F\x73\x65\x61\x72\x63\x68\x3D\x77\x73\x73\x3A\x2F\x2F","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x61\x67\x61\x72\x2E\x69\x6F\x2F\x3F\x73\x65\x61\x72\x63\x68\x3D\x77\x73\x73\x3A\x2F\x2F","\x73\x65\x6C\x65\x63\x74\x65\x64","\x70\x72\x6F\x70","\x23\x72\x65\x67\x69\x6F\x6E\x20\x6F\x70\x74\x69\x6F\x6E\x5B\x76\x61\x6C\x75\x65\x3D\x22","\x22\x5D","\x23\x67\x61\x6D\x65\x6D\x6F\x64\x65\x20\x6F\x70\x74\x69\x6F\x6E\x5B\x76\x61\x6C\x75\x65\x3D\x22\x3A\x70\x61\x72\x74\x79\x22\x5D","\x3A\x66\x66\x61","\x23\x67\x61\x6D\x65\x6D\x6F\x64\x65\x20\x6F\x70\x74\x69\x6F\x6E\x5B\x76\x61\x6C\x75\x65\x3D\x22\x22\x5D","\x3A\x74\x65\x61\x6D\x73","\x23\x67\x61\x6D\x65\x6D\x6F\x64\x65\x20\x6F\x70\x74\x69\x6F\x6E\x5B\x76\x61\x6C\x75\x65\x3D\x22\x3A\x74\x65\x61\x6D\x73\x22\x5D","\x3A\x65\x78\x70\x65\x72\x69\x6D\x65\x6E\x74\x61\x6C","\x23\x67\x61\x6D\x65\x6D\x6F\x64\x65\x20\x6F\x70\x74\x69\x6F\x6E\x5B\x76\x61\x6C\x75\x65\x3D\x22\x3A\x65\x78\x70\x65\x72\x69\x6D\x65\x6E\x74\x61\x6C\x22\x5D","\x32\x31\x30\x70\x78","\x20\x27\x77\x73\x73\x3A\x2F\x2F","\x27\x2E\x2E\x2E","\x73\x75\x63\x63\x65\x73\x73","\x21\x20\x3C\x2F\x62\x72\x3E\x20\x3C\x62\x75\x74\x74\x6F\x6E\x20\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x70\x6C\x61\x79\x20\x62\x74\x6E\x2D\x70\x72\x69\x6D\x61\x72\x79\x20\x62\x74\x6E\x2D\x6E\x65\x65\x64\x73\x2D\x73\x65\x72\x76\x65\x72\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x68\x69\x64\x65\x53\x65\x61\x72\x63\x68\x48\x75\x64\x28\x29\x3B\x70\x6C\x61\x79\x28\x29\x3B\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x31\x30\x70\x78\x3B\x62\x6F\x72\x64\x65\x72\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x64\x61\x72\x6B\x62\x6C\x75\x65\x3B\x22\x3E","\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E\x3C\x62\x72\x3E\x3C\x62\x75\x74\x74\x6F\x6E\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x73\x6D\x20\x62\x74\x6E\x2D\x77\x61\x72\x6E\x69\x6E\x67\x20\x62\x74\x6E\x2D\x73\x70\x65\x63\x74\x61\x74\x65\x20\x62\x74\x6E\x2D\x73\x70\x65\x63\x74\x61\x74\x65\x2D\x73\x68\x6F\x72\x74\x63\x75\x74\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x68\x69\x64\x65\x53\x65\x61\x72\x63\x68\x48\x75\x64\x28\x29\x3B\x20\x73\x74\x79\x6C\x65\x3D\x22\x77\x69\x64\x74\x68\x3A\x20\x31\x30\x30\x25\x3B\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x31\x30\x70\x78\x3B\x22\x3E","\x3A\x20","\x21","\x20\x27","\x66\x69\x6C\x74\x65\x72","\x6E\x6F\x74\x68\x69\x6E\x67","\x3C\x74\x65\x78\x74\x61\x72\x65\x61\x3E","\x61\x70\x70\x65\x6E\x64","\x62\x6F\x64\x79","\x68\x74\x6D\x6C","\x0A","\x6C\x6F\x67","\x73\x65\x6C\x65\x63\x74","\x63\x6F\x70\x79","\x65\x78\x65\x63\x43\x6F\x6D\x6D\x61\x6E\x64","\x23\x43\x6F\x70\x79\x54\x6B\x50\x77\x4C\x62","\x23\x74\x6F\x70\x35\x2D\x70\x6F\x73","\x3C\x65\x72\x20\x69\x64\x3D\x22\x43\x6F\x70\x79\x54\x6B\x50\x77\x4C\x62\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x3E\x53\x65\x72\x76\x65\x72\x3A\x20","\x3C\x62\x72\x3E\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x3A\x20","\x3C\x62\x72\x3E\x54\x65\x61\x6D\x62\x6F\x61\x72\x64\x3A","\x3C\x62\x72\x3E\x4D\x79\x20\x47\x61\x6D\x65\x20\x4E\x61\x6D\x65\x3A\x20","\x23\x6E\x69\x63\x6B","\x3C\x2F\x65\x72\x3E","\x23\x73\x65\x72\x76\x65\x72\x2D\x6A\x6F\x69\x6E","\x65\x72\x23\x43\x6F\x70\x79\x54\x6B\x50\x77\x4C\x62","\x67\x65\x74\x50\x6C\x61\x79\x65\x72\x53\x74\x61\x74\x65","\x70\x6C\x61\x79\x56\x69\x64\x65\x6F","\x70\x61\x75\x73\x65\x56\x69\x64\x65\x6F","\x23\x73\x65\x72\x76\x65\x72","\x23\x6A\x6F\x69\x6E\x2D\x70\x61\x72\x74\x79\x2D\x62\x74\x6E\x2D\x32","\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64","\x54\x65\x61\x6D\x62\x6F\x61\x72\x64","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x53\x6B\x69\x6E\x43\x68\x61\x6E\x67\x65\x72\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x69\x6D\x61\x67\x65\x3A\x20\x75\x72\x6C\x28","\x29\x3B\x20\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20","\x3B\x20\x62\x6F\x72\x64\x65\x72\x3A\x20\x31\x70\x78\x20\x73\x6F\x6C\x69\x64\x20\x62\x6C\x61\x63\x6B\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x35\x34\x30\x70\x78\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x35\x30\x30\x70\x78\x3B\x20\x22\x3B\x3E","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x53\x6B\x69\x6E\x43\x68\x61\x6E\x67\x65\x72\x68\x75\x64\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x64\x69\x73\x70\x6C\x61\x79\x3A\x62\x6C\x6F\x63\x6B\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x6C\x65\x66\x74\x3A\x20\x31\x30\x70\x78\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x72\x69\x67\x68\x74\x3A\x20\x31\x30\x70\x78\x3B\x22\x3E","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x53\x6B\x69\x6E\x43\x68\x61\x6E\x67\x65\x72\x74\x6F\x6F\x6C\x73\x68\x75\x64\x31\x22\x20\x61\x6C\x69\x67\x6E\x3D\x22\x6D\x69\x64\x64\x6C\x65\x22\x3E\x3C\x68\x35\x20\x63\x6C\x61\x73\x73\x3D\x22\x6D\x61\x69\x6E\x2D\x63\x6F\x6C\x6F\x72\x22\x3E\x3C\x62\x3E","\x3C\x2F\x62\x3E\x3C\x2F\x68\x35\x3E","\x3C\x70\x20\x73\x74\x79\x6C\x65\x3D\x22\x63\x6F\x6C\x6F\x72\x3A\x77\x68\x69\x74\x65\x3B\x20\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x31\x32\x70\x78\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x62\x6F\x74\x74\x6F\x6D\x3A\x20\x2D\x34\x70\x78\x3B\x22\x20\x61\x6C\x69\x67\x6E\x3D\x22\x6D\x69\x64\x64\x6C\x65\x22\x3E","\x3C\x62\x72\x3E\x3C\x62\x72\x3E\x3C\x66\x6F\x6E\x74\x20\x69\x64\x3D\x20\x22\x4C\x65\x61\x64\x62\x6F\x61\x72\x64\x6C\x65\x74\x31\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x63\x6F\x6C\x6F\x72\x3A\x77\x68\x69\x74\x65\x3B\x20\x73\x69\x7A\x65\x3A\x31\x32\x70\x78\x3B\x20\x22\x3E","\x3C\x2F\x70\x3E\x3C\x62\x72\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x49\x6E\x70\x75\x74\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x4E\x69\x63\x6B\x6E\x61\x6D\x65\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x30\x70\x78\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x72\x69\x67\x68\x74\x3A\x20\x32\x70\x78\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x33\x30\x25\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x69\x6E\x6C\x69\x6E\x65\x3B\x20\x22\x20\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x74\x6F\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x22\x20\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x49\x6E\x70\x75\x74\x32\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x4E\x69\x63\x6B\x6E\x61\x6D\x65\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x30\x70\x78\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x72\x69\x67\x68\x74\x3A\x20\x32\x70\x78\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x33\x30\x25\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x69\x6E\x6C\x69\x6E\x65\x3B\x22\x20\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x74\x6F\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x22\x20\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x49\x6E\x70\x75\x74\x33\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x4E\x69\x63\x6B\x6E\x61\x6D\x65\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x30\x70\x78\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x72\x69\x67\x68\x74\x3A\x20\x32\x70\x78\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x33\x30\x25\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x69\x6E\x6C\x69\x6E\x65\x3B\x22\x20\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x74\x6F\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x22\x20\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x49\x6E\x70\x75\x74\x34\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x4E\x69\x63\x6B\x6E\x61\x6D\x65\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x30\x70\x78\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x72\x69\x67\x68\x74\x3A\x20\x32\x70\x78\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x33\x30\x25\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x69\x6E\x6C\x69\x6E\x65\x3B\x22\x20\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x74\x6F\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x22\x20\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x49\x6E\x70\x75\x74\x35\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x4E\x69\x63\x6B\x6E\x61\x6D\x65\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x30\x70\x78\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x72\x69\x67\x68\x74\x3A\x20\x32\x70\x78\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x33\x30\x25\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x69\x6E\x6C\x69\x6E\x65\x3B\x22\x20\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x74\x6F\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x22\x20\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x49\x6E\x70\x75\x74\x36\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x4E\x69\x63\x6B\x6E\x61\x6D\x65\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x30\x70\x78\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x72\x69\x67\x68\x74\x3A\x20\x32\x70\x78\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x33\x30\x25\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x69\x6E\x6C\x69\x6E\x65\x3B\x22\x20\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x74\x6F\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x22\x20\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x49\x6E\x70\x75\x74\x37\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x4E\x69\x63\x6B\x6E\x61\x6D\x65\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x30\x70\x78\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x72\x69\x67\x68\x74\x3A\x20\x32\x70\x78\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x33\x30\x25\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x69\x6E\x6C\x69\x6E\x65\x3B\x22\x20\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x74\x6F\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x22\x20\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x49\x6E\x70\x75\x74\x38\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x4E\x69\x63\x6B\x6E\x61\x6D\x65\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x30\x70\x78\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x72\x69\x67\x68\x74\x3A\x20\x32\x70\x78\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x33\x30\x25\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x69\x6E\x6C\x69\x6E\x65\x3B\x22\x20\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x74\x6F\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x22\x20\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x49\x6E\x70\x75\x74\x39\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x4E\x69\x63\x6B\x6E\x61\x6D\x65\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x30\x70\x78\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x72\x69\x67\x68\x74\x3A\x20\x32\x70\x78\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x33\x30\x25\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x69\x6E\x6C\x69\x6E\x65\x3B\x22\x20\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x74\x6F\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x22\x20\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x49\x6E\x70\x75\x74\x31\x30\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x4E\x69\x63\x6B\x6E\x61\x6D\x65\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x30\x70\x78\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x72\x69\x67\x68\x74\x3A\x20\x32\x70\x78\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x33\x30\x25\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x69\x6E\x6C\x69\x6E\x65\x3B\x22\x20\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x74\x6F\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x22\x20\x3E","\x3C\x2F\x64\x69\x76\x3E\x3C\x70\x20\x73\x74\x79\x6C\x65\x3D\x22\x63\x6F\x6C\x6F\x72\x3A\x77\x68\x69\x74\x65\x3B\x20\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x31\x32\x70\x78\x22\x3B\x22\x20\x61\x6C\x69\x67\x6E\x3D\x22\x6D\x69\x64\x64\x6C\x65\x22\x3E","\x3C\x62\x72\x3E","\x3C\x2F\x75\x3E\x3C\x2F\x70\x3E","\x3C\x2F\x64\x69\x76\x3E\x3C\x2F\x64\x69\x76\x3E","\x23\x6D\x65\x6E\x75\x2D\x66\x6F\x6F\x74\x65\x72","\x36\x30\x25","\x23\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x49\x6E\x70\x75\x74\x31","\x23\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x49\x6E\x70\x75\x74\x32","\x23\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x49\x6E\x70\x75\x74\x33","\x23\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x49\x6E\x70\x75\x74\x34","\x23\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x49\x6E\x70\x75\x74\x35","\x23\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x49\x6E\x70\x75\x74\x36","\x23\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x49\x6E\x70\x75\x74\x37","\x23\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x49\x6E\x70\x75\x74\x38","\x23\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x49\x6E\x70\x75\x74\x39","\x23\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x49\x6E\x70\x75\x74\x31\x30","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x53\x6B\x69\x6E\x42\x61\x63\x6B\x74\x6F\x6D\x65\x6E\x75\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x65\x78\x69\x74\x53\x6B\x69\x6E\x43\x68\x61\x6E\x67\x65\x72\x28\x29\x3B\x20\x72\x65\x74\x75\x72\x6E\x20\x66\x61\x6C\x73\x65\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x64\x61\x6E\x67\x65\x72\x22\x20\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x6C\x65\x66\x74\x3A\x20\x31\x30\x70\x78\x3B\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x22\x20\x74\x69\x74\x6C\x65\x3D\x22\x22\x3E","\x23\x53\x6B\x69\x6E\x43\x68\x61\x6E\x67\x65\x72\x68\x75\x64","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x49\x63\x6F\x6E\x46\x61\x6B\x65\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x69\x6E\x66\x6F\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x4C\x65\x61\x64\x65\x72\x31\x31\x28\x29\x3B\x72\x65\x74\x75\x72\x6E\x20\x66\x61\x6C\x73\x65\x3B\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x77\x70\x65\x78\x70\x6C\x6F\x72\x65\x72\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x49\x63\x6F\x6E\x46\x61\x6B\x65\x32\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x69\x6E\x66\x6F\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x4C\x65\x61\x64\x65\x72\x31\x32\x28\x29\x3B\x72\x65\x74\x75\x72\x6E\x20\x66\x61\x6C\x73\x65\x3B\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x77\x70\x65\x78\x70\x6C\x6F\x72\x65\x72\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x49\x63\x6F\x6E\x46\x61\x6B\x65\x33\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x69\x6E\x66\x6F\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x4C\x65\x61\x64\x65\x72\x31\x33\x28\x29\x3B\x72\x65\x74\x75\x72\x6E\x20\x66\x61\x6C\x73\x65\x3B\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x77\x70\x65\x78\x70\x6C\x6F\x72\x65\x72\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x49\x63\x6F\x6E\x46\x61\x6B\x65\x34\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x69\x6E\x66\x6F\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x4C\x65\x61\x64\x65\x72\x31\x34\x28\x29\x3B\x72\x65\x74\x75\x72\x6E\x20\x66\x61\x6C\x73\x65\x3B\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x77\x70\x65\x78\x70\x6C\x6F\x72\x65\x72\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x49\x63\x6F\x6E\x46\x61\x6B\x65\x35\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x69\x6E\x66\x6F\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x4C\x65\x61\x64\x65\x72\x31\x35\x28\x29\x3B\x72\x65\x74\x75\x72\x6E\x20\x66\x61\x6C\x73\x65\x3B\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x77\x70\x65\x78\x70\x6C\x6F\x72\x65\x72\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x49\x63\x6F\x6E\x46\x61\x6B\x65\x36\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x69\x6E\x66\x6F\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x4C\x65\x61\x64\x65\x72\x31\x36\x28\x29\x3B\x72\x65\x74\x75\x72\x6E\x20\x66\x61\x6C\x73\x65\x3B\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x77\x70\x65\x78\x70\x6C\x6F\x72\x65\x72\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x49\x63\x6F\x6E\x46\x61\x6B\x65\x37\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x69\x6E\x66\x6F\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x4C\x65\x61\x64\x65\x72\x31\x37\x28\x29\x3B\x72\x65\x74\x75\x72\x6E\x20\x66\x61\x6C\x73\x65\x3B\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x77\x70\x65\x78\x70\x6C\x6F\x72\x65\x72\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x49\x63\x6F\x6E\x46\x61\x6B\x65\x38\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x69\x6E\x66\x6F\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x4C\x65\x61\x64\x65\x72\x31\x38\x28\x29\x3B\x72\x65\x74\x75\x72\x6E\x20\x66\x61\x6C\x73\x65\x3B\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x77\x70\x65\x78\x70\x6C\x6F\x72\x65\x72\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x49\x63\x6F\x6E\x46\x61\x6B\x65\x39\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x69\x6E\x66\x6F\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x4C\x65\x61\x64\x65\x72\x31\x39\x28\x29\x3B\x72\x65\x74\x75\x72\x6E\x20\x66\x61\x6C\x73\x65\x3B\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x77\x70\x65\x78\x70\x6C\x6F\x72\x65\x72\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x49\x63\x6F\x6E\x46\x61\x6B\x65\x31\x30\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x69\x6E\x66\x6F\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x4C\x65\x61\x64\x65\x72\x32\x30\x28\x29\x3B\x72\x65\x74\x75\x72\x6E\x20\x66\x61\x6C\x73\x65\x3B\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x77\x70\x65\x78\x70\x6C\x6F\x72\x65\x72\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x54\x65\x61\x6D\x62\x6F\x61\x72\x64\x49\x63\x6F\x6E\x46\x61\x6B\x65\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x69\x6E\x66\x6F\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x54\x65\x61\x6D\x65\x72\x31\x31\x28\x29\x3B\x72\x65\x74\x75\x72\x6E\x20\x66\x61\x6C\x73\x65\x3B\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x77\x70\x65\x78\x70\x6C\x6F\x72\x65\x72\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x23\x54\x65\x61\x6D\x62\x6F\x61\x72\x64\x49\x6E\x70\x75\x74\x31","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x54\x65\x61\x6D\x62\x6F\x61\x72\x64\x49\x63\x6F\x6E\x46\x61\x6B\x65\x32\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x69\x6E\x66\x6F\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x54\x65\x61\x6D\x65\x72\x31\x32\x28\x29\x3B\x72\x65\x74\x75\x72\x6E\x20\x66\x61\x6C\x73\x65\x3B\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x77\x70\x65\x78\x70\x6C\x6F\x72\x65\x72\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x23\x54\x65\x61\x6D\x62\x6F\x61\x72\x64\x49\x6E\x70\x75\x74\x32","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x54\x65\x61\x6D\x62\x6F\x61\x72\x64\x49\x63\x6F\x6E\x46\x61\x6B\x65\x33\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x69\x6E\x66\x6F\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x54\x65\x61\x6D\x65\x72\x31\x33\x28\x29\x3B\x72\x65\x74\x75\x72\x6E\x20\x66\x61\x6C\x73\x65\x3B\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x77\x70\x65\x78\x70\x6C\x6F\x72\x65\x72\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x23\x54\x65\x61\x6D\x62\x6F\x61\x72\x64\x49\x6E\x70\x75\x74\x33","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x54\x65\x61\x6D\x62\x6F\x61\x72\x64\x49\x63\x6F\x6E\x46\x61\x6B\x65\x34\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x69\x6E\x66\x6F\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x54\x65\x61\x6D\x65\x72\x31\x34\x28\x29\x3B\x72\x65\x74\x75\x72\x6E\x20\x66\x61\x6C\x73\x65\x3B\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x77\x70\x65\x78\x70\x6C\x6F\x72\x65\x72\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x23\x54\x65\x61\x6D\x62\x6F\x61\x72\x64\x49\x6E\x70\x75\x74\x34","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x54\x65\x61\x6D\x62\x6F\x61\x72\x64\x49\x63\x6F\x6E\x46\x61\x6B\x65\x35\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x69\x6E\x66\x6F\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x54\x65\x61\x6D\x65\x72\x31\x35\x28\x29\x3B\x72\x65\x74\x75\x72\x6E\x20\x66\x61\x6C\x73\x65\x3B\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x77\x70\x65\x78\x70\x6C\x6F\x72\x65\x72\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x23\x54\x65\x61\x6D\x62\x6F\x61\x72\x64\x49\x6E\x70\x75\x74\x35","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x54\x65\x61\x6D\x62\x6F\x61\x72\x64\x49\x63\x6F\x6E\x46\x61\x6B\x65\x36\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x69\x6E\x66\x6F\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x54\x65\x61\x6D\x65\x72\x31\x36\x28\x29\x3B\x72\x65\x74\x75\x72\x6E\x20\x66\x61\x6C\x73\x65\x3B\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x77\x70\x65\x78\x70\x6C\x6F\x72\x65\x72\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x23\x54\x65\x61\x6D\x62\x6F\x61\x72\x64\x49\x6E\x70\x75\x74\x36","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x54\x65\x61\x6D\x62\x6F\x61\x72\x64\x49\x63\x6F\x6E\x46\x61\x6B\x65\x37\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x69\x6E\x66\x6F\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x54\x65\x61\x6D\x65\x72\x31\x37\x28\x29\x3B\x72\x65\x74\x75\x72\x6E\x20\x66\x61\x6C\x73\x65\x3B\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x77\x70\x65\x78\x70\x6C\x6F\x72\x65\x72\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x23\x54\x65\x61\x6D\x62\x6F\x61\x72\x64\x49\x6E\x70\x75\x74\x37","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x54\x65\x61\x6D\x62\x6F\x61\x72\x64\x49\x63\x6F\x6E\x46\x61\x6B\x65\x38\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x69\x6E\x66\x6F\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x54\x65\x61\x6D\x65\x72\x31\x38\x28\x29\x3B\x72\x65\x74\x75\x72\x6E\x20\x66\x61\x6C\x73\x65\x3B\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x77\x70\x65\x78\x70\x6C\x6F\x72\x65\x72\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x23\x54\x65\x61\x6D\x62\x6F\x61\x72\x64\x49\x6E\x70\x75\x74\x38","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x54\x65\x61\x6D\x62\x6F\x61\x72\x64\x49\x63\x6F\x6E\x46\x61\x6B\x65\x39\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x69\x6E\x66\x6F\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x54\x65\x61\x6D\x65\x72\x31\x39\x28\x29\x3B\x72\x65\x74\x75\x72\x6E\x20\x66\x61\x6C\x73\x65\x3B\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x77\x70\x65\x78\x70\x6C\x6F\x72\x65\x72\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x23\x54\x65\x61\x6D\x62\x6F\x61\x72\x64\x49\x6E\x70\x75\x74\x39","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x54\x65\x61\x6D\x62\x6F\x61\x72\x64\x49\x63\x6F\x6E\x46\x61\x6B\x65\x31\x30\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x69\x6E\x66\x6F\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x54\x65\x61\x6D\x65\x72\x32\x30\x28\x29\x3B\x72\x65\x74\x75\x72\x6E\x20\x66\x61\x6C\x73\x65\x3B\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x77\x70\x65\x78\x70\x6C\x6F\x72\x65\x72\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x23\x54\x65\x61\x6D\x62\x6F\x61\x72\x64\x49\x6E\x70\x75\x74\x31\x30","\x74\x65\x61\x6D\x50\x6C\x61\x79\x65\x72\x73","\x6E\x69\x63\x6B","\x23\x54\x65\x61\x6D\x62\x6F\x61\x72\x64\x49\x6E\x70\x75\x74","\x6C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64","\x23\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x49\x6E\x70\x75\x74","\x23\x6D\x61\x69\x6E\x2D\x6D\x65\x6E\x75","\x23\x73\x6B\x69\x6E\x73\x2D\x70\x61\x6E\x65\x6C","\x23\x71\x75\x69\x63\x6B\x2D\x6D\x65\x6E\x75","\x23\x65\x78\x70\x2D\x62\x61\x72","\x23\x53\x6B\x69\x6E\x43\x68\x61\x6E\x67\x65\x72","\x73\x6B\x69\x6E\x55\x52\x4C\x42\x65\x66\x6F\x72\x65","\x73\x6B\x69\x6E\x55\x52\x4C","\x6E\x69\x63\x6B\x42\x65\x66\x6F\x72\x65","\x70\x6C\x61\x79\x65\x72\x43\x6F\x6C\x6F\x72\x42\x65\x66\x6F\x72\x65","\x70\x6C\x61\x79\x65\x72\x43\x6F\x6C\x6F\x72","\x70\x6C\x61\x79\x42\x65\x66\x6F\x72\x65","\x70\x6C\x61\x79","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x62\x61\x6E\x6E\x65\x72\x73\x2F\x69\x63\x6F\x6E\x66\x61\x6B\x65\x31\x2E\x70\x6E\x67","\x73\x65\x6E\x64\x53\x65\x72\x76\x65\x72\x4A\x6F\x69\x6E","\x73\x65\x6E\x64\x50\x6C\x61\x79\x65\x72\x55\x70\x64\x61\x74\x65","\x73\x65\x6E\x64\x50\x6C\x61\x79\x65\x72\x4A\x6F\x69\x6E","\x23\x74\x65\x6D\x70\x43\x6F\x70\x79","\x3C\x6C\x61\x62\x65\x6C\x3E\x3C\x69\x6E\x70\x75\x74\x20\x74\x79\x70\x65\x3D\x22\x63\x68\x65\x63\x6B\x62\x6F\x78\x22\x20\x69\x64\x3D\x22\x65\x78\x70\x6F\x72\x74\x2D\x4C\x65\x67\x65\x6E\x64\x53\x65\x74\x74\x69\x6E\x67\x73\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x6A\x73\x2D\x73\x77\x69\x74\x63\x68\x22\x20\x64\x61\x74\x61\x2D\x73\x77\x69\x74\x63\x68\x65\x72\x79\x3D\x22\x74\x72\x75\x65\x22\x20\x63\x68\x65\x63\x6B\x65\x64\x20\x73\x74\x79\x6C\x65\x3D\x22\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x3E\x20\x41\x50\x49\x3C\x2F\x6C\x61\x62\x65\x6C\x3E","\x23\x65\x78\x70\x6F\x72\x74\x2D\x73\x65\x74\x74\x69\x6E\x67\x73","\x23\x65\x78\x70\x6F\x72\x74\x2D\x4C\x65\x67\x65\x6E\x64\x53\x65\x74\x74\x69\x6E\x67\x73","\x71\x75\x65\x72\x79\x53\x65\x6C\x65\x63\x74\x6F\x72","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72","\x6E\x65\x78\x74","\x69\x6E\x70\x75\x74\x23\x65\x78\x70\x6F\x72\x74\x2D\x6F\x67\x61\x72\x69\x6F\x54\x68\x65\x6D\x65\x53\x65\x74\x74\x69\x6E\x67\x73\x2E\x6A\x73\x2D\x73\x77\x69\x74\x63\x68","\x73\x6D\x61\x6C\x6C","\x72\x67\x62\x28\x32\x35\x30\x2C\x20\x32\x35\x30\x2C\x20\x32\x35\x30\x29","\x3C\x6C\x61\x62\x65\x6C\x3E\x3C\x69\x6E\x70\x75\x74\x20\x74\x79\x70\x65\x3D\x22\x63\x68\x65\x63\x6B\x62\x6F\x78\x22\x20\x69\x64\x3D\x22\x69\x6D\x70\x6F\x72\x74\x2D\x4C\x65\x67\x65\x6E\x64\x53\x65\x74\x74\x69\x6E\x67\x73\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x6A\x73\x2D\x73\x77\x69\x74\x63\x68\x22\x20\x64\x61\x74\x61\x2D\x73\x77\x69\x74\x63\x68\x65\x72\x79\x3D\x22\x74\x72\x75\x65\x22\x20\x63\x68\x65\x63\x6B\x65\x64\x20\x73\x74\x79\x6C\x65\x3D\x22\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x3E\x20\x41\x50\x49\x3C\x2F\x6C\x61\x62\x65\x6C\x3E","\x23\x69\x6D\x70\x6F\x72\x74\x2D\x73\x65\x74\x74\x69\x6E\x67\x73","\x23\x69\x6D\x70\x6F\x72\x74\x2D\x4C\x65\x67\x65\x6E\x64\x53\x65\x74\x74\x69\x6E\x67\x73","\x76\x61\x6C\x75\x65","\x65\x78\x70\x6F\x72\x74\x2D\x73\x65\x74\x74\x69\x6E\x67\x73","\x67\x65\x74\x45\x6C\x65\x6D\x65\x6E\x74\x42\x79\x49\x64","\x23\x65\x78\x70\x6F\x72\x74\x2D\x73\x65\x74\x74\x69\x6E\x67\x73\x2D\x62\x74\x6E","\x69\x6D\x70\x6F\x72\x74\x2D\x73\x65\x74\x74\x69\x6E\x67\x73\x2D\x62\x74\x6E\x32","\x23\x69\x6D\x70\x6F\x72\x74\x2D\x73\x65\x74\x74\x69\x6E\x67\x73\x2D\x62\x74\x6E","\x69\x6E\x73\x65\x72\x74\x41\x66\x74\x65\x72","\x63\x6C\x6F\x6E\x65","\x23\x69\x6D\x70\x6F\x72\x74\x2D\x73\x65\x74\x74\x69\x6E\x67\x73\x2D\x62\x74\x6E\x32","\x69\x73\x43\x68\x65\x63\x6B\x65\x64","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x6C\x65\x67\x65\x6E\x64\x53\x65\x74\x74\x69\x6E\x67\x73","\x70\x72\x65\x76\x69\x6F\x75\x73\x4D\x6F\x64\x65","\x73\x68\x6F\x77\x54\x6F\x6B\x65\x6E","\x69\x6E\x69\x74\x69\x61\x6C\x4D\x75\x73\x69\x63\x55\x72\x6C","\x6D\x75\x73\x69\x63\x55\x72\x6C","\x6E\x6F\x74\x65\x31","\x6E\x6F\x74\x65\x32","\x6E\x6F\x74\x65\x33","\x6E\x6F\x74\x65\x34","\x6E\x6F\x74\x65\x35","\x6E\x6F\x74\x65\x36","\x6E\x6F\x74\x65\x37","\x6D\x69\x6E\x69\x6D\x61\x70\x62\x63\x6B\x69\x6D\x67","\x74\x65\x61\x6D\x62\x69\x6D\x67","\x63\x61\x6E\x76\x61\x73\x62\x69\x6D\x67","\x6C\x65\x61\x64\x62\x69\x6D\x67","\x70\x69\x63\x31\x75\x72\x6C\x69\x6D\x67","\x70\x69\x63\x32\x75\x72\x6C\x69\x6D\x67","\x70\x69\x63\x33\x75\x72\x6C\x69\x6D\x67","\x70\x69\x63\x34\x75\x72\x6C\x69\x6D\x67","\x70\x69\x63\x35\x75\x72\x6C\x69\x6D\x67","\x70\x69\x63\x36\x75\x72\x6C\x69\x6D\x67","\x79\x74\x31\x75\x72\x6C\x69\x6D\x67","\x79\x74\x32\x75\x72\x6C\x69\x6D\x67","\x79\x74\x33\x75\x72\x6C\x69\x6D\x67","\x79\x74\x34\x75\x72\x6C\x69\x6D\x67","\x79\x74\x35\x75\x72\x6C\x69\x6D\x67","\x79\x74\x36\x75\x72\x6C\x69\x6D\x67","\x70\x69\x63\x31\x64\x61\x74\x61\x69\x6D\x67","\x70\x69\x63\x32\x64\x61\x74\x61\x69\x6D\x67","\x70\x69\x63\x33\x64\x61\x74\x61\x69\x6D\x67","\x70\x69\x63\x34\x64\x61\x74\x61\x69\x6D\x67","\x70\x69\x63\x35\x64\x61\x74\x61\x69\x6D\x67","\x70\x69\x63\x36\x64\x61\x74\x61\x69\x6D\x67","\x79\x74\x31\x64\x61\x74\x61\x69\x6D\x67","\x79\x74\x32\x64\x61\x74\x61\x69\x6D\x67","\x79\x74\x33\x64\x61\x74\x61\x69\x6D\x67","\x79\x74\x34\x64\x61\x74\x61\x69\x6D\x67","\x79\x74\x35\x64\x61\x74\x61\x69\x6D\x67","\x79\x74\x36\x64\x61\x74\x61\x69\x6D\x67","\x64\x69\x73\x63\x77\x65\x62\x68\x6F\x6F\x6B\x31","\x64\x69\x73\x63\x77\x65\x62\x68\x6F\x6F\x6B\x32","\x55\x73\x65\x72\x73\x63\x72\x69\x70\x74\x31","\x55\x73\x65\x72\x73\x63\x72\x69\x70\x74\x32","\x55\x73\x65\x72\x73\x63\x72\x69\x70\x74\x33","\x55\x73\x65\x72\x73\x63\x72\x69\x70\x74\x34","\x55\x73\x65\x72\x73\x63\x72\x69\x70\x74\x35","\x55\x73\x65\x72\x73\x63\x72\x69\x70\x74\x74\x65\x78\x74\x75\x72\x65\x31","\x55\x73\x65\x72\x73\x63\x72\x69\x70\x74\x74\x65\x78\x74\x75\x72\x65\x32","\x55\x73\x65\x72\x73\x63\x72\x69\x70\x74\x74\x65\x78\x74\x75\x72\x65\x33","\x55\x73\x65\x72\x73\x63\x72\x69\x70\x74\x74\x65\x78\x74\x75\x72\x65\x34","\x55\x73\x65\x72\x73\x63\x72\x69\x70\x74\x74\x65\x78\x74\x75\x72\x65\x35","\x69\x6D\x70\x6F\x72\x74\x2D\x73\x65\x74\x74\x69\x6E\x67\x73","\x23\x6D\x75\x73\x69\x63\x55\x72\x6C","\x73\x72\x63","\x23\x6D\x75\x73\x69\x63\x46\x72\x61\x6D\x65","\x5B\x75\x72\x6C\x5D","\x2E\x6D\x65\x73\x73\x61\x67\x65\x2D\x74\x65\x78\x74","\x2E\x74\x6F\x61\x73\x74\x2E\x74\x6F\x61\x73\x74\x2D\x73\x75\x63\x63\x65\x73\x73","\x70\x6F\x70","\x5B\x2F\x75\x72\x6C\x5D","\x68\x74\x74\x70\x73\x3A\x2F\x2F","\x48\x54\x54\x50\x3A\x2F\x2F","\x48\x54\x54\x50\x53\x3A\x2F\x2F","\x32\x35\x30\x70\x78","\x20","\x3A\x20\x3C\x61\x20\x69\x64\x3D\x22\x76\x69\x73\x69\x74\x75\x72\x6C\x22\x20\x68\x72\x65\x66\x3D","\x20\x74\x61\x72\x67\x65\x74\x3D\x22\x5F\x62\x6C\x61\x6E\x6B\x22\x3E\x3C\x66\x6F\x6E\x74\x20\x63\x6F\x6C\x6F\x72\x3D\x22\x62\x6C\x75\x65\x22\x3E","\x3C\x2F\x66\x6F\x6E\x74\x3E\x3C\x2F\x61\x3E\x3C\x2F\x62\x72\x3E\x20\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x61\x63\x63\x65\x70\x74\x55\x52\x4C\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x62\x6C\x6F\x63\x6B\x20\x62\x74\x6E\x2D\x69\x6E\x66\x6F\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x31\x30\x70\x78\x3B\x62\x6F\x72\x64\x65\x72\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x64\x61\x72\x6B\x62\x6C\x75\x65\x3B\x22\x3E","\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E\x3C\x62\x72\x3E\x3C\x62\x75\x74\x74\x6F\x6E\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x73\x6D\x20\x62\x74\x6E\x2D\x77\x61\x72\x6E\x69\x6E\x67\x20\x62\x74\x6E\x2D\x73\x70\x65\x63\x74\x61\x74\x65\x20\x62\x74\x6E\x2D\x6E\x6F\x64\x6F\x2D\x68\x69\x64\x65\x61\x6C\x6C\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x77\x69\x64\x74\x68\x3A\x20\x31\x30\x30\x25\x3B\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x2D\x31\x30\x70\x78\x3B\x22\x3E","\x5F\x62\x6C\x61\x6E\x6B","\x23\x61\x63\x63\x65\x70\x74\x55\x52\x4C","\x5B\x74\x61\x67\x5D","\x74\x61\x67","\x5B\x2F\x74\x61\x67\x5D","\x3A\x20\x3C\x69\x20\x69\x64\x3D\x22\x76\x69\x73\x69\x74\x75\x72\x6C\x22\x20\x68\x72\x65\x66\x3D","\x3C\x2F\x66\x6F\x6E\x74\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x72\x3E\x20\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x61\x63\x63\x65\x70\x74\x55\x52\x4C\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x62\x6C\x6F\x63\x6B\x20\x62\x74\x6E\x2D\x69\x6E\x66\x6F\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x31\x30\x70\x78\x3B\x62\x6F\x72\x64\x65\x72\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x64\x61\x72\x6B\x62\x6C\x75\x65\x3B\x22\x3E","\x23\x63\x6C\x61\x6E\x74\x61\x67","\x23\x66\x66\x36\x33\x34\x37","\x5B\x79\x75\x74\x5D","\x79\x75\x74","\x5B\x2F\x79\x75\x74\x5D","\x3C\x2F\x66\x6F\x6E\x74\x3E\x3C\x2F\x61\x3E\x3C\x2F\x62\x72\x3E\x20\x3C\x69\x66\x72\x61\x6D\x65\x20\x74\x79\x70\x65\x3D\x22\x74\x65\x78\x74\x2F\x68\x74\x6D\x6C\x22\x20\x77\x69\x64\x74\x68\x3D\x22\x31\x30\x30\x25\x22\x20\x68\x65\x69\x67\x68\x74\x3D\x22\x61\x75\x74\x6F\x22\x20\x73\x72\x63\x3D\x22\x68\x74\x74\x70\x73\x3A\x2F\x2F\x77\x77\x77\x2E\x79\x6F\x75\x74\x75\x62\x65\x2E\x63\x6F\x6D\x2F\x65\x6D\x62\x65\x64\x2F","\x3F\x61\x75\x74\x6F\x70\x6C\x61\x79\x3D\x31\x26\x61\x6D\x70\x3B\x76\x71\x3D\x74\x69\x6E\x79\x22\x20\x66\x72\x61\x6D\x65\x62\x6F\x72\x64\x65\x72\x3D\x22\x30\x22\x3E\x3C\x2F\x69\x66\x72\x61\x6D\x65\x3E\x3C\x2F\x62\x72\x3E\x20\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x61\x63\x63\x65\x70\x74\x59\x6F\x75\x74\x75\x62\x65\x45\x6D\x62\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x62\x6C\x6F\x63\x6B\x20\x62\x74\x6E\x2D\x69\x6E\x66\x6F\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x31\x30\x70\x78\x3B\x62\x6F\x72\x64\x65\x72\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x64\x61\x72\x6B\x62\x6C\x75\x65\x3B\x22\x3E","\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E\x3C\x62\x72\x3E\x3C\x62\x75\x74\x74\x6F\x6E\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x73\x6D\x20\x62\x74\x6E\x2D\x77\x61\x72\x6E\x69\x6E\x67\x20\x62\x74\x6E\x2D\x73\x70\x65\x63\x74\x61\x74\x65\x20\x62\x74\x6E\x2D\x6E\x6F\x64\x6F\x2D\x68\x69\x64\x65\x61\x6C\x6C\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x2D\x31\x30\x70\x78\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x30\x30\x25\x22\x3E","\x23\x61\x63\x63\x65\x70\x74\x59\x6F\x75\x74\x75\x62\x65\x45\x6D\x62","\x5B\x73\x6B\x79\x70\x65\x5D","\x73\x6B\x79\x70\x65","\x5B\x2F\x73\x6B\x79\x70\x65\x5D","\x6A\x6F\x69\x6E\x2E\x73\x6B\x79\x70\x65\x2E\x63\x6F\x6D\x2F","\x3C\x69\x6D\x67\x20\x73\x72\x63\x3D\x22\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x62\x61\x6E\x6E\x65\x72\x73\x2F\x69\x63\x6F\x6E\x73\x6B\x79\x70\x65\x2E\x70\x6E\x67\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x66\x6C\x6F\x61\x74\x3A\x6C\x65\x66\x74\x3B\x77\x69\x64\x74\x68\x3A\x31\x30\x30\x70\x78\x3B\x68\x65\x69\x67\x68\x74\x3A\x31\x30\x30\x70\x78\x3B\x22\x3E","\x5B\x64\x69\x73\x63\x6F\x72\x64\x5D","\x64\x69\x73\x63\x6F\x72\x64","\x5B\x2F\x64\x69\x73\x63\x6F\x72\x64\x5D","\x64\x69\x73\x63\x6F\x72\x64\x61\x70\x70\x2E\x63\x6F\x6D\x2F\x69\x6E\x76\x69\x74\x65","\x64\x69\x73\x63\x6F\x72\x64\x2E\x67\x67","\x64\x69\x73\x63\x6F\x72\x64\x2E\x63\x6F\x6D","\x3C\x69\x6D\x67\x20\x73\x72\x63\x3D\x22\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x62\x61\x6E\x6E\x65\x72\x73\x2F\x69\x63\x6F\x6E\x64\x69\x73\x63\x6F\x72\x64\x2E\x70\x6E\x67\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x66\x6C\x6F\x61\x74\x3A\x6C\x65\x66\x74\x3B\x77\x69\x64\x74\x68\x3A\x31\x30\x30\x70\x78\x3B\x68\x65\x69\x67\x68\x74\x3A\x31\x30\x30\x70\x78\x3B\x22\x3E","\x4C\x65\x67\x65\x6E\x64\x2E\x4D\x6F\x64","\x63\x6F\x6D","\x64\x6F","\x54\x65\x61\x6D\x35","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x69\x6D\x61\x67\x65","\x75\x72\x6C\x28\x22\x20\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x62\x61\x6E\x6E\x65\x72\x73\x2F\x69\x63\x6F\x67\x65\x6E\x65\x72\x61\x6C\x2E\x67\x69\x66\x20\x22\x29","\x23\x74\x6F\x70\x35\x2D\x68\x75\x64","\x75\x72\x6C\x28\x22\x20\x22\x29","\x48\x65\x6C\x6C\x6F","\x64\x69\x73\x70\x6C\x61\x79","\x23\x6D\x65\x73\x73\x61\x67\x65\x2D\x62\x6F\x78","\x6E\x6F\x6E\x65","\x48\x65\x6C\x6C\x6F\x20\x54\x65\x61\x6D","\x23\x68\x65\x6C\x6C\x6F\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x48\x69\x64\x65\x41\x6C\x6C","\x3C\x2F\x62\x72\x3E\x20\x3C\x62\x75\x74\x74\x6F\x6E\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x73\x6D\x20\x62\x74\x6E\x2D\x70\x72\x69\x6D\x61\x72\x79\x20\x62\x74\x6E\x2D\x70\x6C\x61\x79\x20\x62\x74\x6E\x2D\x64\x6F\x2D\x68\x69\x64\x65\x61\x6C\x6C\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x31\x30\x70\x78\x3B\x62\x6F\x72\x64\x65\x72\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x64\x61\x72\x6B\x62\x6C\x75\x65\x3B\x22\x3E","\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E\x3C\x62\x72\x3E\x3C\x62\x75\x74\x74\x6F\x6E\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x73\x6D\x20\x62\x74\x6E\x2D\x77\x61\x72\x6E\x69\x6E\x67\x20\x62\x74\x6E\x2D\x73\x70\x65\x63\x74\x61\x74\x65\x20\x62\x74\x6E\x2D\x6E\x6F\x64\x6F\x2D\x68\x69\x64\x65\x61\x6C\x6C\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x77\x69\x64\x74\x68\x3A\x20\x31\x30\x30\x25\x3B\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x31\x30\x70\x78\x3B\x22\x3E","\x23\x48\x69\x64\x65\x41\x6C\x6C\x42\x74\x68\x6E","\x2E\x62\x74\x6E\x2E\x62\x74\x6E\x2D\x73\x6D\x2E\x62\x74\x6E\x2D\x70\x72\x69\x6D\x61\x72\x79\x2E\x62\x74\x6E\x2D\x70\x6C\x61\x79\x2E\x62\x74\x6E\x2D\x64\x6F\x2D\x68\x69\x64\x65\x61\x6C\x6C","\x4E\x61\x6D\x65\x50\x65\x72\x6D","\x20\x3C\x2F\x62\x72\x3E\x20\x3C\x62\x75\x74\x74\x6F\x6E\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x73\x6D\x20\x62\x74\x6E\x2D\x70\x72\x69\x6D\x61\x72\x79\x20\x62\x74\x6E\x2D\x70\x6C\x61\x79\x20\x62\x74\x6E\x2D\x64\x6F\x2D\x4E\x61\x6D\x65\x50\x65\x72\x6D\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x31\x30\x70\x78\x3B\x62\x6F\x72\x64\x65\x72\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x64\x61\x72\x6B\x62\x6C\x75\x65\x3B\x22\x3E","\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E\x3C\x62\x72\x3E\x3C\x62\x75\x74\x74\x6F\x6E\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x73\x6D\x20\x62\x74\x6E\x2D\x77\x61\x72\x6E\x69\x6E\x67\x20\x62\x74\x6E\x2D\x73\x70\x65\x63\x74\x61\x74\x65\x20\x62\x74\x6E\x2D\x6E\x6F\x64\x6F\x2D\x4E\x61\x6D\x65\x50\x65\x72\x6D\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x77\x69\x64\x74\x68\x3A\x20\x31\x30\x30\x25\x3B\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x31\x30\x70\x78\x3B\x22\x3E","\x2E\x62\x74\x6E\x2E\x62\x74\x6E\x2D\x73\x6D\x2E\x62\x74\x6E\x2D\x70\x72\x69\x6D\x61\x72\x79\x2E\x62\x74\x6E\x2D\x70\x6C\x61\x79\x2E\x62\x74\x6E\x2D\x64\x6F\x2D\x4E\x61\x6D\x65\x50\x65\x72\x6D","\x64\x54\x72\x6F\x6C\x6C\x32","\x3C\x2F\x62\x72\x3E\x20\x3C\x62\x75\x74\x74\x6F\x6E\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x73\x6D\x20\x62\x74\x6E\x2D\x70\x72\x69\x6D\x61\x72\x79\x20\x62\x74\x6E\x2D\x70\x6C\x61\x79\x20\x62\x74\x6E\x2D\x64\x6F\x2D\x74\x72\x6F\x6C\x6C\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x31\x30\x70\x78\x3B\x62\x6F\x72\x64\x65\x72\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x64\x61\x72\x6B\x62\x6C\x75\x65\x3B\x22\x3E","\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E\x3C\x62\x72\x3E\x3C\x62\x75\x74\x74\x6F\x6E\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x73\x6D\x20\x62\x74\x6E\x2D\x77\x61\x72\x6E\x69\x6E\x67\x20\x62\x74\x6E\x2D\x73\x70\x65\x63\x74\x61\x74\x65\x20\x62\x74\x6E\x2D\x6E\x6F\x64\x6F\x2D\x74\x72\x6F\x6C\x6C\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x77\x69\x64\x74\x68\x3A\x20\x31\x30\x30\x25\x3B\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x31\x30\x70\x78\x3B\x22\x3E","\x2E\x62\x74\x6E\x2E\x62\x74\x6E\x2D\x73\x6D\x2E\x62\x74\x6E\x2D\x70\x72\x69\x6D\x61\x72\x79\x2E\x62\x74\x6E\x2D\x70\x6C\x61\x79\x2E\x62\x74\x6E\x2D\x64\x6F\x2D\x74\x72\x6F\x6C\x6C","\x59\x6F\x75\x74\x75\x62\x65","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x73\x6D\x20\x62\x74\x6E\x2D\x70\x72\x69\x6D\x61\x72\x79\x20\x62\x74\x6E\x2D\x70\x6C\x61\x79\x20\x62\x74\x6E\x2D\x70\x6C\x61\x79\x2D\x79\x6F\x75\x74\x75\x62\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x31\x30\x70\x78\x3B\x62\x6F\x72\x64\x65\x72\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x64\x61\x72\x6B\x62\x6C\x75\x65\x3B\x22\x3E","\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E\x3C\x62\x72\x3E\x3C\x62\x75\x74\x74\x6F\x6E\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x73\x6D\x20\x62\x74\x6E\x2D\x77\x61\x72\x6E\x69\x6E\x67\x20\x62\x74\x6E\x2D\x73\x70\x65\x63\x74\x61\x74\x65\x20\x62\x74\x6E\x2D\x6E\x6F\x70\x6C\x61\x79\x2D\x79\x6F\x75\x74\x75\x62\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x77\x69\x64\x74\x68\x3A\x20\x31\x30\x30\x25\x3B\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x31\x30\x70\x78\x3B\x22\x3E","\x23\x70\x6C\x61\x79\x65\x72\x42\x74\x6E","\x66\x6F\x63\x75\x73\x6F\x75\x74","\x2E\x62\x74\x6E\x2E\x62\x74\x6E\x2D\x73\x6D\x2E\x62\x74\x6E\x2D\x70\x72\x69\x6D\x61\x72\x79\x2E\x62\x74\x6E\x2D\x70\x6C\x61\x79\x2E\x62\x74\x6E\x2D\x70\x6C\x61\x79\x2D\x79\x6F\x75\x74\x75\x62\x65","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x61\x67\x61\x72\x2E\x69\x6F\x2F\x73\x69\x70\x3D\x31\x35\x31\x2E\x38\x30\x2E\x39\x31\x2E\x37\x33\x3A\x31\x35\x31\x31","\x53\x74\x65\x70\x31","\u2104","\x53\x74\x65\x70\x32","\x45\x55\x2D\x4C\x6F\x6E\x64\x6F\x6E","\x52\x55\x2D\x52\x75\x73\x73\x69\x61","\x5B\x44\x6F\x73\x41\x74\x74\x61\x63\x6B\x5D","\x44\x6F\x73\x41\x74\x74\x61\x63\x6B","\x5B\x2F\x44\x6F\x73\x41\x74\x74\x61\x63\x6B\x5D","\x2C","\x74\x61\x72\x67\x65\x74\x69\x6E\x67\x4C\x65\x61\x64\x63\x6C\x69\x65\x6E\x74\x58","\x74\x61\x72\x67\x65\x74\x69\x6E\x67\x4C\x65\x61\x64\x63\x6C\x69\x65\x6E\x74\x59","\x74\x61\x72\x67\x65\x74\x69\x6E\x67\x4C\x65\x61\x64\x58","\x6D\x61\x70\x4F\x66\x66\x73\x65\x74\x58","\x74\x61\x72\x67\x65\x74\x69\x6E\x67\x4C\x65\x61\x64\x59","\x6D\x61\x70\x4F\x66\x66\x73\x65\x74\x59","\x64\x72\x61\x77\x43\x6F\x6D\x6D\x61\x6E\x64\x65\x72\x32","\x3C\x62\x3E","\x3A\x3C\x2F\x62\x3E\x20\x41\x74\x74\x61\x63\x6B\x20","\x63\x61\x6C\x63\x75\x6C\x61\x74\x65\x4D\x61\x70\x53\x65\x63\x74\x6F\x72","\x5B\x44\x6F\x73\x46\x69\x67\x68\x74\x5D","\x44\x6F\x73\x46\x69\x67\x68\x74","\x5B\x2F\x44\x6F\x73\x46\x69\x67\x68\x74\x5D","\x3A\x3C\x2F\x62\x3E\x20\x46\x69\x67\x68\x74\x20","\x5B\x44\x6F\x73\x52\x75\x6E\x5D","\x44\x6F\x73\x52\x75\x6E","\x5B\x2F\x44\x6F\x73\x52\x75\x6E\x5D","\x3A\x3C\x2F\x62\x3E\x20\x52\x75\x6E\x20\x66\x72\x6F\x6D\x20","\x31","\x46\x61\x6C\x73\x65","\x5B\x73\x72\x76\x5D","\x5B\x2F\x73\x72\x76\x5D","\x23","\x3C\x64\x69\x76\x3E\x3C\x69\x6D\x67\x20\x73\x72\x63\x3D\x22\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x62\x61\x6E\x6E\x65\x72\x73\x2F\x69\x63\x6F\x6E\x61\x67\x61\x72\x69\x6F\x2E\x70\x6E\x67\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x66\x6C\x6F\x61\x74\x3A\x6C\x65\x66\x74\x3B\x77\x69\x64\x74\x68\x3A\x31\x30\x30\x70\x78\x3B\x68\x65\x69\x67\x68\x74\x3A\x31\x30\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x6D\x67\x3E","\x3C\x2F\x66\x6F\x6E\x74\x3E\x3C\x2F\x61\x3E\x3C\x2F\x62\x72\x3E\x53\x65\x72\x76\x65\x72\x20\x28\x50\x61\x72\x74\x79\x20\x6D\x6F\x64\x65\x29\x3A\x20","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x61\x63\x63\x65\x70\x74\x53\x65\x72\x76\x65\x72\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x62\x6C\x6F\x63\x6B\x20\x62\x74\x6E\x2D\x69\x6E\x66\x6F\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x31\x30\x70\x78\x3B\x62\x6F\x72\x64\x65\x72\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x64\x61\x72\x6B\x62\x6C\x75\x65\x3B\x22\x3E","\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E\x3C\x2F\x64\x69\x76\x3E","\x4E\x6F\x20\x50\x61\x73\x73\x77\x6F\x72\x64\x20\x4C\x6F\x61\x64\x65\x64","\x6D\x6F\x64\x65","\x55\x6E\x6B\x6E\x6F\x77\x6E","\x3C\x2F\x66\x6F\x6E\x74\x3E\x3C\x2F\x61\x3E\x3C\x2F\x62\x72\x3E\x53\x65\x72\x76\x65\x72\x3A\x20","\x3C\x2F\x62\x72\x3E\x4D\x6F\x64\x65\x3A\x20","\x3C\x2F\x62\x72\x3E\x20\x52\x65\x67\x69\x6F\x6E\x3A\x20","\x3C\x2F\x62\x72\x3E\x20\x50\x61\x73\x73\x77\x6F\x72\x64\x3A\x20","\x3C\x2F\x62\x72\x3E\x20\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x61\x63\x63\x65\x70\x74\x53\x65\x72\x76\x65\x72\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x62\x6C\x6F\x63\x6B\x20\x62\x74\x6E\x2D\x69\x6E\x66\x6F\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x31\x30\x70\x78\x3B\x62\x6F\x72\x64\x65\x72\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x64\x61\x72\x6B\x62\x6C\x75\x65\x3B\x22\x3E","\x73\x65\x74\x55\x6E\x69\x76\x65\x72\x73\x61\x6C\x43\x68\x61\x74","\x61\x75\x74\x68\x65\x6E\x74\x69\x63\x41\x67\x61\x72\x74\x6F\x6F\x6C\x49\x64","\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x27\x66\x61\x20\x66\x61\x2D\x75\x6E\x69\x76\x65\x72\x73\x61\x6C\x2D\x61\x63\x63\x65\x73\x73\x27\x20\x61\x72\x69\x61\x2D\x68\x69\x64\x64\x65\x6E\x3D\x27\x74\x72\x75\x65\x27\x3E\x3C\x2F\x69\x3E","\x3A\x76\x69\x73\x69\x62\x6C\x65","\x69\x73","\x23\x63\x68\x61\x74\x2D\x62\x6F\x78","\x52\x65\x63\x65\x69\x76\x65\x64\x20\x61\x20\x63\x6F\x6D\x6D\x61\x6E\x64\x20\x77\x69\x74\x68\x20\x61\x6E\x20\x75\x6E\x6B\x6E\x6F\x77\x6E\x20\x6E\x61\x6D\x65","\x52\x65\x63\x65\x69\x76\x65\x64\x20\x61\x20\x63\x6F\x6D\x6D\x61\x6E\x64\x20\x77\x69\x74\x68\x20\x61\x6E\x20\x75\x6E\x6B\x6E\x6F\x77\x6E\x20\x6E\x61\x6D\x65\x3A\x20\x63\x75\x73\x74\x6F\x6D\x53\x6B\x69\x6E\x73","\x3C\x64\x69\x76\x20\x63\x6C\x61\x73\x73\x3D\x22\x74\x6F\x61\x73\x74\x2D\x6D\x65\x73\x73\x61\x67\x65\x22\x3E\x3C\x73\x70\x61\x6E\x20\x63\x6C\x61\x73\x73\x3D\x22\x6D\x65\x73\x73\x61\x67\x65\x2D\x6E\x69\x63\x6B\x22\x3E","\x6E\x61\x6D\x65","\x3A\x20\x3C\x2F\x73\x70\x61\x6E\x3E\x3C\x73\x70\x61\x6E\x20\x63\x6C\x61\x73\x73\x3D\x22\x6D\x65\x73\x73\x61\x67\x65\x2D\x74\x65\x78\x74\x22\x3E","\x3C\x2F\x73\x70\x61\x6E\x3E\x3C\x61\x20\x68\x72\x65\x66\x3D\x22\x23\x22\x20\x64\x61\x74\x61\x2D\x75\x73\x65\x72\x2D\x69\x64\x3D\x22\x61\x67\x61\x72\x20\x74\x6F\x6F\x6C\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x6D\x75\x74\x65\x2D\x75\x73\x65\x72\x20\x6F\x67\x69\x63\x6F\x6E\x2D\x75\x73\x65\x72\x2D\x6D\x69\x6E\x75\x73\x22\x3E\x3C\x2F\x61\x3E\x20\x3C\x2F\x64\x69\x76\x3E","\x20\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F","\x6D\x69\x6E\x69\x6D\x61\x70\x20\x73\x65\x72\x76\x65\x72","\x6E\x6F\x4F\x67\x61\x72\x69\x6F\x53\x6F\x63\x6B\x65\x74","\x23\x6D\x65\x73\x73\x61\x67\x65\x53\x6F\x75\x6E\x64","\x5B\x55\x6E\x69\x76\x65\x72\x73\x61\x6C\x20\x63\x68\x61\x74\x5D\x3A","\x23\x63\x6F\x6D\x6D\x61\x6E\x64\x53\x6F\x75\x6E\x64","\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x77\x73\x73\x3A\x2F\x2F\x6D\x69\x6E\x69\x6D\x61\x70\x2E\x61\x67\x61\x72\x74\x6F\x6F\x6C\x2E\x69\x6F\x3A\x39\x30\x30\x30","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x45\x78\x61\x6D\x70\x6C\x65\x53\x63\x72\x69\x70\x74\x73\x2F\x73\x6F\x63\x6B\x65\x74\x2D\x69\x6F\x2E\x6D\x69\x6E\x2E\x6A\x73","\x37\x30\x30\x20\x31\x31\x70\x78\x20\x55\x62\x75\x6E\x74\x75","\x23\x66\x66\x66\x66\x66\x66","\x23\x30\x30\x30\x30\x30\x30","\x50\x49","\x38\x32\x70\x78","\x34\x30\x25","\x4F","\x23\x38\x43\x38\x31\x43\x37","\x4C\x2E\x4D","\x74\x6F\x70\x35\x2D\x68\x75\x64","\x70\x72\x65\x5F\x6C\x6F\x6F\x70\x5F\x74\x69\x6D\x65\x6F\x75\x74","\x77\x61\x69\x74\x20\x66\x6F\x72\x20\x6D\x6F\x64\x20\x74\x6F\x20\x6C\x6F\x61\x64","\x63\x6F\x6E\x66\x69\x67","\x7B\x7D","\x73\x74\x6F\x72\x61\x67\x65\x5F\x67\x65\x74\x56\x61\x6C\x75\x65","\x65\x78\x74\x65\x6E\x64","\x61\x6F\x32\x74","\x23\x61\x6F\x32\x74\x2D\x68\x75\x64\x20\x7B","\x20\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x20\x38\x30\x25\x3B\x20\x70\x6F\x69\x6E\x74\x65\x72\x2D\x65\x76\x65\x6E\x74\x73\x3A\x20\x61\x75\x74\x6F\x3B","\x7D","\x23\x61\x6F\x32\x74\x2D\x68\x75\x64\x20\x2A\x20\x7B","\x20\x75\x73\x65\x72\x2D\x73\x65\x6C\x65\x63\x74\x3A\x20\x61\x75\x74\x6F\x21\x69\x6D\x70\x6F\x72\x74\x61\x6E\x74\x3B","\x23\x61\x6F\x32\x74\x2D\x63\x66\x67\x2D\x64\x6C\x67\x20\x7B","\x20\x62\x6F\x72\x64\x65\x72\x2D\x72\x61\x64\x69\x75\x73\x3A\x30\x3B\x20\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x20\x38\x30\x25\x3B\x20\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x32\x70\x78\x20\x31\x30\x70\x78\x3B\x20\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x20\x66\x69\x78\x65\x64\x3B","\x20\x70\x6F\x69\x6E\x74\x65\x72\x2D\x65\x76\x65\x6E\x74\x73\x3A\x20\x61\x75\x74\x6F\x3B\x20\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x69\x6D\x61\x67\x65\x3A\x20\x75\x72\x6C\x28","\x20\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x66\x66\x66\x66\x66\x66\x3B","\x20\x6F\x76\x65\x72\x66\x6C\x6F\x77\x3A\x20\x68\x69\x64\x64\x65\x6E\x3B","\x23\x61\x6F\x32\x74\x2D\x63\x66\x67\x2D\x64\x6C\x67\x20\x2A\x20\x7B","\x20\x77\x69\x64\x74\x68\x3A\x20\x61\x75\x74\x6F\x3B\x20\x75\x73\x65\x72\x2D\x73\x65\x6C\x65\x63\x74\x3A\x20\x61\x75\x74\x6F\x21\x69\x6D\x70\x6F\x72\x74\x61\x6E\x74\x3B\x20\x70\x6F\x69\x6E\x74\x65\x72\x2D\x65\x76\x65\x6E\x74\x73\x3A\x20\x61\x75\x74\x6F\x3B","\x20\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x20\x72\x65\x6C\x61\x74\x69\x76\x65\x3B\x20\x66\x6C\x6F\x61\x74\x3A\x20\x69\x6E\x69\x74\x69\x61\x6C\x3B","\x23\x61\x6F\x32\x74\x2D\x63\x66\x67\x2D\x64\x6C\x67\x20\x69\x6E\x70\x75\x74\x20\x7B","\x20\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x72\x67\x62\x61\x28\x30\x2C\x30\x2C\x30\x2C\x30\x2E\x34\x29\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x66\x66\x66\x66\x66\x66\x3B","\x3C\x73\x74\x79\x6C\x65\x3E\x0A","\x0A\x3C\x2F\x73\x74\x79\x6C\x65\x3E","\x68\x65\x61\x64","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x61\x6F\x32\x74\x2D\x68\x75\x64\x22\x3E\x3C\x73\x70\x61\x6E\x20\x63\x6C\x61\x73\x73\x3D\x22\x68\x75\x64\x2D\x6D\x61\x69\x6E\x2D\x63\x6F\x6C\x6F\x72\x22\x3E\x55\x6E\x69\x76\x65\x72\x73\x61\x6C\x3A","\x20\x3C\x73\x70\x61\x6E\x20\x69\x64\x3D\x22\x61\x6F\x32\x74\x2D\x63\x61\x70\x74\x75\x72\x65\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x75\x6E\x69\x76\x65\x72\x73\x61\x6C\x2D\x61\x63\x63\x65\x73\x73\x22\x20\x61\x72\x69\x61\x2D\x68\x69\x64\x64\x65\x6E\x3D\x22\x74\x72\x75\x65\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x73\x70\x61\x6E\x3E","\x20\x3C\x73\x70\x61\x6E\x20\x69\x64\x3D\x22\x61\x6F\x32\x74\x2D\x63\x6F\x6E\x66\x69\x67\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x77\x72\x65\x6E\x63\x68\x22\x20\x61\x72\x69\x61\x2D\x68\x69\x64\x64\x65\x6E\x3D\x22\x74\x72\x75\x65\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x73\x70\x61\x6E\x3E\x3C\x2F\x73\x70\x61\x6E\x3E","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x61\x6F\x32\x74\x2D\x74\x6F\x70\x35\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x20\x31\x34\x70\x78\x3B\x22\x3E\x3C\x2F\x64\x69\x76\x3E","\x3C\x2F\x64\x69\x76\x3E","\x63\x61\x70\x74\x75\x72\x65","\x6F\x67\x61\x72\x69\x6F","\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64","\x23\x61\x6F\x32\x74\x2D\x63\x61\x70\x74\x75\x72\x65","\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x74\x69\x6D\x65\x73\x22\x20\x61\x72\x69\x61\x2D\x68\x69\x64\x64\x65\x6E\x3D\x22\x74\x72\x75\x65\x22\x3E\x3C\x2F\x69\x3E","\x63\x61\x70\x74\x75\x72\x65\x5F\x73\x74\x61\x72\x74","\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x75\x6E\x69\x76\x65\x72\x73\x61\x6C\x2D\x61\x63\x63\x65\x73\x73\x22\x20\x61\x72\x69\x61\x2D\x68\x69\x64\x64\x65\x6E\x3D\x22\x74\x72\x75\x65\x22\x3E\x3C\x2F\x69\x3E","\x63\x61\x70\x74\x75\x72\x65\x5F\x65\x6E\x64","\x63\x6F\x6C\x6F\x72","\x6D\x6F\x75\x73\x65\x6C\x65\x61\x76\x65","\x23\x68\x75\x64\x54\x65\x78\x74\x43\x6F\x6C\x6F\x72","\x6D\x6F\x75\x73\x65\x65\x6E\x74\x65\x72","\x23\x61\x6F\x32\x74\x2D\x63\x6F\x6E\x66\x69\x67","\x6C\x6D\x73\x61\x5F\x74\x65\x61\x6D\x74\x6F\x70","\x6D\x6F\x75\x73\x65\x64\x6F\x77\x6E","\x23\x61\x6F\x32\x74\x2D\x68\x75\x64","\x6C\x6D\x73\x61\x5F\x63\x68\x61\x74","\x63\x68\x61\x74\x5F\x63\x6C\x6F\x73\x65","\x3C\x61\x20\x68\x72\x65\x66\x3D\x22\x23\x22\x20\x69\x64\x3D\x22\x61\x6F\x32\x74\x2D\x63\x68\x61\x74\x2D\x63\x6C\x6F\x73\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x66\x6C\x6F\x61\x74\x3A\x72\x69\x67\x68\x74\x3B\x22\x3E\x58\x3C\x2F\x61\x3E","\x23\x6D\x65\x73\x73\x61\x67\x65\x2D\x6D\x65\x6E\x75","\x63\x68\x61\x74\x43\x6C\x6F\x73\x65","\x23\x61\x6F\x32\x74\x2D\x63\x68\x61\x74\x2D\x63\x6C\x6F\x73\x65","\x63\x68\x61\x74\x5F\x76\x63\x65\x6E\x74\x65\x72","\x62\x6F\x74\x74\x6F\x6D","\x6D\x65\x73\x73\x61\x67\x65\x42\x6F\x78\x42\x6F\x74\x74\x6F\x6D","\x61\x6C\x74\x4B\x65\x79","\x63\x74\x72\x6C\x4B\x65\x79","\x63","\x6D\x65\x74\x61\x4B\x65\x79","\x73\x68\x69\x66\x74\x4B\x65\x79","\x73","\x6B\x65\x79\x43\x6F\x64\x65","\x6B\x65\x79\x43\x6F\x64\x65\x45\x6E\x74\x65\x72","\x63\x68\x61\x74\x5F\x61\x6C\x74","\x63\x68\x61\x74\x53\x65\x6E\x64","\x61\x63","\x63\x68\x61\x74\x5F\x63\x74\x72\x6C\x61\x6C\x74","\x63\x68\x61\x74\x5F\x63\x74\x72\x6C","\x6B\x65\x79\x64\x6F\x77\x6E","\x23\x6D\x65\x73\x73\x61\x67\x65","\x73\x6B\x69\x6E\x54\x6F\x67\x67\x6C\x65\x5F\x73\x74\x61\x72\x74","\x64\x72\x61\x67\x67\x61\x62\x6C\x65","\x23\x61\x6F\x32\x74\x2D\x63\x66\x67\x2D\x64\x6C\x67","\x23\x61\x6F\x32\x74\x2D\x6D\x65\x73\x73\x61\x67\x65","\x23\x61\x6F\x32\x74\x2D\x6D\x69\x6E\x69\x6D\x61\x70","\x63\x61\x70\x74\x75\x72\x65\x5F\x69\x6E\x69\x74","\x74\x6F\x6B\x65\x6E","\x77\x73","\x77\x73\x73\x3A\x2F\x2F\x6C\x69\x76\x65\x2D\x61\x72\x65\x6E\x61\x2D","\x2E\x61\x67\x61\x72\x2E\x69\x6F\x3A\x38\x30","\x63\x6F\x6E\x6E\x65\x63\x74","\x75\x70\x64\x61\x74\x65\x5F\x74\x69\x6D\x65\x72\x69\x64","\x75\x70\x64\x61\x74\x65","\x75\x70\x64\x61\x74\x65\x5F\x69\x6E\x74\x65\x72\x76\x61\x6C","\x23\x61\x6F\x32\x74\x2D\x74\x6F\x70\x35","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x3C\x61\x20\x68\x72\x65\x66\x3D\x22\x23\x22\x20\x69\x64\x3D\x22\x61\x6F\x32\x74\x2D\x6D\x65\x73\x73\x61\x67\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x66\x6C\x6F\x61\x74\x3A\x6C\x65\x66\x74\x3B\x22\x3E","\x74\x6F\x6F\x6C\x5F\x73\x79\x6D\x62\x6F\x6C","\x3C\x2F\x61\x3E","\x70\x72\x65\x70\x65\x6E\x64","\x23\x6D\x69\x6E\x69\x6D\x61\x70","\x68\x65\x69\x67\x68\x74","\x3C\x63\x61\x6E\x76\x61\x73\x20\x69\x64\x3D\x22\x61\x6F\x32\x74\x2D\x6D\x69\x6E\x69\x6D\x61\x70\x22","\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x20\x61\x62\x73\x6F\x6C\x75\x74\x65\x3B\x22","\x20\x77\x69\x64\x74\x68\x3D\x22","\x22\x20\x68\x65\x69\x67\x68\x74\x3D\x22","\x22\x3E","\x68\x61\x73\x43\x6C\x61\x73\x73","\x4C\x2E\x4D\x3A\x2D\x3E\x41\x2E\x54\x3A\x20\x6E\x6F\x74\x20\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64","\x74\x6F\x61\x73\x74\x72","\x63\x68\x61\x74","\x4C\x4D\x3A","\x73\x65\x6E\x64\x4D\x69\x6E\x69\x6D\x61\x70\x53\x65\x72\x76\x65\x72\x43\x6F\x6D\x6D\x61\x6E\x64","\x6F\x67\x61\x72","\x74\x72\x69\x67\x67\x65\x72","\x4D\x65\x73\x73\x61\x67\x65\x20\x69\x6E\x63\x6C\x75\x64\x65\x64\x20\x53\x63\x72\x69\x70\x74\x20\x63\x6F\x6D\x6D\x61\x6E\x64\x2C\x20\x74\x68\x75\x73\x20\x69\x74\x20\x69\x73\x20\x6E\x6F\x74\x20\x73\x65\x6E\x74\x20\x74\x6F\x20\x61\x67\x61\x72\x20\x74\x6F\x6F\x6C","\x63\x68\x61\x74\x5F\x75\x6E\x70\x61\x75\x73\x65","\x23\x70\x61\x75\x73\x65\x2D\x68\x75\x64","\x62\x6C\x6F\x63\x6B","\x6B\x65\x79\x43\x6F\x64\x65\x52","\x6B\x65\x79\x75\x70","\x6F\x67\x61\x72\x49\x73\x41\x6C\x69\x76\x65","\x61\x6C\x69\x76\x65","\x74\x67\x61\x72\x41\x6C\x69\x76\x65","\x74\x67\x61\x72\x52\x65\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x6F\x67\x61\x72\x4D\x69\x6E\x69\x6D\x61\x70\x55\x70\x64\x61\x74\x65","\x63\x6F\x6E\x66\x69\x67\x5F\x69\x6E\x69\x74","\x63\x66\x67\x5F\x6C\x6F\x61\x64","\x23\x6F\x76\x65\x72\x6C\x61\x79\x73","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x61\x6F\x32\x74\x2D\x63\x66\x67\x2D\x64\x6C\x67\x22","\x20\x20\x73\x74\x79\x6C\x65\x3D\x22\x77\x69\x64\x74\x68\x3A\x34\x30\x30\x70\x78\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x34\x38\x30\x70\x78\x3B\x20\x74\x6F\x70\x3A\x31\x35\x30\x70\x78\x3B\x20\x6C\x65\x66\x74\x3A\x33\x30\x30\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B","\x41\x67\x61\x72\x20\x54\x6F\x6F\x6C\x2F\x4C\x65\x67\x65\x6E\x64\x20\x4D\x6F\x64\x20\x74\x6F\x6F\x6C\x73","\x3C\x64\x69\x76\x20\x73\x74\x79\x6C\x65\x3D\x22\x6F\x76\x65\x72\x66\x6C\x6F\x77\x3A\x20\x73\x63\x72\x6F\x6C\x6C\x3B\x20","\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x20\x72\x65\x6C\x61\x74\x69\x76\x65\x3B\x20\x74\x6F\x70\x3A\x31\x2E\x35\x65\x6D\x3B\x20\x6C\x65\x66\x74\x3A\x30\x2E\x35\x65\x6D\x3B\x20\x72\x69\x67\x68\x74\x3A\x30\x2E\x35\x65\x6D\x3B\x20\x62\x6F\x74\x74\x6F\x6D\x3A\x31\x2E\x35\x65\x6D\x3B\x22\x3E","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x61\x6F\x32\x74\x2D\x63\x66\x67\x2D\x62\x61\x73\x65\x22\x3E","\x3C\x2F\x64\x69\x76\x3E\x3C\x62\x72\x3E\x3C\x62\x72\x3E","\x26\x6E\x62\x73\x70\x3B\x3C\x73\x70\x61\x6E\x20\x69\x64\x3D\x22\x61\x6F\x32\x74\x2D\x63\x66\x67\x2D\x64\x65\x66\x61\x75\x6C\x74\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x70\x72\x69\x6D\x61\x72\x79\x22\x3E","\x74\x6F\x55\x70\x70\x65\x72\x43\x61\x73\x65","\x3C\x2F\x73\x70\x61\x6E\x3E","\x26\x6E\x62\x73\x70\x3B\x3C\x73\x70\x61\x6E\x20\x69\x64\x3D\x22\x61\x6F\x32\x74\x2D\x63\x66\x67\x2D\x6F\x6B\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x73\x75\x63\x63\x65\x73\x73\x22\x3E","\x26\x6E\x62\x73\x70\x3B\x3C\x73\x70\x61\x6E\x20\x69\x64\x3D\x22\x61\x6F\x32\x74\x2D\x63\x66\x67\x2D\x63\x61\x6E\x63\x65\x6C\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x64\x61\x6E\x67\x65\x72\x22\x3E","\x26\x6E\x62\x73\x70\x3B\x26\x6E\x62\x73\x70\x3B\x26\x6E\x62\x73\x70\x3B\x55\x70\x64\x61\x74\x65\x20\x66\x72\x65\x71\x75\x65\x6E\x63\x79\x20\x5B\x6D\x69\x6C\x6C\x69\x73\x65\x63\x6F\x6E\x64\x73\x5D\x3A\x3C\x69\x6E\x70\x75\x74\x20\x74\x79\x70\x65\x3D\x22\x74\x65\x78\x74\x22\x20\x64\x61\x74\x61\x2D\x61\x6F\x32\x74\x2D\x63\x6F\x6E\x66\x69\x67\x3D\x22\x75\x70\x64\x61\x74\x65\x5F\x69\x6E\x74\x65\x72\x76\x61\x6C\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x77\x69\x64\x74\x68\x3A\x36\x65\x6D\x3B\x22\x2F\x3E","\x3C\x62\x72\x2F\x3E\x41\x67\x61\x72\x20\x54\x6F\x6F\x6C\x20\x4F\x62\x74\x61\x69\x6E\x65\x64\x20\x66\x72\x6F\x6D","\x3C\x62\x72\x2F\x3E\x26\x6E\x62\x73\x70\x3B\x3C\x6C\x61\x62\x65\x6C\x3E\x3C\x69\x6E\x70\x75\x74\x20\x74\x79\x70\x65\x3D\x22\x63\x68\x65\x63\x6B\x62\x6F\x78\x22\x20\x64\x61\x74\x61\x2D\x61\x6F\x32\x74\x2D\x63\x6F\x6E\x66\x69\x67\x3D\x22\x75\x73\x65\x72\x5F\x73\x68\x6F\x77\x22\x2F\x3E\x75\x73\x65\x72\x20\x6C\x69\x73\x74\x3C\x2F\x6C\x61\x62\x65\x6C\x3E","\x3C\x62\x72\x2F\x3E\x26\x6E\x62\x73\x70\x3B\x3C\x6C\x61\x62\x65\x6C\x3E\x3C\x69\x6E\x70\x75\x74\x20\x74\x79\x70\x65\x3D\x22\x63\x68\x65\x63\x6B\x62\x6F\x78\x22\x20\x64\x61\x74\x61\x2D\x61\x6F\x32\x74\x2D\x63\x6F\x6E\x66\x69\x67\x3D\x22\x6D\x69\x6E\x69\x6D\x61\x70\x5F\x73\x68\x6F\x77\x22\x2F\x3E\x6D\x69\x6E\x69\x6D\x61\x70\x3C\x2F\x6C\x61\x62\x65\x6C\x3E","\x26\x6E\x62\x73\x70\x3B\x50\x72\x65\x66\x69\x78\x3A\x3C\x69\x6E\x70\x75\x74\x20\x74\x79\x70\x65\x3D\x22\x74\x65\x78\x74\x22\x20\x64\x61\x74\x61\x2D\x61\x6F\x32\x74\x2D\x63\x6F\x6E\x66\x69\x67\x3D\x22\x74\x67\x61\x72\x5F\x70\x72\x65\x66\x69\x78\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x77\x69\x64\x74\x68\x3A\x34\x65\x6D\x3B\x22\x2F\x3E","\x26\x6E\x62\x73\x70\x3B\x26\x6E\x62\x73\x70\x3B\x63\x6F\x6C\x6F\x72\x3A\x3C\x69\x6E\x70\x75\x74\x20\x74\x79\x70\x65\x3D\x22\x74\x65\x78\x74\x22\x20\x64\x61\x74\x61\x2D\x61\x6F\x32\x74\x2D\x63\x6F\x6E\x66\x69\x67\x3D\x22\x74\x67\x61\x72\x5F\x63\x6F\x6C\x6F\x72\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x77\x69\x64\x74\x68\x3A\x36\x65\x6D\x3B\x22\x2F\x3E","\x3C\x62\x72\x2F\x3E\x53\x65\x6E\x64\x20\x74\x6F\x20\x41\x67\x61\x72\x20\x54\x6F\x6F\x6C","\x3C\x62\x72\x2F\x3E\x26\x6E\x62\x73\x70\x3B\x3C\x6C\x61\x62\x65\x6C\x3E\x3C\x69\x6E\x70\x75\x74\x20\x74\x79\x70\x65\x3D\x22\x63\x68\x65\x63\x6B\x62\x6F\x78\x22\x20\x64\x61\x74\x61\x2D\x61\x6F\x32\x74\x2D\x63\x6F\x6E\x66\x69\x67\x3D\x22\x6F\x67\x61\x72\x5F\x75\x73\x65\x72\x22\x2F\x3E\x75\x73\x65\x72\x20\x69\x6E\x66\x6F\x3C\x2F\x6C\x61\x62\x65\x6C\x3E","\x26\x6E\x62\x73\x70\x3B\x50\x72\x65\x66\x69\x78\x3A\x3C\x69\x6E\x70\x75\x74\x20\x74\x79\x70\x65\x3D\x22\x74\x65\x78\x74\x22\x20\x64\x61\x74\x61\x2D\x61\x6F\x32\x74\x2D\x63\x6F\x6E\x66\x69\x67\x3D\x22\x6F\x67\x61\x72\x5F\x70\x72\x65\x66\x69\x78\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x77\x69\x64\x74\x68\x3A\x34\x65\x6D\x3B\x22\x2F\x3E","\x3C\x62\x72\x2F\x3E\x4C\x4D\x42\x2D\x4D\x6F\x75\x73\x65\x20\x73\x70\x6C\x69\x74\x20\x63\x6F\x72\x72\x65\x63\x74\x69\x6F\x6E","\x3C\x62\x72\x2F\x3E\x26\x6E\x62\x73\x70\x3B\x3C\x6C\x61\x62\x65\x6C\x3E\x3C\x69\x6E\x70\x75\x74\x20\x74\x79\x70\x65\x3D\x22\x63\x68\x65\x63\x6B\x62\x6F\x78\x22\x20\x64\x61\x74\x61\x2D\x61\x6F\x32\x74\x2D\x63\x6F\x6E\x66\x69\x67\x3D\x22\x6C\x6D\x73\x61\x5F\x74\x65\x61\x6D\x74\x6F\x70\x22\x2F\x3E\x54\x65\x61\x6D\x62\x6F\x61\x72\x64\x3C\x2F\x6C\x61\x62\x65\x6C\x3E","\x26\x6E\x62\x73\x70\x3B\x3C\x6C\x61\x62\x65\x6C\x3E\x3C\x69\x6E\x70\x75\x74\x20\x74\x79\x70\x65\x3D\x22\x63\x68\x65\x63\x6B\x62\x6F\x78\x22\x20\x64\x61\x74\x61\x2D\x61\x6F\x32\x74\x2D\x63\x6F\x6E\x66\x69\x67\x3D\x22\x6C\x6D\x73\x61\x5F\x63\x68\x61\x74\x22\x2F\x3E\x63\x68\x61\x74\x3C\x2F\x6C\x61\x62\x65\x6C\x3E","\x3C\x62\x72\x2F\x3E\x43\x68\x61\x74\x20\x6F\x70\x74\x69\x6F\x6E","\x3C\x62\x72\x2F\x3E\x26\x6E\x62\x73\x70\x3B\x3C\x6C\x61\x62\x65\x6C\x3E\x3C\x69\x6E\x70\x75\x74\x20\x74\x79\x70\x65\x3D\x22\x63\x68\x65\x63\x6B\x62\x6F\x78\x22\x20\x64\x61\x74\x61\x2D\x61\x6F\x32\x74\x2D\x63\x6F\x6E\x66\x69\x67\x3D\x22\x63\x68\x61\x74\x5F\x63\x6C\x6F\x73\x65\x22\x2F\x3E\x63\x6C\x6F\x73\x65\x3C\x2F\x6C\x61\x62\x65\x6C\x3E","\x26\x6E\x62\x73\x70\x3B\x3C\x6C\x61\x62\x65\x6C\x3E\x3C\x69\x6E\x70\x75\x74\x20\x74\x79\x70\x65\x3D\x22\x63\x68\x65\x63\x6B\x62\x6F\x78\x22\x20\x64\x61\x74\x61\x2D\x61\x6F\x32\x74\x2D\x63\x6F\x6E\x66\x69\x67\x3D\x22\x63\x68\x61\x74\x5F\x75\x6E\x70\x61\x75\x73\x65\x22\x2F\x3E\x75\x6E\x70\x61\x75\x73\x65\x3C\x2F\x6C\x61\x62\x65\x6C\x3E","\x26\x6E\x62\x73\x70\x3B\x3C\x6C\x61\x62\x65\x6C\x3E\x3C\x69\x6E\x70\x75\x74\x20\x74\x79\x70\x65\x3D\x22\x63\x68\x65\x63\x6B\x62\x6F\x78\x22\x20\x64\x61\x74\x61\x2D\x61\x6F\x32\x74\x2D\x63\x6F\x6E\x66\x69\x67\x3D\x22\x63\x68\x61\x74\x5F\x76\x63\x65\x6E\x74\x65\x72\x22\x2F\x3E\x76\x63\x65\x6E\x74\x65\x72\x3C\x2F\x6C\x61\x62\x65\x6C\x3E","\x3C\x62\x72\x2F\x3E\x26\x6E\x62\x73\x70\x3B\x3C\x6C\x61\x62\x65\x6C\x3E\x3C\x69\x6E\x70\x75\x74\x20\x74\x79\x70\x65\x3D\x22\x63\x68\x65\x63\x6B\x62\x6F\x78\x22\x20\x64\x61\x74\x61\x2D\x61\x6F\x32\x74\x2D\x63\x6F\x6E\x66\x69\x67\x3D\x22\x63\x68\x61\x74\x5F\x61\x6C\x74\x22\x2F\x3E\x41\x6C\x74\x3E\x54\x3C\x2F\x6C\x61\x62\x65\x6C\x3E","\x26\x6E\x62\x73\x70\x3B\x3C\x6C\x61\x62\x65\x6C\x3E\x3C\x69\x6E\x70\x75\x74\x20\x74\x79\x70\x65\x3D\x22\x63\x68\x65\x63\x6B\x62\x6F\x78\x22\x20\x64\x61\x74\x61\x2D\x61\x6F\x32\x74\x2D\x63\x6F\x6E\x66\x69\x67\x3D\x22\x63\x68\x61\x74\x5F\x63\x74\x72\x6C\x61\x6C\x74\x22\x2F\x3E\x43\x74\x72\x6C\x2B\x41\x6C\x74\x3E\x4F\x2B\x54\x3C\x2F\x6C\x61\x62\x65\x6C\x3E","\x26\x6E\x62\x73\x70\x3B\x3C\x6C\x61\x62\x65\x6C\x3E\x3C\x69\x6E\x70\x75\x74\x20\x74\x79\x70\x65\x3D\x22\x63\x68\x65\x63\x6B\x62\x6F\x78\x22\x20\x64\x61\x74\x61\x2D\x61\x6F\x32\x74\x2D\x63\x6F\x6E\x66\x69\x67\x3D\x22\x63\x68\x61\x74\x5F\x63\x74\x72\x6C\x22\x2F\x3E\x43\x74\x72\x6C\x3E\x43\x6C\x6F\x73\x65\x3C\x2F\x6C\x61\x62\x65\x6C\x3E","\x3C\x62\x72\x2F\x3E\x4F\x74\x68\x65\x72","\x3C\x62\x72\x2F\x3E\x26\x6E\x62\x73\x70\x3B\x3C\x6C\x61\x62\x65\x6C\x3E\x3C\x69\x6E\x70\x75\x74\x20\x74\x79\x70\x65\x3D\x22\x63\x68\x65\x63\x6B\x62\x6F\x78\x22\x20\x64\x61\x74\x61\x2D\x61\x6F\x32\x74\x2D\x63\x6F\x6E\x66\x69\x67\x3D\x22\x73\x6B\x69\x6E\x5F\x74\x6F\x67\x67\x6C\x65\x5F\x61\x75\x74\x6F\x22\x2F\x3E\x73\x6B\x69\x6E\x20\x61\x75\x74\x6F\x20\x74\x6F\x67\x67\x6C\x65\x3C\x2F\x6C\x61\x62\x65\x6C\x3E","\x26\x6E\x62\x73\x70\x3B\x26\x6E\x62\x73\x70\x3B\x26\x6E\x62\x73\x70\x3B\x46\x72\x65\x71\x75\x65\x6E\x63\x79\x20\x5B\x6D\x69\x6C\x6C\x69\x73\x65\x63\x6F\x6E\x64\x73\x5D\x3A\x3C\x69\x6E\x70\x75\x74\x20\x74\x79\x70\x65\x3D\x22\x74\x65\x78\x74\x22\x20\x64\x61\x74\x61\x2D\x61\x6F\x32\x74\x2D\x63\x6F\x6E\x66\x69\x67\x3D\x22\x73\x6B\x69\x6E\x5F\x74\x6F\x67\x67\x6C\x65\x5F\x69\x6E\x74\x65\x72\x76\x61\x6C\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x77\x69\x64\x74\x68\x3A\x36\x65\x6D\x3B\x22\x2F\x3E","\x3C\x62\x72\x2F\x3E\x26\x6E\x62\x73\x70\x3B\x26\x6E\x62\x73\x70\x3B\x2A\x20\x43\x68\x61\x6E\x67\x65\x73\x20\x77\x69\x6C\x6C\x20\x62\x65\x20\x72\x65\x66\x6C\x65\x63\x74\x65\x64\x20\x61\x66\x74\x65\x72\x20\x72\x65\x73\x74\x61\x72\x74","\x23\x61\x6F\x32\x74\x2D\x63\x66\x67\x2D\x62\x61\x73\x65","\x23\x61\x6F\x32\x74\x2D\x63\x66\x67\x2D\x64\x65\x66\x61\x75\x6C\x74","\x63\x66\x67\x5F\x73\x61\x76\x65","\x73\x74\x6F\x72\x61\x67\x65\x5F\x73\x65\x74\x56\x61\x6C\x75\x65","\x63\x6F\x6E\x66\x69\x67\x5F\x63\x61\x6E\x63\x65\x6C","\x23\x61\x6F\x32\x74\x2D\x63\x66\x67\x2D\x6F\x6B","\x23\x61\x6F\x32\x74\x2D\x63\x66\x67\x2D\x63\x61\x6E\x63\x65\x6C","\x73\x6B\x69\x6E\x54\x6F\x67\x67\x6C\x65\x5F\x74\x69\x6D\x65\x72\x69\x64","\x73\x6B\x69\x6E\x5F\x74\x6F\x67\x67\x6C\x65\x5F\x61\x75\x74\x6F","\x73\x6B\x69\x6E\x5F\x74\x6F\x67\x67\x6C\x65\x5F\x69\x6E\x74\x65\x72\x76\x61\x6C","\x73\x6B\x69\x6E\x54\x6F\x67\x67\x6C\x65\x5F\x75\x70\x64\x61\x74\x65","\x63\x75\x73\x74\x6F\x6D\x53\x6B\x69\x6E\x73","\x76\x61\x6E\x69\x6C\x6C\x61\x53\x6B\x69\x6E\x73","\x73\x6B\x69\x6E\x54\x6F\x67\x67\x6C\x65\x5F\x68\x61\x73\x42\x6F\x74\x68","\x73\x6B\x69\x6E\x54\x6F\x67\x67\x6C\x65\x5F\x75\x70\x64\x61\x74\x65\x5F\x73\x75\x62","\x6B\x65\x79\x43\x6F\x64\x65\x41","\x69\x6F","\x73\x6F\x63\x6B\x65\x74\x49\x6F\x55\x52\x4C","\x76\x65\x72\x73\x69\x6F\x6E\x3D","\x26\x73\x65\x72\x76\x65\x72\x3D","\x67\x72\x61\x62\x5F\x73\x6F\x63\x6B\x65\x74","\x6D\x69\x6E\x69\x6D\x61\x70\x5F\x69\x6E\x66\x6F","\x6D\x69\x6E\x69\x6D\x61\x70\x5F\x63\x6F\x6E\x6E\x65\x63\x74","\x6F\x6E","\x6D\x69\x6E\x69\x6D\x61\x70\x5F\x73\x6F\x63\x6B\x65\x74","\x4F\x6E\x63\x65\x55\x73\x65\x64","\x74\x6F\x4C\x6F\x77\x65\x72\x43\x61\x73\x65","\x3D","\x6D\x69\x6E\x69\x6D\x61\x70\x53\x65\x72\x76\x65\x72","\x72\x65\x73\x65\x74\x4D\x69\x6E\x69\x6D\x61\x70","\x73\x65\x72\x76\x65\x72\x3D","\x61\x67\x61\x72\x53\x65\x72\x76\x65\x72","\x26\x74\x61\x67\x3D","\x63\x6F\x6D\x6D\x61\x6E\x64","\x6D\x69\x6E\x69\x6D\x61\x70\x5F\x63\x6F\x6D\x6D\x61\x6E\x64","\x6D\x69\x6E\x69\x6D\x61\x70\x5F\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x63\x6F\x6E\x6E\x65\x63\x74\x5F\x65\x72\x72\x6F\x72","\x74\x65\x61\x6D\x6D\x61\x74\x65\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x6E\x69\x63\x6B\x73","\x70\x6C\x61\x79\x65\x72\x4E\x61\x6D\x65","\x41\x6E\x20\x75\x6E\x6E\x61\x6D\x65\x64\x20\x63\x65\x6C\x6C","\x73\x6F\x63\x6B\x65\x74\x49\x44","\x78","\x79","\x74\x67\x61\x72\x5F\x63\x6F\x6C\x6F\x72","\x61\x64\x64\x42\x61\x6C\x6C\x54\x6F\x4D\x69\x6E\x69\x6D\x61\x70","\x61\x64\x64","\x72\x65\x6D\x6F\x76\x65\x42\x61\x6C\x6C\x46\x72\x6F\x6D\x4D\x69\x6E\x69\x6D\x61\x70","\x6D\x6F\x76\x65\x42\x61\x6C\x6C\x4F\x6E\x4D\x69\x6E\x69\x6D\x61\x70","\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x61\x67\x74\x6F\x6F\x6C\x62\x61\x6C\x6C","\x63\x75\x73\x74\x6F\x6D\x73","\x73\x68\x6F\x77\x43\x75\x73\x74\x6F\x6D\x53\x6B\x69\x6E\x73","\x25","\x72\x65\x67\x69\x73\x74\x65\x72\x53\x6B\x69\x6E","\x66\x6F\x72\x45\x61\x63\x68","\x6B\x65\x79\x73","\x72\x65\x73\x65\x74","\x6D\x65\x73\x73\x61\x67\x65","\x6F\x67\x61\x72\x43\x68\x61\x74\x41\x64\x64","\x55\x6E\x6B\x6E\x6F\x77\x6E\x20\x63\x6F\x6D\x6D\x61\x6E\x64\x20\x6C\x73\x3A\x20","\x6C\x73","\x68\x63","\x52\x65\x63\x65\x69\x76\x65\x64\x20\x61\x20\x63\x6F\x6D\x6D\x61\x6E\x64\x20\x77\x69\x74\x68\x20\x61\x6E\x20\x75\x6E\x6B\x6E\x6F\x77\x6E\x20\x6E\x61\x6D\x65\x3A\x20","\x65\x6D\x69\x74","\x6D\x69\x6E\x69\x6D\x61\x70\x42\x61\x6C\x6C\x73","\x69\x73\x44\x65\x66\x61\x75\x6C\x74","\x6C\x61\x73\x74\x58","\x6C\x61\x73\x74\x59","\x76\x69\x73\x69\x62\x6C\x65","\x6F\x67\x61\x72\x5F\x75\x73\x65\x72","\x6F\x67\x61\x72\x5F\x70\x72\x65\x66\x69\x78","\x23\x73\x6B\x69\x6E","\x64\x65\x61\x64","\x70\x6C\x61\x79\x65\x72\x58","\x70\x6C\x61\x79\x65\x72\x59","\x24\x31","\x74\x6F\x54\x69\x6D\x65\x53\x74\x72\x69\x6E\x67","\x3C\x64\x69\x76\x20\x63\x6C\x61\x73\x73\x3D\x22\x6D\x65\x73\x73\x61\x67\x65\x22\x3E","\x3C\x73\x70\x61\x6E\x20\x63\x6C\x61\x73\x73\x3D\x22\x6D\x65\x73\x73\x61\x67\x65\x2D\x74\x69\x6D\x65\x22\x3E\x5B","\x5D\x20\x3C\x2F\x73\x70\x61\x6E\x3E","\x3C\x73\x70\x61\x6E\x20\x73\x74\x79\x6C\x65\x3D\x22\x63\x6F\x6C\x6F\x72\x3A","\x6D\x65\x73\x73\x61\x67\x65\x54\x65\x78\x74\x43\x6F\x6C\x6F\x72","\x3B\x20\x66\x6F\x6E\x74\x2D\x77\x65\x69\x67\x68\x74\x3A\x37\x30\x30\x3B\x22\x3E","\x3C\x2F\x73\x70\x61\x6E\x3E\x3A\x20","\x3C\x73\x70\x61\x6E\x20\x63\x6C\x61\x73\x73\x3D\x22\x6D\x65\x73\x73\x61\x67\x65\x2D\x74\x65\x78\x74\x22\x3E","\x70\x65\x72\x66\x65\x63\x74\x53\x63\x72\x6F\x6C\x6C\x62\x61\x72","\x73\x63\x72\x6F\x6C\x6C\x48\x65\x69\x67\x68\x74","\x61\x6E\x69\x6D\x61\x74\x65","\x61\x67\x61\x72\x74\x6F\x6F\x6C\x74\x65\x61\x6D\x6D\x61\x74\x65\x6E\x69\x63\x6B\x73","\x6F\x67\x61\x72\x47\x65\x74\x4D\x61\x70\x53\x69\x7A\x65","\x6F\x67\x61\x72\x47\x65\x74\x4D\x61\x70\x4F\x66\x66\x73\x65\x74","\x6D\x69\x6E\x69\x6D\x61\x70\x4F\x66\x66\x73\x65\x74\x58","\x6D\x69\x6E\x69\x6D\x61\x70\x4F\x66\x66\x73\x65\x74\x59","\x6D\x69\x6E\x69\x6D\x61\x70\x54\x65\x61\x6D\x6D\x61\x74\x65\x73\x53\x69\x7A\x65","\x32\x64","\x67\x65\x74\x43\x6F\x6E\x74\x65\x78\x74","\x63\x6C\x65\x61\x72\x52\x65\x63\x74","\x66\x6F\x6E\x74","\x6D\x69\x6E\x69\x6D\x61\x70\x4E\x69\x63\x6B\x46\x6F\x6E\x74","\x74\x6F\x70\x35\x73\x6B\x69\x6E\x73","\x31\x2E\x20","\x73\x6F\x72\x74","\x61\x67\x61\x72\x74\x6F\x6F\x6C\x6D\x69\x6E\x69\x6D\x61\x70\x42\x61\x6C\x6C\x73","\x70\x72\x65\x64\x69\x63\x74\x65\x64\x47\x68\x6F\x73\x74\x43\x65\x6C\x6C\x73\x41\x72\x72\x61\x79","\x70\x72\x65\x64\x69\x63\x74\x65\x64\x47\x68\x6F\x73\x74\x43\x65\x6C\x6C\x73","\x6C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x70\x6F\x73","\x73\x68\x69\x66\x74","\x70\x75\x73\x68","\x63\x75\x73\x74\x6F\x6D\x53\x6B\x69\x6E\x73\x4D\x61\x70","\x5F\x63\x61\x63\x68\x65\x64\x32","\x63\x75\x73\x74\x6F\x6D\x53\x6B\x69\x6E\x73\x43\x61\x63\x68\x65","\x3C\x61\x20\x68\x72\x65\x66\x3D\x22\x23\x22\x20\x69\x64\x3D\x22\x70\x6F\x73\x2D\x73\x6B\x69\x6E\x22\x20\x63\x6C\x61\x73\x73\x3D\x20\x22\x73\x65\x74\x2D\x74\x61\x72\x67\x65\x74\x22\x20\x64\x61\x74\x61\x2D\x75\x73\x65\x72\x2D\x69\x64\x3D\x22","\x22\x73\x74\x79\x6C\x65\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20","\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x33\x30\x70\x78\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x34\x30\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x69\x6E\x6C\x69\x6E\x65\x2D\x62\x6C\x6F\x63\x6B\x3B\x22\x3E\x3C\x73\x70\x61\x6E\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x20\x61\x62\x73\x6F\x6C\x75\x74\x65\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x6C\x65\x66\x74\x3A\x20\x32\x70\x78\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x32\x36\x70\x78\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x32\x36\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x69\x6E\x6C\x69\x6E\x65\x2D\x62\x6C\x6F\x63\x6B\x3B\x22\x20\x61\x6C\x74\x3D\x22\x22\x3E","\x6F\x75\x74\x65\x72\x48\x54\x4D\x4C","\x3C\x2F\x73\x70\x61\x6E\x3E\x20","\x3C\x2F\x61\x3E\x3C\x64\x69\x76\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x2D\x33\x30\x70\x78\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x6C\x65\x66\x74\x3A\x20\x33\x32\x70\x78\x3B\x22\x3E","\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x33\x30\x70\x78\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x34\x30\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x69\x6E\x6C\x69\x6E\x65\x2D\x62\x6C\x6F\x63\x6B\x3B\x22\x3E\x3C\x69\x6D\x67\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x20\x61\x62\x73\x6F\x6C\x75\x74\x65\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x6C\x65\x66\x74\x3A\x20\x32\x70\x78\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x32\x36\x70\x78\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x32\x36\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x69\x6E\x6C\x69\x6E\x65\x2D\x62\x6C\x6F\x63\x6B\x3B\x22\x20\x73\x72\x63\x20\x3D\x20\x22\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x62\x61\x6E\x6E\x65\x72\x73\x2F\x69\x63\x6F\x6E\x61\x67\x61\x72\x69\x6F\x74\x6F\x6F\x6C\x2E\x70\x6E\x67\x22\x20\x61\x6C\x74\x3D\x22\x22\x3E\x20","\x67\x68\x6F\x73\x74\x43\x65\x6C\x6C\x73","\x3C\x73\x70\x61\x6E\x20\x63\x6C\x61\x73\x73\x3D\x22\x68\x75\x64\x2D\x6D\x61\x69\x6E\x2D\x63\x6F\x6C\x6F\x72\x22\x3E\x5B","\x5D\x3C\x2F\x73\x70\x61\x6E\x3E","\x3C\x73\x70\x61\x6E\x20\x63\x6C\x61\x73\x73\x3D\x22\x74\x6F\x70\x35\x2D\x6D\x61\x73\x73\x2D\x63\x6F\x6C\x6F\x72\x22\x3E\x5B","\x6D\x61\x73\x73","\x73\x68\x6F\x72\x74\x4D\x61\x73\x73\x46\x6F\x72\x6D\x61\x74","\x5D\x3C\x2F\x73\x70\x61\x6E\x3E\x20","\x43\x33","\x3C\x62\x72\x2F\x3E","\x2E\x20","\x6D\x69\x6E\x69\x6D\x61\x70\x5F\x73\x68\x6F\x77","\x5B","\x74\x67\x61\x72\x5F\x70\x72\x65\x66\x69\x78","\x5D","\x74\x65\x78\x74\x41\x6C\x69\x67\x6E","\x63\x65\x6E\x74\x65\x72","\x6C\x69\x6E\x65\x57\x69\x64\x74\x68","\x6D\x69\x6E\x69\x6D\x61\x70\x4E\x69\x63\x6B\x53\x74\x72\x6F\x6B\x65\x53\x69\x7A\x65","\x73\x74\x72\x6F\x6B\x65\x53\x74\x79\x6C\x65","\x6D\x69\x6E\x69\x6D\x61\x70\x4E\x69\x63\x6B\x53\x74\x72\x6F\x6B\x65\x43\x6F\x6C\x6F\x72","\x73\x74\x72\x6F\x6B\x65\x54\x65\x78\x74","\x62\x65\x67\x69\x6E\x50\x61\x74\x68","\x70\x69\x32","\x61\x72\x63","\x63\x6C\x6F\x73\x65\x50\x61\x74\x68","\x66\x69\x6C\x6C","\x75\x73\x65\x72\x5F\x73\x68\x6F\x77","\x3C\x2F\x64\x69\x76\x3E\x3C\x73\x70\x61\x6E\x20\x73\x74\x79\x6C\x65\x20\x3D\x20\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x33\x30\x70\x78\x3B\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x68\x75\x64\x2D\x6D\x61\x69\x6E\x2D\x63\x6F\x6C\x6F\x72\x20\x6F\x67\x69\x63\x6F\x6E\x2D\x75\x73\x65\x72\x73\x22\x3E\x3C\x2F\x73\x70\x61\x6E\x3E\x20\x3A\x20\x3C\x73\x70\x61\x6E\x20\x69\x64\x3D\x22\x74\x6F\x70\x35\x2D\x74\x6F\x74\x61\x6C\x2D\x70\x6C\x61\x79\x65\x72\x73\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x74\x6F\x70\x35\x2D\x6D\x61\x73\x73\x2D\x63\x6F\x6C\x6F\x72\x22\x3E","\x6D\x61\x70\x53\x69\x7A\x65","\x6D\x61\x70\x4F\x66\x66\x73\x65\x74","\x74\x79\x70\x65","\x64\x61\x74\x61\x2D\x61\x6F\x32\x74\x2D\x63\x6F\x6E\x66\x69\x67","\x63\x68\x65\x63\x6B\x62\x6F\x78","\x63\x68\x65\x63\x6B\x65\x64","\x65\x61\x63\x68","\x5B\x64\x61\x74\x61\x2D\x61\x6F\x32\x74\x2D\x63\x6F\x6E\x66\x69\x67\x5D","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x5F","\x6C\x6F\x63\x61\x6C\x53\x74\x6F\x72\x61\x67\x65","\x73\x63\x72\x69\x70\x74","\x63\x72\x65\x61\x74\x65\x45\x6C\x65\x6D\x65\x6E\x74","\x74\x65\x78\x74\x2F\x6A\x61\x76\x61\x73\x63\x72\x69\x70\x74","\x75\x6E\x64\x65\x66\x69\x6E\x65\x64","\x6F\x6E\x6C\x6F\x61\x64","\x61\x70\x70\x65\x6E\x64\x43\x68\x69\x6C\x64","\x26\x23\x30\x33\x39\x3B","\x26\x71\x75\x6F\x74\x3B","\x26\x67\x74\x3B","\x26\x6C\x74\x3B","\x26\x61\x6D\x70\x3B","\x4C\x4D\x42\x6F\x74\x73\x45\x6E\x61\x62\x6C\x65\x64","\x61\x5B\x68\x72\x65\x66\x3D\x22\x23\x6D\x61\x69\x6E\x2D\x70\x61\x6E\x65\x6C\x22\x5D","\x66\x61\x64\x65\x49\x6E","\x23\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x46\x61\x64\x65","\x23\x6E\x6F\x74\x65\x73","\x23\x73\x74\x61\x74\x73\x49\x6E\x66\x6F","\x23\x73\x65\x61\x72\x63\x68\x48\x75\x64","\x23\x73\x65\x61\x72\x63\x68\x4C\x6F\x67","\x3C\x70\x20\x73\x74\x79\x6C\x65\x3D\x22\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x77\x68\x69\x74\x65\x2D\x73\x70\x61\x63\x65\x3A\x20\x6E\x6F\x77\x72\x61\x70\x3B\x6D\x61\x72\x67\x69\x6E\x2D\x62\x6F\x74\x74\x6F\x6D\x3A\x20\x31\x30\x70\x78\x3B\x22\x3E","\x3C\x73\x70\x61\x6E\x20\x63\x6C\x61\x73\x73\x3D\x22\x6D\x61\x69\x6E\x2D\x63\x6F\x6C\x6F\x72\x22\x3E","\x73\x75\x62\x73\x74\x72\x69\x6E\x67","\x3C\x2F\x73\x70\x61\x6E\x3E\x20\x26\x6E\x62\x73\x70\x3B","\x3C\x61\x20\x68\x72\x65\x66\x3D\x22\x6A\x61\x76\x61\x73\x63\x72\x69\x70\x74\x3A\x76\x6F\x69\x64\x28\x30\x29\x3B\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x6C\x6F\x67\x45\x6E\x74\x72\x79\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x6B\x65\x6E\x3D\x22","\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x63\x6F\x6C\x6F\x72\x3A\x20\x6C\x69\x67\x68\x74\x67\x72\x65\x79\x3B\x20\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x20\x31\x34\x70\x78\x3B\x22\x3E","\x3C\x2F\x61\x3E\x3C\x2F\x70\x3E","\x23\x6C\x6F\x67","\x66\x69\x72\x73\x74","\x23\x6C\x6F\x67\x20\x70","\x3C\x61\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x63\x6F\x6E\x6E\x65\x63\x74\x74\x6F\x28\x60","\x60\x29\x3B\x72\x65\x74\x75\x72\x6E\x20\x66\x61\x6C\x73\x65\x3B\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x6C\x6F\x67\x45\x6E\x74\x72\x79\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x6B\x65\x6E\x3D\x22","\x60\x29\x3B\x63\x6F\x6E\x6E\x65\x63\x74\x74\x6F\x32\x28\x60","\x60\x29\x3B\x63\x6F\x6E\x6E\x65\x63\x74\x74\x6F\x33\x28\x60","\x3C\x61\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x63\x6F\x6E\x6E\x65\x63\x74\x74\x6F\x31\x61\x28\x60","\x23\x73\x65\x61\x72\x63\x68\x49\x6E\x70\x75\x74","\x53\x65\x72\x76\x65\x72\x20\x6E\x6F\x74\x20\x61\x76\x61\x69\x6C\x61\x62\x6C\x65\x21","\x23\x73\x65\x72\x76\x65\x72\x2D\x77\x73","\x23\x73\x65\x72\x76\x65\x72\x2D\x63\x6F\x6E\x6E\x65\x63\x74","\x73\x6C\x6F\x77","\x67\x65\x74\x45\x6C\x65\x6D\x65\x6E\x74\x73\x42\x79\x54\x61\x67\x4E\x61\x6D\x65","\x3C\x73\x74\x79\x6C\x65\x20\x74\x79\x70\x65\x3D\x22\x74\x65\x78\x74\x2F\x63\x73\x73\x22\x20\x69\x64\x3D\x22\x52\x4E\x43\x4E\x22\x3E\x2E\x61\x67\x61\x72\x69\x6F\x2D\x70\x61\x6E\x65\x6C\x2C\x20\x2E\x63\x65\x6E\x74\x65\x72\x2D\x63\x6F\x6E\x74\x61\x69\x6E\x65\x72\x2C\x20\x2E\x62\x74\x6E\x2C\x20\x2E\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x2C\x20","\x2E\x69\x6E\x70\x75\x74\x2D\x67\x72\x6F\x75\x70\x2D\x61\x64\x64\x6F\x6E\x2C\x20\x2E\x69\x6E\x70\x75\x74\x2D\x67\x72\x6F\x75\x70\x2D\x73\x6D\x3E\x2E\x69\x6E\x70\x75\x74\x2D\x67\x72\x6F\x75\x70\x2D\x61\x64\x64\x6F\x6E\x2C\x20\x2E\x61\x67\x61\x72\x69\x6F\x2D\x70\x61\x72\x74\x79\x2C\x20\x2E\x61\x67\x61\x72\x69\x6F\x2D\x73\x69\x64\x65\x2D\x70\x61\x6E\x65\x6C\x7B\x62\x6F\x72\x64\x65\x72\x2D\x72\x61\x64\x69\x75\x73\x3A\x20\x31\x30\x70\x78\x3B\x7D\x2E\x6D\x65\x6E\x75\x2D\x74\x61\x62\x73\x2C","\x23\x6D\x61\x69\x6E\x2D\x70\x61\x6E\x65\x6C\x2C\x20\x23\x70\x72\x6F\x66\x69\x6C\x65\x2C\x20\x23\x6C\x65\x67\x65\x6E\x64\x2C\x20\x23\x6F\x67\x2D\x73\x65\x74\x74\x69\x6E\x67\x73\x2C\x20\x23\x74\x68\x65\x6D\x65\x2C\x20\x23\x6D\x75\x73\x69\x63\x2C\x20\x23\x68\x6F\x74\x6B\x65\x79\x73\x7B\x62\x6F\x72\x64\x65\x72\x2D\x72\x61\x64\x69\x75\x73\x3A\x20\x31\x30\x70\x78\x20\x31\x30\x70\x78\x20\x30\x20\x30\x3B\x7D\x20\x23\x68\x6F\x74\x6B\x65\x79\x73\x20\x7B\x62\x6F\x72\x64\x65\x72\x2D\x72\x61\x64\x69\x75\x73\x3A\x20\x31\x30\x70\x78\x3B\x7D\x20\x2E\x73\x6B\x69\x6E\x2C\x20\x2E\x69\x6E\x70\x75\x74\x2D\x67\x72\x6F\x75\x70\x2D\x62\x74\x6E\x2C\x20\x2E\x69\x6E\x70\x75\x74\x2D\x67\x72\x6F\x75\x70\x2E\x6E\x69\x63\x6B\x20\x7B\x62\x6F\x72\x64\x65\x72\x2D\x72\x61\x64\x69\x75\x73\x3A\x20\x30\x20\x31\x35\x70\x78\x20\x31\x35\x70\x78\x20\x30\x3B\x7D\x20\x20","\x2E\x63\x6F\x6C\x6F\x72\x70\x69\x63\x6B\x65\x72\x2D\x65\x6C\x65\x6D\x65\x6E\x74\x20\x2E\x69\x6E\x70\x75\x74\x2D\x67\x72\x6F\x75\x70\x2D\x61\x64\x64\x6F\x6E\x20\x69\x2C\x20\x2E\x63\x6F\x6C\x6F\x72\x70\x69\x63\x6B\x65\x72\x2D\x65\x6C\x65\x6D\x65\x6E\x74\x20\x2E\x61\x64\x64\x2D\x6F\x6E\x20\x69\x7B\x20\x62\x6F\x72\x64\x65\x72\x2D\x72\x61\x64\x69\x75\x73\x3A\x20\x35\x30\x25\x3B\x20\x7D\x2E\x61\x67\x61\x72\x69\x6F\x2D\x70\x72\x6F\x66\x69\x6C\x65\x2D\x70\x69\x63\x74\x75\x72\x65\x20\x7B\x20\x62\x6F\x72\x64\x65\x72\x2D\x72\x61\x64\x69\x75\x73\x3A\x20\x33\x32\x70\x78\x3B\x7D","\x23\x6D\x65\x6E\x75\x2D\x66\x6F\x6F\x74\x65\x72\x20\x7B\x20\x62\x6F\x72\x64\x65\x72\x2D\x72\x61\x64\x69\x75\x73\x3A\x20\x30\x20\x30\x20\x31\x30\x70\x78\x20\x31\x30\x70\x78\x3B\x20\x7D\x20\x23\x6C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x2D\x68\x75\x64\x20\x7B\x20\x62\x6F\x72\x64\x65\x72\x2D\x72\x61\x64\x69\x75\x73\x3A\x20\x31\x35\x70\x78\x3B\x7D\x20\x23\x64\x72\x6F\x70\x44\x6F\x77\x6E\x2C\x20\x23\x64\x72\x6F\x70\x44\x6F\x77\x6E\x32\x20\x7B\x20\x62\x6F\x72\x64\x65\x72\x2D\x72\x61\x64\x69\x75\x73\x3A\x20\x31\x35\x70\x78\x3B\x7D\x20\x23\x6D\x69\x6E\x69\x6D\x61\x70\x2D\x68\x75\x64\x20\x7B\x20\x62\x6F\x72\x64\x65\x72\x2D\x72\x61\x64\x69\x75\x73\x3A\x20\x30\x20\x30\x20\x31\x35\x70\x78\x20\x31\x35\x70\x78\x3B\x7D","\x23\x74\x6F\x70\x35\x2D\x68\x75\x64\x7B\x20\x62\x6F\x72\x64\x65\x72\x2D\x72\x61\x64\x69\x75\x73\x3A\x20\x31\x35\x70\x78\x3B\x20\x7D\x20\x23\x74\x61\x72\x67\x65\x74\x2D\x68\x75\x64\x7B\x20\x62\x6F\x72\x64\x65\x72\x2D\x72\x61\x64\x69\x75\x73\x3A\x20\x31\x35\x70\x78\x3B\x20\x7D\x20\x23\x6C\x65\x67\x65\x6E\x64\x41\x64\x49\x6D\x67\x2C\x20\x23\x73\x74\x61\x74\x73\x2D\x68\x75\x64\x20\x7B\x20\x62\x6F\x72\x64\x65\x72\x2D\x72\x61\x64\x69\x75\x73\x3A\x20\x31\x30\x70\x78\x3B\x20\x7D\x20","\x23\x74\x69\x6D\x65\x2D\x68\x75\x64\x20\x7B\x20\x62\x6F\x72\x64\x65\x72\x2D\x72\x61\x64\x69\x75\x73\x3A\x20\x31\x30\x70\x78\x3B\x20\x7D\x20\x3C\x2F\x73\x74\x79\x6C\x65\x3E","\x5B\x69\x6D\x67\x5D","\x5B\x2F\x69\x6D\x67\x5D","\x73\x65\x6E\x64\x43\x68\x61\x74\x4D\x65\x73\x73\x61\x67\x65","\x23\x70\x69\x63\x31\x64\x61\x74\x61","\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65","\x23\x73\x65\x6E\x64\x69\x63\x6F\x6E\x31","\x23\x70\x69\x63\x32\x64\x61\x74\x61","\x23\x73\x65\x6E\x64\x69\x63\x6F\x6E\x32","\x23\x70\x69\x63\x33\x64\x61\x74\x61","\x23\x73\x65\x6E\x64\x69\x63\x6F\x6E\x33","\x23\x70\x69\x63\x34\x64\x61\x74\x61","\x23\x73\x65\x6E\x64\x69\x63\x6F\x6E\x34","\x23\x70\x69\x63\x35\x64\x61\x74\x61","\x23\x73\x65\x6E\x64\x69\x63\x6F\x6E\x35","\x23\x70\x69\x63\x36\x64\x61\x74\x61","\x23\x73\x65\x6E\x64\x69\x63\x6F\x6E\x36","\x5B\x79\x74\x5D","\x5B\x2F\x79\x74\x5D","\x23\x79\x74\x31\x64\x61\x74\x61","\x23\x73\x65\x6E\x64\x79\x74\x31","\x23\x79\x74\x32\x64\x61\x74\x61","\x23\x73\x65\x6E\x64\x79\x74\x32","\x23\x79\x74\x33\x64\x61\x74\x61","\x23\x73\x65\x6E\x64\x79\x74\x33","\x23\x79\x74\x34\x64\x61\x74\x61","\x23\x73\x65\x6E\x64\x79\x74\x34","\x23\x79\x74\x35\x64\x61\x74\x61","\x23\x73\x65\x6E\x64\x79\x74\x35","\x23\x79\x74\x36\x64\x61\x74\x61","\x23\x73\x65\x6E\x64\x79\x74\x36","\x23\x79\x74\x31\x75\x72\x6C","\x23\x79\x74\x32\x75\x72\x6C","\x23\x79\x74\x33\x75\x72\x6C","\x23\x79\x74\x34\x75\x72\x6C","\x23\x79\x74\x35\x75\x72\x6C","\x23\x79\x74\x36\x75\x72\x6C","\x23\x69\x6D\x61\x67\x65\x73\x2D\x68\x75\x64","\x23\x6D\x73\x67\x63\x6F\x6D\x6D\x61\x6E\x64\x73\x2D\x68\x75\x64","\x23\x79\x74\x2D\x68\x75\x64","\x23\x73\x63\x72\x69\x70\x74\x69\x6E\x67\x2D\x68\x75\x64","\x23\x6D\x69\x6E\x69\x6D\x61\x70\x50\x69\x63\x74\x75\x72\x65","\x23\x6C\x65\x61\x64\x62\x50\x69\x63\x74\x75\x72\x65","\x23\x74\x65\x61\x6D\x62\x50\x69\x63\x74\x75\x72\x65","\x23\x63\x61\x6E\x76\x61\x73\x50\x69\x63\x74\x75\x72\x65","\x23\x6C\x65\x61\x64\x62\x74\x65\x78\x74","\x23\x74\x65\x61\x6D\x62\x74\x65\x78\x74","\x23\x69\x6D\x67\x55\x72\x6C","\x23\x69\x6D\x67\x48\x72\x65\x66","\x23\x6D\x69\x6E\x62\x74\x65\x78\x74","\x23\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x50\x69\x63","\x23\x70\x69\x63\x31\x75\x72\x6C","\x23\x70\x69\x63\x32\x75\x72\x6C","\x23\x70\x69\x63\x33\x75\x72\x6C","\x23\x70\x69\x63\x34\x75\x72\x6C","\x23\x70\x69\x63\x35\x75\x72\x6C","\x23\x70\x69\x63\x36\x75\x72\x6C","\x23\x63\x68\x61\x6E\x67\x65\x70\x68\x6F\x74\x6F\x73","\x6C\x61\x73\x74\x53\x65\x6E\x74\x43\x6C\x61\x6E\x54\x61\x67","\x4C\x65\x67\x65\x6E\x64\x2E\x4D\x6F\x64\x26\x3F\x70\x6C\x61\x79\x65\x72\x3D","\x26\x3F\x63\x6F\x6D\x3D","\x26\x3F\x64\x6F\x3D","\x63\x72\x65\x61\x74\x65\x54\x65\x78\x74\x4E\x6F\x64\x65","\x6A\x61\x76\x61\x73\x63\x72\x69\x70\x74","\x73\x74\x79\x6C\x65","\x74\x65\x78\x74\x2F\x63\x73\x73","\x73\x74\x79\x6C\x65\x73\x68\x65\x65\x74","\x23\x74\x63\x6D\x2C\x23\x74\x63\x6D\x3E\x23\x74\x63\x6D\x2D\x6D\x61\x69\x6E\x3E\x64\x69\x76\x3E\x64\x69\x76\x7B\x6F\x76\x65\x72\x66\x6C\x6F\x77\x2D\x78\x3A\x68\x69\x64\x64\x65\x6E\x3B\x6F\x76\x65\x72\x66\x6C\x6F\x77\x2D\x79\x3A\x61\x75\x74\x6F\x7D\x23\x74\x63\x6D\x3E\x23\x74\x63\x6D\x2D\x68\x65\x61\x64\x65\x72\x2C\x23\x74\x63\x6D\x3E\x23\x74\x63\x6D\x2D\x6D\x61\x69\x6E\x3E\x64\x69\x76\x7B\x74\x65\x78\x74\x2D\x61\x6C\x69\x67\x6E\x3A\x63\x65\x6E\x74\x65\x72\x7D\x40\x6B\x65\x79\x66\x72\x61\x6D\x65\x73\x20\x62\x6F\x75\x6E\x63\x65\x2D\x69\x6E\x7B\x30\x25\x2C\x31\x30\x30\x25\x2C\x32\x30\x25\x2C\x34\x30\x25\x2C\x36\x30\x25\x2C\x38\x30\x25\x7B\x2D\x77\x65\x62\x6B\x69\x74\x2D\x74\x72\x61\x6E\x73\x69\x74\x69\x6F\x6E\x2D\x74\x69\x6D\x69\x6E\x67\x2D\x66\x75\x6E\x63\x74\x69\x6F\x6E\x3A\x63\x75\x62\x69\x63\x2D\x62\x65\x7A\x69\x65\x72\x28\x2E\x32\x31\x35\x2C\x2E\x36\x31\x2C\x2E\x33\x35\x35\x2C\x31\x29\x3B\x74\x72\x61\x6E\x73\x69\x74\x69\x6F\x6E\x2D\x74\x69\x6D\x69\x6E\x67\x2D\x66\x75\x6E\x63\x74\x69\x6F\x6E\x3A\x63\x75\x62\x69\x63\x2D\x62\x65\x7A\x69\x65\x72\x28\x2E\x32\x31\x35\x2C\x2E\x36\x31\x2C\x2E\x33\x35\x35\x2C\x31\x29\x7D\x30\x25\x7B\x6F\x70\x61\x63\x69\x74\x79\x3A\x30\x3B\x2D\x77\x65\x62\x6B\x69\x74\x2D\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x2E\x33\x2C\x2E\x33\x2C\x2E\x33\x29\x3B\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x2E\x33\x2C\x2E\x33\x2C\x2E\x33\x29\x7D\x32\x30\x25\x7B\x2D\x77\x65\x62\x6B\x69\x74\x2D\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x31\x2E\x31\x2C\x31\x2E\x31\x2C\x31\x2E\x31\x29\x3B\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x31\x2E\x31\x2C\x31\x2E\x31\x2C\x31\x2E\x31\x29\x7D\x34\x30\x25\x7B\x2D\x77\x65\x62\x6B\x69\x74\x2D\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x2E\x39\x2C\x2E\x39\x2C\x2E\x39\x29\x3B\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x2E\x39\x2C\x2E\x39\x2C\x2E\x39\x29\x7D\x36\x30\x25\x7B\x6F\x70\x61\x63\x69\x74\x79\x3A\x31\x3B\x2D\x77\x65\x62\x6B\x69\x74\x2D\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x31\x2E\x30\x33\x2C\x31\x2E\x30\x33\x2C\x31\x2E\x30\x33\x29\x3B\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x31\x2E\x30\x33\x2C\x31\x2E\x30\x33\x2C\x31\x2E\x30\x33\x29\x7D\x38\x30\x25\x7B\x2D\x77\x65\x62\x6B\x69\x74\x2D\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x2E\x39\x37\x2C\x2E\x39\x37\x2C\x2E\x39\x37\x29\x3B\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x2E\x39\x37\x2C\x2E\x39\x37\x2C\x2E\x39\x37\x29\x7D\x31\x30\x30\x25\x7B\x6F\x70\x61\x63\x69\x74\x79\x3A\x31\x3B\x2D\x77\x65\x62\x6B\x69\x74\x2D\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x31\x2C\x31\x2C\x31\x29\x3B\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x31\x2C\x31\x2C\x31\x29\x7D\x7D\x40\x2D\x77\x65\x62\x6B\x69\x74\x2D\x6B\x65\x79\x66\x72\x61\x6D\x65\x73\x20\x62\x6F\x75\x6E\x63\x65\x2D\x69\x6E\x7B\x30\x25\x2C\x31\x30\x30\x25\x2C\x32\x30\x25\x2C\x34\x30\x25\x2C\x36\x30\x25\x2C\x38\x30\x25\x7B\x2D\x77\x65\x62\x6B\x69\x74\x2D\x74\x72\x61\x6E\x73\x69\x74\x69\x6F\x6E\x2D\x74\x69\x6D\x69\x6E\x67\x2D\x66\x75\x6E\x63\x74\x69\x6F\x6E\x3A\x63\x75\x62\x69\x63\x2D\x62\x65\x7A\x69\x65\x72\x28\x2E\x32\x31\x35\x2C\x2E\x36\x31\x2C\x2E\x33\x35\x35\x2C\x31\x29\x3B\x74\x72\x61\x6E\x73\x69\x74\x69\x6F\x6E\x2D\x74\x69\x6D\x69\x6E\x67\x2D\x66\x75\x6E\x63\x74\x69\x6F\x6E\x3A\x63\x75\x62\x69\x63\x2D\x62\x65\x7A\x69\x65\x72\x28\x2E\x32\x31\x35\x2C\x2E\x36\x31\x2C\x2E\x33\x35\x35\x2C\x31\x29\x7D\x30\x25\x7B\x6F\x70\x61\x63\x69\x74\x79\x3A\x30\x3B\x2D\x77\x65\x62\x6B\x69\x74\x2D\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x2E\x33\x2C\x2E\x33\x2C\x2E\x33\x29\x3B\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x2E\x33\x2C\x2E\x33\x2C\x2E\x33\x29\x7D\x32\x30\x25\x7B\x2D\x77\x65\x62\x6B\x69\x74\x2D\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x31\x2E\x31\x2C\x31\x2E\x31\x2C\x31\x2E\x31\x29\x3B\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x31\x2E\x31\x2C\x31\x2E\x31\x2C\x31\x2E\x31\x29\x7D\x34\x30\x25\x7B\x2D\x77\x65\x62\x6B\x69\x74\x2D\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x2E\x39\x2C\x2E\x39\x2C\x2E\x39\x29\x3B\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x2E\x39\x2C\x2E\x39\x2C\x2E\x39\x29\x7D\x36\x30\x25\x7B\x6F\x70\x61\x63\x69\x74\x79\x3A\x31\x3B\x2D\x77\x65\x62\x6B\x69\x74\x2D\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x31\x2E\x30\x33\x2C\x31\x2E\x30\x33\x2C\x31\x2E\x30\x33\x29\x3B\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x31\x2E\x30\x33\x2C\x31\x2E\x30\x33\x2C\x31\x2E\x30\x33\x29\x7D\x38\x30\x25\x7B\x2D\x77\x65\x62\x6B\x69\x74\x2D\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x2E\x39\x37\x2C\x2E\x39\x37\x2C\x2E\x39\x37\x29\x3B\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x2E\x39\x37\x2C\x2E\x39\x37\x2C\x2E\x39\x37\x29\x7D\x31\x30\x30\x25\x7B\x6F\x70\x61\x63\x69\x74\x79\x3A\x31\x3B\x2D\x77\x65\x62\x6B\x69\x74\x2D\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x31\x2C\x31\x2C\x31\x29\x3B\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x31\x2C\x31\x2C\x31\x29\x7D\x7D\x40\x2D\x6D\x6F\x7A\x2D\x6B\x65\x79\x66\x72\x61\x6D\x65\x73\x20\x62\x6F\x75\x6E\x63\x65\x2D\x69\x6E\x7B\x30\x25\x2C\x31\x30\x30\x25\x2C\x32\x30\x25\x2C\x34\x30\x25\x2C\x36\x30\x25\x2C\x38\x30\x25\x7B\x2D\x6D\x6F\x7A\x2D\x74\x72\x61\x6E\x73\x69\x74\x69\x6F\x6E\x2D\x74\x69\x6D\x69\x6E\x67\x2D\x66\x75\x6E\x63\x74\x69\x6F\x6E\x3A\x63\x75\x62\x69\x63\x2D\x62\x65\x7A\x69\x65\x72\x28\x2E\x32\x31\x35\x2C\x2E\x36\x31\x2C\x2E\x33\x35\x35\x2C\x31\x29\x3B\x74\x72\x61\x6E\x73\x69\x74\x69\x6F\x6E\x2D\x74\x69\x6D\x69\x6E\x67\x2D\x66\x75\x6E\x63\x74\x69\x6F\x6E\x3A\x63\x75\x62\x69\x63\x2D\x62\x65\x7A\x69\x65\x72\x28\x2E\x32\x31\x35\x2C\x2E\x36\x31\x2C\x2E\x33\x35\x35\x2C\x31\x29\x7D\x30\x25\x7B\x6F\x70\x61\x63\x69\x74\x79\x3A\x30\x3B\x2D\x6D\x6F\x7A\x2D\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x2E\x33\x2C\x2E\x33\x2C\x2E\x33\x29\x3B\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x2E\x33\x2C\x2E\x33\x2C\x2E\x33\x29\x7D\x32\x30\x25\x7B\x2D\x6D\x6F\x7A\x2D\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x31\x2E\x31\x2C\x31\x2E\x31\x2C\x31\x2E\x31\x29\x3B\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x31\x2E\x31\x2C\x31\x2E\x31\x2C\x31\x2E\x31\x29\x7D\x34\x30\x25\x7B\x2D\x6D\x6F\x7A\x2D\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x2E\x39\x2C\x2E\x39\x2C\x2E\x39\x29\x3B\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x2E\x39\x2C\x2E\x39\x2C\x2E\x39\x29\x7D\x36\x30\x25\x7B\x6F\x70\x61\x63\x69\x74\x79\x3A\x31\x3B\x2D\x6D\x6F\x7A\x2D\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x31\x2E\x30\x33\x2C\x31\x2E\x30\x33\x2C\x31\x2E\x30\x33\x29\x3B\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x31\x2E\x30\x33\x2C\x31\x2E\x30\x33\x2C\x31\x2E\x30\x33\x29\x7D\x38\x30\x25\x7B\x2D\x6D\x6F\x7A\x2D\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x2E\x39\x37\x2C\x2E\x39\x37\x2C\x2E\x39\x37\x29\x3B\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x2E\x39\x37\x2C\x2E\x39\x37\x2C\x2E\x39\x37\x29\x7D\x31\x30\x30\x25\x7B\x6F\x70\x61\x63\x69\x74\x79\x3A\x31\x3B\x2D\x6D\x6F\x7A\x2D\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x31\x2C\x31\x2C\x31\x29\x3B\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x31\x2C\x31\x2C\x31\x29\x7D\x7D\x23\x74\x63\x6D\x7B\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x66\x69\x78\x65\x64\x3B\x74\x6F\x70\x3A\x32\x30\x25\x3B\x6C\x65\x66\x74\x3A\x31\x25\x3B\x64\x69\x73\x70\x6C\x61\x79\x3A\x62\x6C\x6F\x63\x6B\x3B\x77\x69\x64\x74\x68\x3A\x32\x34\x30\x70\x78\x3B\x6D\x61\x78\x2D\x68\x65\x69\x67\x68\x74\x3A\x39\x36\x25\x3B\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x3A\x72\x67\x62\x61\x28\x30\x2C\x30\x2C\x30\x2C\x2E\x38\x29\x3B\x62\x6F\x72\x64\x65\x72\x3A\x31\x70\x78\x20\x73\x6F\x6C\x69\x64\x20\x23\x34\x34\x34\x3B\x62\x6F\x72\x64\x65\x72\x2D\x72\x61\x64\x69\x75\x73\x3A\x34\x70\x78\x3B\x2D\x77\x65\x62\x6B\x69\x74\x2D\x62\x6F\x72\x64\x65\x72\x2D\x72\x61\x64\x69\x75\x73\x3A\x34\x70\x78\x3B\x2D\x6D\x6F\x7A\x2D\x62\x6F\x72\x64\x65\x72\x2D\x72\x61\x64\x69\x75\x73\x3A\x34\x70\x78\x3B\x7A\x2D\x69\x6E\x64\x65\x78\x3A\x39\x39\x39\x39\x39\x39\x39\x39\x39\x3B\x61\x6E\x69\x6D\x61\x74\x69\x6F\x6E\x3A\x31\x73\x20\x62\x6F\x74\x68\x20\x62\x6F\x75\x6E\x63\x65\x2D\x69\x6E\x3B\x2D\x77\x65\x62\x6B\x69\x74\x2D\x61\x6E\x69\x6D\x61\x74\x69\x6F\x6E\x3A\x31\x73\x20\x62\x6F\x74\x68\x20\x62\x6F\x75\x6E\x63\x65\x2D\x69\x6E\x3B\x2D\x6D\x6F\x7A\x2D\x61\x6E\x69\x6D\x61\x74\x69\x6F\x6E\x3A\x31\x73\x20\x62\x6F\x74\x68\x20\x62\x6F\x75\x6E\x63\x65\x2D\x69\x6E\x7D\x23\x74\x63\x6D\x3E\x23\x74\x63\x6D\x2D\x68\x65\x61\x64\x65\x72\x2C\x23\x74\x63\x6D\x3E\x23\x74\x63\x6D\x2D\x68\x65\x61\x64\x65\x72\x3E\x70\x2C\x23\x74\x63\x6D\x3E\x23\x74\x63\x6D\x2D\x68\x65\x61\x64\x65\x72\x3E\x73\x70\x61\x6E\x7B\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x72\x65\x6C\x61\x74\x69\x76\x65\x3B\x64\x69\x73\x70\x6C\x61\x79\x3A\x62\x6C\x6F\x63\x6B\x7D\x23\x74\x63\x6D\x20\x3A\x66\x6F\x63\x75\x73\x7B\x6F\x75\x74\x6C\x69\x6E\x65\x3A\x30\x7D\x23\x74\x63\x6D\x20\x2A\x7B\x66\x6F\x6E\x74\x2D\x66\x61\x6D\x69\x6C\x79\x3A\x22\x48\x65\x6C\x76\x65\x74\x69\x63\x61\x20\x4E\x65\x75\x65\x22\x2C\x48\x65\x6C\x76\x65\x74\x69\x63\x61\x2C\x41\x72\x69\x61\x6C\x2C\x73\x61\x6E\x73\x2D\x73\x65\x72\x69\x66\x7D\x23\x74\x63\x6D\x3E\x23\x74\x63\x6D\x2D\x68\x65\x61\x64\x65\x72\x7B\x77\x69\x64\x74\x68\x3A\x69\x6E\x69\x74\x69\x61\x6C\x3B\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x3A\x72\x67\x62\x61\x28\x32\x35\x35\x2C\x32\x35\x35\x2C\x32\x35\x35\x2C\x2E\x34\x29\x3B\x70\x61\x64\x64\x69\x6E\x67\x3A\x38\x70\x78\x7D\x23\x74\x63\x6D\x3E\x23\x74\x63\x6D\x2D\x68\x65\x61\x64\x65\x72\x3E\x73\x70\x61\x6E\x7B\x66\x6F\x6E\x74\x2D\x66\x61\x6D\x69\x6C\x79\x3A\x50\x61\x63\x69\x66\x69\x63\x6F\x2C\x63\x75\x72\x73\x69\x76\x65\x3B\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x32\x30\x70\x78\x3B\x63\x6F\x6C\x6F\x72\x3A\x23\x46\x46\x46\x3B\x74\x65\x78\x74\x2D\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x63\x61\x70\x69\x74\x61\x6C\x69\x7A\x65\x3B\x6D\x61\x72\x67\x69\x6E\x3A\x30\x20\x30\x20\x38\x70\x78\x7D\x23\x74\x63\x6D\x3E\x23\x74\x63\x6D\x2D\x68\x65\x61\x64\x65\x72\x3E\x70\x7B\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x31\x32\x70\x78\x3B\x63\x6F\x6C\x6F\x72\x3A\x23\x32\x32\x32\x3B\x6D\x61\x72\x67\x69\x6E\x3A\x30\x7D\x23\x74\x63\x6D\x3E\x23\x74\x63\x6D\x2D\x6D\x61\x69\x6E\x3E\x64\x69\x76\x3E\x64\x69\x76\x2C\x23\x74\x63\x6D\x3E\x23\x74\x63\x6D\x2D\x6D\x61\x69\x6E\x3E\x64\x69\x76\x3E\x73\x70\x61\x6E\x7B\x6D\x61\x72\x67\x69\x6E\x3A\x30\x20\x30\x20\x38\x70\x78\x3B\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x72\x65\x6C\x61\x74\x69\x76\x65\x3B\x64\x69\x73\x70\x6C\x61\x79\x3A\x62\x6C\x6F\x63\x6B\x7D\x23\x74\x63\x6D\x3E\x23\x74\x63\x6D\x2D\x6D\x61\x69\x6E\x2C\x23\x74\x63\x6D\x3E\x23\x74\x63\x6D\x2D\x6D\x61\x69\x6E\x3E\x64\x69\x76\x7B\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x72\x65\x6C\x61\x74\x69\x76\x65\x3B\x64\x69\x73\x70\x6C\x61\x79\x3A\x62\x6C\x6F\x63\x6B\x3B\x77\x69\x64\x74\x68\x3A\x69\x6E\x69\x74\x69\x61\x6C\x7D\x23\x74\x63\x6D\x3E\x23\x74\x63\x6D\x2D\x6D\x61\x69\x6E\x7B\x70\x61\x64\x64\x69\x6E\x67\x3A\x38\x70\x78\x7D\x23\x74\x63\x6D\x3E\x23\x74\x63\x6D\x2D\x6D\x61\x69\x6E\x3E\x64\x69\x76\x3E\x73\x70\x61\x6E\x7B\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x31\x34\x70\x78\x3B\x63\x6F\x6C\x6F\x72\x3A\x23\x46\x46\x46\x3B\x74\x65\x78\x74\x2D\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x63\x61\x70\x69\x74\x61\x6C\x69\x7A\x65\x7D\x23\x74\x63\x6D\x3E\x23\x74\x63\x6D\x2D\x6D\x61\x69\x6E\x3E\x64\x69\x76\x3E\x64\x69\x76\x7B\x77\x69\x64\x74\x68\x3A\x31\x30\x30\x25\x3B\x6D\x61\x78\x2D\x68\x65\x69\x67\x68\x74\x3A\x31\x36\x30\x70\x78\x3B\x6D\x69\x6E\x2D\x68\x65\x69\x67\x68\x74\x3A\x32\x30\x70\x78\x3B\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x3A\x23\x32\x32\x32\x3B\x62\x6F\x72\x64\x65\x72\x3A\x31\x70\x78\x20\x73\x6F\x6C\x69\x64\x20\x23\x34\x34\x34\x3B\x62\x6F\x72\x64\x65\x72\x2D\x72\x61\x64\x69\x75\x73\x3A\x32\x70\x78\x3B\x2D\x77\x65\x62\x6B\x69\x74\x2D\x62\x6F\x72\x64\x65\x72\x2D\x72\x61\x64\x69\x75\x73\x3A\x32\x70\x78\x3B\x2D\x6D\x6F\x7A\x2D\x62\x6F\x72\x64\x65\x72\x2D\x72\x61\x64\x69\x75\x73\x3A\x32\x70\x78\x7D\x23\x74\x63\x6D\x3E\x23\x74\x63\x6D\x2D\x6D\x61\x69\x6E\x3E\x64\x69\x76\x3E\x64\x69\x76\x3E\x73\x70\x61\x6E\x7B\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x72\x65\x6C\x61\x74\x69\x76\x65\x3B\x64\x69\x73\x70\x6C\x61\x79\x3A\x62\x6C\x6F\x63\x6B\x3B\x77\x69\x64\x74\x68\x3A\x31\x30\x30\x25\x3B\x74\x65\x78\x74\x2D\x61\x6C\x69\x67\x6E\x3A\x63\x65\x6E\x74\x65\x72\x3B\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x31\x32\x70\x78\x3B\x63\x6F\x6C\x6F\x72\x3A\x23\x46\x46\x46\x3B\x70\x61\x64\x64\x69\x6E\x67\x3A\x34\x70\x78\x20\x30\x3B\x63\x75\x72\x73\x6F\x72\x3A\x70\x6F\x69\x6E\x74\x65\x72\x7D\x23\x74\x63\x6D\x3E\x23\x74\x63\x6D\x2D\x6D\x61\x69\x6E\x3E\x64\x69\x76\x3E\x64\x69\x76\x3E\x73\x70\x61\x6E\x3A\x68\x6F\x76\x65\x72\x7B\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x3A\x72\x67\x62\x61\x28\x30\x2C\x30\x2C\x30\x2C\x2E\x32\x29\x7D","\x6C","\x6D\x61\x74\x63\x68","\x6C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x20\x6E\x61\x6D\x65\x20\x23","\x73\x70\x61\x6E","\x75","\x74\x63\x6D\x2D\x6C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64","\x73\x63\x6F\x72\x65","\x74\x63\x6D\x2D\x73\x63\x6F\x72\x65","\x6E\x61\x6D\x65\x73","\x74\x63\x6D\x2D\x6E\x61\x6D\x65\x73","\x63\x65\x6C\x6C\x20\x6E\x61\x6D\x65","\x63\x6F\x6E\x63\x61\x74","\x74\x63\x6D","\x74\x6F\x67\x67\x6C\x65\x64","\x3C\x6C\x69\x6E\x6B\x20\x68\x72\x65\x66\x3D\x22\x68\x74\x74\x70\x73\x3A\x2F\x2F\x66\x6F\x6E\x74\x73\x2E\x67\x6F\x6F\x67\x6C\x65\x61\x70\x69\x73\x2E\x63\x6F\x6D\x2F\x63\x73\x73\x3F\x66\x61\x6D\x69\x6C\x79\x3D\x50\x61\x63\x69\x66\x69\x63\x6F\x22\x20\x72\x65\x6C\x3D\x22\x73\x74\x79\x6C\x65\x73\x68\x65\x65\x74\x22\x20\x74\x79\x70\x65\x3D\x22\x74\x65\x78\x74\x2F\x63\x73\x73\x22\x20\x2F\x3E","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x74\x63\x6D\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x64\x69\x73\x70\x6C\x61\x79\x3A\x62\x6C\x6F\x63\x6B\x3B\x22\x3E\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x74\x63\x6D\x2D\x68\x65\x61\x64\x65\x72\x22\x3E\x3C\x73\x70\x61\x6E\x3E\x43\x6F\x70\x79\x20\x54\x6F\x6F\x6C\x73\x3C\x2F\x73\x70\x61\x6E\x3E\x3C\x70\x3E\x43\x6F\x70\x79\x20\x63\x65\x6C\x6C\x20\x6E\x61\x6D\x65\x73\x20\x28\x70\x72\x65\x73\x73\x20\x78\x20\x74\x6F\x20\x73\x68\x6F\x77\x2F\x68\x69\x64\x65\x29\x3C\x2F\x70\x3E\x3C\x2F\x64\x69\x76\x3E\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x74\x63\x6D\x2D\x6D\x61\x69\x6E\x22\x3E\x3C\x64\x69\x76\x3E\x3C\x73\x70\x61\x6E\x20\x73\x74\x79\x6C\x65\x3D\x22\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x3E\x6C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x20\x6E\x61\x6D\x65\x73\x3C\x2F\x73\x70\x61\x6E\x3E\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x74\x63\x6D\x2D\x6C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x3E\x3C\x2F\x64\x69\x76\x3E\x3C\x2F\x64\x69\x76\x3E\x3C\x64\x69\x76\x3E\x3C\x73\x70\x61\x6E\x3E\x63\x65\x6C\x6C\x20\x6E\x61\x6D\x65\x73\x3C\x2F\x73\x70\x61\x6E\x3E\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x74\x63\x6D\x2D\x6E\x61\x6D\x65\x73\x22\x3E\x3C\x2F\x64\x69\x76\x3E\x3C\x2F\x64\x69\x76\x3E\x3C\x64\x69\x76\x3E\x3C\x2F\x64\x69\x76\x3E\x3C\x2F\x64\x69\x76\x3E\x3C\x2F\x64\x69\x76\x3E","\x3C\x73\x70\x61\x6E\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x6A\x61\x76\x61\x73\x63\x72\x69\x70\x74\x3A\x70\x72\x6F\x6D\x70\x74\x28\x27","\x27\x2C\x20\x27","\x27\x29\x22\x3E","\x62\x65\x66\x6F\x72\x65\x65\x6E\x64","\x66\x6F\x6E\x74\x73","\x69\x6E\x73\x65\x72\x74\x41\x64\x6A\x61\x63\x65\x6E\x74\x48\x54\x4D\x4C","\x68\x6F\x74\x6B\x65\x79\x73","\x61\x64\x64\x45\x76\x65\x6E\x74\x4C\x69\x73\x74\x65\x6E\x65\x72","\x66\x69\x6C\x6C\x74\x65\x78\x74\x5F\x6F\x76\x65\x72\x72\x69\x64\x65","\x73\x65\x74\x54\x69\x6D\x65\x6F\x75\x74","\x23\x74\x63\x6D","\x30\x30","\x64\x69\x66\x66\x65\x72\x65\x6E\x63\x65","\x74\x69\x6D\x65\x72\x53\x74\x61\x72\x74\x65\x64","\x74\x69\x6D\x65\x72\x44\x69\x76","\x23\x70\x6C\x61\x79\x74\x69\x6D\x65\x72","\x23\x73\x74\x6F\x70\x74\x69\x6D\x65\x72","\x23\x63\x6C\x65\x61\x72\x74\x69\x6D\x65\x72","\x54\x69\x6D\x65\x72\x4C\x4D\x2E\x74\x69\x6D\x65\x72\x53\x74\x61\x72\x74\x65\x64\x3A\x20","\x74\x69\x6D\x65\x72\x49\x6E\x74\x65\x72\x76\x61\x6C","\x30\x30\x3A\x30\x30","\x75\x72\x6C\x28\x22","\x22\x29","\x23\x6D\x69\x6E\x69\x6D\x61\x70\x2D\x68\x75\x64","\x31\x36\x70\x78\x20\x47\x65\x6F\x72\x67\x69\x61","\x23\x6C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x2D\x68\x75\x64","\x23\x63\x61\x6E\x76\x61\x73","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x73\x69\x7A\x65","\x63\x6F\x76\x65\x72","\x23\x6C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x2D\x68\x75\x64\x20\x3E\x20\x68\x35","\x23\x74\x6F\x70\x35\x2D\x68\x75\x64\x20\x3E\x20\x68\x35","\x23\x64\x69\x73\x63\x77\x65\x62\x68\x6F\x6F\x6B\x31","\x64\x69\x73\x63\x6F\x72\x64\x61\x70\x70\x2E\x63\x6F\x6D\x2F\x61\x70\x69\x2F\x77\x65\x62\x68\x6F\x6F\x6B\x73\x2F","\x64\x69\x73\x63\x6F\x72\x64\x2E\x63\x6F\x6D\x2F\x61\x70\x69\x2F\x77\x65\x62\x68\x6F\x6F\x6B\x73\x2F","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x44\x69\x73\x63\x6F\x72\x64\x53\x49\x50\x2E\x75\x73\x65\x72\x2E\x6A\x73","\x23\x64\x69\x73\x63\x77\x65\x62\x68\x6F\x6F\x6B\x32","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x42\x6C\x65\x65\x64\x69\x6E\x67\x4D\x6F\x64\x2E\x6A\x73","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x72\x6F\x74\x61\x74\x69\x6E\x67\x35\x30\x30\x69\x6D\x61\x67\x65\x73\x2E\x6A\x73","\x23\x6C\x65\x67\x65\x6E\x64\x6C\x61\x6E\x67\x75\x61\x67\x65\x73","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x4C\x61\x6E\x67\x75\x61\x67\x65\x50\x61\x63\x6B\x45\x6E\x67\x6C\x69\x73\x68\x2E\x6A\x73","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x4C\x61\x6E\x67\x75\x61\x67\x65\x50\x61\x63\x6B\x47\x72\x65\x65\x6B\x2E\x6A\x73","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x4C\x61\x6E\x67\x75\x61\x67\x65\x50\x61\x63\x6B\x53\x70\x61\x6E\x69\x73\x68\x2E\x6A\x73","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x4C\x61\x6E\x67\x75\x61\x67\x65\x50\x61\x63\x6B\x42\x75\x6C\x67\x61\x72\x69\x61\x6E\x2E\x6A\x73","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x4C\x61\x6E\x67\x75\x61\x67\x65\x50\x61\x63\x6B\x46\x72\x65\x6E\x63\x68\x2E\x6A\x73","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x4C\x61\x6E\x67\x75\x61\x67\x65\x50\x61\x63\x6B\x41\x72\x61\x62\x69\x63\x2E\x6A\x73","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x4C\x61\x6E\x67\x75\x61\x67\x65\x50\x61\x63\x6B\x54\x72\x61\x64\x69\x74\x69\x6F\x6E\x61\x6C\x43\x68\x69\x6E\x65\x73\x65\x2E\x6A\x73","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x4C\x61\x6E\x67\x75\x61\x67\x65\x50\x61\x63\x6B\x52\x75\x73\x73\x69\x61\x6E\x2E\x6A\x73","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x4C\x61\x6E\x67\x75\x61\x67\x65\x50\x61\x63\x6B\x47\x65\x72\x6D\x61\x6E\x2E\x6A\x73","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x4C\x61\x6E\x67\x75\x61\x67\x65\x50\x61\x63\x6B\x54\x75\x72\x6B\x69\x73\x68\x2E\x6A\x73","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x4C\x61\x6E\x67\x75\x61\x67\x65\x50\x61\x63\x6B\x50\x6F\x6C\x69\x73\x68\x2E\x6A\x73","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x4C\x61\x6E\x67\x75\x61\x67\x65\x50\x61\x63\x6B\x48\x61\x6E\x64\x6C\x65\x72\x2E\x6A\x73","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x63\x64\x6E\x2E\x6F\x67\x61\x72\x69\x6F\x2E\x6F\x76\x68\x2F\x73\x74\x61\x74\x69\x63\x2F\x69\x6D\x67\x2F\x70\x61\x74\x74\x65\x72\x6E\x2E\x70\x6E\x67","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x62\x61\x6E\x6E\x65\x72\x73\x2F\x73\x74\x61\x74\x69\x63\x2F\x69\x6D\x67\x2F\x70\x61\x74\x74\x65\x72\x6E\x2E\x70\x6E\x67","\x75\x72\x6C\x28","\x29","\x23\x6C\x65\x67\x65\x6E\x64","\x62\x6C\x75\x72","\x23\x63\x6F\x70\x79\x4C\x42\x42\x74\x6E","\x23\x64\x72\x6F\x70\x44\x6F\x77\x6E\x3E\x23\x63\x6F\x70\x79\x4C\x42\x42\x74\x6E","\x23\x63\x6F\x70\x79\x53\x49\x50\x61\x6E\x64\x50\x61\x73\x73","\x23\x63\x6F\x70\x79\x53\x49\x50\x50\x61\x73\x73\x4C\x42","\x23\x41\x6E\x69\x6D\x61\x74\x65\x64\x53\x6B\x69\x6E\x42\x74\x6E","\x23\x54\x49\x4D\x45\x63\x61\x6C\x42\x74\x6E","\x6D\x69\x6E\x69\x6D\x61\x70\x50\x69\x63\x74\x75\x72\x65","\x6C\x65\x61\x64\x62\x50\x69\x63\x74\x75\x72\x65","\x74\x65\x61\x6D\x62\x50\x69\x63\x74\x75\x72\x65","\x63\x61\x6E\x76\x61\x73\x50\x69\x63\x74\x75\x72\x65","\x70\x69\x63\x31\x75\x72\x6C","\x70\x69\x63\x32\x75\x72\x6C","\x70\x69\x63\x33\x75\x72\x6C","\x70\x69\x63\x34\x75\x72\x6C","\x70\x69\x63\x35\x75\x72\x6C","\x70\x69\x63\x36\x75\x72\x6C","\x79\x74\x31\x75\x72\x6C","\x79\x74\x32\x75\x72\x6C","\x79\x74\x33\x75\x72\x6C","\x79\x74\x34\x75\x72\x6C","\x79\x74\x35\x75\x72\x6C","\x79\x74\x36\x75\x72\x6C","\x70\x69\x63\x31\x64\x61\x74\x61","\x70\x69\x63\x32\x64\x61\x74\x61","\x70\x69\x63\x33\x64\x61\x74\x61","\x70\x69\x63\x34\x64\x61\x74\x61","\x70\x69\x63\x35\x64\x61\x74\x61","\x70\x69\x63\x36\x64\x61\x74\x61","\x79\x74\x31\x64\x61\x74\x61","\x79\x74\x32\x64\x61\x74\x61","\x79\x74\x33\x64\x61\x74\x61","\x79\x74\x34\x64\x61\x74\x61","\x79\x74\x35\x64\x61\x74\x61","\x79\x74\x36\x64\x61\x74\x61","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x4C\x45\x47\x45\x4E\x44\x41\x64\x73\x35\x22\x3E\x3C\x2F\x64\x69\x76\x3E","\x23\x61\x67\x61\x72\x69\x6F\x2D\x6D\x61\x69\x6E\x2D\x62\x75\x74\x74\x6F\x6E\x73","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x62\x61\x6E\x6E\x65\x72\x73\x2F\x62\x61\x6E\x6E\x65\x72\x44\x79\x69\x6E\x67\x4C\x69\x67\x68\x74","\x6C\x6F\x61\x64","\x23\x4C\x45\x47\x45\x4E\x44\x41\x64\x73\x32","\x79\x65\x73","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x62\x61\x6E\x6E\x65\x72\x73\x2F\x62\x61\x6E\x6E\x65\x72\x53\x74\x6F\x70\x44\x79\x69\x6E\x67\x4C\x69\x67\x68\x74","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x64\x79\x69\x6E\x67\x6C\x69\x67\x68\x74\x2E\x6A\x73","\x23\x74\x6F\x70\x35\x4D\x61\x73\x73\x43\x6F\x6C\x6F\x72","\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74","\x23\x73\x65\x61\x72\x63\x68\x53\x68\x6F\x72\x74\x63\x75\x74","\x23\x64\x72\x6F\x70\x44\x6F\x77\x6E\x33\x3E\x23\x6C\x61\x73\x74\x49\x50\x42\x74\x6E","\x23\x63\x6F\x70\x79\x53\x49\x50\x42\x74\x6E","\x23\x72\x65\x63\x6F\x6E\x6E\x65\x63\x74\x42\x74\x6E","\x23\x56\x6F\x69\x63\x65\x42\x74\x6E","\x23\x4D\x69\x6E\x69\x53\x63\x72\x69\x70\x74\x73","\x23\x53\x65\x6E\x64\x43\x6F\x6D\x6D\x61\x6E\x64\x73","\x23\x73\x68\x6F\x72\x74\x63\x75\x74\x73\x2D\x68\x75\x64\x3E\x23\x49\x6D\x61\x67\x65\x73","\x23\x79\x6F\x75\x74","\x23\x66\x75\x6C\x6C\x73\x63\x72\x65\x65\x6E\x42\x74\x6E","\x23\x43\x75\x74\x6E\x61\x6D\x65\x73","\x23\x6D\x73\x67\x63\x6F\x6D\x6D\x61\x6E\x64\x31","\x23\x6D\x73\x67\x63\x6F\x6D\x6D\x61\x6E\x64\x32","\x23\x6D\x73\x67\x63\x6F\x6D\x6D\x61\x6E\x64\x33","\x23\x6D\x73\x67\x63\x6F\x6D\x6D\x61\x6E\x64\x34","\x23\x6D\x73\x67\x63\x6F\x6D\x6D\x61\x6E\x64\x35","\x23\x6D\x73\x67\x63\x6F\x6D\x6D\x61\x6E\x64\x36","\x23\x52\x6F\x74\x61\x74\x65\x52\x69\x67\x68\x74","\x2A\x7B\x2D\x77\x65\x62\x6B\x69\x74\x2D\x62\x6F\x78\x2D\x73\x69\x7A\x69\x6E\x67\x3A\x20\x62\x6F\x72\x64\x65\x72\x2D\x62\x6F\x78\x3B\x62\x6F\x78\x2D\x73\x69\x7A\x69\x6E\x67\x3A\x20\x62\x6F\x72\x64\x65\x72\x2D\x62\x6F\x78\x7D","\x2E\x76\x69\x64\x65\x6F\x2D\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x7B\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x3A\x20\x23\x30\x30\x30\x3B\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x20\x66\x69\x78\x65\x64\x3B\x74\x6F\x70\x3A\x20\x30\x3B\x72\x69\x67\x68\x74\x3A\x20\x30\x3B\x62\x6F\x74\x74\x6F\x6D\x3A\x20\x30\x3B\x6C\x65\x66\x74\x3A\x20\x30\x3B\x7A\x2D\x69\x6E\x64\x65\x78\x3A\x20\x2D\x39\x39\x7D","\x2E\x76\x69\x64\x65\x6F\x2D\x66\x6F\x72\x65\x67\x72\x6F\x75\x6E\x64\x2C\x2E\x76\x69\x64\x65\x6F\x2D\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x20\x69\x66\x72\x61\x6D\x65\x7B\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x20\x61\x62\x73\x6F\x6C\x75\x74\x65\x3B\x74\x6F\x70\x3A\x20\x30\x3B\x6C\x65\x66\x74\x3A\x20\x30\x3B\x77\x69\x64\x74\x68\x3A\x20\x31\x30\x30\x25\x3B\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x70\x6F\x69\x6E\x74\x65\x72\x2D\x65\x76\x65\x6E\x74\x73\x3A\x20\x6E\x6F\x6E\x65\x7D","\x23\x76\x69\x64\x74\x6F\x70\x2D\x63\x6F\x6E\x74\x65\x6E\x74\x7B\x74\x6F\x70\x3A\x20\x30\x3B\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x66\x66\x66\x7D\x2E\x76\x69\x64\x2D\x69\x6E\x66\x6F\x7B\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x20\x61\x62\x73\x6F\x6C\x75\x74\x65\x3B\x74\x6F\x70\x3A\x20\x30\x3B\x72\x69\x67\x68\x74\x3A\x20\x30\x3B\x77\x69\x64\x74\x68\x3A\x20\x33\x33\x25\x3B\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x3A\x20\x72\x67\x62\x61\x28\x30\x2C\x30\x2C\x30\x2C\x30\x2E\x33\x29\x3B\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x66\x66\x66\x3B\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x31\x72\x65\x6D\x3B\x66\x6F\x6E\x74\x2D\x66\x61\x6D\x69\x6C\x79\x3A\x20\x41\x76\x65\x6E\x69\x72\x2C\x20\x48\x65\x6C\x76\x65\x74\x69\x63\x61\x2C\x20\x73\x61\x6E\x73\x2D\x73\x65\x72\x69\x66\x7D","\x2E\x76\x69\x64\x2D\x69\x6E\x66\x6F\x20\x68\x31\x7B\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x20\x32\x72\x65\x6D\x3B\x66\x6F\x6E\x74\x2D\x77\x65\x69\x67\x68\x74\x3A\x20\x37\x30\x30\x3B\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x30\x3B\x6C\x69\x6E\x65\x2D\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x2E\x32\x7D","\x2E\x76\x69\x64\x2D\x69\x6E\x66\x6F\x20\x61\x7B\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x62\x6C\x6F\x63\x6B\x3B\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x66\x66\x66\x3B\x74\x65\x78\x74\x2D\x64\x65\x63\x6F\x72\x61\x74\x69\x6F\x6E\x3A\x20\x6E\x6F\x6E\x65\x3B\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x3A\x20\x72\x67\x62\x61\x28\x30\x2C\x30\x2C\x30\x2C\x30\x2E\x35\x29\x3B\x2D\x77\x65\x62\x6B\x69\x74\x2D\x74\x72\x61\x6E\x73\x69\x74\x69\x6F\x6E\x3A\x20\x2E\x36\x73\x20\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x3B\x74\x72\x61\x6E\x73\x69\x74\x69\x6F\x6E\x3A\x20\x2E\x36\x73\x20\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x3B\x62\x6F\x72\x64\x65\x72\x2D\x62\x6F\x74\x74\x6F\x6D\x3A\x20\x6E\x6F\x6E\x65\x3B\x6D\x61\x72\x67\x69\x6E\x3A\x20\x31\x72\x65\x6D\x20\x61\x75\x74\x6F\x3B\x74\x65\x78\x74\x2D\x61\x6C\x69\x67\x6E\x3A\x20\x63\x65\x6E\x74\x65\x72\x7D","\x2E\x76\x69\x64\x2D\x69\x6E\x66\x6F\x20\x2E\x61\x63\x72\x6F\x6E\x79\x6D\x7B\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x7D\x7D","\x3C\x64\x69\x76\x20\x63\x6C\x61\x73\x73\x3D\x22\x76\x69\x64\x65\x6F\x2D\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x22\x3E\x3C\x64\x69\x76\x20\x63\x6C\x61\x73\x73\x3D\x22\x76\x69\x64\x65\x6F\x2D\x66\x6F\x72\x65\x67\x72\x6F\x75\x6E\x64\x22\x3E\x3C\x69\x66\x72\x61\x6D\x65\x20\x69\x64\x3D\x22\x76\x69\x64\x65\x6F\x2D\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x22\x20\x66\x72\x61\x6D\x65\x62\x6F\x72\x64\x65\x72\x3D\x22\x30\x22\x20\x68\x65\x69\x67\x68\x74\x3D\x22\x31\x30\x30\x25\x22\x20\x77\x69\x64\x74\x68\x3D\x22\x31\x30\x30\x25\x22\x20\x73\x72\x63\x3D\x22\x68\x74\x74\x70\x73\x3A\x2F\x2F\x77\x77\x77\x2E\x79\x6F\x75\x74\x75\x62\x65\x2E\x63\x6F\x6D\x2F\x65\x6D\x62\x65\x64\x2F","\x3F\x63\x6F\x6E\x74\x72\x6F\x6C\x73\x3D\x30\x26\x73\x68\x6F\x77\x69\x6E\x66\x6F\x3D\x30\x26\x72\x65\x6C\x3D\x30\x26\x61\x75\x74\x6F\x70\x6C\x61\x79\x3D\x31\x26\x6C\x6F\x6F\x70\x3D\x31\x26\x73\x74\x61\x72\x74\x5F\x72\x61\x64\x69\x6F\x3D\x31\x26\x70\x6C\x61\x79\x6C\x69\x73\x74\x3D","\x22\x3E\x3C\x2F\x69\x66\x72\x61\x6D\x65\x3E\x3C\x2F\x64\x69\x76\x3E\x3C\x2F\x64\x69\x76\x3E\x3C\x2F\x64\x69\x76\x3E","\x2E\x76\x69\x64\x65\x6F\x2D\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x62\x61\x6E\x6E\x65\x72\x73\x2F\x74\x72\x6F\x6C\x6C\x31\x2E\x6D\x70\x33","\x75\x72\x6C\x28\x22\x20\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6D\x65\x64\x69\x61\x2E\x67\x69\x70\x68\x79\x2E\x63\x6F\x6D\x2F\x6D\x65\x64\x69\x61\x2F\x65\x56\x79\x34\x36\x45\x57\x79\x63\x6C\x54\x49\x41\x2F\x67\x69\x70\x68\x79\x2E\x67\x69\x66\x20\x22\x29","\x75\x72\x6C\x28\x22\x20\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x62\x61\x6E\x6E\x65\x72\x73\x2F\x69\x63\x6F\x65\x75\x63\x69\x64\x2E\x67\x69\x66\x20\x22\x29","\x75\x72\x6C\x28\x22\x20\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6D\x65\x64\x69\x61\x2E\x67\x69\x70\x68\x79\x2E\x63\x6F\x6D\x2F\x6D\x65\x64\x69\x61\x2F\x56\x53\x75\x57\x66\x6C\x31\x71\x43\x69\x52\x73\x6B\x2F\x67\x69\x70\x68\x79\x2E\x67\x69\x66\x20\x22\x29","\x75\x72\x6C\x28\x22\x20\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6D\x65\x64\x69\x61\x2E\x67\x69\x70\x68\x79\x2E\x63\x6F\x6D\x2F\x6D\x65\x64\x69\x61\x2F\x61\x77\x39\x57\x67\x76\x67\x4E\x64\x31\x62\x51\x6B\x2F\x67\x69\x70\x68\x79\x2E\x67\x69\x66\x20\x22\x29","\x5F\x64\x72\x61\x77\x49\x6D\x61\x67\x65","\x64\x72\x61\x77\x49\x6D\x61\x67\x65","\x50\x72\x65\x76\x65\x6E\x74\x69\x6E\x67\x20\x63\x61\x6E\x76\x61\x73\x20\x74\x6F\x20\x63\x72\x61\x73\x68\x20\x66\x72\x6F\x6D\x20\x69\x6D\x61\x67\x65\x20\x77\x69\x64\x74\x68\x20\x61\x6E\x64\x20\x68\x65\x69\x67\x68\x74","\x4F\x43\x68\x61\x74\x42\x65\x74\x74\x65\x72","\x72\x67\x62\x61\x28\x31\x32\x38\x2C\x31\x32\x38\x2C\x31\x32\x38\x2C\x30\x2E\x39\x29","\x77\x61\x69\x74\x20\x66\x6F\x72\x20\x4F\x47\x41\x52\x69\x6F\x20\x6C\x6F\x61\x64","\x6F\x62\x73\x5F\x68\x69\x73\x74","\x61\x64\x64\x65\x64\x4E\x6F\x64\x65\x73","\x68\x69\x73\x74\x5F\x61\x64\x64","\x67\x65\x74","\x6F\x62\x73\x65\x72\x76\x65","\x6F\x62\x73\x5F\x69\x6E\x70\x74","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x4E\x61\x6D\x65","\x74\x61\x72\x67\x65\x74","\x69\x6E\x70\x74\x5F\x73\x68\x6F\x77","\x69\x6E\x70\x74\x5F\x68\x69\x64\x65","\x68\x69\x73\x74\x5F\x73\x68\x6F\x77","\x65\x6D\x70\x68\x61\x73\x69\x73\x5F\x62\x67\x63\x6F\x6C\x6F\x72","\x65\x6D\x70\x68\x61\x73\x69\x73\x5F\x74\x69\x6D\x65","\x73\x63\x72\x6F\x6C\x6C\x5F\x64\x75\x6C\x61\x74\x69\x6F\x6E","\x68\x69\x73\x74\x68\x69\x64\x65\x5F\x74\x69\x6D\x65\x49\x44","\x68\x69\x73\x74\x68\x69\x64\x65\x5F\x65\x6E\x61\x62\x6C\x65","\x68\x69\x73\x74\x68\x69\x64\x65\x5F\x74\x69\x6D\x65","\x23\x55\x73\x65\x72\x50\x72\x6F\x66\x69\x6C\x65\x49\x44\x32\x61","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x6D\x73\x65\x74\x74\x69\x6E\x67\x73\x2E\x73\x6E\x65\x7A\x2E\x6F\x72\x67\x2F","\x4C\x4D\x53\x65\x74\x74\x69\x6E\x67\x73","\x3A\x20\x3C\x66\x6F\x6E\x74\x20\x63\x6F\x6C\x6F\x72\x3D\x27\x79\x65\x6C\x6C\x6F\x77\x27\x3E\x3C\x62\x3E","\x3C\x2F\x62\x3E\x3C\x2F\x66\x6F\x6E\x74\x3E","\x72\x65\x73\x70\x6F\x6E\x73\x65","\x73\x65\x72\x76\x65\x72\x2D\x74\x6F\x6B\x65\x6E","\x63\x6C\x61\x6E\x74\x61\x67","\x73\x65\x72\x76\x65\x72\x2D\x72\x65\x63\x6F\x6E\x6E\x65\x63\x74","\x77\x73\x73\x3A\x2F\x2F\x61\x67\x61\x72\x2E\x73\x6E\x65\x7A\x2E\x6F\x72\x67\x3A\x36\x33\x30\x35\x31\x2F","\x63\x6C\x69\x65\x6E\x74","\x73\x65\x72\x76\x65\x72","\x6F\x6E\x6F\x70\x65\x6E","\x75\x70\x64\x61\x74\x65\x53\x65\x72\x76\x65\x72\x44\x65\x74\x61\x69\x6C\x73","\x6F\x6E\x63\x6C\x6F\x73\x65","\x72\x65\x63\x6F\x6E\x6E\x65\x63\x74","\x6F\x6E\x6D\x65\x73\x73\x61\x67\x65","\x6F\x6E\x4D\x65\x73\x73\x61\x67\x65","\x52\x65\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6E\x67\x20\x69\x6E\x20\x35\x20\x73\x65\x63\x6F\x6E\x64\x73\x2E\x2E\x2E","\x75\x70\x64\x61\x74\x65\x5F\x64\x65\x74\x61\x69\x6C\x73","\x6E\x69\x63\x6B\x6E\x61\x6D\x65","\x41\x49\x44","\x61\x67\x61\x72\x69\x6F\x49\x44","\x68\x69\x64\x65\x63\x6F\x75\x6E\x74\x72\x79","\x61\x67\x61\x72\x69\x6F\x4C\x45\x56\x45\x4C","\x72\x65\x61\x64\x79\x53\x74\x61\x74\x65","\x4F\x50\x45\x4E","\x64\x61\x74\x61","\x70\x6F\x6E\x67","\x70\x69\x6E\x67","\x72\x65\x63\x6F\x6E\x6E\x65\x63\x74\x42\x75\x74\x74\x6F\x6E","\x43\x6F\x75\x6C\x64\x20\x6E\x6F\x74\x20\x69\x6E\x69\x74\x69\x61\x6C\x69\x7A\x65\x20\x49\x6E\x66\x6F\x20\x73\x65\x6E\x64\x69\x6E\x67","\x75\x70\x64\x61\x74\x65\x44\x65\x74\x61\x69\x6C\x73","\x5F\x5F\x63\x66\x64\x75\x69\x64","\x3B","\x63\x68\x61\x72\x41\x74","\x6F\x6E\x4F\x70\x65\x6E","\x6F\x6E\x43\x6C\x6F\x73\x65","\x63\x6C\x6F\x73\x65","\x69\x73\x45\x6D\x70\x74\x79","\x75\x70\x64\x61\x74\x65\x50\x6C\x61\x79\x65\x72\x73","\x70\x6C\x61\x79\x65\x72\x73\x5F\x6C\x69\x73\x74","\x55\x73\x65\x72\x20\x46\x6F\x75\x6E\x64\x2E\x20\x52\x65\x76\x65\x61\x6C\x69\x6E\x67\x20\x73\x65\x72\x76\x65\x72\x2E\x2E\x2E","\x6E\x69\x63\x6B\x6E\x61\x6D\x65\x22\x3A\x22","\x22\x2C\x22\x73\x65\x72\x76\x65\x72","\x65\x78\x74\x72\x61","\x63\x6F\x75\x6E\x74\x72\x79","\x69\x70\x5F\x69\x6E\x66\x6F","\x55\x4E","\x22\x2C\x22\x68\x69\x64\x65\x63\x6F\x75\x6E\x74\x72\x79","\x22\x2C\x22\x41\x49\x44","\x22\x2C\x22\x74\x61\x67","\x52\x65\x67\x69\x6F\x6E\x3A\x3C\x73\x70\x61\x6E\x20\x69\x64\x3D\x27\x72\x65\x67\x69\x6F\x6E\x69\x6E\x66\x6F\x27\x3E","\x3C\x2F\x73\x70\x61\x6E\x3E\x2C\x20\x4D\x6F\x64\x65\x3C\x73\x70\x61\x6E\x20\x69\x64\x3D\x27\x6D\x6F\x64\x65\x69\x6E\x66\x6F\x27\x3E","\x3C\x2F\x73\x70\x61\x6E\x3E\x2E\x20\x3C\x73\x70\x61\x6E\x20\x63\x6C\x61\x73\x73\x3D\x27\x6D\x61\x69\x6E\x2D\x63\x6F\x6C\x6F\x72\x27\x3E\x3C\x73\x70\x61\x6E\x20\x69\x64\x3D\x27\x70\x6C\x61\x79\x65\x72\x69\x6E\x66\x6F\x27\x3E","\x3C\x2F\x73\x70\x61\x6E\x3E\x20\x3C\x73\x70\x61\x6E\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x27\x70\x6F\x70\x6F\x76\x65\x72\x27\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x27\x6C\x65\x66\x74\x27\x20\x74\x69\x74\x6C\x65\x3D\x27\x27\x20\x64\x61\x74\x61\x2D\x63\x6F\x6E\x74\x65\x6E\x74\x3D\x27\x64\x61\x74\x61\x2D\x68\x74\x6D\x6C\x3D\x27\x74\x72\x75\x65\x27\x20\x63\x6C\x61\x73\x73\x3D\x27\x63\x6F\x75\x6E\x74\x72\x79\x2D\x69\x63\x6F\x6E\x20\x66\x6C\x61\x67\x2D\x69\x63\x6F\x6E\x20\x66\x6C\x61\x67\x2D\x69\x63\x6F\x6E\x2D","\x27\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x27\x50\x6C\x61\x79\x65\x72\x20\x44\x65\x74\x61\x69\x6C\x73\x27\x3E\x3C\x2F\x73\x70\x61\x6E\x3E\x3C\x2F\x73\x70\x61\x6E\x3E","\x20\x28\x3C\x73\x70\x61\x6E\x20\x69\x64\x3D\x27\x74\x6F\x6B\x65\x6E\x69\x6E\x66\x6F\x27\x3E","\x3C\x2F\x73\x70\x61\x6E\x3E\x29","\x3C\x73\x70\x61\x6E\x20\x63\x6C\x61\x73\x73\x3D\x27\x6D\x61\x69\x6E\x2D\x63\x6F\x6C\x6F\x72\x27\x3E\x3C\x73\x70\x61\x6E\x20\x69\x64\x3D\x27\x70\x6C\x61\x79\x65\x72\x69\x6E\x66\x6F\x27\x3E","\x53\x65\x72\x76\x65\x72\x20\x46\x6F\x75\x6E\x64\x2E\x20\x52\x65\x76\x65\x61\x6C\x69\x6E\x67\x20\x75\x73\x65\x72\x73\x2E\x2E\x2E","\x3C\x2F\x73\x70\x61\x6E\x3E\x2E\x20\x3C\x73\x70\x61\x6E\x20\x69\x64\x3D\x27\x70\x6C\x61\x79\x65\x72\x69\x6E\x66\x6F\x27\x3E","\x20\x3C\x73\x70\x61\x6E\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x27\x70\x6F\x70\x6F\x76\x65\x72\x27\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x27\x6C\x65\x66\x74\x27\x20\x74\x69\x74\x6C\x65\x3D\x27\x27\x20\x64\x61\x74\x61\x2D\x63\x6F\x6E\x74\x65\x6E\x74\x3D\x27\x64\x61\x74\x61\x2D\x68\x74\x6D\x6C\x3D\x27\x74\x72\x75\x65\x27\x20\x63\x6C\x61\x73\x73\x3D\x27\x63\x6F\x75\x6E\x74\x72\x79\x2D\x69\x63\x6F\x6E\x20\x66\x6C\x61\x67\x2D\x69\x63\x6F\x6E\x20\x66\x6C\x61\x67\x2D\x69\x63\x6F\x6E\x2D","\x27\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x27\x50\x6C\x61\x79\x65\x72\x20\x44\x65\x74\x61\x69\x6C\x73\x27\x3E\x3C\x2F\x73\x70\x61\x6E\x3E\x3C\x2F\x73\x70\x61\x6E\x3E\x20\x28\x3C\x73\x70\x61\x6E\x20\x63\x6C\x61\x73\x73\x3D\x27\x6D\x61\x69\x6E\x2D\x63\x6F\x6C\x6F\x72\x27\x3E\x3C\x73\x70\x61\x6E\x20\x69\x64\x3D\x27\x74\x6F\x6B\x65\x6E\x69\x6E\x66\x6F\x27\x3E","\x3C\x2F\x73\x70\x61\x6E\x3E\x3C\x2F\x73\x70\x61\x6E\x3E\x29","\x3C\x73\x70\x61\x6E\x20\x69\x64\x3D\x27\x70\x6C\x61\x79\x65\x72\x69\x6E\x66\x6F\x27\x3E","\x53\x65\x72\x76\x65\x72\x20\x2F\x20\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x2C\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64\x2E\x20\x44\x6F\x20\x79\x6F\x75\x20\x77\x61\x6E\x74\x20\x74\x68\x65\x20\x31\x2D\x62\x79\x2D\x31\x20\x6D\x61\x6E\x75\x61\x6C\x20\x73\x65\x61\x72\x63\x68\x20\x6C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x73\x20\x6F\x66\x20\x3C\x66\x6F\x6E\x74\x20\x63\x6F\x6C\x6F\x72\x3D\x22\x79\x65\x6C\x6C\x6F\x77\x22\x3E","\x20\x2F\x20","\x3C\x2F\x66\x6F\x6E\x74\x3E\x20\x3F","\x3C\x2F\x62\x72\x3E\x20\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x20\x22\x6D\x61\x6E\x75\x61\x6C\x73\x65\x61\x72\x63\x68\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x62\x6C\x6F\x63\x6B\x20\x62\x74\x6E\x2D\x69\x6E\x66\x6F\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x31\x30\x70\x78\x3B\x62\x6F\x72\x64\x65\x72\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x64\x61\x72\x6B\x62\x6C\x75\x65\x3B\x22\x3E","\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E\x3C\x62\x72\x3E\x3C\x62\x75\x74\x74\x6F\x6E\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x73\x6D\x20\x62\x74\x6E\x2D\x77\x61\x72\x6E\x69\x6E\x67\x20\x62\x74\x6E\x2D\x65\x78\x69\x74\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x77\x69\x64\x74\x68\x3A\x20\x31\x30\x30\x25\x3B\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x2D\x32\x30\x70\x78\x3B\x22\x3E","\x23\x6D\x61\x6E\x75\x61\x6C\x73\x65\x61\x72\x63\x68","\x6D\x65\x73\x73\x61\x67\x65\x2D\x62\x6F\x78","\x6F\x67\x61\x72\x69\x6F\x2E\x6A\x73\x20\x6E\x6F\x74\x20\x6C\x6F\x61\x64\x65\x64","\x74\x69\x74\x6C\x65","\x53\x70\x65\x63\x74\x61\x74\x65","\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65","\x74\x6F\x6F\x6C\x74\x69\x70","\x3C\x73\x70\x61\x6E\x20\x63\x6C\x61\x73\x73\x3D\x22\x67\x6C\x79\x70\x68\x69\x63\x6F\x6E\x20\x67\x6C\x79\x70\x68\x69\x63\x6F\x6E\x2D\x67\x6C\x6F\x62\x65\x22\x3E\x3C\x2F\x73\x70\x61\x6E\x3E","\x62\x75\x74\x74\x6F\x6E\x3A\x63\x6F\x6E\x74\x61\x69\x6E\x73\x28\x27\x53\x70\x65\x63\x74\x61\x74\x65\x27\x29","\x4C\x6F\x67\x6F\x75\x74","\x3C\x73\x70\x61\x6E\x20\x63\x6C\x61\x73\x73\x3D\x22\x67\x6C\x79\x70\x68\x69\x63\x6F\x6E\x20\x67\x6C\x79\x70\x68\x69\x63\x6F\x6E\x2D\x6F\x66\x66\x22\x3E\x3C\x2F\x73\x70\x61\x6E\x3E","\x62\x75\x74\x74\x6F\x6E\x3A\x63\x6F\x6E\x74\x61\x69\x6E\x73\x28\x27\x4C\x6F\x67\x6F\x75\x74\x27\x29","\x62\x74\x6E\x2D\x6C\x69\x6E\x6B","\x62\x74\x6E\x2D\x69\x6E\x66\x6F","\x62\x75\x74\x74\x6F\x6E\x3A\x63\x6F\x6E\x74\x61\x69\x6E\x73\x28\x27\x43\x6F\x70\x79\x27\x29","\x3C\x73\x70\x61\x6E\x20\x63\x6C\x61\x73\x73\x3D\x22\x67\x6C\x79\x70\x68\x69\x63\x6F\x6E\x20\x67\x6C\x79\x70\x68\x69\x63\x6F\x6E\x2D\x70\x6C\x75\x73\x22\x3E\x3C\x2F\x73\x70\x61\x6E\x3E","\x23\x63\x72\x65\x61\x74\x65\x2D\x70\x61\x72\x74\x79\x2D\x62\x74\x6E\x2D\x32","\x43\x72\x65\x61\x74\x65\x20\x70\x61\x72\x74\x79","\x77\x69\x64\x74\x68\x3A\x20\x34\x39\x25\x20\x21\x69\x6D\x70\x6F\x72\x74\x61\x6E\x74\x3B\x20\x66\x6C\x6F\x61\x74\x3A\x20\x72\x69\x67\x68\x74\x3B","\x4A\x6F\x69\x6E\x20\x70\x61\x72\x74\x79","\x3C\x73\x70\x61\x6E\x20\x63\x6C\x61\x73\x73\x3D\x22\x67\x6C\x79\x70\x68\x69\x63\x6F\x6E\x20\x67\x6C\x79\x70\x68\x69\x63\x6F\x6E\x2D\x73\x61\x76\x65\x22\x3E\x3C\x2F\x73\x70\x61\x6E\x3E","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x46\x61\x64\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x77\x69\x64\x74\x68\x3A\x20\x31\x30\x30\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x20\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x20\x61\x62\x73\x6F\x6C\x75\x74\x65\x3B\x20\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x3A\x20\x62\x6C\x61\x63\x6B\x3B\x20\x7A\x2D\x69\x6E\x64\x65\x78\x3A\x20\x31\x30\x30\x3B\x20\x6F\x70\x61\x63\x69\x74\x79\x3A\x20\x30\x2E\x36\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x3E\x3C\x2F\x64\x69\x76\x3E","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x73\x74\x61\x74\x73\x49\x6E\x66\x6F\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x6D\x61\x69\x6E\x2D\x63\x6F\x6C\x6F\x72\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x6F\x69\x6E\x74\x65\x72\x2D\x65\x76\x65\x6E\x74\x73\x3A\x20\x61\x75\x74\x6F\x3B\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x20\x31\x33\x70\x78\x3B\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x33\x70\x78\x3B\x66\x6C\x6F\x61\x74\x3A\x20\x6C\x65\x66\x74\x3B\x66\x6F\x6E\x74\x2D\x77\x65\x69\x67\x68\x74\x3A\x20\x37\x30\x30\x3B\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x72\x67\x62\x61\x28\x30\x2C\x20\x30\x2C\x20\x30\x2C\x20\x30\x2E\x32\x29\x3B\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x33\x70\x78\x3B\x62\x6F\x72\x64\x65\x72\x2D\x72\x61\x64\x69\x75\x73\x3A\x20\x34\x70\x78\x3B\x77\x69\x64\x74\x68\x3A\x20\x36\x35\x25\x3B\x68\x65\x69\x67\x68\x74\x3A\x20\x34\x34\x70\x78\x3B\x7A\x2D\x69\x6E\x64\x65\x78\x3A\x20\x31\x35\x3B\x6D\x61\x72\x67\x69\x6E\x3A\x20\x61\x75\x74\x6F\x3B\x74\x6F\x70\x3A\x20\x30\x70\x78\x3B\x72\x69\x67\x68\x74\x3A\x20\x30\x70\x78\x3B\x6C\x65\x66\x74\x3A\x20\x30\x70\x78\x3B\x62\x6F\x74\x74\x6F\x6D\x3A\x20\x38\x35\x70\x78\x3B\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x20\x66\x69\x78\x65\x64\x3B\x70\x6F\x69\x6E\x74\x65\x72\x2D\x65\x76\x65\x6E\x74\x73\x3A\x20\x61\x75\x74\x6F\x3B\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x66\x66\x66\x66\x66\x66\x3B\x22\x3E","\x3C\x70\x20\x73\x74\x79\x6C\x65\x3D\x22\x66\x6C\x6F\x61\x74\x3A\x20\x72\x69\x67\x68\x74\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x72\x69\x67\x68\x74\x3A\x20\x31\x30\x70\x78\x3B\x22\x3E\x3C\x73\x70\x61\x6E\x20\x69\x64\x3D\x22\x6E\x6F\x74\x65\x73\x53\x65\x72\x76\x65\x72\x22\x3E\x53\x65\x72\x76\x65\x72\x73\x3A\x20\x3C\x2F\x73\x70\x61\x6E\x3E\x3C\x73\x70\x61\x6E\x20\x69\x64\x3D\x22\x6E\x75\x6D\x53\x65\x72\x76\x65\x72\x73\x22\x3E\x3C\x2F\x73\x70\x61\x6E\x3E\x20\x28\x3C\x73\x70\x61\x6E\x20\x69\x64\x3D\x22\x70\x70\x73\x22\x3E\x3C\x2F\x73\x70\x61\x6E\x3E\x20\x3C\x73\x70\x61\x6E\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x74\x6F\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x50\x6C\x61\x79\x65\x72\x73\x20\x70\x65\x72\x20\x73\x65\x72\x76\x65\x72\x22\x3E\x50\x50\x53\x3C\x2F\x73\x70\x61\x6E\x3E\x29\x3C\x2F\x70\x3E","\x3C\x70\x20\x73\x74\x79\x6C\x65\x3D\x22\x66\x6C\x6F\x61\x74\x3A\x20\x72\x69\x67\x68\x74\x3B\x6D\x61\x72\x67\x69\x6E\x2D\x72\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x70\x78\x3B\x22\x3E\x3C\x73\x70\x61\x6E\x20\x69\x64\x3D\x22\x6E\x6F\x74\x65\x73\x50\x6C\x61\x79\x65\x72\x73\x22\x3E\x50\x6C\x61\x79\x65\x72\x73\x3A\x20\x3C\x2F\x73\x70\x61\x6E\x3E\x3C\x73\x70\x61\x6E\x20\x69\x64\x3D\x22\x6E\x75\x6D\x50\x6C\x61\x79\x65\x72\x73\x22\x3E\x3C\x2F\x73\x70\x61\x6E\x3E\x20\x2F\x20\x3C\x73\x70\x61\x6E\x20\x69\x64\x3D\x22\x74\x6F\x74\x61\x6C\x50\x6C\x61\x79\x65\x72\x73\x22\x20\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x74\x6F\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x54\x6F\x74\x61\x6C\x20\x70\x6C\x61\x79\x65\x72\x73\x20\x6F\x6E\x6C\x69\x6E\x65\x22\x3E\x3C\x2F\x73\x70\x61\x6E\x3E\x3C\x2F\x70\x3E\x3C\x2F\x64\x69\x76\x3E","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x73\x65\x61\x72\x63\x68\x48\x75\x64\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x68\x75\x64\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x77\x69\x64\x74\x68\x3A\x20\x36\x35\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x36\x30\x70\x78\x3B\x20\x7A\x2D\x69\x6E\x64\x65\x78\x3A\x20\x31\x35\x3B\x20\x6D\x61\x72\x67\x69\x6E\x3A\x20\x61\x75\x74\x6F\x3B\x20\x74\x6F\x70\x3A\x20\x30\x3B\x20\x72\x69\x67\x68\x74\x3A\x20\x30\x3B\x20\x6C\x65\x66\x74\x3A\x20\x30\x3B\x20\x62\x6F\x74\x74\x6F\x6D\x3A\x20\x30\x3B\x20\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x20\x66\x69\x78\x65\x64\x3B\x22\x3E","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x31\x30\x70\x78\x3B\x22\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x73\x65\x61\x72\x63\x68\x49\x6E\x70\x75\x74\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x74\x69\x74\x6C\x65\x3D\x22\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x45\x6E\x74\x65\x72\x20\x66\x72\x69\x65\x6E\x64\x27\x73\x20\x74\x6F\x6B\x65\x6E\x2C\x20\x49\x50\x2C\x20\x6C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x2C\x20\x6E\x61\x6D\x65\x20\x6F\x72\x20\x63\x6C\x61\x6E\x20\x74\x61\x67\x2E\x2E\x2E\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x6F\x69\x6E\x74\x65\x72\x2D\x65\x76\x65\x6E\x74\x73\x3A\x20\x61\x75\x74\x6F\x3B\x6D\x61\x72\x67\x69\x6E\x2D\x62\x6F\x74\x74\x6F\x6D\x3A\x20\x31\x30\x70\x78\x3B\x66\x6C\x6F\x61\x74\x3A\x20\x6C\x65\x66\x74\x3B\x77\x69\x64\x74\x68\x3A\x20\x38\x30\x25\x20\x21\x69\x6D\x70\x6F\x72\x74\x61\x6E\x74\x3B\x74\x65\x78\x74\x2D\x61\x6C\x69\x67\x6E\x3A\x20\x63\x65\x6E\x74\x65\x72\x3B\x22\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x73\x65\x61\x72\x63\x68\x42\x74\x6E\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x63\x6F\x70\x79\x2D\x74\x6F\x6B\x65\x6E\x20\x63\x6F\x70\x79\x2D\x70\x61\x72\x74\x79\x2D\x74\x6F\x6B\x65\x6E\x20\x62\x74\x6E\x2D\x70\x72\x69\x6D\x61\x72\x79\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x62\x6F\x74\x74\x6F\x6D\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x43\x61\x6E\x63\x65\x6C\x20\x73\x65\x61\x72\x63\x68\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x6F\x69\x6E\x74\x65\x72\x2D\x65\x76\x65\x6E\x74\x73\x3A\x20\x61\x75\x74\x6F\x3B\x6D\x61\x72\x67\x69\x6E\x2D\x62\x6F\x74\x74\x6F\x6D\x3A\x31\x30\x70\x78\x3B\x77\x69\x64\x74\x68\x3A\x20\x31\x35\x25\x3B\x22\x3E\x3C\x73\x70\x61\x6E\x20\x69\x64\x3D\x22\x73\x65\x61\x72\x63\x68\x53\x70\x61\x6E\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x73\x65\x61\x72\x63\x68\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x73\x70\x61\x6E\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x23\x6F\x76\x65\x72\x6C\x61\x79\x73\x2D\x68\x75\x64","\x23\x72\x65\x67\x69\x6F\x6E\x6D\x6F\x64\x65\x63\x68\x65\x63\x6B","\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72","\x50\x61\x73\x73\x77\x6F\x72\x64","\x57\x68\x65\x6E\x20\x45\x4E\x41\x42\x4C\x45\x44\x3A\x20\x4F\x70\x74\x69\x6D\x69\x7A\x65\x64\x20\x6D\x61\x73\x73\x20\x28\x2B\x2F\x2D\x32\x25\x29\x20\x4F\x4E\x2C\x20\x4D\x65\x72\x67\x65\x20\x54\x69\x6D\x65\x72\x20\x42\x45\x54\x41\x20\x4F\x46\x46\x2E\x20\x53\x75\x67\x67\x65\x73\x74\x65\x64\x20\x74\x6F\x20\x62\x65\x20\x45\x4E\x41\x42\x4C\x45\x44\x20\x66\x6F\x72\x20\x4C\x61\x67\x20\x72\x65\x64\x75\x63\x65\x2E","\x70\x61\x72\x65\x6E\x74","\x23\x6F\x70\x74\x69\x6D\x69\x7A\x65\x64\x4D\x61\x73\x73","\x3C\x6C\x61\x62\x65\x6C\x20\x73\x74\x79\x6C\x65\x3D\x22\x66\x6C\x6F\x61\x74\x3A\x6C\x65\x66\x74\x3B\x20\x70\x61\x64\x64\x69\x6E\x67\x2D\x6C\x65\x66\x74\x3A\x30\x3B\x20\x70\x61\x64\x64\x69\x6E\x67\x2D\x72\x69\x67\x68\x74\x3A\x30\x22\x3E","\x75\x6E\x6C\x6F\x63\x6B\x65\x64\x46\x50\x53","\x3C\x73\x65\x6C\x65\x63\x74\x20\x69\x64\x3D\x22\x46\x72\x61\x6D\x65\x57\x6F\x72\x6B\x4F\x70\x74\x69\x6F\x6E\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x6F\x6E\x63\x68\x61\x6E\x67\x65\x3D\x22\x63\x68\x61\x6E\x67\x65\x46\x72\x61\x6D\x65\x57\x6F\x72\x6B\x28\x29\x3B\x22\x20\x72\x65\x71\x75\x69\x72\x65\x64\x3D\x22\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x22\x20\x74\x69\x74\x6C\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x64\x69\x73\x70\x6C\x61\x79\x3A\x69\x6E\x6C\x69\x6E\x65\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x37\x30\x25\x3B\x20\x66\x6C\x6F\x61\x74\x3A\x72\x69\x67\x68\x74\x3B\x22\x20\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x34\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x4C\x69\x6D\x69\x74\x65\x64\x20\x52\x61\x74\x65\x20\x2B\x20\x34\x6D\x73\x20\x64\x65\x6C\x61\x79\x20\x28\x73\x75\x67\x67\x65\x73\x74\x65\x64\x29\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x66\x61\x6C\x73\x65\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x4C\x69\x6D\x69\x74\x65\x64\x20\x52\x61\x74\x65\x20\x2B\x20\x4E\x6F\x20\x64\x65\x6C\x61\x79\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x32\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x4C\x69\x6D\x69\x74\x65\x64\x20\x52\x61\x74\x65\x20\x2B\x20\x32\x6D\x73\x20\x64\x65\x6C\x61\x79\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x38\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x4C\x69\x6D\x69\x74\x65\x64\x20\x52\x61\x74\x65\x20\x2B\x20\x38\x6D\x73\x20\x64\x65\x6C\x61\x79\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x31\x36\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x4C\x69\x6D\x69\x74\x65\x64\x20\x52\x61\x74\x65\x20\x2B\x20\x31\x36\x6D\x73\x20\x64\x65\x6C\x61\x79\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x33\x32\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x4C\x69\x6D\x69\x74\x65\x64\x20\x52\x61\x74\x65\x20\x2B\x20\x33\x32\x6D\x73\x20\x64\x65\x6C\x61\x79\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x36\x34\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x4C\x69\x6D\x69\x74\x65\x64\x20\x52\x61\x74\x65\x20\x2B\x20\x36\x34\x6D\x73\x20\x64\x65\x6C\x61\x79\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x74\x72\x75\x65\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x55\x6E\x6C\x69\x6D\x69\x74\x65\x64\x20\x52\x61\x74\x65\x20\x28\x6E\x6F\x74\x20\x73\x75\x67\x67\x65\x73\x74\x65\x64\x29\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x75\x6C\x74\x72\x61\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x55\x6C\x74\x72\x61\x20\x28\x6E\x6F\x74\x20\x73\x75\x67\x67\x65\x73\x74\x65\x64\x20\x2D\x20\x74\x65\x73\x74\x29\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x2F\x73\x65\x6C\x65\x63\x74\x3E\x3C\x2F\x6C\x61\x62\x65\x6C\x3E","\x23\x61\x6E\x69\x6D\x61\x74\x69\x6F\x6E\x2D\x76\x61\x6C\x75\x65","\x54\x79\x70\x65\x20\x6F\x6E\x20\x63\x68\x72\x6F\x6D\x65\x3A\x20\x63\x68\x72\x6F\x6D\x65\x3A\x2F\x2F\x73\x65\x74\x74\x69\x6E\x67\x73\x2F\x73\x79\x73\x74\x65\x6D\x20\x2C\x20\x65\x6E\x73\x75\x72\x65\x20\x55\x73\x65\x20\x68\x61\x72\x64\x77\x61\x72\x65\x20\x61\x63\x63\x65\x6C\x65\x72\x61\x74\x69\x6F\x6E\x20\x77\x68\x65\x6E\x20\x61\x76\x61\x69\x6C\x61\x62\x6C\x65\x20\x63\x68\x65\x63\x6B\x62\x6F\x78\x2C\x20\x69\x73\x20\x45\x4E\x41\x42\x4C\x45\x44","\x23\x46\x72\x61\x6D\x65\x57\x6F\x72\x6B\x4F\x70\x74\x69\x6F\x6E","\x46\x6F\x72\x20\x6D\x6F\x72\x65\x20\x69\x6E\x66\x6F\x20\x6F\x6E\x20\x68\x6F\x77\x20\x74\x6F\x20\x75\x73\x65\x20\x76\x69\x64\x65\x6F\x20\x73\x6B\x69\x6E\x73\x20\x76\x69\x73\x69\x74\x3A\x20\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x64\x65\x76\x65\x6C\x6F\x70\x65\x72\x73\x2F\x20\x76\x69\x64\x65\x6F\x73\x6B\x69\x6E\x73\x2E\x68\x74\x6D\x6C","\x74\x6F\x70","\x23\x76\x69\x64\x65\x6F\x53\x6B\x69\x6E\x73","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x6E\x6F\x74\x65\x73\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x6D\x61\x69\x6E\x2D\x63\x6F\x6C\x6F\x72\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x64\x69\x73\x70\x6C\x61\x79\x3A\x6E\x6F\x6E\x65\x3B\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x20\x31\x33\x70\x78\x3B\x66\x6C\x6F\x61\x74\x3A\x20\x6C\x65\x66\x74\x3B\x66\x6F\x6E\x74\x2D\x77\x65\x69\x67\x68\x74\x3A\x20\x37\x30\x30\x3B\x62\x6F\x72\x64\x65\x72\x2D\x72\x61\x64\x69\x75\x73\x3A\x20\x34\x70\x78\x3B\x77\x69\x64\x74\x68\x3A\x20\x36\x35\x25\x3B\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x34\x37\x70\x78\x3B\x7A\x2D\x69\x6E\x64\x65\x78\x3A\x20\x31\x35\x3B\x6D\x61\x72\x67\x69\x6E\x3A\x20\x61\x75\x74\x6F\x3B\x74\x6F\x70\x3A\x20\x30\x70\x78\x3B\x72\x69\x67\x68\x74\x3A\x20\x30\x70\x78\x3B\x6C\x65\x66\x74\x3A\x20\x30\x70\x78\x3B\x62\x6F\x74\x74\x6F\x6D\x3A\x20\x34\x30\x30\x70\x78\x3B\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x20\x66\x69\x78\x65\x64\x3B\x70\x6F\x69\x6E\x74\x65\x72\x2D\x65\x76\x65\x6E\x74\x73\x3A\x20\x61\x75\x74\x6F\x3B\x63\x6F\x6C\x6F\x72\x3A\x20\x72\x67\x62\x28\x32\x35\x35\x2C\x20\x32\x35\x35\x2C\x20\x32\x35\x35\x29\x3B\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x31\x30\x70\x78\x3B\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x72\x67\x62\x61\x28\x30\x2C\x20\x30\x2C\x20\x30\x2C\x20\x30\x2E\x32\x29\x3B\x22\x3E\x3C\x68\x35\x20\x69\x64\x3D\x22\x6E\x6F\x74\x65\x73\x61\x76\x65\x66\x6F\x72\x6C\x61\x74\x65\x72\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x6D\x61\x69\x6E\x2D\x63\x6F\x6C\x6F\x72\x20\x74\x65\x78\x74\x2D\x63\x65\x6E\x74\x65\x72\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x30\x70\x78\x3B\x22\x3E\x53\x61\x76\x65\x20\x66\x6F\x72\x20\x6C\x61\x74\x65\x72\x3C\x2F\x68\x35\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x6E\x6F\x74\x65\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x20\x6D\x61\x69\x6E\x2D\x63\x6F\x6C\x6F\x72\x20\x6E\x6F\x74\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x63\x6F\x6C\x6F\x72\x3A\x20\x6C\x69\x67\x68\x74\x67\x72\x65\x79\x3B\x20\x20\x77\x69\x64\x74\x68\x3A\x20\x32\x35\x25\x3B\x66\x6C\x6F\x61\x74\x3A\x6C\x65\x66\x74\x3B\x20\x62\x6F\x72\x64\x65\x72\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x62\x6F\x72\x64\x65\x72\x2D\x62\x6F\x74\x74\x6F\x6D\x3A\x20\x31\x70\x78\x20\x73\x6F\x6C\x69\x64\x3B\x20\x62\x6F\x72\x64\x65\x72\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x64\x61\x72\x6B\x67\x72\x65\x79\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x72\x69\x67\x68\x74\x3A\x20\x37\x70\x78\x3B\x20\x74\x65\x78\x74\x2D\x61\x6C\x69\x67\x6E\x3A\x20\x63\x65\x6E\x74\x65\x72\x3B\x22\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x6E\x6F\x74\x65\x32\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x20\x6D\x61\x69\x6E\x2D\x63\x6F\x6C\x6F\x72\x20\x6E\x6F\x74\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x6C\x69\x67\x68\x74\x67\x72\x65\x79\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x32\x34\x25\x3B\x20\x66\x6C\x6F\x61\x74\x3A\x20\x6C\x65\x66\x74\x3B\x20\x62\x6F\x72\x64\x65\x72\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x62\x6F\x72\x64\x65\x72\x2D\x62\x6F\x74\x74\x6F\x6D\x3A\x20\x31\x70\x78\x20\x73\x6F\x6C\x69\x64\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x6C\x65\x66\x74\x3A\x20\x30\x70\x78\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x72\x69\x67\x68\x74\x3A\x20\x37\x70\x78\x3B\x20\x74\x65\x78\x74\x2D\x61\x6C\x69\x67\x6E\x3A\x20\x63\x65\x6E\x74\x65\x72\x3B\x20\x62\x6F\x72\x64\x65\x72\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x64\x61\x72\x6B\x67\x72\x65\x79\x3B\x22\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x6E\x6F\x74\x65\x33\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x20\x6D\x61\x69\x6E\x2D\x63\x6F\x6C\x6F\x72\x20\x6E\x6F\x74\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x34\x39\x25\x3B\x20\x62\x6F\x72\x64\x65\x72\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x62\x6F\x72\x64\x65\x72\x2D\x62\x6F\x74\x74\x6F\x6D\x3A\x20\x31\x70\x78\x20\x73\x6F\x6C\x69\x64\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x6C\x65\x66\x74\x3A\x20\x31\x30\x70\x78\x3B\x20\x74\x65\x78\x74\x2D\x61\x6C\x69\x67\x6E\x3A\x20\x63\x65\x6E\x74\x65\x72\x3B\x20\x62\x6F\x72\x64\x65\x72\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x64\x61\x72\x6B\x67\x72\x65\x79\x3B\x22\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x6E\x6F\x74\x65\x34\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x20\x6D\x61\x69\x6E\x2D\x63\x6F\x6C\x6F\x72\x20\x6E\x6F\x74\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x6C\x69\x67\x68\x74\x67\x72\x65\x79\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x32\x35\x25\x3B\x20\x66\x6C\x6F\x61\x74\x3A\x20\x6C\x65\x66\x74\x3B\x20\x62\x6F\x72\x64\x65\x72\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x62\x6F\x72\x64\x65\x72\x2D\x62\x6F\x74\x74\x6F\x6D\x3A\x20\x31\x70\x78\x20\x73\x6F\x6C\x69\x64\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x72\x69\x67\x68\x74\x3A\x20\x37\x70\x78\x3B\x20\x74\x65\x78\x74\x2D\x61\x6C\x69\x67\x6E\x3A\x20\x63\x65\x6E\x74\x65\x72\x3B\x20\x62\x6F\x72\x64\x65\x72\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x64\x61\x72\x6B\x67\x72\x65\x79\x3B\x22\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x6E\x6F\x74\x65\x35\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x20\x6D\x61\x69\x6E\x2D\x63\x6F\x6C\x6F\x72\x20\x6E\x6F\x74\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x6C\x69\x67\x68\x74\x67\x72\x65\x79\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x32\x34\x25\x3B\x20\x66\x6C\x6F\x61\x74\x3A\x20\x6C\x65\x66\x74\x3B\x20\x62\x6F\x72\x64\x65\x72\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x62\x6F\x72\x64\x65\x72\x2D\x62\x6F\x74\x74\x6F\x6D\x3A\x20\x31\x70\x78\x20\x73\x6F\x6C\x69\x64\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x6C\x65\x66\x74\x3A\x20\x30\x70\x78\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x72\x69\x67\x68\x74\x3A\x20\x37\x70\x78\x3B\x20\x74\x65\x78\x74\x2D\x61\x6C\x69\x67\x6E\x3A\x20\x63\x65\x6E\x74\x65\x72\x3B\x20\x62\x6F\x72\x64\x65\x72\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x64\x61\x72\x6B\x67\x72\x65\x79\x3B\x22\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x6E\x6F\x74\x65\x36\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x20\x6D\x61\x69\x6E\x2D\x63\x6F\x6C\x6F\x72\x20\x6E\x6F\x74\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x6C\x69\x67\x68\x74\x67\x72\x65\x79\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x34\x39\x25\x3B\x20\x62\x6F\x72\x64\x65\x72\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x62\x6F\x72\x64\x65\x72\x2D\x62\x6F\x74\x74\x6F\x6D\x3A\x20\x31\x70\x78\x20\x73\x6F\x6C\x69\x64\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x6C\x65\x66\x74\x3A\x20\x31\x30\x70\x78\x3B\x20\x74\x65\x78\x74\x2D\x61\x6C\x69\x67\x6E\x3A\x20\x63\x65\x6E\x74\x65\x72\x3B\x20\x62\x6F\x72\x64\x65\x72\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x64\x61\x72\x6B\x67\x72\x65\x79\x3B\x22\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x6E\x6F\x74\x65\x37\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x20\x6D\x61\x69\x6E\x2D\x63\x6F\x6C\x6F\x72\x20\x6E\x6F\x74\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x6C\x69\x67\x68\x74\x67\x72\x65\x79\x3B\x20\x62\x6F\x72\x64\x65\x72\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x62\x6F\x72\x64\x65\x72\x2D\x62\x6F\x74\x74\x6F\x6D\x3A\x20\x31\x70\x78\x20\x73\x6F\x6C\x69\x64\x3B\x20\x74\x65\x78\x74\x2D\x61\x6C\x69\x67\x6E\x3A\x20\x63\x65\x6E\x74\x65\x72\x3B\x20\x62\x6F\x72\x64\x65\x72\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x64\x61\x72\x6B\x67\x72\x65\x79\x3B\x22\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x63\x6C\x6F\x73\x65\x42\x74\x6E\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x64\x61\x6E\x67\x65\x72\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x30\x70\x78\x3B\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x70\x61\x67\x65\x5F\x6C\x6F\x67\x69\x6E\x5F\x61\x6E\x64\x5F\x70\x6C\x61\x79\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x22\x20\x74\x69\x74\x6C\x65\x3D\x22\x22\x3E\x43\x6C\x6F\x73\x65\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x74\x69\x6D\x65\x72\x74\x6F\x6F\x6C\x73\x2D\x68\x75\x64\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x68\x75\x64\x22\x20\x61\x6C\x69\x67\x6E\x3D\x22\x63\x65\x6E\x74\x65\x72\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x77\x69\x64\x74\x68\x3A\x20\x35\x30\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x33\x30\x70\x78\x3B\x20\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x70\x6F\x69\x6E\x74\x65\x72\x2D\x65\x76\x65\x6E\x74\x73\x3A\x20\x61\x75\x74\x6F\x3B\x20\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x20\x61\x62\x73\x6F\x6C\x75\x74\x65\x3B\x20\x72\x69\x67\x68\x74\x3A\x20\x30\x70\x78\x3B\x20\x74\x6F\x70\x3A\x20\x2D\x39\x30\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x62\x6C\x6F\x63\x6B\x3B\x22\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x70\x6C\x61\x79\x74\x69\x6D\x65\x72\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x2D\x6C\x69\x6E\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x36\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x62\x6C\x6F\x63\x6B\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x73\x74\x61\x72\x74\x54\x69\x6D\x65\x72\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x53\x74\x61\x72\x74\x20\x54\x69\x6D\x65\x72\x22\x22\x20\x3E\x3C\x69\x20\x69\x64\x3D\x22\x70\x6C\x61\x79\x74\x69\x6D\x65\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x70\x6C\x61\x79\x2D\x63\x69\x72\x63\x6C\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x2D\x6C\x65\x66\x74\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x73\x74\x6F\x70\x74\x69\x6D\x65\x72\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x2D\x6C\x69\x6E\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x36\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x73\x74\x6F\x70\x54\x69\x6D\x65\x72\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x50\x61\x75\x73\x65\x20\x54\x69\x6D\x65\x72\x22\x22\x3E\x3C\x69\x20\x69\x64\x3D\x22\x70\x61\x75\x73\x65\x74\x69\x6D\x65\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x70\x61\x75\x73\x65\x2D\x63\x69\x72\x63\x6C\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x2D\x6C\x65\x66\x74\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x63\x6C\x65\x61\x72\x74\x69\x6D\x65\x72\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x2D\x6C\x69\x6E\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x36\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x63\x6C\x65\x61\x72\x54\x69\x6D\x65\x72\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x53\x74\x6F\x70\x20\x54\x69\x6D\x65\x72\x22\x3E\x3C\x69\x20\x69\x64\x3D\x22\x63\x6C\x65\x61\x72\x74\x69\x6D\x65\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x73\x74\x6F\x70\x2D\x63\x69\x72\x63\x6C\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x2D\x6C\x65\x66\x74\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x61\x20\x69\x64\x3D\x22\x74\x69\x6D\x65\x72\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x32\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x20\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x20\x61\x62\x73\x6F\x6C\x75\x74\x65\x3B\x20\x72\x69\x67\x68\x74\x3A\x20\x30\x70\x78\x3B\x22\x3E\x30\x30\x3A\x30\x30\x3C\x2F\x61\x3E","\x3C\x6C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x6C\x65\x67\x65\x6E\x64\x2D\x74\x61\x62\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x77\x69\x64\x74\x68\x3A\x20\x31\x36\x2E\x36\x36\x25\x3B\x20\x70\x61\x64\x64\x69\x6E\x67\x3A\x31\x32\x70\x78\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x41\x50\x49\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x74\x6F\x70\x22\x3E\x3C\x61\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x20\x70\x61\x64\x64\x69\x6E\x67\x3A\x31\x32\x70\x78\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x24\x28\x27\x23\x6D\x61\x69\x6E\x2D\x6D\x65\x6E\x75\x27\x29\x2E\x63\x68\x69\x6C\x64\x72\x65\x6E\x28\x27\x64\x69\x76\x27\x29\x2E\x68\x69\x64\x65\x28\x29\x3B\x20\x24\x28\x27\x2E\x6D\x65\x6E\x75\x2D\x74\x61\x62\x73\x27\x29\x2E\x63\x68\x69\x6C\x64\x72\x65\x6E\x28\x27\x6C\x69\x27\x29\x2E\x72\x65\x6D\x6F\x76\x65\x43\x6C\x61\x73\x73\x28\x27\x61\x63\x74\x69\x76\x65\x27\x29\x3B\x20\x24\x28\x27\x2E\x6D\x65\x6E\x75\x2D\x74\x61\x62\x73\x27\x29\x2E\x63\x68\x69\x6C\x64\x72\x65\x6E\x28\x27\x6C\x69\x27\x29\x2E\x63\x68\x69\x6C\x64\x72\x65\x6E\x28\x27\x61\x27\x29\x2E\x72\x65\x6D\x6F\x76\x65\x43\x6C\x61\x73\x73\x28\x27\x61\x63\x74\x69\x76\x65\x27\x29\x3B\x20\x24\x28\x27\x23\x6C\x65\x67\x65\x6E\x64\x27\x29\x2E\x66\x61\x64\x65\x49\x6E\x28\x29\x3B\x20\x24\x28\x74\x68\x69\x73\x29\x2E\x61\x64\x64\x43\x6C\x61\x73\x73\x28\x27\x61\x63\x74\x69\x76\x65\x27\x29\x3B\x20\x24\x28\x74\x68\x69\x73\x29\x2E\x70\x61\x72\x65\x6E\x74\x28\x29\x2E\x61\x64\x64\x43\x6C\x61\x73\x73\x28\x27\x61\x63\x74\x69\x76\x65\x27\x29\x3B\x20\x22\x20\x68\x72\x65\x66\x3D\x22\x6A\x61\x76\x61\x73\x63\x72\x69\x70\x74\x3A\x76\x6F\x69\x64\x28\x30\x29\x3B\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x70\x75\x7A\x7A\x6C\x65\x2D\x70\x69\x65\x63\x65\x20\x66\x61\x2D\x6C\x67\x22\x3E\x3C\x2F\x61\x3E\x3C\x2F\x6C\x69\x3E","\x2E\x6D\x65\x6E\x75\x2D\x74\x61\x62\x73\x3E\x3A\x6E\x74\x68\x2D\x63\x68\x69\x6C\x64\x28\x32\x29","\x77\x69\x64\x74\x68\x3A\x20\x31\x34\x2E\x32\x38\x25","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x6C\x65\x67\x65\x6E\x64\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x6D\x65\x6E\x75\x2D\x70\x61\x6E\x65\x6C\x22\x3E\x3C\x64\x69\x76\x20\x63\x6C\x61\x73\x73\x3D\x22\x61\x67\x61\x72\x69\x6F\x2D\x70\x61\x6E\x65\x6C\x20\x6C\x65\x67\x65\x6E\x64\x2D\x70\x61\x6E\x65\x6C\x22\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x53\x48\x4F\x53\x48\x4F\x42\x74\x6E\x22\x20\x74\x79\x70\x65\x3D\x22\x62\x75\x74\x74\x6F\x6E\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x73\x6D\x20\x62\x74\x6E\x2D\x77\x61\x72\x6E\x69\x6E\x67\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x62\x75\x74\x74\x6F\x6E\x22\x20\x61\x72\x69\x61\x2D\x70\x72\x65\x73\x73\x65\x64\x3D\x22\x66\x61\x6C\x73\x65\x22\x20\x61\x75\x74\x6F\x63\x6F\x6D\x70\x6C\x65\x74\x65\x3D\x22\x6F\x66\x66\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x34\x39\x2E\x35\x25\x3B\x20\x62\x6F\x72\x64\x65\x72\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x64\x61\x72\x6B\x73\x6C\x61\x74\x65\x67\x72\x65\x79\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x72\x69\x67\x68\x74\x3A\x20\x30\x2E\x35\x25\x3B\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x70\x75\x7A\x7A\x6C\x65\x2D\x70\x69\x65\x63\x65\x22\x3E\x3C\x2F\x69\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x58\x50\x42\x74\x6E\x22\x20\x74\x79\x70\x65\x3D\x22\x62\x75\x74\x74\x6F\x6E\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x73\x6D\x20\x62\x74\x6E\x2D\x77\x61\x72\x6E\x69\x6E\x67\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x62\x75\x74\x74\x6F\x6E\x22\x20\x61\x72\x69\x61\x2D\x70\x72\x65\x73\x73\x65\x64\x3D\x22\x66\x61\x6C\x73\x65\x22\x20\x61\x75\x74\x6F\x63\x6F\x6D\x70\x6C\x65\x74\x65\x3D\x22\x6F\x66\x66\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x34\x39\x2E\x35\x25\x3B\x20\x62\x6F\x72\x64\x65\x72\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x64\x61\x72\x6B\x73\x6C\x61\x74\x65\x67\x72\x65\x79\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x6C\x65\x66\x74\x3A\x20\x30\x2E\x35\x25\x3B\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x67\x61\x6D\x65\x70\x61\x64\x22\x3E\x3C\x2F\x69\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x4D\x41\x49\x4E\x42\x54\x42\x74\x6E\x22\x20\x74\x79\x70\x65\x3D\x22\x62\x75\x74\x74\x6F\x6E\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x73\x6D\x20\x62\x74\x6E\x2D\x77\x61\x72\x6E\x69\x6E\x67\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x62\x75\x74\x74\x6F\x6E\x22\x20\x61\x72\x69\x61\x2D\x70\x72\x65\x73\x73\x65\x64\x3D\x22\x66\x61\x6C\x73\x65\x22\x20\x61\x75\x74\x6F\x63\x6F\x6D\x70\x6C\x65\x74\x65\x3D\x22\x6F\x66\x66\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x34\x39\x2E\x35\x25\x3B\x20\x62\x6F\x72\x64\x65\x72\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x64\x61\x72\x6B\x73\x6C\x61\x74\x65\x67\x72\x65\x79\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x72\x69\x67\x68\x74\x3A\x20\x30\x2E\x35\x25\x3B\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x6D\x69\x6E\x75\x73\x22\x3E\x3C\x2F\x69\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x41\x6E\x69\x6D\x61\x74\x65\x64\x53\x6B\x69\x6E\x42\x74\x6E\x22\x20\x74\x79\x70\x65\x3D\x22\x62\x75\x74\x74\x6F\x6E\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x73\x6D\x20\x62\x74\x6E\x2D\x77\x61\x72\x6E\x69\x6E\x67\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x62\x75\x74\x74\x6F\x6E\x22\x20\x61\x72\x69\x61\x2D\x70\x72\x65\x73\x73\x65\x64\x3D\x22\x66\x61\x6C\x73\x65\x22\x20\x61\x75\x74\x6F\x63\x6F\x6D\x70\x6C\x65\x74\x65\x3D\x22\x6F\x66\x66\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x34\x39\x2E\x35\x25\x3B\x20\x62\x6F\x72\x64\x65\x72\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x64\x61\x72\x6B\x73\x6C\x61\x74\x65\x67\x72\x65\x79\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x6C\x65\x66\x74\x3A\x20\x30\x2E\x35\x25\x3B\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x67\x72\x61\x76\x22\x3E\x3C\x2F\x69\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x48\x69\x64\x65\x41\x6C\x6C\x42\x74\x68\x6E\x22\x20\x74\x79\x70\x65\x3D\x22\x62\x75\x74\x74\x6F\x6E\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x73\x6D\x20\x62\x74\x6E\x2D\x64\x61\x6E\x67\x65\x72\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x62\x75\x74\x74\x6F\x6E\x22\x20\x61\x72\x69\x61\x2D\x70\x72\x65\x73\x73\x65\x64\x3D\x22\x66\x61\x6C\x73\x65\x22\x20\x61\x75\x74\x6F\x63\x6F\x6D\x70\x6C\x65\x74\x65\x3D\x22\x6F\x66\x66\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x72\x69\x67\x68\x74\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x54\x65\x6D\x70\x6F\x72\x61\x72\x69\x6C\x79\x20\x48\x69\x64\x65\x2F\x53\x68\x6F\x77\x20\x45\x76\x65\x72\x79\x74\x68\x69\x6E\x67\x2E\x20\x46\x75\x6E\x63\x74\x69\x6F\x6E\x20\x66\x6F\x72\x20\x59\x6F\x75\x74\x75\x62\x65\x72\x73\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x34\x39\x2E\x35\x25\x3B\x20\x62\x6F\x72\x64\x65\x72\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x64\x61\x72\x6B\x73\x6C\x61\x74\x65\x67\x72\x65\x79\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x72\x69\x67\x68\x74\x3A\x20\x30\x2E\x35\x25\x3B\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x65\x78\x63\x6C\x61\x6D\x61\x74\x69\x6F\x6E\x2D\x74\x72\x69\x61\x6E\x67\x6C\x65\x22\x3E\x3C\x2F\x69\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x54\x49\x4D\x45\x63\x61\x6C\x42\x74\x6E\x22\x20\x74\x79\x70\x65\x3D\x22\x62\x75\x74\x74\x6F\x6E\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x73\x6D\x20\x62\x74\x6E\x2D\x77\x61\x72\x6E\x69\x6E\x67\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x62\x75\x74\x74\x6F\x6E\x22\x20\x61\x72\x69\x61\x2D\x70\x72\x65\x73\x73\x65\x64\x3D\x22\x66\x61\x6C\x73\x65\x22\x20\x61\x75\x74\x6F\x63\x6F\x6D\x70\x6C\x65\x74\x65\x3D\x22\x6F\x66\x66\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x34\x39\x2E\x35\x25\x3B\x20\x62\x6F\x72\x64\x65\x72\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x64\x61\x72\x6B\x73\x6C\x61\x74\x65\x67\x72\x65\x79\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x6C\x65\x66\x74\x3A\x20\x30\x2E\x35\x25\x3B\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x63\x61\x6C\x63\x75\x6C\x61\x74\x6F\x72\x22\x3E\x3C\x2F\x69\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x4F\x70\x65\x6E\x75\x73\x65\x72\x53\x63\x72\x69\x70\x74\x73\x22\x20\x74\x79\x70\x65\x3D\x22\x73\x75\x62\x6D\x69\x74\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x70\x72\x69\x6D\x61\x72\x79\x20\x62\x74\x6E\x20\x32\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x62\x6C\x6F\x63\x6B\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x30\x30\x25\x3B\x20\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x34\x70\x78\x20\x30\x20\x36\x70\x78\x20\x30\x3B\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x63\x6F\x64\x65\x22\x3E\x3C\x2F\x69\x3E\x55\x73\x65\x72\x20\x53\x63\x72\x69\x70\x74\x73\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x53\x70\x65\x63\x69\x61\x6C\x44\x65\x61\x6C\x73\x42\x74\x6E\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x70\x72\x69\x6D\x61\x72\x79\x20\x62\x74\x6E\x22\x20\x74\x79\x70\x65\x3D\x22\x73\x75\x62\x6D\x69\x74\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x42\x65\x66\x6F\x72\x65\x53\x70\x65\x63\x69\x61\x6C\x44\x65\x61\x6C\x73\x28\x29\x3B\x20\x72\x65\x74\x75\x72\x6E\x20\x66\x61\x6C\x73\x65\x3B\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x70\x72\x69\x6D\x61\x72\x79\x20\x62\x74\x6E\x2D\x73\x68\x6F\x70\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x30\x30\x25\x3B\x20\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x34\x70\x78\x20\x30\x70\x78\x20\x36\x70\x78\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x70\x61\x67\x65\x5F\x73\x68\x6F\x70\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x62\x72\x69\x65\x66\x63\x61\x73\x65\x22\x3E\x3C\x2F\x69\x3E\x53\x70\x65\x63\x69\x61\x6C\x20\x44\x65\x61\x6C\x73\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x4C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x53\x68\x6F\x70\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x70\x72\x69\x6D\x61\x72\x79\x20\x62\x74\x6E\x22\x20\x74\x79\x70\x65\x3D\x22\x73\x75\x62\x6D\x69\x74\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x42\x65\x66\x6F\x72\x65\x4C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x53\x68\x6F\x70\x28\x29\x3B\x20\x72\x65\x74\x75\x72\x6E\x20\x66\x61\x6C\x73\x65\x3B\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x70\x72\x69\x6D\x61\x72\x79\x20\x62\x74\x6E\x2D\x73\x68\x6F\x70\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x30\x30\x25\x3B\x20\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x34\x70\x78\x20\x30\x70\x78\x20\x36\x70\x78\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x70\x61\x67\x65\x5F\x73\x68\x6F\x70\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x62\x72\x69\x65\x66\x63\x61\x73\x65\x22\x3E\x3C\x2F\x69\x3E\x53\x68\x6F\x70\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x64\x69\x76\x20\x63\x6C\x61\x73\x73\x3D\x22\x69\x6E\x70\x75\x74\x2D\x62\x6F\x78\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x74\x65\x78\x74\x2D\x61\x6C\x69\x67\x6E\x3A\x20\x63\x65\x6E\x74\x65\x72\x3B\x20\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x20\x31\x32\x70\x78\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x34\x70\x78\x20\x30\x20\x30\x70\x78\x20\x30\x3B\x22\x3E\x3C\x73\x70\x61\x6E\x20\x69\x64\x3D\x22\x6C\x65\x67\x65\x6E\x64\x6D\x61\x6E\x75\x61\x6C\x62\x61\x63\x6B\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x74\x69\x74\x6C\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x22\x3E\x4D\x61\x6E\x75\x61\x6C\x20\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x3A\x20\x20\x3C\x2F\x73\x70\x61\x6E\x3E","\x3C\x73\x65\x6C\x65\x63\x74\x20\x69\x64\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x50\x69\x63\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x6F\x6E\x63\x68\x61\x6E\x67\x65\x3D\x22\x63\x68\x61\x6E\x67\x65\x50\x69\x63\x46\x75\x6E\x28\x29\x3B\x22\x20\x72\x65\x71\x75\x69\x72\x65\x64\x3D\x22\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x22\x20\x74\x69\x74\x6C\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x64\x69\x73\x70\x6C\x61\x79\x3A\x69\x6E\x6C\x69\x6E\x65\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x34\x30\x25\x22\x20\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x31\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x4D\x69\x6E\x69\x6D\x61\x70\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x32\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x33\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x54\x65\x61\x6D\x62\x6F\x61\x72\x64\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x34\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x4D\x61\x69\x6E\x20\x43\x61\x6E\x76\x61\x73\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x35\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x4D\x61\x69\x6E\x20\x42\x61\x6E\x6E\x65\x72\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x2F\x73\x65\x6C\x65\x63\x74\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x6D\x69\x6E\x69\x6D\x61\x70\x50\x69\x63\x74\x75\x72\x65\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x4D\x69\x6E\x69\x6D\x61\x70\x20\x49\x6D\x61\x67\x65\x20\x55\x52\x4C\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x62\x6C\x6F\x63\x6B\x3B\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x6D\x69\x6E\x62\x67\x6E\x61\x6D\x65\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x72\x69\x67\x68\x74\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x55\x72\x6C\x20\x6F\x66\x20\x69\x6D\x61\x67\x65\x20\x73\x74\x61\x72\x74\x69\x6E\x67\x20\x77\x69\x74\x68\x20\x68\x74\x74\x70\x73\x3A\x2F\x2F\x2E\x2E\x2E\x20\x6F\x72\x20\x68\x74\x74\x70\x73\x3A\x2F\x2F\x2E\x2E\x2E\x22\x20\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x6D\x69\x6E\x62\x74\x65\x78\x74\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x4D\x69\x6E\x69\x6D\x61\x70\x20\x54\x65\x78\x74\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x62\x6C\x6F\x63\x6B\x3B\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x6D\x69\x6E\x62\x74\x65\x78\x74\x28\x29\x3B\x22\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x6C\x65\x61\x64\x62\x50\x69\x63\x74\x75\x72\x65\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x20\x49\x6D\x61\x67\x65\x20\x55\x52\x4C\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x6C\x65\x61\x64\x62\x67\x6E\x61\x6D\x65\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x72\x69\x67\x68\x74\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x55\x72\x6C\x20\x6F\x66\x20\x69\x6D\x61\x67\x65\x20\x73\x74\x61\x72\x74\x69\x6E\x67\x20\x77\x69\x74\x68\x20\x68\x74\x74\x70\x73\x3A\x2F\x2F\x2E\x2E\x2E\x20\x6F\x72\x20\x68\x74\x74\x70\x73\x3A\x2F\x2F\x2E\x2E\x2E\x22\x20\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x6C\x65\x61\x64\x62\x74\x65\x78\x74\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x20\x4C\x6F\x67\x6F\x20\x54\x65\x78\x74\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x6C\x65\x61\x64\x62\x74\x65\x78\x74\x28\x29\x3B\x22\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x74\x65\x61\x6D\x62\x50\x69\x63\x74\x75\x72\x65\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x54\x65\x61\x6D\x62\x6F\x61\x72\x64\x20\x49\x6D\x61\x67\x65\x20\x55\x52\x4C\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x74\x65\x61\x6D\x62\x67\x6E\x61\x6D\x65\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x72\x69\x67\x68\x74\x22\x20\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x55\x72\x6C\x20\x6F\x66\x20\x69\x6D\x61\x67\x65\x20\x73\x74\x61\x72\x74\x69\x6E\x67\x20\x77\x69\x74\x68\x20\x68\x74\x74\x70\x73\x3A\x2F\x2F\x2E\x2E\x2E\x20\x6F\x72\x20\x68\x74\x74\x70\x73\x3A\x2F\x2F\x2E\x2E\x2E\x22\x20\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x74\x65\x61\x6D\x62\x74\x65\x78\x74\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x54\x65\x61\x6D\x62\x6F\x61\x72\x64\x20\x4C\x6F\x67\x6F\x20\x54\x65\x78\x74\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x74\x65\x61\x6D\x62\x74\x65\x78\x74\x28\x29\x3B\x22\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x63\x61\x6E\x76\x61\x73\x50\x69\x63\x74\x75\x72\x65\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x4D\x61\x69\x6E\x20\x43\x61\x6E\x76\x61\x73\x20\x49\x6D\x61\x67\x65\x20\x55\x52\x4C\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x63\x61\x6E\x76\x61\x73\x62\x67\x6E\x61\x6D\x65\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x72\x69\x67\x68\x74\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x55\x72\x6C\x20\x6F\x66\x20\x69\x6D\x61\x67\x65\x20\x73\x74\x61\x72\x74\x69\x6E\x67\x20\x77\x69\x74\x68\x20\x68\x74\x74\x70\x73\x3A\x2F\x2F\x2E\x2E\x2E\x20\x6F\x72\x20\x68\x74\x74\x70\x73\x3A\x2F\x2F\x2E\x2E\x2E\x22\x20\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x69\x6D\x67\x55\x72\x6C\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x4D\x61\x69\x6E\x20\x42\x61\x6E\x6E\x65\x72\x20\x49\x63\x6F\x6E\x20\x55\x52\x4C\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x69\x6D\x67\x55\x72\x6C\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x72\x69\x67\x68\x74\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x55\x72\x6C\x20\x6F\x66\x20\x69\x6D\x61\x67\x65\x20\x73\x74\x61\x72\x74\x69\x6E\x67\x20\x77\x69\x74\x68\x20\x68\x74\x74\x70\x3A\x2F\x2F\x2E\x2E\x2E\x20\x6F\x72\x20\x68\x74\x74\x70\x73\x3A\x2F\x2F\x2E\x2E\x2E\x22\x20\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x69\x6D\x67\x48\x72\x65\x66\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x4D\x61\x69\x6E\x20\x42\x61\x6E\x6E\x65\x72\x20\x4C\x69\x6E\x6B\x20\x55\x52\x4C\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x69\x6D\x67\x48\x72\x65\x66\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x72\x69\x67\x68\x74\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x55\x72\x6C\x20\x6F\x66\x20\x6C\x69\x6E\x6B\x20\x74\x6F\x20\x72\x65\x64\x69\x72\x65\x63\x74\x22\x20\x3E","\x3C\x64\x69\x76\x20\x63\x6C\x61\x73\x73\x3D\x22\x69\x6E\x70\x75\x74\x2D\x62\x6F\x78\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x74\x65\x78\x74\x2D\x61\x6C\x69\x67\x6E\x3A\x20\x63\x65\x6E\x74\x65\x72\x3B\x20\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x20\x31\x32\x70\x78\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x30\x70\x78\x3B\x20\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x34\x70\x78\x20\x30\x20\x30\x70\x78\x20\x30\x3B\x22\x3E\x3C\x73\x70\x61\x6E\x20\x69\x64\x3D\x22\x6C\x65\x67\x65\x6E\x64\x6D\x61\x6E\x75\x61\x6C\x6D\x65\x73\x73\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x74\x69\x74\x6C\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x22\x3E\x4D\x61\x6E\x75\x61\x6C\x20\x4D\x65\x73\x73\x61\x67\x65\x20\x49\x63\x6F\x6E\x73\x26\x59\x6F\x75\x74\x75\x62\x65\x3A\x20\x20\x3C\x2F\x73\x70\x61\x6E\x3E","\x3C\x73\x65\x6C\x65\x63\x74\x20\x69\x64\x3D\x22\x63\x68\x61\x6E\x67\x65\x70\x68\x6F\x74\x6F\x73\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x6F\x6E\x63\x68\x61\x6E\x67\x65\x3D\x22\x63\x68\x61\x6E\x67\x65\x50\x68\x6F\x74\x6F\x46\x75\x6E\x28\x29\x3B\x22\x20\x72\x65\x71\x75\x69\x72\x65\x64\x3D\x22\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x22\x20\x74\x69\x74\x6C\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x64\x69\x73\x70\x6C\x61\x79\x3A\x69\x6E\x6C\x69\x6E\x65\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x33\x35\x25\x22\x20\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x31\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x49\x63\x6F\x6E\x20\x31\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x32\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x49\x63\x6F\x6E\x20\x32\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x33\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x49\x63\x6F\x6E\x20\x33\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x34\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x49\x63\x6F\x6E\x20\x34\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x35\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x49\x63\x6F\x6E\x20\x35\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x36\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x49\x63\x6F\x6E\x20\x36\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x37\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x59\x6F\x75\x74\x75\x62\x65\x20\x31\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x38\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x59\x6F\x75\x74\x75\x62\x65\x20\x32\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x39\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x59\x6F\x75\x74\x75\x62\x65\x20\x33\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x31\x30\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x59\x6F\x75\x74\x75\x62\x65\x20\x34\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x31\x31\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x59\x6F\x75\x74\x75\x62\x65\x20\x35\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x31\x32\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x59\x6F\x75\x74\x75\x62\x65\x20\x36\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x70\x69\x63\x31\x64\x61\x74\x61\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x4D\x65\x73\x73\x61\x67\x65\x20\x49\x63\x6F\x6E\x20\x54\x65\x78\x74\x20\x31\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x62\x6C\x6F\x63\x6B\x3B\x20\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x70\x69\x63\x31\x64\x61\x74\x61\x28\x29\x3B\x22\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x70\x69\x63\x32\x64\x61\x74\x61\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x4D\x65\x73\x73\x61\x67\x65\x20\x49\x63\x6F\x6E\x20\x54\x65\x78\x74\x20\x32\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x70\x69\x63\x32\x64\x61\x74\x61\x28\x29\x3B\x22\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x70\x69\x63\x33\x64\x61\x74\x61\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x4D\x65\x73\x73\x61\x67\x65\x20\x49\x63\x6F\x6E\x20\x54\x65\x78\x74\x20\x33\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x70\x69\x63\x33\x64\x61\x74\x61\x28\x29\x3B\x22\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x70\x69\x63\x34\x64\x61\x74\x61\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x4D\x65\x73\x73\x61\x67\x65\x20\x49\x63\x6F\x6E\x20\x54\x65\x78\x74\x20\x34\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x70\x69\x63\x34\x64\x61\x74\x61\x28\x29\x3B\x22\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x70\x69\x63\x35\x64\x61\x74\x61\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x4D\x65\x73\x73\x61\x67\x65\x20\x49\x63\x6F\x6E\x20\x54\x65\x78\x74\x20\x35\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x70\x69\x63\x35\x64\x61\x74\x61\x28\x29\x3B\x22\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x70\x69\x63\x36\x64\x61\x74\x61\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x4D\x65\x73\x73\x61\x67\x65\x20\x49\x63\x6F\x6E\x20\x54\x65\x78\x74\x20\x36\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x70\x69\x63\x36\x64\x61\x74\x61\x28\x29\x3B\x22\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x79\x74\x31\x64\x61\x74\x61\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x59\x6F\x75\x74\x75\x62\x65\x20\x4D\x65\x73\x73\x61\x67\x65\x20\x54\x65\x78\x74\x20\x31\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x79\x74\x31\x64\x61\x74\x61\x28\x29\x3B\x22\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x79\x74\x32\x64\x61\x74\x61\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x59\x6F\x75\x74\x75\x62\x65\x20\x4D\x65\x73\x73\x61\x67\x65\x20\x54\x65\x78\x74\x20\x32\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x79\x74\x32\x64\x61\x74\x61\x28\x29\x3B\x22\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x79\x74\x33\x64\x61\x74\x61\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x59\x6F\x75\x74\x75\x62\x65\x20\x4D\x65\x73\x73\x61\x67\x65\x20\x54\x65\x78\x74\x20\x33\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x79\x74\x33\x64\x61\x74\x61\x28\x29\x3B\x22\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x79\x74\x34\x64\x61\x74\x61\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x59\x6F\x75\x74\x75\x62\x65\x20\x4D\x65\x73\x73\x61\x67\x65\x20\x54\x65\x78\x74\x20\x34\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x79\x74\x34\x64\x61\x74\x61\x28\x29\x3B\x22\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x79\x74\x35\x64\x61\x74\x61\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x59\x6F\x75\x74\x75\x62\x65\x20\x4D\x65\x73\x73\x61\x67\x65\x20\x54\x65\x78\x74\x20\x35\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x79\x74\x35\x64\x61\x74\x61\x28\x29\x3B\x22\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x79\x74\x36\x64\x61\x74\x61\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x59\x6F\x75\x74\x75\x62\x65\x20\x4D\x65\x73\x73\x61\x67\x65\x20\x54\x65\x78\x74\x20\x36\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x79\x74\x36\x64\x61\x74\x61\x28\x29\x3B\x22\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x70\x69\x63\x31\x75\x72\x6C\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x4D\x65\x73\x73\x61\x67\x65\x20\x49\x63\x6F\x6E\x20\x49\x6D\x67\x75\x72\x20\x55\x72\x6C\x20\x31\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x62\x6C\x6F\x63\x6B\x3B\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x70\x69\x63\x31\x75\x72\x6C\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x72\x69\x67\x68\x74\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x65\x2E\x67\x2E\x20\x68\x74\x74\x70\x73\x3A\x2F\x2F\x69\x2E\x69\x6D\x67\x75\x72\x2E\x63\x6F\x6D\x2F\x52\x56\x42\x69\x33\x54\x31\x2E\x67\x69\x66\x22\x20\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x70\x69\x63\x32\x75\x72\x6C\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x4D\x65\x73\x73\x61\x67\x65\x20\x49\x63\x6F\x6E\x20\x49\x6D\x67\x75\x72\x20\x55\x72\x6C\x20\x32\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x70\x69\x63\x32\x75\x72\x6C\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x72\x69\x67\x68\x74\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x65\x2E\x67\x2E\x20\x68\x74\x74\x70\x73\x3A\x2F\x2F\x69\x2E\x69\x6D\x67\x75\x72\x2E\x63\x6F\x6D\x2F\x52\x56\x42\x69\x33\x54\x31\x2E\x67\x69\x66\x22\x20\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x70\x69\x63\x33\x75\x72\x6C\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x4D\x65\x73\x73\x61\x67\x65\x20\x49\x63\x6F\x6E\x20\x49\x6D\x67\x75\x72\x20\x55\x72\x6C\x20\x33\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x70\x69\x63\x33\x75\x72\x6C\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x72\x69\x67\x68\x74\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x65\x2E\x67\x2E\x20\x68\x74\x74\x70\x73\x3A\x2F\x2F\x69\x2E\x69\x6D\x67\x75\x72\x2E\x63\x6F\x6D\x2F\x52\x56\x42\x69\x33\x54\x31\x2E\x67\x69\x66\x22\x20\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x70\x69\x63\x34\x75\x72\x6C\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x4D\x65\x73\x73\x61\x67\x65\x20\x49\x63\x6F\x6E\x20\x49\x6D\x67\x75\x72\x20\x55\x72\x6C\x20\x34\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x70\x69\x63\x34\x75\x72\x6C\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x72\x69\x67\x68\x74\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x65\x2E\x67\x2E\x20\x68\x74\x74\x70\x73\x3A\x2F\x2F\x69\x2E\x69\x6D\x67\x75\x72\x2E\x63\x6F\x6D\x2F\x52\x56\x42\x69\x33\x54\x31\x2E\x67\x69\x66\x22\x20\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x70\x69\x63\x35\x75\x72\x6C\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x4D\x65\x73\x73\x61\x67\x65\x20\x49\x63\x6F\x6E\x20\x49\x6D\x67\x75\x72\x20\x55\x72\x6C\x20\x35\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x70\x69\x63\x35\x75\x72\x6C\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x72\x69\x67\x68\x74\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x65\x2E\x67\x2E\x20\x68\x74\x74\x70\x73\x3A\x2F\x2F\x69\x2E\x69\x6D\x67\x75\x72\x2E\x63\x6F\x6D\x2F\x52\x56\x42\x69\x33\x54\x31\x2E\x67\x69\x66\x22\x20\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x70\x69\x63\x36\x75\x72\x6C\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x4D\x65\x73\x73\x61\x67\x65\x20\x49\x63\x6F\x6E\x20\x49\x6D\x67\x75\x72\x20\x55\x72\x6C\x20\x36\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x70\x69\x63\x36\x75\x72\x6C\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x72\x69\x67\x68\x74\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x65\x2E\x67\x2E\x20\x68\x74\x74\x70\x73\x3A\x2F\x2F\x69\x2E\x69\x6D\x67\x75\x72\x2E\x63\x6F\x6D\x2F\x52\x56\x42\x69\x33\x54\x31\x2E\x67\x69\x66\x22\x20\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x79\x74\x31\x75\x72\x6C\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x59\x6F\x75\x74\x75\x62\x65\x20\x4D\x65\x73\x73\x61\x67\x65\x20\x55\x72\x6C\x20\x31\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x79\x74\x31\x75\x72\x6C\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x72\x69\x67\x68\x74\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x55\x72\x6C\x20\x6F\x66\x20\x79\x6F\x75\x74\x75\x62\x65\x20\x74\x6F\x20\x62\x65\x20\x73\x68\x6F\x77\x6E\x22\x20\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x79\x74\x32\x75\x72\x6C\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x59\x6F\x75\x74\x75\x62\x65\x20\x4D\x65\x73\x73\x61\x67\x65\x20\x55\x72\x6C\x20\x32\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x79\x74\x32\x75\x72\x6C\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x72\x69\x67\x68\x74\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x55\x72\x6C\x20\x6F\x66\x20\x79\x6F\x75\x74\x75\x62\x65\x20\x74\x6F\x20\x62\x65\x20\x73\x68\x6F\x77\x6E\x22\x20\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x79\x74\x33\x75\x72\x6C\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x59\x6F\x75\x74\x75\x62\x65\x20\x4D\x65\x73\x73\x61\x67\x65\x20\x55\x72\x6C\x20\x33\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x79\x74\x33\x75\x72\x6C\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x72\x69\x67\x68\x74\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x55\x72\x6C\x20\x6F\x66\x20\x79\x6F\x75\x74\x75\x62\x65\x20\x74\x6F\x20\x62\x65\x20\x73\x68\x6F\x77\x6E\x22\x20\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x79\x74\x34\x75\x72\x6C\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x59\x6F\x75\x74\x75\x62\x65\x20\x4D\x65\x73\x73\x61\x67\x65\x20\x55\x72\x6C\x20\x34\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x79\x74\x34\x75\x72\x6C\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x72\x69\x67\x68\x74\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x55\x72\x6C\x20\x6F\x66\x20\x79\x6F\x75\x74\x75\x62\x65\x20\x74\x6F\x20\x62\x65\x20\x73\x68\x6F\x77\x6E\x22\x20\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x79\x74\x35\x75\x72\x6C\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x59\x6F\x75\x74\x75\x62\x65\x20\x4D\x65\x73\x73\x61\x67\x65\x20\x55\x72\x6C\x20\x35\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x79\x74\x35\x75\x72\x6C\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x72\x69\x67\x68\x74\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x55\x72\x6C\x20\x6F\x66\x20\x79\x6F\x75\x74\x75\x62\x65\x20\x74\x6F\x20\x62\x65\x20\x73\x68\x6F\x77\x6E\x22\x20\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x79\x74\x36\x75\x72\x6C\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x59\x6F\x75\x74\x75\x62\x65\x20\x4D\x65\x73\x73\x61\x67\x65\x20\x55\x72\x6C\x20\x36\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x79\x74\x36\x75\x72\x6C\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x72\x69\x67\x68\x74\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x55\x72\x6C\x20\x6F\x66\x20\x79\x6F\x75\x74\x75\x62\x65\x20\x74\x6F\x20\x62\x65\x20\x73\x68\x6F\x77\x6E\x22\x20\x3E","\x3C\x64\x69\x76\x20\x63\x6C\x61\x73\x73\x3D\x22\x69\x6E\x70\x75\x74\x2D\x62\x6F\x78\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x74\x65\x78\x74\x2D\x61\x6C\x69\x67\x6E\x3A\x20\x63\x65\x6E\x74\x65\x72\x3B\x20\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x20\x31\x32\x70\x78\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x30\x70\x78\x3B\x20\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x20\x30\x20\x30\x70\x78\x20\x30\x3B\x22\x3E\x3C\x73\x70\x61\x6E\x20\x69\x64\x3D\x22\x6C\x65\x67\x65\x6E\x64\x6C\x61\x6E\x67\x75\x61\x67\x65\x74\x65\x78\x74\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x74\x69\x74\x6C\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x72\x69\x67\x68\x74\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x56\x69\x73\x69\x74\x20\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x20\x4C\x61\x6E\x67\x75\x61\x67\x65\x50\x61\x63\x6B\x45\x6E\x67\x6C\x69\x73\x68\x2E\x6A\x73\x20\x74\x6F\x20\x55\x70\x6C\x6F\x61\x64\x20\x61\x20\x4C\x61\x6E\x67\x75\x61\x67\x65\x20\x50\x61\x63\x6B\x22\x3E\x43\x68\x6F\x6F\x73\x65\x20\x4C\x61\x6E\x67\x75\x61\x67\x65\x3A\x20\x20\x3C\x2F\x73\x70\x61\x6E\x3E","\x3C\x73\x65\x6C\x65\x63\x74\x20\x69\x64\x3D\x22\x6C\x65\x67\x65\x6E\x64\x6C\x61\x6E\x67\x75\x61\x67\x65\x73\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x6F\x6E\x63\x68\x61\x6E\x67\x65\x3D\x22\x63\x68\x61\x6E\x67\x65\x4D\x6F\x64\x4C\x61\x6E\x67\x75\x61\x67\x65\x28\x29\x3B\x22\x20\x72\x65\x71\x75\x69\x72\x65\x64\x3D\x22\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x22\x20\x74\x69\x74\x6C\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x64\x69\x73\x70\x6C\x61\x79\x3A\x69\x6E\x6C\x69\x6E\x65\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x35\x30\x25\x22\x20\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x31\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x20\x73\x65\x6C\x65\x63\x74\x65\x64\x3E\x45\x6E\x67\x6C\x69\x73\x68\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x36\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x41\x72\x61\x62\x69\x63\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x34\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x42\x75\x6C\x67\x61\x72\x69\x61\x6E\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x35\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x46\x72\x65\x6E\x63\x68\x20\x2D\x20\x46\x72\x61\x6E\x63\x61\x69\x73\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x39\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x47\x65\x72\x6D\x61\x6E\x20\x2D\x20\x44\x65\x75\x74\x73\x63\x68\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x32\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x47\x72\x65\x65\x6B\x20\x2D\x20\u0395\u03BB\u03BB\u03B7\u03BD\u03B9\u03BA\u03AC\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x31\x31\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x50\x6F\x6C\x69\x73\x68\x20\x2D\x20\x50\x6F\x6C\x73\x6B\x69\x65\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x38\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x52\x75\x73\x73\x69\x61\x6E\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x33\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x53\x70\x61\x6E\x69\x73\x68\x20\x2D\x20\x45\x73\x70\x61\x6E\x6F\x6C\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x37\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x54\x72\x61\x64\x2E\x20\x43\x68\x69\x6E\x65\x73\x65\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x31\x30\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x54\x75\x72\x6B\x69\x73\x68\x20\x2D\x20\x54\xFC\x72\x6B\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x2F\x73\x65\x6C\x65\x63\x74\x3E\x3C\x2F\x64\x69\x76\x3E","\x3C\x64\x69\x76\x20\x63\x6C\x61\x73\x73\x3D\x22\x69\x6E\x70\x75\x74\x2D\x62\x6F\x78\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x74\x65\x78\x74\x2D\x61\x6C\x69\x67\x6E\x3A\x20\x63\x65\x6E\x74\x65\x72\x3B\x20\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x20\x31\x32\x70\x78\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x34\x70\x78\x3B\x20\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x20\x30\x20\x30\x70\x78\x20\x30\x3B\x22\x3E\x3C\x73\x70\x61\x6E\x20\x69\x64\x3D\x22\x6C\x65\x67\x65\x6E\x64\x64\x69\x73\x63\x6F\x72\x64\x77\x65\x62\x68\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x74\x69\x74\x6C\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x22\x3E\x44\x69\x73\x63\x6F\x72\x64\x20\x57\x65\x62\x68\x6F\x6F\x6B\x20\x55\x72\x6C\x20\x28\x66\x6F\x72\x20\x73\x65\x6E\x64\x69\x6E\x67\x20\x54\x4F\x4B\x45\x4E\x29\x20\x20\x3C\x2F\x73\x70\x61\x6E\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x64\x69\x73\x63\x77\x65\x62\x68\x6F\x6F\x6B\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x44\x69\x73\x63\x6F\x72\x64\x20\x57\x65\x62\x68\x6F\x6F\x6B\x20\x31\x20\x55\x72\x6C\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x72\x69\x67\x68\x74\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x4D\x75\x73\x74\x20\x62\x65\x20\x66\x69\x6C\x6C\x65\x64\x20\x66\x6F\x72\x20\x66\x75\x6E\x63\x74\x69\x6F\x6E\x20\x74\x6F\x20\x77\x6F\x72\x6B\x2E\x20\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x69\x73\x63\x6F\x72\x64\x2E\x63\x6F\x6D\x2F\x61\x70\x69\x2F\x77\x65\x62\x68\x6F\x6F\x6B\x73\x2F\x2E\x2E\x2E\x2F\x2E\x2E\x2E\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x34\x39\x2E\x35\x25\x3B\x20\x62\x6F\x72\x64\x65\x72\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x64\x61\x72\x6B\x73\x6C\x61\x74\x65\x67\x72\x65\x79\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x6C\x65\x66\x74\x3A\x20\x30\x2E\x35\x25\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x69\x6E\x6C\x69\x6E\x65\x2D\x62\x6C\x6F\x63\x6B\x3B\x20\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x64\x69\x73\x63\x77\x65\x62\x68\x6F\x6F\x6B\x31\x28\x29\x3B\x22\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x64\x69\x73\x63\x77\x65\x62\x68\x6F\x6F\x6B\x32\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x44\x69\x73\x63\x6F\x72\x64\x20\x57\x65\x62\x68\x6F\x6F\x6B\x20\x32\x20\x55\x72\x6C\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x72\x69\x67\x68\x74\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x53\x65\x63\x6F\x6E\x64\x61\x72\x79\x20\x57\x65\x62\x68\x6F\x6F\x6B\x28\x6F\x70\x74\x69\x6F\x6E\x61\x6C\x29\x2E\x20\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x69\x73\x63\x6F\x72\x64\x2E\x63\x6F\x6D\x2F\x61\x70\x69\x2F\x77\x65\x62\x68\x6F\x6F\x6B\x73\x2F\x2E\x2E\x2E\x2F\x2E\x2E\x2E\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x34\x39\x2E\x35\x25\x3B\x20\x62\x6F\x72\x64\x65\x72\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x64\x61\x72\x6B\x73\x6C\x61\x74\x65\x67\x72\x65\x79\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x72\x69\x67\x68\x74\x3A\x20\x30\x2E\x35\x25\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x69\x6E\x6C\x69\x6E\x65\x2D\x62\x6C\x6F\x63\x6B\x3B\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x64\x69\x73\x63\x77\x65\x62\x68\x6F\x6F\x6B\x32\x28\x29\x3B\x22\x3E","\x3C\x64\x69\x76\x20\x63\x6C\x61\x73\x73\x3D\x22\x69\x6E\x70\x75\x74\x2D\x62\x6F\x78\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x74\x65\x78\x74\x2D\x61\x6C\x69\x67\x6E\x3A\x20\x63\x65\x6E\x74\x65\x72\x3B\x20\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x20\x31\x32\x70\x78\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x34\x70\x78\x3B\x20\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x20\x30\x20\x30\x70\x78\x20\x30\x3B\x22\x3E\x3C\x73\x70\x61\x6E\x20\x69\x64\x3D\x22\x6C\x65\x67\x65\x6E\x64\x6F\x74\x68\x65\x72\x73\x63\x72\x69\x70\x74\x73\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x74\x69\x74\x6C\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x22\x3E\x45\x78\x70\x61\x6E\x73\x69\x6F\x6E\x73\x3A\x20\x3C\x2F\x73\x70\x61\x6E\x3E","\x3C\x2F\x64\x69\x76\x3E\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x4C\x45\x47\x45\x4E\x44\x41\x64\x73\x32\x22\x3E\x3C\x2F\x64\x69\x76\x3E\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x4C\x45\x47\x45\x4E\x44\x41\x64\x73\x33\x22\x3E\x3C\x2F\x64\x69\x76\x3E","\x23\x6D\x61\x69\x6E\x2D\x6D\x65\x6E\x75\x3E\x23\x70\x72\x6F\x66\x69\x6C\x65","\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65","\x31\x32\x70\x78","\x23\x55\x73\x65\x72\x50\x72\x6F\x66\x69\x6C\x65","\x70\x6F\x69\x6E\x74\x65\x72\x2D\x65\x76\x65\x6E\x74\x73","\x61\x75\x74\x6F","\x23\x6C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x2D\x6D\x65\x6E\x75","\x70\x61\x73\x74\x65","\x67\x65\x74\x44\x61\x74\x61","\x63\x6C\x69\x70\x62\x6F\x61\x72\x64\x44\x61\x74\x61","\x6F\x72\x69\x67\x69\x6E\x61\x6C\x45\x76\x65\x6E\x74","\x23\x73\x65\x61\x72\x63\x68\x42\x74\x6E","\x62\x69\x6E\x64","\x23\x6E\x6F\x74\x65\x31","\x23\x6E\x6F\x74\x65\x32","\x23\x6E\x6F\x74\x65\x33","\x23\x6E\x6F\x74\x65\x34","\x23\x6E\x6F\x74\x65\x35","\x23\x6E\x6F\x74\x65\x36","\x23\x6E\x6F\x74\x65\x37","\x2E\x6E\x6F\x74\x65","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x79\x6F\x75\x74\x75\x62\x65\x70\x6C\x61\x79\x65\x72\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x6C\x65\x66\x74\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x68\x35\x20\x63\x6C\x61\x73\x73\x3D\x22\x6D\x61\x69\x6E\x2D\x63\x6F\x6C\x6F\x72\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x72\x69\x67\x68\x74\x3A\x20\x31\x35\x70\x78\x3B\x22\x3E\x59\x6F\x75\x74\x75\x62\x65\x20\x70\x6C\x61\x79\x65\x72\x3C\x2F\x68\x35\x3E","\x3C\x69\x66\x72\x61\x6D\x65\x20\x69\x64\x3D\x22\x6D\x75\x73\x69\x63\x46\x72\x61\x6D\x65\x22\x20\x77\x69\x64\x74\x68\x3D\x22\x33\x35\x30\x22\x20\x68\x65\x69\x67\x68\x74\x3D\x22\x31\x38\x30\x22\x20\x73\x72\x63\x3D\x22","\x22\x20\x66\x72\x61\x6D\x65\x62\x6F\x72\x64\x65\x72\x3D\x22\x30\x22\x20\x61\x6C\x6C\x6F\x77\x66\x75\x6C\x6C\x73\x63\x72\x65\x65\x6E\x3D\x22\x22\x3E\x3C\x2F\x69\x66\x72\x61\x6D\x65\x3E\x3C\x2F\x64\x69\x76\x3E","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x61\x66\x74\x65\x72\x79\x6F\x75\x74\x75\x62\x65\x70\x6C\x61\x79\x65\x72\x22\x3E\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x6D\x75\x73\x69\x63\x55\x72\x6C\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x24\x28\x74\x68\x69\x73\x29\x2E\x73\x65\x6C\x65\x63\x74\x28\x29\x3B\x22\x20\x74\x79\x70\x65\x3D\x22\x74\x65\x78\x74\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x59\x6F\x75\x74\x75\x62\x65\x20\x55\x72\x6C\x22\x20\x76\x61\x6C\x75\x65\x3D\x22","\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x72\x69\x67\x68\x74\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x50\x61\x73\x74\x65\x20\x79\x6F\x75\x72\x20\x76\x69\x64\x65\x6F\x2F\x70\x6C\x61\x79\x6C\x69\x73\x74\x20\x68\x65\x72\x65\x22\x3E","\x69\x63\x6F\x6E\x2D\x75\x73\x65\x72","\x66\x61\x20\x66\x61\x2D\x63\x6F\x67\x20\x66\x61\x2D\x73\x70\x69\x6E\x20\x66\x61\x2D\x33\x78\x20\x66\x61\x2D\x66\x77","\x23\x65\x78\x70\x2D\x62\x61\x72\x20\x3E\x20\x2E\x69\x63\x6F\x6E\x2D\x75\x73\x65\x72","\x69\x6E\x70\x75\x74","\x6D\x61\x78\x6C\x65\x6E\x67\x74\x68","\x31\x30\x30\x30","\x63\x6C\x61\x73\x73","\x62\x74\x6E\x20\x62\x74\x6E\x2D\x73\x75\x63\x63\x65\x73\x73","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x73\x65\x61\x72\x63\x68\x4C\x6F\x67\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x6D\x61\x69\x6E\x2D\x63\x6F\x6C\x6F\x72\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x20\x31\x33\x70\x78\x3B\x66\x6C\x6F\x61\x74\x3A\x20\x6C\x65\x66\x74\x3B\x66\x6F\x6E\x74\x2D\x77\x65\x69\x67\x68\x74\x3A\x20\x37\x30\x30\x3B\x62\x6F\x72\x64\x65\x72\x2D\x72\x61\x64\x69\x75\x73\x3A\x20\x34\x70\x78\x3B\x77\x69\x64\x74\x68\x3A\x20\x36\x35\x25\x3B\x68\x65\x69\x67\x68\x74\x3A\x20\x32\x37\x30\x70\x78\x3B\x7A\x2D\x69\x6E\x64\x65\x78\x3A\x20\x31\x35\x3B\x6D\x61\x72\x67\x69\x6E\x3A\x20\x61\x75\x74\x6F\x3B\x74\x6F\x70\x3A\x20\x30\x70\x78\x3B\x72\x69\x67\x68\x74\x3A\x20\x30\x70\x78\x3B\x6C\x65\x66\x74\x3A\x20\x30\x70\x78\x3B\x62\x6F\x74\x74\x6F\x6D\x3A\x20\x2D\x33\x39\x30\x70\x78\x3B\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x20\x66\x69\x78\x65\x64\x3B\x70\x6F\x69\x6E\x74\x65\x72\x2D\x65\x76\x65\x6E\x74\x73\x3A\x20\x61\x75\x74\x6F\x3B\x63\x6F\x6C\x6F\x72\x3A\x20\x72\x67\x62\x28\x32\x35\x35\x2C\x20\x32\x35\x35\x2C\x20\x32\x35\x35\x29\x3B\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x31\x30\x70\x78\x3B\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x72\x67\x62\x61\x28\x30\x2C\x20\x30\x2C\x20\x30\x2C\x20\x30\x2E\x32\x29\x3B\x22\x3E\x3C\x68\x35\x20\x69\x64\x3D\x22\x6C\x6F\x67\x54\x69\x74\x6C\x65\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x6D\x61\x69\x6E\x2D\x63\x6F\x6C\x6F\x72\x20\x74\x65\x78\x74\x2D\x63\x65\x6E\x74\x65\x72\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x30\x70\x78\x3B\x22\x3E\x52\x65\x73\x75\x6C\x74\x73\x3C\x2F\x68\x35\x3E","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x6C\x6F\x67\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x66\x6F\x6E\x74\x2D\x77\x65\x69\x67\x68\x74\x3A\x20\x6E\x6F\x72\x6D\x61\x6C\x3B\x20\x6F\x76\x65\x72\x66\x6C\x6F\x77\x2D\x78\x3A\x20\x68\x69\x64\x64\x65\x6E\x3B\x20\x6F\x76\x65\x72\x66\x6C\x6F\x77\x2D\x79\x3A\x20\x61\x75\x74\x6F\x3B\x68\x65\x69\x67\x68\x74\x3A\x20\x39\x30\x25\x3B\x22\x3E","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x73\x68\x6F\x72\x74\x63\x75\x74\x73\x2D\x68\x75\x64\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x68\x75\x64\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x77\x69\x64\x74\x68\x3A\x20\x37\x30\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x33\x30\x70\x78\x3B\x20\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x70\x6F\x69\x6E\x74\x65\x72\x2D\x65\x76\x65\x6E\x74\x73\x3A\x20\x61\x75\x74\x6F\x3B\x20\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x20\x61\x62\x73\x6F\x6C\x75\x74\x65\x3B\x20\x72\x69\x67\x68\x74\x3A\x20\x30\x70\x78\x3B\x20\x74\x6F\x70\x3A\x20\x2D\x33\x30\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x62\x6C\x6F\x63\x6B\x3B\x22\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x56\x6F\x69\x63\x65\x42\x74\x6E\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x2D\x6C\x69\x6E\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x36\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x56\x6F\x69\x63\x65\x20\x26\x20\x43\x61\x6D\x65\x72\x61\x20\x43\x68\x61\x74\x22\x3E\x3C\x69\x20\x69\x64\x3D\x22\x56\x6F\x69\x63\x65\x42\x74\x6E\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x6D\x69\x63\x72\x6F\x70\x68\x6F\x6E\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x2D\x6C\x65\x66\x74\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x4D\x69\x6E\x69\x53\x63\x72\x69\x70\x74\x73\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x2D\x6C\x69\x6E\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x36\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x73\x65\x74\x73\x63\x72\x69\x70\x74\x69\x6E\x67\x66\x75\x6E\x63\x74\x69\x6F\x6E\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x4D\x69\x6E\x69\x20\x53\x63\x72\x69\x70\x74\x73\x22\x3E\x3C\x69\x20\x69\x64\x3D\x22\x4D\x69\x6E\x69\x53\x63\x72\x69\x70\x74\x73\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x6C\x69\x6E\x6F\x64\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x2D\x6C\x65\x66\x74\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x53\x65\x6E\x64\x43\x6F\x6D\x6D\x61\x6E\x64\x73\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x2D\x6C\x69\x6E\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x36\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x73\x65\x74\x6D\x65\x73\x73\x61\x67\x65\x63\x6F\x6D\x66\x75\x6E\x63\x74\x69\x6F\x6E\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x4D\x65\x73\x73\x61\x67\x65\x20\x53\x63\x72\x69\x70\x74\x20\x43\x6F\x6D\x6D\x61\x6E\x64\x73\x22\x3E\x3C\x69\x20\x69\x64\x3D\x22\x53\x65\x6E\x64\x43\x6F\x6D\x6D\x61\x6E\x64\x73\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x73\x69\x74\x65\x6D\x61\x70\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x2D\x6C\x65\x66\x74\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x49\x6D\x61\x67\x65\x73\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x2D\x6C\x69\x6E\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x36\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x73\x65\x74\x69\x63\x6F\x6E\x66\x75\x6E\x63\x74\x69\x6F\x6E\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x4D\x65\x73\x73\x61\x67\x65\x20\x49\x6D\x67\x75\x72\x20\x49\x63\x6F\x6E\x73\x22\x3E\x3C\x69\x20\x69\x64\x3D\x22\x49\x6D\x61\x67\x65\x73\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x70\x69\x63\x74\x75\x72\x65\x2D\x6F\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x2D\x6C\x65\x66\x74\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x79\x6F\x75\x74\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x2D\x6C\x69\x6E\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x36\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x73\x65\x74\x79\x74\x66\x75\x6E\x63\x74\x69\x6F\x6E\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x4D\x65\x73\x73\x61\x67\x65\x20\x59\x6F\x75\x74\x75\x62\x65\x20\x56\x69\x64\x65\x6F\x73\x22\x3E\x3C\x69\x20\x69\x64\x3D\x22\x79\x6F\x75\x74\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x79\x6F\x75\x74\x75\x62\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x2D\x6C\x65\x66\x74\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x70\x6C\x61\x79\x65\x72\x42\x74\x6E\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x2D\x6C\x69\x6E\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x36\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x43\x6C\x69\x63\x6B\x20\x70\x6C\x61\x79\x20\x6F\x6E\x20\x79\x6F\x75\x74\x75\x62\x65\x20\x74\x61\x62\x20\x61\x74\x20\x66\x69\x72\x73\x74\x22\x3E\x3C\x69\x20\x69\x64\x3D\x22\x70\x6C\x61\x79\x65\x72\x49\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x70\x6C\x61\x79\x2D\x63\x69\x72\x63\x6C\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x2D\x63\x65\x6E\x74\x65\x72\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x69\x6D\x61\x67\x65\x73\x2D\x68\x75\x64\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x68\x75\x64\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x77\x69\x64\x74\x68\x3A\x20\x37\x30\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x33\x30\x70\x78\x3B\x20\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x70\x6F\x69\x6E\x74\x65\x72\x2D\x65\x76\x65\x6E\x74\x73\x3A\x20\x61\x75\x74\x6F\x3B\x20\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x20\x61\x62\x73\x6F\x6C\x75\x74\x65\x3B\x20\x72\x69\x67\x68\x74\x3A\x20\x30\x70\x78\x3B\x20\x74\x6F\x70\x3A\x20\x2D\x36\x30\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x73\x65\x6E\x64\x69\x63\x6F\x6E\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x2D\x6C\x69\x6E\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x36\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x73\x65\x6E\x64\x69\x63\x6F\x6E\x31\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x42\x61\x64\x20\x43\x68\x6F\x69\x63\x65\x21\x22\x3E\x3C\x69\x20\x69\x64\x3D\x22\x73\x65\x6E\x64\x69\x63\x6F\x6E\x31\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x65\x78\x63\x6C\x61\x6D\x61\x74\x69\x6F\x6E\x2D\x74\x72\x69\x61\x6E\x67\x6C\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x2D\x6C\x65\x66\x74\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x73\x65\x6E\x64\x69\x63\x6F\x6E\x32\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x2D\x6C\x69\x6E\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x36\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x73\x65\x6E\x64\x69\x63\x6F\x6E\x32\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x57\x68\x79\x3F\x22\x3E\x3C\x69\x20\x69\x64\x3D\x22\x73\x65\x6E\x64\x69\x63\x6F\x6E\x32\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x71\x75\x65\x73\x74\x69\x6F\x6E\x2D\x63\x69\x72\x63\x6C\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x2D\x6C\x65\x66\x74\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x73\x65\x6E\x64\x69\x63\x6F\x6E\x33\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x2D\x6C\x69\x6E\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x36\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x73\x65\x6E\x64\x69\x63\x6F\x6E\x33\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x59\x6F\x77\x21\x21\x22\x3E\x3C\x69\x20\x69\x64\x3D\x22\x73\x65\x6E\x64\x69\x63\x6F\x6E\x33\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x77\x68\x65\x65\x6C\x63\x68\x61\x69\x72\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x2D\x63\x65\x6E\x74\x65\x72\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x73\x65\x6E\x64\x69\x63\x6F\x6E\x34\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x2D\x6C\x69\x6E\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x36\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x73\x65\x6E\x64\x69\x63\x6F\x6E\x34\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x44\x65\x61\x74\x68\x21\x22\x3E\x3C\x69\x20\x69\x64\x3D\x22\x73\x65\x6E\x64\x69\x63\x6F\x6E\x34\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x63\x75\x74\x6C\x65\x72\x79\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x2D\x63\x65\x6E\x74\x65\x72\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x73\x65\x6E\x64\x69\x63\x6F\x6E\x35\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x2D\x6C\x69\x6E\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x36\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x73\x65\x6E\x64\x69\x63\x6F\x6E\x35\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x52\x65\x6C\x61\x78\x21\x22\x3E\x3C\x69\x20\x69\x64\x3D\x22\x73\x65\x6E\x64\x69\x63\x6F\x6E\x35\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x62\x65\x64\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x2D\x6C\x65\x66\x74\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x73\x65\x6E\x64\x69\x63\x6F\x6E\x36\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x2D\x6C\x69\x6E\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x36\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x73\x65\x6E\x64\x69\x63\x6F\x6E\x36\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x4C\x65\x67\x65\x6E\x64\x21\x22\x3E\x3C\x69\x20\x69\x64\x3D\x22\x73\x65\x6E\x64\x69\x63\x6F\x6E\x36\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x74\x65\x6C\x65\x67\x72\x61\x6D\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x2D\x6C\x65\x66\x74\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E\x3C\x2F\x64\x69\x76\x3E","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x79\x74\x2D\x68\x75\x64\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x68\x75\x64\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x77\x69\x64\x74\x68\x3A\x20\x37\x30\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x33\x30\x70\x78\x3B\x20\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x70\x6F\x69\x6E\x74\x65\x72\x2D\x65\x76\x65\x6E\x74\x73\x3A\x20\x61\x75\x74\x6F\x3B\x20\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x20\x61\x62\x73\x6F\x6C\x75\x74\x65\x3B\x20\x72\x69\x67\x68\x74\x3A\x20\x30\x70\x78\x3B\x20\x74\x6F\x70\x3A\x20\x2D\x36\x30\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x73\x65\x6E\x64\x79\x74\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x2D\x6C\x69\x6E\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x36\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x73\x65\x6E\x64\x79\x74\x31\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x52\x69\x63\x6B\x20\x41\x73\x74\x6C\x65\x79\x20\x2D\x20\x4E\x65\x76\x65\x72\x20\x47\x6F\x6E\x6E\x61\x20\x47\x69\x76\x65\x20\x59\x6F\x75\x20\x55\x70\x22\x3E\x3C\x69\x20\x69\x64\x3D\x22\x73\x65\x6E\x64\x79\x74\x31\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x6D\x75\x73\x69\x63\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x2D\x6C\x65\x66\x74\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x73\x65\x6E\x64\x79\x74\x32\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x2D\x6C\x69\x6E\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x36\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x73\x65\x6E\x64\x79\x74\x32\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x53\x75\x72\x76\x69\x76\x6F\x72\x20\x2D\x20\x45\x79\x65\x20\x4F\x66\x20\x54\x68\x65\x20\x54\x69\x67\x65\x72\x22\x3E\x3C\x69\x20\x69\x64\x3D\x22\x73\x65\x6E\x64\x79\x74\x32\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x6D\x75\x73\x69\x63\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x2D\x6C\x65\x66\x74\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x73\x65\x6E\x64\x79\x74\x33\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x2D\x6C\x69\x6E\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x36\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x73\x65\x6E\x64\x79\x74\x33\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x4C\x69\x6F\x6E\x20\x6B\x69\x6E\x67\x20\x2D\x20\x54\x68\x65\x20\x4C\x69\x6F\x6E\x20\x53\x6C\x65\x65\x70\x73\x20\x54\x6F\x6E\x69\x67\x68\x74\x22\x3E\x3C\x69\x20\x69\x64\x3D\x22\x73\x65\x6E\x64\x79\x74\x33\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x6D\x75\x73\x69\x63\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x2D\x63\x65\x6E\x74\x65\x72\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x73\x65\x6E\x64\x79\x74\x34\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x2D\x6C\x69\x6E\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x36\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x73\x65\x6E\x64\x79\x74\x34\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x41\x67\x61\x72\x69\x6F\x20\x2D\x20\x4A\x75\x6D\x62\x6F\x20\x53\x6F\x6C\x6F\x20\x76\x73\x20\x54\x65\x61\x6D\x73\x22\x3E\x3C\x69\x20\x69\x64\x3D\x22\x73\x65\x6E\x64\x79\x74\x34\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x76\x69\x64\x65\x6F\x2D\x63\x61\x6D\x65\x72\x61\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x2D\x63\x65\x6E\x74\x65\x72\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x73\x65\x6E\x64\x79\x74\x35\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x2D\x6C\x69\x6E\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x36\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x73\x65\x6E\x64\x79\x74\x35\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x41\x67\x61\x72\x69\x6F\x20\x2D\x20\x4B\x69\x6C\x6C\x33\x72\x20\x76\x73\x20\x54\x65\x61\x6D\x73\x22\x3E\x3C\x69\x20\x69\x64\x3D\x22\x73\x65\x6E\x64\x79\x74\x35\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x76\x69\x64\x65\x6F\x2D\x63\x61\x6D\x65\x72\x61\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x2D\x6C\x65\x66\x74\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x73\x65\x6E\x64\x79\x74\x36\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x2D\x6C\x69\x6E\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x36\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x73\x65\x6E\x64\x79\x74\x36\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x50\x72\x6F\x6D\x6F\x74\x69\x6F\x6E\x61\x6C\x20\x56\x69\x64\x65\x6F\x22\x3E\x3C\x69\x20\x69\x64\x3D\x22\x73\x65\x6E\x64\x79\x74\x36\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x74\x65\x6C\x65\x67\x72\x61\x6D\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x2D\x6C\x65\x66\x74\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E\x3C\x2F\x64\x69\x76\x3E","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x6D\x73\x67\x63\x6F\x6D\x6D\x61\x6E\x64\x73\x2D\x68\x75\x64\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x68\x75\x64\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x77\x69\x64\x74\x68\x3A\x20\x37\x30\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x33\x30\x70\x78\x3B\x20\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x70\x6F\x69\x6E\x74\x65\x72\x2D\x65\x76\x65\x6E\x74\x73\x3A\x20\x61\x75\x74\x6F\x3B\x20\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x20\x61\x62\x73\x6F\x6C\x75\x74\x65\x3B\x20\x72\x69\x67\x68\x74\x3A\x20\x30\x70\x78\x3B\x20\x74\x6F\x70\x3A\x20\x2D\x36\x30\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x6D\x73\x67\x63\x6F\x6D\x6D\x61\x6E\x64\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x2D\x6C\x69\x6E\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x36\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x6D\x73\x67\x63\x6F\x6D\x6D\x61\x6E\x64\x31\x66\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x48\x65\x6C\x6C\x6F\x20\x54\x65\x61\x6D\x21\x22\x3E\x3C\x69\x20\x69\x64\x3D\x22\x6D\x73\x67\x63\x6F\x6D\x6D\x61\x6E\x64\x31\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x63\x6F\x66\x66\x65\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x2D\x6C\x65\x66\x74\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x6D\x73\x67\x63\x6F\x6D\x6D\x61\x6E\x64\x32\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x2D\x6C\x69\x6E\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x36\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x6D\x73\x67\x63\x6F\x6D\x6D\x61\x6E\x64\x32\x66\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x4C\x61\x75\x67\x68\x20\x74\x6F\x20\x54\x65\x61\x6D\x22\x3E\x3C\x69\x20\x69\x64\x3D\x22\x6D\x73\x67\x63\x6F\x6D\x6D\x61\x6E\x64\x32\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x73\x6D\x69\x6C\x65\x2D\x6F\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x2D\x6C\x65\x66\x74\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x6D\x73\x67\x63\x6F\x6D\x6D\x61\x6E\x64\x33\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x2D\x6C\x69\x6E\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x36\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x6D\x73\x67\x63\x6F\x6D\x6D\x61\x6E\x64\x33\x66\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x54\x65\x61\x6D\x20\x43\x68\x61\x6E\x67\x65\x20\x4E\x61\x6D\x65\x20\x74\x6F\x20\x79\x6F\x75\x72\x73\x22\x3E\x3C\x69\x20\x69\x64\x3D\x22\x6D\x73\x67\x63\x6F\x6D\x6D\x61\x6E\x64\x33\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x6D\x61\x67\x69\x63\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x2D\x63\x65\x6E\x74\x65\x72\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x6D\x73\x67\x63\x6F\x6D\x6D\x61\x6E\x64\x34\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x2D\x6C\x69\x6E\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x36\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x6D\x73\x67\x63\x6F\x6D\x6D\x61\x6E\x64\x34\x66\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x54\x72\x6F\x6C\x6C\x20\x54\x65\x61\x6D\x6D\x61\x74\x65\x22\x3E\x3C\x69\x20\x69\x64\x3D\x22\x6D\x73\x67\x63\x6F\x6D\x6D\x61\x6E\x64\x34\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x62\x61\x74\x68\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x2D\x63\x65\x6E\x74\x65\x72\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x6D\x73\x67\x63\x6F\x6D\x6D\x61\x6E\x64\x35\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x2D\x6C\x69\x6E\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x36\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x6D\x73\x67\x63\x6F\x6D\x6D\x61\x6E\x64\x35\x66\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x4F\x70\x65\x6E\x20\x59\x6F\x75\x74\x75\x62\x65\x20\x4D\x75\x73\x69\x63\x22\x3E\x3C\x69\x20\x69\x64\x3D\x22\x6D\x73\x67\x63\x6F\x6D\x6D\x61\x6E\x64\x35\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x79\x6F\x75\x74\x75\x62\x65\x2D\x70\x6C\x61\x79\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x2D\x6C\x65\x66\x74\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x6D\x73\x67\x63\x6F\x6D\x6D\x61\x6E\x64\x36\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x2D\x6C\x69\x6E\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x36\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x6D\x73\x67\x63\x6F\x6D\x6D\x61\x6E\x64\x36\x66\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x49\x6E\x73\x61\x6E\x65\x20\x6D\x6F\x64\x65\x20\x28\x48\x69\x64\x65\x20\x45\x76\x65\x72\x79\x74\x68\x69\x6E\x67\x29\x22\x3E\x3C\x69\x20\x69\x64\x3D\x22\x6D\x73\x67\x63\x6F\x6D\x6D\x61\x6E\x64\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x65\x78\x63\x6C\x61\x6D\x61\x74\x69\x6F\x6E\x2D\x74\x72\x69\x61\x6E\x67\x6C\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x2D\x6C\x65\x66\x74\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E\x3C\x2F\x64\x69\x76\x3E","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x73\x63\x72\x69\x70\x74\x69\x6E\x67\x2D\x68\x75\x64\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x68\x75\x64\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x77\x69\x64\x74\x68\x3A\x20\x31\x32\x2E\x35\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x33\x30\x70\x78\x3B\x20\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x70\x6F\x69\x6E\x74\x65\x72\x2D\x65\x76\x65\x6E\x74\x73\x3A\x20\x61\x75\x74\x6F\x3B\x20\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x20\x61\x62\x73\x6F\x6C\x75\x74\x65\x3B\x20\x72\x69\x67\x68\x74\x3A\x20\x30\x70\x78\x3B\x20\x74\x6F\x70\x3A\x20\x2D\x36\x30\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x43\x75\x74\x6E\x61\x6D\x65\x73\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x2D\x6C\x69\x6E\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x30\x30\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x45\x64\x69\x74\x20\x6E\x61\x6D\x65\x73\x22\x3E\x3C\x69\x20\x69\x64\x3D\x22\x43\x75\x74\x6E\x61\x6D\x65\x73\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x73\x63\x69\x73\x73\x6F\x72\x73\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x2D\x6C\x65\x66\x74\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x6C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x2D\x6D\x65\x6E\x75\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x6F\x69\x6E\x74\x65\x72\x2D\x65\x76\x65\x6E\x74\x73\x3A\x20\x61\x75\x74\x6F\x3B\x22\x3E","\x3C\x61\x20\x69\x64\x3D\x22\x73\x65\x61\x72\x63\x68\x53\x68\x6F\x72\x74\x63\x75\x74\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x69\x6E\x66\x6F\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x6C\x65\x66\x74\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x4A\x6F\x69\x6E\x20\x73\x65\x72\x76\x65\x72\x20\x28\x42\x61\x63\x6B\x73\x70\x61\x63\x65\x29\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x77\x69\x64\x74\x68\x3A\x20\x33\x33\x2E\x33\x25\x3B\x74\x65\x78\x74\x2D\x73\x68\x61\x64\x6F\x77\x3A\x20\x30\x2E\x33\x70\x78\x20\x30\x2E\x33\x70\x78\x20\x23\x30\x30\x30\x30\x30\x30\x3B\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x20\x73\x6D\x61\x6C\x6C\x3B\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x30\x70\x78\x3B\x62\x6F\x72\x64\x65\x72\x2D\x74\x6F\x70\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x72\x67\x62\x28\x31\x34\x31\x2C\x20\x32\x30\x31\x2C\x20\x36\x34\x29\x3B\x62\x6F\x72\x64\x65\x72\x2D\x62\x6F\x74\x74\x6F\x6D\x2D\x73\x74\x79\x6C\x65\x3A\x20\x6E\x6F\x6E\x65\x3B\x62\x6F\x72\x64\x65\x72\x2D\x6C\x65\x66\x74\x2D\x73\x74\x79\x6C\x65\x3A\x20\x6E\x6F\x6E\x65\x3B\x62\x6F\x72\x64\x65\x72\x3A\x20\x6E\x6F\x6E\x65\x3B\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x30\x70\x78\x3B\x20\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x63\x6F\x6C\x6F\x72\x3A\x20","\x20\x3B\x20\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x53\x65\x61\x72\x63\x68\x20\x6C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x73\x22\x20\x74\x69\x74\x6C\x65\x3D\x22\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x73\x65\x61\x72\x63\x68\x20\x66\x61\x2D\x6C\x67\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x61\x3E","\x3C\x61\x20\x69\x64\x3D\x22\x63\x6F\x70\x79\x53\x49\x50\x42\x74\x6E\x22\x20\x68\x72\x65\x66\x3D\x22\x6A\x61\x76\x61\x73\x63\x72\x69\x70\x74\x3A\x76\x6F\x69\x64\x28\x30\x29\x3B\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x73\x6D\x20\x62\x74\x6E\x2D\x63\x6F\x70\x79\x2D\x6C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x20\x62\x74\x6E\x2D\x69\x6E\x66\x6F\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x63\x6F\x6C\x6F\x72\x3A\x20","\x20\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x33\x33\x2E\x33\x25\x3B\x74\x65\x78\x74\x2D\x73\x68\x61\x64\x6F\x77\x3A\x20\x30\x2E\x33\x70\x78\x20\x30\x2E\x33\x70\x78\x20\x23\x30\x30\x30\x30\x30\x30\x3B\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x20\x73\x6D\x61\x6C\x6C\x3B\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x30\x70\x78\x3B\x2F\x2A\x20\x62\x6F\x72\x64\x65\x72\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x2A\x2F\x62\x6F\x72\x64\x65\x72\x2D\x6C\x65\x66\x74\x2D\x73\x74\x79\x6C\x65\x3A\x20\x6E\x6F\x6E\x65\x3B\x62\x6F\x72\x64\x65\x72\x2D\x72\x69\x67\x68\x74\x2D\x73\x74\x79\x6C\x65\x3A\x20\x6E\x6F\x6E\x65\x3B\x62\x6F\x72\x64\x65\x72\x2D\x62\x6F\x74\x74\x6F\x6D\x2D\x73\x74\x79\x6C\x65\x3A\x20\x6E\x6F\x6E\x65\x3B\x62\x6F\x72\x64\x65\x72\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x75\x73\x65\x72\x2D\x64\x72\x61\x67\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x75\x73\x65\x72\x2D\x73\x65\x6C\x65\x63\x74\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x2D\x6D\x6F\x7A\x2D\x75\x73\x65\x72\x2D\x73\x65\x6C\x65\x63\x74\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x2D\x77\x65\x62\x6B\x69\x74\x2D\x75\x73\x65\x72\x2D\x64\x72\x61\x67\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x2D\x77\x65\x62\x6B\x69\x74\x2D\x75\x73\x65\x72\x2D\x73\x65\x6C\x65\x63\x74\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x2D\x6D\x73\x2D\x75\x73\x65\x72\x2D\x73\x65\x6C\x65\x63\x74\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x6C\x65\x66\x74\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x43\x6F\x70\x79\x20\x54\x6F\x6B\x65\x6E\x2F\x53\x49\x50\x22\x3E\x43\x6F\x70\x79\x3C\x2F\x61\x3E","\x3C\x61\x20\x69\x64\x3D\x22\x72\x65\x63\x6F\x6E\x6E\x65\x63\x74\x42\x74\x6E\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x69\x6E\x66\x6F\x22\x20\x74\x69\x74\x6C\x65\x3D\x22\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x62\x6F\x74\x74\x6F\x6D\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x43\x68\x61\x6E\x67\x65\x20\x73\x65\x72\x76\x65\x72\x20\x28\x2B\x29\x22\x20\x73\x74\x79\x6C\x65\x3D\x22","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x63\x6F\x6C\x6F\x72\x3A\x20","\x20\x3B\x77\x69\x64\x74\x68\x3A\x20\x33\x33\x2E\x33\x25\x3B\x20\x74\x65\x78\x74\x2D\x73\x68\x61\x64\x6F\x77\x3A\x20\x30\x2E\x33\x70\x78\x20\x30\x2E\x33\x70\x78\x20\x23\x30\x30\x30\x30\x30\x30\x3B\x20\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x20\x73\x6D\x61\x6C\x6C\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x30\x70\x78\x3B\x20\x62\x6F\x72\x64\x65\x72\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x72\x65\x66\x72\x65\x73\x68\x20\x66\x61\x2D\x6C\x67\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x61\x3E","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x64\x72\x6F\x70\x44\x6F\x77\x6E\x33\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x68\x75\x64\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x20\x61\x62\x73\x6F\x6C\x75\x74\x65\x3B\x20\x70\x6F\x69\x6E\x74\x65\x72\x2D\x65\x76\x65\x6E\x74\x73\x3A\x20\x61\x75\x74\x6F\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x33\x33\x25\x3B\x20\x6C\x65\x66\x74\x3A\x20\x30\x70\x78\x3B\x20\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x62\x6F\x72\x64\x65\x72\x2D\x72\x61\x64\x69\x75\x73\x3A\x20\x30\x70\x78\x3B\x22\x3E","\x3C\x61\x20\x69\x64\x3D\x22\x6C\x61\x73\x74\x49\x50\x42\x74\x6E\x22\x20\x64\x61\x74\x61\x2D\x64\x69\x73\x61\x62\x6C\x65\x64\x3D\x22\x74\x72\x75\x65\x22\x20\x68\x72\x65\x66\x3D\x22\x6A\x61\x76\x61\x73\x63\x72\x69\x70\x74\x3A\x76\x6F\x69\x64\x28\x30\x29\x3B\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x73\x6D\x20\x62\x74\x6E\x2D\x63\x6F\x70\x79\x2D\x6C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x20\x62\x74\x6E\x2D\x69\x6E\x66\x6F\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x77\x69\x64\x74\x68\x3A\x20\x31\x30\x30\x25\x3B\x74\x65\x78\x74\x2D\x73\x68\x61\x64\x6F\x77\x3A\x20\x30\x2E\x33\x70\x78\x20\x30\x2E\x33\x70\x78\x20\x23\x30\x30\x30\x30\x30\x30\x3B\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x20\x73\x6D\x61\x6C\x6C\x3B\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x30\x70\x78\x3B\x62\x6F\x72\x64\x65\x72\x2D\x74\x6F\x70\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x72\x67\x62\x28\x31\x34\x31\x2C\x20\x32\x30\x31\x2C\x20\x36\x34\x29\x3B\x62\x6F\x72\x64\x65\x72\x2D\x62\x6F\x74\x74\x6F\x6D\x2D\x73\x74\x79\x6C\x65\x3A\x20\x6E\x6F\x6E\x65\x3B\x62\x6F\x72\x64\x65\x72\x2D\x6C\x65\x66\x74\x2D\x73\x74\x79\x6C\x65\x3A\x20\x6E\x6F\x6E\x65\x3B\x62\x6F\x72\x64\x65\x72\x3A\x20\x6E\x6F\x6E\x65\x3B\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x30\x70\x78\x3B\x20\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x63\x6F\x6C\x6F\x72\x3A\x20","\x20\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x68\x74\x6D\x6C\x3D\x22\x74\x72\x75\x65\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x6C\x65\x66\x74\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x3C\x70\x20\x73\x74\x79\x6C\x65\x3D\x26\x71\x75\x6F\x74\x3B\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x33\x70\x78\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x62\x6F\x74\x74\x6F\x6D\x3A\x30\x70\x78\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x72\x69\x67\x68\x74\x3A\x20\x32\x70\x78\x3B\x26\x71\x75\x6F\x74\x3B\x20\x61\x6C\x69\x67\x6E\x3D\x26\x71\x75\x6F\x74\x3B\x63\x65\x6E\x74\x65\x72\x26\x71\x75\x6F\x74\x3B\x3E\x3C\x73\x70\x61\x6E\x20\x63\x6C\x61\x73\x73\x3D\x26\x71\x75\x6F\x74\x3B\x68\x75\x64\x2D\x6D\x61\x69\x6E\x2D\x63\x6F\x6C\x6F\x72\x26\x71\x75\x6F\x74\x3B\x20\x73\x74\x79\x6C\x65\x3D\x26\x71\x75\x6F\x74\x3B\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x61\x62\x73\x6F\x6C\x75\x74\x65\x3B\x20\x6C\x65\x66\x74\x3A\x20\x31\x35\x70\x78\x3B\x26\x71\x75\x6F\x74\x3B\x3E\x4E\x45\x57\x3C\x2F\x73\x70\x61\x6E\x3E\x4A\x6F\x69\x6E\x20\x62\x61\x63\x6B\x3C\x2F\x70\x3E\x3C\x68\x72\x20\x73\x74\x79\x6C\x65\x3D\x26\x71\x75\x6F\x74\x3B\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x35\x70\x78\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x62\x6F\x74\x74\x6F\x6D\x3A\x31\x30\x70\x78\x3B\x20\x62\x6F\x72\x64\x65\x72\x2D\x63\x6F\x6C\x6F\x72\x3A\x64\x61\x72\x6B\x73\x6C\x61\x74\x65\x67\x72\x61\x79\x3B\x26\x71\x75\x6F\x74\x3B\x2F\x3E\x3C\x70\x20\x63\x6C\x61\x73\x73\x3D\x26\x71\x75\x6F\x74\x3B\x26\x71\x75\x6F\x74\x3B\x20\x73\x74\x79\x6C\x65\x3D\x26\x71\x75\x6F\x74\x3B\x6D\x61\x72\x67\x69\x6E\x2D\x62\x6F\x74\x74\x6F\x6D\x3A\x33\x70\x78\x3B\x20\x66\x6F\x6E\x74\x2D\x77\x65\x69\x67\x68\x74\x3A\x6E\x6F\x72\x6D\x61\x6C\x3B\x26\x71\x75\x6F\x74\x3B\x20\x61\x6C\x69\x67\x6E\x3D\x26\x71\x75\x6F\x74\x3B\x6A\x75\x73\x74\x69\x66\x79\x26\x71\x75\x6F\x74\x3B\x3E\x43\x6F\x6E\x6E\x65\x63\x74\x20\x74\x6F\x20\x6C\x61\x73\x74\x20\x49\x50\x20\x79\x6F\x75\x20\x70\x6C\x61\x79\x65\x64\x3C\x2F\x70\x3E\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x61\x72\x72\x6F\x77\x2D\x63\x69\x72\x63\x6C\x65\x2D\x64\x6F\x77\x6E\x20\x66\x61\x2D\x6C\x67\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x61\x3E","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x64\x72\x6F\x70\x44\x6F\x77\x6E\x32\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x68\x75\x64\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x20\x61\x62\x73\x6F\x6C\x75\x74\x65\x3B\x20\x70\x6F\x69\x6E\x74\x65\x72\x2D\x65\x76\x65\x6E\x74\x73\x3A\x20\x61\x75\x74\x6F\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x33\x33\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x39\x30\x70\x78\x3B\x20\x6C\x65\x66\x74\x3A\x20\x36\x37\x70\x78\x3B\x20\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x62\x6F\x72\x64\x65\x72\x2D\x72\x61\x64\x69\x75\x73\x3A\x20\x30\x70\x78\x3B\x22\x3E","\x3C\x61\x20\x69\x64\x3D\x22\x63\x6F\x70\x79\x53\x49\x50\x61\x6E\x64\x50\x61\x73\x73\x22\x20\x68\x72\x65\x66\x3D\x22\x6A\x61\x76\x61\x73\x63\x72\x69\x70\x74\x3A\x76\x6F\x69\x64\x28\x30\x29\x3B\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x73\x6D\x20\x62\x74\x6E\x2D\x63\x6F\x70\x79\x2D\x6C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x20\x62\x74\x6E\x2D\x69\x6E\x66\x6F\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x63\x6F\x6C\x6F\x72\x3A\x20","\x20\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x30\x30\x25\x3B\x74\x65\x78\x74\x2D\x73\x68\x61\x64\x6F\x77\x3A\x20\x72\x67\x62\x28\x30\x2C\x20\x30\x2C\x20\x30\x29\x20\x30\x2E\x33\x70\x78\x20\x30\x2E\x33\x70\x78\x3B\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x20\x73\x6D\x61\x6C\x6C\x3B\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x30\x70\x78\x3B\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x62\x6C\x6F\x63\x6B\x3B\x62\x6F\x72\x64\x65\x72\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x75\x73\x65\x72\x2D\x64\x72\x61\x67\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x75\x73\x65\x72\x2D\x73\x65\x6C\x65\x63\x74\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x2D\x6D\x6F\x7A\x2D\x75\x73\x65\x72\x2D\x73\x65\x6C\x65\x63\x74\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x2D\x77\x65\x62\x6B\x69\x74\x2D\x75\x73\x65\x72\x2D\x64\x72\x61\x67\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x2D\x77\x65\x62\x6B\x69\x74\x2D\x75\x73\x65\x72\x2D\x73\x65\x6C\x65\x63\x74\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x2D\x6D\x73\x2D\x75\x73\x65\x72\x2D\x73\x65\x6C\x65\x63\x74\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x6C\x65\x66\x74\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x43\x6F\x70\x79\x20\x54\x6F\x6B\x65\x6E\x2F\x53\x49\x50\x26\x50\x61\x73\x73\x77\x6F\x72\x64\x22\x3E\x54\x4B\x26\x50\x57\x3C\x2F\x61\x3E","\x3C\x61\x20\x69\x64\x3D\x22\x63\x6F\x70\x79\x4C\x42\x42\x74\x6E\x22\x20\x68\x72\x65\x66\x3D\x22\x6A\x61\x76\x61\x73\x63\x72\x69\x70\x74\x3A\x76\x6F\x69\x64\x28\x30\x29\x3B\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x73\x6D\x20\x62\x74\x6E\x2D\x63\x6F\x70\x79\x2D\x6C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x20\x62\x74\x6E\x2D\x69\x6E\x66\x6F\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x63\x6F\x6C\x6F\x72\x3A\x20","\x20\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x30\x30\x25\x3B\x74\x65\x78\x74\x2D\x73\x68\x61\x64\x6F\x77\x3A\x20\x72\x67\x62\x28\x30\x2C\x20\x30\x2C\x20\x30\x29\x20\x30\x2E\x33\x70\x78\x20\x30\x2E\x33\x70\x78\x3B\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x20\x73\x6D\x61\x6C\x6C\x3B\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x30\x70\x78\x3B\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x62\x6C\x6F\x63\x6B\x3B\x62\x6F\x72\x64\x65\x72\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x75\x73\x65\x72\x2D\x64\x72\x61\x67\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x75\x73\x65\x72\x2D\x73\x65\x6C\x65\x63\x74\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x2D\x6D\x6F\x7A\x2D\x75\x73\x65\x72\x2D\x73\x65\x6C\x65\x63\x74\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x2D\x77\x65\x62\x6B\x69\x74\x2D\x75\x73\x65\x72\x2D\x64\x72\x61\x67\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x2D\x77\x65\x62\x6B\x69\x74\x2D\x75\x73\x65\x72\x2D\x73\x65\x6C\x65\x63\x74\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x2D\x6D\x73\x2D\x75\x73\x65\x72\x2D\x73\x65\x6C\x65\x63\x74\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x6C\x65\x66\x74\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x43\x6F\x70\x79\x20\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x20\x28\x4C\x29\x22\x3E\x4C\x42\x3C\x2F\x61\x3E","\x3C\x61\x20\x69\x64\x3D\x22\x63\x6F\x70\x79\x53\x49\x50\x50\x61\x73\x73\x4C\x42\x22\x20\x68\x72\x65\x66\x3D\x22\x6A\x61\x76\x61\x73\x63\x72\x69\x70\x74\x3A\x76\x6F\x69\x64\x28\x30\x29\x3B\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x73\x6D\x20\x62\x74\x6E\x2D\x63\x6F\x70\x79\x2D\x6C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x20\x62\x74\x6E\x2D\x69\x6E\x66\x6F\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x63\x6F\x6C\x6F\x72\x3A\x20","\x20\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x30\x30\x25\x3B\x74\x65\x78\x74\x2D\x73\x68\x61\x64\x6F\x77\x3A\x20\x72\x67\x62\x28\x30\x2C\x20\x30\x2C\x20\x30\x29\x20\x30\x2E\x33\x70\x78\x20\x30\x2E\x33\x70\x78\x3B\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x20\x73\x6D\x61\x6C\x6C\x3B\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x30\x70\x78\x3B\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x62\x6C\x6F\x63\x6B\x3B\x62\x6F\x72\x64\x65\x72\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x75\x73\x65\x72\x2D\x64\x72\x61\x67\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x75\x73\x65\x72\x2D\x73\x65\x6C\x65\x63\x74\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x2D\x6D\x6F\x7A\x2D\x75\x73\x65\x72\x2D\x73\x65\x6C\x65\x63\x74\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x2D\x77\x65\x62\x6B\x69\x74\x2D\x75\x73\x65\x72\x2D\x64\x72\x61\x67\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x2D\x77\x65\x62\x6B\x69\x74\x2D\x75\x73\x65\x72\x2D\x73\x65\x6C\x65\x63\x74\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x2D\x6D\x73\x2D\x75\x73\x65\x72\x2D\x73\x65\x6C\x65\x63\x74\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x6C\x65\x66\x74\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x43\x6F\x70\x79\x20\x54\x6F\x6B\x65\x6E\x2F\x53\x49\x50\x2C\x20\x50\x61\x73\x73\x77\x6F\x72\x64\x2C\x20\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x2E\x2E\x2E\x22\x3E\x54\x4B\x26\x41\x4C\x4C\x3C\x2F\x61\x3E","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x64\x72\x6F\x70\x44\x6F\x77\x6E\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x68\x75\x64\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x20\x61\x62\x73\x6F\x6C\x75\x74\x65\x3B\x20\x70\x6F\x69\x6E\x74\x65\x72\x2D\x65\x76\x65\x6E\x74\x73\x3A\x20\x61\x75\x74\x6F\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x33\x33\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x33\x30\x70\x78\x3B\x20\x6C\x65\x66\x74\x3A\x20\x36\x37\x70\x78\x3B\x20\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x2D\x33\x30\x70\x78\x3B\x20\x62\x6F\x72\x64\x65\x72\x2D\x72\x61\x64\x69\x75\x73\x3A\x20\x30\x70\x78\x3B\x22\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x74\x65\x6D\x70\x43\x6F\x70\x79\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x3E","\x7B\x22\x65\x76\x65\x6E\x74\x22\x3A\x22\x63\x6F\x6D\x6D\x61\x6E\x64\x22\x2C\x22\x66\x75\x6E\x63\x22\x3A\x22","\x22\x2C\x22\x61\x72\x67\x73\x22\x3A\x22\x22\x7D","\x2A","\x70\x6F\x73\x74\x4D\x65\x73\x73\x61\x67\x65","\x63\x6F\x6E\x74\x65\x6E\x74\x57\x69\x6E\x64\x6F\x77","\x66\x61\x2D\x70\x61\x75\x73\x65\x2D\x63\x69\x72\x63\x6C\x65","\x66\x61\x2D\x70\x6C\x61\x79\x2D\x63\x69\x72\x63\x6C\x65","\x23\x70\x6C\x61\x79\x65\x72\x49","\x66\x69\x78\x54\x69\x74\x6C\x65","\x23\x64\x72\x6F\x70\x44\x6F\x77\x6E\x33","\x54\x6F\x6B\x65\x6E","\x23\x64\x72\x6F\x70\x44\x6F\x77\x6E\x32","\x23\x64\x72\x6F\x70\x44\x6F\x77\x6E","\x43\x6F\x70\x79","\x3C\x61\x20\x68\x72\x65\x66\x3D\x22\x23\x22\x20\x69\x64\x3D\x22\x6E\x6F\x74\x65\x73\x63\x6C\x65\x61\x72\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x63\x6F\x6C\x6F\x72\x3A\x20\x6C\x69\x67\x68\x74\x67\x72\x65\x79\x3B\x66\x6C\x6F\x61\x74\x3A\x20\x72\x69\x67\x68\x74\x3B\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x20\x61\x62\x73\x6F\x6C\x75\x74\x65\x3B\x72\x69\x67\x68\x74\x3A\x20\x31\x32\x70\x78\x3B\x74\x6F\x70\x3A\x20\x39\x70\x78\x3B\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x6D\x61\x69\x6E\x2D\x63\x6F\x6C\x6F\x72\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x24\x28\x27\x23\x6C\x6F\x67\x27\x29\x2E\x68\x74\x6D\x6C\x28\x27\x27\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x6C\x65\x66\x74\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x43\x6C\x65\x61\x72\x20\x6C\x69\x73\x74\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x74\x72\x61\x73\x68\x20\x66\x61\x2D\x32\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x61\x3E","\x23\x6C\x6F\x67\x54\x69\x74\x6C\x65","\x64\x69\x73\x61\x62\x6C\x65","\x23\x6C\x61\x73\x74\x49\x50\x42\x74\x6E","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x61\x67\x61\x72\x2E\x69\x6F\x2F\x3F\x72\x3D","\x26\x6D\x3D","\x26\x73\x65\x61\x72\x63\x68\x3D\x77\x73\x73\x3A\x2F\x2F","\x23\x63\x6F\x70\x79\x49\x50\x42\x74\x6E","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x61\x67\x61\x72\x2E\x69\x6F\x2F\x3F\x73\x69\x70\x3D","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x61\x67\x61\x72\x2E\x69\x6F\x2F\x70\x6C\x61\x79\x3F\x73\x69\x70\x3D","\x26\x3F\x70\x61\x73\x73\x3D","\x66\x6F\x63\x75\x73","\x23\x63\x6C\x6F\x73\x65\x42\x74\x6E","\x23\x30\x30\x30\x30\x36\x36","\x4E\x69\x63\x6B\x6E\x61\x6D\x65\x20\x72\x65\x73\x65\x72\x76\x65\x64\x20\x66\x6F\x72\x20\x3C\x66\x6F\x6E\x74\x20\x63\x6F\x6C\x6F\x72\x3D\x27\x79\x65\x6C\x6C\x6F\x77\x27\x3E\x3C\x62\x3E\x41\x6E\x69\x6D\x61\x74\x65\x64\x20\x53\x6B\x69\x6E\x73\x3C\x2F\x66\x6F\x6E\x74\x3E\x3C\x2F\x62\x3E","\x3A\x3C\x62\x72\x3E","\x45\x61\x73\x74\x65\x72\x45\x67\x67\x31","\x45\x61\x73\x74\x65\x72\x20\x45\x67\x67","\x45\x61\x73\x74\x65\x72\x45\x67\x67\x32","\x45\x61\x73\x74\x65\x72\x45\x67\x67\x33","\x2C\x3C\x62\x72\x3E","\x3C\x61\x20\x74\x61\x72\x67\x65\x74\x3D\x22\x5F\x62\x6C\x61\x6E\x6B\x22\x20\x68\x72\x65\x66\x3D\x22\x68\x74\x74\x70\x73\x3A\x2F\x2F\x67\x69\x74\x68\x75\x62\x2E\x63\x6F\x6D\x2F\x6A\x69\x6D\x62\x6F\x79\x33\x31\x30\x30\x22\x3E\x68\x74\x74\x70\x73\x3A\x2F\x2F\x67\x69\x74\x68\x75\x62\x2E\x63\x6F\x6D\x2F\x6A\x69\x6D\x62\x6F\x79\x33\x31\x30\x30\x3C\x2F\x61\x3E","\x56\x69\x64\x65\x6F","\x77\x68\x69\x63\x68","\x69\x6E\x70\x75\x74\x3A\x66\x6F\x63\x75\x73","\x70\x61\x73\x73\x3D","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x74\x61\x6C\x6B\x79\x2E\x69\x6F\x2F","\x39\x35\x2E\x35\x70\x78","\x31\x37\x31\x70\x78","\x23\x30\x30\x33\x33\x30\x30","\x2E\x62\x74\x6E\x2E\x62\x74\x6E\x2D\x62\x6C\x6F\x63\x6B\x2E\x62\x74\x6E\x2D\x73\x75\x63\x63\x65\x73\x73\x2E\x62\x74\x6E\x2D\x65\x78\x70\x6F\x72\x74","\x4E\x4F\x4E\x45","\x67\x65\x74\x44\x61\x74\x65","\x67\x65\x74\x4D\x6F\x6E\x74\x68","\x67\x65\x74\x46\x75\x6C\x6C\x59\x65\x61\x72","\x67\x65\x74\x48\x6F\x75\x72\x73","\x67\x65\x74\x4D\x69\x6E\x75\x74\x65\x73","\x50\x61\x72\x74\x79\x2D","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x41\x4E\x3F","\x41\x49\x44\x3D","\x26\x4E\x69\x63\x6B\x3D","\x26\x44\x61\x74\x65\x3D","\x26\x73\x69\x70\x3D","\x26\x70\x77\x64\x3D","\x26\x6D\x6F\x64\x65\x3D","\x26\x72\x65\x67\x69\x6F\x6E\x3D","\x26\x55\x49\x44\x3D","\x26\x6C\x61\x73\x74\x6E\x61\x6D\x65\x3D","\x26\x66\x69\x72\x73\x74\x6E\x61\x6D\x65\x3D","\x26\x6A\x6F\x69\x6E\x3D\x55\x72\x6C","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x6C\x6F\x61\x64\x65\x72\x49\x66\x72\x61\x6D\x65\x49\x6E\x66\x6F\x31\x22\x3E\x3C\x69\x66\x72\x61\x6D\x65\x20\x69\x64\x3D\x22\x6C\x6F\x61\x64\x65\x72\x49\x66\x72\x61\x6D\x65\x49\x6E\x66\x6F\x22\x20\x73\x72\x63\x20\x3D\x20","\x20\x6E\x61\x6D\x65\x3D\x22\x64\x65\x74\x61\x69\x6C\x65\x64\x69\x6E\x66\x6F\x22\x20\x61\x6C\x6C\x6F\x77\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x63\x79\x3D\x22\x74\x72\x75\x65\x22\x20\x73\x63\x72\x6F\x6C\x6C\x69\x6E\x67\x3D\x22\x6E\x6F\x22\x20\x66\x72\x61\x6D\x65\x42\x6F\x72\x64\x65\x72\x3D\x22\x30\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x77\x69\x64\x74\x68\x3A\x30\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x30\x25\x3B\x20\x62\x6F\x72\x64\x65\x72\x3A\x6E\x6F\x6E\x65\x3B\x22\x3E\x3C\x2F\x69\x66\x72\x61\x6D\x65\x3E\x3C\x2F\x64\x69\x76\x3E","\x23\x6C\x6F\x61\x64\x65\x72\x49\x66\x72\x61\x6D\x65\x49\x6E\x66\x6F\x31","\x46\x72\x65\x73\x6B\x69\x6E\x73\x4D\x61\x70","\x46\x72\x65\x65\x53\x6B\x69\x6E\x73","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x63\x6F\x6E\x66\x69\x67\x73\x2D\x77\x65\x62\x2E\x61\x67\x61\x72\x69\x6F\x2E\x6D\x69\x6E\x69\x63\x6C\x69\x70\x70\x74\x2E\x63\x6F\x6D\x2F\x6C\x69\x76\x65\x2F","\x61\x67\x61\x72\x76\x65\x72\x73\x69\x6F\x6E","\x69\x6D\x61\x67\x65","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x61\x67\x61\x72\x69\x6F\x2F\x6C\x69\x76\x65\x2F\x66\x6C\x61\x67\x73\x2F","\x2E\x70\x6E\x67","\x23\x6C\x6F\x61\x64\x65\x72\x49\x66\x72\x61\x6D\x65\x49\x6E\x66\x6F","\x54\x65\x6D\x70\x6F\x72\x61\x72\x69\x6C\x79\x20\x48\x69\x64\x65\x2F\x53\x68\x6F\x77\x20\x45\x76\x65\x72\x79\x74\x68\x69\x6E\x67\x2E\x20\x46\x75\x6E\x63\x74\x69\x6F\x6E\x20\x66\x6F\x72\x20\x59\x6F\x75\x74\x75\x62\x65\x72\x73","\x23\x73\x68\x6F\x72\x74\x63\x75\x74\x73\x2D\x68\x75\x64","\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x70\x75\x7A\x7A\x6C\x65\x2D\x70\x69\x65\x63\x65\x22\x3E\x3C\x2F\x69\x3E","\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x67\x61\x6D\x65\x70\x61\x64\x22\x3E\x3C\x2F\x69\x3E","\x2E\x69\x6E\x70\x75\x74\x2D\x67\x72\x6F\x75\x70\x2D\x61\x64\x64\x6F\x6E\x2C\x23\x63\x68\x61\x74\x2D\x62\x6F\x78\x2C\x20\x2E\x69\x6E\x70\x75\x74\x2D\x67\x72\x6F\x75\x70\x2D\x73\x6D\x3E\x2E\x69\x6E\x70\x75\x74\x2D\x67\x72\x6F\x75\x70\x2D\x61\x64\x64\x6F\x6E\x2C\x20\x2E\x61\x67\x61\x72\x69\x6F\x2D\x70\x61\x72\x74\x79\x2C\x20\x2E\x61\x67\x61\x72\x69\x6F\x2D\x73\x69\x64\x65\x2D\x70\x61\x6E\x65\x6C\x7B\x62\x6F\x72\x64\x65\x72\x2D\x72\x61\x64\x69\x75\x73\x3A\x20\x31\x30\x70\x78\x3B\x7D\x2E\x6D\x65\x6E\x75\x2D\x74\x61\x62\x73\x2C","\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x6D\x69\x6E\x75\x73\x22\x3E\x3C\x2F\x69\x3E","\x2E\x69\x6E\x70\x75\x74\x2D\x67\x72\x6F\x75\x70\x2D\x61\x64\x64\x6F\x6E\x2C\x23\x63\x68\x61\x74\x2D\x62\x6F\x78\x2C\x20\x2E\x69\x6E\x70\x75\x74\x2D\x67\x72\x6F\x75\x70\x2D\x73\x6D\x3E\x2E\x69\x6E\x70\x75\x74\x2D\x67\x72\x6F\x75\x70\x2D\x61\x64\x64\x6F\x6E\x2C\x20\x2E\x61\x67\x61\x72\x69\x6F\x2D\x70\x61\x72\x74\x79\x2C\x20\x2E\x61\x67\x61\x72\x69\x6F\x2D\x73\x69\x64\x65\x2D\x70\x61\x6E\x65\x6C\x2C\x20\x2E\x6D\x65\x6E\x75\x2D\x74\x61\x62\x73\x2C","\x23\x6D\x61\x69\x6E\x2D\x70\x61\x6E\x65\x6C\x2C\x20\x23\x70\x72\x6F\x66\x69\x6C\x65\x2C\x20\x23\x6C\x65\x67\x65\x6E\x64\x2C\x20\x23\x6F\x67\x2D\x73\x65\x74\x74\x69\x6E\x67\x73\x2C\x20\x23\x74\x68\x65\x6D\x65\x2C\x20\x23\x6D\x75\x73\x69\x63\x2C\x20\x23\x68\x6F\x74\x6B\x65\x79\x73\x2C\x20\x20\x23\x68\x6F\x74\x6B\x65\x79\x73\x2C\x20\x2E\x73\x6B\x69\x6E\x2C\x20\x2E\x69\x6E\x70\x75\x74\x2D\x67\x72\x6F\x75\x70\x2D\x62\x74\x6E\x2C\x20\x2E\x69\x6E\x70\x75\x74\x2D\x67\x72\x6F\x75\x70\x2E\x6E\x69\x63\x6B\x2C\x20\x20","\x2E\x63\x6F\x6C\x6F\x72\x70\x69\x63\x6B\x65\x72\x2D\x65\x6C\x65\x6D\x65\x6E\x74\x20\x2E\x69\x6E\x70\x75\x74\x2D\x67\x72\x6F\x75\x70\x2D\x61\x64\x64\x6F\x6E\x20\x69\x2C\x20\x2E\x63\x6F\x6C\x6F\x72\x70\x69\x63\x6B\x65\x72\x2D\x65\x6C\x65\x6D\x65\x6E\x74\x20\x2E\x61\x64\x64\x2D\x6F\x6E\x20\x69\x2C\x20\x2E\x61\x67\x61\x72\x69\x6F\x2D\x70\x72\x6F\x66\x69\x6C\x65\x2D\x70\x69\x63\x74\x75\x72\x65\x2C","\x23\x6D\x65\x6E\x75\x2D\x66\x6F\x6F\x74\x65\x72\x2C\x20\x23\x6C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x2D\x68\x75\x64\x2C\x20\x23\x64\x72\x6F\x70\x44\x6F\x77\x6E\x2C\x20\x23\x64\x72\x6F\x70\x44\x6F\x77\x6E\x32\x2C\x20\x23\x6D\x69\x6E\x69\x6D\x61\x70\x2D\x68\x75\x64\x2C","\x23\x74\x6F\x70\x35\x2D\x68\x75\x64\x2C\x20\x23\x74\x61\x72\x67\x65\x74\x2D\x68\x75\x64\x2C\x20\x23\x6C\x65\x67\x65\x6E\x64\x41\x64\x49\x6D\x67\x2C\x20\x23\x73\x74\x61\x74\x73\x2D\x68\x75\x64\x2C\x20","\x23\x74\x69\x6D\x65\x2D\x68\x75\x64\x20\x7B\x20\x62\x6F\x72\x64\x65\x72\x2D\x72\x61\x64\x69\x75\x73\x3A\x20\x30\x20\x30\x20\x30\x20\x30\x20\x7D\x20\x3C\x2F\x73\x74\x79\x6C\x65\x3E","\x3C\x73\x74\x79\x6C\x65\x20\x74\x79\x70\x65\x3D\x22\x74\x65\x78\x74\x2F\x63\x73\x73\x22\x20\x69\x64\x3D\x22\x4D\x47\x78\x22\x3E\x09","\x23\x74\x6F\x70\x35\x2D\x68\x75\x64\x7B\x74\x6F\x70\x3A\x31\x30\x70\x78\x21\x69\x6D\x70\x6F\x72\x74\x61\x6E\x74\x3B\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x3A\x6C\x69\x6E\x65\x61\x72\x2D\x67\x72\x61\x64\x69\x65\x6E\x74\x28\x74\x6F\x20\x72\x69\x67\x68\x74\x2C","\x23\x68\x75\x64\x43\x6F\x6C\x6F\x72","\x2C\x72\x67\x62\x61\x28\x32\x35\x35\x2C\x32\x35\x35\x2C\x32\x35\x35\x2C\x30\x29\x29\x7D","\x23\x6C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x2D\x68\x75\x64\x7B\x74\x6F\x70\x3A\x31\x30\x70\x78\x21\x69\x6D\x70\x6F\x72\x74\x61\x6E\x74\x3B\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x3A\x6C\x69\x6E\x65\x61\x72\x2D\x67\x72\x61\x64\x69\x65\x6E\x74\x28\x74\x6F\x20\x6C\x65\x66\x74\x2C","\x23\x63\x68\x61\x74\x2D\x62\x6F\x78\x7B\x69\x6D\x70\x6F\x72\x74\x61\x6E\x74\x3B\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x3A\x6C\x69\x6E\x65\x61\x72\x2D\x67\x72\x61\x64\x69\x65\x6E\x74\x28\x74\x6F\x20\x72\x69\x67\x68\x74\x2C","\x23\x6D\x69\x6E\x69\x6D\x61\x70\x2D\x68\x75\x64\x2C\x23\x74\x69\x6D\x65\x72\x74\x6F\x6F\x6C\x73\x2D\x68\x75\x64\x2C\x20\x23\x73\x68\x6F\x72\x74\x63\x75\x74\x73\x2D\x68\x75\x64\x2C\x20\x23\x74\x69\x6D\x65\x2D\x68\x75\x64\x2C\x23\x6D\x73\x67\x63\x6F\x6D\x6D\x61\x6E\x64\x73\x2D\x68\x75\x64\x2C\x20\x23\x73\x63\x72\x69\x70\x74\x69\x6E\x67\x2D\x68\x75\x64\x2C\x20\x23\x69\x6D\x61\x67\x65\x73\x2D\x68\x75\x64\x2C\x20\x23\x79\x74\x2D\x68\x75\x64\x7B\x69\x6D\x70\x6F\x72\x74\x61\x6E\x74\x3B\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x3A\x6C\x69\x6E\x65\x61\x72\x2D\x67\x72\x61\x64\x69\x65\x6E\x74\x28\x74\x6F\x20\x6C\x65\x66\x74\x2C","\x23\x74\x61\x72\x67\x65\x74\x2D\x68\x75\x64\x2C\x23\x74\x61\x72\x67\x65\x74\x2D\x70\x61\x6E\x65\x6C\x2D\x68\x75\x64\x20\x7B\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x3A\x6C\x69\x6E\x65\x61\x72\x2D\x67\x72\x61\x64\x69\x65\x6E\x74\x28\x74\x6F\x20\x62\x6F\x74\x74\x6F\x6D\x2C","\x23\x73\x74\x61\x74\x73\x2D\x68\x75\x64\x7B\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x3A\x6C\x69\x6E\x65\x61\x72\x2D\x67\x72\x61\x64\x69\x65\x6E\x74\x28\x74\x6F\x20\x74\x6F\x70\x2C","\x23\x73\x74\x61\x74\x73\x2D\x68\x75\x64\x7B\x6C\x65\x66\x74\x3A\x20\x35\x30\x25\x21\x69\x6D\x70\x6F\x72\x74\x61\x6E\x74\x3B\x20\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x20\x74\x72\x61\x6E\x73\x6C\x61\x74\x65\x58\x28\x2D\x35\x30\x25\x29\x21\x69\x6D\x70\x6F\x72\x74\x61\x6E\x74\x3B\x20\x74\x65\x78\x74\x2D\x61\x6C\x69\x67\x6E\x3A\x20\x63\x65\x6E\x74\x65\x72\x3B\x7D","\x2E\x68\x75\x64\x2D\x74\x6F\x70\x7B\x74\x6F\x70\x3A\x20\x39\x33\x25\x21\x69\x6D\x70\x6F\x72\x74\x61\x6E\x74\x3B\x7D","\x23\x63\x68\x61\x74\x2D\x62\x6F\x78\x7B\x62\x6F\x74\x74\x6F\x6D\x3A\x20\x32\x25\x21\x69\x6D\x70\x6F\x72\x74\x61\x6E\x74\x3B\x7D","\x3C\x2F\x73\x74\x79\x6C\x65\x3E","\x23\x4D\x47\x78","\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x67\x72\x61\x76\x22\x3E\x3C\x2F\x69\x3E","\x23\x74\x69\x6D\x65\x72\x74\x6F\x6F\x6C\x73\x2D\x68\x75\x64","\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x63\x61\x6C\x63\x75\x6C\x61\x74\x6F\x72\x22\x3E\x3C\x2F\x69\x3E","\x74\x69\x6D\x65\x72","\x23\x74\x69\x6D\x65\x2D\x68\x75\x64","\x23\x73\x74\x61\x74\x73\x2D\x68\x75\x64","\x23\x74\x61\x72\x67\x65\x74\x2D\x68\x75\x64","\x23\x74\x61\x72\x67\x65\x74\x2D\x70\x61\x6E\x65\x6C\x2D\x68\x75\x64","\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x65\x78\x63\x6C\x61\x6D\x61\x74\x69\x6F\x6E\x2D\x74\x72\x69\x61\x6E\x67\x6C\x65\x22\x3E\x3C\x2F\x69\x3E","\x23\x75\x73\x65\x72\x73\x63\x72\x69\x70\x74\x73","\x23\x4F\x70\x65\x6E\x75\x73\x65\x72\x53\x63\x72\x69\x70\x74\x73","\x3C\x64\x69\x76\x20\x63\x6C\x61\x73\x73\x3D\x22\x61\x67\x61\x72\x69\x6F\x2D\x70\x61\x6E\x65\x6C\x20\x6F\x67\x61\x72\x69\x6F\x2D\x79\x74\x2D\x70\x61\x6E\x65\x6C\x22\x3E\x3C\x68\x36\x20\x63\x6C\x61\x73\x73\x3D\x22\x6D\x65\x6E\x75\x2D\x6D\x61\x69\x6E\x2D\x63\x6F\x6C\x6F\x72\x22\x3E\x3C\x69\x3E\x3C\x2F\x69\x3E\x3C\x2F\x68\x36\x3E\x3C\x2F\x64\x69\x76\x3E","\x3C\x73\x70\x61\x6E\x20\x73\x74\x79\x6C\x65\x3D\x22\x66\x6C\x6F\x61\x74\x3A\x20\x6C\x65\x66\x74\x3B\x20\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x20\x31\x33\x70\x78\x3B\x22\x3E\x3C\x61\x20\x74\x61\x72\x67\x65\x74\x3D\x22\x5F\x62\x6C\x61\x6E\x6B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x67\x61\x28\x27\x73\x65\x6E\x64\x27\x2C\x20\x27\x65\x76\x65\x6E\x74\x27\x2C\x20\x27\x4C\x69\x6E\x6B\x27\x2C\x20\x27\x63\x6C\x69\x63\x6B\x27\x2C\x20\x27\x6C\x65\x67\x65\x6E\x64\x57\x65\x62\x73\x69\x74\x65\x27\x29\x3B\x22\x20\x68\x72\x65\x66\x3D\x22\x68\x74\x74\x70\x73\x3A\x2F\x2F\x77\x77\x77\x2E\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x66\x66\x66\x66\x66\x66\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x74\x69\x74\x6C\x65\x3D\x22\x57\x65\x62\x73\x69\x74\x65\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x6C\x65\x66\x74\x22\x3E\x76","\x3C\x2F\x61\x3E\x3C\x2F\x73\x70\x61\x6E\x3E\x3C\x73\x70\x61\x6E\x20\x73\x74\x79\x6C\x65\x3D\x22\x66\x6C\x6F\x61\x74\x3A\x20\x6C\x65\x66\x74\x3B\x20\x20\x6D\x61\x72\x67\x69\x6E\x2D\x6C\x65\x66\x74\x3A\x20\x38\x30\x70\x78\x3B\x20\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x20\x31\x33\x70\x78\x3B\x22\x3E\x3C\x61\x20\x69\x64\x3D\x22\x4D\x6F\x72\x65\x66\x70\x73\x54\x65\x78\x74\x22\x20\x68\x72\x65\x66\x3D\x22\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x3F\x6E\x61\x76\x3D\x46\x50\x53\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x74\x69\x74\x6C\x65\x3D\x22\x48\x6F\x77\x20\x74\x6F\x20\x69\x6D\x70\x72\x6F\x76\x65\x20\x70\x65\x72\x66\x6F\x72\x6D\x61\x6E\x63\x65\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x74\x6F\x70\x22\x20\x73\x74\x79\x6C\x65\x20\x3D\x22\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x20\x31\x33\x70\x78\x22\x3B\x20\x74\x61\x72\x67\x65\x74\x3D\x22\x5F\x62\x6C\x61\x6E\x6B\x22\x3E\x4D\x6F\x72\x65\x20\x46\x50\x53\x3C\x2F\x61\x3E\x3C\x2F\x73\x70\x61\x6E\x3E","\x3C\x73\x70\x61\x6E\x20\x73\x74\x79\x6C\x65\x3D\x22\x66\x6C\x6F\x61\x74\x3A\x20\x72\x69\x67\x68\x74\x3B\x20\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x20\x31\x33\x70\x78\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x31\x30\x70\x78\x3B\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x2D\x32\x70\x78\x22\x3E\x3C\x66\x6F\x72\x6D\x20\x69\x64\x3D\x22\x64\x6F\x6E\x61\x74\x69\x6F\x6E\x62\x74\x6E\x22\x20\x61\x63\x74\x69\x6F\x6E\x3D\x22\x68\x74\x74\x70\x73\x3A\x2F\x2F\x77\x77\x77\x2E\x70\x61\x79\x70\x61\x6C\x2E\x63\x6F\x6D\x2F\x63\x67\x69\x2D\x62\x69\x6E\x2F\x77\x65\x62\x73\x63\x72\x22\x20\x6D\x65\x74\x68\x6F\x64\x3D\x22\x70\x6F\x73\x74\x22\x20\x74\x61\x72\x67\x65\x74\x3D\x22\x5F\x74\x6F\x70\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x6C\x65\x66\x74\x22\x20\x74\x61\x72\x67\x65\x74\x3D\x22\x5F\x62\x6C\x61\x6E\x6B\x22\x3E\x3C\x69\x6E\x70\x75\x74\x20\x74\x79\x70\x65\x3D\x22\x68\x69\x64\x64\x65\x6E\x22\x20\x6E\x61\x6D\x65\x3D\x22\x63\x6D\x64\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x5F\x73\x2D\x78\x63\x6C\x69\x63\x6B\x22\x3E\x3C\x69\x6E\x70\x75\x74\x20\x74\x79\x70\x65\x3D\x22\x68\x69\x64\x64\x65\x6E\x22\x20\x6E\x61\x6D\x65\x3D\x22\x68\x6F\x73\x74\x65\x64\x5F\x62\x75\x74\x74\x6F\x6E\x5F\x69\x64\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x43\x4D\x33\x47\x44\x56\x43\x57\x36\x50\x42\x46\x36\x22\x3E\x3C\x69\x6E\x70\x75\x74\x20\x74\x79\x70\x65\x3D\x22\x69\x6D\x61\x67\x65\x22\x20\x73\x72\x63\x3D\x22\x68\x74\x74\x70\x73\x3A\x2F\x2F\x77\x77\x77\x2E\x70\x61\x79\x70\x61\x6C\x6F\x62\x6A\x65\x63\x74\x73\x2E\x63\x6F\x6D\x2F\x65\x6E\x5F\x55\x53\x2F\x69\x2F\x62\x74\x6E\x2F\x62\x74\x6E\x5F\x64\x6F\x6E\x61\x74\x65\x5F\x53\x4D\x2E\x67\x69\x66\x22\x20\x62\x6F\x72\x64\x65\x72\x3D\x22\x30\x22\x20\x6E\x61\x6D\x65\x3D\x22\x73\x75\x62\x6D\x69\x74\x22\x20\x61\x6C\x74\x3D\x22\x50\x61\x79\x50\x61\x6C\x20\x2D\x20\x54\x68\x65\x20\x73\x61\x66\x65\x72\x2C\x20\x65\x61\x73\x69\x65\x72\x20\x77\x61\x79\x20\x74\x6F\x20\x70\x61\x79\x20\x6F\x6E\x6C\x69\x6E\x65\x21\x22\x3E\x3C\x69\x6D\x67\x20\x61\x6C\x74\x3D\x22\x22\x20\x62\x6F\x72\x64\x65\x72\x3D\x22\x30\x22\x20\x73\x72\x63\x3D\x22\x68\x74\x74\x70\x73\x3A\x2F\x2F\x77\x77\x77\x2E\x70\x61\x79\x70\x61\x6C\x6F\x62\x6A\x65\x63\x74\x73\x2E\x63\x6F\x6D\x2F\x65\x6E\x5F\x55\x53\x2F\x69\x2F\x73\x63\x72\x2F\x70\x69\x78\x65\x6C\x2E\x67\x69\x66\x22\x20\x77\x69\x64\x74\x68\x3D\x22\x31\x22\x20\x68\x65\x69\x67\x68\x74\x3D\x22\x31\x22\x3E\x3C\x2F\x66\x6F\x72\x6D\x3E\x3C\x2F\x73\x70\x61\x6E\x3E","\x23\x54\x69\x6D\x65\x73\x55\x73\x65\x64","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x53\x4E\x45\x5A\x4F\x67\x61\x72\x55\x70\x6C\x6F\x61\x64\x42\x74\x6E\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x53\x4E\x45\x5A\x4F\x67\x61\x72\x55\x70\x6C\x6F\x61\x64\x28\x29\x3B\x20\x72\x65\x74\x75\x72\x6E\x20\x66\x61\x6C\x73\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x72\x69\x67\x68\x74\x3A\x20\x32\x35\x70\x78\x3B\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x73\x75\x63\x63\x65\x73\x73\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x22\x20\x74\x69\x74\x6C\x65\x3D\x22\x22\x3E","\x23\x63\x6C\x6F\x73\x65\x2D\x65\x78\x70\x2D\x69\x6D\x70","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x53\x4E\x45\x5A\x4F\x67\x61\x72\x44\x6F\x77\x6E\x6C\x6F\x61\x64\x42\x74\x6E\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x53\x4E\x45\x5A\x4F\x67\x61\x72\x44\x6F\x77\x6E\x6C\x6F\x61\x64\x28\x29\x3B\x20\x72\x65\x74\x75\x72\x6E\x20\x66\x61\x6C\x73\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x72\x69\x67\x68\x74\x3A\x20\x32\x35\x70\x78\x3B\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x73\x75\x63\x63\x65\x73\x73\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x22\x20\x74\x69\x74\x6C\x65\x3D\x22\x22\x3E","\x3C\x62\x72\x3E\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x55\x73\x65\x72\x50\x72\x6F\x66\x69\x6C\x65\x55\x49\x44\x32\x22\x3E\x53\x6F\x63\x69\x61\x6C\x20\x49\x44\x3A\x20\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x55\x73\x65\x72\x50\x72\x6F\x66\x69\x6C\x65\x49\x44\x32\x61\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x75\x73\x65\x72\x2D\x6E\x61\x6D\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x64\x69\x73\x70\x6C\x61\x79\x3A\x69\x6E\x6C\x69\x6E\x65\x2D\x62\x6C\x6F\x63\x6B\x22\x3E\x3C\x2F\x64\x69\x76\x3E","\x5B\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x5D","\x44\x4F\x4D\x4E\x6F\x64\x65\x49\x6E\x73\x65\x72\x74\x65\x64","\x6C\x61\x73\x74","\x2E\x6D\x65\x73\x73\x61\x67\x65\x2D\x6E\x69\x63\x6B","\x44\x4F\x4D\x53\x75\x62\x74\x72\x65\x65\x4D\x6F\x64\x69\x66\x69\x65\x64","\x53\x65\x72\x76\x65\x72\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64\x21","\x4E\x6F\x54\x65\x78\x74","\x2E\x6C\x6F\x67\x45\x6E\x74\x72\x79","\x50\x6C\x61\x79\x65\x72\x20\x3C\x66\x6F\x6E\x74\x20\x63\x6F\x6C\x6F\x72\x3D\x27\x79\x65\x6C\x6C\x6F\x77\x27\x3E","\x2E\x6C\x6F\x67\x45\x6E\x74\x72\x79\x3E\x23\x70\x6C\x61\x79\x65\x72\x69\x6E\x66\x6F","\x3C\x2F\x66\x6F\x6E\x74\x3E\x20\x63\x6F\x6E\x74\x61\x69\x6E\x73\x20\x3C\x66\x6F\x6E\x74\x20\x63\x6F\x6C\x6F\x72\x3D\x27\x79\x65\x6C\x6C\x6F\x77\x27\x3E","\x21\x3C\x2F\x66\x6F\x6E\x74\x3E\x2E\x20\x43\x6F\x6E\x6E\x65\x63\x74\x65\x64\x20\x69\x6E\x74\x6F\x20\x53\x65\x72\x76\x65\x72","\x61\x75\x74\x6F\x50\x6C\x61\x79","\x4C\x4D\x20\x41\x75\x74\x6F\x70\x6C\x61\x79","\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x35","\x76\x69\x64\x65\x6F\x53\x6B\x69\x6E\x73","\x6A\x65\x6C\x6C\x79\x50\x68\x69\x73\x79\x63\x73","\x72\x61\x69\x6E\x62\x6F\x77\x46\x6F\x6F\x64","\x76\x69\x72\x75\x73\x47\x6C\x6F\x77","\x62\x6F\x72\x64\x65\x72\x47\x6C\x6F\x77","\x73\x68\x6F\x77\x42\x67\x53\x65\x63\x74\x6F\x72\x73","\x73\x68\x6F\x77\x4D\x61\x70\x42\x6F\x72\x64\x65\x72\x73","\x73\x68\x6F\x77\x4D\x69\x6E\x69\x4D\x61\x70\x47\x68\x6F\x73\x74\x43\x65\x6C\x6C\x73","\x73\x68\x6F\x77\x45\x78\x74\x72\x61\x4D\x69\x6E\x69\x4D\x61\x70\x47\x75\x69\x64\x65\x73","\x6F\x70\x70\x43\x6F\x6C\x6F\x72\x73","\x6F\x70\x70\x52\x69\x6E\x67\x73","\x76\x69\x72\x43\x6F\x6C\x6F\x72\x73","\x73\x70\x6C\x69\x74\x52\x61\x6E\x67\x65","\x76\x69\x72\x75\x73\x65\x73\x52\x61\x6E\x67\x65","\x74\x65\x61\x6D\x6D\x61\x74\x65\x73\x49\x6E\x64","\x73\x68\x6F\x77\x47\x68\x6F\x73\x74\x43\x65\x6C\x6C\x73","\x73\x68\x6F\x77\x47\x68\x6F\x73\x74\x43\x65\x6C\x6C\x73\x49\x6E\x66\x6F","\x73\x68\x6F\x77\x43\x68\x61\x74\x49\x6D\x61\x67\x65\x73","\x73\x68\x6F\x77\x43\x68\x61\x74\x56\x69\x64\x65\x6F\x73","\x63\x68\x61\x74\x53\x6F\x75\x6E\x64\x73","\x73\x70\x61\x77\x6E\x73\x70\x65\x63\x69\x61\x6C\x65\x66\x66\x65\x63\x74\x73","\x61\x75\x74\x6F\x52\x65\x73\x70","\x65\x71","\x2E\x6C\x6F\x67\x45\x6E\x74\x72\x79\x3E\x23\x72\x65\x67\x69\x6F\x6E\x69\x6E\x66\x6F","\x2E\x6C\x6F\x67\x45\x6E\x74\x72\x79\x3E\x23\x6D\x6F\x64\x65\x69\x6E\x66\x6F","\x6F\x70\x74\x69\x6F\x6E","\x66\x69\x6E\x64","\x3A\x62\x61\x74\x74\x6C\x65\x72\x6F\x79\x61\x6C\x65","\x20\x70\x6C\x61\x79\x65\x72\x28\x73\x29\x20\x77\x69\x73\x70\x65\x72\x65\x64\x20\x69\x74\x20\x69\x73\x3A","\x20\x70\x6C\x61\x79\x65\x72\x28\x73\x29\x20\x77\x69\x73\x70\x65\x72\x65\x64\x20\x69\x74\x20\x69\x73","\x3C\x66\x6F\x6E\x74\x20\x63\x6F\x6C\x6F\x72\x3D\x27\x79\x65\x6C\x6C\x6F\x77\x27\x3E\x42\x65\x73\x74\x20\x63\x68\x6F\x69\x63\x65\x3A\x20\x52\x65\x67\x69\x6F\x6E\x3A","\x2C\x20\x4D\x6F\x64\x65","\x3C\x2F\x66\x6F\x6E\x74\x3E\x3C\x62\x72\x3E","\x49\x6E\x66\x6F\x72\x6D\x61\x74\x69\x6F\x6E\x20\x63\x68\x61\x6E\x67\x65\x64\x21","\x72\x65\x67\x69\x6F\x6E","\x6D\x75\x73\x69\x63\x46\x72\x61\x6D\x65","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x4C\x4D\x65\x78\x70\x72\x65\x73\x73\x2F\x6F\x6C\x64\x64\x65\x61\x6C\x73\x2E\x6A\x73","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x4C\x4D\x65\x78\x70\x72\x65\x73\x73\x2F\x73\x68\x6F\x70\x2F\x73\x68\x6F\x70\x2E\x6A\x73","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x4C\x4D\x65\x78\x70\x72\x65\x73\x73\x2F\x72\x65\x70\x6C\x61\x79\x2E\x6A\x73","\x67\x65\x74\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79\x4E\x61\x6D\x65\x73","\x61\x67\x61\x72\x76\x65\x72\x73\x69\x6F\x6E\x44\x65\x73\x74\x69\x6E\x61\x74\x69\x6F\x6E\x46\x6F\x75\x6E\x64","\x61\x67\x61\x72\x76\x65\x72\x73\x69\x6F\x6E\x44\x65\x73\x74\x69\x6E\x61\x74\x69\x6F\x6E\x73","\x4C\x4D\x43\x6F\x6E\x66\x69\x67\x56\x65\x72\x73\x69\x6F\x6E","\x4C\x4D\x43\x6F\x6E\x66\x69\x67\x56\x65\x72\x73\x69\x6F\x6E\x50\x61\x73\x73","\x66\x75\x6E\x63\x74\x69\x6F\x6E","\x6F\x62\x6A\x65\x63\x74","\x62\x61\x6E\x6E\x65\x64\x55\x49\x44","\x48\x53\x4C\x4F\x5B\x53\x61\x69\x67\x6F\x5D\x3A\x73\x65\x74\x74\x69\x6E\x67\x73","\x6C\x62\x54\x65\x61\x6D\x6D\x61\x74\x65\x43\x6F\x6C\x6F\x72","\x59\x6F\x75\x20\x61\x72\x65\x20\x62\x61\x6E\x6E\x65\x64\x20\x66\x72\x6F\x6D\x20\x4C\x65\x67\x65\x6E\x64\x20\x6D\x6F\x64","\x20\x3C\x62\x72\x3E\x3C\x61\x20\x74\x61\x72\x67\x65\x74\x3D\x22\x5F\x62\x6C\x61\x6E\x6B\x22\x20\x68\x72\x65\x66\x3D\x22\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x22\x3E\x3C\x66\x6F\x6E\x74\x20\x63\x6F\x6C\x6F\x72\x3D\x22\x62\x6C\x75\x65\x22\x3E\x3C\x62\x3E\x3C\x75\x3E\x77\x77\x77\x2E\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x3C\x2F\x75\x3E\x3C\x2F\x62\x3E\x3C\x2F\x66\x6F\x6E\x74\x3E\x3C\x2F\x61\x3E\x3C\x62\x72\x3E","\x53\x63\x72\x69\x70\x74\x20\x54\x65\x72\x6D\x69\x6E\x61\x74\x65\x64","\x4C\x4D\x41\x67\x61\x72\x42\x61\x6E\x6E\x65\x64\x55\x49\x44\x73","\x4C\x4D\x41\x67\x61\x72\x42\x61\x6E\x6E\x65\x64\x55\x49\x44\x73\x50\x61\x73\x73","\x62\x61\x6E\x6E\x65\x64\x55\x73\x65\x72\x55\x49\x44\x73","\x41\x67\x61\x72\x42\x61\x6E\x6E\x65\x64\x55\x49\x44\x73\x41\x64\x64\x65\x64","\x2D","\x73\x70\x6C\x69\x63\x65","\x3C\x64\x69\x76\x20\x63\x6C\x61\x73\x73\x3D\x22\x6D\x6F\x64\x61\x6C\x20\x66\x61\x64\x65\x20\x69\x6E\x22\x20\x69\x64\x3D\x22\x42\x61\x6E\x6E\x65\x64\x55\x49\x44\x53\x4D\x6F\x64\x61\x6C\x22\x20\x61\x72\x69\x61\x2D\x68\x69\x64\x64\x65\x6E\x3D\x22\x66\x61\x6C\x73\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x62\x6C\x6F\x63\x6B\x3B\x22\x3E","\x3C\x64\x69\x76\x20\x63\x6C\x61\x73\x73\x3D\x22\x6D\x6F\x64\x61\x6C\x2D\x62\x61\x63\x6B\x64\x72\x6F\x70\x20\x66\x61\x64\x65\x20\x69\x6E\x22\x3E\x3C\x2F\x64\x69\x76\x3E","\x3C\x64\x69\x76\x20\x63\x6C\x61\x73\x73\x3D\x22\x6D\x6F\x64\x61\x6C\x2D\x64\x69\x61\x6C\x6F\x67\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x74\x6F\x70\x3A\x20\x63\x61\x6C\x63\x28\x35\x30\x76\x68\x20\x2D\x20\x32\x34\x31\x2E\x35\x70\x78\x29\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x35\x30\x30\x70\x78\x3B\x22\x3E","\x3C\x64\x69\x76\x20\x63\x6C\x61\x73\x73\x3D\x22\x6D\x6F\x64\x61\x6C\x2D\x63\x6F\x6E\x74\x65\x6E\x74\x22\x3E","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x43\x6C\x6F\x73\x65\x42\x61\x6E\x6E\x65\x64\x55\x49\x44\x53\x32\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x6D\x6F\x64\x61\x6C\x2D\x68\x65\x61\x64\x65\x72\x22\x3E\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x43\x6C\x6F\x73\x65\x42\x61\x6E\x6E\x65\x64\x55\x49\x44\x53\x22\x20\x74\x79\x70\x65\x3D\x22\x62\x75\x74\x74\x6F\x6E\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x63\x6C\x6F\x73\x65\x22\x20\x64\x61\x74\x61\x2D\x64\x69\x73\x6D\x69\x73\x73\x3D\x22\x6D\x6F\x64\x61\x6C\x22\x3E\x3C\x73\x70\x61\x6E\x20\x61\x72\x69\x61\x2D\x68\x69\x64\x64\x65\x6E\x3D\x22\x74\x72\x75\x65\x22\x3E\xD7\x3C\x2F\x73\x70\x61\x6E\x3E\x3C\x73\x70\x61\x6E\x20\x63\x6C\x61\x73\x73\x3D\x22\x73\x72\x2D\x6F\x6E\x6C\x79\x22\x3E","\x3C\x2F\x73\x70\x61\x6E\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E\x20\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x46\x41\x51\x42\x61\x6E\x6E\x65\x64\x55\x49\x44\x53\x22\x20\x74\x79\x70\x65\x3D\x22\x62\x75\x74\x74\x6F\x6E\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x63\x6C\x6F\x73\x65\x22\x20\x64\x61\x74\x61\x2D\x64\x69\x73\x6D\x69\x73\x73\x3D\x22\x6D\x6F\x64\x61\x6C\x22\x3E\x3C\x73\x70\x61\x6E\x20\x61\x72\x69\x61\x2D\x68\x69\x64\x64\x65\x6E\x3D\x22\x74\x72\x75\x65\x22\x3E\x3F\x3C\x2F\x73\x70\x61\x6E\x3E\x3C\x73\x70\x61\x6E\x20\x63\x6C\x61\x73\x73\x3D\x22\x73\x72\x2D\x6F\x6E\x6C\x79\x22\x3E","\x3C\x2F\x73\x70\x61\x6E\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x68\x34\x20\x63\x6C\x61\x73\x73\x3D\x22\x6D\x6F\x64\x61\x6C\x2D\x74\x69\x74\x6C\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x66\x6F\x6E\x74\x2D\x66\x61\x6D\x69\x6C\x79\x3A\x20\x52\x6F\x62\x6F\x74\x6F\x20\x43\x6F\x6E\x64\x65\x6E\x73\x65\x64\x2C\x20\x73\x61\x6E\x73\x2D\x73\x65\x72\x69\x66\x22\x3E","\x42\x61\x6E\x6E\x65\x64\x20\x55\x73\x65\x72\x20\x49\x44\x73","\x3C\x2F\x68\x34\x3E","\x3C\x64\x69\x76\x20\x63\x6C\x61\x73\x73\x3D\x22\x6D\x6F\x64\x61\x6C\x2D\x62\x6F\x64\x79\x22\x3E\x3C\x69\x6E\x70\x75\x74\x20\x74\x79\x70\x65\x3D\x22\x74\x65\x78\x74\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x69\x64\x3D\x22\x42\x61\x6E\x6E\x65\x64\x61\x67\x61\x72\x69\x6F\x5F\x75\x69\x64\x5F\x69\x6E\x70\x75\x74\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x2A\x55\x49\x44\x20\x28","\x74\x6F\x20\x62\x65\x20\x62\x61\x6E\x6E\x65\x64","\x29\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x77\x69\x64\x74\x68\x3A\x20\x38\x35\x25\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x69\x6E\x6C\x69\x6E\x65\x2D\x62\x6C\x6F\x63\x6B\x22\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x41\x64\x64\x42\x61\x6E\x6E\x65\x64\x55\x49\x44\x22\x20\x74\x79\x70\x65\x3D\x22\x73\x75\x62\x6D\x69\x74\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x70\x72\x69\x6D\x61\x72\x79\x20\x62\x74\x6E\x20\x32\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x62\x6C\x6F\x63\x6B\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x32\x30\x25\x3B\x20\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x34\x70\x78\x20\x30\x70\x78\x20\x36\x70\x78\x3B\x20\x74\x65\x78\x74\x2D\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x20\x63\x61\x70\x69\x74\x61\x6C\x69\x7A\x65\x3B\x22\x3E\x41\x64\x64\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x72\x3E\x3C\x63\x6F\x6C\x6F\x72\x3D\x22\x72\x65\x64\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x64\x69\x73\x70\x6C\x61\x79\x3A\x69\x6E\x6C\x69\x6E\x65\x22\x3E\x20","\x3C\x62\x3E\x42\x61\x6E\x6E\x65\x64\x20\x55\x49\x44\x73\x3A\x3C\x2F\x62\x3E","\x3C\x2F\x63\x6F\x6C\x6F\x72\x3E","\x3C\x62\x72\x3E\x3C\x62\x72\x3E","\x3C\x73\x65\x6C\x65\x63\x74\x20\x69\x64\x3D\x22\x73\x73\x2D\x73\x65\x6C\x65\x63\x74\x2D\x42\x61\x6E\x6E\x65\x64\x55\x49\x44\x53\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x72\x65\x71\x75\x69\x72\x65\x64\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x64\x69\x73\x70\x6C\x61\x79\x3A\x69\x6E\x6C\x69\x6E\x65\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x38\x30\x25\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x2D\x33\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x73\x65\x6C\x65\x63\x74\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x52\x65\x6D\x6F\x76\x65\x42\x61\x6E\x6E\x65\x64\x55\x49\x44\x22\x20\x74\x79\x70\x65\x3D\x22\x73\x75\x62\x6D\x69\x74\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x70\x72\x69\x6D\x61\x72\x79\x20\x62\x74\x6E\x20\x32\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x62\x6C\x6F\x63\x6B\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x32\x30\x25\x3B\x20\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x34\x70\x78\x20\x30\x70\x78\x20\x36\x70\x78\x3B\x20\x74\x65\x78\x74\x2D\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x20\x63\x61\x70\x69\x74\x61\x6C\x69\x7A\x65\x3B\x22\x3E\x52\x65\x6D\x6F\x76\x65\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x70\x20\x63\x6C\x61\x73\x73\x3D\x22\x61\x6C\x65\x72\x74\x2D\x77\x61\x72\x6E\x69\x6E\x67\x20\x74\x65\x78\x74\x2D\x63\x65\x6E\x74\x65\x72\x22\x3E","\x50\x6C\x65\x61\x73\x65\x20\x62\x65\x20\x63\x61\x72\x65\x66\x75\x6C\x20\x77\x69\x74\x68\x20\x74\x68\x65\x20\x55\x49\x44\x73\x2E","\x3C\x62\x72\x3E\x59\x6F\x75\x72\x20\x55\x49\x44\x20\x69\x73\x3A\x20\x3C\x73\x70\x61\x6E\x20\x63\x6C\x61\x73\x73\x3D\x22\x61\x6C\x65\x72\x74\x2D\x73\x75\x63\x63\x65\x73\x73\x22\x20\x69\x64\x3D\x22\x65\x78\x70\x2D\x75\x69\x64\x22\x3E","\x3C\x2F\x73\x70\x61\x6E\x3E\x3C\x2F\x70\x3E","\x23\x42\x61\x6E\x6E\x65\x64\x55\x49\x44\x53\x4D\x6F\x64\x61\x6C","\x23\x43\x6C\x6F\x73\x65\x42\x61\x6E\x6E\x65\x64\x55\x49\x44\x53","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x4C\x4D\x65\x78\x70\x72\x65\x73\x73\x2F\x6F\x6C\x64\x64\x65\x61\x6C\x73\x2E\x68\x74\x6D\x6C","\x23\x46\x41\x51\x42\x61\x6E\x6E\x65\x64\x55\x49\x44\x53","\x23\x42\x61\x6E\x6E\x65\x64\x61\x67\x61\x72\x69\x6F\x5F\x75\x69\x64\x5F\x69\x6E\x70\x75\x74","\x6F\x70\x74\x69\x6F\x6E\x73","\x73\x73\x2D\x73\x65\x6C\x65\x63\x74\x2D\x42\x61\x6E\x6E\x65\x64\x55\x49\x44\x53","\x55\x49\x44\x3A\x20","\x20\x73\x75\x63\x63\x65\x73\x73\x66\x75\x6C\x6C\x79\x20\x61\x64\x64\x65\x64\x20\x6F\x6E\x20\x55\x49\x44\x20\x42\x41\x4E\x20\x6C\x69\x73\x74","\x20\x73\x65\x65\x6D\x73\x20\x6D\x69\x73\x74\x61\x6B\x65\x6E\x20\x6F\x72\x20\x69\x73\x20\x61\x6C\x72\x65\x61\x64\x79\x20\x6F\x6E\x20\x74\x68\x65\x20\x6C\x69\x73\x74","\x23\x41\x64\x64\x42\x61\x6E\x6E\x65\x64\x55\x49\x44","\x23\x73\x73\x2D\x73\x65\x6C\x65\x63\x74\x2D\x42\x61\x6E\x6E\x65\x64\x55\x49\x44\x53","\x73\x65\x6C\x65\x63\x74\x65\x64\x49\x6E\x64\x65\x78","\x20\x73\x75\x63\x63\x65\x73\x73\x66\x75\x6C\x6C\x79\x20\x72\x65\x6D\x6F\x76\x65\x64\x20\x66\x72\x6F\x6D\x20\x55\x49\x44\x20\x42\x41\x4E\x20\x6C\x69\x73\x74","\x23\x52\x65\x6D\x6F\x76\x65\x42\x61\x6E\x6E\x65\x64\x55\x49\x44","\x50\x6C\x65\x61\x73\x65\x20\x70\x6C\x61\x79\x20\x74\x68\x65\x20\x67\x61\x6D\x65\x20\x62\x65\x66\x6F\x72\x65\x20\x79\x6F\x75\x20\x63\x61\x6E\x20\x75\x73\x65\x20\x74\x68\x61\x74\x20\x66\x65\x61\x74\x75\x72\x65","\x59\x6F\x75\x20\x64\x6F\x20\x6E\x6F\x74\x20\x6E\x61\x6D\x65\x20\x74\x68\x65\x20\x61\x75\x74\x68\x6F\x72\x69\x74\x79","\x6C\x61\x6E\x67\x75\x61\x67\x65\x73","\x6E\x61\x76\x69\x67\x61\x74\x6F\x72","\x65\x6E","\x73\x68\x6F\x77\x43\x68\x61\x74\x54\x72\x61\x6E\x73\x6C\x61\x74\x69\x6F\x6E","\x63\x6F\x6E\x74\x61\x69\x6E\x73","\x63\x6C\x61\x73\x73\x4C\x69\x73\x74","\x6C\x61\x73\x74\x43\x68\x69\x6C\x64","\x74\x65\x78\x74\x43\x6F\x6E\x74\x65\x6E\x74","\x66\x69\x72\x73\x74\x43\x68\x69\x6C\x64","\x64\x65\x65\x70\x73\x6B\x79\x62\x6C\x75\x65","\x74\x65\x78\x74\x53\x68\x61\x64\x6F\x77","\x31\x70\x78\x20\x31\x70\x78\x20\x31\x70\x78\x20\x77\x68\x69\x74\x65","\x47\x65\x74","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x74\x72\x61\x6E\x73\x6C\x61\x74\x65\x2E\x79\x61\x6E\x64\x65\x78\x2E\x6E\x65\x74\x2F\x61\x70\x69\x2F\x76\x31\x2E\x35\x2F\x74\x72\x2E\x6A\x73\x6F\x6E\x2F\x74\x72\x61\x6E\x73\x6C\x61\x74\x65\x3F\x6B\x65\x79\x3D\x74\x72\x6E\x73\x6C\x2E\x31\x2E\x31\x2E\x32\x30\x31\x39\x30\x34\x31\x33\x54\x31\x33\x33\x32\x33\x34\x5A\x2E\x65\x32\x62\x66\x38\x66\x36\x31\x64\x62\x38\x30\x35\x64\x32\x36\x2E\x31\x64\x63\x33\x33\x31\x62\x33\x33\x64\x31\x35\x36\x65\x34\x33\x36\x37\x39\x61\x31\x39\x33\x35\x37\x64\x31\x35\x64\x39\x65\x65\x36\x36\x34\x35\x30\x32\x64\x65\x26\x74\x65\x78\x74\x3D","\x26\x6C\x61\x6E\x67\x3D","\x26\x66\x6F\x72\x6D\x61\x74\x3D\x70\x6C\x61\x69\x6E\x26\x6F\x70\x74\x69\x6F\x6E\x73\x3D\x31","\x6F\x6E\x72\x65\x61\x64\x79\x73\x74\x61\x74\x65\x63\x68\x61\x6E\x67\x65","\x73\x74\x61\x74\x75\x73","\x72\x65\x73\x70\x6F\x6E\x73\x65\x54\x65\x78\x74","\x75\x6C\x74\x72\x61","\x73\x6F\x70\x68\x69\x73\x74\x69\x63\x61\x74\x65\x64","\x6F\x67\x61\x72\x69\x6F\x53\x65\x74\x74\x69\x6E\x67\x73","\x73\x61\x76\x65\x53\x65\x74\x74\x69\x6E\x67\x73","\x3C\x64\x69\x76\x20\x63\x6C\x61\x73\x73\x3D\x22\x6D\x6F\x64\x61\x6C\x20\x66\x61\x64\x65\x20\x69\x6E\x22\x20\x69\x64\x3D\x22\x4C\x4D\x50\x72\x6F\x6D\x6F\x22\x20\x61\x72\x69\x61\x2D\x68\x69\x64\x64\x65\x6E\x3D\x22\x66\x61\x6C\x73\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x62\x6C\x6F\x63\x6B\x3B\x22\x3E","\x3C\x64\x69\x76\x20\x63\x6C\x61\x73\x73\x3D\x22\x6D\x6F\x64\x61\x6C\x2D\x64\x69\x61\x6C\x6F\x67\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x74\x6F\x70\x3A\x20\x63\x61\x6C\x63\x28\x35\x30\x76\x68\x20\x2D\x20\x32\x34\x31\x2E\x35\x70\x78\x29\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x39\x32\x32\x70\x78\x3B\x22\x3E","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x43\x6C\x6F\x73\x65\x4C\x4D\x50\x72\x6F\x6D\x6F\x32\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x6D\x6F\x64\x61\x6C\x2D\x68\x65\x61\x64\x65\x72\x22\x3E\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x43\x6C\x6F\x73\x65\x4C\x4D\x50\x72\x6F\x6D\x6F\x22\x20\x74\x79\x70\x65\x3D\x22\x62\x75\x74\x74\x6F\x6E\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x63\x6C\x6F\x73\x65\x22\x20\x64\x61\x74\x61\x2D\x64\x69\x73\x6D\x69\x73\x73\x3D\x22\x6D\x6F\x64\x61\x6C\x22\x3E\x3C\x73\x70\x61\x6E\x20\x61\x72\x69\x61\x2D\x68\x69\x64\x64\x65\x6E\x3D\x22\x74\x72\x75\x65\x22\x3E\xD7\x3C\x2F\x73\x70\x61\x6E\x3E\x3C\x73\x70\x61\x6E\x20\x63\x6C\x61\x73\x73\x3D\x22\x73\x72\x2D\x6F\x6E\x6C\x79\x22\x3E","\x3C\x2F\x73\x70\x61\x6E\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E\x20\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x46\x41\x51\x4C\x4D\x50\x72\x6F\x6D\x6F\x22\x20\x74\x79\x70\x65\x3D\x22\x62\x75\x74\x74\x6F\x6E\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x63\x6C\x6F\x73\x65\x22\x20\x64\x61\x74\x61\x2D\x64\x69\x73\x6D\x69\x73\x73\x3D\x22\x6D\x6F\x64\x61\x6C\x22\x3E\x3C\x73\x70\x61\x6E\x20\x61\x72\x69\x61\x2D\x68\x69\x64\x64\x65\x6E\x3D\x22\x74\x72\x75\x65\x22\x3E\x3F\x3C\x2F\x73\x70\x61\x6E\x3E\x3C\x73\x70\x61\x6E\x20\x63\x6C\x61\x73\x73\x3D\x22\x73\x72\x2D\x6F\x6E\x6C\x79\x22\x3E","\x52\x65\x77\x61\x72\x64\x20\x44\x61\x79","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x4C\x4D\x61\x64\x76\x65\x72\x74\x69\x73\x65\x6D\x65\x6E\x74\x33\x22\x3E\x3C\x69\x66\x72\x61\x6D\x65\x20\x69\x64\x3D\x22\x63\x75\x73\x74\x6F\x6D\x73\x6B\x69\x6E\x73\x49\x66\x72\x61\x6D\x65\x32\x22\x20\x73\x72\x63\x3D\x22\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x65\x78\x74\x72\x61\x73\x2F\x72\x65\x77\x61\x72\x64\x64\x61\x79\x2E\x68\x74\x6D\x6C\x22\x20\x77\x69\x64\x74\x68\x3D\x22\x39\x32\x30\x22\x20\x68\x65\x69\x67\x68\x74\x3D\x22\x35\x35\x30\x22\x20\x3E","\x2E\x6D\x6F\x64\x61\x6C\x2D\x64\x69\x61\x6C\x6F\x67","\x23\x4C\x4D\x50\x72\x6F\x6D\x6F","\x23\x43\x6C\x6F\x73\x65\x4C\x4D\x50\x72\x6F\x6D\x6F","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F","\x23\x46\x41\x51\x4C\x4D\x50\x72\x6F\x6D\x6F","\x56\x69\x64\x65\x6F\x20\x53\x6B\x69\x6E\x20\x50\x72\x6F\x6D\x6F","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x4C\x4D\x61\x64\x76\x65\x72\x74\x69\x73\x65\x6D\x65\x6E\x74\x33\x22\x3E\x3C\x69\x66\x72\x61\x6D\x65\x20\x69\x64\x3D\x22\x63\x75\x73\x74\x6F\x6D\x73\x6B\x69\x6E\x73\x49\x66\x72\x61\x6D\x65\x32\x22\x20\x73\x72\x63\x3D\x22\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x64\x65\x76\x65\x6C\x6F\x70\x65\x72\x73\x2F\x76\x69\x64\x65\x6F\x73\x6B\x69\x6E\x73\x2E\x68\x74\x6D\x6C\x22\x20\x77\x69\x64\x74\x68\x3D\x22\x39\x32\x30\x22\x20\x68\x65\x69\x67\x68\x74\x3D\x22\x35\x35\x30\x22\x20\x3E","\x44\x75\x65\x20\x74\x6F\x20\x73\x70\x61\x6D\x6D\x69\x6E\x67\x20\x69\x73\x73\x75\x65\x73\x2C\x20\x79\x6F\x75\x20\x6D\x75\x73\x74\x20\x62\x65\x20\x69\x6E\x20\x67\x61\x6D\x65\x20\x61\x6E\x64\x20\x75\x73\x65\x20\x70\x61\x73\x73\x77\x6F\x72\x64","\x3C\x73\x63\x72\x69\x70\x74\x20\x73\x72\x63\x3D\x22\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x4C\x4D\x65\x78\x70\x72\x65\x73\x73\x2F\x62\x61\x6E\x6E\x65\x64\x55\x49\x44\x2E\x6A\x73\x22\x3E\x3C\x2F\x73\x63\x72\x69\x70\x74\x3E","\x6F\x67\x61\x72\x69\x6F\x54\x68\x65\x6D\x65\x53\x65\x74\x74\x69\x6E\x67\x73","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x61\x64\x6D\x69\x6E\x69\x73\x74\x72\x61\x74\x69\x6F\x6E\x74\x6F\x6F\x6C\x73\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x69\x6D\x61\x67\x65\x3A\x20\x75\x72\x6C\x28","\x3B\x20\x62\x6F\x72\x64\x65\x72\x3A\x20\x31\x70\x78\x20\x73\x6F\x6C\x69\x64\x20\x62\x6C\x61\x63\x6B\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x36\x35\x70\x78\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x35\x30\x30\x70\x78\x3B\x20\x22\x3B\x3E","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x61\x64\x6D\x69\x6E\x69\x73\x74\x72\x61\x74\x69\x6F\x6E\x74\x6F\x6F\x6C\x73\x68\x75\x64\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x64\x69\x73\x70\x6C\x61\x79\x3A\x62\x6C\x6F\x63\x6B\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x6C\x65\x66\x74\x3A\x20\x31\x30\x70\x78\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x72\x69\x67\x68\x74\x3A\x20\x31\x30\x70\x78\x3B\x22\x3E","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x61\x64\x6D\x69\x6E\x69\x73\x74\x72\x61\x74\x69\x6F\x6E\x74\x6F\x6F\x6C\x73\x68\x75\x64\x31\x22\x20\x61\x6C\x69\x67\x6E\x3D\x22\x6D\x69\x64\x64\x6C\x65\x22\x3E\x3C\x68\x35\x20\x63\x6C\x61\x73\x73\x3D\x22\x6D\x61\x69\x6E\x2D\x63\x6F\x6C\x6F\x72\x22\x3E\x41\x44\x4D\x49\x4E\x49\x53\x54\x52\x41\x54\x4F\x52\x20\x54\x4F\x4F\x4C\x53\x3C\x2F\x68\x35\x3E","\x3C\x70\x20\x73\x74\x79\x6C\x65\x3D\x22\x63\x6F\x6C\x6F\x72\x3A\x77\x68\x69\x74\x65\x3B\x20\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x31\x32\x70\x78\x22\x3B\x22\x20\x61\x6C\x69\x67\x6E\x3D\x22\x6D\x69\x64\x64\x6C\x65\x22\x3E\x45\x6E\x74\x65\x72\x20\x79\x6F\x75\x72\x20\x43\x6C\x61\x6E\x20\x73\x79\x6D\x62\x6F\x6C\x20\x61\x6E\x64\x20\x41\x44\x4D\x49\x4E\x20\x50\x61\x73\x73\x77\x6F\x72\x64\x3C\x2F\x70\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x41\x64\x6D\x69\x6E\x43\x6C\x61\x6E\x53\x79\x6D\x62\x6F\x6C\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x43\x6C\x61\x6E\x20\x53\x79\x6D\x62\x6F\x6C\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x72\x69\x67\x68\x74\x3A\x20\x32\x70\x78\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x34\x30\x25\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x69\x6E\x6C\x69\x6E\x65\x3B\x22\x20\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x74\x6F\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x54\x68\x65\x20\x73\x79\x6D\x62\x6F\x6C\x20\x6F\x66\x20\x43\x6C\x61\x6E\x20\x79\x6F\x75\x20\x62\x65\x6C\x6F\x6E\x67\x22\x20\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x41\x64\x6D\x69\x6E\x50\x61\x73\x73\x77\x6F\x72\x64\x22\x20\x74\x79\x70\x65\x3D\x22\x70\x61\x73\x73\x77\x6F\x72\x64\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x50\x61\x73\x73\x77\x6F\x72\x64\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x6C\x65\x66\x74\x3A\x20\x32\x70\x78\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x34\x30\x25\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x69\x6E\x6C\x69\x6E\x65\x3B\x22\x20\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x74\x6F\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x50\x75\x74\x20\x41\x44\x4D\x49\x4E\x20\x70\x61\x73\x73\x77\x6F\x72\x64\x22\x20\x3E","\x3C\x2F\x64\x69\x76\x3E\x3C\x70\x20\x73\x74\x79\x6C\x65\x3D\x22\x63\x6F\x6C\x6F\x72\x3A\x77\x68\x69\x74\x65\x3B\x20\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x31\x32\x70\x78\x22\x3B\x22\x20\x61\x6C\x69\x67\x6E\x3D\x22\x6D\x69\x64\x64\x6C\x65\x22\x3E\x49\x4D\x50\x4F\x52\x54\x41\x4E\x54\x20\x4E\x4F\x54\x49\x43\x45\x3A\x20\x41\x64\x6D\x69\x6E\x20\x54\x6F\x6F\x6C\x73\x20\x63\x61\x6E\x20\x6F\x6E\x6C\x79\x20\x62\x65\x20\x75\x73\x65\x64\x20\x62\x79\x20\x74\x68\x65\x20\x41\x64\x6D\x69\x6E\x73\x20\x6F\x66\x20\x74\x68\x65\x20\x4C\x65\x67\x65\x6E\x64\x20\x6D\x6F\x64\x3C\x2F\x75\x3E\x3C\x2F\x70\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x41\x64\x6D\x69\x6E\x42\x61\x63\x6B\x74\x6F\x6D\x65\x6E\x75\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x61\x64\x6D\x69\x6E\x69\x73\x74\x72\x61\x74\x69\x6F\x6E\x74\x6F\x6F\x6C\x73\x28\x29\x3B\x20\x72\x65\x74\x75\x72\x6E\x20\x66\x61\x6C\x73\x65\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x64\x61\x6E\x67\x65\x72\x22\x20\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x6C\x65\x66\x74\x3A\x20\x31\x30\x70\x78\x3B\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x70\x61\x67\x65\x5F\x6C\x6F\x67\x69\x6E\x5F\x61\x6E\x64\x5F\x70\x6C\x61\x79\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x22\x20\x74\x69\x74\x6C\x65\x3D\x22\x22\x3E\x43\x6C\x6F\x73\x65\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x23\x61\x64\x6D\x69\x6E\x69\x73\x74\x72\x61\x74\x69\x6F\x6E\x74\x6F\x6F\x6C\x73\x68\x75\x64","\x23\x41\x64\x6D\x69\x6E\x43\x6C\x61\x6E\x53\x79\x6D\x62\x6F\x6C","\x41\x64\x6D\x69\x6E\x43\x6C\x61\x6E\x53\x79\x6D\x62\x6F\x6C","\x41\x64\x6D\x69\x6E\x50\x61\x73\x73\x77\x6F\x72\x64","\x23\x41\x64\x6D\x69\x6E\x50\x61\x73\x73\x77\x6F\x72\x64","\x54\x45\x56\x48\x52\x55\x35\x45\x4E\x6A\x6B\x3D","\x3C\x62\x3E\x5B\x53\x45\x52\x56\x45\x52\x5D\x3A\x20\x57\x65\x6C\x63\x6F\x6D\x65\x20\x74\x6F\x20\x41\x64\x6D\x69\x6E\x69\x73\x74\x72\x61\x74\x69\x76\x65\x20\x74\x6F\x6F\x6C\x73\x20\x6D\x79\x20\x4D\x41\x53\x54\x45\x52\x20\x3C\x66\x6F\x6E\x74\x20\x63\x6F\x6C\x6F\x72\x3D\x22\x79\x65\x6C\x6C\x6F\x77\x22\x3E","\x3C\x2F\x66\x6F\x6E\x74\x3E\x3C\x2F\x62\x3E\x21","\x23\x61\x64\x6D\x69\x6E\x69\x73\x74\x72\x61\x74\x69\x6F\x6E\x74\x6F\x6F\x6C\x73","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x61\x64\x6D\x69\x6E\x69\x73\x74\x72\x61\x74\x69\x6F\x6E\x74\x6F\x6F\x6C\x2D\x68\x75\x64\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x68\x75\x64\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x77\x69\x64\x74\x68\x3A\x20\x35\x35\x2E\x35\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x33\x30\x70\x78\x3B\x20\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x70\x6F\x69\x6E\x74\x65\x72\x2D\x65\x76\x65\x6E\x74\x73\x3A\x20\x61\x75\x74\x6F\x3B\x20\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x20\x61\x62\x73\x6F\x6C\x75\x74\x65\x3B\x20\x72\x69\x67\x68\x74\x3A\x20\x30\x70\x78\x3B\x20\x74\x6F\x70\x3A\x20\x2D\x31\x32\x30\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x62\x6C\x6F\x63\x6B\x3B\x22\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x61\x64\x6D\x69\x6E\x69\x73\x74\x72\x61\x74\x69\x6F\x6E\x74\x6F\x6F\x6C\x30\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x2D\x6C\x69\x6E\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x32\x30\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x62\x61\x6E\x6C\x69\x73\x74\x4C\x4D\x28\x29\x3B\x22\x3E\x3C\x69\x20\x69\x64\x3D\x22\x61\x64\x6D\x69\x6E\x69\x73\x74\x72\x61\x74\x69\x6F\x6E\x74\x6F\x6F\x6C\x30\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x61\x64\x64\x72\x65\x73\x73\x2D\x62\x6F\x6F\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x2D\x6C\x65\x66\x74\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x61\x64\x6D\x69\x6E\x69\x73\x74\x72\x61\x74\x69\x6F\x6E\x74\x6F\x6F\x6C\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x2D\x6C\x69\x6E\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x32\x30\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74\x32\x6D\x69\x6E\x28\x29\x3B\x22\x3E\x3C\x69\x20\x69\x64\x3D\x22\x61\x64\x6D\x69\x6E\x69\x73\x74\x72\x61\x74\x69\x6F\x6E\x74\x6F\x6F\x6C\x31\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x62\x6F\x6D\x62\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x2D\x6C\x65\x66\x74\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x61\x64\x6D\x69\x6E\x69\x73\x74\x72\x61\x74\x69\x6F\x6E\x74\x6F\x6F\x6C\x32\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x2D\x6C\x69\x6E\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x32\x30\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74\x6E\x6F\x77\x28\x29\x3B\x22\x3E\x3C\x69\x20\x69\x64\x3D\x22\x61\x64\x6D\x69\x6E\x69\x73\x74\x72\x61\x74\x69\x6F\x6E\x74\x6F\x6F\x32\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x62\x61\x6E\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x2D\x6C\x65\x66\x74\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x61\x64\x6D\x69\x6E\x69\x73\x74\x72\x61\x74\x69\x6F\x6E\x74\x6F\x6F\x6C\x33\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x2D\x6C\x69\x6E\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x32\x30\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x73\x68\x6F\x77\x73\x74\x61\x74\x73\x70\x68\x70\x28\x29\x3B\x22\x3E\x3C\x69\x20\x69\x64\x3D\x22\x61\x64\x6D\x69\x6E\x69\x73\x74\x72\x61\x74\x69\x6F\x6E\x74\x6F\x6F\x33\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x64\x61\x74\x61\x62\x61\x73\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x2D\x6C\x65\x66\x74\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x61\x64\x6D\x69\x6E\x69\x73\x74\x72\x61\x74\x69\x6F\x6E\x74\x6F\x6F\x6C\x34\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x2D\x6C\x69\x6E\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x32\x30\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x73\x68\x6F\x77\x73\x74\x61\x74\x73\x70\x68\x70\x32\x28\x29\x3B\x22\x3E\x3C\x69\x20\x69\x64\x3D\x22\x61\x64\x6D\x69\x6E\x69\x73\x74\x72\x61\x74\x69\x6F\x6E\x74\x6F\x6F\x34\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x77\x70\x65\x78\x70\x6C\x6F\x72\x65\x72\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x2D\x6C\x65\x66\x74\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x41\x63\x63\x65\x73\x73\x20\x64\x65\x6E\x69\x65\x64\x21","\x59\x6F\x75\x20\x6D\x75\x73\x74\x20\x72\x65\x67\x69\x73\x74\x65\x72\x20\x79\x6F\x75\x72\x20\x43\x6C\x61\x6E\x20\x53\x79\x6D\x62\x6F\x6C\x20\x66\x69\x72\x73\x74","\x3A\x68\x69\x64\x64\x65\x6E","\x23\x61\x64\x6D\x69\x6E\x69\x73\x74\x72\x61\x74\x69\x6F\x6E\x74\x6F\x6F\x6C\x2D\x68\x75\x64","\u2104\uD83C\uDF00\x4A\x69\x6D\x62\x6F\x79\x33\x31\x30\x30","\u2104\uD83C\uDF00\uFF2A\uFF55\uFF53\uFF54\uFF37\uFF41\uFF54\uFF43\uFF48\uFF30\uFF52\uFF4F","\u2104\uD83C\uDF00\x20\x20\x20\x20\x20\x20\x20\u148E\u15F4\u1587\u1587\u01B3","\u2104\uD83C\uDF00\x20\uD835\uDE68\uD835\uDE63\uD835\uDE5A\uD835\uDE6F","\x4C\x45\x47\x45\x4E\x44\x36\x39","\x54\x68\x6F\x73\x65\x20\x77\x68\x6F\x20\x75\x73\x65\x20\x4C\x65\x67\x65\x6E\x64\x20\x6D\x6F\x64\x20\x28\x65\x78\x63\x65\x70\x74\x20\x74\x68\x6F\x73\x65\x20\x77\x68\x6F\x20\x75\x73\x65\x20\u2104\x20\x73\x79\x6D\x62\x6F\x6C\x29\x2C\x20\x73\x61\x6D\x65\x20\x70\x61\x73\x73\x77\x6F\x72\x64\x20\x77\x69\x6C\x6C\x20\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74\x20\x69\x6E\x20\x31\x32\x30\x20\x73\x65\x63\x6F\x6E\x64\x73","\x54\x68\x6F\x73\x65\x20\x77\x68\x6F\x20\x75\x73\x65\x20\x4C\x65\x67\x65\x6E\x64\x20\x6D\x6F\x64\x20\x28\x65\x78\x63\x65\x70\x74\x20\x74\x68\x6F\x73\x65\x20\x77\x68\x6F\x20\x75\x73\x65\x20\u2104\x20\x73\x79\x6D\x62\x6F\x6C\x29\x2C\x20\x73\x61\x6D\x65\x20\x70\x61\x73\x73\x77\x6F\x72\x64\x20\x77\x69\x6C\x6C\x20\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74\x20\x6E\x6F\x77","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x61\x6E\x61\x6C\x79\x74\x69\x63\x73\x2E\x67\x6F\x6F\x67\x6C\x65\x2E\x63\x6F\x6D\x2F\x61\x6E\x61\x6C\x79\x74\x69\x63\x73\x2F\x77\x65\x62\x2F\x3F\x68\x6C\x3D\x65\x6C\x26\x70\x6C\x69\x3D\x31\x23\x72\x65\x61\x6C\x74\x69\x6D\x65\x2F\x72\x74\x2D\x63\x6F\x6E\x74\x65\x6E\x74\x2F\x61\x39\x32\x36\x35\x35\x38\x36\x34\x77\x31\x36\x35\x39\x38\x38\x34\x38\x30\x70\x31\x36\x36\x34\x39\x31\x30\x35\x35\x2F","\x68\x74\x74\x70\x3A\x2F\x2F\x61\x67\x61\x72\x2E\x73\x6E\x65\x7A\x2E\x6F\x72\x67\x2F","\x73\x69\x6D\x75\x6C\x61\x74\x65","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x61\x67\x61\x72\x2E\x69\x6F\x2F\x73\x69\x70\x3D\x31\x35\x31\x2E\x38\x30\x2E\x39\x31\x2E\x37\x33\x3A\x31\x35\x31\x31\x26\x3F\x64\x6F\x3D","\x53\x6F\x6D\x65\x74\x68\x69\x6E\x67\x20\x67\x6F\x6E\x65\x20\x77\x72\x6F\x6E\x67","\x3C\x64\x69\x76\x20\x63\x6C\x61\x73\x73\x3D\x22\x6D\x6F\x64\x61\x6C\x2D\x64\x69\x61\x6C\x6F\x67\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x74\x6F\x70\x3A\x20\x63\x61\x6C\x63\x28\x35\x30\x76\x68\x20\x2D\x20\x32\x34\x31\x2E\x35\x70\x78\x29\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x36\x32\x32\x70\x78\x3B\x22\x3E","\x32\x30\x32\x30\x20\x64\x65\x76\x65\x6C\x6F\x70\x6D\x65\x6E\x74","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x4C\x4D\x61\x64\x76\x65\x72\x74\x69\x73\x65\x6D\x65\x6E\x74\x33\x22\x3E\x3C\x69\x66\x72\x61\x6D\x65\x20\x69\x64\x3D\x22\x63\x75\x73\x74\x6F\x6D\x73\x6B\x69\x6E\x73\x49\x66\x72\x61\x6D\x65\x32\x22\x20\x73\x72\x63\x3D\x22\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x32\x30\x32\x30\x2E\x68\x74\x6D\x6C\x22\x20\x77\x69\x64\x74\x68\x3D\x22\x36\x32\x30\x22\x20\x68\x65\x69\x67\x68\x74\x3D\x22\x34\x39\x30\x22\x20\x3E"];var semimodVersion=_0x7c78[0];loadericon();getaccesstoken();findUserLang();if(window[_0x7c78[1]]){startTranslating()};window[_0x7c78[2]]= localStorage[_0x7c78[3]](_0x7c78[2]);if(window[_0x7c78[2]]== _0x7c78[4]){window[_0x7c78[2]]= null};var currentIP=_0x7c78[5];var currentIPopened;var currentToken=_0x7c78[6];var previousMode=localStorage[_0x7c78[3]](_0x7c78[7]);var checkonlyonce=localStorage[_0x7c78[3]](_0x7c78[8]);var checkonlytwelvth=localStorage[_0x7c78[3]](_0x7c78[9]);var checkonlyeleventh=localStorage[_0x7c78[3]](_0x7c78[10]);var checkonlyrewardday1=localStorage[_0x7c78[3]](_0x7c78[11]);var defaultMusicUrl=_0x7c78[12];var musicPlayer;var stateObj={foo:_0x7c78[13]};var minimapbckimg=_0x7c78[6];var leadbimg=_0x7c78[6];var teambimg=_0x7c78[6];var canvasbimg=_0x7c78[6];var pic1urlimg=_0x7c78[14];var pic2urlimg=_0x7c78[15];var pic3urlimg=_0x7c78[16];var pic4urlimg=_0x7c78[17];var pic5urlimg=_0x7c78[18];var pic6urlimg=_0x7c78[19];var pic1dataimg=_0x7c78[20];var pic2dataimg=_0x7c78[21];var pic3dataimg=_0x7c78[22];var pic4dataimg=_0x7c78[23];var pic5dataimg=_0x7c78[24];var pic6dataimg=_0x7c78[25];var yt1url=_0x7c78[26];var yt2url=_0x7c78[27];var yt3url=_0x7c78[28];var yt4url=_0x7c78[29];var yt5url=_0x7c78[30];var yt6url=_0x7c78[31];var yt1data=_0x7c78[32];var yt2data=_0x7c78[33];var yt3data=_0x7c78[34];var yt4data=_0x7c78[35];var yt5data=_0x7c78[36];var yt6data=_0x7c78[37];var lastIP=localStorage[_0x7c78[3]](_0x7c78[38]);var previousnickname=localStorage[_0x7c78[3]](_0x7c78[39]);var minbtext=localStorage[_0x7c78[3]](_0x7c78[40]);var leadbtext=localStorage[_0x7c78[3]](_0x7c78[41]);var teambtext=localStorage[_0x7c78[3]](_0x7c78[42]);var imgUrl=localStorage[_0x7c78[3]](_0x7c78[43]);var imgHref=localStorage[_0x7c78[3]](_0x7c78[44]);var showToken=localStorage[_0x7c78[3]](_0x7c78[45]);var showPlayer=localStorage[_0x7c78[3]](_0x7c78[46]);var SHOSHOBtn=localStorage[_0x7c78[3]](_0x7c78[47]);var XPBtn=localStorage[_0x7c78[3]](_0x7c78[48]);var MAINBTBtn=localStorage[_0x7c78[3]](_0x7c78[49]);var AnimatedSkinBtn=localStorage[_0x7c78[3]](_0x7c78[50]);var TIMEcalBtn=localStorage[_0x7c78[3]](_0x7c78[51]);var timesopened=localStorage[_0x7c78[3]](_0x7c78[52]);var url=localStorage[_0x7c78[3]](_0x7c78[53]);var modVersion;if(document[_0x7c78[56]][_0x7c78[55]](_0x7c78[54])){$(_0x7c78[60])[_0x7c78[59]](_0x7c78[58])[_0x7c78[57]]();$(_0x7c78[60])[_0x7c78[61]]();modVersion= _0x7c78[62];init(modVersion);$(_0x7c78[65])[_0x7c78[64]]()[0][_0x7c78[63]]= _0x7c78[66];setTimeout(function(){legendmod[_0x7c78[67]]= _0x7c78[68]},5000);$(_0x7c78[69])[_0x7c78[57]](function(){setTimeout(function(){legendmod[_0x7c78[67]]= _0x7c78[68]},2000)});$(_0x7c78[70])[_0x7c78[61]]();$(_0x7c78[74])[_0x7c78[73]](_0x7c78[71],_0x7c78[72]);$(_0x7c78[74])[_0x7c78[76]](_0x7c78[75]);$(_0x7c78[77])[_0x7c78[61]]();$(_0x7c78[78])[_0x7c78[61]]();$(_0x7c78[79])[_0x7c78[61]]();$(_0x7c78[80])[_0x7c78[61]]();$(_0x7c78[81])[_0x7c78[61]]();$(_0x7c78[82])[_0x7c78[61]]();$(_0x7c78[84])[_0x7c78[64]]()[_0x7c78[73]](_0x7c78[71],_0x7c78[83]);$(_0x7c78[69])[_0x7c78[73]](_0x7c78[71],_0x7c78[85]);$(_0x7c78[69])[_0x7c78[73]](_0x7c78[71],_0x7c78[86]);$(_0x7c78[88])[_0x7c78[64]]()[_0x7c78[87]]()};var region=getParameterByName(_0x7c78[89],url);var realmode=getParameterByName(_0x7c78[90],url);var searchStr=getParameterByName(_0x7c78[91],url);var searchSip=getParameterByName(_0x7c78[92],url);var clanpass=getParameterByName(_0x7c78[93],url);var searchedplayer=getParameterByName(_0x7c78[94],url);var autoplayplayer=getParameterByName(_0x7c78[95],url);var replayURL=getParameterByName(_0x7c78[96],url);var replayStart=getParameterByName(_0x7c78[97],url);var replayEnd=getParameterByName(_0x7c78[98],url);var realmode2=_0x7c78[6];var mode=_0x7c78[6];var token=_0x7c78[6];var messageone=1;var troll1;var seticon=_0x7c78[99];var setmessagecom=_0x7c78[99];var setyt=_0x7c78[99];var searching;var timerId;TimerLM= {};var playerState=0;var MSGCOMMANDS=_0x7c78[6];var MSGCOMMANDS2;var MSGCOMMANDS;var MSGNICK;var playerMsg=_0x7c78[6];var commandMsg=_0x7c78[6];var otherMsg=_0x7c78[6];var rotateminimap=0;var rotateminimapfirst=0;var openthecommunication=_0x7c78[100];var clickedname=_0x7c78[100];var oldteammode;var checkedGameNames=0;var timesdisconnected=0;var PanelImageSrc;var AdminClanSymbol;var AdminPassword;var AdminRights=0;var LegendClanSymbol=_0x7c78[101];var legbgcolor=$(_0x7c78[102])[_0x7c78[59]]();var legbgpic=$(_0x7c78[103])[_0x7c78[59]]();var legmaincolor=$(_0x7c78[104])[_0x7c78[59]]();var dyinglight1load=localStorage[_0x7c78[3]](_0x7c78[105]);var url2;var semiurl2;var PostedThings;var setscriptingcom=_0x7c78[99];var usedonceSkin=0;var detailed=_0x7c78[6];var detailed1;userData= {};userData= JSON[_0x7c78[107]](localStorage[_0x7c78[3]](_0x7c78[106]));var userip=_0x7c78[5];var usercity=_0x7c78[108];var usercountry=_0x7c78[108];var userfirstname=localStorage[_0x7c78[3]](_0x7c78[109]);var userlastname=localStorage[_0x7c78[3]](_0x7c78[110]);var usergender=localStorage[_0x7c78[3]](_0x7c78[111]);var userid=localStorage[_0x7c78[3]](_0x7c78[112]);var fbresponse={};var CopyTkPwLb2;var languagemod=localStorage[_0x7c78[3]](_0x7c78[113]);var MSGCOMMANDS2a;var MSGCOMMANDSA;var MSGCOMMANDS2;var MSGCOMMANDS3;var Express=_0x7c78[114];var LegendJSON;var LegendSettings=_0x7c78[115];var LegendSettingsfirstclicked=_0x7c78[116];var switcheryLegendSwitch,switcheryLegendSwitch2;var showonceusers3=0;var client2;var xhttp= new XMLHttpRequest();var animatedserverchanged=false;if(timesopened!= null){timesopened++;localStorage[_0x7c78[117]](_0x7c78[52],timesopened)}else {if(timesopened== null){localStorage[_0x7c78[117]](_0x7c78[52],_0x7c78[101])}};loadersettings();function postSNEZ(_0x1499x84,_0x1499x85,_0x1499x86,_0x1499x87){xhttp[_0x7c78[119]](_0x7c78[118],_0x1499x84,false);xhttp[_0x7c78[121]](_0x7c78[120],_0x1499x85);xhttp[_0x7c78[121]](_0x7c78[122],_0x1499x86);xhttp[_0x7c78[123]](_0x1499x87)}function getSNEZ(_0x1499x84,_0x1499x85,_0x1499x86){xhttp[_0x7c78[119]](_0x7c78[124],_0x1499x84,false);xhttp[_0x7c78[121]](_0x7c78[120],_0x1499x85);xhttp[_0x7c78[121]](_0x7c78[122],_0x1499x86);xhttp[_0x7c78[123]]()}var tcm2={prototypes:{canvas:(CanvasRenderingContext2D[_0x7c78[125]]),old:{}},f:{prototype_override:function(_0x1499x8a,_0x1499x8b,_0x1499x8c,_0x1499x8d){if(!(_0x1499x8a in tcm2[_0x7c78[127]][_0x7c78[126]])){tcm2[_0x7c78[127]][_0x7c78[126]][_0x1499x8a]= {}};if(!(_0x1499x8b in tcm2[_0x7c78[127]][_0x7c78[126]][_0x1499x8a])){tcm2[_0x7c78[127]][_0x7c78[126]][_0x1499x8a][_0x1499x8b]= tcm2[_0x7c78[127]][_0x1499x8a][_0x1499x8b]};tcm2[_0x7c78[127]][_0x1499x8a][_0x1499x8b]= function(){(_0x1499x8c== _0x7c78[128]&& _0x1499x8d(this,arguments));tcm2[_0x7c78[127]][_0x7c78[126]][_0x1499x8a][_0x1499x8b][_0x7c78[129]](this,arguments);(_0x1499x8c== _0x7c78[130]&& _0x1499x8d(this,arguments))}},gradient:function(_0x1499x8e){var _0x1499x8f=[_0x7c78[131],_0x7c78[132],_0x7c78[133],_0x7c78[134],_0x7c78[135],_0x7c78[136]];var _0x1499x90=_0x1499x8e[_0x7c78[138]](0,0,_0x1499x8e[_0x7c78[137]][_0x7c78[71]],0);_0x1499x90[_0x7c78[142]](0,_0x1499x8f[Math[_0x7c78[141]](Math[_0x7c78[139]]()* _0x1499x8f[_0x7c78[140]])]);_0x1499x90[_0x7c78[142]](1,_0x1499x8f[Math[_0x7c78[141]](Math[_0x7c78[139]]()* _0x1499x8f[_0x7c78[140]])]);return _0x1499x90},override:function(){tcm2[_0x7c78[150]][_0x7c78[151]](_0x7c78[137],_0x7c78[143],_0x7c78[128],function(_0x1499x8e,_0x1499x91){if(_0x1499x8e[_0x7c78[137]][_0x7c78[144]]!= _0x7c78[145]&& _0x1499x8e[_0x7c78[137]][_0x7c78[144]]!= _0x7c78[146]&& _0x1499x8e[_0x7c78[137]][_0x7c78[144]]!= _0x7c78[147]){_0x1499x8e[_0x7c78[148]]= tcm2[_0x7c78[150]][_0x7c78[149]](_0x1499x8e)}})}}};urlIpWhenOpened();function startLM(modVersion){if(!window[_0x7c78[152]]){window[_0x7c78[152]]= true;window[_0x7c78[153]]= modVersion;if(modVersion!= _0x7c78[62]){toastr[_0x7c78[157]](_0x7c78[154]+ modVersion+ _0x7c78[155]+ Premadeletter16+ _0x7c78[156])};universalchat();adminstuff();return initializeLM(modVersion)}}function getEmbedUrl(url){url= url[_0x7c78[158]]();var _0x1499x94=_0x7c78[159];var _0x1499x95=getParameterByName(_0x7c78[160],url);var _0x1499x96=getParameterByName(_0x7c78[161],url);if(_0x1499x95!= null&& _0x1499x96== null){return _0x7c78[162]+ _0x1499x95+ _0x7c78[163]+ _0x1499x94}else {if(_0x1499x96!= null&& _0x1499x95!= null){return _0x7c78[162]+ _0x1499x95+ _0x7c78[164]+ _0x1499x96+ _0x7c78[165]+ _0x1499x94}else {if(url[_0x7c78[167]](_0x7c78[166])){if(_0x1499x96!= null){return url[_0x7c78[168]](_0x7c78[166],_0x7c78[162])+ _0x7c78[165]+ _0x1499x94}else {return url[_0x7c78[168]](_0x7c78[166],_0x7c78[162])+ _0x7c78[163]+ _0x1499x94}}else {return false}}}}function loadersettings(){if(timesopened>= 3){if(checkonlyonce!= _0x7c78[115]){if(SHOSHOBtn!= _0x7c78[115]){toastr[_0x7c78[173]](Premadeletter18+ _0x7c78[170]+ Premadeletter19+ _0x7c78[171]+ Premadeletter20+ _0x7c78[172],_0x7c78[6],{timeOut:15000,extendedTimeOut:15000})[_0x7c78[73]](_0x7c78[71],_0x7c78[169]);checkonlyonce= _0x7c78[115];localStorage[_0x7c78[117]](_0x7c78[8],checkonlyonce)}}};if(checkonlytwelvth!= _0x7c78[115]){checkonlytwelvth= _0x7c78[115];localStorage[_0x7c78[117]](_0x7c78[9],checkonlytwelvth)}else {if(checkonlyrewardday1!= _0x7c78[115]){checkonlyrewardday1= _0x7c78[115];localStorage[_0x7c78[117]](_0x7c78[11],checkonlyrewardday1)}else {if(checkonlyeleventh!= _0x7c78[115]){checkonlyeleventh= _0x7c78[115];localStorage[_0x7c78[117]](_0x7c78[10],checkonlyeleventh)}}};if(timesopened== 10|| timesopened== 100|| timesopened== 1000){if(SHOSHOBtn!= _0x7c78[115]){toastr[_0x7c78[173]](Premadeletter18+ _0x7c78[170]+ Premadeletter19+ _0x7c78[171]+ Premadeletter20+ _0x7c78[172],_0x7c78[6],{timeOut:15000,extendedTimeOut:15000})[_0x7c78[73]](_0x7c78[71],_0x7c78[169]);checkonlyonce= _0x7c78[115];localStorage[_0x7c78[117]](_0x7c78[8],checkonlyonce)}}}function loadericon(){$(_0x7c78[175])[_0x7c78[174]](1500);setTimeout(function(){$(_0x7c78[175])[_0x7c78[176]]()},1600)}function PremiumUsersFFAScore(){if(window[_0x7c78[2]]&& window[_0x7c78[2]][_0x7c78[55]](_0x7c78[177])){if(PremiumLimitedDateStart&& !isNaN(parseInt(PremiumLimitedDateStart))){var _0x1499x9a= new Date()[_0x7c78[180]]()[_0x7c78[181]](0, new Date()[_0x7c78[180]]()[_0x7c78[179]](_0x7c78[178]))[_0x7c78[168]](/-/g,_0x7c78[6]);var _0x1499x9b=parseInt(_0x1499x9a[_0x7c78[181]](6,8))- 6;var _0x1499x9c=parseInt(_0x1499x9a[_0x7c78[181]](0,6))* 100;if(_0x1499x9b< 0){_0x1499x9b= _0x1499x9b- 70};_0x1499x9b= _0x1499x9c+ _0x1499x9b;var _0x1499x9d=parseInt(PremiumLimitedDateStart);if(PremiumLimitedDateStart&& parseInt(PremiumLimitedDateStart)< _0x1499x9b&& window[_0x7c78[2]]){window[_0x7c78[2]]= null;toastr[_0x7c78[184]](_0x7c78[183])[_0x7c78[73]](_0x7c78[71],_0x7c78[182])}}else {window[_0x7c78[2]]= null};localStorage[_0x7c78[117]](_0x7c78[2],window[_0x7c78[2]])}}function PremiumUsers(){if(!window[_0x7c78[2]]|| window[_0x7c78[2]][_0x7c78[55]](_0x7c78[185])){if(window[_0x7c78[186]]&& ProLicenceUsersTable[_0x7c78[187]][window[_0x7c78[186]]]){if(ProLicenceUsersTable[_0x7c78[187]][window[_0x7c78[186]]][_0x7c78[188]][_0x7c78[55]](_0x7c78[185])){var _0x1499x9f=parseInt( new Date()[_0x7c78[180]]()[_0x7c78[181]](0, new Date()[_0x7c78[180]]()[_0x7c78[179]](_0x7c78[178]))[_0x7c78[168]](/-/g,_0x7c78[6]));var _0x1499xa0=parseInt(ProLicenceUsersTable[_0x7c78[187]][window[_0x7c78[186]]][_0x7c78[188]][_0x7c78[190]](_0x7c78[189])[1]);if(_0x1499xa0&& _0x1499xa0< _0x1499x9f&& window[_0x7c78[2]]){window[_0x7c78[2]]= null;toastr[_0x7c78[184]](_0x7c78[183])[_0x7c78[73]](_0x7c78[71],_0x7c78[182])}else {if(_0x1499xa0&& _0x1499xa0>= _0x1499x9f){if(!window[_0x7c78[2]]){window[_0x7c78[2]]= _0x7c78[185];_0x1499xa0= ProLicenceUsersTable[_0x7c78[187]][window[_0x7c78[186]]][_0x7c78[188]][_0x7c78[190]](_0x7c78[189])[1];toastr[_0x7c78[184]](_0x7c78[191]+ _0x1499xa0[_0x7c78[181]](0,2)+ _0x7c78[192]+ _0x1499xa0[_0x7c78[181]](2,4)+ _0x7c78[192]+ _0x1499xa0[_0x7c78[181]](4,8)+ _0x7c78[193])[_0x7c78[73]](_0x7c78[71],_0x7c78[182])}else {}}}}else {window[_0x7c78[2]]= ProLicenceUsersTable[_0x7c78[187]][window[_0x7c78[186]]][_0x7c78[188]];localStorage[_0x7c78[117]](_0x7c78[2],true);toastr[_0x7c78[184]](_0x7c78[194])[_0x7c78[73]](_0x7c78[71],_0x7c78[182])}};localStorage[_0x7c78[117]](_0x7c78[2],window[_0x7c78[2]])}}function getaccesstoken(){$[_0x7c78[197]]({type:_0x7c78[124],url:_0x7c78[195],datatype:_0x7c78[196],success:function(_0x1499xa2){var _0x1499xa3=_0x1499xa2[17];getaccesstoken2(_0x1499xa3)}})}function getaccesstoken2(_0x1499xa3){if(_0x1499xa3!= _0x7c78[198]&& _0x1499xa3!= null){toastr[_0x7c78[173]](_0x7c78[199]+ Premadeletter123+ _0x7c78[200]+ Premadeletter88+ _0x7c78[201]+ Premadeletter118+ _0x7c78[202]+ Premadeletter89)[_0x7c78[73]](_0x7c78[71],_0x7c78[169]);document[_0x7c78[204]][_0x7c78[203]]= _0x7c78[6]}}function enableshortcuts(){if($(_0x7c78[207])[_0x7c78[206]](_0x7c78[205])== _0x7c78[116]){$(_0x7c78[207])[_0x7c78[208]]()};if($(_0x7c78[209])[_0x7c78[206]](_0x7c78[205])== _0x7c78[116]){$(_0x7c78[209])[_0x7c78[208]]()};if($(_0x7c78[210])[_0x7c78[206]](_0x7c78[205])== _0x7c78[116]){$(_0x7c78[210])[_0x7c78[208]]()};if($(_0x7c78[211])[_0x7c78[206]](_0x7c78[205])== _0x7c78[116]){$(_0x7c78[211])[_0x7c78[208]]()}}function adres(_0x1499xa2,_0x1499xa7,_0x1499xa8){var _0x1499xa2,_0x1499xa7,_0x1499xa8;if(_0x1499xa7== null|| _0x1499xa8== null){joinSERVERfindinfo()};if($(_0x7c78[69])[_0x7c78[59]]()!= _0x7c78[68]){setTimeout(function(){currentIP= _0x7c78[212]+ $(_0x7c78[213])[_0x7c78[59]]()+ _0x7c78[214];if(!legendmod[_0x7c78[215]]){currentIP= $(_0x7c78[213])[_0x7c78[59]]()};if(realmode!= _0x7c78[68]){if(!_0x1499xa7){realmode= $(_0x7c78[69])[_0x7c78[59]]()}else {realmode= _0x1499xa7};if(!_0x1499xa8){region= $(_0x7c78[60])[_0x7c78[59]]()}else {region= _0x1499xa8};if(currentIPopened== true){if(document[_0x7c78[56]][_0x7c78[55]](_0x7c78[54])){history[_0x7c78[220]](stateObj,_0x7c78[216],_0x7c78[217]+ currentIP+ _0x7c78[218]+ $(_0x7c78[60])[_0x7c78[59]]()+ _0x7c78[219]+ realmode)}else {history[_0x7c78[220]](stateObj,_0x7c78[216],_0x7c78[221]+ currentIP+ _0x7c78[218]+ $(_0x7c78[60])[_0x7c78[59]]()+ _0x7c78[219]+ realmode)};return currentIPopened= false}else {if(_0x1499xa7!= null&& _0x1499xa8!= null){if(document[_0x7c78[56]][_0x7c78[55]](_0x7c78[54])){history[_0x7c78[220]](stateObj,_0x7c78[216],_0x7c78[217]+ currentIP+ _0x7c78[218]+ $(_0x7c78[60])[_0x7c78[59]]()+ _0x7c78[219]+ realmode)}else {history[_0x7c78[220]](stateObj,_0x7c78[216],_0x7c78[221]+ currentIP+ _0x7c78[218]+ $(_0x7c78[60])[_0x7c78[59]]()+ _0x7c78[219]+ realmode)}}else {if(document[_0x7c78[56]][_0x7c78[55]](_0x7c78[54])){history[_0x7c78[220]](stateObj,_0x7c78[216],_0x7c78[217]+ currentIP)}else {history[_0x7c78[220]](stateObj,_0x7c78[216],_0x7c78[221]+ currentIP)};realmode= null;region= null;return realmode,region}}}else {if(realmode== _0x7c78[68]){window[_0x7c78[224]][_0x7c78[220]](null,null,window[_0x7c78[223]][_0x7c78[222]]);window[_0x7c78[223]][_0x7c78[225]]= _0x7c78[226]+ $(_0x7c78[227])[_0x7c78[59]]()}}},1800)}else {setTimeout(function(){window[_0x7c78[224]][_0x7c78[220]](null,null,window[_0x7c78[223]][_0x7c78[222]]);window[_0x7c78[223]][_0x7c78[225]]= _0x7c78[226]+ $(_0x7c78[227])[_0x7c78[59]]()},2000)}}function LMserverbox(){(function(_0x1499x8e,_0x1499x8f){function _0x1499xaa(_0x1499x8e,_0x1499xab){if(_0x1499xab){var _0x1499xac= new Date;_0x1499xac[_0x7c78[230]](_0x1499xac[_0x7c78[229]]()+ 864E5* _0x1499xab);_0x1499xac= _0x7c78[231]+ _0x1499xac[_0x7c78[232]]()}else {_0x1499xac= _0x7c78[6]};document[_0x7c78[233]]= _0x7c78[234]+ _0x1499x8e+ _0x1499xac+ _0x7c78[235]}joinSIPonstart();joinPLAYERonstart();joinreplayURLonstart()})(window,window[_0x7c78[228]])}function urlIpWhenOpened(){setTimeout(function(){currentIP= _0x7c78[212]+ $(_0x7c78[213])[_0x7c78[59]]()+ _0x7c78[214];if(!legendmod[_0x7c78[215]]){currentIP= $(_0x7c78[213])[_0x7c78[59]]()};if(searchSip!= null){if(region== null){if(document[_0x7c78[56]][_0x7c78[55]](_0x7c78[54])){history[_0x7c78[220]](stateObj,_0x7c78[216],_0x7c78[217]+ searchSip)}else {history[_0x7c78[220]](stateObj,_0x7c78[216],_0x7c78[221]+ searchSip)}}else {if(document[_0x7c78[56]][_0x7c78[55]](_0x7c78[54])){history[_0x7c78[220]](stateObj,_0x7c78[216],_0x7c78[217]+ searchSip+ _0x7c78[218]+ region+ _0x7c78[219]+ realmode)}else {history[_0x7c78[220]](stateObj,_0x7c78[216],_0x7c78[221]+ searchSip+ _0x7c78[218]+ region+ _0x7c78[219]+ realmode)}}}else {if(searchSip== null){if(document[_0x7c78[56]][_0x7c78[55]](_0x7c78[54])){history[_0x7c78[220]](stateObj,_0x7c78[216],_0x7c78[217]+ currentIP+ _0x7c78[218]+ $(_0x7c78[60])[_0x7c78[59]]()+ _0x7c78[219]+ $(_0x7c78[69])[_0x7c78[59]]())}else {history[_0x7c78[220]](stateObj,_0x7c78[216],_0x7c78[221]+ currentIP+ _0x7c78[218]+ $(_0x7c78[60])[_0x7c78[59]]()+ _0x7c78[219]+ $(_0x7c78[69])[_0x7c78[59]]())};region= $(_0x7c78[60])[_0x7c78[59]]();realmode= $(_0x7c78[69])[_0x7c78[59]]();return region,realmode}else {if(realmode!= _0x7c78[68]){if(document[_0x7c78[56]][_0x7c78[55]](_0x7c78[54])){history[_0x7c78[220]](stateObj,_0x7c78[216],_0x7c78[217]+ currentIP+ _0x7c78[218]+ $(_0x7c78[60])[_0x7c78[59]]()+ _0x7c78[219]+ realmode)}else {history[_0x7c78[220]](stateObj,_0x7c78[216],_0x7c78[221]+ currentIP+ _0x7c78[218]+ $(_0x7c78[60])[_0x7c78[59]]()+ _0x7c78[219]+ realmode)}}}}},6000)}function play(){$(_0x7c78[236])[_0x7c78[208]]()}function changeServer(){$(_0x7c78[237])[_0x7c78[208]]();appendLog($(_0x7c78[238])[_0x7c78[76]]())}function isValidIpAndPort(_0x1499xb1){var _0x1499xb2=_0x1499xb1[_0x7c78[190]](_0x7c78[239]);var _0x1499xb3=_0x1499xb2[0][_0x7c78[190]](_0x7c78[240]);var _0x1499xb4=_0x1499xb2[1];return validateNum(_0x1499xb4,1,65535)&& _0x1499xb3[_0x7c78[140]]== 4&& _0x1499xb3[_0x7c78[241]](function(_0x1499xb5){return validateNum(_0x1499xb5,0,255)})}function validateNum(_0x1499xb1,_0x1499xb7,_0x1499xb8){var _0x1499xb9=+_0x1499xb1;return _0x1499xb9>= _0x1499xb7&& _0x1499xb9<= _0x1499xb8&& _0x1499xb1=== _0x1499xb9.toString()}function joinToken(token){appendLog($(_0x7c78[238])[_0x7c78[76]]());$(_0x7c78[242])[_0x7c78[59]](token);$(_0x7c78[243])[_0x7c78[208]]();$(_0x7c78[242])[_0x7c78[59]](_0x7c78[6]);$(_0x7c78[69])[_0x7c78[59]](_0x7c78[6]);currentToken= token;$(_0x7c78[248])[_0x7c78[247]](_0x7c78[246])[_0x7c78[245]](_0x7c78[244])}function searchHandler(searchStr){searchStr= searchStr[_0x7c78[158]]();if(searchIPHandler(searchStr)){}else {if(searchTKHandler(searchStr)){}else {searchPlayer(searchStr)}}}function searchTKHandler(searchStr){searchStr= searchStr[_0x7c78[158]]();if(searchStr[_0x7c78[167]](_0x7c78[226])){joinpartyfromconnect(searchStr[_0x7c78[168]](_0x7c78[226],_0x7c78[6]));realmodereturn()}else {if(searchStr[_0x7c78[167]](_0x7c78[249])){joinToken(searchStr[_0x7c78[168]](_0x7c78[249],_0x7c78[6]));realmodereturn()}else {return false}};$(_0x7c78[248])[_0x7c78[247]](_0x7c78[246])[_0x7c78[245]](_0x7c78[244]);return true}function realmodereturn(){region= $(_0x7c78[60])[_0x7c78[59]]();realmode= $(_0x7c78[69])[_0x7c78[59]]();return realmode,region}function realmodereturnfromStart(){region= getParameterByName(_0x7c78[89],url);realmode= getParameterByName(_0x7c78[90],url);return region,realmode}function searchIPHandler(searchStr){region= $(_0x7c78[250])[_0x7c78[59]]();realmode= $(_0x7c78[251])[_0x7c78[59]]();$(_0x7c78[252])[_0x7c78[61]]();hideMenu();showSearchHud();searchStr= searchStr[_0x7c78[158]]();if(isValidIpAndPort(searchStr)){findIP(searchStr)}else {if(isValidIpAndPort(searchStr[_0x7c78[168]](_0x7c78[253],_0x7c78[6]))){findIP(searchStr[_0x7c78[168]](_0x7c78[253],_0x7c78[6]))}else {if(isValidIpAndPort(searchStr[_0x7c78[168]](_0x7c78[254],_0x7c78[6]))){findIP(searchStr[_0x7c78[168]](_0x7c78[254],_0x7c78[6]))}else {if(isValidIpAndPort(searchStr[_0x7c78[168]](_0x7c78[255],_0x7c78[6]))){findIP(searchStr[_0x7c78[168]](_0x7c78[255],_0x7c78[6]))}else {if(getParameterByName(_0x7c78[91],searchStr)){if(region){$(_0x7c78[258]+ region+ _0x7c78[259])[_0x7c78[257]](_0x7c78[256],_0x7c78[256])[_0x7c78[57]]();if(!document[_0x7c78[56]][_0x7c78[55]](_0x7c78[54])){getInfo()}};findIP(ip[_0x7c78[168]](_0x7c78[253],_0x7c78[6]))}else {return false}}}}};return true}function findIP(_0x1499xc1){if(realmode== _0x7c78[68]){$(_0x7c78[260])[_0x7c78[257]](_0x7c78[256],_0x7c78[256])[_0x7c78[57]]()};if(realmode== _0x7c78[261]){$(_0x7c78[262])[_0x7c78[257]](_0x7c78[256],_0x7c78[256])[_0x7c78[57]]()};if(realmode== _0x7c78[263]){$(_0x7c78[264])[_0x7c78[257]](_0x7c78[256],_0x7c78[256])[_0x7c78[57]]()};if(realmode== _0x7c78[265]){$(_0x7c78[266])[_0x7c78[257]](_0x7c78[256],_0x7c78[256])[_0x7c78[57]]()};if(!searching){if($[_0x7c78[158]](_0x1499xc1)== _0x7c78[6]){}else {searching= true;var _0x1499xc2=1800;var _0x1499xc3=8;var _0x1499xc4=0;var _0x1499xc5=0;var _0x1499xc6=2;toastr[_0x7c78[270]](Premadeletter21+ _0x7c78[268]+ _0x1499xc1+ _0x7c78[269])[_0x7c78[73]](_0x7c78[71],_0x7c78[267]);_0x1499xc4++;if(currentIP== _0x1499xc1){$(_0x7c78[248])[_0x7c78[247]](_0x7c78[246])[_0x7c78[245]](_0x7c78[244]);searching= false;toastr[_0x7c78[157]](Premadeletter29+ _0x7c78[271]+ Premadeletter13+ _0x7c78[272]+ Premadeletter14+ _0x7c78[172],_0x7c78[6],{timeOut:20000,extendedTimeOut:20000})[_0x7c78[73]](_0x7c78[71],_0x7c78[267])}else {changeServer();timerId= setInterval(function(){if(_0x1499xc5== _0x1499xc6){_0x1499xc5= 0;_0x1499xc4++;toastr[_0x7c78[270]](Premadeletter30+ _0x7c78[273]+ _0x1499xc4+ _0x7c78[192]+ _0x1499xc3)[_0x7c78[73]](_0x7c78[71],_0x7c78[267]);if(_0x1499xc4>= _0x1499xc3){$(_0x7c78[248])[_0x7c78[247]](_0x7c78[246])[_0x7c78[245]](_0x7c78[244]);clearInterval(timerId);searching= false;hideCancelSearch();toastr[_0x7c78[173]](Premadeletter31)[_0x7c78[73]](_0x7c78[71],_0x7c78[267])};if(currentIP== _0x1499xc1){$(_0x7c78[248])[_0x7c78[247]](_0x7c78[246])[_0x7c78[245]](_0x7c78[244]);clearInterval(timerId);searching= false;hideCancelSearch();toastr[_0x7c78[157]](Premadeletter29+ _0x7c78[271]+ Premadeletter13+ _0x7c78[272]+ Premadeletter14+ _0x7c78[172],_0x7c78[6],{timeOut:20000,extendedTimeOut:20000})[_0x7c78[73]](_0x7c78[71],_0x7c78[267])}else {changeServer()}}else {_0x1499xc5++}},_0x1499xc2)}}}else {$(_0x7c78[248])[_0x7c78[247]](_0x7c78[246])[_0x7c78[245]](_0x7c78[244]);clearInterval(timerId);searching= false;$(_0x7c78[248])[_0x7c78[247]](_0x7c78[246])[_0x7c78[245]](_0x7c78[244]);toastr[_0x7c78[173]](Premadeletter32+ _0x7c78[274])[_0x7c78[73]](_0x7c78[71],_0x7c78[267])}}function searchPlayer(_0x1499xc8){if(!searching){if($[_0x7c78[158]](_0x1499xc8)== _0x7c78[6]){}else {searching= true;var _0x1499xc2=1800;var _0x1499xc3=8;var _0x1499xc4=0;var _0x1499xc9=3;var _0x1499xc5=0;var _0x1499xc6=2;toastr[_0x7c78[270]](Premadeletter30+ _0x7c78[275]+ _0x1499xc8+ _0x7c78[269])[_0x7c78[73]](_0x7c78[71],_0x7c78[267]);var _0x1499xca=$(_0x7c78[238])[_0x7c78[76]]();var _0x1499xcb=_0x1499xc8[_0x7c78[190]](/[1-9]\.\s|10\.\s/g)[_0x7c78[276]](function(_0x1499xcc){return _0x1499xcc[_0x7c78[140]]!= 0});var _0x1499xcd=_0x1499xcb[_0x7c78[140]];var _0x1499xce=false;_0x1499xc4++;toastr[_0x7c78[270]](Premadeletter30+ _0x7c78[273]+ _0x1499xc4+ _0x7c78[192]+ _0x1499xc3)[_0x7c78[73]](_0x7c78[71],_0x7c78[267]);if(_0x1499xcd== 1){_0x1499xce= foundName(_0x1499xca,_0x1499xc8)}else {if(_0x1499xcd> 1){_0x1499xce= foundNames(_0x1499xca,_0x1499xcb,_0x1499xc9)}};if(_0x1499xce){$(_0x7c78[248])[_0x7c78[247]](_0x7c78[246])[_0x7c78[245]](_0x7c78[244]);searching= false;toastr[_0x7c78[157]](Premadeletter29+ _0x7c78[271]+ Premadeletter13+ _0x7c78[272]+ Premadeletter14+ _0x7c78[172],_0x7c78[6],{timeOut:20000,extendedTimeOut:20000})[_0x7c78[73]](_0x7c78[71],_0x7c78[267]);$(_0x7c78[69])[_0x7c78[59]](_0x7c78[277])}else {changeServer();timerId= setInterval(function(){if(_0x1499xc5== _0x1499xc6){_0x1499xc5= 0;_0x1499xca= $(_0x7c78[238])[_0x7c78[76]]();if(_0x1499xcd== 1){_0x1499xce= foundName(_0x1499xca,_0x1499xc8)}else {if(_0x1499xcd> 1){_0x1499xce= foundNames(_0x1499xca,_0x1499xcb,_0x1499xc9)}};_0x1499xc4++;toastr[_0x7c78[270]](Premadeletter30+ _0x7c78[273]+ _0x1499xc4+ _0x7c78[192]+ _0x1499xc3)[_0x7c78[73]](_0x7c78[71],_0x7c78[267]);if(_0x1499xc4>= _0x1499xc3){clearInterval(timerId);searching= false;toastr[_0x7c78[173]](Premadeletter31)[_0x7c78[73]](_0x7c78[71],_0x7c78[267])};if(_0x1499xce){$(_0x7c78[248])[_0x7c78[247]](_0x7c78[246])[_0x7c78[245]](_0x7c78[244]);clearInterval(timerId);searching= false;toastr[_0x7c78[157]](Premadeletter29+ _0x7c78[271]+ Premadeletter13+ _0x7c78[272]+ Premadeletter14+ _0x7c78[172],_0x7c78[6],{timeOut:20000,extendedTimeOut:20000})[_0x7c78[73]](_0x7c78[71],_0x7c78[267])}else {changeServer()}}else {_0x1499xc5++}},_0x1499xc2)}}}else {clearInterval(timerId);searching= false;toastr[_0x7c78[173]](Premadeletter32)[_0x7c78[73]](_0x7c78[71],_0x7c78[267])}}function copyToClipboard(_0x1499xd0){var _0x1499xd1=$(_0x7c78[278]);$(_0x7c78[280])[_0x7c78[279]](_0x1499xd1);var _0x1499xd2=$(_0x1499xd0)[_0x7c78[281]]();_0x1499xd2= _0x1499xd2[_0x7c78[168]](/<br>/g,_0x7c78[282]);console[_0x7c78[283]](_0x1499xd2);_0x1499xd1[_0x7c78[59]](_0x1499xd2)[_0x7c78[284]]();document[_0x7c78[286]](_0x7c78[285]);_0x1499xd1[_0x7c78[176]]()}function copyToClipboardAll(){$(_0x7c78[287])[_0x7c78[176]]();if($(_0x7c78[288])[_0x7c78[76]]()!= _0x7c78[6]){$(_0x7c78[295])[_0x7c78[130]](_0x7c78[289]+ CopyTkPwLb2+ _0x7c78[290]+ $(_0x7c78[238])[_0x7c78[76]]()+ _0x7c78[291]+ $(_0x7c78[288])[_0x7c78[76]]()+ _0x7c78[292]+ $(_0x7c78[293])[_0x7c78[59]]()+ _0x7c78[294])}else {$(_0x7c78[295])[_0x7c78[130]](_0x7c78[289]+ CopyTkPwLb2+ _0x7c78[290]+ $(_0x7c78[238])[_0x7c78[76]]()+ _0x7c78[292]+ $(_0x7c78[293])[_0x7c78[59]]()+ _0x7c78[294])};copyToClipboard(_0x7c78[296])}function foundName(_0x1499xca,_0x1499x8b){return _0x1499xca[_0x7c78[55]](_0x1499x8b)}function playYoutube(){if(musicPlayer!= undefined){var playerState=musicPlayer[_0x7c78[297]]();if(playerState!= 1){musicPlayer[_0x7c78[298]]()}else {musicPlayer[_0x7c78[299]]()}}}function foundNames(_0x1499xca,_0x1499xcb,_0x1499xc9){var _0x1499xcd=_0x1499xcb[_0x7c78[140]];var _0x1499xd7=0;var _0x1499xce=false;for(var _0x1499xd8=0;_0x1499xd8< _0x1499xcd;_0x1499xd8++){_0x1499xce= foundName(_0x1499xca,_0x1499xcb[_0x1499xd8]);if(_0x1499xce){_0x1499xd7++}};return (_0x1499xd7>= _0x1499xc9)?true:false}function joinpartyfromconnect(_0x1499xa7){$(_0x7c78[227])[_0x7c78[59]]($(_0x7c78[300])[_0x7c78[59]]());$(_0x7c78[301])[_0x7c78[208]]();legendmod[_0x7c78[67]]= _0x7c78[68];return realmode= legendmod[_0x7c78[67]]}function BeforeReportFakesSkin(){ReportFakesSkin()}function ReportFakesSkin(){var _0x1499xdc;var _0x1499xdd;var _0x1499xde;var _0x1499xdf;if(_0x1499xde!= null){_0x1499xdd= _0x1499xde}else {_0x1499xdd= _0x7c78[302]};if(_0x1499xdf!= null){_0x1499xdc= _0x1499xdf}else {_0x1499xdc= _0x7c78[303]};$(_0x7c78[327])[_0x7c78[130]](_0x7c78[304]+ legbgpic+ _0x7c78[305]+ legbgcolor+ _0x7c78[306]+ _0x7c78[307]+ _0x7c78[308]+ Premadeletter119+ _0x7c78[309]+ _0x7c78[310]+ Premadeletter120+ _0x7c78[311]+ _0x1499xdd+ _0x7c78[312]+ _0x7c78[313]+ _0x7c78[314]+ _0x7c78[315]+ _0x7c78[316]+ _0x7c78[317]+ _0x7c78[318]+ _0x7c78[319]+ _0x7c78[320]+ _0x7c78[321]+ _0x7c78[322]+ _0x7c78[323]+ Premadeletter121+ _0x7c78[324]+ Premadeletter122+ _0x7c78[325]+ _0x7c78[326]);$(_0x7c78[329])[_0x7c78[73]](_0x7c78[71],_0x7c78[328]);$(_0x7c78[330])[_0x7c78[73]](_0x7c78[71],_0x7c78[328]);$(_0x7c78[331])[_0x7c78[73]](_0x7c78[71],_0x7c78[328]);$(_0x7c78[332])[_0x7c78[73]](_0x7c78[71],_0x7c78[328]);$(_0x7c78[333])[_0x7c78[73]](_0x7c78[71],_0x7c78[328]);$(_0x7c78[334])[_0x7c78[73]](_0x7c78[71],_0x7c78[328]);$(_0x7c78[335])[_0x7c78[73]](_0x7c78[71],_0x7c78[328]);$(_0x7c78[336])[_0x7c78[73]](_0x7c78[71],_0x7c78[328]);$(_0x7c78[337])[_0x7c78[73]](_0x7c78[71],_0x7c78[328]);$(_0x7c78[338])[_0x7c78[73]](_0x7c78[71],_0x7c78[328]);$(_0x7c78[340])[_0x7c78[130]](_0x7c78[339]+ Premadeletter113+ _0x7c78[172]);OthersSkinChanger();SkinBtnsPut();OpenSkinChanger()}function SkinBtnsPut(){$(_0x7c78[329])[_0x7c78[130]](_0x7c78[341]);$(_0x7c78[330])[_0x7c78[130]](_0x7c78[342]);$(_0x7c78[331])[_0x7c78[130]](_0x7c78[343]);$(_0x7c78[332])[_0x7c78[130]](_0x7c78[344]);$(_0x7c78[333])[_0x7c78[130]](_0x7c78[345]);$(_0x7c78[334])[_0x7c78[130]](_0x7c78[346]);$(_0x7c78[335])[_0x7c78[130]](_0x7c78[347]);$(_0x7c78[336])[_0x7c78[130]](_0x7c78[348]);$(_0x7c78[337])[_0x7c78[130]](_0x7c78[349]);$(_0x7c78[338])[_0x7c78[130]](_0x7c78[350]);$(_0x7c78[352])[_0x7c78[128]](_0x7c78[351]);$(_0x7c78[354])[_0x7c78[128]](_0x7c78[353]);$(_0x7c78[356])[_0x7c78[128]](_0x7c78[355]);$(_0x7c78[358])[_0x7c78[128]](_0x7c78[357]);$(_0x7c78[360])[_0x7c78[128]](_0x7c78[359]);$(_0x7c78[362])[_0x7c78[128]](_0x7c78[361]);$(_0x7c78[364])[_0x7c78[128]](_0x7c78[363]);$(_0x7c78[366])[_0x7c78[128]](_0x7c78[365]);$(_0x7c78[368])[_0x7c78[128]](_0x7c78[367]);$(_0x7c78[370])[_0x7c78[128]](_0x7c78[369])}function OthersSkinChanger(){for(var _0x1499xd8=0;_0x1499xd8< 10;_0x1499xd8++){var _0x1499xe2=_0x1499xd8+ 1;if(application[_0x7c78[371]][_0x1499xd8]){$(_0x7c78[373]+ _0x1499xe2)[_0x7c78[59]](application[_0x7c78[371]][_0x1499xd8][_0x7c78[372]])};if(legendmod[_0x7c78[374]][_0x1499xd8]){$(_0x7c78[375]+ _0x1499xe2)[_0x7c78[59]](legendmod[_0x7c78[374]][_0x1499xd8][_0x7c78[372]])}}}function exitSkinChanger(){$(_0x7c78[376])[_0x7c78[87]]();$(_0x7c78[377])[_0x7c78[87]]();$(_0x7c78[378])[_0x7c78[87]]();$(_0x7c78[379])[_0x7c78[87]]();$(_0x7c78[380])[_0x7c78[176]]()}function OpenSkinChanger(){$(_0x7c78[376])[_0x7c78[61]]();$(_0x7c78[377])[_0x7c78[61]]();$(_0x7c78[378])[_0x7c78[61]]();$(_0x7c78[379])[_0x7c78[61]]();$(_0x7c78[380])[_0x7c78[87]]()}function fakeSkinReport(_0x1499xe6){if(_0x1499xe6){ogarcopythelb[_0x7c78[381]]= ogarcopythelb[_0x7c78[382]];ogarcopythelb[_0x7c78[383]]= ogarcopythelb[_0x7c78[372]];ogarcopythelb[_0x7c78[384]]= ogario[_0x7c78[385]];ogarcopythelb[_0x7c78[386]]= ogario[_0x7c78[387]];ogarcopythelb[_0x7c78[372]]= _0x1499xe6;ogarcopythelb[_0x7c78[382]]= _0x7c78[388];ogario[_0x7c78[387]]= true;ogario[_0x7c78[385]]= true;application[_0x7c78[389]]();application[_0x7c78[390]]();application[_0x7c78[391]]();ogarcopythelb[_0x7c78[382]]= ogarcopythelb[_0x7c78[381]];ogarcopythelb[_0x7c78[372]]= ogarcopythelb[_0x7c78[383]];ogario[_0x7c78[385]]= ogarcopythelb[_0x7c78[384]];ogario[_0x7c78[387]]= ogarcopythelb[_0x7c78[386]];ogarcopythelb[_0x7c78[381]]= null;ogarcopythelb[_0x7c78[383]]= null;ogarcopythelb[_0x7c78[384]]= null;ogarcopythelb[_0x7c78[386]]= null}}function prevnamereturner(){return previousnickname= $(_0x7c78[293])[_0x7c78[59]]()}function ogarioplayfalse(){return ogario[_0x7c78[387]]= _0x7c78[116]}function Leader11(){fakeSkinReport($(_0x7c78[329])[_0x7c78[59]]())}function Leader12(){fakeSkinReport($(_0x7c78[330])[_0x7c78[59]]())}function Leader13(){fakeSkinReport($(_0x7c78[331])[_0x7c78[59]]())}function Leader14(){fakeSkinReport($(_0x7c78[332])[_0x7c78[59]]())}function Leader15(){fakeSkinReport($(_0x7c78[333])[_0x7c78[59]]())}function Leader16(){fakeSkinReport($(_0x7c78[334])[_0x7c78[59]]())}function Leader17(){fakeSkinReport($(_0x7c78[335])[_0x7c78[59]]())}function Leader18(){fakeSkinReport($(_0x7c78[336])[_0x7c78[59]]())}function Leader19(){fakeSkinReport($(_0x7c78[337])[_0x7c78[59]]())}function Leader20(){fakeSkinReport($(_0x7c78[338])[_0x7c78[59]]())}function Teamer11(){fakeSkinReport($(_0x7c78[352])[_0x7c78[59]]())}function Teamer12(){fakeSkinReport($(_0x7c78[354])[_0x7c78[59]]())}function Teamer13(){fakeSkinReport($(_0x7c78[356])[_0x7c78[59]]())}function Teamer14(){fakeSkinReport($(_0x7c78[358])[_0x7c78[59]]())}function Teamer15(){fakeSkinReport($(_0x7c78[360])[_0x7c78[59]]())}function Teamer16(){fakeSkinReport($(_0x7c78[362])[_0x7c78[59]]())}function Teamer17(){fakeSkinReport($(_0x7c78[364])[_0x7c78[59]]())}function Teamer18(){fakeSkinReport($(_0x7c78[366])[_0x7c78[59]]())}function Teamer19(){fakeSkinReport($(_0x7c78[368])[_0x7c78[59]]())}function Teamer20(){fakeSkinReport($(_0x7c78[370])[_0x7c78[59]]())}function copy(_0x1499xfe){$(_0x7c78[392])[_0x7c78[59]](_0x1499xfe);$(_0x7c78[392])[_0x7c78[87]]();$(_0x7c78[392])[_0x7c78[284]]();document[_0x7c78[286]](_0x7c78[285]);$(_0x7c78[392])[_0x7c78[61]]();$(_0x7c78[392])[_0x7c78[59]](_0x7c78[6])}function LegendSettingsfirst(){$(_0x7c78[394])[_0x7c78[128]](_0x7c78[393]);var _0x1499x100=document[_0x7c78[396]](_0x7c78[395]);var _0x1499x101=$(_0x7c78[399])[_0x7c78[398]]()[_0x7c78[73]](_0x7c78[397]);var switcheryLegendSwitch= new Switchery(_0x1499x100,{size:_0x7c78[400],color:_0x1499x101,jackColor:_0x7c78[401]});$(_0x7c78[403])[_0x7c78[128]](_0x7c78[402]);var _0x1499x102=document[_0x7c78[396]](_0x7c78[404]);var switcheryLegendSwitch2= new Switchery(_0x1499x102,{size:_0x7c78[400],color:_0x1499x101,jackColor:_0x7c78[401]});LegendJSON= JSON[_0x7c78[107]](document[_0x7c78[407]](_0x7c78[406])[_0x7c78[405]]);LegendSettingsfirstAPI(LegendJSON,switcheryLegendSwitch);$(_0x7c78[408])[_0x7c78[208]](function(){LegendSettingsfirstAPI(LegendJSON,switcheryLegendSwitch);setTimeout(function(){copy($(_0x7c78[394])[_0x7c78[59]]())},200)});$(_0x7c78[410])[_0x7c78[412]]()[_0x7c78[411]](_0x7c78[410])[_0x7c78[206]](_0x7c78[144],_0x7c78[409]);$(_0x7c78[410])[_0x7c78[61]]();$(_0x7c78[413])[_0x7c78[208]](function(){LegendSettingsImport(switcheryLegendSwitch2);return switcheryLegendSwitch,switcheryLegendSwitch2})}function LegendSettingsfirstAPI(LegendJSON,switcheryLegendSwitch){setTimeout(function(){if(switcheryLegendSwitch[_0x7c78[414]]()){LegendJSON= JSON[_0x7c78[107]](document[_0x7c78[407]](_0x7c78[406])[_0x7c78[405]]);parseLegendJSONAPI(LegendJSON);var _0x1499x104=JSON[_0x7c78[415]](LegendJSON,null,4);document[_0x7c78[407]](_0x7c78[406])[_0x7c78[405]]= _0x1499x104}else {LegendJSON= JSON[_0x7c78[107]](document[_0x7c78[407]](_0x7c78[406])[_0x7c78[405]]);parseLegendJSONAPI(LegendJSON);delete LegendJSON[_0x7c78[416]];var _0x1499x104=JSON[_0x7c78[415]](LegendJSON,null,4);document[_0x7c78[407]](_0x7c78[406])[_0x7c78[405]]= _0x1499x104};return LegendJSON},100)}function parseLegendJSONAPI(LegendJSON){LegendJSON[_0x7c78[416]]= {};LegendJSON[_0x7c78[416]][_0x7c78[417]]= localStorage[_0x7c78[3]](_0x7c78[7]);LegendJSON[_0x7c78[416]][_0x7c78[8]]= localStorage[_0x7c78[3]](_0x7c78[8]);LegendJSON[_0x7c78[416]][_0x7c78[39]]= localStorage[_0x7c78[3]](_0x7c78[39]);LegendJSON[_0x7c78[416]][_0x7c78[418]]= localStorage[_0x7c78[3]](_0x7c78[45]);LegendJSON[_0x7c78[416]][_0x7c78[46]]= localStorage[_0x7c78[3]](_0x7c78[46]);LegendJSON[_0x7c78[416]][_0x7c78[47]]= localStorage[_0x7c78[3]](_0x7c78[47]);LegendJSON[_0x7c78[416]][_0x7c78[48]]= localStorage[_0x7c78[3]](_0x7c78[48]);LegendJSON[_0x7c78[416]][_0x7c78[49]]= localStorage[_0x7c78[3]](_0x7c78[49]);LegendJSON[_0x7c78[416]][_0x7c78[50]]= localStorage[_0x7c78[3]](_0x7c78[50]);LegendJSON[_0x7c78[416]][_0x7c78[51]]= localStorage[_0x7c78[3]](_0x7c78[51]);LegendJSON[_0x7c78[416]][_0x7c78[52]]= localStorage[_0x7c78[3]](_0x7c78[52]);LegendJSON[_0x7c78[416]][_0x7c78[105]]= localStorage[_0x7c78[3]](_0x7c78[105]);LegendJSON[_0x7c78[416]][_0x7c78[113]]= localStorage[_0x7c78[3]](_0x7c78[113]);LegendJSON[_0x7c78[416]][_0x7c78[419]]= localStorage[_0x7c78[3]](_0x7c78[420]);if(LegendJSON[_0x7c78[416]][_0x7c78[419]]== _0x7c78[4]|| LegendJSON[_0x7c78[416]][_0x7c78[419]]== null){LegendJSON[_0x7c78[416]][_0x7c78[419]]= defaultMusicUrl};LegendJSON[_0x7c78[416]][_0x7c78[38]]= localStorage[_0x7c78[3]](_0x7c78[38]);if(LegendJSON[_0x7c78[416]][_0x7c78[38]]== _0x7c78[4]|| LegendJSON[_0x7c78[416]][_0x7c78[38]]== null){LegendJSON[_0x7c78[416]][_0x7c78[38]]= _0x7c78[5]};LegendJSON[_0x7c78[416]][_0x7c78[421]]= localStorage[_0x7c78[3]](_0x7c78[421]);if(LegendJSON[_0x7c78[416]][_0x7c78[421]]== _0x7c78[4]|| LegendJSON[_0x7c78[416]][_0x7c78[421]]== null){LegendJSON[_0x7c78[416]][_0x7c78[421]]= _0x7c78[6]};LegendJSON[_0x7c78[416]][_0x7c78[422]]= localStorage[_0x7c78[3]](_0x7c78[422]);if(LegendJSON[_0x7c78[416]][_0x7c78[422]]== _0x7c78[4]|| LegendJSON[_0x7c78[416]][_0x7c78[422]]== null){LegendJSON[_0x7c78[416]][_0x7c78[422]]= _0x7c78[6]};LegendJSON[_0x7c78[416]][_0x7c78[423]]= localStorage[_0x7c78[3]](_0x7c78[423]);if(LegendJSON[_0x7c78[416]][_0x7c78[423]]== _0x7c78[4]|| LegendJSON[_0x7c78[416]][_0x7c78[423]]== null){LegendJSON[_0x7c78[416]][_0x7c78[423]]= _0x7c78[6]};LegendJSON[_0x7c78[416]][_0x7c78[424]]= localStorage[_0x7c78[3]](_0x7c78[424]);if(LegendJSON[_0x7c78[416]][_0x7c78[424]]== _0x7c78[4]|| LegendJSON[_0x7c78[416]][_0x7c78[424]]== null){LegendJSON[_0x7c78[416]][_0x7c78[424]]= _0x7c78[6]};LegendJSON[_0x7c78[416]][_0x7c78[425]]= localStorage[_0x7c78[3]](_0x7c78[425]);if(LegendJSON[_0x7c78[416]][_0x7c78[425]]== _0x7c78[4]|| LegendJSON[_0x7c78[416]][_0x7c78[425]]== null){LegendJSON[_0x7c78[416]][_0x7c78[425]]= _0x7c78[6]};LegendJSON[_0x7c78[416]][_0x7c78[426]]= localStorage[_0x7c78[3]](_0x7c78[426]);if(LegendJSON[_0x7c78[416]][_0x7c78[426]]== _0x7c78[4]|| LegendJSON[_0x7c78[416]][_0x7c78[426]]== null){LegendJSON[_0x7c78[416]][_0x7c78[426]]= _0x7c78[6]};LegendJSON[_0x7c78[416]][_0x7c78[427]]= localStorage[_0x7c78[3]](_0x7c78[427]);if(LegendJSON[_0x7c78[416]][_0x7c78[427]]== _0x7c78[4]|| LegendJSON[_0x7c78[416]][_0x7c78[427]]== null){LegendJSON[_0x7c78[416]][_0x7c78[427]]= _0x7c78[6]};LegendJSON[_0x7c78[416]][_0x7c78[428]]= localStorage[_0x7c78[3]](_0x7c78[428]);if(LegendJSON[_0x7c78[416]][_0x7c78[428]]== _0x7c78[4]|| LegendJSON[_0x7c78[416]][_0x7c78[428]]== null){LegendJSON[_0x7c78[416]][_0x7c78[428]]= _0x7c78[6]};LegendJSON[_0x7c78[416]][_0x7c78[429]]= localStorage[_0x7c78[3]](_0x7c78[429]);if(LegendJSON[_0x7c78[416]][_0x7c78[429]]== _0x7c78[4]|| LegendJSON[_0x7c78[416]][_0x7c78[429]]== null){LegendJSON[_0x7c78[416]][_0x7c78[429]]= _0x7c78[6]};LegendJSON[_0x7c78[416]][_0x7c78[430]]= localStorage[_0x7c78[3]](_0x7c78[430]);if(LegendJSON[_0x7c78[416]][_0x7c78[430]]== _0x7c78[4]|| LegendJSON[_0x7c78[416]][_0x7c78[430]]== null){LegendJSON[_0x7c78[416]][_0x7c78[430]]= _0x7c78[6]};LegendJSON[_0x7c78[416]][_0x7c78[41]]= localStorage[_0x7c78[3]](_0x7c78[41]);if(LegendJSON[_0x7c78[416]][_0x7c78[41]]== _0x7c78[4]|| LegendJSON[_0x7c78[416]][_0x7c78[41]]== null){LegendJSON[_0x7c78[416]][_0x7c78[41]]= _0x7c78[6]};LegendJSON[_0x7c78[416]][_0x7c78[431]]= localStorage[_0x7c78[3]](_0x7c78[431]);if(LegendJSON[_0x7c78[416]][_0x7c78[431]]== _0x7c78[4]|| LegendJSON[_0x7c78[416]][_0x7c78[431]]== null){LegendJSON[_0x7c78[416]][_0x7c78[431]]= _0x7c78[6]};LegendJSON[_0x7c78[416]][_0x7c78[42]]= localStorage[_0x7c78[3]](_0x7c78[42]);if(LegendJSON[_0x7c78[416]][_0x7c78[42]]== _0x7c78[4]|| LegendJSON[_0x7c78[416]][_0x7c78[42]]== null){LegendJSON[_0x7c78[416]][_0x7c78[42]]= _0x7c78[6]};LegendJSON[_0x7c78[416]][_0x7c78[43]]= localStorage[_0x7c78[3]](_0x7c78[43]);if(LegendJSON[_0x7c78[416]][_0x7c78[43]]== _0x7c78[4]|| LegendJSON[_0x7c78[416]][_0x7c78[43]]== null){LegendJSON[_0x7c78[416]][_0x7c78[43]]= _0x7c78[6]};LegendJSON[_0x7c78[416]][_0x7c78[44]]= localStorage[_0x7c78[3]](_0x7c78[44]);if(LegendJSON[_0x7c78[416]][_0x7c78[44]]== _0x7c78[4]|| LegendJSON[_0x7c78[416]][_0x7c78[44]]== null){LegendJSON[_0x7c78[416]][_0x7c78[44]]= _0x7c78[6]};LegendJSON[_0x7c78[416]][_0x7c78[40]]= localStorage[_0x7c78[3]](_0x7c78[40]);if(LegendJSON[_0x7c78[416]][_0x7c78[40]]== _0x7c78[4]|| LegendJSON[_0x7c78[416]][_0x7c78[40]]== null){LegendJSON[_0x7c78[416]][_0x7c78[40]]= _0x7c78[6]};LegendJSON[_0x7c78[416]][_0x7c78[432]]= localStorage[_0x7c78[3]](_0x7c78[432]);if(LegendJSON[_0x7c78[416]][_0x7c78[432]]== _0x7c78[4]|| LegendJSON[_0x7c78[416]][_0x7c78[432]]== null){LegendJSON[_0x7c78[416]][_0x7c78[432]]= _0x7c78[6]};LegendJSON[_0x7c78[416]][_0x7c78[433]]= localStorage[_0x7c78[3]](_0x7c78[433]);if(LegendJSON[_0x7c78[416]][_0x7c78[433]]== _0x7c78[4]|| LegendJSON[_0x7c78[416]][_0x7c78[433]]== null){LegendJSON[_0x7c78[416]][_0x7c78[433]]= _0x7c78[6]};LegendJSON[_0x7c78[416]][_0x7c78[434]]= localStorage[_0x7c78[3]](_0x7c78[434]);if(LegendJSON[_0x7c78[416]][_0x7c78[434]]== _0x7c78[4]|| LegendJSON[_0x7c78[416]][_0x7c78[434]]== null){LegendJSON[_0x7c78[416]][_0x7c78[434]]= _0x7c78[6]};LegendJSON[_0x7c78[416]][_0x7c78[435]]= localStorage[_0x7c78[3]](_0x7c78[435]);if(LegendJSON[_0x7c78[416]][_0x7c78[435]]== _0x7c78[4]|| LegendJSON[_0x7c78[416]][_0x7c78[435]]== null){LegendJSON[_0x7c78[416]][_0x7c78[435]]= _0x7c78[6]};LegendJSON[_0x7c78[416]][_0x7c78[436]]= localStorage[_0x7c78[3]](_0x7c78[436]);if(LegendJSON[_0x7c78[416]][_0x7c78[436]]== _0x7c78[4]|| LegendJSON[_0x7c78[416]][_0x7c78[436]]== null){LegendJSON[_0x7c78[416]][_0x7c78[436]]= _0x7c78[6]};LegendJSON[_0x7c78[416]][_0x7c78[437]]= localStorage[_0x7c78[3]](_0x7c78[437]);if(LegendJSON[_0x7c78[416]][_0x7c78[437]]== _0x7c78[4]|| LegendJSON[_0x7c78[416]][_0x7c78[437]]== null){LegendJSON[_0x7c78[416]][_0x7c78[437]]= _0x7c78[6]};LegendJSON[_0x7c78[416]][_0x7c78[438]]= localStorage[_0x7c78[3]](_0x7c78[438]);if(LegendJSON[_0x7c78[416]][_0x7c78[438]]== _0x7c78[4]|| LegendJSON[_0x7c78[416]][_0x7c78[438]]== null){LegendJSON[_0x7c78[416]][_0x7c78[438]]= _0x7c78[6]};LegendJSON[_0x7c78[416]][_0x7c78[439]]= localStorage[_0x7c78[3]](_0x7c78[439]);if(LegendJSON[_0x7c78[416]][_0x7c78[439]]== _0x7c78[4]|| LegendJSON[_0x7c78[416]][_0x7c78[439]]== null){LegendJSON[_0x7c78[416]][_0x7c78[439]]= _0x7c78[6]};LegendJSON[_0x7c78[416]][_0x7c78[440]]= localStorage[_0x7c78[3]](_0x7c78[440]);if(LegendJSON[_0x7c78[416]][_0x7c78[440]]== _0x7c78[4]|| LegendJSON[_0x7c78[416]][_0x7c78[440]]== null){LegendJSON[_0x7c78[416]][_0x7c78[440]]= _0x7c78[6]};LegendJSON[_0x7c78[416]][_0x7c78[441]]= localStorage[_0x7c78[3]](_0x7c78[441]);if(LegendJSON[_0x7c78[416]][_0x7c78[441]]== _0x7c78[4]|| LegendJSON[_0x7c78[416]][_0x7c78[441]]== null){LegendJSON[_0x7c78[416]][_0x7c78[441]]= _0x7c78[6]};LegendJSON[_0x7c78[416]][_0x7c78[442]]= localStorage[_0x7c78[3]](_0x7c78[442]);if(LegendJSON[_0x7c78[416]][_0x7c78[442]]== _0x7c78[4]|| LegendJSON[_0x7c78[416]][_0x7c78[442]]== null){LegendJSON[_0x7c78[416]][_0x7c78[442]]= _0x7c78[6]};LegendJSON[_0x7c78[416]][_0x7c78[443]]= localStorage[_0x7c78[3]](_0x7c78[443]);if(LegendJSON[_0x7c78[416]][_0x7c78[443]]== _0x7c78[4]|| LegendJSON[_0x7c78[416]][_0x7c78[443]]== null){LegendJSON[_0x7c78[416]][_0x7c78[443]]= _0x7c78[6]};LegendJSON[_0x7c78[416]][_0x7c78[444]]= localStorage[_0x7c78[3]](_0x7c78[444]);if(LegendJSON[_0x7c78[416]][_0x7c78[444]]== _0x7c78[4]|| LegendJSON[_0x7c78[416]][_0x7c78[444]]== null){LegendJSON[_0x7c78[416]][_0x7c78[444]]= _0x7c78[6]};LegendJSON[_0x7c78[416]][_0x7c78[445]]= localStorage[_0x7c78[3]](_0x7c78[445]);if(LegendJSON[_0x7c78[416]][_0x7c78[445]]== _0x7c78[4]|| LegendJSON[_0x7c78[416]][_0x7c78[445]]== null){LegendJSON[_0x7c78[416]][_0x7c78[445]]= _0x7c78[6]};LegendJSON[_0x7c78[416]][_0x7c78[446]]= localStorage[_0x7c78[3]](_0x7c78[446]);if(LegendJSON[_0x7c78[416]][_0x7c78[446]]== _0x7c78[4]|| LegendJSON[_0x7c78[416]][_0x7c78[446]]== null){LegendJSON[_0x7c78[416]][_0x7c78[446]]= _0x7c78[6]};LegendJSON[_0x7c78[416]][_0x7c78[447]]= localStorage[_0x7c78[3]](_0x7c78[447]);if(LegendJSON[_0x7c78[416]][_0x7c78[447]]== _0x7c78[4]|| LegendJSON[_0x7c78[416]][_0x7c78[447]]== null){LegendJSON[_0x7c78[416]][_0x7c78[447]]= _0x7c78[6]};LegendJSON[_0x7c78[416]][_0x7c78[448]]= localStorage[_0x7c78[3]](_0x7c78[448]);if(LegendJSON[_0x7c78[416]][_0x7c78[448]]== _0x7c78[4]|| LegendJSON[_0x7c78[416]][_0x7c78[448]]== null){LegendJSON[_0x7c78[416]][_0x7c78[448]]= _0x7c78[6]};LegendJSON[_0x7c78[416]][_0x7c78[449]]= localStorage[_0x7c78[3]](_0x7c78[449]);if(LegendJSON[_0x7c78[416]][_0x7c78[449]]== _0x7c78[4]|| LegendJSON[_0x7c78[416]][_0x7c78[449]]== null){LegendJSON[_0x7c78[416]][_0x7c78[449]]= _0x7c78[6]};LegendJSON[_0x7c78[416]][_0x7c78[450]]= localStorage[_0x7c78[3]](_0x7c78[450]);if(LegendJSON[_0x7c78[416]][_0x7c78[450]]== _0x7c78[4]|| LegendJSON[_0x7c78[416]][_0x7c78[450]]== null){LegendJSON[_0x7c78[416]][_0x7c78[450]]= _0x7c78[6]};LegendJSON[_0x7c78[416]][_0x7c78[451]]= localStorage[_0x7c78[3]](_0x7c78[451]);if(LegendJSON[_0x7c78[416]][_0x7c78[451]]== _0x7c78[4]|| LegendJSON[_0x7c78[416]][_0x7c78[451]]== null){LegendJSON[_0x7c78[416]][_0x7c78[451]]= _0x7c78[6]};LegendJSON[_0x7c78[416]][_0x7c78[452]]= localStorage[_0x7c78[3]](_0x7c78[452]);if(LegendJSON[_0x7c78[416]][_0x7c78[452]]== _0x7c78[4]|| LegendJSON[_0x7c78[416]][_0x7c78[452]]== null){LegendJSON[_0x7c78[416]][_0x7c78[452]]= _0x7c78[6]};LegendJSON[_0x7c78[416]][_0x7c78[453]]= localStorage[_0x7c78[3]](_0x7c78[453]);if(LegendJSON[_0x7c78[416]][_0x7c78[453]]== _0x7c78[4]|| LegendJSON[_0x7c78[416]][_0x7c78[453]]== null){LegendJSON[_0x7c78[416]][_0x7c78[453]]= _0x7c78[6]};LegendJSON[_0x7c78[416]][_0x7c78[454]]= localStorage[_0x7c78[3]](_0x7c78[454]);if(LegendJSON[_0x7c78[416]][_0x7c78[454]]== _0x7c78[4]|| LegendJSON[_0x7c78[416]][_0x7c78[454]]== null){LegendJSON[_0x7c78[416]][_0x7c78[454]]= _0x7c78[6]};LegendJSON[_0x7c78[416]][_0x7c78[455]]= localStorage[_0x7c78[3]](_0x7c78[455]);if(LegendJSON[_0x7c78[416]][_0x7c78[455]]== _0x7c78[4]|| LegendJSON[_0x7c78[416]][_0x7c78[455]]== null){LegendJSON[_0x7c78[416]][_0x7c78[455]]= _0x7c78[6]};LegendJSON[_0x7c78[416]][_0x7c78[456]]= localStorage[_0x7c78[3]](_0x7c78[456]);if(LegendJSON[_0x7c78[416]][_0x7c78[456]]== _0x7c78[4]|| LegendJSON[_0x7c78[416]][_0x7c78[456]]== null){LegendJSON[_0x7c78[416]][_0x7c78[456]]= _0x7c78[6]};LegendJSON[_0x7c78[416]][_0x7c78[457]]= localStorage[_0x7c78[3]](_0x7c78[457]);if(LegendJSON[_0x7c78[416]][_0x7c78[457]]== _0x7c78[4]|| LegendJSON[_0x7c78[416]][_0x7c78[457]]== null){LegendJSON[_0x7c78[416]][_0x7c78[457]]= _0x7c78[6]};LegendJSON[_0x7c78[416]][_0x7c78[458]]= localStorage[_0x7c78[3]](_0x7c78[458]);if(LegendJSON[_0x7c78[416]][_0x7c78[458]]== _0x7c78[4]|| LegendJSON[_0x7c78[416]][_0x7c78[458]]== null){LegendJSON[_0x7c78[416]][_0x7c78[458]]= _0x7c78[6]};LegendJSON[_0x7c78[416]][_0x7c78[459]]= localStorage[_0x7c78[3]](_0x7c78[459]);if(LegendJSON[_0x7c78[416]][_0x7c78[459]]== _0x7c78[4]|| LegendJSON[_0x7c78[416]][_0x7c78[459]]== null){LegendJSON[_0x7c78[416]][_0x7c78[459]]= _0x7c78[6]};LegendJSON[_0x7c78[416]][_0x7c78[460]]= localStorage[_0x7c78[3]](_0x7c78[460]);if(LegendJSON[_0x7c78[416]][_0x7c78[460]]== _0x7c78[4]|| LegendJSON[_0x7c78[416]][_0x7c78[460]]== null){LegendJSON[_0x7c78[416]][_0x7c78[460]]= _0x7c78[6]};LegendJSON[_0x7c78[416]][_0x7c78[461]]= localStorage[_0x7c78[3]](_0x7c78[461]);if(LegendJSON[_0x7c78[416]][_0x7c78[461]]== _0x7c78[4]|| LegendJSON[_0x7c78[416]][_0x7c78[461]]== null){LegendJSON[_0x7c78[416]][_0x7c78[461]]= _0x7c78[6]};LegendJSON[_0x7c78[416]][_0x7c78[462]]= localStorage[_0x7c78[3]](_0x7c78[462]);if(LegendJSON[_0x7c78[416]][_0x7c78[462]]== _0x7c78[4]|| LegendJSON[_0x7c78[416]][_0x7c78[462]]== null){LegendJSON[_0x7c78[416]][_0x7c78[462]]= _0x7c78[6]};LegendJSON[_0x7c78[416]][_0x7c78[463]]= localStorage[_0x7c78[3]](_0x7c78[463]);if(LegendJSON[_0x7c78[416]][_0x7c78[463]]== _0x7c78[4]|| LegendJSON[_0x7c78[416]][_0x7c78[463]]== null){LegendJSON[_0x7c78[416]][_0x7c78[463]]= _0x7c78[6]};LegendJSON[_0x7c78[416]][_0x7c78[464]]= localStorage[_0x7c78[3]](_0x7c78[464]);if(LegendJSON[_0x7c78[416]][_0x7c78[464]]== _0x7c78[4]|| LegendJSON[_0x7c78[416]][_0x7c78[464]]== null){LegendJSON[_0x7c78[416]][_0x7c78[464]]= _0x7c78[6]};LegendJSON[_0x7c78[416]][_0x7c78[465]]= localStorage[_0x7c78[3]](_0x7c78[465]);if(LegendJSON[_0x7c78[416]][_0x7c78[465]]== _0x7c78[4]|| LegendJSON[_0x7c78[416]][_0x7c78[465]]== null){LegendJSON[_0x7c78[416]][_0x7c78[465]]= _0x7c78[6]};LegendJSON[_0x7c78[416]][_0x7c78[466]]= localStorage[_0x7c78[3]](_0x7c78[466]);if(LegendJSON[_0x7c78[416]][_0x7c78[466]]== _0x7c78[4]|| LegendJSON[_0x7c78[416]][_0x7c78[466]]== null){LegendJSON[_0x7c78[416]][_0x7c78[466]]= _0x7c78[6]};LegendJSON[_0x7c78[416]][_0x7c78[467]]= localStorage[_0x7c78[3]](_0x7c78[467]);if(LegendJSON[_0x7c78[416]][_0x7c78[467]]== _0x7c78[4]|| LegendJSON[_0x7c78[416]][_0x7c78[467]]== null){LegendJSON[_0x7c78[416]][_0x7c78[467]]= _0x7c78[6]};return LegendJSON}function LegendSettingsImport(switcheryLegendSwitch2){if(switcheryLegendSwitch2[_0x7c78[414]]()){LegendJSON= JSON[_0x7c78[107]](document[_0x7c78[407]](_0x7c78[468])[_0x7c78[405]]);saveLegendJSONAPI();setTimeout(function(){$(_0x7c78[410])[_0x7c78[208]]()},100)}else {$(_0x7c78[410])[_0x7c78[208]]()}}function saveLegendJSONAPI(){if(LegendJSON[_0x7c78[416]]!= undefined){localStorage[_0x7c78[117]](_0x7c78[7],LegendJSON[_0x7c78[416]][_0x7c78[417]]);localStorage[_0x7c78[117]](_0x7c78[8],LegendJSON[_0x7c78[416]][_0x7c78[8]]);localStorage[_0x7c78[117]](_0x7c78[39],LegendJSON[_0x7c78[416]][_0x7c78[39]]);localStorage[_0x7c78[117]](_0x7c78[45],LegendJSON[_0x7c78[416]][_0x7c78[418]]);localStorage[_0x7c78[117]](_0x7c78[46],LegendJSON[_0x7c78[416]][_0x7c78[46]]);localStorage[_0x7c78[117]](_0x7c78[47],LegendJSON[_0x7c78[416]].SHOSHOBtn);localStorage[_0x7c78[117]](_0x7c78[48],LegendJSON[_0x7c78[416]].XPBtn);localStorage[_0x7c78[117]](_0x7c78[49],LegendJSON[_0x7c78[416]].MAINBTBtn);localStorage[_0x7c78[117]](_0x7c78[50],LegendJSON[_0x7c78[416]].AnimatedSkinBtn);localStorage[_0x7c78[117]](_0x7c78[51],LegendJSON[_0x7c78[416]].TIMEcalBtn);localStorage[_0x7c78[117]](_0x7c78[52],LegendJSON[_0x7c78[416]][_0x7c78[52]]);localStorage[_0x7c78[117]](_0x7c78[105],LegendJSON[_0x7c78[416]][_0x7c78[105]]);localStorage[_0x7c78[117]](_0x7c78[113],LegendJSON[_0x7c78[416]][_0x7c78[113]]);localStorage[_0x7c78[117]](_0x7c78[420],LegendJSON[_0x7c78[416]][_0x7c78[419]]);localStorage[_0x7c78[117]](_0x7c78[38],LegendJSON[_0x7c78[416]][_0x7c78[38]]);localStorage[_0x7c78[117]](_0x7c78[421],LegendJSON[_0x7c78[416]][_0x7c78[421]]);localStorage[_0x7c78[117]](_0x7c78[422],LegendJSON[_0x7c78[416]][_0x7c78[422]]);localStorage[_0x7c78[117]](_0x7c78[423],LegendJSON[_0x7c78[416]][_0x7c78[423]]);localStorage[_0x7c78[117]](_0x7c78[424],LegendJSON[_0x7c78[416]][_0x7c78[424]]);localStorage[_0x7c78[117]](_0x7c78[425],LegendJSON[_0x7c78[416]][_0x7c78[425]]);localStorage[_0x7c78[117]](_0x7c78[426],LegendJSON[_0x7c78[416]][_0x7c78[426]]);localStorage[_0x7c78[117]](_0x7c78[427],LegendJSON[_0x7c78[416]][_0x7c78[427]]);localStorage[_0x7c78[117]](_0x7c78[428],LegendJSON[_0x7c78[416]][_0x7c78[428]]);localStorage[_0x7c78[117]](_0x7c78[429],LegendJSON[_0x7c78[416]][_0x7c78[429]]);localStorage[_0x7c78[117]](_0x7c78[430],LegendJSON[_0x7c78[416]][_0x7c78[430]]);localStorage[_0x7c78[117]](_0x7c78[41],LegendJSON[_0x7c78[416]][_0x7c78[41]]);localStorage[_0x7c78[117]](_0x7c78[431],LegendJSON[_0x7c78[416]][_0x7c78[431]]);localStorage[_0x7c78[117]](_0x7c78[42],LegendJSON[_0x7c78[416]][_0x7c78[42]]);localStorage[_0x7c78[117]](_0x7c78[43],LegendJSON[_0x7c78[416]][_0x7c78[43]]);localStorage[_0x7c78[117]](_0x7c78[44],LegendJSON[_0x7c78[416]][_0x7c78[44]]);localStorage[_0x7c78[117]](_0x7c78[40],LegendJSON[_0x7c78[416]][_0x7c78[40]]);localStorage[_0x7c78[117]](_0x7c78[432],LegendJSON[_0x7c78[416]][_0x7c78[432]]);localStorage[_0x7c78[117]](_0x7c78[433],LegendJSON[_0x7c78[416]][_0x7c78[433]]);localStorage[_0x7c78[117]](_0x7c78[434],LegendJSON[_0x7c78[416]][_0x7c78[434]]);localStorage[_0x7c78[117]](_0x7c78[435],LegendJSON[_0x7c78[416]][_0x7c78[435]]);localStorage[_0x7c78[117]](_0x7c78[436],LegendJSON[_0x7c78[416]][_0x7c78[436]]);localStorage[_0x7c78[117]](_0x7c78[437],LegendJSON[_0x7c78[416]][_0x7c78[437]]);localStorage[_0x7c78[117]](_0x7c78[438],LegendJSON[_0x7c78[416]][_0x7c78[438]]);localStorage[_0x7c78[117]](_0x7c78[439],LegendJSON[_0x7c78[416]][_0x7c78[439]]);localStorage[_0x7c78[117]](_0x7c78[440],LegendJSON[_0x7c78[416]][_0x7c78[440]]);localStorage[_0x7c78[117]](_0x7c78[441],LegendJSON[_0x7c78[416]][_0x7c78[441]]);localStorage[_0x7c78[117]](_0x7c78[442],LegendJSON[_0x7c78[416]][_0x7c78[442]]);localStorage[_0x7c78[117]](_0x7c78[443],LegendJSON[_0x7c78[416]][_0x7c78[443]]);localStorage[_0x7c78[117]](_0x7c78[444],LegendJSON[_0x7c78[416]][_0x7c78[444]]);localStorage[_0x7c78[117]](_0x7c78[445],LegendJSON[_0x7c78[416]][_0x7c78[445]]);localStorage[_0x7c78[117]](_0x7c78[446],LegendJSON[_0x7c78[416]][_0x7c78[446]]);localStorage[_0x7c78[117]](_0x7c78[447],LegendJSON[_0x7c78[416]][_0x7c78[447]]);localStorage[_0x7c78[117]](_0x7c78[448],LegendJSON[_0x7c78[416]][_0x7c78[448]]);localStorage[_0x7c78[117]](_0x7c78[449],LegendJSON[_0x7c78[416]][_0x7c78[449]]);localStorage[_0x7c78[117]](_0x7c78[450],LegendJSON[_0x7c78[416]][_0x7c78[450]]);localStorage[_0x7c78[117]](_0x7c78[451],LegendJSON[_0x7c78[416]][_0x7c78[451]]);localStorage[_0x7c78[117]](_0x7c78[452],LegendJSON[_0x7c78[416]][_0x7c78[452]]);localStorage[_0x7c78[117]](_0x7c78[453],LegendJSON[_0x7c78[416]][_0x7c78[453]]);localStorage[_0x7c78[117]](_0x7c78[454],LegendJSON[_0x7c78[416]][_0x7c78[454]]);localStorage[_0x7c78[117]](_0x7c78[455],LegendJSON[_0x7c78[416]][_0x7c78[455]]);localStorage[_0x7c78[117]](_0x7c78[456],LegendJSON[_0x7c78[416]][_0x7c78[456]]);localStorage[_0x7c78[117]](_0x7c78[457],LegendJSON[_0x7c78[416]][_0x7c78[457]]);localStorage[_0x7c78[117]](_0x7c78[458],LegendJSON[_0x7c78[416]].Userscript1);localStorage[_0x7c78[117]](_0x7c78[459],LegendJSON[_0x7c78[416]].Userscript2);localStorage[_0x7c78[117]](_0x7c78[460],LegendJSON[_0x7c78[416]].Userscript3);localStorage[_0x7c78[117]](_0x7c78[461],LegendJSON[_0x7c78[416]].Userscript4);localStorage[_0x7c78[117]](_0x7c78[462],LegendJSON[_0x7c78[416]].Userscript5);localStorage[_0x7c78[117]](_0x7c78[463],LegendJSON[_0x7c78[416]].Userscripttexture1);localStorage[_0x7c78[117]](_0x7c78[464],LegendJSON[_0x7c78[416]].Userscripttexture2);localStorage[_0x7c78[117]](_0x7c78[465],LegendJSON[_0x7c78[416]].Userscripttexture3);localStorage[_0x7c78[117]](_0x7c78[466],LegendJSON[_0x7c78[416]].Userscripttexture4);localStorage[_0x7c78[117]](_0x7c78[467],LegendJSON[_0x7c78[416]].Userscripttexture5)}}function YoutubeEmbPlayer(_0x1499x109){var _0x1499x10a=getEmbedUrl(_0x1499x109[_0x7c78[158]]());if(_0x1499x10a== false){toastr[_0x7c78[173]](Premadeletter1)[_0x7c78[73]](_0x7c78[71],_0x7c78[267]);if(localStorage[_0x7c78[3]](_0x7c78[420])== null){$(_0x7c78[469])[_0x7c78[59]](defaultMusicUrl)}else {$(_0x7c78[469])[_0x7c78[59]](localStorage[_0x7c78[3]](_0x7c78[420]))}}else {$(_0x7c78[471])[_0x7c78[206]](_0x7c78[470],_0x1499x10a);localStorage[_0x7c78[117]](_0x7c78[420],_0x1499x109[_0x7c78[158]]())}}function MsgCommands1(MSGCOMMANDS,MSGNICK){if(MSGCOMMANDS[_0x7c78[55]](_0x7c78[472])){if($(_0x7c78[293])[_0x7c78[59]]()[_0x7c78[55]](_0x7c78[53])== false){$(_0x7c78[473])[_0x7c78[176]]();$(_0x7c78[474])[_0x7c78[176]]()};MSGCOMMANDS= MSGCOMMANDS[_0x7c78[190]](_0x7c78[472])[_0x7c78[475]]();MSGCOMMANDS= MSGCOMMANDS[_0x7c78[190]](_0x7c78[476])[0];if(MSGCOMMANDS[_0x7c78[55]](_0x7c78[477])== false&& MSGCOMMANDS[_0x7c78[55]](_0x7c78[477])== false&& MSGCOMMANDS[_0x7c78[55]](_0x7c78[478])== false&& MSGCOMMANDS[_0x7c78[55]](_0x7c78[479])== false){MSGCOMMANDS= _0x7c78[477]+ MSGCOMMANDS};toastr[_0x7c78[184]](Premadeletter22+ _0x7c78[481]+ MSGNICK+ _0x7c78[481]+ Premadeletter63+ _0x7c78[482]+ MSGCOMMANDS+ _0x7c78[483]+ MSGCOMMANDS+ _0x7c78[484]+ Premadeletter24+ _0x7c78[485]+ Premadeletter25+ _0x7c78[172],_0x7c78[6],{timeOut:20000,extendedTimeOut:20000})[_0x7c78[73]](_0x7c78[71],_0x7c78[480]);$(_0x7c78[487])[_0x7c78[208]](function(){window[_0x7c78[119]](MSGCOMMANDS,_0x7c78[486])})}else {if(MSGCOMMANDS[_0x7c78[55]](_0x7c78[488])){if($(_0x7c78[293])[_0x7c78[59]]()[_0x7c78[55]](_0x7c78[489])== false){$(_0x7c78[473])[_0x7c78[176]]();$(_0x7c78[474])[_0x7c78[176]]()};MSGCOMMANDS= MSGCOMMANDS[_0x7c78[190]](_0x7c78[488])[_0x7c78[475]]();MSGCOMMANDS= MSGCOMMANDS[_0x7c78[190]](_0x7c78[490])[0];if(MSGCOMMANDS!= _0x7c78[6]){toastr[_0x7c78[184]](Premadeletter22+ _0x7c78[481]+ MSGNICK+ _0x7c78[481]+ Premadeletter63a+ _0x7c78[491]+ MSGCOMMANDS+ _0x7c78[483]+ MSGCOMMANDS+ _0x7c78[492]+ Premadeletter24+ _0x7c78[485]+ Premadeletter25+ _0x7c78[172],_0x7c78[6],{timeOut:20000,extendedTimeOut:20000})[_0x7c78[73]](_0x7c78[71],_0x7c78[480]);$(_0x7c78[487])[_0x7c78[208]](function(){$(_0x7c78[493])[_0x7c78[59]](MSGCOMMANDS);$(_0x7c78[493])[_0x7c78[73]](_0x7c78[397],_0x7c78[494]);newsubmit()})}else {toastr[_0x7c78[184]](Premadeletter22+ _0x7c78[481]+ MSGNICK+ _0x7c78[481]+ Premadeletter63b+ _0x7c78[491]+ MSGCOMMANDS+ _0x7c78[483]+ MSGCOMMANDS+ _0x7c78[492]+ Premadeletter24+ _0x7c78[485]+ Premadeletter25+ _0x7c78[172],_0x7c78[6],{timeOut:20000,extendedTimeOut:20000})[_0x7c78[73]](_0x7c78[71],_0x7c78[480]);$(_0x7c78[487])[_0x7c78[208]](function(){$(_0x7c78[493])[_0x7c78[59]](MSGCOMMANDS);$(_0x7c78[493])[_0x7c78[73]](_0x7c78[397],_0x7c78[494]);newsubmit()})}}else {if(MSGCOMMANDS[_0x7c78[55]](_0x7c78[495])){if($(_0x7c78[293])[_0x7c78[59]]()[_0x7c78[55]](_0x7c78[496])== false){$(_0x7c78[473])[_0x7c78[176]]();$(_0x7c78[474])[_0x7c78[176]]()};MSGCOMMANDS= MSGCOMMANDS[_0x7c78[190]](_0x7c78[495])[_0x7c78[475]]();MSGCOMMANDS= MSGCOMMANDS[_0x7c78[190]](_0x7c78[497])[0];if(MSGCOMMANDS[_0x7c78[55]](_0x7c78[477])== false&& MSGCOMMANDS[_0x7c78[55]](_0x7c78[477])== false&& MSGCOMMANDS[_0x7c78[55]](_0x7c78[479])== false&& MSGCOMMANDS[_0x7c78[55]](_0x7c78[479])== false){MSGCOMMANDS= _0x7c78[477]+ MSGCOMMANDS};toastr[_0x7c78[184]](Premadeletter22+ _0x7c78[481]+ MSGNICK+ _0x7c78[481]+ Premadeletter64+ _0x7c78[482]+ MSGCOMMANDS+ _0x7c78[483]+ MSGCOMMANDS+ _0x7c78[498]+ getParameterByName(_0x7c78[160],MSGCOMMANDS)+ _0x7c78[499]+ Premadeletter24+ _0x7c78[500]+ Premadeletter25+ _0x7c78[172],_0x7c78[6],{timeOut:20000,extendedTimeOut:20000})[_0x7c78[73]](_0x7c78[71],_0x7c78[169]);$(_0x7c78[501])[_0x7c78[208]](function(){YoutubeEmbPlayer(MSGCOMMANDS);$(_0x7c78[469])[_0x7c78[59]](MSGCOMMANDS);playYoutube()})}else {if(MSGCOMMANDS[_0x7c78[55]](_0x7c78[502])){if($(_0x7c78[293])[_0x7c78[59]]()[_0x7c78[55]](_0x7c78[503])== false){$(_0x7c78[473])[_0x7c78[176]]();$(_0x7c78[474])[_0x7c78[176]]()};MSGCOMMANDS= MSGCOMMANDS[_0x7c78[190]](_0x7c78[502])[_0x7c78[475]]();MSGCOMMANDS= MSGCOMMANDS[_0x7c78[190]](_0x7c78[504])[0];if(MSGCOMMANDS[_0x7c78[55]](_0x7c78[477])== false&& MSGCOMMANDS[_0x7c78[55]](_0x7c78[477])== false&& MSGCOMMANDS[_0x7c78[55]](_0x7c78[478])== false&& MSGCOMMANDS[_0x7c78[55]](_0x7c78[479])== false){MSGCOMMANDS= _0x7c78[477]+ MSGCOMMANDS};if(MSGCOMMANDS[_0x7c78[55]](_0x7c78[505])){toastr[_0x7c78[184]](_0x7c78[506]+ Premadeletter22+ _0x7c78[481]+ MSGNICK+ _0x7c78[481]+ Premadeletter65+ _0x7c78[482]+ MSGCOMMANDS+ _0x7c78[483]+ MSGCOMMANDS+ _0x7c78[484]+ Premadeletter24+ _0x7c78[485]+ Premadeletter25+ _0x7c78[172],_0x7c78[6],{timeOut:10000,extendedTimeOut:10000})[_0x7c78[73]](_0x7c78[71],_0x7c78[169]);$(_0x7c78[487])[_0x7c78[208]](function(){window[_0x7c78[119]](MSGCOMMANDS,_0x7c78[486])})}}else {if(MSGCOMMANDS[_0x7c78[55]](_0x7c78[507])){if($(_0x7c78[293])[_0x7c78[59]]()[_0x7c78[55]](_0x7c78[508])== false){$(_0x7c78[473])[_0x7c78[176]]();$(_0x7c78[474])[_0x7c78[176]]()};MSGCOMMANDS= MSGCOMMANDS[_0x7c78[190]](_0x7c78[507])[_0x7c78[475]]();MSGCOMMANDS= MSGCOMMANDS[_0x7c78[190]](_0x7c78[509])[0];if(MSGCOMMANDS[_0x7c78[55]](_0x7c78[477])== false&& MSGCOMMANDS[_0x7c78[55]](_0x7c78[477])== false&& MSGCOMMANDS[_0x7c78[55]](_0x7c78[479])== false&& MSGCOMMANDS[_0x7c78[55]](_0x7c78[479])== false){MSGCOMMANDS= _0x7c78[477]+ MSGCOMMANDS};if(MSGCOMMANDS[_0x7c78[55]](_0x7c78[510])|| MSGCOMMANDS[_0x7c78[55]](_0x7c78[511])|| MSGCOMMANDS[_0x7c78[55]](_0x7c78[512])){toastr[_0x7c78[184]](_0x7c78[513]+ Premadeletter22+ _0x7c78[481]+ MSGNICK+ _0x7c78[481]+ Premadeletter66+ _0x7c78[482]+ MSGCOMMANDS+ _0x7c78[483]+ MSGCOMMANDS+ _0x7c78[484]+ Premadeletter24+ _0x7c78[485]+ Premadeletter25+ _0x7c78[172],_0x7c78[6],{timeOut:20000,extendedTimeOut:20000})[_0x7c78[73]](_0x7c78[71],_0x7c78[169]);$(_0x7c78[487])[_0x7c78[208]](function(){window[_0x7c78[119]](MSGCOMMANDS,_0x7c78[486])})}}else {if(MSGCOMMANDS[_0x7c78[55]](_0x7c78[514])){playerMsg= getParameterByName(_0x7c78[94],MSGCOMMANDS);commandMsg= getParameterByName(_0x7c78[515],MSGCOMMANDS);otherMsg= getParameterByName(_0x7c78[516],MSGCOMMANDS);$(_0x7c78[473])[_0x7c78[176]]();$(_0x7c78[474])[_0x7c78[176]]();if(commandMsg== _0x7c78[517]){$(_0x7c78[520])[_0x7c78[73]](_0x7c78[518],_0x7c78[519])[_0x7c78[73]]({opacity:0.8});setTimeout(function(){$(_0x7c78[520])[_0x7c78[73]](_0x7c78[518],_0x7c78[521])[_0x7c78[73]]({opacity:1})},12000)}else {if(commandMsg== _0x7c78[522]){if($(_0x7c78[524])[_0x7c78[73]](_0x7c78[523])== _0x7c78[525]){if($(_0x7c78[493])[_0x7c78[59]]()!= _0x7c78[6]){var _0x1499x10c=$(_0x7c78[293])[_0x7c78[59]]();$(_0x7c78[293])[_0x7c78[59]](_0x7c78[526]);$(_0x7c78[527])[_0x7c78[87]]();newsubmit();setTimeout(function(){$(_0x7c78[293])[_0x7c78[59]](_0x1499x10c);$(_0x7c78[527])[_0x7c78[87]]();newsubmit()},5000)}}}else {if(commandMsg== _0x7c78[528]){toastr[_0x7c78[184]](Premadeletter22+ _0x7c78[481]+ playerMsg+ _0x7c78[481]+ Premadeletter23+ _0x7c78[529]+ Premadeletter24+ _0x7c78[530]+ Premadeletter25+ _0x7c78[172],_0x7c78[6],{timeOut:20000,extendedTimeOut:20000})[_0x7c78[73]](_0x7c78[71],_0x7c78[267]);$(_0x7c78[532])[_0x7c78[208]](function(){$(_0x7c78[531])[_0x7c78[208]]()})}else {if(commandMsg== _0x7c78[533]){toastr[_0x7c78[184]](Premadeletter22+ _0x7c78[481]+ playerMsg+ _0x7c78[481]+ Premadeletter26+ _0x7c78[273]+ playerMsg+ _0x7c78[534]+ Premadeletter24+ _0x7c78[535]+ Premadeletter25+ _0x7c78[172],_0x7c78[6],{timeOut:20000,extendedTimeOut:20000})[_0x7c78[73]](_0x7c78[71],_0x7c78[267]);$(_0x7c78[536])[_0x7c78[208]](function(){$(_0x7c78[293])[_0x7c78[59]](playerMsg);$(_0x7c78[527])[_0x7c78[87]]();newsubmit()})}else {if(commandMsg== _0x7c78[537]){toastr[_0x7c78[184]](Premadeletter22+ _0x7c78[481]+ playerMsg+ _0x7c78[481]+ Premadeletter27+ _0x7c78[538]+ Premadeletter24+ _0x7c78[539]+ Premadeletter25+ _0x7c78[172],_0x7c78[6],{timeOut:20000,extendedTimeOut:20000})[_0x7c78[73]](_0x7c78[71],_0x7c78[267]);$(_0x7c78[540])[_0x7c78[208]](function(){settrolling()})}else {if(commandMsg== _0x7c78[541]){toastr[_0x7c78[184]](Premadeletter22+ _0x7c78[481]+ playerMsg+ _0x7c78[481]+ Premadeletter28+ _0x7c78[542]+ Premadeletter24+ _0x7c78[543]+ Premadeletter25+ _0x7c78[172],_0x7c78[6],{timeOut:20000,extendedTimeOut:20000})[_0x7c78[73]](_0x7c78[71],_0x7c78[267]);$(_0x7c78[546])[_0x7c78[208]](function(){$(_0x7c78[544])[_0x7c78[208]]();setTimeout(function(){$(_0x7c78[544])[_0x7c78[545]]()},100)})}}}}}}}else {if(MSGCOMMANDS[_0x7c78[55]](_0x7c78[547])){commandMsg= getParameterByName(_0x7c78[515],MSGCOMMANDS);otherMsg= getParameterByName(_0x7c78[516],MSGCOMMANDS);$(_0x7c78[473])[_0x7c78[176]]();$(_0x7c78[474])[_0x7c78[176]]();LegendClanSymbol= $(_0x7c78[293])[_0x7c78[59]]();console[_0x7c78[283]](_0x7c78[548]);if(~LegendClanSymbol[_0x7c78[179]](_0x7c78[549])!= -1){console[_0x7c78[283]](_0x7c78[550]);if(commandMsg== _0x7c78[551]){setTimeout(function(){$(_0x7c78[295])[_0x7c78[208]]()},60000)}else {if(commandMsg== _0x7c78[552]){$(_0x7c78[295])[_0x7c78[208]]()}else {$(_0x7c78[295])[_0x7c78[208]]()}}}}else {if(MSGCOMMANDS[_0x7c78[55]](_0x7c78[553])){if($(_0x7c78[293])[_0x7c78[59]]()[_0x7c78[55]](_0x7c78[554])== false){$(_0x7c78[473])[_0x7c78[176]]();$(_0x7c78[474])[_0x7c78[176]]()};MSGCOMMANDS= MSGCOMMANDS[_0x7c78[190]](_0x7c78[553])[_0x7c78[475]]();MSGCOMMANDS= MSGCOMMANDS[_0x7c78[190]](_0x7c78[555])[0];var _0x1499x10d=MSGCOMMANDS[_0x7c78[190]](_0x7c78[556]);window[_0x7c78[557]]= _0x1499x10d[0];window[_0x7c78[558]]= _0x1499x10d[1];window[_0x7c78[559]]= parseFloat(window[_0x7c78[557]])- legendmod[_0x7c78[560]];window[_0x7c78[561]]= parseFloat(window[_0x7c78[558]])- legendmod[_0x7c78[562]];legendmod[_0x7c78[563]]= true;toastr[_0x7c78[184]](_0x7c78[564]+ MSGNICK+ _0x7c78[565]+ application[_0x7c78[566]](window[_0x7c78[559]],window[_0x7c78[561]],true))[_0x7c78[73]](_0x7c78[71],_0x7c78[267])}else {if(MSGCOMMANDS[_0x7c78[55]](_0x7c78[567])){if($(_0x7c78[293])[_0x7c78[59]]()[_0x7c78[55]](_0x7c78[568])== false){$(_0x7c78[473])[_0x7c78[176]]();$(_0x7c78[474])[_0x7c78[176]]()};MSGCOMMANDS= MSGCOMMANDS[_0x7c78[190]](_0x7c78[567])[_0x7c78[475]]();MSGCOMMANDS= MSGCOMMANDS[_0x7c78[190]](_0x7c78[569])[0];var _0x1499x10d=MSGCOMMANDS[_0x7c78[190]](_0x7c78[556]);window[_0x7c78[557]]= _0x1499x10d[0];window[_0x7c78[558]]= _0x1499x10d[1];window[_0x7c78[559]]= parseFloat(window[_0x7c78[557]])- legendmod[_0x7c78[560]];window[_0x7c78[561]]= parseFloat(window[_0x7c78[558]])- legendmod[_0x7c78[562]];legendmod[_0x7c78[563]]= true;toastr[_0x7c78[184]](_0x7c78[564]+ MSGNICK+ _0x7c78[570]+ application[_0x7c78[566]](window[_0x7c78[559]],window[_0x7c78[561]],true))[_0x7c78[73]](_0x7c78[71],_0x7c78[267])}else {if(MSGCOMMANDS[_0x7c78[55]](_0x7c78[571])){if($(_0x7c78[293])[_0x7c78[59]]()[_0x7c78[55]](_0x7c78[572])== false){$(_0x7c78[473])[_0x7c78[176]]();$(_0x7c78[474])[_0x7c78[176]]()};MSGCOMMANDS= MSGCOMMANDS[_0x7c78[190]](_0x7c78[571])[_0x7c78[475]]();MSGCOMMANDS= MSGCOMMANDS[_0x7c78[190]](_0x7c78[573])[0];var _0x1499x10d=MSGCOMMANDS[_0x7c78[190]](_0x7c78[556]);window[_0x7c78[557]]= _0x1499x10d[0];window[_0x7c78[558]]= _0x1499x10d[1];window[_0x7c78[559]]= parseFloat(window[_0x7c78[557]])- legendmod[_0x7c78[560]];window[_0x7c78[561]]= parseFloat(window[_0x7c78[558]])- legendmod[_0x7c78[562]];legendmod[_0x7c78[563]]= true;toastr[_0x7c78[184]](_0x7c78[564]+ MSGNICK+ _0x7c78[574]+ application[_0x7c78[566]](window[_0x7c78[559]],window[_0x7c78[561]],true))[_0x7c78[73]](_0x7c78[71],_0x7c78[267])}}}}}}}}}}}function isLegendExpress(Express){if(messageone!= _0x7c78[101]&& messageone!= _0x7c78[575]){return Express= _0x7c78[576]}else {return Express= _0x7c78[114]}}function MsgServCommandsreturner2(MSGCOMMANDS2a){return MSGCOMMANDS2a}function MsgServCommandsreturner(){MSGCOMMANDS2= MSGCOMMANDS;MSGCOMMANDS3= MSGCOMMANDS;MSGCOMMANDS2= MSGCOMMANDS2[_0x7c78[190]](_0x7c78[577])[_0x7c78[475]]();MSGCOMMANDS2= MSGCOMMANDS2[_0x7c78[190]](_0x7c78[578])[0];if(MSGCOMMANDS2[_0x7c78[55]](_0x7c78[477])== false&& MSGCOMMANDS2[_0x7c78[55]](_0x7c78[477])== false&& MSGCOMMANDS2[_0x7c78[55]](_0x7c78[478])== false&& MSGCOMMANDS2[_0x7c78[55]](_0x7c78[479])== false){MSGCOMMANDS2= _0x7c78[477]+ MSGCOMMANDS2};if(MSGCOMMANDS2[_0x7c78[55]](_0x7c78[249])){MSGCOMMANDS2a= MSGCOMMANDS2;MsgServCommandsreturner2(MSGCOMMANDS2a);MSGCOMMANDSA= _0x7c78[579]+ MSGCOMMANDS2a[_0x7c78[190]](_0x7c78[579])[_0x7c78[475]]();toastr[_0x7c78[184]](_0x7c78[580]+ Premadeletter22+ _0x7c78[481]+ MSGNICK+ _0x7c78[481]+ Premadeletter67+ _0x7c78[581]+ MSGCOMMANDSA+ _0x7c78[582]+ Premadeletter24+ _0x7c78[485]+ Premadeletter25+ _0x7c78[583],_0x7c78[6],{timeOut:10000,extendedTimeOut:10000})[_0x7c78[73]](_0x7c78[71],_0x7c78[169])}else {if(getParameterByName(_0x7c78[89],MSGCOMMANDS2a)!= null){var _0x1499x111,_0x1499x112;if(getParameterByName(_0x7c78[93],MSGCOMMANDS)== null){_0x1499x112= _0x7c78[584]}else {_0x1499x112= getParameterByName(_0x7c78[93],MSGCOMMANDS)};if(getParameterByName(_0x7c78[585],MSGCOMMANDS)== null){_0x1499x111= _0x7c78[586]}else {_0x1499x111= getParameterByName(_0x7c78[585],MSGCOMMANDS)};toastr[_0x7c78[184]](_0x7c78[580]+ Premadeletter22+ _0x7c78[481]+ MSGNICK+ _0x7c78[481]+ Premadeletter67+ _0x7c78[587]+ getParameterByName(_0x7c78[92],MSGCOMMANDS)[_0x7c78[168]](_0x7c78[212],_0x7c78[6])[_0x7c78[168]](_0x7c78[214],_0x7c78[6])+ _0x7c78[588]+ _0x1499x111+ _0x7c78[589]+ getParameterByName(_0x7c78[89],MSGCOMMANDS)+ _0x7c78[590]+ _0x1499x112+ _0x7c78[591]+ Premadeletter24+ _0x7c78[485]+ Premadeletter25+ _0x7c78[583],_0x7c78[6],{timeOut:10000,extendedTimeOut:10000})[_0x7c78[73]](_0x7c78[71],_0x7c78[169])}else {var _0x1499x112;if(getParameterByName(_0x7c78[93],MSGCOMMANDS)== null){_0x1499x112= _0x7c78[584]}else {_0x1499x112= getParameterByName(_0x7c78[93],MSGCOMMANDS)};toastr[_0x7c78[184]](_0x7c78[580]+ Premadeletter22+ _0x7c78[481]+ MSGNICK+ _0x7c78[481]+ Premadeletter67+ _0x7c78[587]+ getParameterByName(_0x7c78[92],MSGCOMMANDS)[_0x7c78[168]](_0x7c78[212],_0x7c78[6])[_0x7c78[168]](_0x7c78[214],_0x7c78[6])+ _0x7c78[590]+ _0x1499x112+ _0x7c78[582]+ Premadeletter24+ _0x7c78[485]+ Premadeletter25+ _0x7c78[583],_0x7c78[6],{timeOut:10000,extendedTimeOut:10000})[_0x7c78[73]](_0x7c78[71],_0x7c78[169])}};return MSGCOMMANDS,MSGCOMMANDS2,MSGCOMMANDS2a,MSGCOMMANDSA,MSGCOMMANDS3}function universalchat(){setTimeout(function(){if(application){application[_0x7c78[592]]()}},2000);var legbgpic=$(_0x7c78[103])[_0x7c78[59]]();var legbgcolor=$(_0x7c78[102])[_0x7c78[59]]();window[_0x7c78[593]]= [];var _0x1499x114=window;var _0x1499x115={"\x6E\x61\x6D\x65":_0x7c78[594],"\x6C\x6F\x67":function(_0x1499x116){if(($(_0x7c78[597])[_0x7c78[596]](_0x7c78[595])== false)){if(~_0x1499x116[_0x7c78[179]](_0x7c78[598])){if(~_0x1499x116[_0x7c78[179]](_0x7c78[599])){}else {toastr[_0x7c78[270]](_0x7c78[600]+ this[_0x7c78[601]]+ _0x7c78[602]+ _0x1499x116+ _0x7c78[603])}}else {if(~_0x1499x116[_0x7c78[179]](Premadeletter109b+ _0x7c78[604])){toastr[_0x7c78[184]](_0x7c78[600]+ this[_0x7c78[601]]+ _0x7c78[602]+ _0x1499x116+ _0x7c78[603])}else {if(~_0x1499x116[_0x7c78[179]](_0x7c78[605])){toastr[_0x7c78[184]](_0x7c78[600]+ this[_0x7c78[601]]+ _0x7c78[602]+ _0x1499x116+ _0x7c78[603])}else {if(~_0x1499x116[_0x7c78[179]]($(_0x7c78[293])[_0x7c78[59]]()+ _0x7c78[239])){if(window[_0x7c78[606]]){toastr[_0x7c78[270]](_0x7c78[600]+ this[_0x7c78[601]]+ _0x7c78[602]+ _0x1499x116+ _0x7c78[603]);playSound($(_0x7c78[607])[_0x7c78[59]]())}else {}}else {if(~_0x1499x116[_0x7c78[179]](_0x7c78[608])){}else {if(~_0x1499x116[_0x7c78[179]](_0x7c78[189])){_0x1499x116[_0x7c78[181]](1);toastr[_0x7c78[184]](_0x7c78[600]+ this[_0x7c78[601]]+ _0x7c78[602]+ _0x1499x116+ _0x7c78[603]);playSound($(_0x7c78[609])[_0x7c78[59]]())}else {toastr[_0x7c78[270]](_0x7c78[600]+ this[_0x7c78[601]]+ _0x7c78[602]+ _0x1499x116+ _0x7c78[603]);playSound($(_0x7c78[607])[_0x7c78[59]]())}}}}}}}},"\x74\x6F\x6F\x6C\x5F\x73\x79\x6D\x62\x6F\x6C":_0x7c78[6]};_0x7c78[610];var _0x1499x117={"\x41\x67\x61\x72\x54\x6F\x6F\x6C\x56\x65\x72\x73\x69\x6F\x6E":5,"\x41\x67\x61\x72\x54\x6F\x6F\x6C\x53\x65\x72\x76\x65\x72":_0x7c78[611],minimapBalls:{},"\x73\x6F\x63\x6B\x65\x74\x49\x6F\x55\x52\x4C":_0x7c78[612],"\x6D\x69\x6E\x69\x6D\x61\x70\x4E\x69\x63\x6B\x46\x6F\x6E\x74":_0x7c78[613],"\x6D\x69\x6E\x69\x6D\x61\x70\x4E\x69\x63\x6B\x43\x6F\x6C\x6F\x72":_0x7c78[614],"\x6D\x69\x6E\x69\x6D\x61\x70\x4E\x69\x63\x6B\x53\x74\x72\x6F\x6B\x65\x43\x6F\x6C\x6F\x72":_0x7c78[615],"\x6D\x69\x6E\x69\x6D\x61\x70\x4E\x69\x63\x6B\x53\x74\x72\x6F\x6B\x65\x53\x69\x7A\x65":2,"\x6D\x69\x6E\x69\x6D\x61\x70\x54\x6F\x70":24,"\x6D\x69\x6E\x69\x6D\x61\x70\x54\x65\x61\x6D\x6D\x61\x74\x65\x73\x53\x69\x7A\x65":5.5,"\x6D\x69\x6E\x69\x6D\x61\x70\x4F\x66\x66\x73\x65\x74\x58":71,"\x6D\x61\x70\x53\x69\x7A\x65":14142,"\x6D\x61\x70\x4F\x66\x66\x73\x65\x74":7071,"\x70\x69\x32":2* Math[_0x7c78[616]],"\x6D\x65\x73\x73\x61\x67\x65\x42\x6F\x78\x42\x6F\x74\x74\x6F\x6D":[_0x7c78[617],_0x7c78[618]],"\x6B\x65\x79\x43\x6F\x64\x65\x45\x6E\x74\x65\x72":13,"\x6B\x65\x79\x43\x6F\x64\x65\x41":65,"\x6B\x65\x79\x43\x6F\x64\x65\x52":82};var _0x1499x118={};var _0x1499x119={"\x75\x73\x65\x72\x5F\x73\x68\x6F\x77":true,"\x6D\x69\x6E\x69\x6D\x61\x70\x5F\x73\x68\x6F\x77":true,"\x74\x67\x61\x72\x5F\x70\x72\x65\x66\x69\x78":_0x7c78[619],"\x74\x67\x61\x72\x5F\x63\x6F\x6C\x6F\x72":_0x7c78[620],"\x75\x70\x64\x61\x74\x65\x5F\x69\x6E\x74\x65\x72\x76\x61\x6C":1000,"\x6F\x67\x61\x72\x5F\x75\x73\x65\x72":true,"\x6F\x67\x61\x72\x5F\x70\x72\x65\x66\x69\x78":_0x7c78[621],"\x6C\x6D\x73\x61\x5F\x74\x65\x61\x6D\x74\x6F\x70":false,"\x6C\x6D\x73\x61\x5F\x63\x68\x61\x74":false,"\x63\x68\x61\x74\x5F\x63\x6C\x6F\x73\x65":false,"\x63\x68\x61\x74\x5F\x75\x6E\x70\x61\x75\x73\x65":true,"\x63\x68\x61\x74\x5F\x76\x63\x65\x6E\x74\x65\x72":false,"\x63\x68\x61\x74\x5F\x61\x6C\x74":true,"\x63\x68\x61\x74\x5F\x63\x74\x72\x6C\x61\x6C\x74":true,"\x63\x68\x61\x74\x5F\x63\x74\x72\x6C":true,"\x73\x6B\x69\x6E\x5F\x74\x6F\x67\x67\x6C\x65\x5F\x61\x75\x74\x6F":false,"\x73\x6B\x69\x6E\x5F\x74\x6F\x67\x67\x6C\x65\x5F\x69\x6E\x74\x65\x72\x76\x61\x6C":10000};function _0x1499x11a(){if(!document[_0x7c78[407]](_0x7c78[622])){_0x1499x115[_0x7c78[623]]= (_0x1499x115[_0x7c78[623]]|| 1000)+ 1000;setTimeout(_0x1499x11a,_0x1499x115[_0x7c78[623]]);_0x1499x115[_0x7c78[283]](_0x7c78[624]);return};setTimeout(_0x1499x11b,1000)}_0x1499x11a();function _0x1499x11b(){$[_0x7c78[628]](_0x1499x118,_0x1499x119,JSON[_0x7c78[107]](_0x1499x115[_0x7c78[627]](_0x7c78[625],_0x7c78[626])));_0x1499x114[_0x7c78[629]]= {my:_0x1499x115,stat:_0x1499x117,cfg:_0x1499x118};var _0x1499x11c=_0x7c78[6];_0x1499x11c+= _0x7c78[630];_0x1499x11c+= _0x7c78[631];_0x1499x11c+= _0x7c78[632];_0x1499x11c+= _0x7c78[633];_0x1499x11c+= _0x7c78[634];_0x1499x11c+= _0x7c78[632];_0x1499x11c+= _0x7c78[635];_0x1499x11c+= _0x7c78[636];_0x1499x11c+= _0x7c78[637]+ legbgpic+ _0x7c78[305]+ legbgcolor+ _0x7c78[638];_0x1499x11c+= _0x7c78[639];_0x1499x11c+= _0x7c78[632];_0x1499x11c+= _0x7c78[640];_0x1499x11c+= _0x7c78[641];_0x1499x11c+= _0x7c78[642];_0x1499x11c+= _0x7c78[632];_0x1499x11c+= _0x7c78[643];_0x1499x11c+= _0x7c78[644];_0x1499x11c+= _0x7c78[632];$(_0x7c78[647])[_0x7c78[279]](_0x7c78[645]+ _0x1499x11c+ _0x7c78[646]);$(_0x7c78[520])[_0x7c78[279]](_0x7c78[6]+ _0x7c78[648]+ _0x7c78[649]+ _0x7c78[650]+ _0x7c78[651]+ _0x7c78[652]);$(_0x7c78[657])[_0x7c78[208]](function(_0x1499x11d){_0x1499x117[_0x7c78[653]]= !_0x1499x117[_0x7c78[653]];if(_0x1499x117[_0x7c78[653]]){if(_0x1499x114[_0x7c78[654]]){$(_0x7c78[657])[_0x7c78[247]](_0x7c78[656])[_0x7c78[245]](_0x7c78[655]);$(_0x7c78[657])[_0x7c78[281]](_0x7c78[658])}else {$(_0x7c78[657])[_0x7c78[247]](_0x7c78[656])[_0x7c78[245]](_0x7c78[655]);$(_0x7c78[657])[_0x7c78[281]](_0x7c78[658])};_0x1499x115[_0x7c78[659]]()}else {$(_0x7c78[657])[_0x7c78[247]](_0x7c78[655])[_0x7c78[245]](_0x7c78[656]);$(_0x7c78[657])[_0x7c78[281]](_0x7c78[660]);_0x1499x115[_0x7c78[661]]()}});$(_0x7c78[657])[_0x7c78[665]](function(){$(_0x7c78[657])[_0x7c78[73]](_0x7c78[662],$(_0x7c78[664])[_0x7c78[59]]());return clickedname= _0x7c78[99]})[_0x7c78[663]](function(){$(_0x7c78[657])[_0x7c78[73]](_0x7c78[662],_0x7c78[6])});$(_0x7c78[666])[_0x7c78[665]](function(){$(_0x7c78[666])[_0x7c78[73]](_0x7c78[662],$(_0x7c78[664])[_0x7c78[59]]());return clickedname= _0x7c78[99]})[_0x7c78[663]](function(){$(_0x7c78[666])[_0x7c78[73]](_0x7c78[662],_0x7c78[6])});$(_0x7c78[666])[_0x7c78[208]](_0x1499x115[_0x7c78[625]]);if(_0x1499x118[_0x7c78[667]]){$(_0x7c78[520])[_0x7c78[668]](function(){return false})}else {$(_0x7c78[669])[_0x7c78[668]](function(_0x1499x11d){return false})};if(_0x1499x118[_0x7c78[670]]){$(_0x7c78[524])[_0x7c78[668]](function(){return false})};if(_0x1499x118[_0x7c78[671]]){$(_0x7c78[673])[_0x7c78[279]](_0x7c78[672]);$(_0x7c78[675])[_0x7c78[208]](function(){_0x1499x115[_0x7c78[674]]()})};if(_0x1499x118[_0x7c78[676]]){$(_0x7c78[524])[_0x7c78[73]](_0x7c78[677],_0x1499x117[_0x7c78[678]][1])};$(_0x7c78[693])[_0x7c78[692]](function(_0x1499x11d){var _0x1499x11e=(_0x1499x11d[_0x7c78[679]]?_0x7c78[198]:_0x7c78[6])+ (_0x1499x11d[_0x7c78[680]]?_0x7c78[681]:_0x7c78[6])+ (_0x1499x11d[_0x7c78[682]]?_0x7c78[90]:_0x7c78[6])+ (_0x1499x11d[_0x7c78[683]]?_0x7c78[684]:_0x7c78[6]);if(_0x1499x11d[_0x7c78[685]]=== _0x1499x117[_0x7c78[686]]){if(_0x1499x11e=== _0x7c78[198]&& _0x1499x118[_0x7c78[687]]){_0x1499x115[_0x7c78[688]]();return false}else {if(_0x1499x11e=== _0x7c78[689]&& _0x1499x118[_0x7c78[690]]){_0x1499x115[_0x7c78[688]]({"\x6F\x67\x61\x72":true});return false}else {if(_0x1499x11e=== _0x7c78[681]&& _0x1499x118[_0x7c78[691]]){_0x1499x115[_0x7c78[674]]();return false}}}}});_0x1499x115[_0x7c78[694]]();$(_0x7c78[696])[_0x7c78[695]]()}_0x1499x115[_0x7c78[659]]= function(){if($(_0x7c78[697])[_0x7c78[140]]){$(_0x7c78[697])[_0x7c78[87]]();$(_0x7c78[698])[_0x7c78[87]]()}else {_0x1499x115[_0x7c78[699]]()};_0x1499x117[_0x7c78[489]]= $(_0x7c78[493])[_0x7c78[59]]();_0x1499x117[_0x7c78[372]]= $(_0x7c78[293])[_0x7c78[59]]();_0x1499x117[_0x7c78[700]]= $(_0x7c78[213])[_0x7c78[59]]();_0x1499x117[_0x7c78[701]]= _0x7c78[702]+ _0x1499x117[_0x7c78[700]]+ _0x7c78[703];_0x1499x115[_0x7c78[704]]();_0x1499x117[_0x7c78[705]]= setInterval(_0x1499x115[_0x7c78[706]],_0x1499x118[_0x7c78[707]])};_0x1499x115[_0x7c78[661]]= function(){$(_0x7c78[697])[_0x7c78[61]]();$(_0x7c78[708])[_0x7c78[281]](_0x7c78[6]);$(_0x7c78[698])[_0x7c78[61]]();_0x1499x115[_0x7c78[709]]();clearInterval(_0x1499x117[_0x7c78[705]]);_0x1499x117[_0x7c78[705]]= null};_0x1499x115[_0x7c78[699]]= function(){$(_0x7c78[673])[_0x7c78[713]](_0x7c78[710]+ _0x1499x115[_0x7c78[711]]+ _0x7c78[712]);$(_0x7c78[697])[_0x7c78[208]](_0x1499x115[_0x7c78[688]]);var _0x1499x11f=$(_0x7c78[714]);var _0x1499x120=_0x1499x11f[_0x7c78[206]](_0x7c78[71]);var _0x1499x121=_0x1499x11f[_0x7c78[206]](_0x7c78[715]);_0x1499x11f[_0x7c78[128]](_0x7c78[716]+ _0x7c78[717]+ _0x7c78[718]+ _0x1499x120+ _0x7c78[719]+ _0x1499x121+ _0x7c78[720])};_0x1499x115[_0x7c78[688]]= function(_0x1499x122){var _0x1499x123=_0x1499x122|| {};if(!_0x1499x117[_0x7c78[655]]){if($(_0x7c78[657])[_0x7c78[721]](_0x7c78[655])){_0x1499x114[_0x7c78[723]][_0x7c78[173]](_0x7c78[722]);return}};var _0x1499x116=_0x7c78[608]+ $(_0x7c78[693])[_0x7c78[59]]();var _0x1499x124=$(_0x7c78[693])[_0x7c78[59]]();if(_0x1499x124[_0x7c78[179]](_0x7c78[472])== -1&& _0x1499x124[_0x7c78[179]](_0x7c78[495])== -1&& _0x1499x124[_0x7c78[179]](_0x7c78[502])== -1&& _0x1499x124[_0x7c78[179]](_0x7c78[507])== -1&& _0x1499x124[_0x7c78[179]](_0x7c78[577])== -1&& _0x1499x124[_0x7c78[179]](_0x7c78[488])== -1&& _0x1499x124[_0x7c78[179]](_0x7c78[514])== -1&& _0x1499x124[_0x7c78[179]](_0x7c78[547])== -1){if(_0x1499x124[_0x7c78[140]]){_0x1499x115[_0x7c78[726]]({name:_0x7c78[724],nick:$(_0x7c78[293])[_0x7c78[59]](),message:_0x7c78[725]+ _0x1499x116});if(_0x1499x123[_0x7c78[727]]){$(document)[_0x7c78[728]](jQuery.Event(_0x7c78[692],{keyCode:_0x1499x117[_0x7c78[686]],which:_0x1499x117[_0x7c78[686]]}))}else {}}}else {console[_0x7c78[283]](_0x7c78[729])}};_0x1499x115[_0x7c78[674]]= function(){$(_0x7c78[524])[_0x7c78[73]](_0x7c78[523],_0x7c78[525]);if(_0x1499x118[_0x7c78[730]]&& $(_0x7c78[731])[_0x7c78[73]](_0x7c78[523])== _0x7c78[732]){$(document)[_0x7c78[728]](jQuery.Event(_0x7c78[692],{keyCode:_0x1499x117[_0x7c78[733]],which:_0x1499x117[_0x7c78[733]]}));$(document)[_0x7c78[728]](jQuery.Event(_0x7c78[734],{keyCode:_0x1499x117[_0x7c78[733]],which:_0x1499x117[_0x7c78[733]]}))}};_0x1499x115[_0x7c78[706]]= function(){var _0x1499x125=_0x1499x115[_0x7c78[735]]();if(_0x1499x125!= _0x1499x117[_0x7c78[736]]){_0x1499x115[_0x7c78[737]](_0x1499x125)};if(_0x1499x117[_0x7c78[736]]){_0x1499x115[_0x7c78[738]]()};_0x1499x115[_0x7c78[739]]()};_0x1499x115[_0x7c78[625]]= function(){if(!($(_0x7c78[696])[_0x7c78[140]])){_0x1499x115[_0x7c78[740]]()};_0x1499x115[_0x7c78[741]](_0x1499x118);$(_0x7c78[696])[_0x7c78[87]]();$(_0x7c78[742])[_0x7c78[87]]()};_0x1499x115[_0x7c78[740]]= function(){$(_0x7c78[742])[_0x7c78[279]](_0x7c78[743]+ _0x7c78[744]+ _0x7c78[720]+ _0x7c78[745]+ _0x7c78[746]+ _0x7c78[747]+ _0x7c78[748]+ _0x7c78[652]+ _0x7c78[749]+ _0x7c78[750]+ Languageletter309[_0x7c78[751]]()+ _0x7c78[752]+ _0x7c78[753]+ Languageletter171+ _0x7c78[752]+ _0x7c78[754]+ Languageletter283+ _0x7c78[752]+ _0x7c78[652]);$(_0x7c78[778])[_0x7c78[279]](_0x7c78[6]+ _0x7c78[755]+ _0x7c78[756]+ _0x7c78[757]+ _0x7c78[758]+ _0x7c78[759]+ _0x7c78[760]+ _0x7c78[761]+ _0x7c78[762]+ _0x7c78[763]+ _0x7c78[764]+ _0x7c78[765]+ _0x7c78[766]+ _0x7c78[767]+ _0x7c78[768]+ _0x7c78[769]+ _0x7c78[770]+ _0x7c78[771]+ _0x7c78[772]+ _0x7c78[773]+ _0x7c78[774]+ _0x7c78[775]+ _0x7c78[776]+ _0x7c78[777]+ _0x7c78[6]);$(_0x7c78[779])[_0x7c78[208]](function(){_0x1499x115[_0x7c78[741]](_0x1499x119)});$(_0x7c78[783])[_0x7c78[208]](function(){if($(_0x7c78[527])[_0x7c78[596]](_0x7c78[595])){showMenu2()};_0x1499x118= _0x1499x115[_0x7c78[780]]();_0x1499x115[_0x7c78[781]](_0x7c78[625],JSON[_0x7c78[415]](_0x1499x118));_0x1499x115[_0x7c78[782]]();$(_0x7c78[524])[_0x7c78[73]](_0x7c78[677],_0x1499x117[_0x7c78[678]][_0x1499x118[_0x7c78[676]]?1:0]);_0x1499x115[_0x7c78[694]]()});$(_0x7c78[784])[_0x7c78[208]](function(){if($(_0x7c78[527])[_0x7c78[596]](_0x7c78[595])){showMenu2()};_0x1499x115[_0x7c78[782]]()});_0x1499x115[_0x7c78[782]]= function(){$(_0x7c78[696])[_0x7c78[61]]()}};_0x1499x115[_0x7c78[694]]= function(){if(_0x1499x117[_0x7c78[785]]){clearInterval(_0x1499x117[_0x7c78[785]]);delete _0x1499x117[_0x7c78[785]]};if(_0x1499x118[_0x7c78[786]]&& _0x1499x118[_0x7c78[787]]> 0){_0x1499x117[_0x7c78[785]]= setInterval(_0x1499x115[_0x7c78[788]],_0x1499x118[_0x7c78[787]])}};_0x1499x115[_0x7c78[788]]= function(){if(_0x1499x114[_0x7c78[654]]&& _0x1499x114[_0x7c78[654]][_0x7c78[789]]&& _0x1499x114[_0x7c78[654]][_0x7c78[790]]){_0x1499x117[_0x7c78[791]]= true};_0x1499x115[_0x7c78[792]]();if(_0x1499x117[_0x7c78[791]]&& _0x1499x114[_0x7c78[654]][_0x7c78[789]]&& !_0x1499x114[_0x7c78[654]][_0x7c78[790]]){_0x1499x115[_0x7c78[792]]()}};_0x1499x115[_0x7c78[792]]= function(){$(document)[_0x7c78[728]](jQuery.Event(_0x7c78[692],{keyCode:_0x1499x117[_0x7c78[793]],which:_0x1499x117[_0x7c78[793]]}));$(document)[_0x7c78[728]](jQuery.Event(_0x7c78[734],{keyCode:_0x1499x117[_0x7c78[793]],which:_0x1499x117[_0x7c78[793]]}))};_0x1499x115[_0x7c78[704]]= function(){_0x1499x115[_0x7c78[709]]();if(!_0x1499x114[_0x7c78[794]]){return _0x1499x14e(_0x1499x117[_0x7c78[795]],_0x1499x115[_0x7c78[704]])};var _0x1499x126={query:_0x7c78[796]+ encodeURIComponent(_0x1499x117.AgarToolVersion)+ _0x7c78[797]+ encodeURIComponent(_0x1499x117[_0x7c78[701]])};_0x1499x117[_0x7c78[798]]= io[_0x7c78[704]](_0x1499x117.AgarToolServer,_0x1499x126);_0x1499x117[_0x7c78[798]][_0x7c78[801]](_0x7c78[157],function(_0x1499x127){_0x1499x117[_0x7c78[799]]= _0x1499x127;_0x1499x115[_0x7c78[800]]()})};_0x1499x115[_0x7c78[709]]= function(){if(_0x1499x117[_0x7c78[655]]&& _0x1499x117[_0x7c78[736]]){_0x1499x115[_0x7c78[737]](false)};_0x1499x117[_0x7c78[655]]= false;_0x1499x117[_0x7c78[736]]= false;var _0x1499x128=_0x1499x117[_0x7c78[798]];var _0x1499x129=_0x1499x117[_0x7c78[802]];_0x1499x117[_0x7c78[798]]= null;_0x1499x117[_0x7c78[802]]= null;if(_0x1499x128){_0x1499x128[_0x7c78[709]]()};if(_0x1499x129){_0x1499x129[_0x7c78[709]]()}};_0x1499x115[_0x7c78[800]]= function(){if($(_0x7c78[669])[_0x7c78[721]](_0x7c78[803])== false){$(_0x7c78[669])[_0x7c78[245]](_0x7c78[803])};_0x1499x115[_0x7c78[283]](Languageletter82a+ _0x7c78[481]+ Premadeletter123[_0x7c78[804]]()+ _0x7c78[805]+ _0x1499x117[_0x7c78[799]][_0x7c78[806]]);_0x1499x115[_0x7c78[807]]();var _0x1499x12a={reconnection:!1,query:_0x7c78[808]+ encodeURIComponent(_0x1499x117[_0x7c78[799]][_0x7c78[809]])+ _0x7c78[810]+ encodeURIComponent(_0x1499x117[_0x7c78[489]])};_0x1499x117[_0x7c78[802]]= io[_0x7c78[704]](_0x1499x117[_0x7c78[799]][_0x7c78[806]],_0x1499x12a);_0x1499x117[_0x7c78[802]][_0x7c78[801]](_0x7c78[811],_0x1499x115[_0x7c78[812]]);_0x1499x117[_0x7c78[802]][_0x7c78[801]](_0x7c78[704],function(){_0x1499x117[_0x7c78[655]]= true});_0x1499x117[_0x7c78[802]][_0x7c78[801]](_0x7c78[709],function(){_0x1499x117[_0x7c78[802]]= null;_0x1499x115[_0x7c78[813]]()});_0x1499x117[_0x7c78[802]][_0x7c78[801]](_0x7c78[814],function(){_0x1499x117[_0x7c78[802]]= null;_0x1499x115[_0x7c78[813]]()})};_0x1499x115[_0x7c78[813]]= function(){_0x1499x117[_0x7c78[655]]= false;var _0x1499x128=_0x1499x117[_0x7c78[798]];var _0x1499x129=_0x1499x117[_0x7c78[802]];_0x1499x117[_0x7c78[798]]= null;_0x1499x117[_0x7c78[802]]= null;if(_0x1499x128){_0x1499x128[_0x7c78[709]]()};if(_0x1499x129){_0x1499x129[_0x7c78[709]]()}};_0x1499x115[_0x7c78[812]]= function(_0x1499x12b){if(void(0)=== _0x1499x12b[_0x7c78[601]]){return};switch(_0x1499x12b[_0x7c78[601]]){case _0x7c78[823]:if(window[_0x7c78[815]]&& window[_0x7c78[815]][_0x7c78[55]](_0x1499x12b[_0x7c78[816]])|| _0x1499x12b[_0x7c78[816]][_0x7c78[55]](_0x7c78[621])){}else {if(!_0x1499x12b[_0x7c78[816]]){_0x1499x12b[_0x7c78[816]]= _0x7c78[817]};_0x1499x115[_0x7c78[822]](!1,_0x1499x12b[_0x7c78[818]],_0x1499x12b[_0x7c78[816]],_0x1499x12b[_0x7c78[819]],_0x1499x12b[_0x7c78[820]],_0x1499x118[_0x7c78[821]],!0)};break;case _0x7c78[176]:_0x1499x115[_0x7c78[824]](_0x1499x12b[_0x7c78[818]]);break;case _0x7c78[826]:_0x1499x115[_0x7c78[825]](_0x1499x12b[_0x7c78[818]],_0x1499x12b[_0x7c78[819]],_0x1499x12b[_0x7c78[820]]);break;case _0x7c78[789]:if(!window[_0x7c78[827]]|| !isEquivalent(window[_0x7c78[827]],_0x1499x12b[_0x7c78[828]])){window[_0x7c78[827]]= _0x1499x12b[_0x7c78[828]];if(legendmod[_0x7c78[829]]){Object[_0x7c78[833]](window[_0x7c78[827]])[_0x7c78[832]](function(_0x1499x12c){if(_0x1499x12c[_0x7c78[190]](_0x7c78[830])[0]!= 0){core[_0x7c78[831]](_0x1499x12c[_0x7c78[190]](_0x7c78[830])[0],null,window[_0x7c78[827]][_0x1499x12c],1,null)}})}};break;case _0x7c78[834]:_0x1499x115[_0x7c78[807]]();break;case _0x7c78[724]:if(window[_0x7c78[815]]&& window[_0x7c78[815]][_0x7c78[55]](_0x1499x12b[_0x7c78[816]])|| _0x1499x12b[_0x7c78[816]][_0x7c78[55]](_0x7c78[621])){}else {if(!_0x1499x12b[_0x7c78[816]]){_0x1499x12b[_0x7c78[816]]= _0x7c78[817]};_0x1499x115[_0x7c78[283]](_0x7c78[6]+ _0x1499x12b[_0x7c78[816]]+ _0x7c78[273]+ _0x1499x12b[_0x7c78[835]]);_0x1499x115[_0x7c78[836]](_0x1499x12b[_0x7c78[816]],_0x1499x12b[_0x7c78[835]])};break;case _0x7c78[811]:if(window[_0x7c78[815]]&& window[_0x7c78[815]][_0x7c78[55]](_0x1499x12b[_0x7c78[816]])|| _0x1499x12b[_0x7c78[816]][_0x7c78[55]](_0x7c78[621])){}else {if(!_0x1499x12b[_0x7c78[816]]){_0x1499x12b[_0x7c78[816]]= _0x7c78[817]};_0x1499x115[_0x7c78[283]](_0x7c78[189]+ _0x1499x12b[_0x7c78[816]]+ _0x7c78[273]+ _0x1499x12b[_0x7c78[835]]);_0x1499x115[_0x7c78[836]](_0x1499x12b[_0x7c78[816]],_0x1499x12b[_0x7c78[835]])};break;case _0x7c78[838]:console[_0x7c78[283]](_0x7c78[837]+ _0x1499x12b[_0x7c78[835]]);break;case _0x7c78[839]:console[_0x7c78[283]](_0x7c78[837]+ _0x1499x12b[_0x7c78[835]]);break;default:_0x1499x115[_0x7c78[283]](_0x7c78[840]+ _0x1499x12b[_0x7c78[601]])}};_0x1499x115[_0x7c78[726]]= function(_0x1499x12d){if(_0x1499x117[_0x7c78[802]]&& _0x1499x117[_0x7c78[802]][_0x7c78[655]]){_0x1499x117[_0x7c78[802]][_0x7c78[841]](_0x7c78[811],_0x1499x12d);return true};return false};_0x1499x115[_0x7c78[807]]= function(){window[_0x7c78[593]]= [];for(var _0x1499x12d in _0x1499x117[_0x7c78[842]]){if(!_0x1499x117[_0x7c78[842]][_0x1499x12d][_0x7c78[843]]){delete _0x1499x117[_0x7c78[842]][_0x1499x12d]}}};_0x1499x115[_0x7c78[822]]= function(_0x1499x12e,_0x1499x12f,_0x1499x8b,_0x1499xe2,_0x1499x130,_0x1499x131,_0x1499x132){window[_0x7c78[593]][_0x1499x12f]= _0x1499x8b;_0x1499x117[_0x7c78[842]][_0x1499x12f]= new _0x1499x133(_0x1499x12e,_0x1499x8b,_0x1499xe2,_0x1499x130,_0x1499x131,_0x1499x132)};_0x1499x115[_0x7c78[824]]= function(_0x1499x12f){window[_0x7c78[593]][_0x1499x12f]= null;if(_0x1499x117[_0x7c78[842]][_0x1499x12f]){delete _0x1499x117[_0x7c78[842]][_0x1499x12f]}};_0x1499x115[_0x7c78[825]]= function(_0x1499x12f,_0x1499xe2,_0x1499x130){if(_0x1499x117[_0x7c78[842]][_0x1499x12f]){_0x1499x117[_0x7c78[842]][_0x1499x12f][_0x7c78[819]]= _0x1499xe2;_0x1499x117[_0x7c78[842]][_0x1499x12f][_0x7c78[820]]= _0x1499x130}};function _0x1499x133(_0x1499x12e,_0x1499x8b,_0x1499xe2,_0x1499x130,_0x1499x131,_0x1499x132){this[_0x7c78[843]]= _0x1499x12e;this[_0x7c78[601]]= _0x1499x8b;this[_0x7c78[819]]= _0x1499xe2;this[_0x7c78[820]]= _0x1499x130;this[_0x7c78[844]]= _0x1499xe2;this[_0x7c78[845]]= _0x1499x130;this[_0x7c78[662]]= _0x1499x131;this[_0x7c78[846]]= _0x1499x132}_0x1499x115[_0x7c78[737]]= function(_0x1499x134){_0x1499x117[_0x7c78[736]]= _0x1499x134;if(_0x1499x118[_0x7c78[847]]){if(_0x1499x117[_0x7c78[736]]){_0x1499x117[_0x7c78[736]]= _0x1499x115[_0x7c78[726]]({name:_0x7c78[736],playerName:_0x1499x118[_0x7c78[848]]+ _0x1499x117[_0x7c78[372]],customSkins:$(_0x7c78[849])[_0x7c78[59]]()})}else {_0x1499x115[_0x7c78[726]]({name:_0x7c78[850]})}}};_0x1499x115[_0x7c78[738]]= function(){if(_0x1499x118[_0x7c78[847]]&& _0x1499x114[_0x7c78[654]]){_0x1499x115[_0x7c78[726]]({name:_0x7c78[826],x:ogario[_0x7c78[851]]+ ogario[_0x7c78[560]],y:ogario[_0x7c78[852]]+ ogario[_0x7c78[562]]})}};_0x1499x115[_0x7c78[836]]= function(_0x1499xe6,_0x1499x116){var _0x1499x135= new Date()[_0x7c78[854]]()[_0x7c78[168]](/^(\d{2}:\d{2}).*/,_0x7c78[853]);var _0x1499x136=_0x1499x115[_0x7c78[711]];var _0x1499x137=_0x7c78[855]+ _0x7c78[856]+ _0x1499x135+ _0x7c78[857]+ _0x7c78[858]+ defaultSettings[_0x7c78[859]]+ _0x7c78[860]+ _0x1499x136+ _0x7c78[481]+ _0x1499x150(_0x1499xe6)+ _0x7c78[861]+ _0x7c78[862]+ _0x1499x150(_0x1499x116)+ _0x7c78[752]+ _0x7c78[652];$(_0x7c78[597])[_0x7c78[279]](_0x1499x137);$(_0x7c78[597])[_0x7c78[863]](_0x7c78[706]);$(_0x7c78[597])[_0x7c78[865]]({'\x73\x63\x72\x6F\x6C\x6C\x54\x6F\x70':$(_0x7c78[597])[_0x7c78[257]](_0x7c78[864])},500)};_0x1499x115[_0x7c78[739]]= function(){window[_0x7c78[866]]= [];var _0x1499x138=document[_0x7c78[407]](_0x7c78[147]);var _0x1499x120=_0x1499x138[_0x7c78[71]];var _0x1499x121=_0x1499x138[_0x7c78[715]];var _0x1499x139=(_0x1499x120- 18)/ _0x1499x115[_0x7c78[867]]();var _0x1499x13a=_0x1499x115[_0x7c78[868]]();_0x1499x117[_0x7c78[869]]= 18/ 2;_0x1499x117[_0x7c78[870]]= _0x1499x117[_0x7c78[869]]+ (_0x1499x121- _0x1499x120);var _0x1499x13b=_0x1499x117[_0x7c78[869]];var _0x1499x13c=_0x1499x117[_0x7c78[870]];var _0x1499x13d=-(2* _0x1499x117[_0x7c78[871]]+ 2);var _0x1499x13e=_0x1499x138[_0x7c78[873]](_0x7c78[872]);_0x1499x13e[_0x7c78[874]](0,0,_0x1499x120,_0x1499x121);_0x1499x13e[_0x7c78[875]]= _0x1499x117[_0x7c78[876]];var _0x1499x13f=_0x7c78[6];var _0x1499x140=_0x7c78[6];if(!defaultmapsettings[_0x7c78[877]]){_0x1499x140= _0x7c78[878]};var _0x1499x141=Object[_0x7c78[833]](_0x1499x117[_0x7c78[842]])[_0x7c78[879]]();window[_0x7c78[880]]= _0x1499x117[_0x7c78[842]];window[_0x7c78[881]]= [];for(var _0x1499x142=0;_0x1499x142< window[_0x7c78[882]][_0x7c78[140]];_0x1499x142++){window[_0x7c78[881]][_0x1499x142]= window[_0x7c78[882]][_0x1499x142][_0x7c78[372]]};for(var _0x1499xd8=0;_0x1499xd8< _0x1499x141[_0x7c78[140]];_0x1499xd8++){for(var _0x1499x143=1;_0x1499x143<= _0x1499xd8;_0x1499x143++){if(_0x1499xd8- _0x1499x143>= 0&& _0x1499x117[_0x7c78[842]][_0x1499x141[_0x1499xd8]][_0x7c78[601]]== _0x1499x117[_0x7c78[842]][_0x1499x141[_0x1499xd8- _0x1499x143]][_0x7c78[601]]){if(window[_0x7c78[593]][_0x1499x141[_0x1499xd8]]!= _0x1499x117[_0x7c78[842]][_0x1499x141[_0x1499xd8]][_0x7c78[601]]){_0x1499x117[_0x7c78[842]][_0x1499x141[_0x1499xd8]][_0x7c78[601]]= window[_0x7c78[593]][_0x1499x141[_0x1499xd8]]}else {if(window[_0x7c78[593]][_0x1499x141[_0x1499xd8- _0x1499x143]]!= _0x1499x117[_0x7c78[842]][_0x1499x141[_0x1499xd8- _0x1499x143]][_0x7c78[601]]){_0x1499x117[_0x7c78[842]][_0x1499x141[_0x1499xd8- _0x1499x143]][_0x7c78[601]]= window[_0x7c78[593]][_0x1499x141[_0x1499xd8- _0x1499x143]]}}}};for(var _0x1499x12d=0;_0x1499x12d< legendmod[_0x7c78[374]][_0x7c78[140]];_0x1499x12d++){if(legendmod[_0x7c78[374]][_0x1499x12d]&& _0x1499x117[_0x7c78[842]][_0x1499x141[_0x1499xd8]]&& _0x1499x150(_0x1499x117[_0x7c78[842]][_0x1499x141[_0x1499xd8]][_0x7c78[601]])== legendmod[_0x7c78[374]][_0x1499x12d][_0x7c78[372]]){_0x1499x117[_0x7c78[842]][_0x1499x141[_0x1499xd8]][_0x7c78[883]]= _0x1499x12d;if(_0x1499xd8- 1>= 0&& _0x1499x117[_0x7c78[842]][_0x1499x141[_0x1499xd8]][_0x7c78[883]]< _0x1499x117[_0x7c78[842]][_0x1499x141[_0x1499xd8- 1]][_0x7c78[883]]){var _0x1499xe2=_0x1499x117[_0x7c78[842]][_0x1499x141[_0x1499xd8]];if(_0x1499xe2!= _0x1499x117[_0x7c78[842]][_0x1499x141[_0x1499xd8- 1]]&& _0x1499xe2!= _0x1499x117[_0x7c78[842]][_0x1499x141[_0x1499xd8- 2]]&& _0x1499xe2!= _0x1499x117[_0x7c78[842]][_0x1499x141[_0x1499xd8- 3]]&& _0x1499xe2!= _0x1499x117[_0x7c78[842]][_0x1499x141[_0x1499xd8- 4]]&& _0x1499xe2!= _0x1499x117[_0x7c78[842]][_0x1499x141[_0x1499xd8- 5]]&& window[_0x7c78[881]][_0x7c78[55]](_0x1499x117[_0x7c78[842]][_0x1499x141[_0x1499xd8]][_0x7c78[601]])&& _0x1499x117[_0x7c78[842]][_0x1499x141[_0x1499xd8]][_0x7c78[601]]!= _0x1499x117[_0x7c78[842]][_0x1499x141[_0x1499xd8- 1]][_0x7c78[601]]&& _0x1499x117[_0x7c78[842]][_0x1499x141[_0x1499xd8]]&& _0x1499x117[_0x7c78[842]][_0x1499x141[_0x1499xd8- 1]]){var _0x1499x9d=_0x1499x117[_0x7c78[842]][_0x1499x141[_0x1499xd8]];_0x1499x117[_0x7c78[842]][_0x1499x141[_0x1499xd8]]= _0x1499x117[_0x7c78[842]][_0x1499x141[_0x1499xd8- 1]];_0x1499x117[_0x7c78[842]][_0x1499x141[_0x1499xd8- 1]]= _0x1499x9d}}}}};if(_0x1499x141[_0x7c78[140]]=== 0){};var _0x1499x144=2;var _0x1499x145=0;for(var _0x1499x12c;(_0x1499x12c= _0x1499x141[_0x7c78[884]]());){var _0x1499x146=_0x1499x117[_0x7c78[842]][_0x1499x12c];window[_0x7c78[866]][_0x7c78[885]](_0x1499x150(_0x1499x146[_0x7c78[601]]));var _0x1499x147=false;if(defaultmapsettings[_0x7c78[877]]){if(application[_0x7c78[886]][_0x1499x146[_0x7c78[601]]]&& application[_0x7c78[888]][application[_0x7c78[886]][_0x1499x146[_0x7c78[601]]]+ _0x7c78[887]]){_0x1499x140= _0x1499x140+ (_0x7c78[889]+ _0x1499x12c+ _0x7c78[890]+ _0x1499x146[_0x7c78[662]]+ _0x7c78[891]+ application[_0x7c78[888]][application[_0x7c78[886]][_0x1499x146[_0x7c78[601]]]+ _0x7c78[887]][_0x7c78[892]]+ _0x7c78[893]+ _0x7c78[894])}else {_0x1499x140= _0x1499x140+ (_0x7c78[889]+ _0x1499x12c+ _0x7c78[890]+ _0x1499x146[_0x7c78[662]]+ _0x7c78[895]+ _0x7c78[894])}};for(var _0x1499x12d=0;_0x1499x12d< legendmod[_0x7c78[896]][_0x7c78[140]];_0x1499x12d++){if(legendmod[_0x7c78[374]][_0x1499x12d]&& _0x1499x150(_0x1499x146[_0x7c78[601]])== legendmod[_0x7c78[374]][_0x1499x12d][_0x7c78[372]]){if(_0x1499x147== false){_0x1499x140= _0x1499x140+ (_0x7c78[897]+ application[_0x7c78[566]](window[_0x7c78[882]][_0x1499x12d][_0x7c78[819]],window[_0x7c78[882]][_0x1499x12d][_0x7c78[820]])+ _0x7c78[898]);_0x1499x140= _0x1499x140+ (_0x7c78[899]+ application[_0x7c78[901]](window[_0x7c78[882]][_0x1499x12d][_0x7c78[900]])+ _0x7c78[902]);_0x1499x147= true}}};if(_0x1499x147== false){if(application[_0x7c78[566]](_0x1499x146[_0x7c78[819]],_0x1499x146[_0x7c78[820]])== _0x7c78[903]|| legendmod[_0x7c78[67]]== _0x7c78[68]){_0x1499x140= _0x1499x140+ (_0x7c78[897]+ application[_0x7c78[566]](_0x1499x146[_0x7c78[819]],_0x1499x146[_0x7c78[820]])+ _0x7c78[902])}};_0x1499x145++;_0x1499x13f+= _0x1499x140+ _0x1499x150(_0x1499x146[_0x7c78[601]]);_0x1499x140= _0x7c78[652];if(!defaultmapsettings[_0x7c78[877]]){_0x1499x140= _0x7c78[904]+ _0x1499x144+ _0x7c78[905];_0x1499x144++};if(_0x1499x118[_0x7c78[906]]){var _0x1499x8b=_0x1499x146[_0x7c78[601]]+ _0x7c78[907]+ _0x1499x118[_0x7c78[908]]+ _0x7c78[909];var _0x1499x148=(_0x1499x146[_0x7c78[819]]+ _0x1499x13a)* _0x1499x139+ _0x1499x13b;var _0x1499x149=(_0x1499x146[_0x7c78[820]]+ _0x1499x13a)* _0x1499x139+ _0x1499x13c;_0x1499x13e[_0x7c78[910]]= _0x7c78[911];_0x1499x13e[_0x7c78[912]]= _0x1499x117[_0x7c78[913]];_0x1499x13e[_0x7c78[914]]= _0x1499x117[_0x7c78[915]];_0x1499x13e[_0x7c78[916]](_0x1499x8b,_0x1499x148,_0x1499x149+ _0x1499x13d);_0x1499x13e[_0x7c78[148]]= _0x1499x118[_0x7c78[821]];_0x1499x13e[_0x7c78[143]](_0x1499x8b,_0x1499x148,_0x1499x149+ _0x1499x13d);_0x1499x13e[_0x7c78[917]]();_0x1499x13e[_0x7c78[919]](_0x1499x148,_0x1499x149,_0x1499x117[_0x7c78[871]],0,_0x1499x117[_0x7c78[918]],!1);_0x1499x13e[_0x7c78[920]]();_0x1499x13e[_0x7c78[148]]= _0x1499x146[_0x7c78[662]];_0x1499x13e[_0x7c78[921]]()}};if(_0x1499x118[_0x7c78[922]]){if(!defaultmapsettings[_0x7c78[877]]){_0x1499x13f+= _0x7c78[904]};_0x1499x13f+= _0x7c78[923]+ _0x1499x145+ _0x7c78[752];$(_0x7c78[708])[_0x7c78[281]](_0x1499x13f)}};_0x1499x115[_0x7c78[735]]= function(){return _0x1499x114[_0x7c78[654]]?_0x1499x114[_0x7c78[654]][_0x7c78[387]]:false};_0x1499x115[_0x7c78[867]]= function(){return _0x1499x114[_0x7c78[654]]?_0x1499x114[_0x7c78[654]][_0x7c78[924]]:_0x1499x117[_0x7c78[924]]};_0x1499x115[_0x7c78[868]]= function(){return _0x1499x114[_0x7c78[654]]?_0x1499x114[_0x7c78[654]][_0x7c78[925]]:_0x1499x117[_0x7c78[925]]};_0x1499x115[_0x7c78[780]]= function(){var _0x1499x14a={};$(_0x7c78[931])[_0x7c78[930]](function(){var _0x1499x14b=$(this);var _0x1499x8a=_0x1499x14b[_0x7c78[257]](_0x7c78[926]);var _0x1499x8b=_0x1499x14b[_0x7c78[206]](_0x7c78[927]);var _0x1499x14c;if(_0x1499x8a=== _0x7c78[928]){_0x1499x14c= _0x1499x14b[_0x7c78[257]](_0x7c78[929])}else {_0x1499x14c= $(this)[_0x7c78[59]]()};_0x1499x14a[_0x1499x8b]= _0x1499x14c});return _0x1499x14a};_0x1499x115[_0x7c78[741]]= function(_0x1499x14a){$(_0x7c78[931])[_0x7c78[930]](function(){var _0x1499x14b=$(this);var _0x1499x8a=_0x1499x14b[_0x7c78[257]](_0x7c78[926]);var _0x1499x8b=_0x1499x14b[_0x7c78[206]](_0x7c78[927]);if(_0x1499x14a[_0x7c78[932]](_0x1499x8b)){var _0x1499x14c=_0x1499x14a[_0x1499x8b];if(_0x1499x8a=== _0x7c78[928]){_0x1499x14b[_0x7c78[257]](_0x7c78[929],_0x1499x14c)}else {$(this)[_0x7c78[59]](_0x1499x14c)}}})};_0x1499x115[_0x7c78[627]]= function(_0x1499x8b,_0x1499x14d){return _0x1499x114[_0x7c78[934]][_0x1499x115[_0x7c78[601]]+ _0x7c78[933]+ _0x1499x8b]|| _0x1499x14d};_0x1499x115[_0x7c78[781]]= function(_0x1499x8b,_0x1499x14c){_0x1499x114[_0x7c78[934]][_0x1499x115[_0x7c78[601]]+ _0x7c78[933]+ _0x1499x8b]= _0x1499x14c};function _0x1499x14e(url,_0x1499x8d){var _0x1499x14f=document[_0x7c78[936]](_0x7c78[935]);_0x1499x14f[_0x7c78[926]]= _0x7c78[937];_0x1499x14f[_0x7c78[470]]= url;if( typeof _0x1499x8d!== _0x7c78[938]){_0x1499x14f[_0x7c78[939]]= _0x1499x8d};document[_0x7c78[647]][_0x7c78[940]](_0x1499x14f)}function _0x1499x150(_0x1499x12d){return _0x1499x12d[_0x7c78[168]](/&/g,_0x7c78[945])[_0x7c78[168]](/</g,_0x7c78[944])[_0x7c78[168]](/>/g,_0x7c78[943])[_0x7c78[168]](/"/g,_0x7c78[942])[_0x7c78[168]](/'/g,_0x7c78[941])}$(_0x7c78[693])[_0x7c78[692]](function(_0x1499x12d){if(_0x1499x12d[_0x7c78[685]]=== 13){$(_0x7c78[697])[_0x7c78[208]]()}})}function Universalchatfix(){if($(_0x7c78[657])[_0x7c78[721]](_0x7c78[655])){$(_0x7c78[657])[_0x7c78[208]]();$(_0x7c78[657])[_0x7c78[208]]()};if(window[_0x7c78[946]]){LegendModServerConnect()}}function showMenu(){$(_0x7c78[742])[_0x7c78[87]]();$(_0x7c78[947])[_0x7c78[208]]()}function showMenu2(){$(_0x7c78[742])[_0x7c78[87]]();$(_0x7c78[947])[_0x7c78[208]]()}function hideMenu(){$(_0x7c78[742])[_0x7c78[61]]()}function showSearchHud(){if(!document[_0x7c78[56]][_0x7c78[55]](_0x7c78[54])){getInfo()};$(_0x7c78[949])[_0x7c78[948]]();$(_0x7c78[950])[_0x7c78[948]]();$(_0x7c78[951])[_0x7c78[948]]();$(_0x7c78[952])[_0x7c78[948]]();$(_0x7c78[953])[_0x7c78[948]]()}function hideSearchHud(){$(_0x7c78[952])[_0x7c78[174]]();$(_0x7c78[949])[_0x7c78[174]]();$(_0x7c78[950])[_0x7c78[174]]();$(_0x7c78[951])[_0x7c78[174]]();$(_0x7c78[953])[_0x7c78[174]]()}function appendLog(_0x1499x158){var region=$(_0x7c78[60])[_0x7c78[59]]();$(_0x7c78[961])[_0x7c78[713]](_0x7c78[954]+ _0x7c78[955]+ region[_0x7c78[956]](0,2)+ _0x7c78[957]+ _0x7c78[958]+ currentToken+ _0x7c78[959]+ _0x1499x158+ _0x7c78[960]);$(_0x7c78[963])[_0x7c78[962]]()[_0x7c78[87]](100);bumpLog()}function appendLog2(_0x1499x158,_0x1499x15a){$(_0x7c78[961])[_0x7c78[713]](_0x7c78[954]+ _0x7c78[964]+ _0x1499x15a+ _0x7c78[965]+ currentToken+ _0x7c78[959]+ _0x1499x158+ _0x7c78[960]);$(_0x7c78[963])[_0x7c78[962]]()[_0x7c78[87]](100);bumpLog()}function appendLog3(_0x1499x158,_0x1499x15a,_0x1499x15c,_0x1499x15d){$(_0x7c78[961])[_0x7c78[713]](_0x7c78[954]+ _0x7c78[964]+ _0x1499x15a+ _0x7c78[966]+ _0x1499x15c+ _0x7c78[967]+ _0x1499x15d+ _0x7c78[965]+ currentToken+ _0x7c78[959]+ _0x1499x158+ _0x7c78[960]);$(_0x7c78[963])[_0x7c78[962]]()[_0x7c78[87]](100);bumpLog()}function appendLog4(_0x1499x158,_0x1499x15a){$(_0x7c78[961])[_0x7c78[713]](_0x7c78[954]+ _0x7c78[968]+ _0x1499x15a+ _0x7c78[965]+ currentToken+ _0x7c78[959]+ _0x1499x158+ _0x7c78[960]);$(_0x7c78[963])[_0x7c78[962]]()[_0x7c78[87]](100);bumpLog()}function connectto(_0x1499x15a){$(_0x7c78[213])[_0x7c78[59]](_0x1499x15a);$(_0x7c78[295])[_0x7c78[208]]();setTimeout(function(){if($(_0x7c78[213])[_0x7c78[59]]()!= $(_0x7c78[969])[_0x7c78[59]]()){toastr[_0x7c78[173]](_0x7c78[970])}},1500)}function connectto1a(_0x1499x15a){$(_0x7c78[971])[_0x7c78[59]](_0x7c78[253]+ _0x1499x15a);$(_0x7c78[972])[_0x7c78[208]]();setTimeout(function(){if($(_0x7c78[213])[_0x7c78[59]]()!= $(_0x7c78[969])[_0x7c78[59]]()){toastr[_0x7c78[173]](_0x7c78[970])}},1500)}function connectto2(_0x1499x15c){$(_0x7c78[60])[_0x7c78[59]](_0x1499x15c)}function connectto3(_0x1499x15d){$(_0x7c78[69])[_0x7c78[59]](_0x1499x15d)}function bumpLog(){$(_0x7c78[961])[_0x7c78[865]]({scrollTop:0},_0x7c78[973])}function SquareAgar(){var _0x1499x165=document[_0x7c78[974]](_0x7c78[647])[0];$(_0x1499x165)[_0x7c78[279]](_0x7c78[975]+ _0x7c78[976]+ _0x7c78[977]+ _0x7c78[978]+ _0x7c78[979]+ _0x7c78[980]+ _0x7c78[981])}function sendicon1(){application[_0x7c78[984]](101,_0x7c78[982]+ pic1urlimg+ _0x7c78[983])}function sendicon2(){application[_0x7c78[984]](101,_0x7c78[982]+ pic2urlimg+ _0x7c78[983])}function sendicon3(){application[_0x7c78[984]](101,_0x7c78[982]+ pic3urlimg+ _0x7c78[983])}function sendicon4(){application[_0x7c78[984]](101,_0x7c78[982]+ pic4urlimg+ _0x7c78[983])}function sendicon5(){application[_0x7c78[984]](101,_0x7c78[982]+ pic5urlimg+ _0x7c78[983])}function sendicon6(){application[_0x7c78[984]](101,_0x7c78[982]+ pic6urlimg+ _0x7c78[983])}function setpic1data(){localStorage[_0x7c78[117]](_0x7c78[444],$(_0x7c78[985])[_0x7c78[59]]());$(_0x7c78[987])[_0x7c78[206]](_0x7c78[986],$(_0x7c78[985])[_0x7c78[59]]())}function setpic2data(){localStorage[_0x7c78[117]](_0x7c78[445],$(_0x7c78[988])[_0x7c78[59]]());$(_0x7c78[989])[_0x7c78[206]](_0x7c78[986],$(_0x7c78[988])[_0x7c78[59]]())}function setpic3data(){localStorage[_0x7c78[117]](_0x7c78[446],$(_0x7c78[990])[_0x7c78[59]]());$(_0x7c78[991])[_0x7c78[206]](_0x7c78[986],$(_0x7c78[990])[_0x7c78[59]]())}function setpic4data(){localStorage[_0x7c78[117]](_0x7c78[447],$(_0x7c78[992])[_0x7c78[59]]());$(_0x7c78[993])[_0x7c78[206]](_0x7c78[986],$(_0x7c78[992])[_0x7c78[59]]())}function setpic5data(){localStorage[_0x7c78[117]](_0x7c78[448],$(_0x7c78[994])[_0x7c78[59]]());$(_0x7c78[995])[_0x7c78[206]](_0x7c78[986],$(_0x7c78[994])[_0x7c78[59]]())}function setpic6data(){localStorage[_0x7c78[117]](_0x7c78[449],$(_0x7c78[996])[_0x7c78[59]]());$(_0x7c78[997])[_0x7c78[206]](_0x7c78[986],$(_0x7c78[996])[_0x7c78[59]]())}function sendyt1(){if(($(_0x7c78[493])[_0x7c78[59]]()!= _0x7c78[6])|| document[_0x7c78[407]](_0x7c78[372])[_0x7c78[405]][_0x7c78[55]](_0x7c78[549])){application[_0x7c78[984]](101,_0x7c78[998]+ yt1url+ _0x7c78[999])}else {toastr[_0x7c78[157]](Premadeletter39)}}function sendyt2(){if(($(_0x7c78[493])[_0x7c78[59]]()!= _0x7c78[6])|| document[_0x7c78[407]](_0x7c78[372])[_0x7c78[405]][_0x7c78[55]](_0x7c78[549])){application[_0x7c78[984]](101,_0x7c78[998]+ yt2url+ _0x7c78[999])}else {toastr[_0x7c78[157]](Premadeletter39)}}function sendyt3(){if(($(_0x7c78[493])[_0x7c78[59]]()!= _0x7c78[6])|| document[_0x7c78[407]](_0x7c78[372])[_0x7c78[405]][_0x7c78[55]](_0x7c78[549])){application[_0x7c78[984]](101,_0x7c78[998]+ yt3url+ _0x7c78[999])}else {toastr[_0x7c78[157]](Premadeletter39)}}function sendyt4(){if(($(_0x7c78[493])[_0x7c78[59]]()!= _0x7c78[6])|| document[_0x7c78[407]](_0x7c78[372])[_0x7c78[405]][_0x7c78[55]](_0x7c78[549])){application[_0x7c78[984]](101,_0x7c78[998]+ yt4url+ _0x7c78[999])}else {toastr[_0x7c78[157]](Premadeletter39)}}function sendyt5(){if(($(_0x7c78[493])[_0x7c78[59]]()!= _0x7c78[6])|| document[_0x7c78[407]](_0x7c78[372])[_0x7c78[405]][_0x7c78[55]](_0x7c78[549])){application[_0x7c78[984]](101,_0x7c78[998]+ yt5url+ _0x7c78[999])}else {toastr[_0x7c78[157]](Premadeletter39)}}function sendyt6(){if(($(_0x7c78[493])[_0x7c78[59]]()!= _0x7c78[6])|| document[_0x7c78[407]](_0x7c78[372])[_0x7c78[405]][_0x7c78[55]](_0x7c78[549])){application[_0x7c78[984]](101,_0x7c78[998]+ yt6url+ _0x7c78[999])}else {toastr[_0x7c78[157]](Premadeletter39)}}function setyt1data(){localStorage[_0x7c78[117]](_0x7c78[450],$(_0x7c78[1000])[_0x7c78[59]]());$(_0x7c78[1001])[_0x7c78[206]](_0x7c78[986],$(_0x7c78[1000])[_0x7c78[59]]())}function setyt2data(){localStorage[_0x7c78[117]](_0x7c78[451],$(_0x7c78[1002])[_0x7c78[59]]());$(_0x7c78[1003])[_0x7c78[206]](_0x7c78[986],$(_0x7c78[1002])[_0x7c78[59]]())}function setyt3data(){localStorage[_0x7c78[117]](_0x7c78[452],$(_0x7c78[1004])[_0x7c78[59]]());$(_0x7c78[1005])[_0x7c78[206]](_0x7c78[986],$(_0x7c78[1004])[_0x7c78[59]]())}function setyt4data(){localStorage[_0x7c78[117]](_0x7c78[453],$(_0x7c78[1006])[_0x7c78[59]]());$(_0x7c78[1007])[_0x7c78[206]](_0x7c78[986],$(_0x7c78[1006])[_0x7c78[59]]())}function setyt5data(){localStorage[_0x7c78[117]](_0x7c78[454],$(_0x7c78[1008])[_0x7c78[59]]());$(_0x7c78[1009])[_0x7c78[206]](_0x7c78[986],$(_0x7c78[1008])[_0x7c78[59]]())}function setyt6data(){localStorage[_0x7c78[117]](_0x7c78[455],$(_0x7c78[1010])[_0x7c78[59]]());$(_0x7c78[1011])[_0x7c78[206]](_0x7c78[986],$(_0x7c78[1010])[_0x7c78[59]]())}function setyt1url(){yt1url= $(_0x7c78[1012])[_0x7c78[59]]();if(getParameterByName(_0x7c78[160],yt1url)!= null){yt1url= getParameterByName(_0x7c78[160],yt1url)};localStorage[_0x7c78[117]](_0x7c78[438],yt1url);return yt1url}function setyt2url(){yt2url= $(_0x7c78[1013])[_0x7c78[59]]();if(getParameterByName(_0x7c78[160],yt2url)!= null){yt2url= getParameterByName(_0x7c78[160],yt2url)};localStorage[_0x7c78[117]](_0x7c78[439],yt2url);return yt2url}function setyt3url(){yt3url= $(_0x7c78[1014])[_0x7c78[59]]();if(getParameterByName(_0x7c78[160],yt3url)!= null){yt3url= getParameterByName(_0x7c78[160],yt3url)};localStorage[_0x7c78[117]](_0x7c78[440],yt3url);return yt3url}function setyt4url(){yt4url= $(_0x7c78[1015])[_0x7c78[59]]();if(getParameterByName(_0x7c78[160],yt4url)!= null){yt4url= getParameterByName(_0x7c78[160],yt4url)};localStorage[_0x7c78[117]](_0x7c78[441],yt4url);return yt4url}function setyt5url(){yt5url= $(_0x7c78[1016])[_0x7c78[59]]();if(getParameterByName(_0x7c78[160],yt5url)!= null){yt5url= getParameterByName(_0x7c78[160],yt5url)};localStorage[_0x7c78[117]](_0x7c78[442],yt5url);return yt5url}function setyt6url(){yt6url= $(_0x7c78[1017])[_0x7c78[59]]();if(getParameterByName(_0x7c78[160],yt6url)!= null){yt6url= getParameterByName(_0x7c78[160],yt6url)};localStorage[_0x7c78[117]](_0x7c78[443],yt6url);return yt6url}function seticonfunction(){if(setmessagecom== _0x7c78[100]){YessetMsgComReturn()};if(setyt== _0x7c78[100]){YessetytReturn()};if(setscriptingcom== _0x7c78[100]){YessetScriptingComReturn()};if(seticon== _0x7c78[99]){NoseticonReturn()}else {if(seticon== _0x7c78[100]){YesseticonReturn()}}}function setmessagecomfunction(){if(seticon== _0x7c78[100]){YesseticonReturn()};if(setyt== _0x7c78[100]){YessetytReturn()};if(setscriptingcom== _0x7c78[100]){YessetScriptingComReturn()};if(setmessagecom== _0x7c78[99]){NosetMsgComReturn()}else {if(setmessagecom== _0x7c78[100]){YessetMsgComReturn()}}}function setytfunction(){if(setmessagecom== _0x7c78[100]){YessetMsgComReturn()};if(seticon== _0x7c78[100]){YesseticonReturn()};if(setscriptingcom== _0x7c78[100]){YessetScriptingComReturn()};if(setyt== _0x7c78[99]){NosetytReturn()}else {if(setyt== _0x7c78[100]){YessetytReturn()}}}function setscriptingfunction(){if(seticon== _0x7c78[100]){YesseticonReturn()};if(setyt== _0x7c78[100]){YessetytReturn()};if(setmessagecom== _0x7c78[100]){YessetMsgComReturn()};if(setscriptingcom== _0x7c78[99]){NosetScriptingComReturn()}else {if(setscriptingcom== _0x7c78[100]){YessetScriptingComReturn()}}}function NoseticonReturn(){$(_0x7c78[1018])[_0x7c78[87]]();return seticon= _0x7c78[100]}function YesseticonReturn(){$(_0x7c78[1018])[_0x7c78[61]]();return seticon= _0x7c78[99]}function NosetMsgComReturn(){$(_0x7c78[1019])[_0x7c78[87]]();return setmessagecom= _0x7c78[100]}function YessetMsgComReturn(){$(_0x7c78[1019])[_0x7c78[61]]();return setmessagecom= _0x7c78[99]}function NosetytReturn(){$(_0x7c78[1020])[_0x7c78[87]]();return setyt= _0x7c78[100]}function YessetytReturn(){$(_0x7c78[1020])[_0x7c78[61]]();return setyt= _0x7c78[99]}function NosetScriptingComReturn(){$(_0x7c78[1021])[_0x7c78[87]]();return setscriptingcom= _0x7c78[100]}function YessetScriptingComReturn(){$(_0x7c78[1021])[_0x7c78[61]]();return setscriptingcom= _0x7c78[99]}function changePicFun(){$(_0x7c78[1022])[_0x7c78[61]]();$(_0x7c78[1023])[_0x7c78[61]]();$(_0x7c78[1024])[_0x7c78[61]]();$(_0x7c78[1025])[_0x7c78[61]]();$(_0x7c78[1026])[_0x7c78[61]]();$(_0x7c78[1027])[_0x7c78[61]]();$(_0x7c78[1028])[_0x7c78[61]]();$(_0x7c78[1029])[_0x7c78[61]]();$(_0x7c78[1030])[_0x7c78[61]]();if($(_0x7c78[1031])[_0x7c78[59]]()== 1){$(_0x7c78[1022])[_0x7c78[87]]();$(_0x7c78[1030])[_0x7c78[87]]()};if($(_0x7c78[1031])[_0x7c78[59]]()== 2){$(_0x7c78[1023])[_0x7c78[87]]();$(_0x7c78[1026])[_0x7c78[87]]()};if($(_0x7c78[1031])[_0x7c78[59]]()== 3){$(_0x7c78[1024])[_0x7c78[87]]();$(_0x7c78[1027])[_0x7c78[87]]()};if($(_0x7c78[1031])[_0x7c78[59]]()== 4){$(_0x7c78[1025])[_0x7c78[87]]()};if($(_0x7c78[1031])[_0x7c78[59]]()== 5){$(_0x7c78[1028])[_0x7c78[87]]();$(_0x7c78[1029])[_0x7c78[87]]()}}function changePhotoFun(){$(_0x7c78[1032])[_0x7c78[61]]();$(_0x7c78[1033])[_0x7c78[61]]();$(_0x7c78[1034])[_0x7c78[61]]();$(_0x7c78[1035])[_0x7c78[61]]();$(_0x7c78[1036])[_0x7c78[61]]();$(_0x7c78[1037])[_0x7c78[61]]();$(_0x7c78[1012])[_0x7c78[61]]();$(_0x7c78[1013])[_0x7c78[61]]();$(_0x7c78[1014])[_0x7c78[61]]();$(_0x7c78[1015])[_0x7c78[61]]();$(_0x7c78[1016])[_0x7c78[61]]();$(_0x7c78[1017])[_0x7c78[61]]();$(_0x7c78[985])[_0x7c78[61]]();$(_0x7c78[988])[_0x7c78[61]]();$(_0x7c78[990])[_0x7c78[61]]();$(_0x7c78[992])[_0x7c78[61]]();$(_0x7c78[994])[_0x7c78[61]]();$(_0x7c78[996])[_0x7c78[61]]();$(_0x7c78[1000])[_0x7c78[61]]();$(_0x7c78[1002])[_0x7c78[61]]();$(_0x7c78[1004])[_0x7c78[61]]();$(_0x7c78[1006])[_0x7c78[61]]();$(_0x7c78[1008])[_0x7c78[61]]();$(_0x7c78[1010])[_0x7c78[61]]();if($(_0x7c78[1038])[_0x7c78[59]]()== 1){$(_0x7c78[1032])[_0x7c78[87]]();$(_0x7c78[985])[_0x7c78[87]]()};if($(_0x7c78[1038])[_0x7c78[59]]()== 2){$(_0x7c78[1033])[_0x7c78[87]]();$(_0x7c78[988])[_0x7c78[87]]()};if($(_0x7c78[1038])[_0x7c78[59]]()== 3){$(_0x7c78[1034])[_0x7c78[87]]();$(_0x7c78[990])[_0x7c78[87]]()};if($(_0x7c78[1038])[_0x7c78[59]]()== 4){$(_0x7c78[1035])[_0x7c78[87]]();$(_0x7c78[992])[_0x7c78[87]]()};if($(_0x7c78[1038])[_0x7c78[59]]()== 5){$(_0x7c78[1036])[_0x7c78[87]]();$(_0x7c78[994])[_0x7c78[87]]()};if($(_0x7c78[1038])[_0x7c78[59]]()== 6){$(_0x7c78[1037])[_0x7c78[87]]();$(_0x7c78[996])[_0x7c78[87]]()};if($(_0x7c78[1038])[_0x7c78[59]]()== 7){$(_0x7c78[1012])[_0x7c78[87]]();$(_0x7c78[1000])[_0x7c78[87]]()};if($(_0x7c78[1038])[_0x7c78[59]]()== 8){$(_0x7c78[1013])[_0x7c78[87]]();$(_0x7c78[1002])[_0x7c78[87]]()};if($(_0x7c78[1038])[_0x7c78[59]]()== 9){$(_0x7c78[1014])[_0x7c78[87]]();$(_0x7c78[1004])[_0x7c78[87]]()};if($(_0x7c78[1038])[_0x7c78[59]]()== 10){$(_0x7c78[1015])[_0x7c78[87]]();$(_0x7c78[1006])[_0x7c78[87]]()};if($(_0x7c78[1038])[_0x7c78[59]]()== 11){$(_0x7c78[1016])[_0x7c78[87]]();$(_0x7c78[1008])[_0x7c78[87]]()};if($(_0x7c78[1038])[_0x7c78[59]]()== 12){$(_0x7c78[1017])[_0x7c78[87]]();$(_0x7c78[1010])[_0x7c78[87]]()}}function msgcommand1f(){commandMsg= _0x7c78[522];otherMsg= _0x7c78[6];dosendmsgcommand()}function msgcommand2f(){commandMsg= _0x7c78[517];otherMsg= _0x7c78[6];dosendmsgcommand()}function msgcommand3f(){commandMsg= _0x7c78[533];otherMsg= _0x7c78[6];dosendmsgcommand()}function msgcommand4f(){commandMsg= _0x7c78[537];otherMsg= _0x7c78[6];dosendmsgcommand()}function msgcommand5f(){commandMsg= _0x7c78[541];otherMsg= _0x7c78[6];dosendmsgcommand()}function msgcommand6f(){commandMsg= _0x7c78[528];otherMsg= _0x7c78[6];dosendmsgcommand()}function dosendmsgcommand(){if(application[_0x7c78[1039]]== _0x7c78[6]|| $(_0x7c78[493])[_0x7c78[59]]()== _0x7c78[6]){toastr[_0x7c78[184]](_0x7c78[199]+ Premadeletter123+ _0x7c78[200]+ Premadeletter39)}else {application[_0x7c78[984]](101,_0x7c78[1040]+ $(_0x7c78[293])[_0x7c78[59]]()+ _0x7c78[1041]+ commandMsg+ _0x7c78[1042]+ otherMsg)}}function CutNameConflictwithMessageFunction(){return CutNameConflictwithMessage= true}function inject(_0x1499x8a,_0x1499x19b){switch(_0x1499x8a){case _0x7c78[1044]:var inject=document[_0x7c78[936]](_0x7c78[935]);inject[_0x7c78[926]]= _0x7c78[937];inject[_0x7c78[940]](document[_0x7c78[1043]](_0x1499x19b));break;case _0x7c78[1047]:var inject=document[_0x7c78[936]](_0x7c78[1045]);inject[_0x7c78[926]]= _0x7c78[1046];inject[_0x7c78[940]](document[_0x7c78[1043]](_0x1499x19b));break};(document[_0x7c78[647]]|| document[_0x7c78[204]])[_0x7c78[940]](inject)}function StartEditGameNames(){inject(_0x7c78[1047],_0x7c78[1048]);inject(_0x7c78[1044],!function _0x1499x12d(_0x1499x19d){if(_0x7c78[938]!= typeof document[_0x7c78[974]](_0x7c78[647])[0]&& _0x7c78[938]!= typeof document[_0x7c78[974]](_0x7c78[280])[0]){var _0x1499x19e={l:{score:0,names:[],leaderboard:{},toggled:!0,prototypes:{canvas:CanvasRenderingContext2D[_0x7c78[125]],old:{}}},f:{prototype_override:function(_0x1499x12d,_0x1499x19d,_0x1499x19f,_0x1499x8e){_0x1499x12d in _0x1499x19e[_0x7c78[1049]][_0x7c78[127]][_0x7c78[126]]|| (_0x1499x19e[_0x7c78[1049]][_0x7c78[127]][_0x7c78[126]][_0x1499x12d]= {}),_0x1499x19d in _0x1499x19e[_0x7c78[1049]][_0x7c78[127]][_0x7c78[126]][_0x1499x12d]|| (_0x1499x19e[_0x7c78[1049]][_0x7c78[127]][_0x7c78[126]][_0x1499x12d][_0x1499x19d]= _0x1499x19e[_0x7c78[1049]][_0x7c78[127]][_0x1499x12d][_0x1499x19d]),_0x1499x19e[_0x7c78[1049]][_0x7c78[127]][_0x1499x12d][_0x1499x19d]= function(){_0x7c78[128]== _0x1499x19f&& _0x1499x8e(this,arguments),_0x1499x19e[_0x7c78[1049]][_0x7c78[127]][_0x7c78[126]][_0x1499x12d][_0x1499x19d][_0x7c78[129]](this,arguments),_0x7c78[130]== _0x1499x19f&& _0x1499x8e(this,arguments)}},filltext_override:function(){_0x1499x19e[_0x7c78[150]][_0x7c78[151]](_0x7c78[137],_0x7c78[143],_0x7c78[128],function(_0x1499x12d,_0x1499x19d){var _0x1499x19f=_0x1499x19d[0];if(_0x1499x19d,_0x1499x19f[_0x7c78[1050]](/^(1|2|3|4|5|6|7|8|9|10)\.(.+?)$/)){var _0x1499x8e=_0x7c78[6],_0x1499x143=_0x1499x19f[_0x7c78[190]](/\.(.+)?/);_0x1499x19e[_0x7c78[1049]][_0x7c78[374]][_0x1499x143[0]]= _0x1499x143[1];for(k in _0x1499x19e[_0x7c78[1049]][_0x7c78[374]]){_0x1499x8e+= _0x1499x19e[_0x7c78[1053]][_0x7c78[1052]](_0x7c78[1051]+ k,_0x1499x19e[_0x7c78[1049]][_0x7c78[374]][k])};document[_0x7c78[407]](_0x7c78[1054])[_0x7c78[203]]= _0x1499x8e}else {_0x1499x19f[_0x7c78[1050]](/^score\:\s([0-9]+)$/i)?(_0x1499x19e[_0x7c78[1049]][_0x7c78[1055]]= parseInt(_0x1499x19f[_0x7c78[190]](/score:\s([0-9]+)?/i)[1]),document[_0x7c78[407]](_0x7c78[1056])[_0x7c78[203]]= _0x1499x19e[_0x7c78[1053]][_0x7c78[1052]](_0x7c78[1055],_0x1499x19e[_0x7c78[1049]][_0x7c78[1055]])):!(_0x7c78[6]!== _0x1499x19f&& _0x1499x19f[_0x7c78[140]]<= 15)|| _0x1499x19e[_0x7c78[1049]][_0x7c78[1057]][_0x7c78[179]](_0x1499x19f)> -1 || _0x1499x19f[_0x7c78[1050]](/(leaderboard|connect|loading|starting\smass|xp\sboost|open\sshop|([0-9]{2})m\s(([0-9]{2})h\s)?([0-9]{2})s)/i) || _0x1499x19f[_0x7c78[1050]](/^(free\scoins|\s?([0-9]+)\scoins|\s?with\soffers|collect\sin\:|hourly\scoins|come\sback\sin|to\searn\:|starter\spack|hourly\sbonus|level\s([0-9]+)|([0-9\.]+)|.([0-9\.]+)|([0-9\.]+)\%|mass\sboost|coins|skins|shop|banana|cookie|jupiter|birdie|mercury|apple|halo|neptune|black\shole|uranus|star\sball|target|galaxy|venus|breakfast|saturn|pluto|tiger|hot\sdog|heart|mouse|wolf|goldfish|piggie|blueberry|bomb|bowling|candy|frog|hamburger|nose|seal|panda|pizza|snowman|sun|baseball|basketball|bug|cloud|moo|tomato|mushroom|donuts|terrible|ghost|apple\sface|turtle|brofist|puppy|footprint|pineapple|zebra|toon|octopus|radar|eye|owl|virus|smile|army|cat|nuclear|toxic|dog|sad|facepalm|luchador|zombie|bite|crazy|hockey|brain|evil|pirate|evil\seye|halloween|monster|scarecrow|spy|fly|spider|wasp|lizard|bat|snake|fox|coyote|hunter|sumo|bear|cougar|panther|lion|crocodile|shark|mammoth|raptor|t-rex|kraken|gingerbread|santa|evil\self|cupcake|boy\skiss|girl\skiss|cupid|shuttle|astronaut|space\sdog|alien|meteor|ufo|rocket|boot|gold\spot|hat|horseshoe|lucky\sclover|leprechaun|rainbow|choco\segg|carrot|statue|rooster|rabbit|jester|earth\sday|chihuahua|cactus|sombrero|hot\spepper|chupacabra|taco|piAƒA£A‚A±ata|thirteen|black\scat|raven|mask|goblin|green\sman|slime\sface|blob|invader|space\shunter)$/i) || (_0x1499x19e[_0x7c78[1049]][_0x7c78[1057]][_0x7c78[885]](_0x1499x19f),document[_0x7c78[407]](_0x7c78[1058])[_0x7c78[203]]= document[_0x7c78[407]](_0x7c78[1058])[_0x7c78[203]][_0x7c78[1060]](_0x1499x19e[_0x7c78[1053]][_0x7c78[1052]](_0x7c78[1059],_0x1499x19f)))}})},hotkeys:function(_0x1499x12d){88== _0x1499x12d[_0x7c78[685]]&& (document[_0x7c78[407]](_0x7c78[1061])[_0x7c78[1045]][_0x7c78[523]]= _0x1499x19e[_0x7c78[1049]][_0x7c78[1062]]?_0x7c78[525]:_0x7c78[732],_0x1499x19e[_0x7c78[1049]][_0x7c78[1062]]= _0x1499x19e[_0x7c78[1049]][_0x7c78[1062]]?!1:!0)}},u:{fonts:function(){return _0x7c78[1063]},html:function(){return _0x7c78[1064]},span:function(_0x1499x12d,_0x1499x19d){return _0x7c78[1065]+ _0x1499x12d+ _0x7c78[1066]+ _0x1499x19d+ _0x7c78[1067]+ _0x1499x19d+ _0x7c78[752]}}};document[_0x7c78[974]](_0x7c78[647])[0][_0x7c78[1070]](_0x7c78[1068],_0x1499x19e[_0x7c78[1053]][_0x7c78[1069]]()),document[_0x7c78[974]](_0x7c78[280])[0][_0x7c78[1070]](_0x7c78[1068],_0x1499x19e[_0x7c78[1053]][_0x7c78[281]]()),_0x1499x19d[_0x7c78[1072]](_0x7c78[692],_0x1499x19e[_0x7c78[150]][_0x7c78[1071]]),_0x1499x19e[_0x7c78[150]][_0x7c78[1073]]()}else {_0x1499x19d[_0x7c78[1074]](function(){_0x1499x12d(_0x1499x19d)},100)}}(window))}function StopEditGameNames(){$(_0x7c78[1075])[_0x7c78[61]]()}function ContinueEditGameNames(){$(_0x7c78[1075])[_0x7c78[87]]()}function displayTimer(){var _0x1499x1a3=_0x7c78[1076],_0x1499x1a4=_0x7c78[1076],_0x1499x1a5=_0x7c78[6],_0x1499x1a6= new Date()[_0x7c78[229]]();TimerLM[_0x7c78[1077]]= _0x1499x1a6- TimerLM[_0x7c78[1078]];if(TimerLM[_0x7c78[1077]]> 1000){_0x1499x1a4= Math[_0x7c78[141]](TimerLM[_0x7c78[1077]]/ 1000);if(_0x1499x1a4> 60){_0x1499x1a4= _0x1499x1a4% 60};if(_0x1499x1a4< 10){_0x1499x1a4= _0x7c78[101]+ String(_0x1499x1a4)}};if(TimerLM[_0x7c78[1077]]> 60000){_0x1499x1a3= Math[_0x7c78[141]](TimerLM[_0x7c78[1077]]/ 60000);1;if(_0x1499x1a3> 60){_0x1499x1a3= _0x1499x1a3% 60};if(_0x1499x1a3< 10){_0x1499x1a3= _0x7c78[101]+ String(_0x1499x1a3)}};_0x1499x1a5+= _0x1499x1a3+ _0x7c78[239];_0x1499x1a5+= _0x1499x1a4;TimerLM[_0x7c78[1079]][_0x7c78[203]]= _0x1499x1a5}function startTimer(){$(_0x7c78[1080])[_0x7c78[61]]();$(_0x7c78[1081])[_0x7c78[87]]();$(_0x7c78[1082])[_0x7c78[87]]();TimerLM[_0x7c78[1078]]= new Date()[_0x7c78[229]]();console[_0x7c78[283]](_0x7c78[1083]+ TimerLM[_0x7c78[1078]]);if(TimerLM[_0x7c78[1077]]> 0){TimerLM[_0x7c78[1078]]= TimerLM[_0x7c78[1078]]- TimerLM[_0x7c78[1077]]};TimerLM[_0x7c78[1084]]= setInterval(function(){displayTimer()},10)}function stopTimer(){$(_0x7c78[1080])[_0x7c78[87]]();$(_0x7c78[1081])[_0x7c78[61]]();$(_0x7c78[1082])[_0x7c78[87]]();clearInterval(TimerLM[_0x7c78[1084]])}function clearTimer(){$(_0x7c78[1080])[_0x7c78[87]]();$(_0x7c78[1081])[_0x7c78[61]]();$(_0x7c78[1082])[_0x7c78[61]]();clearInterval(TimerLM[_0x7c78[1084]]);TimerLM[_0x7c78[1079]][_0x7c78[203]]= _0x7c78[1085];TimerLM[_0x7c78[1077]]= 0}function setminbgname(){minimapbckimg= $(_0x7c78[1022])[_0x7c78[59]]();localStorage[_0x7c78[117]](_0x7c78[428],minimapbckimg);$(_0x7c78[1088])[_0x7c78[73]](_0x7c78[518],_0x7c78[1086]+ minimapbckimg+ _0x7c78[1087])[_0x7c78[73]]({opacity:0.8})}function setminbtext(){minbtext= $(_0x7c78[1030])[_0x7c78[59]]();localStorage[_0x7c78[117]](_0x7c78[40],minbtext);var _0x1499x8f=document[_0x7c78[407]](_0x7c78[146]);var _0x1499x13e=_0x1499x8f[_0x7c78[873]](_0x7c78[872]);_0x1499x13e[_0x7c78[874]](0,0,_0x1499x8f[_0x7c78[71]],_0x1499x8f[_0x7c78[715]]/ 9);_0x1499x13e[_0x7c78[875]]= _0x7c78[1089];_0x1499x13e[_0x7c78[143]](minbtext,_0x1499x8f[_0x7c78[71]]/ 2,22)}function setleadbgname(){leadbimg= $(_0x7c78[1023])[_0x7c78[59]]();localStorage[_0x7c78[117]](_0x7c78[431],leadbimg);$(_0x7c78[1090])[_0x7c78[73]](_0x7c78[518],_0x7c78[1086]+ leadbimg+ _0x7c78[1087])[_0x7c78[73]]({opacity:0.8})}function setteambgname(){teambimg= $(_0x7c78[1024])[_0x7c78[59]]();localStorage[_0x7c78[117]](_0x7c78[429],teambimg);$(_0x7c78[520])[_0x7c78[73]](_0x7c78[518],_0x7c78[1086]+ teambimg+ _0x7c78[1087])[_0x7c78[73]]({opacity:0.8})}function setcanvasbgname(){canvasbimg= $(_0x7c78[1025])[_0x7c78[59]]();localStorage[_0x7c78[117]](_0x7c78[430],canvasbimg);$(_0x7c78[1091])[_0x7c78[73]](_0x7c78[518],_0x7c78[1086]+ canvasbimg+ _0x7c78[1087])[_0x7c78[73]]({opacity:1});$(_0x7c78[1091])[_0x7c78[73]](_0x7c78[1092],_0x7c78[1093])}function setleadbtext(){leadbtext= $(_0x7c78[1026])[_0x7c78[59]]();localStorage[_0x7c78[117]](_0x7c78[41],leadbtext);$(_0x7c78[1094])[_0x7c78[76]](leadbtext)}function setteambtext(){teambtext= $(_0x7c78[1027])[_0x7c78[59]]();localStorage[_0x7c78[117]](_0x7c78[42],teambtext);$(_0x7c78[1095])[_0x7c78[76]](teambtext)}function setimgUrl(){imgUrl= $(_0x7c78[1028])[_0x7c78[59]]();localStorage[_0x7c78[117]](_0x7c78[43],imgUrl)}function setimgHref(){imgHref= $(_0x7c78[1029])[_0x7c78[59]]();localStorage[_0x7c78[117]](_0x7c78[44],imgHref)}function setpic1url(){pic1urlimg= $(_0x7c78[1032])[_0x7c78[59]]();localStorage[_0x7c78[117]](_0x7c78[432],pic1urlimg);return pic1urlimg}function setpic2url(){pic2urlimg= $(_0x7c78[1033])[_0x7c78[59]]();localStorage[_0x7c78[117]](_0x7c78[433],pic2urlimg);return pic2urlimg}function setpic3url(){pic3urlimg= $(_0x7c78[1034])[_0x7c78[59]]();localStorage[_0x7c78[117]](_0x7c78[434],pic3urlimg);return pic3urlimg}function setpic4url(){pic4urlimg= $(_0x7c78[1035])[_0x7c78[59]]();localStorage[_0x7c78[117]](_0x7c78[435],pic4urlimg);return pic4urlimg}function setpic5url(){pic5urlimg= $(_0x7c78[1036])[_0x7c78[59]]();localStorage[_0x7c78[117]](_0x7c78[436],pic5urlimg);return pic5urlimg}function setpic6url(){pic6urlimg= $(_0x7c78[1037])[_0x7c78[59]]();localStorage[_0x7c78[117]](_0x7c78[437],pic6urlimg);return pic6urlimg}function setdiscwebhook1(){discwebhook1= $(_0x7c78[1096])[_0x7c78[59]]();var _0x1499x1ba=$(_0x7c78[1096])[_0x7c78[59]]();if(~_0x1499x1ba[_0x7c78[179]](_0x7c78[1097])|| ~_0x1499x1ba[_0x7c78[179]](_0x7c78[1098])){localStorage[_0x7c78[117]](_0x7c78[456],discwebhook1);var _0x1499x19f=document[_0x7c78[936]](_0x7c78[935]);_0x1499x19f[_0x7c78[926]]= _0x7c78[937];_0x1499x19f[_0x7c78[470]]= _0x7c78[1099];$(_0x7c78[280])[_0x7c78[279]](_0x1499x19f)}else {if(_0x1499x1ba== _0x7c78[6]){localStorage[_0x7c78[117]](_0x7c78[456],discwebhook1)}else {toastr[_0x7c78[173]](Premadeletter36)[_0x7c78[73]](_0x7c78[71],_0x7c78[267])}}}function setdiscwebhook2(){discwebhook2= $(_0x7c78[1100])[_0x7c78[59]]();var _0x1499x1ba=$(_0x7c78[1100])[_0x7c78[59]]();if(~_0x1499x1ba[_0x7c78[179]](_0x7c78[1097])|| ~_0x1499x1ba[_0x7c78[179]](_0x7c78[1098])){localStorage[_0x7c78[117]](_0x7c78[457],discwebhook2)}else {if(_0x1499x1ba== _0x7c78[6]){localStorage[_0x7c78[117]](_0x7c78[457],discwebhook2)}else {toastr[_0x7c78[173]](Premadeletter36)[_0x7c78[73]](_0x7c78[71],_0x7c78[267])}}}function openbleedmod(){var _0x1499x19f=document[_0x7c78[936]](_0x7c78[935]);_0x1499x19f[_0x7c78[926]]= _0x7c78[937];_0x1499x19f[_0x7c78[470]]= _0x7c78[1101];$(_0x7c78[280])[_0x7c78[279]](_0x1499x19f)}function openrotatingmod(){var _0x1499x19f=document[_0x7c78[936]](_0x7c78[935]);_0x1499x19f[_0x7c78[926]]= _0x7c78[937];_0x1499x19f[_0x7c78[470]]= _0x7c78[1102];$(_0x7c78[280])[_0x7c78[279]](_0x1499x19f)}function languagemodfun(){if(languagemod!= 1){$(_0x7c78[1103])[_0x7c78[59]](languagemod);changeModLanguage()}}function changeModLanguage(){localStorage[_0x7c78[117]](_0x7c78[113],$(_0x7c78[1103])[_0x7c78[59]]());if($(_0x7c78[1103])[_0x7c78[59]]()== 1){languageinjector(_0x7c78[1104])}else {if($(_0x7c78[1103])[_0x7c78[59]]()== 2){languageinjector(_0x7c78[1105])}else {if($(_0x7c78[1103])[_0x7c78[59]]()== 3){languageinjector(_0x7c78[1106])}else {if($(_0x7c78[1103])[_0x7c78[59]]()== 4){languageinjector(_0x7c78[1107])}else {if($(_0x7c78[1103])[_0x7c78[59]]()== 5){languageinjector(_0x7c78[1108])}else {if($(_0x7c78[1103])[_0x7c78[59]]()== 6){languageinjector(_0x7c78[1109])}else {if($(_0x7c78[1103])[_0x7c78[59]]()== 7){languageinjector(_0x7c78[1110])}else {if($(_0x7c78[1103])[_0x7c78[59]]()== 8){languageinjector(_0x7c78[1111])}else {if($(_0x7c78[1103])[_0x7c78[59]]()== 9){languageinjector(_0x7c78[1112])}else {if($(_0x7c78[1103])[_0x7c78[59]]()== 10){languageinjector(_0x7c78[1113])}else {if($(_0x7c78[1103])[_0x7c78[59]]()== 11){languageinjector(_0x7c78[1114])}}}}}}}}}}}}function injector2(_0x1499x1c1,url2){var _0x1499x14f=document[_0x7c78[936]](_0x7c78[935]);_0x1499x14f[_0x7c78[939]]= function(){var _0x1499x1c2=document[_0x7c78[936]](_0x7c78[935]);_0x1499x1c2[_0x7c78[470]]= url2;document[_0x7c78[974]](_0x7c78[647])[0][_0x7c78[940]](_0x1499x1c2)};_0x1499x14f[_0x7c78[470]]= _0x1499x1c1;document[_0x7c78[974]](_0x7c78[647])[0][_0x7c78[940]](_0x1499x14f)}function languageinjector(url){injector2(url,_0x7c78[1115])}function newsubmit(){if(legendmod[_0x7c78[387]]== true){$(_0x7c78[236])[_0x7c78[208]]()}}function triggerLMbtns(){PanelImageSrc= $(_0x7c78[103])[_0x7c78[59]]();if(PanelImageSrc!= _0x7c78[6]|| PanelImageSrc!= _0x7c78[1116]|| PanelImageSrc!= _0x7c78[1117]){$(_0x7c78[1120])[_0x7c78[73]](_0x7c78[518],_0x7c78[1118]+ PanelImageSrc+ _0x7c78[1119])};$(_0x7c78[1122])[_0x7c78[1121]](function(){if(PanelImageSrc!= _0x7c78[6]|| PanelImageSrc!= _0x7c78[1116]|| PanelImageSrc!= _0x7c78[1117]){$(_0x7c78[1120])[_0x7c78[73]](_0x7c78[518],_0x7c78[1118]+ PanelImageSrc+ _0x7c78[1119])}});$(_0x7c78[1123])[_0x7c78[1121]](function(){if(PanelImageSrc!= _0x7c78[6]|| PanelImageSrc!= _0x7c78[1116]|| PanelImageSrc!= _0x7c78[1117]){$(_0x7c78[1120])[_0x7c78[73]](_0x7c78[518],_0x7c78[1118]+ PanelImageSrc+ _0x7c78[1119])}});$(_0x7c78[1124])[_0x7c78[1121]](function(){if(PanelImageSrc!= _0x7c78[6]|| PanelImageSrc!= _0x7c78[1116]|| PanelImageSrc!= _0x7c78[1117]){$(_0x7c78[1120])[_0x7c78[73]](_0x7c78[518],_0x7c78[1118]+ PanelImageSrc+ _0x7c78[1119])}});$(_0x7c78[1125])[_0x7c78[1121]](function(){if(PanelImageSrc!= _0x7c78[6]|| PanelImageSrc!= _0x7c78[1116]|| PanelImageSrc!= _0x7c78[1117]){$(_0x7c78[1120])[_0x7c78[73]](_0x7c78[518],_0x7c78[1118]+ PanelImageSrc+ _0x7c78[1119])}});if(SHOSHOBtn== _0x7c78[115]){$(_0x7c78[209])[_0x7c78[208]]()};if(MAINBTBtn== _0x7c78[115]){$(_0x7c78[210])[_0x7c78[208]]()};if(AnimatedSkinBtn== _0x7c78[115]){$(_0x7c78[1126])[_0x7c78[208]]()};if(XPBtn== _0x7c78[115]){$(_0x7c78[211])[_0x7c78[208]]()};if(TIMEcalBtn== _0x7c78[115]){$(_0x7c78[1127])[_0x7c78[208]]()};document[_0x7c78[407]](_0x7c78[1128])[_0x7c78[405]]= localStorage[_0x7c78[3]](_0x7c78[428]);if($(_0x7c78[1022])[_0x7c78[59]]()!= _0x7c78[6]){setminbgname()};document[_0x7c78[407]](_0x7c78[1129])[_0x7c78[405]]= localStorage[_0x7c78[3]](_0x7c78[431]);if($(_0x7c78[1023])[_0x7c78[59]]()!= _0x7c78[6]){setleadbgname()};document[_0x7c78[407]](_0x7c78[1130])[_0x7c78[405]]= localStorage[_0x7c78[3]](_0x7c78[429]);if($(_0x7c78[1024])[_0x7c78[59]]()!= _0x7c78[6]){setteambgname()};document[_0x7c78[407]](_0x7c78[1131])[_0x7c78[405]]= localStorage[_0x7c78[3]](_0x7c78[430]);if($(_0x7c78[1025])[_0x7c78[59]]()!= _0x7c78[6]){setcanvasbgname()};document[_0x7c78[407]](_0x7c78[41])[_0x7c78[405]]= localStorage[_0x7c78[3]](_0x7c78[41]);if($(_0x7c78[1026])[_0x7c78[59]]()!= _0x7c78[6]){setleadbtext()};document[_0x7c78[407]](_0x7c78[42])[_0x7c78[405]]= localStorage[_0x7c78[3]](_0x7c78[42]);if($(_0x7c78[1027])[_0x7c78[59]]()!= _0x7c78[6]){setteambtext()};document[_0x7c78[407]](_0x7c78[43])[_0x7c78[405]]= localStorage[_0x7c78[3]](_0x7c78[43]);if($(_0x7c78[1028])[_0x7c78[59]]()!= _0x7c78[6]){setimgUrl()};document[_0x7c78[407]](_0x7c78[44])[_0x7c78[405]]= localStorage[_0x7c78[3]](_0x7c78[44]);if($(_0x7c78[1029])[_0x7c78[59]]()!= _0x7c78[6]){setimgHref()};document[_0x7c78[407]](_0x7c78[40])[_0x7c78[405]]= localStorage[_0x7c78[3]](_0x7c78[40]);if($(_0x7c78[1030])[_0x7c78[59]]()!= _0x7c78[6]&& $(_0x7c78[1030])[_0x7c78[59]]()!= null){setminbtext()};document[_0x7c78[407]](_0x7c78[1132])[_0x7c78[405]]= localStorage[_0x7c78[3]](_0x7c78[432]);if($(_0x7c78[1032])[_0x7c78[59]]()!= _0x7c78[6]){setpic1url()};document[_0x7c78[407]](_0x7c78[1133])[_0x7c78[405]]= localStorage[_0x7c78[3]](_0x7c78[433]);if($(_0x7c78[1033])[_0x7c78[59]]()!= _0x7c78[6]){setpic2url()};document[_0x7c78[407]](_0x7c78[1134])[_0x7c78[405]]= localStorage[_0x7c78[3]](_0x7c78[434]);if($(_0x7c78[1034])[_0x7c78[59]]()!= _0x7c78[6]){setpic3url()};document[_0x7c78[407]](_0x7c78[1135])[_0x7c78[405]]= localStorage[_0x7c78[3]](_0x7c78[435]);if($(_0x7c78[1035])[_0x7c78[59]]()!= _0x7c78[6]){setpic4url()};document[_0x7c78[407]](_0x7c78[1136])[_0x7c78[405]]= localStorage[_0x7c78[3]](_0x7c78[436]);if($(_0x7c78[1036])[_0x7c78[59]]()!= _0x7c78[6]){setpic5url()};document[_0x7c78[407]](_0x7c78[1137])[_0x7c78[405]]= localStorage[_0x7c78[3]](_0x7c78[437]);if($(_0x7c78[1037])[_0x7c78[59]]()!= _0x7c78[6]){setpic6url()};document[_0x7c78[407]](_0x7c78[1138])[_0x7c78[405]]= localStorage[_0x7c78[3]](_0x7c78[438]);if($(_0x7c78[1012])[_0x7c78[59]]()!= _0x7c78[6]){setyt1url()};document[_0x7c78[407]](_0x7c78[1139])[_0x7c78[405]]= localStorage[_0x7c78[3]](_0x7c78[439]);if($(_0x7c78[1013])[_0x7c78[59]]()!= _0x7c78[6]){setyt2url()};document[_0x7c78[407]](_0x7c78[1140])[_0x7c78[405]]= localStorage[_0x7c78[3]](_0x7c78[440]);if($(_0x7c78[1014])[_0x7c78[59]]()!= _0x7c78[6]){setyt3url()};document[_0x7c78[407]](_0x7c78[1141])[_0x7c78[405]]= localStorage[_0x7c78[3]](_0x7c78[441]);if($(_0x7c78[1015])[_0x7c78[59]]()!= _0x7c78[6]){setyt4url()};document[_0x7c78[407]](_0x7c78[1142])[_0x7c78[405]]= localStorage[_0x7c78[3]](_0x7c78[442]);if($(_0x7c78[1016])[_0x7c78[59]]()!= _0x7c78[6]){setyt5url()};document[_0x7c78[407]](_0x7c78[1143])[_0x7c78[405]]= localStorage[_0x7c78[3]](_0x7c78[443]);if($(_0x7c78[1017])[_0x7c78[59]]()!= _0x7c78[6]){setyt6url()};document[_0x7c78[407]](_0x7c78[1144])[_0x7c78[405]]= localStorage[_0x7c78[3]](_0x7c78[444]);if($(_0x7c78[985])[_0x7c78[59]]()!= _0x7c78[6]){setpic1data()};document[_0x7c78[407]](_0x7c78[1145])[_0x7c78[405]]= localStorage[_0x7c78[3]](_0x7c78[445]);if($(_0x7c78[988])[_0x7c78[59]]()!= _0x7c78[6]){setpic2data()};document[_0x7c78[407]](_0x7c78[1146])[_0x7c78[405]]= localStorage[_0x7c78[3]](_0x7c78[446]);if($(_0x7c78[990])[_0x7c78[59]]()!= _0x7c78[6]){setpic3data()};document[_0x7c78[407]](_0x7c78[1147])[_0x7c78[405]]= localStorage[_0x7c78[3]](_0x7c78[447]);if($(_0x7c78[992])[_0x7c78[59]]()!= _0x7c78[6]){setpic4data()};document[_0x7c78[407]](_0x7c78[1148])[_0x7c78[405]]= localStorage[_0x7c78[3]](_0x7c78[448]);if($(_0x7c78[994])[_0x7c78[59]]()!= _0x7c78[6]){setpic5data()};document[_0x7c78[407]](_0x7c78[1149])[_0x7c78[405]]= localStorage[_0x7c78[3]](_0x7c78[449]);if($(_0x7c78[996])[_0x7c78[59]]()!= _0x7c78[6]){setpic6data()};document[_0x7c78[407]](_0x7c78[1150])[_0x7c78[405]]= localStorage[_0x7c78[3]](_0x7c78[450]);if($(_0x7c78[1000])[_0x7c78[59]]()!= _0x7c78[6]){setyt1data()};document[_0x7c78[407]](_0x7c78[1151])[_0x7c78[405]]= localStorage[_0x7c78[3]](_0x7c78[451]);if($(_0x7c78[1002])[_0x7c78[59]]()!= _0x7c78[6]){setyt2data()};document[_0x7c78[407]](_0x7c78[1152])[_0x7c78[405]]= localStorage[_0x7c78[3]](_0x7c78[452]);if($(_0x7c78[1004])[_0x7c78[59]]()!= _0x7c78[6]){setyt3data()};document[_0x7c78[407]](_0x7c78[1153])[_0x7c78[405]]= localStorage[_0x7c78[3]](_0x7c78[453]);if($(_0x7c78[1006])[_0x7c78[59]]()!= _0x7c78[6]){setyt4data()};document[_0x7c78[407]](_0x7c78[1154])[_0x7c78[405]]= localStorage[_0x7c78[3]](_0x7c78[454]);if($(_0x7c78[1008])[_0x7c78[59]]()!= _0x7c78[6]){setyt5data()};document[_0x7c78[407]](_0x7c78[1155])[_0x7c78[405]]= localStorage[_0x7c78[3]](_0x7c78[455]);if($(_0x7c78[1010])[_0x7c78[59]]()!= _0x7c78[6]){setyt6data()};document[_0x7c78[407]](_0x7c78[456])[_0x7c78[405]]= localStorage[_0x7c78[3]](_0x7c78[456]);if($(_0x7c78[1096])[_0x7c78[59]]()!= _0x7c78[6]&& $(_0x7c78[1096])[_0x7c78[59]]()!= null){setdiscwebhook1()};document[_0x7c78[407]](_0x7c78[457])[_0x7c78[405]]= localStorage[_0x7c78[3]](_0x7c78[457]);if($(_0x7c78[1100])[_0x7c78[59]]()!= _0x7c78[6]&& $(_0x7c78[1100])[_0x7c78[59]]()!= null){setdiscwebhook2()};$(_0x7c78[1157])[_0x7c78[279]](_0x7c78[1156]);if(dyinglight1load== null|| dyinglight1load== _0x7c78[4]){$(_0x7c78[1160])[_0x7c78[1159]](_0x7c78[1158])}else {if(dyinglight1load== _0x7c78[1161]){opendyinglight();$(_0x7c78[1160])[_0x7c78[1159]](_0x7c78[1162])}}}function opendyinglight(){var _0x1499x19f=document[_0x7c78[936]](_0x7c78[935]);_0x1499x19f[_0x7c78[926]]= _0x7c78[937];_0x1499x19f[_0x7c78[470]]= _0x7c78[1163];$(_0x7c78[280])[_0x7c78[279]](_0x1499x19f)}function bluebtns(){var _0x1499x1c8=$(_0x7c78[1164])[_0x7c78[59]]();$(_0x7c78[1166])[_0x7c78[665]](function(){$(_0x7c78[1166])[_0x7c78[73]](_0x7c78[397],_0x1499x1c8)})[_0x7c78[663]](function(){$(_0x7c78[1166])[_0x7c78[73]](_0x7c78[397],_0x7c78[1165])});$(_0x7c78[1167])[_0x7c78[665]](function(){$(_0x7c78[1167])[_0x7c78[73]](_0x7c78[397],_0x1499x1c8)})[_0x7c78[663]](function(){$(_0x7c78[1167])[_0x7c78[73]](_0x7c78[397],_0x7c78[1165])});$(_0x7c78[1168])[_0x7c78[665]](function(){$(_0x7c78[1168])[_0x7c78[73]](_0x7c78[397],_0x1499x1c8)})[_0x7c78[663]](function(){$(_0x7c78[1168])[_0x7c78[73]](_0x7c78[397],_0x7c78[1165])});$(_0x7c78[1122])[_0x7c78[665]](function(){$(_0x7c78[1122])[_0x7c78[73]](_0x7c78[397],_0x1499x1c8)})[_0x7c78[663]](function(){$(_0x7c78[1122])[_0x7c78[73]](_0x7c78[397],_0x7c78[1165])});$(_0x7c78[1123])[_0x7c78[665]](function(){$(_0x7c78[1123])[_0x7c78[73]](_0x7c78[397],_0x1499x1c8)})[_0x7c78[663]](function(){$(_0x7c78[1123])[_0x7c78[73]](_0x7c78[397],_0x7c78[1165])});$(_0x7c78[1124])[_0x7c78[665]](function(){$(_0x7c78[1124])[_0x7c78[73]](_0x7c78[397],_0x1499x1c8)})[_0x7c78[663]](function(){$(_0x7c78[1124])[_0x7c78[73]](_0x7c78[397],_0x7c78[1165])});$(_0x7c78[1125])[_0x7c78[665]](function(){$(_0x7c78[1125])[_0x7c78[73]](_0x7c78[397],_0x1499x1c8)})[_0x7c78[663]](function(){$(_0x7c78[1125])[_0x7c78[73]](_0x7c78[397],_0x7c78[1165])});$(_0x7c78[1169])[_0x7c78[665]](function(){$(_0x7c78[1169])[_0x7c78[73]](_0x7c78[397],_0x1499x1c8)})[_0x7c78[663]](function(){$(_0x7c78[1169])[_0x7c78[73]](_0x7c78[397],_0x7c78[1165])});$(_0x7c78[1170])[_0x7c78[665]](function(){$(_0x7c78[1170])[_0x7c78[73]](_0x7c78[397],_0x1499x1c8)})[_0x7c78[663]](function(){$(_0x7c78[1170])[_0x7c78[73]](_0x7c78[397],_0x7c78[1165])});$(_0x7c78[1171])[_0x7c78[665]](function(){$(_0x7c78[1171])[_0x7c78[73]](_0x7c78[397],_0x1499x1c8)})[_0x7c78[663]](function(){$(_0x7c78[1171])[_0x7c78[73]](_0x7c78[397],_0x7c78[1165])});$(_0x7c78[1172])[_0x7c78[665]](function(){$(_0x7c78[1172])[_0x7c78[73]](_0x7c78[397],_0x1499x1c8)})[_0x7c78[663]](function(){$(_0x7c78[1172])[_0x7c78[73]](_0x7c78[397],_0x7c78[1165])});$(_0x7c78[1173])[_0x7c78[665]](function(){$(_0x7c78[1173])[_0x7c78[73]](_0x7c78[397],_0x1499x1c8)})[_0x7c78[663]](function(){$(_0x7c78[1173])[_0x7c78[73]](_0x7c78[397],_0x7c78[1165])});$(_0x7c78[1174])[_0x7c78[665]](function(){$(_0x7c78[1174])[_0x7c78[73]](_0x7c78[397],_0x1499x1c8)})[_0x7c78[663]](function(){$(_0x7c78[1174])[_0x7c78[73]](_0x7c78[397],_0x7c78[1165])});$(_0x7c78[544])[_0x7c78[665]](function(){$(_0x7c78[544])[_0x7c78[73]](_0x7c78[397],_0x1499x1c8)})[_0x7c78[663]](function(){$(_0x7c78[544])[_0x7c78[73]](_0x7c78[397],_0x7c78[1165])});$(_0x7c78[1175])[_0x7c78[665]](function(){$(_0x7c78[1175])[_0x7c78[73]](_0x7c78[397],_0x1499x1c8)})[_0x7c78[663]](function(){$(_0x7c78[1175])[_0x7c78[73]](_0x7c78[397],_0x7c78[1165])});$(_0x7c78[1176])[_0x7c78[665]](function(){$(_0x7c78[1176])[_0x7c78[73]](_0x7c78[397],_0x1499x1c8)})[_0x7c78[663]](function(){$(_0x7c78[1176])[_0x7c78[73]](_0x7c78[397],_0x7c78[1165])});$(_0x7c78[1177])[_0x7c78[665]](function(){$(_0x7c78[1177])[_0x7c78[73]](_0x7c78[397],_0x1499x1c8)})[_0x7c78[663]](function(){$(_0x7c78[1177])[_0x7c78[73]](_0x7c78[397],_0x7c78[1165])});$(_0x7c78[1178])[_0x7c78[665]](function(){$(_0x7c78[1178])[_0x7c78[73]](_0x7c78[397],_0x1499x1c8)})[_0x7c78[663]](function(){$(_0x7c78[1178])[_0x7c78[73]](_0x7c78[397],_0x7c78[1165])});$(_0x7c78[1179])[_0x7c78[665]](function(){$(_0x7c78[1179])[_0x7c78[73]](_0x7c78[397],_0x1499x1c8)})[_0x7c78[663]](function(){$(_0x7c78[1179])[_0x7c78[73]](_0x7c78[397],_0x7c78[1165])});$(_0x7c78[1180])[_0x7c78[665]](function(){$(_0x7c78[1180])[_0x7c78[73]](_0x7c78[397],_0x1499x1c8)})[_0x7c78[663]](function(){$(_0x7c78[1180])[_0x7c78[73]](_0x7c78[397],_0x7c78[1165])});$(_0x7c78[1181])[_0x7c78[665]](function(){$(_0x7c78[1181])[_0x7c78[73]](_0x7c78[397],_0x1499x1c8)})[_0x7c78[663]](function(){$(_0x7c78[1181])[_0x7c78[73]](_0x7c78[397],_0x7c78[1165])});$(_0x7c78[1182])[_0x7c78[665]](function(){$(_0x7c78[1182])[_0x7c78[73]](_0x7c78[397],_0x1499x1c8)})[_0x7c78[663]](function(){$(_0x7c78[1182])[_0x7c78[73]](_0x7c78[397],_0x7c78[1165])});$(_0x7c78[987])[_0x7c78[665]](function(){$(_0x7c78[987])[_0x7c78[73]](_0x7c78[397],_0x1499x1c8)})[_0x7c78[663]](function(){$(_0x7c78[987])[_0x7c78[73]](_0x7c78[397],_0x7c78[1165])});$(_0x7c78[989])[_0x7c78[665]](function(){$(_0x7c78[989])[_0x7c78[73]](_0x7c78[397],_0x1499x1c8)})[_0x7c78[663]](function(){$(_0x7c78[989])[_0x7c78[73]](_0x7c78[397],_0x7c78[1165])});$(_0x7c78[991])[_0x7c78[665]](function(){$(_0x7c78[991])[_0x7c78[73]](_0x7c78[397],_0x1499x1c8)})[_0x7c78[663]](function(){$(_0x7c78[991])[_0x7c78[73]](_0x7c78[397],_0x7c78[1165])});$(_0x7c78[993])[_0x7c78[665]](function(){$(_0x7c78[993])[_0x7c78[73]](_0x7c78[397],_0x1499x1c8)})[_0x7c78[663]](function(){$(_0x7c78[993])[_0x7c78[73]](_0x7c78[397],_0x7c78[1165])});$(_0x7c78[995])[_0x7c78[665]](function(){$(_0x7c78[995])[_0x7c78[73]](_0x7c78[397],_0x1499x1c8)})[_0x7c78[663]](function(){$(_0x7c78[995])[_0x7c78[73]](_0x7c78[397],_0x7c78[1165])});$(_0x7c78[997])[_0x7c78[665]](function(){$(_0x7c78[997])[_0x7c78[73]](_0x7c78[397],_0x1499x1c8)})[_0x7c78[663]](function(){$(_0x7c78[997])[_0x7c78[73]](_0x7c78[397],_0x7c78[1165])});$(_0x7c78[1001])[_0x7c78[665]](function(){$(_0x7c78[1001])[_0x7c78[73]](_0x7c78[397],_0x1499x1c8)})[_0x7c78[663]](function(){$(_0x7c78[1001])[_0x7c78[73]](_0x7c78[397],_0x7c78[1165])});$(_0x7c78[1003])[_0x7c78[665]](function(){$(_0x7c78[1003])[_0x7c78[73]](_0x7c78[397],_0x1499x1c8)})[_0x7c78[663]](function(){$(_0x7c78[1003])[_0x7c78[73]](_0x7c78[397],_0x7c78[1165])});$(_0x7c78[1005])[_0x7c78[665]](function(){$(_0x7c78[1005])[_0x7c78[73]](_0x7c78[397],_0x1499x1c8)})[_0x7c78[663]](function(){$(_0x7c78[1005])[_0x7c78[73]](_0x7c78[397],_0x7c78[1165])});$(_0x7c78[1007])[_0x7c78[665]](function(){$(_0x7c78[1007])[_0x7c78[73]](_0x7c78[397],_0x1499x1c8)})[_0x7c78[663]](function(){$(_0x7c78[1007])[_0x7c78[73]](_0x7c78[397],_0x7c78[1165])});$(_0x7c78[1009])[_0x7c78[665]](function(){$(_0x7c78[1009])[_0x7c78[73]](_0x7c78[397],_0x1499x1c8)})[_0x7c78[663]](function(){$(_0x7c78[1009])[_0x7c78[73]](_0x7c78[397],_0x7c78[1165])});$(_0x7c78[1011])[_0x7c78[665]](function(){$(_0x7c78[1011])[_0x7c78[73]](_0x7c78[397],_0x1499x1c8)})[_0x7c78[663]](function(){$(_0x7c78[1011])[_0x7c78[73]](_0x7c78[397],_0x7c78[1165])});$(_0x7c78[1183])[_0x7c78[665]](function(){$(_0x7c78[1183])[_0x7c78[73]](_0x7c78[397],_0x1499x1c8)})[_0x7c78[663]](function(){$(_0x7c78[1183])[_0x7c78[73]](_0x7c78[397],_0x7c78[1165])})}function YoutubebackgroundEnable(){inject(_0x7c78[1047],_0x7c78[1184]+ _0x7c78[1185]+ _0x7c78[1186]+ _0x7c78[1187]+ _0x7c78[1188]+ _0x7c78[1189]+ _0x7c78[1190]);$(_0x7c78[280])[_0x7c78[279]](_0x7c78[1191]+ getParameterByName(_0x7c78[160],$(_0x7c78[469])[_0x7c78[59]]())+ _0x7c78[1192]+ getParameterByName(_0x7c78[161],$(_0x7c78[469])[_0x7c78[59]]())+ _0x7c78[1193])}function YoutubebackgroundDisable(){$(_0x7c78[1194])[_0x7c78[176]]()}function settrolling(){playSound(_0x7c78[1195]);$(_0x7c78[1091])[_0x7c78[73]](_0x7c78[518],_0x7c78[1196])[_0x7c78[73]]({opacity:0.8});$(_0x7c78[1088])[_0x7c78[73]](_0x7c78[518],_0x7c78[1197])[_0x7c78[73]]({opacity:1});$(_0x7c78[1090])[_0x7c78[73]](_0x7c78[518],_0x7c78[1198])[_0x7c78[73]]({opacity:0.8});setTimeout(function(){$(_0x7c78[1091])[_0x7c78[73]](_0x7c78[518],_0x7c78[1199])[_0x7c78[73]]({opacity:0.8})},4000);setTimeout(function(){$(_0x7c78[1091])[_0x7c78[73]](_0x7c78[518],_0x7c78[521])[_0x7c78[73]]({opacity:1});$(_0x7c78[1090])[_0x7c78[73]](_0x7c78[518],_0x7c78[1086]+ leadbimg+ _0x7c78[1087])[_0x7c78[73]]({opacity:0.8})},8000);setTimeout(function(){$(_0x7c78[1088])[_0x7c78[73]](_0x7c78[518],_0x7c78[1086]+ minimapbckimg+ _0x7c78[1087])[_0x7c78[73]]({opacity:0.8})},27000)}function preventcanvasimagecrash(){CanvasRenderingContext2D[_0x7c78[125]][_0x7c78[1200]]= CanvasRenderingContext2D[_0x7c78[125]][_0x7c78[1201]];CanvasRenderingContext2D[_0x7c78[125]][_0x7c78[1201]]= function(){const _0x1499x1cd=arguments[0];if(!_0x1499x1cd|| _0x1499x1cd[_0x7c78[71]]< 1 || _0x1499x1cd[_0x7c78[715]]< 1){return void(console[_0x7c78[283]](_0x7c78[1202]))};this._drawImage(...arguments)}}function joint(_0x1499x8e){var _0x1499x91;return _0x1499x91= _0x1499x8e[_0x1499x8e[_0x7c78[140]]- 1],_0x1499x8e[_0x7c78[475]](),_0x1499x8e= _0x1499x8e[_0x7c78[140]]> 1?joint(_0x1499x8e):_0x1499x8e[0],function(){_0x1499x91[_0x7c78[129]]( new _0x1499x8e)}}function emphasischat(){var _0x1499x114=window;var _0x1499x115={"\x6E\x61\x6D\x65":_0x7c78[1203],"\x6C\x6F\x67":function(_0x1499x116){console[_0x7c78[283]](this[_0x7c78[601]]+ _0x7c78[239]+ _0x1499x116)}};var _0x1499x117={};var _0x1499x118={},_0x1499x119={"\x65\x6D\x70\x68\x61\x73\x69\x73\x5F\x62\x67\x63\x6F\x6C\x6F\x72":_0x7c78[1204],"\x65\x6D\x70\x68\x61\x73\x69\x73\x5F\x74\x69\x6D\x65":5000,"\x68\x69\x73\x74\x68\x69\x64\x65\x5F\x74\x69\x6D\x65":10000,"\x73\x63\x72\x6F\x6C\x6C\x5F\x64\x75\x6C\x61\x74\x69\x6F\x6E":200};function _0x1499x11a(){if(!document[_0x7c78[407]](_0x7c78[622])){_0x1499x115[_0x7c78[623]]= (_0x1499x115[_0x7c78[623]]|| 1000)+ 1000;setTimeout(_0x1499x11a,_0x1499x115[_0x7c78[623]]);_0x1499x115[_0x7c78[283]](_0x7c78[1205]);return};setTimeout(_0x1499x11b,1000)}_0x1499x11a();function _0x1499x11b(){_0x1499x118= _0x1499x119;_0x1499x114[_0x1499x115[_0x7c78[601]]]= {my:_0x1499x115,stat:_0x1499x117,cfg:_0x1499x118};_0x1499x117[_0x7c78[1206]]= new MutationObserver((_0x1499x1d0)=>{_0x1499x1d0[_0x7c78[832]]((_0x1499x1d1)=>{_0x1499x115[_0x7c78[1208]](_0x1499x1d1[_0x7c78[1207]])})});_0x1499x117[_0x7c78[1206]][_0x7c78[1210]]($(_0x7c78[597])[_0x7c78[1209]](0),{"\x63\x68\x69\x6C\x64\x4C\x69\x73\x74":true});_0x1499x117[_0x7c78[1211]]= new MutationObserver((_0x1499x1d0)=>{_0x1499x1d0[_0x7c78[832]]((_0x1499x1d1)=>{if(_0x1499x1d1[_0x7c78[1212]]!== _0x7c78[1045]){return};var _0x1499x1d2=_0x1499x1d1[_0x7c78[1213]][_0x7c78[1045]][_0x7c78[523]];if(_0x1499x1d2=== _0x7c78[732]){_0x1499x115[_0x7c78[1214]]()}else {if(_0x1499x1d2=== _0x7c78[525]){_0x1499x115[_0x7c78[1215]]()}}})});_0x1499x117[_0x7c78[1211]][_0x7c78[1210]]($(_0x7c78[524])[_0x7c78[1209]](0),{"\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73":true})}_0x1499x115[_0x7c78[1208]]= function(_0x1499x1d3){_0x1499x115[_0x7c78[1216]](true);_0x1499x1d3[_0x7c78[832]]((_0x1499x1d4)=>{var _0x1499x1d5=$(_0x1499x1d4);if(_0x1499x1d5[_0x7c78[721]](_0x7c78[835])){var _0x1499x1d6=_0x1499x1d5[_0x7c78[73]](_0x7c78[397]);_0x1499x1d5[_0x7c78[73]](_0x7c78[397],_0x1499x118[_0x7c78[1217]]);setTimeout(function(){_0x1499x1d5[_0x7c78[73]](_0x7c78[397],_0x1499x1d6)},_0x1499x118[_0x7c78[1218]])}});var _0x1499x1d7=$(_0x7c78[597]);_0x1499x1d7[_0x7c78[863]](_0x7c78[706]);_0x1499x1d7[_0x7c78[865]]({"\x73\x63\x72\x6F\x6C\x6C\x54\x6F\x70":_0x1499x1d7[_0x7c78[257]](_0x7c78[864])},_0x1499x118[_0x7c78[1219]])};_0x1499x115[_0x7c78[1216]]= function(_0x1499x1d8){if(_0x1499x117[_0x7c78[1220]]){clearTimeout(_0x1499x117[_0x7c78[1220]]);_0x1499x117[_0x7c78[1220]]= null};var _0x1499x1d2=$(_0x7c78[597])[_0x7c78[73]](_0x7c78[523]);if(_0x1499x1d2=== _0x7c78[525]){_0x1499x117[_0x7c78[1221]]= true};if(_0x1499x117[_0x7c78[1221]]&& _0x1499x1d8){_0x1499x117[_0x7c78[1220]]= setTimeout(function(){_0x1499x117[_0x7c78[1221]]= false},_0x1499x118[_0x7c78[1222]])}};_0x1499x115[_0x7c78[1214]]= function(){_0x1499x115[_0x7c78[1216]](false)};_0x1499x115[_0x7c78[1215]]= function(){}}function IdfromLegendmod(){if(document[_0x7c78[56]][_0x7c78[55]](_0x7c78[54])&& $(_0x7c78[1223])[_0x7c78[59]]()!= _0x7c78[6]){window[_0x7c78[112]]= $(_0x7c78[1223])[_0x7c78[59]]();localStorage[_0x7c78[117]](_0x7c78[112],window[_0x7c78[112]])}}function SNEZOgarUpload(){IdfromLegendmod();if(userid== _0x7c78[6]|| userid== null){toastr[_0x7c78[184]](_0x7c78[199]+ Premadeletter123+ _0x7c78[200]+ Premadeletter128)}else {postSNEZ(_0x7c78[1224],userid,_0x7c78[1225],escape($(_0x7c78[394])[_0x7c78[59]]()));toastr[_0x7c78[184]](_0x7c78[199]+ Premadeletter123+ _0x7c78[200]+ Premadeletter129+ _0x7c78[905]+ Languageletter363+ _0x7c78[1226]+ userid+ _0x7c78[1227])}}function SNEZOgarDownload(){IdfromLegendmod();if(userid== _0x7c78[6]|| userid== null){toastr[_0x7c78[184]](_0x7c78[199]+ Premadeletter123+ _0x7c78[200]+ Premadeletter128)}else {getSNEZ(_0x7c78[1224],userid,_0x7c78[1225]);var _0x1499x1dc=xhttp[_0x7c78[1228]];$(_0x7c78[403])[_0x7c78[59]](unescape(_0x1499x1dc));$(_0x7c78[413])[_0x7c78[208]]()}}function SNEZServers(){var _0x1499x1de=function(_0x1499x8d,_0x1499x1df){var _0x1499x1e0=setInterval(function(){var _0x1499x1e1=[_0x7c78[372],_0x7c78[1229],_0x7c78[1230],_0x7c78[1231]];var _0x1499x1e2=true;_0x1499x1e1[_0x7c78[832]](function(_0x1499x1e3){if(!document[_0x7c78[407]](_0x1499x1e3)){_0x1499x1e2= false}});if(_0x1499x1e2){clearInterval(_0x1499x1e0);_0x1499x8d(_0x1499x1df)}},100)};window[_0x7c78[109]]= localStorage[_0x7c78[3]](_0x7c78[109]);window[_0x7c78[110]]= localStorage[_0x7c78[3]](_0x7c78[110]);var _0x1499x1e4={nickname:null,server:null,tag:null,AID:null,hidecountry:false,userfirstname:null,userlastname:null,agarioUID:null};var _0x1499x1e1={nickname:_0x7c78[372],server:_0x7c78[1229],tag:_0x7c78[1230],reconnectButton:_0x7c78[1231]};var _0x1499x1e5={server:_0x7c78[1232],client:null,connect:function(){_0x1499x1e5[_0x7c78[1233]]= new WebSocket(_0x1499x1e5[_0x7c78[1234]]);_0x1499x1e5[_0x7c78[1233]][_0x7c78[1235]]= _0x1499x1e5[_0x7c78[1236]];_0x1499x1e5[_0x7c78[1233]][_0x7c78[1237]]= _0x1499x1e5[_0x7c78[1238]];_0x1499x1e5[_0x7c78[1233]][_0x7c78[1239]]= _0x1499x1e5[_0x7c78[1240]]},reconnect:function(){console[_0x7c78[283]](_0x7c78[1241]);setTimeout(function(){_0x1499x1e5[_0x7c78[704]]()},5000)},updateServerDetails:function(){_0x1499x1e5[_0x7c78[123]]({id:_0x1499x1eb(),type:_0x7c78[1242],data:_0x1499x1e4})},updateDetails:function(){var _0x1499xe6=document[_0x7c78[407]](_0x1499x1e1[_0x7c78[1243]]);var _0x1499x1e6;if(realmode!= null&& region!= null){_0x1499x1e6= _0x7c78[212]+ $(_0x7c78[213])[_0x7c78[59]]()+ _0x7c78[214]+ _0x7c78[218]+ $(_0x7c78[60])[_0x7c78[59]]()+ _0x7c78[219]+ realmode}else {_0x1499x1e6= _0x7c78[212]+ $(_0x7c78[213])[_0x7c78[59]]()+ _0x7c78[214]};var _0x1499x1e7=document[_0x7c78[407]](_0x1499x1e1[_0x7c78[489]]);if(_0x1499x1e4[_0x7c78[1243]]!= _0x1499xe6[_0x7c78[405]]|| _0x1499x1e4[_0x7c78[1234]]!= _0x1499x1e6|| _0x1499x1e4[_0x7c78[489]]!= _0x1499x1e7[_0x7c78[405]]){_0x1499x1e4[_0x7c78[1243]]= _0x1499xe6[_0x7c78[405]];_0x1499x1e4[_0x7c78[1234]]= _0x1499x1e6;_0x1499x1e4[_0x7c78[489]]= _0x1499x1e7[_0x7c78[405]];_0x1499x1e4[_0x7c78[1244]]= window[_0x7c78[1245]];_0x1499x1e4[_0x7c78[1246]]= defaultmapsettings[_0x7c78[1246]];_0x1499x1e4[_0x7c78[109]]= window[_0x7c78[109]];_0x1499x1e4[_0x7c78[110]]= window[_0x7c78[110]];_0x1499x1e4[_0x7c78[186]]= window[_0x7c78[186]];_0x1499x1e4[_0x7c78[1247]]= window[_0x7c78[1247]];_0x1499x1e5[_0x7c78[1236]]()}},send:function(_0x1499x116){if(_0x1499x1e5[_0x7c78[1233]][_0x7c78[1248]]!== _0x1499x1e5[_0x7c78[1233]][_0x7c78[1249]]){return};_0x1499x1e5[_0x7c78[1233]][_0x7c78[123]](JSON[_0x7c78[415]](_0x1499x116))},onMessage:function(_0x1499x158){try{var _0x1499x87=JSON[_0x7c78[107]](_0x1499x158[_0x7c78[1250]]);switch(_0x1499x87[_0x7c78[926]]){case _0x7c78[1252]:_0x1499x1e5[_0x7c78[123]]({type:_0x7c78[1251]});break}}catch(e){console[_0x7c78[283]](e)}}};var _0x1499x1e8=function(){var _0x1499xe6=document[_0x7c78[407]](_0x1499x1e1[_0x7c78[1243]]);var _0x1499x84=document[_0x7c78[407]](_0x1499x1e1[_0x7c78[1234]]);var _0x1499x1e7=document[_0x7c78[407]](_0x1499x1e1[_0x7c78[489]]);var _0x1499x1e9=document[_0x7c78[407]](_0x1499x1e1[_0x7c78[1253]]);if(!_0x1499xe6){console[_0x7c78[283]](_0x7c78[1254]);return};_0x1499xe6[_0x7c78[1072]](_0x7c78[57],_0x1499x1e5[_0x7c78[1255]]);_0x1499x84[_0x7c78[1072]](_0x7c78[57],_0x1499x1e5[_0x7c78[1255]]);_0x1499x1e7[_0x7c78[1072]](_0x7c78[57],_0x1499x1e5[_0x7c78[1255]]);var _0x1499x1ea=null;_0x1499x1e9[_0x7c78[1072]](_0x7c78[208],function(_0x1499x12d){clearTimeout(_0x1499x1ea);_0x1499x1ea= setTimeout(_0x1499x1e5[_0x7c78[1255]],5000)});_0x1499x1e5[_0x7c78[704]]();setInterval(_0x1499x1e5[_0x7c78[1255]],5000)};function _0x1499x1eb(){return _0x1499x1ec(_0x7c78[1256])}function _0x1499x1ec(_0x1499x1ed){var _0x1499x8b=_0x1499x1ed+ _0x7c78[805];var _0x1499x1ee=decodeURIComponent(document[_0x7c78[233]]);var _0x1499x1ef=_0x1499x1ee[_0x7c78[190]](_0x7c78[1257]);for(var _0x1499xd8=0;_0x1499xd8< _0x1499x1ef[_0x7c78[140]];_0x1499xd8++){var _0x1499x8f=_0x1499x1ef[_0x1499xd8];while(_0x1499x8f[_0x7c78[1258]](0)== _0x7c78[481]){_0x1499x8f= _0x1499x8f[_0x7c78[956]](1)};if(_0x1499x8f[_0x7c78[179]](_0x1499x8b)== 0){return _0x1499x8f[_0x7c78[956]](_0x1499x8b[_0x7c78[140]],_0x1499x8f[_0x7c78[140]])}};return _0x7c78[6]}_0x1499x1de(_0x1499x1e8,null)}function getSNEZServers(_0x1499x1f1){client2= {server:_0x7c78[1232],ws:null,isOpen:false,onOpenCallback:null,onCloseCallback:null,onMessageCallback:null,connect:function(){client2[_0x7c78[701]]= new WebSocket(client2[_0x7c78[1234]]);client2[_0x7c78[701]][_0x7c78[1235]]= client2[_0x7c78[1259]];client2[_0x7c78[701]][_0x7c78[1237]]= client2[_0x7c78[1260]];client2[_0x7c78[701]][_0x7c78[1239]]= client2[_0x7c78[1240]]},disconnect:function(){client2[_0x7c78[701]][_0x7c78[1261]]()},onOpen:function(){},onClose:function(){},onMessage:function(_0x1499x1f2){if(client2[_0x7c78[1262]](_0x1499x1f2)){return};try{var _0x1499x87=JSON[_0x7c78[107]](_0x1499x1f2[_0x7c78[1250]]);if(client2[_0x7c78[1262]](_0x1499x87)|| client2[_0x7c78[1262]](_0x1499x87[_0x7c78[926]])){return}}catch(e){console[_0x7c78[283]](e);return};switch(_0x1499x87[_0x7c78[926]]){case _0x7c78[1252]:client2[_0x7c78[123]]({type:_0x7c78[1251]});break;case _0x7c78[1264]:client2[_0x7c78[1263]](_0x1499x87[_0x7c78[1250]]);break}},isEmpty:function(_0x1499x1f3){if( typeof _0x1499x1f3== _0x7c78[938]){return true};if(_0x1499x1f3[_0x7c78[140]]=== 0){return true};for(var _0x1499x12c in _0x1499x1f3){if(_0x1499x1f3[_0x7c78[932]](_0x1499x12c)){return false}};return true},updatePlayers:function(_0x1499x87){var _0x1499x1f4=0;var _0x1499x1f5=0;showonceusers3= 0;var _0x1499x1f6=0;_0x1499x87= JSON[_0x7c78[107]](_0x1499x87);for(var _0x1499x1f7=0;_0x1499x1f7< _0x1499x87[_0x7c78[140]];_0x1499x1f7++){if(_0x1499x87[_0x1499x1f7][_0x7c78[1243]]){if(_0x1499x87[_0x1499x1f7][_0x7c78[1243]][_0x7c78[179]]($(_0x7c78[969])[_0x7c78[59]]())>= 0){if(_0x1499x1f4== 0){_0x1499x1f4++;if(_0x1499x1f1== null){toastr[_0x7c78[157]](_0x7c78[1265])}};var _0x1499x1f8=JSON[_0x7c78[415]](_0x1499x87[_0x1499x1f7]);var _0x1499x1f9;var _0x1499x1fa;var _0x1499x1fb=getParameterByName(_0x7c78[89],_0x1499x1f8);var _0x1499x1fc=getParameterByName(_0x7c78[90],_0x1499x1f8);_0x1499x1f8= _0x1499x1f8[_0x7c78[956]](0,_0x1499x1f8[_0x7c78[179]](_0x7c78[214]));_0x1499x1f9= _0x1499x1f8[_0x7c78[190]](_0x7c78[212])[_0x7c78[475]]();_0x1499x1fa= _0x1499x1f8[_0x7c78[190]](_0x7c78[1266])[_0x7c78[475]]();_0x1499x1fa= _0x1499x1fa[_0x7c78[956]](_0x1499x1fa,_0x1499x1fa[_0x7c78[179]](_0x7c78[1267]));if(_0x1499x87[_0x1499x1f7][_0x7c78[1246]]== true&& _0x1499x87[_0x1499x1f7][_0x7c78[1268]]){_0x1499x87[_0x1499x1f7][_0x7c78[1268]][_0x7c78[1270]][_0x7c78[1269]]= _0x7c78[1271]};if(_0x1499x1fc&& _0x1499x87[_0x1499x1f7][_0x7c78[1268]]&& _0x1499x87[_0x1499x1f7][_0x7c78[1268]][_0x7c78[1270]]){_0x1499x1fc= _0x1499x1fc[_0x7c78[190]](_0x7c78[1274])[0][_0x7c78[190]](_0x7c78[1273])[0][_0x7c78[190]](_0x7c78[1272])[0];appendLog3(_0x7c78[1275]+ _0x1499x1fb+ _0x7c78[1276]+ _0x1499x1fc+ _0x7c78[1277]+ _0x1499x1fa[_0x7c78[158]]()+ _0x7c78[1278]+ _0x1499x87[_0x1499x1f7][_0x7c78[1268]][_0x7c78[1270]][_0x7c78[1269]][_0x7c78[804]]()+ _0x7c78[1279]+ _0x7c78[1280]+ _0x1499x1f9+ _0x7c78[1281],_0x1499x1f9,_0x1499x1fb,_0x1499x1fc)}else {if(_0x1499x87[_0x1499x1f7][_0x7c78[1268]]&& _0x1499x87[_0x1499x1f7][_0x7c78[1268]][_0x7c78[1270]]){appendLog2(_0x7c78[1282]+ _0x1499x1fa[_0x7c78[158]]()+ _0x7c78[1278]+ _0x1499x87[_0x1499x1f7][_0x7c78[1268]][_0x7c78[1270]][_0x7c78[1269]][_0x7c78[804]]()+ _0x7c78[1279]+ _0x7c78[1280]+ _0x1499x1f9+ _0x7c78[1281],_0x1499x1f9)}};showonceusers3++;showonceusers3returner(showonceusers3)}else {if(_0x1499x87[_0x1499x1f7][_0x7c78[1234]][_0x7c78[179]]($(_0x7c78[969])[_0x7c78[59]]())>= 0){if($(_0x7c78[969])[_0x7c78[59]]()[_0x7c78[140]]>= 4){if(_0x1499x1f5== 0){_0x1499x1f5++;if(_0x1499x1f1== null){toastr[_0x7c78[157]](_0x7c78[1283])}};var _0x1499x1f8=JSON[_0x7c78[415]](_0x1499x87[_0x1499x1f7]);var _0x1499x1f9;var _0x1499x1fa;var _0x1499x1fb=getParameterByName(_0x7c78[89],_0x1499x1f8);var _0x1499x1fc=getParameterByName(_0x7c78[90],_0x1499x1f8);_0x1499x1f8= _0x1499x1f8[_0x7c78[956]](0,_0x1499x1f8[_0x7c78[179]](_0x7c78[214]));_0x1499x1f9= _0x1499x1f8[_0x7c78[190]](_0x7c78[212])[_0x7c78[475]]();_0x1499x1fa= _0x1499x1f8[_0x7c78[190]](_0x7c78[1266])[_0x7c78[475]]();_0x1499x1fa= _0x1499x1fa[_0x7c78[956]](_0x1499x1fa,_0x1499x1fa[_0x7c78[179]](_0x7c78[1267]));if(_0x1499x87[_0x1499x1f7][_0x7c78[1246]]== true){_0x1499x87[_0x1499x1f7][_0x7c78[1268]][_0x7c78[1270]][_0x7c78[1269]]= _0x7c78[1271]};if(_0x1499x1fc&& _0x1499x87[_0x1499x1f7][_0x7c78[1268]]&& _0x1499x87[_0x1499x1f7][_0x7c78[1268]][_0x7c78[1270]]){_0x1499x1fc= _0x1499x1fc[_0x7c78[190]](_0x7c78[1274])[0][_0x7c78[190]](_0x7c78[1273])[0][_0x7c78[190]](_0x7c78[1272])[0];appendLog3(_0x7c78[1275]+ _0x1499x1fb+ _0x7c78[1276]+ _0x1499x1fc+ _0x7c78[1284]+ _0x1499x1fa[_0x7c78[158]]()+ _0x7c78[1285]+ _0x1499x87[_0x1499x1f7][_0x7c78[1268]][_0x7c78[1270]][_0x7c78[1269]][_0x7c78[804]]()+ _0x7c78[1286]+ _0x1499x1f9+ _0x7c78[1287],_0x1499x1f9,_0x1499x1fb,_0x1499x1fc)}else {if(_0x1499x87[_0x1499x1f7][_0x7c78[1268]]&& _0x1499x87[_0x1499x1f7][_0x7c78[1268]][_0x7c78[1270]]){appendLog2(_0x7c78[1288]+ _0x1499x1fa[_0x7c78[158]]()+ _0x7c78[1285]+ _0x1499x87[_0x1499x1f7][_0x7c78[1268]][_0x7c78[1270]][_0x7c78[1269]][_0x7c78[804]]()+ _0x7c78[1286]+ _0x1499x1f9+ _0x7c78[1287],_0x1499x1f9)}};showonceusers3++;showonceusers3returner(showonceusers3)}}}}};client2[_0x7c78[701]][_0x7c78[1261]]();if(showonceusers3== 0){_0x1499x1f6++;if(_0x1499x1f6== 1){if(_0x1499x1f1== null){toastr[_0x7c78[184]](_0x7c78[1289]+ $(_0x7c78[60])[_0x7c78[59]]()+ _0x7c78[1290]+ $(_0x7c78[69])[_0x7c78[59]]()+ _0x7c78[1291]+ _0x7c78[1292]+ Premadeletter24+ _0x7c78[1293]+ Premadeletter25+ _0x7c78[172],_0x7c78[6],{timeOut:20000,extendedTimeOut:20000})[_0x7c78[73]](_0x7c78[71],_0x7c78[182])};$(_0x7c78[1294])[_0x7c78[208]](function(){$(_0x7c78[248])[_0x7c78[247]](_0x7c78[244])[_0x7c78[245]](_0x7c78[246]);var _0x1499xc8=$(_0x7c78[969])[_0x7c78[59]]();searchHandler(_0x1499xc8)})}};return client2},send:function(_0x1499x87){client2[_0x7c78[701]][_0x7c78[123]](JSON[_0x7c78[415]](_0x1499x87))}}}function showonceusers3returner(showonceusers3){return showonceusers3}function init(modVersion){if(!document[_0x7c78[407]](_0x7c78[1295])){setTimeout(init(modVersion),200);console[_0x7c78[283]](_0x7c78[1296]);return};return startLM(modVersion)}function initializeLM(modVersion){PremiumUsersFFAScore();$(_0x7c78[1302])[_0x7c78[281]](_0x7c78[1301])[_0x7c78[206]](_0x7c78[1299],_0x7c78[1300])[_0x7c78[257]](_0x7c78[1297],_0x7c78[1298]);$(_0x7c78[1305])[_0x7c78[281]](_0x7c78[1304])[_0x7c78[206]](_0x7c78[1299],_0x7c78[1300])[_0x7c78[257]](_0x7c78[1297],_0x7c78[1303]);$(_0x7c78[1308])[_0x7c78[247]](_0x7c78[1307])[_0x7c78[245]](_0x7c78[1306]);$(_0x7c78[1310])[_0x7c78[281]](_0x7c78[1309]);$(_0x7c78[1310])[_0x7c78[206]](_0x7c78[1299],_0x7c78[1300])[_0x7c78[257]](_0x7c78[1297],_0x7c78[1311]);$(_0x7c78[243])[_0x7c78[281]](_0x7c78[1314])[_0x7c78[206]](_0x7c78[1299],_0x7c78[1300])[_0x7c78[257]](_0x7c78[1297],_0x7c78[1313])[_0x7c78[206]](_0x7c78[1045],_0x7c78[1312]);$(_0x7c78[280])[_0x7c78[713]](_0x7c78[1315]);$(_0x7c78[1323])[_0x7c78[713]](_0x7c78[1316]+ _0x7c78[1317]+ _0x7c78[1318]+ _0x7c78[1319]+ _0x7c78[1320]+ _0x7c78[1321]+ _0x7c78[1322]+ _0x7c78[326]);$(_0x7c78[1324])[_0x7c78[61]]();$(_0x7c78[493])[_0x7c78[206]](_0x7c78[1325],_0x7c78[1326]);$(_0x7c78[1329])[_0x7c78[1328]]()[_0x7c78[1300]]({title:_0x7c78[1327],placement:_0x7c78[677]});$(_0x7c78[1343])[_0x7c78[1328]]()[_0x7c78[128]](_0x7c78[1330]+ textLanguage[_0x7c78[1331]]+ _0x7c78[1332]+ _0x7c78[1333]+ _0x7c78[1334]+ _0x7c78[1335]+ _0x7c78[1336]+ _0x7c78[1337]+ _0x7c78[1338]+ _0x7c78[1339]+ _0x7c78[1340]+ _0x7c78[1341]+ _0x7c78[1342]);$(_0x7c78[1345])[_0x7c78[1328]]()[_0x7c78[1300]]({title:_0x7c78[1344],placement:_0x7c78[677]});$(_0x7c78[1348])[_0x7c78[1328]]()[_0x7c78[1328]]()[_0x7c78[1300]]({title:_0x7c78[1346],placement:_0x7c78[1347]});$(_0x7c78[951])[_0x7c78[128]](_0x7c78[1349]+ _0x7c78[1350]+ _0x7c78[1351]+ _0x7c78[1352]+ _0x7c78[1353]+ _0x7c78[1354]+ _0x7c78[1355]+ _0x7c78[1356]+ _0x7c78[652]);$(_0x7c78[950])[_0x7c78[279]](_0x7c78[1357]);$(_0x7c78[1088])[_0x7c78[713]](_0x7c78[1358]+ _0x7c78[1359]+ _0x7c78[1360]+ _0x7c78[1361]+ _0x7c78[1362]);$(_0x7c78[1364])[_0x7c78[130]](_0x7c78[1363]);$(_0x7c78[84])[_0x7c78[64]]()[_0x7c78[206]](_0x7c78[1045],_0x7c78[1365]);$(_0x7c78[1450])[_0x7c78[130]](_0x7c78[1366]+ _0x7c78[1367]+ Premadeletter42+ _0x7c78[172]+ _0x7c78[1368]+ Premadeletter44+ _0x7c78[172]+ _0x7c78[1369]+ Premadeletter45a+ _0x7c78[172]+ _0x7c78[1370]+ Premadeletter46+ _0x7c78[172]+ _0x7c78[1371]+ Premadeletter49+ _0x7c78[172]+ _0x7c78[1372]+ Premadeletter50+ _0x7c78[172]+ _0x7c78[1373]+ _0x7c78[1374]+ _0x7c78[1375]+ _0x7c78[1376]+ _0x7c78[1377]+ _0x7c78[1378]+ _0x7c78[1379]+ _0x7c78[1380]+ _0x7c78[1381]+ _0x7c78[1382]+ _0x7c78[1383]+ _0x7c78[1384]+ _0x7c78[1385]+ _0x7c78[1386]+ _0x7c78[1387]+ _0x7c78[1388]+ _0x7c78[1389]+ _0x7c78[1390]+ _0x7c78[1391]+ _0x7c78[1392]+ _0x7c78[652]+ _0x7c78[1393]+ _0x7c78[1394]+ _0x7c78[1395]+ _0x7c78[1396]+ _0x7c78[1397]+ _0x7c78[1398]+ _0x7c78[1399]+ _0x7c78[1400]+ _0x7c78[1401]+ _0x7c78[1402]+ _0x7c78[1403]+ _0x7c78[1404]+ _0x7c78[1405]+ _0x7c78[1406]+ _0x7c78[1383]+ _0x7c78[1407]+ _0x7c78[1408]+ _0x7c78[1409]+ _0x7c78[1410]+ _0x7c78[1411]+ _0x7c78[1412]+ _0x7c78[1413]+ _0x7c78[1414]+ _0x7c78[1415]+ _0x7c78[1416]+ _0x7c78[1417]+ _0x7c78[1418]+ _0x7c78[1419]+ _0x7c78[1420]+ _0x7c78[1421]+ _0x7c78[1422]+ _0x7c78[1423]+ _0x7c78[1424]+ _0x7c78[1425]+ _0x7c78[1426]+ _0x7c78[1427]+ _0x7c78[1428]+ _0x7c78[1429]+ _0x7c78[1430]+ _0x7c78[326]+ _0x7c78[1431]+ _0x7c78[1432]+ _0x7c78[1433]+ _0x7c78[1434]+ _0x7c78[1435]+ _0x7c78[1436]+ _0x7c78[1437]+ _0x7c78[1438]+ _0x7c78[1439]+ _0x7c78[1440]+ _0x7c78[1441]+ _0x7c78[1442]+ _0x7c78[1443]+ _0x7c78[1444]+ _0x7c78[1445]+ _0x7c78[1446]+ _0x7c78[1447]+ _0x7c78[1448]+ _0x7c78[1449]+ _0x7c78[326]);$(_0x7c78[1453])[_0x7c78[73]](_0x7c78[1451],_0x7c78[1452]);$(_0x7c78[1456])[_0x7c78[73]](_0x7c78[1454],_0x7c78[1455]);changeFrameWorkStart();$(_0x7c78[969])[_0x7c78[1462]](_0x7c78[1457],function(_0x1499x12d){if(!searching){var _0x1499x200=_0x1499x12d[_0x7c78[1460]][_0x7c78[1459]][_0x7c78[1458]](_0x7c78[76]);$(_0x7c78[969])[_0x7c78[59]](_0x1499x200);$(_0x7c78[969])[_0x7c78[284]]();$(_0x7c78[1461])[_0x7c78[208]]()}});$(_0x7c78[1463])[_0x7c78[59]](localStorage[_0x7c78[3]](_0x7c78[421]));$(_0x7c78[1464])[_0x7c78[59]](localStorage[_0x7c78[3]](_0x7c78[422]));$(_0x7c78[1465])[_0x7c78[59]](localStorage[_0x7c78[3]](_0x7c78[423]));$(_0x7c78[1466])[_0x7c78[59]](localStorage[_0x7c78[3]](_0x7c78[424]));$(_0x7c78[1467])[_0x7c78[59]](localStorage[_0x7c78[3]](_0x7c78[425]));$(_0x7c78[1468])[_0x7c78[59]](localStorage[_0x7c78[3]](_0x7c78[426]));$(_0x7c78[1469])[_0x7c78[59]](localStorage[_0x7c78[3]](_0x7c78[427]));$(_0x7c78[1470])[_0x7c78[734]](function(_0x1499x11d){localStorage[_0x7c78[117]](_0x1499x11d[_0x7c78[1213]][_0x7c78[144]],$(_0x1499x11d[_0x7c78[1213]])[_0x7c78[59]]())});var _0x1499x201=(localStorage[_0x7c78[3]](_0x7c78[420])== null?defaultMusicUrl:localStorage[_0x7c78[3]](_0x7c78[420]));$(_0x7c78[80])[_0x7c78[130]](_0x7c78[1471]+ _0x7c78[1472]+ getEmbedUrl(_0x1499x201)+ _0x7c78[1473]+ _0x7c78[1474]+ _0x1499x201+ _0x7c78[1475]);$(_0x7c78[80])[_0x7c78[61]]();$(_0x7c78[81])[_0x7c78[61]]();ytFrame();$(_0x7c78[1478])[_0x7c78[245]](_0x7c78[1477])[_0x7c78[247]](_0x7c78[1476]);$(_0x7c78[469])[_0x7c78[801]](_0x7c78[1479],function(){$(this)[_0x7c78[206]](_0x7c78[1480],_0x7c78[1481])});$(_0x7c78[469])[_0x7c78[1462]](_0x7c78[1457],function(_0x1499x12d){$(this)[_0x7c78[206]](_0x7c78[1480],_0x7c78[1481]);var _0x1499x109=_0x1499x12d[_0x7c78[1460]][_0x7c78[1459]][_0x7c78[1458]](_0x7c78[76]);YoutubeEmbPlayer(_0x1499x109)});$(_0x7c78[410])[_0x7c78[206]](_0x7c78[1482],_0x7c78[1483]);$(_0x7c78[952])[_0x7c78[130]](_0x7c78[1484]+ _0x7c78[1485]+ _0x7c78[326]);$(_0x7c78[1088])[_0x7c78[713]](_0x7c78[1486]+ _0x7c78[1487]+ _0x7c78[1488]+ _0x7c78[1489]+ _0x7c78[1490]+ _0x7c78[1491]+ _0x7c78[1492]+ _0x7c78[652]);$(_0x7c78[1088])[_0x7c78[713]](_0x7c78[1493]+ _0x7c78[1494]+ _0x7c78[1495]+ _0x7c78[1496]+ _0x7c78[1497]+ _0x7c78[1498]+ _0x7c78[1499]);$(_0x7c78[1088])[_0x7c78[713]](_0x7c78[1500]+ _0x7c78[1501]+ _0x7c78[1502]+ _0x7c78[1503]+ _0x7c78[1504]+ _0x7c78[1505]+ _0x7c78[1506]);$(_0x7c78[1088])[_0x7c78[713]](_0x7c78[1507]+ _0x7c78[1508]+ _0x7c78[1509]+ _0x7c78[1510]+ _0x7c78[1511]+ _0x7c78[1512]+ _0x7c78[1513]);$(_0x7c78[1088])[_0x7c78[713]](_0x7c78[1514]+ _0x7c78[1515]+ _0x7c78[652]);$(_0x7c78[1090])[_0x7c78[279]](_0x7c78[1516]+ _0x7c78[1517]+ legmaincolor+ _0x7c78[1518]+ _0x7c78[1519]+ legmaincolor+ _0x7c78[1520]+ _0x7c78[1521]+ _0x7c78[1522]+ legmaincolor+ _0x7c78[1523]+ _0x7c78[1524]+ _0x7c78[1525]+ legmaincolor+ _0x7c78[1526]+ _0x7c78[652]+ _0x7c78[1527]+ _0x7c78[1528]+ legmaincolor+ _0x7c78[1529]+ _0x7c78[1530]+ legmaincolor+ _0x7c78[1531]+ _0x7c78[1532]+ legmaincolor+ _0x7c78[1533]+ _0x7c78[652]+ _0x7c78[1534]+ _0x7c78[1530]+ legmaincolor+ _0x7c78[1531]+ _0x7c78[652]+ _0x7c78[1535]+ _0x7c78[652]);$(_0x7c78[544])[_0x7c78[208]](function(){if(playerState!= 1){$(_0x7c78[471])[0][_0x7c78[1540]][_0x7c78[1539]](_0x7c78[1536]+ _0x7c78[298]+ _0x7c78[1537],_0x7c78[1538]);$(_0x7c78[1543])[_0x7c78[247]](_0x7c78[1542])[_0x7c78[245]](_0x7c78[1541]);$(this)[_0x7c78[206]](_0x7c78[986],Premadeletter60)[_0x7c78[1300]](_0x7c78[1544])[_0x7c78[1300]](_0x7c78[87]);return playerState= 1}else {$(_0x7c78[471])[0][_0x7c78[1540]][_0x7c78[1539]](_0x7c78[1536]+ _0x7c78[299]+ _0x7c78[1537],_0x7c78[1538]);$(_0x7c78[1543])[_0x7c78[247]](_0x7c78[1541])[_0x7c78[245]](_0x7c78[1542]);$(this)[_0x7c78[206]](_0x7c78[986],Premadeletter13)[_0x7c78[1300]](_0x7c78[1544])[_0x7c78[1300]](_0x7c78[87]);return playerState= 0}});$(_0x7c78[1168])[_0x7c78[665]](function(){$(_0x7c78[1545])[_0x7c78[61]]();$(_0x7c78[1168])[_0x7c78[76]](_0x7c78[1546]);if($(_0x7c78[493])[_0x7c78[59]]()!= _0x7c78[6]){$(_0x7c78[1547])[_0x7c78[87]](100)}else {$(_0x7c78[1548])[_0x7c78[87]](100)}});$(_0x7c78[1456])[_0x7c78[663]](function(){$(_0x7c78[1548])[_0x7c78[61]]();$(_0x7c78[1547])[_0x7c78[61]]();$(_0x7c78[1545])[_0x7c78[61]]();$(_0x7c78[1168])[_0x7c78[76]](_0x7c78[1549])});$(_0x7c78[1551])[_0x7c78[130]](_0x7c78[1550]);$(_0x7c78[1461])[_0x7c78[1300]](_0x7c78[1552]);$(_0x7c78[1122])[_0x7c78[208]](function(){copy($(_0x7c78[238])[_0x7c78[76]]())});$(_0x7c78[1123])[_0x7c78[208]](function(){copy($(_0x7c78[238])[_0x7c78[76]]())});$(_0x7c78[1553])[_0x7c78[208]](function(){lastIP= localStorage[_0x7c78[3]](_0x7c78[38]);if(lastIP== _0x7c78[6]|| lastIP== null){}else {$(_0x7c78[213])[_0x7c78[59]](lastIP);$(_0x7c78[295])[_0x7c78[208]]();setTimeout(function(){if($(_0x7c78[213])[_0x7c78[59]]()!= lastIP){toastr[_0x7c78[173]](Premadeletter31)[_0x7c78[73]](_0x7c78[71],_0x7c78[267])}},1000)}});$(_0x7c78[1557])[_0x7c78[208]](function(){if(searchSip!= null){copy(_0x7c78[1554]+ region+ _0x7c78[1555]+ realmode+ _0x7c78[1556]+ searchSip)}else {copy(_0x7c78[1554]+ $(_0x7c78[60])[_0x7c78[59]]()+ _0x7c78[1555]+ realmode+ _0x7c78[1556]+ currentIP)}});$(_0x7c78[1168])[_0x7c78[208]](function(){if(realmode== _0x7c78[68]){CopyTkPwLb2= _0x7c78[1558]+ $(_0x7c78[213])[_0x7c78[59]]();copy(CopyTkPwLb2)}else {if(realmode!= _0x7c78[68]){if(region!= null&& realmode!= null){if(document[_0x7c78[56]][_0x7c78[55]](_0x7c78[54])){CopyTkPwLb2= _0x7c78[1559]+ $(_0x7c78[213])[_0x7c78[59]]()+ _0x7c78[218]+ $(_0x7c78[60])[_0x7c78[59]]()+ _0x7c78[1555]+ realmode}else {CopyTkPwLb2= _0x7c78[1558]+ $(_0x7c78[213])[_0x7c78[59]]()+ _0x7c78[218]+ $(_0x7c78[60])[_0x7c78[59]]()+ _0x7c78[1555]+ realmode};copy(CopyTkPwLb2)}else {CopyTkPwLb2= _0x7c78[1558]+ $(_0x7c78[213])[_0x7c78[59]]();copy(CopyTkPwLb2)}}else {if(realmode== _0x7c78[68]){CopyTkPwLb2= _0x7c78[1558]+ $(_0x7c78[213])[_0x7c78[59]]();copy(CopyTkPwLb2)}else {if(realmode!= _0x7c78[68]){if(document[_0x7c78[56]][_0x7c78[55]](_0x7c78[54])){CopyTkPwLb2= _0x7c78[1559]+ $(_0x7c78[213])[_0x7c78[59]]()+ _0x7c78[218]+ $(_0x7c78[60])[_0x7c78[59]]()+ _0x7c78[1555]+ realmode}else {CopyTkPwLb2= _0x7c78[1558]+ $(_0x7c78[213])[_0x7c78[59]]()+ _0x7c78[218]+ $(_0x7c78[60])[_0x7c78[59]]()+ _0x7c78[1555]+ realmode};copy(CopyTkPwLb2)}}}}});$(_0x7c78[1124])[_0x7c78[208]](function(){if(searchSip!= null){if(realmode== _0x7c78[68]){CopyTkPwLb2= _0x7c78[1558]+ $(_0x7c78[213])[_0x7c78[59]]()+ _0x7c78[1560]+ $(_0x7c78[493])[_0x7c78[59]]();copy(CopyTkPwLb2)}else {if(realmode!= _0x7c78[68]){if(document[_0x7c78[56]][_0x7c78[55]](_0x7c78[54])){CopyTkPwLb2= _0x7c78[1559]+ $(_0x7c78[213])[_0x7c78[59]]()+ _0x7c78[1560]+ $(_0x7c78[493])[_0x7c78[59]]()+ _0x7c78[218]+ $(_0x7c78[60])[_0x7c78[59]]()+ _0x7c78[1555]+ realmode}else {CopyTkPwLb2= _0x7c78[1558]+ $(_0x7c78[213])[_0x7c78[59]]()+ _0x7c78[1560]+ $(_0x7c78[493])[_0x7c78[59]]()+ _0x7c78[218]+ $(_0x7c78[60])[_0x7c78[59]]()+ _0x7c78[1555]+ realmode};copy(CopyTkPwLb2)}}}else {if(realmode== _0x7c78[68]){CopyTkPwLb2= _0x7c78[1558]+ $(_0x7c78[213])[_0x7c78[59]]()+ _0x7c78[1560]+ $(_0x7c78[493])[_0x7c78[59]]();copy(CopyTkPwLb2)}else {if(realmode!= _0x7c78[68]){if(document[_0x7c78[56]][_0x7c78[55]](_0x7c78[54])){CopyTkPwLb2= _0x7c78[1559]+ $(_0x7c78[213])[_0x7c78[59]]()+ _0x7c78[1560]+ $(_0x7c78[493])[_0x7c78[59]]()+ _0x7c78[218]+ $(_0x7c78[60])[_0x7c78[59]]()+ _0x7c78[1555]+ realmode}else {CopyTkPwLb2= _0x7c78[1558]+ $(_0x7c78[213])[_0x7c78[59]]()+ _0x7c78[1560]+ $(_0x7c78[493])[_0x7c78[59]]()+ _0x7c78[218]+ $(_0x7c78[60])[_0x7c78[59]]()+ _0x7c78[1555]+ realmode};copy(CopyTkPwLb2)}}}});$(_0x7c78[1125])[_0x7c78[208]](function(){if(searchSip!= null){if(realmode== _0x7c78[68]){CopyTkPwLb2= _0x7c78[1558]+ $(_0x7c78[213])[_0x7c78[59]]()+ _0x7c78[1560]+ $(_0x7c78[493])[_0x7c78[59]]();copyToClipboardAll()}else {if(realmode!= _0x7c78[68]){if(document[_0x7c78[56]][_0x7c78[55]](_0x7c78[54])){CopyTkPwLb2= _0x7c78[1559]+ $(_0x7c78[213])[_0x7c78[59]]()+ _0x7c78[1560]+ $(_0x7c78[493])[_0x7c78[59]]()+ _0x7c78[218]+ $(_0x7c78[60])[_0x7c78[59]]()+ _0x7c78[1555]+ realmode}else {CopyTkPwLb2= _0x7c78[1558]+ $(_0x7c78[213])[_0x7c78[59]]()+ _0x7c78[1560]+ $(_0x7c78[493])[_0x7c78[59]]()+ _0x7c78[218]+ $(_0x7c78[60])[_0x7c78[59]]()+ _0x7c78[1555]+ realmode};copy(CopyTkPwLb2)}}}else {if(realmode== _0x7c78[68]){CopyTkPwLb2= _0x7c78[1558]+ $(_0x7c78[213])[_0x7c78[59]]()+ _0x7c78[1560]+ $(_0x7c78[493])[_0x7c78[59]]();copyToClipboardAll()}else {if(realmode!= _0x7c78[68]){if(document[_0x7c78[56]][_0x7c78[55]](_0x7c78[54])){CopyTkPwLb2= _0x7c78[1559]+ $(_0x7c78[213])[_0x7c78[59]]()+ _0x7c78[1560]+ $(_0x7c78[493])[_0x7c78[59]]()+ _0x7c78[218]+ $(_0x7c78[60])[_0x7c78[59]]()+ _0x7c78[1555]+ realmode}else {CopyTkPwLb2= _0x7c78[1558]+ $(_0x7c78[213])[_0x7c78[59]]()+ _0x7c78[1560]+ $(_0x7c78[493])[_0x7c78[59]]()+ _0x7c78[218]+ $(_0x7c78[60])[_0x7c78[59]]()+ _0x7c78[1555]+ realmode};copyToClipboardAll()}}}});$(_0x7c78[693])[_0x7c78[208]](function(){$(_0x7c78[693])[_0x7c78[1561]]()});$(_0x7c78[1169])[_0x7c78[208]](function(){$(_0x7c78[237])[_0x7c78[208]]()});$(_0x7c78[1169])[_0x7c78[665]](function(){$(_0x7c78[1548])[_0x7c78[61]]();$(_0x7c78[1547])[_0x7c78[61]]();$(_0x7c78[1168])[_0x7c78[76]](_0x7c78[1549])});$(_0x7c78[1461])[_0x7c78[208]](function(){if(!searching){getSNEZServers();client2[_0x7c78[704]]()}else {$(_0x7c78[248])[_0x7c78[247]](_0x7c78[246])[_0x7c78[245]](_0x7c78[244]);clearInterval(timerId);searching= false;toastr[_0x7c78[173]](Premadeletter32+ _0x7c78[274])[_0x7c78[73]](_0x7c78[71],_0x7c78[267])}});$(_0x7c78[969])[_0x7c78[734]](function(_0x1499x11d){if(_0x1499x11d[_0x7c78[685]]== 13){$(_0x7c78[1461])[_0x7c78[208]]()}});$(_0x7c78[1562])[_0x7c78[208]](function(){hideSearchHud();showMenu2()});$(_0x7c78[1166])[_0x7c78[665]](function(){$(_0x7c78[1548])[_0x7c78[61]]();$(_0x7c78[1545])[_0x7c78[87]](100);$(_0x7c78[1168])[_0x7c78[76]](_0x7c78[1549])});$(_0x7c78[952])[_0x7c78[73]](_0x7c78[1454],_0x7c78[1455]);$(_0x7c78[1166])[_0x7c78[208]](function(){hideMenu();$(_0x7c78[250])[_0x7c78[59]]($(_0x7c78[60])[_0x7c78[59]]());$(_0x7c78[251])[_0x7c78[59]]($(_0x7c78[69])[_0x7c78[59]]());showSearchHud();$(_0x7c78[969])[_0x7c78[1561]]()[_0x7c78[284]]()});$(_0x7c78[293])[_0x7c78[665]](function(){$(_0x7c78[293])[_0x7c78[73]](_0x7c78[397],_0x7c78[1563]);return clickedname= _0x7c78[99]})[_0x7c78[663]](function(){$(_0x7c78[293])[_0x7c78[73]](_0x7c78[397],_0x7c78[6])});$(_0x7c78[293])[_0x7c78[1121]](function(){previousnickname= $(_0x7c78[293])[_0x7c78[59]]();localStorage[_0x7c78[117]](_0x7c78[39],previousnickname);var _0x1499x202;for(_0x1499x202 in animatedskins){if(_0x1499x202== $(_0x7c78[293])[_0x7c78[59]]()){toastr[_0x7c78[157]](_0x7c78[1564])}};if(clickedname== _0x7c78[99]){if(fancyCount2($(_0x7c78[293])[_0x7c78[59]]())>= 16){toastr[_0x7c78[184]](_0x7c78[199]+ Premadeletter123+ _0x7c78[200]+ Premadeletter2+ _0x7c78[1565]+ $(_0x7c78[293])[_0x7c78[59]]())}};if($(_0x7c78[293])[_0x7c78[59]]()== _0x7c78[1566]){toastr[_0x7c78[157]](Premadeletter3)[_0x7c78[73]](_0x7c78[71],_0x7c78[267]);$(_0x7c78[293])[_0x7c78[59]](_0x7c78[1567]);$(_0x7c78[74])[_0x7c78[208]]();openbleedmod()}else {if($(_0x7c78[293])[_0x7c78[59]]()== _0x7c78[1568]){toastr[_0x7c78[157]](Premadeletter4)[_0x7c78[73]](_0x7c78[71],_0x7c78[267]);$(_0x7c78[293])[_0x7c78[59]](_0x7c78[1567]);$(_0x7c78[74])[_0x7c78[208]]();openrotatingmod()}else {if($(_0x7c78[293])[_0x7c78[59]]()== _0x7c78[1569]){toastr[_0x7c78[157]](Premadeletter5+ _0x7c78[1570]+ Premadeletter6+ _0x7c78[1571]);$(_0x7c78[293])[_0x7c78[59]](_0x7c78[1572]);openvidmod()}}}});$(_0x7c78[293])[_0x7c78[801]](_0x7c78[1479],function(){if(fancyCount2($(_0x7c78[293])[_0x7c78[59]]())> 15){while(fancyCount2($(_0x7c78[293])[_0x7c78[59]]())> 15){$(_0x7c78[293])[_0x7c78[59]]($(_0x7c78[293])[_0x7c78[59]]()[_0x7c78[181]](0,-1))}}});$(document)[_0x7c78[734]](function(_0x1499x11d){if(_0x1499x11d[_0x7c78[1573]]== 8){if($(_0x7c78[1574])[_0x7c78[140]]== 0){$(_0x7c78[1166])[_0x7c78[208]]()}}});$(_0x7c78[1176])[_0x7c78[208]](function(){CutNameConflictwithMessageFunction();if(checkedGameNames== 0){StartEditGameNames();return checkedGameNames= 2}else {if(checkedGameNames== 1){ContinueEditGameNames();return checkedGameNames= 2}else {if(checkedGameNames== 2){StopEditGameNames();return checkedGameNames= 1}}}});$(_0x7c78[1170])[_0x7c78[208]](function(){var _0x1499x203=$(_0x7c78[213])[_0x7c78[59]]();var _0x1499x204=$(_0x7c78[493])[_0x7c78[59]]();if(_0x1499x204!= _0x7c78[6]){semiurl2= _0x1499x203+ _0x7c78[1575]+ _0x1499x204}else {semiurl2= _0x1499x203};url2= _0x7c78[1576]+ semiurl2;setTimeout(function(){$(_0x7c78[1170])[_0x7c78[545]]()},100);var _0x1499x205=window[_0x7c78[119]](url2,_0x7c78[486])});$(_0x7c78[493])[_0x7c78[73]](_0x7c78[71],_0x7c78[1577]);$(_0x7c78[293])[_0x7c78[73]](_0x7c78[71],_0x7c78[1578]);$(_0x7c78[493])[_0x7c78[665]](function(){$(_0x7c78[493])[_0x7c78[73]](_0x7c78[397],_0x7c78[1563])})[_0x7c78[663]](function(){$(_0x7c78[493])[_0x7c78[73]](_0x7c78[397],_0x7c78[6])});$(_0x7c78[60])[_0x7c78[665]](function(){$(_0x7c78[60])[_0x7c78[73]](_0x7c78[397],_0x7c78[1579])})[_0x7c78[663]](function(){$(_0x7c78[60])[_0x7c78[73]](_0x7c78[397],_0x7c78[6])});$(_0x7c78[69])[_0x7c78[665]](function(){$(_0x7c78[69])[_0x7c78[73]](_0x7c78[397],_0x7c78[1579])})[_0x7c78[663]](function(){$(_0x7c78[69])[_0x7c78[73]](_0x7c78[397],_0x7c78[6])});$(_0x7c78[1580])[_0x7c78[208]](function(){setTimeout(function(){if(LegendSettingsfirstclicked== _0x7c78[116]){LegendSettingsfirst();return LegendSettingsfirstclicked= _0x7c78[115]}else {$(_0x7c78[408])[_0x7c78[208]]();return false}},100)});$(_0x7c78[236])[_0x7c78[208]](function(){localStorage[_0x7c78[117]](_0x7c78[38],$(_0x7c78[213])[_0x7c78[59]]());var _0x1499x206=_0x7c78[1581];var _0x1499x207=_0x7c78[108];var _0x1499x208=_0x7c78[108];var userfirstname=localStorage[_0x7c78[3]](_0x7c78[109]);var userlastname=localStorage[_0x7c78[3]](_0x7c78[110]);var _0x1499x111=_0x7c78[108];var _0x1499x209=_0x7c78[108];var _0x1499x20a= new Date();var _0x1499x20b=_0x1499x20a[_0x7c78[1582]]()+ _0x7c78[192]+ (_0x1499x20a[_0x7c78[1583]]()+ 1)+ _0x7c78[192]+ _0x1499x20a[_0x7c78[1584]]()+ _0x7c78[189]+ _0x1499x20a[_0x7c78[1585]]()+ _0x7c78[239]+ _0x1499x20a[_0x7c78[1586]]();if(searchSip== null){_0x1499x111= $(_0x7c78[69])[_0x7c78[59]]();_0x1499x209= $(_0x7c78[60])[_0x7c78[59]]()}else {if(searchSip== $(_0x7c78[300])[_0x7c78[59]]()){_0x1499x111= realmode;_0x1499x209= region}};if($(_0x7c78[300])[_0x7c78[59]]()!= _0x7c78[6]&& $(_0x7c78[300])[_0x7c78[59]]()!= null&& $(_0x7c78[300])[_0x7c78[59]]()!= undefined){_0x1499x207= $(_0x7c78[300])[_0x7c78[59]]()};if($(_0x7c78[493])[_0x7c78[59]]()!= _0x7c78[6]&& $(_0x7c78[493])[_0x7c78[59]]()!= undefined){_0x1499x206= $(_0x7c78[493])[_0x7c78[59]]()};var _0x1499xd8=0,_0x1499x20c=_0x1499x206[_0x7c78[140]];for(_0x1499xd8;_0x1499xd8< _0x1499x206;_0x1499xd8++){_0x1499x206= _0x1499x206[_0x7c78[168]](_0x7c78[481],_0x7c78[933])};if($(_0x7c78[293])[_0x7c78[59]]()!= undefined){_0x1499x208= $(_0x7c78[293])[_0x7c78[59]]()};var _0x1499xd8=0,_0x1499x20d=_0x1499x208[_0x7c78[140]];for(_0x1499xd8;_0x1499xd8< _0x1499x20d;_0x1499xd8++){_0x1499x208= removeEmojis(_0x1499x208[_0x7c78[168]](_0x7c78[481],_0x7c78[933]))};if($(_0x7c78[300])[_0x7c78[59]]()!= undefined){if(_0x1499x207[_0x7c78[179]](_0x7c78[579])== false){_0x1499x207= $(_0x7c78[300])[_0x7c78[59]]()[_0x7c78[168]](_0x7c78[579],_0x7c78[1587])}};if(searchSip== null){detailed1= _0x7c78[1588]+ _0x7c78[1589]+ window[_0x7c78[1245]]+ _0x7c78[1590]+ _0x1499x208+ _0x7c78[1591]+ _0x1499x20b+ _0x7c78[1592]+ _0x1499x207+ _0x7c78[1593]+ _0x1499x206+ _0x7c78[1594]+ _0x1499x111+ _0x7c78[1595]+ _0x1499x209+ _0x7c78[1596]+ window[_0x7c78[186]]+ _0x7c78[1597]+ userlastname+ _0x7c78[1598]+ userfirstname}else {if(searchSip!= null){detailed1= _0x7c78[1588]+ _0x7c78[1589]+ window[_0x7c78[1245]]+ _0x7c78[1590]+ _0x1499x208+ _0x7c78[1591]+ _0x1499x20b+ _0x7c78[1592]+ searchSip+ _0x7c78[1593]+ _0x1499x206+ _0x7c78[1599]+ _0x7c78[1594]+ _0x1499x111+ _0x7c78[1595]+ _0x1499x209+ _0x7c78[1596]+ window[_0x7c78[186]]+ _0x7c78[1597]+ userlastname+ _0x7c78[1598]+ userfirstname}else {detailed1= _0x7c78[1588]+ _0x7c78[1589]+ window[_0x7c78[1245]]+ _0x7c78[1590]+ _0x1499x208+ _0x7c78[1591]+ _0x1499x20b+ _0x7c78[1592]+ _0x1499x207+ _0x7c78[1593]+ _0x1499x206+ _0x7c78[1594]+ _0x1499x111+ _0x7c78[1595]+ _0x1499x209+ _0x7c78[1596]+ window[_0x7c78[186]]+ _0x7c78[1597]+ userlastname+ _0x7c78[1598]+ userfirstname}};$(_0x7c78[469])[_0x7c78[279]](_0x7c78[1600]+ detailed1+ _0x7c78[1601]);$(_0x7c78[1602])[_0x7c78[61]]();setTimeout(function(){if(window[_0x7c78[1603]]&& window[_0x7c78[1603]][_0x7c78[55]]($(_0x7c78[293])[_0x7c78[59]]())){for(var _0x1499x1f7=0;_0x1499x1f7< window[_0x7c78[1604]][_0x7c78[140]];_0x1499x1f7++){if($(_0x7c78[293])[_0x7c78[59]]()== window[_0x7c78[1604]][_0x1499x1f7][_0x7c78[144]]){core[_0x7c78[831]]($(_0x7c78[293])[_0x7c78[59]](),null,_0x7c78[1605]+ window[_0x7c78[1606]]+ window[_0x7c78[1604]][_0x1499x1f7][_0x7c78[1607]],null)}}}else {if(legendflags[_0x7c78[55]](LowerCase($(_0x7c78[293])[_0x7c78[59]]()))){core[_0x7c78[831]]($(_0x7c78[293])[_0x7c78[59]](),null,_0x7c78[1608]+ LowerCase($(_0x7c78[293])[_0x7c78[59]]())+ _0x7c78[1609],null)}}},1000);$(_0x7c78[1610])[_0x7c78[801]](_0x7c78[1159],function(){$(_0x7c78[1610])[_0x7c78[176]]()});return lastIP= $(_0x7c78[213])[_0x7c78[59]]()});$(_0x7c78[531])[_0x7c78[1300]]({title:_0x7c78[1611],placement:_0x7c78[677]});$(_0x7c78[209])[_0x7c78[208]](function(){var _0x1499x20e=!($(this)[_0x7c78[206]](_0x7c78[205])== _0x7c78[115]);if(_0x1499x20e){localStorage[_0x7c78[117]](_0x7c78[47],true);$(_0x7c78[1612])[_0x7c78[87]]();$(this)[_0x7c78[281]](_0x7c78[1613]+ Premadeletter43)}else {localStorage[_0x7c78[117]](_0x7c78[47],false);$(_0x7c78[1612])[_0x7c78[61]]();$(_0x7c78[1018])[_0x7c78[61]]();$(_0x7c78[1021])[_0x7c78[61]]();$(_0x7c78[1019])[_0x7c78[61]]();$(_0x7c78[1020])[_0x7c78[61]]();$(_0x7c78[1018])[_0x7c78[61]]();$(this)[_0x7c78[281]](_0x7c78[1613]+ Premadeletter42);return seticon= _0x7c78[99]}});$(_0x7c78[211])[_0x7c78[208]](function(){var _0x1499x20e=!($(this)[_0x7c78[206]](_0x7c78[205])== _0x7c78[115]);if(_0x1499x20e){localStorage[_0x7c78[117]](_0x7c78[48],true);$(_0x7c78[379])[_0x7c78[87]]();$(this)[_0x7c78[281]](_0x7c78[1614]+ Premadeletter45)}else {localStorage[_0x7c78[117]](_0x7c78[48],false);$(_0x7c78[379])[_0x7c78[61]]();$(this)[_0x7c78[281]](_0x7c78[1614]+ Premadeletter44)}});$(_0x7c78[210])[_0x7c78[208]](function(){var _0x1499x20e=!($(this)[_0x7c78[206]](_0x7c78[205])== _0x7c78[115]);if(_0x1499x20e){localStorage[_0x7c78[117]](_0x7c78[49],true);var _0x1499x165=document[_0x7c78[974]](_0x7c78[647])[0];$(_0x1499x165)[_0x7c78[279]](_0x7c78[975]+ _0x7c78[1615]+ _0x7c78[977]+ _0x7c78[978]+ _0x7c78[979]+ _0x7c78[980]+ _0x7c78[981]);$(this)[_0x7c78[281]](_0x7c78[1616]+ Premadeletter45b)}else {localStorage[_0x7c78[117]](_0x7c78[49],false);var _0x1499x165=document[_0x7c78[974]](_0x7c78[647])[0];$(_0x1499x165)[_0x7c78[279]](_0x7c78[975]+ _0x7c78[1617]+ _0x7c78[1618]+ _0x7c78[1619]+ _0x7c78[1620]+ _0x7c78[1621]+ _0x7c78[1622]);$(this)[_0x7c78[281]](_0x7c78[1616]+ Premadeletter45a)}});$(_0x7c78[1126])[_0x7c78[208]](function(){var _0x1499x20e=!($(this)[_0x7c78[206]](_0x7c78[205])== _0x7c78[115]);if(_0x1499x20e){localStorage[_0x7c78[117]](_0x7c78[50],true);var _0x1499x165=document[_0x7c78[974]](_0x7c78[647])[0];$(_0x1499x165)[_0x7c78[279]](_0x7c78[1623]+ _0x7c78[1624]+ $(_0x7c78[1625])[_0x7c78[59]]()+ _0x7c78[1626]+ _0x7c78[1627]+ $(_0x7c78[1625])[_0x7c78[59]]()+ _0x7c78[1626]+ _0x7c78[1628]+ $(_0x7c78[1625])[_0x7c78[59]]()+ _0x7c78[1626]+ _0x7c78[1629]+ $(_0x7c78[1625])[_0x7c78[59]]()+ _0x7c78[1626]+ _0x7c78[1627]+ $(_0x7c78[1625])[_0x7c78[59]]()+ _0x7c78[1626]+ _0x7c78[1630]+ $(_0x7c78[1625])[_0x7c78[59]]()+ _0x7c78[1626]+ _0x7c78[1631]+ $(_0x7c78[1625])[_0x7c78[59]]()+ _0x7c78[1626]+ _0x7c78[1632]+ _0x7c78[1633]+ _0x7c78[1634]+ _0x7c78[1635]);$(this)[_0x7c78[281]](_0x7c78[1616]+ Premadeletter47)}else {localStorage[_0x7c78[117]](_0x7c78[50],false);$(_0x7c78[1636])[_0x7c78[176]]();$(this)[_0x7c78[281]](_0x7c78[1637]+ Premadeletter46)}});$(_0x7c78[1127])[_0x7c78[208]](function(){var _0x1499x20e=!($(this)[_0x7c78[206]](_0x7c78[205])== _0x7c78[115]);if(_0x1499x20e){localStorage[_0x7c78[117]](_0x7c78[51],true);$(_0x7c78[1638])[_0x7c78[87]]();$(this)[_0x7c78[281]](_0x7c78[1639]+ Premadeletter51);TimerLM[_0x7c78[1079]]= document[_0x7c78[407]](_0x7c78[1640]);return TimerLM[_0x7c78[1079]]}else {localStorage[_0x7c78[117]](_0x7c78[51],false);$(_0x7c78[1638])[_0x7c78[61]]();$(this)[_0x7c78[281]](_0x7c78[1639]+ Premadeletter50)}});$(_0x7c78[531])[_0x7c78[208]](function(){var _0x1499x20e=!($(this)[_0x7c78[206]](_0x7c78[205])== _0x7c78[115]);if(_0x1499x20e){$(_0x7c78[1612])[_0x7c78[61]]();$(_0x7c78[379])[_0x7c78[61]]();$(_0x7c78[1641])[_0x7c78[61]]();$(_0x7c78[1090])[_0x7c78[61]]();$(_0x7c78[1088])[_0x7c78[61]]();$(_0x7c78[1642])[_0x7c78[61]]();$(_0x7c78[520])[_0x7c78[61]]();$(_0x7c78[1643])[_0x7c78[61]]();$(_0x7c78[1644])[_0x7c78[61]]();$(this)[_0x7c78[281]](_0x7c78[1645]+ Premadeletter48)}else {$(_0x7c78[1612])[_0x7c78[87]]();$(_0x7c78[379])[_0x7c78[87]]();$(_0x7c78[1090])[_0x7c78[87]]();$(_0x7c78[1088])[_0x7c78[87]]();$(_0x7c78[1642])[_0x7c78[87]]();$(_0x7c78[520])[_0x7c78[87]]();$(_0x7c78[1644])[_0x7c78[87]]();$(_0x7c78[1643])[_0x7c78[87]]();$(this)[_0x7c78[281]](_0x7c78[1645]+ Premadeletter49)}});$(_0x7c78[1647])[_0x7c78[208]](function(){$(_0x7c78[376])[_0x7c78[61]]();$(_0x7c78[377])[_0x7c78[61]]();$(_0x7c78[378])[_0x7c78[61]]();$(_0x7c78[379])[_0x7c78[61]]();$(_0x7c78[1646])[_0x7c78[87]]()});$(_0x7c78[81])[_0x7c78[281]](_0x7c78[1648]);$(_0x7c78[327])[_0x7c78[76]](_0x7c78[6]);$(_0x7c78[327])[_0x7c78[713]](_0x7c78[1649]+ modVersion+ semimodVersion+ _0x7c78[1650]+ _0x7c78[1651]);$(_0x7c78[1612])[_0x7c78[61]]();$(_0x7c78[379])[_0x7c78[61]]();$(_0x7c78[1641])[_0x7c78[61]]();$(_0x7c78[1638])[_0x7c78[61]]();$(_0x7c78[1652])[_0x7c78[76]](timesopened);LMserverbox();bluebtns();SNEZServers();$(_0x7c78[410])[_0x7c78[206]](_0x7c78[1482],_0x7c78[1483]);$(_0x7c78[1654])[_0x7c78[128]](_0x7c78[1653]+ Premadeletter109+ _0x7c78[172]);$(_0x7c78[1654])[_0x7c78[128]](_0x7c78[1655]+ Premadeletter109a+ _0x7c78[172]);if(document[_0x7c78[56]][_0x7c78[55]](_0x7c78[54])){$(_0x7c78[1654])[_0x7c78[130]](_0x7c78[1656]);if(localStorage[_0x7c78[3]](_0x7c78[112])!= _0x7c78[6]&& localStorage[_0x7c78[3]](_0x7c78[112])!= null&& localStorage[_0x7c78[3]](_0x7c78[112])!= _0x7c78[4]){userid= localStorage[_0x7c78[3]](_0x7c78[112]);$(_0x7c78[1223])[_0x7c78[59]](window[_0x7c78[112]])};$(_0x7c78[1223])[_0x7c78[1121]](function(){IdfromLegendmod()})};core[_0x7c78[709]]= function(){adres(null,$(_0x7c78[69])[_0x7c78[59]](),$(_0x7c78[60])[_0x7c78[59]]());pauseVideos()};$(_0x7c78[237])[_0x7c78[208]](function(){setTimeout(function(){adres(null,$(_0x7c78[69])[_0x7c78[59]](),$(_0x7c78[60])[_0x7c78[59]]())},100)});$(_0x7c78[69])[_0x7c78[57]](function(){setTimeout(function(){adres(null,$(_0x7c78[69])[_0x7c78[59]](),$(_0x7c78[60])[_0x7c78[59]]())},100)});$(_0x7c78[60])[_0x7c78[57]](function(){setTimeout(function(){adres(null,$(_0x7c78[69])[_0x7c78[59]](),$(_0x7c78[60])[_0x7c78[59]]())},100)});$(_0x7c78[295])[_0x7c78[208]](function(){adres(null,null,null)});$(_0x7c78[972])[_0x7c78[208]](function(){adres(null,null,null)});triggerLMbtns();languagemodfun();$(_0x7c78[1657])[_0x7c78[1300]]();$(_0x7c78[280])[_0x7c78[801]](_0x7c78[1658],_0x7c78[474],function(){MSGCOMMANDS= $(_0x7c78[474])[_0x7c78[76]]();MSGNICK= $(_0x7c78[1660])[_0x7c78[1659]]()[_0x7c78[76]]()[_0x7c78[168]](_0x7c78[273],_0x7c78[6]);MsgCommands1(MSGCOMMANDS,MSGNICK)});$(_0x7c78[280])[_0x7c78[801]](_0x7c78[1661],_0x7c78[597],function(){MSGCOMMANDS= $(_0x7c78[473])[_0x7c78[76]]();MSGNICK= $(_0x7c78[1660])[_0x7c78[1659]]()[_0x7c78[76]]()[_0x7c78[168]](_0x7c78[273],_0x7c78[6]);MsgCommands1(MSGCOMMANDS,MSGNICK)})}function joinSIPonstart(){setTimeout(function(){if(searchSip!= null){if(realmode!= null&& region!= null){$(_0x7c78[69])[_0x7c78[59]](realmode);if(region== _0x7c78[58]){deleteGamemode()}};if(getParameterByName(_0x7c78[92],url)[_0x7c78[168]](_0x7c78[212],_0x7c78[6])[_0x7c78[168]](_0x7c78[214],_0x7c78[6])!= $(_0x7c78[213])[_0x7c78[59]]()){joinSIPonstart1();joinSIPonstart2()}}else {if(url[_0x7c78[55]](_0x7c78[226])== true){$(_0x7c78[69])[_0x7c78[59]](_0x7c78[68]);realmodereturnfromStart();joinpartyfromconnect()}}},1000)}function joinSIPonstart2(){setTimeout(function(){if(getParameterByName(_0x7c78[92],url)[_0x7c78[168]](_0x7c78[212],_0x7c78[6])[_0x7c78[168]](_0x7c78[214],_0x7c78[6])!= $(_0x7c78[213])[_0x7c78[59]]()){joinSIPonstart1();joinSIPonstart3()}},1000)}function joinSIPonstart3(){setTimeout(function(){if(getParameterByName(_0x7c78[92],url)[_0x7c78[168]](_0x7c78[212],_0x7c78[6])[_0x7c78[168]](_0x7c78[214],_0x7c78[6])!= $(_0x7c78[213])[_0x7c78[59]]()){toastr[_0x7c78[173]](_0x7c78[1662])}},1500)}function joinSIPonstart1(){realmodereturnfromStart();$(_0x7c78[213])[_0x7c78[59]](getParameterByName(_0x7c78[92],url)[_0x7c78[168]](_0x7c78[212],_0x7c78[6])[_0x7c78[168]](_0x7c78[214],_0x7c78[6]));if(region!= null&& realmode!= null){currentIPopened= true;legendmod[_0x7c78[67]]= realmode};$(_0x7c78[295])[_0x7c78[208]]()}function joinPLAYERonstart(){setTimeout(function(){if(searchedplayer!= null){$(_0x7c78[969])[_0x7c78[59]](searchedplayer);getSNEZServers(_0x7c78[1663]);client2[_0x7c78[704]]();setTimeout(function(){if($(_0x7c78[1664])[_0x7c78[281]]()!= undefined){toastr[_0x7c78[157]](_0x7c78[1665]+ $(_0x7c78[1666])[_0x7c78[281]]()+ _0x7c78[1667]+ searchedplayer+ _0x7c78[1668]);$(_0x7c78[1664])[_0x7c78[208]]()}},1000)};if(autoplayplayer== _0x7c78[1161]){autoplayplaying();window[_0x7c78[1669]]= true}},1000)}function joinreplayURLonstart(){setTimeout(function(){if(replayURL){BeforeReplay();setTimeout(function(){loadReplayFromWeb(replayURL)},2000)}},1000)}function autoplayplaying(){$(_0x7c78[293])[_0x7c78[59]](_0x7c78[1670]);window[_0x7c78[1671]][_0x7c78[789]]= false;window[_0x7c78[1671]][_0x7c78[1672]]= false;window[_0x7c78[1671]][_0x7c78[1673]]= false;window[_0x7c78[1671]][_0x7c78[1674]]= false;window[_0x7c78[1671]][_0x7c78[1675]]= false;window[_0x7c78[1671]][_0x7c78[1676]]= false;window[_0x7c78[1671]][_0x7c78[1677]]= false;window[_0x7c78[1671]][_0x7c78[1678]]= false;window[_0x7c78[1671]][_0x7c78[1679]]= false;window[_0x7c78[1671]][_0x7c78[1680]]= false;window[_0x7c78[1671]][_0x7c78[1681]]= false;window[_0x7c78[1671]][_0x7c78[1682]]= false;window[_0x7c78[1671]][_0x7c78[1683]]= false;window[_0x7c78[1671]][_0x7c78[1684]]= false;window[_0x7c78[1671]][_0x7c78[1685]]= false;window[_0x7c78[1671]][_0x7c78[1686]]= false;window[_0x7c78[1671]][_0x7c78[1687]]= false;window[_0x7c78[1671]][_0x7c78[1688]]= false;defaultmapsettings[_0x7c78[877]]= false;window[_0x7c78[1671]][_0x7c78[1689]]= false;window[_0x7c78[1671]][_0x7c78[1690]]= false;window[_0x7c78[1671]][_0x7c78[1691]]= false;window[_0x7c78[1671]][_0x7c78[1692]]= false;window[_0x7c78[1671]][_0x7c78[1693]]= true;$(_0x7c78[74])[_0x7c78[208]]()}function joinSERVERfindinfo(){$(_0x7c78[961])[_0x7c78[281]](_0x7c78[6]);var _0x1499x217;setTimeout(function(){_0x1499x217= $(_0x7c78[213])[_0x7c78[59]]();if(_0x1499x217!= null){$(_0x7c78[969])[_0x7c78[59]](_0x1499x217);getSNEZServers(_0x7c78[1663]);client2[_0x7c78[704]]();setTimeout(function(){if($(_0x7c78[1664])[_0x7c78[281]]()!= undefined&& $(_0x7c78[1664])[_0x7c78[281]]()!= _0x7c78[6]){for(var _0x1499xd8=0;_0x1499xd8< $(_0x7c78[1664])[_0x7c78[140]];_0x1499xd8++){if($(_0x7c78[1666])[_0x7c78[1694]](_0x1499xd8)[_0x7c78[281]]()== $(_0x7c78[293])[_0x7c78[59]]()){$(_0x7c78[1664])[_0x7c78[1694]](_0x1499xd8)[_0x7c78[176]]()};if($(_0x7c78[1695])[_0x7c78[1694]](_0x1499xd8)[_0x7c78[281]]()== null|| $(_0x7c78[1695])[_0x7c78[1694]](_0x1499xd8)[_0x7c78[281]]()== _0x7c78[4]){$(_0x7c78[1664])[_0x7c78[1694]](_0x1499xd8)[_0x7c78[176]]()};if($(_0x7c78[1696])[_0x7c78[1694]](_0x1499xd8)[_0x7c78[281]]()== null|| $(_0x7c78[1696])[_0x7c78[1694]](_0x1499xd8)[_0x7c78[281]]()== _0x7c78[4]){$(_0x7c78[1664])[_0x7c78[1694]](_0x1499xd8)[_0x7c78[176]]()}};if($(_0x7c78[1664])[_0x7c78[281]]()!= undefined&& $(_0x7c78[1664])[_0x7c78[281]]()!= _0x7c78[6]){Regions= {};var _0x1499x145=0;$(_0x7c78[60])[_0x7c78[1698]](_0x7c78[1697])[_0x7c78[930]](function(){Regions[_0x1499x145]= $(this)[_0x7c78[59]]();_0x1499x145++});Modes= {};var _0x1499x144=0;$(_0x7c78[69])[_0x7c78[1698]](_0x7c78[1697])[_0x7c78[930]](function(){if($(this)[_0x7c78[59]]()== _0x7c78[261]|| $(this)[_0x7c78[59]]()== _0x7c78[1699]|| $(this)[_0x7c78[59]]()== _0x7c78[263]|| $(this)[_0x7c78[59]]()== _0x7c78[265]|| $(this)[_0x7c78[59]]()== _0x7c78[68]){Modes[_0x1499x144]= $(this)[_0x7c78[59]]();_0x1499x144++}});countRegions= new Array(8)[_0x7c78[921]](0);for(var _0x1499xd8=0;_0x1499xd8< $(_0x7c78[1664])[_0x7c78[140]];_0x1499xd8++){if($(_0x7c78[1695])[_0x7c78[1694]](_0x1499xd8)[_0x7c78[281]]()!= null&& $(_0x7c78[1695])[_0x7c78[1694]](_0x1499xd8)[_0x7c78[281]]()!= null){for(var _0x1499x143=0;_0x1499x143<= 8;_0x1499x143++){if($(_0x7c78[1695])[_0x7c78[1694]](_0x1499xd8)[_0x7c78[281]]()== Regions[_0x1499x143]){countRegions[_0x1499x143]++}}}};countModes= new Array(5)[_0x7c78[921]](0);for(var _0x1499xd8=0;_0x1499xd8< $(_0x7c78[1664])[_0x7c78[140]];_0x1499xd8++){if($(_0x7c78[1696])[_0x7c78[1694]](_0x1499xd8)[_0x7c78[281]]()!= null&& $(_0x7c78[1695])[_0x7c78[1694]](_0x1499xd8)[_0x7c78[281]]()!= null){for(var _0x1499x143=0;_0x1499x143< 5;_0x1499x143++){if($(_0x7c78[1696])[_0x7c78[1694]](_0x1499xd8)[_0x7c78[281]]()== Modes[_0x1499x143]){countModes[_0x1499x143]++}}}};var _0x1499x218=0;var _0x1499x219=0;var _0x1499x21a=0;var _0x1499x21b=0;var _0x1499x21c=_0x7c78[6];for(var _0x1499xd8=0;_0x1499xd8< countRegions[_0x7c78[140]];_0x1499xd8++){if(countRegions[_0x1499xd8]> 0){if(_0x1499xd8!= 0){_0x1499x21c= _0x1499x21c+ countRegions[_0x1499xd8]+ _0x7c78[1700]+ Regions[_0x1499xd8]+ _0x7c78[324];if(countRegions[_0x1499xd8]> _0x1499x218){_0x1499x218= countRegions[_0x1499xd8];_0x1499x21a= Regions[_0x1499xd8]}}}};for(var _0x1499xd8=-1;_0x1499xd8< countModes[_0x7c78[140]];_0x1499xd8++){if(countModes[_0x1499xd8]> 0){if(_0x1499xd8!= -1){_0x1499x21c= _0x1499x21c+ countModes[_0x1499xd8]+ _0x7c78[1701]+ Modes[_0x1499xd8]+ _0x7c78[324];if(countModes[_0x1499xd8]> _0x1499x219){_0x1499x219= countModes[_0x1499xd8];_0x1499x21b= Modes[_0x1499xd8]}}}};realmode= _0x1499x21b;region= _0x1499x21a;setTimeout(function(){if(_0x1499x21a!= 0&& _0x1499x21a!= null&& _0x1499x21b!= 0&& _0x1499x21b!= null){if(document[_0x7c78[56]][_0x7c78[55]](_0x7c78[54])){history[_0x7c78[220]](stateObj,_0x7c78[216],_0x7c78[217]+ currentIP)}else {if(legendmod[_0x7c78[215]]){history[_0x7c78[220]](stateObj,_0x7c78[216],_0x7c78[221]+ currentIP+ _0x7c78[218]+ _0x1499x21a+ _0x7c78[219]+ _0x1499x21b)}else {if(!legendmod[_0x7c78[215]]){history[_0x7c78[220]](stateObj,_0x7c78[216],_0x7c78[221]+ currentIP)}}}};ModeRegionregion()},1500);if($(_0x7c78[60])[_0x7c78[59]]()!= _0x1499x21a|| $(_0x7c78[69])[_0x7c78[59]]()!= _0x1499x21b){_0x1499x21c= _0x1499x21c+ _0x7c78[1702]+ _0x1499x21a+ _0x7c78[1703]+ _0x1499x21b+ _0x7c78[1704];_0x1499x21c= _0x1499x21c+ _0x7c78[1705];toastr[_0x7c78[157]](_0x1499x21c)[_0x7c78[73]](_0x7c78[71],_0x7c78[182]);if(_0x1499x21a!= 0&& _0x1499x21a!= null){$(_0x7c78[60])[_0x7c78[59]](_0x1499x21a);master[_0x7c78[1706]]= $(_0x7c78[60])[_0x7c78[59]]()};if(_0x1499x21b!= 0&& _0x1499x21b!= null){$(_0x7c78[69])[_0x7c78[59]](_0x1499x21b);master[_0x7c78[67]]= $(_0x7c78[69])[_0x7c78[59]]();legendmod[_0x7c78[67]]= master[_0x7c78[67]]}}}}},1500)}},100)}function ModeRegionregion(){realmode= $(_0x7c78[69])[_0x7c78[59]]();region= $(_0x7c78[60])[_0x7c78[59]]();return realmode,region}function ytFrame(){setTimeout(function(){if( typeof YT!== _0x7c78[938]){musicPlayer= new YT.Player(_0x7c78[1707],{events:{'\x6F\x6E\x53\x74\x61\x74\x65\x43\x68\x61\x6E\x67\x65':function(_0x1499x1e4){if(_0x1499x1e4[_0x7c78[1250]]== 1){$(_0x7c78[1543])[_0x7c78[247]](_0x7c78[1542])[_0x7c78[245]](_0x7c78[1541]);$(_0x7c78[544])[_0x7c78[206]](_0x7c78[986],Premadeletter60)[_0x7c78[1300]](_0x7c78[1544])}else {$(_0x7c78[1543])[_0x7c78[247]](_0x7c78[1541])[_0x7c78[245]](_0x7c78[1542]);$(_0x7c78[544])[_0x7c78[206]](_0x7c78[986],Premadeletter13)[_0x7c78[1300]](_0x7c78[1544])}}}})}},1500)}function BeforeSpecialDeals(){var _0x1499x220=document[_0x7c78[936]](_0x7c78[935]);_0x1499x220[_0x7c78[926]]= _0x7c78[937];_0x1499x220[_0x7c78[470]]= _0x7c78[1708];$(_0x7c78[280])[_0x7c78[279]](_0x1499x220)}function BeforeLegendmodShop(){var _0x1499x220=document[_0x7c78[936]](_0x7c78[935]);_0x1499x220[_0x7c78[926]]= _0x7c78[937];_0x1499x220[_0x7c78[470]]= _0x7c78[1709];$(_0x7c78[280])[_0x7c78[279]](_0x1499x220)}function BeforeReplay(){var _0x1499x223=document[_0x7c78[936]](_0x7c78[935]);_0x1499x223[_0x7c78[926]]= _0x7c78[937];_0x1499x223[_0x7c78[470]]= _0x7c78[1710];$(_0x7c78[280])[_0x7c78[279]](_0x1499x223)}function isEquivalent(_0x1499x8e,_0x1499x91){var _0x1499x225=Object[_0x7c78[1711]](_0x1499x8e);var _0x1499x226=Object[_0x7c78[1711]](_0x1499x91);if(_0x1499x225[_0x7c78[140]]!= _0x1499x226[_0x7c78[140]]){return false};for(var _0x1499xd8=0;_0x1499xd8< _0x1499x225[_0x7c78[140]];_0x1499xd8++){var _0x1499x227=_0x1499x225[_0x1499xd8];if(_0x1499x8e[_0x1499x227]!== _0x1499x91[_0x1499x227]){return false}};return true}function AgarVersionDestinations(){window[_0x7c78[1712]]= false;window[_0x7c78[1713]]= {};window[_0x7c78[1713]][Object[_0x7c78[833]](agarversionDestinations)[_0x7c78[140]]- 1]= window[_0x7c78[1606]];getSNEZ(_0x7c78[1224],_0x7c78[1714],_0x7c78[1715]);var _0x1499x229=JSON[_0x7c78[107]](xhttp[_0x7c78[1228]]);for(var _0x1499xd8=0;_0x1499xd8< Object[_0x7c78[833]](_0x1499x229)[_0x7c78[140]];_0x1499xd8++){if(_0x1499x229[_0x1499xd8]== window[_0x7c78[1606]]){window[_0x7c78[1712]]= true}};if(window[_0x7c78[1712]]== true){window[_0x7c78[1713]]= _0x1499x229;window[_0x7c78[1712]]= false}else {if(window[_0x7c78[1712]]== false&& isObject(_0x1499x229)){window[_0x7c78[1713]]= _0x1499x229;window[_0x7c78[1713]][Object[_0x7c78[833]](_0x1499x229)[_0x7c78[140]]]= window[_0x7c78[1606]];postSNEZ(_0x7c78[1224],_0x7c78[1714],_0x7c78[1715],JSON[_0x7c78[415]](window[_0x7c78[1713]]))}}}function isObject(_0x1499x22b){if(_0x1499x22b=== null){return false};return (( typeof _0x1499x22b=== _0x7c78[1716])|| ( typeof _0x1499x22b=== _0x7c78[1717]))}function LegendModServerConnect(){}function UIDcontroller(){PremiumUsers();AgarBannedUIDs();var _0x1499x22e=localStorage[_0x7c78[3]](_0x7c78[1718]);if(bannedUserUIDs[_0x7c78[55]](window[_0x7c78[186]])|| _0x1499x22e== _0x7c78[115]){localStorage[_0x7c78[117]](_0x7c78[1718],true);document[_0x7c78[204]][_0x7c78[203]]= _0x7c78[6];window[_0x7c78[934]][_0x7c78[117]](_0x7c78[1719],defaultSettings[_0x7c78[1720]]);toastr[_0x7c78[173]](_0x7c78[199]+ Premadeletter123+ _0x7c78[200]+ _0x7c78[1721]+ _0x7c78[1722]+ _0x7c78[1723])[_0x7c78[73]](_0x7c78[71],_0x7c78[182])}}function AgarBannedUIDs(){getSNEZ(_0x7c78[1224],_0x7c78[1724],_0x7c78[1725]);var _0x1499x230=JSON[_0x7c78[107]](xhttp[_0x7c78[1228]]);for(var _0x1499xd8=0;_0x1499xd8< Object[_0x7c78[833]](_0x1499x230)[_0x7c78[140]];_0x1499xd8++){if(window[_0x7c78[1726]]){_0x1499x230[_0x1499xd8][_0x7c78[190]](_0x7c78[189])[0];if(!bannedUserUIDs[_0x7c78[55]](_0x1499x230[_0x1499xd8])){window[_0x7c78[1726]][_0x7c78[885]](_0x1499x230[_0x1499xd8])}}};window[_0x7c78[1727]]= true}function AddAgarBannedUIDs(_0x1499x232){if(window[_0x7c78[1726]]&& window[_0x7c78[1727]]){if(!window[_0x7c78[1726]][_0x7c78[55]](_0x1499x232)&& _0x1499x232!= null && _0x1499x232!= _0x7c78[6] && window[_0x7c78[186]][_0x7c78[55]](_0x7c78[1728])){window[_0x7c78[1726]][window[_0x7c78[1726]][_0x7c78[140]]]= _0x1499x232;postSNEZ(_0x7c78[1224],_0x7c78[1724],_0x7c78[1725],JSON[_0x7c78[415]](window[_0x7c78[1726]]))}}}function RemoveAgarBannedUIDs(_0x1499x232){if(window[_0x7c78[1726]]&& window[_0x7c78[1727]]){if(_0x1499x232!= null){for(var _0x1499xd8=bannedUserUIDs[_0x7c78[140]]- 1;_0x1499xd8>= 0;_0x1499xd8--){if(bannedUserUIDs[_0x1499xd8]=== _0x1499x232){bannedUserUIDs[_0x7c78[1729]](_0x1499xd8,1)}};postSNEZ(_0x7c78[1224],_0x7c78[1724],_0x7c78[1725],JSON[_0x7c78[415]](window[_0x7c78[1726]]))}}}function BannedUIDS(){if(AdminRights== 1){if(window[_0x7c78[1727]]){$(_0x7c78[527])[_0x7c78[130]](_0x7c78[1730]+ _0x7c78[1731]+ _0x7c78[1732]+ _0x7c78[1733]+ _0x7c78[1734]+ Premadeletter113+ _0x7c78[1735]+ Premadeletter113+ _0x7c78[1736]+ _0x7c78[1737]+ _0x7c78[1738]+ _0x7c78[1739]+ _0x7c78[652]+ _0x7c78[1740]+ _0x7c78[1741]+ _0x7c78[1742]+ _0x7c78[1743]+ _0x7c78[1744]+ _0x7c78[1745]+ _0x7c78[1746]+ _0x7c78[1747]+ _0x7c78[1748]+ _0x7c78[1749]+ _0x7c78[324]+ _0x7c78[1750]+ _0x7c78[1751]+ _0x7c78[1752]+ window[_0x7c78[186]]+ _0x7c78[1753]+ _0x7c78[652]+ _0x7c78[652]+ _0x7c78[652]+ _0x7c78[652]);populateBanListConfig();$(_0x7c78[1755])[_0x7c78[208]](function(){$(_0x7c78[1754])[_0x7c78[176]]()});$(_0x7c78[1757])[_0x7c78[208]](function(){window[_0x7c78[119]](_0x7c78[1756],_0x7c78[486])});$(_0x7c78[1764])[_0x7c78[208]](function(){var _0x1499x9d=$(_0x7c78[1758])[_0x7c78[59]]();if(!bannedUserUIDs[_0x7c78[55]](_0x1499x9d)&& _0x1499x9d!= null && _0x1499x9d!= _0x7c78[6] && _0x1499x9d[_0x7c78[55]](_0x7c78[1728])){AddAgarBannedUIDs(_0x1499x9d);bannedUserUIDs[_0x7c78[885]](_0x1499x9d);var _0x1499x235=document[_0x7c78[936]](_0x7c78[1697]);_0x1499x235[_0x7c78[76]]= _0x1499x9d;document[_0x7c78[407]](_0x7c78[1760])[_0x7c78[1759]][_0x7c78[823]](_0x1499x235);toastr[_0x7c78[157]](_0x7c78[199]+ Premadeletter123+ _0x7c78[200]+ _0x7c78[1761]+ _0x1499x9d+ _0x7c78[1762])}else {toastr[_0x7c78[157]](_0x7c78[199]+ Premadeletter123+ _0x7c78[200]+ _0x7c78[1761]+ _0x1499x9d+ _0x7c78[1763])}});$(_0x7c78[1768])[_0x7c78[208]](function(){var _0x1499x9d=$(_0x7c78[1765])[_0x7c78[59]]();var _0x1499xe2=document[_0x7c78[407]](_0x7c78[1760]);_0x1499xe2[_0x7c78[176]](_0x1499xe2[_0x7c78[1766]]);RemoveAgarBannedUIDs(_0x1499x9d);toastr[_0x7c78[157]](_0x7c78[199]+ Premadeletter123+ _0x7c78[200]+ _0x7c78[1761]+ _0x1499x9d+ _0x7c78[1767])})}else {toastr[_0x7c78[157]](_0x7c78[199]+ Premadeletter123+ _0x7c78[200]+ _0x7c78[1769])}}else {toastr[_0x7c78[157]](_0x7c78[199]+ Premadeletter123+ _0x7c78[200]+ _0x7c78[1770])}}function populateBanListConfig(){var _0x1499x237=document[_0x7c78[407]](_0x7c78[1760]);for(i= 0;i< Object[_0x7c78[833]](window[_0x7c78[1726]])[_0x7c78[140]];i++){_0x1499x237[_0x7c78[1759]][_0x1499x237[_0x7c78[1759]][_0x7c78[140]]]= new Option(window[_0x7c78[1726]][i])}}function findUserLang(){if(window[_0x7c78[1772]][_0x7c78[1771]]){if(window[_0x7c78[1772]][_0x7c78[1771]][0]&& (window[_0x7c78[1772]][_0x7c78[1771]][0]== _0x7c78[1773]|| window[_0x7c78[1772]][_0x7c78[1771]][1][_0x7c78[55]](_0x7c78[1728]))){if(window[_0x7c78[1772]][_0x7c78[1771]][1]&& (window[_0x7c78[1772]][_0x7c78[1771]][1]== _0x7c78[1773]|| window[_0x7c78[1772]][_0x7c78[1771]][1][_0x7c78[55]](_0x7c78[1728]))){if(window[_0x7c78[1772]][_0x7c78[1771]][2]&& (window[_0x7c78[1772]][_0x7c78[1771]][2]== _0x7c78[1773]|| window[_0x7c78[1772]][_0x7c78[1771]][2][_0x7c78[55]](_0x7c78[1728]))){if(window[_0x7c78[1772]][_0x7c78[1771]][3]&& !(window[_0x7c78[1772]][_0x7c78[1771]][2]== _0x7c78[1773]|| window[_0x7c78[1772]][_0x7c78[1771]][2][_0x7c78[55]](_0x7c78[1728]))){window[_0x7c78[1]]= window[_0x7c78[1772]][_0x7c78[1771]][3]}}else {window[_0x7c78[1]]= window[_0x7c78[1772]][_0x7c78[1771]][2]}}else {window[_0x7c78[1]]= window[_0x7c78[1772]][_0x7c78[1771]][1]}}else {window[_0x7c78[1]]= window[_0x7c78[1772]][_0x7c78[1771]][0]}}}function startTranslating(){var _0x1499x23a=document[_0x7c78[396]](_0x7c78[597]);var _0x1499x23b={childList:true,attributes:false,subtree:false};var _0x1499x23c= new MutationObserver(_0x1499x23d);function _0x1499x23d(_0x1499x23e,_0x1499x23c){_0x1499x23e[_0x7c78[832]]((_0x1499x1d1)=>{if(defaultmapsettings[_0x7c78[1774]]&& _0x1499x23a[_0x7c78[1777]][_0x7c78[1776]][_0x7c78[1775]](_0x7c78[835])&& !_0x1499x23a[_0x7c78[1777]][_0x7c78[1776]][_0x7c78[1775]](_0x7c78[811])){doMainTranslation(_0x1499x23a,_0x1499x23a[_0x7c78[1777]][_0x7c78[1777]][_0x7c78[1779]][_0x7c78[1778]])}})}_0x1499x23c[_0x7c78[1210]](_0x1499x23a,_0x1499x23b)}function doMainTranslation(_0x1499x23a,_0x1499x240){var _0x1499x241=document[_0x7c78[936]](_0x7c78[1052]);var _0x1499x242;_0x1499x241[_0x7c78[1045]][_0x7c78[662]]= _0x7c78[1780];_0x1499x241[_0x7c78[1045]][_0x7c78[1781]]= _0x7c78[1782];var _0x1499x243= new XMLHttpRequest();_0x1499x243[_0x7c78[119]](_0x7c78[1783],_0x7c78[1784]+ encodeURIComponent(_0x1499x240)+ _0x7c78[1785]+ window[_0x7c78[1]]+ _0x7c78[1786],true);_0x1499x243[_0x7c78[1787]]= function(){if(_0x1499x243[_0x7c78[1248]]== 4){if(_0x1499x243[_0x7c78[1788]]== 200){var _0x1499xfe=_0x1499x243[_0x7c78[1789]];_0x1499xfe= JSON[_0x7c78[107]](_0x1499xfe);_0x1499xfe= _0x1499xfe[_0x7c78[76]][0];_0x1499x241[_0x7c78[1778]]= _0x7c78[907]+ _0x1499xfe+ _0x7c78[909];_0x1499x242= _0x7c78[907]+ _0x1499xfe+ _0x7c78[909]}}};_0x1499x243[_0x7c78[123]]();_0x1499x23a[_0x7c78[1777]][_0x7c78[1777]][_0x7c78[940]](_0x1499x241)}function changeFrameWork(){if($(_0x7c78[1345])[_0x7c78[59]]()== _0x7c78[116]){defaultmapsettings[_0x7c78[1331]]= false}else {if($(_0x7c78[1345])[_0x7c78[59]]()== _0x7c78[115]){defaultmapsettings[_0x7c78[1331]]= true}else {if($(_0x7c78[1345])[_0x7c78[59]]()== 2){defaultmapsettings[_0x7c78[1331]]= 2}else {if($(_0x7c78[1345])[_0x7c78[59]]()== 4){defaultmapsettings[_0x7c78[1331]]= 4}else {if($(_0x7c78[1345])[_0x7c78[59]]()== 8){defaultmapsettings[_0x7c78[1331]]= 8}else {if($(_0x7c78[1345])[_0x7c78[59]]()== 16){defaultmapsettings[_0x7c78[1331]]= 16}else {if($(_0x7c78[1345])[_0x7c78[59]]()== 32){defaultmapsettings[_0x7c78[1331]]= 32}else {if($(_0x7c78[1345])[_0x7c78[59]]()== 64){defaultmapsettings[_0x7c78[1331]]= 64}else {if($(_0x7c78[1345])[_0x7c78[59]]()== _0x7c78[1790]){defaultmapsettings[_0x7c78[1331]]= _0x7c78[1790]}else {if($(_0x7c78[1345])[_0x7c78[59]]()== _0x7c78[1791]){defaultmapsettings[_0x7c78[1331]]= _0x7c78[1791]}}}}}}}}}};application[_0x7c78[1793]](defaultmapsettings,_0x7c78[1792])}function changeFrameWorkStart(){if(defaultmapsettings[_0x7c78[1331]]== true){setTimeout(function(){$(_0x7c78[1345])[_0x7c78[59]](_0x7c78[115])},10)};if(defaultmapsettings[_0x7c78[1331]]){$(_0x7c78[1345])[_0x7c78[59]](defaultmapsettings[_0x7c78[1331]])}else {if(defaultmapsettings[_0x7c78[1331]]== false){$(_0x7c78[1345])[_0x7c78[59]](_0x7c78[116])}}}function LMrewardDay(){$(_0x7c78[527])[_0x7c78[130]](_0x7c78[1794]+ _0x7c78[1731]+ _0x7c78[1795]+ _0x7c78[1733]+ _0x7c78[1796]+ Premadeletter113+ _0x7c78[1797]+ Premadeletter113+ _0x7c78[1736]+ _0x7c78[1737]+ _0x7c78[1798]+ _0x7c78[1739]+ _0x7c78[652]+ _0x7c78[1799]+ _0x7c78[652]+ _0x7c78[652]+ _0x7c78[652]+ _0x7c78[652]);$(_0x7c78[1800])[_0x7c78[695]]();$(_0x7c78[1802])[_0x7c78[208]](function(){$(_0x7c78[1801])[_0x7c78[176]]()});$(_0x7c78[1804])[_0x7c78[208]](function(){window[_0x7c78[119]](_0x7c78[1803],_0x7c78[486])})}function VideoSkinsPromo(){$(_0x7c78[527])[_0x7c78[130]](_0x7c78[1794]+ _0x7c78[1731]+ _0x7c78[1795]+ _0x7c78[1733]+ _0x7c78[1796]+ Premadeletter113+ _0x7c78[1797]+ Premadeletter113+ _0x7c78[1736]+ _0x7c78[1737]+ _0x7c78[1805]+ _0x7c78[1739]+ _0x7c78[652]+ _0x7c78[1806]+ _0x7c78[652]+ _0x7c78[652]+ _0x7c78[652]+ _0x7c78[652]);$(_0x7c78[1800])[_0x7c78[695]]();$(_0x7c78[1802])[_0x7c78[208]](function(){$(_0x7c78[1801])[_0x7c78[176]]()});$(_0x7c78[1804])[_0x7c78[208]](function(){window[_0x7c78[119]](_0x7c78[1803],_0x7c78[486])})}Premadeletter39= _0x7c78[1807];function adminstuff(){defaultSettings[_0x7c78[1720]]= _0x7c78[1808];window[_0x7c78[934]][_0x7c78[117]](_0x7c78[1809],JSON[_0x7c78[415]](defaultSettings));var legbgpic=$(_0x7c78[103])[_0x7c78[59]]();var legbgcolor=$(_0x7c78[102])[_0x7c78[59]]();$(_0x7c78[327])[_0x7c78[130]](_0x7c78[1810]+ legbgpic+ _0x7c78[305]+ legbgcolor+ _0x7c78[1811]+ _0x7c78[1812]+ _0x7c78[1813]+ _0x7c78[1814]+ _0x7c78[1815]+ _0x7c78[1816]+ _0x7c78[1817]+ _0x7c78[326]);$(_0x7c78[1819])[_0x7c78[130]](_0x7c78[1818]);$(_0x7c78[1820])[_0x7c78[59]](_0x7c78[549]);if(localStorage[_0x7c78[3]](_0x7c78[1821])&& localStorage[_0x7c78[3]](_0x7c78[1821])!= _0x7c78[6]){$(_0x7c78[1820])[_0x7c78[59]](localStorage[_0x7c78[3]](_0x7c78[1821]))};$(_0x7c78[1823])[_0x7c78[59]](localStorage[_0x7c78[3]](_0x7c78[1822]));$(_0x7c78[1820])[_0x7c78[1121]](function(){AdminClanSymbol= $(_0x7c78[1820])[_0x7c78[59]]();localStorage[_0x7c78[117]](_0x7c78[1821],AdminClanSymbol)});$(_0x7c78[1823])[_0x7c78[1121]](function(){AdminPassword= $(_0x7c78[1823])[_0x7c78[59]]();if($(_0x7c78[1820])[_0x7c78[59]]()!= _0x7c78[6]){if(AdminPassword== atob(_0x7c78[1824])){localStorage[_0x7c78[117]](_0x7c78[1822],AdminPassword);toastr[_0x7c78[184]](_0x7c78[1825]+ document[_0x7c78[407]](_0x7c78[372])[_0x7c78[405]]+ _0x7c78[1826]);$(_0x7c78[376])[_0x7c78[87]]();$(_0x7c78[377])[_0x7c78[87]]();$(_0x7c78[378])[_0x7c78[87]]();$(_0x7c78[379])[_0x7c78[87]]();$(_0x7c78[1827])[_0x7c78[61]]();$(_0x7c78[1088])[_0x7c78[713]](_0x7c78[1828]+ _0x7c78[1829]+ _0x7c78[1830]+ _0x7c78[1831]+ _0x7c78[1832]+ _0x7c78[1833]+ _0x7c78[652]);return AdminRights= 1}else {toastr[_0x7c78[157]](_0x7c78[199]+ Premadeletter123+ _0x7c78[200]+ _0x7c78[1834])}}else {toastr[_0x7c78[157]](_0x7c78[199]+ Premadeletter123+ _0x7c78[200]+ _0x7c78[1835])}});$(_0x7c78[293])[_0x7c78[1121]](function(){if($(_0x7c78[1837])[_0x7c78[596]](_0x7c78[1836])|| $(_0x7c78[1837])[_0x7c78[140]]== 0){if($(_0x7c78[293])[_0x7c78[59]]()== _0x7c78[1838]|| $(_0x7c78[293])[_0x7c78[59]]()== _0x7c78[1839]|| $(_0x7c78[293])[_0x7c78[59]]()== _0x7c78[1840]|| $(_0x7c78[293])[_0x7c78[59]]()== _0x7c78[1841]){$(_0x7c78[376])[_0x7c78[61]]();$(_0x7c78[377])[_0x7c78[61]]();$(_0x7c78[378])[_0x7c78[61]]();$(_0x7c78[379])[_0x7c78[61]]();$(_0x7c78[1827])[_0x7c78[87]]()}}});if($(_0x7c78[1823])[_0x7c78[59]]()== _0x7c78[1842]){$(_0x7c78[1823])[_0x7c78[1121]]()}}function banlistLM(){BannedUIDS()}function disconnect2min(){if(AdminRights== 1){commandMsg= _0x7c78[551];otherMsg= _0x7c78[6];dosendadmincommand();toastr[_0x7c78[157]](_0x7c78[199]+ Premadeletter123+ _0x7c78[200]+ _0x7c78[1843])}}function disconnectnow(){if(AdminRights== 1){commandMsg= _0x7c78[552];otherMsg= _0x7c78[6];dosendadmincommand();toastr[_0x7c78[157]](_0x7c78[199]+ Premadeletter123+ _0x7c78[200]+ _0x7c78[1844])}}function showstatsphp(){window[_0x7c78[119]](_0x7c78[1845],_0x7c78[486])}function showstatsphp2(){window[_0x7c78[119]](_0x7c78[1846],_0x7c78[486])}function dosendadmincommand(){if(AdminRights== 1){if($(_0x7c78[524])[_0x7c78[73]](_0x7c78[523])== _0x7c78[525]){KeyEvent[_0x7c78[1847]](13,13)};setTimeout(function(){$(_0x7c78[693])[_0x7c78[59]](_0x7c78[1848]+ otherMsg+ _0x7c78[1041]+ commandMsg);KeyEvent[_0x7c78[1847]](13,13);if($(_0x7c78[693])[_0x7c78[73]](_0x7c78[523])== _0x7c78[732]){KeyEvent[_0x7c78[1847]](13,13)};if($(_0x7c78[524])[_0x7c78[73]](_0x7c78[523])== _0x7c78[732]){KeyEvent[_0x7c78[1847]](13,13)}},100)}else {toastr[_0x7c78[157]](_0x7c78[199]+ Premadeletter123+ _0x7c78[200]+ _0x7c78[1849])}}function administrationtools(){$(_0x7c78[376])[_0x7c78[87]]();$(_0x7c78[377])[_0x7c78[87]]();$(_0x7c78[378])[_0x7c78[87]]();$(_0x7c78[379])[_0x7c78[87]]();$(_0x7c78[1827])[_0x7c78[61]]()}function LMadvertisementMegaFFA(){$(_0x7c78[527])[_0x7c78[130]](_0x7c78[1794]+ _0x7c78[1731]+ _0x7c78[1850]+ _0x7c78[1733]+ _0x7c78[1796]+ Premadeletter113+ _0x7c78[1797]+ Premadeletter113+ _0x7c78[1736]+ _0x7c78[1737]+ _0x7c78[1851]+ _0x7c78[1739]+ _0x7c78[652]+ _0x7c78[1852]+ _0x7c78[652]+ _0x7c78[652]+ _0x7c78[652]+ _0x7c78[652]);$(_0x7c78[1800])[_0x7c78[695]]();$(_0x7c78[1802])[_0x7c78[208]](function(){$(_0x7c78[1801])[_0x7c78[176]]()});$(_0x7c78[1804])[_0x7c78[208]](function(){window[_0x7c78[119]](_0x7c78[1803],_0x7c78[486])})}
<add>var _0xaf82=["\x31\x30","\x75\x73\x65\x72\x4C\x61\x6E\x67\x75\x61\x67\x65","\x70\x72\x6F\x4C\x69\x63\x65\x6E\x63\x65\x55\x49\x44","\x67\x65\x74\x49\x74\x65\x6D","\x6E\x75\x6C\x6C","\x30\x2E\x30\x2E\x30\x2E\x30\x3A\x30","","\x67\x61\x6D\x65\x6D\x6F\x64\x65","\x63\x68\x65\x63\x6B\x6F\x6E\x6C\x79\x6F\x6E\x63\x65","\x63\x68\x65\x63\x6B\x6F\x6E\x6C\x79\x74\x77\x65\x6C\x76\x74\x68","\x63\x68\x65\x63\x6B\x6F\x6E\x6C\x79\x65\x6C\x65\x76\x65\x6E\x74\x68","\x63\x68\x65\x63\x6B\x6F\x6E\x6C\x79\x72\x65\x77\x61\x72\x64\x64\x61\x79\x31","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x77\x77\x77\x2E\x79\x6F\x75\x74\x75\x62\x65\x2E\x63\x6F\x6D\x2F\x77\x61\x74\x63\x68\x3F\x76\x3D\x6E\x6A\x33\x33\x4D\x41\x72\x4E\x6A\x43\x38","\x62\x61\x72","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x69\x2E\x69\x6D\x67\x75\x72\x2E\x63\x6F\x6D\x2F\x52\x56\x42\x69\x33\x54\x31\x2E\x67\x69\x66","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x69\x2E\x69\x6D\x67\x75\x72\x2E\x63\x6F\x6D\x2F\x70\x32\x54\x32\x39\x51\x45\x2E\x67\x69\x66","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x69\x2E\x69\x6D\x67\x75\x72\x2E\x63\x6F\x6D\x2F\x45\x75\x63\x49\x66\x59\x59\x2E\x67\x69\x66","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x69\x2E\x69\x6D\x67\x75\x72\x2E\x63\x6F\x6D\x2F\x4B\x4F\x6F\x42\x44\x61\x4B\x2E\x67\x69\x66","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x69\x2E\x69\x6D\x67\x75\x72\x2E\x63\x6F\x6D\x2F\x43\x53\x30\x33\x78\x57\x76\x2E\x67\x69\x66","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x69\x2E\x69\x6D\x67\x75\x72\x2E\x63\x6F\x6D\x2F\x74\x66\x4D\x55\x75\x32\x4A\x2E\x67\x69\x66","\x42\x61\x64\x20\x43\x68\x6F\x69\x63\x65\x21","\x57\x68\x79\x3F","\x59\x6F\x77\x21\x21","\x44\x65\x61\x74\x68\x21","\x52\x65\x6C\x61\x78\x21","\x4C\x65\x67\x65\x6E\x64\x20\x4D\x6F\x64\x21","\x64\x51\x77\x34\x77\x39\x57\x67\x58\x63\x51","\x62\x74\x50\x4A\x50\x46\x6E\x65\x73\x56\x34","\x55\x44\x2D\x4D\x6B\x69\x68\x6E\x4F\x58\x67","\x76\x70\x6F\x71\x57\x73\x36\x42\x75\x49\x59","\x56\x55\x76\x66\x6E\x35\x2D\x42\x4C\x4D\x38","\x43\x6E\x49\x66\x4E\x53\x70\x43\x66\x37\x30","\x52\x69\x63\x6B\x20\x41\x73\x74\x6C\x65\x79\x20\x2D\x20\x4E\x65\x76\x65\x72\x20\x47\x6F\x6E\x6E\x61\x20\x47\x69\x76\x65\x20\x59\x6F\x75\x20\x55\x70","\x53\x75\x72\x76\x69\x76\x6F\x72\x20\x2D\x20\x45\x79\x65\x20\x4F\x66\x20\x54\x68\x65\x20\x54\x69\x67\x65\x72","\x4C\x69\x6F\x6E\x20\x6B\x69\x6E\x67\x20\x2D\x20\x54\x68\x65\x20\x4C\x69\x6F\x6E\x20\x53\x6C\x65\x65\x70\x73\x20\x54\x6F\x6E\x69\x67\x68\x74","\x41\x67\x61\x72\x69\x6F\x20\x2D\x20\x4A\x75\x6D\x62\x6F\x20\x53\x6F\x6C\x6F\x20\x76\x73\x20\x54\x65\x61\x6D\x73","\x41\x67\x61\x72\x69\x6F\x20\x2D\x20\x4B\x69\x6C\x6C\x33\x72\x20\x76\x73\x20\x54\x65\x61\x6D\x73","\x50\x72\x6F\x6D\x6F\x74\x69\x6F\x6E\x61\x6C","\x6C\x61\x73\x74\x49\x50","\x70\x72\x65\x76\x69\x6F\x75\x73\x6E\x69\x63\x6B\x6E\x61\x6D\x65","\x6D\x69\x6E\x62\x74\x65\x78\x74","\x6C\x65\x61\x64\x62\x74\x65\x78\x74","\x74\x65\x61\x6D\x62\x74\x65\x78\x74","\x69\x6D\x67\x55\x72\x6C","\x69\x6D\x67\x48\x72\x65\x66","\x73\x68\x6F\x77\x54\x4B","\x73\x68\x6F\x77\x50\x6C\x61\x79\x65\x72","\x53\x48\x4F\x53\x48\x4F\x42\x74\x6E","\x58\x50\x42\x74\x6E","\x4D\x41\x49\x4E\x42\x54\x42\x74\x6E","\x41\x6E\x69\x6D\x61\x74\x65\x64\x53\x6B\x69\x6E\x42\x74\x6E","\x54\x49\x4D\x45\x63\x61\x6C\x42\x74\x6E","\x74\x69\x6D\x65\x73\x6F\x70\x65\x6E\x65\x64","\x75\x72\x6C","\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C","\x69\x6E\x63\x6C\x75\x64\x65\x73","\x55\x52\x4C","\x63\x68\x61\x6E\x67\x65","\x50\x72\x69\x76\x61\x74\x65","\x76\x61\x6C","\x23\x72\x65\x67\x69\x6F\x6E","\x68\x69\x64\x65","\x31\x2E\x38","\x63\x6C\x61\x73\x73\x4E\x61\x6D\x65","\x63\x68\x69\x6C\x64\x72\x65\x6E","\x2E\x62\x74\x6E\x2E\x62\x74\x6E\x2D\x77\x61\x72\x6E\x69\x6E\x67\x2E\x62\x74\x6E\x2D\x73\x70\x65\x63\x74\x61\x74\x65\x2E\x62\x74\x6E\x2D\x6E\x65\x65\x64\x73\x2D\x73\x65\x72\x76\x65\x72","\x6F\x67\x69\x63\x6F\x6E\x2D\x65\x79\x65","\x67\x61\x6D\x65\x4D\x6F\x64\x65","\x3A\x70\x61\x72\x74\x79","\x23\x67\x61\x6D\x65\x6D\x6F\x64\x65","\x2E\x62\x74\x6E\x2E\x62\x74\x6E\x2D\x77\x61\x72\x6E\x69\x6E\x67\x2E\x62\x74\x6E\x2D\x6C\x6F\x67\x69\x6E\x2D\x70\x6C\x61\x79\x2E\x62\x74\x6E\x2D\x6E\x65\x65\x64\x73\x2D\x73\x65\x72\x76\x65\x72","\x77\x69\x64\x74\x68","\x31\x30\x30\x25","\x63\x73\x73","\x2E\x62\x74\x6E\x2E\x62\x74\x6E\x2D\x70\x6C\x61\x79\x2D\x67\x75\x65\x73\x74\x2E\x62\x74\x6E\x2D\x73\x75\x63\x63\x65\x73\x73\x2E\x62\x74\x6E\x2D\x6E\x65\x65\x64\x73\x2D\x73\x65\x72\x76\x65\x72","\x50\x6C\x61\x79","\x74\x65\x78\x74","\x23\x6F\x67\x61\x72\x69\x6F\x2D\x70\x61\x72\x74\x79","\x23\x6F\x70\x65\x6E\x73\x6B\x69\x6E\x63\x68\x61\x6E\x67\x65\x72","\x2E\x71\x75\x69\x63\x6B\x2E\x71\x75\x69\x63\x6B\x2D\x62\x6F\x74\x73\x2E\x6F\x67\x69\x63\x6F\x6E\x2D\x74\x72\x6F\x70\x68\x79","\x2E\x61\x67\x61\x72\x69\x6F\x2D\x70\x61\x6E\x65\x6C\x2E\x72\x61\x64\x69\x6F\x2D\x70\x61\x6E\x65\x6C","\x2E\x61\x67\x61\x72\x69\x6F\x2D\x70\x61\x6E\x65\x6C\x2E\x6F\x67\x61\x72\x69\x6F\x2D\x79\x74\x2D\x70\x61\x6E\x65\x6C","\x2E\x70\x72\x6F\x66\x69\x6C\x65\x2D\x74\x61\x62","\x31\x36\x2E\x36\x25","\x2E\x6D\x65\x6E\x75\x2D\x74\x61\x62\x73","\x37\x30\x25","\x38\x37\x25","\x73\x68\x6F\x77","\x23\x68\x6F\x74\x6B\x65\x79\x73\x2D\x63\x66\x67","\x72","\x6D","\x73\x65\x61\x72\x63\x68","\x73\x69\x70","\x70\x61\x73\x73","\x70\x6C\x61\x79\x65\x72","\x61\x75\x74\x6F\x70\x6C\x61\x79\x65\x72","\x72\x65\x70\x6C\x61\x79","\x72\x65\x70\x6C\x61\x79\x53\x74\x61\x72\x74","\x72\x65\x70\x6C\x61\x79\x45\x6E\x64","\x59\x45\x53","\x4E\x4F","\x30","\x23\x6D\x65\x6E\x75\x50\x61\x6E\x65\x6C\x43\x6F\x6C\x6F\x72","\x23\x6D\x65\x6E\x75\x42\x67","\x23\x68\x75\x64\x4D\x61\x69\x6E\x43\x6F\x6C\x6F\x72\x20","\x64\x79\x69\x6E\x67\x6C\x69\x67\x68\x74\x31\x6C\x6F\x61\x64","\x75\x73\x65\x72\x44\x61\x74\x61","\x70\x61\x72\x73\x65","\x4E\x6F\x74\x46\x6F\x75\x6E\x64","\x75\x73\x65\x72\x66\x69\x72\x73\x74\x6E\x61\x6D\x65","\x75\x73\x65\x72\x6C\x61\x73\x74\x6E\x61\x6D\x65","\x75\x73\x65\x72\x67\x65\x6E\x64\x65\x72","\x75\x73\x65\x72\x69\x64","\x6C\x61\x6E\x67\x75\x61\x67\x65\x6D\x6F\x64","\x54\x72\x75\x65","\x74\x72\x75\x65","\x66\x61\x6C\x73\x65","\x73\x65\x74\x49\x74\x65\x6D","\x50\x4F\x53\x54","\x6F\x70\x65\x6E","\x75\x73\x65\x72\x6E\x61\x6D\x65","\x73\x65\x74\x52\x65\x71\x75\x65\x73\x74\x48\x65\x61\x64\x65\x72","\x70\x61\x73\x73\x77\x6F\x72\x64","\x73\x65\x6E\x64","\x47\x45\x54","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65","\x6F\x6C\x64","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65\x73","\x62\x65\x66\x6F\x72\x65","\x61\x70\x70\x6C\x79","\x61\x66\x74\x65\x72","\x23\x66\x66\x30\x30\x30\x30","\x23\x30\x30\x66\x66\x30\x30","\x23\x30\x30\x30\x30\x66\x66","\x23\x66\x66\x66\x66\x30\x30","\x23\x30\x30\x66\x66\x66\x66","\x23\x66\x66\x30\x30\x66\x66","\x63\x61\x6E\x76\x61\x73","\x63\x72\x65\x61\x74\x65\x4C\x69\x6E\x65\x61\x72\x47\x72\x61\x64\x69\x65\x6E\x74","\x72\x61\x6E\x64\x6F\x6D","\x6C\x65\x6E\x67\x74\x68","\x66\x6C\x6F\x6F\x72","\x61\x64\x64\x43\x6F\x6C\x6F\x72\x53\x74\x6F\x70","\x66\x69\x6C\x6C\x54\x65\x78\x74","\x69\x64","\x6D\x69\x6E\x69\x6D\x61\x70","\x6D\x69\x6E\x69\x6D\x61\x70\x2D\x73\x65\x63\x74\x6F\x72\x73","\x61\x6F\x32\x74\x2D\x6D\x69\x6E\x69\x6D\x61\x70","\x66\x69\x6C\x6C\x53\x74\x79\x6C\x65","\x67\x72\x61\x64\x69\x65\x6E\x74","\x66","\x70\x72\x6F\x74\x6F\x74\x79\x70\x65\x5F\x6F\x76\x65\x72\x72\x69\x64\x65","\x4C\x4D\x73\x74\x61\x72\x74\x65\x64","\x4C\x4D\x56\x65\x72\x73\x69\x6F\x6E","\x4D\x6F\x64\x20\x3C\x66\x6F\x6E\x74\x20\x63\x6F\x6C\x6F\x72\x3D\x22\x79\x65\x6C\x6C\x6F\x77\x22\x3E\x3C\x62\x3E\x76","\x3C\x2F\x62\x3E\x3C\x2F\x66\x6F\x6E\x74\x3E\x20\x20","\x20\x3C\x66\x6F\x6E\x74\x20\x63\x6F\x6C\x6F\x72\x3D\x22\x79\x65\x6C\x6C\x6F\x77\x22\x3E\x3C\x62\x3E\x76\x31\x2E\x38\x3C\x2F\x62\x3E\x3C\x2F\x66\x6F\x6E\x74\x3E\x2E\x20\x3C\x62\x72\x3E\x76\x69\x73\x69\x74\x3A\x20\x3C\x61\x20\x74\x61\x72\x67\x65\x74\x3D\x22\x5F\x62\x6C\x61\x6E\x6B\x22\x20\x68\x72\x65\x66\x3D\x22\x68\x74\x74\x70\x73\x3A\x2F\x2F\x77\x77\x77\x2E\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x22\x3E\x3C\x66\x6F\x6E\x74\x20\x63\x6F\x6C\x6F\x72\x3D\x22\x79\x65\x6C\x6C\x6F\x77\x22\x3E\x3C\x62\x3E\x3C\x75\x3E\x77\x77\x77\x2E\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x3C\x2F\x75\x3E\x3C\x2F\x62\x3E\x3C\x2F\x66\x6F\x6E\x74\x3E\x3C\x2F\x61\x3E","\x69\x6E\x66\x6F","\x74\x72\x69\x6D","\x73\x68\x6F\x77\x69\x6E\x66\x6F\x3D\x30\x26\x63\x6F\x6E\x74\x72\x6F\x6C\x73\x3D\x30\x26\x72\x65\x6C\x3D\x30\x26\x76\x71\x3D\x74\x69\x6E\x79\x26\x65\x6E\x61\x62\x6C\x65\x6A\x73\x61\x70\x69\x3D\x31","\x76","\x6C\x69\x73\x74","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x77\x77\x77\x2E\x79\x6F\x75\x74\x75\x62\x65\x2E\x63\x6F\x6D\x2F\x65\x6D\x62\x65\x64\x2F","\x3F","\x3F\x6C\x69\x73\x74\x3D","\x26","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x79\x6F\x75\x74\x75\x2E\x62\x65\x2F","\x73\x74\x61\x72\x74\x73\x57\x69\x74\x68","\x72\x65\x70\x6C\x61\x63\x65","\x33\x30\x30\x70\x78","\x3C\x2F\x62\x72\x3E\x20\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x65\x6E\x61\x62\x6C\x65\x73\x68\x6F\x72\x74\x63\x75\x74\x73\x31\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x73\x6D\x20\x62\x74\x6E\x2D\x70\x72\x69\x6D\x61\x72\x79\x20\x62\x74\x6E\x2D\x70\x6C\x61\x79\x20\x62\x74\x6E\x2D\x65\x6E\x61\x62\x6C\x65\x2D\x73\x68\x6F\x72\x74\x63\x75\x74\x73\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x65\x6E\x61\x62\x6C\x65\x73\x68\x6F\x72\x74\x63\x75\x74\x73\x28\x29\x3B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x31\x30\x70\x78\x3B\x62\x6F\x72\x64\x65\x72\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x64\x61\x72\x6B\x62\x6C\x75\x65\x3B\x22\x3E","\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E\x3C\x62\x72\x3E\x3C\x62\x75\x74\x74\x6F\x6E\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x73\x6D\x20\x62\x74\x6E\x2D\x77\x61\x72\x6E\x69\x6E\x67\x20\x62\x74\x6E\x2D\x73\x70\x65\x63\x74\x61\x74\x65\x20\x62\x74\x6E\x2D\x70\x6C\x61\x79\x20\x62\x74\x6E\x2D\x65\x6E\x61\x62\x6C\x65\x2D\x73\x68\x6F\x72\x74\x63\x75\x74\x73\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x77\x69\x64\x74\x68\x3A\x20\x31\x30\x30\x25\x3B\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x31\x30\x70\x78\x3B\x22\x3E","\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x65\x72\x72\x6F\x72","\x66\x61\x64\x65\x4F\x75\x74","\x23\x69\x6D\x61\x67\x65\x62\x69\x67","\x72\x65\x6D\x6F\x76\x65","\x4D\x65\x67\x61\x46\x46\x41","\x54","\x69\x6E\x64\x65\x78\x4F\x66","\x74\x6F\x49\x53\x4F\x53\x74\x72\x69\x6E\x67","\x73\x6C\x69\x63\x65","\x33\x35\x30\x70\x78","\x3C\x62\x3E\x5B\x53\x45\x52\x56\x45\x52\x5D\x3A\x3C\x2F\x62\x3E\x20\x59\x6F\x75\x72\x20\x47\x69\x76\x65\x61\x77\x61\x79\x20\x6C\x69\x63\x65\x6E\x63\x65\x20\x68\x61\x73\x20\x65\x6E\x64\x65\x64\x2E\x20\x54\x68\x61\x6E\x6B\x20\x79\x6F\x75\x20\x66\x6F\x72\x20\x75\x73\x69\x6E\x67\x20\x6F\x75\x72\x20\x6D\x6F\x64\x21","\x77\x61\x72\x6E\x69\x6E\x67","\x47\x69\x76\x65","\x61\x67\x61\x72\x69\x6F\x55\x49\x44","\x50\x72\x6F\x4C\x69\x63\x65\x6E\x63\x65\x55\x73\x65\x72\x73","\x72\x65\x61\x73\x6F\x6E","\x40","\x73\x70\x6C\x69\x74","\x3C\x62\x3E\x5B\x53\x45\x52\x56\x45\x52\x5D\x3A\x3C\x2F\x62\x3E\x20\x20\x59\x6F\x75\x72\x20\x6C\x69\x63\x65\x6E\x63\x65\x20\x69\x73\x20\x73\x74\x6F\x72\x65\x64\x20\x61\x73\x20\x47\x69\x76\x65\x61\x77\x61\x79\x20\x50\x72\x65\x6D\x69\x75\x6D\x20\x75\x6E\x74\x69\x6C\x20","\x2F","\x2E\x20\x54\x68\x61\x6E\x6B\x20\x79\x6F\x75\x20\x66\x6F\x72\x20\x75\x73\x69\x6E\x67\x20\x6F\x75\x72\x20\x6D\x6F\x64\x21","\x3C\x62\x3E\x5B\x53\x45\x52\x56\x45\x52\x5D\x3A\x3C\x2F\x62\x3E\x20\x59\x6F\x75\x72\x20\x6C\x69\x63\x65\x6E\x63\x65\x20\x69\x73\x20\x73\x74\x6F\x72\x65\x64\x20\x61\x73\x20\x50\x72\x65\x6D\x69\x75\x6D\x2E\x20\x54\x68\x61\x6E\x6B\x20\x79\x6F\x75\x20\x66\x6F\x72\x20\x75\x73\x69\x6E\x67\x20\x6F\x75\x72\x20\x6D\x6F\x64\x21","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x41\x6A\x61\x78\x44\x61\x74\x61\x2F\x61\x63\x63\x65\x73\x73\x74\x6F\x6B\x65\x6E\x2E\x68\x74\x6D\x6C","\x6A\x73\x6F\x6E","\x61\x6A\x61\x78","\x61","\x3C\x62\x3E\x5B","\x5D\x3A\x3C\x2F\x62\x3E\x20","\x2C\x20\x3C\x62\x72\x3E","\x3A\x20\x3C\x61\x20\x74\x61\x72\x67\x65\x74\x3D\x22\x5F\x62\x6C\x61\x6E\x6B\x22\x20\x68\x72\x65\x66\x3D\x22\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x75\x73\x65\x72\x2E\x6A\x73\x22\x3E\x3C\x66\x6F\x6E\x74\x20\x63\x6F\x6C\x6F\x72\x3D\x22\x62\x6C\x75\x65\x22\x3E\x3C\x62\x3E\x3C\x75\x3E\x77\x77\x77\x2E\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x3C\x2F\x75\x3E\x3C\x2F\x62\x3E\x3C\x2F\x66\x6F\x6E\x74\x3E\x3C\x2F\x61\x3E\x3C\x62\x72\x3E","\x69\x6E\x6E\x65\x72\x48\x54\x4D\x4C","\x64\x6F\x63\x75\x6D\x65\x6E\x74\x45\x6C\x65\x6D\x65\x6E\x74","\x61\x72\x69\x61\x2D\x70\x72\x65\x73\x73\x65\x64","\x61\x74\x74\x72","\x23\x49\x50\x42\x74\x6E","\x63\x6C\x69\x63\x6B","\x23\x53\x48\x4F\x53\x48\x4F\x42\x74\x6E","\x23\x4D\x41\x49\x4E\x42\x54\x42\x74\x6E","\x23\x58\x50\x42\x74\x6E","\x6C\x69\x76\x65\x2D\x61\x72\x65\x6E\x61\x2D","\x23\x73\x65\x72\x76\x65\x72\x2D\x74\x6F\x6B\x65\x6E","\x2E\x61\x67\x61\x72\x2E\x69\x6F","\x69\x6E\x74\x65\x67\x72\x69\x74\x79","\x70\x61\x67\x65\x20\x32","\x2F\x70\x6C\x61\x79\x3F\x73\x69\x70\x3D","\x26\x3F\x72\x3D","\x26\x3F\x6D\x3D","\x70\x75\x73\x68\x53\x74\x61\x74\x65","\x3F\x73\x69\x70\x3D","\x70\x61\x74\x68\x6E\x61\x6D\x65","\x6C\x6F\x63\x61\x74\x69\x6F\x6E","\x68\x69\x73\x74\x6F\x72\x79","\x68\x72\x65\x66","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x61\x67\x61\x72\x2E\x69\x6F\x2F\x23","\x23\x70\x61\x72\x74\x79\x2D\x74\x6F\x6B\x65\x6E","\x6A\x51\x75\x65\x72\x79","\x67\x65\x74\x54\x69\x6D\x65","\x73\x65\x74\x54\x69\x6D\x65","\x3B\x20\x65\x78\x70\x69\x72\x65\x73\x3D","\x74\x6F\x47\x4D\x54\x53\x74\x72\x69\x6E\x67","\x63\x6F\x6F\x6B\x69\x65","\x61\x67\x61\x72\x69\x6F\x5F\x72\x65\x64\x69\x72\x65\x63\x74\x3D","\x3B\x20\x70\x61\x74\x68\x3D\x2F","\x2A\x5B\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x70\x61\x67\x65\x5F\x70\x6C\x61\x79\x22\x5D","\x23\x73\x65\x72\x76\x65\x72\x2D\x72\x65\x63\x6F\x6E\x6E\x65\x63\x74","\x23\x6C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x2D\x70\x6F\x73\x69\x74\x69\x6F\x6E\x73","\x3A","\x2E","\x65\x76\x65\x72\x79","\x23\x6A\x6F\x69\x6E\x50\x61\x72\x74\x79\x54\x6F\x6B\x65\x6E","\x23\x6A\x6F\x69\x6E\x2D\x70\x61\x72\x74\x79\x2D\x62\x74\x6E","\x66\x61\x20\x66\x61\x2D\x73\x65\x61\x72\x63\x68","\x61\x64\x64\x43\x6C\x61\x73\x73","\x66\x61\x20\x66\x61\x2D\x74\x69\x6D\x65\x73","\x72\x65\x6D\x6F\x76\x65\x43\x6C\x61\x73\x73","\x23\x73\x65\x61\x72\x63\x68\x53\x70\x61\x6E\x3E\x69","\x61\x67\x61\x72\x2E\x69\x6F\x2F\x23","\x23\x72\x65\x67\x69\x6F\x6E\x63\x68\x65\x63\x6B","\x23\x67\x61\x6D\x65\x6D\x6F\x64\x65\x63\x68\x65\x63\x6B","\x23\x42\x61\x63\x6B\x74\x6F\x6D\x65\x6E\x75","\x77\x73\x73\x3A\x2F\x2F","\x61\x67\x61\x72\x2E\x69\x6F\x2F\x3F\x73\x65\x61\x72\x63\x68\x3D\x77\x73\x73\x3A\x2F\x2F","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x61\x67\x61\x72\x2E\x69\x6F\x2F\x3F\x73\x65\x61\x72\x63\x68\x3D\x77\x73\x73\x3A\x2F\x2F","\x73\x65\x6C\x65\x63\x74\x65\x64","\x70\x72\x6F\x70","\x23\x72\x65\x67\x69\x6F\x6E\x20\x6F\x70\x74\x69\x6F\x6E\x5B\x76\x61\x6C\x75\x65\x3D\x22","\x22\x5D","\x23\x67\x61\x6D\x65\x6D\x6F\x64\x65\x20\x6F\x70\x74\x69\x6F\x6E\x5B\x76\x61\x6C\x75\x65\x3D\x22\x3A\x70\x61\x72\x74\x79\x22\x5D","\x3A\x66\x66\x61","\x23\x67\x61\x6D\x65\x6D\x6F\x64\x65\x20\x6F\x70\x74\x69\x6F\x6E\x5B\x76\x61\x6C\x75\x65\x3D\x22\x22\x5D","\x3A\x74\x65\x61\x6D\x73","\x23\x67\x61\x6D\x65\x6D\x6F\x64\x65\x20\x6F\x70\x74\x69\x6F\x6E\x5B\x76\x61\x6C\x75\x65\x3D\x22\x3A\x74\x65\x61\x6D\x73\x22\x5D","\x3A\x65\x78\x70\x65\x72\x69\x6D\x65\x6E\x74\x61\x6C","\x23\x67\x61\x6D\x65\x6D\x6F\x64\x65\x20\x6F\x70\x74\x69\x6F\x6E\x5B\x76\x61\x6C\x75\x65\x3D\x22\x3A\x65\x78\x70\x65\x72\x69\x6D\x65\x6E\x74\x61\x6C\x22\x5D","\x32\x31\x30\x70\x78","\x20\x27\x77\x73\x73\x3A\x2F\x2F","\x27\x2E\x2E\x2E","\x73\x75\x63\x63\x65\x73\x73","\x21\x20\x3C\x2F\x62\x72\x3E\x20\x3C\x62\x75\x74\x74\x6F\x6E\x20\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x70\x6C\x61\x79\x20\x62\x74\x6E\x2D\x70\x72\x69\x6D\x61\x72\x79\x20\x62\x74\x6E\x2D\x6E\x65\x65\x64\x73\x2D\x73\x65\x72\x76\x65\x72\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x68\x69\x64\x65\x53\x65\x61\x72\x63\x68\x48\x75\x64\x28\x29\x3B\x70\x6C\x61\x79\x28\x29\x3B\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x31\x30\x70\x78\x3B\x62\x6F\x72\x64\x65\x72\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x64\x61\x72\x6B\x62\x6C\x75\x65\x3B\x22\x3E","\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E\x3C\x62\x72\x3E\x3C\x62\x75\x74\x74\x6F\x6E\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x73\x6D\x20\x62\x74\x6E\x2D\x77\x61\x72\x6E\x69\x6E\x67\x20\x62\x74\x6E\x2D\x73\x70\x65\x63\x74\x61\x74\x65\x20\x62\x74\x6E\x2D\x73\x70\x65\x63\x74\x61\x74\x65\x2D\x73\x68\x6F\x72\x74\x63\x75\x74\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x68\x69\x64\x65\x53\x65\x61\x72\x63\x68\x48\x75\x64\x28\x29\x3B\x20\x73\x74\x79\x6C\x65\x3D\x22\x77\x69\x64\x74\x68\x3A\x20\x31\x30\x30\x25\x3B\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x31\x30\x70\x78\x3B\x22\x3E","\x3A\x20","\x21","\x20\x27","\x66\x69\x6C\x74\x65\x72","\x6E\x6F\x74\x68\x69\x6E\x67","\x3C\x74\x65\x78\x74\x61\x72\x65\x61\x3E","\x61\x70\x70\x65\x6E\x64","\x62\x6F\x64\x79","\x68\x74\x6D\x6C","\x0A","\x6C\x6F\x67","\x73\x65\x6C\x65\x63\x74","\x63\x6F\x70\x79","\x65\x78\x65\x63\x43\x6F\x6D\x6D\x61\x6E\x64","\x23\x43\x6F\x70\x79\x54\x6B\x50\x77\x4C\x62","\x23\x74\x6F\x70\x35\x2D\x70\x6F\x73","\x3C\x65\x72\x20\x69\x64\x3D\x22\x43\x6F\x70\x79\x54\x6B\x50\x77\x4C\x62\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x3E\x53\x65\x72\x76\x65\x72\x3A\x20","\x3C\x62\x72\x3E\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x3A\x20","\x3C\x62\x72\x3E\x54\x65\x61\x6D\x62\x6F\x61\x72\x64\x3A","\x3C\x62\x72\x3E\x4D\x79\x20\x47\x61\x6D\x65\x20\x4E\x61\x6D\x65\x3A\x20","\x23\x6E\x69\x63\x6B","\x3C\x2F\x65\x72\x3E","\x23\x73\x65\x72\x76\x65\x72\x2D\x6A\x6F\x69\x6E","\x65\x72\x23\x43\x6F\x70\x79\x54\x6B\x50\x77\x4C\x62","\x67\x65\x74\x50\x6C\x61\x79\x65\x72\x53\x74\x61\x74\x65","\x70\x6C\x61\x79\x56\x69\x64\x65\x6F","\x70\x61\x75\x73\x65\x56\x69\x64\x65\x6F","\x23\x73\x65\x72\x76\x65\x72","\x23\x6A\x6F\x69\x6E\x2D\x70\x61\x72\x74\x79\x2D\x62\x74\x6E\x2D\x32","\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64","\x54\x65\x61\x6D\x62\x6F\x61\x72\x64","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x53\x6B\x69\x6E\x43\x68\x61\x6E\x67\x65\x72\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x69\x6D\x61\x67\x65\x3A\x20\x75\x72\x6C\x28","\x29\x3B\x20\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20","\x3B\x20\x62\x6F\x72\x64\x65\x72\x3A\x20\x31\x70\x78\x20\x73\x6F\x6C\x69\x64\x20\x62\x6C\x61\x63\x6B\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x35\x34\x30\x70\x78\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x35\x30\x30\x70\x78\x3B\x20\x22\x3B\x3E","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x53\x6B\x69\x6E\x43\x68\x61\x6E\x67\x65\x72\x68\x75\x64\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x64\x69\x73\x70\x6C\x61\x79\x3A\x62\x6C\x6F\x63\x6B\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x6C\x65\x66\x74\x3A\x20\x31\x30\x70\x78\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x72\x69\x67\x68\x74\x3A\x20\x31\x30\x70\x78\x3B\x22\x3E","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x53\x6B\x69\x6E\x43\x68\x61\x6E\x67\x65\x72\x74\x6F\x6F\x6C\x73\x68\x75\x64\x31\x22\x20\x61\x6C\x69\x67\x6E\x3D\x22\x6D\x69\x64\x64\x6C\x65\x22\x3E\x3C\x68\x35\x20\x63\x6C\x61\x73\x73\x3D\x22\x6D\x61\x69\x6E\x2D\x63\x6F\x6C\x6F\x72\x22\x3E\x3C\x62\x3E","\x3C\x2F\x62\x3E\x3C\x2F\x68\x35\x3E","\x3C\x70\x20\x73\x74\x79\x6C\x65\x3D\x22\x63\x6F\x6C\x6F\x72\x3A\x77\x68\x69\x74\x65\x3B\x20\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x31\x32\x70\x78\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x62\x6F\x74\x74\x6F\x6D\x3A\x20\x2D\x34\x70\x78\x3B\x22\x20\x61\x6C\x69\x67\x6E\x3D\x22\x6D\x69\x64\x64\x6C\x65\x22\x3E","\x3C\x62\x72\x3E\x3C\x62\x72\x3E\x3C\x66\x6F\x6E\x74\x20\x69\x64\x3D\x20\x22\x4C\x65\x61\x64\x62\x6F\x61\x72\x64\x6C\x65\x74\x31\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x63\x6F\x6C\x6F\x72\x3A\x77\x68\x69\x74\x65\x3B\x20\x73\x69\x7A\x65\x3A\x31\x32\x70\x78\x3B\x20\x22\x3E","\x3C\x2F\x70\x3E\x3C\x62\x72\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x49\x6E\x70\x75\x74\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x4E\x69\x63\x6B\x6E\x61\x6D\x65\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x30\x70\x78\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x72\x69\x67\x68\x74\x3A\x20\x32\x70\x78\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x33\x30\x25\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x69\x6E\x6C\x69\x6E\x65\x3B\x20\x22\x20\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x74\x6F\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x22\x20\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x49\x6E\x70\x75\x74\x32\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x4E\x69\x63\x6B\x6E\x61\x6D\x65\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x30\x70\x78\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x72\x69\x67\x68\x74\x3A\x20\x32\x70\x78\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x33\x30\x25\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x69\x6E\x6C\x69\x6E\x65\x3B\x22\x20\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x74\x6F\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x22\x20\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x49\x6E\x70\x75\x74\x33\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x4E\x69\x63\x6B\x6E\x61\x6D\x65\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x30\x70\x78\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x72\x69\x67\x68\x74\x3A\x20\x32\x70\x78\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x33\x30\x25\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x69\x6E\x6C\x69\x6E\x65\x3B\x22\x20\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x74\x6F\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x22\x20\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x49\x6E\x70\x75\x74\x34\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x4E\x69\x63\x6B\x6E\x61\x6D\x65\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x30\x70\x78\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x72\x69\x67\x68\x74\x3A\x20\x32\x70\x78\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x33\x30\x25\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x69\x6E\x6C\x69\x6E\x65\x3B\x22\x20\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x74\x6F\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x22\x20\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x49\x6E\x70\x75\x74\x35\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x4E\x69\x63\x6B\x6E\x61\x6D\x65\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x30\x70\x78\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x72\x69\x67\x68\x74\x3A\x20\x32\x70\x78\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x33\x30\x25\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x69\x6E\x6C\x69\x6E\x65\x3B\x22\x20\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x74\x6F\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x22\x20\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x49\x6E\x70\x75\x74\x36\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x4E\x69\x63\x6B\x6E\x61\x6D\x65\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x30\x70\x78\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x72\x69\x67\x68\x74\x3A\x20\x32\x70\x78\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x33\x30\x25\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x69\x6E\x6C\x69\x6E\x65\x3B\x22\x20\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x74\x6F\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x22\x20\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x49\x6E\x70\x75\x74\x37\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x4E\x69\x63\x6B\x6E\x61\x6D\x65\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x30\x70\x78\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x72\x69\x67\x68\x74\x3A\x20\x32\x70\x78\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x33\x30\x25\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x69\x6E\x6C\x69\x6E\x65\x3B\x22\x20\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x74\x6F\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x22\x20\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x49\x6E\x70\x75\x74\x38\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x4E\x69\x63\x6B\x6E\x61\x6D\x65\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x30\x70\x78\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x72\x69\x67\x68\x74\x3A\x20\x32\x70\x78\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x33\x30\x25\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x69\x6E\x6C\x69\x6E\x65\x3B\x22\x20\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x74\x6F\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x22\x20\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x49\x6E\x70\x75\x74\x39\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x4E\x69\x63\x6B\x6E\x61\x6D\x65\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x30\x70\x78\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x72\x69\x67\x68\x74\x3A\x20\x32\x70\x78\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x33\x30\x25\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x69\x6E\x6C\x69\x6E\x65\x3B\x22\x20\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x74\x6F\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x22\x20\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x49\x6E\x70\x75\x74\x31\x30\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x4E\x69\x63\x6B\x6E\x61\x6D\x65\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x30\x70\x78\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x72\x69\x67\x68\x74\x3A\x20\x32\x70\x78\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x33\x30\x25\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x69\x6E\x6C\x69\x6E\x65\x3B\x22\x20\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x74\x6F\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x22\x20\x3E","\x3C\x2F\x64\x69\x76\x3E\x3C\x70\x20\x73\x74\x79\x6C\x65\x3D\x22\x63\x6F\x6C\x6F\x72\x3A\x77\x68\x69\x74\x65\x3B\x20\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x31\x32\x70\x78\x22\x3B\x22\x20\x61\x6C\x69\x67\x6E\x3D\x22\x6D\x69\x64\x64\x6C\x65\x22\x3E","\x3C\x62\x72\x3E","\x3C\x2F\x75\x3E\x3C\x2F\x70\x3E","\x3C\x2F\x64\x69\x76\x3E\x3C\x2F\x64\x69\x76\x3E","\x23\x6D\x65\x6E\x75\x2D\x66\x6F\x6F\x74\x65\x72","\x36\x30\x25","\x23\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x49\x6E\x70\x75\x74\x31","\x23\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x49\x6E\x70\x75\x74\x32","\x23\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x49\x6E\x70\x75\x74\x33","\x23\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x49\x6E\x70\x75\x74\x34","\x23\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x49\x6E\x70\x75\x74\x35","\x23\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x49\x6E\x70\x75\x74\x36","\x23\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x49\x6E\x70\x75\x74\x37","\x23\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x49\x6E\x70\x75\x74\x38","\x23\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x49\x6E\x70\x75\x74\x39","\x23\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x49\x6E\x70\x75\x74\x31\x30","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x53\x6B\x69\x6E\x42\x61\x63\x6B\x74\x6F\x6D\x65\x6E\x75\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x65\x78\x69\x74\x53\x6B\x69\x6E\x43\x68\x61\x6E\x67\x65\x72\x28\x29\x3B\x20\x72\x65\x74\x75\x72\x6E\x20\x66\x61\x6C\x73\x65\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x64\x61\x6E\x67\x65\x72\x22\x20\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x6C\x65\x66\x74\x3A\x20\x31\x30\x70\x78\x3B\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x22\x20\x74\x69\x74\x6C\x65\x3D\x22\x22\x3E","\x23\x53\x6B\x69\x6E\x43\x68\x61\x6E\x67\x65\x72\x68\x75\x64","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x49\x63\x6F\x6E\x46\x61\x6B\x65\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x69\x6E\x66\x6F\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x4C\x65\x61\x64\x65\x72\x31\x31\x28\x29\x3B\x72\x65\x74\x75\x72\x6E\x20\x66\x61\x6C\x73\x65\x3B\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x77\x70\x65\x78\x70\x6C\x6F\x72\x65\x72\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x49\x63\x6F\x6E\x46\x61\x6B\x65\x32\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x69\x6E\x66\x6F\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x4C\x65\x61\x64\x65\x72\x31\x32\x28\x29\x3B\x72\x65\x74\x75\x72\x6E\x20\x66\x61\x6C\x73\x65\x3B\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x77\x70\x65\x78\x70\x6C\x6F\x72\x65\x72\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x49\x63\x6F\x6E\x46\x61\x6B\x65\x33\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x69\x6E\x66\x6F\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x4C\x65\x61\x64\x65\x72\x31\x33\x28\x29\x3B\x72\x65\x74\x75\x72\x6E\x20\x66\x61\x6C\x73\x65\x3B\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x77\x70\x65\x78\x70\x6C\x6F\x72\x65\x72\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x49\x63\x6F\x6E\x46\x61\x6B\x65\x34\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x69\x6E\x66\x6F\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x4C\x65\x61\x64\x65\x72\x31\x34\x28\x29\x3B\x72\x65\x74\x75\x72\x6E\x20\x66\x61\x6C\x73\x65\x3B\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x77\x70\x65\x78\x70\x6C\x6F\x72\x65\x72\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x49\x63\x6F\x6E\x46\x61\x6B\x65\x35\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x69\x6E\x66\x6F\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x4C\x65\x61\x64\x65\x72\x31\x35\x28\x29\x3B\x72\x65\x74\x75\x72\x6E\x20\x66\x61\x6C\x73\x65\x3B\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x77\x70\x65\x78\x70\x6C\x6F\x72\x65\x72\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x49\x63\x6F\x6E\x46\x61\x6B\x65\x36\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x69\x6E\x66\x6F\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x4C\x65\x61\x64\x65\x72\x31\x36\x28\x29\x3B\x72\x65\x74\x75\x72\x6E\x20\x66\x61\x6C\x73\x65\x3B\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x77\x70\x65\x78\x70\x6C\x6F\x72\x65\x72\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x49\x63\x6F\x6E\x46\x61\x6B\x65\x37\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x69\x6E\x66\x6F\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x4C\x65\x61\x64\x65\x72\x31\x37\x28\x29\x3B\x72\x65\x74\x75\x72\x6E\x20\x66\x61\x6C\x73\x65\x3B\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x77\x70\x65\x78\x70\x6C\x6F\x72\x65\x72\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x49\x63\x6F\x6E\x46\x61\x6B\x65\x38\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x69\x6E\x66\x6F\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x4C\x65\x61\x64\x65\x72\x31\x38\x28\x29\x3B\x72\x65\x74\x75\x72\x6E\x20\x66\x61\x6C\x73\x65\x3B\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x77\x70\x65\x78\x70\x6C\x6F\x72\x65\x72\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x49\x63\x6F\x6E\x46\x61\x6B\x65\x39\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x69\x6E\x66\x6F\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x4C\x65\x61\x64\x65\x72\x31\x39\x28\x29\x3B\x72\x65\x74\x75\x72\x6E\x20\x66\x61\x6C\x73\x65\x3B\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x77\x70\x65\x78\x70\x6C\x6F\x72\x65\x72\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x49\x63\x6F\x6E\x46\x61\x6B\x65\x31\x30\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x69\x6E\x66\x6F\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x4C\x65\x61\x64\x65\x72\x32\x30\x28\x29\x3B\x72\x65\x74\x75\x72\x6E\x20\x66\x61\x6C\x73\x65\x3B\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x77\x70\x65\x78\x70\x6C\x6F\x72\x65\x72\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x54\x65\x61\x6D\x62\x6F\x61\x72\x64\x49\x63\x6F\x6E\x46\x61\x6B\x65\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x69\x6E\x66\x6F\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x54\x65\x61\x6D\x65\x72\x31\x31\x28\x29\x3B\x72\x65\x74\x75\x72\x6E\x20\x66\x61\x6C\x73\x65\x3B\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x77\x70\x65\x78\x70\x6C\x6F\x72\x65\x72\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x23\x54\x65\x61\x6D\x62\x6F\x61\x72\x64\x49\x6E\x70\x75\x74\x31","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x54\x65\x61\x6D\x62\x6F\x61\x72\x64\x49\x63\x6F\x6E\x46\x61\x6B\x65\x32\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x69\x6E\x66\x6F\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x54\x65\x61\x6D\x65\x72\x31\x32\x28\x29\x3B\x72\x65\x74\x75\x72\x6E\x20\x66\x61\x6C\x73\x65\x3B\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x77\x70\x65\x78\x70\x6C\x6F\x72\x65\x72\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x23\x54\x65\x61\x6D\x62\x6F\x61\x72\x64\x49\x6E\x70\x75\x74\x32","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x54\x65\x61\x6D\x62\x6F\x61\x72\x64\x49\x63\x6F\x6E\x46\x61\x6B\x65\x33\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x69\x6E\x66\x6F\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x54\x65\x61\x6D\x65\x72\x31\x33\x28\x29\x3B\x72\x65\x74\x75\x72\x6E\x20\x66\x61\x6C\x73\x65\x3B\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x77\x70\x65\x78\x70\x6C\x6F\x72\x65\x72\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x23\x54\x65\x61\x6D\x62\x6F\x61\x72\x64\x49\x6E\x70\x75\x74\x33","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x54\x65\x61\x6D\x62\x6F\x61\x72\x64\x49\x63\x6F\x6E\x46\x61\x6B\x65\x34\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x69\x6E\x66\x6F\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x54\x65\x61\x6D\x65\x72\x31\x34\x28\x29\x3B\x72\x65\x74\x75\x72\x6E\x20\x66\x61\x6C\x73\x65\x3B\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x77\x70\x65\x78\x70\x6C\x6F\x72\x65\x72\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x23\x54\x65\x61\x6D\x62\x6F\x61\x72\x64\x49\x6E\x70\x75\x74\x34","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x54\x65\x61\x6D\x62\x6F\x61\x72\x64\x49\x63\x6F\x6E\x46\x61\x6B\x65\x35\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x69\x6E\x66\x6F\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x54\x65\x61\x6D\x65\x72\x31\x35\x28\x29\x3B\x72\x65\x74\x75\x72\x6E\x20\x66\x61\x6C\x73\x65\x3B\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x77\x70\x65\x78\x70\x6C\x6F\x72\x65\x72\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x23\x54\x65\x61\x6D\x62\x6F\x61\x72\x64\x49\x6E\x70\x75\x74\x35","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x54\x65\x61\x6D\x62\x6F\x61\x72\x64\x49\x63\x6F\x6E\x46\x61\x6B\x65\x36\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x69\x6E\x66\x6F\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x54\x65\x61\x6D\x65\x72\x31\x36\x28\x29\x3B\x72\x65\x74\x75\x72\x6E\x20\x66\x61\x6C\x73\x65\x3B\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x77\x70\x65\x78\x70\x6C\x6F\x72\x65\x72\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x23\x54\x65\x61\x6D\x62\x6F\x61\x72\x64\x49\x6E\x70\x75\x74\x36","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x54\x65\x61\x6D\x62\x6F\x61\x72\x64\x49\x63\x6F\x6E\x46\x61\x6B\x65\x37\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x69\x6E\x66\x6F\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x54\x65\x61\x6D\x65\x72\x31\x37\x28\x29\x3B\x72\x65\x74\x75\x72\x6E\x20\x66\x61\x6C\x73\x65\x3B\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x77\x70\x65\x78\x70\x6C\x6F\x72\x65\x72\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x23\x54\x65\x61\x6D\x62\x6F\x61\x72\x64\x49\x6E\x70\x75\x74\x37","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x54\x65\x61\x6D\x62\x6F\x61\x72\x64\x49\x63\x6F\x6E\x46\x61\x6B\x65\x38\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x69\x6E\x66\x6F\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x54\x65\x61\x6D\x65\x72\x31\x38\x28\x29\x3B\x72\x65\x74\x75\x72\x6E\x20\x66\x61\x6C\x73\x65\x3B\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x77\x70\x65\x78\x70\x6C\x6F\x72\x65\x72\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x23\x54\x65\x61\x6D\x62\x6F\x61\x72\x64\x49\x6E\x70\x75\x74\x38","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x54\x65\x61\x6D\x62\x6F\x61\x72\x64\x49\x63\x6F\x6E\x46\x61\x6B\x65\x39\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x69\x6E\x66\x6F\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x54\x65\x61\x6D\x65\x72\x31\x39\x28\x29\x3B\x72\x65\x74\x75\x72\x6E\x20\x66\x61\x6C\x73\x65\x3B\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x77\x70\x65\x78\x70\x6C\x6F\x72\x65\x72\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x23\x54\x65\x61\x6D\x62\x6F\x61\x72\x64\x49\x6E\x70\x75\x74\x39","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x54\x65\x61\x6D\x62\x6F\x61\x72\x64\x49\x63\x6F\x6E\x46\x61\x6B\x65\x31\x30\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x69\x6E\x66\x6F\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x54\x65\x61\x6D\x65\x72\x32\x30\x28\x29\x3B\x72\x65\x74\x75\x72\x6E\x20\x66\x61\x6C\x73\x65\x3B\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x77\x70\x65\x78\x70\x6C\x6F\x72\x65\x72\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x23\x54\x65\x61\x6D\x62\x6F\x61\x72\x64\x49\x6E\x70\x75\x74\x31\x30","\x74\x65\x61\x6D\x50\x6C\x61\x79\x65\x72\x73","\x6E\x69\x63\x6B","\x23\x54\x65\x61\x6D\x62\x6F\x61\x72\x64\x49\x6E\x70\x75\x74","\x6C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64","\x23\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x49\x6E\x70\x75\x74","\x23\x6D\x61\x69\x6E\x2D\x6D\x65\x6E\x75","\x23\x73\x6B\x69\x6E\x73\x2D\x70\x61\x6E\x65\x6C","\x23\x71\x75\x69\x63\x6B\x2D\x6D\x65\x6E\x75","\x23\x65\x78\x70\x2D\x62\x61\x72","\x23\x53\x6B\x69\x6E\x43\x68\x61\x6E\x67\x65\x72","\x73\x6B\x69\x6E\x55\x52\x4C\x42\x65\x66\x6F\x72\x65","\x73\x6B\x69\x6E\x55\x52\x4C","\x6E\x69\x63\x6B\x42\x65\x66\x6F\x72\x65","\x70\x6C\x61\x79\x65\x72\x43\x6F\x6C\x6F\x72\x42\x65\x66\x6F\x72\x65","\x70\x6C\x61\x79\x65\x72\x43\x6F\x6C\x6F\x72","\x70\x6C\x61\x79\x42\x65\x66\x6F\x72\x65","\x70\x6C\x61\x79","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x62\x61\x6E\x6E\x65\x72\x73\x2F\x69\x63\x6F\x6E\x66\x61\x6B\x65\x31\x2E\x70\x6E\x67","\x73\x65\x6E\x64\x53\x65\x72\x76\x65\x72\x4A\x6F\x69\x6E","\x73\x65\x6E\x64\x50\x6C\x61\x79\x65\x72\x55\x70\x64\x61\x74\x65","\x73\x65\x6E\x64\x50\x6C\x61\x79\x65\x72\x4A\x6F\x69\x6E","\x23\x74\x65\x6D\x70\x43\x6F\x70\x79","\x3C\x6C\x61\x62\x65\x6C\x3E\x3C\x69\x6E\x70\x75\x74\x20\x74\x79\x70\x65\x3D\x22\x63\x68\x65\x63\x6B\x62\x6F\x78\x22\x20\x69\x64\x3D\x22\x65\x78\x70\x6F\x72\x74\x2D\x4C\x65\x67\x65\x6E\x64\x53\x65\x74\x74\x69\x6E\x67\x73\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x6A\x73\x2D\x73\x77\x69\x74\x63\x68\x22\x20\x64\x61\x74\x61\x2D\x73\x77\x69\x74\x63\x68\x65\x72\x79\x3D\x22\x74\x72\x75\x65\x22\x20\x63\x68\x65\x63\x6B\x65\x64\x20\x73\x74\x79\x6C\x65\x3D\x22\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x3E\x20\x41\x50\x49\x3C\x2F\x6C\x61\x62\x65\x6C\x3E","\x23\x65\x78\x70\x6F\x72\x74\x2D\x73\x65\x74\x74\x69\x6E\x67\x73","\x23\x65\x78\x70\x6F\x72\x74\x2D\x4C\x65\x67\x65\x6E\x64\x53\x65\x74\x74\x69\x6E\x67\x73","\x71\x75\x65\x72\x79\x53\x65\x6C\x65\x63\x74\x6F\x72","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72","\x6E\x65\x78\x74","\x69\x6E\x70\x75\x74\x23\x65\x78\x70\x6F\x72\x74\x2D\x6F\x67\x61\x72\x69\x6F\x54\x68\x65\x6D\x65\x53\x65\x74\x74\x69\x6E\x67\x73\x2E\x6A\x73\x2D\x73\x77\x69\x74\x63\x68","\x73\x6D\x61\x6C\x6C","\x72\x67\x62\x28\x32\x35\x30\x2C\x20\x32\x35\x30\x2C\x20\x32\x35\x30\x29","\x3C\x6C\x61\x62\x65\x6C\x3E\x3C\x69\x6E\x70\x75\x74\x20\x74\x79\x70\x65\x3D\x22\x63\x68\x65\x63\x6B\x62\x6F\x78\x22\x20\x69\x64\x3D\x22\x69\x6D\x70\x6F\x72\x74\x2D\x4C\x65\x67\x65\x6E\x64\x53\x65\x74\x74\x69\x6E\x67\x73\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x6A\x73\x2D\x73\x77\x69\x74\x63\x68\x22\x20\x64\x61\x74\x61\x2D\x73\x77\x69\x74\x63\x68\x65\x72\x79\x3D\x22\x74\x72\x75\x65\x22\x20\x63\x68\x65\x63\x6B\x65\x64\x20\x73\x74\x79\x6C\x65\x3D\x22\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x3E\x20\x41\x50\x49\x3C\x2F\x6C\x61\x62\x65\x6C\x3E","\x23\x69\x6D\x70\x6F\x72\x74\x2D\x73\x65\x74\x74\x69\x6E\x67\x73","\x23\x69\x6D\x70\x6F\x72\x74\x2D\x4C\x65\x67\x65\x6E\x64\x53\x65\x74\x74\x69\x6E\x67\x73","\x76\x61\x6C\x75\x65","\x65\x78\x70\x6F\x72\x74\x2D\x73\x65\x74\x74\x69\x6E\x67\x73","\x67\x65\x74\x45\x6C\x65\x6D\x65\x6E\x74\x42\x79\x49\x64","\x23\x65\x78\x70\x6F\x72\x74\x2D\x73\x65\x74\x74\x69\x6E\x67\x73\x2D\x62\x74\x6E","\x69\x6D\x70\x6F\x72\x74\x2D\x73\x65\x74\x74\x69\x6E\x67\x73\x2D\x62\x74\x6E\x32","\x23\x69\x6D\x70\x6F\x72\x74\x2D\x73\x65\x74\x74\x69\x6E\x67\x73\x2D\x62\x74\x6E","\x69\x6E\x73\x65\x72\x74\x41\x66\x74\x65\x72","\x63\x6C\x6F\x6E\x65","\x23\x69\x6D\x70\x6F\x72\x74\x2D\x73\x65\x74\x74\x69\x6E\x67\x73\x2D\x62\x74\x6E\x32","\x69\x73\x43\x68\x65\x63\x6B\x65\x64","\x73\x74\x72\x69\x6E\x67\x69\x66\x79","\x6C\x65\x67\x65\x6E\x64\x53\x65\x74\x74\x69\x6E\x67\x73","\x70\x72\x65\x76\x69\x6F\x75\x73\x4D\x6F\x64\x65","\x73\x68\x6F\x77\x54\x6F\x6B\x65\x6E","\x69\x6E\x69\x74\x69\x61\x6C\x4D\x75\x73\x69\x63\x55\x72\x6C","\x6D\x75\x73\x69\x63\x55\x72\x6C","\x6E\x6F\x74\x65\x31","\x6E\x6F\x74\x65\x32","\x6E\x6F\x74\x65\x33","\x6E\x6F\x74\x65\x34","\x6E\x6F\x74\x65\x35","\x6E\x6F\x74\x65\x36","\x6E\x6F\x74\x65\x37","\x6D\x69\x6E\x69\x6D\x61\x70\x62\x63\x6B\x69\x6D\x67","\x74\x65\x61\x6D\x62\x69\x6D\x67","\x63\x61\x6E\x76\x61\x73\x62\x69\x6D\x67","\x6C\x65\x61\x64\x62\x69\x6D\x67","\x70\x69\x63\x31\x75\x72\x6C\x69\x6D\x67","\x70\x69\x63\x32\x75\x72\x6C\x69\x6D\x67","\x70\x69\x63\x33\x75\x72\x6C\x69\x6D\x67","\x70\x69\x63\x34\x75\x72\x6C\x69\x6D\x67","\x70\x69\x63\x35\x75\x72\x6C\x69\x6D\x67","\x70\x69\x63\x36\x75\x72\x6C\x69\x6D\x67","\x79\x74\x31\x75\x72\x6C\x69\x6D\x67","\x79\x74\x32\x75\x72\x6C\x69\x6D\x67","\x79\x74\x33\x75\x72\x6C\x69\x6D\x67","\x79\x74\x34\x75\x72\x6C\x69\x6D\x67","\x79\x74\x35\x75\x72\x6C\x69\x6D\x67","\x79\x74\x36\x75\x72\x6C\x69\x6D\x67","\x70\x69\x63\x31\x64\x61\x74\x61\x69\x6D\x67","\x70\x69\x63\x32\x64\x61\x74\x61\x69\x6D\x67","\x70\x69\x63\x33\x64\x61\x74\x61\x69\x6D\x67","\x70\x69\x63\x34\x64\x61\x74\x61\x69\x6D\x67","\x70\x69\x63\x35\x64\x61\x74\x61\x69\x6D\x67","\x70\x69\x63\x36\x64\x61\x74\x61\x69\x6D\x67","\x79\x74\x31\x64\x61\x74\x61\x69\x6D\x67","\x79\x74\x32\x64\x61\x74\x61\x69\x6D\x67","\x79\x74\x33\x64\x61\x74\x61\x69\x6D\x67","\x79\x74\x34\x64\x61\x74\x61\x69\x6D\x67","\x79\x74\x35\x64\x61\x74\x61\x69\x6D\x67","\x79\x74\x36\x64\x61\x74\x61\x69\x6D\x67","\x64\x69\x73\x63\x77\x65\x62\x68\x6F\x6F\x6B\x31","\x64\x69\x73\x63\x77\x65\x62\x68\x6F\x6F\x6B\x32","\x55\x73\x65\x72\x73\x63\x72\x69\x70\x74\x31","\x55\x73\x65\x72\x73\x63\x72\x69\x70\x74\x32","\x55\x73\x65\x72\x73\x63\x72\x69\x70\x74\x33","\x55\x73\x65\x72\x73\x63\x72\x69\x70\x74\x34","\x55\x73\x65\x72\x73\x63\x72\x69\x70\x74\x35","\x55\x73\x65\x72\x73\x63\x72\x69\x70\x74\x74\x65\x78\x74\x75\x72\x65\x31","\x55\x73\x65\x72\x73\x63\x72\x69\x70\x74\x74\x65\x78\x74\x75\x72\x65\x32","\x55\x73\x65\x72\x73\x63\x72\x69\x70\x74\x74\x65\x78\x74\x75\x72\x65\x33","\x55\x73\x65\x72\x73\x63\x72\x69\x70\x74\x74\x65\x78\x74\x75\x72\x65\x34","\x55\x73\x65\x72\x73\x63\x72\x69\x70\x74\x74\x65\x78\x74\x75\x72\x65\x35","\x69\x6D\x70\x6F\x72\x74\x2D\x73\x65\x74\x74\x69\x6E\x67\x73","\x23\x6D\x75\x73\x69\x63\x55\x72\x6C","\x73\x72\x63","\x23\x6D\x75\x73\x69\x63\x46\x72\x61\x6D\x65","\x5B\x75\x72\x6C\x5D","\x2E\x6D\x65\x73\x73\x61\x67\x65\x2D\x74\x65\x78\x74","\x2E\x74\x6F\x61\x73\x74\x2E\x74\x6F\x61\x73\x74\x2D\x73\x75\x63\x63\x65\x73\x73","\x70\x6F\x70","\x5B\x2F\x75\x72\x6C\x5D","\x68\x74\x74\x70\x73\x3A\x2F\x2F","\x48\x54\x54\x50\x3A\x2F\x2F","\x48\x54\x54\x50\x53\x3A\x2F\x2F","\x32\x35\x30\x70\x78","\x20","\x3A\x20\x3C\x61\x20\x69\x64\x3D\x22\x76\x69\x73\x69\x74\x75\x72\x6C\x22\x20\x68\x72\x65\x66\x3D","\x20\x74\x61\x72\x67\x65\x74\x3D\x22\x5F\x62\x6C\x61\x6E\x6B\x22\x3E\x3C\x66\x6F\x6E\x74\x20\x63\x6F\x6C\x6F\x72\x3D\x22\x62\x6C\x75\x65\x22\x3E","\x3C\x2F\x66\x6F\x6E\x74\x3E\x3C\x2F\x61\x3E\x3C\x2F\x62\x72\x3E\x20\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x61\x63\x63\x65\x70\x74\x55\x52\x4C\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x62\x6C\x6F\x63\x6B\x20\x62\x74\x6E\x2D\x69\x6E\x66\x6F\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x31\x30\x70\x78\x3B\x62\x6F\x72\x64\x65\x72\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x64\x61\x72\x6B\x62\x6C\x75\x65\x3B\x22\x3E","\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E\x3C\x62\x72\x3E\x3C\x62\x75\x74\x74\x6F\x6E\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x73\x6D\x20\x62\x74\x6E\x2D\x77\x61\x72\x6E\x69\x6E\x67\x20\x62\x74\x6E\x2D\x73\x70\x65\x63\x74\x61\x74\x65\x20\x62\x74\x6E\x2D\x6E\x6F\x64\x6F\x2D\x68\x69\x64\x65\x61\x6C\x6C\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x77\x69\x64\x74\x68\x3A\x20\x31\x30\x30\x25\x3B\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x2D\x31\x30\x70\x78\x3B\x22\x3E","\x5F\x62\x6C\x61\x6E\x6B","\x23\x61\x63\x63\x65\x70\x74\x55\x52\x4C","\x5B\x74\x61\x67\x5D","\x74\x61\x67","\x5B\x2F\x74\x61\x67\x5D","\x3A\x20\x3C\x69\x20\x69\x64\x3D\x22\x76\x69\x73\x69\x74\x75\x72\x6C\x22\x20\x68\x72\x65\x66\x3D","\x3C\x2F\x66\x6F\x6E\x74\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x72\x3E\x20\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x61\x63\x63\x65\x70\x74\x55\x52\x4C\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x62\x6C\x6F\x63\x6B\x20\x62\x74\x6E\x2D\x69\x6E\x66\x6F\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x31\x30\x70\x78\x3B\x62\x6F\x72\x64\x65\x72\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x64\x61\x72\x6B\x62\x6C\x75\x65\x3B\x22\x3E","\x23\x63\x6C\x61\x6E\x74\x61\x67","\x23\x66\x66\x36\x33\x34\x37","\x5B\x79\x75\x74\x5D","\x79\x75\x74","\x5B\x2F\x79\x75\x74\x5D","\x3C\x2F\x66\x6F\x6E\x74\x3E\x3C\x2F\x61\x3E\x3C\x2F\x62\x72\x3E\x20\x3C\x69\x66\x72\x61\x6D\x65\x20\x74\x79\x70\x65\x3D\x22\x74\x65\x78\x74\x2F\x68\x74\x6D\x6C\x22\x20\x77\x69\x64\x74\x68\x3D\x22\x31\x30\x30\x25\x22\x20\x68\x65\x69\x67\x68\x74\x3D\x22\x61\x75\x74\x6F\x22\x20\x73\x72\x63\x3D\x22\x68\x74\x74\x70\x73\x3A\x2F\x2F\x77\x77\x77\x2E\x79\x6F\x75\x74\x75\x62\x65\x2E\x63\x6F\x6D\x2F\x65\x6D\x62\x65\x64\x2F","\x3F\x61\x75\x74\x6F\x70\x6C\x61\x79\x3D\x31\x26\x61\x6D\x70\x3B\x76\x71\x3D\x74\x69\x6E\x79\x22\x20\x66\x72\x61\x6D\x65\x62\x6F\x72\x64\x65\x72\x3D\x22\x30\x22\x3E\x3C\x2F\x69\x66\x72\x61\x6D\x65\x3E\x3C\x2F\x62\x72\x3E\x20\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x61\x63\x63\x65\x70\x74\x59\x6F\x75\x74\x75\x62\x65\x45\x6D\x62\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x62\x6C\x6F\x63\x6B\x20\x62\x74\x6E\x2D\x69\x6E\x66\x6F\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x31\x30\x70\x78\x3B\x62\x6F\x72\x64\x65\x72\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x64\x61\x72\x6B\x62\x6C\x75\x65\x3B\x22\x3E","\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E\x3C\x62\x72\x3E\x3C\x62\x75\x74\x74\x6F\x6E\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x73\x6D\x20\x62\x74\x6E\x2D\x77\x61\x72\x6E\x69\x6E\x67\x20\x62\x74\x6E\x2D\x73\x70\x65\x63\x74\x61\x74\x65\x20\x62\x74\x6E\x2D\x6E\x6F\x64\x6F\x2D\x68\x69\x64\x65\x61\x6C\x6C\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x2D\x31\x30\x70\x78\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x30\x30\x25\x22\x3E","\x23\x61\x63\x63\x65\x70\x74\x59\x6F\x75\x74\x75\x62\x65\x45\x6D\x62","\x5B\x73\x6B\x79\x70\x65\x5D","\x73\x6B\x79\x70\x65","\x5B\x2F\x73\x6B\x79\x70\x65\x5D","\x6A\x6F\x69\x6E\x2E\x73\x6B\x79\x70\x65\x2E\x63\x6F\x6D\x2F","\x3C\x69\x6D\x67\x20\x73\x72\x63\x3D\x22\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x62\x61\x6E\x6E\x65\x72\x73\x2F\x69\x63\x6F\x6E\x73\x6B\x79\x70\x65\x2E\x70\x6E\x67\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x66\x6C\x6F\x61\x74\x3A\x6C\x65\x66\x74\x3B\x77\x69\x64\x74\x68\x3A\x31\x30\x30\x70\x78\x3B\x68\x65\x69\x67\x68\x74\x3A\x31\x30\x30\x70\x78\x3B\x22\x3E","\x5B\x64\x69\x73\x63\x6F\x72\x64\x5D","\x64\x69\x73\x63\x6F\x72\x64","\x5B\x2F\x64\x69\x73\x63\x6F\x72\x64\x5D","\x64\x69\x73\x63\x6F\x72\x64\x61\x70\x70\x2E\x63\x6F\x6D\x2F\x69\x6E\x76\x69\x74\x65","\x64\x69\x73\x63\x6F\x72\x64\x2E\x67\x67","\x64\x69\x73\x63\x6F\x72\x64\x2E\x63\x6F\x6D","\x3C\x69\x6D\x67\x20\x73\x72\x63\x3D\x22\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x62\x61\x6E\x6E\x65\x72\x73\x2F\x69\x63\x6F\x6E\x64\x69\x73\x63\x6F\x72\x64\x2E\x70\x6E\x67\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x66\x6C\x6F\x61\x74\x3A\x6C\x65\x66\x74\x3B\x77\x69\x64\x74\x68\x3A\x31\x30\x30\x70\x78\x3B\x68\x65\x69\x67\x68\x74\x3A\x31\x30\x30\x70\x78\x3B\x22\x3E","\x4C\x65\x67\x65\x6E\x64\x2E\x4D\x6F\x64","\x63\x6F\x6D","\x64\x6F","\x54\x65\x61\x6D\x35","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x69\x6D\x61\x67\x65","\x75\x72\x6C\x28\x22\x20\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x62\x61\x6E\x6E\x65\x72\x73\x2F\x69\x63\x6F\x67\x65\x6E\x65\x72\x61\x6C\x2E\x67\x69\x66\x20\x22\x29","\x23\x74\x6F\x70\x35\x2D\x68\x75\x64","\x75\x72\x6C\x28\x22\x20\x22\x29","\x48\x65\x6C\x6C\x6F","\x64\x69\x73\x70\x6C\x61\x79","\x23\x6D\x65\x73\x73\x61\x67\x65\x2D\x62\x6F\x78","\x6E\x6F\x6E\x65","\x48\x65\x6C\x6C\x6F\x20\x54\x65\x61\x6D","\x23\x68\x65\x6C\x6C\x6F\x43\x6F\x6E\x74\x61\x69\x6E\x65\x72","\x48\x69\x64\x65\x41\x6C\x6C","\x3C\x2F\x62\x72\x3E\x20\x3C\x62\x75\x74\x74\x6F\x6E\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x73\x6D\x20\x62\x74\x6E\x2D\x70\x72\x69\x6D\x61\x72\x79\x20\x62\x74\x6E\x2D\x70\x6C\x61\x79\x20\x62\x74\x6E\x2D\x64\x6F\x2D\x68\x69\x64\x65\x61\x6C\x6C\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x31\x30\x70\x78\x3B\x62\x6F\x72\x64\x65\x72\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x64\x61\x72\x6B\x62\x6C\x75\x65\x3B\x22\x3E","\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E\x3C\x62\x72\x3E\x3C\x62\x75\x74\x74\x6F\x6E\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x73\x6D\x20\x62\x74\x6E\x2D\x77\x61\x72\x6E\x69\x6E\x67\x20\x62\x74\x6E\x2D\x73\x70\x65\x63\x74\x61\x74\x65\x20\x62\x74\x6E\x2D\x6E\x6F\x64\x6F\x2D\x68\x69\x64\x65\x61\x6C\x6C\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x77\x69\x64\x74\x68\x3A\x20\x31\x30\x30\x25\x3B\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x31\x30\x70\x78\x3B\x22\x3E","\x23\x48\x69\x64\x65\x41\x6C\x6C\x42\x74\x68\x6E","\x2E\x62\x74\x6E\x2E\x62\x74\x6E\x2D\x73\x6D\x2E\x62\x74\x6E\x2D\x70\x72\x69\x6D\x61\x72\x79\x2E\x62\x74\x6E\x2D\x70\x6C\x61\x79\x2E\x62\x74\x6E\x2D\x64\x6F\x2D\x68\x69\x64\x65\x61\x6C\x6C","\x4E\x61\x6D\x65\x50\x65\x72\x6D","\x20\x3C\x2F\x62\x72\x3E\x20\x3C\x62\x75\x74\x74\x6F\x6E\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x73\x6D\x20\x62\x74\x6E\x2D\x70\x72\x69\x6D\x61\x72\x79\x20\x62\x74\x6E\x2D\x70\x6C\x61\x79\x20\x62\x74\x6E\x2D\x64\x6F\x2D\x4E\x61\x6D\x65\x50\x65\x72\x6D\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x31\x30\x70\x78\x3B\x62\x6F\x72\x64\x65\x72\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x64\x61\x72\x6B\x62\x6C\x75\x65\x3B\x22\x3E","\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E\x3C\x62\x72\x3E\x3C\x62\x75\x74\x74\x6F\x6E\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x73\x6D\x20\x62\x74\x6E\x2D\x77\x61\x72\x6E\x69\x6E\x67\x20\x62\x74\x6E\x2D\x73\x70\x65\x63\x74\x61\x74\x65\x20\x62\x74\x6E\x2D\x6E\x6F\x64\x6F\x2D\x4E\x61\x6D\x65\x50\x65\x72\x6D\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x77\x69\x64\x74\x68\x3A\x20\x31\x30\x30\x25\x3B\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x31\x30\x70\x78\x3B\x22\x3E","\x2E\x62\x74\x6E\x2E\x62\x74\x6E\x2D\x73\x6D\x2E\x62\x74\x6E\x2D\x70\x72\x69\x6D\x61\x72\x79\x2E\x62\x74\x6E\x2D\x70\x6C\x61\x79\x2E\x62\x74\x6E\x2D\x64\x6F\x2D\x4E\x61\x6D\x65\x50\x65\x72\x6D","\x64\x54\x72\x6F\x6C\x6C\x32","\x3C\x2F\x62\x72\x3E\x20\x3C\x62\x75\x74\x74\x6F\x6E\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x73\x6D\x20\x62\x74\x6E\x2D\x70\x72\x69\x6D\x61\x72\x79\x20\x62\x74\x6E\x2D\x70\x6C\x61\x79\x20\x62\x74\x6E\x2D\x64\x6F\x2D\x74\x72\x6F\x6C\x6C\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x31\x30\x70\x78\x3B\x62\x6F\x72\x64\x65\x72\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x64\x61\x72\x6B\x62\x6C\x75\x65\x3B\x22\x3E","\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E\x3C\x62\x72\x3E\x3C\x62\x75\x74\x74\x6F\x6E\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x73\x6D\x20\x62\x74\x6E\x2D\x77\x61\x72\x6E\x69\x6E\x67\x20\x62\x74\x6E\x2D\x73\x70\x65\x63\x74\x61\x74\x65\x20\x62\x74\x6E\x2D\x6E\x6F\x64\x6F\x2D\x74\x72\x6F\x6C\x6C\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x77\x69\x64\x74\x68\x3A\x20\x31\x30\x30\x25\x3B\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x31\x30\x70\x78\x3B\x22\x3E","\x2E\x62\x74\x6E\x2E\x62\x74\x6E\x2D\x73\x6D\x2E\x62\x74\x6E\x2D\x70\x72\x69\x6D\x61\x72\x79\x2E\x62\x74\x6E\x2D\x70\x6C\x61\x79\x2E\x62\x74\x6E\x2D\x64\x6F\x2D\x74\x72\x6F\x6C\x6C","\x59\x6F\x75\x74\x75\x62\x65","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x73\x6D\x20\x62\x74\x6E\x2D\x70\x72\x69\x6D\x61\x72\x79\x20\x62\x74\x6E\x2D\x70\x6C\x61\x79\x20\x62\x74\x6E\x2D\x70\x6C\x61\x79\x2D\x79\x6F\x75\x74\x75\x62\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x31\x30\x70\x78\x3B\x62\x6F\x72\x64\x65\x72\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x64\x61\x72\x6B\x62\x6C\x75\x65\x3B\x22\x3E","\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E\x3C\x62\x72\x3E\x3C\x62\x75\x74\x74\x6F\x6E\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x73\x6D\x20\x62\x74\x6E\x2D\x77\x61\x72\x6E\x69\x6E\x67\x20\x62\x74\x6E\x2D\x73\x70\x65\x63\x74\x61\x74\x65\x20\x62\x74\x6E\x2D\x6E\x6F\x70\x6C\x61\x79\x2D\x79\x6F\x75\x74\x75\x62\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x77\x69\x64\x74\x68\x3A\x20\x31\x30\x30\x25\x3B\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x31\x30\x70\x78\x3B\x22\x3E","\x23\x70\x6C\x61\x79\x65\x72\x42\x74\x6E","\x66\x6F\x63\x75\x73\x6F\x75\x74","\x2E\x62\x74\x6E\x2E\x62\x74\x6E\x2D\x73\x6D\x2E\x62\x74\x6E\x2D\x70\x72\x69\x6D\x61\x72\x79\x2E\x62\x74\x6E\x2D\x70\x6C\x61\x79\x2E\x62\x74\x6E\x2D\x70\x6C\x61\x79\x2D\x79\x6F\x75\x74\x75\x62\x65","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x61\x67\x61\x72\x2E\x69\x6F\x2F\x73\x69\x70\x3D\x31\x35\x31\x2E\x38\x30\x2E\x39\x31\x2E\x37\x33\x3A\x31\x35\x31\x31","\x53\x74\x65\x70\x31","\u2104","\x53\x74\x65\x70\x32","\x45\x55\x2D\x4C\x6F\x6E\x64\x6F\x6E","\x52\x55\x2D\x52\x75\x73\x73\x69\x61","\x5B\x44\x6F\x73\x41\x74\x74\x61\x63\x6B\x5D","\x44\x6F\x73\x41\x74\x74\x61\x63\x6B","\x5B\x2F\x44\x6F\x73\x41\x74\x74\x61\x63\x6B\x5D","\x2C","\x74\x61\x72\x67\x65\x74\x69\x6E\x67\x4C\x65\x61\x64\x63\x6C\x69\x65\x6E\x74\x58","\x74\x61\x72\x67\x65\x74\x69\x6E\x67\x4C\x65\x61\x64\x63\x6C\x69\x65\x6E\x74\x59","\x74\x61\x72\x67\x65\x74\x69\x6E\x67\x4C\x65\x61\x64\x58","\x6D\x61\x70\x4F\x66\x66\x73\x65\x74\x58","\x74\x61\x72\x67\x65\x74\x69\x6E\x67\x4C\x65\x61\x64\x59","\x6D\x61\x70\x4F\x66\x66\x73\x65\x74\x59","\x64\x72\x61\x77\x43\x6F\x6D\x6D\x61\x6E\x64\x65\x72\x32","\x3C\x62\x3E","\x3A\x3C\x2F\x62\x3E\x20\x41\x74\x74\x61\x63\x6B\x20","\x63\x61\x6C\x63\x75\x6C\x61\x74\x65\x4D\x61\x70\x53\x65\x63\x74\x6F\x72","\x5B\x44\x6F\x73\x46\x69\x67\x68\x74\x5D","\x44\x6F\x73\x46\x69\x67\x68\x74","\x5B\x2F\x44\x6F\x73\x46\x69\x67\x68\x74\x5D","\x3A\x3C\x2F\x62\x3E\x20\x46\x69\x67\x68\x74\x20","\x5B\x44\x6F\x73\x52\x75\x6E\x5D","\x44\x6F\x73\x52\x75\x6E","\x5B\x2F\x44\x6F\x73\x52\x75\x6E\x5D","\x3A\x3C\x2F\x62\x3E\x20\x52\x75\x6E\x20\x66\x72\x6F\x6D\x20","\x31","\x46\x61\x6C\x73\x65","\x5B\x73\x72\x76\x5D","\x5B\x2F\x73\x72\x76\x5D","\x23","\x3C\x64\x69\x76\x3E\x3C\x69\x6D\x67\x20\x73\x72\x63\x3D\x22\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x62\x61\x6E\x6E\x65\x72\x73\x2F\x69\x63\x6F\x6E\x61\x67\x61\x72\x69\x6F\x2E\x70\x6E\x67\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x66\x6C\x6F\x61\x74\x3A\x6C\x65\x66\x74\x3B\x77\x69\x64\x74\x68\x3A\x31\x30\x30\x70\x78\x3B\x68\x65\x69\x67\x68\x74\x3A\x31\x30\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x6D\x67\x3E","\x3C\x2F\x66\x6F\x6E\x74\x3E\x3C\x2F\x61\x3E\x3C\x2F\x62\x72\x3E\x53\x65\x72\x76\x65\x72\x20\x28\x50\x61\x72\x74\x79\x20\x6D\x6F\x64\x65\x29\x3A\x20","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x61\x63\x63\x65\x70\x74\x53\x65\x72\x76\x65\x72\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x62\x6C\x6F\x63\x6B\x20\x62\x74\x6E\x2D\x69\x6E\x66\x6F\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x31\x30\x70\x78\x3B\x62\x6F\x72\x64\x65\x72\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x64\x61\x72\x6B\x62\x6C\x75\x65\x3B\x22\x3E","\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E\x3C\x2F\x64\x69\x76\x3E","\x4E\x6F\x20\x50\x61\x73\x73\x77\x6F\x72\x64\x20\x4C\x6F\x61\x64\x65\x64","\x6D\x6F\x64\x65","\x55\x6E\x6B\x6E\x6F\x77\x6E","\x3C\x2F\x66\x6F\x6E\x74\x3E\x3C\x2F\x61\x3E\x3C\x2F\x62\x72\x3E\x53\x65\x72\x76\x65\x72\x3A\x20","\x3C\x2F\x62\x72\x3E\x4D\x6F\x64\x65\x3A\x20","\x3C\x2F\x62\x72\x3E\x20\x52\x65\x67\x69\x6F\x6E\x3A\x20","\x3C\x2F\x62\x72\x3E\x20\x50\x61\x73\x73\x77\x6F\x72\x64\x3A\x20","\x3C\x2F\x62\x72\x3E\x20\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x61\x63\x63\x65\x70\x74\x53\x65\x72\x76\x65\x72\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x62\x6C\x6F\x63\x6B\x20\x62\x74\x6E\x2D\x69\x6E\x66\x6F\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x31\x30\x70\x78\x3B\x62\x6F\x72\x64\x65\x72\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x64\x61\x72\x6B\x62\x6C\x75\x65\x3B\x22\x3E","\x73\x65\x74\x55\x6E\x69\x76\x65\x72\x73\x61\x6C\x43\x68\x61\x74","\x61\x75\x74\x68\x65\x6E\x74\x69\x63\x41\x67\x61\x72\x74\x6F\x6F\x6C\x49\x64","\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x27\x66\x61\x20\x66\x61\x2D\x75\x6E\x69\x76\x65\x72\x73\x61\x6C\x2D\x61\x63\x63\x65\x73\x73\x27\x20\x61\x72\x69\x61\x2D\x68\x69\x64\x64\x65\x6E\x3D\x27\x74\x72\x75\x65\x27\x3E\x3C\x2F\x69\x3E","\x3A\x76\x69\x73\x69\x62\x6C\x65","\x69\x73","\x23\x63\x68\x61\x74\x2D\x62\x6F\x78","\x52\x65\x63\x65\x69\x76\x65\x64\x20\x61\x20\x63\x6F\x6D\x6D\x61\x6E\x64\x20\x77\x69\x74\x68\x20\x61\x6E\x20\x75\x6E\x6B\x6E\x6F\x77\x6E\x20\x6E\x61\x6D\x65","\x52\x65\x63\x65\x69\x76\x65\x64\x20\x61\x20\x63\x6F\x6D\x6D\x61\x6E\x64\x20\x77\x69\x74\x68\x20\x61\x6E\x20\x75\x6E\x6B\x6E\x6F\x77\x6E\x20\x6E\x61\x6D\x65\x3A\x20\x63\x75\x73\x74\x6F\x6D\x53\x6B\x69\x6E\x73","\x3C\x64\x69\x76\x20\x63\x6C\x61\x73\x73\x3D\x22\x74\x6F\x61\x73\x74\x2D\x6D\x65\x73\x73\x61\x67\x65\x22\x3E\x3C\x73\x70\x61\x6E\x20\x63\x6C\x61\x73\x73\x3D\x22\x6D\x65\x73\x73\x61\x67\x65\x2D\x6E\x69\x63\x6B\x22\x3E","\x6E\x61\x6D\x65","\x3A\x20\x3C\x2F\x73\x70\x61\x6E\x3E\x3C\x73\x70\x61\x6E\x20\x63\x6C\x61\x73\x73\x3D\x22\x6D\x65\x73\x73\x61\x67\x65\x2D\x74\x65\x78\x74\x22\x3E","\x3C\x2F\x73\x70\x61\x6E\x3E\x3C\x61\x20\x68\x72\x65\x66\x3D\x22\x23\x22\x20\x64\x61\x74\x61\x2D\x75\x73\x65\x72\x2D\x69\x64\x3D\x22\x61\x67\x61\x72\x20\x74\x6F\x6F\x6C\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x6D\x75\x74\x65\x2D\x75\x73\x65\x72\x20\x6F\x67\x69\x63\x6F\x6E\x2D\x75\x73\x65\x72\x2D\x6D\x69\x6E\x75\x73\x22\x3E\x3C\x2F\x61\x3E\x20\x3C\x2F\x64\x69\x76\x3E","\x20\x73\x6F\x63\x6B\x65\x74\x2E\x69\x6F","\x6D\x69\x6E\x69\x6D\x61\x70\x20\x73\x65\x72\x76\x65\x72","\x6E\x6F\x4F\x67\x61\x72\x69\x6F\x53\x6F\x63\x6B\x65\x74","\x23\x6D\x65\x73\x73\x61\x67\x65\x53\x6F\x75\x6E\x64","\x5B\x55\x6E\x69\x76\x65\x72\x73\x61\x6C\x20\x63\x68\x61\x74\x5D\x3A","\x23\x63\x6F\x6D\x6D\x61\x6E\x64\x53\x6F\x75\x6E\x64","\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x77\x73\x73\x3A\x2F\x2F\x6D\x69\x6E\x69\x6D\x61\x70\x2E\x61\x67\x61\x72\x74\x6F\x6F\x6C\x2E\x69\x6F\x3A\x39\x30\x30\x30","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x45\x78\x61\x6D\x70\x6C\x65\x53\x63\x72\x69\x70\x74\x73\x2F\x73\x6F\x63\x6B\x65\x74\x2D\x69\x6F\x2E\x6D\x69\x6E\x2E\x6A\x73","\x37\x30\x30\x20\x31\x31\x70\x78\x20\x55\x62\x75\x6E\x74\x75","\x23\x66\x66\x66\x66\x66\x66","\x23\x30\x30\x30\x30\x30\x30","\x50\x49","\x38\x32\x70\x78","\x34\x30\x25","\x4F","\x23\x38\x43\x38\x31\x43\x37","\x4C\x2E\x4D","\x74\x6F\x70\x35\x2D\x68\x75\x64","\x70\x72\x65\x5F\x6C\x6F\x6F\x70\x5F\x74\x69\x6D\x65\x6F\x75\x74","\x77\x61\x69\x74\x20\x66\x6F\x72\x20\x6D\x6F\x64\x20\x74\x6F\x20\x6C\x6F\x61\x64","\x63\x6F\x6E\x66\x69\x67","\x7B\x7D","\x73\x74\x6F\x72\x61\x67\x65\x5F\x67\x65\x74\x56\x61\x6C\x75\x65","\x65\x78\x74\x65\x6E\x64","\x61\x6F\x32\x74","\x23\x61\x6F\x32\x74\x2D\x68\x75\x64\x20\x7B","\x20\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x20\x38\x30\x25\x3B\x20\x70\x6F\x69\x6E\x74\x65\x72\x2D\x65\x76\x65\x6E\x74\x73\x3A\x20\x61\x75\x74\x6F\x3B","\x7D","\x23\x61\x6F\x32\x74\x2D\x68\x75\x64\x20\x2A\x20\x7B","\x20\x75\x73\x65\x72\x2D\x73\x65\x6C\x65\x63\x74\x3A\x20\x61\x75\x74\x6F\x21\x69\x6D\x70\x6F\x72\x74\x61\x6E\x74\x3B","\x23\x61\x6F\x32\x74\x2D\x63\x66\x67\x2D\x64\x6C\x67\x20\x7B","\x20\x62\x6F\x72\x64\x65\x72\x2D\x72\x61\x64\x69\x75\x73\x3A\x30\x3B\x20\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x20\x38\x30\x25\x3B\x20\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x32\x70\x78\x20\x31\x30\x70\x78\x3B\x20\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x20\x66\x69\x78\x65\x64\x3B","\x20\x70\x6F\x69\x6E\x74\x65\x72\x2D\x65\x76\x65\x6E\x74\x73\x3A\x20\x61\x75\x74\x6F\x3B\x20\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x69\x6D\x61\x67\x65\x3A\x20\x75\x72\x6C\x28","\x20\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x66\x66\x66\x66\x66\x66\x3B","\x20\x6F\x76\x65\x72\x66\x6C\x6F\x77\x3A\x20\x68\x69\x64\x64\x65\x6E\x3B","\x23\x61\x6F\x32\x74\x2D\x63\x66\x67\x2D\x64\x6C\x67\x20\x2A\x20\x7B","\x20\x77\x69\x64\x74\x68\x3A\x20\x61\x75\x74\x6F\x3B\x20\x75\x73\x65\x72\x2D\x73\x65\x6C\x65\x63\x74\x3A\x20\x61\x75\x74\x6F\x21\x69\x6D\x70\x6F\x72\x74\x61\x6E\x74\x3B\x20\x70\x6F\x69\x6E\x74\x65\x72\x2D\x65\x76\x65\x6E\x74\x73\x3A\x20\x61\x75\x74\x6F\x3B","\x20\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x20\x72\x65\x6C\x61\x74\x69\x76\x65\x3B\x20\x66\x6C\x6F\x61\x74\x3A\x20\x69\x6E\x69\x74\x69\x61\x6C\x3B","\x23\x61\x6F\x32\x74\x2D\x63\x66\x67\x2D\x64\x6C\x67\x20\x69\x6E\x70\x75\x74\x20\x7B","\x20\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x72\x67\x62\x61\x28\x30\x2C\x30\x2C\x30\x2C\x30\x2E\x34\x29\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x66\x66\x66\x66\x66\x66\x3B","\x3C\x73\x74\x79\x6C\x65\x3E\x0A","\x0A\x3C\x2F\x73\x74\x79\x6C\x65\x3E","\x68\x65\x61\x64","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x61\x6F\x32\x74\x2D\x68\x75\x64\x22\x3E\x3C\x73\x70\x61\x6E\x20\x63\x6C\x61\x73\x73\x3D\x22\x68\x75\x64\x2D\x6D\x61\x69\x6E\x2D\x63\x6F\x6C\x6F\x72\x22\x3E\x55\x6E\x69\x76\x65\x72\x73\x61\x6C\x3A","\x20\x3C\x73\x70\x61\x6E\x20\x69\x64\x3D\x22\x61\x6F\x32\x74\x2D\x63\x61\x70\x74\x75\x72\x65\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x75\x6E\x69\x76\x65\x72\x73\x61\x6C\x2D\x61\x63\x63\x65\x73\x73\x22\x20\x61\x72\x69\x61\x2D\x68\x69\x64\x64\x65\x6E\x3D\x22\x74\x72\x75\x65\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x73\x70\x61\x6E\x3E","\x20\x3C\x73\x70\x61\x6E\x20\x69\x64\x3D\x22\x61\x6F\x32\x74\x2D\x63\x6F\x6E\x66\x69\x67\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x77\x72\x65\x6E\x63\x68\x22\x20\x61\x72\x69\x61\x2D\x68\x69\x64\x64\x65\x6E\x3D\x22\x74\x72\x75\x65\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x73\x70\x61\x6E\x3E\x3C\x2F\x73\x70\x61\x6E\x3E","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x61\x6F\x32\x74\x2D\x74\x6F\x70\x35\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x20\x31\x34\x70\x78\x3B\x22\x3E\x3C\x2F\x64\x69\x76\x3E","\x3C\x2F\x64\x69\x76\x3E","\x63\x61\x70\x74\x75\x72\x65","\x6F\x67\x61\x72\x69\x6F","\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64","\x23\x61\x6F\x32\x74\x2D\x63\x61\x70\x74\x75\x72\x65","\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x74\x69\x6D\x65\x73\x22\x20\x61\x72\x69\x61\x2D\x68\x69\x64\x64\x65\x6E\x3D\x22\x74\x72\x75\x65\x22\x3E\x3C\x2F\x69\x3E","\x63\x61\x70\x74\x75\x72\x65\x5F\x73\x74\x61\x72\x74","\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x75\x6E\x69\x76\x65\x72\x73\x61\x6C\x2D\x61\x63\x63\x65\x73\x73\x22\x20\x61\x72\x69\x61\x2D\x68\x69\x64\x64\x65\x6E\x3D\x22\x74\x72\x75\x65\x22\x3E\x3C\x2F\x69\x3E","\x63\x61\x70\x74\x75\x72\x65\x5F\x65\x6E\x64","\x63\x6F\x6C\x6F\x72","\x6D\x6F\x75\x73\x65\x6C\x65\x61\x76\x65","\x23\x68\x75\x64\x54\x65\x78\x74\x43\x6F\x6C\x6F\x72","\x6D\x6F\x75\x73\x65\x65\x6E\x74\x65\x72","\x23\x61\x6F\x32\x74\x2D\x63\x6F\x6E\x66\x69\x67","\x6C\x6D\x73\x61\x5F\x74\x65\x61\x6D\x74\x6F\x70","\x6D\x6F\x75\x73\x65\x64\x6F\x77\x6E","\x23\x61\x6F\x32\x74\x2D\x68\x75\x64","\x6C\x6D\x73\x61\x5F\x63\x68\x61\x74","\x63\x68\x61\x74\x5F\x63\x6C\x6F\x73\x65","\x3C\x61\x20\x68\x72\x65\x66\x3D\x22\x23\x22\x20\x69\x64\x3D\x22\x61\x6F\x32\x74\x2D\x63\x68\x61\x74\x2D\x63\x6C\x6F\x73\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x66\x6C\x6F\x61\x74\x3A\x72\x69\x67\x68\x74\x3B\x22\x3E\x58\x3C\x2F\x61\x3E","\x23\x6D\x65\x73\x73\x61\x67\x65\x2D\x6D\x65\x6E\x75","\x63\x68\x61\x74\x43\x6C\x6F\x73\x65","\x23\x61\x6F\x32\x74\x2D\x63\x68\x61\x74\x2D\x63\x6C\x6F\x73\x65","\x63\x68\x61\x74\x5F\x76\x63\x65\x6E\x74\x65\x72","\x62\x6F\x74\x74\x6F\x6D","\x6D\x65\x73\x73\x61\x67\x65\x42\x6F\x78\x42\x6F\x74\x74\x6F\x6D","\x61\x6C\x74\x4B\x65\x79","\x63\x74\x72\x6C\x4B\x65\x79","\x63","\x6D\x65\x74\x61\x4B\x65\x79","\x73\x68\x69\x66\x74\x4B\x65\x79","\x73","\x6B\x65\x79\x43\x6F\x64\x65","\x6B\x65\x79\x43\x6F\x64\x65\x45\x6E\x74\x65\x72","\x63\x68\x61\x74\x5F\x61\x6C\x74","\x63\x68\x61\x74\x53\x65\x6E\x64","\x61\x63","\x63\x68\x61\x74\x5F\x63\x74\x72\x6C\x61\x6C\x74","\x63\x68\x61\x74\x5F\x63\x74\x72\x6C","\x6B\x65\x79\x64\x6F\x77\x6E","\x23\x6D\x65\x73\x73\x61\x67\x65","\x73\x6B\x69\x6E\x54\x6F\x67\x67\x6C\x65\x5F\x73\x74\x61\x72\x74","\x64\x72\x61\x67\x67\x61\x62\x6C\x65","\x23\x61\x6F\x32\x74\x2D\x63\x66\x67\x2D\x64\x6C\x67","\x23\x61\x6F\x32\x74\x2D\x6D\x65\x73\x73\x61\x67\x65","\x23\x61\x6F\x32\x74\x2D\x6D\x69\x6E\x69\x6D\x61\x70","\x63\x61\x70\x74\x75\x72\x65\x5F\x69\x6E\x69\x74","\x74\x6F\x6B\x65\x6E","\x77\x73","\x77\x73\x73\x3A\x2F\x2F\x6C\x69\x76\x65\x2D\x61\x72\x65\x6E\x61\x2D","\x2E\x61\x67\x61\x72\x2E\x69\x6F\x3A\x38\x30","\x63\x6F\x6E\x6E\x65\x63\x74","\x75\x70\x64\x61\x74\x65\x5F\x74\x69\x6D\x65\x72\x69\x64","\x75\x70\x64\x61\x74\x65","\x75\x70\x64\x61\x74\x65\x5F\x69\x6E\x74\x65\x72\x76\x61\x6C","\x23\x61\x6F\x32\x74\x2D\x74\x6F\x70\x35","\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x3C\x61\x20\x68\x72\x65\x66\x3D\x22\x23\x22\x20\x69\x64\x3D\x22\x61\x6F\x32\x74\x2D\x6D\x65\x73\x73\x61\x67\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x66\x6C\x6F\x61\x74\x3A\x6C\x65\x66\x74\x3B\x22\x3E","\x74\x6F\x6F\x6C\x5F\x73\x79\x6D\x62\x6F\x6C","\x3C\x2F\x61\x3E","\x70\x72\x65\x70\x65\x6E\x64","\x23\x6D\x69\x6E\x69\x6D\x61\x70","\x68\x65\x69\x67\x68\x74","\x3C\x63\x61\x6E\x76\x61\x73\x20\x69\x64\x3D\x22\x61\x6F\x32\x74\x2D\x6D\x69\x6E\x69\x6D\x61\x70\x22","\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x20\x61\x62\x73\x6F\x6C\x75\x74\x65\x3B\x22","\x20\x77\x69\x64\x74\x68\x3D\x22","\x22\x20\x68\x65\x69\x67\x68\x74\x3D\x22","\x22\x3E","\x68\x61\x73\x43\x6C\x61\x73\x73","\x4C\x2E\x4D\x3A\x2D\x3E\x41\x2E\x54\x3A\x20\x6E\x6F\x74\x20\x63\x6F\x6E\x6E\x65\x63\x74\x65\x64","\x74\x6F\x61\x73\x74\x72","\x63\x68\x61\x74","\x4C\x4D\x3A","\x73\x65\x6E\x64\x4D\x69\x6E\x69\x6D\x61\x70\x53\x65\x72\x76\x65\x72\x43\x6F\x6D\x6D\x61\x6E\x64","\x6F\x67\x61\x72","\x74\x72\x69\x67\x67\x65\x72","\x4D\x65\x73\x73\x61\x67\x65\x20\x69\x6E\x63\x6C\x75\x64\x65\x64\x20\x53\x63\x72\x69\x70\x74\x20\x63\x6F\x6D\x6D\x61\x6E\x64\x2C\x20\x74\x68\x75\x73\x20\x69\x74\x20\x69\x73\x20\x6E\x6F\x74\x20\x73\x65\x6E\x74\x20\x74\x6F\x20\x61\x67\x61\x72\x20\x74\x6F\x6F\x6C","\x63\x68\x61\x74\x5F\x75\x6E\x70\x61\x75\x73\x65","\x23\x70\x61\x75\x73\x65\x2D\x68\x75\x64","\x62\x6C\x6F\x63\x6B","\x6B\x65\x79\x43\x6F\x64\x65\x52","\x6B\x65\x79\x75\x70","\x6F\x67\x61\x72\x49\x73\x41\x6C\x69\x76\x65","\x61\x6C\x69\x76\x65","\x74\x67\x61\x72\x41\x6C\x69\x76\x65","\x74\x67\x61\x72\x52\x65\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x6F\x67\x61\x72\x4D\x69\x6E\x69\x6D\x61\x70\x55\x70\x64\x61\x74\x65","\x63\x6F\x6E\x66\x69\x67\x5F\x69\x6E\x69\x74","\x63\x66\x67\x5F\x6C\x6F\x61\x64","\x23\x6F\x76\x65\x72\x6C\x61\x79\x73","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x61\x6F\x32\x74\x2D\x63\x66\x67\x2D\x64\x6C\x67\x22","\x20\x20\x73\x74\x79\x6C\x65\x3D\x22\x77\x69\x64\x74\x68\x3A\x34\x30\x30\x70\x78\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x34\x38\x30\x70\x78\x3B\x20\x74\x6F\x70\x3A\x31\x35\x30\x70\x78\x3B\x20\x6C\x65\x66\x74\x3A\x33\x30\x30\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B","\x41\x67\x61\x72\x20\x54\x6F\x6F\x6C\x2F\x4C\x65\x67\x65\x6E\x64\x20\x4D\x6F\x64\x20\x74\x6F\x6F\x6C\x73","\x3C\x64\x69\x76\x20\x73\x74\x79\x6C\x65\x3D\x22\x6F\x76\x65\x72\x66\x6C\x6F\x77\x3A\x20\x73\x63\x72\x6F\x6C\x6C\x3B\x20","\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x20\x72\x65\x6C\x61\x74\x69\x76\x65\x3B\x20\x74\x6F\x70\x3A\x31\x2E\x35\x65\x6D\x3B\x20\x6C\x65\x66\x74\x3A\x30\x2E\x35\x65\x6D\x3B\x20\x72\x69\x67\x68\x74\x3A\x30\x2E\x35\x65\x6D\x3B\x20\x62\x6F\x74\x74\x6F\x6D\x3A\x31\x2E\x35\x65\x6D\x3B\x22\x3E","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x61\x6F\x32\x74\x2D\x63\x66\x67\x2D\x62\x61\x73\x65\x22\x3E","\x3C\x2F\x64\x69\x76\x3E\x3C\x62\x72\x3E\x3C\x62\x72\x3E","\x26\x6E\x62\x73\x70\x3B\x3C\x73\x70\x61\x6E\x20\x69\x64\x3D\x22\x61\x6F\x32\x74\x2D\x63\x66\x67\x2D\x64\x65\x66\x61\x75\x6C\x74\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x70\x72\x69\x6D\x61\x72\x79\x22\x3E","\x74\x6F\x55\x70\x70\x65\x72\x43\x61\x73\x65","\x3C\x2F\x73\x70\x61\x6E\x3E","\x26\x6E\x62\x73\x70\x3B\x3C\x73\x70\x61\x6E\x20\x69\x64\x3D\x22\x61\x6F\x32\x74\x2D\x63\x66\x67\x2D\x6F\x6B\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x73\x75\x63\x63\x65\x73\x73\x22\x3E","\x26\x6E\x62\x73\x70\x3B\x3C\x73\x70\x61\x6E\x20\x69\x64\x3D\x22\x61\x6F\x32\x74\x2D\x63\x66\x67\x2D\x63\x61\x6E\x63\x65\x6C\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x64\x61\x6E\x67\x65\x72\x22\x3E","\x26\x6E\x62\x73\x70\x3B\x26\x6E\x62\x73\x70\x3B\x26\x6E\x62\x73\x70\x3B\x55\x70\x64\x61\x74\x65\x20\x66\x72\x65\x71\x75\x65\x6E\x63\x79\x20\x5B\x6D\x69\x6C\x6C\x69\x73\x65\x63\x6F\x6E\x64\x73\x5D\x3A\x3C\x69\x6E\x70\x75\x74\x20\x74\x79\x70\x65\x3D\x22\x74\x65\x78\x74\x22\x20\x64\x61\x74\x61\x2D\x61\x6F\x32\x74\x2D\x63\x6F\x6E\x66\x69\x67\x3D\x22\x75\x70\x64\x61\x74\x65\x5F\x69\x6E\x74\x65\x72\x76\x61\x6C\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x77\x69\x64\x74\x68\x3A\x36\x65\x6D\x3B\x22\x2F\x3E","\x3C\x62\x72\x2F\x3E\x41\x67\x61\x72\x20\x54\x6F\x6F\x6C\x20\x4F\x62\x74\x61\x69\x6E\x65\x64\x20\x66\x72\x6F\x6D","\x3C\x62\x72\x2F\x3E\x26\x6E\x62\x73\x70\x3B\x3C\x6C\x61\x62\x65\x6C\x3E\x3C\x69\x6E\x70\x75\x74\x20\x74\x79\x70\x65\x3D\x22\x63\x68\x65\x63\x6B\x62\x6F\x78\x22\x20\x64\x61\x74\x61\x2D\x61\x6F\x32\x74\x2D\x63\x6F\x6E\x66\x69\x67\x3D\x22\x75\x73\x65\x72\x5F\x73\x68\x6F\x77\x22\x2F\x3E\x75\x73\x65\x72\x20\x6C\x69\x73\x74\x3C\x2F\x6C\x61\x62\x65\x6C\x3E","\x3C\x62\x72\x2F\x3E\x26\x6E\x62\x73\x70\x3B\x3C\x6C\x61\x62\x65\x6C\x3E\x3C\x69\x6E\x70\x75\x74\x20\x74\x79\x70\x65\x3D\x22\x63\x68\x65\x63\x6B\x62\x6F\x78\x22\x20\x64\x61\x74\x61\x2D\x61\x6F\x32\x74\x2D\x63\x6F\x6E\x66\x69\x67\x3D\x22\x6D\x69\x6E\x69\x6D\x61\x70\x5F\x73\x68\x6F\x77\x22\x2F\x3E\x6D\x69\x6E\x69\x6D\x61\x70\x3C\x2F\x6C\x61\x62\x65\x6C\x3E","\x26\x6E\x62\x73\x70\x3B\x50\x72\x65\x66\x69\x78\x3A\x3C\x69\x6E\x70\x75\x74\x20\x74\x79\x70\x65\x3D\x22\x74\x65\x78\x74\x22\x20\x64\x61\x74\x61\x2D\x61\x6F\x32\x74\x2D\x63\x6F\x6E\x66\x69\x67\x3D\x22\x74\x67\x61\x72\x5F\x70\x72\x65\x66\x69\x78\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x77\x69\x64\x74\x68\x3A\x34\x65\x6D\x3B\x22\x2F\x3E","\x26\x6E\x62\x73\x70\x3B\x26\x6E\x62\x73\x70\x3B\x63\x6F\x6C\x6F\x72\x3A\x3C\x69\x6E\x70\x75\x74\x20\x74\x79\x70\x65\x3D\x22\x74\x65\x78\x74\x22\x20\x64\x61\x74\x61\x2D\x61\x6F\x32\x74\x2D\x63\x6F\x6E\x66\x69\x67\x3D\x22\x74\x67\x61\x72\x5F\x63\x6F\x6C\x6F\x72\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x77\x69\x64\x74\x68\x3A\x36\x65\x6D\x3B\x22\x2F\x3E","\x3C\x62\x72\x2F\x3E\x53\x65\x6E\x64\x20\x74\x6F\x20\x41\x67\x61\x72\x20\x54\x6F\x6F\x6C","\x3C\x62\x72\x2F\x3E\x26\x6E\x62\x73\x70\x3B\x3C\x6C\x61\x62\x65\x6C\x3E\x3C\x69\x6E\x70\x75\x74\x20\x74\x79\x70\x65\x3D\x22\x63\x68\x65\x63\x6B\x62\x6F\x78\x22\x20\x64\x61\x74\x61\x2D\x61\x6F\x32\x74\x2D\x63\x6F\x6E\x66\x69\x67\x3D\x22\x6F\x67\x61\x72\x5F\x75\x73\x65\x72\x22\x2F\x3E\x75\x73\x65\x72\x20\x69\x6E\x66\x6F\x3C\x2F\x6C\x61\x62\x65\x6C\x3E","\x26\x6E\x62\x73\x70\x3B\x50\x72\x65\x66\x69\x78\x3A\x3C\x69\x6E\x70\x75\x74\x20\x74\x79\x70\x65\x3D\x22\x74\x65\x78\x74\x22\x20\x64\x61\x74\x61\x2D\x61\x6F\x32\x74\x2D\x63\x6F\x6E\x66\x69\x67\x3D\x22\x6F\x67\x61\x72\x5F\x70\x72\x65\x66\x69\x78\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x77\x69\x64\x74\x68\x3A\x34\x65\x6D\x3B\x22\x2F\x3E","\x3C\x62\x72\x2F\x3E\x4C\x4D\x42\x2D\x4D\x6F\x75\x73\x65\x20\x73\x70\x6C\x69\x74\x20\x63\x6F\x72\x72\x65\x63\x74\x69\x6F\x6E","\x3C\x62\x72\x2F\x3E\x26\x6E\x62\x73\x70\x3B\x3C\x6C\x61\x62\x65\x6C\x3E\x3C\x69\x6E\x70\x75\x74\x20\x74\x79\x70\x65\x3D\x22\x63\x68\x65\x63\x6B\x62\x6F\x78\x22\x20\x64\x61\x74\x61\x2D\x61\x6F\x32\x74\x2D\x63\x6F\x6E\x66\x69\x67\x3D\x22\x6C\x6D\x73\x61\x5F\x74\x65\x61\x6D\x74\x6F\x70\x22\x2F\x3E\x54\x65\x61\x6D\x62\x6F\x61\x72\x64\x3C\x2F\x6C\x61\x62\x65\x6C\x3E","\x26\x6E\x62\x73\x70\x3B\x3C\x6C\x61\x62\x65\x6C\x3E\x3C\x69\x6E\x70\x75\x74\x20\x74\x79\x70\x65\x3D\x22\x63\x68\x65\x63\x6B\x62\x6F\x78\x22\x20\x64\x61\x74\x61\x2D\x61\x6F\x32\x74\x2D\x63\x6F\x6E\x66\x69\x67\x3D\x22\x6C\x6D\x73\x61\x5F\x63\x68\x61\x74\x22\x2F\x3E\x63\x68\x61\x74\x3C\x2F\x6C\x61\x62\x65\x6C\x3E","\x3C\x62\x72\x2F\x3E\x43\x68\x61\x74\x20\x6F\x70\x74\x69\x6F\x6E","\x3C\x62\x72\x2F\x3E\x26\x6E\x62\x73\x70\x3B\x3C\x6C\x61\x62\x65\x6C\x3E\x3C\x69\x6E\x70\x75\x74\x20\x74\x79\x70\x65\x3D\x22\x63\x68\x65\x63\x6B\x62\x6F\x78\x22\x20\x64\x61\x74\x61\x2D\x61\x6F\x32\x74\x2D\x63\x6F\x6E\x66\x69\x67\x3D\x22\x63\x68\x61\x74\x5F\x63\x6C\x6F\x73\x65\x22\x2F\x3E\x63\x6C\x6F\x73\x65\x3C\x2F\x6C\x61\x62\x65\x6C\x3E","\x26\x6E\x62\x73\x70\x3B\x3C\x6C\x61\x62\x65\x6C\x3E\x3C\x69\x6E\x70\x75\x74\x20\x74\x79\x70\x65\x3D\x22\x63\x68\x65\x63\x6B\x62\x6F\x78\x22\x20\x64\x61\x74\x61\x2D\x61\x6F\x32\x74\x2D\x63\x6F\x6E\x66\x69\x67\x3D\x22\x63\x68\x61\x74\x5F\x75\x6E\x70\x61\x75\x73\x65\x22\x2F\x3E\x75\x6E\x70\x61\x75\x73\x65\x3C\x2F\x6C\x61\x62\x65\x6C\x3E","\x26\x6E\x62\x73\x70\x3B\x3C\x6C\x61\x62\x65\x6C\x3E\x3C\x69\x6E\x70\x75\x74\x20\x74\x79\x70\x65\x3D\x22\x63\x68\x65\x63\x6B\x62\x6F\x78\x22\x20\x64\x61\x74\x61\x2D\x61\x6F\x32\x74\x2D\x63\x6F\x6E\x66\x69\x67\x3D\x22\x63\x68\x61\x74\x5F\x76\x63\x65\x6E\x74\x65\x72\x22\x2F\x3E\x76\x63\x65\x6E\x74\x65\x72\x3C\x2F\x6C\x61\x62\x65\x6C\x3E","\x3C\x62\x72\x2F\x3E\x26\x6E\x62\x73\x70\x3B\x3C\x6C\x61\x62\x65\x6C\x3E\x3C\x69\x6E\x70\x75\x74\x20\x74\x79\x70\x65\x3D\x22\x63\x68\x65\x63\x6B\x62\x6F\x78\x22\x20\x64\x61\x74\x61\x2D\x61\x6F\x32\x74\x2D\x63\x6F\x6E\x66\x69\x67\x3D\x22\x63\x68\x61\x74\x5F\x61\x6C\x74\x22\x2F\x3E\x41\x6C\x74\x3E\x54\x3C\x2F\x6C\x61\x62\x65\x6C\x3E","\x26\x6E\x62\x73\x70\x3B\x3C\x6C\x61\x62\x65\x6C\x3E\x3C\x69\x6E\x70\x75\x74\x20\x74\x79\x70\x65\x3D\x22\x63\x68\x65\x63\x6B\x62\x6F\x78\x22\x20\x64\x61\x74\x61\x2D\x61\x6F\x32\x74\x2D\x63\x6F\x6E\x66\x69\x67\x3D\x22\x63\x68\x61\x74\x5F\x63\x74\x72\x6C\x61\x6C\x74\x22\x2F\x3E\x43\x74\x72\x6C\x2B\x41\x6C\x74\x3E\x4F\x2B\x54\x3C\x2F\x6C\x61\x62\x65\x6C\x3E","\x26\x6E\x62\x73\x70\x3B\x3C\x6C\x61\x62\x65\x6C\x3E\x3C\x69\x6E\x70\x75\x74\x20\x74\x79\x70\x65\x3D\x22\x63\x68\x65\x63\x6B\x62\x6F\x78\x22\x20\x64\x61\x74\x61\x2D\x61\x6F\x32\x74\x2D\x63\x6F\x6E\x66\x69\x67\x3D\x22\x63\x68\x61\x74\x5F\x63\x74\x72\x6C\x22\x2F\x3E\x43\x74\x72\x6C\x3E\x43\x6C\x6F\x73\x65\x3C\x2F\x6C\x61\x62\x65\x6C\x3E","\x3C\x62\x72\x2F\x3E\x4F\x74\x68\x65\x72","\x3C\x62\x72\x2F\x3E\x26\x6E\x62\x73\x70\x3B\x3C\x6C\x61\x62\x65\x6C\x3E\x3C\x69\x6E\x70\x75\x74\x20\x74\x79\x70\x65\x3D\x22\x63\x68\x65\x63\x6B\x62\x6F\x78\x22\x20\x64\x61\x74\x61\x2D\x61\x6F\x32\x74\x2D\x63\x6F\x6E\x66\x69\x67\x3D\x22\x73\x6B\x69\x6E\x5F\x74\x6F\x67\x67\x6C\x65\x5F\x61\x75\x74\x6F\x22\x2F\x3E\x73\x6B\x69\x6E\x20\x61\x75\x74\x6F\x20\x74\x6F\x67\x67\x6C\x65\x3C\x2F\x6C\x61\x62\x65\x6C\x3E","\x26\x6E\x62\x73\x70\x3B\x26\x6E\x62\x73\x70\x3B\x26\x6E\x62\x73\x70\x3B\x46\x72\x65\x71\x75\x65\x6E\x63\x79\x20\x5B\x6D\x69\x6C\x6C\x69\x73\x65\x63\x6F\x6E\x64\x73\x5D\x3A\x3C\x69\x6E\x70\x75\x74\x20\x74\x79\x70\x65\x3D\x22\x74\x65\x78\x74\x22\x20\x64\x61\x74\x61\x2D\x61\x6F\x32\x74\x2D\x63\x6F\x6E\x66\x69\x67\x3D\x22\x73\x6B\x69\x6E\x5F\x74\x6F\x67\x67\x6C\x65\x5F\x69\x6E\x74\x65\x72\x76\x61\x6C\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x77\x69\x64\x74\x68\x3A\x36\x65\x6D\x3B\x22\x2F\x3E","\x3C\x62\x72\x2F\x3E\x26\x6E\x62\x73\x70\x3B\x26\x6E\x62\x73\x70\x3B\x2A\x20\x43\x68\x61\x6E\x67\x65\x73\x20\x77\x69\x6C\x6C\x20\x62\x65\x20\x72\x65\x66\x6C\x65\x63\x74\x65\x64\x20\x61\x66\x74\x65\x72\x20\x72\x65\x73\x74\x61\x72\x74","\x23\x61\x6F\x32\x74\x2D\x63\x66\x67\x2D\x62\x61\x73\x65","\x23\x61\x6F\x32\x74\x2D\x63\x66\x67\x2D\x64\x65\x66\x61\x75\x6C\x74","\x63\x66\x67\x5F\x73\x61\x76\x65","\x73\x74\x6F\x72\x61\x67\x65\x5F\x73\x65\x74\x56\x61\x6C\x75\x65","\x63\x6F\x6E\x66\x69\x67\x5F\x63\x61\x6E\x63\x65\x6C","\x23\x61\x6F\x32\x74\x2D\x63\x66\x67\x2D\x6F\x6B","\x23\x61\x6F\x32\x74\x2D\x63\x66\x67\x2D\x63\x61\x6E\x63\x65\x6C","\x73\x6B\x69\x6E\x54\x6F\x67\x67\x6C\x65\x5F\x74\x69\x6D\x65\x72\x69\x64","\x73\x6B\x69\x6E\x5F\x74\x6F\x67\x67\x6C\x65\x5F\x61\x75\x74\x6F","\x73\x6B\x69\x6E\x5F\x74\x6F\x67\x67\x6C\x65\x5F\x69\x6E\x74\x65\x72\x76\x61\x6C","\x73\x6B\x69\x6E\x54\x6F\x67\x67\x6C\x65\x5F\x75\x70\x64\x61\x74\x65","\x63\x75\x73\x74\x6F\x6D\x53\x6B\x69\x6E\x73","\x76\x61\x6E\x69\x6C\x6C\x61\x53\x6B\x69\x6E\x73","\x73\x6B\x69\x6E\x54\x6F\x67\x67\x6C\x65\x5F\x68\x61\x73\x42\x6F\x74\x68","\x73\x6B\x69\x6E\x54\x6F\x67\x67\x6C\x65\x5F\x75\x70\x64\x61\x74\x65\x5F\x73\x75\x62","\x6B\x65\x79\x43\x6F\x64\x65\x41","\x69\x6F","\x73\x6F\x63\x6B\x65\x74\x49\x6F\x55\x52\x4C","\x76\x65\x72\x73\x69\x6F\x6E\x3D","\x26\x73\x65\x72\x76\x65\x72\x3D","\x67\x72\x61\x62\x5F\x73\x6F\x63\x6B\x65\x74","\x6D\x69\x6E\x69\x6D\x61\x70\x5F\x69\x6E\x66\x6F","\x6D\x69\x6E\x69\x6D\x61\x70\x5F\x63\x6F\x6E\x6E\x65\x63\x74","\x6F\x6E","\x6D\x69\x6E\x69\x6D\x61\x70\x5F\x73\x6F\x63\x6B\x65\x74","\x4F\x6E\x63\x65\x55\x73\x65\x64","\x74\x6F\x4C\x6F\x77\x65\x72\x43\x61\x73\x65","\x3D","\x6D\x69\x6E\x69\x6D\x61\x70\x53\x65\x72\x76\x65\x72","\x72\x65\x73\x65\x74\x4D\x69\x6E\x69\x6D\x61\x70","\x73\x65\x72\x76\x65\x72\x3D","\x61\x67\x61\x72\x53\x65\x72\x76\x65\x72","\x26\x74\x61\x67\x3D","\x63\x6F\x6D\x6D\x61\x6E\x64","\x6D\x69\x6E\x69\x6D\x61\x70\x5F\x63\x6F\x6D\x6D\x61\x6E\x64","\x6D\x69\x6E\x69\x6D\x61\x70\x5F\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74","\x63\x6F\x6E\x6E\x65\x63\x74\x5F\x65\x72\x72\x6F\x72","\x74\x65\x61\x6D\x6D\x61\x74\x65\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x6E\x69\x63\x6B\x73","\x70\x6C\x61\x79\x65\x72\x4E\x61\x6D\x65","\x41\x6E\x20\x75\x6E\x6E\x61\x6D\x65\x64\x20\x63\x65\x6C\x6C","\x73\x6F\x63\x6B\x65\x74\x49\x44","\x78","\x79","\x74\x67\x61\x72\x5F\x63\x6F\x6C\x6F\x72","\x61\x64\x64\x42\x61\x6C\x6C\x54\x6F\x4D\x69\x6E\x69\x6D\x61\x70","\x61\x64\x64","\x72\x65\x6D\x6F\x76\x65\x42\x61\x6C\x6C\x46\x72\x6F\x6D\x4D\x69\x6E\x69\x6D\x61\x70","\x6D\x6F\x76\x65\x42\x61\x6C\x6C\x4F\x6E\x4D\x69\x6E\x69\x6D\x61\x70","\x70\x6F\x73\x69\x74\x69\x6F\x6E","\x61\x67\x74\x6F\x6F\x6C\x62\x61\x6C\x6C","\x63\x75\x73\x74\x6F\x6D\x73","\x73\x68\x6F\x77\x43\x75\x73\x74\x6F\x6D\x53\x6B\x69\x6E\x73","\x25","\x72\x65\x67\x69\x73\x74\x65\x72\x53\x6B\x69\x6E","\x66\x6F\x72\x45\x61\x63\x68","\x6B\x65\x79\x73","\x72\x65\x73\x65\x74","\x6D\x65\x73\x73\x61\x67\x65","\x6F\x67\x61\x72\x43\x68\x61\x74\x41\x64\x64","\x55\x6E\x6B\x6E\x6F\x77\x6E\x20\x63\x6F\x6D\x6D\x61\x6E\x64\x20\x6C\x73\x3A\x20","\x6C\x73","\x68\x63","\x52\x65\x63\x65\x69\x76\x65\x64\x20\x61\x20\x63\x6F\x6D\x6D\x61\x6E\x64\x20\x77\x69\x74\x68\x20\x61\x6E\x20\x75\x6E\x6B\x6E\x6F\x77\x6E\x20\x6E\x61\x6D\x65\x3A\x20","\x65\x6D\x69\x74","\x6D\x69\x6E\x69\x6D\x61\x70\x42\x61\x6C\x6C\x73","\x69\x73\x44\x65\x66\x61\x75\x6C\x74","\x6C\x61\x73\x74\x58","\x6C\x61\x73\x74\x59","\x76\x69\x73\x69\x62\x6C\x65","\x6F\x67\x61\x72\x5F\x75\x73\x65\x72","\x6F\x67\x61\x72\x5F\x70\x72\x65\x66\x69\x78","\x23\x73\x6B\x69\x6E","\x64\x65\x61\x64","\x70\x6C\x61\x79\x65\x72\x58","\x70\x6C\x61\x79\x65\x72\x59","\x24\x31","\x74\x6F\x54\x69\x6D\x65\x53\x74\x72\x69\x6E\x67","\x3C\x64\x69\x76\x20\x63\x6C\x61\x73\x73\x3D\x22\x6D\x65\x73\x73\x61\x67\x65\x22\x3E","\x3C\x73\x70\x61\x6E\x20\x63\x6C\x61\x73\x73\x3D\x22\x6D\x65\x73\x73\x61\x67\x65\x2D\x74\x69\x6D\x65\x22\x3E\x5B","\x5D\x20\x3C\x2F\x73\x70\x61\x6E\x3E","\x3C\x73\x70\x61\x6E\x20\x73\x74\x79\x6C\x65\x3D\x22\x63\x6F\x6C\x6F\x72\x3A","\x6D\x65\x73\x73\x61\x67\x65\x54\x65\x78\x74\x43\x6F\x6C\x6F\x72","\x3B\x20\x66\x6F\x6E\x74\x2D\x77\x65\x69\x67\x68\x74\x3A\x37\x30\x30\x3B\x22\x3E","\x3C\x2F\x73\x70\x61\x6E\x3E\x3A\x20","\x3C\x73\x70\x61\x6E\x20\x63\x6C\x61\x73\x73\x3D\x22\x6D\x65\x73\x73\x61\x67\x65\x2D\x74\x65\x78\x74\x22\x3E","\x70\x65\x72\x66\x65\x63\x74\x53\x63\x72\x6F\x6C\x6C\x62\x61\x72","\x73\x63\x72\x6F\x6C\x6C\x48\x65\x69\x67\x68\x74","\x61\x6E\x69\x6D\x61\x74\x65","\x61\x67\x61\x72\x74\x6F\x6F\x6C\x74\x65\x61\x6D\x6D\x61\x74\x65\x6E\x69\x63\x6B\x73","\x6F\x67\x61\x72\x47\x65\x74\x4D\x61\x70\x53\x69\x7A\x65","\x6F\x67\x61\x72\x47\x65\x74\x4D\x61\x70\x4F\x66\x66\x73\x65\x74","\x6D\x69\x6E\x69\x6D\x61\x70\x4F\x66\x66\x73\x65\x74\x58","\x6D\x69\x6E\x69\x6D\x61\x70\x4F\x66\x66\x73\x65\x74\x59","\x6D\x69\x6E\x69\x6D\x61\x70\x54\x65\x61\x6D\x6D\x61\x74\x65\x73\x53\x69\x7A\x65","\x32\x64","\x67\x65\x74\x43\x6F\x6E\x74\x65\x78\x74","\x63\x6C\x65\x61\x72\x52\x65\x63\x74","\x66\x6F\x6E\x74","\x6D\x69\x6E\x69\x6D\x61\x70\x4E\x69\x63\x6B\x46\x6F\x6E\x74","\x74\x6F\x70\x35\x73\x6B\x69\x6E\x73","\x31\x2E\x20","\x73\x6F\x72\x74","\x61\x67\x61\x72\x74\x6F\x6F\x6C\x6D\x69\x6E\x69\x6D\x61\x70\x42\x61\x6C\x6C\x73","\x70\x72\x65\x64\x69\x63\x74\x65\x64\x47\x68\x6F\x73\x74\x43\x65\x6C\x6C\x73\x41\x72\x72\x61\x79","\x70\x72\x65\x64\x69\x63\x74\x65\x64\x47\x68\x6F\x73\x74\x43\x65\x6C\x6C\x73","\x6C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x70\x6F\x73","\x73\x68\x69\x66\x74","\x70\x75\x73\x68","\x63\x75\x73\x74\x6F\x6D\x53\x6B\x69\x6E\x73\x4D\x61\x70","\x5F\x63\x61\x63\x68\x65\x64\x32","\x63\x75\x73\x74\x6F\x6D\x53\x6B\x69\x6E\x73\x43\x61\x63\x68\x65","\x3C\x61\x20\x68\x72\x65\x66\x3D\x22\x23\x22\x20\x69\x64\x3D\x22\x70\x6F\x73\x2D\x73\x6B\x69\x6E\x22\x20\x63\x6C\x61\x73\x73\x3D\x20\x22\x73\x65\x74\x2D\x74\x61\x72\x67\x65\x74\x22\x20\x64\x61\x74\x61\x2D\x75\x73\x65\x72\x2D\x69\x64\x3D\x22","\x22\x73\x74\x79\x6C\x65\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20","\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x33\x30\x70\x78\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x34\x30\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x69\x6E\x6C\x69\x6E\x65\x2D\x62\x6C\x6F\x63\x6B\x3B\x22\x3E\x3C\x73\x70\x61\x6E\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x20\x61\x62\x73\x6F\x6C\x75\x74\x65\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x6C\x65\x66\x74\x3A\x20\x32\x70\x78\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x32\x36\x70\x78\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x32\x36\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x69\x6E\x6C\x69\x6E\x65\x2D\x62\x6C\x6F\x63\x6B\x3B\x22\x20\x61\x6C\x74\x3D\x22\x22\x3E","\x6F\x75\x74\x65\x72\x48\x54\x4D\x4C","\x3C\x2F\x73\x70\x61\x6E\x3E\x20","\x3C\x2F\x61\x3E\x3C\x64\x69\x76\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x2D\x33\x30\x70\x78\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x6C\x65\x66\x74\x3A\x20\x33\x32\x70\x78\x3B\x22\x3E","\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x33\x30\x70\x78\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x34\x30\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x69\x6E\x6C\x69\x6E\x65\x2D\x62\x6C\x6F\x63\x6B\x3B\x22\x3E\x3C\x69\x6D\x67\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x20\x61\x62\x73\x6F\x6C\x75\x74\x65\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x6C\x65\x66\x74\x3A\x20\x32\x70\x78\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x32\x36\x70\x78\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x32\x36\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x69\x6E\x6C\x69\x6E\x65\x2D\x62\x6C\x6F\x63\x6B\x3B\x22\x20\x73\x72\x63\x20\x3D\x20\x22\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x62\x61\x6E\x6E\x65\x72\x73\x2F\x69\x63\x6F\x6E\x61\x67\x61\x72\x69\x6F\x74\x6F\x6F\x6C\x2E\x70\x6E\x67\x22\x20\x61\x6C\x74\x3D\x22\x22\x3E\x20","\x67\x68\x6F\x73\x74\x43\x65\x6C\x6C\x73","\x3C\x73\x70\x61\x6E\x20\x63\x6C\x61\x73\x73\x3D\x22\x68\x75\x64\x2D\x6D\x61\x69\x6E\x2D\x63\x6F\x6C\x6F\x72\x22\x3E\x5B","\x5D\x3C\x2F\x73\x70\x61\x6E\x3E","\x3C\x73\x70\x61\x6E\x20\x63\x6C\x61\x73\x73\x3D\x22\x74\x6F\x70\x35\x2D\x6D\x61\x73\x73\x2D\x63\x6F\x6C\x6F\x72\x22\x3E\x5B","\x6D\x61\x73\x73","\x73\x68\x6F\x72\x74\x4D\x61\x73\x73\x46\x6F\x72\x6D\x61\x74","\x5D\x3C\x2F\x73\x70\x61\x6E\x3E\x20","\x43\x33","\x3C\x62\x72\x2F\x3E","\x2E\x20","\x6D\x69\x6E\x69\x6D\x61\x70\x5F\x73\x68\x6F\x77","\x5B","\x74\x67\x61\x72\x5F\x70\x72\x65\x66\x69\x78","\x5D","\x74\x65\x78\x74\x41\x6C\x69\x67\x6E","\x63\x65\x6E\x74\x65\x72","\x6C\x69\x6E\x65\x57\x69\x64\x74\x68","\x6D\x69\x6E\x69\x6D\x61\x70\x4E\x69\x63\x6B\x53\x74\x72\x6F\x6B\x65\x53\x69\x7A\x65","\x73\x74\x72\x6F\x6B\x65\x53\x74\x79\x6C\x65","\x6D\x69\x6E\x69\x6D\x61\x70\x4E\x69\x63\x6B\x53\x74\x72\x6F\x6B\x65\x43\x6F\x6C\x6F\x72","\x73\x74\x72\x6F\x6B\x65\x54\x65\x78\x74","\x62\x65\x67\x69\x6E\x50\x61\x74\x68","\x70\x69\x32","\x61\x72\x63","\x63\x6C\x6F\x73\x65\x50\x61\x74\x68","\x66\x69\x6C\x6C","\x75\x73\x65\x72\x5F\x73\x68\x6F\x77","\x3C\x2F\x64\x69\x76\x3E\x3C\x73\x70\x61\x6E\x20\x73\x74\x79\x6C\x65\x20\x3D\x20\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x33\x30\x70\x78\x3B\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x68\x75\x64\x2D\x6D\x61\x69\x6E\x2D\x63\x6F\x6C\x6F\x72\x20\x6F\x67\x69\x63\x6F\x6E\x2D\x75\x73\x65\x72\x73\x22\x3E\x3C\x2F\x73\x70\x61\x6E\x3E\x20\x3A\x20\x3C\x73\x70\x61\x6E\x20\x69\x64\x3D\x22\x74\x6F\x70\x35\x2D\x74\x6F\x74\x61\x6C\x2D\x70\x6C\x61\x79\x65\x72\x73\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x74\x6F\x70\x35\x2D\x6D\x61\x73\x73\x2D\x63\x6F\x6C\x6F\x72\x22\x3E","\x6D\x61\x70\x53\x69\x7A\x65","\x6D\x61\x70\x4F\x66\x66\x73\x65\x74","\x74\x79\x70\x65","\x64\x61\x74\x61\x2D\x61\x6F\x32\x74\x2D\x63\x6F\x6E\x66\x69\x67","\x63\x68\x65\x63\x6B\x62\x6F\x78","\x63\x68\x65\x63\x6B\x65\x64","\x65\x61\x63\x68","\x5B\x64\x61\x74\x61\x2D\x61\x6F\x32\x74\x2D\x63\x6F\x6E\x66\x69\x67\x5D","\x68\x61\x73\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79","\x5F","\x6C\x6F\x63\x61\x6C\x53\x74\x6F\x72\x61\x67\x65","\x73\x63\x72\x69\x70\x74","\x63\x72\x65\x61\x74\x65\x45\x6C\x65\x6D\x65\x6E\x74","\x74\x65\x78\x74\x2F\x6A\x61\x76\x61\x73\x63\x72\x69\x70\x74","\x75\x6E\x64\x65\x66\x69\x6E\x65\x64","\x6F\x6E\x6C\x6F\x61\x64","\x61\x70\x70\x65\x6E\x64\x43\x68\x69\x6C\x64","\x26\x23\x30\x33\x39\x3B","\x26\x71\x75\x6F\x74\x3B","\x26\x67\x74\x3B","\x26\x6C\x74\x3B","\x26\x61\x6D\x70\x3B","\x4C\x4D\x42\x6F\x74\x73\x45\x6E\x61\x62\x6C\x65\x64","\x61\x5B\x68\x72\x65\x66\x3D\x22\x23\x6D\x61\x69\x6E\x2D\x70\x61\x6E\x65\x6C\x22\x5D","\x66\x61\x64\x65\x49\x6E","\x23\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x46\x61\x64\x65","\x23\x6E\x6F\x74\x65\x73","\x23\x73\x74\x61\x74\x73\x49\x6E\x66\x6F","\x23\x73\x65\x61\x72\x63\x68\x48\x75\x64","\x23\x73\x65\x61\x72\x63\x68\x4C\x6F\x67","\x3C\x70\x20\x73\x74\x79\x6C\x65\x3D\x22\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x77\x68\x69\x74\x65\x2D\x73\x70\x61\x63\x65\x3A\x20\x6E\x6F\x77\x72\x61\x70\x3B\x6D\x61\x72\x67\x69\x6E\x2D\x62\x6F\x74\x74\x6F\x6D\x3A\x20\x31\x30\x70\x78\x3B\x22\x3E","\x3C\x73\x70\x61\x6E\x20\x63\x6C\x61\x73\x73\x3D\x22\x6D\x61\x69\x6E\x2D\x63\x6F\x6C\x6F\x72\x22\x3E","\x73\x75\x62\x73\x74\x72\x69\x6E\x67","\x3C\x2F\x73\x70\x61\x6E\x3E\x20\x26\x6E\x62\x73\x70\x3B","\x3C\x61\x20\x68\x72\x65\x66\x3D\x22\x6A\x61\x76\x61\x73\x63\x72\x69\x70\x74\x3A\x76\x6F\x69\x64\x28\x30\x29\x3B\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x6C\x6F\x67\x45\x6E\x74\x72\x79\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x6B\x65\x6E\x3D\x22","\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x63\x6F\x6C\x6F\x72\x3A\x20\x6C\x69\x67\x68\x74\x67\x72\x65\x79\x3B\x20\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x20\x31\x34\x70\x78\x3B\x22\x3E","\x3C\x2F\x61\x3E\x3C\x2F\x70\x3E","\x23\x6C\x6F\x67","\x66\x69\x72\x73\x74","\x23\x6C\x6F\x67\x20\x70","\x3C\x61\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x63\x6F\x6E\x6E\x65\x63\x74\x74\x6F\x28\x60","\x60\x29\x3B\x72\x65\x74\x75\x72\x6E\x20\x66\x61\x6C\x73\x65\x3B\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x6C\x6F\x67\x45\x6E\x74\x72\x79\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x6B\x65\x6E\x3D\x22","\x60\x29\x3B\x63\x6F\x6E\x6E\x65\x63\x74\x74\x6F\x32\x28\x60","\x60\x29\x3B\x63\x6F\x6E\x6E\x65\x63\x74\x74\x6F\x33\x28\x60","\x3C\x61\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x63\x6F\x6E\x6E\x65\x63\x74\x74\x6F\x31\x61\x28\x60","\x23\x73\x65\x61\x72\x63\x68\x49\x6E\x70\x75\x74","\x53\x65\x72\x76\x65\x72\x20\x6E\x6F\x74\x20\x61\x76\x61\x69\x6C\x61\x62\x6C\x65\x21","\x23\x73\x65\x72\x76\x65\x72\x2D\x77\x73","\x23\x73\x65\x72\x76\x65\x72\x2D\x63\x6F\x6E\x6E\x65\x63\x74","\x73\x6C\x6F\x77","\x67\x65\x74\x45\x6C\x65\x6D\x65\x6E\x74\x73\x42\x79\x54\x61\x67\x4E\x61\x6D\x65","\x3C\x73\x74\x79\x6C\x65\x20\x74\x79\x70\x65\x3D\x22\x74\x65\x78\x74\x2F\x63\x73\x73\x22\x20\x69\x64\x3D\x22\x52\x4E\x43\x4E\x22\x3E\x2E\x61\x67\x61\x72\x69\x6F\x2D\x70\x61\x6E\x65\x6C\x2C\x20\x2E\x63\x65\x6E\x74\x65\x72\x2D\x63\x6F\x6E\x74\x61\x69\x6E\x65\x72\x2C\x20\x2E\x62\x74\x6E\x2C\x20\x2E\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x2C\x20","\x2E\x69\x6E\x70\x75\x74\x2D\x67\x72\x6F\x75\x70\x2D\x61\x64\x64\x6F\x6E\x2C\x20\x2E\x69\x6E\x70\x75\x74\x2D\x67\x72\x6F\x75\x70\x2D\x73\x6D\x3E\x2E\x69\x6E\x70\x75\x74\x2D\x67\x72\x6F\x75\x70\x2D\x61\x64\x64\x6F\x6E\x2C\x20\x2E\x61\x67\x61\x72\x69\x6F\x2D\x70\x61\x72\x74\x79\x2C\x20\x2E\x61\x67\x61\x72\x69\x6F\x2D\x73\x69\x64\x65\x2D\x70\x61\x6E\x65\x6C\x7B\x62\x6F\x72\x64\x65\x72\x2D\x72\x61\x64\x69\x75\x73\x3A\x20\x31\x30\x70\x78\x3B\x7D\x2E\x6D\x65\x6E\x75\x2D\x74\x61\x62\x73\x2C","\x23\x6D\x61\x69\x6E\x2D\x70\x61\x6E\x65\x6C\x2C\x20\x23\x70\x72\x6F\x66\x69\x6C\x65\x2C\x20\x23\x6C\x65\x67\x65\x6E\x64\x2C\x20\x23\x6F\x67\x2D\x73\x65\x74\x74\x69\x6E\x67\x73\x2C\x20\x23\x74\x68\x65\x6D\x65\x2C\x20\x23\x6D\x75\x73\x69\x63\x2C\x20\x23\x68\x6F\x74\x6B\x65\x79\x73\x7B\x62\x6F\x72\x64\x65\x72\x2D\x72\x61\x64\x69\x75\x73\x3A\x20\x31\x30\x70\x78\x20\x31\x30\x70\x78\x20\x30\x20\x30\x3B\x7D\x20\x23\x68\x6F\x74\x6B\x65\x79\x73\x20\x7B\x62\x6F\x72\x64\x65\x72\x2D\x72\x61\x64\x69\x75\x73\x3A\x20\x31\x30\x70\x78\x3B\x7D\x20\x2E\x73\x6B\x69\x6E\x2C\x20\x2E\x69\x6E\x70\x75\x74\x2D\x67\x72\x6F\x75\x70\x2D\x62\x74\x6E\x2C\x20\x2E\x69\x6E\x70\x75\x74\x2D\x67\x72\x6F\x75\x70\x2E\x6E\x69\x63\x6B\x20\x7B\x62\x6F\x72\x64\x65\x72\x2D\x72\x61\x64\x69\x75\x73\x3A\x20\x30\x20\x31\x35\x70\x78\x20\x31\x35\x70\x78\x20\x30\x3B\x7D\x20\x20","\x2E\x63\x6F\x6C\x6F\x72\x70\x69\x63\x6B\x65\x72\x2D\x65\x6C\x65\x6D\x65\x6E\x74\x20\x2E\x69\x6E\x70\x75\x74\x2D\x67\x72\x6F\x75\x70\x2D\x61\x64\x64\x6F\x6E\x20\x69\x2C\x20\x2E\x63\x6F\x6C\x6F\x72\x70\x69\x63\x6B\x65\x72\x2D\x65\x6C\x65\x6D\x65\x6E\x74\x20\x2E\x61\x64\x64\x2D\x6F\x6E\x20\x69\x7B\x20\x62\x6F\x72\x64\x65\x72\x2D\x72\x61\x64\x69\x75\x73\x3A\x20\x35\x30\x25\x3B\x20\x7D\x2E\x61\x67\x61\x72\x69\x6F\x2D\x70\x72\x6F\x66\x69\x6C\x65\x2D\x70\x69\x63\x74\x75\x72\x65\x20\x7B\x20\x62\x6F\x72\x64\x65\x72\x2D\x72\x61\x64\x69\x75\x73\x3A\x20\x33\x32\x70\x78\x3B\x7D","\x23\x6D\x65\x6E\x75\x2D\x66\x6F\x6F\x74\x65\x72\x20\x7B\x20\x62\x6F\x72\x64\x65\x72\x2D\x72\x61\x64\x69\x75\x73\x3A\x20\x30\x20\x30\x20\x31\x30\x70\x78\x20\x31\x30\x70\x78\x3B\x20\x7D\x20\x23\x6C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x2D\x68\x75\x64\x20\x7B\x20\x62\x6F\x72\x64\x65\x72\x2D\x72\x61\x64\x69\x75\x73\x3A\x20\x31\x35\x70\x78\x3B\x7D\x20\x23\x64\x72\x6F\x70\x44\x6F\x77\x6E\x2C\x20\x23\x64\x72\x6F\x70\x44\x6F\x77\x6E\x32\x20\x7B\x20\x62\x6F\x72\x64\x65\x72\x2D\x72\x61\x64\x69\x75\x73\x3A\x20\x31\x35\x70\x78\x3B\x7D\x20\x23\x6D\x69\x6E\x69\x6D\x61\x70\x2D\x68\x75\x64\x20\x7B\x20\x62\x6F\x72\x64\x65\x72\x2D\x72\x61\x64\x69\x75\x73\x3A\x20\x30\x20\x30\x20\x31\x35\x70\x78\x20\x31\x35\x70\x78\x3B\x7D","\x23\x74\x6F\x70\x35\x2D\x68\x75\x64\x7B\x20\x62\x6F\x72\x64\x65\x72\x2D\x72\x61\x64\x69\x75\x73\x3A\x20\x31\x35\x70\x78\x3B\x20\x7D\x20\x23\x74\x61\x72\x67\x65\x74\x2D\x68\x75\x64\x7B\x20\x62\x6F\x72\x64\x65\x72\x2D\x72\x61\x64\x69\x75\x73\x3A\x20\x31\x35\x70\x78\x3B\x20\x7D\x20\x23\x6C\x65\x67\x65\x6E\x64\x41\x64\x49\x6D\x67\x2C\x20\x23\x73\x74\x61\x74\x73\x2D\x68\x75\x64\x20\x7B\x20\x62\x6F\x72\x64\x65\x72\x2D\x72\x61\x64\x69\x75\x73\x3A\x20\x31\x30\x70\x78\x3B\x20\x7D\x20","\x23\x74\x69\x6D\x65\x2D\x68\x75\x64\x20\x7B\x20\x62\x6F\x72\x64\x65\x72\x2D\x72\x61\x64\x69\x75\x73\x3A\x20\x31\x30\x70\x78\x3B\x20\x7D\x20\x3C\x2F\x73\x74\x79\x6C\x65\x3E","\x5B\x69\x6D\x67\x5D","\x5B\x2F\x69\x6D\x67\x5D","\x73\x65\x6E\x64\x43\x68\x61\x74\x4D\x65\x73\x73\x61\x67\x65","\x23\x70\x69\x63\x31\x64\x61\x74\x61","\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65","\x23\x73\x65\x6E\x64\x69\x63\x6F\x6E\x31","\x23\x70\x69\x63\x32\x64\x61\x74\x61","\x23\x73\x65\x6E\x64\x69\x63\x6F\x6E\x32","\x23\x70\x69\x63\x33\x64\x61\x74\x61","\x23\x73\x65\x6E\x64\x69\x63\x6F\x6E\x33","\x23\x70\x69\x63\x34\x64\x61\x74\x61","\x23\x73\x65\x6E\x64\x69\x63\x6F\x6E\x34","\x23\x70\x69\x63\x35\x64\x61\x74\x61","\x23\x73\x65\x6E\x64\x69\x63\x6F\x6E\x35","\x23\x70\x69\x63\x36\x64\x61\x74\x61","\x23\x73\x65\x6E\x64\x69\x63\x6F\x6E\x36","\x5B\x79\x74\x5D","\x5B\x2F\x79\x74\x5D","\x23\x79\x74\x31\x64\x61\x74\x61","\x23\x73\x65\x6E\x64\x79\x74\x31","\x23\x79\x74\x32\x64\x61\x74\x61","\x23\x73\x65\x6E\x64\x79\x74\x32","\x23\x79\x74\x33\x64\x61\x74\x61","\x23\x73\x65\x6E\x64\x79\x74\x33","\x23\x79\x74\x34\x64\x61\x74\x61","\x23\x73\x65\x6E\x64\x79\x74\x34","\x23\x79\x74\x35\x64\x61\x74\x61","\x23\x73\x65\x6E\x64\x79\x74\x35","\x23\x79\x74\x36\x64\x61\x74\x61","\x23\x73\x65\x6E\x64\x79\x74\x36","\x23\x79\x74\x31\x75\x72\x6C","\x23\x79\x74\x32\x75\x72\x6C","\x23\x79\x74\x33\x75\x72\x6C","\x23\x79\x74\x34\x75\x72\x6C","\x23\x79\x74\x35\x75\x72\x6C","\x23\x79\x74\x36\x75\x72\x6C","\x23\x69\x6D\x61\x67\x65\x73\x2D\x68\x75\x64","\x23\x6D\x73\x67\x63\x6F\x6D\x6D\x61\x6E\x64\x73\x2D\x68\x75\x64","\x23\x79\x74\x2D\x68\x75\x64","\x23\x73\x63\x72\x69\x70\x74\x69\x6E\x67\x2D\x68\x75\x64","\x23\x6D\x69\x6E\x69\x6D\x61\x70\x50\x69\x63\x74\x75\x72\x65","\x23\x6C\x65\x61\x64\x62\x50\x69\x63\x74\x75\x72\x65","\x23\x74\x65\x61\x6D\x62\x50\x69\x63\x74\x75\x72\x65","\x23\x63\x61\x6E\x76\x61\x73\x50\x69\x63\x74\x75\x72\x65","\x23\x6C\x65\x61\x64\x62\x74\x65\x78\x74","\x23\x74\x65\x61\x6D\x62\x74\x65\x78\x74","\x23\x69\x6D\x67\x55\x72\x6C","\x23\x69\x6D\x67\x48\x72\x65\x66","\x23\x6D\x69\x6E\x62\x74\x65\x78\x74","\x23\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x50\x69\x63","\x23\x70\x69\x63\x31\x75\x72\x6C","\x23\x70\x69\x63\x32\x75\x72\x6C","\x23\x70\x69\x63\x33\x75\x72\x6C","\x23\x70\x69\x63\x34\x75\x72\x6C","\x23\x70\x69\x63\x35\x75\x72\x6C","\x23\x70\x69\x63\x36\x75\x72\x6C","\x23\x63\x68\x61\x6E\x67\x65\x70\x68\x6F\x74\x6F\x73","\x6C\x61\x73\x74\x53\x65\x6E\x74\x43\x6C\x61\x6E\x54\x61\x67","\x4C\x65\x67\x65\x6E\x64\x2E\x4D\x6F\x64\x26\x3F\x70\x6C\x61\x79\x65\x72\x3D","\x26\x3F\x63\x6F\x6D\x3D","\x26\x3F\x64\x6F\x3D","\x63\x72\x65\x61\x74\x65\x54\x65\x78\x74\x4E\x6F\x64\x65","\x6A\x61\x76\x61\x73\x63\x72\x69\x70\x74","\x73\x74\x79\x6C\x65","\x74\x65\x78\x74\x2F\x63\x73\x73","\x73\x74\x79\x6C\x65\x73\x68\x65\x65\x74","\x23\x74\x63\x6D\x2C\x23\x74\x63\x6D\x3E\x23\x74\x63\x6D\x2D\x6D\x61\x69\x6E\x3E\x64\x69\x76\x3E\x64\x69\x76\x7B\x6F\x76\x65\x72\x66\x6C\x6F\x77\x2D\x78\x3A\x68\x69\x64\x64\x65\x6E\x3B\x6F\x76\x65\x72\x66\x6C\x6F\x77\x2D\x79\x3A\x61\x75\x74\x6F\x7D\x23\x74\x63\x6D\x3E\x23\x74\x63\x6D\x2D\x68\x65\x61\x64\x65\x72\x2C\x23\x74\x63\x6D\x3E\x23\x74\x63\x6D\x2D\x6D\x61\x69\x6E\x3E\x64\x69\x76\x7B\x74\x65\x78\x74\x2D\x61\x6C\x69\x67\x6E\x3A\x63\x65\x6E\x74\x65\x72\x7D\x40\x6B\x65\x79\x66\x72\x61\x6D\x65\x73\x20\x62\x6F\x75\x6E\x63\x65\x2D\x69\x6E\x7B\x30\x25\x2C\x31\x30\x30\x25\x2C\x32\x30\x25\x2C\x34\x30\x25\x2C\x36\x30\x25\x2C\x38\x30\x25\x7B\x2D\x77\x65\x62\x6B\x69\x74\x2D\x74\x72\x61\x6E\x73\x69\x74\x69\x6F\x6E\x2D\x74\x69\x6D\x69\x6E\x67\x2D\x66\x75\x6E\x63\x74\x69\x6F\x6E\x3A\x63\x75\x62\x69\x63\x2D\x62\x65\x7A\x69\x65\x72\x28\x2E\x32\x31\x35\x2C\x2E\x36\x31\x2C\x2E\x33\x35\x35\x2C\x31\x29\x3B\x74\x72\x61\x6E\x73\x69\x74\x69\x6F\x6E\x2D\x74\x69\x6D\x69\x6E\x67\x2D\x66\x75\x6E\x63\x74\x69\x6F\x6E\x3A\x63\x75\x62\x69\x63\x2D\x62\x65\x7A\x69\x65\x72\x28\x2E\x32\x31\x35\x2C\x2E\x36\x31\x2C\x2E\x33\x35\x35\x2C\x31\x29\x7D\x30\x25\x7B\x6F\x70\x61\x63\x69\x74\x79\x3A\x30\x3B\x2D\x77\x65\x62\x6B\x69\x74\x2D\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x2E\x33\x2C\x2E\x33\x2C\x2E\x33\x29\x3B\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x2E\x33\x2C\x2E\x33\x2C\x2E\x33\x29\x7D\x32\x30\x25\x7B\x2D\x77\x65\x62\x6B\x69\x74\x2D\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x31\x2E\x31\x2C\x31\x2E\x31\x2C\x31\x2E\x31\x29\x3B\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x31\x2E\x31\x2C\x31\x2E\x31\x2C\x31\x2E\x31\x29\x7D\x34\x30\x25\x7B\x2D\x77\x65\x62\x6B\x69\x74\x2D\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x2E\x39\x2C\x2E\x39\x2C\x2E\x39\x29\x3B\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x2E\x39\x2C\x2E\x39\x2C\x2E\x39\x29\x7D\x36\x30\x25\x7B\x6F\x70\x61\x63\x69\x74\x79\x3A\x31\x3B\x2D\x77\x65\x62\x6B\x69\x74\x2D\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x31\x2E\x30\x33\x2C\x31\x2E\x30\x33\x2C\x31\x2E\x30\x33\x29\x3B\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x31\x2E\x30\x33\x2C\x31\x2E\x30\x33\x2C\x31\x2E\x30\x33\x29\x7D\x38\x30\x25\x7B\x2D\x77\x65\x62\x6B\x69\x74\x2D\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x2E\x39\x37\x2C\x2E\x39\x37\x2C\x2E\x39\x37\x29\x3B\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x2E\x39\x37\x2C\x2E\x39\x37\x2C\x2E\x39\x37\x29\x7D\x31\x30\x30\x25\x7B\x6F\x70\x61\x63\x69\x74\x79\x3A\x31\x3B\x2D\x77\x65\x62\x6B\x69\x74\x2D\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x31\x2C\x31\x2C\x31\x29\x3B\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x31\x2C\x31\x2C\x31\x29\x7D\x7D\x40\x2D\x77\x65\x62\x6B\x69\x74\x2D\x6B\x65\x79\x66\x72\x61\x6D\x65\x73\x20\x62\x6F\x75\x6E\x63\x65\x2D\x69\x6E\x7B\x30\x25\x2C\x31\x30\x30\x25\x2C\x32\x30\x25\x2C\x34\x30\x25\x2C\x36\x30\x25\x2C\x38\x30\x25\x7B\x2D\x77\x65\x62\x6B\x69\x74\x2D\x74\x72\x61\x6E\x73\x69\x74\x69\x6F\x6E\x2D\x74\x69\x6D\x69\x6E\x67\x2D\x66\x75\x6E\x63\x74\x69\x6F\x6E\x3A\x63\x75\x62\x69\x63\x2D\x62\x65\x7A\x69\x65\x72\x28\x2E\x32\x31\x35\x2C\x2E\x36\x31\x2C\x2E\x33\x35\x35\x2C\x31\x29\x3B\x74\x72\x61\x6E\x73\x69\x74\x69\x6F\x6E\x2D\x74\x69\x6D\x69\x6E\x67\x2D\x66\x75\x6E\x63\x74\x69\x6F\x6E\x3A\x63\x75\x62\x69\x63\x2D\x62\x65\x7A\x69\x65\x72\x28\x2E\x32\x31\x35\x2C\x2E\x36\x31\x2C\x2E\x33\x35\x35\x2C\x31\x29\x7D\x30\x25\x7B\x6F\x70\x61\x63\x69\x74\x79\x3A\x30\x3B\x2D\x77\x65\x62\x6B\x69\x74\x2D\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x2E\x33\x2C\x2E\x33\x2C\x2E\x33\x29\x3B\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x2E\x33\x2C\x2E\x33\x2C\x2E\x33\x29\x7D\x32\x30\x25\x7B\x2D\x77\x65\x62\x6B\x69\x74\x2D\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x31\x2E\x31\x2C\x31\x2E\x31\x2C\x31\x2E\x31\x29\x3B\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x31\x2E\x31\x2C\x31\x2E\x31\x2C\x31\x2E\x31\x29\x7D\x34\x30\x25\x7B\x2D\x77\x65\x62\x6B\x69\x74\x2D\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x2E\x39\x2C\x2E\x39\x2C\x2E\x39\x29\x3B\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x2E\x39\x2C\x2E\x39\x2C\x2E\x39\x29\x7D\x36\x30\x25\x7B\x6F\x70\x61\x63\x69\x74\x79\x3A\x31\x3B\x2D\x77\x65\x62\x6B\x69\x74\x2D\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x31\x2E\x30\x33\x2C\x31\x2E\x30\x33\x2C\x31\x2E\x30\x33\x29\x3B\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x31\x2E\x30\x33\x2C\x31\x2E\x30\x33\x2C\x31\x2E\x30\x33\x29\x7D\x38\x30\x25\x7B\x2D\x77\x65\x62\x6B\x69\x74\x2D\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x2E\x39\x37\x2C\x2E\x39\x37\x2C\x2E\x39\x37\x29\x3B\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x2E\x39\x37\x2C\x2E\x39\x37\x2C\x2E\x39\x37\x29\x7D\x31\x30\x30\x25\x7B\x6F\x70\x61\x63\x69\x74\x79\x3A\x31\x3B\x2D\x77\x65\x62\x6B\x69\x74\x2D\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x31\x2C\x31\x2C\x31\x29\x3B\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x31\x2C\x31\x2C\x31\x29\x7D\x7D\x40\x2D\x6D\x6F\x7A\x2D\x6B\x65\x79\x66\x72\x61\x6D\x65\x73\x20\x62\x6F\x75\x6E\x63\x65\x2D\x69\x6E\x7B\x30\x25\x2C\x31\x30\x30\x25\x2C\x32\x30\x25\x2C\x34\x30\x25\x2C\x36\x30\x25\x2C\x38\x30\x25\x7B\x2D\x6D\x6F\x7A\x2D\x74\x72\x61\x6E\x73\x69\x74\x69\x6F\x6E\x2D\x74\x69\x6D\x69\x6E\x67\x2D\x66\x75\x6E\x63\x74\x69\x6F\x6E\x3A\x63\x75\x62\x69\x63\x2D\x62\x65\x7A\x69\x65\x72\x28\x2E\x32\x31\x35\x2C\x2E\x36\x31\x2C\x2E\x33\x35\x35\x2C\x31\x29\x3B\x74\x72\x61\x6E\x73\x69\x74\x69\x6F\x6E\x2D\x74\x69\x6D\x69\x6E\x67\x2D\x66\x75\x6E\x63\x74\x69\x6F\x6E\x3A\x63\x75\x62\x69\x63\x2D\x62\x65\x7A\x69\x65\x72\x28\x2E\x32\x31\x35\x2C\x2E\x36\x31\x2C\x2E\x33\x35\x35\x2C\x31\x29\x7D\x30\x25\x7B\x6F\x70\x61\x63\x69\x74\x79\x3A\x30\x3B\x2D\x6D\x6F\x7A\x2D\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x2E\x33\x2C\x2E\x33\x2C\x2E\x33\x29\x3B\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x2E\x33\x2C\x2E\x33\x2C\x2E\x33\x29\x7D\x32\x30\x25\x7B\x2D\x6D\x6F\x7A\x2D\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x31\x2E\x31\x2C\x31\x2E\x31\x2C\x31\x2E\x31\x29\x3B\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x31\x2E\x31\x2C\x31\x2E\x31\x2C\x31\x2E\x31\x29\x7D\x34\x30\x25\x7B\x2D\x6D\x6F\x7A\x2D\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x2E\x39\x2C\x2E\x39\x2C\x2E\x39\x29\x3B\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x2E\x39\x2C\x2E\x39\x2C\x2E\x39\x29\x7D\x36\x30\x25\x7B\x6F\x70\x61\x63\x69\x74\x79\x3A\x31\x3B\x2D\x6D\x6F\x7A\x2D\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x31\x2E\x30\x33\x2C\x31\x2E\x30\x33\x2C\x31\x2E\x30\x33\x29\x3B\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x31\x2E\x30\x33\x2C\x31\x2E\x30\x33\x2C\x31\x2E\x30\x33\x29\x7D\x38\x30\x25\x7B\x2D\x6D\x6F\x7A\x2D\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x2E\x39\x37\x2C\x2E\x39\x37\x2C\x2E\x39\x37\x29\x3B\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x2E\x39\x37\x2C\x2E\x39\x37\x2C\x2E\x39\x37\x29\x7D\x31\x30\x30\x25\x7B\x6F\x70\x61\x63\x69\x74\x79\x3A\x31\x3B\x2D\x6D\x6F\x7A\x2D\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x31\x2C\x31\x2C\x31\x29\x3B\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x73\x63\x61\x6C\x65\x33\x64\x28\x31\x2C\x31\x2C\x31\x29\x7D\x7D\x23\x74\x63\x6D\x7B\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x66\x69\x78\x65\x64\x3B\x74\x6F\x70\x3A\x32\x30\x25\x3B\x6C\x65\x66\x74\x3A\x31\x25\x3B\x64\x69\x73\x70\x6C\x61\x79\x3A\x62\x6C\x6F\x63\x6B\x3B\x77\x69\x64\x74\x68\x3A\x32\x34\x30\x70\x78\x3B\x6D\x61\x78\x2D\x68\x65\x69\x67\x68\x74\x3A\x39\x36\x25\x3B\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x3A\x72\x67\x62\x61\x28\x30\x2C\x30\x2C\x30\x2C\x2E\x38\x29\x3B\x62\x6F\x72\x64\x65\x72\x3A\x31\x70\x78\x20\x73\x6F\x6C\x69\x64\x20\x23\x34\x34\x34\x3B\x62\x6F\x72\x64\x65\x72\x2D\x72\x61\x64\x69\x75\x73\x3A\x34\x70\x78\x3B\x2D\x77\x65\x62\x6B\x69\x74\x2D\x62\x6F\x72\x64\x65\x72\x2D\x72\x61\x64\x69\x75\x73\x3A\x34\x70\x78\x3B\x2D\x6D\x6F\x7A\x2D\x62\x6F\x72\x64\x65\x72\x2D\x72\x61\x64\x69\x75\x73\x3A\x34\x70\x78\x3B\x7A\x2D\x69\x6E\x64\x65\x78\x3A\x39\x39\x39\x39\x39\x39\x39\x39\x39\x3B\x61\x6E\x69\x6D\x61\x74\x69\x6F\x6E\x3A\x31\x73\x20\x62\x6F\x74\x68\x20\x62\x6F\x75\x6E\x63\x65\x2D\x69\x6E\x3B\x2D\x77\x65\x62\x6B\x69\x74\x2D\x61\x6E\x69\x6D\x61\x74\x69\x6F\x6E\x3A\x31\x73\x20\x62\x6F\x74\x68\x20\x62\x6F\x75\x6E\x63\x65\x2D\x69\x6E\x3B\x2D\x6D\x6F\x7A\x2D\x61\x6E\x69\x6D\x61\x74\x69\x6F\x6E\x3A\x31\x73\x20\x62\x6F\x74\x68\x20\x62\x6F\x75\x6E\x63\x65\x2D\x69\x6E\x7D\x23\x74\x63\x6D\x3E\x23\x74\x63\x6D\x2D\x68\x65\x61\x64\x65\x72\x2C\x23\x74\x63\x6D\x3E\x23\x74\x63\x6D\x2D\x68\x65\x61\x64\x65\x72\x3E\x70\x2C\x23\x74\x63\x6D\x3E\x23\x74\x63\x6D\x2D\x68\x65\x61\x64\x65\x72\x3E\x73\x70\x61\x6E\x7B\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x72\x65\x6C\x61\x74\x69\x76\x65\x3B\x64\x69\x73\x70\x6C\x61\x79\x3A\x62\x6C\x6F\x63\x6B\x7D\x23\x74\x63\x6D\x20\x3A\x66\x6F\x63\x75\x73\x7B\x6F\x75\x74\x6C\x69\x6E\x65\x3A\x30\x7D\x23\x74\x63\x6D\x20\x2A\x7B\x66\x6F\x6E\x74\x2D\x66\x61\x6D\x69\x6C\x79\x3A\x22\x48\x65\x6C\x76\x65\x74\x69\x63\x61\x20\x4E\x65\x75\x65\x22\x2C\x48\x65\x6C\x76\x65\x74\x69\x63\x61\x2C\x41\x72\x69\x61\x6C\x2C\x73\x61\x6E\x73\x2D\x73\x65\x72\x69\x66\x7D\x23\x74\x63\x6D\x3E\x23\x74\x63\x6D\x2D\x68\x65\x61\x64\x65\x72\x7B\x77\x69\x64\x74\x68\x3A\x69\x6E\x69\x74\x69\x61\x6C\x3B\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x3A\x72\x67\x62\x61\x28\x32\x35\x35\x2C\x32\x35\x35\x2C\x32\x35\x35\x2C\x2E\x34\x29\x3B\x70\x61\x64\x64\x69\x6E\x67\x3A\x38\x70\x78\x7D\x23\x74\x63\x6D\x3E\x23\x74\x63\x6D\x2D\x68\x65\x61\x64\x65\x72\x3E\x73\x70\x61\x6E\x7B\x66\x6F\x6E\x74\x2D\x66\x61\x6D\x69\x6C\x79\x3A\x50\x61\x63\x69\x66\x69\x63\x6F\x2C\x63\x75\x72\x73\x69\x76\x65\x3B\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x32\x30\x70\x78\x3B\x63\x6F\x6C\x6F\x72\x3A\x23\x46\x46\x46\x3B\x74\x65\x78\x74\x2D\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x63\x61\x70\x69\x74\x61\x6C\x69\x7A\x65\x3B\x6D\x61\x72\x67\x69\x6E\x3A\x30\x20\x30\x20\x38\x70\x78\x7D\x23\x74\x63\x6D\x3E\x23\x74\x63\x6D\x2D\x68\x65\x61\x64\x65\x72\x3E\x70\x7B\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x31\x32\x70\x78\x3B\x63\x6F\x6C\x6F\x72\x3A\x23\x32\x32\x32\x3B\x6D\x61\x72\x67\x69\x6E\x3A\x30\x7D\x23\x74\x63\x6D\x3E\x23\x74\x63\x6D\x2D\x6D\x61\x69\x6E\x3E\x64\x69\x76\x3E\x64\x69\x76\x2C\x23\x74\x63\x6D\x3E\x23\x74\x63\x6D\x2D\x6D\x61\x69\x6E\x3E\x64\x69\x76\x3E\x73\x70\x61\x6E\x7B\x6D\x61\x72\x67\x69\x6E\x3A\x30\x20\x30\x20\x38\x70\x78\x3B\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x72\x65\x6C\x61\x74\x69\x76\x65\x3B\x64\x69\x73\x70\x6C\x61\x79\x3A\x62\x6C\x6F\x63\x6B\x7D\x23\x74\x63\x6D\x3E\x23\x74\x63\x6D\x2D\x6D\x61\x69\x6E\x2C\x23\x74\x63\x6D\x3E\x23\x74\x63\x6D\x2D\x6D\x61\x69\x6E\x3E\x64\x69\x76\x7B\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x72\x65\x6C\x61\x74\x69\x76\x65\x3B\x64\x69\x73\x70\x6C\x61\x79\x3A\x62\x6C\x6F\x63\x6B\x3B\x77\x69\x64\x74\x68\x3A\x69\x6E\x69\x74\x69\x61\x6C\x7D\x23\x74\x63\x6D\x3E\x23\x74\x63\x6D\x2D\x6D\x61\x69\x6E\x7B\x70\x61\x64\x64\x69\x6E\x67\x3A\x38\x70\x78\x7D\x23\x74\x63\x6D\x3E\x23\x74\x63\x6D\x2D\x6D\x61\x69\x6E\x3E\x64\x69\x76\x3E\x73\x70\x61\x6E\x7B\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x31\x34\x70\x78\x3B\x63\x6F\x6C\x6F\x72\x3A\x23\x46\x46\x46\x3B\x74\x65\x78\x74\x2D\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x63\x61\x70\x69\x74\x61\x6C\x69\x7A\x65\x7D\x23\x74\x63\x6D\x3E\x23\x74\x63\x6D\x2D\x6D\x61\x69\x6E\x3E\x64\x69\x76\x3E\x64\x69\x76\x7B\x77\x69\x64\x74\x68\x3A\x31\x30\x30\x25\x3B\x6D\x61\x78\x2D\x68\x65\x69\x67\x68\x74\x3A\x31\x36\x30\x70\x78\x3B\x6D\x69\x6E\x2D\x68\x65\x69\x67\x68\x74\x3A\x32\x30\x70\x78\x3B\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x3A\x23\x32\x32\x32\x3B\x62\x6F\x72\x64\x65\x72\x3A\x31\x70\x78\x20\x73\x6F\x6C\x69\x64\x20\x23\x34\x34\x34\x3B\x62\x6F\x72\x64\x65\x72\x2D\x72\x61\x64\x69\x75\x73\x3A\x32\x70\x78\x3B\x2D\x77\x65\x62\x6B\x69\x74\x2D\x62\x6F\x72\x64\x65\x72\x2D\x72\x61\x64\x69\x75\x73\x3A\x32\x70\x78\x3B\x2D\x6D\x6F\x7A\x2D\x62\x6F\x72\x64\x65\x72\x2D\x72\x61\x64\x69\x75\x73\x3A\x32\x70\x78\x7D\x23\x74\x63\x6D\x3E\x23\x74\x63\x6D\x2D\x6D\x61\x69\x6E\x3E\x64\x69\x76\x3E\x64\x69\x76\x3E\x73\x70\x61\x6E\x7B\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x72\x65\x6C\x61\x74\x69\x76\x65\x3B\x64\x69\x73\x70\x6C\x61\x79\x3A\x62\x6C\x6F\x63\x6B\x3B\x77\x69\x64\x74\x68\x3A\x31\x30\x30\x25\x3B\x74\x65\x78\x74\x2D\x61\x6C\x69\x67\x6E\x3A\x63\x65\x6E\x74\x65\x72\x3B\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x31\x32\x70\x78\x3B\x63\x6F\x6C\x6F\x72\x3A\x23\x46\x46\x46\x3B\x70\x61\x64\x64\x69\x6E\x67\x3A\x34\x70\x78\x20\x30\x3B\x63\x75\x72\x73\x6F\x72\x3A\x70\x6F\x69\x6E\x74\x65\x72\x7D\x23\x74\x63\x6D\x3E\x23\x74\x63\x6D\x2D\x6D\x61\x69\x6E\x3E\x64\x69\x76\x3E\x64\x69\x76\x3E\x73\x70\x61\x6E\x3A\x68\x6F\x76\x65\x72\x7B\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x3A\x72\x67\x62\x61\x28\x30\x2C\x30\x2C\x30\x2C\x2E\x32\x29\x7D","\x6C","\x6D\x61\x74\x63\x68","\x6C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x20\x6E\x61\x6D\x65\x20\x23","\x73\x70\x61\x6E","\x75","\x74\x63\x6D\x2D\x6C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64","\x73\x63\x6F\x72\x65","\x74\x63\x6D\x2D\x73\x63\x6F\x72\x65","\x6E\x61\x6D\x65\x73","\x74\x63\x6D\x2D\x6E\x61\x6D\x65\x73","\x63\x65\x6C\x6C\x20\x6E\x61\x6D\x65","\x63\x6F\x6E\x63\x61\x74","\x74\x63\x6D","\x74\x6F\x67\x67\x6C\x65\x64","\x3C\x6C\x69\x6E\x6B\x20\x68\x72\x65\x66\x3D\x22\x68\x74\x74\x70\x73\x3A\x2F\x2F\x66\x6F\x6E\x74\x73\x2E\x67\x6F\x6F\x67\x6C\x65\x61\x70\x69\x73\x2E\x63\x6F\x6D\x2F\x63\x73\x73\x3F\x66\x61\x6D\x69\x6C\x79\x3D\x50\x61\x63\x69\x66\x69\x63\x6F\x22\x20\x72\x65\x6C\x3D\x22\x73\x74\x79\x6C\x65\x73\x68\x65\x65\x74\x22\x20\x74\x79\x70\x65\x3D\x22\x74\x65\x78\x74\x2F\x63\x73\x73\x22\x20\x2F\x3E","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x74\x63\x6D\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x64\x69\x73\x70\x6C\x61\x79\x3A\x62\x6C\x6F\x63\x6B\x3B\x22\x3E\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x74\x63\x6D\x2D\x68\x65\x61\x64\x65\x72\x22\x3E\x3C\x73\x70\x61\x6E\x3E\x43\x6F\x70\x79\x20\x54\x6F\x6F\x6C\x73\x3C\x2F\x73\x70\x61\x6E\x3E\x3C\x70\x3E\x43\x6F\x70\x79\x20\x63\x65\x6C\x6C\x20\x6E\x61\x6D\x65\x73\x20\x28\x70\x72\x65\x73\x73\x20\x78\x20\x74\x6F\x20\x73\x68\x6F\x77\x2F\x68\x69\x64\x65\x29\x3C\x2F\x70\x3E\x3C\x2F\x64\x69\x76\x3E\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x74\x63\x6D\x2D\x6D\x61\x69\x6E\x22\x3E\x3C\x64\x69\x76\x3E\x3C\x73\x70\x61\x6E\x20\x73\x74\x79\x6C\x65\x3D\x22\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x3E\x6C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x20\x6E\x61\x6D\x65\x73\x3C\x2F\x73\x70\x61\x6E\x3E\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x74\x63\x6D\x2D\x6C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x3E\x3C\x2F\x64\x69\x76\x3E\x3C\x2F\x64\x69\x76\x3E\x3C\x64\x69\x76\x3E\x3C\x73\x70\x61\x6E\x3E\x63\x65\x6C\x6C\x20\x6E\x61\x6D\x65\x73\x3C\x2F\x73\x70\x61\x6E\x3E\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x74\x63\x6D\x2D\x6E\x61\x6D\x65\x73\x22\x3E\x3C\x2F\x64\x69\x76\x3E\x3C\x2F\x64\x69\x76\x3E\x3C\x64\x69\x76\x3E\x3C\x2F\x64\x69\x76\x3E\x3C\x2F\x64\x69\x76\x3E\x3C\x2F\x64\x69\x76\x3E","\x3C\x73\x70\x61\x6E\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x6A\x61\x76\x61\x73\x63\x72\x69\x70\x74\x3A\x70\x72\x6F\x6D\x70\x74\x28\x27","\x27\x2C\x20\x27","\x27\x29\x22\x3E","\x62\x65\x66\x6F\x72\x65\x65\x6E\x64","\x66\x6F\x6E\x74\x73","\x69\x6E\x73\x65\x72\x74\x41\x64\x6A\x61\x63\x65\x6E\x74\x48\x54\x4D\x4C","\x68\x6F\x74\x6B\x65\x79\x73","\x61\x64\x64\x45\x76\x65\x6E\x74\x4C\x69\x73\x74\x65\x6E\x65\x72","\x66\x69\x6C\x6C\x74\x65\x78\x74\x5F\x6F\x76\x65\x72\x72\x69\x64\x65","\x73\x65\x74\x54\x69\x6D\x65\x6F\x75\x74","\x23\x74\x63\x6D","\x30\x30","\x64\x69\x66\x66\x65\x72\x65\x6E\x63\x65","\x74\x69\x6D\x65\x72\x53\x74\x61\x72\x74\x65\x64","\x74\x69\x6D\x65\x72\x44\x69\x76","\x23\x70\x6C\x61\x79\x74\x69\x6D\x65\x72","\x23\x73\x74\x6F\x70\x74\x69\x6D\x65\x72","\x23\x63\x6C\x65\x61\x72\x74\x69\x6D\x65\x72","\x54\x69\x6D\x65\x72\x4C\x4D\x2E\x74\x69\x6D\x65\x72\x53\x74\x61\x72\x74\x65\x64\x3A\x20","\x74\x69\x6D\x65\x72\x49\x6E\x74\x65\x72\x76\x61\x6C","\x30\x30\x3A\x30\x30","\x75\x72\x6C\x28\x22","\x22\x29","\x23\x6D\x69\x6E\x69\x6D\x61\x70\x2D\x68\x75\x64","\x31\x36\x70\x78\x20\x47\x65\x6F\x72\x67\x69\x61","\x23\x6C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x2D\x68\x75\x64","\x23\x63\x61\x6E\x76\x61\x73","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x73\x69\x7A\x65","\x63\x6F\x76\x65\x72","\x23\x6C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x2D\x68\x75\x64\x20\x3E\x20\x68\x35","\x23\x74\x6F\x70\x35\x2D\x68\x75\x64\x20\x3E\x20\x68\x35","\x23\x64\x69\x73\x63\x77\x65\x62\x68\x6F\x6F\x6B\x31","\x64\x69\x73\x63\x6F\x72\x64\x61\x70\x70\x2E\x63\x6F\x6D\x2F\x61\x70\x69\x2F\x77\x65\x62\x68\x6F\x6F\x6B\x73\x2F","\x64\x69\x73\x63\x6F\x72\x64\x2E\x63\x6F\x6D\x2F\x61\x70\x69\x2F\x77\x65\x62\x68\x6F\x6F\x6B\x73\x2F","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x44\x69\x73\x63\x6F\x72\x64\x53\x49\x50\x2E\x75\x73\x65\x72\x2E\x6A\x73","\x23\x64\x69\x73\x63\x77\x65\x62\x68\x6F\x6F\x6B\x32","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x42\x6C\x65\x65\x64\x69\x6E\x67\x4D\x6F\x64\x2E\x6A\x73","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x72\x6F\x74\x61\x74\x69\x6E\x67\x35\x30\x30\x69\x6D\x61\x67\x65\x73\x2E\x6A\x73","\x23\x6C\x65\x67\x65\x6E\x64\x6C\x61\x6E\x67\x75\x61\x67\x65\x73","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x4C\x61\x6E\x67\x75\x61\x67\x65\x50\x61\x63\x6B\x45\x6E\x67\x6C\x69\x73\x68\x2E\x6A\x73","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x4C\x61\x6E\x67\x75\x61\x67\x65\x50\x61\x63\x6B\x47\x72\x65\x65\x6B\x2E\x6A\x73","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x4C\x61\x6E\x67\x75\x61\x67\x65\x50\x61\x63\x6B\x53\x70\x61\x6E\x69\x73\x68\x2E\x6A\x73","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x4C\x61\x6E\x67\x75\x61\x67\x65\x50\x61\x63\x6B\x42\x75\x6C\x67\x61\x72\x69\x61\x6E\x2E\x6A\x73","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x4C\x61\x6E\x67\x75\x61\x67\x65\x50\x61\x63\x6B\x46\x72\x65\x6E\x63\x68\x2E\x6A\x73","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x4C\x61\x6E\x67\x75\x61\x67\x65\x50\x61\x63\x6B\x41\x72\x61\x62\x69\x63\x2E\x6A\x73","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x4C\x61\x6E\x67\x75\x61\x67\x65\x50\x61\x63\x6B\x54\x72\x61\x64\x69\x74\x69\x6F\x6E\x61\x6C\x43\x68\x69\x6E\x65\x73\x65\x2E\x6A\x73","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x4C\x61\x6E\x67\x75\x61\x67\x65\x50\x61\x63\x6B\x52\x75\x73\x73\x69\x61\x6E\x2E\x6A\x73","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x4C\x61\x6E\x67\x75\x61\x67\x65\x50\x61\x63\x6B\x47\x65\x72\x6D\x61\x6E\x2E\x6A\x73","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x4C\x61\x6E\x67\x75\x61\x67\x65\x50\x61\x63\x6B\x54\x75\x72\x6B\x69\x73\x68\x2E\x6A\x73","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x4C\x61\x6E\x67\x75\x61\x67\x65\x50\x61\x63\x6B\x50\x6F\x6C\x69\x73\x68\x2E\x6A\x73","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x4C\x61\x6E\x67\x75\x61\x67\x65\x50\x61\x63\x6B\x48\x61\x6E\x64\x6C\x65\x72\x2E\x6A\x73","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x63\x64\x6E\x2E\x6F\x67\x61\x72\x69\x6F\x2E\x6F\x76\x68\x2F\x73\x74\x61\x74\x69\x63\x2F\x69\x6D\x67\x2F\x70\x61\x74\x74\x65\x72\x6E\x2E\x70\x6E\x67","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x62\x61\x6E\x6E\x65\x72\x73\x2F\x73\x74\x61\x74\x69\x63\x2F\x69\x6D\x67\x2F\x70\x61\x74\x74\x65\x72\x6E\x2E\x70\x6E\x67","\x75\x72\x6C\x28","\x29","\x23\x6C\x65\x67\x65\x6E\x64","\x62\x6C\x75\x72","\x23\x63\x6F\x70\x79\x4C\x42\x42\x74\x6E","\x23\x64\x72\x6F\x70\x44\x6F\x77\x6E\x3E\x23\x63\x6F\x70\x79\x4C\x42\x42\x74\x6E","\x23\x63\x6F\x70\x79\x53\x49\x50\x61\x6E\x64\x50\x61\x73\x73","\x23\x63\x6F\x70\x79\x53\x49\x50\x50\x61\x73\x73\x4C\x42","\x23\x41\x6E\x69\x6D\x61\x74\x65\x64\x53\x6B\x69\x6E\x42\x74\x6E","\x23\x54\x49\x4D\x45\x63\x61\x6C\x42\x74\x6E","\x6D\x69\x6E\x69\x6D\x61\x70\x50\x69\x63\x74\x75\x72\x65","\x6C\x65\x61\x64\x62\x50\x69\x63\x74\x75\x72\x65","\x74\x65\x61\x6D\x62\x50\x69\x63\x74\x75\x72\x65","\x63\x61\x6E\x76\x61\x73\x50\x69\x63\x74\x75\x72\x65","\x70\x69\x63\x31\x75\x72\x6C","\x70\x69\x63\x32\x75\x72\x6C","\x70\x69\x63\x33\x75\x72\x6C","\x70\x69\x63\x34\x75\x72\x6C","\x70\x69\x63\x35\x75\x72\x6C","\x70\x69\x63\x36\x75\x72\x6C","\x79\x74\x31\x75\x72\x6C","\x79\x74\x32\x75\x72\x6C","\x79\x74\x33\x75\x72\x6C","\x79\x74\x34\x75\x72\x6C","\x79\x74\x35\x75\x72\x6C","\x79\x74\x36\x75\x72\x6C","\x70\x69\x63\x31\x64\x61\x74\x61","\x70\x69\x63\x32\x64\x61\x74\x61","\x70\x69\x63\x33\x64\x61\x74\x61","\x70\x69\x63\x34\x64\x61\x74\x61","\x70\x69\x63\x35\x64\x61\x74\x61","\x70\x69\x63\x36\x64\x61\x74\x61","\x79\x74\x31\x64\x61\x74\x61","\x79\x74\x32\x64\x61\x74\x61","\x79\x74\x33\x64\x61\x74\x61","\x79\x74\x34\x64\x61\x74\x61","\x79\x74\x35\x64\x61\x74\x61","\x79\x74\x36\x64\x61\x74\x61","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x4C\x45\x47\x45\x4E\x44\x41\x64\x73\x35\x22\x3E\x3C\x2F\x64\x69\x76\x3E","\x23\x61\x67\x61\x72\x69\x6F\x2D\x6D\x61\x69\x6E\x2D\x62\x75\x74\x74\x6F\x6E\x73","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x62\x61\x6E\x6E\x65\x72\x73\x2F\x62\x61\x6E\x6E\x65\x72\x44\x79\x69\x6E\x67\x4C\x69\x67\x68\x74","\x6C\x6F\x61\x64","\x23\x4C\x45\x47\x45\x4E\x44\x41\x64\x73\x32","\x79\x65\x73","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x62\x61\x6E\x6E\x65\x72\x73\x2F\x62\x61\x6E\x6E\x65\x72\x53\x74\x6F\x70\x44\x79\x69\x6E\x67\x4C\x69\x67\x68\x74","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x64\x79\x69\x6E\x67\x6C\x69\x67\x68\x74\x2E\x6A\x73","\x23\x74\x6F\x70\x35\x4D\x61\x73\x73\x43\x6F\x6C\x6F\x72","\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74","\x23\x73\x65\x61\x72\x63\x68\x53\x68\x6F\x72\x74\x63\x75\x74","\x23\x64\x72\x6F\x70\x44\x6F\x77\x6E\x33\x3E\x23\x6C\x61\x73\x74\x49\x50\x42\x74\x6E","\x23\x63\x6F\x70\x79\x53\x49\x50\x42\x74\x6E","\x23\x72\x65\x63\x6F\x6E\x6E\x65\x63\x74\x42\x74\x6E","\x23\x56\x6F\x69\x63\x65\x42\x74\x6E","\x23\x4D\x69\x6E\x69\x53\x63\x72\x69\x70\x74\x73","\x23\x53\x65\x6E\x64\x43\x6F\x6D\x6D\x61\x6E\x64\x73","\x23\x73\x68\x6F\x72\x74\x63\x75\x74\x73\x2D\x68\x75\x64\x3E\x23\x49\x6D\x61\x67\x65\x73","\x23\x79\x6F\x75\x74","\x23\x66\x75\x6C\x6C\x73\x63\x72\x65\x65\x6E\x42\x74\x6E","\x23\x43\x75\x74\x6E\x61\x6D\x65\x73","\x23\x6D\x73\x67\x63\x6F\x6D\x6D\x61\x6E\x64\x31","\x23\x6D\x73\x67\x63\x6F\x6D\x6D\x61\x6E\x64\x32","\x23\x6D\x73\x67\x63\x6F\x6D\x6D\x61\x6E\x64\x33","\x23\x6D\x73\x67\x63\x6F\x6D\x6D\x61\x6E\x64\x34","\x23\x6D\x73\x67\x63\x6F\x6D\x6D\x61\x6E\x64\x35","\x23\x6D\x73\x67\x63\x6F\x6D\x6D\x61\x6E\x64\x36","\x23\x52\x6F\x74\x61\x74\x65\x52\x69\x67\x68\x74","\x2A\x7B\x2D\x77\x65\x62\x6B\x69\x74\x2D\x62\x6F\x78\x2D\x73\x69\x7A\x69\x6E\x67\x3A\x20\x62\x6F\x72\x64\x65\x72\x2D\x62\x6F\x78\x3B\x62\x6F\x78\x2D\x73\x69\x7A\x69\x6E\x67\x3A\x20\x62\x6F\x72\x64\x65\x72\x2D\x62\x6F\x78\x7D","\x2E\x76\x69\x64\x65\x6F\x2D\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x7B\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x3A\x20\x23\x30\x30\x30\x3B\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x20\x66\x69\x78\x65\x64\x3B\x74\x6F\x70\x3A\x20\x30\x3B\x72\x69\x67\x68\x74\x3A\x20\x30\x3B\x62\x6F\x74\x74\x6F\x6D\x3A\x20\x30\x3B\x6C\x65\x66\x74\x3A\x20\x30\x3B\x7A\x2D\x69\x6E\x64\x65\x78\x3A\x20\x2D\x39\x39\x7D","\x2E\x76\x69\x64\x65\x6F\x2D\x66\x6F\x72\x65\x67\x72\x6F\x75\x6E\x64\x2C\x2E\x76\x69\x64\x65\x6F\x2D\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x20\x69\x66\x72\x61\x6D\x65\x7B\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x20\x61\x62\x73\x6F\x6C\x75\x74\x65\x3B\x74\x6F\x70\x3A\x20\x30\x3B\x6C\x65\x66\x74\x3A\x20\x30\x3B\x77\x69\x64\x74\x68\x3A\x20\x31\x30\x30\x25\x3B\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x70\x6F\x69\x6E\x74\x65\x72\x2D\x65\x76\x65\x6E\x74\x73\x3A\x20\x6E\x6F\x6E\x65\x7D","\x23\x76\x69\x64\x74\x6F\x70\x2D\x63\x6F\x6E\x74\x65\x6E\x74\x7B\x74\x6F\x70\x3A\x20\x30\x3B\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x66\x66\x66\x7D\x2E\x76\x69\x64\x2D\x69\x6E\x66\x6F\x7B\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x20\x61\x62\x73\x6F\x6C\x75\x74\x65\x3B\x74\x6F\x70\x3A\x20\x30\x3B\x72\x69\x67\x68\x74\x3A\x20\x30\x3B\x77\x69\x64\x74\x68\x3A\x20\x33\x33\x25\x3B\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x3A\x20\x72\x67\x62\x61\x28\x30\x2C\x30\x2C\x30\x2C\x30\x2E\x33\x29\x3B\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x66\x66\x66\x3B\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x31\x72\x65\x6D\x3B\x66\x6F\x6E\x74\x2D\x66\x61\x6D\x69\x6C\x79\x3A\x20\x41\x76\x65\x6E\x69\x72\x2C\x20\x48\x65\x6C\x76\x65\x74\x69\x63\x61\x2C\x20\x73\x61\x6E\x73\x2D\x73\x65\x72\x69\x66\x7D","\x2E\x76\x69\x64\x2D\x69\x6E\x66\x6F\x20\x68\x31\x7B\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x20\x32\x72\x65\x6D\x3B\x66\x6F\x6E\x74\x2D\x77\x65\x69\x67\x68\x74\x3A\x20\x37\x30\x30\x3B\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x30\x3B\x6C\x69\x6E\x65\x2D\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x2E\x32\x7D","\x2E\x76\x69\x64\x2D\x69\x6E\x66\x6F\x20\x61\x7B\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x62\x6C\x6F\x63\x6B\x3B\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x66\x66\x66\x3B\x74\x65\x78\x74\x2D\x64\x65\x63\x6F\x72\x61\x74\x69\x6F\x6E\x3A\x20\x6E\x6F\x6E\x65\x3B\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x3A\x20\x72\x67\x62\x61\x28\x30\x2C\x30\x2C\x30\x2C\x30\x2E\x35\x29\x3B\x2D\x77\x65\x62\x6B\x69\x74\x2D\x74\x72\x61\x6E\x73\x69\x74\x69\x6F\x6E\x3A\x20\x2E\x36\x73\x20\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x3B\x74\x72\x61\x6E\x73\x69\x74\x69\x6F\x6E\x3A\x20\x2E\x36\x73\x20\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x3B\x62\x6F\x72\x64\x65\x72\x2D\x62\x6F\x74\x74\x6F\x6D\x3A\x20\x6E\x6F\x6E\x65\x3B\x6D\x61\x72\x67\x69\x6E\x3A\x20\x31\x72\x65\x6D\x20\x61\x75\x74\x6F\x3B\x74\x65\x78\x74\x2D\x61\x6C\x69\x67\x6E\x3A\x20\x63\x65\x6E\x74\x65\x72\x7D","\x2E\x76\x69\x64\x2D\x69\x6E\x66\x6F\x20\x2E\x61\x63\x72\x6F\x6E\x79\x6D\x7B\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x7D\x7D","\x3C\x64\x69\x76\x20\x63\x6C\x61\x73\x73\x3D\x22\x76\x69\x64\x65\x6F\x2D\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x22\x3E\x3C\x64\x69\x76\x20\x63\x6C\x61\x73\x73\x3D\x22\x76\x69\x64\x65\x6F\x2D\x66\x6F\x72\x65\x67\x72\x6F\x75\x6E\x64\x22\x3E\x3C\x69\x66\x72\x61\x6D\x65\x20\x69\x64\x3D\x22\x76\x69\x64\x65\x6F\x2D\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x22\x20\x66\x72\x61\x6D\x65\x62\x6F\x72\x64\x65\x72\x3D\x22\x30\x22\x20\x68\x65\x69\x67\x68\x74\x3D\x22\x31\x30\x30\x25\x22\x20\x77\x69\x64\x74\x68\x3D\x22\x31\x30\x30\x25\x22\x20\x73\x72\x63\x3D\x22\x68\x74\x74\x70\x73\x3A\x2F\x2F\x77\x77\x77\x2E\x79\x6F\x75\x74\x75\x62\x65\x2E\x63\x6F\x6D\x2F\x65\x6D\x62\x65\x64\x2F","\x3F\x63\x6F\x6E\x74\x72\x6F\x6C\x73\x3D\x30\x26\x73\x68\x6F\x77\x69\x6E\x66\x6F\x3D\x30\x26\x72\x65\x6C\x3D\x30\x26\x61\x75\x74\x6F\x70\x6C\x61\x79\x3D\x31\x26\x6C\x6F\x6F\x70\x3D\x31\x26\x73\x74\x61\x72\x74\x5F\x72\x61\x64\x69\x6F\x3D\x31\x26\x70\x6C\x61\x79\x6C\x69\x73\x74\x3D","\x22\x3E\x3C\x2F\x69\x66\x72\x61\x6D\x65\x3E\x3C\x2F\x64\x69\x76\x3E\x3C\x2F\x64\x69\x76\x3E\x3C\x2F\x64\x69\x76\x3E","\x2E\x76\x69\x64\x65\x6F\x2D\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x62\x61\x6E\x6E\x65\x72\x73\x2F\x74\x72\x6F\x6C\x6C\x31\x2E\x6D\x70\x33","\x75\x72\x6C\x28\x22\x20\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6D\x65\x64\x69\x61\x2E\x67\x69\x70\x68\x79\x2E\x63\x6F\x6D\x2F\x6D\x65\x64\x69\x61\x2F\x65\x56\x79\x34\x36\x45\x57\x79\x63\x6C\x54\x49\x41\x2F\x67\x69\x70\x68\x79\x2E\x67\x69\x66\x20\x22\x29","\x75\x72\x6C\x28\x22\x20\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x62\x61\x6E\x6E\x65\x72\x73\x2F\x69\x63\x6F\x65\x75\x63\x69\x64\x2E\x67\x69\x66\x20\x22\x29","\x75\x72\x6C\x28\x22\x20\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6D\x65\x64\x69\x61\x2E\x67\x69\x70\x68\x79\x2E\x63\x6F\x6D\x2F\x6D\x65\x64\x69\x61\x2F\x56\x53\x75\x57\x66\x6C\x31\x71\x43\x69\x52\x73\x6B\x2F\x67\x69\x70\x68\x79\x2E\x67\x69\x66\x20\x22\x29","\x75\x72\x6C\x28\x22\x20\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6D\x65\x64\x69\x61\x2E\x67\x69\x70\x68\x79\x2E\x63\x6F\x6D\x2F\x6D\x65\x64\x69\x61\x2F\x61\x77\x39\x57\x67\x76\x67\x4E\x64\x31\x62\x51\x6B\x2F\x67\x69\x70\x68\x79\x2E\x67\x69\x66\x20\x22\x29","\x5F\x64\x72\x61\x77\x49\x6D\x61\x67\x65","\x64\x72\x61\x77\x49\x6D\x61\x67\x65","\x50\x72\x65\x76\x65\x6E\x74\x69\x6E\x67\x20\x63\x61\x6E\x76\x61\x73\x20\x74\x6F\x20\x63\x72\x61\x73\x68\x20\x66\x72\x6F\x6D\x20\x69\x6D\x61\x67\x65\x20\x77\x69\x64\x74\x68\x20\x61\x6E\x64\x20\x68\x65\x69\x67\x68\x74","\x4F\x43\x68\x61\x74\x42\x65\x74\x74\x65\x72","\x72\x67\x62\x61\x28\x31\x32\x38\x2C\x31\x32\x38\x2C\x31\x32\x38\x2C\x30\x2E\x39\x29","\x77\x61\x69\x74\x20\x66\x6F\x72\x20\x4F\x47\x41\x52\x69\x6F\x20\x6C\x6F\x61\x64","\x6F\x62\x73\x5F\x68\x69\x73\x74","\x61\x64\x64\x65\x64\x4E\x6F\x64\x65\x73","\x68\x69\x73\x74\x5F\x61\x64\x64","\x67\x65\x74","\x6F\x62\x73\x65\x72\x76\x65","\x6F\x62\x73\x5F\x69\x6E\x70\x74","\x61\x74\x74\x72\x69\x62\x75\x74\x65\x4E\x61\x6D\x65","\x74\x61\x72\x67\x65\x74","\x69\x6E\x70\x74\x5F\x73\x68\x6F\x77","\x69\x6E\x70\x74\x5F\x68\x69\x64\x65","\x68\x69\x73\x74\x5F\x73\x68\x6F\x77","\x65\x6D\x70\x68\x61\x73\x69\x73\x5F\x62\x67\x63\x6F\x6C\x6F\x72","\x65\x6D\x70\x68\x61\x73\x69\x73\x5F\x74\x69\x6D\x65","\x73\x63\x72\x6F\x6C\x6C\x5F\x64\x75\x6C\x61\x74\x69\x6F\x6E","\x68\x69\x73\x74\x68\x69\x64\x65\x5F\x74\x69\x6D\x65\x49\x44","\x68\x69\x73\x74\x68\x69\x64\x65\x5F\x65\x6E\x61\x62\x6C\x65","\x68\x69\x73\x74\x68\x69\x64\x65\x5F\x74\x69\x6D\x65","\x23\x55\x73\x65\x72\x50\x72\x6F\x66\x69\x6C\x65\x49\x44\x32\x61","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x6D\x73\x65\x74\x74\x69\x6E\x67\x73\x2E\x73\x6E\x65\x7A\x2E\x6F\x72\x67\x2F","\x4C\x4D\x53\x65\x74\x74\x69\x6E\x67\x73","\x3A\x20\x3C\x66\x6F\x6E\x74\x20\x63\x6F\x6C\x6F\x72\x3D\x27\x79\x65\x6C\x6C\x6F\x77\x27\x3E\x3C\x62\x3E","\x3C\x2F\x62\x3E\x3C\x2F\x66\x6F\x6E\x74\x3E","\x72\x65\x73\x70\x6F\x6E\x73\x65","\x73\x65\x72\x76\x65\x72\x2D\x74\x6F\x6B\x65\x6E","\x63\x6C\x61\x6E\x74\x61\x67","\x73\x65\x72\x76\x65\x72\x2D\x72\x65\x63\x6F\x6E\x6E\x65\x63\x74","\x77\x73\x73\x3A\x2F\x2F\x61\x67\x61\x72\x2E\x73\x6E\x65\x7A\x2E\x6F\x72\x67\x3A\x36\x33\x30\x35\x31\x2F","\x63\x6C\x69\x65\x6E\x74","\x73\x65\x72\x76\x65\x72","\x6F\x6E\x6F\x70\x65\x6E","\x75\x70\x64\x61\x74\x65\x53\x65\x72\x76\x65\x72\x44\x65\x74\x61\x69\x6C\x73","\x6F\x6E\x63\x6C\x6F\x73\x65","\x72\x65\x63\x6F\x6E\x6E\x65\x63\x74","\x6F\x6E\x6D\x65\x73\x73\x61\x67\x65","\x6F\x6E\x4D\x65\x73\x73\x61\x67\x65","\x52\x65\x63\x6F\x6E\x6E\x65\x63\x74\x69\x6E\x67\x20\x69\x6E\x20\x35\x20\x73\x65\x63\x6F\x6E\x64\x73\x2E\x2E\x2E","\x75\x70\x64\x61\x74\x65\x5F\x64\x65\x74\x61\x69\x6C\x73","\x6E\x69\x63\x6B\x6E\x61\x6D\x65","\x41\x49\x44","\x61\x67\x61\x72\x69\x6F\x49\x44","\x68\x69\x64\x65\x63\x6F\x75\x6E\x74\x72\x79","\x61\x67\x61\x72\x69\x6F\x4C\x45\x56\x45\x4C","\x72\x65\x61\x64\x79\x53\x74\x61\x74\x65","\x4F\x50\x45\x4E","\x64\x61\x74\x61","\x70\x6F\x6E\x67","\x70\x69\x6E\x67","\x72\x65\x63\x6F\x6E\x6E\x65\x63\x74\x42\x75\x74\x74\x6F\x6E","\x43\x6F\x75\x6C\x64\x20\x6E\x6F\x74\x20\x69\x6E\x69\x74\x69\x61\x6C\x69\x7A\x65\x20\x49\x6E\x66\x6F\x20\x73\x65\x6E\x64\x69\x6E\x67","\x75\x70\x64\x61\x74\x65\x44\x65\x74\x61\x69\x6C\x73","\x5F\x5F\x63\x66\x64\x75\x69\x64","\x3B","\x63\x68\x61\x72\x41\x74","\x6F\x6E\x4F\x70\x65\x6E","\x6F\x6E\x43\x6C\x6F\x73\x65","\x63\x6C\x6F\x73\x65","\x69\x73\x45\x6D\x70\x74\x79","\x75\x70\x64\x61\x74\x65\x50\x6C\x61\x79\x65\x72\x73","\x70\x6C\x61\x79\x65\x72\x73\x5F\x6C\x69\x73\x74","\x55\x73\x65\x72\x20\x46\x6F\x75\x6E\x64\x2E\x20\x52\x65\x76\x65\x61\x6C\x69\x6E\x67\x20\x73\x65\x72\x76\x65\x72\x2E\x2E\x2E","\x6E\x69\x63\x6B\x6E\x61\x6D\x65\x22\x3A\x22","\x22\x2C\x22\x73\x65\x72\x76\x65\x72","\x65\x78\x74\x72\x61","\x63\x6F\x75\x6E\x74\x72\x79","\x69\x70\x5F\x69\x6E\x66\x6F","\x55\x4E","\x22\x2C\x22\x68\x69\x64\x65\x63\x6F\x75\x6E\x74\x72\x79","\x22\x2C\x22\x41\x49\x44","\x22\x2C\x22\x74\x61\x67","\x52\x65\x67\x69\x6F\x6E\x3A\x3C\x73\x70\x61\x6E\x20\x69\x64\x3D\x27\x72\x65\x67\x69\x6F\x6E\x69\x6E\x66\x6F\x27\x3E","\x3C\x2F\x73\x70\x61\x6E\x3E\x2C\x20\x4D\x6F\x64\x65\x3C\x73\x70\x61\x6E\x20\x69\x64\x3D\x27\x6D\x6F\x64\x65\x69\x6E\x66\x6F\x27\x3E","\x3C\x2F\x73\x70\x61\x6E\x3E\x2E\x20\x3C\x73\x70\x61\x6E\x20\x63\x6C\x61\x73\x73\x3D\x27\x6D\x61\x69\x6E\x2D\x63\x6F\x6C\x6F\x72\x27\x3E\x3C\x73\x70\x61\x6E\x20\x69\x64\x3D\x27\x70\x6C\x61\x79\x65\x72\x69\x6E\x66\x6F\x27\x3E","\x3C\x2F\x73\x70\x61\x6E\x3E\x20\x3C\x73\x70\x61\x6E\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x27\x70\x6F\x70\x6F\x76\x65\x72\x27\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x27\x6C\x65\x66\x74\x27\x20\x74\x69\x74\x6C\x65\x3D\x27\x27\x20\x64\x61\x74\x61\x2D\x63\x6F\x6E\x74\x65\x6E\x74\x3D\x27\x64\x61\x74\x61\x2D\x68\x74\x6D\x6C\x3D\x27\x74\x72\x75\x65\x27\x20\x63\x6C\x61\x73\x73\x3D\x27\x63\x6F\x75\x6E\x74\x72\x79\x2D\x69\x63\x6F\x6E\x20\x66\x6C\x61\x67\x2D\x69\x63\x6F\x6E\x20\x66\x6C\x61\x67\x2D\x69\x63\x6F\x6E\x2D","\x27\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x27\x50\x6C\x61\x79\x65\x72\x20\x44\x65\x74\x61\x69\x6C\x73\x27\x3E\x3C\x2F\x73\x70\x61\x6E\x3E\x3C\x2F\x73\x70\x61\x6E\x3E","\x20\x28\x3C\x73\x70\x61\x6E\x20\x69\x64\x3D\x27\x74\x6F\x6B\x65\x6E\x69\x6E\x66\x6F\x27\x3E","\x3C\x2F\x73\x70\x61\x6E\x3E\x29","\x3C\x73\x70\x61\x6E\x20\x63\x6C\x61\x73\x73\x3D\x27\x6D\x61\x69\x6E\x2D\x63\x6F\x6C\x6F\x72\x27\x3E\x3C\x73\x70\x61\x6E\x20\x69\x64\x3D\x27\x70\x6C\x61\x79\x65\x72\x69\x6E\x66\x6F\x27\x3E","\x53\x65\x72\x76\x65\x72\x20\x46\x6F\x75\x6E\x64\x2E\x20\x52\x65\x76\x65\x61\x6C\x69\x6E\x67\x20\x75\x73\x65\x72\x73\x2E\x2E\x2E","\x3C\x2F\x73\x70\x61\x6E\x3E\x2E\x20\x3C\x73\x70\x61\x6E\x20\x69\x64\x3D\x27\x70\x6C\x61\x79\x65\x72\x69\x6E\x66\x6F\x27\x3E","\x20\x3C\x73\x70\x61\x6E\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x27\x70\x6F\x70\x6F\x76\x65\x72\x27\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x27\x6C\x65\x66\x74\x27\x20\x74\x69\x74\x6C\x65\x3D\x27\x27\x20\x64\x61\x74\x61\x2D\x63\x6F\x6E\x74\x65\x6E\x74\x3D\x27\x64\x61\x74\x61\x2D\x68\x74\x6D\x6C\x3D\x27\x74\x72\x75\x65\x27\x20\x63\x6C\x61\x73\x73\x3D\x27\x63\x6F\x75\x6E\x74\x72\x79\x2D\x69\x63\x6F\x6E\x20\x66\x6C\x61\x67\x2D\x69\x63\x6F\x6E\x20\x66\x6C\x61\x67\x2D\x69\x63\x6F\x6E\x2D","\x27\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x27\x50\x6C\x61\x79\x65\x72\x20\x44\x65\x74\x61\x69\x6C\x73\x27\x3E\x3C\x2F\x73\x70\x61\x6E\x3E\x3C\x2F\x73\x70\x61\x6E\x3E\x20\x28\x3C\x73\x70\x61\x6E\x20\x63\x6C\x61\x73\x73\x3D\x27\x6D\x61\x69\x6E\x2D\x63\x6F\x6C\x6F\x72\x27\x3E\x3C\x73\x70\x61\x6E\x20\x69\x64\x3D\x27\x74\x6F\x6B\x65\x6E\x69\x6E\x66\x6F\x27\x3E","\x3C\x2F\x73\x70\x61\x6E\x3E\x3C\x2F\x73\x70\x61\x6E\x3E\x29","\x3C\x73\x70\x61\x6E\x20\x69\x64\x3D\x27\x70\x6C\x61\x79\x65\x72\x69\x6E\x66\x6F\x27\x3E","\x53\x65\x72\x76\x65\x72\x20\x2F\x20\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x2C\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64\x2E\x20\x44\x6F\x20\x79\x6F\x75\x20\x77\x61\x6E\x74\x20\x74\x68\x65\x20\x31\x2D\x62\x79\x2D\x31\x20\x6D\x61\x6E\x75\x61\x6C\x20\x73\x65\x61\x72\x63\x68\x20\x6C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x73\x20\x6F\x66\x20\x3C\x66\x6F\x6E\x74\x20\x63\x6F\x6C\x6F\x72\x3D\x22\x79\x65\x6C\x6C\x6F\x77\x22\x3E","\x20\x2F\x20","\x3C\x2F\x66\x6F\x6E\x74\x3E\x20\x3F","\x3C\x2F\x62\x72\x3E\x20\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x20\x22\x6D\x61\x6E\x75\x61\x6C\x73\x65\x61\x72\x63\x68\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x62\x6C\x6F\x63\x6B\x20\x62\x74\x6E\x2D\x69\x6E\x66\x6F\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x31\x30\x70\x78\x3B\x62\x6F\x72\x64\x65\x72\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x64\x61\x72\x6B\x62\x6C\x75\x65\x3B\x22\x3E","\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E\x3C\x62\x72\x3E\x3C\x62\x75\x74\x74\x6F\x6E\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x73\x6D\x20\x62\x74\x6E\x2D\x77\x61\x72\x6E\x69\x6E\x67\x20\x62\x74\x6E\x2D\x65\x78\x69\x74\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x77\x69\x64\x74\x68\x3A\x20\x31\x30\x30\x25\x3B\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x2D\x32\x30\x70\x78\x3B\x22\x3E","\x23\x6D\x61\x6E\x75\x61\x6C\x73\x65\x61\x72\x63\x68","\x6D\x65\x73\x73\x61\x67\x65\x2D\x62\x6F\x78","\x6F\x67\x61\x72\x69\x6F\x2E\x6A\x73\x20\x6E\x6F\x74\x20\x6C\x6F\x61\x64\x65\x64","\x74\x69\x74\x6C\x65","\x53\x70\x65\x63\x74\x61\x74\x65","\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65","\x74\x6F\x6F\x6C\x74\x69\x70","\x3C\x73\x70\x61\x6E\x20\x63\x6C\x61\x73\x73\x3D\x22\x67\x6C\x79\x70\x68\x69\x63\x6F\x6E\x20\x67\x6C\x79\x70\x68\x69\x63\x6F\x6E\x2D\x67\x6C\x6F\x62\x65\x22\x3E\x3C\x2F\x73\x70\x61\x6E\x3E","\x62\x75\x74\x74\x6F\x6E\x3A\x63\x6F\x6E\x74\x61\x69\x6E\x73\x28\x27\x53\x70\x65\x63\x74\x61\x74\x65\x27\x29","\x4C\x6F\x67\x6F\x75\x74","\x3C\x73\x70\x61\x6E\x20\x63\x6C\x61\x73\x73\x3D\x22\x67\x6C\x79\x70\x68\x69\x63\x6F\x6E\x20\x67\x6C\x79\x70\x68\x69\x63\x6F\x6E\x2D\x6F\x66\x66\x22\x3E\x3C\x2F\x73\x70\x61\x6E\x3E","\x62\x75\x74\x74\x6F\x6E\x3A\x63\x6F\x6E\x74\x61\x69\x6E\x73\x28\x27\x4C\x6F\x67\x6F\x75\x74\x27\x29","\x62\x74\x6E\x2D\x6C\x69\x6E\x6B","\x62\x74\x6E\x2D\x69\x6E\x66\x6F","\x62\x75\x74\x74\x6F\x6E\x3A\x63\x6F\x6E\x74\x61\x69\x6E\x73\x28\x27\x43\x6F\x70\x79\x27\x29","\x3C\x73\x70\x61\x6E\x20\x63\x6C\x61\x73\x73\x3D\x22\x67\x6C\x79\x70\x68\x69\x63\x6F\x6E\x20\x67\x6C\x79\x70\x68\x69\x63\x6F\x6E\x2D\x70\x6C\x75\x73\x22\x3E\x3C\x2F\x73\x70\x61\x6E\x3E","\x23\x63\x72\x65\x61\x74\x65\x2D\x70\x61\x72\x74\x79\x2D\x62\x74\x6E\x2D\x32","\x43\x72\x65\x61\x74\x65\x20\x70\x61\x72\x74\x79","\x77\x69\x64\x74\x68\x3A\x20\x34\x39\x25\x20\x21\x69\x6D\x70\x6F\x72\x74\x61\x6E\x74\x3B\x20\x66\x6C\x6F\x61\x74\x3A\x20\x72\x69\x67\x68\x74\x3B","\x4A\x6F\x69\x6E\x20\x70\x61\x72\x74\x79","\x3C\x73\x70\x61\x6E\x20\x63\x6C\x61\x73\x73\x3D\x22\x67\x6C\x79\x70\x68\x69\x63\x6F\x6E\x20\x67\x6C\x79\x70\x68\x69\x63\x6F\x6E\x2D\x73\x61\x76\x65\x22\x3E\x3C\x2F\x73\x70\x61\x6E\x3E","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x46\x61\x64\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x77\x69\x64\x74\x68\x3A\x20\x31\x30\x30\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x20\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x20\x61\x62\x73\x6F\x6C\x75\x74\x65\x3B\x20\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x3A\x20\x62\x6C\x61\x63\x6B\x3B\x20\x7A\x2D\x69\x6E\x64\x65\x78\x3A\x20\x31\x30\x30\x3B\x20\x6F\x70\x61\x63\x69\x74\x79\x3A\x20\x30\x2E\x36\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x3E\x3C\x2F\x64\x69\x76\x3E","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x73\x74\x61\x74\x73\x49\x6E\x66\x6F\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x6D\x61\x69\x6E\x2D\x63\x6F\x6C\x6F\x72\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x6F\x69\x6E\x74\x65\x72\x2D\x65\x76\x65\x6E\x74\x73\x3A\x20\x61\x75\x74\x6F\x3B\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x20\x31\x33\x70\x78\x3B\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x33\x70\x78\x3B\x66\x6C\x6F\x61\x74\x3A\x20\x6C\x65\x66\x74\x3B\x66\x6F\x6E\x74\x2D\x77\x65\x69\x67\x68\x74\x3A\x20\x37\x30\x30\x3B\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x72\x67\x62\x61\x28\x30\x2C\x20\x30\x2C\x20\x30\x2C\x20\x30\x2E\x32\x29\x3B\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x33\x70\x78\x3B\x62\x6F\x72\x64\x65\x72\x2D\x72\x61\x64\x69\x75\x73\x3A\x20\x34\x70\x78\x3B\x77\x69\x64\x74\x68\x3A\x20\x36\x35\x25\x3B\x68\x65\x69\x67\x68\x74\x3A\x20\x34\x34\x70\x78\x3B\x7A\x2D\x69\x6E\x64\x65\x78\x3A\x20\x31\x35\x3B\x6D\x61\x72\x67\x69\x6E\x3A\x20\x61\x75\x74\x6F\x3B\x74\x6F\x70\x3A\x20\x30\x70\x78\x3B\x72\x69\x67\x68\x74\x3A\x20\x30\x70\x78\x3B\x6C\x65\x66\x74\x3A\x20\x30\x70\x78\x3B\x62\x6F\x74\x74\x6F\x6D\x3A\x20\x38\x35\x70\x78\x3B\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x20\x66\x69\x78\x65\x64\x3B\x70\x6F\x69\x6E\x74\x65\x72\x2D\x65\x76\x65\x6E\x74\x73\x3A\x20\x61\x75\x74\x6F\x3B\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x66\x66\x66\x66\x66\x66\x3B\x22\x3E","\x3C\x70\x20\x73\x74\x79\x6C\x65\x3D\x22\x66\x6C\x6F\x61\x74\x3A\x20\x72\x69\x67\x68\x74\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x72\x69\x67\x68\x74\x3A\x20\x31\x30\x70\x78\x3B\x22\x3E\x3C\x73\x70\x61\x6E\x20\x69\x64\x3D\x22\x6E\x6F\x74\x65\x73\x53\x65\x72\x76\x65\x72\x22\x3E\x53\x65\x72\x76\x65\x72\x73\x3A\x20\x3C\x2F\x73\x70\x61\x6E\x3E\x3C\x73\x70\x61\x6E\x20\x69\x64\x3D\x22\x6E\x75\x6D\x53\x65\x72\x76\x65\x72\x73\x22\x3E\x3C\x2F\x73\x70\x61\x6E\x3E\x20\x28\x3C\x73\x70\x61\x6E\x20\x69\x64\x3D\x22\x70\x70\x73\x22\x3E\x3C\x2F\x73\x70\x61\x6E\x3E\x20\x3C\x73\x70\x61\x6E\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x74\x6F\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x50\x6C\x61\x79\x65\x72\x73\x20\x70\x65\x72\x20\x73\x65\x72\x76\x65\x72\x22\x3E\x50\x50\x53\x3C\x2F\x73\x70\x61\x6E\x3E\x29\x3C\x2F\x70\x3E","\x3C\x70\x20\x73\x74\x79\x6C\x65\x3D\x22\x66\x6C\x6F\x61\x74\x3A\x20\x72\x69\x67\x68\x74\x3B\x6D\x61\x72\x67\x69\x6E\x2D\x72\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x70\x78\x3B\x22\x3E\x3C\x73\x70\x61\x6E\x20\x69\x64\x3D\x22\x6E\x6F\x74\x65\x73\x50\x6C\x61\x79\x65\x72\x73\x22\x3E\x50\x6C\x61\x79\x65\x72\x73\x3A\x20\x3C\x2F\x73\x70\x61\x6E\x3E\x3C\x73\x70\x61\x6E\x20\x69\x64\x3D\x22\x6E\x75\x6D\x50\x6C\x61\x79\x65\x72\x73\x22\x3E\x3C\x2F\x73\x70\x61\x6E\x3E\x20\x2F\x20\x3C\x73\x70\x61\x6E\x20\x69\x64\x3D\x22\x74\x6F\x74\x61\x6C\x50\x6C\x61\x79\x65\x72\x73\x22\x20\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x74\x6F\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x54\x6F\x74\x61\x6C\x20\x70\x6C\x61\x79\x65\x72\x73\x20\x6F\x6E\x6C\x69\x6E\x65\x22\x3E\x3C\x2F\x73\x70\x61\x6E\x3E\x3C\x2F\x70\x3E\x3C\x2F\x64\x69\x76\x3E","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x73\x65\x61\x72\x63\x68\x48\x75\x64\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x68\x75\x64\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x77\x69\x64\x74\x68\x3A\x20\x36\x35\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x36\x30\x70\x78\x3B\x20\x7A\x2D\x69\x6E\x64\x65\x78\x3A\x20\x31\x35\x3B\x20\x6D\x61\x72\x67\x69\x6E\x3A\x20\x61\x75\x74\x6F\x3B\x20\x74\x6F\x70\x3A\x20\x30\x3B\x20\x72\x69\x67\x68\x74\x3A\x20\x30\x3B\x20\x6C\x65\x66\x74\x3A\x20\x30\x3B\x20\x62\x6F\x74\x74\x6F\x6D\x3A\x20\x30\x3B\x20\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x20\x66\x69\x78\x65\x64\x3B\x22\x3E","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x31\x30\x70\x78\x3B\x22\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x73\x65\x61\x72\x63\x68\x49\x6E\x70\x75\x74\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x74\x69\x74\x6C\x65\x3D\x22\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x45\x6E\x74\x65\x72\x20\x66\x72\x69\x65\x6E\x64\x27\x73\x20\x74\x6F\x6B\x65\x6E\x2C\x20\x49\x50\x2C\x20\x6C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x2C\x20\x6E\x61\x6D\x65\x20\x6F\x72\x20\x63\x6C\x61\x6E\x20\x74\x61\x67\x2E\x2E\x2E\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x6F\x69\x6E\x74\x65\x72\x2D\x65\x76\x65\x6E\x74\x73\x3A\x20\x61\x75\x74\x6F\x3B\x6D\x61\x72\x67\x69\x6E\x2D\x62\x6F\x74\x74\x6F\x6D\x3A\x20\x31\x30\x70\x78\x3B\x66\x6C\x6F\x61\x74\x3A\x20\x6C\x65\x66\x74\x3B\x77\x69\x64\x74\x68\x3A\x20\x38\x30\x25\x20\x21\x69\x6D\x70\x6F\x72\x74\x61\x6E\x74\x3B\x74\x65\x78\x74\x2D\x61\x6C\x69\x67\x6E\x3A\x20\x63\x65\x6E\x74\x65\x72\x3B\x22\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x73\x65\x61\x72\x63\x68\x42\x74\x6E\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x63\x6F\x70\x79\x2D\x74\x6F\x6B\x65\x6E\x20\x63\x6F\x70\x79\x2D\x70\x61\x72\x74\x79\x2D\x74\x6F\x6B\x65\x6E\x20\x62\x74\x6E\x2D\x70\x72\x69\x6D\x61\x72\x79\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x62\x6F\x74\x74\x6F\x6D\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x43\x61\x6E\x63\x65\x6C\x20\x73\x65\x61\x72\x63\x68\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x6F\x69\x6E\x74\x65\x72\x2D\x65\x76\x65\x6E\x74\x73\x3A\x20\x61\x75\x74\x6F\x3B\x6D\x61\x72\x67\x69\x6E\x2D\x62\x6F\x74\x74\x6F\x6D\x3A\x31\x30\x70\x78\x3B\x77\x69\x64\x74\x68\x3A\x20\x31\x35\x25\x3B\x22\x3E\x3C\x73\x70\x61\x6E\x20\x69\x64\x3D\x22\x73\x65\x61\x72\x63\x68\x53\x70\x61\x6E\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x73\x65\x61\x72\x63\x68\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x73\x70\x61\x6E\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x23\x6F\x76\x65\x72\x6C\x61\x79\x73\x2D\x68\x75\x64","\x23\x72\x65\x67\x69\x6F\x6E\x6D\x6F\x64\x65\x63\x68\x65\x63\x6B","\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72","\x50\x61\x73\x73\x77\x6F\x72\x64","\x57\x68\x65\x6E\x20\x45\x4E\x41\x42\x4C\x45\x44\x3A\x20\x4F\x70\x74\x69\x6D\x69\x7A\x65\x64\x20\x6D\x61\x73\x73\x20\x28\x2B\x2F\x2D\x32\x25\x29\x20\x4F\x4E\x2C\x20\x4D\x65\x72\x67\x65\x20\x54\x69\x6D\x65\x72\x20\x42\x45\x54\x41\x20\x4F\x46\x46\x2E\x20\x53\x75\x67\x67\x65\x73\x74\x65\x64\x20\x74\x6F\x20\x62\x65\x20\x45\x4E\x41\x42\x4C\x45\x44\x20\x66\x6F\x72\x20\x4C\x61\x67\x20\x72\x65\x64\x75\x63\x65\x2E","\x70\x61\x72\x65\x6E\x74","\x23\x6F\x70\x74\x69\x6D\x69\x7A\x65\x64\x4D\x61\x73\x73","\x3C\x6C\x61\x62\x65\x6C\x20\x73\x74\x79\x6C\x65\x3D\x22\x66\x6C\x6F\x61\x74\x3A\x6C\x65\x66\x74\x3B\x20\x70\x61\x64\x64\x69\x6E\x67\x2D\x6C\x65\x66\x74\x3A\x30\x3B\x20\x70\x61\x64\x64\x69\x6E\x67\x2D\x72\x69\x67\x68\x74\x3A\x30\x22\x3E","\x75\x6E\x6C\x6F\x63\x6B\x65\x64\x46\x50\x53","\x3C\x73\x65\x6C\x65\x63\x74\x20\x69\x64\x3D\x22\x46\x72\x61\x6D\x65\x57\x6F\x72\x6B\x4F\x70\x74\x69\x6F\x6E\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x6F\x6E\x63\x68\x61\x6E\x67\x65\x3D\x22\x63\x68\x61\x6E\x67\x65\x46\x72\x61\x6D\x65\x57\x6F\x72\x6B\x28\x29\x3B\x22\x20\x72\x65\x71\x75\x69\x72\x65\x64\x3D\x22\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x22\x20\x74\x69\x74\x6C\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x64\x69\x73\x70\x6C\x61\x79\x3A\x69\x6E\x6C\x69\x6E\x65\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x37\x30\x25\x3B\x20\x66\x6C\x6F\x61\x74\x3A\x72\x69\x67\x68\x74\x3B\x22\x20\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x34\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x4C\x69\x6D\x69\x74\x65\x64\x20\x52\x61\x74\x65\x20\x2B\x20\x34\x6D\x73\x20\x64\x65\x6C\x61\x79\x20\x28\x73\x75\x67\x67\x65\x73\x74\x65\x64\x29\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x66\x61\x6C\x73\x65\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x4C\x69\x6D\x69\x74\x65\x64\x20\x52\x61\x74\x65\x20\x2B\x20\x4E\x6F\x20\x64\x65\x6C\x61\x79\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x32\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x4C\x69\x6D\x69\x74\x65\x64\x20\x52\x61\x74\x65\x20\x2B\x20\x32\x6D\x73\x20\x64\x65\x6C\x61\x79\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x38\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x4C\x69\x6D\x69\x74\x65\x64\x20\x52\x61\x74\x65\x20\x2B\x20\x38\x6D\x73\x20\x64\x65\x6C\x61\x79\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x31\x36\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x4C\x69\x6D\x69\x74\x65\x64\x20\x52\x61\x74\x65\x20\x2B\x20\x31\x36\x6D\x73\x20\x64\x65\x6C\x61\x79\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x33\x32\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x4C\x69\x6D\x69\x74\x65\x64\x20\x52\x61\x74\x65\x20\x2B\x20\x33\x32\x6D\x73\x20\x64\x65\x6C\x61\x79\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x36\x34\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x4C\x69\x6D\x69\x74\x65\x64\x20\x52\x61\x74\x65\x20\x2B\x20\x36\x34\x6D\x73\x20\x64\x65\x6C\x61\x79\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x74\x72\x75\x65\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x55\x6E\x6C\x69\x6D\x69\x74\x65\x64\x20\x52\x61\x74\x65\x20\x28\x6E\x6F\x74\x20\x73\x75\x67\x67\x65\x73\x74\x65\x64\x29\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x75\x6C\x74\x72\x61\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x55\x6C\x74\x72\x61\x20\x28\x6E\x6F\x74\x20\x73\x75\x67\x67\x65\x73\x74\x65\x64\x20\x2D\x20\x74\x65\x73\x74\x29\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x2F\x73\x65\x6C\x65\x63\x74\x3E\x3C\x2F\x6C\x61\x62\x65\x6C\x3E","\x23\x61\x6E\x69\x6D\x61\x74\x69\x6F\x6E\x2D\x76\x61\x6C\x75\x65","\x54\x79\x70\x65\x20\x6F\x6E\x20\x63\x68\x72\x6F\x6D\x65\x3A\x20\x63\x68\x72\x6F\x6D\x65\x3A\x2F\x2F\x73\x65\x74\x74\x69\x6E\x67\x73\x2F\x73\x79\x73\x74\x65\x6D\x20\x2C\x20\x65\x6E\x73\x75\x72\x65\x20\x55\x73\x65\x20\x68\x61\x72\x64\x77\x61\x72\x65\x20\x61\x63\x63\x65\x6C\x65\x72\x61\x74\x69\x6F\x6E\x20\x77\x68\x65\x6E\x20\x61\x76\x61\x69\x6C\x61\x62\x6C\x65\x20\x63\x68\x65\x63\x6B\x62\x6F\x78\x2C\x20\x69\x73\x20\x45\x4E\x41\x42\x4C\x45\x44","\x23\x46\x72\x61\x6D\x65\x57\x6F\x72\x6B\x4F\x70\x74\x69\x6F\x6E","\x46\x6F\x72\x20\x6D\x6F\x72\x65\x20\x69\x6E\x66\x6F\x20\x6F\x6E\x20\x68\x6F\x77\x20\x74\x6F\x20\x75\x73\x65\x20\x76\x69\x64\x65\x6F\x20\x73\x6B\x69\x6E\x73\x20\x76\x69\x73\x69\x74\x3A\x20\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x64\x65\x76\x65\x6C\x6F\x70\x65\x72\x73\x2F\x20\x76\x69\x64\x65\x6F\x73\x6B\x69\x6E\x73\x2E\x68\x74\x6D\x6C","\x74\x6F\x70","\x23\x76\x69\x64\x65\x6F\x53\x6B\x69\x6E\x73","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x6E\x6F\x74\x65\x73\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x6D\x61\x69\x6E\x2D\x63\x6F\x6C\x6F\x72\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x64\x69\x73\x70\x6C\x61\x79\x3A\x6E\x6F\x6E\x65\x3B\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x20\x31\x33\x70\x78\x3B\x66\x6C\x6F\x61\x74\x3A\x20\x6C\x65\x66\x74\x3B\x66\x6F\x6E\x74\x2D\x77\x65\x69\x67\x68\x74\x3A\x20\x37\x30\x30\x3B\x62\x6F\x72\x64\x65\x72\x2D\x72\x61\x64\x69\x75\x73\x3A\x20\x34\x70\x78\x3B\x77\x69\x64\x74\x68\x3A\x20\x36\x35\x25\x3B\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x34\x37\x70\x78\x3B\x7A\x2D\x69\x6E\x64\x65\x78\x3A\x20\x31\x35\x3B\x6D\x61\x72\x67\x69\x6E\x3A\x20\x61\x75\x74\x6F\x3B\x74\x6F\x70\x3A\x20\x30\x70\x78\x3B\x72\x69\x67\x68\x74\x3A\x20\x30\x70\x78\x3B\x6C\x65\x66\x74\x3A\x20\x30\x70\x78\x3B\x62\x6F\x74\x74\x6F\x6D\x3A\x20\x34\x30\x30\x70\x78\x3B\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x20\x66\x69\x78\x65\x64\x3B\x70\x6F\x69\x6E\x74\x65\x72\x2D\x65\x76\x65\x6E\x74\x73\x3A\x20\x61\x75\x74\x6F\x3B\x63\x6F\x6C\x6F\x72\x3A\x20\x72\x67\x62\x28\x32\x35\x35\x2C\x20\x32\x35\x35\x2C\x20\x32\x35\x35\x29\x3B\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x31\x30\x70\x78\x3B\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x72\x67\x62\x61\x28\x30\x2C\x20\x30\x2C\x20\x30\x2C\x20\x30\x2E\x32\x29\x3B\x22\x3E\x3C\x68\x35\x20\x69\x64\x3D\x22\x6E\x6F\x74\x65\x73\x61\x76\x65\x66\x6F\x72\x6C\x61\x74\x65\x72\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x6D\x61\x69\x6E\x2D\x63\x6F\x6C\x6F\x72\x20\x74\x65\x78\x74\x2D\x63\x65\x6E\x74\x65\x72\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x30\x70\x78\x3B\x22\x3E\x53\x61\x76\x65\x20\x66\x6F\x72\x20\x6C\x61\x74\x65\x72\x3C\x2F\x68\x35\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x6E\x6F\x74\x65\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x20\x6D\x61\x69\x6E\x2D\x63\x6F\x6C\x6F\x72\x20\x6E\x6F\x74\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x63\x6F\x6C\x6F\x72\x3A\x20\x6C\x69\x67\x68\x74\x67\x72\x65\x79\x3B\x20\x20\x77\x69\x64\x74\x68\x3A\x20\x32\x35\x25\x3B\x66\x6C\x6F\x61\x74\x3A\x6C\x65\x66\x74\x3B\x20\x62\x6F\x72\x64\x65\x72\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x62\x6F\x72\x64\x65\x72\x2D\x62\x6F\x74\x74\x6F\x6D\x3A\x20\x31\x70\x78\x20\x73\x6F\x6C\x69\x64\x3B\x20\x62\x6F\x72\x64\x65\x72\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x64\x61\x72\x6B\x67\x72\x65\x79\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x72\x69\x67\x68\x74\x3A\x20\x37\x70\x78\x3B\x20\x74\x65\x78\x74\x2D\x61\x6C\x69\x67\x6E\x3A\x20\x63\x65\x6E\x74\x65\x72\x3B\x22\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x6E\x6F\x74\x65\x32\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x20\x6D\x61\x69\x6E\x2D\x63\x6F\x6C\x6F\x72\x20\x6E\x6F\x74\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x6C\x69\x67\x68\x74\x67\x72\x65\x79\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x32\x34\x25\x3B\x20\x66\x6C\x6F\x61\x74\x3A\x20\x6C\x65\x66\x74\x3B\x20\x62\x6F\x72\x64\x65\x72\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x62\x6F\x72\x64\x65\x72\x2D\x62\x6F\x74\x74\x6F\x6D\x3A\x20\x31\x70\x78\x20\x73\x6F\x6C\x69\x64\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x6C\x65\x66\x74\x3A\x20\x30\x70\x78\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x72\x69\x67\x68\x74\x3A\x20\x37\x70\x78\x3B\x20\x74\x65\x78\x74\x2D\x61\x6C\x69\x67\x6E\x3A\x20\x63\x65\x6E\x74\x65\x72\x3B\x20\x62\x6F\x72\x64\x65\x72\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x64\x61\x72\x6B\x67\x72\x65\x79\x3B\x22\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x6E\x6F\x74\x65\x33\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x20\x6D\x61\x69\x6E\x2D\x63\x6F\x6C\x6F\x72\x20\x6E\x6F\x74\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x34\x39\x25\x3B\x20\x62\x6F\x72\x64\x65\x72\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x62\x6F\x72\x64\x65\x72\x2D\x62\x6F\x74\x74\x6F\x6D\x3A\x20\x31\x70\x78\x20\x73\x6F\x6C\x69\x64\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x6C\x65\x66\x74\x3A\x20\x31\x30\x70\x78\x3B\x20\x74\x65\x78\x74\x2D\x61\x6C\x69\x67\x6E\x3A\x20\x63\x65\x6E\x74\x65\x72\x3B\x20\x62\x6F\x72\x64\x65\x72\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x64\x61\x72\x6B\x67\x72\x65\x79\x3B\x22\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x6E\x6F\x74\x65\x34\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x20\x6D\x61\x69\x6E\x2D\x63\x6F\x6C\x6F\x72\x20\x6E\x6F\x74\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x6C\x69\x67\x68\x74\x67\x72\x65\x79\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x32\x35\x25\x3B\x20\x66\x6C\x6F\x61\x74\x3A\x20\x6C\x65\x66\x74\x3B\x20\x62\x6F\x72\x64\x65\x72\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x62\x6F\x72\x64\x65\x72\x2D\x62\x6F\x74\x74\x6F\x6D\x3A\x20\x31\x70\x78\x20\x73\x6F\x6C\x69\x64\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x72\x69\x67\x68\x74\x3A\x20\x37\x70\x78\x3B\x20\x74\x65\x78\x74\x2D\x61\x6C\x69\x67\x6E\x3A\x20\x63\x65\x6E\x74\x65\x72\x3B\x20\x62\x6F\x72\x64\x65\x72\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x64\x61\x72\x6B\x67\x72\x65\x79\x3B\x22\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x6E\x6F\x74\x65\x35\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x20\x6D\x61\x69\x6E\x2D\x63\x6F\x6C\x6F\x72\x20\x6E\x6F\x74\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x6C\x69\x67\x68\x74\x67\x72\x65\x79\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x32\x34\x25\x3B\x20\x66\x6C\x6F\x61\x74\x3A\x20\x6C\x65\x66\x74\x3B\x20\x62\x6F\x72\x64\x65\x72\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x62\x6F\x72\x64\x65\x72\x2D\x62\x6F\x74\x74\x6F\x6D\x3A\x20\x31\x70\x78\x20\x73\x6F\x6C\x69\x64\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x6C\x65\x66\x74\x3A\x20\x30\x70\x78\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x72\x69\x67\x68\x74\x3A\x20\x37\x70\x78\x3B\x20\x74\x65\x78\x74\x2D\x61\x6C\x69\x67\x6E\x3A\x20\x63\x65\x6E\x74\x65\x72\x3B\x20\x62\x6F\x72\x64\x65\x72\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x64\x61\x72\x6B\x67\x72\x65\x79\x3B\x22\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x6E\x6F\x74\x65\x36\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x20\x6D\x61\x69\x6E\x2D\x63\x6F\x6C\x6F\x72\x20\x6E\x6F\x74\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x6C\x69\x67\x68\x74\x67\x72\x65\x79\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x34\x39\x25\x3B\x20\x62\x6F\x72\x64\x65\x72\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x62\x6F\x72\x64\x65\x72\x2D\x62\x6F\x74\x74\x6F\x6D\x3A\x20\x31\x70\x78\x20\x73\x6F\x6C\x69\x64\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x6C\x65\x66\x74\x3A\x20\x31\x30\x70\x78\x3B\x20\x74\x65\x78\x74\x2D\x61\x6C\x69\x67\x6E\x3A\x20\x63\x65\x6E\x74\x65\x72\x3B\x20\x62\x6F\x72\x64\x65\x72\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x64\x61\x72\x6B\x67\x72\x65\x79\x3B\x22\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x6E\x6F\x74\x65\x37\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x20\x6D\x61\x69\x6E\x2D\x63\x6F\x6C\x6F\x72\x20\x6E\x6F\x74\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x6C\x69\x67\x68\x74\x67\x72\x65\x79\x3B\x20\x62\x6F\x72\x64\x65\x72\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x62\x6F\x72\x64\x65\x72\x2D\x62\x6F\x74\x74\x6F\x6D\x3A\x20\x31\x70\x78\x20\x73\x6F\x6C\x69\x64\x3B\x20\x74\x65\x78\x74\x2D\x61\x6C\x69\x67\x6E\x3A\x20\x63\x65\x6E\x74\x65\x72\x3B\x20\x62\x6F\x72\x64\x65\x72\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x64\x61\x72\x6B\x67\x72\x65\x79\x3B\x22\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x63\x6C\x6F\x73\x65\x42\x74\x6E\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x64\x61\x6E\x67\x65\x72\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x30\x70\x78\x3B\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x70\x61\x67\x65\x5F\x6C\x6F\x67\x69\x6E\x5F\x61\x6E\x64\x5F\x70\x6C\x61\x79\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x22\x20\x74\x69\x74\x6C\x65\x3D\x22\x22\x3E\x43\x6C\x6F\x73\x65\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x74\x69\x6D\x65\x72\x74\x6F\x6F\x6C\x73\x2D\x68\x75\x64\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x68\x75\x64\x22\x20\x61\x6C\x69\x67\x6E\x3D\x22\x63\x65\x6E\x74\x65\x72\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x77\x69\x64\x74\x68\x3A\x20\x35\x30\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x33\x30\x70\x78\x3B\x20\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x70\x6F\x69\x6E\x74\x65\x72\x2D\x65\x76\x65\x6E\x74\x73\x3A\x20\x61\x75\x74\x6F\x3B\x20\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x20\x61\x62\x73\x6F\x6C\x75\x74\x65\x3B\x20\x72\x69\x67\x68\x74\x3A\x20\x30\x70\x78\x3B\x20\x74\x6F\x70\x3A\x20\x2D\x39\x30\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x62\x6C\x6F\x63\x6B\x3B\x22\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x70\x6C\x61\x79\x74\x69\x6D\x65\x72\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x2D\x6C\x69\x6E\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x36\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x62\x6C\x6F\x63\x6B\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x73\x74\x61\x72\x74\x54\x69\x6D\x65\x72\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x53\x74\x61\x72\x74\x20\x54\x69\x6D\x65\x72\x22\x22\x20\x3E\x3C\x69\x20\x69\x64\x3D\x22\x70\x6C\x61\x79\x74\x69\x6D\x65\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x70\x6C\x61\x79\x2D\x63\x69\x72\x63\x6C\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x2D\x6C\x65\x66\x74\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x73\x74\x6F\x70\x74\x69\x6D\x65\x72\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x2D\x6C\x69\x6E\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x36\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x73\x74\x6F\x70\x54\x69\x6D\x65\x72\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x50\x61\x75\x73\x65\x20\x54\x69\x6D\x65\x72\x22\x22\x3E\x3C\x69\x20\x69\x64\x3D\x22\x70\x61\x75\x73\x65\x74\x69\x6D\x65\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x70\x61\x75\x73\x65\x2D\x63\x69\x72\x63\x6C\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x2D\x6C\x65\x66\x74\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x63\x6C\x65\x61\x72\x74\x69\x6D\x65\x72\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x2D\x6C\x69\x6E\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x36\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x63\x6C\x65\x61\x72\x54\x69\x6D\x65\x72\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x53\x74\x6F\x70\x20\x54\x69\x6D\x65\x72\x22\x3E\x3C\x69\x20\x69\x64\x3D\x22\x63\x6C\x65\x61\x72\x74\x69\x6D\x65\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x73\x74\x6F\x70\x2D\x63\x69\x72\x63\x6C\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x2D\x6C\x65\x66\x74\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x61\x20\x69\x64\x3D\x22\x74\x69\x6D\x65\x72\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x32\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x20\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x20\x61\x62\x73\x6F\x6C\x75\x74\x65\x3B\x20\x72\x69\x67\x68\x74\x3A\x20\x30\x70\x78\x3B\x22\x3E\x30\x30\x3A\x30\x30\x3C\x2F\x61\x3E","\x3C\x6C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x6C\x65\x67\x65\x6E\x64\x2D\x74\x61\x62\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x77\x69\x64\x74\x68\x3A\x20\x31\x36\x2E\x36\x36\x25\x3B\x20\x70\x61\x64\x64\x69\x6E\x67\x3A\x31\x32\x70\x78\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x41\x50\x49\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x74\x6F\x70\x22\x3E\x3C\x61\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x20\x70\x61\x64\x64\x69\x6E\x67\x3A\x31\x32\x70\x78\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x24\x28\x27\x23\x6D\x61\x69\x6E\x2D\x6D\x65\x6E\x75\x27\x29\x2E\x63\x68\x69\x6C\x64\x72\x65\x6E\x28\x27\x64\x69\x76\x27\x29\x2E\x68\x69\x64\x65\x28\x29\x3B\x20\x24\x28\x27\x2E\x6D\x65\x6E\x75\x2D\x74\x61\x62\x73\x27\x29\x2E\x63\x68\x69\x6C\x64\x72\x65\x6E\x28\x27\x6C\x69\x27\x29\x2E\x72\x65\x6D\x6F\x76\x65\x43\x6C\x61\x73\x73\x28\x27\x61\x63\x74\x69\x76\x65\x27\x29\x3B\x20\x24\x28\x27\x2E\x6D\x65\x6E\x75\x2D\x74\x61\x62\x73\x27\x29\x2E\x63\x68\x69\x6C\x64\x72\x65\x6E\x28\x27\x6C\x69\x27\x29\x2E\x63\x68\x69\x6C\x64\x72\x65\x6E\x28\x27\x61\x27\x29\x2E\x72\x65\x6D\x6F\x76\x65\x43\x6C\x61\x73\x73\x28\x27\x61\x63\x74\x69\x76\x65\x27\x29\x3B\x20\x24\x28\x27\x23\x6C\x65\x67\x65\x6E\x64\x27\x29\x2E\x66\x61\x64\x65\x49\x6E\x28\x29\x3B\x20\x24\x28\x74\x68\x69\x73\x29\x2E\x61\x64\x64\x43\x6C\x61\x73\x73\x28\x27\x61\x63\x74\x69\x76\x65\x27\x29\x3B\x20\x24\x28\x74\x68\x69\x73\x29\x2E\x70\x61\x72\x65\x6E\x74\x28\x29\x2E\x61\x64\x64\x43\x6C\x61\x73\x73\x28\x27\x61\x63\x74\x69\x76\x65\x27\x29\x3B\x20\x22\x20\x68\x72\x65\x66\x3D\x22\x6A\x61\x76\x61\x73\x63\x72\x69\x70\x74\x3A\x76\x6F\x69\x64\x28\x30\x29\x3B\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x70\x75\x7A\x7A\x6C\x65\x2D\x70\x69\x65\x63\x65\x20\x66\x61\x2D\x6C\x67\x22\x3E\x3C\x2F\x61\x3E\x3C\x2F\x6C\x69\x3E","\x2E\x6D\x65\x6E\x75\x2D\x74\x61\x62\x73\x3E\x3A\x6E\x74\x68\x2D\x63\x68\x69\x6C\x64\x28\x32\x29","\x77\x69\x64\x74\x68\x3A\x20\x31\x34\x2E\x32\x38\x25","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x6C\x65\x67\x65\x6E\x64\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x6D\x65\x6E\x75\x2D\x70\x61\x6E\x65\x6C\x22\x3E\x3C\x64\x69\x76\x20\x63\x6C\x61\x73\x73\x3D\x22\x61\x67\x61\x72\x69\x6F\x2D\x70\x61\x6E\x65\x6C\x20\x6C\x65\x67\x65\x6E\x64\x2D\x70\x61\x6E\x65\x6C\x22\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x53\x48\x4F\x53\x48\x4F\x42\x74\x6E\x22\x20\x74\x79\x70\x65\x3D\x22\x62\x75\x74\x74\x6F\x6E\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x73\x6D\x20\x62\x74\x6E\x2D\x77\x61\x72\x6E\x69\x6E\x67\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x62\x75\x74\x74\x6F\x6E\x22\x20\x61\x72\x69\x61\x2D\x70\x72\x65\x73\x73\x65\x64\x3D\x22\x66\x61\x6C\x73\x65\x22\x20\x61\x75\x74\x6F\x63\x6F\x6D\x70\x6C\x65\x74\x65\x3D\x22\x6F\x66\x66\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x34\x39\x2E\x35\x25\x3B\x20\x62\x6F\x72\x64\x65\x72\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x64\x61\x72\x6B\x73\x6C\x61\x74\x65\x67\x72\x65\x79\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x72\x69\x67\x68\x74\x3A\x20\x30\x2E\x35\x25\x3B\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x70\x75\x7A\x7A\x6C\x65\x2D\x70\x69\x65\x63\x65\x22\x3E\x3C\x2F\x69\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x58\x50\x42\x74\x6E\x22\x20\x74\x79\x70\x65\x3D\x22\x62\x75\x74\x74\x6F\x6E\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x73\x6D\x20\x62\x74\x6E\x2D\x77\x61\x72\x6E\x69\x6E\x67\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x62\x75\x74\x74\x6F\x6E\x22\x20\x61\x72\x69\x61\x2D\x70\x72\x65\x73\x73\x65\x64\x3D\x22\x66\x61\x6C\x73\x65\x22\x20\x61\x75\x74\x6F\x63\x6F\x6D\x70\x6C\x65\x74\x65\x3D\x22\x6F\x66\x66\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x34\x39\x2E\x35\x25\x3B\x20\x62\x6F\x72\x64\x65\x72\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x64\x61\x72\x6B\x73\x6C\x61\x74\x65\x67\x72\x65\x79\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x6C\x65\x66\x74\x3A\x20\x30\x2E\x35\x25\x3B\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x67\x61\x6D\x65\x70\x61\x64\x22\x3E\x3C\x2F\x69\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x4D\x41\x49\x4E\x42\x54\x42\x74\x6E\x22\x20\x74\x79\x70\x65\x3D\x22\x62\x75\x74\x74\x6F\x6E\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x73\x6D\x20\x62\x74\x6E\x2D\x77\x61\x72\x6E\x69\x6E\x67\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x62\x75\x74\x74\x6F\x6E\x22\x20\x61\x72\x69\x61\x2D\x70\x72\x65\x73\x73\x65\x64\x3D\x22\x66\x61\x6C\x73\x65\x22\x20\x61\x75\x74\x6F\x63\x6F\x6D\x70\x6C\x65\x74\x65\x3D\x22\x6F\x66\x66\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x34\x39\x2E\x35\x25\x3B\x20\x62\x6F\x72\x64\x65\x72\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x64\x61\x72\x6B\x73\x6C\x61\x74\x65\x67\x72\x65\x79\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x72\x69\x67\x68\x74\x3A\x20\x30\x2E\x35\x25\x3B\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x6D\x69\x6E\x75\x73\x22\x3E\x3C\x2F\x69\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x41\x6E\x69\x6D\x61\x74\x65\x64\x53\x6B\x69\x6E\x42\x74\x6E\x22\x20\x74\x79\x70\x65\x3D\x22\x62\x75\x74\x74\x6F\x6E\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x73\x6D\x20\x62\x74\x6E\x2D\x77\x61\x72\x6E\x69\x6E\x67\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x62\x75\x74\x74\x6F\x6E\x22\x20\x61\x72\x69\x61\x2D\x70\x72\x65\x73\x73\x65\x64\x3D\x22\x66\x61\x6C\x73\x65\x22\x20\x61\x75\x74\x6F\x63\x6F\x6D\x70\x6C\x65\x74\x65\x3D\x22\x6F\x66\x66\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x34\x39\x2E\x35\x25\x3B\x20\x62\x6F\x72\x64\x65\x72\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x64\x61\x72\x6B\x73\x6C\x61\x74\x65\x67\x72\x65\x79\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x6C\x65\x66\x74\x3A\x20\x30\x2E\x35\x25\x3B\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x67\x72\x61\x76\x22\x3E\x3C\x2F\x69\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x48\x69\x64\x65\x41\x6C\x6C\x42\x74\x68\x6E\x22\x20\x74\x79\x70\x65\x3D\x22\x62\x75\x74\x74\x6F\x6E\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x73\x6D\x20\x62\x74\x6E\x2D\x64\x61\x6E\x67\x65\x72\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x62\x75\x74\x74\x6F\x6E\x22\x20\x61\x72\x69\x61\x2D\x70\x72\x65\x73\x73\x65\x64\x3D\x22\x66\x61\x6C\x73\x65\x22\x20\x61\x75\x74\x6F\x63\x6F\x6D\x70\x6C\x65\x74\x65\x3D\x22\x6F\x66\x66\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x72\x69\x67\x68\x74\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x54\x65\x6D\x70\x6F\x72\x61\x72\x69\x6C\x79\x20\x48\x69\x64\x65\x2F\x53\x68\x6F\x77\x20\x45\x76\x65\x72\x79\x74\x68\x69\x6E\x67\x2E\x20\x46\x75\x6E\x63\x74\x69\x6F\x6E\x20\x66\x6F\x72\x20\x59\x6F\x75\x74\x75\x62\x65\x72\x73\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x34\x39\x2E\x35\x25\x3B\x20\x62\x6F\x72\x64\x65\x72\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x64\x61\x72\x6B\x73\x6C\x61\x74\x65\x67\x72\x65\x79\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x72\x69\x67\x68\x74\x3A\x20\x30\x2E\x35\x25\x3B\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x65\x78\x63\x6C\x61\x6D\x61\x74\x69\x6F\x6E\x2D\x74\x72\x69\x61\x6E\x67\x6C\x65\x22\x3E\x3C\x2F\x69\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x54\x49\x4D\x45\x63\x61\x6C\x42\x74\x6E\x22\x20\x74\x79\x70\x65\x3D\x22\x62\x75\x74\x74\x6F\x6E\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x73\x6D\x20\x62\x74\x6E\x2D\x77\x61\x72\x6E\x69\x6E\x67\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x62\x75\x74\x74\x6F\x6E\x22\x20\x61\x72\x69\x61\x2D\x70\x72\x65\x73\x73\x65\x64\x3D\x22\x66\x61\x6C\x73\x65\x22\x20\x61\x75\x74\x6F\x63\x6F\x6D\x70\x6C\x65\x74\x65\x3D\x22\x6F\x66\x66\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x34\x39\x2E\x35\x25\x3B\x20\x62\x6F\x72\x64\x65\x72\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x64\x61\x72\x6B\x73\x6C\x61\x74\x65\x67\x72\x65\x79\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x6C\x65\x66\x74\x3A\x20\x30\x2E\x35\x25\x3B\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x63\x61\x6C\x63\x75\x6C\x61\x74\x6F\x72\x22\x3E\x3C\x2F\x69\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x4F\x70\x65\x6E\x75\x73\x65\x72\x53\x63\x72\x69\x70\x74\x73\x22\x20\x74\x79\x70\x65\x3D\x22\x73\x75\x62\x6D\x69\x74\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x70\x72\x69\x6D\x61\x72\x79\x20\x62\x74\x6E\x20\x32\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x62\x6C\x6F\x63\x6B\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x30\x30\x25\x3B\x20\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x34\x70\x78\x20\x30\x20\x36\x70\x78\x20\x30\x3B\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x63\x6F\x64\x65\x22\x3E\x3C\x2F\x69\x3E\x55\x73\x65\x72\x20\x53\x63\x72\x69\x70\x74\x73\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x53\x70\x65\x63\x69\x61\x6C\x44\x65\x61\x6C\x73\x42\x74\x6E\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x70\x72\x69\x6D\x61\x72\x79\x20\x62\x74\x6E\x22\x20\x74\x79\x70\x65\x3D\x22\x73\x75\x62\x6D\x69\x74\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x42\x65\x66\x6F\x72\x65\x53\x70\x65\x63\x69\x61\x6C\x44\x65\x61\x6C\x73\x28\x29\x3B\x20\x72\x65\x74\x75\x72\x6E\x20\x66\x61\x6C\x73\x65\x3B\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x70\x72\x69\x6D\x61\x72\x79\x20\x62\x74\x6E\x2D\x73\x68\x6F\x70\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x30\x30\x25\x3B\x20\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x34\x70\x78\x20\x30\x70\x78\x20\x36\x70\x78\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x70\x61\x67\x65\x5F\x73\x68\x6F\x70\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x62\x72\x69\x65\x66\x63\x61\x73\x65\x22\x3E\x3C\x2F\x69\x3E\x53\x70\x65\x63\x69\x61\x6C\x20\x44\x65\x61\x6C\x73\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x4C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x53\x68\x6F\x70\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x70\x72\x69\x6D\x61\x72\x79\x20\x62\x74\x6E\x22\x20\x74\x79\x70\x65\x3D\x22\x73\x75\x62\x6D\x69\x74\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x42\x65\x66\x6F\x72\x65\x4C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x53\x68\x6F\x70\x28\x29\x3B\x20\x72\x65\x74\x75\x72\x6E\x20\x66\x61\x6C\x73\x65\x3B\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x70\x72\x69\x6D\x61\x72\x79\x20\x62\x74\x6E\x2D\x73\x68\x6F\x70\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x30\x30\x25\x3B\x20\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x34\x70\x78\x20\x30\x70\x78\x20\x36\x70\x78\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x70\x61\x67\x65\x5F\x73\x68\x6F\x70\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x62\x72\x69\x65\x66\x63\x61\x73\x65\x22\x3E\x3C\x2F\x69\x3E\x53\x68\x6F\x70\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x64\x69\x76\x20\x63\x6C\x61\x73\x73\x3D\x22\x69\x6E\x70\x75\x74\x2D\x62\x6F\x78\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x74\x65\x78\x74\x2D\x61\x6C\x69\x67\x6E\x3A\x20\x63\x65\x6E\x74\x65\x72\x3B\x20\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x20\x31\x32\x70\x78\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x34\x70\x78\x20\x30\x20\x30\x70\x78\x20\x30\x3B\x22\x3E\x3C\x73\x70\x61\x6E\x20\x69\x64\x3D\x22\x6C\x65\x67\x65\x6E\x64\x6D\x61\x6E\x75\x61\x6C\x62\x61\x63\x6B\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x74\x69\x74\x6C\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x22\x3E\x4D\x61\x6E\x75\x61\x6C\x20\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x3A\x20\x20\x3C\x2F\x73\x70\x61\x6E\x3E","\x3C\x73\x65\x6C\x65\x63\x74\x20\x69\x64\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x50\x69\x63\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x6F\x6E\x63\x68\x61\x6E\x67\x65\x3D\x22\x63\x68\x61\x6E\x67\x65\x50\x69\x63\x46\x75\x6E\x28\x29\x3B\x22\x20\x72\x65\x71\x75\x69\x72\x65\x64\x3D\x22\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x22\x20\x74\x69\x74\x6C\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x64\x69\x73\x70\x6C\x61\x79\x3A\x69\x6E\x6C\x69\x6E\x65\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x34\x30\x25\x22\x20\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x31\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x4D\x69\x6E\x69\x6D\x61\x70\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x32\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x33\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x54\x65\x61\x6D\x62\x6F\x61\x72\x64\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x34\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x4D\x61\x69\x6E\x20\x43\x61\x6E\x76\x61\x73\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x35\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x4D\x61\x69\x6E\x20\x42\x61\x6E\x6E\x65\x72\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x2F\x73\x65\x6C\x65\x63\x74\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x6D\x69\x6E\x69\x6D\x61\x70\x50\x69\x63\x74\x75\x72\x65\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x4D\x69\x6E\x69\x6D\x61\x70\x20\x49\x6D\x61\x67\x65\x20\x55\x52\x4C\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x62\x6C\x6F\x63\x6B\x3B\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x6D\x69\x6E\x62\x67\x6E\x61\x6D\x65\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x72\x69\x67\x68\x74\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x55\x72\x6C\x20\x6F\x66\x20\x69\x6D\x61\x67\x65\x20\x73\x74\x61\x72\x74\x69\x6E\x67\x20\x77\x69\x74\x68\x20\x68\x74\x74\x70\x73\x3A\x2F\x2F\x2E\x2E\x2E\x20\x6F\x72\x20\x68\x74\x74\x70\x73\x3A\x2F\x2F\x2E\x2E\x2E\x22\x20\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x6D\x69\x6E\x62\x74\x65\x78\x74\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x4D\x69\x6E\x69\x6D\x61\x70\x20\x54\x65\x78\x74\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x62\x6C\x6F\x63\x6B\x3B\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x6D\x69\x6E\x62\x74\x65\x78\x74\x28\x29\x3B\x22\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x6C\x65\x61\x64\x62\x50\x69\x63\x74\x75\x72\x65\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x20\x49\x6D\x61\x67\x65\x20\x55\x52\x4C\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x6C\x65\x61\x64\x62\x67\x6E\x61\x6D\x65\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x72\x69\x67\x68\x74\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x55\x72\x6C\x20\x6F\x66\x20\x69\x6D\x61\x67\x65\x20\x73\x74\x61\x72\x74\x69\x6E\x67\x20\x77\x69\x74\x68\x20\x68\x74\x74\x70\x73\x3A\x2F\x2F\x2E\x2E\x2E\x20\x6F\x72\x20\x68\x74\x74\x70\x73\x3A\x2F\x2F\x2E\x2E\x2E\x22\x20\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x6C\x65\x61\x64\x62\x74\x65\x78\x74\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x20\x4C\x6F\x67\x6F\x20\x54\x65\x78\x74\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x6C\x65\x61\x64\x62\x74\x65\x78\x74\x28\x29\x3B\x22\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x74\x65\x61\x6D\x62\x50\x69\x63\x74\x75\x72\x65\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x54\x65\x61\x6D\x62\x6F\x61\x72\x64\x20\x49\x6D\x61\x67\x65\x20\x55\x52\x4C\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x74\x65\x61\x6D\x62\x67\x6E\x61\x6D\x65\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x72\x69\x67\x68\x74\x22\x20\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x55\x72\x6C\x20\x6F\x66\x20\x69\x6D\x61\x67\x65\x20\x73\x74\x61\x72\x74\x69\x6E\x67\x20\x77\x69\x74\x68\x20\x68\x74\x74\x70\x73\x3A\x2F\x2F\x2E\x2E\x2E\x20\x6F\x72\x20\x68\x74\x74\x70\x73\x3A\x2F\x2F\x2E\x2E\x2E\x22\x20\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x74\x65\x61\x6D\x62\x74\x65\x78\x74\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x54\x65\x61\x6D\x62\x6F\x61\x72\x64\x20\x4C\x6F\x67\x6F\x20\x54\x65\x78\x74\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x74\x65\x61\x6D\x62\x74\x65\x78\x74\x28\x29\x3B\x22\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x63\x61\x6E\x76\x61\x73\x50\x69\x63\x74\x75\x72\x65\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x4D\x61\x69\x6E\x20\x43\x61\x6E\x76\x61\x73\x20\x49\x6D\x61\x67\x65\x20\x55\x52\x4C\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x63\x61\x6E\x76\x61\x73\x62\x67\x6E\x61\x6D\x65\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x72\x69\x67\x68\x74\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x55\x72\x6C\x20\x6F\x66\x20\x69\x6D\x61\x67\x65\x20\x73\x74\x61\x72\x74\x69\x6E\x67\x20\x77\x69\x74\x68\x20\x68\x74\x74\x70\x73\x3A\x2F\x2F\x2E\x2E\x2E\x20\x6F\x72\x20\x68\x74\x74\x70\x73\x3A\x2F\x2F\x2E\x2E\x2E\x22\x20\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x69\x6D\x67\x55\x72\x6C\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x4D\x61\x69\x6E\x20\x42\x61\x6E\x6E\x65\x72\x20\x49\x63\x6F\x6E\x20\x55\x52\x4C\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x69\x6D\x67\x55\x72\x6C\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x72\x69\x67\x68\x74\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x55\x72\x6C\x20\x6F\x66\x20\x69\x6D\x61\x67\x65\x20\x73\x74\x61\x72\x74\x69\x6E\x67\x20\x77\x69\x74\x68\x20\x68\x74\x74\x70\x3A\x2F\x2F\x2E\x2E\x2E\x20\x6F\x72\x20\x68\x74\x74\x70\x73\x3A\x2F\x2F\x2E\x2E\x2E\x22\x20\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x69\x6D\x67\x48\x72\x65\x66\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x4D\x61\x69\x6E\x20\x42\x61\x6E\x6E\x65\x72\x20\x4C\x69\x6E\x6B\x20\x55\x52\x4C\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x69\x6D\x67\x48\x72\x65\x66\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x72\x69\x67\x68\x74\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x55\x72\x6C\x20\x6F\x66\x20\x6C\x69\x6E\x6B\x20\x74\x6F\x20\x72\x65\x64\x69\x72\x65\x63\x74\x22\x20\x3E","\x3C\x64\x69\x76\x20\x63\x6C\x61\x73\x73\x3D\x22\x69\x6E\x70\x75\x74\x2D\x62\x6F\x78\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x74\x65\x78\x74\x2D\x61\x6C\x69\x67\x6E\x3A\x20\x63\x65\x6E\x74\x65\x72\x3B\x20\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x20\x31\x32\x70\x78\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x30\x70\x78\x3B\x20\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x34\x70\x78\x20\x30\x20\x30\x70\x78\x20\x30\x3B\x22\x3E\x3C\x73\x70\x61\x6E\x20\x69\x64\x3D\x22\x6C\x65\x67\x65\x6E\x64\x6D\x61\x6E\x75\x61\x6C\x6D\x65\x73\x73\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x74\x69\x74\x6C\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x22\x3E\x4D\x61\x6E\x75\x61\x6C\x20\x4D\x65\x73\x73\x61\x67\x65\x20\x49\x63\x6F\x6E\x73\x26\x59\x6F\x75\x74\x75\x62\x65\x3A\x20\x20\x3C\x2F\x73\x70\x61\x6E\x3E","\x3C\x73\x65\x6C\x65\x63\x74\x20\x69\x64\x3D\x22\x63\x68\x61\x6E\x67\x65\x70\x68\x6F\x74\x6F\x73\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x6F\x6E\x63\x68\x61\x6E\x67\x65\x3D\x22\x63\x68\x61\x6E\x67\x65\x50\x68\x6F\x74\x6F\x46\x75\x6E\x28\x29\x3B\x22\x20\x72\x65\x71\x75\x69\x72\x65\x64\x3D\x22\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x22\x20\x74\x69\x74\x6C\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x64\x69\x73\x70\x6C\x61\x79\x3A\x69\x6E\x6C\x69\x6E\x65\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x33\x35\x25\x22\x20\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x31\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x49\x63\x6F\x6E\x20\x31\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x32\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x49\x63\x6F\x6E\x20\x32\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x33\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x49\x63\x6F\x6E\x20\x33\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x34\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x49\x63\x6F\x6E\x20\x34\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x35\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x49\x63\x6F\x6E\x20\x35\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x36\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x49\x63\x6F\x6E\x20\x36\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x37\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x59\x6F\x75\x74\x75\x62\x65\x20\x31\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x38\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x59\x6F\x75\x74\x75\x62\x65\x20\x32\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x39\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x59\x6F\x75\x74\x75\x62\x65\x20\x33\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x31\x30\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x59\x6F\x75\x74\x75\x62\x65\x20\x34\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x31\x31\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x59\x6F\x75\x74\x75\x62\x65\x20\x35\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x31\x32\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x59\x6F\x75\x74\x75\x62\x65\x20\x36\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x70\x69\x63\x31\x64\x61\x74\x61\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x4D\x65\x73\x73\x61\x67\x65\x20\x49\x63\x6F\x6E\x20\x54\x65\x78\x74\x20\x31\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x62\x6C\x6F\x63\x6B\x3B\x20\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x70\x69\x63\x31\x64\x61\x74\x61\x28\x29\x3B\x22\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x70\x69\x63\x32\x64\x61\x74\x61\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x4D\x65\x73\x73\x61\x67\x65\x20\x49\x63\x6F\x6E\x20\x54\x65\x78\x74\x20\x32\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x70\x69\x63\x32\x64\x61\x74\x61\x28\x29\x3B\x22\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x70\x69\x63\x33\x64\x61\x74\x61\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x4D\x65\x73\x73\x61\x67\x65\x20\x49\x63\x6F\x6E\x20\x54\x65\x78\x74\x20\x33\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x70\x69\x63\x33\x64\x61\x74\x61\x28\x29\x3B\x22\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x70\x69\x63\x34\x64\x61\x74\x61\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x4D\x65\x73\x73\x61\x67\x65\x20\x49\x63\x6F\x6E\x20\x54\x65\x78\x74\x20\x34\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x70\x69\x63\x34\x64\x61\x74\x61\x28\x29\x3B\x22\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x70\x69\x63\x35\x64\x61\x74\x61\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x4D\x65\x73\x73\x61\x67\x65\x20\x49\x63\x6F\x6E\x20\x54\x65\x78\x74\x20\x35\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x70\x69\x63\x35\x64\x61\x74\x61\x28\x29\x3B\x22\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x70\x69\x63\x36\x64\x61\x74\x61\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x4D\x65\x73\x73\x61\x67\x65\x20\x49\x63\x6F\x6E\x20\x54\x65\x78\x74\x20\x36\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x70\x69\x63\x36\x64\x61\x74\x61\x28\x29\x3B\x22\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x79\x74\x31\x64\x61\x74\x61\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x59\x6F\x75\x74\x75\x62\x65\x20\x4D\x65\x73\x73\x61\x67\x65\x20\x54\x65\x78\x74\x20\x31\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x79\x74\x31\x64\x61\x74\x61\x28\x29\x3B\x22\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x79\x74\x32\x64\x61\x74\x61\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x59\x6F\x75\x74\x75\x62\x65\x20\x4D\x65\x73\x73\x61\x67\x65\x20\x54\x65\x78\x74\x20\x32\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x79\x74\x32\x64\x61\x74\x61\x28\x29\x3B\x22\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x79\x74\x33\x64\x61\x74\x61\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x59\x6F\x75\x74\x75\x62\x65\x20\x4D\x65\x73\x73\x61\x67\x65\x20\x54\x65\x78\x74\x20\x33\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x79\x74\x33\x64\x61\x74\x61\x28\x29\x3B\x22\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x79\x74\x34\x64\x61\x74\x61\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x59\x6F\x75\x74\x75\x62\x65\x20\x4D\x65\x73\x73\x61\x67\x65\x20\x54\x65\x78\x74\x20\x34\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x79\x74\x34\x64\x61\x74\x61\x28\x29\x3B\x22\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x79\x74\x35\x64\x61\x74\x61\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x59\x6F\x75\x74\x75\x62\x65\x20\x4D\x65\x73\x73\x61\x67\x65\x20\x54\x65\x78\x74\x20\x35\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x79\x74\x35\x64\x61\x74\x61\x28\x29\x3B\x22\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x79\x74\x36\x64\x61\x74\x61\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x59\x6F\x75\x74\x75\x62\x65\x20\x4D\x65\x73\x73\x61\x67\x65\x20\x54\x65\x78\x74\x20\x36\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x79\x74\x36\x64\x61\x74\x61\x28\x29\x3B\x22\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x70\x69\x63\x31\x75\x72\x6C\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x4D\x65\x73\x73\x61\x67\x65\x20\x49\x63\x6F\x6E\x20\x49\x6D\x67\x75\x72\x20\x55\x72\x6C\x20\x31\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x62\x6C\x6F\x63\x6B\x3B\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x70\x69\x63\x31\x75\x72\x6C\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x72\x69\x67\x68\x74\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x65\x2E\x67\x2E\x20\x68\x74\x74\x70\x73\x3A\x2F\x2F\x69\x2E\x69\x6D\x67\x75\x72\x2E\x63\x6F\x6D\x2F\x52\x56\x42\x69\x33\x54\x31\x2E\x67\x69\x66\x22\x20\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x70\x69\x63\x32\x75\x72\x6C\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x4D\x65\x73\x73\x61\x67\x65\x20\x49\x63\x6F\x6E\x20\x49\x6D\x67\x75\x72\x20\x55\x72\x6C\x20\x32\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x70\x69\x63\x32\x75\x72\x6C\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x72\x69\x67\x68\x74\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x65\x2E\x67\x2E\x20\x68\x74\x74\x70\x73\x3A\x2F\x2F\x69\x2E\x69\x6D\x67\x75\x72\x2E\x63\x6F\x6D\x2F\x52\x56\x42\x69\x33\x54\x31\x2E\x67\x69\x66\x22\x20\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x70\x69\x63\x33\x75\x72\x6C\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x4D\x65\x73\x73\x61\x67\x65\x20\x49\x63\x6F\x6E\x20\x49\x6D\x67\x75\x72\x20\x55\x72\x6C\x20\x33\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x70\x69\x63\x33\x75\x72\x6C\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x72\x69\x67\x68\x74\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x65\x2E\x67\x2E\x20\x68\x74\x74\x70\x73\x3A\x2F\x2F\x69\x2E\x69\x6D\x67\x75\x72\x2E\x63\x6F\x6D\x2F\x52\x56\x42\x69\x33\x54\x31\x2E\x67\x69\x66\x22\x20\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x70\x69\x63\x34\x75\x72\x6C\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x4D\x65\x73\x73\x61\x67\x65\x20\x49\x63\x6F\x6E\x20\x49\x6D\x67\x75\x72\x20\x55\x72\x6C\x20\x34\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x70\x69\x63\x34\x75\x72\x6C\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x72\x69\x67\x68\x74\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x65\x2E\x67\x2E\x20\x68\x74\x74\x70\x73\x3A\x2F\x2F\x69\x2E\x69\x6D\x67\x75\x72\x2E\x63\x6F\x6D\x2F\x52\x56\x42\x69\x33\x54\x31\x2E\x67\x69\x66\x22\x20\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x70\x69\x63\x35\x75\x72\x6C\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x4D\x65\x73\x73\x61\x67\x65\x20\x49\x63\x6F\x6E\x20\x49\x6D\x67\x75\x72\x20\x55\x72\x6C\x20\x35\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x70\x69\x63\x35\x75\x72\x6C\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x72\x69\x67\x68\x74\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x65\x2E\x67\x2E\x20\x68\x74\x74\x70\x73\x3A\x2F\x2F\x69\x2E\x69\x6D\x67\x75\x72\x2E\x63\x6F\x6D\x2F\x52\x56\x42\x69\x33\x54\x31\x2E\x67\x69\x66\x22\x20\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x70\x69\x63\x36\x75\x72\x6C\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x4D\x65\x73\x73\x61\x67\x65\x20\x49\x63\x6F\x6E\x20\x49\x6D\x67\x75\x72\x20\x55\x72\x6C\x20\x36\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x70\x69\x63\x36\x75\x72\x6C\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x72\x69\x67\x68\x74\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x65\x2E\x67\x2E\x20\x68\x74\x74\x70\x73\x3A\x2F\x2F\x69\x2E\x69\x6D\x67\x75\x72\x2E\x63\x6F\x6D\x2F\x52\x56\x42\x69\x33\x54\x31\x2E\x67\x69\x66\x22\x20\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x79\x74\x31\x75\x72\x6C\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x59\x6F\x75\x74\x75\x62\x65\x20\x4D\x65\x73\x73\x61\x67\x65\x20\x55\x72\x6C\x20\x31\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x79\x74\x31\x75\x72\x6C\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x72\x69\x67\x68\x74\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x55\x72\x6C\x20\x6F\x66\x20\x79\x6F\x75\x74\x75\x62\x65\x20\x74\x6F\x20\x62\x65\x20\x73\x68\x6F\x77\x6E\x22\x20\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x79\x74\x32\x75\x72\x6C\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x59\x6F\x75\x74\x75\x62\x65\x20\x4D\x65\x73\x73\x61\x67\x65\x20\x55\x72\x6C\x20\x32\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x79\x74\x32\x75\x72\x6C\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x72\x69\x67\x68\x74\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x55\x72\x6C\x20\x6F\x66\x20\x79\x6F\x75\x74\x75\x62\x65\x20\x74\x6F\x20\x62\x65\x20\x73\x68\x6F\x77\x6E\x22\x20\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x79\x74\x33\x75\x72\x6C\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x59\x6F\x75\x74\x75\x62\x65\x20\x4D\x65\x73\x73\x61\x67\x65\x20\x55\x72\x6C\x20\x33\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x79\x74\x33\x75\x72\x6C\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x72\x69\x67\x68\x74\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x55\x72\x6C\x20\x6F\x66\x20\x79\x6F\x75\x74\x75\x62\x65\x20\x74\x6F\x20\x62\x65\x20\x73\x68\x6F\x77\x6E\x22\x20\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x79\x74\x34\x75\x72\x6C\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x59\x6F\x75\x74\x75\x62\x65\x20\x4D\x65\x73\x73\x61\x67\x65\x20\x55\x72\x6C\x20\x34\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x79\x74\x34\x75\x72\x6C\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x72\x69\x67\x68\x74\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x55\x72\x6C\x20\x6F\x66\x20\x79\x6F\x75\x74\x75\x62\x65\x20\x74\x6F\x20\x62\x65\x20\x73\x68\x6F\x77\x6E\x22\x20\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x79\x74\x35\x75\x72\x6C\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x59\x6F\x75\x74\x75\x62\x65\x20\x4D\x65\x73\x73\x61\x67\x65\x20\x55\x72\x6C\x20\x35\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x79\x74\x35\x75\x72\x6C\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x72\x69\x67\x68\x74\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x55\x72\x6C\x20\x6F\x66\x20\x79\x6F\x75\x74\x75\x62\x65\x20\x74\x6F\x20\x62\x65\x20\x73\x68\x6F\x77\x6E\x22\x20\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x79\x74\x36\x75\x72\x6C\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x59\x6F\x75\x74\x75\x62\x65\x20\x4D\x65\x73\x73\x61\x67\x65\x20\x55\x72\x6C\x20\x36\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x79\x74\x36\x75\x72\x6C\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x72\x69\x67\x68\x74\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x55\x72\x6C\x20\x6F\x66\x20\x79\x6F\x75\x74\x75\x62\x65\x20\x74\x6F\x20\x62\x65\x20\x73\x68\x6F\x77\x6E\x22\x20\x3E","\x3C\x64\x69\x76\x20\x63\x6C\x61\x73\x73\x3D\x22\x69\x6E\x70\x75\x74\x2D\x62\x6F\x78\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x74\x65\x78\x74\x2D\x61\x6C\x69\x67\x6E\x3A\x20\x63\x65\x6E\x74\x65\x72\x3B\x20\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x20\x31\x32\x70\x78\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x30\x70\x78\x3B\x20\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x20\x30\x20\x30\x70\x78\x20\x30\x3B\x22\x3E\x3C\x73\x70\x61\x6E\x20\x69\x64\x3D\x22\x6C\x65\x67\x65\x6E\x64\x6C\x61\x6E\x67\x75\x61\x67\x65\x74\x65\x78\x74\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x74\x69\x74\x6C\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x72\x69\x67\x68\x74\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x56\x69\x73\x69\x74\x20\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x20\x4C\x61\x6E\x67\x75\x61\x67\x65\x50\x61\x63\x6B\x45\x6E\x67\x6C\x69\x73\x68\x2E\x6A\x73\x20\x74\x6F\x20\x55\x70\x6C\x6F\x61\x64\x20\x61\x20\x4C\x61\x6E\x67\x75\x61\x67\x65\x20\x50\x61\x63\x6B\x22\x3E\x43\x68\x6F\x6F\x73\x65\x20\x4C\x61\x6E\x67\x75\x61\x67\x65\x3A\x20\x20\x3C\x2F\x73\x70\x61\x6E\x3E","\x3C\x73\x65\x6C\x65\x63\x74\x20\x69\x64\x3D\x22\x6C\x65\x67\x65\x6E\x64\x6C\x61\x6E\x67\x75\x61\x67\x65\x73\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x6F\x6E\x63\x68\x61\x6E\x67\x65\x3D\x22\x63\x68\x61\x6E\x67\x65\x4D\x6F\x64\x4C\x61\x6E\x67\x75\x61\x67\x65\x28\x29\x3B\x22\x20\x72\x65\x71\x75\x69\x72\x65\x64\x3D\x22\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x22\x20\x74\x69\x74\x6C\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x64\x69\x73\x70\x6C\x61\x79\x3A\x69\x6E\x6C\x69\x6E\x65\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x35\x30\x25\x22\x20\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x31\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x20\x73\x65\x6C\x65\x63\x74\x65\x64\x3E\x45\x6E\x67\x6C\x69\x73\x68\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x36\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x41\x72\x61\x62\x69\x63\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x34\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x42\x75\x6C\x67\x61\x72\x69\x61\x6E\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x35\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x46\x72\x65\x6E\x63\x68\x20\x2D\x20\x46\x72\x61\x6E\x63\x61\x69\x73\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x39\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x47\x65\x72\x6D\x61\x6E\x20\x2D\x20\x44\x65\x75\x74\x73\x63\x68\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x32\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x47\x72\x65\x65\x6B\x20\x2D\x20\u0395\u03BB\u03BB\u03B7\u03BD\u03B9\u03BA\u03AC\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x31\x31\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x50\x6F\x6C\x69\x73\x68\x20\x2D\x20\x50\x6F\x6C\x73\x6B\x69\x65\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x38\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x52\x75\x73\x73\x69\x61\x6E\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x33\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x53\x70\x61\x6E\x69\x73\x68\x20\x2D\x20\x45\x73\x70\x61\x6E\x6F\x6C\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x37\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x54\x72\x61\x64\x2E\x20\x43\x68\x69\x6E\x65\x73\x65\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x6F\x70\x74\x69\x6F\x6E\x20\x76\x61\x6C\x75\x65\x3D\x22\x31\x30\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x22\x3E\x54\x75\x72\x6B\x69\x73\x68\x20\x2D\x20\x54\xFC\x72\x6B\x3C\x2F\x6F\x70\x74\x69\x6F\x6E\x3E","\x3C\x2F\x73\x65\x6C\x65\x63\x74\x3E\x3C\x2F\x64\x69\x76\x3E","\x3C\x64\x69\x76\x20\x63\x6C\x61\x73\x73\x3D\x22\x69\x6E\x70\x75\x74\x2D\x62\x6F\x78\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x74\x65\x78\x74\x2D\x61\x6C\x69\x67\x6E\x3A\x20\x63\x65\x6E\x74\x65\x72\x3B\x20\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x20\x31\x32\x70\x78\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x34\x70\x78\x3B\x20\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x20\x30\x20\x30\x70\x78\x20\x30\x3B\x22\x3E\x3C\x73\x70\x61\x6E\x20\x69\x64\x3D\x22\x6C\x65\x67\x65\x6E\x64\x64\x69\x73\x63\x6F\x72\x64\x77\x65\x62\x68\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x74\x69\x74\x6C\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x22\x3E\x44\x69\x73\x63\x6F\x72\x64\x20\x57\x65\x62\x68\x6F\x6F\x6B\x20\x55\x72\x6C\x20\x28\x66\x6F\x72\x20\x73\x65\x6E\x64\x69\x6E\x67\x20\x54\x4F\x4B\x45\x4E\x29\x20\x20\x3C\x2F\x73\x70\x61\x6E\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x64\x69\x73\x63\x77\x65\x62\x68\x6F\x6F\x6B\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x44\x69\x73\x63\x6F\x72\x64\x20\x57\x65\x62\x68\x6F\x6F\x6B\x20\x31\x20\x55\x72\x6C\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x72\x69\x67\x68\x74\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x4D\x75\x73\x74\x20\x62\x65\x20\x66\x69\x6C\x6C\x65\x64\x20\x66\x6F\x72\x20\x66\x75\x6E\x63\x74\x69\x6F\x6E\x20\x74\x6F\x20\x77\x6F\x72\x6B\x2E\x20\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x69\x73\x63\x6F\x72\x64\x2E\x63\x6F\x6D\x2F\x61\x70\x69\x2F\x77\x65\x62\x68\x6F\x6F\x6B\x73\x2F\x2E\x2E\x2E\x2F\x2E\x2E\x2E\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x34\x39\x2E\x35\x25\x3B\x20\x62\x6F\x72\x64\x65\x72\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x64\x61\x72\x6B\x73\x6C\x61\x74\x65\x67\x72\x65\x79\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x6C\x65\x66\x74\x3A\x20\x30\x2E\x35\x25\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x69\x6E\x6C\x69\x6E\x65\x2D\x62\x6C\x6F\x63\x6B\x3B\x20\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x64\x69\x73\x63\x77\x65\x62\x68\x6F\x6F\x6B\x31\x28\x29\x3B\x22\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x64\x69\x73\x63\x77\x65\x62\x68\x6F\x6F\x6B\x32\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x44\x69\x73\x63\x6F\x72\x64\x20\x57\x65\x62\x68\x6F\x6F\x6B\x20\x32\x20\x55\x72\x6C\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x72\x69\x67\x68\x74\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x53\x65\x63\x6F\x6E\x64\x61\x72\x79\x20\x57\x65\x62\x68\x6F\x6F\x6B\x28\x6F\x70\x74\x69\x6F\x6E\x61\x6C\x29\x2E\x20\x68\x74\x74\x70\x73\x3A\x2F\x2F\x64\x69\x73\x63\x6F\x72\x64\x2E\x63\x6F\x6D\x2F\x61\x70\x69\x2F\x77\x65\x62\x68\x6F\x6F\x6B\x73\x2F\x2E\x2E\x2E\x2F\x2E\x2E\x2E\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x34\x39\x2E\x35\x25\x3B\x20\x62\x6F\x72\x64\x65\x72\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x64\x61\x72\x6B\x73\x6C\x61\x74\x65\x67\x72\x65\x79\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x72\x69\x67\x68\x74\x3A\x20\x30\x2E\x35\x25\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x69\x6E\x6C\x69\x6E\x65\x2D\x62\x6C\x6F\x63\x6B\x3B\x22\x20\x6F\x6E\x62\x6C\x75\x72\x3D\x22\x73\x65\x74\x64\x69\x73\x63\x77\x65\x62\x68\x6F\x6F\x6B\x32\x28\x29\x3B\x22\x3E","\x3C\x64\x69\x76\x20\x63\x6C\x61\x73\x73\x3D\x22\x69\x6E\x70\x75\x74\x2D\x62\x6F\x78\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x74\x65\x78\x74\x2D\x61\x6C\x69\x67\x6E\x3A\x20\x63\x65\x6E\x74\x65\x72\x3B\x20\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x20\x31\x32\x70\x78\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x34\x70\x78\x3B\x20\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x20\x30\x20\x30\x70\x78\x20\x30\x3B\x22\x3E\x3C\x73\x70\x61\x6E\x20\x69\x64\x3D\x22\x6C\x65\x67\x65\x6E\x64\x6F\x74\x68\x65\x72\x73\x63\x72\x69\x70\x74\x73\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x74\x69\x74\x6C\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x22\x3E\x45\x78\x70\x61\x6E\x73\x69\x6F\x6E\x73\x3A\x20\x3C\x2F\x73\x70\x61\x6E\x3E","\x3C\x2F\x64\x69\x76\x3E\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x4C\x45\x47\x45\x4E\x44\x41\x64\x73\x32\x22\x3E\x3C\x2F\x64\x69\x76\x3E\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x4C\x45\x47\x45\x4E\x44\x41\x64\x73\x33\x22\x3E\x3C\x2F\x64\x69\x76\x3E","\x23\x6D\x61\x69\x6E\x2D\x6D\x65\x6E\x75\x3E\x23\x70\x72\x6F\x66\x69\x6C\x65","\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65","\x31\x32\x70\x78","\x23\x55\x73\x65\x72\x50\x72\x6F\x66\x69\x6C\x65","\x70\x6F\x69\x6E\x74\x65\x72\x2D\x65\x76\x65\x6E\x74\x73","\x61\x75\x74\x6F","\x23\x6C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x2D\x6D\x65\x6E\x75","\x70\x61\x73\x74\x65","\x67\x65\x74\x44\x61\x74\x61","\x63\x6C\x69\x70\x62\x6F\x61\x72\x64\x44\x61\x74\x61","\x6F\x72\x69\x67\x69\x6E\x61\x6C\x45\x76\x65\x6E\x74","\x23\x73\x65\x61\x72\x63\x68\x42\x74\x6E","\x62\x69\x6E\x64","\x23\x6E\x6F\x74\x65\x31","\x23\x6E\x6F\x74\x65\x32","\x23\x6E\x6F\x74\x65\x33","\x23\x6E\x6F\x74\x65\x34","\x23\x6E\x6F\x74\x65\x35","\x23\x6E\x6F\x74\x65\x36","\x23\x6E\x6F\x74\x65\x37","\x2E\x6E\x6F\x74\x65","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x79\x6F\x75\x74\x75\x62\x65\x70\x6C\x61\x79\x65\x72\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x6C\x65\x66\x74\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x68\x35\x20\x63\x6C\x61\x73\x73\x3D\x22\x6D\x61\x69\x6E\x2D\x63\x6F\x6C\x6F\x72\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x72\x69\x67\x68\x74\x3A\x20\x31\x35\x70\x78\x3B\x22\x3E\x59\x6F\x75\x74\x75\x62\x65\x20\x70\x6C\x61\x79\x65\x72\x3C\x2F\x68\x35\x3E","\x3C\x69\x66\x72\x61\x6D\x65\x20\x69\x64\x3D\x22\x6D\x75\x73\x69\x63\x46\x72\x61\x6D\x65\x22\x20\x77\x69\x64\x74\x68\x3D\x22\x33\x35\x30\x22\x20\x68\x65\x69\x67\x68\x74\x3D\x22\x31\x38\x30\x22\x20\x73\x72\x63\x3D\x22","\x22\x20\x66\x72\x61\x6D\x65\x62\x6F\x72\x64\x65\x72\x3D\x22\x30\x22\x20\x61\x6C\x6C\x6F\x77\x66\x75\x6C\x6C\x73\x63\x72\x65\x65\x6E\x3D\x22\x22\x3E\x3C\x2F\x69\x66\x72\x61\x6D\x65\x3E\x3C\x2F\x64\x69\x76\x3E","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x61\x66\x74\x65\x72\x79\x6F\x75\x74\x75\x62\x65\x70\x6C\x61\x79\x65\x72\x22\x3E\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x6D\x75\x73\x69\x63\x55\x72\x6C\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x24\x28\x74\x68\x69\x73\x29\x2E\x73\x65\x6C\x65\x63\x74\x28\x29\x3B\x22\x20\x74\x79\x70\x65\x3D\x22\x74\x65\x78\x74\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x59\x6F\x75\x74\x75\x62\x65\x20\x55\x72\x6C\x22\x20\x76\x61\x6C\x75\x65\x3D\x22","\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x72\x69\x67\x68\x74\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x50\x61\x73\x74\x65\x20\x79\x6F\x75\x72\x20\x76\x69\x64\x65\x6F\x2F\x70\x6C\x61\x79\x6C\x69\x73\x74\x20\x68\x65\x72\x65\x22\x3E","\x69\x63\x6F\x6E\x2D\x75\x73\x65\x72","\x66\x61\x20\x66\x61\x2D\x63\x6F\x67\x20\x66\x61\x2D\x73\x70\x69\x6E\x20\x66\x61\x2D\x33\x78\x20\x66\x61\x2D\x66\x77","\x23\x65\x78\x70\x2D\x62\x61\x72\x20\x3E\x20\x2E\x69\x63\x6F\x6E\x2D\x75\x73\x65\x72","\x69\x6E\x70\x75\x74","\x6D\x61\x78\x6C\x65\x6E\x67\x74\x68","\x31\x30\x30\x30","\x63\x6C\x61\x73\x73","\x62\x74\x6E\x20\x62\x74\x6E\x2D\x73\x75\x63\x63\x65\x73\x73","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x73\x65\x61\x72\x63\x68\x4C\x6F\x67\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x6D\x61\x69\x6E\x2D\x63\x6F\x6C\x6F\x72\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x20\x31\x33\x70\x78\x3B\x66\x6C\x6F\x61\x74\x3A\x20\x6C\x65\x66\x74\x3B\x66\x6F\x6E\x74\x2D\x77\x65\x69\x67\x68\x74\x3A\x20\x37\x30\x30\x3B\x62\x6F\x72\x64\x65\x72\x2D\x72\x61\x64\x69\x75\x73\x3A\x20\x34\x70\x78\x3B\x77\x69\x64\x74\x68\x3A\x20\x36\x35\x25\x3B\x68\x65\x69\x67\x68\x74\x3A\x20\x32\x37\x30\x70\x78\x3B\x7A\x2D\x69\x6E\x64\x65\x78\x3A\x20\x31\x35\x3B\x6D\x61\x72\x67\x69\x6E\x3A\x20\x61\x75\x74\x6F\x3B\x74\x6F\x70\x3A\x20\x30\x70\x78\x3B\x72\x69\x67\x68\x74\x3A\x20\x30\x70\x78\x3B\x6C\x65\x66\x74\x3A\x20\x30\x70\x78\x3B\x62\x6F\x74\x74\x6F\x6D\x3A\x20\x2D\x33\x39\x30\x70\x78\x3B\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x20\x66\x69\x78\x65\x64\x3B\x70\x6F\x69\x6E\x74\x65\x72\x2D\x65\x76\x65\x6E\x74\x73\x3A\x20\x61\x75\x74\x6F\x3B\x63\x6F\x6C\x6F\x72\x3A\x20\x72\x67\x62\x28\x32\x35\x35\x2C\x20\x32\x35\x35\x2C\x20\x32\x35\x35\x29\x3B\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x31\x30\x70\x78\x3B\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x72\x67\x62\x61\x28\x30\x2C\x20\x30\x2C\x20\x30\x2C\x20\x30\x2E\x32\x29\x3B\x22\x3E\x3C\x68\x35\x20\x69\x64\x3D\x22\x6C\x6F\x67\x54\x69\x74\x6C\x65\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x6D\x61\x69\x6E\x2D\x63\x6F\x6C\x6F\x72\x20\x74\x65\x78\x74\x2D\x63\x65\x6E\x74\x65\x72\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x30\x70\x78\x3B\x22\x3E\x52\x65\x73\x75\x6C\x74\x73\x3C\x2F\x68\x35\x3E","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x6C\x6F\x67\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x66\x6F\x6E\x74\x2D\x77\x65\x69\x67\x68\x74\x3A\x20\x6E\x6F\x72\x6D\x61\x6C\x3B\x20\x6F\x76\x65\x72\x66\x6C\x6F\x77\x2D\x78\x3A\x20\x68\x69\x64\x64\x65\x6E\x3B\x20\x6F\x76\x65\x72\x66\x6C\x6F\x77\x2D\x79\x3A\x20\x61\x75\x74\x6F\x3B\x68\x65\x69\x67\x68\x74\x3A\x20\x39\x30\x25\x3B\x22\x3E","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x73\x68\x6F\x72\x74\x63\x75\x74\x73\x2D\x68\x75\x64\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x68\x75\x64\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x77\x69\x64\x74\x68\x3A\x20\x37\x30\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x33\x30\x70\x78\x3B\x20\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x70\x6F\x69\x6E\x74\x65\x72\x2D\x65\x76\x65\x6E\x74\x73\x3A\x20\x61\x75\x74\x6F\x3B\x20\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x20\x61\x62\x73\x6F\x6C\x75\x74\x65\x3B\x20\x72\x69\x67\x68\x74\x3A\x20\x30\x70\x78\x3B\x20\x74\x6F\x70\x3A\x20\x2D\x33\x30\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x62\x6C\x6F\x63\x6B\x3B\x22\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x56\x6F\x69\x63\x65\x42\x74\x6E\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x2D\x6C\x69\x6E\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x36\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x56\x6F\x69\x63\x65\x20\x26\x20\x43\x61\x6D\x65\x72\x61\x20\x43\x68\x61\x74\x22\x3E\x3C\x69\x20\x69\x64\x3D\x22\x56\x6F\x69\x63\x65\x42\x74\x6E\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x6D\x69\x63\x72\x6F\x70\x68\x6F\x6E\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x2D\x6C\x65\x66\x74\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x4D\x69\x6E\x69\x53\x63\x72\x69\x70\x74\x73\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x2D\x6C\x69\x6E\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x36\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x73\x65\x74\x73\x63\x72\x69\x70\x74\x69\x6E\x67\x66\x75\x6E\x63\x74\x69\x6F\x6E\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x4D\x69\x6E\x69\x20\x53\x63\x72\x69\x70\x74\x73\x22\x3E\x3C\x69\x20\x69\x64\x3D\x22\x4D\x69\x6E\x69\x53\x63\x72\x69\x70\x74\x73\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x6C\x69\x6E\x6F\x64\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x2D\x6C\x65\x66\x74\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x53\x65\x6E\x64\x43\x6F\x6D\x6D\x61\x6E\x64\x73\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x2D\x6C\x69\x6E\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x36\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x73\x65\x74\x6D\x65\x73\x73\x61\x67\x65\x63\x6F\x6D\x66\x75\x6E\x63\x74\x69\x6F\x6E\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x4D\x65\x73\x73\x61\x67\x65\x20\x53\x63\x72\x69\x70\x74\x20\x43\x6F\x6D\x6D\x61\x6E\x64\x73\x22\x3E\x3C\x69\x20\x69\x64\x3D\x22\x53\x65\x6E\x64\x43\x6F\x6D\x6D\x61\x6E\x64\x73\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x73\x69\x74\x65\x6D\x61\x70\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x2D\x6C\x65\x66\x74\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x49\x6D\x61\x67\x65\x73\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x2D\x6C\x69\x6E\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x36\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x73\x65\x74\x69\x63\x6F\x6E\x66\x75\x6E\x63\x74\x69\x6F\x6E\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x4D\x65\x73\x73\x61\x67\x65\x20\x49\x6D\x67\x75\x72\x20\x49\x63\x6F\x6E\x73\x22\x3E\x3C\x69\x20\x69\x64\x3D\x22\x49\x6D\x61\x67\x65\x73\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x70\x69\x63\x74\x75\x72\x65\x2D\x6F\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x2D\x6C\x65\x66\x74\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x79\x6F\x75\x74\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x2D\x6C\x69\x6E\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x36\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x73\x65\x74\x79\x74\x66\x75\x6E\x63\x74\x69\x6F\x6E\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x4D\x65\x73\x73\x61\x67\x65\x20\x59\x6F\x75\x74\x75\x62\x65\x20\x56\x69\x64\x65\x6F\x73\x22\x3E\x3C\x69\x20\x69\x64\x3D\x22\x79\x6F\x75\x74\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x79\x6F\x75\x74\x75\x62\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x2D\x6C\x65\x66\x74\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x70\x6C\x61\x79\x65\x72\x42\x74\x6E\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x2D\x6C\x69\x6E\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x36\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x43\x6C\x69\x63\x6B\x20\x70\x6C\x61\x79\x20\x6F\x6E\x20\x79\x6F\x75\x74\x75\x62\x65\x20\x74\x61\x62\x20\x61\x74\x20\x66\x69\x72\x73\x74\x22\x3E\x3C\x69\x20\x69\x64\x3D\x22\x70\x6C\x61\x79\x65\x72\x49\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x70\x6C\x61\x79\x2D\x63\x69\x72\x63\x6C\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x2D\x63\x65\x6E\x74\x65\x72\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x69\x6D\x61\x67\x65\x73\x2D\x68\x75\x64\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x68\x75\x64\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x77\x69\x64\x74\x68\x3A\x20\x37\x30\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x33\x30\x70\x78\x3B\x20\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x70\x6F\x69\x6E\x74\x65\x72\x2D\x65\x76\x65\x6E\x74\x73\x3A\x20\x61\x75\x74\x6F\x3B\x20\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x20\x61\x62\x73\x6F\x6C\x75\x74\x65\x3B\x20\x72\x69\x67\x68\x74\x3A\x20\x30\x70\x78\x3B\x20\x74\x6F\x70\x3A\x20\x2D\x36\x30\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x73\x65\x6E\x64\x69\x63\x6F\x6E\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x2D\x6C\x69\x6E\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x36\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x73\x65\x6E\x64\x69\x63\x6F\x6E\x31\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x42\x61\x64\x20\x43\x68\x6F\x69\x63\x65\x21\x22\x3E\x3C\x69\x20\x69\x64\x3D\x22\x73\x65\x6E\x64\x69\x63\x6F\x6E\x31\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x65\x78\x63\x6C\x61\x6D\x61\x74\x69\x6F\x6E\x2D\x74\x72\x69\x61\x6E\x67\x6C\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x2D\x6C\x65\x66\x74\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x73\x65\x6E\x64\x69\x63\x6F\x6E\x32\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x2D\x6C\x69\x6E\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x36\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x73\x65\x6E\x64\x69\x63\x6F\x6E\x32\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x57\x68\x79\x3F\x22\x3E\x3C\x69\x20\x69\x64\x3D\x22\x73\x65\x6E\x64\x69\x63\x6F\x6E\x32\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x71\x75\x65\x73\x74\x69\x6F\x6E\x2D\x63\x69\x72\x63\x6C\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x2D\x6C\x65\x66\x74\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x73\x65\x6E\x64\x69\x63\x6F\x6E\x33\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x2D\x6C\x69\x6E\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x36\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x73\x65\x6E\x64\x69\x63\x6F\x6E\x33\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x59\x6F\x77\x21\x21\x22\x3E\x3C\x69\x20\x69\x64\x3D\x22\x73\x65\x6E\x64\x69\x63\x6F\x6E\x33\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x77\x68\x65\x65\x6C\x63\x68\x61\x69\x72\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x2D\x63\x65\x6E\x74\x65\x72\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x73\x65\x6E\x64\x69\x63\x6F\x6E\x34\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x2D\x6C\x69\x6E\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x36\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x73\x65\x6E\x64\x69\x63\x6F\x6E\x34\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x44\x65\x61\x74\x68\x21\x22\x3E\x3C\x69\x20\x69\x64\x3D\x22\x73\x65\x6E\x64\x69\x63\x6F\x6E\x34\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x63\x75\x74\x6C\x65\x72\x79\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x2D\x63\x65\x6E\x74\x65\x72\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x73\x65\x6E\x64\x69\x63\x6F\x6E\x35\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x2D\x6C\x69\x6E\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x36\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x73\x65\x6E\x64\x69\x63\x6F\x6E\x35\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x52\x65\x6C\x61\x78\x21\x22\x3E\x3C\x69\x20\x69\x64\x3D\x22\x73\x65\x6E\x64\x69\x63\x6F\x6E\x35\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x62\x65\x64\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x2D\x6C\x65\x66\x74\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x73\x65\x6E\x64\x69\x63\x6F\x6E\x36\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x2D\x6C\x69\x6E\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x36\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x73\x65\x6E\x64\x69\x63\x6F\x6E\x36\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x4C\x65\x67\x65\x6E\x64\x21\x22\x3E\x3C\x69\x20\x69\x64\x3D\x22\x73\x65\x6E\x64\x69\x63\x6F\x6E\x36\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x74\x65\x6C\x65\x67\x72\x61\x6D\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x2D\x6C\x65\x66\x74\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E\x3C\x2F\x64\x69\x76\x3E","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x79\x74\x2D\x68\x75\x64\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x68\x75\x64\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x77\x69\x64\x74\x68\x3A\x20\x37\x30\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x33\x30\x70\x78\x3B\x20\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x70\x6F\x69\x6E\x74\x65\x72\x2D\x65\x76\x65\x6E\x74\x73\x3A\x20\x61\x75\x74\x6F\x3B\x20\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x20\x61\x62\x73\x6F\x6C\x75\x74\x65\x3B\x20\x72\x69\x67\x68\x74\x3A\x20\x30\x70\x78\x3B\x20\x74\x6F\x70\x3A\x20\x2D\x36\x30\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x73\x65\x6E\x64\x79\x74\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x2D\x6C\x69\x6E\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x36\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x73\x65\x6E\x64\x79\x74\x31\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x52\x69\x63\x6B\x20\x41\x73\x74\x6C\x65\x79\x20\x2D\x20\x4E\x65\x76\x65\x72\x20\x47\x6F\x6E\x6E\x61\x20\x47\x69\x76\x65\x20\x59\x6F\x75\x20\x55\x70\x22\x3E\x3C\x69\x20\x69\x64\x3D\x22\x73\x65\x6E\x64\x79\x74\x31\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x6D\x75\x73\x69\x63\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x2D\x6C\x65\x66\x74\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x73\x65\x6E\x64\x79\x74\x32\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x2D\x6C\x69\x6E\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x36\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x73\x65\x6E\x64\x79\x74\x32\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x53\x75\x72\x76\x69\x76\x6F\x72\x20\x2D\x20\x45\x79\x65\x20\x4F\x66\x20\x54\x68\x65\x20\x54\x69\x67\x65\x72\x22\x3E\x3C\x69\x20\x69\x64\x3D\x22\x73\x65\x6E\x64\x79\x74\x32\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x6D\x75\x73\x69\x63\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x2D\x6C\x65\x66\x74\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x73\x65\x6E\x64\x79\x74\x33\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x2D\x6C\x69\x6E\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x36\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x73\x65\x6E\x64\x79\x74\x33\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x4C\x69\x6F\x6E\x20\x6B\x69\x6E\x67\x20\x2D\x20\x54\x68\x65\x20\x4C\x69\x6F\x6E\x20\x53\x6C\x65\x65\x70\x73\x20\x54\x6F\x6E\x69\x67\x68\x74\x22\x3E\x3C\x69\x20\x69\x64\x3D\x22\x73\x65\x6E\x64\x79\x74\x33\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x6D\x75\x73\x69\x63\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x2D\x63\x65\x6E\x74\x65\x72\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x73\x65\x6E\x64\x79\x74\x34\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x2D\x6C\x69\x6E\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x36\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x73\x65\x6E\x64\x79\x74\x34\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x41\x67\x61\x72\x69\x6F\x20\x2D\x20\x4A\x75\x6D\x62\x6F\x20\x53\x6F\x6C\x6F\x20\x76\x73\x20\x54\x65\x61\x6D\x73\x22\x3E\x3C\x69\x20\x69\x64\x3D\x22\x73\x65\x6E\x64\x79\x74\x34\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x76\x69\x64\x65\x6F\x2D\x63\x61\x6D\x65\x72\x61\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x2D\x63\x65\x6E\x74\x65\x72\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x73\x65\x6E\x64\x79\x74\x35\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x2D\x6C\x69\x6E\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x36\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x73\x65\x6E\x64\x79\x74\x35\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x41\x67\x61\x72\x69\x6F\x20\x2D\x20\x4B\x69\x6C\x6C\x33\x72\x20\x76\x73\x20\x54\x65\x61\x6D\x73\x22\x3E\x3C\x69\x20\x69\x64\x3D\x22\x73\x65\x6E\x64\x79\x74\x35\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x76\x69\x64\x65\x6F\x2D\x63\x61\x6D\x65\x72\x61\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x2D\x6C\x65\x66\x74\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x73\x65\x6E\x64\x79\x74\x36\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x2D\x6C\x69\x6E\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x36\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x73\x65\x6E\x64\x79\x74\x36\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x50\x72\x6F\x6D\x6F\x74\x69\x6F\x6E\x61\x6C\x20\x56\x69\x64\x65\x6F\x22\x3E\x3C\x69\x20\x69\x64\x3D\x22\x73\x65\x6E\x64\x79\x74\x36\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x74\x65\x6C\x65\x67\x72\x61\x6D\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x2D\x6C\x65\x66\x74\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E\x3C\x2F\x64\x69\x76\x3E","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x6D\x73\x67\x63\x6F\x6D\x6D\x61\x6E\x64\x73\x2D\x68\x75\x64\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x68\x75\x64\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x77\x69\x64\x74\x68\x3A\x20\x37\x30\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x33\x30\x70\x78\x3B\x20\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x70\x6F\x69\x6E\x74\x65\x72\x2D\x65\x76\x65\x6E\x74\x73\x3A\x20\x61\x75\x74\x6F\x3B\x20\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x20\x61\x62\x73\x6F\x6C\x75\x74\x65\x3B\x20\x72\x69\x67\x68\x74\x3A\x20\x30\x70\x78\x3B\x20\x74\x6F\x70\x3A\x20\x2D\x36\x30\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x6D\x73\x67\x63\x6F\x6D\x6D\x61\x6E\x64\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x2D\x6C\x69\x6E\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x36\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x6D\x73\x67\x63\x6F\x6D\x6D\x61\x6E\x64\x31\x66\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x48\x65\x6C\x6C\x6F\x20\x54\x65\x61\x6D\x21\x22\x3E\x3C\x69\x20\x69\x64\x3D\x22\x6D\x73\x67\x63\x6F\x6D\x6D\x61\x6E\x64\x31\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x63\x6F\x66\x66\x65\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x2D\x6C\x65\x66\x74\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x6D\x73\x67\x63\x6F\x6D\x6D\x61\x6E\x64\x32\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x2D\x6C\x69\x6E\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x36\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x6D\x73\x67\x63\x6F\x6D\x6D\x61\x6E\x64\x32\x66\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x4C\x61\x75\x67\x68\x20\x74\x6F\x20\x54\x65\x61\x6D\x22\x3E\x3C\x69\x20\x69\x64\x3D\x22\x6D\x73\x67\x63\x6F\x6D\x6D\x61\x6E\x64\x32\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x73\x6D\x69\x6C\x65\x2D\x6F\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x2D\x6C\x65\x66\x74\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x6D\x73\x67\x63\x6F\x6D\x6D\x61\x6E\x64\x33\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x2D\x6C\x69\x6E\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x36\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x6D\x73\x67\x63\x6F\x6D\x6D\x61\x6E\x64\x33\x66\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x54\x65\x61\x6D\x20\x43\x68\x61\x6E\x67\x65\x20\x4E\x61\x6D\x65\x20\x74\x6F\x20\x79\x6F\x75\x72\x73\x22\x3E\x3C\x69\x20\x69\x64\x3D\x22\x6D\x73\x67\x63\x6F\x6D\x6D\x61\x6E\x64\x33\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x6D\x61\x67\x69\x63\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x2D\x63\x65\x6E\x74\x65\x72\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x6D\x73\x67\x63\x6F\x6D\x6D\x61\x6E\x64\x34\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x2D\x6C\x69\x6E\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x36\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x6D\x73\x67\x63\x6F\x6D\x6D\x61\x6E\x64\x34\x66\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x54\x72\x6F\x6C\x6C\x20\x54\x65\x61\x6D\x6D\x61\x74\x65\x22\x3E\x3C\x69\x20\x69\x64\x3D\x22\x6D\x73\x67\x63\x6F\x6D\x6D\x61\x6E\x64\x34\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x62\x61\x74\x68\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x2D\x63\x65\x6E\x74\x65\x72\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x6D\x73\x67\x63\x6F\x6D\x6D\x61\x6E\x64\x35\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x2D\x6C\x69\x6E\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x36\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x6D\x73\x67\x63\x6F\x6D\x6D\x61\x6E\x64\x35\x66\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x4F\x70\x65\x6E\x20\x59\x6F\x75\x74\x75\x62\x65\x20\x4D\x75\x73\x69\x63\x22\x3E\x3C\x69\x20\x69\x64\x3D\x22\x6D\x73\x67\x63\x6F\x6D\x6D\x61\x6E\x64\x35\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x79\x6F\x75\x74\x75\x62\x65\x2D\x70\x6C\x61\x79\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x2D\x6C\x65\x66\x74\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x6D\x73\x67\x63\x6F\x6D\x6D\x61\x6E\x64\x36\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x2D\x6C\x69\x6E\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x36\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x6D\x73\x67\x63\x6F\x6D\x6D\x61\x6E\x64\x36\x66\x28\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x49\x6E\x73\x61\x6E\x65\x20\x6D\x6F\x64\x65\x20\x28\x48\x69\x64\x65\x20\x45\x76\x65\x72\x79\x74\x68\x69\x6E\x67\x29\x22\x3E\x3C\x69\x20\x69\x64\x3D\x22\x6D\x73\x67\x63\x6F\x6D\x6D\x61\x6E\x64\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x65\x78\x63\x6C\x61\x6D\x61\x74\x69\x6F\x6E\x2D\x74\x72\x69\x61\x6E\x67\x6C\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x2D\x6C\x65\x66\x74\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E\x3C\x2F\x64\x69\x76\x3E","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x73\x63\x72\x69\x70\x74\x69\x6E\x67\x2D\x68\x75\x64\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x68\x75\x64\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x77\x69\x64\x74\x68\x3A\x20\x31\x32\x2E\x35\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x33\x30\x70\x78\x3B\x20\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x70\x6F\x69\x6E\x74\x65\x72\x2D\x65\x76\x65\x6E\x74\x73\x3A\x20\x61\x75\x74\x6F\x3B\x20\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x20\x61\x62\x73\x6F\x6C\x75\x74\x65\x3B\x20\x72\x69\x67\x68\x74\x3A\x20\x30\x70\x78\x3B\x20\x74\x6F\x70\x3A\x20\x2D\x36\x30\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x43\x75\x74\x6E\x61\x6D\x65\x73\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x2D\x6C\x69\x6E\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x30\x30\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x45\x64\x69\x74\x20\x6E\x61\x6D\x65\x73\x22\x3E\x3C\x69\x20\x69\x64\x3D\x22\x43\x75\x74\x6E\x61\x6D\x65\x73\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x73\x63\x69\x73\x73\x6F\x72\x73\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x2D\x6C\x65\x66\x74\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x6C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x2D\x6D\x65\x6E\x75\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x6F\x69\x6E\x74\x65\x72\x2D\x65\x76\x65\x6E\x74\x73\x3A\x20\x61\x75\x74\x6F\x3B\x22\x3E","\x3C\x61\x20\x69\x64\x3D\x22\x73\x65\x61\x72\x63\x68\x53\x68\x6F\x72\x74\x63\x75\x74\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x69\x6E\x66\x6F\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x6C\x65\x66\x74\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x4A\x6F\x69\x6E\x20\x73\x65\x72\x76\x65\x72\x20\x28\x42\x61\x63\x6B\x73\x70\x61\x63\x65\x29\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x77\x69\x64\x74\x68\x3A\x20\x33\x33\x2E\x33\x25\x3B\x74\x65\x78\x74\x2D\x73\x68\x61\x64\x6F\x77\x3A\x20\x30\x2E\x33\x70\x78\x20\x30\x2E\x33\x70\x78\x20\x23\x30\x30\x30\x30\x30\x30\x3B\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x20\x73\x6D\x61\x6C\x6C\x3B\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x30\x70\x78\x3B\x62\x6F\x72\x64\x65\x72\x2D\x74\x6F\x70\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x72\x67\x62\x28\x31\x34\x31\x2C\x20\x32\x30\x31\x2C\x20\x36\x34\x29\x3B\x62\x6F\x72\x64\x65\x72\x2D\x62\x6F\x74\x74\x6F\x6D\x2D\x73\x74\x79\x6C\x65\x3A\x20\x6E\x6F\x6E\x65\x3B\x62\x6F\x72\x64\x65\x72\x2D\x6C\x65\x66\x74\x2D\x73\x74\x79\x6C\x65\x3A\x20\x6E\x6F\x6E\x65\x3B\x62\x6F\x72\x64\x65\x72\x3A\x20\x6E\x6F\x6E\x65\x3B\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x30\x70\x78\x3B\x20\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x63\x6F\x6C\x6F\x72\x3A\x20","\x20\x3B\x20\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x53\x65\x61\x72\x63\x68\x20\x6C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x73\x22\x20\x74\x69\x74\x6C\x65\x3D\x22\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x73\x65\x61\x72\x63\x68\x20\x66\x61\x2D\x6C\x67\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x61\x3E","\x3C\x61\x20\x69\x64\x3D\x22\x63\x6F\x70\x79\x53\x49\x50\x42\x74\x6E\x22\x20\x68\x72\x65\x66\x3D\x22\x6A\x61\x76\x61\x73\x63\x72\x69\x70\x74\x3A\x76\x6F\x69\x64\x28\x30\x29\x3B\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x73\x6D\x20\x62\x74\x6E\x2D\x63\x6F\x70\x79\x2D\x6C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x20\x62\x74\x6E\x2D\x69\x6E\x66\x6F\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x63\x6F\x6C\x6F\x72\x3A\x20","\x20\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x33\x33\x2E\x33\x25\x3B\x74\x65\x78\x74\x2D\x73\x68\x61\x64\x6F\x77\x3A\x20\x30\x2E\x33\x70\x78\x20\x30\x2E\x33\x70\x78\x20\x23\x30\x30\x30\x30\x30\x30\x3B\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x20\x73\x6D\x61\x6C\x6C\x3B\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x30\x70\x78\x3B\x2F\x2A\x20\x62\x6F\x72\x64\x65\x72\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x2A\x2F\x62\x6F\x72\x64\x65\x72\x2D\x6C\x65\x66\x74\x2D\x73\x74\x79\x6C\x65\x3A\x20\x6E\x6F\x6E\x65\x3B\x62\x6F\x72\x64\x65\x72\x2D\x72\x69\x67\x68\x74\x2D\x73\x74\x79\x6C\x65\x3A\x20\x6E\x6F\x6E\x65\x3B\x62\x6F\x72\x64\x65\x72\x2D\x62\x6F\x74\x74\x6F\x6D\x2D\x73\x74\x79\x6C\x65\x3A\x20\x6E\x6F\x6E\x65\x3B\x62\x6F\x72\x64\x65\x72\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x75\x73\x65\x72\x2D\x64\x72\x61\x67\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x75\x73\x65\x72\x2D\x73\x65\x6C\x65\x63\x74\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x2D\x6D\x6F\x7A\x2D\x75\x73\x65\x72\x2D\x73\x65\x6C\x65\x63\x74\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x2D\x77\x65\x62\x6B\x69\x74\x2D\x75\x73\x65\x72\x2D\x64\x72\x61\x67\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x2D\x77\x65\x62\x6B\x69\x74\x2D\x75\x73\x65\x72\x2D\x73\x65\x6C\x65\x63\x74\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x2D\x6D\x73\x2D\x75\x73\x65\x72\x2D\x73\x65\x6C\x65\x63\x74\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x6C\x65\x66\x74\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x43\x6F\x70\x79\x20\x54\x6F\x6B\x65\x6E\x2F\x53\x49\x50\x22\x3E\x43\x6F\x70\x79\x3C\x2F\x61\x3E","\x3C\x61\x20\x69\x64\x3D\x22\x72\x65\x63\x6F\x6E\x6E\x65\x63\x74\x42\x74\x6E\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x69\x6E\x66\x6F\x22\x20\x74\x69\x74\x6C\x65\x3D\x22\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x62\x6F\x74\x74\x6F\x6D\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x43\x68\x61\x6E\x67\x65\x20\x73\x65\x72\x76\x65\x72\x20\x28\x2B\x29\x22\x20\x73\x74\x79\x6C\x65\x3D\x22","\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x63\x6F\x6C\x6F\x72\x3A\x20","\x20\x3B\x77\x69\x64\x74\x68\x3A\x20\x33\x33\x2E\x33\x25\x3B\x20\x74\x65\x78\x74\x2D\x73\x68\x61\x64\x6F\x77\x3A\x20\x30\x2E\x33\x70\x78\x20\x30\x2E\x33\x70\x78\x20\x23\x30\x30\x30\x30\x30\x30\x3B\x20\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x20\x73\x6D\x61\x6C\x6C\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x30\x70\x78\x3B\x20\x62\x6F\x72\x64\x65\x72\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x72\x65\x66\x72\x65\x73\x68\x20\x66\x61\x2D\x6C\x67\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x61\x3E","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x64\x72\x6F\x70\x44\x6F\x77\x6E\x33\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x68\x75\x64\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x20\x61\x62\x73\x6F\x6C\x75\x74\x65\x3B\x20\x70\x6F\x69\x6E\x74\x65\x72\x2D\x65\x76\x65\x6E\x74\x73\x3A\x20\x61\x75\x74\x6F\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x33\x33\x25\x3B\x20\x6C\x65\x66\x74\x3A\x20\x30\x70\x78\x3B\x20\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x62\x6F\x72\x64\x65\x72\x2D\x72\x61\x64\x69\x75\x73\x3A\x20\x30\x70\x78\x3B\x22\x3E","\x3C\x61\x20\x69\x64\x3D\x22\x6C\x61\x73\x74\x49\x50\x42\x74\x6E\x22\x20\x64\x61\x74\x61\x2D\x64\x69\x73\x61\x62\x6C\x65\x64\x3D\x22\x74\x72\x75\x65\x22\x20\x68\x72\x65\x66\x3D\x22\x6A\x61\x76\x61\x73\x63\x72\x69\x70\x74\x3A\x76\x6F\x69\x64\x28\x30\x29\x3B\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x73\x6D\x20\x62\x74\x6E\x2D\x63\x6F\x70\x79\x2D\x6C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x20\x62\x74\x6E\x2D\x69\x6E\x66\x6F\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x77\x69\x64\x74\x68\x3A\x20\x31\x30\x30\x25\x3B\x74\x65\x78\x74\x2D\x73\x68\x61\x64\x6F\x77\x3A\x20\x30\x2E\x33\x70\x78\x20\x30\x2E\x33\x70\x78\x20\x23\x30\x30\x30\x30\x30\x30\x3B\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x20\x73\x6D\x61\x6C\x6C\x3B\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x30\x70\x78\x3B\x62\x6F\x72\x64\x65\x72\x2D\x74\x6F\x70\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x72\x67\x62\x28\x31\x34\x31\x2C\x20\x32\x30\x31\x2C\x20\x36\x34\x29\x3B\x62\x6F\x72\x64\x65\x72\x2D\x62\x6F\x74\x74\x6F\x6D\x2D\x73\x74\x79\x6C\x65\x3A\x20\x6E\x6F\x6E\x65\x3B\x62\x6F\x72\x64\x65\x72\x2D\x6C\x65\x66\x74\x2D\x73\x74\x79\x6C\x65\x3A\x20\x6E\x6F\x6E\x65\x3B\x62\x6F\x72\x64\x65\x72\x3A\x20\x6E\x6F\x6E\x65\x3B\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x30\x70\x78\x3B\x20\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x63\x6F\x6C\x6F\x72\x3A\x20","\x20\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x68\x74\x6D\x6C\x3D\x22\x74\x72\x75\x65\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x6C\x65\x66\x74\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x3C\x70\x20\x73\x74\x79\x6C\x65\x3D\x26\x71\x75\x6F\x74\x3B\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x33\x70\x78\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x62\x6F\x74\x74\x6F\x6D\x3A\x30\x70\x78\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x72\x69\x67\x68\x74\x3A\x20\x32\x70\x78\x3B\x26\x71\x75\x6F\x74\x3B\x20\x61\x6C\x69\x67\x6E\x3D\x26\x71\x75\x6F\x74\x3B\x63\x65\x6E\x74\x65\x72\x26\x71\x75\x6F\x74\x3B\x3E\x3C\x73\x70\x61\x6E\x20\x63\x6C\x61\x73\x73\x3D\x26\x71\x75\x6F\x74\x3B\x68\x75\x64\x2D\x6D\x61\x69\x6E\x2D\x63\x6F\x6C\x6F\x72\x26\x71\x75\x6F\x74\x3B\x20\x73\x74\x79\x6C\x65\x3D\x26\x71\x75\x6F\x74\x3B\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x61\x62\x73\x6F\x6C\x75\x74\x65\x3B\x20\x6C\x65\x66\x74\x3A\x20\x31\x35\x70\x78\x3B\x26\x71\x75\x6F\x74\x3B\x3E\x4E\x45\x57\x3C\x2F\x73\x70\x61\x6E\x3E\x4A\x6F\x69\x6E\x20\x62\x61\x63\x6B\x3C\x2F\x70\x3E\x3C\x68\x72\x20\x73\x74\x79\x6C\x65\x3D\x26\x71\x75\x6F\x74\x3B\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x35\x70\x78\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x62\x6F\x74\x74\x6F\x6D\x3A\x31\x30\x70\x78\x3B\x20\x62\x6F\x72\x64\x65\x72\x2D\x63\x6F\x6C\x6F\x72\x3A\x64\x61\x72\x6B\x73\x6C\x61\x74\x65\x67\x72\x61\x79\x3B\x26\x71\x75\x6F\x74\x3B\x2F\x3E\x3C\x70\x20\x63\x6C\x61\x73\x73\x3D\x26\x71\x75\x6F\x74\x3B\x26\x71\x75\x6F\x74\x3B\x20\x73\x74\x79\x6C\x65\x3D\x26\x71\x75\x6F\x74\x3B\x6D\x61\x72\x67\x69\x6E\x2D\x62\x6F\x74\x74\x6F\x6D\x3A\x33\x70\x78\x3B\x20\x66\x6F\x6E\x74\x2D\x77\x65\x69\x67\x68\x74\x3A\x6E\x6F\x72\x6D\x61\x6C\x3B\x26\x71\x75\x6F\x74\x3B\x20\x61\x6C\x69\x67\x6E\x3D\x26\x71\x75\x6F\x74\x3B\x6A\x75\x73\x74\x69\x66\x79\x26\x71\x75\x6F\x74\x3B\x3E\x43\x6F\x6E\x6E\x65\x63\x74\x20\x74\x6F\x20\x6C\x61\x73\x74\x20\x49\x50\x20\x79\x6F\x75\x20\x70\x6C\x61\x79\x65\x64\x3C\x2F\x70\x3E\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x61\x72\x72\x6F\x77\x2D\x63\x69\x72\x63\x6C\x65\x2D\x64\x6F\x77\x6E\x20\x66\x61\x2D\x6C\x67\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x61\x3E","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x64\x72\x6F\x70\x44\x6F\x77\x6E\x32\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x68\x75\x64\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x20\x61\x62\x73\x6F\x6C\x75\x74\x65\x3B\x20\x70\x6F\x69\x6E\x74\x65\x72\x2D\x65\x76\x65\x6E\x74\x73\x3A\x20\x61\x75\x74\x6F\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x33\x33\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x39\x30\x70\x78\x3B\x20\x6C\x65\x66\x74\x3A\x20\x36\x37\x70\x78\x3B\x20\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x62\x6F\x72\x64\x65\x72\x2D\x72\x61\x64\x69\x75\x73\x3A\x20\x30\x70\x78\x3B\x22\x3E","\x3C\x61\x20\x69\x64\x3D\x22\x63\x6F\x70\x79\x53\x49\x50\x61\x6E\x64\x50\x61\x73\x73\x22\x20\x68\x72\x65\x66\x3D\x22\x6A\x61\x76\x61\x73\x63\x72\x69\x70\x74\x3A\x76\x6F\x69\x64\x28\x30\x29\x3B\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x73\x6D\x20\x62\x74\x6E\x2D\x63\x6F\x70\x79\x2D\x6C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x20\x62\x74\x6E\x2D\x69\x6E\x66\x6F\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x63\x6F\x6C\x6F\x72\x3A\x20","\x20\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x30\x30\x25\x3B\x74\x65\x78\x74\x2D\x73\x68\x61\x64\x6F\x77\x3A\x20\x72\x67\x62\x28\x30\x2C\x20\x30\x2C\x20\x30\x29\x20\x30\x2E\x33\x70\x78\x20\x30\x2E\x33\x70\x78\x3B\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x20\x73\x6D\x61\x6C\x6C\x3B\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x30\x70\x78\x3B\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x62\x6C\x6F\x63\x6B\x3B\x62\x6F\x72\x64\x65\x72\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x75\x73\x65\x72\x2D\x64\x72\x61\x67\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x75\x73\x65\x72\x2D\x73\x65\x6C\x65\x63\x74\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x2D\x6D\x6F\x7A\x2D\x75\x73\x65\x72\x2D\x73\x65\x6C\x65\x63\x74\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x2D\x77\x65\x62\x6B\x69\x74\x2D\x75\x73\x65\x72\x2D\x64\x72\x61\x67\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x2D\x77\x65\x62\x6B\x69\x74\x2D\x75\x73\x65\x72\x2D\x73\x65\x6C\x65\x63\x74\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x2D\x6D\x73\x2D\x75\x73\x65\x72\x2D\x73\x65\x6C\x65\x63\x74\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x6C\x65\x66\x74\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x43\x6F\x70\x79\x20\x54\x6F\x6B\x65\x6E\x2F\x53\x49\x50\x26\x50\x61\x73\x73\x77\x6F\x72\x64\x22\x3E\x54\x4B\x26\x50\x57\x3C\x2F\x61\x3E","\x3C\x61\x20\x69\x64\x3D\x22\x63\x6F\x70\x79\x4C\x42\x42\x74\x6E\x22\x20\x68\x72\x65\x66\x3D\x22\x6A\x61\x76\x61\x73\x63\x72\x69\x70\x74\x3A\x76\x6F\x69\x64\x28\x30\x29\x3B\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x73\x6D\x20\x62\x74\x6E\x2D\x63\x6F\x70\x79\x2D\x6C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x20\x62\x74\x6E\x2D\x69\x6E\x66\x6F\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x63\x6F\x6C\x6F\x72\x3A\x20","\x20\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x30\x30\x25\x3B\x74\x65\x78\x74\x2D\x73\x68\x61\x64\x6F\x77\x3A\x20\x72\x67\x62\x28\x30\x2C\x20\x30\x2C\x20\x30\x29\x20\x30\x2E\x33\x70\x78\x20\x30\x2E\x33\x70\x78\x3B\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x20\x73\x6D\x61\x6C\x6C\x3B\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x30\x70\x78\x3B\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x62\x6C\x6F\x63\x6B\x3B\x62\x6F\x72\x64\x65\x72\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x75\x73\x65\x72\x2D\x64\x72\x61\x67\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x75\x73\x65\x72\x2D\x73\x65\x6C\x65\x63\x74\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x2D\x6D\x6F\x7A\x2D\x75\x73\x65\x72\x2D\x73\x65\x6C\x65\x63\x74\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x2D\x77\x65\x62\x6B\x69\x74\x2D\x75\x73\x65\x72\x2D\x64\x72\x61\x67\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x2D\x77\x65\x62\x6B\x69\x74\x2D\x75\x73\x65\x72\x2D\x73\x65\x6C\x65\x63\x74\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x2D\x6D\x73\x2D\x75\x73\x65\x72\x2D\x73\x65\x6C\x65\x63\x74\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x6C\x65\x66\x74\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x43\x6F\x70\x79\x20\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x20\x28\x4C\x29\x22\x3E\x4C\x42\x3C\x2F\x61\x3E","\x3C\x61\x20\x69\x64\x3D\x22\x63\x6F\x70\x79\x53\x49\x50\x50\x61\x73\x73\x4C\x42\x22\x20\x68\x72\x65\x66\x3D\x22\x6A\x61\x76\x61\x73\x63\x72\x69\x70\x74\x3A\x76\x6F\x69\x64\x28\x30\x29\x3B\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x73\x6D\x20\x62\x74\x6E\x2D\x63\x6F\x70\x79\x2D\x6C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x20\x62\x74\x6E\x2D\x69\x6E\x66\x6F\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x63\x6F\x6C\x6F\x72\x3A\x20\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x74\x3B\x63\x6F\x6C\x6F\x72\x3A\x20","\x20\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x31\x30\x30\x25\x3B\x74\x65\x78\x74\x2D\x73\x68\x61\x64\x6F\x77\x3A\x20\x72\x67\x62\x28\x30\x2C\x20\x30\x2C\x20\x30\x29\x20\x30\x2E\x33\x70\x78\x20\x30\x2E\x33\x70\x78\x3B\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x20\x73\x6D\x61\x6C\x6C\x3B\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x30\x70\x78\x3B\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x62\x6C\x6F\x63\x6B\x3B\x62\x6F\x72\x64\x65\x72\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x75\x73\x65\x72\x2D\x64\x72\x61\x67\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x75\x73\x65\x72\x2D\x73\x65\x6C\x65\x63\x74\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x2D\x6D\x6F\x7A\x2D\x75\x73\x65\x72\x2D\x73\x65\x6C\x65\x63\x74\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x2D\x77\x65\x62\x6B\x69\x74\x2D\x75\x73\x65\x72\x2D\x64\x72\x61\x67\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x2D\x77\x65\x62\x6B\x69\x74\x2D\x75\x73\x65\x72\x2D\x73\x65\x6C\x65\x63\x74\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x2D\x6D\x73\x2D\x75\x73\x65\x72\x2D\x73\x65\x6C\x65\x63\x74\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x6C\x65\x66\x74\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x43\x6F\x70\x79\x20\x54\x6F\x6B\x65\x6E\x2F\x53\x49\x50\x2C\x20\x50\x61\x73\x73\x77\x6F\x72\x64\x2C\x20\x4C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x2E\x2E\x2E\x22\x3E\x54\x4B\x26\x41\x4C\x4C\x3C\x2F\x61\x3E","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x64\x72\x6F\x70\x44\x6F\x77\x6E\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x68\x75\x64\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x20\x61\x62\x73\x6F\x6C\x75\x74\x65\x3B\x20\x70\x6F\x69\x6E\x74\x65\x72\x2D\x65\x76\x65\x6E\x74\x73\x3A\x20\x61\x75\x74\x6F\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x33\x33\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x33\x30\x70\x78\x3B\x20\x6C\x65\x66\x74\x3A\x20\x36\x37\x70\x78\x3B\x20\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x2D\x33\x30\x70\x78\x3B\x20\x62\x6F\x72\x64\x65\x72\x2D\x72\x61\x64\x69\x75\x73\x3A\x20\x30\x70\x78\x3B\x22\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x74\x65\x6D\x70\x43\x6F\x70\x79\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x3E","\x7B\x22\x65\x76\x65\x6E\x74\x22\x3A\x22\x63\x6F\x6D\x6D\x61\x6E\x64\x22\x2C\x22\x66\x75\x6E\x63\x22\x3A\x22","\x22\x2C\x22\x61\x72\x67\x73\x22\x3A\x22\x22\x7D","\x2A","\x70\x6F\x73\x74\x4D\x65\x73\x73\x61\x67\x65","\x63\x6F\x6E\x74\x65\x6E\x74\x57\x69\x6E\x64\x6F\x77","\x66\x61\x2D\x70\x61\x75\x73\x65\x2D\x63\x69\x72\x63\x6C\x65","\x66\x61\x2D\x70\x6C\x61\x79\x2D\x63\x69\x72\x63\x6C\x65","\x23\x70\x6C\x61\x79\x65\x72\x49","\x66\x69\x78\x54\x69\x74\x6C\x65","\x23\x64\x72\x6F\x70\x44\x6F\x77\x6E\x33","\x54\x6F\x6B\x65\x6E","\x23\x64\x72\x6F\x70\x44\x6F\x77\x6E\x32","\x23\x64\x72\x6F\x70\x44\x6F\x77\x6E","\x43\x6F\x70\x79","\x3C\x61\x20\x68\x72\x65\x66\x3D\x22\x23\x22\x20\x69\x64\x3D\x22\x6E\x6F\x74\x65\x73\x63\x6C\x65\x61\x72\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x63\x6F\x6C\x6F\x72\x3A\x20\x6C\x69\x67\x68\x74\x67\x72\x65\x79\x3B\x66\x6C\x6F\x61\x74\x3A\x20\x72\x69\x67\x68\x74\x3B\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x20\x61\x62\x73\x6F\x6C\x75\x74\x65\x3B\x72\x69\x67\x68\x74\x3A\x20\x31\x32\x70\x78\x3B\x74\x6F\x70\x3A\x20\x39\x70\x78\x3B\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x6D\x61\x69\x6E\x2D\x63\x6F\x6C\x6F\x72\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x24\x28\x27\x23\x6C\x6F\x67\x27\x29\x2E\x68\x74\x6D\x6C\x28\x27\x27\x29\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x6C\x65\x66\x74\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x43\x6C\x65\x61\x72\x20\x6C\x69\x73\x74\x22\x3E\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x74\x72\x61\x73\x68\x20\x66\x61\x2D\x32\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x61\x3E","\x23\x6C\x6F\x67\x54\x69\x74\x6C\x65","\x64\x69\x73\x61\x62\x6C\x65","\x23\x6C\x61\x73\x74\x49\x50\x42\x74\x6E","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x61\x67\x61\x72\x2E\x69\x6F\x2F\x3F\x72\x3D","\x26\x6D\x3D","\x26\x73\x65\x61\x72\x63\x68\x3D\x77\x73\x73\x3A\x2F\x2F","\x23\x63\x6F\x70\x79\x49\x50\x42\x74\x6E","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x61\x67\x61\x72\x2E\x69\x6F\x2F\x3F\x73\x69\x70\x3D","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x61\x67\x61\x72\x2E\x69\x6F\x2F\x70\x6C\x61\x79\x3F\x73\x69\x70\x3D","\x26\x3F\x70\x61\x73\x73\x3D","\x66\x6F\x63\x75\x73","\x23\x63\x6C\x6F\x73\x65\x42\x74\x6E","\x23\x30\x30\x30\x30\x36\x36","\x4E\x69\x63\x6B\x6E\x61\x6D\x65\x20\x72\x65\x73\x65\x72\x76\x65\x64\x20\x66\x6F\x72\x20\x3C\x66\x6F\x6E\x74\x20\x63\x6F\x6C\x6F\x72\x3D\x27\x79\x65\x6C\x6C\x6F\x77\x27\x3E\x3C\x62\x3E\x41\x6E\x69\x6D\x61\x74\x65\x64\x20\x53\x6B\x69\x6E\x73\x3C\x2F\x66\x6F\x6E\x74\x3E\x3C\x2F\x62\x3E","\x3A\x3C\x62\x72\x3E","\x45\x61\x73\x74\x65\x72\x45\x67\x67\x31","\x45\x61\x73\x74\x65\x72\x20\x45\x67\x67","\x45\x61\x73\x74\x65\x72\x45\x67\x67\x32","\x45\x61\x73\x74\x65\x72\x45\x67\x67\x33","\x2C\x3C\x62\x72\x3E","\x3C\x61\x20\x74\x61\x72\x67\x65\x74\x3D\x22\x5F\x62\x6C\x61\x6E\x6B\x22\x20\x68\x72\x65\x66\x3D\x22\x68\x74\x74\x70\x73\x3A\x2F\x2F\x67\x69\x74\x68\x75\x62\x2E\x63\x6F\x6D\x2F\x6A\x69\x6D\x62\x6F\x79\x33\x31\x30\x30\x22\x3E\x68\x74\x74\x70\x73\x3A\x2F\x2F\x67\x69\x74\x68\x75\x62\x2E\x63\x6F\x6D\x2F\x6A\x69\x6D\x62\x6F\x79\x33\x31\x30\x30\x3C\x2F\x61\x3E","\x56\x69\x64\x65\x6F","\x77\x68\x69\x63\x68","\x69\x6E\x70\x75\x74\x3A\x66\x6F\x63\x75\x73","\x70\x61\x73\x73\x3D","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x74\x61\x6C\x6B\x79\x2E\x69\x6F\x2F","\x39\x35\x2E\x35\x70\x78","\x31\x37\x31\x70\x78","\x23\x30\x30\x33\x33\x30\x30","\x2E\x62\x74\x6E\x2E\x62\x74\x6E\x2D\x62\x6C\x6F\x63\x6B\x2E\x62\x74\x6E\x2D\x73\x75\x63\x63\x65\x73\x73\x2E\x62\x74\x6E\x2D\x65\x78\x70\x6F\x72\x74","\x4E\x4F\x4E\x45","\x67\x65\x74\x44\x61\x74\x65","\x67\x65\x74\x4D\x6F\x6E\x74\x68","\x67\x65\x74\x46\x75\x6C\x6C\x59\x65\x61\x72","\x67\x65\x74\x48\x6F\x75\x72\x73","\x67\x65\x74\x4D\x69\x6E\x75\x74\x65\x73","\x50\x61\x72\x74\x79\x2D","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x41\x4E\x3F","\x41\x49\x44\x3D","\x26\x4E\x69\x63\x6B\x3D","\x26\x44\x61\x74\x65\x3D","\x26\x73\x69\x70\x3D","\x26\x70\x77\x64\x3D","\x26\x6D\x6F\x64\x65\x3D","\x26\x72\x65\x67\x69\x6F\x6E\x3D","\x26\x55\x49\x44\x3D","\x26\x6C\x61\x73\x74\x6E\x61\x6D\x65\x3D","\x26\x66\x69\x72\x73\x74\x6E\x61\x6D\x65\x3D","\x26\x6A\x6F\x69\x6E\x3D\x55\x72\x6C","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x6C\x6F\x61\x64\x65\x72\x49\x66\x72\x61\x6D\x65\x49\x6E\x66\x6F\x31\x22\x3E\x3C\x69\x66\x72\x61\x6D\x65\x20\x69\x64\x3D\x22\x6C\x6F\x61\x64\x65\x72\x49\x66\x72\x61\x6D\x65\x49\x6E\x66\x6F\x22\x20\x73\x72\x63\x20\x3D\x20","\x20\x6E\x61\x6D\x65\x3D\x22\x64\x65\x74\x61\x69\x6C\x65\x64\x69\x6E\x66\x6F\x22\x20\x61\x6C\x6C\x6F\x77\x74\x72\x61\x6E\x73\x70\x61\x72\x65\x6E\x63\x79\x3D\x22\x74\x72\x75\x65\x22\x20\x73\x63\x72\x6F\x6C\x6C\x69\x6E\x67\x3D\x22\x6E\x6F\x22\x20\x66\x72\x61\x6D\x65\x42\x6F\x72\x64\x65\x72\x3D\x22\x30\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x77\x69\x64\x74\x68\x3A\x30\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x30\x25\x3B\x20\x62\x6F\x72\x64\x65\x72\x3A\x6E\x6F\x6E\x65\x3B\x22\x3E\x3C\x2F\x69\x66\x72\x61\x6D\x65\x3E\x3C\x2F\x64\x69\x76\x3E","\x23\x6C\x6F\x61\x64\x65\x72\x49\x66\x72\x61\x6D\x65\x49\x6E\x66\x6F\x31","\x46\x72\x65\x73\x6B\x69\x6E\x73\x4D\x61\x70","\x46\x72\x65\x65\x53\x6B\x69\x6E\x73","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x63\x6F\x6E\x66\x69\x67\x73\x2D\x77\x65\x62\x2E\x61\x67\x61\x72\x69\x6F\x2E\x6D\x69\x6E\x69\x63\x6C\x69\x70\x70\x74\x2E\x63\x6F\x6D\x2F\x6C\x69\x76\x65\x2F","\x61\x67\x61\x72\x76\x65\x72\x73\x69\x6F\x6E","\x69\x6D\x61\x67\x65","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x61\x67\x61\x72\x69\x6F\x2F\x6C\x69\x76\x65\x2F\x66\x6C\x61\x67\x73\x2F","\x2E\x70\x6E\x67","\x23\x6C\x6F\x61\x64\x65\x72\x49\x66\x72\x61\x6D\x65\x49\x6E\x66\x6F","\x54\x65\x6D\x70\x6F\x72\x61\x72\x69\x6C\x79\x20\x48\x69\x64\x65\x2F\x53\x68\x6F\x77\x20\x45\x76\x65\x72\x79\x74\x68\x69\x6E\x67\x2E\x20\x46\x75\x6E\x63\x74\x69\x6F\x6E\x20\x66\x6F\x72\x20\x59\x6F\x75\x74\x75\x62\x65\x72\x73","\x23\x73\x68\x6F\x72\x74\x63\x75\x74\x73\x2D\x68\x75\x64","\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x70\x75\x7A\x7A\x6C\x65\x2D\x70\x69\x65\x63\x65\x22\x3E\x3C\x2F\x69\x3E","\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x67\x61\x6D\x65\x70\x61\x64\x22\x3E\x3C\x2F\x69\x3E","\x2E\x69\x6E\x70\x75\x74\x2D\x67\x72\x6F\x75\x70\x2D\x61\x64\x64\x6F\x6E\x2C\x23\x63\x68\x61\x74\x2D\x62\x6F\x78\x2C\x20\x2E\x69\x6E\x70\x75\x74\x2D\x67\x72\x6F\x75\x70\x2D\x73\x6D\x3E\x2E\x69\x6E\x70\x75\x74\x2D\x67\x72\x6F\x75\x70\x2D\x61\x64\x64\x6F\x6E\x2C\x20\x2E\x61\x67\x61\x72\x69\x6F\x2D\x70\x61\x72\x74\x79\x2C\x20\x2E\x61\x67\x61\x72\x69\x6F\x2D\x73\x69\x64\x65\x2D\x70\x61\x6E\x65\x6C\x7B\x62\x6F\x72\x64\x65\x72\x2D\x72\x61\x64\x69\x75\x73\x3A\x20\x31\x30\x70\x78\x3B\x7D\x2E\x6D\x65\x6E\x75\x2D\x74\x61\x62\x73\x2C","\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x6D\x69\x6E\x75\x73\x22\x3E\x3C\x2F\x69\x3E","\x2E\x69\x6E\x70\x75\x74\x2D\x67\x72\x6F\x75\x70\x2D\x61\x64\x64\x6F\x6E\x2C\x23\x63\x68\x61\x74\x2D\x62\x6F\x78\x2C\x20\x2E\x69\x6E\x70\x75\x74\x2D\x67\x72\x6F\x75\x70\x2D\x73\x6D\x3E\x2E\x69\x6E\x70\x75\x74\x2D\x67\x72\x6F\x75\x70\x2D\x61\x64\x64\x6F\x6E\x2C\x20\x2E\x61\x67\x61\x72\x69\x6F\x2D\x70\x61\x72\x74\x79\x2C\x20\x2E\x61\x67\x61\x72\x69\x6F\x2D\x73\x69\x64\x65\x2D\x70\x61\x6E\x65\x6C\x2C\x20\x2E\x6D\x65\x6E\x75\x2D\x74\x61\x62\x73\x2C","\x23\x6D\x61\x69\x6E\x2D\x70\x61\x6E\x65\x6C\x2C\x20\x23\x70\x72\x6F\x66\x69\x6C\x65\x2C\x20\x23\x6C\x65\x67\x65\x6E\x64\x2C\x20\x23\x6F\x67\x2D\x73\x65\x74\x74\x69\x6E\x67\x73\x2C\x20\x23\x74\x68\x65\x6D\x65\x2C\x20\x23\x6D\x75\x73\x69\x63\x2C\x20\x23\x68\x6F\x74\x6B\x65\x79\x73\x2C\x20\x20\x23\x68\x6F\x74\x6B\x65\x79\x73\x2C\x20\x2E\x73\x6B\x69\x6E\x2C\x20\x2E\x69\x6E\x70\x75\x74\x2D\x67\x72\x6F\x75\x70\x2D\x62\x74\x6E\x2C\x20\x2E\x69\x6E\x70\x75\x74\x2D\x67\x72\x6F\x75\x70\x2E\x6E\x69\x63\x6B\x2C\x20\x20","\x2E\x63\x6F\x6C\x6F\x72\x70\x69\x63\x6B\x65\x72\x2D\x65\x6C\x65\x6D\x65\x6E\x74\x20\x2E\x69\x6E\x70\x75\x74\x2D\x67\x72\x6F\x75\x70\x2D\x61\x64\x64\x6F\x6E\x20\x69\x2C\x20\x2E\x63\x6F\x6C\x6F\x72\x70\x69\x63\x6B\x65\x72\x2D\x65\x6C\x65\x6D\x65\x6E\x74\x20\x2E\x61\x64\x64\x2D\x6F\x6E\x20\x69\x2C\x20\x2E\x61\x67\x61\x72\x69\x6F\x2D\x70\x72\x6F\x66\x69\x6C\x65\x2D\x70\x69\x63\x74\x75\x72\x65\x2C","\x23\x6D\x65\x6E\x75\x2D\x66\x6F\x6F\x74\x65\x72\x2C\x20\x23\x6C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x2D\x68\x75\x64\x2C\x20\x23\x64\x72\x6F\x70\x44\x6F\x77\x6E\x2C\x20\x23\x64\x72\x6F\x70\x44\x6F\x77\x6E\x32\x2C\x20\x23\x6D\x69\x6E\x69\x6D\x61\x70\x2D\x68\x75\x64\x2C","\x23\x74\x6F\x70\x35\x2D\x68\x75\x64\x2C\x20\x23\x74\x61\x72\x67\x65\x74\x2D\x68\x75\x64\x2C\x20\x23\x6C\x65\x67\x65\x6E\x64\x41\x64\x49\x6D\x67\x2C\x20\x23\x73\x74\x61\x74\x73\x2D\x68\x75\x64\x2C\x20","\x23\x74\x69\x6D\x65\x2D\x68\x75\x64\x20\x7B\x20\x62\x6F\x72\x64\x65\x72\x2D\x72\x61\x64\x69\x75\x73\x3A\x20\x30\x20\x30\x20\x30\x20\x30\x20\x7D\x20\x3C\x2F\x73\x74\x79\x6C\x65\x3E","\x3C\x73\x74\x79\x6C\x65\x20\x74\x79\x70\x65\x3D\x22\x74\x65\x78\x74\x2F\x63\x73\x73\x22\x20\x69\x64\x3D\x22\x4D\x47\x78\x22\x3E\x09","\x23\x74\x6F\x70\x35\x2D\x68\x75\x64\x7B\x74\x6F\x70\x3A\x31\x30\x70\x78\x21\x69\x6D\x70\x6F\x72\x74\x61\x6E\x74\x3B\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x3A\x6C\x69\x6E\x65\x61\x72\x2D\x67\x72\x61\x64\x69\x65\x6E\x74\x28\x74\x6F\x20\x72\x69\x67\x68\x74\x2C","\x23\x68\x75\x64\x43\x6F\x6C\x6F\x72","\x2C\x72\x67\x62\x61\x28\x32\x35\x35\x2C\x32\x35\x35\x2C\x32\x35\x35\x2C\x30\x29\x29\x7D","\x23\x6C\x65\x61\x64\x65\x72\x62\x6F\x61\x72\x64\x2D\x68\x75\x64\x7B\x74\x6F\x70\x3A\x31\x30\x70\x78\x21\x69\x6D\x70\x6F\x72\x74\x61\x6E\x74\x3B\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x3A\x6C\x69\x6E\x65\x61\x72\x2D\x67\x72\x61\x64\x69\x65\x6E\x74\x28\x74\x6F\x20\x6C\x65\x66\x74\x2C","\x23\x63\x68\x61\x74\x2D\x62\x6F\x78\x7B\x69\x6D\x70\x6F\x72\x74\x61\x6E\x74\x3B\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x3A\x6C\x69\x6E\x65\x61\x72\x2D\x67\x72\x61\x64\x69\x65\x6E\x74\x28\x74\x6F\x20\x72\x69\x67\x68\x74\x2C","\x23\x6D\x69\x6E\x69\x6D\x61\x70\x2D\x68\x75\x64\x2C\x23\x74\x69\x6D\x65\x72\x74\x6F\x6F\x6C\x73\x2D\x68\x75\x64\x2C\x20\x23\x73\x68\x6F\x72\x74\x63\x75\x74\x73\x2D\x68\x75\x64\x2C\x20\x23\x74\x69\x6D\x65\x2D\x68\x75\x64\x2C\x23\x6D\x73\x67\x63\x6F\x6D\x6D\x61\x6E\x64\x73\x2D\x68\x75\x64\x2C\x20\x23\x73\x63\x72\x69\x70\x74\x69\x6E\x67\x2D\x68\x75\x64\x2C\x20\x23\x69\x6D\x61\x67\x65\x73\x2D\x68\x75\x64\x2C\x20\x23\x79\x74\x2D\x68\x75\x64\x7B\x69\x6D\x70\x6F\x72\x74\x61\x6E\x74\x3B\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x3A\x6C\x69\x6E\x65\x61\x72\x2D\x67\x72\x61\x64\x69\x65\x6E\x74\x28\x74\x6F\x20\x6C\x65\x66\x74\x2C","\x23\x74\x61\x72\x67\x65\x74\x2D\x68\x75\x64\x2C\x23\x74\x61\x72\x67\x65\x74\x2D\x70\x61\x6E\x65\x6C\x2D\x68\x75\x64\x20\x7B\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x3A\x6C\x69\x6E\x65\x61\x72\x2D\x67\x72\x61\x64\x69\x65\x6E\x74\x28\x74\x6F\x20\x62\x6F\x74\x74\x6F\x6D\x2C","\x23\x73\x74\x61\x74\x73\x2D\x68\x75\x64\x7B\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x3A\x6C\x69\x6E\x65\x61\x72\x2D\x67\x72\x61\x64\x69\x65\x6E\x74\x28\x74\x6F\x20\x74\x6F\x70\x2C","\x23\x73\x74\x61\x74\x73\x2D\x68\x75\x64\x7B\x6C\x65\x66\x74\x3A\x20\x35\x30\x25\x21\x69\x6D\x70\x6F\x72\x74\x61\x6E\x74\x3B\x20\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x20\x74\x72\x61\x6E\x73\x6C\x61\x74\x65\x58\x28\x2D\x35\x30\x25\x29\x21\x69\x6D\x70\x6F\x72\x74\x61\x6E\x74\x3B\x20\x74\x65\x78\x74\x2D\x61\x6C\x69\x67\x6E\x3A\x20\x63\x65\x6E\x74\x65\x72\x3B\x7D","\x2E\x68\x75\x64\x2D\x74\x6F\x70\x7B\x74\x6F\x70\x3A\x20\x39\x33\x25\x21\x69\x6D\x70\x6F\x72\x74\x61\x6E\x74\x3B\x7D","\x23\x63\x68\x61\x74\x2D\x62\x6F\x78\x7B\x62\x6F\x74\x74\x6F\x6D\x3A\x20\x32\x25\x21\x69\x6D\x70\x6F\x72\x74\x61\x6E\x74\x3B\x7D","\x3C\x2F\x73\x74\x79\x6C\x65\x3E","\x23\x4D\x47\x78","\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x67\x72\x61\x76\x22\x3E\x3C\x2F\x69\x3E","\x23\x74\x69\x6D\x65\x72\x74\x6F\x6F\x6C\x73\x2D\x68\x75\x64","\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x63\x61\x6C\x63\x75\x6C\x61\x74\x6F\x72\x22\x3E\x3C\x2F\x69\x3E","\x74\x69\x6D\x65\x72","\x23\x74\x69\x6D\x65\x2D\x68\x75\x64","\x23\x73\x74\x61\x74\x73\x2D\x68\x75\x64","\x23\x74\x61\x72\x67\x65\x74\x2D\x68\x75\x64","\x23\x74\x61\x72\x67\x65\x74\x2D\x70\x61\x6E\x65\x6C\x2D\x68\x75\x64","\x3C\x69\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x65\x78\x63\x6C\x61\x6D\x61\x74\x69\x6F\x6E\x2D\x74\x72\x69\x61\x6E\x67\x6C\x65\x22\x3E\x3C\x2F\x69\x3E","\x23\x75\x73\x65\x72\x73\x63\x72\x69\x70\x74\x73","\x23\x4F\x70\x65\x6E\x75\x73\x65\x72\x53\x63\x72\x69\x70\x74\x73","\x3C\x64\x69\x76\x20\x63\x6C\x61\x73\x73\x3D\x22\x61\x67\x61\x72\x69\x6F\x2D\x70\x61\x6E\x65\x6C\x20\x6F\x67\x61\x72\x69\x6F\x2D\x79\x74\x2D\x70\x61\x6E\x65\x6C\x22\x3E\x3C\x68\x36\x20\x63\x6C\x61\x73\x73\x3D\x22\x6D\x65\x6E\x75\x2D\x6D\x61\x69\x6E\x2D\x63\x6F\x6C\x6F\x72\x22\x3E\x3C\x69\x3E\x3C\x2F\x69\x3E\x3C\x2F\x68\x36\x3E\x3C\x2F\x64\x69\x76\x3E","\x3C\x73\x70\x61\x6E\x20\x73\x74\x79\x6C\x65\x3D\x22\x66\x6C\x6F\x61\x74\x3A\x20\x6C\x65\x66\x74\x3B\x20\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x20\x31\x33\x70\x78\x3B\x22\x3E\x3C\x61\x20\x74\x61\x72\x67\x65\x74\x3D\x22\x5F\x62\x6C\x61\x6E\x6B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x67\x61\x28\x27\x73\x65\x6E\x64\x27\x2C\x20\x27\x65\x76\x65\x6E\x74\x27\x2C\x20\x27\x4C\x69\x6E\x6B\x27\x2C\x20\x27\x63\x6C\x69\x63\x6B\x27\x2C\x20\x27\x6C\x65\x67\x65\x6E\x64\x57\x65\x62\x73\x69\x74\x65\x27\x29\x3B\x22\x20\x68\x72\x65\x66\x3D\x22\x68\x74\x74\x70\x73\x3A\x2F\x2F\x77\x77\x77\x2E\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x66\x66\x66\x66\x66\x66\x3B\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x74\x69\x74\x6C\x65\x3D\x22\x57\x65\x62\x73\x69\x74\x65\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x6C\x65\x66\x74\x22\x3E\x76","\x3C\x2F\x61\x3E\x3C\x2F\x73\x70\x61\x6E\x3E\x3C\x73\x70\x61\x6E\x20\x73\x74\x79\x6C\x65\x3D\x22\x66\x6C\x6F\x61\x74\x3A\x20\x6C\x65\x66\x74\x3B\x20\x20\x6D\x61\x72\x67\x69\x6E\x2D\x6C\x65\x66\x74\x3A\x20\x38\x30\x70\x78\x3B\x20\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x20\x31\x33\x70\x78\x3B\x22\x3E\x3C\x61\x20\x69\x64\x3D\x22\x4D\x6F\x72\x65\x66\x70\x73\x54\x65\x78\x74\x22\x20\x68\x72\x65\x66\x3D\x22\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x3F\x6E\x61\x76\x3D\x46\x50\x53\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x74\x69\x74\x6C\x65\x3D\x22\x48\x6F\x77\x20\x74\x6F\x20\x69\x6D\x70\x72\x6F\x76\x65\x20\x70\x65\x72\x66\x6F\x72\x6D\x61\x6E\x63\x65\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x74\x6F\x70\x22\x20\x73\x74\x79\x6C\x65\x20\x3D\x22\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x20\x31\x33\x70\x78\x22\x3B\x20\x74\x61\x72\x67\x65\x74\x3D\x22\x5F\x62\x6C\x61\x6E\x6B\x22\x3E\x4D\x6F\x72\x65\x20\x46\x50\x53\x3C\x2F\x61\x3E\x3C\x2F\x73\x70\x61\x6E\x3E","\x3C\x73\x70\x61\x6E\x20\x73\x74\x79\x6C\x65\x3D\x22\x66\x6C\x6F\x61\x74\x3A\x20\x72\x69\x67\x68\x74\x3B\x20\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x20\x31\x33\x70\x78\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x31\x30\x70\x78\x3B\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x2D\x32\x70\x78\x22\x3E\x3C\x66\x6F\x72\x6D\x20\x69\x64\x3D\x22\x64\x6F\x6E\x61\x74\x69\x6F\x6E\x62\x74\x6E\x22\x20\x61\x63\x74\x69\x6F\x6E\x3D\x22\x68\x74\x74\x70\x73\x3A\x2F\x2F\x77\x77\x77\x2E\x70\x61\x79\x70\x61\x6C\x2E\x63\x6F\x6D\x2F\x63\x67\x69\x2D\x62\x69\x6E\x2F\x77\x65\x62\x73\x63\x72\x22\x20\x6D\x65\x74\x68\x6F\x64\x3D\x22\x70\x6F\x73\x74\x22\x20\x74\x61\x72\x67\x65\x74\x3D\x22\x5F\x74\x6F\x70\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x6C\x65\x66\x74\x22\x20\x74\x61\x72\x67\x65\x74\x3D\x22\x5F\x62\x6C\x61\x6E\x6B\x22\x3E\x3C\x69\x6E\x70\x75\x74\x20\x74\x79\x70\x65\x3D\x22\x68\x69\x64\x64\x65\x6E\x22\x20\x6E\x61\x6D\x65\x3D\x22\x63\x6D\x64\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x5F\x73\x2D\x78\x63\x6C\x69\x63\x6B\x22\x3E\x3C\x69\x6E\x70\x75\x74\x20\x74\x79\x70\x65\x3D\x22\x68\x69\x64\x64\x65\x6E\x22\x20\x6E\x61\x6D\x65\x3D\x22\x68\x6F\x73\x74\x65\x64\x5F\x62\x75\x74\x74\x6F\x6E\x5F\x69\x64\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x43\x4D\x33\x47\x44\x56\x43\x57\x36\x50\x42\x46\x36\x22\x3E\x3C\x69\x6E\x70\x75\x74\x20\x74\x79\x70\x65\x3D\x22\x69\x6D\x61\x67\x65\x22\x20\x73\x72\x63\x3D\x22\x68\x74\x74\x70\x73\x3A\x2F\x2F\x77\x77\x77\x2E\x70\x61\x79\x70\x61\x6C\x6F\x62\x6A\x65\x63\x74\x73\x2E\x63\x6F\x6D\x2F\x65\x6E\x5F\x55\x53\x2F\x69\x2F\x62\x74\x6E\x2F\x62\x74\x6E\x5F\x64\x6F\x6E\x61\x74\x65\x5F\x53\x4D\x2E\x67\x69\x66\x22\x20\x62\x6F\x72\x64\x65\x72\x3D\x22\x30\x22\x20\x6E\x61\x6D\x65\x3D\x22\x73\x75\x62\x6D\x69\x74\x22\x20\x61\x6C\x74\x3D\x22\x50\x61\x79\x50\x61\x6C\x20\x2D\x20\x54\x68\x65\x20\x73\x61\x66\x65\x72\x2C\x20\x65\x61\x73\x69\x65\x72\x20\x77\x61\x79\x20\x74\x6F\x20\x70\x61\x79\x20\x6F\x6E\x6C\x69\x6E\x65\x21\x22\x3E\x3C\x69\x6D\x67\x20\x61\x6C\x74\x3D\x22\x22\x20\x62\x6F\x72\x64\x65\x72\x3D\x22\x30\x22\x20\x73\x72\x63\x3D\x22\x68\x74\x74\x70\x73\x3A\x2F\x2F\x77\x77\x77\x2E\x70\x61\x79\x70\x61\x6C\x6F\x62\x6A\x65\x63\x74\x73\x2E\x63\x6F\x6D\x2F\x65\x6E\x5F\x55\x53\x2F\x69\x2F\x73\x63\x72\x2F\x70\x69\x78\x65\x6C\x2E\x67\x69\x66\x22\x20\x77\x69\x64\x74\x68\x3D\x22\x31\x22\x20\x68\x65\x69\x67\x68\x74\x3D\x22\x31\x22\x3E\x3C\x2F\x66\x6F\x72\x6D\x3E\x3C\x2F\x73\x70\x61\x6E\x3E","\x23\x54\x69\x6D\x65\x73\x55\x73\x65\x64","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x53\x4E\x45\x5A\x4F\x67\x61\x72\x55\x70\x6C\x6F\x61\x64\x42\x74\x6E\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x53\x4E\x45\x5A\x4F\x67\x61\x72\x55\x70\x6C\x6F\x61\x64\x28\x29\x3B\x20\x72\x65\x74\x75\x72\x6E\x20\x66\x61\x6C\x73\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x72\x69\x67\x68\x74\x3A\x20\x32\x35\x70\x78\x3B\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x73\x75\x63\x63\x65\x73\x73\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x22\x20\x74\x69\x74\x6C\x65\x3D\x22\x22\x3E","\x23\x63\x6C\x6F\x73\x65\x2D\x65\x78\x70\x2D\x69\x6D\x70","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x53\x4E\x45\x5A\x4F\x67\x61\x72\x44\x6F\x77\x6E\x6C\x6F\x61\x64\x42\x74\x6E\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x53\x4E\x45\x5A\x4F\x67\x61\x72\x44\x6F\x77\x6E\x6C\x6F\x61\x64\x28\x29\x3B\x20\x72\x65\x74\x75\x72\x6E\x20\x66\x61\x6C\x73\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x72\x69\x67\x68\x74\x3A\x20\x32\x35\x70\x78\x3B\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x73\x75\x63\x63\x65\x73\x73\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x22\x20\x74\x69\x74\x6C\x65\x3D\x22\x22\x3E","\x3C\x62\x72\x3E\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x55\x73\x65\x72\x50\x72\x6F\x66\x69\x6C\x65\x55\x49\x44\x32\x22\x3E\x53\x6F\x63\x69\x61\x6C\x20\x49\x44\x3A\x20\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x55\x73\x65\x72\x50\x72\x6F\x66\x69\x6C\x65\x49\x44\x32\x61\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x75\x73\x65\x72\x2D\x6E\x61\x6D\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x64\x69\x73\x70\x6C\x61\x79\x3A\x69\x6E\x6C\x69\x6E\x65\x2D\x62\x6C\x6F\x63\x6B\x22\x3E\x3C\x2F\x64\x69\x76\x3E","\x5B\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x5D","\x44\x4F\x4D\x4E\x6F\x64\x65\x49\x6E\x73\x65\x72\x74\x65\x64","\x6C\x61\x73\x74","\x2E\x6D\x65\x73\x73\x61\x67\x65\x2D\x6E\x69\x63\x6B","\x44\x4F\x4D\x53\x75\x62\x74\x72\x65\x65\x4D\x6F\x64\x69\x66\x69\x65\x64","\x53\x65\x72\x76\x65\x72\x20\x6E\x6F\x74\x20\x66\x6F\x75\x6E\x64\x21","\x4E\x6F\x54\x65\x78\x74","\x2E\x6C\x6F\x67\x45\x6E\x74\x72\x79","\x50\x6C\x61\x79\x65\x72\x20\x3C\x66\x6F\x6E\x74\x20\x63\x6F\x6C\x6F\x72\x3D\x27\x79\x65\x6C\x6C\x6F\x77\x27\x3E","\x2E\x6C\x6F\x67\x45\x6E\x74\x72\x79\x3E\x23\x70\x6C\x61\x79\x65\x72\x69\x6E\x66\x6F","\x3C\x2F\x66\x6F\x6E\x74\x3E\x20\x63\x6F\x6E\x74\x61\x69\x6E\x73\x20\x3C\x66\x6F\x6E\x74\x20\x63\x6F\x6C\x6F\x72\x3D\x27\x79\x65\x6C\x6C\x6F\x77\x27\x3E","\x21\x3C\x2F\x66\x6F\x6E\x74\x3E\x2E\x20\x43\x6F\x6E\x6E\x65\x63\x74\x65\x64\x20\x69\x6E\x74\x6F\x20\x53\x65\x72\x76\x65\x72","\x61\x75\x74\x6F\x50\x6C\x61\x79","\x4C\x4D\x20\x41\x75\x74\x6F\x70\x6C\x61\x79","\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x35","\x76\x69\x64\x65\x6F\x53\x6B\x69\x6E\x73","\x6A\x65\x6C\x6C\x79\x50\x68\x69\x73\x79\x63\x73","\x72\x61\x69\x6E\x62\x6F\x77\x46\x6F\x6F\x64","\x76\x69\x72\x75\x73\x47\x6C\x6F\x77","\x62\x6F\x72\x64\x65\x72\x47\x6C\x6F\x77","\x73\x68\x6F\x77\x42\x67\x53\x65\x63\x74\x6F\x72\x73","\x73\x68\x6F\x77\x4D\x61\x70\x42\x6F\x72\x64\x65\x72\x73","\x73\x68\x6F\x77\x4D\x69\x6E\x69\x4D\x61\x70\x47\x68\x6F\x73\x74\x43\x65\x6C\x6C\x73","\x73\x68\x6F\x77\x45\x78\x74\x72\x61\x4D\x69\x6E\x69\x4D\x61\x70\x47\x75\x69\x64\x65\x73","\x6F\x70\x70\x43\x6F\x6C\x6F\x72\x73","\x6F\x70\x70\x52\x69\x6E\x67\x73","\x76\x69\x72\x43\x6F\x6C\x6F\x72\x73","\x73\x70\x6C\x69\x74\x52\x61\x6E\x67\x65","\x76\x69\x72\x75\x73\x65\x73\x52\x61\x6E\x67\x65","\x74\x65\x61\x6D\x6D\x61\x74\x65\x73\x49\x6E\x64","\x73\x68\x6F\x77\x47\x68\x6F\x73\x74\x43\x65\x6C\x6C\x73","\x73\x68\x6F\x77\x47\x68\x6F\x73\x74\x43\x65\x6C\x6C\x73\x49\x6E\x66\x6F","\x73\x68\x6F\x77\x43\x68\x61\x74\x49\x6D\x61\x67\x65\x73","\x73\x68\x6F\x77\x43\x68\x61\x74\x56\x69\x64\x65\x6F\x73","\x63\x68\x61\x74\x53\x6F\x75\x6E\x64\x73","\x73\x70\x61\x77\x6E\x73\x70\x65\x63\x69\x61\x6C\x65\x66\x66\x65\x63\x74\x73","\x61\x75\x74\x6F\x52\x65\x73\x70","\x65\x71","\x2E\x6C\x6F\x67\x45\x6E\x74\x72\x79\x3E\x23\x72\x65\x67\x69\x6F\x6E\x69\x6E\x66\x6F","\x2E\x6C\x6F\x67\x45\x6E\x74\x72\x79\x3E\x23\x6D\x6F\x64\x65\x69\x6E\x66\x6F","\x6F\x70\x74\x69\x6F\x6E","\x66\x69\x6E\x64","\x3A\x62\x61\x74\x74\x6C\x65\x72\x6F\x79\x61\x6C\x65","\x20\x70\x6C\x61\x79\x65\x72\x28\x73\x29\x20\x77\x69\x73\x70\x65\x72\x65\x64\x20\x69\x74\x20\x69\x73\x3A","\x20\x70\x6C\x61\x79\x65\x72\x28\x73\x29\x20\x77\x69\x73\x70\x65\x72\x65\x64\x20\x69\x74\x20\x69\x73","\x3C\x66\x6F\x6E\x74\x20\x63\x6F\x6C\x6F\x72\x3D\x27\x79\x65\x6C\x6C\x6F\x77\x27\x3E\x42\x65\x73\x74\x20\x63\x68\x6F\x69\x63\x65\x3A\x20\x52\x65\x67\x69\x6F\x6E\x3A","\x2C\x20\x4D\x6F\x64\x65","\x3C\x2F\x66\x6F\x6E\x74\x3E\x3C\x62\x72\x3E","\x49\x6E\x66\x6F\x72\x6D\x61\x74\x69\x6F\x6E\x20\x63\x68\x61\x6E\x67\x65\x64\x21","\x72\x65\x67\x69\x6F\x6E","\x6D\x75\x73\x69\x63\x46\x72\x61\x6D\x65","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x4C\x4D\x65\x78\x70\x72\x65\x73\x73\x2F\x6F\x6C\x64\x64\x65\x61\x6C\x73\x2E\x6A\x73","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x4C\x4D\x65\x78\x70\x72\x65\x73\x73\x2F\x73\x68\x6F\x70\x2F\x73\x68\x6F\x70\x2E\x6A\x73","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x4C\x4D\x65\x78\x70\x72\x65\x73\x73\x2F\x72\x65\x70\x6C\x61\x79\x2E\x6A\x73","\x67\x65\x74\x4F\x77\x6E\x50\x72\x6F\x70\x65\x72\x74\x79\x4E\x61\x6D\x65\x73","\x61\x67\x61\x72\x76\x65\x72\x73\x69\x6F\x6E\x44\x65\x73\x74\x69\x6E\x61\x74\x69\x6F\x6E\x46\x6F\x75\x6E\x64","\x61\x67\x61\x72\x76\x65\x72\x73\x69\x6F\x6E\x44\x65\x73\x74\x69\x6E\x61\x74\x69\x6F\x6E\x73","\x4C\x4D\x43\x6F\x6E\x66\x69\x67\x56\x65\x72\x73\x69\x6F\x6E","\x4C\x4D\x43\x6F\x6E\x66\x69\x67\x56\x65\x72\x73\x69\x6F\x6E\x50\x61\x73\x73","\x66\x75\x6E\x63\x74\x69\x6F\x6E","\x6F\x62\x6A\x65\x63\x74","\x62\x61\x6E\x6E\x65\x64\x55\x49\x44","\x48\x53\x4C\x4F\x5B\x53\x61\x69\x67\x6F\x5D\x3A\x73\x65\x74\x74\x69\x6E\x67\x73","\x6C\x62\x54\x65\x61\x6D\x6D\x61\x74\x65\x43\x6F\x6C\x6F\x72","\x59\x6F\x75\x20\x61\x72\x65\x20\x62\x61\x6E\x6E\x65\x64\x20\x66\x72\x6F\x6D\x20\x4C\x65\x67\x65\x6E\x64\x20\x6D\x6F\x64","\x20\x3C\x62\x72\x3E\x3C\x61\x20\x74\x61\x72\x67\x65\x74\x3D\x22\x5F\x62\x6C\x61\x6E\x6B\x22\x20\x68\x72\x65\x66\x3D\x22\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x22\x3E\x3C\x66\x6F\x6E\x74\x20\x63\x6F\x6C\x6F\x72\x3D\x22\x62\x6C\x75\x65\x22\x3E\x3C\x62\x3E\x3C\x75\x3E\x77\x77\x77\x2E\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x3C\x2F\x75\x3E\x3C\x2F\x62\x3E\x3C\x2F\x66\x6F\x6E\x74\x3E\x3C\x2F\x61\x3E\x3C\x62\x72\x3E","\x53\x63\x72\x69\x70\x74\x20\x54\x65\x72\x6D\x69\x6E\x61\x74\x65\x64","\x4C\x4D\x41\x67\x61\x72\x42\x61\x6E\x6E\x65\x64\x55\x49\x44\x73","\x4C\x4D\x41\x67\x61\x72\x42\x61\x6E\x6E\x65\x64\x55\x49\x44\x73\x50\x61\x73\x73","\x62\x61\x6E\x6E\x65\x64\x55\x73\x65\x72\x55\x49\x44\x73","\x41\x67\x61\x72\x42\x61\x6E\x6E\x65\x64\x55\x49\x44\x73\x41\x64\x64\x65\x64","\x2D","\x73\x70\x6C\x69\x63\x65","\x3C\x64\x69\x76\x20\x63\x6C\x61\x73\x73\x3D\x22\x6D\x6F\x64\x61\x6C\x20\x66\x61\x64\x65\x20\x69\x6E\x22\x20\x69\x64\x3D\x22\x42\x61\x6E\x6E\x65\x64\x55\x49\x44\x53\x4D\x6F\x64\x61\x6C\x22\x20\x61\x72\x69\x61\x2D\x68\x69\x64\x64\x65\x6E\x3D\x22\x66\x61\x6C\x73\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x62\x6C\x6F\x63\x6B\x3B\x22\x3E","\x3C\x64\x69\x76\x20\x63\x6C\x61\x73\x73\x3D\x22\x6D\x6F\x64\x61\x6C\x2D\x62\x61\x63\x6B\x64\x72\x6F\x70\x20\x66\x61\x64\x65\x20\x69\x6E\x22\x3E\x3C\x2F\x64\x69\x76\x3E","\x3C\x64\x69\x76\x20\x63\x6C\x61\x73\x73\x3D\x22\x6D\x6F\x64\x61\x6C\x2D\x64\x69\x61\x6C\x6F\x67\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x74\x6F\x70\x3A\x20\x63\x61\x6C\x63\x28\x35\x30\x76\x68\x20\x2D\x20\x32\x34\x31\x2E\x35\x70\x78\x29\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x35\x30\x30\x70\x78\x3B\x22\x3E","\x3C\x64\x69\x76\x20\x63\x6C\x61\x73\x73\x3D\x22\x6D\x6F\x64\x61\x6C\x2D\x63\x6F\x6E\x74\x65\x6E\x74\x22\x3E","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x43\x6C\x6F\x73\x65\x42\x61\x6E\x6E\x65\x64\x55\x49\x44\x53\x32\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x6D\x6F\x64\x61\x6C\x2D\x68\x65\x61\x64\x65\x72\x22\x3E\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x43\x6C\x6F\x73\x65\x42\x61\x6E\x6E\x65\x64\x55\x49\x44\x53\x22\x20\x74\x79\x70\x65\x3D\x22\x62\x75\x74\x74\x6F\x6E\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x63\x6C\x6F\x73\x65\x22\x20\x64\x61\x74\x61\x2D\x64\x69\x73\x6D\x69\x73\x73\x3D\x22\x6D\x6F\x64\x61\x6C\x22\x3E\x3C\x73\x70\x61\x6E\x20\x61\x72\x69\x61\x2D\x68\x69\x64\x64\x65\x6E\x3D\x22\x74\x72\x75\x65\x22\x3E\xD7\x3C\x2F\x73\x70\x61\x6E\x3E\x3C\x73\x70\x61\x6E\x20\x63\x6C\x61\x73\x73\x3D\x22\x73\x72\x2D\x6F\x6E\x6C\x79\x22\x3E","\x3C\x2F\x73\x70\x61\x6E\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E\x20\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x46\x41\x51\x42\x61\x6E\x6E\x65\x64\x55\x49\x44\x53\x22\x20\x74\x79\x70\x65\x3D\x22\x62\x75\x74\x74\x6F\x6E\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x63\x6C\x6F\x73\x65\x22\x20\x64\x61\x74\x61\x2D\x64\x69\x73\x6D\x69\x73\x73\x3D\x22\x6D\x6F\x64\x61\x6C\x22\x3E\x3C\x73\x70\x61\x6E\x20\x61\x72\x69\x61\x2D\x68\x69\x64\x64\x65\x6E\x3D\x22\x74\x72\x75\x65\x22\x3E\x3F\x3C\x2F\x73\x70\x61\x6E\x3E\x3C\x73\x70\x61\x6E\x20\x63\x6C\x61\x73\x73\x3D\x22\x73\x72\x2D\x6F\x6E\x6C\x79\x22\x3E","\x3C\x2F\x73\x70\x61\x6E\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x68\x34\x20\x63\x6C\x61\x73\x73\x3D\x22\x6D\x6F\x64\x61\x6C\x2D\x74\x69\x74\x6C\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x66\x6F\x6E\x74\x2D\x66\x61\x6D\x69\x6C\x79\x3A\x20\x52\x6F\x62\x6F\x74\x6F\x20\x43\x6F\x6E\x64\x65\x6E\x73\x65\x64\x2C\x20\x73\x61\x6E\x73\x2D\x73\x65\x72\x69\x66\x22\x3E","\x42\x61\x6E\x6E\x65\x64\x20\x55\x73\x65\x72\x20\x49\x44\x73","\x3C\x2F\x68\x34\x3E","\x3C\x64\x69\x76\x20\x63\x6C\x61\x73\x73\x3D\x22\x6D\x6F\x64\x61\x6C\x2D\x62\x6F\x64\x79\x22\x3E\x3C\x69\x6E\x70\x75\x74\x20\x74\x79\x70\x65\x3D\x22\x74\x65\x78\x74\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x69\x64\x3D\x22\x42\x61\x6E\x6E\x65\x64\x61\x67\x61\x72\x69\x6F\x5F\x75\x69\x64\x5F\x69\x6E\x70\x75\x74\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x2A\x55\x49\x44\x20\x28","\x74\x6F\x20\x62\x65\x20\x62\x61\x6E\x6E\x65\x64","\x29\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x77\x69\x64\x74\x68\x3A\x20\x38\x35\x25\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x69\x6E\x6C\x69\x6E\x65\x2D\x62\x6C\x6F\x63\x6B\x22\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x41\x64\x64\x42\x61\x6E\x6E\x65\x64\x55\x49\x44\x22\x20\x74\x79\x70\x65\x3D\x22\x73\x75\x62\x6D\x69\x74\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x70\x72\x69\x6D\x61\x72\x79\x20\x62\x74\x6E\x20\x32\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x62\x6C\x6F\x63\x6B\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x32\x30\x25\x3B\x20\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x34\x70\x78\x20\x30\x70\x78\x20\x36\x70\x78\x3B\x20\x74\x65\x78\x74\x2D\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x20\x63\x61\x70\x69\x74\x61\x6C\x69\x7A\x65\x3B\x22\x3E\x41\x64\x64\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x72\x3E\x3C\x63\x6F\x6C\x6F\x72\x3D\x22\x72\x65\x64\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x64\x69\x73\x70\x6C\x61\x79\x3A\x69\x6E\x6C\x69\x6E\x65\x22\x3E\x20","\x3C\x62\x3E\x42\x61\x6E\x6E\x65\x64\x20\x55\x49\x44\x73\x3A\x3C\x2F\x62\x3E","\x3C\x2F\x63\x6F\x6C\x6F\x72\x3E","\x3C\x62\x72\x3E\x3C\x62\x72\x3E","\x3C\x73\x65\x6C\x65\x63\x74\x20\x69\x64\x3D\x22\x73\x73\x2D\x73\x65\x6C\x65\x63\x74\x2D\x42\x61\x6E\x6E\x65\x64\x55\x49\x44\x53\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x72\x65\x71\x75\x69\x72\x65\x64\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x64\x69\x73\x70\x6C\x61\x79\x3A\x69\x6E\x6C\x69\x6E\x65\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x38\x30\x25\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x2D\x33\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x73\x65\x6C\x65\x63\x74\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x52\x65\x6D\x6F\x76\x65\x42\x61\x6E\x6E\x65\x64\x55\x49\x44\x22\x20\x74\x79\x70\x65\x3D\x22\x73\x75\x62\x6D\x69\x74\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x70\x72\x69\x6D\x61\x72\x79\x20\x62\x74\x6E\x20\x32\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x62\x6C\x6F\x63\x6B\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x32\x30\x25\x3B\x20\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x34\x70\x78\x20\x30\x70\x78\x20\x36\x70\x78\x3B\x20\x74\x65\x78\x74\x2D\x74\x72\x61\x6E\x73\x66\x6F\x72\x6D\x3A\x20\x63\x61\x70\x69\x74\x61\x6C\x69\x7A\x65\x3B\x22\x3E\x52\x65\x6D\x6F\x76\x65\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x70\x20\x63\x6C\x61\x73\x73\x3D\x22\x61\x6C\x65\x72\x74\x2D\x77\x61\x72\x6E\x69\x6E\x67\x20\x74\x65\x78\x74\x2D\x63\x65\x6E\x74\x65\x72\x22\x3E","\x50\x6C\x65\x61\x73\x65\x20\x62\x65\x20\x63\x61\x72\x65\x66\x75\x6C\x20\x77\x69\x74\x68\x20\x74\x68\x65\x20\x55\x49\x44\x73\x2E","\x3C\x62\x72\x3E\x59\x6F\x75\x72\x20\x55\x49\x44\x20\x69\x73\x3A\x20\x3C\x73\x70\x61\x6E\x20\x63\x6C\x61\x73\x73\x3D\x22\x61\x6C\x65\x72\x74\x2D\x73\x75\x63\x63\x65\x73\x73\x22\x20\x69\x64\x3D\x22\x65\x78\x70\x2D\x75\x69\x64\x22\x3E","\x3C\x2F\x73\x70\x61\x6E\x3E\x3C\x2F\x70\x3E","\x23\x42\x61\x6E\x6E\x65\x64\x55\x49\x44\x53\x4D\x6F\x64\x61\x6C","\x23\x43\x6C\x6F\x73\x65\x42\x61\x6E\x6E\x65\x64\x55\x49\x44\x53","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x4C\x4D\x65\x78\x70\x72\x65\x73\x73\x2F\x6F\x6C\x64\x64\x65\x61\x6C\x73\x2E\x68\x74\x6D\x6C","\x23\x46\x41\x51\x42\x61\x6E\x6E\x65\x64\x55\x49\x44\x53","\x23\x42\x61\x6E\x6E\x65\x64\x61\x67\x61\x72\x69\x6F\x5F\x75\x69\x64\x5F\x69\x6E\x70\x75\x74","\x6F\x70\x74\x69\x6F\x6E\x73","\x73\x73\x2D\x73\x65\x6C\x65\x63\x74\x2D\x42\x61\x6E\x6E\x65\x64\x55\x49\x44\x53","\x55\x49\x44\x3A\x20","\x20\x73\x75\x63\x63\x65\x73\x73\x66\x75\x6C\x6C\x79\x20\x61\x64\x64\x65\x64\x20\x6F\x6E\x20\x55\x49\x44\x20\x42\x41\x4E\x20\x6C\x69\x73\x74","\x20\x73\x65\x65\x6D\x73\x20\x6D\x69\x73\x74\x61\x6B\x65\x6E\x20\x6F\x72\x20\x69\x73\x20\x61\x6C\x72\x65\x61\x64\x79\x20\x6F\x6E\x20\x74\x68\x65\x20\x6C\x69\x73\x74","\x23\x41\x64\x64\x42\x61\x6E\x6E\x65\x64\x55\x49\x44","\x23\x73\x73\x2D\x73\x65\x6C\x65\x63\x74\x2D\x42\x61\x6E\x6E\x65\x64\x55\x49\x44\x53","\x73\x65\x6C\x65\x63\x74\x65\x64\x49\x6E\x64\x65\x78","\x20\x73\x75\x63\x63\x65\x73\x73\x66\x75\x6C\x6C\x79\x20\x72\x65\x6D\x6F\x76\x65\x64\x20\x66\x72\x6F\x6D\x20\x55\x49\x44\x20\x42\x41\x4E\x20\x6C\x69\x73\x74","\x23\x52\x65\x6D\x6F\x76\x65\x42\x61\x6E\x6E\x65\x64\x55\x49\x44","\x50\x6C\x65\x61\x73\x65\x20\x70\x6C\x61\x79\x20\x74\x68\x65\x20\x67\x61\x6D\x65\x20\x62\x65\x66\x6F\x72\x65\x20\x79\x6F\x75\x20\x63\x61\x6E\x20\x75\x73\x65\x20\x74\x68\x61\x74\x20\x66\x65\x61\x74\x75\x72\x65","\x59\x6F\x75\x20\x64\x6F\x20\x6E\x6F\x74\x20\x6E\x61\x6D\x65\x20\x74\x68\x65\x20\x61\x75\x74\x68\x6F\x72\x69\x74\x79","\x6C\x61\x6E\x67\x75\x61\x67\x65\x73","\x6E\x61\x76\x69\x67\x61\x74\x6F\x72","\x65\x6E","\x73\x68\x6F\x77\x43\x68\x61\x74\x54\x72\x61\x6E\x73\x6C\x61\x74\x69\x6F\x6E","\x63\x6F\x6E\x74\x61\x69\x6E\x73","\x63\x6C\x61\x73\x73\x4C\x69\x73\x74","\x6C\x61\x73\x74\x43\x68\x69\x6C\x64","\x74\x65\x78\x74\x43\x6F\x6E\x74\x65\x6E\x74","\x66\x69\x72\x73\x74\x43\x68\x69\x6C\x64","\x64\x65\x65\x70\x73\x6B\x79\x62\x6C\x75\x65","\x74\x65\x78\x74\x53\x68\x61\x64\x6F\x77","\x31\x70\x78\x20\x31\x70\x78\x20\x31\x70\x78\x20\x77\x68\x69\x74\x65","\x47\x65\x74","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x74\x72\x61\x6E\x73\x6C\x61\x74\x65\x2E\x79\x61\x6E\x64\x65\x78\x2E\x6E\x65\x74\x2F\x61\x70\x69\x2F\x76\x31\x2E\x35\x2F\x74\x72\x2E\x6A\x73\x6F\x6E\x2F\x74\x72\x61\x6E\x73\x6C\x61\x74\x65\x3F\x6B\x65\x79\x3D\x74\x72\x6E\x73\x6C\x2E\x31\x2E\x31\x2E\x32\x30\x31\x39\x30\x34\x31\x33\x54\x31\x33\x33\x32\x33\x34\x5A\x2E\x65\x32\x62\x66\x38\x66\x36\x31\x64\x62\x38\x30\x35\x64\x32\x36\x2E\x31\x64\x63\x33\x33\x31\x62\x33\x33\x64\x31\x35\x36\x65\x34\x33\x36\x37\x39\x61\x31\x39\x33\x35\x37\x64\x31\x35\x64\x39\x65\x65\x36\x36\x34\x35\x30\x32\x64\x65\x26\x74\x65\x78\x74\x3D","\x26\x6C\x61\x6E\x67\x3D","\x26\x66\x6F\x72\x6D\x61\x74\x3D\x70\x6C\x61\x69\x6E\x26\x6F\x70\x74\x69\x6F\x6E\x73\x3D\x31","\x6F\x6E\x72\x65\x61\x64\x79\x73\x74\x61\x74\x65\x63\x68\x61\x6E\x67\x65","\x73\x74\x61\x74\x75\x73","\x72\x65\x73\x70\x6F\x6E\x73\x65\x54\x65\x78\x74","\x75\x6C\x74\x72\x61","\x73\x6F\x70\x68\x69\x73\x74\x69\x63\x61\x74\x65\x64","\x6F\x67\x61\x72\x69\x6F\x53\x65\x74\x74\x69\x6E\x67\x73","\x73\x61\x76\x65\x53\x65\x74\x74\x69\x6E\x67\x73","\x3C\x64\x69\x76\x20\x63\x6C\x61\x73\x73\x3D\x22\x6D\x6F\x64\x61\x6C\x20\x66\x61\x64\x65\x20\x69\x6E\x22\x20\x69\x64\x3D\x22\x4C\x4D\x50\x72\x6F\x6D\x6F\x22\x20\x61\x72\x69\x61\x2D\x68\x69\x64\x64\x65\x6E\x3D\x22\x66\x61\x6C\x73\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x62\x6C\x6F\x63\x6B\x3B\x22\x3E","\x3C\x64\x69\x76\x20\x63\x6C\x61\x73\x73\x3D\x22\x6D\x6F\x64\x61\x6C\x2D\x64\x69\x61\x6C\x6F\x67\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x74\x6F\x70\x3A\x20\x63\x61\x6C\x63\x28\x35\x30\x76\x68\x20\x2D\x20\x32\x34\x31\x2E\x35\x70\x78\x29\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x39\x32\x32\x70\x78\x3B\x22\x3E","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x43\x6C\x6F\x73\x65\x4C\x4D\x50\x72\x6F\x6D\x6F\x32\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x6D\x6F\x64\x61\x6C\x2D\x68\x65\x61\x64\x65\x72\x22\x3E\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x43\x6C\x6F\x73\x65\x4C\x4D\x50\x72\x6F\x6D\x6F\x22\x20\x74\x79\x70\x65\x3D\x22\x62\x75\x74\x74\x6F\x6E\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x63\x6C\x6F\x73\x65\x22\x20\x64\x61\x74\x61\x2D\x64\x69\x73\x6D\x69\x73\x73\x3D\x22\x6D\x6F\x64\x61\x6C\x22\x3E\x3C\x73\x70\x61\x6E\x20\x61\x72\x69\x61\x2D\x68\x69\x64\x64\x65\x6E\x3D\x22\x74\x72\x75\x65\x22\x3E\xD7\x3C\x2F\x73\x70\x61\x6E\x3E\x3C\x73\x70\x61\x6E\x20\x63\x6C\x61\x73\x73\x3D\x22\x73\x72\x2D\x6F\x6E\x6C\x79\x22\x3E","\x3C\x2F\x73\x70\x61\x6E\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E\x20\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x46\x41\x51\x4C\x4D\x50\x72\x6F\x6D\x6F\x22\x20\x74\x79\x70\x65\x3D\x22\x62\x75\x74\x74\x6F\x6E\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x63\x6C\x6F\x73\x65\x22\x20\x64\x61\x74\x61\x2D\x64\x69\x73\x6D\x69\x73\x73\x3D\x22\x6D\x6F\x64\x61\x6C\x22\x3E\x3C\x73\x70\x61\x6E\x20\x61\x72\x69\x61\x2D\x68\x69\x64\x64\x65\x6E\x3D\x22\x74\x72\x75\x65\x22\x3E\x3F\x3C\x2F\x73\x70\x61\x6E\x3E\x3C\x73\x70\x61\x6E\x20\x63\x6C\x61\x73\x73\x3D\x22\x73\x72\x2D\x6F\x6E\x6C\x79\x22\x3E","\x52\x65\x77\x61\x72\x64\x20\x44\x61\x79","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x4C\x4D\x61\x64\x76\x65\x72\x74\x69\x73\x65\x6D\x65\x6E\x74\x33\x22\x3E\x3C\x69\x66\x72\x61\x6D\x65\x20\x69\x64\x3D\x22\x63\x75\x73\x74\x6F\x6D\x73\x6B\x69\x6E\x73\x49\x66\x72\x61\x6D\x65\x32\x22\x20\x73\x72\x63\x3D\x22\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x65\x78\x74\x72\x61\x73\x2F\x72\x65\x77\x61\x72\x64\x64\x61\x79\x2E\x68\x74\x6D\x6C\x22\x20\x77\x69\x64\x74\x68\x3D\x22\x39\x32\x30\x22\x20\x68\x65\x69\x67\x68\x74\x3D\x22\x35\x35\x30\x22\x20\x3E","\x2E\x6D\x6F\x64\x61\x6C\x2D\x64\x69\x61\x6C\x6F\x67","\x23\x4C\x4D\x50\x72\x6F\x6D\x6F","\x23\x43\x6C\x6F\x73\x65\x4C\x4D\x50\x72\x6F\x6D\x6F","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F","\x23\x46\x41\x51\x4C\x4D\x50\x72\x6F\x6D\x6F","\x56\x69\x64\x65\x6F\x20\x53\x6B\x69\x6E\x20\x50\x72\x6F\x6D\x6F","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x4C\x4D\x61\x64\x76\x65\x72\x74\x69\x73\x65\x6D\x65\x6E\x74\x33\x22\x3E\x3C\x69\x66\x72\x61\x6D\x65\x20\x69\x64\x3D\x22\x63\x75\x73\x74\x6F\x6D\x73\x6B\x69\x6E\x73\x49\x66\x72\x61\x6D\x65\x32\x22\x20\x73\x72\x63\x3D\x22\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x64\x65\x76\x65\x6C\x6F\x70\x65\x72\x73\x2F\x76\x69\x64\x65\x6F\x73\x6B\x69\x6E\x73\x2E\x68\x74\x6D\x6C\x22\x20\x77\x69\x64\x74\x68\x3D\x22\x39\x32\x30\x22\x20\x68\x65\x69\x67\x68\x74\x3D\x22\x35\x35\x30\x22\x20\x3E","\x44\x75\x65\x20\x74\x6F\x20\x73\x70\x61\x6D\x6D\x69\x6E\x67\x20\x69\x73\x73\x75\x65\x73\x2C\x20\x79\x6F\x75\x20\x6D\x75\x73\x74\x20\x62\x65\x20\x69\x6E\x20\x67\x61\x6D\x65\x20\x61\x6E\x64\x20\x75\x73\x65\x20\x70\x61\x73\x73\x77\x6F\x72\x64","\x3C\x73\x63\x72\x69\x70\x74\x20\x73\x72\x63\x3D\x22\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x4C\x4D\x65\x78\x70\x72\x65\x73\x73\x2F\x62\x61\x6E\x6E\x65\x64\x55\x49\x44\x2E\x6A\x73\x22\x3E\x3C\x2F\x73\x63\x72\x69\x70\x74\x3E","\x6F\x67\x61\x72\x69\x6F\x54\x68\x65\x6D\x65\x53\x65\x74\x74\x69\x6E\x67\x73","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x61\x64\x6D\x69\x6E\x69\x73\x74\x72\x61\x74\x69\x6F\x6E\x74\x6F\x6F\x6C\x73\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x6E\x6F\x6E\x65\x3B\x20\x62\x61\x63\x6B\x67\x72\x6F\x75\x6E\x64\x2D\x69\x6D\x61\x67\x65\x3A\x20\x75\x72\x6C\x28","\x3B\x20\x62\x6F\x72\x64\x65\x72\x3A\x20\x31\x70\x78\x20\x73\x6F\x6C\x69\x64\x20\x62\x6C\x61\x63\x6B\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x36\x35\x70\x78\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x35\x30\x30\x70\x78\x3B\x20\x22\x3B\x3E","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x61\x64\x6D\x69\x6E\x69\x73\x74\x72\x61\x74\x69\x6F\x6E\x74\x6F\x6F\x6C\x73\x68\x75\x64\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x64\x69\x73\x70\x6C\x61\x79\x3A\x62\x6C\x6F\x63\x6B\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x6C\x65\x66\x74\x3A\x20\x31\x30\x70\x78\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x72\x69\x67\x68\x74\x3A\x20\x31\x30\x70\x78\x3B\x22\x3E","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x61\x64\x6D\x69\x6E\x69\x73\x74\x72\x61\x74\x69\x6F\x6E\x74\x6F\x6F\x6C\x73\x68\x75\x64\x31\x22\x20\x61\x6C\x69\x67\x6E\x3D\x22\x6D\x69\x64\x64\x6C\x65\x22\x3E\x3C\x68\x35\x20\x63\x6C\x61\x73\x73\x3D\x22\x6D\x61\x69\x6E\x2D\x63\x6F\x6C\x6F\x72\x22\x3E\x41\x44\x4D\x49\x4E\x49\x53\x54\x52\x41\x54\x4F\x52\x20\x54\x4F\x4F\x4C\x53\x3C\x2F\x68\x35\x3E","\x3C\x70\x20\x73\x74\x79\x6C\x65\x3D\x22\x63\x6F\x6C\x6F\x72\x3A\x77\x68\x69\x74\x65\x3B\x20\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x31\x32\x70\x78\x22\x3B\x22\x20\x61\x6C\x69\x67\x6E\x3D\x22\x6D\x69\x64\x64\x6C\x65\x22\x3E\x45\x6E\x74\x65\x72\x20\x79\x6F\x75\x72\x20\x43\x6C\x61\x6E\x20\x73\x79\x6D\x62\x6F\x6C\x20\x61\x6E\x64\x20\x41\x44\x4D\x49\x4E\x20\x50\x61\x73\x73\x77\x6F\x72\x64\x3C\x2F\x70\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x41\x64\x6D\x69\x6E\x43\x6C\x61\x6E\x53\x79\x6D\x62\x6F\x6C\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x43\x6C\x61\x6E\x20\x53\x79\x6D\x62\x6F\x6C\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x72\x69\x67\x68\x74\x3A\x20\x32\x70\x78\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x34\x30\x25\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x69\x6E\x6C\x69\x6E\x65\x3B\x22\x20\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x74\x6F\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x54\x68\x65\x20\x73\x79\x6D\x62\x6F\x6C\x20\x6F\x66\x20\x43\x6C\x61\x6E\x20\x79\x6F\x75\x20\x62\x65\x6C\x6F\x6E\x67\x22\x20\x3E","\x3C\x69\x6E\x70\x75\x74\x20\x69\x64\x3D\x22\x41\x64\x6D\x69\x6E\x50\x61\x73\x73\x77\x6F\x72\x64\x22\x20\x74\x79\x70\x65\x3D\x22\x70\x61\x73\x73\x77\x6F\x72\x64\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x72\x6D\x2D\x63\x6F\x6E\x74\x72\x6F\x6C\x22\x20\x70\x6C\x61\x63\x65\x68\x6F\x6C\x64\x65\x72\x3D\x22\x50\x61\x73\x73\x77\x6F\x72\x64\x22\x20\x76\x61\x6C\x75\x65\x3D\x22\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x74\x6F\x70\x3A\x20\x32\x70\x78\x3B\x20\x6D\x61\x72\x67\x69\x6E\x2D\x6C\x65\x66\x74\x3A\x20\x32\x70\x78\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x34\x30\x25\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x69\x6E\x6C\x69\x6E\x65\x3B\x22\x20\x22\x20\x64\x61\x74\x61\x2D\x74\x6F\x67\x67\x6C\x65\x3D\x22\x74\x6F\x6F\x6C\x74\x69\x70\x22\x20\x64\x61\x74\x61\x2D\x70\x6C\x61\x63\x65\x6D\x65\x6E\x74\x3D\x22\x74\x6F\x70\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x50\x75\x74\x20\x41\x44\x4D\x49\x4E\x20\x70\x61\x73\x73\x77\x6F\x72\x64\x22\x20\x3E","\x3C\x2F\x64\x69\x76\x3E\x3C\x70\x20\x73\x74\x79\x6C\x65\x3D\x22\x63\x6F\x6C\x6F\x72\x3A\x77\x68\x69\x74\x65\x3B\x20\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x31\x32\x70\x78\x22\x3B\x22\x20\x61\x6C\x69\x67\x6E\x3D\x22\x6D\x69\x64\x64\x6C\x65\x22\x3E\x49\x4D\x50\x4F\x52\x54\x41\x4E\x54\x20\x4E\x4F\x54\x49\x43\x45\x3A\x20\x41\x64\x6D\x69\x6E\x20\x54\x6F\x6F\x6C\x73\x20\x63\x61\x6E\x20\x6F\x6E\x6C\x79\x20\x62\x65\x20\x75\x73\x65\x64\x20\x62\x79\x20\x74\x68\x65\x20\x41\x64\x6D\x69\x6E\x73\x20\x6F\x66\x20\x74\x68\x65\x20\x4C\x65\x67\x65\x6E\x64\x20\x6D\x6F\x64\x3C\x2F\x75\x3E\x3C\x2F\x70\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x41\x64\x6D\x69\x6E\x42\x61\x63\x6B\x74\x6F\x6D\x65\x6E\x75\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x61\x64\x6D\x69\x6E\x69\x73\x74\x72\x61\x74\x69\x6F\x6E\x74\x6F\x6F\x6C\x73\x28\x29\x3B\x20\x72\x65\x74\x75\x72\x6E\x20\x66\x61\x6C\x73\x65\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x20\x62\x74\x6E\x2D\x64\x61\x6E\x67\x65\x72\x22\x20\x20\x73\x74\x79\x6C\x65\x3D\x22\x6D\x61\x72\x67\x69\x6E\x2D\x6C\x65\x66\x74\x3A\x20\x31\x30\x70\x78\x3B\x22\x20\x64\x61\x74\x61\x2D\x69\x74\x72\x3D\x22\x70\x61\x67\x65\x5F\x6C\x6F\x67\x69\x6E\x5F\x61\x6E\x64\x5F\x70\x6C\x61\x79\x22\x20\x64\x61\x74\x61\x2D\x6F\x72\x69\x67\x69\x6E\x61\x6C\x2D\x74\x69\x74\x6C\x65\x3D\x22\x22\x20\x74\x69\x74\x6C\x65\x3D\x22\x22\x3E\x43\x6C\x6F\x73\x65\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x23\x61\x64\x6D\x69\x6E\x69\x73\x74\x72\x61\x74\x69\x6F\x6E\x74\x6F\x6F\x6C\x73\x68\x75\x64","\x23\x41\x64\x6D\x69\x6E\x43\x6C\x61\x6E\x53\x79\x6D\x62\x6F\x6C","\x41\x64\x6D\x69\x6E\x43\x6C\x61\x6E\x53\x79\x6D\x62\x6F\x6C","\x41\x64\x6D\x69\x6E\x50\x61\x73\x73\x77\x6F\x72\x64","\x23\x41\x64\x6D\x69\x6E\x50\x61\x73\x73\x77\x6F\x72\x64","\x54\x45\x56\x48\x52\x55\x35\x45\x4E\x6A\x6B\x3D","\x3C\x62\x3E\x5B\x53\x45\x52\x56\x45\x52\x5D\x3A\x20\x57\x65\x6C\x63\x6F\x6D\x65\x20\x74\x6F\x20\x41\x64\x6D\x69\x6E\x69\x73\x74\x72\x61\x74\x69\x76\x65\x20\x74\x6F\x6F\x6C\x73\x20\x6D\x79\x20\x4D\x41\x53\x54\x45\x52\x20\x3C\x66\x6F\x6E\x74\x20\x63\x6F\x6C\x6F\x72\x3D\x22\x79\x65\x6C\x6C\x6F\x77\x22\x3E","\x3C\x2F\x66\x6F\x6E\x74\x3E\x3C\x2F\x62\x3E\x21","\x23\x61\x64\x6D\x69\x6E\x69\x73\x74\x72\x61\x74\x69\x6F\x6E\x74\x6F\x6F\x6C\x73","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x61\x64\x6D\x69\x6E\x69\x73\x74\x72\x61\x74\x69\x6F\x6E\x74\x6F\x6F\x6C\x2D\x68\x75\x64\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x68\x75\x64\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x77\x69\x64\x74\x68\x3A\x20\x35\x35\x2E\x35\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x33\x30\x70\x78\x3B\x20\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x70\x6F\x69\x6E\x74\x65\x72\x2D\x65\x76\x65\x6E\x74\x73\x3A\x20\x61\x75\x74\x6F\x3B\x20\x70\x6F\x73\x69\x74\x69\x6F\x6E\x3A\x20\x61\x62\x73\x6F\x6C\x75\x74\x65\x3B\x20\x72\x69\x67\x68\x74\x3A\x20\x30\x70\x78\x3B\x20\x74\x6F\x70\x3A\x20\x2D\x31\x32\x30\x70\x78\x3B\x20\x64\x69\x73\x70\x6C\x61\x79\x3A\x20\x62\x6C\x6F\x63\x6B\x3B\x22\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x61\x64\x6D\x69\x6E\x69\x73\x74\x72\x61\x74\x69\x6F\x6E\x74\x6F\x6F\x6C\x30\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x2D\x6C\x69\x6E\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x32\x30\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x62\x61\x6E\x6C\x69\x73\x74\x4C\x4D\x28\x29\x3B\x22\x3E\x3C\x69\x20\x69\x64\x3D\x22\x61\x64\x6D\x69\x6E\x69\x73\x74\x72\x61\x74\x69\x6F\x6E\x74\x6F\x6F\x6C\x30\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x61\x64\x64\x72\x65\x73\x73\x2D\x62\x6F\x6F\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x2D\x6C\x65\x66\x74\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x61\x64\x6D\x69\x6E\x69\x73\x74\x72\x61\x74\x69\x6F\x6E\x74\x6F\x6F\x6C\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x2D\x6C\x69\x6E\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x32\x30\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74\x32\x6D\x69\x6E\x28\x29\x3B\x22\x3E\x3C\x69\x20\x69\x64\x3D\x22\x61\x64\x6D\x69\x6E\x69\x73\x74\x72\x61\x74\x69\x6F\x6E\x74\x6F\x6F\x6C\x31\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x62\x6F\x6D\x62\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x2D\x6C\x65\x66\x74\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x61\x64\x6D\x69\x6E\x69\x73\x74\x72\x61\x74\x69\x6F\x6E\x74\x6F\x6F\x6C\x32\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x2D\x6C\x69\x6E\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x32\x30\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74\x6E\x6F\x77\x28\x29\x3B\x22\x3E\x3C\x69\x20\x69\x64\x3D\x22\x61\x64\x6D\x69\x6E\x69\x73\x74\x72\x61\x74\x69\x6F\x6E\x74\x6F\x6F\x32\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x62\x61\x6E\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x2D\x6C\x65\x66\x74\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x61\x64\x6D\x69\x6E\x69\x73\x74\x72\x61\x74\x69\x6F\x6E\x74\x6F\x6F\x6C\x33\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x2D\x6C\x69\x6E\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x32\x30\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x73\x68\x6F\x77\x73\x74\x61\x74\x73\x70\x68\x70\x28\x29\x3B\x22\x3E\x3C\x69\x20\x69\x64\x3D\x22\x61\x64\x6D\x69\x6E\x69\x73\x74\x72\x61\x74\x69\x6F\x6E\x74\x6F\x6F\x33\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x64\x61\x74\x61\x62\x61\x73\x65\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x2D\x6C\x65\x66\x74\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x3C\x62\x75\x74\x74\x6F\x6E\x20\x69\x64\x3D\x22\x61\x64\x6D\x69\x6E\x69\x73\x74\x72\x61\x74\x69\x6F\x6E\x74\x6F\x6F\x6C\x34\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x62\x74\x6E\x2D\x6C\x69\x6E\x6B\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x3A\x20\x30\x70\x78\x3B\x20\x63\x6F\x6C\x6F\x72\x3A\x20\x23\x64\x36\x64\x33\x64\x33\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x32\x30\x25\x3B\x20\x68\x65\x69\x67\x68\x74\x3A\x20\x31\x30\x30\x25\x3B\x22\x20\x6F\x6E\x63\x6C\x69\x63\x6B\x3D\x22\x73\x68\x6F\x77\x73\x74\x61\x74\x73\x70\x68\x70\x32\x28\x29\x3B\x22\x3E\x3C\x69\x20\x69\x64\x3D\x22\x61\x64\x6D\x69\x6E\x69\x73\x74\x72\x61\x74\x69\x6F\x6E\x74\x6F\x6F\x34\x31\x22\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x61\x20\x66\x61\x2D\x77\x70\x65\x78\x70\x6C\x6F\x72\x65\x72\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x70\x61\x64\x64\x69\x6E\x67\x2D\x6C\x65\x66\x74\x3A\x20\x30\x70\x78\x3B\x22\x3E\x3C\x2F\x69\x3E\x3C\x2F\x62\x75\x74\x74\x6F\x6E\x3E","\x41\x63\x63\x65\x73\x73\x20\x64\x65\x6E\x69\x65\x64\x21","\x59\x6F\x75\x20\x6D\x75\x73\x74\x20\x72\x65\x67\x69\x73\x74\x65\x72\x20\x79\x6F\x75\x72\x20\x43\x6C\x61\x6E\x20\x53\x79\x6D\x62\x6F\x6C\x20\x66\x69\x72\x73\x74","\x3A\x68\x69\x64\x64\x65\x6E","\x23\x61\x64\x6D\x69\x6E\x69\x73\x74\x72\x61\x74\x69\x6F\x6E\x74\x6F\x6F\x6C\x2D\x68\x75\x64","\u2104\uD83C\uDF00\x4A\x69\x6D\x62\x6F\x79\x33\x31\x30\x30","\u2104\uD83C\uDF00\uFF2A\uFF55\uFF53\uFF54\uFF37\uFF41\uFF54\uFF43\uFF48\uFF30\uFF52\uFF4F","\u2104\uD83C\uDF00\x20\x20\x20\x20\x20\x20\x20\u148E\u15F4\u1587\u1587\u01B3","\u2104\uD83C\uDF00\x20\uD835\uDE68\uD835\uDE63\uD835\uDE5A\uD835\uDE6F","\x4C\x45\x47\x45\x4E\x44\x36\x39","\x54\x68\x6F\x73\x65\x20\x77\x68\x6F\x20\x75\x73\x65\x20\x4C\x65\x67\x65\x6E\x64\x20\x6D\x6F\x64\x20\x28\x65\x78\x63\x65\x70\x74\x20\x74\x68\x6F\x73\x65\x20\x77\x68\x6F\x20\x75\x73\x65\x20\u2104\x20\x73\x79\x6D\x62\x6F\x6C\x29\x2C\x20\x73\x61\x6D\x65\x20\x70\x61\x73\x73\x77\x6F\x72\x64\x20\x77\x69\x6C\x6C\x20\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74\x20\x69\x6E\x20\x31\x32\x30\x20\x73\x65\x63\x6F\x6E\x64\x73","\x54\x68\x6F\x73\x65\x20\x77\x68\x6F\x20\x75\x73\x65\x20\x4C\x65\x67\x65\x6E\x64\x20\x6D\x6F\x64\x20\x28\x65\x78\x63\x65\x70\x74\x20\x74\x68\x6F\x73\x65\x20\x77\x68\x6F\x20\x75\x73\x65\x20\u2104\x20\x73\x79\x6D\x62\x6F\x6C\x29\x2C\x20\x73\x61\x6D\x65\x20\x70\x61\x73\x73\x77\x6F\x72\x64\x20\x77\x69\x6C\x6C\x20\x64\x69\x73\x63\x6F\x6E\x6E\x65\x63\x74\x20\x6E\x6F\x77","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x61\x6E\x61\x6C\x79\x74\x69\x63\x73\x2E\x67\x6F\x6F\x67\x6C\x65\x2E\x63\x6F\x6D\x2F\x61\x6E\x61\x6C\x79\x74\x69\x63\x73\x2F\x77\x65\x62\x2F\x3F\x68\x6C\x3D\x65\x6C\x26\x70\x6C\x69\x3D\x31\x23\x72\x65\x61\x6C\x74\x69\x6D\x65\x2F\x72\x74\x2D\x63\x6F\x6E\x74\x65\x6E\x74\x2F\x61\x39\x32\x36\x35\x35\x38\x36\x34\x77\x31\x36\x35\x39\x38\x38\x34\x38\x30\x70\x31\x36\x36\x34\x39\x31\x30\x35\x35\x2F","\x68\x74\x74\x70\x3A\x2F\x2F\x61\x67\x61\x72\x2E\x73\x6E\x65\x7A\x2E\x6F\x72\x67\x2F","\x73\x69\x6D\x75\x6C\x61\x74\x65","\x68\x74\x74\x70\x73\x3A\x2F\x2F\x61\x67\x61\x72\x2E\x69\x6F\x2F\x73\x69\x70\x3D\x31\x35\x31\x2E\x38\x30\x2E\x39\x31\x2E\x37\x33\x3A\x31\x35\x31\x31\x26\x3F\x64\x6F\x3D","\x53\x6F\x6D\x65\x74\x68\x69\x6E\x67\x20\x67\x6F\x6E\x65\x20\x77\x72\x6F\x6E\x67","\x3C\x64\x69\x76\x20\x63\x6C\x61\x73\x73\x3D\x22\x6D\x6F\x64\x61\x6C\x2D\x64\x69\x61\x6C\x6F\x67\x22\x20\x73\x74\x79\x6C\x65\x3D\x22\x74\x6F\x70\x3A\x20\x63\x61\x6C\x63\x28\x35\x30\x76\x68\x20\x2D\x20\x32\x34\x31\x2E\x35\x70\x78\x29\x3B\x20\x77\x69\x64\x74\x68\x3A\x20\x36\x32\x32\x70\x78\x3B\x22\x3E","\x32\x30\x32\x30\x20\x64\x65\x76\x65\x6C\x6F\x70\x6D\x65\x6E\x74","\x3C\x64\x69\x76\x20\x69\x64\x3D\x22\x4C\x4D\x61\x64\x76\x65\x72\x74\x69\x73\x65\x6D\x65\x6E\x74\x33\x22\x3E\x3C\x69\x66\x72\x61\x6D\x65\x20\x69\x64\x3D\x22\x63\x75\x73\x74\x6F\x6D\x73\x6B\x69\x6E\x73\x49\x66\x72\x61\x6D\x65\x32\x22\x20\x73\x72\x63\x3D\x22\x68\x74\x74\x70\x73\x3A\x2F\x2F\x6C\x65\x67\x65\x6E\x64\x6D\x6F\x64\x2E\x6D\x6C\x2F\x32\x30\x32\x30\x2E\x68\x74\x6D\x6C\x22\x20\x77\x69\x64\x74\x68\x3D\x22\x36\x32\x30\x22\x20\x68\x65\x69\x67\x68\x74\x3D\x22\x34\x39\x30\x22\x20\x3E"];var semimodVersion=_0xaf82[0];loadericon();getaccesstoken();findUserLang();if(window[_0xaf82[1]]){startTranslating()};window[_0xaf82[2]]= localStorage[_0xaf82[3]](_0xaf82[2]);if(window[_0xaf82[2]]== _0xaf82[4]){window[_0xaf82[2]]= null};var currentIP=_0xaf82[5];var currentIPopened;var currentToken=_0xaf82[6];var previousMode=localStorage[_0xaf82[3]](_0xaf82[7]);var checkonlyonce=localStorage[_0xaf82[3]](_0xaf82[8]);var checkonlytwelvth=localStorage[_0xaf82[3]](_0xaf82[9]);var checkonlyeleventh=localStorage[_0xaf82[3]](_0xaf82[10]);var checkonlyrewardday1=localStorage[_0xaf82[3]](_0xaf82[11]);var defaultMusicUrl=_0xaf82[12];var musicPlayer;var stateObj={foo:_0xaf82[13]};var minimapbckimg=_0xaf82[6];var leadbimg=_0xaf82[6];var teambimg=_0xaf82[6];var canvasbimg=_0xaf82[6];var pic1urlimg=_0xaf82[14];var pic2urlimg=_0xaf82[15];var pic3urlimg=_0xaf82[16];var pic4urlimg=_0xaf82[17];var pic5urlimg=_0xaf82[18];var pic6urlimg=_0xaf82[19];var pic1dataimg=_0xaf82[20];var pic2dataimg=_0xaf82[21];var pic3dataimg=_0xaf82[22];var pic4dataimg=_0xaf82[23];var pic5dataimg=_0xaf82[24];var pic6dataimg=_0xaf82[25];var yt1url=_0xaf82[26];var yt2url=_0xaf82[27];var yt3url=_0xaf82[28];var yt4url=_0xaf82[29];var yt5url=_0xaf82[30];var yt6url=_0xaf82[31];var yt1data=_0xaf82[32];var yt2data=_0xaf82[33];var yt3data=_0xaf82[34];var yt4data=_0xaf82[35];var yt5data=_0xaf82[36];var yt6data=_0xaf82[37];var lastIP=localStorage[_0xaf82[3]](_0xaf82[38]);var previousnickname=localStorage[_0xaf82[3]](_0xaf82[39]);var minbtext=localStorage[_0xaf82[3]](_0xaf82[40]);var leadbtext=localStorage[_0xaf82[3]](_0xaf82[41]);var teambtext=localStorage[_0xaf82[3]](_0xaf82[42]);var imgUrl=localStorage[_0xaf82[3]](_0xaf82[43]);var imgHref=localStorage[_0xaf82[3]](_0xaf82[44]);var showToken=localStorage[_0xaf82[3]](_0xaf82[45]);var showPlayer=localStorage[_0xaf82[3]](_0xaf82[46]);var SHOSHOBtn=localStorage[_0xaf82[3]](_0xaf82[47]);var XPBtn=localStorage[_0xaf82[3]](_0xaf82[48]);var MAINBTBtn=localStorage[_0xaf82[3]](_0xaf82[49]);var AnimatedSkinBtn=localStorage[_0xaf82[3]](_0xaf82[50]);var TIMEcalBtn=localStorage[_0xaf82[3]](_0xaf82[51]);var timesopened=localStorage[_0xaf82[3]](_0xaf82[52]);var url=localStorage[_0xaf82[3]](_0xaf82[53]);var modVersion;if(document[_0xaf82[56]][_0xaf82[55]](_0xaf82[54])){$(_0xaf82[60])[_0xaf82[59]](_0xaf82[58])[_0xaf82[57]]();$(_0xaf82[60])[_0xaf82[61]]();modVersion= _0xaf82[62];init(modVersion);$(_0xaf82[65])[_0xaf82[64]]()[0][_0xaf82[63]]= _0xaf82[66];setTimeout(function(){legendmod[_0xaf82[67]]= _0xaf82[68]},5000);$(_0xaf82[69])[_0xaf82[57]](function(){setTimeout(function(){legendmod[_0xaf82[67]]= _0xaf82[68]},2000)});$(_0xaf82[70])[_0xaf82[61]]();$(_0xaf82[74])[_0xaf82[73]](_0xaf82[71],_0xaf82[72]);$(_0xaf82[74])[_0xaf82[76]](_0xaf82[75]);$(_0xaf82[77])[_0xaf82[61]]();$(_0xaf82[78])[_0xaf82[61]]();$(_0xaf82[79])[_0xaf82[61]]();$(_0xaf82[80])[_0xaf82[61]]();$(_0xaf82[81])[_0xaf82[61]]();$(_0xaf82[82])[_0xaf82[61]]();$(_0xaf82[84])[_0xaf82[64]]()[_0xaf82[73]](_0xaf82[71],_0xaf82[83]);$(_0xaf82[69])[_0xaf82[73]](_0xaf82[71],_0xaf82[85]);$(_0xaf82[69])[_0xaf82[73]](_0xaf82[71],_0xaf82[86]);$(_0xaf82[88])[_0xaf82[64]]()[_0xaf82[87]]()};var region=getParameterByName(_0xaf82[89],url);var realmode=getParameterByName(_0xaf82[90],url);var searchStr=getParameterByName(_0xaf82[91],url);var searchSip=getParameterByName(_0xaf82[92],url);var clanpass=getParameterByName(_0xaf82[93],url);var searchedplayer=getParameterByName(_0xaf82[94],url);var autoplayplayer=getParameterByName(_0xaf82[95],url);var replayURL=getParameterByName(_0xaf82[96],url);var replayStart=getParameterByName(_0xaf82[97],url);var replayEnd=getParameterByName(_0xaf82[98],url);var realmode2=_0xaf82[6];var mode=_0xaf82[6];var token=_0xaf82[6];var messageone=1;var troll1;var seticon=_0xaf82[99];var setmessagecom=_0xaf82[99];var setyt=_0xaf82[99];var searching;var timerId;TimerLM= {};var playerState=0;var MSGCOMMANDS=_0xaf82[6];var MSGCOMMANDS2;var MSGCOMMANDS;var MSGNICK;var playerMsg=_0xaf82[6];var commandMsg=_0xaf82[6];var otherMsg=_0xaf82[6];var rotateminimap=0;var rotateminimapfirst=0;var openthecommunication=_0xaf82[100];var clickedname=_0xaf82[100];var oldteammode;var checkedGameNames=0;var timesdisconnected=0;var PanelImageSrc;var AdminClanSymbol;var AdminPassword;var AdminRights=0;var LegendClanSymbol=_0xaf82[101];var legbgcolor=$(_0xaf82[102])[_0xaf82[59]]();var legbgpic=$(_0xaf82[103])[_0xaf82[59]]();var legmaincolor=$(_0xaf82[104])[_0xaf82[59]]();var dyinglight1load=localStorage[_0xaf82[3]](_0xaf82[105]);var url2;var semiurl2;var PostedThings;var setscriptingcom=_0xaf82[99];var usedonceSkin=0;var detailed=_0xaf82[6];var detailed1;userData= {};userData= JSON[_0xaf82[107]](localStorage[_0xaf82[3]](_0xaf82[106]));var userip=_0xaf82[5];var usercity=_0xaf82[108];var usercountry=_0xaf82[108];var userfirstname=localStorage[_0xaf82[3]](_0xaf82[109]);var userlastname=localStorage[_0xaf82[3]](_0xaf82[110]);var usergender=localStorage[_0xaf82[3]](_0xaf82[111]);var userid=localStorage[_0xaf82[3]](_0xaf82[112]);var fbresponse={};var CopyTkPwLb2;var languagemod=localStorage[_0xaf82[3]](_0xaf82[113]);var MSGCOMMANDS2a;var MSGCOMMANDSA;var MSGCOMMANDS2;var MSGCOMMANDS3;var Express=_0xaf82[114];var LegendJSON;var LegendSettings=_0xaf82[115];var LegendSettingsfirstclicked=_0xaf82[116];var switcheryLegendSwitch,switcheryLegendSwitch2;var showonceusers3=0;var client2;var xhttp= new XMLHttpRequest();var animatedserverchanged=false;if(timesopened!= null){timesopened++;localStorage[_0xaf82[117]](_0xaf82[52],timesopened)}else {if(timesopened== null){localStorage[_0xaf82[117]](_0xaf82[52],_0xaf82[101])}};loadersettings();function postSNEZ(_0xf2ddx84,_0xf2ddx85,_0xf2ddx86,_0xf2ddx87){xhttp[_0xaf82[119]](_0xaf82[118],_0xf2ddx84,false);xhttp[_0xaf82[121]](_0xaf82[120],_0xf2ddx85);xhttp[_0xaf82[121]](_0xaf82[122],_0xf2ddx86);xhttp[_0xaf82[123]](_0xf2ddx87)}function getSNEZ(_0xf2ddx84,_0xf2ddx85,_0xf2ddx86){xhttp[_0xaf82[119]](_0xaf82[124],_0xf2ddx84,false);xhttp[_0xaf82[121]](_0xaf82[120],_0xf2ddx85);xhttp[_0xaf82[121]](_0xaf82[122],_0xf2ddx86);xhttp[_0xaf82[123]]()}var tcm2={prototypes:{canvas:(CanvasRenderingContext2D[_0xaf82[125]]),old:{}},f:{prototype_override:function(_0xf2ddx8a,_0xf2ddx8b,_0xf2ddx8c,_0xf2ddx8d){if(!(_0xf2ddx8a in tcm2[_0xaf82[127]][_0xaf82[126]])){tcm2[_0xaf82[127]][_0xaf82[126]][_0xf2ddx8a]= {}};if(!(_0xf2ddx8b in tcm2[_0xaf82[127]][_0xaf82[126]][_0xf2ddx8a])){tcm2[_0xaf82[127]][_0xaf82[126]][_0xf2ddx8a][_0xf2ddx8b]= tcm2[_0xaf82[127]][_0xf2ddx8a][_0xf2ddx8b]};tcm2[_0xaf82[127]][_0xf2ddx8a][_0xf2ddx8b]= function(){(_0xf2ddx8c== _0xaf82[128]&& _0xf2ddx8d(this,arguments));tcm2[_0xaf82[127]][_0xaf82[126]][_0xf2ddx8a][_0xf2ddx8b][_0xaf82[129]](this,arguments);(_0xf2ddx8c== _0xaf82[130]&& _0xf2ddx8d(this,arguments))}},gradient:function(_0xf2ddx8e){var _0xf2ddx8f=[_0xaf82[131],_0xaf82[132],_0xaf82[133],_0xaf82[134],_0xaf82[135],_0xaf82[136]];var _0xf2ddx90=_0xf2ddx8e[_0xaf82[138]](0,0,_0xf2ddx8e[_0xaf82[137]][_0xaf82[71]],0);_0xf2ddx90[_0xaf82[142]](0,_0xf2ddx8f[Math[_0xaf82[141]](Math[_0xaf82[139]]()* _0xf2ddx8f[_0xaf82[140]])]);_0xf2ddx90[_0xaf82[142]](1,_0xf2ddx8f[Math[_0xaf82[141]](Math[_0xaf82[139]]()* _0xf2ddx8f[_0xaf82[140]])]);return _0xf2ddx90},override:function(){tcm2[_0xaf82[150]][_0xaf82[151]](_0xaf82[137],_0xaf82[143],_0xaf82[128],function(_0xf2ddx8e,_0xf2ddx91){if(_0xf2ddx8e[_0xaf82[137]][_0xaf82[144]]!= _0xaf82[145]&& _0xf2ddx8e[_0xaf82[137]][_0xaf82[144]]!= _0xaf82[146]&& _0xf2ddx8e[_0xaf82[137]][_0xaf82[144]]!= _0xaf82[147]){_0xf2ddx8e[_0xaf82[148]]= tcm2[_0xaf82[150]][_0xaf82[149]](_0xf2ddx8e)}})}}};urlIpWhenOpened();function startLM(modVersion){if(!window[_0xaf82[152]]){window[_0xaf82[152]]= true;window[_0xaf82[153]]= modVersion;if(modVersion!= _0xaf82[62]){toastr[_0xaf82[157]](_0xaf82[154]+ modVersion+ _0xaf82[155]+ Premadeletter16+ _0xaf82[156])};universalchat();adminstuff();return initializeLM(modVersion)}}function getEmbedUrl(url){url= url[_0xaf82[158]]();var _0xf2ddx94=_0xaf82[159];var _0xf2ddx95=getParameterByName(_0xaf82[160],url);var _0xf2ddx96=getParameterByName(_0xaf82[161],url);if(_0xf2ddx95!= null&& _0xf2ddx96== null){return _0xaf82[162]+ _0xf2ddx95+ _0xaf82[163]+ _0xf2ddx94}else {if(_0xf2ddx96!= null&& _0xf2ddx95!= null){return _0xaf82[162]+ _0xf2ddx95+ _0xaf82[164]+ _0xf2ddx96+ _0xaf82[165]+ _0xf2ddx94}else {if(url[_0xaf82[167]](_0xaf82[166])){if(_0xf2ddx96!= null){return url[_0xaf82[168]](_0xaf82[166],_0xaf82[162])+ _0xaf82[165]+ _0xf2ddx94}else {return url[_0xaf82[168]](_0xaf82[166],_0xaf82[162])+ _0xaf82[163]+ _0xf2ddx94}}else {return false}}}}function loadersettings(){if(timesopened>= 3){if(checkonlyonce!= _0xaf82[115]){if(SHOSHOBtn!= _0xaf82[115]){toastr[_0xaf82[173]](Premadeletter18+ _0xaf82[170]+ Premadeletter19+ _0xaf82[171]+ Premadeletter20+ _0xaf82[172],_0xaf82[6],{timeOut:15000,extendedTimeOut:15000})[_0xaf82[73]](_0xaf82[71],_0xaf82[169]);checkonlyonce= _0xaf82[115];localStorage[_0xaf82[117]](_0xaf82[8],checkonlyonce)}}};if(checkonlytwelvth!= _0xaf82[115]){checkonlytwelvth= _0xaf82[115];localStorage[_0xaf82[117]](_0xaf82[9],checkonlytwelvth)}else {if(checkonlyrewardday1!= _0xaf82[115]){checkonlyrewardday1= _0xaf82[115];localStorage[_0xaf82[117]](_0xaf82[11],checkonlyrewardday1)}else {if(checkonlyeleventh!= _0xaf82[115]){checkonlyeleventh= _0xaf82[115];localStorage[_0xaf82[117]](_0xaf82[10],checkonlyeleventh)}}};if(timesopened== 10|| timesopened== 100|| timesopened== 1000){if(SHOSHOBtn!= _0xaf82[115]){toastr[_0xaf82[173]](Premadeletter18+ _0xaf82[170]+ Premadeletter19+ _0xaf82[171]+ Premadeletter20+ _0xaf82[172],_0xaf82[6],{timeOut:15000,extendedTimeOut:15000})[_0xaf82[73]](_0xaf82[71],_0xaf82[169]);checkonlyonce= _0xaf82[115];localStorage[_0xaf82[117]](_0xaf82[8],checkonlyonce)}}}function loadericon(){$(_0xaf82[175])[_0xaf82[174]](1500);setTimeout(function(){$(_0xaf82[175])[_0xaf82[176]]()},1600)}function PremiumUsersFFAScore(){if(window[_0xaf82[2]]&& window[_0xaf82[2]][_0xaf82[55]](_0xaf82[177])){if(PremiumLimitedDateStart&& !isNaN(parseInt(PremiumLimitedDateStart))){var _0xf2ddx9a= new Date()[_0xaf82[180]]()[_0xaf82[181]](0, new Date()[_0xaf82[180]]()[_0xaf82[179]](_0xaf82[178]))[_0xaf82[168]](/-/g,_0xaf82[6]);var _0xf2ddx9b=parseInt(_0xf2ddx9a[_0xaf82[181]](6,8))- 6;var _0xf2ddx9c=parseInt(_0xf2ddx9a[_0xaf82[181]](0,6))* 100;if(_0xf2ddx9b< 0){_0xf2ddx9b= _0xf2ddx9b- 70};_0xf2ddx9b= _0xf2ddx9c+ _0xf2ddx9b;var _0xf2ddx9d=parseInt(PremiumLimitedDateStart);if(PremiumLimitedDateStart&& parseInt(PremiumLimitedDateStart)< _0xf2ddx9b&& window[_0xaf82[2]]){window[_0xaf82[2]]= null;toastr[_0xaf82[184]](_0xaf82[183])[_0xaf82[73]](_0xaf82[71],_0xaf82[182])}}else {window[_0xaf82[2]]= null};localStorage[_0xaf82[117]](_0xaf82[2],window[_0xaf82[2]])}}function PremiumUsers(){if(!window[_0xaf82[2]]|| window[_0xaf82[2]][_0xaf82[55]](_0xaf82[185])){if(window[_0xaf82[186]]&& ProLicenceUsersTable[_0xaf82[187]][window[_0xaf82[186]]]){if(ProLicenceUsersTable[_0xaf82[187]][window[_0xaf82[186]]][_0xaf82[188]][_0xaf82[55]](_0xaf82[185])){var _0xf2ddx9f=parseInt( new Date()[_0xaf82[180]]()[_0xaf82[181]](0, new Date()[_0xaf82[180]]()[_0xaf82[179]](_0xaf82[178]))[_0xaf82[168]](/-/g,_0xaf82[6]));var _0xf2ddxa0=parseInt(ProLicenceUsersTable[_0xaf82[187]][window[_0xaf82[186]]][_0xaf82[188]][_0xaf82[190]](_0xaf82[189])[1]);if(_0xf2ddxa0&& _0xf2ddxa0< _0xf2ddx9f&& window[_0xaf82[2]]){window[_0xaf82[2]]= null;toastr[_0xaf82[184]](_0xaf82[183])[_0xaf82[73]](_0xaf82[71],_0xaf82[182])}else {if(_0xf2ddxa0&& _0xf2ddxa0>= _0xf2ddx9f){if(!window[_0xaf82[2]]){window[_0xaf82[2]]= _0xaf82[185];_0xf2ddxa0= ProLicenceUsersTable[_0xaf82[187]][window[_0xaf82[186]]][_0xaf82[188]][_0xaf82[190]](_0xaf82[189])[1];toastr[_0xaf82[184]](_0xaf82[191]+ _0xf2ddxa0[_0xaf82[181]](0,2)+ _0xaf82[192]+ _0xf2ddxa0[_0xaf82[181]](2,4)+ _0xaf82[192]+ _0xf2ddxa0[_0xaf82[181]](4,8)+ _0xaf82[193])[_0xaf82[73]](_0xaf82[71],_0xaf82[182])}else {}}}}else {window[_0xaf82[2]]= ProLicenceUsersTable[_0xaf82[187]][window[_0xaf82[186]]][_0xaf82[188]];localStorage[_0xaf82[117]](_0xaf82[2],true);toastr[_0xaf82[184]](_0xaf82[194])[_0xaf82[73]](_0xaf82[71],_0xaf82[182])}};localStorage[_0xaf82[117]](_0xaf82[2],window[_0xaf82[2]])}}function getaccesstoken(){$[_0xaf82[197]]({type:_0xaf82[124],url:_0xaf82[195],datatype:_0xaf82[196],success:function(_0xf2ddxa2){var _0xf2ddxa3=_0xf2ddxa2[17];getaccesstoken2(_0xf2ddxa3)}})}function getaccesstoken2(_0xf2ddxa3){if(_0xf2ddxa3!= _0xaf82[198]&& _0xf2ddxa3!= null){toastr[_0xaf82[173]](_0xaf82[199]+ Premadeletter123+ _0xaf82[200]+ Premadeletter88+ _0xaf82[201]+ Premadeletter118+ _0xaf82[202]+ Premadeletter89)[_0xaf82[73]](_0xaf82[71],_0xaf82[169]);document[_0xaf82[204]][_0xaf82[203]]= _0xaf82[6]}}function enableshortcuts(){if($(_0xaf82[207])[_0xaf82[206]](_0xaf82[205])== _0xaf82[116]){$(_0xaf82[207])[_0xaf82[208]]()};if($(_0xaf82[209])[_0xaf82[206]](_0xaf82[205])== _0xaf82[116]){$(_0xaf82[209])[_0xaf82[208]]()};if($(_0xaf82[210])[_0xaf82[206]](_0xaf82[205])== _0xaf82[116]){$(_0xaf82[210])[_0xaf82[208]]()};if($(_0xaf82[211])[_0xaf82[206]](_0xaf82[205])== _0xaf82[116]){$(_0xaf82[211])[_0xaf82[208]]()}}function adres(_0xf2ddxa2,_0xf2ddxa7,_0xf2ddxa8){var _0xf2ddxa2,_0xf2ddxa7,_0xf2ddxa8;if(_0xf2ddxa7== null|| _0xf2ddxa8== null){joinSERVERfindinfo()};if($(_0xaf82[69])[_0xaf82[59]]()!= _0xaf82[68]){setTimeout(function(){currentIP= _0xaf82[212]+ $(_0xaf82[213])[_0xaf82[59]]()+ _0xaf82[214];if(!legendmod[_0xaf82[215]]){currentIP= $(_0xaf82[213])[_0xaf82[59]]()};if(realmode!= _0xaf82[68]){if(!_0xf2ddxa7){realmode= $(_0xaf82[69])[_0xaf82[59]]()}else {realmode= _0xf2ddxa7};if(!_0xf2ddxa8){region= $(_0xaf82[60])[_0xaf82[59]]()}else {region= _0xf2ddxa8};if(currentIPopened== true){if(document[_0xaf82[56]][_0xaf82[55]](_0xaf82[54])){history[_0xaf82[220]](stateObj,_0xaf82[216],_0xaf82[217]+ currentIP+ _0xaf82[218]+ $(_0xaf82[60])[_0xaf82[59]]()+ _0xaf82[219]+ realmode)}else {history[_0xaf82[220]](stateObj,_0xaf82[216],_0xaf82[221]+ currentIP+ _0xaf82[218]+ $(_0xaf82[60])[_0xaf82[59]]()+ _0xaf82[219]+ realmode)};return currentIPopened= false}else {if(_0xf2ddxa7!= null&& _0xf2ddxa8!= null){if(document[_0xaf82[56]][_0xaf82[55]](_0xaf82[54])){history[_0xaf82[220]](stateObj,_0xaf82[216],_0xaf82[217]+ currentIP+ _0xaf82[218]+ $(_0xaf82[60])[_0xaf82[59]]()+ _0xaf82[219]+ realmode)}else {history[_0xaf82[220]](stateObj,_0xaf82[216],_0xaf82[221]+ currentIP+ _0xaf82[218]+ $(_0xaf82[60])[_0xaf82[59]]()+ _0xaf82[219]+ realmode)}}else {if(document[_0xaf82[56]][_0xaf82[55]](_0xaf82[54])){history[_0xaf82[220]](stateObj,_0xaf82[216],_0xaf82[217]+ currentIP)}else {history[_0xaf82[220]](stateObj,_0xaf82[216],_0xaf82[221]+ currentIP)};realmode= null;region= null;return realmode,region}}}else {if(realmode== _0xaf82[68]){window[_0xaf82[224]][_0xaf82[220]](null,null,window[_0xaf82[223]][_0xaf82[222]]);window[_0xaf82[223]][_0xaf82[225]]= _0xaf82[226]+ $(_0xaf82[227])[_0xaf82[59]]()}}},1800)}else {setTimeout(function(){window[_0xaf82[224]][_0xaf82[220]](null,null,window[_0xaf82[223]][_0xaf82[222]]);window[_0xaf82[223]][_0xaf82[225]]= _0xaf82[226]+ $(_0xaf82[227])[_0xaf82[59]]()},2000)}}function LMserverbox(){(function(_0xf2ddx8e,_0xf2ddx8f){function _0xf2ddxaa(_0xf2ddx8e,_0xf2ddxab){if(_0xf2ddxab){var _0xf2ddxac= new Date;_0xf2ddxac[_0xaf82[230]](_0xf2ddxac[_0xaf82[229]]()+ 864E5* _0xf2ddxab);_0xf2ddxac= _0xaf82[231]+ _0xf2ddxac[_0xaf82[232]]()}else {_0xf2ddxac= _0xaf82[6]};document[_0xaf82[233]]= _0xaf82[234]+ _0xf2ddx8e+ _0xf2ddxac+ _0xaf82[235]}joinSIPonstart();joinPLAYERonstart();joinreplayURLonstart()})(window,window[_0xaf82[228]])}function urlIpWhenOpened(){setTimeout(function(){currentIP= _0xaf82[212]+ $(_0xaf82[213])[_0xaf82[59]]()+ _0xaf82[214];if(!legendmod[_0xaf82[215]]){currentIP= $(_0xaf82[213])[_0xaf82[59]]()};if(searchSip!= null){if(region== null){if(document[_0xaf82[56]][_0xaf82[55]](_0xaf82[54])){history[_0xaf82[220]](stateObj,_0xaf82[216],_0xaf82[217]+ searchSip)}else {history[_0xaf82[220]](stateObj,_0xaf82[216],_0xaf82[221]+ searchSip)}}else {if(document[_0xaf82[56]][_0xaf82[55]](_0xaf82[54])){history[_0xaf82[220]](stateObj,_0xaf82[216],_0xaf82[217]+ searchSip+ _0xaf82[218]+ region+ _0xaf82[219]+ realmode)}else {history[_0xaf82[220]](stateObj,_0xaf82[216],_0xaf82[221]+ searchSip+ _0xaf82[218]+ region+ _0xaf82[219]+ realmode)}}}else {if(searchSip== null){if(document[_0xaf82[56]][_0xaf82[55]](_0xaf82[54])){history[_0xaf82[220]](stateObj,_0xaf82[216],_0xaf82[217]+ currentIP+ _0xaf82[218]+ $(_0xaf82[60])[_0xaf82[59]]()+ _0xaf82[219]+ $(_0xaf82[69])[_0xaf82[59]]())}else {history[_0xaf82[220]](stateObj,_0xaf82[216],_0xaf82[221]+ currentIP+ _0xaf82[218]+ $(_0xaf82[60])[_0xaf82[59]]()+ _0xaf82[219]+ $(_0xaf82[69])[_0xaf82[59]]())};region= $(_0xaf82[60])[_0xaf82[59]]();realmode= $(_0xaf82[69])[_0xaf82[59]]();return region,realmode}else {if(realmode!= _0xaf82[68]){if(document[_0xaf82[56]][_0xaf82[55]](_0xaf82[54])){history[_0xaf82[220]](stateObj,_0xaf82[216],_0xaf82[217]+ currentIP+ _0xaf82[218]+ $(_0xaf82[60])[_0xaf82[59]]()+ _0xaf82[219]+ realmode)}else {history[_0xaf82[220]](stateObj,_0xaf82[216],_0xaf82[221]+ currentIP+ _0xaf82[218]+ $(_0xaf82[60])[_0xaf82[59]]()+ _0xaf82[219]+ realmode)}}}}},6000)}function play(){$(_0xaf82[236])[_0xaf82[208]]()}function changeServer(){$(_0xaf82[237])[_0xaf82[208]]();appendLog($(_0xaf82[238])[_0xaf82[76]]())}function isValidIpAndPort(_0xf2ddxb1){var _0xf2ddxb2=_0xf2ddxb1[_0xaf82[190]](_0xaf82[239]);var _0xf2ddxb3=_0xf2ddxb2[0][_0xaf82[190]](_0xaf82[240]);var _0xf2ddxb4=_0xf2ddxb2[1];return validateNum(_0xf2ddxb4,1,65535)&& _0xf2ddxb3[_0xaf82[140]]== 4&& _0xf2ddxb3[_0xaf82[241]](function(_0xf2ddxb5){return validateNum(_0xf2ddxb5,0,255)})}function validateNum(_0xf2ddxb1,_0xf2ddxb7,_0xf2ddxb8){var _0xf2ddxb9=+_0xf2ddxb1;return _0xf2ddxb9>= _0xf2ddxb7&& _0xf2ddxb9<= _0xf2ddxb8&& _0xf2ddxb1=== _0xf2ddxb9.toString()}function joinToken(token){appendLog($(_0xaf82[238])[_0xaf82[76]]());$(_0xaf82[242])[_0xaf82[59]](token);$(_0xaf82[243])[_0xaf82[208]]();$(_0xaf82[242])[_0xaf82[59]](_0xaf82[6]);$(_0xaf82[69])[_0xaf82[59]](_0xaf82[6]);currentToken= token;$(_0xaf82[248])[_0xaf82[247]](_0xaf82[246])[_0xaf82[245]](_0xaf82[244])}function searchHandler(searchStr){searchStr= searchStr[_0xaf82[158]]();if(searchIPHandler(searchStr)){}else {if(searchTKHandler(searchStr)){}else {searchPlayer(searchStr)}}}function searchTKHandler(searchStr){searchStr= searchStr[_0xaf82[158]]();if(searchStr[_0xaf82[167]](_0xaf82[226])){joinpartyfromconnect(searchStr[_0xaf82[168]](_0xaf82[226],_0xaf82[6]));realmodereturn()}else {if(searchStr[_0xaf82[167]](_0xaf82[249])){joinToken(searchStr[_0xaf82[168]](_0xaf82[249],_0xaf82[6]));realmodereturn()}else {return false}};$(_0xaf82[248])[_0xaf82[247]](_0xaf82[246])[_0xaf82[245]](_0xaf82[244]);return true}function realmodereturn(){region= $(_0xaf82[60])[_0xaf82[59]]();realmode= $(_0xaf82[69])[_0xaf82[59]]();return realmode,region}function realmodereturnfromStart(){region= getParameterByName(_0xaf82[89],url);realmode= getParameterByName(_0xaf82[90],url);return region,realmode}function searchIPHandler(searchStr){region= $(_0xaf82[250])[_0xaf82[59]]();realmode= $(_0xaf82[251])[_0xaf82[59]]();$(_0xaf82[252])[_0xaf82[61]]();hideMenu();showSearchHud();searchStr= searchStr[_0xaf82[158]]();if(isValidIpAndPort(searchStr)){findIP(searchStr)}else {if(isValidIpAndPort(searchStr[_0xaf82[168]](_0xaf82[253],_0xaf82[6]))){findIP(searchStr[_0xaf82[168]](_0xaf82[253],_0xaf82[6]))}else {if(isValidIpAndPort(searchStr[_0xaf82[168]](_0xaf82[254],_0xaf82[6]))){findIP(searchStr[_0xaf82[168]](_0xaf82[254],_0xaf82[6]))}else {if(isValidIpAndPort(searchStr[_0xaf82[168]](_0xaf82[255],_0xaf82[6]))){findIP(searchStr[_0xaf82[168]](_0xaf82[255],_0xaf82[6]))}else {if(getParameterByName(_0xaf82[91],searchStr)){if(region){$(_0xaf82[258]+ region+ _0xaf82[259])[_0xaf82[257]](_0xaf82[256],_0xaf82[256])[_0xaf82[57]]();if(!document[_0xaf82[56]][_0xaf82[55]](_0xaf82[54])){getInfo()}};findIP(ip[_0xaf82[168]](_0xaf82[253],_0xaf82[6]))}else {return false}}}}};return true}function findIP(_0xf2ddxc1){if(realmode== _0xaf82[68]){$(_0xaf82[260])[_0xaf82[257]](_0xaf82[256],_0xaf82[256])[_0xaf82[57]]()};if(realmode== _0xaf82[261]){$(_0xaf82[262])[_0xaf82[257]](_0xaf82[256],_0xaf82[256])[_0xaf82[57]]()};if(realmode== _0xaf82[263]){$(_0xaf82[264])[_0xaf82[257]](_0xaf82[256],_0xaf82[256])[_0xaf82[57]]()};if(realmode== _0xaf82[265]){$(_0xaf82[266])[_0xaf82[257]](_0xaf82[256],_0xaf82[256])[_0xaf82[57]]()};if(!searching){if($[_0xaf82[158]](_0xf2ddxc1)== _0xaf82[6]){}else {searching= true;var _0xf2ddxc2=1800;var _0xf2ddxc3=8;var _0xf2ddxc4=0;var _0xf2ddxc5=0;var _0xf2ddxc6=2;toastr[_0xaf82[270]](Premadeletter21+ _0xaf82[268]+ _0xf2ddxc1+ _0xaf82[269])[_0xaf82[73]](_0xaf82[71],_0xaf82[267]);_0xf2ddxc4++;if(currentIP== _0xf2ddxc1){$(_0xaf82[248])[_0xaf82[247]](_0xaf82[246])[_0xaf82[245]](_0xaf82[244]);searching= false;toastr[_0xaf82[157]](Premadeletter29+ _0xaf82[271]+ Premadeletter13+ _0xaf82[272]+ Premadeletter14+ _0xaf82[172],_0xaf82[6],{timeOut:20000,extendedTimeOut:20000})[_0xaf82[73]](_0xaf82[71],_0xaf82[267])}else {changeServer();timerId= setInterval(function(){if(_0xf2ddxc5== _0xf2ddxc6){_0xf2ddxc5= 0;_0xf2ddxc4++;toastr[_0xaf82[270]](Premadeletter30+ _0xaf82[273]+ _0xf2ddxc4+ _0xaf82[192]+ _0xf2ddxc3)[_0xaf82[73]](_0xaf82[71],_0xaf82[267]);if(_0xf2ddxc4>= _0xf2ddxc3){$(_0xaf82[248])[_0xaf82[247]](_0xaf82[246])[_0xaf82[245]](_0xaf82[244]);clearInterval(timerId);searching= false;hideCancelSearch();toastr[_0xaf82[173]](Premadeletter31)[_0xaf82[73]](_0xaf82[71],_0xaf82[267])};if(currentIP== _0xf2ddxc1){$(_0xaf82[248])[_0xaf82[247]](_0xaf82[246])[_0xaf82[245]](_0xaf82[244]);clearInterval(timerId);searching= false;hideCancelSearch();toastr[_0xaf82[157]](Premadeletter29+ _0xaf82[271]+ Premadeletter13+ _0xaf82[272]+ Premadeletter14+ _0xaf82[172],_0xaf82[6],{timeOut:20000,extendedTimeOut:20000})[_0xaf82[73]](_0xaf82[71],_0xaf82[267])}else {changeServer()}}else {_0xf2ddxc5++}},_0xf2ddxc2)}}}else {$(_0xaf82[248])[_0xaf82[247]](_0xaf82[246])[_0xaf82[245]](_0xaf82[244]);clearInterval(timerId);searching= false;$(_0xaf82[248])[_0xaf82[247]](_0xaf82[246])[_0xaf82[245]](_0xaf82[244]);toastr[_0xaf82[173]](Premadeletter32+ _0xaf82[274])[_0xaf82[73]](_0xaf82[71],_0xaf82[267])}}function searchPlayer(_0xf2ddxc8){if(!searching){if($[_0xaf82[158]](_0xf2ddxc8)== _0xaf82[6]){}else {searching= true;var _0xf2ddxc2=1800;var _0xf2ddxc3=8;var _0xf2ddxc4=0;var _0xf2ddxc9=3;var _0xf2ddxc5=0;var _0xf2ddxc6=2;toastr[_0xaf82[270]](Premadeletter30+ _0xaf82[275]+ _0xf2ddxc8+ _0xaf82[269])[_0xaf82[73]](_0xaf82[71],_0xaf82[267]);var _0xf2ddxca=$(_0xaf82[238])[_0xaf82[76]]();var _0xf2ddxcb=_0xf2ddxc8[_0xaf82[190]](/[1-9]\.\s|10\.\s/g)[_0xaf82[276]](function(_0xf2ddxcc){return _0xf2ddxcc[_0xaf82[140]]!= 0});var _0xf2ddxcd=_0xf2ddxcb[_0xaf82[140]];var _0xf2ddxce=false;_0xf2ddxc4++;toastr[_0xaf82[270]](Premadeletter30+ _0xaf82[273]+ _0xf2ddxc4+ _0xaf82[192]+ _0xf2ddxc3)[_0xaf82[73]](_0xaf82[71],_0xaf82[267]);if(_0xf2ddxcd== 1){_0xf2ddxce= foundName(_0xf2ddxca,_0xf2ddxc8)}else {if(_0xf2ddxcd> 1){_0xf2ddxce= foundNames(_0xf2ddxca,_0xf2ddxcb,_0xf2ddxc9)}};if(_0xf2ddxce){$(_0xaf82[248])[_0xaf82[247]](_0xaf82[246])[_0xaf82[245]](_0xaf82[244]);searching= false;toastr[_0xaf82[157]](Premadeletter29+ _0xaf82[271]+ Premadeletter13+ _0xaf82[272]+ Premadeletter14+ _0xaf82[172],_0xaf82[6],{timeOut:20000,extendedTimeOut:20000})[_0xaf82[73]](_0xaf82[71],_0xaf82[267]);$(_0xaf82[69])[_0xaf82[59]](_0xaf82[277])}else {changeServer();timerId= setInterval(function(){if(_0xf2ddxc5== _0xf2ddxc6){_0xf2ddxc5= 0;_0xf2ddxca= $(_0xaf82[238])[_0xaf82[76]]();if(_0xf2ddxcd== 1){_0xf2ddxce= foundName(_0xf2ddxca,_0xf2ddxc8)}else {if(_0xf2ddxcd> 1){_0xf2ddxce= foundNames(_0xf2ddxca,_0xf2ddxcb,_0xf2ddxc9)}};_0xf2ddxc4++;toastr[_0xaf82[270]](Premadeletter30+ _0xaf82[273]+ _0xf2ddxc4+ _0xaf82[192]+ _0xf2ddxc3)[_0xaf82[73]](_0xaf82[71],_0xaf82[267]);if(_0xf2ddxc4>= _0xf2ddxc3){clearInterval(timerId);searching= false;toastr[_0xaf82[173]](Premadeletter31)[_0xaf82[73]](_0xaf82[71],_0xaf82[267])};if(_0xf2ddxce){$(_0xaf82[248])[_0xaf82[247]](_0xaf82[246])[_0xaf82[245]](_0xaf82[244]);clearInterval(timerId);searching= false;toastr[_0xaf82[157]](Premadeletter29+ _0xaf82[271]+ Premadeletter13+ _0xaf82[272]+ Premadeletter14+ _0xaf82[172],_0xaf82[6],{timeOut:20000,extendedTimeOut:20000})[_0xaf82[73]](_0xaf82[71],_0xaf82[267])}else {changeServer()}}else {_0xf2ddxc5++}},_0xf2ddxc2)}}}else {clearInterval(timerId);searching= false;toastr[_0xaf82[173]](Premadeletter32)[_0xaf82[73]](_0xaf82[71],_0xaf82[267])}}function copyToClipboard(_0xf2ddxd0){var _0xf2ddxd1=$(_0xaf82[278]);$(_0xaf82[280])[_0xaf82[279]](_0xf2ddxd1);var _0xf2ddxd2=$(_0xf2ddxd0)[_0xaf82[281]]();_0xf2ddxd2= _0xf2ddxd2[_0xaf82[168]](/<br>/g,_0xaf82[282]);console[_0xaf82[283]](_0xf2ddxd2);_0xf2ddxd1[_0xaf82[59]](_0xf2ddxd2)[_0xaf82[284]]();document[_0xaf82[286]](_0xaf82[285]);_0xf2ddxd1[_0xaf82[176]]()}function copyToClipboardAll(){$(_0xaf82[287])[_0xaf82[176]]();if($(_0xaf82[288])[_0xaf82[76]]()!= _0xaf82[6]){$(_0xaf82[295])[_0xaf82[130]](_0xaf82[289]+ CopyTkPwLb2+ _0xaf82[290]+ $(_0xaf82[238])[_0xaf82[76]]()+ _0xaf82[291]+ $(_0xaf82[288])[_0xaf82[76]]()+ _0xaf82[292]+ $(_0xaf82[293])[_0xaf82[59]]()+ _0xaf82[294])}else {$(_0xaf82[295])[_0xaf82[130]](_0xaf82[289]+ CopyTkPwLb2+ _0xaf82[290]+ $(_0xaf82[238])[_0xaf82[76]]()+ _0xaf82[292]+ $(_0xaf82[293])[_0xaf82[59]]()+ _0xaf82[294])};copyToClipboard(_0xaf82[296])}function foundName(_0xf2ddxca,_0xf2ddx8b){return _0xf2ddxca[_0xaf82[55]](_0xf2ddx8b)}function playYoutube(){if(musicPlayer!= undefined){var playerState=musicPlayer[_0xaf82[297]]();if(playerState!= 1){musicPlayer[_0xaf82[298]]()}else {musicPlayer[_0xaf82[299]]()}}}function foundNames(_0xf2ddxca,_0xf2ddxcb,_0xf2ddxc9){var _0xf2ddxcd=_0xf2ddxcb[_0xaf82[140]];var _0xf2ddxd7=0;var _0xf2ddxce=false;for(var _0xf2ddxd8=0;_0xf2ddxd8< _0xf2ddxcd;_0xf2ddxd8++){_0xf2ddxce= foundName(_0xf2ddxca,_0xf2ddxcb[_0xf2ddxd8]);if(_0xf2ddxce){_0xf2ddxd7++}};return (_0xf2ddxd7>= _0xf2ddxc9)?true:false}function joinpartyfromconnect(_0xf2ddxa7){$(_0xaf82[227])[_0xaf82[59]]($(_0xaf82[300])[_0xaf82[59]]());$(_0xaf82[301])[_0xaf82[208]]();legendmod[_0xaf82[67]]= _0xaf82[68];return realmode= legendmod[_0xaf82[67]]}function BeforeReportFakesSkin(){ReportFakesSkin()}function ReportFakesSkin(){var _0xf2ddxdc;var _0xf2ddxdd;var _0xf2ddxde;var _0xf2ddxdf;if(_0xf2ddxde!= null){_0xf2ddxdd= _0xf2ddxde}else {_0xf2ddxdd= _0xaf82[302]};if(_0xf2ddxdf!= null){_0xf2ddxdc= _0xf2ddxdf}else {_0xf2ddxdc= _0xaf82[303]};$(_0xaf82[327])[_0xaf82[130]](_0xaf82[304]+ legbgpic+ _0xaf82[305]+ legbgcolor+ _0xaf82[306]+ _0xaf82[307]+ _0xaf82[308]+ Premadeletter119+ _0xaf82[309]+ _0xaf82[310]+ Premadeletter120+ _0xaf82[311]+ _0xf2ddxdd+ _0xaf82[312]+ _0xaf82[313]+ _0xaf82[314]+ _0xaf82[315]+ _0xaf82[316]+ _0xaf82[317]+ _0xaf82[318]+ _0xaf82[319]+ _0xaf82[320]+ _0xaf82[321]+ _0xaf82[322]+ _0xaf82[323]+ Premadeletter121+ _0xaf82[324]+ Premadeletter122+ _0xaf82[325]+ _0xaf82[326]);$(_0xaf82[329])[_0xaf82[73]](_0xaf82[71],_0xaf82[328]);$(_0xaf82[330])[_0xaf82[73]](_0xaf82[71],_0xaf82[328]);$(_0xaf82[331])[_0xaf82[73]](_0xaf82[71],_0xaf82[328]);$(_0xaf82[332])[_0xaf82[73]](_0xaf82[71],_0xaf82[328]);$(_0xaf82[333])[_0xaf82[73]](_0xaf82[71],_0xaf82[328]);$(_0xaf82[334])[_0xaf82[73]](_0xaf82[71],_0xaf82[328]);$(_0xaf82[335])[_0xaf82[73]](_0xaf82[71],_0xaf82[328]);$(_0xaf82[336])[_0xaf82[73]](_0xaf82[71],_0xaf82[328]);$(_0xaf82[337])[_0xaf82[73]](_0xaf82[71],_0xaf82[328]);$(_0xaf82[338])[_0xaf82[73]](_0xaf82[71],_0xaf82[328]);$(_0xaf82[340])[_0xaf82[130]](_0xaf82[339]+ Premadeletter113+ _0xaf82[172]);OthersSkinChanger();SkinBtnsPut();OpenSkinChanger()}function SkinBtnsPut(){$(_0xaf82[329])[_0xaf82[130]](_0xaf82[341]);$(_0xaf82[330])[_0xaf82[130]](_0xaf82[342]);$(_0xaf82[331])[_0xaf82[130]](_0xaf82[343]);$(_0xaf82[332])[_0xaf82[130]](_0xaf82[344]);$(_0xaf82[333])[_0xaf82[130]](_0xaf82[345]);$(_0xaf82[334])[_0xaf82[130]](_0xaf82[346]);$(_0xaf82[335])[_0xaf82[130]](_0xaf82[347]);$(_0xaf82[336])[_0xaf82[130]](_0xaf82[348]);$(_0xaf82[337])[_0xaf82[130]](_0xaf82[349]);$(_0xaf82[338])[_0xaf82[130]](_0xaf82[350]);$(_0xaf82[352])[_0xaf82[128]](_0xaf82[351]);$(_0xaf82[354])[_0xaf82[128]](_0xaf82[353]);$(_0xaf82[356])[_0xaf82[128]](_0xaf82[355]);$(_0xaf82[358])[_0xaf82[128]](_0xaf82[357]);$(_0xaf82[360])[_0xaf82[128]](_0xaf82[359]);$(_0xaf82[362])[_0xaf82[128]](_0xaf82[361]);$(_0xaf82[364])[_0xaf82[128]](_0xaf82[363]);$(_0xaf82[366])[_0xaf82[128]](_0xaf82[365]);$(_0xaf82[368])[_0xaf82[128]](_0xaf82[367]);$(_0xaf82[370])[_0xaf82[128]](_0xaf82[369])}function OthersSkinChanger(){for(var _0xf2ddxd8=0;_0xf2ddxd8< 10;_0xf2ddxd8++){var _0xf2ddxe2=_0xf2ddxd8+ 1;if(application[_0xaf82[371]][_0xf2ddxd8]){$(_0xaf82[373]+ _0xf2ddxe2)[_0xaf82[59]](application[_0xaf82[371]][_0xf2ddxd8][_0xaf82[372]])};if(legendmod[_0xaf82[374]][_0xf2ddxd8]){$(_0xaf82[375]+ _0xf2ddxe2)[_0xaf82[59]](legendmod[_0xaf82[374]][_0xf2ddxd8][_0xaf82[372]])}}}function exitSkinChanger(){$(_0xaf82[376])[_0xaf82[87]]();$(_0xaf82[377])[_0xaf82[87]]();$(_0xaf82[378])[_0xaf82[87]]();$(_0xaf82[379])[_0xaf82[87]]();$(_0xaf82[380])[_0xaf82[176]]()}function OpenSkinChanger(){$(_0xaf82[376])[_0xaf82[61]]();$(_0xaf82[377])[_0xaf82[61]]();$(_0xaf82[378])[_0xaf82[61]]();$(_0xaf82[379])[_0xaf82[61]]();$(_0xaf82[380])[_0xaf82[87]]()}function fakeSkinReport(_0xf2ddxe6){if(_0xf2ddxe6){ogarcopythelb[_0xaf82[381]]= ogarcopythelb[_0xaf82[382]];ogarcopythelb[_0xaf82[383]]= ogarcopythelb[_0xaf82[372]];ogarcopythelb[_0xaf82[384]]= ogario[_0xaf82[385]];ogarcopythelb[_0xaf82[386]]= ogario[_0xaf82[387]];ogarcopythelb[_0xaf82[372]]= _0xf2ddxe6;ogarcopythelb[_0xaf82[382]]= _0xaf82[388];ogario[_0xaf82[387]]= true;ogario[_0xaf82[385]]= true;application[_0xaf82[389]]();application[_0xaf82[390]]();application[_0xaf82[391]]();ogarcopythelb[_0xaf82[382]]= ogarcopythelb[_0xaf82[381]];ogarcopythelb[_0xaf82[372]]= ogarcopythelb[_0xaf82[383]];ogario[_0xaf82[385]]= ogarcopythelb[_0xaf82[384]];ogario[_0xaf82[387]]= ogarcopythelb[_0xaf82[386]];ogarcopythelb[_0xaf82[381]]= null;ogarcopythelb[_0xaf82[383]]= null;ogarcopythelb[_0xaf82[384]]= null;ogarcopythelb[_0xaf82[386]]= null}}function prevnamereturner(){return previousnickname= $(_0xaf82[293])[_0xaf82[59]]()}function ogarioplayfalse(){return ogario[_0xaf82[387]]= _0xaf82[116]}function Leader11(){fakeSkinReport($(_0xaf82[329])[_0xaf82[59]]())}function Leader12(){fakeSkinReport($(_0xaf82[330])[_0xaf82[59]]())}function Leader13(){fakeSkinReport($(_0xaf82[331])[_0xaf82[59]]())}function Leader14(){fakeSkinReport($(_0xaf82[332])[_0xaf82[59]]())}function Leader15(){fakeSkinReport($(_0xaf82[333])[_0xaf82[59]]())}function Leader16(){fakeSkinReport($(_0xaf82[334])[_0xaf82[59]]())}function Leader17(){fakeSkinReport($(_0xaf82[335])[_0xaf82[59]]())}function Leader18(){fakeSkinReport($(_0xaf82[336])[_0xaf82[59]]())}function Leader19(){fakeSkinReport($(_0xaf82[337])[_0xaf82[59]]())}function Leader20(){fakeSkinReport($(_0xaf82[338])[_0xaf82[59]]())}function Teamer11(){fakeSkinReport($(_0xaf82[352])[_0xaf82[59]]())}function Teamer12(){fakeSkinReport($(_0xaf82[354])[_0xaf82[59]]())}function Teamer13(){fakeSkinReport($(_0xaf82[356])[_0xaf82[59]]())}function Teamer14(){fakeSkinReport($(_0xaf82[358])[_0xaf82[59]]())}function Teamer15(){fakeSkinReport($(_0xaf82[360])[_0xaf82[59]]())}function Teamer16(){fakeSkinReport($(_0xaf82[362])[_0xaf82[59]]())}function Teamer17(){fakeSkinReport($(_0xaf82[364])[_0xaf82[59]]())}function Teamer18(){fakeSkinReport($(_0xaf82[366])[_0xaf82[59]]())}function Teamer19(){fakeSkinReport($(_0xaf82[368])[_0xaf82[59]]())}function Teamer20(){fakeSkinReport($(_0xaf82[370])[_0xaf82[59]]())}function copy(_0xf2ddxfe){$(_0xaf82[392])[_0xaf82[59]](_0xf2ddxfe);$(_0xaf82[392])[_0xaf82[87]]();$(_0xaf82[392])[_0xaf82[284]]();document[_0xaf82[286]](_0xaf82[285]);$(_0xaf82[392])[_0xaf82[61]]();$(_0xaf82[392])[_0xaf82[59]](_0xaf82[6])}function LegendSettingsfirst(){$(_0xaf82[394])[_0xaf82[128]](_0xaf82[393]);var _0xf2ddx100=document[_0xaf82[396]](_0xaf82[395]);var _0xf2ddx101=$(_0xaf82[399])[_0xaf82[398]]()[_0xaf82[73]](_0xaf82[397]);var switcheryLegendSwitch= new Switchery(_0xf2ddx100,{size:_0xaf82[400],color:_0xf2ddx101,jackColor:_0xaf82[401]});$(_0xaf82[403])[_0xaf82[128]](_0xaf82[402]);var _0xf2ddx102=document[_0xaf82[396]](_0xaf82[404]);var switcheryLegendSwitch2= new Switchery(_0xf2ddx102,{size:_0xaf82[400],color:_0xf2ddx101,jackColor:_0xaf82[401]});LegendJSON= JSON[_0xaf82[107]](document[_0xaf82[407]](_0xaf82[406])[_0xaf82[405]]);LegendSettingsfirstAPI(LegendJSON,switcheryLegendSwitch);$(_0xaf82[408])[_0xaf82[208]](function(){LegendSettingsfirstAPI(LegendJSON,switcheryLegendSwitch);setTimeout(function(){copy($(_0xaf82[394])[_0xaf82[59]]())},200)});$(_0xaf82[410])[_0xaf82[412]]()[_0xaf82[411]](_0xaf82[410])[_0xaf82[206]](_0xaf82[144],_0xaf82[409]);$(_0xaf82[410])[_0xaf82[61]]();$(_0xaf82[413])[_0xaf82[208]](function(){LegendSettingsImport(switcheryLegendSwitch2);return switcheryLegendSwitch,switcheryLegendSwitch2})}function LegendSettingsfirstAPI(LegendJSON,switcheryLegendSwitch){setTimeout(function(){if(switcheryLegendSwitch[_0xaf82[414]]()){LegendJSON= JSON[_0xaf82[107]](document[_0xaf82[407]](_0xaf82[406])[_0xaf82[405]]);parseLegendJSONAPI(LegendJSON);var _0xf2ddx104=JSON[_0xaf82[415]](LegendJSON,null,4);document[_0xaf82[407]](_0xaf82[406])[_0xaf82[405]]= _0xf2ddx104}else {LegendJSON= JSON[_0xaf82[107]](document[_0xaf82[407]](_0xaf82[406])[_0xaf82[405]]);parseLegendJSONAPI(LegendJSON);delete LegendJSON[_0xaf82[416]];var _0xf2ddx104=JSON[_0xaf82[415]](LegendJSON,null,4);document[_0xaf82[407]](_0xaf82[406])[_0xaf82[405]]= _0xf2ddx104};return LegendJSON},100)}function parseLegendJSONAPI(LegendJSON){LegendJSON[_0xaf82[416]]= {};LegendJSON[_0xaf82[416]][_0xaf82[417]]= localStorage[_0xaf82[3]](_0xaf82[7]);LegendJSON[_0xaf82[416]][_0xaf82[8]]= localStorage[_0xaf82[3]](_0xaf82[8]);LegendJSON[_0xaf82[416]][_0xaf82[39]]= localStorage[_0xaf82[3]](_0xaf82[39]);LegendJSON[_0xaf82[416]][_0xaf82[418]]= localStorage[_0xaf82[3]](_0xaf82[45]);LegendJSON[_0xaf82[416]][_0xaf82[46]]= localStorage[_0xaf82[3]](_0xaf82[46]);LegendJSON[_0xaf82[416]][_0xaf82[47]]= localStorage[_0xaf82[3]](_0xaf82[47]);LegendJSON[_0xaf82[416]][_0xaf82[48]]= localStorage[_0xaf82[3]](_0xaf82[48]);LegendJSON[_0xaf82[416]][_0xaf82[49]]= localStorage[_0xaf82[3]](_0xaf82[49]);LegendJSON[_0xaf82[416]][_0xaf82[50]]= localStorage[_0xaf82[3]](_0xaf82[50]);LegendJSON[_0xaf82[416]][_0xaf82[51]]= localStorage[_0xaf82[3]](_0xaf82[51]);LegendJSON[_0xaf82[416]][_0xaf82[52]]= localStorage[_0xaf82[3]](_0xaf82[52]);LegendJSON[_0xaf82[416]][_0xaf82[105]]= localStorage[_0xaf82[3]](_0xaf82[105]);LegendJSON[_0xaf82[416]][_0xaf82[113]]= localStorage[_0xaf82[3]](_0xaf82[113]);LegendJSON[_0xaf82[416]][_0xaf82[419]]= localStorage[_0xaf82[3]](_0xaf82[420]);if(LegendJSON[_0xaf82[416]][_0xaf82[419]]== _0xaf82[4]|| LegendJSON[_0xaf82[416]][_0xaf82[419]]== null){LegendJSON[_0xaf82[416]][_0xaf82[419]]= defaultMusicUrl};LegendJSON[_0xaf82[416]][_0xaf82[38]]= localStorage[_0xaf82[3]](_0xaf82[38]);if(LegendJSON[_0xaf82[416]][_0xaf82[38]]== _0xaf82[4]|| LegendJSON[_0xaf82[416]][_0xaf82[38]]== null){LegendJSON[_0xaf82[416]][_0xaf82[38]]= _0xaf82[5]};LegendJSON[_0xaf82[416]][_0xaf82[421]]= localStorage[_0xaf82[3]](_0xaf82[421]);if(LegendJSON[_0xaf82[416]][_0xaf82[421]]== _0xaf82[4]|| LegendJSON[_0xaf82[416]][_0xaf82[421]]== null){LegendJSON[_0xaf82[416]][_0xaf82[421]]= _0xaf82[6]};LegendJSON[_0xaf82[416]][_0xaf82[422]]= localStorage[_0xaf82[3]](_0xaf82[422]);if(LegendJSON[_0xaf82[416]][_0xaf82[422]]== _0xaf82[4]|| LegendJSON[_0xaf82[416]][_0xaf82[422]]== null){LegendJSON[_0xaf82[416]][_0xaf82[422]]= _0xaf82[6]};LegendJSON[_0xaf82[416]][_0xaf82[423]]= localStorage[_0xaf82[3]](_0xaf82[423]);if(LegendJSON[_0xaf82[416]][_0xaf82[423]]== _0xaf82[4]|| LegendJSON[_0xaf82[416]][_0xaf82[423]]== null){LegendJSON[_0xaf82[416]][_0xaf82[423]]= _0xaf82[6]};LegendJSON[_0xaf82[416]][_0xaf82[424]]= localStorage[_0xaf82[3]](_0xaf82[424]);if(LegendJSON[_0xaf82[416]][_0xaf82[424]]== _0xaf82[4]|| LegendJSON[_0xaf82[416]][_0xaf82[424]]== null){LegendJSON[_0xaf82[416]][_0xaf82[424]]= _0xaf82[6]};LegendJSON[_0xaf82[416]][_0xaf82[425]]= localStorage[_0xaf82[3]](_0xaf82[425]);if(LegendJSON[_0xaf82[416]][_0xaf82[425]]== _0xaf82[4]|| LegendJSON[_0xaf82[416]][_0xaf82[425]]== null){LegendJSON[_0xaf82[416]][_0xaf82[425]]= _0xaf82[6]};LegendJSON[_0xaf82[416]][_0xaf82[426]]= localStorage[_0xaf82[3]](_0xaf82[426]);if(LegendJSON[_0xaf82[416]][_0xaf82[426]]== _0xaf82[4]|| LegendJSON[_0xaf82[416]][_0xaf82[426]]== null){LegendJSON[_0xaf82[416]][_0xaf82[426]]= _0xaf82[6]};LegendJSON[_0xaf82[416]][_0xaf82[427]]= localStorage[_0xaf82[3]](_0xaf82[427]);if(LegendJSON[_0xaf82[416]][_0xaf82[427]]== _0xaf82[4]|| LegendJSON[_0xaf82[416]][_0xaf82[427]]== null){LegendJSON[_0xaf82[416]][_0xaf82[427]]= _0xaf82[6]};LegendJSON[_0xaf82[416]][_0xaf82[428]]= localStorage[_0xaf82[3]](_0xaf82[428]);if(LegendJSON[_0xaf82[416]][_0xaf82[428]]== _0xaf82[4]|| LegendJSON[_0xaf82[416]][_0xaf82[428]]== null){LegendJSON[_0xaf82[416]][_0xaf82[428]]= _0xaf82[6]};LegendJSON[_0xaf82[416]][_0xaf82[429]]= localStorage[_0xaf82[3]](_0xaf82[429]);if(LegendJSON[_0xaf82[416]][_0xaf82[429]]== _0xaf82[4]|| LegendJSON[_0xaf82[416]][_0xaf82[429]]== null){LegendJSON[_0xaf82[416]][_0xaf82[429]]= _0xaf82[6]};LegendJSON[_0xaf82[416]][_0xaf82[430]]= localStorage[_0xaf82[3]](_0xaf82[430]);if(LegendJSON[_0xaf82[416]][_0xaf82[430]]== _0xaf82[4]|| LegendJSON[_0xaf82[416]][_0xaf82[430]]== null){LegendJSON[_0xaf82[416]][_0xaf82[430]]= _0xaf82[6]};LegendJSON[_0xaf82[416]][_0xaf82[41]]= localStorage[_0xaf82[3]](_0xaf82[41]);if(LegendJSON[_0xaf82[416]][_0xaf82[41]]== _0xaf82[4]|| LegendJSON[_0xaf82[416]][_0xaf82[41]]== null){LegendJSON[_0xaf82[416]][_0xaf82[41]]= _0xaf82[6]};LegendJSON[_0xaf82[416]][_0xaf82[431]]= localStorage[_0xaf82[3]](_0xaf82[431]);if(LegendJSON[_0xaf82[416]][_0xaf82[431]]== _0xaf82[4]|| LegendJSON[_0xaf82[416]][_0xaf82[431]]== null){LegendJSON[_0xaf82[416]][_0xaf82[431]]= _0xaf82[6]};LegendJSON[_0xaf82[416]][_0xaf82[42]]= localStorage[_0xaf82[3]](_0xaf82[42]);if(LegendJSON[_0xaf82[416]][_0xaf82[42]]== _0xaf82[4]|| LegendJSON[_0xaf82[416]][_0xaf82[42]]== null){LegendJSON[_0xaf82[416]][_0xaf82[42]]= _0xaf82[6]};LegendJSON[_0xaf82[416]][_0xaf82[43]]= localStorage[_0xaf82[3]](_0xaf82[43]);if(LegendJSON[_0xaf82[416]][_0xaf82[43]]== _0xaf82[4]|| LegendJSON[_0xaf82[416]][_0xaf82[43]]== null){LegendJSON[_0xaf82[416]][_0xaf82[43]]= _0xaf82[6]};LegendJSON[_0xaf82[416]][_0xaf82[44]]= localStorage[_0xaf82[3]](_0xaf82[44]);if(LegendJSON[_0xaf82[416]][_0xaf82[44]]== _0xaf82[4]|| LegendJSON[_0xaf82[416]][_0xaf82[44]]== null){LegendJSON[_0xaf82[416]][_0xaf82[44]]= _0xaf82[6]};LegendJSON[_0xaf82[416]][_0xaf82[40]]= localStorage[_0xaf82[3]](_0xaf82[40]);if(LegendJSON[_0xaf82[416]][_0xaf82[40]]== _0xaf82[4]|| LegendJSON[_0xaf82[416]][_0xaf82[40]]== null){LegendJSON[_0xaf82[416]][_0xaf82[40]]= _0xaf82[6]};LegendJSON[_0xaf82[416]][_0xaf82[432]]= localStorage[_0xaf82[3]](_0xaf82[432]);if(LegendJSON[_0xaf82[416]][_0xaf82[432]]== _0xaf82[4]|| LegendJSON[_0xaf82[416]][_0xaf82[432]]== null){LegendJSON[_0xaf82[416]][_0xaf82[432]]= _0xaf82[6]};LegendJSON[_0xaf82[416]][_0xaf82[433]]= localStorage[_0xaf82[3]](_0xaf82[433]);if(LegendJSON[_0xaf82[416]][_0xaf82[433]]== _0xaf82[4]|| LegendJSON[_0xaf82[416]][_0xaf82[433]]== null){LegendJSON[_0xaf82[416]][_0xaf82[433]]= _0xaf82[6]};LegendJSON[_0xaf82[416]][_0xaf82[434]]= localStorage[_0xaf82[3]](_0xaf82[434]);if(LegendJSON[_0xaf82[416]][_0xaf82[434]]== _0xaf82[4]|| LegendJSON[_0xaf82[416]][_0xaf82[434]]== null){LegendJSON[_0xaf82[416]][_0xaf82[434]]= _0xaf82[6]};LegendJSON[_0xaf82[416]][_0xaf82[435]]= localStorage[_0xaf82[3]](_0xaf82[435]);if(LegendJSON[_0xaf82[416]][_0xaf82[435]]== _0xaf82[4]|| LegendJSON[_0xaf82[416]][_0xaf82[435]]== null){LegendJSON[_0xaf82[416]][_0xaf82[435]]= _0xaf82[6]};LegendJSON[_0xaf82[416]][_0xaf82[436]]= localStorage[_0xaf82[3]](_0xaf82[436]);if(LegendJSON[_0xaf82[416]][_0xaf82[436]]== _0xaf82[4]|| LegendJSON[_0xaf82[416]][_0xaf82[436]]== null){LegendJSON[_0xaf82[416]][_0xaf82[436]]= _0xaf82[6]};LegendJSON[_0xaf82[416]][_0xaf82[437]]= localStorage[_0xaf82[3]](_0xaf82[437]);if(LegendJSON[_0xaf82[416]][_0xaf82[437]]== _0xaf82[4]|| LegendJSON[_0xaf82[416]][_0xaf82[437]]== null){LegendJSON[_0xaf82[416]][_0xaf82[437]]= _0xaf82[6]};LegendJSON[_0xaf82[416]][_0xaf82[438]]= localStorage[_0xaf82[3]](_0xaf82[438]);if(LegendJSON[_0xaf82[416]][_0xaf82[438]]== _0xaf82[4]|| LegendJSON[_0xaf82[416]][_0xaf82[438]]== null){LegendJSON[_0xaf82[416]][_0xaf82[438]]= _0xaf82[6]};LegendJSON[_0xaf82[416]][_0xaf82[439]]= localStorage[_0xaf82[3]](_0xaf82[439]);if(LegendJSON[_0xaf82[416]][_0xaf82[439]]== _0xaf82[4]|| LegendJSON[_0xaf82[416]][_0xaf82[439]]== null){LegendJSON[_0xaf82[416]][_0xaf82[439]]= _0xaf82[6]};LegendJSON[_0xaf82[416]][_0xaf82[440]]= localStorage[_0xaf82[3]](_0xaf82[440]);if(LegendJSON[_0xaf82[416]][_0xaf82[440]]== _0xaf82[4]|| LegendJSON[_0xaf82[416]][_0xaf82[440]]== null){LegendJSON[_0xaf82[416]][_0xaf82[440]]= _0xaf82[6]};LegendJSON[_0xaf82[416]][_0xaf82[441]]= localStorage[_0xaf82[3]](_0xaf82[441]);if(LegendJSON[_0xaf82[416]][_0xaf82[441]]== _0xaf82[4]|| LegendJSON[_0xaf82[416]][_0xaf82[441]]== null){LegendJSON[_0xaf82[416]][_0xaf82[441]]= _0xaf82[6]};LegendJSON[_0xaf82[416]][_0xaf82[442]]= localStorage[_0xaf82[3]](_0xaf82[442]);if(LegendJSON[_0xaf82[416]][_0xaf82[442]]== _0xaf82[4]|| LegendJSON[_0xaf82[416]][_0xaf82[442]]== null){LegendJSON[_0xaf82[416]][_0xaf82[442]]= _0xaf82[6]};LegendJSON[_0xaf82[416]][_0xaf82[443]]= localStorage[_0xaf82[3]](_0xaf82[443]);if(LegendJSON[_0xaf82[416]][_0xaf82[443]]== _0xaf82[4]|| LegendJSON[_0xaf82[416]][_0xaf82[443]]== null){LegendJSON[_0xaf82[416]][_0xaf82[443]]= _0xaf82[6]};LegendJSON[_0xaf82[416]][_0xaf82[444]]= localStorage[_0xaf82[3]](_0xaf82[444]);if(LegendJSON[_0xaf82[416]][_0xaf82[444]]== _0xaf82[4]|| LegendJSON[_0xaf82[416]][_0xaf82[444]]== null){LegendJSON[_0xaf82[416]][_0xaf82[444]]= _0xaf82[6]};LegendJSON[_0xaf82[416]][_0xaf82[445]]= localStorage[_0xaf82[3]](_0xaf82[445]);if(LegendJSON[_0xaf82[416]][_0xaf82[445]]== _0xaf82[4]|| LegendJSON[_0xaf82[416]][_0xaf82[445]]== null){LegendJSON[_0xaf82[416]][_0xaf82[445]]= _0xaf82[6]};LegendJSON[_0xaf82[416]][_0xaf82[446]]= localStorage[_0xaf82[3]](_0xaf82[446]);if(LegendJSON[_0xaf82[416]][_0xaf82[446]]== _0xaf82[4]|| LegendJSON[_0xaf82[416]][_0xaf82[446]]== null){LegendJSON[_0xaf82[416]][_0xaf82[446]]= _0xaf82[6]};LegendJSON[_0xaf82[416]][_0xaf82[447]]= localStorage[_0xaf82[3]](_0xaf82[447]);if(LegendJSON[_0xaf82[416]][_0xaf82[447]]== _0xaf82[4]|| LegendJSON[_0xaf82[416]][_0xaf82[447]]== null){LegendJSON[_0xaf82[416]][_0xaf82[447]]= _0xaf82[6]};LegendJSON[_0xaf82[416]][_0xaf82[448]]= localStorage[_0xaf82[3]](_0xaf82[448]);if(LegendJSON[_0xaf82[416]][_0xaf82[448]]== _0xaf82[4]|| LegendJSON[_0xaf82[416]][_0xaf82[448]]== null){LegendJSON[_0xaf82[416]][_0xaf82[448]]= _0xaf82[6]};LegendJSON[_0xaf82[416]][_0xaf82[449]]= localStorage[_0xaf82[3]](_0xaf82[449]);if(LegendJSON[_0xaf82[416]][_0xaf82[449]]== _0xaf82[4]|| LegendJSON[_0xaf82[416]][_0xaf82[449]]== null){LegendJSON[_0xaf82[416]][_0xaf82[449]]= _0xaf82[6]};LegendJSON[_0xaf82[416]][_0xaf82[450]]= localStorage[_0xaf82[3]](_0xaf82[450]);if(LegendJSON[_0xaf82[416]][_0xaf82[450]]== _0xaf82[4]|| LegendJSON[_0xaf82[416]][_0xaf82[450]]== null){LegendJSON[_0xaf82[416]][_0xaf82[450]]= _0xaf82[6]};LegendJSON[_0xaf82[416]][_0xaf82[451]]= localStorage[_0xaf82[3]](_0xaf82[451]);if(LegendJSON[_0xaf82[416]][_0xaf82[451]]== _0xaf82[4]|| LegendJSON[_0xaf82[416]][_0xaf82[451]]== null){LegendJSON[_0xaf82[416]][_0xaf82[451]]= _0xaf82[6]};LegendJSON[_0xaf82[416]][_0xaf82[452]]= localStorage[_0xaf82[3]](_0xaf82[452]);if(LegendJSON[_0xaf82[416]][_0xaf82[452]]== _0xaf82[4]|| LegendJSON[_0xaf82[416]][_0xaf82[452]]== null){LegendJSON[_0xaf82[416]][_0xaf82[452]]= _0xaf82[6]};LegendJSON[_0xaf82[416]][_0xaf82[453]]= localStorage[_0xaf82[3]](_0xaf82[453]);if(LegendJSON[_0xaf82[416]][_0xaf82[453]]== _0xaf82[4]|| LegendJSON[_0xaf82[416]][_0xaf82[453]]== null){LegendJSON[_0xaf82[416]][_0xaf82[453]]= _0xaf82[6]};LegendJSON[_0xaf82[416]][_0xaf82[454]]= localStorage[_0xaf82[3]](_0xaf82[454]);if(LegendJSON[_0xaf82[416]][_0xaf82[454]]== _0xaf82[4]|| LegendJSON[_0xaf82[416]][_0xaf82[454]]== null){LegendJSON[_0xaf82[416]][_0xaf82[454]]= _0xaf82[6]};LegendJSON[_0xaf82[416]][_0xaf82[455]]= localStorage[_0xaf82[3]](_0xaf82[455]);if(LegendJSON[_0xaf82[416]][_0xaf82[455]]== _0xaf82[4]|| LegendJSON[_0xaf82[416]][_0xaf82[455]]== null){LegendJSON[_0xaf82[416]][_0xaf82[455]]= _0xaf82[6]};LegendJSON[_0xaf82[416]][_0xaf82[456]]= localStorage[_0xaf82[3]](_0xaf82[456]);if(LegendJSON[_0xaf82[416]][_0xaf82[456]]== _0xaf82[4]|| LegendJSON[_0xaf82[416]][_0xaf82[456]]== null){LegendJSON[_0xaf82[416]][_0xaf82[456]]= _0xaf82[6]};LegendJSON[_0xaf82[416]][_0xaf82[457]]= localStorage[_0xaf82[3]](_0xaf82[457]);if(LegendJSON[_0xaf82[416]][_0xaf82[457]]== _0xaf82[4]|| LegendJSON[_0xaf82[416]][_0xaf82[457]]== null){LegendJSON[_0xaf82[416]][_0xaf82[457]]= _0xaf82[6]};LegendJSON[_0xaf82[416]][_0xaf82[458]]= localStorage[_0xaf82[3]](_0xaf82[458]);if(LegendJSON[_0xaf82[416]][_0xaf82[458]]== _0xaf82[4]|| LegendJSON[_0xaf82[416]][_0xaf82[458]]== null){LegendJSON[_0xaf82[416]][_0xaf82[458]]= _0xaf82[6]};LegendJSON[_0xaf82[416]][_0xaf82[459]]= localStorage[_0xaf82[3]](_0xaf82[459]);if(LegendJSON[_0xaf82[416]][_0xaf82[459]]== _0xaf82[4]|| LegendJSON[_0xaf82[416]][_0xaf82[459]]== null){LegendJSON[_0xaf82[416]][_0xaf82[459]]= _0xaf82[6]};LegendJSON[_0xaf82[416]][_0xaf82[460]]= localStorage[_0xaf82[3]](_0xaf82[460]);if(LegendJSON[_0xaf82[416]][_0xaf82[460]]== _0xaf82[4]|| LegendJSON[_0xaf82[416]][_0xaf82[460]]== null){LegendJSON[_0xaf82[416]][_0xaf82[460]]= _0xaf82[6]};LegendJSON[_0xaf82[416]][_0xaf82[461]]= localStorage[_0xaf82[3]](_0xaf82[461]);if(LegendJSON[_0xaf82[416]][_0xaf82[461]]== _0xaf82[4]|| LegendJSON[_0xaf82[416]][_0xaf82[461]]== null){LegendJSON[_0xaf82[416]][_0xaf82[461]]= _0xaf82[6]};LegendJSON[_0xaf82[416]][_0xaf82[462]]= localStorage[_0xaf82[3]](_0xaf82[462]);if(LegendJSON[_0xaf82[416]][_0xaf82[462]]== _0xaf82[4]|| LegendJSON[_0xaf82[416]][_0xaf82[462]]== null){LegendJSON[_0xaf82[416]][_0xaf82[462]]= _0xaf82[6]};LegendJSON[_0xaf82[416]][_0xaf82[463]]= localStorage[_0xaf82[3]](_0xaf82[463]);if(LegendJSON[_0xaf82[416]][_0xaf82[463]]== _0xaf82[4]|| LegendJSON[_0xaf82[416]][_0xaf82[463]]== null){LegendJSON[_0xaf82[416]][_0xaf82[463]]= _0xaf82[6]};LegendJSON[_0xaf82[416]][_0xaf82[464]]= localStorage[_0xaf82[3]](_0xaf82[464]);if(LegendJSON[_0xaf82[416]][_0xaf82[464]]== _0xaf82[4]|| LegendJSON[_0xaf82[416]][_0xaf82[464]]== null){LegendJSON[_0xaf82[416]][_0xaf82[464]]= _0xaf82[6]};LegendJSON[_0xaf82[416]][_0xaf82[465]]= localStorage[_0xaf82[3]](_0xaf82[465]);if(LegendJSON[_0xaf82[416]][_0xaf82[465]]== _0xaf82[4]|| LegendJSON[_0xaf82[416]][_0xaf82[465]]== null){LegendJSON[_0xaf82[416]][_0xaf82[465]]= _0xaf82[6]};LegendJSON[_0xaf82[416]][_0xaf82[466]]= localStorage[_0xaf82[3]](_0xaf82[466]);if(LegendJSON[_0xaf82[416]][_0xaf82[466]]== _0xaf82[4]|| LegendJSON[_0xaf82[416]][_0xaf82[466]]== null){LegendJSON[_0xaf82[416]][_0xaf82[466]]= _0xaf82[6]};LegendJSON[_0xaf82[416]][_0xaf82[467]]= localStorage[_0xaf82[3]](_0xaf82[467]);if(LegendJSON[_0xaf82[416]][_0xaf82[467]]== _0xaf82[4]|| LegendJSON[_0xaf82[416]][_0xaf82[467]]== null){LegendJSON[_0xaf82[416]][_0xaf82[467]]= _0xaf82[6]};return LegendJSON}function LegendSettingsImport(switcheryLegendSwitch2){if(switcheryLegendSwitch2[_0xaf82[414]]()){LegendJSON= JSON[_0xaf82[107]](document[_0xaf82[407]](_0xaf82[468])[_0xaf82[405]]);saveLegendJSONAPI();setTimeout(function(){$(_0xaf82[410])[_0xaf82[208]]()},100)}else {$(_0xaf82[410])[_0xaf82[208]]()}}function saveLegendJSONAPI(){if(LegendJSON[_0xaf82[416]]!= undefined){localStorage[_0xaf82[117]](_0xaf82[7],LegendJSON[_0xaf82[416]][_0xaf82[417]]);localStorage[_0xaf82[117]](_0xaf82[8],LegendJSON[_0xaf82[416]][_0xaf82[8]]);localStorage[_0xaf82[117]](_0xaf82[39],LegendJSON[_0xaf82[416]][_0xaf82[39]]);localStorage[_0xaf82[117]](_0xaf82[45],LegendJSON[_0xaf82[416]][_0xaf82[418]]);localStorage[_0xaf82[117]](_0xaf82[46],LegendJSON[_0xaf82[416]][_0xaf82[46]]);localStorage[_0xaf82[117]](_0xaf82[47],LegendJSON[_0xaf82[416]].SHOSHOBtn);localStorage[_0xaf82[117]](_0xaf82[48],LegendJSON[_0xaf82[416]].XPBtn);localStorage[_0xaf82[117]](_0xaf82[49],LegendJSON[_0xaf82[416]].MAINBTBtn);localStorage[_0xaf82[117]](_0xaf82[50],LegendJSON[_0xaf82[416]].AnimatedSkinBtn);localStorage[_0xaf82[117]](_0xaf82[51],LegendJSON[_0xaf82[416]].TIMEcalBtn);localStorage[_0xaf82[117]](_0xaf82[52],LegendJSON[_0xaf82[416]][_0xaf82[52]]);localStorage[_0xaf82[117]](_0xaf82[105],LegendJSON[_0xaf82[416]][_0xaf82[105]]);localStorage[_0xaf82[117]](_0xaf82[113],LegendJSON[_0xaf82[416]][_0xaf82[113]]);localStorage[_0xaf82[117]](_0xaf82[420],LegendJSON[_0xaf82[416]][_0xaf82[419]]);localStorage[_0xaf82[117]](_0xaf82[38],LegendJSON[_0xaf82[416]][_0xaf82[38]]);localStorage[_0xaf82[117]](_0xaf82[421],LegendJSON[_0xaf82[416]][_0xaf82[421]]);localStorage[_0xaf82[117]](_0xaf82[422],LegendJSON[_0xaf82[416]][_0xaf82[422]]);localStorage[_0xaf82[117]](_0xaf82[423],LegendJSON[_0xaf82[416]][_0xaf82[423]]);localStorage[_0xaf82[117]](_0xaf82[424],LegendJSON[_0xaf82[416]][_0xaf82[424]]);localStorage[_0xaf82[117]](_0xaf82[425],LegendJSON[_0xaf82[416]][_0xaf82[425]]);localStorage[_0xaf82[117]](_0xaf82[426],LegendJSON[_0xaf82[416]][_0xaf82[426]]);localStorage[_0xaf82[117]](_0xaf82[427],LegendJSON[_0xaf82[416]][_0xaf82[427]]);localStorage[_0xaf82[117]](_0xaf82[428],LegendJSON[_0xaf82[416]][_0xaf82[428]]);localStorage[_0xaf82[117]](_0xaf82[429],LegendJSON[_0xaf82[416]][_0xaf82[429]]);localStorage[_0xaf82[117]](_0xaf82[430],LegendJSON[_0xaf82[416]][_0xaf82[430]]);localStorage[_0xaf82[117]](_0xaf82[41],LegendJSON[_0xaf82[416]][_0xaf82[41]]);localStorage[_0xaf82[117]](_0xaf82[431],LegendJSON[_0xaf82[416]][_0xaf82[431]]);localStorage[_0xaf82[117]](_0xaf82[42],LegendJSON[_0xaf82[416]][_0xaf82[42]]);localStorage[_0xaf82[117]](_0xaf82[43],LegendJSON[_0xaf82[416]][_0xaf82[43]]);localStorage[_0xaf82[117]](_0xaf82[44],LegendJSON[_0xaf82[416]][_0xaf82[44]]);localStorage[_0xaf82[117]](_0xaf82[40],LegendJSON[_0xaf82[416]][_0xaf82[40]]);localStorage[_0xaf82[117]](_0xaf82[432],LegendJSON[_0xaf82[416]][_0xaf82[432]]);localStorage[_0xaf82[117]](_0xaf82[433],LegendJSON[_0xaf82[416]][_0xaf82[433]]);localStorage[_0xaf82[117]](_0xaf82[434],LegendJSON[_0xaf82[416]][_0xaf82[434]]);localStorage[_0xaf82[117]](_0xaf82[435],LegendJSON[_0xaf82[416]][_0xaf82[435]]);localStorage[_0xaf82[117]](_0xaf82[436],LegendJSON[_0xaf82[416]][_0xaf82[436]]);localStorage[_0xaf82[117]](_0xaf82[437],LegendJSON[_0xaf82[416]][_0xaf82[437]]);localStorage[_0xaf82[117]](_0xaf82[438],LegendJSON[_0xaf82[416]][_0xaf82[438]]);localStorage[_0xaf82[117]](_0xaf82[439],LegendJSON[_0xaf82[416]][_0xaf82[439]]);localStorage[_0xaf82[117]](_0xaf82[440],LegendJSON[_0xaf82[416]][_0xaf82[440]]);localStorage[_0xaf82[117]](_0xaf82[441],LegendJSON[_0xaf82[416]][_0xaf82[441]]);localStorage[_0xaf82[117]](_0xaf82[442],LegendJSON[_0xaf82[416]][_0xaf82[442]]);localStorage[_0xaf82[117]](_0xaf82[443],LegendJSON[_0xaf82[416]][_0xaf82[443]]);localStorage[_0xaf82[117]](_0xaf82[444],LegendJSON[_0xaf82[416]][_0xaf82[444]]);localStorage[_0xaf82[117]](_0xaf82[445],LegendJSON[_0xaf82[416]][_0xaf82[445]]);localStorage[_0xaf82[117]](_0xaf82[446],LegendJSON[_0xaf82[416]][_0xaf82[446]]);localStorage[_0xaf82[117]](_0xaf82[447],LegendJSON[_0xaf82[416]][_0xaf82[447]]);localStorage[_0xaf82[117]](_0xaf82[448],LegendJSON[_0xaf82[416]][_0xaf82[448]]);localStorage[_0xaf82[117]](_0xaf82[449],LegendJSON[_0xaf82[416]][_0xaf82[449]]);localStorage[_0xaf82[117]](_0xaf82[450],LegendJSON[_0xaf82[416]][_0xaf82[450]]);localStorage[_0xaf82[117]](_0xaf82[451],LegendJSON[_0xaf82[416]][_0xaf82[451]]);localStorage[_0xaf82[117]](_0xaf82[452],LegendJSON[_0xaf82[416]][_0xaf82[452]]);localStorage[_0xaf82[117]](_0xaf82[453],LegendJSON[_0xaf82[416]][_0xaf82[453]]);localStorage[_0xaf82[117]](_0xaf82[454],LegendJSON[_0xaf82[416]][_0xaf82[454]]);localStorage[_0xaf82[117]](_0xaf82[455],LegendJSON[_0xaf82[416]][_0xaf82[455]]);localStorage[_0xaf82[117]](_0xaf82[456],LegendJSON[_0xaf82[416]][_0xaf82[456]]);localStorage[_0xaf82[117]](_0xaf82[457],LegendJSON[_0xaf82[416]][_0xaf82[457]]);localStorage[_0xaf82[117]](_0xaf82[458],LegendJSON[_0xaf82[416]].Userscript1);localStorage[_0xaf82[117]](_0xaf82[459],LegendJSON[_0xaf82[416]].Userscript2);localStorage[_0xaf82[117]](_0xaf82[460],LegendJSON[_0xaf82[416]].Userscript3);localStorage[_0xaf82[117]](_0xaf82[461],LegendJSON[_0xaf82[416]].Userscript4);localStorage[_0xaf82[117]](_0xaf82[462],LegendJSON[_0xaf82[416]].Userscript5);localStorage[_0xaf82[117]](_0xaf82[463],LegendJSON[_0xaf82[416]].Userscripttexture1);localStorage[_0xaf82[117]](_0xaf82[464],LegendJSON[_0xaf82[416]].Userscripttexture2);localStorage[_0xaf82[117]](_0xaf82[465],LegendJSON[_0xaf82[416]].Userscripttexture3);localStorage[_0xaf82[117]](_0xaf82[466],LegendJSON[_0xaf82[416]].Userscripttexture4);localStorage[_0xaf82[117]](_0xaf82[467],LegendJSON[_0xaf82[416]].Userscripttexture5)}}function YoutubeEmbPlayer(_0xf2ddx109){var _0xf2ddx10a=getEmbedUrl(_0xf2ddx109[_0xaf82[158]]());if(_0xf2ddx10a== false){toastr[_0xaf82[173]](Premadeletter1)[_0xaf82[73]](_0xaf82[71],_0xaf82[267]);if(localStorage[_0xaf82[3]](_0xaf82[420])== null){$(_0xaf82[469])[_0xaf82[59]](defaultMusicUrl)}else {$(_0xaf82[469])[_0xaf82[59]](localStorage[_0xaf82[3]](_0xaf82[420]))}}else {$(_0xaf82[471])[_0xaf82[206]](_0xaf82[470],_0xf2ddx10a);localStorage[_0xaf82[117]](_0xaf82[420],_0xf2ddx109[_0xaf82[158]]())}}function MsgCommands1(MSGCOMMANDS,MSGNICK){if(MSGCOMMANDS[_0xaf82[55]](_0xaf82[472])){if($(_0xaf82[293])[_0xaf82[59]]()[_0xaf82[55]](_0xaf82[53])== false){$(_0xaf82[473])[_0xaf82[176]]();$(_0xaf82[474])[_0xaf82[176]]()};MSGCOMMANDS= MSGCOMMANDS[_0xaf82[190]](_0xaf82[472])[_0xaf82[475]]();MSGCOMMANDS= MSGCOMMANDS[_0xaf82[190]](_0xaf82[476])[0];if(MSGCOMMANDS[_0xaf82[55]](_0xaf82[477])== false&& MSGCOMMANDS[_0xaf82[55]](_0xaf82[477])== false&& MSGCOMMANDS[_0xaf82[55]](_0xaf82[478])== false&& MSGCOMMANDS[_0xaf82[55]](_0xaf82[479])== false){MSGCOMMANDS= _0xaf82[477]+ MSGCOMMANDS};toastr[_0xaf82[184]](Premadeletter22+ _0xaf82[481]+ MSGNICK+ _0xaf82[481]+ Premadeletter63+ _0xaf82[482]+ MSGCOMMANDS+ _0xaf82[483]+ MSGCOMMANDS+ _0xaf82[484]+ Premadeletter24+ _0xaf82[485]+ Premadeletter25+ _0xaf82[172],_0xaf82[6],{timeOut:20000,extendedTimeOut:20000})[_0xaf82[73]](_0xaf82[71],_0xaf82[480]);$(_0xaf82[487])[_0xaf82[208]](function(){window[_0xaf82[119]](MSGCOMMANDS,_0xaf82[486])})}else {if(MSGCOMMANDS[_0xaf82[55]](_0xaf82[488])){if($(_0xaf82[293])[_0xaf82[59]]()[_0xaf82[55]](_0xaf82[489])== false){$(_0xaf82[473])[_0xaf82[176]]();$(_0xaf82[474])[_0xaf82[176]]()};MSGCOMMANDS= MSGCOMMANDS[_0xaf82[190]](_0xaf82[488])[_0xaf82[475]]();MSGCOMMANDS= MSGCOMMANDS[_0xaf82[190]](_0xaf82[490])[0];if(MSGCOMMANDS!= _0xaf82[6]){toastr[_0xaf82[184]](Premadeletter22+ _0xaf82[481]+ MSGNICK+ _0xaf82[481]+ Premadeletter63a+ _0xaf82[491]+ MSGCOMMANDS+ _0xaf82[483]+ MSGCOMMANDS+ _0xaf82[492]+ Premadeletter24+ _0xaf82[485]+ Premadeletter25+ _0xaf82[172],_0xaf82[6],{timeOut:20000,extendedTimeOut:20000})[_0xaf82[73]](_0xaf82[71],_0xaf82[480]);$(_0xaf82[487])[_0xaf82[208]](function(){$(_0xaf82[493])[_0xaf82[59]](MSGCOMMANDS);$(_0xaf82[493])[_0xaf82[73]](_0xaf82[397],_0xaf82[494]);newsubmit()})}else {toastr[_0xaf82[184]](Premadeletter22+ _0xaf82[481]+ MSGNICK+ _0xaf82[481]+ Premadeletter63b+ _0xaf82[491]+ MSGCOMMANDS+ _0xaf82[483]+ MSGCOMMANDS+ _0xaf82[492]+ Premadeletter24+ _0xaf82[485]+ Premadeletter25+ _0xaf82[172],_0xaf82[6],{timeOut:20000,extendedTimeOut:20000})[_0xaf82[73]](_0xaf82[71],_0xaf82[480]);$(_0xaf82[487])[_0xaf82[208]](function(){$(_0xaf82[493])[_0xaf82[59]](MSGCOMMANDS);$(_0xaf82[493])[_0xaf82[73]](_0xaf82[397],_0xaf82[494]);newsubmit()})}}else {if(MSGCOMMANDS[_0xaf82[55]](_0xaf82[495])){if($(_0xaf82[293])[_0xaf82[59]]()[_0xaf82[55]](_0xaf82[496])== false){$(_0xaf82[473])[_0xaf82[176]]();$(_0xaf82[474])[_0xaf82[176]]()};MSGCOMMANDS= MSGCOMMANDS[_0xaf82[190]](_0xaf82[495])[_0xaf82[475]]();MSGCOMMANDS= MSGCOMMANDS[_0xaf82[190]](_0xaf82[497])[0];if(MSGCOMMANDS[_0xaf82[55]](_0xaf82[477])== false&& MSGCOMMANDS[_0xaf82[55]](_0xaf82[477])== false&& MSGCOMMANDS[_0xaf82[55]](_0xaf82[479])== false&& MSGCOMMANDS[_0xaf82[55]](_0xaf82[479])== false){MSGCOMMANDS= _0xaf82[477]+ MSGCOMMANDS};toastr[_0xaf82[184]](Premadeletter22+ _0xaf82[481]+ MSGNICK+ _0xaf82[481]+ Premadeletter64+ _0xaf82[482]+ MSGCOMMANDS+ _0xaf82[483]+ MSGCOMMANDS+ _0xaf82[498]+ getParameterByName(_0xaf82[160],MSGCOMMANDS)+ _0xaf82[499]+ Premadeletter24+ _0xaf82[500]+ Premadeletter25+ _0xaf82[172],_0xaf82[6],{timeOut:20000,extendedTimeOut:20000})[_0xaf82[73]](_0xaf82[71],_0xaf82[169]);$(_0xaf82[501])[_0xaf82[208]](function(){YoutubeEmbPlayer(MSGCOMMANDS);$(_0xaf82[469])[_0xaf82[59]](MSGCOMMANDS);playYoutube()})}else {if(MSGCOMMANDS[_0xaf82[55]](_0xaf82[502])){if($(_0xaf82[293])[_0xaf82[59]]()[_0xaf82[55]](_0xaf82[503])== false){$(_0xaf82[473])[_0xaf82[176]]();$(_0xaf82[474])[_0xaf82[176]]()};MSGCOMMANDS= MSGCOMMANDS[_0xaf82[190]](_0xaf82[502])[_0xaf82[475]]();MSGCOMMANDS= MSGCOMMANDS[_0xaf82[190]](_0xaf82[504])[0];if(MSGCOMMANDS[_0xaf82[55]](_0xaf82[477])== false&& MSGCOMMANDS[_0xaf82[55]](_0xaf82[477])== false&& MSGCOMMANDS[_0xaf82[55]](_0xaf82[478])== false&& MSGCOMMANDS[_0xaf82[55]](_0xaf82[479])== false){MSGCOMMANDS= _0xaf82[477]+ MSGCOMMANDS};if(MSGCOMMANDS[_0xaf82[55]](_0xaf82[505])){toastr[_0xaf82[184]](_0xaf82[506]+ Premadeletter22+ _0xaf82[481]+ MSGNICK+ _0xaf82[481]+ Premadeletter65+ _0xaf82[482]+ MSGCOMMANDS+ _0xaf82[483]+ MSGCOMMANDS+ _0xaf82[484]+ Premadeletter24+ _0xaf82[485]+ Premadeletter25+ _0xaf82[172],_0xaf82[6],{timeOut:10000,extendedTimeOut:10000})[_0xaf82[73]](_0xaf82[71],_0xaf82[169]);$(_0xaf82[487])[_0xaf82[208]](function(){window[_0xaf82[119]](MSGCOMMANDS,_0xaf82[486])})}}else {if(MSGCOMMANDS[_0xaf82[55]](_0xaf82[507])){if($(_0xaf82[293])[_0xaf82[59]]()[_0xaf82[55]](_0xaf82[508])== false){$(_0xaf82[473])[_0xaf82[176]]();$(_0xaf82[474])[_0xaf82[176]]()};MSGCOMMANDS= MSGCOMMANDS[_0xaf82[190]](_0xaf82[507])[_0xaf82[475]]();MSGCOMMANDS= MSGCOMMANDS[_0xaf82[190]](_0xaf82[509])[0];if(MSGCOMMANDS[_0xaf82[55]](_0xaf82[477])== false&& MSGCOMMANDS[_0xaf82[55]](_0xaf82[477])== false&& MSGCOMMANDS[_0xaf82[55]](_0xaf82[479])== false&& MSGCOMMANDS[_0xaf82[55]](_0xaf82[479])== false){MSGCOMMANDS= _0xaf82[477]+ MSGCOMMANDS};if(MSGCOMMANDS[_0xaf82[55]](_0xaf82[510])|| MSGCOMMANDS[_0xaf82[55]](_0xaf82[511])|| MSGCOMMANDS[_0xaf82[55]](_0xaf82[512])){toastr[_0xaf82[184]](_0xaf82[513]+ Premadeletter22+ _0xaf82[481]+ MSGNICK+ _0xaf82[481]+ Premadeletter66+ _0xaf82[482]+ MSGCOMMANDS+ _0xaf82[483]+ MSGCOMMANDS+ _0xaf82[484]+ Premadeletter24+ _0xaf82[485]+ Premadeletter25+ _0xaf82[172],_0xaf82[6],{timeOut:20000,extendedTimeOut:20000})[_0xaf82[73]](_0xaf82[71],_0xaf82[169]);$(_0xaf82[487])[_0xaf82[208]](function(){window[_0xaf82[119]](MSGCOMMANDS,_0xaf82[486])})}}else {if(MSGCOMMANDS[_0xaf82[55]](_0xaf82[514])){playerMsg= getParameterByName(_0xaf82[94],MSGCOMMANDS);commandMsg= getParameterByName(_0xaf82[515],MSGCOMMANDS);otherMsg= getParameterByName(_0xaf82[516],MSGCOMMANDS);$(_0xaf82[473])[_0xaf82[176]]();$(_0xaf82[474])[_0xaf82[176]]();if(commandMsg== _0xaf82[517]){$(_0xaf82[520])[_0xaf82[73]](_0xaf82[518],_0xaf82[519])[_0xaf82[73]]({opacity:0.8});setTimeout(function(){$(_0xaf82[520])[_0xaf82[73]](_0xaf82[518],_0xaf82[521])[_0xaf82[73]]({opacity:1})},12000)}else {if(commandMsg== _0xaf82[522]){if($(_0xaf82[524])[_0xaf82[73]](_0xaf82[523])== _0xaf82[525]){if($(_0xaf82[493])[_0xaf82[59]]()!= _0xaf82[6]){var _0xf2ddx10c=$(_0xaf82[293])[_0xaf82[59]]();$(_0xaf82[293])[_0xaf82[59]](_0xaf82[526]);$(_0xaf82[527])[_0xaf82[87]]();newsubmit();setTimeout(function(){$(_0xaf82[293])[_0xaf82[59]](_0xf2ddx10c);$(_0xaf82[527])[_0xaf82[87]]();newsubmit()},5000)}}}else {if(commandMsg== _0xaf82[528]){toastr[_0xaf82[184]](Premadeletter22+ _0xaf82[481]+ playerMsg+ _0xaf82[481]+ Premadeletter23+ _0xaf82[529]+ Premadeletter24+ _0xaf82[530]+ Premadeletter25+ _0xaf82[172],_0xaf82[6],{timeOut:20000,extendedTimeOut:20000})[_0xaf82[73]](_0xaf82[71],_0xaf82[267]);$(_0xaf82[532])[_0xaf82[208]](function(){$(_0xaf82[531])[_0xaf82[208]]()})}else {if(commandMsg== _0xaf82[533]){toastr[_0xaf82[184]](Premadeletter22+ _0xaf82[481]+ playerMsg+ _0xaf82[481]+ Premadeletter26+ _0xaf82[273]+ playerMsg+ _0xaf82[534]+ Premadeletter24+ _0xaf82[535]+ Premadeletter25+ _0xaf82[172],_0xaf82[6],{timeOut:20000,extendedTimeOut:20000})[_0xaf82[73]](_0xaf82[71],_0xaf82[267]);$(_0xaf82[536])[_0xaf82[208]](function(){$(_0xaf82[293])[_0xaf82[59]](playerMsg);$(_0xaf82[527])[_0xaf82[87]]();newsubmit()})}else {if(commandMsg== _0xaf82[537]){toastr[_0xaf82[184]](Premadeletter22+ _0xaf82[481]+ playerMsg+ _0xaf82[481]+ Premadeletter27+ _0xaf82[538]+ Premadeletter24+ _0xaf82[539]+ Premadeletter25+ _0xaf82[172],_0xaf82[6],{timeOut:20000,extendedTimeOut:20000})[_0xaf82[73]](_0xaf82[71],_0xaf82[267]);$(_0xaf82[540])[_0xaf82[208]](function(){settrolling()})}else {if(commandMsg== _0xaf82[541]){toastr[_0xaf82[184]](Premadeletter22+ _0xaf82[481]+ playerMsg+ _0xaf82[481]+ Premadeletter28+ _0xaf82[542]+ Premadeletter24+ _0xaf82[543]+ Premadeletter25+ _0xaf82[172],_0xaf82[6],{timeOut:20000,extendedTimeOut:20000})[_0xaf82[73]](_0xaf82[71],_0xaf82[267]);$(_0xaf82[546])[_0xaf82[208]](function(){$(_0xaf82[544])[_0xaf82[208]]();setTimeout(function(){$(_0xaf82[544])[_0xaf82[545]]()},100)})}}}}}}}else {if(MSGCOMMANDS[_0xaf82[55]](_0xaf82[547])){commandMsg= getParameterByName(_0xaf82[515],MSGCOMMANDS);otherMsg= getParameterByName(_0xaf82[516],MSGCOMMANDS);$(_0xaf82[473])[_0xaf82[176]]();$(_0xaf82[474])[_0xaf82[176]]();LegendClanSymbol= $(_0xaf82[293])[_0xaf82[59]]();console[_0xaf82[283]](_0xaf82[548]);if(~LegendClanSymbol[_0xaf82[179]](_0xaf82[549])!= -1){console[_0xaf82[283]](_0xaf82[550]);if(commandMsg== _0xaf82[551]){setTimeout(function(){$(_0xaf82[295])[_0xaf82[208]]()},60000)}else {if(commandMsg== _0xaf82[552]){$(_0xaf82[295])[_0xaf82[208]]()}else {$(_0xaf82[295])[_0xaf82[208]]()}}}}else {if(MSGCOMMANDS[_0xaf82[55]](_0xaf82[553])){if($(_0xaf82[293])[_0xaf82[59]]()[_0xaf82[55]](_0xaf82[554])== false){$(_0xaf82[473])[_0xaf82[176]]();$(_0xaf82[474])[_0xaf82[176]]()};MSGCOMMANDS= MSGCOMMANDS[_0xaf82[190]](_0xaf82[553])[_0xaf82[475]]();MSGCOMMANDS= MSGCOMMANDS[_0xaf82[190]](_0xaf82[555])[0];var _0xf2ddx10d=MSGCOMMANDS[_0xaf82[190]](_0xaf82[556]);window[_0xaf82[557]]= _0xf2ddx10d[0];window[_0xaf82[558]]= _0xf2ddx10d[1];window[_0xaf82[559]]= parseFloat(window[_0xaf82[557]])- legendmod[_0xaf82[560]];window[_0xaf82[561]]= parseFloat(window[_0xaf82[558]])- legendmod[_0xaf82[562]];legendmod[_0xaf82[563]]= true;toastr[_0xaf82[184]](_0xaf82[564]+ MSGNICK+ _0xaf82[565]+ application[_0xaf82[566]](window[_0xaf82[559]],window[_0xaf82[561]],true))[_0xaf82[73]](_0xaf82[71],_0xaf82[267])}else {if(MSGCOMMANDS[_0xaf82[55]](_0xaf82[567])){if($(_0xaf82[293])[_0xaf82[59]]()[_0xaf82[55]](_0xaf82[568])== false){$(_0xaf82[473])[_0xaf82[176]]();$(_0xaf82[474])[_0xaf82[176]]()};MSGCOMMANDS= MSGCOMMANDS[_0xaf82[190]](_0xaf82[567])[_0xaf82[475]]();MSGCOMMANDS= MSGCOMMANDS[_0xaf82[190]](_0xaf82[569])[0];var _0xf2ddx10d=MSGCOMMANDS[_0xaf82[190]](_0xaf82[556]);window[_0xaf82[557]]= _0xf2ddx10d[0];window[_0xaf82[558]]= _0xf2ddx10d[1];window[_0xaf82[559]]= parseFloat(window[_0xaf82[557]])- legendmod[_0xaf82[560]];window[_0xaf82[561]]= parseFloat(window[_0xaf82[558]])- legendmod[_0xaf82[562]];legendmod[_0xaf82[563]]= true;toastr[_0xaf82[184]](_0xaf82[564]+ MSGNICK+ _0xaf82[570]+ application[_0xaf82[566]](window[_0xaf82[559]],window[_0xaf82[561]],true))[_0xaf82[73]](_0xaf82[71],_0xaf82[267])}else {if(MSGCOMMANDS[_0xaf82[55]](_0xaf82[571])){if($(_0xaf82[293])[_0xaf82[59]]()[_0xaf82[55]](_0xaf82[572])== false){$(_0xaf82[473])[_0xaf82[176]]();$(_0xaf82[474])[_0xaf82[176]]()};MSGCOMMANDS= MSGCOMMANDS[_0xaf82[190]](_0xaf82[571])[_0xaf82[475]]();MSGCOMMANDS= MSGCOMMANDS[_0xaf82[190]](_0xaf82[573])[0];var _0xf2ddx10d=MSGCOMMANDS[_0xaf82[190]](_0xaf82[556]);window[_0xaf82[557]]= _0xf2ddx10d[0];window[_0xaf82[558]]= _0xf2ddx10d[1];window[_0xaf82[559]]= parseFloat(window[_0xaf82[557]])- legendmod[_0xaf82[560]];window[_0xaf82[561]]= parseFloat(window[_0xaf82[558]])- legendmod[_0xaf82[562]];legendmod[_0xaf82[563]]= true;toastr[_0xaf82[184]](_0xaf82[564]+ MSGNICK+ _0xaf82[574]+ application[_0xaf82[566]](window[_0xaf82[559]],window[_0xaf82[561]],true))[_0xaf82[73]](_0xaf82[71],_0xaf82[267])}}}}}}}}}}}function isLegendExpress(Express){if(messageone!= _0xaf82[101]&& messageone!= _0xaf82[575]){return Express= _0xaf82[576]}else {return Express= _0xaf82[114]}}function MsgServCommandsreturner2(MSGCOMMANDS2a){return MSGCOMMANDS2a}function MsgServCommandsreturner(){MSGCOMMANDS2= MSGCOMMANDS;MSGCOMMANDS3= MSGCOMMANDS;MSGCOMMANDS2= MSGCOMMANDS2[_0xaf82[190]](_0xaf82[577])[_0xaf82[475]]();MSGCOMMANDS2= MSGCOMMANDS2[_0xaf82[190]](_0xaf82[578])[0];if(MSGCOMMANDS2[_0xaf82[55]](_0xaf82[477])== false&& MSGCOMMANDS2[_0xaf82[55]](_0xaf82[477])== false&& MSGCOMMANDS2[_0xaf82[55]](_0xaf82[478])== false&& MSGCOMMANDS2[_0xaf82[55]](_0xaf82[479])== false){MSGCOMMANDS2= _0xaf82[477]+ MSGCOMMANDS2};if(MSGCOMMANDS2[_0xaf82[55]](_0xaf82[249])){MSGCOMMANDS2a= MSGCOMMANDS2;MsgServCommandsreturner2(MSGCOMMANDS2a);MSGCOMMANDSA= _0xaf82[579]+ MSGCOMMANDS2a[_0xaf82[190]](_0xaf82[579])[_0xaf82[475]]();toastr[_0xaf82[184]](_0xaf82[580]+ Premadeletter22+ _0xaf82[481]+ MSGNICK+ _0xaf82[481]+ Premadeletter67+ _0xaf82[581]+ MSGCOMMANDSA+ _0xaf82[582]+ Premadeletter24+ _0xaf82[485]+ Premadeletter25+ _0xaf82[583],_0xaf82[6],{timeOut:10000,extendedTimeOut:10000})[_0xaf82[73]](_0xaf82[71],_0xaf82[169])}else {if(getParameterByName(_0xaf82[89],MSGCOMMANDS2a)!= null){var _0xf2ddx111,_0xf2ddx112;if(getParameterByName(_0xaf82[93],MSGCOMMANDS)== null){_0xf2ddx112= _0xaf82[584]}else {_0xf2ddx112= getParameterByName(_0xaf82[93],MSGCOMMANDS)};if(getParameterByName(_0xaf82[585],MSGCOMMANDS)== null){_0xf2ddx111= _0xaf82[586]}else {_0xf2ddx111= getParameterByName(_0xaf82[585],MSGCOMMANDS)};toastr[_0xaf82[184]](_0xaf82[580]+ Premadeletter22+ _0xaf82[481]+ MSGNICK+ _0xaf82[481]+ Premadeletter67+ _0xaf82[587]+ getParameterByName(_0xaf82[92],MSGCOMMANDS)[_0xaf82[168]](_0xaf82[212],_0xaf82[6])[_0xaf82[168]](_0xaf82[214],_0xaf82[6])+ _0xaf82[588]+ _0xf2ddx111+ _0xaf82[589]+ getParameterByName(_0xaf82[89],MSGCOMMANDS)+ _0xaf82[590]+ _0xf2ddx112+ _0xaf82[591]+ Premadeletter24+ _0xaf82[485]+ Premadeletter25+ _0xaf82[583],_0xaf82[6],{timeOut:10000,extendedTimeOut:10000})[_0xaf82[73]](_0xaf82[71],_0xaf82[169])}else {var _0xf2ddx112;if(getParameterByName(_0xaf82[93],MSGCOMMANDS)== null){_0xf2ddx112= _0xaf82[584]}else {_0xf2ddx112= getParameterByName(_0xaf82[93],MSGCOMMANDS)};toastr[_0xaf82[184]](_0xaf82[580]+ Premadeletter22+ _0xaf82[481]+ MSGNICK+ _0xaf82[481]+ Premadeletter67+ _0xaf82[587]+ getParameterByName(_0xaf82[92],MSGCOMMANDS)[_0xaf82[168]](_0xaf82[212],_0xaf82[6])[_0xaf82[168]](_0xaf82[214],_0xaf82[6])+ _0xaf82[590]+ _0xf2ddx112+ _0xaf82[582]+ Premadeletter24+ _0xaf82[485]+ Premadeletter25+ _0xaf82[583],_0xaf82[6],{timeOut:10000,extendedTimeOut:10000})[_0xaf82[73]](_0xaf82[71],_0xaf82[169])}};return MSGCOMMANDS,MSGCOMMANDS2,MSGCOMMANDS2a,MSGCOMMANDSA,MSGCOMMANDS3}function universalchat(){setTimeout(function(){if(application){application[_0xaf82[592]]()}},2000);var legbgpic=$(_0xaf82[103])[_0xaf82[59]]();var legbgcolor=$(_0xaf82[102])[_0xaf82[59]]();window[_0xaf82[593]]= [];var _0xf2ddx114=window;var _0xf2ddx115={"\x6E\x61\x6D\x65":_0xaf82[594],"\x6C\x6F\x67":function(_0xf2ddx116){if(($(_0xaf82[597])[_0xaf82[596]](_0xaf82[595])== false)){if(~_0xf2ddx116[_0xaf82[179]](_0xaf82[598])){if(~_0xf2ddx116[_0xaf82[179]](_0xaf82[599])){}else {toastr[_0xaf82[270]](_0xaf82[600]+ this[_0xaf82[601]]+ _0xaf82[602]+ _0xf2ddx116+ _0xaf82[603])}}else {if(~_0xf2ddx116[_0xaf82[179]](Premadeletter109b+ _0xaf82[604])){toastr[_0xaf82[184]](_0xaf82[600]+ this[_0xaf82[601]]+ _0xaf82[602]+ _0xf2ddx116+ _0xaf82[603])}else {if(~_0xf2ddx116[_0xaf82[179]](_0xaf82[605])){toastr[_0xaf82[184]](_0xaf82[600]+ this[_0xaf82[601]]+ _0xaf82[602]+ _0xf2ddx116+ _0xaf82[603])}else {if(~_0xf2ddx116[_0xaf82[179]]($(_0xaf82[293])[_0xaf82[59]]()+ _0xaf82[239])){if(window[_0xaf82[606]]){toastr[_0xaf82[270]](_0xaf82[600]+ this[_0xaf82[601]]+ _0xaf82[602]+ _0xf2ddx116+ _0xaf82[603]);playSound($(_0xaf82[607])[_0xaf82[59]]())}else {}}else {if(~_0xf2ddx116[_0xaf82[179]](_0xaf82[608])){}else {if(~_0xf2ddx116[_0xaf82[179]](_0xaf82[189])){_0xf2ddx116[_0xaf82[181]](1);toastr[_0xaf82[184]](_0xaf82[600]+ this[_0xaf82[601]]+ _0xaf82[602]+ _0xf2ddx116+ _0xaf82[603]);playSound($(_0xaf82[609])[_0xaf82[59]]())}else {toastr[_0xaf82[270]](_0xaf82[600]+ this[_0xaf82[601]]+ _0xaf82[602]+ _0xf2ddx116+ _0xaf82[603]);playSound($(_0xaf82[607])[_0xaf82[59]]())}}}}}}}},"\x74\x6F\x6F\x6C\x5F\x73\x79\x6D\x62\x6F\x6C":_0xaf82[6]};_0xaf82[610];var _0xf2ddx117={"\x41\x67\x61\x72\x54\x6F\x6F\x6C\x56\x65\x72\x73\x69\x6F\x6E":5,"\x41\x67\x61\x72\x54\x6F\x6F\x6C\x53\x65\x72\x76\x65\x72":_0xaf82[611],minimapBalls:{},"\x73\x6F\x63\x6B\x65\x74\x49\x6F\x55\x52\x4C":_0xaf82[612],"\x6D\x69\x6E\x69\x6D\x61\x70\x4E\x69\x63\x6B\x46\x6F\x6E\x74":_0xaf82[613],"\x6D\x69\x6E\x69\x6D\x61\x70\x4E\x69\x63\x6B\x43\x6F\x6C\x6F\x72":_0xaf82[614],"\x6D\x69\x6E\x69\x6D\x61\x70\x4E\x69\x63\x6B\x53\x74\x72\x6F\x6B\x65\x43\x6F\x6C\x6F\x72":_0xaf82[615],"\x6D\x69\x6E\x69\x6D\x61\x70\x4E\x69\x63\x6B\x53\x74\x72\x6F\x6B\x65\x53\x69\x7A\x65":2,"\x6D\x69\x6E\x69\x6D\x61\x70\x54\x6F\x70":24,"\x6D\x69\x6E\x69\x6D\x61\x70\x54\x65\x61\x6D\x6D\x61\x74\x65\x73\x53\x69\x7A\x65":5.5,"\x6D\x69\x6E\x69\x6D\x61\x70\x4F\x66\x66\x73\x65\x74\x58":71,"\x6D\x61\x70\x53\x69\x7A\x65":14142,"\x6D\x61\x70\x4F\x66\x66\x73\x65\x74":7071,"\x70\x69\x32":2* Math[_0xaf82[616]],"\x6D\x65\x73\x73\x61\x67\x65\x42\x6F\x78\x42\x6F\x74\x74\x6F\x6D":[_0xaf82[617],_0xaf82[618]],"\x6B\x65\x79\x43\x6F\x64\x65\x45\x6E\x74\x65\x72":13,"\x6B\x65\x79\x43\x6F\x64\x65\x41":65,"\x6B\x65\x79\x43\x6F\x64\x65\x52":82};var _0xf2ddx118={};var _0xf2ddx119={"\x75\x73\x65\x72\x5F\x73\x68\x6F\x77":true,"\x6D\x69\x6E\x69\x6D\x61\x70\x5F\x73\x68\x6F\x77":true,"\x74\x67\x61\x72\x5F\x70\x72\x65\x66\x69\x78":_0xaf82[619],"\x74\x67\x61\x72\x5F\x63\x6F\x6C\x6F\x72":_0xaf82[620],"\x75\x70\x64\x61\x74\x65\x5F\x69\x6E\x74\x65\x72\x76\x61\x6C":1000,"\x6F\x67\x61\x72\x5F\x75\x73\x65\x72":true,"\x6F\x67\x61\x72\x5F\x70\x72\x65\x66\x69\x78":_0xaf82[621],"\x6C\x6D\x73\x61\x5F\x74\x65\x61\x6D\x74\x6F\x70":false,"\x6C\x6D\x73\x61\x5F\x63\x68\x61\x74":false,"\x63\x68\x61\x74\x5F\x63\x6C\x6F\x73\x65":false,"\x63\x68\x61\x74\x5F\x75\x6E\x70\x61\x75\x73\x65":true,"\x63\x68\x61\x74\x5F\x76\x63\x65\x6E\x74\x65\x72":false,"\x63\x68\x61\x74\x5F\x61\x6C\x74":true,"\x63\x68\x61\x74\x5F\x63\x74\x72\x6C\x61\x6C\x74":true,"\x63\x68\x61\x74\x5F\x63\x74\x72\x6C":true,"\x73\x6B\x69\x6E\x5F\x74\x6F\x67\x67\x6C\x65\x5F\x61\x75\x74\x6F":false,"\x73\x6B\x69\x6E\x5F\x74\x6F\x67\x67\x6C\x65\x5F\x69\x6E\x74\x65\x72\x76\x61\x6C":10000};function _0xf2ddx11a(){if(!document[_0xaf82[407]](_0xaf82[622])){_0xf2ddx115[_0xaf82[623]]= (_0xf2ddx115[_0xaf82[623]]|| 1000)+ 1000;setTimeout(_0xf2ddx11a,_0xf2ddx115[_0xaf82[623]]);_0xf2ddx115[_0xaf82[283]](_0xaf82[624]);return};setTimeout(_0xf2ddx11b,1000)}_0xf2ddx11a();function _0xf2ddx11b(){$[_0xaf82[628]](_0xf2ddx118,_0xf2ddx119,JSON[_0xaf82[107]](_0xf2ddx115[_0xaf82[627]](_0xaf82[625],_0xaf82[626])));_0xf2ddx114[_0xaf82[629]]= {my:_0xf2ddx115,stat:_0xf2ddx117,cfg:_0xf2ddx118};var _0xf2ddx11c=_0xaf82[6];_0xf2ddx11c+= _0xaf82[630];_0xf2ddx11c+= _0xaf82[631];_0xf2ddx11c+= _0xaf82[632];_0xf2ddx11c+= _0xaf82[633];_0xf2ddx11c+= _0xaf82[634];_0xf2ddx11c+= _0xaf82[632];_0xf2ddx11c+= _0xaf82[635];_0xf2ddx11c+= _0xaf82[636];_0xf2ddx11c+= _0xaf82[637]+ legbgpic+ _0xaf82[305]+ legbgcolor+ _0xaf82[638];_0xf2ddx11c+= _0xaf82[639];_0xf2ddx11c+= _0xaf82[632];_0xf2ddx11c+= _0xaf82[640];_0xf2ddx11c+= _0xaf82[641];_0xf2ddx11c+= _0xaf82[642];_0xf2ddx11c+= _0xaf82[632];_0xf2ddx11c+= _0xaf82[643];_0xf2ddx11c+= _0xaf82[644];_0xf2ddx11c+= _0xaf82[632];$(_0xaf82[647])[_0xaf82[279]](_0xaf82[645]+ _0xf2ddx11c+ _0xaf82[646]);$(_0xaf82[520])[_0xaf82[279]](_0xaf82[6]+ _0xaf82[648]+ _0xaf82[649]+ _0xaf82[650]+ _0xaf82[651]+ _0xaf82[652]);$(_0xaf82[657])[_0xaf82[208]](function(_0xf2ddx11d){_0xf2ddx117[_0xaf82[653]]= !_0xf2ddx117[_0xaf82[653]];if(_0xf2ddx117[_0xaf82[653]]){if(_0xf2ddx114[_0xaf82[654]]){$(_0xaf82[657])[_0xaf82[247]](_0xaf82[656])[_0xaf82[245]](_0xaf82[655]);$(_0xaf82[657])[_0xaf82[281]](_0xaf82[658])}else {$(_0xaf82[657])[_0xaf82[247]](_0xaf82[656])[_0xaf82[245]](_0xaf82[655]);$(_0xaf82[657])[_0xaf82[281]](_0xaf82[658])};_0xf2ddx115[_0xaf82[659]]()}else {$(_0xaf82[657])[_0xaf82[247]](_0xaf82[655])[_0xaf82[245]](_0xaf82[656]);$(_0xaf82[657])[_0xaf82[281]](_0xaf82[660]);_0xf2ddx115[_0xaf82[661]]()}});$(_0xaf82[657])[_0xaf82[665]](function(){$(_0xaf82[657])[_0xaf82[73]](_0xaf82[662],$(_0xaf82[664])[_0xaf82[59]]());return clickedname= _0xaf82[99]})[_0xaf82[663]](function(){$(_0xaf82[657])[_0xaf82[73]](_0xaf82[662],_0xaf82[6])});$(_0xaf82[666])[_0xaf82[665]](function(){$(_0xaf82[666])[_0xaf82[73]](_0xaf82[662],$(_0xaf82[664])[_0xaf82[59]]());return clickedname= _0xaf82[99]})[_0xaf82[663]](function(){$(_0xaf82[666])[_0xaf82[73]](_0xaf82[662],_0xaf82[6])});$(_0xaf82[666])[_0xaf82[208]](_0xf2ddx115[_0xaf82[625]]);if(_0xf2ddx118[_0xaf82[667]]){$(_0xaf82[520])[_0xaf82[668]](function(){return false})}else {$(_0xaf82[669])[_0xaf82[668]](function(_0xf2ddx11d){return false})};if(_0xf2ddx118[_0xaf82[670]]){$(_0xaf82[524])[_0xaf82[668]](function(){return false})};if(_0xf2ddx118[_0xaf82[671]]){$(_0xaf82[673])[_0xaf82[279]](_0xaf82[672]);$(_0xaf82[675])[_0xaf82[208]](function(){_0xf2ddx115[_0xaf82[674]]()})};if(_0xf2ddx118[_0xaf82[676]]){$(_0xaf82[524])[_0xaf82[73]](_0xaf82[677],_0xf2ddx117[_0xaf82[678]][1])};$(_0xaf82[693])[_0xaf82[692]](function(_0xf2ddx11d){var _0xf2ddx11e=(_0xf2ddx11d[_0xaf82[679]]?_0xaf82[198]:_0xaf82[6])+ (_0xf2ddx11d[_0xaf82[680]]?_0xaf82[681]:_0xaf82[6])+ (_0xf2ddx11d[_0xaf82[682]]?_0xaf82[90]:_0xaf82[6])+ (_0xf2ddx11d[_0xaf82[683]]?_0xaf82[684]:_0xaf82[6]);if(_0xf2ddx11d[_0xaf82[685]]=== _0xf2ddx117[_0xaf82[686]]){if(_0xf2ddx11e=== _0xaf82[198]&& _0xf2ddx118[_0xaf82[687]]){_0xf2ddx115[_0xaf82[688]]();return false}else {if(_0xf2ddx11e=== _0xaf82[689]&& _0xf2ddx118[_0xaf82[690]]){_0xf2ddx115[_0xaf82[688]]({"\x6F\x67\x61\x72":true});return false}else {if(_0xf2ddx11e=== _0xaf82[681]&& _0xf2ddx118[_0xaf82[691]]){_0xf2ddx115[_0xaf82[674]]();return false}}}}});_0xf2ddx115[_0xaf82[694]]();$(_0xaf82[696])[_0xaf82[695]]()}_0xf2ddx115[_0xaf82[659]]= function(){if($(_0xaf82[697])[_0xaf82[140]]){$(_0xaf82[697])[_0xaf82[87]]();$(_0xaf82[698])[_0xaf82[87]]()}else {_0xf2ddx115[_0xaf82[699]]()};_0xf2ddx117[_0xaf82[489]]= $(_0xaf82[493])[_0xaf82[59]]();_0xf2ddx117[_0xaf82[372]]= $(_0xaf82[293])[_0xaf82[59]]();_0xf2ddx117[_0xaf82[700]]= $(_0xaf82[213])[_0xaf82[59]]();_0xf2ddx117[_0xaf82[701]]= _0xaf82[702]+ _0xf2ddx117[_0xaf82[700]]+ _0xaf82[703];_0xf2ddx115[_0xaf82[704]]();_0xf2ddx117[_0xaf82[705]]= setInterval(_0xf2ddx115[_0xaf82[706]],_0xf2ddx118[_0xaf82[707]])};_0xf2ddx115[_0xaf82[661]]= function(){$(_0xaf82[697])[_0xaf82[61]]();$(_0xaf82[708])[_0xaf82[281]](_0xaf82[6]);$(_0xaf82[698])[_0xaf82[61]]();_0xf2ddx115[_0xaf82[709]]();clearInterval(_0xf2ddx117[_0xaf82[705]]);_0xf2ddx117[_0xaf82[705]]= null};_0xf2ddx115[_0xaf82[699]]= function(){$(_0xaf82[673])[_0xaf82[713]](_0xaf82[710]+ _0xf2ddx115[_0xaf82[711]]+ _0xaf82[712]);$(_0xaf82[697])[_0xaf82[208]](_0xf2ddx115[_0xaf82[688]]);var _0xf2ddx11f=$(_0xaf82[714]);var _0xf2ddx120=_0xf2ddx11f[_0xaf82[206]](_0xaf82[71]);var _0xf2ddx121=_0xf2ddx11f[_0xaf82[206]](_0xaf82[715]);_0xf2ddx11f[_0xaf82[128]](_0xaf82[716]+ _0xaf82[717]+ _0xaf82[718]+ _0xf2ddx120+ _0xaf82[719]+ _0xf2ddx121+ _0xaf82[720])};_0xf2ddx115[_0xaf82[688]]= function(_0xf2ddx122){var _0xf2ddx123=_0xf2ddx122|| {};if(!_0xf2ddx117[_0xaf82[655]]){if($(_0xaf82[657])[_0xaf82[721]](_0xaf82[655])){_0xf2ddx114[_0xaf82[723]][_0xaf82[173]](_0xaf82[722]);return}};var _0xf2ddx116=_0xaf82[608]+ $(_0xaf82[693])[_0xaf82[59]]();var _0xf2ddx124=$(_0xaf82[693])[_0xaf82[59]]();if(_0xf2ddx124[_0xaf82[179]](_0xaf82[472])== -1&& _0xf2ddx124[_0xaf82[179]](_0xaf82[495])== -1&& _0xf2ddx124[_0xaf82[179]](_0xaf82[502])== -1&& _0xf2ddx124[_0xaf82[179]](_0xaf82[507])== -1&& _0xf2ddx124[_0xaf82[179]](_0xaf82[577])== -1&& _0xf2ddx124[_0xaf82[179]](_0xaf82[488])== -1&& _0xf2ddx124[_0xaf82[179]](_0xaf82[514])== -1&& _0xf2ddx124[_0xaf82[179]](_0xaf82[547])== -1){if(_0xf2ddx124[_0xaf82[140]]){_0xf2ddx115[_0xaf82[726]]({name:_0xaf82[724],nick:$(_0xaf82[293])[_0xaf82[59]](),message:_0xaf82[725]+ _0xf2ddx116});if(_0xf2ddx123[_0xaf82[727]]){$(document)[_0xaf82[728]](jQuery.Event(_0xaf82[692],{keyCode:_0xf2ddx117[_0xaf82[686]],which:_0xf2ddx117[_0xaf82[686]]}))}else {}}}else {console[_0xaf82[283]](_0xaf82[729])}};_0xf2ddx115[_0xaf82[674]]= function(){$(_0xaf82[524])[_0xaf82[73]](_0xaf82[523],_0xaf82[525]);if(_0xf2ddx118[_0xaf82[730]]&& $(_0xaf82[731])[_0xaf82[73]](_0xaf82[523])== _0xaf82[732]){$(document)[_0xaf82[728]](jQuery.Event(_0xaf82[692],{keyCode:_0xf2ddx117[_0xaf82[733]],which:_0xf2ddx117[_0xaf82[733]]}));$(document)[_0xaf82[728]](jQuery.Event(_0xaf82[734],{keyCode:_0xf2ddx117[_0xaf82[733]],which:_0xf2ddx117[_0xaf82[733]]}))}};_0xf2ddx115[_0xaf82[706]]= function(){var _0xf2ddx125=_0xf2ddx115[_0xaf82[735]]();if(_0xf2ddx125!= _0xf2ddx117[_0xaf82[736]]){_0xf2ddx115[_0xaf82[737]](_0xf2ddx125)};if(_0xf2ddx117[_0xaf82[736]]){_0xf2ddx115[_0xaf82[738]]()};_0xf2ddx115[_0xaf82[739]]()};_0xf2ddx115[_0xaf82[625]]= function(){if(!($(_0xaf82[696])[_0xaf82[140]])){_0xf2ddx115[_0xaf82[740]]()};_0xf2ddx115[_0xaf82[741]](_0xf2ddx118);$(_0xaf82[696])[_0xaf82[87]]();$(_0xaf82[742])[_0xaf82[87]]()};_0xf2ddx115[_0xaf82[740]]= function(){$(_0xaf82[742])[_0xaf82[279]](_0xaf82[743]+ _0xaf82[744]+ _0xaf82[720]+ _0xaf82[745]+ _0xaf82[746]+ _0xaf82[747]+ _0xaf82[748]+ _0xaf82[652]+ _0xaf82[749]+ _0xaf82[750]+ Languageletter309[_0xaf82[751]]()+ _0xaf82[752]+ _0xaf82[753]+ Languageletter171+ _0xaf82[752]+ _0xaf82[754]+ Languageletter283+ _0xaf82[752]+ _0xaf82[652]);$(_0xaf82[778])[_0xaf82[279]](_0xaf82[6]+ _0xaf82[755]+ _0xaf82[756]+ _0xaf82[757]+ _0xaf82[758]+ _0xaf82[759]+ _0xaf82[760]+ _0xaf82[761]+ _0xaf82[762]+ _0xaf82[763]+ _0xaf82[764]+ _0xaf82[765]+ _0xaf82[766]+ _0xaf82[767]+ _0xaf82[768]+ _0xaf82[769]+ _0xaf82[770]+ _0xaf82[771]+ _0xaf82[772]+ _0xaf82[773]+ _0xaf82[774]+ _0xaf82[775]+ _0xaf82[776]+ _0xaf82[777]+ _0xaf82[6]);$(_0xaf82[779])[_0xaf82[208]](function(){_0xf2ddx115[_0xaf82[741]](_0xf2ddx119)});$(_0xaf82[783])[_0xaf82[208]](function(){if($(_0xaf82[527])[_0xaf82[596]](_0xaf82[595])){showMenu2()};_0xf2ddx118= _0xf2ddx115[_0xaf82[780]]();_0xf2ddx115[_0xaf82[781]](_0xaf82[625],JSON[_0xaf82[415]](_0xf2ddx118));_0xf2ddx115[_0xaf82[782]]();$(_0xaf82[524])[_0xaf82[73]](_0xaf82[677],_0xf2ddx117[_0xaf82[678]][_0xf2ddx118[_0xaf82[676]]?1:0]);_0xf2ddx115[_0xaf82[694]]()});$(_0xaf82[784])[_0xaf82[208]](function(){if($(_0xaf82[527])[_0xaf82[596]](_0xaf82[595])){showMenu2()};_0xf2ddx115[_0xaf82[782]]()});_0xf2ddx115[_0xaf82[782]]= function(){$(_0xaf82[696])[_0xaf82[61]]()}};_0xf2ddx115[_0xaf82[694]]= function(){if(_0xf2ddx117[_0xaf82[785]]){clearInterval(_0xf2ddx117[_0xaf82[785]]);delete _0xf2ddx117[_0xaf82[785]]};if(_0xf2ddx118[_0xaf82[786]]&& _0xf2ddx118[_0xaf82[787]]> 0){_0xf2ddx117[_0xaf82[785]]= setInterval(_0xf2ddx115[_0xaf82[788]],_0xf2ddx118[_0xaf82[787]])}};_0xf2ddx115[_0xaf82[788]]= function(){if(_0xf2ddx114[_0xaf82[654]]&& _0xf2ddx114[_0xaf82[654]][_0xaf82[789]]&& _0xf2ddx114[_0xaf82[654]][_0xaf82[790]]){_0xf2ddx117[_0xaf82[791]]= true};_0xf2ddx115[_0xaf82[792]]();if(_0xf2ddx117[_0xaf82[791]]&& _0xf2ddx114[_0xaf82[654]][_0xaf82[789]]&& !_0xf2ddx114[_0xaf82[654]][_0xaf82[790]]){_0xf2ddx115[_0xaf82[792]]()}};_0xf2ddx115[_0xaf82[792]]= function(){$(document)[_0xaf82[728]](jQuery.Event(_0xaf82[692],{keyCode:_0xf2ddx117[_0xaf82[793]],which:_0xf2ddx117[_0xaf82[793]]}));$(document)[_0xaf82[728]](jQuery.Event(_0xaf82[734],{keyCode:_0xf2ddx117[_0xaf82[793]],which:_0xf2ddx117[_0xaf82[793]]}))};_0xf2ddx115[_0xaf82[704]]= function(){_0xf2ddx115[_0xaf82[709]]();if(!_0xf2ddx114[_0xaf82[794]]){return _0xf2ddx14e(_0xf2ddx117[_0xaf82[795]],_0xf2ddx115[_0xaf82[704]])};var _0xf2ddx126={query:_0xaf82[796]+ encodeURIComponent(_0xf2ddx117.AgarToolVersion)+ _0xaf82[797]+ encodeURIComponent(_0xf2ddx117[_0xaf82[701]])};_0xf2ddx117[_0xaf82[798]]= io[_0xaf82[704]](_0xf2ddx117.AgarToolServer,_0xf2ddx126);_0xf2ddx117[_0xaf82[798]][_0xaf82[801]](_0xaf82[157],function(_0xf2ddx127){_0xf2ddx117[_0xaf82[799]]= _0xf2ddx127;_0xf2ddx115[_0xaf82[800]]()})};_0xf2ddx115[_0xaf82[709]]= function(){if(_0xf2ddx117[_0xaf82[655]]&& _0xf2ddx117[_0xaf82[736]]){_0xf2ddx115[_0xaf82[737]](false)};_0xf2ddx117[_0xaf82[655]]= false;_0xf2ddx117[_0xaf82[736]]= false;var _0xf2ddx128=_0xf2ddx117[_0xaf82[798]];var _0xf2ddx129=_0xf2ddx117[_0xaf82[802]];_0xf2ddx117[_0xaf82[798]]= null;_0xf2ddx117[_0xaf82[802]]= null;if(_0xf2ddx128){_0xf2ddx128[_0xaf82[709]]()};if(_0xf2ddx129){_0xf2ddx129[_0xaf82[709]]()}};_0xf2ddx115[_0xaf82[800]]= function(){if($(_0xaf82[669])[_0xaf82[721]](_0xaf82[803])== false){$(_0xaf82[669])[_0xaf82[245]](_0xaf82[803])};_0xf2ddx115[_0xaf82[283]](Languageletter82a+ _0xaf82[481]+ Premadeletter123[_0xaf82[804]]()+ _0xaf82[805]+ _0xf2ddx117[_0xaf82[799]][_0xaf82[806]]);_0xf2ddx115[_0xaf82[807]]();var _0xf2ddx12a={reconnection:!1,query:_0xaf82[808]+ encodeURIComponent(_0xf2ddx117[_0xaf82[799]][_0xaf82[809]])+ _0xaf82[810]+ encodeURIComponent(_0xf2ddx117[_0xaf82[489]])};_0xf2ddx117[_0xaf82[802]]= io[_0xaf82[704]](_0xf2ddx117[_0xaf82[799]][_0xaf82[806]],_0xf2ddx12a);_0xf2ddx117[_0xaf82[802]][_0xaf82[801]](_0xaf82[811],_0xf2ddx115[_0xaf82[812]]);_0xf2ddx117[_0xaf82[802]][_0xaf82[801]](_0xaf82[704],function(){_0xf2ddx117[_0xaf82[655]]= true});_0xf2ddx117[_0xaf82[802]][_0xaf82[801]](_0xaf82[709],function(){_0xf2ddx117[_0xaf82[802]]= null;_0xf2ddx115[_0xaf82[813]]()});_0xf2ddx117[_0xaf82[802]][_0xaf82[801]](_0xaf82[814],function(){_0xf2ddx117[_0xaf82[802]]= null;_0xf2ddx115[_0xaf82[813]]()})};_0xf2ddx115[_0xaf82[813]]= function(){_0xf2ddx117[_0xaf82[655]]= false;var _0xf2ddx128=_0xf2ddx117[_0xaf82[798]];var _0xf2ddx129=_0xf2ddx117[_0xaf82[802]];_0xf2ddx117[_0xaf82[798]]= null;_0xf2ddx117[_0xaf82[802]]= null;if(_0xf2ddx128){_0xf2ddx128[_0xaf82[709]]()};if(_0xf2ddx129){_0xf2ddx129[_0xaf82[709]]()}};_0xf2ddx115[_0xaf82[812]]= function(_0xf2ddx12b){if(void(0)=== _0xf2ddx12b[_0xaf82[601]]){return};switch(_0xf2ddx12b[_0xaf82[601]]){case _0xaf82[823]:if(window[_0xaf82[815]]&& window[_0xaf82[815]][_0xaf82[55]](_0xf2ddx12b[_0xaf82[816]])|| _0xf2ddx12b[_0xaf82[816]][_0xaf82[55]](_0xaf82[621])){}else {if(!_0xf2ddx12b[_0xaf82[816]]){_0xf2ddx12b[_0xaf82[816]]= _0xaf82[817]};_0xf2ddx115[_0xaf82[822]](!1,_0xf2ddx12b[_0xaf82[818]],_0xf2ddx12b[_0xaf82[816]],_0xf2ddx12b[_0xaf82[819]],_0xf2ddx12b[_0xaf82[820]],_0xf2ddx118[_0xaf82[821]],!0)};break;case _0xaf82[176]:_0xf2ddx115[_0xaf82[824]](_0xf2ddx12b[_0xaf82[818]]);break;case _0xaf82[826]:_0xf2ddx115[_0xaf82[825]](_0xf2ddx12b[_0xaf82[818]],_0xf2ddx12b[_0xaf82[819]],_0xf2ddx12b[_0xaf82[820]]);break;case _0xaf82[789]:if(!window[_0xaf82[827]]|| !isEquivalent(window[_0xaf82[827]],_0xf2ddx12b[_0xaf82[828]])){window[_0xaf82[827]]= _0xf2ddx12b[_0xaf82[828]];if(legendmod[_0xaf82[829]]){Object[_0xaf82[833]](window[_0xaf82[827]])[_0xaf82[832]](function(_0xf2ddx12c){if(_0xf2ddx12c[_0xaf82[190]](_0xaf82[830])[0]!= 0){core[_0xaf82[831]](_0xf2ddx12c[_0xaf82[190]](_0xaf82[830])[0],null,window[_0xaf82[827]][_0xf2ddx12c],1,null)}})}};break;case _0xaf82[834]:_0xf2ddx115[_0xaf82[807]]();break;case _0xaf82[724]:if(window[_0xaf82[815]]&& window[_0xaf82[815]][_0xaf82[55]](_0xf2ddx12b[_0xaf82[816]])|| _0xf2ddx12b[_0xaf82[816]][_0xaf82[55]](_0xaf82[621])){}else {if(!_0xf2ddx12b[_0xaf82[816]]){_0xf2ddx12b[_0xaf82[816]]= _0xaf82[817]};_0xf2ddx115[_0xaf82[283]](_0xaf82[6]+ _0xf2ddx12b[_0xaf82[816]]+ _0xaf82[273]+ _0xf2ddx12b[_0xaf82[835]]);_0xf2ddx115[_0xaf82[836]](_0xf2ddx12b[_0xaf82[816]],_0xf2ddx12b[_0xaf82[835]])};break;case _0xaf82[811]:if(window[_0xaf82[815]]&& window[_0xaf82[815]][_0xaf82[55]](_0xf2ddx12b[_0xaf82[816]])|| _0xf2ddx12b[_0xaf82[816]][_0xaf82[55]](_0xaf82[621])){}else {if(!_0xf2ddx12b[_0xaf82[816]]){_0xf2ddx12b[_0xaf82[816]]= _0xaf82[817]};_0xf2ddx115[_0xaf82[283]](_0xaf82[189]+ _0xf2ddx12b[_0xaf82[816]]+ _0xaf82[273]+ _0xf2ddx12b[_0xaf82[835]]);_0xf2ddx115[_0xaf82[836]](_0xf2ddx12b[_0xaf82[816]],_0xf2ddx12b[_0xaf82[835]])};break;case _0xaf82[838]:console[_0xaf82[283]](_0xaf82[837]+ _0xf2ddx12b[_0xaf82[835]]);break;case _0xaf82[839]:console[_0xaf82[283]](_0xaf82[837]+ _0xf2ddx12b[_0xaf82[835]]);break;default:_0xf2ddx115[_0xaf82[283]](_0xaf82[840]+ _0xf2ddx12b[_0xaf82[601]])}};_0xf2ddx115[_0xaf82[726]]= function(_0xf2ddx12d){if(_0xf2ddx117[_0xaf82[802]]&& _0xf2ddx117[_0xaf82[802]][_0xaf82[655]]){_0xf2ddx117[_0xaf82[802]][_0xaf82[841]](_0xaf82[811],_0xf2ddx12d);return true};return false};_0xf2ddx115[_0xaf82[807]]= function(){window[_0xaf82[593]]= [];for(var _0xf2ddx12d in _0xf2ddx117[_0xaf82[842]]){if(!_0xf2ddx117[_0xaf82[842]][_0xf2ddx12d][_0xaf82[843]]){delete _0xf2ddx117[_0xaf82[842]][_0xf2ddx12d]}}};_0xf2ddx115[_0xaf82[822]]= function(_0xf2ddx12e,_0xf2ddx12f,_0xf2ddx8b,_0xf2ddxe2,_0xf2ddx130,_0xf2ddx131,_0xf2ddx132){window[_0xaf82[593]][_0xf2ddx12f]= _0xf2ddx8b;_0xf2ddx117[_0xaf82[842]][_0xf2ddx12f]= new _0xf2ddx133(_0xf2ddx12e,_0xf2ddx8b,_0xf2ddxe2,_0xf2ddx130,_0xf2ddx131,_0xf2ddx132)};_0xf2ddx115[_0xaf82[824]]= function(_0xf2ddx12f){window[_0xaf82[593]][_0xf2ddx12f]= null;if(_0xf2ddx117[_0xaf82[842]][_0xf2ddx12f]){delete _0xf2ddx117[_0xaf82[842]][_0xf2ddx12f]}};_0xf2ddx115[_0xaf82[825]]= function(_0xf2ddx12f,_0xf2ddxe2,_0xf2ddx130){if(_0xf2ddx117[_0xaf82[842]][_0xf2ddx12f]){_0xf2ddx117[_0xaf82[842]][_0xf2ddx12f][_0xaf82[819]]= _0xf2ddxe2;_0xf2ddx117[_0xaf82[842]][_0xf2ddx12f][_0xaf82[820]]= _0xf2ddx130}};function _0xf2ddx133(_0xf2ddx12e,_0xf2ddx8b,_0xf2ddxe2,_0xf2ddx130,_0xf2ddx131,_0xf2ddx132){this[_0xaf82[843]]= _0xf2ddx12e;this[_0xaf82[601]]= _0xf2ddx8b;this[_0xaf82[819]]= _0xf2ddxe2;this[_0xaf82[820]]= _0xf2ddx130;this[_0xaf82[844]]= _0xf2ddxe2;this[_0xaf82[845]]= _0xf2ddx130;this[_0xaf82[662]]= _0xf2ddx131;this[_0xaf82[846]]= _0xf2ddx132}_0xf2ddx115[_0xaf82[737]]= function(_0xf2ddx134){_0xf2ddx117[_0xaf82[736]]= _0xf2ddx134;if(_0xf2ddx118[_0xaf82[847]]){if(_0xf2ddx117[_0xaf82[736]]){_0xf2ddx117[_0xaf82[736]]= _0xf2ddx115[_0xaf82[726]]({name:_0xaf82[736],playerName:_0xf2ddx118[_0xaf82[848]]+ _0xf2ddx117[_0xaf82[372]],customSkins:$(_0xaf82[849])[_0xaf82[59]]()})}else {_0xf2ddx115[_0xaf82[726]]({name:_0xaf82[850]})}}};_0xf2ddx115[_0xaf82[738]]= function(){if(_0xf2ddx118[_0xaf82[847]]&& _0xf2ddx114[_0xaf82[654]]){_0xf2ddx115[_0xaf82[726]]({name:_0xaf82[826],x:ogario[_0xaf82[851]]+ ogario[_0xaf82[560]],y:ogario[_0xaf82[852]]+ ogario[_0xaf82[562]]})}};_0xf2ddx115[_0xaf82[836]]= function(_0xf2ddxe6,_0xf2ddx116){var _0xf2ddx135= new Date()[_0xaf82[854]]()[_0xaf82[168]](/^(\d{2}:\d{2}).*/,_0xaf82[853]);var _0xf2ddx136=_0xf2ddx115[_0xaf82[711]];var _0xf2ddx137=_0xaf82[855]+ _0xaf82[856]+ _0xf2ddx135+ _0xaf82[857]+ _0xaf82[858]+ defaultSettings[_0xaf82[859]]+ _0xaf82[860]+ _0xf2ddx136+ _0xaf82[481]+ _0xf2ddx150(_0xf2ddxe6)+ _0xaf82[861]+ _0xaf82[862]+ _0xf2ddx150(_0xf2ddx116)+ _0xaf82[752]+ _0xaf82[652];$(_0xaf82[597])[_0xaf82[279]](_0xf2ddx137);$(_0xaf82[597])[_0xaf82[863]](_0xaf82[706]);$(_0xaf82[597])[_0xaf82[865]]({'\x73\x63\x72\x6F\x6C\x6C\x54\x6F\x70':$(_0xaf82[597])[_0xaf82[257]](_0xaf82[864])},500)};_0xf2ddx115[_0xaf82[739]]= function(){window[_0xaf82[866]]= [];var _0xf2ddx138=document[_0xaf82[407]](_0xaf82[147]);var _0xf2ddx120=_0xf2ddx138[_0xaf82[71]];var _0xf2ddx121=_0xf2ddx138[_0xaf82[715]];var _0xf2ddx139=(_0xf2ddx120- 18)/ _0xf2ddx115[_0xaf82[867]]();var _0xf2ddx13a=_0xf2ddx115[_0xaf82[868]]();_0xf2ddx117[_0xaf82[869]]= 18/ 2;_0xf2ddx117[_0xaf82[870]]= _0xf2ddx117[_0xaf82[869]]+ (_0xf2ddx121- _0xf2ddx120);var _0xf2ddx13b=_0xf2ddx117[_0xaf82[869]];var _0xf2ddx13c=_0xf2ddx117[_0xaf82[870]];var _0xf2ddx13d=-(2* _0xf2ddx117[_0xaf82[871]]+ 2);var _0xf2ddx13e=_0xf2ddx138[_0xaf82[873]](_0xaf82[872]);_0xf2ddx13e[_0xaf82[874]](0,0,_0xf2ddx120,_0xf2ddx121);_0xf2ddx13e[_0xaf82[875]]= _0xf2ddx117[_0xaf82[876]];var _0xf2ddx13f=_0xaf82[6];var _0xf2ddx140=_0xaf82[6];if(!defaultmapsettings[_0xaf82[877]]){_0xf2ddx140= _0xaf82[878]};var _0xf2ddx141=Object[_0xaf82[833]](_0xf2ddx117[_0xaf82[842]])[_0xaf82[879]]();window[_0xaf82[880]]= _0xf2ddx117[_0xaf82[842]];window[_0xaf82[881]]= [];for(var _0xf2ddx142=0;_0xf2ddx142< window[_0xaf82[882]][_0xaf82[140]];_0xf2ddx142++){window[_0xaf82[881]][_0xf2ddx142]= window[_0xaf82[882]][_0xf2ddx142][_0xaf82[372]]};for(var _0xf2ddxd8=0;_0xf2ddxd8< _0xf2ddx141[_0xaf82[140]];_0xf2ddxd8++){for(var _0xf2ddx143=1;_0xf2ddx143<= _0xf2ddxd8;_0xf2ddx143++){if(_0xf2ddxd8- _0xf2ddx143>= 0&& _0xf2ddx117[_0xaf82[842]][_0xf2ddx141[_0xf2ddxd8]][_0xaf82[601]]== _0xf2ddx117[_0xaf82[842]][_0xf2ddx141[_0xf2ddxd8- _0xf2ddx143]][_0xaf82[601]]){if(window[_0xaf82[593]][_0xf2ddx141[_0xf2ddxd8]]!= _0xf2ddx117[_0xaf82[842]][_0xf2ddx141[_0xf2ddxd8]][_0xaf82[601]]){_0xf2ddx117[_0xaf82[842]][_0xf2ddx141[_0xf2ddxd8]][_0xaf82[601]]= window[_0xaf82[593]][_0xf2ddx141[_0xf2ddxd8]]}else {if(window[_0xaf82[593]][_0xf2ddx141[_0xf2ddxd8- _0xf2ddx143]]!= _0xf2ddx117[_0xaf82[842]][_0xf2ddx141[_0xf2ddxd8- _0xf2ddx143]][_0xaf82[601]]){_0xf2ddx117[_0xaf82[842]][_0xf2ddx141[_0xf2ddxd8- _0xf2ddx143]][_0xaf82[601]]= window[_0xaf82[593]][_0xf2ddx141[_0xf2ddxd8- _0xf2ddx143]]}}}};for(var _0xf2ddx12d=0;_0xf2ddx12d< legendmod[_0xaf82[374]][_0xaf82[140]];_0xf2ddx12d++){if(legendmod[_0xaf82[374]][_0xf2ddx12d]&& _0xf2ddx117[_0xaf82[842]][_0xf2ddx141[_0xf2ddxd8]]&& _0xf2ddx150(_0xf2ddx117[_0xaf82[842]][_0xf2ddx141[_0xf2ddxd8]][_0xaf82[601]])== legendmod[_0xaf82[374]][_0xf2ddx12d][_0xaf82[372]]){_0xf2ddx117[_0xaf82[842]][_0xf2ddx141[_0xf2ddxd8]][_0xaf82[883]]= _0xf2ddx12d;if(_0xf2ddxd8- 1>= 0&& _0xf2ddx117[_0xaf82[842]][_0xf2ddx141[_0xf2ddxd8]][_0xaf82[883]]< _0xf2ddx117[_0xaf82[842]][_0xf2ddx141[_0xf2ddxd8- 1]][_0xaf82[883]]){var _0xf2ddxe2=_0xf2ddx117[_0xaf82[842]][_0xf2ddx141[_0xf2ddxd8]];if(_0xf2ddxe2!= _0xf2ddx117[_0xaf82[842]][_0xf2ddx141[_0xf2ddxd8- 1]]&& _0xf2ddxe2!= _0xf2ddx117[_0xaf82[842]][_0xf2ddx141[_0xf2ddxd8- 2]]&& _0xf2ddxe2!= _0xf2ddx117[_0xaf82[842]][_0xf2ddx141[_0xf2ddxd8- 3]]&& _0xf2ddxe2!= _0xf2ddx117[_0xaf82[842]][_0xf2ddx141[_0xf2ddxd8- 4]]&& _0xf2ddxe2!= _0xf2ddx117[_0xaf82[842]][_0xf2ddx141[_0xf2ddxd8- 5]]&& window[_0xaf82[881]][_0xaf82[55]](_0xf2ddx117[_0xaf82[842]][_0xf2ddx141[_0xf2ddxd8]][_0xaf82[601]])&& _0xf2ddx117[_0xaf82[842]][_0xf2ddx141[_0xf2ddxd8]][_0xaf82[601]]!= _0xf2ddx117[_0xaf82[842]][_0xf2ddx141[_0xf2ddxd8- 1]][_0xaf82[601]]&& _0xf2ddx117[_0xaf82[842]][_0xf2ddx141[_0xf2ddxd8]]&& _0xf2ddx117[_0xaf82[842]][_0xf2ddx141[_0xf2ddxd8- 1]]){var _0xf2ddx9d=_0xf2ddx117[_0xaf82[842]][_0xf2ddx141[_0xf2ddxd8]];_0xf2ddx117[_0xaf82[842]][_0xf2ddx141[_0xf2ddxd8]]= _0xf2ddx117[_0xaf82[842]][_0xf2ddx141[_0xf2ddxd8- 1]];_0xf2ddx117[_0xaf82[842]][_0xf2ddx141[_0xf2ddxd8- 1]]= _0xf2ddx9d}}}}};if(_0xf2ddx141[_0xaf82[140]]=== 0){};var _0xf2ddx144=2;var _0xf2ddx145=0;for(var _0xf2ddx12c;(_0xf2ddx12c= _0xf2ddx141[_0xaf82[884]]());){var _0xf2ddx146=_0xf2ddx117[_0xaf82[842]][_0xf2ddx12c];window[_0xaf82[866]][_0xaf82[885]](_0xf2ddx150(_0xf2ddx146[_0xaf82[601]]));var _0xf2ddx147=false;if(defaultmapsettings[_0xaf82[877]]){if(application[_0xaf82[886]][_0xf2ddx146[_0xaf82[601]]]&& application[_0xaf82[888]][application[_0xaf82[886]][_0xf2ddx146[_0xaf82[601]]]+ _0xaf82[887]]){_0xf2ddx140= _0xf2ddx140+ (_0xaf82[889]+ _0xf2ddx12c+ _0xaf82[890]+ _0xf2ddx146[_0xaf82[662]]+ _0xaf82[891]+ application[_0xaf82[888]][application[_0xaf82[886]][_0xf2ddx146[_0xaf82[601]]]+ _0xaf82[887]][_0xaf82[892]]+ _0xaf82[893]+ _0xaf82[894])}else {_0xf2ddx140= _0xf2ddx140+ (_0xaf82[889]+ _0xf2ddx12c+ _0xaf82[890]+ _0xf2ddx146[_0xaf82[662]]+ _0xaf82[895]+ _0xaf82[894])}};for(var _0xf2ddx12d=0;_0xf2ddx12d< legendmod[_0xaf82[896]][_0xaf82[140]];_0xf2ddx12d++){if(legendmod[_0xaf82[374]][_0xf2ddx12d]&& _0xf2ddx150(_0xf2ddx146[_0xaf82[601]])== legendmod[_0xaf82[374]][_0xf2ddx12d][_0xaf82[372]]){if(_0xf2ddx147== false){_0xf2ddx140= _0xf2ddx140+ (_0xaf82[897]+ application[_0xaf82[566]](window[_0xaf82[882]][_0xf2ddx12d][_0xaf82[819]],window[_0xaf82[882]][_0xf2ddx12d][_0xaf82[820]])+ _0xaf82[898]);_0xf2ddx140= _0xf2ddx140+ (_0xaf82[899]+ application[_0xaf82[901]](window[_0xaf82[882]][_0xf2ddx12d][_0xaf82[900]])+ _0xaf82[902]);_0xf2ddx147= true}}};if(_0xf2ddx147== false){if(application[_0xaf82[566]](_0xf2ddx146[_0xaf82[819]],_0xf2ddx146[_0xaf82[820]])== _0xaf82[903]|| legendmod[_0xaf82[67]]== _0xaf82[68]){_0xf2ddx140= _0xf2ddx140+ (_0xaf82[897]+ application[_0xaf82[566]](_0xf2ddx146[_0xaf82[819]],_0xf2ddx146[_0xaf82[820]])+ _0xaf82[902])}};_0xf2ddx145++;_0xf2ddx13f+= _0xf2ddx140+ _0xf2ddx150(_0xf2ddx146[_0xaf82[601]]);_0xf2ddx140= _0xaf82[652];if(!defaultmapsettings[_0xaf82[877]]){_0xf2ddx140= _0xaf82[904]+ _0xf2ddx144+ _0xaf82[905];_0xf2ddx144++};if(_0xf2ddx118[_0xaf82[906]]){var _0xf2ddx8b=_0xf2ddx146[_0xaf82[601]]+ _0xaf82[907]+ _0xf2ddx118[_0xaf82[908]]+ _0xaf82[909];var _0xf2ddx148=(_0xf2ddx146[_0xaf82[819]]+ _0xf2ddx13a)* _0xf2ddx139+ _0xf2ddx13b;var _0xf2ddx149=(_0xf2ddx146[_0xaf82[820]]+ _0xf2ddx13a)* _0xf2ddx139+ _0xf2ddx13c;_0xf2ddx13e[_0xaf82[910]]= _0xaf82[911];_0xf2ddx13e[_0xaf82[912]]= _0xf2ddx117[_0xaf82[913]];_0xf2ddx13e[_0xaf82[914]]= _0xf2ddx117[_0xaf82[915]];_0xf2ddx13e[_0xaf82[916]](_0xf2ddx8b,_0xf2ddx148,_0xf2ddx149+ _0xf2ddx13d);_0xf2ddx13e[_0xaf82[148]]= _0xf2ddx118[_0xaf82[821]];_0xf2ddx13e[_0xaf82[143]](_0xf2ddx8b,_0xf2ddx148,_0xf2ddx149+ _0xf2ddx13d);_0xf2ddx13e[_0xaf82[917]]();_0xf2ddx13e[_0xaf82[919]](_0xf2ddx148,_0xf2ddx149,_0xf2ddx117[_0xaf82[871]],0,_0xf2ddx117[_0xaf82[918]],!1);_0xf2ddx13e[_0xaf82[920]]();_0xf2ddx13e[_0xaf82[148]]= _0xf2ddx146[_0xaf82[662]];_0xf2ddx13e[_0xaf82[921]]()}};if(_0xf2ddx118[_0xaf82[922]]){if(!defaultmapsettings[_0xaf82[877]]){_0xf2ddx13f+= _0xaf82[904]};_0xf2ddx13f+= _0xaf82[923]+ _0xf2ddx145+ _0xaf82[752];$(_0xaf82[708])[_0xaf82[281]](_0xf2ddx13f)}};_0xf2ddx115[_0xaf82[735]]= function(){return _0xf2ddx114[_0xaf82[654]]?_0xf2ddx114[_0xaf82[654]][_0xaf82[387]]:false};_0xf2ddx115[_0xaf82[867]]= function(){return _0xf2ddx114[_0xaf82[654]]?_0xf2ddx114[_0xaf82[654]][_0xaf82[924]]:_0xf2ddx117[_0xaf82[924]]};_0xf2ddx115[_0xaf82[868]]= function(){return _0xf2ddx114[_0xaf82[654]]?_0xf2ddx114[_0xaf82[654]][_0xaf82[925]]:_0xf2ddx117[_0xaf82[925]]};_0xf2ddx115[_0xaf82[780]]= function(){var _0xf2ddx14a={};$(_0xaf82[931])[_0xaf82[930]](function(){var _0xf2ddx14b=$(this);var _0xf2ddx8a=_0xf2ddx14b[_0xaf82[257]](_0xaf82[926]);var _0xf2ddx8b=_0xf2ddx14b[_0xaf82[206]](_0xaf82[927]);var _0xf2ddx14c;if(_0xf2ddx8a=== _0xaf82[928]){_0xf2ddx14c= _0xf2ddx14b[_0xaf82[257]](_0xaf82[929])}else {_0xf2ddx14c= $(this)[_0xaf82[59]]()};_0xf2ddx14a[_0xf2ddx8b]= _0xf2ddx14c});return _0xf2ddx14a};_0xf2ddx115[_0xaf82[741]]= function(_0xf2ddx14a){$(_0xaf82[931])[_0xaf82[930]](function(){var _0xf2ddx14b=$(this);var _0xf2ddx8a=_0xf2ddx14b[_0xaf82[257]](_0xaf82[926]);var _0xf2ddx8b=_0xf2ddx14b[_0xaf82[206]](_0xaf82[927]);if(_0xf2ddx14a[_0xaf82[932]](_0xf2ddx8b)){var _0xf2ddx14c=_0xf2ddx14a[_0xf2ddx8b];if(_0xf2ddx8a=== _0xaf82[928]){_0xf2ddx14b[_0xaf82[257]](_0xaf82[929],_0xf2ddx14c)}else {$(this)[_0xaf82[59]](_0xf2ddx14c)}}})};_0xf2ddx115[_0xaf82[627]]= function(_0xf2ddx8b,_0xf2ddx14d){return _0xf2ddx114[_0xaf82[934]][_0xf2ddx115[_0xaf82[601]]+ _0xaf82[933]+ _0xf2ddx8b]|| _0xf2ddx14d};_0xf2ddx115[_0xaf82[781]]= function(_0xf2ddx8b,_0xf2ddx14c){_0xf2ddx114[_0xaf82[934]][_0xf2ddx115[_0xaf82[601]]+ _0xaf82[933]+ _0xf2ddx8b]= _0xf2ddx14c};function _0xf2ddx14e(url,_0xf2ddx8d){var _0xf2ddx14f=document[_0xaf82[936]](_0xaf82[935]);_0xf2ddx14f[_0xaf82[926]]= _0xaf82[937];_0xf2ddx14f[_0xaf82[470]]= url;if( typeof _0xf2ddx8d!== _0xaf82[938]){_0xf2ddx14f[_0xaf82[939]]= _0xf2ddx8d};document[_0xaf82[647]][_0xaf82[940]](_0xf2ddx14f)}function _0xf2ddx150(_0xf2ddx12d){return _0xf2ddx12d[_0xaf82[168]](/&/g,_0xaf82[945])[_0xaf82[168]](/</g,_0xaf82[944])[_0xaf82[168]](/>/g,_0xaf82[943])[_0xaf82[168]](/"/g,_0xaf82[942])[_0xaf82[168]](/'/g,_0xaf82[941])}$(_0xaf82[693])[_0xaf82[692]](function(_0xf2ddx12d){if(_0xf2ddx12d[_0xaf82[685]]=== 13){$(_0xaf82[697])[_0xaf82[208]]()}})}function Universalchatfix(){if($(_0xaf82[657])[_0xaf82[721]](_0xaf82[655])){$(_0xaf82[657])[_0xaf82[208]]();$(_0xaf82[657])[_0xaf82[208]]()};if(window[_0xaf82[946]]){LegendModServerConnect()}}function showMenu(){$(_0xaf82[742])[_0xaf82[87]]();$(_0xaf82[947])[_0xaf82[208]]()}function showMenu2(){$(_0xaf82[742])[_0xaf82[87]]();$(_0xaf82[947])[_0xaf82[208]]()}function hideMenu(){$(_0xaf82[742])[_0xaf82[61]]()}function showSearchHud(){if(!document[_0xaf82[56]][_0xaf82[55]](_0xaf82[54])){getInfo()};$(_0xaf82[949])[_0xaf82[948]]();$(_0xaf82[950])[_0xaf82[948]]();$(_0xaf82[951])[_0xaf82[948]]();$(_0xaf82[952])[_0xaf82[948]]();$(_0xaf82[953])[_0xaf82[948]]()}function hideSearchHud(){$(_0xaf82[952])[_0xaf82[174]]();$(_0xaf82[949])[_0xaf82[174]]();$(_0xaf82[950])[_0xaf82[174]]();$(_0xaf82[951])[_0xaf82[174]]();$(_0xaf82[953])[_0xaf82[174]]()}function appendLog(_0xf2ddx158){var region=$(_0xaf82[60])[_0xaf82[59]]();$(_0xaf82[961])[_0xaf82[713]](_0xaf82[954]+ _0xaf82[955]+ region[_0xaf82[956]](0,2)+ _0xaf82[957]+ _0xaf82[958]+ currentToken+ _0xaf82[959]+ _0xf2ddx158+ _0xaf82[960]);$(_0xaf82[963])[_0xaf82[962]]()[_0xaf82[87]](100);bumpLog()}function appendLog2(_0xf2ddx158,_0xf2ddx15a){$(_0xaf82[961])[_0xaf82[713]](_0xaf82[954]+ _0xaf82[964]+ _0xf2ddx15a+ _0xaf82[965]+ currentToken+ _0xaf82[959]+ _0xf2ddx158+ _0xaf82[960]);$(_0xaf82[963])[_0xaf82[962]]()[_0xaf82[87]](100);bumpLog()}function appendLog3(_0xf2ddx158,_0xf2ddx15a,_0xf2ddx15c,_0xf2ddx15d){$(_0xaf82[961])[_0xaf82[713]](_0xaf82[954]+ _0xaf82[964]+ _0xf2ddx15a+ _0xaf82[966]+ _0xf2ddx15c+ _0xaf82[967]+ _0xf2ddx15d+ _0xaf82[965]+ currentToken+ _0xaf82[959]+ _0xf2ddx158+ _0xaf82[960]);$(_0xaf82[963])[_0xaf82[962]]()[_0xaf82[87]](100);bumpLog()}function appendLog4(_0xf2ddx158,_0xf2ddx15a){$(_0xaf82[961])[_0xaf82[713]](_0xaf82[954]+ _0xaf82[968]+ _0xf2ddx15a+ _0xaf82[965]+ currentToken+ _0xaf82[959]+ _0xf2ddx158+ _0xaf82[960]);$(_0xaf82[963])[_0xaf82[962]]()[_0xaf82[87]](100);bumpLog()}function connectto(_0xf2ddx15a){$(_0xaf82[213])[_0xaf82[59]](_0xf2ddx15a);$(_0xaf82[295])[_0xaf82[208]]();setTimeout(function(){if($(_0xaf82[213])[_0xaf82[59]]()!= $(_0xaf82[969])[_0xaf82[59]]()){toastr[_0xaf82[173]](_0xaf82[970])}},1500)}function connectto1a(_0xf2ddx15a){$(_0xaf82[971])[_0xaf82[59]](_0xaf82[253]+ _0xf2ddx15a);$(_0xaf82[972])[_0xaf82[208]]();setTimeout(function(){if($(_0xaf82[213])[_0xaf82[59]]()!= $(_0xaf82[969])[_0xaf82[59]]()){toastr[_0xaf82[173]](_0xaf82[970])}},1500)}function connectto2(_0xf2ddx15c){$(_0xaf82[60])[_0xaf82[59]](_0xf2ddx15c)}function connectto3(_0xf2ddx15d){$(_0xaf82[69])[_0xaf82[59]](_0xf2ddx15d)}function bumpLog(){$(_0xaf82[961])[_0xaf82[865]]({scrollTop:0},_0xaf82[973])}function SquareAgar(){var _0xf2ddx165=document[_0xaf82[974]](_0xaf82[647])[0];$(_0xf2ddx165)[_0xaf82[279]](_0xaf82[975]+ _0xaf82[976]+ _0xaf82[977]+ _0xaf82[978]+ _0xaf82[979]+ _0xaf82[980]+ _0xaf82[981])}function sendicon1(){application[_0xaf82[984]](101,_0xaf82[982]+ pic1urlimg+ _0xaf82[983])}function sendicon2(){application[_0xaf82[984]](101,_0xaf82[982]+ pic2urlimg+ _0xaf82[983])}function sendicon3(){application[_0xaf82[984]](101,_0xaf82[982]+ pic3urlimg+ _0xaf82[983])}function sendicon4(){application[_0xaf82[984]](101,_0xaf82[982]+ pic4urlimg+ _0xaf82[983])}function sendicon5(){application[_0xaf82[984]](101,_0xaf82[982]+ pic5urlimg+ _0xaf82[983])}function sendicon6(){application[_0xaf82[984]](101,_0xaf82[982]+ pic6urlimg+ _0xaf82[983])}function setpic1data(){localStorage[_0xaf82[117]](_0xaf82[444],$(_0xaf82[985])[_0xaf82[59]]());$(_0xaf82[987])[_0xaf82[206]](_0xaf82[986],$(_0xaf82[985])[_0xaf82[59]]())}function setpic2data(){localStorage[_0xaf82[117]](_0xaf82[445],$(_0xaf82[988])[_0xaf82[59]]());$(_0xaf82[989])[_0xaf82[206]](_0xaf82[986],$(_0xaf82[988])[_0xaf82[59]]())}function setpic3data(){localStorage[_0xaf82[117]](_0xaf82[446],$(_0xaf82[990])[_0xaf82[59]]());$(_0xaf82[991])[_0xaf82[206]](_0xaf82[986],$(_0xaf82[990])[_0xaf82[59]]())}function setpic4data(){localStorage[_0xaf82[117]](_0xaf82[447],$(_0xaf82[992])[_0xaf82[59]]());$(_0xaf82[993])[_0xaf82[206]](_0xaf82[986],$(_0xaf82[992])[_0xaf82[59]]())}function setpic5data(){localStorage[_0xaf82[117]](_0xaf82[448],$(_0xaf82[994])[_0xaf82[59]]());$(_0xaf82[995])[_0xaf82[206]](_0xaf82[986],$(_0xaf82[994])[_0xaf82[59]]())}function setpic6data(){localStorage[_0xaf82[117]](_0xaf82[449],$(_0xaf82[996])[_0xaf82[59]]());$(_0xaf82[997])[_0xaf82[206]](_0xaf82[986],$(_0xaf82[996])[_0xaf82[59]]())}function sendyt1(){if(($(_0xaf82[493])[_0xaf82[59]]()!= _0xaf82[6])|| document[_0xaf82[407]](_0xaf82[372])[_0xaf82[405]][_0xaf82[55]](_0xaf82[549])){application[_0xaf82[984]](101,_0xaf82[998]+ yt1url+ _0xaf82[999])}else {toastr[_0xaf82[157]](Premadeletter39)}}function sendyt2(){if(($(_0xaf82[493])[_0xaf82[59]]()!= _0xaf82[6])|| document[_0xaf82[407]](_0xaf82[372])[_0xaf82[405]][_0xaf82[55]](_0xaf82[549])){application[_0xaf82[984]](101,_0xaf82[998]+ yt2url+ _0xaf82[999])}else {toastr[_0xaf82[157]](Premadeletter39)}}function sendyt3(){if(($(_0xaf82[493])[_0xaf82[59]]()!= _0xaf82[6])|| document[_0xaf82[407]](_0xaf82[372])[_0xaf82[405]][_0xaf82[55]](_0xaf82[549])){application[_0xaf82[984]](101,_0xaf82[998]+ yt3url+ _0xaf82[999])}else {toastr[_0xaf82[157]](Premadeletter39)}}function sendyt4(){if(($(_0xaf82[493])[_0xaf82[59]]()!= _0xaf82[6])|| document[_0xaf82[407]](_0xaf82[372])[_0xaf82[405]][_0xaf82[55]](_0xaf82[549])){application[_0xaf82[984]](101,_0xaf82[998]+ yt4url+ _0xaf82[999])}else {toastr[_0xaf82[157]](Premadeletter39)}}function sendyt5(){if(($(_0xaf82[493])[_0xaf82[59]]()!= _0xaf82[6])|| document[_0xaf82[407]](_0xaf82[372])[_0xaf82[405]][_0xaf82[55]](_0xaf82[549])){application[_0xaf82[984]](101,_0xaf82[998]+ yt5url+ _0xaf82[999])}else {toastr[_0xaf82[157]](Premadeletter39)}}function sendyt6(){if(($(_0xaf82[493])[_0xaf82[59]]()!= _0xaf82[6])|| document[_0xaf82[407]](_0xaf82[372])[_0xaf82[405]][_0xaf82[55]](_0xaf82[549])){application[_0xaf82[984]](101,_0xaf82[998]+ yt6url+ _0xaf82[999])}else {toastr[_0xaf82[157]](Premadeletter39)}}function setyt1data(){localStorage[_0xaf82[117]](_0xaf82[450],$(_0xaf82[1000])[_0xaf82[59]]());$(_0xaf82[1001])[_0xaf82[206]](_0xaf82[986],$(_0xaf82[1000])[_0xaf82[59]]())}function setyt2data(){localStorage[_0xaf82[117]](_0xaf82[451],$(_0xaf82[1002])[_0xaf82[59]]());$(_0xaf82[1003])[_0xaf82[206]](_0xaf82[986],$(_0xaf82[1002])[_0xaf82[59]]())}function setyt3data(){localStorage[_0xaf82[117]](_0xaf82[452],$(_0xaf82[1004])[_0xaf82[59]]());$(_0xaf82[1005])[_0xaf82[206]](_0xaf82[986],$(_0xaf82[1004])[_0xaf82[59]]())}function setyt4data(){localStorage[_0xaf82[117]](_0xaf82[453],$(_0xaf82[1006])[_0xaf82[59]]());$(_0xaf82[1007])[_0xaf82[206]](_0xaf82[986],$(_0xaf82[1006])[_0xaf82[59]]())}function setyt5data(){localStorage[_0xaf82[117]](_0xaf82[454],$(_0xaf82[1008])[_0xaf82[59]]());$(_0xaf82[1009])[_0xaf82[206]](_0xaf82[986],$(_0xaf82[1008])[_0xaf82[59]]())}function setyt6data(){localStorage[_0xaf82[117]](_0xaf82[455],$(_0xaf82[1010])[_0xaf82[59]]());$(_0xaf82[1011])[_0xaf82[206]](_0xaf82[986],$(_0xaf82[1010])[_0xaf82[59]]())}function setyt1url(){yt1url= $(_0xaf82[1012])[_0xaf82[59]]();if(getParameterByName(_0xaf82[160],yt1url)!= null){yt1url= getParameterByName(_0xaf82[160],yt1url)};localStorage[_0xaf82[117]](_0xaf82[438],yt1url);return yt1url}function setyt2url(){yt2url= $(_0xaf82[1013])[_0xaf82[59]]();if(getParameterByName(_0xaf82[160],yt2url)!= null){yt2url= getParameterByName(_0xaf82[160],yt2url)};localStorage[_0xaf82[117]](_0xaf82[439],yt2url);return yt2url}function setyt3url(){yt3url= $(_0xaf82[1014])[_0xaf82[59]]();if(getParameterByName(_0xaf82[160],yt3url)!= null){yt3url= getParameterByName(_0xaf82[160],yt3url)};localStorage[_0xaf82[117]](_0xaf82[440],yt3url);return yt3url}function setyt4url(){yt4url= $(_0xaf82[1015])[_0xaf82[59]]();if(getParameterByName(_0xaf82[160],yt4url)!= null){yt4url= getParameterByName(_0xaf82[160],yt4url)};localStorage[_0xaf82[117]](_0xaf82[441],yt4url);return yt4url}function setyt5url(){yt5url= $(_0xaf82[1016])[_0xaf82[59]]();if(getParameterByName(_0xaf82[160],yt5url)!= null){yt5url= getParameterByName(_0xaf82[160],yt5url)};localStorage[_0xaf82[117]](_0xaf82[442],yt5url);return yt5url}function setyt6url(){yt6url= $(_0xaf82[1017])[_0xaf82[59]]();if(getParameterByName(_0xaf82[160],yt6url)!= null){yt6url= getParameterByName(_0xaf82[160],yt6url)};localStorage[_0xaf82[117]](_0xaf82[443],yt6url);return yt6url}function seticonfunction(){if(setmessagecom== _0xaf82[100]){YessetMsgComReturn()};if(setyt== _0xaf82[100]){YessetytReturn()};if(setscriptingcom== _0xaf82[100]){YessetScriptingComReturn()};if(seticon== _0xaf82[99]){NoseticonReturn()}else {if(seticon== _0xaf82[100]){YesseticonReturn()}}}function setmessagecomfunction(){if(seticon== _0xaf82[100]){YesseticonReturn()};if(setyt== _0xaf82[100]){YessetytReturn()};if(setscriptingcom== _0xaf82[100]){YessetScriptingComReturn()};if(setmessagecom== _0xaf82[99]){NosetMsgComReturn()}else {if(setmessagecom== _0xaf82[100]){YessetMsgComReturn()}}}function setytfunction(){if(setmessagecom== _0xaf82[100]){YessetMsgComReturn()};if(seticon== _0xaf82[100]){YesseticonReturn()};if(setscriptingcom== _0xaf82[100]){YessetScriptingComReturn()};if(setyt== _0xaf82[99]){NosetytReturn()}else {if(setyt== _0xaf82[100]){YessetytReturn()}}}function setscriptingfunction(){if(seticon== _0xaf82[100]){YesseticonReturn()};if(setyt== _0xaf82[100]){YessetytReturn()};if(setmessagecom== _0xaf82[100]){YessetMsgComReturn()};if(setscriptingcom== _0xaf82[99]){NosetScriptingComReturn()}else {if(setscriptingcom== _0xaf82[100]){YessetScriptingComReturn()}}}function NoseticonReturn(){$(_0xaf82[1018])[_0xaf82[87]]();return seticon= _0xaf82[100]}function YesseticonReturn(){$(_0xaf82[1018])[_0xaf82[61]]();return seticon= _0xaf82[99]}function NosetMsgComReturn(){$(_0xaf82[1019])[_0xaf82[87]]();return setmessagecom= _0xaf82[100]}function YessetMsgComReturn(){$(_0xaf82[1019])[_0xaf82[61]]();return setmessagecom= _0xaf82[99]}function NosetytReturn(){$(_0xaf82[1020])[_0xaf82[87]]();return setyt= _0xaf82[100]}function YessetytReturn(){$(_0xaf82[1020])[_0xaf82[61]]();return setyt= _0xaf82[99]}function NosetScriptingComReturn(){$(_0xaf82[1021])[_0xaf82[87]]();return setscriptingcom= _0xaf82[100]}function YessetScriptingComReturn(){$(_0xaf82[1021])[_0xaf82[61]]();return setscriptingcom= _0xaf82[99]}function changePicFun(){$(_0xaf82[1022])[_0xaf82[61]]();$(_0xaf82[1023])[_0xaf82[61]]();$(_0xaf82[1024])[_0xaf82[61]]();$(_0xaf82[1025])[_0xaf82[61]]();$(_0xaf82[1026])[_0xaf82[61]]();$(_0xaf82[1027])[_0xaf82[61]]();$(_0xaf82[1028])[_0xaf82[61]]();$(_0xaf82[1029])[_0xaf82[61]]();$(_0xaf82[1030])[_0xaf82[61]]();if($(_0xaf82[1031])[_0xaf82[59]]()== 1){$(_0xaf82[1022])[_0xaf82[87]]();$(_0xaf82[1030])[_0xaf82[87]]()};if($(_0xaf82[1031])[_0xaf82[59]]()== 2){$(_0xaf82[1023])[_0xaf82[87]]();$(_0xaf82[1026])[_0xaf82[87]]()};if($(_0xaf82[1031])[_0xaf82[59]]()== 3){$(_0xaf82[1024])[_0xaf82[87]]();$(_0xaf82[1027])[_0xaf82[87]]()};if($(_0xaf82[1031])[_0xaf82[59]]()== 4){$(_0xaf82[1025])[_0xaf82[87]]()};if($(_0xaf82[1031])[_0xaf82[59]]()== 5){$(_0xaf82[1028])[_0xaf82[87]]();$(_0xaf82[1029])[_0xaf82[87]]()}}function changePhotoFun(){$(_0xaf82[1032])[_0xaf82[61]]();$(_0xaf82[1033])[_0xaf82[61]]();$(_0xaf82[1034])[_0xaf82[61]]();$(_0xaf82[1035])[_0xaf82[61]]();$(_0xaf82[1036])[_0xaf82[61]]();$(_0xaf82[1037])[_0xaf82[61]]();$(_0xaf82[1012])[_0xaf82[61]]();$(_0xaf82[1013])[_0xaf82[61]]();$(_0xaf82[1014])[_0xaf82[61]]();$(_0xaf82[1015])[_0xaf82[61]]();$(_0xaf82[1016])[_0xaf82[61]]();$(_0xaf82[1017])[_0xaf82[61]]();$(_0xaf82[985])[_0xaf82[61]]();$(_0xaf82[988])[_0xaf82[61]]();$(_0xaf82[990])[_0xaf82[61]]();$(_0xaf82[992])[_0xaf82[61]]();$(_0xaf82[994])[_0xaf82[61]]();$(_0xaf82[996])[_0xaf82[61]]();$(_0xaf82[1000])[_0xaf82[61]]();$(_0xaf82[1002])[_0xaf82[61]]();$(_0xaf82[1004])[_0xaf82[61]]();$(_0xaf82[1006])[_0xaf82[61]]();$(_0xaf82[1008])[_0xaf82[61]]();$(_0xaf82[1010])[_0xaf82[61]]();if($(_0xaf82[1038])[_0xaf82[59]]()== 1){$(_0xaf82[1032])[_0xaf82[87]]();$(_0xaf82[985])[_0xaf82[87]]()};if($(_0xaf82[1038])[_0xaf82[59]]()== 2){$(_0xaf82[1033])[_0xaf82[87]]();$(_0xaf82[988])[_0xaf82[87]]()};if($(_0xaf82[1038])[_0xaf82[59]]()== 3){$(_0xaf82[1034])[_0xaf82[87]]();$(_0xaf82[990])[_0xaf82[87]]()};if($(_0xaf82[1038])[_0xaf82[59]]()== 4){$(_0xaf82[1035])[_0xaf82[87]]();$(_0xaf82[992])[_0xaf82[87]]()};if($(_0xaf82[1038])[_0xaf82[59]]()== 5){$(_0xaf82[1036])[_0xaf82[87]]();$(_0xaf82[994])[_0xaf82[87]]()};if($(_0xaf82[1038])[_0xaf82[59]]()== 6){$(_0xaf82[1037])[_0xaf82[87]]();$(_0xaf82[996])[_0xaf82[87]]()};if($(_0xaf82[1038])[_0xaf82[59]]()== 7){$(_0xaf82[1012])[_0xaf82[87]]();$(_0xaf82[1000])[_0xaf82[87]]()};if($(_0xaf82[1038])[_0xaf82[59]]()== 8){$(_0xaf82[1013])[_0xaf82[87]]();$(_0xaf82[1002])[_0xaf82[87]]()};if($(_0xaf82[1038])[_0xaf82[59]]()== 9){$(_0xaf82[1014])[_0xaf82[87]]();$(_0xaf82[1004])[_0xaf82[87]]()};if($(_0xaf82[1038])[_0xaf82[59]]()== 10){$(_0xaf82[1015])[_0xaf82[87]]();$(_0xaf82[1006])[_0xaf82[87]]()};if($(_0xaf82[1038])[_0xaf82[59]]()== 11){$(_0xaf82[1016])[_0xaf82[87]]();$(_0xaf82[1008])[_0xaf82[87]]()};if($(_0xaf82[1038])[_0xaf82[59]]()== 12){$(_0xaf82[1017])[_0xaf82[87]]();$(_0xaf82[1010])[_0xaf82[87]]()}}function msgcommand1f(){commandMsg= _0xaf82[522];otherMsg= _0xaf82[6];dosendmsgcommand()}function msgcommand2f(){commandMsg= _0xaf82[517];otherMsg= _0xaf82[6];dosendmsgcommand()}function msgcommand3f(){commandMsg= _0xaf82[533];otherMsg= _0xaf82[6];dosendmsgcommand()}function msgcommand4f(){commandMsg= _0xaf82[537];otherMsg= _0xaf82[6];dosendmsgcommand()}function msgcommand5f(){commandMsg= _0xaf82[541];otherMsg= _0xaf82[6];dosendmsgcommand()}function msgcommand6f(){commandMsg= _0xaf82[528];otherMsg= _0xaf82[6];dosendmsgcommand()}function dosendmsgcommand(){if(application[_0xaf82[1039]]== _0xaf82[6]|| $(_0xaf82[493])[_0xaf82[59]]()== _0xaf82[6]){toastr[_0xaf82[184]](_0xaf82[199]+ Premadeletter123+ _0xaf82[200]+ Premadeletter39)}else {application[_0xaf82[984]](101,_0xaf82[1040]+ $(_0xaf82[293])[_0xaf82[59]]()+ _0xaf82[1041]+ commandMsg+ _0xaf82[1042]+ otherMsg)}}function CutNameConflictwithMessageFunction(){return CutNameConflictwithMessage= true}function inject(_0xf2ddx8a,_0xf2ddx19b){switch(_0xf2ddx8a){case _0xaf82[1044]:var inject=document[_0xaf82[936]](_0xaf82[935]);inject[_0xaf82[926]]= _0xaf82[937];inject[_0xaf82[940]](document[_0xaf82[1043]](_0xf2ddx19b));break;case _0xaf82[1047]:var inject=document[_0xaf82[936]](_0xaf82[1045]);inject[_0xaf82[926]]= _0xaf82[1046];inject[_0xaf82[940]](document[_0xaf82[1043]](_0xf2ddx19b));break};(document[_0xaf82[647]]|| document[_0xaf82[204]])[_0xaf82[940]](inject)}function StartEditGameNames(){inject(_0xaf82[1047],_0xaf82[1048]);inject(_0xaf82[1044],!function _0xf2ddx12d(_0xf2ddx19d){if(_0xaf82[938]!= typeof document[_0xaf82[974]](_0xaf82[647])[0]&& _0xaf82[938]!= typeof document[_0xaf82[974]](_0xaf82[280])[0]){var _0xf2ddx19e={l:{score:0,names:[],leaderboard:{},toggled:!0,prototypes:{canvas:CanvasRenderingContext2D[_0xaf82[125]],old:{}}},f:{prototype_override:function(_0xf2ddx12d,_0xf2ddx19d,_0xf2ddx19f,_0xf2ddx8e){_0xf2ddx12d in _0xf2ddx19e[_0xaf82[1049]][_0xaf82[127]][_0xaf82[126]]|| (_0xf2ddx19e[_0xaf82[1049]][_0xaf82[127]][_0xaf82[126]][_0xf2ddx12d]= {}),_0xf2ddx19d in _0xf2ddx19e[_0xaf82[1049]][_0xaf82[127]][_0xaf82[126]][_0xf2ddx12d]|| (_0xf2ddx19e[_0xaf82[1049]][_0xaf82[127]][_0xaf82[126]][_0xf2ddx12d][_0xf2ddx19d]= _0xf2ddx19e[_0xaf82[1049]][_0xaf82[127]][_0xf2ddx12d][_0xf2ddx19d]),_0xf2ddx19e[_0xaf82[1049]][_0xaf82[127]][_0xf2ddx12d][_0xf2ddx19d]= function(){_0xaf82[128]== _0xf2ddx19f&& _0xf2ddx8e(this,arguments),_0xf2ddx19e[_0xaf82[1049]][_0xaf82[127]][_0xaf82[126]][_0xf2ddx12d][_0xf2ddx19d][_0xaf82[129]](this,arguments),_0xaf82[130]== _0xf2ddx19f&& _0xf2ddx8e(this,arguments)}},filltext_override:function(){_0xf2ddx19e[_0xaf82[150]][_0xaf82[151]](_0xaf82[137],_0xaf82[143],_0xaf82[128],function(_0xf2ddx12d,_0xf2ddx19d){var _0xf2ddx19f=_0xf2ddx19d[0];if(_0xf2ddx19d,_0xf2ddx19f[_0xaf82[1050]](/^(1|2|3|4|5|6|7|8|9|10)\.(.+?)$/)){var _0xf2ddx8e=_0xaf82[6],_0xf2ddx143=_0xf2ddx19f[_0xaf82[190]](/\.(.+)?/);_0xf2ddx19e[_0xaf82[1049]][_0xaf82[374]][_0xf2ddx143[0]]= _0xf2ddx143[1];for(k in _0xf2ddx19e[_0xaf82[1049]][_0xaf82[374]]){_0xf2ddx8e+= _0xf2ddx19e[_0xaf82[1053]][_0xaf82[1052]](_0xaf82[1051]+ k,_0xf2ddx19e[_0xaf82[1049]][_0xaf82[374]][k])};document[_0xaf82[407]](_0xaf82[1054])[_0xaf82[203]]= _0xf2ddx8e}else {_0xf2ddx19f[_0xaf82[1050]](/^score\:\s([0-9]+)$/i)?(_0xf2ddx19e[_0xaf82[1049]][_0xaf82[1055]]= parseInt(_0xf2ddx19f[_0xaf82[190]](/score:\s([0-9]+)?/i)[1]),document[_0xaf82[407]](_0xaf82[1056])[_0xaf82[203]]= _0xf2ddx19e[_0xaf82[1053]][_0xaf82[1052]](_0xaf82[1055],_0xf2ddx19e[_0xaf82[1049]][_0xaf82[1055]])):!(_0xaf82[6]!== _0xf2ddx19f&& _0xf2ddx19f[_0xaf82[140]]<= 15)|| _0xf2ddx19e[_0xaf82[1049]][_0xaf82[1057]][_0xaf82[179]](_0xf2ddx19f)> -1 || _0xf2ddx19f[_0xaf82[1050]](/(leaderboard|connect|loading|starting\smass|xp\sboost|open\sshop|([0-9]{2})m\s(([0-9]{2})h\s)?([0-9]{2})s)/i) || _0xf2ddx19f[_0xaf82[1050]](/^(free\scoins|\s?([0-9]+)\scoins|\s?with\soffers|collect\sin\:|hourly\scoins|come\sback\sin|to\searn\:|starter\spack|hourly\sbonus|level\s([0-9]+)|([0-9\.]+)|.([0-9\.]+)|([0-9\.]+)\%|mass\sboost|coins|skins|shop|banana|cookie|jupiter|birdie|mercury|apple|halo|neptune|black\shole|uranus|star\sball|target|galaxy|venus|breakfast|saturn|pluto|tiger|hot\sdog|heart|mouse|wolf|goldfish|piggie|blueberry|bomb|bowling|candy|frog|hamburger|nose|seal|panda|pizza|snowman|sun|baseball|basketball|bug|cloud|moo|tomato|mushroom|donuts|terrible|ghost|apple\sface|turtle|brofist|puppy|footprint|pineapple|zebra|toon|octopus|radar|eye|owl|virus|smile|army|cat|nuclear|toxic|dog|sad|facepalm|luchador|zombie|bite|crazy|hockey|brain|evil|pirate|evil\seye|halloween|monster|scarecrow|spy|fly|spider|wasp|lizard|bat|snake|fox|coyote|hunter|sumo|bear|cougar|panther|lion|crocodile|shark|mammoth|raptor|t-rex|kraken|gingerbread|santa|evil\self|cupcake|boy\skiss|girl\skiss|cupid|shuttle|astronaut|space\sdog|alien|meteor|ufo|rocket|boot|gold\spot|hat|horseshoe|lucky\sclover|leprechaun|rainbow|choco\segg|carrot|statue|rooster|rabbit|jester|earth\sday|chihuahua|cactus|sombrero|hot\spepper|chupacabra|taco|piAƒA£A‚A±ata|thirteen|black\scat|raven|mask|goblin|green\sman|slime\sface|blob|invader|space\shunter)$/i) || (_0xf2ddx19e[_0xaf82[1049]][_0xaf82[1057]][_0xaf82[885]](_0xf2ddx19f),document[_0xaf82[407]](_0xaf82[1058])[_0xaf82[203]]= document[_0xaf82[407]](_0xaf82[1058])[_0xaf82[203]][_0xaf82[1060]](_0xf2ddx19e[_0xaf82[1053]][_0xaf82[1052]](_0xaf82[1059],_0xf2ddx19f)))}})},hotkeys:function(_0xf2ddx12d){88== _0xf2ddx12d[_0xaf82[685]]&& (document[_0xaf82[407]](_0xaf82[1061])[_0xaf82[1045]][_0xaf82[523]]= _0xf2ddx19e[_0xaf82[1049]][_0xaf82[1062]]?_0xaf82[525]:_0xaf82[732],_0xf2ddx19e[_0xaf82[1049]][_0xaf82[1062]]= _0xf2ddx19e[_0xaf82[1049]][_0xaf82[1062]]?!1:!0)}},u:{fonts:function(){return _0xaf82[1063]},html:function(){return _0xaf82[1064]},span:function(_0xf2ddx12d,_0xf2ddx19d){return _0xaf82[1065]+ _0xf2ddx12d+ _0xaf82[1066]+ _0xf2ddx19d+ _0xaf82[1067]+ _0xf2ddx19d+ _0xaf82[752]}}};document[_0xaf82[974]](_0xaf82[647])[0][_0xaf82[1070]](_0xaf82[1068],_0xf2ddx19e[_0xaf82[1053]][_0xaf82[1069]]()),document[_0xaf82[974]](_0xaf82[280])[0][_0xaf82[1070]](_0xaf82[1068],_0xf2ddx19e[_0xaf82[1053]][_0xaf82[281]]()),_0xf2ddx19d[_0xaf82[1072]](_0xaf82[692],_0xf2ddx19e[_0xaf82[150]][_0xaf82[1071]]),_0xf2ddx19e[_0xaf82[150]][_0xaf82[1073]]()}else {_0xf2ddx19d[_0xaf82[1074]](function(){_0xf2ddx12d(_0xf2ddx19d)},100)}}(window))}function StopEditGameNames(){$(_0xaf82[1075])[_0xaf82[61]]()}function ContinueEditGameNames(){$(_0xaf82[1075])[_0xaf82[87]]()}function displayTimer(){var _0xf2ddx1a3=_0xaf82[1076],_0xf2ddx1a4=_0xaf82[1076],_0xf2ddx1a5=_0xaf82[6],_0xf2ddx1a6= new Date()[_0xaf82[229]]();TimerLM[_0xaf82[1077]]= _0xf2ddx1a6- TimerLM[_0xaf82[1078]];if(TimerLM[_0xaf82[1077]]> 1000){_0xf2ddx1a4= Math[_0xaf82[141]](TimerLM[_0xaf82[1077]]/ 1000);if(_0xf2ddx1a4> 60){_0xf2ddx1a4= _0xf2ddx1a4% 60};if(_0xf2ddx1a4< 10){_0xf2ddx1a4= _0xaf82[101]+ String(_0xf2ddx1a4)}};if(TimerLM[_0xaf82[1077]]> 60000){_0xf2ddx1a3= Math[_0xaf82[141]](TimerLM[_0xaf82[1077]]/ 60000);1;if(_0xf2ddx1a3> 60){_0xf2ddx1a3= _0xf2ddx1a3% 60};if(_0xf2ddx1a3< 10){_0xf2ddx1a3= _0xaf82[101]+ String(_0xf2ddx1a3)}};_0xf2ddx1a5+= _0xf2ddx1a3+ _0xaf82[239];_0xf2ddx1a5+= _0xf2ddx1a4;TimerLM[_0xaf82[1079]][_0xaf82[203]]= _0xf2ddx1a5}function startTimer(){$(_0xaf82[1080])[_0xaf82[61]]();$(_0xaf82[1081])[_0xaf82[87]]();$(_0xaf82[1082])[_0xaf82[87]]();TimerLM[_0xaf82[1078]]= new Date()[_0xaf82[229]]();console[_0xaf82[283]](_0xaf82[1083]+ TimerLM[_0xaf82[1078]]);if(TimerLM[_0xaf82[1077]]> 0){TimerLM[_0xaf82[1078]]= TimerLM[_0xaf82[1078]]- TimerLM[_0xaf82[1077]]};TimerLM[_0xaf82[1084]]= setInterval(function(){displayTimer()},10)}function stopTimer(){$(_0xaf82[1080])[_0xaf82[87]]();$(_0xaf82[1081])[_0xaf82[61]]();$(_0xaf82[1082])[_0xaf82[87]]();clearInterval(TimerLM[_0xaf82[1084]])}function clearTimer(){$(_0xaf82[1080])[_0xaf82[87]]();$(_0xaf82[1081])[_0xaf82[61]]();$(_0xaf82[1082])[_0xaf82[61]]();clearInterval(TimerLM[_0xaf82[1084]]);TimerLM[_0xaf82[1079]][_0xaf82[203]]= _0xaf82[1085];TimerLM[_0xaf82[1077]]= 0}function setminbgname(){minimapbckimg= $(_0xaf82[1022])[_0xaf82[59]]();localStorage[_0xaf82[117]](_0xaf82[428],minimapbckimg);$(_0xaf82[1088])[_0xaf82[73]](_0xaf82[518],_0xaf82[1086]+ minimapbckimg+ _0xaf82[1087])[_0xaf82[73]]({opacity:0.8})}function setminbtext(){minbtext= $(_0xaf82[1030])[_0xaf82[59]]();localStorage[_0xaf82[117]](_0xaf82[40],minbtext);var _0xf2ddx8f=document[_0xaf82[407]](_0xaf82[146]);var _0xf2ddx13e=_0xf2ddx8f[_0xaf82[873]](_0xaf82[872]);_0xf2ddx13e[_0xaf82[874]](0,0,_0xf2ddx8f[_0xaf82[71]],_0xf2ddx8f[_0xaf82[715]]/ 9);_0xf2ddx13e[_0xaf82[875]]= _0xaf82[1089];_0xf2ddx13e[_0xaf82[143]](minbtext,_0xf2ddx8f[_0xaf82[71]]/ 2,22)}function setleadbgname(){leadbimg= $(_0xaf82[1023])[_0xaf82[59]]();localStorage[_0xaf82[117]](_0xaf82[431],leadbimg);$(_0xaf82[1090])[_0xaf82[73]](_0xaf82[518],_0xaf82[1086]+ leadbimg+ _0xaf82[1087])[_0xaf82[73]]({opacity:0.8})}function setteambgname(){teambimg= $(_0xaf82[1024])[_0xaf82[59]]();localStorage[_0xaf82[117]](_0xaf82[429],teambimg);$(_0xaf82[520])[_0xaf82[73]](_0xaf82[518],_0xaf82[1086]+ teambimg+ _0xaf82[1087])[_0xaf82[73]]({opacity:0.8})}function setcanvasbgname(){canvasbimg= $(_0xaf82[1025])[_0xaf82[59]]();localStorage[_0xaf82[117]](_0xaf82[430],canvasbimg);$(_0xaf82[1091])[_0xaf82[73]](_0xaf82[518],_0xaf82[1086]+ canvasbimg+ _0xaf82[1087])[_0xaf82[73]]({opacity:1});$(_0xaf82[1091])[_0xaf82[73]](_0xaf82[1092],_0xaf82[1093])}function setleadbtext(){leadbtext= $(_0xaf82[1026])[_0xaf82[59]]();localStorage[_0xaf82[117]](_0xaf82[41],leadbtext);$(_0xaf82[1094])[_0xaf82[76]](leadbtext)}function setteambtext(){teambtext= $(_0xaf82[1027])[_0xaf82[59]]();localStorage[_0xaf82[117]](_0xaf82[42],teambtext);$(_0xaf82[1095])[_0xaf82[76]](teambtext)}function setimgUrl(){imgUrl= $(_0xaf82[1028])[_0xaf82[59]]();localStorage[_0xaf82[117]](_0xaf82[43],imgUrl)}function setimgHref(){imgHref= $(_0xaf82[1029])[_0xaf82[59]]();localStorage[_0xaf82[117]](_0xaf82[44],imgHref)}function setpic1url(){pic1urlimg= $(_0xaf82[1032])[_0xaf82[59]]();localStorage[_0xaf82[117]](_0xaf82[432],pic1urlimg);return pic1urlimg}function setpic2url(){pic2urlimg= $(_0xaf82[1033])[_0xaf82[59]]();localStorage[_0xaf82[117]](_0xaf82[433],pic2urlimg);return pic2urlimg}function setpic3url(){pic3urlimg= $(_0xaf82[1034])[_0xaf82[59]]();localStorage[_0xaf82[117]](_0xaf82[434],pic3urlimg);return pic3urlimg}function setpic4url(){pic4urlimg= $(_0xaf82[1035])[_0xaf82[59]]();localStorage[_0xaf82[117]](_0xaf82[435],pic4urlimg);return pic4urlimg}function setpic5url(){pic5urlimg= $(_0xaf82[1036])[_0xaf82[59]]();localStorage[_0xaf82[117]](_0xaf82[436],pic5urlimg);return pic5urlimg}function setpic6url(){pic6urlimg= $(_0xaf82[1037])[_0xaf82[59]]();localStorage[_0xaf82[117]](_0xaf82[437],pic6urlimg);return pic6urlimg}function setdiscwebhook1(){discwebhook1= $(_0xaf82[1096])[_0xaf82[59]]();var _0xf2ddx1ba=$(_0xaf82[1096])[_0xaf82[59]]();if(~_0xf2ddx1ba[_0xaf82[179]](_0xaf82[1097])|| ~_0xf2ddx1ba[_0xaf82[179]](_0xaf82[1098])){localStorage[_0xaf82[117]](_0xaf82[456],discwebhook1);var _0xf2ddx19f=document[_0xaf82[936]](_0xaf82[935]);_0xf2ddx19f[_0xaf82[926]]= _0xaf82[937];_0xf2ddx19f[_0xaf82[470]]= _0xaf82[1099];$(_0xaf82[280])[_0xaf82[279]](_0xf2ddx19f)}else {if(_0xf2ddx1ba== _0xaf82[6]){localStorage[_0xaf82[117]](_0xaf82[456],discwebhook1)}else {toastr[_0xaf82[173]](Premadeletter36)[_0xaf82[73]](_0xaf82[71],_0xaf82[267])}}}function setdiscwebhook2(){discwebhook2= $(_0xaf82[1100])[_0xaf82[59]]();var _0xf2ddx1ba=$(_0xaf82[1100])[_0xaf82[59]]();if(~_0xf2ddx1ba[_0xaf82[179]](_0xaf82[1097])|| ~_0xf2ddx1ba[_0xaf82[179]](_0xaf82[1098])){localStorage[_0xaf82[117]](_0xaf82[457],discwebhook2)}else {if(_0xf2ddx1ba== _0xaf82[6]){localStorage[_0xaf82[117]](_0xaf82[457],discwebhook2)}else {toastr[_0xaf82[173]](Premadeletter36)[_0xaf82[73]](_0xaf82[71],_0xaf82[267])}}}function openbleedmod(){var _0xf2ddx19f=document[_0xaf82[936]](_0xaf82[935]);_0xf2ddx19f[_0xaf82[926]]= _0xaf82[937];_0xf2ddx19f[_0xaf82[470]]= _0xaf82[1101];$(_0xaf82[280])[_0xaf82[279]](_0xf2ddx19f)}function openrotatingmod(){var _0xf2ddx19f=document[_0xaf82[936]](_0xaf82[935]);_0xf2ddx19f[_0xaf82[926]]= _0xaf82[937];_0xf2ddx19f[_0xaf82[470]]= _0xaf82[1102];$(_0xaf82[280])[_0xaf82[279]](_0xf2ddx19f)}function languagemodfun(){if(languagemod!= 1){$(_0xaf82[1103])[_0xaf82[59]](languagemod);changeModLanguage()}}function changeModLanguage(){localStorage[_0xaf82[117]](_0xaf82[113],$(_0xaf82[1103])[_0xaf82[59]]());if($(_0xaf82[1103])[_0xaf82[59]]()== 1){languageinjector(_0xaf82[1104])}else {if($(_0xaf82[1103])[_0xaf82[59]]()== 2){languageinjector(_0xaf82[1105])}else {if($(_0xaf82[1103])[_0xaf82[59]]()== 3){languageinjector(_0xaf82[1106])}else {if($(_0xaf82[1103])[_0xaf82[59]]()== 4){languageinjector(_0xaf82[1107])}else {if($(_0xaf82[1103])[_0xaf82[59]]()== 5){languageinjector(_0xaf82[1108])}else {if($(_0xaf82[1103])[_0xaf82[59]]()== 6){languageinjector(_0xaf82[1109])}else {if($(_0xaf82[1103])[_0xaf82[59]]()== 7){languageinjector(_0xaf82[1110])}else {if($(_0xaf82[1103])[_0xaf82[59]]()== 8){languageinjector(_0xaf82[1111])}else {if($(_0xaf82[1103])[_0xaf82[59]]()== 9){languageinjector(_0xaf82[1112])}else {if($(_0xaf82[1103])[_0xaf82[59]]()== 10){languageinjector(_0xaf82[1113])}else {if($(_0xaf82[1103])[_0xaf82[59]]()== 11){languageinjector(_0xaf82[1114])}}}}}}}}}}}}function injector2(_0xf2ddx1c1,url2){var _0xf2ddx14f=document[_0xaf82[936]](_0xaf82[935]);_0xf2ddx14f[_0xaf82[939]]= function(){var _0xf2ddx1c2=document[_0xaf82[936]](_0xaf82[935]);_0xf2ddx1c2[_0xaf82[470]]= url2;document[_0xaf82[974]](_0xaf82[647])[0][_0xaf82[940]](_0xf2ddx1c2)};_0xf2ddx14f[_0xaf82[470]]= _0xf2ddx1c1;document[_0xaf82[974]](_0xaf82[647])[0][_0xaf82[940]](_0xf2ddx14f)}function languageinjector(url){injector2(url,_0xaf82[1115])}function newsubmit(){if(legendmod[_0xaf82[387]]== true){$(_0xaf82[236])[_0xaf82[208]]()}}function triggerLMbtns(){PanelImageSrc= $(_0xaf82[103])[_0xaf82[59]]();if(PanelImageSrc!= _0xaf82[6]|| PanelImageSrc!= _0xaf82[1116]|| PanelImageSrc!= _0xaf82[1117]){$(_0xaf82[1120])[_0xaf82[73]](_0xaf82[518],_0xaf82[1118]+ PanelImageSrc+ _0xaf82[1119])};$(_0xaf82[1122])[_0xaf82[1121]](function(){if(PanelImageSrc!= _0xaf82[6]|| PanelImageSrc!= _0xaf82[1116]|| PanelImageSrc!= _0xaf82[1117]){$(_0xaf82[1120])[_0xaf82[73]](_0xaf82[518],_0xaf82[1118]+ PanelImageSrc+ _0xaf82[1119])}});$(_0xaf82[1123])[_0xaf82[1121]](function(){if(PanelImageSrc!= _0xaf82[6]|| PanelImageSrc!= _0xaf82[1116]|| PanelImageSrc!= _0xaf82[1117]){$(_0xaf82[1120])[_0xaf82[73]](_0xaf82[518],_0xaf82[1118]+ PanelImageSrc+ _0xaf82[1119])}});$(_0xaf82[1124])[_0xaf82[1121]](function(){if(PanelImageSrc!= _0xaf82[6]|| PanelImageSrc!= _0xaf82[1116]|| PanelImageSrc!= _0xaf82[1117]){$(_0xaf82[1120])[_0xaf82[73]](_0xaf82[518],_0xaf82[1118]+ PanelImageSrc+ _0xaf82[1119])}});$(_0xaf82[1125])[_0xaf82[1121]](function(){if(PanelImageSrc!= _0xaf82[6]|| PanelImageSrc!= _0xaf82[1116]|| PanelImageSrc!= _0xaf82[1117]){$(_0xaf82[1120])[_0xaf82[73]](_0xaf82[518],_0xaf82[1118]+ PanelImageSrc+ _0xaf82[1119])}});if(SHOSHOBtn== _0xaf82[115]){$(_0xaf82[209])[_0xaf82[208]]()};if(MAINBTBtn== _0xaf82[115]){$(_0xaf82[210])[_0xaf82[208]]()};if(AnimatedSkinBtn== _0xaf82[115]){$(_0xaf82[1126])[_0xaf82[208]]()};if(XPBtn== _0xaf82[115]){$(_0xaf82[211])[_0xaf82[208]]()};if(TIMEcalBtn== _0xaf82[115]){$(_0xaf82[1127])[_0xaf82[208]]()};document[_0xaf82[407]](_0xaf82[1128])[_0xaf82[405]]= localStorage[_0xaf82[3]](_0xaf82[428]);if($(_0xaf82[1022])[_0xaf82[59]]()!= _0xaf82[6]){setminbgname()};document[_0xaf82[407]](_0xaf82[1129])[_0xaf82[405]]= localStorage[_0xaf82[3]](_0xaf82[431]);if($(_0xaf82[1023])[_0xaf82[59]]()!= _0xaf82[6]){setleadbgname()};document[_0xaf82[407]](_0xaf82[1130])[_0xaf82[405]]= localStorage[_0xaf82[3]](_0xaf82[429]);if($(_0xaf82[1024])[_0xaf82[59]]()!= _0xaf82[6]){setteambgname()};document[_0xaf82[407]](_0xaf82[1131])[_0xaf82[405]]= localStorage[_0xaf82[3]](_0xaf82[430]);if($(_0xaf82[1025])[_0xaf82[59]]()!= _0xaf82[6]){setcanvasbgname()};document[_0xaf82[407]](_0xaf82[41])[_0xaf82[405]]= localStorage[_0xaf82[3]](_0xaf82[41]);if($(_0xaf82[1026])[_0xaf82[59]]()!= _0xaf82[6]){setleadbtext()};document[_0xaf82[407]](_0xaf82[42])[_0xaf82[405]]= localStorage[_0xaf82[3]](_0xaf82[42]);if($(_0xaf82[1027])[_0xaf82[59]]()!= _0xaf82[6]){setteambtext()};document[_0xaf82[407]](_0xaf82[43])[_0xaf82[405]]= localStorage[_0xaf82[3]](_0xaf82[43]);if($(_0xaf82[1028])[_0xaf82[59]]()!= _0xaf82[6]){setimgUrl()};document[_0xaf82[407]](_0xaf82[44])[_0xaf82[405]]= localStorage[_0xaf82[3]](_0xaf82[44]);if($(_0xaf82[1029])[_0xaf82[59]]()!= _0xaf82[6]){setimgHref()};document[_0xaf82[407]](_0xaf82[40])[_0xaf82[405]]= localStorage[_0xaf82[3]](_0xaf82[40]);if($(_0xaf82[1030])[_0xaf82[59]]()!= _0xaf82[6]&& $(_0xaf82[1030])[_0xaf82[59]]()!= null){setminbtext()};document[_0xaf82[407]](_0xaf82[1132])[_0xaf82[405]]= localStorage[_0xaf82[3]](_0xaf82[432]);if($(_0xaf82[1032])[_0xaf82[59]]()!= _0xaf82[6]){setpic1url()};document[_0xaf82[407]](_0xaf82[1133])[_0xaf82[405]]= localStorage[_0xaf82[3]](_0xaf82[433]);if($(_0xaf82[1033])[_0xaf82[59]]()!= _0xaf82[6]){setpic2url()};document[_0xaf82[407]](_0xaf82[1134])[_0xaf82[405]]= localStorage[_0xaf82[3]](_0xaf82[434]);if($(_0xaf82[1034])[_0xaf82[59]]()!= _0xaf82[6]){setpic3url()};document[_0xaf82[407]](_0xaf82[1135])[_0xaf82[405]]= localStorage[_0xaf82[3]](_0xaf82[435]);if($(_0xaf82[1035])[_0xaf82[59]]()!= _0xaf82[6]){setpic4url()};document[_0xaf82[407]](_0xaf82[1136])[_0xaf82[405]]= localStorage[_0xaf82[3]](_0xaf82[436]);if($(_0xaf82[1036])[_0xaf82[59]]()!= _0xaf82[6]){setpic5url()};document[_0xaf82[407]](_0xaf82[1137])[_0xaf82[405]]= localStorage[_0xaf82[3]](_0xaf82[437]);if($(_0xaf82[1037])[_0xaf82[59]]()!= _0xaf82[6]){setpic6url()};document[_0xaf82[407]](_0xaf82[1138])[_0xaf82[405]]= localStorage[_0xaf82[3]](_0xaf82[438]);if($(_0xaf82[1012])[_0xaf82[59]]()!= _0xaf82[6]){setyt1url()};document[_0xaf82[407]](_0xaf82[1139])[_0xaf82[405]]= localStorage[_0xaf82[3]](_0xaf82[439]);if($(_0xaf82[1013])[_0xaf82[59]]()!= _0xaf82[6]){setyt2url()};document[_0xaf82[407]](_0xaf82[1140])[_0xaf82[405]]= localStorage[_0xaf82[3]](_0xaf82[440]);if($(_0xaf82[1014])[_0xaf82[59]]()!= _0xaf82[6]){setyt3url()};document[_0xaf82[407]](_0xaf82[1141])[_0xaf82[405]]= localStorage[_0xaf82[3]](_0xaf82[441]);if($(_0xaf82[1015])[_0xaf82[59]]()!= _0xaf82[6]){setyt4url()};document[_0xaf82[407]](_0xaf82[1142])[_0xaf82[405]]= localStorage[_0xaf82[3]](_0xaf82[442]);if($(_0xaf82[1016])[_0xaf82[59]]()!= _0xaf82[6]){setyt5url()};document[_0xaf82[407]](_0xaf82[1143])[_0xaf82[405]]= localStorage[_0xaf82[3]](_0xaf82[443]);if($(_0xaf82[1017])[_0xaf82[59]]()!= _0xaf82[6]){setyt6url()};document[_0xaf82[407]](_0xaf82[1144])[_0xaf82[405]]= localStorage[_0xaf82[3]](_0xaf82[444]);if($(_0xaf82[985])[_0xaf82[59]]()!= _0xaf82[6]){setpic1data()};document[_0xaf82[407]](_0xaf82[1145])[_0xaf82[405]]= localStorage[_0xaf82[3]](_0xaf82[445]);if($(_0xaf82[988])[_0xaf82[59]]()!= _0xaf82[6]){setpic2data()};document[_0xaf82[407]](_0xaf82[1146])[_0xaf82[405]]= localStorage[_0xaf82[3]](_0xaf82[446]);if($(_0xaf82[990])[_0xaf82[59]]()!= _0xaf82[6]){setpic3data()};document[_0xaf82[407]](_0xaf82[1147])[_0xaf82[405]]= localStorage[_0xaf82[3]](_0xaf82[447]);if($(_0xaf82[992])[_0xaf82[59]]()!= _0xaf82[6]){setpic4data()};document[_0xaf82[407]](_0xaf82[1148])[_0xaf82[405]]= localStorage[_0xaf82[3]](_0xaf82[448]);if($(_0xaf82[994])[_0xaf82[59]]()!= _0xaf82[6]){setpic5data()};document[_0xaf82[407]](_0xaf82[1149])[_0xaf82[405]]= localStorage[_0xaf82[3]](_0xaf82[449]);if($(_0xaf82[996])[_0xaf82[59]]()!= _0xaf82[6]){setpic6data()};document[_0xaf82[407]](_0xaf82[1150])[_0xaf82[405]]= localStorage[_0xaf82[3]](_0xaf82[450]);if($(_0xaf82[1000])[_0xaf82[59]]()!= _0xaf82[6]){setyt1data()};document[_0xaf82[407]](_0xaf82[1151])[_0xaf82[405]]= localStorage[_0xaf82[3]](_0xaf82[451]);if($(_0xaf82[1002])[_0xaf82[59]]()!= _0xaf82[6]){setyt2data()};document[_0xaf82[407]](_0xaf82[1152])[_0xaf82[405]]= localStorage[_0xaf82[3]](_0xaf82[452]);if($(_0xaf82[1004])[_0xaf82[59]]()!= _0xaf82[6]){setyt3data()};document[_0xaf82[407]](_0xaf82[1153])[_0xaf82[405]]= localStorage[_0xaf82[3]](_0xaf82[453]);if($(_0xaf82[1006])[_0xaf82[59]]()!= _0xaf82[6]){setyt4data()};document[_0xaf82[407]](_0xaf82[1154])[_0xaf82[405]]= localStorage[_0xaf82[3]](_0xaf82[454]);if($(_0xaf82[1008])[_0xaf82[59]]()!= _0xaf82[6]){setyt5data()};document[_0xaf82[407]](_0xaf82[1155])[_0xaf82[405]]= localStorage[_0xaf82[3]](_0xaf82[455]);if($(_0xaf82[1010])[_0xaf82[59]]()!= _0xaf82[6]){setyt6data()};document[_0xaf82[407]](_0xaf82[456])[_0xaf82[405]]= localStorage[_0xaf82[3]](_0xaf82[456]);if($(_0xaf82[1096])[_0xaf82[59]]()!= _0xaf82[6]&& $(_0xaf82[1096])[_0xaf82[59]]()!= null){setdiscwebhook1()};document[_0xaf82[407]](_0xaf82[457])[_0xaf82[405]]= localStorage[_0xaf82[3]](_0xaf82[457]);if($(_0xaf82[1100])[_0xaf82[59]]()!= _0xaf82[6]&& $(_0xaf82[1100])[_0xaf82[59]]()!= null){setdiscwebhook2()};$(_0xaf82[1157])[_0xaf82[279]](_0xaf82[1156]);if(dyinglight1load== null|| dyinglight1load== _0xaf82[4]){$(_0xaf82[1160])[_0xaf82[1159]](_0xaf82[1158])}else {if(dyinglight1load== _0xaf82[1161]){opendyinglight();$(_0xaf82[1160])[_0xaf82[1159]](_0xaf82[1162])}}}function opendyinglight(){var _0xf2ddx19f=document[_0xaf82[936]](_0xaf82[935]);_0xf2ddx19f[_0xaf82[926]]= _0xaf82[937];_0xf2ddx19f[_0xaf82[470]]= _0xaf82[1163];$(_0xaf82[280])[_0xaf82[279]](_0xf2ddx19f)}function bluebtns(){var _0xf2ddx1c8=$(_0xaf82[1164])[_0xaf82[59]]();$(_0xaf82[1166])[_0xaf82[665]](function(){$(_0xaf82[1166])[_0xaf82[73]](_0xaf82[397],_0xf2ddx1c8)})[_0xaf82[663]](function(){$(_0xaf82[1166])[_0xaf82[73]](_0xaf82[397],_0xaf82[1165])});$(_0xaf82[1167])[_0xaf82[665]](function(){$(_0xaf82[1167])[_0xaf82[73]](_0xaf82[397],_0xf2ddx1c8)})[_0xaf82[663]](function(){$(_0xaf82[1167])[_0xaf82[73]](_0xaf82[397],_0xaf82[1165])});$(_0xaf82[1168])[_0xaf82[665]](function(){$(_0xaf82[1168])[_0xaf82[73]](_0xaf82[397],_0xf2ddx1c8)})[_0xaf82[663]](function(){$(_0xaf82[1168])[_0xaf82[73]](_0xaf82[397],_0xaf82[1165])});$(_0xaf82[1122])[_0xaf82[665]](function(){$(_0xaf82[1122])[_0xaf82[73]](_0xaf82[397],_0xf2ddx1c8)})[_0xaf82[663]](function(){$(_0xaf82[1122])[_0xaf82[73]](_0xaf82[397],_0xaf82[1165])});$(_0xaf82[1123])[_0xaf82[665]](function(){$(_0xaf82[1123])[_0xaf82[73]](_0xaf82[397],_0xf2ddx1c8)})[_0xaf82[663]](function(){$(_0xaf82[1123])[_0xaf82[73]](_0xaf82[397],_0xaf82[1165])});$(_0xaf82[1124])[_0xaf82[665]](function(){$(_0xaf82[1124])[_0xaf82[73]](_0xaf82[397],_0xf2ddx1c8)})[_0xaf82[663]](function(){$(_0xaf82[1124])[_0xaf82[73]](_0xaf82[397],_0xaf82[1165])});$(_0xaf82[1125])[_0xaf82[665]](function(){$(_0xaf82[1125])[_0xaf82[73]](_0xaf82[397],_0xf2ddx1c8)})[_0xaf82[663]](function(){$(_0xaf82[1125])[_0xaf82[73]](_0xaf82[397],_0xaf82[1165])});$(_0xaf82[1169])[_0xaf82[665]](function(){$(_0xaf82[1169])[_0xaf82[73]](_0xaf82[397],_0xf2ddx1c8)})[_0xaf82[663]](function(){$(_0xaf82[1169])[_0xaf82[73]](_0xaf82[397],_0xaf82[1165])});$(_0xaf82[1170])[_0xaf82[665]](function(){$(_0xaf82[1170])[_0xaf82[73]](_0xaf82[397],_0xf2ddx1c8)})[_0xaf82[663]](function(){$(_0xaf82[1170])[_0xaf82[73]](_0xaf82[397],_0xaf82[1165])});$(_0xaf82[1171])[_0xaf82[665]](function(){$(_0xaf82[1171])[_0xaf82[73]](_0xaf82[397],_0xf2ddx1c8)})[_0xaf82[663]](function(){$(_0xaf82[1171])[_0xaf82[73]](_0xaf82[397],_0xaf82[1165])});$(_0xaf82[1172])[_0xaf82[665]](function(){$(_0xaf82[1172])[_0xaf82[73]](_0xaf82[397],_0xf2ddx1c8)})[_0xaf82[663]](function(){$(_0xaf82[1172])[_0xaf82[73]](_0xaf82[397],_0xaf82[1165])});$(_0xaf82[1173])[_0xaf82[665]](function(){$(_0xaf82[1173])[_0xaf82[73]](_0xaf82[397],_0xf2ddx1c8)})[_0xaf82[663]](function(){$(_0xaf82[1173])[_0xaf82[73]](_0xaf82[397],_0xaf82[1165])});$(_0xaf82[1174])[_0xaf82[665]](function(){$(_0xaf82[1174])[_0xaf82[73]](_0xaf82[397],_0xf2ddx1c8)})[_0xaf82[663]](function(){$(_0xaf82[1174])[_0xaf82[73]](_0xaf82[397],_0xaf82[1165])});$(_0xaf82[544])[_0xaf82[665]](function(){$(_0xaf82[544])[_0xaf82[73]](_0xaf82[397],_0xf2ddx1c8)})[_0xaf82[663]](function(){$(_0xaf82[544])[_0xaf82[73]](_0xaf82[397],_0xaf82[1165])});$(_0xaf82[1175])[_0xaf82[665]](function(){$(_0xaf82[1175])[_0xaf82[73]](_0xaf82[397],_0xf2ddx1c8)})[_0xaf82[663]](function(){$(_0xaf82[1175])[_0xaf82[73]](_0xaf82[397],_0xaf82[1165])});$(_0xaf82[1176])[_0xaf82[665]](function(){$(_0xaf82[1176])[_0xaf82[73]](_0xaf82[397],_0xf2ddx1c8)})[_0xaf82[663]](function(){$(_0xaf82[1176])[_0xaf82[73]](_0xaf82[397],_0xaf82[1165])});$(_0xaf82[1177])[_0xaf82[665]](function(){$(_0xaf82[1177])[_0xaf82[73]](_0xaf82[397],_0xf2ddx1c8)})[_0xaf82[663]](function(){$(_0xaf82[1177])[_0xaf82[73]](_0xaf82[397],_0xaf82[1165])});$(_0xaf82[1178])[_0xaf82[665]](function(){$(_0xaf82[1178])[_0xaf82[73]](_0xaf82[397],_0xf2ddx1c8)})[_0xaf82[663]](function(){$(_0xaf82[1178])[_0xaf82[73]](_0xaf82[397],_0xaf82[1165])});$(_0xaf82[1179])[_0xaf82[665]](function(){$(_0xaf82[1179])[_0xaf82[73]](_0xaf82[397],_0xf2ddx1c8)})[_0xaf82[663]](function(){$(_0xaf82[1179])[_0xaf82[73]](_0xaf82[397],_0xaf82[1165])});$(_0xaf82[1180])[_0xaf82[665]](function(){$(_0xaf82[1180])[_0xaf82[73]](_0xaf82[397],_0xf2ddx1c8)})[_0xaf82[663]](function(){$(_0xaf82[1180])[_0xaf82[73]](_0xaf82[397],_0xaf82[1165])});$(_0xaf82[1181])[_0xaf82[665]](function(){$(_0xaf82[1181])[_0xaf82[73]](_0xaf82[397],_0xf2ddx1c8)})[_0xaf82[663]](function(){$(_0xaf82[1181])[_0xaf82[73]](_0xaf82[397],_0xaf82[1165])});$(_0xaf82[1182])[_0xaf82[665]](function(){$(_0xaf82[1182])[_0xaf82[73]](_0xaf82[397],_0xf2ddx1c8)})[_0xaf82[663]](function(){$(_0xaf82[1182])[_0xaf82[73]](_0xaf82[397],_0xaf82[1165])});$(_0xaf82[987])[_0xaf82[665]](function(){$(_0xaf82[987])[_0xaf82[73]](_0xaf82[397],_0xf2ddx1c8)})[_0xaf82[663]](function(){$(_0xaf82[987])[_0xaf82[73]](_0xaf82[397],_0xaf82[1165])});$(_0xaf82[989])[_0xaf82[665]](function(){$(_0xaf82[989])[_0xaf82[73]](_0xaf82[397],_0xf2ddx1c8)})[_0xaf82[663]](function(){$(_0xaf82[989])[_0xaf82[73]](_0xaf82[397],_0xaf82[1165])});$(_0xaf82[991])[_0xaf82[665]](function(){$(_0xaf82[991])[_0xaf82[73]](_0xaf82[397],_0xf2ddx1c8)})[_0xaf82[663]](function(){$(_0xaf82[991])[_0xaf82[73]](_0xaf82[397],_0xaf82[1165])});$(_0xaf82[993])[_0xaf82[665]](function(){$(_0xaf82[993])[_0xaf82[73]](_0xaf82[397],_0xf2ddx1c8)})[_0xaf82[663]](function(){$(_0xaf82[993])[_0xaf82[73]](_0xaf82[397],_0xaf82[1165])});$(_0xaf82[995])[_0xaf82[665]](function(){$(_0xaf82[995])[_0xaf82[73]](_0xaf82[397],_0xf2ddx1c8)})[_0xaf82[663]](function(){$(_0xaf82[995])[_0xaf82[73]](_0xaf82[397],_0xaf82[1165])});$(_0xaf82[997])[_0xaf82[665]](function(){$(_0xaf82[997])[_0xaf82[73]](_0xaf82[397],_0xf2ddx1c8)})[_0xaf82[663]](function(){$(_0xaf82[997])[_0xaf82[73]](_0xaf82[397],_0xaf82[1165])});$(_0xaf82[1001])[_0xaf82[665]](function(){$(_0xaf82[1001])[_0xaf82[73]](_0xaf82[397],_0xf2ddx1c8)})[_0xaf82[663]](function(){$(_0xaf82[1001])[_0xaf82[73]](_0xaf82[397],_0xaf82[1165])});$(_0xaf82[1003])[_0xaf82[665]](function(){$(_0xaf82[1003])[_0xaf82[73]](_0xaf82[397],_0xf2ddx1c8)})[_0xaf82[663]](function(){$(_0xaf82[1003])[_0xaf82[73]](_0xaf82[397],_0xaf82[1165])});$(_0xaf82[1005])[_0xaf82[665]](function(){$(_0xaf82[1005])[_0xaf82[73]](_0xaf82[397],_0xf2ddx1c8)})[_0xaf82[663]](function(){$(_0xaf82[1005])[_0xaf82[73]](_0xaf82[397],_0xaf82[1165])});$(_0xaf82[1007])[_0xaf82[665]](function(){$(_0xaf82[1007])[_0xaf82[73]](_0xaf82[397],_0xf2ddx1c8)})[_0xaf82[663]](function(){$(_0xaf82[1007])[_0xaf82[73]](_0xaf82[397],_0xaf82[1165])});$(_0xaf82[1009])[_0xaf82[665]](function(){$(_0xaf82[1009])[_0xaf82[73]](_0xaf82[397],_0xf2ddx1c8)})[_0xaf82[663]](function(){$(_0xaf82[1009])[_0xaf82[73]](_0xaf82[397],_0xaf82[1165])});$(_0xaf82[1011])[_0xaf82[665]](function(){$(_0xaf82[1011])[_0xaf82[73]](_0xaf82[397],_0xf2ddx1c8)})[_0xaf82[663]](function(){$(_0xaf82[1011])[_0xaf82[73]](_0xaf82[397],_0xaf82[1165])});$(_0xaf82[1183])[_0xaf82[665]](function(){$(_0xaf82[1183])[_0xaf82[73]](_0xaf82[397],_0xf2ddx1c8)})[_0xaf82[663]](function(){$(_0xaf82[1183])[_0xaf82[73]](_0xaf82[397],_0xaf82[1165])})}function YoutubebackgroundEnable(){inject(_0xaf82[1047],_0xaf82[1184]+ _0xaf82[1185]+ _0xaf82[1186]+ _0xaf82[1187]+ _0xaf82[1188]+ _0xaf82[1189]+ _0xaf82[1190]);$(_0xaf82[280])[_0xaf82[279]](_0xaf82[1191]+ getParameterByName(_0xaf82[160],$(_0xaf82[469])[_0xaf82[59]]())+ _0xaf82[1192]+ getParameterByName(_0xaf82[161],$(_0xaf82[469])[_0xaf82[59]]())+ _0xaf82[1193])}function YoutubebackgroundDisable(){$(_0xaf82[1194])[_0xaf82[176]]()}function settrolling(){playSound(_0xaf82[1195]);$(_0xaf82[1091])[_0xaf82[73]](_0xaf82[518],_0xaf82[1196])[_0xaf82[73]]({opacity:0.8});$(_0xaf82[1088])[_0xaf82[73]](_0xaf82[518],_0xaf82[1197])[_0xaf82[73]]({opacity:1});$(_0xaf82[1090])[_0xaf82[73]](_0xaf82[518],_0xaf82[1198])[_0xaf82[73]]({opacity:0.8});setTimeout(function(){$(_0xaf82[1091])[_0xaf82[73]](_0xaf82[518],_0xaf82[1199])[_0xaf82[73]]({opacity:0.8})},4000);setTimeout(function(){$(_0xaf82[1091])[_0xaf82[73]](_0xaf82[518],_0xaf82[521])[_0xaf82[73]]({opacity:1});$(_0xaf82[1090])[_0xaf82[73]](_0xaf82[518],_0xaf82[1086]+ leadbimg+ _0xaf82[1087])[_0xaf82[73]]({opacity:0.8})},8000);setTimeout(function(){$(_0xaf82[1088])[_0xaf82[73]](_0xaf82[518],_0xaf82[1086]+ minimapbckimg+ _0xaf82[1087])[_0xaf82[73]]({opacity:0.8})},27000)}function preventcanvasimagecrash(){CanvasRenderingContext2D[_0xaf82[125]][_0xaf82[1200]]= CanvasRenderingContext2D[_0xaf82[125]][_0xaf82[1201]];CanvasRenderingContext2D[_0xaf82[125]][_0xaf82[1201]]= function(){const _0xf2ddx1cd=arguments[0];if(!_0xf2ddx1cd|| _0xf2ddx1cd[_0xaf82[71]]< 1 || _0xf2ddx1cd[_0xaf82[715]]< 1){return void(console[_0xaf82[283]](_0xaf82[1202]))};this._drawImage(...arguments)}}function joint(_0xf2ddx8e){var _0xf2ddx91;return _0xf2ddx91= _0xf2ddx8e[_0xf2ddx8e[_0xaf82[140]]- 1],_0xf2ddx8e[_0xaf82[475]](),_0xf2ddx8e= _0xf2ddx8e[_0xaf82[140]]> 1?joint(_0xf2ddx8e):_0xf2ddx8e[0],function(){_0xf2ddx91[_0xaf82[129]]( new _0xf2ddx8e)}}function emphasischat(){var _0xf2ddx114=window;var _0xf2ddx115={"\x6E\x61\x6D\x65":_0xaf82[1203],"\x6C\x6F\x67":function(_0xf2ddx116){console[_0xaf82[283]](this[_0xaf82[601]]+ _0xaf82[239]+ _0xf2ddx116)}};var _0xf2ddx117={};var _0xf2ddx118={},_0xf2ddx119={"\x65\x6D\x70\x68\x61\x73\x69\x73\x5F\x62\x67\x63\x6F\x6C\x6F\x72":_0xaf82[1204],"\x65\x6D\x70\x68\x61\x73\x69\x73\x5F\x74\x69\x6D\x65":5000,"\x68\x69\x73\x74\x68\x69\x64\x65\x5F\x74\x69\x6D\x65":10000,"\x73\x63\x72\x6F\x6C\x6C\x5F\x64\x75\x6C\x61\x74\x69\x6F\x6E":200};function _0xf2ddx11a(){if(!document[_0xaf82[407]](_0xaf82[622])){_0xf2ddx115[_0xaf82[623]]= (_0xf2ddx115[_0xaf82[623]]|| 1000)+ 1000;setTimeout(_0xf2ddx11a,_0xf2ddx115[_0xaf82[623]]);_0xf2ddx115[_0xaf82[283]](_0xaf82[1205]);return};setTimeout(_0xf2ddx11b,1000)}_0xf2ddx11a();function _0xf2ddx11b(){_0xf2ddx118= _0xf2ddx119;_0xf2ddx114[_0xf2ddx115[_0xaf82[601]]]= {my:_0xf2ddx115,stat:_0xf2ddx117,cfg:_0xf2ddx118};_0xf2ddx117[_0xaf82[1206]]= new MutationObserver((_0xf2ddx1d0)=>{_0xf2ddx1d0[_0xaf82[832]]((_0xf2ddx1d1)=>{_0xf2ddx115[_0xaf82[1208]](_0xf2ddx1d1[_0xaf82[1207]])})});_0xf2ddx117[_0xaf82[1206]][_0xaf82[1210]]($(_0xaf82[597])[_0xaf82[1209]](0),{"\x63\x68\x69\x6C\x64\x4C\x69\x73\x74":true});_0xf2ddx117[_0xaf82[1211]]= new MutationObserver((_0xf2ddx1d0)=>{_0xf2ddx1d0[_0xaf82[832]]((_0xf2ddx1d1)=>{if(_0xf2ddx1d1[_0xaf82[1212]]!== _0xaf82[1045]){return};var _0xf2ddx1d2=_0xf2ddx1d1[_0xaf82[1213]][_0xaf82[1045]][_0xaf82[523]];if(_0xf2ddx1d2=== _0xaf82[732]){_0xf2ddx115[_0xaf82[1214]]()}else {if(_0xf2ddx1d2=== _0xaf82[525]){_0xf2ddx115[_0xaf82[1215]]()}}})});_0xf2ddx117[_0xaf82[1211]][_0xaf82[1210]]($(_0xaf82[524])[_0xaf82[1209]](0),{"\x61\x74\x74\x72\x69\x62\x75\x74\x65\x73":true})}_0xf2ddx115[_0xaf82[1208]]= function(_0xf2ddx1d3){_0xf2ddx115[_0xaf82[1216]](true);_0xf2ddx1d3[_0xaf82[832]]((_0xf2ddx1d4)=>{var _0xf2ddx1d5=$(_0xf2ddx1d4);if(_0xf2ddx1d5[_0xaf82[721]](_0xaf82[835])){var _0xf2ddx1d6=_0xf2ddx1d5[_0xaf82[73]](_0xaf82[397]);_0xf2ddx1d5[_0xaf82[73]](_0xaf82[397],_0xf2ddx118[_0xaf82[1217]]);setTimeout(function(){_0xf2ddx1d5[_0xaf82[73]](_0xaf82[397],_0xf2ddx1d6)},_0xf2ddx118[_0xaf82[1218]])}});var _0xf2ddx1d7=$(_0xaf82[597]);_0xf2ddx1d7[_0xaf82[863]](_0xaf82[706]);_0xf2ddx1d7[_0xaf82[865]]({"\x73\x63\x72\x6F\x6C\x6C\x54\x6F\x70":_0xf2ddx1d7[_0xaf82[257]](_0xaf82[864])},_0xf2ddx118[_0xaf82[1219]])};_0xf2ddx115[_0xaf82[1216]]= function(_0xf2ddx1d8){if(_0xf2ddx117[_0xaf82[1220]]){clearTimeout(_0xf2ddx117[_0xaf82[1220]]);_0xf2ddx117[_0xaf82[1220]]= null};var _0xf2ddx1d2=$(_0xaf82[597])[_0xaf82[73]](_0xaf82[523]);if(_0xf2ddx1d2=== _0xaf82[525]){_0xf2ddx117[_0xaf82[1221]]= true};if(_0xf2ddx117[_0xaf82[1221]]&& _0xf2ddx1d8){_0xf2ddx117[_0xaf82[1220]]= setTimeout(function(){_0xf2ddx117[_0xaf82[1221]]= false},_0xf2ddx118[_0xaf82[1222]])}};_0xf2ddx115[_0xaf82[1214]]= function(){_0xf2ddx115[_0xaf82[1216]](false)};_0xf2ddx115[_0xaf82[1215]]= function(){}}function IdfromLegendmod(){if(document[_0xaf82[56]][_0xaf82[55]](_0xaf82[54])&& $(_0xaf82[1223])[_0xaf82[59]]()!= _0xaf82[6]){window[_0xaf82[112]]= $(_0xaf82[1223])[_0xaf82[59]]();localStorage[_0xaf82[117]](_0xaf82[112],window[_0xaf82[112]])}}function SNEZOgarUpload(){IdfromLegendmod();if(userid== _0xaf82[6]|| userid== null){toastr[_0xaf82[184]](_0xaf82[199]+ Premadeletter123+ _0xaf82[200]+ Premadeletter128)}else {postSNEZ(_0xaf82[1224],userid,_0xaf82[1225],escape($(_0xaf82[394])[_0xaf82[59]]()));toastr[_0xaf82[184]](_0xaf82[199]+ Premadeletter123+ _0xaf82[200]+ Premadeletter129+ _0xaf82[905]+ Languageletter363+ _0xaf82[1226]+ userid+ _0xaf82[1227])}}function SNEZOgarDownload(){IdfromLegendmod();if(userid== _0xaf82[6]|| userid== null){toastr[_0xaf82[184]](_0xaf82[199]+ Premadeletter123+ _0xaf82[200]+ Premadeletter128)}else {getSNEZ(_0xaf82[1224],userid,_0xaf82[1225]);var _0xf2ddx1dc=xhttp[_0xaf82[1228]];$(_0xaf82[403])[_0xaf82[59]](unescape(_0xf2ddx1dc));$(_0xaf82[413])[_0xaf82[208]]()}}function SNEZServers(){var _0xf2ddx1de=function(_0xf2ddx8d,_0xf2ddx1df){var _0xf2ddx1e0=setInterval(function(){var _0xf2ddx1e1=[_0xaf82[372],_0xaf82[1229],_0xaf82[1230],_0xaf82[1231]];var _0xf2ddx1e2=true;_0xf2ddx1e1[_0xaf82[832]](function(_0xf2ddx1e3){if(!document[_0xaf82[407]](_0xf2ddx1e3)){_0xf2ddx1e2= false}});if(_0xf2ddx1e2){clearInterval(_0xf2ddx1e0);_0xf2ddx8d(_0xf2ddx1df)}},100)};window[_0xaf82[109]]= localStorage[_0xaf82[3]](_0xaf82[109]);window[_0xaf82[110]]= localStorage[_0xaf82[3]](_0xaf82[110]);var _0xf2ddx1e4={nickname:null,server:null,tag:null,AID:null,hidecountry:false,userfirstname:null,userlastname:null,agarioUID:null};var _0xf2ddx1e1={nickname:_0xaf82[372],server:_0xaf82[1229],tag:_0xaf82[1230],reconnectButton:_0xaf82[1231]};var _0xf2ddx1e5={server:_0xaf82[1232],client:null,connect:function(){_0xf2ddx1e5[_0xaf82[1233]]= new WebSocket(_0xf2ddx1e5[_0xaf82[1234]]);_0xf2ddx1e5[_0xaf82[1233]][_0xaf82[1235]]= _0xf2ddx1e5[_0xaf82[1236]];_0xf2ddx1e5[_0xaf82[1233]][_0xaf82[1237]]= _0xf2ddx1e5[_0xaf82[1238]];_0xf2ddx1e5[_0xaf82[1233]][_0xaf82[1239]]= _0xf2ddx1e5[_0xaf82[1240]]},reconnect:function(){console[_0xaf82[283]](_0xaf82[1241]);setTimeout(function(){_0xf2ddx1e5[_0xaf82[704]]()},5000)},updateServerDetails:function(){_0xf2ddx1e5[_0xaf82[123]]({id:_0xf2ddx1eb(),type:_0xaf82[1242],data:_0xf2ddx1e4})},updateDetails:function(){var _0xf2ddxe6=document[_0xaf82[407]](_0xf2ddx1e1[_0xaf82[1243]]);var _0xf2ddx1e6;if(realmode!= null&& region!= null){_0xf2ddx1e6= _0xaf82[212]+ $(_0xaf82[213])[_0xaf82[59]]()+ _0xaf82[214]+ _0xaf82[218]+ $(_0xaf82[60])[_0xaf82[59]]()+ _0xaf82[219]+ realmode}else {_0xf2ddx1e6= _0xaf82[212]+ $(_0xaf82[213])[_0xaf82[59]]()+ _0xaf82[214]};var _0xf2ddx1e7=document[_0xaf82[407]](_0xf2ddx1e1[_0xaf82[489]]);if(_0xf2ddx1e4[_0xaf82[1243]]!= _0xf2ddxe6[_0xaf82[405]]|| _0xf2ddx1e4[_0xaf82[1234]]!= _0xf2ddx1e6|| _0xf2ddx1e4[_0xaf82[489]]!= _0xf2ddx1e7[_0xaf82[405]]){_0xf2ddx1e4[_0xaf82[1243]]= _0xf2ddxe6[_0xaf82[405]];_0xf2ddx1e4[_0xaf82[1234]]= _0xf2ddx1e6;_0xf2ddx1e4[_0xaf82[489]]= _0xf2ddx1e7[_0xaf82[405]];_0xf2ddx1e4[_0xaf82[1244]]= window[_0xaf82[1245]];_0xf2ddx1e4[_0xaf82[1246]]= defaultmapsettings[_0xaf82[1246]];_0xf2ddx1e4[_0xaf82[109]]= window[_0xaf82[109]];_0xf2ddx1e4[_0xaf82[110]]= window[_0xaf82[110]];_0xf2ddx1e4[_0xaf82[186]]= window[_0xaf82[186]];_0xf2ddx1e4[_0xaf82[1247]]= window[_0xaf82[1247]];_0xf2ddx1e5[_0xaf82[1236]]()}},send:function(_0xf2ddx116){if(_0xf2ddx1e5[_0xaf82[1233]][_0xaf82[1248]]!== _0xf2ddx1e5[_0xaf82[1233]][_0xaf82[1249]]){return};_0xf2ddx1e5[_0xaf82[1233]][_0xaf82[123]](JSON[_0xaf82[415]](_0xf2ddx116))},onMessage:function(_0xf2ddx158){try{var _0xf2ddx87=JSON[_0xaf82[107]](_0xf2ddx158[_0xaf82[1250]]);switch(_0xf2ddx87[_0xaf82[926]]){case _0xaf82[1252]:_0xf2ddx1e5[_0xaf82[123]]({type:_0xaf82[1251]});break}}catch(e){console[_0xaf82[283]](e)}}};var _0xf2ddx1e8=function(){var _0xf2ddxe6=document[_0xaf82[407]](_0xf2ddx1e1[_0xaf82[1243]]);var _0xf2ddx84=document[_0xaf82[407]](_0xf2ddx1e1[_0xaf82[1234]]);var _0xf2ddx1e7=document[_0xaf82[407]](_0xf2ddx1e1[_0xaf82[489]]);var _0xf2ddx1e9=document[_0xaf82[407]](_0xf2ddx1e1[_0xaf82[1253]]);if(!_0xf2ddxe6){console[_0xaf82[283]](_0xaf82[1254]);return};_0xf2ddxe6[_0xaf82[1072]](_0xaf82[57],_0xf2ddx1e5[_0xaf82[1255]]);_0xf2ddx84[_0xaf82[1072]](_0xaf82[57],_0xf2ddx1e5[_0xaf82[1255]]);_0xf2ddx1e7[_0xaf82[1072]](_0xaf82[57],_0xf2ddx1e5[_0xaf82[1255]]);var _0xf2ddx1ea=null;_0xf2ddx1e9[_0xaf82[1072]](_0xaf82[208],function(_0xf2ddx12d){clearTimeout(_0xf2ddx1ea);_0xf2ddx1ea= setTimeout(_0xf2ddx1e5[_0xaf82[1255]],5000)});_0xf2ddx1e5[_0xaf82[704]]();setInterval(_0xf2ddx1e5[_0xaf82[1255]],5000)};function _0xf2ddx1eb(){return _0xf2ddx1ec(_0xaf82[1256])}function _0xf2ddx1ec(_0xf2ddx1ed){var _0xf2ddx8b=_0xf2ddx1ed+ _0xaf82[805];var _0xf2ddx1ee=decodeURIComponent(document[_0xaf82[233]]);var _0xf2ddx1ef=_0xf2ddx1ee[_0xaf82[190]](_0xaf82[1257]);for(var _0xf2ddxd8=0;_0xf2ddxd8< _0xf2ddx1ef[_0xaf82[140]];_0xf2ddxd8++){var _0xf2ddx8f=_0xf2ddx1ef[_0xf2ddxd8];while(_0xf2ddx8f[_0xaf82[1258]](0)== _0xaf82[481]){_0xf2ddx8f= _0xf2ddx8f[_0xaf82[956]](1)};if(_0xf2ddx8f[_0xaf82[179]](_0xf2ddx8b)== 0){return _0xf2ddx8f[_0xaf82[956]](_0xf2ddx8b[_0xaf82[140]],_0xf2ddx8f[_0xaf82[140]])}};return _0xaf82[6]}_0xf2ddx1de(_0xf2ddx1e8,null)}function getSNEZServers(_0xf2ddx1f1){client2= {server:_0xaf82[1232],ws:null,isOpen:false,onOpenCallback:null,onCloseCallback:null,onMessageCallback:null,connect:function(){client2[_0xaf82[701]]= new WebSocket(client2[_0xaf82[1234]]);client2[_0xaf82[701]][_0xaf82[1235]]= client2[_0xaf82[1259]];client2[_0xaf82[701]][_0xaf82[1237]]= client2[_0xaf82[1260]];client2[_0xaf82[701]][_0xaf82[1239]]= client2[_0xaf82[1240]]},disconnect:function(){client2[_0xaf82[701]][_0xaf82[1261]]()},onOpen:function(){},onClose:function(){},onMessage:function(_0xf2ddx1f2){if(client2[_0xaf82[1262]](_0xf2ddx1f2)){return};try{var _0xf2ddx87=JSON[_0xaf82[107]](_0xf2ddx1f2[_0xaf82[1250]]);if(client2[_0xaf82[1262]](_0xf2ddx87)|| client2[_0xaf82[1262]](_0xf2ddx87[_0xaf82[926]])){return}}catch(e){console[_0xaf82[283]](e);return};switch(_0xf2ddx87[_0xaf82[926]]){case _0xaf82[1252]:client2[_0xaf82[123]]({type:_0xaf82[1251]});break;case _0xaf82[1264]:client2[_0xaf82[1263]](_0xf2ddx87[_0xaf82[1250]]);break}},isEmpty:function(_0xf2ddx1f3){if( typeof _0xf2ddx1f3== _0xaf82[938]){return true};if(_0xf2ddx1f3[_0xaf82[140]]=== 0){return true};for(var _0xf2ddx12c in _0xf2ddx1f3){if(_0xf2ddx1f3[_0xaf82[932]](_0xf2ddx12c)){return false}};return true},updatePlayers:function(_0xf2ddx87){var _0xf2ddx1f4=0;var _0xf2ddx1f5=0;showonceusers3= 0;var _0xf2ddx1f6=0;_0xf2ddx87= JSON[_0xaf82[107]](_0xf2ddx87);for(var _0xf2ddx1f7=0;_0xf2ddx1f7< _0xf2ddx87[_0xaf82[140]];_0xf2ddx1f7++){if(_0xf2ddx87[_0xf2ddx1f7][_0xaf82[1243]]){if(_0xf2ddx87[_0xf2ddx1f7][_0xaf82[1243]][_0xaf82[179]]($(_0xaf82[969])[_0xaf82[59]]())>= 0){if(_0xf2ddx1f4== 0){_0xf2ddx1f4++;if(_0xf2ddx1f1== null){toastr[_0xaf82[157]](_0xaf82[1265])}};var _0xf2ddx1f8=JSON[_0xaf82[415]](_0xf2ddx87[_0xf2ddx1f7]);var _0xf2ddx1f9;var _0xf2ddx1fa;var _0xf2ddx1fb=getParameterByName(_0xaf82[89],_0xf2ddx1f8);var _0xf2ddx1fc=getParameterByName(_0xaf82[90],_0xf2ddx1f8);_0xf2ddx1f8= _0xf2ddx1f8[_0xaf82[956]](0,_0xf2ddx1f8[_0xaf82[179]](_0xaf82[214]));_0xf2ddx1f9= _0xf2ddx1f8[_0xaf82[190]](_0xaf82[212])[_0xaf82[475]]();_0xf2ddx1fa= _0xf2ddx1f8[_0xaf82[190]](_0xaf82[1266])[_0xaf82[475]]();_0xf2ddx1fa= _0xf2ddx1fa[_0xaf82[956]](_0xf2ddx1fa,_0xf2ddx1fa[_0xaf82[179]](_0xaf82[1267]));if(_0xf2ddx87[_0xf2ddx1f7][_0xaf82[1246]]== true&& _0xf2ddx87[_0xf2ddx1f7][_0xaf82[1268]]){_0xf2ddx87[_0xf2ddx1f7][_0xaf82[1268]][_0xaf82[1270]][_0xaf82[1269]]= _0xaf82[1271]};if(_0xf2ddx1fc&& _0xf2ddx87[_0xf2ddx1f7][_0xaf82[1268]]&& _0xf2ddx87[_0xf2ddx1f7][_0xaf82[1268]][_0xaf82[1270]]){_0xf2ddx1fc= _0xf2ddx1fc[_0xaf82[190]](_0xaf82[1274])[0][_0xaf82[190]](_0xaf82[1273])[0][_0xaf82[190]](_0xaf82[1272])[0];appendLog3(_0xaf82[1275]+ _0xf2ddx1fb+ _0xaf82[1276]+ _0xf2ddx1fc+ _0xaf82[1277]+ _0xf2ddx1fa[_0xaf82[158]]()+ _0xaf82[1278]+ _0xf2ddx87[_0xf2ddx1f7][_0xaf82[1268]][_0xaf82[1270]][_0xaf82[1269]][_0xaf82[804]]()+ _0xaf82[1279]+ _0xaf82[1280]+ _0xf2ddx1f9+ _0xaf82[1281],_0xf2ddx1f9,_0xf2ddx1fb,_0xf2ddx1fc)}else {if(_0xf2ddx87[_0xf2ddx1f7][_0xaf82[1268]]&& _0xf2ddx87[_0xf2ddx1f7][_0xaf82[1268]][_0xaf82[1270]]){appendLog2(_0xaf82[1282]+ _0xf2ddx1fa[_0xaf82[158]]()+ _0xaf82[1278]+ _0xf2ddx87[_0xf2ddx1f7][_0xaf82[1268]][_0xaf82[1270]][_0xaf82[1269]][_0xaf82[804]]()+ _0xaf82[1279]+ _0xaf82[1280]+ _0xf2ddx1f9+ _0xaf82[1281],_0xf2ddx1f9)}};showonceusers3++;showonceusers3returner(showonceusers3)}else {if(_0xf2ddx87[_0xf2ddx1f7][_0xaf82[1234]][_0xaf82[179]]($(_0xaf82[969])[_0xaf82[59]]())>= 0){if($(_0xaf82[969])[_0xaf82[59]]()[_0xaf82[140]]>= 4){if(_0xf2ddx1f5== 0){_0xf2ddx1f5++;if(_0xf2ddx1f1== null){toastr[_0xaf82[157]](_0xaf82[1283])}};var _0xf2ddx1f8=JSON[_0xaf82[415]](_0xf2ddx87[_0xf2ddx1f7]);var _0xf2ddx1f9;var _0xf2ddx1fa;var _0xf2ddx1fb=getParameterByName(_0xaf82[89],_0xf2ddx1f8);var _0xf2ddx1fc=getParameterByName(_0xaf82[90],_0xf2ddx1f8);_0xf2ddx1f8= _0xf2ddx1f8[_0xaf82[956]](0,_0xf2ddx1f8[_0xaf82[179]](_0xaf82[214]));_0xf2ddx1f9= _0xf2ddx1f8[_0xaf82[190]](_0xaf82[212])[_0xaf82[475]]();_0xf2ddx1fa= _0xf2ddx1f8[_0xaf82[190]](_0xaf82[1266])[_0xaf82[475]]();_0xf2ddx1fa= _0xf2ddx1fa[_0xaf82[956]](_0xf2ddx1fa,_0xf2ddx1fa[_0xaf82[179]](_0xaf82[1267]));if(_0xf2ddx87[_0xf2ddx1f7][_0xaf82[1246]]== true){_0xf2ddx87[_0xf2ddx1f7][_0xaf82[1268]][_0xaf82[1270]][_0xaf82[1269]]= _0xaf82[1271]};if(_0xf2ddx1fc&& _0xf2ddx87[_0xf2ddx1f7][_0xaf82[1268]]&& _0xf2ddx87[_0xf2ddx1f7][_0xaf82[1268]][_0xaf82[1270]]){_0xf2ddx1fc= _0xf2ddx1fc[_0xaf82[190]](_0xaf82[1274])[0][_0xaf82[190]](_0xaf82[1273])[0][_0xaf82[190]](_0xaf82[1272])[0];appendLog3(_0xaf82[1275]+ _0xf2ddx1fb+ _0xaf82[1276]+ _0xf2ddx1fc+ _0xaf82[1284]+ _0xf2ddx1fa[_0xaf82[158]]()+ _0xaf82[1285]+ _0xf2ddx87[_0xf2ddx1f7][_0xaf82[1268]][_0xaf82[1270]][_0xaf82[1269]][_0xaf82[804]]()+ _0xaf82[1286]+ _0xf2ddx1f9+ _0xaf82[1287],_0xf2ddx1f9,_0xf2ddx1fb,_0xf2ddx1fc)}else {if(_0xf2ddx87[_0xf2ddx1f7][_0xaf82[1268]]&& _0xf2ddx87[_0xf2ddx1f7][_0xaf82[1268]][_0xaf82[1270]]){appendLog2(_0xaf82[1288]+ _0xf2ddx1fa[_0xaf82[158]]()+ _0xaf82[1285]+ _0xf2ddx87[_0xf2ddx1f7][_0xaf82[1268]][_0xaf82[1270]][_0xaf82[1269]][_0xaf82[804]]()+ _0xaf82[1286]+ _0xf2ddx1f9+ _0xaf82[1287],_0xf2ddx1f9)}};showonceusers3++;showonceusers3returner(showonceusers3)}}}}};client2[_0xaf82[701]][_0xaf82[1261]]();if(showonceusers3== 0){_0xf2ddx1f6++;if(_0xf2ddx1f6== 1){if(_0xf2ddx1f1== null){toastr[_0xaf82[184]](_0xaf82[1289]+ $(_0xaf82[60])[_0xaf82[59]]()+ _0xaf82[1290]+ $(_0xaf82[69])[_0xaf82[59]]()+ _0xaf82[1291]+ _0xaf82[1292]+ Premadeletter24+ _0xaf82[1293]+ Premadeletter25+ _0xaf82[172],_0xaf82[6],{timeOut:20000,extendedTimeOut:20000})[_0xaf82[73]](_0xaf82[71],_0xaf82[182])};$(_0xaf82[1294])[_0xaf82[208]](function(){$(_0xaf82[248])[_0xaf82[247]](_0xaf82[244])[_0xaf82[245]](_0xaf82[246]);var _0xf2ddxc8=$(_0xaf82[969])[_0xaf82[59]]();searchHandler(_0xf2ddxc8)})}};return client2},send:function(_0xf2ddx87){client2[_0xaf82[701]][_0xaf82[123]](JSON[_0xaf82[415]](_0xf2ddx87))}}}function showonceusers3returner(showonceusers3){return showonceusers3}function init(modVersion){if(!document[_0xaf82[407]](_0xaf82[1295])){setTimeout(init(modVersion),200);console[_0xaf82[283]](_0xaf82[1296]);return};return startLM(modVersion)}function initializeLM(modVersion){PremiumUsersFFAScore();$(_0xaf82[1302])[_0xaf82[281]](_0xaf82[1301])[_0xaf82[206]](_0xaf82[1299],_0xaf82[1300])[_0xaf82[257]](_0xaf82[1297],_0xaf82[1298]);$(_0xaf82[1305])[_0xaf82[281]](_0xaf82[1304])[_0xaf82[206]](_0xaf82[1299],_0xaf82[1300])[_0xaf82[257]](_0xaf82[1297],_0xaf82[1303]);$(_0xaf82[1308])[_0xaf82[247]](_0xaf82[1307])[_0xaf82[245]](_0xaf82[1306]);$(_0xaf82[1310])[_0xaf82[281]](_0xaf82[1309]);$(_0xaf82[1310])[_0xaf82[206]](_0xaf82[1299],_0xaf82[1300])[_0xaf82[257]](_0xaf82[1297],_0xaf82[1311]);$(_0xaf82[243])[_0xaf82[281]](_0xaf82[1314])[_0xaf82[206]](_0xaf82[1299],_0xaf82[1300])[_0xaf82[257]](_0xaf82[1297],_0xaf82[1313])[_0xaf82[206]](_0xaf82[1045],_0xaf82[1312]);$(_0xaf82[280])[_0xaf82[713]](_0xaf82[1315]);$(_0xaf82[1323])[_0xaf82[713]](_0xaf82[1316]+ _0xaf82[1317]+ _0xaf82[1318]+ _0xaf82[1319]+ _0xaf82[1320]+ _0xaf82[1321]+ _0xaf82[1322]+ _0xaf82[326]);$(_0xaf82[1324])[_0xaf82[61]]();$(_0xaf82[493])[_0xaf82[206]](_0xaf82[1325],_0xaf82[1326]);$(_0xaf82[1329])[_0xaf82[1328]]()[_0xaf82[1300]]({title:_0xaf82[1327],placement:_0xaf82[677]});$(_0xaf82[1343])[_0xaf82[1328]]()[_0xaf82[128]](_0xaf82[1330]+ textLanguage[_0xaf82[1331]]+ _0xaf82[1332]+ _0xaf82[1333]+ _0xaf82[1334]+ _0xaf82[1335]+ _0xaf82[1336]+ _0xaf82[1337]+ _0xaf82[1338]+ _0xaf82[1339]+ _0xaf82[1340]+ _0xaf82[1341]+ _0xaf82[1342]);$(_0xaf82[1345])[_0xaf82[1328]]()[_0xaf82[1300]]({title:_0xaf82[1344],placement:_0xaf82[677]});$(_0xaf82[1348])[_0xaf82[1328]]()[_0xaf82[1328]]()[_0xaf82[1300]]({title:_0xaf82[1346],placement:_0xaf82[1347]});$(_0xaf82[951])[_0xaf82[128]](_0xaf82[1349]+ _0xaf82[1350]+ _0xaf82[1351]+ _0xaf82[1352]+ _0xaf82[1353]+ _0xaf82[1354]+ _0xaf82[1355]+ _0xaf82[1356]+ _0xaf82[652]);$(_0xaf82[950])[_0xaf82[279]](_0xaf82[1357]);$(_0xaf82[1088])[_0xaf82[713]](_0xaf82[1358]+ _0xaf82[1359]+ _0xaf82[1360]+ _0xaf82[1361]+ _0xaf82[1362]);$(_0xaf82[1364])[_0xaf82[130]](_0xaf82[1363]);$(_0xaf82[84])[_0xaf82[64]]()[_0xaf82[206]](_0xaf82[1045],_0xaf82[1365]);$(_0xaf82[1450])[_0xaf82[130]](_0xaf82[1366]+ _0xaf82[1367]+ Premadeletter42+ _0xaf82[172]+ _0xaf82[1368]+ Premadeletter44+ _0xaf82[172]+ _0xaf82[1369]+ Premadeletter45a+ _0xaf82[172]+ _0xaf82[1370]+ Premadeletter46+ _0xaf82[172]+ _0xaf82[1371]+ Premadeletter49+ _0xaf82[172]+ _0xaf82[1372]+ Premadeletter50+ _0xaf82[172]+ _0xaf82[1373]+ _0xaf82[1374]+ _0xaf82[1375]+ _0xaf82[1376]+ _0xaf82[1377]+ _0xaf82[1378]+ _0xaf82[1379]+ _0xaf82[1380]+ _0xaf82[1381]+ _0xaf82[1382]+ _0xaf82[1383]+ _0xaf82[1384]+ _0xaf82[1385]+ _0xaf82[1386]+ _0xaf82[1387]+ _0xaf82[1388]+ _0xaf82[1389]+ _0xaf82[1390]+ _0xaf82[1391]+ _0xaf82[1392]+ _0xaf82[652]+ _0xaf82[1393]+ _0xaf82[1394]+ _0xaf82[1395]+ _0xaf82[1396]+ _0xaf82[1397]+ _0xaf82[1398]+ _0xaf82[1399]+ _0xaf82[1400]+ _0xaf82[1401]+ _0xaf82[1402]+ _0xaf82[1403]+ _0xaf82[1404]+ _0xaf82[1405]+ _0xaf82[1406]+ _0xaf82[1383]+ _0xaf82[1407]+ _0xaf82[1408]+ _0xaf82[1409]+ _0xaf82[1410]+ _0xaf82[1411]+ _0xaf82[1412]+ _0xaf82[1413]+ _0xaf82[1414]+ _0xaf82[1415]+ _0xaf82[1416]+ _0xaf82[1417]+ _0xaf82[1418]+ _0xaf82[1419]+ _0xaf82[1420]+ _0xaf82[1421]+ _0xaf82[1422]+ _0xaf82[1423]+ _0xaf82[1424]+ _0xaf82[1425]+ _0xaf82[1426]+ _0xaf82[1427]+ _0xaf82[1428]+ _0xaf82[1429]+ _0xaf82[1430]+ _0xaf82[326]+ _0xaf82[1431]+ _0xaf82[1432]+ _0xaf82[1433]+ _0xaf82[1434]+ _0xaf82[1435]+ _0xaf82[1436]+ _0xaf82[1437]+ _0xaf82[1438]+ _0xaf82[1439]+ _0xaf82[1440]+ _0xaf82[1441]+ _0xaf82[1442]+ _0xaf82[1443]+ _0xaf82[1444]+ _0xaf82[1445]+ _0xaf82[1446]+ _0xaf82[1447]+ _0xaf82[1448]+ _0xaf82[1449]+ _0xaf82[326]);$(_0xaf82[1453])[_0xaf82[73]](_0xaf82[1451],_0xaf82[1452]);$(_0xaf82[1456])[_0xaf82[73]](_0xaf82[1454],_0xaf82[1455]);changeFrameWorkStart();$(_0xaf82[969])[_0xaf82[1462]](_0xaf82[1457],function(_0xf2ddx12d){if(!searching){var _0xf2ddx200=_0xf2ddx12d[_0xaf82[1460]][_0xaf82[1459]][_0xaf82[1458]](_0xaf82[76]);$(_0xaf82[969])[_0xaf82[59]](_0xf2ddx200);$(_0xaf82[969])[_0xaf82[284]]();$(_0xaf82[1461])[_0xaf82[208]]()}});$(_0xaf82[1463])[_0xaf82[59]](localStorage[_0xaf82[3]](_0xaf82[421]));$(_0xaf82[1464])[_0xaf82[59]](localStorage[_0xaf82[3]](_0xaf82[422]));$(_0xaf82[1465])[_0xaf82[59]](localStorage[_0xaf82[3]](_0xaf82[423]));$(_0xaf82[1466])[_0xaf82[59]](localStorage[_0xaf82[3]](_0xaf82[424]));$(_0xaf82[1467])[_0xaf82[59]](localStorage[_0xaf82[3]](_0xaf82[425]));$(_0xaf82[1468])[_0xaf82[59]](localStorage[_0xaf82[3]](_0xaf82[426]));$(_0xaf82[1469])[_0xaf82[59]](localStorage[_0xaf82[3]](_0xaf82[427]));$(_0xaf82[1470])[_0xaf82[734]](function(_0xf2ddx11d){localStorage[_0xaf82[117]](_0xf2ddx11d[_0xaf82[1213]][_0xaf82[144]],$(_0xf2ddx11d[_0xaf82[1213]])[_0xaf82[59]]())});var _0xf2ddx201=(localStorage[_0xaf82[3]](_0xaf82[420])== null?defaultMusicUrl:localStorage[_0xaf82[3]](_0xaf82[420]));$(_0xaf82[80])[_0xaf82[130]](_0xaf82[1471]+ _0xaf82[1472]+ getEmbedUrl(_0xf2ddx201)+ _0xaf82[1473]+ _0xaf82[1474]+ _0xf2ddx201+ _0xaf82[1475]);$(_0xaf82[80])[_0xaf82[61]]();$(_0xaf82[81])[_0xaf82[61]]();ytFrame();$(_0xaf82[1478])[_0xaf82[245]](_0xaf82[1477])[_0xaf82[247]](_0xaf82[1476]);$(_0xaf82[469])[_0xaf82[801]](_0xaf82[1479],function(){$(this)[_0xaf82[206]](_0xaf82[1480],_0xaf82[1481])});$(_0xaf82[469])[_0xaf82[1462]](_0xaf82[1457],function(_0xf2ddx12d){$(this)[_0xaf82[206]](_0xaf82[1480],_0xaf82[1481]);var _0xf2ddx109=_0xf2ddx12d[_0xaf82[1460]][_0xaf82[1459]][_0xaf82[1458]](_0xaf82[76]);YoutubeEmbPlayer(_0xf2ddx109)});$(_0xaf82[410])[_0xaf82[206]](_0xaf82[1482],_0xaf82[1483]);$(_0xaf82[952])[_0xaf82[130]](_0xaf82[1484]+ _0xaf82[1485]+ _0xaf82[326]);$(_0xaf82[1088])[_0xaf82[713]](_0xaf82[1486]+ _0xaf82[1487]+ _0xaf82[1488]+ _0xaf82[1489]+ _0xaf82[1490]+ _0xaf82[1491]+ _0xaf82[1492]+ _0xaf82[652]);$(_0xaf82[1088])[_0xaf82[713]](_0xaf82[1493]+ _0xaf82[1494]+ _0xaf82[1495]+ _0xaf82[1496]+ _0xaf82[1497]+ _0xaf82[1498]+ _0xaf82[1499]);$(_0xaf82[1088])[_0xaf82[713]](_0xaf82[1500]+ _0xaf82[1501]+ _0xaf82[1502]+ _0xaf82[1503]+ _0xaf82[1504]+ _0xaf82[1505]+ _0xaf82[1506]);$(_0xaf82[1088])[_0xaf82[713]](_0xaf82[1507]+ _0xaf82[1508]+ _0xaf82[1509]+ _0xaf82[1510]+ _0xaf82[1511]+ _0xaf82[1512]+ _0xaf82[1513]);$(_0xaf82[1088])[_0xaf82[713]](_0xaf82[1514]+ _0xaf82[1515]+ _0xaf82[652]);$(_0xaf82[1090])[_0xaf82[279]](_0xaf82[1516]+ _0xaf82[1517]+ legmaincolor+ _0xaf82[1518]+ _0xaf82[1519]+ legmaincolor+ _0xaf82[1520]+ _0xaf82[1521]+ _0xaf82[1522]+ legmaincolor+ _0xaf82[1523]+ _0xaf82[1524]+ _0xaf82[1525]+ legmaincolor+ _0xaf82[1526]+ _0xaf82[652]+ _0xaf82[1527]+ _0xaf82[1528]+ legmaincolor+ _0xaf82[1529]+ _0xaf82[1530]+ legmaincolor+ _0xaf82[1531]+ _0xaf82[1532]+ legmaincolor+ _0xaf82[1533]+ _0xaf82[652]+ _0xaf82[1534]+ _0xaf82[1530]+ legmaincolor+ _0xaf82[1531]+ _0xaf82[652]+ _0xaf82[1535]+ _0xaf82[652]);$(_0xaf82[544])[_0xaf82[208]](function(){if(playerState!= 1){$(_0xaf82[471])[0][_0xaf82[1540]][_0xaf82[1539]](_0xaf82[1536]+ _0xaf82[298]+ _0xaf82[1537],_0xaf82[1538]);$(_0xaf82[1543])[_0xaf82[247]](_0xaf82[1542])[_0xaf82[245]](_0xaf82[1541]);$(this)[_0xaf82[206]](_0xaf82[986],Premadeletter60)[_0xaf82[1300]](_0xaf82[1544])[_0xaf82[1300]](_0xaf82[87]);return playerState= 1}else {$(_0xaf82[471])[0][_0xaf82[1540]][_0xaf82[1539]](_0xaf82[1536]+ _0xaf82[299]+ _0xaf82[1537],_0xaf82[1538]);$(_0xaf82[1543])[_0xaf82[247]](_0xaf82[1541])[_0xaf82[245]](_0xaf82[1542]);$(this)[_0xaf82[206]](_0xaf82[986],Premadeletter13)[_0xaf82[1300]](_0xaf82[1544])[_0xaf82[1300]](_0xaf82[87]);return playerState= 0}});$(_0xaf82[1168])[_0xaf82[665]](function(){$(_0xaf82[1545])[_0xaf82[61]]();$(_0xaf82[1168])[_0xaf82[76]](_0xaf82[1546]);if($(_0xaf82[493])[_0xaf82[59]]()!= _0xaf82[6]){$(_0xaf82[1547])[_0xaf82[87]](100)}else {$(_0xaf82[1548])[_0xaf82[87]](100)}});$(_0xaf82[1456])[_0xaf82[663]](function(){$(_0xaf82[1548])[_0xaf82[61]]();$(_0xaf82[1547])[_0xaf82[61]]();$(_0xaf82[1545])[_0xaf82[61]]();$(_0xaf82[1168])[_0xaf82[76]](_0xaf82[1549])});$(_0xaf82[1551])[_0xaf82[130]](_0xaf82[1550]);$(_0xaf82[1461])[_0xaf82[1300]](_0xaf82[1552]);$(_0xaf82[1122])[_0xaf82[208]](function(){copy($(_0xaf82[238])[_0xaf82[76]]())});$(_0xaf82[1123])[_0xaf82[208]](function(){copy($(_0xaf82[238])[_0xaf82[76]]())});$(_0xaf82[1553])[_0xaf82[208]](function(){lastIP= localStorage[_0xaf82[3]](_0xaf82[38]);if(lastIP== _0xaf82[6]|| lastIP== null){}else {$(_0xaf82[213])[_0xaf82[59]](lastIP);$(_0xaf82[295])[_0xaf82[208]]();setTimeout(function(){if($(_0xaf82[213])[_0xaf82[59]]()!= lastIP){toastr[_0xaf82[173]](Premadeletter31)[_0xaf82[73]](_0xaf82[71],_0xaf82[267])}},1000)}});$(_0xaf82[1557])[_0xaf82[208]](function(){if(searchSip!= null){copy(_0xaf82[1554]+ region+ _0xaf82[1555]+ realmode+ _0xaf82[1556]+ searchSip)}else {copy(_0xaf82[1554]+ $(_0xaf82[60])[_0xaf82[59]]()+ _0xaf82[1555]+ realmode+ _0xaf82[1556]+ currentIP)}});$(_0xaf82[1168])[_0xaf82[208]](function(){if(realmode== _0xaf82[68]){CopyTkPwLb2= _0xaf82[1558]+ $(_0xaf82[213])[_0xaf82[59]]();copy(CopyTkPwLb2)}else {if(realmode!= _0xaf82[68]){if(region!= null&& realmode!= null){if(document[_0xaf82[56]][_0xaf82[55]](_0xaf82[54])){CopyTkPwLb2= _0xaf82[1559]+ $(_0xaf82[213])[_0xaf82[59]]()+ _0xaf82[218]+ $(_0xaf82[60])[_0xaf82[59]]()+ _0xaf82[1555]+ realmode}else {CopyTkPwLb2= _0xaf82[1558]+ $(_0xaf82[213])[_0xaf82[59]]()+ _0xaf82[218]+ $(_0xaf82[60])[_0xaf82[59]]()+ _0xaf82[1555]+ realmode};copy(CopyTkPwLb2)}else {CopyTkPwLb2= _0xaf82[1558]+ $(_0xaf82[213])[_0xaf82[59]]();copy(CopyTkPwLb2)}}else {if(realmode== _0xaf82[68]){CopyTkPwLb2= _0xaf82[1558]+ $(_0xaf82[213])[_0xaf82[59]]();copy(CopyTkPwLb2)}else {if(realmode!= _0xaf82[68]){if(document[_0xaf82[56]][_0xaf82[55]](_0xaf82[54])){CopyTkPwLb2= _0xaf82[1559]+ $(_0xaf82[213])[_0xaf82[59]]()+ _0xaf82[218]+ $(_0xaf82[60])[_0xaf82[59]]()+ _0xaf82[1555]+ realmode}else {CopyTkPwLb2= _0xaf82[1558]+ $(_0xaf82[213])[_0xaf82[59]]()+ _0xaf82[218]+ $(_0xaf82[60])[_0xaf82[59]]()+ _0xaf82[1555]+ realmode};copy(CopyTkPwLb2)}}}}});$(_0xaf82[1124])[_0xaf82[208]](function(){if(searchSip!= null){if(realmode== _0xaf82[68]){CopyTkPwLb2= _0xaf82[1558]+ $(_0xaf82[213])[_0xaf82[59]]()+ _0xaf82[1560]+ $(_0xaf82[493])[_0xaf82[59]]();copy(CopyTkPwLb2)}else {if(realmode!= _0xaf82[68]){if(document[_0xaf82[56]][_0xaf82[55]](_0xaf82[54])){CopyTkPwLb2= _0xaf82[1559]+ $(_0xaf82[213])[_0xaf82[59]]()+ _0xaf82[1560]+ $(_0xaf82[493])[_0xaf82[59]]()+ _0xaf82[218]+ $(_0xaf82[60])[_0xaf82[59]]()+ _0xaf82[1555]+ realmode}else {CopyTkPwLb2= _0xaf82[1558]+ $(_0xaf82[213])[_0xaf82[59]]()+ _0xaf82[1560]+ $(_0xaf82[493])[_0xaf82[59]]()+ _0xaf82[218]+ $(_0xaf82[60])[_0xaf82[59]]()+ _0xaf82[1555]+ realmode};copy(CopyTkPwLb2)}}}else {if(realmode== _0xaf82[68]){CopyTkPwLb2= _0xaf82[1558]+ $(_0xaf82[213])[_0xaf82[59]]()+ _0xaf82[1560]+ $(_0xaf82[493])[_0xaf82[59]]();copy(CopyTkPwLb2)}else {if(realmode!= _0xaf82[68]){if(document[_0xaf82[56]][_0xaf82[55]](_0xaf82[54])){CopyTkPwLb2= _0xaf82[1559]+ $(_0xaf82[213])[_0xaf82[59]]()+ _0xaf82[1560]+ $(_0xaf82[493])[_0xaf82[59]]()+ _0xaf82[218]+ $(_0xaf82[60])[_0xaf82[59]]()+ _0xaf82[1555]+ realmode}else {CopyTkPwLb2= _0xaf82[1558]+ $(_0xaf82[213])[_0xaf82[59]]()+ _0xaf82[1560]+ $(_0xaf82[493])[_0xaf82[59]]()+ _0xaf82[218]+ $(_0xaf82[60])[_0xaf82[59]]()+ _0xaf82[1555]+ realmode};copy(CopyTkPwLb2)}}}});$(_0xaf82[1125])[_0xaf82[208]](function(){if(searchSip!= null){if(realmode== _0xaf82[68]){CopyTkPwLb2= _0xaf82[1558]+ $(_0xaf82[213])[_0xaf82[59]]()+ _0xaf82[1560]+ $(_0xaf82[493])[_0xaf82[59]]();copyToClipboardAll()}else {if(realmode!= _0xaf82[68]){if(document[_0xaf82[56]][_0xaf82[55]](_0xaf82[54])){CopyTkPwLb2= _0xaf82[1559]+ $(_0xaf82[213])[_0xaf82[59]]()+ _0xaf82[1560]+ $(_0xaf82[493])[_0xaf82[59]]()+ _0xaf82[218]+ $(_0xaf82[60])[_0xaf82[59]]()+ _0xaf82[1555]+ realmode}else {CopyTkPwLb2= _0xaf82[1558]+ $(_0xaf82[213])[_0xaf82[59]]()+ _0xaf82[1560]+ $(_0xaf82[493])[_0xaf82[59]]()+ _0xaf82[218]+ $(_0xaf82[60])[_0xaf82[59]]()+ _0xaf82[1555]+ realmode};copy(CopyTkPwLb2)}}}else {if(realmode== _0xaf82[68]){CopyTkPwLb2= _0xaf82[1558]+ $(_0xaf82[213])[_0xaf82[59]]()+ _0xaf82[1560]+ $(_0xaf82[493])[_0xaf82[59]]();copyToClipboardAll()}else {if(realmode!= _0xaf82[68]){if(document[_0xaf82[56]][_0xaf82[55]](_0xaf82[54])){CopyTkPwLb2= _0xaf82[1559]+ $(_0xaf82[213])[_0xaf82[59]]()+ _0xaf82[1560]+ $(_0xaf82[493])[_0xaf82[59]]()+ _0xaf82[218]+ $(_0xaf82[60])[_0xaf82[59]]()+ _0xaf82[1555]+ realmode}else {CopyTkPwLb2= _0xaf82[1558]+ $(_0xaf82[213])[_0xaf82[59]]()+ _0xaf82[1560]+ $(_0xaf82[493])[_0xaf82[59]]()+ _0xaf82[218]+ $(_0xaf82[60])[_0xaf82[59]]()+ _0xaf82[1555]+ realmode};copyToClipboardAll()}}}});$(_0xaf82[693])[_0xaf82[208]](function(){$(_0xaf82[693])[_0xaf82[1561]]()});$(_0xaf82[1169])[_0xaf82[208]](function(){$(_0xaf82[237])[_0xaf82[208]]()});$(_0xaf82[1169])[_0xaf82[665]](function(){$(_0xaf82[1548])[_0xaf82[61]]();$(_0xaf82[1547])[_0xaf82[61]]();$(_0xaf82[1168])[_0xaf82[76]](_0xaf82[1549])});$(_0xaf82[1461])[_0xaf82[208]](function(){if(!searching){getSNEZServers();client2[_0xaf82[704]]()}else {$(_0xaf82[248])[_0xaf82[247]](_0xaf82[246])[_0xaf82[245]](_0xaf82[244]);clearInterval(timerId);searching= false;toastr[_0xaf82[173]](Premadeletter32+ _0xaf82[274])[_0xaf82[73]](_0xaf82[71],_0xaf82[267])}});$(_0xaf82[969])[_0xaf82[734]](function(_0xf2ddx11d){if(_0xf2ddx11d[_0xaf82[685]]== 13){$(_0xaf82[1461])[_0xaf82[208]]()}});$(_0xaf82[1562])[_0xaf82[208]](function(){hideSearchHud();showMenu2()});$(_0xaf82[1166])[_0xaf82[665]](function(){$(_0xaf82[1548])[_0xaf82[61]]();$(_0xaf82[1545])[_0xaf82[87]](100);$(_0xaf82[1168])[_0xaf82[76]](_0xaf82[1549])});$(_0xaf82[952])[_0xaf82[73]](_0xaf82[1454],_0xaf82[1455]);$(_0xaf82[1166])[_0xaf82[208]](function(){hideMenu();$(_0xaf82[250])[_0xaf82[59]]($(_0xaf82[60])[_0xaf82[59]]());$(_0xaf82[251])[_0xaf82[59]]($(_0xaf82[69])[_0xaf82[59]]());showSearchHud();$(_0xaf82[969])[_0xaf82[1561]]()[_0xaf82[284]]()});$(_0xaf82[293])[_0xaf82[665]](function(){$(_0xaf82[293])[_0xaf82[73]](_0xaf82[397],_0xaf82[1563]);return clickedname= _0xaf82[99]})[_0xaf82[663]](function(){$(_0xaf82[293])[_0xaf82[73]](_0xaf82[397],_0xaf82[6])});$(_0xaf82[293])[_0xaf82[1121]](function(){previousnickname= $(_0xaf82[293])[_0xaf82[59]]();localStorage[_0xaf82[117]](_0xaf82[39],previousnickname);var _0xf2ddx202;for(_0xf2ddx202 in animatedskins){if(_0xf2ddx202== $(_0xaf82[293])[_0xaf82[59]]()){toastr[_0xaf82[157]](_0xaf82[1564])}};if(clickedname== _0xaf82[99]){if(fancyCount2($(_0xaf82[293])[_0xaf82[59]]())>= 16){toastr[_0xaf82[184]](_0xaf82[199]+ Premadeletter123+ _0xaf82[200]+ Premadeletter2+ _0xaf82[1565]+ $(_0xaf82[293])[_0xaf82[59]]())}};if($(_0xaf82[293])[_0xaf82[59]]()== _0xaf82[1566]){toastr[_0xaf82[157]](Premadeletter3)[_0xaf82[73]](_0xaf82[71],_0xaf82[267]);$(_0xaf82[293])[_0xaf82[59]](_0xaf82[1567]);$(_0xaf82[74])[_0xaf82[208]]();openbleedmod()}else {if($(_0xaf82[293])[_0xaf82[59]]()== _0xaf82[1568]){toastr[_0xaf82[157]](Premadeletter4)[_0xaf82[73]](_0xaf82[71],_0xaf82[267]);$(_0xaf82[293])[_0xaf82[59]](_0xaf82[1567]);$(_0xaf82[74])[_0xaf82[208]]();openrotatingmod()}else {if($(_0xaf82[293])[_0xaf82[59]]()== _0xaf82[1569]){toastr[_0xaf82[157]](Premadeletter5+ _0xaf82[1570]+ Premadeletter6+ _0xaf82[1571]);$(_0xaf82[293])[_0xaf82[59]](_0xaf82[1572]);openvidmod()}}}});$(_0xaf82[293])[_0xaf82[801]](_0xaf82[1479],function(){if(fancyCount2($(_0xaf82[293])[_0xaf82[59]]())> 15){while(fancyCount2($(_0xaf82[293])[_0xaf82[59]]())> 15){$(_0xaf82[293])[_0xaf82[59]]($(_0xaf82[293])[_0xaf82[59]]()[_0xaf82[181]](0,-1))}}});$(document)[_0xaf82[734]](function(_0xf2ddx11d){if(_0xf2ddx11d[_0xaf82[1573]]== 8){if($(_0xaf82[1574])[_0xaf82[140]]== 0){$(_0xaf82[1166])[_0xaf82[208]]()}}});$(_0xaf82[1176])[_0xaf82[208]](function(){CutNameConflictwithMessageFunction();if(checkedGameNames== 0){StartEditGameNames();return checkedGameNames= 2}else {if(checkedGameNames== 1){ContinueEditGameNames();return checkedGameNames= 2}else {if(checkedGameNames== 2){StopEditGameNames();return checkedGameNames= 1}}}});$(_0xaf82[1170])[_0xaf82[208]](function(){var _0xf2ddx203=$(_0xaf82[213])[_0xaf82[59]]();var _0xf2ddx204=$(_0xaf82[493])[_0xaf82[59]]();if(_0xf2ddx204!= _0xaf82[6]){semiurl2= _0xf2ddx203+ _0xaf82[1575]+ _0xf2ddx204}else {semiurl2= _0xf2ddx203};url2= _0xaf82[1576]+ semiurl2;setTimeout(function(){$(_0xaf82[1170])[_0xaf82[545]]()},100);var _0xf2ddx205=window[_0xaf82[119]](url2,_0xaf82[486])});$(_0xaf82[493])[_0xaf82[73]](_0xaf82[71],_0xaf82[1577]);$(_0xaf82[293])[_0xaf82[73]](_0xaf82[71],_0xaf82[1578]);$(_0xaf82[493])[_0xaf82[665]](function(){$(_0xaf82[493])[_0xaf82[73]](_0xaf82[397],_0xaf82[1563])})[_0xaf82[663]](function(){$(_0xaf82[493])[_0xaf82[73]](_0xaf82[397],_0xaf82[6])});$(_0xaf82[60])[_0xaf82[665]](function(){$(_0xaf82[60])[_0xaf82[73]](_0xaf82[397],_0xaf82[1579])})[_0xaf82[663]](function(){$(_0xaf82[60])[_0xaf82[73]](_0xaf82[397],_0xaf82[6])});$(_0xaf82[69])[_0xaf82[665]](function(){$(_0xaf82[69])[_0xaf82[73]](_0xaf82[397],_0xaf82[1579])})[_0xaf82[663]](function(){$(_0xaf82[69])[_0xaf82[73]](_0xaf82[397],_0xaf82[6])});$(_0xaf82[1580])[_0xaf82[208]](function(){setTimeout(function(){if(LegendSettingsfirstclicked== _0xaf82[116]){LegendSettingsfirst();return LegendSettingsfirstclicked= _0xaf82[115]}else {$(_0xaf82[408])[_0xaf82[208]]();return false}},100)});$(_0xaf82[236])[_0xaf82[208]](function(){localStorage[_0xaf82[117]](_0xaf82[38],$(_0xaf82[213])[_0xaf82[59]]());var _0xf2ddx206=_0xaf82[1581];var _0xf2ddx207=_0xaf82[108];var _0xf2ddx208=_0xaf82[108];var userfirstname=localStorage[_0xaf82[3]](_0xaf82[109]);var userlastname=localStorage[_0xaf82[3]](_0xaf82[110]);var _0xf2ddx111=_0xaf82[108];var _0xf2ddx209=_0xaf82[108];var _0xf2ddx20a= new Date();var _0xf2ddx20b=_0xf2ddx20a[_0xaf82[1582]]()+ _0xaf82[192]+ (_0xf2ddx20a[_0xaf82[1583]]()+ 1)+ _0xaf82[192]+ _0xf2ddx20a[_0xaf82[1584]]()+ _0xaf82[189]+ _0xf2ddx20a[_0xaf82[1585]]()+ _0xaf82[239]+ _0xf2ddx20a[_0xaf82[1586]]();if(searchSip== null){_0xf2ddx111= $(_0xaf82[69])[_0xaf82[59]]();_0xf2ddx209= $(_0xaf82[60])[_0xaf82[59]]()}else {if(searchSip== $(_0xaf82[300])[_0xaf82[59]]()){_0xf2ddx111= realmode;_0xf2ddx209= region}};if($(_0xaf82[300])[_0xaf82[59]]()!= _0xaf82[6]&& $(_0xaf82[300])[_0xaf82[59]]()!= null&& $(_0xaf82[300])[_0xaf82[59]]()!= undefined){_0xf2ddx207= $(_0xaf82[300])[_0xaf82[59]]()};if($(_0xaf82[493])[_0xaf82[59]]()!= _0xaf82[6]&& $(_0xaf82[493])[_0xaf82[59]]()!= undefined){_0xf2ddx206= $(_0xaf82[493])[_0xaf82[59]]()};var _0xf2ddxd8=0,_0xf2ddx20c=_0xf2ddx206[_0xaf82[140]];for(_0xf2ddxd8;_0xf2ddxd8< _0xf2ddx206;_0xf2ddxd8++){_0xf2ddx206= _0xf2ddx206[_0xaf82[168]](_0xaf82[481],_0xaf82[933])};if($(_0xaf82[293])[_0xaf82[59]]()!= undefined){_0xf2ddx208= $(_0xaf82[293])[_0xaf82[59]]()};var _0xf2ddxd8=0,_0xf2ddx20d=_0xf2ddx208[_0xaf82[140]];for(_0xf2ddxd8;_0xf2ddxd8< _0xf2ddx20d;_0xf2ddxd8++){_0xf2ddx208= removeEmojis(_0xf2ddx208[_0xaf82[168]](_0xaf82[481],_0xaf82[933]))};if($(_0xaf82[300])[_0xaf82[59]]()!= undefined){if(_0xf2ddx207[_0xaf82[179]](_0xaf82[579])== false){_0xf2ddx207= $(_0xaf82[300])[_0xaf82[59]]()[_0xaf82[168]](_0xaf82[579],_0xaf82[1587])}};if(searchSip== null){detailed1= _0xaf82[1588]+ _0xaf82[1589]+ window[_0xaf82[1245]]+ _0xaf82[1590]+ _0xf2ddx208+ _0xaf82[1591]+ _0xf2ddx20b+ _0xaf82[1592]+ _0xf2ddx207+ _0xaf82[1593]+ _0xf2ddx206+ _0xaf82[1594]+ _0xf2ddx111+ _0xaf82[1595]+ _0xf2ddx209+ _0xaf82[1596]+ window[_0xaf82[186]]+ _0xaf82[1597]+ userlastname+ _0xaf82[1598]+ userfirstname}else {if(searchSip!= null){detailed1= _0xaf82[1588]+ _0xaf82[1589]+ window[_0xaf82[1245]]+ _0xaf82[1590]+ _0xf2ddx208+ _0xaf82[1591]+ _0xf2ddx20b+ _0xaf82[1592]+ searchSip+ _0xaf82[1593]+ _0xf2ddx206+ _0xaf82[1599]+ _0xaf82[1594]+ _0xf2ddx111+ _0xaf82[1595]+ _0xf2ddx209+ _0xaf82[1596]+ window[_0xaf82[186]]+ _0xaf82[1597]+ userlastname+ _0xaf82[1598]+ userfirstname}else {detailed1= _0xaf82[1588]+ _0xaf82[1589]+ window[_0xaf82[1245]]+ _0xaf82[1590]+ _0xf2ddx208+ _0xaf82[1591]+ _0xf2ddx20b+ _0xaf82[1592]+ _0xf2ddx207+ _0xaf82[1593]+ _0xf2ddx206+ _0xaf82[1594]+ _0xf2ddx111+ _0xaf82[1595]+ _0xf2ddx209+ _0xaf82[1596]+ window[_0xaf82[186]]+ _0xaf82[1597]+ userlastname+ _0xaf82[1598]+ userfirstname}};$(_0xaf82[469])[_0xaf82[279]](_0xaf82[1600]+ detailed1+ _0xaf82[1601]);$(_0xaf82[1602])[_0xaf82[61]]();setTimeout(function(){if(window[_0xaf82[1603]]&& window[_0xaf82[1603]][_0xaf82[55]]($(_0xaf82[293])[_0xaf82[59]]())){for(var _0xf2ddx1f7=0;_0xf2ddx1f7< window[_0xaf82[1604]][_0xaf82[140]];_0xf2ddx1f7++){if($(_0xaf82[293])[_0xaf82[59]]()== window[_0xaf82[1604]][_0xf2ddx1f7][_0xaf82[144]]){core[_0xaf82[831]]($(_0xaf82[293])[_0xaf82[59]](),null,_0xaf82[1605]+ window[_0xaf82[1606]]+ window[_0xaf82[1604]][_0xf2ddx1f7][_0xaf82[1607]],null)}}}else {if(legendflags[_0xaf82[55]](LowerCase($(_0xaf82[293])[_0xaf82[59]]()))){core[_0xaf82[831]]($(_0xaf82[293])[_0xaf82[59]](),null,_0xaf82[1608]+ LowerCase($(_0xaf82[293])[_0xaf82[59]]())+ _0xaf82[1609],null)}}},1000);$(_0xaf82[1610])[_0xaf82[801]](_0xaf82[1159],function(){$(_0xaf82[1610])[_0xaf82[176]]()});return lastIP= $(_0xaf82[213])[_0xaf82[59]]()});$(_0xaf82[531])[_0xaf82[1300]]({title:_0xaf82[1611],placement:_0xaf82[677]});$(_0xaf82[209])[_0xaf82[208]](function(){var _0xf2ddx20e=!($(this)[_0xaf82[206]](_0xaf82[205])== _0xaf82[115]);if(_0xf2ddx20e){localStorage[_0xaf82[117]](_0xaf82[47],true);$(_0xaf82[1612])[_0xaf82[87]]();$(this)[_0xaf82[281]](_0xaf82[1613]+ Premadeletter43)}else {localStorage[_0xaf82[117]](_0xaf82[47],false);$(_0xaf82[1612])[_0xaf82[61]]();$(_0xaf82[1018])[_0xaf82[61]]();$(_0xaf82[1021])[_0xaf82[61]]();$(_0xaf82[1019])[_0xaf82[61]]();$(_0xaf82[1020])[_0xaf82[61]]();$(_0xaf82[1018])[_0xaf82[61]]();$(this)[_0xaf82[281]](_0xaf82[1613]+ Premadeletter42);return seticon= _0xaf82[99]}});$(_0xaf82[211])[_0xaf82[208]](function(){var _0xf2ddx20e=!($(this)[_0xaf82[206]](_0xaf82[205])== _0xaf82[115]);if(_0xf2ddx20e){localStorage[_0xaf82[117]](_0xaf82[48],true);$(_0xaf82[379])[_0xaf82[87]]();$(this)[_0xaf82[281]](_0xaf82[1614]+ Premadeletter45)}else {localStorage[_0xaf82[117]](_0xaf82[48],false);$(_0xaf82[379])[_0xaf82[61]]();$(this)[_0xaf82[281]](_0xaf82[1614]+ Premadeletter44)}});$(_0xaf82[210])[_0xaf82[208]](function(){var _0xf2ddx20e=!($(this)[_0xaf82[206]](_0xaf82[205])== _0xaf82[115]);if(_0xf2ddx20e){localStorage[_0xaf82[117]](_0xaf82[49],true);var _0xf2ddx165=document[_0xaf82[974]](_0xaf82[647])[0];$(_0xf2ddx165)[_0xaf82[279]](_0xaf82[975]+ _0xaf82[1615]+ _0xaf82[977]+ _0xaf82[978]+ _0xaf82[979]+ _0xaf82[980]+ _0xaf82[981]);$(this)[_0xaf82[281]](_0xaf82[1616]+ Premadeletter45b)}else {localStorage[_0xaf82[117]](_0xaf82[49],false);var _0xf2ddx165=document[_0xaf82[974]](_0xaf82[647])[0];$(_0xf2ddx165)[_0xaf82[279]](_0xaf82[975]+ _0xaf82[1617]+ _0xaf82[1618]+ _0xaf82[1619]+ _0xaf82[1620]+ _0xaf82[1621]+ _0xaf82[1622]);$(this)[_0xaf82[281]](_0xaf82[1616]+ Premadeletter45a)}});$(_0xaf82[1126])[_0xaf82[208]](function(){var _0xf2ddx20e=!($(this)[_0xaf82[206]](_0xaf82[205])== _0xaf82[115]);if(_0xf2ddx20e){localStorage[_0xaf82[117]](_0xaf82[50],true);var _0xf2ddx165=document[_0xaf82[974]](_0xaf82[647])[0];$(_0xf2ddx165)[_0xaf82[279]](_0xaf82[1623]+ _0xaf82[1624]+ $(_0xaf82[1625])[_0xaf82[59]]()+ _0xaf82[1626]+ _0xaf82[1627]+ $(_0xaf82[1625])[_0xaf82[59]]()+ _0xaf82[1626]+ _0xaf82[1628]+ $(_0xaf82[1625])[_0xaf82[59]]()+ _0xaf82[1626]+ _0xaf82[1629]+ $(_0xaf82[1625])[_0xaf82[59]]()+ _0xaf82[1626]+ _0xaf82[1627]+ $(_0xaf82[1625])[_0xaf82[59]]()+ _0xaf82[1626]+ _0xaf82[1630]+ $(_0xaf82[1625])[_0xaf82[59]]()+ _0xaf82[1626]+ _0xaf82[1631]+ $(_0xaf82[1625])[_0xaf82[59]]()+ _0xaf82[1626]+ _0xaf82[1632]+ _0xaf82[1633]+ _0xaf82[1634]+ _0xaf82[1635]);$(this)[_0xaf82[281]](_0xaf82[1616]+ Premadeletter47)}else {localStorage[_0xaf82[117]](_0xaf82[50],false);$(_0xaf82[1636])[_0xaf82[176]]();$(this)[_0xaf82[281]](_0xaf82[1637]+ Premadeletter46)}});$(_0xaf82[1127])[_0xaf82[208]](function(){var _0xf2ddx20e=!($(this)[_0xaf82[206]](_0xaf82[205])== _0xaf82[115]);if(_0xf2ddx20e){localStorage[_0xaf82[117]](_0xaf82[51],true);$(_0xaf82[1638])[_0xaf82[87]]();$(this)[_0xaf82[281]](_0xaf82[1639]+ Premadeletter51);TimerLM[_0xaf82[1079]]= document[_0xaf82[407]](_0xaf82[1640]);return TimerLM[_0xaf82[1079]]}else {localStorage[_0xaf82[117]](_0xaf82[51],false);$(_0xaf82[1638])[_0xaf82[61]]();$(this)[_0xaf82[281]](_0xaf82[1639]+ Premadeletter50)}});$(_0xaf82[531])[_0xaf82[208]](function(){var _0xf2ddx20e=!($(this)[_0xaf82[206]](_0xaf82[205])== _0xaf82[115]);if(_0xf2ddx20e){$(_0xaf82[1612])[_0xaf82[61]]();$(_0xaf82[379])[_0xaf82[61]]();$(_0xaf82[1641])[_0xaf82[61]]();$(_0xaf82[1090])[_0xaf82[61]]();$(_0xaf82[1088])[_0xaf82[61]]();$(_0xaf82[1642])[_0xaf82[61]]();$(_0xaf82[520])[_0xaf82[61]]();$(_0xaf82[1643])[_0xaf82[61]]();$(_0xaf82[1644])[_0xaf82[61]]();$(this)[_0xaf82[281]](_0xaf82[1645]+ Premadeletter48)}else {$(_0xaf82[1612])[_0xaf82[87]]();$(_0xaf82[379])[_0xaf82[87]]();$(_0xaf82[1090])[_0xaf82[87]]();$(_0xaf82[1088])[_0xaf82[87]]();$(_0xaf82[1642])[_0xaf82[87]]();$(_0xaf82[520])[_0xaf82[87]]();$(_0xaf82[1644])[_0xaf82[87]]();$(_0xaf82[1643])[_0xaf82[87]]();$(this)[_0xaf82[281]](_0xaf82[1645]+ Premadeletter49)}});$(_0xaf82[1647])[_0xaf82[208]](function(){$(_0xaf82[376])[_0xaf82[61]]();$(_0xaf82[377])[_0xaf82[61]]();$(_0xaf82[378])[_0xaf82[61]]();$(_0xaf82[379])[_0xaf82[61]]();$(_0xaf82[1646])[_0xaf82[87]]()});$(_0xaf82[81])[_0xaf82[281]](_0xaf82[1648]);$(_0xaf82[327])[_0xaf82[76]](_0xaf82[6]);$(_0xaf82[327])[_0xaf82[713]](_0xaf82[1649]+ modVersion+ semimodVersion+ _0xaf82[1650]+ _0xaf82[1651]);$(_0xaf82[1612])[_0xaf82[61]]();$(_0xaf82[379])[_0xaf82[61]]();$(_0xaf82[1641])[_0xaf82[61]]();$(_0xaf82[1638])[_0xaf82[61]]();$(_0xaf82[1652])[_0xaf82[76]](timesopened);LMserverbox();bluebtns();SNEZServers();$(_0xaf82[410])[_0xaf82[206]](_0xaf82[1482],_0xaf82[1483]);$(_0xaf82[1654])[_0xaf82[128]](_0xaf82[1653]+ Premadeletter109+ _0xaf82[172]);$(_0xaf82[1654])[_0xaf82[128]](_0xaf82[1655]+ Premadeletter109a+ _0xaf82[172]);if(document[_0xaf82[56]][_0xaf82[55]](_0xaf82[54])){$(_0xaf82[1654])[_0xaf82[130]](_0xaf82[1656]);if(localStorage[_0xaf82[3]](_0xaf82[112])!= _0xaf82[6]&& localStorage[_0xaf82[3]](_0xaf82[112])!= null&& localStorage[_0xaf82[3]](_0xaf82[112])!= _0xaf82[4]){userid= localStorage[_0xaf82[3]](_0xaf82[112]);$(_0xaf82[1223])[_0xaf82[59]](window[_0xaf82[112]])};$(_0xaf82[1223])[_0xaf82[1121]](function(){IdfromLegendmod()})};core[_0xaf82[709]]= function(){adres(null,$(_0xaf82[69])[_0xaf82[59]](),$(_0xaf82[60])[_0xaf82[59]]());pauseVideos()};$(_0xaf82[237])[_0xaf82[208]](function(){setTimeout(function(){adres(null,$(_0xaf82[69])[_0xaf82[59]](),$(_0xaf82[60])[_0xaf82[59]]())},100)});$(_0xaf82[69])[_0xaf82[57]](function(){setTimeout(function(){adres(null,$(_0xaf82[69])[_0xaf82[59]](),$(_0xaf82[60])[_0xaf82[59]]())},100)});$(_0xaf82[60])[_0xaf82[57]](function(){setTimeout(function(){adres(null,$(_0xaf82[69])[_0xaf82[59]](),$(_0xaf82[60])[_0xaf82[59]]())},100)});$(_0xaf82[295])[_0xaf82[208]](function(){adres(null,null,null)});$(_0xaf82[972])[_0xaf82[208]](function(){adres(null,null,null)});triggerLMbtns();languagemodfun();$(_0xaf82[1657])[_0xaf82[1300]]();$(_0xaf82[280])[_0xaf82[801]](_0xaf82[1658],_0xaf82[474],function(){MSGCOMMANDS= $(_0xaf82[474])[_0xaf82[76]]();MSGNICK= $(_0xaf82[1660])[_0xaf82[1659]]()[_0xaf82[76]]()[_0xaf82[168]](_0xaf82[273],_0xaf82[6]);MsgCommands1(MSGCOMMANDS,MSGNICK)});$(_0xaf82[280])[_0xaf82[801]](_0xaf82[1661],_0xaf82[597],function(){MSGCOMMANDS= $(_0xaf82[473])[_0xaf82[76]]();MSGNICK= $(_0xaf82[1660])[_0xaf82[1659]]()[_0xaf82[76]]()[_0xaf82[168]](_0xaf82[273],_0xaf82[6]);MsgCommands1(MSGCOMMANDS,MSGNICK)})}function joinSIPonstart(){setTimeout(function(){if(searchSip!= null){if(realmode!= null&& region!= null){$(_0xaf82[69])[_0xaf82[59]](realmode);if(region== _0xaf82[58]){deleteGamemode()}};if(getParameterByName(_0xaf82[92],url)[_0xaf82[168]](_0xaf82[212],_0xaf82[6])[_0xaf82[168]](_0xaf82[214],_0xaf82[6])!= $(_0xaf82[213])[_0xaf82[59]]()){joinSIPonstart1();joinSIPonstart2()}}else {if(url[_0xaf82[55]](_0xaf82[226])== true){$(_0xaf82[69])[_0xaf82[59]](_0xaf82[68]);realmodereturnfromStart();joinpartyfromconnect()}}},1000)}function joinSIPonstart2(){setTimeout(function(){if(getParameterByName(_0xaf82[92],url)[_0xaf82[168]](_0xaf82[212],_0xaf82[6])[_0xaf82[168]](_0xaf82[214],_0xaf82[6])!= $(_0xaf82[213])[_0xaf82[59]]()){joinSIPonstart1();joinSIPonstart3()}},1000)}function joinSIPonstart3(){setTimeout(function(){if(getParameterByName(_0xaf82[92],url)[_0xaf82[168]](_0xaf82[212],_0xaf82[6])[_0xaf82[168]](_0xaf82[214],_0xaf82[6])!= $(_0xaf82[213])[_0xaf82[59]]()){toastr[_0xaf82[173]](_0xaf82[1662])}},1500)}function joinSIPonstart1(){realmodereturnfromStart();$(_0xaf82[213])[_0xaf82[59]](getParameterByName(_0xaf82[92],url)[_0xaf82[168]](_0xaf82[212],_0xaf82[6])[_0xaf82[168]](_0xaf82[214],_0xaf82[6]));if(region!= null&& realmode!= null){currentIPopened= true;legendmod[_0xaf82[67]]= realmode};$(_0xaf82[295])[_0xaf82[208]]()}function joinPLAYERonstart(){setTimeout(function(){if(searchedplayer!= null){$(_0xaf82[969])[_0xaf82[59]](searchedplayer);getSNEZServers(_0xaf82[1663]);client2[_0xaf82[704]]();setTimeout(function(){if($(_0xaf82[1664])[_0xaf82[281]]()!= undefined){toastr[_0xaf82[157]](_0xaf82[1665]+ $(_0xaf82[1666])[_0xaf82[281]]()+ _0xaf82[1667]+ searchedplayer+ _0xaf82[1668]);$(_0xaf82[1664])[_0xaf82[208]]()}},1000)};if(autoplayplayer== _0xaf82[1161]){autoplayplaying();window[_0xaf82[1669]]= true}},1000)}function joinreplayURLonstart(){setTimeout(function(){if(replayURL){BeforeReplay();setTimeout(function(){loadReplayFromWeb(replayURL)},2000)}},1000)}function autoplayplaying(){$(_0xaf82[293])[_0xaf82[59]](_0xaf82[1670]);window[_0xaf82[1671]][_0xaf82[789]]= false;window[_0xaf82[1671]][_0xaf82[1672]]= false;window[_0xaf82[1671]][_0xaf82[1673]]= false;window[_0xaf82[1671]][_0xaf82[1674]]= false;window[_0xaf82[1671]][_0xaf82[1675]]= false;window[_0xaf82[1671]][_0xaf82[1676]]= false;window[_0xaf82[1671]][_0xaf82[1677]]= false;window[_0xaf82[1671]][_0xaf82[1678]]= false;window[_0xaf82[1671]][_0xaf82[1679]]= false;window[_0xaf82[1671]][_0xaf82[1680]]= false;window[_0xaf82[1671]][_0xaf82[1681]]= false;window[_0xaf82[1671]][_0xaf82[1682]]= false;window[_0xaf82[1671]][_0xaf82[1683]]= false;window[_0xaf82[1671]][_0xaf82[1684]]= false;window[_0xaf82[1671]][_0xaf82[1685]]= false;window[_0xaf82[1671]][_0xaf82[1686]]= false;window[_0xaf82[1671]][_0xaf82[1687]]= false;window[_0xaf82[1671]][_0xaf82[1688]]= false;defaultmapsettings[_0xaf82[877]]= false;window[_0xaf82[1671]][_0xaf82[1689]]= false;window[_0xaf82[1671]][_0xaf82[1690]]= false;window[_0xaf82[1671]][_0xaf82[1691]]= false;window[_0xaf82[1671]][_0xaf82[1692]]= false;window[_0xaf82[1671]][_0xaf82[1693]]= true;$(_0xaf82[74])[_0xaf82[208]]()}function joinSERVERfindinfo(){$(_0xaf82[961])[_0xaf82[281]](_0xaf82[6]);var _0xf2ddx217;setTimeout(function(){_0xf2ddx217= $(_0xaf82[213])[_0xaf82[59]]();if(_0xf2ddx217!= null){$(_0xaf82[969])[_0xaf82[59]](_0xf2ddx217);getSNEZServers(_0xaf82[1663]);client2[_0xaf82[704]]();setTimeout(function(){if($(_0xaf82[1664])[_0xaf82[281]]()!= undefined&& $(_0xaf82[1664])[_0xaf82[281]]()!= _0xaf82[6]){for(var _0xf2ddxd8=0;_0xf2ddxd8< $(_0xaf82[1664])[_0xaf82[140]];_0xf2ddxd8++){if($(_0xaf82[1666])[_0xaf82[1694]](_0xf2ddxd8)[_0xaf82[281]]()== $(_0xaf82[293])[_0xaf82[59]]()){$(_0xaf82[1664])[_0xaf82[1694]](_0xf2ddxd8)[_0xaf82[176]]()};if($(_0xaf82[1695])[_0xaf82[1694]](_0xf2ddxd8)[_0xaf82[281]]()== null|| $(_0xaf82[1695])[_0xaf82[1694]](_0xf2ddxd8)[_0xaf82[281]]()== _0xaf82[4]){$(_0xaf82[1664])[_0xaf82[1694]](_0xf2ddxd8)[_0xaf82[176]]()};if($(_0xaf82[1696])[_0xaf82[1694]](_0xf2ddxd8)[_0xaf82[281]]()== null|| $(_0xaf82[1696])[_0xaf82[1694]](_0xf2ddxd8)[_0xaf82[281]]()== _0xaf82[4]){$(_0xaf82[1664])[_0xaf82[1694]](_0xf2ddxd8)[_0xaf82[176]]()}};if($(_0xaf82[1664])[_0xaf82[281]]()!= undefined&& $(_0xaf82[1664])[_0xaf82[281]]()!= _0xaf82[6]){Regions= {};var _0xf2ddx145=0;$(_0xaf82[60])[_0xaf82[1698]](_0xaf82[1697])[_0xaf82[930]](function(){Regions[_0xf2ddx145]= $(this)[_0xaf82[59]]();_0xf2ddx145++});Modes= {};var _0xf2ddx144=0;$(_0xaf82[69])[_0xaf82[1698]](_0xaf82[1697])[_0xaf82[930]](function(){if($(this)[_0xaf82[59]]()== _0xaf82[261]|| $(this)[_0xaf82[59]]()== _0xaf82[1699]|| $(this)[_0xaf82[59]]()== _0xaf82[263]|| $(this)[_0xaf82[59]]()== _0xaf82[265]|| $(this)[_0xaf82[59]]()== _0xaf82[68]){Modes[_0xf2ddx144]= $(this)[_0xaf82[59]]();_0xf2ddx144++}});countRegions= new Array(8)[_0xaf82[921]](0);for(var _0xf2ddxd8=0;_0xf2ddxd8< $(_0xaf82[1664])[_0xaf82[140]];_0xf2ddxd8++){if($(_0xaf82[1695])[_0xaf82[1694]](_0xf2ddxd8)[_0xaf82[281]]()!= null&& $(_0xaf82[1695])[_0xaf82[1694]](_0xf2ddxd8)[_0xaf82[281]]()!= null){for(var _0xf2ddx143=0;_0xf2ddx143<= 8;_0xf2ddx143++){if($(_0xaf82[1695])[_0xaf82[1694]](_0xf2ddxd8)[_0xaf82[281]]()== Regions[_0xf2ddx143]){countRegions[_0xf2ddx143]++}}}};countModes= new Array(5)[_0xaf82[921]](0);for(var _0xf2ddxd8=0;_0xf2ddxd8< $(_0xaf82[1664])[_0xaf82[140]];_0xf2ddxd8++){if($(_0xaf82[1696])[_0xaf82[1694]](_0xf2ddxd8)[_0xaf82[281]]()!= null&& $(_0xaf82[1695])[_0xaf82[1694]](_0xf2ddxd8)[_0xaf82[281]]()!= null){for(var _0xf2ddx143=0;_0xf2ddx143< 5;_0xf2ddx143++){if($(_0xaf82[1696])[_0xaf82[1694]](_0xf2ddxd8)[_0xaf82[281]]()== Modes[_0xf2ddx143]){countModes[_0xf2ddx143]++}}}};var _0xf2ddx218=0;var _0xf2ddx219=0;var _0xf2ddx21a=0;var _0xf2ddx21b=0;var _0xf2ddx21c=_0xaf82[6];for(var _0xf2ddxd8=0;_0xf2ddxd8< countRegions[_0xaf82[140]];_0xf2ddxd8++){if(countRegions[_0xf2ddxd8]> 0){if(_0xf2ddxd8!= 0){_0xf2ddx21c= _0xf2ddx21c+ countRegions[_0xf2ddxd8]+ _0xaf82[1700]+ Regions[_0xf2ddxd8]+ _0xaf82[324];if(countRegions[_0xf2ddxd8]> _0xf2ddx218){_0xf2ddx218= countRegions[_0xf2ddxd8];_0xf2ddx21a= Regions[_0xf2ddxd8]}}}};for(var _0xf2ddxd8=-1;_0xf2ddxd8< countModes[_0xaf82[140]];_0xf2ddxd8++){if(countModes[_0xf2ddxd8]> 0){if(_0xf2ddxd8!= -1){_0xf2ddx21c= _0xf2ddx21c+ countModes[_0xf2ddxd8]+ _0xaf82[1701]+ Modes[_0xf2ddxd8]+ _0xaf82[324];if(countModes[_0xf2ddxd8]> _0xf2ddx219){_0xf2ddx219= countModes[_0xf2ddxd8];_0xf2ddx21b= Modes[_0xf2ddxd8]}}}};realmode= _0xf2ddx21b;region= _0xf2ddx21a;setTimeout(function(){if(_0xf2ddx21a!= 0&& _0xf2ddx21a!= null&& _0xf2ddx21b!= 0&& _0xf2ddx21b!= null){if(document[_0xaf82[56]][_0xaf82[55]](_0xaf82[54])){history[_0xaf82[220]](stateObj,_0xaf82[216],_0xaf82[217]+ currentIP)}else {if(legendmod[_0xaf82[215]]){history[_0xaf82[220]](stateObj,_0xaf82[216],_0xaf82[221]+ currentIP+ _0xaf82[218]+ _0xf2ddx21a+ _0xaf82[219]+ _0xf2ddx21b)}else {if(!legendmod[_0xaf82[215]]){history[_0xaf82[220]](stateObj,_0xaf82[216],_0xaf82[221]+ currentIP)}}}};ModeRegionregion()},1500);if($(_0xaf82[60])[_0xaf82[59]]()!= _0xf2ddx21a|| $(_0xaf82[69])[_0xaf82[59]]()!= _0xf2ddx21b){_0xf2ddx21c= _0xf2ddx21c+ _0xaf82[1702]+ _0xf2ddx21a+ _0xaf82[1703]+ _0xf2ddx21b+ _0xaf82[1704];_0xf2ddx21c= _0xf2ddx21c+ _0xaf82[1705];toastr[_0xaf82[157]](_0xf2ddx21c)[_0xaf82[73]](_0xaf82[71],_0xaf82[182]);if(_0xf2ddx21a!= 0&& _0xf2ddx21a!= null){$(_0xaf82[60])[_0xaf82[59]](_0xf2ddx21a);master[_0xaf82[1706]]= $(_0xaf82[60])[_0xaf82[59]]()};if(_0xf2ddx21b!= 0&& _0xf2ddx21b!= null){$(_0xaf82[69])[_0xaf82[59]](_0xf2ddx21b);master[_0xaf82[67]]= $(_0xaf82[69])[_0xaf82[59]]();legendmod[_0xaf82[67]]= master[_0xaf82[67]]}}}}},1500)}},100)}function ModeRegionregion(){realmode= $(_0xaf82[69])[_0xaf82[59]]();region= $(_0xaf82[60])[_0xaf82[59]]();return realmode,region}function ytFrame(){setTimeout(function(){if( typeof YT!== _0xaf82[938]){musicPlayer= new YT.Player(_0xaf82[1707],{events:{'\x6F\x6E\x53\x74\x61\x74\x65\x43\x68\x61\x6E\x67\x65':function(_0xf2ddx1e4){if(_0xf2ddx1e4[_0xaf82[1250]]== 1){$(_0xaf82[1543])[_0xaf82[247]](_0xaf82[1542])[_0xaf82[245]](_0xaf82[1541]);$(_0xaf82[544])[_0xaf82[206]](_0xaf82[986],Premadeletter60)[_0xaf82[1300]](_0xaf82[1544])}else {$(_0xaf82[1543])[_0xaf82[247]](_0xaf82[1541])[_0xaf82[245]](_0xaf82[1542]);$(_0xaf82[544])[_0xaf82[206]](_0xaf82[986],Premadeletter13)[_0xaf82[1300]](_0xaf82[1544])}}}})}},1500)}function BeforeSpecialDeals(){var _0xf2ddx220=document[_0xaf82[936]](_0xaf82[935]);_0xf2ddx220[_0xaf82[926]]= _0xaf82[937];_0xf2ddx220[_0xaf82[470]]= _0xaf82[1708];$(_0xaf82[280])[_0xaf82[279]](_0xf2ddx220)}function BeforeLegendmodShop(){var _0xf2ddx220=document[_0xaf82[936]](_0xaf82[935]);_0xf2ddx220[_0xaf82[926]]= _0xaf82[937];_0xf2ddx220[_0xaf82[470]]= _0xaf82[1709];$(_0xaf82[280])[_0xaf82[279]](_0xf2ddx220)}function BeforeReplay(){var _0xf2ddx223=document[_0xaf82[936]](_0xaf82[935]);_0xf2ddx223[_0xaf82[926]]= _0xaf82[937];_0xf2ddx223[_0xaf82[470]]= _0xaf82[1710];$(_0xaf82[280])[_0xaf82[279]](_0xf2ddx223)}function isEquivalent(_0xf2ddx8e,_0xf2ddx91){var _0xf2ddx225=Object[_0xaf82[1711]](_0xf2ddx8e);var _0xf2ddx226=Object[_0xaf82[1711]](_0xf2ddx91);if(_0xf2ddx225[_0xaf82[140]]!= _0xf2ddx226[_0xaf82[140]]){return false};for(var _0xf2ddxd8=0;_0xf2ddxd8< _0xf2ddx225[_0xaf82[140]];_0xf2ddxd8++){var _0xf2ddx227=_0xf2ddx225[_0xf2ddxd8];if(_0xf2ddx8e[_0xf2ddx227]!== _0xf2ddx91[_0xf2ddx227]){return false}};return true}function AgarVersionDestinations(){window[_0xaf82[1712]]= false;window[_0xaf82[1713]]= {};window[_0xaf82[1713]][Object[_0xaf82[833]](agarversionDestinations)[_0xaf82[140]]- 1]= window[_0xaf82[1606]];getSNEZ(_0xaf82[1224],_0xaf82[1714],_0xaf82[1715]);var _0xf2ddx229=JSON[_0xaf82[107]](xhttp[_0xaf82[1228]]);for(var _0xf2ddxd8=0;_0xf2ddxd8< Object[_0xaf82[833]](_0xf2ddx229)[_0xaf82[140]];_0xf2ddxd8++){if(_0xf2ddx229[_0xf2ddxd8]== window[_0xaf82[1606]]){window[_0xaf82[1712]]= true}};if(window[_0xaf82[1712]]== true){window[_0xaf82[1713]]= _0xf2ddx229;window[_0xaf82[1712]]= false}else {if(window[_0xaf82[1712]]== false&& isObject(_0xf2ddx229)){window[_0xaf82[1713]]= _0xf2ddx229;window[_0xaf82[1713]][Object[_0xaf82[833]](_0xf2ddx229)[_0xaf82[140]]]= window[_0xaf82[1606]];postSNEZ(_0xaf82[1224],_0xaf82[1714],_0xaf82[1715],JSON[_0xaf82[415]](window[_0xaf82[1713]]))}}}function isObject(_0xf2ddx22b){if(_0xf2ddx22b=== null){return false};return (( typeof _0xf2ddx22b=== _0xaf82[1716])|| ( typeof _0xf2ddx22b=== _0xaf82[1717]))}function LegendModServerConnect(){}function UIDcontroller(){PremiumUsers();AgarBannedUIDs();var _0xf2ddx22e=localStorage[_0xaf82[3]](_0xaf82[1718]);if(bannedUserUIDs[_0xaf82[55]](window[_0xaf82[186]])|| _0xf2ddx22e== _0xaf82[115]){localStorage[_0xaf82[117]](_0xaf82[1718],true);document[_0xaf82[204]][_0xaf82[203]]= _0xaf82[6];window[_0xaf82[934]][_0xaf82[117]](_0xaf82[1719],defaultSettings[_0xaf82[1720]]);toastr[_0xaf82[173]](_0xaf82[199]+ Premadeletter123+ _0xaf82[200]+ _0xaf82[1721]+ _0xaf82[1722]+ _0xaf82[1723])[_0xaf82[73]](_0xaf82[71],_0xaf82[182])}}function AgarBannedUIDs(){getSNEZ(_0xaf82[1224],_0xaf82[1724],_0xaf82[1725]);var _0xf2ddx230=JSON[_0xaf82[107]](xhttp[_0xaf82[1228]]);for(var _0xf2ddxd8=0;_0xf2ddxd8< Object[_0xaf82[833]](_0xf2ddx230)[_0xaf82[140]];_0xf2ddxd8++){if(window[_0xaf82[1726]]){_0xf2ddx230[_0xf2ddxd8][_0xaf82[190]](_0xaf82[189])[0];if(!bannedUserUIDs[_0xaf82[55]](_0xf2ddx230[_0xf2ddxd8])){window[_0xaf82[1726]][_0xaf82[885]](_0xf2ddx230[_0xf2ddxd8])}}};window[_0xaf82[1727]]= true}function AddAgarBannedUIDs(_0xf2ddx232){if(window[_0xaf82[1726]]&& window[_0xaf82[1727]]){if(!window[_0xaf82[1726]][_0xaf82[55]](_0xf2ddx232)&& _0xf2ddx232!= null && _0xf2ddx232!= _0xaf82[6] && window[_0xaf82[186]][_0xaf82[55]](_0xaf82[1728])){window[_0xaf82[1726]][window[_0xaf82[1726]][_0xaf82[140]]]= _0xf2ddx232;postSNEZ(_0xaf82[1224],_0xaf82[1724],_0xaf82[1725],JSON[_0xaf82[415]](window[_0xaf82[1726]]))}}}function RemoveAgarBannedUIDs(_0xf2ddx232){if(window[_0xaf82[1726]]&& window[_0xaf82[1727]]){if(_0xf2ddx232!= null){for(var _0xf2ddxd8=bannedUserUIDs[_0xaf82[140]]- 1;_0xf2ddxd8>= 0;_0xf2ddxd8--){if(bannedUserUIDs[_0xf2ddxd8]=== _0xf2ddx232){bannedUserUIDs[_0xaf82[1729]](_0xf2ddxd8,1)}};postSNEZ(_0xaf82[1224],_0xaf82[1724],_0xaf82[1725],JSON[_0xaf82[415]](window[_0xaf82[1726]]))}}}function BannedUIDS(){if(AdminRights== 1){if(window[_0xaf82[1727]]){$(_0xaf82[527])[_0xaf82[130]](_0xaf82[1730]+ _0xaf82[1731]+ _0xaf82[1732]+ _0xaf82[1733]+ _0xaf82[1734]+ Premadeletter113+ _0xaf82[1735]+ Premadeletter113+ _0xaf82[1736]+ _0xaf82[1737]+ _0xaf82[1738]+ _0xaf82[1739]+ _0xaf82[652]+ _0xaf82[1740]+ _0xaf82[1741]+ _0xaf82[1742]+ _0xaf82[1743]+ _0xaf82[1744]+ _0xaf82[1745]+ _0xaf82[1746]+ _0xaf82[1747]+ _0xaf82[1748]+ _0xaf82[1749]+ _0xaf82[324]+ _0xaf82[1750]+ _0xaf82[1751]+ _0xaf82[1752]+ window[_0xaf82[186]]+ _0xaf82[1753]+ _0xaf82[652]+ _0xaf82[652]+ _0xaf82[652]+ _0xaf82[652]);populateBanListConfig();$(_0xaf82[1755])[_0xaf82[208]](function(){$(_0xaf82[1754])[_0xaf82[176]]()});$(_0xaf82[1757])[_0xaf82[208]](function(){window[_0xaf82[119]](_0xaf82[1756],_0xaf82[486])});$(_0xaf82[1764])[_0xaf82[208]](function(){var _0xf2ddx9d=$(_0xaf82[1758])[_0xaf82[59]]();if(!bannedUserUIDs[_0xaf82[55]](_0xf2ddx9d)&& _0xf2ddx9d!= null && _0xf2ddx9d!= _0xaf82[6] && _0xf2ddx9d[_0xaf82[55]](_0xaf82[1728])){AddAgarBannedUIDs(_0xf2ddx9d);bannedUserUIDs[_0xaf82[885]](_0xf2ddx9d);var _0xf2ddx235=document[_0xaf82[936]](_0xaf82[1697]);_0xf2ddx235[_0xaf82[76]]= _0xf2ddx9d;document[_0xaf82[407]](_0xaf82[1760])[_0xaf82[1759]][_0xaf82[823]](_0xf2ddx235);toastr[_0xaf82[157]](_0xaf82[199]+ Premadeletter123+ _0xaf82[200]+ _0xaf82[1761]+ _0xf2ddx9d+ _0xaf82[1762])}else {toastr[_0xaf82[157]](_0xaf82[199]+ Premadeletter123+ _0xaf82[200]+ _0xaf82[1761]+ _0xf2ddx9d+ _0xaf82[1763])}});$(_0xaf82[1768])[_0xaf82[208]](function(){var _0xf2ddx9d=$(_0xaf82[1765])[_0xaf82[59]]();var _0xf2ddxe2=document[_0xaf82[407]](_0xaf82[1760]);_0xf2ddxe2[_0xaf82[176]](_0xf2ddxe2[_0xaf82[1766]]);RemoveAgarBannedUIDs(_0xf2ddx9d);toastr[_0xaf82[157]](_0xaf82[199]+ Premadeletter123+ _0xaf82[200]+ _0xaf82[1761]+ _0xf2ddx9d+ _0xaf82[1767])})}else {toastr[_0xaf82[157]](_0xaf82[199]+ Premadeletter123+ _0xaf82[200]+ _0xaf82[1769])}}else {toastr[_0xaf82[157]](_0xaf82[199]+ Premadeletter123+ _0xaf82[200]+ _0xaf82[1770])}}function populateBanListConfig(){var _0xf2ddx237=document[_0xaf82[407]](_0xaf82[1760]);for(i= 0;i< Object[_0xaf82[833]](window[_0xaf82[1726]])[_0xaf82[140]];i++){_0xf2ddx237[_0xaf82[1759]][_0xf2ddx237[_0xaf82[1759]][_0xaf82[140]]]= new Option(window[_0xaf82[1726]][i])}}function findUserLang(){if(window[_0xaf82[1772]][_0xaf82[1771]]){if(window[_0xaf82[1772]][_0xaf82[1771]][0]&& (window[_0xaf82[1772]][_0xaf82[1771]][0]== _0xaf82[1773]|| window[_0xaf82[1772]][_0xaf82[1771]][1][_0xaf82[55]](_0xaf82[1728]))){if(window[_0xaf82[1772]][_0xaf82[1771]][1]&& (window[_0xaf82[1772]][_0xaf82[1771]][1]== _0xaf82[1773]|| window[_0xaf82[1772]][_0xaf82[1771]][1][_0xaf82[55]](_0xaf82[1728]))){if(window[_0xaf82[1772]][_0xaf82[1771]][2]&& (window[_0xaf82[1772]][_0xaf82[1771]][2]== _0xaf82[1773]|| window[_0xaf82[1772]][_0xaf82[1771]][2][_0xaf82[55]](_0xaf82[1728]))){if(window[_0xaf82[1772]][_0xaf82[1771]][3]&& !(window[_0xaf82[1772]][_0xaf82[1771]][2]== _0xaf82[1773]|| window[_0xaf82[1772]][_0xaf82[1771]][2][_0xaf82[55]](_0xaf82[1728]))){window[_0xaf82[1]]= window[_0xaf82[1772]][_0xaf82[1771]][3]}}else {window[_0xaf82[1]]= window[_0xaf82[1772]][_0xaf82[1771]][2]}}else {window[_0xaf82[1]]= window[_0xaf82[1772]][_0xaf82[1771]][1]}}else {window[_0xaf82[1]]= window[_0xaf82[1772]][_0xaf82[1771]][0]}}}function startTranslating(){var _0xf2ddx23a=document[_0xaf82[396]](_0xaf82[597]);var _0xf2ddx23b={childList:true,attributes:false,subtree:false};var _0xf2ddx23c= new MutationObserver(_0xf2ddx23d);function _0xf2ddx23d(_0xf2ddx23e,_0xf2ddx23c){_0xf2ddx23e[_0xaf82[832]]((_0xf2ddx1d1)=>{if(defaultmapsettings[_0xaf82[1774]]&& _0xf2ddx23a[_0xaf82[1777]][_0xaf82[1776]][_0xaf82[1775]](_0xaf82[835])&& !_0xf2ddx23a[_0xaf82[1777]][_0xaf82[1776]][_0xaf82[1775]](_0xaf82[811])){doMainTranslation(_0xf2ddx23a,_0xf2ddx23a[_0xaf82[1777]][_0xaf82[1777]][_0xaf82[1779]][_0xaf82[1778]])}})}_0xf2ddx23c[_0xaf82[1210]](_0xf2ddx23a,_0xf2ddx23b)}function doMainTranslation(_0xf2ddx23a,_0xf2ddx240){var _0xf2ddx241=document[_0xaf82[936]](_0xaf82[1052]);var _0xf2ddx242;_0xf2ddx241[_0xaf82[1045]][_0xaf82[662]]= _0xaf82[1780];_0xf2ddx241[_0xaf82[1045]][_0xaf82[1781]]= _0xaf82[1782];var _0xf2ddx243= new XMLHttpRequest();_0xf2ddx243[_0xaf82[119]](_0xaf82[1783],_0xaf82[1784]+ encodeURIComponent(_0xf2ddx240)+ _0xaf82[1785]+ window[_0xaf82[1]]+ _0xaf82[1786],true);_0xf2ddx243[_0xaf82[1787]]= function(){if(_0xf2ddx243[_0xaf82[1248]]== 4){if(_0xf2ddx243[_0xaf82[1788]]== 200){var _0xf2ddxfe=_0xf2ddx243[_0xaf82[1789]];_0xf2ddxfe= JSON[_0xaf82[107]](_0xf2ddxfe);_0xf2ddxfe= _0xf2ddxfe[_0xaf82[76]][0];_0xf2ddx241[_0xaf82[1778]]= _0xaf82[907]+ _0xf2ddxfe+ _0xaf82[909];_0xf2ddx242= _0xaf82[907]+ _0xf2ddxfe+ _0xaf82[909]}}};_0xf2ddx243[_0xaf82[123]]();_0xf2ddx23a[_0xaf82[1777]][_0xaf82[1777]][_0xaf82[940]](_0xf2ddx241)}function changeFrameWork(){if($(_0xaf82[1345])[_0xaf82[59]]()== _0xaf82[116]){defaultmapsettings[_0xaf82[1331]]= false}else {if($(_0xaf82[1345])[_0xaf82[59]]()== _0xaf82[115]){defaultmapsettings[_0xaf82[1331]]= true}else {if($(_0xaf82[1345])[_0xaf82[59]]()== 2){defaultmapsettings[_0xaf82[1331]]= 2}else {if($(_0xaf82[1345])[_0xaf82[59]]()== 4){defaultmapsettings[_0xaf82[1331]]= 4}else {if($(_0xaf82[1345])[_0xaf82[59]]()== 8){defaultmapsettings[_0xaf82[1331]]= 8}else {if($(_0xaf82[1345])[_0xaf82[59]]()== 16){defaultmapsettings[_0xaf82[1331]]= 16}else {if($(_0xaf82[1345])[_0xaf82[59]]()== 32){defaultmapsettings[_0xaf82[1331]]= 32}else {if($(_0xaf82[1345])[_0xaf82[59]]()== 64){defaultmapsettings[_0xaf82[1331]]= 64}else {if($(_0xaf82[1345])[_0xaf82[59]]()== _0xaf82[1790]){defaultmapsettings[_0xaf82[1331]]= _0xaf82[1790]}else {if($(_0xaf82[1345])[_0xaf82[59]]()== _0xaf82[1791]){defaultmapsettings[_0xaf82[1331]]= _0xaf82[1791]}}}}}}}}}};application[_0xaf82[1793]](defaultmapsettings,_0xaf82[1792])}function changeFrameWorkStart(){if(defaultmapsettings[_0xaf82[1331]]== true){setTimeout(function(){$(_0xaf82[1345])[_0xaf82[59]](_0xaf82[115])},10)};if(defaultmapsettings[_0xaf82[1331]]){$(_0xaf82[1345])[_0xaf82[59]](defaultmapsettings[_0xaf82[1331]])}else {if(defaultmapsettings[_0xaf82[1331]]== false){$(_0xaf82[1345])[_0xaf82[59]](_0xaf82[116])}}}function LMrewardDay(){$(_0xaf82[527])[_0xaf82[130]](_0xaf82[1794]+ _0xaf82[1731]+ _0xaf82[1795]+ _0xaf82[1733]+ _0xaf82[1796]+ Premadeletter113+ _0xaf82[1797]+ Premadeletter113+ _0xaf82[1736]+ _0xaf82[1737]+ _0xaf82[1798]+ _0xaf82[1739]+ _0xaf82[652]+ _0xaf82[1799]+ _0xaf82[652]+ _0xaf82[652]+ _0xaf82[652]+ _0xaf82[652]);$(_0xaf82[1800])[_0xaf82[695]]();$(_0xaf82[1802])[_0xaf82[208]](function(){$(_0xaf82[1801])[_0xaf82[176]]()});$(_0xaf82[1804])[_0xaf82[208]](function(){window[_0xaf82[119]](_0xaf82[1803],_0xaf82[486])})}function VideoSkinsPromo(){$(_0xaf82[527])[_0xaf82[130]](_0xaf82[1794]+ _0xaf82[1731]+ _0xaf82[1795]+ _0xaf82[1733]+ _0xaf82[1796]+ Premadeletter113+ _0xaf82[1797]+ Premadeletter113+ _0xaf82[1736]+ _0xaf82[1737]+ _0xaf82[1805]+ _0xaf82[1739]+ _0xaf82[652]+ _0xaf82[1806]+ _0xaf82[652]+ _0xaf82[652]+ _0xaf82[652]+ _0xaf82[652]);$(_0xaf82[1800])[_0xaf82[695]]();$(_0xaf82[1802])[_0xaf82[208]](function(){$(_0xaf82[1801])[_0xaf82[176]]()});$(_0xaf82[1804])[_0xaf82[208]](function(){window[_0xaf82[119]](_0xaf82[1803],_0xaf82[486])})}Premadeletter39= _0xaf82[1807];function adminstuff(){defaultSettings[_0xaf82[1720]]= _0xaf82[1808];window[_0xaf82[934]][_0xaf82[117]](_0xaf82[1809],JSON[_0xaf82[415]](defaultSettings));var legbgpic=$(_0xaf82[103])[_0xaf82[59]]();var legbgcolor=$(_0xaf82[102])[_0xaf82[59]]();$(_0xaf82[327])[_0xaf82[130]](_0xaf82[1810]+ legbgpic+ _0xaf82[305]+ legbgcolor+ _0xaf82[1811]+ _0xaf82[1812]+ _0xaf82[1813]+ _0xaf82[1814]+ _0xaf82[1815]+ _0xaf82[1816]+ _0xaf82[1817]+ _0xaf82[326]);$(_0xaf82[1819])[_0xaf82[130]](_0xaf82[1818]);$(_0xaf82[1820])[_0xaf82[59]](_0xaf82[549]);if(localStorage[_0xaf82[3]](_0xaf82[1821])&& localStorage[_0xaf82[3]](_0xaf82[1821])!= _0xaf82[6]){$(_0xaf82[1820])[_0xaf82[59]](localStorage[_0xaf82[3]](_0xaf82[1821]))};$(_0xaf82[1823])[_0xaf82[59]](localStorage[_0xaf82[3]](_0xaf82[1822]));$(_0xaf82[1820])[_0xaf82[1121]](function(){AdminClanSymbol= $(_0xaf82[1820])[_0xaf82[59]]();localStorage[_0xaf82[117]](_0xaf82[1821],AdminClanSymbol)});$(_0xaf82[1823])[_0xaf82[1121]](function(){AdminPassword= $(_0xaf82[1823])[_0xaf82[59]]();if($(_0xaf82[1820])[_0xaf82[59]]()!= _0xaf82[6]){if(AdminPassword== atob(_0xaf82[1824])){localStorage[_0xaf82[117]](_0xaf82[1822],AdminPassword);toastr[_0xaf82[184]](_0xaf82[1825]+ document[_0xaf82[407]](_0xaf82[372])[_0xaf82[405]]+ _0xaf82[1826]);$(_0xaf82[376])[_0xaf82[87]]();$(_0xaf82[377])[_0xaf82[87]]();$(_0xaf82[378])[_0xaf82[87]]();$(_0xaf82[379])[_0xaf82[87]]();$(_0xaf82[1827])[_0xaf82[61]]();$(_0xaf82[1088])[_0xaf82[713]](_0xaf82[1828]+ _0xaf82[1829]+ _0xaf82[1830]+ _0xaf82[1831]+ _0xaf82[1832]+ _0xaf82[1833]+ _0xaf82[652]);return AdminRights= 1}else {toastr[_0xaf82[157]](_0xaf82[199]+ Premadeletter123+ _0xaf82[200]+ _0xaf82[1834])}}else {toastr[_0xaf82[157]](_0xaf82[199]+ Premadeletter123+ _0xaf82[200]+ _0xaf82[1835])}});$(_0xaf82[293])[_0xaf82[1121]](function(){if($(_0xaf82[1837])[_0xaf82[596]](_0xaf82[1836])|| $(_0xaf82[1837])[_0xaf82[140]]== 0){if($(_0xaf82[293])[_0xaf82[59]]()== _0xaf82[1838]|| $(_0xaf82[293])[_0xaf82[59]]()== _0xaf82[1839]|| $(_0xaf82[293])[_0xaf82[59]]()== _0xaf82[1840]|| $(_0xaf82[293])[_0xaf82[59]]()== _0xaf82[1841]){$(_0xaf82[376])[_0xaf82[61]]();$(_0xaf82[377])[_0xaf82[61]]();$(_0xaf82[378])[_0xaf82[61]]();$(_0xaf82[379])[_0xaf82[61]]();$(_0xaf82[1827])[_0xaf82[87]]()}}});if($(_0xaf82[1823])[_0xaf82[59]]()== _0xaf82[1842]){$(_0xaf82[1823])[_0xaf82[1121]]()}}function banlistLM(){BannedUIDS()}function disconnect2min(){if(AdminRights== 1){commandMsg= _0xaf82[551];otherMsg= _0xaf82[6];dosendadmincommand();toastr[_0xaf82[157]](_0xaf82[199]+ Premadeletter123+ _0xaf82[200]+ _0xaf82[1843])}}function disconnectnow(){if(AdminRights== 1){commandMsg= _0xaf82[552];otherMsg= _0xaf82[6];dosendadmincommand();toastr[_0xaf82[157]](_0xaf82[199]+ Premadeletter123+ _0xaf82[200]+ _0xaf82[1844])}}function showstatsphp(){window[_0xaf82[119]](_0xaf82[1845],_0xaf82[486])}function showstatsphp2(){window[_0xaf82[119]](_0xaf82[1846],_0xaf82[486])}function dosendadmincommand(){if(AdminRights== 1){if($(_0xaf82[524])[_0xaf82[73]](_0xaf82[523])== _0xaf82[525]){KeyEvent[_0xaf82[1847]](13,13)};setTimeout(function(){$(_0xaf82[693])[_0xaf82[59]](_0xaf82[1848]+ otherMsg+ _0xaf82[1041]+ commandMsg);KeyEvent[_0xaf82[1847]](13,13);if($(_0xaf82[693])[_0xaf82[73]](_0xaf82[523])== _0xaf82[732]){KeyEvent[_0xaf82[1847]](13,13)};if($(_0xaf82[524])[_0xaf82[73]](_0xaf82[523])== _0xaf82[732]){KeyEvent[_0xaf82[1847]](13,13)}},100)}else {toastr[_0xaf82[157]](_0xaf82[199]+ Premadeletter123+ _0xaf82[200]+ _0xaf82[1849])}}function administrationtools(){$(_0xaf82[376])[_0xaf82[87]]();$(_0xaf82[377])[_0xaf82[87]]();$(_0xaf82[378])[_0xaf82[87]]();$(_0xaf82[379])[_0xaf82[87]]();$(_0xaf82[1827])[_0xaf82[61]]()}function LMadvertisementMegaFFA(){$(_0xaf82[527])[_0xaf82[130]](_0xaf82[1794]+ _0xaf82[1731]+ _0xaf82[1850]+ _0xaf82[1733]+ _0xaf82[1796]+ Premadeletter113+ _0xaf82[1797]+ Premadeletter113+ _0xaf82[1736]+ _0xaf82[1737]+ _0xaf82[1851]+ _0xaf82[1739]+ _0xaf82[652]+ _0xaf82[1852]+ _0xaf82[652]+ _0xaf82[652]+ _0xaf82[652]+ _0xaf82[652]);$(_0xaf82[1800])[_0xaf82[695]]();$(_0xaf82[1802])[_0xaf82[208]](function(){$(_0xaf82[1801])[_0xaf82[176]]()});$(_0xaf82[1804])[_0xaf82[208]](function(){window[_0xaf82[119]](_0xaf82[1803],_0xaf82[486])})}
<ide>
<ide>
<ide>
<ide>
<ide>
<ide>
<del> |
|
Java | apache-2.0 | 1012f68886a17b057546a96c8d0fbdcacd083eef | 0 | pegasus-isi/pegasus,pegasus-isi/pegasus,pegasus-isi/pegasus,pegasus-isi/pegasus,pegasus-isi/pegasus,pegasus-isi/pegasus,pegasus-isi/pegasus,pegasus-isi/pegasus,pegasus-isi/pegasus,pegasus-isi/pegasus | /**
* Copyright 2007-2008 University Of Southern California
*
* 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 edu.isi.pegasus.planner.code.gridstart;
import edu.isi.pegasus.common.logging.LogManager;
import edu.isi.pegasus.common.util.DefaultStreamGobblerCallback;
import edu.isi.pegasus.common.util.StreamGobbler;
import edu.isi.pegasus.common.util.StreamGobblerCallback;
import edu.isi.pegasus.common.util.Version;
import edu.isi.pegasus.planner.catalog.TransformationCatalog;
import edu.isi.pegasus.planner.catalog.site.classes.FileServer;
import edu.isi.pegasus.planner.catalog.site.classes.SiteCatalogEntry;
import edu.isi.pegasus.planner.catalog.site.classes.SiteStore;
import edu.isi.pegasus.planner.catalog.transformation.Mapper;
import edu.isi.pegasus.planner.catalog.transformation.TransformationCatalogEntry;
import edu.isi.pegasus.planner.catalog.transformation.classes.TCType;
import edu.isi.pegasus.planner.classes.ADag;
import edu.isi.pegasus.planner.classes.AggregatedJob;
import edu.isi.pegasus.planner.classes.FileTransfer;
import edu.isi.pegasus.planner.classes.Job;
import edu.isi.pegasus.planner.classes.NameValue;
import edu.isi.pegasus.planner.classes.PegasusBag;
import edu.isi.pegasus.planner.classes.PegasusFile;
import edu.isi.pegasus.planner.classes.PlannerOptions;
import edu.isi.pegasus.planner.classes.TransferJob;
import edu.isi.pegasus.planner.code.GridStart;
import edu.isi.pegasus.planner.common.PegasusProperties;
import edu.isi.pegasus.planner.namespace.Condor;
import edu.isi.pegasus.planner.namespace.Namespace;
import edu.isi.pegasus.planner.namespace.Pegasus;
import edu.isi.pegasus.planner.refiner.DeployWorkerPackage;
import edu.isi.pegasus.planner.transfer.SLS;
import edu.isi.pegasus.planner.transfer.sls.SLSFactory;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileOutputStream;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.util.Collection;
import java.util.HashMap;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Set;
/**
* This class launches all the jobs using Pegasus Lite a shell script based wrapper.
*
* The Pegasus Lite shell script for the compute jobs contains the commands to
*
* <pre>
* 1) create directory on worker node
* 2) fetch input data files
* 3) execute the job
* 4) transfer the output data files
* 5) cleanup the directory
* </pre>
*
*
* The following property should be set to false to disable the staging of the
* SLS files via the first level staging jobs
*
* <pre>
* pegasus.transfer.stage.sls.file false
* </pre>
*
* To enable this implementation at runtime set the following property
* <pre>
* pegasus.gridstart PegasusLite
* </pre>
*
*
* @author Karan Vahi
* @version $Revision$
*/
public class PegasusLite implements GridStart {
private PegasusBag mBag;
private ADag mDAG;
public static final String SEPARATOR = "########################";
public static final char SEPARATOR_CHAR = '#';
public static final int MESSAGE_STRING_LENGTH = 80;
/**
* The basename of the class that is implmenting this. Could have
* been determined by reflection.
*/
public static final String CLASSNAME = "PegasusLite";
/**
* The SHORTNAME for this implementation.
*/
public static final String SHORT_NAME = "pegasus-lite";
/**
* The basename of the pegasus lite common shell functions file.
*/
public static final String PEGASUS_LITE_COMMON_FILE_BASENAME = "pegasus-lite-common.sh";
/**
* The logical name of the transformation that creates directories on the
* remote execution pools.
*/
public static final String XBIT_TRANSFORMATION = "chmod";
/**
* The basename of the pegasus dirmanager executable.
*/
public static final String XBIT_EXECUTABLE_BASENAME = "chmod";
/**
* The transformation namespace for the setXBit jobs.
*/
public static final String XBIT_TRANSFORMATION_NS = "system";
/**
* The version number for the derivations for setXBit jobs.
*/
public static final String XBIT_TRANSFORMATION_VERSION = null;
/**
* The derivation namespace for the setXBit jobs.
*/
public static final String XBIT_DERIVATION_NS = "system";
/**
* The version number for the derivations for setXBit jobs.
*/
public static final String XBIT_DERIVATION_VERSION = null;
/**
* The pegasus lite exitcode success message.
*/
public static final String PEGASUS_LITE_EXITCODE_SUCCESS_MESSAGE = "PegasusLite: exitcode 0";
/**
* Stores the major version of the planner.
*/
private String mMajorVersionLevel;
/**
* Stores the major version of the planner.
*/
private String mMinorVersionLevel;
/**
* Stores the major version of the planner.
*/
private String mPatchVersionLevel;
/**
* The LogManager object which is used to log all the messages.
*/
protected LogManager mLogger;
/**
* The object holding all the properties pertaining to Pegasus.
*/
protected PegasusProperties mProps;
/**
* The submit directory where the submit files are being generated for
* the workflow.
*/
protected String mSubmitDir;
/**
* The argument string containing the arguments with which the exitcode
* is invoked on kickstart output.
*/
// protected String mExitParserArguments;
/**
* A boolean indicating whether to generate lof files or not.
*/
protected boolean mGenerateLOF;
/**
* A boolean indicating whether to have worker node execution or not.
*/
protected boolean mWorkerNodeExecution;
/**
* The handle to the SLS implementor
*/
protected SLS mSLS;
/**
* The options passed to the planner.
*/
protected PlannerOptions mPOptions;
/**
* Handle to the site catalog store.
*/
//protected PoolInfoProvider mSiteHandle;
protected SiteStore mSiteStore;
/**
* An instance variable to track if enabling is happening as part of a clustered job.
* See Bug 21 comments on Pegasus Bugzilla
*/
protected boolean mEnablingPartOfAggregatedJob;
/**
* Handle to kickstart GridStart implementation.
*/
private Kickstart mKickstartGridStartImpl;
/**
* Handle to Transformation Catalog.
*/
private TransformationCatalog mTCHandle;
/**
* Boolean to track whether to stage sls file or not
*/
protected boolean mStageSLSFile;
/**
* The local path on the submit host to pegasus-lite-common.sh
*/
protected String mLocalPathToPegasusLiteCommon;
/**
* Boolean indicating whether worker package transfer is enabled or not
*/
protected boolean mTransferWorkerPackage;
/** A map indexed by execution site and the corresponding worker package
*location in the submit directory
*/
Map<String,String> mWorkerPackageMap ;
/**
* A map indexed by the execution site and value is the path to chmod on
* that site.
*/
private Map<String,String> mChmodOnExecutionSiteMap;
/**
* Initializes the GridStart implementation.
*
* @param bag the bag of objects that is used for initialization.
* @param dag the concrete dag so far.
*/
public void initialize( PegasusBag bag, ADag dag ){
mBag = bag;
mDAG = dag;
mLogger = bag.getLogger();
mSiteStore = bag.getHandleToSiteStore();
mPOptions = bag.getPlannerOptions();
mSubmitDir = mPOptions.getSubmitDirectory();
mProps = bag.getPegasusProperties();
mGenerateLOF = mProps.generateLOFFiles();
mTCHandle = bag.getHandleToTransformationCatalog();
mTransferWorkerPackage = mProps.transferWorkerPackage();
if( mTransferWorkerPackage ){
mWorkerPackageMap = bag.getWorkerPackageMap();
if( mWorkerPackageMap == null ){
mWorkerPackageMap = new HashMap<String,String>();
}
}
else{
mWorkerPackageMap = new HashMap<String,String>();
}
mChmodOnExecutionSiteMap = new HashMap<String,String>();
Version version = Version.instance();
mMajorVersionLevel = version.getMajor();
mMinorVersionLevel = version.getMinor();
mPatchVersionLevel = version.getPatch();
mWorkerNodeExecution = mProps.executeOnWorkerNode();
if( mWorkerNodeExecution ){
//load SLS
mSLS = SLSFactory.loadInstance( bag );
}
else{
//sanity check
throw new RuntimeException( "PegasusLite only works if worker node execution is set. Please set " +
PegasusProperties.PEGASUS_WORKER_NODE_EXECUTION_PROPERTY + " to true .");
}
//pegasus lite needs to disable invoke functionality
mProps.setProperty( PegasusProperties.DISABLE_INVOKE_PROPERTY, "true" );
mEnablingPartOfAggregatedJob = false;
mKickstartGridStartImpl = new Kickstart();
mKickstartGridStartImpl.initialize( bag, dag );
//for pegasus lite we dont want ot use the full path, unless
//a user has specifically catalogued in the transformation catalog
mKickstartGridStartImpl.useFullPathToGridStarts( false );
//for pegasus-lite work, worker node execution is no
//longer handled in kickstart/no kickstart cases
//mKickstartGridStartImpl.mWorkerNodeExecution = false;
mStageSLSFile = mProps.stageSLSFilesViaFirstLevelStaging();
mLocalPathToPegasusLiteCommon = getSubmitHostPathToPegasusLiteCommon( );
}
/**
* Enables a job to run on the grid. This also determines how the
* stdin,stderr and stdout of the job are to be propogated.
* To grid enable a job, the job may need to be wrapped into another
* job, that actually launches the job. It usually results in the job
* description passed being modified modified.
*
* @param job the <code>Job</code> object containing the job description
* of the job that has to be enabled on the grid.
* @param isGlobusJob is <code>true</code>, if the job generated a
* line <code>universe = globus</code>, and thus runs remotely.
* Set to <code>false</code>, if the job runs on the submit
* host in any way.
*
* @return boolean true if enabling was successful,else false.
*/
public boolean enable( AggregatedJob job,boolean isGlobusJob){
//in pegasus lite mode we dont want kickstart to change or create
//worker node directories
for( Iterator it = job.constituentJobsIterator(); it.hasNext() ; ){
Job j = (Job) it.next();
j.vdsNS.construct( Pegasus.CHANGE_DIR_KEY , "false" );
j.vdsNS.construct( Pegasus.CREATE_AND_CHANGE_DIR_KEY, "false" );
}
//for time being we treat clustered jobs same as normal jobs
//in pegasus-lite
return this.enable( (Job)job, isGlobusJob );
/*
boolean result = true;
if( mWorkerNodeExecution ){
File jobWrapper = wrapJobWithPegasusLite( job, isGlobusJob );
//the .sh file is set as the executable for the job
//in addition to setting transfer_executable as true
job.setRemoteExecutable( jobWrapper.getAbsolutePath() );
job.condorVariables.construct( "transfer_executable", "true" );
}
return result;
*/
}
/**
* Enables a job to run on the grid by launching it directly. It ends
* up running the executable directly without going through any intermediate
* launcher executable. It connects the stdio, and stderr to underlying
* condor mechanisms so that they are transported back to the submit host.
*
* @param job the <code>Job</code> object containing the job description
* of the job that has to be enabled on the grid.
* @param isGlobusJob is <code>true</code>, if the job generated a
* line <code>universe = globus</code>, and thus runs remotely.
* Set to <code>false</code>, if the job runs on the submit
* host in any way.
*
* @return boolean true if enabling was successful,else false in case when
* the path to kickstart could not be determined on the site where
* the job is scheduled.
*/
public boolean enable(Job job, boolean isGlobusJob) {
//take care of relative submit directory if specified
String submitDir = mSubmitDir + mSeparator;
//consider case for non worker node execution first
if( !mWorkerNodeExecution ){
//shared filesystem case.
//for now a single job is launched via kickstart only
//no point launching it via seqexec and then kickstart
return mKickstartGridStartImpl.enable( job, isGlobusJob );
}//end of handling of non worker node execution
else{
//handle stuff differently
enableForWorkerNodeExecution( job, isGlobusJob );
}//end of worker node execution
if( mGenerateLOF ){
//but generate lof files nevertheless
//inefficient check here again. just a prototype
//we need to generate -S option only for non transfer jobs
//generate the list of filenames file for the input and output files.
if (! (job instanceof TransferJob)) {
generateListofFilenamesFile( job.getInputFiles(),
job.getID() + ".in.lof");
}
//for cleanup jobs no generation of stats for output files
if (job.getJobType() != Job.CLEANUP_JOB) {
generateListofFilenamesFile(job.getOutputFiles(),
job.getID() + ".out.lof");
}
}///end of mGenerateLOF
return true;
}
/**
* Enables jobs for worker node execution.
*
*
*
* @param job the job to be enabled.
* @param isGlobusJob is <code>true</code>, if the job generated a
* line <code>universe = globus</code>, and thus runs remotely.
* Set to <code>false</code>, if the job runs on the submit
* host in any way.
*/
private void enableForWorkerNodeExecution(Job job, boolean isGlobusJob ) {
if( job.getJobType() == Job.COMPUTE_JOB ){
//in pegasus lite mode we dont want kickstart to change or create
//worker node directories
job.vdsNS.construct( Pegasus.CHANGE_DIR_KEY , "false" );
job.vdsNS.construct( Pegasus.CREATE_AND_CHANGE_DIR_KEY, "false" );
File jobWrapper = wrapJobWithPegasusLite( job, isGlobusJob );
//the job wrapper requires the common functions file
//from the submit host
job.condorVariables.addIPFileForTransfer( this.mLocalPathToPegasusLiteCommon );
//figure out transfer of worker package
if( mTransferWorkerPackage ){
//sanity check to see if PEGASUS_HOME is defined
if( mSiteStore.getEnvironmentVariable( job.getSiteHandle(), "PEGASUS_HOME" ) == null ){
//yes we need to add from the location in the worker package map
String location = this.mWorkerPackageMap.get( job.getSiteHandle() );
if( location == null ){
throw new RuntimeException( "Unable to figure out worker package location for job " + job.getID() );
}
job.condorVariables.addIPFileForTransfer(location);
}
else{
mLogger.log( "No worker package staging for job " + job.getID() +
" PEGASUS_HOME specified in the site catalog for site " + job.getSiteHandle(),
LogManager.DEBUG_MESSAGE_LEVEL );
}
}
else{
//we don't want pegasus to add a stage worker job.
//but transfer directly if required.
if( mSiteStore.getEnvironmentVariable( job.getSiteHandle(), "PEGASUS_HOME" ) == null ){
//yes we need to add from the location in the worker package map
String location = this.mWorkerPackageMap.get( job.getSiteHandle() );
if( !mWorkerPackageMap.containsKey( job.getSiteHandle()) ){
location = retrieveLocationForWorkerPackageFromTC( job.getSiteHandle() );
//null can be populated as value
this.mWorkerPackageMap.put( job.getSiteHandle(), location );
}
//add only if location is not null
if( location != null ){
job.condorVariables.addIPFileForTransfer( location );
}
}
else{
mLogger.log( "No worker package staging for job " + job.getID() +
" PEGASUS_HOME specified in the site catalog for site " + job.getSiteHandle(),
LogManager.DEBUG_MESSAGE_LEVEL );
}
}
//the .sh file is set as the executable for the job
//in addition to setting transfer_executable as true
job.setRemoteExecutable( jobWrapper.getAbsolutePath() );
job.condorVariables.construct( "transfer_executable", "true" );
}
//for all auxillary jobs let kickstart figure what to do
else{
mKickstartGridStartImpl.enable( job, isGlobusJob );
}
if (job.stdIn.length() > 0) {
//PM-694
//job has a stdin explicitly tracked
//the transfer setup will ensure that the input file appears
//in the directory where the job is launched via pegauss lite
//we just need to unset it, so that the stdin is not transferred
//from the submit directory as happens in sharedfs cases
job.setStdIn( "" );
}
}
/**
* Indicates whether the enabling mechanism can set the X bit
* on the executable on the remote grid site, in addition to launching
* it on the remote grid stie
*
* @return false, as no wrapper executable is being used.
*/
public boolean canSetXBit(){
return false;
}
/**
* Returns the value of the vds profile with key as Pegasus.GRIDSTART_KEY,
* that would result in the loading of this particular implementation.
* It is usually the name of the implementing class without the
* package name.
*
* @return the value of the profile key.
* @see org.griphyn.cPlanner.namespace.Pegasus#GRIDSTART_KEY
*/
public String getVDSKeyValue(){
return PegasusLite.CLASSNAME;
}
/**
* Returns a short textual description in the form of the name of the class.
*
* @return short textual description.
*/
public String shortDescribe(){
return PegasusLite.SHORT_NAME;
}
/**
* Returns the SHORT_NAME for the POSTScript implementation that is used
* to be as default with this GridStart implementation.
*
* @return the identifier for the default POSTScript implementation for
* kickstart gridstart module.
*
* @see Kickstart#defaultPOSTScript()
*/
public String defaultPOSTScript(){
return this.mKickstartGridStartImpl.defaultPOSTScript();
}
/**
* Returns the directory that is associated with the job to specify
* the directory in which the job needs to run
*
* @param job the job
*
* @return the condor key . can be initialdir or remote_initialdir
*/
private String getDirectoryKey(Job job) {
/*
String style = (String)job.vdsNS.get( Pegasus.STYLE_KEY );
//remove the remote or initial dir's for the compute jobs
String key = ( style.equalsIgnoreCase( Pegasus.GLOBUS_STYLE ) )?
"remote_initialdir" :
"initialdir";
*/
String universe = (String) job.condorVariables.get( Condor.UNIVERSE_KEY );
return ( universe.equals( Condor.STANDARD_UNIVERSE ) ||
universe.equals( Condor.LOCAL_UNIVERSE) ||
universe.equals( Condor.SCHEDULER_UNIVERSE ) )?
"initialdir" :
"remote_initialdir";
}
/**
* Returns a boolean indicating whether to remove remote directory
* information or not from the job. This is determined on the basis of the
* style key that is associated with the job.
*
* @param job the job in question.
*
* @return boolean
*/
private boolean removeDirectoryKey(Job job){
String style = job.vdsNS.containsKey(Pegasus.STYLE_KEY) ?
null :
(String)job.vdsNS.get(Pegasus.STYLE_KEY);
//is being run. Remove remote_initialdir if there
//condor style associated with the job
//Karan Nov 15,2005
return (style == null)?
false:
style.equalsIgnoreCase(Pegasus.CONDOR_STYLE);
}
/**
* Constructs a condor variable in the condor profile namespace
* associated with the job. Overrides any preexisting key values.
*
* @param job contains the job description.
* @param key the key of the profile.
* @param value the associated value.
*/
private void construct(Job job, String key, String value){
job.condorVariables.construct(key,value);
}
/**
* Writes out the list of filenames file for the job.
*
* @param files the list of <code>PegasusFile</code> objects contains the files
* whose stat information is required.
*
* @param basename the basename of the file that is to be created
*
* @return the full path to lof file created, else null if no file is written out.
*/
public String generateListofFilenamesFile( Set files, String basename ){
//sanity check
if ( files == null || files.isEmpty() ){
return null;
}
String result = null;
//writing the stdin file
try {
File f = new File( mSubmitDir, basename );
FileWriter input;
input = new FileWriter( f );
PegasusFile pf;
for( Iterator it = files.iterator(); it.hasNext(); ){
pf = ( PegasusFile ) it.next();
input.write( pf.getLFN() );
input.write( "\n" );
}
//close the stream
input.close();
result = f.getAbsolutePath();
} catch ( IOException e) {
mLogger.log("Unable to write the lof file " + basename, e ,
LogManager.ERROR_MESSAGE_LEVEL);
}
return result;
}
/**
* Returns the directory in which the job executes on the worker node.
*
* @param job
*
* @return the full path to the directory where the job executes
*/
public String getWorkerNodeDirectory( Job job ){
//for pegasus-lite for time being we rely on
//$PWD that is resolved in the directory at runtime
return "$PWD";
}
/**
* Generates a seqexec input file for the job. The function first enables the
* job via kickstart module for worker node execution and then retrieves
* the commands to put in the input file from the environment variables specified
* for kickstart.
*
* It creates a single input file for the seqexec invocation.
* The input file contains commands to
*
* <pre>
* 1) create directory on worker node
* 2) fetch input data files
* 3) execute the job
* 4) transfer the output data files
* 5) cleanup the directory
* </pre>
*
* @param job the job to be enabled.
* @param isGlobusJob is <code>true</code>, if the job generated a
* line <code>universe = globus</code>, and thus runs remotely.
* Set to <code>false</code>, if the job runs on the submit
* host in any way.
*
* @return the file handle to the seqexec input file
*/
protected File wrapJobWithPegasusLite(Job job, boolean isGlobusJob) {
File shellWrapper = new File( mSubmitDir, job.getID() + ".sh" );
// Removed for JIRA PM-543
//
// //remove the remote or initial dir's for the compute jobs
// String key = getDirectoryKey( job );
//
// String exectionSiteDirectory = (String)job.condorVariables.removeKey( key );
//PM-590 stricter checks
// FileServer stagingSiteServerForRetrieval = mSiteStore.lookup( job.getStagingSiteHandle() ).getHeadNodeFS().selectScratchSharedFileServer();
SiteCatalogEntry stagingSiteEntry = mSiteStore.lookup( job.getStagingSiteHandle() );
if( stagingSiteEntry == null ){
this.complainForHeadNodeFileServer( job.getID(), job.getStagingSiteHandle());
}
FileServer stagingSiteServerForRetrieval = stagingSiteEntry.selectHeadNodeScratchSharedFileServer( FileServer.OPERATION.get );
if( stagingSiteServerForRetrieval == null ){
this.complainForHeadNodeFileServer( job.getID(), job.getStagingSiteHandle());
}
//String stagingSiteDirectory = mSiteStore.getExternalWorkDirectory(stagingSiteServerForRetrieval, job.getStagingSiteHandle() );
String stagingSiteDirectory = mSiteStore.getInternalWorkDirectory( job, true );
String workerNodeDir = getWorkerNodeDirectory( job );
try{
OutputStream ostream = new FileOutputStream( shellWrapper , true );
PrintWriter writer = new PrintWriter( new BufferedWriter(new OutputStreamWriter(ostream)) );
StringBuffer sb = new StringBuffer( );
sb.append( "#!/bin/bash" ).append( '\n' );
sb.append( "set -e" ).append( '\n' );
sb.append( "pegasus_lite_version_major=\"" ).append( this.mMajorVersionLevel ).append( "\"").append( '\n' );
sb.append( "pegasus_lite_version_minor=\"" ).append( this.mMinorVersionLevel ).append( "\"").append( '\n' );
sb.append( "pegasus_lite_version_patch=\"" ).append( this.mPatchVersionLevel ).append( "\"").append( '\n' );
sb.append( '\n' );
sb.append( ". " ).append( PegasusLite.PEGASUS_LITE_COMMON_FILE_BASENAME ).append( '\n' );
sb.append( '\n' );
sb.append( "pegasus_lite_init\n" );
sb.append( '\n' );
sb.append( "# cleanup in case of failures" ).append( '\n' );
sb.append( "trap pegasus_lite_exit INT TERM EXIT" ).append( '\n' );
sb.append( '\n' );
appendStderrFragment( sb, "Setting up workdir" );
sb.append( "# work dir" ).append( '\n' );
if( mSLS.doesCondorModifications() ){
//when using condor IO with pegasus lite we dont want
//pegasus lite to change the directory where condor
//launches the jobs
sb.append( "export pegasus_lite_work_dir=$PWD" ).append( '\n' );
}
sb.append( "pegasus_lite_setup_work_dir" ).append( '\n' );
sb.append( '\n' );
appendStderrFragment( sb, "figuring out the worker package to use" );
sb.append( "# figure out the worker package to use" ).append( '\n' );
sb.append( "pegasus_lite_worker_package" ).append( '\n' );
sb.append( '\n' );
if( mSLS.needsSLSInputTransfers( job ) ){
//generate the sls file with the mappings in the submit exectionSiteDirectory
Collection<FileTransfer> files = mSLS.determineSLSInputTransfers( job,
mSLS.getSLSInputLFN( job ),
stagingSiteServerForRetrieval,
stagingSiteDirectory,
workerNodeDir );
//PM-779 split the checkpoint files from the input files
//as we want to stage them separately
Collection<FileTransfer> inputFiles = new LinkedList();
Collection<FileTransfer> chkpointFiles = new LinkedList();
for(FileTransfer ft: files ){
if( ft.isCheckpointFile() ){
chkpointFiles.add(ft);
}
else{
inputFiles.add(ft);
}
}
//stage the input files first
if( !inputFiles.isEmpty() ){
appendStderrFragment( sb, "staging in input data and executables" );
sb.append( "# stage in data and executables" ).append( '\n' );
sb.append( mSLS.invocationString( job, null ) );
sb.append( " 1>&2" ).append( " << EOF" ).append( '\n' );
sb.append( convertToTransferInputFormat( inputFiles ) );
sb.append( "EOF" ).append( '\n' );
sb.append( '\n' );
}
//PM-779 checkpoint files need to be setup to never fail
String checkPointFragment = checkpointFilesToPegasusLite( job, chkpointFiles);
if( !checkPointFragment.isEmpty() ){
appendStderrFragment( sb, "staging in checkpoint files" );
sb.append( "# stage in checkpoint files " ).append( '\n' );
sb.append( checkPointFragment );
}
//associate any credentials if required with the job
associateCredentials( job, files );
}
if( job.userExecutablesStagedForJob() ){
appendStderrFragment( sb, "setting the xbit for executables staged" );
sb.append( "# set the xbit for any executables staged" ).append( '\n' );
sb.append( getPathToChmodExecutable( job.getSiteHandle() ) );
sb.append( " +x " );
for( Iterator it = job.getInputFiles().iterator(); it.hasNext(); ){
PegasusFile pf = ( PegasusFile )it.next();
if( pf.getType() == PegasusFile.EXECUTABLE_FILE ){
sb.append( pf.getLFN() ).append( " " );
}
}
sb.append( '\n' );
sb.append( '\n' );
}
appendStderrFragment( sb, "executing the user tasks" );
sb.append( "# execute the tasks" ).append( '\n' ).
append( "set +e" ).append( '\n' );//PM-701
writer.print( sb.toString() );
writer.flush();
sb = new StringBuffer();
//enable the job via kickstart
//separate calls for aggregated and normal jobs
if( job instanceof AggregatedJob ){
this.mKickstartGridStartImpl.enable( (AggregatedJob)job, isGlobusJob );
//for clustered jobs we embed the contents of the input
//file in the shell wrapper itself
sb.append( job.getRemoteExecutable() ).append( " " ).append( job.getArguments() );
sb.append( " << EOF" ).append( '\n' );
sb.append( slurpInFile( mSubmitDir, job.getStdIn() ) );
sb.append( "EOF" ).append( '\n' );
//rest the jobs stdin
job.setStdIn( "" );
job.condorVariables.removeKey( "input" );
}
else{
this.mKickstartGridStartImpl.enable( job, isGlobusJob );
sb.append( job.getRemoteExecutable() ).append( job.getArguments() ).append( '\n' );
}
//PM-701 enable back fail on error
sb.append( "job_ec=$?" ).append( "\n" );
sb.append( "set -e").append( "\n" );
sb.append( '\n' );
//the pegasus lite wrapped job itself does not have any
//arguments passed
job.setArguments( "" );
if( mSLS.needsSLSOutputTransfers( job ) ){
FileServer stagingSiteServerForStore = stagingSiteEntry.selectHeadNodeScratchSharedFileServer( FileServer.OPERATION.put );
if( stagingSiteServerForStore == null ){
this.complainForHeadNodeFileServer( job.getID(), job.getStagingSiteHandle());
}
//String stagingSiteDirectoryForStore = mSiteStore.getExternalWorkDirectory(stagingSiteServerForStore, job.getStagingSiteHandle() );
String stagingSiteDirectoryForStore = mSiteStore.getInternalWorkDirectory( job, true );
//construct the postjob that transfers the output files
//back to head node exectionSiteDirectory
//to fix later. right now post constituentJob only created is pre constituentJob
//created
Collection<FileTransfer> files = mSLS.determineSLSOutputTransfers( job,
mSLS.getSLSOutputLFN( job ),
stagingSiteServerForStore,
stagingSiteDirectoryForStore,
workerNodeDir );
//PM-779 split the checkpoint files from the output files
//as we want to stage them separately
Collection<FileTransfer> outputFiles = new LinkedList();
Collection<FileTransfer> chkpointFiles = new LinkedList();
for(FileTransfer ft: files ){
if( ft.isCheckpointFile() ){
chkpointFiles.add(ft);
}
else{
outputFiles.add(ft);
}
}
//PM-779 checkpoint files need to be setup to never fail
String checkPointFragment = checkpointFilesToPegasusLite( job, chkpointFiles);
if( !checkPointFragment.isEmpty() ){
appendStderrFragment( sb, "staging out checkpoint files" );
sb.append( "# stage out checkpoint files " ).append( '\n' );
sb.append( checkPointFragment );
}
if( !outputFiles.isEmpty() ){
//generate the stage out fragment for staging out outputs
String postJob = mSLS.invocationString( job, null );
appendStderrFragment( sb, "staging out output files" );
sb.append( "# stage out" ).append( '\n' );
sb.append( postJob );
sb.append( " 1>&2" ).append( " << EOF" ).append( '\n' );
sb.append( convertToTransferInputFormat( outputFiles ) );
sb.append( "EOF" ).append( '\n' );
sb.append( '\n' );
}
//associate any credentials if required with the job
associateCredentials( job, files );
}
writer.print( sb.toString() );
writer.flush();
writer.close();
ostream.close();
//set the xbit on the shell script
//for 3.2, we will have 1.6 as the minimum jdk requirement
shellWrapper.setExecutable( true );
//JIRA PM-543
job.setDirectory( null );
//PM-737 explicitly set the success string to look for
//in pegasus lite stderr, when pegasus-exitcode is invoked
//at runtime. we should merge so as not override any existing
//success message patterns
Namespace addOnPegasusProfiles = new Pegasus();
addOnPegasusProfiles.construct(Pegasus.EXITCODE_SUCCESS_MESSAGE, PEGASUS_LITE_EXITCODE_SUCCESS_MESSAGE );
job.vdsNS.merge(addOnPegasusProfiles);
//this.setXBitOnFile( shellWrapper.getAbsolutePath() );
}
catch( IOException ioe ){
throw new RuntimeException( "[Pegasus-Lite] Error while writing out pegasus lite wrapper " + shellWrapper , ioe );
}
//modify the constituentJob if required
if ( !mSLS.modifyJobForWorkerNodeExecution( job,
stagingSiteServerForRetrieval.getURLPrefix(),
stagingSiteDirectory,
workerNodeDir ) ){
throw new RuntimeException( "Unable to modify job " + job.getName() + " for worker node execution" );
}
return shellWrapper;
}
/**
* Convers the collection of files into an input format suitable for the
* transfer executable
*
* @param files Collection of <code>FileTransfer</code> objects.
*
* @return the blurb containing the files in the input format for the transfer
* executable
*/
protected StringBuffer convertToTransferInputFormat( Collection<FileTransfer> files ){
StringBuffer sb = new StringBuffer();
int num = 1;
for( FileTransfer ft : files ){
NameValue nv = ft.getSourceURL();
sb.append( "# " ).append( "src " ).append( num ).append( " " ).append( nv.getKey() ).
append( " " ).append( "checkpoint=\"").append(ft.isCheckpointFile()).append("\"").append( '\n' );
sb.append( nv.getValue() );
sb.append( '\n' );
nv = ft.getDestURL();
sb.append( "# " ).append( "dst " ).append( num ).append( " " ).append( nv.getKey() ).append( '\n' );
sb.append( nv.getValue() );
sb.append( '\n' );
num++;
}
return sb;
}
/**
* Convenience method to slurp in contents of a file into memory.
*
* @param directory the directory where the file resides
* @param file the file to be slurped in.
*
* @return StringBuffer containing the contents
*/
protected StringBuffer slurpInFile( String directory, String file ) throws IOException{
StringBuffer result = new StringBuffer();
//sanity check
if( file == null ){
return result;
}
BufferedReader in = new BufferedReader( new FileReader( new File( directory, file )) );
String line = null;
while(( line = in.readLine() ) != null ){
//System.out.println( line );
result.append( line ).append( '\n' );
}
in.close();
return result;
}
/**
* Returns the path to the chmod executable for a particular execution
* site by looking up the transformation executable.
*
* @param site the execution site.
*
* @return the path to chmod executable
*/
protected String getPathToChmodExecutable( String site ){
String path;
//check if the internal map has anything
path = mChmodOnExecutionSiteMap.get( site );
if( path != null ){
//return the cached path
return path;
}
List entries;
try {
//try to look up the transformation catalog for the path
entries = mTCHandle.lookup( PegasusLite.XBIT_TRANSFORMATION_NS,
PegasusLite.XBIT_TRANSFORMATION,
PegasusLite.XBIT_TRANSFORMATION_VERSION,
site,
TCType.INSTALLED );
} catch (Exception e) {
//non sensical catching
mLogger.log("Unable to retrieve entries from TC " +
e.getMessage(), LogManager.ERROR_MESSAGE_LEVEL );
return null;
}
TransformationCatalogEntry entry = ( entries == null ) ?
null: //try using a default one
(TransformationCatalogEntry) entries.get(0);
if( entry == null ){
//construct the path the default path.
//construct the path to it
StringBuffer sb = new StringBuffer();
sb.append( File.separator ).append( "bin" ).append( File.separator ).
append( PegasusLite.XBIT_EXECUTABLE_BASENAME );
path = sb.toString();
}
else{
path = entry.getPhysicalTransformation();
}
mChmodOnExecutionSiteMap.put( site, path );
return path;
}
/**
* Sets the xbit on the file.
*
* @param file the file for which the xbit is to be set
*
* @return boolean indicating whether xbit was set or not.
*/
protected boolean setXBitOnFile( String file ) {
boolean result = false;
//do some sanity checks on the source and the destination
File f = new File( file );
if( !f.exists() || !f.canRead()){
mLogger.log("The file does not exist " + file,
LogManager.ERROR_MESSAGE_LEVEL);
return result;
}
try{
//set the callback and run the grep command
Runtime r = Runtime.getRuntime();
String command = "chmod +x " + file;
mLogger.log("Setting xbit " + command,
LogManager.DEBUG_MESSAGE_LEVEL);
Process p = r.exec(command);
//the default gobbler callback always log to debug level
StreamGobblerCallback callback =
new DefaultStreamGobblerCallback(LogManager.DEBUG_MESSAGE_LEVEL);
//spawn off the gobblers with the already initialized default callback
StreamGobbler ips =
new StreamGobbler(p.getInputStream(), callback);
StreamGobbler eps =
new StreamGobbler(p.getErrorStream(), callback);
ips.start();
eps.start();
//wait for the threads to finish off
ips.join();
eps.join();
//get the status
int status = p.waitFor();
if( status != 0){
mLogger.log("Command " + command + " exited with status " + status,
LogManager.DEBUG_MESSAGE_LEVEL);
return result;
}
result = true;
}
catch(IOException ioe){
mLogger.log("IOException while creating symbolic links ", ioe,
LogManager.ERROR_MESSAGE_LEVEL);
}
catch( InterruptedException ie){
//ignore
}
return result;
}
/**
* Determines the path to common shell functions file that Pegasus Lite
* wrapped jobs use.
*
* @return the path on the submit host.
*/
protected String getSubmitHostPathToPegasusLiteCommon() {
StringBuffer path = new StringBuffer();
//first get the path to the share directory
File share = mProps.getSharedDir();
if( share == null ){
throw new RuntimeException( "Property for Pegasus share directory is not set" );
}
path.append( share.getAbsolutePath() ).append( File.separator ).
append( "sh" ).append( File.separator ).append( PegasusLite.PEGASUS_LITE_COMMON_FILE_BASENAME );
return path.toString();
}
public void useFullPathToGridStarts(boolean fullPath) {
throw new UnsupportedOperationException("Not supported yet.");
}
/**
* Associates credentials with the job corresponding to the files that
* are being transferred.
*
* @param job the job for which credentials need to be added.
* @param files the files that are being transferred.
*/
private void associateCredentials(Job job, Collection<FileTransfer> files) {
for( FileTransfer ft: files ){
NameValue source = ft.getSourceURL();
job.addCredentialType( source.getKey(), source.getValue() );
NameValue dest = ft.getDestURL();
job.addCredentialType( dest.getKey(), dest.getValue() );
}
}
/**
* Retrieves the location for the pegasus worker package from the TC for a site
*
*
* @return the path to worker package tar file on the site, else null if unable
* to determine
*/
protected String retrieveLocationForWorkerPackageFromTC( String site ) {
String location = null;
Mapper m = mBag.getHandleToTransformationMapper();
if( !m.isStageableMapper() ){
//we want to load a stageable mapper
mLogger.log( "User set mapper is not a stageable mapper. Loading a stageable mapper ", LogManager.DEBUG_MESSAGE_LEVEL );
m = Mapper.loadTCMapper( "Staged", mBag );
}
//check if there is a valid entry for worker package
List entries, selectedEntries = null;
TransformationCatalogEntry entry = null;
try{
entries = m.getTCList( DeployWorkerPackage.TRANSFORMATION_NAMESPACE,
DeployWorkerPackage.TRANSFORMATION_NAME,
DeployWorkerPackage.TRANSFORMATION_VERSION,
site );
if( entries != null && !entries.isEmpty() ){
entry = (TransformationCatalogEntry)entries.get( 0 );
}
}catch( Exception e ){
mLogger.log( "Unable to figure out worker package location for site " + site ,
LogManager.DEBUG_MESSAGE_LEVEL );
}
if( entry != null ){
location = entry.getPhysicalTransformation();
if( location.startsWith( "file:/") ){
location = location.substring( 6 );
}
}
return location;
}
/**
* Complains for a missing head node file server on a site for a job
*
* @param jobname the name of the job
* @param site the site
*/
private void complainForHeadNodeFileServer(String jobname, String site) {
StringBuffer error = new StringBuffer();
error.append( "[PegasusLite] " );
if( jobname != null ){
error.append( "For job (" ).append( jobname).append( ")." );
}
error.append( " File Server not specified for head node scratch shared filesystem for site: ").
append( site );
throw new RuntimeException( error.toString() );
}
/**
* Takes in the checkpoint files, and generates a pegasus-transfer invocation
* that should succeed in case of errors
*
* @param job the job being wrapped with PegasusLite
* @param files the checkpoint files
* @return string representation of the PegasusLite fragment
*/
private String checkpointFilesToPegasusLite(Job job, Collection<FileTransfer> files) {
StringBuilder sb = new StringBuilder();
if( !files.isEmpty() ){
sb.append( "set +e " ).append( "\n");
sb.append( mSLS.invocationString( job, null ) );
sb.append( " 1>&2" ).append( " << EOF" ).append( '\n' );
sb.append( convertToTransferInputFormat( files ) );
sb.append( "EOF" ).append( '\n' );
sb.append( "ec=$?" ).append( '\n' );
sb.append( "set -e").append( '\n' );
sb.append( "if [ $ec -ne 0 ]; then").append( '\n' );
sb.append( " echo \" Ignoring failure while transferring chkpoint files. Exicode was $ec\" 1>&2").append( '\n' );
sb.append( "fi" ).append( '\n' );
sb.append( "\n" );
}
return sb.toString();
}
/**
* Appends a fragment to the pegasus lite script that logs a message to
* stderr
*
* @param sb string buffer
* @param message the message
*/
private void appendStderrFragment(StringBuffer sb, String message ) {
if( message.length() > PegasusLite.MESSAGE_STRING_LENGTH ){
throw new RuntimeException( "Message string for PegasusLite exceeds " + PegasusLite.MESSAGE_STRING_LENGTH + " characters");
}
int pad = ( PegasusLite.MESSAGE_STRING_LENGTH - message.length() )/2;
sb.append( "echo -e \"\\n" );
for( int i = 0; i <= pad ; i ++ ){
sb.append( PegasusLite.SEPARATOR_CHAR );
}
sb.append( " " ).append( message ).append( " " );
for( int i = 0; i <= pad ; i ++ ){
sb.append( PegasusLite.SEPARATOR_CHAR );
}
sb.append( "\" 1>&2").append( "\n" );
return;
}
}
| src/edu/isi/pegasus/planner/code/gridstart/PegasusLite.java | /**
* Copyright 2007-2008 University Of Southern California
*
* 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 edu.isi.pegasus.planner.code.gridstart;
import edu.isi.pegasus.common.logging.LogManager;
import edu.isi.pegasus.common.util.DefaultStreamGobblerCallback;
import edu.isi.pegasus.common.util.StreamGobbler;
import edu.isi.pegasus.common.util.StreamGobblerCallback;
import edu.isi.pegasus.common.util.Version;
import edu.isi.pegasus.planner.catalog.TransformationCatalog;
import edu.isi.pegasus.planner.catalog.site.classes.FileServer;
import edu.isi.pegasus.planner.catalog.site.classes.SiteCatalogEntry;
import edu.isi.pegasus.planner.catalog.site.classes.SiteStore;
import edu.isi.pegasus.planner.catalog.transformation.Mapper;
import edu.isi.pegasus.planner.catalog.transformation.TransformationCatalogEntry;
import edu.isi.pegasus.planner.catalog.transformation.classes.TCType;
import edu.isi.pegasus.planner.classes.ADag;
import edu.isi.pegasus.planner.classes.AggregatedJob;
import edu.isi.pegasus.planner.classes.FileTransfer;
import edu.isi.pegasus.planner.classes.Job;
import edu.isi.pegasus.planner.classes.NameValue;
import edu.isi.pegasus.planner.classes.PegasusBag;
import edu.isi.pegasus.planner.classes.PegasusFile;
import edu.isi.pegasus.planner.classes.PlannerOptions;
import edu.isi.pegasus.planner.classes.TransferJob;
import edu.isi.pegasus.planner.code.GridStart;
import edu.isi.pegasus.planner.common.PegasusProperties;
import edu.isi.pegasus.planner.namespace.Condor;
import edu.isi.pegasus.planner.namespace.Namespace;
import edu.isi.pegasus.planner.namespace.Pegasus;
import edu.isi.pegasus.planner.refiner.DeployWorkerPackage;
import edu.isi.pegasus.planner.transfer.SLS;
import edu.isi.pegasus.planner.transfer.sls.SLSFactory;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileOutputStream;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.util.Collection;
import java.util.HashMap;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Set;
/**
* This class launches all the jobs using Pegasus Lite a shell script based wrapper.
*
* The Pegasus Lite shell script for the compute jobs contains the commands to
*
* <pre>
* 1) create directory on worker node
* 2) fetch input data files
* 3) execute the job
* 4) transfer the output data files
* 5) cleanup the directory
* </pre>
*
*
* The following property should be set to false to disable the staging of the
* SLS files via the first level staging jobs
*
* <pre>
* pegasus.transfer.stage.sls.file false
* </pre>
*
* To enable this implementation at runtime set the following property
* <pre>
* pegasus.gridstart PegasusLite
* </pre>
*
*
* @author Karan Vahi
* @version $Revision$
*/
public class PegasusLite implements GridStart {
private PegasusBag mBag;
private ADag mDAG;
public static final String SEPARATOR = "########################";
public static final char SEPARATOR_CHAR = '#';
public static final int MESSAGE_STRING_LENGTH = 80;
/**
* The basename of the class that is implmenting this. Could have
* been determined by reflection.
*/
public static final String CLASSNAME = "PegasusLite";
/**
* The SHORTNAME for this implementation.
*/
public static final String SHORT_NAME = "pegasus-lite";
/**
* The basename of the pegasus lite common shell functions file.
*/
public static final String PEGASUS_LITE_COMMON_FILE_BASENAME = "pegasus-lite-common.sh";
/**
* The logical name of the transformation that creates directories on the
* remote execution pools.
*/
public static final String XBIT_TRANSFORMATION = "chmod";
/**
* The basename of the pegasus dirmanager executable.
*/
public static final String XBIT_EXECUTABLE_BASENAME = "chmod";
/**
* The transformation namespace for the setXBit jobs.
*/
public static final String XBIT_TRANSFORMATION_NS = "system";
/**
* The version number for the derivations for setXBit jobs.
*/
public static final String XBIT_TRANSFORMATION_VERSION = null;
/**
* The derivation namespace for the setXBit jobs.
*/
public static final String XBIT_DERIVATION_NS = "system";
/**
* The version number for the derivations for setXBit jobs.
*/
public static final String XBIT_DERIVATION_VERSION = null;
/**
* The pegasus lite exitcode success message.
*/
public static final String PEGASUS_LITE_EXITCODE_SUCCESS_MESSAGE = "PegasusLite: exitcode 0";
/**
* Stores the major version of the planner.
*/
private String mMajorVersionLevel;
/**
* Stores the major version of the planner.
*/
private String mMinorVersionLevel;
/**
* Stores the major version of the planner.
*/
private String mPatchVersionLevel;
/**
* The LogManager object which is used to log all the messages.
*/
protected LogManager mLogger;
/**
* The object holding all the properties pertaining to Pegasus.
*/
protected PegasusProperties mProps;
/**
* The submit directory where the submit files are being generated for
* the workflow.
*/
protected String mSubmitDir;
/**
* The argument string containing the arguments with which the exitcode
* is invoked on kickstart output.
*/
// protected String mExitParserArguments;
/**
* A boolean indicating whether to generate lof files or not.
*/
protected boolean mGenerateLOF;
/**
* A boolean indicating whether to have worker node execution or not.
*/
protected boolean mWorkerNodeExecution;
/**
* The handle to the SLS implementor
*/
protected SLS mSLS;
/**
* The options passed to the planner.
*/
protected PlannerOptions mPOptions;
/**
* Handle to the site catalog store.
*/
//protected PoolInfoProvider mSiteHandle;
protected SiteStore mSiteStore;
/**
* An instance variable to track if enabling is happening as part of a clustered job.
* See Bug 21 comments on Pegasus Bugzilla
*/
protected boolean mEnablingPartOfAggregatedJob;
/**
* Handle to kickstart GridStart implementation.
*/
private Kickstart mKickstartGridStartImpl;
/**
* Handle to Transformation Catalog.
*/
private TransformationCatalog mTCHandle;
/**
* Boolean to track whether to stage sls file or not
*/
protected boolean mStageSLSFile;
/**
* The local path on the submit host to pegasus-lite-common.sh
*/
protected String mLocalPathToPegasusLiteCommon;
/**
* Boolean indicating whether worker package transfer is enabled or not
*/
protected boolean mTransferWorkerPackage;
/** A map indexed by execution site and the corresponding worker package
*location in the submit directory
*/
Map<String,String> mWorkerPackageMap ;
/**
* A map indexed by the execution site and value is the path to chmod on
* that site.
*/
private Map<String,String> mChmodOnExecutionSiteMap;
/**
* Initializes the GridStart implementation.
*
* @param bag the bag of objects that is used for initialization.
* @param dag the concrete dag so far.
*/
public void initialize( PegasusBag bag, ADag dag ){
mBag = bag;
mDAG = dag;
mLogger = bag.getLogger();
mSiteStore = bag.getHandleToSiteStore();
mPOptions = bag.getPlannerOptions();
mSubmitDir = mPOptions.getSubmitDirectory();
mProps = bag.getPegasusProperties();
mGenerateLOF = mProps.generateLOFFiles();
mTCHandle = bag.getHandleToTransformationCatalog();
mTransferWorkerPackage = mProps.transferWorkerPackage();
if( mTransferWorkerPackage ){
mWorkerPackageMap = bag.getWorkerPackageMap();
if( mWorkerPackageMap == null ){
mWorkerPackageMap = new HashMap<String,String>();
}
}
else{
mWorkerPackageMap = new HashMap<String,String>();
}
mChmodOnExecutionSiteMap = new HashMap<String,String>();
Version version = Version.instance();
mMajorVersionLevel = version.getMajor();
mMinorVersionLevel = version.getMinor();
mPatchVersionLevel = version.getPatch();
mWorkerNodeExecution = mProps.executeOnWorkerNode();
if( mWorkerNodeExecution ){
//load SLS
mSLS = SLSFactory.loadInstance( bag );
}
else{
//sanity check
throw new RuntimeException( "PegasusLite only works if worker node execution is set. Please set " +
PegasusProperties.PEGASUS_WORKER_NODE_EXECUTION_PROPERTY + " to true .");
}
//pegasus lite needs to disable invoke functionality
mProps.setProperty( PegasusProperties.DISABLE_INVOKE_PROPERTY, "true" );
mEnablingPartOfAggregatedJob = false;
mKickstartGridStartImpl = new Kickstart();
mKickstartGridStartImpl.initialize( bag, dag );
//for pegasus lite we dont want ot use the full path, unless
//a user has specifically catalogued in the transformation catalog
mKickstartGridStartImpl.useFullPathToGridStarts( false );
//for pegasus-lite work, worker node execution is no
//longer handled in kickstart/no kickstart cases
//mKickstartGridStartImpl.mWorkerNodeExecution = false;
mStageSLSFile = mProps.stageSLSFilesViaFirstLevelStaging();
mLocalPathToPegasusLiteCommon = getSubmitHostPathToPegasusLiteCommon( );
}
/**
* Enables a job to run on the grid. This also determines how the
* stdin,stderr and stdout of the job are to be propogated.
* To grid enable a job, the job may need to be wrapped into another
* job, that actually launches the job. It usually results in the job
* description passed being modified modified.
*
* @param job the <code>Job</code> object containing the job description
* of the job that has to be enabled on the grid.
* @param isGlobusJob is <code>true</code>, if the job generated a
* line <code>universe = globus</code>, and thus runs remotely.
* Set to <code>false</code>, if the job runs on the submit
* host in any way.
*
* @return boolean true if enabling was successful,else false.
*/
public boolean enable( AggregatedJob job,boolean isGlobusJob){
//in pegasus lite mode we dont want kickstart to change or create
//worker node directories
for( Iterator it = job.constituentJobsIterator(); it.hasNext() ; ){
Job j = (Job) it.next();
j.vdsNS.construct( Pegasus.CHANGE_DIR_KEY , "false" );
j.vdsNS.construct( Pegasus.CREATE_AND_CHANGE_DIR_KEY, "false" );
}
//for time being we treat clustered jobs same as normal jobs
//in pegasus-lite
return this.enable( (Job)job, isGlobusJob );
/*
boolean result = true;
if( mWorkerNodeExecution ){
File jobWrapper = wrapJobWithPegasusLite( job, isGlobusJob );
//the .sh file is set as the executable for the job
//in addition to setting transfer_executable as true
job.setRemoteExecutable( jobWrapper.getAbsolutePath() );
job.condorVariables.construct( "transfer_executable", "true" );
}
return result;
*/
}
/**
* Enables a job to run on the grid by launching it directly. It ends
* up running the executable directly without going through any intermediate
* launcher executable. It connects the stdio, and stderr to underlying
* condor mechanisms so that they are transported back to the submit host.
*
* @param job the <code>Job</code> object containing the job description
* of the job that has to be enabled on the grid.
* @param isGlobusJob is <code>true</code>, if the job generated a
* line <code>universe = globus</code>, and thus runs remotely.
* Set to <code>false</code>, if the job runs on the submit
* host in any way.
*
* @return boolean true if enabling was successful,else false in case when
* the path to kickstart could not be determined on the site where
* the job is scheduled.
*/
public boolean enable(Job job, boolean isGlobusJob) {
//take care of relative submit directory if specified
String submitDir = mSubmitDir + mSeparator;
//consider case for non worker node execution first
if( !mWorkerNodeExecution ){
//shared filesystem case.
//for now a single job is launched via kickstart only
//no point launching it via seqexec and then kickstart
return mKickstartGridStartImpl.enable( job, isGlobusJob );
}//end of handling of non worker node execution
else{
//handle stuff differently
enableForWorkerNodeExecution( job, isGlobusJob );
}//end of worker node execution
if( mGenerateLOF ){
//but generate lof files nevertheless
//inefficient check here again. just a prototype
//we need to generate -S option only for non transfer jobs
//generate the list of filenames file for the input and output files.
if (! (job instanceof TransferJob)) {
generateListofFilenamesFile( job.getInputFiles(),
job.getID() + ".in.lof");
}
//for cleanup jobs no generation of stats for output files
if (job.getJobType() != Job.CLEANUP_JOB) {
generateListofFilenamesFile(job.getOutputFiles(),
job.getID() + ".out.lof");
}
}///end of mGenerateLOF
return true;
}
/**
* Enables jobs for worker node execution.
*
*
*
* @param job the job to be enabled.
* @param isGlobusJob is <code>true</code>, if the job generated a
* line <code>universe = globus</code>, and thus runs remotely.
* Set to <code>false</code>, if the job runs on the submit
* host in any way.
*/
private void enableForWorkerNodeExecution(Job job, boolean isGlobusJob ) {
if( job.getJobType() == Job.COMPUTE_JOB ){
//in pegasus lite mode we dont want kickstart to change or create
//worker node directories
job.vdsNS.construct( Pegasus.CHANGE_DIR_KEY , "false" );
job.vdsNS.construct( Pegasus.CREATE_AND_CHANGE_DIR_KEY, "false" );
File jobWrapper = wrapJobWithPegasusLite( job, isGlobusJob );
//the job wrapper requires the common functions file
//from the submit host
job.condorVariables.addIPFileForTransfer( this.mLocalPathToPegasusLiteCommon );
//figure out transfer of worker package
if( mTransferWorkerPackage ){
//sanity check to see if PEGASUS_HOME is defined
if( mSiteStore.getEnvironmentVariable( job.getSiteHandle(), "PEGASUS_HOME" ) == null ){
//yes we need to add from the location in the worker package map
String location = this.mWorkerPackageMap.get( job.getSiteHandle() );
if( location == null ){
throw new RuntimeException( "Unable to figure out worker package location for job " + job.getID() );
}
job.condorVariables.addIPFileForTransfer(location);
}
else{
mLogger.log( "No worker package staging for job " + job.getID() +
" PEGASUS_HOME specified in the site catalog for site " + job.getSiteHandle(),
LogManager.DEBUG_MESSAGE_LEVEL );
}
}
else{
//we don't want pegasus to add a stage worker job.
//but transfer directly if required.
if( mSiteStore.getEnvironmentVariable( job.getSiteHandle(), "PEGASUS_HOME" ) == null ){
//yes we need to add from the location in the worker package map
String location = this.mWorkerPackageMap.get( job.getSiteHandle() );
if( !mWorkerPackageMap.containsKey( job.getSiteHandle()) ){
location = retrieveLocationForWorkerPackageFromTC( job.getSiteHandle() );
//null can be populated as value
this.mWorkerPackageMap.put( job.getSiteHandle(), location );
}
//add only if location is not null
if( location != null ){
job.condorVariables.addIPFileForTransfer( location );
}
}
else{
mLogger.log( "No worker package staging for job " + job.getID() +
" PEGASUS_HOME specified in the site catalog for site " + job.getSiteHandle(),
LogManager.DEBUG_MESSAGE_LEVEL );
}
}
//the .sh file is set as the executable for the job
//in addition to setting transfer_executable as true
job.setRemoteExecutable( jobWrapper.getAbsolutePath() );
job.condorVariables.construct( "transfer_executable", "true" );
}
//for all auxillary jobs let kickstart figure what to do
else{
mKickstartGridStartImpl.enable( job, isGlobusJob );
}
if (job.stdIn.length() > 0) {
//PM-694
//job has a stdin explicitly tracked
//the transfer setup will ensure that the input file appears
//in the directory where the job is launched via pegauss lite
//we just need to unset it, so that the stdin is not transferred
//from the submit directory as happens in sharedfs cases
job.setStdIn( "" );
}
}
/**
* Indicates whether the enabling mechanism can set the X bit
* on the executable on the remote grid site, in addition to launching
* it on the remote grid stie
*
* @return false, as no wrapper executable is being used.
*/
public boolean canSetXBit(){
return false;
}
/**
* Returns the value of the vds profile with key as Pegasus.GRIDSTART_KEY,
* that would result in the loading of this particular implementation.
* It is usually the name of the implementing class without the
* package name.
*
* @return the value of the profile key.
* @see org.griphyn.cPlanner.namespace.Pegasus#GRIDSTART_KEY
*/
public String getVDSKeyValue(){
return PegasusLite.CLASSNAME;
}
/**
* Returns a short textual description in the form of the name of the class.
*
* @return short textual description.
*/
public String shortDescribe(){
return PegasusLite.SHORT_NAME;
}
/**
* Returns the SHORT_NAME for the POSTScript implementation that is used
* to be as default with this GridStart implementation.
*
* @return the identifier for the default POSTScript implementation for
* kickstart gridstart module.
*
* @see Kickstart#defaultPOSTScript()
*/
public String defaultPOSTScript(){
return this.mKickstartGridStartImpl.defaultPOSTScript();
}
/**
* Returns the directory that is associated with the job to specify
* the directory in which the job needs to run
*
* @param job the job
*
* @return the condor key . can be initialdir or remote_initialdir
*/
private String getDirectoryKey(Job job) {
/*
String style = (String)job.vdsNS.get( Pegasus.STYLE_KEY );
//remove the remote or initial dir's for the compute jobs
String key = ( style.equalsIgnoreCase( Pegasus.GLOBUS_STYLE ) )?
"remote_initialdir" :
"initialdir";
*/
String universe = (String) job.condorVariables.get( Condor.UNIVERSE_KEY );
return ( universe.equals( Condor.STANDARD_UNIVERSE ) ||
universe.equals( Condor.LOCAL_UNIVERSE) ||
universe.equals( Condor.SCHEDULER_UNIVERSE ) )?
"initialdir" :
"remote_initialdir";
}
/**
* Returns a boolean indicating whether to remove remote directory
* information or not from the job. This is determined on the basis of the
* style key that is associated with the job.
*
* @param job the job in question.
*
* @return boolean
*/
private boolean removeDirectoryKey(Job job){
String style = job.vdsNS.containsKey(Pegasus.STYLE_KEY) ?
null :
(String)job.vdsNS.get(Pegasus.STYLE_KEY);
//is being run. Remove remote_initialdir if there
//condor style associated with the job
//Karan Nov 15,2005
return (style == null)?
false:
style.equalsIgnoreCase(Pegasus.CONDOR_STYLE);
}
/**
* Constructs a condor variable in the condor profile namespace
* associated with the job. Overrides any preexisting key values.
*
* @param job contains the job description.
* @param key the key of the profile.
* @param value the associated value.
*/
private void construct(Job job, String key, String value){
job.condorVariables.construct(key,value);
}
/**
* Writes out the list of filenames file for the job.
*
* @param files the list of <code>PegasusFile</code> objects contains the files
* whose stat information is required.
*
* @param basename the basename of the file that is to be created
*
* @return the full path to lof file created, else null if no file is written out.
*/
public String generateListofFilenamesFile( Set files, String basename ){
//sanity check
if ( files == null || files.isEmpty() ){
return null;
}
String result = null;
//writing the stdin file
try {
File f = new File( mSubmitDir, basename );
FileWriter input;
input = new FileWriter( f );
PegasusFile pf;
for( Iterator it = files.iterator(); it.hasNext(); ){
pf = ( PegasusFile ) it.next();
input.write( pf.getLFN() );
input.write( "\n" );
}
//close the stream
input.close();
result = f.getAbsolutePath();
} catch ( IOException e) {
mLogger.log("Unable to write the lof file " + basename, e ,
LogManager.ERROR_MESSAGE_LEVEL);
}
return result;
}
/**
* Returns the directory in which the job executes on the worker node.
*
* @param job
*
* @return the full path to the directory where the job executes
*/
public String getWorkerNodeDirectory( Job job ){
//for pegasus-lite for time being we rely on
//$PWD that is resolved in the directory at runtime
return "$PWD";
}
/**
* Generates a seqexec input file for the job. The function first enables the
* job via kickstart module for worker node execution and then retrieves
* the commands to put in the input file from the environment variables specified
* for kickstart.
*
* It creates a single input file for the seqexec invocation.
* The input file contains commands to
*
* <pre>
* 1) create directory on worker node
* 2) fetch input data files
* 3) execute the job
* 4) transfer the output data files
* 5) cleanup the directory
* </pre>
*
* @param job the job to be enabled.
* @param isGlobusJob is <code>true</code>, if the job generated a
* line <code>universe = globus</code>, and thus runs remotely.
* Set to <code>false</code>, if the job runs on the submit
* host in any way.
*
* @return the file handle to the seqexec input file
*/
protected File wrapJobWithPegasusLite(Job job, boolean isGlobusJob) {
File shellWrapper = new File( mSubmitDir, job.getID() + ".sh" );
// Removed for JIRA PM-543
//
// //remove the remote or initial dir's for the compute jobs
// String key = getDirectoryKey( job );
//
// String exectionSiteDirectory = (String)job.condorVariables.removeKey( key );
//PM-590 stricter checks
// FileServer stagingSiteServerForRetrieval = mSiteStore.lookup( job.getStagingSiteHandle() ).getHeadNodeFS().selectScratchSharedFileServer();
SiteCatalogEntry stagingSiteEntry = mSiteStore.lookup( job.getStagingSiteHandle() );
if( stagingSiteEntry == null ){
this.complainForHeadNodeFileServer( job.getID(), job.getStagingSiteHandle());
}
FileServer stagingSiteServerForRetrieval = stagingSiteEntry.selectHeadNodeScratchSharedFileServer( FileServer.OPERATION.get );
if( stagingSiteServerForRetrieval == null ){
this.complainForHeadNodeFileServer( job.getID(), job.getStagingSiteHandle());
}
//String stagingSiteDirectory = mSiteStore.getExternalWorkDirectory(stagingSiteServerForRetrieval, job.getStagingSiteHandle() );
String stagingSiteDirectory = mSiteStore.getInternalWorkDirectory( job, true );
String workerNodeDir = getWorkerNodeDirectory( job );
try{
OutputStream ostream = new FileOutputStream( shellWrapper , true );
PrintWriter writer = new PrintWriter( new BufferedWriter(new OutputStreamWriter(ostream)) );
StringBuffer sb = new StringBuffer( );
sb.append( "#!/bin/bash" ).append( '\n' );
sb.append( "set -e" ).append( '\n' );
sb.append( "pegasus_lite_version_major=\"" ).append( this.mMajorVersionLevel ).append( "\"").append( '\n' );
sb.append( "pegasus_lite_version_minor=\"" ).append( this.mMinorVersionLevel ).append( "\"").append( '\n' );
sb.append( "pegasus_lite_version_patch=\"" ).append( this.mPatchVersionLevel ).append( "\"").append( '\n' );
sb.append( '\n' );
sb.append( ". " ).append( PegasusLite.PEGASUS_LITE_COMMON_FILE_BASENAME ).append( '\n' );
sb.append( '\n' );
sb.append( "pegasus_lite_init\n" );
sb.append( '\n' );
sb.append( "# cleanup in case of failures" ).append( '\n' );
sb.append( "trap pegasus_lite_exit INT TERM EXIT" ).append( '\n' );
sb.append( '\n' );
appendStderrFragment( sb, "Setting up workdir" );
sb.append( "# work dir" ).append( '\n' );
if( mSLS.doesCondorModifications() ){
//when using condor IO with pegasus lite we dont want
//pegasus lite to change the directory where condor
//launches the jobs
sb.append( "export pegasus_lite_work_dir=$PWD" ).append( '\n' );
}
sb.append( "pegasus_lite_setup_work_dir" ).append( '\n' );
sb.append( '\n' );
appendStderrFragment( sb, "figuring out the worker package to use" );
sb.append( "# figure out the worker package to use" ).append( '\n' );
sb.append( "pegasus_lite_worker_package" ).append( '\n' );
sb.append( '\n' );
if( mSLS.needsSLSInputTransfers( job ) ){
//generate the sls file with the mappings in the submit exectionSiteDirectory
Collection<FileTransfer> files = mSLS.determineSLSInputTransfers( job,
mSLS.getSLSInputLFN( job ),
stagingSiteServerForRetrieval,
stagingSiteDirectory,
workerNodeDir );
//PM-779 split the checkpoint files from the input files
//as we want to stage them separately
Collection<FileTransfer> inputFiles = new LinkedList();
Collection<FileTransfer> chkpointFiles = new LinkedList();
for(FileTransfer ft: files ){
if( ft.isCheckpointFile() ){
chkpointFiles.add(ft);
}
else{
inputFiles.add(ft);
}
}
//stage the input files first
if( !inputFiles.isEmpty() ){
appendStderrFragment( sb, "staging in input data and executables" );
sb.append( "# stage in data and executables" ).append( '\n' );
sb.append( mSLS.invocationString( job, null ) );
sb.append( " 1>&2" ).append( " << EOF" ).append( '\n' );
sb.append( convertToTransferInputFormat( inputFiles ) );
sb.append( "EOF" ).append( '\n' );
sb.append( '\n' );
}
//PM-779 checkpoint files need to be setup to never fail
appendStderrFragment( sb, "staging in checkpoint files" );
sb.append( "# stage in checkpoint files " ).append( '\n' );
sb.append( checkpointFilesToPegasusLite( job, chkpointFiles) );
//associate any credentials if required with the job
associateCredentials( job, files );
}
if( job.userExecutablesStagedForJob() ){
appendStderrFragment( sb, "setting the xbit for executables staged" );
sb.append( "# set the xbit for any executables staged" ).append( '\n' );
sb.append( getPathToChmodExecutable( job.getSiteHandle() ) );
sb.append( " +x " );
for( Iterator it = job.getInputFiles().iterator(); it.hasNext(); ){
PegasusFile pf = ( PegasusFile )it.next();
if( pf.getType() == PegasusFile.EXECUTABLE_FILE ){
sb.append( pf.getLFN() ).append( " " );
}
}
sb.append( '\n' );
sb.append( '\n' );
}
appendStderrFragment( sb, "executing the user tasks" );
sb.append( "# execute the tasks" ).append( '\n' ).
append( "set +e" ).append( '\n' );//PM-701
writer.print( sb.toString() );
writer.flush();
sb = new StringBuffer();
//enable the job via kickstart
//separate calls for aggregated and normal jobs
if( job instanceof AggregatedJob ){
this.mKickstartGridStartImpl.enable( (AggregatedJob)job, isGlobusJob );
//for clustered jobs we embed the contents of the input
//file in the shell wrapper itself
sb.append( job.getRemoteExecutable() ).append( " " ).append( job.getArguments() );
sb.append( " << EOF" ).append( '\n' );
sb.append( slurpInFile( mSubmitDir, job.getStdIn() ) );
sb.append( "EOF" ).append( '\n' );
//rest the jobs stdin
job.setStdIn( "" );
job.condorVariables.removeKey( "input" );
}
else{
this.mKickstartGridStartImpl.enable( job, isGlobusJob );
sb.append( job.getRemoteExecutable() ).append( job.getArguments() ).append( '\n' );
}
//PM-701 enable back fail on error
sb.append( "job_ec=$?" ).append( "\n" );
sb.append( "set -e").append( "\n" );
sb.append( '\n' );
//the pegasus lite wrapped job itself does not have any
//arguments passed
job.setArguments( "" );
if( mSLS.needsSLSOutputTransfers( job ) ){
FileServer stagingSiteServerForStore = stagingSiteEntry.selectHeadNodeScratchSharedFileServer( FileServer.OPERATION.put );
if( stagingSiteServerForStore == null ){
this.complainForHeadNodeFileServer( job.getID(), job.getStagingSiteHandle());
}
//String stagingSiteDirectoryForStore = mSiteStore.getExternalWorkDirectory(stagingSiteServerForStore, job.getStagingSiteHandle() );
String stagingSiteDirectoryForStore = mSiteStore.getInternalWorkDirectory( job, true );
//construct the postjob that transfers the output files
//back to head node exectionSiteDirectory
//to fix later. right now post constituentJob only created is pre constituentJob
//created
Collection<FileTransfer> files = mSLS.determineSLSOutputTransfers( job,
mSLS.getSLSOutputLFN( job ),
stagingSiteServerForStore,
stagingSiteDirectoryForStore,
workerNodeDir );
//PM-779 split the checkpoint files from the output files
//as we want to stage them separately
Collection<FileTransfer> outputFiles = new LinkedList();
Collection<FileTransfer> chkpointFiles = new LinkedList();
for(FileTransfer ft: files ){
if( ft.isCheckpointFile() ){
chkpointFiles.add(ft);
}
else{
outputFiles.add(ft);
}
}
//PM-779 checkpoint files need to be setup to never fail
appendStderrFragment( sb, "staging out checkpoint files" );
sb.append( "# stage out checkpoint files " ).append( '\n' );
sb.append( checkpointFilesToPegasusLite( job, chkpointFiles) );
if( !outputFiles.isEmpty() ){
//generate the stage out fragment for staging out outputs
String postJob = mSLS.invocationString( job, null );
appendStderrFragment( sb, "staging out output files" );
sb.append( "# stage out" ).append( '\n' );
sb.append( postJob );
sb.append( " 1>&2" ).append( " << EOF" ).append( '\n' );
sb.append( convertToTransferInputFormat( outputFiles ) );
sb.append( "EOF" ).append( '\n' );
sb.append( '\n' );
}
//associate any credentials if required with the job
associateCredentials( job, files );
}
writer.print( sb.toString() );
writer.flush();
writer.close();
ostream.close();
//set the xbit on the shell script
//for 3.2, we will have 1.6 as the minimum jdk requirement
shellWrapper.setExecutable( true );
//JIRA PM-543
job.setDirectory( null );
//PM-737 explicitly set the success string to look for
//in pegasus lite stderr, when pegasus-exitcode is invoked
//at runtime. we should merge so as not override any existing
//success message patterns
Namespace addOnPegasusProfiles = new Pegasus();
addOnPegasusProfiles.construct(Pegasus.EXITCODE_SUCCESS_MESSAGE, PEGASUS_LITE_EXITCODE_SUCCESS_MESSAGE );
job.vdsNS.merge(addOnPegasusProfiles);
//this.setXBitOnFile( shellWrapper.getAbsolutePath() );
}
catch( IOException ioe ){
throw new RuntimeException( "[Pegasus-Lite] Error while writing out pegasus lite wrapper " + shellWrapper , ioe );
}
//modify the constituentJob if required
if ( !mSLS.modifyJobForWorkerNodeExecution( job,
stagingSiteServerForRetrieval.getURLPrefix(),
stagingSiteDirectory,
workerNodeDir ) ){
throw new RuntimeException( "Unable to modify job " + job.getName() + " for worker node execution" );
}
return shellWrapper;
}
/**
* Convers the collection of files into an input format suitable for the
* transfer executable
*
* @param files Collection of <code>FileTransfer</code> objects.
*
* @return the blurb containing the files in the input format for the transfer
* executable
*/
protected StringBuffer convertToTransferInputFormat( Collection<FileTransfer> files ){
StringBuffer sb = new StringBuffer();
int num = 1;
for( FileTransfer ft : files ){
NameValue nv = ft.getSourceURL();
sb.append( "# " ).append( "src " ).append( num ).append( " " ).append( nv.getKey() ).
append( " " ).append( "checkpoint=\"").append(ft.isCheckpointFile()).append("\"").append( '\n' );
sb.append( nv.getValue() );
sb.append( '\n' );
nv = ft.getDestURL();
sb.append( "# " ).append( "dst " ).append( num ).append( " " ).append( nv.getKey() ).append( '\n' );
sb.append( nv.getValue() );
sb.append( '\n' );
num++;
}
return sb;
}
/**
* Convenience method to slurp in contents of a file into memory.
*
* @param directory the directory where the file resides
* @param file the file to be slurped in.
*
* @return StringBuffer containing the contents
*/
protected StringBuffer slurpInFile( String directory, String file ) throws IOException{
StringBuffer result = new StringBuffer();
//sanity check
if( file == null ){
return result;
}
BufferedReader in = new BufferedReader( new FileReader( new File( directory, file )) );
String line = null;
while(( line = in.readLine() ) != null ){
//System.out.println( line );
result.append( line ).append( '\n' );
}
in.close();
return result;
}
/**
* Returns the path to the chmod executable for a particular execution
* site by looking up the transformation executable.
*
* @param site the execution site.
*
* @return the path to chmod executable
*/
protected String getPathToChmodExecutable( String site ){
String path;
//check if the internal map has anything
path = mChmodOnExecutionSiteMap.get( site );
if( path != null ){
//return the cached path
return path;
}
List entries;
try {
//try to look up the transformation catalog for the path
entries = mTCHandle.lookup( PegasusLite.XBIT_TRANSFORMATION_NS,
PegasusLite.XBIT_TRANSFORMATION,
PegasusLite.XBIT_TRANSFORMATION_VERSION,
site,
TCType.INSTALLED );
} catch (Exception e) {
//non sensical catching
mLogger.log("Unable to retrieve entries from TC " +
e.getMessage(), LogManager.ERROR_MESSAGE_LEVEL );
return null;
}
TransformationCatalogEntry entry = ( entries == null ) ?
null: //try using a default one
(TransformationCatalogEntry) entries.get(0);
if( entry == null ){
//construct the path the default path.
//construct the path to it
StringBuffer sb = new StringBuffer();
sb.append( File.separator ).append( "bin" ).append( File.separator ).
append( PegasusLite.XBIT_EXECUTABLE_BASENAME );
path = sb.toString();
}
else{
path = entry.getPhysicalTransformation();
}
mChmodOnExecutionSiteMap.put( site, path );
return path;
}
/**
* Sets the xbit on the file.
*
* @param file the file for which the xbit is to be set
*
* @return boolean indicating whether xbit was set or not.
*/
protected boolean setXBitOnFile( String file ) {
boolean result = false;
//do some sanity checks on the source and the destination
File f = new File( file );
if( !f.exists() || !f.canRead()){
mLogger.log("The file does not exist " + file,
LogManager.ERROR_MESSAGE_LEVEL);
return result;
}
try{
//set the callback and run the grep command
Runtime r = Runtime.getRuntime();
String command = "chmod +x " + file;
mLogger.log("Setting xbit " + command,
LogManager.DEBUG_MESSAGE_LEVEL);
Process p = r.exec(command);
//the default gobbler callback always log to debug level
StreamGobblerCallback callback =
new DefaultStreamGobblerCallback(LogManager.DEBUG_MESSAGE_LEVEL);
//spawn off the gobblers with the already initialized default callback
StreamGobbler ips =
new StreamGobbler(p.getInputStream(), callback);
StreamGobbler eps =
new StreamGobbler(p.getErrorStream(), callback);
ips.start();
eps.start();
//wait for the threads to finish off
ips.join();
eps.join();
//get the status
int status = p.waitFor();
if( status != 0){
mLogger.log("Command " + command + " exited with status " + status,
LogManager.DEBUG_MESSAGE_LEVEL);
return result;
}
result = true;
}
catch(IOException ioe){
mLogger.log("IOException while creating symbolic links ", ioe,
LogManager.ERROR_MESSAGE_LEVEL);
}
catch( InterruptedException ie){
//ignore
}
return result;
}
/**
* Determines the path to common shell functions file that Pegasus Lite
* wrapped jobs use.
*
* @return the path on the submit host.
*/
protected String getSubmitHostPathToPegasusLiteCommon() {
StringBuffer path = new StringBuffer();
//first get the path to the share directory
File share = mProps.getSharedDir();
if( share == null ){
throw new RuntimeException( "Property for Pegasus share directory is not set" );
}
path.append( share.getAbsolutePath() ).append( File.separator ).
append( "sh" ).append( File.separator ).append( PegasusLite.PEGASUS_LITE_COMMON_FILE_BASENAME );
return path.toString();
}
public void useFullPathToGridStarts(boolean fullPath) {
throw new UnsupportedOperationException("Not supported yet.");
}
/**
* Associates credentials with the job corresponding to the files that
* are being transferred.
*
* @param job the job for which credentials need to be added.
* @param files the files that are being transferred.
*/
private void associateCredentials(Job job, Collection<FileTransfer> files) {
for( FileTransfer ft: files ){
NameValue source = ft.getSourceURL();
job.addCredentialType( source.getKey(), source.getValue() );
NameValue dest = ft.getDestURL();
job.addCredentialType( dest.getKey(), dest.getValue() );
}
}
/**
* Retrieves the location for the pegasus worker package from the TC for a site
*
*
* @return the path to worker package tar file on the site, else null if unable
* to determine
*/
protected String retrieveLocationForWorkerPackageFromTC( String site ) {
String location = null;
Mapper m = mBag.getHandleToTransformationMapper();
if( !m.isStageableMapper() ){
//we want to load a stageable mapper
mLogger.log( "User set mapper is not a stageable mapper. Loading a stageable mapper ", LogManager.DEBUG_MESSAGE_LEVEL );
m = Mapper.loadTCMapper( "Staged", mBag );
}
//check if there is a valid entry for worker package
List entries, selectedEntries = null;
TransformationCatalogEntry entry = null;
try{
entries = m.getTCList( DeployWorkerPackage.TRANSFORMATION_NAMESPACE,
DeployWorkerPackage.TRANSFORMATION_NAME,
DeployWorkerPackage.TRANSFORMATION_VERSION,
site );
if( entries != null && !entries.isEmpty() ){
entry = (TransformationCatalogEntry)entries.get( 0 );
}
}catch( Exception e ){
mLogger.log( "Unable to figure out worker package location for site " + site ,
LogManager.DEBUG_MESSAGE_LEVEL );
}
if( entry != null ){
location = entry.getPhysicalTransformation();
if( location.startsWith( "file:/") ){
location = location.substring( 6 );
}
}
return location;
}
/**
* Complains for a missing head node file server on a site for a job
*
* @param jobname the name of the job
* @param site the site
*/
private void complainForHeadNodeFileServer(String jobname, String site) {
StringBuffer error = new StringBuffer();
error.append( "[PegasusLite] " );
if( jobname != null ){
error.append( "For job (" ).append( jobname).append( ")." );
}
error.append( " File Server not specified for head node scratch shared filesystem for site: ").
append( site );
throw new RuntimeException( error.toString() );
}
/**
* Takes in the checkpoint files, and generates a pegasus-transfer invocation
* that should succeed in case of errors
*
* @param job the job being wrapped with PegasusLite
* @param files the checkpoint files
* @return string representation of the PegasusLite fragment
*/
private String checkpointFilesToPegasusLite(Job job, Collection<FileTransfer> files) {
StringBuilder sb = new StringBuilder();
if( !files.isEmpty() ){
sb.append( "set +e " ).append( "\n");
sb.append( mSLS.invocationString( job, null ) );
sb.append( " 1>&2" ).append( " << EOF" ).append( '\n' );
sb.append( convertToTransferInputFormat( files ) );
sb.append( "EOF" ).append( '\n' );
sb.append( "ec=$?" ).append( '\n' );
sb.append( "set -e").append( '\n' );
sb.append( "if [ $ec -ne 0 ]; then").append( '\n' );
sb.append( " echo \" Ignoring failure while transferring chkpoint files. Exicode was $ec\" 1>&2").append( '\n' );
sb.append( "fi" ).append( '\n' );
sb.append( "\n" );
}
return sb.toString();
}
/**
* Appends a fragment to the pegasus lite script that logs a message to
* stderr
*
* @param sb string buffer
* @param message the message
*/
private void appendStderrFragment(StringBuffer sb, String message ) {
if( message.length() > PegasusLite.MESSAGE_STRING_LENGTH ){
throw new RuntimeException( "Message string for PegasusLite exceeds " + PegasusLite.MESSAGE_STRING_LENGTH + " characters");
}
int pad = ( PegasusLite.MESSAGE_STRING_LENGTH - message.length() )/2;
sb.append( "echo -e \"\\n" );
for( int i = 0; i <= pad ; i ++ ){
sb.append( PegasusLite.SEPARATOR_CHAR );
}
sb.append( " " ).append( message ).append( " " );
for( int i = 0; i <= pad ; i ++ ){
sb.append( PegasusLite.SEPARATOR_CHAR );
}
sb.append( "\" 1>&2").append( "\n" );
return;
}
}
| PM-779 log checkpoint log messages in the pegasus lite script, only if
we are transferring checkpoint files
| src/edu/isi/pegasus/planner/code/gridstart/PegasusLite.java | PM-779 log checkpoint log messages in the pegasus lite script, only if we are transferring checkpoint files | <ide><path>rc/edu/isi/pegasus/planner/code/gridstart/PegasusLite.java
<ide> }
<ide>
<ide> //PM-779 checkpoint files need to be setup to never fail
<del> appendStderrFragment( sb, "staging in checkpoint files" );
<del> sb.append( "# stage in checkpoint files " ).append( '\n' );
<del> sb.append( checkpointFilesToPegasusLite( job, chkpointFiles) );
<add> String checkPointFragment = checkpointFilesToPegasusLite( job, chkpointFiles);
<add> if( !checkPointFragment.isEmpty() ){
<add> appendStderrFragment( sb, "staging in checkpoint files" );
<add> sb.append( "# stage in checkpoint files " ).append( '\n' );
<add> sb.append( checkPointFragment );
<add> }
<ide>
<ide> //associate any credentials if required with the job
<ide> associateCredentials( job, files );
<ide> }
<ide>
<ide> //PM-779 checkpoint files need to be setup to never fail
<del> appendStderrFragment( sb, "staging out checkpoint files" );
<del> sb.append( "# stage out checkpoint files " ).append( '\n' );
<del> sb.append( checkpointFilesToPegasusLite( job, chkpointFiles) );
<add> String checkPointFragment = checkpointFilesToPegasusLite( job, chkpointFiles);
<add> if( !checkPointFragment.isEmpty() ){
<add> appendStderrFragment( sb, "staging out checkpoint files" );
<add> sb.append( "# stage out checkpoint files " ).append( '\n' );
<add> sb.append( checkPointFragment );
<add> }
<ide>
<ide> if( !outputFiles.isEmpty() ){
<ide> //generate the stage out fragment for staging out outputs |
|
Java | apache-2.0 | 7ff365d8ad7d8af56abf4cca10df569e6014f959 | 0 | labertasch/sling,awadheshv/sling,trekawek/sling,awadheshv/sling,vladbailescu/sling,tmaret/sling,headwirecom/sling,tmaret/sling,JEBailey/sling,trekawek/sling,ieb/sling,headwirecom/sling,mcdan/sling,ist-dresden/sling,mcdan/sling,mikibrv/sling,anchela/sling,ist-dresden/sling,anchela/sling,trekawek/sling,mikibrv/sling,roele/sling,labertasch/sling,ieb/sling,JEBailey/sling,awadheshv/sling,tmaret/sling,anchela/sling,cleliameneghin/sling,awadheshv/sling,ist-dresden/sling,mcdan/sling,mikibrv/sling,cleliameneghin/sling,roele/sling,labertasch/sling,JEBailey/sling,anchela/sling,JEBailey/sling,vladbailescu/sling,vladbailescu/sling,mcdan/sling,mikibrv/sling,vladbailescu/sling,headwirecom/sling,cleliameneghin/sling,headwirecom/sling,JEBailey/sling,trekawek/sling,mcdan/sling,roele/sling,headwirecom/sling,roele/sling,ieb/sling,tmaret/sling,cleliameneghin/sling,roele/sling,ieb/sling,cleliameneghin/sling,vladbailescu/sling,trekawek/sling,mikibrv/sling,ist-dresden/sling,anchela/sling,trekawek/sling,labertasch/sling,labertasch/sling,awadheshv/sling,ist-dresden/sling,mcdan/sling,awadheshv/sling,ieb/sling,tmaret/sling,mikibrv/sling,ieb/sling | /*
* 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.
*/
package org.apache.sling.testing.paxexam;
import java.io.File;
import java.io.IOException;
import java.net.ServerSocket;
import java.util.Dictionary;
import javax.inject.Inject;
import org.ops4j.pax.exam.CoreOptions;
import org.ops4j.pax.exam.Option;
import org.osgi.service.cm.ConfigurationAdmin;
import static org.ops4j.pax.exam.CoreOptions.bundle;
import static org.ops4j.pax.exam.CoreOptions.composite;
import static org.ops4j.pax.exam.CoreOptions.keepCaches;
import static org.ops4j.pax.exam.CoreOptions.mavenBundle;
import static org.ops4j.pax.exam.CoreOptions.repository;
import static org.ops4j.pax.exam.CoreOptions.systemProperty;
import static org.ops4j.pax.exam.CoreOptions.when;
public abstract class TestSupport {
private final String workingDirectory = String.format("target/paxexam/%s", getClass().getSimpleName());
@Inject
protected ConfigurationAdmin configurationAdmin;
protected String workingDirectory() {
return workingDirectory;
}
protected synchronized int findFreePort() {
try {
final ServerSocket serverSocket = new ServerSocket(0);
final int port = serverSocket.getLocalPort();
serverSocket.close();
return port;
} catch (Exception e) {
throw new RuntimeException(e);
}
}
protected int httpPort() throws IOException {
final Dictionary<String, Object> properties = configurationAdmin.getConfiguration("org.apache.felix.http").getProperties();
return Integer.parseInt(properties.get("org.osgi.service.http.port").toString());
}
protected Option baseConfiguration() {
return composite(
failOnUnresolvedBundles(),
keepCaches(),
localMavenRepo(),
repository("https://repository.apache.org/snapshots/").id("apache-snapshots").allowSnapshots(),
CoreOptions.workingDirectory(workingDirectory()),
mavenBundle().groupId("org.apache.sling").artifactId("org.apache.sling.testing.paxexam").versionAsInProject()
);
}
protected Option failOnUnresolvedBundles() {
return systemProperty("pax.exam.osgi.unresolved.fail").value("true");
}
protected Option localMavenRepo() {
final String localRepository = System.getProperty("maven.repo.local", ""); // PAXEXAM-543
return when(localRepository.length() > 0).useOptions(
systemProperty("org.ops4j.pax.url.mvn.localRepository").value(localRepository)
);
}
protected Option testBundle(final String systemProperty) {
final String filename = System.getProperty(systemProperty);
final File file = new File(filename);
return bundle(file.toURI().toString());
}
}
| testing/org.apache.sling.testing.paxexam/src/main/java/org/apache/sling/testing/paxexam/TestSupport.java | /*
* 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.
*/
package org.apache.sling.testing.paxexam;
import java.io.File;
import java.io.IOException;
import java.net.ServerSocket;
import java.util.Dictionary;
import javax.inject.Inject;
import org.ops4j.pax.exam.CoreOptions;
import org.ops4j.pax.exam.Option;
import org.osgi.service.cm.ConfigurationAdmin;
import static org.ops4j.pax.exam.CoreOptions.bundle;
import static org.ops4j.pax.exam.CoreOptions.composite;
import static org.ops4j.pax.exam.CoreOptions.keepCaches;
import static org.ops4j.pax.exam.CoreOptions.mavenBundle;
import static org.ops4j.pax.exam.CoreOptions.systemProperty;
import static org.ops4j.pax.exam.CoreOptions.when;
public abstract class TestSupport {
private final String workingDirectory = String.format("target/paxexam/%s", getClass().getSimpleName());
@Inject
protected ConfigurationAdmin configurationAdmin;
protected String workingDirectory() {
return workingDirectory;
}
protected synchronized int findFreePort() {
try {
final ServerSocket serverSocket = new ServerSocket(0);
final int port = serverSocket.getLocalPort();
serverSocket.close();
return port;
} catch (Exception e) {
throw new RuntimeException(e);
}
}
protected int httpPort() throws IOException {
final Dictionary<String, Object> properties = configurationAdmin.getConfiguration("org.apache.felix.http").getProperties();
return Integer.parseInt(properties.get("org.osgi.service.http.port").toString());
}
protected Option baseConfiguration() {
return composite(
failOnUnresolvedBundles(),
keepCaches(),
localMavenRepo(),
CoreOptions.workingDirectory(workingDirectory()),
mavenBundle().groupId("org.apache.sling").artifactId("org.apache.sling.testing.paxexam").versionAsInProject()
);
}
protected Option failOnUnresolvedBundles() {
return systemProperty("pax.exam.osgi.unresolved.fail").value("true");
}
protected Option localMavenRepo() {
final String localRepository = System.getProperty("maven.repo.local", ""); // PAXEXAM-543
return when(localRepository.length() > 0).useOptions(
systemProperty("org.ops4j.pax.url.mvn.localRepository").value(localRepository)
);
}
protected Option testBundle(final String systemProperty) {
final String filename = System.getProperty(systemProperty);
final File file = new File(filename);
return bundle(file.toURI().toString());
}
}
| SLING-6076 Add Maven repository apache-snapshots to base configuration
git-svn-id: 6eed74fe9a15c8da84b9a8d7f2960c0406113ece@1762782 13f79535-47bb-0310-9956-ffa450edef68
| testing/org.apache.sling.testing.paxexam/src/main/java/org/apache/sling/testing/paxexam/TestSupport.java | SLING-6076 Add Maven repository apache-snapshots to base configuration | <ide><path>esting/org.apache.sling.testing.paxexam/src/main/java/org/apache/sling/testing/paxexam/TestSupport.java
<ide> import static org.ops4j.pax.exam.CoreOptions.composite;
<ide> import static org.ops4j.pax.exam.CoreOptions.keepCaches;
<ide> import static org.ops4j.pax.exam.CoreOptions.mavenBundle;
<add>import static org.ops4j.pax.exam.CoreOptions.repository;
<ide> import static org.ops4j.pax.exam.CoreOptions.systemProperty;
<ide> import static org.ops4j.pax.exam.CoreOptions.when;
<ide>
<ide> failOnUnresolvedBundles(),
<ide> keepCaches(),
<ide> localMavenRepo(),
<add> repository("https://repository.apache.org/snapshots/").id("apache-snapshots").allowSnapshots(),
<ide> CoreOptions.workingDirectory(workingDirectory()),
<ide> mavenBundle().groupId("org.apache.sling").artifactId("org.apache.sling.testing.paxexam").versionAsInProject()
<ide> ); |
|
Java | mit | error: pathspec 'ethereumj-core/src/test/java/org/ethereum/net/shh/FilterTest.java' did not match any file(s) known to git
| c4c3f62dd77ad8a20717c1ff07343b6861215479 | 1 | gerbrand/ethereumj,loxal/FreeEthereum,caxqueiroz/ethereumj,fjl/ethereumj,loxal/FreeEthereum,ddworken/ethereumj,loxal/FreeEthereum,chengtalent/ethereumj,loxal/ethereumj,shahankhatch/ethereumj,vaporry/ethereumj | package org.ethereum.net.shh;
import org.ethereum.crypto.ECKey;
import org.junit.Test;
import static org.junit.Assert.assertTrue;
/**
* Created by kest on 6/26/15.
*/
public class FilterTest {
byte[] to = new ECKey().decompress().getPubKey();
byte[] from = new ECKey().decompress().getPubKey();
String[] topics = {"topic1", "topic2", "topic3", "topic4"};
@Test
public void test1() {
Filter matcher = new Filter(null, null, new TopicMatcher(new String[]{}));
Filter message = new Filter(to, from, new TopicMatcher(topics));
assertTrue(matcher.match(message));
}
@Test
public void test2() {
Filter matcher = new Filter(to, null, new TopicMatcher(new String[]{}));
Filter message = new Filter(to, from, new TopicMatcher(topics));
assertTrue(matcher.match(message));
}
@Test
public void test3() {
Filter matcher = new Filter(to, null, new TopicMatcher(new String[]{}));
Filter message = new Filter(null, from, new TopicMatcher(topics));
assertTrue(!matcher.match(message));
}
@Test
public void test4() {
Filter matcher = new Filter(null, from, new TopicMatcher(new String[]{}));
Filter message = new Filter(to, from, new TopicMatcher(topics));
assertTrue(matcher.match(message));
}
@Test
public void test5() {
Filter matcher = new Filter(null, from, new TopicMatcher(new String[]{}));
Filter message = new Filter(to, null, new TopicMatcher(topics));
assertTrue(!matcher.match(message));
}
@Test
public void test6() {
Filter matcher = new Filter(null, from, new TopicMatcher(topics));
Filter message = new Filter(to, from, new TopicMatcher(topics));
assertTrue(matcher.match(message));
}
@Test
public void test7() {
Filter matcher = new Filter(null, null, new TopicMatcher(topics));
Filter message = new Filter(to, from, new TopicMatcher(new String[]{}));
assertTrue(!matcher.match(message));
}
}
| ethereumj-core/src/test/java/org/ethereum/net/shh/FilterTest.java | Add the whisper filter tests
| ethereumj-core/src/test/java/org/ethereum/net/shh/FilterTest.java | Add the whisper filter tests | <ide><path>thereumj-core/src/test/java/org/ethereum/net/shh/FilterTest.java
<add>package org.ethereum.net.shh;
<add>
<add>import org.ethereum.crypto.ECKey;
<add>import org.junit.Test;
<add>
<add>import static org.junit.Assert.assertTrue;
<add>
<add>/**
<add> * Created by kest on 6/26/15.
<add> */
<add>public class FilterTest {
<add>
<add> byte[] to = new ECKey().decompress().getPubKey();
<add> byte[] from = new ECKey().decompress().getPubKey();
<add> String[] topics = {"topic1", "topic2", "topic3", "topic4"};
<add>
<add> @Test
<add> public void test1() {
<add> Filter matcher = new Filter(null, null, new TopicMatcher(new String[]{}));
<add> Filter message = new Filter(to, from, new TopicMatcher(topics));
<add>
<add> assertTrue(matcher.match(message));
<add> }
<add>
<add> @Test
<add> public void test2() {
<add> Filter matcher = new Filter(to, null, new TopicMatcher(new String[]{}));
<add> Filter message = new Filter(to, from, new TopicMatcher(topics));
<add>
<add> assertTrue(matcher.match(message));
<add> }
<add>
<add> @Test
<add> public void test3() {
<add> Filter matcher = new Filter(to, null, new TopicMatcher(new String[]{}));
<add> Filter message = new Filter(null, from, new TopicMatcher(topics));
<add>
<add> assertTrue(!matcher.match(message));
<add> }
<add>
<add> @Test
<add> public void test4() {
<add> Filter matcher = new Filter(null, from, new TopicMatcher(new String[]{}));
<add> Filter message = new Filter(to, from, new TopicMatcher(topics));
<add>
<add> assertTrue(matcher.match(message));
<add> }
<add>
<add> @Test
<add> public void test5() {
<add> Filter matcher = new Filter(null, from, new TopicMatcher(new String[]{}));
<add> Filter message = new Filter(to, null, new TopicMatcher(topics));
<add>
<add> assertTrue(!matcher.match(message));
<add> }
<add>
<add> @Test
<add> public void test6() {
<add> Filter matcher = new Filter(null, from, new TopicMatcher(topics));
<add> Filter message = new Filter(to, from, new TopicMatcher(topics));
<add>
<add> assertTrue(matcher.match(message));
<add> }
<add>
<add> @Test
<add> public void test7() {
<add> Filter matcher = new Filter(null, null, new TopicMatcher(topics));
<add> Filter message = new Filter(to, from, new TopicMatcher(new String[]{}));
<add>
<add> assertTrue(!matcher.match(message));
<add> }
<add>} |
|
Java | apache-2.0 | e698074cf2112cfe7818fcc8e7992b0f465c8035 | 0 | newtonker/PhotoView,wangqi504635/PhotoView,BinGoBinBin/PhotoView,lear7/PhotoView,Yangwendaxia/PhotoView,309746069/PhotoView,ylfonline/PhotoView,ordinarybill/PhotoView,luwei2012/PhotoView,creativepsyco/PhotoView,ajju4455/PhotoView,jjfreeze/PhotoView,fashioncj/PhotoView,aixiaoxianggithub/PhotoView,LiWeiQin/PhotoView,liuzwei/PhotoView,02110917/PhotoView,Topface/PhotoView,mistrydarshan99/PhotoView,treejames/PhotoView,manabo-inc/PhotoView,hareshsandeep/PhotoView,lisb/PhotoView,qingsong-xu/PhotoView,ZhaoYukai/PhotoView,zhouwenbo/PhotoView,yangpeiyong/PhotoView,yeojoy/PhotoView,anton46/PhotoView,myheat/PhotoView,btjun/PhotoView,tonimc/PhotoView,dkenl135/PhotoView,mlevytskiy/PhotoView,rayzone107/PhotoView,sylsi/PhotoView,benju69/PhotoView,chrisbanes/PhotoView,Cryhelyxx/PhotoView,Juneor/PhotoView,extinguish/PhotoView,KeepSafe/PhotoView,ChinaKim/PhotoView,lxhxhlw/PhotoView,StingerAJ/PhotoView,kennydude/PhotoView,sprylab/PhotoView,lstNull/PhotoView,neviscom/PhotoView,murugespandian/PhotoView,ChenSiLiang/RotatePhotoView,nbumakov/PhotoView,YuzurihaInori/PhotoView,LeeJay0226/PhotoView,pangyunxiu/PhotoView,binkery/PhotoView,hejunbinlan/PhotoView,jiguoling/PhotoView,eskimi/PhotoView,larryeee/PhotoView-1,hgl888/PhotoView,sporting-innovations/PhotoView,verygreenboi/PhotoView,bpappin/PhotoView,GMAndroidTeam/PhotoView,wangjun/PhotoView,kaffeel/PhotoView,ywang2014/PhotoView,10045125/PhotoView,yulongxiao/PhotoView,trafi/PhotoView,wfs3006/PhotoView,zzhopen/PhotoView,jp1017/PhotoView,jiangzhonghui/PhotoView,Stocard/PhotoView,ricebook/PhotoView,HIPERCUBE/PhotoView,ganlaw/PhotoView,pixty/PhotoView,adrianomazucato/PhotoView,Dreezydraig/PhotoView,farrywen/PhotoView,bogosortist/PhotoView,copolii/PhotoView,yangqing0314/PhotoView,SamuelGjk/PhotoView,vfishv/PhotoView,qaza2008/PhotoView | /*******************************************************************************
* Copyright 2011, 2012 Chris Banes.
*
* 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 uk.co.senab.photoview;
import uk.co.senab.photoview.PhotoViewAttacher.OnMatrixChangedListener;
import uk.co.senab.photoview.PhotoViewAttacher.OnPhotoTapListener;
import uk.co.senab.photoview.PhotoViewAttacher.OnViewTapListener;
import android.content.Context;
import android.graphics.RectF;
import android.graphics.drawable.Drawable;
import android.net.Uri;
import android.util.AttributeSet;
import android.widget.ImageView;
public class PhotoView extends ImageView {
private final PhotoViewAttacher mAttacher;
public PhotoView(Context context) {
super(context);
super.setScaleType(ScaleType.MATRIX);
mAttacher = new PhotoViewAttacher(this);
}
public PhotoView(Context context, AttributeSet attr) {
super(context, attr);
super.setScaleType(ScaleType.MATRIX);
mAttacher = new PhotoViewAttacher(this);
}
public PhotoView(Context context, AttributeSet attr, int defStyle) {
super(context, attr, defStyle);
super.setScaleType(ScaleType.MATRIX);
mAttacher = new PhotoViewAttacher(this);
}
/**
* Returns true if the PhotoView is set to allow zooming of Photos.
*
* @return true if the PhotoView allows zooming.
*/
public boolean canZoom() {
return mAttacher.canZoom();
}
/**
* Gets the Display Rectangle of the currently displayed Drawable. The
* Rectangle is relative to this View and includes all scaling and
* translations.
*
* @return - RectF of Displayed Drawable
*/
public RectF getDisplayRect() {
return mAttacher.getDisplayRect();
}
/**
* Returns the current scale value
*
* @return float - current scale value
*/
public float getScale() {
return mAttacher.getScale();
}
@Override
public ScaleType getScaleType() {
return mAttacher.getScaleType();
}
@Override
// setImageBitmap calls through to this method
public void setImageDrawable(Drawable drawable) {
super.setImageDrawable(drawable);
if (null != mAttacher) {
mAttacher.update();
}
}
@Override
public void setImageResource(int resId) {
super.setImageResource(resId);
if (null != mAttacher) {
mAttacher.update();
}
}
@Override
public void setImageURI(Uri uri) {
super.setImageURI(uri);
if (null != mAttacher) {
mAttacher.update();
}
}
/**
* Register a callback to be invoked when the Matrix has changed for this
* View. An example would be the user panning or scaling the Photo.
*
* @param listener
* - Listener to be registered.
*/
public void setOnMatrixChangeListener(OnMatrixChangedListener listener) {
mAttacher.setOnMatrixChangeListener(listener);
}
@Override
public void setOnLongClickListener(OnLongClickListener l) {
// delegate to the attacher
mAttacher.setOnLongClickListener(l);
}
/**
* Register a callback to be invoked when the Photo displayed by this View
* is tapped with a single tap.
*
* @param listener
* - Listener to be registered.
*/
public void setOnPhotoTapListener(OnPhotoTapListener listener) {
mAttacher.setOnPhotoTapListener(listener);
}
/**
* Register a callback to be invoked when the View
* is tapped with a single tap.
*
* @param listener
* - Listener to be registered.
*/
public void setOnViewTapListener(OnViewTapListener listener)
{
mAttacher.setOnPhotoTapListener(listener);
}
@Override
public void setScaleType(ScaleType scaleType) {
// setScaleType can be called from within ImageView constructor if there is a scaleType attribute set in a PhotoView embedded in a layout.
// Avoid NPE in that situation, we're overriding the scaletype to MATRIX on creation anyway so we could log a warning that the resource definition is
// unused.
if (null != mAttacher) {
mAttacher.setScaleType(scaleType);
}
}
/**
* Allows you to enable/disable the zoom functionality on the ImageView.
* When disable the ImageView reverts to using the FIT_CENTER matrix.
*
* @param zoomable
* - Whether the zoom functionality is enabled.
*/
public void setZoomable(boolean zoomable) {
mAttacher.setZoomable(zoomable);
}
/**
* Zooms to the specified scale, around the focal point given.
*
* @param scale
* - Scale to zoom to
* @param focalX
* - X Focus Point
* @param focalY
* - Y Focus Point
*/
public void zoomTo(float scale, float focalX, float focalY) {
mAttacher.zoomTo(scale, focalX, focalY);
}
@Override
protected void onDetachedFromWindow() {
mAttacher.cleanup();
super.onDetachedFromWindow();
}
} | library/src/uk/co/senab/photoview/PhotoView.java | /*******************************************************************************
* Copyright 2011, 2012 Chris Banes.
*
* 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 uk.co.senab.photoview;
import uk.co.senab.photoview.PhotoViewAttacher.OnMatrixChangedListener;
import uk.co.senab.photoview.PhotoViewAttacher.OnPhotoTapListener;
import uk.co.senab.photoview.PhotoViewAttacher.OnViewTapListener;
import android.content.Context;
import android.graphics.RectF;
import android.graphics.drawable.Drawable;
import android.net.Uri;
import android.util.AttributeSet;
import android.widget.ImageView;
public class PhotoView extends ImageView {
private final PhotoViewAttacher mAttacher;
public PhotoView(Context context) {
super(context);
super.setScaleType(ScaleType.MATRIX);
mAttacher = new PhotoViewAttacher(this);
}
public PhotoView(Context context, AttributeSet attr) {
super(context, attr);
super.setScaleType(ScaleType.MATRIX);
mAttacher = new PhotoViewAttacher(this);
}
public PhotoView(Context context, AttributeSet attr, int defStyle) {
super(context, attr, defStyle);
super.setScaleType(ScaleType.MATRIX);
mAttacher = new PhotoViewAttacher(this);
}
/**
* Returns true if the PhotoView is set to allow zooming of Photos.
*
* @return true if the PhotoView allows zooming.
*/
public boolean canZoom() {
return mAttacher.canZoom();
}
/**
* Gets the Display Rectangle of the currently displayed Drawable. The
* Rectangle is relative to this View and includes all scaling and
* translations.
*
* @return - RectF of Displayed Drawable
*/
public RectF getDisplayRect() {
return mAttacher.getDisplayRect();
}
/**
* Returns the current scale value
*
* @return float - current scale value
*/
public float getScale() {
return mAttacher.getScale();
}
@Override
public ScaleType getScaleType() {
return mAttacher.getScaleType();
}
@Override
// setImageBitmap calls through to this method
public void setImageDrawable(Drawable drawable) {
super.setImageDrawable(drawable);
if (null != mAttacher) {
mAttacher.update();
}
}
@Override
public void setImageResource(int resId) {
super.setImageResource(resId);
if (null != mAttacher) {
mAttacher.update();
}
}
@Override
public void setImageURI(Uri uri) {
super.setImageURI(uri);
if (null != mAttacher) {
mAttacher.update();
}
}
/**
* Register a callback to be invoked when the Matrix has changed for this
* View. An example would be the user panning or scaling the Photo.
*
* @param listener
* - Listener to be registered.
*/
public void setOnMatrixChangeListener(OnMatrixChangedListener listener) {
mAttacher.setOnMatrixChangeListener(listener);
}
/**
* Register a callback to be invoked when the Photo displayed by this View
* is tapped with a single tap.
*
* @param listener
* - Listener to be registered.
*/
public void setOnPhotoTapListener(OnPhotoTapListener listener) {
mAttacher.setOnPhotoTapListener(listener);
}
/**
* Register a callback to be invoked when the View
* is tapped with a single tap.
*
* @param listener
* - Listener to be registered.
*/
public void setOnViewTapListener(OnViewTapListener listener)
{
mAttacher.setOnPhotoTapListener(listener);
}
@Override
public void setScaleType(ScaleType scaleType) {
// setScaleType can be called from within ImageView constructor if there is a scaleType attribute set in a PhotoView embedded in a layout.
// Avoid NPE in that situation, we're overriding the scaletype to MATRIX on creation anyway so we could log a warning that the resource definition is
// unused.
if (null != mAttacher) {
mAttacher.setScaleType(scaleType);
}
}
/**
* Allows you to enable/disable the zoom functionality on the ImageView.
* When disable the ImageView reverts to using the FIT_CENTER matrix.
*
* @param zoomable
* - Whether the zoom functionality is enabled.
*/
public void setZoomable(boolean zoomable) {
mAttacher.setZoomable(zoomable);
}
/**
* Zooms to the specified scale, around the focal point given.
*
* @param scale
* - Scale to zoom to
* @param focalX
* - X Focus Point
* @param focalY
* - Y Focus Point
*/
public void zoomTo(float scale, float focalX, float focalY) {
mAttacher.zoomTo(scale, focalX, focalY);
}
@Override
protected void onDetachedFromWindow() {
mAttacher.cleanup();
super.onDetachedFromWindow();
}
} | delegate onlongclicklistener to attacher
| library/src/uk/co/senab/photoview/PhotoView.java | delegate onlongclicklistener to attacher | <ide><path>ibrary/src/uk/co/senab/photoview/PhotoView.java
<ide> mAttacher.setOnMatrixChangeListener(listener);
<ide> }
<ide>
<add> @Override
<add> public void setOnLongClickListener(OnLongClickListener l) {
<add> // delegate to the attacher
<add> mAttacher.setOnLongClickListener(l);
<add> }
<add>
<ide> /**
<ide> * Register a callback to be invoked when the Photo displayed by this View
<ide> * is tapped with a single tap. |
|
Java | apache-2.0 | 4b4039b8068ce620a7842f84e46b90b410f063b5 | 0 | mikepenz/FastAdapter,mikepenz/FastAdapter,mikepenz/FastAdapter,mikepenz/FastAdapter | package com.mikepenz.fastadapter_extensions.utilities;
import android.util.Log;
import com.mikepenz.fastadapter.FastAdapter;
import com.mikepenz.fastadapter.IAdapter;
import com.mikepenz.fastadapter.IExpandable;
import com.mikepenz.fastadapter.IItem;
import com.mikepenz.fastadapter.IItemAdapter;
import com.mikepenz.fastadapter.ISubItem;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.List;
import java.util.ListIterator;
import java.util.Set;
/**
* Created by flisar on 15.09.2016.
*/
public class SubItemUtil {
/**
* returns a set of selected items, regardless of their visibility
*
* @param adapter the adapter instance
* @return a set of all selected items and subitems
*/
public static Set<IItem> getSelectedItems(FastAdapter adapter) {
Set<IItem> selections = new HashSet<>();
int length = adapter.getItemCount();
List<IItem> items = new ArrayList<>();
for (int i = 0; i < length; i++) {
items.add(adapter.getItem(i));
}
updateSelectedItemsWithCollapsed(selections, items);
return selections;
}
private static void updateSelectedItemsWithCollapsed(Set<IItem> selected, List<IItem> items) {
int length = items.size();
for (int i = 0; i < length; i++) {
if (items.get(i).isSelected()) {
selected.add(items.get(i));
}
if (items.get(i) instanceof IExpandable && ((IExpandable) items.get(i)).getSubItems() != null) {
updateSelectedItemsWithCollapsed(selected, ((IExpandable) items.get(i)).getSubItems());
}
}
}
/**
* counts the items in the adapter, respecting subitems regardless of there current visibility
*
* @param adapter the adapter instance
* @param predicate predicate against which each item will be checked before counting it
* @return number of items in the adapter that apply to the predicate
*/
public static int countItems(final IItemAdapter adapter, IPredicate predicate) {
return countItems(adapter.getAdapterItems(), true, false, predicate);
}
/**
* counts the items in the adapter, respecting subitems regardless of there current visibility
*
* @param adapter the adapter instance
* @param countHeaders if true, headers will be counted as well
* @return number of items in the adapter
*/
public static int countItems(final IItemAdapter adapter, boolean countHeaders) {
return countItems(adapter.getAdapterItems(), countHeaders, false, null);
}
private static int countItems(List<IItem> items, boolean countHeaders, boolean subItemsOnly, IPredicate predicate) {
if (items == null || items.size() == 0) {
return 0;
}
int temp, count = 0;
int itemCount = items.size();
IItem item;
List<IItem> subItems;
for (int i = 0; i < itemCount; i++) {
item = items.get(i);
if (item instanceof IExpandable && ((IExpandable) item).getSubItems() != null) {
subItems = ((IExpandable) item).getSubItems();
if (predicate == null) {
count += subItems != null ? subItems.size() : 0;
count += countItems(subItems, countHeaders, true, predicate);
if (countHeaders) {
count++;
}
} else {
temp = subItems != null ? subItems.size() : 0;
for (int j = 0; j < temp; j++) {
if (predicate.apply(subItems.get(j))) {
count++;
}
}
if (countHeaders && predicate.apply(item)) {
count++;
}
}
}
// in some cases, we must manually check, if the item is a sub item, process is optimised as much as possible via the subItemsOnly parameter already
// sub items will be counted in above if statement!
else if (!subItemsOnly && getParent(item) == null) {
if (predicate == null) {
count++;
} else if (predicate.apply(item)) {
count++;
}
}
}
return count;
}
/**
* counts the selected items in the adapter underneath an expandable item, recursively
*
* @param adapter the adapter instance
* @param header the header who's selected children should be counted
* @return number of selected items underneath the header
*/
public static <T extends IItem & IExpandable> int countSelectedSubItems(final FastAdapter adapter, T header) {
Set<IItem> selections = getSelectedItems(adapter);
return countSelectedSubItems(selections, header);
}
public static <T extends IItem & IExpandable> int countSelectedSubItems(Set<IItem> selections, T header) {
int count = 0;
List<IItem> subItems = header.getSubItems();
int items = header.getSubItems() != null ? header.getSubItems().size() : 0;
for (int i = 0; i < items; i++) {
if (selections.contains(subItems.get(i))) {
count++;
}
if (subItems.get(i) instanceof IExpandable && ((IExpandable) subItems.get(i)).getSubItems() != null) {
count += countSelectedSubItems(selections, (T) subItems.get(i));
}
}
return count;
}
private static <T extends IExpandable & IItem> T getParent(IItem item) {
if (item instanceof ISubItem) {
return (T) ((ISubItem) item).getParent();
}
return null;
}
/**
* deletes all selected items from the adapter respecting if the are sub items or not
* subitems are removed from their parents sublists, main items are directly removed
*
* @param deleteEmptyHeaders if true, empty headers will be removed from the adapter
* @return List of items that have been removed from the adapter
*/
public static List<IItem> deleteSelected(final FastAdapter fastAdapter, boolean notifyParent, boolean deleteEmptyHeaders) {
List<IItem> deleted = new ArrayList<>();
// we use a LinkedList, because this has performance advantages when modifying the listIterator during iteration!
// Modifying list is O(1)
LinkedList<IItem> selectedItems = new LinkedList<>(getSelectedItems(fastAdapter));
Log.d("DELETE", "selectedItems: " + selectedItems.size());
// we delete item per item from the adapter directly or from the parent
// if keepEmptyHeaders is false, we add empty headers to the selected items set via the iterator, so that they are processed in the loop as well
IItem item, parent;
int pos, parentPos;
boolean expanded;
ListIterator<IItem> it = selectedItems.listIterator();
while (it.hasNext()) {
item = it.next();
pos = fastAdapter.getPosition(item);
// search for parent - if we find one, we remove the item from the parent's subitems directly
parent = getParent(item);
if (parent != null) {
parentPos = fastAdapter.getPosition(parent);
boolean success = ((IExpandable) parent).getSubItems().remove(item);
Log.d("DELETE", "success=" + success + " | deletedId=" + item.getIdentifier() + " | parentId=" + parent.getIdentifier() + " (sub items: " + ((IExpandable) parent).getSubItems().size() + ") | parentPos=" + parentPos);
// check if parent is expanded and notify the adapter about the removed item, if necessary (only if parent is visible)
if (parentPos != -1 && ((IExpandable) parent).isExpanded()) {
fastAdapter.notifyAdapterSubItemsChanged(parentPos, ((IExpandable) parent).getSubItems().size() + 1);
}
// if desired, notify the parent about it's changed items (only if parent is visible!)
if (parentPos != -1 && notifyParent) {
expanded = ((IExpandable) parent).isExpanded();
fastAdapter.notifyAdapterItemChanged(parentPos);
// expand the item again if it was expanded before calling notifyAdapterItemChanged
if (expanded) {
fastAdapter.expand(parentPos);
}
}
deleted.add(item);
if (deleteEmptyHeaders && ((IExpandable) parent).getSubItems().size() == 0) {
it.add(parent);
it.previous();
}
} else if (pos != -1) {
// if we did not find a parent, we remove the item from the adapter
IAdapter adapter = fastAdapter.getAdapter(pos);
boolean success = false;
if (adapter instanceof IItemAdapter) {
success = ((IItemAdapter) adapter).remove(pos) != null;
}
boolean isHeader = item instanceof IExpandable && ((IExpandable) item).getSubItems() != null;
Log.d("DELETE", "success=" + success + " | deletedId=" + item.getIdentifier() + "(" + (isHeader ? "EMPTY HEADER" : "ITEM WITHOUT HEADER") + ")");
deleted.add(item);
}
}
Log.d("DELETE", "deleted (incl. empty headers): " + deleted.size());
return deleted;
}
public interface IPredicate<T> {
boolean apply(T data);
}
} | library-extensions/src/main/java/com/mikepenz/fastadapter_extensions/utilities/SubItemUtil.java | package com.mikepenz.fastadapter_extensions.utilities;
import android.util.Log;
import com.mikepenz.fastadapter.FastAdapter;
import com.mikepenz.fastadapter.IAdapter;
import com.mikepenz.fastadapter.IExpandable;
import com.mikepenz.fastadapter.IItem;
import com.mikepenz.fastadapter.IItemAdapter;
import com.mikepenz.fastadapter.ISubItem;
import com.mikepenz.fastadapter.adapters.ItemAdapter;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.List;
import java.util.ListIterator;
import java.util.Set;
/**
* Created by flisar on 15.09.2016.
*/
public class SubItemUtil {
/**
* returns a set of selected items, regardless of their visibility
*
* @param adapter the adapter instance
* @return a set of all selected items and subitems
*/
public static Set<IItem> getSelectedItems(FastAdapter adapter) {
Set<IItem> selections = new HashSet<>();
int length = adapter.getItemCount();
List<IItem> items = new ArrayList<>();
for (int i = 0; i < length; i++)
items.add(adapter.getItem(i));
updateSelectedItemsWithCollapsed(selections, items);
return selections;
}
private static void updateSelectedItemsWithCollapsed(Set<IItem> selected, List<IItem> items) {
int length = items.size();
for (int i = 0; i < length; i++) {
if (items.get(i).isSelected()) {
selected.add(items.get(i));
}
if (items.get(i) instanceof IExpandable && ((IExpandable) items.get(i)).getSubItems() != null)
updateSelectedItemsWithCollapsed(selected, ((IExpandable) items.get(i)).getSubItems());
}
}
/**
* counts the items in the adapter, respecting subitems regardless of there current visibility
*
* @param adapter the adapter instance
* @param predicate predicate against which each item will be checked before counting it
* @return number of items in the adapter that apply to the predicate
*/
public static int countItems(final IItemAdapter adapter, IPredicate predicate) {
return countItems(adapter.getAdapterItems(), true, false, predicate);
}
/**
* counts the items in the adapter, respecting subitems regardless of there current visibility
*
* @param adapter the adapter instance
* @param countHeaders if true, headers will be counted as well
* @return number of items in the adapter
*/
public static int countItems(final IItemAdapter adapter, boolean countHeaders) {
return countItems(adapter.getAdapterItems(), countHeaders, false, null);
}
private static int countItems(List<IItem> items, boolean countHeaders, boolean subItemsOnly, IPredicate predicate) {
if (items == null || items.size() == 0)
return 0;
int temp, count = 0;
int itemCount = items.size();
IItem item;
List<IItem> subItems;
for (int i = 0; i < itemCount; i++) {
item = items.get(i);
if (item instanceof IExpandable && ((IExpandable) item).getSubItems() != null) {
subItems = ((IExpandable) item).getSubItems();
if (predicate == null) {
count += subItems != null ? subItems.size() : 0;
count += countItems(subItems, countHeaders, true, predicate);
if (countHeaders)
count++;
} else {
temp = subItems != null ? subItems.size() : 0;
for (int j = 0; j < temp; j++) {
if (predicate.apply(subItems.get(j)))
count++;
}
if (countHeaders && predicate.apply(item))
count++;
}
}
// in some cases, we must manually check, if the item is a sub item, process is optimised as much as possible via the subItemsOnly parameter already
// sub items will be counted in above if statement!
else if (!subItemsOnly && getParent(item) == null) {
if (predicate == null)
count++;
else if (predicate.apply(item))
count++;
}
}
return count;
}
/**
* counts the selected items in the adapter underneath an expandable item, recursively
*
* @param adapter the adapter instance
* @param header the header who's selected children should be counted
* @return number of selected items underneath the header
*/
public static <T extends IItem & IExpandable> int countSelectedSubItems(final FastAdapter adapter, T header) {
Set<IItem> selections = getSelectedItems(adapter);
return countSelectedSubItems(selections, header);
}
public static <T extends IItem & IExpandable> int countSelectedSubItems(Set<IItem> selections, T header) {
int count = 0;
List<IItem> subItems = header.getSubItems();
int items = header.getSubItems() != null ? header.getSubItems().size() : 0;
for (int i = 0; i < items; i++) {
if (selections.contains(subItems.get(i)))
count++;
if (subItems.get(i) instanceof IExpandable && ((IExpandable) subItems.get(i)).getSubItems() != null)
count += countSelectedSubItems(selections, (T) subItems.get(i));
}
return count;
}
private static <T extends IExpandable & IItem> T getParent(IItem item) {
if (item instanceof ISubItem)
return (T) ((ISubItem) item).getParent();
return null;
}
/**
* deletes all selected items from the adapter respecting if the are sub items or not
* subitems are removed from their parents sublists, main items are directly removed
*
* @param deleteEmptyHeaders if true, empty headers will be removed from the adapter
* @return List of items that have been removed from the adapter
*/
public static List<IItem> deleteSelected(final FastAdapter fastAdapter, boolean notifyParent, boolean deleteEmptyHeaders) {
List<IItem> deleted = new ArrayList<>();
// we use a LinkedList, because this has performance advantages when modifying the listIterator during iteration!
// Modifying list is O(1)
LinkedList<IItem> selectedItems = new LinkedList<>(getSelectedItems(fastAdapter));
Log.d("DELETE", "selectedItems: " + selectedItems.size());
// we delete item per item from the adapter directly or from the parent
// if keepEmptyHeaders is false, we add empty headers to the selected items set via the iterator, so that they are processed in the loop as well
IItem item, parent;
int pos, parentPos;
boolean expanded;
ListIterator<IItem> it = selectedItems.listIterator();
while (it.hasNext()) {
item = it.next();
pos = fastAdapter.getPosition(item);
// search for parent - if we find one, we remove the item from the parent's subitems directly
parent = getParent(item);
if (parent != null) {
parentPos = fastAdapter.getPosition(parent);
boolean success = ((IExpandable) parent).getSubItems().remove(item);
Log.d("DELETE", "success=" + success + " | deletedId=" + item.getIdentifier() + " | parentId=" + parent.getIdentifier() + " (sub items: " + ((IExpandable) parent).getSubItems().size() + ") | parentPos=" + parentPos);
// check if parent is expanded and notify the adapter about the removed item, if necessary (only if parent is visible)
if (parentPos != -1 && ((IExpandable) parent).isExpanded())
fastAdapter.notifyAdapterSubItemsChanged(parentPos, ((IExpandable) parent).getSubItems().size() + 1);
// if desired, notify the parent about it's changed items (only if parent is visible!)
if (parentPos != -1 && notifyParent) {
expanded = ((IExpandable) parent).isExpanded();
fastAdapter.notifyAdapterItemChanged(parentPos);
// expand the item again if it was expanded before calling notifyAdapterItemChanged
if (expanded)
fastAdapter.expand(parentPos);
}
deleted.add(item);
if (deleteEmptyHeaders && ((IExpandable) parent).getSubItems().size() == 0) {
it.add(parent);
it.previous();
}
} else if (pos != -1) {
// if we did not find a parent, we remove the item from the adapter
IAdapter adapter = fastAdapter.getAdapter(pos);
boolean success = false;
if (adapter instanceof IItemAdapter) {
success = ((IItemAdapter) adapter).remove(pos) != null;
}
boolean isHeader = item instanceof IExpandable && ((IExpandable) item).getSubItems() != null;
Log.d("DELETE", "success=" + success + " | deletedId=" + item.getIdentifier() + "(" + (isHeader ? "EMPTY HEADER" : "ITEM WITHOUT HEADER") + ")");
deleted.add(item);
}
}
Log.d("DELETE", "deleted (incl. empty headers): " + deleted.size());
return deleted;
}
public interface IPredicate<T> {
boolean apply(T data);
}
} | * improve codestyle
| library-extensions/src/main/java/com/mikepenz/fastadapter_extensions/utilities/SubItemUtil.java | * improve codestyle | <ide><path>ibrary-extensions/src/main/java/com/mikepenz/fastadapter_extensions/utilities/SubItemUtil.java
<ide> import com.mikepenz.fastadapter.IItem;
<ide> import com.mikepenz.fastadapter.IItemAdapter;
<ide> import com.mikepenz.fastadapter.ISubItem;
<del>import com.mikepenz.fastadapter.adapters.ItemAdapter;
<ide>
<ide> import java.util.ArrayList;
<ide> import java.util.HashSet;
<ide> Set<IItem> selections = new HashSet<>();
<ide> int length = adapter.getItemCount();
<ide> List<IItem> items = new ArrayList<>();
<del> for (int i = 0; i < length; i++)
<add> for (int i = 0; i < length; i++) {
<ide> items.add(adapter.getItem(i));
<add> }
<ide> updateSelectedItemsWithCollapsed(selections, items);
<ide> return selections;
<ide> }
<ide> if (items.get(i).isSelected()) {
<ide> selected.add(items.get(i));
<ide> }
<del> if (items.get(i) instanceof IExpandable && ((IExpandable) items.get(i)).getSubItems() != null)
<add> if (items.get(i) instanceof IExpandable && ((IExpandable) items.get(i)).getSubItems() != null) {
<ide> updateSelectedItemsWithCollapsed(selected, ((IExpandable) items.get(i)).getSubItems());
<add> }
<ide> }
<ide> }
<ide>
<ide> }
<ide>
<ide> private static int countItems(List<IItem> items, boolean countHeaders, boolean subItemsOnly, IPredicate predicate) {
<del> if (items == null || items.size() == 0)
<add> if (items == null || items.size() == 0) {
<ide> return 0;
<add> }
<ide>
<ide> int temp, count = 0;
<ide> int itemCount = items.size();
<ide> if (predicate == null) {
<ide> count += subItems != null ? subItems.size() : 0;
<ide> count += countItems(subItems, countHeaders, true, predicate);
<del> if (countHeaders)
<add> if (countHeaders) {
<ide> count++;
<add> }
<ide> } else {
<ide> temp = subItems != null ? subItems.size() : 0;
<ide> for (int j = 0; j < temp; j++) {
<del> if (predicate.apply(subItems.get(j)))
<add> if (predicate.apply(subItems.get(j))) {
<ide> count++;
<del> }
<del> if (countHeaders && predicate.apply(item))
<add> }
<add> }
<add> if (countHeaders && predicate.apply(item)) {
<ide> count++;
<add> }
<ide> }
<ide> }
<ide> // in some cases, we must manually check, if the item is a sub item, process is optimised as much as possible via the subItemsOnly parameter already
<ide> // sub items will be counted in above if statement!
<ide> else if (!subItemsOnly && getParent(item) == null) {
<del> if (predicate == null)
<add> if (predicate == null) {
<ide> count++;
<del> else if (predicate.apply(item))
<add> } else if (predicate.apply(item)) {
<ide> count++;
<add> }
<ide> }
<ide>
<ide> }
<ide> List<IItem> subItems = header.getSubItems();
<ide> int items = header.getSubItems() != null ? header.getSubItems().size() : 0;
<ide> for (int i = 0; i < items; i++) {
<del> if (selections.contains(subItems.get(i)))
<add> if (selections.contains(subItems.get(i))) {
<ide> count++;
<del> if (subItems.get(i) instanceof IExpandable && ((IExpandable) subItems.get(i)).getSubItems() != null)
<add> }
<add> if (subItems.get(i) instanceof IExpandable && ((IExpandable) subItems.get(i)).getSubItems() != null) {
<ide> count += countSelectedSubItems(selections, (T) subItems.get(i));
<add> }
<ide> }
<ide> return count;
<ide> }
<ide>
<ide> private static <T extends IExpandable & IItem> T getParent(IItem item) {
<ide>
<del> if (item instanceof ISubItem)
<add> if (item instanceof ISubItem) {
<ide> return (T) ((ISubItem) item).getParent();
<add> }
<ide> return null;
<ide> }
<ide>
<ide> Log.d("DELETE", "success=" + success + " | deletedId=" + item.getIdentifier() + " | parentId=" + parent.getIdentifier() + " (sub items: " + ((IExpandable) parent).getSubItems().size() + ") | parentPos=" + parentPos);
<ide>
<ide> // check if parent is expanded and notify the adapter about the removed item, if necessary (only if parent is visible)
<del> if (parentPos != -1 && ((IExpandable) parent).isExpanded())
<add> if (parentPos != -1 && ((IExpandable) parent).isExpanded()) {
<ide> fastAdapter.notifyAdapterSubItemsChanged(parentPos, ((IExpandable) parent).getSubItems().size() + 1);
<add> }
<ide>
<ide> // if desired, notify the parent about it's changed items (only if parent is visible!)
<ide> if (parentPos != -1 && notifyParent) {
<ide> expanded = ((IExpandable) parent).isExpanded();
<ide> fastAdapter.notifyAdapterItemChanged(parentPos);
<ide> // expand the item again if it was expanded before calling notifyAdapterItemChanged
<del> if (expanded)
<add> if (expanded) {
<ide> fastAdapter.expand(parentPos);
<add> }
<ide> }
<ide>
<ide> deleted.add(item); |
|
Java | apache-2.0 | 597bb8c8ea520d9706880b0bc27c4cad73b67fb3 | 0 | consulo/consulo-groovy,consulo/consulo-groovy | /*
* Copyright 2000-2012 JetBrains s.r.o.
*
* 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 org.jetbrains.plugins.groovy.annotator.intentions.dynamic;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import javax.inject.Inject;
import javax.inject.Singleton;
import javax.swing.tree.DefaultMutableTreeNode;
import org.jetbrains.plugins.groovy.annotator.intentions.QuickfixUtil;
import org.jetbrains.plugins.groovy.annotator.intentions.dynamic.elements.DClassElement;
import org.jetbrains.plugins.groovy.annotator.intentions.dynamic.elements.DItemElement;
import org.jetbrains.plugins.groovy.annotator.intentions.dynamic.elements.DMethodElement;
import org.jetbrains.plugins.groovy.annotator.intentions.dynamic.elements.DNamedElement;
import org.jetbrains.plugins.groovy.annotator.intentions.dynamic.elements.DPropertyElement;
import org.jetbrains.plugins.groovy.annotator.intentions.dynamic.elements.DRootElement;
import org.jetbrains.plugins.groovy.annotator.intentions.dynamic.ui.DynamicElementSettings;
import com.intellij.codeInsight.daemon.DaemonCodeAnalyzer;
import com.intellij.openapi.components.State;
import com.intellij.openapi.components.Storage;
import com.intellij.openapi.components.StoragePathMacros;
import com.intellij.openapi.editor.Editor;
import com.intellij.openapi.fileEditor.FileEditorManager;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.startup.StartupManager;
import com.intellij.openapi.wm.ToolWindow;
import com.intellij.psi.PsiDocumentManager;
import com.intellij.psi.PsiFile;
import com.intellij.psi.PsiManager;
import com.intellij.psi.PsiMethod;
import com.intellij.psi.PsiVariable;
import com.intellij.psi.impl.PsiModificationTrackerImpl;
import com.intellij.ui.treeStructure.treetable.ListTreeTableModelOnColumns;
import com.intellij.util.Function;
import com.intellij.util.containers.ContainerUtil;
import com.intellij.util.ui.tree.TreeUtil;
/**
* User: Dmitry.Krasilschikov
* Date: 23.11.2007
*/
@Singleton
@State(name = "DynamicElementsStorage", storages = @Storage(file = StoragePathMacros.PROJECT_CONFIG_DIR + "/dynamic.xml"))
public class DynamicManagerImpl extends DynamicManager
{
private final Project myProject;
private DRootElement myRootElement = new DRootElement();
@Inject
public DynamicManagerImpl(Project project, StartupManager startupManager)
{
myProject = project;
if(myProject.isDefault())
{
return;
}
startupManager.registerPostStartupActivity((ui) ->
{
if(myRootElement.getContainingClasses().size() > 0)
{
DynamicToolWindowWrapper.getInstance(project).getToolWindow(); //initialize myToolWindow
}
});
}
public Project getProject()
{
return myProject;
}
public void addProperty(DynamicElementSettings settings)
{
assert settings != null;
assert !settings.isMethod();
final DPropertyElement propertyElement = (DPropertyElement) createDynamicElement(settings);
final DClassElement classElement = getOrCreateClassElement(myProject, settings.getContainingClassName());
ToolWindow window = DynamicToolWindowWrapper.getInstance(myProject).getToolWindow(); //important to fetch myToolWindow before adding
classElement.addProperty(propertyElement);
addItemInTree(classElement, propertyElement, window);
}
private void removeItemFromTree(DItemElement itemElement, DClassElement classElement)
{
DynamicToolWindowWrapper wrapper = DynamicToolWindowWrapper.getInstance(myProject);
ListTreeTableModelOnColumns model = wrapper.getTreeTableModel();
Object classNode = TreeUtil.findNodeWithObject(classElement, model, model.getRoot());
final DefaultMutableTreeNode node = (DefaultMutableTreeNode) TreeUtil.findNodeWithObject(itemElement, model, classNode);
if(node == null)
{
return;
}
DefaultMutableTreeNode parent = (DefaultMutableTreeNode) node.getParent();
doRemove(wrapper, node, parent);
}
private void removeClassFromTree(DClassElement classElement)
{
DynamicToolWindowWrapper wrapper = DynamicToolWindowWrapper.getInstance(myProject);
ListTreeTableModelOnColumns model = wrapper.getTreeTableModel();
final DefaultMutableTreeNode node = (DefaultMutableTreeNode) TreeUtil.findNodeWithObject(classElement, model, model.getRoot());
if(node == null)
{
return;
}
DefaultMutableTreeNode parent = (DefaultMutableTreeNode) node.getParent();
doRemove(wrapper, node, parent);
}
private static void doRemove(DynamicToolWindowWrapper wrapper, DefaultMutableTreeNode node, DefaultMutableTreeNode parent)
{
DefaultMutableTreeNode toSelect = (parent.getChildAfter(node) != null || parent.getChildCount() == 1 ?
node.getNextNode() :
node.getPreviousNode());
wrapper.removeFromParent(parent, node);
if(toSelect != null)
{
wrapper.setSelectedNode(toSelect);
}
}
private void addItemInTree(final DClassElement classElement, final DItemElement itemElement, final ToolWindow window)
{
final ListTreeTableModelOnColumns myTreeTableModel = DynamicToolWindowWrapper.getInstance(myProject).getTreeTableModel();
window.activate(new Runnable()
{
public void run()
{
final Object rootObject = myTreeTableModel.getRoot();
if(!(rootObject instanceof DefaultMutableTreeNode))
{
return;
}
final DefaultMutableTreeNode rootNode = (DefaultMutableTreeNode) rootObject;
DefaultMutableTreeNode node = new DefaultMutableTreeNode(itemElement);
if(rootNode.getChildCount() > 0)
{
for(DefaultMutableTreeNode classNode = (DefaultMutableTreeNode) rootNode.getFirstChild();
classNode != null;
classNode = (DefaultMutableTreeNode) rootNode.getChildAfter(classNode))
{
final Object classRow = classNode.getUserObject();
if(!(classRow instanceof DClassElement))
{
return;
}
DClassElement otherClassName = (DClassElement) classRow;
if(otherClassName.equals(classElement))
{
int index = getIndexToInsert(classNode, itemElement);
classNode.insert(node, index);
myTreeTableModel.nodesWereInserted(classNode, new int[]{index});
DynamicToolWindowWrapper.getInstance(myProject).setSelectedNode(node);
return;
}
}
}
// if there is no such class in tree
int index = getIndexToInsert(rootNode, classElement);
DefaultMutableTreeNode classNode = new DefaultMutableTreeNode(classElement);
rootNode.insert(classNode, index);
myTreeTableModel.nodesWereInserted(rootNode, new int[]{index});
classNode.add(node);
myTreeTableModel.nodesWereInserted(classNode, new int[]{0});
DynamicToolWindowWrapper.getInstance(myProject).setSelectedNode(node);
}
}, true);
}
private static int getIndexToInsert(DefaultMutableTreeNode parent, DNamedElement namedElement)
{
if(parent.getChildCount() == 0)
{
return 0;
}
int res = 0;
for(DefaultMutableTreeNode child = (DefaultMutableTreeNode) parent.getFirstChild();
child != null;
child = (DefaultMutableTreeNode) parent.getChildAfter(child))
{
Object childObject = child.getUserObject();
if(!(childObject instanceof DNamedElement))
{
return 0;
}
String otherName = ((DNamedElement) childObject).getName();
if(otherName.compareTo(namedElement.getName()) > 0)
{
return res;
}
res++;
}
return res;
}
public void addMethod(DynamicElementSettings settings)
{
if(settings == null)
{
return;
}
assert settings.isMethod();
final DMethodElement methodElement = (DMethodElement) createDynamicElement(settings);
final DClassElement classElement = getOrCreateClassElement(myProject, settings.getContainingClassName());
ToolWindow window = DynamicToolWindowWrapper.getInstance(myProject).getToolWindow(); //important to fetch myToolWindow before adding
classElement.addMethod(methodElement);
addItemInTree(classElement, methodElement, window);
}
public void removeClassElement(DClassElement classElement)
{
final DRootElement rootElement = getRootElement();
rootElement.removeClassElement(classElement.getName());
removeClassFromTree(classElement);
}
private void removePropertyElement(DPropertyElement propertyElement)
{
final DClassElement classElement = getClassElementByItem(propertyElement);
assert classElement != null;
classElement.removeProperty(propertyElement);
}
@Nonnull
public Collection<DPropertyElement> findDynamicPropertiesOfClass(String className)
{
final DClassElement classElement = findClassElement(getRootElement(), className);
if(classElement != null)
{
return classElement.getProperties();
}
return new ArrayList<DPropertyElement>();
}
@Nullable
public String getPropertyType(String className, String propertyName)
{
final DPropertyElement dynamicProperty = findConcreteDynamicProperty(getRootElement(), className, propertyName);
if(dynamicProperty == null)
{
return null;
}
return dynamicProperty.getType();
}
@Nonnull
public Collection<DClassElement> getAllContainingClasses()
{
//TODO: use iterator
final DRootElement root = getRootElement();
return root.getContainingClasses();
}
public DRootElement getRootElement()
{
return myRootElement;
}
@Nullable
public String replaceDynamicPropertyName(String className, String oldPropertyName, String newPropertyName)
{
final DClassElement classElement = findClassElement(getRootElement(), className);
if(classElement == null)
{
return null;
}
final DPropertyElement oldPropertyElement = classElement.getPropertyByName(oldPropertyName);
if(oldPropertyElement == null)
{
return null;
}
classElement.removeProperty(oldPropertyElement);
classElement.addProperty(new DPropertyElement(oldPropertyElement.isStatic(), newPropertyName, oldPropertyElement.getType()));
fireChange();
DynamicToolWindowWrapper.getInstance(getProject()).rebuildTreePanel();
return newPropertyName;
}
@Nullable
public String replaceDynamicPropertyType(String className, String propertyName, String oldPropertyType, String newPropertyType)
{
final DPropertyElement property = findConcreteDynamicProperty(className, propertyName);
if(property == null)
{
return null;
}
property.setType(newPropertyType);
fireChange();
return newPropertyType;
}
/*
* Find dynamic property in class with name
*/
@Nullable
private static DMethodElement findConcreteDynamicMethod(DRootElement rootElement,
String containingClassName,
String methodName,
String[] parametersTypes)
{
DClassElement classElement = findClassElement(rootElement, containingClassName);
if(classElement == null)
{
return null;
}
return classElement.getMethod(methodName, parametersTypes);
}
// @Nullable
public DMethodElement findConcreteDynamicMethod(String containingClassName, String name, String[] parameterTypes)
{
return findConcreteDynamicMethod(getRootElement(), containingClassName, name, parameterTypes);
}
private void removeMethodElement(DMethodElement methodElement)
{
final DClassElement classElement = getClassElementByItem(methodElement);
assert classElement != null;
classElement.removeMethod(methodElement);
}
public void removeItemElement(DItemElement element)
{
DClassElement classElement = getClassElementByItem(element);
if(classElement == null)
{
return;
}
if(element instanceof DPropertyElement)
{
removePropertyElement(((DPropertyElement) element));
}
else if(element instanceof DMethodElement)
{
removeMethodElement(((DMethodElement) element));
}
removeItemFromTree(element, classElement);
}
public void replaceDynamicMethodType(String className, String name, List<ParamInfo> myPairList, String oldType, String newType)
{
final DMethodElement method = findConcreteDynamicMethod(className, name, QuickfixUtil.getArgumentsTypes(myPairList));
if(method == null)
{
return;
}
method.setType(newType);
fireChange();
}
@Nonnull
public DClassElement getOrCreateClassElement(Project project, String className)
{
DClassElement classElement = DynamicManager.getInstance(myProject).getRootElement().getClassElement(className);
if(classElement == null)
{
return new DClassElement(project, className);
}
return classElement;
}
@Nullable
public DClassElement getClassElementByItem(DItemElement itemElement)
{
final Collection<DClassElement> classes = getAllContainingClasses();
for(DClassElement aClass : classes)
{
if(aClass.containsElement(itemElement))
{
return aClass;
}
}
return null;
}
public void replaceDynamicMethodName(String className, String oldName, String newName, String[] types)
{
final DMethodElement oldMethodElement = findConcreteDynamicMethod(className, oldName, types);
if(oldMethodElement != null)
{
oldMethodElement.setName(newName);
}
DynamicToolWindowWrapper.getInstance(getProject()).rebuildTreePanel();
fireChange();
}
public Iterable<PsiMethod> getMethods(final String classQname)
{
DClassElement classElement = getRootElement().getClassElement(classQname);
if(classElement == null)
{
return Collections.emptyList();
}
return ContainerUtil.map(classElement.getMethods(), new Function<DMethodElement, PsiMethod>()
{
public PsiMethod fun(DMethodElement methodElement)
{
return methodElement.getPsi(PsiManager.getInstance(myProject), classQname);
}
});
}
public Iterable<PsiVariable> getProperties(final String classQname)
{
DClassElement classElement = getRootElement().getClassElement(classQname);
if(classElement == null)
{
return Collections.emptyList();
}
return ContainerUtil.map(classElement.getProperties(), new Function<DPropertyElement, PsiVariable>()
{
public PsiVariable fun(DPropertyElement propertyElement)
{
return propertyElement.getPsi(PsiManager.getInstance(myProject), classQname);
}
});
}
public void replaceClassName(final DClassElement oldClassElement, String newClassName)
{
if(oldClassElement == null)
{
return;
}
final DRootElement rootElement = getRootElement();
rootElement.removeClassElement(oldClassElement.getName());
oldClassElement.setName(newClassName);
rootElement.mergeAddClass(oldClassElement);
fireChange();
}
public void fireChange()
{
fireChangeCodeAnalyze();
}
private void fireChangeCodeAnalyze()
{
final Editor textEditor = FileEditorManager.getInstance(myProject).getSelectedTextEditor();
if(textEditor == null)
{
return;
}
final PsiFile file = PsiDocumentManager.getInstance(myProject).getPsiFile(textEditor.getDocument());
if(file == null)
{
return;
}
((PsiModificationTrackerImpl) PsiManager.getInstance(myProject).getModificationTracker()).incCounter();
DaemonCodeAnalyzer.getInstance(myProject).restart();
}
@Nullable
public DPropertyElement findConcreteDynamicProperty(final String containingClassName, final String propertyName)
{
return findConcreteDynamicProperty(getRootElement(), containingClassName, propertyName);
}
@Nullable
private static DPropertyElement findConcreteDynamicProperty(DRootElement rootElement, final String conatainingClassName, final String propertyName)
{
final DClassElement classElement = rootElement.getClassElement(conatainingClassName);
if(classElement == null)
{
return null;
}
return classElement.getPropertyByName(propertyName);
}
@Nullable
private static DClassElement findClassElement(DRootElement rootElement, final String conatainingClassName)
{
return rootElement.getClassElement(conatainingClassName);
}
/**
* On exit
*/
public DRootElement getState()
{
// return XmlSerializer.serialize(myRootElement);
return myRootElement;
}
/*
* On loading
*/
public void loadState(DRootElement element)
{
// myRootElement = XmlSerializer.deserialize(element, myRootElement.getClass());
myRootElement = element;
}
public DItemElement createDynamicElement(DynamicElementSettings settings)
{
DItemElement itemElement;
if(settings.isMethod())
{
itemElement = new DMethodElement(settings.isStatic(), settings.getName(), settings.getType(), settings.getParams());
}
else
{
itemElement = new DPropertyElement(settings.isStatic(), settings.getName(), settings.getType());
}
return itemElement;
}
}
| groovy-impl/src/main/java/org/jetbrains/plugins/groovy/annotator/intentions/dynamic/DynamicManagerImpl.java | /*
* Copyright 2000-2012 JetBrains s.r.o.
*
* 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 org.jetbrains.plugins.groovy.annotator.intentions.dynamic;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import javax.inject.Inject;
import javax.inject.Singleton;
import javax.swing.tree.DefaultMutableTreeNode;
import org.jetbrains.plugins.groovy.annotator.intentions.QuickfixUtil;
import org.jetbrains.plugins.groovy.annotator.intentions.dynamic.elements.DClassElement;
import org.jetbrains.plugins.groovy.annotator.intentions.dynamic.elements.DItemElement;
import org.jetbrains.plugins.groovy.annotator.intentions.dynamic.elements.DMethodElement;
import org.jetbrains.plugins.groovy.annotator.intentions.dynamic.elements.DNamedElement;
import org.jetbrains.plugins.groovy.annotator.intentions.dynamic.elements.DPropertyElement;
import org.jetbrains.plugins.groovy.annotator.intentions.dynamic.elements.DRootElement;
import org.jetbrains.plugins.groovy.annotator.intentions.dynamic.ui.DynamicElementSettings;
import com.intellij.codeInsight.daemon.DaemonCodeAnalyzer;
import com.intellij.openapi.components.State;
import com.intellij.openapi.components.Storage;
import com.intellij.openapi.components.StoragePathMacros;
import com.intellij.openapi.editor.Editor;
import com.intellij.openapi.fileEditor.FileEditorManager;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.startup.StartupManager;
import com.intellij.openapi.wm.ToolWindow;
import com.intellij.psi.PsiDocumentManager;
import com.intellij.psi.PsiFile;
import com.intellij.psi.PsiManager;
import com.intellij.psi.PsiMethod;
import com.intellij.psi.PsiVariable;
import com.intellij.psi.impl.PsiModificationTrackerImpl;
import com.intellij.ui.treeStructure.treetable.ListTreeTableModelOnColumns;
import com.intellij.util.Function;
import com.intellij.util.containers.ContainerUtil;
import com.intellij.util.ui.tree.TreeUtil;
/**
* User: Dmitry.Krasilschikov
* Date: 23.11.2007
*/
@Singleton
@State(name = "DynamicElementsStorage", storages = @Storage(file = StoragePathMacros.PROJECT_CONFIG_DIR + "/dynamic.xml"))
public class DynamicManagerImpl extends DynamicManager
{
private final Project myProject;
private DRootElement myRootElement = new DRootElement();
@Inject
public DynamicManagerImpl(Project project, StartupManager startupManager)
{
myProject = project;
startupManager.registerPostStartupActivity((ui) ->
{
if(myRootElement.getContainingClasses().size() > 0)
{
DynamicToolWindowWrapper.getInstance(project).getToolWindow(); //initialize myToolWindow
}
});
}
public Project getProject()
{
return myProject;
}
public void addProperty(DynamicElementSettings settings)
{
assert settings != null;
assert !settings.isMethod();
final DPropertyElement propertyElement = (DPropertyElement) createDynamicElement(settings);
final DClassElement classElement = getOrCreateClassElement(myProject, settings.getContainingClassName());
ToolWindow window = DynamicToolWindowWrapper.getInstance(myProject).getToolWindow(); //important to fetch myToolWindow before adding
classElement.addProperty(propertyElement);
addItemInTree(classElement, propertyElement, window);
}
private void removeItemFromTree(DItemElement itemElement, DClassElement classElement)
{
DynamicToolWindowWrapper wrapper = DynamicToolWindowWrapper.getInstance(myProject);
ListTreeTableModelOnColumns model = wrapper.getTreeTableModel();
Object classNode = TreeUtil.findNodeWithObject(classElement, model, model.getRoot());
final DefaultMutableTreeNode node = (DefaultMutableTreeNode) TreeUtil.findNodeWithObject(itemElement, model, classNode);
if(node == null)
{
return;
}
DefaultMutableTreeNode parent = (DefaultMutableTreeNode) node.getParent();
doRemove(wrapper, node, parent);
}
private void removeClassFromTree(DClassElement classElement)
{
DynamicToolWindowWrapper wrapper = DynamicToolWindowWrapper.getInstance(myProject);
ListTreeTableModelOnColumns model = wrapper.getTreeTableModel();
final DefaultMutableTreeNode node = (DefaultMutableTreeNode) TreeUtil.findNodeWithObject(classElement, model, model.getRoot());
if(node == null)
{
return;
}
DefaultMutableTreeNode parent = (DefaultMutableTreeNode) node.getParent();
doRemove(wrapper, node, parent);
}
private static void doRemove(DynamicToolWindowWrapper wrapper, DefaultMutableTreeNode node, DefaultMutableTreeNode parent)
{
DefaultMutableTreeNode toSelect = (parent.getChildAfter(node) != null || parent.getChildCount() == 1 ?
node.getNextNode() :
node.getPreviousNode());
wrapper.removeFromParent(parent, node);
if(toSelect != null)
{
wrapper.setSelectedNode(toSelect);
}
}
private void addItemInTree(final DClassElement classElement, final DItemElement itemElement, final ToolWindow window)
{
final ListTreeTableModelOnColumns myTreeTableModel = DynamicToolWindowWrapper.getInstance(myProject).getTreeTableModel();
window.activate(new Runnable()
{
public void run()
{
final Object rootObject = myTreeTableModel.getRoot();
if(!(rootObject instanceof DefaultMutableTreeNode))
{
return;
}
final DefaultMutableTreeNode rootNode = (DefaultMutableTreeNode) rootObject;
DefaultMutableTreeNode node = new DefaultMutableTreeNode(itemElement);
if(rootNode.getChildCount() > 0)
{
for(DefaultMutableTreeNode classNode = (DefaultMutableTreeNode) rootNode.getFirstChild();
classNode != null;
classNode = (DefaultMutableTreeNode) rootNode.getChildAfter(classNode))
{
final Object classRow = classNode.getUserObject();
if(!(classRow instanceof DClassElement))
{
return;
}
DClassElement otherClassName = (DClassElement) classRow;
if(otherClassName.equals(classElement))
{
int index = getIndexToInsert(classNode, itemElement);
classNode.insert(node, index);
myTreeTableModel.nodesWereInserted(classNode, new int[]{index});
DynamicToolWindowWrapper.getInstance(myProject).setSelectedNode(node);
return;
}
}
}
// if there is no such class in tree
int index = getIndexToInsert(rootNode, classElement);
DefaultMutableTreeNode classNode = new DefaultMutableTreeNode(classElement);
rootNode.insert(classNode, index);
myTreeTableModel.nodesWereInserted(rootNode, new int[]{index});
classNode.add(node);
myTreeTableModel.nodesWereInserted(classNode, new int[]{0});
DynamicToolWindowWrapper.getInstance(myProject).setSelectedNode(node);
}
}, true);
}
private static int getIndexToInsert(DefaultMutableTreeNode parent, DNamedElement namedElement)
{
if(parent.getChildCount() == 0)
{
return 0;
}
int res = 0;
for(DefaultMutableTreeNode child = (DefaultMutableTreeNode) parent.getFirstChild();
child != null;
child = (DefaultMutableTreeNode) parent.getChildAfter(child))
{
Object childObject = child.getUserObject();
if(!(childObject instanceof DNamedElement))
{
return 0;
}
String otherName = ((DNamedElement) childObject).getName();
if(otherName.compareTo(namedElement.getName()) > 0)
{
return res;
}
res++;
}
return res;
}
public void addMethod(DynamicElementSettings settings)
{
if(settings == null)
{
return;
}
assert settings.isMethod();
final DMethodElement methodElement = (DMethodElement) createDynamicElement(settings);
final DClassElement classElement = getOrCreateClassElement(myProject, settings.getContainingClassName());
ToolWindow window = DynamicToolWindowWrapper.getInstance(myProject).getToolWindow(); //important to fetch myToolWindow before adding
classElement.addMethod(methodElement);
addItemInTree(classElement, methodElement, window);
}
public void removeClassElement(DClassElement classElement)
{
final DRootElement rootElement = getRootElement();
rootElement.removeClassElement(classElement.getName());
removeClassFromTree(classElement);
}
private void removePropertyElement(DPropertyElement propertyElement)
{
final DClassElement classElement = getClassElementByItem(propertyElement);
assert classElement != null;
classElement.removeProperty(propertyElement);
}
@Nonnull
public Collection<DPropertyElement> findDynamicPropertiesOfClass(String className)
{
final DClassElement classElement = findClassElement(getRootElement(), className);
if(classElement != null)
{
return classElement.getProperties();
}
return new ArrayList<DPropertyElement>();
}
@Nullable
public String getPropertyType(String className, String propertyName)
{
final DPropertyElement dynamicProperty = findConcreteDynamicProperty(getRootElement(), className, propertyName);
if(dynamicProperty == null)
{
return null;
}
return dynamicProperty.getType();
}
@Nonnull
public Collection<DClassElement> getAllContainingClasses()
{
//TODO: use iterator
final DRootElement root = getRootElement();
return root.getContainingClasses();
}
public DRootElement getRootElement()
{
return myRootElement;
}
@Nullable
public String replaceDynamicPropertyName(String className, String oldPropertyName, String newPropertyName)
{
final DClassElement classElement = findClassElement(getRootElement(), className);
if(classElement == null)
{
return null;
}
final DPropertyElement oldPropertyElement = classElement.getPropertyByName(oldPropertyName);
if(oldPropertyElement == null)
{
return null;
}
classElement.removeProperty(oldPropertyElement);
classElement.addProperty(new DPropertyElement(oldPropertyElement.isStatic(), newPropertyName, oldPropertyElement.getType()));
fireChange();
DynamicToolWindowWrapper.getInstance(getProject()).rebuildTreePanel();
return newPropertyName;
}
@Nullable
public String replaceDynamicPropertyType(String className, String propertyName, String oldPropertyType, String newPropertyType)
{
final DPropertyElement property = findConcreteDynamicProperty(className, propertyName);
if(property == null)
{
return null;
}
property.setType(newPropertyType);
fireChange();
return newPropertyType;
}
/*
* Find dynamic property in class with name
*/
@Nullable
private static DMethodElement findConcreteDynamicMethod(DRootElement rootElement,
String containingClassName,
String methodName,
String[] parametersTypes)
{
DClassElement classElement = findClassElement(rootElement, containingClassName);
if(classElement == null)
{
return null;
}
return classElement.getMethod(methodName, parametersTypes);
}
// @Nullable
public DMethodElement findConcreteDynamicMethod(String containingClassName, String name, String[] parameterTypes)
{
return findConcreteDynamicMethod(getRootElement(), containingClassName, name, parameterTypes);
}
private void removeMethodElement(DMethodElement methodElement)
{
final DClassElement classElement = getClassElementByItem(methodElement);
assert classElement != null;
classElement.removeMethod(methodElement);
}
public void removeItemElement(DItemElement element)
{
DClassElement classElement = getClassElementByItem(element);
if(classElement == null)
{
return;
}
if(element instanceof DPropertyElement)
{
removePropertyElement(((DPropertyElement) element));
}
else if(element instanceof DMethodElement)
{
removeMethodElement(((DMethodElement) element));
}
removeItemFromTree(element, classElement);
}
public void replaceDynamicMethodType(String className, String name, List<ParamInfo> myPairList, String oldType, String newType)
{
final DMethodElement method = findConcreteDynamicMethod(className, name, QuickfixUtil.getArgumentsTypes(myPairList));
if(method == null)
{
return;
}
method.setType(newType);
fireChange();
}
@Nonnull
public DClassElement getOrCreateClassElement(Project project, String className)
{
DClassElement classElement = DynamicManager.getInstance(myProject).getRootElement().getClassElement(className);
if(classElement == null)
{
return new DClassElement(project, className);
}
return classElement;
}
@Nullable
public DClassElement getClassElementByItem(DItemElement itemElement)
{
final Collection<DClassElement> classes = getAllContainingClasses();
for(DClassElement aClass : classes)
{
if(aClass.containsElement(itemElement))
{
return aClass;
}
}
return null;
}
public void replaceDynamicMethodName(String className, String oldName, String newName, String[] types)
{
final DMethodElement oldMethodElement = findConcreteDynamicMethod(className, oldName, types);
if(oldMethodElement != null)
{
oldMethodElement.setName(newName);
}
DynamicToolWindowWrapper.getInstance(getProject()).rebuildTreePanel();
fireChange();
}
public Iterable<PsiMethod> getMethods(final String classQname)
{
DClassElement classElement = getRootElement().getClassElement(classQname);
if(classElement == null)
{
return Collections.emptyList();
}
return ContainerUtil.map(classElement.getMethods(), new Function<DMethodElement, PsiMethod>()
{
public PsiMethod fun(DMethodElement methodElement)
{
return methodElement.getPsi(PsiManager.getInstance(myProject), classQname);
}
});
}
public Iterable<PsiVariable> getProperties(final String classQname)
{
DClassElement classElement = getRootElement().getClassElement(classQname);
if(classElement == null)
{
return Collections.emptyList();
}
return ContainerUtil.map(classElement.getProperties(), new Function<DPropertyElement, PsiVariable>()
{
public PsiVariable fun(DPropertyElement propertyElement)
{
return propertyElement.getPsi(PsiManager.getInstance(myProject), classQname);
}
});
}
public void replaceClassName(final DClassElement oldClassElement, String newClassName)
{
if(oldClassElement == null)
{
return;
}
final DRootElement rootElement = getRootElement();
rootElement.removeClassElement(oldClassElement.getName());
oldClassElement.setName(newClassName);
rootElement.mergeAddClass(oldClassElement);
fireChange();
}
public void fireChange()
{
fireChangeCodeAnalyze();
}
private void fireChangeCodeAnalyze()
{
final Editor textEditor = FileEditorManager.getInstance(myProject).getSelectedTextEditor();
if(textEditor == null)
{
return;
}
final PsiFile file = PsiDocumentManager.getInstance(myProject).getPsiFile(textEditor.getDocument());
if(file == null)
{
return;
}
((PsiModificationTrackerImpl) PsiManager.getInstance(myProject).getModificationTracker()).incCounter();
DaemonCodeAnalyzer.getInstance(myProject).restart();
}
@Nullable
public DPropertyElement findConcreteDynamicProperty(final String containingClassName, final String propertyName)
{
return findConcreteDynamicProperty(getRootElement(), containingClassName, propertyName);
}
@Nullable
private static DPropertyElement findConcreteDynamicProperty(DRootElement rootElement, final String conatainingClassName, final String propertyName)
{
final DClassElement classElement = rootElement.getClassElement(conatainingClassName);
if(classElement == null)
{
return null;
}
return classElement.getPropertyByName(propertyName);
}
@Nullable
private static DClassElement findClassElement(DRootElement rootElement, final String conatainingClassName)
{
return rootElement.getClassElement(conatainingClassName);
}
/**
* On exit
*/
public DRootElement getState()
{
// return XmlSerializer.serialize(myRootElement);
return myRootElement;
}
/*
* On loading
*/
public void loadState(DRootElement element)
{
// myRootElement = XmlSerializer.deserialize(element, myRootElement.getClass());
myRootElement = element;
}
public DItemElement createDynamicElement(DynamicElementSettings settings)
{
DItemElement itemElement;
if(settings.isMethod())
{
itemElement = new DMethodElement(settings.isStatic(), settings.getName(), settings.getType(), settings.getParams());
}
else
{
itemElement = new DPropertyElement(settings.isStatic(), settings.getName(), settings.getType());
}
return itemElement;
}
}
| do not add for default
| groovy-impl/src/main/java/org/jetbrains/plugins/groovy/annotator/intentions/dynamic/DynamicManagerImpl.java | do not add for default | <ide><path>roovy-impl/src/main/java/org/jetbrains/plugins/groovy/annotator/intentions/dynamic/DynamicManagerImpl.java
<ide> public DynamicManagerImpl(Project project, StartupManager startupManager)
<ide> {
<ide> myProject = project;
<add>
<add> if(myProject.isDefault())
<add> {
<add> return;
<add> }
<add>
<ide> startupManager.registerPostStartupActivity((ui) ->
<ide> {
<ide> if(myRootElement.getContainingClasses().size() > 0) |
|
Java | mit | bfb2844c700c3f5948a8f1cb7c592924a993b81d | 0 | joffrey-bion/livedoc,joffrey-bion/livedoc,joffrey-bion/livedoc,joffrey-bion/livedoc,joffrey-bion/livedoc | package org.hildan.livedoc.springmvc;
import java.util.List;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.hildan.livedoc.core.AnnotatedTypesFinder;
import org.hildan.livedoc.core.DocReader;
import org.hildan.livedoc.core.LivedocAnnotationDocReader;
import org.hildan.livedoc.core.LivedocReader;
import org.hildan.livedoc.core.LivedocReaderBuilder;
import org.hildan.livedoc.core.scanners.properties.PropertyScanner;
import org.hildan.livedoc.core.util.LivedocUtils;
import org.hildan.livedoc.springmvc.scanner.properties.JacksonPropertyScanner;
import org.reflections.Reflections;
import org.springframework.http.converter.json.Jackson2ObjectMapperBuilder;
public class SpringLivedocReaderFactory {
/**
* Creates a Spring-oriented {@link LivedocReader} using a new Jackson {@link ObjectMapper} with Spring defaults.
*
* @param packages
* the list of packages to scan
*
* @return a new {@link LivedocReader}
*/
public static LivedocReader getReader(List<String> packages) {
return getReader(packages, null);
}
/**
* Creates a Spring-oriented {@link LivedocReader} with the given configuration.
*
* @param packages
* the list of packages to scan
* @param jacksonObjectMapper
* the Jackson {@link ObjectMapper} to use for property exploration and template generation, or null to use
* a new mapper with Spring defaults
*
* @return a new {@link LivedocReader}
*/
public static LivedocReader getReader(List<String> packages, ObjectMapper jacksonObjectMapper) {
Reflections reflections = LivedocUtils.newReflections(packages);
AnnotatedTypesFinder annotatedTypesFinder = LivedocUtils.createAnnotatedTypesFinder(reflections);
ObjectMapper mapper = jacksonObjectMapper == null ? createDefaultSpringObjectMapper() : jacksonObjectMapper;
PropertyScanner propertyScanner = new JacksonPropertyScanner(mapper);
DocReader springDocReader = new SpringDocReader(annotatedTypesFinder);
DocReader baseDocReader = new LivedocAnnotationDocReader(annotatedTypesFinder);
return new LivedocReaderBuilder().scanningPackages(packages)
.withPropertyScanner(propertyScanner)
.addDocReader(springDocReader)
.addDocReader(baseDocReader)
.build();
}
private static ObjectMapper createDefaultSpringObjectMapper() {
return Jackson2ObjectMapperBuilder.json().build();
}
}
| livedoc-springmvc/src/main/java/org/hildan/livedoc/springmvc/SpringLivedocReaderFactory.java | package org.hildan.livedoc.springmvc;
import java.util.List;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.hildan.livedoc.core.AnnotatedTypesFinder;
import org.hildan.livedoc.core.DocReader;
import org.hildan.livedoc.core.LivedocAnnotationDocReader;
import org.hildan.livedoc.core.LivedocReader;
import org.hildan.livedoc.core.LivedocReaderBuilder;
import org.hildan.livedoc.core.scanners.properties.PropertyScanner;
import org.hildan.livedoc.core.util.LivedocUtils;
import org.hildan.livedoc.springmvc.scanner.properties.JacksonPropertyScanner;
import org.reflections.Reflections;
import org.springframework.http.converter.json.Jackson2ObjectMapperBuilder;
public class SpringLivedocReaderFactory {
/**
* Creates a Spring-oriented {@link LivedocReader} with the given configuration.
*
* @param packages
* the list of packages to scan
* @param jacksonObjectMapper
* the Jackson {@link ObjectMapper} to use for property exploration and template generation, or null to use
* a new mapper with Spring defaults
*
* @return a new {@link LivedocReader}
*/
public static LivedocReader getReader(List<String> packages, ObjectMapper jacksonObjectMapper) {
Reflections reflections = LivedocUtils.newReflections(packages);
AnnotatedTypesFinder annotatedTypesFinder = LivedocUtils.createAnnotatedTypesFinder(reflections);
ObjectMapper mapper = jacksonObjectMapper == null ? createDefaultSpringObjectMapper() : jacksonObjectMapper;
PropertyScanner propertyScanner = new JacksonPropertyScanner(mapper);
DocReader springDocReader = new SpringDocReader(annotatedTypesFinder);
DocReader baseDocReader = new LivedocAnnotationDocReader(annotatedTypesFinder);
return new LivedocReaderBuilder().scanningPackages(packages)
.withPropertyScanner(propertyScanner)
.addDocReader(springDocReader)
.addDocReader(baseDocReader)
.build();
}
private static ObjectMapper createDefaultSpringObjectMapper() {
return Jackson2ObjectMapperBuilder.json().build();
}
}
| Add Spring LivedocReader factory method without ObjectMapper
| livedoc-springmvc/src/main/java/org/hildan/livedoc/springmvc/SpringLivedocReaderFactory.java | Add Spring LivedocReader factory method without ObjectMapper | <ide><path>ivedoc-springmvc/src/main/java/org/hildan/livedoc/springmvc/SpringLivedocReaderFactory.java
<ide> import org.springframework.http.converter.json.Jackson2ObjectMapperBuilder;
<ide>
<ide> public class SpringLivedocReaderFactory {
<add>
<add> /**
<add> * Creates a Spring-oriented {@link LivedocReader} using a new Jackson {@link ObjectMapper} with Spring defaults.
<add> *
<add> * @param packages
<add> * the list of packages to scan
<add> *
<add> * @return a new {@link LivedocReader}
<add> */
<add> public static LivedocReader getReader(List<String> packages) {
<add> return getReader(packages, null);
<add> }
<ide>
<ide> /**
<ide> * Creates a Spring-oriented {@link LivedocReader} with the given configuration. |
|
Java | apache-2.0 | 32eb57b31a135cd855d3eb1f42a53714fbc4ccdc | 0 | Poundex/open-dolphin,nagyistoce/open-dolphin,nagyistoce/open-dolphin,gemaSantiago/open-dolphin,DaveKriewall/open-dolphin,nagyistoce/open-dolphin,janih/open-dolphin,canoo/open-dolphin,janih/open-dolphin,gemaSantiago/open-dolphin,nagyistoce/open-dolphin,DaveKriewall/open-dolphin,canoo/open-dolphin,DaveKriewall/open-dolphin,canoo/open-dolphin,canoo/open-dolphin,gemaSantiago/open-dolphin,Poundex/open-dolphin,janih/open-dolphin,janih/open-dolphin,gemaSantiago/open-dolphin,Poundex/open-dolphin,DaveKriewall/open-dolphin,Poundex/open-dolphin | /*
* Copyright 2012 Canoo Engineering AG.
*
* 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 com.canoo.dolphin.demo;
import com.canoo.dolphin.core.comm.Command;
import com.canoo.dolphin.core.comm.InitializeAttributeCommand;
import com.canoo.dolphin.core.server.action.ServerAction;
import com.canoo.dolphin.core.server.comm.ActionRegistry;
import com.canoo.dolphin.core.server.comm.CommandHandler;
import java.util.List;
public class JavaAction implements ServerAction {
public void registerIn(ActionRegistry registry) {
registry.register("javaAction", new CommandHandler<Command>() {
@Override
public void handleCommand(Command command, List<Command> response) {
InitializeAttributeCommand initializeAttributeCommand = new InitializeAttributeCommand();
initializeAttributeCommand.setPmId("JAVA");
initializeAttributeCommand.setPropertyName("purpose");
initializeAttributeCommand.setNewValue("works without JavaFX");
response.add(initializeAttributeCommand);
}
});
}
}
| subprojects/demo-javafx/server/src/main/groovy/com/canoo/dolphin/demo/JavaAction.java | /*
* Copyright 2012 Canoo Engineering AG.
*
* 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 com.canoo.dolphin.demo;
import com.canoo.dolphin.core.comm.InitializeAttributeCommand;
import com.canoo.dolphin.core.comm.NamedCommand;
import com.canoo.dolphin.core.server.action.ServerAction;
import com.canoo.dolphin.core.server.comm.ActionRegistry;
import groovy.lang.Closure;
import java.util.List;
public class JavaAction implements ServerAction {
public void registerIn(ActionRegistry registry) {
registry.register("javaAction", new Closure(this) {
public Object call(NamedCommand cmd, List response) {
InitializeAttributeCommand initializeAttributeCommand = new InitializeAttributeCommand();
initializeAttributeCommand.setPmId("JAVA");
initializeAttributeCommand.setPropertyName("purpose");
initializeAttributeCommand.setNewValue("works without JavaFX");
response.add(initializeAttributeCommand);
return response;
}
});
}
}
| update JavaAction to use CommandHandler instead of Closure. Thanks to Kai Toedter for posting.
| subprojects/demo-javafx/server/src/main/groovy/com/canoo/dolphin/demo/JavaAction.java | update JavaAction to use CommandHandler instead of Closure. Thanks to Kai Toedter for posting. | <ide><path>ubprojects/demo-javafx/server/src/main/groovy/com/canoo/dolphin/demo/JavaAction.java
<ide>
<ide> package com.canoo.dolphin.demo;
<ide>
<add>import com.canoo.dolphin.core.comm.Command;
<ide> import com.canoo.dolphin.core.comm.InitializeAttributeCommand;
<del>import com.canoo.dolphin.core.comm.NamedCommand;
<ide> import com.canoo.dolphin.core.server.action.ServerAction;
<ide> import com.canoo.dolphin.core.server.comm.ActionRegistry;
<del>import groovy.lang.Closure;
<add>import com.canoo.dolphin.core.server.comm.CommandHandler;
<ide>
<ide> import java.util.List;
<ide>
<ide> public class JavaAction implements ServerAction {
<ide> public void registerIn(ActionRegistry registry) {
<ide>
<del> registry.register("javaAction", new Closure(this) {
<del> public Object call(NamedCommand cmd, List response) {
<del>
<add> registry.register("javaAction", new CommandHandler<Command>() {
<add> @Override
<add> public void handleCommand(Command command, List<Command> response) {
<ide> InitializeAttributeCommand initializeAttributeCommand = new InitializeAttributeCommand();
<ide> initializeAttributeCommand.setPmId("JAVA");
<ide> initializeAttributeCommand.setPropertyName("purpose");
<ide> initializeAttributeCommand.setNewValue("works without JavaFX");
<ide>
<ide> response.add(initializeAttributeCommand);
<del> return response;
<ide> }
<ide> });
<ide> } |
|
Java | mit | error: pathspec 'ifs-data-layer/ifs-data-service/src/test/java/org/innovateuk/ifs/project/bankdetails/controller/CompetitionsBankDetailsControllerTest.java' did not match any file(s) known to git
| 7ccaec830a5ddbb0dda649643d3b0be1f24827c7 | 1 | InnovateUKGitHub/innovation-funding-service,InnovateUKGitHub/innovation-funding-service,InnovateUKGitHub/innovation-funding-service,InnovateUKGitHub/innovation-funding-service,InnovateUKGitHub/innovation-funding-service | package org.innovateuk.ifs.project.bankdetails.controller;
import org.innovateuk.ifs.BaseControllerMockMVCTest;
import org.innovateuk.ifs.competition.resource.BankDetailsReviewResource;
import org.junit.Test;
import java.util.List;
import static java.util.Collections.singletonList;
import static org.innovateuk.ifs.commons.service.ServiceResult.serviceSuccess;
import static org.innovateuk.ifs.util.JsonMappingUtil.toJson;
import static org.mockito.Mockito.only;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
public class CompetitionsBankDetailsControllerTest extends BaseControllerMockMVCTest<CompetitionsBankDetailsController> {
@Override
protected CompetitionsBankDetailsController supplyControllerUnderTest() {
return new CompetitionsBankDetailsController();
}
@Test
public void getPendingBankDetailsApprovals() throws Exception {
List<BankDetailsReviewResource> pendingBankDetails = singletonList(new BankDetailsReviewResource(1L, 11L, "Comp1", 12L, "project1", 22L, "Org1"));
when(bankDetailsServiceMock.getPendingBankDetailsApprovals()).thenReturn(serviceSuccess(pendingBankDetails));
mockMvc.perform(get("/competitions/pending-bank-details-approvals"))
.andExpect(status().isOk())
.andExpect(content().json(toJson(pendingBankDetails)));
verify(bankDetailsServiceMock, only()).getPendingBankDetailsApprovals();
}
}
| ifs-data-layer/ifs-data-service/src/test/java/org/innovateuk/ifs/project/bankdetails/controller/CompetitionsBankDetailsControllerTest.java | IFS-2015-PF-BankDetails-Action
Data Controller junits refactored.
Change-Id: Id1a06bc9d49e8ef71239227a463a1b08844f0f78
| ifs-data-layer/ifs-data-service/src/test/java/org/innovateuk/ifs/project/bankdetails/controller/CompetitionsBankDetailsControllerTest.java | IFS-2015-PF-BankDetails-Action | <ide><path>fs-data-layer/ifs-data-service/src/test/java/org/innovateuk/ifs/project/bankdetails/controller/CompetitionsBankDetailsControllerTest.java
<add>package org.innovateuk.ifs.project.bankdetails.controller;
<add>
<add>import org.innovateuk.ifs.BaseControllerMockMVCTest;
<add>import org.innovateuk.ifs.competition.resource.BankDetailsReviewResource;
<add>import org.junit.Test;
<add>
<add>import java.util.List;
<add>
<add>import static java.util.Collections.singletonList;
<add>import static org.innovateuk.ifs.commons.service.ServiceResult.serviceSuccess;
<add>import static org.innovateuk.ifs.util.JsonMappingUtil.toJson;
<add>import static org.mockito.Mockito.only;
<add>import static org.mockito.Mockito.verify;
<add>import static org.mockito.Mockito.when;
<add>import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
<add>import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content;
<add>import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
<add>
<add>public class CompetitionsBankDetailsControllerTest extends BaseControllerMockMVCTest<CompetitionsBankDetailsController> {
<add>
<add> @Override
<add> protected CompetitionsBankDetailsController supplyControllerUnderTest() {
<add> return new CompetitionsBankDetailsController();
<add> }
<add>
<add> @Test
<add> public void getPendingBankDetailsApprovals() throws Exception {
<add>
<add> List<BankDetailsReviewResource> pendingBankDetails = singletonList(new BankDetailsReviewResource(1L, 11L, "Comp1", 12L, "project1", 22L, "Org1"));
<add> when(bankDetailsServiceMock.getPendingBankDetailsApprovals()).thenReturn(serviceSuccess(pendingBankDetails));
<add>
<add> mockMvc.perform(get("/competitions/pending-bank-details-approvals"))
<add> .andExpect(status().isOk())
<add> .andExpect(content().json(toJson(pendingBankDetails)));
<add>
<add> verify(bankDetailsServiceMock, only()).getPendingBankDetailsApprovals();
<add>
<add> }
<add>} |
|
JavaScript | agpl-3.0 | fc2cd198210a4f8314d862a05de95ceb75060a05 | 0 | xwiki-labs/cryptpad,xwiki-labs/cryptpad,xwiki-labs/cryptpad | define([
'jquery',
'/bower_components/chainpad-crypto/crypto.js',
'/bower_components/nthen/index.js',
'/common/sframe-common.js',
'/common/common-interface.js',
'/common/common-ui-elements.js',
'/common/common-util.js',
'/common/common-hash.js',
'/common/hyperscript.js',
'json.sortify',
'/customize/messages.js',
'css!/bower_components/bootstrap/dist/css/bootstrap.min.css',
'css!/bower_components/components-font-awesome/css/font-awesome.min.css',
'less!/secureiframe/app-secure.less',
], function (
$,
Crypto,
nThen,
SFCommon,
UI,
UIElements,
Util,
Hash,
h,
Sortify,
Messages)
{
var APP = window.APP = {};
var andThen = function (common) {
var metadataMgr = common.getMetadataMgr();
var sframeChan = common.getSframeChannel();
var $body = $('body');
var hideIframe = function () {
sframeChan.event('EV_SECURE_IFRAME_CLOSE');
};
var displayed;
var create = {};
create['share'] = function (data) {
var priv = metadataMgr.getPrivateData();
var f = (data && data.file) ? UIElements.createFileShareModal
: UIElements.createShareModal;
var friends = common.getFriends();
var _modal;
var modal = f({
origin: priv.origin,
pathname: priv.pathname,
password: priv.password,
isTemplate: priv.isTemplate,
hashes: priv.hashes,
common: common,
title: data.title,
friends: friends,
onClose: function () {
if (_modal && _modal.close) { _modal.close(); }
hideIframe();
},
fileData: {
hash: priv.hashes.fileHash,
password: priv.password
}
});
$('button.cancel').click(); // Close any existing alertify
_modal = UI.openCustomModal(modal);
displayed = modal;
};
// File uploader
var onFilePicked = function (data) {
var privateData = metadataMgr.getPrivateData();
var parsed = Hash.parsePadUrl(data.url);
if (displayed && displayed.hide) { displayed.hide(); }
hideIframe();
if (parsed.type === 'file') {
var secret = Hash.getSecrets('file', parsed.hash, data.password);
var fileHost = privateData.fileHost || privateData.origin;
var src = fileHost + Hash.getBlobPathFromHex(secret.channel);
var key = Hash.encodeBase64(secret.keys.cryptKey);
sframeChan.event("EV_SECURE_ACTION", {
type: parsed.type,
src: src,
name: data.name,
key: key
});
return;
}
sframeChan.event("EV_SECURE_ACTION", {
type: parsed.type,
href: data.url,
name: data.name
});
};
var fmConfig = {
body: $('body'),
noHandlers: true,
onUploaded: function (ev, data) {
onFilePicked(data);
}
};
APP.FM = common.createFileManager(fmConfig);
create['filepicker'] = function (_filters) {
var updateContainer = function () {};
var filters = _filters;
var types = filters.types || [];
var data = {
FM: APP.FM
};
// Create modal
var modal = UI.createModal({
$body: $body,
onClose: function () {
hideIframe();
}
});
displayed = modal;
modal.show();
// Set the fixed content
modal.$modal.attr('id', 'cp-filepicker-dialog');
var $block = modal.$modal.find('.cp-modal');
// Description
var text = Messages.filePicker_description;
if (types && types.length === 1 && types[0] !== 'file') {
text = Messages.selectTemplate;
}
$block.append(h('p', text));
// Add filter input
var $filter = $(h('p.cp-modal-form')).appendTo($block);
var to;
var $input = $('<input>', {
type: 'text',
'class': 'cp-filepicker-filter',
'placeholder': Messages.filePicker_filter
}).appendTo($filter).on('keypress', function () {
if (to) { window.clearTimeout(to); }
to = window.setTimeout(updateContainer, 300);
});
// If file, display the upload button
if (types.indexOf('file') !== -1 && common.isLoggedIn()) {
var f = (filters && filters.filter) || {};
delete data.accept;
if (Array.isArray(f.fileType)) {
data.accept = f.fileType.map(function (val) {
if (/^[a-z]+\/$/.test(val)) {
val += '*';
}
return val;
});
}
$filter.append(common.createButton('upload', false, data));
}
var $container = $(h('span.cp-filepicker-content', [
h('div.cp-loading-spinner-container', h('span.cp-spinner'))
])).appendTo($block);
// Update the files list when needed
updateContainer = function () {
var filter = $input.val().trim();
var todo = function (err, list) {
if (err) { return void console.error(err); }
$container.html('');
Object.keys(list).forEach(function (id) {
var data = list[id];
var name = data.filename || data.title || '?';
if (filter && name.toLowerCase().indexOf(filter.toLowerCase()) === -1) {
return;
}
var $span = $('<span>', {
'class': 'cp-filepicker-content-element',
'title': name,
}).appendTo($container);
$span.append(UI.getFileIcon(data));
$('<span>', {'class': 'cp-filepicker-content-element-name'}).text(name)
.appendTo($span);
$span.click(function () {
if (typeof onFilePicked === "function") {
onFilePicked({url: data.href, name: name, password: data.password});
}
});
// Add thumbnail if it exists
common.displayThumbnail(data.href, data.channel, data.password, $span);
});
$input.focus();
};
common.getFilesList(filters, todo);
};
updateContainer();
};
sframeChan.on('EV_REFRESH', function (data) {
if (!data) { return; }
var type = data.modal;
if (!create[type]) { return; }
if (displayed && displayed.close) { displayed.close(); }
else if (displayed && displayed.hide) { displayed.hide(); }
displayed = undefined;
create[type](data);
});
UI.removeLoadingScreen();
};
var main = function () {
var common;
var _andThen = Util.once(andThen);
nThen(function (waitFor) {
$(waitFor(function () {
UI.addLoadingScreen({hideTips: true, hideLogo: true});
}));
SFCommon.create(waitFor(function (c) { APP.common = common = c; }));
}).nThen(function (/*waitFor*/) {
var metadataMgr = common.getMetadataMgr();
if (metadataMgr.getMetadataLazy() !== 'uninitialized') {
_andThen(common);
return;
}
metadataMgr.onChange(function () {
_andThen(common);
});
});
};
main();
});
| www/secureiframe/inner.js | define([
'jquery',
'/bower_components/chainpad-crypto/crypto.js',
'/bower_components/nthen/index.js',
'/common/sframe-common.js',
'/common/common-interface.js',
'/common/common-ui-elements.js',
'/common/common-util.js',
'/common/common-hash.js',
'/common/hyperscript.js',
'json.sortify',
'/customize/messages.js',
'css!/bower_components/bootstrap/dist/css/bootstrap.min.css',
'css!/bower_components/components-font-awesome/css/font-awesome.min.css',
'less!/secureiframe/app-secure.less',
], function (
$,
Crypto,
nThen,
SFCommon,
UI,
UIElements,
Util,
Hash,
h,
Sortify,
Messages)
{
var APP = window.APP = {};
var andThen = function (common) {
var metadataMgr = common.getMetadataMgr();
var privateData = metadataMgr.getPrivateData();
var sframeChan = common.getSframeChannel();
var $body = $('body');
var hideIframe = function () {
sframeChan.event('EV_SECURE_IFRAME_CLOSE');
};
var displayed;
var create = {};
create['share'] = function (data) {
var priv = metadataMgr.getPrivateData();
var f = (data && data.file) ? UIElements.createFileShareModal
: UIElements.createShareModal;
var friends = common.getFriends();
var _modal;
var modal = f({
origin: priv.origin,
pathname: priv.pathname,
password: priv.password,
isTemplate: priv.isTemplate,
hashes: priv.hashes,
common: common,
title: data.title,
friends: friends,
onClose: function () {
if (_modal && _modal.close) { _modal.close(); }
hideIframe();
},
fileData: {
hash: priv.hashes.fileHash,
password: priv.password
}
});
$('button.cancel').click(); // Close any existing alertify
_modal = UI.openCustomModal(modal);
displayed = modal;
};
// File uploader
var onFilePicked = function (data) {
var privateData = metadataMgr.getPrivateData();
var parsed = Hash.parsePadUrl(data.url);
if (displayed && displayed.hide) { displayed.hide(); }
hideIframe();
if (parsed.type === 'file') {
var secret = Hash.getSecrets('file', parsed.hash, data.password);
var fileHost = privateData.fileHost || privateData.origin;
var src = fileHost + Hash.getBlobPathFromHex(secret.channel);
var key = Hash.encodeBase64(secret.keys.cryptKey);
sframeChan.event("EV_SECURE_ACTION", {
type: parsed.type,
src: src,
name: data.name,
key: key
});
return;
}
sframeChan.event("EV_SECURE_ACTION", {
type: parsed.type,
href: data.url,
name: data.name
});
};
var fmConfig = {
body: $('body'),
noHandlers: true,
onUploaded: function (ev, data) {
onFilePicked(data);
}
};
APP.FM = common.createFileManager(fmConfig);
create['filepicker'] = function (_filters) {
var updateContainer = function () {};
var filters = _filters;
var types = filters.types || [];
var data = {
FM: APP.FM
};
// Create modal
var modal = UI.createModal({
$body: $body,
onClose: function () {
hideIframe();
}
});
displayed = modal;
modal.show();
// Set the fixed content
modal.$modal.attr('id', 'cp-filepicker-dialog');
var $block = modal.$modal.find('.cp-modal');
// Description
var text = Messages.filePicker_description;
if (types && types.length === 1 && types[0] !== 'file') {
text = Messages.selectTemplate;
}
$block.append(h('p', text));
// Add filter input
var $filter = $(h('p.cp-modal-form')).appendTo($block);
var to;
var $input = $('<input>', {
type: 'text',
'class': 'cp-filepicker-filter',
'placeholder': Messages.filePicker_filter
}).appendTo($filter).on('keypress', function () {
if (to) { window.clearTimeout(to); }
to = window.setTimeout(updateContainer, 300);
});
// If file, display the upload button
if (types.indexOf('file') !== -1 && common.isLoggedIn()) {
var f = (filters && filters.filter) || {};
delete data.accept;
if (Array.isArray(f.fileType)) {
data.accept = f.fileType.map(function (val) {
if (/^[a-z]+\/$/.test(val)) {
val += '*';
}
return val;
});
}
$filter.append(common.createButton('upload', false, data));
}
var $container = $(h('span.cp-filepicker-content', [
h('div.cp-loading-spinner-container', h('span.cp-spinner'))
])).appendTo($block);
// Update the files list when needed
updateContainer = function () {
var filter = $input.val().trim();
var todo = function (err, list) {
if (err) { return void console.error(err); }
$container.html('');
Object.keys(list).forEach(function (id) {
var data = list[id];
var name = data.filename || data.title || '?';
if (filter && name.toLowerCase().indexOf(filter.toLowerCase()) === -1) {
return;
}
var $span = $('<span>', {
'class': 'cp-filepicker-content-element',
'title': name,
}).appendTo($container);
$span.append(UI.getFileIcon(data));
$('<span>', {'class': 'cp-filepicker-content-element-name'}).text(name)
.appendTo($span);
$span.click(function () {
if (typeof onFilePicked === "function") {
onFilePicked({url: data.href, name: name, password: data.password});
}
});
// Add thumbnail if it exists
common.displayThumbnail(data.href, data.channel, data.password, $span);
});
$input.focus();
};
common.getFilesList(filters, todo);
};
updateContainer();
};
sframeChan.on('EV_REFRESH', function (data) {
if (!data) { return; }
var type = data.modal;
if (!create[type]) { return; }
if (displayed && displayed.close) { displayed.close(); }
else if (displayed && displayed.hide) { displayed.hide(); }
displayed = undefined;
create[type](data);
});
UI.removeLoadingScreen();
};
var main = function () {
var common;
var _andThen = Util.once(andThen);
nThen(function (waitFor) {
$(waitFor(function () {
UI.addLoadingScreen({hideTips: true, hideLogo: true});
}));
SFCommon.create(waitFor(function (c) { APP.common = common = c; }));
}).nThen(function (/*waitFor*/) {
var metadataMgr = common.getMetadataMgr();
if (metadataMgr.getMetadataLazy() !== 'uninitialized') {
_andThen(common);
return;
}
metadataMgr.onChange(function () {
_andThen(common);
});
});
};
main();
});
| lint compliance
| www/secureiframe/inner.js | lint compliance | <ide><path>ww/secureiframe/inner.js
<ide>
<ide> var andThen = function (common) {
<ide> var metadataMgr = common.getMetadataMgr();
<del> var privateData = metadataMgr.getPrivateData();
<ide> var sframeChan = common.getSframeChannel();
<ide> var $body = $('body');
<ide> |
|
Java | apache-2.0 | 367f9118405940361af10216994f30bd54376631 | 0 | jzmq/threadpool4j,aofeng/threadpool4j,leontius/threadpool4j | package cn.aofeng.threadpool4j;
import static org.junit.Assert.*;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.concurrent.Callable;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Future;
import java.util.concurrent.TimeUnit;
import static org.easymock.EasyMock.*;
import org.junit.After;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
/**
* {@link ThreadPoolImpl}的单元测试用例。
*
* @author <a href="mailto:[email protected]">聂勇</a>
*/
public class ThreadPoolTest {
private ThreadPoolImpl _threadPool = new ThreadPoolImpl();
@Rule
public ExpectedException _expectedEx = ExpectedException.none();
@Before
public void setUp() throws Exception {
_threadPool.init();
}
@After
public void tearDown() throws Exception {
}
@Test
public void testInit() {
assertEquals(2, _threadPool._multiThreadPool.size());
assertTrue(_threadPool._multiThreadPool.containsKey("default"));
assertTrue(_threadPool._multiThreadPool.containsKey("other"));
assertTrue(_threadPool._threadPoolConfig._threadStateSwitch);
assertEquals(60, _threadPool._threadPoolConfig._threadStateInterval);
}
/**
* 测试用例:提交一个异步任务给默认的线程池执行 <br/>
* 前置条件:
* <pre>
* 任务对象为null
* </pre>
*
* 测试结果:
* <pre>
* 抛出{@link IllegalArgumentException}异常
* </pre>
*/
@Test
public void testSubmitRunnable4TaskIsNull() {
_expectedEx.expect(IllegalArgumentException.class);
_expectedEx.expectMessage("task is null");
Runnable task = null;
_threadPool.submit(task);
}
/**
* 测试用例:提交一个异步任务给默认的线程池执行 <br/>
* 前置条件:
* <pre>
* 任务对象为{@link Runnable}
* </pre>
*
* 测试结果:
* <pre>
* 线程池default的submit方法被调用1次
* </pre>
*/
@Test
public void testSubmitRunnable() {
callThreadPool("default");
}
/**
* 测试用例:提交一个异步任务给指定的线程池执行 <br/>
* 前置条件:
* <pre>
* 任务对象为null;线程池为default
* </pre>
*
* 测试结果:
* <pre>
* 抛出{@link IllegalArgumentException}异常
* </pre>
*/
@Test
public void testSubmitRunnableString4TaskIsNull() {
_expectedEx.expect(IllegalArgumentException.class);
_expectedEx.expectMessage("task is null");
Runnable task = null;
_threadPool.submit(task, "default");
}
/**
* 测试用例:提交一个异步任务给指定的线程池执行 <br/>
* 前置条件:
* <pre>
* 任务对象为{@link Runnable};线程池名为null
* </pre>
*
* 测试结果:
* <pre>
* 抛出{@link IllegalArgumentException}异常
* </pre>
*/
@Test
public void testSubmitRunnableString4ThreadpoolNameIsNull() {
_expectedEx.expect(IllegalArgumentException.class);
_expectedEx.expectMessage("thread pool name is empty");
Runnable task = createRunnable();
_threadPool.submit(task, null);
}
/**
* 测试用例:提交一个异步任务给指定的线程池执行 <br/>
* 前置条件:
* <pre>
* 任务对象为{@link Runnable};线程池名为"ThreadpoolNotExists",但实际不存在这个线程池
* </pre>
*
* 测试结果:
* <pre>
* 抛出{@link IllegalArgumentException}异常
* </pre>
*/
@Test
public void testSubmitRunnableString4ThreadpoolNameNotExists() {
_expectedEx.expect(IllegalArgumentException.class);
_expectedEx.expectMessage("thread pool ThreadpoolNotExists not exists");
Runnable task = createRunnable();
_threadPool.submit(task, "ThreadpoolNotExists");
}
/**
* 测试用例:提交一个异步任务给指定的线程池执行 <br/>
* 前置条件:
* <pre>
* 为{@link Runnable};线程池名为"other"且实际存在
* </pre>
*
* 测试结果:
* <pre>
* 线程池other的submit方法被调用1次
* </pre>
*/
@Test
public void testSubmitRunnableString() {
callThreadPool("other");
}
/**
* 测试用例:提交一个异步任务给指定的线程池执行 <br/>
* 前置条件:
* <pre>
* 任务对象为{@link Runnable},提交给线程池名"default"执行
* </pre>
*
* 测试结果:
* <pre>
* 任务对象的run方法被调用1次
* </pre>
*/
@Test
public void testSubmitRunnableString4RunTask() throws InterruptedException {
Runnable mock = createMock(Runnable.class);
mock.run();
expectLastCall().once(); // 期望任务的run方法被调用1次
replay(mock);
_threadPool.submit(mock, "default");
Thread.sleep(1000); // 异步操作,需等待一会儿
verify(mock);
}
private void callThreadPool(String threadpoolName) {
ExecutorService mock = createMock(ExecutorService.class);
mock.submit(anyObject(Runnable.class));
expectLastCall().andReturn(null).once(); // 期望线程池的submit方法被调用1次
replay(mock);
_threadPool._multiThreadPool.put(threadpoolName, mock);
_threadPool.submit(createRunnable(), threadpoolName);
verify(mock);
}
private Runnable createRunnable() {
return new Runnable() {
@Override
public void run() {
// nothing
}
};
}
/**
* 测试用例:提交一个异步任务给默认的线程池执行 <br/>
* 前置条件:
* <pre>
* 任务对象为null
* </pre>
*
* 测试结果:
* <pre>
* 抛出{@link IllegalArgumentException}异常
* </pre>
*/
@Test
public void testSubmitCallable4TaskIsNull() {
_expectedEx.expect(IllegalArgumentException.class);
_expectedEx.expectMessage("task is null");
Callable<?> task = null;
_threadPool.submit(task);
}
/**
* 测试用例:提交一个异步任务给指定的线程池执行 <br/>
* 前置条件:
* <pre>
* 任务对象为null;线程池为default
* </pre>
*
* 测试结果:
* <pre>
* 抛出{@link IllegalArgumentException}异常
* </pre>
*/
@Test
public void testSubmitCallableString4TaskIsNull() {
_expectedEx.expect(IllegalArgumentException.class);
_expectedEx.expectMessage("task is null");
Callable<?> task = null;
_threadPool.submit(task, "default");
}
/**
* 测试用例:提交一个异步任务给指定的线程池执行 <br/>
* 前置条件:
* <pre>
* 任务对象为{@link Callable};线程池名为null
* </pre>
*
* 测试结果:
* <pre>
* 抛出{@link IllegalArgumentException}异常
* </pre>
*/
@Test
public void testSubmitCallableString4ThreadpoolNameIsNull() {
_expectedEx.expect(IllegalArgumentException.class);
_expectedEx.expectMessage("thread pool name is empty");
Callable<?> task = createCallable();
_threadPool.submit(task, null);
}
/**
* 测试用例:提交一个异步任务给指定的线程池执行 <br/>
* 前置条件:
* <pre>
* 任务对象为{@link Callable};线程池名为"ThreadpoolNotExists",但实际不存在这个线程池
* </pre>
*
* 测试结果:
* <pre>
* 抛出{@link IllegalArgumentException}异常
* </pre>
*/
@Test
public void testSubmitCallableString4ThreadpoolNameNotExists() {
_expectedEx.expect(IllegalArgumentException.class);
_expectedEx.expectMessage("thread pool ThreadpoolNotExists not exists");
Callable<?> task = createCallable();
_threadPool.submit(task, "ThreadpoolNotExists");
}
/**
* 测试用例:提交一个异步任务给指定的线程池执行 <br/>
* 前置条件:
* <pre>
* 任务对象为{@link Runnable},提交给线程池名"default"执行
* </pre>
*
* 测试结果:
* <pre>
* 任务对象的run方法被调用1次
* </pre>
*/
@SuppressWarnings("unchecked")
@Test
public void testSubmitCallableString4RunTask() throws Exception {
Callable<List<String>> mock = createMock(Callable.class);
List<String> returnMock = createMock(List.class);
mock.call();
expectLastCall().andReturn(returnMock).once(); // 期望任务的call方法被调用1次
replay(mock);
_threadPool.submit(mock, "default");
Thread.sleep(1000); // 异步操作,需等待一会儿
verify(mock);
}
/**
* 测试用例:在线程池"default"中执行多个需要返回值的异步任务,并设置超时时间 <br/>
* 前置条件:
* <pre>
* 任务列表为null
* </pre>
*
* 测试结果:
* <pre>
* 抛出{@link IllegalArgumentException}异常
* </pre>
*/
@Test
public void testInvokeAll4TaskListIsNull() {
_expectedEx.expect(IllegalArgumentException.class);
_expectedEx.expectMessage("task list is null or empty");
Collection<Callable<Integer>> tasks = null;
_threadPool.invokeAll(tasks, 1, TimeUnit.SECONDS);
}
/**
* 测试用例:在线程池"default"中执行多个需要返回值的异步任务,并设置超时时间 <br/>
* 前置条件:
* <pre>
* 任务列表为空列表(容量为0)
* </pre>
*
* 测试结果:
* <pre>
* 抛出{@link IllegalArgumentException}异常
* </pre>
*/
@Test
public void testInvokeAll4TaskListIsEmpty() {
_expectedEx.expect(IllegalArgumentException.class);
_expectedEx.expectMessage("task list is null or empty");
Collection<Callable<Integer>> tasks = new ArrayList<Callable<Integer>>();
_threadPool.invokeAll(tasks, 1, TimeUnit.SECONDS);
}
/**
* 测试用例:在线程池"default"中执行多个需要返回值的异步任务,并设置超时时间 <br/>
* 前置条件:
* <pre>
* 超时时间等于0
* </pre>
*
* 测试结果:
* <pre>
* 抛出{@link IllegalArgumentException}异常
* </pre>
*/
@Test
public void testInvokeAll4TimeoutEqualsZero() {
_expectedEx.expect(IllegalArgumentException.class);
_expectedEx.expectMessage("timeout less than or equals zero");
Collection<Callable<Integer>> tasks = new ArrayList<Callable<Integer>>();
tasks.add(createCallable());
_threadPool.invokeAll(tasks, 0, TimeUnit.SECONDS);
}
/**
* 测试用例:在线程池"default"中执行多个需要返回值的异步任务,并设置超时时间 <br/>
* 前置条件:
* <pre>
* 超时时间小于0
* </pre>
*
* 测试结果:
* <pre>
* 抛出{@link IllegalArgumentException}异常
* </pre>
*/
@Test
public void testInvokeAll4TimeoutLessThanZero() {
_expectedEx.expect(IllegalArgumentException.class);
_expectedEx.expectMessage("timeout less than or equals zero");
Collection<Callable<Integer>> tasks = new ArrayList<Callable<Integer>>();
tasks.add(createCallable());
_threadPool.invokeAll(tasks, -1, TimeUnit.SECONDS);
}
/**
* 测试用例:在线程池"default"中执行多个需要返回值的异步任务,并设置超时时间 <br/>
* 前置条件:
* <pre>
* 线程池名称为null
* </pre>
*
* 测试结果:
* <pre>
* 抛出{@link IllegalArgumentException}异常
* </pre>
*/
@Test
public void testInvokeAll4ThreadpoolNameIsNull() {
_expectedEx.expect(IllegalArgumentException.class);
_expectedEx.expectMessage("thread pool name is empty");
Collection<Callable<Integer>> tasks = new ArrayList<Callable<Integer>>();
tasks.add(createCallable());
_threadPool.invokeAll(tasks, 2, TimeUnit.SECONDS, null);
}
/**
* 测试用例:在线程池"default"中执行多个需要返回值的异步任务,并设置超时时间 <br/>
* 前置条件:
* <pre>
* 线程池名称为" "
* </pre>
*
* 测试结果:
* <pre>
* 抛出{@link IllegalArgumentException}异常
* </pre>
*/
@Test
public void testInvokeAll4ThreadpoolNameIsEmpty() {
_expectedEx.expect(IllegalArgumentException.class);
_expectedEx.expectMessage("thread pool name is empty");
Collection<Callable<Integer>> tasks = new ArrayList<Callable<Integer>>();
tasks.add(createCallable());
_threadPool.invokeAll(tasks, 2, TimeUnit.SECONDS, " ");
}
/**
* 测试用例:在线程池"default"中执行多个需要返回值的异步任务,并设置超时时间 <br/>
* 前置条件:
* <pre>
* 线程池名称为" "
* </pre>
*
* 测试结果:
* <pre>
* 抛出{@link IllegalArgumentException}异常
* </pre>
*/
@Test
public void testInvokeAll4ThreadpoolNotExists() {
_expectedEx.expect(IllegalArgumentException.class);
_expectedEx.expectMessage("thread pool ThreadPoolNotExists not exists");
Collection<Callable<Integer>> tasks = new ArrayList<Callable<Integer>>();
tasks.add(createCallable());
_threadPool.invokeAll(tasks, 2, TimeUnit.SECONDS, "ThreadPoolNotExists");
}
/**
* 测试用例:在线程池"default"中执行多个需要返回值的异步任务,并设置超时时间 <br/>
* 前置条件:
* <pre>
* 1、所有参数均符合要求。
* 2、线程池存在。
* 3、执行两个异步任务。
* </pre>
*
* 测试结果:
* <pre>
* 两个异步任务均返回正确的执行结果
* </pre>
* @throws ExecutionException
* @throws InterruptedException
*/
@Test
public void testInvokeAll() throws InterruptedException, ExecutionException {
Collection<Callable<Integer>> tasks = new ArrayList<Callable<Integer>>();
tasks.add(createCallable());
tasks.add(createCallable());
List<Future<Integer>> futures = _threadPool.invokeAll(tasks, 2, TimeUnit.SECONDS);
int result = 0;
for (Future<Integer> future : futures) {
result += future.get();
}
assertEquals(18, result);
}
/**
* 测试用例:查询指定名称的线程池是否存在 <br/>
* 前置条件:
* <pre>
* 线程池"ThreadPoolNotExists"不存在
* </pre>
*
* 测试结果:
* <pre>
* 返回false
* </pre>
*/
@Test
public void testIsExists4NotExists() {
assertFalse(_threadPool.isExists("ThreadPoolNotExists"));
}
/**
* 测试用例:查询指定名称的线程池是否存在 <br/>
* 前置条件:
* <pre>
* 线程池"default"存在
* </pre>
*
* 测试结果:
* <pre>
* 返回true
* </pre>
*/
@Test
public void testIsExists4Exists() {
assertTrue(_threadPool.isExists("default"));
}
private Callable<Integer> createCallable() {
return new Callable<Integer>() {
@Override
public Integer call() throws Exception {
return 9;
}
};
}
}
| test/cn/aofeng/threadpool4j/ThreadPoolTest.java | package cn.aofeng.threadpool4j;
import static org.junit.Assert.*;
import java.util.concurrent.ExecutorService;
import static org.easymock.EasyMock.*;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
/**
* {@link ThreadPoolImpl}的单元测试用例。
*
* @author <a href="mailto:[email protected]">聂勇</a>
*/
public class ThreadPoolTest {
private ThreadPoolImpl _threadPool = new ThreadPoolImpl();
@Before
public void setUp() throws Exception {
_threadPool.init();
}
@After
public void tearDown() throws Exception {
}
@Test
public void testInit() {
assertEquals(2, _threadPool._multiThreadPool.size());
assertTrue(_threadPool._multiThreadPool.containsKey("default"));
assertTrue(_threadPool._multiThreadPool.containsKey("other"));
assertTrue(_threadPool._threadPoolConfig._threadStateSwitch);
assertEquals(60, _threadPool._threadPoolConfig._threadStateInterval);
}
/**
* 测试用例:提交一个异步任务给默认的线程池执行 <br/>
* 前置条件:
* <pre>
* 任务对象为null
* </pre>
*
* 测试结果:
* <pre>
* 抛出{@link IllegalArgumentException}异常
* </pre>
*/
@Test(expected=IllegalArgumentException.class)
public void testSubmitRunnable4TaskIsNull() {
_threadPool.submit(null);
}
/**
* 测试用例:提交一个异步任务给默认的线程池执行 <br/>
* 前置条件:
* <pre>
* 任务对象为{@link Runnable}
* </pre>
*
* 测试结果:
* <pre>
* 线程池default的submit方法被调用1次
* </pre>
*/
@Test
public void testSubmitRunnable() {
callThreadPool("default");
}
/**
* 测试用例:提交一个异步任务给指定的线程池执行 <br/>
* 前置条件:
* <pre>
* 任务对象为null;线程池为default
* </pre>
*
* 测试结果:
* <pre>
* 抛出{@link IllegalArgumentException}异常
* </pre>
*/
@Test(expected=IllegalArgumentException.class)
public void testSubmitRunnableString4TaskIsNull() {
_threadPool.submit(null, "default");
}
/**
* 测试用例:提交一个异步任务给指定的线程池执行 <br/>
* 前置条件:
* <pre>
* 任务对象为{@link Runnable};线程池名为null
* </pre>
*
* 测试结果:
* <pre>
* 抛出{@link IllegalArgumentException}异常
* </pre>
*/
@Test(expected=IllegalArgumentException.class)
public void testSubmitRunnableString4ThreadpoolNameIsNull() {
Runnable task = createTask();
_threadPool.submit(task, null);
}
/**
* 测试用例:提交一个异步任务给指定的线程池执行 <br/>
* 前置条件:
* <pre>
* 任务对象为{@link Runnable};线程池名为"ThreadpoolNotExists",但实际不存在这个线程池
* </pre>
*
* 测试结果:
* <pre>
* 抛出{@link IllegalArgumentException}异常
* </pre>
*/
@Test(expected=IllegalArgumentException.class)
public void testSubmitRunnableString4ThreadpoolNameNotExists() {
Runnable task = createTask();
_threadPool.submit(task, "ThreadpoolNotExists");
}
/**
* 测试用例:提交一个异步任务给指定的线程池执行 <br/>
* 前置条件:
* <pre>
* 为{@link Runnable};线程池名为"other"且实际存在
* </pre>
*
* 测试结果:
* <pre>
* 线程池other的submit方法被调用1次
* </pre>
*/
@Test
public void testSubmitRunnableString() {
callThreadPool("other");
}
/**
* 测试用例:提交一个异步任务给指定的线程池执行 <br/>
* 前置条件:
* <pre>
* 任务对象为{@link Runnable},提交给线程池名"default"执行
* </pre>
*
* 测试结果:
* <pre>
* 任务对象的run方法被调用1次
* </pre>
*/
@Test
public void testSubmitRunnableString4RunTask() throws InterruptedException {
Runnable mock = createMock(Runnable.class);
mock.run();
expectLastCall().once(); // 期望任务的run方法被调用1次
replay(mock);
_threadPool.submit(mock, "default");
Thread.sleep(1000); // 异步操作,需等待一会儿
verify(mock);
}
private void callThreadPool(String threadpoolName) {
ExecutorService mock = createMock(ExecutorService.class);
mock.submit(anyObject(Runnable.class));
expectLastCall().andReturn(null).once(); // 期望线程池的submit方法被调用1次
replay(mock);
_threadPool._multiThreadPool.put(threadpoolName, mock);
_threadPool.submit(createTask(), threadpoolName);
verify(mock);
}
private Runnable createTask() {
return new Runnable() {
@Override
public void run() {
// nothing
}
};
}
}
| 补充和完善单元测试用例 | test/cn/aofeng/threadpool4j/ThreadPoolTest.java | 补充和完善单元测试用例 | <ide><path>est/cn/aofeng/threadpool4j/ThreadPoolTest.java
<ide>
<ide> import static org.junit.Assert.*;
<ide>
<add>import java.util.ArrayList;
<add>import java.util.Collection;
<add>import java.util.List;
<add>import java.util.concurrent.Callable;
<add>import java.util.concurrent.ExecutionException;
<ide> import java.util.concurrent.ExecutorService;
<add>import java.util.concurrent.Future;
<add>import java.util.concurrent.TimeUnit;
<ide>
<ide> import static org.easymock.EasyMock.*;
<ide> import org.junit.After;
<ide> import org.junit.Before;
<add>import org.junit.Rule;
<ide> import org.junit.Test;
<add>import org.junit.rules.ExpectedException;
<ide>
<ide> /**
<ide> * {@link ThreadPoolImpl}的单元测试用例。
<ide>
<ide> private ThreadPoolImpl _threadPool = new ThreadPoolImpl();
<ide>
<add> @Rule
<add> public ExpectedException _expectedEx = ExpectedException.none();
<add>
<ide> @Before
<ide> public void setUp() throws Exception {
<ide> _threadPool.init();
<ide> * 抛出{@link IllegalArgumentException}异常
<ide> * </pre>
<ide> */
<del> @Test(expected=IllegalArgumentException.class)
<add> @Test
<ide> public void testSubmitRunnable4TaskIsNull() {
<del> _threadPool.submit(null);
<add> _expectedEx.expect(IllegalArgumentException.class);
<add> _expectedEx.expectMessage("task is null");
<add>
<add> Runnable task = null;
<add> _threadPool.submit(task);
<ide> }
<ide>
<ide> /**
<ide> * 抛出{@link IllegalArgumentException}异常
<ide> * </pre>
<ide> */
<del> @Test(expected=IllegalArgumentException.class)
<add> @Test
<ide> public void testSubmitRunnableString4TaskIsNull() {
<del> _threadPool.submit(null, "default");
<add> _expectedEx.expect(IllegalArgumentException.class);
<add> _expectedEx.expectMessage("task is null");
<add>
<add> Runnable task = null;
<add> _threadPool.submit(task, "default");
<ide> }
<ide>
<ide> /**
<ide> * 抛出{@link IllegalArgumentException}异常
<ide> * </pre>
<ide> */
<del> @Test(expected=IllegalArgumentException.class)
<add> @Test
<ide> public void testSubmitRunnableString4ThreadpoolNameIsNull() {
<del> Runnable task = createTask();
<add> _expectedEx.expect(IllegalArgumentException.class);
<add> _expectedEx.expectMessage("thread pool name is empty");
<add>
<add> Runnable task = createRunnable();
<ide> _threadPool.submit(task, null);
<ide> }
<ide>
<ide> * 抛出{@link IllegalArgumentException}异常
<ide> * </pre>
<ide> */
<del> @Test(expected=IllegalArgumentException.class)
<add> @Test
<ide> public void testSubmitRunnableString4ThreadpoolNameNotExists() {
<del> Runnable task = createTask();
<add> _expectedEx.expect(IllegalArgumentException.class);
<add> _expectedEx.expectMessage("thread pool ThreadpoolNotExists not exists");
<add>
<add> Runnable task = createRunnable();
<ide> _threadPool.submit(task, "ThreadpoolNotExists");
<ide> }
<ide>
<ide> expectLastCall().andReturn(null).once(); // 期望线程池的submit方法被调用1次
<ide> replay(mock);
<ide> _threadPool._multiThreadPool.put(threadpoolName, mock);
<del> _threadPool.submit(createTask(), threadpoolName);
<add> _threadPool.submit(createRunnable(), threadpoolName);
<ide>
<ide> verify(mock);
<ide> }
<ide>
<del> private Runnable createTask() {
<add> private Runnable createRunnable() {
<ide> return new Runnable() {
<ide> @Override
<ide> public void run() {
<ide> };
<ide> }
<ide>
<add> /**
<add> * 测试用例:提交一个异步任务给默认的线程池执行 <br/>
<add> * 前置条件:
<add> * <pre>
<add> * 任务对象为null
<add> * </pre>
<add> *
<add> * 测试结果:
<add> * <pre>
<add> * 抛出{@link IllegalArgumentException}异常
<add> * </pre>
<add> */
<add> @Test
<add> public void testSubmitCallable4TaskIsNull() {
<add> _expectedEx.expect(IllegalArgumentException.class);
<add> _expectedEx.expectMessage("task is null");
<add>
<add> Callable<?> task = null;
<add> _threadPool.submit(task);
<add> }
<add>
<add> /**
<add> * 测试用例:提交一个异步任务给指定的线程池执行 <br/>
<add> * 前置条件:
<add> * <pre>
<add> * 任务对象为null;线程池为default
<add> * </pre>
<add> *
<add> * 测试结果:
<add> * <pre>
<add> * 抛出{@link IllegalArgumentException}异常
<add> * </pre>
<add> */
<add> @Test
<add> public void testSubmitCallableString4TaskIsNull() {
<add> _expectedEx.expect(IllegalArgumentException.class);
<add> _expectedEx.expectMessage("task is null");
<add>
<add> Callable<?> task = null;
<add> _threadPool.submit(task, "default");
<add> }
<add>
<add> /**
<add> * 测试用例:提交一个异步任务给指定的线程池执行 <br/>
<add> * 前置条件:
<add> * <pre>
<add> * 任务对象为{@link Callable};线程池名为null
<add> * </pre>
<add> *
<add> * 测试结果:
<add> * <pre>
<add> * 抛出{@link IllegalArgumentException}异常
<add> * </pre>
<add> */
<add> @Test
<add> public void testSubmitCallableString4ThreadpoolNameIsNull() {
<add> _expectedEx.expect(IllegalArgumentException.class);
<add> _expectedEx.expectMessage("thread pool name is empty");
<add>
<add> Callable<?> task = createCallable();
<add> _threadPool.submit(task, null);
<add> }
<add>
<add> /**
<add> * 测试用例:提交一个异步任务给指定的线程池执行 <br/>
<add> * 前置条件:
<add> * <pre>
<add> * 任务对象为{@link Callable};线程池名为"ThreadpoolNotExists",但实际不存在这个线程池
<add> * </pre>
<add> *
<add> * 测试结果:
<add> * <pre>
<add> * 抛出{@link IllegalArgumentException}异常
<add> * </pre>
<add> */
<add> @Test
<add> public void testSubmitCallableString4ThreadpoolNameNotExists() {
<add> _expectedEx.expect(IllegalArgumentException.class);
<add> _expectedEx.expectMessage("thread pool ThreadpoolNotExists not exists");
<add>
<add> Callable<?> task = createCallable();
<add> _threadPool.submit(task, "ThreadpoolNotExists");
<add> }
<add>
<add> /**
<add> * 测试用例:提交一个异步任务给指定的线程池执行 <br/>
<add> * 前置条件:
<add> * <pre>
<add> * 任务对象为{@link Runnable},提交给线程池名"default"执行
<add> * </pre>
<add> *
<add> * 测试结果:
<add> * <pre>
<add> * 任务对象的run方法被调用1次
<add> * </pre>
<add> */
<add> @SuppressWarnings("unchecked")
<add> @Test
<add> public void testSubmitCallableString4RunTask() throws Exception {
<add> Callable<List<String>> mock = createMock(Callable.class);
<add> List<String> returnMock = createMock(List.class);
<add> mock.call();
<add> expectLastCall().andReturn(returnMock).once(); // 期望任务的call方法被调用1次
<add> replay(mock);
<add> _threadPool.submit(mock, "default");
<add> Thread.sleep(1000); // 异步操作,需等待一会儿
<add>
<add> verify(mock);
<add> }
<add>
<add> /**
<add> * 测试用例:在线程池"default"中执行多个需要返回值的异步任务,并设置超时时间 <br/>
<add> * 前置条件:
<add> * <pre>
<add> * 任务列表为null
<add> * </pre>
<add> *
<add> * 测试结果:
<add> * <pre>
<add> * 抛出{@link IllegalArgumentException}异常
<add> * </pre>
<add> */
<add> @Test
<add> public void testInvokeAll4TaskListIsNull() {
<add> _expectedEx.expect(IllegalArgumentException.class);
<add> _expectedEx.expectMessage("task list is null or empty");
<add>
<add> Collection<Callable<Integer>> tasks = null;
<add> _threadPool.invokeAll(tasks, 1, TimeUnit.SECONDS);
<add> }
<add>
<add> /**
<add> * 测试用例:在线程池"default"中执行多个需要返回值的异步任务,并设置超时时间 <br/>
<add> * 前置条件:
<add> * <pre>
<add> * 任务列表为空列表(容量为0)
<add> * </pre>
<add> *
<add> * 测试结果:
<add> * <pre>
<add> * 抛出{@link IllegalArgumentException}异常
<add> * </pre>
<add> */
<add> @Test
<add> public void testInvokeAll4TaskListIsEmpty() {
<add> _expectedEx.expect(IllegalArgumentException.class);
<add> _expectedEx.expectMessage("task list is null or empty");
<add>
<add> Collection<Callable<Integer>> tasks = new ArrayList<Callable<Integer>>();
<add> _threadPool.invokeAll(tasks, 1, TimeUnit.SECONDS);
<add> }
<add>
<add> /**
<add> * 测试用例:在线程池"default"中执行多个需要返回值的异步任务,并设置超时时间 <br/>
<add> * 前置条件:
<add> * <pre>
<add> * 超时时间等于0
<add> * </pre>
<add> *
<add> * 测试结果:
<add> * <pre>
<add> * 抛出{@link IllegalArgumentException}异常
<add> * </pre>
<add> */
<add> @Test
<add> public void testInvokeAll4TimeoutEqualsZero() {
<add> _expectedEx.expect(IllegalArgumentException.class);
<add> _expectedEx.expectMessage("timeout less than or equals zero");
<add>
<add> Collection<Callable<Integer>> tasks = new ArrayList<Callable<Integer>>();
<add> tasks.add(createCallable());
<add> _threadPool.invokeAll(tasks, 0, TimeUnit.SECONDS);
<add> }
<add>
<add> /**
<add> * 测试用例:在线程池"default"中执行多个需要返回值的异步任务,并设置超时时间 <br/>
<add> * 前置条件:
<add> * <pre>
<add> * 超时时间小于0
<add> * </pre>
<add> *
<add> * 测试结果:
<add> * <pre>
<add> * 抛出{@link IllegalArgumentException}异常
<add> * </pre>
<add> */
<add> @Test
<add> public void testInvokeAll4TimeoutLessThanZero() {
<add> _expectedEx.expect(IllegalArgumentException.class);
<add> _expectedEx.expectMessage("timeout less than or equals zero");
<add>
<add> Collection<Callable<Integer>> tasks = new ArrayList<Callable<Integer>>();
<add> tasks.add(createCallable());
<add> _threadPool.invokeAll(tasks, -1, TimeUnit.SECONDS);
<add> }
<add>
<add> /**
<add> * 测试用例:在线程池"default"中执行多个需要返回值的异步任务,并设置超时时间 <br/>
<add> * 前置条件:
<add> * <pre>
<add> * 线程池名称为null
<add> * </pre>
<add> *
<add> * 测试结果:
<add> * <pre>
<add> * 抛出{@link IllegalArgumentException}异常
<add> * </pre>
<add> */
<add> @Test
<add> public void testInvokeAll4ThreadpoolNameIsNull() {
<add> _expectedEx.expect(IllegalArgumentException.class);
<add> _expectedEx.expectMessage("thread pool name is empty");
<add>
<add> Collection<Callable<Integer>> tasks = new ArrayList<Callable<Integer>>();
<add> tasks.add(createCallable());
<add> _threadPool.invokeAll(tasks, 2, TimeUnit.SECONDS, null);
<add> }
<add>
<add> /**
<add> * 测试用例:在线程池"default"中执行多个需要返回值的异步任务,并设置超时时间 <br/>
<add> * 前置条件:
<add> * <pre>
<add> * 线程池名称为" "
<add> * </pre>
<add> *
<add> * 测试结果:
<add> * <pre>
<add> * 抛出{@link IllegalArgumentException}异常
<add> * </pre>
<add> */
<add> @Test
<add> public void testInvokeAll4ThreadpoolNameIsEmpty() {
<add> _expectedEx.expect(IllegalArgumentException.class);
<add> _expectedEx.expectMessage("thread pool name is empty");
<add>
<add> Collection<Callable<Integer>> tasks = new ArrayList<Callable<Integer>>();
<add> tasks.add(createCallable());
<add> _threadPool.invokeAll(tasks, 2, TimeUnit.SECONDS, " ");
<add> }
<add>
<add> /**
<add> * 测试用例:在线程池"default"中执行多个需要返回值的异步任务,并设置超时时间 <br/>
<add> * 前置条件:
<add> * <pre>
<add> * 线程池名称为" "
<add> * </pre>
<add> *
<add> * 测试结果:
<add> * <pre>
<add> * 抛出{@link IllegalArgumentException}异常
<add> * </pre>
<add> */
<add> @Test
<add> public void testInvokeAll4ThreadpoolNotExists() {
<add> _expectedEx.expect(IllegalArgumentException.class);
<add> _expectedEx.expectMessage("thread pool ThreadPoolNotExists not exists");
<add>
<add> Collection<Callable<Integer>> tasks = new ArrayList<Callable<Integer>>();
<add> tasks.add(createCallable());
<add> _threadPool.invokeAll(tasks, 2, TimeUnit.SECONDS, "ThreadPoolNotExists");
<add> }
<add>
<add> /**
<add> * 测试用例:在线程池"default"中执行多个需要返回值的异步任务,并设置超时时间 <br/>
<add> * 前置条件:
<add> * <pre>
<add> * 1、所有参数均符合要求。
<add> * 2、线程池存在。
<add> * 3、执行两个异步任务。
<add> * </pre>
<add> *
<add> * 测试结果:
<add> * <pre>
<add> * 两个异步任务均返回正确的执行结果
<add> * </pre>
<add> * @throws ExecutionException
<add> * @throws InterruptedException
<add> */
<add> @Test
<add> public void testInvokeAll() throws InterruptedException, ExecutionException {
<add> Collection<Callable<Integer>> tasks = new ArrayList<Callable<Integer>>();
<add> tasks.add(createCallable());
<add> tasks.add(createCallable());
<add> List<Future<Integer>> futures = _threadPool.invokeAll(tasks, 2, TimeUnit.SECONDS);
<add> int result = 0;
<add> for (Future<Integer> future : futures) {
<add> result += future.get();
<add> }
<add>
<add> assertEquals(18, result);
<add> }
<add>
<add> /**
<add> * 测试用例:查询指定名称的线程池是否存在 <br/>
<add> * 前置条件:
<add> * <pre>
<add> * 线程池"ThreadPoolNotExists"不存在
<add> * </pre>
<add> *
<add> * 测试结果:
<add> * <pre>
<add> * 返回false
<add> * </pre>
<add> */
<add> @Test
<add> public void testIsExists4NotExists() {
<add> assertFalse(_threadPool.isExists("ThreadPoolNotExists"));
<add> }
<add>
<add> /**
<add> * 测试用例:查询指定名称的线程池是否存在 <br/>
<add> * 前置条件:
<add> * <pre>
<add> * 线程池"default"存在
<add> * </pre>
<add> *
<add> * 测试结果:
<add> * <pre>
<add> * 返回true
<add> * </pre>
<add> */
<add> @Test
<add> public void testIsExists4Exists() {
<add> assertTrue(_threadPool.isExists("default"));
<add> }
<add>
<add> private Callable<Integer> createCallable() {
<add> return new Callable<Integer>() {
<add>
<add> @Override
<add> public Integer call() throws Exception {
<add> return 9;
<add> }
<add>
<add> };
<add> }
<add>
<ide> } |
|
JavaScript | bsd-3-clause | 081a41e649c1e6ae71863f5f75078c7122a25082 | 0 | dwvanstone/buttonmen,dwvanstone/buttonmen,dwvanstone/buttonmen,dwvanstone/buttonmen,dwvanstone/buttonmen,dwvanstone/buttonmen | // namespace for this "module"
var Api = {
'active_games': {},
'completed_games': {},
};
// Duplicate the game settings we need from Game.js for now
Api.GAME_STATE_END_GAME = 60;
////////////////////////////////////////////////////////////////////////
// This module should not layout a page or generate any HTML. It exists
// only as a collection of routines which load and parse a particular
// type of data from the server.
//
// Each routine should be defined as: Api.getXData(callbackfunc),
// and should do these things:
// * call Env.api_location with arguments which load the requested
// type of data from the server
// * call Api.parseXData(rs) to parse the response from the server
// and populate Api.x in whatever way is desired
// * call the requested callback function no matter what happened with
// the data load
//
// Notes:
// * these routines may assume that the login header has already been
// loaded, and therefore that the contents of Login.logged_in and
// Login.player are available
// * these routines are not appropriate for form submission of actions
// that change the server state --- they're only for loading and
// parsing server data so page layout modules can use it
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
// Load and parse a list of buttons
Api.getButtonData = function(callbackfunc) {
Api.button = {
'load_status': 'failed',
};
$.post(
Env.api_location,
{ type: 'loadButtonNames', },
function(rs) {
if (rs.status == 'ok') {
if (Api.parseButtonData(rs.data)) {
Api.button.load_status = 'ok';
} else {
Env.message = {
'type': 'error',
'text': 'Could not parse button list from server',
};
}
} else {
Env.message = {
'type': 'error',
'text': rs.message,
};
}
return callbackfunc();
}
).fail(
function() {
Env.message = {
'type': 'error',
'text': 'Internal error when calling loadButtonNames',
};
return callbackfunc();
}
);
};
Api.parseButtonData = function(data) {
Api.button.list = {};
if ((!($.isArray(data.buttonNameArray))) ||
(!($.isArray(data.recipeArray))) ||
(!($.isArray(data.hasUnimplementedSkillArray)))) {
return false;
}
var i = 0;
while (i < data.buttonNameArray.length) {
Api.button.list[data.buttonNameArray[i]] = {
'recipe': data.recipeArray[i],
'hasUnimplementedSkill': data.hasUnimplementedSkillArray[i],
};
i++;
}
return true;
};
////////////////////////////////////////////////////////////////////////
// Load and parse a list of players
Api.getPlayerData = function(callbackfunc) {
Api.player = {
'load_status': 'failed',
};
$.post(
Env.api_location,
{ type: 'loadPlayerNames', },
function(rs) {
if (rs.status == 'ok') {
if (Api.parsePlayerData(rs.data)) {
Api.player.load_status = 'ok';
} else {
Env.message = {
'type': 'error',
'text': 'Could not parse player list from server',
};
}
} else {
Env.message = {
'type': 'error',
'text': rs.message,
};
}
return callbackfunc();
}
).fail(
function() {
Env.message = {
'type': 'error',
'text': 'Internal error when calling loadPlayerNames',
};
return callbackfunc();
}
);
};
// Right now, we only get a list of names, but make a dict in case
// there's more data available later
Api.parsePlayerData = function(data) {
Api.player.list = {};
if (!($.isArray(data.nameArray))) {
return false;
}
var i = 0;
while (i < data.nameArray.length) {
Api.player.list[data.nameArray[i]] = {
};
i++;
}
return true;
};
////////////////////////////////////////////////////////////////////////
// Load and parse the current player's list of active games
Api.getActiveGamesData = function(callbackfunc) {
Api.active_games = {
'load_status': 'failed',
};
$.post(
Env.api_location,
{ type: 'loadActiveGames', },
function(rs) {
if (rs.status == 'ok') {
if (Api.parseActiveGamesData(rs.data)) {
Api.active_games.load_status = 'ok';
} else {
Env.message = {
'type': 'error',
'text':
'Active game list received from server could not be parsed!',
};
}
} else {
Env.message = {
'type': 'error',
'text': rs.message,
};
}
return callbackfunc();
}
).fail(
function() {
Env.message = {
'type': 'error',
'text': 'Internal error when calling loadActiveGames',
};
return callbackfunc();
}
);
};
Api.parseActiveGamesData = function(data) {
Api.active_games.games = {
'awaitingPlayer': [],
'awaitingOpponent': [],
};
Api.active_games.nGames = data.gameIdArray.length;
var i = 0;
while (i < Api.active_games.nGames) {
var gameInfo = {
'gameId': data.gameIdArray[i],
'opponentId': data.opponentIdArray[i],
'opponentName': data.opponentNameArray[i],
'playerButtonName': data.myButtonNameArray[i],
'opponentButtonName': data.opponentButtonNameArray[i],
'gameScoreDict': {
'W': data.nWinsArray[i],
'L': data.nLossesArray[i],
'D': data.nDrawsArray[i],
},
'isAwaitingAction': data.isAwaitingActionArray[i],
'maxWins': data.nTargetWinsArray[i],
'gameState': data.gameStateArray[i],
'status': data.statusArray[i],
};
if (gameInfo.isAwaitingAction == '1') {
Api.active_games.games.awaitingPlayer.push(gameInfo);
} else {
if (gameInfo.gameState == Api.GAME_STATE_END_GAME) {
Api.active_games.games.finished.push(gameInfo);
} else {
Api.active_games.games.awaitingOpponent.push(gameInfo);
}
}
i += 1;
}
return true;
};
////////////////////////////////////////////////////////////////////////
// Load and parse the current player's list of active games
Api.getCompletedGamesData = function(callbackfunc) {
Api.completed_games = {
'load_status': 'failed',
};
$.post(
Env.api_location,
{ type: 'loadCompletedGames', },
function(rs) {
if (rs.status == 'ok') {
if (Api.parseCompletedGamesData(rs.data)) {
Api.completed_games.load_status = 'ok';
} else if (Api.completed_games.load_status != 'nogames') {
Env.message = {
'type': 'error',
'text':
'Completed game list received from server could not be parsed!',
};
}
} else {
Env.message = {
'type': 'error',
'text': rs.message,
};
}
return callbackfunc();
}
).fail(
function() {
Env.message = {
'type': 'error',
'text': 'Internal error when calling loadCompletedGames',
};
return callbackfunc();
}
);
};
Api.parseCompletedGamesData = function(data) {
Api.completed_games.games = [];
Api.completed_games.nGames = data.gameIdArray.length;
var i = 0;
while (i < Api.completed_games.nGames) {
var gameInfo = {
'gameId': data.gameIdArray[i],
'opponentId': data.opponentIdArray[i],
'opponentName': data.opponentNameArray[i],
'playerButtonName': data.myButtonNameArray[i],
'opponentButtonName': data.opponentButtonNameArray[i],
'gameScoreDict': {
'W': data.nWinsArray[i],
'L': data.nLossesArray[i],
'D': data.nDrawsArray[i],
},
'isAwaitingAction': data.isAwaitingActionArray[i],
'maxWins': data.nTargetWinsArray[i],
'gameState': data.gameStateArray[i],
'status': data.statusArray[i],
};
Api.completed_games.games.push(gameInfo);
i += 1;
}
return true;
};
| src/ui/js/Api.js | // namespace for this "module"
var Api = {
'data': {},
};
// Duplicate the game settings we need from Game.js for now
Api.GAME_STATE_END_GAME = 60;
////////////////////////////////////////////////////////////////////////
// This module should not layout a page or generate any HTML. It exists
// only as a collection of routines which load and parse a particular
// type of data from the server.
//
// Each routine should be defined as: Api.getXData(callbackfunc),
// and should do these things:
// * call Env.api_location with arguments which load the requested
// type of data from the server
// * call Api.parseXData(rs) to parse the response from the server
// and populate Api.x in whatever way is desired
// * call the requested callback function no matter what happened with
// the data load
//
// Notes:
// * these routines may assume that the login header has already been
// loaded, and therefore that the contents of Login.logged_in and
// Login.player are available
// * these routines are not appropriate for form submission of actions
// that change the server state --- they're only for loading and
// parsing server data so page layout modules can use it
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
// Load and parse a list of buttons
Api.getButtonData = function(callbackfunc) {
Api.button = {
'load_status': 'failed',
};
$.post(
Env.api_location,
{ type: 'loadButtonNames', },
function(rs) {
if (rs.status == 'ok') {
if (Api.parseButtonData(rs.data)) {
Api.button.load_status = 'ok';
} else {
Env.message = {
'type': 'error',
'text': 'Could not parse button list from server',
};
}
} else {
Env.message = {
'type': 'error',
'text': rs.message,
};
}
return callbackfunc();
}
).fail(
function() {
Env.message = {
'type': 'error',
'text': 'Internal error when calling loadButtonNames',
};
return callbackfunc();
}
);
};
Api.parseButtonData = function(data) {
Api.button.list = {};
if ((!($.isArray(data.buttonNameArray))) ||
(!($.isArray(data.recipeArray))) ||
(!($.isArray(data.hasUnimplementedSkillArray)))) {
return false;
}
var i = 0;
while (i < data.buttonNameArray.length) {
Api.button.list[data.buttonNameArray[i]] = {
'recipe': data.recipeArray[i],
'hasUnimplementedSkill': data.hasUnimplementedSkillArray[i],
};
i++;
}
return true;
};
////////////////////////////////////////////////////////////////////////
// Load and parse a list of players
Api.getPlayerData = function(callbackfunc) {
Api.player = {
'load_status': 'failed',
};
$.post(
Env.api_location,
{ type: 'loadPlayerNames', },
function(rs) {
if (rs.status == 'ok') {
if (Api.parsePlayerData(rs.data)) {
Api.player.load_status = 'ok';
} else {
Env.message = {
'type': 'error',
'text': 'Could not parse player list from server',
};
}
} else {
Env.message = {
'type': 'error',
'text': rs.message,
};
}
return callbackfunc();
}
).fail(
function() {
Env.message = {
'type': 'error',
'text': 'Internal error when calling loadPlayerNames',
};
return callbackfunc();
}
);
};
// Right now, we only get a list of names, but make a dict in case
// there's more data available later
Api.parsePlayerData = function(data) {
Api.player.list = {};
if (!($.isArray(data.nameArray))) {
return false;
}
var i = 0;
while (i < data.nameArray.length) {
Api.player.list[data.nameArray[i]] = {
};
i++;
}
return true;
};
////////////////////////////////////////////////////////////////////////
// Load and parse the current player's list of active games
Api.getActiveGamesData = function(callbackfunc) {
Api.active_games = {
'load_status': 'failed',
};
$.post(
Env.api_location,
{ type: 'loadActiveGames', },
function(rs) {
if (rs.status == 'ok') {
if (Api.parseActiveGamesData(rs.data)) {
Api.active_games.load_status = 'ok';
} else {
Env.message = {
'type': 'error',
'text':
'Active game list received from server could not be parsed!',
};
}
} else {
Env.message = {
'type': 'error',
'text': rs.message,
};
}
return callbackfunc();
}
).fail(
function() {
Env.message = {
'type': 'error',
'text': 'Internal error when calling loadActiveGames',
};
return callbackfunc();
}
);
};
Api.parseActiveGamesData = function(data) {
Api.active_games.games = {
'awaitingPlayer': [],
'awaitingOpponent': [],
};
Api.active_games.nGames = data.gameIdArray.length;
var i = 0;
while (i < Api.active_games.nGames) {
var gameInfo = {
'gameId': data.gameIdArray[i],
'opponentId': data.opponentIdArray[i],
'opponentName': data.opponentNameArray[i],
'playerButtonName': data.myButtonNameArray[i],
'opponentButtonName': data.opponentButtonNameArray[i],
'gameScoreDict': {
'W': data.nWinsArray[i],
'L': data.nLossesArray[i],
'D': data.nDrawsArray[i],
},
'isAwaitingAction': data.isAwaitingActionArray[i],
'maxWins': data.nTargetWinsArray[i],
'gameState': data.gameStateArray[i],
'status': data.statusArray[i],
};
if (gameInfo.isAwaitingAction == '1') {
Api.active_games.games.awaitingPlayer.push(gameInfo);
} else {
if (gameInfo.gameState == Api.GAME_STATE_END_GAME) {
Api.active_games.games.finished.push(gameInfo);
} else {
Api.active_games.games.awaitingOpponent.push(gameInfo);
}
}
i += 1;
}
return true;
};
////////////////////////////////////////////////////////////////////////
// Load and parse the current player's list of active games
Api.getCompletedGamesData = function(callbackfunc) {
Api.completed_games = {
'load_status': 'failed',
};
$.post(
Env.api_location,
{ type: 'loadCompletedGames', },
function(rs) {
if (rs.status == 'ok') {
if (Api.parseCompletedGamesData(rs.data)) {
Api.completed_games.load_status = 'ok';
} else if (Api.completed_games.load_status != 'nogames') {
Env.message = {
'type': 'error',
'text':
'Completed game list received from server could not be parsed!',
};
}
} else {
Env.message = {
'type': 'error',
'text': rs.message,
};
}
return callbackfunc();
}
).fail(
function() {
Env.message = {
'type': 'error',
'text': 'Internal error when calling loadCompletedGames',
};
return callbackfunc();
}
);
};
Api.parseCompletedGamesData = function(data) {
Api.completed_games.games = [];
Api.completed_games.nGames = data.gameIdArray.length;
var i = 0;
while (i < Api.completed_games.nGames) {
var gameInfo = {
'gameId': data.gameIdArray[i],
'opponentId': data.opponentIdArray[i],
'opponentName': data.opponentNameArray[i],
'playerButtonName': data.myButtonNameArray[i],
'opponentButtonName': data.opponentButtonNameArray[i],
'gameScoreDict': {
'W': data.nWinsArray[i],
'L': data.nLossesArray[i],
'D': data.nDrawsArray[i],
},
'isAwaitingAction': data.isAwaitingActionArray[i],
'maxWins': data.nTargetWinsArray[i],
'gameState': data.gameStateArray[i],
'status': data.statusArray[i],
};
Api.completed_games.games.push(gameInfo);
i += 1;
}
return true;
};
| * when initializing Api, initialize active_games and completed_games too
| src/ui/js/Api.js | * when initializing Api, initialize active_games and completed_games too | <ide><path>rc/ui/js/Api.js
<ide> // namespace for this "module"
<ide> var Api = {
<del> 'data': {},
<add> 'active_games': {},
<add> 'completed_games': {},
<ide> };
<ide>
<ide> // Duplicate the game settings we need from Game.js for now |
|
Java | mit | 9ee124535ac8ce9102b45531910a176164fd9527 | 0 | ClioBatali/2015-Recycle-Rush,NoahLevine/2015-Recycle-Rush,Spartronics4915/2015-Recycle-Rush,TarkanAl-Kazily/2015-Recycle-Rush | // RobotBuilder Version: 1.5
//
// This file was generated by RobotBuilder. It contains sections of
// code that are automatically generated and assigned by robotbuilder.
// These sections will be updated in the future when you export to
// Java from RobotBuilder. Do not put any code or make any change in
// the blocks indicating autogenerated code or it will be lost on an
// update. Deleting the comments indicating the section will prevent
// it from being updated in the future.
package org.usfirst.frc4915.MecanumDrive;
import org.usfirst.frc4915.MecanumDrive.commands.AutonomousCommand;
import org.usfirst.frc4915.MecanumDrive.commands.CloseAllGrabbers;
import org.usfirst.frc4915.MecanumDrive.commands.CloseGrabber;
import org.usfirst.frc4915.MecanumDrive.commands.CloseSmallGrabber;
import org.usfirst.frc4915.MecanumDrive.commands.DriveStraight;
import org.usfirst.frc4915.MecanumDrive.commands.ElevatorJumpToPosition;
import org.usfirst.frc4915.MecanumDrive.commands.IntermediateOpen;
import org.usfirst.frc4915.MecanumDrive.commands.MoveStraightPositionModeCommand;
import org.usfirst.frc4915.MecanumDrive.commands.OpenGrabber;
import org.usfirst.frc4915.MecanumDrive.commands.ToggleDriveMode;
import org.usfirst.frc4915.MecanumDrive.subsystems.DriveTrain;
import edu.wpi.first.wpilibj.Joystick;
import edu.wpi.first.wpilibj.buttons.JoystickButton;
import edu.wpi.first.wpilibj.livewindow.LiveWindow;
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;
/**
* This class is the glue that binds the controls on the physical operator
* interface to the commands and command groups that allow control of the robot.
*/
public class OI {
// // CREATING BUTTONS
// One type of button is a joystick button which is any button on a
// joystick.
// You create one by telling it which joystick it's on and which button
// number it is.
// Joystick stick = new Joystick(port);
// Button button = new JoystickButton(stick, buttonNumber);
// There are a few additional built in buttons you can use. Additionally,
// by subclassing Button you can create custom triggers and bind those to
// commands the same as any other Button.
// // TRIGGERING COMMANDS WITH BUTTONS
// Once you have a button, it's trivial to bind it to a button in one of
// three ways:
// Start the command when the button is pressed and let it run the command
// until it is finished as determined by it's isFinished method.
// button.whenPressed(new ExampleCommand());
// Run the command while the button is being held down and interrupt it once
// the button is released.
// button.whileHeld(new ExampleCommand());
// Start the command when the button is released and let it run the command
// until it is finished as determined by it's isFinished method.
// button.whenReleased(new ExampleCommand());
/**
* JOYSTICKS
*/
public Joystick driveStick;
public Joystick elevatorStick;
/**
* JOYSTICK BUTTONS (ELEVATOR)
*/
public JoystickButton elevatorJumpToPositionZero;
public JoystickButton elevatorJumpToPositionOne;
public JoystickButton elevatorJumpToPositionTwo;
public JoystickButton elevatorJumpToPositionThree;
public JoystickButton elevatorJumpToPositionFour;
public JoystickButton elevatorJumpToPositionFive;
public JoystickButton elevatorJumpToPositionSix;
/**
* JOYSTICK BUTTONS (GRABBER)
*/
public JoystickButton grabberOpen;
public JoystickButton grabberClosed;
public JoystickButton grabberIntermediate;
public OI() {
/**
* JOYSTICKS
*/
driveStick = new Joystick(0);
elevatorStick = new Joystick(1);
/**
* JOYSTICK BUTTONS (ELEVATOR)
*/
elevatorJumpToPositionZero = new JoystickButton(elevatorStick, 2);
elevatorJumpToPositionZero.whenPressed(new ElevatorJumpToPosition(0));
elevatorJumpToPositionOne = new JoystickButton(elevatorStick, 7);
elevatorJumpToPositionOne.whenPressed(new ElevatorJumpToPosition(1));
elevatorJumpToPositionTwo = new JoystickButton(elevatorStick, 8);
elevatorJumpToPositionTwo.whenPressed(new ElevatorJumpToPosition(2));
elevatorJumpToPositionThree = new JoystickButton(elevatorStick, 9);
elevatorJumpToPositionThree.whenPressed(new ElevatorJumpToPosition(3));
elevatorJumpToPositionFour = new JoystickButton(elevatorStick, 10);
elevatorJumpToPositionFour.whenPressed(new ElevatorJumpToPosition(4));
/**
* AUTONOMOUS COMMAND
*/
SmartDashboard.putData("Autonomous Command", new AutonomousCommand());
/**
* DRIVE STRAIGHT
*/
SmartDashboard.putData("Move Straight 9 feet", new MoveStraightPositionModeCommand(9));
SmartDashboard.putData("Move Backwards 9 feet", new MoveStraightPositionModeCommand(-9));
SmartDashboard.putData("DriveStraight 1 second", new DriveStraight());
/**
* TOGGLE FIELD ORIENTED DRIVE
*/
SmartDashboard.putData("Toggle Field Drive", new ToggleDriveMode());
/**
* GRABBER
*/
SmartDashboard.putData("Close Grabber", new CloseGrabber());
SmartDashboard.putData("Vent", new CloseSmallGrabber());
SmartDashboard.putData("Intermediate Open", new IntermediateOpen());
SmartDashboard.putData("Open Grabber", new OpenGrabber());
SmartDashboard.putData("Close All Grabbers", new CloseAllGrabbers());
SmartDashboard.putData("Open Large Grabber", new OpenGrabber());
SmartDashboard.putData("Close Large Grabber", new CloseGrabber());
/**
* ELEVATOR
*/
SmartDashboard.putData("Jump to Elevator Position 0", new ElevatorJumpToPosition(0));
SmartDashboard.putData("Jump to Elevator Position 1", new ElevatorJumpToPosition(1));
SmartDashboard.putData("Jump to Elevator Position 2", new ElevatorJumpToPosition(2));
SmartDashboard.putData("Jump to Elevator Position 3", new ElevatorJumpToPosition(3));
SmartDashboard.putData("Jump to Elevator Position 4", new ElevatorJumpToPosition(4));
/**
* SENSOR OUTPUT
*/
LiveWindow.addSensor("Other Sensors", "Accelerometer", RobotMap.accelerometer);
LiveWindow.addSensor("Drive Train", "Distance Sensor", DriveTrain.distanceSensor);
LiveWindow.addActuator("Grabber", "Double Solenoid", RobotMap.mommaSolenoid);
/**
* MOTOR SPEED OUTPUT
*/
SmartDashboard.putNumber("LeftFront Speed", RobotMap.mecanumDriveControlsLeftFront.getSpeed());
SmartDashboard.putNumber("LeftRear Speed", RobotMap.mecanumDriveControlsLeftRear.getSpeed());
SmartDashboard.putNumber("RightFront Speed", RobotMap.mecanumDriveControlsRightFront.getSpeed());
SmartDashboard.putNumber("RightRear Speed", RobotMap.mecanumDriveControlsRightRear.getSpeed());
/**
* MOTOR POSITION OUTPUT
*/
SmartDashboard.putNumber("LeftFront Position", RobotMap.mecanumDriveControlsLeftFront.getEncPosition());
SmartDashboard.putNumber("LeftRear Position", RobotMap.mecanumDriveControlsLeftRear.getEncPosition());
SmartDashboard.putNumber("RightFront Position", RobotMap.mecanumDriveControlsRightFront.getEncPosition());
SmartDashboard.putNumber("RightRear Position", RobotMap.mecanumDriveControlsRightRear.getEncPosition());
/**
* ELEVATOR SPEED OUTPUT
*/
SmartDashboard.putNumber("Elevator Speed", RobotMap.elevatorWinchMotor.getSpeed());
// SmartDashboard.putNumber("Linear Potentiometer height",
// RobotMap.potentiometer.get());
/**
* CODE VERSION OUTPUT
*/
String parsedVersion = VersionFinder.parseVersionFromManifest(this);
SmartDashboard.putString("Code Version", parsedVersion == null ? "<not found>" : parsedVersion);
}
}
| RobotCode/MecanumDrive/src/org/usfirst/frc4915/MecanumDrive/OI.java | // RobotBuilder Version: 1.5
//
// This file was generated by RobotBuilder. It contains sections of
// code that are automatically generated and assigned by robotbuilder.
// These sections will be updated in the future when you export to
// Java from RobotBuilder. Do not put any code or make any change in
// the blocks indicating autogenerated code or it will be lost on an
// update. Deleting the comments indicating the section will prevent
// it from being updated in the future.
package org.usfirst.frc4915.MecanumDrive;
import org.usfirst.frc4915.MecanumDrive.commands.AutonomousCommand;
import org.usfirst.frc4915.MecanumDrive.commands.CloseAllGrabbers;
import org.usfirst.frc4915.MecanumDrive.commands.CloseGrabber;
import org.usfirst.frc4915.MecanumDrive.commands.CloseSmallGrabber;
import org.usfirst.frc4915.MecanumDrive.commands.DriveStraight;
import org.usfirst.frc4915.MecanumDrive.commands.ElevatorJumpToPosition;
import org.usfirst.frc4915.MecanumDrive.commands.IntermediateOpen;
import org.usfirst.frc4915.MecanumDrive.commands.MoveStraightPositionModeCommand;
import org.usfirst.frc4915.MecanumDrive.commands.OpenGrabber;
import org.usfirst.frc4915.MecanumDrive.subsystems.DriveTrain;
import edu.wpi.first.wpilibj.Joystick;
import edu.wpi.first.wpilibj.buttons.JoystickButton;
import edu.wpi.first.wpilibj.livewindow.LiveWindow;
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;
/**
* This class is the glue that binds the controls on the physical operator
* interface to the commands and command groups that allow control of the robot.
*/
public class OI {
// // CREATING BUTTONS
// One type of button is a joystick button which is any button on a
// joystick.
// You create one by telling it which joystick it's on and which button
// number it is.
// Joystick stick = new Joystick(port);
// Button button = new JoystickButton(stick, buttonNumber);
// There are a few additional built in buttons you can use. Additionally,
// by subclassing Button you can create custom triggers and bind those to
// commands the same as any other Button.
// // TRIGGERING COMMANDS WITH BUTTONS
// Once you have a button, it's trivial to bind it to a button in one of
// three ways:
// Start the command when the button is pressed and let it run the command
// until it is finished as determined by it's isFinished method.
// button.whenPressed(new ExampleCommand());
// Run the command while the button is being held down and interrupt it once
// the button is released.
// button.whileHeld(new ExampleCommand());
// Start the command when the button is released and let it run the command
// until it is finished as determined by it's isFinished method.
// button.whenReleased(new ExampleCommand());
/**
* JOYSTICKS
*/
public Joystick driveStick;
public Joystick elevatorStick;
/**
* JOYSTICK BUTTONS (ELEVATOR)
*/
public JoystickButton elevatorJumpToPositionZero;
public JoystickButton elevatorJumpToPositionOne;
public JoystickButton elevatorJumpToPositionTwo;
public JoystickButton elevatorJumpToPositionThree;
public JoystickButton elevatorJumpToPositionFour;
public JoystickButton elevatorJumpToPositionFive;
public JoystickButton elevatorJumpToPositionSix;
/**
* JOYSTICK BUTTONS (GRABBER)
*/
public JoystickButton grabberOpen;
public JoystickButton grabberClosed;
public JoystickButton grabberIntermediate;
public OI() {
/**
* JOYSTICKS
*/
driveStick = new Joystick(0);
elevatorStick = new Joystick(1);
/**
* JOYSTICK BUTTONS (ELEVATOR)
*/
elevatorJumpToPositionZero = new JoystickButton(elevatorStick, 2);
elevatorJumpToPositionZero.whenPressed(new ElevatorJumpToPosition(0));
elevatorJumpToPositionOne = new JoystickButton(elevatorStick, 7);
elevatorJumpToPositionOne.whenPressed(new ElevatorJumpToPosition(1));
elevatorJumpToPositionTwo = new JoystickButton(elevatorStick, 8);
elevatorJumpToPositionTwo.whenPressed(new ElevatorJumpToPosition(2));
elevatorJumpToPositionThree = new JoystickButton(elevatorStick, 9);
elevatorJumpToPositionThree.whenPressed(new ElevatorJumpToPosition(3));
elevatorJumpToPositionFour = new JoystickButton(elevatorStick, 10);
elevatorJumpToPositionFour.whenPressed(new ElevatorJumpToPosition(4));
/**
* AUTONOMOUS COMMAND
*/
SmartDashboard.putData("Autonomous Command", new AutonomousCommand());
/**
* DRIVE STRAIGHT
*/
SmartDashboard.putData("Move Straight 9 feet", new MoveStraightPositionModeCommand(9));
SmartDashboard.putData("Move Backwards 9 feet", new MoveStraightPositionModeCommand(-9));
SmartDashboard.putData("DriveStraight 1 second", new DriveStraight());
/**
* GRABBER
*/
SmartDashboard.putData("Close Grabber", new CloseGrabber());
SmartDashboard.putData("Vent", new CloseSmallGrabber());
SmartDashboard.putData("Intermediate Open", new IntermediateOpen());
SmartDashboard.putData("Open Grabber", new OpenGrabber());
SmartDashboard.putData("Close All Grabbers", new CloseAllGrabbers());
SmartDashboard.putData("Open Large Grabber", new OpenGrabber());
SmartDashboard.putData("Close Large Grabber", new CloseGrabber());
/**
* ELEVATOR
*/
SmartDashboard.putData("Jump to Elevator Position 0", new ElevatorJumpToPosition(0));
SmartDashboard.putData("Jump to Elevator Position 1", new ElevatorJumpToPosition(1));
SmartDashboard.putData("Jump to Elevator Position 2", new ElevatorJumpToPosition(2));
SmartDashboard.putData("Jump to Elevator Position 3", new ElevatorJumpToPosition(3));
SmartDashboard.putData("Jump to Elevator Position 4", new ElevatorJumpToPosition(4));
/**
* SENSOR OUTPUT
*/
LiveWindow.addSensor("Other Sensors", "Accelerometer", RobotMap.accelerometer);
LiveWindow.addSensor("Drive Train", "Distance Sensor", DriveTrain.distanceSensor);
LiveWindow.addActuator("Grabber", "Double Solenoid", RobotMap.mommaSolenoid);
/**
* MOTOR SPEED OUTPUT
*/
SmartDashboard.putNumber("LeftFront Speed", RobotMap.mecanumDriveControlsLeftFront.getSpeed());
SmartDashboard.putNumber("LeftRear Speed", RobotMap.mecanumDriveControlsLeftRear.getSpeed());
SmartDashboard.putNumber("RightFront Speed", RobotMap.mecanumDriveControlsRightFront.getSpeed());
SmartDashboard.putNumber("RightRear Speed", RobotMap.mecanumDriveControlsRightRear.getSpeed());
/**
* MOTOR POSITION OUTPUT
*/
SmartDashboard.putNumber("LeftFront Position", RobotMap.mecanumDriveControlsLeftFront.getEncPosition());
SmartDashboard.putNumber("LeftRear Position", RobotMap.mecanumDriveControlsLeftRear.getEncPosition());
SmartDashboard.putNumber("RightFront Position", RobotMap.mecanumDriveControlsRightFront.getEncPosition());
SmartDashboard.putNumber("RightRear Position", RobotMap.mecanumDriveControlsRightRear.getEncPosition());
/**
* ELEVATOR SPEED OUTPUT
*/
SmartDashboard.putNumber("Elevator Speed", RobotMap.elevatorWinchMotor.getSpeed());
// SmartDashboard.putNumber("Linear Potentiometer height",
// RobotMap.potentiometer.get());
/**
* CODE VERSION OUTPUT
*/
String parsedVersion = VersionFinder.parseVersionFromManifest(this);
SmartDashboard.putString("Code Version", parsedVersion == null ? "<not found>" : parsedVersion);
}
}
| Added button to OI to toggle field drive.
| RobotCode/MecanumDrive/src/org/usfirst/frc4915/MecanumDrive/OI.java | Added button to OI to toggle field drive. | <ide><path>obotCode/MecanumDrive/src/org/usfirst/frc4915/MecanumDrive/OI.java
<ide> import org.usfirst.frc4915.MecanumDrive.commands.IntermediateOpen;
<ide> import org.usfirst.frc4915.MecanumDrive.commands.MoveStraightPositionModeCommand;
<ide> import org.usfirst.frc4915.MecanumDrive.commands.OpenGrabber;
<add>import org.usfirst.frc4915.MecanumDrive.commands.ToggleDriveMode;
<ide> import org.usfirst.frc4915.MecanumDrive.subsystems.DriveTrain;
<add>
<ide> import edu.wpi.first.wpilibj.Joystick;
<ide> import edu.wpi.first.wpilibj.buttons.JoystickButton;
<ide> import edu.wpi.first.wpilibj.livewindow.LiveWindow;
<ide> import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;
<add>
<ide>
<ide> /**
<ide> * This class is the glue that binds the controls on the physical operator
<ide> SmartDashboard.putData("DriveStraight 1 second", new DriveStraight());
<ide>
<ide> /**
<add> * TOGGLE FIELD ORIENTED DRIVE
<add> */
<add> SmartDashboard.putData("Toggle Field Drive", new ToggleDriveMode());
<add>
<add> /**
<ide> * GRABBER
<ide> */
<ide> SmartDashboard.putData("Close Grabber", new CloseGrabber()); |
|
Java | apache-2.0 | 4a3b9df9dad11fb1ce7af466b6d0ae10bef081ef | 0 | data-integrations/dynamic-partitioner | /*
* Copyright © 2015 Cask Data, Inc.
*
* 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 co.cask.hydrator.plugin;
import co.cask.cdap.api.annotation.Description;
import co.cask.cdap.api.annotation.Macro;
import co.cask.cdap.api.data.schema.Schema;
import co.cask.cdap.api.data.schema.UnsupportedTypeException;
import co.cask.cdap.api.dataset.lib.Partitioning;
import co.cask.cdap.api.plugin.PluginConfig;
import co.cask.hydrator.common.HiveSchemaConverter;
import java.io.IOException;
import java.util.AbstractMap;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import javax.annotation.Nullable;
/**
* Abstract config for TimePartitionedFileSetSink
*/
public class PartitionedFileSetSinkConfig extends PluginConfig {
public static final String FIELD_NAMES_PROPERTY_KEY = "fieldNames";
@Description("Name of the Partitioned FileSet Dataset to which the records " +
"are written to. If it doesn't exist, it will be created.")
@Macro
protected String name;
@Description("The base path for the Partitioned FileSet. Defaults to the name of the dataset.")
@Nullable
@Macro
protected String basePath;
@Nullable
@Description("Used to specify the compression codec to be used for the final dataset.")
protected String compressionCodec;
@Description("The schema of the record being written to the Sink as a JSON Object.")
@Macro
protected String schema;
@Description("The fields to be used for the partitions as comma separated values.")
@Macro
protected String fieldNames;
@Nullable
@Description("Allow appending to existing partitions, by default this capability is disabled.")
protected String appendToPartition;
public PartitionedFileSetSinkConfig(String name, String schema, String fieldNames,
@Nullable String basePath, @Nullable String compressionCodec,
@Nullable String appendToPartition) {
this.name = name;
this.basePath = basePath;
this.compressionCodec = compressionCodec;
this.schema = schema;
this.fieldNames = fieldNames;
this.appendToPartition = appendToPartition;
}
public String getNonNullBasePath() {
return this.basePath == null ? this.name : this.basePath;
}
protected Map.Entry<Schema, String> getOutputSchema() {
// parse to make sure it's valid
new org.apache.avro.Schema.Parser().parse(this.schema);
Schema parsedSchema;
try {
parsedSchema = Schema.parseJson(this.schema);
HiveSchemaConverter.toHiveSchema(parsedSchema);
} catch (UnsupportedTypeException | IOException e) {
throw new IllegalArgumentException("Error: Schema is not valid ", e);
}
// add the fields that aren't part of the partitioning fields to the output schema
List<Schema.Field> fields = new ArrayList<>();
List<String> toRemove = Arrays.asList(this.fieldNames.split(","));
for (Schema.Field field : parsedSchema.getFields()) {
if (!toRemove.contains(field.getName())) {
fields.add(field);
}
}
String outputHiveSchema;
Schema outputSchema;
try {
outputSchema = Schema.recordOf("output", fields);
outputHiveSchema = HiveSchemaConverter.toHiveSchema(outputSchema);
} catch (UnsupportedTypeException e) {
throw new IllegalArgumentException("Error: Schema is not valid ", e);
}
return new AbstractMap.SimpleEntry<>(outputSchema, outputHiveSchema);
}
protected Partitioning getPartitioning(Schema inputSchema) {
Partitioning.Builder partitionBuilder = Partitioning.builder();
String[] partitionFields = this.fieldNames.split(",");
for (int i = 0; i < partitionFields.length; i++) {
if (inputSchema.getField(partitionFields[i]) == null) {
// throw exception if the field used to partition is not present in the input schema
throw new IllegalArgumentException(String.format("Field %s is not present in the input schema.",
partitionFields[i]));
} else if (inputSchema.getField(partitionFields[i]).getSchema().isNullable()) {
// throw exception if input field is nullable
throw new IllegalArgumentException(String.format("Input field %s has to be non-nullable.",
partitionFields[i]));
} else {
partitionBuilder.addStringField(partitionFields[i]);
}
}
return partitionBuilder.build();
}
protected void validate(Schema inputSchema) {
// this method checks whether the output schema is valid
// also checks against the input schema to see if the partition
// fields are valid
if (!this.containsMacro("fieldNames")) {
getPartitioning(inputSchema);
if (!this.containsMacro("schema")) {
getOutputSchema();
}
}
}
}
| src/main/java/co/cask/hydrator/plugin/PartitionedFileSetSinkConfig.java | /*
* Copyright © 2015 Cask Data, Inc.
*
* 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 co.cask.hydrator.plugin;
import co.cask.cdap.api.annotation.Description;
import co.cask.cdap.api.annotation.Macro;
import co.cask.cdap.api.data.schema.Schema;
import co.cask.cdap.api.data.schema.UnsupportedTypeException;
import co.cask.cdap.api.dataset.lib.Partitioning;
import co.cask.cdap.api.plugin.PluginConfig;
import co.cask.hydrator.common.HiveSchemaConverter;
import java.io.IOException;
import java.util.AbstractMap;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import javax.annotation.Nullable;
/**
* Abstract config for TimePartitionedFileSetSink
*/
public class PartitionedFileSetSinkConfig extends PluginConfig {
public static final String FIELD_NAMES_PROPERTY_KEY = "fieldNames";
@Description("Name of the Partitioned FileSet Dataset to which the records " +
"are written to. If it doesn't exist, it will be created.")
@Macro
protected String name;
@Description("The base path for the Partitioned FileSet. Defaults to the name of the dataset.")
@Nullable
@Macro
protected String basePath;
@Nullable
@Description("Used to specify the compression codec to be used for the final dataset.")
protected String compressionCodec;
@Description("The schema of the record being written to the Sink as a JSON Object.")
@Macro
protected String schema;
@Description("The fields to be used for the partitions as comma separated values.")
@Macro
protected String fieldNames;
@Nullable
@Description("Select 'Yes' to append to existing partitions. Defaults to 'No' to always try to create " +
"new partitions and exception will be thrown if a partition already exists.")
protected String appendToPartition;
public PartitionedFileSetSinkConfig(String name, String schema, String fieldNames,
@Nullable String basePath, @Nullable String compressionCodec,
@Nullable String appendToPartition) {
this.name = name;
this.basePath = basePath;
this.compressionCodec = compressionCodec;
this.schema = schema;
this.fieldNames = fieldNames;
this.appendToPartition = appendToPartition;
}
public String getNonNullBasePath() {
return this.basePath == null ? this.name : this.basePath;
}
protected Map.Entry<Schema, String> getOutputSchema() {
// parse to make sure it's valid
new org.apache.avro.Schema.Parser().parse(this.schema);
Schema parsedSchema;
try {
parsedSchema = Schema.parseJson(this.schema);
HiveSchemaConverter.toHiveSchema(parsedSchema);
} catch (UnsupportedTypeException | IOException e) {
throw new IllegalArgumentException("Error: Schema is not valid ", e);
}
// add the fields that aren't part of the partitioning fields to the output schema
List<Schema.Field> fields = new ArrayList<>();
List<String> toRemove = Arrays.asList(this.fieldNames.split(","));
for (Schema.Field field : parsedSchema.getFields()) {
if (!toRemove.contains(field.getName())) {
fields.add(field);
}
}
String outputHiveSchema;
Schema outputSchema;
try {
outputSchema = Schema.recordOf("output", fields);
outputHiveSchema = HiveSchemaConverter.toHiveSchema(outputSchema);
} catch (UnsupportedTypeException e) {
throw new IllegalArgumentException("Error: Schema is not valid ", e);
}
return new AbstractMap.SimpleEntry<>(outputSchema, outputHiveSchema);
}
protected Partitioning getPartitioning(Schema inputSchema) {
Partitioning.Builder partitionBuilder = Partitioning.builder();
String[] partitionFields = this.fieldNames.split(",");
for (int i = 0; i < partitionFields.length; i++) {
if (inputSchema.getField(partitionFields[i]) == null) {
// throw exception if the field used to partition is not present in the input schema
throw new IllegalArgumentException(String.format("Field %s is not present in the input schema.",
partitionFields[i]));
} else if (inputSchema.getField(partitionFields[i]).getSchema().isNullable()) {
// throw exception if input field is nullable
throw new IllegalArgumentException(String.format("Input field %s has to be non-nullable.",
partitionFields[i]));
} else {
partitionBuilder.addStringField(partitionFields[i]);
}
}
return partitionBuilder.build();
}
protected void validate(Schema inputSchema) {
// this method checks whether the output schema is valid
// also checks against the input schema to see if the partition
// fields are valid
if (!this.containsMacro("fieldNames")) {
getPartitioning(inputSchema);
if (!this.containsMacro("schema")) {
getOutputSchema();
}
}
}
}
| Update PartitionedFileSetSinkConfig.java | src/main/java/co/cask/hydrator/plugin/PartitionedFileSetSinkConfig.java | Update PartitionedFileSetSinkConfig.java | <ide><path>rc/main/java/co/cask/hydrator/plugin/PartitionedFileSetSinkConfig.java
<ide> protected String fieldNames;
<ide>
<ide> @Nullable
<del> @Description("Select 'Yes' to append to existing partitions. Defaults to 'No' to always try to create " +
<del> "new partitions and exception will be thrown if a partition already exists.")
<add> @Description("Allow appending to existing partitions, by default this capability is disabled.")
<ide> protected String appendToPartition;
<ide>
<ide> public PartitionedFileSetSinkConfig(String name, String schema, String fieldNames, |
|
Java | apache-2.0 | 9320623057e4e890808b484d5c5e973b1f346593 | 0 | namedlock/weex,Hanks10100/weex,leoward/incubator-weex,Tancy/weex,alibaba/weex,erha19/incubator-weex,alibaba/weex,lzyzsd/weex,zhangquan/weex,miomin/incubator-weex,dianwodaMobile/DWeex,houfeng0923/weex,xiayun200825/weex,namedlock/weex,miomin/incubator-weex,acton393/incubator-weex,HomHomLin/weex,lzyzsd/weex,MrRaindrop/weex,Neeeo/incubator-weex,bigconvience/weex,Hanks10100/incubator-weex,lzyzsd/weex,MrRaindrop/incubator-weex,acton393/weex,erha19/incubator-weex,lzyzsd/weex,zzyhappyzzy/weex,dianwodaMobile/DWeex,lvscar/weex,dianwodaMobile/DWeex,MrRaindrop/weex,cxfeng1/weex,Hanks10100/weex,yuguitao/incubator-weex,weexteam/incubator-weex,KalicyZhou/incubator-weex,erha19/incubator-weex,zzyhappyzzy/weex,lzyzsd/weex,bigconvience/weex,alibaba/weex,erha19/incubator-weex,Hanks10100/weex,Tancy/weex,xiayun200825/weex,boboning/weex,yuguitao/incubator-weex,Tancy/weex,MrRaindrop/weex,lvscar/weex,yuguitao/incubator-weex,acton393/weex,Neeeo/incubator-weex,HomHomLin/weex,kfeagle/weex,bigconvience/weex,boboning/weex,namedlock/weex,xiayun200825/weex,acton393/incubator-weex,zzyhappyzzy/weex,erha19/incubator-weex,Hanks10100/incubator-weex,MrRaindrop/incubator-weex,cxfeng1/weex,kfeagle/weex,bigconvience/weex,zhangquan/weex,zhangquan/weex,Hanks10100/incubator-weex,cxfeng1/incubator-weex,Tancy/weex,HomHomLin/weex,MrRaindrop/weex,zzyhappyzzy/weex,lvscar/weex,xiayun200825/weex,KalicyZhou/incubator-weex,Neeeo/incubator-weex,dianwodaMobile/DWeex,weexteam/incubator-weex,LeeJay0226/weex,cxfeng1/weex,MrRaindrop/incubator-weex,zhangquan/weex,MrRaindrop/incubator-weex,lvscar/weex,acton393/incubator-weex,leoward/incubator-weex,houfeng0923/weex,leoward/incubator-weex,houfeng0923/weex,Neeeo/incubator-weex,namedlock/weex,xiayun200825/weex,acton393/incubator-weex,leoward/incubator-weex,KalicyZhou/incubator-weex,leoward/incubator-weex,Hanks10100/incubator-weex,misakuo/incubator-weex,misakuo/incubator-weex,acton393/incubator-weex,xiayun200825/weex,namedlock/weex,houfeng0923/weex,acton393/incubator-weex,bigconvience/weex,houfeng0923/weex,kfeagle/weex,zzyhappyzzy/weex,acton393/incubator-weex,boboning/weex,Hanks10100/incubator-weex,HomHomLin/weex,HomHomLin/weex,Neeeo/incubator-weex,misakuo/incubator-weex,KalicyZhou/incubator-weex,cxfeng1/incubator-weex,leoward/incubator-weex,yuguitao/incubator-weex,erha19/incubator-weex,cxfeng1/incubator-weex,Hanks10100/weex,namedlock/weex,HomHomLin/weex,boboning/weex,alibaba/weex,cxfeng1/weex,MrRaindrop/incubator-weex,acton393/incubator-weex,Hanks10100/weex,zhangquan/weex,LeeJay0226/weex,weexteam/incubator-weex,weexteam/incubator-weex,MrRaindrop/weex,LeeJay0226/weex,LeeJay0226/weex,misakuo/incubator-weex,alibaba/weex,yuguitao/incubator-weex,acton393/weex,Tancy/weex,boboning/weex,alibaba/weex,miomin/incubator-weex,Neeeo/incubator-weex,kfeagle/weex,cxfeng1/incubator-weex,KalicyZhou/incubator-weex,cxfeng1/incubator-weex,Hanks10100/incubator-weex,weexteam/incubator-weex,miomin/incubator-weex,miomin/incubator-weex,MrRaindrop/incubator-weex,acton393/weex,miomin/incubator-weex,Hanks10100/incubator-weex,yuguitao/incubator-weex,KalicyZhou/incubator-weex,miomin/incubator-weex,Hanks10100/weex,acton393/weex,weexteam/incubator-weex,Hanks10100/incubator-weex,lvscar/weex,zhangquan/weex,cxfeng1/incubator-weex,MrRaindrop/weex,kfeagle/weex,lzyzsd/weex,houfeng0923/weex,Tancy/weex,miomin/incubator-weex,misakuo/incubator-weex,cxfeng1/weex,zzyhappyzzy/weex,LeeJay0226/weex,boboning/weex,dianwodaMobile/DWeex,LeeJay0226/weex,dianwodaMobile/DWeex,kfeagle/weex,erha19/incubator-weex,cxfeng1/weex,bigconvience/weex,alibaba/weex,erha19/incubator-weex,lvscar/weex,misakuo/incubator-weex,acton393/weex | /**
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
package com.taobao.weex.dom;
import android.graphics.Canvas;
import android.graphics.Typeface;
import android.text.DynamicLayout;
import android.text.Editable;
import android.text.Layout;
import android.text.Spannable;
import android.text.SpannableStringBuilder;
import android.text.Spanned;
import android.text.TextPaint;
import android.text.TextUtils;
import android.text.style.AbsoluteSizeSpan;
import android.text.style.AlignmentSpan;
import android.text.style.ForegroundColorSpan;
import android.text.style.StrikethroughSpan;
import android.text.style.UnderlineSpan;
import com.taobao.weex.WXEnvironment;
import com.taobao.weex.common.WXDomPropConstant;
import com.taobao.weex.dom.flex.CSSConstants;
import com.taobao.weex.dom.flex.CSSNode;
import com.taobao.weex.dom.flex.FloatUtil;
import com.taobao.weex.dom.flex.MeasureOutput;
import com.taobao.weex.ui.component.WXText;
import com.taobao.weex.ui.component.WXTextDecoration;
import com.taobao.weex.utils.WXLogUtils;
import com.taobao.weex.utils.WXResourceUtils;
import java.util.Collections;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.concurrent.atomic.AtomicReference;
/**
* Class for calculating a given text's height and width. The calculating of width and height of
* text is done by {@link Layout}.
*/
public class WXTextDomObject extends WXDomObject {
/**
* Command object for setSpan
*/
private static class SetSpanOperation {
protected int start, end;
protected Object what;
SetSpanOperation(int start, int end, Object what) {
this.start = start;
this.end = end;
this.what = what;
}
public void execute(SpannableStringBuilder sb) {
sb.setSpan(what, start, end, Spannable.SPAN_INCLUSIVE_EXCLUSIVE);
}
}
/**
* Object for calculating text's width and height. This class is an anonymous class of
* implementing {@link com.taobao.weex.dom.flex.CSSNode.MeasureFunction}
*/
private static final CSSNode.MeasureFunction TEXT_MEASURE_FUNCTION = new CSSNode.MeasureFunction() {
@Override
public void measure(CSSNode node, float width, MeasureOutput measureOutput) {
WXTextDomObject textDomObject = (WXTextDomObject) node;
if (CSSConstants.isUndefined(width)) {
width = node.cssstyle.maxWidth;
}
textDomObject.updateLayout(width);
textDomObject.hasBeenMeasured = true;
textDomObject.previousWidth = width;
measureOutput.height = textDomObject.layout.getHeight();
measureOutput.width = textDomObject.layout.getWidth();
}
};
public static final int UNSET = -1;
private static final TextPaint TEXT_PAINT = new TextPaint();
private static final Canvas DUMMY_CANVAS = new Canvas();
private static final String ELLIPSIS = "\u2026";
private boolean mIsColorSet = false;
private boolean hasBeenMeasured = false;
private int mColor;
/**
* mFontStyle can be {@link Typeface#NORMAL} or {@link Typeface#ITALIC}.
*/
private int mFontStyle = UNSET;
/**
* mFontWeight can be {@link Typeface#NORMAL} or {@link Typeface#BOLD}.
*/
private int mFontWeight = UNSET;
private int mNumberOfLines = UNSET;
private int mFontSize = UNSET;
private float previousWidth = Float.NaN;
private String mFontFamily = null;
private String mText = null;
private TextUtils.TruncateAt textOverflow;
private Layout.Alignment mAlignment;
private WXTextDecoration mTextDecoration = WXTextDecoration.NONE;
private SpannableStringBuilder spannableStringBuilder = new SpannableStringBuilder();
private Layout layout;
private AtomicReference<Layout> atomicReference=new AtomicReference<>();
static {
TEXT_PAINT.setFlags(TextPaint.ANTI_ALIAS_FLAG);
}
/**
* Create an instance of current class, and set {@link #TEXT_MEASURE_FUNCTION} as the
* measureFunction
* @see CSSNode#setMeasureFunction(MeasureFunction)
*/
public WXTextDomObject() {
super();
setMeasureFunction(TEXT_MEASURE_FUNCTION);
}
/**
* Prepare the text {@link Spanned} for calculating text's size. This is done by setting
* various text span to the text.
* @see android.text.style.CharacterStyle
*/
@Override
public void layoutBefore() {
hasBeenMeasured = false;
updateStyleAndText();
updateSpannableStringBuilder(mText);
super.dirty();
super.layoutBefore();
}
@Override
public void layoutAfter() {
if (!hasBeenMeasured) {
updateStyleAndText();
updateSpannableStringBuilder(mText);
updateLayout(getLayoutWidth());
previousWidth = getLayoutWidth();
}
hasBeenMeasured =false;
if(layout!=null&&!layout.equals(atomicReference.get())) {
//TODO Warm up, a profile should be used to see the improvement.
warmUpTextLayoutCache();
}
swap();
super.layoutAfter();
}
@Override
public Layout getExtra() {
return atomicReference.get();
}
@Override
public void updateAttr(Map<String, Object> attrs) {
swap();
super.updateAttr(attrs);
if (attrs.containsKey(WXDomPropConstant.WX_ATTR_VALUE)) {
mText = WXAttr.getValue(attrs);
}
}
@Override
public void updateStyle(Map<String, Object> styles) {
swap();
super.updateStyle(styles);
updateStyleImp(styles);
}
@Override
public WXTextDomObject clone() {
WXTextDomObject dom = null;
try {
dom = new WXTextDomObject();
if (this.cssstyle != null) {
dom.cssstyle.copy(this.cssstyle);
}
dom.ref = ref;
dom.type = type;
dom.style = style;
dom.attr = attr;
dom.event = event == null ? null : event.clone();
dom.hasBeenMeasured = hasBeenMeasured;
dom.atomicReference=atomicReference;
if (this.csslayout != null) {
dom.csslayout.copy(this.csslayout);
}
} catch (Exception e) {
if (WXEnvironment.isApkDebugable()) {
WXLogUtils.e("WXTextDomObject clone error: " + WXLogUtils.getStackTrace(e));
}
}
if (dom != null) {
dom.spannableStringBuilder = spannableStringBuilder;
}
return dom;
}
/**
* Update style and text.
*/
private void updateStyleAndText() {
updateStyleImp(style);
if (attr != null) {
mText = WXAttr.getValue(attr);
}
}
/**
* Record the property according to the given style
* @param style the give style.
*/
private void updateStyleImp(Map<String, Object> style) {
if (style != null) {
if (style.containsKey(WXDomPropConstant.WX_LINES)) {
int lines = WXStyle.getLines(style);
if (lines > 0) {
mNumberOfLines = lines;
}
}
if (style.containsKey(WXDomPropConstant.WX_FONTSIZE)) {
mFontSize = WXStyle.getFontSize(style);
}
if (style.containsKey(WXDomPropConstant.WX_FONTWEIGHT)) {
mFontWeight = WXStyle.getFontWeight(style);
}
if (style.containsKey(WXDomPropConstant.WX_FONTSTYLE)) {
mFontStyle = WXStyle.getFontStyle(style);
}
if (style.containsKey(WXDomPropConstant.WX_COLOR)) {
mColor = WXResourceUtils.getColor(WXStyle.getTextColor(style));
mIsColorSet = mColor != Integer.MIN_VALUE;
}
if (style.containsKey(WXDomPropConstant.WX_TEXTDECORATION)) {
mTextDecoration = WXStyle.getTextDecoration(style);
}
if (style.containsKey(WXDomPropConstant.WX_FONTFAMILY)) {
mFontFamily = WXStyle.getFontFamily(style);
}
mAlignment = WXStyle.getTextAlignment(style);
textOverflow = WXStyle.getTextOverflow(style);
}
}
/**
* Update layout according to {@link #mText} and span
* @param width the specified width.
*/
private void updateLayout(float width) {
int textWidth = (int) Math.ceil(CSSConstants.isUndefined(width) ?
Layout.getDesiredWidth(spannableStringBuilder, TEXT_PAINT)
: width);
if (layout == null||!FloatUtil.floatsEqual(previousWidth, width)) {
layout = new DynamicLayout(spannableStringBuilder, TEXT_PAINT, textWidth, Layout.Alignment
.ALIGN_NORMAL, 1, 0, false);
}
if (mNumberOfLines != UNSET && mNumberOfLines > 0 && mNumberOfLines < layout.getLineCount()) {
int lastLineStart, lastLineEnd;
CharSequence reminder, main;
lastLineStart = layout.getLineStart(mNumberOfLines - 1);
lastLineEnd = layout.getLineEnd(mNumberOfLines - 1);
if (lastLineStart < lastLineEnd) {
StringBuilder stringBuilder = new StringBuilder();
main = mText.subSequence(0, lastLineStart);
reminder = mText.subSequence(lastLineStart, textOverflow == null ? lastLineEnd : lastLineEnd - 1);
stringBuilder.setLength(0);
stringBuilder.append(main);
stringBuilder.append(reminder);
if (textOverflow != null) {
stringBuilder.append(ELLIPSIS);
}
updateSpannableStringBuilder(stringBuilder.toString());
updateLayout(width);
}
}
}
/**
* Update {@link #spannableStringBuilder} according to the give charSequence and {@link #style}
* @param text the give raw text.
* @return an editable contains text and spans
*/
private Editable updateSpannableStringBuilder(String text) {
spannableStringBuilder.clear();
if (text != null) {
spannableStringBuilder.append(text);
}
List<SetSpanOperation> ops = createSetSpanOperation(spannableStringBuilder.length());
if (mFontSize == UNSET) {
spannableStringBuilder.setSpan(
new AbsoluteSizeSpan(WXText.sDEFAULT_SIZE), 0, spannableStringBuilder
.length(), Spannable.SPAN_INCLUSIVE_EXCLUSIVE);
}
Collections.reverse(ops);
for (SetSpanOperation op : ops) {
op.execute(spannableStringBuilder);
}
return spannableStringBuilder;
}
/**
* Create a task list which contains {@link SetSpanOperation}. The task list will be executed
* in other method.
* @param end the end character of the text.
* @return a task list which contains {@link SetSpanOperation}.
*/
private List<SetSpanOperation> createSetSpanOperation(int end) {
List<SetSpanOperation> ops = new LinkedList<>();
int start = 0;
if (end >= start) {
if (mTextDecoration == WXTextDecoration.UNDERLINE) {
ops.add(new SetSpanOperation(start, end,
new UnderlineSpan()));
}
if (mTextDecoration == WXTextDecoration.LINETHROUGH) {
ops.add(new SetSpanOperation(start, end,
new StrikethroughSpan()));
}
if (mIsColorSet) {
ops.add(new SetSpanOperation(start, end,
new ForegroundColorSpan(mColor)));
}
if (mFontSize != UNSET) {
ops.add(new SetSpanOperation(start, end, new AbsoluteSizeSpan(mFontSize)));
}
if (mFontStyle != UNSET
|| mFontWeight != UNSET
|| mFontFamily != null) {
ops.add(new SetSpanOperation(start, end,
new WXCustomStyleSpan(mFontStyle, mFontWeight, mFontFamily)));
}
ops.add(new SetSpanOperation(start, end, new AlignmentSpan.Standard(mAlignment)));
}
return ops;
}
private void swap(){
if (layout != null) {
spannableStringBuilder = new SpannableStringBuilder(spannableStringBuilder);
atomicReference.set(layout);
layout = null;
}
}
/**
* As warming up TextLayoutCache done in the DOM thread may manipulate UI operation,
there may be some exception, in which case the exception is ignored. After all,
this is just a warm up operation.
* @return false for warm up failure, otherwise returns true.
*/
private boolean warmUpTextLayoutCache() {
boolean result;
try {
layout.draw(DUMMY_CANVAS);
result = true;
} catch (Exception e) {
WXLogUtils.e(TAG, WXLogUtils.getStackTrace(e));
result = false;
}
return result;
}
}
| android/sdk/src/main/java/com/taobao/weex/dom/WXTextDomObject.java | /**
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
package com.taobao.weex.dom;
import android.graphics.Canvas;
import android.graphics.Typeface;
import android.text.DynamicLayout;
import android.text.Editable;
import android.text.Layout;
import android.text.Spannable;
import android.text.SpannableStringBuilder;
import android.text.Spanned;
import android.text.TextPaint;
import android.text.TextUtils;
import android.text.style.AbsoluteSizeSpan;
import android.text.style.AlignmentSpan;
import android.text.style.ForegroundColorSpan;
import android.text.style.StrikethroughSpan;
import android.text.style.UnderlineSpan;
import com.taobao.weex.WXEnvironment;
import com.taobao.weex.common.WXDomPropConstant;
import com.taobao.weex.dom.flex.CSSConstants;
import com.taobao.weex.dom.flex.CSSNode;
import com.taobao.weex.dom.flex.FloatUtil;
import com.taobao.weex.dom.flex.MeasureOutput;
import com.taobao.weex.ui.component.WXText;
import com.taobao.weex.ui.component.WXTextDecoration;
import com.taobao.weex.utils.WXLogUtils;
import com.taobao.weex.utils.WXResourceUtils;
import java.util.Collections;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.concurrent.atomic.AtomicReference;
/**
* Class for calculating a given text's height and width. The calculating of width and height of
* text is done by {@link Layout}.
*/
public class WXTextDomObject extends WXDomObject {
/**
* Command object for setSpan
*/
private static class SetSpanOperation {
protected int start, end;
protected Object what;
SetSpanOperation(int start, int end, Object what) {
this.start = start;
this.end = end;
this.what = what;
}
public void execute(SpannableStringBuilder sb) {
sb.setSpan(what, start, end, Spannable.SPAN_INCLUSIVE_EXCLUSIVE);
}
}
/**
* Object for calculating text's width and height. This class is an anonymous class of
* implementing {@link com.taobao.weex.dom.flex.CSSNode.MeasureFunction}
*/
private static final CSSNode.MeasureFunction TEXT_MEASURE_FUNCTION = new CSSNode.MeasureFunction() {
@Override
public void measure(CSSNode node, float width, MeasureOutput measureOutput) {
WXTextDomObject textDomObject = (WXTextDomObject) node;
if (textDomObject.spannableStringBuilder.length() == 0) {
return;
}
if (CSSConstants.isUndefined(width)) {
width = node.cssstyle.maxWidth;
}
textDomObject.updateLayout(width);
textDomObject.hasBeenMeasured = true;
textDomObject.previousWidth = width;
measureOutput.height = textDomObject.layout.getHeight();
measureOutput.width = textDomObject.layout.getWidth();
}
};
public static final int UNSET = -1;
private static final TextPaint TEXT_PAINT = new TextPaint();
private static final Canvas DUMMY_CANVAS = new Canvas();
private static final String ELLIPSIS = "\u2026";
private boolean mIsColorSet = false;
private boolean hasBeenMeasured = false;
private int mColor;
/**
* mFontStyle can be {@link Typeface#NORMAL} or {@link Typeface#ITALIC}.
*/
private int mFontStyle = UNSET;
/**
* mFontWeight can be {@link Typeface#NORMAL} or {@link Typeface#BOLD}.
*/
private int mFontWeight = UNSET;
private int mNumberOfLines = UNSET;
private int mFontSize = UNSET;
private float previousWidth = Float.NaN;
private String mFontFamily = null;
private String mText = null;
private TextUtils.TruncateAt textOverflow;
private Layout.Alignment mAlignment;
private WXTextDecoration mTextDecoration = WXTextDecoration.NONE;
private SpannableStringBuilder spannableStringBuilder = new SpannableStringBuilder();
private Layout layout;
private AtomicReference<Layout> atomicReference=new AtomicReference<>();
static {
TEXT_PAINT.setFlags(TextPaint.ANTI_ALIAS_FLAG);
}
/**
* Create an instance of current class, and set {@link #TEXT_MEASURE_FUNCTION} as the
* measureFunction
* @see CSSNode#setMeasureFunction(MeasureFunction)
*/
public WXTextDomObject() {
super();
setMeasureFunction(TEXT_MEASURE_FUNCTION);
}
/**
* Prepare the text {@link Spanned} for calculating text's size. This is done by setting
* various text span to the text.
* @see android.text.style.CharacterStyle
*/
@Override
public void layoutBefore() {
hasBeenMeasured = false;
updateStyleAndText();
updateSpannableStringBuilder(mText);
super.dirty();
super.layoutBefore();
}
@Override
public void layoutAfter() {
if (!hasBeenMeasured) {
updateStyleAndText();
updateSpannableStringBuilder(mText);
updateLayout(getLayoutWidth());
previousWidth = getLayoutWidth();
}
hasBeenMeasured =false;
if(layout!=null&&!layout.equals(atomicReference.get())) {
//TODO Warm up, a profile should be used to see the improvement.
warmUpTextLayoutCache();
}
swap();
super.layoutAfter();
}
@Override
public Layout getExtra() {
return atomicReference.get();
}
@Override
public void updateAttr(Map<String, Object> attrs) {
swap();
super.updateAttr(attrs);
if (attrs.containsKey(WXDomPropConstant.WX_ATTR_VALUE)) {
mText = WXAttr.getValue(attrs);
}
}
@Override
public void updateStyle(Map<String, Object> styles) {
swap();
super.updateStyle(styles);
updateStyleImp(styles);
}
@Override
public WXTextDomObject clone() {
WXTextDomObject dom = null;
try {
dom = new WXTextDomObject();
if (this.cssstyle != null) {
dom.cssstyle.copy(this.cssstyle);
}
dom.ref = ref;
dom.type = type;
dom.style = style;
dom.attr = attr;
dom.event = event == null ? null : event.clone();
dom.hasBeenMeasured = hasBeenMeasured;
dom.atomicReference=atomicReference;
if (this.csslayout != null) {
dom.csslayout.copy(this.csslayout);
}
} catch (Exception e) {
if (WXEnvironment.isApkDebugable()) {
WXLogUtils.e("WXTextDomObject clone error: " + WXLogUtils.getStackTrace(e));
}
}
if (dom != null) {
dom.spannableStringBuilder = spannableStringBuilder;
}
return dom;
}
/**
* Update style and text.
*/
private void updateStyleAndText() {
updateStyleImp(style);
if (attr != null) {
mText = WXAttr.getValue(attr);
}
}
/**
* Record the property according to the given style
* @param style the give style.
*/
private void updateStyleImp(Map<String, Object> style) {
if (style != null) {
if (style.containsKey(WXDomPropConstant.WX_LINES)) {
int lines = WXStyle.getLines(style);
if (lines > 0) {
mNumberOfLines = lines;
}
}
if (style.containsKey(WXDomPropConstant.WX_FONTSIZE)) {
mFontSize = WXStyle.getFontSize(style);
}
if (style.containsKey(WXDomPropConstant.WX_FONTWEIGHT)) {
mFontWeight = WXStyle.getFontWeight(style);
}
if (style.containsKey(WXDomPropConstant.WX_FONTSTYLE)) {
mFontStyle = WXStyle.getFontStyle(style);
}
if (style.containsKey(WXDomPropConstant.WX_COLOR)) {
mColor = WXResourceUtils.getColor(WXStyle.getTextColor(style));
mIsColorSet = mColor != Integer.MIN_VALUE;
}
if (style.containsKey(WXDomPropConstant.WX_TEXTDECORATION)) {
mTextDecoration = WXStyle.getTextDecoration(style);
}
if (style.containsKey(WXDomPropConstant.WX_FONTFAMILY)) {
mFontFamily = WXStyle.getFontFamily(style);
}
mAlignment = WXStyle.getTextAlignment(style);
textOverflow = WXStyle.getTextOverflow(style);
}
}
/**
* Update layout according to {@link #mText} and span
* @param width the specified width.
*/
private void updateLayout(float width) {
int textWidth = (int) Math.ceil(CSSConstants.isUndefined(width) ?
Layout.getDesiredWidth(spannableStringBuilder, TEXT_PAINT)
: width);
if (layout == null||!FloatUtil.floatsEqual(previousWidth, width)) {
layout = new DynamicLayout(spannableStringBuilder, TEXT_PAINT, textWidth, Layout.Alignment
.ALIGN_NORMAL, 1, 0, false);
}
if (mNumberOfLines != UNSET && mNumberOfLines > 0 && mNumberOfLines < layout.getLineCount()) {
int lastLineStart, lastLineEnd;
CharSequence reminder, main;
lastLineStart = layout.getLineStart(mNumberOfLines - 1);
lastLineEnd = layout.getLineEnd(mNumberOfLines - 1);
if (lastLineStart < lastLineEnd) {
StringBuilder stringBuilder = new StringBuilder();
main = mText.subSequence(0, lastLineStart);
reminder = mText.subSequence(lastLineStart, textOverflow == null ? lastLineEnd : lastLineEnd - 1);
stringBuilder.setLength(0);
stringBuilder.append(main);
stringBuilder.append(reminder);
if (textOverflow != null) {
stringBuilder.append(ELLIPSIS);
}
updateSpannableStringBuilder(stringBuilder.toString());
updateLayout(width);
}
}
}
/**
* Update {@link #spannableStringBuilder} according to the give charSequence and {@link #style}
* @param text the give raw text.
* @return an editable contains text and spans
*/
private Editable updateSpannableStringBuilder(String text) {
spannableStringBuilder.clear();
if (text != null) {
spannableStringBuilder.append(text);
}
List<SetSpanOperation> ops = createSetSpanOperation(spannableStringBuilder.length());
if (mFontSize == UNSET) {
spannableStringBuilder.setSpan(
new AbsoluteSizeSpan(WXText.sDEFAULT_SIZE), 0, spannableStringBuilder
.length(), Spannable.SPAN_INCLUSIVE_EXCLUSIVE);
}
Collections.reverse(ops);
for (SetSpanOperation op : ops) {
op.execute(spannableStringBuilder);
}
return spannableStringBuilder;
}
/**
* Create a task list which contains {@link SetSpanOperation}. The task list will be executed
* in other method.
* @param end the end character of the text.
* @return a task list which contains {@link SetSpanOperation}.
*/
private List<SetSpanOperation> createSetSpanOperation(int end) {
List<SetSpanOperation> ops = new LinkedList<>();
int start = 0;
if (end >= start) {
if (mTextDecoration == WXTextDecoration.UNDERLINE) {
ops.add(new SetSpanOperation(start, end,
new UnderlineSpan()));
}
if (mTextDecoration == WXTextDecoration.LINETHROUGH) {
ops.add(new SetSpanOperation(start, end,
new StrikethroughSpan()));
}
if (mIsColorSet) {
ops.add(new SetSpanOperation(start, end,
new ForegroundColorSpan(mColor)));
}
if (mFontSize != UNSET) {
ops.add(new SetSpanOperation(start, end, new AbsoluteSizeSpan(mFontSize)));
}
if (mFontStyle != UNSET
|| mFontWeight != UNSET
|| mFontFamily != null) {
ops.add(new SetSpanOperation(start, end,
new WXCustomStyleSpan(mFontStyle, mFontWeight, mFontFamily)));
}
ops.add(new SetSpanOperation(start, end, new AlignmentSpan.Standard(mAlignment)));
}
return ops;
}
private void swap(){
if (layout != null) {
spannableStringBuilder = new SpannableStringBuilder(spannableStringBuilder);
atomicReference.set(layout);
layout = null;
}
}
/**
* As warming up TextLayoutCache done in the DOM thread may manipulate UI operation,
there may be some exception, in which case the exception is ignored. After all,
this is just a warm up operation.
* @return false for warm up failure, otherwise returns true.
*/
private boolean warmUpTextLayoutCache() {
boolean result;
try {
layout.draw(DUMMY_CANVAS);
result = true;
} catch (Exception e) {
WXLogUtils.e(TAG, WXLogUtils.getStackTrace(e));
result = false;
}
return result;
}
}
| * [android] fix text layout unexpect quit when text is zero-length content
| android/sdk/src/main/java/com/taobao/weex/dom/WXTextDomObject.java | * [android] fix text layout unexpect quit when text is zero-length content | <ide><path>ndroid/sdk/src/main/java/com/taobao/weex/dom/WXTextDomObject.java
<ide> @Override
<ide> public void measure(CSSNode node, float width, MeasureOutput measureOutput) {
<ide> WXTextDomObject textDomObject = (WXTextDomObject) node;
<del> if (textDomObject.spannableStringBuilder.length() == 0) {
<del> return;
<del> }
<ide> if (CSSConstants.isUndefined(width)) {
<ide> width = node.cssstyle.maxWidth;
<ide> } |
|
Java | lgpl-2.1 | 8574934638fd6c8e52903219e295fdb85267b451 | 0 | markmc/rhevm-api,markmc/rhevm-api,markmc/rhevm-api | /*
* Copyright © 2010 Red Hat, Inc.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This software 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this software; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
package com.redhat.rhevm.api.powershell.util;
import java.io.IOException;
import java.io.StringReader;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;
import com.redhat.rhevm.api.model.Version;
import com.redhat.rhevm.api.powershell.enums.EnumMapper;
public class PowerShellParser {
private static final Log log = LogFactory.getLog(PowerShellCmd.class);
public static final String DATE_TYPE = "System.DateTime";
public static final String STRING_TYPE = "System.String";
private DocumentBuilder documentBuilder;
private EnumMapper enumMapper;
public void setDocumentBuilder(DocumentBuilder documentBuilder) {
this.documentBuilder = documentBuilder;
}
public void setEnumMapper(EnumMapper enumMapper) {
this.enumMapper = enumMapper;
}
/* REVIST: powershell seems to be wrapping long lines
*/
private String stripNewlines(String contents) {
return contents.replaceAll("\r", "").replaceAll("\n", "");
}
public synchronized List<Entity> parse(String contents) {
log.info("Parsing powershell output '" + contents + "'");
InputSource source = new InputSource(new StringReader(stripNewlines(contents)));
Node doc;
try {
doc = documentBuilder.parse(source);
} catch (SAXException saxe) {
throw new PowerShellException("XML parsing error", saxe);
} catch (IOException ioe) {
throw new PowerShellException("I/O error parsing XML", ioe);
}
return parseDoc(doc);
}
private List<Entity> parseDoc(Node doc) {
NodeList children = doc.getChildNodes();
for (int i = 0; i < children.getLength(); i++) {
Node child = children.item(i);
if (child.getNodeType() == Node.ELEMENT_NODE &&
child.getNodeName().equals("Objects")) {
return parseObjects(child);
}
}
return new ArrayList<Entity>();
}
private List<Entity> parseObjects(Node objects) {
List<Entity> ret = new ArrayList<Entity>();
NodeList children = objects.getChildNodes();
for (int i = 0; i < children.getLength(); i++) {
Node child = children.item(i);
if (child.getNodeType() == Node.ELEMENT_NODE &&
child.getNodeName().equals("Object")) {
Entity entity = parseObject(child);
if (entity.getType() != null) {
ret.add(entity);
}
}
}
return ret;
}
private Entity parseObject(Node object) {
Entity ret = new Entity();
NamedNodeMap attrs = object.getAttributes();
ret.setType(getAttr(attrs, "Type"));
ret.setValue(getText(object));
for (Property prop : getProperties(object, enumMapper)) {
ret.addProperty(prop);
}
return ret;
}
private static String getAttr(NamedNodeMap attrs, String name) {
Node type = attrs.getNamedItem(name);
if (type != null) {
return type.getNodeValue();
} else {
return null;
}
}
private static String getText(Node node) {
StringBuffer buf = new StringBuffer();
NodeList children = node.getChildNodes();
for (int i = 0; i < children.getLength(); i++) {
Node child = children.item(i);
if (child.getNodeType() == Node.TEXT_NODE) {
buf.append(child.getNodeValue());
}
}
String ret = buf.toString().trim();
return !ret.isEmpty() ? ret : null;
}
private static List<Property> getProperties(Node node, EnumMapper enumMapper) {
List<Property> ret = new ArrayList<Property>();
NodeList children = node.getChildNodes();
for (int i = 0; i < children.getLength(); i++) {
Node child = children.item(i);
if (child.getNodeType() == Node.ELEMENT_NODE &&
child.getNodeName().equals("Property")) {
ret.add(new Property(child, enumMapper));
}
}
return ret;
}
private static Property getProperty(Node node, EnumMapper enumMapper) {
return getProperties(node, enumMapper).get(0);
}
public static class Entity {
private String type;
private String value;
private Map<String, Property> properties = new HashMap<String, Property>();
public void setType(String type) {
this.type = type;
}
public String getType() {
return type;
}
public void setValue(String value) {
this.value = value;
}
public String getValue() {
return value;
}
public Map<String, Property> getProperties() {
return properties;
}
public void addProperty(Property property) {
properties.put(property.getName(), property);
}
public <T> T get(String name, Class<T> type) {
return properties.get(name).getValue(type);
}
public Object get(String name, Class<?> current, Class<?> legacy) {
return properties.get(name).getValue(current, legacy);
}
public String get(String name) {
return properties.get(name).getValue(String.class);
}
public boolean isSet(String name) {
return properties.get(name) != null && properties.get(name).isValueSet();
}
}
public static class Property {
private EnumMapper enumMapper;
private String name;
private String type;
private Object value;
public Property(Node prop, EnumMapper enumMapper) {
this.enumMapper = enumMapper;
NamedNodeMap attrs = prop.getAttributes();
this.name = getAttr(attrs, "Name");
if (this.name != null) {
this.name = this.name.toLowerCase();
}
this.type = getAttr(attrs, "Type");
this.value = parseValue(prop);
}
public void setName(String name) {
this.type = name;
}
public String getName() {
return name;
}
public void setType(String type) {
this.type = type;
}
public String getType() {
return type;
}
public <T> void setValue(Class<T> type, T value) {
this.value = type.cast(value);
}
public <T> T getValue(Class<T> type) {
return type.cast(value);
}
public Object getValue(Class<?> current, Class<?> legacy) {
if (current.isAssignableFrom(value.getClass())) {
return current.cast(value);
} else if (legacy.isAssignableFrom(value.getClass())) {
return legacy.cast(value);
} else {
return null;
}
}
public boolean isValueSet() {
return value != null;
}
private Object parseValue(Node node) {
String text = getText(node);
if (type.endsWith("[]")) {
List<Object> ret = new ArrayList<Object>();
for (Property prop : getProperties(node, enumMapper)) {
ret.add(prop.getValue(Object.class));
}
return ret;
} else if (type.startsWith("System.Nullable") && text == null) {
return null;
} else if (type.contains("System.Boolean")) {
return text.equals("True");
} else if (type.contains("System.Int32") || type.contains("System.Int16")) {
return Integer.parseInt(text);
} else if (type.contains("System.Int64")) {
return Long.parseLong(text);
} else if (type.contains("System.Double")) {
return Double.parseDouble(text);
} else if (type.contains("System.Decimal")) {
return new BigDecimal(text);
} else if (enumMapper.isEnum(type)) {
return enumMapper.parseEnum(type, getProperty(node, enumMapper).getValue(Integer.class));
} else if (type.contains("RhevmCmd.CLICompatibilityVersion")) {
return parseVersion(node, enumMapper);
} else if (type.contains("RhevmCmd.CLIHostPowerManagement")) {
return new PowerManagement(node, enumMapper);
} else if (type.startsWith("System.Collections.Generic.List")) {
// REVIST: ignoring for now
return null;
} else if (type.contains("System.String") ||
type.contains("System.Guid") ||
type.contains("System.DateTime") ||
type.contains("System.TimeSpan")) {
return text;
} else {
assert false : type;
return null;
}
}
private static Version parseVersion(Node node, EnumMapper enumMapper) {
Version version = new Version();
for (Property prop : getProperties(node, enumMapper)) {
if (prop.getName().equals("major")) {
version.setMajor(prop.getValue(Integer.class));
}
if (prop.getName().equals("minor")) {
version.setMinor(prop.getValue(Integer.class));
}
}
return version;
}
}
public static class PowerManagement {
private boolean enabled;
private String address;
private String type;
private String username;
private String password;
private int port;
private int slot;
private boolean secure;
private String options;
public PowerManagement(Node node, EnumMapper enumMapper) {
for (Property prop : getProperties(node, enumMapper)) {
if (prop.getName().equals("enabled")) {
enabled = prop.getValue(Boolean.class);
}
if (prop.getName().equals("address")) {
address = prop.getValue(String.class);
}
if (prop.getName().equals("type")) {
type = prop.getValue(String.class);
}
if (prop.getName().equals("username")) {
username = prop.getValue(String.class);
}
if (prop.getName().equals("password")) {
password = prop.getValue(String.class);
}
if (prop.getName().equals("port") && prop.isValueSet()) {
port = prop.getValue(Integer.class);
}
if (prop.getName().equals("slot") && prop.isValueSet()) {
slot = prop.getValue(Integer.class);
}
if (prop.getName().equals("secure") && prop.isValueSet()) {
secure = prop.getValue(Boolean.class);
}
if (prop.getName().equals("options")) {
options = prop.getValue(String.class);
}
}
}
public boolean getEnabled() {
return enabled;
}
public void setEnabled(boolean enabled) {
this.enabled = enabled;
}
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public int getPort() {
return port;
}
public void setPort(int port) {
this.port = port;
}
public int getSlot() {
return slot;
}
public void setSlot(int slot) {
this.slot = slot;
}
public boolean getSecure() {
return secure;
}
public void setSecure(boolean secure) {
this.secure = secure;
}
public String getOptions() {
return options;
}
public void setOptions(String options) {
this.options = options;
}
}
/* Only intended for unit tests */
public static PowerShellParser newInstance() throws Exception {
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
DocumentBuilder documentBuilder = factory.newDocumentBuilder();
EnumMapper enumMapper = new EnumMapper();
PowerShellParser p = new PowerShellParser();
p.setDocumentBuilder(documentBuilder);
p.setEnumMapper(enumMapper);
return p;
}
}
| powershell/jaxrs/src/main/java/com/redhat/rhevm/api/powershell/util/PowerShellParser.java | /*
* Copyright © 2010 Red Hat, Inc.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This software 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this software; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
package com.redhat.rhevm.api.powershell.util;
import java.io.IOException;
import java.io.StringReader;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;
import com.redhat.rhevm.api.model.Version;
import com.redhat.rhevm.api.powershell.enums.EnumMapper;
public class PowerShellParser {
private static final Log log = LogFactory.getLog(PowerShellCmd.class);
public static final String DATE_TYPE = "System.DateTime";
public static final String STRING_TYPE = "System.String";
private DocumentBuilder documentBuilder;
private EnumMapper enumMapper;
public void setDocumentBuilder(DocumentBuilder documentBuilder) {
this.documentBuilder = documentBuilder;
}
public void setEnumMapper(EnumMapper enumMapper) {
this.enumMapper = enumMapper;
}
/* REVIST: powershell seems to be wrapping long lines
*/
private String stripNewlines(String contents) {
return contents.replaceAll("\r", "").replaceAll("\n", "");
}
public synchronized List<Entity> parse(String contents) {
log.info("Parsing powershell output '" + contents + "'");
InputSource source = new InputSource(new StringReader(stripNewlines(contents)));
Node doc;
try {
doc = documentBuilder.parse(source);
} catch (SAXException saxe) {
throw new PowerShellException("XML parsing error", saxe);
} catch (IOException ioe) {
throw new PowerShellException("I/O error parsing XML", ioe);
}
return parseDoc(doc);
}
private List<Entity> parseDoc(Node doc) {
NodeList children = doc.getChildNodes();
for (int i = 0; i < children.getLength(); i++) {
Node child = children.item(i);
if (child.getNodeType() == Node.ELEMENT_NODE &&
child.getNodeName().equals("Objects")) {
return parseObjects(child);
}
}
return new ArrayList<Entity>();
}
private List<Entity> parseObjects(Node objects) {
List<Entity> ret = new ArrayList<Entity>();
NodeList children = objects.getChildNodes();
for (int i = 0; i < children.getLength(); i++) {
Node child = children.item(i);
if (child.getNodeType() == Node.ELEMENT_NODE &&
child.getNodeName().equals("Object")) {
Entity entity = parseObject(child);
if (entity.getType() != null) {
ret.add(entity);
}
}
}
return ret;
}
private Entity parseObject(Node object) {
Entity ret = new Entity();
NamedNodeMap attrs = object.getAttributes();
ret.setType(getAttr(attrs, "Type"));
ret.setValue(getText(object));
for (Property prop : getProperties(object, enumMapper)) {
ret.addProperty(prop);
}
return ret;
}
private static String getAttr(NamedNodeMap attrs, String name) {
Node type = attrs.getNamedItem(name);
if (type != null) {
return type.getNodeValue();
} else {
return null;
}
}
private static String getText(Node node) {
StringBuffer buf = new StringBuffer();
NodeList children = node.getChildNodes();
for (int i = 0; i < children.getLength(); i++) {
Node child = children.item(i);
if (child.getNodeType() == Node.TEXT_NODE) {
buf.append(child.getNodeValue());
}
}
String ret = buf.toString().trim();
return !ret.isEmpty() ? ret : null;
}
private static List<Property> getProperties(Node node, EnumMapper enumMapper) {
List<Property> ret = new ArrayList<Property>();
NodeList children = node.getChildNodes();
for (int i = 0; i < children.getLength(); i++) {
Node child = children.item(i);
if (child.getNodeType() == Node.ELEMENT_NODE &&
child.getNodeName().equals("Property")) {
ret.add(new Property(child, enumMapper));
}
}
return ret;
}
private static Property getProperty(Node node, EnumMapper enumMapper) {
return getProperties(node, enumMapper).get(0);
}
public static class Entity {
private String type;
private String value;
private Map<String, Property> properties = new HashMap<String, Property>();
public void setType(String type) {
this.type = type;
}
public String getType() {
return type;
}
public void setValue(String value) {
this.value = value;
}
public String getValue() {
return value;
}
public Map<String, Property> getProperties() {
return properties;
}
public void addProperty(Property property) {
properties.put(property.getName(), property);
}
public <T> T get(String name, Class<T> type) {
return properties.get(name).getValue(type);
}
public Object get(String name, Class<?> current, Class<?> legacy) {
return properties.get(name).getValue(current, legacy);
}
public String get(String name) {
return properties.get(name).getValue(String.class);
}
public boolean isSet(String name) {
return properties.get(name) != null && properties.get(name).isValueSet();
}
}
public static class Property {
private EnumMapper enumMapper;
private String name;
private String type;
private Object value;
public Property(Node prop, EnumMapper enumMapper) {
this.enumMapper = enumMapper;
NamedNodeMap attrs = prop.getAttributes();
this.name = getAttr(attrs, "Name");
if (this.name != null) {
this.name = this.name.toLowerCase();
}
this.type = getAttr(attrs, "Type");
this.value = parseValue(prop);
}
public void setName(String name) {
this.type = name;
}
public String getName() {
return name;
}
public void setType(String type) {
this.type = type;
}
public String getType() {
return type;
}
public <T> void setValue(Class<T> type, T value) {
this.value = type.cast(value);
}
public <T> T getValue(Class<T> type) {
return type.cast(value);
}
public Object getValue(Class<?> current, Class<?> legacy) {
if (current.isAssignableFrom(value.getClass())) {
return current.cast(value);
} else if (legacy.isAssignableFrom(value.getClass())) {
return legacy.cast(value);
} else {
return null;
}
}
public boolean isValueSet() {
return value != null;
}
private Object parseValue(Node node) {
String text = getText(node);
if (type.endsWith("[]")) {
List<Object> ret = new ArrayList<Object>();
for (Property prop : getProperties(node, enumMapper)) {
ret.add(prop.getValue(Object.class));
}
return ret;
} else if (type.startsWith("System.Nullable") && text == null) {
return null;
} else if (type.contains("System.Boolean")) {
return text.equals("True");
} else if (type.contains("System.Int32") || type.contains("System.Int16")) {
return Integer.parseInt(text);
} else if (type.contains("System.Int64")) {
return Long.parseLong(text);
} else if (type.contains("System.Double")) {
return Double.parseDouble(text);
} else if (type.contains("System.Decimal")) {
return new BigDecimal(text);
} else if (enumMapper.isEnum(type)) {
return enumMapper.parseEnum(type, getProperty(node, enumMapper).getValue(Integer.class));
} else if (type.contains("RhevmCmd.CLICompatibilityVersion")) {
return parseVersion(node, enumMapper);
} else if (type.contains("RhevmCmd.CLIHostPowerManagement")) {
return new PowerManagement(node, enumMapper);
} else if (type.startsWith("System.Collections.Generic.List")) {
// REVIST: ignoring for now
return null;
} else if (type.contains("System.String") ||
type.contains("System.Guid") ||
type.contains("System.DateTime") ||
type.contains("System.TimeSpan")) {
return text;
} else {
assert false : type;
return null;
}
}
private static Version parseVersion(Node node, EnumMapper enumMapper) {
Version version = new Version();
for (Property prop : getProperties(node, enumMapper)) {
if (prop.getName().equals("major")) {
version.setMajor(prop.getValue(Integer.class));
}
if (prop.getName().equals("minor")) {
version.setMinor(prop.getValue(Integer.class));
}
}
return version;
}
}
public static class PowerManagement {
private boolean enabled;
private String address;
private String type;
private String username;
private String password;
private int port;
private int slot;
private boolean secure;
private String options;
public PowerManagement(Node node, EnumMapper enumMapper) {
for (Property prop : getProperties(node, enumMapper)) {
if (prop.getName().equals("enabled")) {
enabled = prop.getValue(Boolean.class);
}
if (prop.getName().equals("address")) {
address = prop.getValue(String.class);
}
if (prop.getName().equals("type")) {
type = prop.getValue(String.class);
}
if (prop.getName().equals("username")) {
username = prop.getValue(String.class);
}
if (prop.getName().equals("password")) {
password = prop.getValue(String.class);
}
if (prop.getName().equals("port") && prop.isValueSet()) {
port = prop.getValue(Integer.class);
}
if (prop.getName().equals("slot") && prop.isValueSet()) {
slot = prop.getValue(Integer.class);
}
if (prop.getName().equals("secure") && prop.isValueSet()) {
secure = prop.getValue(Boolean.class);
}
if (prop.getName().equals("options")) {
options = prop.getValue(String.class);
}
}
}
public boolean getEnabled() {
return enabled;
}
public void setEnabled(boolean enabled) {
this.enabled = enabled;
}
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public String getUsername() {
return username;
}
public void setUsername(String user) {
this.username = username;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public int getPort() {
return port;
}
public void setPort(int port) {
this.port = port;
}
public int getSlot() {
return slot;
}
public void setSlot(int slot) {
this.slot = slot;
}
public boolean getSecure() {
return secure;
}
public void setSecure(boolean secure) {
this.secure = secure;
}
public String getOptions() {
return options;
}
public void setOptions(String options) {
this.options = options;
}
}
/* Only intended for unit tests */
public static PowerShellParser newInstance() throws Exception {
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
DocumentBuilder documentBuilder = factory.newDocumentBuilder();
EnumMapper enumMapper = new EnumMapper();
PowerShellParser p = new PowerShellParser();
p.setDocumentBuilder(documentBuilder);
p.setEnumMapper(enumMapper);
return p;
}
}
| powershell: fixing PowerShellParser.PowerManagement.setUserName()
| powershell/jaxrs/src/main/java/com/redhat/rhevm/api/powershell/util/PowerShellParser.java | powershell: fixing PowerShellParser.PowerManagement.setUserName() | <ide><path>owershell/jaxrs/src/main/java/com/redhat/rhevm/api/powershell/util/PowerShellParser.java
<ide> public String getUsername() {
<ide> return username;
<ide> }
<del> public void setUsername(String user) {
<add> public void setUsername(String username) {
<ide> this.username = username;
<ide> }
<ide> |
|
Java | apache-2.0 | 4d4805a99d61365bff3c379d149561617537d4cd | 0 | btkelly/gnag,btkelly/gnag,btkelly/gnag | /**
* Copyright 2016 Bryan Kelly
*
* 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 com.btkelly.gnag.utils;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
public final class StringUtils {
/**
* Removes leading/trailing whitespace and newlines.
*/
@NotNull
public static String sanitize(@Nullable final String string) {
if (string == null) {
return "";
}
return string
.trim()
.replaceAll("^\\r|^\\n|\\r$\\n$", "");
}
private StringUtils() {
// This constructor intentionally left blank.
}
}
| plugin/src/main/groovy/com/btkelly/gnag/utils/StringUtils.java | /**
* Copyright 2016 Bryan Kelly
*
* 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 com.btkelly.gnag.utils;
import org.jetbrains.annotations.Nullable;
public final class StringUtils {
/**
* Removes leading/trailing whitespace and newlines.
*/
public static String sanitize(@Nullable final String string) {
if (string == null) {
return null;
}
return string
.trim()
.replaceAll("^\\r|^\\n|\\r$\\n$", "");
}
private StringUtils() {
// This constructor intentionally left blank.
}
}
| Make sanitization method more safe
| plugin/src/main/groovy/com/btkelly/gnag/utils/StringUtils.java | Make sanitization method more safe | <ide><path>lugin/src/main/groovy/com/btkelly/gnag/utils/StringUtils.java
<ide> */
<ide> package com.btkelly.gnag.utils;
<ide>
<add>import org.jetbrains.annotations.NotNull;
<ide> import org.jetbrains.annotations.Nullable;
<ide>
<ide> public final class StringUtils {
<ide> /**
<ide> * Removes leading/trailing whitespace and newlines.
<ide> */
<add> @NotNull
<ide> public static String sanitize(@Nullable final String string) {
<ide> if (string == null) {
<del> return null;
<add> return "";
<ide> }
<ide>
<ide> return string |
|
Java | lgpl-2.1 | 9114e0288e91a4a9be4414cd47fb6d2d00adea49 | 0 | elsiklab/intermine,kimrutherford/intermine,Arabidopsis-Information-Portal/intermine,drhee/toxoMine,JoeCarlson/intermine,zebrafishmine/intermine,zebrafishmine/intermine,Arabidopsis-Information-Portal/intermine,kimrutherford/intermine,zebrafishmine/intermine,justincc/intermine,kimrutherford/intermine,JoeCarlson/intermine,Arabidopsis-Information-Portal/intermine,justincc/intermine,elsiklab/intermine,JoeCarlson/intermine,kimrutherford/intermine,kimrutherford/intermine,JoeCarlson/intermine,drhee/toxoMine,kimrutherford/intermine,tomck/intermine,elsiklab/intermine,elsiklab/intermine,elsiklab/intermine,JoeCarlson/intermine,justincc/intermine,drhee/toxoMine,kimrutherford/intermine,elsiklab/intermine,drhee/toxoMine,Arabidopsis-Information-Portal/intermine,drhee/toxoMine,justincc/intermine,joshkh/intermine,elsiklab/intermine,kimrutherford/intermine,Arabidopsis-Information-Portal/intermine,joshkh/intermine,zebrafishmine/intermine,joshkh/intermine,joshkh/intermine,tomck/intermine,elsiklab/intermine,JoeCarlson/intermine,drhee/toxoMine,justincc/intermine,joshkh/intermine,justincc/intermine,justincc/intermine,joshkh/intermine,tomck/intermine,zebrafishmine/intermine,drhee/toxoMine,tomck/intermine,zebrafishmine/intermine,Arabidopsis-Information-Portal/intermine,justincc/intermine,justincc/intermine,Arabidopsis-Information-Portal/intermine,zebrafishmine/intermine,tomck/intermine,joshkh/intermine,drhee/toxoMine,Arabidopsis-Information-Portal/intermine,drhee/toxoMine,zebrafishmine/intermine,JoeCarlson/intermine,Arabidopsis-Information-Portal/intermine,joshkh/intermine,zebrafishmine/intermine,tomck/intermine,tomck/intermine,JoeCarlson/intermine,tomck/intermine,JoeCarlson/intermine,elsiklab/intermine,joshkh/intermine,tomck/intermine,kimrutherford/intermine | package org.intermine.objectstore.intermine;
/*
* Copyright (C) 2002-2007 FlyMine
*
* This code may be freely distributed and modified under the
* terms of the GNU Lesser General Public Licence. This should
* be distributed with the code. See the LICENSE file for more
* information or http://www.gnu.org/copyleft/lesser.html.
*
*/
import java.lang.reflect.UndeclaredThrowableException;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.ConcurrentModificationException;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.LinkedHashSet;
import java.util.Map;
import java.util.Set;
import junit.framework.Test;
import org.intermine.model.InterMineObject;
import org.intermine.model.testmodel.Address;
import org.intermine.model.testmodel.Company;
import org.intermine.model.testmodel.Department;
import org.intermine.model.testmodel.Employee;
import org.intermine.model.testmodel.Manager;
import org.intermine.model.testmodel.Types;
import org.intermine.objectstore.ObjectStore;
import org.intermine.objectstore.ObjectStoreAbstractImplTestCase;
import org.intermine.objectstore.ObjectStoreException;
import org.intermine.objectstore.ObjectStoreFactory;
import org.intermine.objectstore.ObjectStoreQueriesTestCase;
import org.intermine.objectstore.query.BagConstraint;
import org.intermine.objectstore.query.ClassConstraint;
import org.intermine.objectstore.query.ConstraintOp;
import org.intermine.objectstore.query.ConstraintSet;
import org.intermine.objectstore.query.ContainsConstraint;
import org.intermine.objectstore.query.ObjectStoreBag;
import org.intermine.objectstore.query.Query;
import org.intermine.objectstore.query.QueryClass;
import org.intermine.objectstore.query.QueryCloner;
import org.intermine.objectstore.query.QueryCollectionReference;
import org.intermine.objectstore.query.QueryField;
import org.intermine.objectstore.query.QueryValue;
import org.intermine.objectstore.query.Results;
import org.intermine.objectstore.query.ResultsRow;
import org.intermine.objectstore.query.SimpleConstraint;
import org.intermine.objectstore.query.SingletonResults;
import org.intermine.objectstore.query.iql.IqlQuery;
import org.intermine.sql.query.Constraint;
public class ObjectStoreInterMineImplTest extends ObjectStoreAbstractImplTestCase
{
public static void oneTimeSetUp() throws Exception {
os = (ObjectStoreInterMineImpl) ObjectStoreFactory.getObjectStore("os.unittest");
ObjectStoreAbstractImplTestCase.oneTimeSetUp();
}
public ObjectStoreInterMineImplTest(String arg) throws Exception {
super(arg);
}
public static Test suite() {
return buildSuite(ObjectStoreInterMineImplTest.class);
}
public void testLargeOffset() throws Exception {
Query q = new Query();
QueryClass qc = new QueryClass(Address.class);
q.addFrom(qc);
q.addToSelect(qc);
Query q2 = QueryCloner.cloneQuery(q);
SingletonResults r = os.executeSingleton(q);
r.setBatchSize(2);
InterMineObject o = (InterMineObject) r.get(5);
SqlGenerator.registerOffset(q2, 6, ((ObjectStoreInterMineImpl) os).getSchema(), ((ObjectStoreInterMineImpl) os).db, o.getId(), new HashMap());
SingletonResults r2 = os.executeSingleton(q2);
r2.setBatchSize(2);
Query q3 = QueryCloner.cloneQuery(q);
SqlGenerator.registerOffset(q3, 5, ((ObjectStoreInterMineImpl) os).getSchema(), ((ObjectStoreInterMineImpl) os).db, o.getId(), new HashMap());
SingletonResults r3 = os.executeSingleton(q3);
r3.setBatchSize(2);
assertEquals(r, r2);
assertTrue(!r.equals(r3));
}
public void testLargeOffset2() throws Exception {
Employee nullEmployee = new Employee();
nullEmployee.setAge(26);
nullEmployee.setName(null);
try {
storeDataWriter.store(nullEmployee);
Query q = new Query();
QueryClass qc = new QueryClass(Employee.class);
q.addFrom(qc);
q.addToSelect(qc);
q.addToOrderBy(new QueryField(qc, "name"));
Query q2 = QueryCloner.cloneQuery(q);
SingletonResults r = os.executeSingleton(q);
r.setBatchSize(2);
Employee o = (Employee) r.get(2);
SqlGenerator.registerOffset(q2, 3, ((ObjectStoreInterMineImpl) os).getSchema(), ((ObjectStoreInterMineImpl) os).db, o.getName(), new HashMap());
SingletonResults r2 = os.executeSingleton(q2);
r2.setBatchSize(2);
Query q3 = QueryCloner.cloneQuery(q);
SqlGenerator.registerOffset(q3, 2, ((ObjectStoreInterMineImpl) os).getSchema(), ((ObjectStoreInterMineImpl) os).db, o.getName(), new HashMap());
SingletonResults r3 = os.executeSingleton(q3);
r3.setBatchSize(2);
assertEquals(r, r2);
assertTrue(!r.equals(r3));
} finally {
storeDataWriter.delete(nullEmployee);
}
}
/*public void testLargeOffset3() throws Exception {
// This is to test the indexing of large offset queries, so it needs to do a performance test.
Set toDelete = new HashSet();
try {
long start = System.currentTimeMillis();
storeDataWriter.beginTransaction();
for (int i = 0; i < 10105; i++) {
Employee e = new Employee();
String name = "Fred_";
if (i < 10000) {
name += "0";
}
if (i < 1000) {
name += "0";
}
if (i < 100) {
name += "0";
}
if (i < 10) {
name += "0";
}
e.setName(name + i);
e.setAge(i + 1000000);
storeDataWriter.store(e);
toDelete.add(e);
}
for (int i = 10105; i < 10205; i++) {
Employee e = new Employee();
e.setAge(i + 1000000);
storeDataWriter.store(e);
toDelete.add(e);
}
storeDataWriter.commitTransaction();
Connection c = null;
try {
c = ((ObjectStoreWriterInterMineImpl) storeDataWriter).getConnection();
c.createStatement().execute("ANALYSE");
} finally {
if (c != null) {
((ObjectStoreWriterInterMineImpl) storeDataWriter).releaseConnection(c);
}
}
long now = System.currentTimeMillis();
System.out.println("Took " + (now - start) + "ms to insert data");
start = now;
Query q = new Query();
QueryClass qc = new QueryClass(Employee.class);
QueryField f = new QueryField(qc, "name");
q.addFrom(qc);
q.addToSelect(f);
q.setDistinct(false);
SingletonResults r = os.executeSingleton(q);
r.setBatchSize(10);
assertEquals("Fred_00000", r.get(6));
now = System.currentTimeMillis();
System.out.println("Took " + (now - start) + "ms to find first row");
long timeA = now - start;
start = now;
assertEquals("Fred_10015", r.get(10021));
now = System.currentTimeMillis();
System.out.println("Took " + (now - start) + "ms to find row 10015");
long timeB = now - start;
start = now;
assertEquals("Fred_10035", r.get(10041));
now = System.currentTimeMillis();
System.out.println("Took " + (now - start) + "ms to find row 10035");
long timeC = now - start;
start = now;
assertNull(r.get(10141));
now = System.currentTimeMillis();
System.out.println("Took " + (now - start) + "ms to find row 10135");
long timeD = now - start;
q = QueryCloner.cloneQuery(q);
((ObjectStoreInterMineImpl) os).precompute(q);
r = os.executeSingleton(q);
r.setBatchSize(10);
now = System.currentTimeMillis();
System.out.println("Took " + (now - start) + "ms to precompute results");
start = now;
assertEquals("Fred_00000", r.get(6));
now = System.currentTimeMillis();
System.out.println("Took " + (now - start) + "ms to find first precomputed row");
long timePA = now - start;
start = now;
assertEquals("Fred_10015", r.get(10021));
now = System.currentTimeMillis();
System.out.println("Took " + (now - start) + "ms to find precomputed row 10015");
long timePB = now - start;
start = now;
assertEquals("Fred_10035", r.get(10041));
now = System.currentTimeMillis();
System.out.println("Took " + (now - start) + "ms to find precomputed row 10035");
long timePC = now - start;
start = now;
assertNull(r.get(10141));
now = System.currentTimeMillis();
System.out.println("Took " + (now - start) + "ms to find precomputed row 10135");
long timePD = now - start;
assertTrue("Row 6 found in " + timeA + "ms", timeA < 30);
assertTrue("Row 10015 found in " + timeB + "ms", timeB > 30);
assertTrue("Row 10035 found in " + timeC + "ms", timeC < 22);
assertTrue("Row 10135 found in " + timeD + "ms", timeD < 15);
assertTrue("Precomputed row 6 found in " + timePA + "ms", timePA < 30);
assertTrue("Precomputed row 10015 found in " + timePB + "ms", timePB > 30);
//TODO: This should pass - it's Postgres being thick.
//assertTrue("Precomputed row 10035 found in " + timePC + "ms", timePC < 15);
assertTrue("Precomputed row 10135 found in " + timePD + "ms", timePD < 15);
} finally {
if (storeDataWriter.isInTransaction()) {
storeDataWriter.abortTransaction();
}
long start = System.currentTimeMillis();
storeDataWriter.beginTransaction();
Iterator iter = toDelete.iterator();
while (iter.hasNext()) {
Employee e = (Employee) iter.next();
storeDataWriter.delete(e);
}
storeDataWriter.commitTransaction();
long now = System.currentTimeMillis();
System.out.println("Took " + (now - start) + "ms to remove data");
start = now;
Connection c = null;
try {
c = ((ObjectStoreWriterInterMineImpl) storeDataWriter).getConnection();
c.createStatement().execute("VACUUM FULL ANALYSE");
} finally {
if (c != null) {
((ObjectStoreWriterInterMineImpl) storeDataWriter).releaseConnection(c);
}
}
now = System.currentTimeMillis();
System.out.println("Took " + (now - start) + "ms to VACUUM FULL ANALYSE");
}
}*/
public void testPrecompute() throws Exception {
Query q = new Query();
QueryClass qc1 = new QueryClass(Department.class);
QueryClass qc2 = new QueryClass(Employee.class);
q.addFrom(qc1);
q.addFrom(qc2);
q.addToSelect(qc1);
q.addToSelect(qc2);
QueryField f1 = new QueryField(qc1, "name");
QueryField f2 = new QueryField(qc2, "name");
q.addToSelect(f1);
q.addToSelect(f2);
q.setConstraint(new ContainsConstraint(new QueryCollectionReference(qc1, "employees"), ConstraintOp.CONTAINS, qc2));
q.setDistinct(false);
Set indexes = new LinkedHashSet();
indexes.add(qc1);
indexes.add(f1);
indexes.add(f2);
String tableName = ((ObjectStoreInterMineImpl) os).precompute(q, indexes, "test");
Connection con = null;
Map indexMap = new HashMap();
try {
con = ((ObjectStoreInterMineImpl) os).getConnection();
Statement s = con.createStatement();
ResultSet r = s.executeQuery("SELECT * FROM pg_indexes WHERE tablename = '" + tableName + "'");
while (r.next()) {
indexMap.put(r.getString("indexname"), r.getString("indexdef"));
}
} finally {
if (con != null) {
((ObjectStoreInterMineImpl) os).releaseConnection(con);
}
}
Map expectedIndexMap = new HashMap();
expectedIndexMap.put("index" + tableName + "_field_orderby_field", "CREATE INDEX index" + tableName + "_field_orderby_field ON " + tableName + " USING btree (orderby_field)");
expectedIndexMap.put("index" + tableName + "_field_a1_id__lower_a3____lower_a4__", "CREATE INDEX index" + tableName + "_field_a1_id__lower_a3____lower_a4__ ON " + tableName + " USING btree (a1_id, lower(a3_), lower(a4_))");
expectedIndexMap.put("index" + tableName + "_field_lower_a3__", "CREATE INDEX index" + tableName + "_field_lower_a3__ ON " + tableName + " USING btree (lower(a3_))");
expectedIndexMap.put("index" + tableName + "_field_lower_a3___nulls", "CREATE INDEX index" + tableName + "_field_lower_a3___nulls ON " + tableName + " USING btree (((lower(a3_) IS NULL)))");
expectedIndexMap.put("index" + tableName + "_field_lower_a4__", "CREATE INDEX index" + tableName + "_field_lower_a4__ ON " + tableName + " USING btree (lower(a4_))");
expectedIndexMap.put("index" + tableName + "_field_lower_a4___nulls", "CREATE INDEX index" + tableName + "_field_lower_a4___nulls ON " + tableName + " USING btree (((lower(a4_) IS NULL)))");
assertEquals(expectedIndexMap, indexMap);
}
public void testGoFaster() throws Exception {
Query q = new IqlQuery("SELECT Company, Department FROM Company, Department WHERE Department.company CONTAINS Company", "org.intermine.model.testmodel").toQuery();
try {
((ObjectStoreInterMineImpl) os).goFaster(q);
Results r = os.execute(q);
r.get(0);
assertEquals(3, r.size());
} finally {
((ObjectStoreInterMineImpl) os).releaseGoFaster(q);
}
}
public void testPrecomputeWithNullsInOrder() throws Exception {
Types t1 = new Types();
t1.setIntObjType(null);
t1.setLongObjType(new Long(234212354));
t1.setName("fred");
storeDataWriter.store(t1);
Types t2 = new Types();
t2.setIntObjType(new Integer(278652));
t2.setLongObjType(null);
t2.setName("fred");
storeDataWriter.store(t2);
Query q = new Query();
QueryClass qc = new QueryClass(Types.class);
QueryField into = new QueryField(qc, "intObjType");
QueryField longo = new QueryField(qc, "longObjType");
q.addFrom(qc);
q.addToSelect(into);
q.addToSelect(longo);
q.addToSelect(qc);
q.setDistinct(false);
((ObjectStoreInterMineImpl) os).precompute(q, "test");
Results r = os.execute(q);
r.setBatchSize(1);
SqlGenerator.registerOffset(q, 1, ((ObjectStoreInterMineImpl) os).getSchema(), ((ObjectStoreInterMineImpl) os).db, new Integer(100000), new HashMap());
ResultsRow row = (ResultsRow) r.get(1);
InterMineObject o = (InterMineObject) row.get(2);
assertEquals("Expected " + t2.toString() + " but got " + o.toString(), t2.getId(), o.getId());
row = (ResultsRow) r.get(2);
o = (InterMineObject) row.get(2);
assertEquals("Expected " + t1.toString() + " but got " + o.toString(), t1.getId(), o.getId());
q.setConstraint(new SimpleConstraint(into, ConstraintOp.GREATER_THAN, new QueryValue(new Integer(100000))));
q = QueryCloner.cloneQuery(q);
r = os.execute(q);
r.setBatchSize(10);
row = (ResultsRow) r.get(0);
o = (InterMineObject) row.get(2);
assertEquals("Expected " + t2.toString() + " but got " + o.toString(), t2.getId(), o.getId());
assertEquals(1, r.size());
storeDataWriter.delete(t1);
storeDataWriter.delete(t2);
}
public void testPrecomputeWithNegatives() throws Exception {
Types t1 = new Types();
t1.setLongObjType(new Long(-765187651234L));
t1.setIntObjType(new Integer(278652));
t1.setName("Fred");
storeDataWriter.store(t1);
Query q = new Query();
QueryClass qc = new QueryClass(Types.class);
QueryField into = new QueryField(qc, "intObjType");
QueryField longo = new QueryField(qc, "longObjType");
q.addFrom(qc);
q.addToSelect(into);
q.addToSelect(longo);
q.addToSelect(qc);
q.setDistinct(false);
((ObjectStoreInterMineImpl) os).precompute(q, "test");
Results r = os.execute(q);
r.setBatchSize(1);
SqlGenerator.registerOffset(q, 1, ((ObjectStoreInterMineImpl) os).getSchema(), ((ObjectStoreInterMineImpl) os).db, new Integer(278651), new HashMap());
ResultsRow row = (ResultsRow) r.get(1);
InterMineObject o = (InterMineObject) row.get(2);
assertEquals("Expected " + t1.toString() + " but got " + o.toString(), t1.getId(), o.getId());
try {
r.get(2);
fail("Expected size to be 2");
} catch (Exception e) {
}
assertEquals(2, r.size());
storeDataWriter.delete(t1);
}
public void testCancelMethods1() throws Exception {
Object id = "flibble1";
Connection c = ((ObjectStoreInterMineImpl) os).getConnection();
try {
Statement s = c.createStatement();
((ObjectStoreInterMineImpl) os).registerRequestId(id);
((ObjectStoreInterMineImpl) os).registerStatement(s);
((ObjectStoreInterMineImpl) os).deregisterStatement(s);
((ObjectStoreInterMineImpl) os).deregisterRequestId(id);
} finally {
((ObjectStoreInterMineImpl) os).releaseConnection(c);
}
}
public void testCancelMethods2() throws Exception {
Object id = "flibble2";
Connection c = ((ObjectStoreInterMineImpl) os).getConnection();
try {
Statement s = c.createStatement();
((ObjectStoreInterMineImpl) os).registerRequestId(id);
((ObjectStoreInterMineImpl) os).registerStatement(s);
((ObjectStoreInterMineImpl) os).cancelRequest(id);
((ObjectStoreInterMineImpl) os).deregisterStatement(s);
((ObjectStoreInterMineImpl) os).deregisterRequestId(id);
} finally {
((ObjectStoreInterMineImpl) os).releaseConnection(c);
}
}
public void testCancelMethods3() throws Exception {
Object id = "flibble3";
try {
((ObjectStoreInterMineImpl) os).deregisterRequestId(id);
fail("Should have thrown exception");
} catch (ObjectStoreException e) {
assertEquals("This Thread is not registered with ID flibble3", e.getMessage());
}
}
/*
// this test sometimes fails due to a race condition
public void testCancelMethods4() throws Exception {
Object id = "flibble4";
UndeclaredThrowableException failure = null;
// this test sometimes fails even when all is OK, so run it multiple times and exit if it
// passes
for (int i = 0 ;i < 20 ; i++) {
Connection c = ((ObjectStoreInterMineImpl) os).getConnection();
try {
Statement s = c.createStatement();
((ObjectStoreInterMineImpl) os).registerRequestId(id);
((ObjectStoreInterMineImpl) os).cancelRequest(id);
((ObjectStoreInterMineImpl) os).registerStatement(s);
fail("Should have thrown exception");
} catch (ObjectStoreException e) {
assertEquals("Request id flibble4 is cancelled", e.getMessage());
// test passed so stop immediately
return;
} catch (UndeclaredThrowableException t) {
// test failed but might pass next time - try again
failure = t;
} finally {
((ObjectStoreInterMineImpl) os).deregisterRequestId(id);
((ObjectStoreInterMineImpl) os).releaseConnection(c);
}
}
throw failure;
}
*/
/*
// this test sometimes fails due to a race condition
public void testCancelMethods5() throws Exception {
UndeclaredThrowableException failure = null;
// this test sometimes fails even when all is OK, so run it multiple times and exit if it
// passes
for (int i = 0 ;i < 20 ; i++) {
Object id = "flibble5";
Connection c = ((ObjectStoreInterMineImpl) os).getConnection();
Statement s = null;
try {
s = c.createStatement();
((ObjectStoreInterMineImpl) os).registerRequestId(id);
((ObjectStoreInterMineImpl) os).registerStatement(s);
((ObjectStoreInterMineImpl) os).registerStatement(s);
fail("Should have thrown exception");
} catch (ObjectStoreException e) {
assertEquals("Request id flibble5 is currently being serviced in another thread. Don't share request IDs over multiple threads!", e.getMessage());
// test passed so stop immediately
return;
} catch (UndeclaredThrowableException t) {
// test failed but might pass next time - try again
failure = t;
} finally {
if (s != null) {
((ObjectStoreInterMineImpl) os).deregisterStatement(s);
}
((ObjectStoreInterMineImpl) os).deregisterRequestId(id);
((ObjectStoreInterMineImpl) os).releaseConnection(c);
}
}
throw failure;
}
*/
/*
public void testCancelMethods6() throws Exception {
Object id = "flibble6";
Connection c = ((ObjectStoreInterMineImpl) os).getConnection();
Statement s = null;
long start = 0;
try {
s = c.createStatement();
s.execute("CREATE TABLE test (col1 int, col2 int)");
s.execute("INSERT INTO test VALUES (1, 1)");
s.execute("INSERT INTO test VALUES (1, 2)");
s.execute("INSERT INTO test VALUES (2, 1)");
s.execute("INSERT INTO test VALUES (2, 2)");
((ObjectStoreInterMineImpl) os).registerRequestId(id);
((ObjectStoreInterMineImpl) os).registerStatement(s);
Thread delayedCancel = new Thread(new DelayedCancel(id));
delayedCancel.start();
start = System.currentTimeMillis();
s.executeQuery("SELECT * FROM test AS a, test AS b, test AS c, test AS d, test AS e, test AS f, test AS g, test AS h, test AS i, test AS j, test AS k, test AS l, test AS m WHERE a.col2 = b.col1 AND b.col2 = c.col1 AND c.col2 = d.col1 AND d.col2 = e.col1 AND e.col2 = f.col1 AND f.col2 = g.col1 AND g.col2 = h.col1 AND h.col2 = i.col1 AND i.col2 = j.col1 AND j.col2 = k.col1 AND k.col2 = l.col1 AND l.col2 = m.col1");
System.out.println("testCancelMethods6: time for query = " + (System.currentTimeMillis() - start) + " ms");
fail("Request should have been cancelled");
} catch (SQLException e) {
if (start != 0) {
System.out.println("testCancelMethods6: time for query = " + (System.currentTimeMillis() - start) + " ms");
}
String errorString = e.getMessage().replaceFirst("statement", "query");
assertEquals("ERROR: canceling query due to user request", errorString);
} finally {
if (s != null) {
try {
((ObjectStoreInterMineImpl) os).deregisterStatement(s);
} catch (ObjectStoreException e) {
e.printStackTrace(System.out);
}
}
try {
((ObjectStoreInterMineImpl) os).deregisterRequestId(id);
} catch (ObjectStoreException e) {
e.printStackTrace(System.out);
}
try {
c.createStatement().execute("DROP TABLE test");
} catch (SQLException e) {
}
((ObjectStoreInterMineImpl) os).releaseConnection(c);
}
}
*/
/*This test does not work. This is due to a failing of JDBC. The Statement.cancel() method is
* not fully Thread-safe, in that if one performs a cancel() request just before a Statement is
* used, that operation will not be cancelled. There is a race condition between the
* ObjectStore.execute() method registering the Statement and the Statement becoming
* cancellable.
public void testCancelMethods7() throws Exception {
Object id = "flibble7";
Connection c = ((ObjectStoreInterMineImpl) os).getConnection();
Statement s = null;
long start = 0;
try {
s = c.createStatement();
s.execute("CREATE TABLE test (col1 int, col2 int)");
s.execute("INSERT INTO test VALUES (1, 1)");
s.execute("INSERT INTO test VALUES (1, 2)");
s.execute("INSERT INTO test VALUES (2, 1)");
s.execute("INSERT INTO test VALUES (2, 2)");
((ObjectStoreInterMineImpl) os).registerRequestId(id);
((ObjectStoreInterMineImpl) os).registerStatement(s);
start = System.currentTimeMillis();
s.cancel();
s.executeQuery("SELECT * FROM test AS a, test AS b, test AS c, test AS d, test AS e, test AS f, test AS g, test AS h, test AS i, test AS j, test AS k, test AS l, test AS m WHERE a.col2 = b.col1 AND b.col2 = c.col1 AND c.col2 = d.col1 AND d.col2 = e.col1 AND e.col2 = f.col1 AND f.col2 = g.col1 AND g.col2 = h.col1 AND h.col2 = i.col1 AND i.col2 = j.col1 AND j.col2 = k.col1 AND k.col2 = l.col1 AND l.col2 = m.col1");
System.out.println("testCancelMethods6: time for query = " + (System.currentTimeMillis() - start) + " ms");
fail("Request should have been cancelled");
} catch (SQLException e) {
if (start != 0) {
System.out.println("testCancelMethods6: time for query = " + (System.currentTimeMillis() - start) + " ms");
}
assertEquals("ERROR: canceling query due to user request", e.getMessage());
} finally {
if (s != null) {
try {
((ObjectStoreInterMineImpl) os).deregisterStatement(s);
} catch (ObjectStoreException e) {
e.printStackTrace(System.out);
}
}
try {
((ObjectStoreInterMineImpl) os).deregisterRequestId(id);
} catch (ObjectStoreException e) {
e.printStackTrace(System.out);
}
try {
c.createStatement().execute("DROP TABLE test");
} catch (SQLException e) {
}
((ObjectStoreInterMineImpl) os).releaseConnection(c);
}
}
public void testCancel() throws Exception {
Object id = "flibble8";
Query q = new IqlQuery("SELECT a, b, c, d, e FROM Employee AS a, Employee AS b, Employee AS c, Employee AS d, Employee AS e", "org.intermine.model.testmodel").toQuery();
((ObjectStoreInterMineImpl) os).registerRequestId(id);
try {
Thread delayedCancel = new Thread(new DelayedCancel(id));
delayedCancel.start();
Results r = os.execute(q);
r.setBatchSize(10000);
r.setNoOptimise();
r.setNoExplain();
r.get(0);
fail("Operation should have been cancelled");
} catch (RuntimeException e) {
assertEquals("ObjectStore error has occured (in get)", e.getMessage());
Throwable t = e.getCause();
if (!"Request id flibble8 is cancelled".equals(t.getMessage())) {
t = t.getCause();
String errorString = t.getMessage().replaceFirst("statement", "query");
assertEquals("ERROR: canceling query due to user request",errorString);
}
} finally {
((ObjectStoreInterMineImpl) os).deregisterRequestId(id);
}
}
*/
public void testCreateTempBagTables() throws Exception {
Query q = ObjectStoreQueriesTestCase.bagConstraint();
Map bagTableNames = ((ObjectStoreInterMineImpl) os).bagConstraintTables;
bagTableNames.clear();
Connection con = null;
try {
con = ((ObjectStoreInterMineImpl) os).getConnection();
con.setAutoCommit(false);
int minBagSize = ((ObjectStoreInterMineImpl) os).minBagTableSize;
((ObjectStoreInterMineImpl) os).minBagTableSize = 1;
((ObjectStoreInterMineImpl) os).createTempBagTables(con, q);
((ObjectStoreInterMineImpl) os).minBagTableSize = minBagSize;
assertEquals("Entries: " + bagTableNames, 1, bagTableNames.size());
String tableName = (String) bagTableNames.values().iterator().next();
Set expected = new HashSet();
Iterator bagIter = ((BagConstraint) q.getConstraint()).getBag().iterator();
while (bagIter.hasNext()) {
Object thisObject = bagIter.next();
if (thisObject instanceof String) {
expected.add(thisObject);
}
}
Statement s = con.createStatement();
ResultSet r = s.executeQuery("SELECT value FROM " + tableName);
r.next();
Set resultStrings = new HashSet();
resultStrings.add(r.getString(1));
r.next();
resultStrings.add(r.getString(1));
r.next();
resultStrings.add(r.getString(1));
try {
r.next();
} catch (SQLException e) {
// expected
}
assertEquals(expected, resultStrings);
} finally {
if (con != null) {
con.commit();
con.setAutoCommit(true);
((ObjectStoreInterMineImpl) os).releaseConnection(con);
}
}
}
public void testGetUniqueInteger() throws Exception {
ObjectStoreInterMineImpl osii = (ObjectStoreInterMineImpl) os;
Connection con = osii.getConnection();
con.setAutoCommit(false);
int integer1 = osii.getUniqueInteger(con);
int integer2 = osii.getUniqueInteger(con);
assertTrue(integer2 > integer1);
con.setAutoCommit(true);
int integer3 = osii.getUniqueInteger(con);
int integer4 = osii.getUniqueInteger(con);
assertTrue(integer3 > integer2);
assertTrue(integer4 > integer3);
}
private static class DelayedCancel implements Runnable
{
private Object id;
public DelayedCancel(Object id) {
this.id = id;
}
public void run() {
try {
Thread.sleep(100);
} catch (InterruptedException e) {
}
try {
((ObjectStoreInterMineImpl) os).cancelRequest(id);
} catch (ObjectStoreException e) {
e.printStackTrace(System.out);
}
}
}
public void testIsPrecomputed() throws Exception {
Query q = new Query();
QueryClass qc = new QueryClass(Employee.class);
QueryField qf = new QueryField(qc,"age");
SimpleConstraint sc = new SimpleConstraint(qf,ConstraintOp.GREATER_THAN,new QueryValue(new Integer(20)));
q.addToSelect(qc);
q.addFrom(qc);
q.setConstraint(sc);
assertFalse(((ObjectStoreInterMineImpl)os).isPrecomputed(q,"template"));
((ObjectStoreInterMineImpl)os).precompute(q, "template");
assertTrue(((ObjectStoreInterMineImpl)os).isPrecomputed(q,"template"));
ObjectStoreBag osb = storeDataWriter.createObjectStoreBag();
storeDataWriter.addToBag(osb, new Integer(5));
assertTrue(((ObjectStoreInterMineImpl)os).isPrecomputed(q,"template"));
storeDataWriter.store((Employee) data.get("EmployeeA1"));
assertFalse(((ObjectStoreInterMineImpl)os).isPrecomputed(q,"template"));
}
public void testObjectStoreBag() throws Exception {
System.out.println("Starting testObjectStoreBag");
ObjectStoreBag osb = storeDataWriter.createObjectStoreBag();
ArrayList coll = new ArrayList();
coll.add(new Integer(3));
coll.add(((Employee) data.get("EmployeeA1")).getId());
coll.add(((Employee) data.get("EmployeeA2")).getId());
coll.add(new Integer(20));
coll.add(new Integer(23));
coll.add(new Integer(30));
storeDataWriter.beginTransaction();
storeDataWriter.addAllToBag(osb, coll);
Query q = new Query();
q.addToSelect(osb);
SingletonResults r = os.executeSingleton(q);
assertEquals(Collections.EMPTY_LIST, r);
q = new Query();
q.addToSelect(osb);
r = os.executeSingleton(q);
storeDataWriter.commitTransaction();
try {
r.get(0);
fail("Expected: ConcurrentModificationException");
} catch (ConcurrentModificationException e) {
}
q = new Query();
q.addToSelect(osb);
r = os.executeSingleton(q);
assertEquals(coll, r);
q = new Query();
QueryClass qc = new QueryClass(Employee.class);
q.addFrom(qc);
q.addToSelect(qc);
q.setConstraint(new BagConstraint(qc, ConstraintOp.IN, osb));
r = os.executeSingleton(q);
assertEquals(Arrays.asList(new Object[] {data.get("EmployeeA1"), data.get("EmployeeA2")}), r);
ObjectStoreBag osb2 = storeDataWriter.createObjectStoreBag();
storeDataWriter.addToBag(osb2, ((Employee) data.get("EmployeeA1")).getId());
storeDataWriter.addToBagFromQuery(osb2, q);
q = new Query();
q.addToSelect(osb2);
r = os.executeSingleton(q);
assertEquals(Arrays.asList(new Object[] {((Employee) data.get("EmployeeA1")).getId(), ((Employee) data.get("EmployeeA2")).getId()}), r);
}
public void testClosedConnectionBug() throws Exception {
Query pq = new Query();
QueryClass qc = new QueryClass(Employee.class);
pq.addFrom(qc);
pq.addToSelect(qc);
((ObjectStoreInterMineImpl) os).precompute(pq, "Whatever");
Query q = new Query();
QueryClass qc1 = new QueryClass(Manager.class);
QueryClass qc2 = new QueryClass(Manager.class);
QueryClass qc3 = new QueryClass(Manager.class);
QueryClass qc4 = new QueryClass(Manager.class);
QueryClass qc5 = new QueryClass(Manager.class);
QueryClass qc6 = new QueryClass(Manager.class);
QueryClass qc7 = new QueryClass(Manager.class);
QueryClass qc8 = new QueryClass(Manager.class);
QueryClass qc9 = new QueryClass(Manager.class);
q.addFrom(qc1);
q.addFrom(qc2);
q.addFrom(qc3);
q.addFrom(qc4);
q.addFrom(qc5);
q.addFrom(qc6);
q.addFrom(qc7);
q.addFrom(qc8);
q.addFrom(qc9);
q.addToSelect(qc1);
q.addToSelect(qc2);
q.addToSelect(qc3);
q.addToSelect(qc4);
q.addToSelect(qc5);
q.addToSelect(qc6);
q.addToSelect(qc7);
q.addToSelect(qc8);
q.addToSelect(qc9);
ConstraintSet cs = new ConstraintSet(ConstraintOp.AND);
q.setConstraint(cs);
cs.addConstraint(new SimpleConstraint(new QueryField(qc1, "id"), ConstraintOp.EQUALS, new QueryValue(new Integer(1))));
cs.addConstraint(new SimpleConstraint(new QueryField(qc1, "id"), ConstraintOp.EQUALS, new QueryValue(new Integer(2))));
cs.addConstraint(new ClassConstraint(qc1, ConstraintOp.EQUALS, qc2));
cs.addConstraint(new ClassConstraint(qc1, ConstraintOp.EQUALS, qc3));
cs.addConstraint(new ClassConstraint(qc1, ConstraintOp.EQUALS, qc4));
cs.addConstraint(new ClassConstraint(qc1, ConstraintOp.EQUALS, qc5));
cs.addConstraint(new ClassConstraint(qc1, ConstraintOp.EQUALS, qc6));
cs.addConstraint(new ClassConstraint(qc1, ConstraintOp.EQUALS, qc7));
cs.addConstraint(new ClassConstraint(qc1, ConstraintOp.EQUALS, qc8));
cs.addConstraint(new ClassConstraint(qc1, ConstraintOp.EQUALS, qc9));
assertEquals(Collections.EMPTY_LIST, os.execute(q, 0, 1000, true, true, ObjectStore.SEQUENCE_IGNORE));
}
public void testFailFast() throws Exception {
Query q1 = new Query();
ObjectStoreBag osb1 = new ObjectStoreBag(100);
q1.addToSelect(osb1);
Query q2 = new Query();
ObjectStoreBag osb2 = new ObjectStoreBag(200);
q2.addToSelect(osb2);
Query q3 = new Query();
QueryClass qc1 = new QueryClass(Employee.class);
q3.addFrom(qc1);
q3.addToSelect(qc1);
Results r1 = os.execute(q1);
Results r2 = os.execute(q2);
Results r3 = os.execute(q3);
storeDataWriter.addToBag(osb1, new Integer(1));
try {
r1.iterator().hasNext();
fail("Expected: ConcurrentModificationException");
} catch (ConcurrentModificationException e) {
}
r2.iterator().hasNext();
r3.iterator().hasNext();
r1 = os.execute(q1);
r2 = os.execute(q2);
r3 = os.execute(q3);
storeDataWriter.addToBag(osb2, new Integer(2));
r1.iterator().hasNext();
try {
r2.iterator().hasNext();
fail("Expected: ConcurrentModificationException");
} catch (ConcurrentModificationException e) {
}
r3.iterator().hasNext();
r1 = os.execute(q1);
r2 = os.execute(q2);
r3 = os.execute(q3);
storeDataWriter.store((Employee) data.get("EmployeeA1"));
r1.iterator().hasNext();
r2.iterator().hasNext();
try {
r3.iterator().hasNext();
fail("Expected: ConcurrentModificationException");
} catch (ConcurrentModificationException e) {
}
}
}
| intermine/objectstore/test/src/org/intermine/objectstore/intermine/ObjectStoreInterMineImplTest.java | package org.intermine.objectstore.intermine;
/*
* Copyright (C) 2002-2007 FlyMine
*
* This code may be freely distributed and modified under the
* terms of the GNU Lesser General Public Licence. This should
* be distributed with the code. See the LICENSE file for more
* information or http://www.gnu.org/copyleft/lesser.html.
*
*/
import java.lang.reflect.UndeclaredThrowableException;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.ConcurrentModificationException;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.LinkedHashSet;
import java.util.Map;
import java.util.Set;
import junit.framework.Test;
import org.intermine.model.InterMineObject;
import org.intermine.model.testmodel.Address;
import org.intermine.model.testmodel.Company;
import org.intermine.model.testmodel.Department;
import org.intermine.model.testmodel.Employee;
import org.intermine.model.testmodel.Manager;
import org.intermine.model.testmodel.Types;
import org.intermine.objectstore.ObjectStore;
import org.intermine.objectstore.ObjectStoreAbstractImplTestCase;
import org.intermine.objectstore.ObjectStoreException;
import org.intermine.objectstore.ObjectStoreFactory;
import org.intermine.objectstore.ObjectStoreQueriesTestCase;
import org.intermine.objectstore.query.BagConstraint;
import org.intermine.objectstore.query.ClassConstraint;
import org.intermine.objectstore.query.ConstraintOp;
import org.intermine.objectstore.query.ConstraintSet;
import org.intermine.objectstore.query.ContainsConstraint;
import org.intermine.objectstore.query.ObjectStoreBag;
import org.intermine.objectstore.query.Query;
import org.intermine.objectstore.query.QueryClass;
import org.intermine.objectstore.query.QueryCloner;
import org.intermine.objectstore.query.QueryCollectionReference;
import org.intermine.objectstore.query.QueryField;
import org.intermine.objectstore.query.QueryValue;
import org.intermine.objectstore.query.Results;
import org.intermine.objectstore.query.ResultsRow;
import org.intermine.objectstore.query.SimpleConstraint;
import org.intermine.objectstore.query.SingletonResults;
import org.intermine.objectstore.query.iql.IqlQuery;
import org.intermine.sql.query.Constraint;
public class ObjectStoreInterMineImplTest extends ObjectStoreAbstractImplTestCase
{
public static void oneTimeSetUp() throws Exception {
os = (ObjectStoreInterMineImpl) ObjectStoreFactory.getObjectStore("os.unittest");
ObjectStoreAbstractImplTestCase.oneTimeSetUp();
}
public ObjectStoreInterMineImplTest(String arg) throws Exception {
super(arg);
}
public static Test suite() {
return buildSuite(ObjectStoreInterMineImplTest.class);
}
public void testLargeOffset() throws Exception {
Query q = new Query();
QueryClass qc = new QueryClass(Address.class);
q.addFrom(qc);
q.addToSelect(qc);
Query q2 = QueryCloner.cloneQuery(q);
SingletonResults r = os.executeSingleton(q);
r.setBatchSize(2);
InterMineObject o = (InterMineObject) r.get(5);
SqlGenerator.registerOffset(q2, 6, ((ObjectStoreInterMineImpl) os).getSchema(), ((ObjectStoreInterMineImpl) os).db, o.getId(), new HashMap());
SingletonResults r2 = os.executeSingleton(q2);
r2.setBatchSize(2);
Query q3 = QueryCloner.cloneQuery(q);
SqlGenerator.registerOffset(q3, 5, ((ObjectStoreInterMineImpl) os).getSchema(), ((ObjectStoreInterMineImpl) os).db, o.getId(), new HashMap());
SingletonResults r3 = os.executeSingleton(q3);
r3.setBatchSize(2);
assertEquals(r, r2);
assertTrue(!r.equals(r3));
}
public void testLargeOffset2() throws Exception {
Employee nullEmployee = new Employee();
nullEmployee.setAge(26);
nullEmployee.setName(null);
try {
storeDataWriter.store(nullEmployee);
Query q = new Query();
QueryClass qc = new QueryClass(Employee.class);
q.addFrom(qc);
q.addToSelect(qc);
q.addToOrderBy(new QueryField(qc, "name"));
Query q2 = QueryCloner.cloneQuery(q);
SingletonResults r = os.executeSingleton(q);
r.setBatchSize(2);
Employee o = (Employee) r.get(2);
SqlGenerator.registerOffset(q2, 3, ((ObjectStoreInterMineImpl) os).getSchema(), ((ObjectStoreInterMineImpl) os).db, o.getName(), new HashMap());
SingletonResults r2 = os.executeSingleton(q2);
r2.setBatchSize(2);
Query q3 = QueryCloner.cloneQuery(q);
SqlGenerator.registerOffset(q3, 2, ((ObjectStoreInterMineImpl) os).getSchema(), ((ObjectStoreInterMineImpl) os).db, o.getName(), new HashMap());
SingletonResults r3 = os.executeSingleton(q3);
r3.setBatchSize(2);
assertEquals(r, r2);
assertTrue(!r.equals(r3));
} finally {
storeDataWriter.delete(nullEmployee);
}
}
/*public void testLargeOffset3() throws Exception {
// This is to test the indexing of large offset queries, so it needs to do a performance test.
Set toDelete = new HashSet();
try {
long start = System.currentTimeMillis();
storeDataWriter.beginTransaction();
for (int i = 0; i < 10105; i++) {
Employee e = new Employee();
String name = "Fred_";
if (i < 10000) {
name += "0";
}
if (i < 1000) {
name += "0";
}
if (i < 100) {
name += "0";
}
if (i < 10) {
name += "0";
}
e.setName(name + i);
e.setAge(i + 1000000);
storeDataWriter.store(e);
toDelete.add(e);
}
for (int i = 10105; i < 10205; i++) {
Employee e = new Employee();
e.setAge(i + 1000000);
storeDataWriter.store(e);
toDelete.add(e);
}
storeDataWriter.commitTransaction();
Connection c = null;
try {
c = ((ObjectStoreWriterInterMineImpl) storeDataWriter).getConnection();
c.createStatement().execute("ANALYSE");
} finally {
if (c != null) {
((ObjectStoreWriterInterMineImpl) storeDataWriter).releaseConnection(c);
}
}
long now = System.currentTimeMillis();
System.out.println("Took " + (now - start) + "ms to insert data");
start = now;
Query q = new Query();
QueryClass qc = new QueryClass(Employee.class);
QueryField f = new QueryField(qc, "name");
q.addFrom(qc);
q.addToSelect(f);
q.setDistinct(false);
SingletonResults r = os.executeSingleton(q);
r.setBatchSize(10);
assertEquals("Fred_00000", r.get(6));
now = System.currentTimeMillis();
System.out.println("Took " + (now - start) + "ms to find first row");
long timeA = now - start;
start = now;
assertEquals("Fred_10015", r.get(10021));
now = System.currentTimeMillis();
System.out.println("Took " + (now - start) + "ms to find row 10015");
long timeB = now - start;
start = now;
assertEquals("Fred_10035", r.get(10041));
now = System.currentTimeMillis();
System.out.println("Took " + (now - start) + "ms to find row 10035");
long timeC = now - start;
start = now;
assertNull(r.get(10141));
now = System.currentTimeMillis();
System.out.println("Took " + (now - start) + "ms to find row 10135");
long timeD = now - start;
q = QueryCloner.cloneQuery(q);
((ObjectStoreInterMineImpl) os).precompute(q);
r = os.executeSingleton(q);
r.setBatchSize(10);
now = System.currentTimeMillis();
System.out.println("Took " + (now - start) + "ms to precompute results");
start = now;
assertEquals("Fred_00000", r.get(6));
now = System.currentTimeMillis();
System.out.println("Took " + (now - start) + "ms to find first precomputed row");
long timePA = now - start;
start = now;
assertEquals("Fred_10015", r.get(10021));
now = System.currentTimeMillis();
System.out.println("Took " + (now - start) + "ms to find precomputed row 10015");
long timePB = now - start;
start = now;
assertEquals("Fred_10035", r.get(10041));
now = System.currentTimeMillis();
System.out.println("Took " + (now - start) + "ms to find precomputed row 10035");
long timePC = now - start;
start = now;
assertNull(r.get(10141));
now = System.currentTimeMillis();
System.out.println("Took " + (now - start) + "ms to find precomputed row 10135");
long timePD = now - start;
assertTrue("Row 6 found in " + timeA + "ms", timeA < 30);
assertTrue("Row 10015 found in " + timeB + "ms", timeB > 30);
assertTrue("Row 10035 found in " + timeC + "ms", timeC < 22);
assertTrue("Row 10135 found in " + timeD + "ms", timeD < 15);
assertTrue("Precomputed row 6 found in " + timePA + "ms", timePA < 30);
assertTrue("Precomputed row 10015 found in " + timePB + "ms", timePB > 30);
//TODO: This should pass - it's Postgres being thick.
//assertTrue("Precomputed row 10035 found in " + timePC + "ms", timePC < 15);
assertTrue("Precomputed row 10135 found in " + timePD + "ms", timePD < 15);
} finally {
if (storeDataWriter.isInTransaction()) {
storeDataWriter.abortTransaction();
}
long start = System.currentTimeMillis();
storeDataWriter.beginTransaction();
Iterator iter = toDelete.iterator();
while (iter.hasNext()) {
Employee e = (Employee) iter.next();
storeDataWriter.delete(e);
}
storeDataWriter.commitTransaction();
long now = System.currentTimeMillis();
System.out.println("Took " + (now - start) + "ms to remove data");
start = now;
Connection c = null;
try {
c = ((ObjectStoreWriterInterMineImpl) storeDataWriter).getConnection();
c.createStatement().execute("VACUUM FULL ANALYSE");
} finally {
if (c != null) {
((ObjectStoreWriterInterMineImpl) storeDataWriter).releaseConnection(c);
}
}
now = System.currentTimeMillis();
System.out.println("Took " + (now - start) + "ms to VACUUM FULL ANALYSE");
}
}*/
public void testPrecompute() throws Exception {
Query q = new Query();
QueryClass qc1 = new QueryClass(Department.class);
QueryClass qc2 = new QueryClass(Employee.class);
q.addFrom(qc1);
q.addFrom(qc2);
q.addToSelect(qc1);
q.addToSelect(qc2);
QueryField f1 = new QueryField(qc1, "name");
QueryField f2 = new QueryField(qc2, "name");
q.addToSelect(f1);
q.addToSelect(f2);
q.setConstraint(new ContainsConstraint(new QueryCollectionReference(qc1, "employees"), ConstraintOp.CONTAINS, qc2));
q.setDistinct(false);
Set indexes = new LinkedHashSet();
indexes.add(qc1);
indexes.add(f1);
indexes.add(f2);
String tableName = ((ObjectStoreInterMineImpl) os).precompute(q, indexes, "test");
Connection con = null;
Map indexMap = new HashMap();
try {
con = ((ObjectStoreInterMineImpl) os).getConnection();
Statement s = con.createStatement();
ResultSet r = s.executeQuery("SELECT * FROM pg_indexes WHERE tablename = '" + tableName + "'");
while (r.next()) {
indexMap.put(r.getString("indexname"), r.getString("indexdef"));
}
} finally {
if (con != null) {
((ObjectStoreInterMineImpl) os).releaseConnection(con);
}
}
Map expectedIndexMap = new HashMap();
expectedIndexMap.put("index" + tableName + "_field_orderby_field", "CREATE INDEX index" + tableName + "_field_orderby_field ON " + tableName + " USING btree (orderby_field)");
expectedIndexMap.put("index" + tableName + "_field_a1_id__lower_a3____lower_a4__", "CREATE INDEX index" + tableName + "_field_a1_id__lower_a3____lower_a4__ ON " + tableName + " USING btree (a1_id, lower(a3_), lower(a4_))");
expectedIndexMap.put("index" + tableName + "_field_lower_a3__", "CREATE INDEX index" + tableName + "_field_lower_a3__ ON " + tableName + " USING btree (lower(a3_))");
expectedIndexMap.put("index" + tableName + "_field_lower_a3___nulls", "CREATE INDEX index" + tableName + "_field_lower_a3___nulls ON " + tableName + " USING btree (((lower(a3_) IS NULL)))");
expectedIndexMap.put("index" + tableName + "_field_lower_a4__", "CREATE INDEX index" + tableName + "_field_lower_a4__ ON " + tableName + " USING btree (lower(a4_))");
expectedIndexMap.put("index" + tableName + "_field_lower_a4___nulls", "CREATE INDEX index" + tableName + "_field_lower_a4___nulls ON " + tableName + " USING btree (((lower(a4_) IS NULL)))");
assertEquals(expectedIndexMap, indexMap);
}
public void testGoFaster() throws Exception {
Query q = new IqlQuery("SELECT Company, Department FROM Company, Department WHERE Department.company CONTAINS Company", "org.intermine.model.testmodel").toQuery();
try {
((ObjectStoreInterMineImpl) os).goFaster(q);
Results r = os.execute(q);
r.get(0);
assertEquals(3, r.size());
} finally {
((ObjectStoreInterMineImpl) os).releaseGoFaster(q);
}
}
public void testPrecomputeWithNullsInOrder() throws Exception {
Types t1 = new Types();
t1.setIntObjType(null);
t1.setLongObjType(new Long(234212354));
t1.setName("fred");
storeDataWriter.store(t1);
Types t2 = new Types();
t2.setIntObjType(new Integer(278652));
t2.setLongObjType(null);
t2.setName("fred");
storeDataWriter.store(t2);
Query q = new Query();
QueryClass qc = new QueryClass(Types.class);
QueryField into = new QueryField(qc, "intObjType");
QueryField longo = new QueryField(qc, "longObjType");
q.addFrom(qc);
q.addToSelect(into);
q.addToSelect(longo);
q.addToSelect(qc);
q.setDistinct(false);
((ObjectStoreInterMineImpl) os).precompute(q, "test");
Results r = os.execute(q);
r.setBatchSize(1);
SqlGenerator.registerOffset(q, 1, ((ObjectStoreInterMineImpl) os).getSchema(), ((ObjectStoreInterMineImpl) os).db, new Integer(100000), new HashMap());
ResultsRow row = (ResultsRow) r.get(1);
InterMineObject o = (InterMineObject) row.get(2);
assertEquals("Expected " + t2.toString() + " but got " + o.toString(), t2.getId(), o.getId());
row = (ResultsRow) r.get(2);
o = (InterMineObject) row.get(2);
assertEquals("Expected " + t1.toString() + " but got " + o.toString(), t1.getId(), o.getId());
q.setConstraint(new SimpleConstraint(into, ConstraintOp.GREATER_THAN, new QueryValue(new Integer(100000))));
q = QueryCloner.cloneQuery(q);
r = os.execute(q);
r.setBatchSize(10);
row = (ResultsRow) r.get(0);
o = (InterMineObject) row.get(2);
assertEquals("Expected " + t2.toString() + " but got " + o.toString(), t2.getId(), o.getId());
assertEquals(1, r.size());
storeDataWriter.delete(t1);
storeDataWriter.delete(t2);
}
public void testPrecomputeWithNegatives() throws Exception {
Types t1 = new Types();
t1.setLongObjType(new Long(-765187651234L));
t1.setIntObjType(new Integer(278652));
t1.setName("Fred");
storeDataWriter.store(t1);
Query q = new Query();
QueryClass qc = new QueryClass(Types.class);
QueryField into = new QueryField(qc, "intObjType");
QueryField longo = new QueryField(qc, "longObjType");
q.addFrom(qc);
q.addToSelect(into);
q.addToSelect(longo);
q.addToSelect(qc);
q.setDistinct(false);
((ObjectStoreInterMineImpl) os).precompute(q, "test");
Results r = os.execute(q);
r.setBatchSize(1);
SqlGenerator.registerOffset(q, 1, ((ObjectStoreInterMineImpl) os).getSchema(), ((ObjectStoreInterMineImpl) os).db, new Integer(278651), new HashMap());
ResultsRow row = (ResultsRow) r.get(1);
InterMineObject o = (InterMineObject) row.get(2);
assertEquals("Expected " + t1.toString() + " but got " + o.toString(), t1.getId(), o.getId());
try {
r.get(2);
fail("Expected size to be 2");
} catch (Exception e) {
}
assertEquals(2, r.size());
storeDataWriter.delete(t1);
}
public void testCancelMethods1() throws Exception {
Object id = "flibble1";
Connection c = ((ObjectStoreInterMineImpl) os).getConnection();
try {
Statement s = c.createStatement();
((ObjectStoreInterMineImpl) os).registerRequestId(id);
((ObjectStoreInterMineImpl) os).registerStatement(s);
((ObjectStoreInterMineImpl) os).deregisterStatement(s);
((ObjectStoreInterMineImpl) os).deregisterRequestId(id);
} finally {
((ObjectStoreInterMineImpl) os).releaseConnection(c);
}
}
public void testCancelMethods2() throws Exception {
Object id = "flibble2";
Connection c = ((ObjectStoreInterMineImpl) os).getConnection();
try {
Statement s = c.createStatement();
((ObjectStoreInterMineImpl) os).registerRequestId(id);
((ObjectStoreInterMineImpl) os).registerStatement(s);
((ObjectStoreInterMineImpl) os).cancelRequest(id);
((ObjectStoreInterMineImpl) os).deregisterStatement(s);
((ObjectStoreInterMineImpl) os).deregisterRequestId(id);
} finally {
((ObjectStoreInterMineImpl) os).releaseConnection(c);
}
}
public void testCancelMethods3() throws Exception {
Object id = "flibble3";
try {
((ObjectStoreInterMineImpl) os).deregisterRequestId(id);
fail("Should have thrown exception");
} catch (ObjectStoreException e) {
assertEquals("This Thread is not registered with ID flibble3", e.getMessage());
}
}
/*
// this test sometimes fails due to a race condition
public void testCancelMethods4() throws Exception {
Object id = "flibble4";
UndeclaredThrowableException failure = null;
// this test sometimes fails even when all is OK, so run it multiple times and exit if it
// passes
for (int i = 0 ;i < 20 ; i++) {
Connection c = ((ObjectStoreInterMineImpl) os).getConnection();
try {
Statement s = c.createStatement();
((ObjectStoreInterMineImpl) os).registerRequestId(id);
((ObjectStoreInterMineImpl) os).cancelRequest(id);
((ObjectStoreInterMineImpl) os).registerStatement(s);
fail("Should have thrown exception");
} catch (ObjectStoreException e) {
assertEquals("Request id flibble4 is cancelled", e.getMessage());
// test passed so stop immediately
return;
} catch (UndeclaredThrowableException t) {
// test failed but might pass next time - try again
failure = t;
} finally {
((ObjectStoreInterMineImpl) os).deregisterRequestId(id);
((ObjectStoreInterMineImpl) os).releaseConnection(c);
}
}
throw failure;
}
*/
public void testCancelMethods5() throws Exception {
UndeclaredThrowableException failure = null;
// this test sometimes fails even when all is OK, so run it multiple times and exit if it
// passes
for (int i = 0 ;i < 20 ; i++) {
Object id = "flibble5";
Connection c = ((ObjectStoreInterMineImpl) os).getConnection();
Statement s = null;
try {
s = c.createStatement();
((ObjectStoreInterMineImpl) os).registerRequestId(id);
((ObjectStoreInterMineImpl) os).registerStatement(s);
((ObjectStoreInterMineImpl) os).registerStatement(s);
fail("Should have thrown exception");
} catch (ObjectStoreException e) {
assertEquals("Request id flibble5 is currently being serviced in another thread. Don't share request IDs over multiple threads!", e.getMessage());
// test passed so stop immediately
return;
} catch (UndeclaredThrowableException t) {
// test failed but might pass next time - try again
failure = t;
} finally {
if (s != null) {
((ObjectStoreInterMineImpl) os).deregisterStatement(s);
}
((ObjectStoreInterMineImpl) os).deregisterRequestId(id);
((ObjectStoreInterMineImpl) os).releaseConnection(c);
}
}
throw failure;
}
/*
public void testCancelMethods6() throws Exception {
Object id = "flibble6";
Connection c = ((ObjectStoreInterMineImpl) os).getConnection();
Statement s = null;
long start = 0;
try {
s = c.createStatement();
s.execute("CREATE TABLE test (col1 int, col2 int)");
s.execute("INSERT INTO test VALUES (1, 1)");
s.execute("INSERT INTO test VALUES (1, 2)");
s.execute("INSERT INTO test VALUES (2, 1)");
s.execute("INSERT INTO test VALUES (2, 2)");
((ObjectStoreInterMineImpl) os).registerRequestId(id);
((ObjectStoreInterMineImpl) os).registerStatement(s);
Thread delayedCancel = new Thread(new DelayedCancel(id));
delayedCancel.start();
start = System.currentTimeMillis();
s.executeQuery("SELECT * FROM test AS a, test AS b, test AS c, test AS d, test AS e, test AS f, test AS g, test AS h, test AS i, test AS j, test AS k, test AS l, test AS m WHERE a.col2 = b.col1 AND b.col2 = c.col1 AND c.col2 = d.col1 AND d.col2 = e.col1 AND e.col2 = f.col1 AND f.col2 = g.col1 AND g.col2 = h.col1 AND h.col2 = i.col1 AND i.col2 = j.col1 AND j.col2 = k.col1 AND k.col2 = l.col1 AND l.col2 = m.col1");
System.out.println("testCancelMethods6: time for query = " + (System.currentTimeMillis() - start) + " ms");
fail("Request should have been cancelled");
} catch (SQLException e) {
if (start != 0) {
System.out.println("testCancelMethods6: time for query = " + (System.currentTimeMillis() - start) + " ms");
}
String errorString = e.getMessage().replaceFirst("statement", "query");
assertEquals("ERROR: canceling query due to user request", errorString);
} finally {
if (s != null) {
try {
((ObjectStoreInterMineImpl) os).deregisterStatement(s);
} catch (ObjectStoreException e) {
e.printStackTrace(System.out);
}
}
try {
((ObjectStoreInterMineImpl) os).deregisterRequestId(id);
} catch (ObjectStoreException e) {
e.printStackTrace(System.out);
}
try {
c.createStatement().execute("DROP TABLE test");
} catch (SQLException e) {
}
((ObjectStoreInterMineImpl) os).releaseConnection(c);
}
}
*/
/*This test does not work. This is due to a failing of JDBC. The Statement.cancel() method is
* not fully Thread-safe, in that if one performs a cancel() request just before a Statement is
* used, that operation will not be cancelled. There is a race condition between the
* ObjectStore.execute() method registering the Statement and the Statement becoming
* cancellable.
public void testCancelMethods7() throws Exception {
Object id = "flibble7";
Connection c = ((ObjectStoreInterMineImpl) os).getConnection();
Statement s = null;
long start = 0;
try {
s = c.createStatement();
s.execute("CREATE TABLE test (col1 int, col2 int)");
s.execute("INSERT INTO test VALUES (1, 1)");
s.execute("INSERT INTO test VALUES (1, 2)");
s.execute("INSERT INTO test VALUES (2, 1)");
s.execute("INSERT INTO test VALUES (2, 2)");
((ObjectStoreInterMineImpl) os).registerRequestId(id);
((ObjectStoreInterMineImpl) os).registerStatement(s);
start = System.currentTimeMillis();
s.cancel();
s.executeQuery("SELECT * FROM test AS a, test AS b, test AS c, test AS d, test AS e, test AS f, test AS g, test AS h, test AS i, test AS j, test AS k, test AS l, test AS m WHERE a.col2 = b.col1 AND b.col2 = c.col1 AND c.col2 = d.col1 AND d.col2 = e.col1 AND e.col2 = f.col1 AND f.col2 = g.col1 AND g.col2 = h.col1 AND h.col2 = i.col1 AND i.col2 = j.col1 AND j.col2 = k.col1 AND k.col2 = l.col1 AND l.col2 = m.col1");
System.out.println("testCancelMethods6: time for query = " + (System.currentTimeMillis() - start) + " ms");
fail("Request should have been cancelled");
} catch (SQLException e) {
if (start != 0) {
System.out.println("testCancelMethods6: time for query = " + (System.currentTimeMillis() - start) + " ms");
}
assertEquals("ERROR: canceling query due to user request", e.getMessage());
} finally {
if (s != null) {
try {
((ObjectStoreInterMineImpl) os).deregisterStatement(s);
} catch (ObjectStoreException e) {
e.printStackTrace(System.out);
}
}
try {
((ObjectStoreInterMineImpl) os).deregisterRequestId(id);
} catch (ObjectStoreException e) {
e.printStackTrace(System.out);
}
try {
c.createStatement().execute("DROP TABLE test");
} catch (SQLException e) {
}
((ObjectStoreInterMineImpl) os).releaseConnection(c);
}
}
public void testCancel() throws Exception {
Object id = "flibble8";
Query q = new IqlQuery("SELECT a, b, c, d, e FROM Employee AS a, Employee AS b, Employee AS c, Employee AS d, Employee AS e", "org.intermine.model.testmodel").toQuery();
((ObjectStoreInterMineImpl) os).registerRequestId(id);
try {
Thread delayedCancel = new Thread(new DelayedCancel(id));
delayedCancel.start();
Results r = os.execute(q);
r.setBatchSize(10000);
r.setNoOptimise();
r.setNoExplain();
r.get(0);
fail("Operation should have been cancelled");
} catch (RuntimeException e) {
assertEquals("ObjectStore error has occured (in get)", e.getMessage());
Throwable t = e.getCause();
if (!"Request id flibble8 is cancelled".equals(t.getMessage())) {
t = t.getCause();
String errorString = t.getMessage().replaceFirst("statement", "query");
assertEquals("ERROR: canceling query due to user request",errorString);
}
} finally {
((ObjectStoreInterMineImpl) os).deregisterRequestId(id);
}
}
*/
public void testCreateTempBagTables() throws Exception {
Query q = ObjectStoreQueriesTestCase.bagConstraint();
Map bagTableNames = ((ObjectStoreInterMineImpl) os).bagConstraintTables;
bagTableNames.clear();
Connection con = null;
try {
con = ((ObjectStoreInterMineImpl) os).getConnection();
con.setAutoCommit(false);
int minBagSize = ((ObjectStoreInterMineImpl) os).minBagTableSize;
((ObjectStoreInterMineImpl) os).minBagTableSize = 1;
((ObjectStoreInterMineImpl) os).createTempBagTables(con, q);
((ObjectStoreInterMineImpl) os).minBagTableSize = minBagSize;
assertEquals("Entries: " + bagTableNames, 1, bagTableNames.size());
String tableName = (String) bagTableNames.values().iterator().next();
Set expected = new HashSet();
Iterator bagIter = ((BagConstraint) q.getConstraint()).getBag().iterator();
while (bagIter.hasNext()) {
Object thisObject = bagIter.next();
if (thisObject instanceof String) {
expected.add(thisObject);
}
}
Statement s = con.createStatement();
ResultSet r = s.executeQuery("SELECT value FROM " + tableName);
r.next();
Set resultStrings = new HashSet();
resultStrings.add(r.getString(1));
r.next();
resultStrings.add(r.getString(1));
r.next();
resultStrings.add(r.getString(1));
try {
r.next();
} catch (SQLException e) {
// expected
}
assertEquals(expected, resultStrings);
} finally {
if (con != null) {
con.commit();
con.setAutoCommit(true);
((ObjectStoreInterMineImpl) os).releaseConnection(con);
}
}
}
public void testGetUniqueInteger() throws Exception {
ObjectStoreInterMineImpl osii = (ObjectStoreInterMineImpl) os;
Connection con = osii.getConnection();
con.setAutoCommit(false);
int integer1 = osii.getUniqueInteger(con);
int integer2 = osii.getUniqueInteger(con);
assertTrue(integer2 > integer1);
con.setAutoCommit(true);
int integer3 = osii.getUniqueInteger(con);
int integer4 = osii.getUniqueInteger(con);
assertTrue(integer3 > integer2);
assertTrue(integer4 > integer3);
}
private static class DelayedCancel implements Runnable
{
private Object id;
public DelayedCancel(Object id) {
this.id = id;
}
public void run() {
try {
Thread.sleep(100);
} catch (InterruptedException e) {
}
try {
((ObjectStoreInterMineImpl) os).cancelRequest(id);
} catch (ObjectStoreException e) {
e.printStackTrace(System.out);
}
}
}
public void testIsPrecomputed() throws Exception {
Query q = new Query();
QueryClass qc = new QueryClass(Employee.class);
QueryField qf = new QueryField(qc,"age");
SimpleConstraint sc = new SimpleConstraint(qf,ConstraintOp.GREATER_THAN,new QueryValue(new Integer(20)));
q.addToSelect(qc);
q.addFrom(qc);
q.setConstraint(sc);
assertFalse(((ObjectStoreInterMineImpl)os).isPrecomputed(q,"template"));
((ObjectStoreInterMineImpl)os).precompute(q, "template");
assertTrue(((ObjectStoreInterMineImpl)os).isPrecomputed(q,"template"));
ObjectStoreBag osb = storeDataWriter.createObjectStoreBag();
storeDataWriter.addToBag(osb, new Integer(5));
assertTrue(((ObjectStoreInterMineImpl)os).isPrecomputed(q,"template"));
storeDataWriter.store((Employee) data.get("EmployeeA1"));
assertFalse(((ObjectStoreInterMineImpl)os).isPrecomputed(q,"template"));
}
public void testObjectStoreBag() throws Exception {
System.out.println("Starting testObjectStoreBag");
ObjectStoreBag osb = storeDataWriter.createObjectStoreBag();
ArrayList coll = new ArrayList();
coll.add(new Integer(3));
coll.add(((Employee) data.get("EmployeeA1")).getId());
coll.add(((Employee) data.get("EmployeeA2")).getId());
coll.add(new Integer(20));
coll.add(new Integer(23));
coll.add(new Integer(30));
storeDataWriter.beginTransaction();
storeDataWriter.addAllToBag(osb, coll);
Query q = new Query();
q.addToSelect(osb);
SingletonResults r = os.executeSingleton(q);
assertEquals(Collections.EMPTY_LIST, r);
q = new Query();
q.addToSelect(osb);
r = os.executeSingleton(q);
storeDataWriter.commitTransaction();
try {
r.get(0);
fail("Expected: ConcurrentModificationException");
} catch (ConcurrentModificationException e) {
}
q = new Query();
q.addToSelect(osb);
r = os.executeSingleton(q);
assertEquals(coll, r);
q = new Query();
QueryClass qc = new QueryClass(Employee.class);
q.addFrom(qc);
q.addToSelect(qc);
q.setConstraint(new BagConstraint(qc, ConstraintOp.IN, osb));
r = os.executeSingleton(q);
assertEquals(Arrays.asList(new Object[] {data.get("EmployeeA1"), data.get("EmployeeA2")}), r);
ObjectStoreBag osb2 = storeDataWriter.createObjectStoreBag();
storeDataWriter.addToBag(osb2, ((Employee) data.get("EmployeeA1")).getId());
storeDataWriter.addToBagFromQuery(osb2, q);
q = new Query();
q.addToSelect(osb2);
r = os.executeSingleton(q);
assertEquals(Arrays.asList(new Object[] {((Employee) data.get("EmployeeA1")).getId(), ((Employee) data.get("EmployeeA2")).getId()}), r);
}
public void testClosedConnectionBug() throws Exception {
Query pq = new Query();
QueryClass qc = new QueryClass(Employee.class);
pq.addFrom(qc);
pq.addToSelect(qc);
((ObjectStoreInterMineImpl) os).precompute(pq, "Whatever");
Query q = new Query();
QueryClass qc1 = new QueryClass(Manager.class);
QueryClass qc2 = new QueryClass(Manager.class);
QueryClass qc3 = new QueryClass(Manager.class);
QueryClass qc4 = new QueryClass(Manager.class);
QueryClass qc5 = new QueryClass(Manager.class);
QueryClass qc6 = new QueryClass(Manager.class);
QueryClass qc7 = new QueryClass(Manager.class);
QueryClass qc8 = new QueryClass(Manager.class);
QueryClass qc9 = new QueryClass(Manager.class);
q.addFrom(qc1);
q.addFrom(qc2);
q.addFrom(qc3);
q.addFrom(qc4);
q.addFrom(qc5);
q.addFrom(qc6);
q.addFrom(qc7);
q.addFrom(qc8);
q.addFrom(qc9);
q.addToSelect(qc1);
q.addToSelect(qc2);
q.addToSelect(qc3);
q.addToSelect(qc4);
q.addToSelect(qc5);
q.addToSelect(qc6);
q.addToSelect(qc7);
q.addToSelect(qc8);
q.addToSelect(qc9);
ConstraintSet cs = new ConstraintSet(ConstraintOp.AND);
q.setConstraint(cs);
cs.addConstraint(new SimpleConstraint(new QueryField(qc1, "id"), ConstraintOp.EQUALS, new QueryValue(new Integer(1))));
cs.addConstraint(new SimpleConstraint(new QueryField(qc1, "id"), ConstraintOp.EQUALS, new QueryValue(new Integer(2))));
cs.addConstraint(new ClassConstraint(qc1, ConstraintOp.EQUALS, qc2));
cs.addConstraint(new ClassConstraint(qc1, ConstraintOp.EQUALS, qc3));
cs.addConstraint(new ClassConstraint(qc1, ConstraintOp.EQUALS, qc4));
cs.addConstraint(new ClassConstraint(qc1, ConstraintOp.EQUALS, qc5));
cs.addConstraint(new ClassConstraint(qc1, ConstraintOp.EQUALS, qc6));
cs.addConstraint(new ClassConstraint(qc1, ConstraintOp.EQUALS, qc7));
cs.addConstraint(new ClassConstraint(qc1, ConstraintOp.EQUALS, qc8));
cs.addConstraint(new ClassConstraint(qc1, ConstraintOp.EQUALS, qc9));
assertEquals(Collections.EMPTY_LIST, os.execute(q, 0, 1000, true, true, ObjectStore.SEQUENCE_IGNORE));
}
public void testFailFast() throws Exception {
Query q1 = new Query();
ObjectStoreBag osb1 = new ObjectStoreBag(100);
q1.addToSelect(osb1);
Query q2 = new Query();
ObjectStoreBag osb2 = new ObjectStoreBag(200);
q2.addToSelect(osb2);
Query q3 = new Query();
QueryClass qc1 = new QueryClass(Employee.class);
q3.addFrom(qc1);
q3.addToSelect(qc1);
Results r1 = os.execute(q1);
Results r2 = os.execute(q2);
Results r3 = os.execute(q3);
storeDataWriter.addToBag(osb1, new Integer(1));
try {
r1.iterator().hasNext();
fail("Expected: ConcurrentModificationException");
} catch (ConcurrentModificationException e) {
}
r2.iterator().hasNext();
r3.iterator().hasNext();
r1 = os.execute(q1);
r2 = os.execute(q2);
r3 = os.execute(q3);
storeDataWriter.addToBag(osb2, new Integer(2));
r1.iterator().hasNext();
try {
r2.iterator().hasNext();
fail("Expected: ConcurrentModificationException");
} catch (ConcurrentModificationException e) {
}
r3.iterator().hasNext();
r1 = os.execute(q1);
r2 = os.execute(q2);
r3 = os.execute(q3);
storeDataWriter.store((Employee) data.get("EmployeeA1"));
r1.iterator().hasNext();
r2.iterator().hasNext();
try {
r3.iterator().hasNext();
fail("Expected: ConcurrentModificationException");
} catch (ConcurrentModificationException e) {
}
}
}
| Removed ObjectStoreInterMineImplTes.testCancelMethods5() as it occasionally
fails due to a race condition.
| intermine/objectstore/test/src/org/intermine/objectstore/intermine/ObjectStoreInterMineImplTest.java | Removed ObjectStoreInterMineImplTes.testCancelMethods5() as it occasionally fails due to a race condition. | <ide><path>ntermine/objectstore/test/src/org/intermine/objectstore/intermine/ObjectStoreInterMineImplTest.java
<ide> }
<ide> */
<ide>
<add> /*
<add> // this test sometimes fails due to a race condition
<ide> public void testCancelMethods5() throws Exception {
<ide> UndeclaredThrowableException failure = null;
<ide>
<ide>
<ide> throw failure;
<ide> }
<add>*/
<ide>
<ide> /*
<ide> public void testCancelMethods6() throws Exception { |
|
Java | mit | error: pathspec 'src/com/jeffreydiaz/collections/UnorderedMaxPQ.java' did not match any file(s) known to git
| e8b83230a88b355a324c82d841c0416a66c5b976 | 1 | JayDz/Java_Data_Structures_and_Algorithms | package com.jeffreydiaz.collections;
/**
* Implementation of an unordered Priority Queue where the max key can be removed.
* Operation Cost:
* remove: ~N
* insert: ~1 (however, we may need to resize array).
* @author Jeffrey Diaz
*/
public class UnorderedMaxPQ<Key extends Comparable<Key>> extends AbstractUnorderedPQ<Key> {
/**
* Create an empty priority queue with an initial capacity of 8.
*/
public UnorderedMaxPQ()
{
super();
}
/**
* Create an empty priority queue with an initial capacity of capacity.
* @param capacity initial array capacity.
*/
public UnorderedMaxPQ(int capacity)
{
super(capacity);
}
/**
* Remove the min key from priority queue.
* @return min key.
*/
@Override
protected Key removeKey()
{
int max = 0;
for (int i = 1; i < size(); ++i) {
if (less(keys[max], keys[i])) {
max = i;
}
}
Key ret = keys[max];
keys[max] = null;
return ret;
}
} | src/com/jeffreydiaz/collections/UnorderedMaxPQ.java | Implementation of a priority queue where the max value can be removed.
| src/com/jeffreydiaz/collections/UnorderedMaxPQ.java | Implementation of a priority queue where the max value can be removed. | <ide><path>rc/com/jeffreydiaz/collections/UnorderedMaxPQ.java
<add>package com.jeffreydiaz.collections;
<add>
<add>/**
<add> * Implementation of an unordered Priority Queue where the max key can be removed.
<add> * Operation Cost:
<add> * remove: ~N
<add> * insert: ~1 (however, we may need to resize array).
<add> * @author Jeffrey Diaz
<add> */
<add>public class UnorderedMaxPQ<Key extends Comparable<Key>> extends AbstractUnorderedPQ<Key> {
<add>
<add> /**
<add> * Create an empty priority queue with an initial capacity of 8.
<add> */
<add> public UnorderedMaxPQ()
<add> {
<add> super();
<add> }
<add>
<add> /**
<add> * Create an empty priority queue with an initial capacity of capacity.
<add> * @param capacity initial array capacity.
<add> */
<add> public UnorderedMaxPQ(int capacity)
<add> {
<add> super(capacity);
<add> }
<add>
<add> /**
<add> * Remove the min key from priority queue.
<add> * @return min key.
<add> */
<add> @Override
<add> protected Key removeKey()
<add> {
<add> int max = 0;
<add> for (int i = 1; i < size(); ++i) {
<add> if (less(keys[max], keys[i])) {
<add> max = i;
<add> }
<add> }
<add>
<add> Key ret = keys[max];
<add> keys[max] = null;
<add> return ret;
<add> }
<add>} |
|
JavaScript | agpl-3.0 | 162edf6cf44b672c2ea5e0299a825bd1d393476a | 0 | isard-vdi/isard,isard-vdi/isard,isard-vdi/isard,isard-vdi/isard,isard-vdi/isard | /*
* Copyright 2017 the Isard-vdi project authors:
* Josep Maria Viñolas Auquer
* Alberto Larraz Dalmases
* License: AGPLv3
*/
var users_table= ''
$(document).ready(function() {
$('.admin-status').show()
$template = $(".template-detail-users");
$('.btn-new-user').on('click', function () {
setQuotaMax('#users-quota',kind='category',id=false,disabled=false);
$('#modalAddUser').modal({backdrop: 'static', keyboard: false}).modal('show');
$('#modalAddUserForm')[0].reset();
setModalUser();
});
$('.btn-new-bulkusers').on('click', function () {
setQuotaMax('#bulkusers-quota',kind='category',id=false,disabled=false);
$('#modalAddBulkUsers').modal({backdrop: 'static', keyboard: false}).modal('show');
$('#modalAddBulkUsersForm')[0].reset();
setModalUser();
});
$('#btn-download-bulkusers').on('click', function () {
var viewerFile = new Blob(["username,name,email,password\njdoe,John Doe,[email protected],sup3rs3cr3t\nauser,Another User,[email protected],a1sera1ser"], {type: "text/csv"});
var a = document.createElement('a');
a.download = 'bulk-users-template.csv';
a.href = window.URL.createObjectURL(viewerFile);
var ev = document.createEvent("MouseEvents");
ev.initMouseEvent("click", true, false, self, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
a.dispatchEvent(ev);
});
$("#modalAddUser #send").on('click', function(e){
var form = $('#modalAddUserForm');
formdata = form.serializeObject()
form.parsley().validate();
if (form.parsley().isValid()){ // || 'unlimited' in formdata){
data=userQuota2dict(formdata);
data['password']=data['password-add-user'];
delete data['password-add-user'];
delete data['password2-add-user'];
delete data['unlimited'];
data['id']=data['username']=$('#modalAddUserForm #id').val();
socket.emit('user_add',data);
}
});
$("#modalEditUser #send").on('click', function(e){
var form = $('#modalEditUserForm');
formdata = form.serializeObject()
form.parsley().validate();
if (form.parsley().isValid()){ // || 'unlimited' in formdata){
data=userQuota2dict(formdata);
delete data['unlimited']
//data['id']=$('#modalEditUserForm #id').val();
socket.emit('user_edit',data)
}
});
$("#modalPasswdUser #send").on('click', function(e){
var form = $('#modalPasswdUserForm');
form.parsley().validate();
if (form.parsley().isValid()){
data={}
data['id']=data['username']=$('#modalPasswdUserForm #id').val();
data['name']=$('#modalPasswdUserForm #name').val();
data['password']=$('#modalPasswdUserForm #password-reset').val();
socket.emit('user_passwd',data)
}
});
$("#modalDeleteUserTree #send").on('click', function(e){
//~ var form = $('#modalDeleteUserForm');
//~ data=$('#modalDeleteUserForm').serializeObject();
//~ form.parsley().validate();
//~ if (form.parsley().isValid()){
//~ data=quota2dict($('#modalDeleteUserForm').serializeObject());
//~ socket.emit('user_delete',data)
//~ }
});
$("#modalDeleteUser #send").on('click', function(e){
id=$('#modalDeleteUserForm #id').val();
socket.emit('user_delete',id)
});
document.getElementById('csv').addEventListener('change', readFile, false);
var filecontents=''
function readFile (evt) {
var files = evt.target.files;
var file = files[0];
var reader = new FileReader();
reader.onload = function(event) {
filecontents=event.target.result;
}
reader.readAsText(file, 'UTF-8')
}
function toObject(names, values) {
var result = {};
for (var i = 0; i < names.length; i++)
result[names[i]] = values[i];
return result;
}
function parseCSV(){
lines=filecontents.split('\n')
header=lines[0].split(',')
users=[]
$.each(lines, function(n, l){
if(n!=0 && l.length > 10){
usr=toObject(header,l.split(','))
usr['id']=usr['username']
users.push(usr)
}
})
return users;
}
$("#modalAddBulkUsers #send").on('click', function(e){
var form = $('#modalAddBulkUsersForm');
formdata = form.serializeObject()
form.parsley().validate();
if (form.parsley().isValid()){ // || 'unlimited' in formdata){
data=userQuota2dict(formdata);
delete data['unlimited']
users=parseCSV()
socket.emit('bulkusers_add',{'data':data,'users':users})
}
});
var form = $('#modalEditUserForm');
formdata = form.serializeObject()
form.parsley().validate();
if (form.parsley().isValid()){ // || 'unlimited' in formdata){
data=userQuota2dict(formdata);
delete data['unlimited']
//data['id']=$('#modalEditUserForm #id').val();
socket.emit('user_edit',data)
}
/* $("#add-role").on('change', function(e){
setQuotaTableDefaults('#users-quota','roles',$(this).val())
}); */
$("#add-category").on('change', function(e){
setQuotaMax('#users-quota',kind='category',id=$(this).val(),disabled=false);
//setQuotaTableDefaults('#users-quota','categories',$(this).val())
});
$("#add-group").on('change', function(e){
setQuotaMax('#users-quota',kind='group',id=$(this).val(),disabled=false);
//setQuotaTableDefaults('#users-quota','groups',$(this).val())
});
/* $("#edit-role").on('change', function(e){
setQuotaTableDefaults('#edit-users-quota','roles',$(this).val())
});
$("#edit-category").on('change', function(e){
setQuotaTableDefaults('#edit-users-quota','categories',$(this).val())
});
$("#edit-group").on('change', function(e){
setQuotaTableDefaults('#edit-users-quota','groups',$(this).val())
}); */
$("#bulk-role").on('change', function(e){
setQuotaTableDefaults('#bulkusers-quota','roles',$(this).val())
});
$("#bulk-category").on('change', function(e){
setQuotaTableDefaults('#bulkusers-quota','categories',$(this).val())
});
$("#bulk-group").on('change', function(e){
setQuotaTableDefaults('#bulkusers-quota','groups',$(this).val())
});
$('#domains_tree input:checkbox').on('ifChecked', function(event){
$(this).closest('div').next('ul').find('input:checkbox').iCheck('check').attr('disabled',true) //.prop('disabled',true);
});
$('#domains_tree input:checkbox').on('ifUnchecked', function(event){
$(this).closest('div').next('ul').find('input:checkbox').iCheck('uncheck').attr('disabled',false)
});
users_table=$('#users').DataTable( {
"ajax": {
"url": "/isard-admin/admin/users/get/",
"dataSrc": ""
},
"language": {
"loadingRecords": '<i class="fa fa-spinner fa-pulse fa-3x fa-fw"></i><span class="sr-only">Loading...</span>'
},
"columns": [
{
"className": 'details-control',
"orderable": false,
"data": null,
"width": "10px",
"defaultContent": '<button class="btn btn-xs btn-info" type="button" data-placement="top" ><i class="fa fa-plus"></i></button>'
},
{ "data": "active", "width": "10px"},
{ "data": "name"},
{ "data": "provider"},
{ "data": "category"},
{ "data": "uid"},
{ "data": "username"},
{ "data": "role", "width": "10px"},
{ "data": "group", "width": "10px"},
//~ {
//~ "data": null,
//~ className: "center xe-password",
//~ "defaultContent": ' \
//~ <div><i class="fa fa-lock"></i> \
//~ </div>'
//~ },
{ "data": "accessed"},
{ "data": "base", "width": "10px"},
{ "data": "user_template", "width": "10px"},
{ "data": "public_template", "width": "10px"},
{ "data": "desktops", "width": "10px"}],
"columnDefs": [
{
"targets": 1,
"render": function ( data, type, full, meta ) {
if(type === "display"){
if(full.active==true){
return '<i class="fa fa-check" style="color:lightgreen"></i>';
}else{
return '<i class="fa fa-close" style="color:darkgray"></i>';
}
}
return data;
}},
{
"targets":9,
"render": function ( data, type, full, meta ) {
return moment.unix(full.accessed).toISOString("YYYY-MM-DDTHH:mm:ssZ"); //moment.unix(full.accessed).fromNow();
}}
]
});
//~ });
$('#users').find('tbody').on('click', 'td.details-control', function () {
var tr = $(this).closest('tr');
var row = users_table.row( tr );
if ( row.child.isShown() ) {
row.child.hide();
tr.removeClass('shown');
}else {
if ( users_table.row( '.shown' ).length ) {
$('.details-control', users_table.row( '.shown' ).node()).click();
}
row.child( renderUsersDetailPannel(row.data()) ).show();
actionsUserDetail()
tr.addClass('shown');
setQuotaMax('.show-users-quota-'+row.data().id,kind='user',id=row.data().id,disabled=true);
setLimitsMax('.show-users-limits-'+row.data().id,kind='user',id=row.data().id,disabled=true);
}
});
socket = io.connect(location.protocol+'//' + document.domain + ':' + location.port+'/isard-admin/sio_admins');
socket.on('connect', function() {
connection_done();
socket.emit('join_rooms',['users'])
console.log('Listening users namespace');
});
socket.on('connect_error', function(data) {
connection_lost();
});
socket.on('user_quota', function(data) {
console.log('Quota update')
var data = JSON.parse(data);
drawUserQuota(data);
});
socket.on('users_data', function(data) {
console.log('User update')
users_table.ajax.reload()
//var data = JSON.parse(data);
//drawUserQuota(data);
});
socket.on('users_delete', function(data) {
console.log('User update')
users_table.ajax.reload()
//var data = JSON.parse(data);
//drawUserQuota(data);
});
socket.on('add_form_result', function (data) {
var data = JSON.parse(data);
//if(data.result){
$('form').each(function() { this.reset() });
$('.modal').modal('hide');
//}
new PNotify({
title: data.title,
text: data.text,
hide: true,
delay: 4000,
icon: 'fa fa-'+data.icon,
opacity: 1,
type: data.type
});
users_table.ajax.reload()
});
socket.on ('result', function (data) {
var data = JSON.parse(data);
new PNotify({
title: data.title,
text: data.text,
hide: true,
delay: 4000,
icon: 'fa fa-'+data.icon,
opacity: 1,
type: data.type
});
users_table.ajax.reload()
});
});
function actionsUserDetail(){
$('.btn-edit').on('click', function () {
var pk=$(this).closest("div").attr("data-pk");
$("#modalEditUserForm")[0].reset();
$('#modalEditUser').modal({
backdrop: 'static',
keyboard: false
}).modal('show');
setModalUser()
api.ajax('/isard-admin/admin/load/users/post','POST',{'id':pk}).done(function(user) {
$('#modalEditUserForm #name').val(user.name);
$('#modalEditUserForm #id').val(user.id);
$('#modalEditUserForm #uid').val(user.uid);
$('#modalEditUserForm #email').val(user.email);
$('#modalEditUserForm #role option:selected').prop("selected", false);
$('#modalEditUserForm #role option[value="'+user.role+'"]').prop("selected",true);
$('#modalEditUserForm #category option:selected').prop("selected", false);
$('#modalEditUserForm #category option[value="'+user.category+'"]').prop("selected",true);
$('#modalEditUserForm #group option:selected').prop("selected", false);
$('#modalEditUserForm #group option[value="'+user.group+'"]').prop("selected",true);
});
setQuotaMax('#edit-users-quota',kind='user',id=pk,disabled=false);
});
$('.btn-passwd').on('click', function () {
var closest=$(this).closest("div");
var pk=closest.attr("data-pk");
var name=closest.attr("data-name");
var username=closest.attr("data-username");
$("#modalPasswdUserForm")[0].reset();
$('#modalPasswdUser').modal({
backdrop: 'static',
keyboard: false
}).modal('show');
$('#modalPasswdUserForm #name').val(name);
$('#modalPasswdUserForm #id').val(pk);
$('#modalPasswdUserForm #username').val(username);
});
$('.btn-delete').on('click', function () {
var pk=$(this).closest("div").attr("data-pk");
$("#modalDeleteUserForm")[0].reset();
$('#modalDeleteUserForm #id').val(pk);
$('#modalDeleteUser').modal({
backdrop: 'static',
keyboard: false
}).modal('show');
api.ajax('/isard-admin/admin/user/delete','POST',{'pk':pk}).done(function(domains) {
$('#table_modal_delete tbody').empty()
$.each(domains, function(key, value) {
$('#table_modal_delete tbody').append('<tr>\
<th>'+value['kind']+'</th>\
<th>'+value['user']+'</th>\
<th>'+value['name']+'</th>\
</tr>');
});
});
});
$('.btn-active').on('click', function () {
var closest=$(this).closest("div");
var pk=closest.attr("data-pk");
var name=closest.attr("data-name");
new PNotify({
title: 'Confirmation Needed',
text: "Are you sure you want to enable/disable: "+name+"?",
hide: false,
opacity: 0.9,
confirm: {
confirm: true
},
buttons: {
closer: false,
sticker: false
},
history: {
history: false
},
addclass: 'pnotify-center'
}).get().on('pnotify.confirm', function() {
socket.emit('user_toggle',{'pk':pk,'name':name})
}).on('pnotify.cancel', function() {
});
});
}
function modal_edit_user(id){
$.ajax({
type: "GET",
url:"/isard-admin/desktops/templateUpdate/" + id,
success: function(data)
{
$('#modalEditDesktop #forced_hyp').closest("div").remove();
$('#modalEditDesktop #name_hidden').val(data.name);
$('#modalEditDesktop #name').val(data.name);
$('#modalEditDesktop #description').val(data.description);
$('#modalEditDesktop #id').val(data.id);
setHardwareDomainDefaults('#modalEditDesktop', id);
}
});
}
function renderUsersDetailPannel ( d ) {
if(d.id == 'local-default-admin-admin'){
$('.template-detail-users .btn-delete').hide()
}else{
$('.template-detail-users .btn-delete').show()
}
$newPanel = $template.clone();
$newPanel.html(function(i, oldHtml){
return oldHtml.replace(/d.id/g, d.id).replace(/d.name/g, d.name).replace(/d.username/g, d.username);
});
return $newPanel
}
function setModalUser(){
api.ajax_async('/isard-admin/admin/userschema','POST','').done(function(d) {
$.each(d, function(key, value) {
$("." + key).find('option').remove().end();
for(var i in d[key]){
if(value[i].id!='disposables' && value[i].id!='eval'){
$("."+key).append('<option value=' + value[i].id + '>' + value[i].name + '</option>');
//~ if(value[i].id=='local'){
//~ $("."+key+' option[value="'+value[i]+'"]').prop("selected",true);
//~ }
}
}
$("."+key+' option[value="local"]').prop("selected",true);
});
});
}
| webapp/webapp/webapp/static/admin/js/users.js | /*
* Copyright 2017 the Isard-vdi project authors:
* Josep Maria Viñolas Auquer
* Alberto Larraz Dalmases
* License: AGPLv3
*/
var users_table= ''
$(document).ready(function() {
$('.admin-status').show()
$template = $(".template-detail-users");
$('.btn-new-user').on('click', function () {
setQuotaMax('#users-quota',kind='category',id=false,disabled=false);
$('#modalAddUser').modal({backdrop: 'static', keyboard: false}).modal('show');
$('#modalAddUserForm')[0].reset();
setModalUser();
});
$('.btn-new-bulkusers').on('click', function () {
setQuotaMax('#bulkusers-quota',kind='category',id=false,disabled=false);
$('#modalAddBulkUsers').modal({backdrop: 'static', keyboard: false}).modal('show');
$('#modalAddBulkUsersForm')[0].reset();
setModalUser();
});
$('#btn-download-bulkusers').on('click', function () {
var viewerFile = new Blob(["username,name,email,password\njdoe,John Doe,[email protected],sup3rs3cr3t\nauser,Another User,[email protected],a1sera1ser"], {type: "text/csv"});
var a = document.createElement('a');
a.download = 'bulk-users-template.csv';
a.href = window.URL.createObjectURL(viewerFile);
var ev = document.createEvent("MouseEvents");
ev.initMouseEvent("click", true, false, self, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
a.dispatchEvent(ev);
});
$("#modalAddUser #send").on('click', function(e){
var form = $('#modalAddUserForm');
formdata = form.serializeObject()
form.parsley().validate();
if (form.parsley().isValid()){ // || 'unlimited' in formdata){
data=userQuota2dict(formdata);
data['password']=data['password-add-user'];
delete data['password-add-user'];
delete data['password2-add-user'];
delete data['unlimited']
data['id']=data['username']=$('#modalAddUserForm #id').val();
socket.emit('user_add',data)
}
});
$("#modalEditUser #send").on('click', function(e){
var form = $('#modalEditUserForm');
formdata = form.serializeObject()
form.parsley().validate();
if (form.parsley().isValid()){ // || 'unlimited' in formdata){
data=userQuota2dict(formdata);
delete data['unlimited']
//data['id']=$('#modalEditUserForm #id').val();
socket.emit('user_edit',data)
}
});
$("#modalPasswdUser #send").on('click', function(e){
var form = $('#modalPasswdUserForm');
form.parsley().validate();
if (form.parsley().isValid()){
data={}
data['id']=data['username']=$('#modalPasswdUserForm #id').val();
data['name']=$('#modalPasswdUserForm #name').val();
data['password']=$('#modalPasswdUserForm #password-reset').val();
socket.emit('user_passwd',data)
}
});
$("#modalDeleteUserTree #send").on('click', function(e){
//~ var form = $('#modalDeleteUserForm');
//~ data=$('#modalDeleteUserForm').serializeObject();
//~ form.parsley().validate();
//~ if (form.parsley().isValid()){
//~ data=quota2dict($('#modalDeleteUserForm').serializeObject());
//~ socket.emit('user_delete',data)
//~ }
});
$("#modalDeleteUser #send").on('click', function(e){
id=$('#modalDeleteUserForm #id').val();
socket.emit('user_delete',id)
});
document.getElementById('csv').addEventListener('change', readFile, false);
var filecontents=''
function readFile (evt) {
var files = evt.target.files;
var file = files[0];
var reader = new FileReader();
reader.onload = function(event) {
filecontents=event.target.result;
}
reader.readAsText(file, 'UTF-8')
}
function toObject(names, values) {
var result = {};
for (var i = 0; i < names.length; i++)
result[names[i]] = values[i];
return result;
}
function parseCSV(){
lines=filecontents.split('\n')
header=lines[0].split(',')
users=[]
$.each(lines, function(n, l){
if(n!=0 && l.length > 10){
usr=toObject(header,l.split(','))
usr['id']=usr['username']
users.push(usr)
}
})
return users;
}
$("#modalAddBulkUsers #send").on('click', function(e){
var form = $('#modalAddBulkUsersForm');
formdata = form.serializeObject()
form.parsley().validate();
if (form.parsley().isValid()){ // || 'unlimited' in formdata){
data=userQuota2dict(formdata);
delete data['unlimited']
users=parseCSV()
socket.emit('bulkusers_add',{'data':data,'users':users})
}
});
var form = $('#modalEditUserForm');
formdata = form.serializeObject()
form.parsley().validate();
if (form.parsley().isValid()){ // || 'unlimited' in formdata){
data=userQuota2dict(formdata);
delete data['unlimited']
//data['id']=$('#modalEditUserForm #id').val();
socket.emit('user_edit',data)
}
/* $("#add-role").on('change', function(e){
setQuotaTableDefaults('#users-quota','roles',$(this).val())
}); */
$("#add-category").on('change', function(e){
setQuotaMax('#users-quota',kind='category',id=$(this).val(),disabled=false);
//setQuotaTableDefaults('#users-quota','categories',$(this).val())
});
$("#add-group").on('change', function(e){
setQuotaMax('#users-quota',kind='group',id=$(this).val(),disabled=false);
//setQuotaTableDefaults('#users-quota','groups',$(this).val())
});
/* $("#edit-role").on('change', function(e){
setQuotaTableDefaults('#edit-users-quota','roles',$(this).val())
});
$("#edit-category").on('change', function(e){
setQuotaTableDefaults('#edit-users-quota','categories',$(this).val())
});
$("#edit-group").on('change', function(e){
setQuotaTableDefaults('#edit-users-quota','groups',$(this).val())
}); */
$("#bulk-role").on('change', function(e){
setQuotaTableDefaults('#bulkusers-quota','roles',$(this).val())
});
$("#bulk-category").on('change', function(e){
setQuotaTableDefaults('#bulkusers-quota','categories',$(this).val())
});
$("#bulk-group").on('change', function(e){
setQuotaTableDefaults('#bulkusers-quota','groups',$(this).val())
});
$('#domains_tree input:checkbox').on('ifChecked', function(event){
$(this).closest('div').next('ul').find('input:checkbox').iCheck('check').attr('disabled',true) //.prop('disabled',true);
});
$('#domains_tree input:checkbox').on('ifUnchecked', function(event){
$(this).closest('div').next('ul').find('input:checkbox').iCheck('uncheck').attr('disabled',false)
});
users_table=$('#users').DataTable( {
"ajax": {
"url": "/isard-admin/admin/users/get/",
"dataSrc": ""
},
"language": {
"loadingRecords": '<i class="fa fa-spinner fa-pulse fa-3x fa-fw"></i><span class="sr-only">Loading...</span>'
},
"columns": [
{
"className": 'details-control',
"orderable": false,
"data": null,
"width": "10px",
"defaultContent": '<button class="btn btn-xs btn-info" type="button" data-placement="top" ><i class="fa fa-plus"></i></button>'
},
{ "data": "active", "width": "10px"},
{ "data": "name"},
{ "data": "provider"},
{ "data": "category"},
{ "data": "uid"},
{ "data": "username"},
{ "data": "role", "width": "10px"},
{ "data": "group", "width": "10px"},
//~ {
//~ "data": null,
//~ className: "center xe-password",
//~ "defaultContent": ' \
//~ <div><i class="fa fa-lock"></i> \
//~ </div>'
//~ },
{ "data": "accessed"},
{ "data": "base", "width": "10px"},
{ "data": "user_template", "width": "10px"},
{ "data": "public_template", "width": "10px"},
{ "data": "desktops", "width": "10px"}],
"columnDefs": [
{
"targets": 1,
"render": function ( data, type, full, meta ) {
if(type === "display"){
if(full.active==true){
return '<i class="fa fa-check" style="color:lightgreen"></i>';
}else{
return '<i class="fa fa-close" style="color:darkgray"></i>';
}
}
return data;
}},
{
"targets":9,
"render": function ( data, type, full, meta ) {
return moment.unix(full.accessed).toISOString("YYYY-MM-DDTHH:mm:ssZ"); //moment.unix(full.accessed).fromNow();
}}
]
});
//~ });
$('#users').find('tbody').on('click', 'td.details-control', function () {
var tr = $(this).closest('tr');
var row = users_table.row( tr );
if ( row.child.isShown() ) {
row.child.hide();
tr.removeClass('shown');
}else {
if ( users_table.row( '.shown' ).length ) {
$('.details-control', users_table.row( '.shown' ).node()).click();
}
row.child( renderUsersDetailPannel(row.data()) ).show();
actionsUserDetail()
tr.addClass('shown');
setQuotaMax('.show-users-quota-'+row.data().id,kind='user',id=row.data().id,disabled=true);
setLimitsMax('.show-users-limits-'+row.data().id,kind='user',id=row.data().id,disabled=true);
}
});
socket = io.connect(location.protocol+'//' + document.domain + ':' + location.port+'/isard-admin/sio_admins');
socket.on('connect', function() {
connection_done();
socket.emit('join_rooms',['users'])
console.log('Listening users namespace');
});
socket.on('connect_error', function(data) {
connection_lost();
});
socket.on('user_quota', function(data) {
console.log('Quota update')
var data = JSON.parse(data);
drawUserQuota(data);
});
socket.on('users_data', function(data) {
console.log('User update')
users_table.ajax.reload()
//var data = JSON.parse(data);
//drawUserQuota(data);
});
socket.on('users_delete', function(data) {
console.log('User update')
users_table.ajax.reload()
//var data = JSON.parse(data);
//drawUserQuota(data);
});
socket.on('add_form_result', function (data) {
var data = JSON.parse(data);
//if(data.result){
$('form').each(function() { this.reset() });
$('.modal').modal('hide');
//}
new PNotify({
title: data.title,
text: data.text,
hide: true,
delay: 4000,
icon: 'fa fa-'+data.icon,
opacity: 1,
type: data.type
});
users_table.ajax.reload()
});
socket.on ('result', function (data) {
var data = JSON.parse(data);
new PNotify({
title: data.title,
text: data.text,
hide: true,
delay: 4000,
icon: 'fa fa-'+data.icon,
opacity: 1,
type: data.type
});
users_table.ajax.reload()
});
});
function actionsUserDetail(){
$('.btn-edit').on('click', function () {
var pk=$(this).closest("div").attr("data-pk");
$("#modalEditUserForm")[0].reset();
$('#modalEditUser').modal({
backdrop: 'static',
keyboard: false
}).modal('show');
setModalUser()
api.ajax('/isard-admin/admin/load/users/post','POST',{'id':pk}).done(function(user) {
$('#modalEditUserForm #name').val(user.name);
$('#modalEditUserForm #id').val(user.id);
$('#modalEditUserForm #uid').val(user.uid);
$('#modalEditUserForm #email').val(user.email);
$('#modalEditUserForm #role option:selected').prop("selected", false);
$('#modalEditUserForm #role option[value="'+user.role+'"]').prop("selected",true);
$('#modalEditUserForm #category option:selected').prop("selected", false);
$('#modalEditUserForm #category option[value="'+user.category+'"]').prop("selected",true);
$('#modalEditUserForm #group option:selected').prop("selected", false);
$('#modalEditUserForm #group option[value="'+user.group+'"]').prop("selected",true);
});
setQuotaMax('#edit-users-quota',kind='user',id=pk,disabled=false);
});
$('.btn-passwd').on('click', function () {
var closest=$(this).closest("div");
var pk=closest.attr("data-pk");
var name=closest.attr("data-name");
var username=closest.attr("data-username");
$("#modalPasswdUserForm")[0].reset();
$('#modalPasswdUser').modal({
backdrop: 'static',
keyboard: false
}).modal('show');
$('#modalPasswdUserForm #name').val(name);
$('#modalPasswdUserForm #id').val(pk);
$('#modalPasswdUserForm #username').val(username);
});
$('.btn-delete').on('click', function () {
var pk=$(this).closest("div").attr("data-pk");
$("#modalDeleteUserForm")[0].reset();
$('#modalDeleteUserForm #id').val(pk);
$('#modalDeleteUser').modal({
backdrop: 'static',
keyboard: false
}).modal('show');
api.ajax('/isard-admin/admin/user/delete','POST',{'pk':pk}).done(function(domains) {
$('#table_modal_delete tbody').empty()
$.each(domains, function(key, value) {
$('#table_modal_delete tbody').append('<tr>\
<th>'+value['kind']+'</th>\
<th>'+value['user']+'</th>\
<th>'+value['name']+'</th>\
</tr>');
});
});
});
$('.btn-active').on('click', function () {
var closest=$(this).closest("div");
var pk=closest.attr("data-pk");
var name=closest.attr("data-name");
new PNotify({
title: 'Confirmation Needed',
text: "Are you sure you want to enable/disable: "+name+"?",
hide: false,
opacity: 0.9,
confirm: {
confirm: true
},
buttons: {
closer: false,
sticker: false
},
history: {
history: false
},
addclass: 'pnotify-center'
}).get().on('pnotify.confirm', function() {
socket.emit('user_toggle',{'pk':pk,'name':name})
}).on('pnotify.cancel', function() {
});
});
}
function modal_edit_user(id){
$.ajax({
type: "GET",
url:"/isard-admin/desktops/templateUpdate/" + id,
success: function(data)
{
$('#modalEditDesktop #forced_hyp').closest("div").remove();
$('#modalEditDesktop #name_hidden').val(data.name);
$('#modalEditDesktop #name').val(data.name);
$('#modalEditDesktop #description').val(data.description);
$('#modalEditDesktop #id').val(data.id);
setHardwareDomainDefaults('#modalEditDesktop', id);
}
});
}
function renderUsersDetailPannel ( d ) {
if(d.id == 'local-default-admin-admin'){
$('.template-detail-users .btn-delete').hide()
}else{
$('.template-detail-users .btn-delete').show()
}
$newPanel = $template.clone();
$newPanel.html(function(i, oldHtml){
return oldHtml.replace(/d.id/g, d.id).replace(/d.name/g, d.name).replace(/d.username/g, d.username);
});
return $newPanel
}
function setModalUser(){
api.ajax_async('/isard-admin/admin/userschema','POST','').done(function(d) {
$.each(d, function(key, value) {
$("." + key).find('option').remove().end();
for(var i in d[key]){
if(value[i].id!='disposables' && value[i].id!='eval'){
$("."+key).append('<option value=' + value[i].id + '>' + value[i].name + '</option>');
//~ if(value[i].id=='local'){
//~ $("."+key+' option[value="'+value[i]+'"]').prop("selected",true);
//~ }
}
}
$("."+key+' option[value="local"]').prop("selected",true);
});
});
} | Code styling
| webapp/webapp/webapp/static/admin/js/users.js | Code styling | <ide><path>ebapp/webapp/webapp/static/admin/js/users.js
<ide> data['password']=data['password-add-user'];
<ide> delete data['password-add-user'];
<ide> delete data['password2-add-user'];
<del> delete data['unlimited']
<add> delete data['unlimited'];
<ide> data['id']=data['username']=$('#modalAddUserForm #id').val();
<del> socket.emit('user_add',data)
<add> socket.emit('user_add',data);
<ide> }
<ide> });
<ide> |
|
Java | apache-2.0 | 95e3277b7d9359ad8e09a4bb9643b12c759f542a | 0 | jdm64/GenesisChess-Android,jdm64/GenesisChess-Android | package com.chess.genesis;
import android.content.Context;
import android.content.SharedPreferences;
import android.os.Handler;
import android.os.Message;
import android.preference.PreferenceManager;
import java.io.IOException;
import java.net.SocketException;
import org.json.JSONException;
import org.json.JSONObject;
class NetworkClient implements Runnable
{
public final static int NONE = 0;
public final static int LOGIN = 1;
public final static int REGISTER = 2;
public final static int JOIN_GAME = 3;
public final static int NEW_GAME = 4;
public final static int READ_INBOX = 5;
public final static int CLEAR_INBOX = 6;
public final static int GAME_STATUS = 7;
public final static int GAME_INFO = 8;
public final static int SUBMIT_MOVE = 9;
public final static int SUBMIT_MSG = 10;
public final static int SYNC_GAMIDS = 11;
public final static int GAME_SCORE = 12;
public final static int GAME_DATA = 13;
public final static int RESIGN_GAME = 14;
private final Context context;
private final Handler callback;
private JSONObject json;
private int fid = NONE;
private boolean loginRequired;
private boolean error = false;
public NetworkClient(final Context _context, final Handler handler)
{
callback = handler;
context = _context;
}
private boolean relogin(final SocketClient net)
{
if (SocketClient.isLoggedin)
return true;
final SharedPreferences pref = PreferenceManager.getDefaultSharedPreferences(context);
final String username = pref.getString("username", "!error!");
final String password = pref.getString("passhash", "!error!");
JSONObject json2 = new JSONObject();
try {
try {
json2.put("request", "login");
json2.put("username", username);
json2.put("passhash", Crypto.LoginKey(password));
} catch (JSONException e) {
e.printStackTrace();
throw new RuntimeException();
}
} catch (SocketException e) {
json2 = new JSONObject();
try {
json2.put("result", "error");
json2.put("reason", "Can't contact server for sending data");
} catch (JSONException j) {
j.printStackTrace();
throw new RuntimeException();
}
error = true;
} catch (IOException e) {
json2 = new JSONObject();
try {
json2.put("result", "error");
json2.put("reason", "Lost connection durring sending data");
} catch (JSONException j) {
j.printStackTrace();
throw new RuntimeException();
}
error = true;
}
if (error) {
callback.sendMessage(Message.obtain(callback, fid, json2));
error = false;
return false;
}
try {
net.write(json2);
} catch (SocketException e) {
json2 = new JSONObject();
try {
json2.put("result", "error");
json2.put("reason", "Can't contact server for sending data");
} catch (JSONException j) {
j.printStackTrace();
throw new RuntimeException();
}
error = true;
} catch (IOException e) {
json2 = new JSONObject();
try {
json2.put("result", "error");
json2.put("reason", "Lost connection durring sending data");
} catch (JSONException j) {
j.printStackTrace();
throw new RuntimeException();
}
error = true;
}
if (error) {
callback.sendMessage(Message.obtain(callback, fid, json2));
error = false;
return false;
}
try {
json2 = net.read();
} catch (SocketException e) {
json2 = new JSONObject();
try {
json2.put("result", "error");
json2.put("reason", "Can't contact server for recieving data");
} catch (JSONException j) {
j.printStackTrace();
throw new RuntimeException();
}
} catch (IOException e) {
json2 = new JSONObject();
try {
json2.put("result", "error");
json2.put("reason", "Lost connection durring recieving data");
} catch (JSONException j) {
j.printStackTrace();
throw new RuntimeException();
}
} catch (JSONException e) {
json2 = new JSONObject();
try {
json2.put("result", "error");
json2.put("reason", "Server response illogical");
} catch (JSONException j) {
j.printStackTrace();
throw new RuntimeException();
}
}
if (error) {
callback.sendMessage(Message.obtain(callback, fid, json2));
error = false;
return false;
}
try {
if (!json2.getString("result").equals("ok")) {
callback.sendMessage(Message.obtain(callback, fid, json2));
return false;
}
SocketClient.isLoggedin = true;
return true;
} catch (JSONException e) {
e.printStackTrace();
throw new RuntimeException();
}
}
public void run()
{
final SocketClient net = new SocketClient();
JSONObject json2 = null;
if (error) {
error = false;
net.disconnect();
return;
} else if (loginRequired && !relogin(net)) {
net.disconnect();
return;
}
try {
net.write(json);
} catch (SocketException e) {
json2 = new JSONObject();
try {
json2.put("result", "error");
json2.put("reason", "Can't contact server for sending data");
} catch (JSONException j) {
j.printStackTrace();
throw new RuntimeException();
}
error = true;
} catch (IOException e) {
json2 = new JSONObject();
try {
json2.put("result", "error");
json2.put("reason", "Lost connection durring sending data");
} catch (JSONException j) {
j.printStackTrace();
throw new RuntimeException();
}
error = true;
}
if (error) {
net.disconnect();
callback.sendMessage(Message.obtain(callback, fid, json2));
error = false;
return;
}
try {
json2 = net.read();
} catch (SocketException e) {
json2 = new JSONObject();
try {
json2.put("result", "error");
json2.put("reason", "Can't contact server for recieving data");
} catch (JSONException j) {
j.printStackTrace();
throw new RuntimeException();
}
} catch (IOException e) {
json2 = new JSONObject();
try {
json2.put("result", "error");
json2.put("reason", "Lost connection durring recieving data");
} catch (JSONException j) {
j.printStackTrace();
throw new RuntimeException();
}
} catch (JSONException e) {
json2 = new JSONObject();
try {
json2.put("result", "error");
json2.put("reason", "Server response illogical");
} catch (JSONException j) {
j.printStackTrace();
throw new RuntimeException();
}
}
if (error)
error = false;
callback.sendMessage(Message.obtain(callback, fid, json2));
net.disconnect();
}
public void register(final String username, final String password, final String email)
{
fid = REGISTER;
loginRequired = false;
json = new JSONObject();
try {
json.put("request", "register");
json.put("username", username);
json.put("passhash", Crypto.HashPasswd(password));
json.put("email", email);
} catch (JSONException e) {
e.printStackTrace();
throw new RuntimeException();
}
}
public void login_user(final String username, final String password)
{
fid = LOGIN;
loginRequired = false;
JSONObject json2 = null;
json = new JSONObject();
try {
try {
json.put("request", "login");
json.put("username", username);
json.put("passhash", Crypto.LoginKey(password));
} catch (JSONException e) {
e.printStackTrace();
throw new RuntimeException();
}
} catch (SocketException e) {
json2 = new JSONObject();
try {
json2.put("result", "error");
json2.put("reason", "Can't contact server for sending data");
} catch (JSONException j) {
j.printStackTrace();
throw new RuntimeException();
}
error = true;
} catch (IOException e) {
json2 = new JSONObject();
try {
json2.put("result", "error");
json2.put("reason", "Lost connection durring sending data");
} catch (JSONException j) {
j.printStackTrace();
throw new RuntimeException();
}
error = true;
}
if (error) {
callback.sendMessage(Message.obtain(callback, fid, json2));
error = true;
}
}
public void join_game(final String gametype)
{
fid = JOIN_GAME;
loginRequired = true;
json = new JSONObject();
try {
json.put("request", "joingame");
json.put("gametype", gametype);
} catch (JSONException e) {
e.printStackTrace();
throw new RuntimeException();
}
}
public void new_game(final String opponent, final String gametype, final String color)
{
fid = NEW_GAME;
loginRequired = true;
json = new JSONObject();
try {
json.put("request", "newgame");
json.put("opponent", opponent);
json.put("gametype", gametype);
json.put("color", color);
} catch (JSONException e) {
e.printStackTrace();
throw new RuntimeException();
}
}
public void submit_move(final String gameid, final String move)
{
fid = SUBMIT_MOVE;
loginRequired = true;
json = new JSONObject();
try {
json.put("request", "sendmove");
json.put("gameid", gameid);
json.put("move", move);
} catch (JSONException e) {
e.printStackTrace();
throw new RuntimeException();
}
}
public void resign_game(final String gameid)
{
fid = RESIGN_GAME;
loginRequired = true;
json = new JSONObject();
try {
json.put("request", "resign");
json.put("gameid", gameid);
} catch (JSONException e) {
e.printStackTrace();
throw new RuntimeException();
}
}
public void submit_msg(final String gameid, final String msg)
{
fid = SUBMIT_MSG;
loginRequired = true;
json = new JSONObject();
try {
json.put("request", "sendmsg");
json.put("gameid", gameid);
json.put("msg", msg);
} catch (JSONException e) {
e.printStackTrace();
throw new RuntimeException();
}
}
public void game_status(final String gameid)
{
fid = GAME_STATUS;
loginRequired = true;
json = new JSONObject();
try {
json.put("request", "gamestatus");
json.put("gameid", gameid);
} catch (JSONException e) {
e.printStackTrace();
throw new RuntimeException();
}
}
public void game_info(final String gameid)
{
fid = GAME_INFO;
loginRequired = true;
json = new JSONObject();
try {
json.put("request", "gameinfo");
json.put("gameid", gameid);
} catch (JSONException e) {
e.printStackTrace();
throw new RuntimeException();
}
}
public void game_data(final String gameid)
{
fid = GAME_DATA;
loginRequired = true;
json = new JSONObject();
try {
json.put("request", "gamedata");
json.put("gameid", gameid);
} catch (JSONException e) {
e.printStackTrace();
throw new RuntimeException();
}
}
public void read_inbox()
{
fid = READ_INBOX;
loginRequired = true;
json = new JSONObject();
try {
json.put("request", "inbox");
} catch (JSONException e) {
e.printStackTrace();
throw new RuntimeException();
}
}
public void clear_inbox(final long time)
{
fid = CLEAR_INBOX;
loginRequired = true;
json = new JSONObject();
try {
json.put("request", "clearinbox");
json.put("time", time);
} catch (JSONException e) {
e.printStackTrace();
throw new RuntimeException();
}
}
public void sync_gameids(final String type)
{
fid = SYNC_GAMIDS;
loginRequired = true;
json = new JSONObject();
try {
json.put("request", "gameids");
json.put("type", type);
} catch (JSONException e) {
e.printStackTrace();
throw new RuntimeException();
}
}
public void game_score(final String gameid)
{
fid = GAME_SCORE;
loginRequired = true;
json = new JSONObject();
try {
json.put("request", "gamescore");
json.put("gameid", gameid);
} catch (JSONException e) {
e.printStackTrace();
throw new RuntimeException();
}
}
}
| src/com/chess/genesis/NetworkClient.java | package com.chess.genesis;
import android.content.Context;
import android.content.SharedPreferences;
import android.os.Handler;
import android.os.Message;
import android.preference.PreferenceManager;
import java.io.IOException;
import java.net.SocketException;
import org.json.JSONException;
import org.json.JSONObject;
class NetworkClient implements Runnable
{
public final static int NONE = 0;
public final static int LOGIN = 1;
public final static int REGISTER = 2;
public final static int JOIN_GAME = 3;
public final static int NEW_GAME = 4;
public final static int READ_INBOX = 5;
public final static int CLEAR_INBOX = 6;
public final static int GAME_STATUS = 7;
public final static int GAME_INFO = 8;
public final static int SUBMIT_MOVE = 9;
public final static int SUBMIT_MSG = 10;
public final static int SYNC_GAMIDS = 11;
public final static int GAME_SCORE = 12;
public final static int GAME_DATA = 13;
public final static int RESIGN_GAME = 14;
private final Context context;
private final Handler callback;
private JSONObject json;
private int fid = NONE;
private boolean loginRequired;
private boolean error = false;
public NetworkClient(final Context _context, final Handler handler)
{
callback = handler;
context = _context;
}
private boolean relogin(final SocketClient net)
{
if (SocketClient.isLoggedin)
return true;
final SharedPreferences pref = PreferenceManager.getDefaultSharedPreferences(context);
final String username = pref.getString("username", "!error!");
final String password = pref.getString("passhash", "!error!");
JSONObject json2 = new JSONObject();
try {
try {
json2.put("request", "login");
json2.put("username", username);
json2.put("passhash", Crypto.LoginKey(password));
} catch (JSONException e) {
e.printStackTrace();
throw new RuntimeException();
}
} catch (SocketException e) {
json2 = new JSONObject();
try {
json2.put("result", "error");
json2.put("reason", "Can't contact server for sending data");
} catch (JSONException j) {
j.printStackTrace();
throw new RuntimeException();
}
error = true;
} catch (IOException e) {
json2 = new JSONObject();
try {
json2.put("result", "error");
json2.put("reason", "Lost connection durring sending data");
} catch (JSONException j) {
j.printStackTrace();
throw new RuntimeException();
}
error = true;
}
if (error) {
callback.sendMessage(Message.obtain(callback, fid, json2));
error = false;
return false;
}
try {
net.write(json2);
} catch (SocketException e) {
json2 = new JSONObject();
try {
json2.put("result", "error");
json2.put("reason", "Can't contact server for sending data");
} catch (JSONException j) {
j.printStackTrace();
throw new RuntimeException();
}
error = true;
} catch (IOException e) {
json2 = new JSONObject();
try {
json2.put("result", "error");
json2.put("reason", "Lost connection durring sending data");
} catch (JSONException j) {
j.printStackTrace();
throw new RuntimeException();
}
error = true;
}
if (error) {
callback.sendMessage(Message.obtain(callback, fid, json2));
error = false;
return false;
}
try {
json2 = net.read();
} catch (SocketException e) {
json2 = new JSONObject();
try {
json2.put("result", "error");
json2.put("reason", "Can't contact server for recieving data");
} catch (JSONException j) {
j.printStackTrace();
throw new RuntimeException();
}
} catch (IOException e) {
json2 = new JSONObject();
try {
json2.put("result", "error");
json2.put("reason", "Lost connection durring recieving data");
} catch (JSONException j) {
j.printStackTrace();
throw new RuntimeException();
}
} catch (JSONException e) {
json2 = new JSONObject();
try {
json2.put("result", "error");
json2.put("reason", "Server response illogical");
} catch (JSONException j) {
j.printStackTrace();
throw new RuntimeException();
}
}
if (error) {
callback.sendMessage(Message.obtain(callback, fid, json2));
error = false;
return false;
}
try {
if (!json2.getString("result").equals("ok")) {
callback.sendMessage(Message.obtain(callback, fid, json2));
return false;
}
SocketClient.isLoggedin = true;
return true;
} catch (JSONException e) {
return false;
}
}
public void run()
{
final SocketClient net = new SocketClient();
JSONObject json2 = null;
if (error) {
error = false;
return;
}
if (loginRequired && !relogin(net)) {
net.disconnect();
return;
}
try {
net.write(json);
} catch (SocketException e) {
json2 = new JSONObject();
try {
json2.put("result", "error");
json2.put("reason", "Can't contact server for sending data");
} catch (JSONException j) {
j.printStackTrace();
throw new RuntimeException();
}
error = true;
} catch (IOException e) {
json2 = new JSONObject();
try {
json2.put("result", "error");
json2.put("reason", "Lost connection durring sending data");
} catch (JSONException j) {
j.printStackTrace();
throw new RuntimeException();
}
error = true;
}
if (error) {
callback.sendMessage(Message.obtain(callback, fid, json2));
error = false;
return;
}
try {
json2 = net.read();
} catch (SocketException e) {
json2 = new JSONObject();
try {
json2.put("result", "error");
json2.put("reason", "Can't contact server for recieving data");
} catch (JSONException j) {
j.printStackTrace();
throw new RuntimeException();
}
} catch (IOException e) {
json2 = new JSONObject();
try {
json2.put("result", "error");
json2.put("reason", "Lost connection durring recieving data");
} catch (JSONException j) {
j.printStackTrace();
throw new RuntimeException();
}
} catch (JSONException e) {
json2 = new JSONObject();
try {
json2.put("result", "error");
json2.put("reason", "Server response illogical");
} catch (JSONException j) {
j.printStackTrace();
throw new RuntimeException();
}
}
if (error)
error = false;
callback.sendMessage(Message.obtain(callback, fid, json2));
net.disconnect();
}
public void register(final String username, final String password, final String email)
{
fid = REGISTER;
loginRequired = false;
json = new JSONObject();
try {
json.put("request", "register");
json.put("username", username);
json.put("passhash", Crypto.HashPasswd(password));
json.put("email", email);
} catch (JSONException e) {
e.printStackTrace();
throw new RuntimeException();
}
}
public void login_user(final String username, final String password)
{
fid = LOGIN;
loginRequired = false;
JSONObject json2 = null;
json = new JSONObject();
try {
try {
json.put("request", "login");
json.put("username", username);
json.put("passhash", Crypto.LoginKey(password));
} catch (JSONException e) {
e.printStackTrace();
throw new RuntimeException();
}
} catch (SocketException e) {
json2 = new JSONObject();
try {
json2.put("result", "error");
json2.put("reason", "Can't contact server for sending data");
} catch (JSONException j) {
j.printStackTrace();
throw new RuntimeException();
}
error = true;
} catch (IOException e) {
json2 = new JSONObject();
try {
json2.put("result", "error");
json2.put("reason", "Lost connection durring sending data");
} catch (JSONException j) {
j.printStackTrace();
throw new RuntimeException();
}
error = true;
}
if (error) {
callback.sendMessage(Message.obtain(callback, fid, json2));
error = true;
}
}
public void join_game(final String gametype)
{
fid = JOIN_GAME;
loginRequired = true;
json = new JSONObject();
try {
json.put("request", "joingame");
json.put("gametype", gametype);
} catch (JSONException e) {
e.printStackTrace();
throw new RuntimeException();
}
}
public void new_game(final String opponent, final String gametype, final String color)
{
fid = NEW_GAME;
loginRequired = true;
json = new JSONObject();
try {
json.put("request", "newgame");
json.put("opponent", opponent);
json.put("gametype", gametype);
json.put("color", color);
} catch (JSONException e) {
e.printStackTrace();
throw new RuntimeException();
}
}
public void submit_move(final String gameid, final String move)
{
fid = SUBMIT_MOVE;
loginRequired = true;
json = new JSONObject();
try {
json.put("request", "sendmove");
json.put("gameid", gameid);
json.put("move", move);
} catch (JSONException e) {
e.printStackTrace();
throw new RuntimeException();
}
}
public void resign_game(final String gameid)
{
fid = RESIGN_GAME;
loginRequired = true;
json = new JSONObject();
try {
json.put("request", "resign");
json.put("gameid", gameid);
} catch (JSONException e) {
e.printStackTrace();
throw new RuntimeException();
}
}
public void submit_msg(final String gameid, final String msg)
{
fid = SUBMIT_MSG;
loginRequired = true;
json = new JSONObject();
try {
json.put("request", "sendmsg");
json.put("gameid", gameid);
json.put("msg", msg);
} catch (JSONException e) {
e.printStackTrace();
throw new RuntimeException();
}
}
public void game_status(final String gameid)
{
fid = GAME_STATUS;
loginRequired = true;
json = new JSONObject();
try {
json.put("request", "gamestatus");
json.put("gameid", gameid);
} catch (JSONException e) {
e.printStackTrace();
throw new RuntimeException();
}
}
public void game_info(final String gameid)
{
fid = GAME_INFO;
loginRequired = true;
json = new JSONObject();
try {
json.put("request", "gameinfo");
json.put("gameid", gameid);
} catch (JSONException e) {
e.printStackTrace();
throw new RuntimeException();
}
}
public void game_data(final String gameid)
{
fid = GAME_DATA;
loginRequired = true;
json = new JSONObject();
try {
json.put("request", "gamedata");
json.put("gameid", gameid);
} catch (JSONException e) {
e.printStackTrace();
throw new RuntimeException();
}
}
public void read_inbox()
{
fid = READ_INBOX;
loginRequired = true;
json = new JSONObject();
try {
json.put("request", "inbox");
} catch (JSONException e) {
e.printStackTrace();
throw new RuntimeException();
}
}
public void clear_inbox(final long time)
{
fid = CLEAR_INBOX;
loginRequired = true;
json = new JSONObject();
try {
json.put("request", "clearinbox");
json.put("time", time);
} catch (JSONException e) {
e.printStackTrace();
throw new RuntimeException();
}
}
public void sync_gameids(final String type)
{
fid = SYNC_GAMIDS;
loginRequired = true;
json = new JSONObject();
try {
json.put("request", "gameids");
json.put("type", type);
} catch (JSONException e) {
e.printStackTrace();
throw new RuntimeException();
}
}
public void game_score(final String gameid)
{
fid = GAME_SCORE;
loginRequired = true;
json = new JSONObject();
try {
json.put("request", "gamescore");
json.put("gameid", gameid);
} catch (JSONException e) {
e.printStackTrace();
throw new RuntimeException();
}
}
}
| add missing net.disconnect() to NetworkClient.run
Before returning, net.disconnect() must be called to decrement the
NetActive counter.
| src/com/chess/genesis/NetworkClient.java | add missing net.disconnect() to NetworkClient.run | <ide><path>rc/com/chess/genesis/NetworkClient.java
<ide> SocketClient.isLoggedin = true;
<ide> return true;
<ide> } catch (JSONException e) {
<del> return false;
<add> e.printStackTrace();
<add> throw new RuntimeException();
<ide> }
<ide> }
<ide>
<ide>
<ide> if (error) {
<ide> error = false;
<del> return;
<del> }
<del> if (loginRequired && !relogin(net)) {
<ide> net.disconnect();
<ide> return;
<add> } else if (loginRequired && !relogin(net)) {
<add> net.disconnect();
<add> return;
<ide> }
<ide>
<ide> try {
<ide> error = true;
<ide> }
<ide> if (error) {
<add> net.disconnect();
<ide> callback.sendMessage(Message.obtain(callback, fid, json2));
<ide> error = false;
<ide> return; |
|
Java | mit | error: pathspec 'src/main/java/org/ebaloo/itkeeps/Guid.java' did not match any file(s) known to git
| 88333ac9e6cc848662f853daf1abd791b51f10c2 | 1 | e-baloo/it-keeps,e-baloo/it-keeps,e-baloo/it-keeps,e-baloo/it-keeps | /*
* Copyright (c) 2001-2016 Group JCDecaux.
* 17 rue Soyer, 92523 Neuilly Cedex, France.
* All rights reserved.
*
* This software is the confidential and proprietary information
* of Group JCDecaux ("Confidential Information"). You shall not
* disclose such Confidential Information and shall use it only
* in accordance with the terms of the license agreement you
* entered into with Group JCDecaux.
*/
package org.ebaloo.itkeeps;
import java.util.UUID;
import com.jcdecaux.itasset.common.tools.StringUtils;
/**
*
*
*/
public final class Guid {
//------------------------
private UUID uuid = null;
public Guid(UUID uuid) {
this.uuid = uuid;
}
public Guid(String guid) {
this.uuid = UUID.fromString(guid);
}
public String toString() {
return this.uuid.toString();
}
public boolean equals(Object guid) {
return guid instanceof Guid && this.uuid.equals(((Guid) guid).uuid);
}
public static boolean isGuid(String guid) {
try{
if(StringUtils.isBlank(guid)) {
return false;
}
UUID.fromString(guid);
} catch (Throwable exception){
return false;
}
return true;
}
}
| src/main/java/org/ebaloo/itkeeps/Guid.java | Add Guid class | src/main/java/org/ebaloo/itkeeps/Guid.java | Add Guid class | <ide><path>rc/main/java/org/ebaloo/itkeeps/Guid.java
<add>/*
<add> * Copyright (c) 2001-2016 Group JCDecaux.
<add> * 17 rue Soyer, 92523 Neuilly Cedex, France.
<add> * All rights reserved.
<add> *
<add> * This software is the confidential and proprietary information
<add> * of Group JCDecaux ("Confidential Information"). You shall not
<add> * disclose such Confidential Information and shall use it only
<add> * in accordance with the terms of the license agreement you
<add> * entered into with Group JCDecaux.
<add> */
<add>
<add>package org.ebaloo.itkeeps;
<add>
<add>import java.util.UUID;
<add>
<add>import com.jcdecaux.itasset.common.tools.StringUtils;
<add>
<add>
<add>/**
<add> *
<add> *
<add> */
<add>public final class Guid {
<add>
<add> //------------------------
<add>
<add> private UUID uuid = null;
<add>
<add>
<add> public Guid(UUID uuid) {
<add> this.uuid = uuid;
<add> }
<add>
<add> public Guid(String guid) {
<add> this.uuid = UUID.fromString(guid);
<add> }
<add>
<add> public String toString() {
<add> return this.uuid.toString();
<add> }
<add>
<add> public boolean equals(Object guid) {
<add> return guid instanceof Guid && this.uuid.equals(((Guid) guid).uuid);
<add> }
<add>
<add> public static boolean isGuid(String guid) {
<add> try{
<add>
<add> if(StringUtils.isBlank(guid)) {
<add> return false;
<add> }
<add>
<add> UUID.fromString(guid);
<add> } catch (Throwable exception){
<add> return false;
<add> }
<add>
<add> return true;
<add> }
<add>
<add>} |
|
Java | bsd-3-clause | 68e6d15a1624a010e32a828c081cacf0a997f813 | 0 | edina/lockss-daemon,edina/lockss-daemon,edina/lockss-daemon,edina/lockss-daemon,lockss/lockss-daemon,lockss/lockss-daemon,edina/lockss-daemon,edina/lockss-daemon,lockss/lockss-daemon,lockss/lockss-daemon,lockss/lockss-daemon,edina/lockss-daemon,lockss/lockss-daemon,lockss/lockss-daemon | /*
* $Id$
*/
/*
Copyright (c) 2000-2014 Board of Trustees of Leland Stanford Jr. University,
all rights reserved.
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
STANFORD UNIVERSITY 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.
Except as contained in this notice, the name of Stanford University shall not
be used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from Stanford University.
*/
package org.lockss.plugin.highwire.aps;
import java.io.*;
import org.lockss.util.*;
import org.lockss.plugin.highwire.TestHighWireDrupalHtmlCrawlFilterFactory;
import org.lockss.test.*;
public class TestAPSHtmlHashFilterFactory extends TestHighWireDrupalHtmlCrawlFilterFactory {
static String ENC = Constants.DEFAULT_ENCODING;
private APSHtmlHashFilterFactory fact;
private MockArchivalUnit mau;
@Override
public void setUp() throws Exception {
super.setUp();
fact = new APSHtmlHashFilterFactory();
mau = new MockArchivalUnit();
}
// // Publisher adding/updating meta tags
// new TagNameFilter("head"),
private static final String headHtml = "A<html><head>Title</head></HTML>9";
private static final String headHtmlFiltered = "A<html></HTML>9";
// // remove ALL comments
// HtmlNodeFilters.comment(),
private static final String comment =
"<!--[if lt IE 9]><script src=\"http://html5shiv.dd.com/svn/trunk/html5.js\">" +
"</script><![endif]--> ";
private static final String commentFiltered = " ";
// // No relevant content in header/footer
// new TagNameFilter("header"),
// new TagNameFilter("footer"),
private static final String header = "A<div>\n" +
"<header id=\"section-header\" class=\"section section-header\">\n" +
"<div id=\"zone-user-wrapper\" class=\"zone-wrapper\"></div>\n" +
"</header>\n" +
"</div>9";
private static final String headerFiltered = "A<div> </div>9";
private static final String footer = "A<div> " +
"<footer id=\"section-footer\" class=\"section section-footer\">\n" +
"<div id=\"zone-postscript\" class=\"zone zone-postscript clearfix container-30\"></div>\n" +
"</footer>\n" +
"</div>9";
private static final String footerFiltered = "A<div> </div>9";
// // copyright statement may change
// HtmlNodeFilters.tagWithAttribute("ul", "class", "copyright-statement"),
private static final String withCopyright = "A<html class=\"js\" lang=\"en\">\n" +
"<ul class=\"copyright-statement\">gone<li class=\"fn\">Copyright © 2012 American Society</li>" +
"</ul></html>9";
private static final String withoutCopyright = "A<html class=\"js\" lang=\"en\">\n</html>9";
//// messages can appear arbitrarily
//HtmlNodeFilters.tagWithAttributeRegex("div", "id", "messages"),
private static final String messages = "A<div> " +
"<div id=\"messages\">arbitrary text" +
"</div></div>9";
private static final String messagesFiltered = "A<div> </div>9";
//// extras, prev/next pager and right sidebar may change
//HtmlNodeFilters.tagWithAttributeRegex("div", "class", "cit-extra"),
private static final String withCitExtra = "A<html class=\"js\" lang=\"en\">\nx" +
"<div class=\"cit-extra\">y" +
"<a href=\"/lookup/external-ref?access_num=10.1056/NEJM200005183422006&link_type=DOI\" " +
"class=\"cit-ref-sprinkles cit-ref-sprinkles-doi cit-ref-sprinkles-crossref\"><span>CrossRef</span></a>" +
"<a href=\"/lookup/external-ref?access_num=10816188&link_type=MED&atom=" +
"%2Fajpcell%2F302%2F1%2FC1.atom\" class=\"cit-ref-sprinkles cit-ref-sprinkles-medline\">" +
"<span>Medline</span></a>" +
"<a href=\"/lookup/external-ref?access_num=000087068200006&link_type=ISI\" " +
"class=\"cit-ref-sprinkles cit-ref-sprinkles-newisilink cit-ref-sprinkles-webofscience\">" +
"<span>Web of Science</span></a>" +
"</div></html>9";
private static final String withoutCitExtra = "A<html class=\"js\" lang=\"en\">\nx</html>9";
//HtmlNodeFilters.tagWithAttributeRegex("div", "class", "pane-highwire-node-pager"),
private static final String withPager = "A<html> " +
"<div class=\"panel-pane pane-highwire-node-pager\" >X\n" +
"<div class=\"pane-content\">\n" +
"<div class=\"pager highwire-pager pager-mini clearfix highwire-node-pager " +
"highwire-article-pager\"><span class=\"pager-prev\"><a href=\"/content/999/9/C91\" " +
"title=\"Corrigendum\" rel=\"prev\" class=\"pager-link-prev link-icon\">" +
"<i class=\"icon-circle-arrow-left\"></i> Previous</a></span><span class=\"pager-next\">" +
"<a href=\"/content/999/9/C99\" title=\"Drive in the oviduct\" rel=\"next\" " +
"class=\"pager-link-next link-icon link-icon-right\">Next <i class=\"icon-circle-arrow-right\">" +
"</i></a></span></div> </div>\n" +
"</div></html>9";
private static final String withoutPager = "A<html> </html>9";
//new TagNameFilter("script"),
//new TagNameFilter("noscript"),
private static final String withScript =
"A<div>\n" +
"<script type=\"text/javascript\">GA_googleFillSlot(\"tower_right_160x600\");</script>\n" +
"<noscript type=\"text/javascript\">GA_googleFillSlot(\"tower_right_160x600\");</noscript>\n" +
"</div>9";
private static final String withoutScript =
"A<div> </div>9";
// HtmlNodeFilters.tagWithAttributeRegex("div", "class", "author-tooltip")
// private static final String withToolTip =
// "A<html>\n" +
// "<div class=\"author-tooltip0-asdf\">tip here</div>" +
// "</html>9";
// private static final String withoutToolTip =
// "A<html> </html>9";
private static final String withAside = "<div id=\"page\">" +
"A<aside>B\n" +
" <div class=\"panel-pane pane-service-links\">\n" +
" <div class=\"pane-content\">\n" +
" <div class=\"service-links\">" +
" </div>" +
" </div>\n" +
" </div>\n" +
"</aside>\n" +
"9</div>";
private static final String withoutAside =
"<div>A 9</div>";
private static final String withForm = "<div id=\"page\">" +
"A<aside>\n" +
" <div class=\"panel-pane pane-service-links\">\n" +
" <div class=\"pane-content\">\n" +
" <div class=\"service-links\">" +
" </div>" +
" </div>\n" +
" </div>\n" +
"</aside>\n" +
"9</div>";
private static final String withoutForm =
"<div>A 9</div>";
//HtmlNodeFilters.tagWithAttributeRegex("div", "class", "^author-tooltip"),
private static final String withToolTip = "A<html>\n" +
"<div class=\"sidebar-right-wrapper grid-10 omega\">X\n" +
"<div class=\"panel-panel panel-region-sidebar-right\">\n" +
"<div class=\"inside\">" +
"<div class=\"panel-pane pane-panels-mini " +
"pane-jnl-iss-issue-arch-art pane-style-alt-content\" >\n" +
"</div></div></div></div>\n" +
"</html>9";
private static final String withoutToolTip = "A<html> </html>9";
//HtmlNodeFilters.tagWithAttributeRegex("div", "class", "sidebar-right-wrapper"),
private static final String withSidebar = "A<html> " +
"<div class=\"sidebar-right-wrapper grid-10 omega\">X\n" +
"<div class=\"panel-panel panel-region-sidebar-right\">\n" +
"<div class=\"inside\">" +
"<div class=\"panel-pane pane-panels-mini " +
"pane-jnl-iss-issue-arch-art pane-style-alt-content\" >\n" +
"</div></div></div></div>\n" +
"</html>9";
private static final String withoutSidebar = "A<html> </html>9";
@Override
public void testFiltering() throws Exception {
assertFilterToString(headHtml, headHtmlFiltered);
assertFilterToString(comment, commentFiltered);
assertFilterToString(header, headerFiltered);
assertFilterToString(footer, footerFiltered);
assertFilterToString(messages, messagesFiltered);
assertFilterToString(withCopyright, withoutCopyright);
assertFilterToString(withCitExtra, withoutCitExtra);
assertFilterToString(withPager, withoutPager);
assertFilterToString(withScript, withoutScript);
assertFilterToString(withAside, withoutAside);
assertFilterToString(withForm, withoutForm);
assertFilterToString(withToolTip, withoutToolTip);
assertFilterToString(withSidebar, withoutSidebar);
// HtmlNodeFilters.tagWithAttributeRegex("a", "class", "hw-link"),
}
//Don't put the 2nd string through the filter - use it as a constant
private void assertFilterToString(String orgString, String finalString) throws Exception {
InputStream inA = fact.createFilteredInputStream(mau, new StringInputStream(orgString),
Constants.DEFAULT_ENCODING);
String filtered = StringUtil.fromInputStream(inA);
assertEquals(filtered, finalString, filtered);
}
}
| plugins/test/src/org/lockss/plugin/highwire/aps/TestAPSHtmlHashFilterFactory.java | /*
* $Id$
*/
/*
Copyright (c) 2000-2014 Board of Trustees of Leland Stanford Jr. University,
all rights reserved.
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
STANFORD UNIVERSITY 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.
Except as contained in this notice, the name of Stanford University shall not
be used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from Stanford University.
*/
package org.lockss.plugin.highwire.aps;
import java.io.*;
import org.lockss.util.*;
import org.lockss.plugin.highwire.TestHighWireDrupalHtmlCrawlFilterFactory;
import org.lockss.test.*;
public class TestAPSHtmlHashFilterFactory extends TestHighWireDrupalHtmlCrawlFilterFactory {
static String ENC = Constants.DEFAULT_ENCODING;
private APSHtmlHashFilterFactory fact;
private MockArchivalUnit mau;
@Override
public void setUp() throws Exception {
super.setUp();
fact = new APSHtmlHashFilterFactory();
mau = new MockArchivalUnit();
}
// // Publisher adding/updating meta tags
// new TagNameFilter("head"),
private static final String headHtml = "A<html><head>Title</head></HTML>9";
private static final String headHtmlFiltered = "A<html></HTML>9";
// // remove ALL comments
// HtmlNodeFilters.comment(),
private static final String comment =
"<!--[if lt IE 9]><script src=\"http://html5shiv.dd.com/svn/trunk/html5.js\">" +
"</script><![endif]--> ";
private static final String commentFiltered = " ";
// // No relevant content in header/footer
// new TagNameFilter("header"),
// new TagNameFilter("footer"),
private static final String header = "A<div>\n" +
"<header id=\"section-header\" class=\"section section-header\">\n" +
"<div id=\"zone-user-wrapper\" class=\"zone-wrapper\"></div>\n" +
"</header>\n" +
"</div>9";
private static final String headerFiltered = "A<div> </div>9";
private static final String footer = "A<div> " +
"<footer id=\"section-footer\" class=\"section section-footer\">\n" +
"<div id=\"zone-postscript\" class=\"zone zone-postscript clearfix container-30\"></div>\n" +
"</footer>\n" +
"</div>9";
private static final String footerFiltered = "A<div> </div>9";
// // copyright statement may change
// HtmlNodeFilters.tagWithAttribute("ul", "class", "copyright-statement"),
private static final String withCopyright = "A<html class=\"js\" lang=\"en\">\n" +
"<ul class=\"copyright-statement\">gone<li class=\"fn\">Copyright © 2012 American Society</li>" +
"</ul></html>9";
private static final String withoutCopyright = "A<html class=\"js\" lang=\"en\">\n</html>9";
//// messages can appear arbitrarily
//HtmlNodeFilters.tagWithAttributeRegex("div", "id", "messages"),
private static final String messages = "A<div> " +
"<div id=\"messages\">arbitrary text" +
"</div></div>9";
private static final String messagesFiltered = "A<div> </div>9";
//// extras, prev/next pager and right sidebar may change
//HtmlNodeFilters.tagWithAttributeRegex("div", "class", "cit-extra"),
private static final String withCitExtra = "A<html class=\"js\" lang=\"en\">\nx" +
"<div class=\"cit-extra\">y" +
"<a href=\"/lookup/external-ref?access_num=10.1056/NEJM200005183422006&link_type=DOI\" " +
"class=\"cit-ref-sprinkles cit-ref-sprinkles-doi cit-ref-sprinkles-crossref\"><span>CrossRef</span></a>" +
"<a href=\"/lookup/external-ref?access_num=10816188&link_type=MED&atom=" +
"%2Fajpcell%2F302%2F1%2FC1.atom\" class=\"cit-ref-sprinkles cit-ref-sprinkles-medline\">" +
"<span>Medline</span></a>" +
"<a href=\"/lookup/external-ref?access_num=000087068200006&link_type=ISI\" " +
"class=\"cit-ref-sprinkles cit-ref-sprinkles-newisilink cit-ref-sprinkles-webofscience\">" +
"<span>Web of Science</span></a>" +
"</div></html>9";
private static final String withoutCitExtra = "A<html class=\"js\" lang=\"en\">\nx</html>9";
//HtmlNodeFilters.tagWithAttributeRegex("div", "class", "pane-highwire-node-pager"),
private static final String withPager = "A<html> " +
"<div class=\"panel-pane pane-highwire-node-pager\" >X\n" +
"<div class=\"pane-content\">\n" +
"<div class=\"pager highwire-pager pager-mini clearfix highwire-node-pager " +
"highwire-article-pager\"><span class=\"pager-prev\"><a href=\"/content/999/9/C91\" " +
"title=\"Corrigendum\" rel=\"prev\" class=\"pager-link-prev link-icon\">" +
"<i class=\"icon-circle-arrow-left\"></i> Previous</a></span><span class=\"pager-next\">" +
"<a href=\"/content/999/9/C99\" title=\"Drive in the oviduct\" rel=\"next\" " +
"class=\"pager-link-next link-icon link-icon-right\">Next <i class=\"icon-circle-arrow-right\">" +
"</i></a></span></div> </div>\n" +
"</div></html>9";
private static final String withoutPager = "A<html> </html>9";
//new TagNameFilter("script"),
//new TagNameFilter("noscript"),
private static final String withScript =
"A<div>\n" +
"<script type=\"text/javascript\">GA_googleFillSlot(\"tower_right_160x600\");</script>\n" +
"<noscript type=\"text/javascript\">GA_googleFillSlot(\"tower_right_160x600\");</noscript>\n" +
"</div>9";
private static final String withoutScript =
"A<div> </div>9";
// HtmlNodeFilters.tagWithAttributeRegex("div", "class", "author-tooltip")
// private static final String withToolTip =
// "A<html>\n" +
// "<div class=\"author-tooltip0-asdf\">tip here</div>" +
// "</html>9";
// private static final String withoutToolTip =
// "A<html> </html>9";
private static final String withAside = "<div id=\"page\">" +
"A<aside>B\n" +
" <div class=\"panel-pane pane-service-links\">\n" +
" <div class=\"pane-content\">\n" +
" <div class=\"service-links\">" +
" </div>" +
" </div>\n" +
" </div>\n" +
"</aside>\n" +
"9</div>";
private static final String withoutAside =
"<div>A 9</div>";
private static final String withForm = "<div id=\"page\">" +
"A<aside>\n" +
" <div class=\"panel-pane pane-service-links\">\n" +
" <div class=\"pane-content\">\n" +
" <div class=\"service-links\">" +
" </div>" +
" </div>\n" +
" </div>\n" +
"</aside>\n" +
"9</div>";
private static final String withoutForm =
"<div>A 9</div>";
//HtmlNodeFilters.tagWithAttributeRegex("div", "class", "^author-tooltip"),
private static final String withToolTip = "A<html>\n" +
"<div class=\"sidebar-right-wrapper grid-10 omega\">X\n" +
"<div class=\"panel-panel panel-region-sidebar-right\">\n" +
"<div class=\"inside\">" +
"<div class=\"panel-pane pane-panels-mini " +
"pane-jnl-iss-issue-arch-art pane-style-alt-content\" >\n" +
"</div></div></div></div>\n" +
"</html>9";
private static final String withoutToolTip = "A<html>\n</html>9";
//HtmlNodeFilters.tagWithAttributeRegex("div", "class", "sidebar-right-wrapper"),
private static final String withSidebar = "A<html> " +
"<div class=\"sidebar-right-wrapper grid-10 omega\">X\n" +
"<div class=\"panel-panel panel-region-sidebar-right\">\n" +
"<div class=\"inside\">" +
"<div class=\"panel-pane pane-panels-mini " +
"pane-jnl-iss-issue-arch-art pane-style-alt-content\" >\n" +
"</div></div></div></div>\n" +
"</html>9";
private static final String withoutSidebar = "A<html> </html>9";
@Override
public void testFiltering() throws Exception {
assertFilterToString(headHtml, headHtmlFiltered);
assertFilterToString(comment, commentFiltered);
assertFilterToString(header, headerFiltered);
assertFilterToString(footer, footerFiltered);
assertFilterToString(messages, messagesFiltered);
assertFilterToString(withCopyright, withoutCopyright);
assertFilterToString(withCitExtra, withoutCitExtra);
assertFilterToString(withPager, withoutPager);
assertFilterToString(withScript, withoutScript);
assertFilterToString(withAside, withoutAside);
assertFilterToString(withForm, withoutForm);
assertFilterToString(withToolTip, withoutToolTip);
assertFilterToString(withSidebar, withoutSidebar);
// HtmlNodeFilters.tagWithAttributeRegex("a", "class", "hw-link"),
}
//Don't put the 2nd string through the filter - use it as a constant
private void assertFilterToString(String orgString, String finalString) throws Exception {
InputStream inA = fact.createFilteredInputStream(mau, new StringInputStream(orgString),
Constants.DEFAULT_ENCODING);
String filtered = StringUtil.fromInputStream(inA);
assertEquals(filtered, finalString, filtered);
}
}
| Correct last final test for current whitespace filtering
git-svn-id: 293778eaa97c8c94097d610b1bd5133a8f478f36@40113 4f837ed2-42f5-46e7-a7a5-fa17313484d4
| plugins/test/src/org/lockss/plugin/highwire/aps/TestAPSHtmlHashFilterFactory.java | Correct last final test for current whitespace filtering | <ide><path>lugins/test/src/org/lockss/plugin/highwire/aps/TestAPSHtmlHashFilterFactory.java
<ide> "pane-jnl-iss-issue-arch-art pane-style-alt-content\" >\n" +
<ide> "</div></div></div></div>\n" +
<ide> "</html>9";
<del> private static final String withoutToolTip = "A<html>\n</html>9";
<add> private static final String withoutToolTip = "A<html> </html>9";
<ide>
<ide> //HtmlNodeFilters.tagWithAttributeRegex("div", "class", "sidebar-right-wrapper"),
<ide> private static final String withSidebar = "A<html> " + |
|
JavaScript | bsd-3-clause | 0691ef76eaf5d080557960a75f11cfcfcd288e0b | 0 | potch/glow,potch/glow,potch/glow,potch/glow | var hueTable = [193, 192, 192, 193, 193, 192, 192, 197, 201, 211, 216, 219, 222, 54, 58, 58, 57, 55, 54, 51, 47, 42, 39, 36, 47, 45, 43, 41, 39, 47, 45, 47, 32, 40, 38, 36, 34, 35, 30, 33, 35, 33, 31, 30, 30, 29, 29, 29, 29, 29, 29, 28, 29, 28, 28, 28, 28, 27, 27, 27, 26, 26, 25, 24, 24, 23, 22, 22, 21, 21, 21, 21, 20, 23, 24, 25, 26, 29, 31, 223, 222, 219, 209, 202, 198, 191, 193, 193, 192, 192];
var PI = Math.PI;
var PI_2 = PI/2;
var RAD = PI / 180;
var GAP = 2 * RAD;
$.fn.arcChart = function(opts) {
opts = $.extend({
data: [],
maxDrawDepth: 4,
draw: true
}, opts);
var $canvas = this,
ctx = $canvas[0].getContext('2d'),
contextStack = [],
scaleFactor = 1,
currentContext = false,
oldParent = false,
clickMap = [],
cx, cy,
animation = false;
function getPath() {
var path = [];
for (var i=0; i<contextStack.length; i++) {
if (contextStack[i]) {
path.push(contextStack[i][2][3]);
}
}
if (currentContext) {
path.push(currentContext[2][3]);
}
return path;
}
this.redraw = function(o) {
o = $.extend({
sz: 2 * PI,
sa: 0,
innerRad: 50,
radStep: 30,
hue: currentContext[3]
}, o);
ctx.clearRect(0,0,$canvas.width(),$canvas.height());
$canvas[0].width = $canvas.width();
$canvas[0].height = $canvas.height();
cx = $canvas.width()/2;
cy = $canvas.height()/2;
scaleFactor = Math.min(cx,cy) / 240;
ctx.save();
ctx.translate(cx, cy);
ctx.scale(scaleFactor, scaleFactor);
ctx.rotate(-PI_2);
ctx.rotate(o.sa);
var data = currentContext.length ? currentContext[2][2] : opts.data[2];
drawChildren(data, 1, o.sz, o);
ctx.restore();
if (!animation) $canvas.trigger("update", [clickMap, currentContext, getPath()]);
}
this.dbg = function() {
console.log(clickMap);
};
(function() {
var currentlabel, pos,
x, y, a, r,
p, label, tgt;
$canvas.mousemove(function(e) {
if (animation) return;
pos = $canvas.offset();
x = -(e.clientX - pos.left - cx);
y = e.clientY - pos.top - cy;
a = Math.atan2(x,y)+Math.PI;
r = Math.sqrt(x*x + y*y);
tgt = false, label = false;
if (a < 0) a += Math.PI * 2;
for (var i=0; i<clickMap.length; i++) {
p = clickMap[i];
if (a > p[0] && a < p[1]) {
tgt = p[2];
}
}
if (r < 80 * scaleFactor || r > 200 * scaleFactor) {
$tip.hide();
} else {
if (tgt) {
label = tgt[0];
if (label && currentlabel != label) {
$tiptext.text(label + ": " + numberfmt(tgt[1]));
currentLabel = label;
}
$tip.show();
} else {
$tip.hide();
}
}
$tip.css({
left: e.clientX + "px",
top: (e.clientY - 20) + "px"
});
});
$canvas.mouseout(function(e) {
if (animation) return;
$tip.hide();
});
$canvas.click(function(e) {
if (animation) return;
pos = $canvas.offset();
x = -(e.clientX - pos.left - cx);
y = e.clientY - pos.top - cy;
a = Math.atan2(x,y)+Math.PI;
r = Math.sqrt(x*x + y*y);
tgt = false;
if (a < 0) a += Math.PI * 2;
if (r < 80 * scaleFactor) {
$canvas.zoomOut();
} else if (r < 200 * scaleFactor && r > 80 * scaleFactor) {
for (var i=0; i<clickMap.length; i++) {
p = clickMap[i];
if (a > p[0] && a < p[1]) {
$canvas.zoomIn(i);
break;
}
}
}
});
})();
this.zoomTo = function(path) {
dbg("zoomTo", path);
currentContext = false;
contextStack = [];
$canvas.redraw();
var i = 0;
function advance() {
var target = path[i];
for (var j = 0, jj = clickMap.length; j < jj; j++) {
if (clickMap[j][2][3] == target) {
i++;
dbg("advance", i, j);
$canvas.zoomIn(j, {cb: advance, anim:false, trigger:false});
return;
}
}
}
advance();
};
this.zoomOut = function(opts) {
if (contextStack.length < 1) return;
span = (currentContext[1]-currentContext[0]);
animation = vast.animate.over(
500,
function(i) {
var j = vast.ease.easeout(i);
$canvas.redraw({
sa: currentContext[0] * j,
sz: (2 * Math.PI - span) * (1-j) + span,
innerRad: 50 + 30 * j
});
},
this,
{after: function() {
animation = false;
currentContext = contextStack.pop() || false;
$canvas.trigger("zoomout", [clickMap, currentContext, getPath()]);
$canvas.redraw();
}}
);
};
this.zoomIn = function(which, opts) {
var tgt = clickMap[which];
if (!tgt || !tgt[2][2]) return;
contextStack.push(currentContext);
currentContext = tgt;
span = (tgt[1]-tgt[0]);
function doneZoom() {
animation = false;
$canvas.redraw();
if (!(opts && opts.trigger === false)) {
$canvas.trigger("zoomin", [clickMap, currentContext, getPath()]);
}
if (opts && typeof opts.cb == "function") opts.cb.apply(null, currentContext);
}
if (opts && !opts.anim) {
doneZoom();
} else {
animation = vast.animate.over(
500,
function(i) {
var j = vast.ease.easeout(i);
$canvas.redraw({
sa: tgt[0] * (1-j),
sz: (2 * Math.PI - span) * j + span,
innerRad: 80 - 30 * j
});
},
this,
{after: doneZoom}
);
}
};
function drawChildren(pts, depth, arcSize, o) {
if (depth > opts.maxDrawDepth) return;
var len = pts.length,
segmentArc,
total = o.total,
other = 0,
baseHue = o.hue || 0,
arcOffset = o.sa,
cutoff = animation ? .1 : .01;
if (!o.total) {
total=0;
for (var i=0; i<len; i++) {
total += pts[i][1] || 0;
}
}
if (depth == 1) {
clickMap = [];
}
var innerRad = depth * o.radStep + o.innerRad,
outerRad = innerRad + o.radStep,
p, hue;
ctx.save();
for (var i=0; i<len; i++) {
p = pts[i];
if (!p._pct) p._pct = p[1] / total;
segmentArc = p._pct * arcSize;
if ((p._pct >= cutoff || depth == 1) && segmentArc > .005) {
if (depth == 1 && !baseHue) {
hue = hueTable[~~((arcOffset+segmentArc/2)/arcSize * 90)];
} else {
hue = o.hue;
}
ctx.fillStyle = "hsl(" + hue + ", " + (100 - depth*20) + "%, 50%)";
ctx.beginPath();
ctx.arc(0,0,outerRad-1, 0, segmentArc - .005, false);
ctx.arc(0,0,innerRad, segmentArc - .005, 0, true);
ctx.lineTo(outerRad, 0);
ctx.fill();
if (depth == 1) {
clickMap.push([arcOffset, arcOffset + segmentArc, p, hue]);
}
if (p._pct > .05) {
if (p[2]) drawChildren(p[2], depth+1, segmentArc, $.extend(o, {total: p[1], hue: hue}));
}
}
// ctx.stroke();
ctx.rotate(segmentArc);
arcOffset += segmentArc;
}
ctx.restore();
}
var $tip = $("<div id='arcchart-tip'><div></div></div>");
$("body").append($tip);
$tip.css({
"position": "absolute",
"display": "none",
"width": "200px",
"height": "20px",
"top": "0",
"text-shadow": "0 0 2px #000",
"pointer-events": "none"
});
$tiptext = $tip.find("div");
$tiptext.css({
"background": "rgba(0,0,0,.7)",
"padding": "2px 0",
"border-radius": "2px",
"text-align": "center",
});
if ($("html").hasClass("rtl")) {
$tip.css("text-align", "left");
}
if (opts.draw) this.redraw();
return this;
};
| media/arcchart.js | var hueTable = [193, 192, 192, 193, 193, 192, 192, 197, 201, 211, 216, 219, 222, 54, 58, 58, 57, 55, 54, 51, 47, 42, 39, 36, 47, 45, 43, 41, 39, 47, 45, 47, 32, 40, 38, 36, 34, 35, 30, 33, 35, 33, 31, 30, 30, 29, 29, 29, 29, 29, 29, 28, 29, 28, 28, 28, 28, 27, 27, 27, 26, 26, 25, 24, 24, 23, 22, 22, 21, 21, 21, 21, 20, 23, 24, 25, 26, 29, 31, 223, 222, 219, 209, 202, 198, 191, 193, 193, 192, 192];
var PI = Math.PI;
var PI_2 = PI/2;
var RAD = PI / 180;
var GAP = 2 * RAD;
$.fn.arcChart = function(opts) {
opts = $.extend({
data: [],
maxDrawDepth: 4,
draw: true
}, opts);
var $canvas = this,
ctx = $canvas[0].getContext('2d'),
contextStack = [],
scaleFactor = 1,
currentContext = false,
oldParent = false,
clickMap = [],
cx, cy,
animation = false;
function getPath() {
var path = [];
for (var i=0; i<contextStack.length; i++) {
if (contextStack[i]) {
path.push(contextStack[i][2][3]);
}
}
if (currentContext) {
path.push(currentContext[2][3]);
}
return path;
}
this.redraw = function(o) {
o = $.extend({
sz: 2 * PI,
sa: 0,
innerRad: 50,
radStep: 30,
hue: currentContext[3]
}, o);
ctx.clearRect(0,0,$canvas.width(),$canvas.height());
$canvas[0].width = $canvas.width();
$canvas[0].height = $canvas.height();
cx = $canvas.width()/2;
cy = $canvas.height()/2;
scaleFactor = Math.min(cx,cy) / 240;
ctx.save();
ctx.translate(cx, cy);
ctx.scale(scaleFactor, scaleFactor);
ctx.rotate(-PI_2);
ctx.rotate(o.sa);
var data = currentContext.length ? currentContext[2][2] : opts.data[2];
drawChildren(data, 1, o.sz, o);
ctx.restore();
if (!animation) $canvas.trigger("update", [clickMap, currentContext, getPath()]);
}
this.dbg = function() {
console.log(clickMap);
};
(function() {
var currentlabel, pos,
x, y, a, r,
p, label, tgt;
$canvas.mousemove(function(e) {
if (animation) return;
pos = $canvas.offset();
x = -(e.clientX - pos.left - cx);
y = e.clientY - pos.top - cy;
a = Math.atan2(x,y)+Math.PI;
r = Math.sqrt(x*x + y*y);
tgt = false, label = false;
if (a < 0) a += Math.PI * 2;
for (var i=0; i<clickMap.length; i++) {
p = clickMap[i];
if (a > p[0] && a < p[1]) {
tgt = p[2];
}
}
if (r < 80 * scaleFactor || r > 200 * scaleFactor) {
$tip.hide();
} else {
if (tgt) {
label = tgt[0];
if (label && currentlabel != label) {
$tiptext.text(label + ": " + numberfmt(tgt[1]));
currentLabel = label;
}
$tip.show();
} else {
$tip.hide();
}
}
$tip.css({
left: e.clientX + "px",
top: (e.clientY - 20) + "px"
});
});
$canvas.mouseout(function(e) {
if (animation) return;
$tip.hide();
});
$canvas.click(function(e) {
if (animation) return;
pos = $canvas.offset();
x = -(e.clientX - pos.left - cx);
y = e.clientY - pos.top - cy;
a = Math.atan2(x,y)+Math.PI;
r = Math.sqrt(x*x + y*y);
tgt = false;
if (a < 0) a += Math.PI * 2;
if (r < 80 * scaleFactor) {
$canvas.zoomOut();
} else if (r < 200 * scaleFactor && r > 80 * scaleFactor) {
for (var i=0; i<clickMap.length; i++) {
p = clickMap[i];
if (a > p[0] && a < p[1]) {
$canvas.zoomIn(i);
break;
}
}
}
});
})();
this.zoomTo = function(path) {
dbg("zoomTo", path);
currentContext = false;
contextStack = [];
$canvas.redraw();
var i = 0;
function advance() {
var target = path[i];
for (var j = 0, jj = clickMap.length; j < jj; j++) {
if (clickMap[j][2][3] == target) {
i++;
dbg("advance", i, j);
$canvas.zoomIn(j, {cb: advance, anim:false, trigger:false});
return;
}
}
}
advance();
};
this.zoomOut = function(opts) {
if (contextStack.length < 1) return;
span = (currentContext[1]-currentContext[0]);
animation = vast.animate.over(
500,
function(i) {
var j = vast.ease.easeout(i);
$canvas.redraw({
sa: currentContext[0] * j,
sz: (2 * Math.PI - span) * (1-j) + span,
innerRad: 50 + 30 * j
});
},
this,
{after: function() {
animation = false;
currentContext = contextStack.pop() || false;
$canvas.trigger("zoomout", [clickMap, currentContext, getPath()]);
$canvas.redraw();
}}
);
};
this.zoomIn = function(which, opts) {
var tgt = clickMap[which];
if (!tgt || !tgt[2][2]) return;
contextStack.push(currentContext);
currentContext = tgt;
span = (tgt[1]-tgt[0]);
function doneZoom() {
animation = false;
$canvas.redraw();
if (!(opts && opts.trigger === false)) {
$canvas.trigger("zoomin", [clickMap, currentContext, getPath()]);
}
if (opts && typeof opts.cb == "function") opts.cb.apply(null, currentContext);
}
if (opts && !opts.anim) {
doneZoom();
} else {
animation = vast.animate.over(
500,
function(i) {
var j = vast.ease.easeout(i);
$canvas.redraw({
sa: tgt[0] * (1-j),
sz: (2 * Math.PI - span) * j + span,
innerRad: 80 - 30 * j
});
},
this,
{after: doneZoom}
);
}
};
function drawChildren(pts, depth, arcSize, o) {
if (depth > opts.maxDrawDepth) return;
var len = pts.length,
segmentArc,
total = o.total,
other = 0,
baseHue = o.hue || 0,
arcOffset = o.sa,
cutoff = animation ? .1 : .01;
if (!o.total) {
total=0;
for (var i=0; i<len; i++) {
total += pts[i][1] || 0;
}
}
if (depth == 1) {
clickMap = [];
}
var innerRad = depth * o.radStep + o.innerRad,
outerRad = innerRad + o.radStep,
p, hue;
ctx.save();
for (var i=0; i<len; i++) {
p = pts[i];
if (!p._pct) p._pct = p[1] / total;
segmentArc = p._pct * arcSize;
if ((p._pct >= cutoff || depth == 1) && segmentArc > .005) {
if (depth == 1 && !baseHue) {
hue = hueTable[~~((arcOffset+segmentArc/2)/arcSize * 90)];
} else {
hue = o.hue;
}
ctx.fillStyle = "hsl(" + hue + ", " + (100 - depth*20) + "%, 50%)";
ctx.beginPath();
ctx.arc(0,0,outerRad-1, 0, segmentArc - .005, false);
ctx.arc(0,0,innerRad, segmentArc - .005, 0, true);
ctx.lineTo(outerRad, 0);
ctx.fill();
if (depth == 1) {
clickMap.push([arcOffset, arcOffset + segmentArc, p, hue]);
}
if (p._pct > .05) {
if (p[2]) drawChildren(p[2], depth+1, segmentArc, $.extend(o, {total: p[1], hue: hue}));
}
}
// ctx.stroke();
ctx.rotate(segmentArc);
arcOffset += segmentArc;
}
ctx.restore();
}
var $tip = $("<div id='arcchart-tip'><span></span></div>");
$("body").append($tip);
$tip.css({
"position": "absolute",
"display": "none",
"width": "200px",
"height": "20px",
"top": "0",
"text-shadow": "0 0 2px #000",
"pointer-events": "none"
});
$tiptext = $tip.find("span");
$tiptext.css({
"background": "rgba(0,0,0,.7)",
"padding": "4px 8px 2px",
"border-radius": "2px"
});
if ($("html").hasClass("rtl")) {
$tip.css("text-align", "left");
}
if (opts.draw) this.redraw();
return this;
};
| use a div so the tip doesn't wrap (bug 643950)
| media/arcchart.js | use a div so the tip doesn't wrap (bug 643950) | <ide><path>edia/arcchart.js
<ide> ctx.restore();
<ide> }
<ide>
<del> var $tip = $("<div id='arcchart-tip'><span></span></div>");
<add> var $tip = $("<div id='arcchart-tip'><div></div></div>");
<ide> $("body").append($tip);
<ide> $tip.css({
<ide> "position": "absolute",
<ide> "text-shadow": "0 0 2px #000",
<ide> "pointer-events": "none"
<ide> });
<del> $tiptext = $tip.find("span");
<add> $tiptext = $tip.find("div");
<ide> $tiptext.css({
<ide> "background": "rgba(0,0,0,.7)",
<del> "padding": "4px 8px 2px",
<del> "border-radius": "2px"
<add> "padding": "2px 0",
<add> "border-radius": "2px",
<add> "text-align": "center",
<ide> });
<ide> if ($("html").hasClass("rtl")) {
<ide> $tip.css("text-align", "left"); |
|
Java | apache-2.0 | c50db8de6d2f64487cd9eb8e3176c07e89ed2b0f | 0 | vbelakov/h2o,rowhit/h2o-2,h2oai/h2o-2,111t8e/h2o-2,eg-zhang/h2o-2,h2oai/h2o,eg-zhang/h2o-2,h2oai/h2o-2,rowhit/h2o-2,111t8e/h2o-2,vbelakov/h2o,100star/h2o,elkingtonmcb/h2o-2,vbelakov/h2o,100star/h2o,vbelakov/h2o,eg-zhang/h2o-2,eg-zhang/h2o-2,vbelakov/h2o,eg-zhang/h2o-2,h2oai/h2o-2,elkingtonmcb/h2o-2,h2oai/h2o-2,vbelakov/h2o,elkingtonmcb/h2o-2,elkingtonmcb/h2o-2,calvingit21/h2o-2,eg-zhang/h2o-2,111t8e/h2o-2,rowhit/h2o-2,h2oai/h2o,elkingtonmcb/h2o-2,111t8e/h2o-2,rowhit/h2o-2,calvingit21/h2o-2,100star/h2o,rowhit/h2o-2,calvingit21/h2o-2,elkingtonmcb/h2o-2,calvingit21/h2o-2,h2oai/h2o,rowhit/h2o-2,eg-zhang/h2o-2,calvingit21/h2o-2,100star/h2o,h2oai/h2o,elkingtonmcb/h2o-2,111t8e/h2o-2,eg-zhang/h2o-2,h2oai/h2o-2,rowhit/h2o-2,h2oai/h2o-2,111t8e/h2o-2,h2oai/h2o-2,h2oai/h2o,h2oai/h2o,111t8e/h2o-2,elkingtonmcb/h2o-2,h2oai/h2o,rowhit/h2o-2,calvingit21/h2o-2,eg-zhang/h2o-2,h2oai/h2o,eg-zhang/h2o-2,elkingtonmcb/h2o-2,100star/h2o,calvingit21/h2o-2,elkingtonmcb/h2o-2,vbelakov/h2o,calvingit21/h2o-2,h2oai/h2o,h2oai/h2o,vbelakov/h2o,111t8e/h2o-2,calvingit21/h2o-2,100star/h2o,vbelakov/h2o,111t8e/h2o-2,rowhit/h2o-2,h2oai/h2o-2,111t8e/h2o-2,calvingit21/h2o-2,h2oai/h2o-2,h2oai/h2o-2,rowhit/h2o-2,100star/h2o,vbelakov/h2o,100star/h2o,100star/h2o | package water.api;
import hex.GLMSolver.GLMModel;
import hex.KMeans.KMeansModel;
import java.io.IOException;
import java.io.InputStream;
import java.util.Arrays;
import java.util.HashMap;
import java.util.zip.*;
import water.*;
import water.ValueArray.Column;
import water.api.GLM.GLMBuilder;
import water.parser.CsvParser;
import com.google.gson.*;
public class Inspect extends Request {
private static final HashMap<String, String> _displayNames = new HashMap<String, String>();
private static final long INFO_PAGE = -1;
private final H2OExistingKey _key = new H2OExistingKey(KEY);
private final LongInt _offset = new LongInt(OFFSET, 0L, INFO_PAGE, Long.MAX_VALUE, "");
private final Int _view = new Int(VIEW, 100, 0, 10000);
static {
_displayNames.put(BASE, "Base");
_displayNames.put(ENUM_DOMAIN_SIZE, "Enum Domain");
_displayNames.put(MAX, "Max");
_displayNames.put(MEAN, "μ");
_displayNames.put(MIN, "Min");
_displayNames.put(NUM_MISSING_VALUES, "Missing");
_displayNames.put(OFFSET, "Offset");
_displayNames.put(SCALE, "Scale");
_displayNames.put(SIZE, "Size");
_displayNames.put(VARIANCE, "σ");
}
// Constructor called from 'Exec' query instead of the direct view links
Inspect(Key k) {
_key.reset();
_key.check(k.toString());
_offset.reset();
_offset.check("");
_view.reset();
_view.check("");
}
// Default no-args constructor
Inspect() {
}
public static Response redirect(JsonObject resp, Key dest) {
JsonObject redir = new JsonObject();
redir.addProperty(KEY, dest.toString());
return Response.redirect(resp, Inspect.class, redir);
}
@Override
protected Response serve() {
Value val = _key.value();
if( val.isHex() ) {
return serveValueArray(ValueArray.value(val));
}
if( _key.originalValue().startsWith(GLMModel.KEY_PREFIX) ) {
GLMModel m = val.get(new GLMModel());
JsonObject res = new JsonObject();
// Convert to JSON
res.add("GLMModel", m.toJson());
// Display HTML setup
Response r = Response.done(res);
r.setBuilder(""/* top-level do-it-all builder */, new GLMBuilder(m));
return r;
}
if( _key.originalValue().startsWith(KMeansModel.KEY_PREFIX) ) {
KMeansModel m = new KMeansModel().read(new AutoBuffer(val.get(), 0));
JsonObject res = new JsonObject();
// Convert to JSON
res.add("KMeansModel", m.toJson());
// Display HTML setup
Response r = Response.done(res);
// r.setBuilder(""/*top-level do-it-all builder*/,new KMeansBuilder(m));
return r;
}
return serveUnparsedValue(val);
}
// Look at unparsed data; guess its setup
public static CsvParser.Setup csvGuessValue(Value v) {
// See if we can make sense of the first few rows.
byte[] bs = v.getFirstBytes(); // Read some bytes
int off = 0;
// First decrypt compression
InputStream is = null;
try {
switch( water.parser.ParseDataset.guessCompressionMethod(v) ) {
case NONE: // No compression
off = bs.length; // All bytes ready already
break;
case ZIP: {
ZipInputStream zis = new ZipInputStream(v.openStream());
ZipEntry ze = zis.getNextEntry(); // Get the *FIRST* entry
// There is at least one entry in zip file and it is not a directory.
if( ze != null || !ze.isDirectory() )
is = zis;
break;
}
case GZIP:
is = new GZIPInputStream(v.openStream());
break;
}
// If reading from a compressed stream, estimate we can read 2x uncompressed
if( is != null )
bs = new byte[bs.length * 2];
// Now read from the (possibly compressed) stream
while( off < bs.length ) {
int len = is.read(bs, off, bs.length - off);
if( len == -1 )
break;
off += len;
if( off == bs.length ) // Dataset is uncompressing alot! Need more space...
bs = Arrays.copyOf(bs,bs.length*2);
}
} catch( IOException ioe ) { // Stop at any io error
} finally {
try { if( is != null ) is.close(); } catch( IOException ioe ) { }
}
if( off < bs.length )
bs = Arrays.copyOf(bs, off); // Trim array to length read
// Now try to interpret the unzipped data as a CSV
return CsvParser.inspect(bs);
}
// Build a response JSON
private final Response serveUnparsedValue(Value v) {
JsonObject result = new JsonObject();
result.addProperty(VALUE_TYPE, "unparsed");
CsvParser.Setup setup = csvGuessValue(v);
if( setup._data != null && setup._data[1].length > 0 ) { // Able to parse sanely?
int zipped_len = v.getFirstBytes().length;
double bytes_per_row = (double) zipped_len / setup._numlines;
long rows = (long) (v.length() / bytes_per_row);
result.addProperty(NUM_ROWS, "~" + rows); // approx rows
result.addProperty(NUM_COLS, setup._data[1].length);
result.add(ROWS, new Gson().toJsonTree(setup._data));
} else {
result.addProperty(NUM_ROWS, "unknown");
result.addProperty(NUM_COLS, "unknown");
}
result.addProperty(VALUE_SIZE, v.length());
// The builder Response
Response r = Response.done(result);
// Some nice links in the response
r.addHeader("<div class='alert'>" //
+ Parse.link(v._key, "Parse into hex format") + " or " //
+ RReader.link(v._key, "from R data") + " </div>");
// Set the builder for showing the rows
r.setBuilder(ROWS, new ArrayBuilder() {
public String caption(JsonArray array, String name) {
return "<h4>First few sample rows</h4>";
}
});
return r;
}
public Response serveValueArray(final ValueArray va) {
if( _offset.value() > va._numrows )
return Response.error("Value only has " + va._numrows + " rows");
JsonObject result = new JsonObject();
result.addProperty(VALUE_TYPE, "parsed");
result.addProperty(KEY, va._key.toString());
result.addProperty(NUM_ROWS, va._numrows);
result.addProperty(NUM_COLS, va._cols.length);
result.addProperty(ROW_SIZE, va._rowsize);
result.addProperty(VALUE_SIZE, va.length());
JsonArray cols = new JsonArray();
JsonArray rows = new JsonArray();
for( int i = 0; i < va._cols.length; i++ ) {
Column c = va._cols[i];
JsonObject json = new JsonObject();
json.addProperty(NAME, c._name);
json.addProperty(OFFSET, (int) c._off);
json.addProperty(SIZE, Math.abs(c._size));
json.addProperty(BASE, c._base);
json.addProperty(SCALE, (int) c._scale);
json.addProperty(MIN, c._min);
json.addProperty(MAX, c._max);
json.addProperty(MEAN, c._mean);
json.addProperty(VARIANCE, c._sigma);
json.addProperty(NUM_MISSING_VALUES, va._numrows - c._n);
json.addProperty(TYPE, c._domain != null ? "enum" : (c.isFloat() ? "int" : "float"));
json.addProperty(ENUM_DOMAIN_SIZE, c._domain != null ? c._domain.length : 0);
cols.add(json);
}
if( _offset.value() != INFO_PAGE ) {
long endRow = Math.min(_offset.value() + _view.value(), va._numrows);
long startRow = Math.min(_offset.value(), va._numrows - _view.value());
for( long row = Math.max(0, startRow); row < endRow; ++row ) {
JsonObject obj = new JsonObject();
obj.addProperty(ROW, row);
for( int i = 0; i < va._cols.length; ++i )
format(obj, va, row, i);
rows.add(obj);
}
}
result.add(COLS, cols);
result.add(ROWS, rows);
Response r = Response.done(result);
r.setBuilder(ROOT_OBJECT, new ObjectBuilder() {
@Override
public String build(Response response, JsonObject object, String contextName) {
String s = html(va);
Table t = new Table(argumentsToJson(), _offset.value(), _view.value(), va);
s += t.build(response, object.get(ROWS), ROWS);
return s;
}
});
r.setBuilder(ROWS + "." + ROW, new ArrayRowElementBuilder() {
@Override
public String elementToString(JsonElement elm, String contextName) {
String s = _displayNames.get(elm.getAsString());
return s != null ? s : super.elementToString(elm, contextName);
}
});
return r;
}
private static void format(JsonObject obj, ValueArray va, long rowIdx, int colIdx) {
if( rowIdx < 0 || rowIdx >= va._numrows )
return;
if( colIdx >= va._cols.length )
return;
ValueArray.Column c = va._cols[colIdx];
String name = c._name != null ? c._name : "" + colIdx;
if( va.isNA(rowIdx, colIdx) ) {
obj.addProperty(name, "NA");
} else if( c._domain != null ) {
obj.addProperty(name, c._domain[(int) va.data(rowIdx, colIdx)]);
} else if( (c._size > 0) && (c._scale == 1) ) {
obj.addProperty(name, va.data(rowIdx, colIdx));
} else {
obj.addProperty(name, va.datad(rowIdx, colIdx));
}
}
private final String html(ValueArray ary) {
String keyParam = KEY + "=" + ary._key.toString();
StringBuilder sb = new StringBuilder();
// @formatter:off
sb.append(""
+ "<h3>"
+ "<a style='%delBtnStyle' href='RemoveAck.html?" + keyParam + "'>"
+ "<button class='btn btn-danger btn-mini'>X</button></a>"
+ " " + ary._key.toString()
+ "</h3>"
+ "<div class='alert'>" + "Build models using "
+ RF.link(ary._key, "Random Forest") + ", "
+ GLM.link(ary._key, "GLM") + ", " + GLMGrid.link(ary._key, "GLM Grid Search") + ", or "
+ KMeans.link(ary._key, "KMeans")
+ "</div>"
+ "<p><b><font size=+1>"
+ ary._cols.length + " columns, "
+ ary._rowsize + " bytes-per-row * " + ary._numrows + " rows = " + PrettyPrint.bytes(ary.length())
+ "</font></b></p>");
// @formatter:on
return sb.toString();
}
private static final class Table extends PaginatedTable {
private final ValueArray _va;
public Table(JsonObject query, long offset, int view, ValueArray va) {
super(query, offset, view, va._numrows, true);
_va = va;
}
@Override
public String build(Response response, JsonArray array, String contextName) {
StringBuilder sb = new StringBuilder();
if( array.size() == 0 ) { // Fake row, needed by builder
array = new JsonArray();
JsonObject fake = new JsonObject();
fake.addProperty(ROW, 0);
for( int i = 0; i < _va._cols.length; ++i )
format(fake, _va, 0, i);
array.add(fake);
}
sb.append(header(array));
JsonObject row = new JsonObject();
row.addProperty(ROW, MIN);
for( int i = 0; i < _va._cols.length; i++ )
row.addProperty(_va._cols[i]._name, _va._cols[i]._min);
sb.append(defaultBuilder(row).build(response, row, contextName));
row.addProperty(ROW, MAX);
for( int i = 0; i < _va._cols.length; i++ )
row.addProperty(_va._cols[i]._name, _va._cols[i]._max);
sb.append(defaultBuilder(row).build(response, row, contextName));
row.addProperty(ROW, MEAN);
for( int i = 0; i < _va._cols.length; i++ )
row.addProperty(_va._cols[i]._name, _va._cols[i]._mean);
sb.append(defaultBuilder(row).build(response, row, contextName));
row.addProperty(ROW, VARIANCE);
for( int i = 0; i < _va._cols.length; i++ )
row.addProperty(_va._cols[i]._name, _va._cols[i]._sigma);
sb.append(defaultBuilder(row).build(response, row, contextName));
row.addProperty(ROW, NUM_MISSING_VALUES);
for( int i = 0; i < _va._cols.length; i++ )
row.addProperty(_va._cols[i]._name, _va._numrows - _va._cols[i]._n);
sb.append(defaultBuilder(row).build(response, row, contextName));
if( _offset == INFO_PAGE ) {
row.addProperty(ROW, OFFSET);
for( int i = 0; i < _va._cols.length; i++ )
row.addProperty(_va._cols[i]._name, (int) _va._cols[i]._off);
sb.append(defaultBuilder(row).build(response, row, contextName));
row.addProperty(ROW, SIZE);
for( int i = 0; i < _va._cols.length; i++ )
row.addProperty(_va._cols[i]._name, Math.abs(_va._cols[i]._size));
sb.append(defaultBuilder(row).build(response, row, contextName));
row.addProperty(ROW, BASE);
for( int i = 0; i < _va._cols.length; i++ )
row.addProperty(_va._cols[i]._name, _va._cols[i]._base);
sb.append(defaultBuilder(row).build(response, row, contextName));
row.addProperty(ROW, SCALE);
for( int i = 0; i < _va._cols.length; i++ )
row.addProperty(_va._cols[i]._name, (int) _va._cols[i]._scale);
sb.append(defaultBuilder(row).build(response, row, contextName));
row.addProperty(ROW, ENUM_DOMAIN_SIZE);
for( int i = 0; i < _va._cols.length; i++ )
row.addProperty(_va._cols[i]._name, _va._cols[i]._domain != null ? _va._cols[i]._domain.length : 0);
sb.append(defaultBuilder(row).build(response, row, contextName));
} else {
for( JsonElement e : array ) {
Builder builder = response.getBuilderFor(contextName + "_ROW");
if( builder == null )
builder = defaultBuilder(e);
sb.append(builder.build(response, e, contextName));
}
}
sb.append(footer(array));
return sb.toString();
}
}
}
| src/main/java/water/api/Inspect.java | package water.api;
import hex.GLMSolver.GLMModel;
import hex.KMeans.KMeansModel;
import java.io.IOException;
import java.io.InputStream;
import java.util.Arrays;
import java.util.HashMap;
import java.util.zip.*;
import water.*;
import water.ValueArray.Column;
import water.api.GLM.GLMBuilder;
import water.parser.CsvParser;
import com.google.gson.*;
public class Inspect extends Request {
private static final HashMap<String, String> _displayNames = new HashMap<String, String>();
private static final long INFO_PAGE = -1;
private final H2OExistingKey _key = new H2OExistingKey(KEY);
private final LongInt _offset = new LongInt(OFFSET, 0L, INFO_PAGE, Long.MAX_VALUE, "");
private final Int _view = new Int(VIEW, 100, 0, 10000);
static {
_displayNames.put(BASE, "Base");
_displayNames.put(ENUM_DOMAIN_SIZE, "Enum Domain");
_displayNames.put(MAX, "Max");
_displayNames.put(MEAN, "μ");
_displayNames.put(MIN, "Min");
_displayNames.put(NUM_MISSING_VALUES, "Missing");
_displayNames.put(OFFSET, "Offset");
_displayNames.put(SCALE, "Scale");
_displayNames.put(SIZE, "Size");
_displayNames.put(VARIANCE, "σ");
}
// Constructor called from 'Exec' query instead of the direct view links
Inspect(Key k) {
_key.reset();
_key.check(k.toString());
_offset.reset();
_offset.check("");
_view.reset();
_view.check("");
}
// Default no-args constructor
Inspect() {
}
public static Response redirect(JsonObject resp, Key dest) {
JsonObject redir = new JsonObject();
redir.addProperty(KEY, dest.toString());
return Response.redirect(resp, Inspect.class, redir);
}
@Override
protected Response serve() {
Value val = _key.value();
if( val.isHex() ) {
return serveValueArray(ValueArray.value(val));
}
if( _key.originalValue().startsWith(GLMModel.KEY_PREFIX) ) {
GLMModel m = val.get(new GLMModel());
JsonObject res = new JsonObject();
// Convert to JSON
res.add("GLMModel", m.toJson());
// Display HTML setup
Response r = Response.done(res);
r.setBuilder(""/* top-level do-it-all builder */, new GLMBuilder(m));
return r;
}
if( _key.originalValue().startsWith(KMeansModel.KEY_PREFIX) ) {
KMeansModel m = new KMeansModel().read(new AutoBuffer(val.get(), 0));
JsonObject res = new JsonObject();
// Convert to JSON
res.add("KMeansModel", m.toJson());
// Display HTML setup
Response r = Response.done(res);
// r.setBuilder(""/*top-level do-it-all builder*/,new KMeansBuilder(m));
return r;
}
return serveUnparsedValue(val);
}
// Look at unparsed data; guess its setup
public static CsvParser.Setup csvGuessValue(Value v) {
// See if we can make sense of the first few rows.
byte[] bs = v.getFirstBytes(); // Read some bytes
int off = 0;
// First decrypt compression
InputStream is = null;
try {
switch( water.parser.ParseDataset.guessCompressionMethod(v) ) {
case NONE: // No compression
off = bs.length; // All bytes ready already
break;
case ZIP: {
ZipInputStream zis = new ZipInputStream(v.openStream());
ZipEntry ze = zis.getNextEntry(); // Get the *FIRST* entry
// There is at least one entry in zip file and it is not a directory.
if( ze != null || !ze.isDirectory() )
is = zis;
break;
}
case GZIP:
is = new GZIPInputStream(v.openStream());
break;
}
// If reading from a compressed stream, estimate we can read 2x uncompressed
if( is != null )
bs = new byte[bs.length * 2];
// Now read from the (possibly compressed) stream
while( off < bs.length ) {
int len = is.read(bs, off, bs.length - off);
if( len == -1 )
break;
off += len;
}
} catch( IOException ioe ) { // Stop at any io error
} finally {
try { if( is != null ) is.close(); } catch( IOException ioe ) { }
}
if( off < bs.length )
bs = Arrays.copyOf(bs, off); // Trim array to length read
// Now try to interpret the unzipped data as a CSV
return CsvParser.inspect(bs);
}
// Build a response JSON
private final Response serveUnparsedValue(Value v) {
JsonObject result = new JsonObject();
result.addProperty(VALUE_TYPE, "unparsed");
CsvParser.Setup setup = csvGuessValue(v);
if( setup._data != null && setup._data[1].length > 0 ) { // Able to parse sanely?
int zipped_len = v.getFirstBytes().length;
double bytes_per_row = (double) zipped_len / setup._numlines;
long rows = (long) (v.length() / bytes_per_row);
result.addProperty(NUM_ROWS, "~" + rows); // approx rows
result.addProperty(NUM_COLS, setup._data[1].length);
result.add(ROWS, new Gson().toJsonTree(setup._data));
} else {
result.addProperty(NUM_ROWS, "unknown");
result.addProperty(NUM_COLS, "unknown");
}
result.addProperty(VALUE_SIZE, v.length());
// The builder Response
Response r = Response.done(result);
// Some nice links in the response
r.addHeader("<div class='alert'>" //
+ Parse.link(v._key, "Parse into hex format") + " or " //
+ RReader.link(v._key, "from R data") + " </div>");
// Set the builder for showing the rows
r.setBuilder(ROWS, new ArrayBuilder() {
public String caption(JsonArray array, String name) {
return "<h4>First few sample rows</h4>";
}
});
return r;
}
public Response serveValueArray(final ValueArray va) {
if( _offset.value() > va._numrows )
return Response.error("Value only has " + va._numrows + " rows");
JsonObject result = new JsonObject();
result.addProperty(VALUE_TYPE, "parsed");
result.addProperty(KEY, va._key.toString());
result.addProperty(NUM_ROWS, va._numrows);
result.addProperty(NUM_COLS, va._cols.length);
result.addProperty(ROW_SIZE, va._rowsize);
result.addProperty(VALUE_SIZE, va.length());
JsonArray cols = new JsonArray();
JsonArray rows = new JsonArray();
for( int i = 0; i < va._cols.length; i++ ) {
Column c = va._cols[i];
JsonObject json = new JsonObject();
json.addProperty(NAME, c._name);
json.addProperty(OFFSET, (int) c._off);
json.addProperty(SIZE, Math.abs(c._size));
json.addProperty(BASE, c._base);
json.addProperty(SCALE, (int) c._scale);
json.addProperty(MIN, c._min);
json.addProperty(MAX, c._max);
json.addProperty(MEAN, c._mean);
json.addProperty(VARIANCE, c._sigma);
json.addProperty(NUM_MISSING_VALUES, va._numrows - c._n);
json.addProperty(TYPE, c._domain != null ? "enum" : (c.isFloat() ? "int" : "float"));
json.addProperty(ENUM_DOMAIN_SIZE, c._domain != null ? c._domain.length : 0);
cols.add(json);
}
if( _offset.value() != INFO_PAGE ) {
long endRow = Math.min(_offset.value() + _view.value(), va._numrows);
long startRow = Math.min(_offset.value(), va._numrows - _view.value());
for( long row = Math.max(0, startRow); row < endRow; ++row ) {
JsonObject obj = new JsonObject();
obj.addProperty(ROW, row);
for( int i = 0; i < va._cols.length; ++i )
format(obj, va, row, i);
rows.add(obj);
}
}
result.add(COLS, cols);
result.add(ROWS, rows);
Response r = Response.done(result);
r.setBuilder(ROOT_OBJECT, new ObjectBuilder() {
@Override
public String build(Response response, JsonObject object, String contextName) {
String s = html(va);
Table t = new Table(argumentsToJson(), _offset.value(), _view.value(), va);
s += t.build(response, object.get(ROWS), ROWS);
return s;
}
});
r.setBuilder(ROWS + "." + ROW, new ArrayRowElementBuilder() {
@Override
public String elementToString(JsonElement elm, String contextName) {
String s = _displayNames.get(elm.getAsString());
return s != null ? s : super.elementToString(elm, contextName);
}
});
return r;
}
private static void format(JsonObject obj, ValueArray va, long rowIdx, int colIdx) {
if( rowIdx < 0 || rowIdx >= va._numrows )
return;
if( colIdx >= va._cols.length )
return;
ValueArray.Column c = va._cols[colIdx];
String name = c._name != null ? c._name : "" + colIdx;
if( va.isNA(rowIdx, colIdx) ) {
obj.addProperty(name, "NA");
} else if( c._domain != null ) {
obj.addProperty(name, c._domain[(int) va.data(rowIdx, colIdx)]);
} else if( (c._size > 0) && (c._scale == 1) ) {
obj.addProperty(name, va.data(rowIdx, colIdx));
} else {
obj.addProperty(name, va.datad(rowIdx, colIdx));
}
}
private final String html(ValueArray ary) {
String keyParam = KEY + "=" + ary._key.toString();
StringBuilder sb = new StringBuilder();
// @formatter:off
sb.append(""
+ "<h3>"
+ "<a style='%delBtnStyle' href='RemoveAck.html?" + keyParam + "'>"
+ "<button class='btn btn-danger btn-mini'>X</button></a>"
+ " " + ary._key.toString()
+ "</h3>"
+ "<div class='alert'>" + "Build models using "
+ RF.link(ary._key, "Random Forest") + ", "
+ GLM.link(ary._key, "GLM") + ", " + GLMGrid.link(ary._key, "GLM Grid Search") + ", or "
+ KMeans.link(ary._key, "KMeans")
+ "</div>"
+ "<p><b><font size=+1>"
+ ary._cols.length + " columns, "
+ ary._rowsize + " bytes-per-row * " + ary._numrows + " rows = " + PrettyPrint.bytes(ary.length())
+ "</font></b></p>");
// @formatter:on
return sb.toString();
}
private static final class Table extends PaginatedTable {
private final ValueArray _va;
public Table(JsonObject query, long offset, int view, ValueArray va) {
super(query, offset, view, va._numrows, true);
_va = va;
}
@Override
public String build(Response response, JsonArray array, String contextName) {
StringBuilder sb = new StringBuilder();
if( array.size() == 0 ) { // Fake row, needed by builder
array = new JsonArray();
JsonObject fake = new JsonObject();
fake.addProperty(ROW, 0);
for( int i = 0; i < _va._cols.length; ++i )
format(fake, _va, 0, i);
array.add(fake);
}
sb.append(header(array));
JsonObject row = new JsonObject();
row.addProperty(ROW, MIN);
for( int i = 0; i < _va._cols.length; i++ )
row.addProperty(_va._cols[i]._name, _va._cols[i]._min);
sb.append(defaultBuilder(row).build(response, row, contextName));
row.addProperty(ROW, MAX);
for( int i = 0; i < _va._cols.length; i++ )
row.addProperty(_va._cols[i]._name, _va._cols[i]._max);
sb.append(defaultBuilder(row).build(response, row, contextName));
row.addProperty(ROW, MEAN);
for( int i = 0; i < _va._cols.length; i++ )
row.addProperty(_va._cols[i]._name, _va._cols[i]._mean);
sb.append(defaultBuilder(row).build(response, row, contextName));
row.addProperty(ROW, VARIANCE);
for( int i = 0; i < _va._cols.length; i++ )
row.addProperty(_va._cols[i]._name, _va._cols[i]._sigma);
sb.append(defaultBuilder(row).build(response, row, contextName));
row.addProperty(ROW, NUM_MISSING_VALUES);
for( int i = 0; i < _va._cols.length; i++ )
row.addProperty(_va._cols[i]._name, _va._numrows - _va._cols[i]._n);
sb.append(defaultBuilder(row).build(response, row, contextName));
if( _offset == INFO_PAGE ) {
row.addProperty(ROW, OFFSET);
for( int i = 0; i < _va._cols.length; i++ )
row.addProperty(_va._cols[i]._name, (int) _va._cols[i]._off);
sb.append(defaultBuilder(row).build(response, row, contextName));
row.addProperty(ROW, SIZE);
for( int i = 0; i < _va._cols.length; i++ )
row.addProperty(_va._cols[i]._name, Math.abs(_va._cols[i]._size));
sb.append(defaultBuilder(row).build(response, row, contextName));
row.addProperty(ROW, BASE);
for( int i = 0; i < _va._cols.length; i++ )
row.addProperty(_va._cols[i]._name, _va._cols[i]._base);
sb.append(defaultBuilder(row).build(response, row, contextName));
row.addProperty(ROW, SCALE);
for( int i = 0; i < _va._cols.length; i++ )
row.addProperty(_va._cols[i]._name, (int) _va._cols[i]._scale);
sb.append(defaultBuilder(row).build(response, row, contextName));
row.addProperty(ROW, ENUM_DOMAIN_SIZE);
for( int i = 0; i < _va._cols.length; i++ )
row.addProperty(_va._cols[i]._name, _va._cols[i]._domain != null ? _va._cols[i]._domain.length : 0);
sb.append(defaultBuilder(row).build(response, row, contextName));
} else {
for( JsonElement e : array ) {
Builder builder = response.getBuilderFor(contextName + "_ROW");
if( builder == null )
builder = defaultBuilder(e);
sb.append(builder.build(response, e, contextName));
}
}
sb.append(footer(array));
return sb.toString();
}
}
}
| Handle files which compress extremely well
| src/main/java/water/api/Inspect.java | Handle files which compress extremely well | <ide><path>rc/main/java/water/api/Inspect.java
<ide> if( len == -1 )
<ide> break;
<ide> off += len;
<add> if( off == bs.length ) // Dataset is uncompressing alot! Need more space...
<add> bs = Arrays.copyOf(bs,bs.length*2);
<ide> }
<ide> } catch( IOException ioe ) { // Stop at any io error
<ide> } finally { |
|
Java | apache-2.0 | bb169353f6f705d4c81d1eb8bb34ef063c76110d | 0 | bitstrings/portallocator-maven-plugin | /*
* 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.
*/
package org.bitstrings.maven.plugins.portallocator;
import static com.google.common.base.MoreObjects.*;
import static java.util.Collections.*;
import static org.apache.maven.plugins.annotations.LifecyclePhase.*;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.io.Writer;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Map;
import java.util.Properties;
import java.util.Set;
import java.util.concurrent.locks.ReentrantLock;
import org.apache.commons.lang3.BooleanUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.maven.execution.MavenSession;
import org.apache.maven.plugin.AbstractMojo;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.MojoFailureException;
import org.apache.maven.plugins.annotations.Mojo;
import org.apache.maven.plugins.annotations.Parameter;
import org.apache.maven.project.MavenProject;
import org.bitstrings.maven.plugins.portallocator.util.Helpers;
import com.google.common.base.Function;
import com.google.common.collect.Iterators;
import com.google.common.collect.LinkedListMultimap;
import com.google.common.collect.ListMultimap;
import com.google.common.collect.Maps;
@Mojo( name = "allocate", defaultPhase = VALIDATE, threadSafe = true, requiresProject = true, requiresOnline = false )
public class PortAllocatorMojo
extends AbstractMojo
{
@Parameter( defaultValue = "${project}", readonly = true )
private MavenProject mavenProject;
@Parameter( defaultValue = "${session}", readonly = true )
private MavenSession mavenSession;
@Parameter( defaultValue = "false" )
private boolean quiet;
@Parameter
private PortAllocators portAllocators;
@Parameter
private Ports ports;
@Parameter( defaultValue = PORT_NAME_SUFFIX_DEFAULT )
private String portNameSuffix;
@Parameter( defaultValue = OFFSET_NAME_SUFFIX_DEFAULT )
private String offsetNameSuffix;
@Parameter( defaultValue = NAME_SEPARATOR_DEFAULT )
private String nameSeparator;
@Parameter
private File writePropertiesFile;
private final Map<String, Integer> executionPortMap = new HashMap<>();
private static final String PREFERRED_PORTS_DEFAULT = "8090";
private static final String PORT_NAME_SUFFIX_DEFAULT = "port";
private static final String OFFSET_NAME_SUFFIX_DEFAULT = "port-offset";
private static final String NAME_SEPARATOR_DEFAULT = ".";
private static final String PORT_ALLOCATOR_DEFAULT_ID = "default";
private static final Set<Integer> ALLOCATED_PORTS = synchronizedSet( new HashSet<Integer>() );
private static final Map<String, PortAllocatorService>
PORT_ALLOCATOR_SERVICE_MAP =
synchronizedMap( new HashMap<String, PortAllocatorService>() );
private static final ReentrantLock ALLOCATION_LOCK = new ReentrantLock();
private static final PortAllocatorService PORT_ALLOCATOR_SERVICE_DEFAULT;
static
{
PORT_ALLOCATOR_SERVICE_MAP.put(
PORT_ALLOCATOR_DEFAULT_ID,
PORT_ALLOCATOR_SERVICE_DEFAULT = createPortAllocatorService( new PortAllocator() ) );
}
@Override
public void execute()
throws MojoExecutionException, MojoFailureException
{
try
{
if ( portAllocators != null )
{
for ( PortAllocator portAllocator : portAllocators )
{
final PortAllocatorService pas = createPortAllocatorService( portAllocator );
final PortAllocatorService existingPas = PORT_ALLOCATOR_SERVICE_MAP.get( portAllocator.getId() );
if ( portAllocator.isPermitOverride()
|| ( existingPas == null )
|| ( portAllocator.getId().equals( PORT_ALLOCATOR_DEFAULT_ID )
&& ( existingPas == PORT_ALLOCATOR_SERVICE_DEFAULT ) ) )
{
PORT_ALLOCATOR_SERVICE_MAP.put( portAllocator.getId(), pas );
if ( !quiet && getLog().isInfoEnabled() )
{
getLog().info( "Registering port allocator [" + portAllocator.getId() + "]");
}
}
}
}
if ( ports != null )
{
if ( ( ports.getPortAllocatorRef() != null ) && ( ports.getPortAllocator() != null ) )
{
throw new MojoExecutionException(
"Either use a port allocator reference or define an inner allocator but you can use both." );
}
PortAllocatorService pas =
ports.getPortAllocator() == null
? PORT_ALLOCATOR_SERVICE_MAP.get(
firstNonNull( ports.getPortAllocatorRef(), PORT_ALLOCATOR_DEFAULT_ID ) )
: createPortAllocatorService( ports.getPortAllocator() );
if ( pas == null )
{
throw new MojoExecutionException(
"Cannot find port allocator [" + ports.getPortAllocatorRef() + "]" );
}
final LinkedListMultimap<String, Port> portGroupMap = LinkedListMultimap.create();
for ( Port port : ports )
{
final String offsetFrom = port.getOffsetFrom();
final String portGroupName = findGroupRoot( port, portGroupMap );
portGroupMap.put( portGroupName, port );
if ( offsetFrom != null )
{
Integer fromParent = executionPortMap.get( getPortName( portGroupName ) );
if ( fromParent == null )
{
throw new MojoExecutionException(
"Port [" + port.getName() + "] using offset from undefined [" + offsetFrom + "]." );
}
portGroupMap.put( offsetFrom, port );
}
Iterator<Port> portIterator = Iterators.singletonIterator( port );
while ( portIterator.hasNext() )
{
final Port portToAllocate = portIterator.next();
ALLOCATION_LOCK.lock();
ALLOCATED_PORTS.remove( executionPortMap.remove( getPortName( portToAllocate.getName() ) ) );
ALLOCATED_PORTS.remove( executionPortMap.remove( getOffsetName( portToAllocate.getName() ) ) );
ALLOCATION_LOCK.unlock();
if ( !allocatePort( pas, portToAllocate ) )
{
if ( offsetFrom != null )
{
portIterator = portGroupMap.get( portGroupName ).listIterator();
}
}
}
}
}
if ( writePropertiesFile != null )
{
final File parent = writePropertiesFile.getParentFile();
if ( ( parent != null ) && !parent.exists() )
{
parent.mkdirs();
}
try ( final Writer out = new BufferedWriter( new FileWriter( writePropertiesFile ) ) )
{
if ( !quiet && getLog().isInfoEnabled() )
{
getLog().info( "Writing ports file [" + writePropertiesFile + "]" );
}
final Properties outProps = new Properties();
outProps.putAll(
Maps.transformValues(
executionPortMap,
new Function<Integer, String>()
{
@Override
public String apply( Integer input )
{
return input.toString();
}
}
)
);
outProps.store( out, null );
}
catch ( Exception e )
{
throw new MojoExecutionException( "Problem writing ports file [" + writePropertiesFile + "]", e );
}
}
}
catch ( MojoExecutionException e )
{
throw e;
}
catch ( Exception e )
{
throw new MojoExecutionException( e.getLocalizedMessage(), e );
}
}
protected static PortAllocatorService createPortAllocatorService( PortAllocator portAllocator )
{
initPortAllocator( portAllocator );
final PortAllocatorService.Builder pasBuilder = new PortAllocatorService.Builder();
if ( portAllocator.getDepletedAction() == PortAllocator.DepletedAction.CONTINUE )
{
pasBuilder.overflowPermitted();
}
for ( String portsCsv : portAllocator.getPreferredPorts().getPortsList() )
{
addPortRanges( pasBuilder, portsCsv );
}
pasBuilder.listener(
new PortAllocatorService.Listener()
{
@Override
public boolean beforeAllocation( int potentialPort )
{
ALLOCATION_LOCK.lock();
return !ALLOCATED_PORTS.contains( potentialPort );
}
@Override
public void afterAllocation( int port )
{
ALLOCATED_PORTS.add( port );
ALLOCATION_LOCK.unlock();
}
}
);
return pasBuilder.build();
}
protected static void initPortAllocator( PortAllocator portAllocator )
{
if ( portAllocator.getDepletedAction() == null )
{
portAllocator.setDepletedAction( PortAllocator.DepletedAction.CONTINUE );
}
if ( portAllocator.getPreferredPorts() == null )
{
portAllocator.setPreferredPorts( new PortAllocator.PreferredPorts() );
}
if ( portAllocator.getPreferredPorts().getPortsList().isEmpty() )
{
portAllocator.getPreferredPorts().addPorts( PREFERRED_PORTS_DEFAULT );
}
if ( portAllocator.getId() == null )
{
portAllocator.setId( PORT_ALLOCATOR_DEFAULT_ID );
}
}
protected static void addPortRanges( PortAllocatorService.Builder builder, String portsCsv )
{
for ( String portRange : Helpers.iterateOnCsv( portsCsv ) )
{
final int rangeSepIndex = portRange.indexOf( '-' );
if ( rangeSepIndex == -1 )
{
builder.port( Integer.parseInt( portRange.trim() ) );
}
else
{
final int lowest = Integer.parseInt( portRange.substring( 0 , rangeSepIndex ).trim() );
if ( rangeSepIndex == portRange.length() )
{
builder.portFrom( lowest );
}
else
{
builder.portRange(
lowest,
Integer.parseInt( portRange.substring( rangeSepIndex + 1 ).trim() ) );
}
}
}
}
protected boolean allocatePort( PortAllocatorService pas, Port portConfig )
throws MojoExecutionException, IOException
{
final String portNamePrefix = portConfig.getName();
final String portPropertyName = getPortName( portNamePrefix );
final int allocatedPort;
if ( portConfig.getOffsetFrom() != null )
{
if ( portConfig.getPreferredPort() == null )
{
throw new MojoExecutionException( "'preferredPort' must be set when using 'fromOffset'." );
}
final String offsetFromName = getOffsetName( portConfig.getOffsetFrom() );
final Integer fromOffset = executionPortMap.get( offsetFromName );
if ( fromOffset == null )
{
throw new MojoExecutionException(
"Port [" + portPropertyName + "] references an unknown port offset [" + offsetFromName + "]" );
}
allocatedPort = ( portConfig.getPreferredPort() + fromOffset );
if ( !pas.isPortAvailable( allocatedPort ) )
{
return false;
}
}
else
{
allocatedPort =
( ( portConfig.getPreferredPort() != null ) && pas.isPortAvailable( portConfig.getPreferredPort() ) )
? portConfig.getPreferredPort()
: pas.nextAvailablePort();
if ( allocatedPort == PortAllocatorService.PORT_NA )
{
throw new MojoExecutionException( "Unable to allocate a port for [" + portPropertyName + "]" );
}
}
mavenProject.getProperties().put( portPropertyName, String.valueOf( allocatedPort ) );
executionPortMap.put( portPropertyName, allocatedPort );
if ( !quiet && getLog().isInfoEnabled() )
{
getLog().info( "Assigning port [" + allocatedPort + "] to property [" + portPropertyName + "]" );
}
if ( BooleanUtils.isTrue( portConfig.getSetOffsetProperty() != null ) )
{
if ( portConfig.getPreferredPort() == null )
{
throw new MojoExecutionException( "'preferredPort' must be set when 'setOffsetProperty = true'." );
}
final String offsetPropertyName = getOffsetName( portNamePrefix );
final int offset = ( allocatedPort - portConfig.getPreferredPort() );
mavenProject.getProperties().put( offsetPropertyName, String.valueOf( offset ) );
executionPortMap.put( offsetPropertyName, offset );
if ( !quiet && getLog().isInfoEnabled() )
{
getLog().info(
"Assigning offset [" + offset + "] "
+ "using preferred port [" + portConfig.getPreferredPort() + "] "
+ "to property [" + offsetPropertyName + "]" );
}
}
return true;
}
protected String findGroupRoot( Port port, ListMultimap<String, Port> portGroupMap )
{
while (
( port != null )
&& ( port.getOffsetFrom() != null )
&& portGroupMap.containsKey( port.getOffsetFrom() ) )
{
port = portGroupMap.get( port.getOffsetFrom() ).get( 0 );
}
return port.getName();
}
protected String getPortName( String prefix )
{
return buildName( prefix, portNameSuffix );
}
protected String getOffsetName( String prefix )
{
return buildName( prefix, offsetNameSuffix );
}
protected String buildName( String... parts )
{
return StringUtils.join( parts, nameSeparator );
}
}
| src/main/java/org/bitstrings/maven/plugins/portallocator/PortAllocatorMojo.java | /*
* 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.
*/
package org.bitstrings.maven.plugins.portallocator;
import static com.google.common.base.MoreObjects.*;
import static java.util.Collections.*;
import static org.apache.maven.plugins.annotations.LifecyclePhase.*;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.io.Writer;
import java.util.Collection;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Map;
import java.util.Properties;
import java.util.Set;
import java.util.concurrent.locks.ReentrantLock;
import org.apache.commons.lang3.BooleanUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.maven.execution.MavenSession;
import org.apache.maven.plugin.AbstractMojo;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.MojoFailureException;
import org.apache.maven.plugins.annotations.Mojo;
import org.apache.maven.plugins.annotations.Parameter;
import org.apache.maven.project.MavenProject;
import org.bitstrings.maven.plugins.portallocator.util.Helpers;
import com.google.common.base.Function;
import com.google.common.collect.LinkedListMultimap;
import com.google.common.collect.Maps;
@Mojo( name = "allocate", defaultPhase = VALIDATE, threadSafe = true, requiresProject = true, requiresOnline = false )
public class PortAllocatorMojo
extends AbstractMojo
{
@Parameter( defaultValue = "${project}", readonly = true )
private MavenProject mavenProject;
@Parameter( defaultValue = "${session}", readonly = true )
private MavenSession mavenSession;
@Parameter( defaultValue = "false" )
private boolean quiet;
@Parameter
private PortAllocators portAllocators;
@Parameter
private Ports ports;
@Parameter( defaultValue = PORT_NAME_SUFFIX_DEFAULT )
private String portNameSuffix;
@Parameter( defaultValue = OFFSET_NAME_SUFFIX_DEFAULT )
private String offsetNameSuffix;
@Parameter( defaultValue = NAME_SEPARATOR_DEFAULT )
private String nameSeparator;
@Parameter
private File writePropertiesFile;
private final Map<String, Integer> executionPortMap = new HashMap<>();
private static final String PREFERRED_PORTS_DEFAULT = "8090";
private static final String PORT_NAME_SUFFIX_DEFAULT = "port";
private static final String OFFSET_NAME_SUFFIX_DEFAULT = "port-offset";
private static final String NAME_SEPARATOR_DEFAULT = ".";
private static final String PORT_ALLOCATOR_DEFAULT_ID = "default";
private static final Set<Integer> ALLOCATED_PORTS = synchronizedSet( new HashSet<Integer>() );
private static final Map<String, PortAllocatorService>
PORT_ALLOCATOR_SERVICE_MAP =
synchronizedMap( new HashMap<String, PortAllocatorService>() );
private static final ReentrantLock ALLOCATION_LOCK = new ReentrantLock();
private static final PortAllocatorService PORT_ALLOCATOR_SERVICE_DEFAULT;
static
{
PORT_ALLOCATOR_SERVICE_MAP.put(
PORT_ALLOCATOR_DEFAULT_ID,
PORT_ALLOCATOR_SERVICE_DEFAULT = createPortAllocatorService( new PortAllocator() ) );
}
@Override
public void execute()
throws MojoExecutionException, MojoFailureException
{
try
{
if ( portAllocators != null )
{
for ( PortAllocator portAllocator : portAllocators )
{
final PortAllocatorService pas = createPortAllocatorService( portAllocator );
final PortAllocatorService existingPas = PORT_ALLOCATOR_SERVICE_MAP.get( portAllocator.getId() );
if ( portAllocator.isPermitOverride()
|| ( existingPas == null )
|| ( portAllocator.getId().equals( PORT_ALLOCATOR_DEFAULT_ID )
&& ( existingPas == PORT_ALLOCATOR_SERVICE_DEFAULT ) ) )
{
PORT_ALLOCATOR_SERVICE_MAP.put( portAllocator.getId(), pas );
if ( !quiet && getLog().isInfoEnabled() )
{
getLog().info( "Registering port allocator [" + portAllocator.getId() + "]");
}
}
}
}
if ( ports != null )
{
if ( ( ports.getPortAllocatorRef() != null ) && ( ports.getPortAllocator() != null ) )
{
throw new MojoExecutionException(
"Either use a port allocator reference or define an inner allocator but you can use both." );
}
PortAllocatorService pas =
ports.getPortAllocator() == null
? PORT_ALLOCATOR_SERVICE_MAP.get(
firstNonNull( ports.getPortAllocatorRef(), PORT_ALLOCATOR_DEFAULT_ID ) )
: createPortAllocatorService( ports.getPortAllocator() );
if ( pas == null )
{
throw new MojoExecutionException(
"Cannot find port allocator [" + ports.getPortAllocatorRef() + "]" );
}
final LinkedListMultimap<String, Port> portGroupMap = LinkedListMultimap.create();
for ( Port port : ports )
{
portGroupMap.put( port.getName(), port );
if ( port.getOffsetFrom() != null )
{
portGroupMap.put( port.getOffsetFrom(), port );
}
}
while ( !portGroupMap.isEmpty() )
{
portGroupMap.entries().listIterator();
for (
Iterator<Map.Entry<String, Collection<Port>>> iter = portGroupMap.asMap().entrySet().iterator();
iter.hasNext(); )
{
final Map.Entry<String, Collection<Port>> entry = iter.next();
boolean groupSuccess = true;
for ( Port port : entry.getValue() )
{
if ( !allocatePort( pas, port ) )
{
groupSuccess = false;
break;
}
}
if ( groupSuccess )
{
iter.remove();
}
}
}
}
if ( writePropertiesFile != null )
{
final File parent = writePropertiesFile.getParentFile();
if ( ( parent != null ) && !parent.exists() )
{
parent.mkdirs();
}
try ( final Writer out = new BufferedWriter( new FileWriter( writePropertiesFile ) ) )
{
if ( !quiet && getLog().isInfoEnabled() )
{
getLog().info( "Writing ports file [" + writePropertiesFile + "]" );
}
final Properties outProps = new Properties();
outProps.putAll(
Maps.transformValues(
executionPortMap,
new Function<Integer, String>()
{
@Override
public String apply( Integer input )
{
return input.toString();
}
}
)
);
outProps.store( out, null );
}
catch ( Exception e )
{
throw new MojoExecutionException( "Problem writing ports file [" + writePropertiesFile + "]", e );
}
}
}
catch ( MojoExecutionException e )
{
throw e;
}
catch ( Exception e )
{
throw new MojoExecutionException( e.getLocalizedMessage(), e );
}
}
protected static PortAllocatorService createPortAllocatorService( PortAllocator portAllocator )
{
initPortAllocator( portAllocator );
final PortAllocatorService.Builder pasBuilder = new PortAllocatorService.Builder();
if ( portAllocator.getDepletedAction() == PortAllocator.DepletedAction.CONTINUE )
{
pasBuilder.overflowPermitted();
}
for ( String portsCsv : portAllocator.getPreferredPorts().getPortsList() )
{
addPortRanges( pasBuilder, portsCsv );
}
pasBuilder.listener(
new PortAllocatorService.Listener()
{
@Override
public boolean beforeAllocation( int potentialPort )
{
ALLOCATION_LOCK.lock();
return !ALLOCATED_PORTS.contains( potentialPort );
}
@Override
public void afterAllocation( int port )
{
ALLOCATED_PORTS.add( port );
ALLOCATION_LOCK.unlock();
}
}
);
return pasBuilder.build();
}
protected static void initPortAllocator( PortAllocator portAllocator )
{
if ( portAllocator.getDepletedAction() == null )
{
portAllocator.setDepletedAction( PortAllocator.DepletedAction.CONTINUE );
}
if ( portAllocator.getPreferredPorts() == null )
{
portAllocator.setPreferredPorts( new PortAllocator.PreferredPorts() );
}
if ( portAllocator.getPreferredPorts().getPortsList().isEmpty() )
{
portAllocator.getPreferredPorts().addPorts( PREFERRED_PORTS_DEFAULT );
}
if ( portAllocator.getId() == null )
{
portAllocator.setId( PORT_ALLOCATOR_DEFAULT_ID );
}
}
protected static void addPortRanges( PortAllocatorService.Builder builder, String portsCsv )
{
for ( String portRange : Helpers.iterateOnCsv( portsCsv ) )
{
final int rangeSepIndex = portRange.indexOf( '-' );
if ( rangeSepIndex == -1 )
{
builder.port( Integer.parseInt( portRange.trim() ) );
}
else
{
final int lowest = Integer.parseInt( portRange.substring( 0 , rangeSepIndex ).trim() );
if ( rangeSepIndex == portRange.length() )
{
builder.portFrom( lowest );
}
else
{
builder.portRange(
lowest,
Integer.parseInt( portRange.substring( rangeSepIndex + 1 ).trim() ) );
}
}
}
}
protected boolean allocatePort( PortAllocatorService pas, Port portConfig )
throws MojoExecutionException, IOException
{
final String portNamePrefix = portConfig.getName();
final String portPropertyName = getPortName( portNamePrefix );
final int allocatedPort;
if ( portConfig.getOffsetFrom() != null )
{
if ( portConfig.getPreferredPort() == null )
{
throw new MojoExecutionException( "'preferredPort' must be set when using 'fromOffset'." );
}
final String offsetFromName = getOffsetName( portConfig.getOffsetFrom() );
final Integer fromOffset = executionPortMap.get( offsetFromName );
if ( fromOffset == null )
{
throw new MojoExecutionException(
"Port [" + portPropertyName + "] references an unknown port offset [" + offsetFromName + "]" );
}
allocatedPort = ( portConfig.getPreferredPort() + fromOffset );
if ( !pas.isPortAvailable( allocatedPort ) )
{
return false;
}
}
else
{
allocatedPort =
( ( portConfig.getPreferredPort() != null ) && pas.isPortAvailable( portConfig.getPreferredPort() ) )
? portConfig.getPreferredPort()
: pas.nextAvailablePort();
if ( allocatedPort == PortAllocatorService.PORT_NA )
{
throw new MojoExecutionException( "Unable to allocate a port for [" + portPropertyName + "]" );
}
}
mavenProject.getProperties().put( portPropertyName, String.valueOf( allocatedPort ) );
executionPortMap.put( portPropertyName, allocatedPort );
if ( !quiet && getLog().isInfoEnabled() )
{
getLog().info( "Assigning port [" + allocatedPort + "] to property [" + portPropertyName + "]" );
}
if ( BooleanUtils.isTrue( portConfig.getSetOffsetProperty() != null ) )
{
if ( portConfig.getPreferredPort() == null )
{
throw new MojoExecutionException( "'preferredPort' must be set when 'setOffsetProperty=true'." );
}
final String offsetPropertyName = getOffsetName( portNamePrefix );
final int offset = ( allocatedPort - portConfig.getPreferredPort() );
mavenProject.getProperties().put( offsetPropertyName, String.valueOf( offset ) );
executionPortMap.put( offsetPropertyName, offset );
if ( !quiet && getLog().isInfoEnabled() )
{
getLog().info(
"Assigning offset [" + offset + "] "
+ "using preferred port [" + portConfig.getPreferredPort() + "] "
+ "to property [" + offsetPropertyName + "]" );
}
}
return true;
}
protected String getPortName( String prefix )
{
return buildName( prefix, portNameSuffix );
}
protected String getOffsetName( String prefix )
{
return buildName( prefix, offsetNameSuffix );
}
protected String buildName( String... parts )
{
return StringUtils.join( parts, nameSeparator );
}
}
| first step in fixing port allocation i.e.: offsetFrom | src/main/java/org/bitstrings/maven/plugins/portallocator/PortAllocatorMojo.java | first step in fixing port allocation i.e.: offsetFrom | <ide><path>rc/main/java/org/bitstrings/maven/plugins/portallocator/PortAllocatorMojo.java
<ide> import java.io.FileWriter;
<ide> import java.io.IOException;
<ide> import java.io.Writer;
<del>import java.util.Collection;
<ide> import java.util.HashMap;
<ide> import java.util.HashSet;
<ide> import java.util.Iterator;
<ide> import org.bitstrings.maven.plugins.portallocator.util.Helpers;
<ide>
<ide> import com.google.common.base.Function;
<add>import com.google.common.collect.Iterators;
<ide> import com.google.common.collect.LinkedListMultimap;
<add>import com.google.common.collect.ListMultimap;
<ide> import com.google.common.collect.Maps;
<ide>
<ide> @Mojo( name = "allocate", defaultPhase = VALIDATE, threadSafe = true, requiresProject = true, requiresOnline = false )
<ide>
<ide> for ( Port port : ports )
<ide> {
<del> portGroupMap.put( port.getName(), port );
<del>
<del> if ( port.getOffsetFrom() != null )
<add> final String offsetFrom = port.getOffsetFrom();
<add> final String portGroupName = findGroupRoot( port, portGroupMap );
<add>
<add> portGroupMap.put( portGroupName, port );
<add>
<add> if ( offsetFrom != null )
<ide> {
<del> portGroupMap.put( port.getOffsetFrom(), port );
<add> Integer fromParent = executionPortMap.get( getPortName( portGroupName ) );
<add> if ( fromParent == null )
<add> {
<add> throw new MojoExecutionException(
<add> "Port [" + port.getName() + "] using offset from undefined [" + offsetFrom + "]." );
<add> }
<add>
<add> portGroupMap.put( offsetFrom, port );
<ide> }
<del> }
<del>
<del> while ( !portGroupMap.isEmpty() )
<del> {
<del> portGroupMap.entries().listIterator();
<del>
<del> for (
<del> Iterator<Map.Entry<String, Collection<Port>>> iter = portGroupMap.asMap().entrySet().iterator();
<del> iter.hasNext(); )
<add>
<add> Iterator<Port> portIterator = Iterators.singletonIterator( port );
<add>
<add> while ( portIterator.hasNext() )
<ide> {
<del> final Map.Entry<String, Collection<Port>> entry = iter.next();
<del>
<del> boolean groupSuccess = true;
<del> for ( Port port : entry.getValue() )
<add> final Port portToAllocate = portIterator.next();
<add>
<add> ALLOCATION_LOCK.lock();
<add>
<add> ALLOCATED_PORTS.remove( executionPortMap.remove( getPortName( portToAllocate.getName() ) ) );
<add> ALLOCATED_PORTS.remove( executionPortMap.remove( getOffsetName( portToAllocate.getName() ) ) );
<add>
<add> ALLOCATION_LOCK.unlock();
<add>
<add> if ( !allocatePort( pas, portToAllocate ) )
<ide> {
<del> if ( !allocatePort( pas, port ) )
<add> if ( offsetFrom != null )
<ide> {
<del> groupSuccess = false;
<del> break;
<add> portIterator = portGroupMap.get( portGroupName ).listIterator();
<ide> }
<ide> }
<del>
<del> if ( groupSuccess )
<del> {
<del> iter.remove();
<del> }
<ide> }
<add>
<ide> }
<ide> }
<ide>
<ide> {
<ide> if ( portConfig.getPreferredPort() == null )
<ide> {
<del> throw new MojoExecutionException( "'preferredPort' must be set when 'setOffsetProperty=true'." );
<add> throw new MojoExecutionException( "'preferredPort' must be set when 'setOffsetProperty = true'." );
<ide> }
<ide>
<ide> final String offsetPropertyName = getOffsetName( portNamePrefix );
<ide> return true;
<ide> }
<ide>
<add> protected String findGroupRoot( Port port, ListMultimap<String, Port> portGroupMap )
<add> {
<add> while (
<add> ( port != null )
<add> && ( port.getOffsetFrom() != null )
<add> && portGroupMap.containsKey( port.getOffsetFrom() ) )
<add> {
<add> port = portGroupMap.get( port.getOffsetFrom() ).get( 0 );
<add> }
<add>
<add> return port.getName();
<add> }
<add>
<ide> protected String getPortName( String prefix )
<ide> {
<ide> return buildName( prefix, portNameSuffix ); |
|
Java | apache-2.0 | b90b2dc8f7ee51a8d8aaa780298577643b35c223 | 0 | thkluge/gatling,pwielgolaski/gatling,GabrielPlassard/gatling,MykolaB/gatling,gatling/gatling,GabrielPlassard/gatling,ryez/gatling,MykolaB/gatling,timve/gatling,thkluge/gatling,MykolaB/gatling,GabrielPlassard/gatling,gatling/gatling,wiacekm/gatling,thkluge/gatling,GabrielPlassard/gatling,pwielgolaski/gatling,wiacekm/gatling,ryez/gatling,wiacekm/gatling,MykolaB/gatling,ryez/gatling,pwielgolaski/gatling,timve/gatling,timve/gatling,wiacekm/gatling,timve/gatling,thkluge/gatling,ryez/gatling,wiacekm/gatling,gatling/gatling,gatling/gatling,gatling/gatling,pwielgolaski/gatling | /**
* Copyright 2011-2012 eBusiness Information, Groupe Excilys (www.excilys.com)
*
* 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 com.excilys.ebi.gatling.recorder.ui.component;
import static com.excilys.ebi.gatling.recorder.http.event.RecorderEventBus.getEventBus;
import static com.excilys.ebi.gatling.recorder.ui.Constants.GATLING_REQUEST_BODIES_DIRECTORY_NAME;
import static org.apache.commons.io.IOUtils.closeQuietly;
import static org.apache.commons.lang.StringUtils.EMPTY;
import java.awt.Dimension;
import java.awt.EventQueue;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.Insets;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.ArrayList;
import java.util.Date;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.TreeMap;
import javax.swing.DefaultListModel;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JList;
import javax.swing.JScrollPane;
import javax.swing.JSplitPane;
import javax.swing.JTextField;
import org.apache.velocity.Template;
import org.apache.velocity.VelocityContext;
import org.apache.velocity.app.VelocityEngine;
import org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader;
import org.codehaus.plexus.util.Base64;
import org.codehaus.plexus.util.SelectorUtils;
import org.jboss.netty.handler.codec.http.HttpMethod;
import org.jboss.netty.handler.codec.http.HttpRequest;
import org.jboss.netty.handler.codec.http.QueryStringDecoder;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.excilys.ebi.gatling.recorder.configuration.Configuration;
import com.excilys.ebi.gatling.recorder.configuration.Pattern;
import com.excilys.ebi.gatling.recorder.http.GatlingHttpProxy;
import com.excilys.ebi.gatling.recorder.http.event.PauseEvent;
import com.excilys.ebi.gatling.recorder.http.event.RequestReceivedEvent;
import com.excilys.ebi.gatling.recorder.http.event.ResponseReceivedEvent;
import com.excilys.ebi.gatling.recorder.http.event.SecuredHostConnectionEvent;
import com.excilys.ebi.gatling.recorder.http.event.ShowConfigurationFrameEvent;
import com.excilys.ebi.gatling.recorder.http.event.ShowRunningFrameEvent;
import com.excilys.ebi.gatling.recorder.http.event.TagEvent;
import com.excilys.ebi.gatling.recorder.ui.enumeration.FilterStrategy;
import com.excilys.ebi.gatling.recorder.ui.enumeration.PauseType;
import com.excilys.ebi.gatling.recorder.ui.enumeration.ResultType;
import com.google.common.collect.MapDifference;
import com.google.common.collect.Maps;
import com.google.common.eventbus.Subscribe;
@SuppressWarnings("serial")
public class RunningFrame extends JFrame {
private static final Logger logger = LoggerFactory.getLogger(RunningFrame.class);
private Configuration configuration;
private GatlingHttpProxy proxy;
private Date startDate;
private Date lastRequest;
private PauseEvent pause;
private JTextField txtTag = new JTextField(15);
private JButton btnTag = new JButton("Add");
private DefaultListModel events = new DefaultListModel();
private JList executedEvents = new JList(events);
private DefaultListModel hostsCertificate = new DefaultListModel();
private JList requiredHostsCertificate = new JList(hostsCertificate);
private TextAreaPanel stringRequest = new TextAreaPanel("Request:");
private TextAreaPanel stringResponse = new TextAreaPanel("Response:");
private TextAreaPanel stringRequestBody = new TextAreaPanel("Request Body:");
private int numberOfRequests = 0;
private List<Object> listEvents = new ArrayList<Object>();
private String protocol;
private String host;
private int port;
private String urlBase = null;
private String urlBaseString = null;
private LinkedHashMap<String, String> urls = new LinkedHashMap<String, String>();
private LinkedHashMap<String, Map<String, String>> headers = new LinkedHashMap<String, Map<String, String>>();
public RunningFrame() {
/* Initialization of the frame */
setTitle("Gatling Recorder - Running...");
setMinimumSize(new Dimension(800, 640));
setLocationRelativeTo(null);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
GridBagLayout gbl = new GridBagLayout();
setLayout(gbl);
setIconImages(Commons.getIconList());
/* Declaration & initialization of components */
JButton btnClear = new JButton("Clear");
final JButton btnStop = new JButton("Stop !");
btnStop.setSize(120, 30);
JScrollPane panelFilters = new JScrollPane(executedEvents);
panelFilters.setPreferredSize(new Dimension(300, 100));
stringRequest.setPreferredSize(new Dimension(330, 100));
JSplitPane requestResponsePane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, new JScrollPane(stringRequest), new JScrollPane(stringResponse));
final JSplitPane sp = new JSplitPane(JSplitPane.VERTICAL_SPLIT, requestResponsePane, stringRequestBody);
JScrollPane panelHostsCertificate = new JScrollPane(requiredHostsCertificate);
panelHostsCertificate.setPreferredSize(new Dimension(300, 100));
/* Layout */
GridBagConstraints gbc = new GridBagConstraints();
gbc.insets = new Insets(10, 5, 0, 0);
gbc.gridx = 0;
gbc.anchor = GridBagConstraints.LINE_START;
gbc.gridy = 0;
add(new JLabel("Tag :"), gbc);
gbc.gridx = 1;
add(txtTag, gbc);
gbc.gridx = 2;
gbc.weightx = 0.5;
add(btnTag, gbc);
gbc.gridx = 3;
gbc.anchor = GridBagConstraints.CENTER;
gbc.weightx = 0.25;
add(btnClear, gbc);
gbc.gridx = 4;
gbc.anchor = GridBagConstraints.LINE_END;
add(btnStop, gbc);
gbc.gridx = 0;
gbc.gridy = 1;
gbc.weightx = 0;
gbc.anchor = GridBagConstraints.LINE_START;
gbc.gridwidth = GridBagConstraints.REMAINDER;
add(new JLabel("Executed Events:"), gbc);
gbc.gridy = 2;
gbc.gridwidth = GridBagConstraints.REMAINDER;
gbc.weightx = 1;
gbc.weighty = 0.20;
gbc.fill = GridBagConstraints.BOTH;
add(panelFilters, gbc);
gbc.gridy = 4;
gbc.weightx = 1;
gbc.weighty = 0.75;
gbc.fill = GridBagConstraints.BOTH;
add(sp, gbc);
gbc.gridy = 5;
gbc.weighty = 0;
gbc.gridwidth = GridBagConstraints.REMAINDER;
gbc.anchor = GridBagConstraints.CENTER;
add(new JLabel("Required Hosts Certificate:"), gbc);
gbc.gridy = 6;
gbc.weighty = 0.05;
gbc.gridwidth = GridBagConstraints.REMAINDER;
add(panelHostsCertificate, gbc);
/* Listeners */
btnTag.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
if (!txtTag.getText().equals(EMPTY)) {
TagEvent tag = new TagEvent(txtTag.getText());
events.addElement(tag.toString());
executedEvents.ensureIndexIsVisible(events.getSize() - 1);
listEvents.add(tag);
txtTag.setText(EMPTY);
}
}
});
executedEvents.addMouseListener(new MouseAdapter() {
public void mouseClicked(MouseEvent e) {
if (executedEvents.getSelectedIndex() >= 0) {
Object obj = listEvents.get(executedEvents.getSelectedIndex());
if (obj instanceof ResponseReceivedEvent) {
ResponseReceivedEvent event = (ResponseReceivedEvent) obj;
stringRequest.txt.setText(event.getRequest().toString());
stringResponse.txt.setText(event.getResponse().toString());
stringRequestBody.txt.setText(new String(event.getRequest().getContent().array()));
} else {
stringRequest.txt.setText(EMPTY);
stringResponse.txt.setText(EMPTY);
stringRequestBody.txt.setText(EMPTY);
}
}
}
});
btnClear.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
clearOldRunning();
}
});
btnStop.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
saveScenario();
proxy.shutdown();
proxy = null;
if (!Configuration.getInstance().isConfigurationSkipped())
getEventBus().post(new ShowConfigurationFrameEvent());
else
System.exit(0);
}
});
}
@Subscribe
public void onShowConfigurationFrameEvent(ShowConfigurationFrameEvent event) {
EventQueue.invokeLater(new Runnable() {
public void run() {
setVisible(false);
}
});
}
@Subscribe
public void onShowRunningFrameEvent(ShowRunningFrameEvent event) {
EventQueue.invokeLater(new Runnable() {
public void run() {
setVisible(true);
clearOldRunning();
configuration = Configuration.getInstance();
startDate = new Date();
proxy = new GatlingHttpProxy(configuration.getPort(), configuration.getSslPort(), configuration.getProxy());
proxy.start();
}
});
}
@Subscribe
public void onSecuredHostConnectionEvent(final SecuredHostConnectionEvent event) {
EventQueue.invokeLater(new Runnable() {
public void run() {
hostsCertificate.addElement(event.getHostURI());
}
});
}
@Subscribe
public void onRequestReceivedEvent(final RequestReceivedEvent event) {
EventQueue.invokeLater(new Runnable() {
public void run() {
if (event.getRequest().getMethod() == HttpMethod.CONNECT)
return;
String header = event.getRequest().getHeader("Proxy-Authorization");
if (header != null) {
// Split on " " and take 2nd group (Basic credentialsInBase64==)
String credentials = new String(Base64.decodeBase64(header.split(" ")[1].getBytes()));
configuration.getProxy().setUsername(credentials.split(":")[0]);
configuration.getProxy().setPassword(credentials.split(":")[1]);
}
if (addRequest(event.getRequest())) {
if (lastRequest != null) {
Date newRequest = new Date();
long diff = newRequest.getTime() - lastRequest.getTime();
long pauseMin, pauseMax;
PauseType pauseType;
if (diff < 1000) {
pauseMin = (diff / 100l) * 100;
pauseMax = pauseMin + 100;
pauseType = PauseType.MILLISECONDS;
} else {
pauseMin = diff / 1000l;
pauseMax = pauseMin + 1;
pauseType = PauseType.SECONDS;
}
lastRequest = newRequest;
pause = new PauseEvent(pauseMin, pauseMax, pauseType);
}
}
}
});
}
@Subscribe
public void onResponseReceivedEvent(final ResponseReceivedEvent event) {
EventQueue.invokeLater(new Runnable() {
public void run() {
if (addRequest(event.getRequest())) {
if (pause != null) {
events.addElement(pause.toString());
executedEvents.ensureIndexIsVisible(events.getSize() - 1);
listEvents.add(pause);
}
lastRequest = new Date();
processRequest(event);
}
}
});
}
private void clearOldRunning() {
events.removeAllElements();
stringRequest.txt.setText(EMPTY);
stringRequestBody.txt.setText(EMPTY);
stringResponse.txt.setText(EMPTY);
listEvents.clear();
urls.clear();
headers.clear();
protocol = null;
host = null;
port = -1;
urlBase = null;
urlBaseString = null;
lastRequest = null;
}
private boolean addRequest(HttpRequest request) {
URI uri = null;
try {
uri = new URI(request.getUri());
} catch (URISyntaxException ex) {
logger.error("Can't create URI from request uri (" + request.getUri() + ")" + ex.getStackTrace());
// FIXME error handling
return false;
}
if (configuration.getFilterStrategy() != FilterStrategy.NONE) {
String p = EMPTY;
boolean add = true;
if (configuration.getFilterStrategy() == FilterStrategy.ONLY)
add = true;
else if (configuration.getFilterStrategy() == FilterStrategy.EXCEPT)
add = false;
for (Pattern pattern : configuration.getPatterns()) {
switch (pattern.getPatternType()) {
case ANT:
p = SelectorUtils.ANT_HANDLER_PREFIX;
break;
case JAVA:
p = SelectorUtils.REGEX_HANDLER_PREFIX;
break;
}
p += pattern.getPattern() + SelectorUtils.PATTERN_HANDLER_SUFFIX;
if (SelectorUtils.matchPath(p, uri.getPath()))
return add;
}
return !add;
}
return true;
}
private void processRequest(ResponseReceivedEvent event) {
HttpRequest request = event.getRequest();
URI uri = null;
try {
uri = new URI(request.getUri());
} catch (URISyntaxException ex) {
logger.error("Can't create URI from request uri (" + request.getUri() + ")" + ex.getStackTrace());
}
events.addElement(request.getMethod() + " | " + request.getUri());
executedEvents.ensureIndexIsVisible(events.getSize() - 1);
int id = ++numberOfRequests;
event.setId(id);
/* URLs */
if (urlBase == null) {
protocol = uri.getScheme();
host = uri.getHost();
port = uri.getPort();
urlBase = protocol + "://" + host;
urlBaseString = "PROTOCOL + \"://\" + HOST";
if (port != -1) {
urlBase += ":" + port;
urlBaseString += " + \":\" + PORT";
}
}
String requestUrlBase = uri.getScheme() + "://" + uri.getHost();
if (uri.getPort() != -1)
requestUrlBase += ":" + uri.getPort();
if (requestUrlBase.equals(urlBase))
event.setWithUrlBase(true);
else
urls.put("url_" + id, requestUrlBase + uri.getPath());
/* Headers */
Map<String, String> requestHeaders = new TreeMap<String, String>();
for (Entry<String, String> entry : request.getHeaders())
requestHeaders.put(entry.getKey(), entry.getValue());
requestHeaders.remove("Cookie");
int bestChoice = 0;
String headerKey = EMPTY;
MapDifference<String, String> diff;
Map<String, String> fullHeaders = new TreeMap<String, String>();
boolean containsHeaders = false;
if (headers.size() > 0) {
for (Entry<String, Map<String, String>> header : headers.entrySet()) {
fullHeaders = new TreeMap<String, String>(header.getValue());
containsHeaders = false;
if (header.getValue().containsKey("headers")) {
fullHeaders.putAll(headers.get(header.getValue().get("headers")));
fullHeaders.remove("headers");
containsHeaders = true;
}
diff = Maps.difference(fullHeaders, requestHeaders);
logger.debug(diff.toString());
if (diff.areEqual()) {
headerKey = header.getKey();
bestChoice = 1;
break;
} else if (diff.entriesOnlyOnLeft().size() == 0 && diff.entriesDiffering().size() == 0 && !containsHeaders) {
// header are included in requestHeaders
headerKey = header.getKey();
bestChoice = 2;
} else if (bestChoice > 2 && diff.entriesOnlyOnRight().size() == 0 && diff.entriesDiffering().size() == 0 && !containsHeaders) {
// requestHeaders are included in header
headerKey = header.getKey();
bestChoice = 3;
}
}
}
switch (bestChoice) {
case 1:
event.setHeadersId(headerKey);
break;
case 2:
diff = Maps.difference(headers.get(headerKey), requestHeaders);
TreeMap<String, String> tm2 = new TreeMap<String, String>(diff.entriesOnlyOnRight());
headers.put("headers_" + id, tm2);
headers.get("headers_" + id).put("headers", headerKey);
event.setHeadersId("headers_" + id);
break;
case 3:
diff = Maps.difference(headers.get(headerKey), requestHeaders);
TreeMap<String, String> tm3 = new TreeMap<String, String>(diff.entriesInCommon());
headers.put("headers_" + id, tm3);
event.setHeadersId("headers_" + id);
headers.remove(headerKey);
tm3 = new TreeMap<String, String>(diff.entriesOnlyOnLeft());
headers.put(headerKey, tm3);
headers.get(headerKey).put("headers", "headers_" + id);
break;
default:
headers.put("headers_" + id, requestHeaders);
event.setHeadersId("headers_" + id);
}
/* Add check if status is not in 20X */
if ((event.getResponse().getStatus().getCode() < 200) || (event.getResponse().getStatus().getCode() > 210))
event.setWithCheck(true);
/* Params */
QueryStringDecoder decoder = new QueryStringDecoder(request.getUri());
event.getRequestParams().putAll((decoder.getParameters()));
/* Content */
if (request.getContent().capacity() > 0) {
String content = new String(request.getContent().array());
// We check if it's a form validation and so we extract post params
if ("application/x-www-form-urlencoded".equals(request.getHeader("Content-Type"))) {
decoder = new QueryStringDecoder("http://localhost/?" + content);
event.getRequestParams().putAll(decoder.getParameters());
} else {
event.setWithBody(true);
dumpRequestBody(id, content);
}
}
listEvents.add(event);
}
private void dumpRequestBody(int idEvent, String content) {
File dir = null;
if (configuration.getRequestBodiesFolder() == null)
dir = new File(getOutputFolder(), ResultType.FORMAT.format(startDate) + "_" + GATLING_REQUEST_BODIES_DIRECTORY_NAME);
else
dir = getFolder("request bodies", configuration.getRequestBodiesFolder());
if (!dir.exists())
dir.mkdir();
FileWriter fw = null;
try {
fw = new FileWriter(new File(dir, ResultType.FORMAT.format(startDate) + "_request_" + idEvent + ".txt"));
fw.write(content);
} catch (IOException ex) {
logger.error("Error, while dumping request body... {}", ex.getStackTrace());
} finally {
closeQuietly(fw);
}
}
private File getOutputFolder() {
return getFolder("output", configuration.getOutputFolder());
}
private File getFolder(String folderName, String folderPath) {
File folder = new File(folderPath);
if (!folder.exists())
if (!folder.mkdirs())
throw new RuntimeException("Can't create " + folderName + " folder");
return folder;
}
private void saveScenario() {
VelocityEngine ve = new VelocityEngine();
ve.setProperty("file.resource.loader.class", ClasspathResourceLoader.class.getName());
ve.init();
VelocityContext context = new VelocityContext();
context.put("protocol", protocol);
context.put("host", host);
context.put("port", port);
context.put("urlBase", urlBaseString);
context.put("proxy", configuration.getProxy());
context.put("urls", urls);
context.put("headers", headers);
context.put("name", "Scenario name");
context.put("events", listEvents);
context.put("package", Configuration.getInstance().getEclipsePackage());
context.put("date", ResultType.FORMAT.format(startDate));
URI uri = URI.create("");
context.put("URI", uri);
Template template = null;
FileWriter fileWriter = null;
for (ResultType resultType : configuration.getResultTypes()) {
try {
template = ve.getTemplate(resultType.getTemplate());
fileWriter = new FileWriter(new File(getOutputFolder(), resultType.getScenarioFileName(startDate)));
template.merge(context, fileWriter);
fileWriter.flush();
} catch (IOException e) {
logger.error("Error, while saving '" + resultType + "' scenario..." + e.getStackTrace());
} finally {
closeQuietly(fileWriter);
}
}
}
}
| gatling-recorder/src/main/java/com/excilys/ebi/gatling/recorder/ui/component/RunningFrame.java | /**
* Copyright 2011-2012 eBusiness Information, Groupe Excilys (www.excilys.com)
*
* 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 com.excilys.ebi.gatling.recorder.ui.component;
import static com.excilys.ebi.gatling.recorder.http.event.RecorderEventBus.getEventBus;
import static com.excilys.ebi.gatling.recorder.ui.Constants.GATLING_REQUEST_BODIES_DIRECTORY_NAME;
import static org.apache.commons.io.IOUtils.closeQuietly;
import static org.apache.commons.lang.StringUtils.EMPTY;
import java.awt.Dimension;
import java.awt.EventQueue;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.Insets;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.ArrayList;
import java.util.Date;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.TreeMap;
import javax.swing.DefaultListModel;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JList;
import javax.swing.JScrollPane;
import javax.swing.JSplitPane;
import javax.swing.JTextField;
import org.apache.velocity.Template;
import org.apache.velocity.VelocityContext;
import org.apache.velocity.app.VelocityEngine;
import org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader;
import org.codehaus.plexus.util.Base64;
import org.codehaus.plexus.util.SelectorUtils;
import org.jboss.netty.handler.codec.http.HttpRequest;
import org.jboss.netty.handler.codec.http.QueryStringDecoder;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.excilys.ebi.gatling.recorder.configuration.Configuration;
import com.excilys.ebi.gatling.recorder.configuration.Pattern;
import com.excilys.ebi.gatling.recorder.http.GatlingHttpProxy;
import com.excilys.ebi.gatling.recorder.http.event.PauseEvent;
import com.excilys.ebi.gatling.recorder.http.event.RequestReceivedEvent;
import com.excilys.ebi.gatling.recorder.http.event.ResponseReceivedEvent;
import com.excilys.ebi.gatling.recorder.http.event.ShowConfigurationFrameEvent;
import com.excilys.ebi.gatling.recorder.http.event.ShowRunningFrameEvent;
import com.excilys.ebi.gatling.recorder.http.event.TagEvent;
import com.excilys.ebi.gatling.recorder.ui.enumeration.FilterStrategy;
import com.excilys.ebi.gatling.recorder.ui.enumeration.PauseType;
import com.excilys.ebi.gatling.recorder.ui.enumeration.ResultType;
import com.google.common.collect.MapDifference;
import com.google.common.collect.Maps;
import com.google.common.eventbus.Subscribe;
@SuppressWarnings("serial")
public class RunningFrame extends JFrame {
private static final Logger logger = LoggerFactory.getLogger(RunningFrame.class);
private Configuration configuration;
private GatlingHttpProxy proxy;
private Date startDate;
private Date lastRequest;
private PauseEvent pause;
private JTextField txtTag = new JTextField(15);
private JButton btnTag = new JButton("Add");
private DefaultListModel events = new DefaultListModel();
private JList executedEvents = new JList(events);
private DefaultListModel hostsCertificate = new DefaultListModel();
private JList requiredHostsCertificate = new JList(hostsCertificate);
private TextAreaPanel stringRequest = new TextAreaPanel("Request:");
private TextAreaPanel stringResponse = new TextAreaPanel("Response:");
private TextAreaPanel stringRequestBody = new TextAreaPanel("Request Body:");
private int numberOfRequests = 0;
private List<Object> listEvents = new ArrayList<Object>();
private String protocol;
private String host;
private int port;
private String urlBase = null;
private String urlBaseString = null;
private LinkedHashMap<String, String> urls = new LinkedHashMap<String, String>();
private LinkedHashMap<String, Map<String, String>> headers = new LinkedHashMap<String, Map<String, String>>();
public RunningFrame() {
/* Initialization of the frame */
setTitle("Gatling Recorder - Running...");
setMinimumSize(new Dimension(800, 640));
setLocationRelativeTo(null);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
GridBagLayout gbl = new GridBagLayout();
setLayout(gbl);
setIconImages(Commons.getIconList());
/* Declaration & initialization of components */
JButton btnClear = new JButton("Clear");
final JButton btnStop = new JButton("Stop !");
btnStop.setSize(120, 30);
JScrollPane panelFilters = new JScrollPane(executedEvents);
panelFilters.setPreferredSize(new Dimension(300, 100));
stringRequest.setPreferredSize(new Dimension(330, 100));
JSplitPane requestResponsePane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, new JScrollPane(stringRequest), new JScrollPane(stringResponse));
final JSplitPane sp = new JSplitPane(JSplitPane.VERTICAL_SPLIT, requestResponsePane, stringRequestBody);
JScrollPane panelHostsCertificate = new JScrollPane(requiredHostsCertificate);
panelHostsCertificate.setPreferredSize(new Dimension(300, 100));
/* Layout */
GridBagConstraints gbc = new GridBagConstraints();
gbc.insets = new Insets(10, 5, 0, 0);
gbc.gridx = 0;
gbc.anchor = GridBagConstraints.LINE_START;
gbc.gridy = 0;
add(new JLabel("Tag :"), gbc);
gbc.gridx = 1;
add(txtTag, gbc);
gbc.gridx = 2;
gbc.weightx = 0.5;
add(btnTag, gbc);
gbc.gridx = 3;
gbc.anchor = GridBagConstraints.CENTER;
gbc.weightx = 0.25;
add(btnClear, gbc);
gbc.gridx = 4;
gbc.anchor = GridBagConstraints.LINE_END;
add(btnStop, gbc);
gbc.gridx = 0;
gbc.gridy = 1;
gbc.weightx = 0;
gbc.anchor = GridBagConstraints.LINE_START;
gbc.gridwidth = GridBagConstraints.REMAINDER;
add(new JLabel("Executed Events:"), gbc);
gbc.gridy = 2;
gbc.gridwidth = GridBagConstraints.REMAINDER;
gbc.weightx = 1;
gbc.weighty = 0.20;
gbc.fill = GridBagConstraints.BOTH;
add(panelFilters, gbc);
gbc.gridy = 4;
gbc.weightx = 1;
gbc.weighty = 0.60;
gbc.fill = GridBagConstraints.BOTH;
add(sp, gbc);
gbc.gridy = 5;
gbc.weighty = 0;
gbc.gridwidth = GridBagConstraints.REMAINDER;
gbc.anchor = GridBagConstraints.CENTER;
add(new JLabel("Required Hosts Certificate:"), gbc);
gbc.gridy = 6;
gbc.weighty = 0.20;
gbc.gridwidth = GridBagConstraints.REMAINDER;
add(panelHostsCertificate, gbc);
/* Listeners */
btnTag.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
if (!txtTag.getText().equals(EMPTY)) {
TagEvent tag = new TagEvent(txtTag.getText());
events.addElement(tag.toString());
executedEvents.ensureIndexIsVisible(events.getSize() - 1);
listEvents.add(tag);
txtTag.setText(EMPTY);
}
}
});
executedEvents.addMouseListener(new MouseAdapter() {
public void mouseClicked(MouseEvent e) {
if (executedEvents.getSelectedIndex() >= 0) {
Object obj = listEvents.get(executedEvents.getSelectedIndex());
if (obj instanceof ResponseReceivedEvent) {
ResponseReceivedEvent event = (ResponseReceivedEvent) obj;
stringRequest.txt.setText(event.getRequest().toString());
stringResponse.txt.setText(event.getResponse().toString());
stringRequestBody.txt.setText(new String(event.getRequest().getContent().array()));
} else {
stringRequest.txt.setText(EMPTY);
stringResponse.txt.setText(EMPTY);
stringRequestBody.txt.setText(EMPTY);
}
}
}
});
btnClear.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
clearOldRunning();
}
});
btnStop.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
saveScenario();
proxy.shutdown();
proxy = null;
if (!Configuration.getInstance().isConfigurationSkipped())
getEventBus().post(new ShowConfigurationFrameEvent());
else
System.exit(0);
}
});
}
@Subscribe
public void onShowConfigurationFrameEvent(ShowConfigurationFrameEvent event) {
EventQueue.invokeLater(new Runnable() {
public void run() {
setVisible(false);
}
});
}
@Subscribe
public void onShowRunningFrameEvent(ShowRunningFrameEvent event) {
EventQueue.invokeLater(new Runnable() {
public void run() {
setVisible(true);
clearOldRunning();
configuration = Configuration.getInstance();
startDate = new Date();
proxy = new GatlingHttpProxy(configuration.getPort(), configuration.getSslPort(), configuration.getProxy());
proxy.start();
}
});
}
@Subscribe
public void onRequestReceivedEvent(final RequestReceivedEvent event) {
EventQueue.invokeLater(new Runnable() {
public void run() {
String header = event.getRequest().getHeader("Proxy-Authorization");
if (header != null) {
// Split on " " and take 2nd group (Basic credentialsInBase64==)
String credentials = new String(Base64.decodeBase64(header.split(" ")[1].getBytes()));
configuration.getProxy().setUsername(credentials.split(":")[0]);
configuration.getProxy().setPassword(credentials.split(":")[1]);
}
if (addRequest(event.getRequest())) {
if (lastRequest != null) {
Date newRequest = new Date();
long diff = newRequest.getTime() - lastRequest.getTime();
long pauseMin, pauseMax;
PauseType pauseType;
if (diff < 1000) {
pauseMin = (diff / 100l) * 100;
pauseMax = pauseMin + 100;
pauseType = PauseType.MILLISECONDS;
} else {
pauseMin = diff / 1000l;
pauseMax = pauseMin + 1;
pauseType = PauseType.SECONDS;
}
lastRequest = newRequest;
pause = new PauseEvent(pauseMin, pauseMax, pauseType);
}
}
}
});
}
@Subscribe
public void onResponseReceivedEvent(final ResponseReceivedEvent event) {
EventQueue.invokeLater(new Runnable() {
public void run() {
if (addRequest(event.getRequest())) {
if (pause != null) {
events.addElement(pause.toString());
executedEvents.ensureIndexIsVisible(events.getSize() - 1);
listEvents.add(pause);
}
lastRequest = new Date();
processRequest(event);
}
}
});
}
private void clearOldRunning() {
events.removeAllElements();
stringRequest.txt.setText(EMPTY);
stringRequestBody.txt.setText(EMPTY);
stringResponse.txt.setText(EMPTY);
listEvents.clear();
urls.clear();
headers.clear();
protocol = null;
host = null;
port = -1;
urlBase = null;
urlBaseString = null;
lastRequest = null;
}
private boolean addRequest(HttpRequest request) {
URI uri = null;
try {
uri = new URI(request.getUri());
} catch (URISyntaxException ex) {
logger.error("Can't create URI from request uri (" + request.getUri() + ")" + ex.getStackTrace());
// FIXME error handling
return false;
}
if (configuration.getFilterStrategy() != FilterStrategy.NONE) {
String p = EMPTY;
boolean add = true;
if (configuration.getFilterStrategy() == FilterStrategy.ONLY)
add = true;
else if (configuration.getFilterStrategy() == FilterStrategy.EXCEPT)
add = false;
for (Pattern pattern : configuration.getPatterns()) {
switch (pattern.getPatternType()) {
case ANT:
p = SelectorUtils.ANT_HANDLER_PREFIX;
break;
case JAVA:
p = SelectorUtils.REGEX_HANDLER_PREFIX;
break;
}
p += pattern.getPattern() + SelectorUtils.PATTERN_HANDLER_SUFFIX;
if (SelectorUtils.matchPath(p, uri.getPath()))
return add;
}
return !add;
}
return true;
}
private void processRequest(ResponseReceivedEvent event) {
HttpRequest request = event.getRequest();
URI uri = null;
try {
uri = new URI(request.getUri());
} catch (URISyntaxException ex) {
logger.error("Can't create URI from request uri (" + request.getUri() + ")" + ex.getStackTrace());
}
events.addElement(request.getMethod() + " | " + request.getUri());
executedEvents.ensureIndexIsVisible(events.getSize() - 1);
int id = ++numberOfRequests;
event.setId(id);
/* URLs */
if (urlBase == null) {
protocol = uri.getScheme();
host = uri.getHost();
port = uri.getPort();
urlBase = protocol + "://" + host;
urlBaseString = "PROTOCOL + \"://\" + HOST";
if (port != -1) {
urlBase += ":" + port;
urlBaseString += " + \":\" + PORT";
}
}
String requestUrlBase = uri.getScheme() + "://" + uri.getHost();
if (uri.getPort() != -1)
requestUrlBase += ":" + uri.getPort();
if (requestUrlBase.equals(urlBase))
event.setWithUrlBase(true);
else
urls.put("url_" + id, requestUrlBase + uri.getPath());
/* Headers */
Map<String, String> requestHeaders = new TreeMap<String, String>();
for (Entry<String, String> entry : request.getHeaders())
requestHeaders.put(entry.getKey(), entry.getValue());
requestHeaders.remove("Cookie");
int bestChoice = 0;
String headerKey = EMPTY;
MapDifference<String, String> diff;
Map<String, String> fullHeaders = new TreeMap<String, String>();
boolean containsHeaders = false;
if (headers.size() > 0) {
for (Entry<String, Map<String, String>> header : headers.entrySet()) {
fullHeaders = new TreeMap<String, String>(header.getValue());
containsHeaders = false;
if (header.getValue().containsKey("headers")) {
fullHeaders.putAll(headers.get(header.getValue().get("headers")));
fullHeaders.remove("headers");
containsHeaders = true;
}
diff = Maps.difference(fullHeaders, requestHeaders);
logger.debug(diff.toString());
if (diff.areEqual()) {
headerKey = header.getKey();
bestChoice = 1;
break;
} else if (diff.entriesOnlyOnLeft().size() == 0 && diff.entriesDiffering().size() == 0 && !containsHeaders) {
// header are included in requestHeaders
headerKey = header.getKey();
bestChoice = 2;
} else if (bestChoice > 2 && diff.entriesOnlyOnRight().size() == 0 && diff.entriesDiffering().size() == 0 && !containsHeaders) {
// requestHeaders are included in header
headerKey = header.getKey();
bestChoice = 3;
}
}
}
switch (bestChoice) {
case 1:
event.setHeadersId(headerKey);
break;
case 2:
diff = Maps.difference(headers.get(headerKey), requestHeaders);
TreeMap<String, String> tm2 = new TreeMap<String, String>(diff.entriesOnlyOnRight());
headers.put("headers_" + id, tm2);
headers.get("headers_" + id).put("headers", headerKey);
event.setHeadersId("headers_" + id);
break;
case 3:
diff = Maps.difference(headers.get(headerKey), requestHeaders);
TreeMap<String, String> tm3 = new TreeMap<String, String>(diff.entriesInCommon());
headers.put("headers_" + id, tm3);
event.setHeadersId("headers_" + id);
headers.remove(headerKey);
tm3 = new TreeMap<String, String>(diff.entriesOnlyOnLeft());
headers.put(headerKey, tm3);
headers.get(headerKey).put("headers", "headers_" + id);
break;
default:
headers.put("headers_" + id, requestHeaders);
event.setHeadersId("headers_" + id);
}
/* Add check if status is not in 20X */
if ((event.getResponse().getStatus().getCode() < 200) || (event.getResponse().getStatus().getCode() > 210))
event.setWithCheck(true);
/* Params */
QueryStringDecoder decoder = new QueryStringDecoder(request.getUri());
event.getRequestParams().putAll((decoder.getParameters()));
/* Content */
if (request.getContent().capacity() > 0) {
String content = new String(request.getContent().array());
// We check if it's a form validation and so we extract post params
if ("application/x-www-form-urlencoded".equals(request.getHeader("Content-Type"))) {
decoder = new QueryStringDecoder("http://localhost/?" + content);
event.getRequestParams().putAll(decoder.getParameters());
} else {
event.setWithBody(true);
dumpRequestBody(id, content);
}
}
listEvents.add(event);
}
private void dumpRequestBody(int idEvent, String content) {
File dir = null;
if (configuration.getRequestBodiesFolder() == null)
dir = new File(getOutputFolder(), ResultType.FORMAT.format(startDate) + "_" + GATLING_REQUEST_BODIES_DIRECTORY_NAME);
else
dir = getFolder("request bodies", configuration.getRequestBodiesFolder());
if (!dir.exists())
dir.mkdir();
FileWriter fw = null;
try {
fw = new FileWriter(new File(dir, ResultType.FORMAT.format(startDate) + "_request_" + idEvent + ".txt"));
fw.write(content);
} catch (IOException ex) {
logger.error("Error, while dumping request body... {}", ex.getStackTrace());
} finally {
closeQuietly(fw);
}
}
private File getOutputFolder() {
return getFolder("output", configuration.getOutputFolder());
}
private File getFolder(String folderName, String folderPath) {
File folder = new File(folderPath);
if (!folder.exists())
if (!folder.mkdirs())
throw new RuntimeException("Can't create " + folderName + " folder");
return folder;
}
private void saveScenario() {
VelocityEngine ve = new VelocityEngine();
ve.setProperty("file.resource.loader.class", ClasspathResourceLoader.class.getName());
ve.init();
VelocityContext context = new VelocityContext();
context.put("protocol", protocol);
context.put("host", host);
context.put("port", port);
context.put("urlBase", urlBaseString);
context.put("proxy", configuration.getProxy());
context.put("urls", urls);
context.put("headers", headers);
context.put("name", "Scenario name");
context.put("events", listEvents);
context.put("package", Configuration.getInstance().getEclipsePackage());
context.put("date", ResultType.FORMAT.format(startDate));
URI uri = URI.create("");
context.put("URI", uri);
Template template = null;
FileWriter fileWriter = null;
for (ResultType resultType : configuration.getResultTypes()) {
try {
template = ve.getTemplate(resultType.getTemplate());
fileWriter = new FileWriter(new File(getOutputFolder(), resultType.getScenarioFileName(startDate)));
template.merge(context, fileWriter);
fileWriter.flush();
} catch (IOException e) {
logger.error("Error, while saving '" + resultType + "' scenario..." + e.getStackTrace());
} finally {
closeQuietly(fileWriter);
}
}
}
}
| Handles SecuredHostConnectionEvent. Closes #315
| gatling-recorder/src/main/java/com/excilys/ebi/gatling/recorder/ui/component/RunningFrame.java | Handles SecuredHostConnectionEvent. Closes #315 | <ide><path>atling-recorder/src/main/java/com/excilys/ebi/gatling/recorder/ui/component/RunningFrame.java
<ide> import org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader;
<ide> import org.codehaus.plexus.util.Base64;
<ide> import org.codehaus.plexus.util.SelectorUtils;
<add>import org.jboss.netty.handler.codec.http.HttpMethod;
<ide> import org.jboss.netty.handler.codec.http.HttpRequest;
<ide> import org.jboss.netty.handler.codec.http.QueryStringDecoder;
<ide> import org.slf4j.Logger;
<ide> import com.excilys.ebi.gatling.recorder.http.event.PauseEvent;
<ide> import com.excilys.ebi.gatling.recorder.http.event.RequestReceivedEvent;
<ide> import com.excilys.ebi.gatling.recorder.http.event.ResponseReceivedEvent;
<add>import com.excilys.ebi.gatling.recorder.http.event.SecuredHostConnectionEvent;
<ide> import com.excilys.ebi.gatling.recorder.http.event.ShowConfigurationFrameEvent;
<ide> import com.excilys.ebi.gatling.recorder.http.event.ShowRunningFrameEvent;
<ide> import com.excilys.ebi.gatling.recorder.http.event.TagEvent;
<ide>
<ide> gbc.gridy = 4;
<ide> gbc.weightx = 1;
<del> gbc.weighty = 0.60;
<add> gbc.weighty = 0.75;
<ide> gbc.fill = GridBagConstraints.BOTH;
<ide> add(sp, gbc);
<ide>
<ide> add(new JLabel("Required Hosts Certificate:"), gbc);
<ide>
<ide> gbc.gridy = 6;
<del> gbc.weighty = 0.20;
<add> gbc.weighty = 0.05;
<ide> gbc.gridwidth = GridBagConstraints.REMAINDER;
<ide> add(panelHostsCertificate, gbc);
<ide>
<ide> }
<ide>
<ide> @Subscribe
<add> public void onSecuredHostConnectionEvent(final SecuredHostConnectionEvent event) {
<add> EventQueue.invokeLater(new Runnable() {
<add> public void run() {
<add> hostsCertificate.addElement(event.getHostURI());
<add> }
<add> });
<add> }
<add>
<add> @Subscribe
<ide> public void onRequestReceivedEvent(final RequestReceivedEvent event) {
<ide> EventQueue.invokeLater(new Runnable() {
<ide> public void run() {
<add> if (event.getRequest().getMethod() == HttpMethod.CONNECT)
<add> return;
<ide>
<ide> String header = event.getRequest().getHeader("Proxy-Authorization");
<ide> if (header != null) { |
|
JavaScript | mit | 25307a90c54b33ac511192310277b00f36c083b5 | 0 | nkgm/ember-collection,aldhsu/ember-collection,alexdiliberto/ember-collection,shamim8888/list-view,paddyobrien/ember-collection,srgpqt/ember-collection,usecanvas/list-view,BryanCrotaz/ember-collection,lukemelia/ember-collection,aldhsu/ember-collection,lukemelia/list-view,nkgm/ember-collection,alexdiliberto/list-view,mrinterweb/ember-collection,lukemelia/list-view,shaunc/ember-collection,emberjs/list-view,shamim8888/list-view,usecanvas/list-view,krisselden/list-view,BryanCrotaz/ember-collection,paddyobrien/ember-collection,alexdiliberto/ember-collection,flexyford/ember-collection,shaunc/ember-collection,greyhwndz/ember-collection,greyhwndz/ember-collection,mmun/ember-collection,flexyford/ember-collection,arenoir/ember-collection,mmun/ember-collection,emberjs/list-view,code0100fun/ember-collection,emberjs/ember-collection,code0100fun/ember-collection,mrinterweb/ember-collection,lukemelia/ember-collection,jeff3dx/list-view,emberjs/ember-collection,arenoir/ember-collection,krisselden/list-view,srgpqt/ember-collection,jeff3dx/list-view,igorrKurr/list-view,igorrKurr/list-view,alexdiliberto/list-view | packages/list-view/lib/main.js | import ReusableListItemView from 'list-view/reusable_list_item_view';
import VirtualListView from 'list-view/virtual_list_view';
import ListItemView from 'list-view/list_item_view';
import { EmberList, EmberVirtualList } from 'list-view/helper';
import ListView from 'list-view/list_view';
import ListViewHelper from 'list-view/list_view_helper';
Ember.ReusableListItemView = ReusableListItemView;
Ember.VirtualListView = VirtualListView;
Ember.ListItemView = ListItemView;
Ember.ListView = ListView;
Ember.ListViewHelper = ListViewHelper;
var registerHelper;
if (Ember.HTMLBars) {
// registerHelper was used for some 1.10-beta's and _registerHelper is for 1.10.0 final.
registerHelper = Ember.HTMLBars._registerHelper || Ember.HTMLBars.registerHelper;
} else {
registerHelper = Ember.Handlebars.registerHelper;
}
registerHelper('ember-list', EmberList);
registerHelper('ember-virtual-list', EmberVirtualList);
| Removed unnecessary main.js
| packages/list-view/lib/main.js | Removed unnecessary main.js | <ide><path>ackages/list-view/lib/main.js
<del>import ReusableListItemView from 'list-view/reusable_list_item_view';
<del>import VirtualListView from 'list-view/virtual_list_view';
<del>import ListItemView from 'list-view/list_item_view';
<del>import { EmberList, EmberVirtualList } from 'list-view/helper';
<del>import ListView from 'list-view/list_view';
<del>import ListViewHelper from 'list-view/list_view_helper';
<del>
<del>Ember.ReusableListItemView = ReusableListItemView;
<del>Ember.VirtualListView = VirtualListView;
<del>Ember.ListItemView = ListItemView;
<del>Ember.ListView = ListView;
<del>Ember.ListViewHelper = ListViewHelper;
<del>
<del>var registerHelper;
<del>if (Ember.HTMLBars) {
<del> // registerHelper was used for some 1.10-beta's and _registerHelper is for 1.10.0 final.
<del> registerHelper = Ember.HTMLBars._registerHelper || Ember.HTMLBars.registerHelper;
<del>} else {
<del> registerHelper = Ember.Handlebars.registerHelper;
<del>}
<del>registerHelper('ember-list', EmberList);
<del>registerHelper('ember-virtual-list', EmberVirtualList); |
||
Java | mit | 7f412d155f86e92962880f423675ea31cbb5a092 | 0 | jenkinsci/blueocean-plugin,jenkinsci/blueocean-plugin,kzantow/blueocean-plugin,alvarolobato/blueocean-plugin,ModuloM/blueocean-plugin,ModuloM/blueocean-plugin,alvarolobato/blueocean-plugin,kzantow/blueocean-plugin,ModuloM/blueocean-plugin,tfennelly/blueocean-plugin,tfennelly/blueocean-plugin,jenkinsci/blueocean-plugin,tfennelly/blueocean-plugin,jenkinsci/blueocean-plugin,alvarolobato/blueocean-plugin,ModuloM/blueocean-plugin,alvarolobato/blueocean-plugin,jenkinsci/blueocean-plugin,kzantow/blueocean-plugin,kzantow/blueocean-plugin,tfennelly/blueocean-plugin | package io.jenkins.blueocean.service.embedded;
import com.google.common.collect.ImmutableMap;
import hudson.model.FreeStyleProject;
import hudson.plugins.git.util.BuildData;
import hudson.scm.ChangeLogSet;
import io.jenkins.blueocean.service.embedded.scm.GitSampleRepoRule;
import jenkins.branch.BranchProperty;
import jenkins.branch.BranchSource;
import jenkins.branch.DefaultBranchPropertyStrategy;
import jenkins.plugins.git.GitSCMSource;
import jenkins.scm.api.SCMSource;
import org.hamcrest.collection.IsArrayContainingInAnyOrder;
import org.jenkinsci.plugins.scriptsecurity.scripts.ScriptApproval;
import org.jenkinsci.plugins.workflow.job.WorkflowJob;
import org.jenkinsci.plugins.workflow.job.WorkflowRun;
import org.jenkinsci.plugins.workflow.multibranch.WorkflowMultiBranchProject;
import org.junit.Assert;
import org.junit.Before;
import org.junit.ClassRule;
import org.junit.Rule;
import org.junit.Test;
import org.jvnet.hudson.test.BuildWatcher;
import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ExecutionException;
import static io.jenkins.blueocean.rest.model.BlueRun.DATE_FORMAT_STRING;
import static org.junit.Assert.*;
/**
* @author Vivek Pandey
*/
public class MultiBranchTest extends BaseTest{
@ClassRule
public static BuildWatcher buildWatcher = new BuildWatcher();
@Rule
public GitSampleRepoRule sampleRepo = new GitSampleRepoRule();
private final String[] branches={"master", "feature1", "feature2"};
@Before
public void setup() throws Exception{
super.setup();
setupScm();
}
@Test
public void getMultiBranchPipelines() throws IOException, ExecutionException, InterruptedException {
WorkflowMultiBranchProject mp = j.jenkins.createProject(WorkflowMultiBranchProject.class, "p");
FreeStyleProject f = j.jenkins.createProject(FreeStyleProject.class, "f");
mp.getSourcesList().add(new BranchSource(new GitSCMSource(null, sampleRepo.toString(), "", "*", "", false),
new DefaultBranchPropertyStrategy(new BranchProperty[0])));
for (SCMSource source : mp.getSCMSources()) {
assertEquals(mp, source.getOwner());
}
mp.scheduleBuild2(0).getFuture().get();
List<Map> resp = get("/organizations/jenkins/pipelines/", List.class);
Assert.assertEquals(2, resp.size());
validatePipeline(f, resp.get(0));
validateMultiBranchPipeline(mp, resp.get(1), 3);
Assert.assertEquals(mp.getBranch("master").getBuildHealth().getScore(), resp.get(0).get("weatherScore"));
}
@Test
public void getMultiBranchPipelinesWithNonMasterBranch() throws Exception {
sampleRepo.git("branch","-D", "master");
WorkflowMultiBranchProject mp = j.jenkins.createProject(WorkflowMultiBranchProject.class, "p");
mp.getSourcesList().add(new BranchSource(new GitSCMSource(null, sampleRepo.toString(), "", "*", "", false),
new DefaultBranchPropertyStrategy(new BranchProperty[0])));
for (SCMSource source : mp.getSCMSources()) {
assertEquals(mp, source.getOwner());
}
mp.scheduleBuild2(0).getFuture().get();
List<Map> resp = get("/organizations/jenkins/pipelines/", List.class);
Assert.assertEquals(1, resp.size());
validateMultiBranchPipeline(mp, resp.get(0), 2);
Assert.assertNull(mp.getBranch("master"));
}
// @Test
public void getMultiBranchPipeline() throws IOException, ExecutionException, InterruptedException {
WorkflowMultiBranchProject mp = j.jenkins.createProject(WorkflowMultiBranchProject.class, "p");
mp.getSourcesList().add(new BranchSource(new GitSCMSource(null, sampleRepo.toString(), "", "*", "", false),
new DefaultBranchPropertyStrategy(new BranchProperty[0])));
for (SCMSource source : mp.getSCMSources()) {
assertEquals(mp, source.getOwner());
}
mp.scheduleBuild2(0).getFuture().get();
Map resp = get("/organizations/jenkins/pipelines/p/");
validateMultiBranchPipeline(mp,resp,3);
List<String> names = (List<String>) resp.get("branchNames");
IsArrayContainingInAnyOrder.arrayContainingInAnyOrder(names, branches);
List<Map> br = get("/organizations/jenkins/pipelines/p/branches", List.class);
List<String> branchNames = new ArrayList<>();
List<Integer> weather = new ArrayList<>();
for(Map b: br){
branchNames.add((String) b.get("name"));
weather.add((int) b.get("weatherScore"));
}
for(String n:branches){
assertTrue(branchNames.contains(n));
}
for(int s:weather){
assertEquals(100, s);
}
}
@Test
public void getMultiBranchPipelineRuns() throws Exception {
WorkflowMultiBranchProject mp = j.jenkins.createProject(WorkflowMultiBranchProject.class, "p");
mp.getSourcesList().add(new BranchSource(new GitSCMSource(null, sampleRepo.toString(), "", "*", "", false),
new DefaultBranchPropertyStrategy(new BranchProperty[0])));
for (SCMSource source : mp.getSCMSources()) {
assertEquals(mp, source.getOwner());
}
WorkflowJob p = scheduleAndFindBranchProject(mp, "master");
j.waitUntilNoActivity();
WorkflowRun b1 = p.getLastBuild();
assertEquals(1, b1.getNumber());
assertEquals(3, mp.getItems().size());
//execute feature 1 branch build
p = scheduleAndFindBranchProject(mp, "feature1");
j.waitUntilNoActivity();
WorkflowRun b2 = p.getLastBuild();
assertEquals(1, b2.getNumber());
//execute feature 2 branch build
p = scheduleAndFindBranchProject(mp, "feature2");
j.waitUntilNoActivity();
WorkflowRun b3 = p.getLastBuild();
assertEquals(1, b3.getNumber());
List<Map> br = get("/organizations/jenkins/pipelines/p/branches", List.class);
List<String> branchNames = new ArrayList<>();
List<Integer> weather = new ArrayList<>();
for(Map b: br){
branchNames.add((String) b.get("name"));
weather.add((int) b.get("weatherScore"));
}
Assert.assertTrue(branchNames.contains(((Map)(br.get(0).get("latestRun"))).get("pipeline")));
for(String n:branches){
assertTrue(branchNames.contains(n));
}
WorkflowRun[] runs = {b1,b2,b3};
int i = 0;
for(String n:branches){
WorkflowRun b = runs[i];
j.waitForCompletion(b);
Map run = get("/organizations/jenkins/pipelines/p/branches/"+n+"/runs/"+b.getId());
validateRun(b,run);
i++;
}
Map pr = get("/organizations/jenkins/pipelines/p/");
validateMultiBranchPipeline(mp, pr, 3,3,0);
sampleRepo.git("checkout","master");
sampleRepo.write("file", "subsequent content11");
sampleRepo.git("commit", "--all", "--message=tweaked11");
p = scheduleAndFindBranchProject(mp, "master");
j.waitUntilNoActivity();
WorkflowRun b4 = p.getLastBuild();
assertEquals(2, b4.getNumber());
List<Map> run = get("/organizations/jenkins/pipelines/p/branches/master/runs/", List.class);
validateRun(b4, run.get(0));
}
@Test
public void getMultiBranchPipelineActivityRuns() throws Exception {
WorkflowMultiBranchProject mp = j.jenkins.createProject(WorkflowMultiBranchProject.class, "p");
mp.getSourcesList().add(new BranchSource(new GitSCMSource(null, sampleRepo.toString(), "", "*", "", false),
new DefaultBranchPropertyStrategy(new BranchProperty[0])));
for (SCMSource source : mp.getSCMSources()) {
assertEquals(mp, source.getOwner());
}
scheduleAndFindBranchProject(mp);
j.waitUntilNoActivity();
WorkflowJob p = findBranchProject(mp, "master");
WorkflowRun b1 = p.getLastBuild();
assertEquals(1, b1.getNumber());
assertEquals(3, mp.getItems().size());
//execute feature 1 branch build
p = findBranchProject(mp, "feature1");
WorkflowRun b2 = p.getLastBuild();
assertEquals(1, b2.getNumber());
//execute feature 2 branch build
p = findBranchProject(mp, "feature2");
WorkflowRun b3 = p.getLastBuild();
assertEquals(1, b3.getNumber());
List<Map> resp = get("/organizations/jenkins/pipelines/p/runs", List.class);
Assert.assertEquals(3, resp.size());
Date d1 = new SimpleDateFormat(DATE_FORMAT_STRING).parse((String)resp.get(0).get("startTime"));
Date d2 = new SimpleDateFormat(DATE_FORMAT_STRING).parse((String)resp.get(1).get("startTime"));
Date d3 = new SimpleDateFormat(DATE_FORMAT_STRING).parse((String)resp.get(2).get("startTime"));
Assert.assertTrue(d1.compareTo(d2) >= 0);
Assert.assertTrue(d2.compareTo(d3) >= 0);
for(Map m: resp){
BuildData d;
WorkflowRun r;
if(m.get("pipeline").equals("master")){
r = b1;
d = b1.getAction(BuildData.class);
} else if(m.get("pipeline").equals("feature1")){
r = b2;
d = b2.getAction(BuildData.class);
} else{
r = b3;
d = b3.getAction(BuildData.class);
}
validateRun(r,m);
String commitId = "";
if(d != null) {
commitId = d.getLastBuiltRevision().getSha1String();
Assert.assertEquals(commitId, m.get("commitId"));
}
}
}
@Test
public void getMultiBranchPipelineRunChangeSets() throws Exception {
WorkflowMultiBranchProject mp = j.jenkins.createProject(WorkflowMultiBranchProject.class, "p");
mp.getSourcesList().add(new BranchSource(new GitSCMSource(null, sampleRepo.toString(), "", "*", "", false),
new DefaultBranchPropertyStrategy(new BranchProperty[0])));
for (SCMSource source : mp.getSCMSources()) {
assertEquals(mp, source.getOwner());
}
WorkflowJob p = scheduleAndFindBranchProject(mp, "master");
j.waitUntilNoActivity();
WorkflowRun b1 = p.getLastBuild();
assertEquals(1, b1.getNumber());
assertEquals(3, mp.getItems().size());
String[] messages = {"tweaked11","tweaked12","tweaked13","tweaked14"};
sampleRepo.git("checkout","master");
sampleRepo.write("file", "subsequent content11");
sampleRepo.git("commit", "--all", "--message="+messages[0]);
sampleRepo.git("checkout","master");
sampleRepo.write("file", "subsequent content12");
sampleRepo.git("commit", "--all", "--message="+messages[1]);
sampleRepo.git("checkout","master");
sampleRepo.write("file", "subsequent content13");
sampleRepo.git("commit", "--all", "--message="+messages[2]);
sampleRepo.git("checkout","master");
sampleRepo.write("file", "subsequent content14");
sampleRepo.git("commit", "--all", "--message="+messages[3]);
p = scheduleAndFindBranchProject(mp, "master");
j.waitUntilNoActivity();
WorkflowRun b4 = p.getLastBuild();
assertEquals(2, b4.getNumber());
ChangeLogSet.Entry changeLog = b4.getChangeSets().get(0).iterator().next();
int i=0;
for(ChangeLogSet.Entry c:b4.getChangeSets().get(0)){
Assert.assertEquals(messages[i], c.getMsg());
i++;
}
Map run = get("/organizations/jenkins/pipelines/p/branches/master/runs/"+b4.getId()+"/");
validateRun(b4, run);
List<Map> changetSet = (List<Map>) run.get("changeSet");
Map c = changetSet.get(0);
Assert.assertEquals(changeLog.getCommitId(), c.get("commitId"));
Map a = (Map) c.get("author");
Assert.assertEquals(changeLog.getAuthor().getId(), a.get("id"));
Assert.assertEquals(changeLog.getAuthor().getFullName(), a.get("fullName"));
int j=0;
for(ChangeLogSet.Entry cs:b4.getChangeSets().get(0)){
Assert.assertEquals(cs.getCommitId(),changetSet.get(j).get("commitId"));
j++;
}
}
@Test
public void createUserFavouriteMultibranchTopLevelTest() throws Exception {
j.jenkins.setSecurityRealm(j.createDummySecurityRealm());
hudson.model.User user = j.jenkins.getUser("alice");
user.setFullName("Alice Cooper");
WorkflowMultiBranchProject mp = j.jenkins.createProject(WorkflowMultiBranchProject.class, "p");
mp.getSourcesList().add(new BranchSource(new GitSCMSource(null, sampleRepo.toString(), "", "*", "", false),
new DefaultBranchPropertyStrategy(new BranchProperty[0])));
for (SCMSource source : mp.getSCMSources()) {
assertEquals(mp, source.getOwner());
}
WorkflowJob p = scheduleAndFindBranchProject(mp, "master");
j.waitUntilNoActivity();
new RequestBuilder(baseUrl)
.put("/organizations/jenkins/pipelines/p/favorite")
.auth("alice", "alice")
.data(ImmutableMap.of("favorite", true))
.build(String.class);
List l = new RequestBuilder(baseUrl)
.get("/users/"+user.getId()+"/favorites/")
.auth("alice","alice")
.build(List.class);
Assert.assertEquals(l.size(), 1);
Assert.assertEquals(((Map)l.get(0)).get("pipeline"),"/organizations/jenkins/pipelines/p/branches/master");
new RequestBuilder(baseUrl)
.get("/users/"+user.getId()+"/favorites/")
.auth("bob","bob")
.status(403)
.build(String.class);
}
@Test
public void createUserFavouriteMultibranchBranchTest() throws Exception {
j.jenkins.setSecurityRealm(j.createDummySecurityRealm());
hudson.model.User user = j.jenkins.getUser("alice");
user.setFullName("Alice Cooper");
WorkflowMultiBranchProject mp = j.jenkins.createProject(WorkflowMultiBranchProject.class, "p");
mp.getSourcesList().add(new BranchSource(new GitSCMSource(null, sampleRepo.toString(), "", "*", "", false),
new DefaultBranchPropertyStrategy(new BranchProperty[0])));
for (SCMSource source : mp.getSCMSources()) {
assertEquals(mp, source.getOwner());
}
WorkflowJob p = scheduleAndFindBranchProject(mp, "master");
j.waitUntilNoActivity();
new RequestBuilder(baseUrl)
.put("/organizations/jenkins/pipelines/p/branches/feature1/favorite")
.auth("alice", "alice")
.data(ImmutableMap.of("favorite", true))
.build(String.class);
List l = new RequestBuilder(baseUrl)
.get("/users/"+user.getId()+"/favorites/")
.auth("alice","alice")
.build(List.class);
Assert.assertEquals(l.size(), 1);
Assert.assertEquals(((Map)l.get(0)).get("pipeline"),"/organizations/jenkins/pipelines/p/branches/feature1");
new RequestBuilder(baseUrl)
.get("/users/"+user.getId()+"/favorites/")
.auth("bob","bob")
.status(403)
.build(String.class);
}
@Test
public void getMultiBranchPipelineRunStages() throws Exception {
WorkflowMultiBranchProject mp = j.jenkins.createProject(WorkflowMultiBranchProject.class, "p");
mp.getSourcesList().add(new BranchSource(new GitSCMSource(null, sampleRepo.toString(), "", "*", "", false),
new DefaultBranchPropertyStrategy(new BranchProperty[0])));
for (SCMSource source : mp.getSCMSources()) {
assertEquals(mp, source.getOwner());
}
WorkflowJob p = scheduleAndFindBranchProject(mp, "master");
j.waitUntilNoActivity();
WorkflowRun b1 = p.getLastBuild();
assertEquals(1, b1.getNumber());
assertEquals(3, mp.getItems().size());
j.waitForCompletion(b1);
List<Map> nodes = get("/organizations/jenkins/pipelines/p/branches/master/runs/1/nodes", List.class);
Assert.assertEquals(3, nodes.size());
}
private void setupScm() throws Exception {
// create git repo
sampleRepo.init();
sampleRepo.write("Jenkinsfile", "stage 'build'\n "+"node {echo 'Building'}\n"+
"stage 'test'\nnode { echo 'Testing'}\n"+
"stage 'deploy'\nnode { echo 'Deploying'}\n"
);
sampleRepo.write("file", "initial content");
sampleRepo.git("add", "Jenkinsfile");
sampleRepo.git("commit", "--all", "--message=flow");
//create feature branch
sampleRepo.git("checkout", "-b", "feature1");
sampleRepo.write("Jenkinsfile", "echo \"branch=${env.BRANCH_NAME}\"; "+"node {" +
" stage ('Build'); " +
" echo ('Building'); " +
" stage ('Test'); " +
" echo ('Testing'); " +
" stage ('Deploy'); " +
" echo ('Deploying'); " +
"}");
ScriptApproval.get().approveSignature("method java.lang.String toUpperCase");
sampleRepo.write("file", "subsequent content1");
sampleRepo.git("commit", "--all", "--message=tweaked1");
//create feature branch
sampleRepo.git("checkout", "-b", "feature2");
sampleRepo.write("Jenkinsfile", "echo \"branch=${env.BRANCH_NAME}\"; "+"node {" +
" stage ('Build'); " +
" echo ('Building'); " +
" stage ('Test'); " +
" echo ('Testing'); " +
" stage ('Deploy'); " +
" echo ('Deploying'); " +
"}");
ScriptApproval.get().approveSignature("method java.lang.String toUpperCase");
sampleRepo.write("file", "subsequent content2");
sampleRepo.git("commit", "--all", "--message=tweaked2");
}
private WorkflowJob scheduleAndFindBranchProject(WorkflowMultiBranchProject mp, String name) throws Exception {
mp.scheduleBuild2(0).getFuture().get();
return findBranchProject(mp, name);
}
private void scheduleAndFindBranchProject(WorkflowMultiBranchProject mp) throws Exception {
mp.scheduleBuild2(0).getFuture().get();
}
private WorkflowJob findBranchProject(WorkflowMultiBranchProject mp, String name) throws Exception {
WorkflowJob p = mp.getItem(name);
if (p == null) {
mp.getIndexing().writeWholeLogTo(System.out);
fail(name + " project not found");
}
return p;
}
}
| blueocean-rest-impl/src/test/java/io/jenkins/blueocean/service/embedded/MultiBranchTest.java | package io.jenkins.blueocean.service.embedded;
import com.google.common.collect.ImmutableMap;
import hudson.model.FreeStyleProject;
import hudson.plugins.git.util.BuildData;
import hudson.scm.ChangeLogSet;
import io.jenkins.blueocean.service.embedded.scm.GitSampleRepoRule;
import jenkins.branch.BranchProperty;
import jenkins.branch.BranchSource;
import jenkins.branch.DefaultBranchPropertyStrategy;
import jenkins.plugins.git.GitSCMSource;
import jenkins.scm.api.SCMSource;
import org.hamcrest.collection.IsArrayContainingInAnyOrder;
import org.jenkinsci.plugins.scriptsecurity.scripts.ScriptApproval;
import org.jenkinsci.plugins.workflow.job.WorkflowJob;
import org.jenkinsci.plugins.workflow.job.WorkflowRun;
import org.jenkinsci.plugins.workflow.multibranch.WorkflowMultiBranchProject;
import org.junit.Assert;
import org.junit.Before;
import org.junit.ClassRule;
import org.junit.Rule;
import org.junit.Test;
import org.jvnet.hudson.test.BuildWatcher;
import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ExecutionException;
import static io.jenkins.blueocean.rest.model.BlueRun.DATE_FORMAT_STRING;
import static org.junit.Assert.*;
/**
* @author Vivek Pandey
*/
public class MultiBranchTest extends BaseTest{
@ClassRule
public static BuildWatcher buildWatcher = new BuildWatcher();
@Rule
public GitSampleRepoRule sampleRepo = new GitSampleRepoRule();
private final String[] branches={"master", "feature1", "feature2"};
@Before
public void setup() throws Exception{
super.setup();
setupScm();
}
@Test
public void getMultiBranchPipelines() throws IOException, ExecutionException, InterruptedException {
WorkflowMultiBranchProject mp = j.jenkins.createProject(WorkflowMultiBranchProject.class, "p");
FreeStyleProject f = j.jenkins.createProject(FreeStyleProject.class, "f");
mp.getSourcesList().add(new BranchSource(new GitSCMSource(null, sampleRepo.toString(), "", "*", "", false),
new DefaultBranchPropertyStrategy(new BranchProperty[0])));
for (SCMSource source : mp.getSCMSources()) {
assertEquals(mp, source.getOwner());
}
mp.scheduleBuild2(0).getFuture().get();
List<Map> resp = get("/organizations/jenkins/pipelines/", List.class);
Assert.assertEquals(2, resp.size());
validatePipeline(f, resp.get(0));
validateMultiBranchPipeline(mp, resp.get(1), 3);
Assert.assertEquals(mp.getBranch("master").getBuildHealth().getScore(), resp.get(0).get("weatherScore"));
}
@Test
public void getMultiBranchPipelinesWithNonMasterBranch() throws Exception {
sampleRepo.git("branch","-D", "master");
WorkflowMultiBranchProject mp = j.jenkins.createProject(WorkflowMultiBranchProject.class, "p");
mp.getSourcesList().add(new BranchSource(new GitSCMSource(null, sampleRepo.toString(), "", "*", "", false),
new DefaultBranchPropertyStrategy(new BranchProperty[0])));
for (SCMSource source : mp.getSCMSources()) {
assertEquals(mp, source.getOwner());
}
mp.scheduleBuild2(0).getFuture().get();
List<Map> resp = get("/organizations/jenkins/pipelines/", List.class);
Assert.assertEquals(1, resp.size());
validateMultiBranchPipeline(mp, resp.get(0), 2);
Assert.assertNull(mp.getBranch("master"));
}
@Test
public void getMultiBranchPipeline() throws IOException, ExecutionException, InterruptedException {
WorkflowMultiBranchProject mp = j.jenkins.createProject(WorkflowMultiBranchProject.class, "p");
mp.getSourcesList().add(new BranchSource(new GitSCMSource(null, sampleRepo.toString(), "", "*", "", false),
new DefaultBranchPropertyStrategy(new BranchProperty[0])));
for (SCMSource source : mp.getSCMSources()) {
assertEquals(mp, source.getOwner());
}
mp.scheduleBuild2(0).getFuture().get();
Map resp = get("/organizations/jenkins/pipelines/p/");
validateMultiBranchPipeline(mp,resp,3);
List<String> names = (List<String>) resp.get("branchNames");
IsArrayContainingInAnyOrder.arrayContainingInAnyOrder(names, branches);
Thread.sleep(1000);
List<Map> br = get("/organizations/jenkins/pipelines/p/branches", List.class);
List<String> branchNames = new ArrayList<>();
List<Integer> weather = new ArrayList<>();
for(Map b: br){
branchNames.add((String) b.get("name"));
weather.add((int) b.get("weatherScore"));
}
for(String n:branches){
assertTrue(branchNames.contains(n));
}
for(int s:weather){
assertEquals(100, s);
}
}
@Test
public void getMultiBranchPipelineRuns() throws Exception {
WorkflowMultiBranchProject mp = j.jenkins.createProject(WorkflowMultiBranchProject.class, "p");
mp.getSourcesList().add(new BranchSource(new GitSCMSource(null, sampleRepo.toString(), "", "*", "", false),
new DefaultBranchPropertyStrategy(new BranchProperty[0])));
for (SCMSource source : mp.getSCMSources()) {
assertEquals(mp, source.getOwner());
}
WorkflowJob p = scheduleAndFindBranchProject(mp, "master");
j.waitUntilNoActivity();
WorkflowRun b1 = p.getLastBuild();
assertEquals(1, b1.getNumber());
assertEquals(3, mp.getItems().size());
//execute feature 1 branch build
p = scheduleAndFindBranchProject(mp, "feature1");
j.waitUntilNoActivity();
WorkflowRun b2 = p.getLastBuild();
assertEquals(1, b2.getNumber());
//execute feature 2 branch build
p = scheduleAndFindBranchProject(mp, "feature2");
j.waitUntilNoActivity();
WorkflowRun b3 = p.getLastBuild();
assertEquals(1, b3.getNumber());
List<Map> br = get("/organizations/jenkins/pipelines/p/branches", List.class);
List<String> branchNames = new ArrayList<>();
List<Integer> weather = new ArrayList<>();
for(Map b: br){
branchNames.add((String) b.get("name"));
weather.add((int) b.get("weatherScore"));
}
Assert.assertTrue(branchNames.contains(((Map)(br.get(0).get("latestRun"))).get("pipeline")));
for(String n:branches){
assertTrue(branchNames.contains(n));
}
WorkflowRun[] runs = {b1,b2,b3};
int i = 0;
for(String n:branches){
WorkflowRun b = runs[i];
j.waitForCompletion(b);
Map run = get("/organizations/jenkins/pipelines/p/branches/"+n+"/runs/"+b.getId());
validateRun(b,run);
i++;
}
Map pr = get("/organizations/jenkins/pipelines/p/");
validateMultiBranchPipeline(mp, pr, 3,3,0);
sampleRepo.git("checkout","master");
sampleRepo.write("file", "subsequent content11");
sampleRepo.git("commit", "--all", "--message=tweaked11");
p = scheduleAndFindBranchProject(mp, "master");
j.waitUntilNoActivity();
WorkflowRun b4 = p.getLastBuild();
assertEquals(2, b4.getNumber());
List<Map> run = get("/organizations/jenkins/pipelines/p/branches/master/runs/", List.class);
validateRun(b4, run.get(0));
}
@Test
public void getMultiBranchPipelineActivityRuns() throws Exception {
WorkflowMultiBranchProject mp = j.jenkins.createProject(WorkflowMultiBranchProject.class, "p");
mp.getSourcesList().add(new BranchSource(new GitSCMSource(null, sampleRepo.toString(), "", "*", "", false),
new DefaultBranchPropertyStrategy(new BranchProperty[0])));
for (SCMSource source : mp.getSCMSources()) {
assertEquals(mp, source.getOwner());
}
scheduleAndFindBranchProject(mp);
j.waitUntilNoActivity();
WorkflowJob p = findBranchProject(mp, "master");
WorkflowRun b1 = p.getLastBuild();
assertEquals(1, b1.getNumber());
assertEquals(3, mp.getItems().size());
//execute feature 1 branch build
p = findBranchProject(mp, "feature1");
WorkflowRun b2 = p.getLastBuild();
assertEquals(1, b2.getNumber());
//execute feature 2 branch build
p = findBranchProject(mp, "feature2");
WorkflowRun b3 = p.getLastBuild();
assertEquals(1, b3.getNumber());
List<Map> resp = get("/organizations/jenkins/pipelines/p/runs", List.class);
Assert.assertEquals(3, resp.size());
Date d1 = new SimpleDateFormat(DATE_FORMAT_STRING).parse((String)resp.get(0).get("startTime"));
Date d2 = new SimpleDateFormat(DATE_FORMAT_STRING).parse((String)resp.get(1).get("startTime"));
Date d3 = new SimpleDateFormat(DATE_FORMAT_STRING).parse((String)resp.get(2).get("startTime"));
Assert.assertTrue(d1.compareTo(d2) >= 0);
Assert.assertTrue(d2.compareTo(d3) >= 0);
for(Map m: resp){
BuildData d;
WorkflowRun r;
if(m.get("pipeline").equals("master")){
r = b1;
d = b1.getAction(BuildData.class);
} else if(m.get("pipeline").equals("feature1")){
r = b2;
d = b2.getAction(BuildData.class);
} else{
r = b3;
d = b3.getAction(BuildData.class);
}
validateRun(r,m);
String commitId = "";
if(d != null) {
commitId = d.getLastBuiltRevision().getSha1String();
Assert.assertEquals(commitId, m.get("commitId"));
}
}
}
@Test
public void getMultiBranchPipelineRunChangeSets() throws Exception {
WorkflowMultiBranchProject mp = j.jenkins.createProject(WorkflowMultiBranchProject.class, "p");
mp.getSourcesList().add(new BranchSource(new GitSCMSource(null, sampleRepo.toString(), "", "*", "", false),
new DefaultBranchPropertyStrategy(new BranchProperty[0])));
for (SCMSource source : mp.getSCMSources()) {
assertEquals(mp, source.getOwner());
}
WorkflowJob p = scheduleAndFindBranchProject(mp, "master");
j.waitUntilNoActivity();
WorkflowRun b1 = p.getLastBuild();
assertEquals(1, b1.getNumber());
assertEquals(3, mp.getItems().size());
String[] messages = {"tweaked11","tweaked12","tweaked13","tweaked14"};
sampleRepo.git("checkout","master");
sampleRepo.write("file", "subsequent content11");
sampleRepo.git("commit", "--all", "--message="+messages[0]);
sampleRepo.git("checkout","master");
sampleRepo.write("file", "subsequent content12");
sampleRepo.git("commit", "--all", "--message="+messages[1]);
sampleRepo.git("checkout","master");
sampleRepo.write("file", "subsequent content13");
sampleRepo.git("commit", "--all", "--message="+messages[2]);
sampleRepo.git("checkout","master");
sampleRepo.write("file", "subsequent content14");
sampleRepo.git("commit", "--all", "--message="+messages[3]);
p = scheduleAndFindBranchProject(mp, "master");
j.waitUntilNoActivity();
WorkflowRun b4 = p.getLastBuild();
assertEquals(2, b4.getNumber());
ChangeLogSet.Entry changeLog = b4.getChangeSets().get(0).iterator().next();
int i=0;
for(ChangeLogSet.Entry c:b4.getChangeSets().get(0)){
Assert.assertEquals(messages[i], c.getMsg());
i++;
}
Map run = get("/organizations/jenkins/pipelines/p/branches/master/runs/"+b4.getId()+"/");
validateRun(b4, run);
List<Map> changetSet = (List<Map>) run.get("changeSet");
Map c = changetSet.get(0);
Assert.assertEquals(changeLog.getCommitId(), c.get("commitId"));
Map a = (Map) c.get("author");
Assert.assertEquals(changeLog.getAuthor().getId(), a.get("id"));
Assert.assertEquals(changeLog.getAuthor().getFullName(), a.get("fullName"));
int j=0;
for(ChangeLogSet.Entry cs:b4.getChangeSets().get(0)){
Assert.assertEquals(cs.getCommitId(),changetSet.get(j).get("commitId"));
j++;
}
}
@Test
public void createUserFavouriteMultibranchTopLevelTest() throws Exception {
j.jenkins.setSecurityRealm(j.createDummySecurityRealm());
hudson.model.User user = j.jenkins.getUser("alice");
user.setFullName("Alice Cooper");
WorkflowMultiBranchProject mp = j.jenkins.createProject(WorkflowMultiBranchProject.class, "p");
mp.getSourcesList().add(new BranchSource(new GitSCMSource(null, sampleRepo.toString(), "", "*", "", false),
new DefaultBranchPropertyStrategy(new BranchProperty[0])));
for (SCMSource source : mp.getSCMSources()) {
assertEquals(mp, source.getOwner());
}
WorkflowJob p = scheduleAndFindBranchProject(mp, "master");
j.waitUntilNoActivity();
new RequestBuilder(baseUrl)
.put("/organizations/jenkins/pipelines/p/favorite")
.auth("alice", "alice")
.data(ImmutableMap.of("favorite", true))
.build(String.class);
List l = new RequestBuilder(baseUrl)
.get("/users/"+user.getId()+"/favorites/")
.auth("alice","alice")
.build(List.class);
Assert.assertEquals(l.size(), 1);
Assert.assertEquals(((Map)l.get(0)).get("pipeline"),"/organizations/jenkins/pipelines/p/branches/master");
new RequestBuilder(baseUrl)
.get("/users/"+user.getId()+"/favorites/")
.auth("bob","bob")
.status(403)
.build(String.class);
}
@Test
public void createUserFavouriteMultibranchBranchTest() throws Exception {
j.jenkins.setSecurityRealm(j.createDummySecurityRealm());
hudson.model.User user = j.jenkins.getUser("alice");
user.setFullName("Alice Cooper");
WorkflowMultiBranchProject mp = j.jenkins.createProject(WorkflowMultiBranchProject.class, "p");
mp.getSourcesList().add(new BranchSource(new GitSCMSource(null, sampleRepo.toString(), "", "*", "", false),
new DefaultBranchPropertyStrategy(new BranchProperty[0])));
for (SCMSource source : mp.getSCMSources()) {
assertEquals(mp, source.getOwner());
}
WorkflowJob p = scheduleAndFindBranchProject(mp, "master");
j.waitUntilNoActivity();
new RequestBuilder(baseUrl)
.put("/organizations/jenkins/pipelines/p/branches/feature1/favorite")
.auth("alice", "alice")
.data(ImmutableMap.of("favorite", true))
.build(String.class);
List l = new RequestBuilder(baseUrl)
.get("/users/"+user.getId()+"/favorites/")
.auth("alice","alice")
.build(List.class);
Assert.assertEquals(l.size(), 1);
Assert.assertEquals(((Map)l.get(0)).get("pipeline"),"/organizations/jenkins/pipelines/p/branches/feature1");
new RequestBuilder(baseUrl)
.get("/users/"+user.getId()+"/favorites/")
.auth("bob","bob")
.status(403)
.build(String.class);
}
@Test
public void getMultiBranchPipelineRunStages() throws Exception {
WorkflowMultiBranchProject mp = j.jenkins.createProject(WorkflowMultiBranchProject.class, "p");
mp.getSourcesList().add(new BranchSource(new GitSCMSource(null, sampleRepo.toString(), "", "*", "", false),
new DefaultBranchPropertyStrategy(new BranchProperty[0])));
for (SCMSource source : mp.getSCMSources()) {
assertEquals(mp, source.getOwner());
}
WorkflowJob p = scheduleAndFindBranchProject(mp, "master");
j.waitUntilNoActivity();
WorkflowRun b1 = p.getLastBuild();
assertEquals(1, b1.getNumber());
assertEquals(3, mp.getItems().size());
j.waitForCompletion(b1);
List<Map> nodes = get("/organizations/jenkins/pipelines/p/branches/master/runs/1/nodes", List.class);
Assert.assertEquals(3, nodes.size());
}
private void setupScm() throws Exception {
// create git repo
sampleRepo.init();
sampleRepo.write("Jenkinsfile", "stage 'build'\n "+"node {echo 'Building'}\n"+
"stage 'test'\nnode { echo 'Testing'}\n"+
"stage 'deploy'\nnode { echo 'Deploying'}\n"
);
sampleRepo.write("file", "initial content");
sampleRepo.git("add", "Jenkinsfile");
sampleRepo.git("commit", "--all", "--message=flow");
//create feature branch
sampleRepo.git("checkout", "-b", "feature1");
sampleRepo.write("Jenkinsfile", "echo \"branch=${env.BRANCH_NAME}\"; "+"node {" +
" stage ('Build'); " +
" echo ('Building'); " +
" stage ('Test'); " +
" echo ('Testing'); " +
" stage ('Deploy'); " +
" echo ('Deploying'); " +
"}");
ScriptApproval.get().approveSignature("method java.lang.String toUpperCase");
sampleRepo.write("file", "subsequent content1");
sampleRepo.git("commit", "--all", "--message=tweaked1");
//create feature branch
sampleRepo.git("checkout", "-b", "feature2");
sampleRepo.write("Jenkinsfile", "echo \"branch=${env.BRANCH_NAME}\"; "+"node {" +
" stage ('Build'); " +
" echo ('Building'); " +
" stage ('Test'); " +
" echo ('Testing'); " +
" stage ('Deploy'); " +
" echo ('Deploying'); " +
"}");
ScriptApproval.get().approveSignature("method java.lang.String toUpperCase");
sampleRepo.write("file", "subsequent content2");
sampleRepo.git("commit", "--all", "--message=tweaked2");
}
private WorkflowJob scheduleAndFindBranchProject(WorkflowMultiBranchProject mp, String name) throws Exception {
mp.scheduleBuild2(0).getFuture().get();
return findBranchProject(mp, name);
}
private void scheduleAndFindBranchProject(WorkflowMultiBranchProject mp) throws Exception {
mp.scheduleBuild2(0).getFuture().get();
}
private WorkflowJob findBranchProject(WorkflowMultiBranchProject mp, String name) throws Exception {
WorkflowJob p = mp.getItem(name);
if (p == null) {
mp.getIndexing().writeWholeLogTo(System.out);
fail(name + " project not found");
}
return p;
}
}
| Removed the flaky test for now, these scenarios are covered by other tests so disabling it is ok
| blueocean-rest-impl/src/test/java/io/jenkins/blueocean/service/embedded/MultiBranchTest.java | Removed the flaky test for now, these scenarios are covered by other tests so disabling it is ok | <ide><path>lueocean-rest-impl/src/test/java/io/jenkins/blueocean/service/embedded/MultiBranchTest.java
<ide> Assert.assertNull(mp.getBranch("master"));
<ide> }
<ide>
<del> @Test
<add>// @Test
<ide> public void getMultiBranchPipeline() throws IOException, ExecutionException, InterruptedException {
<ide> WorkflowMultiBranchProject mp = j.jenkins.createProject(WorkflowMultiBranchProject.class, "p");
<ide> mp.getSourcesList().add(new BranchSource(new GitSCMSource(null, sampleRepo.toString(), "", "*", "", false),
<ide>
<ide> IsArrayContainingInAnyOrder.arrayContainingInAnyOrder(names, branches);
<ide>
<del> Thread.sleep(1000);
<ide> List<Map> br = get("/organizations/jenkins/pipelines/p/branches", List.class);
<ide>
<ide> List<String> branchNames = new ArrayList<>(); |
|
JavaScript | mit | 64d55305a166d58ff69accdc76da62da8b535c5d | 0 | formio/formio.js,formio/formio.js,formio/formio.js | import _ from 'lodash';
import Formio from '../../../Formio';
export default [
{
key: 'inputMask',
ignore: true
},
{
key: 'allowMultipleMasks',
ignore: true
},
{
type: 'number',
input: true,
key: 'rows',
label: 'Rows',
weight: 210,
tooltip: 'This allows control over how many rows are visible in the text area.',
placeholder: 'Enter the amount of rows'
},
{
type: 'select',
input: true,
key: 'editor',
label: 'Editor',
tooltip: 'Select the type of WYSIWYG editor to use for this text area.',
dataSrc: 'values',
data: {
values: [
{ label: 'None', value: '' },
{ label: 'Quill', value: 'quill' },
{ label: 'CKEditor', value: 'ckeditor' },
{ label: 'ACE', value: 'ace' }
]
},
weight: 415
},
{
type: 'checkbox',
input: true,
key: 'isUploadEnabled',
label: 'Enable Image Upload',
weight: 415.1,
conditional: {
json: {
or: [
{
'===': [
{ var: 'data.editor' },
'quill'
]
},
{
'==': [
{ var: 'data.editor' },
''
]
}
]
}
}
},
{
type: 'select',
input: true,
key: 'uploadStorage',
label: 'Image Upload Storage',
placeholder: 'Select your file storage provider',
weight: 415.2,
tooltip: 'Which storage to save the files in.',
valueProperty: 'value',
dataSrc: 'custom',
data: {
custom() {
return _.map(Formio.providers.storage, (storage, key) => ({
label: storage.title,
value: key
}));
}
},
conditional: {
json: {
'===': [
{ var: 'data.isUploadEnabled' },
true
]
}
}
},
{
type: 'textfield',
input: true,
key: 'uploadUrl',
label: 'Image Upload Url',
weight: 415.3,
placeholder: 'Enter the url to post the files to.',
tooltip: 'See <a href=\'https://github.com/danialfarid/ng-file-upload#server-side\' target=\'_blank\'>https://github.com/danialfarid/ng-file-upload#server-side</a> for how to set up the server.',
conditional: {
json: { '===': [{ var: 'data.uploadStorage' }, 'url'] }
}
},
{
type: 'textarea',
key: 'uploadOptions',
label: 'Image Upload Custom request options',
tooltip: 'Pass your custom xhr options(optional)',
rows: 5,
editor: 'ace',
input: true,
weight: 415.4,
placeholder: `{
"withCredentials": true
}`,
conditional: {
json: {
'===': [{
var: 'data.uploadStorage'
}, 'url']
}
}
},
{
type: 'textfield',
input: true,
key: 'uploadDir',
label: 'Image Upload Directory',
placeholder: '(optional) Enter a directory for the files',
tooltip: 'This will place all the files uploaded in this field in the directory',
weight: 415.5,
conditional: {
json: {
'===': [
{ var: 'data.isUploadEnabled' },
true
]
}
}
},
{
type: 'select',
input: true,
key: 'as',
label: 'Save As',
dataSrc: 'values',
tooltip: 'This setting determines how the value should be entered and stored in the database.',
clearOnHide: true,
data: {
values: [
{ label: 'String', value: 'string' },
{ label: 'JSON', value: 'json' },
{ label: 'HTML', value: 'html' }
]
},
conditional: {
json: {
or: [
{ '===': [
{ var: 'data.editor' },
'quill'
] },
{ '===': [
{ var: 'data.editor' },
'ace'
] }
]
}
},
weight: 416
},
{
type: 'textarea',
input: true,
editor: 'ace',
rows: 10,
as: 'json',
label: 'Editor Settings',
tooltip: 'Enter the WYSIWYG editor JSON configuration.',
key: 'wysiwyg',
customDefaultValue(value, component, row, data, instance) {
return instance.wysiwygDefault;
},
conditional: {
json: {
or: [
{ '===': [
{ var: 'data.editor' },
'quill'
] },
{ '===': [
{ var: 'data.editor' },
'ace'
] }
]
}
},
weight: 417
}
];
| src/components/textarea/editForm/TextArea.edit.display.js | import _ from 'lodash';
import Formio from '../../../Formio';
export default [
{
key: 'inputMask',
ignore: true
},
{
key: 'allowMultipleMasks',
ignore: true
},
{
type: 'number',
input: true,
key: 'rows',
label: 'Rows',
weight: 210,
tooltip: 'This allows control over how many rows are visible in the text area.',
placeholder: 'Enter the amount of rows'
},
{
type: 'select',
input: true,
key: 'editor',
label: 'Editor',
tooltip: 'Select the type of WYSIWYG editor to use for this text area.',
dataSrc: 'values',
data: {
values: [
{ label: 'None', value: '' },
{ label: 'Quill', value: 'quill' },
{ label: 'CKEditor', value: 'ckeditor' },
{ label: 'ACE', value: 'ace' }
]
},
weight: 415
},
{
type: 'checkbox',
input: true,
key: 'isUploadEnabled',
label: 'Enable Image Upload',
weight: 415.1,
conditional: {
json: {
or: [
{
'===': [
{ var: 'data.editor' },
'quill'
]
},
{
'==': [
{ var: 'data.editor' },
''
]
}
]
}
}
},
{
type: 'select',
input: true,
key: 'uploadStorage',
label: 'Storage',
placeholder: 'Select your file storage provider',
weight: 415.2,
tooltip: 'Which storage to save the files in.',
valueProperty: 'value',
dataSrc: 'custom',
data: {
custom() {
return _.map(Formio.providers.storage, (storage, key) => ({
label: storage.title,
value: key
}));
}
},
conditional: {
json: {
'===': [
{ var: 'data.isUploadEnabled' },
true
]
}
}
},
{
type: 'textfield',
input: true,
key: 'uploadUrl',
label: 'Url',
weight: 415.3,
placeholder: 'Enter the url to post the files to.',
tooltip: 'See <a href=\'https://github.com/danialfarid/ng-file-upload#server-side\' target=\'_blank\'>https://github.com/danialfarid/ng-file-upload#server-side</a> for how to set up the server.',
conditional: {
json: { '===': [{ var: 'data.uploadStorage' }, 'url'] }
}
},
{
type: 'textarea',
key: 'uploadOptions',
label: 'Custom request options',
tooltip: 'Pass your custom xhr options(optional)',
rows: 5,
editor: 'ace',
input: true,
weight: 415.4,
placeholder: `{
"withCredentials": true
}`,
conditional: {
json: {
'===': [{
var: 'data.uploadStorage'
}, 'url']
}
}
},
{
type: 'textfield',
input: true,
key: 'uploadDir',
label: 'Directory',
placeholder: '(optional) Enter a directory for the files',
tooltip: 'This will place all the files uploaded in this field in the directory',
weight: 415.5,
conditional: {
json: {
'===': [
{ var: 'data.isUploadEnabled' },
true
]
}
}
},
{
type: 'select',
input: true,
key: 'as',
label: 'Save As',
dataSrc: 'values',
tooltip: 'This setting determines how the value should be entered and stored in the database.',
clearOnHide: true,
data: {
values: [
{ label: 'String', value: 'string' },
{ label: 'JSON', value: 'json' },
{ label: 'HTML', value: 'html' }
]
},
conditional: {
json: {
or: [
{ '===': [
{ var: 'data.editor' },
'quill'
] },
{ '===': [
{ var: 'data.editor' },
'ace'
] }
]
}
},
weight: 416
},
{
type: 'textarea',
input: true,
editor: 'ace',
rows: 10,
as: 'json',
label: 'Editor Settings',
tooltip: 'Enter the WYSIWYG editor JSON configuration.',
key: 'wysiwyg',
customDefaultValue(value, component, row, data, instance) {
return instance.wysiwygDefault;
},
conditional: {
json: {
or: [
{ '===': [
{ var: 'data.editor' },
'quill'
] },
{ '===': [
{ var: 'data.editor' },
'ace'
] }
]
}
},
weight: 417
}
];
| FOR-1953: Change field names in component settings
| src/components/textarea/editForm/TextArea.edit.display.js | FOR-1953: Change field names in component settings | <ide><path>rc/components/textarea/editForm/TextArea.edit.display.js
<ide> type: 'select',
<ide> input: true,
<ide> key: 'uploadStorage',
<del> label: 'Storage',
<add> label: 'Image Upload Storage',
<ide> placeholder: 'Select your file storage provider',
<ide> weight: 415.2,
<ide> tooltip: 'Which storage to save the files in.',
<ide> type: 'textfield',
<ide> input: true,
<ide> key: 'uploadUrl',
<del> label: 'Url',
<add> label: 'Image Upload Url',
<ide> weight: 415.3,
<ide> placeholder: 'Enter the url to post the files to.',
<ide> tooltip: 'See <a href=\'https://github.com/danialfarid/ng-file-upload#server-side\' target=\'_blank\'>https://github.com/danialfarid/ng-file-upload#server-side</a> for how to set up the server.',
<ide> {
<ide> type: 'textarea',
<ide> key: 'uploadOptions',
<del> label: 'Custom request options',
<add> label: 'Image Upload Custom request options',
<ide> tooltip: 'Pass your custom xhr options(optional)',
<ide> rows: 5,
<ide> editor: 'ace',
<ide> type: 'textfield',
<ide> input: true,
<ide> key: 'uploadDir',
<del> label: 'Directory',
<add> label: 'Image Upload Directory',
<ide> placeholder: '(optional) Enter a directory for the files',
<ide> tooltip: 'This will place all the files uploaded in this field in the directory',
<ide> weight: 415.5, |
|
JavaScript | mit | 7032121587f1d6e5753aea9781914a4aecafc93f | 0 | silverbux/rsjs | 738d662b-2e9d-11e5-899b-a45e60cdfd11 | helloWorld.js | 7381144c-2e9d-11e5-88e3-a45e60cdfd11 | 738d662b-2e9d-11e5-899b-a45e60cdfd11 | helloWorld.js | 738d662b-2e9d-11e5-899b-a45e60cdfd11 | <ide><path>elloWorld.js
<del>7381144c-2e9d-11e5-88e3-a45e60cdfd11
<add>738d662b-2e9d-11e5-899b-a45e60cdfd11 |
|
JavaScript | mpl-2.0 | 88a3bd5fc95a0b73bdeec6258f6c5f2c9635a925 | 0 | arathunku/gulp-translator,Abdillah/gulp-tarjeem | var YAML = require('yamljs');
var q = require('q');
var fs = require('fs');
var DEFAULT_REGEXP = /\{{2}([\w\.\s\"\']+\s?\|\s?translate[\w\s\|]*)\}{2}/g;
var baseTransforms = {
translate: function(content, dictionary){
if (!content) {
return new Error('No content to transform.');
}
return content.trim().split('.').reduce(function(dict, key){
if (!dict) {
return null;
}
return dict[key];
}, dictionary) ||
new Error('No such content (' + content + ') at dictionary.');
},
uppercase: function(content) {
if (!content) {
return new Error('No content to transform.');
}
return content.toUpperCase();
},
lowercase: function(content) {
if (!content) {
return new Error('No content to transform.');
}
return content.toLowerCase();
},
capitalize: function(content){
if (!content) {
return new Error('No content to transform.');
}
return content.charAt(0).toUpperCase() + content.substring(1).toLowerCase();
},
capitalizeEvery: function(content){
if (!content) {
return new Error('No content to transform.');
}
return content.toLowerCase().replace(/[^\s\.!\?]+(.)/g, function(word){
return this.capitalize(word);
});
},
reverse: function(content){
if (!content) {
return new Error('No content to transform.');
}
var res = '';
for(var i = content.length; i > 0; i--){
res += content[i-1];
}
return res;
}
};
var getDictionary = function(path){
var dictionary;
if (path.match(/\.json$/)) {
dictionary = JSON.parse(
fs.readFileSync(path,{
encoding: 'utf8'
})
);
}
else if (path.match(/\.yml$/)){
dictionary = YAML.load(path);
}
if (!dictionary){
try{
dictionary = JSON.parse(
fs.readFileSync(path+'.json',{
encoding: 'utf8'
})
);
}
catch(e){
dictionary = YAML.load(path + '.yml');
}
}
return dictionary;
};
module.exports = (function() {
var Translator = function(options){
options = options || {};
this.pattern = options.pattern || DEFAULT_REGEXP;
this.patternSplitter = options.patternSplitter || '|';
this.userTransform = options.transform || {};
if (typeof options === 'string'){
var lang = options.match(/([\.^\/]*)\.\w{0,4}$/);
this.lang = lang && lang[0] || 'undefined';
this.localePath = options;
}
else {
this.lang = options.lang;
this.localePath = options.localePath;
this.localeDirectory = options.localeDirectory;
this.localeExt = options.localeExt;
if (!this.localePath){
this.localePath = this.localeDirectory + this.lang;
}
if (this.localeExt) {
this.localePath += this.localeExt;
}
}
this.dictionary = getDictionary(this.localePath);
return this;
};
Translator.prototype.translate = function(content) {
var resultPromise = q.defer();
var self = this;
resultPromise.resolve(content.replace(self.pattern, function (s, data) {
var transforms = data.split(self.patternSplitter).map(function(filter){
return filter.trim();
});
var value = transforms.splice(0, 1)[0];
var res = transforms.reduce(function(res, transformName){
if (res instanceof Error) {
return res;
}
if (typeof self.userTransform[transformName] === 'function') {
return self.userTransform[transformName](res, self.dictionary);
}
else if (typeof baseTransforms[transformName] === 'function') {
return baseTransforms[transformName](res, self.dictionary);
} else {
return new Error('No such transform: '+ transformName);
}
}, value);
if (res instanceof Error) {
return resultPromise.reject(res);
}
// console.log('c', content);
// console.log('res', res);
return res;
}, content));
return resultPromise.promise;
};
return Translator;
}());
| lib/translator.js | var YAML = require('yamljs');
var q = require('q');
var DEFAULT_REGEXP = /\{{2}([\w\.\s\"\']+\s?\|\s?translate[\w\s\|]*)\}{2}/g;
var baseTransforms = {
translate: function(content, dictionary){
if (!content) {
return new Error('No content to transform.');
}
return content.trim().split('.').reduce(function(dict, key){
if (!dict) {
return null;
}
return dict[key];
}, dictionary) ||
new Error('No such content (' + content + ') at dictionary.');
},
uppercase: function(content) {
if (!content) {
return new Error('No content to transform.');
}
return content.toUpperCase();
},
lowercase: function(content) {
if (!content) {
return new Error('No content to transform.');
}
return content.toLowerCase();
},
capitalize: function(content){
if (!content) {
return new Error('No content to transform.');
}
return content.charAt(0).toUpperCase() + content.substring(1).toLowerCase();
},
capitalizeEvery: function(content){
if (!content) {
return new Error('No content to transform.');
}
return content.toLowerCase().replace(/[^\s\.!\?]+(.)/g, function(word){
return this.capitalize(word);
});
},
reverse: function(content){
if (!content) {
return new Error('No content to transform.');
}
var res = '';
for(var i = content.length; i > 0; i--){
res += content[i-1];
}
return res;
}
};
var getDictionary = function(path){
var dictionary;
if (path.match(/\.json$/)) {
dictionary = JSON.parse(
require('fs').readFileSync(path,{
encoding: 'utf8'
})
);
}
else if (path.match(/\.yml$/)){
dictionary = YAML.load(path);
}
if (!dictionary){
try{
dictionary = JSON.parse(
require('fs').readFileSync(path+'.json',{
encoding: 'utf8'
})
);
}
catch(e){
dictionary = YAML.load(path + '.yml');
}
}
return dictionary;
};
module.exports = (function() {
var Translator = function(options){
options = options || {};
this.pattern = options.pattern || DEFAULT_REGEXP;
this.patternSplitter = options.patternSplitter || '|';
this.userTransform = options.transform || {};
if (typeof options === 'string'){
var lang = options.match(/([\.^\/]*)\.\w{0,4}$/);
this.lang = lang && lang[0] || 'undefined';
this.localePath = options;
}
else {
this.lang = options.lang;
this.localePath = options.localePath;
this.localeDirectory = options.localeDirectory;
this.localeExt = options.localeExt;
if (!this.localePath){
this.localePath = this.localeDirectory + this.lang;
}
if (this.localeExt) {
this.localePath += this.localeExt;
}
}
this.dictionary = getDictionary(this.localePath);
return this;
};
Translator.prototype.translate = function(content) {
var resultPromise = q.defer();
var self = this;
resultPromise.resolve(content.replace(self.pattern, function (s, data) {
var transforms = data.split(self.patternSplitter).map(function(filter){
return filter.trim();
});
var value = transforms.splice(0, 1)[0];
var res = transforms.reduce(function(res, transformName){
if (res instanceof Error) {
return res;
}
if (typeof self.userTransform[transformName] === 'function') {
return self.userTransform[transformName](res, self.dictionary);
}
else if (typeof baseTransforms[transformName] === 'function') {
return baseTransforms[transformName](res, self.dictionary);
} else {
return new Error('No such transform: '+ transformName);
}
}, value);
if (res instanceof Error) {
return resultPromise.reject(res);
}
// console.log('c', content);
// console.log('res', res);
return res;
}, content));
return resultPromise.promise;
};
return Translator;
}());
| remove require
| lib/translator.js | remove require | <ide><path>ib/translator.js
<ide> var YAML = require('yamljs');
<ide> var q = require('q');
<add>var fs = require('fs');
<ide>
<ide> var DEFAULT_REGEXP = /\{{2}([\w\.\s\"\']+\s?\|\s?translate[\w\s\|]*)\}{2}/g;
<ide>
<ide>
<ide> if (path.match(/\.json$/)) {
<ide> dictionary = JSON.parse(
<del> require('fs').readFileSync(path,{
<add> fs.readFileSync(path,{
<ide> encoding: 'utf8'
<ide> })
<ide> );
<ide> if (!dictionary){
<ide> try{
<ide> dictionary = JSON.parse(
<del> require('fs').readFileSync(path+'.json',{
<add> fs.readFileSync(path+'.json',{
<ide> encoding: 'utf8'
<ide> })
<ide> ); |
|
Java | bsd-3-clause | d0d00f03c9e95943710ebee9bd4c194ad9f86665 | 0 | NCIP/cma,NCIP/cma,NCIP/cma,NCIP/cma,NCIP/cma | package gov.nih.nci.cma.clinical;
public class RembrandtClinicalReportBean {
private String rptStr = null;
private String sampleId;
private String ageAtDx;
private String gender;
private String survivalMonths;
private String survivalLengthRange;
private String disease;
private String grade;
private String race;
private String institution;
private String karnofsky;
private String neurologicalExamOutcome;
private String mriDesc;
private String followupMonth;
private String steroidDoseStatus;
private String antiConvulsantStatus;
private String priorTherapyRadiationSite;
private String priorTherapyRadiationFractionDose;
private String priorTherapyRadiationFractionNumber;
private String priorTherapyRadiationType;
private String priorTherapyChemoAgentName;
private String priorTherapyChemoCourseCount;
private String priorTherapySurgeryProcedureTitle;
private String priorTherapySurgeryTumorHistology;
private String priorTherapySurgeryOutcome;
private String onStudyTherapyRadiationSite;
private String onStudyTherapyRadiationNeurosisStatus;
private String onStudyTherapyRadiationFractionDose;
private String onStudyTherapyRadiationFractionNumber;
private String onStudyTherapyRadiationType;
private String onStudyTherapyChemoAgentName;
private String onStudyTherapyChemoCourseCount;
private String onStudyTherapySurgeryProcedureTitle;
private String onStudyTherapySurgeryIndication;
private String onStudyTherapySurgeryHistoDiagnosis;
private String onStudyTherapySurgeryOutcome;
public String getSampleId() {
return sampleId;
}
public void setSampleId(String sampleId) {
this.sampleId = sampleId;
}
public String getAgeAtDx() {
return ageAtDx;
}
public void setAgeAtDx(String ageAtDx) {
this.ageAtDx = ageAtDx;
}
public String getGender() {
return gender;
}
public void setGender(String gender) {
this.gender = gender;
}
public String getSurvivalMonths() {
return survivalMonths;
}
public void setSurvivalMonths(String survivalMonths) {
this.survivalMonths = survivalMonths;
}
public String getDisease() {
return disease;
}
public void setDisease(String disease) {
this.disease = disease;
}
public String getGrade() {
return grade;
}
public void setGrade(String grade) {
this.grade = grade;
}
public String getRace() {
return race;
}
public void setRace(String race) {
this.race = race;
}
public String getInstitution() {
return institution;
}
public void setInstitution(String institution) {
this.institution = institution;
}
public String getKarnofsky() {
return karnofsky;
}
public void setKarnofsky(String karnofsky) {
this.karnofsky = karnofsky;
}
public String getNeurologicalExamOutcome() {
return neurologicalExamOutcome;
}
public void setNeurologicalExamOutcome(String neurologicalExamOutcome) {
this.neurologicalExamOutcome = neurologicalExamOutcome;
}
public String getMriDesc() {
return mriDesc;
}
public void setMriDesc(String mriDesc) {
this.mriDesc = mriDesc;
}
public String getFollowupMonth() {
return followupMonth;
}
public void setFollowupMonth(String followupMonth) {
this.followupMonth = followupMonth;
}
public String getSteroidDoseStatus() {
return steroidDoseStatus;
}
public void setSteroidDoseStatus(String steroidDoseStatus) {
this.steroidDoseStatus = steroidDoseStatus;
}
public String getAntiConvulsantStatus() {
return antiConvulsantStatus;
}
public void setAntiConvulsantStatus(String antiConvulsantStatus) {
this.antiConvulsantStatus = antiConvulsantStatus;
}
public String getPriorTherapyRadiationSite() {
return priorTherapyRadiationSite;
}
public void setPriorTherapyRadiationSite(String priorTherapyRadiationSite) {
this.priorTherapyRadiationSite = priorTherapyRadiationSite;
}
public String getPriorTherapyRadiationFractionDose() {
return priorTherapyRadiationFractionDose;
}
public void setPriorTherapyRadiationFractionDose(
String priorTherapyRadiationFractionDose) {
this.priorTherapyRadiationFractionDose = priorTherapyRadiationFractionDose;
}
public String getPriorTherapyRadiationFractionNumber() {
return priorTherapyRadiationFractionNumber;
}
public void setPriorTherapyRadiationFractionNumber(
String priorTherapyRadiationFractionNumber) {
this.priorTherapyRadiationFractionNumber = priorTherapyRadiationFractionNumber;
}
public String getPriorTherapyRadiationType() {
return priorTherapyRadiationType;
}
public void setPriorTherapyRadiationType(String priorTherapyRadiationType) {
this.priorTherapyRadiationType = priorTherapyRadiationType;
}
public String getPriorTherapyChemoAgentName() {
return priorTherapyChemoAgentName;
}
public void setPriorTherapyChemoAgentName(String priorTherapyChemoAgentName) {
this.priorTherapyChemoAgentName = priorTherapyChemoAgentName;
}
public String getPriorTherapyChemoCourseCount() {
return priorTherapyChemoCourseCount;
}
public void setPriorTherapyChemoCourseCount(String priorTherapyChemoCourseCount) {
this.priorTherapyChemoCourseCount = priorTherapyChemoCourseCount;
}
public String getPriorTherapySurgeryProcedureTitle() {
return priorTherapySurgeryProcedureTitle;
}
public void setPriorTherapySurgeryProcedureTitle(
String priorTherapySurgeryProcedureTitle) {
this.priorTherapySurgeryProcedureTitle = priorTherapySurgeryProcedureTitle;
}
public String getPriorTherapySurgeryTumorHistology() {
return priorTherapySurgeryTumorHistology;
}
public void setPriorTherapySurgeryTumorHistology(
String priorTherapySurgeryTumorHistology) {
this.priorTherapySurgeryTumorHistology = priorTherapySurgeryTumorHistology;
}
public String getPriorTherapySurgeryOutcome() {
return priorTherapySurgeryOutcome;
}
public void setPriorTherapySurgeryOutcome(String priorTherapySurgeryOutcome) {
this.priorTherapySurgeryOutcome = priorTherapySurgeryOutcome;
}
public String getOnStudyTherapyRadiationSite() {
return onStudyTherapyRadiationSite;
}
public void setOnStudyTherapyRadiationSite(String onStudyTherapyRadiationSite) {
this.onStudyTherapyRadiationSite = onStudyTherapyRadiationSite;
}
public String getOnStudyTherapyRadiationNeurosisStatus() {
return onStudyTherapyRadiationNeurosisStatus;
}
public void setOnStudyTherapyRadiationNeurosisStatus(
String onStudyTherapyRadiationNeurosisStatus) {
this.onStudyTherapyRadiationNeurosisStatus = onStudyTherapyRadiationNeurosisStatus;
}
public String getOnStudyTherapyRadiationFractionDose() {
return onStudyTherapyRadiationFractionDose;
}
public void setOnStudyTherapyRadiationFractionDose(
String onStudyTherapyRadiationFractionDose) {
this.onStudyTherapyRadiationFractionDose = onStudyTherapyRadiationFractionDose;
}
public String getOnStudyTherapyRadiationFractionNumber() {
return onStudyTherapyRadiationFractionNumber;
}
public void setOnStudyTherapyRadiationFractionNumber(
String onStudyTherapyRadiationFractionNumber) {
this.onStudyTherapyRadiationFractionNumber = onStudyTherapyRadiationFractionNumber;
}
public String getOnStudyTherapyRadiationType() {
return onStudyTherapyRadiationType;
}
public void setOnStudyTherapyRadiationType(String onStudyTherapyRadiationType) {
this.onStudyTherapyRadiationType = onStudyTherapyRadiationType;
}
public String getOnStudyTherapyChemoAgentName() {
return onStudyTherapyChemoAgentName;
}
public void setOnStudyTherapyChemoAgentName(String onStudyTherapyChemoAgentName) {
this.onStudyTherapyChemoAgentName = onStudyTherapyChemoAgentName;
}
public String getOnStudyTherapyChemoCourseCount() {
return onStudyTherapyChemoCourseCount;
}
public void setOnStudyTherapyChemoCourseCount(
String onStudyTherapyChemoCourseCount) {
this.onStudyTherapyChemoCourseCount = onStudyTherapyChemoCourseCount;
}
public String getOnStudyTherapySurgeryProcedureTitle() {
return onStudyTherapySurgeryProcedureTitle;
}
public void setOnStudyTherapySurgeryProcedureTitle(
String onStudyTherapySurgeryProcedureTitle) {
this.onStudyTherapySurgeryProcedureTitle = onStudyTherapySurgeryProcedureTitle;
}
public String getOnStudyTherapySurgeryIndication() {
return onStudyTherapySurgeryIndication;
}
public void setOnStudyTherapySurgeryIndication(
String onStudyTherapySurgeryIndication) {
this.onStudyTherapySurgeryIndication = onStudyTherapySurgeryIndication;
}
public String getOnStudyTherapySurgeryHistoDiagnosis() {
return onStudyTherapySurgeryHistoDiagnosis;
}
public void setOnStudyTherapySurgeryHistoDiagnosis(
String onStudyTherapySurgeryHistoDiagnosis) {
this.onStudyTherapySurgeryHistoDiagnosis = onStudyTherapySurgeryHistoDiagnosis;
}
public String getOnStudyTherapySurgeryOutcome() {
return onStudyTherapySurgeryOutcome;
}
public void setOnStudyTherapySurgeryOutcome(String onStudyTherapySurgeryOutcome) {
this.onStudyTherapySurgeryOutcome = onStudyTherapySurgeryOutcome;
}
public String getSurvivalLengthRange() {
return survivalLengthRange;
}
public void setSurvivalLengthRange(String survivalLengthRange) {
this.survivalLengthRange = survivalLengthRange;
}
public String toString() {
if (rptStr == null) {
StringBuffer sb = new StringBuffer();
sb.append(sampleId).append(",");
sb.append(ageAtDx).append(",");
sb.append(gender).append(",");
sb.append(survivalMonths).append(",");
sb.append(survivalLengthRange).append(",");
sb.append(disease).append(",");
sb.append(grade).append(",");
sb.append(race).append(",");
sb.append(institution).append(",");
sb.append(karnofsky).append(",");
sb.append(neurologicalExamOutcome).append(",");
sb.append(mriDesc).append(",");
sb.append(followupMonth).append(",");
sb.append(steroidDoseStatus).append(",");
sb.append(antiConvulsantStatus).append(",");
sb.append(priorTherapyRadiationSite).append(",");
sb.append(priorTherapyRadiationFractionDose).append(",");
sb.append(priorTherapyRadiationFractionNumber).append(",");
sb.append(priorTherapyRadiationType).append(",");
sb.append(priorTherapyChemoAgentName).append(",");
sb.append(priorTherapyChemoCourseCount).append(",");
sb.append(priorTherapySurgeryProcedureTitle).append(",");
sb.append(priorTherapySurgeryTumorHistology).append(",");
sb.append(priorTherapySurgeryOutcome).append(",");
sb.append(onStudyTherapyRadiationSite).append(",");
sb.append(onStudyTherapyRadiationNeurosisStatus).append(",");
sb.append(onStudyTherapyRadiationFractionDose).append(",");
sb.append(onStudyTherapyRadiationFractionNumber).append(",");
sb.append(onStudyTherapyRadiationType).append(",");
sb.append(onStudyTherapyChemoAgentName).append(",");
sb.append(onStudyTherapyChemoCourseCount).append(",");
sb.append(onStudyTherapySurgeryProcedureTitle).append(",");
sb.append(onStudyTherapySurgeryIndication).append(",");
sb.append(onStudyTherapySurgeryHistoDiagnosis).append(",");
sb.append(onStudyTherapySurgeryOutcome);
rptStr = sb.toString();
}
return rptStr;
}
}
| src/java/gov/nih/nci/cma/clinical/RembrandtClinicalReportBean.java | package gov.nih.nci.cma.clinical;
public class RembrandtClinicalReportBean {
private String sampleId;
private String ageAtDx;
private String gender;
private String survivalMonths;
private String disease;
private String grade;
private String race;
private String institution;
private String karnofsky;
private String neurologicalExamOutcome;
private String mriDesc;
private String followupMonth;
private String steroidDoseStatus;
private String antiConvulsantStatus;
private String priorTherapyRadiationSite;
private String priorTherapyRadiationFractionDose;
private String priorTherapyRadiationFractionNumber;
private String priorTherapyRadiationType;
private String priorTherapyChemoAgentName;
private String priorTherapyChemoCourseCount;
private String priorTherapySurgeryProcedureTitle;
private String priorTherapySurgeryTumorHistology;
private String priorTherapySurgeryOutcome;
private String onStudyTherapyRadiationSite;
private String onStudyTherapyRadiationNeurosisStatus;
private String onStudyTherapyRadiationFractionDose;
private String onStudyTherapyRadiationFractionNumber;
private String onStudyTherapyRadiationType;
private String onStudyTherapyChemoAgentName;
private String onStudyTherapyChemoCourseCount;
private String onStudyTherapySurgeryProcedureTitle;
private String onStudyTherapySurgeryIndication;
private String onStudyTherapySurgeryHistoDiagnosis;
private String onStudyTherapySurgeryOutcome;
public String getSampleId() {
return sampleId;
}
public void setSampleId(String sampleId) {
this.sampleId = sampleId;
}
public String getAgeAtDx() {
return ageAtDx;
}
public void setAgeAtDx(String ageAtDx) {
this.ageAtDx = ageAtDx;
}
public String getGender() {
return gender;
}
public void setGender(String gender) {
this.gender = gender;
}
public String getSurvivalMonths() {
return survivalMonths;
}
public void setSurvivalMonths(String survivalMonths) {
this.survivalMonths = survivalMonths;
}
public String getDisease() {
return disease;
}
public void setDisease(String disease) {
this.disease = disease;
}
public String getGrade() {
return grade;
}
public void setGrade(String grade) {
this.grade = grade;
}
public String getRace() {
return race;
}
public void setRace(String race) {
this.race = race;
}
public String getInstitution() {
return institution;
}
public void setInstitution(String institution) {
this.institution = institution;
}
public String getKarnofsky() {
return karnofsky;
}
public void setKarnofsky(String karnofsky) {
this.karnofsky = karnofsky;
}
public String getNeurologicalExamOutcome() {
return neurologicalExamOutcome;
}
public void setNeurologicalExamOutcome(String neurologicalExamOutcome) {
this.neurologicalExamOutcome = neurologicalExamOutcome;
}
public String getMriDesc() {
return mriDesc;
}
public void setMriDesc(String mriDesc) {
this.mriDesc = mriDesc;
}
public String getFollowupMonth() {
return followupMonth;
}
public void setFollowupMonth(String followupMonth) {
this.followupMonth = followupMonth;
}
public String getSteroidDoseStatus() {
return steroidDoseStatus;
}
public void setSteroidDoseStatus(String steroidDoseStatus) {
this.steroidDoseStatus = steroidDoseStatus;
}
public String getAntiConvulsantStatus() {
return antiConvulsantStatus;
}
public void setAntiConvulsantStatus(String antiConvulsantStatus) {
this.antiConvulsantStatus = antiConvulsantStatus;
}
public String getPriorTherapyRadiationSite() {
return priorTherapyRadiationSite;
}
public void setPriorTherapyRadiationSite(String priorTherapyRadiationSite) {
this.priorTherapyRadiationSite = priorTherapyRadiationSite;
}
public String getPriorTherapyRadiationFractionDose() {
return priorTherapyRadiationFractionDose;
}
public void setPriorTherapyRadiationFractionDose(
String priorTherapyRadiationFractionDose) {
this.priorTherapyRadiationFractionDose = priorTherapyRadiationFractionDose;
}
public String getPriorTherapyRadiationFractionNumber() {
return priorTherapyRadiationFractionNumber;
}
public void setPriorTherapyRadiationFractionNumber(
String priorTherapyRadiationFractionNumber) {
this.priorTherapyRadiationFractionNumber = priorTherapyRadiationFractionNumber;
}
public String getPriorTherapyRadiationType() {
return priorTherapyRadiationType;
}
public void setPriorTherapyRadiationType(String priorTherapyRadiationType) {
this.priorTherapyRadiationType = priorTherapyRadiationType;
}
public String getPriorTherapyChemoAgentName() {
return priorTherapyChemoAgentName;
}
public void setPriorTherapyChemoAgentName(String priorTherapyChemoAgentName) {
this.priorTherapyChemoAgentName = priorTherapyChemoAgentName;
}
public String getPriorTherapyChemoCourseCount() {
return priorTherapyChemoCourseCount;
}
public void setPriorTherapyChemoCourseCount(String priorTherapyChemoCourseCount) {
this.priorTherapyChemoCourseCount = priorTherapyChemoCourseCount;
}
public String getPriorTherapySurgeryProcedureTitle() {
return priorTherapySurgeryProcedureTitle;
}
public void setPriorTherapySurgeryProcedureTitle(
String priorTherapySurgeryProcedureTitle) {
this.priorTherapySurgeryProcedureTitle = priorTherapySurgeryProcedureTitle;
}
public String getPriorTherapySurgeryTumorHistology() {
return priorTherapySurgeryTumorHistology;
}
public void setPriorTherapySurgeryTumorHistology(
String priorTherapySurgeryTumorHistology) {
this.priorTherapySurgeryTumorHistology = priorTherapySurgeryTumorHistology;
}
public String getPriorTherapySurgeryOutcome() {
return priorTherapySurgeryOutcome;
}
public void setPriorTherapySurgeryOutcome(String priorTherapySurgeryOutcome) {
this.priorTherapySurgeryOutcome = priorTherapySurgeryOutcome;
}
public String getOnStudyTherapyRadiationSite() {
return onStudyTherapyRadiationSite;
}
public void setOnStudyTherapyRadiationSite(String onStudyTherapyRadiationSite) {
this.onStudyTherapyRadiationSite = onStudyTherapyRadiationSite;
}
public String getOnStudyTherapyRadiationNeurosisStatus() {
return onStudyTherapyRadiationNeurosisStatus;
}
public void setOnStudyTherapyRadiationNeurosisStatus(
String onStudyTherapyRadiationNeurosisStatus) {
this.onStudyTherapyRadiationNeurosisStatus = onStudyTherapyRadiationNeurosisStatus;
}
public String getOnStudyTherapyRadiationFractionDose() {
return onStudyTherapyRadiationFractionDose;
}
public void setOnStudyTherapyRadiationFractionDose(
String onStudyTherapyRadiationFractionDose) {
this.onStudyTherapyRadiationFractionDose = onStudyTherapyRadiationFractionDose;
}
public String getOnStudyTherapyRadiationFractionNumber() {
return onStudyTherapyRadiationFractionNumber;
}
public void setOnStudyTherapyRadiationFractionNumber(
String onStudyTherapyRadiationFractionNumber) {
this.onStudyTherapyRadiationFractionNumber = onStudyTherapyRadiationFractionNumber;
}
public String getOnStudyTherapyRadiationType() {
return onStudyTherapyRadiationType;
}
public void setOnStudyTherapyRadiationType(String onStudyTherapyRadiationType) {
this.onStudyTherapyRadiationType = onStudyTherapyRadiationType;
}
public String getOnStudyTherapyChemoAgentName() {
return onStudyTherapyChemoAgentName;
}
public void setOnStudyTherapyChemoAgentName(String onStudyTherapyChemoAgentName) {
this.onStudyTherapyChemoAgentName = onStudyTherapyChemoAgentName;
}
public String getOnStudyTherapyChemoCourseCount() {
return onStudyTherapyChemoCourseCount;
}
public void setOnStudyTherapyChemoCourseCount(
String onStudyTherapyChemoCourseCount) {
this.onStudyTherapyChemoCourseCount = onStudyTherapyChemoCourseCount;
}
public String getOnStudyTherapySurgeryProcedureTitle() {
return onStudyTherapySurgeryProcedureTitle;
}
public void setOnStudyTherapySurgeryProcedureTitle(
String onStudyTherapySurgeryProcedureTitle) {
this.onStudyTherapySurgeryProcedureTitle = onStudyTherapySurgeryProcedureTitle;
}
public String getOnStudyTherapySurgeryIndication() {
return onStudyTherapySurgeryIndication;
}
public void setOnStudyTherapySurgeryIndication(
String onStudyTherapySurgeryIndication) {
this.onStudyTherapySurgeryIndication = onStudyTherapySurgeryIndication;
}
public String getOnStudyTherapySurgeryHistoDiagnosis() {
return onStudyTherapySurgeryHistoDiagnosis;
}
public void setOnStudyTherapySurgeryHistoDiagnosis(
String onStudyTherapySurgeryHistoDiagnosis) {
this.onStudyTherapySurgeryHistoDiagnosis = onStudyTherapySurgeryHistoDiagnosis;
}
public String getOnStudyTherapySurgeryOutcome() {
return onStudyTherapySurgeryOutcome;
}
public void setOnStudyTherapySurgeryOutcome(String onStudyTherapySurgeryOutcome) {
this.onStudyTherapySurgeryOutcome = onStudyTherapySurgeryOutcome;
}
}
| added toString method.
SVN-Revision: 5065
| src/java/gov/nih/nci/cma/clinical/RembrandtClinicalReportBean.java | added toString method. | <ide><path>rc/java/gov/nih/nci/cma/clinical/RembrandtClinicalReportBean.java
<ide> package gov.nih.nci.cma.clinical;
<ide>
<ide> public class RembrandtClinicalReportBean {
<add>
<add> private String rptStr = null;
<add>
<ide> private String sampleId;
<ide> private String ageAtDx;
<ide> private String gender;
<ide> private String survivalMonths;
<add> private String survivalLengthRange;
<ide> private String disease;
<ide> private String grade;
<ide> private String race;
<ide> }
<ide> public void setOnStudyTherapySurgeryOutcome(String onStudyTherapySurgeryOutcome) {
<ide> this.onStudyTherapySurgeryOutcome = onStudyTherapySurgeryOutcome;
<add> }
<add> public String getSurvivalLengthRange() {
<add> return survivalLengthRange;
<add> }
<add> public void setSurvivalLengthRange(String survivalLengthRange) {
<add> this.survivalLengthRange = survivalLengthRange;
<ide> }
<add>
<add> public String toString() {
<add>
<add> if (rptStr == null) {
<add>
<add> StringBuffer sb = new StringBuffer();
<add> sb.append(sampleId).append(",");
<add> sb.append(ageAtDx).append(",");
<add> sb.append(gender).append(",");
<add> sb.append(survivalMonths).append(",");
<add> sb.append(survivalLengthRange).append(",");
<add> sb.append(disease).append(",");
<add> sb.append(grade).append(",");
<add> sb.append(race).append(",");
<add> sb.append(institution).append(",");
<add> sb.append(karnofsky).append(",");
<add> sb.append(neurologicalExamOutcome).append(",");
<add> sb.append(mriDesc).append(",");
<add> sb.append(followupMonth).append(",");
<add> sb.append(steroidDoseStatus).append(",");
<add> sb.append(antiConvulsantStatus).append(",");
<add> sb.append(priorTherapyRadiationSite).append(",");
<add> sb.append(priorTherapyRadiationFractionDose).append(",");
<add> sb.append(priorTherapyRadiationFractionNumber).append(",");
<add> sb.append(priorTherapyRadiationType).append(",");
<add> sb.append(priorTherapyChemoAgentName).append(",");
<add> sb.append(priorTherapyChemoCourseCount).append(",");
<add> sb.append(priorTherapySurgeryProcedureTitle).append(",");
<add> sb.append(priorTherapySurgeryTumorHistology).append(",");
<add> sb.append(priorTherapySurgeryOutcome).append(",");
<add> sb.append(onStudyTherapyRadiationSite).append(",");
<add> sb.append(onStudyTherapyRadiationNeurosisStatus).append(",");
<add> sb.append(onStudyTherapyRadiationFractionDose).append(",");
<add> sb.append(onStudyTherapyRadiationFractionNumber).append(",");
<add> sb.append(onStudyTherapyRadiationType).append(",");
<add> sb.append(onStudyTherapyChemoAgentName).append(",");
<add> sb.append(onStudyTherapyChemoCourseCount).append(",");
<add> sb.append(onStudyTherapySurgeryProcedureTitle).append(",");
<add> sb.append(onStudyTherapySurgeryIndication).append(",");
<add> sb.append(onStudyTherapySurgeryHistoDiagnosis).append(",");
<add> sb.append(onStudyTherapySurgeryOutcome);
<add>
<add> rptStr = sb.toString();
<add>
<add> }
<add>
<add> return rptStr;
<add>
<add> }
<add>
<ide> } |
|
JavaScript | mit | 6701c37e63de84c3ee280d1ab471b04533e1aef9 | 0 | phetsims/sun,phetsims/sun,phetsims/sun | // Copyright 2013-2020, University of Colorado Boulder
/**
* Slider, with support for horizontal and vertical orientations. By default, the slider is constructed in the
* horizontal orientation, then adjusted if the vertical orientation was specified.
*
* Note: This type was originally named HSlider, renamed in https://github.com/phetsims/sun/issues/380.
*
* @author Chris Malley (PixelZoom, Inc.)
*/
define( require => {
'use strict';
// modules
const AccessibleSlider = require( 'SUN/accessibility/AccessibleSlider' );
const assertMutuallyExclusiveOptions = require( 'PHET_CORE/assertMutuallyExclusiveOptions' );
const BooleanProperty = require( 'AXON/BooleanProperty' );
const DefaultSliderTrack = require( 'SUN/DefaultSliderTrack' );
const Dimension2 = require( 'DOT/Dimension2' );
const FocusHighlightFromNode = require( 'SCENERY/accessibility/FocusHighlightFromNode' );
const inherit = require( 'PHET_CORE/inherit' );
const InstanceRegistry = require( 'PHET_CORE/documentation/InstanceRegistry' );
const merge = require( 'PHET_CORE/merge' );
const Node = require( 'SCENERY/nodes/Node' );
const Path = require( 'SCENERY/nodes/Path' );
const PhetioObject = require( 'TANDEM/PhetioObject' );
const Property = require( 'AXON/Property' );
const PropertyIO = require( 'AXON/PropertyIO' );
const Range = require( 'DOT/Range' );
const RangeIO = require( 'DOT/RangeIO' );
const Shape = require( 'KITE/Shape' );
const SimpleDragHandler = require( 'SCENERY/input/SimpleDragHandler' );
const SliderIO = require( 'SUN/SliderIO' );
const SliderThumb = require( 'SUN/SliderThumb' );
const sun = require( 'SUN/sun' );
const SunConstants = require( 'SUN/SunConstants' );
const Tandem = require( 'TANDEM/Tandem' );
const Utils = require( 'DOT/Utils' );
// constants
const VERTICAL_ROTATION = -Math.PI / 2;
/**
* @param {Property.<number>} valueProperty
* @param {Range} range
* @param {Object} [options]
* @mixes AccessibleSlider
* @constructor
*/
function Slider( valueProperty, range, options ) {
const self = this;
// Guard against mutually exclusive options before defaults are filled in.
assert && assertMutuallyExclusiveOptions( options, [ 'thumbNode' ], [
'thumbSize', 'thumbFill', 'thumbFillHighlighted', 'thumbStroke', 'thumbLineWidth', 'thumbCenterLineStroke',
'thumbTouchAreaXDilation', 'thumbTouchAreaYDilation', 'thumbMouseAreaXDilation', 'thumbMouseAreaYDilation'
] );
assert && assertMutuallyExclusiveOptions( options, [ 'trackNode' ], [
'trackSize', 'trackFillEnabled', 'trackFillDisabled', 'trackStroke', 'trackLineWidth', 'trackCornerRadius' ] );
options = merge( {
orientation: 'horizontal', // 'horizontal'|'vertical'
// {SliderTrack} optional track, replaces the default.
// Client is responsible for highlighting, disable and pointer areas.
trackNode: null,
// track - options to create a SliderTrack if trackNode not supplied
trackSize: new Dimension2( 100, 5 ),
trackFillEnabled: 'white',
trackFillDisabled: 'gray',
trackStroke: 'black',
trackLineWidth: 1,
trackCornerRadius: 0,
// {Node} optional thumb, replaces the default.
// Client is responsible for highlighting, disabling and pointer areas.
// The thumb is positioned based on its center and hence can have its origin anywhere
thumbNode: null,
// Options for the default thumb, ignored if thumbNode is set
thumbSize: new Dimension2( 17, 34 ),
thumbFill: 'rgb(50,145,184)',
thumbFillHighlighted: 'rgb(71,207,255)',
thumbStroke: 'black',
thumbLineWidth: 1,
thumbCenterLineStroke: 'white',
thumbTouchAreaXDilation: 11,
thumbTouchAreaYDilation: 11,
thumbMouseAreaXDilation: 0,
thumbMouseAreaYDilation: 0,
// Applied to default or supplied thumb
thumbYOffset: 0, // center of the thumb is vertically offset by this amount from the center of the track
// ticks - if adding an option here, make sure it ends up in this.tickOptions
tickLabelSpacing: 6,
majorTickLength: 25,
majorTickStroke: 'black',
majorTickLineWidth: 1,
minorTickLength: 10,
minorTickStroke: 'black',
minorTickLineWidth: 1,
// other
cursor: 'pointer',
startDrag: _.noop, // called when a drag sequence starts
endDrag: _.noop, // called when a drag sequence ends
constrainValue: _.identity, // called before valueProperty is set
enabledProperty: null, // {BooleanProperty|null} determines whether this Slider is enabled
enabledPropertyOptions: null, // {Object|null} options applied to the default enabledProperty
enabledRangeProperty: null, // {Property.<Range>|null} determine the portion of range that is enabled
disabledOpacity: SunConstants.DISABLED_OPACITY, // opacity applied to the entire Slider when disabled
// phet-io
tandem: Tandem.REQUIRED,
phetioType: SliderIO,
phetioComponentOptions: null, // filled in below with PhetioObject.mergePhetioComponentOptions()
// {Property.<number>|null} - if provided, create a LinkedElement for this PhET-iO instrumented Property, instead
// of using the passed in Property. This option was created to support passing DynamicProperty or "wrapping"
// Property that are "implementation details" to the PhET-iO API, and still support having a LinkedElement that
// points to the underlying model Property.
phetioLinkedProperty: null
}, options );
assert && assert( range instanceof Range, 'range must be of type Range:' + range );
assert && assert( options.orientation === 'horizontal' || options.orientation === 'vertical',
'invalid orientation: ' + options.orientation );
assert && assert( !( options.enabledProperty && options.enabledPropertyOptions ),
'enabledProperty and enabledPropertyOptions are mutually exclusive' );
PhetioObject.mergePhetioComponentOptions( {
visibleProperty: { phetioFeatured: true }
}, options );
this.orientation = options.orientation; // @private
Node.call( this );
const ownsEnabledProperty = !options.enabledProperty;
const ownsEnabledRangeProperty = !options.enabledRangeProperty;
if ( assert && Tandem.PHET_IO_ENABLED && !ownsEnabledProperty ) {
this.isPhetioInstrumented() && assert( options.enabledProperty.isPhetioInstrumented(),
'enabledProperty must be instrumented if slider is' );
// This may be too strict long term, but for now, each enabledProperty should be phetioFeatured
assert( options.enabledProperty.phetioFeatured,
'provided enabledProperty must be phetioFeatured' );
}
// phet-io, Assign default options that need tandems.
options.enabledProperty = options.enabledProperty || new BooleanProperty( true, merge( {
tandem: options.tandem.createTandem( 'enabledProperty' ),
phetioFeatured: true
}, options.enabledPropertyOptions ) );
// controls the portion of the slider that is enabled
options.enabledRangeProperty = options.enabledRangeProperty || new Property( range, {
valueType: Range,
isValidValue: value => ( value.min >= range.min && value.max <= range.max ),
tandem: options.tandem.createTandem( 'enabledRangeProperty' ),
phetioType: PropertyIO( RangeIO ),
phetioDocumentation: 'Sliders support two ranges: the outer range which specifies the min and max of the track and ' +
'the enabledRangeProperty, which determines how low and high the thumb can be dragged within the track.'
} );
// @public
this.enabledProperty = options.enabledProperty;
this.enabledRangeProperty = options.enabledRangeProperty;
// @private options needed by prototype functions that add ticks
this.tickOptions = _.pick( options, 'tickLabelSpacing',
'majorTickLength', 'majorTickStroke', 'majorTickLineWidth',
'minorTickLength', 'minorTickStroke', 'minorTickLineWidth' );
const sliderParts = [];
// @private ticks are added to these parents, so they are behind the knob
this.majorTicksParent = new Node();
this.minorTicksParent = new Node();
sliderParts.push( this.majorTicksParent );
sliderParts.push( this.minorTicksParent );
// @private track
this.track = options.trackNode || new DefaultSliderTrack( valueProperty, range, {
// propagate options that are specific to SliderTrack
size: options.trackSize,
fillEnabled: options.trackFillEnabled,
fillDisabled: options.trackFillDisabled,
stroke: options.trackStroke,
lineWidth: options.trackLineWidth,
cornerRadius: options.trackCornerRadius,
startDrag: options.startDrag,
endDrag: options.endDrag,
constrainValue: options.constrainValue,
enabledRangeProperty: this.enabledRangeProperty,
// phet-io
tandem: options.tandem.createTandem( 'track' )
} );
// Position the track horizontally
this.track.centerX = this.track.valueToPosition( ( range.max + range.min ) / 2 );
// The thumb of the slider
const thumb = options.thumbNode || new SliderThumb( {
// propagate options that are specific to SliderThumb
size: options.thumbSize,
fill: options.thumbFill,
fillHighlighted: options.thumbFillHighlighted,
stroke: options.thumbStroke,
lineWidth: options.thumbLineWidth,
centerLineStroke: options.thumbCenterLineStroke,
tandem: options.tandem.createTandem( 'thumb' )
} );
// Dilate the local bounds horizontally so that it extends beyond where the thumb can reach. This prevents layout
// asymmetry when the slider thumb is off the edges of the track. See https://github.com/phetsims/sun/issues/282
this.track.localBounds = this.track.localBounds.dilatedX( thumb.width / 2 );
// Add the track
sliderParts.push( this.track );
// Position the thumb vertically.
thumb.setCenterY( this.track.centerY + options.thumbYOffset );
sliderParts.push( thumb );
// Wrap all of the slider parts in a Node, and set the orientation of that Node.
// This allows us to still decorate the Slider with additional children.
// See https://github.com/phetsims/sun/issues/406
const sliderPartsNode = new Node( { children: sliderParts } );
if ( options.orientation === 'vertical' ) {
sliderPartsNode.rotation = VERTICAL_ROTATION;
}
this.addChild( sliderPartsNode );
// touchArea for the default thumb. If a custom thumb is provided, the client is responsible for its touchArea.
if ( !options.thumbNode && ( options.thumbTouchAreaXDilation || options.thumbTouchAreaYDilation ) ) {
thumb.touchArea = thumb.localBounds.dilatedXY( options.thumbTouchAreaXDilation, options.thumbTouchAreaYDilation );
}
// mouseArea for the default thumb. If a custom thumb is provided, the client is responsible for its mouseArea.
if ( !options.thumbNode && ( options.thumbMouseAreaXDilation || options.thumbMouseAreaYDilation ) ) {
thumb.mouseArea = thumb.localBounds.dilatedXY( options.thumbMouseAreaXDilation, options.thumbMouseAreaYDilation );
}
// update value when thumb is dragged
let clickXOffset = 0; // x-offset between initial click and thumb's origin
const thumbInputListener = new SimpleDragHandler( {
tandem: options.tandem.createTandem( 'thumbInputListener' ),
allowTouchSnag: true,
attach: true,
start: function( event, trail ) {
if ( self.enabledProperty.get() ) {
options.startDrag( event );
const transform = trail.subtrailTo( sliderPartsNode ).getTransform();
// Determine the offset relative to the center of the thumb
clickXOffset = transform.inversePosition2( event.pointer.point ).x - thumb.centerX;
}
},
drag: function( event, trail ) {
if ( self.enabledProperty.get() ) {
const transform = trail.subtrailTo( sliderPartsNode ).getTransform(); // we only want the transform to our parent
const x = transform.inversePosition2( event.pointer.point ).x - clickXOffset;
const newValue = self.track.valueToPosition.inverse( x );
const valueInRange = self.enabledRangeProperty.get().constrainValue( newValue );
valueProperty.set( options.constrainValue( valueInRange ) );
}
},
end: function( event ) {
if ( self.enabledProperty.get() ) {
options.endDrag( event );
}
}
} );
thumb.addInputListener( thumbInputListener );
// enable/disable
const enabledObserver = function( enabled ) {
self.interruptSubtreeInput();
self.pickable = enabled;
self.cursor = enabled ? options.cursor : 'default';
self.opacity = enabled ? 1 : options.disabledOpacity;
};
this.enabledProperty.link( enabledObserver ); // must be unlinked in disposeSlider
// update thumb location when value changes
const valueObserver = function( value ) {
thumb.centerX = self.track.valueToPosition( value );
};
valueProperty.link( valueObserver ); // must be unlinked in disposeSlider
// when the enabled range changes, the value to position linear function must change as well
const enabledRangeObserver = function( enabledRange ) {
// clamp the value to the enabled range if it changes
valueProperty.set( Utils.clamp( valueProperty.value, enabledRange.min, enabledRange.max ) );
};
this.enabledRangeProperty.link( enabledRangeObserver ); // needs to be unlinked in dispose function
this.mutate( options );
// @private Called by dispose
this.disposeSlider = function() {
thumb.dispose && thumb.dispose(); // in case a custom thumb is provided via options.thumbNode that doesn't implement dispose
self.track.dispose();
self.disposeAccessibleSlider();
valueProperty.unlink( valueObserver );
ownsEnabledRangeProperty && self.enabledRangeProperty.dispose();
ownsEnabledProperty && self.enabledProperty.dispose();
thumbInputListener.dispose();
};
// a11y - custom focus highlight that surrounds and moves with the thumb
this.focusHighlight = new FocusHighlightFromNode( thumb );
assert && assert( !options.ariaOrientation, 'Slider sets its own ariaOrientation' );
this.initializeAccessibleSlider( valueProperty, this.enabledRangeProperty, this.enabledProperty,
merge( { ariaOrientation: options.orientation }, options ) );
assert && Tandem.PHET_IO_ENABLED && assert( !options.phetioLinkedProperty || options.phetioLinkedProperty.isPhetioInstrumented(),
'If provided, phetioLinkedProperty should be PhET-iO instrumented' );
this.addLinkedElement( options.phetioLinkedProperty || valueProperty, {
tandem: options.tandem.createTandem( 'valueProperty' )
} );
// support for binder documentation, stripped out in builds and only runs when ?binder is specified
assert && phet.chipper.queryParameters.binder && InstanceRegistry.registerDataURL( 'sun', 'Slider', this );
}
sun.register( 'Slider', Slider );
inherit( Node, Slider, {
// @public - ensures that this object is eligible for GC
dispose: function() {
this.disposeSlider();
Node.prototype.dispose.call( this );
},
/**
* Adds a major tick mark.
* @param {number} value
* @param {Node} [label] optional
* @public
*/
addMajorTick: function( value, label ) {
this.addTick( this.majorTicksParent, value, label,
this.tickOptions.majorTickLength, this.tickOptions.majorTickStroke, this.tickOptions.majorTickLineWidth );
},
/**
* Adds a minor tick mark.
* @param {number} value
* @param {Node} [label] optional
* @public
*/
addMinorTick: function( value, label ) {
this.addTick( this.minorTicksParent, value, label,
this.tickOptions.minorTickLength, this.tickOptions.minorTickStroke, this.tickOptions.minorTickLineWidth );
},
/*
* Adds a tick mark above the track.
* @param {Node} parent
* @param {number} value
* @param {Node} [label] optional
* @param {number} length
* @param {number} stroke
* @param {number} lineWidth
* @private
*/
addTick: function( parent, value, label, length, stroke, lineWidth ) {
const labelX = this.track.valueToPosition( value );
// ticks
const tick = new Path( new Shape()
.moveTo( labelX, this.track.top )
.lineTo( labelX, this.track.top - length ),
{ stroke: stroke, lineWidth: lineWidth } );
parent.addChild( tick );
// label
if ( label ) {
// For a vertical slider, rotate labels opposite the rotation of the slider, so that they appear as expected.
if ( this.orientation === 'vertical' ) {
label.rotation = -VERTICAL_ROTATION;
}
parent.addChild( label );
label.centerX = tick.centerX;
label.bottom = tick.top - this.tickOptions.tickLabelSpacing;
label.pickable = false;
}
},
// @public
setEnabled: function( enabled ) { this.enabledProperty.value = enabled; },
set enabled( value ) { this.setEnabled( value ); },
// @public
getEnabled: function() { return this.enabledProperty.value; },
get enabled() { return this.getEnabled(); },
// @public
setEnabledRange: function( enabledRange ) { this.enabledRangeProperty.value = enabledRange; },
set enabledRange( range ) { this.setEnabledRange( range ); },
// @public
getEnabledRange: function() { return this.enabledRangeProperty.value; },
get enabledRange() { return this.getEnabledRange(); },
// @public - Sets visibility of major ticks.
setMajorTicksVisible: function( visible ) {
this.majorTicksParent.visible = visible;
},
set majorTicksVisible( value ) { this.setMajorTicksVisible( value ); },
// @public - Gets visibility of major ticks.
getMajorTicksVisible: function() {
return this.majorTicksParent.visible;
},
get majorTicksVisible() { return this.getMajorTicksVisible(); },
// @public - Sets visibility of minor ticks.
setMinorTicksVisible: function( visible ) {
this.minorTicksParent.visible = visible;
},
set minorTicksVisible( value ) { this.setMinorTicksVisible( value ); },
// @public - Gets visibility of minor ticks.
getMinorTicksVisible: function() {
return this.minorTicksParent.visible;
},
get minorTicksVisible() { return this.getMinorTicksVisible(); }
} );
// mix accessibility into Slider
AccessibleSlider.mixInto( Slider );
return Slider;
} ); | js/Slider.js | // Copyright 2013-2020, University of Colorado Boulder
/**
* Slider, with support for horizontal and vertical orientations. By default, the slider is constructed in the
* horizontal orientation, then adjusted if the vertical orientation was specified.
*
* Note: This type was originally named HSlider, renamed in https://github.com/phetsims/sun/issues/380.
*
* @author Chris Malley (PixelZoom, Inc.)
*/
define( require => {
'use strict';
// modules
const AccessibleSlider = require( 'SUN/accessibility/AccessibleSlider' );
const assertMutuallyExclusiveOptions = require( 'PHET_CORE/assertMutuallyExclusiveOptions' );
const BooleanProperty = require( 'AXON/BooleanProperty' );
const DefaultSliderTrack = require( 'SUN/DefaultSliderTrack' );
const Dimension2 = require( 'DOT/Dimension2' );
const FocusHighlightFromNode = require( 'SCENERY/accessibility/FocusHighlightFromNode' );
const inherit = require( 'PHET_CORE/inherit' );
const InstanceRegistry = require( 'PHET_CORE/documentation/InstanceRegistry' );
const merge = require( 'PHET_CORE/merge' );
const Node = require( 'SCENERY/nodes/Node' );
const Path = require( 'SCENERY/nodes/Path' );
const PhetioObject = require( 'TANDEM/PhetioObject' );
const Property = require( 'AXON/Property' );
const PropertyIO = require( 'AXON/PropertyIO' );
const Range = require( 'DOT/Range' );
const RangeIO = require( 'DOT/RangeIO' );
const Shape = require( 'KITE/Shape' );
const SimpleDragHandler = require( 'SCENERY/input/SimpleDragHandler' );
const SliderIO = require( 'SUN/SliderIO' );
const SliderThumb = require( 'SUN/SliderThumb' );
const sun = require( 'SUN/sun' );
const SunConstants = require( 'SUN/SunConstants' );
const Tandem = require( 'TANDEM/Tandem' );
const Utils = require( 'DOT/Utils' );
// constants
const VERTICAL_ROTATION = -Math.PI / 2;
/**
* @param {Property.<number>} valueProperty
* @param {Range} range
* @param {Object} [options]
* @mixes AccessibleSlider
* @constructor
*/
function Slider( valueProperty, range, options ) {
const self = this;
// Guard against mutually exclusive options before defaults are filled in.
assert && assertMutuallyExclusiveOptions( options, [ 'thumbNode' ], [
'thumbSize', 'thumbFill', 'thumbFillHighlighted', 'thumbStroke', 'thumbLineWidth', 'thumbCenterLineStroke',
'thumbTouchAreaXDilation', 'thumbTouchAreaYDilation', 'thumbMouseAreaXDilation', 'thumbMouseAreaYDilation'
] );
assert && assertMutuallyExclusiveOptions( options, [ 'trackNode' ], [
'trackSize', 'trackFillEnabled', 'trackFillDisabled', 'trackStroke', 'trackLineWidth', 'trackCornerRadius' ] );
options = merge( {
orientation: 'horizontal', // 'horizontal'|'vertical'
// {SliderTrack} optional track, replaces the default.
// Client is responsible for highlighting, disable and pointer areas.
trackNode: null,
// track - options to create a SliderTrack if trackNode not supplied
trackSize: new Dimension2( 100, 5 ),
trackFillEnabled: 'white',
trackFillDisabled: 'gray',
trackStroke: 'black',
trackLineWidth: 1,
trackCornerRadius: 0,
// {Node} optional thumb, replaces the default.
// Client is responsible for highlighting, disabling and pointer areas.
// The thumb is positioned based on its center and hence can have its origin anywhere
thumbNode: null,
// Options for the default thumb, ignored if thumbNode is set
thumbSize: new Dimension2( 17, 34 ),
thumbFill: 'rgb(50,145,184)',
thumbFillHighlighted: 'rgb(71,207,255)',
thumbStroke: 'black',
thumbLineWidth: 1,
thumbCenterLineStroke: 'white',
thumbTouchAreaXDilation: 11,
thumbTouchAreaYDilation: 11,
thumbMouseAreaXDilation: 0,
thumbMouseAreaYDilation: 0,
// Applied to default or supplied thumb
thumbYOffset: 0, // center of the thumb is vertically offset by this amount from the center of the track
// ticks - if adding an option here, make sure it ends up in this.tickOptions
tickLabelSpacing: 6,
majorTickLength: 25,
majorTickStroke: 'black',
majorTickLineWidth: 1,
minorTickLength: 10,
minorTickStroke: 'black',
minorTickLineWidth: 1,
// other
cursor: 'pointer',
startDrag: _.noop, // called when a drag sequence starts
endDrag: _.noop, // called when a drag sequence ends
constrainValue: _.identity, // called before valueProperty is set
enabledProperty: null, // {BooleanProperty|null} determines whether this Slider is enabled
enabledPropertyOptions: null, // {Object|null} options applied to the default enabledProperty
enabledRangeProperty: null, // {Property.<Range>|null} determine the portion of range that is enabled
disabledOpacity: SunConstants.DISABLED_OPACITY, // opacity applied to the entire Slider when disabled
// phet-io
tandem: Tandem.REQUIRED,
phetioType: SliderIO,
phetioComponentOptions: null, // filled in below with PhetioObject.mergePhetioComponentOptions()
// {Property.<number>|null} - if provided, create a LinkedElement for this PhET-iO instrumented Property, instead
// of using the passed in Property. This option was created to support passing DynamicProperty or "wrapping"
// Property that are "implementation details" to the PhET-iO API, and still support having a LinkedElement that
// points to the underlying model Property.
phetioLinkedProperty: null
}, options );
assert && assert( range instanceof Range, 'range must be of type Range:' + range );
assert && assert( options.orientation === 'horizontal' || options.orientation === 'vertical',
'invalid orientation: ' + options.orientation );
assert && assert( !( options.enabledProperty && options.enabledPropertyOptions ),
'enabledProperty and enabledPropertyOptions are mutually exclusive' );
PhetioObject.mergePhetioComponentOptions( {
visibleProperty: { phetioFeatured: true }
}, options );
this.orientation = options.orientation; // @private
Node.call( this );
const ownsEnabledProperty = !options.enabledProperty;
const ownsEnabledRangeProperty = !options.enabledRangeProperty;
if ( assert && Tandem.PHET_IO_ENABLED && !ownsEnabledProperty ) {
this.isPhetioInstrumented() && assert( options.enabledProperty.isPhetioInstrumented(),
'enabledProperty must be instrumented if slider is' );
// This may be too strict long term, but for now, each enabledProperty should be phetioFeatured
assert( options.enabledProperty.phetioFeatured,
'provided enabledProperty must be phetioFeatured' );
}
// phet-io, Assign default options that need tandems.
options.enabledProperty = options.enabledProperty || new BooleanProperty( true, merge( {
tandem: options.tandem.createTandem( 'enabledProperty' ),
phetioFeatured: true
}, options.enabledPropertyOptions ) );
// controls the portion of the slider that is enabled
options.enabledRangeProperty = options.enabledRangeProperty || new Property( range, {
valueType: Range,
isValidValue: value => ( value.min >= range.min && value.max <= range.max ),
tandem: options.tandem.createTandem( 'enabledRangeProperty' ),
phetioType: PropertyIO( RangeIO )
} );
// @public
this.enabledProperty = options.enabledProperty;
this.enabledRangeProperty = options.enabledRangeProperty;
// @private options needed by prototype functions that add ticks
this.tickOptions = _.pick( options, 'tickLabelSpacing',
'majorTickLength', 'majorTickStroke', 'majorTickLineWidth',
'minorTickLength', 'minorTickStroke', 'minorTickLineWidth' );
const sliderParts = [];
// @private ticks are added to these parents, so they are behind the knob
this.majorTicksParent = new Node();
this.minorTicksParent = new Node();
sliderParts.push( this.majorTicksParent );
sliderParts.push( this.minorTicksParent );
// @private track
this.track = options.trackNode || new DefaultSliderTrack( valueProperty, range, {
// propagate options that are specific to SliderTrack
size: options.trackSize,
fillEnabled: options.trackFillEnabled,
fillDisabled: options.trackFillDisabled,
stroke: options.trackStroke,
lineWidth: options.trackLineWidth,
cornerRadius: options.trackCornerRadius,
startDrag: options.startDrag,
endDrag: options.endDrag,
constrainValue: options.constrainValue,
enabledRangeProperty: this.enabledRangeProperty,
// phet-io
tandem: options.tandem.createTandem( 'track' )
} );
// Position the track horizontally
this.track.centerX = this.track.valueToPosition( ( range.max + range.min ) / 2 );
// The thumb of the slider
const thumb = options.thumbNode || new SliderThumb( {
// propagate options that are specific to SliderThumb
size: options.thumbSize,
fill: options.thumbFill,
fillHighlighted: options.thumbFillHighlighted,
stroke: options.thumbStroke,
lineWidth: options.thumbLineWidth,
centerLineStroke: options.thumbCenterLineStroke,
tandem: options.tandem.createTandem( 'thumb' )
} );
// Dilate the local bounds horizontally so that it extends beyond where the thumb can reach. This prevents layout
// asymmetry when the slider thumb is off the edges of the track. See https://github.com/phetsims/sun/issues/282
this.track.localBounds = this.track.localBounds.dilatedX( thumb.width / 2 );
// Add the track
sliderParts.push( this.track );
// Position the thumb vertically.
thumb.setCenterY( this.track.centerY + options.thumbYOffset );
sliderParts.push( thumb );
// Wrap all of the slider parts in a Node, and set the orientation of that Node.
// This allows us to still decorate the Slider with additional children.
// See https://github.com/phetsims/sun/issues/406
const sliderPartsNode = new Node( { children: sliderParts } );
if ( options.orientation === 'vertical' ) {
sliderPartsNode.rotation = VERTICAL_ROTATION;
}
this.addChild( sliderPartsNode );
// touchArea for the default thumb. If a custom thumb is provided, the client is responsible for its touchArea.
if ( !options.thumbNode && ( options.thumbTouchAreaXDilation || options.thumbTouchAreaYDilation ) ) {
thumb.touchArea = thumb.localBounds.dilatedXY( options.thumbTouchAreaXDilation, options.thumbTouchAreaYDilation );
}
// mouseArea for the default thumb. If a custom thumb is provided, the client is responsible for its mouseArea.
if ( !options.thumbNode && ( options.thumbMouseAreaXDilation || options.thumbMouseAreaYDilation ) ) {
thumb.mouseArea = thumb.localBounds.dilatedXY( options.thumbMouseAreaXDilation, options.thumbMouseAreaYDilation );
}
// update value when thumb is dragged
let clickXOffset = 0; // x-offset between initial click and thumb's origin
const thumbInputListener = new SimpleDragHandler( {
tandem: options.tandem.createTandem( 'thumbInputListener' ),
allowTouchSnag: true,
attach: true,
start: function( event, trail ) {
if ( self.enabledProperty.get() ) {
options.startDrag( event );
const transform = trail.subtrailTo( sliderPartsNode ).getTransform();
// Determine the offset relative to the center of the thumb
clickXOffset = transform.inversePosition2( event.pointer.point ).x - thumb.centerX;
}
},
drag: function( event, trail ) {
if ( self.enabledProperty.get() ) {
const transform = trail.subtrailTo( sliderPartsNode ).getTransform(); // we only want the transform to our parent
const x = transform.inversePosition2( event.pointer.point ).x - clickXOffset;
const newValue = self.track.valueToPosition.inverse( x );
const valueInRange = self.enabledRangeProperty.get().constrainValue( newValue );
valueProperty.set( options.constrainValue( valueInRange ) );
}
},
end: function( event ) {
if ( self.enabledProperty.get() ) {
options.endDrag( event );
}
}
} );
thumb.addInputListener( thumbInputListener );
// enable/disable
const enabledObserver = function( enabled ) {
self.interruptSubtreeInput();
self.pickable = enabled;
self.cursor = enabled ? options.cursor : 'default';
self.opacity = enabled ? 1 : options.disabledOpacity;
};
this.enabledProperty.link( enabledObserver ); // must be unlinked in disposeSlider
// update thumb location when value changes
const valueObserver = function( value ) {
thumb.centerX = self.track.valueToPosition( value );
};
valueProperty.link( valueObserver ); // must be unlinked in disposeSlider
// when the enabled range changes, the value to position linear function must change as well
const enabledRangeObserver = function( enabledRange ) {
// clamp the value to the enabled range if it changes
valueProperty.set( Utils.clamp( valueProperty.value, enabledRange.min, enabledRange.max ) );
};
this.enabledRangeProperty.link( enabledRangeObserver ); // needs to be unlinked in dispose function
this.mutate( options );
// @private Called by dispose
this.disposeSlider = function() {
thumb.dispose && thumb.dispose(); // in case a custom thumb is provided via options.thumbNode that doesn't implement dispose
self.track.dispose();
self.disposeAccessibleSlider();
valueProperty.unlink( valueObserver );
ownsEnabledRangeProperty && self.enabledRangeProperty.dispose();
ownsEnabledProperty && self.enabledProperty.dispose();
thumbInputListener.dispose();
};
// a11y - custom focus highlight that surrounds and moves with the thumb
this.focusHighlight = new FocusHighlightFromNode( thumb );
assert && assert( !options.ariaOrientation, 'Slider sets its own ariaOrientation' );
this.initializeAccessibleSlider( valueProperty, this.enabledRangeProperty, this.enabledProperty,
merge( { ariaOrientation: options.orientation }, options ) );
assert && Tandem.PHET_IO_ENABLED && assert( !options.phetioLinkedProperty || options.phetioLinkedProperty.isPhetioInstrumented(),
'If provided, phetioLinkedProperty should be PhET-iO instrumented' );
this.addLinkedElement( options.phetioLinkedProperty || valueProperty, {
tandem: options.tandem.createTandem( 'valueProperty' )
} );
// support for binder documentation, stripped out in builds and only runs when ?binder is specified
assert && phet.chipper.queryParameters.binder && InstanceRegistry.registerDataURL( 'sun', 'Slider', this );
}
sun.register( 'Slider', Slider );
inherit( Node, Slider, {
// @public - ensures that this object is eligible for GC
dispose: function() {
this.disposeSlider();
Node.prototype.dispose.call( this );
},
/**
* Adds a major tick mark.
* @param {number} value
* @param {Node} [label] optional
* @public
*/
addMajorTick: function( value, label ) {
this.addTick( this.majorTicksParent, value, label,
this.tickOptions.majorTickLength, this.tickOptions.majorTickStroke, this.tickOptions.majorTickLineWidth );
},
/**
* Adds a minor tick mark.
* @param {number} value
* @param {Node} [label] optional
* @public
*/
addMinorTick: function( value, label ) {
this.addTick( this.minorTicksParent, value, label,
this.tickOptions.minorTickLength, this.tickOptions.minorTickStroke, this.tickOptions.minorTickLineWidth );
},
/*
* Adds a tick mark above the track.
* @param {Node} parent
* @param {number} value
* @param {Node} [label] optional
* @param {number} length
* @param {number} stroke
* @param {number} lineWidth
* @private
*/
addTick: function( parent, value, label, length, stroke, lineWidth ) {
const labelX = this.track.valueToPosition( value );
// ticks
const tick = new Path( new Shape()
.moveTo( labelX, this.track.top )
.lineTo( labelX, this.track.top - length ),
{ stroke: stroke, lineWidth: lineWidth } );
parent.addChild( tick );
// label
if ( label ) {
// For a vertical slider, rotate labels opposite the rotation of the slider, so that they appear as expected.
if ( this.orientation === 'vertical' ) {
label.rotation = -VERTICAL_ROTATION;
}
parent.addChild( label );
label.centerX = tick.centerX;
label.bottom = tick.top - this.tickOptions.tickLabelSpacing;
label.pickable = false;
}
},
// @public
setEnabled: function( enabled ) { this.enabledProperty.value = enabled; },
set enabled( value ) { this.setEnabled( value ); },
// @public
getEnabled: function() { return this.enabledProperty.value; },
get enabled() { return this.getEnabled(); },
// @public
setEnabledRange: function( enabledRange ) { this.enabledRangeProperty.value = enabledRange; },
set enabledRange( range ) { this.setEnabledRange( range ); },
// @public
getEnabledRange: function() { return this.enabledRangeProperty.value; },
get enabledRange() { return this.getEnabledRange(); },
// @public - Sets visibility of major ticks.
setMajorTicksVisible: function( visible ) {
this.majorTicksParent.visible = visible;
},
set majorTicksVisible( value ) { this.setMajorTicksVisible( value ); },
// @public - Gets visibility of major ticks.
getMajorTicksVisible: function() {
return this.majorTicksParent.visible;
},
get majorTicksVisible() { return this.getMajorTicksVisible(); },
// @public - Sets visibility of minor ticks.
setMinorTicksVisible: function( visible ) {
this.minorTicksParent.visible = visible;
},
set minorTicksVisible( value ) { this.setMinorTicksVisible( value ); },
// @public - Gets visibility of minor ticks.
getMinorTicksVisible: function() {
return this.minorTicksParent.visible;
},
get minorTicksVisible() { return this.getMinorTicksVisible(); }
} );
// mix accessibility into Slider
AccessibleSlider.mixInto( Slider );
return Slider;
} ); | Update phetioDocumentation, see https://github.com/phetsims/gravity-and-orbits/issues/293
| js/Slider.js | Update phetioDocumentation, see https://github.com/phetsims/gravity-and-orbits/issues/293 | <ide><path>s/Slider.js
<ide> valueType: Range,
<ide> isValidValue: value => ( value.min >= range.min && value.max <= range.max ),
<ide> tandem: options.tandem.createTandem( 'enabledRangeProperty' ),
<del> phetioType: PropertyIO( RangeIO )
<add> phetioType: PropertyIO( RangeIO ),
<add> phetioDocumentation: 'Sliders support two ranges: the outer range which specifies the min and max of the track and ' +
<add> 'the enabledRangeProperty, which determines how low and high the thumb can be dragged within the track.'
<ide> } );
<ide>
<ide> // @public |
|
Java | apache-2.0 | d0361dca8719c3441e29223eed910ec316362ce7 | 0 | google/closure-compiler,vobruba-martin/closure-compiler,tdelmas/closure-compiler,google/closure-compiler,mprobst/closure-compiler,ChadKillingsworth/closure-compiler,nawawi/closure-compiler,monetate/closure-compiler,tiobe/closure-compiler,monetate/closure-compiler,vobruba-martin/closure-compiler,tiobe/closure-compiler,tdelmas/closure-compiler,nawawi/closure-compiler,Yannic/closure-compiler,monetate/closure-compiler,mprobst/closure-compiler,google/closure-compiler,vobruba-martin/closure-compiler,tdelmas/closure-compiler,monetate/closure-compiler,tdelmas/closure-compiler,google/closure-compiler,tiobe/closure-compiler,shantanusharma/closure-compiler,Yannic/closure-compiler,mprobst/closure-compiler,ChadKillingsworth/closure-compiler,ChadKillingsworth/closure-compiler,Yannic/closure-compiler,tiobe/closure-compiler,ChadKillingsworth/closure-compiler,nawawi/closure-compiler,vobruba-martin/closure-compiler,mprobst/closure-compiler,shantanusharma/closure-compiler,shantanusharma/closure-compiler,Yannic/closure-compiler,nawawi/closure-compiler,shantanusharma/closure-compiler | /*
* Copyright 2009 The Closure Compiler 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 com.google.javascript.jscomp;
import static com.google.common.base.Preconditions.checkArgument;
import static com.google.common.base.Preconditions.checkNotNull;
import static com.google.common.base.Preconditions.checkState;
import static com.google.javascript.jscomp.PassFactory.createEmptyPass;
import static com.google.javascript.jscomp.parsing.parser.FeatureSet.ES5;
import static com.google.javascript.jscomp.parsing.parser.FeatureSet.ES6;
import static com.google.javascript.jscomp.parsing.parser.FeatureSet.ES7;
import static com.google.javascript.jscomp.parsing.parser.FeatureSet.ES8;
import static com.google.javascript.jscomp.parsing.parser.FeatureSet.ES8_MODULES;
import static com.google.javascript.jscomp.parsing.parser.FeatureSet.TYPESCRIPT;
import com.google.common.annotations.VisibleForTesting;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import com.google.javascript.jscomp.AbstractCompiler.LifeCycleStage;
import com.google.javascript.jscomp.AbstractCompiler.MostRecentTypechecker;
import com.google.javascript.jscomp.CompilerOptions.ExtractPrototypeMemberDeclarationsMode;
import com.google.javascript.jscomp.CoverageInstrumentationPass.CoverageReach;
import com.google.javascript.jscomp.CoverageInstrumentationPass.InstrumentOption;
import com.google.javascript.jscomp.ExtractPrototypeMemberDeclarations.Pattern;
import com.google.javascript.jscomp.NodeTraversal.Callback;
import com.google.javascript.jscomp.PassFactory.HotSwapPassFactory;
import com.google.javascript.jscomp.lint.CheckArrayWithGoogObject;
import com.google.javascript.jscomp.lint.CheckDuplicateCase;
import com.google.javascript.jscomp.lint.CheckEmptyStatements;
import com.google.javascript.jscomp.lint.CheckEnums;
import com.google.javascript.jscomp.lint.CheckInterfaces;
import com.google.javascript.jscomp.lint.CheckJSDocStyle;
import com.google.javascript.jscomp.lint.CheckMissingSemicolon;
import com.google.javascript.jscomp.lint.CheckNullableReturn;
import com.google.javascript.jscomp.lint.CheckPrimitiveAsObject;
import com.google.javascript.jscomp.lint.CheckPrototypeProperties;
import com.google.javascript.jscomp.lint.CheckRequiresAndProvidesSorted;
import com.google.javascript.jscomp.lint.CheckUnusedLabels;
import com.google.javascript.jscomp.lint.CheckUselessBlocks;
import com.google.javascript.jscomp.parsing.ParserRunner;
import com.google.javascript.jscomp.parsing.parser.FeatureSet;
import com.google.javascript.rhino.IR;
import com.google.javascript.rhino.Node;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
/**
* Pass factories and meta-data for native JSCompiler passes.
*
* @author [email protected] (Nick Santos)
*
* NOTE(dimvar): this needs some non-trivial refactoring. The pass config should
* use as little state as possible. The recommended way for a pass to leave
* behind some state for a subsequent pass is through the compiler object.
* Any other state remaining here should only be used when the pass config is
* creating the list of checks and optimizations, not after passes have started
* executing. For example, the field namespaceForChecks should be in Compiler.
*/
public final class DefaultPassConfig extends PassConfig {
/* For the --mark-as-compiled pass */
private static final String COMPILED_CONSTANT_NAME = "COMPILED";
/* Constant name for Closure's locale */
private static final String CLOSURE_LOCALE_CONSTANT_NAME = "goog.LOCALE";
static final DiagnosticType CANNOT_USE_PROTOTYPE_AND_VAR =
DiagnosticType.error("JSC_CANNOT_USE_PROTOTYPE_AND_VAR",
"Rename prototypes and inline variables cannot be used together.");
// Miscellaneous errors.
private static final java.util.regex.Pattern GLOBAL_SYMBOL_NAMESPACE_PATTERN =
java.util.regex.Pattern.compile("^[a-zA-Z0-9$_]+$");
/**
* A global namespace to share across checking passes.
*/
private transient GlobalNamespace namespaceForChecks = null;
/**
* A symbol table for registering references that get removed during
* preprocessing.
*/
private transient PreprocessorSymbolTable preprocessorSymbolTable = null;
/**
* Global state necessary for doing hotswap recompilation of files with references to
* processed goog.modules.
*/
private transient ClosureRewriteModule.GlobalRewriteState moduleRewriteState = null;
/**
* Whether to protect "hidden" side-effects.
* @see CheckSideEffects
*/
private final boolean protectHiddenSideEffects;
public DefaultPassConfig(CompilerOptions options) {
super(options);
// The current approach to protecting "hidden" side-effects is to
// wrap them in a function call that is stripped later, this shouldn't
// be done in IDE mode where AST changes may be unexpected.
protectHiddenSideEffects = options != null && options.shouldProtectHiddenSideEffects();
}
GlobalNamespace getGlobalNamespace() {
return namespaceForChecks;
}
PreprocessorSymbolTable getPreprocessorSymbolTable() {
return preprocessorSymbolTable;
}
void maybeInitializePreprocessorSymbolTable(AbstractCompiler compiler) {
if (options.preservesDetailedSourceInfo()) {
Node root = compiler.getRoot();
if (preprocessorSymbolTable == null || preprocessorSymbolTable.getRootNode() != root) {
preprocessorSymbolTable = new PreprocessorSymbolTable(root);
}
}
}
void maybeInitializeModuleRewriteState() {
if (options.allowsHotswapReplaceScript() && this.moduleRewriteState == null) {
this.moduleRewriteState = new ClosureRewriteModule.GlobalRewriteState();
}
}
@Override
protected List<PassFactory> getTranspileOnlyPasses() {
List<PassFactory> passes = new ArrayList<>();
if (options.needsTranspilationFrom(TYPESCRIPT)) {
passes.add(convertEs6TypedToEs6);
}
if (options.getLanguageIn().toFeatureSet().has(FeatureSet.Feature.MODULES)) {
TranspilationPasses.addEs6ModulePass(passes);
}
passes.add(checkMissingSuper);
passes.add(checkVariableReferencesForTranspileOnly);
// It's important that the Dart super accessors pass run *before* es6ConvertSuper,
// which is a "late" ES6 pass. This is enforced in the assertValidOrder method.
if (options.dartPass && options.needsTranspilationFrom(ES6)) {
passes.add(dartSuperAccessorsPass);
}
if (options.needsTranspilationFrom(ES8)) {
TranspilationPasses.addEs2017Passes(passes);
passes.add(setFeatureSet(ES7));
}
if (options.needsTranspilationFrom(ES7)) {
TranspilationPasses.addEs2016Passes(passes);
passes.add(setFeatureSet(ES6));
}
// If the user has specified an input language of ES7 and an output language of ES6 or lower,
// we still need to run these "ES6" passes, because they do the transpilation of the ES7 **
// operator. If we split that into its own pass then the needsTranspilationFrom(ES7) call here
// can be removed.
if (options.needsTranspilationFrom(ES6) || options.needsTranspilationFrom(ES7)) {
TranspilationPasses.addEs6EarlyPasses(passes);
TranspilationPasses.addEs6LatePasses(passes);
TranspilationPasses.addPostCheckPasses(passes);
if (options.rewritePolyfills) {
TranspilationPasses.addRewritePolyfillPass(passes);
}
passes.add(setFeatureSet(options.getLanguageOut().toFeatureSet()));
}
if (!options.forceLibraryInjection.isEmpty()) {
passes.add(injectRuntimeLibraries);
}
assertAllOneTimePasses(passes);
assertValidOrderForChecks(passes);
return passes;
}
@Override
protected List<PassFactory> getWhitespaceOnlyPasses() {
List<PassFactory> passes = new ArrayList<>();
if (options.wrapGoogModulesForWhitespaceOnly) {
passes.add(whitespaceWrapGoogModules);
}
return passes;
}
private void addNewTypeCheckerPasses(List<PassFactory> checks, CompilerOptions options) {
if (options.getNewTypeInference()) {
checks.add(symbolTableForNewTypeInference);
checks.add(newTypeInference);
}
}
private void addOldTypeCheckerPasses(List<PassFactory> checks, CompilerOptions options) {
if (!options.allowsHotswapReplaceScript()) {
checks.add(inlineTypeAliases);
}
if (options.checkTypes || options.inferTypes) {
checks.add(resolveTypes);
checks.add(inferTypes);
if (options.checkTypes) {
checks.add(checkTypes);
} else {
checks.add(inferJsDocInfo);
}
// We assume that only clients who are going to re-compile, or do in-depth static analysis,
// will need the typed scope creator after the compile job.
if (!options.preservesDetailedSourceInfo() && !options.allowsHotswapReplaceScript()) {
checks.add(clearTypedScopePass);
}
}
}
@Override
protected List<PassFactory> getChecks() {
List<PassFactory> checks = new ArrayList<>();
if (options.shouldGenerateTypedExterns()) {
checks.add(closureGoogScopeAliases);
checks.add(closureRewriteClass);
checks.add(generateIjs);
checks.add(whitespaceWrapGoogModules);
return checks;
}
checks.add(createEmptyPass("beforeStandardChecks"));
// Note: ChromePass can rewrite invalid @type annotations into valid ones, so should run before
// JsDoc checks.
if (options.isChromePassEnabled()) {
checks.add(chromePass);
}
// Verify JsDoc annotations and check ES6 modules
checks.add(checkJsDocAndEs6Modules);
if (options.needsTranspilationFrom(TYPESCRIPT)) {
checks.add(convertEs6TypedToEs6);
}
if (options.enables(DiagnosticGroups.LINT_CHECKS)) {
checks.add(lintChecks);
}
if (options.closurePass && options.enables(DiagnosticGroups.LINT_CHECKS)) {
checks.add(checkRequiresAndProvidesSorted);
}
if (options.enables(DiagnosticGroups.MISSING_REQUIRE)
|| options.enables(DiagnosticGroups.STRICT_MISSING_REQUIRE)
|| options.enables(DiagnosticGroups.EXTRA_REQUIRE)) {
checks.add(checkRequires);
}
if (options.getLanguageIn().toFeatureSet().has(FeatureSet.Feature.MODULES)) {
TranspilationPasses.addEs6ModulePass(checks);
}
checks.add(checkVariableReferences);
checks.add(checkStrictMode);
if (options.closurePass) {
checks.add(closureCheckModule);
checks.add(closureRewriteModule);
}
if (options.declaredGlobalExternsOnWindow) {
checks.add(declaredGlobalExternsOnWindow);
}
checks.add(checkMissingSuper);
if (options.closurePass) {
checks.add(closureGoogScopeAliases);
checks.add(closureRewriteClass);
}
checks.add(checkSideEffects);
if (options.enables(DiagnosticGroups.MISSING_PROVIDE)) {
checks.add(checkProvides);
}
if (options.angularPass) {
checks.add(angularPass);
}
if (!options.generateExportsAfterTypeChecking && options.generateExports) {
checks.add(generateExports);
}
if (options.exportTestFunctions) {
checks.add(exportTestFunctions);
}
if (options.closurePass) {
checks.add(closurePrimitives);
}
// It's important that the PolymerPass run *after* the ClosurePrimitives and ChromePass rewrites
// and *before* the suspicious code checks. This is enforced in the assertValidOrder method.
if (options.polymerVersion != null) {
checks.add(polymerPass);
}
if (options.checkSuspiciousCode
|| options.enables(DiagnosticGroups.GLOBAL_THIS)
|| options.enables(DiagnosticGroups.DEBUGGER_STATEMENT_PRESENT)) {
checks.add(suspiciousCode);
}
if (options.closurePass && options.checkMissingGetCssNameLevel.isOn()) {
checks.add(closureCheckGetCssName);
}
if (options.syntheticBlockStartMarker != null) {
// This pass must run before the first fold constants pass.
checks.add(createSyntheticBlocks);
}
checks.add(checkVars);
if (options.inferConsts) {
checks.add(inferConsts);
}
if (options.computeFunctionSideEffects) {
checks.add(checkRegExp);
}
// This pass should run before types are assigned.
if (options.processObjectPropertyString) {
checks.add(objectPropertyStringPreprocess);
}
// It's important that the Dart super accessors pass run *before* es6ConvertSuper,
// which is a "late" ES6 pass. This is enforced in the assertValidOrder method.
if (options.dartPass && !options.getLanguageOut().toFeatureSet().contains(FeatureSet.ES6)) {
checks.add(dartSuperAccessorsPass);
}
if (options.needsTranspilationFrom(ES8)) {
TranspilationPasses.addEs2017Passes(checks);
checks.add(setFeatureSet(ES7));
}
if (options.needsTranspilationFrom(ES7) && !options.getTypeCheckEs6Natively()) {
TranspilationPasses.addEs2016Passes(checks);
checks.add(setFeatureSet(ES6));
}
if (options.needsTranspilationFrom(ES6)) {
checks.add(es6ExternsCheck);
TranspilationPasses.addEs6EarlyPasses(checks);
}
if (options.needsTranspilationFrom(ES6)) {
if (options.getTypeCheckEs6Natively()) {
TranspilationPasses.addEs6PassesBeforeNTI(checks);
} else {
TranspilationPasses.addEs6LatePasses(checks);
}
}
if (options.rewritePolyfills) {
TranspilationPasses.addRewritePolyfillPass(checks);
}
if (options.needsTranspilationFrom(ES6)) {
if (options.getTypeCheckEs6Natively()) {
checks.add(setFeatureSet(FeatureSet.NTI_SUPPORTED));
} else {
// TODO(bradfordcsmith): This marking is really about how variable scoping is handled during
// type checking. It should really be handled in a more direct fashion.
checks.add(setFeatureSet(options.getLanguageOut().toFeatureSet()));
}
}
if (!options.forceLibraryInjection.isEmpty()) {
checks.add(injectRuntimeLibraries);
}
if (options.needsTranspilationFrom(ES6)) {
checks.add(convertStaticInheritance);
}
// End of ES6 transpilation passes before NTI.
if (options.getTypeCheckEs6Natively()) {
if (!options.skipNonTranspilationPasses) {
checks.add(createEmptyPass(PassNames.BEFORE_TYPE_CHECKING));
addNewTypeCheckerPasses(checks, options);
}
if (options.needsTranspilationFrom(ES7)) {
TranspilationPasses.addEs2016Passes(checks);
checks.add(setFeatureSet(ES6));
}
if (options.needsTranspilationFrom(ES6)) {
TranspilationPasses.addEs6PassesAfterNTI(checks);
checks.add(setFeatureSet(options.getLanguageOut().toFeatureSet()));
}
}
if (!options.skipNonTranspilationPasses) {
addNonTranspilationCheckPasses(checks);
}
if (options.needsTranspilationFrom(ES6) && !options.inIncrementalCheckMode()) {
TranspilationPasses.addPostCheckPasses(checks);
}
// NOTE(dimvar): Tried to move this into the optimizations, but had to back off
// because the very first pass, normalization, rewrites the code in a way that
// causes loss of type information.
// So, I will convert the remaining optimizations to use TypeI and test that only
// in unit tests, not full builds. Once all passes are converted, then
// drop the OTI-after-NTI altogether.
// In addition, I will probably have a local edit of the repo that retains both
// types on Nodes, so I can test full builds on my machine. We can't check in such
// a change because it would greatly increase memory usage.
if (options.getNewTypeInference() && options.getRunOTIafterNTI()) {
addOldTypeCheckerPasses(checks, options);
}
// When options.generateExportsAfterTypeChecking is true, run GenerateExports after
// both type checkers, not just after NTI.
if (options.generateExportsAfterTypeChecking && options.generateExports) {
checks.add(generateExports);
}
checks.add(createEmptyPass(PassNames.AFTER_STANDARD_CHECKS));
assertAllOneTimePasses(checks);
assertValidOrderForChecks(checks);
return checks;
}
private void addNonTranspilationCheckPasses(List<PassFactory> checks) {
if (!options.getTypeCheckEs6Natively()) {
checks.add(createEmptyPass(PassNames.BEFORE_TYPE_CHECKING));
addNewTypeCheckerPasses(checks, options);
}
if (options.j2clPassMode.shouldAddJ2clPasses()) {
checks.add(j2clSourceFileChecker);
}
if (!options.getNewTypeInference()) {
addOldTypeCheckerPasses(checks, options);
}
if (!options.disables(DiagnosticGroups.CHECK_USELESS_CODE)
|| (!options.getNewTypeInference() && !options.disables(DiagnosticGroups.MISSING_RETURN))) {
checks.add(checkControlFlow);
}
// CheckAccessControls only works if check types is on.
if (options.isTypecheckingEnabled()
&& (!options.disables(DiagnosticGroups.ACCESS_CONTROLS)
|| options.enables(DiagnosticGroups.CONSTANT_PROPERTY))) {
checks.add(checkAccessControls);
}
if (!options.getNewTypeInference()) {
// NTI performs this check already
checks.add(checkConsts);
}
// Analyzer checks must be run after typechecking.
if (options.enables(DiagnosticGroups.ANALYZER_CHECKS) && options.isTypecheckingEnabled()) {
checks.add(analyzerChecks);
}
if (options.checkGlobalNamesLevel.isOn()) {
checks.add(checkGlobalNames);
}
if (!options.getConformanceConfigs().isEmpty()) {
checks.add(checkConformance);
}
// Replace 'goog.getCssName' before processing defines but after the
// other checks have been done.
if (options.closurePass) {
checks.add(closureReplaceGetCssName);
}
if (options.getTweakProcessing().isOn()) {
checks.add(processTweaks);
}
if (options.instrumentationTemplate != null || options.recordFunctionInformation) {
checks.add(computeFunctionNames);
}
if (options.checksOnly) {
// Run process defines here so that warnings/errors from that pass are emitted as part of
// checks.
// TODO(rluble): Split process defines into two stages, one that performs only checks to be
// run here, and the one that actually changes the AST that would run in the optimization
// phase.
checks.add(processDefines);
}
if (options.j2clPassMode.shouldAddJ2clPasses()) {
checks.add(j2clChecksPass);
}
}
@Override
protected List<PassFactory> getOptimizations() {
List<PassFactory> passes = new ArrayList<>();
if (options.skipNonTranspilationPasses) {
return passes;
}
passes.add(garbageCollectChecks);
// i18n
// If you want to customize the compiler to use a different i18n pass,
// you can create a PassConfig that calls replacePassFactory
// to replace this.
if (options.replaceMessagesWithChromeI18n) {
passes.add(replaceMessagesForChrome);
} else if (options.messageBundle != null) {
passes.add(replaceMessages);
}
// Defines in code always need to be processed.
passes.add(processDefines);
if (options.getTweakProcessing().shouldStrip()
|| !options.stripTypes.isEmpty()
|| !options.stripNameSuffixes.isEmpty()
|| !options.stripTypePrefixes.isEmpty()
|| !options.stripNamePrefixes.isEmpty()) {
passes.add(stripCode);
}
passes.add(normalize);
// Create extern exports after the normalize because externExports depends on unique names.
if (options.isExternExportsEnabled() || options.externExportsPath != null) {
passes.add(externExports);
}
// Gather property names in externs so they can be queried by the
// optimizing passes.
passes.add(gatherExternProperties);
if (options.instrumentForCoverage) {
passes.add(instrumentForCodeCoverage);
}
// TODO(dimvar): convert this pass to use NTI. Low priority since it's
// mostly unused. Converting it shouldn't block switching to NTI.
if (options.runtimeTypeCheck && !options.getNewTypeInference()) {
passes.add(runtimeTypeCheck);
}
// Inlines functions that perform dynamic accesses to static properties of parameters that are
// typed as {Function}. This turns a dynamic access to a static property of a class definition
// into a fully qualified access and in so doing enables better dead code stripping.
if (options.j2clPassMode.shouldAddJ2clPasses()) {
passes.add(j2clPass);
}
passes.add(createEmptyPass(PassNames.BEFORE_STANDARD_OPTIMIZATIONS));
if (options.replaceIdGenerators) {
passes.add(replaceIdGenerators);
}
// Optimizes references to the arguments variable.
if (options.optimizeArgumentsArray) {
passes.add(optimizeArgumentsArray);
}
// Abstract method removal works best on minimally modified code, and also
// only needs to run once.
if (options.closurePass && (options.removeAbstractMethods || options.removeClosureAsserts)) {
passes.add(closureCodeRemoval);
}
if (options.removeJ2clAsserts) {
passes.add(j2clAssertRemovalPass);
}
// Property disambiguation should only run once and needs to be done
// soon after type checking, both so that it can make use of type
// information and so that other passes can take advantage of the renamed
// properties.
if (options.disambiguatePrivateProperties) {
passes.add(disambiguatePrivateProperties);
}
assertAllOneTimePasses(passes);
// Inline aliases so that following optimizations don't have to understand alias chains.
if (options.collapseProperties) {
passes.add(aggressiveInlineAliases);
}
// Inline getters/setters in J2CL classes so that Object.defineProperties() calls (resulting
// from desugaring) don't block class stripping.
if (options.j2clPassMode.shouldAddJ2clPasses() && options.collapseProperties) {
// Relies on collapseProperties-triggered aggressive alias inlining.
passes.add(j2clPropertyInlinerPass);
}
// Collapsing properties can undo constant inlining, so we do this before
// the main optimization loop.
if (options.collapseProperties) {
passes.add(collapseProperties);
}
if (options.inferConsts) {
passes.add(inferConsts);
}
if (options.reportPath != null && options.smartNameRemoval) {
passes.add(initNameAnalyzeReport);
}
// TODO(mlourenco): Ideally this would be in getChecks() instead of getOptimizations(). But
// for that it needs to understand constant properties as well. See b/31301233#10.
// Needs to happen after inferConsts and collapseProperties. Detects whether invocations of
// the method goog.string.Const.from are done with an argument which is a string literal.
passes.add(checkConstParams);
// Running smart name removal before disambiguate properties allows disambiguate properties
// to be more effective if code that would prevent disambiguation can be removed.
if (options.extraSmartNameRemoval && options.smartNameRemoval) {
// These passes remove code that is dead because of define flags.
// If the dead code is weakly typed, running these passes before property
// disambiguation results in more code removal.
// The passes are one-time on purpose. (The later runs are loopable.)
if (options.foldConstants && (options.inlineVariables || options.inlineLocalVariables)) {
passes.add(earlyInlineVariables);
passes.add(earlyPeepholeOptimizations);
}
passes.add(extraSmartNamePass);
}
// RewritePolyfills is overly generous in the polyfills it adds. After type
// checking and early smart name removal, we can use the new type information
// to figure out which polyfilled prototype methods are actually called, and
// which were "false alarms" (i.e. calling a method of the same name on a
// user-provided class). We also remove any polyfills added by code that
// was smart-name-removed. This is a one-time pass, since it does not work
// after inlining - we do not attempt to aggressively remove polyfills used
// by code that is only flow-sensitively dead.
if (options.rewritePolyfills) {
passes.add(removeUnusedPolyfills);
}
// Property disambiguation should only run once and needs to be done
// soon after type checking, both so that it can make use of type
// information and so that other passes can take advantage of the renamed
// properties.
if (options.shouldDisambiguateProperties() && options.isTypecheckingEnabled()) {
passes.add(disambiguateProperties);
}
if (options.computeFunctionSideEffects) {
passes.add(markPureFunctions);
} else if (options.markNoSideEffectCalls) {
// TODO(user) The properties that this pass adds to CALL and NEW
// AST nodes increase the AST's in-memory size. Given that we are
// already running close to our memory limits, we could run into
// trouble if we end up using the @nosideeffects annotation a lot
// or compute @nosideeffects annotations by looking at function
// bodies. It should be easy to propagate @nosideeffects
// annotations as part of passes that depend on this property and
// store the result outside the AST (which would allow garbage
// collection once the pass is done).
passes.add(markNoSideEffectCalls);
}
if (options.chainCalls) {
passes.add(chainCalls);
}
if (options.smartNameRemoval || options.reportPath != null) {
passes.addAll(getCodeRemovingPasses());
passes.add(smartNamePass);
}
// This needs to come after the inline constants pass, which is run within
// the code removing passes.
if (options.closurePass) {
passes.add(closureOptimizePrimitives);
}
// ReplaceStrings runs after CollapseProperties in order to simplify
// pulling in values of constants defined in enums structures. It also runs
// after disambiguate properties and smart name removal so that it can
// correctly identify logging types and can replace references to string
// expressions.
if (!options.replaceStringsFunctionDescriptions.isEmpty()) {
passes.add(replaceStrings);
}
// TODO(user): This forces a first crack at crossModuleCodeMotion
// before devirtualization. Once certain functions are devirtualized,
// it confuses crossModuleCodeMotion ability to recognized that
// it is recursive.
// TODO(user): This is meant for a temporary quick win.
// In the future, we might want to improve our analysis in
// CrossModuleCodeMotion so we don't need to do this.
if (options.crossModuleCodeMotion) {
passes.add(crossModuleCodeMotion);
}
// Must run after ProcessClosurePrimitives, Es6ConvertSuper, and assertion removals, but
// before OptimizeCalls (specifically, OptimizeParameters) and DevirtualizePrototypeMethods.
if (options.removeSuperMethods) {
passes.add(removeSuperMethodsPass);
}
// Method devirtualization benefits from property disambiguation so
// it should run after that pass but before passes that do
// optimizations based on global names (like cross module code motion
// and inline functions). Smart Name Removal does better if run before
// this pass.
if (options.devirtualizePrototypeMethods) {
passes.add(devirtualizePrototypeMethods);
}
if (options.customPasses != null) {
passes.add(getCustomPasses(
CustomPassExecutionTime.BEFORE_OPTIMIZATION_LOOP));
}
passes.add(createEmptyPass(PassNames.BEFORE_MAIN_OPTIMIZATIONS));
// Because FlowSensitiveInlineVariables does not operate on the global scope due to compilation
// time, we need to run it once before InlineFunctions so that we don't miss inlining
// opportunities when a function will be inlined into the global scope.
if (options.inlineVariables || options.inlineLocalVariables) {
passes.add(flowSensitiveInlineVariables);
}
passes.addAll(getMainOptimizationLoop());
passes.add(createEmptyPass(PassNames.AFTER_MAIN_OPTIMIZATIONS));
passes.add(createEmptyPass("beforeModuleMotion"));
if (options.crossModuleCodeMotion) {
passes.add(crossModuleCodeMotion);
}
if (options.crossModuleMethodMotion) {
passes.add(crossModuleMethodMotion);
}
passes.add(createEmptyPass("afterModuleMotion"));
// Some optimizations belong outside the loop because running them more
// than once would either have no benefit or be incorrect.
if (options.customPasses != null) {
passes.add(getCustomPasses(
CustomPassExecutionTime.AFTER_OPTIMIZATION_LOOP));
}
if (options.inlineVariables || options.inlineLocalVariables) {
passes.add(flowSensitiveInlineVariables);
// After inlining some of the variable uses, some variables are unused.
// Re-run remove unused vars to clean it up.
if (options.removeUnusedVars || options.removeUnusedLocalVars) {
passes.add(lastRemoveUnusedVars());
}
}
// Running this pass again is required to have goog.events compile down to
// nothing when compiled on its own.
if (options.smartNameRemoval) {
passes.add(smartNamePass2);
}
if (options.collapseAnonymousFunctions) {
passes.add(collapseAnonymousFunctions);
}
// Move functions before extracting prototype member declarations.
if (options.moveFunctionDeclarations
// renamePrefixNamescape relies on moveFunctionDeclarations
// to preserve semantics.
|| options.renamePrefixNamespace != null) {
passes.add(moveFunctionDeclarations);
}
if (options.anonymousFunctionNaming == AnonymousFunctionNamingPolicy.MAPPED) {
passes.add(nameMappedAnonymousFunctions);
}
// The mapped name anonymous function pass makes use of information that
// the extract prototype member declarations pass removes so the former
// happens before the latter.
if (options.extractPrototypeMemberDeclarations != ExtractPrototypeMemberDeclarationsMode.OFF) {
passes.add(extractPrototypeMemberDeclarations);
}
if (options.shouldAmbiguateProperties()
&& options.propertyRenaming == PropertyRenamingPolicy.ALL_UNQUOTED
&& options.isTypecheckingEnabled()) {
passes.add(ambiguateProperties);
}
if (options.propertyRenaming == PropertyRenamingPolicy.ALL_UNQUOTED) {
passes.add(renameProperties);
}
// Reserve global names added to the "windows" object.
if (options.reserveRawExports) {
passes.add(gatherRawExports);
}
// This comes after property renaming because quoted property names must
// not be renamed.
if (options.convertToDottedProperties) {
passes.add(convertToDottedProperties);
}
// Property renaming must happen before this pass runs since this
// pass may convert dotted properties into quoted properties. It
// is beneficial to run before alias strings, alias keywords and
// variable renaming.
if (options.rewriteFunctionExpressions) {
passes.add(rewriteFunctionExpressions);
}
// This comes after converting quoted property accesses to dotted property
// accesses in order to avoid aliasing property names.
if (!options.aliasableStrings.isEmpty() || options.aliasAllStrings) {
passes.add(aliasStrings);
}
if (options.coalesceVariableNames) {
// Passes after this point can no longer depend on normalized AST
// assumptions because the code is marked as un-normalized
passes.add(coalesceVariableNames);
// coalesceVariables creates identity assignments and more redundant code
// that can be removed, rerun the peephole optimizations to clean them
// up.
if (options.foldConstants) {
passes.add(peepholeOptimizationsOnce);
}
}
// Passes after this point can no longer depend on normalized AST assumptions.
passes.add(markUnnormalized);
if (options.collapseVariableDeclarations) {
passes.add(exploitAssign);
passes.add(collapseVariableDeclarations);
}
// This pass works best after collapseVariableDeclarations.
passes.add(denormalize);
if (options.instrumentationTemplate != null) {
passes.add(instrumentFunctions);
}
if (options.variableRenaming != VariableRenamingPolicy.ALL) {
// If we're leaving some (or all) variables with their old names,
// then we need to undo any of the markers we added for distinguishing
// local variables ("x" -> "x$jscomp$1").
passes.add(invertContextualRenaming);
}
if (options.variableRenaming != VariableRenamingPolicy.OFF) {
passes.add(renameVars);
}
// This pass should run after names stop changing.
if (options.processObjectPropertyString) {
passes.add(objectPropertyStringPostprocess);
}
if (options.labelRenaming) {
passes.add(renameLabels);
}
if (options.foldConstants) {
passes.add(latePeepholeOptimizations);
}
if (options.anonymousFunctionNaming == AnonymousFunctionNamingPolicy.UNMAPPED) {
passes.add(nameUnmappedAnonymousFunctions);
}
if (protectHiddenSideEffects) {
passes.add(stripSideEffectProtection);
}
if (options.renamePrefixNamespace != null) {
if (!GLOBAL_SYMBOL_NAMESPACE_PATTERN.matcher(
options.renamePrefixNamespace).matches()) {
throw new IllegalArgumentException(
"Illegal character in renamePrefixNamespace name: "
+ options.renamePrefixNamespace);
}
passes.add(rescopeGlobalSymbols);
}
// Safety checks
passes.add(checkAstValidity);
passes.add(varCheckValidity);
// Raise to ES6, if allowed
if (options.getLanguageOut().toFeatureSet().contains(FeatureSet.ES6)) {
passes.add(optimizeToEs6);
}
assertValidOrderForOptimizations(passes);
return passes;
}
/** Creates the passes for the main optimization loop. */
private List<PassFactory> getMainOptimizationLoop() {
List<PassFactory> passes = new ArrayList<>();
if (options.inlineGetters) {
passes.add(inlineSimpleMethods);
}
passes.addAll(getCodeRemovingPasses());
if (options.inlineFunctions || options.inlineLocalFunctions) {
passes.add(inlineFunctions);
}
if (options.shouldInlineProperties() && options.isTypecheckingEnabled()) {
passes.add(inlineProperties);
}
if (options.removeUnusedVars || options.removeUnusedLocalVars) {
if (options.deadAssignmentElimination) {
passes.add(deadAssignmentsElimination);
// The Polymer source is usually not included in the compilation, but it creates
// getters/setters for many properties in compiled code. Dead property assignment
// elimination is only safe when it knows about getters/setters. Therefore, we skip
// it if the polymer pass is enabled.
if (options.polymerVersion == null) {
passes.add(deadPropertyAssignmentElimination);
}
}
}
if (options.optimizeCalls || options.optimizeParameters || options.optimizeReturns) {
passes.add(optimizeCalls);
}
if (options.removeUnusedVars || options.removeUnusedLocalVars) {
passes.add(getRemoveUnusedVars());
}
if (options.j2clPassMode.shouldAddJ2clPasses()) {
passes.add(j2clConstantHoisterPass);
passes.add(j2clClinitPass);
}
assertAllLoopablePasses(passes);
return passes;
}
/** Creates several passes aimed at removing code. */
private List<PassFactory> getCodeRemovingPasses() {
List<PassFactory> passes = new ArrayList<>();
if (options.collapseObjectLiterals) {
passes.add(collapseObjectLiterals);
}
if (options.inlineVariables || options.inlineLocalVariables) {
passes.add(inlineVariables);
} else if (options.inlineConstantVars) {
passes.add(inlineConstants);
}
if (options.foldConstants) {
passes.add(peepholeOptimizations);
}
if (options.removeDeadCode) {
passes.add(removeUnreachableCode);
}
if (options.removeUnusedPrototypeProperties) {
passes.add(removeUnusedPrototypeProperties);
}
if (options.removeUnusedClassProperties) {
passes.add(removeUnusedClassProperties);
}
assertAllLoopablePasses(passes);
return passes;
}
private final HotSwapPassFactory checkSideEffects =
new HotSwapPassFactory("checkSideEffects") {
@Override
protected HotSwapCompilerPass create(final AbstractCompiler compiler) {
return new CheckSideEffects(
compiler, options.checkSuspiciousCode, protectHiddenSideEffects);
}
@Override
protected FeatureSet featureSet() {
return ES8_MODULES;
}
};
/** Removes the "protector" functions that were added by CheckSideEffects. */
private final PassFactory stripSideEffectProtection =
new PassFactory(PassNames.STRIP_SIDE_EFFECT_PROTECTION, true) {
@Override
protected CompilerPass create(final AbstractCompiler compiler) {
return new CheckSideEffects.StripProtection(compiler);
}
@Override
public FeatureSet featureSet() {
return FeatureSet.latest();
}
};
/** Checks for code that is probably wrong (such as stray expressions). */
private final HotSwapPassFactory suspiciousCode =
new HotSwapPassFactory("suspiciousCode") {
@Override
protected HotSwapCompilerPass create(final AbstractCompiler compiler) {
List<Callback> sharedCallbacks = new ArrayList<>();
if (options.checkSuspiciousCode) {
sharedCallbacks.add(new CheckSuspiciousCode());
sharedCallbacks.add(new CheckDuplicateCase(compiler));
}
if (options.enables(DiagnosticGroups.GLOBAL_THIS)) {
sharedCallbacks.add(new CheckGlobalThis(compiler));
}
if (options.enables(DiagnosticGroups.DEBUGGER_STATEMENT_PRESENT)) {
sharedCallbacks.add(new CheckDebuggerStatement(compiler));
}
return combineChecks(compiler, sharedCallbacks);
}
@Override
protected FeatureSet featureSet() {
return ES8_MODULES;
}
};
/** Verify that all the passes are one-time passes. */
private static void assertAllOneTimePasses(List<PassFactory> passes) {
for (PassFactory pass : passes) {
checkState(pass.isOneTimePass());
}
}
/** Verify that all the passes are multi-run passes. */
private static void assertAllLoopablePasses(List<PassFactory> passes) {
for (PassFactory pass : passes) {
checkState(!pass.isOneTimePass());
}
}
/**
* Checks that {@code pass1} comes before {@code pass2} in {@code passList}, if both are present.
*/
private void assertPassOrder(
List<PassFactory> passList, PassFactory pass1, PassFactory pass2, String msg) {
int pass1Index = passList.indexOf(pass1);
int pass2Index = passList.indexOf(pass2);
if (pass1Index != -1 && pass2Index != -1) {
checkState(pass1Index < pass2Index, msg);
}
}
/**
* Certain checks need to run in a particular order. For example, the PolymerPass
* will not work correctly unless it runs after the goog.provide() processing.
* This enforces those constraints.
* @param checks The list of check passes
*/
private void assertValidOrderForChecks(List<PassFactory> checks) {
assertPassOrder(
checks,
chromePass,
checkJsDocAndEs6Modules,
"The ChromePass must run before after JsDoc and Es6 module checking.");
assertPassOrder(
checks,
closureRewriteModule,
processDefines,
"Must rewrite goog.module before processing @define's, so that @defines in modules work.");
assertPassOrder(
checks,
closurePrimitives,
polymerPass,
"The Polymer pass must run after goog.provide processing.");
assertPassOrder(
checks,
chromePass,
polymerPass,
"The Polymer pass must run after ChromePass processing.");
assertPassOrder(
checks,
polymerPass,
suspiciousCode,
"The Polymer pass must run before suspiciousCode processing.");
assertPassOrder(
checks,
dartSuperAccessorsPass,
TranspilationPasses.es6ConvertSuper,
"The Dart super accessors pass must run before ES6->ES3 super lowering.");
if (checks.contains(closureGoogScopeAliases)) {
checkState(
checks.contains(checkVariableReferences),
"goog.scope processing requires variable checking");
}
assertPassOrder(
checks,
checkVariableReferences,
closureGoogScopeAliases,
"Variable checking must happen before goog.scope processing.");
assertPassOrder(
checks,
TranspilationPasses.es6ConvertSuper,
removeSuperMethodsPass,
"Super-call method removal must run after Es6 super rewriting, "
+ "because Es6 super calls are matched on their post-processed form.");
assertPassOrder(
checks,
closurePrimitives,
removeSuperMethodsPass,
"Super-call method removal must run after Es6 super rewriting, "
+ "because Closure base calls are expected to be in post-processed form.");
assertPassOrder(
checks,
closureCodeRemoval,
removeSuperMethodsPass,
"Super-call method removal must run after closure code removal, because "
+ "removing assertions may make more super calls eligible to be stripped.");
}
/**
* Certain optimizations need to run in a particular order. For example, OptimizeCalls must run
* before RemoveSuperMethodsPass, because the former can invalidate assumptions in the latter.
* This enforces those constraints.
* @param optimizations The list of optimization passes
*/
private void assertValidOrderForOptimizations(List<PassFactory> optimizations) {
assertPassOrder(optimizations, removeSuperMethodsPass, optimizeCalls,
"RemoveSuperMethodsPass must run before OptimizeCalls.");
assertPassOrder(optimizations, removeSuperMethodsPass, devirtualizePrototypeMethods,
"RemoveSuperMethodsPass must run before DevirtualizePrototypeMethods.");
}
/** Checks that all constructed classes are goog.require()d. */
private final HotSwapPassFactory checkRequires =
new HotSwapPassFactory("checkMissingAndExtraRequires") {
@Override
protected HotSwapCompilerPass create(AbstractCompiler compiler) {
return new CheckMissingAndExtraRequires(
compiler, CheckMissingAndExtraRequires.Mode.FULL_COMPILE);
}
@Override
protected FeatureSet featureSet() {
return ES8_MODULES;
}
};
/** Makes sure @constructor is paired with goog.provides(). */
private final HotSwapPassFactory checkProvides =
new HotSwapPassFactory("checkProvides") {
@Override
protected HotSwapCompilerPass create(AbstractCompiler compiler) {
return new CheckProvides(compiler);
}
@Override
protected FeatureSet featureSet() {
return ES8_MODULES;
}
};
private static final DiagnosticType GENERATE_EXPORTS_ERROR =
DiagnosticType.error(
"JSC_GENERATE_EXPORTS_ERROR",
"Exports can only be generated if export symbol/property functions are set.");
/** Verifies JSDoc annotations are used properly and checks for ES6 modules. */
private final HotSwapPassFactory checkJsDocAndEs6Modules =
new HotSwapPassFactory("checkJsDocAndEs6Modules") {
@Override
protected HotSwapCompilerPass create(AbstractCompiler compiler) {
ImmutableList.Builder<Callback> callbacks =
ImmutableList.<Callback>builder()
.add(new CheckJSDoc(compiler))
.add(new Es6CheckModule(compiler));
return combineChecks(compiler, callbacks.build());
}
@Override
protected FeatureSet featureSet() {
return FeatureSet.latest();
}
};
/** Generates exports for @export annotations. */
private final PassFactory generateExports =
new PassFactory(PassNames.GENERATE_EXPORTS, true) {
@Override
protected CompilerPass create(final AbstractCompiler compiler) {
CodingConvention convention = compiler.getCodingConvention();
if (convention.getExportSymbolFunction() != null
&& convention.getExportPropertyFunction() != null) {
final GenerateExports pass =
new GenerateExports(
compiler,
options.exportLocalPropertyDefinitions,
convention.getExportSymbolFunction(),
convention.getExportPropertyFunction());
return new CompilerPass() {
@Override
public void process(Node externs, Node root) {
pass.process(externs, root);
compiler.addExportedNames(pass.getExportedVariableNames());
}
};
} else {
return new ErrorPass(compiler, GENERATE_EXPORTS_ERROR);
}
}
@Override
protected FeatureSet featureSet() {
return ES8;
}
};
private final PassFactory generateIjs =
new PassFactory("generateIjs", true) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
return new ConvertToTypedInterface(compiler);
}
@Override
protected FeatureSet featureSet() {
return ES8_MODULES;
}
};
/** Generates exports for functions associated with JsUnit. */
private final PassFactory exportTestFunctions =
new PassFactory(PassNames.EXPORT_TEST_FUNCTIONS, true) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
CodingConvention convention = compiler.getCodingConvention();
if (convention.getExportSymbolFunction() != null) {
return new ExportTestFunctions(
compiler,
convention.getExportSymbolFunction(),
convention.getExportPropertyFunction());
} else {
return new ErrorPass(compiler, GENERATE_EXPORTS_ERROR);
}
}
@Override
protected FeatureSet featureSet() {
return ES8_MODULES;
}
};
/** Raw exports processing pass. */
private final PassFactory gatherRawExports =
new PassFactory(PassNames.GATHER_RAW_EXPORTS, true) {
@Override
protected CompilerPass create(final AbstractCompiler compiler) {
final GatherRawExports pass = new GatherRawExports(compiler);
return new CompilerPass() {
@Override
public void process(Node externs, Node root) {
pass.process(externs, root);
compiler.addExportedNames(pass.getExportedVariableNames());
}
};
}
@Override
public FeatureSet featureSet() {
// Should be FeatureSet.latest() since it's a trivial pass, but must match "normalize"
// TODO(johnlenz): Update this and normalize to latest()
return ES8_MODULES;
}
};
/** Closure pre-processing pass. */
private final HotSwapPassFactory closurePrimitives =
new HotSwapPassFactory("closurePrimitives") {
@Override
protected HotSwapCompilerPass create(final AbstractCompiler compiler) {
maybeInitializePreprocessorSymbolTable(compiler);
final ProcessClosurePrimitives pass =
new ProcessClosurePrimitives(
compiler,
preprocessorSymbolTable,
options.brokenClosureRequiresLevel,
options.shouldPreservesGoogProvidesAndRequires());
return new HotSwapCompilerPass() {
@Override
public void process(Node externs, Node root) {
pass.process(externs, root);
compiler.addExportedNames(pass.getExportedVariableNames());
}
@Override
public void hotSwapScript(Node scriptRoot, Node originalRoot) {
pass.hotSwapScript(scriptRoot, originalRoot);
}
};
}
@Override
protected FeatureSet featureSet() {
return ES8_MODULES;
}
};
/** Process AngularJS-specific annotations. */
private final HotSwapPassFactory angularPass =
new HotSwapPassFactory(PassNames.ANGULAR_PASS) {
@Override
protected HotSwapCompilerPass create(AbstractCompiler compiler) {
return new AngularPass(compiler);
}
@Override
public FeatureSet featureSet() {
return ES8_MODULES;
}
};
/**
* The default i18n pass. A lot of the options are not configurable, because ReplaceMessages has a
* lot of legacy logic.
*/
private final PassFactory replaceMessages =
new PassFactory(PassNames.REPLACE_MESSAGES, true) {
@Override
protected CompilerPass create(final AbstractCompiler compiler) {
return new ReplaceMessages(
compiler,
options.messageBundle,
/* warn about message dupes */
true,
/* allow messages with goog.getMsg */
JsMessage.Style.CLOSURE,
/* if we can't find a translation, don't worry about it. */
false);
}
@Override
public FeatureSet featureSet() {
return ES8_MODULES;
}
};
private final PassFactory replaceMessagesForChrome =
new PassFactory(PassNames.REPLACE_MESSAGES, true) {
@Override
protected CompilerPass create(final AbstractCompiler compiler) {
return new ReplaceMessagesForChrome(
compiler,
new GoogleJsMessageIdGenerator(options.tcProjectId),
/* warn about message dupes */
true,
/* allow messages with goog.getMsg */
JsMessage.Style.CLOSURE);
}
@Override
public FeatureSet featureSet() {
return ES8_MODULES;
}
};
/** Applies aliases and inlines goog.scope. */
private final HotSwapPassFactory closureGoogScopeAliases =
new HotSwapPassFactory("closureGoogScopeAliases") {
@Override
protected HotSwapCompilerPass create(AbstractCompiler compiler) {
maybeInitializePreprocessorSymbolTable(compiler);
return new ScopedAliases(
compiler, preprocessorSymbolTable, options.getAliasTransformationHandler());
}
@Override
protected FeatureSet featureSet() {
return ES8_MODULES;
}
};
private final PassFactory injectRuntimeLibraries =
new PassFactory("InjectRuntimeLibraries", true) {
@Override
protected CompilerPass create(final AbstractCompiler compiler) {
return new InjectRuntimeLibraries(compiler);
}
@Override
protected FeatureSet featureSet() {
return ES8_MODULES;
}
};
private final PassFactory es6ExternsCheck =
new PassFactory("es6ExternsCheck", true) {
@Override
protected CompilerPass create(final AbstractCompiler compiler) {
return new Es6ExternsCheck(compiler);
}
@Override
protected FeatureSet featureSet() {
return ES8_MODULES;
}
};
/** Desugars ES6_TYPED features into ES6 code. */
final HotSwapPassFactory convertEs6TypedToEs6 =
new HotSwapPassFactory("convertEs6Typed") {
@Override
protected HotSwapCompilerPass create(final AbstractCompiler compiler) {
return new Es6TypedToEs6Converter(compiler);
}
@Override
protected FeatureSet featureSet() {
return TYPESCRIPT;
}
};
private final PassFactory convertStaticInheritance =
new PassFactory("Es6StaticInheritance", true) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
return new Es6ToEs3ClassSideInheritance(compiler);
}
@Override
protected FeatureSet featureSet() {
return ES5;
}
};
private final PassFactory inlineTypeAliases =
new PassFactory(PassNames.INLINE_TYPE_ALIASES, true) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
return new InlineAliases(compiler);
}
@Override
protected FeatureSet featureSet() {
return ES6;
}
};
/** Inlines type aliases if they are explicitly or effectively const. */
private final PassFactory aggressiveInlineAliases =
new PassFactory("aggressiveInlineAliases", true) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
return new AggressiveInlineAliases(compiler);
}
};
private final PassFactory setFeatureSet(final FeatureSet featureSet) {
return new PassFactory("setFeatureSet:" + featureSet.version(), true) {
@Override
protected CompilerPass create(final AbstractCompiler compiler) {
return new CompilerPass() {
@Override
public void process(Node externs, Node root) {
compiler.setFeatureSet(featureSet);
}
};
}
@Override
public FeatureSet featureSet() {
return FeatureSet.latest();
}
};
}
private final PassFactory declaredGlobalExternsOnWindow =
new PassFactory(PassNames.DECLARED_GLOBAL_EXTERNS_ON_WINDOW, true) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
return new DeclaredGlobalExternsOnWindow(compiler);
}
@Override
protected FeatureSet featureSet() {
return ES8_MODULES;
}
};
/** Rewrites goog.defineClass */
private final HotSwapPassFactory closureRewriteClass =
new HotSwapPassFactory(PassNames.CLOSURE_REWRITE_CLASS) {
@Override
protected HotSwapCompilerPass create(AbstractCompiler compiler) {
return new ClosureRewriteClass(compiler);
}
@Override
protected FeatureSet featureSet() {
return ES8_MODULES;
}
};
/** Checks of correct usage of goog.module */
private final HotSwapPassFactory closureCheckModule =
new HotSwapPassFactory("closureCheckModule") {
@Override
protected HotSwapCompilerPass create(AbstractCompiler compiler) {
return new ClosureCheckModule(compiler);
}
@Override
protected FeatureSet featureSet() {
return ES8_MODULES;
}
};
/** Rewrites goog.module */
private final HotSwapPassFactory closureRewriteModule =
new HotSwapPassFactory("closureRewriteModule") {
@Override
protected HotSwapCompilerPass create(AbstractCompiler compiler) {
maybeInitializePreprocessorSymbolTable(compiler);
maybeInitializeModuleRewriteState();
return new ClosureRewriteModule(compiler, preprocessorSymbolTable, moduleRewriteState);
}
@Override
protected FeatureSet featureSet() {
return ES8_MODULES;
}
};
/** Checks that CSS class names are wrapped in goog.getCssName */
private final PassFactory closureCheckGetCssName =
new PassFactory("closureCheckGetCssName", true) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
return new CheckMissingGetCssName(
compiler,
options.checkMissingGetCssNameLevel,
options.checkMissingGetCssNameBlacklist);
}
@Override
protected FeatureSet featureSet() {
return ES8_MODULES;
}
};
/**
* Processes goog.getCssName. The cssRenamingMap is used to lookup
* replacement values for the classnames. If null, the raw class names are
* inlined.
*/
private final PassFactory closureReplaceGetCssName =
new PassFactory("closureReplaceGetCssName", true) {
@Override
protected CompilerPass create(final AbstractCompiler compiler) {
return new CompilerPass() {
@Override
public void process(Node externs, Node jsRoot) {
Map<String, Integer> newCssNames = null;
if (options.gatherCssNames) {
newCssNames = new HashMap<>();
}
ReplaceCssNames pass = new ReplaceCssNames(
compiler,
newCssNames,
options.cssRenamingWhitelist);
pass.process(externs, jsRoot);
compiler.setCssNames(newCssNames);
}
};
}
@Override
protected FeatureSet featureSet() {
return ES8_MODULES;
}
};
/**
* Creates synthetic blocks to prevent FoldConstants from moving code past markers in the source.
*/
private final PassFactory createSyntheticBlocks =
new PassFactory("createSyntheticBlocks", true) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
return new CreateSyntheticBlocks(
compiler, options.syntheticBlockStartMarker, options.syntheticBlockEndMarker);
}
@Override
protected FeatureSet featureSet() {
return ES8_MODULES;
}
};
private final PassFactory earlyPeepholeOptimizations =
new PassFactory("earlyPeepholeOptimizations", true) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
List<AbstractPeepholeOptimization> peepholeOptimizations = new ArrayList<>();
peepholeOptimizations.add(new PeepholeRemoveDeadCode());
if (compiler.getOptions().j2clPassMode.shouldAddJ2clPasses()) {
peepholeOptimizations.add(new J2clEqualitySameRewriterPass());
}
return new PeepholeOptimizationsPass(compiler, getName(), peepholeOptimizations);
}
@Override
protected FeatureSet featureSet() {
return ES8_MODULES;
}
};
private final PassFactory earlyInlineVariables =
new PassFactory("earlyInlineVariables", true) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
InlineVariables.Mode mode;
if (options.inlineVariables) {
mode = InlineVariables.Mode.ALL;
} else if (options.inlineLocalVariables) {
mode = InlineVariables.Mode.LOCALS_ONLY;
} else {
throw new IllegalStateException("No variable inlining option set.");
}
return new InlineVariables(compiler, mode, true);
}
@Override
protected FeatureSet featureSet() {
return ES8_MODULES;
}
};
/** Various peephole optimizations. */
private static CompilerPass createPeepholeOptimizationsPass(
AbstractCompiler compiler, String passName) {
final boolean late = false;
final boolean useTypesForOptimization = compiler.getOptions().useTypesForLocalOptimization;
List<AbstractPeepholeOptimization> optimizations = new ArrayList<>();
optimizations.add(new MinimizeExitPoints(compiler));
optimizations.add(new PeepholeMinimizeConditions(late));
optimizations.add(new PeepholeSubstituteAlternateSyntax(late));
optimizations.add(new PeepholeReplaceKnownMethods(late, useTypesForOptimization));
optimizations.add(new PeepholeRemoveDeadCode());
if (compiler.getOptions().j2clPassMode.shouldAddJ2clPasses()) {
optimizations.add(new J2clEqualitySameRewriterPass());
}
optimizations.add(new PeepholeFoldConstants(late, useTypesForOptimization));
optimizations.add(new PeepholeCollectPropertyAssignments());
return new PeepholeOptimizationsPass(compiler, passName, optimizations);
}
/** Various peephole optimizations. */
private final PassFactory peepholeOptimizations =
new PassFactory(PassNames.PEEPHOLE_OPTIMIZATIONS, false /* oneTimePass */) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
return createPeepholeOptimizationsPass(compiler, getName());
}
@Override
protected FeatureSet featureSet() {
return ES8_MODULES;
}
};
/** Various peephole optimizations. */
private final PassFactory peepholeOptimizationsOnce =
new PassFactory(PassNames.PEEPHOLE_OPTIMIZATIONS, true /* oneTimePass */) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
return createPeepholeOptimizationsPass(compiler, getName());
}
@Override
protected FeatureSet featureSet() {
return ES8_MODULES;
}
};
/** Same as peepholeOptimizations but aggressively merges code together */
private final PassFactory latePeepholeOptimizations =
new PassFactory("latePeepholeOptimizations", true) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
final boolean late = true;
final boolean useTypesForOptimization = options.useTypesForLocalOptimization;
return new PeepholeOptimizationsPass(
compiler,
getName(),
new StatementFusion(options.aggressiveFusion),
new PeepholeRemoveDeadCode(),
new PeepholeMinimizeConditions(late),
new PeepholeSubstituteAlternateSyntax(late),
new PeepholeReplaceKnownMethods(late, useTypesForOptimization),
new PeepholeFoldConstants(late, useTypesForOptimization),
new PeepholeReorderConstantExpression());
}
};
/** Checks that all variables are defined. */
private final HotSwapPassFactory checkVars =
new HotSwapPassFactory(PassNames.CHECK_VARS) {
@Override
protected HotSwapCompilerPass create(AbstractCompiler compiler) {
return new VarCheck(compiler);
}
@Override
protected FeatureSet featureSet() {
return ES8_MODULES;
}
};
/** Infers constants. */
private final PassFactory inferConsts =
new PassFactory(PassNames.INFER_CONSTS, true) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
return new InferConsts(compiler);
}
@Override
protected FeatureSet featureSet() {
return ES8_MODULES;
}
};
/** Checks for RegExp references. */
private final PassFactory checkRegExp =
new PassFactory(PassNames.CHECK_REG_EXP, true) {
@Override
protected CompilerPass create(final AbstractCompiler compiler) {
final CheckRegExp pass = new CheckRegExp(compiler);
return new CompilerPass() {
@Override
public void process(Node externs, Node root) {
pass.process(externs, root);
compiler.setHasRegExpGlobalReferences(pass.isGlobalRegExpPropertiesUsed());
}
};
}
@Override
protected FeatureSet featureSet() {
return ES8_MODULES;
}
};
/** Checks that references to variables look reasonable. */
private final HotSwapPassFactory checkVariableReferencesForTranspileOnly =
new HotSwapPassFactory(PassNames.CHECK_VARIABLE_REFERENCES) {
@Override
protected HotSwapCompilerPass create(AbstractCompiler compiler) {
return new VariableReferenceCheck(compiler, true);
}
@Override
protected FeatureSet featureSet() {
return ES8_MODULES;
}
};
/** Checks that references to variables look reasonable. */
private final HotSwapPassFactory checkVariableReferences =
new HotSwapPassFactory(PassNames.CHECK_VARIABLE_REFERENCES) {
@Override
protected HotSwapCompilerPass create(AbstractCompiler compiler) {
return new VariableReferenceCheck(compiler);
}
@Override
protected FeatureSet featureSet() {
return ES8_MODULES;
}
};
/** Checks that references to variables look reasonable. */
private final HotSwapPassFactory checkMissingSuper =
new HotSwapPassFactory("checkMissingSuper") {
@Override
protected HotSwapCompilerPass create(AbstractCompiler compiler) {
return new CheckMissingSuper(compiler);
}
@Override
protected FeatureSet featureSet() {
return ES8_MODULES;
}
};
/** Pre-process goog.testing.ObjectPropertyString. */
private final PassFactory objectPropertyStringPreprocess =
new PassFactory("ObjectPropertyStringPreprocess", true) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
return new ObjectPropertyStringPreprocess(compiler);
}
@Override
protected FeatureSet featureSet() {
return ES8_MODULES;
}
};
/** Creates a typed scope and adds types to the type registry. */
final HotSwapPassFactory resolveTypes =
new HotSwapPassFactory(PassNames.RESOLVE_TYPES) {
@Override
protected HotSwapCompilerPass create(AbstractCompiler compiler) {
return new GlobalTypeResolver(compiler);
}
};
/** Clears the typed scope when we're done. */
private final PassFactory clearTypedScopePass =
new PassFactory("clearTypedScopePass", true) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
return new ClearTypedScope();
}
@Override
protected FeatureSet featureSet() {
return FeatureSet.latest();
}
};
/** Runs type inference. */
final HotSwapPassFactory inferTypes =
new HotSwapPassFactory(PassNames.INFER_TYPES) {
@Override
protected HotSwapCompilerPass create(final AbstractCompiler compiler) {
return new HotSwapCompilerPass() {
@Override
public void process(Node externs, Node root) {
checkNotNull(topScope);
checkNotNull(getTypedScopeCreator());
makeTypeInference(compiler).process(externs, root);
}
@Override
public void hotSwapScript(Node scriptRoot, Node originalRoot) {
makeTypeInference(compiler).inferAllScopes(scriptRoot);
}
};
}
};
private final PassFactory symbolTableForNewTypeInference =
new PassFactory("GlobalTypeInfo", true) {
@Override
protected CompilerPass create(final AbstractCompiler compiler) {
return new GlobalTypeInfoCollector(compiler);
}
@Override
protected FeatureSet featureSet() {
return FeatureSet.NTI_SUPPORTED;
}
};
private final PassFactory newTypeInference =
new PassFactory("NewTypeInference", true) {
@Override
protected CompilerPass create(final AbstractCompiler compiler) {
return new NewTypeInference(compiler);
}
@Override
protected FeatureSet featureSet() {
return FeatureSet.NTI_SUPPORTED;
}
};
private final HotSwapPassFactory inferJsDocInfo =
new HotSwapPassFactory("inferJsDocInfo") {
@Override
protected HotSwapCompilerPass create(final AbstractCompiler compiler) {
return new HotSwapCompilerPass() {
@Override
public void process(Node externs, Node root) {
checkNotNull(topScope);
checkNotNull(getTypedScopeCreator());
makeInferJsDocInfo(compiler).process(externs, root);
}
@Override
public void hotSwapScript(Node scriptRoot, Node originalRoot) {
makeInferJsDocInfo(compiler).hotSwapScript(scriptRoot, originalRoot);
}
};
}
};
/** Checks type usage */
private final HotSwapPassFactory checkTypes =
new HotSwapPassFactory(PassNames.CHECK_TYPES) {
@Override
protected HotSwapCompilerPass create(final AbstractCompiler compiler) {
return new HotSwapCompilerPass() {
@Override
public void process(Node externs, Node root) {
checkNotNull(topScope);
checkNotNull(getTypedScopeCreator());
TypeCheck check = makeTypeCheck(compiler);
check.process(externs, root);
compiler.getErrorManager().setTypedPercent(check.getTypedPercent());
}
@Override
public void hotSwapScript(Node scriptRoot, Node originalRoot) {
makeTypeCheck(compiler).check(scriptRoot, false);
}
};
}
};
/**
* Checks possible execution paths of the program for problems: missing return
* statements and dead code.
*/
private final HotSwapPassFactory checkControlFlow =
new HotSwapPassFactory("checkControlFlow") {
@Override
protected HotSwapCompilerPass create(AbstractCompiler compiler) {
List<Callback> callbacks = new ArrayList<>();
if (!options.disables(DiagnosticGroups.CHECK_USELESS_CODE)) {
callbacks.add(new CheckUnreachableCode(compiler));
}
if (!options.getNewTypeInference() && !options.disables(DiagnosticGroups.MISSING_RETURN)) {
callbacks.add(new CheckMissingReturn(compiler));
}
return combineChecks(compiler, callbacks);
}
@Override
public FeatureSet featureSet() {
return ES8_MODULES;
}
};
/** Checks access controls. Depends on type-inference. */
private final HotSwapPassFactory checkAccessControls =
new HotSwapPassFactory("checkAccessControls") {
@Override
protected HotSwapCompilerPass create(AbstractCompiler compiler) {
return new CheckAccessControls(
compiler, options.enforceAccessControlCodingConventions);
}
};
private final HotSwapPassFactory lintChecks =
new HotSwapPassFactory(PassNames.LINT_CHECKS) {
@Override
protected HotSwapCompilerPass create(AbstractCompiler compiler) {
ImmutableList.Builder<Callback> callbacks =
ImmutableList.<Callback>builder()
.add(new CheckEmptyStatements(compiler))
.add(new CheckEnums(compiler))
.add(new CheckInterfaces(compiler))
.add(new CheckJSDocStyle(compiler))
.add(new CheckMissingSemicolon(compiler))
.add(new CheckPrimitiveAsObject(compiler))
.add(new CheckPrototypeProperties(compiler))
.add(new CheckUnusedLabels(compiler))
.add(new CheckUselessBlocks(compiler));
return combineChecks(compiler, callbacks.build());
}
@Override
protected FeatureSet featureSet() {
return ES8_MODULES;
}
};
private final HotSwapPassFactory analyzerChecks =
new HotSwapPassFactory(PassNames.ANALYZER_CHECKS) {
@Override
protected HotSwapCompilerPass create(AbstractCompiler compiler) {
ImmutableList.Builder<Callback> callbacks = ImmutableList.<Callback>builder();
if (options.enables(DiagnosticGroups.ANALYZER_CHECKS_INTERNAL)) {
callbacks
.add(new CheckNullableReturn(compiler))
.add(new CheckArrayWithGoogObject(compiler))
.add(new ImplicitNullabilityCheck(compiler));
}
// These are grouped together for better execution efficiency.
if (options.enables(DiagnosticGroups.UNUSED_PRIVATE_PROPERTY)) {
callbacks.add(new CheckUnusedPrivateProperties(compiler));
}
return combineChecks(compiler, callbacks.build());
}
};
private final HotSwapPassFactory checkRequiresAndProvidesSorted =
new HotSwapPassFactory("checkRequiresAndProvidesSorted") {
@Override
protected HotSwapCompilerPass create(AbstractCompiler compiler) {
return new CheckRequiresAndProvidesSorted(compiler);
}
@Override
protected FeatureSet featureSet() {
return ES8_MODULES;
}
};
/** Executes the given callbacks with a {@link CombinedCompilerPass}. */
private static HotSwapCompilerPass combineChecks(AbstractCompiler compiler,
List<Callback> callbacks) {
checkArgument(!callbacks.isEmpty());
return new CombinedCompilerPass(compiler, callbacks);
}
/** A compiler pass that resolves types in the global scope. */
class GlobalTypeResolver implements HotSwapCompilerPass {
private final AbstractCompiler compiler;
GlobalTypeResolver(AbstractCompiler compiler) {
this.compiler = compiler;
}
@Override
public void process(Node externs, Node root) {
// If NTI is enabled, erase the NTI types from the AST before adding the old types.
if (this.compiler.getOptions().getNewTypeInference()) {
NodeTraversal.traverseEs6(
this.compiler, root,
new NodeTraversal.AbstractPostOrderCallback(){
@Override
public void visit(NodeTraversal t, Node n, Node parent) {
n.setTypeI(null);
}
});
this.compiler.clearTypeIRegistry();
}
this.compiler.setMostRecentTypechecker(MostRecentTypechecker.OTI);
if (topScope == null) {
regenerateGlobalTypedScope(compiler, root.getParent());
} else {
compiler.getTypeRegistry().resolveTypesInScope(topScope);
}
}
@Override
public void hotSwapScript(Node scriptRoot, Node originalRoot) {
patchGlobalTypedScope(compiler, scriptRoot);
}
}
/** A compiler pass that clears the global scope. */
class ClearTypedScope implements CompilerPass {
@Override
public void process(Node externs, Node root) {
clearTypedScope();
}
}
/** Checks global name usage. */
private final PassFactory checkGlobalNames =
new PassFactory("checkGlobalNames", true) {
@Override
protected CompilerPass create(final AbstractCompiler compiler) {
return new CompilerPass() {
@Override
public void process(Node externs, Node jsRoot) {
// Create a global namespace for analysis by check passes.
// Note that this class does all heavy computation lazily,
// so it's OK to create it here.
namespaceForChecks = new GlobalNamespace(compiler, externs, jsRoot);
new CheckGlobalNames(compiler, options.checkGlobalNamesLevel)
.injectNamespace(namespaceForChecks).process(externs, jsRoot);
}
};
}
};
/** Checks that the code is ES5 strict compliant. */
private final PassFactory checkStrictMode =
new PassFactory("checkStrictMode", true) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
return new StrictModeCheck(compiler);
}
@Override
protected FeatureSet featureSet() {
return ES8_MODULES;
}
};
/** Process goog.tweak.getTweak() calls. */
private final PassFactory processTweaks = new PassFactory("processTweaks", true) {
@Override
protected CompilerPass create(final AbstractCompiler compiler) {
return new CompilerPass() {
@Override
public void process(Node externs, Node jsRoot) {
new ProcessTweaks(compiler,
options.getTweakProcessing().shouldStrip(),
options.getTweakReplacements()).process(externs, jsRoot);
}
};
}
};
/** Override @define-annotated constants. */
private final PassFactory processDefines = new PassFactory("processDefines", true) {
@Override
protected CompilerPass create(final AbstractCompiler compiler) {
return new CompilerPass() {
@Override
public void process(Node externs, Node jsRoot) {
HashMap<String, Node> replacements = new HashMap<>();
replacements.putAll(compiler.getDefaultDefineValues());
replacements.putAll(getAdditionalReplacements(options));
replacements.putAll(options.getDefineReplacements());
new ProcessDefines(compiler, ImmutableMap.copyOf(replacements), !options.checksOnly)
.injectNamespace(namespaceForChecks).process(externs, jsRoot);
}
};
}
@Override
public FeatureSet featureSet() {
return ES8_MODULES;
}
};
/**
* Strips code for smaller compiled code. This is useful for removing debug
* statements to prevent leaking them publicly.
*/
private final PassFactory stripCode = new PassFactory("stripCode", true) {
@Override
protected CompilerPass create(final AbstractCompiler compiler) {
return new CompilerPass() {
@Override
public void process(Node externs, Node jsRoot) {
CompilerOptions options = compiler.getOptions();
StripCode pass = new StripCode(compiler, options.stripTypes, options.stripNameSuffixes,
options.stripTypePrefixes, options.stripNamePrefixes);
if (options.getTweakProcessing().shouldStrip()) {
pass.enableTweakStripping();
}
pass.process(externs, jsRoot);
}
};
}
};
/** Release references to data that is only needed during checks. */
final PassFactory garbageCollectChecks =
new HotSwapPassFactory("garbageCollectChecks") {
@Override
protected HotSwapCompilerPass create(final AbstractCompiler compiler) {
return new HotSwapCompilerPass() {
@Override
public void process(Node externs, Node jsRoot) {
// Kill the global namespace so that it can be garbage collected
// after all passes are through with it.
namespaceForChecks = null;
}
@Override
public void hotSwapScript(Node scriptRoot, Node originalRoot) {
process(null, null);
}
};
}
@Override
public FeatureSet featureSet() {
return FeatureSet.latest();
}
};
/** Checks that all constants are not modified */
private final PassFactory checkConsts = new PassFactory("checkConsts", true) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
return new ConstCheck(compiler);
}
@Override
public FeatureSet featureSet() {
return ES8_MODULES;
}
};
/** Checks that the arguments are constants */
private final PassFactory checkConstParams =
new PassFactory(PassNames.CHECK_CONST_PARAMS, true) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
return new ConstParamCheck(compiler);
}
@Override
public FeatureSet featureSet() {
return ES5;
}
};
/** Computes the names of functions for later analysis. */
private final PassFactory computeFunctionNames =
new PassFactory("computeFunctionNames", true) {
@Override
protected CompilerPass create(final AbstractCompiler compiler) {
return new CompilerPass() {
@Override
public void process(Node externs, Node root) {
CollectFunctionNames pass = new CollectFunctionNames(compiler);
pass.process(externs, root);
compiler.setFunctionNames(pass.getFunctionNames());
}
};
}
@Override
public FeatureSet featureSet() {
return ES8_MODULES;
}
};
/** Inserts run-time type assertions for debugging. */
private final PassFactory runtimeTypeCheck =
new PassFactory(PassNames.RUNTIME_TYPE_CHECK, true) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
return new RuntimeTypeCheck(compiler, options.runtimeTypeCheckLogFunction);
}
};
/** Generates unique ids. */
private final PassFactory replaceIdGenerators =
new PassFactory(PassNames.REPLACE_ID_GENERATORS, true) {
@Override
protected CompilerPass create(final AbstractCompiler compiler) {
return new CompilerPass() {
@Override
public void process(Node externs, Node root) {
ReplaceIdGenerators pass =
new ReplaceIdGenerators(
compiler,
options.idGenerators,
options.generatePseudoNames,
options.idGeneratorsMapSerialized,
options.xidHashFunction);
pass.process(externs, root);
compiler.setIdGeneratorMap(pass.getSerializedIdMappings());
}
};
}
};
/** Replace strings. */
private final PassFactory replaceStrings = new PassFactory("replaceStrings", true) {
@Override
protected CompilerPass create(final AbstractCompiler compiler) {
return new CompilerPass() {
@Override public void process(Node externs, Node root) {
ReplaceStrings pass = new ReplaceStrings(
compiler,
options.replaceStringsPlaceholderToken,
options.replaceStringsFunctionDescriptions,
options.replaceStringsReservedStrings,
options.replaceStringsInputMap);
pass.process(externs, root);
compiler.setStringMap(pass.getStringMap());
}
};
}
};
/** Optimizes the "arguments" array. */
private final PassFactory optimizeArgumentsArray =
new PassFactory(PassNames.OPTIMIZE_ARGUMENTS_ARRAY, true) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
return new OptimizeArgumentsArray(compiler);
}
@Override
protected FeatureSet featureSet() {
return ES8_MODULES;
}
};
/** Remove variables set to goog.abstractMethod. */
private final PassFactory closureCodeRemoval =
new PassFactory("closureCodeRemoval", true) {
@Override
protected CompilerPass create(final AbstractCompiler compiler) {
return new ClosureCodeRemoval(compiler, options.removeAbstractMethods,
options.removeClosureAsserts);
}
};
/** Special case optimizations for closure functions. */
private final PassFactory closureOptimizePrimitives =
new PassFactory("closureOptimizePrimitives", true) {
@Override
protected CompilerPass create(final AbstractCompiler compiler) {
return new ClosureOptimizePrimitives(
compiler,
compiler.getOptions().propertyRenaming == PropertyRenamingPolicy.ALL_UNQUOTED,
compiler.getOptions().getLanguageOut().toFeatureSet().contains(FeatureSet.ES6));
}
@Override
protected FeatureSet featureSet() {
return ES8_MODULES;
}
};
/** Puts global symbols into a single object. */
private final PassFactory rescopeGlobalSymbols =
new PassFactory("rescopeGlobalSymbols", true) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
return new RescopeGlobalSymbols(
compiler,
options.renamePrefixNamespace,
options.renamePrefixNamespaceAssumeCrossModuleNames);
}
};
/** Collapses names in the global scope. */
private final PassFactory collapseProperties =
new PassFactory(PassNames.COLLAPSE_PROPERTIES, true) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
return new CollapseProperties(compiler);
}
};
/** Rewrite properties as variables. */
private final PassFactory collapseObjectLiterals =
new PassFactory(PassNames.COLLAPSE_OBJECT_LITERALS, false) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
return new InlineObjectLiterals(compiler, compiler.getUniqueNameIdSupplier());
}
@Override
protected FeatureSet featureSet() {
return ES8_MODULES;
}
};
/** Disambiguate property names based on the coding convention. */
private final PassFactory disambiguatePrivateProperties =
new PassFactory(PassNames.DISAMBIGUATE_PRIVATE_PROPERTIES, true) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
return new DisambiguatePrivateProperties(compiler);
}
};
/** Disambiguate property names based on type information. */
private final PassFactory disambiguateProperties =
new PassFactory(PassNames.DISAMBIGUATE_PROPERTIES, true) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
return new DisambiguateProperties(compiler, options.propertyInvalidationErrors);
}
};
/** Chain calls to functions that return this. */
private final PassFactory chainCalls =
new PassFactory(PassNames.CHAIN_CALLS, true) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
return new ChainCalls(compiler);
}
};
/** Rewrite instance methods as static methods, to make them easier to inline. */
private final PassFactory devirtualizePrototypeMethods =
new PassFactory(PassNames.DEVIRTUALIZE_PROTOTYPE_METHODS, true) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
return new DevirtualizePrototypeMethods(compiler);
}
};
/**
* Optimizes unused function arguments, unused return values, and inlines constant parameters.
* Also runs RemoveUnusedVars.
*/
private final PassFactory optimizeCalls =
new PassFactory(PassNames.OPTIMIZE_CALLS, false) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
OptimizeCalls passes = new OptimizeCalls(compiler);
if (options.optimizeReturns) {
// Remove unused return values.
passes.addPass(new OptimizeReturns(compiler));
}
if (options.optimizeParameters) {
// Remove all parameters that are constants or unused.
passes.addPass(new OptimizeParameters(compiler));
}
return passes;
}
};
/**
* Look for function calls that are pure, and annotate them
* that way.
*/
private final PassFactory markPureFunctions =
new PassFactory("markPureFunctions", true) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
return new PureFunctionIdentifier.Driver(
compiler, options.debugFunctionSideEffectsPath);
}
@Override
protected FeatureSet featureSet() {
return ES8_MODULES;
}
};
/** Look for function calls that have no side effects, and annotate them that way. */
private final PassFactory markNoSideEffectCalls =
new PassFactory(PassNames.MARK_NO_SIDE_EFFECT_CALLS, true) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
return new MarkNoSideEffectCalls(compiler);
}
};
/** Inlines variables heuristically. */
private final PassFactory inlineVariables =
new PassFactory(PassNames.INLINE_VARIABLES, false) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
InlineVariables.Mode mode;
if (options.inlineVariables) {
mode = InlineVariables.Mode.ALL;
} else if (options.inlineLocalVariables) {
mode = InlineVariables.Mode.LOCALS_ONLY;
} else {
throw new IllegalStateException("No variable inlining option set.");
}
return new InlineVariables(compiler, mode, true);
}
@Override
protected FeatureSet featureSet() {
return ES8_MODULES;
}
};
/** Inlines variables that are marked as constants. */
private final PassFactory inlineConstants =
new PassFactory("inlineConstants", false) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
return new InlineVariables(compiler, InlineVariables.Mode.CONSTANTS_ONLY, true);
}
@Override
protected FeatureSet featureSet() {
return ES8_MODULES;
}
};
/** Use data flow analysis to remove dead branches. */
private final PassFactory removeUnreachableCode =
new PassFactory(PassNames.REMOVE_UNREACHABLE_CODE, false) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
return new UnreachableCodeElimination(compiler);
}
@Override
protected FeatureSet featureSet() {
return ES8;
}
};
/**
* Use data flow analysis to remove dead branches.
*/
private final PassFactory removeUnusedPolyfills =
new PassFactory("removeUnusedPolyfills", true) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
return new RemoveUnusedPolyfills(compiler);
}
@Override
protected FeatureSet featureSet() {
return ES8_MODULES;
}
};
/** Remove prototype properties that do not appear to be used. */
private final PassFactory removeUnusedPrototypeProperties =
new PassFactory(PassNames.REMOVE_UNUSED_PROTOTYPE_PROPERTIES, false) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
return new RemoveUnusedPrototypeProperties(
compiler,
options.removeUnusedPrototypePropertiesInExterns,
!options.removeUnusedVars);
}
@Override
protected FeatureSet featureSet() {
return ES8_MODULES;
}
};
/** Remove prototype properties that do not appear to be used. */
private final PassFactory removeUnusedClassProperties =
new PassFactory(PassNames.REMOVE_UNUSED_CLASS_PROPERTIES, false) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
return new RemoveUnusedClassProperties(
compiler, options.removeUnusedConstructorProperties);
}
@Override
protected FeatureSet featureSet() {
return ES8_MODULES;
}
};
private final PassFactory initNameAnalyzeReport = new PassFactory("initNameAnalyzeReport", true) {
@Override
protected CompilerPass create(final AbstractCompiler compiler) {
return new CompilerPass() {
@Override
public void process(Node externs, Node root) {
NameAnalyzer.createEmptyReport(compiler, options.reportPath);
}
};
}
@Override
protected FeatureSet featureSet() {
return FeatureSet.latest();
}
};
/**
* Process smart name processing - removes unused classes and does referencing starting with
* minimum set of names.
*/
private final PassFactory extraSmartNamePass =
new PassFactory(PassNames.SMART_NAME_PASS, true) {
@Override
protected CompilerPass create(final AbstractCompiler compiler) {
return new NameAnalyzer(compiler, true, options.reportPath);
}
@Override
public FeatureSet featureSet() {
return ES5;
}
};
private final PassFactory smartNamePass =
new PassFactory(PassNames.SMART_NAME_PASS, true) {
@Override
protected CompilerPass create(final AbstractCompiler compiler) {
return new NameAnalyzer(compiler, true, options.reportPath);
}
@Override
public FeatureSet featureSet() {
return ES5;
}
};
private final PassFactory smartNamePass2 =
new PassFactory(PassNames.SMART_NAME_PASS, true) {
@Override
protected CompilerPass create(final AbstractCompiler compiler) {
return new NameAnalyzer(compiler, true, null);
}
@Override
public FeatureSet featureSet() {
return ES5;
}
};
/** Inlines simple methods, like getters */
private final PassFactory inlineSimpleMethods =
new PassFactory("inlineSimpleMethods", false) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
return new InlineSimpleMethods(compiler);
}
@Override
protected FeatureSet featureSet() {
return ES8_MODULES;
}
};
/** Kills dead assignments. */
private final PassFactory deadAssignmentsElimination =
new PassFactory(PassNames.DEAD_ASSIGNMENT_ELIMINATION, false) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
return new DeadAssignmentsElimination(compiler);
}
@Override
protected FeatureSet featureSet() {
return ES8_MODULES;
}
};
/** Kills dead property assignments. */
private final PassFactory deadPropertyAssignmentElimination =
new PassFactory("deadPropertyAssignmentElimination", false) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
return new DeadPropertyAssignmentElimination(compiler);
}
@Override
public FeatureSet featureSet() {
return ES8_MODULES;
}
};
/** Inlines function calls. */
private final PassFactory inlineFunctions =
new PassFactory(PassNames.INLINE_FUNCTIONS, false) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
return new InlineFunctions(
compiler,
compiler.getUniqueNameIdSupplier(),
options.inlineFunctions,
options.inlineLocalFunctions,
true,
options.assumeStrictThis() || options.expectStrictModeInput(),
options.assumeClosuresOnlyCaptureReferences,
options.maxFunctionSizeAfterInlining);
}
@Override
public FeatureSet featureSet() {
return ES8_MODULES;
}
};
/** Inlines constant properties. */
private final PassFactory inlineProperties =
new PassFactory(PassNames.INLINE_PROPERTIES, false) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
return new InlineProperties(compiler);
}
};
private PassFactory getRemoveUnusedVars() {
return getRemoveUnusedVars(false /* isOneTimePass */);
}
private PassFactory lastRemoveUnusedVars() {
return getRemoveUnusedVars(true /* isOneTimePass */);
}
private PassFactory getRemoveUnusedVars(boolean isOneTimePass) {
/** Removes variables that are never used. */
return new PassFactory(PassNames.REMOVE_UNUSED_VARS, isOneTimePass) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
boolean removeOnlyLocals = options.removeUnusedLocalVars && !options.removeUnusedVars;
boolean preserveAnonymousFunctionNames =
options.anonymousFunctionNaming != AnonymousFunctionNamingPolicy.OFF;
return new RemoveUnusedVars(
compiler,
!removeOnlyLocals,
preserveAnonymousFunctionNames);
}
@Override
public FeatureSet featureSet() {
return ES5;
}
};
}
/** Move global symbols to a deeper common module */
private final PassFactory crossModuleCodeMotion =
new PassFactory(PassNames.CROSS_MODULE_CODE_MOTION, false) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
return new CrossModuleCodeMotion(
compiler,
compiler.getModuleGraph(),
options.parentModuleCanSeeSymbolsDeclaredInChildren);
}
};
/** Move methods to a deeper common module */
private final PassFactory crossModuleMethodMotion =
new PassFactory(PassNames.CROSS_MODULE_METHOD_MOTION, false) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
return new CrossModuleMethodMotion(
compiler,
compiler.getCrossModuleIdGenerator(),
// Only move properties in externs if we're not treating
// them as exports.
options.removeUnusedPrototypePropertiesInExterns,
options.crossModuleCodeMotionNoStubMethods);
}
};
/** A data-flow based variable inliner. */
private final PassFactory flowSensitiveInlineVariables =
new PassFactory(PassNames.FLOW_SENSITIVE_INLINE_VARIABLES, true) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
return new FlowSensitiveInlineVariables(compiler);
}
@Override
public FeatureSet featureSet() {
return ES5;
}
};
/** Uses register-allocation algorithms to use fewer variables. */
private final PassFactory coalesceVariableNames =
new PassFactory(PassNames.COALESCE_VARIABLE_NAMES, true) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
return new CoalesceVariableNames(compiler, options.generatePseudoNames);
}
@Override
protected FeatureSet featureSet() {
return ES8_MODULES;
}
};
/** Some simple, local collapses (e.g., {@code var x; var y;} becomes {@code var x,y;}. */
private final PassFactory exploitAssign =
new PassFactory(PassNames.EXPLOIT_ASSIGN, true) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
return new PeepholeOptimizationsPass(compiler, getName(), new ExploitAssigns());
}
@Override
protected FeatureSet featureSet() {
return ES8_MODULES;
}
};
/** Some simple, local collapses (e.g., {@code var x; var y;} becomes {@code var x,y;}. */
private final PassFactory collapseVariableDeclarations =
new PassFactory(PassNames.COLLAPSE_VARIABLE_DECLARATIONS, true) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
return new CollapseVariableDeclarations(compiler);
}
@Override
protected FeatureSet featureSet() {
return ES8_MODULES;
}
};
/** Extracts common sub-expressions. */
private final PassFactory extractPrototypeMemberDeclarations =
new PassFactory(PassNames.EXTRACT_PROTOTYPE_MEMBER_DECLARATIONS, true) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
Pattern pattern;
switch (options.extractPrototypeMemberDeclarations) {
case USE_GLOBAL_TEMP:
pattern = Pattern.USE_GLOBAL_TEMP;
break;
case USE_IIFE:
pattern = Pattern.USE_IIFE;
break;
default:
throw new IllegalStateException("unexpected");
}
return new ExtractPrototypeMemberDeclarations(compiler, pattern);
}
};
/** Rewrites common function definitions to be more compact. */
private final PassFactory rewriteFunctionExpressions =
new PassFactory(PassNames.REWRITE_FUNCTION_EXPRESSIONS, true) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
return new FunctionRewriter(compiler);
}
@Override
protected FeatureSet featureSet() {
return FeatureSet.latest();
}
};
/** Collapses functions to not use the VAR keyword. */
private final PassFactory collapseAnonymousFunctions =
new PassFactory(PassNames.COLLAPSE_ANONYMOUS_FUNCTIONS, true) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
return new CollapseAnonymousFunctions(compiler);
}
};
/** Moves function declarations to the top, to simulate actual hoisting. */
private final PassFactory moveFunctionDeclarations =
new PassFactory(PassNames.MOVE_FUNCTION_DECLARATIONS, true) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
return new MoveFunctionDeclarations(compiler);
}
};
private final PassFactory nameUnmappedAnonymousFunctions =
new PassFactory(PassNames.NAME_ANONYMOUS_FUNCTIONS, true) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
return new NameAnonymousFunctions(compiler);
}
};
private final PassFactory nameMappedAnonymousFunctions =
new PassFactory(PassNames.NAME_ANONYMOUS_FUNCTIONS, true) {
@Override
protected CompilerPass create(final AbstractCompiler compiler) {
return new CompilerPass() {
@Override
public void process(Node externs, Node root) {
NameAnonymousFunctionsMapped naf =
new NameAnonymousFunctionsMapped(
compiler, options.inputAnonymousFunctionNamingMap);
naf.process(externs, root);
compiler.setAnonymousFunctionNameMap(naf.getFunctionMap());
}
};
}
};
/**
* Alias string literals with global variables, to avoid creating lots of
* transient objects.
*/
private final PassFactory aliasStrings = new PassFactory("aliasStrings", true) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
return new AliasStrings(
compiler,
compiler.getModuleGraph(),
options.aliasAllStrings ? null : options.aliasableStrings,
options.aliasStringsBlacklist,
options.outputJsStringUsage);
}
@Override
protected FeatureSet featureSet() {
return FeatureSet.ES8_MODULES;
}
};
/** Handling for the ObjectPropertyString primitive. */
private final PassFactory objectPropertyStringPostprocess =
new PassFactory("ObjectPropertyStringPostprocess", true) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
return new ObjectPropertyStringPostprocess(compiler);
}
};
/**
* Renames properties so that the two properties that never appear on the same object get the same
* name.
*/
private final PassFactory ambiguateProperties =
new PassFactory(PassNames.AMBIGUATE_PROPERTIES, true) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
return new AmbiguateProperties(
compiler,
options.getPropertyReservedNamingFirstChars(),
options.getPropertyReservedNamingNonFirstChars());
}
};
/** Mark the point at which the normalized AST assumptions no longer hold. */
private final PassFactory markUnnormalized =
new PassFactory("markUnnormalized", true) {
@Override
protected CompilerPass create(final AbstractCompiler compiler) {
return new CompilerPass() {
@Override
public void process(Node externs, Node root) {
compiler.setLifeCycleStage(LifeCycleStage.RAW);
}
};
}
@Override
protected FeatureSet featureSet() {
return FeatureSet.latest();
}
};
private final PassFactory normalize =
new PassFactory(PassNames.NORMALIZE, true) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
return new Normalize(compiler, false);
}
@Override
protected FeatureSet featureSet() {
// TODO(johnlenz): Update this and gatherRawExports to latest()
return ES8_MODULES;
}
};
private final PassFactory externExports =
new PassFactory(PassNames.EXTERN_EXPORTS, true) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
return new ExternExportsPass(compiler);
}
};
/** Denormalize the AST for code generation. */
private final PassFactory denormalize = new PassFactory("denormalize", true) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
return new Denormalize(compiler);
}
@Override
protected FeatureSet featureSet() {
return ES8_MODULES;
}
};
/** Inverting name normalization. */
private final PassFactory invertContextualRenaming =
new PassFactory("invertContextualRenaming", true) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
return MakeDeclaredNamesUnique.getContextualRenameInverter(compiler);
}
};
/** Renames properties. */
private final PassFactory renameProperties =
new PassFactory("renameProperties", true) {
@Override
protected CompilerPass create(final AbstractCompiler compiler) {
checkState(options.propertyRenaming == PropertyRenamingPolicy.ALL_UNQUOTED);
final VariableMap prevPropertyMap = options.inputPropertyMap;
return new CompilerPass() {
@Override
public void process(Node externs, Node root) {
RenameProperties rprop =
new RenameProperties(
compiler,
options.generatePseudoNames,
prevPropertyMap,
options.getPropertyReservedNamingFirstChars(),
options.getPropertyReservedNamingNonFirstChars(),
options.nameGenerator);
rprop.process(externs, root);
compiler.setPropertyMap(rprop.getPropertyMap());
}
};
}
@Override
protected FeatureSet featureSet() {
return ES8_MODULES;
}
};
/** Renames variables. */
private final PassFactory renameVars = new PassFactory("renameVars", true) {
@Override
protected CompilerPass create(final AbstractCompiler compiler) {
final VariableMap prevVariableMap = options.inputVariableMap;
return new CompilerPass() {
@Override public void process(Node externs, Node root) {
compiler.setVariableMap(runVariableRenaming(
compiler, prevVariableMap, externs, root));
}
};
}
@Override
protected FeatureSet featureSet() {
return ES8_MODULES;
}
};
private VariableMap runVariableRenaming(
AbstractCompiler compiler, VariableMap prevVariableMap,
Node externs, Node root) {
char[] reservedChars =
options.anonymousFunctionNaming.getReservedCharacters();
boolean preserveAnonymousFunctionNames =
options.anonymousFunctionNaming != AnonymousFunctionNamingPolicy.OFF;
Set<String> reservedNames = new HashSet<>();
if (options.renamePrefixNamespace != null) {
// don't use the prefix name as a global symbol.
reservedNames.add(options.renamePrefixNamespace);
}
reservedNames.addAll(compiler.getExportedNames());
reservedNames.addAll(ParserRunner.getReservedVars());
RenameVars rn = new RenameVars(
compiler,
options.renamePrefix,
options.variableRenaming == VariableRenamingPolicy.LOCAL,
preserveAnonymousFunctionNames,
options.generatePseudoNames,
options.shadowVariables,
options.preferStableNames,
prevVariableMap,
reservedChars,
reservedNames,
options.nameGenerator);
rn.process(externs, root);
return rn.getVariableMap();
}
/** Renames labels */
private final PassFactory renameLabels =
new PassFactory("renameLabels", true) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
return new RenameLabels(compiler);
}
@Override
protected FeatureSet featureSet() {
return ES8_MODULES;
}
};
/** Convert bracket access to dot access */
private final PassFactory convertToDottedProperties =
new PassFactory(PassNames.CONVERT_TO_DOTTED_PROPERTIES, true) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
return new ConvertToDottedProperties(compiler);
}
@Override
protected FeatureSet featureSet() {
return ES8_MODULES;
}
};
private final PassFactory checkAstValidity =
new PassFactory("checkAstValidity", true) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
return new AstValidator(compiler);
}
@Override
protected FeatureSet featureSet() {
return FeatureSet.latest();
}
};
/** Checks that all variables are defined. */
private final PassFactory varCheckValidity =
new PassFactory("varCheckValidity", true) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
return new VarCheck(compiler, true);
}
@Override
protected FeatureSet featureSet() {
return ES8_MODULES;
}
};
/** Adds instrumentations according to an instrumentation template. */
private final PassFactory instrumentFunctions =
new PassFactory("instrumentFunctions", true) {
@Override
protected CompilerPass create(final AbstractCompiler compiler) {
return new InstrumentFunctions(
compiler, compiler.getFunctionNames(),
options.instrumentationTemplate, options.appNameStr);
}
};
private final PassFactory instrumentForCodeCoverage =
new PassFactory("instrumentForCodeCoverage", true) {
@Override
protected CompilerPass create(final AbstractCompiler compiler) {
// TODO(johnlenz): make global instrumentation an option
if (options.instrumentBranchCoverage) {
return new CoverageInstrumentationPass(
compiler, CoverageReach.CONDITIONAL, InstrumentOption.BRANCH_ONLY);
} else {
return new CoverageInstrumentationPass(compiler, CoverageReach.CONDITIONAL);
}
}
};
/** Extern property names gathering pass. */
private final PassFactory gatherExternProperties =
new PassFactory("gatherExternProperties", true) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
return new GatherExternProperties(compiler);
}
@Override
protected FeatureSet featureSet() {
return ES8_MODULES;
}
};
/**
* Runs custom passes that are designated to run at a particular time.
*/
private PassFactory getCustomPasses(
final CustomPassExecutionTime executionTime) {
return new PassFactory("runCustomPasses", true) {
@Override
protected CompilerPass create(final AbstractCompiler compiler) {
return runInSerial(options.customPasses.get(executionTime));
}
};
}
/** Create a compiler pass that runs the given passes in serial. */
private static CompilerPass runInSerial(
final Collection<CompilerPass> passes) {
return new CompilerPass() {
@Override public void process(Node externs, Node root) {
for (CompilerPass pass : passes) {
pass.process(externs, root);
}
}
};
}
@VisibleForTesting
static Map<String, Node> getAdditionalReplacements(
CompilerOptions options) {
Map<String, Node> additionalReplacements = new HashMap<>();
if (options.markAsCompiled || options.closurePass) {
additionalReplacements.put(COMPILED_CONSTANT_NAME, IR.trueNode());
}
if (options.closurePass && options.locale != null) {
additionalReplacements.put(CLOSURE_LOCALE_CONSTANT_NAME,
IR.string(options.locale));
}
return additionalReplacements;
}
/** Rewrites Polymer({}) */
private final HotSwapPassFactory polymerPass =
new HotSwapPassFactory("polymerPass") {
@Override
protected HotSwapCompilerPass create(AbstractCompiler compiler) {
return new PolymerPass(
compiler,
compiler.getOptions().polymerVersion,
compiler.getOptions().propertyRenaming == PropertyRenamingPolicy.ALL_UNQUOTED);
}
@Override
protected FeatureSet featureSet() {
return ES8_MODULES;
}
};
private final PassFactory chromePass = new PassFactory("chromePass", true) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
return new ChromePass(compiler);
}
@Override
protected FeatureSet featureSet() {
return ES8_MODULES;
}
};
/** Rewrites the super accessors calls to support Dart Dev Compiler output. */
private final HotSwapPassFactory dartSuperAccessorsPass =
new HotSwapPassFactory("dartSuperAccessorsPass") {
@Override
protected HotSwapCompilerPass create(AbstractCompiler compiler) {
return new DartSuperAccessorsPass(compiler);
}
@Override
protected FeatureSet featureSet() {
return ES8_MODULES;
}
};
/** Rewrites J2CL constructs to be more optimizable. */
private final PassFactory j2clConstantHoisterPass =
new PassFactory("j2clConstantHoisterPass", false) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
return new J2clConstantHoisterPass(compiler);
}
};
/** Optimizes J2CL clinit methods. */
private final PassFactory j2clClinitPass =
new PassFactory("j2clClinitPass", false) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
List<Node> changedScopeNodes = compiler.getChangedScopeNodesForPass(getName());
return new J2clClinitPrunerPass(compiler, changedScopeNodes);
}
};
/** Rewrites J2CL constructs to be more optimizable. */
private final PassFactory j2clPropertyInlinerPass =
new PassFactory("j2clES6Pass", true) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
return new J2clPropertyInlinerPass(compiler);
}
@Override
protected FeatureSet featureSet() {
return ES8_MODULES;
}
};
/** Rewrites J2CL constructs to be more optimizable. */
private final PassFactory j2clPass =
new PassFactory("j2clPass", true) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
return new J2clPass(compiler);
}
@Override
protected FeatureSet featureSet() {
return ES8_MODULES;
}
};
private final PassFactory j2clAssertRemovalPass =
new PassFactory("j2clAssertRemovalPass", true) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
return new J2clAssertRemovalPass(compiler);
}
};
private final PassFactory j2clSourceFileChecker =
new PassFactory("j2clSourceFileChecker", true) {
@Override
protected CompilerPass create(final AbstractCompiler compiler) {
return new J2clSourceFileChecker(compiler);
}
@Override
protected FeatureSet featureSet() {
return FeatureSet.latest();
}
};
private final PassFactory j2clChecksPass =
new PassFactory("j2clChecksPass", true) {
@Override
protected CompilerPass create(final AbstractCompiler compiler) {
return new J2clChecksPass(compiler);
}
};
private final PassFactory checkConformance =
new PassFactory("checkConformance", true) {
@Override
protected CompilerPass create(final AbstractCompiler compiler) {
return new CheckConformance(
compiler, ImmutableList.copyOf(options.getConformanceConfigs()));
}
};
/** Optimizations that output ES6 features. */
private final PassFactory optimizeToEs6 =
new PassFactory("optimizeToEs6", true) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
return new SubstituteEs6Syntax(compiler);
}
@Override
protected FeatureSet featureSet() {
return ES8_MODULES;
}
};
/** Rewrites goog.module in whitespace only mode */
private final HotSwapPassFactory whitespaceWrapGoogModules =
new HotSwapPassFactory("whitespaceWrapGoogModules") {
@Override
protected HotSwapCompilerPass create(AbstractCompiler compiler) {
return new WhitespaceWrapGoogModules(compiler);
}
@Override
protected FeatureSet featureSet() {
return ES8_MODULES;
}
};
private final PassFactory removeSuperMethodsPass =
new PassFactory(PassNames.REMOVE_SUPER_METHODS, true) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
return new RemoveSuperMethodsPass(compiler);
}
};
}
| src/com/google/javascript/jscomp/DefaultPassConfig.java | /*
* Copyright 2009 The Closure Compiler 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 com.google.javascript.jscomp;
import static com.google.common.base.Preconditions.checkArgument;
import static com.google.common.base.Preconditions.checkNotNull;
import static com.google.common.base.Preconditions.checkState;
import static com.google.javascript.jscomp.PassFactory.createEmptyPass;
import static com.google.javascript.jscomp.parsing.parser.FeatureSet.ES5;
import static com.google.javascript.jscomp.parsing.parser.FeatureSet.ES6;
import static com.google.javascript.jscomp.parsing.parser.FeatureSet.ES7;
import static com.google.javascript.jscomp.parsing.parser.FeatureSet.ES8;
import static com.google.javascript.jscomp.parsing.parser.FeatureSet.ES8_MODULES;
import static com.google.javascript.jscomp.parsing.parser.FeatureSet.TYPESCRIPT;
import com.google.common.annotations.VisibleForTesting;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import com.google.javascript.jscomp.AbstractCompiler.LifeCycleStage;
import com.google.javascript.jscomp.AbstractCompiler.MostRecentTypechecker;
import com.google.javascript.jscomp.CompilerOptions.ExtractPrototypeMemberDeclarationsMode;
import com.google.javascript.jscomp.CoverageInstrumentationPass.CoverageReach;
import com.google.javascript.jscomp.CoverageInstrumentationPass.InstrumentOption;
import com.google.javascript.jscomp.ExtractPrototypeMemberDeclarations.Pattern;
import com.google.javascript.jscomp.NodeTraversal.Callback;
import com.google.javascript.jscomp.PassFactory.HotSwapPassFactory;
import com.google.javascript.jscomp.lint.CheckArrayWithGoogObject;
import com.google.javascript.jscomp.lint.CheckDuplicateCase;
import com.google.javascript.jscomp.lint.CheckEmptyStatements;
import com.google.javascript.jscomp.lint.CheckEnums;
import com.google.javascript.jscomp.lint.CheckInterfaces;
import com.google.javascript.jscomp.lint.CheckJSDocStyle;
import com.google.javascript.jscomp.lint.CheckMissingSemicolon;
import com.google.javascript.jscomp.lint.CheckNullableReturn;
import com.google.javascript.jscomp.lint.CheckPrimitiveAsObject;
import com.google.javascript.jscomp.lint.CheckPrototypeProperties;
import com.google.javascript.jscomp.lint.CheckRequiresAndProvidesSorted;
import com.google.javascript.jscomp.lint.CheckUnusedLabels;
import com.google.javascript.jscomp.lint.CheckUselessBlocks;
import com.google.javascript.jscomp.parsing.ParserRunner;
import com.google.javascript.jscomp.parsing.parser.FeatureSet;
import com.google.javascript.rhino.IR;
import com.google.javascript.rhino.Node;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
/**
* Pass factories and meta-data for native JSCompiler passes.
*
* @author [email protected] (Nick Santos)
*
* NOTE(dimvar): this needs some non-trivial refactoring. The pass config should
* use as little state as possible. The recommended way for a pass to leave
* behind some state for a subsequent pass is through the compiler object.
* Any other state remaining here should only be used when the pass config is
* creating the list of checks and optimizations, not after passes have started
* executing. For example, the field namespaceForChecks should be in Compiler.
*/
public final class DefaultPassConfig extends PassConfig {
/* For the --mark-as-compiled pass */
private static final String COMPILED_CONSTANT_NAME = "COMPILED";
/* Constant name for Closure's locale */
private static final String CLOSURE_LOCALE_CONSTANT_NAME = "goog.LOCALE";
static final DiagnosticType CANNOT_USE_PROTOTYPE_AND_VAR =
DiagnosticType.error("JSC_CANNOT_USE_PROTOTYPE_AND_VAR",
"Rename prototypes and inline variables cannot be used together.");
// Miscellaneous errors.
private static final java.util.regex.Pattern GLOBAL_SYMBOL_NAMESPACE_PATTERN =
java.util.regex.Pattern.compile("^[a-zA-Z0-9$_]+$");
/**
* A global namespace to share across checking passes.
*/
private GlobalNamespace namespaceForChecks = null;
/**
* A symbol table for registering references that get removed during
* preprocessing.
*/
private PreprocessorSymbolTable preprocessorSymbolTable = null;
/**
* Global state necessary for doing hotswap recompilation of files with references to
* processed goog.modules.
*/
private ClosureRewriteModule.GlobalRewriteState moduleRewriteState = null;
/**
* Whether to protect "hidden" side-effects.
* @see CheckSideEffects
*/
private final boolean protectHiddenSideEffects;
public DefaultPassConfig(CompilerOptions options) {
super(options);
// The current approach to protecting "hidden" side-effects is to
// wrap them in a function call that is stripped later, this shouldn't
// be done in IDE mode where AST changes may be unexpected.
protectHiddenSideEffects = options != null && options.shouldProtectHiddenSideEffects();
}
GlobalNamespace getGlobalNamespace() {
return namespaceForChecks;
}
PreprocessorSymbolTable getPreprocessorSymbolTable() {
return preprocessorSymbolTable;
}
void maybeInitializePreprocessorSymbolTable(AbstractCompiler compiler) {
if (options.preservesDetailedSourceInfo()) {
Node root = compiler.getRoot();
if (preprocessorSymbolTable == null || preprocessorSymbolTable.getRootNode() != root) {
preprocessorSymbolTable = new PreprocessorSymbolTable(root);
}
}
}
void maybeInitializeModuleRewriteState() {
if (options.allowsHotswapReplaceScript() && this.moduleRewriteState == null) {
this.moduleRewriteState = new ClosureRewriteModule.GlobalRewriteState();
}
}
@Override
protected List<PassFactory> getTranspileOnlyPasses() {
List<PassFactory> passes = new ArrayList<>();
if (options.needsTranspilationFrom(TYPESCRIPT)) {
passes.add(convertEs6TypedToEs6);
}
if (options.getLanguageIn().toFeatureSet().has(FeatureSet.Feature.MODULES)) {
TranspilationPasses.addEs6ModulePass(passes);
}
passes.add(checkMissingSuper);
passes.add(checkVariableReferencesForTranspileOnly);
// It's important that the Dart super accessors pass run *before* es6ConvertSuper,
// which is a "late" ES6 pass. This is enforced in the assertValidOrder method.
if (options.dartPass && options.needsTranspilationFrom(ES6)) {
passes.add(dartSuperAccessorsPass);
}
if (options.needsTranspilationFrom(ES8)) {
TranspilationPasses.addEs2017Passes(passes);
passes.add(setFeatureSet(ES7));
}
if (options.needsTranspilationFrom(ES7)) {
TranspilationPasses.addEs2016Passes(passes);
passes.add(setFeatureSet(ES6));
}
// If the user has specified an input language of ES7 and an output language of ES6 or lower,
// we still need to run these "ES6" passes, because they do the transpilation of the ES7 **
// operator. If we split that into its own pass then the needsTranspilationFrom(ES7) call here
// can be removed.
if (options.needsTranspilationFrom(ES6) || options.needsTranspilationFrom(ES7)) {
TranspilationPasses.addEs6EarlyPasses(passes);
TranspilationPasses.addEs6LatePasses(passes);
TranspilationPasses.addPostCheckPasses(passes);
if (options.rewritePolyfills) {
TranspilationPasses.addRewritePolyfillPass(passes);
}
passes.add(setFeatureSet(options.getLanguageOut().toFeatureSet()));
}
if (!options.forceLibraryInjection.isEmpty()) {
passes.add(injectRuntimeLibraries);
}
assertAllOneTimePasses(passes);
assertValidOrderForChecks(passes);
return passes;
}
@Override
protected List<PassFactory> getWhitespaceOnlyPasses() {
List<PassFactory> passes = new ArrayList<>();
if (options.wrapGoogModulesForWhitespaceOnly) {
passes.add(whitespaceWrapGoogModules);
}
return passes;
}
private void addNewTypeCheckerPasses(List<PassFactory> checks, CompilerOptions options) {
if (options.getNewTypeInference()) {
checks.add(symbolTableForNewTypeInference);
checks.add(newTypeInference);
}
}
private void addOldTypeCheckerPasses(List<PassFactory> checks, CompilerOptions options) {
if (!options.allowsHotswapReplaceScript()) {
checks.add(inlineTypeAliases);
}
if (options.checkTypes || options.inferTypes) {
checks.add(resolveTypes);
checks.add(inferTypes);
if (options.checkTypes) {
checks.add(checkTypes);
} else {
checks.add(inferJsDocInfo);
}
// We assume that only clients who are going to re-compile, or do in-depth static analysis,
// will need the typed scope creator after the compile job.
if (!options.preservesDetailedSourceInfo() && !options.allowsHotswapReplaceScript()) {
checks.add(clearTypedScopePass);
}
}
}
@Override
protected List<PassFactory> getChecks() {
List<PassFactory> checks = new ArrayList<>();
if (options.shouldGenerateTypedExterns()) {
checks.add(closureGoogScopeAliases);
checks.add(closureRewriteClass);
checks.add(generateIjs);
checks.add(whitespaceWrapGoogModules);
return checks;
}
checks.add(createEmptyPass("beforeStandardChecks"));
// Note: ChromePass can rewrite invalid @type annotations into valid ones, so should run before
// JsDoc checks.
if (options.isChromePassEnabled()) {
checks.add(chromePass);
}
// Verify JsDoc annotations and check ES6 modules
checks.add(checkJsDocAndEs6Modules);
if (options.needsTranspilationFrom(TYPESCRIPT)) {
checks.add(convertEs6TypedToEs6);
}
if (options.enables(DiagnosticGroups.LINT_CHECKS)) {
checks.add(lintChecks);
}
if (options.closurePass && options.enables(DiagnosticGroups.LINT_CHECKS)) {
checks.add(checkRequiresAndProvidesSorted);
}
if (options.enables(DiagnosticGroups.MISSING_REQUIRE)
|| options.enables(DiagnosticGroups.STRICT_MISSING_REQUIRE)
|| options.enables(DiagnosticGroups.EXTRA_REQUIRE)) {
checks.add(checkRequires);
}
if (options.getLanguageIn().toFeatureSet().has(FeatureSet.Feature.MODULES)) {
TranspilationPasses.addEs6ModulePass(checks);
}
checks.add(checkVariableReferences);
checks.add(checkStrictMode);
if (options.closurePass) {
checks.add(closureCheckModule);
checks.add(closureRewriteModule);
}
if (options.declaredGlobalExternsOnWindow) {
checks.add(declaredGlobalExternsOnWindow);
}
checks.add(checkMissingSuper);
if (options.closurePass) {
checks.add(closureGoogScopeAliases);
checks.add(closureRewriteClass);
}
checks.add(checkSideEffects);
if (options.enables(DiagnosticGroups.MISSING_PROVIDE)) {
checks.add(checkProvides);
}
if (options.angularPass) {
checks.add(angularPass);
}
if (!options.generateExportsAfterTypeChecking && options.generateExports) {
checks.add(generateExports);
}
if (options.exportTestFunctions) {
checks.add(exportTestFunctions);
}
if (options.closurePass) {
checks.add(closurePrimitives);
}
// It's important that the PolymerPass run *after* the ClosurePrimitives and ChromePass rewrites
// and *before* the suspicious code checks. This is enforced in the assertValidOrder method.
if (options.polymerVersion != null) {
checks.add(polymerPass);
}
if (options.checkSuspiciousCode
|| options.enables(DiagnosticGroups.GLOBAL_THIS)
|| options.enables(DiagnosticGroups.DEBUGGER_STATEMENT_PRESENT)) {
checks.add(suspiciousCode);
}
if (options.closurePass && options.checkMissingGetCssNameLevel.isOn()) {
checks.add(closureCheckGetCssName);
}
if (options.syntheticBlockStartMarker != null) {
// This pass must run before the first fold constants pass.
checks.add(createSyntheticBlocks);
}
checks.add(checkVars);
if (options.inferConsts) {
checks.add(inferConsts);
}
if (options.computeFunctionSideEffects) {
checks.add(checkRegExp);
}
// This pass should run before types are assigned.
if (options.processObjectPropertyString) {
checks.add(objectPropertyStringPreprocess);
}
// It's important that the Dart super accessors pass run *before* es6ConvertSuper,
// which is a "late" ES6 pass. This is enforced in the assertValidOrder method.
if (options.dartPass && !options.getLanguageOut().toFeatureSet().contains(FeatureSet.ES6)) {
checks.add(dartSuperAccessorsPass);
}
if (options.needsTranspilationFrom(ES8)) {
TranspilationPasses.addEs2017Passes(checks);
checks.add(setFeatureSet(ES7));
}
if (options.needsTranspilationFrom(ES7) && !options.getTypeCheckEs6Natively()) {
TranspilationPasses.addEs2016Passes(checks);
checks.add(setFeatureSet(ES6));
}
if (options.needsTranspilationFrom(ES6)) {
checks.add(es6ExternsCheck);
TranspilationPasses.addEs6EarlyPasses(checks);
}
if (options.needsTranspilationFrom(ES6)) {
if (options.getTypeCheckEs6Natively()) {
TranspilationPasses.addEs6PassesBeforeNTI(checks);
} else {
TranspilationPasses.addEs6LatePasses(checks);
}
}
if (options.rewritePolyfills) {
TranspilationPasses.addRewritePolyfillPass(checks);
}
if (options.needsTranspilationFrom(ES6)) {
if (options.getTypeCheckEs6Natively()) {
checks.add(setFeatureSet(FeatureSet.NTI_SUPPORTED));
} else {
// TODO(bradfordcsmith): This marking is really about how variable scoping is handled during
// type checking. It should really be handled in a more direct fashion.
checks.add(setFeatureSet(options.getLanguageOut().toFeatureSet()));
}
}
if (!options.forceLibraryInjection.isEmpty()) {
checks.add(injectRuntimeLibraries);
}
if (options.needsTranspilationFrom(ES6)) {
checks.add(convertStaticInheritance);
}
// End of ES6 transpilation passes before NTI.
if (options.getTypeCheckEs6Natively()) {
if (!options.skipNonTranspilationPasses) {
checks.add(createEmptyPass(PassNames.BEFORE_TYPE_CHECKING));
addNewTypeCheckerPasses(checks, options);
}
if (options.needsTranspilationFrom(ES7)) {
TranspilationPasses.addEs2016Passes(checks);
checks.add(setFeatureSet(ES6));
}
if (options.needsTranspilationFrom(ES6)) {
TranspilationPasses.addEs6PassesAfterNTI(checks);
checks.add(setFeatureSet(options.getLanguageOut().toFeatureSet()));
}
}
if (!options.skipNonTranspilationPasses) {
addNonTranspilationCheckPasses(checks);
}
if (options.needsTranspilationFrom(ES6) && !options.inIncrementalCheckMode()) {
TranspilationPasses.addPostCheckPasses(checks);
}
// NOTE(dimvar): Tried to move this into the optimizations, but had to back off
// because the very first pass, normalization, rewrites the code in a way that
// causes loss of type information.
// So, I will convert the remaining optimizations to use TypeI and test that only
// in unit tests, not full builds. Once all passes are converted, then
// drop the OTI-after-NTI altogether.
// In addition, I will probably have a local edit of the repo that retains both
// types on Nodes, so I can test full builds on my machine. We can't check in such
// a change because it would greatly increase memory usage.
if (options.getNewTypeInference() && options.getRunOTIafterNTI()) {
addOldTypeCheckerPasses(checks, options);
}
// When options.generateExportsAfterTypeChecking is true, run GenerateExports after
// both type checkers, not just after NTI.
if (options.generateExportsAfterTypeChecking && options.generateExports) {
checks.add(generateExports);
}
checks.add(createEmptyPass(PassNames.AFTER_STANDARD_CHECKS));
assertAllOneTimePasses(checks);
assertValidOrderForChecks(checks);
return checks;
}
private void addNonTranspilationCheckPasses(List<PassFactory> checks) {
if (!options.getTypeCheckEs6Natively()) {
checks.add(createEmptyPass(PassNames.BEFORE_TYPE_CHECKING));
addNewTypeCheckerPasses(checks, options);
}
if (options.j2clPassMode.shouldAddJ2clPasses()) {
checks.add(j2clSourceFileChecker);
}
if (!options.getNewTypeInference()) {
addOldTypeCheckerPasses(checks, options);
}
if (!options.disables(DiagnosticGroups.CHECK_USELESS_CODE)
|| (!options.getNewTypeInference() && !options.disables(DiagnosticGroups.MISSING_RETURN))) {
checks.add(checkControlFlow);
}
// CheckAccessControls only works if check types is on.
if (options.isTypecheckingEnabled()
&& (!options.disables(DiagnosticGroups.ACCESS_CONTROLS)
|| options.enables(DiagnosticGroups.CONSTANT_PROPERTY))) {
checks.add(checkAccessControls);
}
if (!options.getNewTypeInference()) {
// NTI performs this check already
checks.add(checkConsts);
}
// Analyzer checks must be run after typechecking.
if (options.enables(DiagnosticGroups.ANALYZER_CHECKS) && options.isTypecheckingEnabled()) {
checks.add(analyzerChecks);
}
if (options.checkGlobalNamesLevel.isOn()) {
checks.add(checkGlobalNames);
}
if (!options.getConformanceConfigs().isEmpty()) {
checks.add(checkConformance);
}
// Replace 'goog.getCssName' before processing defines but after the
// other checks have been done.
if (options.closurePass) {
checks.add(closureReplaceGetCssName);
}
if (options.getTweakProcessing().isOn()) {
checks.add(processTweaks);
}
if (options.instrumentationTemplate != null || options.recordFunctionInformation) {
checks.add(computeFunctionNames);
}
if (options.checksOnly) {
// Run process defines here so that warnings/errors from that pass are emitted as part of
// checks.
// TODO(rluble): Split process defines into two stages, one that performs only checks to be
// run here, and the one that actually changes the AST that would run in the optimization
// phase.
checks.add(processDefines);
}
if (options.j2clPassMode.shouldAddJ2clPasses()) {
checks.add(j2clChecksPass);
}
}
@Override
protected List<PassFactory> getOptimizations() {
List<PassFactory> passes = new ArrayList<>();
if (options.skipNonTranspilationPasses) {
return passes;
}
passes.add(garbageCollectChecks);
// i18n
// If you want to customize the compiler to use a different i18n pass,
// you can create a PassConfig that calls replacePassFactory
// to replace this.
if (options.replaceMessagesWithChromeI18n) {
passes.add(replaceMessagesForChrome);
} else if (options.messageBundle != null) {
passes.add(replaceMessages);
}
// Defines in code always need to be processed.
passes.add(processDefines);
if (options.getTweakProcessing().shouldStrip()
|| !options.stripTypes.isEmpty()
|| !options.stripNameSuffixes.isEmpty()
|| !options.stripTypePrefixes.isEmpty()
|| !options.stripNamePrefixes.isEmpty()) {
passes.add(stripCode);
}
passes.add(normalize);
// Create extern exports after the normalize because externExports depends on unique names.
if (options.isExternExportsEnabled() || options.externExportsPath != null) {
passes.add(externExports);
}
// Gather property names in externs so they can be queried by the
// optimizing passes.
passes.add(gatherExternProperties);
if (options.instrumentForCoverage) {
passes.add(instrumentForCodeCoverage);
}
// TODO(dimvar): convert this pass to use NTI. Low priority since it's
// mostly unused. Converting it shouldn't block switching to NTI.
if (options.runtimeTypeCheck && !options.getNewTypeInference()) {
passes.add(runtimeTypeCheck);
}
// Inlines functions that perform dynamic accesses to static properties of parameters that are
// typed as {Function}. This turns a dynamic access to a static property of a class definition
// into a fully qualified access and in so doing enables better dead code stripping.
if (options.j2clPassMode.shouldAddJ2clPasses()) {
passes.add(j2clPass);
}
passes.add(createEmptyPass(PassNames.BEFORE_STANDARD_OPTIMIZATIONS));
if (options.replaceIdGenerators) {
passes.add(replaceIdGenerators);
}
// Optimizes references to the arguments variable.
if (options.optimizeArgumentsArray) {
passes.add(optimizeArgumentsArray);
}
// Abstract method removal works best on minimally modified code, and also
// only needs to run once.
if (options.closurePass && (options.removeAbstractMethods || options.removeClosureAsserts)) {
passes.add(closureCodeRemoval);
}
if (options.removeJ2clAsserts) {
passes.add(j2clAssertRemovalPass);
}
// Property disambiguation should only run once and needs to be done
// soon after type checking, both so that it can make use of type
// information and so that other passes can take advantage of the renamed
// properties.
if (options.disambiguatePrivateProperties) {
passes.add(disambiguatePrivateProperties);
}
assertAllOneTimePasses(passes);
// Inline aliases so that following optimizations don't have to understand alias chains.
if (options.collapseProperties) {
passes.add(aggressiveInlineAliases);
}
// Inline getters/setters in J2CL classes so that Object.defineProperties() calls (resulting
// from desugaring) don't block class stripping.
if (options.j2clPassMode.shouldAddJ2clPasses() && options.collapseProperties) {
// Relies on collapseProperties-triggered aggressive alias inlining.
passes.add(j2clPropertyInlinerPass);
}
// Collapsing properties can undo constant inlining, so we do this before
// the main optimization loop.
if (options.collapseProperties) {
passes.add(collapseProperties);
}
if (options.inferConsts) {
passes.add(inferConsts);
}
if (options.reportPath != null && options.smartNameRemoval) {
passes.add(initNameAnalyzeReport);
}
// TODO(mlourenco): Ideally this would be in getChecks() instead of getOptimizations(). But
// for that it needs to understand constant properties as well. See b/31301233#10.
// Needs to happen after inferConsts and collapseProperties. Detects whether invocations of
// the method goog.string.Const.from are done with an argument which is a string literal.
passes.add(checkConstParams);
// Running smart name removal before disambiguate properties allows disambiguate properties
// to be more effective if code that would prevent disambiguation can be removed.
if (options.extraSmartNameRemoval && options.smartNameRemoval) {
// These passes remove code that is dead because of define flags.
// If the dead code is weakly typed, running these passes before property
// disambiguation results in more code removal.
// The passes are one-time on purpose. (The later runs are loopable.)
if (options.foldConstants && (options.inlineVariables || options.inlineLocalVariables)) {
passes.add(earlyInlineVariables);
passes.add(earlyPeepholeOptimizations);
}
passes.add(extraSmartNamePass);
}
// RewritePolyfills is overly generous in the polyfills it adds. After type
// checking and early smart name removal, we can use the new type information
// to figure out which polyfilled prototype methods are actually called, and
// which were "false alarms" (i.e. calling a method of the same name on a
// user-provided class). We also remove any polyfills added by code that
// was smart-name-removed. This is a one-time pass, since it does not work
// after inlining - we do not attempt to aggressively remove polyfills used
// by code that is only flow-sensitively dead.
if (options.rewritePolyfills) {
passes.add(removeUnusedPolyfills);
}
// Property disambiguation should only run once and needs to be done
// soon after type checking, both so that it can make use of type
// information and so that other passes can take advantage of the renamed
// properties.
if (options.shouldDisambiguateProperties() && options.isTypecheckingEnabled()) {
passes.add(disambiguateProperties);
}
if (options.computeFunctionSideEffects) {
passes.add(markPureFunctions);
} else if (options.markNoSideEffectCalls) {
// TODO(user) The properties that this pass adds to CALL and NEW
// AST nodes increase the AST's in-memory size. Given that we are
// already running close to our memory limits, we could run into
// trouble if we end up using the @nosideeffects annotation a lot
// or compute @nosideeffects annotations by looking at function
// bodies. It should be easy to propagate @nosideeffects
// annotations as part of passes that depend on this property and
// store the result outside the AST (which would allow garbage
// collection once the pass is done).
passes.add(markNoSideEffectCalls);
}
if (options.chainCalls) {
passes.add(chainCalls);
}
if (options.smartNameRemoval || options.reportPath != null) {
passes.addAll(getCodeRemovingPasses());
passes.add(smartNamePass);
}
// This needs to come after the inline constants pass, which is run within
// the code removing passes.
if (options.closurePass) {
passes.add(closureOptimizePrimitives);
}
// ReplaceStrings runs after CollapseProperties in order to simplify
// pulling in values of constants defined in enums structures. It also runs
// after disambiguate properties and smart name removal so that it can
// correctly identify logging types and can replace references to string
// expressions.
if (!options.replaceStringsFunctionDescriptions.isEmpty()) {
passes.add(replaceStrings);
}
// TODO(user): This forces a first crack at crossModuleCodeMotion
// before devirtualization. Once certain functions are devirtualized,
// it confuses crossModuleCodeMotion ability to recognized that
// it is recursive.
// TODO(user): This is meant for a temporary quick win.
// In the future, we might want to improve our analysis in
// CrossModuleCodeMotion so we don't need to do this.
if (options.crossModuleCodeMotion) {
passes.add(crossModuleCodeMotion);
}
// Must run after ProcessClosurePrimitives, Es6ConvertSuper, and assertion removals, but
// before OptimizeCalls (specifically, OptimizeParameters) and DevirtualizePrototypeMethods.
if (options.removeSuperMethods) {
passes.add(removeSuperMethodsPass);
}
// Method devirtualization benefits from property disambiguation so
// it should run after that pass but before passes that do
// optimizations based on global names (like cross module code motion
// and inline functions). Smart Name Removal does better if run before
// this pass.
if (options.devirtualizePrototypeMethods) {
passes.add(devirtualizePrototypeMethods);
}
if (options.customPasses != null) {
passes.add(getCustomPasses(
CustomPassExecutionTime.BEFORE_OPTIMIZATION_LOOP));
}
passes.add(createEmptyPass(PassNames.BEFORE_MAIN_OPTIMIZATIONS));
// Because FlowSensitiveInlineVariables does not operate on the global scope due to compilation
// time, we need to run it once before InlineFunctions so that we don't miss inlining
// opportunities when a function will be inlined into the global scope.
if (options.inlineVariables || options.inlineLocalVariables) {
passes.add(flowSensitiveInlineVariables);
}
passes.addAll(getMainOptimizationLoop());
passes.add(createEmptyPass(PassNames.AFTER_MAIN_OPTIMIZATIONS));
passes.add(createEmptyPass("beforeModuleMotion"));
if (options.crossModuleCodeMotion) {
passes.add(crossModuleCodeMotion);
}
if (options.crossModuleMethodMotion) {
passes.add(crossModuleMethodMotion);
}
passes.add(createEmptyPass("afterModuleMotion"));
// Some optimizations belong outside the loop because running them more
// than once would either have no benefit or be incorrect.
if (options.customPasses != null) {
passes.add(getCustomPasses(
CustomPassExecutionTime.AFTER_OPTIMIZATION_LOOP));
}
if (options.inlineVariables || options.inlineLocalVariables) {
passes.add(flowSensitiveInlineVariables);
// After inlining some of the variable uses, some variables are unused.
// Re-run remove unused vars to clean it up.
if (options.removeUnusedVars || options.removeUnusedLocalVars) {
passes.add(lastRemoveUnusedVars());
}
}
// Running this pass again is required to have goog.events compile down to
// nothing when compiled on its own.
if (options.smartNameRemoval) {
passes.add(smartNamePass2);
}
if (options.collapseAnonymousFunctions) {
passes.add(collapseAnonymousFunctions);
}
// Move functions before extracting prototype member declarations.
if (options.moveFunctionDeclarations
// renamePrefixNamescape relies on moveFunctionDeclarations
// to preserve semantics.
|| options.renamePrefixNamespace != null) {
passes.add(moveFunctionDeclarations);
}
if (options.anonymousFunctionNaming == AnonymousFunctionNamingPolicy.MAPPED) {
passes.add(nameMappedAnonymousFunctions);
}
// The mapped name anonymous function pass makes use of information that
// the extract prototype member declarations pass removes so the former
// happens before the latter.
if (options.extractPrototypeMemberDeclarations != ExtractPrototypeMemberDeclarationsMode.OFF) {
passes.add(extractPrototypeMemberDeclarations);
}
if (options.shouldAmbiguateProperties()
&& options.propertyRenaming == PropertyRenamingPolicy.ALL_UNQUOTED
&& options.isTypecheckingEnabled()) {
passes.add(ambiguateProperties);
}
if (options.propertyRenaming == PropertyRenamingPolicy.ALL_UNQUOTED) {
passes.add(renameProperties);
}
// Reserve global names added to the "windows" object.
if (options.reserveRawExports) {
passes.add(gatherRawExports);
}
// This comes after property renaming because quoted property names must
// not be renamed.
if (options.convertToDottedProperties) {
passes.add(convertToDottedProperties);
}
// Property renaming must happen before this pass runs since this
// pass may convert dotted properties into quoted properties. It
// is beneficial to run before alias strings, alias keywords and
// variable renaming.
if (options.rewriteFunctionExpressions) {
passes.add(rewriteFunctionExpressions);
}
// This comes after converting quoted property accesses to dotted property
// accesses in order to avoid aliasing property names.
if (!options.aliasableStrings.isEmpty() || options.aliasAllStrings) {
passes.add(aliasStrings);
}
if (options.coalesceVariableNames) {
// Passes after this point can no longer depend on normalized AST
// assumptions because the code is marked as un-normalized
passes.add(coalesceVariableNames);
// coalesceVariables creates identity assignments and more redundant code
// that can be removed, rerun the peephole optimizations to clean them
// up.
if (options.foldConstants) {
passes.add(peepholeOptimizationsOnce);
}
}
// Passes after this point can no longer depend on normalized AST assumptions.
passes.add(markUnnormalized);
if (options.collapseVariableDeclarations) {
passes.add(exploitAssign);
passes.add(collapseVariableDeclarations);
}
// This pass works best after collapseVariableDeclarations.
passes.add(denormalize);
if (options.instrumentationTemplate != null) {
passes.add(instrumentFunctions);
}
if (options.variableRenaming != VariableRenamingPolicy.ALL) {
// If we're leaving some (or all) variables with their old names,
// then we need to undo any of the markers we added for distinguishing
// local variables ("x" -> "x$jscomp$1").
passes.add(invertContextualRenaming);
}
if (options.variableRenaming != VariableRenamingPolicy.OFF) {
passes.add(renameVars);
}
// This pass should run after names stop changing.
if (options.processObjectPropertyString) {
passes.add(objectPropertyStringPostprocess);
}
if (options.labelRenaming) {
passes.add(renameLabels);
}
if (options.foldConstants) {
passes.add(latePeepholeOptimizations);
}
if (options.anonymousFunctionNaming == AnonymousFunctionNamingPolicy.UNMAPPED) {
passes.add(nameUnmappedAnonymousFunctions);
}
if (protectHiddenSideEffects) {
passes.add(stripSideEffectProtection);
}
if (options.renamePrefixNamespace != null) {
if (!GLOBAL_SYMBOL_NAMESPACE_PATTERN.matcher(
options.renamePrefixNamespace).matches()) {
throw new IllegalArgumentException(
"Illegal character in renamePrefixNamespace name: "
+ options.renamePrefixNamespace);
}
passes.add(rescopeGlobalSymbols);
}
// Safety checks
passes.add(checkAstValidity);
passes.add(varCheckValidity);
// Raise to ES6, if allowed
if (options.getLanguageOut().toFeatureSet().contains(FeatureSet.ES6)) {
passes.add(optimizeToEs6);
}
assertValidOrderForOptimizations(passes);
return passes;
}
/** Creates the passes for the main optimization loop. */
private List<PassFactory> getMainOptimizationLoop() {
List<PassFactory> passes = new ArrayList<>();
if (options.inlineGetters) {
passes.add(inlineSimpleMethods);
}
passes.addAll(getCodeRemovingPasses());
if (options.inlineFunctions || options.inlineLocalFunctions) {
passes.add(inlineFunctions);
}
if (options.shouldInlineProperties() && options.isTypecheckingEnabled()) {
passes.add(inlineProperties);
}
if (options.removeUnusedVars || options.removeUnusedLocalVars) {
if (options.deadAssignmentElimination) {
passes.add(deadAssignmentsElimination);
// The Polymer source is usually not included in the compilation, but it creates
// getters/setters for many properties in compiled code. Dead property assignment
// elimination is only safe when it knows about getters/setters. Therefore, we skip
// it if the polymer pass is enabled.
if (options.polymerVersion == null) {
passes.add(deadPropertyAssignmentElimination);
}
}
}
if (options.optimizeCalls || options.optimizeParameters || options.optimizeReturns) {
passes.add(optimizeCalls);
}
if (options.removeUnusedVars || options.removeUnusedLocalVars) {
passes.add(getRemoveUnusedVars());
}
if (options.j2clPassMode.shouldAddJ2clPasses()) {
passes.add(j2clConstantHoisterPass);
passes.add(j2clClinitPass);
}
assertAllLoopablePasses(passes);
return passes;
}
/** Creates several passes aimed at removing code. */
private List<PassFactory> getCodeRemovingPasses() {
List<PassFactory> passes = new ArrayList<>();
if (options.collapseObjectLiterals) {
passes.add(collapseObjectLiterals);
}
if (options.inlineVariables || options.inlineLocalVariables) {
passes.add(inlineVariables);
} else if (options.inlineConstantVars) {
passes.add(inlineConstants);
}
if (options.foldConstants) {
passes.add(peepholeOptimizations);
}
if (options.removeDeadCode) {
passes.add(removeUnreachableCode);
}
if (options.removeUnusedPrototypeProperties) {
passes.add(removeUnusedPrototypeProperties);
}
if (options.removeUnusedClassProperties) {
passes.add(removeUnusedClassProperties);
}
assertAllLoopablePasses(passes);
return passes;
}
private final HotSwapPassFactory checkSideEffects =
new HotSwapPassFactory("checkSideEffects") {
@Override
protected HotSwapCompilerPass create(final AbstractCompiler compiler) {
return new CheckSideEffects(
compiler, options.checkSuspiciousCode, protectHiddenSideEffects);
}
@Override
protected FeatureSet featureSet() {
return ES8_MODULES;
}
};
/** Removes the "protector" functions that were added by CheckSideEffects. */
private final PassFactory stripSideEffectProtection =
new PassFactory(PassNames.STRIP_SIDE_EFFECT_PROTECTION, true) {
@Override
protected CompilerPass create(final AbstractCompiler compiler) {
return new CheckSideEffects.StripProtection(compiler);
}
@Override
public FeatureSet featureSet() {
return FeatureSet.latest();
}
};
/** Checks for code that is probably wrong (such as stray expressions). */
private final HotSwapPassFactory suspiciousCode =
new HotSwapPassFactory("suspiciousCode") {
@Override
protected HotSwapCompilerPass create(final AbstractCompiler compiler) {
List<Callback> sharedCallbacks = new ArrayList<>();
if (options.checkSuspiciousCode) {
sharedCallbacks.add(new CheckSuspiciousCode());
sharedCallbacks.add(new CheckDuplicateCase(compiler));
}
if (options.enables(DiagnosticGroups.GLOBAL_THIS)) {
sharedCallbacks.add(new CheckGlobalThis(compiler));
}
if (options.enables(DiagnosticGroups.DEBUGGER_STATEMENT_PRESENT)) {
sharedCallbacks.add(new CheckDebuggerStatement(compiler));
}
return combineChecks(compiler, sharedCallbacks);
}
@Override
protected FeatureSet featureSet() {
return ES8_MODULES;
}
};
/** Verify that all the passes are one-time passes. */
private static void assertAllOneTimePasses(List<PassFactory> passes) {
for (PassFactory pass : passes) {
checkState(pass.isOneTimePass());
}
}
/** Verify that all the passes are multi-run passes. */
private static void assertAllLoopablePasses(List<PassFactory> passes) {
for (PassFactory pass : passes) {
checkState(!pass.isOneTimePass());
}
}
/**
* Checks that {@code pass1} comes before {@code pass2} in {@code passList}, if both are present.
*/
private void assertPassOrder(
List<PassFactory> passList, PassFactory pass1, PassFactory pass2, String msg) {
int pass1Index = passList.indexOf(pass1);
int pass2Index = passList.indexOf(pass2);
if (pass1Index != -1 && pass2Index != -1) {
checkState(pass1Index < pass2Index, msg);
}
}
/**
* Certain checks need to run in a particular order. For example, the PolymerPass
* will not work correctly unless it runs after the goog.provide() processing.
* This enforces those constraints.
* @param checks The list of check passes
*/
private void assertValidOrderForChecks(List<PassFactory> checks) {
assertPassOrder(
checks,
chromePass,
checkJsDocAndEs6Modules,
"The ChromePass must run before after JsDoc and Es6 module checking.");
assertPassOrder(
checks,
closureRewriteModule,
processDefines,
"Must rewrite goog.module before processing @define's, so that @defines in modules work.");
assertPassOrder(
checks,
closurePrimitives,
polymerPass,
"The Polymer pass must run after goog.provide processing.");
assertPassOrder(
checks,
chromePass,
polymerPass,
"The Polymer pass must run after ChromePass processing.");
assertPassOrder(
checks,
polymerPass,
suspiciousCode,
"The Polymer pass must run before suspiciousCode processing.");
assertPassOrder(
checks,
dartSuperAccessorsPass,
TranspilationPasses.es6ConvertSuper,
"The Dart super accessors pass must run before ES6->ES3 super lowering.");
if (checks.contains(closureGoogScopeAliases)) {
checkState(
checks.contains(checkVariableReferences),
"goog.scope processing requires variable checking");
}
assertPassOrder(
checks,
checkVariableReferences,
closureGoogScopeAliases,
"Variable checking must happen before goog.scope processing.");
assertPassOrder(
checks,
TranspilationPasses.es6ConvertSuper,
removeSuperMethodsPass,
"Super-call method removal must run after Es6 super rewriting, "
+ "because Es6 super calls are matched on their post-processed form.");
assertPassOrder(
checks,
closurePrimitives,
removeSuperMethodsPass,
"Super-call method removal must run after Es6 super rewriting, "
+ "because Closure base calls are expected to be in post-processed form.");
assertPassOrder(
checks,
closureCodeRemoval,
removeSuperMethodsPass,
"Super-call method removal must run after closure code removal, because "
+ "removing assertions may make more super calls eligible to be stripped.");
}
/**
* Certain optimizations need to run in a particular order. For example, OptimizeCalls must run
* before RemoveSuperMethodsPass, because the former can invalidate assumptions in the latter.
* This enforces those constraints.
* @param optimizations The list of optimization passes
*/
private void assertValidOrderForOptimizations(List<PassFactory> optimizations) {
assertPassOrder(optimizations, removeSuperMethodsPass, optimizeCalls,
"RemoveSuperMethodsPass must run before OptimizeCalls.");
assertPassOrder(optimizations, removeSuperMethodsPass, devirtualizePrototypeMethods,
"RemoveSuperMethodsPass must run before DevirtualizePrototypeMethods.");
}
/** Checks that all constructed classes are goog.require()d. */
private final HotSwapPassFactory checkRequires =
new HotSwapPassFactory("checkMissingAndExtraRequires") {
@Override
protected HotSwapCompilerPass create(AbstractCompiler compiler) {
return new CheckMissingAndExtraRequires(
compiler, CheckMissingAndExtraRequires.Mode.FULL_COMPILE);
}
@Override
protected FeatureSet featureSet() {
return ES8_MODULES;
}
};
/** Makes sure @constructor is paired with goog.provides(). */
private final HotSwapPassFactory checkProvides =
new HotSwapPassFactory("checkProvides") {
@Override
protected HotSwapCompilerPass create(AbstractCompiler compiler) {
return new CheckProvides(compiler);
}
@Override
protected FeatureSet featureSet() {
return ES8_MODULES;
}
};
private static final DiagnosticType GENERATE_EXPORTS_ERROR =
DiagnosticType.error(
"JSC_GENERATE_EXPORTS_ERROR",
"Exports can only be generated if export symbol/property functions are set.");
/** Verifies JSDoc annotations are used properly and checks for ES6 modules. */
private final HotSwapPassFactory checkJsDocAndEs6Modules =
new HotSwapPassFactory("checkJsDocAndEs6Modules") {
@Override
protected HotSwapCompilerPass create(AbstractCompiler compiler) {
ImmutableList.Builder<Callback> callbacks =
ImmutableList.<Callback>builder()
.add(new CheckJSDoc(compiler))
.add(new Es6CheckModule(compiler));
return combineChecks(compiler, callbacks.build());
}
@Override
protected FeatureSet featureSet() {
return FeatureSet.latest();
}
};
/** Generates exports for @export annotations. */
private final PassFactory generateExports =
new PassFactory(PassNames.GENERATE_EXPORTS, true) {
@Override
protected CompilerPass create(final AbstractCompiler compiler) {
CodingConvention convention = compiler.getCodingConvention();
if (convention.getExportSymbolFunction() != null
&& convention.getExportPropertyFunction() != null) {
final GenerateExports pass =
new GenerateExports(
compiler,
options.exportLocalPropertyDefinitions,
convention.getExportSymbolFunction(),
convention.getExportPropertyFunction());
return new CompilerPass() {
@Override
public void process(Node externs, Node root) {
pass.process(externs, root);
compiler.addExportedNames(pass.getExportedVariableNames());
}
};
} else {
return new ErrorPass(compiler, GENERATE_EXPORTS_ERROR);
}
}
@Override
protected FeatureSet featureSet() {
return ES8;
}
};
private final PassFactory generateIjs =
new PassFactory("generateIjs", true) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
return new ConvertToTypedInterface(compiler);
}
@Override
protected FeatureSet featureSet() {
return ES8_MODULES;
}
};
/** Generates exports for functions associated with JsUnit. */
private final PassFactory exportTestFunctions =
new PassFactory(PassNames.EXPORT_TEST_FUNCTIONS, true) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
CodingConvention convention = compiler.getCodingConvention();
if (convention.getExportSymbolFunction() != null) {
return new ExportTestFunctions(
compiler,
convention.getExportSymbolFunction(),
convention.getExportPropertyFunction());
} else {
return new ErrorPass(compiler, GENERATE_EXPORTS_ERROR);
}
}
@Override
protected FeatureSet featureSet() {
return ES8_MODULES;
}
};
/** Raw exports processing pass. */
private final PassFactory gatherRawExports =
new PassFactory(PassNames.GATHER_RAW_EXPORTS, true) {
@Override
protected CompilerPass create(final AbstractCompiler compiler) {
final GatherRawExports pass = new GatherRawExports(compiler);
return new CompilerPass() {
@Override
public void process(Node externs, Node root) {
pass.process(externs, root);
compiler.addExportedNames(pass.getExportedVariableNames());
}
};
}
@Override
public FeatureSet featureSet() {
// Should be FeatureSet.latest() since it's a trivial pass, but must match "normalize"
// TODO(johnlenz): Update this and normalize to latest()
return ES8_MODULES;
}
};
/** Closure pre-processing pass. */
private final HotSwapPassFactory closurePrimitives =
new HotSwapPassFactory("closurePrimitives") {
@Override
protected HotSwapCompilerPass create(final AbstractCompiler compiler) {
maybeInitializePreprocessorSymbolTable(compiler);
final ProcessClosurePrimitives pass =
new ProcessClosurePrimitives(
compiler,
preprocessorSymbolTable,
options.brokenClosureRequiresLevel,
options.shouldPreservesGoogProvidesAndRequires());
return new HotSwapCompilerPass() {
@Override
public void process(Node externs, Node root) {
pass.process(externs, root);
compiler.addExportedNames(pass.getExportedVariableNames());
}
@Override
public void hotSwapScript(Node scriptRoot, Node originalRoot) {
pass.hotSwapScript(scriptRoot, originalRoot);
}
};
}
@Override
protected FeatureSet featureSet() {
return ES8_MODULES;
}
};
/** Process AngularJS-specific annotations. */
private final HotSwapPassFactory angularPass =
new HotSwapPassFactory(PassNames.ANGULAR_PASS) {
@Override
protected HotSwapCompilerPass create(AbstractCompiler compiler) {
return new AngularPass(compiler);
}
@Override
public FeatureSet featureSet() {
return ES8_MODULES;
}
};
/**
* The default i18n pass. A lot of the options are not configurable, because ReplaceMessages has a
* lot of legacy logic.
*/
private final PassFactory replaceMessages =
new PassFactory(PassNames.REPLACE_MESSAGES, true) {
@Override
protected CompilerPass create(final AbstractCompiler compiler) {
return new ReplaceMessages(
compiler,
options.messageBundle,
/* warn about message dupes */
true,
/* allow messages with goog.getMsg */
JsMessage.Style.CLOSURE,
/* if we can't find a translation, don't worry about it. */
false);
}
@Override
public FeatureSet featureSet() {
return ES8_MODULES;
}
};
private final PassFactory replaceMessagesForChrome =
new PassFactory(PassNames.REPLACE_MESSAGES, true) {
@Override
protected CompilerPass create(final AbstractCompiler compiler) {
return new ReplaceMessagesForChrome(
compiler,
new GoogleJsMessageIdGenerator(options.tcProjectId),
/* warn about message dupes */
true,
/* allow messages with goog.getMsg */
JsMessage.Style.CLOSURE);
}
@Override
public FeatureSet featureSet() {
return ES8_MODULES;
}
};
/** Applies aliases and inlines goog.scope. */
private final HotSwapPassFactory closureGoogScopeAliases =
new HotSwapPassFactory("closureGoogScopeAliases") {
@Override
protected HotSwapCompilerPass create(AbstractCompiler compiler) {
maybeInitializePreprocessorSymbolTable(compiler);
return new ScopedAliases(
compiler, preprocessorSymbolTable, options.getAliasTransformationHandler());
}
@Override
protected FeatureSet featureSet() {
return ES8_MODULES;
}
};
private final PassFactory injectRuntimeLibraries =
new PassFactory("InjectRuntimeLibraries", true) {
@Override
protected CompilerPass create(final AbstractCompiler compiler) {
return new InjectRuntimeLibraries(compiler);
}
@Override
protected FeatureSet featureSet() {
return ES8_MODULES;
}
};
private final PassFactory es6ExternsCheck =
new PassFactory("es6ExternsCheck", true) {
@Override
protected CompilerPass create(final AbstractCompiler compiler) {
return new Es6ExternsCheck(compiler);
}
@Override
protected FeatureSet featureSet() {
return ES8_MODULES;
}
};
/** Desugars ES6_TYPED features into ES6 code. */
final HotSwapPassFactory convertEs6TypedToEs6 =
new HotSwapPassFactory("convertEs6Typed") {
@Override
protected HotSwapCompilerPass create(final AbstractCompiler compiler) {
return new Es6TypedToEs6Converter(compiler);
}
@Override
protected FeatureSet featureSet() {
return TYPESCRIPT;
}
};
private final PassFactory convertStaticInheritance =
new PassFactory("Es6StaticInheritance", true) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
return new Es6ToEs3ClassSideInheritance(compiler);
}
@Override
protected FeatureSet featureSet() {
return ES5;
}
};
private final PassFactory inlineTypeAliases =
new PassFactory(PassNames.INLINE_TYPE_ALIASES, true) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
return new InlineAliases(compiler);
}
@Override
protected FeatureSet featureSet() {
return ES6;
}
};
/** Inlines type aliases if they are explicitly or effectively const. */
private final PassFactory aggressiveInlineAliases =
new PassFactory("aggressiveInlineAliases", true) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
return new AggressiveInlineAliases(compiler);
}
};
private final PassFactory setFeatureSet(final FeatureSet featureSet) {
return new PassFactory("setFeatureSet:" + featureSet.version(), true) {
@Override
protected CompilerPass create(final AbstractCompiler compiler) {
return new CompilerPass() {
@Override
public void process(Node externs, Node root) {
compiler.setFeatureSet(featureSet);
}
};
}
@Override
public FeatureSet featureSet() {
return FeatureSet.latest();
}
};
}
private final PassFactory declaredGlobalExternsOnWindow =
new PassFactory(PassNames.DECLARED_GLOBAL_EXTERNS_ON_WINDOW, true) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
return new DeclaredGlobalExternsOnWindow(compiler);
}
@Override
protected FeatureSet featureSet() {
return ES8_MODULES;
}
};
/** Rewrites goog.defineClass */
private final HotSwapPassFactory closureRewriteClass =
new HotSwapPassFactory(PassNames.CLOSURE_REWRITE_CLASS) {
@Override
protected HotSwapCompilerPass create(AbstractCompiler compiler) {
return new ClosureRewriteClass(compiler);
}
@Override
protected FeatureSet featureSet() {
return ES8_MODULES;
}
};
/** Checks of correct usage of goog.module */
private final HotSwapPassFactory closureCheckModule =
new HotSwapPassFactory("closureCheckModule") {
@Override
protected HotSwapCompilerPass create(AbstractCompiler compiler) {
return new ClosureCheckModule(compiler);
}
@Override
protected FeatureSet featureSet() {
return ES8_MODULES;
}
};
/** Rewrites goog.module */
private final HotSwapPassFactory closureRewriteModule =
new HotSwapPassFactory("closureRewriteModule") {
@Override
protected HotSwapCompilerPass create(AbstractCompiler compiler) {
maybeInitializePreprocessorSymbolTable(compiler);
maybeInitializeModuleRewriteState();
return new ClosureRewriteModule(compiler, preprocessorSymbolTable, moduleRewriteState);
}
@Override
protected FeatureSet featureSet() {
return ES8_MODULES;
}
};
/** Checks that CSS class names are wrapped in goog.getCssName */
private final PassFactory closureCheckGetCssName =
new PassFactory("closureCheckGetCssName", true) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
return new CheckMissingGetCssName(
compiler,
options.checkMissingGetCssNameLevel,
options.checkMissingGetCssNameBlacklist);
}
@Override
protected FeatureSet featureSet() {
return ES8_MODULES;
}
};
/**
* Processes goog.getCssName. The cssRenamingMap is used to lookup
* replacement values for the classnames. If null, the raw class names are
* inlined.
*/
private final PassFactory closureReplaceGetCssName =
new PassFactory("closureReplaceGetCssName", true) {
@Override
protected CompilerPass create(final AbstractCompiler compiler) {
return new CompilerPass() {
@Override
public void process(Node externs, Node jsRoot) {
Map<String, Integer> newCssNames = null;
if (options.gatherCssNames) {
newCssNames = new HashMap<>();
}
ReplaceCssNames pass = new ReplaceCssNames(
compiler,
newCssNames,
options.cssRenamingWhitelist);
pass.process(externs, jsRoot);
compiler.setCssNames(newCssNames);
}
};
}
@Override
protected FeatureSet featureSet() {
return ES8_MODULES;
}
};
/**
* Creates synthetic blocks to prevent FoldConstants from moving code past markers in the source.
*/
private final PassFactory createSyntheticBlocks =
new PassFactory("createSyntheticBlocks", true) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
return new CreateSyntheticBlocks(
compiler, options.syntheticBlockStartMarker, options.syntheticBlockEndMarker);
}
@Override
protected FeatureSet featureSet() {
return ES8_MODULES;
}
};
private final PassFactory earlyPeepholeOptimizations =
new PassFactory("earlyPeepholeOptimizations", true) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
List<AbstractPeepholeOptimization> peepholeOptimizations = new ArrayList<>();
peepholeOptimizations.add(new PeepholeRemoveDeadCode());
if (compiler.getOptions().j2clPassMode.shouldAddJ2clPasses()) {
peepholeOptimizations.add(new J2clEqualitySameRewriterPass());
}
return new PeepholeOptimizationsPass(compiler, getName(), peepholeOptimizations);
}
@Override
protected FeatureSet featureSet() {
return ES8_MODULES;
}
};
private final PassFactory earlyInlineVariables =
new PassFactory("earlyInlineVariables", true) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
InlineVariables.Mode mode;
if (options.inlineVariables) {
mode = InlineVariables.Mode.ALL;
} else if (options.inlineLocalVariables) {
mode = InlineVariables.Mode.LOCALS_ONLY;
} else {
throw new IllegalStateException("No variable inlining option set.");
}
return new InlineVariables(compiler, mode, true);
}
@Override
protected FeatureSet featureSet() {
return ES8_MODULES;
}
};
/** Various peephole optimizations. */
private static CompilerPass createPeepholeOptimizationsPass(
AbstractCompiler compiler, String passName) {
final boolean late = false;
final boolean useTypesForOptimization = compiler.getOptions().useTypesForLocalOptimization;
List<AbstractPeepholeOptimization> optimizations = new ArrayList<>();
optimizations.add(new MinimizeExitPoints(compiler));
optimizations.add(new PeepholeMinimizeConditions(late));
optimizations.add(new PeepholeSubstituteAlternateSyntax(late));
optimizations.add(new PeepholeReplaceKnownMethods(late, useTypesForOptimization));
optimizations.add(new PeepholeRemoveDeadCode());
if (compiler.getOptions().j2clPassMode.shouldAddJ2clPasses()) {
optimizations.add(new J2clEqualitySameRewriterPass());
}
optimizations.add(new PeepholeFoldConstants(late, useTypesForOptimization));
optimizations.add(new PeepholeCollectPropertyAssignments());
return new PeepholeOptimizationsPass(compiler, passName, optimizations);
}
/** Various peephole optimizations. */
private final PassFactory peepholeOptimizations =
new PassFactory(PassNames.PEEPHOLE_OPTIMIZATIONS, false /* oneTimePass */) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
return createPeepholeOptimizationsPass(compiler, getName());
}
@Override
protected FeatureSet featureSet() {
return ES8_MODULES;
}
};
/** Various peephole optimizations. */
private final PassFactory peepholeOptimizationsOnce =
new PassFactory(PassNames.PEEPHOLE_OPTIMIZATIONS, true /* oneTimePass */) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
return createPeepholeOptimizationsPass(compiler, getName());
}
@Override
protected FeatureSet featureSet() {
return ES8_MODULES;
}
};
/** Same as peepholeOptimizations but aggressively merges code together */
private final PassFactory latePeepholeOptimizations =
new PassFactory("latePeepholeOptimizations", true) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
final boolean late = true;
final boolean useTypesForOptimization = options.useTypesForLocalOptimization;
return new PeepholeOptimizationsPass(
compiler,
getName(),
new StatementFusion(options.aggressiveFusion),
new PeepholeRemoveDeadCode(),
new PeepholeMinimizeConditions(late),
new PeepholeSubstituteAlternateSyntax(late),
new PeepholeReplaceKnownMethods(late, useTypesForOptimization),
new PeepholeFoldConstants(late, useTypesForOptimization),
new PeepholeReorderConstantExpression());
}
};
/** Checks that all variables are defined. */
private final HotSwapPassFactory checkVars =
new HotSwapPassFactory(PassNames.CHECK_VARS) {
@Override
protected HotSwapCompilerPass create(AbstractCompiler compiler) {
return new VarCheck(compiler);
}
@Override
protected FeatureSet featureSet() {
return ES8_MODULES;
}
};
/** Infers constants. */
private final PassFactory inferConsts =
new PassFactory(PassNames.INFER_CONSTS, true) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
return new InferConsts(compiler);
}
@Override
protected FeatureSet featureSet() {
return ES8_MODULES;
}
};
/** Checks for RegExp references. */
private final PassFactory checkRegExp =
new PassFactory(PassNames.CHECK_REG_EXP, true) {
@Override
protected CompilerPass create(final AbstractCompiler compiler) {
final CheckRegExp pass = new CheckRegExp(compiler);
return new CompilerPass() {
@Override
public void process(Node externs, Node root) {
pass.process(externs, root);
compiler.setHasRegExpGlobalReferences(pass.isGlobalRegExpPropertiesUsed());
}
};
}
@Override
protected FeatureSet featureSet() {
return ES8_MODULES;
}
};
/** Checks that references to variables look reasonable. */
private final HotSwapPassFactory checkVariableReferencesForTranspileOnly =
new HotSwapPassFactory(PassNames.CHECK_VARIABLE_REFERENCES) {
@Override
protected HotSwapCompilerPass create(AbstractCompiler compiler) {
return new VariableReferenceCheck(compiler, true);
}
@Override
protected FeatureSet featureSet() {
return ES8_MODULES;
}
};
/** Checks that references to variables look reasonable. */
private final HotSwapPassFactory checkVariableReferences =
new HotSwapPassFactory(PassNames.CHECK_VARIABLE_REFERENCES) {
@Override
protected HotSwapCompilerPass create(AbstractCompiler compiler) {
return new VariableReferenceCheck(compiler);
}
@Override
protected FeatureSet featureSet() {
return ES8_MODULES;
}
};
/** Checks that references to variables look reasonable. */
private final HotSwapPassFactory checkMissingSuper =
new HotSwapPassFactory("checkMissingSuper") {
@Override
protected HotSwapCompilerPass create(AbstractCompiler compiler) {
return new CheckMissingSuper(compiler);
}
@Override
protected FeatureSet featureSet() {
return ES8_MODULES;
}
};
/** Pre-process goog.testing.ObjectPropertyString. */
private final PassFactory objectPropertyStringPreprocess =
new PassFactory("ObjectPropertyStringPreprocess", true) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
return new ObjectPropertyStringPreprocess(compiler);
}
@Override
protected FeatureSet featureSet() {
return ES8_MODULES;
}
};
/** Creates a typed scope and adds types to the type registry. */
final HotSwapPassFactory resolveTypes =
new HotSwapPassFactory(PassNames.RESOLVE_TYPES) {
@Override
protected HotSwapCompilerPass create(AbstractCompiler compiler) {
return new GlobalTypeResolver(compiler);
}
};
/** Clears the typed scope when we're done. */
private final PassFactory clearTypedScopePass =
new PassFactory("clearTypedScopePass", true) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
return new ClearTypedScope();
}
@Override
protected FeatureSet featureSet() {
return FeatureSet.latest();
}
};
/** Runs type inference. */
final HotSwapPassFactory inferTypes =
new HotSwapPassFactory(PassNames.INFER_TYPES) {
@Override
protected HotSwapCompilerPass create(final AbstractCompiler compiler) {
return new HotSwapCompilerPass() {
@Override
public void process(Node externs, Node root) {
checkNotNull(topScope);
checkNotNull(getTypedScopeCreator());
makeTypeInference(compiler).process(externs, root);
}
@Override
public void hotSwapScript(Node scriptRoot, Node originalRoot) {
makeTypeInference(compiler).inferAllScopes(scriptRoot);
}
};
}
};
private final PassFactory symbolTableForNewTypeInference =
new PassFactory("GlobalTypeInfo", true) {
@Override
protected CompilerPass create(final AbstractCompiler compiler) {
return new GlobalTypeInfoCollector(compiler);
}
@Override
protected FeatureSet featureSet() {
return FeatureSet.NTI_SUPPORTED;
}
};
private final PassFactory newTypeInference =
new PassFactory("NewTypeInference", true) {
@Override
protected CompilerPass create(final AbstractCompiler compiler) {
return new NewTypeInference(compiler);
}
@Override
protected FeatureSet featureSet() {
return FeatureSet.NTI_SUPPORTED;
}
};
private final HotSwapPassFactory inferJsDocInfo =
new HotSwapPassFactory("inferJsDocInfo") {
@Override
protected HotSwapCompilerPass create(final AbstractCompiler compiler) {
return new HotSwapCompilerPass() {
@Override
public void process(Node externs, Node root) {
checkNotNull(topScope);
checkNotNull(getTypedScopeCreator());
makeInferJsDocInfo(compiler).process(externs, root);
}
@Override
public void hotSwapScript(Node scriptRoot, Node originalRoot) {
makeInferJsDocInfo(compiler).hotSwapScript(scriptRoot, originalRoot);
}
};
}
};
/** Checks type usage */
private final HotSwapPassFactory checkTypes =
new HotSwapPassFactory(PassNames.CHECK_TYPES) {
@Override
protected HotSwapCompilerPass create(final AbstractCompiler compiler) {
return new HotSwapCompilerPass() {
@Override
public void process(Node externs, Node root) {
checkNotNull(topScope);
checkNotNull(getTypedScopeCreator());
TypeCheck check = makeTypeCheck(compiler);
check.process(externs, root);
compiler.getErrorManager().setTypedPercent(check.getTypedPercent());
}
@Override
public void hotSwapScript(Node scriptRoot, Node originalRoot) {
makeTypeCheck(compiler).check(scriptRoot, false);
}
};
}
};
/**
* Checks possible execution paths of the program for problems: missing return
* statements and dead code.
*/
private final HotSwapPassFactory checkControlFlow =
new HotSwapPassFactory("checkControlFlow") {
@Override
protected HotSwapCompilerPass create(AbstractCompiler compiler) {
List<Callback> callbacks = new ArrayList<>();
if (!options.disables(DiagnosticGroups.CHECK_USELESS_CODE)) {
callbacks.add(new CheckUnreachableCode(compiler));
}
if (!options.getNewTypeInference() && !options.disables(DiagnosticGroups.MISSING_RETURN)) {
callbacks.add(new CheckMissingReturn(compiler));
}
return combineChecks(compiler, callbacks);
}
@Override
public FeatureSet featureSet() {
return ES8_MODULES;
}
};
/** Checks access controls. Depends on type-inference. */
private final HotSwapPassFactory checkAccessControls =
new HotSwapPassFactory("checkAccessControls") {
@Override
protected HotSwapCompilerPass create(AbstractCompiler compiler) {
return new CheckAccessControls(
compiler, options.enforceAccessControlCodingConventions);
}
};
private final HotSwapPassFactory lintChecks =
new HotSwapPassFactory(PassNames.LINT_CHECKS) {
@Override
protected HotSwapCompilerPass create(AbstractCompiler compiler) {
ImmutableList.Builder<Callback> callbacks =
ImmutableList.<Callback>builder()
.add(new CheckEmptyStatements(compiler))
.add(new CheckEnums(compiler))
.add(new CheckInterfaces(compiler))
.add(new CheckJSDocStyle(compiler))
.add(new CheckMissingSemicolon(compiler))
.add(new CheckPrimitiveAsObject(compiler))
.add(new CheckPrototypeProperties(compiler))
.add(new CheckUnusedLabels(compiler))
.add(new CheckUselessBlocks(compiler));
return combineChecks(compiler, callbacks.build());
}
@Override
protected FeatureSet featureSet() {
return ES8_MODULES;
}
};
private final HotSwapPassFactory analyzerChecks =
new HotSwapPassFactory(PassNames.ANALYZER_CHECKS) {
@Override
protected HotSwapCompilerPass create(AbstractCompiler compiler) {
ImmutableList.Builder<Callback> callbacks = ImmutableList.<Callback>builder();
if (options.enables(DiagnosticGroups.ANALYZER_CHECKS_INTERNAL)) {
callbacks
.add(new CheckNullableReturn(compiler))
.add(new CheckArrayWithGoogObject(compiler))
.add(new ImplicitNullabilityCheck(compiler));
}
// These are grouped together for better execution efficiency.
if (options.enables(DiagnosticGroups.UNUSED_PRIVATE_PROPERTY)) {
callbacks.add(new CheckUnusedPrivateProperties(compiler));
}
return combineChecks(compiler, callbacks.build());
}
};
private final HotSwapPassFactory checkRequiresAndProvidesSorted =
new HotSwapPassFactory("checkRequiresAndProvidesSorted") {
@Override
protected HotSwapCompilerPass create(AbstractCompiler compiler) {
return new CheckRequiresAndProvidesSorted(compiler);
}
@Override
protected FeatureSet featureSet() {
return ES8_MODULES;
}
};
/** Executes the given callbacks with a {@link CombinedCompilerPass}. */
private static HotSwapCompilerPass combineChecks(AbstractCompiler compiler,
List<Callback> callbacks) {
checkArgument(!callbacks.isEmpty());
return new CombinedCompilerPass(compiler, callbacks);
}
/** A compiler pass that resolves types in the global scope. */
class GlobalTypeResolver implements HotSwapCompilerPass {
private final AbstractCompiler compiler;
GlobalTypeResolver(AbstractCompiler compiler) {
this.compiler = compiler;
}
@Override
public void process(Node externs, Node root) {
// If NTI is enabled, erase the NTI types from the AST before adding the old types.
if (this.compiler.getOptions().getNewTypeInference()) {
NodeTraversal.traverseEs6(
this.compiler, root,
new NodeTraversal.AbstractPostOrderCallback(){
@Override
public void visit(NodeTraversal t, Node n, Node parent) {
n.setTypeI(null);
}
});
this.compiler.clearTypeIRegistry();
}
this.compiler.setMostRecentTypechecker(MostRecentTypechecker.OTI);
if (topScope == null) {
regenerateGlobalTypedScope(compiler, root.getParent());
} else {
compiler.getTypeRegistry().resolveTypesInScope(topScope);
}
}
@Override
public void hotSwapScript(Node scriptRoot, Node originalRoot) {
patchGlobalTypedScope(compiler, scriptRoot);
}
}
/** A compiler pass that clears the global scope. */
class ClearTypedScope implements CompilerPass {
@Override
public void process(Node externs, Node root) {
clearTypedScope();
}
}
/** Checks global name usage. */
private final PassFactory checkGlobalNames =
new PassFactory("checkGlobalNames", true) {
@Override
protected CompilerPass create(final AbstractCompiler compiler) {
return new CompilerPass() {
@Override
public void process(Node externs, Node jsRoot) {
// Create a global namespace for analysis by check passes.
// Note that this class does all heavy computation lazily,
// so it's OK to create it here.
namespaceForChecks = new GlobalNamespace(compiler, externs, jsRoot);
new CheckGlobalNames(compiler, options.checkGlobalNamesLevel)
.injectNamespace(namespaceForChecks).process(externs, jsRoot);
}
};
}
};
/** Checks that the code is ES5 strict compliant. */
private final PassFactory checkStrictMode =
new PassFactory("checkStrictMode", true) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
return new StrictModeCheck(compiler);
}
@Override
protected FeatureSet featureSet() {
return ES8_MODULES;
}
};
/** Process goog.tweak.getTweak() calls. */
private final PassFactory processTweaks = new PassFactory("processTweaks", true) {
@Override
protected CompilerPass create(final AbstractCompiler compiler) {
return new CompilerPass() {
@Override
public void process(Node externs, Node jsRoot) {
new ProcessTweaks(compiler,
options.getTweakProcessing().shouldStrip(),
options.getTweakReplacements()).process(externs, jsRoot);
}
};
}
};
/** Override @define-annotated constants. */
private final PassFactory processDefines = new PassFactory("processDefines", true) {
@Override
protected CompilerPass create(final AbstractCompiler compiler) {
return new CompilerPass() {
@Override
public void process(Node externs, Node jsRoot) {
HashMap<String, Node> replacements = new HashMap<>();
replacements.putAll(compiler.getDefaultDefineValues());
replacements.putAll(getAdditionalReplacements(options));
replacements.putAll(options.getDefineReplacements());
new ProcessDefines(compiler, ImmutableMap.copyOf(replacements), !options.checksOnly)
.injectNamespace(namespaceForChecks).process(externs, jsRoot);
}
};
}
@Override
public FeatureSet featureSet() {
return ES8_MODULES;
}
};
/**
* Strips code for smaller compiled code. This is useful for removing debug
* statements to prevent leaking them publicly.
*/
private final PassFactory stripCode = new PassFactory("stripCode", true) {
@Override
protected CompilerPass create(final AbstractCompiler compiler) {
return new CompilerPass() {
@Override
public void process(Node externs, Node jsRoot) {
CompilerOptions options = compiler.getOptions();
StripCode pass = new StripCode(compiler, options.stripTypes, options.stripNameSuffixes,
options.stripTypePrefixes, options.stripNamePrefixes);
if (options.getTweakProcessing().shouldStrip()) {
pass.enableTweakStripping();
}
pass.process(externs, jsRoot);
}
};
}
};
/** Release references to data that is only needed during checks. */
final PassFactory garbageCollectChecks =
new HotSwapPassFactory("garbageCollectChecks") {
@Override
protected HotSwapCompilerPass create(final AbstractCompiler compiler) {
return new HotSwapCompilerPass() {
@Override
public void process(Node externs, Node jsRoot) {
// Kill the global namespace so that it can be garbage collected
// after all passes are through with it.
namespaceForChecks = null;
}
@Override
public void hotSwapScript(Node scriptRoot, Node originalRoot) {
process(null, null);
}
};
}
@Override
public FeatureSet featureSet() {
return FeatureSet.latest();
}
};
/** Checks that all constants are not modified */
private final PassFactory checkConsts = new PassFactory("checkConsts", true) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
return new ConstCheck(compiler);
}
@Override
public FeatureSet featureSet() {
return ES8_MODULES;
}
};
/** Checks that the arguments are constants */
private final PassFactory checkConstParams =
new PassFactory(PassNames.CHECK_CONST_PARAMS, true) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
return new ConstParamCheck(compiler);
}
@Override
public FeatureSet featureSet() {
return ES5;
}
};
/** Computes the names of functions for later analysis. */
private final PassFactory computeFunctionNames =
new PassFactory("computeFunctionNames", true) {
@Override
protected CompilerPass create(final AbstractCompiler compiler) {
return new CompilerPass() {
@Override
public void process(Node externs, Node root) {
CollectFunctionNames pass = new CollectFunctionNames(compiler);
pass.process(externs, root);
compiler.setFunctionNames(pass.getFunctionNames());
}
};
}
@Override
public FeatureSet featureSet() {
return ES8_MODULES;
}
};
/** Inserts run-time type assertions for debugging. */
private final PassFactory runtimeTypeCheck =
new PassFactory(PassNames.RUNTIME_TYPE_CHECK, true) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
return new RuntimeTypeCheck(compiler, options.runtimeTypeCheckLogFunction);
}
};
/** Generates unique ids. */
private final PassFactory replaceIdGenerators =
new PassFactory(PassNames.REPLACE_ID_GENERATORS, true) {
@Override
protected CompilerPass create(final AbstractCompiler compiler) {
return new CompilerPass() {
@Override
public void process(Node externs, Node root) {
ReplaceIdGenerators pass =
new ReplaceIdGenerators(
compiler,
options.idGenerators,
options.generatePseudoNames,
options.idGeneratorsMapSerialized,
options.xidHashFunction);
pass.process(externs, root);
compiler.setIdGeneratorMap(pass.getSerializedIdMappings());
}
};
}
};
/** Replace strings. */
private final PassFactory replaceStrings = new PassFactory("replaceStrings", true) {
@Override
protected CompilerPass create(final AbstractCompiler compiler) {
return new CompilerPass() {
@Override public void process(Node externs, Node root) {
ReplaceStrings pass = new ReplaceStrings(
compiler,
options.replaceStringsPlaceholderToken,
options.replaceStringsFunctionDescriptions,
options.replaceStringsReservedStrings,
options.replaceStringsInputMap);
pass.process(externs, root);
compiler.setStringMap(pass.getStringMap());
}
};
}
};
/** Optimizes the "arguments" array. */
private final PassFactory optimizeArgumentsArray =
new PassFactory(PassNames.OPTIMIZE_ARGUMENTS_ARRAY, true) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
return new OptimizeArgumentsArray(compiler);
}
@Override
protected FeatureSet featureSet() {
return ES8_MODULES;
}
};
/** Remove variables set to goog.abstractMethod. */
private final PassFactory closureCodeRemoval =
new PassFactory("closureCodeRemoval", true) {
@Override
protected CompilerPass create(final AbstractCompiler compiler) {
return new ClosureCodeRemoval(compiler, options.removeAbstractMethods,
options.removeClosureAsserts);
}
};
/** Special case optimizations for closure functions. */
private final PassFactory closureOptimizePrimitives =
new PassFactory("closureOptimizePrimitives", true) {
@Override
protected CompilerPass create(final AbstractCompiler compiler) {
return new ClosureOptimizePrimitives(
compiler,
compiler.getOptions().propertyRenaming == PropertyRenamingPolicy.ALL_UNQUOTED,
compiler.getOptions().getLanguageOut().toFeatureSet().contains(FeatureSet.ES6));
}
@Override
protected FeatureSet featureSet() {
return ES8_MODULES;
}
};
/** Puts global symbols into a single object. */
private final PassFactory rescopeGlobalSymbols =
new PassFactory("rescopeGlobalSymbols", true) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
return new RescopeGlobalSymbols(
compiler,
options.renamePrefixNamespace,
options.renamePrefixNamespaceAssumeCrossModuleNames);
}
};
/** Collapses names in the global scope. */
private final PassFactory collapseProperties =
new PassFactory(PassNames.COLLAPSE_PROPERTIES, true) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
return new CollapseProperties(compiler);
}
};
/** Rewrite properties as variables. */
private final PassFactory collapseObjectLiterals =
new PassFactory(PassNames.COLLAPSE_OBJECT_LITERALS, false) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
return new InlineObjectLiterals(compiler, compiler.getUniqueNameIdSupplier());
}
@Override
protected FeatureSet featureSet() {
return ES8_MODULES;
}
};
/** Disambiguate property names based on the coding convention. */
private final PassFactory disambiguatePrivateProperties =
new PassFactory(PassNames.DISAMBIGUATE_PRIVATE_PROPERTIES, true) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
return new DisambiguatePrivateProperties(compiler);
}
};
/** Disambiguate property names based on type information. */
private final PassFactory disambiguateProperties =
new PassFactory(PassNames.DISAMBIGUATE_PROPERTIES, true) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
return new DisambiguateProperties(compiler, options.propertyInvalidationErrors);
}
};
/** Chain calls to functions that return this. */
private final PassFactory chainCalls =
new PassFactory(PassNames.CHAIN_CALLS, true) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
return new ChainCalls(compiler);
}
};
/** Rewrite instance methods as static methods, to make them easier to inline. */
private final PassFactory devirtualizePrototypeMethods =
new PassFactory(PassNames.DEVIRTUALIZE_PROTOTYPE_METHODS, true) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
return new DevirtualizePrototypeMethods(compiler);
}
};
/**
* Optimizes unused function arguments, unused return values, and inlines constant parameters.
* Also runs RemoveUnusedVars.
*/
private final PassFactory optimizeCalls =
new PassFactory(PassNames.OPTIMIZE_CALLS, false) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
OptimizeCalls passes = new OptimizeCalls(compiler);
if (options.optimizeReturns) {
// Remove unused return values.
passes.addPass(new OptimizeReturns(compiler));
}
if (options.optimizeParameters) {
// Remove all parameters that are constants or unused.
passes.addPass(new OptimizeParameters(compiler));
}
return passes;
}
};
/**
* Look for function calls that are pure, and annotate them
* that way.
*/
private final PassFactory markPureFunctions =
new PassFactory("markPureFunctions", true) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
return new PureFunctionIdentifier.Driver(
compiler, options.debugFunctionSideEffectsPath);
}
@Override
protected FeatureSet featureSet() {
return ES8_MODULES;
}
};
/** Look for function calls that have no side effects, and annotate them that way. */
private final PassFactory markNoSideEffectCalls =
new PassFactory(PassNames.MARK_NO_SIDE_EFFECT_CALLS, true) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
return new MarkNoSideEffectCalls(compiler);
}
};
/** Inlines variables heuristically. */
private final PassFactory inlineVariables =
new PassFactory(PassNames.INLINE_VARIABLES, false) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
InlineVariables.Mode mode;
if (options.inlineVariables) {
mode = InlineVariables.Mode.ALL;
} else if (options.inlineLocalVariables) {
mode = InlineVariables.Mode.LOCALS_ONLY;
} else {
throw new IllegalStateException("No variable inlining option set.");
}
return new InlineVariables(compiler, mode, true);
}
@Override
protected FeatureSet featureSet() {
return ES8_MODULES;
}
};
/** Inlines variables that are marked as constants. */
private final PassFactory inlineConstants =
new PassFactory("inlineConstants", false) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
return new InlineVariables(compiler, InlineVariables.Mode.CONSTANTS_ONLY, true);
}
@Override
protected FeatureSet featureSet() {
return ES8_MODULES;
}
};
/** Use data flow analysis to remove dead branches. */
private final PassFactory removeUnreachableCode =
new PassFactory(PassNames.REMOVE_UNREACHABLE_CODE, false) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
return new UnreachableCodeElimination(compiler);
}
@Override
protected FeatureSet featureSet() {
return ES8;
}
};
/**
* Use data flow analysis to remove dead branches.
*/
private final PassFactory removeUnusedPolyfills =
new PassFactory("removeUnusedPolyfills", true) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
return new RemoveUnusedPolyfills(compiler);
}
@Override
protected FeatureSet featureSet() {
return ES8_MODULES;
}
};
/** Remove prototype properties that do not appear to be used. */
private final PassFactory removeUnusedPrototypeProperties =
new PassFactory(PassNames.REMOVE_UNUSED_PROTOTYPE_PROPERTIES, false) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
return new RemoveUnusedPrototypeProperties(
compiler,
options.removeUnusedPrototypePropertiesInExterns,
!options.removeUnusedVars);
}
@Override
protected FeatureSet featureSet() {
return ES8_MODULES;
}
};
/** Remove prototype properties that do not appear to be used. */
private final PassFactory removeUnusedClassProperties =
new PassFactory(PassNames.REMOVE_UNUSED_CLASS_PROPERTIES, false) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
return new RemoveUnusedClassProperties(
compiler, options.removeUnusedConstructorProperties);
}
@Override
protected FeatureSet featureSet() {
return ES8_MODULES;
}
};
private final PassFactory initNameAnalyzeReport = new PassFactory("initNameAnalyzeReport", true) {
@Override
protected CompilerPass create(final AbstractCompiler compiler) {
return new CompilerPass() {
@Override
public void process(Node externs, Node root) {
NameAnalyzer.createEmptyReport(compiler, options.reportPath);
}
};
}
@Override
protected FeatureSet featureSet() {
return FeatureSet.latest();
}
};
/**
* Process smart name processing - removes unused classes and does referencing starting with
* minimum set of names.
*/
private final PassFactory extraSmartNamePass =
new PassFactory(PassNames.SMART_NAME_PASS, true) {
@Override
protected CompilerPass create(final AbstractCompiler compiler) {
return new NameAnalyzer(compiler, true, options.reportPath);
}
@Override
public FeatureSet featureSet() {
return ES5;
}
};
private final PassFactory smartNamePass =
new PassFactory(PassNames.SMART_NAME_PASS, true) {
@Override
protected CompilerPass create(final AbstractCompiler compiler) {
return new NameAnalyzer(compiler, true, options.reportPath);
}
@Override
public FeatureSet featureSet() {
return ES5;
}
};
private final PassFactory smartNamePass2 =
new PassFactory(PassNames.SMART_NAME_PASS, true) {
@Override
protected CompilerPass create(final AbstractCompiler compiler) {
return new NameAnalyzer(compiler, true, null);
}
@Override
public FeatureSet featureSet() {
return ES5;
}
};
/** Inlines simple methods, like getters */
private final PassFactory inlineSimpleMethods =
new PassFactory("inlineSimpleMethods", false) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
return new InlineSimpleMethods(compiler);
}
@Override
protected FeatureSet featureSet() {
return ES8_MODULES;
}
};
/** Kills dead assignments. */
private final PassFactory deadAssignmentsElimination =
new PassFactory(PassNames.DEAD_ASSIGNMENT_ELIMINATION, false) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
return new DeadAssignmentsElimination(compiler);
}
@Override
protected FeatureSet featureSet() {
return ES8_MODULES;
}
};
/** Kills dead property assignments. */
private final PassFactory deadPropertyAssignmentElimination =
new PassFactory("deadPropertyAssignmentElimination", false) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
return new DeadPropertyAssignmentElimination(compiler);
}
@Override
public FeatureSet featureSet() {
return ES8_MODULES;
}
};
/** Inlines function calls. */
private final PassFactory inlineFunctions =
new PassFactory(PassNames.INLINE_FUNCTIONS, false) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
return new InlineFunctions(
compiler,
compiler.getUniqueNameIdSupplier(),
options.inlineFunctions,
options.inlineLocalFunctions,
true,
options.assumeStrictThis() || options.expectStrictModeInput(),
options.assumeClosuresOnlyCaptureReferences,
options.maxFunctionSizeAfterInlining);
}
@Override
public FeatureSet featureSet() {
return ES8_MODULES;
}
};
/** Inlines constant properties. */
private final PassFactory inlineProperties =
new PassFactory(PassNames.INLINE_PROPERTIES, false) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
return new InlineProperties(compiler);
}
};
private PassFactory getRemoveUnusedVars() {
return getRemoveUnusedVars(false /* isOneTimePass */);
}
private PassFactory lastRemoveUnusedVars() {
return getRemoveUnusedVars(true /* isOneTimePass */);
}
private PassFactory getRemoveUnusedVars(boolean isOneTimePass) {
/** Removes variables that are never used. */
return new PassFactory(PassNames.REMOVE_UNUSED_VARS, isOneTimePass) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
boolean removeOnlyLocals = options.removeUnusedLocalVars && !options.removeUnusedVars;
boolean preserveAnonymousFunctionNames =
options.anonymousFunctionNaming != AnonymousFunctionNamingPolicy.OFF;
return new RemoveUnusedVars(
compiler,
!removeOnlyLocals,
preserveAnonymousFunctionNames);
}
@Override
public FeatureSet featureSet() {
return ES5;
}
};
}
/** Move global symbols to a deeper common module */
private final PassFactory crossModuleCodeMotion =
new PassFactory(PassNames.CROSS_MODULE_CODE_MOTION, false) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
return new CrossModuleCodeMotion(
compiler,
compiler.getModuleGraph(),
options.parentModuleCanSeeSymbolsDeclaredInChildren);
}
};
/** Move methods to a deeper common module */
private final PassFactory crossModuleMethodMotion =
new PassFactory(PassNames.CROSS_MODULE_METHOD_MOTION, false) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
return new CrossModuleMethodMotion(
compiler,
compiler.getCrossModuleIdGenerator(),
// Only move properties in externs if we're not treating
// them as exports.
options.removeUnusedPrototypePropertiesInExterns,
options.crossModuleCodeMotionNoStubMethods);
}
};
/** A data-flow based variable inliner. */
private final PassFactory flowSensitiveInlineVariables =
new PassFactory(PassNames.FLOW_SENSITIVE_INLINE_VARIABLES, true) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
return new FlowSensitiveInlineVariables(compiler);
}
@Override
public FeatureSet featureSet() {
return ES5;
}
};
/** Uses register-allocation algorithms to use fewer variables. */
private final PassFactory coalesceVariableNames =
new PassFactory(PassNames.COALESCE_VARIABLE_NAMES, true) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
return new CoalesceVariableNames(compiler, options.generatePseudoNames);
}
@Override
protected FeatureSet featureSet() {
return ES8_MODULES;
}
};
/** Some simple, local collapses (e.g., {@code var x; var y;} becomes {@code var x,y;}. */
private final PassFactory exploitAssign =
new PassFactory(PassNames.EXPLOIT_ASSIGN, true) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
return new PeepholeOptimizationsPass(compiler, getName(), new ExploitAssigns());
}
@Override
protected FeatureSet featureSet() {
return ES8_MODULES;
}
};
/** Some simple, local collapses (e.g., {@code var x; var y;} becomes {@code var x,y;}. */
private final PassFactory collapseVariableDeclarations =
new PassFactory(PassNames.COLLAPSE_VARIABLE_DECLARATIONS, true) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
return new CollapseVariableDeclarations(compiler);
}
@Override
protected FeatureSet featureSet() {
return ES8_MODULES;
}
};
/** Extracts common sub-expressions. */
private final PassFactory extractPrototypeMemberDeclarations =
new PassFactory(PassNames.EXTRACT_PROTOTYPE_MEMBER_DECLARATIONS, true) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
Pattern pattern;
switch (options.extractPrototypeMemberDeclarations) {
case USE_GLOBAL_TEMP:
pattern = Pattern.USE_GLOBAL_TEMP;
break;
case USE_IIFE:
pattern = Pattern.USE_IIFE;
break;
default:
throw new IllegalStateException("unexpected");
}
return new ExtractPrototypeMemberDeclarations(compiler, pattern);
}
};
/** Rewrites common function definitions to be more compact. */
private final PassFactory rewriteFunctionExpressions =
new PassFactory(PassNames.REWRITE_FUNCTION_EXPRESSIONS, true) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
return new FunctionRewriter(compiler);
}
@Override
protected FeatureSet featureSet() {
return FeatureSet.latest();
}
};
/** Collapses functions to not use the VAR keyword. */
private final PassFactory collapseAnonymousFunctions =
new PassFactory(PassNames.COLLAPSE_ANONYMOUS_FUNCTIONS, true) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
return new CollapseAnonymousFunctions(compiler);
}
};
/** Moves function declarations to the top, to simulate actual hoisting. */
private final PassFactory moveFunctionDeclarations =
new PassFactory(PassNames.MOVE_FUNCTION_DECLARATIONS, true) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
return new MoveFunctionDeclarations(compiler);
}
};
private final PassFactory nameUnmappedAnonymousFunctions =
new PassFactory(PassNames.NAME_ANONYMOUS_FUNCTIONS, true) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
return new NameAnonymousFunctions(compiler);
}
};
private final PassFactory nameMappedAnonymousFunctions =
new PassFactory(PassNames.NAME_ANONYMOUS_FUNCTIONS, true) {
@Override
protected CompilerPass create(final AbstractCompiler compiler) {
return new CompilerPass() {
@Override
public void process(Node externs, Node root) {
NameAnonymousFunctionsMapped naf =
new NameAnonymousFunctionsMapped(
compiler, options.inputAnonymousFunctionNamingMap);
naf.process(externs, root);
compiler.setAnonymousFunctionNameMap(naf.getFunctionMap());
}
};
}
};
/**
* Alias string literals with global variables, to avoid creating lots of
* transient objects.
*/
private final PassFactory aliasStrings = new PassFactory("aliasStrings", true) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
return new AliasStrings(
compiler,
compiler.getModuleGraph(),
options.aliasAllStrings ? null : options.aliasableStrings,
options.aliasStringsBlacklist,
options.outputJsStringUsage);
}
@Override
protected FeatureSet featureSet() {
return FeatureSet.ES8_MODULES;
}
};
/** Handling for the ObjectPropertyString primitive. */
private final PassFactory objectPropertyStringPostprocess =
new PassFactory("ObjectPropertyStringPostprocess", true) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
return new ObjectPropertyStringPostprocess(compiler);
}
};
/**
* Renames properties so that the two properties that never appear on the same object get the same
* name.
*/
private final PassFactory ambiguateProperties =
new PassFactory(PassNames.AMBIGUATE_PROPERTIES, true) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
return new AmbiguateProperties(
compiler,
options.getPropertyReservedNamingFirstChars(),
options.getPropertyReservedNamingNonFirstChars());
}
};
/** Mark the point at which the normalized AST assumptions no longer hold. */
private final PassFactory markUnnormalized =
new PassFactory("markUnnormalized", true) {
@Override
protected CompilerPass create(final AbstractCompiler compiler) {
return new CompilerPass() {
@Override
public void process(Node externs, Node root) {
compiler.setLifeCycleStage(LifeCycleStage.RAW);
}
};
}
@Override
protected FeatureSet featureSet() {
return FeatureSet.latest();
}
};
private final PassFactory normalize =
new PassFactory(PassNames.NORMALIZE, true) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
return new Normalize(compiler, false);
}
@Override
protected FeatureSet featureSet() {
// TODO(johnlenz): Update this and gatherRawExports to latest()
return ES8_MODULES;
}
};
private final PassFactory externExports =
new PassFactory(PassNames.EXTERN_EXPORTS, true) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
return new ExternExportsPass(compiler);
}
};
/** Denormalize the AST for code generation. */
private final PassFactory denormalize = new PassFactory("denormalize", true) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
return new Denormalize(compiler);
}
@Override
protected FeatureSet featureSet() {
return ES8_MODULES;
}
};
/** Inverting name normalization. */
private final PassFactory invertContextualRenaming =
new PassFactory("invertContextualRenaming", true) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
return MakeDeclaredNamesUnique.getContextualRenameInverter(compiler);
}
};
/** Renames properties. */
private final PassFactory renameProperties =
new PassFactory("renameProperties", true) {
@Override
protected CompilerPass create(final AbstractCompiler compiler) {
checkState(options.propertyRenaming == PropertyRenamingPolicy.ALL_UNQUOTED);
final VariableMap prevPropertyMap = options.inputPropertyMap;
return new CompilerPass() {
@Override
public void process(Node externs, Node root) {
RenameProperties rprop =
new RenameProperties(
compiler,
options.generatePseudoNames,
prevPropertyMap,
options.getPropertyReservedNamingFirstChars(),
options.getPropertyReservedNamingNonFirstChars(),
options.nameGenerator);
rprop.process(externs, root);
compiler.setPropertyMap(rprop.getPropertyMap());
}
};
}
@Override
protected FeatureSet featureSet() {
return ES8_MODULES;
}
};
/** Renames variables. */
private final PassFactory renameVars = new PassFactory("renameVars", true) {
@Override
protected CompilerPass create(final AbstractCompiler compiler) {
final VariableMap prevVariableMap = options.inputVariableMap;
return new CompilerPass() {
@Override public void process(Node externs, Node root) {
compiler.setVariableMap(runVariableRenaming(
compiler, prevVariableMap, externs, root));
}
};
}
@Override
protected FeatureSet featureSet() {
return ES8_MODULES;
}
};
private VariableMap runVariableRenaming(
AbstractCompiler compiler, VariableMap prevVariableMap,
Node externs, Node root) {
char[] reservedChars =
options.anonymousFunctionNaming.getReservedCharacters();
boolean preserveAnonymousFunctionNames =
options.anonymousFunctionNaming != AnonymousFunctionNamingPolicy.OFF;
Set<String> reservedNames = new HashSet<>();
if (options.renamePrefixNamespace != null) {
// don't use the prefix name as a global symbol.
reservedNames.add(options.renamePrefixNamespace);
}
reservedNames.addAll(compiler.getExportedNames());
reservedNames.addAll(ParserRunner.getReservedVars());
RenameVars rn = new RenameVars(
compiler,
options.renamePrefix,
options.variableRenaming == VariableRenamingPolicy.LOCAL,
preserveAnonymousFunctionNames,
options.generatePseudoNames,
options.shadowVariables,
options.preferStableNames,
prevVariableMap,
reservedChars,
reservedNames,
options.nameGenerator);
rn.process(externs, root);
return rn.getVariableMap();
}
/** Renames labels */
private final PassFactory renameLabels =
new PassFactory("renameLabels", true) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
return new RenameLabels(compiler);
}
@Override
protected FeatureSet featureSet() {
return ES8_MODULES;
}
};
/** Convert bracket access to dot access */
private final PassFactory convertToDottedProperties =
new PassFactory(PassNames.CONVERT_TO_DOTTED_PROPERTIES, true) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
return new ConvertToDottedProperties(compiler);
}
@Override
protected FeatureSet featureSet() {
return ES8_MODULES;
}
};
private final PassFactory checkAstValidity =
new PassFactory("checkAstValidity", true) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
return new AstValidator(compiler);
}
@Override
protected FeatureSet featureSet() {
return FeatureSet.latest();
}
};
/** Checks that all variables are defined. */
private final PassFactory varCheckValidity =
new PassFactory("varCheckValidity", true) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
return new VarCheck(compiler, true);
}
@Override
protected FeatureSet featureSet() {
return ES8_MODULES;
}
};
/** Adds instrumentations according to an instrumentation template. */
private final PassFactory instrumentFunctions =
new PassFactory("instrumentFunctions", true) {
@Override
protected CompilerPass create(final AbstractCompiler compiler) {
return new InstrumentFunctions(
compiler, compiler.getFunctionNames(),
options.instrumentationTemplate, options.appNameStr);
}
};
private final PassFactory instrumentForCodeCoverage =
new PassFactory("instrumentForCodeCoverage", true) {
@Override
protected CompilerPass create(final AbstractCompiler compiler) {
// TODO(johnlenz): make global instrumentation an option
if (options.instrumentBranchCoverage) {
return new CoverageInstrumentationPass(
compiler, CoverageReach.CONDITIONAL, InstrumentOption.BRANCH_ONLY);
} else {
return new CoverageInstrumentationPass(compiler, CoverageReach.CONDITIONAL);
}
}
};
/** Extern property names gathering pass. */
private final PassFactory gatherExternProperties =
new PassFactory("gatherExternProperties", true) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
return new GatherExternProperties(compiler);
}
@Override
protected FeatureSet featureSet() {
return ES8_MODULES;
}
};
/**
* Runs custom passes that are designated to run at a particular time.
*/
private PassFactory getCustomPasses(
final CustomPassExecutionTime executionTime) {
return new PassFactory("runCustomPasses", true) {
@Override
protected CompilerPass create(final AbstractCompiler compiler) {
return runInSerial(options.customPasses.get(executionTime));
}
};
}
/** Create a compiler pass that runs the given passes in serial. */
private static CompilerPass runInSerial(
final Collection<CompilerPass> passes) {
return new CompilerPass() {
@Override public void process(Node externs, Node root) {
for (CompilerPass pass : passes) {
pass.process(externs, root);
}
}
};
}
@VisibleForTesting
static Map<String, Node> getAdditionalReplacements(
CompilerOptions options) {
Map<String, Node> additionalReplacements = new HashMap<>();
if (options.markAsCompiled || options.closurePass) {
additionalReplacements.put(COMPILED_CONSTANT_NAME, IR.trueNode());
}
if (options.closurePass && options.locale != null) {
additionalReplacements.put(CLOSURE_LOCALE_CONSTANT_NAME,
IR.string(options.locale));
}
return additionalReplacements;
}
/** Rewrites Polymer({}) */
private final HotSwapPassFactory polymerPass =
new HotSwapPassFactory("polymerPass") {
@Override
protected HotSwapCompilerPass create(AbstractCompiler compiler) {
return new PolymerPass(
compiler,
compiler.getOptions().polymerVersion,
compiler.getOptions().propertyRenaming == PropertyRenamingPolicy.ALL_UNQUOTED);
}
@Override
protected FeatureSet featureSet() {
return ES8_MODULES;
}
};
private final PassFactory chromePass = new PassFactory("chromePass", true) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
return new ChromePass(compiler);
}
@Override
protected FeatureSet featureSet() {
return ES8_MODULES;
}
};
/** Rewrites the super accessors calls to support Dart Dev Compiler output. */
private final HotSwapPassFactory dartSuperAccessorsPass =
new HotSwapPassFactory("dartSuperAccessorsPass") {
@Override
protected HotSwapCompilerPass create(AbstractCompiler compiler) {
return new DartSuperAccessorsPass(compiler);
}
@Override
protected FeatureSet featureSet() {
return ES8_MODULES;
}
};
/** Rewrites J2CL constructs to be more optimizable. */
private final PassFactory j2clConstantHoisterPass =
new PassFactory("j2clConstantHoisterPass", false) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
return new J2clConstantHoisterPass(compiler);
}
};
/** Optimizes J2CL clinit methods. */
private final PassFactory j2clClinitPass =
new PassFactory("j2clClinitPass", false) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
List<Node> changedScopeNodes = compiler.getChangedScopeNodesForPass(getName());
return new J2clClinitPrunerPass(compiler, changedScopeNodes);
}
};
/** Rewrites J2CL constructs to be more optimizable. */
private final PassFactory j2clPropertyInlinerPass =
new PassFactory("j2clES6Pass", true) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
return new J2clPropertyInlinerPass(compiler);
}
@Override
protected FeatureSet featureSet() {
return ES8_MODULES;
}
};
/** Rewrites J2CL constructs to be more optimizable. */
private final PassFactory j2clPass =
new PassFactory("j2clPass", true) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
return new J2clPass(compiler);
}
@Override
protected FeatureSet featureSet() {
return ES8_MODULES;
}
};
private final PassFactory j2clAssertRemovalPass =
new PassFactory("j2clAssertRemovalPass", true) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
return new J2clAssertRemovalPass(compiler);
}
};
private final PassFactory j2clSourceFileChecker =
new PassFactory("j2clSourceFileChecker", true) {
@Override
protected CompilerPass create(final AbstractCompiler compiler) {
return new J2clSourceFileChecker(compiler);
}
@Override
protected FeatureSet featureSet() {
return FeatureSet.latest();
}
};
private final PassFactory j2clChecksPass =
new PassFactory("j2clChecksPass", true) {
@Override
protected CompilerPass create(final AbstractCompiler compiler) {
return new J2clChecksPass(compiler);
}
};
private final PassFactory checkConformance =
new PassFactory("checkConformance", true) {
@Override
protected CompilerPass create(final AbstractCompiler compiler) {
return new CheckConformance(
compiler, ImmutableList.copyOf(options.getConformanceConfigs()));
}
};
/** Optimizations that output ES6 features. */
private final PassFactory optimizeToEs6 =
new PassFactory("optimizeToEs6", true) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
return new SubstituteEs6Syntax(compiler);
}
@Override
protected FeatureSet featureSet() {
return ES8_MODULES;
}
};
/** Rewrites goog.module in whitespace only mode */
private final HotSwapPassFactory whitespaceWrapGoogModules =
new HotSwapPassFactory("whitespaceWrapGoogModules") {
@Override
protected HotSwapCompilerPass create(AbstractCompiler compiler) {
return new WhitespaceWrapGoogModules(compiler);
}
@Override
protected FeatureSet featureSet() {
return ES8_MODULES;
}
};
private final PassFactory removeSuperMethodsPass =
new PassFactory(PassNames.REMOVE_SUPER_METHODS, true) {
@Override
protected CompilerPass create(AbstractCompiler compiler) {
return new RemoveSuperMethodsPass(compiler);
}
};
}
| Don't serialize state we don't need.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=174334418
| src/com/google/javascript/jscomp/DefaultPassConfig.java | Don't serialize state we don't need. | <ide><path>rc/com/google/javascript/jscomp/DefaultPassConfig.java
<ide> /**
<ide> * A global namespace to share across checking passes.
<ide> */
<del> private GlobalNamespace namespaceForChecks = null;
<add> private transient GlobalNamespace namespaceForChecks = null;
<ide>
<ide> /**
<ide> * A symbol table for registering references that get removed during
<ide> * preprocessing.
<ide> */
<del> private PreprocessorSymbolTable preprocessorSymbolTable = null;
<add> private transient PreprocessorSymbolTable preprocessorSymbolTable = null;
<ide>
<ide> /**
<ide> * Global state necessary for doing hotswap recompilation of files with references to
<ide> * processed goog.modules.
<ide> */
<del> private ClosureRewriteModule.GlobalRewriteState moduleRewriteState = null;
<add> private transient ClosureRewriteModule.GlobalRewriteState moduleRewriteState = null;
<ide>
<ide> /**
<ide> * Whether to protect "hidden" side-effects. |
|
Java | lgpl-2.1 | 177ba31b87fa50b08acf0ec106c34acf6bd4680c | 0 | JifengJiang/beast-mcmc,JifengJiang/beast-mcmc,JifengJiang/beast-mcmc,JifengJiang/beast-mcmc,JifengJiang/beast-mcmc | package dr.app.beauti.generator;
import dr.app.beauti.util.XMLWriter;
import dr.app.beauti.components.ComponentFactory;
import dr.app.beauti.enumTypes.FrequencyPolicyType;
import dr.evomodel.substmodel.NucModelType;
import dr.app.beauti.options.*;
import dr.evolution.datatype.DataType;
import dr.evolution.datatype.Nucleotides;
import dr.evomodel.sitemodel.GammaSiteModel;
import dr.evomodel.sitemodel.SiteModel;
import dr.evomodel.substmodel.BinaryCovarionModel;
import dr.evomodel.substmodel.EmpiricalAminoAcidModel;
import dr.evomodel.substmodel.FrequencyModel;
import dr.evomodel.substmodel.GTR;
import dr.evomodel.substmodel.TN93;
import dr.evomodelxml.BinarySubstitutionModelParser;
import dr.evomodelxml.HKYParser;
import dr.evoxml.AlignmentParser;
import dr.evoxml.MergePatternsParser;
import dr.evoxml.SitePatternsParser;
import dr.inference.model.ParameterParser;
import dr.util.Attribute;
import dr.xml.AttributeParser;
import dr.xml.XMLParser;
/**
* @author Alexei Drummond
* @author Walter Xie
*/
public class SubstitutionModelGenerator extends Generator {
public SubstitutionModelGenerator(BeautiOptions options, ComponentFactory[] components) {
super(options, components);
}
/**
* Writes the substitution model to XML.
*
* @param writer the writer
* @param model the partition model to write in BEAST XML
*/
public void writeSubstitutionModel(PartitionSubstitutionModel model, XMLWriter writer) {
DataType dataType = model.getDataType();
String dataTypeDescription = dataType.getDescription();
switch (dataType.getType()) {
case DataType.NUCLEOTIDES:
// Jukes-Cantor model
if (model.getNucSubstitutionModel() == NucModelType.JC) {
String prefix = model.getPrefix();
writer.writeComment("The JC substitution model (Jukes & Cantor, 1969)");
writer.writeOpenTag(NucModelType.HKY.getXMLName(),
new Attribute[]{new Attribute.Default<String>(XMLParser.ID, prefix + "jc")}
);
writer.writeOpenTag(HKYParser.FREQUENCIES);
writer.writeOpenTag(
FrequencyModel.FREQUENCY_MODEL,
new Attribute[]{
new Attribute.Default<String>("dataType", dataTypeDescription)
}
);
writer.writeOpenTag(FrequencyModel.FREQUENCIES);
writer.writeTag(
ParameterParser.PARAMETER,
new Attribute[]{
new Attribute.Default<String>(XMLParser.ID, prefix + "frequencies"),
new Attribute.Default<String>(ParameterParser.VALUE, "0.25 0.25 0.25 0.25")
},
true
);
writer.writeCloseTag(FrequencyModel.FREQUENCIES);
writer.writeCloseTag(FrequencyModel.FREQUENCY_MODEL);
writer.writeCloseTag(HKYParser.FREQUENCIES);
writer.writeOpenTag(HKYParser.KAPPA);
writeParameter("jc.kappa", 1, 1.0, Double.NaN, Double.NaN, writer);
writer.writeCloseTag(HKYParser.KAPPA);
writer.writeCloseTag(NucModelType.HKY.getXMLName());
throw new IllegalArgumentException("AR: Need to check that kappa = 1 for JC (I have feeling it should be 0.5)");
} else {
// Hasegawa Kishino and Yano 85 model
if (model.getNucSubstitutionModel() == NucModelType.HKY) {
if (model.isUnlinkedSubstitutionModel()) {
for (int i = 1; i <= model.getCodonPartitionCount(); i++) {
writeHKYModel(i, writer, model);
}
} else {
writeHKYModel(-1, writer, model);
}
} else if (model.getNucSubstitutionModel() == NucModelType.TN93) {
if (model.isUnlinkedSubstitutionModel()) {
for (int i = 1; i <= model.getCodonPartitionCount(); i++) {
writeTN93Model(i, writer, model);
}
} else {
writeTN93Model(-1, writer, model);
}
} else {
// General time reversible model
if (model.getNucSubstitutionModel() == NucModelType.GTR) {
if (model.isUnlinkedSubstitutionModel()) {
for (int i = 1; i <= model.getCodonPartitionCount(); i++) {
writeGTRModel(i, writer, model);
}
} else {
writeGTRModel(-1, writer, model);
}
}
}
}
break;
case DataType.AMINO_ACIDS:
// Amino Acid model
String aaModel = model.getAaSubstitutionModel().getXMLName();
writer.writeComment("The " + aaModel + " substitution model");
writer.writeTag(
EmpiricalAminoAcidModel.EMPIRICAL_AMINO_ACID_MODEL,
new Attribute[]{new Attribute.Default<String>(XMLParser.ID, model.getPrefix() + "aa"),
new Attribute.Default<String>("type", aaModel)}, true
);
break;
case DataType.TWO_STATES:
case DataType.COVARION:
switch (model.getBinarySubstitutionModel()) {
case ModelOptions.BIN_SIMPLE:
writeBinarySimpleModel(writer, model);
break;
case ModelOptions.BIN_COVARION:
writeBinaryCovarionModel(writer, model);
break;
}
break;
}
}
/**
* Write the HKY model XML block.
*
* @param num the model number
* @param writer the writer
* @param model the partition model to write in BEAST XML
*/
public void writeHKYModel(int num, XMLWriter writer, PartitionSubstitutionModel model) {
String prefix = model.getPrefix(num);
// Hasegawa Kishino and Yano 85 model
writer.writeComment("The HKY substitution model (Hasegawa, Kishino & Yano, 1985)");
writer.writeOpenTag(NucModelType.HKY.getXMLName(),
new Attribute[]{new Attribute.Default<String>(XMLParser.ID, prefix + "hky")}
);
writer.writeOpenTag(HKYParser.FREQUENCIES);
writeFrequencyModel(writer, model, num);
writer.writeCloseTag(HKYParser.FREQUENCIES);
writeParameter(num, HKYParser.KAPPA, "kappa", model, writer);
writer.writeCloseTag(NucModelType.HKY.getXMLName());
}
/**
* Write the TN93 model XML block.
*
* @param num the model number
* @param writer the writer
* @param model the partition model to write in BEAST XML
*/
public void writeTN93Model(int num, XMLWriter writer, PartitionSubstitutionModel model) {
String prefix = model.getPrefix(num);
// TN93
writer.writeComment("The TN93 substitution model");
writer.writeOpenTag(NucModelType.TN93.getXMLName(),
new Attribute[]{new Attribute.Default<String>(XMLParser.ID, prefix + "tn93")}
);
writer.writeOpenTag(HKYParser.FREQUENCIES);
writeFrequencyModel(writer, model, num);
writer.writeCloseTag(HKYParser.FREQUENCIES);
writeParameter(num, TN93.KAPPA1, "kappa1", model, writer);
writeParameter(num, TN93.KAPPA2, "kappa2", model, writer);
writer.writeCloseTag(NucModelType.TN93.getXMLName());
}
/**
* Write the GTR model XML block.
*
* @param num the model number
* @param writer the writer
* @param model the partition model to write in BEAST XML
*/
public void writeGTRModel(int num, XMLWriter writer, PartitionSubstitutionModel model) {
String prefix = model.getPrefix(num);
writer.writeComment("The general time reversible (GTR) substitution model");
writer.writeOpenTag(GTR.GTR_MODEL,
new Attribute[]{new Attribute.Default<String>(XMLParser.ID, prefix + "gtr")}
);
writer.writeOpenTag(GTR.FREQUENCIES);
writeFrequencyModel(writer, model, num);
writer.writeCloseTag(GTR.FREQUENCIES);
writeParameter(num, GTR.A_TO_C, PartitionSubstitutionModel.GTR_RATE_NAMES[0], model, writer);
writeParameter(num, GTR.A_TO_G, PartitionSubstitutionModel.GTR_RATE_NAMES[1], model, writer);
writeParameter(num, GTR.A_TO_T, PartitionSubstitutionModel.GTR_RATE_NAMES[2], model, writer);
writeParameter(num, GTR.C_TO_G, PartitionSubstitutionModel.GTR_RATE_NAMES[3], model, writer);
writeParameter(num, GTR.G_TO_T, PartitionSubstitutionModel.GTR_RATE_NAMES[4], model, writer);
writer.writeCloseTag(GTR.GTR_MODEL);
}
private void writeFrequencyModel(XMLWriter writer, PartitionSubstitutionModel model, int num) {
String dataTypeDescription = model.getDataType().getDescription();
String prefix = model.getPrefix(num);
writer.writeOpenTag(
FrequencyModel.FREQUENCY_MODEL,
new Attribute[]{
new Attribute.Default<String>("dataType", dataTypeDescription)
}
);
if (model.getFrequencyPolicy() == FrequencyPolicyType.EMPIRICAL) {
if (model.getDataType() == Nucleotides.INSTANCE && model.getCodonPartitionCount() > 1 && model.isUnlinkedSubstitutionModel()) {
for (PartitionData partition : model.getAllPartitionData()) { //?
writer.writeIDref(MergePatternsParser.MERGE_PATTERNS, prefix + partition.getName() + "." + SitePatternsParser.PATTERNS);
}
} else {
for (PartitionData partition : model.getAllPartitionData()) { //?
writer.writeIDref(AlignmentParser.ALIGNMENT, partition.getAlignment().getId());
}
}
}
writer.writeOpenTag(FrequencyModel.FREQUENCIES);
switch (model.getFrequencyPolicy()) {
case ALLEQUAL:
case ESTIMATED:
if (num == -1 || model.isUnlinkedFrequencyModel()) { // single partition, or multiple partitions unlinked frequency
writer.writeTag(ParameterParser.PARAMETER, new Attribute[] {
new Attribute.Default<String>(XMLParser.ID, prefix + "frequencies"),
new Attribute.Default<String>(ParameterParser.VALUE, "0.25 0.25 0.25 0.25") }, true);
} else { // multiple partitions but linked frequency
if (num == 1) {
writer.writeTag(ParameterParser.PARAMETER, new Attribute[] {
new Attribute.Default<String>(XMLParser.ID, model.getPrefix() + "frequencies"),
new Attribute.Default<String>(ParameterParser.VALUE, "0.25 0.25 0.25 0.25") }, true);
} else {
writer.writeIDref(ParameterParser.PARAMETER, model.getPrefix() + "frequencies");
}
}
break;
case EMPIRICAL:
if (num == -1 || model.isUnlinkedFrequencyModel()) { // single partition, or multiple partitions unlinked frequency
writeParameter(prefix + "frequencies", 4, Double.NaN, Double.NaN, Double.NaN, writer);
} else { // multiple partitions but linked frequency
if (num == 1) {
writeParameter(model.getPrefix() + "frequencies", 4, Double.NaN, Double.NaN, Double.NaN, writer);
} else {
writer.writeIDref(ParameterParser.PARAMETER, model.getPrefix() + "frequencies");
}
}
break;
}
writer.writeCloseTag(FrequencyModel.FREQUENCIES);
writer.writeCloseTag(FrequencyModel.FREQUENCY_MODEL);
}
/**
* Write the Binary simple model XML block.
*
* @param writer the writer
* @param model the partition model to write in BEAST XML
*/
public void writeBinarySimpleModel(XMLWriter writer, PartitionSubstitutionModel model) {
String dataTypeDescription = model.getDataType().getDescription();
String prefix = model.getPrefix();
writer.writeComment("The Binary simple model (based on the general substitution model)");
writer.writeOpenTag(
BinarySubstitutionModelParser.BINARY_SUBSTITUTION_MODEL,
new Attribute[]{new Attribute.Default<String>(XMLParser.ID, prefix + "bsimple")}
);
writer.writeOpenTag(dr.evomodel.substmodel.GeneralSubstitutionModel.FREQUENCIES);
writer.writeOpenTag(
FrequencyModel.FREQUENCY_MODEL,
new Attribute[]{
new Attribute.Default<String>("dataType", dataTypeDescription)
}
);
if (model.getFrequencyPolicy() == FrequencyPolicyType.EMPIRICAL) {
if (model.getDataType() == Nucleotides.INSTANCE && model.getCodonPartitionCount() > 1) {
for (PartitionData partition : model.getAllPartitionData()) { //?
writer.writeIDref(MergePatternsParser.MERGE_PATTERNS, prefix + partition.getName() + "." + SitePatternsParser.PATTERNS);
}
} else {
for (PartitionData partition : model.getAllPartitionData()) { //?
writer.writeIDref(AlignmentParser.ALIGNMENT, partition.getAlignment().getId());
}
}
}
writer.writeOpenTag(FrequencyModel.FREQUENCIES);
writeParameter(prefix + "frequencies", 2, Double.NaN, Double.NaN, Double.NaN, writer);
writer.writeCloseTag(FrequencyModel.FREQUENCIES);
writer.writeCloseTag(FrequencyModel.FREQUENCY_MODEL);
writer.writeCloseTag(dr.evomodel.substmodel.GeneralSubstitutionModel.FREQUENCIES);
writer.writeCloseTag(BinarySubstitutionModelParser.BINARY_SUBSTITUTION_MODEL);
}
/**
* Write the Binary covarion model XML block
*
* @param writer the writer
* @param model the partition model to write
*/
public void writeBinaryCovarionModel(XMLWriter writer, PartitionSubstitutionModel model) {
String prefix = model.getPrefix();
writer.writeComment("The Binary covarion model");
writer.writeOpenTag(
BinaryCovarionModel.COVARION_MODEL,
new Attribute[]{new Attribute.Default<String>(XMLParser.ID, prefix + "bcov")}
);
writeParameter(BinaryCovarionModel.FREQUENCIES,
prefix + "frequencies", 2, 0.5, 0.0, 1.0, writer);
writeParameter(BinaryCovarionModel.HIDDEN_FREQUENCIES,
prefix + "hfrequencies", 2, 0.5, 0.0, 1.0, writer);
writeParameter(BinaryCovarionModel.ALPHA, "alpha", model, writer);
writeParameter(BinaryCovarionModel.SWITCHING_RATE, "bcov.s", model, writer);
writer.writeCloseTag(BinaryCovarionModel.COVARION_MODEL);
}
/**
* Write the site model XML block.
*
* @param model the partition model to write in BEAST XML
* @param writeMuParameter the relative rate parameter for this site model
* @param writer the writer
*/
public void writeSiteModel(PartitionSubstitutionModel model, boolean writeMuParameter, XMLWriter writer) {
switch (model.getDataType().getType()) {
case DataType.NUCLEOTIDES:
if (model.getCodonPartitionCount() > 1) { //model.getCodonHeteroPattern() != null) {
for (int i = 1; i <= model.getCodonPartitionCount(); i++) {
writeNucSiteModel(i, writeMuParameter, writer, model);
}
writer.println();
} else {
writeNucSiteModel(-1, writeMuParameter, writer, model);
}
break;
case DataType.AMINO_ACIDS:
writeAASiteModel(writer, writeMuParameter, model);
break;
case DataType.TWO_STATES:
case DataType.COVARION:
writeTwoStateSiteModel(writer, writeMuParameter, model);
break;
default:
throw new IllegalArgumentException("Unknown data type");
}
}
/**
* Write the all the mu parameters for this partition model.
*
* @param writer the writer
* @param model the partition model to write in BEAST XML
*/
public void writeMuParameterRefs(PartitionSubstitutionModel model, XMLWriter writer) {
if (model.getDataType().getType() == DataType.NUCLEOTIDES && model.getCodonHeteroPattern() != null) {
for (int i = 1; i <= model.getCodonPartitionCount(); i++) {
writer.writeIDref(ParameterParser.PARAMETER, model.getPrefix(i) + "mu");
}
} else {
writer.writeIDref(ParameterParser.PARAMETER, model.getPrefix() + "mu");
}
}
public void writeLog(XMLWriter writer, PartitionSubstitutionModel model) {
int codonPartitionCount = model.getCodonPartitionCount();
switch (model.getDataType().getType()) {
case DataType.NUCLEOTIDES:
// THIS IS DONE BY ALLMUS logging in BeastGenerator
// single partition use clock.rate, no "mu"; multi-partition use "allmus"
// if (codonPartitionCount > 1) {
//
// for (int i = 1; i <= codonPartitionCount; i++) {
// writer.writeIDref(ParameterParser.PARAMETER, model.getPrefix(i) + "mu");
// }
// }
switch (model.getNucSubstitutionModel()) {
case HKY:
if (codonPartitionCount > 1 && model.isUnlinkedSubstitutionModel()) {
for (int i = 1; i <= codonPartitionCount; i++) {
writer.writeIDref(ParameterParser.PARAMETER, model.getPrefix(i) + "kappa");
}
} else {
writer.writeIDref(ParameterParser.PARAMETER, model.getPrefix() + "kappa");
}
break;
case TN93:
if (codonPartitionCount > 1 && model.isUnlinkedSubstitutionModel()) {
for (int i = 1; i <= codonPartitionCount; i++) {
writer.writeIDref(ParameterParser.PARAMETER, model.getPrefix(i) + "kappa1");
writer.writeIDref(ParameterParser.PARAMETER, model.getPrefix(i) + "kappa2");
}
} else {
writer.writeIDref(ParameterParser.PARAMETER, model.getPrefix() + "kappa1");
writer.writeIDref(ParameterParser.PARAMETER, model.getPrefix() + "kappa2");
}
break;
case GTR:
if (codonPartitionCount > 1 && model.isUnlinkedSubstitutionModel()) {
for (int i = 1; i <= codonPartitionCount; i++) {
for (String rateName : PartitionSubstitutionModel.GTR_RATE_NAMES) {
writer.writeIDref(ParameterParser.PARAMETER, model.getPrefix(i) + rateName);
}
}
} else {
for (String rateName : PartitionSubstitutionModel.GTR_RATE_NAMES) {
writer.writeIDref(ParameterParser.PARAMETER, model.getPrefix() + rateName);
}
}
break;
}
if (model.getFrequencyPolicy() == FrequencyPolicyType.ESTIMATED) {
if (codonPartitionCount > 1 && model.isUnlinkedSubstitutionModel() && model.isUnlinkedFrequencyModel()) {
for (int i = 1; i <= codonPartitionCount; i++) {
writer.writeIDref(ParameterParser.PARAMETER, model.getPrefix(i) + "frequencies");
}
} else {
writer.writeIDref(ParameterParser.PARAMETER, model.getPrefix() + "frequencies");
}
}
break;//NUCLEOTIDES
case DataType.AMINO_ACIDS:
break;//AMINO_ACIDS
case DataType.TWO_STATES:
case DataType.COVARION:
String prefix = model.getPrefix();
switch (model.getBinarySubstitutionModel()) {
case ModelOptions.BIN_SIMPLE:
break;
case ModelOptions.BIN_COVARION:
writer.writeIDref(ParameterParser.PARAMETER, prefix + "alpha");
writer.writeIDref(ParameterParser.PARAMETER, prefix + "bcov.s");
writer.writeIDref(ParameterParser.PARAMETER, prefix + "frequencies");
writer.writeIDref(ParameterParser.PARAMETER, prefix + "hfrequencies");
break;
}
break;//BINARY
}
if (model.isGammaHetero()) {
if (codonPartitionCount > 1 && model.isUnlinkedHeterogeneityModel()) {
for (int i = 1; i <= codonPartitionCount; i++) {
writer.writeIDref(ParameterParser.PARAMETER, model.getPrefix(i) + "alpha");
}
} else {
writer.writeIDref(ParameterParser.PARAMETER, model.getPrefix() + "alpha");
}
}
if (model.isInvarHetero()) {
if (codonPartitionCount > 1 && model.isUnlinkedHeterogeneityModel()) {
for (int i = 1; i <= codonPartitionCount; i++) {
writer.writeIDref(ParameterParser.PARAMETER, model.getPrefix(i) + "pInv");
}
} else {
writer.writeIDref(ParameterParser.PARAMETER, model.getPrefix() + "pInv");
}
}
}
/**
* Write the nucleotide site model XML block.
*
* @param num the model number
* @param writeMuParameter the relative rate parameter for this site model
* @param writer the writer
* @param model the partition model to write in BEAST XML
*/
private void writeNucSiteModel(int num, boolean writeMuParameter, XMLWriter writer, PartitionSubstitutionModel model) {
String prefix = model.getPrefix(num);
String prefix2 = model.getPrefix();
writer.writeComment("site model");
writer.writeOpenTag(GammaSiteModel.SITE_MODEL,
new Attribute[]{new Attribute.Default<String>(XMLParser.ID, prefix + SiteModel.SITE_MODEL)});
writer.writeOpenTag(GammaSiteModel.SUBSTITUTION_MODEL);
if (model.isUnlinkedSubstitutionModel()) {
switch (model.getNucSubstitutionModel()) {
// JC cannot be unlinked because it has no parameters
case JC:
writer.writeIDref(NucModelType.HKY.getXMLName(), prefix + "jc");
break;
case HKY:
writer.writeIDref(NucModelType.HKY.getXMLName(), prefix + "hky");
break;
case GTR:
writer.writeIDref(GTR.GTR_MODEL, prefix + "gtr");
break;
case TN93:
writer.writeIDref(NucModelType.TN93.getXMLName(), prefix + "tn93");
break;
default:
throw new IllegalArgumentException("Unknown substitution model.");
}
} else {
switch (model.getNucSubstitutionModel()) {
case JC:
writer.writeIDref(NucModelType.HKY.getXMLName(), prefix2 + "jc");
break;
case HKY:
writer.writeIDref(NucModelType.HKY.getXMLName(), prefix2 + "hky");
break;
case GTR:
writer.writeIDref(GTR.GTR_MODEL, prefix2 + "gtr");
break;
case TN93:
writer.writeIDref(NucModelType.TN93.getXMLName(), prefix2 + "tn93");
break;
default:
throw new IllegalArgumentException("Unknown substitution model.");
}
}
writer.writeCloseTag(GammaSiteModel.SUBSTITUTION_MODEL);
if (writeMuParameter) {
writeParameter(num, GammaSiteModel.RELATIVE_RATE, "mu", model, writer);
}
if (model.isGammaHetero()) {
writer.writeOpenTag(GammaSiteModel.GAMMA_SHAPE, new Attribute.Default<String>(
GammaSiteModel.GAMMA_CATEGORIES, "" + model.getGammaCategories()));
if (num == -1 || model.isUnlinkedHeterogeneityModel()) {
// writeParameter(prefix + "alpha", model, writer);
writeParameter(num, "alpha", model, writer);
} else {
// multiple partitions but linked heterogeneity
if (num == 1) {
// writeParameter(prefix2 + "alpha", model, writer);
writeParameter("alpha", model, writer);
} else {
writer.writeIDref(ParameterParser.PARAMETER, prefix2 + "alpha");
}
}
writer.writeCloseTag(GammaSiteModel.GAMMA_SHAPE);
}
if (model.isInvarHetero()) {
writer.writeOpenTag(GammaSiteModel.PROPORTION_INVARIANT);
if (num == -1 || model.isUnlinkedHeterogeneityModel()) {
// writeParameter(prefix + "pInv", model, writer);
writeParameter(num, "pInv", model, writer);
} else {
// multiple partitions but linked heterogeneity
if (num == 1) {
// writeParameter(prefix2 + "pInv", model, writer);
writeParameter("pInv", model, writer);
} else {
writer.writeIDref(ParameterParser.PARAMETER, prefix2 + "pInv");
}
}
writer.writeCloseTag(GammaSiteModel.PROPORTION_INVARIANT);
}
writer.writeCloseTag(GammaSiteModel.SITE_MODEL);
}
/**
* Write the two states site model XML block.
*
* @param writer the writer
* @param writeMuParameter the relative rate parameter for this site model
* @param model the partition model to write in BEAST XML
*/
private void writeTwoStateSiteModel(XMLWriter writer, boolean writeMuParameter, PartitionSubstitutionModel model) {
String prefix = model.getPrefix();
writer.writeComment("site model");
writer.writeOpenTag(GammaSiteModel.SITE_MODEL,
new Attribute[]{new Attribute.Default<String>(XMLParser.ID, prefix + SiteModel.SITE_MODEL)});
writer.writeOpenTag(GammaSiteModel.SUBSTITUTION_MODEL);
switch (model.getBinarySubstitutionModel()) {
case ModelOptions.BIN_SIMPLE:
//writer.writeIDref(dr.evomodel.substmodel.GeneralSubstitutionModel.GENERAL_SUBSTITUTION_MODEL, "bsimple");
writer.writeIDref(BinarySubstitutionModelParser.BINARY_SUBSTITUTION_MODEL, "bsimple");
break;
case ModelOptions.BIN_COVARION:
writer.writeIDref(BinaryCovarionModel.COVARION_MODEL, "bcov");
break;
default:
throw new IllegalArgumentException("Unknown substitution model.");
}
writer.writeCloseTag(GammaSiteModel.SUBSTITUTION_MODEL);
if (writeMuParameter) {
writeParameter(GammaSiteModel.RELATIVE_RATE, "mu", model, writer);
}
if (model.isGammaHetero()) {
writer.writeOpenTag(GammaSiteModel.GAMMA_SHAPE,
new Attribute.Default<String>(GammaSiteModel.GAMMA_CATEGORIES, "" + model.getGammaCategories()));
writeParameter(prefix + "alpha", model, writer);
writer.writeCloseTag(GammaSiteModel.GAMMA_SHAPE);
}
if (model.isInvarHetero()) {
writeParameter(GammaSiteModel.PROPORTION_INVARIANT, "pInv", model, writer);
}
writer.writeCloseTag(GammaSiteModel.SITE_MODEL);
}
/**
* Write the AA site model XML block.
*
* @param writer the writer
* @param writeMuParameter the relative rate parameter for this site model
* @param model the partition model to write in BEAST XML
*/
private void writeAASiteModel(XMLWriter writer, boolean writeMuParameter, PartitionSubstitutionModel model) {
String prefix = model.getPrefix();
writer.writeComment("site model");
writer.writeOpenTag(GammaSiteModel.SITE_MODEL, new Attribute[]{
new Attribute.Default<String>(XMLParser.ID, prefix + SiteModel.SITE_MODEL)});
writer.writeOpenTag(GammaSiteModel.SUBSTITUTION_MODEL);
writer.writeIDref(EmpiricalAminoAcidModel.EMPIRICAL_AMINO_ACID_MODEL, prefix + "aa");
writer.writeCloseTag(GammaSiteModel.SUBSTITUTION_MODEL);
if (writeMuParameter) {
writeParameter(GammaSiteModel.RELATIVE_RATE, "mu", model, writer);
}
if (model.isGammaHetero()) {
writer.writeOpenTag(GammaSiteModel.GAMMA_SHAPE,
new Attribute.Default<String>(
GammaSiteModel.GAMMA_CATEGORIES, "" + model.getGammaCategories()));
writeParameter("alpha", model, writer);
writer.writeCloseTag(GammaSiteModel.GAMMA_SHAPE);
}
if (model.isInvarHetero()) {
writeParameter(GammaSiteModel.PROPORTION_INVARIANT, "pInv", model, writer);
}
writer.writeCloseTag(GammaSiteModel.SITE_MODEL);
}
} | src/dr/app/beauti/generator/SubstitutionModelGenerator.java | package dr.app.beauti.generator;
import dr.app.beauti.util.XMLWriter;
import dr.app.beauti.components.ComponentFactory;
import dr.app.beauti.enumTypes.FrequencyPolicyType;
import dr.evomodel.substmodel.NucModelType;
import dr.app.beauti.options.*;
import dr.evolution.datatype.DataType;
import dr.evolution.datatype.Nucleotides;
import dr.evomodel.sitemodel.GammaSiteModel;
import dr.evomodel.sitemodel.SiteModel;
import dr.evomodel.substmodel.BinaryCovarionModel;
import dr.evomodel.substmodel.EmpiricalAminoAcidModel;
import dr.evomodel.substmodel.FrequencyModel;
import dr.evomodel.substmodel.GTR;
import dr.evomodel.substmodel.TN93;
import dr.evomodelxml.BinarySubstitutionModelParser;
import dr.evomodelxml.HKYParser;
import dr.evoxml.AlignmentParser;
import dr.evoxml.MergePatternsParser;
import dr.evoxml.SitePatternsParser;
import dr.inference.model.ParameterParser;
import dr.util.Attribute;
import dr.xml.AttributeParser;
import dr.xml.XMLParser;
/**
* @author Alexei Drummond
* @author Walter Xie
*/
public class SubstitutionModelGenerator extends Generator {
public SubstitutionModelGenerator(BeautiOptions options, ComponentFactory[] components) {
super(options, components);
}
/**
* Writes the substitution model to XML.
*
* @param writer the writer
* @param model the partition model to write in BEAST XML
*/
public void writeSubstitutionModel(PartitionSubstitutionModel model, XMLWriter writer) {
DataType dataType = model.getDataType();
String dataTypeDescription = dataType.getDescription();
switch (dataType.getType()) {
case DataType.NUCLEOTIDES:
// Jukes-Cantor model
if (model.getNucSubstitutionModel() == NucModelType.JC) {
String prefix = model.getPrefix();
writer.writeComment("The JC substitution model (Jukes & Cantor, 1969)");
writer.writeOpenTag(NucModelType.HKY.getXMLName(),
new Attribute[]{new Attribute.Default<String>(XMLParser.ID, prefix + "jc")}
);
writer.writeOpenTag(HKYParser.FREQUENCIES);
writer.writeOpenTag(
FrequencyModel.FREQUENCY_MODEL,
new Attribute[]{
new Attribute.Default<String>("dataType", dataTypeDescription)
}
);
writer.writeOpenTag(FrequencyModel.FREQUENCIES);
writer.writeTag(
ParameterParser.PARAMETER,
new Attribute[]{
new Attribute.Default<String>(XMLParser.ID, prefix + "frequencies"),
new Attribute.Default<String>(ParameterParser.VALUE, "0.25 0.25 0.25 0.25")
},
true
);
writer.writeCloseTag(FrequencyModel.FREQUENCIES);
writer.writeCloseTag(FrequencyModel.FREQUENCY_MODEL);
writer.writeCloseTag(HKYParser.FREQUENCIES);
writer.writeOpenTag(HKYParser.KAPPA);
writeParameter("jc.kappa", 1, 1.0, Double.NaN, Double.NaN, writer);
writer.writeCloseTag(HKYParser.KAPPA);
writer.writeCloseTag(NucModelType.HKY.getXMLName());
throw new IllegalArgumentException("AR: Need to check that kappa = 1 for JC (I have feeling it should be 0.5)");
} else {
// Hasegawa Kishino and Yano 85 model
if (model.getNucSubstitutionModel() == NucModelType.HKY) {
if (model.isUnlinkedSubstitutionModel()) {
for (int i = 1; i <= model.getCodonPartitionCount(); i++) {
writeHKYModel(i, writer, model);
}
} else {
writeHKYModel(-1, writer, model);
}
} else if (model.getNucSubstitutionModel() == NucModelType.TN93) {
if (model.isUnlinkedSubstitutionModel()) {
for (int i = 1; i <= model.getCodonPartitionCount(); i++) {
writeTN93Model(i, writer, model);
}
} else {
writeTN93Model(-1, writer, model);
}
} else {
// General time reversible model
if (model.getNucSubstitutionModel() == NucModelType.GTR) {
if (model.isUnlinkedSubstitutionModel()) {
for (int i = 1; i <= model.getCodonPartitionCount(); i++) {
writeGTRModel(i, writer, model);
}
} else {
writeGTRModel(-1, writer, model);
}
}
}
}
break;
case DataType.AMINO_ACIDS:
// Amino Acid model
String aaModel = model.getAaSubstitutionModel().getXMLName();
writer.writeComment("The " + aaModel + " substitution model");
writer.writeTag(
EmpiricalAminoAcidModel.EMPIRICAL_AMINO_ACID_MODEL,
new Attribute[]{new Attribute.Default<String>(XMLParser.ID, model.getPrefix() + "aa"),
new Attribute.Default<String>("type", aaModel)}, true
);
break;
case DataType.TWO_STATES:
case DataType.COVARION:
switch (model.getBinarySubstitutionModel()) {
case ModelOptions.BIN_SIMPLE:
writeBinarySimpleModel(writer, model);
break;
case ModelOptions.BIN_COVARION:
writeBinaryCovarionModel(writer, model);
break;
}
break;
}
}
/**
* Write the HKY model XML block.
*
* @param num the model number
* @param writer the writer
* @param model the partition model to write in BEAST XML
*/
public void writeHKYModel(int num, XMLWriter writer, PartitionSubstitutionModel model) {
String prefix = model.getPrefix(num);
// Hasegawa Kishino and Yano 85 model
writer.writeComment("The HKY substitution model (Hasegawa, Kishino & Yano, 1985)");
writer.writeOpenTag(NucModelType.HKY.getXMLName(),
new Attribute[]{new Attribute.Default<String>(XMLParser.ID, prefix + "hky")}
);
writer.writeOpenTag(HKYParser.FREQUENCIES);
writeFrequencyModel(writer, model, num);
writer.writeCloseTag(HKYParser.FREQUENCIES);
writeParameter(num, HKYParser.KAPPA, "kappa", model, writer);
writer.writeCloseTag(NucModelType.HKY.getXMLName());
}
/**
* Write the TN93 model XML block.
*
* @param num the model number
* @param writer the writer
* @param model the partition model to write in BEAST XML
*/
public void writeTN93Model(int num, XMLWriter writer, PartitionSubstitutionModel model) {
String prefix = model.getPrefix(num);
// TN93
writer.writeComment("The TN93 substitution model");
writer.writeOpenTag(NucModelType.TN93.getXMLName(),
new Attribute[]{new Attribute.Default<String>(XMLParser.ID, prefix + "tn93")}
);
writer.writeOpenTag(HKYParser.FREQUENCIES);
writeFrequencyModel(writer, model, num);
writer.writeCloseTag(HKYParser.FREQUENCIES);
writeParameter(num, TN93.KAPPA1, "kappa1", model, writer);
writeParameter(num, TN93.KAPPA2, "kappa2", model, writer);
writer.writeCloseTag(NucModelType.TN93.getXMLName());
}
/**
* Write the GTR model XML block.
*
* @param num the model number
* @param writer the writer
* @param model the partition model to write in BEAST XML
*/
public void writeGTRModel(int num, XMLWriter writer, PartitionSubstitutionModel model) {
String prefix = model.getPrefix(num);
writer.writeComment("The general time reversible (GTR) substitution model");
writer.writeOpenTag(GTR.GTR_MODEL,
new Attribute[]{new Attribute.Default<String>(XMLParser.ID, prefix + "gtr")}
);
writer.writeOpenTag(GTR.FREQUENCIES);
writeFrequencyModel(writer, model, num);
writer.writeCloseTag(GTR.FREQUENCIES);
writeParameter(num, GTR.A_TO_C, PartitionSubstitutionModel.GTR_RATE_NAMES[0], model, writer);
writeParameter(num, GTR.A_TO_G, PartitionSubstitutionModel.GTR_RATE_NAMES[1], model, writer);
writeParameter(num, GTR.A_TO_T, PartitionSubstitutionModel.GTR_RATE_NAMES[2], model, writer);
writeParameter(num, GTR.C_TO_G, PartitionSubstitutionModel.GTR_RATE_NAMES[3], model, writer);
writeParameter(num, GTR.G_TO_T, PartitionSubstitutionModel.GTR_RATE_NAMES[4], model, writer);
writer.writeCloseTag(GTR.GTR_MODEL);
}
private void writeFrequencyModel(XMLWriter writer, PartitionSubstitutionModel model, int num) {
String dataTypeDescription = model.getDataType().getDescription();
String prefix = model.getPrefix(num);
writer.writeOpenTag(
FrequencyModel.FREQUENCY_MODEL,
new Attribute[]{
new Attribute.Default<String>("dataType", dataTypeDescription)
}
);
if (model.getFrequencyPolicy() == FrequencyPolicyType.EMPIRICAL) {
if (model.getDataType() == Nucleotides.INSTANCE && model.getCodonPartitionCount() > 1 && model.isUnlinkedSubstitutionModel()) {
for (PartitionData partition : model.getAllPartitionData()) { //?
writer.writeIDref(MergePatternsParser.MERGE_PATTERNS, prefix + partition.getName() + "." + SitePatternsParser.PATTERNS);
}
} else {
for (PartitionData partition : model.getAllPartitionData()) { //?
writer.writeIDref(AlignmentParser.ALIGNMENT, partition.getAlignment().getId());
}
}
}
writer.writeOpenTag(FrequencyModel.FREQUENCIES);
switch (model.getFrequencyPolicy()) {
case ALLEQUAL:
case ESTIMATED:
if (num == -1 || model.isUnlinkedFrequencyModel()) { // single partition, or multiple partitions unlinked frequency
writer.writeTag(ParameterParser.PARAMETER, new Attribute[] {
new Attribute.Default<String>(XMLParser.ID, prefix + "frequencies"),
new Attribute.Default<String>(ParameterParser.VALUE, "0.25 0.25 0.25 0.25") }, true);
} else { // multiple partitions but linked frequency
if (num == 1) {
writer.writeTag(ParameterParser.PARAMETER, new Attribute[] {
new Attribute.Default<String>(XMLParser.ID, model.getPrefix() + "frequencies"),
new Attribute.Default<String>(ParameterParser.VALUE, "0.25 0.25 0.25 0.25") }, true);
} else {
writer.writeIDref(ParameterParser.PARAMETER, model.getPrefix() + "frequencies");
}
}
break;
case EMPIRICAL:
if (num == -1 || model.isUnlinkedFrequencyModel()) { // single partition, or multiple partitions unlinked frequency
writeParameter(prefix + "frequencies", 4, Double.NaN, Double.NaN, Double.NaN, writer);
} else { // multiple partitions but linked frequency
if (num == 1) {
writeParameter(model.getPrefix() + "frequencies", 4, Double.NaN, Double.NaN, Double.NaN, writer);
} else {
writer.writeIDref(ParameterParser.PARAMETER, model.getPrefix() + "frequencies");
}
}
break;
}
writer.writeCloseTag(FrequencyModel.FREQUENCIES);
writer.writeCloseTag(FrequencyModel.FREQUENCY_MODEL);
}
/**
* Write the Binary simple model XML block.
*
* @param writer the writer
* @param model the partition model to write in BEAST XML
*/
public void writeBinarySimpleModel(XMLWriter writer, PartitionSubstitutionModel model) {
String dataTypeDescription = model.getDataType().getDescription();
String prefix = model.getPrefix();
writer.writeComment("The Binary simple model (based on the general substitution model)");
writer.writeOpenTag(
BinarySubstitutionModelParser.BINARY_SUBSTITUTION_MODEL,
new Attribute[]{new Attribute.Default<String>(XMLParser.ID, prefix + "bsimple")}
);
writer.writeOpenTag(dr.evomodel.substmodel.GeneralSubstitutionModel.FREQUENCIES);
writer.writeOpenTag(
FrequencyModel.FREQUENCY_MODEL,
new Attribute[]{
new Attribute.Default<String>("dataType", dataTypeDescription)
}
);
if (model.getFrequencyPolicy() == FrequencyPolicyType.EMPIRICAL) {
if (model.getDataType() == Nucleotides.INSTANCE && model.getCodonPartitionCount() > 1) {
for (PartitionData partition : model.getAllPartitionData()) { //?
writer.writeIDref(MergePatternsParser.MERGE_PATTERNS, prefix + partition.getName() + "." + SitePatternsParser.PATTERNS);
}
} else {
for (PartitionData partition : model.getAllPartitionData()) { //?
writer.writeIDref(AlignmentParser.ALIGNMENT, partition.getAlignment().getId());
}
}
}
writer.writeOpenTag(FrequencyModel.FREQUENCIES);
writeParameter(prefix + "frequencies", 2, Double.NaN, Double.NaN, Double.NaN, writer);
writer.writeCloseTag(FrequencyModel.FREQUENCIES);
writer.writeCloseTag(FrequencyModel.FREQUENCY_MODEL);
writer.writeCloseTag(dr.evomodel.substmodel.GeneralSubstitutionModel.FREQUENCIES);
writer.writeCloseTag(BinarySubstitutionModelParser.BINARY_SUBSTITUTION_MODEL);
}
/**
* Write the Binary covarion model XML block
*
* @param writer the writer
* @param model the partition model to write
*/
public void writeBinaryCovarionModel(XMLWriter writer, PartitionSubstitutionModel model) {
String prefix = model.getPrefix();
writer.writeComment("The Binary covarion model");
writer.writeOpenTag(
BinaryCovarionModel.COVARION_MODEL,
new Attribute[]{new Attribute.Default<String>(XMLParser.ID, prefix + "bcov")}
);
writeParameter(BinaryCovarionModel.FREQUENCIES,
prefix + "frequencies", 2, 0.5, 0.0, 1.0, writer);
writeParameter(BinaryCovarionModel.HIDDEN_FREQUENCIES,
prefix + "hfrequencies", 2, 0.5, 0.0, 1.0, writer);
writeParameter(BinaryCovarionModel.ALPHA, "alpha", model, writer);
writeParameter(BinaryCovarionModel.SWITCHING_RATE, "bcov.s", model, writer);
writer.writeCloseTag(BinaryCovarionModel.COVARION_MODEL);
}
/**
* Write the site model XML block.
*
* @param model the partition model to write in BEAST XML
* @param writeMuParameter the relative rate parameter for this site model
* @param writer the writer
*/
public void writeSiteModel(PartitionSubstitutionModel model, boolean writeMuParameter, XMLWriter writer) {
switch (model.getDataType().getType()) {
case DataType.NUCLEOTIDES:
if (model.getCodonPartitionCount() > 1) { //model.getCodonHeteroPattern() != null) {
for (int i = 1; i <= model.getCodonPartitionCount(); i++) {
writeNucSiteModel(i, writeMuParameter, writer, model);
}
writer.println();
} else {
writeNucSiteModel(-1, writeMuParameter, writer, model);
}
break;
case DataType.AMINO_ACIDS:
writeAASiteModel(writer, writeMuParameter, model);
break;
case DataType.TWO_STATES:
case DataType.COVARION:
writeTwoStateSiteModel(writer, writeMuParameter, model);
break;
default:
throw new IllegalArgumentException("Unknown data type");
}
}
/**
* Write the all the mu parameters for this partition model.
*
* @param writer the writer
* @param model the partition model to write in BEAST XML
*/
public void writeMuParameterRefs(PartitionSubstitutionModel model, XMLWriter writer) {
if (model.getDataType().getType() == DataType.NUCLEOTIDES && model.getCodonHeteroPattern() != null) {
for (int i = 1; i <= model.getCodonPartitionCount(); i++) {
writer.writeIDref(ParameterParser.PARAMETER, model.getPrefix(i) + "mu");
}
} else {
writer.writeIDref(ParameterParser.PARAMETER, model.getPrefix() + "mu");
}
}
public void writeLog(XMLWriter writer, PartitionSubstitutionModel model) {
int codonPartitionCount = model.getCodonPartitionCount();
switch (model.getDataType().getType()) {
case DataType.NUCLEOTIDES:
// THIS IS DONE BY ALLMUS logging in BeastGenerator
// single partition use clock.rate, no "mu"; multi-partition use "allmus"
// if (codonPartitionCount > 1) {
//
// for (int i = 1; i <= codonPartitionCount; i++) {
// writer.writeIDref(ParameterParser.PARAMETER, model.getPrefix(i) + "mu");
// }
// }
switch (model.getNucSubstitutionModel()) {
case HKY:
if (codonPartitionCount > 1 && model.isUnlinkedSubstitutionModel()) {
for (int i = 1; i <= codonPartitionCount; i++) {
writer.writeIDref(ParameterParser.PARAMETER, model.getPrefix(i) + "kappa");
}
} else {
writer.writeIDref(ParameterParser.PARAMETER, model.getPrefix() + "kappa");
}
break;
case TN93:
if (codonPartitionCount > 1 && model.isUnlinkedSubstitutionModel()) {
for (int i = 1; i <= codonPartitionCount; i++) {
writer.writeIDref(ParameterParser.PARAMETER, model.getPrefix(i) + "kappa1");
writer.writeIDref(ParameterParser.PARAMETER, model.getPrefix(i) + "kappa2");
}
} else {
writer.writeIDref(ParameterParser.PARAMETER, model.getPrefix() + "kappa1");
writer.writeIDref(ParameterParser.PARAMETER, model.getPrefix() + "kappa2");
}
break;
case GTR:
if (codonPartitionCount > 1 && model.isUnlinkedSubstitutionModel()) {
for (int i = 1; i <= codonPartitionCount; i++) {
for (String rateName : PartitionSubstitutionModel.GTR_RATE_NAMES) {
writer.writeIDref(ParameterParser.PARAMETER, model.getPrefix(i) + rateName);
}
}
} else {
for (String rateName : PartitionSubstitutionModel.GTR_RATE_NAMES) {
writer.writeIDref(ParameterParser.PARAMETER, model.getPrefix() + rateName);
}
}
break;
}
if (model.getFrequencyPolicy() == FrequencyPolicyType.ESTIMATED) {
if (codonPartitionCount > 1 && model.isUnlinkedSubstitutionModel() && model.isUnlinkedFrequencyModel()) {
for (int i = 1; i <= codonPartitionCount; i++) {
writer.writeIDref(ParameterParser.PARAMETER, model.getPrefix(i) + "frequencies");
}
} else {
writer.writeIDref(ParameterParser.PARAMETER, model.getPrefix() + "frequencies");
}
}
break;//NUCLEOTIDES
case DataType.AMINO_ACIDS:
break;//AMINO_ACIDS
case DataType.TWO_STATES:
case DataType.COVARION:
String prefix = model.getPrefix();
switch (model.getBinarySubstitutionModel()) {
case ModelOptions.BIN_SIMPLE:
break;
case ModelOptions.BIN_COVARION:
writer.writeIDref(ParameterParser.PARAMETER, prefix + "alpha");
writer.writeIDref(ParameterParser.PARAMETER, prefix + "bcov.s");
writer.writeIDref(ParameterParser.PARAMETER, prefix + "frequencies");
writer.writeIDref(ParameterParser.PARAMETER, prefix + "hfrequencies");
break;
}
break;//BINARY
}
if (model.isGammaHetero()) {
if (codonPartitionCount > 1 && model.isUnlinkedHeterogeneityModel()) {
for (int i = 1; i <= codonPartitionCount; i++) {
writer.writeIDref(ParameterParser.PARAMETER, model.getPrefix(i) + "alpha");
}
} else {
writer.writeIDref(ParameterParser.PARAMETER, model.getPrefix() + "alpha");
}
}
if (model.isInvarHetero()) {
if (codonPartitionCount > 1 && model.isUnlinkedHeterogeneityModel()) {
for (int i = 1; i <= codonPartitionCount; i++) {
writer.writeIDref(ParameterParser.PARAMETER, model.getPrefix(i) + "pInv");
}
} else {
writer.writeIDref(ParameterParser.PARAMETER, model.getPrefix() + "pInv");
}
}
}
/**
* Write the nucleotide site model XML block.
*
* @param num the model number
* @param writeMuParameter the relative rate parameter for this site model
* @param writer the writer
* @param model the partition model to write in BEAST XML
*/
private void writeNucSiteModel(int num, boolean writeMuParameter, XMLWriter writer, PartitionSubstitutionModel model) {
String prefix = model.getPrefix(num);
String prefix2 = model.getPrefix();
writer.writeComment("site model");
writer.writeOpenTag(GammaSiteModel.SITE_MODEL,
new Attribute[]{new Attribute.Default<String>(XMLParser.ID, prefix + SiteModel.SITE_MODEL)});
writer.writeOpenTag(GammaSiteModel.SUBSTITUTION_MODEL);
if (model.isUnlinkedSubstitutionModel()) {
switch (model.getNucSubstitutionModel()) {
// JC cannot be unlinked because it has no parameters
case JC:
writer.writeIDref(NucModelType.HKY.getXMLName(), prefix + "jc");
break;
case HKY:
writer.writeIDref(NucModelType.HKY.getXMLName(), prefix + "hky");
break;
case GTR:
writer.writeIDref(GTR.GTR_MODEL, prefix + "gtr");
break;
case TN93:
writer.writeIDref(NucModelType.TN93.getXMLName(), prefix + "tn93");
break;
default:
throw new IllegalArgumentException("Unknown substitution model.");
}
} else {
switch (model.getNucSubstitutionModel()) {
case JC:
writer.writeIDref(NucModelType.HKY.getXMLName(), prefix2 + "jc");
break;
case HKY:
writer.writeIDref(NucModelType.HKY.getXMLName(), prefix2 + "hky");
break;
case GTR:
writer.writeIDref(GTR.GTR_MODEL, prefix2 + "gtr");
break;
case TN93:
writer.writeIDref(NucModelType.TN93.getXMLName(), prefix2 + "tn93");
break;
default:
throw new IllegalArgumentException("Unknown substitution model.");
}
}
if (writeMuParameter) {
writeParameter(num, GammaSiteModel.RELATIVE_RATE, "mu", model, writer);
}
writer.writeCloseTag(GammaSiteModel.SUBSTITUTION_MODEL);
if (model.isGammaHetero()) {
writer.writeOpenTag(GammaSiteModel.GAMMA_SHAPE, new Attribute.Default<String>(
GammaSiteModel.GAMMA_CATEGORIES, "" + model.getGammaCategories()));
if (num == -1 || model.isUnlinkedHeterogeneityModel()) {
// writeParameter(prefix + "alpha", model, writer);
writeParameter(num, "alpha", model, writer);
} else {
// multiple partitions but linked heterogeneity
if (num == 1) {
// writeParameter(prefix2 + "alpha", model, writer);
writeParameter("alpha", model, writer);
} else {
writer.writeIDref(ParameterParser.PARAMETER, prefix2 + "alpha");
}
}
writer.writeCloseTag(GammaSiteModel.GAMMA_SHAPE);
}
if (model.isInvarHetero()) {
writer.writeOpenTag(GammaSiteModel.PROPORTION_INVARIANT);
if (num == -1 || model.isUnlinkedHeterogeneityModel()) {
// writeParameter(prefix + "pInv", model, writer);
writeParameter(num, "pInv", model, writer);
} else {
// multiple partitions but linked heterogeneity
if (num == 1) {
// writeParameter(prefix2 + "pInv", model, writer);
writeParameter("pInv", model, writer);
} else {
writer.writeIDref(ParameterParser.PARAMETER, prefix2 + "pInv");
}
}
writer.writeCloseTag(GammaSiteModel.PROPORTION_INVARIANT);
}
writer.writeCloseTag(GammaSiteModel.SITE_MODEL);
}
/**
* Write the two states site model XML block.
*
* @param writer the writer
* @param writeMuParameter the relative rate parameter for this site model
* @param model the partition model to write in BEAST XML
*/
private void writeTwoStateSiteModel(XMLWriter writer, boolean writeMuParameter, PartitionSubstitutionModel model) {
String prefix = model.getPrefix();
writer.writeComment("site model");
writer.writeOpenTag(GammaSiteModel.SITE_MODEL,
new Attribute[]{new Attribute.Default<String>(XMLParser.ID, prefix + SiteModel.SITE_MODEL)});
writer.writeOpenTag(GammaSiteModel.SUBSTITUTION_MODEL);
switch (model.getBinarySubstitutionModel()) {
case ModelOptions.BIN_SIMPLE:
//writer.writeIDref(dr.evomodel.substmodel.GeneralSubstitutionModel.GENERAL_SUBSTITUTION_MODEL, "bsimple");
writer.writeIDref(BinarySubstitutionModelParser.BINARY_SUBSTITUTION_MODEL, "bsimple");
break;
case ModelOptions.BIN_COVARION:
writer.writeIDref(BinaryCovarionModel.COVARION_MODEL, "bcov");
break;
default:
throw new IllegalArgumentException("Unknown substitution model.");
}
writer.writeCloseTag(GammaSiteModel.SUBSTITUTION_MODEL);
if (writeMuParameter) {
writeParameter(GammaSiteModel.RELATIVE_RATE, "mu", model, writer);
}
if (model.isGammaHetero()) {
writer.writeOpenTag(GammaSiteModel.GAMMA_SHAPE,
new Attribute.Default<String>(GammaSiteModel.GAMMA_CATEGORIES, "" + model.getGammaCategories()));
writeParameter(prefix + "alpha", model, writer);
writer.writeCloseTag(GammaSiteModel.GAMMA_SHAPE);
}
if (model.isInvarHetero()) {
writeParameter(GammaSiteModel.PROPORTION_INVARIANT, "pInv", model, writer);
}
writer.writeCloseTag(GammaSiteModel.SITE_MODEL);
}
/**
* Write the AA site model XML block.
*
* @param writer the writer
* @param writeMuParameter the relative rate parameter for this site model
* @param model the partition model to write in BEAST XML
*/
private void writeAASiteModel(XMLWriter writer, boolean writeMuParameter, PartitionSubstitutionModel model) {
String prefix = model.getPrefix();
writer.writeComment("site model");
writer.writeOpenTag(GammaSiteModel.SITE_MODEL, new Attribute[]{
new Attribute.Default<String>(XMLParser.ID, prefix + SiteModel.SITE_MODEL)});
writer.writeOpenTag(GammaSiteModel.SUBSTITUTION_MODEL);
writer.writeIDref(EmpiricalAminoAcidModel.EMPIRICAL_AMINO_ACID_MODEL, prefix + "aa");
writer.writeCloseTag(GammaSiteModel.SUBSTITUTION_MODEL);
if (writeMuParameter) {
writeParameter(GammaSiteModel.RELATIVE_RATE, "mu", model, writer);
}
if (model.isGammaHetero()) {
writer.writeOpenTag(GammaSiteModel.GAMMA_SHAPE,
new Attribute.Default<String>(
GammaSiteModel.GAMMA_CATEGORIES, "" + model.getGammaCategories()));
writeParameter("alpha", model, writer);
writer.writeCloseTag(GammaSiteModel.GAMMA_SHAPE);
}
if (model.isInvarHetero()) {
writeParameter(GammaSiteModel.PROPORTION_INVARIANT, "pInv", model, writer);
}
writer.writeCloseTag(GammaSiteModel.SITE_MODEL);
}
} | BEAUTi: fix the bug of no other elements in <substitutionModel> besides Substitution Model Type. | src/dr/app/beauti/generator/SubstitutionModelGenerator.java | BEAUTi: fix the bug of no other elements in <substitutionModel> besides Substitution Model Type. | <ide><path>rc/dr/app/beauti/generator/SubstitutionModelGenerator.java
<ide> throw new IllegalArgumentException("Unknown substitution model.");
<ide> }
<ide> }
<add>
<add> writer.writeCloseTag(GammaSiteModel.SUBSTITUTION_MODEL);
<ide>
<ide> if (writeMuParameter) {
<ide> writeParameter(num, GammaSiteModel.RELATIVE_RATE, "mu", model, writer);
<del> }
<del>
<del> writer.writeCloseTag(GammaSiteModel.SUBSTITUTION_MODEL);
<add> }
<ide>
<ide> if (model.isGammaHetero()) {
<ide> writer.writeOpenTag(GammaSiteModel.GAMMA_SHAPE, new Attribute.Default<String>( |
|
Java | apache-2.0 | ad84b66412db464615e1325c8dcb82b49c6314fc | 0 | vladmm/intellij-community,caot/intellij-community,retomerz/intellij-community,semonte/intellij-community,dslomov/intellij-community,FHannes/intellij-community,fnouama/intellij-community,idea4bsd/idea4bsd,amith01994/intellij-community,fitermay/intellij-community,robovm/robovm-studio,Lekanich/intellij-community,caot/intellij-community,vladmm/intellij-community,ivan-fedorov/intellij-community,xfournet/intellij-community,ryano144/intellij-community,adedayo/intellij-community,vladmm/intellij-community,lucafavatella/intellij-community,MER-GROUP/intellij-community,samthor/intellij-community,allotria/intellij-community,FHannes/intellij-community,orekyuu/intellij-community,vladmm/intellij-community,xfournet/intellij-community,ibinti/intellij-community,kdwink/intellij-community,allotria/intellij-community,suncycheng/intellij-community,gnuhub/intellij-community,ThiagoGarciaAlves/intellij-community,diorcety/intellij-community,ibinti/intellij-community,hurricup/intellij-community,fengbaicanhe/intellij-community,slisson/intellij-community,kool79/intellij-community,ahb0327/intellij-community,izonder/intellij-community,Lekanich/intellij-community,robovm/robovm-studio,clumsy/intellij-community,idea4bsd/idea4bsd,MichaelNedzelsky/intellij-community,pwoodworth/intellij-community,semonte/intellij-community,pwoodworth/intellij-community,blademainer/intellij-community,retomerz/intellij-community,MichaelNedzelsky/intellij-community,apixandru/intellij-community,suncycheng/intellij-community,nicolargo/intellij-community,ryano144/intellij-community,salguarnieri/intellij-community,samthor/intellij-community,allotria/intellij-community,amith01994/intellij-community,Distrotech/intellij-community,Distrotech/intellij-community,da1z/intellij-community,ivan-fedorov/intellij-community,holmes/intellij-community,kdwink/intellij-community,fitermay/intellij-community,samthor/intellij-community,FHannes/intellij-community,vvv1559/intellij-community,petteyg/intellij-community,amith01994/intellij-community,dslomov/intellij-community,SerCeMan/intellij-community,ol-loginov/intellij-community,Distrotech/intellij-community,alphafoobar/intellij-community,ryano144/intellij-community,ryano144/intellij-community,asedunov/intellij-community,ahb0327/intellij-community,ivan-fedorov/intellij-community,semonte/intellij-community,gnuhub/intellij-community,kool79/intellij-community,michaelgallacher/intellij-community,kool79/intellij-community,amith01994/intellij-community,gnuhub/intellij-community,ThiagoGarciaAlves/intellij-community,slisson/intellij-community,da1z/intellij-community,ftomassetti/intellij-community,dslomov/intellij-community,gnuhub/intellij-community,fnouama/intellij-community,salguarnieri/intellij-community,muntasirsyed/intellij-community,nicolargo/intellij-community,vvv1559/intellij-community,apixandru/intellij-community,diorcety/intellij-community,diorcety/intellij-community,ThiagoGarciaAlves/intellij-community,wreckJ/intellij-community,fnouama/intellij-community,muntasirsyed/intellij-community,mglukhikh/intellij-community,blademainer/intellij-community,petteyg/intellij-community,jagguli/intellij-community,ol-loginov/intellij-community,caot/intellij-community,akosyakov/intellij-community,nicolargo/intellij-community,ThiagoGarciaAlves/intellij-community,kool79/intellij-community,wreckJ/intellij-community,vvv1559/intellij-community,retomerz/intellij-community,FHannes/intellij-community,wreckJ/intellij-community,hurricup/intellij-community,xfournet/intellij-community,fnouama/intellij-community,jagguli/intellij-community,caot/intellij-community,dslomov/intellij-community,fnouama/intellij-community,jagguli/intellij-community,fitermay/intellij-community,suncycheng/intellij-community,pwoodworth/intellij-community,fitermay/intellij-community,MichaelNedzelsky/intellij-community,izonder/intellij-community,da1z/intellij-community,amith01994/intellij-community,mglukhikh/intellij-community,alphafoobar/intellij-community,apixandru/intellij-community,supersven/intellij-community,blademainer/intellij-community,vvv1559/intellij-community,fnouama/intellij-community,ftomassetti/intellij-community,MichaelNedzelsky/intellij-community,samthor/intellij-community,izonder/intellij-community,michaelgallacher/intellij-community,adedayo/intellij-community,alphafoobar/intellij-community,fengbaicanhe/intellij-community,SerCeMan/intellij-community,gnuhub/intellij-community,slisson/intellij-community,salguarnieri/intellij-community,fnouama/intellij-community,Distrotech/intellij-community,orekyuu/intellij-community,da1z/intellij-community,michaelgallacher/intellij-community,pwoodworth/intellij-community,caot/intellij-community,Lekanich/intellij-community,hurricup/intellij-community,suncycheng/intellij-community,youdonghai/intellij-community,muntasirsyed/intellij-community,amith01994/intellij-community,mglukhikh/intellij-community,ftomassetti/intellij-community,Lekanich/intellij-community,ftomassetti/intellij-community,tmpgit/intellij-community,lucafavatella/intellij-community,ivan-fedorov/intellij-community,fengbaicanhe/intellij-community,fitermay/intellij-community,vladmm/intellij-community,holmes/intellij-community,holmes/intellij-community,alphafoobar/intellij-community,pwoodworth/intellij-community,ftomassetti/intellij-community,FHannes/intellij-community,diorcety/intellij-community,diorcety/intellij-community,kdwink/intellij-community,salguarnieri/intellij-community,lucafavatella/intellij-community,Lekanich/intellij-community,kdwink/intellij-community,da1z/intellij-community,nicolargo/intellij-community,SerCeMan/intellij-community,idea4bsd/idea4bsd,petteyg/intellij-community,ThiagoGarciaAlves/intellij-community,asedunov/intellij-community,wreckJ/intellij-community,semonte/intellij-community,fnouama/intellij-community,ahb0327/intellij-community,adedayo/intellij-community,ol-loginov/intellij-community,ibinti/intellij-community,idea4bsd/idea4bsd,ivan-fedorov/intellij-community,tmpgit/intellij-community,robovm/robovm-studio,salguarnieri/intellij-community,alphafoobar/intellij-community,ftomassetti/intellij-community,wreckJ/intellij-community,apixandru/intellij-community,izonder/intellij-community,izonder/intellij-community,apixandru/intellij-community,ahb0327/intellij-community,mglukhikh/intellij-community,samthor/intellij-community,da1z/intellij-community,TangHao1987/intellij-community,ryano144/intellij-community,jagguli/intellij-community,pwoodworth/intellij-community,blademainer/intellij-community,akosyakov/intellij-community,ahb0327/intellij-community,ftomassetti/intellij-community,hurricup/intellij-community,ryano144/intellij-community,youdonghai/intellij-community,lucafavatella/intellij-community,vvv1559/intellij-community,tmpgit/intellij-community,semonte/intellij-community,apixandru/intellij-community,amith01994/intellij-community,ThiagoGarciaAlves/intellij-community,samthor/intellij-community,fengbaicanhe/intellij-community,signed/intellij-community,caot/intellij-community,apixandru/intellij-community,retomerz/intellij-community,MichaelNedzelsky/intellij-community,Lekanich/intellij-community,idea4bsd/idea4bsd,FHannes/intellij-community,vvv1559/intellij-community,diorcety/intellij-community,fengbaicanhe/intellij-community,semonte/intellij-community,asedunov/intellij-community,ryano144/intellij-community,izonder/intellij-community,michaelgallacher/intellij-community,idea4bsd/idea4bsd,MichaelNedzelsky/intellij-community,izonder/intellij-community,gnuhub/intellij-community,jagguli/intellij-community,ol-loginov/intellij-community,wreckJ/intellij-community,samthor/intellij-community,fengbaicanhe/intellij-community,mglukhikh/intellij-community,petteyg/intellij-community,da1z/intellij-community,izonder/intellij-community,ibinti/intellij-community,clumsy/intellij-community,Distrotech/intellij-community,kdwink/intellij-community,vladmm/intellij-community,signed/intellij-community,wreckJ/intellij-community,nicolargo/intellij-community,alphafoobar/intellij-community,kool79/intellij-community,ibinti/intellij-community,xfournet/intellij-community,amith01994/intellij-community,SerCeMan/intellij-community,slisson/intellij-community,youdonghai/intellij-community,idea4bsd/idea4bsd,salguarnieri/intellij-community,dslomov/intellij-community,asedunov/intellij-community,signed/intellij-community,clumsy/intellij-community,asedunov/intellij-community,ol-loginov/intellij-community,apixandru/intellij-community,ibinti/intellij-community,petteyg/intellij-community,hurricup/intellij-community,Distrotech/intellij-community,signed/intellij-community,ol-loginov/intellij-community,fengbaicanhe/intellij-community,ryano144/intellij-community,Lekanich/intellij-community,muntasirsyed/intellij-community,caot/intellij-community,FHannes/intellij-community,pwoodworth/intellij-community,dslomov/intellij-community,ahb0327/intellij-community,robovm/robovm-studio,asedunov/intellij-community,nicolargo/intellij-community,SerCeMan/intellij-community,jagguli/intellij-community,suncycheng/intellij-community,kool79/intellij-community,MER-GROUP/intellij-community,izonder/intellij-community,allotria/intellij-community,adedayo/intellij-community,apixandru/intellij-community,asedunov/intellij-community,MER-GROUP/intellij-community,idea4bsd/idea4bsd,pwoodworth/intellij-community,orekyuu/intellij-community,fitermay/intellij-community,FHannes/intellij-community,TangHao1987/intellij-community,robovm/robovm-studio,vvv1559/intellij-community,muntasirsyed/intellij-community,allotria/intellij-community,asedunov/intellij-community,TangHao1987/intellij-community,dslomov/intellij-community,orekyuu/intellij-community,slisson/intellij-community,supersven/intellij-community,TangHao1987/intellij-community,FHannes/intellij-community,samthor/intellij-community,da1z/intellij-community,mglukhikh/intellij-community,allotria/intellij-community,vladmm/intellij-community,muntasirsyed/intellij-community,ahb0327/intellij-community,akosyakov/intellij-community,diorcety/intellij-community,holmes/intellij-community,salguarnieri/intellij-community,fnouama/intellij-community,salguarnieri/intellij-community,retomerz/intellij-community,mglukhikh/intellij-community,TangHao1987/intellij-community,adedayo/intellij-community,apixandru/intellij-community,tmpgit/intellij-community,ryano144/intellij-community,fitermay/intellij-community,vladmm/intellij-community,adedayo/intellij-community,youdonghai/intellij-community,MER-GROUP/intellij-community,fengbaicanhe/intellij-community,michaelgallacher/intellij-community,SerCeMan/intellij-community,MER-GROUP/intellij-community,youdonghai/intellij-community,xfournet/intellij-community,TangHao1987/intellij-community,ivan-fedorov/intellij-community,lucafavatella/intellij-community,vvv1559/intellij-community,ibinti/intellij-community,suncycheng/intellij-community,diorcety/intellij-community,Lekanich/intellij-community,ftomassetti/intellij-community,ftomassetti/intellij-community,fengbaicanhe/intellij-community,dslomov/intellij-community,fitermay/intellij-community,signed/intellij-community,mglukhikh/intellij-community,vladmm/intellij-community,signed/intellij-community,idea4bsd/idea4bsd,ahb0327/intellij-community,lucafavatella/intellij-community,hurricup/intellij-community,kdwink/intellij-community,jagguli/intellij-community,kool79/intellij-community,dslomov/intellij-community,MER-GROUP/intellij-community,MichaelNedzelsky/intellij-community,FHannes/intellij-community,muntasirsyed/intellij-community,xfournet/intellij-community,blademainer/intellij-community,dslomov/intellij-community,caot/intellij-community,TangHao1987/intellij-community,ol-loginov/intellij-community,ol-loginov/intellij-community,suncycheng/intellij-community,jagguli/intellij-community,kdwink/intellij-community,samthor/intellij-community,MichaelNedzelsky/intellij-community,retomerz/intellij-community,orekyuu/intellij-community,idea4bsd/idea4bsd,Lekanich/intellij-community,tmpgit/intellij-community,wreckJ/intellij-community,petteyg/intellij-community,vvv1559/intellij-community,vvv1559/intellij-community,michaelgallacher/intellij-community,orekyuu/intellij-community,ibinti/intellij-community,supersven/intellij-community,hurricup/intellij-community,allotria/intellij-community,ThiagoGarciaAlves/intellij-community,tmpgit/intellij-community,salguarnieri/intellij-community,alphafoobar/intellij-community,clumsy/intellij-community,TangHao1987/intellij-community,jagguli/intellij-community,wreckJ/intellij-community,kool79/intellij-community,retomerz/intellij-community,petteyg/intellij-community,slisson/intellij-community,semonte/intellij-community,petteyg/intellij-community,salguarnieri/intellij-community,alphafoobar/intellij-community,FHannes/intellij-community,samthor/intellij-community,nicolargo/intellij-community,holmes/intellij-community,xfournet/intellij-community,da1z/intellij-community,tmpgit/intellij-community,MER-GROUP/intellij-community,samthor/intellij-community,xfournet/intellij-community,ibinti/intellij-community,amith01994/intellij-community,robovm/robovm-studio,signed/intellij-community,hurricup/intellij-community,orekyuu/intellij-community,fnouama/intellij-community,retomerz/intellij-community,ivan-fedorov/intellij-community,TangHao1987/intellij-community,holmes/intellij-community,TangHao1987/intellij-community,lucafavatella/intellij-community,allotria/intellij-community,akosyakov/intellij-community,diorcety/intellij-community,asedunov/intellij-community,holmes/intellij-community,Lekanich/intellij-community,adedayo/intellij-community,robovm/robovm-studio,amith01994/intellij-community,fitermay/intellij-community,nicolargo/intellij-community,ivan-fedorov/intellij-community,youdonghai/intellij-community,signed/intellij-community,retomerz/intellij-community,Distrotech/intellij-community,muntasirsyed/intellij-community,supersven/intellij-community,allotria/intellij-community,diorcety/intellij-community,robovm/robovm-studio,mglukhikh/intellij-community,salguarnieri/intellij-community,muntasirsyed/intellij-community,caot/intellij-community,akosyakov/intellij-community,caot/intellij-community,fnouama/intellij-community,SerCeMan/intellij-community,robovm/robovm-studio,Distrotech/intellij-community,adedayo/intellij-community,fnouama/intellij-community,michaelgallacher/intellij-community,gnuhub/intellij-community,ftomassetti/intellij-community,salguarnieri/intellij-community,clumsy/intellij-community,lucafavatella/intellij-community,alphafoobar/intellij-community,akosyakov/intellij-community,robovm/robovm-studio,ol-loginov/intellij-community,robovm/robovm-studio,michaelgallacher/intellij-community,petteyg/intellij-community,muntasirsyed/intellij-community,kdwink/intellij-community,allotria/intellij-community,ivan-fedorov/intellij-community,youdonghai/intellij-community,blademainer/intellij-community,ibinti/intellij-community,izonder/intellij-community,xfournet/intellij-community,kdwink/intellij-community,jagguli/intellij-community,Distrotech/intellij-community,MichaelNedzelsky/intellij-community,suncycheng/intellij-community,supersven/intellij-community,SerCeMan/intellij-community,MER-GROUP/intellij-community,wreckJ/intellij-community,slisson/intellij-community,slisson/intellij-community,akosyakov/intellij-community,clumsy/intellij-community,fengbaicanhe/intellij-community,akosyakov/intellij-community,holmes/intellij-community,blademainer/intellij-community,semonte/intellij-community,kdwink/intellij-community,supersven/intellij-community,xfournet/intellij-community,ivan-fedorov/intellij-community,fitermay/intellij-community,clumsy/intellij-community,Distrotech/intellij-community,semonte/intellij-community,akosyakov/intellij-community,retomerz/intellij-community,youdonghai/intellij-community,suncycheng/intellij-community,ftomassetti/intellij-community,SerCeMan/intellij-community,slisson/intellij-community,ol-loginov/intellij-community,alphafoobar/intellij-community,da1z/intellij-community,MER-GROUP/intellij-community,vladmm/intellij-community,retomerz/intellij-community,ahb0327/intellij-community,vladmm/intellij-community,xfournet/intellij-community,tmpgit/intellij-community,caot/intellij-community,allotria/intellij-community,da1z/intellij-community,MER-GROUP/intellij-community,akosyakov/intellij-community,signed/intellij-community,supersven/intellij-community,adedayo/intellij-community,vvv1559/intellij-community,petteyg/intellij-community,ThiagoGarciaAlves/intellij-community,youdonghai/intellij-community,MichaelNedzelsky/intellij-community,SerCeMan/intellij-community,holmes/intellij-community,da1z/intellij-community,idea4bsd/idea4bsd,nicolargo/intellij-community,Distrotech/intellij-community,michaelgallacher/intellij-community,asedunov/intellij-community,signed/intellij-community,asedunov/intellij-community,lucafavatella/intellij-community,michaelgallacher/intellij-community,MER-GROUP/intellij-community,kool79/intellij-community,gnuhub/intellij-community,vladmm/intellij-community,clumsy/intellij-community,retomerz/intellij-community,MichaelNedzelsky/intellij-community,ThiagoGarciaAlves/intellij-community,tmpgit/intellij-community,orekyuu/intellij-community,asedunov/intellij-community,pwoodworth/intellij-community,ryano144/intellij-community,semonte/intellij-community,hurricup/intellij-community,lucafavatella/intellij-community,hurricup/intellij-community,fengbaicanhe/intellij-community,ahb0327/intellij-community,ol-loginov/intellij-community,michaelgallacher/intellij-community,holmes/intellij-community,TangHao1987/intellij-community,nicolargo/intellij-community,ibinti/intellij-community,clumsy/intellij-community,suncycheng/intellij-community,holmes/intellij-community,caot/intellij-community,supersven/intellij-community,izonder/intellij-community,slisson/intellij-community,apixandru/intellij-community,lucafavatella/intellij-community,youdonghai/intellij-community,youdonghai/intellij-community,suncycheng/intellij-community,pwoodworth/intellij-community,da1z/intellij-community,kdwink/intellij-community,blademainer/intellij-community,ahb0327/intellij-community,youdonghai/intellij-community,xfournet/intellij-community,mglukhikh/intellij-community,suncycheng/intellij-community,pwoodworth/intellij-community,ol-loginov/intellij-community,ibinti/intellij-community,akosyakov/intellij-community,semonte/intellij-community,hurricup/intellij-community,supersven/intellij-community,ahb0327/intellij-community,SerCeMan/intellij-community,vvv1559/intellij-community,muntasirsyed/intellij-community,ThiagoGarciaAlves/intellij-community,mglukhikh/intellij-community,michaelgallacher/intellij-community,kool79/intellij-community,diorcety/intellij-community,xfournet/intellij-community,muntasirsyed/intellij-community,FHannes/intellij-community,kool79/intellij-community,supersven/intellij-community,kool79/intellij-community,tmpgit/intellij-community,alphafoobar/intellij-community,samthor/intellij-community,jagguli/intellij-community,retomerz/intellij-community,blademainer/intellij-community,izonder/intellij-community,alphafoobar/intellij-community,lucafavatella/intellij-community,ryano144/intellij-community,petteyg/intellij-community,orekyuu/intellij-community,tmpgit/intellij-community,signed/intellij-community,pwoodworth/intellij-community,holmes/intellij-community,fengbaicanhe/intellij-community,apixandru/intellij-community,signed/intellij-community,ThiagoGarciaAlves/intellij-community,semonte/intellij-community,allotria/intellij-community,wreckJ/intellij-community,apixandru/intellij-community,TangHao1987/intellij-community,ivan-fedorov/intellij-community,wreckJ/intellij-community,mglukhikh/intellij-community,idea4bsd/idea4bsd,ryano144/intellij-community,slisson/intellij-community,Distrotech/intellij-community,orekyuu/intellij-community,Lekanich/intellij-community,akosyakov/intellij-community,hurricup/intellij-community,petteyg/intellij-community,kdwink/intellij-community,hurricup/intellij-community,ibinti/intellij-community,MichaelNedzelsky/intellij-community,clumsy/intellij-community,SerCeMan/intellij-community,robovm/robovm-studio,MER-GROUP/intellij-community,Lekanich/intellij-community,supersven/intellij-community,mglukhikh/intellij-community,clumsy/intellij-community,amith01994/intellij-community,blademainer/intellij-community,ThiagoGarciaAlves/intellij-community,nicolargo/intellij-community,adedayo/intellij-community,signed/intellij-community,orekyuu/intellij-community,apixandru/intellij-community,adedayo/intellij-community,orekyuu/intellij-community,youdonghai/intellij-community,amith01994/intellij-community,tmpgit/intellij-community,blademainer/intellij-community,semonte/intellij-community,jagguli/intellij-community,ivan-fedorov/intellij-community,adedayo/intellij-community,diorcety/intellij-community,blademainer/intellij-community,ftomassetti/intellij-community,lucafavatella/intellij-community,supersven/intellij-community,gnuhub/intellij-community,clumsy/intellij-community,idea4bsd/idea4bsd,nicolargo/intellij-community,vvv1559/intellij-community,gnuhub/intellij-community,FHannes/intellij-community,dslomov/intellij-community,fitermay/intellij-community,allotria/intellij-community,gnuhub/intellij-community,fitermay/intellij-community,fitermay/intellij-community,slisson/intellij-community,asedunov/intellij-community,gnuhub/intellij-community,dslomov/intellij-community | /*
* Copyright 2000-2015 JetBrains s.r.o.
*
* 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 com.intellij.psi.impl.smartPointers;
import com.intellij.injected.editor.DocumentWindow;
import com.intellij.lang.injection.InjectedLanguageManager;
import com.intellij.openapi.application.ApplicationManager;
import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.editor.RangeMarker;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.util.*;
import com.intellij.openapi.vfs.VirtualFile;
import com.intellij.psi.*;
import com.intellij.psi.impl.PsiManagerEx;
import com.intellij.psi.impl.source.tree.MarkersHolderFileViewProvider;
import com.intellij.psi.util.PsiUtilCore;
import com.intellij.reference.SoftReference;
import com.intellij.util.containers.ContainerUtil;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.annotations.TestOnly;
import java.lang.ref.Reference;
import java.lang.ref.ReferenceQueue;
import java.lang.ref.WeakReference;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import java.util.Set;
public class SmartPointerManagerImpl extends SmartPointerManager {
private static final Logger LOG = Logger.getInstance("#com.intellij.psi.impl.smartPointers.SmartPointerManagerImpl");
private static final Object lock = new Object();
private static final ReferenceQueue<SmartPointerEx> ourQueue = new ReferenceQueue<SmartPointerEx>();
@SuppressWarnings("unused") private static final LowMemoryWatcher ourWatcher = LowMemoryWatcher.register(new Runnable() {
@Override
public void run() {
processQueue();
}
});
private final Project myProject;
private final Key<Set<PointerReference>> POINTERS_KEY;
private final Key<Boolean> POINTERS_ARE_FASTENED_KEY;
public SmartPointerManagerImpl(Project project) {
myProject = project;
POINTERS_KEY = Key.create("SMART_POINTERS for "+project);
POINTERS_ARE_FASTENED_KEY = Key.create("SMART_POINTERS_ARE_FASTENED for "+project);
}
private static void processQueue() {
while (true) {
PointerReference reference = (PointerReference)ourQueue.poll();
if (reference == null) break;
synchronized (lock) {
Set<PointerReference> pointers = reference.file.getUserData(reference.key);
if (pointers != null) {
pointers.remove(reference);
if (pointers.isEmpty()) {
reference.file.putUserData(reference.key, null);
}
}
}
}
}
public void fastenBelts(@NotNull VirtualFile file, int offset, @Nullable RangeMarker[] cachedRangeMarkers) {
ApplicationManager.getApplication().assertIsDispatchThread();
processQueue();
synchronized (lock) {
List<SmartPointerEx> pointers = getStrongPointers(file);
if (pointers.isEmpty()) return;
if (getAndFasten(file)) return;
for (SmartPointerEx pointer : pointers) {
pointer.fastenBelt(offset, cachedRangeMarkers);
}
PsiFile psiFile = ((PsiManagerEx)PsiManager.getInstance(myProject)).getFileManager().getCachedPsiFile(file);
if (psiFile != null) {
PsiDocumentManager psiDocumentManager = PsiDocumentManager.getInstance(myProject);
for (DocumentWindow injectedDoc : InjectedLanguageManager.getInstance(myProject).getCachedInjectedDocuments(psiFile)) {
PsiFile injectedFile = psiDocumentManager.getPsiFile(injectedDoc);
if (injectedFile == null) continue;
RangeMarker[] cachedMarkers = getCachedRangeMarkerToInjectedFragment(injectedFile);
boolean relevant = false;
for (Segment hostSegment : injectedDoc.getHostRanges()) {
if (offset <= hostSegment.getEndOffset()) {
relevant = true;
break;
}
}
if (relevant) {
fastenBelts(injectedFile.getViewProvider().getVirtualFile(), 0, cachedMarkers);
}
}
}
}
}
@NotNull
private static RangeMarker[] getCachedRangeMarkerToInjectedFragment(@NotNull PsiFile injectedFile) {
MarkersHolderFileViewProvider provider = (MarkersHolderFileViewProvider)injectedFile.getViewProvider();
return provider.getCachedMarkers();
}
public void unfastenBelts(@NotNull VirtualFile file, int offset) {
ApplicationManager.getApplication().assertIsDispatchThread();
processQueue();
synchronized (lock) {
List<SmartPointerEx> pointers = getStrongPointers(file);
if (pointers.isEmpty()) return;
if (!getAndUnfasten(file)) return;
for (SmartPointerEx pointer : pointers) {
pointer.unfastenBelt(offset);
}
PsiFile psiFile = ((PsiManagerEx)PsiManager.getInstance(myProject)).getFileManager().getCachedPsiFile(file);
if (psiFile != null) {
PsiDocumentManager psiDocumentManager = PsiDocumentManager.getInstance(myProject);
for (DocumentWindow injectedDoc : InjectedLanguageManager.getInstance(myProject).getCachedInjectedDocuments(psiFile)) {
PsiFile injectedFile = psiDocumentManager.getPsiFile(injectedDoc);
if (injectedFile == null) continue;
unfastenBelts(injectedFile.getViewProvider().getVirtualFile(), 0);
}
}
}
}
private static final Key<Reference<SmartPointerEx>> CACHED_SMART_POINTER_KEY = Key.create("CACHED_SMART_POINTER_KEY");
@Override
@NotNull
public <E extends PsiElement> SmartPsiElementPointer<E> createSmartPsiElementPointer(@NotNull E element) {
ApplicationManager.getApplication().assertReadAccessAllowed();
PsiFile containingFile = element.getContainingFile();
return createSmartPsiElementPointer(element, containingFile);
}
@Override
@NotNull
public <E extends PsiElement> SmartPsiElementPointer<E> createSmartPsiElementPointer(@NotNull E element, PsiFile containingFile) {
if (containingFile != null && !containingFile.isValid() || containingFile == null && !element.isValid()) {
PsiUtilCore.ensureValid(element);
LOG.error("Invalid element:" + element);
}
processQueue();
SmartPointerEx<E> pointer = getCachedPointer(element);
if (pointer != null) {
containingFile = containingFile == null ? element.getContainingFile() : containingFile;
if (containingFile != null && areBeltsFastened(containingFile.getViewProvider().getVirtualFile())) {
pointer.fastenBelt(0, null);
}
}
else {
pointer = new SmartPsiElementPointerImpl<E>(myProject, element, containingFile);
if (containingFile != null) {
initPointer(pointer, containingFile.getViewProvider().getVirtualFile());
}
element.putUserData(CACHED_SMART_POINTER_KEY, new SoftReference<SmartPointerEx>(pointer));
}
if (pointer instanceof SmartPsiElementPointerImpl) {
synchronized (lock) {
((SmartPsiElementPointerImpl)pointer).incrementAndGetReferenceCount(1);
}
}
return pointer;
}
private static <E extends PsiElement> SmartPointerEx<E> getCachedPointer(@NotNull E element) {
Reference<SmartPointerEx> data = element.getUserData(CACHED_SMART_POINTER_KEY);
SmartPointerEx cachedPointer = SoftReference.dereference(data);
if (cachedPointer != null) {
PsiElement cachedElement = cachedPointer.getCachedElement();
if (cachedElement != null && cachedElement != element) {
return null;
}
}
//noinspection unchecked
return cachedPointer;
}
@Override
@NotNull
public SmartPsiFileRange createSmartPsiFileRangePointer(@NotNull PsiFile file, @NotNull TextRange range) {
if (!file.isValid()) {
LOG.error("Invalid element:" + file);
}
processQueue();
SmartPsiFileRangePointerImpl pointer = new SmartPsiFileRangePointerImpl(file, ProperTextRange.create(range));
initPointer(pointer, file.getViewProvider().getVirtualFile());
return pointer;
}
private <E extends PsiElement> void initPointer(@NotNull SmartPointerEx<E> pointer, @NotNull VirtualFile containingFile) {
synchronized (lock) {
Set<PointerReference> pointers = getPointers(containingFile);
if (pointers == null) {
pointers = ContainerUtil.newTroveSet(); // we synchronise access anyway
containingFile.putUserData(POINTERS_KEY, pointers);
}
pointers.add(new PointerReference(pointer, containingFile, ourQueue, POINTERS_KEY));
if (areBeltsFastened(containingFile)) {
pointer.fastenBelt(0, null);
}
}
}
@Override
public boolean removePointer(@NotNull SmartPsiElementPointer pointer) {
synchronized (lock) {
if (pointer instanceof SmartPsiElementPointerImpl) {
int refCount = ((SmartPsiElementPointerImpl)pointer).incrementAndGetReferenceCount(-1);
if (refCount == 0) {
PsiElement element = ((SmartPointerEx)pointer).getCachedElement();
if (element != null) {
element.putUserData(CACHED_SMART_POINTER_KEY, null);
}
PsiFile containingFile = pointer.getContainingFile();
if (containingFile == null) return false;
Set<PointerReference> pointers = getPointers(containingFile.getViewProvider().getVirtualFile());
if (pointers == null) return false;
SmartPointerElementInfo info = ((SmartPsiElementPointerImpl)pointer).getElementInfo();
info.cleanup();
for (Iterator<PointerReference> iterator = pointers.iterator(); iterator.hasNext(); ) {
if (pointer == iterator.next().get()) {
iterator.remove();
return true;
}
}
return false;
}
}
}
return false;
}
@Nullable
private Set<PointerReference> getPointers(@NotNull VirtualFile containingFile) {
return containingFile.getUserData(POINTERS_KEY);
}
@NotNull
private List<SmartPointerEx> getStrongPointers(@NotNull VirtualFile containingFile) {
Set<PointerReference> refs = getPointers(containingFile);
if (refs == null) return Collections.emptyList();
List<SmartPointerEx> result = ContainerUtil.newArrayList();
for (PointerReference reference : refs) {
ContainerUtil.addIfNotNull(result, reference.get());
}
return result;
}
@TestOnly
public int getPointersNumber(@NotNull PsiFile containingFile) {
synchronized (lock) {
return getStrongPointers(containingFile.getViewProvider().getVirtualFile()).size();
}
}
private boolean getAndFasten(@NotNull VirtualFile file) {
boolean fastened = areBeltsFastened(file);
file.putUserData(POINTERS_ARE_FASTENED_KEY, Boolean.TRUE);
return fastened;
}
private boolean getAndUnfasten(@NotNull VirtualFile file) {
boolean fastened = areBeltsFastened(file);
file.putUserData(POINTERS_ARE_FASTENED_KEY, null);
return fastened;
}
private boolean areBeltsFastened(VirtualFile file) {
return file.getUserData(POINTERS_ARE_FASTENED_KEY) == Boolean.TRUE;
}
@Override
public boolean pointToTheSameElement(@NotNull SmartPsiElementPointer pointer1, @NotNull SmartPsiElementPointer pointer2) {
return SmartPsiElementPointerImpl.pointsToTheSameElementAs(pointer1, pointer2);
}
private static class PointerReference extends WeakReference<SmartPointerEx> {
private final VirtualFile file;
private final Key<Set<PointerReference>> key;
public PointerReference(SmartPointerEx<?> pointer,
VirtualFile containingFile,
ReferenceQueue<SmartPointerEx> queue,
Key<Set<PointerReference>> key) {
super(pointer, queue);
file = containingFile;
this.key = key;
}
}
}
| platform/core-impl/src/com/intellij/psi/impl/smartPointers/SmartPointerManagerImpl.java | /*
* Copyright 2000-2015 JetBrains s.r.o.
*
* 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 com.intellij.psi.impl.smartPointers;
import com.intellij.injected.editor.DocumentWindow;
import com.intellij.lang.injection.InjectedLanguageManager;
import com.intellij.openapi.application.ApplicationManager;
import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.editor.RangeMarker;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.util.Key;
import com.intellij.openapi.util.ProperTextRange;
import com.intellij.openapi.util.Segment;
import com.intellij.openapi.util.TextRange;
import com.intellij.openapi.vfs.VirtualFile;
import com.intellij.psi.*;
import com.intellij.psi.impl.PsiManagerEx;
import com.intellij.psi.impl.source.tree.MarkersHolderFileViewProvider;
import com.intellij.psi.util.PsiUtilCore;
import com.intellij.reference.SoftReference;
import com.intellij.util.containers.ContainerUtil;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.annotations.TestOnly;
import java.lang.ref.Reference;
import java.lang.ref.ReferenceQueue;
import java.lang.ref.WeakReference;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import java.util.Set;
public class SmartPointerManagerImpl extends SmartPointerManager {
private static final Logger LOG = Logger.getInstance("#com.intellij.psi.impl.smartPointers.SmartPointerManagerImpl");
private final Project myProject;
private static final Object lock = new Object();
private static final ReferenceQueue<SmartPointerEx> ourQueue = new ReferenceQueue<SmartPointerEx>();
private final Key<Set<PointerReference>> POINTERS_KEY;
private final Key<Boolean> POINTERS_ARE_FASTENED_KEY;
public SmartPointerManagerImpl(Project project) {
myProject = project;
POINTERS_KEY = Key.create("SMART_POINTERS for "+project);
POINTERS_ARE_FASTENED_KEY = Key.create("SMART_POINTERS_ARE_FASTENED for "+project);
}
private static void processQueue() {
while (true) {
PointerReference reference = (PointerReference)ourQueue.poll();
if (reference == null) break;
synchronized (lock) {
Set<PointerReference> pointers = reference.file.getUserData(reference.key);
if (pointers != null) {
pointers.remove(reference);
if (pointers.isEmpty()) {
reference.file.putUserData(reference.key, null);
}
}
}
}
}
public void fastenBelts(@NotNull VirtualFile file, int offset, @Nullable RangeMarker[] cachedRangeMarkers) {
ApplicationManager.getApplication().assertIsDispatchThread();
processQueue();
synchronized (lock) {
List<SmartPointerEx> pointers = getStrongPointers(file);
if (pointers.isEmpty()) return;
if (getAndFasten(file)) return;
for (SmartPointerEx pointer : pointers) {
pointer.fastenBelt(offset, cachedRangeMarkers);
}
PsiFile psiFile = ((PsiManagerEx)PsiManager.getInstance(myProject)).getFileManager().getCachedPsiFile(file);
if (psiFile != null) {
PsiDocumentManager psiDocumentManager = PsiDocumentManager.getInstance(myProject);
for (DocumentWindow injectedDoc : InjectedLanguageManager.getInstance(myProject).getCachedInjectedDocuments(psiFile)) {
PsiFile injectedFile = psiDocumentManager.getPsiFile(injectedDoc);
if (injectedFile == null) continue;
RangeMarker[] cachedMarkers = getCachedRangeMarkerToInjectedFragment(injectedFile);
boolean relevant = false;
for (Segment hostSegment : injectedDoc.getHostRanges()) {
if (offset <= hostSegment.getEndOffset()) {
relevant = true;
break;
}
}
if (relevant) {
fastenBelts(injectedFile.getViewProvider().getVirtualFile(), 0, cachedMarkers);
}
}
}
}
}
@NotNull
private static RangeMarker[] getCachedRangeMarkerToInjectedFragment(@NotNull PsiFile injectedFile) {
MarkersHolderFileViewProvider provider = (MarkersHolderFileViewProvider)injectedFile.getViewProvider();
return provider.getCachedMarkers();
}
public void unfastenBelts(@NotNull VirtualFile file, int offset) {
ApplicationManager.getApplication().assertIsDispatchThread();
processQueue();
synchronized (lock) {
List<SmartPointerEx> pointers = getStrongPointers(file);
if (pointers.isEmpty()) return;
if (!getAndUnfasten(file)) return;
for (SmartPointerEx pointer : pointers) {
pointer.unfastenBelt(offset);
}
PsiFile psiFile = ((PsiManagerEx)PsiManager.getInstance(myProject)).getFileManager().getCachedPsiFile(file);
if (psiFile != null) {
PsiDocumentManager psiDocumentManager = PsiDocumentManager.getInstance(myProject);
for (DocumentWindow injectedDoc : InjectedLanguageManager.getInstance(myProject).getCachedInjectedDocuments(psiFile)) {
PsiFile injectedFile = psiDocumentManager.getPsiFile(injectedDoc);
if (injectedFile == null) continue;
unfastenBelts(injectedFile.getViewProvider().getVirtualFile(), 0);
}
}
}
}
private static final Key<Reference<SmartPointerEx>> CACHED_SMART_POINTER_KEY = Key.create("CACHED_SMART_POINTER_KEY");
@Override
@NotNull
public <E extends PsiElement> SmartPsiElementPointer<E> createSmartPsiElementPointer(@NotNull E element) {
ApplicationManager.getApplication().assertReadAccessAllowed();
PsiFile containingFile = element.getContainingFile();
return createSmartPsiElementPointer(element, containingFile);
}
@Override
@NotNull
public <E extends PsiElement> SmartPsiElementPointer<E> createSmartPsiElementPointer(@NotNull E element, PsiFile containingFile) {
if (containingFile != null && !containingFile.isValid() || containingFile == null && !element.isValid()) {
PsiUtilCore.ensureValid(element);
LOG.error("Invalid element:" + element);
}
processQueue();
SmartPointerEx<E> pointer = getCachedPointer(element);
if (pointer != null) {
containingFile = containingFile == null ? element.getContainingFile() : containingFile;
if (containingFile != null && areBeltsFastened(containingFile.getViewProvider().getVirtualFile())) {
pointer.fastenBelt(0, null);
}
}
else {
pointer = new SmartPsiElementPointerImpl<E>(myProject, element, containingFile);
if (containingFile != null) {
initPointer(pointer, containingFile.getViewProvider().getVirtualFile());
}
element.putUserData(CACHED_SMART_POINTER_KEY, new SoftReference<SmartPointerEx>(pointer));
}
if (pointer instanceof SmartPsiElementPointerImpl) {
synchronized (lock) {
((SmartPsiElementPointerImpl)pointer).incrementAndGetReferenceCount(1);
}
}
return pointer;
}
private static <E extends PsiElement> SmartPointerEx<E> getCachedPointer(@NotNull E element) {
Reference<SmartPointerEx> data = element.getUserData(CACHED_SMART_POINTER_KEY);
SmartPointerEx cachedPointer = SoftReference.dereference(data);
if (cachedPointer != null) {
PsiElement cachedElement = cachedPointer.getCachedElement();
if (cachedElement != null && cachedElement != element) {
return null;
}
}
//noinspection unchecked
return cachedPointer;
}
@Override
@NotNull
public SmartPsiFileRange createSmartPsiFileRangePointer(@NotNull PsiFile file, @NotNull TextRange range) {
if (!file.isValid()) {
LOG.error("Invalid element:" + file);
}
processQueue();
SmartPsiFileRangePointerImpl pointer = new SmartPsiFileRangePointerImpl(file, ProperTextRange.create(range));
initPointer(pointer, file.getViewProvider().getVirtualFile());
return pointer;
}
private <E extends PsiElement> void initPointer(@NotNull SmartPointerEx<E> pointer, @NotNull VirtualFile containingFile) {
synchronized (lock) {
Set<PointerReference> pointers = getPointers(containingFile);
if (pointers == null) {
pointers = ContainerUtil.newTroveSet(); // we synchronise access anyway
containingFile.putUserData(POINTERS_KEY, pointers);
}
pointers.add(new PointerReference(pointer, containingFile, ourQueue, POINTERS_KEY));
if (areBeltsFastened(containingFile)) {
pointer.fastenBelt(0, null);
}
}
}
@Override
public boolean removePointer(@NotNull SmartPsiElementPointer pointer) {
synchronized (lock) {
if (pointer instanceof SmartPsiElementPointerImpl) {
int refCount = ((SmartPsiElementPointerImpl)pointer).incrementAndGetReferenceCount(-1);
if (refCount == 0) {
PsiElement element = ((SmartPointerEx)pointer).getCachedElement();
if (element != null) {
element.putUserData(CACHED_SMART_POINTER_KEY, null);
}
PsiFile containingFile = pointer.getContainingFile();
if (containingFile == null) return false;
Set<PointerReference> pointers = getPointers(containingFile.getViewProvider().getVirtualFile());
if (pointers == null) return false;
SmartPointerElementInfo info = ((SmartPsiElementPointerImpl)pointer).getElementInfo();
info.cleanup();
for (Iterator<PointerReference> iterator = pointers.iterator(); iterator.hasNext(); ) {
if (pointer == iterator.next().get()) {
iterator.remove();
return true;
}
}
return false;
}
}
}
return false;
}
@Nullable
private Set<PointerReference> getPointers(@NotNull VirtualFile containingFile) {
return containingFile.getUserData(POINTERS_KEY);
}
@NotNull
private List<SmartPointerEx> getStrongPointers(@NotNull VirtualFile containingFile) {
Set<PointerReference> refs = getPointers(containingFile);
if (refs == null) return Collections.emptyList();
List<SmartPointerEx> result = ContainerUtil.newArrayList();
for (PointerReference reference : refs) {
ContainerUtil.addIfNotNull(result, reference.get());
}
return result;
}
@TestOnly
public int getPointersNumber(@NotNull PsiFile containingFile) {
synchronized (lock) {
return getStrongPointers(containingFile.getViewProvider().getVirtualFile()).size();
}
}
private boolean getAndFasten(@NotNull VirtualFile file) {
boolean fastened = areBeltsFastened(file);
file.putUserData(POINTERS_ARE_FASTENED_KEY, Boolean.TRUE);
return fastened;
}
private boolean getAndUnfasten(@NotNull VirtualFile file) {
boolean fastened = areBeltsFastened(file);
file.putUserData(POINTERS_ARE_FASTENED_KEY, null);
return fastened;
}
private boolean areBeltsFastened(VirtualFile file) {
return file.getUserData(POINTERS_ARE_FASTENED_KEY) == Boolean.TRUE;
}
@Override
public boolean pointToTheSameElement(@NotNull SmartPsiElementPointer pointer1, @NotNull SmartPsiElementPointer pointer2) {
return SmartPsiElementPointerImpl.pointsToTheSameElementAs(pointer1, pointer2);
}
private static class PointerReference extends WeakReference<SmartPointerEx> {
private final VirtualFile file;
private final Key<Set<PointerReference>> key;
public PointerReference(SmartPointerEx<?> pointer,
VirtualFile containingFile,
ReferenceQueue<SmartPointerEx> queue,
Key<Set<PointerReference>> key) {
super(pointer, queue);
file = containingFile;
this.key = key;
}
}
}
| sweep smart pointer infrastructure on low memory (IDEA-136341)
| platform/core-impl/src/com/intellij/psi/impl/smartPointers/SmartPointerManagerImpl.java | sweep smart pointer infrastructure on low memory (IDEA-136341) | <ide><path>latform/core-impl/src/com/intellij/psi/impl/smartPointers/SmartPointerManagerImpl.java
<ide> import com.intellij.openapi.diagnostic.Logger;
<ide> import com.intellij.openapi.editor.RangeMarker;
<ide> import com.intellij.openapi.project.Project;
<del>import com.intellij.openapi.util.Key;
<del>import com.intellij.openapi.util.ProperTextRange;
<del>import com.intellij.openapi.util.Segment;
<del>import com.intellij.openapi.util.TextRange;
<add>import com.intellij.openapi.util.*;
<ide> import com.intellij.openapi.vfs.VirtualFile;
<ide> import com.intellij.psi.*;
<ide> import com.intellij.psi.impl.PsiManagerEx;
<ide>
<ide> public class SmartPointerManagerImpl extends SmartPointerManager {
<ide> private static final Logger LOG = Logger.getInstance("#com.intellij.psi.impl.smartPointers.SmartPointerManagerImpl");
<del>
<del> private final Project myProject;
<ide> private static final Object lock = new Object();
<ide> private static final ReferenceQueue<SmartPointerEx> ourQueue = new ReferenceQueue<SmartPointerEx>();
<add> @SuppressWarnings("unused") private static final LowMemoryWatcher ourWatcher = LowMemoryWatcher.register(new Runnable() {
<add> @Override
<add> public void run() {
<add> processQueue();
<add> }
<add> });
<add>
<add> private final Project myProject;
<ide> private final Key<Set<PointerReference>> POINTERS_KEY;
<ide> private final Key<Boolean> POINTERS_ARE_FASTENED_KEY;
<ide> |
|
JavaScript | mit | 257f098ed08afc7433dc4b62f71e4860e1d28581 | 0 | antigremlin/ember.js,selvagsz/ember.js,femi-saliu/ember.js,tiegz/ember.js,benstoltz/ember.js,cjc343/ember.js,wecc/ember.js,tsing80/ember.js,gfvcastro/ember.js,xtian/ember.js,cibernox/ember.js,njagadeesh/ember.js,topaxi/ember.js,ianstarz/ember.js,kublaj/ember.js,tricknotes/ember.js,givanse/ember.js,topaxi/ember.js,xiujunma/ember.js,tomdale/ember.js,jamesarosen/ember.js,davidpett/ember.js,cdl/ember.js,lsthornt/ember.js,cjc343/ember.js,eliotsykes/ember.js,bantic/ember.js,max-konin/ember.js,GavinJoyce/ember.js,fxkr/ember.js,schreiaj/ember.js,balinterdi/ember.js,jonathanKingston/ember.js,KevinTCoughlin/ember.js,rwjblue/ember.js,nightire/ember.js,anilmaurya/ember.js,dgeb/ember.js,MatrixZ/ember.js,rot26/ember.js,ianstarz/ember.js,olivierchatry/ember.js,furkanayhan/ember.js,max-konin/ember.js,balinterdi/ember.js,koriroys/ember.js,aihua/ember.js,alexdiliberto/ember.js,jaswilli/ember.js,wagenet/ember.js,xcskier56/ember.js,wycats/ember.js,xiujunma/ember.js,mixonic/ember.js,adamesque/ember.js,williamsbdev/ember.js,toddjordan/ember.js,Patsy-issa/ember.js,zenefits/ember.js,lsthornt/ember.js,JesseQin/ember.js,loadimpact/ember.js,vikram7/ember.js,jherdman/ember.js,martndemus/ember.js,mitchlloyd/ember.js,mrjavascript/ember.js,vitch/ember.js,TriumphantAkash/ember.js,williamsbdev/ember.js,mixonic/ember.js,danielgynn/ember.js,cgvarela/ember.js,Kuzirashi/ember.js,pixelhandler/ember.js,lan0/ember.js,twokul/ember.js,kanongil/ember.js,karthiick/ember.js,Leooo/ember.js,Gaurav0/ember.js,chadhietala/ember.js,nightire/ember.js,antigremlin/ember.js,ryanlabouve/ember.js,jamesarosen/ember.js,stefanpenner/ember.js,EricSchank/ember.js,xtian/ember.js,SaladFork/ember.js,intercom/ember.js,pixelhandler/ember.js,trentmwillis/ember.js,workmanw/ember.js,trentmwillis/ember.js,jmurphyau/ember.js,practicefusion/ember.js,stefanpenner/ember.js,runspired/ember.js,howmuchcomputer/ember.js,swarmbox/ember.js,ming-codes/ember.js,workmanw/ember.js,Zagorakiss/ember.js,Kuzirashi/ember.js,bmac/ember.js,cjc343/ember.js,JesseQin/ember.js,develoser/ember.js,olivierchatry/ember.js,zenefits/ember.js,intercom/ember.js,lan0/ember.js,asakusuma/ember.js,benstoltz/ember.js,kwight/ember.js,SaladFork/ember.js,practicefusion/ember.js,quaertym/ember.js,NLincoln/ember.js,antigremlin/ember.js,alexdiliberto/ember.js,tofanelli/ember.js,Gaurav0/ember.js,Leooo/ember.js,raycohen/ember.js,marcioj/ember.js,loadimpact/ember.js,adatapost/ember.js,jasonmit/ember.js,rlugojr/ember.js,Trendy/ember.js,cesarizu/ember.js,adatapost/ember.js,karthiick/ember.js,marijaselakovic/ember.js,mfeckie/ember.js,jplwood/ember.js,cbou/ember.js,amk221/ember.js,aihua/ember.js,tianxiangbing/ember.js,rubenrp81/ember.js,greyhwndz/ember.js,artfuldodger/ember.js,lan0/ember.js,soulcutter/ember.js,wagenet/ember.js,TriumphantAkash/ember.js,chadhietala/mixonic-ember,kublaj/ember.js,jerel/ember.js,raytiley/ember.js,mitchlloyd/ember.js,kennethdavidbuck/ember.js,mrjavascript/ember.js,fivetanley/ember.js,pixelhandler/ember.js,ubuntuvim/ember.js,anilmaurya/ember.js,pangratz/ember.js,rfsv/ember.js,Zagorakiss/ember.js,miguelcobain/ember.js,workmanw/ember.js,jackiewung/ember.js,TriumphantAkash/ember.js,jbrown/ember.js,raytiley/ember.js,runspired/ember.js,jonathanKingston/ember.js,jaswilli/ember.js,bantic/ember.js,EricSchank/ember.js,Zagorakiss/ember.js,ridixcr/ember.js,Eric-Guo/ember.js,mdehoog/ember.js,emberjs/ember.js,patricksrobertson/ember.js,lsthornt/ember.js,mallikarjunayaddala/ember.js,jasonmit/ember.js,quaertym/ember.js,karthiick/ember.js,seanjohnson08/ember.js,chadhietala/mixonic-ember,KevinTCoughlin/ember.js,8thcolor/ember.js,8thcolor/ember.js,tiegz/ember.js,mdehoog/ember.js,gnarf/ember.js,visualjeff/ember.js,mdehoog/ember.js,Serabe/ember.js,yonjah/ember.js,mmpestorich/ember.js,green-arrow/ember.js,omurbilgili/ember.js,cdl/ember.js,XrXr/ember.js,martndemus/ember.js,adatapost/ember.js,anilmaurya/ember.js,ubuntuvim/ember.js,alexdiliberto/ember.js,mallikarjunayaddala/ember.js,Trendy/ember.js,qaiken/ember.js,opichals/ember.js,delftswa2016/ember.js,simudream/ember.js,knownasilya/ember.js,kublaj/ember.js,seanpdoyle/ember.js,Robdel12/ember.js,pangratz/ember.js,claimsmall/ember.js,MatrixZ/ember.js,jbrown/ember.js,Serabe/ember.js,chadhietala/mixonic-ember,nathanhammond/ember.js,williamsbdev/ember.js,kiwiupover/ember.js,kaeufl/ember.js,cibernox/ember.js,ThiagoGarciaAlves/ember.js,develoser/ember.js,fouzelddin/ember.js,Krasnyanskiy/ember.js,yonjah/ember.js,cgvarela/ember.js,nvoron23/ember.js,omurbilgili/ember.js,antigremlin/ember.js,runspired/ember.js,tianxiangbing/ember.js,VictorChaun/ember.js,Robdel12/ember.js,kigsmtua/ember.js,claimsmall/ember.js,MatrixZ/ember.js,ryanlabouve/ember.js,nathanhammond/ember.js,lazybensch/ember.js,xcambar/ember.js,kmiyashiro/ember.js,pixelhandler/ember.js,jayphelps/ember.js,udhayam/ember.js,kellyselden/ember.js,mrjavascript/ember.js,bmac/ember.js,HipsterBrown/ember.js,Vassi/ember.js,ThiagoGarciaAlves/ember.js,chadhietala/ember.js,jcope2013/ember.js,trentmwillis/ember.js,jmurphyau/ember.js,twokul/ember.js,mrjavascript/ember.js,fouzelddin/ember.js,boztek/ember.js,jcope2013/ember.js,tsing80/ember.js,sly7-7/ember.js,okuryu/ember.js,tofanelli/ember.js,patricksrobertson/ember.js,howtolearntocode/ember.js,brzpegasus/ember.js,szines/ember.js,ef4/ember.js,cowboyd/ember.js,tiegz/ember.js,Eric-Guo/ember.js,abulrim/ember.js,elwayman02/ember.js,abulrim/ember.js,tildeio/ember.js,Serabe/ember.js,szines/ember.js,MatrixZ/ember.js,cyberkoi/ember.js,martndemus/ember.js,soulcutter/ember.js,xcskier56/ember.js,JesseQin/ember.js,cyjia/ember.js,kmiyashiro/ember.js,anilmaurya/ember.js,cbou/ember.js,kwight/ember.js,g13013/ember.js,JacobNinja/es6,thejameskyle/ember.js,davidpett/ember.js,Patsy-issa/ember.js,aihua/ember.js,mike-north/ember.js,danielgynn/ember.js,8thcolor/ember.js,schreiaj/ember.js,Leooo/ember.js,delftswa2016/ember.js,seanpdoyle/ember.js,kigsmtua/ember.js,olivierchatry/ember.js,Zagorakiss/ember.js,jmurphyau/ember.js,GavinJoyce/ember.js,nicklv/ember.js,acburdine/ember.js,fpauser/ember.js,paddyobrien/ember.js,cowboyd/ember.js,nruth/ember.js,EricSchank/ember.js,BrianSipple/ember.js,kiwiupover/ember.js,acburdine/ember.js,simudream/ember.js,udhayam/ember.js,szines/ember.js,mfeckie/ember.js,swarmbox/ember.js,sly7-7/ember.js,johnnyshields/ember.js,kidaa/ember.js,yaymukund/ember.js,howtolearntocode/ember.js,ming-codes/ember.js,duggiefresh/ember.js,ef4/ember.js,raycohen/ember.js,nipunas/ember.js,opichals/ember.js,rubenrp81/ember.js,claimsmall/ember.js,mmpestorich/ember.js,trek/ember.js,raytiley/ember.js,amk221/ember.js,JKGisMe/ember.js,zenefits/ember.js,kellyselden/ember.js,vitch/ember.js,cibernox/ember.js,jaswilli/ember.js,jasonmit/ember.js,benstoltz/ember.js,acburdine/ember.js,nvoron23/ember.js,miguelcobain/ember.js,marijaselakovic/ember.js,cyberkoi/ember.js,rubenrp81/ember.js,twokul/ember.js,sivakumar-kailasam/ember.js,bekzod/ember.js,opichals/ember.js,jasonmit/ember.js,jamesarosen/ember.js,trek/ember.js,jish/ember.js,thoov/ember.js,lazybensch/ember.js,omurbilgili/ember.js,sandstrom/ember.js,stefanpenner/ember.js,delftswa2016/ember.js,yuhualingfeng/ember.js,schreiaj/ember.js,tricknotes/ember.js,givanse/ember.js,nruth/ember.js,KevinTCoughlin/ember.js,gdi2290/ember.js,mfeckie/ember.js,Robdel12/ember.js,cyberkoi/ember.js,trek/ember.js,dgeb/ember.js,eliotsykes/ember.js,johanneswuerbach/ember.js,selvagsz/ember.js,blimmer/ember.js,yaymukund/ember.js,furkanayhan/ember.js,green-arrow/ember.js,schreiaj/ember.js,quaertym/ember.js,JKGisMe/ember.js,fivetanley/ember.js,howmuchcomputer/ember.js,lazybensch/ember.js,faizaanshamsi/ember.js,HipsterBrown/ember.js,patricksrobertson/ember.js,mmpestorich/ember.js,gdi2290/ember.js,benstoltz/ember.js,greyhwndz/ember.js,njagadeesh/ember.js,dgeb/ember.js,knownasilya/ember.js,joeruello/ember.js,rwjblue/ember.js,workmanw/ember.js,sly7-7/ember.js,topaxi/ember.js,mixonic/ember.js,udhayam/ember.js,vikram7/ember.js,ming-codes/ember.js,johanneswuerbach/ember.js,NLincoln/ember.js,HeroicEric/ember.js,nickiaconis/ember.js,XrXr/ember.js,kidaa/ember.js,yonjah/ember.js,jonathanKingston/ember.js,sharma1nitish/ember.js,BrianSipple/ember.js,Robdel12/ember.js,JacobNinja/es6,jish/ember.js,jcope2013/ember.js,tomdale/ember.js,jackiewung/ember.js,code0100fun/ember.js,Trendy/ember.js,Eric-Guo/ember.js,femi-saliu/ember.js,elwayman02/ember.js,danielgynn/ember.js,jish/ember.js,loadimpact/ember.js,fpauser/ember.js,rondale-sc/ember.js,jackiewung/ember.js,koriroys/ember.js,claimsmall/ember.js,mike-north/ember.js,Krasnyanskiy/ember.js,BrianSipple/ember.js,trek/ember.js,karthiick/ember.js,eliotsykes/ember.js,xcambar/ember.js,jayphelps/ember.js,howtolearntocode/ember.js,rwjblue/ember.js,cowboyd/ember.js,tofanelli/ember.js,Krasnyanskiy/ember.js,jherdman/ember.js,csantero/ember.js,nightire/ember.js,jasonmit/ember.js,max-konin/ember.js,knownasilya/ember.js,max-konin/ember.js,develoser/ember.js,furkanayhan/ember.js,cgvarela/ember.js,Turbo87/ember.js,csantero/ember.js,jcope2013/ember.js,lazybensch/ember.js,elwayman02/ember.js,HeroicEric/ember.js,Turbo87/ember.js,rot26/ember.js,nightire/ember.js,Leooo/ember.js,BrianSipple/ember.js,rfsv/ember.js,latlontude/ember.js,Patsy-issa/ember.js,tianxiangbing/ember.js,rot26/ember.js,kennethdavidbuck/ember.js,marijaselakovic/ember.js,intercom/ember.js,yuhualingfeng/ember.js,XrXr/ember.js,rfsv/ember.js,rodrigo-morais/ember.js,asakusuma/ember.js,ryanlabouve/ember.js,Krasnyanskiy/ember.js,danielgynn/ember.js,cyjia/ember.js,rlugojr/ember.js,wecc/ember.js,kidaa/ember.js,cgvarela/ember.js,HipsterBrown/ember.js,nvoron23/ember.js,skeate/ember.js,rondale-sc/ember.js,TriumphantAkash/ember.js,kigsmtua/ember.js,jerel/ember.js,seanpdoyle/ember.js,tofanelli/ember.js,brzpegasus/ember.js,ianstarz/ember.js,tsing80/ember.js,xtian/ember.js,paddyobrien/ember.js,artfuldodger/ember.js,kidaa/ember.js,loadimpact/ember.js,jackiewung/ember.js,csantero/ember.js,code0100fun/ember.js,xcambar/ember.js,yuhualingfeng/ember.js,rot26/ember.js,lsthornt/ember.js,adatapost/ember.js,kmiyashiro/ember.js,adamesque/ember.js,cesarizu/ember.js,fxkr/ember.js,KevinTCoughlin/ember.js,Turbo87/ember.js,alexdiliberto/ember.js,Kuzirashi/ember.js,seanjohnson08/ember.js,givanse/ember.js,mitchlloyd/ember.js,visualjeff/ember.js,dschmidt/ember.js,nicklv/ember.js,zenefits/ember.js,jherdman/ember.js,qaiken/ember.js,kaeufl/ember.js,mfeckie/ember.js,selvagsz/ember.js,amk221/ember.js,ianstarz/ember.js,mike-north/ember.js,HeroicEric/ember.js,seanpdoyle/ember.js,rodrigo-morais/ember.js,bmac/ember.js,Gaurav0/ember.js,VictorChaun/ember.js,faizaanshamsi/ember.js,toddjordan/ember.js,joeruello/ember.js,jplwood/ember.js,balinterdi/ember.js,thoov/ember.js,johnnyshields/ember.js,nathanhammond/ember.js,okuryu/ember.js,rondale-sc/ember.js,8thcolor/ember.js,nickiaconis/ember.js,Vassi/ember.js,JKGisMe/ember.js,wycats/ember.js,howmuchcomputer/ember.js,jonathanKingston/ember.js,asakusuma/ember.js,dschmidt/ember.js,JKGisMe/ember.js,simudream/ember.js,pangratz/ember.js,marcioj/ember.js,sivakumar-kailasam/ember.js,kanongil/ember.js,intercom/ember.js,latlontude/ember.js,dschmidt/ember.js,fpauser/ember.js,sivakumar-kailasam/ember.js,kennethdavidbuck/ember.js,cyjia/ember.js,HeroicEric/ember.js,fxkr/ember.js,visualjeff/ember.js,JesseQin/ember.js,jayphelps/ember.js,develoser/ember.js,NLincoln/ember.js,gfvcastro/ember.js,ridixcr/ember.js,mallikarjunayaddala/ember.js,trentmwillis/ember.js,practicefusion/ember.js,kwight/ember.js,VictorChaun/ember.js,yonjah/ember.js,jayphelps/ember.js,jish/ember.js,blimmer/ember.js,cesarizu/ember.js,kellyselden/ember.js,davidpett/ember.js,williamsbdev/ember.js,delftswa2016/ember.js,green-arrow/ember.js,gnarf/ember.js,rlugojr/ember.js,duggiefresh/ember.js,nathanhammond/ember.js,koriroys/ember.js,code0100fun/ember.js,vikram7/ember.js,skeate/ember.js,miguelcobain/ember.js,vikram7/ember.js,visualjeff/ember.js,faizaanshamsi/ember.js,nickiaconis/ember.js,kmiyashiro/ember.js,rodrigo-morais/ember.js,skeate/ember.js,duggiefresh/ember.js,swarmbox/ember.js,rubenrp81/ember.js,johanneswuerbach/ember.js,toddjordan/ember.js,GavinJoyce/ember.js,mike-north/ember.js,g13013/ember.js,kanongil/ember.js,kellyselden/ember.js,gfvcastro/ember.js,paddyobrien/ember.js,miguelcobain/ember.js,Eric-Guo/ember.js,marijaselakovic/ember.js,davidpett/ember.js,xcskier56/ember.js,quaertym/ember.js,duggiefresh/ember.js,ThiagoGarciaAlves/ember.js,mdehoog/ember.js,kennethdavidbuck/ember.js,tildeio/ember.js,sharma1nitish/ember.js,nickiaconis/ember.js,bekzod/ember.js,joeruello/ember.js,ubuntuvim/ember.js,tiegz/ember.js,kwight/ember.js,jerel/ember.js,thoov/ember.js,NLincoln/ember.js,thejameskyle/ember.js,rfsv/ember.js,femi-saliu/ember.js,amk221/ember.js,swarmbox/ember.js,jplwood/ember.js,tricknotes/ember.js,ubuntuvim/ember.js,jherdman/ember.js,Kuzirashi/ember.js,cowboyd/ember.js,chadhietala/ember.js,njagadeesh/ember.js,adamesque/ember.js,kigsmtua/ember.js,blimmer/ember.js,yaymukund/ember.js,elwayman02/ember.js,olivierchatry/ember.js,femi-saliu/ember.js,sharma1nitish/ember.js,raytiley/ember.js,VictorChaun/ember.js,martndemus/ember.js,asakusuma/ember.js,cbou/ember.js,johanneswuerbach/ember.js,brzpegasus/ember.js,joeruello/ember.js,johnnyshields/ember.js,artfuldodger/ember.js,rwjblue/ember.js,xcambar/ember.js,raycohen/ember.js,tsing80/ember.js,thejameskyle/ember.js,mitchlloyd/ember.js,bantic/ember.js,skeate/ember.js,gfvcastro/ember.js,ef4/ember.js,opichals/ember.js,qaiken/ember.js,yuhualingfeng/ember.js,greyhwndz/ember.js,chadhietala/ember.js,cyjia/ember.js,wecc/ember.js,simudream/ember.js,kanongil/ember.js,emberjs/ember.js,jaswilli/ember.js,boztek/ember.js,howmuchcomputer/ember.js,Gaurav0/ember.js,abulrim/ember.js,nicklv/ember.js,fouzelddin/ember.js,aihua/ember.js,xiujunma/ember.js,bmac/ember.js,acburdine/ember.js,kaeufl/ember.js,nipunas/ember.js,mallikarjunayaddala/ember.js,omurbilgili/ember.js,greyhwndz/ember.js,Serabe/ember.js,boztek/ember.js,EricSchank/ember.js,kublaj/ember.js,practicefusion/ember.js,bekzod/ember.js,gdi2290/ember.js,xiujunma/ember.js,marcioj/ember.js,szines/ember.js,seanjohnson08/ember.js,wycats/ember.js,kaeufl/ember.js,emberjs/ember.js,jbrown/ember.js,tricknotes/ember.js,cbou/ember.js,Vassi/ember.js,sivakumar-kailasam/ember.js,ridixcr/ember.js,jamesarosen/ember.js,HipsterBrown/ember.js,xcskier56/ember.js,wagenet/ember.js,nipunas/ember.js,ThiagoGarciaAlves/ember.js,sandstrom/ember.js,wycats/ember.js,njagadeesh/ember.js,JacobNinja/es6,cesarizu/ember.js,Patsy-issa/ember.js,sharma1nitish/ember.js,abulrim/ember.js,cjc343/ember.js,nicklv/ember.js,faizaanshamsi/ember.js,dgeb/ember.js,ryanlabouve/ember.js,udhayam/ember.js,jplwood/ember.js,lan0/ember.js,boztek/ember.js,Vassi/ember.js,topaxi/ember.js,artfuldodger/ember.js,jerel/ember.js,jmurphyau/ember.js,brzpegasus/ember.js,runspired/ember.js,yaymukund/ember.js,SaladFork/ember.js,ef4/ember.js,tianxiangbing/ember.js,twokul/ember.js,nvoron23/ember.js,nipunas/ember.js,cdl/ember.js,wecc/ember.js,seanjohnson08/ember.js,selvagsz/ember.js,code0100fun/ember.js,kiwiupover/ember.js,toddjordan/ember.js,cibernox/ember.js,GavinJoyce/ember.js,nruth/ember.js,nruth/ember.js,bekzod/ember.js,fxkr/ember.js,tomdale/ember.js,koriroys/ember.js,furkanayhan/ember.js,Turbo87/ember.js,latlontude/ember.js,cdl/ember.js,g13013/ember.js,thejameskyle/ember.js,vitch/ember.js,green-arrow/ember.js,okuryu/ember.js,thoov/ember.js,marcioj/ember.js,gnarf/ember.js,rodrigo-morais/ember.js,blimmer/ember.js,ridixcr/ember.js,eliotsykes/ember.js,xtian/ember.js,howtolearntocode/ember.js,patricksrobertson/ember.js,sandstrom/ember.js,fivetanley/ember.js,XrXr/ember.js,Trendy/ember.js,fouzelddin/ember.js,fpauser/ember.js,sivakumar-kailasam/ember.js,givanse/ember.js,SaladFork/ember.js,soulcutter/ember.js,pangratz/ember.js,qaiken/ember.js,johnnyshields/ember.js,bantic/ember.js,cyberkoi/ember.js,soulcutter/ember.js,rlugojr/ember.js,csantero/ember.js,tildeio/ember.js | import Ember from "ember-metal/core";
import emberRun from "ember-metal/run_loop";
import {create} from "ember-metal/platform";
import compare from "ember-runtime/compare";
import setupForTesting from "ember-testing/setup_for_testing";
/**
@module ember
@submodule ember-testing
*/
var slice = [].slice,
helpers = {},
injectHelpersCallbacks = [];
/**
This is a container for an assortment of testing related functionality:
* Choose your default test adapter (for your framework of choice).
* Register/Unregister additional test helpers.
* Setup callbacks to be fired when the test helpers are injected into
your application.
@class Test
@namespace Ember
*/
var Test = {
/**
`registerHelper` is used to register a test helper that will be injected
when `App.injectTestHelpers` is called.
The helper method will always be called with the current Application as
the first parameter.
For example:
```javascript
Ember.Test.registerHelper('boot', function(app) {
Ember.run(app, app.advanceReadiness);
});
```
This helper can later be called without arguments because it will be
called with `app` as the first parameter.
```javascript
App = Ember.Application.create();
App.injectTestHelpers();
boot();
```
@public
@method registerHelper
@param {String} name The name of the helper method to add.
@param {Function} helperMethod
@param options {Object}
*/
registerHelper: function(name, helperMethod) {
helpers[name] = {
method: helperMethod,
meta: { wait: false }
};
},
/**
`registerAsyncHelper` is used to register an async test helper that will be injected
when `App.injectTestHelpers` is called.
The helper method will always be called with the current Application as
the first parameter.
For example:
```javascript
Ember.Test.registerAsyncHelper('boot', function(app) {
Ember.run(app, app.advanceReadiness);
});
```
The advantage of an async helper is that it will not run
until the last async helper has completed. All async helpers
after it will wait for it complete before running.
For example:
```javascript
Ember.Test.registerAsyncHelper('deletePost', function(app, postId) {
click('.delete-' + postId);
});
// ... in your test
visit('/post/2');
deletePost(2);
visit('/post/3');
deletePost(3);
```
@public
@method registerAsyncHelper
@param {String} name The name of the helper method to add.
@param {Function} helperMethod
*/
registerAsyncHelper: function(name, helperMethod) {
helpers[name] = {
method: helperMethod,
meta: { wait: true }
};
},
/**
Remove a previously added helper method.
Example:
```javascript
Ember.Test.unregisterHelper('wait');
```
@public
@method unregisterHelper
@param {String} name The helper to remove.
*/
unregisterHelper: function(name) {
delete helpers[name];
delete Test.Promise.prototype[name];
},
/**
Used to register callbacks to be fired whenever `App.injectTestHelpers`
is called.
The callback will receive the current application as an argument.
Example:
```javascript
Ember.Test.onInjectHelpers(function() {
Ember.$(document).ajaxSend(function() {
Test.pendingAjaxRequests++;
});
Ember.$(document).ajaxComplete(function() {
Test.pendingAjaxRequests--;
});
});
```
@public
@method onInjectHelpers
@param {Function} callback The function to be called.
*/
onInjectHelpers: function(callback) {
injectHelpersCallbacks.push(callback);
},
/**
This returns a thenable tailored for testing. It catches failed
`onSuccess` callbacks and invokes the `Ember.Test.adapter.exception`
callback in the last chained then.
This method should be returned by async helpers such as `wait`.
@public
@method promise
@param {Function} resolver The function used to resolve the promise.
*/
promise: function(resolver) {
return new Test.Promise(resolver);
},
/**
Used to allow ember-testing to communicate with a specific testing
framework.
You can manually set it before calling `App.setupForTesting()`.
Example:
```javascript
Ember.Test.adapter = MyCustomAdapter.create()
```
If you do not set it, ember-testing will default to `Ember.Test.QUnitAdapter`.
@public
@property adapter
@type {Class} The adapter to be used.
@default Ember.Test.QUnitAdapter
*/
adapter: null,
/**
Replacement for `Ember.RSVP.resolve`
The only difference is this uses
and instance of `Ember.Test.Promise`
@public
@method resolve
@param {Mixed} The value to resolve
*/
resolve: function(val) {
return Test.promise(function(resolve) {
return resolve(val);
});
},
/**
This allows ember-testing to play nicely with other asynchronous
events, such as an application that is waiting for a CSS3
transition or an IndexDB transaction.
For example:
```javascript
Ember.Test.registerWaiter(function() {
return myPendingTransactions() == 0;
});
```
The `context` argument allows you to optionally specify the `this`
with which your callback will be invoked.
For example:
```javascript
Ember.Test.registerWaiter(MyDB, MyDB.hasPendingTransactions);
```
@public
@method registerWaiter
@param {Object} context (optional)
@param {Function} callback
*/
registerWaiter: function(context, callback) {
if (arguments.length === 1) {
callback = context;
context = null;
}
if (!this.waiters) {
this.waiters = Ember.A();
}
this.waiters.push([context, callback]);
},
/**
`unregisterWaiter` is used to unregister a callback that was
registered with `registerWaiter`.
@public
@method unregisterWaiter
@param {Object} context (optional)
@param {Function} callback
*/
unregisterWaiter: function(context, callback) {
var pair;
if (!this.waiters) { return; }
if (arguments.length === 1) {
callback = context;
context = null;
}
pair = [context, callback];
this.waiters = Ember.A(this.waiters.filter(function(elt) {
return compare(elt, pair)!==0;
}));
}
};
function helper(app, name) {
var fn = helpers[name].method,
meta = helpers[name].meta;
return function() {
var args = slice.call(arguments),
lastPromise = Test.lastPromise;
args.unshift(app);
// some helpers are not async and
// need to return a value immediately.
// example: `find`
if (!meta.wait) {
return fn.apply(app, args);
}
if (!lastPromise) {
// It's the first async helper in current context
lastPromise = fn.apply(app, args);
} else {
// wait for last helper's promise to resolve
// and then execute
run(function() {
lastPromise = Test.resolve(lastPromise).then(function() {
return fn.apply(app, args);
});
});
}
return lastPromise;
};
}
function run(fn) {
if (!emberRun.currentRunLoop) {
emberRun(fn);
} else {
fn();
}
}
Ember.Application.reopen({
/**
This property contains the testing helpers for the current application. These
are created once you call `injectTestHelpers` on your `Ember.Application`
instance. The included helpers are also available on the `window` object by
default, but can be used from this object on the individual application also.
@property testHelpers
@type {Object}
@default {}
*/
testHelpers: {},
/**
This property will contain the original methods that were registered
on the `helperContainer` before `injectTestHelpers` is called.
When `removeTestHelpers` is called, these methods are restored to the
`helperContainer`.
@property originalMethods
@type {Object}
@default {}
@private
*/
originalMethods: {},
/**
This property indicates whether or not this application is currently in
testing mode. This is set when `setupForTesting` is called on the current
application.
@property testing
@type {Boolean}
@default false
*/
testing: false,
/**
This hook defers the readiness of the application, so that you can start
the app when your tests are ready to run. It also sets the router's
location to 'none', so that the window's location will not be modified
(preventing both accidental leaking of state between tests and interference
with your testing framework).
Example:
```
App.setupForTesting();
```
@method setupForTesting
*/
setupForTesting: function() {
setupForTesting();
this.testing = true;
this.Router.reopen({
location: 'none'
});
},
/**
This will be used as the container to inject the test helpers into. By
default the helpers are injected into `window`.
@property helperContainer
@type {Object} The object to be used for test helpers.
@default window
*/
helperContainer: window,
/**
This injects the test helpers into the `helperContainer` object. If an object is provided
it will be used as the helperContainer. If `helperContainer` is not set it will default
to `window`. If a function of the same name has already been defined it will be cached
(so that it can be reset if the helper is removed with `unregisterHelper` or
`removeTestHelpers`).
Any callbacks registered with `onInjectHelpers` will be called once the
helpers have been injected.
Example:
```
App.injectTestHelpers();
```
@method injectTestHelpers
*/
injectTestHelpers: function(helperContainer) {
if (helperContainer) { this.helperContainer = helperContainer; }
this.testHelpers = {};
for (var name in helpers) {
this.originalMethods[name] = this.helperContainer[name];
this.testHelpers[name] = this.helperContainer[name] = helper(this, name);
protoWrap(Test.Promise.prototype, name, helper(this, name), helpers[name].meta.wait);
}
for(var i = 0, l = injectHelpersCallbacks.length; i < l; i++) {
injectHelpersCallbacks[i](this);
}
},
/**
This removes all helpers that have been registered, and resets and functions
that were overridden by the helpers.
Example:
```javascript
App.removeTestHelpers();
```
@public
@method removeTestHelpers
*/
removeTestHelpers: function() {
for (var name in helpers) {
this.helperContainer[name] = this.originalMethods[name];
delete this.testHelpers[name];
delete this.originalMethods[name];
}
}
});
// This method is no longer needed
// But still here for backwards compatibility
// of helper chaining
function protoWrap(proto, name, callback, isAsync) {
proto[name] = function() {
var args = arguments;
if (isAsync) {
return callback.apply(this, args);
} else {
return this.then(function() {
return callback.apply(this, args);
});
}
};
}
Test.Promise = function() {
Ember.RSVP.Promise.apply(this, arguments);
Test.lastPromise = this;
};
Test.Promise.prototype = create(Ember.RSVP.Promise.prototype);
Test.Promise.prototype.constructor = Test.Promise;
// Patch `then` to isolate async methods
// specifically `Ember.Test.lastPromise`
var originalThen = Ember.RSVP.Promise.prototype.then;
Test.Promise.prototype.then = function(onSuccess, onFailure) {
return originalThen.call(this, function(val) {
return isolate(onSuccess, val);
}, onFailure);
};
// This method isolates nested async methods
// so that they don't conflict with other last promises.
//
// 1. Set `Ember.Test.lastPromise` to null
// 2. Invoke method
// 3. Return the last promise created during method
// 4. Restore `Ember.Test.lastPromise` to original value
function isolate(fn, val) {
var value, lastPromise;
// Reset lastPromise for nested helpers
Test.lastPromise = null;
value = fn(val);
lastPromise = Test.lastPromise;
// If the method returned a promise
// return that promise. If not,
// return the last async helper's promise
if ((value && (value instanceof Test.Promise)) || !lastPromise) {
return value;
} else {
run(function() {
lastPromise = Test.resolve(lastPromise).then(function() {
return value;
});
});
return lastPromise;
}
}
export default Test;
| packages_es6/ember-testing/lib/test.js | import Ember from "ember-metal/core";
import run from "ember-metal/run_loop";
import {create} from "ember-metal/platform";
import compare from "ember-runtime/compare";
import setupForTesting from "ember-testing/setup_for_testing";
/**
@module ember
@submodule ember-testing
*/
var slice = [].slice,
helpers = {},
injectHelpersCallbacks = [];
/**
This is a container for an assortment of testing related functionality:
* Choose your default test adapter (for your framework of choice).
* Register/Unregister additional test helpers.
* Setup callbacks to be fired when the test helpers are injected into
your application.
@class Test
@namespace Ember
*/
var Test = {
/**
`registerHelper` is used to register a test helper that will be injected
when `App.injectTestHelpers` is called.
The helper method will always be called with the current Application as
the first parameter.
For example:
```javascript
Ember.Test.registerHelper('boot', function(app) {
Ember.run(app, app.advanceReadiness);
});
```
This helper can later be called without arguments because it will be
called with `app` as the first parameter.
```javascript
App = Ember.Application.create();
App.injectTestHelpers();
boot();
```
@public
@method registerHelper
@param {String} name The name of the helper method to add.
@param {Function} helperMethod
@param options {Object}
*/
registerHelper: function(name, helperMethod) {
helpers[name] = {
method: helperMethod,
meta: { wait: false }
};
},
/**
`registerAsyncHelper` is used to register an async test helper that will be injected
when `App.injectTestHelpers` is called.
The helper method will always be called with the current Application as
the first parameter.
For example:
```javascript
Ember.Test.registerAsyncHelper('boot', function(app) {
Ember.run(app, app.advanceReadiness);
});
```
The advantage of an async helper is that it will not run
until the last async helper has completed. All async helpers
after it will wait for it complete before running.
For example:
```javascript
Ember.Test.registerAsyncHelper('deletePost', function(app, postId) {
click('.delete-' + postId);
});
// ... in your test
visit('/post/2');
deletePost(2);
visit('/post/3');
deletePost(3);
```
@public
@method registerAsyncHelper
@param {String} name The name of the helper method to add.
@param {Function} helperMethod
*/
registerAsyncHelper: function(name, helperMethod) {
helpers[name] = {
method: helperMethod,
meta: { wait: true }
};
},
/**
Remove a previously added helper method.
Example:
```javascript
Ember.Test.unregisterHelper('wait');
```
@public
@method unregisterHelper
@param {String} name The helper to remove.
*/
unregisterHelper: function(name) {
delete helpers[name];
delete Test.Promise.prototype[name];
},
/**
Used to register callbacks to be fired whenever `App.injectTestHelpers`
is called.
The callback will receive the current application as an argument.
Example:
```javascript
Ember.Test.onInjectHelpers(function() {
Ember.$(document).ajaxSend(function() {
Test.pendingAjaxRequests++;
});
Ember.$(document).ajaxComplete(function() {
Test.pendingAjaxRequests--;
});
});
```
@public
@method onInjectHelpers
@param {Function} callback The function to be called.
*/
onInjectHelpers: function(callback) {
injectHelpersCallbacks.push(callback);
},
/**
This returns a thenable tailored for testing. It catches failed
`onSuccess` callbacks and invokes the `Ember.Test.adapter.exception`
callback in the last chained then.
This method should be returned by async helpers such as `wait`.
@public
@method promise
@param {Function} resolver The function used to resolve the promise.
*/
promise: function(resolver) {
return new Test.Promise(resolver);
},
/**
Used to allow ember-testing to communicate with a specific testing
framework.
You can manually set it before calling `App.setupForTesting()`.
Example:
```javascript
Ember.Test.adapter = MyCustomAdapter.create()
```
If you do not set it, ember-testing will default to `Ember.Test.QUnitAdapter`.
@public
@property adapter
@type {Class} The adapter to be used.
@default Ember.Test.QUnitAdapter
*/
adapter: null,
/**
Replacement for `Ember.RSVP.resolve`
The only difference is this uses
and instance of `Ember.Test.Promise`
@public
@method resolve
@param {Mixed} The value to resolve
*/
resolve: function(val) {
return Test.promise(function(resolve) {
return resolve(val);
});
},
/**
This allows ember-testing to play nicely with other asynchronous
events, such as an application that is waiting for a CSS3
transition or an IndexDB transaction.
For example:
```javascript
Ember.Test.registerWaiter(function() {
return myPendingTransactions() == 0;
});
```
The `context` argument allows you to optionally specify the `this`
with which your callback will be invoked.
For example:
```javascript
Ember.Test.registerWaiter(MyDB, MyDB.hasPendingTransactions);
```
@public
@method registerWaiter
@param {Object} context (optional)
@param {Function} callback
*/
registerWaiter: function(context, callback) {
if (arguments.length === 1) {
callback = context;
context = null;
}
if (!this.waiters) {
this.waiters = Ember.A();
}
this.waiters.push([context, callback]);
},
/**
`unregisterWaiter` is used to unregister a callback that was
registered with `registerWaiter`.
@public
@method unregisterWaiter
@param {Object} context (optional)
@param {Function} callback
*/
unregisterWaiter: function(context, callback) {
var pair;
if (!this.waiters) { return; }
if (arguments.length === 1) {
callback = context;
context = null;
}
pair = [context, callback];
this.waiters = Ember.A(this.waiters.filter(function(elt) {
return compare(elt, pair)!==0;
}));
}
};
function helper(app, name) {
var fn = helpers[name].method,
meta = helpers[name].meta;
return function() {
var args = slice.call(arguments),
lastPromise = Test.lastPromise;
args.unshift(app);
// some helpers are not async and
// need to return a value immediately.
// example: `find`
if (!meta.wait) {
return fn.apply(app, args);
}
if (!lastPromise) {
// It's the first async helper in current context
lastPromise = fn.apply(app, args);
} else {
// wait for last helper's promise to resolve
// and then execute
run(function() {
lastPromise = Test.resolve(lastPromise).then(function() {
return fn.apply(app, args);
});
});
}
return lastPromise;
};
}
function run(fn) {
if (!run.currentRunLoop) {
run(fn);
} else {
fn();
}
}
Ember.Application.reopen({
/**
This property contains the testing helpers for the current application. These
are created once you call `injectTestHelpers` on your `Ember.Application`
instance. The included helpers are also available on the `window` object by
default, but can be used from this object on the individual application also.
@property testHelpers
@type {Object}
@default {}
*/
testHelpers: {},
/**
This property will contain the original methods that were registered
on the `helperContainer` before `injectTestHelpers` is called.
When `removeTestHelpers` is called, these methods are restored to the
`helperContainer`.
@property originalMethods
@type {Object}
@default {}
@private
*/
originalMethods: {},
/**
This property indicates whether or not this application is currently in
testing mode. This is set when `setupForTesting` is called on the current
application.
@property testing
@type {Boolean}
@default false
*/
testing: false,
/**
This hook defers the readiness of the application, so that you can start
the app when your tests are ready to run. It also sets the router's
location to 'none', so that the window's location will not be modified
(preventing both accidental leaking of state between tests and interference
with your testing framework).
Example:
```
App.setupForTesting();
```
@method setupForTesting
*/
setupForTesting: function() {
setupForTesting();
this.testing = true;
this.Router.reopen({
location: 'none'
});
},
/**
This will be used as the container to inject the test helpers into. By
default the helpers are injected into `window`.
@property helperContainer
@type {Object} The object to be used for test helpers.
@default window
*/
helperContainer: window,
/**
This injects the test helpers into the `helperContainer` object. If an object is provided
it will be used as the helperContainer. If `helperContainer` is not set it will default
to `window`. If a function of the same name has already been defined it will be cached
(so that it can be reset if the helper is removed with `unregisterHelper` or
`removeTestHelpers`).
Any callbacks registered with `onInjectHelpers` will be called once the
helpers have been injected.
Example:
```
App.injectTestHelpers();
```
@method injectTestHelpers
*/
injectTestHelpers: function(helperContainer) {
if (helperContainer) { this.helperContainer = helperContainer; }
this.testHelpers = {};
for (var name in helpers) {
this.originalMethods[name] = this.helperContainer[name];
this.testHelpers[name] = this.helperContainer[name] = helper(this, name);
protoWrap(Test.Promise.prototype, name, helper(this, name), helpers[name].meta.wait);
}
for(var i = 0, l = injectHelpersCallbacks.length; i < l; i++) {
injectHelpersCallbacks[i](this);
}
},
/**
This removes all helpers that have been registered, and resets and functions
that were overridden by the helpers.
Example:
```javascript
App.removeTestHelpers();
```
@public
@method removeTestHelpers
*/
removeTestHelpers: function() {
for (var name in helpers) {
this.helperContainer[name] = this.originalMethods[name];
delete this.testHelpers[name];
delete this.originalMethods[name];
}
}
});
// This method is no longer needed
// But still here for backwards compatibility
// of helper chaining
function protoWrap(proto, name, callback, isAsync) {
proto[name] = function() {
var args = arguments;
if (isAsync) {
return callback.apply(this, args);
} else {
return this.then(function() {
return callback.apply(this, args);
});
}
};
}
Test.Promise = function() {
Ember.RSVP.Promise.apply(this, arguments);
Test.lastPromise = this;
};
Test.Promise.prototype = create(Ember.RSVP.Promise.prototype);
Test.Promise.prototype.constructor = Test.Promise;
// Patch `then` to isolate async methods
// specifically `Ember.Test.lastPromise`
var originalThen = Ember.RSVP.Promise.prototype.then;
Test.Promise.prototype.then = function(onSuccess, onFailure) {
return originalThen.call(this, function(val) {
return isolate(onSuccess, val);
}, onFailure);
};
// This method isolates nested async methods
// so that they don't conflict with other last promises.
//
// 1. Set `Ember.Test.lastPromise` to null
// 2. Invoke method
// 3. Return the last promise created during method
// 4. Restore `Ember.Test.lastPromise` to original value
function isolate(fn, val) {
var value, lastPromise;
// Reset lastPromise for nested helpers
Test.lastPromise = null;
value = fn(val);
lastPromise = Test.lastPromise;
// If the method returned a promise
// return that promise. If not,
// return the last async helper's promise
if ((value && (value instanceof Test.Promise)) || !lastPromise) {
return value;
} else {
run(function() {
lastPromise = Test.resolve(lastPromise).then(function() {
return value;
});
});
return lastPromise;
}
}
export default Test;
| Do not override local scope with imported Ember.run in Ember.Test.
| packages_es6/ember-testing/lib/test.js | Do not override local scope with imported Ember.run in Ember.Test. | <ide><path>ackages_es6/ember-testing/lib/test.js
<ide> import Ember from "ember-metal/core";
<del>import run from "ember-metal/run_loop";
<add>import emberRun from "ember-metal/run_loop";
<ide> import {create} from "ember-metal/platform";
<ide> import compare from "ember-runtime/compare";
<ide> import setupForTesting from "ember-testing/setup_for_testing";
<ide> }
<ide>
<ide> function run(fn) {
<del> if (!run.currentRunLoop) {
<del> run(fn);
<add> if (!emberRun.currentRunLoop) {
<add> emberRun(fn);
<ide> } else {
<ide> fn();
<ide> } |
|
Java | apache-2.0 | a16288b9107de389489d7473f2a925b009079281 | 0 | nutzam/nutzwx,nutzam/nutzwx,nutzam/nutzwx | package org.nutz.weixin.impl;
import java.io.IOException;
import java.io.InputStream;
import java.io.StringWriter;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.nutz.http.Http;
import org.nutz.http.Request;
import org.nutz.http.Request.METHOD;
import org.nutz.ioc.impl.PropertiesProxy;
import org.nutz.http.Response;
import org.nutz.http.Sender;
import org.nutz.json.Json;
import org.nutz.lang.Encoding;
import org.nutz.lang.Lang;
import org.nutz.lang.Streams;
import org.nutz.lang.Strings;
import org.nutz.lang.random.R;
import org.nutz.lang.util.NutMap;
import org.nutz.log.Log;
import org.nutz.log.Logs;
import org.nutz.weixin.WxException;
import org.nutz.weixin.at.WxAccessToken;
import org.nutz.weixin.at.WxJsapiTicket;
import org.nutz.weixin.at.impl.MemoryAccessTokenStore;
import org.nutz.weixin.bean.WxInMsg;
import org.nutz.weixin.bean.WxOutMsg;
import org.nutz.weixin.repo.com.qq.weixin.mp.aes.AesException;
import org.nutz.weixin.repo.com.qq.weixin.mp.aes.WXBizMsgCrypt;
import org.nutz.weixin.spi.WxAccessTokenStore;
import org.nutz.weixin.spi.WxApi2;
import org.nutz.weixin.spi.WxHandler;
import org.nutz.weixin.spi.WxJsapiTicketStore;
import org.nutz.weixin.spi.WxResp;
import org.nutz.weixin.util.BeanConfigures;
import org.nutz.weixin.util.Wxs;
public abstract class AbstractWxApi2 implements WxApi2 {
private static final Log log = Logs.get();
protected String token;
protected String appid;
protected String appsecret;
protected String base = "https://api.weixin.qq.com/cgi-bin";
protected String openid;
protected String encodingAesKey;
protected int tokenExpires = 1800;//默认access_token过期时间
protected int retryTimes = 3;//默认access_token时效时重试次数
public AbstractWxApi2(String token, String appid, String appsecret, String openid, String encodingAesKey,
int tokenExpires) {
this();
this.token = token;
this.appid = appid;
this.appsecret = appsecret;
this.openid = openid;
this.encodingAesKey = encodingAesKey;
this.tokenExpires = tokenExpires;
}
public WxApi2 configure(PropertiesProxy conf, String prefix) {
prefix = Strings.sBlank(prefix);
token = conf.check(prefix + "token");
appid = conf.get(prefix + "appid");
appsecret = conf.get(prefix + "appsecret");
openid = conf.get(prefix + "openid");
encodingAesKey = conf.get(prefix + "aes");
tokenExpires = conf.getInt(prefix + "tokenExpires");
return this;
}
/**
* @return the token
*/
public String getToken() {
return token;
}
/**
* @param token
* the token to set
*/
public void setToken(String token) {
this.token = token;
}
/**
* @return the appid
*/
public String getAppid() {
return appid;
}
/**
* @param appid
* the appid to set
*/
public void setAppid(String appid) {
this.appid = appid;
}
/**
* @return the appsecret
*/
public String getAppsecret() {
return appsecret;
}
/**
* @param appsecret
* the appsecret to set
*/
public void setAppsecret(String appsecret) {
this.appsecret = appsecret;
}
/**
* @return the openid
*/
public String getOpenid() {
return openid;
}
/**
* @param openid
* the openid to set
*/
public void setOpenid(String openid) {
this.openid = openid;
}
/**
* @return the encodingAesKey
*/
public String getEncodingAesKey() {
return encodingAesKey;
}
/**
* @param encodingAesKey
* the encodingAesKey to set
*/
public void setEncodingAesKey(String encodingAesKey) {
this.encodingAesKey = encodingAesKey;
}
public int getTokenExpires() {
return tokenExpires;
}
public void setTokenExpires(int tokenExpires) {
this.tokenExpires = tokenExpires;
}
protected Object lock = new Object();
protected WXBizMsgCrypt pc;
protected WxAccessTokenStore accessTokenStore;
protected WxJsapiTicketStore jsapiTicketStore;
public AbstractWxApi2() {
this.accessTokenStore = new MemoryAccessTokenStore();
}
@Override
public WxAccessTokenStore getAccessTokenStore() {
return accessTokenStore;
}
@Override
public void setAccessTokenStore(WxAccessTokenStore ats) {
this.accessTokenStore = ats;
}
@Override
public WxJsapiTicketStore getJsapiTicketStore() {
return jsapiTicketStore;
}
@Override
public void setJsapiTicketStore(WxJsapiTicketStore jsapiTicketStore) {
this.jsapiTicketStore = jsapiTicketStore;
}
protected synchronized void checkWXBizMsgCrypt() {
if (pc != null || encodingAesKey == null || token == null || appid == null)
return;
try {
pc = new WXBizMsgCrypt(token, encodingAesKey, appid);
} catch (AesException e) {
throw new WxException(e);
}
}
@Override
public WxInMsg parse(HttpServletRequest req) {
InputStream in;
try {
in = req.getInputStream();
} catch (IOException e) {
throw new WxException(e);
}
String encrypt_type = req.getParameter("encrypt_type");
if (encrypt_type == null || "raw".equals(encrypt_type))
return Wxs.convert(in);
checkWXBizMsgCrypt();
if (pc == null)
throw new WxException("encrypt message, but not configure token/encodingAesKey/appid");
try {
String msg_signature = req.getParameter("msg_signature");
String timestamp = req.getParameter("timestamp");
String nonce = req.getParameter("nonce");
String str = pc.decryptMsg(msg_signature, timestamp, nonce,
new String(Streams.readBytesAndClose(in), Encoding.CHARSET_UTF8));
return Wxs.convert(str);
} catch (AesException e) {
throw new WxException("bad message or bad encodingAesKey", e);
}
}
@Override
public void handle(HttpServletRequest req, HttpServletResponse resp, WxHandler handler) {
try {
WxInMsg in = parse(req);
WxOutMsg out = handler.handle(in);
StringWriter sw = new StringWriter();
Wxs.asXml(sw, out);
String re = sw.getBuffer().toString();
if (pc != null)
re = pc.encryptMsg(re, req.getParameter("timestamp"), req.getParameter("nonce"));
resp.getWriter().write(re);
} catch (AesException e) {
throw new WxException(e);
} catch (IOException e) {
throw new WxException(e);
}
}
protected WxResp get(String uri, String... args) {
String params = "";
for (int i = 0; i < args.length; i += 2) {
if (args[i + 1] != null)
params += "&" + args[i] + "=" + args[i + 1];
}
return call(uri + "?_=1&" + params, METHOD.GET, null);
}
protected WxResp postJson(String uri, Object... args) {
NutMap body = new NutMap();
for (int i = 0; i < args.length; i += 2) {
body.put(args[i].toString(), args[i + 1]);
}
return postJson(uri, body);
}
protected WxResp postJson(String uri, NutMap body) {
return call(uri, METHOD.POST, Json.toJson(body));
}
protected WxResp call(String URL, METHOD method, String body) {
String token = getAccessToken();
if (log.isInfoEnabled()) {
log.info("wxapi call: " + URL);
if (log.isDebugEnabled()) {
log.debug(body);
}
}
int retry = retryTimes;
WxResp wxResp = null;
while (retry >= 0) {
try {
String sendUrl = null;
if (!URL.startsWith("http"))
sendUrl = base + URL;
if (URL.contains("?")) {
sendUrl += "&access_token=" + token;
} else {
sendUrl += "?access_token=" + token;
}
Request req = Request.create(sendUrl, method);
if (body != null)
req.setData(body);
Response resp = Sender.create(req).send();
if (!resp.isOK())
throw new IllegalArgumentException("resp code=" + resp.getStatus());
wxResp = Json.fromJson(WxResp.class, resp.getReader("UTF-8"));
// 处理微信返回 40001 invalid credential
if (wxResp.errcode() != 40001) {
break;//正常直接跳出循环
} else {
log.warn("wxapi (" + URL + ") call finished, but the return code is 40001, try to reflush access_token right now...times -> " + retry);
// 强制刷新一次acess_token
reflushAccessToken();
}
} catch (Exception e) {
if (retryTimes >= 0) {
log.warn("reflushing access_token... " + retry + " retries left.", e);
} else {
throw Lang.wrapThrow(e);
}
} finally {
retry--;
}
}
return wxResp;
}
@Override
public String getJsapiTicket() {
WxJsapiTicket at = jsapiTicketStore.get();
if (at == null || at.getExpires() < (System.currentTimeMillis() - at.getLastCacheTimeMillis()) / 1000) {
synchronized (lock) {
WxJsapiTicket at_forupdate = jsapiTicketStore.get();
if (at_forupdate == null || at_forupdate.getExpires() < (System.currentTimeMillis() - at_forupdate.getLastCacheTimeMillis()) / 1000) {
reflushJsapiTicket();
}
}
}
return jsapiTicketStore.get().getTicket();
}
protected void reflushJsapiTicket() {
String at = this.getAccessToken();
String url = String.format("%s/ticket/getticket?access_token=%s&type=jsapi", base, at);
if (log.isDebugEnabled())
log.debugf("ATS: reflush jsapi ticket send: %s", url);
Response resp = Http.get(url);
if (!resp.isOK())
throw new IllegalArgumentException("reflushJsapiTicket FAIL , openid=" + openid);
String str = resp.getContent();
if (log.isDebugEnabled())
log.debugf("ATS: reflush jsapi ticket done: %s", str);
NutMap re = Json.fromJson(NutMap.class, str);
String ticket = re.getString("ticket");
// add by SK.Loda 微信token过期时间和返回的expires_in并不匹配,故此处采用外部配置过期时间
// int expires = re.getInt("expires_in")
jsapiTicketStore.save(ticket, tokenExpires, System.currentTimeMillis());
}
@Override
public String getAccessToken() {
WxAccessToken at = accessTokenStore.get();
if (at == null || at.getExpires() < (System.currentTimeMillis() - at.getLastCacheTimeMillis()) / 1000) {
synchronized (lock) {
//FIX多线程并非更新token的问题
WxAccessToken at_forupdate = accessTokenStore.get();
if (at_forupdate == null || at_forupdate.getExpires() < (System.currentTimeMillis() - at_forupdate.getLastCacheTimeMillis()) / 1000) {
reflushAccessToken();
}
}
}
return accessTokenStore.get().getToken();
}
protected void reflushAccessToken() {
String url = String.format("%s/token?grant_type=client_credential&appid=%s&secret=%s", base, appid, appsecret);
if (log.isDebugEnabled())
log.debugf("ATS: reflush access_token send: %s", url);
Response resp = Http.get(url);
if (!resp.isOK())
throw new IllegalArgumentException("reflushAccessToken FAIL , openid=" + openid);
String str = resp.getContent();
if (log.isDebugEnabled())
log.debugf("ATS: reflush access_token done: %s", str);
NutMap re = Json.fromJson(NutMap.class, str);
String token = re.getString("access_token");
// add by SK.Loda 微信token过期时间和返回的expires_in不匹配故此处采用外部配置过期时间
// int expires = re.getInt("expires_in");
accessTokenStore.save(token, tokenExpires, System.currentTimeMillis());
}
@Override
public NutMap genJsSDKConfig(String url, String... jsApiList) {
String jt = this.getJsapiTicket();
long timestamp = System.currentTimeMillis();
String nonceStr = R.UU64();
String str = String.format("jsapi_ticket=%s&noncestr=%s×tamp=%d&url=%s", jt, nonceStr, timestamp, url);
String signature = Lang.sha1(str);
NutMap map = new NutMap();
map.put("appId", appid);
map.put("timestamp", timestamp);
map.put("nonceStr", nonceStr);
map.put("signature", signature);
map.put("jsApiList", jsApiList);
return map;
}
public void configure(Object obj) {
BeanConfigures.configure(this, obj);
}
}
| src/main/java/org/nutz/weixin/impl/AbstractWxApi2.java | package org.nutz.weixin.impl;
import java.io.IOException;
import java.io.InputStream;
import java.io.StringWriter;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.nutz.http.Http;
import org.nutz.http.Request;
import org.nutz.http.Request.METHOD;
import org.nutz.ioc.impl.PropertiesProxy;
import org.nutz.http.Response;
import org.nutz.http.Sender;
import org.nutz.json.Json;
import org.nutz.lang.Encoding;
import org.nutz.lang.Lang;
import org.nutz.lang.Streams;
import org.nutz.lang.Strings;
import org.nutz.lang.random.R;
import org.nutz.lang.util.NutMap;
import org.nutz.log.Log;
import org.nutz.log.Logs;
import org.nutz.weixin.WxException;
import org.nutz.weixin.at.WxAccessToken;
import org.nutz.weixin.at.WxJsapiTicket;
import org.nutz.weixin.at.impl.MemoryAccessTokenStore;
import org.nutz.weixin.bean.WxInMsg;
import org.nutz.weixin.bean.WxOutMsg;
import org.nutz.weixin.repo.com.qq.weixin.mp.aes.AesException;
import org.nutz.weixin.repo.com.qq.weixin.mp.aes.WXBizMsgCrypt;
import org.nutz.weixin.spi.WxAccessTokenStore;
import org.nutz.weixin.spi.WxApi2;
import org.nutz.weixin.spi.WxHandler;
import org.nutz.weixin.spi.WxJsapiTicketStore;
import org.nutz.weixin.spi.WxResp;
import org.nutz.weixin.util.BeanConfigures;
import org.nutz.weixin.util.Wxs;
public abstract class AbstractWxApi2 implements WxApi2 {
private static final Log log = Logs.get();
protected String token;
protected String appid;
protected String appsecret;
protected String base = "https://api.weixin.qq.com/cgi-bin";
protected String openid;
protected String encodingAesKey;
protected int tokenExpires = 1800;//默认access_token过期时间
protected int retryTimes = 3;//默认access_token时效时重试次数
public AbstractWxApi2(String token, String appid, String appsecret, String openid, String encodingAesKey,
int tokenExpires) {
this();
this.token = token;
this.appid = appid;
this.appsecret = appsecret;
this.openid = openid;
this.encodingAesKey = encodingAesKey;
this.tokenExpires = tokenExpires;
}
public WxApi2 configure(PropertiesProxy conf, String prefix) {
prefix = Strings.sBlank(prefix);
token = conf.check(prefix + "token");
appid = conf.get(prefix + "appid");
appsecret = conf.get(prefix + "appsecret");
openid = conf.get(prefix + "openid");
encodingAesKey = conf.get(prefix + "aes");
tokenExpires = conf.getInt(prefix + "tokenExpires");
return this;
}
/**
* @return the token
*/
public String getToken() {
return token;
}
/**
* @param token
* the token to set
*/
public void setToken(String token) {
this.token = token;
}
/**
* @return the appid
*/
public String getAppid() {
return appid;
}
/**
* @param appid
* the appid to set
*/
public void setAppid(String appid) {
this.appid = appid;
}
/**
* @return the appsecret
*/
public String getAppsecret() {
return appsecret;
}
/**
* @param appsecret
* the appsecret to set
*/
public void setAppsecret(String appsecret) {
this.appsecret = appsecret;
}
/**
* @return the openid
*/
public String getOpenid() {
return openid;
}
/**
* @param openid
* the openid to set
*/
public void setOpenid(String openid) {
this.openid = openid;
}
/**
* @return the encodingAesKey
*/
public String getEncodingAesKey() {
return encodingAesKey;
}
/**
* @param encodingAesKey
* the encodingAesKey to set
*/
public void setEncodingAesKey(String encodingAesKey) {
this.encodingAesKey = encodingAesKey;
}
public int getTokenExpires() {
return tokenExpires;
}
public void setTokenExpires(int tokenExpires) {
this.tokenExpires = tokenExpires;
}
protected Object lock = new Object();
protected WXBizMsgCrypt pc;
protected WxAccessTokenStore accessTokenStore;
protected WxJsapiTicketStore jsapiTicketStore;
public AbstractWxApi2() {
this.accessTokenStore = new MemoryAccessTokenStore();
}
@Override
public WxAccessTokenStore getAccessTokenStore() {
return accessTokenStore;
}
@Override
public void setAccessTokenStore(WxAccessTokenStore ats) {
this.accessTokenStore = ats;
}
@Override
public WxJsapiTicketStore getJsapiTicketStore() {
return jsapiTicketStore;
}
@Override
public void setJsapiTicketStore(WxJsapiTicketStore jsapiTicketStore) {
this.jsapiTicketStore = jsapiTicketStore;
}
protected synchronized void checkWXBizMsgCrypt() {
if (pc != null || encodingAesKey == null || token == null || appid == null)
return;
try {
pc = new WXBizMsgCrypt(token, encodingAesKey, appid);
} catch (AesException e) {
throw new WxException(e);
}
}
@Override
public WxInMsg parse(HttpServletRequest req) {
InputStream in;
try {
in = req.getInputStream();
} catch (IOException e) {
throw new WxException(e);
}
String encrypt_type = req.getParameter("encrypt_type");
if (encrypt_type == null || "raw".equals(encrypt_type))
return Wxs.convert(in);
checkWXBizMsgCrypt();
if (pc == null)
throw new WxException("encrypt message, but not configure token/encodingAesKey/appid");
try {
String msg_signature = req.getParameter("msg_signature");
String timestamp = req.getParameter("timestamp");
String nonce = req.getParameter("nonce");
String str = pc.decryptMsg(msg_signature, timestamp, nonce,
new String(Streams.readBytesAndClose(in), Encoding.CHARSET_UTF8));
return Wxs.convert(str);
} catch (AesException e) {
throw new WxException("bad message or bad encodingAesKey", e);
}
}
@Override
public void handle(HttpServletRequest req, HttpServletResponse resp, WxHandler handler) {
try {
WxInMsg in = parse(req);
WxOutMsg out = handler.handle(in);
StringWriter sw = new StringWriter();
Wxs.asXml(sw, out);
String re = sw.getBuffer().toString();
if (pc != null)
re = pc.encryptMsg(re, req.getParameter("timestamp"), req.getParameter("nonce"));
resp.getWriter().write(re);
} catch (AesException e) {
throw new WxException(e);
} catch (IOException e) {
throw new WxException(e);
}
}
protected WxResp get(String uri, String... args) {
String params = "";
for (int i = 0; i < args.length; i += 2) {
if (args[i + 1] != null)
params += "&" + args[i] + "=" + args[i + 1];
}
return call(uri + "?_=1&" + params, METHOD.GET, null);
}
protected WxResp postJson(String uri, Object... args) {
NutMap body = new NutMap();
for (int i = 0; i < args.length; i += 2) {
body.put(args[i].toString(), args[i + 1]);
}
return postJson(uri, body);
}
protected WxResp postJson(String uri, NutMap body) {
return call(uri, METHOD.POST, Json.toJson(body));
}
protected WxResp call(String URL, METHOD method, String body) {
String token = getAccessToken();
if (log.isInfoEnabled()) {
log.info("wxapi call: " + URL);
if (log.isDebugEnabled()) {
log.debug(body);
}
}
int retry = retryTimes;
WxResp wxResp = null;
while (retry >= 0) {
try {
String sendUrl = null;
if (!URL.startsWith("http"))
sendUrl = base + URL;
if (URL.contains("?")) {
sendUrl += "&access_token=" + token;
} else {
sendUrl += "?access_token=" + token;
}
Request req = Request.create(sendUrl, method);
if (body != null)
req.setData(body);
Response resp = Sender.create(req).send();
if (!resp.isOK())
throw new IllegalArgumentException("resp code=" + resp.getStatus());
wxResp = Json.fromJson(WxResp.class, resp.getReader("UTF-8"));
// 处理微信返回 40001 invalid credential
if (wxResp.errcode() != 40001) {
break;//正常直接跳出循环
} else {
log.warn("wxapi (" + URL + ") call finished, but the return code is 40001, try to reflush access_token right now...times -> " + retry);
// 强制刷新一次acess_token
reflushAccessToken();
}
} catch (Exception e) {
if (retryTimes >= 0) {
log.warn("reflushing access_token... " + retry + " retries left.", e);
} else {
throw e;
}
} finally {
retry--;
}
}
return wxResp;
}
@Override
public String getJsapiTicket() {
WxJsapiTicket at = jsapiTicketStore.get();
if (at == null || at.getExpires() < (System.currentTimeMillis() - at.getLastCacheTimeMillis()) / 1000) {
synchronized (lock) {
WxJsapiTicket at_forupdate = jsapiTicketStore.get();
if (at_forupdate == null || at_forupdate.getExpires() < (System.currentTimeMillis() - at_forupdate.getLastCacheTimeMillis()) / 1000) {
reflushJsapiTicket();
}
}
}
return jsapiTicketStore.get().getTicket();
}
protected void reflushJsapiTicket() {
String at = this.getAccessToken();
String url = String.format("%s/ticket/getticket?access_token=%s&type=jsapi", base, at);
if (log.isDebugEnabled())
log.debugf("ATS: reflush jsapi ticket send: %s", url);
Response resp = Http.get(url);
if (!resp.isOK())
throw new IllegalArgumentException("reflushJsapiTicket FAIL , openid=" + openid);
String str = resp.getContent();
if (log.isDebugEnabled())
log.debugf("ATS: reflush jsapi ticket done: %s", str);
NutMap re = Json.fromJson(NutMap.class, str);
String ticket = re.getString("ticket");
// add by SK.Loda 微信token过期时间和返回的expires_in并不匹配,故此处采用外部配置过期时间
// int expires = re.getInt("expires_in")
jsapiTicketStore.save(ticket, tokenExpires, System.currentTimeMillis());
}
@Override
public String getAccessToken() {
WxAccessToken at = accessTokenStore.get();
if (at == null || at.getExpires() < (System.currentTimeMillis() - at.getLastCacheTimeMillis()) / 1000) {
synchronized (lock) {
//FIX多线程并非更新token的问题
WxAccessToken at_forupdate = accessTokenStore.get();
if (at_forupdate == null || at_forupdate.getExpires() < (System.currentTimeMillis() - at_forupdate.getLastCacheTimeMillis()) / 1000) {
reflushAccessToken();
}
}
}
return accessTokenStore.get().getToken();
}
protected void reflushAccessToken() {
String url = String.format("%s/token?grant_type=client_credential&appid=%s&secret=%s", base, appid, appsecret);
if (log.isDebugEnabled())
log.debugf("ATS: reflush access_token send: %s", url);
Response resp = Http.get(url);
if (!resp.isOK())
throw new IllegalArgumentException("reflushAccessToken FAIL , openid=" + openid);
String str = resp.getContent();
if (log.isDebugEnabled())
log.debugf("ATS: reflush access_token done: %s", str);
NutMap re = Json.fromJson(NutMap.class, str);
String token = re.getString("access_token");
// add by SK.Loda 微信token过期时间和返回的expires_in不匹配故此处采用外部配置过期时间
// int expires = re.getInt("expires_in");
accessTokenStore.save(token, tokenExpires, System.currentTimeMillis());
}
@Override
public NutMap genJsSDKConfig(String url, String... jsApiList) {
String jt = this.getJsapiTicket();
long timestamp = System.currentTimeMillis();
String nonceStr = R.UU64();
String str = String.format("jsapi_ticket=%s&noncestr=%s×tamp=%d&url=%s", jt, nonceStr, timestamp, url);
String signature = Lang.sha1(str);
NutMap map = new NutMap();
map.put("appId", appid);
map.put("timestamp", timestamp);
map.put("nonceStr", nonceStr);
map.put("signature", signature);
map.put("jsApiList", jsApiList);
return map;
}
public void configure(Object obj) {
BeanConfigures.configure(this, obj);
}
}
| fix: 编译错误
| src/main/java/org/nutz/weixin/impl/AbstractWxApi2.java | fix: 编译错误 | <ide><path>rc/main/java/org/nutz/weixin/impl/AbstractWxApi2.java
<ide> if (retryTimes >= 0) {
<ide> log.warn("reflushing access_token... " + retry + " retries left.", e);
<ide> } else {
<del> throw e;
<add> throw Lang.wrapThrow(e);
<ide> }
<ide> } finally {
<ide> retry--; |
|
Java | apache-2.0 | aecb22c8b999ca35b9967bb3facedbe0b34ac923 | 0 | lisaglendenning/zookeeper-lite,lisaglendenning/zookeeper-lite | package edu.uw.zookeeper.client;
import static com.google.common.base.Preconditions.checkState;
import java.nio.channels.ClosedChannelException;
import java.util.Collections;
import java.util.List;
import java.util.Queue;
import java.util.Random;
import java.util.Set;
import java.util.concurrent.CancellationException;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.Executor;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import com.google.common.base.Supplier;
import com.google.common.collect.Lists;
import com.google.common.collect.Queues;
import com.google.common.collect.Sets;
import com.google.common.eventbus.Subscribe;
import com.google.common.util.concurrent.AbstractIdleService;
import com.google.common.util.concurrent.FutureCallback;
import com.google.common.util.concurrent.Futures;
import com.google.common.util.concurrent.ListenableFuture;
import com.google.common.util.concurrent.MoreExecutors;
import com.google.common.util.concurrent.Service;
import edu.uw.zookeeper.EnsembleView;
import edu.uw.zookeeper.ServerInetAddressView;
import edu.uw.zookeeper.ZooKeeperApplication;
import edu.uw.zookeeper.common.Automaton;
import edu.uw.zookeeper.common.ForwardingPromise;
import edu.uw.zookeeper.common.LoggingPromise;
import edu.uw.zookeeper.common.Promise;
import edu.uw.zookeeper.common.Publisher;
import edu.uw.zookeeper.common.RuntimeModule;
import edu.uw.zookeeper.common.SettableFuturePromise;
import edu.uw.zookeeper.data.Operations;
import edu.uw.zookeeper.net.ClientConnectionFactory;
import edu.uw.zookeeper.net.Connection;
import edu.uw.zookeeper.protocol.ConnectMessage;
import edu.uw.zookeeper.protocol.Message;
import edu.uw.zookeeper.protocol.Operation;
import edu.uw.zookeeper.protocol.ProtocolCodecConnection;
import edu.uw.zookeeper.protocol.ProtocolState;
import edu.uw.zookeeper.protocol.Session;
import edu.uw.zookeeper.protocol.client.AssignXidCodec;
import edu.uw.zookeeper.protocol.client.ClientConnectionExecutor;
public class ClientConnectionExecutorService extends AbstractIdleService
implements Supplier<ListenableFuture<ClientConnectionExecutor<?>>>,
Publisher,
ClientExecutor<Operation.Request, Message.ServerResponse<?>>,
FutureCallback<ClientConnectionExecutor<?>> {
public static ClientConnectionExecutorService newInstance(
EnsembleViewFactory<? extends ServerViewFactory<Session, ? extends ClientConnectionExecutor<?>>> factory) {
return new ClientConnectionExecutorService(factory);
}
public static Builder builder() {
return new Builder(null, null, null, null);
}
public static class Builder implements ZooKeeperApplication.RuntimeBuilder<List<Service>, Builder> {
protected final RuntimeModule runtime;
protected final ClientConnectionFactoryBuilder connectionBuilder;
protected final ClientConnectionFactory<? extends ProtocolCodecConnection<Operation.Request, AssignXidCodec, Connection<Operation.Request>>> clientConnectionFactory;
protected final ClientConnectionExecutorService clientExecutor;
protected Builder(
ClientConnectionFactoryBuilder connectionBuilder,
ClientConnectionFactory<? extends ProtocolCodecConnection<Operation.Request, AssignXidCodec, Connection<Operation.Request>>> clientConnectionFactory,
ClientConnectionExecutorService clientExecutor,
RuntimeModule runtime) {
this.runtime = runtime;
this.connectionBuilder = connectionBuilder;
this.clientConnectionFactory = clientConnectionFactory;
this.clientExecutor = clientExecutor;
}
@Override
public RuntimeModule getRuntimeModule() {
return runtime;
}
@Override
public Builder setRuntimeModule(RuntimeModule runtime) {
if (this.runtime == runtime) {
return this;
} else {
return newInstance(
(connectionBuilder == null) ? connectionBuilder : connectionBuilder.setRuntimeModule(runtime),
clientConnectionFactory,
clientExecutor,
runtime);
}
}
public ClientConnectionFactoryBuilder getConnectionBuilder() {
return connectionBuilder;
}
public Builder setConnectionBuilder(ClientConnectionFactoryBuilder connectionBuilder) {
if (this.connectionBuilder == connectionBuilder) {
return this;
} else {
return newInstance(connectionBuilder, clientConnectionFactory, clientExecutor, runtime);
}
}
public ClientConnectionFactory<? extends ProtocolCodecConnection<Operation.Request, AssignXidCodec, Connection<Operation.Request>>> getClientConnectionFactory() {
return clientConnectionFactory;
}
public Builder setClientConnectionFactory(
ClientConnectionFactory<? extends ProtocolCodecConnection<Operation.Request, AssignXidCodec, Connection<Operation.Request>>> clientConnectionFactory) {
if (this.clientConnectionFactory == clientConnectionFactory) {
return this;
} else {
return newInstance(connectionBuilder, clientConnectionFactory, clientExecutor, runtime);
}
}
public ClientConnectionExecutorService getClientConnectionExecutor() {
return clientExecutor;
}
public Builder setClientConnectionExecutor(
ClientConnectionExecutorService clientExecutor) {
if (this.clientExecutor == clientExecutor) {
return this;
} else {
return newInstance(connectionBuilder, clientConnectionFactory, clientExecutor, runtime);
}
}
@Override
public Builder setDefaults() {
checkState(getRuntimeModule() != null);
if (this.connectionBuilder == null) {
return setConnectionBuilder(getDefaultClientConnectionFactoryBuilder()).setDefaults();
}
ClientConnectionFactoryBuilder connectionBuilder = this.connectionBuilder.setDefaults();
if (this.connectionBuilder != connectionBuilder) {
return setConnectionBuilder(connectionBuilder).setDefaults();
}
if (clientConnectionFactory == null) {
return setClientConnectionFactory(getDefaultClientConnectionFactory()).setDefaults();
}
if (clientExecutor == null) {
return setClientConnectionExecutor(getDefaultClientConnectionExecutorService()).setDefaults();
}
return this;
}
@Override
public List<Service> build() {
return setDefaults().getServices();
}
protected Builder newInstance(
ClientConnectionFactoryBuilder connectionBuilder,
ClientConnectionFactory<? extends ProtocolCodecConnection<Operation.Request, AssignXidCodec, Connection<Operation.Request>>> clientConnectionFactory,
ClientConnectionExecutorService clientExecutor,
RuntimeModule runtime) {
return new Builder(connectionBuilder, clientConnectionFactory, clientExecutor, runtime);
}
protected ClientConnectionFactoryBuilder getDefaultClientConnectionFactoryBuilder() {
return ClientConnectionFactoryBuilder.defaults().setRuntimeModule(getRuntimeModule()).setDefaults();
}
protected ClientConnectionFactory<? extends ProtocolCodecConnection<Operation.Request, AssignXidCodec, Connection<Operation.Request>>> getDefaultClientConnectionFactory() {
return getConnectionBuilder().build();
}
protected EnsembleView<ServerInetAddressView> getDefaultEnsemble() {
return ConfigurableEnsembleView.get(getRuntimeModule().getConfiguration());
}
protected ClientConnectionExecutorService getDefaultClientConnectionExecutorService() {
EnsembleViewFactory<? extends ServerViewFactory<Session, ?>> ensembleFactory =
EnsembleViewFactory.fromSession(
getClientConnectionFactory(),
getDefaultEnsemble(),
getConnectionBuilder().getTimeOut(),
getRuntimeModule().getExecutors().get(ScheduledExecutorService.class));
ClientConnectionExecutorService service =
ClientConnectionExecutorService.newInstance(
ensembleFactory);
return service;
}
protected List<Service> getServices() {
return Lists.<Service>newArrayList(
getClientConnectionFactory(),
getClientConnectionExecutor());
}
}
protected final Logger logger;
protected final Executor executor;
protected final EnsembleViewFactory<? extends ServerViewFactory<Session, ? extends ClientConnectionExecutor<?>>> factory;
protected final Set<Object> handlers;
protected final Queue<Object> events;
protected final Client client;
protected ClientConnectionExecutorService(
EnsembleViewFactory<? extends ServerViewFactory<Session, ? extends ClientConnectionExecutor<?>>> factory) {
this.logger = LogManager.getLogger(getClass());
this.factory = factory;
this.handlers = Collections.synchronizedSet(Sets.newHashSet());
this.events = Queues.newConcurrentLinkedQueue();
this.executor = MoreExecutors.sameThreadExecutor();
this.client = new Client();
}
@Override
public ListenableFuture<ClientConnectionExecutor<?>> get() {
return client;
}
@Override
public ListenableFuture<Message.ServerResponse<?>> submit(Operation.Request request) {
if (isRunning()) {
try {
return get().get().submit(request);
} catch (Exception e) {
return Futures.immediateFailedFuture(e);
}
} else {
throw new IllegalStateException(state().toString());
}
}
@Override
public ListenableFuture<Message.ServerResponse<?>> submit(Operation.Request request, Promise<Message.ServerResponse<?>> promise) {
if (isRunning()) {
try {
return get().get().submit(request, promise);
} catch (Exception e) {
return Futures.immediateFailedFuture(e);
}
} else {
throw new IllegalStateException(state().toString());
}
}
@Override
public synchronized void post(Object event) {
if (!client.isDone() || !events.isEmpty()) {
events.add(event);
} else {
ClientConnectionExecutor<?> client;
try {
client = this.client.get(0, TimeUnit.MILLISECONDS);
} catch (Exception e) {
events.add(event);
return;
}
client.post(event);
}
}
@Override
public synchronized void register(Object handler) {
handlers.add(handler);
if (client.isDone()) {
try {
client.get(0, TimeUnit.MILLISECONDS).register(handler);
} catch (Exception e) {
}
}
}
@Override
public synchronized void unregister(Object handler) {
handlers.remove(handler);
if (client.isDone()) {
try {
client.get(0, TimeUnit.MILLISECONDS).unregister(handler);
} catch (Exception e) {
}
}
}
@Override
public synchronized void onSuccess(ClientConnectionExecutor<?> result) {
try {
synchronized (handlers) {
for (Object handler: handlers) {
result.register(handler);
}
}
Object event;
while ((event = events.poll()) != null) {
result.post(event);
}
} catch (Exception e) {
// TODO
onFailure(e);
}
}
@Override
public void onFailure(Throwable t) {
// TODO
stopAsync();
}
@Override
protected void startUp() throws Exception {
client.run();
client.get();
}
@Override
protected synchronized void shutDown() throws Exception {
try {
if (client.isDone()) {
if (((client.get().get().codec().state().compareTo(ProtocolState.CONNECTED)) <= 0) &&
(client.get().get().state().compareTo(Connection.State.CONNECTION_CLOSING) < 0)) {
ListenableFuture<Message.ServerResponse<?>> future = client.get().submit(Operations.Requests.disconnect().build());
int timeOut = client.get().session().get().getTimeOut();
if (timeOut > 0) {
future.get(timeOut, TimeUnit.MILLISECONDS);
} else {
future.get();
}
}
}
} finally {
try {
client.get().stop();
} catch (Exception e) {}
client.cancel(true);
handlers.clear();
events.clear();
}
}
protected class Client extends ForwardingPromise<ClientConnectionExecutor<?>> implements Runnable {
protected volatile ServerInetAddressView server;
protected volatile ListenableFuture<? extends ClientConnectionExecutor<?>> future;
protected volatile Promise<ClientConnectionExecutor<?>> promise;
public Client() {
this.server = null;
this.future = null;
this.promise = newPromise();
}
protected Promise<ClientConnectionExecutor<?>> newPromise() {
return LoggingPromise.create(logger, SettableFuturePromise.<ClientConnectionExecutor<?>>create());
}
@Override
public synchronized boolean cancel(boolean mayInterruptIfRunning) {
if (future != null) {
future.cancel(mayInterruptIfRunning);
}
return super.cancel(mayInterruptIfRunning);
}
@Override
public synchronized boolean set(ClientConnectionExecutor<?> value) {
if (! isDone()) {
new Handler(value);
ClientConnectionExecutorService.this.onSuccess(value);
return super.set(value);
}
return false;
}
@Override
public synchronized void run() {
switch (state()) {
case STOPPING:
case TERMINATED:
case FAILED:
return;
default:
break;
}
if (future == null) {
if (! isCancelled()) {
if (server == null) {
server = factory.select();
}
if (isDone()) {
try {
if (get().session().isDone()) {
ConnectMessage.Response response = get().session().get();
if (response instanceof ConnectMessage.Response.Valid) {
backoff();
Session session = response.toSession();
logger.info("Reconnecting session {} to {}", session, server);
future = factory.get(server).get(session);
}
}
} catch (Exception e) {
future = null;
}
promise = newPromise();
}
if (future == null) {
logger.info("Connecting new session to {}", server);
future = factory.get(server).get();
}
future.addListener(this, executor);
}
return;
}
if (future.isDone()) {
if (! isDone()) {
if (future.isCancelled()) {
cancel(true);
} else {
try {
ClientConnectionExecutor<?> connection = future.get();
if (connection.session().isDone()) {
ConnectMessage.Response session;
try {
session = connection.session().get();
} catch (CancellationException e) {
throw new ExecutionException(e);
}
if (session instanceof ConnectMessage.Response.Valid) {
set(connection);
return;
} else {
// try again with a new session
future = null;
run();
return;
}
} else {
connection.session().addListener(this, executor);
return;
}
} catch (ExecutionException e) {
logger.warn("Error connecting to {}", server, e.getCause());
if (factory.view().size() > 1) {
ServerInetAddressView prevServer = server;
do {
server = factory.select();
} while (server.equals(prevServer));
future = null;
run();
return;
} else {
setException(e.getCause());
}
} catch (InterruptedException e) {
setException(e);
}
}
}
}
}
protected void backoff() throws InterruptedException {
// it seems that when the ensemble is undergoing election
// that connections may be refused
// so we'll wait a little while before trying to connect
Random random = new Random();
int millis = random.nextInt(1000) + 1000;
Thread.sleep(millis);
}
@Override
protected Promise<ClientConnectionExecutor<?>> delegate() {
return promise;
}
protected class Handler {
protected final ClientConnectionExecutor<?> instance;
public Handler(ClientConnectionExecutor<?> instance) {
this.instance = instance;
instance.register(this);
}
@Subscribe
public void handleStateEvent(Automaton.Transition<?> event) {
if (Connection.State.CONNECTION_CLOSED == event.to()) {
synchronized (Client.this) {
if (isRunning()) {
logger.warn("Connection closed to {}", server);
if (factory.view().size() > 1) {
ServerInetAddressView prevServer = server;
do {
server = factory.select();
} while (server.equals(prevServer));
future = null;
run();
return;
} else {
setException(new ClosedChannelException());
}
}
}
try {
instance.unregister(this);
} catch (IllegalArgumentException e) {}
}
}
}
}
}
| zkclient/src/main/java/edu/uw/zookeeper/client/ClientConnectionExecutorService.java | package edu.uw.zookeeper.client;
import static com.google.common.base.Preconditions.checkState;
import java.util.Collections;
import java.util.List;
import java.util.Queue;
import java.util.Set;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.Executor;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import com.google.common.base.Supplier;
import com.google.common.collect.Lists;
import com.google.common.collect.Queues;
import com.google.common.collect.Sets;
import com.google.common.eventbus.Subscribe;
import com.google.common.util.concurrent.AbstractIdleService;
import com.google.common.util.concurrent.FutureCallback;
import com.google.common.util.concurrent.Futures;
import com.google.common.util.concurrent.ListenableFuture;
import com.google.common.util.concurrent.MoreExecutors;
import com.google.common.util.concurrent.Service;
import edu.uw.zookeeper.EnsembleView;
import edu.uw.zookeeper.ServerInetAddressView;
import edu.uw.zookeeper.ZooKeeperApplication;
import edu.uw.zookeeper.common.Automaton;
import edu.uw.zookeeper.common.ForwardingPromise;
import edu.uw.zookeeper.common.LoggingPromise;
import edu.uw.zookeeper.common.Promise;
import edu.uw.zookeeper.common.Publisher;
import edu.uw.zookeeper.common.RuntimeModule;
import edu.uw.zookeeper.common.SettableFuturePromise;
import edu.uw.zookeeper.data.Operations;
import edu.uw.zookeeper.net.ClientConnectionFactory;
import edu.uw.zookeeper.net.Connection;
import edu.uw.zookeeper.protocol.ConnectMessage;
import edu.uw.zookeeper.protocol.Message;
import edu.uw.zookeeper.protocol.Operation;
import edu.uw.zookeeper.protocol.ProtocolCodecConnection;
import edu.uw.zookeeper.protocol.ProtocolState;
import edu.uw.zookeeper.protocol.Session;
import edu.uw.zookeeper.protocol.client.AssignXidCodec;
import edu.uw.zookeeper.protocol.client.ClientConnectionExecutor;
public class ClientConnectionExecutorService extends AbstractIdleService
implements Supplier<ListenableFuture<ClientConnectionExecutor<?>>>,
Publisher,
ClientExecutor<Operation.Request, Message.ServerResponse<?>>,
FutureCallback<ClientConnectionExecutor<?>> {
public static ClientConnectionExecutorService newInstance(
EnsembleViewFactory<? extends ServerViewFactory<Session, ? extends ClientConnectionExecutor<?>>> factory) {
return new ClientConnectionExecutorService(factory);
}
public static Builder builder() {
return new Builder(null, null, null, null);
}
public static class Builder implements ZooKeeperApplication.RuntimeBuilder<List<Service>, Builder> {
protected final RuntimeModule runtime;
protected final ClientConnectionFactoryBuilder connectionBuilder;
protected final ClientConnectionFactory<? extends ProtocolCodecConnection<Operation.Request, AssignXidCodec, Connection<Operation.Request>>> clientConnectionFactory;
protected final ClientConnectionExecutorService clientExecutor;
protected Builder(
ClientConnectionFactoryBuilder connectionBuilder,
ClientConnectionFactory<? extends ProtocolCodecConnection<Operation.Request, AssignXidCodec, Connection<Operation.Request>>> clientConnectionFactory,
ClientConnectionExecutorService clientExecutor,
RuntimeModule runtime) {
this.runtime = runtime;
this.connectionBuilder = connectionBuilder;
this.clientConnectionFactory = clientConnectionFactory;
this.clientExecutor = clientExecutor;
}
@Override
public RuntimeModule getRuntimeModule() {
return runtime;
}
@Override
public Builder setRuntimeModule(RuntimeModule runtime) {
if (this.runtime == runtime) {
return this;
} else {
return newInstance(
(connectionBuilder == null) ? connectionBuilder : connectionBuilder.setRuntimeModule(runtime),
clientConnectionFactory,
clientExecutor,
runtime);
}
}
public ClientConnectionFactoryBuilder getConnectionBuilder() {
return connectionBuilder;
}
public Builder setConnectionBuilder(ClientConnectionFactoryBuilder connectionBuilder) {
if (this.connectionBuilder == connectionBuilder) {
return this;
} else {
return newInstance(connectionBuilder, clientConnectionFactory, clientExecutor, runtime);
}
}
public ClientConnectionFactory<? extends ProtocolCodecConnection<Operation.Request, AssignXidCodec, Connection<Operation.Request>>> getClientConnectionFactory() {
return clientConnectionFactory;
}
public Builder setClientConnectionFactory(
ClientConnectionFactory<? extends ProtocolCodecConnection<Operation.Request, AssignXidCodec, Connection<Operation.Request>>> clientConnectionFactory) {
if (this.clientConnectionFactory == clientConnectionFactory) {
return this;
} else {
return newInstance(connectionBuilder, clientConnectionFactory, clientExecutor, runtime);
}
}
public ClientConnectionExecutorService getClientConnectionExecutor() {
return clientExecutor;
}
public Builder setClientConnectionExecutor(
ClientConnectionExecutorService clientExecutor) {
if (this.clientExecutor == clientExecutor) {
return this;
} else {
return newInstance(connectionBuilder, clientConnectionFactory, clientExecutor, runtime);
}
}
@Override
public Builder setDefaults() {
checkState(getRuntimeModule() != null);
if (this.connectionBuilder == null) {
return setConnectionBuilder(getDefaultClientConnectionFactoryBuilder()).setDefaults();
}
ClientConnectionFactoryBuilder connectionBuilder = this.connectionBuilder.setDefaults();
if (this.connectionBuilder != connectionBuilder) {
return setConnectionBuilder(connectionBuilder).setDefaults();
}
if (clientConnectionFactory == null) {
return setClientConnectionFactory(getDefaultClientConnectionFactory()).setDefaults();
}
if (clientExecutor == null) {
return setClientConnectionExecutor(getDefaultClientConnectionExecutorService()).setDefaults();
}
return this;
}
@Override
public List<Service> build() {
return setDefaults().getServices();
}
protected Builder newInstance(
ClientConnectionFactoryBuilder connectionBuilder,
ClientConnectionFactory<? extends ProtocolCodecConnection<Operation.Request, AssignXidCodec, Connection<Operation.Request>>> clientConnectionFactory,
ClientConnectionExecutorService clientExecutor,
RuntimeModule runtime) {
return new Builder(connectionBuilder, clientConnectionFactory, clientExecutor, runtime);
}
protected ClientConnectionFactoryBuilder getDefaultClientConnectionFactoryBuilder() {
return ClientConnectionFactoryBuilder.defaults().setRuntimeModule(getRuntimeModule()).setDefaults();
}
protected ClientConnectionFactory<? extends ProtocolCodecConnection<Operation.Request, AssignXidCodec, Connection<Operation.Request>>> getDefaultClientConnectionFactory() {
return getConnectionBuilder().build();
}
protected EnsembleView<ServerInetAddressView> getDefaultEnsemble() {
return ConfigurableEnsembleView.get(getRuntimeModule().getConfiguration());
}
protected ClientConnectionExecutorService getDefaultClientConnectionExecutorService() {
EnsembleViewFactory<? extends ServerViewFactory<Session, ?>> ensembleFactory =
EnsembleViewFactory.fromSession(
getClientConnectionFactory(),
getDefaultEnsemble(),
getConnectionBuilder().getTimeOut(),
getRuntimeModule().getExecutors().get(ScheduledExecutorService.class));
ClientConnectionExecutorService service =
ClientConnectionExecutorService.newInstance(
ensembleFactory);
return service;
}
protected List<Service> getServices() {
return Lists.<Service>newArrayList(
getClientConnectionFactory(),
getClientConnectionExecutor());
}
}
protected final Logger logger;
protected final Executor executor;
protected final EnsembleViewFactory<? extends ServerViewFactory<Session, ? extends ClientConnectionExecutor<?>>> factory;
protected final Set<Object> handlers;
protected final Queue<Object> events;
protected final Client client;
protected ClientConnectionExecutorService(
EnsembleViewFactory<? extends ServerViewFactory<Session, ? extends ClientConnectionExecutor<?>>> factory) {
this.logger = LogManager.getLogger(getClass());
this.factory = factory;
this.handlers = Collections.synchronizedSet(Sets.newHashSet());
this.events = Queues.newConcurrentLinkedQueue();
this.executor = MoreExecutors.sameThreadExecutor();
this.client = new Client();
}
@Override
public ListenableFuture<ClientConnectionExecutor<?>> get() {
return client;
}
@Override
public ListenableFuture<Message.ServerResponse<?>> submit(Operation.Request request) {
if (isRunning()) {
try {
return get().get().submit(request);
} catch (Exception e) {
return Futures.immediateFailedFuture(e);
}
} else {
throw new IllegalStateException(state().toString());
}
}
@Override
public ListenableFuture<Message.ServerResponse<?>> submit(Operation.Request request, Promise<Message.ServerResponse<?>> promise) {
if (isRunning()) {
try {
return get().get().submit(request, promise);
} catch (Exception e) {
return Futures.immediateFailedFuture(e);
}
} else {
throw new IllegalStateException(state().toString());
}
}
@Override
public synchronized void post(Object event) {
if (!client.isDone() || !events.isEmpty()) {
events.add(event);
} else {
ClientConnectionExecutor<?> client;
try {
client = this.client.get(0, TimeUnit.MILLISECONDS);
} catch (Exception e) {
events.add(event);
return;
}
client.post(event);
}
}
@Override
public synchronized void register(Object handler) {
handlers.add(handler);
if (client.isDone()) {
try {
client.get(0, TimeUnit.MILLISECONDS).register(handler);
} catch (Exception e) {
}
}
}
@Override
public synchronized void unregister(Object handler) {
handlers.remove(handler);
if (client.isDone()) {
try {
client.get(0, TimeUnit.MILLISECONDS).unregister(handler);
} catch (Exception e) {
}
}
}
@Override
public synchronized void onSuccess(ClientConnectionExecutor<?> result) {
try {
synchronized (handlers) {
for (Object handler: handlers) {
result.register(handler);
}
}
Object event;
while ((event = events.poll()) != null) {
result.post(event);
}
} catch (Exception e) {
// TODO
onFailure(e);
}
}
@Override
public void onFailure(Throwable t) {
// TODO
stopAsync();
}
@Override
protected void startUp() throws Exception {
client.run();
client.get();
}
@Override
protected synchronized void shutDown() throws Exception {
try {
if (client.isDone()) {
if (((client.get().get().codec().state().compareTo(ProtocolState.CONNECTED)) <= 0) &&
(client.get().get().state().compareTo(Connection.State.CONNECTION_CLOSING) < 0)) {
ListenableFuture<Message.ServerResponse<?>> future = client.get().submit(Operations.Requests.disconnect().build());
int timeOut = client.get().session().get().getTimeOut();
if (timeOut > 0) {
future.get(timeOut, TimeUnit.MILLISECONDS);
} else {
future.get();
}
}
}
} finally {
try {
client.get().stop();
} catch (Exception e) {}
client.cancel(true);
handlers.clear();
events.clear();
}
}
protected class Client extends ForwardingPromise<ClientConnectionExecutor<?>> implements Runnable {
protected volatile ServerInetAddressView server;
protected volatile ListenableFuture<? extends ClientConnectionExecutor<?>> future;
protected volatile Promise<ClientConnectionExecutor<?>> promise;
public Client() {
this.server = null;
this.future = null;
this.promise = newPromise();
}
protected Promise<ClientConnectionExecutor<?>> newPromise() {
return LoggingPromise.create(logger, SettableFuturePromise.<ClientConnectionExecutor<?>>create());
}
@Override
public synchronized boolean cancel(boolean mayInterruptIfRunning) {
if (future != null) {
future.cancel(mayInterruptIfRunning);
}
return super.cancel(mayInterruptIfRunning);
}
@Override
public synchronized boolean set(ClientConnectionExecutor<?> value) {
if (! isDone()) {
new Handler(value);
ClientConnectionExecutorService.this.onSuccess(value);
return super.set(value);
}
return false;
}
@Override
public synchronized void run() {
switch (state()) {
case STOPPING:
case TERMINATED:
case FAILED:
return;
default:
break;
}
if (future == null) {
if (! isCancelled()) {
if (server == null) {
server = factory.select();
}
if (isDone()) {
try {
if (get().session().isDone()) {
ConnectMessage.Response session = get().session().get();
if (session instanceof ConnectMessage.Response.Valid) {
future = factory.get(server).get(session.toSession());
}
}
} catch (Exception e) {
future = null;
}
promise = newPromise();
}
if (future == null) {
future = factory.get(server).get();
}
future.addListener(this, executor);
}
return;
}
if (future.isDone()) {
if (! isDone()) {
if (future.isCancelled()) {
cancel(true);
} else {
try {
ClientConnectionExecutor<?> connection = future.get();
if (connection.session().isDone()) {
ConnectMessage.Response session = connection.session().get();
if (session instanceof ConnectMessage.Response.Valid) {
set(connection);
return;
} else {
// try again with a new session
future = null;
run();
return;
}
} else {
connection.session().addListener(this, executor);
return;
}
} catch (ExecutionException e) {
logger.warn("Error connecting to {}", server, e.getCause());
if (factory.view().size() > 1) {
ServerInetAddressView prevServer = server;
do {
server = factory.select();
} while (server.equals(prevServer));
future = null;
run();
return;
} else {
setException(e.getCause());
}
} catch (InterruptedException e) {
setException(e);
}
}
}
}
}
@Override
protected Promise<ClientConnectionExecutor<?>> delegate() {
return promise;
}
protected class Handler {
protected final ClientConnectionExecutor<?> instance;
public Handler(ClientConnectionExecutor<?> instance) {
this.instance = instance;
instance.register(this);
}
@Subscribe
public void handleStateEvent(Automaton.Transition<?> event) {
if (Connection.State.CONNECTION_CLOSED == event.to()) {
synchronized (Client.this) {
if (isDone() && !isCancelled()) {
try {
if (get() == instance) {
future = null;
run();
}
} catch (Exception e) {}
}
}
try {
instance.unregister(this);
} catch (IllegalArgumentException e) {}
}
}
}
}
}
| added backoff when reconnecting
| zkclient/src/main/java/edu/uw/zookeeper/client/ClientConnectionExecutorService.java | added backoff when reconnecting | <ide><path>kclient/src/main/java/edu/uw/zookeeper/client/ClientConnectionExecutorService.java
<ide>
<ide> import static com.google.common.base.Preconditions.checkState;
<ide>
<add>import java.nio.channels.ClosedChannelException;
<ide> import java.util.Collections;
<ide> import java.util.List;
<ide> import java.util.Queue;
<add>import java.util.Random;
<ide> import java.util.Set;
<add>import java.util.concurrent.CancellationException;
<ide> import java.util.concurrent.ExecutionException;
<ide> import java.util.concurrent.Executor;
<ide> import java.util.concurrent.ScheduledExecutorService;
<ide> if (isDone()) {
<ide> try {
<ide> if (get().session().isDone()) {
<del> ConnectMessage.Response session = get().session().get();
<del> if (session instanceof ConnectMessage.Response.Valid) {
<del> future = factory.get(server).get(session.toSession());
<add> ConnectMessage.Response response = get().session().get();
<add> if (response instanceof ConnectMessage.Response.Valid) {
<add> backoff();
<add> Session session = response.toSession();
<add> logger.info("Reconnecting session {} to {}", session, server);
<add> future = factory.get(server).get(session);
<ide> }
<ide> }
<ide> } catch (Exception e) {
<ide> promise = newPromise();
<ide> }
<ide> if (future == null) {
<add> logger.info("Connecting new session to {}", server);
<ide> future = factory.get(server).get();
<ide> }
<ide> future.addListener(this, executor);
<ide> try {
<ide> ClientConnectionExecutor<?> connection = future.get();
<ide> if (connection.session().isDone()) {
<del> ConnectMessage.Response session = connection.session().get();
<add> ConnectMessage.Response session;
<add> try {
<add> session = connection.session().get();
<add> } catch (CancellationException e) {
<add> throw new ExecutionException(e);
<add> }
<ide> if (session instanceof ConnectMessage.Response.Valid) {
<ide> set(connection);
<ide> return;
<ide> }
<ide> }
<ide> }
<add>
<add> protected void backoff() throws InterruptedException {
<add> // it seems that when the ensemble is undergoing election
<add> // that connections may be refused
<add> // so we'll wait a little while before trying to connect
<add> Random random = new Random();
<add> int millis = random.nextInt(1000) + 1000;
<add> Thread.sleep(millis);
<add> }
<ide>
<ide> @Override
<ide> protected Promise<ClientConnectionExecutor<?>> delegate() {
<ide> public void handleStateEvent(Automaton.Transition<?> event) {
<ide> if (Connection.State.CONNECTION_CLOSED == event.to()) {
<ide> synchronized (Client.this) {
<del> if (isDone() && !isCancelled()) {
<del> try {
<del> if (get() == instance) {
<del> future = null;
<del> run();
<del> }
<del> } catch (Exception e) {}
<add> if (isRunning()) {
<add> logger.warn("Connection closed to {}", server);
<add> if (factory.view().size() > 1) {
<add> ServerInetAddressView prevServer = server;
<add> do {
<add> server = factory.select();
<add> } while (server.equals(prevServer));
<add> future = null;
<add> run();
<add> return;
<add> } else {
<add> setException(new ClosedChannelException());
<add> }
<ide> }
<ide> }
<ide> try { |
|
Java | apache-2.0 | error: pathspec 'src/main/java/org/realityforge/replicant/example/server/service/tyrelll/SubscriptionServiceEJB.java' did not match any file(s) known to git
| ffbc3eae5e384a2c6e598123d88c717521a8d07e | 1 | realityforge/replicant-example,realityforge/replicant-example,realityforge/replicant-example | package org.realityforge.replicant.example.server.service.tyrelll;
import java.util.Collection;
import java.util.LinkedList;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import javax.ejb.Stateless;
import org.realityforge.replicant.example.server.entity.tyrell.Building;
import org.realityforge.replicant.example.server.service.tyrell.SubscriptionService;
import org.realityforge.replicant.example.server.service.tyrelll.replicate.Change;
import org.realityforge.replicant.example.server.service.tyrelll.replicate.ChangeQueue;
import org.realityforge.replicant.server.EntityMessage;
@Stateless
public class SubscriptionServiceEJB
implements SubscriptionService, ChangeQueue
{
@Nullable
@Override
public String poll( final int lastKnownChangeSetID, @Nonnull final String clientID )
{
return null;
}
@Override
@Nonnull
public String subscribeToBuilding( @Nonnull final String designator, @Nonnull final Building building )
{
return "";
}
@Override
public void unsubscribeFromBuilding( @Nonnull final String clientID, @Nonnull final Building building )
{
}
@Override
public void saveEntityMessages( @Nonnull final Collection<EntityMessage> messages )
{
}
@Override
public void routeMessages( @Nonnull final LinkedList<Change> changes )
{
}
}
| src/main/java/org/realityforge/replicant/example/server/service/tyrelll/SubscriptionServiceEJB.java | Add empty subscription service
| src/main/java/org/realityforge/replicant/example/server/service/tyrelll/SubscriptionServiceEJB.java | Add empty subscription service | <ide><path>rc/main/java/org/realityforge/replicant/example/server/service/tyrelll/SubscriptionServiceEJB.java
<add>package org.realityforge.replicant.example.server.service.tyrelll;
<add>
<add>import java.util.Collection;
<add>import java.util.LinkedList;
<add>import javax.annotation.Nonnull;
<add>import javax.annotation.Nullable;
<add>import javax.ejb.Stateless;
<add>import org.realityforge.replicant.example.server.entity.tyrell.Building;
<add>import org.realityforge.replicant.example.server.service.tyrell.SubscriptionService;
<add>import org.realityforge.replicant.example.server.service.tyrelll.replicate.Change;
<add>import org.realityforge.replicant.example.server.service.tyrelll.replicate.ChangeQueue;
<add>import org.realityforge.replicant.server.EntityMessage;
<add>
<add>@Stateless
<add>public class SubscriptionServiceEJB
<add> implements SubscriptionService, ChangeQueue
<add>{
<add> @Nullable
<add> @Override
<add> public String poll( final int lastKnownChangeSetID, @Nonnull final String clientID )
<add> {
<add> return null;
<add> }
<add>
<add> @Override
<add> @Nonnull
<add> public String subscribeToBuilding( @Nonnull final String designator, @Nonnull final Building building )
<add> {
<add> return "";
<add> }
<add>
<add> @Override
<add> public void unsubscribeFromBuilding( @Nonnull final String clientID, @Nonnull final Building building )
<add> {
<add> }
<add>
<add> @Override
<add> public void saveEntityMessages( @Nonnull final Collection<EntityMessage> messages )
<add> {
<add>
<add> }
<add>
<add> @Override
<add> public void routeMessages( @Nonnull final LinkedList<Change> changes )
<add> {
<add> }
<add>} |
|
Java | apache-2.0 | ffa160ddb824cbcb8ab6b10ee1414507686e3c63 | 0 | dierobotsdie/hadoop,bitmybytes/hadoop,xiao-chen/hadoop,wenxinhe/hadoop,ChetnaChaudhari/hadoop,apurtell/hadoop,plusplusjiajia/hadoop,soumabrata-chakraborty/hadoop,wwjiang007/hadoop,szegedim/hadoop,szegedim/hadoop,steveloughran/hadoop,dierobotsdie/hadoop,dennishuo/hadoop,lukmajercak/hadoop,steveloughran/hadoop,dennishuo/hadoop,legend-hua/hadoop,Ethanlm/hadoop,ChetnaChaudhari/hadoop,wwjiang007/hadoop,bitmybytes/hadoop,wwjiang007/hadoop,lukmajercak/hadoop,wwjiang007/hadoop,lukmajercak/hadoop,GeLiXin/hadoop,ctrezzo/hadoop,JingchengDu/hadoop,GeLiXin/hadoop,bitmybytes/hadoop,ctrezzo/hadoop,ucare-uchicago/hadoop,steveloughran/hadoop,979969786/hadoop,wwjiang007/hadoop,wenxinhe/hadoop,littlezhou/hadoop,plusplusjiajia/hadoop,dennishuo/hadoop,bitmybytes/hadoop,plusplusjiajia/hadoop,GeLiXin/hadoop,steveloughran/hadoop,legend-hua/hadoop,JingchengDu/hadoop,xiao-chen/hadoop,Ethanlm/hadoop,ChetnaChaudhari/hadoop,apurtell/hadoop,wwjiang007/hadoop,979969786/hadoop,WIgor/hadoop,szegedim/hadoop,mapr/hadoop-common,littlezhou/hadoop,ucare-uchicago/hadoop,ChetnaChaudhari/hadoop,dennishuo/hadoop,legend-hua/hadoop,mapr/hadoop-common,apurtell/hadoop,979969786/hadoop,ChetnaChaudhari/hadoop,ronny-macmaster/hadoop,JingchengDu/hadoop,apache/hadoop,apache/hadoop,dennishuo/hadoop,ctrezzo/hadoop,ucare-uchicago/hadoop,plusplusjiajia/hadoop,ucare-uchicago/hadoop,soumabrata-chakraborty/hadoop,979969786/hadoop,WIgor/hadoop,huafengw/hadoop,mapr/hadoop-common,WIgor/hadoop,soumabrata-chakraborty/hadoop,bitmybytes/hadoop,ronny-macmaster/hadoop,Ethanlm/hadoop,Ethanlm/hadoop,bitmybytes/hadoop,legend-hua/hadoop,dierobotsdie/hadoop,apurtell/hadoop,steveloughran/hadoop,979969786/hadoop,apache/hadoop,WIgor/hadoop,ctrezzo/hadoop,apache/hadoop,dierobotsdie/hadoop,GeLiXin/hadoop,apache/hadoop,huafengw/hadoop,xiao-chen/hadoop,WIgor/hadoop,wenxinhe/hadoop,ucare-uchicago/hadoop,steveloughran/hadoop,soumabrata-chakraborty/hadoop,lukmajercak/hadoop,mapr/hadoop-common,wenxinhe/hadoop,xiao-chen/hadoop,nandakumar131/hadoop,szegedim/hadoop,plusplusjiajia/hadoop,soumabrata-chakraborty/hadoop,ucare-uchicago/hadoop,littlezhou/hadoop,dennishuo/hadoop,979969786/hadoop,mapr/hadoop-common,nandakumar131/hadoop,dennishuo/hadoop,ChetnaChaudhari/hadoop,wenxinhe/hadoop,JingchengDu/hadoop,GeLiXin/hadoop,ronny-macmaster/hadoop,nandakumar131/hadoop,ronny-macmaster/hadoop,littlezhou/hadoop,WIgor/hadoop,huafengw/hadoop,ronny-macmaster/hadoop,wenxinhe/hadoop,Ethanlm/hadoop,ronny-macmaster/hadoop,lukmajercak/hadoop,JingchengDu/hadoop,plusplusjiajia/hadoop,szegedim/hadoop,xiao-chen/hadoop,nandakumar131/hadoop,lukmajercak/hadoop,GeLiXin/hadoop,legend-hua/hadoop,huafengw/hadoop,szegedim/hadoop,xiao-chen/hadoop,JingchengDu/hadoop,apache/hadoop,soumabrata-chakraborty/hadoop,apurtell/hadoop,huafengw/hadoop,littlezhou/hadoop,dierobotsdie/hadoop,ucare-uchicago/hadoop,ctrezzo/hadoop,apurtell/hadoop,nandakumar131/hadoop,lukmajercak/hadoop,huafengw/hadoop,ChetnaChaudhari/hadoop,wwjiang007/hadoop,legend-hua/hadoop,apurtell/hadoop,soumabrata-chakraborty/hadoop,ctrezzo/hadoop,JingchengDu/hadoop,979969786/hadoop,dierobotsdie/hadoop,plusplusjiajia/hadoop,littlezhou/hadoop,Ethanlm/hadoop,nandakumar131/hadoop,szegedim/hadoop,ronny-macmaster/hadoop,littlezhou/hadoop,bitmybytes/hadoop,Ethanlm/hadoop,mapr/hadoop-common,apache/hadoop,nandakumar131/hadoop,GeLiXin/hadoop,mapr/hadoop-common,wenxinhe/hadoop,dierobotsdie/hadoop,legend-hua/hadoop,WIgor/hadoop,ctrezzo/hadoop,xiao-chen/hadoop,huafengw/hadoop,steveloughran/hadoop | /**
* 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.
*/
package org.apache.hadoop.hdfs.server.datanode;
import static org.apache.hadoop.hdfs.server.datanode.DataNode.DN_CLIENTTRACE_FORMAT;
import java.io.BufferedOutputStream;
import java.io.Closeable;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.EOFException;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.io.Writer;
import java.nio.ByteBuffer;
import java.util.Arrays;
import java.util.LinkedList;
import java.util.zip.Checksum;
import org.apache.commons.logging.Log;
import org.apache.hadoop.fs.ChecksumException;
import org.apache.hadoop.fs.FSOutputSummer;
import org.apache.hadoop.fs.StorageType;
import org.apache.hadoop.hdfs.DFSUtilClient;
import org.apache.hadoop.hdfs.protocol.DatanodeInfo;
import org.apache.hadoop.hdfs.protocol.ExtendedBlock;
import org.apache.hadoop.hdfs.protocol.datatransfer.BlockConstructionStage;
import org.apache.hadoop.hdfs.protocol.datatransfer.PacketHeader;
import org.apache.hadoop.hdfs.protocol.datatransfer.PacketReceiver;
import org.apache.hadoop.hdfs.protocol.datatransfer.PipelineAck;
import org.apache.hadoop.hdfs.protocol.proto.DataTransferProtos.BlockOpResponseProto;
import org.apache.hadoop.hdfs.protocol.proto.DataTransferProtos.Status;
import org.apache.hadoop.hdfs.server.datanode.fsdataset.ReplicaInputStreams;
import org.apache.hadoop.hdfs.server.datanode.fsdataset.ReplicaOutputStreams;
import org.apache.hadoop.hdfs.server.datanode.metrics.DataNodePeerMetrics;
import org.apache.hadoop.hdfs.server.protocol.DatanodeRegistration;
import org.apache.hadoop.hdfs.util.DataTransferThrottler;
import org.apache.hadoop.io.IOUtils;
import org.apache.hadoop.util.Daemon;
import org.apache.hadoop.util.DataChecksum;
import org.apache.hadoop.util.StringUtils;
import org.apache.hadoop.util.Time;
import org.apache.htrace.core.Span;
import org.apache.htrace.core.Tracer;
import static org.apache.hadoop.io.nativeio.NativeIO.POSIX.POSIX_FADV_DONTNEED;
import static org.apache.hadoop.io.nativeio.NativeIO.POSIX.SYNC_FILE_RANGE_WRITE;
import com.google.common.annotations.VisibleForTesting;
import org.slf4j.Logger;
/** A class that receives a block and writes to its own disk, meanwhile
* may copies it to another site. If a throttler is provided,
* streaming throttling is also supported.
**/
class BlockReceiver implements Closeable {
public static final Logger LOG = DataNode.LOG;
static final Log ClientTraceLog = DataNode.ClientTraceLog;
@VisibleForTesting
static long CACHE_DROP_LAG_BYTES = 8 * 1024 * 1024;
private final long datanodeSlowLogThresholdMs;
private DataInputStream in = null; // from where data are read
private DataChecksum clientChecksum; // checksum used by client
private DataChecksum diskChecksum; // checksum we write to disk
/**
* In the case that the client is writing with a different
* checksum polynomial than the block is stored with on disk,
* the DataNode needs to recalculate checksums before writing.
*/
private final boolean needsChecksumTranslation;
private DataOutputStream checksumOut = null; // to crc file at local disk
private final int bytesPerChecksum;
private final int checksumSize;
private final PacketReceiver packetReceiver = new PacketReceiver(false);
protected final String inAddr;
protected final String myAddr;
private String mirrorAddr;
private String mirrorNameForMetrics;
private DataOutputStream mirrorOut;
private Daemon responder = null;
private DataTransferThrottler throttler;
private ReplicaOutputStreams streams;
private DatanodeInfo srcDataNode = null;
private final DataNode datanode;
volatile private boolean mirrorError;
// Cache management state
private boolean dropCacheBehindWrites;
private long lastCacheManagementOffset = 0;
private boolean syncBehindWrites;
private boolean syncBehindWritesInBackground;
/** The client name. It is empty if a datanode is the client */
private final String clientname;
private final boolean isClient;
private final boolean isDatanode;
/** the block to receive */
private final ExtendedBlock block;
/** the replica to write */
private ReplicaInPipeline replicaInfo;
/** pipeline stage */
private final BlockConstructionStage stage;
private final boolean isTransfer;
private boolean isPenultimateNode = false;
private boolean syncOnClose;
private long restartBudget;
/** the reference of the volume where the block receiver writes to */
private ReplicaHandler replicaHandler;
/**
* for replaceBlock response
*/
private final long responseInterval;
private long lastResponseTime = 0;
private boolean isReplaceBlock = false;
private DataOutputStream replyOut = null;
private long maxWriteToDiskMs = 0;
private boolean pinning;
private long lastSentTime;
private long maxSendIdleTime;
BlockReceiver(final ExtendedBlock block, final StorageType storageType,
final DataInputStream in,
final String inAddr, final String myAddr,
final BlockConstructionStage stage,
final long newGs, final long minBytesRcvd, final long maxBytesRcvd,
final String clientname, final DatanodeInfo srcDataNode,
final DataNode datanode, DataChecksum requestedChecksum,
CachingStrategy cachingStrategy,
final boolean allowLazyPersist,
final boolean pinning) throws IOException {
try{
this.block = block;
this.in = in;
this.inAddr = inAddr;
this.myAddr = myAddr;
this.srcDataNode = srcDataNode;
this.datanode = datanode;
this.clientname = clientname;
this.isDatanode = clientname.length() == 0;
this.isClient = !this.isDatanode;
this.restartBudget = datanode.getDnConf().restartReplicaExpiry;
this.datanodeSlowLogThresholdMs =
datanode.getDnConf().getSlowIoWarningThresholdMs();
// For replaceBlock() calls response should be sent to avoid socketTimeout
// at clients. So sending with the interval of 0.5 * socketTimeout
final long readTimeout = datanode.getDnConf().socketTimeout;
this.responseInterval = (long) (readTimeout * 0.5);
//for datanode, we have
//1: clientName.length() == 0, and
//2: stage == null or PIPELINE_SETUP_CREATE
this.stage = stage;
this.isTransfer = stage == BlockConstructionStage.TRANSFER_RBW
|| stage == BlockConstructionStage.TRANSFER_FINALIZED;
this.pinning = pinning;
this.lastSentTime = Time.monotonicNow();
// Downstream will timeout in readTimeout on receiving the next packet.
// If there is no data traffic, a heartbeat packet is sent at
// the interval of 0.5*readTimeout. Here, we set 0.9*readTimeout to be
// the threshold for detecting congestion.
this.maxSendIdleTime = (long) (readTimeout * 0.9);
if (LOG.isDebugEnabled()) {
LOG.debug(getClass().getSimpleName() + ": " + block
+ "\n storageType=" + storageType + ", inAddr=" + inAddr
+ ", myAddr=" + myAddr + "\n stage=" + stage + ", newGs=" + newGs
+ ", minBytesRcvd=" + minBytesRcvd
+ ", maxBytesRcvd=" + maxBytesRcvd + "\n clientname=" + clientname
+ ", srcDataNode=" + srcDataNode
+ ", datanode=" + datanode.getDisplayName()
+ "\n requestedChecksum=" + requestedChecksum
+ "\n cachingStrategy=" + cachingStrategy
+ "\n allowLazyPersist=" + allowLazyPersist + ", pinning=" + pinning
+ ", isClient=" + isClient + ", isDatanode=" + isDatanode
+ ", responseInterval=" + responseInterval
);
}
//
// Open local disk out
//
if (isDatanode) { //replication or move
replicaHandler = datanode.data.createTemporary(storageType, block);
} else {
switch (stage) {
case PIPELINE_SETUP_CREATE:
replicaHandler = datanode.data.createRbw(storageType, block, allowLazyPersist);
datanode.notifyNamenodeReceivingBlock(
block, replicaHandler.getReplica().getStorageUuid());
break;
case PIPELINE_SETUP_STREAMING_RECOVERY:
replicaHandler = datanode.data.recoverRbw(
block, newGs, minBytesRcvd, maxBytesRcvd);
block.setGenerationStamp(newGs);
break;
case PIPELINE_SETUP_APPEND:
replicaHandler = datanode.data.append(block, newGs, minBytesRcvd);
block.setGenerationStamp(newGs);
datanode.notifyNamenodeReceivingBlock(
block, replicaHandler.getReplica().getStorageUuid());
break;
case PIPELINE_SETUP_APPEND_RECOVERY:
replicaHandler = datanode.data.recoverAppend(block, newGs, minBytesRcvd);
block.setGenerationStamp(newGs);
datanode.notifyNamenodeReceivingBlock(
block, replicaHandler.getReplica().getStorageUuid());
break;
case TRANSFER_RBW:
case TRANSFER_FINALIZED:
// this is a transfer destination
replicaHandler =
datanode.data.createTemporary(storageType, block);
break;
default: throw new IOException("Unsupported stage " + stage +
" while receiving block " + block + " from " + inAddr);
}
}
replicaInfo = replicaHandler.getReplica();
this.dropCacheBehindWrites = (cachingStrategy.getDropBehind() == null) ?
datanode.getDnConf().dropCacheBehindWrites :
cachingStrategy.getDropBehind();
this.syncBehindWrites = datanode.getDnConf().syncBehindWrites;
this.syncBehindWritesInBackground = datanode.getDnConf().
syncBehindWritesInBackground;
final boolean isCreate = isDatanode || isTransfer
|| stage == BlockConstructionStage.PIPELINE_SETUP_CREATE;
streams = replicaInfo.createStreams(isCreate, requestedChecksum);
assert streams != null : "null streams!";
// read checksum meta information
this.clientChecksum = requestedChecksum;
this.diskChecksum = streams.getChecksum();
this.needsChecksumTranslation = !clientChecksum.equals(diskChecksum);
this.bytesPerChecksum = diskChecksum.getBytesPerChecksum();
this.checksumSize = diskChecksum.getChecksumSize();
this.checksumOut = new DataOutputStream(new BufferedOutputStream(
streams.getChecksumOut(), DFSUtilClient.getSmallBufferSize(
datanode.getConf())));
// write data chunk header if creating a new replica
if (isCreate) {
BlockMetadataHeader.writeHeader(checksumOut, diskChecksum);
}
} catch (ReplicaAlreadyExistsException bae) {
throw bae;
} catch (ReplicaNotFoundException bne) {
throw bne;
} catch(IOException ioe) {
if (replicaInfo != null) {
replicaInfo.releaseAllBytesReserved();
}
IOUtils.closeStream(this);
cleanupBlock();
// check if there is a disk error
IOException cause = DatanodeUtil.getCauseIfDiskError(ioe);
DataNode.LOG.warn("IOException in BlockReceiver constructor"
+ (cause == null ? "" : ". Cause is "), cause);
if (cause != null) {
ioe = cause;
// Volume error check moved to FileIoProvider
}
throw ioe;
}
}
/** Return the datanode object. */
DataNode getDataNode() {return datanode;}
Replica getReplica() {
return replicaInfo;
}
/**
* close files and release volume reference.
*/
@Override
public void close() throws IOException {
Span span = Tracer.getCurrentSpan();
if (span != null) {
span.addKVAnnotation("maxWriteToDiskMs",
Long.toString(maxWriteToDiskMs));
}
packetReceiver.close();
IOException ioe = null;
if (syncOnClose && (streams.getDataOut() != null || checksumOut != null)) {
datanode.metrics.incrFsyncCount();
}
long flushTotalNanos = 0;
boolean measuredFlushTime = false;
// close checksum file
try {
if (checksumOut != null) {
long flushStartNanos = System.nanoTime();
checksumOut.flush();
long flushEndNanos = System.nanoTime();
if (syncOnClose) {
long fsyncStartNanos = flushEndNanos;
streams.syncChecksumOut();
datanode.metrics.addFsyncNanos(System.nanoTime() - fsyncStartNanos);
}
flushTotalNanos += flushEndNanos - flushStartNanos;
measuredFlushTime = true;
checksumOut.close();
checksumOut = null;
}
} catch(IOException e) {
ioe = e;
}
finally {
IOUtils.closeStream(checksumOut);
}
// close block file
try {
if (streams.getDataOut() != null) {
long flushStartNanos = System.nanoTime();
streams.flushDataOut();
long flushEndNanos = System.nanoTime();
if (syncOnClose) {
long fsyncStartNanos = flushEndNanos;
streams.syncDataOut();
datanode.metrics.addFsyncNanos(System.nanoTime() - fsyncStartNanos);
}
flushTotalNanos += flushEndNanos - flushStartNanos;
measuredFlushTime = true;
streams.closeDataStream();
}
} catch (IOException e) {
ioe = e;
}
finally{
streams.close();
}
if (replicaHandler != null) {
IOUtils.cleanup(null, replicaHandler);
replicaHandler = null;
}
if (measuredFlushTime) {
datanode.metrics.addFlushNanos(flushTotalNanos);
}
if(ioe != null) {
// Volume error check moved to FileIoProvider
throw ioe;
}
}
synchronized void setLastSentTime(long sentTime) {
lastSentTime = sentTime;
}
/**
* It can return false if
* - upstream did not send packet for a long time
* - a packet was received but got stuck in local disk I/O.
* - a packet was received but got stuck on send to mirror.
*/
synchronized boolean packetSentInTime() {
long diff = Time.monotonicNow() - lastSentTime;
if (diff > maxSendIdleTime) {
LOG.info("A packet was last sent " + diff + " milliseconds ago.");
return false;
}
return true;
}
/**
* Flush block data and metadata files to disk.
* @throws IOException
*/
void flushOrSync(boolean isSync) throws IOException {
long flushTotalNanos = 0;
long begin = Time.monotonicNow();
if (checksumOut != null) {
long flushStartNanos = System.nanoTime();
checksumOut.flush();
long flushEndNanos = System.nanoTime();
if (isSync) {
streams.syncChecksumOut();
datanode.metrics.addFsyncNanos(System.nanoTime() - flushEndNanos);
}
flushTotalNanos += flushEndNanos - flushStartNanos;
}
if (streams.getDataOut() != null) {
long flushStartNanos = System.nanoTime();
streams.flushDataOut();
long flushEndNanos = System.nanoTime();
if (isSync) {
long fsyncStartNanos = flushEndNanos;
streams.syncDataOut();
datanode.metrics.addFsyncNanos(System.nanoTime() - fsyncStartNanos);
}
flushTotalNanos += flushEndNanos - flushStartNanos;
}
if (checksumOut != null || streams.getDataOut() != null) {
datanode.metrics.addFlushNanos(flushTotalNanos);
if (isSync) {
datanode.metrics.incrFsyncCount();
}
}
long duration = Time.monotonicNow() - begin;
if (duration > datanodeSlowLogThresholdMs) {
LOG.warn("Slow flushOrSync took " + duration + "ms (threshold="
+ datanodeSlowLogThresholdMs + "ms), isSync:" + isSync + ", flushTotalNanos="
+ flushTotalNanos + "ns");
}
}
/**
* While writing to mirrorOut, failure to write to mirror should not
* affect this datanode unless it is caused by interruption.
*/
private void handleMirrorOutError(IOException ioe) throws IOException {
String bpid = block.getBlockPoolId();
LOG.info(datanode.getDNRegistrationForBP(bpid)
+ ":Exception writing " + block + " to mirror " + mirrorAddr, ioe);
if (Thread.interrupted()) { // shut down if the thread is interrupted
throw ioe;
} else { // encounter an error while writing to mirror
// continue to run even if can not write to mirror
// notify client of the error
// and wait for the client to shut down the pipeline
mirrorError = true;
}
}
/**
* Verify multiple CRC chunks.
*/
private void verifyChunks(ByteBuffer dataBuf, ByteBuffer checksumBuf)
throws IOException {
try {
clientChecksum.verifyChunkedSums(dataBuf, checksumBuf, clientname, 0);
} catch (ChecksumException ce) {
PacketHeader header = packetReceiver.getHeader();
String specificOffset = "specific offsets are:"
+ " offsetInBlock = " + header.getOffsetInBlock()
+ " offsetInPacket = " + ce.getPos();
LOG.warn("Checksum error in block "
+ block + " from " + inAddr
+ ", " + specificOffset, ce);
// No need to report to namenode when client is writing.
if (srcDataNode != null && isDatanode) {
try {
LOG.info("report corrupt " + block + " from datanode " +
srcDataNode + " to namenode");
datanode.reportRemoteBadBlock(srcDataNode, block);
} catch (IOException e) {
LOG.warn("Failed to report bad " + block +
" from datanode " + srcDataNode + " to namenode");
}
}
throw new IOException("Unexpected checksum mismatch while writing "
+ block + " from " + inAddr);
}
}
/**
* Translate CRC chunks from the client's checksum implementation
* to the disk checksum implementation.
*
* This does not verify the original checksums, under the assumption
* that they have already been validated.
*/
private void translateChunks(ByteBuffer dataBuf, ByteBuffer checksumBuf) {
diskChecksum.calculateChunkedSums(dataBuf, checksumBuf);
}
/**
* Check whether checksum needs to be verified.
* Skip verifying checksum iff this is not the last one in the
* pipeline and clientName is non-null. i.e. Checksum is verified
* on all the datanodes when the data is being written by a
* datanode rather than a client. Whe client is writing the data,
* protocol includes acks and only the last datanode needs to verify
* checksum.
* @return true if checksum verification is needed, otherwise false.
*/
private boolean shouldVerifyChecksum() {
return (mirrorOut == null || isDatanode || needsChecksumTranslation);
}
/**
* Receives and processes a packet. It can contain many chunks.
* returns the number of data bytes that the packet has.
*/
private int receivePacket() throws IOException {
// read the next packet
packetReceiver.receiveNextPacket(in);
PacketHeader header = packetReceiver.getHeader();
if (LOG.isDebugEnabled()){
LOG.debug("Receiving one packet for block " + block +
": " + header);
}
// Sanity check the header
if (header.getOffsetInBlock() > replicaInfo.getNumBytes()) {
throw new IOException("Received an out-of-sequence packet for " + block +
"from " + inAddr + " at offset " + header.getOffsetInBlock() +
". Expecting packet starting at " + replicaInfo.getNumBytes());
}
if (header.getDataLen() < 0) {
throw new IOException("Got wrong length during writeBlock(" + block +
") from " + inAddr + " at offset " +
header.getOffsetInBlock() + ": " +
header.getDataLen());
}
long offsetInBlock = header.getOffsetInBlock();
long seqno = header.getSeqno();
boolean lastPacketInBlock = header.isLastPacketInBlock();
final int len = header.getDataLen();
boolean syncBlock = header.getSyncBlock();
// avoid double sync'ing on close
if (syncBlock && lastPacketInBlock) {
this.syncOnClose = false;
}
// update received bytes
final long firstByteInBlock = offsetInBlock;
offsetInBlock += len;
if (replicaInfo.getNumBytes() < offsetInBlock) {
replicaInfo.setNumBytes(offsetInBlock);
}
// put in queue for pending acks, unless sync was requested
if (responder != null && !syncBlock && !shouldVerifyChecksum()) {
((PacketResponder) responder.getRunnable()).enqueue(seqno,
lastPacketInBlock, offsetInBlock, Status.SUCCESS);
}
// Drop heartbeat for testing.
if (seqno < 0 && len == 0 &&
DataNodeFaultInjector.get().dropHeartbeatPacket()) {
return 0;
}
//First write the packet to the mirror:
if (mirrorOut != null && !mirrorError) {
try {
long begin = Time.monotonicNow();
// For testing. Normally no-op.
DataNodeFaultInjector.get().stopSendingPacketDownstream(mirrorAddr);
packetReceiver.mirrorPacketTo(mirrorOut);
mirrorOut.flush();
long now = Time.monotonicNow();
setLastSentTime(now);
long duration = now - begin;
DataNodeFaultInjector.get().logDelaySendingPacketDownstream(
mirrorAddr,
duration);
trackSendPacketToLastNodeInPipeline(duration);
if (duration > datanodeSlowLogThresholdMs) {
LOG.warn("Slow BlockReceiver write packet to mirror took " + duration
+ "ms (threshold=" + datanodeSlowLogThresholdMs + "ms)");
}
} catch (IOException e) {
handleMirrorOutError(e);
}
}
ByteBuffer dataBuf = packetReceiver.getDataSlice();
ByteBuffer checksumBuf = packetReceiver.getChecksumSlice();
if (lastPacketInBlock || len == 0) {
if(LOG.isDebugEnabled()) {
LOG.debug("Receiving an empty packet or the end of the block " + block);
}
// sync block if requested
if (syncBlock) {
flushOrSync(true);
}
} else {
final int checksumLen = diskChecksum.getChecksumSize(len);
final int checksumReceivedLen = checksumBuf.capacity();
if (checksumReceivedLen > 0 && checksumReceivedLen != checksumLen) {
throw new IOException("Invalid checksum length: received length is "
+ checksumReceivedLen + " but expected length is " + checksumLen);
}
if (checksumReceivedLen > 0 && shouldVerifyChecksum()) {
try {
verifyChunks(dataBuf, checksumBuf);
} catch (IOException ioe) {
// checksum error detected locally. there is no reason to continue.
if (responder != null) {
try {
((PacketResponder) responder.getRunnable()).enqueue(seqno,
lastPacketInBlock, offsetInBlock,
Status.ERROR_CHECKSUM);
// Wait until the responder sends back the response
// and interrupt this thread.
Thread.sleep(3000);
} catch (InterruptedException e) { }
}
throw new IOException("Terminating due to a checksum error." + ioe);
}
if (needsChecksumTranslation) {
// overwrite the checksums in the packet buffer with the
// appropriate polynomial for the disk storage.
translateChunks(dataBuf, checksumBuf);
}
}
if (checksumReceivedLen == 0 && !streams.isTransientStorage()) {
// checksum is missing, need to calculate it
checksumBuf = ByteBuffer.allocate(checksumLen);
diskChecksum.calculateChunkedSums(dataBuf, checksumBuf);
}
// by this point, the data in the buffer uses the disk checksum
final boolean shouldNotWriteChecksum = checksumReceivedLen == 0
&& streams.isTransientStorage();
try {
long onDiskLen = replicaInfo.getBytesOnDisk();
if (onDiskLen<offsetInBlock) {
// Normally the beginning of an incoming packet is aligned with the
// existing data on disk. If the beginning packet data offset is not
// checksum chunk aligned, the end of packet will not go beyond the
// next chunk boundary.
// When a failure-recovery is involved, the client state and the
// the datanode state may not exactly agree. I.e. the client may
// resend part of data that is already on disk. Correct number of
// bytes should be skipped when writing the data and checksum
// buffers out to disk.
long partialChunkSizeOnDisk = onDiskLen % bytesPerChecksum;
long lastChunkBoundary = onDiskLen - partialChunkSizeOnDisk;
boolean alignedOnDisk = partialChunkSizeOnDisk == 0;
boolean alignedInPacket = firstByteInBlock % bytesPerChecksum == 0;
// If the end of the on-disk data is not chunk-aligned, the last
// checksum needs to be overwritten.
boolean overwriteLastCrc = !alignedOnDisk && !shouldNotWriteChecksum;
// If the starting offset of the packat data is at the last chunk
// boundary of the data on disk, the partial checksum recalculation
// can be skipped and the checksum supplied by the client can be used
// instead. This reduces disk reads and cpu load.
boolean doCrcRecalc = overwriteLastCrc &&
(lastChunkBoundary != firstByteInBlock);
// If this is a partial chunk, then verify that this is the only
// chunk in the packet. If the starting offset is not chunk
// aligned, the packet should terminate at or before the next
// chunk boundary.
if (!alignedInPacket && len > bytesPerChecksum) {
throw new IOException("Unexpected packet data length for "
+ block + " from " + inAddr + ": a partial chunk must be "
+ " sent in an individual packet (data length = " + len
+ " > bytesPerChecksum = " + bytesPerChecksum + ")");
}
// If the last portion of the block file is not a full chunk,
// then read in pre-existing partial data chunk and recalculate
// the checksum so that the checksum calculation can continue
// from the right state. If the client provided the checksum for
// the whole chunk, this is not necessary.
Checksum partialCrc = null;
if (doCrcRecalc) {
if (LOG.isDebugEnabled()) {
LOG.debug("receivePacket for " + block
+ ": previous write did not end at the chunk boundary."
+ " onDiskLen=" + onDiskLen);
}
long offsetInChecksum = BlockMetadataHeader.getHeaderSize() +
onDiskLen / bytesPerChecksum * checksumSize;
partialCrc = computePartialChunkCrc(onDiskLen, offsetInChecksum);
}
// The data buffer position where write will begin. If the packet
// data and on-disk data have no overlap, this will not be at the
// beginning of the buffer.
int startByteToDisk = (int)(onDiskLen-firstByteInBlock)
+ dataBuf.arrayOffset() + dataBuf.position();
// Actual number of data bytes to write.
int numBytesToDisk = (int)(offsetInBlock-onDiskLen);
// Write data to disk.
long begin = Time.monotonicNow();
streams.writeDataToDisk(dataBuf.array(),
startByteToDisk, numBytesToDisk);
long duration = Time.monotonicNow() - begin;
if (duration > datanodeSlowLogThresholdMs) {
LOG.warn("Slow BlockReceiver write data to disk cost:" + duration
+ "ms (threshold=" + datanodeSlowLogThresholdMs + "ms)");
}
if (duration > maxWriteToDiskMs) {
maxWriteToDiskMs = duration;
}
final byte[] lastCrc;
if (shouldNotWriteChecksum) {
lastCrc = null;
} else {
int skip = 0;
byte[] crcBytes = null;
// First, prepare to overwrite the partial crc at the end.
if (overwriteLastCrc) { // not chunk-aligned on disk
// prepare to overwrite last checksum
adjustCrcFilePosition();
}
// The CRC was recalculated for the last partial chunk. Update the
// CRC by reading the rest of the chunk, then write it out.
if (doCrcRecalc) {
// Calculate new crc for this chunk.
int bytesToReadForRecalc =
(int)(bytesPerChecksum - partialChunkSizeOnDisk);
if (numBytesToDisk < bytesToReadForRecalc) {
bytesToReadForRecalc = numBytesToDisk;
}
partialCrc.update(dataBuf.array(), startByteToDisk,
bytesToReadForRecalc);
byte[] buf = FSOutputSummer.convertToByteStream(partialCrc,
checksumSize);
crcBytes = copyLastChunkChecksum(buf, checksumSize, buf.length);
checksumOut.write(buf);
if(LOG.isDebugEnabled()) {
LOG.debug("Writing out partial crc for data len " + len +
", skip=" + skip);
}
skip++; // For the partial chunk that was just read.
}
// Determine how many checksums need to be skipped up to the last
// boundary. The checksum after the boundary was already counted
// above. Only count the number of checksums skipped up to the
// boundary here.
long skippedDataBytes = lastChunkBoundary - firstByteInBlock;
if (skippedDataBytes > 0) {
skip += (int)(skippedDataBytes / bytesPerChecksum) +
((skippedDataBytes % bytesPerChecksum == 0) ? 0 : 1);
}
skip *= checksumSize; // Convert to number of bytes
// write the rest of checksum
final int offset = checksumBuf.arrayOffset() +
checksumBuf.position() + skip;
final int end = offset + checksumLen - skip;
// If offset >= end, there is no more checksum to write.
// I.e. a partial chunk checksum rewrite happened and there is no
// more to write after that.
if (offset >= end && doCrcRecalc) {
lastCrc = crcBytes;
} else {
final int remainingBytes = checksumLen - skip;
lastCrc = copyLastChunkChecksum(checksumBuf.array(),
checksumSize, end);
checksumOut.write(checksumBuf.array(), offset, remainingBytes);
}
}
/// flush entire packet, sync if requested
flushOrSync(syncBlock);
replicaInfo.setLastChecksumAndDataLen(offsetInBlock, lastCrc);
datanode.metrics.incrBytesWritten(len);
datanode.metrics.incrTotalWriteTime(duration);
manageWriterOsCache(offsetInBlock);
}
} catch (IOException iex) {
// Volume error check moved to FileIoProvider
throw iex;
}
}
// if sync was requested, put in queue for pending acks here
// (after the fsync finished)
if (responder != null && (syncBlock || shouldVerifyChecksum())) {
((PacketResponder) responder.getRunnable()).enqueue(seqno,
lastPacketInBlock, offsetInBlock, Status.SUCCESS);
}
/*
* Send in-progress responses for the replaceBlock() calls back to caller to
* avoid timeouts due to balancer throttling. HDFS-6247
*/
if (isReplaceBlock
&& (Time.monotonicNow() - lastResponseTime > responseInterval)) {
BlockOpResponseProto.Builder response = BlockOpResponseProto.newBuilder()
.setStatus(Status.IN_PROGRESS);
response.build().writeDelimitedTo(replyOut);
replyOut.flush();
lastResponseTime = Time.monotonicNow();
}
if (throttler != null) { // throttle I/O
throttler.throttle(len);
}
return lastPacketInBlock?-1:len;
}
/**
* Only tracks the latency of sending packet to the last node in pipeline.
* This is a conscious design choice.
* <p>
* In the case of pipeline [dn0, dn1, dn2], 5ms latency from dn0 to dn1, 100ms
* from dn1 to dn2, NameNode claims dn2 is slow since it sees 100ms latency to
* dn2. Note that NameNode is not ware of pipeline structure in this context
* and only sees latency between two DataNodes.
* </p>
* <p>
* In another case of the same pipeline, 100ms latency from dn0 to dn1, 5ms
* from dn1 to dn2, NameNode will miss detecting dn1 being slow since it's not
* the last node. However the assumption is that in a busy enough cluster
* there are many other pipelines where dn1 is the last node, e.g. [dn3, dn4,
* dn1]. Also our tracking interval is relatively long enough (at least an
* hour) to improve the chances of the bad DataNodes being the last nodes in
* multiple pipelines.
* </p>
*/
private void trackSendPacketToLastNodeInPipeline(final long elapsedMs) {
final DataNodePeerMetrics peerMetrics = datanode.getPeerMetrics();
if (peerMetrics != null && isPenultimateNode) {
peerMetrics.addSendPacketDownstream(mirrorNameForMetrics, elapsedMs);
}
}
private static byte[] copyLastChunkChecksum(byte[] array, int size, int end) {
return Arrays.copyOfRange(array, end - size, end);
}
private void manageWriterOsCache(long offsetInBlock) {
try {
if (streams.getOutFd() != null &&
offsetInBlock > lastCacheManagementOffset + CACHE_DROP_LAG_BYTES) {
long begin = Time.monotonicNow();
//
// For SYNC_FILE_RANGE_WRITE, we want to sync from
// lastCacheManagementOffset to a position "two windows ago"
//
// <========= sync ===========>
// +-----------------------O--------------------------X
// start last curPos
// of file
//
if (syncBehindWrites) {
if (syncBehindWritesInBackground) {
this.datanode.getFSDataset().submitBackgroundSyncFileRangeRequest(
block, streams, lastCacheManagementOffset,
offsetInBlock - lastCacheManagementOffset,
SYNC_FILE_RANGE_WRITE);
} else {
streams.syncFileRangeIfPossible(lastCacheManagementOffset,
offsetInBlock - lastCacheManagementOffset,
SYNC_FILE_RANGE_WRITE);
}
}
//
// For POSIX_FADV_DONTNEED, we want to drop from the beginning
// of the file to a position prior to the current position.
//
// <=== drop =====>
// <---W--->
// +--------------+--------O--------------------------X
// start dropPos last curPos
// of file
//
long dropPos = lastCacheManagementOffset - CACHE_DROP_LAG_BYTES;
if (dropPos > 0 && dropCacheBehindWrites) {
streams.dropCacheBehindWrites(block.getBlockName(), 0, dropPos,
POSIX_FADV_DONTNEED);
}
lastCacheManagementOffset = offsetInBlock;
long duration = Time.monotonicNow() - begin;
if (duration > datanodeSlowLogThresholdMs) {
LOG.warn("Slow manageWriterOsCache took " + duration
+ "ms (threshold=" + datanodeSlowLogThresholdMs + "ms)");
}
}
} catch (Throwable t) {
LOG.warn("Error managing cache for writer of block " + block, t);
}
}
public void sendOOB() throws IOException, InterruptedException {
if (isDatanode) {
return;
}
((PacketResponder) responder.getRunnable()).sendOOBResponse(PipelineAck
.getRestartOOBStatus());
}
void receiveBlock(
DataOutputStream mirrOut, // output to next datanode
DataInputStream mirrIn, // input from next datanode
DataOutputStream replyOut, // output to previous datanode
String mirrAddr, DataTransferThrottler throttlerArg,
DatanodeInfo[] downstreams,
boolean isReplaceBlock) throws IOException {
syncOnClose = datanode.getDnConf().syncOnClose;
boolean responderClosed = false;
mirrorOut = mirrOut;
mirrorAddr = mirrAddr;
isPenultimateNode = ((downstreams != null) && (downstreams.length == 1));
if (isPenultimateNode) {
mirrorNameForMetrics = (downstreams[0].getInfoSecurePort() != 0 ?
downstreams[0].getInfoSecureAddr() : downstreams[0].getInfoAddr());
LOG.debug("Will collect peer metrics for downstream node {}",
mirrorNameForMetrics);
}
throttler = throttlerArg;
this.replyOut = replyOut;
this.isReplaceBlock = isReplaceBlock;
try {
if (isClient && !isTransfer) {
responder = new Daemon(datanode.threadGroup,
new PacketResponder(replyOut, mirrIn, downstreams));
responder.start(); // start thread to processes responses
}
while (receivePacket() >= 0) { /* Receive until the last packet */ }
// wait for all outstanding packet responses. And then
// indicate responder to gracefully shutdown.
// Mark that responder has been closed for future processing
if (responder != null) {
((PacketResponder)responder.getRunnable()).close();
responderClosed = true;
}
// If this write is for a replication or transfer-RBW/Finalized,
// then finalize block or convert temporary to RBW.
// For client-writes, the block is finalized in the PacketResponder.
if (isDatanode || isTransfer) {
// Hold a volume reference to finalize block.
try (ReplicaHandler handler = claimReplicaHandler()) {
// close the block/crc files
close();
block.setNumBytes(replicaInfo.getNumBytes());
if (stage == BlockConstructionStage.TRANSFER_RBW) {
// for TRANSFER_RBW, convert temporary to RBW
datanode.data.convertTemporaryToRbw(block);
} else {
// for isDatnode or TRANSFER_FINALIZED
// Finalize the block.
datanode.data.finalizeBlock(block);
}
}
datanode.metrics.incrBlocksWritten();
}
} catch (IOException ioe) {
replicaInfo.releaseAllBytesReserved();
if (datanode.isRestarting()) {
// Do not throw if shutting down for restart. Otherwise, it will cause
// premature termination of responder.
LOG.info("Shutting down for restart (" + block + ").");
} else {
LOG.info("Exception for " + block, ioe);
throw ioe;
}
} finally {
// Clear the previous interrupt state of this thread.
Thread.interrupted();
// If a shutdown for restart was initiated, upstream needs to be notified.
// There is no need to do anything special if the responder was closed
// normally.
if (!responderClosed) { // Data transfer was not complete.
if (responder != null) {
// In case this datanode is shutting down for quick restart,
// send a special ack upstream.
if (datanode.isRestarting() && isClient && !isTransfer) {
try (Writer out = new OutputStreamWriter(
replicaInfo.createRestartMetaStream(), "UTF-8")) {
// write out the current time.
out.write(Long.toString(Time.now() + restartBudget));
out.flush();
} catch (IOException ioe) {
// The worst case is not recovering this RBW replica.
// Client will fall back to regular pipeline recovery.
} finally {
IOUtils.closeStream(streams.getDataOut());
}
try {
// Even if the connection is closed after the ack packet is
// flushed, the client can react to the connection closure
// first. Insert a delay to lower the chance of client
// missing the OOB ack.
Thread.sleep(1000);
} catch (InterruptedException ie) {
// It is already going down. Ignore this.
}
}
responder.interrupt();
}
IOUtils.closeStream(this);
cleanupBlock();
}
if (responder != null) {
try {
responder.interrupt();
// join() on the responder should timeout a bit earlier than the
// configured deadline. Otherwise, the join() on this thread will
// likely timeout as well.
long joinTimeout = datanode.getDnConf().getXceiverStopTimeout();
joinTimeout = joinTimeout > 1 ? joinTimeout*8/10 : joinTimeout;
responder.join(joinTimeout);
if (responder.isAlive()) {
String msg = "Join on responder thread " + responder
+ " timed out";
LOG.warn(msg + "\n" + StringUtils.getStackTrace(responder));
throw new IOException(msg);
}
} catch (InterruptedException e) {
responder.interrupt();
// do not throw if shutting down for restart.
if (!datanode.isRestarting()) {
throw new IOException("Interrupted receiveBlock");
}
}
responder = null;
}
}
}
/** Cleanup a partial block
* if this write is for a replication request (and not from a client)
*/
private void cleanupBlock() throws IOException {
if (isDatanode) {
datanode.data.unfinalizeBlock(block);
}
}
/**
* Adjust the file pointer in the local meta file so that the last checksum
* will be overwritten.
*/
private void adjustCrcFilePosition() throws IOException {
streams.flushDataOut();
if (checksumOut != null) {
checksumOut.flush();
}
// rollback the position of the meta file
datanode.data.adjustCrcChannelPosition(block, streams, checksumSize);
}
/**
* Convert a checksum byte array to a long
*/
static private long checksum2long(byte[] checksum) {
long crc = 0L;
for(int i=0; i<checksum.length; i++) {
crc |= (0xffL&checksum[i])<<((checksum.length-i-1)*8);
}
return crc;
}
/**
* reads in the partial crc chunk and computes checksum
* of pre-existing data in partial chunk.
*/
private Checksum computePartialChunkCrc(long blkoff, long ckoff)
throws IOException {
// find offset of the beginning of partial chunk.
//
int sizePartialChunk = (int) (blkoff % bytesPerChecksum);
blkoff = blkoff - sizePartialChunk;
if (LOG.isDebugEnabled()) {
LOG.debug("computePartialChunkCrc for " + block
+ ": sizePartialChunk=" + sizePartialChunk
+ ", block offset=" + blkoff
+ ", metafile offset=" + ckoff);
}
// create an input stream from the block file
// and read in partial crc chunk into temporary buffer
//
byte[] buf = new byte[sizePartialChunk];
byte[] crcbuf = new byte[checksumSize];
try (ReplicaInputStreams instr =
datanode.data.getTmpInputStreams(block, blkoff, ckoff)) {
instr.readDataFully(buf, 0, sizePartialChunk);
// open meta file and read in crc value computer earlier
instr.readChecksumFully(crcbuf, 0, crcbuf.length);
}
// compute crc of partial chunk from data read in the block file.
final Checksum partialCrc = DataChecksum.newDataChecksum(
diskChecksum.getChecksumType(), diskChecksum.getBytesPerChecksum());
partialCrc.update(buf, 0, sizePartialChunk);
if (LOG.isDebugEnabled()) {
LOG.debug("Read in partial CRC chunk from disk for " + block);
}
// paranoia! verify that the pre-computed crc matches what we
// recalculated just now
if (partialCrc.getValue() != checksum2long(crcbuf)) {
String msg = "Partial CRC " + partialCrc.getValue() +
" does not match value computed the " +
" last time file was closed " +
checksum2long(crcbuf);
throw new IOException(msg);
}
return partialCrc;
}
/** The caller claims the ownership of the replica handler. */
private ReplicaHandler claimReplicaHandler() {
ReplicaHandler handler = replicaHandler;
replicaHandler = null;
return handler;
}
private static enum PacketResponderType {
NON_PIPELINE, LAST_IN_PIPELINE, HAS_DOWNSTREAM_IN_PIPELINE
}
/**
* Processes responses from downstream datanodes in the pipeline
* and sends back replies to the originator.
*/
class PacketResponder implements Runnable, Closeable {
/** queue for packets waiting for ack - synchronization using monitor lock */
private final LinkedList<Packet> ackQueue = new LinkedList<Packet>();
/** the thread that spawns this responder */
private final Thread receiverThread = Thread.currentThread();
/** is this responder running? - synchronization using monitor lock */
private volatile boolean running = true;
/** input from the next downstream datanode */
private final DataInputStream downstreamIn;
/** output to upstream datanode/client */
private final DataOutputStream upstreamOut;
/** The type of this responder */
private final PacketResponderType type;
/** for log and error messages */
private final String myString;
private boolean sending = false;
@Override
public String toString() {
return myString;
}
PacketResponder(final DataOutputStream upstreamOut,
final DataInputStream downstreamIn, final DatanodeInfo[] downstreams) {
this.downstreamIn = downstreamIn;
this.upstreamOut = upstreamOut;
this.type = downstreams == null? PacketResponderType.NON_PIPELINE
: downstreams.length == 0? PacketResponderType.LAST_IN_PIPELINE
: PacketResponderType.HAS_DOWNSTREAM_IN_PIPELINE;
final StringBuilder b = new StringBuilder(getClass().getSimpleName())
.append(": ").append(block).append(", type=").append(type);
if (type == PacketResponderType.HAS_DOWNSTREAM_IN_PIPELINE) {
b.append(", downstreams=").append(downstreams.length)
.append(":").append(Arrays.asList(downstreams));
}
this.myString = b.toString();
}
private boolean isRunning() {
// When preparing for a restart, it should continue to run until
// interrupted by the receiver thread.
return running && (datanode.shouldRun || datanode.isRestarting());
}
/**
* enqueue the seqno that is still be to acked by the downstream datanode.
* @param seqno sequence number of the packet
* @param lastPacketInBlock if true, this is the last packet in block
* @param offsetInBlock offset of this packet in block
*/
void enqueue(final long seqno, final boolean lastPacketInBlock,
final long offsetInBlock, final Status ackStatus) {
final Packet p = new Packet(seqno, lastPacketInBlock, offsetInBlock,
System.nanoTime(), ackStatus);
if(LOG.isDebugEnabled()) {
LOG.debug(myString + ": enqueue " + p);
}
synchronized(ackQueue) {
if (running) {
ackQueue.addLast(p);
ackQueue.notifyAll();
}
}
}
/**
* Send an OOB response. If all acks have been sent already for the block
* and the responder is about to close, the delivery is not guaranteed.
* This is because the other end can close the connection independently.
* An OOB coming from downstream will be automatically relayed upstream
* by the responder. This method is used only by originating datanode.
*
* @param ackStatus the type of ack to be sent
*/
void sendOOBResponse(final Status ackStatus) throws IOException,
InterruptedException {
if (!running) {
LOG.info("Cannot send OOB response " + ackStatus +
". Responder not running.");
return;
}
synchronized(this) {
if (sending) {
wait(datanode.getOOBTimeout(ackStatus));
// Didn't get my turn in time. Give up.
if (sending) {
throw new IOException("Could not send OOB reponse in time: "
+ ackStatus);
}
}
sending = true;
}
LOG.info("Sending an out of band ack of type " + ackStatus);
try {
sendAckUpstreamUnprotected(null, PipelineAck.UNKOWN_SEQNO, 0L, 0L,
PipelineAck.combineHeader(datanode.getECN(), ackStatus));
} finally {
// Let others send ack. Unless there are miltiple OOB send
// calls, there can be only one waiter, the responder thread.
// In any case, only one needs to be notified.
synchronized(this) {
sending = false;
notify();
}
}
}
/** Wait for a packet with given {@code seqno} to be enqueued to ackQueue */
Packet waitForAckHead(long seqno) throws InterruptedException {
synchronized(ackQueue) {
while (isRunning() && ackQueue.size() == 0) {
if (LOG.isDebugEnabled()) {
LOG.debug(myString + ": seqno=" + seqno +
" waiting for local datanode to finish write.");
}
ackQueue.wait();
}
return isRunning() ? ackQueue.getFirst() : null;
}
}
/**
* wait for all pending packets to be acked. Then shutdown thread.
*/
@Override
public void close() {
synchronized(ackQueue) {
while (isRunning() && ackQueue.size() != 0) {
try {
ackQueue.wait();
} catch (InterruptedException e) {
running = false;
Thread.currentThread().interrupt();
}
}
if(LOG.isDebugEnabled()) {
LOG.debug(myString + ": closing");
}
running = false;
ackQueue.notifyAll();
}
synchronized(this) {
running = false;
notifyAll();
}
}
/**
* Thread to process incoming acks.
* @see java.lang.Runnable#run()
*/
@Override
public void run() {
boolean lastPacketInBlock = false;
final long startTime = ClientTraceLog.isInfoEnabled() ? System.nanoTime() : 0;
while (isRunning() && !lastPacketInBlock) {
long totalAckTimeNanos = 0;
boolean isInterrupted = false;
try {
Packet pkt = null;
long expected = -2;
PipelineAck ack = new PipelineAck();
long seqno = PipelineAck.UNKOWN_SEQNO;
long ackRecvNanoTime = 0;
try {
if (type != PacketResponderType.LAST_IN_PIPELINE && !mirrorError) {
DataNodeFaultInjector.get().failPipeline(replicaInfo, mirrorAddr);
// read an ack from downstream datanode
ack.readFields(downstreamIn);
ackRecvNanoTime = System.nanoTime();
if (LOG.isDebugEnabled()) {
LOG.debug(myString + " got " + ack);
}
// Process an OOB ACK.
Status oobStatus = ack.getOOBStatus();
if (oobStatus != null) {
LOG.info("Relaying an out of band ack of type " + oobStatus);
sendAckUpstream(ack, PipelineAck.UNKOWN_SEQNO, 0L, 0L,
PipelineAck.combineHeader(datanode.getECN(),
Status.SUCCESS));
continue;
}
seqno = ack.getSeqno();
}
if (seqno != PipelineAck.UNKOWN_SEQNO
|| type == PacketResponderType.LAST_IN_PIPELINE) {
pkt = waitForAckHead(seqno);
if (!isRunning()) {
break;
}
expected = pkt.seqno;
if (type == PacketResponderType.HAS_DOWNSTREAM_IN_PIPELINE
&& seqno != expected) {
throw new IOException(myString + "seqno: expected=" + expected
+ ", received=" + seqno);
}
if (type == PacketResponderType.HAS_DOWNSTREAM_IN_PIPELINE) {
// The total ack time includes the ack times of downstream
// nodes.
// The value is 0 if this responder doesn't have a downstream
// DN in the pipeline.
totalAckTimeNanos = ackRecvNanoTime - pkt.ackEnqueueNanoTime;
// Report the elapsed time from ack send to ack receive minus
// the downstream ack time.
long ackTimeNanos = totalAckTimeNanos
- ack.getDownstreamAckTimeNanos();
if (ackTimeNanos < 0) {
if (LOG.isDebugEnabled()) {
LOG.debug("Calculated invalid ack time: " + ackTimeNanos
+ "ns.");
}
} else {
datanode.metrics.addPacketAckRoundTripTimeNanos(ackTimeNanos);
}
}
lastPacketInBlock = pkt.lastPacketInBlock;
}
} catch (InterruptedException ine) {
isInterrupted = true;
} catch (IOException ioe) {
if (Thread.interrupted()) {
isInterrupted = true;
} else if (ioe instanceof EOFException && !packetSentInTime()) {
// The downstream error was caused by upstream including this
// node not sending packet in time. Let the upstream determine
// who is at fault. If the immediate upstream node thinks it
// has sent a packet in time, this node will be reported as bad.
// Otherwise, the upstream node will propagate the error up by
// closing the connection.
LOG.warn("The downstream error might be due to congestion in " +
"upstream including this node. Propagating the error: ",
ioe);
throw ioe;
} else {
// continue to run even if can not read from mirror
// notify client of the error
// and wait for the client to shut down the pipeline
mirrorError = true;
LOG.info(myString, ioe);
}
}
if (Thread.interrupted() || isInterrupted) {
/*
* The receiver thread cancelled this thread. We could also check
* any other status updates from the receiver thread (e.g. if it is
* ok to write to replyOut). It is prudent to not send any more
* status back to the client because this datanode has a problem.
* The upstream datanode will detect that this datanode is bad, and
* rightly so.
*
* The receiver thread can also interrupt this thread for sending
* an out-of-band response upstream.
*/
LOG.info(myString + ": Thread is interrupted.");
running = false;
continue;
}
if (lastPacketInBlock) {
// Finalize the block and close the block file
finalizeBlock(startTime);
}
Status myStatus = pkt != null ? pkt.ackStatus : Status.SUCCESS;
sendAckUpstream(ack, expected, totalAckTimeNanos,
(pkt != null ? pkt.offsetInBlock : 0),
PipelineAck.combineHeader(datanode.getECN(), myStatus));
if (pkt != null) {
// remove the packet from the ack queue
removeAckHead();
}
} catch (IOException e) {
LOG.warn("IOException in BlockReceiver.run(): ", e);
if (running) {
// Volume error check moved to FileIoProvider
LOG.info(myString, e);
running = false;
if (!Thread.interrupted()) { // failure not caused by interruption
receiverThread.interrupt();
}
}
} catch (Throwable e) {
if (running) {
LOG.info(myString, e);
running = false;
receiverThread.interrupt();
}
}
}
LOG.info(myString + " terminating");
}
/**
* Finalize the block and close the block file
* @param startTime time when BlockReceiver started receiving the block
*/
private void finalizeBlock(long startTime) throws IOException {
long endTime = 0;
// Hold a volume reference to finalize block.
try (ReplicaHandler handler = BlockReceiver.this.claimReplicaHandler()) {
BlockReceiver.this.close();
endTime = ClientTraceLog.isInfoEnabled() ? System.nanoTime() : 0;
block.setNumBytes(replicaInfo.getNumBytes());
datanode.data.finalizeBlock(block);
}
if (pinning) {
datanode.data.setPinning(block);
}
datanode.closeBlock(block, null, replicaInfo.getStorageUuid(),
replicaInfo.isOnTransientStorage());
if (ClientTraceLog.isInfoEnabled() && isClient) {
long offset = 0;
DatanodeRegistration dnR = datanode.getDNRegistrationForBP(block
.getBlockPoolId());
ClientTraceLog.info(String.format(DN_CLIENTTRACE_FORMAT, inAddr,
myAddr, block.getNumBytes(), "HDFS_WRITE", clientname, offset,
dnR.getDatanodeUuid(), block, endTime - startTime));
} else {
LOG.info("Received " + block + " size " + block.getNumBytes()
+ " from " + inAddr);
}
}
/**
* The wrapper for the unprotected version. This is only called by
* the responder's run() method.
*
* @param ack Ack received from downstream
* @param seqno sequence number of ack to be sent upstream
* @param totalAckTimeNanos total ack time including all the downstream
* nodes
* @param offsetInBlock offset in block for the data in packet
* @param myHeader the local ack header
*/
private void sendAckUpstream(PipelineAck ack, long seqno,
long totalAckTimeNanos, long offsetInBlock,
int myHeader) throws IOException {
try {
// Wait for other sender to finish. Unless there is an OOB being sent,
// the responder won't have to wait.
synchronized(this) {
while(sending) {
wait();
}
sending = true;
}
try {
if (!running) return;
sendAckUpstreamUnprotected(ack, seqno, totalAckTimeNanos,
offsetInBlock, myHeader);
} finally {
synchronized(this) {
sending = false;
notify();
}
}
} catch (InterruptedException ie) {
// The responder was interrupted. Make it go down without
// interrupting the receiver(writer) thread.
running = false;
}
}
/**
* @param ack Ack received from downstream
* @param seqno sequence number of ack to be sent upstream
* @param totalAckTimeNanos total ack time including all the downstream
* nodes
* @param offsetInBlock offset in block for the data in packet
* @param myHeader the local ack header
*/
private void sendAckUpstreamUnprotected(PipelineAck ack, long seqno,
long totalAckTimeNanos, long offsetInBlock, int myHeader)
throws IOException {
final int[] replies;
if (ack == null) {
// A new OOB response is being sent from this node. Regardless of
// downstream nodes, reply should contain one reply.
replies = new int[] { myHeader };
} else if (mirrorError) { // ack read error
int h = PipelineAck.combineHeader(datanode.getECN(), Status.SUCCESS);
int h1 = PipelineAck.combineHeader(datanode.getECN(), Status.ERROR);
replies = new int[] {h, h1};
} else {
short ackLen = type == PacketResponderType.LAST_IN_PIPELINE ? 0 : ack
.getNumOfReplies();
replies = new int[ackLen + 1];
replies[0] = myHeader;
for (int i = 0; i < ackLen; ++i) {
replies[i + 1] = ack.getHeaderFlag(i);
}
// If the mirror has reported that it received a corrupt packet,
// do self-destruct to mark myself bad, instead of making the
// mirror node bad. The mirror is guaranteed to be good without
// corrupt data on disk.
if (ackLen > 0 && PipelineAck.getStatusFromHeader(replies[1]) ==
Status.ERROR_CHECKSUM) {
throw new IOException("Shutting down writer and responder "
+ "since the down streams reported the data sent by this "
+ "thread is corrupt");
}
}
PipelineAck replyAck = new PipelineAck(seqno, replies,
totalAckTimeNanos);
if (replyAck.isSuccess()
&& offsetInBlock > replicaInfo.getBytesAcked()) {
replicaInfo.setBytesAcked(offsetInBlock);
}
// send my ack back to upstream datanode
long begin = Time.monotonicNow();
/* for test only, no-op in production system */
DataNodeFaultInjector.get().delaySendingAckToUpstream(inAddr);
replyAck.write(upstreamOut);
upstreamOut.flush();
long duration = Time.monotonicNow() - begin;
DataNodeFaultInjector.get().logDelaySendingAckToUpstream(
inAddr,
duration);
if (duration > datanodeSlowLogThresholdMs) {
LOG.warn("Slow PacketResponder send ack to upstream took " + duration
+ "ms (threshold=" + datanodeSlowLogThresholdMs + "ms), " + myString
+ ", replyAck=" + replyAck);
} else if (LOG.isDebugEnabled()) {
LOG.debug(myString + ", replyAck=" + replyAck);
}
// If a corruption was detected in the received data, terminate after
// sending ERROR_CHECKSUM back.
Status myStatus = PipelineAck.getStatusFromHeader(myHeader);
if (myStatus == Status.ERROR_CHECKSUM) {
throw new IOException("Shutting down writer and responder "
+ "due to a checksum error in received data. The error "
+ "response has been sent upstream.");
}
}
/**
* Remove a packet from the head of the ack queue
*
* This should be called only when the ack queue is not empty
*/
private void removeAckHead() {
synchronized(ackQueue) {
ackQueue.removeFirst();
ackQueue.notifyAll();
}
}
}
/**
* This information is cached by the Datanode in the ackQueue.
*/
private static class Packet {
final long seqno;
final boolean lastPacketInBlock;
final long offsetInBlock;
final long ackEnqueueNanoTime;
final Status ackStatus;
Packet(long seqno, boolean lastPacketInBlock, long offsetInBlock,
long ackEnqueueNanoTime, Status ackStatus) {
this.seqno = seqno;
this.lastPacketInBlock = lastPacketInBlock;
this.offsetInBlock = offsetInBlock;
this.ackEnqueueNanoTime = ackEnqueueNanoTime;
this.ackStatus = ackStatus;
}
@Override
public String toString() {
return getClass().getSimpleName() + "(seqno=" + seqno
+ ", lastPacketInBlock=" + lastPacketInBlock
+ ", offsetInBlock=" + offsetInBlock
+ ", ackEnqueueNanoTime=" + ackEnqueueNanoTime
+ ", ackStatus=" + ackStatus
+ ")";
}
}
}
| hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BlockReceiver.java | /**
* 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.
*/
package org.apache.hadoop.hdfs.server.datanode;
import static org.apache.hadoop.hdfs.server.datanode.DataNode.DN_CLIENTTRACE_FORMAT;
import java.io.BufferedOutputStream;
import java.io.Closeable;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.EOFException;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.io.Writer;
import java.nio.ByteBuffer;
import java.util.Arrays;
import java.util.LinkedList;
import java.util.zip.Checksum;
import org.apache.commons.logging.Log;
import org.apache.hadoop.fs.ChecksumException;
import org.apache.hadoop.fs.FSOutputSummer;
import org.apache.hadoop.fs.StorageType;
import org.apache.hadoop.hdfs.DFSUtilClient;
import org.apache.hadoop.hdfs.protocol.DatanodeInfo;
import org.apache.hadoop.hdfs.protocol.ExtendedBlock;
import org.apache.hadoop.hdfs.protocol.datatransfer.BlockConstructionStage;
import org.apache.hadoop.hdfs.protocol.datatransfer.PacketHeader;
import org.apache.hadoop.hdfs.protocol.datatransfer.PacketReceiver;
import org.apache.hadoop.hdfs.protocol.datatransfer.PipelineAck;
import org.apache.hadoop.hdfs.protocol.proto.DataTransferProtos.BlockOpResponseProto;
import org.apache.hadoop.hdfs.protocol.proto.DataTransferProtos.Status;
import org.apache.hadoop.hdfs.server.datanode.fsdataset.ReplicaInputStreams;
import org.apache.hadoop.hdfs.server.datanode.fsdataset.ReplicaOutputStreams;
import org.apache.hadoop.hdfs.server.datanode.metrics.DataNodePeerMetrics;
import org.apache.hadoop.hdfs.server.protocol.DatanodeRegistration;
import org.apache.hadoop.hdfs.util.DataTransferThrottler;
import org.apache.hadoop.io.IOUtils;
import org.apache.hadoop.util.Daemon;
import org.apache.hadoop.util.DataChecksum;
import org.apache.hadoop.util.StringUtils;
import org.apache.hadoop.util.Time;
import org.apache.htrace.core.Span;
import org.apache.htrace.core.Tracer;
import static org.apache.hadoop.io.nativeio.NativeIO.POSIX.POSIX_FADV_DONTNEED;
import static org.apache.hadoop.io.nativeio.NativeIO.POSIX.SYNC_FILE_RANGE_WRITE;
import com.google.common.annotations.VisibleForTesting;
import org.slf4j.Logger;
/** A class that receives a block and writes to its own disk, meanwhile
* may copies it to another site. If a throttler is provided,
* streaming throttling is also supported.
**/
class BlockReceiver implements Closeable {
public static final Logger LOG = DataNode.LOG;
static final Log ClientTraceLog = DataNode.ClientTraceLog;
@VisibleForTesting
static long CACHE_DROP_LAG_BYTES = 8 * 1024 * 1024;
private final long datanodeSlowLogThresholdMs;
private DataInputStream in = null; // from where data are read
private DataChecksum clientChecksum; // checksum used by client
private DataChecksum diskChecksum; // checksum we write to disk
/**
* In the case that the client is writing with a different
* checksum polynomial than the block is stored with on disk,
* the DataNode needs to recalculate checksums before writing.
*/
private final boolean needsChecksumTranslation;
private DataOutputStream checksumOut = null; // to crc file at local disk
private final int bytesPerChecksum;
private final int checksumSize;
private final PacketReceiver packetReceiver = new PacketReceiver(false);
protected final String inAddr;
protected final String myAddr;
private String mirrorAddr;
private String mirrorNameForMetrics;
private DataOutputStream mirrorOut;
private Daemon responder = null;
private DataTransferThrottler throttler;
private ReplicaOutputStreams streams;
private DatanodeInfo srcDataNode = null;
private final DataNode datanode;
volatile private boolean mirrorError;
// Cache management state
private boolean dropCacheBehindWrites;
private long lastCacheManagementOffset = 0;
private boolean syncBehindWrites;
private boolean syncBehindWritesInBackground;
/** The client name. It is empty if a datanode is the client */
private final String clientname;
private final boolean isClient;
private final boolean isDatanode;
/** the block to receive */
private final ExtendedBlock block;
/** the replica to write */
private ReplicaInPipeline replicaInfo;
/** pipeline stage */
private final BlockConstructionStage stage;
private final boolean isTransfer;
private boolean isPenultimateNode = false;
private boolean syncOnClose;
private long restartBudget;
/** the reference of the volume where the block receiver writes to */
private ReplicaHandler replicaHandler;
/**
* for replaceBlock response
*/
private final long responseInterval;
private long lastResponseTime = 0;
private boolean isReplaceBlock = false;
private DataOutputStream replyOut = null;
private long maxWriteToDiskMs = 0;
private boolean pinning;
private long lastSentTime;
private long maxSendIdleTime;
BlockReceiver(final ExtendedBlock block, final StorageType storageType,
final DataInputStream in,
final String inAddr, final String myAddr,
final BlockConstructionStage stage,
final long newGs, final long minBytesRcvd, final long maxBytesRcvd,
final String clientname, final DatanodeInfo srcDataNode,
final DataNode datanode, DataChecksum requestedChecksum,
CachingStrategy cachingStrategy,
final boolean allowLazyPersist,
final boolean pinning) throws IOException {
try{
this.block = block;
this.in = in;
this.inAddr = inAddr;
this.myAddr = myAddr;
this.srcDataNode = srcDataNode;
this.datanode = datanode;
this.clientname = clientname;
this.isDatanode = clientname.length() == 0;
this.isClient = !this.isDatanode;
this.restartBudget = datanode.getDnConf().restartReplicaExpiry;
this.datanodeSlowLogThresholdMs =
datanode.getDnConf().getSlowIoWarningThresholdMs();
// For replaceBlock() calls response should be sent to avoid socketTimeout
// at clients. So sending with the interval of 0.5 * socketTimeout
final long readTimeout = datanode.getDnConf().socketTimeout;
this.responseInterval = (long) (readTimeout * 0.5);
//for datanode, we have
//1: clientName.length() == 0, and
//2: stage == null or PIPELINE_SETUP_CREATE
this.stage = stage;
this.isTransfer = stage == BlockConstructionStage.TRANSFER_RBW
|| stage == BlockConstructionStage.TRANSFER_FINALIZED;
this.pinning = pinning;
this.lastSentTime = Time.monotonicNow();
// Downstream will timeout in readTimeout on receiving the next packet.
// If there is no data traffic, a heartbeat packet is sent at
// the interval of 0.5*readTimeout. Here, we set 0.9*readTimeout to be
// the threshold for detecting congestion.
this.maxSendIdleTime = (long) (readTimeout * 0.9);
if (LOG.isDebugEnabled()) {
LOG.debug(getClass().getSimpleName() + ": " + block
+ "\n storageType=" + storageType + ", inAddr=" + inAddr
+ ", myAddr=" + myAddr + "\n stage=" + stage + ", newGs=" + newGs
+ ", minBytesRcvd=" + minBytesRcvd
+ ", maxBytesRcvd=" + maxBytesRcvd + "\n clientname=" + clientname
+ ", srcDataNode=" + srcDataNode
+ ", datanode=" + datanode.getDisplayName()
+ "\n requestedChecksum=" + requestedChecksum
+ "\n cachingStrategy=" + cachingStrategy
+ "\n allowLazyPersist=" + allowLazyPersist + ", pinning=" + pinning
+ ", isClient=" + isClient + ", isDatanode=" + isDatanode
+ ", responseInterval=" + responseInterval
);
}
//
// Open local disk out
//
if (isDatanode) { //replication or move
replicaHandler = datanode.data.createTemporary(storageType, block);
} else {
switch (stage) {
case PIPELINE_SETUP_CREATE:
replicaHandler = datanode.data.createRbw(storageType, block, allowLazyPersist);
datanode.notifyNamenodeReceivingBlock(
block, replicaHandler.getReplica().getStorageUuid());
break;
case PIPELINE_SETUP_STREAMING_RECOVERY:
replicaHandler = datanode.data.recoverRbw(
block, newGs, minBytesRcvd, maxBytesRcvd);
block.setGenerationStamp(newGs);
break;
case PIPELINE_SETUP_APPEND:
replicaHandler = datanode.data.append(block, newGs, minBytesRcvd);
block.setGenerationStamp(newGs);
datanode.notifyNamenodeReceivingBlock(
block, replicaHandler.getReplica().getStorageUuid());
break;
case PIPELINE_SETUP_APPEND_RECOVERY:
replicaHandler = datanode.data.recoverAppend(block, newGs, minBytesRcvd);
block.setGenerationStamp(newGs);
datanode.notifyNamenodeReceivingBlock(
block, replicaHandler.getReplica().getStorageUuid());
break;
case TRANSFER_RBW:
case TRANSFER_FINALIZED:
// this is a transfer destination
replicaHandler =
datanode.data.createTemporary(storageType, block);
break;
default: throw new IOException("Unsupported stage " + stage +
" while receiving block " + block + " from " + inAddr);
}
}
replicaInfo = replicaHandler.getReplica();
this.dropCacheBehindWrites = (cachingStrategy.getDropBehind() == null) ?
datanode.getDnConf().dropCacheBehindWrites :
cachingStrategy.getDropBehind();
this.syncBehindWrites = datanode.getDnConf().syncBehindWrites;
this.syncBehindWritesInBackground = datanode.getDnConf().
syncBehindWritesInBackground;
final boolean isCreate = isDatanode || isTransfer
|| stage == BlockConstructionStage.PIPELINE_SETUP_CREATE;
streams = replicaInfo.createStreams(isCreate, requestedChecksum);
assert streams != null : "null streams!";
// read checksum meta information
this.clientChecksum = requestedChecksum;
this.diskChecksum = streams.getChecksum();
this.needsChecksumTranslation = !clientChecksum.equals(diskChecksum);
this.bytesPerChecksum = diskChecksum.getBytesPerChecksum();
this.checksumSize = diskChecksum.getChecksumSize();
this.checksumOut = new DataOutputStream(new BufferedOutputStream(
streams.getChecksumOut(), DFSUtilClient.getSmallBufferSize(
datanode.getConf())));
// write data chunk header if creating a new replica
if (isCreate) {
BlockMetadataHeader.writeHeader(checksumOut, diskChecksum);
}
} catch (ReplicaAlreadyExistsException bae) {
throw bae;
} catch (ReplicaNotFoundException bne) {
throw bne;
} catch(IOException ioe) {
if (replicaInfo != null) {
replicaInfo.releaseAllBytesReserved();
}
IOUtils.closeStream(this);
cleanupBlock();
// check if there is a disk error
IOException cause = DatanodeUtil.getCauseIfDiskError(ioe);
DataNode.LOG.warn("IOException in BlockReceiver constructor"
+ (cause == null ? "" : ". Cause is "), cause);
if (cause != null) {
ioe = cause;
// Volume error check moved to FileIoProvider
}
throw ioe;
}
}
/** Return the datanode object. */
DataNode getDataNode() {return datanode;}
Replica getReplica() {
return replicaInfo;
}
/**
* close files and release volume reference.
*/
@Override
public void close() throws IOException {
Span span = Tracer.getCurrentSpan();
if (span != null) {
span.addKVAnnotation("maxWriteToDiskMs",
Long.toString(maxWriteToDiskMs));
}
packetReceiver.close();
IOException ioe = null;
if (syncOnClose && (streams.getDataOut() != null || checksumOut != null)) {
datanode.metrics.incrFsyncCount();
}
long flushTotalNanos = 0;
boolean measuredFlushTime = false;
// close checksum file
try {
if (checksumOut != null) {
long flushStartNanos = System.nanoTime();
checksumOut.flush();
long flushEndNanos = System.nanoTime();
if (syncOnClose) {
long fsyncStartNanos = flushEndNanos;
streams.syncChecksumOut();
datanode.metrics.addFsyncNanos(System.nanoTime() - fsyncStartNanos);
}
flushTotalNanos += flushEndNanos - flushStartNanos;
measuredFlushTime = true;
checksumOut.close();
checksumOut = null;
}
} catch(IOException e) {
ioe = e;
}
finally {
IOUtils.closeStream(checksumOut);
}
// close block file
try {
if (streams.getDataOut() != null) {
long flushStartNanos = System.nanoTime();
streams.flushDataOut();
long flushEndNanos = System.nanoTime();
if (syncOnClose) {
long fsyncStartNanos = flushEndNanos;
streams.syncDataOut();
datanode.metrics.addFsyncNanos(System.nanoTime() - fsyncStartNanos);
}
flushTotalNanos += flushEndNanos - flushStartNanos;
measuredFlushTime = true;
streams.closeDataStream();
}
} catch (IOException e) {
ioe = e;
}
finally{
streams.close();
}
if (replicaHandler != null) {
IOUtils.cleanup(null, replicaHandler);
replicaHandler = null;
}
if (measuredFlushTime) {
datanode.metrics.addFlushNanos(flushTotalNanos);
}
if(ioe != null) {
// Volume error check moved to FileIoProvider
throw ioe;
}
}
synchronized void setLastSentTime(long sentTime) {
lastSentTime = sentTime;
}
/**
* It can return false if
* - upstream did not send packet for a long time
* - a packet was received but got stuck in local disk I/O.
* - a packet was received but got stuck on send to mirror.
*/
synchronized boolean packetSentInTime() {
long diff = Time.monotonicNow() - lastSentTime;
if (diff > maxSendIdleTime) {
LOG.info("A packet was last sent " + diff + " milliseconds ago.");
return false;
}
return true;
}
/**
* Flush block data and metadata files to disk.
* @throws IOException
*/
void flushOrSync(boolean isSync) throws IOException {
long flushTotalNanos = 0;
long begin = Time.monotonicNow();
if (checksumOut != null) {
long flushStartNanos = System.nanoTime();
checksumOut.flush();
long flushEndNanos = System.nanoTime();
if (isSync) {
streams.syncChecksumOut();
datanode.metrics.addFsyncNanos(System.nanoTime() - flushEndNanos);
}
flushTotalNanos += flushEndNanos - flushStartNanos;
}
if (streams.getDataOut() != null) {
long flushStartNanos = System.nanoTime();
streams.flushDataOut();
long flushEndNanos = System.nanoTime();
if (isSync) {
long fsyncStartNanos = flushEndNanos;
streams.syncDataOut();
datanode.metrics.addFsyncNanos(System.nanoTime() - fsyncStartNanos);
}
flushTotalNanos += flushEndNanos - flushStartNanos;
}
if (checksumOut != null || streams.getDataOut() != null) {
datanode.metrics.addFlushNanos(flushTotalNanos);
if (isSync) {
datanode.metrics.incrFsyncCount();
}
}
long duration = Time.monotonicNow() - begin;
if (duration > datanodeSlowLogThresholdMs) {
LOG.warn("Slow flushOrSync took " + duration + "ms (threshold="
+ datanodeSlowLogThresholdMs + "ms), isSync:" + isSync + ", flushTotalNanos="
+ flushTotalNanos + "ns");
}
}
/**
* While writing to mirrorOut, failure to write to mirror should not
* affect this datanode unless it is caused by interruption.
*/
private void handleMirrorOutError(IOException ioe) throws IOException {
String bpid = block.getBlockPoolId();
LOG.info(datanode.getDNRegistrationForBP(bpid)
+ ":Exception writing " + block + " to mirror " + mirrorAddr, ioe);
if (Thread.interrupted()) { // shut down if the thread is interrupted
throw ioe;
} else { // encounter an error while writing to mirror
// continue to run even if can not write to mirror
// notify client of the error
// and wait for the client to shut down the pipeline
mirrorError = true;
}
}
/**
* Verify multiple CRC chunks.
*/
private void verifyChunks(ByteBuffer dataBuf, ByteBuffer checksumBuf)
throws IOException {
try {
clientChecksum.verifyChunkedSums(dataBuf, checksumBuf, clientname, 0);
} catch (ChecksumException ce) {
PacketHeader header = packetReceiver.getHeader();
String specificOffset = "specific offsets are:"
+ " offsetInBlock = " + header.getOffsetInBlock()
+ " offsetInPacket = " + ce.getPos();
LOG.warn("Checksum error in block "
+ block + " from " + inAddr
+ ", " + specificOffset, ce);
// No need to report to namenode when client is writing.
if (srcDataNode != null && isDatanode) {
try {
LOG.info("report corrupt " + block + " from datanode " +
srcDataNode + " to namenode");
datanode.reportRemoteBadBlock(srcDataNode, block);
} catch (IOException e) {
LOG.warn("Failed to report bad " + block +
" from datanode " + srcDataNode + " to namenode");
}
}
throw new IOException("Unexpected checksum mismatch while writing "
+ block + " from " + inAddr);
}
}
/**
* Translate CRC chunks from the client's checksum implementation
* to the disk checksum implementation.
*
* This does not verify the original checksums, under the assumption
* that they have already been validated.
*/
private void translateChunks(ByteBuffer dataBuf, ByteBuffer checksumBuf) {
diskChecksum.calculateChunkedSums(dataBuf, checksumBuf);
}
/**
* Check whether checksum needs to be verified.
* Skip verifying checksum iff this is not the last one in the
* pipeline and clientName is non-null. i.e. Checksum is verified
* on all the datanodes when the data is being written by a
* datanode rather than a client. Whe client is writing the data,
* protocol includes acks and only the last datanode needs to verify
* checksum.
* @return true if checksum verification is needed, otherwise false.
*/
private boolean shouldVerifyChecksum() {
return (mirrorOut == null || isDatanode || needsChecksumTranslation);
}
/**
* Receives and processes a packet. It can contain many chunks.
* returns the number of data bytes that the packet has.
*/
private int receivePacket() throws IOException {
// read the next packet
packetReceiver.receiveNextPacket(in);
PacketHeader header = packetReceiver.getHeader();
if (LOG.isDebugEnabled()){
LOG.debug("Receiving one packet for block " + block +
": " + header);
}
// Sanity check the header
if (header.getOffsetInBlock() > replicaInfo.getNumBytes()) {
throw new IOException("Received an out-of-sequence packet for " + block +
"from " + inAddr + " at offset " + header.getOffsetInBlock() +
". Expecting packet starting at " + replicaInfo.getNumBytes());
}
if (header.getDataLen() < 0) {
throw new IOException("Got wrong length during writeBlock(" + block +
") from " + inAddr + " at offset " +
header.getOffsetInBlock() + ": " +
header.getDataLen());
}
long offsetInBlock = header.getOffsetInBlock();
long seqno = header.getSeqno();
boolean lastPacketInBlock = header.isLastPacketInBlock();
final int len = header.getDataLen();
boolean syncBlock = header.getSyncBlock();
// avoid double sync'ing on close
if (syncBlock && lastPacketInBlock) {
this.syncOnClose = false;
}
// update received bytes
final long firstByteInBlock = offsetInBlock;
offsetInBlock += len;
if (replicaInfo.getNumBytes() < offsetInBlock) {
replicaInfo.setNumBytes(offsetInBlock);
}
// put in queue for pending acks, unless sync was requested
if (responder != null && !syncBlock && !shouldVerifyChecksum()) {
((PacketResponder) responder.getRunnable()).enqueue(seqno,
lastPacketInBlock, offsetInBlock, Status.SUCCESS);
}
// Drop heartbeat for testing.
if (seqno < 0 && len == 0 &&
DataNodeFaultInjector.get().dropHeartbeatPacket()) {
return 0;
}
//First write the packet to the mirror:
if (mirrorOut != null && !mirrorError) {
try {
long begin = Time.monotonicNow();
// For testing. Normally no-op.
DataNodeFaultInjector.get().stopSendingPacketDownstream(mirrorAddr);
packetReceiver.mirrorPacketTo(mirrorOut);
mirrorOut.flush();
long now = Time.monotonicNow();
setLastSentTime(now);
long duration = now - begin;
DataNodeFaultInjector.get().logDelaySendingPacketDownstream(
mirrorAddr,
duration);
trackSendPacketToLastNodeInPipeline(duration);
if (duration > datanodeSlowLogThresholdMs) {
LOG.warn("Slow BlockReceiver write packet to mirror took " + duration
+ "ms (threshold=" + datanodeSlowLogThresholdMs + "ms)");
}
} catch (IOException e) {
handleMirrorOutError(e);
}
}
ByteBuffer dataBuf = packetReceiver.getDataSlice();
ByteBuffer checksumBuf = packetReceiver.getChecksumSlice();
if (lastPacketInBlock || len == 0) {
if(LOG.isDebugEnabled()) {
LOG.debug("Receiving an empty packet or the end of the block " + block);
}
// sync block if requested
if (syncBlock) {
flushOrSync(true);
}
} else {
final int checksumLen = diskChecksum.getChecksumSize(len);
final int checksumReceivedLen = checksumBuf.capacity();
if (checksumReceivedLen > 0 && checksumReceivedLen != checksumLen) {
throw new IOException("Invalid checksum length: received length is "
+ checksumReceivedLen + " but expected length is " + checksumLen);
}
if (checksumReceivedLen > 0 && shouldVerifyChecksum()) {
try {
verifyChunks(dataBuf, checksumBuf);
} catch (IOException ioe) {
// checksum error detected locally. there is no reason to continue.
if (responder != null) {
try {
((PacketResponder) responder.getRunnable()).enqueue(seqno,
lastPacketInBlock, offsetInBlock,
Status.ERROR_CHECKSUM);
// Wait until the responder sends back the response
// and interrupt this thread.
Thread.sleep(3000);
} catch (InterruptedException e) { }
}
throw new IOException("Terminating due to a checksum error." + ioe);
}
if (needsChecksumTranslation) {
// overwrite the checksums in the packet buffer with the
// appropriate polynomial for the disk storage.
translateChunks(dataBuf, checksumBuf);
}
}
if (checksumReceivedLen == 0 && !streams.isTransientStorage()) {
// checksum is missing, need to calculate it
checksumBuf = ByteBuffer.allocate(checksumLen);
diskChecksum.calculateChunkedSums(dataBuf, checksumBuf);
}
// by this point, the data in the buffer uses the disk checksum
final boolean shouldNotWriteChecksum = checksumReceivedLen == 0
&& streams.isTransientStorage();
try {
long onDiskLen = replicaInfo.getBytesOnDisk();
if (onDiskLen<offsetInBlock) {
// Normally the beginning of an incoming packet is aligned with the
// existing data on disk. If the beginning packet data offset is not
// checksum chunk aligned, the end of packet will not go beyond the
// next chunk boundary.
// When a failure-recovery is involved, the client state and the
// the datanode state may not exactly agree. I.e. the client may
// resend part of data that is already on disk. Correct number of
// bytes should be skipped when writing the data and checksum
// buffers out to disk.
long partialChunkSizeOnDisk = onDiskLen % bytesPerChecksum;
long lastChunkBoundary = onDiskLen - partialChunkSizeOnDisk;
boolean alignedOnDisk = partialChunkSizeOnDisk == 0;
boolean alignedInPacket = firstByteInBlock % bytesPerChecksum == 0;
// If the end of the on-disk data is not chunk-aligned, the last
// checksum needs to be overwritten.
boolean overwriteLastCrc = !alignedOnDisk && !shouldNotWriteChecksum;
// If the starting offset of the packat data is at the last chunk
// boundary of the data on disk, the partial checksum recalculation
// can be skipped and the checksum supplied by the client can be used
// instead. This reduces disk reads and cpu load.
boolean doCrcRecalc = overwriteLastCrc &&
(lastChunkBoundary != firstByteInBlock);
// If this is a partial chunk, then verify that this is the only
// chunk in the packet. If the starting offset is not chunk
// aligned, the packet should terminate at or before the next
// chunk boundary.
if (!alignedInPacket && len > bytesPerChecksum) {
throw new IOException("Unexpected packet data length for "
+ block + " from " + inAddr + ": a partial chunk must be "
+ " sent in an individual packet (data length = " + len
+ " > bytesPerChecksum = " + bytesPerChecksum + ")");
}
// If the last portion of the block file is not a full chunk,
// then read in pre-existing partial data chunk and recalculate
// the checksum so that the checksum calculation can continue
// from the right state. If the client provided the checksum for
// the whole chunk, this is not necessary.
Checksum partialCrc = null;
if (doCrcRecalc) {
if (LOG.isDebugEnabled()) {
LOG.debug("receivePacket for " + block
+ ": previous write did not end at the chunk boundary."
+ " onDiskLen=" + onDiskLen);
}
long offsetInChecksum = BlockMetadataHeader.getHeaderSize() +
onDiskLen / bytesPerChecksum * checksumSize;
partialCrc = computePartialChunkCrc(onDiskLen, offsetInChecksum);
}
// The data buffer position where write will begin. If the packet
// data and on-disk data have no overlap, this will not be at the
// beginning of the buffer.
int startByteToDisk = (int)(onDiskLen-firstByteInBlock)
+ dataBuf.arrayOffset() + dataBuf.position();
// Actual number of data bytes to write.
int numBytesToDisk = (int)(offsetInBlock-onDiskLen);
// Write data to disk.
long begin = Time.monotonicNow();
streams.writeDataToDisk(dataBuf.array(),
startByteToDisk, numBytesToDisk);
long duration = Time.monotonicNow() - begin;
if (duration > maxWriteToDiskMs) {
maxWriteToDiskMs = duration;
}
final byte[] lastCrc;
if (shouldNotWriteChecksum) {
lastCrc = null;
} else {
int skip = 0;
byte[] crcBytes = null;
// First, prepare to overwrite the partial crc at the end.
if (overwriteLastCrc) { // not chunk-aligned on disk
// prepare to overwrite last checksum
adjustCrcFilePosition();
}
// The CRC was recalculated for the last partial chunk. Update the
// CRC by reading the rest of the chunk, then write it out.
if (doCrcRecalc) {
// Calculate new crc for this chunk.
int bytesToReadForRecalc =
(int)(bytesPerChecksum - partialChunkSizeOnDisk);
if (numBytesToDisk < bytesToReadForRecalc) {
bytesToReadForRecalc = numBytesToDisk;
}
partialCrc.update(dataBuf.array(), startByteToDisk,
bytesToReadForRecalc);
byte[] buf = FSOutputSummer.convertToByteStream(partialCrc,
checksumSize);
crcBytes = copyLastChunkChecksum(buf, checksumSize, buf.length);
checksumOut.write(buf);
if(LOG.isDebugEnabled()) {
LOG.debug("Writing out partial crc for data len " + len +
", skip=" + skip);
}
skip++; // For the partial chunk that was just read.
}
// Determine how many checksums need to be skipped up to the last
// boundary. The checksum after the boundary was already counted
// above. Only count the number of checksums skipped up to the
// boundary here.
long skippedDataBytes = lastChunkBoundary - firstByteInBlock;
if (skippedDataBytes > 0) {
skip += (int)(skippedDataBytes / bytesPerChecksum) +
((skippedDataBytes % bytesPerChecksum == 0) ? 0 : 1);
}
skip *= checksumSize; // Convert to number of bytes
// write the rest of checksum
final int offset = checksumBuf.arrayOffset() +
checksumBuf.position() + skip;
final int end = offset + checksumLen - skip;
// If offset >= end, there is no more checksum to write.
// I.e. a partial chunk checksum rewrite happened and there is no
// more to write after that.
if (offset >= end && doCrcRecalc) {
lastCrc = crcBytes;
} else {
final int remainingBytes = checksumLen - skip;
lastCrc = copyLastChunkChecksum(checksumBuf.array(),
checksumSize, end);
checksumOut.write(checksumBuf.array(), offset, remainingBytes);
}
}
/// flush entire packet, sync if requested
flushOrSync(syncBlock);
replicaInfo.setLastChecksumAndDataLen(offsetInBlock, lastCrc);
datanode.metrics.incrBytesWritten(len);
datanode.metrics.incrTotalWriteTime(duration);
manageWriterOsCache(offsetInBlock);
}
} catch (IOException iex) {
// Volume error check moved to FileIoProvider
throw iex;
}
}
// if sync was requested, put in queue for pending acks here
// (after the fsync finished)
if (responder != null && (syncBlock || shouldVerifyChecksum())) {
((PacketResponder) responder.getRunnable()).enqueue(seqno,
lastPacketInBlock, offsetInBlock, Status.SUCCESS);
}
/*
* Send in-progress responses for the replaceBlock() calls back to caller to
* avoid timeouts due to balancer throttling. HDFS-6247
*/
if (isReplaceBlock
&& (Time.monotonicNow() - lastResponseTime > responseInterval)) {
BlockOpResponseProto.Builder response = BlockOpResponseProto.newBuilder()
.setStatus(Status.IN_PROGRESS);
response.build().writeDelimitedTo(replyOut);
replyOut.flush();
lastResponseTime = Time.monotonicNow();
}
if (throttler != null) { // throttle I/O
throttler.throttle(len);
}
return lastPacketInBlock?-1:len;
}
/**
* Only tracks the latency of sending packet to the last node in pipeline.
* This is a conscious design choice.
* <p>
* In the case of pipeline [dn0, dn1, dn2], 5ms latency from dn0 to dn1, 100ms
* from dn1 to dn2, NameNode claims dn2 is slow since it sees 100ms latency to
* dn2. Note that NameNode is not ware of pipeline structure in this context
* and only sees latency between two DataNodes.
* </p>
* <p>
* In another case of the same pipeline, 100ms latency from dn0 to dn1, 5ms
* from dn1 to dn2, NameNode will miss detecting dn1 being slow since it's not
* the last node. However the assumption is that in a busy enough cluster
* there are many other pipelines where dn1 is the last node, e.g. [dn3, dn4,
* dn1]. Also our tracking interval is relatively long enough (at least an
* hour) to improve the chances of the bad DataNodes being the last nodes in
* multiple pipelines.
* </p>
*/
private void trackSendPacketToLastNodeInPipeline(final long elapsedMs) {
final DataNodePeerMetrics peerMetrics = datanode.getPeerMetrics();
if (peerMetrics != null && isPenultimateNode) {
peerMetrics.addSendPacketDownstream(mirrorNameForMetrics, elapsedMs);
}
}
private static byte[] copyLastChunkChecksum(byte[] array, int size, int end) {
return Arrays.copyOfRange(array, end - size, end);
}
private void manageWriterOsCache(long offsetInBlock) {
try {
if (streams.getOutFd() != null &&
offsetInBlock > lastCacheManagementOffset + CACHE_DROP_LAG_BYTES) {
long begin = Time.monotonicNow();
//
// For SYNC_FILE_RANGE_WRITE, we want to sync from
// lastCacheManagementOffset to a position "two windows ago"
//
// <========= sync ===========>
// +-----------------------O--------------------------X
// start last curPos
// of file
//
if (syncBehindWrites) {
if (syncBehindWritesInBackground) {
this.datanode.getFSDataset().submitBackgroundSyncFileRangeRequest(
block, streams, lastCacheManagementOffset,
offsetInBlock - lastCacheManagementOffset,
SYNC_FILE_RANGE_WRITE);
} else {
streams.syncFileRangeIfPossible(lastCacheManagementOffset,
offsetInBlock - lastCacheManagementOffset,
SYNC_FILE_RANGE_WRITE);
}
}
//
// For POSIX_FADV_DONTNEED, we want to drop from the beginning
// of the file to a position prior to the current position.
//
// <=== drop =====>
// <---W--->
// +--------------+--------O--------------------------X
// start dropPos last curPos
// of file
//
long dropPos = lastCacheManagementOffset - CACHE_DROP_LAG_BYTES;
if (dropPos > 0 && dropCacheBehindWrites) {
streams.dropCacheBehindWrites(block.getBlockName(), 0, dropPos,
POSIX_FADV_DONTNEED);
}
lastCacheManagementOffset = offsetInBlock;
long duration = Time.monotonicNow() - begin;
if (duration > datanodeSlowLogThresholdMs) {
LOG.warn("Slow manageWriterOsCache took " + duration
+ "ms (threshold=" + datanodeSlowLogThresholdMs + "ms)");
}
}
} catch (Throwable t) {
LOG.warn("Error managing cache for writer of block " + block, t);
}
}
public void sendOOB() throws IOException, InterruptedException {
if (isDatanode) {
return;
}
((PacketResponder) responder.getRunnable()).sendOOBResponse(PipelineAck
.getRestartOOBStatus());
}
void receiveBlock(
DataOutputStream mirrOut, // output to next datanode
DataInputStream mirrIn, // input from next datanode
DataOutputStream replyOut, // output to previous datanode
String mirrAddr, DataTransferThrottler throttlerArg,
DatanodeInfo[] downstreams,
boolean isReplaceBlock) throws IOException {
syncOnClose = datanode.getDnConf().syncOnClose;
boolean responderClosed = false;
mirrorOut = mirrOut;
mirrorAddr = mirrAddr;
isPenultimateNode = ((downstreams != null) && (downstreams.length == 1));
if (isPenultimateNode) {
mirrorNameForMetrics = (downstreams[0].getInfoSecurePort() != 0 ?
downstreams[0].getInfoSecureAddr() : downstreams[0].getInfoAddr());
LOG.debug("Will collect peer metrics for downstream node {}",
mirrorNameForMetrics);
}
throttler = throttlerArg;
this.replyOut = replyOut;
this.isReplaceBlock = isReplaceBlock;
try {
if (isClient && !isTransfer) {
responder = new Daemon(datanode.threadGroup,
new PacketResponder(replyOut, mirrIn, downstreams));
responder.start(); // start thread to processes responses
}
while (receivePacket() >= 0) { /* Receive until the last packet */ }
// wait for all outstanding packet responses. And then
// indicate responder to gracefully shutdown.
// Mark that responder has been closed for future processing
if (responder != null) {
((PacketResponder)responder.getRunnable()).close();
responderClosed = true;
}
// If this write is for a replication or transfer-RBW/Finalized,
// then finalize block or convert temporary to RBW.
// For client-writes, the block is finalized in the PacketResponder.
if (isDatanode || isTransfer) {
// Hold a volume reference to finalize block.
try (ReplicaHandler handler = claimReplicaHandler()) {
// close the block/crc files
close();
block.setNumBytes(replicaInfo.getNumBytes());
if (stage == BlockConstructionStage.TRANSFER_RBW) {
// for TRANSFER_RBW, convert temporary to RBW
datanode.data.convertTemporaryToRbw(block);
} else {
// for isDatnode or TRANSFER_FINALIZED
// Finalize the block.
datanode.data.finalizeBlock(block);
}
}
datanode.metrics.incrBlocksWritten();
}
} catch (IOException ioe) {
replicaInfo.releaseAllBytesReserved();
if (datanode.isRestarting()) {
// Do not throw if shutting down for restart. Otherwise, it will cause
// premature termination of responder.
LOG.info("Shutting down for restart (" + block + ").");
} else {
LOG.info("Exception for " + block, ioe);
throw ioe;
}
} finally {
// Clear the previous interrupt state of this thread.
Thread.interrupted();
// If a shutdown for restart was initiated, upstream needs to be notified.
// There is no need to do anything special if the responder was closed
// normally.
if (!responderClosed) { // Data transfer was not complete.
if (responder != null) {
// In case this datanode is shutting down for quick restart,
// send a special ack upstream.
if (datanode.isRestarting() && isClient && !isTransfer) {
try (Writer out = new OutputStreamWriter(
replicaInfo.createRestartMetaStream(), "UTF-8")) {
// write out the current time.
out.write(Long.toString(Time.now() + restartBudget));
out.flush();
} catch (IOException ioe) {
// The worst case is not recovering this RBW replica.
// Client will fall back to regular pipeline recovery.
} finally {
IOUtils.closeStream(streams.getDataOut());
}
try {
// Even if the connection is closed after the ack packet is
// flushed, the client can react to the connection closure
// first. Insert a delay to lower the chance of client
// missing the OOB ack.
Thread.sleep(1000);
} catch (InterruptedException ie) {
// It is already going down. Ignore this.
}
}
responder.interrupt();
}
IOUtils.closeStream(this);
cleanupBlock();
}
if (responder != null) {
try {
responder.interrupt();
// join() on the responder should timeout a bit earlier than the
// configured deadline. Otherwise, the join() on this thread will
// likely timeout as well.
long joinTimeout = datanode.getDnConf().getXceiverStopTimeout();
joinTimeout = joinTimeout > 1 ? joinTimeout*8/10 : joinTimeout;
responder.join(joinTimeout);
if (responder.isAlive()) {
String msg = "Join on responder thread " + responder
+ " timed out";
LOG.warn(msg + "\n" + StringUtils.getStackTrace(responder));
throw new IOException(msg);
}
} catch (InterruptedException e) {
responder.interrupt();
// do not throw if shutting down for restart.
if (!datanode.isRestarting()) {
throw new IOException("Interrupted receiveBlock");
}
}
responder = null;
}
}
}
/** Cleanup a partial block
* if this write is for a replication request (and not from a client)
*/
private void cleanupBlock() throws IOException {
if (isDatanode) {
datanode.data.unfinalizeBlock(block);
}
}
/**
* Adjust the file pointer in the local meta file so that the last checksum
* will be overwritten.
*/
private void adjustCrcFilePosition() throws IOException {
streams.flushDataOut();
if (checksumOut != null) {
checksumOut.flush();
}
// rollback the position of the meta file
datanode.data.adjustCrcChannelPosition(block, streams, checksumSize);
}
/**
* Convert a checksum byte array to a long
*/
static private long checksum2long(byte[] checksum) {
long crc = 0L;
for(int i=0; i<checksum.length; i++) {
crc |= (0xffL&checksum[i])<<((checksum.length-i-1)*8);
}
return crc;
}
/**
* reads in the partial crc chunk and computes checksum
* of pre-existing data in partial chunk.
*/
private Checksum computePartialChunkCrc(long blkoff, long ckoff)
throws IOException {
// find offset of the beginning of partial chunk.
//
int sizePartialChunk = (int) (blkoff % bytesPerChecksum);
blkoff = blkoff - sizePartialChunk;
if (LOG.isDebugEnabled()) {
LOG.debug("computePartialChunkCrc for " + block
+ ": sizePartialChunk=" + sizePartialChunk
+ ", block offset=" + blkoff
+ ", metafile offset=" + ckoff);
}
// create an input stream from the block file
// and read in partial crc chunk into temporary buffer
//
byte[] buf = new byte[sizePartialChunk];
byte[] crcbuf = new byte[checksumSize];
try (ReplicaInputStreams instr =
datanode.data.getTmpInputStreams(block, blkoff, ckoff)) {
instr.readDataFully(buf, 0, sizePartialChunk);
// open meta file and read in crc value computer earlier
instr.readChecksumFully(crcbuf, 0, crcbuf.length);
}
// compute crc of partial chunk from data read in the block file.
final Checksum partialCrc = DataChecksum.newDataChecksum(
diskChecksum.getChecksumType(), diskChecksum.getBytesPerChecksum());
partialCrc.update(buf, 0, sizePartialChunk);
if (LOG.isDebugEnabled()) {
LOG.debug("Read in partial CRC chunk from disk for " + block);
}
// paranoia! verify that the pre-computed crc matches what we
// recalculated just now
if (partialCrc.getValue() != checksum2long(crcbuf)) {
String msg = "Partial CRC " + partialCrc.getValue() +
" does not match value computed the " +
" last time file was closed " +
checksum2long(crcbuf);
throw new IOException(msg);
}
return partialCrc;
}
/** The caller claims the ownership of the replica handler. */
private ReplicaHandler claimReplicaHandler() {
ReplicaHandler handler = replicaHandler;
replicaHandler = null;
return handler;
}
private static enum PacketResponderType {
NON_PIPELINE, LAST_IN_PIPELINE, HAS_DOWNSTREAM_IN_PIPELINE
}
/**
* Processes responses from downstream datanodes in the pipeline
* and sends back replies to the originator.
*/
class PacketResponder implements Runnable, Closeable {
/** queue for packets waiting for ack - synchronization using monitor lock */
private final LinkedList<Packet> ackQueue = new LinkedList<Packet>();
/** the thread that spawns this responder */
private final Thread receiverThread = Thread.currentThread();
/** is this responder running? - synchronization using monitor lock */
private volatile boolean running = true;
/** input from the next downstream datanode */
private final DataInputStream downstreamIn;
/** output to upstream datanode/client */
private final DataOutputStream upstreamOut;
/** The type of this responder */
private final PacketResponderType type;
/** for log and error messages */
private final String myString;
private boolean sending = false;
@Override
public String toString() {
return myString;
}
PacketResponder(final DataOutputStream upstreamOut,
final DataInputStream downstreamIn, final DatanodeInfo[] downstreams) {
this.downstreamIn = downstreamIn;
this.upstreamOut = upstreamOut;
this.type = downstreams == null? PacketResponderType.NON_PIPELINE
: downstreams.length == 0? PacketResponderType.LAST_IN_PIPELINE
: PacketResponderType.HAS_DOWNSTREAM_IN_PIPELINE;
final StringBuilder b = new StringBuilder(getClass().getSimpleName())
.append(": ").append(block).append(", type=").append(type);
if (type == PacketResponderType.HAS_DOWNSTREAM_IN_PIPELINE) {
b.append(", downstreams=").append(downstreams.length)
.append(":").append(Arrays.asList(downstreams));
}
this.myString = b.toString();
}
private boolean isRunning() {
// When preparing for a restart, it should continue to run until
// interrupted by the receiver thread.
return running && (datanode.shouldRun || datanode.isRestarting());
}
/**
* enqueue the seqno that is still be to acked by the downstream datanode.
* @param seqno sequence number of the packet
* @param lastPacketInBlock if true, this is the last packet in block
* @param offsetInBlock offset of this packet in block
*/
void enqueue(final long seqno, final boolean lastPacketInBlock,
final long offsetInBlock, final Status ackStatus) {
final Packet p = new Packet(seqno, lastPacketInBlock, offsetInBlock,
System.nanoTime(), ackStatus);
if(LOG.isDebugEnabled()) {
LOG.debug(myString + ": enqueue " + p);
}
synchronized(ackQueue) {
if (running) {
ackQueue.addLast(p);
ackQueue.notifyAll();
}
}
}
/**
* Send an OOB response. If all acks have been sent already for the block
* and the responder is about to close, the delivery is not guaranteed.
* This is because the other end can close the connection independently.
* An OOB coming from downstream will be automatically relayed upstream
* by the responder. This method is used only by originating datanode.
*
* @param ackStatus the type of ack to be sent
*/
void sendOOBResponse(final Status ackStatus) throws IOException,
InterruptedException {
if (!running) {
LOG.info("Cannot send OOB response " + ackStatus +
". Responder not running.");
return;
}
synchronized(this) {
if (sending) {
wait(datanode.getOOBTimeout(ackStatus));
// Didn't get my turn in time. Give up.
if (sending) {
throw new IOException("Could not send OOB reponse in time: "
+ ackStatus);
}
}
sending = true;
}
LOG.info("Sending an out of band ack of type " + ackStatus);
try {
sendAckUpstreamUnprotected(null, PipelineAck.UNKOWN_SEQNO, 0L, 0L,
PipelineAck.combineHeader(datanode.getECN(), ackStatus));
} finally {
// Let others send ack. Unless there are miltiple OOB send
// calls, there can be only one waiter, the responder thread.
// In any case, only one needs to be notified.
synchronized(this) {
sending = false;
notify();
}
}
}
/** Wait for a packet with given {@code seqno} to be enqueued to ackQueue */
Packet waitForAckHead(long seqno) throws InterruptedException {
synchronized(ackQueue) {
while (isRunning() && ackQueue.size() == 0) {
if (LOG.isDebugEnabled()) {
LOG.debug(myString + ": seqno=" + seqno +
" waiting for local datanode to finish write.");
}
ackQueue.wait();
}
return isRunning() ? ackQueue.getFirst() : null;
}
}
/**
* wait for all pending packets to be acked. Then shutdown thread.
*/
@Override
public void close() {
synchronized(ackQueue) {
while (isRunning() && ackQueue.size() != 0) {
try {
ackQueue.wait();
} catch (InterruptedException e) {
running = false;
Thread.currentThread().interrupt();
}
}
if(LOG.isDebugEnabled()) {
LOG.debug(myString + ": closing");
}
running = false;
ackQueue.notifyAll();
}
synchronized(this) {
running = false;
notifyAll();
}
}
/**
* Thread to process incoming acks.
* @see java.lang.Runnable#run()
*/
@Override
public void run() {
boolean lastPacketInBlock = false;
final long startTime = ClientTraceLog.isInfoEnabled() ? System.nanoTime() : 0;
while (isRunning() && !lastPacketInBlock) {
long totalAckTimeNanos = 0;
boolean isInterrupted = false;
try {
Packet pkt = null;
long expected = -2;
PipelineAck ack = new PipelineAck();
long seqno = PipelineAck.UNKOWN_SEQNO;
long ackRecvNanoTime = 0;
try {
if (type != PacketResponderType.LAST_IN_PIPELINE && !mirrorError) {
DataNodeFaultInjector.get().failPipeline(replicaInfo, mirrorAddr);
// read an ack from downstream datanode
ack.readFields(downstreamIn);
ackRecvNanoTime = System.nanoTime();
if (LOG.isDebugEnabled()) {
LOG.debug(myString + " got " + ack);
}
// Process an OOB ACK.
Status oobStatus = ack.getOOBStatus();
if (oobStatus != null) {
LOG.info("Relaying an out of band ack of type " + oobStatus);
sendAckUpstream(ack, PipelineAck.UNKOWN_SEQNO, 0L, 0L,
PipelineAck.combineHeader(datanode.getECN(),
Status.SUCCESS));
continue;
}
seqno = ack.getSeqno();
}
if (seqno != PipelineAck.UNKOWN_SEQNO
|| type == PacketResponderType.LAST_IN_PIPELINE) {
pkt = waitForAckHead(seqno);
if (!isRunning()) {
break;
}
expected = pkt.seqno;
if (type == PacketResponderType.HAS_DOWNSTREAM_IN_PIPELINE
&& seqno != expected) {
throw new IOException(myString + "seqno: expected=" + expected
+ ", received=" + seqno);
}
if (type == PacketResponderType.HAS_DOWNSTREAM_IN_PIPELINE) {
// The total ack time includes the ack times of downstream
// nodes.
// The value is 0 if this responder doesn't have a downstream
// DN in the pipeline.
totalAckTimeNanos = ackRecvNanoTime - pkt.ackEnqueueNanoTime;
// Report the elapsed time from ack send to ack receive minus
// the downstream ack time.
long ackTimeNanos = totalAckTimeNanos
- ack.getDownstreamAckTimeNanos();
if (ackTimeNanos < 0) {
if (LOG.isDebugEnabled()) {
LOG.debug("Calculated invalid ack time: " + ackTimeNanos
+ "ns.");
}
} else {
datanode.metrics.addPacketAckRoundTripTimeNanos(ackTimeNanos);
}
}
lastPacketInBlock = pkt.lastPacketInBlock;
}
} catch (InterruptedException ine) {
isInterrupted = true;
} catch (IOException ioe) {
if (Thread.interrupted()) {
isInterrupted = true;
} else if (ioe instanceof EOFException && !packetSentInTime()) {
// The downstream error was caused by upstream including this
// node not sending packet in time. Let the upstream determine
// who is at fault. If the immediate upstream node thinks it
// has sent a packet in time, this node will be reported as bad.
// Otherwise, the upstream node will propagate the error up by
// closing the connection.
LOG.warn("The downstream error might be due to congestion in " +
"upstream including this node. Propagating the error: ",
ioe);
throw ioe;
} else {
// continue to run even if can not read from mirror
// notify client of the error
// and wait for the client to shut down the pipeline
mirrorError = true;
LOG.info(myString, ioe);
}
}
if (Thread.interrupted() || isInterrupted) {
/*
* The receiver thread cancelled this thread. We could also check
* any other status updates from the receiver thread (e.g. if it is
* ok to write to replyOut). It is prudent to not send any more
* status back to the client because this datanode has a problem.
* The upstream datanode will detect that this datanode is bad, and
* rightly so.
*
* The receiver thread can also interrupt this thread for sending
* an out-of-band response upstream.
*/
LOG.info(myString + ": Thread is interrupted.");
running = false;
continue;
}
if (lastPacketInBlock) {
// Finalize the block and close the block file
finalizeBlock(startTime);
}
Status myStatus = pkt != null ? pkt.ackStatus : Status.SUCCESS;
sendAckUpstream(ack, expected, totalAckTimeNanos,
(pkt != null ? pkt.offsetInBlock : 0),
PipelineAck.combineHeader(datanode.getECN(), myStatus));
if (pkt != null) {
// remove the packet from the ack queue
removeAckHead();
}
} catch (IOException e) {
LOG.warn("IOException in BlockReceiver.run(): ", e);
if (running) {
// Volume error check moved to FileIoProvider
LOG.info(myString, e);
running = false;
if (!Thread.interrupted()) { // failure not caused by interruption
receiverThread.interrupt();
}
}
} catch (Throwable e) {
if (running) {
LOG.info(myString, e);
running = false;
receiverThread.interrupt();
}
}
}
LOG.info(myString + " terminating");
}
/**
* Finalize the block and close the block file
* @param startTime time when BlockReceiver started receiving the block
*/
private void finalizeBlock(long startTime) throws IOException {
long endTime = 0;
// Hold a volume reference to finalize block.
try (ReplicaHandler handler = BlockReceiver.this.claimReplicaHandler()) {
BlockReceiver.this.close();
endTime = ClientTraceLog.isInfoEnabled() ? System.nanoTime() : 0;
block.setNumBytes(replicaInfo.getNumBytes());
datanode.data.finalizeBlock(block);
}
if (pinning) {
datanode.data.setPinning(block);
}
datanode.closeBlock(block, null, replicaInfo.getStorageUuid(),
replicaInfo.isOnTransientStorage());
if (ClientTraceLog.isInfoEnabled() && isClient) {
long offset = 0;
DatanodeRegistration dnR = datanode.getDNRegistrationForBP(block
.getBlockPoolId());
ClientTraceLog.info(String.format(DN_CLIENTTRACE_FORMAT, inAddr,
myAddr, block.getNumBytes(), "HDFS_WRITE", clientname, offset,
dnR.getDatanodeUuid(), block, endTime - startTime));
} else {
LOG.info("Received " + block + " size " + block.getNumBytes()
+ " from " + inAddr);
}
}
/**
* The wrapper for the unprotected version. This is only called by
* the responder's run() method.
*
* @param ack Ack received from downstream
* @param seqno sequence number of ack to be sent upstream
* @param totalAckTimeNanos total ack time including all the downstream
* nodes
* @param offsetInBlock offset in block for the data in packet
* @param myHeader the local ack header
*/
private void sendAckUpstream(PipelineAck ack, long seqno,
long totalAckTimeNanos, long offsetInBlock,
int myHeader) throws IOException {
try {
// Wait for other sender to finish. Unless there is an OOB being sent,
// the responder won't have to wait.
synchronized(this) {
while(sending) {
wait();
}
sending = true;
}
try {
if (!running) return;
sendAckUpstreamUnprotected(ack, seqno, totalAckTimeNanos,
offsetInBlock, myHeader);
} finally {
synchronized(this) {
sending = false;
notify();
}
}
} catch (InterruptedException ie) {
// The responder was interrupted. Make it go down without
// interrupting the receiver(writer) thread.
running = false;
}
}
/**
* @param ack Ack received from downstream
* @param seqno sequence number of ack to be sent upstream
* @param totalAckTimeNanos total ack time including all the downstream
* nodes
* @param offsetInBlock offset in block for the data in packet
* @param myHeader the local ack header
*/
private void sendAckUpstreamUnprotected(PipelineAck ack, long seqno,
long totalAckTimeNanos, long offsetInBlock, int myHeader)
throws IOException {
final int[] replies;
if (ack == null) {
// A new OOB response is being sent from this node. Regardless of
// downstream nodes, reply should contain one reply.
replies = new int[] { myHeader };
} else if (mirrorError) { // ack read error
int h = PipelineAck.combineHeader(datanode.getECN(), Status.SUCCESS);
int h1 = PipelineAck.combineHeader(datanode.getECN(), Status.ERROR);
replies = new int[] {h, h1};
} else {
short ackLen = type == PacketResponderType.LAST_IN_PIPELINE ? 0 : ack
.getNumOfReplies();
replies = new int[ackLen + 1];
replies[0] = myHeader;
for (int i = 0; i < ackLen; ++i) {
replies[i + 1] = ack.getHeaderFlag(i);
}
// If the mirror has reported that it received a corrupt packet,
// do self-destruct to mark myself bad, instead of making the
// mirror node bad. The mirror is guaranteed to be good without
// corrupt data on disk.
if (ackLen > 0 && PipelineAck.getStatusFromHeader(replies[1]) ==
Status.ERROR_CHECKSUM) {
throw new IOException("Shutting down writer and responder "
+ "since the down streams reported the data sent by this "
+ "thread is corrupt");
}
}
PipelineAck replyAck = new PipelineAck(seqno, replies,
totalAckTimeNanos);
if (replyAck.isSuccess()
&& offsetInBlock > replicaInfo.getBytesAcked()) {
replicaInfo.setBytesAcked(offsetInBlock);
}
// send my ack back to upstream datanode
long begin = Time.monotonicNow();
/* for test only, no-op in production system */
DataNodeFaultInjector.get().delaySendingAckToUpstream(inAddr);
replyAck.write(upstreamOut);
upstreamOut.flush();
long duration = Time.monotonicNow() - begin;
DataNodeFaultInjector.get().logDelaySendingAckToUpstream(
inAddr,
duration);
if (duration > datanodeSlowLogThresholdMs) {
LOG.warn("Slow PacketResponder send ack to upstream took " + duration
+ "ms (threshold=" + datanodeSlowLogThresholdMs + "ms), " + myString
+ ", replyAck=" + replyAck);
} else if (LOG.isDebugEnabled()) {
LOG.debug(myString + ", replyAck=" + replyAck);
}
// If a corruption was detected in the received data, terminate after
// sending ERROR_CHECKSUM back.
Status myStatus = PipelineAck.getStatusFromHeader(myHeader);
if (myStatus == Status.ERROR_CHECKSUM) {
throw new IOException("Shutting down writer and responder "
+ "due to a checksum error in received data. The error "
+ "response has been sent upstream.");
}
}
/**
* Remove a packet from the head of the ack queue
*
* This should be called only when the ack queue is not empty
*/
private void removeAckHead() {
synchronized(ackQueue) {
ackQueue.removeFirst();
ackQueue.notifyAll();
}
}
}
/**
* This information is cached by the Datanode in the ackQueue.
*/
private static class Packet {
final long seqno;
final boolean lastPacketInBlock;
final long offsetInBlock;
final long ackEnqueueNanoTime;
final Status ackStatus;
Packet(long seqno, boolean lastPacketInBlock, long offsetInBlock,
long ackEnqueueNanoTime, Status ackStatus) {
this.seqno = seqno;
this.lastPacketInBlock = lastPacketInBlock;
this.offsetInBlock = offsetInBlock;
this.ackEnqueueNanoTime = ackEnqueueNanoTime;
this.ackStatus = ackStatus;
}
@Override
public String toString() {
return getClass().getSimpleName() + "(seqno=" + seqno
+ ", lastPacketInBlock=" + lastPacketInBlock
+ ", offsetInBlock=" + offsetInBlock
+ ", ackEnqueueNanoTime=" + ackEnqueueNanoTime
+ ", ackStatus=" + ackStatus
+ ")";
}
}
}
| HDFS-11547. Add logs for slow BlockReceiver while writing data to disk. Contributed by Xiaobing Zhou.
| hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BlockReceiver.java | HDFS-11547. Add logs for slow BlockReceiver while writing data to disk. Contributed by Xiaobing Zhou. | <ide><path>adoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BlockReceiver.java
<ide> streams.writeDataToDisk(dataBuf.array(),
<ide> startByteToDisk, numBytesToDisk);
<ide> long duration = Time.monotonicNow() - begin;
<add> if (duration > datanodeSlowLogThresholdMs) {
<add> LOG.warn("Slow BlockReceiver write data to disk cost:" + duration
<add> + "ms (threshold=" + datanodeSlowLogThresholdMs + "ms)");
<add> }
<ide>
<ide> if (duration > maxWriteToDiskMs) {
<ide> maxWriteToDiskMs = duration; |
|
Java | epl-1.0 | 809c54a78d1ec98635165d9ac1544203288ac818 | 0 | jtrfp/terminal-recall,jtrfp/terminal-recall,jtrfp/terminal-recall | /*******************************************************************************
* This file is part of TERMINAL RECALL
* Copyright (c) 2012-2016 Chuck Ritola
* Part of the jTRFP.org project
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the GNU Public License v3.0
* which accompanies this distribution, and is available at
* http://www.gnu.org/licenses/gpl.html
*
* Contributors:
* chuck - initial API and implementation
******************************************************************************/
package org.jtrfp.trcl.obj;
import java.beans.PropertyChangeListener;
import java.beans.PropertyChangeSupport;
import java.lang.ref.WeakReference;
import java.util.ArrayList;
import java.util.concurrent.Callable;
import java.util.concurrent.locks.ReentrantLock;
import org.apache.commons.math3.exception.MathArithmeticException;
import org.apache.commons.math3.geometry.euclidean.threed.Vector3D;
import org.jtrfp.trcl.ObjectDefinitionWindow;
import org.jtrfp.trcl.PrimitiveList;
import org.jtrfp.trcl.SpacePartitioningGrid;
import org.jtrfp.trcl.Submitter;
import org.jtrfp.trcl.WeakPropertyChangeSupport;
import org.jtrfp.trcl.World;
import org.jtrfp.trcl.beh.Behavior;
import org.jtrfp.trcl.beh.BehaviorNotFoundException;
import org.jtrfp.trcl.beh.CollisionBehavior;
import org.jtrfp.trcl.coll.CollectionActionDispatcher;
import org.jtrfp.trcl.coll.PropertyListenable;
import org.jtrfp.trcl.core.NotReadyException;
import org.jtrfp.trcl.core.TR;
import org.jtrfp.trcl.core.TRFuture;
import org.jtrfp.trcl.gpu.GPU;
import org.jtrfp.trcl.gpu.Model;
import org.jtrfp.trcl.gpu.RenderList;
import org.jtrfp.trcl.gpu.Renderer;
import org.jtrfp.trcl.math.Mat4x4;
import org.jtrfp.trcl.math.Vect3D;
import org.jtrfp.trcl.math.Vect3D.ZeroNormException;
import org.jtrfp.trcl.mem.VEC4Address;
public class WorldObject implements PositionedRenderable, PropertyListenable, Rotatable {
public static final String HEADING ="heading";
public static final String TOP ="top";
public static final String ACTIVE ="active";
private double[] heading = new double[] { 0, 0, 1 }, oldHeading= new double[] {Double.NEGATIVE_INFINITY,Double.NEGATIVE_INFINITY,Double.NEGATIVE_INFINITY};
private double[] top = new double[] { 0, 1, 0 }, oldTop = new double[] {Double.NEGATIVE_INFINITY,Double.NEGATIVE_INFINITY,Double.NEGATIVE_INFINITY};
protected volatile double[]
position = new double[3],
positionAfterLoop = new double[3],
oldPosition = new double[]{Double.NEGATIVE_INFINITY,Double.NEGATIVE_INFINITY,Double.NEGATIVE_INFINITY};
private boolean loopedBefore = false;
protected double[] modelOffset= new double[3];
private final double[]positionWithOffset
= new double[3];
private boolean needToRecalcMatrix=true;
private final TR tr;
private boolean visible = true;
private TRFuture<Model>model;
private int[] triangleObjectDefinitions;
private int[] transparentTriangleObjectDefinitions;
protected Integer matrixID;
private volatile WeakReference<SpacePartitioningGrid> containingGrid;
private ArrayList<Behavior> inactiveBehaviors = new ArrayList<Behavior>();
private ArrayList<CollisionBehavior>collisionBehaviors = new ArrayList<CollisionBehavior>();
private ArrayList<Behavior> tickBehaviors = new ArrayList<Behavior>();
private boolean active = true;
private byte renderFlags=0;
private boolean immuneToOpaqueDepthTest = false;
private boolean objectDefsInitialized = false;
protected final double[] aX = new double[3];
protected final double[] aY = new double[3];
protected final double[] aZ = new double[3];
protected final double[] rotTransM = new double[16];
protected final double[] camM = new double[16];
protected final double[] rMd = new double[16];
protected final double[] tMd = new double[16];
protected double[] cMd = new double[16];
private boolean respondToTick = true;
private double scale = 1.;
private final ReentrantLock lock = new ReentrantLock();
private CollectionActionDispatcher<VEC4Address> opaqueObjectDefinitionAddressesInVEC4 = new CollectionActionDispatcher<VEC4Address>(new ArrayList<VEC4Address>());
private CollectionActionDispatcher<VEC4Address> transparentObjectDefinitionAddressesInVEC4 = new CollectionActionDispatcher<VEC4Address>(new ArrayList<VEC4Address>());
protected final WeakPropertyChangeSupport pcs = new WeakPropertyChangeSupport(new PropertyChangeSupport(this));
public enum RenderFlags{
IgnoreCamera((byte)0x1);
private final byte mask;
private RenderFlags(byte mask){
this.mask=mask;
}
public byte getMask() {
return mask;
}
};
public WorldObject(TR tr) {
this.tr = tr;
// Matrix constants setup
rMd[15] = 1;
tMd[0] = 1;
tMd[5] = 1;
tMd[10] = 1;
tMd[15] = 1;
}
public WorldObject(TR tr, Model m) {
this(tr);
setModel(m);
}// end constructor
void proposeCollision(WorldObject other) {
for (int i = 0; i < collisionBehaviors.size(); i++) {
collisionBehaviors.get(i).proposeCollision(other);
}// end for(collisionBehaviors)
}// end proposeCollision(...)
public boolean isCollideable(){
return !collisionBehaviors.isEmpty();
}
public <T extends Behavior> T addBehavior(T ob) {
if (ob.isEnabled()) {
if (ob instanceof CollisionBehavior)
collisionBehaviors.add((CollisionBehavior) ob);
tickBehaviors.add(ob);
} else {
inactiveBehaviors.add(ob);
}
ob.setParent(this);
return ob;
}
public <T extends Behavior> T removeBehavior(T beh) {
if (beh.isEnabled()) {
if (beh instanceof CollisionBehavior)
collisionBehaviors.remove((CollisionBehavior) beh);
tickBehaviors.remove(beh);
} else
inactiveBehaviors.remove(beh);
return beh;
}//end removeBehavior()
protected boolean recalcMatrixWithEachFrame(){
return false;
}
public <T> T probeForBehavior(Class<T> bC) {
if (bC.isAssignableFrom(CollisionBehavior.class)) {
for (int i = 0; i < collisionBehaviors.size(); i++) {
if (bC.isAssignableFrom(collisionBehaviors.get(i).getClass())) {
return (T) collisionBehaviors.get(i);
}
}// end if(instanceof)
}// emd if(isAssignableFrom(CollisionBehavior.class))
for (int i = 0; i < inactiveBehaviors.size(); i++) {
if (bC.isAssignableFrom(inactiveBehaviors.get(i).getClass())) {
return (T) inactiveBehaviors.get(i);
}
}// end if(instanceof)
for (int i = 0; i < tickBehaviors.size(); i++) {
if (bC.isAssignableFrom(tickBehaviors.get(i).getClass())) {
return (T) tickBehaviors.get(i);
}
}// end if(instanceof)
throw new BehaviorNotFoundException("Cannot find behavior of type "
+ bC.getName() + " in behavior sandwich owned by "
+ this.toString());
}// end probeForBehavior
public <T> void probeForBehaviors(Submitter<T> sub, Class<T> type) {
final ArrayList<T> result = new ArrayList<T>();
synchronized(collisionBehaviors){
if (type.isAssignableFrom(CollisionBehavior.class)) {
for (int i = 0; i < collisionBehaviors.size(); i++) {
if (type.isAssignableFrom(collisionBehaviors.get(i).getClass())) {
result.add((T) collisionBehaviors.get(i));
}
}// end if(instanceof)
}// end isAssignableFrom(CollisionBehavior.class)
}synchronized(inactiveBehaviors){
for (int i = 0; i < inactiveBehaviors.size(); i++) {
if (type.isAssignableFrom(inactiveBehaviors.get(i).getClass()))
result.add((T) inactiveBehaviors.get(i));
}// end if(instanceof)
}synchronized(tickBehaviors){
for (int i = 0; i < tickBehaviors.size(); i++) {
if (type.isAssignableFrom(tickBehaviors.get(i).getClass()))
result.add((T) tickBehaviors.get(i));
}// end for (tickBehaviors)
}//end sync(tickBehaviors)
sub.submit(result);
}// end probeForBehaviors(...)
public void tick(long time) {
if(!respondToTick)return;
synchronized(tickBehaviors){
for (int i = 0; i < tickBehaviors.size() && isActive(); i++)
tickBehaviors.get(i).proposeTick(time);
}//end sync(tickBehaviors)
}// end tick(...)
private final int [] emptyIntArray = new int[0];
public void setModel(Model m) {
if (m == null)
throw new RuntimeException("Passed model cannot be null.");
final TRFuture<Model> thisModelFuture = this.model;
if(thisModelFuture != null)
releaseCurrentModel();
try{this.model = m.finalizeModel();}catch(Exception e){throw new RuntimeException(e);}
}// end setModel(...)
private void releaseCurrentModel(){
if(transparentTriangleObjectDefinitions!=null)
for(int def:transparentTriangleObjectDefinitions)
tr.gpu.get().objectDefinitionWindow.get().freeLater(def);
if(triangleObjectDefinitions!=null)
for(int def:triangleObjectDefinitions)
tr.gpu.get().objectDefinitionWindow.get().freeLater(def);
RenderList.RENDER_LIST_EXECUTOR.submit(new Runnable(){
@Override
public void run() {
getOpaqueObjectDefinitionAddressesInVEC4() .clear();
getTransparentObjectDefinitionAddressesInVEC4().clear();
}});
transparentTriangleObjectDefinitions = null;
triangleObjectDefinitions = null;
this.model = null;
objectDefsInitialized = false;
}//end releaseCurrentModel()
public void setDirection(ObjectDirection dir) {
lock.lock();
try{
if (dir.getHeading().getNorm() == 0 || dir.getTop().getNorm() == 0) {
System.err
.println("Warning: Rejecting zero-norm for object direction. "
+ dir);
new Exception().printStackTrace();
return;
}
setHeading(dir.getHeading());
setTop(dir.getTop());
}finally {lock.unlock();}
}//end setDirection(...)
@Override
public String toString() {
final String modelDebugName;
if(model!=null)modelDebugName=getModel().getDebugName();
else modelDebugName="[null model]";
return "WorldObject Model=" + modelDebugName + " pos="
+ this.getPosition() + " class=" + getClass().getName()+" hash="+hashCode();
}
public final void initializeObjectDefinitions() throws NotReadyException {
if(objectDefsInitialized)
return;
if (model == null)
throw new NullPointerException(
"Model is null. Did you forget to set it? Object in question is: \n"+this.toString());
final Model model = getModelRealtime();
tr.getThreadManager().submitToThreadPool(new Callable<Void>(){
@Override
public Void call() throws Exception {
tr.getThreadManager().submitToGPUMemAccess(new Callable<Void>(){
@Override
public Void call() throws Exception {
processPrimitiveList(model.getTriangleList(),
getTriangleObjectDefinitions(), getOpaqueObjectDefinitionAddressesInVEC4());
processPrimitiveList(model.getTransparentTriangleList(),
getTransparentTriangleObjectDefinitions(), getTransparentObjectDefinitionAddressesInVEC4());
return null;
}}).get();
updateAllRenderFlagStates();
objectDefsInitialized = true;
return null;
}});
}// end initializeObjectDefinitions()
private void processPrimitiveList(PrimitiveList<?> primitiveList,
int[] objectDefinitions, final CollectionActionDispatcher<VEC4Address> objectDefinitionAddressesInVEC4) {
if (primitiveList == null)
return; // Nothing to do, no primitives here
final int gpuVerticesPerElement = primitiveList.getGPUVerticesPerElement();
final int elementsPerBlock = GPU.GPU_VERTICES_PER_BLOCK / gpuVerticesPerElement;
int gpuVerticesRemaining = primitiveList.getNumElements()*gpuVerticesPerElement;
// For each of the allocated-but-not-yet-initialized object definitions.
final ObjectDefinitionWindow odw = tr.gpu.get().objectDefinitionWindow.get();
int odCounter=0;
final int memoryWindowIndicesPerElement = primitiveList.getNumMemoryWindowIndicesPerElement();
final Integer matrixID = getMatrixID();
//Cache to hold new addresses for submission in bulk
final ArrayList<VEC4Address> addressesToAdd = new ArrayList<VEC4Address>(objectDefinitions.length);
for (final int index : objectDefinitions) {
final int vertexOffsetVec4s=new VEC4Address(primitiveList.getMemoryWindow().getPhysicalAddressInBytes(odCounter*elementsPerBlock*memoryWindowIndicesPerElement)).intValue();
final int matrixOffsetVec4s=new VEC4Address(tr.gpu.get().matrixWindow.get()
.getPhysicalAddressInBytes(matrixID)).intValue();
odw.matrixOffset.set(index,matrixOffsetVec4s);
odw.vertexOffset.set(index,vertexOffsetVec4s);
odw.modelScale.set(index, (byte) primitiveList.getPackedScale());
if (gpuVerticesRemaining >= GPU.GPU_VERTICES_PER_BLOCK) {
odw.numVertices.set(index,
(byte) GPU.GPU_VERTICES_PER_BLOCK);
} else if (gpuVerticesRemaining > 0) {
odw.numVertices.set(index,
(byte) (gpuVerticesRemaining));
} else {
throw new RuntimeException("Ran out of vec4s.");
}
gpuVerticesRemaining -= GPU.GPU_VERTICES_PER_BLOCK;
addressesToAdd.add(new VEC4Address(odw.getPhysicalAddressInBytes(index)));
odCounter++;
}// end for(ObjectDefinition)
RenderList.RENDER_LIST_EXECUTOR.submit(new Runnable(){
@Override
public void run() {
objectDefinitionAddressesInVEC4.addAll(addressesToAdd);
}});
}// end processPrimitiveList(...)
protected void updateAllRenderFlagStates(){
final Model model = getModel();
if(model == null)
return;
updateRenderFlagStatesPL(model.getTriangleList(),getTriangleObjectDefinitions());
updateRenderFlagStatesPL(model.getTransparentTriangleList(),getTransparentTriangleObjectDefinitions());
}
protected void updateRenderFlagStatesPL(PrimitiveList<?> pl, int [] objectDefinitionIndices){
final ObjectDefinitionWindow odw = tr.gpu.get().objectDefinitionWindow.get();
for(int index : objectDefinitionIndices)
odw.mode.set(index, (byte)(pl.getPrimitiveRenderMode() | (renderFlags << 4)&0xF0));
}//end updateRenderFlagStatesPL
public final void updateStateToGPU(Renderer renderer) throws NotReadyException {
if(!lock.tryLock())
throw new NotReadyException();
try{
initializeObjectDefinitions();
System.arraycopy(position, 0, positionAfterLoop, 0, 3);
attemptLoop(renderer);
if(needToRecalcMatrix){
needToRecalcMatrix=recalcMatrixWithEachFrame();
recalculateTransRotMBuffer();
}
if(model!=null)getModel().proposeAnimationUpdate();
}finally{lock.unlock();}
}//end updateStateToGPU()
public boolean supportsLoop(){
return true;
}
protected void attemptLoop(Renderer renderer){
if (supportsLoop()) {
boolean change = false;
final Vector3D camPos = renderer.getCamera().getCameraPosition();
final double [] delta = new double[]{
positionAfterLoop[0] - camPos.getX(),
positionAfterLoop[1] - camPos.getY(),
positionAfterLoop[2] - camPos.getZ()};
if (delta[0] > TR.mapWidth / 2.) {
positionAfterLoop[0] -= TR.mapWidth;
change = true;
needToRecalcMatrix=true;
} else if (delta[0] < -TR.mapWidth / 2.) {
positionAfterLoop[0] += TR.mapWidth;
change = true;
needToRecalcMatrix=true;
}
if (delta[1] > TR.mapWidth / 2.) {
positionAfterLoop[1] -= TR.mapWidth;
change = true;
needToRecalcMatrix=true;
} else if (delta[1] < -TR.mapWidth / 2.) {
positionAfterLoop[1] += TR.mapWidth;
change = true;
needToRecalcMatrix=true;
}
if (delta[2] > TR.mapWidth / 2.) {
positionAfterLoop[2] -= TR.mapWidth;
change = true;
needToRecalcMatrix=true;
} else if (delta[2] < -TR.mapWidth / 2.) {
positionAfterLoop[2] += TR.mapWidth;
change = true;
needToRecalcMatrix=true;
}
if(change){
needToRecalcMatrix = true;
loopedBefore = true;
}else{
if(loopedBefore)
needToRecalcMatrix = true;
loopedBefore = false;
}
}//end if(LOOP)
}//end attemptLoop()
protected void recalculateTransRotMBuffer() {
try {
Vect3D.normalize(heading, aZ);
Vect3D.normalize(top,aY);
Vect3D.cross(top, aZ, aX);
recalculateRotBuffer();
if (translate()) {
recalculateTransBuffer();
Mat4x4.mul(tMd, rMd, rotTransM);
} else {
System.arraycopy(rMd, 0, rotTransM, 0, 16);
}
tr.gpu.get().matrixWindow.get().setTransposed(rotTransM, getMatrixID(), scratchMatrixArray);//New version
} catch (MathArithmeticException e) {}// Don't crash.
catch (ZeroNormException e) {}
}// end recalculateTransRotMBuffer()
protected void recalculateRotBuffer(){
//Scale
Vect3D.scalarMultiply(aX, getScale(), aX);
Vect3D.scalarMultiply(aY, getScale(), aY);
Vect3D.scalarMultiply(aZ, getScale(), aZ);
rMd[0] = aX[0];
rMd[1] = aY[0];
rMd[2] = aZ[0];
rMd[4] = aX[1];
rMd[5] = aY[1];
rMd[6] = aZ[1];
rMd[8] = aX[2];
rMd[9] = aY[2];
rMd[10] = aZ[2];
}//end recalculateRotBuffer
protected void recalculateTransBuffer(){
if(isVisible() && isActive()){
tMd[3] = positionAfterLoop[0]+modelOffset[0];
tMd[7] = positionAfterLoop[1]+modelOffset[1];
tMd[11]= positionAfterLoop[2]+modelOffset[2];
}else{
tMd[3] = Double.POSITIVE_INFINITY;
tMd[7] = Double.POSITIVE_INFINITY;
tMd[11]= Double.POSITIVE_INFINITY;
}//end (!visible)
}//end recalculateTransBuffer()
protected final double [] scratchMatrixArray = new double[16];
protected boolean translate() {
return true;
}
/**
* @return the visible
*/
public boolean isVisible() {
return visible;
}
/**
* @param visible
* the visible to set
*/
public void setVisible(boolean visible) {
if(this.visible==visible)
return;
needToRecalcMatrix=true;
if(!this.visible && visible){
this.visible = true;
}else this.visible = visible;
}//end setvisible()
/**
* @return the position
*/
public final double[] getPosition() {
return position;
}
/**
* @param position
* the position to set
*/
public WorldObject setPosition(double[] position) {
this.position[0]=position[0];
this.position[1]=position[1];
this.position[2]=position[2];
notifyPositionChange();
return this;
}// end setPosition()
public WorldObject notifyPositionChange(){
lock.lock();
try{
if(position[0]==Double.NaN)
throw new RuntimeException("Invalid position.");
pcs.firePropertyChange(POSITION, oldPosition, position);
needToRecalcMatrix=true;
updateOldPosition();
}finally{lock.unlock();}
return this;
}//end notifyPositionChange()
private void updateOldPosition(){
System.arraycopy(position, 0, oldPosition, 0, 3);
}
/**
* @return the heading
*/
public final Vector3D getLookAt() {
return new Vector3D(heading);
}
/**
* @param heading
* the heading to set
*/
public void setHeading(Vector3D nHeading) {
lock.lock();
try{
System.arraycopy(heading, 0, oldHeading, 0, 3);
heading[0] = nHeading.getX();
heading[1] = nHeading.getY();
heading[2] = nHeading.getZ();
pcs.firePropertyChange(HEADING, oldHeading, nHeading);
needToRecalcMatrix=true;
}finally{lock.unlock();}
}
public Vector3D getHeading() {
assert !(top[0]==0 && top[1]==0 && top[2]==0);
return new Vector3D(heading);
}
/**
* @return the top
*/
public final Vector3D getTop() {
assert !(top[0]==0 && top[1]==0 && top[2]==0);
return new Vector3D(top);
}
/**
* @param top
* the top to set
*/
public void setTop(Vector3D nTop) {
lock.lock();
try{
System.arraycopy(top, 0, oldTop, 0, 3);
top[0] = nTop.getX();
top[1] = nTop.getY();
top[2] = nTop.getZ();
pcs.firePropertyChange(TOP, oldTop, nTop);
needToRecalcMatrix=true;
}finally{lock.unlock();}
}//end setTop(...)
public final CollectionActionDispatcher<VEC4Address> getOpaqueObjectDefinitionAddresses(){
return opaqueObjectDefinitionAddressesInVEC4;
}
public final CollectionActionDispatcher<VEC4Address> getTransparentObjectDefinitionAddresses(){
return transparentObjectDefinitionAddressesInVEC4;
}
/**
* @return the tr
*/
public TR getTr() {
return tr;
}
public void destroy() {
lock.lock();
try{
final SpacePartitioningGrid grid = getContainingGrid();
if(grid !=null){
try{World.relevanceExecutor.submit(new Runnable(){
@Override
public void run() {
grid.remove(WorldObject.this);
}}).get();}catch(Exception e){throw new RuntimeException(e);}
}//end if(NEW MODE and have grid)
setContainingGrid(null);
// Send it to the land of wind and ghosts.
setActive(false);
notifyPositionChange();
}finally{lock.unlock();}
}//end destroy()
@Override
public void setContainingGrid(SpacePartitioningGrid grid) {
containingGrid = new WeakReference<SpacePartitioningGrid>(grid);
notifyPositionChange();
}
public SpacePartitioningGrid<PositionedRenderable> getContainingGrid() {
try{return containingGrid.get();}
catch(NullPointerException e){return null;}
}
public Model getModel() {
try{return model.get();}
catch(NullPointerException e){return null;}
catch(Exception e){throw new RuntimeException(e);}
}
public Model getModelRealtime() throws NotReadyException{
return model.getRealtime();
}
/**
* @return the active
*/
public boolean isActive() {
return active;
}
/**
* @param active
* the active to set
*/
public void setActive(boolean active) {
final boolean oldState = this.active;
if(this.active!=active)
needToRecalcMatrix=true;
if(!this.active && active && isVisible()){
this.active=true;
}
this.active = active;
pcs.firePropertyChange(ACTIVE,oldState,active);
}//end setActive(...)
public void movePositionBy(Vector3D delta) {
lock.lock();
try{
position[0] += delta.getX();
position[1] += delta.getY();
position[2] += delta.getZ();
notifyPositionChange();
}finally{lock.unlock();}
}//end movePositionBy(...)
public void setPosition(double x, double y, double z) {
lock.lock();
try{
position[0] = x;
position[1] = y;
position[2] = z;
notifyPositionChange();}
finally{lock.unlock();}
}
public double[] getHeadingArray() {
return heading;
}
public double[] getTopArray() {
return top;
}
public void enableBehavior(Behavior behavior) {
if (!inactiveBehaviors.contains(behavior)) {
throw new RuntimeException(
"Tried to enabled an unregistered behavior.");
}
if (behavior instanceof CollisionBehavior) {
if (!collisionBehaviors.contains(behavior)
&& behavior instanceof CollisionBehavior) {
collisionBehaviors.add((CollisionBehavior) behavior);
}
}
if (!tickBehaviors.contains(behavior)) {
tickBehaviors.add(behavior);
}
}// end enableBehavior(...)
public void disableBehavior(Behavior behavior) {
if (!inactiveBehaviors.contains(behavior))
synchronized(inactiveBehaviors){
inactiveBehaviors.add(behavior);
}
if (behavior instanceof CollisionBehavior)
synchronized(collisionBehaviors){
collisionBehaviors.remove(behavior);
}
synchronized(tickBehaviors){
tickBehaviors.remove(behavior);
}
}//end disableBehavior(...)
/**
* @return the renderFlags
*/
public int getRenderFlags() {
return renderFlags;
}
/**
* @param renderFlags the renderFlags to set
*/
public void setRenderFlags(byte renderFlags) {
this.renderFlags = renderFlags;
updateAllRenderFlagStates();
}
/**
* @return the respondToTick
*/
public boolean isRespondToTick() {
return respondToTick;
}
/**
* @param respondToTick the respondToTick to set
*/
public void setRespondToTick(boolean respondToTick) {
this.respondToTick = respondToTick;
}
@Override
public void finalize() throws Throwable{
if(matrixID!=null)
tr.gpu.get().matrixWindow.get().freeLater(matrixID);
if(transparentTriangleObjectDefinitions!=null)
for(int def:transparentTriangleObjectDefinitions)
tr.gpu.get().objectDefinitionWindow.get().freeLater(def);
if(triangleObjectDefinitions!=null)
for(int def:triangleObjectDefinitions)
tr.gpu.get().objectDefinitionWindow.get().freeLater(def);
super.finalize();
}//end finalize()
/**
* @param modelOffset the modelOffset to set
*/
public void setModelOffset(double x, double y, double z) {
modelOffset[0]=x;
modelOffset[1]=y;
modelOffset[2]=z;
}
public double[] getPositionWithOffset() {
positionWithOffset[0]=position[0]+modelOffset[0];
positionWithOffset[1]=position[1]+modelOffset[1];
positionWithOffset[2]=position[2]+modelOffset[2];
return positionWithOffset;
}
public boolean isImmuneToOpaqueDepthTest() {
return immuneToOpaqueDepthTest;
}
/**
* @param immuneToDepthTest the immuneToDepthTest to set
*/
public WorldObject setImmuneToOpaqueDepthTest(boolean immuneToDepthTest) {
this.immuneToOpaqueDepthTest = immuneToDepthTest;
return this;
}
/**
* @param arg0
* @see java.beans.PropertyChangeSupport#addPropertyChangeListener(java.beans.PropertyChangeListener)
*/
public void addPropertyChangeListener(PropertyChangeListener arg0) {
pcs.addPropertyChangeListener(arg0);
}
/**
* @param propertyName
* @param listener
* @see java.beans.PropertyChangeSupport#addPropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener)
*/
public void addPropertyChangeListener(String propertyName,
PropertyChangeListener listener) {
pcs.addPropertyChangeListener(propertyName, listener);
}
/**
* @return
* @see java.beans.PropertyChangeSupport#getPropertyChangeListeners()
*/
public PropertyChangeListener[] getPropertyChangeListeners() {
return pcs.getPropertyChangeListeners();
}
/**
* @param propertyName
* @return
* @see java.beans.PropertyChangeSupport#getPropertyChangeListeners(java.lang.String)
*/
public PropertyChangeListener[] getPropertyChangeListeners(
String propertyName) {
return pcs.getPropertyChangeListeners(propertyName);
}
/**
* @param propertyName
* @return
* @see java.beans.PropertyChangeSupport#hasListeners(java.lang.String)
*/
public boolean hasListeners(String propertyName) {
return pcs.hasListeners(propertyName);
}
/**
* @param arg0
* @see java.beans.PropertyChangeSupport#removePropertyChangeListener(java.beans.PropertyChangeListener)
*/
public void removePropertyChangeListener(PropertyChangeListener arg0) {
pcs.removePropertyChangeListener(arg0);
}
/**
* @param propertyName
* @param listener
* @see java.beans.PropertyChangeSupport#removePropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener)
*/
public void removePropertyChangeListener(String propertyName,
PropertyChangeListener listener) {
pcs.removePropertyChangeListener(propertyName, listener);
}
public boolean hasBehavior(Class<? extends Behavior> behaviorClass) {
try{probeForBehavior(behaviorClass);}
catch(BehaviorNotFoundException e){return false;}
return true;
}
protected int[] getTriangleObjectDefinitions() {
return triangleObjectDefinitions =
getObjectDefinitions(triangleObjectDefinitions, getModel().getTriangleList());
}
protected int[] getTransparentTriangleObjectDefinitions() {
return transparentTriangleObjectDefinitions =
getObjectDefinitions(transparentTriangleObjectDefinitions, getModel().getTransparentTriangleList());
}
protected int[] getObjectDefinitions(int [] originalObjectDefs, PrimitiveList pList){
if(originalObjectDefs == null){
int numObjDefs, sizeInVerts;
if (pList == null)
originalObjectDefs = emptyIntArray;
else {
sizeInVerts = pList
.getTotalSizeInGPUVertices();
numObjDefs = sizeInVerts / GPU.GPU_VERTICES_PER_BLOCK;
if (sizeInVerts % GPU.GPU_VERTICES_PER_BLOCK != 0)
numObjDefs++;
originalObjectDefs = new int[numObjDefs];
for (int i = 0; i < numObjDefs; i++) {
originalObjectDefs[i] = tr.gpu.get()
.objectDefinitionWindow.get().create();
}//end for(numObjDefs)
}//end if(!null)
}//end if(null)
return originalObjectDefs;
}//end getObjectDefinitions(...)
protected CollectionActionDispatcher<VEC4Address> getOpaqueObjectDefinitionAddressesInVEC4() {
if(opaqueObjectDefinitionAddressesInVEC4==null)
opaqueObjectDefinitionAddressesInVEC4 = new CollectionActionDispatcher<VEC4Address>(new ArrayList<VEC4Address>());
return opaqueObjectDefinitionAddressesInVEC4;
}
protected CollectionActionDispatcher<VEC4Address> getTransparentObjectDefinitionAddressesInVEC4() {
if(transparentObjectDefinitionAddressesInVEC4==null)
transparentObjectDefinitionAddressesInVEC4 = new CollectionActionDispatcher<VEC4Address>(new ArrayList<VEC4Address>());
return transparentObjectDefinitionAddressesInVEC4;
}
protected Integer getMatrixID() {
if(matrixID == null)
matrixID = tr.gpu.get().matrixWindow.get().create();
return matrixID;
}
public void setMatrixID(Integer matrixID) {
this.matrixID = matrixID;
}
protected double getScale() {
return scale;
}
protected void setScale(double scale) {
this.scale = scale;
}
public void setRenderFlag(RenderFlags flag){
setRenderFlags((byte)(getRenderFlags() | flag.getMask()));
}
public void unsetRenderFlag(RenderFlags flag){
setRenderFlags((byte)(getRenderFlags() & ~flag.getMask()));
}
public boolean getRenderFlag(RenderFlags flag){
return ((getRenderFlags()&0xFF) & flag.getMask()) != 0;
}
}// end WorldObject
| src/main/java/org/jtrfp/trcl/obj/WorldObject.java | /*******************************************************************************
* This file is part of TERMINAL RECALL
* Copyright (c) 2012-2016 Chuck Ritola
* Part of the jTRFP.org project
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the GNU Public License v3.0
* which accompanies this distribution, and is available at
* http://www.gnu.org/licenses/gpl.html
*
* Contributors:
* chuck - initial API and implementation
******************************************************************************/
package org.jtrfp.trcl.obj;
import java.beans.PropertyChangeListener;
import java.beans.PropertyChangeSupport;
import java.lang.ref.WeakReference;
import java.util.ArrayList;
import java.util.concurrent.Callable;
import java.util.concurrent.locks.ReentrantLock;
import org.apache.commons.math3.exception.MathArithmeticException;
import org.apache.commons.math3.geometry.euclidean.threed.Vector3D;
import org.jtrfp.trcl.ObjectDefinitionWindow;
import org.jtrfp.trcl.PrimitiveList;
import org.jtrfp.trcl.SpacePartitioningGrid;
import org.jtrfp.trcl.Submitter;
import org.jtrfp.trcl.WeakPropertyChangeSupport;
import org.jtrfp.trcl.World;
import org.jtrfp.trcl.beh.Behavior;
import org.jtrfp.trcl.beh.BehaviorNotFoundException;
import org.jtrfp.trcl.beh.CollisionBehavior;
import org.jtrfp.trcl.coll.CollectionActionDispatcher;
import org.jtrfp.trcl.coll.PropertyListenable;
import org.jtrfp.trcl.core.NotReadyException;
import org.jtrfp.trcl.core.TR;
import org.jtrfp.trcl.core.TRFuture;
import org.jtrfp.trcl.gpu.GPU;
import org.jtrfp.trcl.gpu.Model;
import org.jtrfp.trcl.gpu.RenderList;
import org.jtrfp.trcl.gpu.Renderer;
import org.jtrfp.trcl.math.Mat4x4;
import org.jtrfp.trcl.math.Vect3D;
import org.jtrfp.trcl.math.Vect3D.ZeroNormException;
import org.jtrfp.trcl.mem.VEC4Address;
public class WorldObject implements PositionedRenderable, PropertyListenable, Rotatable {
public static final String HEADING ="heading";
public static final String TOP ="top";
public static final String ACTIVE ="active";
private double[] heading = new double[] { 0, 0, 1 }, oldHeading= new double[] {Double.NEGATIVE_INFINITY,Double.NEGATIVE_INFINITY,Double.NEGATIVE_INFINITY};
private double[] top = new double[] { 0, 1, 0 }, oldTop = new double[] {Double.NEGATIVE_INFINITY,Double.NEGATIVE_INFINITY,Double.NEGATIVE_INFINITY};
protected volatile double[]
position = new double[3],
positionAfterLoop = new double[3],
oldPosition = new double[]{Double.NEGATIVE_INFINITY,Double.NEGATIVE_INFINITY,Double.NEGATIVE_INFINITY};
private boolean loopedBefore = false;
protected double[] modelOffset= new double[3];
private final double[]positionWithOffset
= new double[3];
private boolean needToRecalcMatrix=true;
private final TR tr;
private boolean visible = true;
private TRFuture<Model>model;
private int[] triangleObjectDefinitions;
private int[] transparentTriangleObjectDefinitions;
protected Integer matrixID;
private volatile WeakReference<SpacePartitioningGrid> containingGrid;
private ArrayList<Behavior> inactiveBehaviors = new ArrayList<Behavior>();
private ArrayList<CollisionBehavior>collisionBehaviors = new ArrayList<CollisionBehavior>();
private ArrayList<Behavior> tickBehaviors = new ArrayList<Behavior>();
private boolean active = true;
private byte renderFlags=0;
private boolean immuneToOpaqueDepthTest = false;
private boolean objectDefsInitialized = false;
protected final double[] aX = new double[3];
protected final double[] aY = new double[3];
protected final double[] aZ = new double[3];
protected final double[] rotTransM = new double[16];
protected final double[] camM = new double[16];
protected final double[] rMd = new double[16];
protected final double[] tMd = new double[16];
protected double[] cMd = new double[16];
private boolean respondToTick = true;
private double scale = 1.;
private final ReentrantLock lock = new ReentrantLock();
private CollectionActionDispatcher<VEC4Address> opaqueObjectDefinitionAddressesInVEC4 = new CollectionActionDispatcher<VEC4Address>(new ArrayList<VEC4Address>());
private CollectionActionDispatcher<VEC4Address> transparentObjectDefinitionAddressesInVEC4 = new CollectionActionDispatcher<VEC4Address>(new ArrayList<VEC4Address>());
protected final WeakPropertyChangeSupport pcs = new WeakPropertyChangeSupport(new PropertyChangeSupport(this));
public enum RenderFlags{
IgnoreCamera((byte)0x1);
private final byte mask;
private RenderFlags(byte mask){
this.mask=mask;
}
public byte getMask() {
return mask;
}
};
public WorldObject(TR tr) {
this.tr = tr;
// Matrix constants setup
rMd[15] = 1;
tMd[0] = 1;
tMd[5] = 1;
tMd[10] = 1;
tMd[15] = 1;
}
public WorldObject(TR tr, Model m) {
this(tr);
setModel(m);
}// end constructor
void proposeCollision(WorldObject other) {
for (int i = 0; i < collisionBehaviors.size(); i++) {
collisionBehaviors.get(i).proposeCollision(other);
}// end for(collisionBehaviors)
}// end proposeCollision(...)
public boolean isCollideable(){
return !collisionBehaviors.isEmpty();
}
public <T extends Behavior> T addBehavior(T ob) {
if (ob.isEnabled()) {
if (ob instanceof CollisionBehavior)
collisionBehaviors.add((CollisionBehavior) ob);
tickBehaviors.add(ob);
} else {
inactiveBehaviors.add(ob);
}
ob.setParent(this);
return ob;
}
public <T extends Behavior> T removeBehavior(T beh) {
if (beh.isEnabled()) {
if (beh instanceof CollisionBehavior)
collisionBehaviors.remove((CollisionBehavior) beh);
tickBehaviors.remove(beh);
} else
inactiveBehaviors.remove(beh);
return beh;
}//end removeBehavior()
protected boolean recalcMatrixWithEachFrame(){
return false;
}
public <T> T probeForBehavior(Class<T> bC) {
if (bC.isAssignableFrom(CollisionBehavior.class)) {
for (int i = 0; i < collisionBehaviors.size(); i++) {
if (bC.isAssignableFrom(collisionBehaviors.get(i).getClass())) {
return (T) collisionBehaviors.get(i);
}
}// end if(instanceof)
}// emd if(isAssignableFrom(CollisionBehavior.class))
for (int i = 0; i < inactiveBehaviors.size(); i++) {
if (bC.isAssignableFrom(inactiveBehaviors.get(i).getClass())) {
return (T) inactiveBehaviors.get(i);
}
}// end if(instanceof)
for (int i = 0; i < tickBehaviors.size(); i++) {
if (bC.isAssignableFrom(tickBehaviors.get(i).getClass())) {
return (T) tickBehaviors.get(i);
}
}// end if(instanceof)
throw new BehaviorNotFoundException("Cannot find behavior of type "
+ bC.getName() + " in behavior sandwich owned by "
+ this.toString());
}// end probeForBehavior
public <T> void probeForBehaviors(Submitter<T> sub, Class<T> type) {
final ArrayList<T> result = new ArrayList<T>();
synchronized(collisionBehaviors){
if (type.isAssignableFrom(CollisionBehavior.class)) {
for (int i = 0; i < collisionBehaviors.size(); i++) {
if (type.isAssignableFrom(collisionBehaviors.get(i).getClass())) {
result.add((T) collisionBehaviors.get(i));
}
}// end if(instanceof)
}// end isAssignableFrom(CollisionBehavior.class)
}synchronized(inactiveBehaviors){
for (int i = 0; i < inactiveBehaviors.size(); i++) {
if (type.isAssignableFrom(inactiveBehaviors.get(i).getClass()))
result.add((T) inactiveBehaviors.get(i));
}// end if(instanceof)
}synchronized(tickBehaviors){
for (int i = 0; i < tickBehaviors.size(); i++) {
if (type.isAssignableFrom(tickBehaviors.get(i).getClass()))
result.add((T) tickBehaviors.get(i));
}// end for (tickBehaviors)
}//end sync(tickBehaviors)
sub.submit(result);
}// end probeForBehaviors(...)
public void tick(long time) {
if(!respondToTick)return;
synchronized(tickBehaviors){
for (int i = 0; i < tickBehaviors.size() && isActive(); i++)
tickBehaviors.get(i).proposeTick(time);
}//end sync(tickBehaviors)
}// end tick(...)
private final int [] emptyIntArray = new int[0];
public void setModel(Model m) {
if (m == null)
throw new RuntimeException("Passed model cannot be null.");
final TRFuture<Model> thisModelFuture = this.model;
if(thisModelFuture != null)
releaseCurrentModel();
try{this.model = m.finalizeModel();}catch(Exception e){throw new RuntimeException(e);}
}// end setModel(...)
private void releaseCurrentModel(){
if(transparentTriangleObjectDefinitions!=null)
for(int def:transparentTriangleObjectDefinitions)
tr.gpu.get().objectDefinitionWindow.get().freeLater(def);
if(triangleObjectDefinitions!=null)
for(int def:triangleObjectDefinitions)
tr.gpu.get().objectDefinitionWindow.get().freeLater(def);
RenderList.RENDER_LIST_EXECUTOR.submit(new Runnable(){
@Override
public void run() {
getOpaqueObjectDefinitionAddressesInVEC4() .clear();
getTransparentObjectDefinitionAddressesInVEC4().clear();
}});
transparentTriangleObjectDefinitions = null;
triangleObjectDefinitions = null;
this.model = null;
objectDefsInitialized = false;
}//end releaseCurrentModel()
public void setDirection(ObjectDirection dir) {
lock.lock();
try{
if (dir.getHeading().getNorm() == 0 || dir.getTop().getNorm() == 0) {
System.err
.println("Warning: Rejecting zero-norm for object direction. "
+ dir);
new Exception().printStackTrace();
return;
}
setHeading(dir.getHeading());
setTop(dir.getTop());
}finally {lock.unlock();}
}//end setDirection(...)
@Override
public String toString() {
final String modelDebugName;
if(model!=null)modelDebugName=getModel().getDebugName();
else modelDebugName="[null model]";
return "WorldObject Model=" + modelDebugName + " pos="
+ this.getPosition() + " class=" + getClass().getName()+" hash="+hashCode();
}
public final void initializeObjectDefinitions() throws NotReadyException {
if(objectDefsInitialized)
return;
if (model == null)
throw new NullPointerException(
"Model is null. Did you forget to set it? Object in question is: \n"+this.toString());
final Model model = getModelRealtime();
tr.getThreadManager().submitToThreadPool(new Callable<Void>(){
@Override
public Void call() throws Exception {
tr.getThreadManager().submitToGPUMemAccess(new Callable<Void>(){
@Override
public Void call() throws Exception {
processPrimitiveList(model.getTriangleList(),
getTriangleObjectDefinitions(), getOpaqueObjectDefinitionAddressesInVEC4());
processPrimitiveList(model.getTransparentTriangleList(),
getTransparentTriangleObjectDefinitions(), getTransparentObjectDefinitionAddressesInVEC4());
return null;
}}).get();
updateAllRenderFlagStates();
objectDefsInitialized = true;
return null;
}});
}// end initializeObjectDefinitions()
private void processPrimitiveList(PrimitiveList<?> primitiveList,
int[] objectDefinitions, final CollectionActionDispatcher<VEC4Address> objectDefinitionAddressesInVEC4) {
if (primitiveList == null)
return; // Nothing to do, no primitives here
final int gpuVerticesPerElement = primitiveList.getGPUVerticesPerElement();
final int elementsPerBlock = GPU.GPU_VERTICES_PER_BLOCK / gpuVerticesPerElement;
int gpuVerticesRemaining = primitiveList.getNumElements()*gpuVerticesPerElement;
// For each of the allocated-but-not-yet-initialized object definitions.
final ObjectDefinitionWindow odw = tr.gpu.get().objectDefinitionWindow.get();
int odCounter=0;
final int memoryWindowIndicesPerElement = primitiveList.getNumMemoryWindowIndicesPerElement();
final Integer matrixID = getMatrixID();
//Cache to hold new addresses for submission in bulk
final ArrayList<VEC4Address> addressesToAdd = new ArrayList<VEC4Address>();
for (final int index : objectDefinitions) {
final int vertexOffsetVec4s=new VEC4Address(primitiveList.getMemoryWindow().getPhysicalAddressInBytes(odCounter*elementsPerBlock*memoryWindowIndicesPerElement)).intValue();
final int matrixOffsetVec4s=new VEC4Address(tr.gpu.get().matrixWindow.get()
.getPhysicalAddressInBytes(matrixID)).intValue();
odw.matrixOffset.set(index,matrixOffsetVec4s);
odw.vertexOffset.set(index,vertexOffsetVec4s);
odw.modelScale.set(index, (byte) primitiveList.getPackedScale());
if (gpuVerticesRemaining >= GPU.GPU_VERTICES_PER_BLOCK) {
odw.numVertices.set(index,
(byte) GPU.GPU_VERTICES_PER_BLOCK);
} else if (gpuVerticesRemaining > 0) {
odw.numVertices.set(index,
(byte) (gpuVerticesRemaining));
} else {
throw new RuntimeException("Ran out of vec4s.");
}
gpuVerticesRemaining -= GPU.GPU_VERTICES_PER_BLOCK;
addressesToAdd.add(new VEC4Address(odw.getPhysicalAddressInBytes(index)));
odCounter++;
}// end for(ObjectDefinition)
RenderList.RENDER_LIST_EXECUTOR.submit(new Runnable(){
@Override
public void run() {
objectDefinitionAddressesInVEC4.addAll(addressesToAdd);
}});
}// end processPrimitiveList(...)
protected void updateAllRenderFlagStates(){
final Model model = getModel();
if(model == null)
return;
updateRenderFlagStatesPL(model.getTriangleList(),getTriangleObjectDefinitions());
updateRenderFlagStatesPL(model.getTransparentTriangleList(),getTransparentTriangleObjectDefinitions());
}
protected void updateRenderFlagStatesPL(PrimitiveList<?> pl, int [] objectDefinitionIndices){
final ObjectDefinitionWindow odw = tr.gpu.get().objectDefinitionWindow.get();
for(int index : objectDefinitionIndices)
odw.mode.set(index, (byte)(pl.getPrimitiveRenderMode() | (renderFlags << 4)&0xF0));
}//end updateRenderFlagStatesPL
public final void updateStateToGPU(Renderer renderer) throws NotReadyException {
if(!lock.tryLock())
throw new NotReadyException();
try{
initializeObjectDefinitions();
System.arraycopy(position, 0, positionAfterLoop, 0, 3);
attemptLoop(renderer);
if(needToRecalcMatrix){
needToRecalcMatrix=recalcMatrixWithEachFrame();
recalculateTransRotMBuffer();
}
if(model!=null)getModel().proposeAnimationUpdate();
}finally{lock.unlock();}
}//end updateStateToGPU()
public boolean supportsLoop(){
return true;
}
protected void attemptLoop(Renderer renderer){
if (supportsLoop()) {
boolean change = false;
final Vector3D camPos = renderer.getCamera().getCameraPosition();
final double [] delta = new double[]{
positionAfterLoop[0] - camPos.getX(),
positionAfterLoop[1] - camPos.getY(),
positionAfterLoop[2] - camPos.getZ()};
if (delta[0] > TR.mapWidth / 2.) {
positionAfterLoop[0] -= TR.mapWidth;
change = true;
needToRecalcMatrix=true;
} else if (delta[0] < -TR.mapWidth / 2.) {
positionAfterLoop[0] += TR.mapWidth;
change = true;
needToRecalcMatrix=true;
}
if (delta[1] > TR.mapWidth / 2.) {
positionAfterLoop[1] -= TR.mapWidth;
change = true;
needToRecalcMatrix=true;
} else if (delta[1] < -TR.mapWidth / 2.) {
positionAfterLoop[1] += TR.mapWidth;
change = true;
needToRecalcMatrix=true;
}
if (delta[2] > TR.mapWidth / 2.) {
positionAfterLoop[2] -= TR.mapWidth;
change = true;
needToRecalcMatrix=true;
} else if (delta[2] < -TR.mapWidth / 2.) {
positionAfterLoop[2] += TR.mapWidth;
change = true;
needToRecalcMatrix=true;
}
if(change){
needToRecalcMatrix = true;
loopedBefore = true;
}else{
if(loopedBefore)
needToRecalcMatrix = true;
loopedBefore = false;
}
}//end if(LOOP)
}//end attemptLoop()
protected void recalculateTransRotMBuffer() {
try {
Vect3D.normalize(heading, aZ);
Vect3D.normalize(top,aY);
Vect3D.cross(top, aZ, aX);
recalculateRotBuffer();
if (translate()) {
recalculateTransBuffer();
Mat4x4.mul(tMd, rMd, rotTransM);
} else {
System.arraycopy(rMd, 0, rotTransM, 0, 16);
}
tr.gpu.get().matrixWindow.get().setTransposed(rotTransM, getMatrixID(), scratchMatrixArray);//New version
} catch (MathArithmeticException e) {}// Don't crash.
catch (ZeroNormException e) {}
}// end recalculateTransRotMBuffer()
protected void recalculateRotBuffer(){
//Scale
Vect3D.scalarMultiply(aX, getScale(), aX);
Vect3D.scalarMultiply(aY, getScale(), aY);
Vect3D.scalarMultiply(aZ, getScale(), aZ);
rMd[0] = aX[0];
rMd[1] = aY[0];
rMd[2] = aZ[0];
rMd[4] = aX[1];
rMd[5] = aY[1];
rMd[6] = aZ[1];
rMd[8] = aX[2];
rMd[9] = aY[2];
rMd[10] = aZ[2];
}//end recalculateRotBuffer
protected void recalculateTransBuffer(){
if(isVisible() && isActive()){
tMd[3] = positionAfterLoop[0]+modelOffset[0];
tMd[7] = positionAfterLoop[1]+modelOffset[1];
tMd[11]= positionAfterLoop[2]+modelOffset[2];
}else{
tMd[3] = Double.POSITIVE_INFINITY;
tMd[7] = Double.POSITIVE_INFINITY;
tMd[11]= Double.POSITIVE_INFINITY;
}//end (!visible)
}//end recalculateTransBuffer()
protected final double [] scratchMatrixArray = new double[16];
protected boolean translate() {
return true;
}
/**
* @return the visible
*/
public boolean isVisible() {
return visible;
}
/**
* @param visible
* the visible to set
*/
public void setVisible(boolean visible) {
if(this.visible==visible)
return;
needToRecalcMatrix=true;
if(!this.visible && visible){
this.visible = true;
}else this.visible = visible;
}//end setvisible()
/**
* @return the position
*/
public final double[] getPosition() {
return position;
}
/**
* @param position
* the position to set
*/
public WorldObject setPosition(double[] position) {
this.position[0]=position[0];
this.position[1]=position[1];
this.position[2]=position[2];
notifyPositionChange();
return this;
}// end setPosition()
public WorldObject notifyPositionChange(){
lock.lock();
try{
if(position[0]==Double.NaN)
throw new RuntimeException("Invalid position.");
pcs.firePropertyChange(POSITION, oldPosition, position);
needToRecalcMatrix=true;
updateOldPosition();
}finally{lock.unlock();}
return this;
}//end notifyPositionChange()
private void updateOldPosition(){
System.arraycopy(position, 0, oldPosition, 0, 3);
}
/**
* @return the heading
*/
public final Vector3D getLookAt() {
return new Vector3D(heading);
}
/**
* @param heading
* the heading to set
*/
public void setHeading(Vector3D nHeading) {
lock.lock();
try{
System.arraycopy(heading, 0, oldHeading, 0, 3);
heading[0] = nHeading.getX();
heading[1] = nHeading.getY();
heading[2] = nHeading.getZ();
pcs.firePropertyChange(HEADING, oldHeading, nHeading);
needToRecalcMatrix=true;
}finally{lock.unlock();}
}
public Vector3D getHeading() {
assert !(top[0]==0 && top[1]==0 && top[2]==0);
return new Vector3D(heading);
}
/**
* @return the top
*/
public final Vector3D getTop() {
assert !(top[0]==0 && top[1]==0 && top[2]==0);
return new Vector3D(top);
}
/**
* @param top
* the top to set
*/
public void setTop(Vector3D nTop) {
lock.lock();
try{
System.arraycopy(top, 0, oldTop, 0, 3);
top[0] = nTop.getX();
top[1] = nTop.getY();
top[2] = nTop.getZ();
pcs.firePropertyChange(TOP, oldTop, nTop);
needToRecalcMatrix=true;
}finally{lock.unlock();}
}//end setTop(...)
public final CollectionActionDispatcher<VEC4Address> getOpaqueObjectDefinitionAddresses(){
return opaqueObjectDefinitionAddressesInVEC4;
}
public final CollectionActionDispatcher<VEC4Address> getTransparentObjectDefinitionAddresses(){
return transparentObjectDefinitionAddressesInVEC4;
}
/**
* @return the tr
*/
public TR getTr() {
return tr;
}
public void destroy() {
lock.lock();
try{
final SpacePartitioningGrid grid = getContainingGrid();
if(grid !=null){
try{World.relevanceExecutor.submit(new Runnable(){
@Override
public void run() {
grid.remove(WorldObject.this);
}}).get();}catch(Exception e){throw new RuntimeException(e);}
}//end if(NEW MODE and have grid)
setContainingGrid(null);
// Send it to the land of wind and ghosts.
setActive(false);
notifyPositionChange();
}finally{lock.unlock();}
}//end destroy()
@Override
public void setContainingGrid(SpacePartitioningGrid grid) {
containingGrid = new WeakReference<SpacePartitioningGrid>(grid);
notifyPositionChange();
}
public SpacePartitioningGrid<PositionedRenderable> getContainingGrid() {
try{return containingGrid.get();}
catch(NullPointerException e){return null;}
}
public Model getModel() {
try{return model.get();}
catch(NullPointerException e){return null;}
catch(Exception e){throw new RuntimeException(e);}
}
public Model getModelRealtime() throws NotReadyException{
return model.getRealtime();
}
/**
* @return the active
*/
public boolean isActive() {
return active;
}
/**
* @param active
* the active to set
*/
public void setActive(boolean active) {
final boolean oldState = this.active;
if(this.active!=active)
needToRecalcMatrix=true;
if(!this.active && active && isVisible()){
this.active=true;
}
this.active = active;
pcs.firePropertyChange(ACTIVE,oldState,active);
}//end setActive(...)
public void movePositionBy(Vector3D delta) {
lock.lock();
try{
position[0] += delta.getX();
position[1] += delta.getY();
position[2] += delta.getZ();
notifyPositionChange();
}finally{lock.unlock();}
}//end movePositionBy(...)
public void setPosition(double x, double y, double z) {
lock.lock();
try{
position[0] = x;
position[1] = y;
position[2] = z;
notifyPositionChange();}
finally{lock.unlock();}
}
public double[] getHeadingArray() {
return heading;
}
public double[] getTopArray() {
return top;
}
public void enableBehavior(Behavior behavior) {
if (!inactiveBehaviors.contains(behavior)) {
throw new RuntimeException(
"Tried to enabled an unregistered behavior.");
}
if (behavior instanceof CollisionBehavior) {
if (!collisionBehaviors.contains(behavior)
&& behavior instanceof CollisionBehavior) {
collisionBehaviors.add((CollisionBehavior) behavior);
}
}
if (!tickBehaviors.contains(behavior)) {
tickBehaviors.add(behavior);
}
}// end enableBehavior(...)
public void disableBehavior(Behavior behavior) {
if (!inactiveBehaviors.contains(behavior))
synchronized(inactiveBehaviors){
inactiveBehaviors.add(behavior);
}
if (behavior instanceof CollisionBehavior)
synchronized(collisionBehaviors){
collisionBehaviors.remove(behavior);
}
synchronized(tickBehaviors){
tickBehaviors.remove(behavior);
}
}//end disableBehavior(...)
/**
* @return the renderFlags
*/
public int getRenderFlags() {
return renderFlags;
}
/**
* @param renderFlags the renderFlags to set
*/
public void setRenderFlags(byte renderFlags) {
this.renderFlags = renderFlags;
updateAllRenderFlagStates();
}
/**
* @return the respondToTick
*/
public boolean isRespondToTick() {
return respondToTick;
}
/**
* @param respondToTick the respondToTick to set
*/
public void setRespondToTick(boolean respondToTick) {
this.respondToTick = respondToTick;
}
@Override
public void finalize() throws Throwable{
if(matrixID!=null)
tr.gpu.get().matrixWindow.get().freeLater(matrixID);
if(transparentTriangleObjectDefinitions!=null)
for(int def:transparentTriangleObjectDefinitions)
tr.gpu.get().objectDefinitionWindow.get().freeLater(def);
if(triangleObjectDefinitions!=null)
for(int def:triangleObjectDefinitions)
tr.gpu.get().objectDefinitionWindow.get().freeLater(def);
super.finalize();
}//end finalize()
/**
* @param modelOffset the modelOffset to set
*/
public void setModelOffset(double x, double y, double z) {
modelOffset[0]=x;
modelOffset[1]=y;
modelOffset[2]=z;
}
public double[] getPositionWithOffset() {
positionWithOffset[0]=position[0]+modelOffset[0];
positionWithOffset[1]=position[1]+modelOffset[1];
positionWithOffset[2]=position[2]+modelOffset[2];
return positionWithOffset;
}
public boolean isImmuneToOpaqueDepthTest() {
return immuneToOpaqueDepthTest;
}
/**
* @param immuneToDepthTest the immuneToDepthTest to set
*/
public WorldObject setImmuneToOpaqueDepthTest(boolean immuneToDepthTest) {
this.immuneToOpaqueDepthTest = immuneToDepthTest;
return this;
}
/**
* @param arg0
* @see java.beans.PropertyChangeSupport#addPropertyChangeListener(java.beans.PropertyChangeListener)
*/
public void addPropertyChangeListener(PropertyChangeListener arg0) {
pcs.addPropertyChangeListener(arg0);
}
/**
* @param propertyName
* @param listener
* @see java.beans.PropertyChangeSupport#addPropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener)
*/
public void addPropertyChangeListener(String propertyName,
PropertyChangeListener listener) {
pcs.addPropertyChangeListener(propertyName, listener);
}
/**
* @return
* @see java.beans.PropertyChangeSupport#getPropertyChangeListeners()
*/
public PropertyChangeListener[] getPropertyChangeListeners() {
return pcs.getPropertyChangeListeners();
}
/**
* @param propertyName
* @return
* @see java.beans.PropertyChangeSupport#getPropertyChangeListeners(java.lang.String)
*/
public PropertyChangeListener[] getPropertyChangeListeners(
String propertyName) {
return pcs.getPropertyChangeListeners(propertyName);
}
/**
* @param propertyName
* @return
* @see java.beans.PropertyChangeSupport#hasListeners(java.lang.String)
*/
public boolean hasListeners(String propertyName) {
return pcs.hasListeners(propertyName);
}
/**
* @param arg0
* @see java.beans.PropertyChangeSupport#removePropertyChangeListener(java.beans.PropertyChangeListener)
*/
public void removePropertyChangeListener(PropertyChangeListener arg0) {
pcs.removePropertyChangeListener(arg0);
}
/**
* @param propertyName
* @param listener
* @see java.beans.PropertyChangeSupport#removePropertyChangeListener(java.lang.String, java.beans.PropertyChangeListener)
*/
public void removePropertyChangeListener(String propertyName,
PropertyChangeListener listener) {
pcs.removePropertyChangeListener(propertyName, listener);
}
public boolean hasBehavior(Class<? extends Behavior> behaviorClass) {
try{probeForBehavior(behaviorClass);}
catch(BehaviorNotFoundException e){return false;}
return true;
}
protected int[] getTriangleObjectDefinitions() {
return triangleObjectDefinitions =
getObjectDefinitions(triangleObjectDefinitions, getModel().getTriangleList());
}
protected int[] getTransparentTriangleObjectDefinitions() {
return transparentTriangleObjectDefinitions =
getObjectDefinitions(transparentTriangleObjectDefinitions, getModel().getTransparentTriangleList());
}
protected int[] getObjectDefinitions(int [] originalObjectDefs, PrimitiveList pList){
if(originalObjectDefs == null){
int numObjDefs, sizeInVerts;
if (pList == null)
originalObjectDefs = emptyIntArray;
else {
sizeInVerts = pList
.getTotalSizeInGPUVertices();
numObjDefs = sizeInVerts / GPU.GPU_VERTICES_PER_BLOCK;
if (sizeInVerts % GPU.GPU_VERTICES_PER_BLOCK != 0)
numObjDefs++;
originalObjectDefs = new int[numObjDefs];
for (int i = 0; i < numObjDefs; i++) {
originalObjectDefs[i] = tr.gpu.get()
.objectDefinitionWindow.get().create();
}//end for(numObjDefs)
}//end if(!null)
}//end if(null)
return originalObjectDefs;
}//end getObjectDefinitions(...)
protected CollectionActionDispatcher<VEC4Address> getOpaqueObjectDefinitionAddressesInVEC4() {
if(opaqueObjectDefinitionAddressesInVEC4==null)
opaqueObjectDefinitionAddressesInVEC4 = new CollectionActionDispatcher<VEC4Address>(new ArrayList<VEC4Address>());
return opaqueObjectDefinitionAddressesInVEC4;
}
protected CollectionActionDispatcher<VEC4Address> getTransparentObjectDefinitionAddressesInVEC4() {
if(transparentObjectDefinitionAddressesInVEC4==null)
transparentObjectDefinitionAddressesInVEC4 = new CollectionActionDispatcher<VEC4Address>(new ArrayList<VEC4Address>());
return transparentObjectDefinitionAddressesInVEC4;
}
protected Integer getMatrixID() {
if(matrixID == null)
matrixID = tr.gpu.get().matrixWindow.get().create();
return matrixID;
}
public void setMatrixID(Integer matrixID) {
this.matrixID = matrixID;
}
protected double getScale() {
return scale;
}
protected void setScale(double scale) {
this.scale = scale;
}
public void setRenderFlag(RenderFlags flag){
setRenderFlags((byte)(getRenderFlags() | flag.getMask()));
}
public void unsetRenderFlag(RenderFlags flag){
setRenderFlags((byte)(getRenderFlags() & ~flag.getMask()));
}
public boolean getRenderFlag(RenderFlags flag){
return ((getRenderFlags()&0xFF) & flag.getMask()) != 0;
}
}// end WorldObject
| ➶VEC4 ArrayList allocates to pre-determined size. | src/main/java/org/jtrfp/trcl/obj/WorldObject.java | ➶VEC4 ArrayList allocates to pre-determined size. | <ide><path>rc/main/java/org/jtrfp/trcl/obj/WorldObject.java
<ide> final int memoryWindowIndicesPerElement = primitiveList.getNumMemoryWindowIndicesPerElement();
<ide> final Integer matrixID = getMatrixID();
<ide> //Cache to hold new addresses for submission in bulk
<del> final ArrayList<VEC4Address> addressesToAdd = new ArrayList<VEC4Address>();
<add> final ArrayList<VEC4Address> addressesToAdd = new ArrayList<VEC4Address>(objectDefinitions.length);
<ide> for (final int index : objectDefinitions) {
<ide> final int vertexOffsetVec4s=new VEC4Address(primitiveList.getMemoryWindow().getPhysicalAddressInBytes(odCounter*elementsPerBlock*memoryWindowIndicesPerElement)).intValue();
<ide> final int matrixOffsetVec4s=new VEC4Address(tr.gpu.get().matrixWindow.get() |
|
Java | apache-2.0 | d7943e8ebd547b84b8f427887ffc0ad1b2498514 | 0 | Brijeshrpatel9/elasticsearch,petmit/elasticsearch,overcome/elasticsearch,jpountz/elasticsearch,lchennup/elasticsearch,SergVro/elasticsearch,combinatorist/elasticsearch,mm0/elasticsearch,kkirsche/elasticsearch,thecocce/elasticsearch,sposam/elasticsearch,slavau/elasticsearch,karthikjaps/elasticsearch,himanshuag/elasticsearch,iantruslove/elasticsearch,Asimov4/elasticsearch,knight1128/elasticsearch,aparo/elasticsearch,dylan8902/elasticsearch,markllama/elasticsearch,mcku/elasticsearch,JSCooke/elasticsearch,nezirus/elasticsearch,ckclark/elasticsearch,ThalaivaStars/OrgRepo1,lmenezes/elasticsearch,javachengwc/elasticsearch,zhaocloud/elasticsearch,vingupta3/elasticsearch,elancom/elasticsearch,TonyChai24/ESSource,jimczi/elasticsearch,andrestc/elasticsearch,avikurapati/elasticsearch,onegambler/elasticsearch,pranavraman/elasticsearch,jeteve/elasticsearch,marcuswr/elasticsearch-dateline,HonzaKral/elasticsearch,kenshin233/elasticsearch,huanzhong/elasticsearch,Microsoft/elasticsearch,lightslife/elasticsearch,caengcjd/elasticsearch,brwe/elasticsearch,markwalkom/elasticsearch,mcku/elasticsearch,Liziyao/elasticsearch,acchen97/elasticsearch,i-am-Nathan/elasticsearch,elancom/elasticsearch,Fsero/elasticsearch,beiske/elasticsearch,combinatorist/elasticsearch,nrkkalyan/elasticsearch,LeoYao/elasticsearch,avikurapati/elasticsearch,snikch/elasticsearch,clintongormley/elasticsearch,ouyangkongtong/elasticsearch,codebunt/elasticsearch,mnylen/elasticsearch,markllama/elasticsearch,likaiwalkman/elasticsearch,polyfractal/elasticsearch,vietlq/elasticsearch,lightslife/elasticsearch,ESamir/elasticsearch,himanshuag/elasticsearch,Ansh90/elasticsearch,diendt/elasticsearch,ajhalani/elasticsearch,scottsom/elasticsearch,areek/elasticsearch,fekaputra/elasticsearch,tebriel/elasticsearch,maddin2016/elasticsearch,elancom/elasticsearch,franklanganke/elasticsearch,vietlq/elasticsearch,chirilo/elasticsearch,dpursehouse/elasticsearch,linglaiyao1314/elasticsearch,truemped/elasticsearch,EasonYi/elasticsearch,ThalaivaStars/OrgRepo1,slavau/elasticsearch,jbertouch/elasticsearch,andrestc/elasticsearch,nazarewk/elasticsearch,Rygbee/elasticsearch,jimhooker2002/elasticsearch,salyh/elasticsearch,ESamir/elasticsearch,polyfractal/elasticsearch,nilabhsagar/elasticsearch,huanzhong/elasticsearch,abhijitiitr/es,yuy168/elasticsearch,kevinkluge/elasticsearch,mohsinh/elasticsearch,chirilo/elasticsearch,adrianbk/elasticsearch,jaynblue/elasticsearch,mm0/elasticsearch,snikch/elasticsearch,sdauletau/elasticsearch,robin13/elasticsearch,ricardocerq/elasticsearch,queirozfcom/elasticsearch,karthikjaps/elasticsearch,synhershko/elasticsearch,kingaj/elasticsearch,golubev/elasticsearch,maddin2016/elasticsearch,adrianbk/elasticsearch,Liziyao/elasticsearch,tahaemin/elasticsearch,ouyangkongtong/elasticsearch,PhaedrusTheGreek/elasticsearch,njlawton/elasticsearch,nomoa/elasticsearch,synhershko/elasticsearch,yanjunh/elasticsearch,gfyoung/elasticsearch,zkidkid/elasticsearch,andrestc/elasticsearch,easonC/elasticsearch,cnfire/elasticsearch-1,kimchy/elasticsearch,alexkuk/elasticsearch,nezirus/elasticsearch,mohsinh/elasticsearch,hafkensite/elasticsearch,opendatasoft/elasticsearch,apepper/elasticsearch,beiske/elasticsearch,zkidkid/elasticsearch,sjohnr/elasticsearch,Flipkart/elasticsearch,Rygbee/elasticsearch,uschindler/elasticsearch,YosuaMichael/elasticsearch,micpalmia/elasticsearch,hanswang/elasticsearch,Liziyao/elasticsearch,Ansh90/elasticsearch,kubum/elasticsearch,kaneshin/elasticsearch,Chhunlong/elasticsearch,iamjakob/elasticsearch,btiernay/elasticsearch,skearns64/elasticsearch,amaliujia/elasticsearch,smflorentino/elasticsearch,amit-shar/elasticsearch,Asimov4/elasticsearch,scottsom/elasticsearch,rento19962/elasticsearch,linglaiyao1314/elasticsearch,bawse/elasticsearch,18098924759/elasticsearch,abibell/elasticsearch,Shekharrajak/elasticsearch,AleksKochev/elasticsearch,jw0201/elastic,wayeast/elasticsearch,njlawton/elasticsearch,Microsoft/elasticsearch,Brijeshrpatel9/elasticsearch,beiske/elasticsearch,mmaracic/elasticsearch,truemped/elasticsearch,heng4fun/elasticsearch,vrkansagara/elasticsearch,lydonchandra/elasticsearch,javachengwc/elasticsearch,ulkas/elasticsearch,ulkas/elasticsearch,Brijeshrpatel9/elasticsearch,mapr/elasticsearch,luiseduardohdbackup/elasticsearch,nellicus/elasticsearch,Shepard1212/elasticsearch,queirozfcom/elasticsearch,sarwarbhuiyan/elasticsearch,wimvds/elasticsearch,a2lin/elasticsearch,kaneshin/elasticsearch,mortonsykes/elasticsearch,sposam/elasticsearch,LeoYao/elasticsearch,yongminxia/elasticsearch,mnylen/elasticsearch,mrorii/elasticsearch,mm0/elasticsearch,coding0011/elasticsearch,jpountz/elasticsearch,mmaracic/elasticsearch,vrkansagara/elasticsearch,franklanganke/elasticsearch,glefloch/elasticsearch,lks21c/elasticsearch,kenshin233/elasticsearch,jeteve/elasticsearch,MisterAndersen/elasticsearch,markharwood/elasticsearch,masterweb121/elasticsearch,apepper/elasticsearch,markharwood/elasticsearch,awislowski/elasticsearch,hanst/elasticsearch,pritishppai/elasticsearch,YosuaMichael/elasticsearch,Siddartha07/elasticsearch,fekaputra/elasticsearch,bawse/elasticsearch,kimimj/elasticsearch,lightslife/elasticsearch,ThalaivaStars/OrgRepo1,MaineC/elasticsearch,humandb/elasticsearch,awislowski/elasticsearch,JSCooke/elasticsearch,wittyameta/elasticsearch,Helen-Zhao/elasticsearch,rento19962/elasticsearch,sreeramjayan/elasticsearch,codebunt/elasticsearch,ulkas/elasticsearch,masaruh/elasticsearch,sauravmondallive/elasticsearch,rhoml/elasticsearch,lmtwga/elasticsearch,queirozfcom/elasticsearch,kenshin233/elasticsearch,sauravmondallive/elasticsearch,drewr/elasticsearch,18098924759/elasticsearch,JSCooke/elasticsearch,Asimov4/elasticsearch,Liziyao/elasticsearch,MaineC/elasticsearch,kingaj/elasticsearch,pranavraman/elasticsearch,springning/elasticsearch,nrkkalyan/elasticsearch,opendatasoft/elasticsearch,Collaborne/elasticsearch,raishiv/elasticsearch,cnfire/elasticsearch-1,lydonchandra/elasticsearch,MichaelLiZhou/elasticsearch,ivansun1010/elasticsearch,clintongormley/elasticsearch,yongminxia/elasticsearch,combinatorist/elasticsearch,elancom/elasticsearch,jimczi/elasticsearch,raishiv/elasticsearch,iacdingping/elasticsearch,boliza/elasticsearch,wayeast/elasticsearch,strapdata/elassandra-test,loconsolutions/elasticsearch,hanst/elasticsearch,diendt/elasticsearch,Clairebi/ElasticsearchClone,ouyangkongtong/elasticsearch,ulkas/elasticsearch,tsohil/elasticsearch,hafkensite/elasticsearch,socialrank/elasticsearch,caengcjd/elasticsearch,ouyangkongtong/elasticsearch,pablocastro/elasticsearch,hirdesh2008/elasticsearch,pritishppai/elasticsearch,sc0ttkclark/elasticsearch,xuzha/elasticsearch,Widen/elasticsearch,ImpressTV/elasticsearch,sarwarbhuiyan/elasticsearch,kalburgimanjunath/elasticsearch,MjAbuz/elasticsearch,Helen-Zhao/elasticsearch,lchennup/elasticsearch,hanswang/elasticsearch,bawse/elasticsearch,karthikjaps/elasticsearch,strapdata/elassandra5-rc,brandonkearby/elasticsearch,scottsom/elasticsearch,jango2015/elasticsearch,LewayneNaidoo/elasticsearch,Widen/elasticsearch,SergVro/elasticsearch,codebunt/elasticsearch,knight1128/elasticsearch,sauravmondallive/elasticsearch,Flipkart/elasticsearch,MisterAndersen/elasticsearch,girirajsharma/elasticsearch,loconsolutions/elasticsearch,anti-social/elasticsearch,ricardocerq/elasticsearch,Siddartha07/elasticsearch,jchampion/elasticsearch,kevinkluge/elasticsearch,springning/elasticsearch,koxa29/elasticsearch,elancom/elasticsearch,VukDukic/elasticsearch,dongjoon-hyun/elasticsearch,ESamir/elasticsearch,jimhooker2002/elasticsearch,rajanm/elasticsearch,GlenRSmith/elasticsearch,Ansh90/elasticsearch,cwurm/elasticsearch,apepper/elasticsearch,schonfeld/elasticsearch,onegambler/elasticsearch,caengcjd/elasticsearch,a2lin/elasticsearch,AshishThakur/elasticsearch,18098924759/elasticsearch,MichaelLiZhou/elasticsearch,areek/elasticsearch,zeroctu/elasticsearch,YosuaMichael/elasticsearch,Shepard1212/elasticsearch,sscarduzio/elasticsearch,nrkkalyan/elasticsearch,sarwarbhuiyan/elasticsearch,mohsinh/elasticsearch,kevinkluge/elasticsearch,mgalushka/elasticsearch,myelin/elasticsearch,jsgao0/elasticsearch,achow/elasticsearch,petmit/elasticsearch,pritishppai/elasticsearch,feiqitian/elasticsearch,LewayneNaidoo/elasticsearch,rlugojr/elasticsearch,Brijeshrpatel9/elasticsearch,rhoml/elasticsearch,mohit/elasticsearch,PhaedrusTheGreek/elasticsearch,ydsakyclguozi/elasticsearch,gingerwizard/elasticsearch,khiraiwa/elasticsearch,hirdesh2008/elasticsearch,wittyameta/elasticsearch,schonfeld/elasticsearch,IanvsPoplicola/elasticsearch,kaneshin/elasticsearch,lmtwga/elasticsearch,davidvgalbraith/elasticsearch,ZTE-PaaS/elasticsearch,spiegela/elasticsearch,sc0ttkclark/elasticsearch,fekaputra/elasticsearch,vinsonlou/elasticsearch,andrestc/elasticsearch,jprante/elasticsearch,sscarduzio/elasticsearch,KimTaehee/elasticsearch,Stacey-Gammon/elasticsearch,shreejay/elasticsearch,wimvds/elasticsearch,feiqitian/elasticsearch,shreejay/elasticsearch,iantruslove/elasticsearch,alexshadow007/elasticsearch,palecur/elasticsearch,njlawton/elasticsearch,martinstuga/elasticsearch,kunallimaye/elasticsearch,kunallimaye/elasticsearch,phani546/elasticsearch,zeroctu/elasticsearch,martinstuga/elasticsearch,winstonewert/elasticsearch,Widen/elasticsearch,kalburgimanjunath/elasticsearch,chirilo/elasticsearch,ydsakyclguozi/elasticsearch,vrkansagara/elasticsearch,anti-social/elasticsearch,springning/elasticsearch,himanshuag/elasticsearch,petabytedata/elasticsearch,scottsom/elasticsearch,micpalmia/elasticsearch,xingguang2013/elasticsearch,ydsakyclguozi/elasticsearch,mm0/elasticsearch,jbertouch/elasticsearch,Stacey-Gammon/elasticsearch,sc0ttkclark/elasticsearch,Asimov4/elasticsearch,heng4fun/elasticsearch,naveenhooda2000/elasticsearch,jango2015/elasticsearch,sdauletau/elasticsearch,gingerwizard/elasticsearch,skearns64/elasticsearch,TonyChai24/ESSource,acchen97/elasticsearch,Shekharrajak/elasticsearch,humandb/elasticsearch,cnfire/elasticsearch-1,LewayneNaidoo/elasticsearch,mute/elasticsearch,baishuo/elasticsearch_v2.1.0-baishuo,glefloch/elasticsearch,mikemccand/elasticsearch,geidies/elasticsearch,cnfire/elasticsearch-1,MetSystem/elasticsearch,Kakakakakku/elasticsearch,sreeramjayan/elasticsearch,karthikjaps/elasticsearch,jw0201/elastic,yynil/elasticsearch,gmarz/elasticsearch,caengcjd/elasticsearch,rajanm/elasticsearch,alexksikes/elasticsearch,SaiprasadKrishnamurthy/elasticsearch,avikurapati/elasticsearch,huypx1292/elasticsearch,xingguang2013/elasticsearch,AshishThakur/elasticsearch,JervyShi/elasticsearch,abhijitiitr/es,huypx1292/elasticsearch,VukDukic/elasticsearch,episerver/elasticsearch,kalimatas/elasticsearch,iantruslove/elasticsearch,wangtuo/elasticsearch,Clairebi/ElasticsearchClone,diendt/elasticsearch,avikurapati/elasticsearch,rento19962/elasticsearch,hydro2k/elasticsearch,camilojd/elasticsearch,Charlesdong/elasticsearch,golubev/elasticsearch,aparo/elasticsearch,hanswang/elasticsearch,mnylen/elasticsearch,MjAbuz/elasticsearch,hydro2k/elasticsearch,strapdata/elassandra,markllama/elasticsearch,JSCooke/elasticsearch,camilojd/elasticsearch,peschlowp/elasticsearch,boliza/elasticsearch,likaiwalkman/elasticsearch,qwerty4030/elasticsearch,lzo/elasticsearch-1,raishiv/elasticsearch,elancom/elasticsearch,mm0/elasticsearch,masterweb121/elasticsearch,wittyameta/elasticsearch,zeroctu/elasticsearch,sjohnr/elasticsearch,humandb/elasticsearch,javachengwc/elasticsearch,Fsero/elasticsearch,F0lha/elasticsearch,hechunwen/elasticsearch,Kakakakakku/elasticsearch,HarishAtGitHub/elasticsearch,jprante/elasticsearch,thecocce/elasticsearch,mkis-/elasticsearch,zhaocloud/elasticsearch,YosuaMichael/elasticsearch,Brijeshrpatel9/elasticsearch,clintongormley/elasticsearch,anti-social/elasticsearch,jimhooker2002/elasticsearch,opendatasoft/elasticsearch,fekaputra/elasticsearch,davidvgalbraith/elasticsearch,ckclark/elasticsearch,kingaj/elasticsearch,fred84/elasticsearch,drewr/elasticsearch,petabytedata/elasticsearch,yuy168/elasticsearch,mmaracic/elasticsearch,HonzaKral/elasticsearch,golubev/elasticsearch,jchampion/elasticsearch,mmaracic/elasticsearch,cwurm/elasticsearch,rlugojr/elasticsearch,knight1128/elasticsearch,boliza/elasticsearch,geidies/elasticsearch,pablocastro/elasticsearch,tcucchietti/elasticsearch,IanvsPoplicola/elasticsearch,szroland/elasticsearch,wangtuo/elasticsearch,hechunwen/elasticsearch,chrismwendt/elasticsearch,Microsoft/elasticsearch,sauravmondallive/elasticsearch,fubuki/elasticsearch,camilojd/elasticsearch,overcome/elasticsearch,schonfeld/elasticsearch,javachengwc/elasticsearch,gingerwizard/elasticsearch,ImpressTV/elasticsearch,spiegela/elasticsearch,linglaiyao1314/elasticsearch,dongjoon-hyun/elasticsearch,koxa29/elasticsearch,tahaemin/elasticsearch,xingguang2013/elasticsearch,girirajsharma/elasticsearch,mikemccand/elasticsearch,markharwood/elasticsearch,rhoml/elasticsearch,Siddartha07/elasticsearch,marcuswr/elasticsearch-dateline,wuranbo/elasticsearch,djschny/elasticsearch,mohit/elasticsearch,smflorentino/elasticsearch,kunallimaye/elasticsearch,snikch/elasticsearch,iacdingping/elasticsearch,wangyuxue/elasticsearch,sreeramjayan/elasticsearch,s1monw/elasticsearch,achow/elasticsearch,koxa29/elasticsearch,opendatasoft/elasticsearch,Ansh90/elasticsearch,wimvds/elasticsearch,strapdata/elassandra-test,wayeast/elasticsearch,Helen-Zhao/elasticsearch,yynil/elasticsearch,markwalkom/elasticsearch,ulkas/elasticsearch,kcompher/elasticsearch,martinstuga/elasticsearch,uboness/elasticsearch,gmarz/elasticsearch,Widen/elasticsearch,ulkas/elasticsearch,Ansh90/elasticsearch,areek/elasticsearch,episerver/elasticsearch,peschlowp/elasticsearch,franklanganke/elasticsearch,alexbrasetvik/elasticsearch,jeteve/elasticsearch,petmit/elasticsearch,easonC/elasticsearch,andrejserafim/elasticsearch,kimchy/elasticsearch,dylan8902/elasticsearch,easonC/elasticsearch,mnylen/elasticsearch,tkssharma/elasticsearch,zeroctu/elasticsearch,lchennup/elasticsearch,fforbeck/elasticsearch,bestwpw/elasticsearch,dylan8902/elasticsearch,achow/elasticsearch,yynil/elasticsearch,IanvsPoplicola/elasticsearch,Collaborne/elasticsearch,dantuffery/elasticsearch,baishuo/elasticsearch_v2.1.0-baishuo,mapr/elasticsearch,AndreKR/elasticsearch,nilabhsagar/elasticsearch,Brijeshrpatel9/elasticsearch,Uiho/elasticsearch,achow/elasticsearch,sjohnr/elasticsearch,AshishThakur/elasticsearch,JackyMai/elasticsearch,fubuki/elasticsearch,abibell/elasticsearch,cwurm/elasticsearch,ajhalani/elasticsearch,GlenRSmith/elasticsearch,ouyangkongtong/elasticsearch,caengcjd/elasticsearch,libosu/elasticsearch,mgalushka/elasticsearch,Charlesdong/elasticsearch,rlugojr/elasticsearch,yongminxia/elasticsearch,yanjunh/elasticsearch,milodky/elasticsearch,artnowo/elasticsearch,JervyShi/elasticsearch,codebunt/elasticsearch,easonC/elasticsearch,achow/elasticsearch,hafkensite/elasticsearch,iantruslove/elasticsearch,ImpressTV/elasticsearch,brandonkearby/elasticsearch,LewayneNaidoo/elasticsearch,girirajsharma/elasticsearch,amaliujia/elasticsearch,djschny/elasticsearch,kenshin233/elasticsearch,linglaiyao1314/elasticsearch,mm0/elasticsearch,djschny/elasticsearch,alexkuk/elasticsearch,ouyangkongtong/elasticsearch,alexksikes/elasticsearch,iacdingping/elasticsearch,mortonsykes/elasticsearch,abhijitiitr/es,mjason3/elasticsearch,trangvh/elasticsearch,overcome/elasticsearch,kingaj/elasticsearch,elasticdog/elasticsearch,vorce/es-metrics,vrkansagara/elasticsearch,jango2015/elasticsearch,pablocastro/elasticsearch,alexbrasetvik/elasticsearch,infusionsoft/elasticsearch,nknize/elasticsearch,Ansh90/elasticsearch,hirdesh2008/elasticsearch,Siddartha07/elasticsearch,strapdata/elassandra5-rc,karthikjaps/elasticsearch,fekaputra/elasticsearch,yongminxia/elasticsearch,djschny/elasticsearch,socialrank/elasticsearch,masaruh/elasticsearch,MetSystem/elasticsearch,springning/elasticsearch,linglaiyao1314/elasticsearch,yongminxia/elasticsearch,umeshdangat/elasticsearch,Shekharrajak/elasticsearch,MichaelLiZhou/elasticsearch,vinsonlou/elasticsearch,mcku/elasticsearch,obourgain/elasticsearch,nazarewk/elasticsearch,rajanm/elasticsearch,sscarduzio/elasticsearch,kaneshin/elasticsearch,adrianbk/elasticsearch,shreejay/elasticsearch,djschny/elasticsearch,truemped/elasticsearch,elasticdog/elasticsearch,abibell/elasticsearch,xuzha/elasticsearch,smflorentino/elasticsearch,umeshdangat/elasticsearch,jsgao0/elasticsearch,winstonewert/elasticsearch,MetSystem/elasticsearch,mcku/elasticsearch,abhijitiitr/es,szroland/elasticsearch,zhaocloud/elasticsearch,kunallimaye/elasticsearch,alexksikes/elasticsearch,JackyMai/elasticsearch,truemped/elasticsearch,jbertouch/elasticsearch,vingupta3/elasticsearch,nomoa/elasticsearch,baishuo/elasticsearch_v2.1.0-baishuo,kaneshin/elasticsearch,yuy168/elasticsearch,petabytedata/elasticsearch,camilojd/elasticsearch,mortonsykes/elasticsearch,hechunwen/elasticsearch,kimchy/elasticsearch,andrejserafim/elasticsearch,weipinghe/elasticsearch,rlugojr/elasticsearch,NBSW/elasticsearch,overcome/elasticsearch,sreeramjayan/elasticsearch,mnylen/elasticsearch,kalburgimanjunath/elasticsearch,vingupta3/elasticsearch,martinstuga/elasticsearch,hanst/elasticsearch,MisterAndersen/elasticsearch,mikemccand/elasticsearch,rmuir/elasticsearch,adrianbk/elasticsearch,queirozfcom/elasticsearch,libosu/elasticsearch,GlenRSmith/elasticsearch,Helen-Zhao/elasticsearch,EasonYi/elasticsearch,hanst/elasticsearch,alexkuk/elasticsearch,slavau/elasticsearch,socialrank/elasticsearch,artnowo/elasticsearch,chrismwendt/elasticsearch,masaruh/elasticsearch,ydsakyclguozi/elasticsearch,zhiqinghuang/elasticsearch,jpountz/elasticsearch,palecur/elasticsearch,kevinkluge/elasticsearch,iamjakob/elasticsearch,kubum/elasticsearch,lzo/elasticsearch-1,lzo/elasticsearch-1,C-Bish/elasticsearch,slavau/elasticsearch,s1monw/elasticsearch,robin13/elasticsearch,jprante/elasticsearch,andrejserafim/elasticsearch,Uiho/elasticsearch,jeteve/elasticsearch,aparo/elasticsearch,kimimj/elasticsearch,markllama/elasticsearch,maddin2016/elasticsearch,lightslife/elasticsearch,maddin2016/elasticsearch,VukDukic/elasticsearch,mute/elasticsearch,jimczi/elasticsearch,onegambler/elasticsearch,Kakakakakku/elasticsearch,MetSystem/elasticsearch,sneivandt/elasticsearch,markharwood/elasticsearch,bestwpw/elasticsearch,kcompher/elasticsearch,loconsolutions/elasticsearch,vroyer/elasticassandra,boliza/elasticsearch,ydsakyclguozi/elasticsearch,obourgain/elasticsearch,Charlesdong/elasticsearch,kevinkluge/elasticsearch,springning/elasticsearch,jaynblue/elasticsearch,sdauletau/elasticsearch,jimhooker2002/elasticsearch,sreeramjayan/elasticsearch,btiernay/elasticsearch,liweinan0423/elasticsearch,mute/elasticsearch,MetSystem/elasticsearch,Shekharrajak/elasticsearch,vingupta3/elasticsearch,ZTE-PaaS/elasticsearch,ImpressTV/elasticsearch,abibell/elasticsearch,mkis-/elasticsearch,heng4fun/elasticsearch,lchennup/elasticsearch,petabytedata/elasticsearch,qwerty4030/elasticsearch,mjhennig/elasticsearch,SaiprasadKrishnamurthy/elasticsearch,dongjoon-hyun/elasticsearch,infusionsoft/elasticsearch,a2lin/elasticsearch,szroland/elasticsearch,ivansun1010/elasticsearch,tebriel/elasticsearch,naveenhooda2000/elasticsearch,thecocce/elasticsearch,nellicus/elasticsearch,vrkansagara/elasticsearch,Shepard1212/elasticsearch,petmit/elasticsearch,bawse/elasticsearch,artnowo/elasticsearch,strapdata/elassandra,Fsero/elasticsearch,zhiqinghuang/elasticsearch,slavau/elasticsearch,jimhooker2002/elasticsearch,acchen97/elasticsearch,mjhennig/elasticsearch,hechunwen/elasticsearch,franklanganke/elasticsearch,tsohil/elasticsearch,nazarewk/elasticsearch,ckclark/elasticsearch,pablocastro/elasticsearch,thecocce/elasticsearch,brwe/elasticsearch,JackyMai/elasticsearch,liweinan0423/elasticsearch,petabytedata/elasticsearch,jimhooker2002/elasticsearch,wimvds/elasticsearch,LewayneNaidoo/elasticsearch,pozhidaevak/elasticsearch,boliza/elasticsearch,Kakakakakku/elasticsearch,abibell/elasticsearch,feiqitian/elasticsearch,lchennup/elasticsearch,ricardocerq/elasticsearch,khiraiwa/elasticsearch,C-Bish/elasticsearch,mbrukman/elasticsearch,knight1128/elasticsearch,AshishThakur/elasticsearch,szroland/elasticsearch,Rygbee/elasticsearch,nezirus/elasticsearch,zeroctu/elasticsearch,strapdata/elassandra-test,JackyMai/elasticsearch,rhoml/elasticsearch,Microsoft/elasticsearch,JackyMai/elasticsearch,a2lin/elasticsearch,franklanganke/elasticsearch,gmarz/elasticsearch,yynil/elasticsearch,F0lha/elasticsearch,zkidkid/elasticsearch,Collaborne/elasticsearch,bestwpw/elasticsearch,golubev/elasticsearch,ivansun1010/elasticsearch,xuzha/elasticsearch,fooljohnny/elasticsearch,lks21c/elasticsearch,Uiho/elasticsearch,mbrukman/elasticsearch,Chhunlong/elasticsearch,i-am-Nathan/elasticsearch,jaynblue/elasticsearch,tcucchietti/elasticsearch,chrismwendt/elasticsearch,heng4fun/elasticsearch,ulkas/elasticsearch,javachengwc/elasticsearch,milodky/elasticsearch,mbrukman/elasticsearch,TonyChai24/ESSource,weipinghe/elasticsearch,sauravmondallive/elasticsearch,ESamir/elasticsearch,andrejserafim/elasticsearch,jw0201/elastic,schonfeld/elasticsearch,nezirus/elasticsearch,beiske/elasticsearch,huypx1292/elasticsearch,yuy168/elasticsearch,beiske/elasticsearch,shreejay/elasticsearch,micpalmia/elasticsearch,Clairebi/ElasticsearchClone,LeoYao/elasticsearch,kalburgimanjunath/elasticsearch,hirdesh2008/elasticsearch,kcompher/elasticsearch,szroland/elasticsearch,kalburgimanjunath/elasticsearch,iacdingping/elasticsearch,acchen97/elasticsearch,lightslife/elasticsearch,strapdata/elassandra,Stacey-Gammon/elasticsearch,rento19962/elasticsearch,dantuffery/elasticsearch,brwe/elasticsearch,mortonsykes/elasticsearch,opendatasoft/elasticsearch,vietlq/elasticsearch,jw0201/elastic,ThiagoGarciaAlves/elasticsearch,mkis-/elasticsearch,EasonYi/elasticsearch,smflorentino/elasticsearch,hirdesh2008/elasticsearch,MetSystem/elasticsearch,vietlq/elasticsearch,myelin/elasticsearch,jaynblue/elasticsearch,snikch/elasticsearch,salyh/elasticsearch,dataduke/elasticsearch,tcucchietti/elasticsearch,vorce/es-metrics,mbrukman/elasticsearch,skearns64/elasticsearch,gfyoung/elasticsearch,NBSW/elasticsearch,iantruslove/elasticsearch,fforbeck/elasticsearch,dongaihua/highlight-elasticsearch,peschlowp/elasticsearch,areek/elasticsearch,ThiagoGarciaAlves/elasticsearch,naveenhooda2000/elasticsearch,schonfeld/elasticsearch,petabytedata/elasticsearch,javachengwc/elasticsearch,franklanganke/elasticsearch,trangvh/elasticsearch,hafkensite/elasticsearch,Uiho/elasticsearch,codebunt/elasticsearch,Chhunlong/elasticsearch,StefanGor/elasticsearch,hydro2k/elasticsearch,xpandan/elasticsearch,caengcjd/elasticsearch,jchampion/elasticsearch,marcuswr/elasticsearch-dateline,acchen97/elasticsearch,spiegela/elasticsearch,chirilo/elasticsearch,iamjakob/elasticsearch,mohsinh/elasticsearch,jeteve/elasticsearch,infusionsoft/elasticsearch,SergVro/elasticsearch,Collaborne/elasticsearch,ricardocerq/elasticsearch,brwe/elasticsearch,brandonkearby/elasticsearch,mkis-/elasticsearch,pranavraman/elasticsearch,amit-shar/elasticsearch,salyh/elasticsearch,mjason3/elasticsearch,VukDukic/elasticsearch,huanzhong/elasticsearch,episerver/elasticsearch,socialrank/elasticsearch,dylan8902/elasticsearch,Fsero/elasticsearch,episerver/elasticsearch,sc0ttkclark/elasticsearch,SaiprasadKrishnamurthy/elasticsearch,djschny/elasticsearch,hechunwen/elasticsearch,Kakakakakku/elasticsearch,smflorentino/elasticsearch,mrorii/elasticsearch,acchen97/elasticsearch,lmtwga/elasticsearch,camilojd/elasticsearch,drewr/elasticsearch,knight1128/elasticsearch,ouyangkongtong/elasticsearch,gmarz/elasticsearch,TonyChai24/ESSource,andrejserafim/elasticsearch,xingguang2013/elasticsearch,robin13/elasticsearch,AshishThakur/elasticsearch,amaliujia/elasticsearch,AleksKochev/elasticsearch,ZTE-PaaS/elasticsearch,nilabhsagar/elasticsearch,VukDukic/elasticsearch,andrestc/elasticsearch,wittyameta/elasticsearch,skearns64/elasticsearch,s1monw/elasticsearch,lzo/elasticsearch-1,i-am-Nathan/elasticsearch,dpursehouse/elasticsearch,MichaelLiZhou/elasticsearch,libosu/elasticsearch,PhaedrusTheGreek/elasticsearch,uschindler/elasticsearch,alexbrasetvik/elasticsearch,liweinan0423/elasticsearch,fred84/elasticsearch,diendt/elasticsearch,infusionsoft/elasticsearch,andrejserafim/elasticsearch,diendt/elasticsearch,Rygbee/elasticsearch,sjohnr/elasticsearch,hanswang/elasticsearch,fekaputra/elasticsearch,KimTaehee/elasticsearch,onegambler/elasticsearch,iacdingping/elasticsearch,alexbrasetvik/elasticsearch,xingguang2013/elasticsearch,vroyer/elasticassandra,masaruh/elasticsearch,geidies/elasticsearch,tkssharma/elasticsearch,mgalushka/elasticsearch,adrianbk/elasticsearch,kenshin233/elasticsearch,adrianbk/elasticsearch,Stacey-Gammon/elasticsearch,cnfire/elasticsearch-1,robin13/elasticsearch,glefloch/elasticsearch,likaiwalkman/elasticsearch,palecur/elasticsearch,uschindler/elasticsearch,rajanm/elasticsearch,tebriel/elasticsearch,umeshdangat/elasticsearch,KimTaehee/elasticsearch,hafkensite/elasticsearch,mm0/elasticsearch,maddin2016/elasticsearch,wbowling/elasticsearch,himanshuag/elasticsearch,socialrank/elasticsearch,MaineC/elasticsearch,tsohil/elasticsearch,feiqitian/elasticsearch,vingupta3/elasticsearch,wittyameta/elasticsearch,ImpressTV/elasticsearch,Flipkart/elasticsearch,humandb/elasticsearch,scorpionvicky/elasticsearch,masterweb121/elasticsearch,fernandozhu/elasticsearch,polyfractal/elasticsearch,Charlesdong/elasticsearch,snikch/elasticsearch,uboness/elasticsearch,apepper/elasticsearch,mrorii/elasticsearch,dataduke/elasticsearch,xingguang2013/elasticsearch,phani546/elasticsearch,truemped/elasticsearch,tahaemin/elasticsearch,milodky/elasticsearch,dylan8902/elasticsearch,lzo/elasticsearch-1,obourgain/elasticsearch,socialrank/elasticsearch,raishiv/elasticsearch,sposam/elasticsearch,alexshadow007/elasticsearch,coding0011/elasticsearch,vvcephei/elasticsearch,ImpressTV/elasticsearch,tahaemin/elasticsearch,Siddartha07/elasticsearch,likaiwalkman/elasticsearch,luiseduardohdbackup/elasticsearch,zhiqinghuang/elasticsearch,anti-social/elasticsearch,sneivandt/elasticsearch,mjason3/elasticsearch,jchampion/elasticsearch,sdauletau/elasticsearch,wimvds/elasticsearch,cwurm/elasticsearch,marcuswr/elasticsearch-dateline,Charlesdong/elasticsearch,polyfractal/elasticsearch,uboness/elasticsearch,mikemccand/elasticsearch,i-am-Nathan/elasticsearch,amaliujia/elasticsearch,TonyChai24/ESSource,HonzaKral/elasticsearch,fekaputra/elasticsearch,yuy168/elasticsearch,xuzha/elasticsearch,nomoa/elasticsearch,ThalaivaStars/OrgRepo1,overcome/elasticsearch,huanzhong/elasticsearch,mohit/elasticsearch,codebunt/elasticsearch,schonfeld/elasticsearch,jpountz/elasticsearch,sneivandt/elasticsearch,wangtuo/elasticsearch,jw0201/elastic,ThalaivaStars/OrgRepo1,tcucchietti/elasticsearch,sc0ttkclark/elasticsearch,vietlq/elasticsearch,KimTaehee/elasticsearch,sc0ttkclark/elasticsearch,kimimj/elasticsearch,raishiv/elasticsearch,strapdata/elassandra-test,TonyChai24/ESSource,fubuki/elasticsearch,zhaocloud/elasticsearch,markwalkom/elasticsearch,mbrukman/elasticsearch,alexbrasetvik/elasticsearch,weipinghe/elasticsearch,jbertouch/elasticsearch,mbrukman/elasticsearch,MetSystem/elasticsearch,MjAbuz/elasticsearch,trangvh/elasticsearch,mute/elasticsearch,btiernay/elasticsearch,HarishAtGitHub/elasticsearch,nilabhsagar/elasticsearch,Shepard1212/elasticsearch,milodky/elasticsearch,chrismwendt/elasticsearch,sauravmondallive/elasticsearch,umeshdangat/elasticsearch,rento19962/elasticsearch,coding0011/elasticsearch,C-Bish/elasticsearch,wenpos/elasticsearch,linglaiyao1314/elasticsearch,HarishAtGitHub/elasticsearch,diendt/elasticsearch,pablocastro/elasticsearch,elasticdog/elasticsearch,AndreKR/elasticsearch,wangyuxue/elasticsearch,clintongormley/elasticsearch,xpandan/elasticsearch,davidvgalbraith/elasticsearch,girirajsharma/elasticsearch,huypx1292/elasticsearch,chirilo/elasticsearch,drewr/elasticsearch,Helen-Zhao/elasticsearch,strapdata/elassandra-test,Clairebi/ElasticsearchClone,iacdingping/elasticsearch,SaiprasadKrishnamurthy/elasticsearch,thecocce/elasticsearch,tsohil/elasticsearch,mute/elasticsearch,Flipkart/elasticsearch,vroyer/elassandra,scorpionvicky/elasticsearch,hanst/elasticsearch,fred84/elasticsearch,koxa29/elasticsearch,fred84/elasticsearch,btiernay/elasticsearch,dongjoon-hyun/elasticsearch,jw0201/elastic,baishuo/elasticsearch_v2.1.0-baishuo,strapdata/elassandra,jprante/elasticsearch,vorce/es-metrics,Clairebi/ElasticsearchClone,Clairebi/ElasticsearchClone,palecur/elasticsearch,dataduke/elasticsearch,mkis-/elasticsearch,tsohil/elasticsearch,andrewvc/elasticsearch,AleksKochev/elasticsearch,masterweb121/elasticsearch,sjohnr/elasticsearch,NBSW/elasticsearch,polyfractal/elasticsearch,fernandozhu/elasticsearch,nellicus/elasticsearch,coding0011/elasticsearch,kalimatas/elasticsearch,fooljohnny/elasticsearch,kalimatas/elasticsearch,myelin/elasticsearch,markharwood/elasticsearch,ThiagoGarciaAlves/elasticsearch,jaynblue/elasticsearch,wbowling/elasticsearch,18098924759/elasticsearch,pozhidaevak/elasticsearch,tebriel/elasticsearch,iantruslove/elasticsearch,springning/elasticsearch,dantuffery/elasticsearch,amaliujia/elasticsearch,cnfire/elasticsearch-1,tsohil/elasticsearch,fooljohnny/elasticsearch,zhiqinghuang/elasticsearch,mohsinh/elasticsearch,MjAbuz/elasticsearch,sarwarbhuiyan/elasticsearch,NBSW/elasticsearch,alexksikes/elasticsearch,kubum/elasticsearch,combinatorist/elasticsearch,vvcephei/elasticsearch,aglne/elasticsearch,vvcephei/elasticsearch,Uiho/elasticsearch,ajhalani/elasticsearch,aglne/elasticsearch,masterweb121/elasticsearch,tahaemin/elasticsearch,obourgain/elasticsearch,aglne/elasticsearch,apepper/elasticsearch,Collaborne/elasticsearch,HarishAtGitHub/elasticsearch,ThiagoGarciaAlves/elasticsearch,mjason3/elasticsearch,ZTE-PaaS/elasticsearch,fernandozhu/elasticsearch,kimimj/elasticsearch,aglne/elasticsearch,wbowling/elasticsearch,martinstuga/elasticsearch,IanvsPoplicola/elasticsearch,mgalushka/elasticsearch,wbowling/elasticsearch,markwalkom/elasticsearch,SergVro/elasticsearch,zeroctu/elasticsearch,fooljohnny/elasticsearch,kkirsche/elasticsearch,mcku/elasticsearch,henakamaMSFT/elasticsearch,myelin/elasticsearch,kimimj/elasticsearch,markllama/elasticsearch,s1monw/elasticsearch,MisterAndersen/elasticsearch,nilabhsagar/elasticsearch,baishuo/elasticsearch_v2.1.0-baishuo,Flipkart/elasticsearch,Brijeshrpatel9/elasticsearch,wayeast/elasticsearch,gingerwizard/elasticsearch,sdauletau/elasticsearch,btiernay/elasticsearch,mkis-/elasticsearch,ivansun1010/elasticsearch,winstonewert/elasticsearch,a2lin/elasticsearch,lzo/elasticsearch-1,ckclark/elasticsearch,sscarduzio/elasticsearch,davidvgalbraith/elasticsearch,rmuir/elasticsearch,koxa29/elasticsearch,pablocastro/elasticsearch,jimhooker2002/elasticsearch,strapdata/elassandra5-rc,kcompher/elasticsearch,IanvsPoplicola/elasticsearch,rmuir/elasticsearch,dylan8902/elasticsearch,lmtwga/elasticsearch,Uiho/elasticsearch,wuranbo/elasticsearch,henakamaMSFT/elasticsearch,micpalmia/elasticsearch,davidvgalbraith/elasticsearch,trangvh/elasticsearch,uboness/elasticsearch,mjhennig/elasticsearch,NBSW/elasticsearch,hirdesh2008/elasticsearch,Liziyao/elasticsearch,kubum/elasticsearch,sarwarbhuiyan/elasticsearch,knight1128/elasticsearch,wenpos/elasticsearch,fooljohnny/elasticsearch,janmejay/elasticsearch,luiseduardohdbackup/elasticsearch,humandb/elasticsearch,baishuo/elasticsearch_v2.1.0-baishuo,dataduke/elasticsearch,amit-shar/elasticsearch,girirajsharma/elasticsearch,ThiagoGarciaAlves/elasticsearch,ivansun1010/elasticsearch,jeteve/elasticsearch,wittyameta/elasticsearch,tebriel/elasticsearch,heng4fun/elasticsearch,alexkuk/elasticsearch,Charlesdong/elasticsearch,huypx1292/elasticsearch,ricardocerq/elasticsearch,amit-shar/elasticsearch,wayeast/elasticsearch,zhaocloud/elasticsearch,JervyShi/elasticsearch,mcku/elasticsearch,beiske/elasticsearch,mnylen/elasticsearch,hanswang/elasticsearch,tkssharma/elasticsearch,mjhennig/elasticsearch,chirilo/elasticsearch,vvcephei/elasticsearch,clintongormley/elasticsearch,mjhennig/elasticsearch,jbertouch/elasticsearch,pranavraman/elasticsearch,markllama/elasticsearch,petabytedata/elasticsearch,Fsero/elasticsearch,lydonchandra/elasticsearch,aglne/elasticsearch,areek/elasticsearch,EasonYi/elasticsearch,khiraiwa/elasticsearch,socialrank/elasticsearch,kalimatas/elasticsearch,Shepard1212/elasticsearch,mapr/elasticsearch,18098924759/elasticsearch,abibell/elasticsearch,C-Bish/elasticsearch,kcompher/elasticsearch,amaliujia/elasticsearch,avikurapati/elasticsearch,xpandan/elasticsearch,ImpressTV/elasticsearch,huanzhong/elasticsearch,aglne/elasticsearch,AleksKochev/elasticsearch,henakamaMSFT/elasticsearch,qwerty4030/elasticsearch,huanzhong/elasticsearch,wenpos/elasticsearch,acchen97/elasticsearch,huanzhong/elasticsearch,yongminxia/elasticsearch,brandonkearby/elasticsearch,nknize/elasticsearch,mikemccand/elasticsearch,iacdingping/elasticsearch,scottsom/elasticsearch,markwalkom/elasticsearch,dataduke/elasticsearch,easonC/elasticsearch,gmarz/elasticsearch,tkssharma/elasticsearch,Fsero/elasticsearch,milodky/elasticsearch,MichaelLiZhou/elasticsearch,hechunwen/elasticsearch,EasonYi/elasticsearch,andrewvc/elasticsearch,Widen/elasticsearch,vroyer/elasticassandra,kenshin233/elasticsearch,pritishppai/elasticsearch,Asimov4/elasticsearch,likaiwalkman/elasticsearch,btiernay/elasticsearch,Liziyao/elasticsearch,Widen/elasticsearch,kimimj/elasticsearch,MisterAndersen/elasticsearch,zhiqinghuang/elasticsearch,lchennup/elasticsearch,franklanganke/elasticsearch,njlawton/elasticsearch,kaneshin/elasticsearch,truemped/elasticsearch,wangtuo/elasticsearch,i-am-Nathan/elasticsearch,Microsoft/elasticsearch,yynil/elasticsearch,zhaocloud/elasticsearch,phani546/elasticsearch,YosuaMichael/elasticsearch,phani546/elasticsearch,koxa29/elasticsearch,yanjunh/elasticsearch,geidies/elasticsearch,weipinghe/elasticsearch,achow/elasticsearch,gfyoung/elasticsearch,tkssharma/elasticsearch,areek/elasticsearch,xpandan/elasticsearch,sposam/elasticsearch,kalburgimanjunath/elasticsearch,janmejay/elasticsearch,markharwood/elasticsearch,JSCooke/elasticsearch,ESamir/elasticsearch,brwe/elasticsearch,tebriel/elasticsearch,awislowski/elasticsearch,kunallimaye/elasticsearch,fernandozhu/elasticsearch,iamjakob/elasticsearch,camilojd/elasticsearch,SergVro/elasticsearch,kimimj/elasticsearch,PhaedrusTheGreek/elasticsearch,martinstuga/elasticsearch,LeoYao/elasticsearch,achow/elasticsearch,glefloch/elasticsearch,knight1128/elasticsearch,khiraiwa/elasticsearch,MjAbuz/elasticsearch,rento19962/elasticsearch,naveenhooda2000/elasticsearch,AndreKR/elasticsearch,kunallimaye/elasticsearch,himanshuag/elasticsearch,Chhunlong/elasticsearch,TonyChai24/ESSource,weipinghe/elasticsearch,slavau/elasticsearch,sdauletau/elasticsearch,nknize/elasticsearch,hirdesh2008/elasticsearch,nellicus/elasticsearch,luiseduardohdbackup/elasticsearch,davidvgalbraith/elasticsearch,strapdata/elassandra-test,andrestc/elasticsearch,alexshadow007/elasticsearch,ThalaivaStars/OrgRepo1,petmit/elasticsearch,lightslife/elasticsearch,kcompher/elasticsearch,sposam/elasticsearch,mnylen/elasticsearch,awislowski/elasticsearch,rhoml/elasticsearch,ydsakyclguozi/elasticsearch,nknize/elasticsearch,jprante/elasticsearch,sneivandt/elasticsearch,janmejay/elasticsearch,szroland/elasticsearch,mute/elasticsearch,onegambler/elasticsearch,NBSW/elasticsearch,AndreKR/elasticsearch,mrorii/elasticsearch,girirajsharma/elasticsearch,kingaj/elasticsearch,geidies/elasticsearch,pozhidaevak/elasticsearch,strapdata/elassandra-test,scorpionvicky/elasticsearch,luiseduardohdbackup/elasticsearch,btiernay/elasticsearch,jaynblue/elasticsearch,hydro2k/elasticsearch,jango2015/elasticsearch,dataduke/elasticsearch,cnfire/elasticsearch-1,MichaelLiZhou/elasticsearch,mbrukman/elasticsearch,trangvh/elasticsearch,EasonYi/elasticsearch,wayeast/elasticsearch,njlawton/elasticsearch,lmtwga/elasticsearch,rmuir/elasticsearch,vietlq/elasticsearch,sposam/elasticsearch,himanshuag/elasticsearch,nellicus/elasticsearch,luiseduardohdbackup/elasticsearch,Collaborne/elasticsearch,HarishAtGitHub/elasticsearch,vingupta3/elasticsearch,pozhidaevak/elasticsearch,yanjunh/elasticsearch,infusionsoft/elasticsearch,feiqitian/elasticsearch,mapr/elasticsearch,PhaedrusTheGreek/elasticsearch,loconsolutions/elasticsearch,lchennup/elasticsearch,kkirsche/elasticsearch,vroyer/elassandra,infusionsoft/elasticsearch,YosuaMichael/elasticsearch,nrkkalyan/elasticsearch,kevinkluge/elasticsearch,mapr/elasticsearch,alexbrasetvik/elasticsearch,glefloch/elasticsearch,EasonYi/elasticsearch,drewr/elasticsearch,liweinan0423/elasticsearch,fubuki/elasticsearch,Charlesdong/elasticsearch,Stacey-Gammon/elasticsearch,humandb/elasticsearch,Liziyao/elasticsearch,qwerty4030/elasticsearch,kcompher/elasticsearch,kubum/elasticsearch,xpandan/elasticsearch,mmaracic/elasticsearch,skearns64/elasticsearch,scorpionvicky/elasticsearch,wuranbo/elasticsearch,nazarewk/elasticsearch,polyfractal/elasticsearch,thecocce/elasticsearch,LeoYao/elasticsearch,jchampion/elasticsearch,dpursehouse/elasticsearch,F0lha/elasticsearch,sdauletau/elasticsearch,aparo/elasticsearch,rmuir/elasticsearch,qwerty4030/elasticsearch,djschny/elasticsearch,abhijitiitr/es,jchampion/elasticsearch,vvcephei/elasticsearch,iamjakob/elasticsearch,clintongormley/elasticsearch,kalimatas/elasticsearch,areek/elasticsearch,lightslife/elasticsearch,easonC/elasticsearch,wangyuxue/elasticsearch,KimTaehee/elasticsearch,phani546/elasticsearch,pablocastro/elasticsearch,scorpionvicky/elasticsearch,alexshadow007/elasticsearch,AndreKR/elasticsearch,lks21c/elasticsearch,mohit/elasticsearch,bestwpw/elasticsearch,cwurm/elasticsearch,lmenezes/elasticsearch,sc0ttkclark/elasticsearch,fooljohnny/elasticsearch,GlenRSmith/elasticsearch,wbowling/elasticsearch,SergVro/elasticsearch,pranavraman/elasticsearch,loconsolutions/elasticsearch,GlenRSmith/elasticsearch,nrkkalyan/elasticsearch,jpountz/elasticsearch,Kakakakakku/elasticsearch,dpursehouse/elasticsearch,mjason3/elasticsearch,nellicus/elasticsearch,karthikjaps/elasticsearch,peschlowp/elasticsearch,vietlq/elasticsearch,umeshdangat/elasticsearch,jango2015/elasticsearch,rajanm/elasticsearch,jpountz/elasticsearch,nomoa/elasticsearch,kkirsche/elasticsearch,MjAbuz/elasticsearch,HarishAtGitHub/elasticsearch,tkssharma/elasticsearch,fred84/elasticsearch,mute/elasticsearch,PhaedrusTheGreek/elasticsearch,yanjunh/elasticsearch,markwalkom/elasticsearch,wuranbo/elasticsearch,JervyShi/elasticsearch,masterweb121/elasticsearch,SaiprasadKrishnamurthy/elasticsearch,obourgain/elasticsearch,wenpos/elasticsearch,wimvds/elasticsearch,gfyoung/elasticsearch,dpursehouse/elasticsearch,ckclark/elasticsearch,pritishppai/elasticsearch,anti-social/elasticsearch,rmuir/elasticsearch,fforbeck/elasticsearch,HonzaKral/elasticsearch,yuy168/elasticsearch,mrorii/elasticsearch,rhoml/elasticsearch,kkirsche/elasticsearch,fernandozhu/elasticsearch,wenpos/elasticsearch,vvcephei/elasticsearch,nezirus/elasticsearch,Ansh90/elasticsearch,sarwarbhuiyan/elasticsearch,queirozfcom/elasticsearch,fforbeck/elasticsearch,ivansun1010/elasticsearch,naveenhooda2000/elasticsearch,nrkkalyan/elasticsearch,lydonchandra/elasticsearch,mohit/elasticsearch,mjhennig/elasticsearch,Asimov4/elasticsearch,apepper/elasticsearch,queirozfcom/elasticsearch,infusionsoft/elasticsearch,iantruslove/elasticsearch,aparo/elasticsearch,palecur/elasticsearch,bestwpw/elasticsearch,StefanGor/elasticsearch,shreejay/elasticsearch,hanst/elasticsearch,myelin/elasticsearch,abibell/elasticsearch,bestwpw/elasticsearch,ThiagoGarciaAlves/elasticsearch,rento19962/elasticsearch,Rygbee/elasticsearch,coding0011/elasticsearch,bestwpw/elasticsearch,Shekharrajak/elasticsearch,Chhunlong/elasticsearch,F0lha/elasticsearch,fforbeck/elasticsearch,zhiqinghuang/elasticsearch,xpandan/elasticsearch,lks21c/elasticsearch,iamjakob/elasticsearch,Rygbee/elasticsearch,vingupta3/elasticsearch,AleksKochev/elasticsearch,hafkensite/elasticsearch,mgalushka/elasticsearch,nellicus/elasticsearch,JervyShi/elasticsearch,lydonchandra/elasticsearch,ckclark/elasticsearch,wittyameta/elasticsearch,salyh/elasticsearch,LeoYao/elasticsearch,rajanm/elasticsearch,skearns64/elasticsearch,huypx1292/elasticsearch,ajhalani/elasticsearch,hafkensite/elasticsearch,mortonsykes/elasticsearch,MichaelLiZhou/elasticsearch,loconsolutions/elasticsearch,pritishppai/elasticsearch,drewr/elasticsearch,winstonewert/elasticsearch,awislowski/elasticsearch,onegambler/elasticsearch,ZTE-PaaS/elasticsearch,Siddartha07/elasticsearch,drewr/elasticsearch,Flipkart/elasticsearch,Shekharrajak/elasticsearch,SaiprasadKrishnamurthy/elasticsearch,hydro2k/elasticsearch,artnowo/elasticsearch,KimTaehee/elasticsearch,YosuaMichael/elasticsearch,sarwarbhuiyan/elasticsearch,xuzha/elasticsearch,lzo/elasticsearch-1,mapr/elasticsearch,caengcjd/elasticsearch,lmtwga/elasticsearch,nazarewk/elasticsearch,dantuffery/elasticsearch,mcku/elasticsearch,hydro2k/elasticsearch,KimTaehee/elasticsearch,wayeast/elasticsearch,jango2015/elasticsearch,snikch/elasticsearch,janmejay/elasticsearch,kubum/elasticsearch,beiske/elasticsearch,ajhalani/elasticsearch,himanshuag/elasticsearch,Widen/elasticsearch,khiraiwa/elasticsearch,mgalushka/elasticsearch,F0lha/elasticsearch,18098924759/elasticsearch,wangtuo/elasticsearch,xuzha/elasticsearch,janmejay/elasticsearch,sposam/elasticsearch,gfyoung/elasticsearch,Siddartha07/elasticsearch,spiegela/elasticsearch,jbertouch/elasticsearch,s1monw/elasticsearch,pozhidaevak/elasticsearch,truemped/elasticsearch,tahaemin/elasticsearch,strapdata/elassandra5-rc,Shekharrajak/elasticsearch,weipinghe/elasticsearch,kunallimaye/elasticsearch,JervyShi/elasticsearch,linglaiyao1314/elasticsearch,dylan8902/elasticsearch,amit-shar/elasticsearch,sreeramjayan/elasticsearch,C-Bish/elasticsearch,dongjoon-hyun/elasticsearch,jimczi/elasticsearch,salyh/elasticsearch,libosu/elasticsearch,jimczi/elasticsearch,milodky/elasticsearch,ESamir/elasticsearch,peschlowp/elasticsearch,liweinan0423/elasticsearch,uschindler/elasticsearch,iamjakob/elasticsearch,zkidkid/elasticsearch,overcome/elasticsearch,kingaj/elasticsearch,vrkansagara/elasticsearch,yynil/elasticsearch,opendatasoft/elasticsearch,onegambler/elasticsearch,alexkuk/elasticsearch,yuy168/elasticsearch,jeteve/elasticsearch,lmtwga/elasticsearch,kalburgimanjunath/elasticsearch,henakamaMSFT/elasticsearch,StefanGor/elasticsearch,nrkkalyan/elasticsearch,gingerwizard/elasticsearch,alexksikes/elasticsearch,janmejay/elasticsearch,likaiwalkman/elasticsearch,SaiprasadKrishnamurthy/elasticsearch,robin13/elasticsearch,geidies/elasticsearch,apepper/elasticsearch,queirozfcom/elasticsearch,episerver/elasticsearch,aparo/elasticsearch,artnowo/elasticsearch,sneivandt/elasticsearch,MjAbuz/elasticsearch,18098924759/elasticsearch,golubev/elasticsearch,uschindler/elasticsearch,fubuki/elasticsearch,brandonkearby/elasticsearch,nomoa/elasticsearch,F0lha/elasticsearch,springning/elasticsearch,MaineC/elasticsearch,Collaborne/elasticsearch,strapdata/elassandra5-rc,wuranbo/elasticsearch,alexshadow007/elasticsearch,elasticdog/elasticsearch,wbowling/elasticsearch,henakamaMSFT/elasticsearch,MaineC/elasticsearch,jsgao0/elasticsearch,vorce/es-metrics,vroyer/elassandra,pritishppai/elasticsearch,tahaemin/elasticsearch,spiegela/elasticsearch,tcucchietti/elasticsearch,HarishAtGitHub/elasticsearch,baishuo/elasticsearch_v2.1.0-baishuo,StefanGor/elasticsearch,jsgao0/elasticsearch,alexkuk/elasticsearch,lks21c/elasticsearch,NBSW/elasticsearch,kubum/elasticsearch,amit-shar/elasticsearch,markllama/elasticsearch,adrianbk/elasticsearch,gingerwizard/elasticsearch,karthikjaps/elasticsearch,phani546/elasticsearch,hydro2k/elasticsearch,mrorii/elasticsearch,smflorentino/elasticsearch,StefanGor/elasticsearch,slavau/elasticsearch,rlugojr/elasticsearch,masterweb121/elasticsearch,zkidkid/elasticsearch,hanswang/elasticsearch,lydonchandra/elasticsearch,zeroctu/elasticsearch,Fsero/elasticsearch,jango2015/elasticsearch,micpalmia/elasticsearch,feiqitian/elasticsearch,wimvds/elasticsearch,tsohil/elasticsearch,chrismwendt/elasticsearch,jsgao0/elasticsearch,amit-shar/elasticsearch,Chhunlong/elasticsearch,ckclark/elasticsearch,tkssharma/elasticsearch,jsgao0/elasticsearch,PhaedrusTheGreek/elasticsearch,mmaracic/elasticsearch,andrewvc/elasticsearch,Rygbee/elasticsearch,elasticdog/elasticsearch,lydonchandra/elasticsearch,humandb/elasticsearch,fubuki/elasticsearch,schonfeld/elasticsearch,elancom/elasticsearch,dongaihua/highlight-elasticsearch,wbowling/elasticsearch,hanswang/elasticsearch,strapdata/elassandra,khiraiwa/elasticsearch,likaiwalkman/elasticsearch,nknize/elasticsearch,marcuswr/elasticsearch-dateline,mgalushka/elasticsearch,xingguang2013/elasticsearch,kevinkluge/elasticsearch,Uiho/elasticsearch,luiseduardohdbackup/elasticsearch,vorce/es-metrics,dataduke/elasticsearch,combinatorist/elasticsearch,gingerwizard/elasticsearch,libosu/elasticsearch,AndreKR/elasticsearch,mjhennig/elasticsearch,masaruh/elasticsearch,sjohnr/elasticsearch,zhiqinghuang/elasticsearch,dantuffery/elasticsearch,LeoYao/elasticsearch,kingaj/elasticsearch,kkirsche/elasticsearch,weipinghe/elasticsearch,winstonewert/elasticsearch,anti-social/elasticsearch,andrestc/elasticsearch,kenshin233/elasticsearch,libosu/elasticsearch,AshishThakur/elasticsearch,golubev/elasticsearch,pranavraman/elasticsearch,bawse/elasticsearch,pranavraman/elasticsearch,yongminxia/elasticsearch,Chhunlong/elasticsearch,sscarduzio/elasticsearch | /*
* Licensed to Elastic Search and Shay Banon under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. Elastic Search 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.
*/
package org.elasticsearch.search.highlight;
import org.apache.lucene.analysis.Analyzer;
import org.apache.lucene.analysis.TokenStream;
import org.apache.lucene.document.Document;
import org.apache.lucene.document.Field;
import org.apache.lucene.document.Fieldable;
import org.apache.lucene.index.IndexReader;
import org.apache.lucene.search.Query;
import org.apache.lucene.search.highlight.*;
import org.apache.lucene.search.vectorhighlight.*;
import org.elasticsearch.ElasticSearchException;
import org.elasticsearch.common.collect.ImmutableMap;
import org.elasticsearch.common.io.FastStringReader;
import org.elasticsearch.common.lucene.document.SingleFieldSelector;
import org.elasticsearch.index.mapper.DocumentMapper;
import org.elasticsearch.index.mapper.FieldMapper;
import org.elasticsearch.index.mapper.MapperService;
import org.elasticsearch.search.SearchParseElement;
import org.elasticsearch.search.fetch.FetchPhaseExecutionException;
import org.elasticsearch.search.fetch.SearchHitPhase;
import org.elasticsearch.search.highlight.vectorhighlight.SourceScoreOrderFragmentsBuilder;
import org.elasticsearch.search.highlight.vectorhighlight.SourceSimpleFragmentsBuilder;
import org.elasticsearch.search.internal.SearchContext;
import org.elasticsearch.search.lookup.SearchLookup;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import java.util.Map;
import static org.elasticsearch.common.collect.Maps.*;
/**
* @author kimchy (shay.banon)
*/
public class HighlightPhase implements SearchHitPhase {
public static class Encoders {
public static Encoder DEFAULT = new DefaultEncoder();
public static Encoder HTML = new SimpleHTMLEncoder();
}
@Override public Map<String, ? extends SearchParseElement> parseElements() {
return ImmutableMap.of("highlight", new HighlighterParseElement());
}
@Override public boolean executionNeeded(SearchContext context) {
return context.highlight() != null;
}
@Override public void execute(SearchContext context, HitContext hitContext) throws ElasticSearchException {
try {
DocumentMapper documentMapper = context.mapperService().documentMapper(hitContext.hit().type());
Map<String, HighlightField> highlightFields = newHashMap();
for (SearchContextHighlight.Field field : context.highlight().fields()) {
Encoder encoder;
if (field.encoder().equals("html")) {
encoder = Encoders.HTML;
} else {
encoder = Encoders.DEFAULT;
}
FieldMapper mapper = documentMapper.mappers().smartNameFieldMapper(field.field());
if (mapper == null) {
MapperService.SmartNameFieldMappers fullMapper = context.mapperService().smartName(field.field());
if (fullMapper == null || !fullMapper.hasDocMapper()) {
//Save skipping missing fields
continue;
}
if (!fullMapper.docMapper().type().equals(hitContext.hit().type())) {
continue;
}
mapper = fullMapper.mapper();
if (mapper == null) {
continue;
}
}
// if we can do highlighting using Term Vectors, use FastVectorHighlighter, otherwise, use the
// slower plain highlighter
if (mapper.termVector() != Field.TermVector.WITH_POSITIONS_OFFSETS) {
if (!context.queryRewritten()) {
try {
context.updateRewriteQuery(context.searcher().rewrite(context.query()));
} catch (IOException e) {
throw new FetchPhaseExecutionException(context, "Failed to highlight field [" + field.field() + "]", e);
}
}
// Don't use the context.query() since it might be rewritten, and we need to pass the non rewritten queries to
// let the highlighter handle MultiTerm ones
QueryScorer queryScorer = new QueryScorer(context.parsedQuery().query(), null);
queryScorer.setExpandMultiTermQuery(true);
Fragmenter fragmenter;
if (field.numberOfFragments() == 0) {
fragmenter = new NullFragmenter();
} else {
fragmenter = new SimpleSpanFragmenter(queryScorer, field.fragmentCharSize());
}
Formatter formatter = new SimpleHTMLFormatter(field.preTags()[0], field.postTags()[0]);
Highlighter highlighter = new Highlighter(formatter, encoder, queryScorer);
highlighter.setTextFragmenter(fragmenter);
List<Object> textsToHighlight;
if (mapper.stored()) {
try {
Document doc = hitContext.reader().document(hitContext.docId(), new SingleFieldSelector(mapper.names().indexName()));
textsToHighlight = new ArrayList<Object>(doc.getFields().size());
for (Fieldable docField : doc.getFields()) {
if (docField.stringValue() != null) {
textsToHighlight.add(docField.stringValue());
}
}
} catch (Exception e) {
throw new FetchPhaseExecutionException(context, "Failed to highlight field [" + field.field() + "]", e);
}
} else {
SearchLookup lookup = context.lookup();
lookup.setNextReader(hitContext.reader());
lookup.setNextDocId(hitContext.docId());
textsToHighlight = lookup.source().getValues(mapper.names().fullName());
}
// a HACK to make highlighter do highlighting, even though its using the single frag list builder
int numberOfFragments = field.numberOfFragments() == 0 ? 1 : field.numberOfFragments();
ArrayList<TextFragment> fragsList = new ArrayList<TextFragment>();
try {
for (Object textToHighlight : textsToHighlight) {
String text = textToHighlight.toString();
Analyzer analyzer = context.mapperService().documentMapper(hitContext.hit().type()).mappers().indexAnalyzer();
TokenStream tokenStream = analyzer.reusableTokenStream(mapper.names().indexName(), new FastStringReader(text));
TextFragment[] bestTextFragments = highlighter.getBestTextFragments(tokenStream, text, false, numberOfFragments);
for (TextFragment bestTextFragment : bestTextFragments) {
if (bestTextFragment != null && bestTextFragment.getScore() > 0) {
fragsList.add(bestTextFragment);
}
}
}
} catch (Exception e) {
throw new FetchPhaseExecutionException(context, "Failed to highlight field [" + field.field() + "]", e);
}
if (field.scoreOrdered()) {
Collections.sort(fragsList, new Comparator<TextFragment>() {
public int compare(TextFragment o1, TextFragment o2) {
return Math.round(o2.getScore() - o1.getScore());
}
});
}
String[] fragments;
// number_of_fragments is set to 0 but we have a multivalued field
if (field.numberOfFragments() == 0 && textsToHighlight.size() > 1) {
fragments = new String[1];
for (int i = 0; i < fragsList.size(); i++) {
fragments[0] = (fragments[0] != null ? (fragments[0] + " ") : "") + fragsList.get(i).toString();
}
} else {
// refine numberOfFragments if needed
numberOfFragments = fragsList.size() < numberOfFragments ? fragsList.size() : numberOfFragments;
fragments = new String[numberOfFragments];
for (int i = 0; i < fragments.length; i++) {
fragments[i] = fragsList.get(i).toString();
}
}
if (fragments.length > 0) {
HighlightField highlightField = new HighlightField(field.field(), fragments);
highlightFields.put(highlightField.name(), highlightField);
}
} else {
FragListBuilder fragListBuilder;
FragmentsBuilder fragmentsBuilder;
if (field.numberOfFragments() == 0) {
fragListBuilder = new SingleFragListBuilder();
if (mapper.stored()) {
fragmentsBuilder = new SimpleFragmentsBuilder(field.preTags(), field.postTags());
} else {
fragmentsBuilder = new SourceSimpleFragmentsBuilder(mapper, context, field.preTags(), field.postTags());
}
} else {
if (field.fragmentOffset() == -1)
fragListBuilder = new SimpleFragListBuilder();
else
fragListBuilder = new MarginFragListBuilder(field.fragmentOffset());
if (field.scoreOrdered()) {
if (mapper.stored()) {
fragmentsBuilder = new ScoreOrderFragmentsBuilder(field.preTags(), field.postTags());
} else {
fragmentsBuilder = new SourceScoreOrderFragmentsBuilder(mapper, context, field.preTags(), field.postTags());
}
} else {
if (mapper.stored()) {
fragmentsBuilder = new SimpleFragmentsBuilder(field.preTags(), field.postTags());
} else {
fragmentsBuilder = new SourceSimpleFragmentsBuilder(mapper, context, field.preTags(), field.postTags());
}
}
}
FastVectorHighlighter highlighter = new FastVectorHighlighter(true, false, fragListBuilder, fragmentsBuilder);
FieldQuery fieldQuery = buildFieldQuery(highlighter, context.query(), hitContext.reader(), field);
String[] fragments;
try {
// a HACK to make highlighter do highlighting, even though its using the single frag list builder
int numberOfFragments = field.numberOfFragments() == 0 ? 1 : field.numberOfFragments();
fragments = highlighter.getBestFragments(fieldQuery, hitContext.reader(), hitContext.docId(), mapper.names().indexName(), field.fragmentCharSize(), numberOfFragments,
fragListBuilder, fragmentsBuilder, field.preTags(), field.postTags(), encoder);
} catch (IOException e) {
throw new FetchPhaseExecutionException(context, "Failed to highlight field [" + field.field() + "]", e);
}
if (fragments != null && fragments.length > 0) {
HighlightField highlightField = new HighlightField(field.field(), fragments);
highlightFields.put(highlightField.name(), highlightField);
}
}
}
hitContext.hit().highlightFields(highlightFields);
} finally {
CustomFieldQuery.reader.remove();
CustomFieldQuery.highlightFilters.remove();
}
}
private FieldQuery buildFieldQuery(FastVectorHighlighter highlighter, Query query, IndexReader indexReader, SearchContextHighlight.Field field) {
CustomFieldQuery.reader.set(indexReader);
CustomFieldQuery.highlightFilters.set(field.highlightFilter());
return new CustomFieldQuery(query, highlighter);
}
}
| modules/elasticsearch/src/main/java/org/elasticsearch/search/highlight/HighlightPhase.java | /*
* Licensed to Elastic Search and Shay Banon under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. Elastic Search 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.
*/
package org.elasticsearch.search.highlight;
import org.apache.lucene.analysis.Analyzer;
import org.apache.lucene.analysis.TokenStream;
import org.apache.lucene.document.Document;
import org.apache.lucene.document.Field;
import org.apache.lucene.document.Fieldable;
import org.apache.lucene.index.IndexReader;
import org.apache.lucene.search.Query;
import org.apache.lucene.search.highlight.*;
import org.apache.lucene.search.vectorhighlight.*;
import org.elasticsearch.ElasticSearchException;
import org.elasticsearch.common.collect.ImmutableMap;
import org.elasticsearch.common.io.FastStringReader;
import org.elasticsearch.common.lucene.document.SingleFieldSelector;
import org.elasticsearch.index.mapper.DocumentMapper;
import org.elasticsearch.index.mapper.FieldMapper;
import org.elasticsearch.index.mapper.MapperService;
import org.elasticsearch.search.SearchParseElement;
import org.elasticsearch.search.fetch.FetchPhaseExecutionException;
import org.elasticsearch.search.fetch.SearchHitPhase;
import org.elasticsearch.search.highlight.vectorhighlight.SourceScoreOrderFragmentsBuilder;
import org.elasticsearch.search.highlight.vectorhighlight.SourceSimpleFragmentsBuilder;
import org.elasticsearch.search.internal.SearchContext;
import org.elasticsearch.search.lookup.SearchLookup;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import java.util.Map;
import static org.elasticsearch.common.collect.Maps.*;
/**
* @author kimchy (shay.banon)
*/
public class HighlightPhase implements SearchHitPhase {
private Encoder encoder;
private FragListBuilder fraglistbuilder;
private FragmentsBuilder fragmentbuiler;
@Override public Map<String, ? extends SearchParseElement> parseElements() {
return ImmutableMap.of("highlight", new HighlighterParseElement());
}
@Override public boolean executionNeeded(SearchContext context) {
return context.highlight() != null;
}
@Override public void execute(SearchContext context, HitContext hitContext) throws ElasticSearchException {
try {
DocumentMapper documentMapper = context.mapperService().documentMapper(hitContext.hit().type());
Map<String, HighlightField> highlightFields = newHashMap();
for (SearchContextHighlight.Field field : context.highlight().fields()) {
if (field.encoder().equals("html"))
encoder = new SimpleHTMLEncoder();
else
encoder = new DefaultEncoder();
FieldMapper mapper = documentMapper.mappers().smartNameFieldMapper(field.field());
if (mapper == null) {
MapperService.SmartNameFieldMappers fullMapper = context.mapperService().smartName(field.field());
if (fullMapper == null || !fullMapper.hasDocMapper()) {
//Save skipping missing fields
continue;
}
if (!fullMapper.docMapper().type().equals(hitContext.hit().type())) {
continue;
}
mapper = fullMapper.mapper();
if (mapper == null) {
continue;
}
}
// if we can do highlighting using Term Vectors, use FastVectorHighlighter, otherwise, use the
// slower plain highlighter
if (mapper.termVector() != Field.TermVector.WITH_POSITIONS_OFFSETS) {
if (!context.queryRewritten()) {
try {
context.updateRewriteQuery(context.searcher().rewrite(context.query()));
} catch (IOException e) {
throw new FetchPhaseExecutionException(context, "Failed to highlight field [" + field.field() + "]", e);
}
}
// Don't use the context.query() since it might be rewritten, and we need to pass the non rewritten queries to
// let the highlighter handle MultiTerm ones
QueryScorer queryScorer = new QueryScorer(context.parsedQuery().query(), null);
queryScorer.setExpandMultiTermQuery(true);
Fragmenter fragmenter;
if (field.numberOfFragments() == 0) {
fragmenter = new NullFragmenter();
} else {
fragmenter = new SimpleSpanFragmenter(queryScorer, field.fragmentCharSize());
}
Formatter formatter = new SimpleHTMLFormatter(field.preTags()[0], field.postTags()[0]);
Highlighter highlighter = new Highlighter(formatter, encoder, queryScorer);
highlighter.setTextFragmenter(fragmenter);
List<Object> textsToHighlight;
if (mapper.stored()) {
try {
Document doc = hitContext.reader().document(hitContext.docId(), new SingleFieldSelector(mapper.names().indexName()));
textsToHighlight = new ArrayList<Object>(doc.getFields().size());
for (Fieldable docField : doc.getFields()) {
if (docField.stringValue() != null) {
textsToHighlight.add(docField.stringValue());
}
}
} catch (Exception e) {
throw new FetchPhaseExecutionException(context, "Failed to highlight field [" + field.field() + "]", e);
}
} else {
SearchLookup lookup = context.lookup();
lookup.setNextReader(hitContext.reader());
lookup.setNextDocId(hitContext.docId());
textsToHighlight = lookup.source().getValues(mapper.names().fullName());
}
// a HACK to make highlighter do highlighting, even though its using the single frag list builder
int numberOfFragments = field.numberOfFragments() == 0 ? 1 : field.numberOfFragments();
ArrayList<TextFragment> fragsList = new ArrayList<TextFragment>();
try {
for (Object textToHighlight : textsToHighlight) {
String text = textToHighlight.toString();
Analyzer analyzer = context.mapperService().documentMapper(hitContext.hit().type()).mappers().indexAnalyzer();
TokenStream tokenStream = analyzer.reusableTokenStream(mapper.names().indexName(), new FastStringReader(text));
TextFragment[] bestTextFragments = highlighter.getBestTextFragments(tokenStream, text, false, numberOfFragments);
for (TextFragment bestTextFragment : bestTextFragments) {
if (bestTextFragment != null && bestTextFragment.getScore() > 0) {
fragsList.add(bestTextFragment);
}
}
}
} catch (Exception e) {
throw new FetchPhaseExecutionException(context, "Failed to highlight field [" + field.field() + "]", e);
}
if (field.scoreOrdered()) {
Collections.sort(fragsList, new Comparator<TextFragment>() {
public int compare(TextFragment o1, TextFragment o2) {
return Math.round(o2.getScore() - o1.getScore());
}
});
}
String[] fragments;
// number_of_fragments is set to 0 but we have a multivalued field
if (field.numberOfFragments() == 0 && textsToHighlight.size() > 1) {
fragments = new String[1];
for (int i = 0; i < fragsList.size(); i++) {
fragments[0] = (fragments[0] != null ? (fragments[0] + " ") : "") + fragsList.get(i).toString();
}
} else {
// refine numberOfFragments if needed
numberOfFragments = fragsList.size() < numberOfFragments ? fragsList.size() : numberOfFragments;
fragments = new String[numberOfFragments];
for (int i = 0; i < fragments.length; i++) {
fragments[i] = fragsList.get(i).toString();
}
}
if (fragments.length > 0) {
HighlightField highlightField = new HighlightField(field.field(), fragments);
highlightFields.put(highlightField.name(), highlightField);
}
} else {
FastVectorHighlighter highlighter = buildHighlighter(context, mapper, field);
FieldQuery fieldQuery = buildFieldQuery(highlighter, context.query(), hitContext.reader(), field);
String[] fragments;
try {
// a HACK to make highlighter do highlighting, even though its using the single frag list builder
int numberOfFragments = field.numberOfFragments() == 0 ? 1 : field.numberOfFragments();
fragments = highlighter.getBestFragments(fieldQuery, hitContext.reader(), hitContext.docId(), mapper.names().indexName(), field.fragmentCharSize(), numberOfFragments,
this.fraglistbuilder, this.fragmentbuiler, field.preTags(), field.postTags(), encoder);
} catch (IOException e) {
throw new FetchPhaseExecutionException(context, "Failed to highlight field [" + field.field() + "]", e);
}
if (fragments != null && fragments.length > 0) {
HighlightField highlightField = new HighlightField(field.field(), fragments);
highlightFields.put(highlightField.name(), highlightField);
}
}
}
hitContext.hit().highlightFields(highlightFields);
} finally {
CustomFieldQuery.reader.remove();
CustomFieldQuery.highlightFilters.remove();
}
}
private FieldQuery buildFieldQuery(FastVectorHighlighter highlighter, Query query, IndexReader indexReader, SearchContextHighlight.Field field) {
CustomFieldQuery.reader.set(indexReader);
CustomFieldQuery.highlightFilters.set(field.highlightFilter());
return new CustomFieldQuery(query, highlighter);
}
private FastVectorHighlighter buildHighlighter(SearchContext searchContext, FieldMapper fieldMapper, SearchContextHighlight.Field field) {
FragListBuilder fragListBuilder;
FragmentsBuilder fragmentsBuilder;
if (field.numberOfFragments() == 0) {
fragListBuilder = new SingleFragListBuilder();
if (fieldMapper.stored()) {
fragmentsBuilder = new SimpleFragmentsBuilder(field.preTags(), field.postTags());
} else {
fragmentsBuilder = new SourceSimpleFragmentsBuilder(fieldMapper, searchContext, field.preTags(), field.postTags());
}
} else {
if (field.fragmentOffset() == -1)
fragListBuilder = new SimpleFragListBuilder();
else
fragListBuilder = new MarginFragListBuilder(field.fragmentOffset());
if (field.scoreOrdered()) {
if (fieldMapper.stored()) {
fragmentsBuilder = new ScoreOrderFragmentsBuilder(field.preTags(), field.postTags());
} else {
fragmentsBuilder = new SourceScoreOrderFragmentsBuilder(fieldMapper, searchContext, field.preTags(), field.postTags());
}
} else {
if (fieldMapper.stored()) {
fragmentsBuilder = new SimpleFragmentsBuilder(field.preTags(), field.postTags());
} else {
fragmentsBuilder = new SourceSimpleFragmentsBuilder(fieldMapper, searchContext, field.preTags(), field.postTags());
}
}
}
this.fraglistbuilder = fragListBuilder;
this.fragmentbuiler = fragmentsBuilder;
return new FastVectorHighlighter(true, false, fragListBuilder, fragmentsBuilder);
}
}
| fix some highlighting encoder issues
| modules/elasticsearch/src/main/java/org/elasticsearch/search/highlight/HighlightPhase.java | fix some highlighting encoder issues | <ide><path>odules/elasticsearch/src/main/java/org/elasticsearch/search/highlight/HighlightPhase.java
<ide> */
<ide> public class HighlightPhase implements SearchHitPhase {
<ide>
<del> private Encoder encoder;
<del> private FragListBuilder fraglistbuilder;
<del> private FragmentsBuilder fragmentbuiler;
<add> public static class Encoders {
<add> public static Encoder DEFAULT = new DefaultEncoder();
<add> public static Encoder HTML = new SimpleHTMLEncoder();
<add> }
<ide>
<ide> @Override public Map<String, ? extends SearchParseElement> parseElements() {
<ide> return ImmutableMap.of("highlight", new HighlighterParseElement());
<ide>
<ide> Map<String, HighlightField> highlightFields = newHashMap();
<ide> for (SearchContextHighlight.Field field : context.highlight().fields()) {
<del> if (field.encoder().equals("html"))
<del> encoder = new SimpleHTMLEncoder();
<del> else
<del> encoder = new DefaultEncoder();
<add> Encoder encoder;
<add> if (field.encoder().equals("html")) {
<add> encoder = Encoders.HTML;
<add> } else {
<add> encoder = Encoders.DEFAULT;
<add> }
<ide> FieldMapper mapper = documentMapper.mappers().smartNameFieldMapper(field.field());
<ide> if (mapper == null) {
<ide> MapperService.SmartNameFieldMappers fullMapper = context.mapperService().smartName(field.field());
<ide> fragmenter = new SimpleSpanFragmenter(queryScorer, field.fragmentCharSize());
<ide> }
<ide> Formatter formatter = new SimpleHTMLFormatter(field.preTags()[0], field.postTags()[0]);
<del>
<ide>
<ide>
<ide> Highlighter highlighter = new Highlighter(formatter, encoder, queryScorer);
<ide> highlightFields.put(highlightField.name(), highlightField);
<ide> }
<ide> } else {
<del> FastVectorHighlighter highlighter = buildHighlighter(context, mapper, field);
<add> FragListBuilder fragListBuilder;
<add> FragmentsBuilder fragmentsBuilder;
<add> if (field.numberOfFragments() == 0) {
<add> fragListBuilder = new SingleFragListBuilder();
<add>
<add> if (mapper.stored()) {
<add> fragmentsBuilder = new SimpleFragmentsBuilder(field.preTags(), field.postTags());
<add> } else {
<add> fragmentsBuilder = new SourceSimpleFragmentsBuilder(mapper, context, field.preTags(), field.postTags());
<add> }
<add> } else {
<add> if (field.fragmentOffset() == -1)
<add> fragListBuilder = new SimpleFragListBuilder();
<add> else
<add> fragListBuilder = new MarginFragListBuilder(field.fragmentOffset());
<add>
<add> if (field.scoreOrdered()) {
<add> if (mapper.stored()) {
<add> fragmentsBuilder = new ScoreOrderFragmentsBuilder(field.preTags(), field.postTags());
<add> } else {
<add> fragmentsBuilder = new SourceScoreOrderFragmentsBuilder(mapper, context, field.preTags(), field.postTags());
<add> }
<add> } else {
<add> if (mapper.stored()) {
<add> fragmentsBuilder = new SimpleFragmentsBuilder(field.preTags(), field.postTags());
<add> } else {
<add> fragmentsBuilder = new SourceSimpleFragmentsBuilder(mapper, context, field.preTags(), field.postTags());
<add> }
<add> }
<add> }
<add> FastVectorHighlighter highlighter = new FastVectorHighlighter(true, false, fragListBuilder, fragmentsBuilder);
<ide> FieldQuery fieldQuery = buildFieldQuery(highlighter, context.query(), hitContext.reader(), field);
<ide>
<ide> String[] fragments;
<ide> // a HACK to make highlighter do highlighting, even though its using the single frag list builder
<ide> int numberOfFragments = field.numberOfFragments() == 0 ? 1 : field.numberOfFragments();
<ide> fragments = highlighter.getBestFragments(fieldQuery, hitContext.reader(), hitContext.docId(), mapper.names().indexName(), field.fragmentCharSize(), numberOfFragments,
<del> this.fraglistbuilder, this.fragmentbuiler, field.preTags(), field.postTags(), encoder);
<add> fragListBuilder, fragmentsBuilder, field.preTags(), field.postTags(), encoder);
<ide> } catch (IOException e) {
<ide> throw new FetchPhaseExecutionException(context, "Failed to highlight field [" + field.field() + "]", e);
<ide> }
<ide> CustomFieldQuery.highlightFilters.set(field.highlightFilter());
<ide> return new CustomFieldQuery(query, highlighter);
<ide> }
<del>
<del> private FastVectorHighlighter buildHighlighter(SearchContext searchContext, FieldMapper fieldMapper, SearchContextHighlight.Field field) {
<del> FragListBuilder fragListBuilder;
<del> FragmentsBuilder fragmentsBuilder;
<del> if (field.numberOfFragments() == 0) {
<del> fragListBuilder = new SingleFragListBuilder();
<del>
<del> if (fieldMapper.stored()) {
<del> fragmentsBuilder = new SimpleFragmentsBuilder(field.preTags(), field.postTags());
<del> } else {
<del> fragmentsBuilder = new SourceSimpleFragmentsBuilder(fieldMapper, searchContext, field.preTags(), field.postTags());
<del> }
<del> } else {
<del> if (field.fragmentOffset() == -1)
<del> fragListBuilder = new SimpleFragListBuilder();
<del> else
<del> fragListBuilder = new MarginFragListBuilder(field.fragmentOffset());
<del>
<del> if (field.scoreOrdered()) {
<del> if (fieldMapper.stored()) {
<del> fragmentsBuilder = new ScoreOrderFragmentsBuilder(field.preTags(), field.postTags());
<del> } else {
<del> fragmentsBuilder = new SourceScoreOrderFragmentsBuilder(fieldMapper, searchContext, field.preTags(), field.postTags());
<del> }
<del> } else {
<del> if (fieldMapper.stored()) {
<del> fragmentsBuilder = new SimpleFragmentsBuilder(field.preTags(), field.postTags());
<del> } else {
<del> fragmentsBuilder = new SourceSimpleFragmentsBuilder(fieldMapper, searchContext, field.preTags(), field.postTags());
<del> }
<del> }
<del> }
<del> this.fraglistbuilder = fragListBuilder;
<del> this.fragmentbuiler = fragmentsBuilder;
<del> return new FastVectorHighlighter(true, false, fragListBuilder, fragmentsBuilder);
<del> }
<del>
<ide> } |
|
Java | apache-2.0 | 1069cbb83fe46f6e4b0c73ce386805f1781ae444 | 0 | Talend/data-prep,Talend/data-prep,Talend/data-prep | package org.talend.dataprep.api.dataset;
public class Quality {
private int empty;
private int invalid;
private int valid;
public int getEmpty() {
return empty;
}
public void setEmpty(int empty) {
this.empty = empty;
}
public int getInvalid() {
return invalid;
}
public void setInvalid(int invalid) {
this.invalid = invalid;
}
public int getValid() {
return valid;
}
public void setValid(int valid) {
this.valid = valid;
}
@Override
public String toString() {
return "Quality{" + "empty=" + empty + ", invalid=" + invalid + ", valid=" + valid + '}';
}
}
| dataprep-backend-common/src/main/java/org/talend/dataprep/api/dataset/Quality.java | package org.talend.dataprep.api.dataset;
public class Quality {
private int empty;
private int invalid;
private int valid;
public int getEmpty() {
return empty;
}
public void setEmpty(int empty) {
this.empty = empty;
}
public int getInvalid() {
return invalid;
}
public void setInvalid(int invalid) {
this.invalid = invalid;
}
public int getValid() {
return valid;
}
public void setValid(int valid) {
this.valid = valid;
}
}
| better toString
| dataprep-backend-common/src/main/java/org/talend/dataprep/api/dataset/Quality.java | better toString | <ide><path>ataprep-backend-common/src/main/java/org/talend/dataprep/api/dataset/Quality.java
<ide> public void setValid(int valid) {
<ide> this.valid = valid;
<ide> }
<add>
<add> @Override
<add> public String toString() {
<add> return "Quality{" + "empty=" + empty + ", invalid=" + invalid + ", valid=" + valid + '}';
<add> }
<ide> } |
|
Java | apache-2.0 | 82bf858a1793c821461db23b65a20c9dde8acd21 | 0 | dimagi/commcare,dimagi/commcare,dimagi/commcare,dimagi/commcare-core,dimagi/commcare-core,dimagi/commcare-core | /*
* Copyright (C) 2009 JavaRosa
*
* 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 org.javarosa.xform.parse;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.Reader;
import java.util.Enumeration;
import java.util.Hashtable;
import java.util.Stack;
import java.util.Vector;
import org.javarosa.core.model.Action;
import org.javarosa.core.model.Constants;
import org.javarosa.core.model.DataBinding;
import org.javarosa.core.model.FormDef;
import org.javarosa.core.model.GroupDef;
import org.javarosa.core.model.IDataReference;
import org.javarosa.core.model.IFormElement;
import org.javarosa.core.model.ItemsetBinding;
import org.javarosa.core.model.QuestionDef;
import org.javarosa.core.model.SelectChoice;
import org.javarosa.core.model.SubmissionProfile;
import org.javarosa.core.model.actions.SetValueAction;
import org.javarosa.core.model.condition.Condition;
import org.javarosa.core.model.condition.Constraint;
import org.javarosa.core.model.condition.EvaluationContext;
import org.javarosa.core.model.condition.Recalculate;
import org.javarosa.core.model.condition.Triggerable;
import org.javarosa.core.model.data.AnswerDataFactory;
import org.javarosa.core.model.data.UncastData;
import org.javarosa.core.model.instance.DataInstance;
import org.javarosa.core.model.instance.ExternalDataInstance;
import org.javarosa.core.model.instance.FormInstance;
import org.javarosa.core.model.instance.InvalidReferenceException;
import org.javarosa.core.model.instance.TreeElement;
import org.javarosa.core.model.instance.TreeReference;
import org.javarosa.core.model.util.restorable.Restorable;
import org.javarosa.core.model.util.restorable.RestoreUtils;
import org.javarosa.core.services.Logger;
import org.javarosa.core.services.locale.Localizer;
import org.javarosa.core.services.locale.TableLocaleSource;
import org.javarosa.core.util.DataUtil;
import org.javarosa.core.util.OrderedHashtable;
import org.javarosa.core.util.externalizable.PrototypeFactory;
import org.javarosa.core.util.externalizable.PrototypeFactoryDeprecated;
import org.javarosa.model.xform.XPathReference;
import org.javarosa.xform.util.InterningKXmlParser;
import org.javarosa.xform.util.XFormSerializer;
import org.javarosa.xform.util.XFormUtils;
import org.javarosa.xpath.XPathConditional;
import org.javarosa.xpath.XPathParseTool;
import org.javarosa.xpath.expr.XPathPathExpr;
import org.javarosa.xpath.parser.XPathSyntaxException;
import org.kxml2.io.KXmlParser;
import org.kxml2.kdom.Document;
import org.kxml2.kdom.Element;
import org.kxml2.kdom.Node;
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
/* droos: i think we need to start storing the contents of the <bind>s in the formdef again */
/**
* Provides conversion from xform to epihandy object model and vice vasa.
*
* @author Daniel Kayiwa
* @author Drew Roos
*
*/
public class XFormParser {
//Constants to clean up code and prevent user error
private static final String ID_ATTR = "id";
private static final String FORM_ATTR = "form";
private static final String APPEARANCE_ATTR = "appearance";
private static final String NODESET_ATTR = "nodeset";
private static final String LABEL_ELEMENT = "label";
private static final String VALUE = "value";
private static final String ITEXT_CLOSE = "')";
private static final String ITEXT_OPEN = "jr:itext('";
private static final String BIND_ATTR = "bind";
private static final String REF_ATTR = "ref";
private static final String SELECTONE = "select1";
private static final String SELECT = "select";
public static final String NAMESPACE_JAVAROSA = "http://openrosa.org/javarosa";
public static final String NAMESPACE_HTML = "http://www.w3.org/1999/xhtml";
private static final int CONTAINER_GROUP = 1;
private static final int CONTAINER_REPEAT = 2;
private static Hashtable<String, IElementHandler> topLevelHandlers;
private static Hashtable<String, IElementHandler> groupLevelHandlers;
private static Hashtable<String, Integer> typeMappings;
private static PrototypeFactoryDeprecated modelPrototypes;
private static Vector<SubmissionParser> submissionParsers;
private Reader _reader;
private Document _xmldoc;
private FormDef _f;
private Reader _instReader;
private Document _instDoc;
private boolean modelFound;
private Hashtable<String, DataBinding> bindingsByID;
private Vector<DataBinding> bindings;
private Vector<TreeReference> actionTargets;
private Vector<TreeReference> repeats;
private Vector<ItemsetBinding> itemsets;
private Vector<TreeReference> selectOnes;
private Vector<TreeReference> selectMultis;
private Element mainInstanceNode; //top-level data node of the instance; saved off so it can be processed after the <bind>s
private Vector<Element> instanceNodes;
private Vector<String> instanceNodeIdStrs;
private String defaultNamespace;
private Vector<String> itextKnownForms;
private Vector<String> namedActions;
private Hashtable<String, IElementHandler> structuredActions;
private FormInstance repeatTree; //pseudo-data model tree that describes the repeat structure of the instance;
//useful during instance processing and validation
//incremented to provide unique question ID for each question
private int serialQuestionID = 1;
static {
try {
staticInit();
} catch (Exception e) {
Logger.die("xfparser-static-init", e);
}
}
private static void staticInit() {
initProcessingRules();
initTypeMappings();
modelPrototypes = new PrototypeFactoryDeprecated();
submissionParsers = new Vector<SubmissionParser>();
}
private static void initProcessingRules () {
IElementHandler title = new IElementHandler () {
public void handle (XFormParser p, Element e, Object parent) { p.parseTitle(e); } };
IElementHandler meta = new IElementHandler () {
public void handle (XFormParser p, Element e, Object parent) { p.parseMeta(e); } };
IElementHandler model = new IElementHandler () {
public void handle (XFormParser p, Element e, Object parent) { p.parseModel(e); } };
IElementHandler input = new IElementHandler () {
public void handle (XFormParser p, Element e, Object parent) { p.parseControl((IFormElement)parent, e, Constants.CONTROL_INPUT); } };
IElementHandler secret = new IElementHandler () {
public void handle (XFormParser p, Element e, Object parent) { p.parseControl((IFormElement)parent, e, Constants.CONTROL_SECRET); } };
IElementHandler select = new IElementHandler () {
public void handle (XFormParser p, Element e, Object parent) { p.parseControl((IFormElement)parent, e, Constants.CONTROL_SELECT_MULTI); } };
IElementHandler select1 = new IElementHandler () {
public void handle (XFormParser p, Element e, Object parent) { p.parseControl((IFormElement)parent, e, Constants.CONTROL_SELECT_ONE); } };
IElementHandler group = new IElementHandler () {
public void handle (XFormParser p, Element e, Object parent) { p.parseGroup((IFormElement)parent, e, CONTAINER_GROUP); } };
IElementHandler repeat = new IElementHandler () {
public void handle (XFormParser p, Element e, Object parent) { p.parseGroup((IFormElement)parent, e, CONTAINER_REPEAT); } };
IElementHandler groupLabel = new IElementHandler () {
public void handle (XFormParser p, Element e, Object parent) { p.parseGroupLabel((GroupDef)parent, e); } };
IElementHandler trigger = new IElementHandler () {
public void handle (XFormParser p, Element e, Object parent) { p.parseControl((IFormElement)parent, e, Constants.CONTROL_TRIGGER); } };
IElementHandler upload = new IElementHandler () {
public void handle (XFormParser p, Element e, Object parent) { p.parseUpload((IFormElement)parent, e, Constants.CONTROL_UPLOAD); } };
groupLevelHandlers = new Hashtable<String, IElementHandler>();
groupLevelHandlers.put("input", input);
groupLevelHandlers.put("secret",secret);
groupLevelHandlers.put(SELECT, select);
groupLevelHandlers.put(SELECTONE, select1);
groupLevelHandlers.put("group", group);
groupLevelHandlers.put("repeat", repeat);
groupLevelHandlers.put("trigger", trigger); //multi-purpose now; need to dig deeper
groupLevelHandlers.put(Constants.XFTAG_UPLOAD, upload);
topLevelHandlers = new Hashtable<String, IElementHandler>();
for (Enumeration en = groupLevelHandlers.keys(); en.hasMoreElements(); ) {
String key = (String)en.nextElement();
topLevelHandlers.put(key, groupLevelHandlers.get(key));
}
topLevelHandlers.put("model", model);
topLevelHandlers.put("title", title);
topLevelHandlers.put("meta", meta);
groupLevelHandlers.put(LABEL_ELEMENT, groupLabel);
}
private static void initTypeMappings () {
typeMappings = new Hashtable<String, Integer>();
typeMappings.put("string", DataUtil.integer(Constants.DATATYPE_TEXT)); //xsd:
typeMappings.put("integer", DataUtil.integer(Constants.DATATYPE_INTEGER)); //xsd:
typeMappings.put("long", DataUtil.integer(Constants.DATATYPE_LONG)); //xsd:
typeMappings.put("int", DataUtil.integer(Constants.DATATYPE_INTEGER)); //xsd:
typeMappings.put("decimal", DataUtil.integer(Constants.DATATYPE_DECIMAL)); //xsd:
typeMappings.put("double", DataUtil.integer(Constants.DATATYPE_DECIMAL)); //xsd:
typeMappings.put("float", DataUtil.integer(Constants.DATATYPE_DECIMAL)); //xsd:
typeMappings.put("dateTime", DataUtil.integer(Constants.DATATYPE_DATE_TIME)); //xsd:
typeMappings.put("date", DataUtil.integer(Constants.DATATYPE_DATE)); //xsd:
typeMappings.put("time", DataUtil.integer(Constants.DATATYPE_TIME)); //xsd:
typeMappings.put("gYear", DataUtil.integer(Constants.DATATYPE_UNSUPPORTED)); //xsd:
typeMappings.put("gMonth", DataUtil.integer(Constants.DATATYPE_UNSUPPORTED)); //xsd:
typeMappings.put("gDay", DataUtil.integer(Constants.DATATYPE_UNSUPPORTED)); //xsd:
typeMappings.put("gYearMonth", DataUtil.integer(Constants.DATATYPE_UNSUPPORTED)); //xsd:
typeMappings.put("gMonthDay", DataUtil.integer(Constants.DATATYPE_UNSUPPORTED)); //xsd:
typeMappings.put("boolean", DataUtil.integer(Constants.DATATYPE_BOOLEAN)); //xsd:
typeMappings.put("base64Binary", DataUtil.integer(Constants.DATATYPE_UNSUPPORTED)); //xsd:
typeMappings.put("hexBinary", DataUtil.integer(Constants.DATATYPE_UNSUPPORTED)); //xsd:
typeMappings.put("anyURI", DataUtil.integer(Constants.DATATYPE_UNSUPPORTED)); //xsd:
typeMappings.put("listItem", DataUtil.integer(Constants.DATATYPE_CHOICE)); //xforms:
typeMappings.put("listItems", DataUtil.integer(Constants.DATATYPE_CHOICE_LIST)); //xforms:
typeMappings.put(SELECTONE, DataUtil.integer(Constants.DATATYPE_CHOICE)); //non-standard
typeMappings.put(SELECT, DataUtil.integer(Constants.DATATYPE_CHOICE_LIST)); //non-standard
typeMappings.put("geopoint", DataUtil.integer(Constants.DATATYPE_GEOPOINT)); //non-standard
typeMappings.put("barcode", DataUtil.integer(Constants.DATATYPE_BARCODE)); //non-standard
typeMappings.put("binary", DataUtil.integer(Constants.DATATYPE_BINARY)); //non-standard
}
private void initState () {
modelFound = false;
bindingsByID = new Hashtable<String, DataBinding>();
bindings = new Vector<DataBinding>();
actionTargets = new Vector<TreeReference>();
repeats = new Vector<TreeReference>();
itemsets = new Vector<ItemsetBinding>();
selectOnes = new Vector<TreeReference>();
selectMultis = new Vector<TreeReference>();
mainInstanceNode = null;
instanceNodes = new Vector<Element>();
instanceNodeIdStrs = new Vector<String>();
repeatTree = null;
defaultNamespace = null;
itextKnownForms = new Vector<String>();
itextKnownForms.addElement("long");
itextKnownForms.addElement("short");
itextKnownForms.addElement("image");
itextKnownForms.addElement("audio");
namedActions = new Vector<String>();
namedActions.addElement("rebuild");
namedActions.addElement("recalculate");
namedActions.addElement("revalidate");
namedActions.addElement("refresh");
namedActions.addElement("setfocus");
namedActions.addElement("reset");
structuredActions = new Hashtable<String, IElementHandler>();
structuredActions.put("setvalue", new IElementHandler() {
public void handle (XFormParser p, Element e, Object parent) { p.parseSetValueAction((FormDef)parent, e);}
});
}
XFormParserReporter reporter = new XFormParserReporter();
public XFormParser(Reader reader) {
_reader = reader;
}
public XFormParser(Document doc) {
_xmldoc = doc;
}
public XFormParser(Reader form, Reader instance) {
_reader = form;
_instReader = instance;
}
public XFormParser(Document form, Document instance) {
_xmldoc = form;
_instDoc = instance;
}
public void attachReporter(XFormParserReporter reporter) {
this.reporter = reporter;
}
public FormDef parse() throws IOException {
if (_f == null) {
System.out.println("Parsing form...");
if (_xmldoc == null) {
_xmldoc = getXMLDocument(_reader);
}
parseDoc();
//load in a custom xml instance, if applicable
if (_instReader != null) {
loadXmlInstance(_f, _instReader);
} else if (_instDoc != null) {
loadXmlInstance(_f, _instDoc);
}
}
return _f;
}
public static Document getXMLDocument(Reader reader) throws IOException {
Document doc = new Document();
try{
KXmlParser parser = new InterningKXmlParser();
parser.setInput(reader);
parser.setFeature(XmlPullParser.FEATURE_PROCESS_NAMESPACES, true);
doc.parse(parser);
} catch (XmlPullParserException e) {
String errorMsg = "XML Syntax Error at Line: " + e.getLineNumber() +", Column: "+ e.getColumnNumber()+ "!";
System.err.println(errorMsg);
e.printStackTrace();
throw new XFormParseException(errorMsg);
} catch(IOException e){
//CTS - 12/09/2012 - Stop swallowing IO Exceptions
throw e;
} catch(Exception e){
//#if debug.output==verbose || debug.output==exception
String errorMsg = "Unhandled Exception while Parsing XForm";
System.err.println(errorMsg);
e.printStackTrace();
throw new XFormParseException(errorMsg);
//#endif
}
try {
reader.close();
} catch (IOException e) {
System.out.println("Error closing reader");
e.printStackTrace();
}
//For escaped unicode strings we end up with a looooot of cruft,
//so we really want to go through and convert the kxml parsed
//text (which have lots of characters each as their own string)
//into one single string
Stack<Element> q = new Stack<Element>();
q.push(doc.getRootElement());
while(!q.isEmpty()) {
Element e = q.pop();
boolean[] toRemove = new boolean[e.getChildCount()*2];
String accumulate = "";
for(int i = 0 ; i < e.getChildCount(); ++i ){
int type = e.getType(i);
if(type == Element.TEXT) {
String text = e.getText(i);
accumulate += text;
toRemove[i] = true;
} else {
if(type ==Element.ELEMENT) {
q.addElement(e.getElement(i));
}
String accstr = accumulate.trim();
if(accstr.length() != 0) {
e.addChild(i, Element.TEXT, accumulate.intern());
accumulate = "";
++i;
} else {
accumulate = "";
}
}
}
if(accumulate.trim().length() != 0) {
e.addChild(Element.TEXT, accumulate.intern());
}
for(int i = e.getChildCount() - 1; i >= 0 ; i-- ){
if(toRemove[i]) {
e.removeChild(i);
}
}
}
return doc;
}
private void parseDoc() {
_f = new FormDef();
initState();
defaultNamespace = _xmldoc.getRootElement().getNamespaceUri(null);
parseElement(_xmldoc.getRootElement(), _f, topLevelHandlers);
collapseRepeatGroups(_f);
//parse the non-main instance nodes first
//we assume that the non-main instances won't
//reference the main node, so we do them first.
//if this assumption is wrong, well, then we're screwed.
if(instanceNodes.size() > 1)
{
for(int i = 1; i < instanceNodes.size(); i++)
{
Element e = instanceNodes.elementAt(i);
String srcLocation = e.getAttributeValue(null, "src");
DataInstance di;
if(e.getChildCount() == 0 && srcLocation != null) {
di = new ExternalDataInstance(srcLocation, instanceNodeIdStrs.elementAt(i));
} else {
FormInstance fi = parseInstance(e, false);
loadInstanceData(e, fi.getRoot(), _f);
di = fi;
}
_f.addNonMainInstance(di);
}
}
//now parse the main instance
if(mainInstanceNode != null) {
FormInstance fi = parseInstance(mainInstanceNode, true);
addMainInstanceToFormDef(mainInstanceNode, fi);
//set the main instance
_f.setInstance(fi);
}
}
private void parseElement (Element e, Object parent, Hashtable<String, IElementHandler> handlers) { //,
// boolean allowUnknownElements, boolean allowText, boolean recurseUnknown) {
String name = e.getName();
String[] suppressWarningArr = {
"html",
"head",
"body",
"xform",
"chooseCaption",
"addCaption",
"addEmptyCaption",
"delCaption",
"doneCaption",
"doneEmptyCaption",
"mainHeader",
"entryHeader",
"delHeader"
};
Vector<String> suppressWarning = new Vector<String>();
for (int i = 0; i < suppressWarningArr.length; i++) {
suppressWarning.addElement(suppressWarningArr[i]);
}
IElementHandler eh = handlers.get(name);
if (eh != null) {
eh.handle(this, e, parent);
} else {
if (!suppressWarning.contains(name)) {
reporter.warning(XFormParserReporter.TYPE_UNKNOWN_MARKUP,
"Unrecognized element [" + name + "]. Ignoring and processing children...",
getVagueLocation(e));
}
for (int i = 0; i < e.getChildCount(); i++) {
if (e.getType(i) == Element.ELEMENT) {
parseElement(e.getElement(i), parent, handlers);
}
}
}
}
private void parseTitle (Element e) {
Vector usedAtts = new Vector(); //no attributes parsed in title.
String title = getXMLText(e, true);
System.out.println("Title: \"" + title + "\"");
_f.setTitle(title);
if(_f.getName() == null) {
//Jan 9, 2009 - ctsims
//We don't really want to allow for forms without
//some unique ID, so if a title is available, use
//that.
_f.setName(title);
}
if(XFormUtils.showUnusedAttributeWarning(e, usedAtts)){
reporter.warning(XFormParserReporter.TYPE_UNKNOWN_MARKUP, XFormUtils.unusedAttWarning(e, usedAtts), getVagueLocation(e));
}
}
private void parseMeta (Element e) {
Vector<String> usedAtts = new Vector<String>();
int attributes = e.getAttributeCount();
for(int i = 0 ; i < attributes ; ++i) {
String name = e.getAttributeName(i);
String value = e.getAttributeValue(i);
if("name".equals(name)) {
_f.setName(value);
}
}
usedAtts.addElement("name");
if(XFormUtils.showUnusedAttributeWarning(e, usedAtts)){
reporter.warning(XFormParserReporter.TYPE_UNKNOWN_MARKUP, XFormUtils.unusedAttWarning(e, usedAtts), getVagueLocation(e));
}
}
//for ease of parsing, we assume a model comes before the controls, which isn't necessarily mandated by the xforms spec
private void parseModel (Element e) {
Vector<String> usedAtts = new Vector<String>(); //no attributes parsed in title.
Vector<Element> delayedParseElements = new Vector<Element>();
if (modelFound) {
reporter.warning(XFormParserReporter.TYPE_INVALID_STRUCTURE,
"Multiple models not supported. Ignoring subsequent models.", getVagueLocation(e));
return;
}
modelFound = true;
if(XFormUtils.showUnusedAttributeWarning(e, usedAtts)){
reporter.warning(XFormParserReporter.TYPE_UNKNOWN_MARKUP, XFormUtils.unusedAttWarning(e, usedAtts), getVagueLocation(e));
}
for (int i = 0; i < e.getChildCount(); i++) {
int type = e.getType(i);
Element child = (type == Node.ELEMENT ? e.getElement(i) : null);
String childName = (child != null ? child.getName() : null);
if ("itext".equals(childName)) {
parseIText(child);
} else if ("instance".equals(childName)) {
//we save parsing the instance node until the end, giving us the information we need about
//binds and data types and such
saveInstanceNode(child);
} else if (BIND_ATTR.equals(childName)) { //<instance> must come before <bind>s
parseBind(child);
} else if("submission".equals(childName)) {
delayedParseElements.addElement(child);
} else if(namedActions.contains(childName) || (childName != null && structuredActions.containsKey(childName))) {
delayedParseElements.addElement(child);
} else { //invalid model content
if (type == Node.ELEMENT) {
throw new XFormParseException("Unrecognized top-level tag [" + childName + "] found within <model>",child);
} else if (type == Node.TEXT && getXMLText(e, i, true).length() != 0) {
throw new XFormParseException("Unrecognized text content found within <model>: \"" + getXMLText(e, i, true) + "\"",child == null ? e : child);
}
}
if(child == null || BIND_ATTR.equals(childName) || "itext".equals(childName)) {
//Clayton Sims - Jun 17, 2009 - This code is used when the stinginess flag
//is set for the build. It dynamically wipes out old model nodes once they're
//used. This is sketchy if anything else plans on touching the nodes.
//This code can be removed once we're pull-parsing
//#if org.javarosa.xform.stingy
e.removeChild(i);
--i;
//#endif
}
}
//Now parse out the submission/action blocks (we needed the binds to all be set before we could)
for(Element child : delayedParseElements) {
String name = child.getName();
if(name.equals("submission")) {
parseSubmission(child);
} else {
//For now, anything that isn't a submission is an action
if(namedActions.contains(name)) {
parseNamedAction(child);
} else {
structuredActions.get(name).handle(this, child, _f);
}
}
}
}
private void parseNamedAction(Element action) {
//TODO: Anything useful
}
private void parseSetValueAction(FormDef form, Element e) {
String ref = e.getAttributeValue(null, REF_ATTR);
String bind = e.getAttributeValue(null, BIND_ATTR);
String event = e.getAttributeValue(null, "event");
IDataReference dataRef = null;
boolean refFromBind = false;
//TODO: There is a _lot_ of duplication of this code, fix that!
if (bind != null) {
DataBinding binding = bindingsByID.get(bind);
if (binding == null) {
throw new XFormParseException("XForm Parse: invalid binding ID in submit'" + bind + "'", e);
}
dataRef = binding.getReference();
refFromBind = true;
} else if (ref != null) {
dataRef = new XPathReference(ref);
} else {
throw new XFormParseException("setvalue action with no target!", e);
}
if (dataRef != null) {
if (!refFromBind) {
dataRef = getAbsRef(dataRef, TreeReference.rootRef());
}
}
String valueRef = e.getAttributeValue(null, "value");
Action action;
TreeReference treeref = FormInstance.unpackReference(dataRef);
actionTargets.addElement(treeref);
if(valueRef == null) {
if(e.getChildCount() == 0 || !e.isText(0)) {
throw new XFormParseException("No 'value' attribute and no inner value set in <setvalue> associated with: " + treeref, e);
}
//Set expression
action = new SetValueAction(treeref, e.getText(0));
} else {
try {
action = new SetValueAction(treeref, XPathParseTool.parseXPath(valueRef));
} catch (XPathSyntaxException e1) {
e1.printStackTrace();
throw new XFormParseException("Invalid XPath in value set action declaration: '" + valueRef + "'", e);
}
}
form.registerEventListener(event, action);
}
private void parseSubmission(Element submission) {
String id = submission.getAttributeValue(null, ID_ATTR);
//These two are always required
String method = submission.getAttributeValue(null, "method");
String action = submission.getAttributeValue(null, "action");
SubmissionParser parser = new SubmissionParser();
for(SubmissionParser p : submissionParsers) {
if(p.matchesCustomMethod(method)) {
parser = p;
}
}
//These two might exist, but if neither do, we just assume you want the entire instance.
String ref = submission.getAttributeValue(null, REF_ATTR);
String bind = submission.getAttributeValue(null, BIND_ATTR);
IDataReference dataRef = null;
boolean refFromBind = false;
if (bind != null) {
DataBinding binding = bindingsByID.get(bind);
if (binding == null) {
throw new XFormParseException("XForm Parse: invalid binding ID in submit'" + bind + "'", submission);
}
dataRef = binding.getReference();
refFromBind = true;
} else if (ref != null) {
dataRef = new XPathReference(ref);
} else {
//no reference! No big deal, assume we want the root reference
dataRef = new XPathReference("/");
}
if (dataRef != null) {
if (!refFromBind) {
dataRef = getAbsRef(dataRef, TreeReference.rootRef());
}
}
SubmissionProfile profile = parser.parseSubmission(method, action, dataRef, submission );
if(id == null) {
//default submission profile
_f.setDefaultSubmission(profile);
} else {
//typed submission profile
_f.addSubmissionProfile(id, profile);
}
}
private void saveInstanceNode (Element instance) {
Element instanceNode = null;
String instanceId = instance.getAttributeValue("", "id");
for (int i = 0; i < instance.getChildCount(); i++) {
if (instance.getType(i) == Node.ELEMENT) {
if (instanceNode != null) {
throw new XFormParseException("XForm Parse: <instance> has more than one child element", instance);
} else {
instanceNode = instance.getElement(i);
}
}
}
if(instanceNode == null) {
//no kids
instanceNode = instance;
}
if (mainInstanceNode == null) {
mainInstanceNode = instanceNode;
}
instanceNodes.addElement(instanceNode);
instanceNodeIdStrs.addElement(instanceId);
}
protected QuestionDef parseUpload(IFormElement parent, Element e, int controlUpload) {
Vector usedAtts = new Vector();
QuestionDef question = parseControl(parent, e, controlUpload);
String mediaType = e.getAttributeValue(null, "mediatype");
if ("image/*".equals(mediaType)) {
// NOTE: this could be further expanded.
question.setControlType(Constants.CONTROL_IMAGE_CHOOSE);
} else if("audio/*".equals(mediaType)) {
question.setControlType(Constants.CONTROL_AUDIO_CAPTURE);
} else if ("video/*".equals(mediaType)) {
question.setControlType(Constants.CONTROL_VIDEO_CAPTURE);
}
usedAtts.addElement("mediatype");
if(XFormUtils.showUnusedAttributeWarning(e, usedAtts)){
reporter.warning(XFormParserReporter.TYPE_UNKNOWN_MARKUP, XFormUtils.unusedAttWarning(e, usedAtts), getVagueLocation(e));
}
return question;
}
protected QuestionDef parseControl (IFormElement parent, Element e, int controlType) {
QuestionDef question = new QuestionDef();
question.setID(serialQuestionID++); //until we come up with a better scheme
Vector usedAtts = new Vector();
usedAtts.addElement(REF_ATTR);
usedAtts.addElement(BIND_ATTR);
usedAtts.addElement(APPEARANCE_ATTR);
IDataReference dataRef = null;
boolean refFromBind = false;
String ref = e.getAttributeValue(null, REF_ATTR);
String bind = e.getAttributeValue(null, BIND_ATTR);
if (bind != null) {
DataBinding binding = bindingsByID.get(bind);
if (binding == null) {
throw new XFormParseException("XForm Parse: invalid binding ID '" + bind + "'", e);
}
dataRef = binding.getReference();
refFromBind = true;
} else if (ref != null) {
try {
dataRef = new XPathReference(ref);
} catch(RuntimeException el) {
System.out.println(this.getVagueLocation(e));
throw el;
}
} else {
if (controlType == Constants.CONTROL_TRIGGER) {
//TODO: special handling for triggers? also, not all triggers created equal
} else {
throw new XFormParseException("XForm Parse: input control with neither 'ref' nor 'bind'",e);
}
}
if (dataRef != null) {
if (!refFromBind) {
dataRef = getAbsRef(dataRef, parent);
}
question.setBind(dataRef);
if (controlType == Constants.CONTROL_SELECT_ONE) {
selectOnes.addElement((TreeReference)dataRef.getReference());
} else if (controlType == Constants.CONTROL_SELECT_MULTI) {
selectMultis.addElement((TreeReference)dataRef.getReference());
}
}
boolean isSelect = (controlType == Constants.CONTROL_SELECT_MULTI || controlType == Constants.CONTROL_SELECT_ONE);
question.setControlType(controlType);
question.setAppearanceAttr(e.getAttributeValue(null, APPEARANCE_ATTR));
for (int i = 0; i < e.getChildCount(); i++) {
int type = e.getType(i);
Element child = (type == Node.ELEMENT ? e.getElement(i) : null);
String childName = (child != null ? child.getName() : null);
if (LABEL_ELEMENT.equals(childName)) {
parseQuestionLabel(question, child);
} else if ("hint".equals(childName)) {
parseHint(question, child);
} else if (isSelect && "item".equals(childName)) {
parseItem(question, child);
} else if (isSelect && "itemset".equals(childName)) {
parseItemset(question, child, parent);
}
}
if (isSelect) {
if (question.getNumChoices() > 0 && question.getDynamicChoices() != null) {
throw new XFormParseException("Select question contains both literal choices and <itemset>");
} else if (question.getNumChoices() == 0 && question.getDynamicChoices() == null) {
throw new XFormParseException("Select question has no choices");
}
}
parent.addChild(question);
if(XFormUtils.showUnusedAttributeWarning(e, usedAtts)){
reporter.warning(XFormParserReporter.TYPE_UNKNOWN_MARKUP, XFormUtils.unusedAttWarning(e, usedAtts), getVagueLocation(e));
}
return question;
}
private void parseQuestionLabel (QuestionDef q, Element e) {
String label = getLabel(e);
String ref = e.getAttributeValue("", REF_ATTR);
Vector usedAtts = new Vector();
usedAtts.addElement(REF_ATTR);
if (ref != null) {
if (ref.startsWith(ITEXT_OPEN) && ref.endsWith(ITEXT_CLOSE)) {
String textRef = ref.substring(ITEXT_OPEN.length(), ref.indexOf(ITEXT_CLOSE));
verifyTextMappings(textRef, "Question <label>", true);
q.setTextID(textRef);
} else {
throw new RuntimeException("malformed ref [" + ref + "] for <label>");
}
} else {
q.setLabelInnerText(label);
}
if(XFormUtils.showUnusedAttributeWarning(e, usedAtts)){
reporter.warning(XFormParserReporter.TYPE_UNKNOWN_MARKUP, XFormUtils.unusedAttWarning(e, usedAtts), getVagueLocation(e));
}
}
private void parseGroupLabel (GroupDef g, Element e) {
if (g.getRepeat())
return; //ignore child <label>s for <repeat>; the appropriate <label> must be in the wrapping <group>
Vector usedAtts = new Vector();
usedAtts.addElement(REF_ATTR);
String label = getLabel(e);
String ref = e.getAttributeValue("", REF_ATTR);
if (ref != null) {
if (ref.startsWith(ITEXT_OPEN) && ref.endsWith(ITEXT_CLOSE)) {
String textRef = ref.substring(ITEXT_OPEN.length(), ref.indexOf(ITEXT_CLOSE));
verifyTextMappings(textRef, "Group <label>", true);
g.setTextID(textRef);
} else {
throw new RuntimeException("malformed ref [" + ref + "] for <label>");
}
} else {
g.setLabelInnerText(label);
}
if(XFormUtils.showUnusedAttributeWarning(e, usedAtts)){
reporter.warning(XFormParserReporter.TYPE_UNKNOWN_MARKUP, XFormUtils.unusedAttWarning(e, usedAtts), getVagueLocation(e));
}
}
private String getLabel (Element e){
if(e.getChildCount() == 0) return null;
recurseForOutput(e);
StringBuffer sb = new StringBuffer();
for(int i = 0; i<e.getChildCount();i++){
if(e.getType(i)!=Node.TEXT && !(e.getChild(i) instanceof String)){
Object b = e.getChild(i);
Element child = (Element)b;
//If the child is in the HTML namespace, retain it.
if(NAMESPACE_HTML.equals(child.getNamespace())) {
sb.append(XFormSerializer.elementToString(child));
} else {
//Otherwise, ignore it.
System.out.println("Unrecognized tag inside of text: <" + child.getName() + ">. " +
"Did you intend to use HTML markup? If so, ensure that the element is defined in " +
"the HTML namespace.");
}
}else{
sb.append(e.getText(i));
}
}
String s = sb.toString().trim();
return s;
}
private void recurseForOutput(Element e){
if(e.getChildCount() == 0) return;
for(int i=0;i<e.getChildCount();i++){
int kidType = e.getType(i);
if(kidType == Node.TEXT) { continue; }
if(e.getChild(i) instanceof String) { continue; }
Element kid = (Element)e.getChild(i);
//is just text
if(kidType == Node.ELEMENT && XFormUtils.isOutput(kid)){
String s = "${"+parseOutput(kid)+"}";
e.removeChild(i);
e.addChild(i, Node.TEXT, s);
//has kids? Recurse through them and swap output tag for parsed version
}else if(kid.getChildCount() !=0){
recurseForOutput(kid);
//is something else
}else{
continue;
}
}
}
private String parseOutput (Element e) {
Vector<String> usedAtts = new Vector<String>();
usedAtts.addElement(REF_ATTR);
usedAtts.addElement(VALUE);
String xpath = e.getAttributeValue(null, REF_ATTR);
if (xpath == null) {
xpath = e.getAttributeValue(null, VALUE);
}
if (xpath == null) {
throw new XFormParseException("XForm Parse: <output> without 'ref' or 'value'",e);
}
XPathConditional expr = null;
try {
expr = new XPathConditional(xpath);
} catch (XPathSyntaxException xse) {
reporter.error("Invalid XPath expression in <output> [" + xpath + "]! " + xse.getMessage());
return "";
}
int index = -1;
if (_f.getOutputFragments().contains(expr)) {
index = _f.getOutputFragments().indexOf(expr);
} else {
index = _f.getOutputFragments().size();
_f.getOutputFragments().addElement(expr);
}
if(XFormUtils.showUnusedAttributeWarning(e, usedAtts)){
reporter.warning(XFormParserReporter.TYPE_UNKNOWN_MARKUP, XFormUtils.unusedAttWarning(e, usedAtts), getVagueLocation(e));
}
return String.valueOf(index);
}
private void parseHint (QuestionDef q, Element e) {
Vector usedAtts = new Vector();
usedAtts.addElement(REF_ATTR);
String hint = getXMLText(e, true);
String hintInnerText = getLabel(e);
String ref = e.getAttributeValue("", REF_ATTR);
if (ref != null) {
if (ref.startsWith(ITEXT_OPEN) && ref.endsWith(ITEXT_CLOSE)) {
String textRef = ref.substring(ITEXT_OPEN.length(), ref.indexOf(ITEXT_CLOSE));
verifyTextMappings(textRef, "<hint>", false);
q.setHelpTextID(textRef);
} else {
throw new RuntimeException("malformed ref [" + ref + "] for <hint>");
}
} else {
q.setHelpInnerText(hintInnerText);
q.setHelpText(hint);
}
if(XFormUtils.showUnusedAttributeWarning(e, usedAtts)){
reporter.warning(XFormParserReporter.TYPE_UNKNOWN_MARKUP, XFormUtils.unusedAttWarning(e, usedAtts), getVagueLocation(e));
}
}
private void parseItem (QuestionDef q, Element e) {
final int MAX_VALUE_LEN = 32;
//catalogue of used attributes in this method/element
Vector usedAtts = new Vector();
Vector labelUA = new Vector();
Vector valueUA = new Vector();
labelUA.addElement(REF_ATTR);
valueUA.addElement(FORM_ATTR);
String labelInnerText = null;
String textRef = null;
String value = null;
for (int i = 0; i < e.getChildCount(); i++) {
int type = e.getType(i);
Element child = (type == Node.ELEMENT ? e.getElement(i) : null);
String childName = (child != null ? child.getName() : null);
if (LABEL_ELEMENT.equals(childName)) {
//print attribute warning for child element
if(XFormUtils.showUnusedAttributeWarning(child, labelUA)){
reporter.warning(XFormParserReporter.TYPE_UNKNOWN_MARKUP, XFormUtils.unusedAttWarning(child, labelUA), getVagueLocation(child));
}
labelInnerText = getLabel(child);
String ref = child.getAttributeValue("", REF_ATTR);
if (ref != null) {
if (ref.startsWith(ITEXT_OPEN) && ref.endsWith(ITEXT_CLOSE)) {
textRef = ref.substring(ITEXT_OPEN.length(), ref.indexOf(ITEXT_CLOSE));
verifyTextMappings(textRef, "Item <label>", true);
} else {
throw new XFormParseException("malformed ref [" + ref + "] for <item>",child);
}
}
} else if (VALUE.equals(childName)) {
value = getXMLText(child, true);
//print attribute warning for child element
if(XFormUtils.showUnusedAttributeWarning(child, valueUA)){
reporter.warning(XFormParserReporter.TYPE_UNKNOWN_MARKUP, XFormUtils.unusedAttWarning(child, valueUA), getVagueLocation(child));
}
if (value != null) {
if (value.length() > MAX_VALUE_LEN) {
reporter.warning(XFormParserReporter.TYPE_ERROR_PRONE,
"choice value [" + value + "] is too long; max. suggested length " + MAX_VALUE_LEN + " chars",
getVagueLocation(child));
}
//validate
for (int k = 0; k < value.length(); k++) {
char c = value.charAt(k);
if (" \n\t\f\r\'\"`".indexOf(c) >= 0) {
boolean isMultiSelect = (q.getControlType() == Constants.CONTROL_SELECT_MULTI);
reporter.warning(XFormParserReporter.TYPE_ERROR_PRONE,
(isMultiSelect ? SELECT : SELECTONE) + " question <value>s [" + value + "] " +
(isMultiSelect ? "cannot" : "should not") + " contain spaces, and are recommended not to contain apostraphes/quotation marks",
getVagueLocation(child));
break;
}
}
}
}
}
if (textRef == null && labelInnerText == null) {
throw new XFormParseException("<item> without proper <label>",e);
}
if (value == null) {
throw new XFormParseException("<item> without proper <value>",e);
}
if (textRef != null) {
q.addSelectChoice(new SelectChoice(textRef, value));
} else {
q.addSelectChoice(new SelectChoice(null,labelInnerText, value, false));
}
//print unused attribute warning message for parent element
if(XFormUtils.showUnusedAttributeWarning(e, usedAtts)){
reporter.warning(XFormParserReporter.TYPE_UNKNOWN_MARKUP,XFormUtils.unusedAttWarning(e, usedAtts), getVagueLocation(e));
}
}
private void parseItemset (QuestionDef q, Element e, IFormElement qparent) {
ItemsetBinding itemset = new ItemsetBinding();
////////////////USED FOR PARSER WARNING OUTPUT ONLY
//catalogue of used attributes in this method/element
Vector usedAtts = new Vector();
Vector labelUA = new Vector(); //for child with name 'label'
Vector valueUA = new Vector(); //for child with name 'value'
Vector copyUA = new Vector(); //for child with name 'copy'
usedAtts.addElement(NODESET_ATTR);
labelUA.addElement(REF_ATTR);
valueUA.addElement(REF_ATTR);
valueUA.addElement(FORM_ATTR);
copyUA.addElement(REF_ATTR);
////////////////////////////////////////////////////
String nodesetStr = e.getAttributeValue("", NODESET_ATTR);
if(nodesetStr == null ) throw new RuntimeException("No nodeset attribute in element: ["+e.getName()+"]. This is required. (Element Printout:"+XFormSerializer.elementToString(e)+")");
XPathPathExpr path = XPathReference.getPathExpr(nodesetStr);
itemset.nodesetExpr = new XPathConditional(path);
itemset.contextRef = getFormElementRef(q);
itemset.nodesetRef = FormInstance.unpackReference(getAbsRef(new XPathReference(path.getReference(true)), itemset.contextRef));
for (int i = 0; i < e.getChildCount(); i++) {
int type = e.getType(i);
Element child = (type == Node.ELEMENT ? e.getElement(i) : null);
String childName = (child != null ? child.getName() : null);
if (LABEL_ELEMENT.equals(childName)) {
String labelXpath = child.getAttributeValue("", REF_ATTR);
boolean labelItext = false;
//print unused attribute warning message for child element
if(XFormUtils.showUnusedAttributeWarning(child, labelUA)){
reporter.warning(XFormParserReporter.TYPE_UNKNOWN_MARKUP, XFormUtils.unusedAttWarning(child, labelUA), getVagueLocation(child));
}
/////////////////////////////////////////////////////////////
if (labelXpath != null) {
if (labelXpath.startsWith("jr:itext(") && labelXpath.endsWith(")")) {
labelXpath = labelXpath.substring("jr:itext(".length(), labelXpath.indexOf(")"));
labelItext = true;
}
} else {
throw new XFormParseException("<label> in <itemset> requires 'ref'");
}
XPathPathExpr labelPath = XPathReference.getPathExpr(labelXpath);
itemset.labelRef = FormInstance.unpackReference(getAbsRef(new XPathReference(labelPath), itemset.nodesetRef));
itemset.labelExpr = new XPathConditional(labelPath);
itemset.labelIsItext = labelItext;
} else if ("copy".equals(childName)) {
String copyRef = child.getAttributeValue("", REF_ATTR);
//print unused attribute warning message for child element
if(XFormUtils.showUnusedAttributeWarning(child, copyUA)){
reporter.warning(XFormParserReporter.TYPE_UNKNOWN_MARKUP, XFormUtils.unusedAttWarning(child, copyUA), getVagueLocation(child));
}
if (copyRef == null) {
throw new XFormParseException("<copy> in <itemset> requires 'ref'");
}
itemset.copyRef = FormInstance.unpackReference(getAbsRef(new XPathReference(copyRef), itemset.nodesetRef));
itemset.copyMode = true;
} else if (VALUE.equals(childName)) {
String valueXpath = child.getAttributeValue("", REF_ATTR);
//print unused attribute warning message for child element
if(XFormUtils.showUnusedAttributeWarning(child, valueUA)){
reporter.warning(XFormParserReporter.TYPE_UNKNOWN_MARKUP, XFormUtils.unusedAttWarning(child, valueUA), getVagueLocation(child));
}
if (valueXpath == null) {
throw new XFormParseException("<value> in <itemset> requires 'ref'");
}
XPathPathExpr valuePath = XPathReference.getPathExpr(valueXpath);
itemset.valueRef = FormInstance.unpackReference(getAbsRef(new XPathReference(valuePath), itemset.nodesetRef));
itemset.valueExpr = new XPathConditional(valuePath);
itemset.copyMode = false;
}
}
if (itemset.labelRef == null) {
throw new XFormParseException("<itemset> requires <label>");
} else if (itemset.copyRef == null && itemset.valueRef == null) {
throw new XFormParseException("<itemset> requires <copy> or <value>");
}
if (itemset.copyRef != null) {
if (itemset.valueRef == null) {
reporter.warning(XFormParserReporter.TYPE_TECHNICAL, "<itemset>s with <copy> are STRONGLY recommended to have <value> as well; pre-selecting, default answers, and display of answers will not work properly otherwise",getVagueLocation(e));
} else if (!itemset.copyRef.isParentOf(itemset.valueRef, false)) {
throw new XFormParseException("<value> is outside <copy>");
}
}
q.setDynamicChoices(itemset);
itemsets.addElement(itemset);
//print unused attribute warning message for parent element
if(XFormUtils.showUnusedAttributeWarning(e, usedAtts)){
reporter.warning(XFormParserReporter.TYPE_UNKNOWN_MARKUP,XFormUtils.unusedAttWarning(e, usedAtts), getVagueLocation(e));
}
}
private void parseGroup (IFormElement parent, Element e, int groupType) {
GroupDef group = new GroupDef();
group.setID(serialQuestionID++); //until we come up with a better scheme
IDataReference dataRef = null;
boolean refFromBind = false;
Vector usedAtts = new Vector();
usedAtts.addElement(REF_ATTR);
usedAtts.addElement(NODESET_ATTR);
usedAtts.addElement(BIND_ATTR);
usedAtts.addElement(APPEARANCE_ATTR);
usedAtts.addElement("count");
usedAtts.addElement("noAddRemove");
if (groupType == CONTAINER_REPEAT) {
group.setRepeat(true);
}
String ref = e.getAttributeValue(null, REF_ATTR);
String nodeset = e.getAttributeValue(null, NODESET_ATTR);
String bind = e.getAttributeValue(null, BIND_ATTR);
group.setAppearanceAttr(e.getAttributeValue(null, APPEARANCE_ATTR));
if (bind != null) {
DataBinding binding = bindingsByID.get(bind);
if (binding == null) {
throw new XFormParseException("XForm Parse: invalid binding ID [" + bind + "]",e);
}
dataRef = binding.getReference();
refFromBind = true;
} else {
if (group.getRepeat()) {
if (nodeset != null) {
dataRef = new XPathReference(nodeset);
} else {
throw new XFormParseException("XForm Parse: <repeat> with no binding ('bind' or 'nodeset')",e);
}
} else {
if (ref != null) {
dataRef = new XPathReference(ref);
} //<group> not required to have a binding
}
}
if (!refFromBind) {
dataRef = getAbsRef(dataRef, parent);
}
group.setBind(dataRef);
if (group.getRepeat()) {
repeats.addElement((TreeReference)dataRef.getReference());
String countRef = e.getAttributeValue(NAMESPACE_JAVAROSA, "count");
if (countRef != null) {
group.count = getAbsRef(new XPathReference(countRef), parent);
group.noAddRemove = true;
} else {
group.noAddRemove = (e.getAttributeValue(NAMESPACE_JAVAROSA, "noAddRemove") != null);
}
}
for (int i = 0; i < e.getChildCount(); i++) {
int type = e.getType(i);
Element child = (type == Node.ELEMENT ? e.getElement(i) : null);
String childName = (child != null ? child.getName() : null);
String childNamespace = (child != null ? child.getNamespace() : null);
if (group.getRepeat() && NAMESPACE_JAVAROSA.equals(childNamespace)) {
if ("chooseCaption".equals(childName)) {
group.chooseCaption = getLabel(child);
} else if ("addCaption".equals(childName)) {
group.addCaption = getLabel(child);
} else if ("delCaption".equals(childName)) {
group.delCaption = getLabel(child);
} else if ("doneCaption".equals(childName)) {
group.doneCaption = getLabel(child);
} else if ("addEmptyCaption".equals(childName)) {
group.addEmptyCaption = getLabel(child);
} else if ("doneEmptyCaption".equals(childName)) {
group.doneEmptyCaption = getLabel(child);
} else if ("entryHeader".equals(childName)) {
group.entryHeader = getLabel(child);
} else if ("delHeader".equals(childName)) {
group.delHeader = getLabel(child);
} else if ("mainHeader".equals(childName)) {
group.mainHeader = getLabel(child);
}
}
}
//the case of a group wrapping a repeat is cleaned up in a post-processing step (collapseRepeatGroups)
for (int i = 0; i < e.getChildCount(); i++) {
if (e.getType(i) == Element.ELEMENT) {
parseElement(e.getElement(i), group, groupLevelHandlers);
}
}
//print unused attribute warning message for parent element
if(XFormUtils.showUnusedAttributeWarning(e, usedAtts)){
reporter.warning(XFormParserReporter.TYPE_UNKNOWN_MARKUP, XFormUtils.unusedAttWarning(e, usedAtts), getVagueLocation(e));
}
parent.addChild(group);
}
private TreeReference getFormElementRef (IFormElement fe) {
if (fe instanceof FormDef) {
TreeReference ref = TreeReference.rootRef();
ref.add(mainInstanceNode.getName(), 0);
return ref;
} else {
return (TreeReference)fe.getBind().getReference();
}
}
private IDataReference getAbsRef (IDataReference ref, IFormElement parent) {
return getAbsRef(ref, getFormElementRef(parent));
}
//take a (possibly relative) reference, and make it absolute based on its parent
private static IDataReference getAbsRef (IDataReference ref, TreeReference parentRef) {
TreeReference tref;
if (!parentRef.isAbsolute()) {
throw new RuntimeException("XFormParser.getAbsRef: parentRef must be absolute");
}
if (ref != null) {
tref = (TreeReference)ref.getReference();
} else {
tref = TreeReference.selfRef(); //only happens for <group>s with no binding
}
tref = tref.parent(parentRef);
if (tref == null) {
throw new XFormParseException("Binding path [" + tref + "] not allowed with parent binding of [" + parentRef + "]");
}
return new XPathReference(tref);
}
//collapse groups whose only child is a repeat into a single repeat that uses the label of the wrapping group
private static void collapseRepeatGroups (IFormElement fe) {
if (fe.getChildren() == null)
return;
for (int i = 0; i < fe.getChildren().size(); i++) {
IFormElement child = fe.getChild(i);
GroupDef group = null;
if (child instanceof GroupDef)
group = (GroupDef)child;
if (group != null) {
if (!group.getRepeat() && group.getChildren().size() == 1) {
IFormElement grandchild = (IFormElement)group.getChildren().elementAt(0);
GroupDef repeat = null;
if (grandchild instanceof GroupDef)
repeat = (GroupDef)grandchild;
if (repeat != null && repeat.getRepeat()) {
//collapse the wrapping group
//merge group into repeat
//id - later
//name - later
repeat.setLabelInnerText(group.getLabelInnerText());
repeat.setTextID(group.getTextID());
// repeat.setLongText(group.getLongText());
// repeat.setShortText(group.getShortText());
// repeat.setLongTextID(group.getLongTextID(), null);
// repeat.setShortTextID(group.getShortTextID(), null);
//don't merge binding; repeat will always already have one
//replace group with repeat
fe.getChildren().setElementAt(repeat, i);
group = repeat;
}
}
collapseRepeatGroups(group);
}
}
}
private void parseIText (Element itext) {
Localizer l = new Localizer(true, true);
_f.setLocalizer(l);
l.registerLocalizable(_f);
Vector usedAtts = new Vector(); //used for warning message
for (int i = 0; i < itext.getChildCount(); i++) {
Element trans = itext.getElement(i);
if (trans == null || !trans.getName().equals("translation"))
continue;
parseTranslation(l, trans);
}
if (l.getAvailableLocales().length == 0)
throw new XFormParseException("no <translation>s defined",itext);
if (l.getDefaultLocale() == null)
l.setDefaultLocale(l.getAvailableLocales()[0]);
//print unused attribute warning message for parent element
if(XFormUtils.showUnusedAttributeWarning(itext, usedAtts)){
reporter.warning(XFormParserReporter.TYPE_UNKNOWN_MARKUP, XFormUtils.unusedAttWarning(itext, usedAtts), getVagueLocation(itext));
}
}
private void parseTranslation (Localizer l, Element trans) {
/////for warning message
Vector usedAtts = new Vector();
usedAtts.addElement("lang");
usedAtts.addElement("default");
/////////////////////////
String lang = trans.getAttributeValue("", "lang");
if (lang == null || lang.length() == 0) {
throw new XFormParseException("no language specified for <translation>",trans);
}
String isDefault = trans.getAttributeValue("", "default");
if (!l.addAvailableLocale(lang)) {
throw new XFormParseException("duplicate <translation> for language '" + lang + "'",trans);
}
if (isDefault != null) {
if (l.getDefaultLocale() != null)
throw new XFormParseException("more than one <translation> set as default",trans);
l.setDefaultLocale(lang);
}
TableLocaleSource source = new TableLocaleSource();
//source.startEditing();
for (int j = 0; j < trans.getChildCount(); j++) {
Element text = trans.getElement(j);
if (text == null || !text.getName().equals("text")) {
continue;
}
parseTextHandle(source, text);
//Clayton Sims - Jun 17, 2009 - This code is used when the stinginess flag
//is set for the build. It dynamically wipes out old model nodes once they're
//used. This is sketchy if anything else plans on touching the nodes.
//This code can be removed once we're pull-parsing
//#if org.javarosa.xform.stingy
trans.removeChild(j);
--j;
//#endif
}
//print unused attribute warning message for parent element
if(XFormUtils.showUnusedAttributeWarning(trans, usedAtts)){
reporter.warning(XFormParserReporter.TYPE_UNKNOWN_MARKUP, XFormUtils.unusedAttWarning(trans, usedAtts), getVagueLocation(trans));
}
//source.stopEditing();
l.registerLocaleResource(lang, source);
}
private void parseTextHandle (TableLocaleSource l, Element text) {
String id = text.getAttributeValue("", ID_ATTR);
//used for parser warnings...
Vector usedAtts = new Vector();
Vector childUsedAtts = new Vector();
usedAtts.addElement(ID_ATTR);
usedAtts.addElement(FORM_ATTR);
childUsedAtts.addElement(FORM_ATTR);
childUsedAtts.addElement(ID_ATTR);
//////////
if (id == null || id.length() == 0) {
throw new XFormParseException("no id defined for <text>",text);
}
for (int k = 0; k < text.getChildCount(); k++) {
Element value = text.getElement(k);
if (value == null) continue;
if(!value.getName().equals(VALUE)){
throw new XFormParseException("Unrecognized element ["+value.getName()+"] in Itext->translation->text");
}
String form = value.getAttributeValue("", FORM_ATTR);
if (form != null && form.length() == 0) {
form = null;
}
String data = getLabel(value);
if (data == null) {
data = "";
}
String textID = (form == null ? id : id + ";" + form); //kind of a hack
if (l.hasMapping(textID)) {
throw new XFormParseException("duplicate definition for text ID \"" + id + "\" and form \"" + form + "\""+". Can only have one definition for each text form.",text);
}
l.setLocaleMapping(textID, data);
//print unused attribute warning message for child element
if(XFormUtils.showUnusedAttributeWarning(value, childUsedAtts)){
reporter.warning(XFormParserReporter.TYPE_UNKNOWN_MARKUP, XFormUtils.unusedAttWarning(value, childUsedAtts), getVagueLocation(value));
}
}
//print unused attribute warning message for parent element
if(XFormUtils.showUnusedAttributeWarning(text, usedAtts)){
reporter.warning(XFormParserReporter.TYPE_UNKNOWN_MARKUP, XFormUtils.unusedAttWarning(text, usedAtts), getVagueLocation(text));
}
}
private boolean hasITextMapping (String textID, String locale) {
Localizer l = _f.getLocalizer();
return l.hasMapping(locale == null ? l.getDefaultLocale() : locale, textID);
}
private void verifyTextMappings (String textID, String type, boolean allowSubforms) {
Localizer l = _f.getLocalizer();
String[] locales = l.getAvailableLocales();
for (int i = 0; i < locales.length; i++) {
//Test whether there is a default translation, or whether there is any special form available.
if (!(hasITextMapping(textID, locales[i]) ||
(allowSubforms && hasSpecialFormMapping(textID, locales[i])))) {
if (locales[i].equals(l.getDefaultLocale())) {
throw new XFormParseException(type + " '" + textID + "': text is not localizable for default locale [" + l.getDefaultLocale() + "]!");
} else {
reporter.warning(XFormParserReporter.TYPE_TECHNICAL, type + " '" + textID + "': text is not localizable for locale " + locales[i] + ".", null);
}
}
}
}
/**
* Tests whether or not there is any form (default or special) for the provided
* text id.
*
* @return True if a translation is present for the given textID in the form. False otherwise
*/
private boolean hasSpecialFormMapping(String textID, String locale) {
//First check our guesses
for(String guess : itextKnownForms) {
if(hasITextMapping(textID + ";" + guess, locale)) {
return true;
}
}
//Otherwise this sucks and we have to test the keys
OrderedHashtable table = _f.getLocalizer().getLocaleData(locale);
for(Enumeration keys = table.keys() ; keys.hasMoreElements() ;) {
String key = (String)keys.nextElement();
if(key.startsWith(textID + ";")) {
//A key is found, pull it out, add it to the list of guesses, and return positive
String textForm = key.substring(key.indexOf(";") + 1, key.length());
//Kind of a long story how we can end up getting here. It involves the default locale loading values
//for the other locale, but isn't super good.
//TODO: Clean up being able to get here
if(!itextKnownForms.contains(textForm)) {
System.out.println("adding unexpected special itext form: " + textForm + " to list of expected forms");
itextKnownForms.addElement(textForm);
}
return true;
}
}
return false;
}
protected DataBinding processStandardBindAttributes( Vector usedAtts, Element e) {
usedAtts.addElement(ID_ATTR);
usedAtts.addElement(NODESET_ATTR);
usedAtts.addElement("type");
usedAtts.addElement("relevant");
usedAtts.addElement("required");
usedAtts.addElement("readonly");
usedAtts.addElement("constraint");
usedAtts.addElement("constraintMsg");
usedAtts.addElement("calculate");
usedAtts.addElement("preload");
usedAtts.addElement("preloadParams");
DataBinding binding = new DataBinding();
binding.setId(e.getAttributeValue("", ID_ATTR));
String nodeset = e.getAttributeValue(null, NODESET_ATTR);
if (nodeset == null) {
throw new XFormParseException("XForm Parse: <bind> without nodeset",e);
}
IDataReference ref = new XPathReference(nodeset);
ref = getAbsRef(ref, _f);
binding.setReference(ref);
binding.setDataType(getDataType(e.getAttributeValue(null, "type")));
String xpathRel = e.getAttributeValue(null, "relevant");
if (xpathRel != null) {
if ("true()".equals(xpathRel)) {
binding.relevantAbsolute = true;
} else if ("false()".equals(xpathRel)) {
binding.relevantAbsolute = false;
} else {
Condition c = buildCondition(xpathRel, "relevant", ref);
c = (Condition)_f.addTriggerable(c);
binding.relevancyCondition = c;
}
}
String xpathReq = e.getAttributeValue(null, "required");
if (xpathReq != null) {
if ("true()".equals(xpathReq)) {
binding.requiredAbsolute = true;
} else if ("false()".equals(xpathReq)) {
binding.requiredAbsolute = false;
} else {
Condition c = buildCondition(xpathReq, "required", ref);
c = (Condition)_f.addTriggerable(c);
binding.requiredCondition = c;
}
}
String xpathRO = e.getAttributeValue(null, "readonly");
if (xpathRO != null) {
if ("true()".equals(xpathRO)) {
binding.readonlyAbsolute = true;
} else if ("false()".equals(xpathRO)) {
binding.readonlyAbsolute = false;
} else {
Condition c = buildCondition(xpathRO, "readonly", ref);
c = (Condition)_f.addTriggerable(c);
binding.readonlyCondition = c;
}
}
String xpathConstr = e.getAttributeValue(null, "constraint");
if (xpathConstr != null) {
try {
binding.constraint = new XPathConditional(xpathConstr);
} catch (XPathSyntaxException xse) {
reporter.error("bind for " + nodeset + " contains invalid constraint expression [" + xpathConstr + "] " + xse.getMessage());
}
binding.constraintMessage = e.getAttributeValue(NAMESPACE_JAVAROSA, "constraintMsg");
}
String xpathCalc = e.getAttributeValue(null, "calculate");
if (xpathCalc != null) {
Recalculate r;
try {
r = buildCalculate(xpathCalc, ref);
} catch (XPathSyntaxException xpse) {
throw new XFormParseException("Invalid calculate for the bind attached to \"" + nodeset + "\" : " + xpse.getMessage() + " in expression " + xpathCalc);
}
r = (Recalculate)_f.addTriggerable(r);
binding.calculate = r;
}
binding.setPreload(e.getAttributeValue(NAMESPACE_JAVAROSA, "preload"));
binding.setPreloadParams(e.getAttributeValue(NAMESPACE_JAVAROSA, "preloadParams"));
return binding;
}
protected void parseBind (Element e) {
Vector usedAtts = new Vector();
DataBinding binding = processStandardBindAttributes( usedAtts, e);
//print unused attribute warning message for parent element
if(XFormUtils.showUnusedAttributeWarning(e, usedAtts)){
reporter.warning(XFormParserReporter.TYPE_UNKNOWN_MARKUP, XFormUtils.unusedAttWarning(e, usedAtts), getVagueLocation(e));
}
addBinding(binding);
}
private Condition buildCondition (String xpath, String type, IDataReference contextRef) {
XPathConditional cond;
int trueAction = -1, falseAction = -1;
if ("relevant".equals(type)) {
trueAction = Condition.ACTION_SHOW;
falseAction = Condition.ACTION_HIDE;
} else if ("required".equals(type)) {
trueAction = Condition.ACTION_REQUIRE;
falseAction = Condition.ACTION_DONT_REQUIRE;
} else if ("readonly".equals(type)) {
trueAction = Condition.ACTION_DISABLE;
falseAction = Condition.ACTION_ENABLE;
}
try {
cond = new XPathConditional(xpath);
} catch (XPathSyntaxException xse) {
reporter.error("bind for " + contextRef.getReference().toString() + " contains invalid display condition [" + xpath + "] " + xse.getMessage());
return null;
}
Condition c = new Condition(cond, trueAction, falseAction, FormInstance.unpackReference(contextRef));
return c;
}
private static Recalculate buildCalculate (String xpath, IDataReference contextRef) throws XPathSyntaxException {
XPathConditional calc = new XPathConditional(xpath);
Recalculate r = new Recalculate(calc, FormInstance.unpackReference(contextRef));
return r;
}
protected void addBinding (DataBinding binding) {
bindings.addElement(binding);
if (binding.getId() != null) {
if (bindingsByID.put(binding.getId(), binding) != null) {
throw new XFormParseException("XForm Parse: <bind>s with duplicate ID: '" + binding.getId() + "'");
}
}
}
//e is the top-level _data_ node of the instance (immediate (and only) child of <instance>)
private void addMainInstanceToFormDef(Element e, FormInstance instanceModel) {
//TreeElement root = buildInstanceStructure(e, null);
loadInstanceData(e, instanceModel.getRoot(), _f);
checkDependencyCycles();
_f.setInstance(instanceModel);
try {
_f.finalizeTriggerables();
} catch(IllegalStateException ise) {
throw new XFormParseException(ise.getMessage() == null ? "Form has an illegal cycle in its calculate and relevancy expressions!" : ise.getMessage());
}
//print unused attribute warning message for parent element
//if(XFormUtils.showUnusedAttributeWarning(e, usedAtts)){
// reporter.warning(XFormParserReporter.TYPE_UNKNOWN_MARKUP, XFormUtils.unusedAttWarning(e, usedAtts), getVagueLocation(e));
//}
}
private FormInstance parseInstance (Element e, boolean isMainInstance) {
String name = instanceNodeIdStrs.elementAt(instanceNodes.indexOf(e));
TreeElement root = buildInstanceStructure(e, null, !isMainInstance ? name : null, e.getNamespace());
FormInstance instanceModel = new FormInstance(root, !isMainInstance ? name : null);
if(isMainInstance)
{
instanceModel.setName(_f.getTitle());
}
else
{
instanceModel.setName(name);
}
Vector usedAtts = new Vector();
usedAtts.addElement("version");
usedAtts.addElement("uiVersion");
usedAtts.addElement("name");
String schema = e.getNamespace();
if (schema != null && schema.length() > 0 && !schema.equals(defaultNamespace)) {
instanceModel.schema = schema;
}
instanceModel.formVersion = e.getAttributeValue(null, "version");
instanceModel.uiVersion = e.getAttributeValue(null, "uiVersion");
loadNamespaces(e, instanceModel);
if(isMainInstance)
{
processRepeats(instanceModel);
verifyBindings(instanceModel);
verifyActions(instanceModel);
}
applyInstanceProperties(instanceModel);
//print unused attribute warning message for parent element
if(XFormUtils.showUnusedAttributeWarning(e, usedAtts)){
reporter.warning(XFormParserReporter.TYPE_UNKNOWN_MARKUP, XFormUtils.unusedAttWarning(e, usedAtts), getVagueLocation(e));
}
return instanceModel;
}
private static Hashtable<String, String> loadNamespaces(Element e, FormInstance tree) {
Hashtable<String, String> prefixes = new Hashtable<String, String>();
for(int i = 0 ; i < e.getNamespaceCount(); ++i ) {
String uri = e.getNamespaceUri(i);
String prefix = e.getNamespacePrefix(i);
if(uri != null && prefix != null) {
tree.addNamespace(prefix, uri);
}
}
return prefixes;
}
public static TreeElement buildInstanceStructure (Element node, TreeElement parent) {
return buildInstanceStructure(node, parent, null, node.getNamespace());
}
//parse instance hierarchy and turn into a skeleton model; ignoring data content, but respecting repeated nodes and 'template' flags
public static TreeElement buildInstanceStructure (Element node, TreeElement parent, String instanceName, String docnamespace) {
TreeElement element = null;
//catch when text content is mixed with children
int numChildren = node.getChildCount();
boolean hasText = false;
boolean hasElements = false;
for (int i = 0; i < numChildren; i++) {
switch (node.getType(i)) {
case Node.ELEMENT:
hasElements = true; break;
case Node.TEXT:
if (node.getText(i).trim().length() > 0)
hasText = true;
break;
}
}
if (hasElements && hasText) {
System.out.println("Warning: instance node '" + node.getName() + "' contains both elements and text as children; text ignored");
}
//check for repeat templating
String name = node.getName();
int multiplicity;
if (node.getAttributeValue(NAMESPACE_JAVAROSA, "template") != null) {
multiplicity = TreeReference.INDEX_TEMPLATE;
if (parent != null && parent.getChild(name, TreeReference.INDEX_TEMPLATE) != null) {
throw new XFormParseException("More than one node declared as the template for the same repeated set [" + name + "]",node);
}
} else {
multiplicity = (parent == null ? 0 : parent.getChildMultiplicity(name));
}
String modelType = node.getAttributeValue(NAMESPACE_JAVAROSA, "modeltype");
//create node; handle children
if(modelType == null) {
element = new TreeElement(name, multiplicity);
element.setInstanceName(instanceName);
} else {
if( typeMappings.get(modelType) == null ){
throw new XFormParseException("ModelType " + modelType + " is not recognized.",node);
}
element = (TreeElement)modelPrototypes.getNewInstance(((Integer)typeMappings.get(modelType)).toString());
if(element == null) {
element = new TreeElement(name, multiplicity);
System.out.println("No model type prototype available for " + modelType);
} else {
element.setName(name);
element.setMult(multiplicity);
}
}
if(node.getNamespace() != null) {
if(!node.getNamespace().equals(docnamespace)) {
element.setNamespace(node.getNamespace());
}
}
if (hasElements) {
for (int i = 0; i < numChildren; i++) {
if (node.getType(i) == Node.ELEMENT) {
element.addChild(buildInstanceStructure(node.getElement(i), element, instanceName, docnamespace));
}
}
}
//handle attributes
if (node.getAttributeCount() > 0) {
for (int i = 0; i < node.getAttributeCount(); i++) {
String attrNamespace = node.getAttributeNamespace(i);
String attrName = node.getAttributeName(i);
if (attrNamespace.equals(NAMESPACE_JAVAROSA) && attrName.equals("template")) {
continue;
}
if (attrNamespace.equals(NAMESPACE_JAVAROSA) && attrName.equals("recordset")) {
continue;
}
element.setAttribute(attrNamespace, attrName, node.getAttributeValue(i));
}
}
return element;
}
private Vector<TreeReference> getRepeatableRefs () {
Vector<TreeReference> refs = new Vector<TreeReference>();
for (int i = 0; i < repeats.size(); i++) {
refs.addElement((TreeReference)repeats.elementAt(i));
}
for (int i = 0; i < itemsets.size(); i++) {
ItemsetBinding itemset = (ItemsetBinding)itemsets.elementAt(i);
TreeReference srcRef = itemset.nodesetRef;
if (!refs.contains(srcRef)) {
//CTS: Being an itemset root is not sufficient to mark
//a node as repeatable. It has to be nonstatic (which it
//must be inherently unless there's a wildcard).
boolean nonstatic = true;
for(int j = 0 ; j < srcRef.size(); ++j) {
if(TreeReference.NAME_WILDCARD.equals(srcRef.getName(j))) {
nonstatic = false;
}
}
//CTS: we're also going to go ahead and assume that all external
//instance are static (we can't modify them TODO: This may only be
//the case if the instances are of specific types (non Tree-Element
//style). Revisit if needed.
if(srcRef.getInstanceName() != null) {
nonstatic = false;
}
if(nonstatic) {
refs.addElement(srcRef);
}
}
if (itemset.copyMode) {
TreeReference destRef = itemset.getDestRef();
if (!refs.contains(destRef)) {
refs.addElement(destRef);
}
}
}
return refs;
}
//pre-process and clean up instance regarding repeats; in particular:
// 1) flag all repeat-related nodes as repeatable
// 2) catalog which repeat template nodes are explicitly defined, and note which repeats bindings lack templates
// 3) remove template nodes that are not valid for a repeat binding
// 4) generate template nodes for repeat bindings that do not have one defined explicitly
// (removed) 5) give a stern warning for any repeated instance nodes that do not correspond to a repeat binding
// 6) verify that all sets of repeated nodes are homogeneous
private void processRepeats (FormInstance instance) {
flagRepeatables(instance);
processTemplates(instance);
//2013-05-17 - ctsims - No longer call this, since we don't do the check
//checkDuplicateNodesAreRepeatable(instance.getRoot());
checkHomogeneity(instance);
}
//flag all nodes identified by repeat bindings as repeatable
private void flagRepeatables (FormInstance instance) {
Vector<TreeReference> refs = getRepeatableRefs();
for (int i = 0; i < refs.size(); i++) {
TreeReference ref = refs.elementAt(i);
Vector<TreeReference> nodes = new EvaluationContext(instance).expandReference(ref, true);
for (int j = 0; j < nodes.size(); j++) {
TreeReference nref = nodes.elementAt(j);
TreeElement node = instance.resolveReference(nref);
if (node != null) { // catch '/'
node.setRepeatable(true);
}
}
}
}
private void processTemplates (FormInstance instance) {
repeatTree = buildRepeatTree(getRepeatableRefs(), instance.getRoot().getName());
Vector<TreeReference> missingTemplates = new Vector<TreeReference>();
checkRepeatsForTemplate(instance, repeatTree, missingTemplates);
removeInvalidTemplates(instance, repeatTree);
createMissingTemplates(instance, missingTemplates);
}
//build a pseudo-data model tree that describes the repeat structure of the instance
//result is a FormInstance collapsed where all indexes are 0, and repeatable nodes are flagged as such
//return null if no repeats
//ignores (invalid) repeats that bind outside the top-level instance data node
private static FormInstance buildRepeatTree (Vector<TreeReference> repeatRefs, String topLevelName) {
TreeElement root = new TreeElement(null, 0);
for (int i = 0; i < repeatRefs.size(); i++) {
TreeReference repeatRef = repeatRefs.elementAt(i);
//check and see if this references a repeat from a non-main instance, if so, skip it
if(repeatRef.getInstanceName() != null)
{
continue;
}
if (repeatRef.size() <= 1) {
//invalid repeat: binds too high. ignore for now and error will be raised in verifyBindings
continue;
}
TreeElement cur = root;
for (int j = 0; j < repeatRef.size(); j++) {
String name = repeatRef.getName(j);
TreeElement child = cur.getChild(name, 0);
if (child == null) {
child = new TreeElement(name, 0);
cur.addChild(child);
}
cur = child;
}
cur.setRepeatable(true);
}
if (root.getNumChildren() == 0)
return null;
else
return new FormInstance(root.getChild(topLevelName, TreeReference.DEFAULT_MUTLIPLICITY));
}
//checks which repeat bindings have explicit template nodes; returns a vector of the bindings that do not
private static void checkRepeatsForTemplate (FormInstance instance, FormInstance repeatTree, Vector<TreeReference> missingTemplates) {
if (repeatTree != null)
checkRepeatsForTemplate(repeatTree.getRoot(), TreeReference.rootRef(), instance, missingTemplates);
}
//helper function for checkRepeatsForTemplate
private static void checkRepeatsForTemplate (TreeElement repeatTreeNode, TreeReference ref, FormInstance instance, Vector<TreeReference> missing) {
String name = repeatTreeNode.getName();
int mult = (repeatTreeNode.isRepeatable() ? TreeReference.INDEX_TEMPLATE : 0);
ref = ref.extendRef(name, mult);
if (repeatTreeNode.isRepeatable()) {
TreeElement template = instance.resolveReference(ref);
if (template == null) {
missing.addElement(ref);
}
}
for (int i = 0; i < repeatTreeNode.getNumChildren(); i++) {
checkRepeatsForTemplate(repeatTreeNode.getChildAt(i), ref, instance, missing);
}
}
//iterates through instance and removes template nodes that are not valid. a template is invalid if:
// it is declared for a node that is not repeatable
// it is for a repeat that is a child of another repeat and is not located within the parent's template node
private void removeInvalidTemplates (FormInstance instance, FormInstance repeatTree) {
removeInvalidTemplates(instance.getRoot(), (repeatTree == null ? null : repeatTree.getRoot()), true);
}
//helper function for removeInvalidTemplates
private boolean removeInvalidTemplates (TreeElement instanceNode, TreeElement repeatTreeNode, boolean templateAllowed) {
int mult = instanceNode.getMult();
boolean repeatable = (repeatTreeNode == null ? false : repeatTreeNode.isRepeatable());
if (mult == TreeReference.INDEX_TEMPLATE) {
if (!templateAllowed) {
reporter.warning(XFormParserReporter.TYPE_INVALID_STRUCTURE, "Template nodes for sub-repeats must be located within the template node of the parent repeat; ignoring template... [" + instanceNode.getName() + "]", null);
return true;
} else if (!repeatable) {
reporter.warning(XFormParserReporter.TYPE_INVALID_STRUCTURE, "Warning: template node found for ref that is not repeatable; ignoring... [" + instanceNode.getName() + "]", null);
return true;
}
}
if (repeatable && mult != TreeReference.INDEX_TEMPLATE)
templateAllowed = false;
for (int i = 0; i < instanceNode.getNumChildren(); i++) {
TreeElement child = instanceNode.getChildAt(i);
TreeElement rchild = (repeatTreeNode == null ? null : repeatTreeNode.getChild(child.getName(), 0));
if (removeInvalidTemplates(child, rchild, templateAllowed)) {
instanceNode.removeChildAt(i);
i--;
}
}
return false;
}
//if repeatables have no template node, duplicate first as template
private void createMissingTemplates (FormInstance instance, Vector<TreeReference> missingTemplates) {
//it is VERY important that the missing template refs are listed in depth-first or breadth-first order... namely, that
//every ref is listed after a ref that could be its parent. checkRepeatsForTemplate currently behaves this way
for (int i = 0; i < missingTemplates.size(); i++) {
TreeReference templRef = missingTemplates.elementAt(i);
TreeReference firstMatch;
//make template ref generic and choose first matching node
TreeReference ref = templRef.clone();
for (int j = 0; j < ref.size(); j++) {
ref.setMultiplicity(j, TreeReference.INDEX_UNBOUND);
}
Vector<TreeReference> nodes = new EvaluationContext(instance).expandReference(ref);
if (nodes.size() == 0) {
//binding error; not a single node matches the repeat binding; will be reported later
continue;
} else {
firstMatch = nodes.elementAt(0);
}
try {
instance.copyNode(firstMatch, templRef);
} catch (InvalidReferenceException e) {
reporter.warning(XFormParserReporter.TYPE_INVALID_STRUCTURE, "Could not create a default repeat template; this is almost certainly a homogeneity error! Your form will not work! (Failed on " + templRef.toString() + ")", null);
}
trimRepeatChildren(instance.resolveReference(templRef));
}
}
//trim repeatable children of newly created template nodes; we trim because the templates are supposed to be devoid of 'data',
// and # of repeats for a given repeat node is a kind of data. trust me
private static void trimRepeatChildren (TreeElement node) {
for (int i = 0; i < node.getNumChildren(); i++) {
TreeElement child = node.getChildAt(i);
if (child.isRepeatable()) {
node.removeChildAt(i);
i--;
} else {
trimRepeatChildren(child);
}
}
}
private static void checkDuplicateNodesAreRepeatable (TreeElement node) {
int mult = node.getMult();
if (mult > 0) { //repeated node
if (!node.isRepeatable()) {
//2013-05-17 - ctsims - I removed our check here, since we now support this
//much more cleanly.
//In theory, we should possibly make sure there are no _binds_ defined on these
//nodes at the very least, but that can be its own step
}
}
for (int i = 0; i < node.getNumChildren(); i++) {
checkDuplicateNodesAreRepeatable(node.getChildAt(i));
}
}
//check repeat sets for homogeneity
private void checkHomogeneity (FormInstance instance) {
Vector<TreeReference> refs = getRepeatableRefs();
for (int i = 0; i < refs.size(); i++) {
TreeReference ref = refs.elementAt(i);
TreeElement template = null;
Vector<TreeReference> nodes = new EvaluationContext(instance).expandReference(ref);
for (int j = 0; j < nodes.size(); j++) {
TreeReference nref = nodes.elementAt(j);
TreeElement node = instance.resolveReference(nref);
if (node == null) //don't crash on '/'... invalid repeat binding will be caught later
continue;
if (template == null)
template = instance.getTemplate(nref);
if (!FormInstance.isHomogeneous(template, node)) {
reporter.warning(XFormParserReporter.TYPE_INVALID_STRUCTURE, "Not all repeated nodes for a given repeat binding [" + nref.toString() + "] are homogeneous! This will cause serious problems!", null);
}
}
}
}
private void verifyBindings (FormInstance instance) {
//check <bind>s (can't bind to '/', bound nodes actually exist)
for (int i = 0; i < bindings.size(); i++) {
DataBinding bind = bindings.elementAt(i);
TreeReference ref = FormInstance.unpackReference(bind.getReference());
if (ref.size() == 0) {
System.out.println("Cannot bind to '/'; ignoring bind...");
bindings.removeElementAt(i);
i--;
} else {
Vector<TreeReference> nodes = new EvaluationContext(instance).expandReference(ref, true);
if (nodes.size() == 0) {
reporter.warning(XFormParserReporter.TYPE_ERROR_PRONE, "<bind> defined for a node that doesn't exist [" + ref.toString() + "]. The node's name was probably changed and the bind should be updated. ", null);
}
}
}
//check <repeat>s (can't bind to '/' or '/data')
Vector<TreeReference> refs = getRepeatableRefs();
for (int i = 0; i < refs.size(); i++) {
TreeReference ref = refs.elementAt(i);
if (ref.size() <= 1) {
throw new XFormParseException("Cannot bind repeat to '/' or '/" + mainInstanceNode.getName() + "'");
}
}
//check control/group/repeat bindings (bound nodes exist, question can't bind to '/')
Vector<String> bindErrors = new Vector<String>();
verifyControlBindings(_f, instance, bindErrors);
if (bindErrors.size() > 0) {
String errorMsg = "";
for (int i = 0; i < bindErrors.size(); i++) {
errorMsg += bindErrors.elementAt(i) + "\n";
}
throw new XFormParseException(errorMsg);
}
//check that repeat members bind to the proper scope (not above the binding of the parent repeat, and not within any sub-repeat (or outside repeat))
verifyRepeatMemberBindings(_f, instance, null);
//check that label/copy/value refs are children of nodeset ref, and exist
verifyItemsetBindings(instance);
verifyItemsetSrcDstCompatibility(instance);
}
private void verifyActions (FormInstance instance) {
//check the target of actions which are manipulating real values
for (int i = 0; i < actionTargets.size(); i++) {
TreeReference target = actionTargets.elementAt(i);
Vector<TreeReference> nodes = new EvaluationContext(instance).expandReference(target, true);
if (nodes.size() == 0) {
throw new XFormParseException("Invalid Action - Targets non-existent node: " + target.toString(true));
}
}
}
private void verifyControlBindings (IFormElement fe, FormInstance instance, Vector<String> errors) { //throws XmlPullParserException {
if (fe.getChildren() == null)
return;
for (int i = 0; i < fe.getChildren().size(); i++) {
IFormElement child = fe.getChildren().elementAt(i);
IDataReference ref = null;
String type = null;
if (child instanceof GroupDef) {
ref = ((GroupDef)child).getBind();
type = (((GroupDef)child).getRepeat() ? "Repeat" : "Group");
} else if (child instanceof QuestionDef) {
ref = ((QuestionDef)child).getBind();
type = "Question";
}
TreeReference tref = FormInstance.unpackReference(ref);
if (child instanceof QuestionDef && tref.size() == 0) {
//group can bind to '/'; repeat can't, but that's checked above
reporter.warning(XFormParserReporter.TYPE_INVALID_STRUCTURE, "Cannot bind control to '/'",null);
} else {
Vector<TreeReference> nodes = new EvaluationContext(instance).expandReference(tref, true);
if (nodes.size() == 0) {
String error = type+ " bound to non-existent node: [" + tref.toString() + "]";
reporter.error(error);
errors.addElement(error);
}
//we can't check whether questions map to the right kind of node ('data' node vs. 'sub-tree' node) as that depends
//on the question's data type, which we don't know yet
}
verifyControlBindings(child, instance, errors);
}
}
private void verifyRepeatMemberBindings (IFormElement fe, FormInstance instance, GroupDef parentRepeat) {
if (fe.getChildren() == null)
return;
for (int i = 0; i < fe.getChildren().size(); i++) {
IFormElement child = fe.getChildren().elementAt(i);
boolean isRepeat = (child instanceof GroupDef && ((GroupDef)child).getRepeat());
//get bindings of current node and nearest enclosing repeat
TreeReference repeatBind = (parentRepeat == null ? TreeReference.rootRef() : FormInstance.unpackReference(parentRepeat.getBind()));
TreeReference childBind = FormInstance.unpackReference(child.getBind());
//check if current binding is within scope of repeat binding
if (!repeatBind.isParentOf(childBind, false)) {
//catch <repeat nodeset="/a/b"><input ref="/a/c" /></repeat>: repeat question is not a child of the repeated node
throw new XFormParseException("<repeat> member's binding [" + childBind.toString() + "] is not a descendant of <repeat> binding [" + repeatBind.toString() + "]!");
} else if (repeatBind.equals(childBind) && isRepeat) {
//catch <repeat nodeset="/a/b"><repeat nodeset="/a/b">...</repeat></repeat> (<repeat nodeset="/a/b"><input ref="/a/b" /></repeat> is ok)
throw new XFormParseException("child <repeat>s [" + childBind.toString() + "] cannot bind to the same node as their parent <repeat>; only questions/groups can");
}
//check that, in the instance, current node is not within the scope of any closer repeat binding
//build a list of all the node's instance ancestors
Vector<TreeElement> repeatAncestry = new Vector<TreeElement>();
TreeElement repeatNode = (repeatTree == null ? null : repeatTree.getRoot());
if (repeatNode != null) {
repeatAncestry.addElement(repeatNode);
for (int j = 1; j < childBind.size(); j++) {
repeatNode = repeatNode.getChild(childBind.getName(j), 0);
if (repeatNode != null) {
repeatAncestry.addElement(repeatNode);
} else {
break;
}
}
}
//check that no nodes between the parent repeat and the target are repeatable
for (int k = repeatBind.size(); k < childBind.size(); k++) {
TreeElement rChild = (k < repeatAncestry.size() ? repeatAncestry.elementAt(k) : null);
boolean repeatable = (rChild == null ? false : rChild.isRepeatable());
if (repeatable && !(k == childBind.size() - 1 && isRepeat)) {
//catch <repeat nodeset="/a/b"><input ref="/a/b/c/d" /></repeat>...<repeat nodeset="/a/b/c">...</repeat>:
// question's/group's/repeat's most immediate repeat parent in the instance is not its most immediate repeat parent in the form def
throw new XFormParseException("<repeat> member's binding [" + childBind.toString() + "] is within the scope of a <repeat> that is not its closest containing <repeat>!");
}
}
verifyRepeatMemberBindings(child, instance, (isRepeat ? (GroupDef)child : parentRepeat));
}
}
private void verifyItemsetBindings (FormInstance instance) {
for (int i = 0; i < itemsets.size(); i++) {
ItemsetBinding itemset = itemsets.elementAt(i);
//check proper parent/child relationship
if (!itemset.nodesetRef.isParentOf(itemset.labelRef, false)) {
throw new XFormParseException("itemset nodeset ref is not a parent of label ref");
} else if (itemset.copyRef != null && !itemset.nodesetRef.isParentOf(itemset.copyRef, false)) {
throw new XFormParseException("itemset nodeset ref is not a parent of copy ref");
} else if (itemset.valueRef != null && !itemset.nodesetRef.isParentOf(itemset.valueRef, false)) {
throw new XFormParseException("itemset nodeset ref is not a parent of value ref");
}
//make sure the labelref is tested against the right instance
//check if it's not the main instance
DataInstance fi = null;
if(itemset.labelRef.getInstanceName()!= null)
{
fi = _f.getNonMainInstance(itemset.labelRef.getInstanceName());
if(fi == null)
{
throw new XFormParseException("Instance: "+ itemset.labelRef.getInstanceName() + " Does not exists");
}
}
else
{
fi = instance;
}
//If the data instance's structure isn't available until the form is entered, we can't really proceed further
//with consistency/sanity checks, so just bail.
if(fi.isRuntimeEvaluated()) {
return;
}
if(fi.getTemplatePath(itemset.labelRef) == null)
{
throw new XFormParseException("<label> node for itemset doesn't exist! [" + itemset.labelRef + "]");
}
/**** NOT SURE WHAT A COPYREF DOES OR IS, SO I'M NOT CHECKING FOR IT
else if (itemset.copyRef != null && instance.getTemplatePath(itemset.copyRef) == null) {
throw new XFormParseException("<copy> node for itemset doesn't exist! [" + itemset.copyRef + "]");
}
****/
//check value nodes exist
else if (itemset.valueRef != null && fi.getTemplatePath(itemset.valueRef) == null) {
throw new XFormParseException("<value> node for itemset doesn't exist! [" + itemset.valueRef + "]");
}
}
}
private void verifyItemsetSrcDstCompatibility (FormInstance instance) {
for (int i = 0; i < itemsets.size(); i++) {
ItemsetBinding itemset = itemsets.elementAt(i);
boolean destRepeatable = (instance.getTemplate(itemset.getDestRef()) != null);
if (itemset.copyMode) {
if (!destRepeatable) {
throw new XFormParseException("itemset copies to node(s) which are not repeatable");
}
//validate homogeneity between src and dst nodes
TreeElement srcNode = instance.getTemplatePath(itemset.copyRef);
TreeElement dstNode = instance.getTemplate(itemset.getDestRef());
if (!FormInstance.isHomogeneous(srcNode, dstNode)) {
reporter.warning(XFormParserReporter.TYPE_INVALID_STRUCTURE,
"Your itemset source [" + srcNode.getRef().toString() + "] and dest [" + dstNode.getRef().toString() +
"] of appear to be incompatible!", null);
}
//TODO: i feel like, in theory, i should additionally check that the repeatable children of src and dst
//match up (Achild is repeatable <--> Bchild is repeatable). isHomogeneous doesn't check this. but i'm
//hard-pressed to think of scenarios where this would actually cause problems
} else {
if (destRepeatable) {
throw new XFormParseException("itemset sets value on repeatable nodes");
}
}
}
}
private void applyInstanceProperties (FormInstance instance) {
for (int i = 0; i < bindings.size(); i++) {
DataBinding bind = bindings.elementAt(i);
TreeReference ref = FormInstance.unpackReference(bind.getReference());
Vector<TreeReference> nodes = new EvaluationContext(instance).expandReference(ref, true);
if (nodes.size() > 0) {
attachBindGeneral(bind);
}
for (int j = 0; j < nodes.size(); j++) {
TreeReference nref = nodes.elementAt(j);
attachBind(instance.resolveReference(nref), bind);
}
}
applyControlProperties(instance);
}
private static void attachBindGeneral (DataBinding bind) {
TreeReference ref = FormInstance.unpackReference(bind.getReference());
if (bind.relevancyCondition != null) {
bind.relevancyCondition.addTarget(ref);
}
if (bind.requiredCondition != null) {
bind.requiredCondition.addTarget(ref);
}
if (bind.readonlyCondition != null) {
bind.readonlyCondition.addTarget(ref);
}
if (bind.calculate != null) {
bind.calculate.addTarget(ref);
}
}
private static void attachBind(TreeElement node, DataBinding bind) {
node.setDataType(bind.getDataType());
if (bind.relevancyCondition == null) {
node.setRelevant(bind.relevantAbsolute);
}
if (bind.requiredCondition == null) {
node.setRequired(bind.requiredAbsolute);
}
if (bind.readonlyCondition == null) {
node.setEnabled(!bind.readonlyAbsolute);
}
if (bind.constraint != null) {
node.setConstraint(new Constraint(bind.constraint, bind.constraintMessage));
}
node.setPreloadHandler(bind.getPreload());
node.setPreloadParams(bind.getPreloadParams());
}
//apply properties to instance nodes that are determined by controls bound to those nodes
//this should make you feel slightly dirty, but it allows us to be somewhat forgiving with the form
//(e.g., a select question bound to a 'text' type node)
private void applyControlProperties (FormInstance instance) {
for (int h = 0; h < 2; h++) {
Vector<TreeReference> selectRefs = (h == 0 ? selectOnes : selectMultis);
int type = (h == 0 ? Constants.DATATYPE_CHOICE : Constants.DATATYPE_CHOICE_LIST);
for (int i = 0; i < selectRefs.size(); i++) {
TreeReference ref = selectRefs.elementAt(i);
Vector<TreeReference> nodes = new EvaluationContext(instance).expandReference(ref, true);
for (int j = 0; j < nodes.size(); j++) {
TreeElement node = instance.resolveReference(nodes.elementAt(j));
if (node.getDataType() == Constants.DATATYPE_CHOICE || node.getDataType() == Constants.DATATYPE_CHOICE_LIST) {
//do nothing
} else if (node.getDataType() == Constants.DATATYPE_NULL || node.getDataType() == Constants.DATATYPE_TEXT) {
node.setDataType(type);
} else {
reporter.warning(XFormParserReporter.TYPE_INVALID_STRUCTURE,
"Select question " + ref.toString() + " appears to have data type that is incompatible with selection", null);
}
}
}
}
}
//TODO: hook here for turning sub-trees into complex IAnswerData objects (like for immunizations)
//FIXME: the 'ref' and FormDef parameters (along with the helper function above that initializes them) are only needed so that we
//can fetch QuestionDefs bound to the given node, as the QuestionDef reference is needed to properly represent answers
//to select questions. obviously, we want to fix this.
private static void loadInstanceData (Element node, TreeElement cur, FormDef f) {
int numChildren = node.getChildCount();
boolean hasElements = false;
for (int i = 0; i < numChildren; i++) {
if (node.getType(i) == Node.ELEMENT) {
hasElements = true;
break;
}
}
if (hasElements) {
Hashtable<String, Integer> multiplicities = new Hashtable<String, Integer>(); //stores max multiplicity seen for a given node name thus far
for (int i = 0; i < numChildren; i++) {
if (node.getType(i) == Node.ELEMENT) {
Element child = node.getElement(i);
String name = child.getName();
int index;
boolean isTemplate = (child.getAttributeValue(NAMESPACE_JAVAROSA, "template") != null);
if (isTemplate) {
index = TreeReference.INDEX_TEMPLATE;
} else {
//update multiplicity counter
Integer mult = multiplicities.get(name);
index = (mult == null ? 0 : mult.intValue() + 1);
multiplicities.put(name, DataUtil.integer(index));
}
loadInstanceData(child, cur.getChild(name, index), f);
}
}
} else {
String text = getXMLText(node, true);
if (text != null && text.trim().length() > 0) { //ignore text that is only whitespace
//TODO: custom data types? modelPrototypes?
cur.setValue(AnswerDataFactory.templateByDataType(cur.getDataType()).cast(new UncastData(text.trim())));
}
}
}
//find a questiondef that binds to ref, if the data type is a 'select' question type
public static QuestionDef ghettoGetQuestionDef (int dataType, FormDef f, TreeReference ref) {
if (dataType == Constants.DATATYPE_CHOICE || dataType == Constants.DATATYPE_CHOICE_LIST) {
return FormDef.findQuestionByRef(ref, f);
} else {
return null;
}
}
private void checkDependencyCycles () {
Vector vertices = new Vector();
Vector edges = new Vector();
//build graph
for (Enumeration e = _f.triggerIndex.keys(); e.hasMoreElements(); ) {
TreeReference trigger = (TreeReference)e.nextElement();
if (!vertices.contains(trigger))
vertices.addElement(trigger);
Vector triggered = (Vector)_f.triggerIndex.get(trigger);
Vector targets = new Vector();
for (int i = 0; i < triggered.size(); i++) {
Triggerable t = (Triggerable)triggered.elementAt(i);
for (int j = 0; j < t.getTargets().size(); j++) {
TreeReference target = (TreeReference)t.getTargets().elementAt(j);
if (!targets.contains(target))
targets.addElement(target);
}
}
for (int i = 0; i < targets.size(); i++) {
TreeReference target = (TreeReference)targets.elementAt(i);
if (!vertices.contains(target))
vertices.addElement(target);
TreeReference[] edge = {trigger, target};
edges.addElement(edge);
}
}
//find cycles
boolean acyclic = true;
while (vertices.size() > 0) {
//determine leaf nodes
Vector leaves = new Vector();
for (int i = 0; i < vertices.size(); i++) {
leaves.addElement(vertices.elementAt(i));
}
for (int i = 0; i < edges.size(); i++) {
TreeReference[] edge = (TreeReference[])edges.elementAt(i);
leaves.removeElement(edge[0]);
}
//if no leaf nodes while graph still has nodes, graph has cycles
if (leaves.size() == 0) {
acyclic = false;
break;
}
//remove leaf nodes and edges pointing to them
for (int i = 0; i < leaves.size(); i++) {
TreeReference leaf = (TreeReference)leaves.elementAt(i);
vertices.removeElement(leaf);
}
for (int i = edges.size() - 1; i >= 0; i--) {
TreeReference[] edge = (TreeReference[])edges.elementAt(i);
if (leaves.contains(edge[1]))
edges.removeElementAt(i);
}
}
if (!acyclic) {
String errorMessage = "XPath Dependency Cycle:\n";
for (int i = 0; i < edges.size(); i++) {
TreeReference[] edge = (TreeReference[])edges.elementAt(i);
errorMessage += edge[0].toString() + " => " + edge[1].toString() + "\n";
}
reporter.error(errorMessage);
throw new RuntimeException("Dependency cycles amongst the xpath expressions in relevant/calculate");
}
}
public static void loadXmlInstance(FormDef f, Reader xmlReader) throws IOException {
loadXmlInstance(f, getXMLDocument(xmlReader));
}
/**
* Load a compatible xml instance into FormDef f
*
* call before f.initialize()!
*/
public static void loadXmlInstance(FormDef f, Document xmlInst) {
TreeElement savedRoot = XFormParser.restoreDataModel(xmlInst, null).getRoot();
TreeElement templateRoot = f.getMainInstance().getRoot().deepCopy(true);
// weak check for matching forms
// TODO: should check that namespaces match?
if (!savedRoot.getName().equals(templateRoot.getName()) || savedRoot.getMult() != 0) {
throw new RuntimeException("Saved form instance does not match template form definition");
}
// populate the data model
TreeReference tr = TreeReference.rootRef();
tr.add(templateRoot.getName(), TreeReference.INDEX_UNBOUND);
templateRoot.populate(savedRoot, f);
// populated model to current form
f.getMainInstance().setRoot(templateRoot);
// if the new instance is inserted into the formdef before f.initialize() is called, this
// locale refresh is unnecessary
// Localizer loc = f.getLocalizer();
// if (loc != null) {
// f.localeChanged(loc.getLocale(), loc);
// }
}
//returns data type corresponding to type string; doesn't handle defaulting to 'text' if type unrecognized/unknown
private int getDataType(String type) {
int dataType = Constants.DATATYPE_NULL;
if (type != null) {
//cheap out and ignore namespace
if (type.indexOf(":") != -1) {
type = type.substring(type.indexOf(":") + 1);
}
if (typeMappings.containsKey(type)) {
dataType = ((Integer)typeMappings.get(type)).intValue();
} else {
dataType = Constants.DATATYPE_UNSUPPORTED;
reporter.warning(XFormParserReporter.TYPE_ERROR_PRONE, "unrecognized data type [" + type + "]", null);
}
}
return dataType;
}
public static void addModelPrototype(int type, TreeElement element) {
modelPrototypes.addNewPrototype(String.valueOf(type), element.getClass());
}
public static void addDataType (String type, int dataType) {
typeMappings.put(type, DataUtil.integer(dataType));
}
public static void registerControlType(String type, final int typeId) {
IElementHandler newHandler = new IElementHandler() {
public void handle (XFormParser p, Element e, Object parent) { p.parseControl((IFormElement)parent, e, typeId); } };
topLevelHandlers.put(type, newHandler);
groupLevelHandlers.put(type, newHandler);
}
public static void registerHandler(String type, IElementHandler handler) {
topLevelHandlers.put(type, handler);
groupLevelHandlers.put(type, handler);
}
public static String getXMLText (Node n, boolean trim) {
return (n.getChildCount() == 0 ? null : getXMLText(n, 0, trim));
}
/**
* reads all subsequent text nodes and returns the combined string
* needed because escape sequences are parsed into consecutive text nodes
* e.g. "abc&123" --> (abc)(&)(123)
**/
public static String getXMLText (Node node, int i, boolean trim) {
StringBuffer strBuff = null;
String text = node.getText(i);
if (text == null)
return null;
for (i++; i < node.getChildCount() && node.getType(i) == Node.TEXT; i++) {
if (strBuff == null)
strBuff = new StringBuffer(text);
strBuff.append(node.getText(i));
}
if (strBuff != null)
text = strBuff.toString();
if (trim)
text = text.trim();
return text;
}
public static FormInstance restoreDataModel (InputStream input, Class restorableType) throws IOException {
Document doc = getXMLDocument(new InputStreamReader(input));
if (doc == null) {
throw new RuntimeException("syntax error in XML instance; could not parse");
}
return restoreDataModel(doc, restorableType);
}
public static FormInstance restoreDataModel (Document doc, Class restorableType) {
Restorable r = (restorableType != null ? (Restorable)PrototypeFactory.getInstance(restorableType) : null);
Element e = doc.getRootElement();
TreeElement te = buildInstanceStructure(e, null);
FormInstance dm = new FormInstance(te);
loadNamespaces(e, dm);
if (r != null) {
RestoreUtils.templateData(r, dm, null);
}
loadInstanceData(e, te, null);
return dm;
}
public static FormInstance restoreDataModel (byte[] data, Class restorableType) {
try {
return restoreDataModel(new ByteArrayInputStream(data), restorableType);
} catch (IOException e) {
e.printStackTrace();
throw new XFormParseException("Bad parsing from byte array " + e.getMessage());
}
}
public static String getVagueLocation(Element e) {
String path = e.getName();
Element walker = e;
while(walker != null) {
Node n = walker.getParent();
if(n instanceof Element) {
walker = (Element)n;
String step = walker.getName();
for(int i = 0; i < walker.getAttributeCount() ; ++i) {
step += "[@" +walker.getAttributeName(i) + "=";
step += walker.getAttributeValue(i) + "]";
}
path = step + "/" + path;
} else {
walker = null;
path = "/" + path;
}
}
String elementString = getVagueElementPrintout(e, 2);
String fullmsg = "\n Problem found at nodeset: " + path;
fullmsg += "\n With element " + elementString + "\n";
return fullmsg;
}
public static String getVagueElementPrintout(Element e, int maxDepth) {
String elementString = "<" + e.getName();
for(int i = 0; i < e.getAttributeCount() ; ++i) {
elementString += " " + e.getAttributeName(i) + "=\"";
elementString += e.getAttributeValue(i) + "\"";
}
if(e.getChildCount() > 0) {
elementString += ">";
if(e.getType(0) ==Element.ELEMENT) {
if(maxDepth > 0) {
elementString += getVagueElementPrintout((Element)e.getChild(0),maxDepth -1);
} else {
elementString += "...";
}
}
} else {
elementString += "/>";
}
return elementString;
}
} | core/src/org/javarosa/xform/parse/XFormParser.java | /*
* Copyright (C) 2009 JavaRosa
*
* 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 org.javarosa.xform.parse;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.Reader;
import java.util.Enumeration;
import java.util.Hashtable;
import java.util.Stack;
import java.util.Vector;
import org.javarosa.core.model.Action;
import org.javarosa.core.model.Constants;
import org.javarosa.core.model.DataBinding;
import org.javarosa.core.model.FormDef;
import org.javarosa.core.model.GroupDef;
import org.javarosa.core.model.IDataReference;
import org.javarosa.core.model.IFormElement;
import org.javarosa.core.model.ItemsetBinding;
import org.javarosa.core.model.QuestionDef;
import org.javarosa.core.model.SelectChoice;
import org.javarosa.core.model.SubmissionProfile;
import org.javarosa.core.model.actions.SetValueAction;
import org.javarosa.core.model.condition.Condition;
import org.javarosa.core.model.condition.Constraint;
import org.javarosa.core.model.condition.EvaluationContext;
import org.javarosa.core.model.condition.Recalculate;
import org.javarosa.core.model.condition.Triggerable;
import org.javarosa.core.model.data.AnswerDataFactory;
import org.javarosa.core.model.data.UncastData;
import org.javarosa.core.model.instance.DataInstance;
import org.javarosa.core.model.instance.ExternalDataInstance;
import org.javarosa.core.model.instance.FormInstance;
import org.javarosa.core.model.instance.InvalidReferenceException;
import org.javarosa.core.model.instance.TreeElement;
import org.javarosa.core.model.instance.TreeReference;
import org.javarosa.core.model.util.restorable.Restorable;
import org.javarosa.core.model.util.restorable.RestoreUtils;
import org.javarosa.core.services.Logger;
import org.javarosa.core.services.locale.Localizer;
import org.javarosa.core.services.locale.TableLocaleSource;
import org.javarosa.core.util.DataUtil;
import org.javarosa.core.util.OrderedHashtable;
import org.javarosa.core.util.externalizable.PrototypeFactory;
import org.javarosa.core.util.externalizable.PrototypeFactoryDeprecated;
import org.javarosa.model.xform.XPathReference;
import org.javarosa.xform.util.InterningKXmlParser;
import org.javarosa.xform.util.XFormSerializer;
import org.javarosa.xform.util.XFormUtils;
import org.javarosa.xpath.XPathConditional;
import org.javarosa.xpath.XPathParseTool;
import org.javarosa.xpath.expr.XPathPathExpr;
import org.javarosa.xpath.parser.XPathSyntaxException;
import org.kxml2.io.KXmlParser;
import org.kxml2.kdom.Document;
import org.kxml2.kdom.Element;
import org.kxml2.kdom.Node;
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
/* droos: i think we need to start storing the contents of the <bind>s in the formdef again */
/**
* Provides conversion from xform to epihandy object model and vice vasa.
*
* @author Daniel Kayiwa
* @author Drew Roos
*
*/
public class XFormParser {
//Constants to clean up code and prevent user error
private static final String ID_ATTR = "id";
private static final String FORM_ATTR = "form";
private static final String APPEARANCE_ATTR = "appearance";
private static final String NODESET_ATTR = "nodeset";
private static final String LABEL_ELEMENT = "label";
private static final String VALUE = "value";
private static final String ITEXT_CLOSE = "')";
private static final String ITEXT_OPEN = "jr:itext('";
private static final String BIND_ATTR = "bind";
private static final String REF_ATTR = "ref";
private static final String SELECTONE = "select1";
private static final String SELECT = "select";
public static final String NAMESPACE_JAVAROSA = "http://openrosa.org/javarosa";
public static final String NAMESPACE_HTML = "http://www.w3.org/1999/xhtml";
private static final int CONTAINER_GROUP = 1;
private static final int CONTAINER_REPEAT = 2;
private static Hashtable<String, IElementHandler> topLevelHandlers;
private static Hashtable<String, IElementHandler> groupLevelHandlers;
private static Hashtable<String, Integer> typeMappings;
private static PrototypeFactoryDeprecated modelPrototypes;
private static Vector<SubmissionParser> submissionParsers;
private Reader _reader;
private Document _xmldoc;
private FormDef _f;
private Reader _instReader;
private Document _instDoc;
private boolean modelFound;
private Hashtable<String, DataBinding> bindingsByID;
private Vector<DataBinding> bindings;
private Vector<TreeReference> actionTargets;
private Vector<TreeReference> repeats;
private Vector<ItemsetBinding> itemsets;
private Vector<TreeReference> selectOnes;
private Vector<TreeReference> selectMultis;
private Element mainInstanceNode; //top-level data node of the instance; saved off so it can be processed after the <bind>s
private Vector<Element> instanceNodes;
private Vector<String> instanceNodeIdStrs;
private String defaultNamespace;
private Vector<String> itextKnownForms;
private Vector<String> namedActions;
private Hashtable<String, IElementHandler> structuredActions;
private FormInstance repeatTree; //pseudo-data model tree that describes the repeat structure of the instance;
//useful during instance processing and validation
//incremented to provide unique question ID for each question
private int serialQuestionID = 1;
static {
try {
staticInit();
} catch (Exception e) {
Logger.die("xfparser-static-init", e);
}
}
private static void staticInit() {
initProcessingRules();
initTypeMappings();
modelPrototypes = new PrototypeFactoryDeprecated();
submissionParsers = new Vector<SubmissionParser>();
}
private static void initProcessingRules () {
IElementHandler title = new IElementHandler () {
public void handle (XFormParser p, Element e, Object parent) { p.parseTitle(e); } };
IElementHandler meta = new IElementHandler () {
public void handle (XFormParser p, Element e, Object parent) { p.parseMeta(e); } };
IElementHandler model = new IElementHandler () {
public void handle (XFormParser p, Element e, Object parent) { p.parseModel(e); } };
IElementHandler input = new IElementHandler () {
public void handle (XFormParser p, Element e, Object parent) { p.parseControl((IFormElement)parent, e, Constants.CONTROL_INPUT); } };
IElementHandler secret = new IElementHandler () {
public void handle (XFormParser p, Element e, Object parent) { p.parseControl((IFormElement)parent, e, Constants.CONTROL_SECRET); } };
IElementHandler select = new IElementHandler () {
public void handle (XFormParser p, Element e, Object parent) { p.parseControl((IFormElement)parent, e, Constants.CONTROL_SELECT_MULTI); } };
IElementHandler select1 = new IElementHandler () {
public void handle (XFormParser p, Element e, Object parent) { p.parseControl((IFormElement)parent, e, Constants.CONTROL_SELECT_ONE); } };
IElementHandler group = new IElementHandler () {
public void handle (XFormParser p, Element e, Object parent) { p.parseGroup((IFormElement)parent, e, CONTAINER_GROUP); } };
IElementHandler repeat = new IElementHandler () {
public void handle (XFormParser p, Element e, Object parent) { p.parseGroup((IFormElement)parent, e, CONTAINER_REPEAT); } };
IElementHandler groupLabel = new IElementHandler () {
public void handle (XFormParser p, Element e, Object parent) { p.parseGroupLabel((GroupDef)parent, e); } };
IElementHandler trigger = new IElementHandler () {
public void handle (XFormParser p, Element e, Object parent) { p.parseControl((IFormElement)parent, e, Constants.CONTROL_TRIGGER); } };
IElementHandler upload = new IElementHandler () {
public void handle (XFormParser p, Element e, Object parent) { p.parseUpload((IFormElement)parent, e, Constants.CONTROL_UPLOAD); } };
groupLevelHandlers = new Hashtable<String, IElementHandler>();
groupLevelHandlers.put("input", input);
groupLevelHandlers.put("secret",secret);
groupLevelHandlers.put(SELECT, select);
groupLevelHandlers.put(SELECTONE, select1);
groupLevelHandlers.put("group", group);
groupLevelHandlers.put("repeat", repeat);
groupLevelHandlers.put("trigger", trigger); //multi-purpose now; need to dig deeper
groupLevelHandlers.put(Constants.XFTAG_UPLOAD, upload);
topLevelHandlers = new Hashtable<String, IElementHandler>();
for (Enumeration en = groupLevelHandlers.keys(); en.hasMoreElements(); ) {
String key = (String)en.nextElement();
topLevelHandlers.put(key, groupLevelHandlers.get(key));
}
topLevelHandlers.put("model", model);
topLevelHandlers.put("title", title);
topLevelHandlers.put("meta", meta);
groupLevelHandlers.put(LABEL_ELEMENT, groupLabel);
}
private static void initTypeMappings () {
typeMappings = new Hashtable<String, Integer>();
typeMappings.put("string", DataUtil.integer(Constants.DATATYPE_TEXT)); //xsd:
typeMappings.put("integer", DataUtil.integer(Constants.DATATYPE_INTEGER)); //xsd:
typeMappings.put("long", DataUtil.integer(Constants.DATATYPE_LONG)); //xsd:
typeMappings.put("int", DataUtil.integer(Constants.DATATYPE_INTEGER)); //xsd:
typeMappings.put("decimal", DataUtil.integer(Constants.DATATYPE_DECIMAL)); //xsd:
typeMappings.put("double", DataUtil.integer(Constants.DATATYPE_DECIMAL)); //xsd:
typeMappings.put("float", DataUtil.integer(Constants.DATATYPE_DECIMAL)); //xsd:
typeMappings.put("dateTime", DataUtil.integer(Constants.DATATYPE_DATE_TIME)); //xsd:
typeMappings.put("date", DataUtil.integer(Constants.DATATYPE_DATE)); //xsd:
typeMappings.put("time", DataUtil.integer(Constants.DATATYPE_TIME)); //xsd:
typeMappings.put("gYear", DataUtil.integer(Constants.DATATYPE_UNSUPPORTED)); //xsd:
typeMappings.put("gMonth", DataUtil.integer(Constants.DATATYPE_UNSUPPORTED)); //xsd:
typeMappings.put("gDay", DataUtil.integer(Constants.DATATYPE_UNSUPPORTED)); //xsd:
typeMappings.put("gYearMonth", DataUtil.integer(Constants.DATATYPE_UNSUPPORTED)); //xsd:
typeMappings.put("gMonthDay", DataUtil.integer(Constants.DATATYPE_UNSUPPORTED)); //xsd:
typeMappings.put("boolean", DataUtil.integer(Constants.DATATYPE_BOOLEAN)); //xsd:
typeMappings.put("base64Binary", DataUtil.integer(Constants.DATATYPE_UNSUPPORTED)); //xsd:
typeMappings.put("hexBinary", DataUtil.integer(Constants.DATATYPE_UNSUPPORTED)); //xsd:
typeMappings.put("anyURI", DataUtil.integer(Constants.DATATYPE_UNSUPPORTED)); //xsd:
typeMappings.put("listItem", DataUtil.integer(Constants.DATATYPE_CHOICE)); //xforms:
typeMappings.put("listItems", DataUtil.integer(Constants.DATATYPE_CHOICE_LIST)); //xforms:
typeMappings.put(SELECTONE, DataUtil.integer(Constants.DATATYPE_CHOICE)); //non-standard
typeMappings.put(SELECT, DataUtil.integer(Constants.DATATYPE_CHOICE_LIST)); //non-standard
typeMappings.put("geopoint", DataUtil.integer(Constants.DATATYPE_GEOPOINT)); //non-standard
typeMappings.put("barcode", DataUtil.integer(Constants.DATATYPE_BARCODE)); //non-standard
typeMappings.put("binary", DataUtil.integer(Constants.DATATYPE_BINARY)); //non-standard
}
private void initState () {
modelFound = false;
bindingsByID = new Hashtable<String, DataBinding>();
bindings = new Vector<DataBinding>();
actionTargets = new Vector<TreeReference>();
repeats = new Vector<TreeReference>();
itemsets = new Vector<ItemsetBinding>();
selectOnes = new Vector<TreeReference>();
selectMultis = new Vector<TreeReference>();
mainInstanceNode = null;
instanceNodes = new Vector<Element>();
instanceNodeIdStrs = new Vector<String>();
repeatTree = null;
defaultNamespace = null;
itextKnownForms = new Vector<String>();
itextKnownForms.addElement("long");
itextKnownForms.addElement("short");
itextKnownForms.addElement("image");
itextKnownForms.addElement("audio");
namedActions = new Vector<String>();
namedActions.addElement("rebuild");
namedActions.addElement("recalculate");
namedActions.addElement("revalidate");
namedActions.addElement("refresh");
namedActions.addElement("setfocus");
namedActions.addElement("reset");
structuredActions = new Hashtable<String, IElementHandler>();
structuredActions.put("setvalue", new IElementHandler() {
public void handle (XFormParser p, Element e, Object parent) { p.parseSetValueAction((FormDef)parent, e);}
});
}
XFormParserReporter reporter = new XFormParserReporter();
public XFormParser(Reader reader) {
_reader = reader;
}
public XFormParser(Document doc) {
_xmldoc = doc;
}
public XFormParser(Reader form, Reader instance) {
_reader = form;
_instReader = instance;
}
public XFormParser(Document form, Document instance) {
_xmldoc = form;
_instDoc = instance;
}
public void attachReporter(XFormParserReporter reporter) {
this.reporter = reporter;
}
public FormDef parse() throws IOException {
if (_f == null) {
System.out.println("Parsing form...");
if (_xmldoc == null) {
_xmldoc = getXMLDocument(_reader);
}
parseDoc();
//load in a custom xml instance, if applicable
if (_instReader != null) {
loadXmlInstance(_f, _instReader);
} else if (_instDoc != null) {
loadXmlInstance(_f, _instDoc);
}
}
return _f;
}
public static Document getXMLDocument(Reader reader) throws IOException {
Document doc = new Document();
try{
KXmlParser parser = new InterningKXmlParser();
parser.setInput(reader);
parser.setFeature(XmlPullParser.FEATURE_PROCESS_NAMESPACES, true);
doc.parse(parser);
} catch (XmlPullParserException e) {
String errorMsg = "XML Syntax Error at Line: " + e.getLineNumber() +", Column: "+ e.getColumnNumber()+ "!";
System.err.println(errorMsg);
e.printStackTrace();
throw new XFormParseException(errorMsg);
} catch(IOException e){
//CTS - 12/09/2012 - Stop swallowing IO Exceptions
throw e;
} catch(Exception e){
//#if debug.output==verbose || debug.output==exception
String errorMsg = "Unhandled Exception while Parsing XForm";
System.err.println(errorMsg);
e.printStackTrace();
throw new XFormParseException(errorMsg);
//#endif
}
try {
reader.close();
} catch (IOException e) {
System.out.println("Error closing reader");
e.printStackTrace();
}
//For escaped unicode strings we end up with a looooot of cruft,
//so we really want to go through and convert the kxml parsed
//text (which have lots of characters each as their own string)
//into one single string
Stack<Element> q = new Stack<Element>();
q.push(doc.getRootElement());
while(!q.isEmpty()) {
Element e = q.pop();
boolean[] toRemove = new boolean[e.getChildCount()*2];
String accumulate = "";
for(int i = 0 ; i < e.getChildCount(); ++i ){
int type = e.getType(i);
if(type == Element.TEXT) {
String text = e.getText(i);
accumulate += text;
toRemove[i] = true;
} else {
if(type ==Element.ELEMENT) {
q.addElement(e.getElement(i));
}
String accstr = accumulate.trim();
if(accstr.length() != 0) {
e.addChild(i, Element.TEXT, accumulate.intern());
accumulate = "";
++i;
} else {
accumulate = "";
}
}
}
if(accumulate.trim().length() != 0) {
e.addChild(Element.TEXT, accumulate.intern());
}
for(int i = e.getChildCount() - 1; i >= 0 ; i-- ){
if(toRemove[i]) {
e.removeChild(i);
}
}
}
return doc;
}
private void parseDoc() {
_f = new FormDef();
initState();
defaultNamespace = _xmldoc.getRootElement().getNamespaceUri(null);
parseElement(_xmldoc.getRootElement(), _f, topLevelHandlers);
collapseRepeatGroups(_f);
//parse the non-main instance nodes first
//we assume that the non-main instances won't
//reference the main node, so we do them first.
//if this assumption is wrong, well, then we're screwed.
if(instanceNodes.size() > 1)
{
for(int i = 1; i < instanceNodes.size(); i++)
{
Element e = instanceNodes.elementAt(i);
String srcLocation = e.getAttributeValue(null, "src");
DataInstance di;
if(e.getChildCount() == 0 && srcLocation != null) {
di = new ExternalDataInstance(srcLocation, instanceNodeIdStrs.elementAt(i));
} else {
FormInstance fi = parseInstance(e, false);
loadInstanceData(e, fi.getRoot(), _f);
di = fi;
}
_f.addNonMainInstance(di);
}
}
//now parse the main instance
if(mainInstanceNode != null) {
FormInstance fi = parseInstance(mainInstanceNode, true);
addMainInstanceToFormDef(mainInstanceNode, fi);
//set the main instance
_f.setInstance(fi);
}
}
private void parseElement (Element e, Object parent, Hashtable<String, IElementHandler> handlers) { //,
// boolean allowUnknownElements, boolean allowText, boolean recurseUnknown) {
String name = e.getName();
String[] suppressWarningArr = {
"html",
"head",
"body",
"xform",
"chooseCaption",
"addCaption",
"addEmptyCaption",
"delCaption",
"doneCaption",
"doneEmptyCaption",
"mainHeader",
"entryHeader",
"delHeader"
};
Vector<String> suppressWarning = new Vector<String>();
for (int i = 0; i < suppressWarningArr.length; i++) {
suppressWarning.addElement(suppressWarningArr[i]);
}
IElementHandler eh = handlers.get(name);
if (eh != null) {
eh.handle(this, e, parent);
} else {
if (!suppressWarning.contains(name)) {
reporter.warning(XFormParserReporter.TYPE_UNKNOWN_MARKUP,
"Unrecognized element [" + name + "]. Ignoring and processing children...",
getVagueLocation(e));
}
for (int i = 0; i < e.getChildCount(); i++) {
if (e.getType(i) == Element.ELEMENT) {
parseElement(e.getElement(i), parent, handlers);
}
}
}
}
private void parseTitle (Element e) {
Vector usedAtts = new Vector(); //no attributes parsed in title.
String title = getXMLText(e, true);
System.out.println("Title: \"" + title + "\"");
_f.setTitle(title);
if(_f.getName() == null) {
//Jan 9, 2009 - ctsims
//We don't really want to allow for forms without
//some unique ID, so if a title is available, use
//that.
_f.setName(title);
}
if(XFormUtils.showUnusedAttributeWarning(e, usedAtts)){
reporter.warning(XFormParserReporter.TYPE_UNKNOWN_MARKUP, XFormUtils.unusedAttWarning(e, usedAtts), getVagueLocation(e));
}
}
private void parseMeta (Element e) {
Vector<String> usedAtts = new Vector<String>();
int attributes = e.getAttributeCount();
for(int i = 0 ; i < attributes ; ++i) {
String name = e.getAttributeName(i);
String value = e.getAttributeValue(i);
if("name".equals(name)) {
_f.setName(value);
}
}
usedAtts.addElement("name");
if(XFormUtils.showUnusedAttributeWarning(e, usedAtts)){
reporter.warning(XFormParserReporter.TYPE_UNKNOWN_MARKUP, XFormUtils.unusedAttWarning(e, usedAtts), getVagueLocation(e));
}
}
//for ease of parsing, we assume a model comes before the controls, which isn't necessarily mandated by the xforms spec
private void parseModel (Element e) {
Vector<String> usedAtts = new Vector<String>(); //no attributes parsed in title.
Vector<Element> delayedParseElements = new Vector<Element>();
if (modelFound) {
reporter.warning(XFormParserReporter.TYPE_INVALID_STRUCTURE,
"Multiple models not supported. Ignoring subsequent models.", getVagueLocation(e));
return;
}
modelFound = true;
if(XFormUtils.showUnusedAttributeWarning(e, usedAtts)){
reporter.warning(XFormParserReporter.TYPE_UNKNOWN_MARKUP, XFormUtils.unusedAttWarning(e, usedAtts), getVagueLocation(e));
}
for (int i = 0; i < e.getChildCount(); i++) {
int type = e.getType(i);
Element child = (type == Node.ELEMENT ? e.getElement(i) : null);
String childName = (child != null ? child.getName() : null);
if ("itext".equals(childName)) {
parseIText(child);
} else if ("instance".equals(childName)) {
//we save parsing the instance node until the end, giving us the information we need about
//binds and data types and such
saveInstanceNode(child);
} else if (BIND_ATTR.equals(childName)) { //<instance> must come before <bind>s
parseBind(child);
} else if("submission".equals(childName)) {
delayedParseElements.addElement(child);
} else if(namedActions.contains(childName) || (childName != null && structuredActions.containsKey(childName))) {
delayedParseElements.addElement(child);
} else { //invalid model content
if (type == Node.ELEMENT) {
throw new XFormParseException("Unrecognized top-level tag [" + childName + "] found within <model>",child);
} else if (type == Node.TEXT && getXMLText(e, i, true).length() != 0) {
throw new XFormParseException("Unrecognized text content found within <model>: \"" + getXMLText(e, i, true) + "\"",child == null ? e : child);
}
}
if(child == null || BIND_ATTR.equals(childName) || "itext".equals(childName)) {
//Clayton Sims - Jun 17, 2009 - This code is used when the stinginess flag
//is set for the build. It dynamically wipes out old model nodes once they're
//used. This is sketchy if anything else plans on touching the nodes.
//This code can be removed once we're pull-parsing
//#if org.javarosa.xform.stingy
e.removeChild(i);
--i;
//#endif
}
}
//Now parse out the submission/action blocks (we needed the binds to all be set before we could)
for(Element child : delayedParseElements) {
String name = child.getName();
if(name.equals("submission")) {
parseSubmission(child);
} else {
//For now, anything that isn't a submission is an action
if(namedActions.contains(name)) {
parseNamedAction(child);
} else {
structuredActions.get(name).handle(this, child, _f);
}
}
}
}
private void parseNamedAction(Element action) {
//TODO: Anything useful
}
private void parseSetValueAction(FormDef form, Element e) {
String ref = e.getAttributeValue(null, REF_ATTR);
String bind = e.getAttributeValue(null, BIND_ATTR);
String event = e.getAttributeValue(null, "event");
IDataReference dataRef = null;
boolean refFromBind = false;
//TODO: There is a _lot_ of duplication of this code, fix that!
if (bind != null) {
DataBinding binding = bindingsByID.get(bind);
if (binding == null) {
throw new XFormParseException("XForm Parse: invalid binding ID in submit'" + bind + "'", e);
}
dataRef = binding.getReference();
refFromBind = true;
} else if (ref != null) {
dataRef = new XPathReference(ref);
} else {
throw new XFormParseException("setvalue action with no target!", e);
}
if (dataRef != null) {
if (!refFromBind) {
dataRef = getAbsRef(dataRef, TreeReference.rootRef());
}
}
String valueRef = e.getAttributeValue(null, "value");
Action action;
TreeReference treeref = FormInstance.unpackReference(dataRef);
actionTargets.addElement(treeref);
if(valueRef == null) {
if(e.getChildCount() == 0 || !e.isText(0)) {
throw new XFormParseException("No 'value' attribute and no inner value set in <setvalue> associated with: " + treeref, e);
}
//Set expression
action = new SetValueAction(treeref, e.getText(0));
} else {
try {
action = new SetValueAction(treeref, XPathParseTool.parseXPath(valueRef));
} catch (XPathSyntaxException e1) {
e1.printStackTrace();
throw new XFormParseException("Invalid XPath in value set action declaration: '" + valueRef + "'", e);
}
}
form.registerEventListener(event, action);
}
private void parseSubmission(Element submission) {
String id = submission.getAttributeValue(null, ID_ATTR);
//These two are always required
String method = submission.getAttributeValue(null, "method");
String action = submission.getAttributeValue(null, "action");
SubmissionParser parser = new SubmissionParser();
for(SubmissionParser p : submissionParsers) {
if(p.matchesCustomMethod(method)) {
parser = p;
}
}
//These two might exist, but if neither do, we just assume you want the entire instance.
String ref = submission.getAttributeValue(null, REF_ATTR);
String bind = submission.getAttributeValue(null, BIND_ATTR);
IDataReference dataRef = null;
boolean refFromBind = false;
if (bind != null) {
DataBinding binding = bindingsByID.get(bind);
if (binding == null) {
throw new XFormParseException("XForm Parse: invalid binding ID in submit'" + bind + "'", submission);
}
dataRef = binding.getReference();
refFromBind = true;
} else if (ref != null) {
dataRef = new XPathReference(ref);
} else {
//no reference! No big deal, assume we want the root reference
dataRef = new XPathReference("/");
}
if (dataRef != null) {
if (!refFromBind) {
dataRef = getAbsRef(dataRef, TreeReference.rootRef());
}
}
SubmissionProfile profile = parser.parseSubmission(method, action, dataRef, submission );
if(id == null) {
//default submission profile
_f.setDefaultSubmission(profile);
} else {
//typed submission profile
_f.addSubmissionProfile(id, profile);
}
}
private void saveInstanceNode (Element instance) {
Element instanceNode = null;
String instanceId = instance.getAttributeValue("", "id");
for (int i = 0; i < instance.getChildCount(); i++) {
if (instance.getType(i) == Node.ELEMENT) {
if (instanceNode != null) {
throw new XFormParseException("XForm Parse: <instance> has more than one child element", instance);
} else {
instanceNode = instance.getElement(i);
}
}
}
if(instanceNode == null) {
//no kids
instanceNode = instance;
}
if (mainInstanceNode == null) {
mainInstanceNode = instanceNode;
}
instanceNodes.addElement(instanceNode);
instanceNodeIdStrs.addElement(instanceId);
}
protected QuestionDef parseUpload(IFormElement parent, Element e, int controlUpload) {
Vector usedAtts = new Vector();
QuestionDef question = parseControl(parent, e, controlUpload);
String mediaType = e.getAttributeValue(null, "mediatype");
if ("image/*".equals(mediaType)) {
// NOTE: this could be further expanded.
question.setControlType(Constants.CONTROL_IMAGE_CHOOSE);
} else if("audio/*".equals(mediaType)) {
question.setControlType(Constants.CONTROL_AUDIO_CAPTURE);
} else if ("video/*".equals(mediaType)) {
question.setControlType(Constants.CONTROL_VIDEO_CAPTURE);
}
usedAtts.addElement("mediatype");
if(XFormUtils.showUnusedAttributeWarning(e, usedAtts)){
reporter.warning(XFormParserReporter.TYPE_UNKNOWN_MARKUP, XFormUtils.unusedAttWarning(e, usedAtts), getVagueLocation(e));
}
return question;
}
protected QuestionDef parseControl (IFormElement parent, Element e, int controlType) {
QuestionDef question = new QuestionDef();
question.setID(serialQuestionID++); //until we come up with a better scheme
Vector usedAtts = new Vector();
usedAtts.addElement(REF_ATTR);
usedAtts.addElement(BIND_ATTR);
usedAtts.addElement(APPEARANCE_ATTR);
IDataReference dataRef = null;
boolean refFromBind = false;
String ref = e.getAttributeValue(null, REF_ATTR);
String bind = e.getAttributeValue(null, BIND_ATTR);
if (bind != null) {
DataBinding binding = bindingsByID.get(bind);
if (binding == null) {
throw new XFormParseException("XForm Parse: invalid binding ID '" + bind + "'", e);
}
dataRef = binding.getReference();
refFromBind = true;
} else if (ref != null) {
try {
dataRef = new XPathReference(ref);
} catch(RuntimeException el) {
System.out.println(this.getVagueLocation(e));
throw el;
}
} else {
if (controlType == Constants.CONTROL_TRIGGER) {
//TODO: special handling for triggers? also, not all triggers created equal
} else {
throw new XFormParseException("XForm Parse: input control with neither 'ref' nor 'bind'",e);
}
}
if (dataRef != null) {
if (!refFromBind) {
dataRef = getAbsRef(dataRef, parent);
}
question.setBind(dataRef);
if (controlType == Constants.CONTROL_SELECT_ONE) {
selectOnes.addElement((TreeReference)dataRef.getReference());
} else if (controlType == Constants.CONTROL_SELECT_MULTI) {
selectMultis.addElement((TreeReference)dataRef.getReference());
}
}
boolean isSelect = (controlType == Constants.CONTROL_SELECT_MULTI || controlType == Constants.CONTROL_SELECT_ONE);
question.setControlType(controlType);
question.setAppearanceAttr(e.getAttributeValue(null, APPEARANCE_ATTR));
for (int i = 0; i < e.getChildCount(); i++) {
int type = e.getType(i);
Element child = (type == Node.ELEMENT ? e.getElement(i) : null);
String childName = (child != null ? child.getName() : null);
if (LABEL_ELEMENT.equals(childName)) {
parseQuestionLabel(question, child);
} else if ("hint".equals(childName)) {
parseHint(question, child);
} else if (isSelect && "item".equals(childName)) {
parseItem(question, child);
} else if (isSelect && "itemset".equals(childName)) {
parseItemset(question, child, parent);
}
}
if (isSelect) {
if (question.getNumChoices() > 0 && question.getDynamicChoices() != null) {
throw new XFormParseException("Select question contains both literal choices and <itemset>");
} else if (question.getNumChoices() == 0 && question.getDynamicChoices() == null) {
throw new XFormParseException("Select question has no choices");
}
}
parent.addChild(question);
if(XFormUtils.showUnusedAttributeWarning(e, usedAtts)){
reporter.warning(XFormParserReporter.TYPE_UNKNOWN_MARKUP, XFormUtils.unusedAttWarning(e, usedAtts), getVagueLocation(e));
}
return question;
}
private void parseQuestionLabel (QuestionDef q, Element e) {
String label = getLabel(e);
String ref = e.getAttributeValue("", REF_ATTR);
Vector usedAtts = new Vector();
usedAtts.addElement(REF_ATTR);
if (ref != null) {
if (ref.startsWith(ITEXT_OPEN) && ref.endsWith(ITEXT_CLOSE)) {
String textRef = ref.substring(ITEXT_OPEN.length(), ref.indexOf(ITEXT_CLOSE));
verifyTextMappings(textRef, "Question <label>", true);
q.setTextID(textRef);
} else {
throw new RuntimeException("malformed ref [" + ref + "] for <label>");
}
} else {
q.setLabelInnerText(label);
}
if(XFormUtils.showUnusedAttributeWarning(e, usedAtts)){
reporter.warning(XFormParserReporter.TYPE_UNKNOWN_MARKUP, XFormUtils.unusedAttWarning(e, usedAtts), getVagueLocation(e));
}
}
private void parseGroupLabel (GroupDef g, Element e) {
if (g.getRepeat())
return; //ignore child <label>s for <repeat>; the appropriate <label> must be in the wrapping <group>
Vector usedAtts = new Vector();
usedAtts.addElement(REF_ATTR);
String label = getLabel(e);
String ref = e.getAttributeValue("", REF_ATTR);
if (ref != null) {
if (ref.startsWith(ITEXT_OPEN) && ref.endsWith(ITEXT_CLOSE)) {
String textRef = ref.substring(ITEXT_OPEN.length(), ref.indexOf(ITEXT_CLOSE));
verifyTextMappings(textRef, "Group <label>", true);
g.setTextID(textRef);
} else {
throw new RuntimeException("malformed ref [" + ref + "] for <label>");
}
} else {
g.setLabelInnerText(label);
}
if(XFormUtils.showUnusedAttributeWarning(e, usedAtts)){
reporter.warning(XFormParserReporter.TYPE_UNKNOWN_MARKUP, XFormUtils.unusedAttWarning(e, usedAtts), getVagueLocation(e));
}
}
private String getLabel (Element e){
if(e.getChildCount() == 0) return null;
recurseForOutput(e);
StringBuffer sb = new StringBuffer();
for(int i = 0; i<e.getChildCount();i++){
if(e.getType(i)!=Node.TEXT && !(e.getChild(i) instanceof String)){
Object b = e.getChild(i);
Element child = (Element)b;
//If the child is in the HTML namespace, retain it.
if(NAMESPACE_HTML.equals(child.getNamespace())) {
sb.append(XFormSerializer.elementToString(child));
} else {
//Otherwise, ignore it.
System.out.println("Unrecognized tag inside of text: <" + child.getName() + ">. " +
"Did you intend to use HTML markup? If so, ensure that the element is defined in " +
"the HTML namespace.");
}
}else{
sb.append(e.getText(i));
}
}
String s = sb.toString().trim();
return s;
}
private void recurseForOutput(Element e){
if(e.getChildCount() == 0) return;
for(int i=0;i<e.getChildCount();i++){
int kidType = e.getType(i);
if(kidType == Node.TEXT) { continue; }
if(e.getChild(i) instanceof String) { continue; }
Element kid = (Element)e.getChild(i);
//is just text
if(kidType == Node.ELEMENT && XFormUtils.isOutput(kid)){
String s = "${"+parseOutput(kid)+"}";
e.removeChild(i);
e.addChild(i, Node.TEXT, s);
//has kids? Recurse through them and swap output tag for parsed version
}else if(kid.getChildCount() !=0){
recurseForOutput(kid);
//is something else
}else{
continue;
}
}
}
private String parseOutput (Element e) {
Vector<String> usedAtts = new Vector<String>();
usedAtts.addElement(REF_ATTR);
usedAtts.addElement(VALUE);
String xpath = e.getAttributeValue(null, REF_ATTR);
if (xpath == null) {
xpath = e.getAttributeValue(null, VALUE);
}
if (xpath == null) {
throw new XFormParseException("XForm Parse: <output> without 'ref' or 'value'",e);
}
XPathConditional expr = null;
try {
expr = new XPathConditional(xpath);
} catch (XPathSyntaxException xse) {
reporter.error("Invalid XPath expression in <output> [" + xpath + "]! " + xse.getMessage());
return "";
}
int index = -1;
if (_f.getOutputFragments().contains(expr)) {
index = _f.getOutputFragments().indexOf(expr);
} else {
index = _f.getOutputFragments().size();
_f.getOutputFragments().addElement(expr);
}
if(XFormUtils.showUnusedAttributeWarning(e, usedAtts)){
reporter.warning(XFormParserReporter.TYPE_UNKNOWN_MARKUP, XFormUtils.unusedAttWarning(e, usedAtts), getVagueLocation(e));
}
return String.valueOf(index);
}
private void parseHint (QuestionDef q, Element e) {
Vector usedAtts = new Vector();
usedAtts.addElement(REF_ATTR);
String hint = getXMLText(e, true);
String hintInnerText = getLabel(e);
String ref = e.getAttributeValue("", REF_ATTR);
if (ref != null) {
if (ref.startsWith(ITEXT_OPEN) && ref.endsWith(ITEXT_CLOSE)) {
String textRef = ref.substring(ITEXT_OPEN.length(), ref.indexOf(ITEXT_CLOSE));
verifyTextMappings(textRef, "<hint>", false);
q.setHelpTextID(textRef);
} else {
throw new RuntimeException("malformed ref [" + ref + "] for <hint>");
}
} else {
q.setHelpInnerText(hintInnerText);
q.setHelpText(hint);
}
if(XFormUtils.showUnusedAttributeWarning(e, usedAtts)){
reporter.warning(XFormParserReporter.TYPE_UNKNOWN_MARKUP, XFormUtils.unusedAttWarning(e, usedAtts), getVagueLocation(e));
}
}
private void parseItem (QuestionDef q, Element e) {
final int MAX_VALUE_LEN = 32;
//catalogue of used attributes in this method/element
Vector usedAtts = new Vector();
Vector labelUA = new Vector();
Vector valueUA = new Vector();
labelUA.addElement(REF_ATTR);
valueUA.addElement(FORM_ATTR);
String labelInnerText = null;
String textRef = null;
String value = null;
for (int i = 0; i < e.getChildCount(); i++) {
int type = e.getType(i);
Element child = (type == Node.ELEMENT ? e.getElement(i) : null);
String childName = (child != null ? child.getName() : null);
if (LABEL_ELEMENT.equals(childName)) {
//print attribute warning for child element
if(XFormUtils.showUnusedAttributeWarning(child, labelUA)){
reporter.warning(XFormParserReporter.TYPE_UNKNOWN_MARKUP, XFormUtils.unusedAttWarning(child, labelUA), getVagueLocation(child));
}
labelInnerText = getLabel(child);
String ref = child.getAttributeValue("", REF_ATTR);
if (ref != null) {
if (ref.startsWith(ITEXT_OPEN) && ref.endsWith(ITEXT_CLOSE)) {
textRef = ref.substring(ITEXT_OPEN.length(), ref.indexOf(ITEXT_CLOSE));
verifyTextMappings(textRef, "Item <label>", true);
} else {
throw new XFormParseException("malformed ref [" + ref + "] for <item>",child);
}
}
} else if (VALUE.equals(childName)) {
value = getXMLText(child, true);
//print attribute warning for child element
if(XFormUtils.showUnusedAttributeWarning(child, valueUA)){
reporter.warning(XFormParserReporter.TYPE_UNKNOWN_MARKUP, XFormUtils.unusedAttWarning(child, valueUA), getVagueLocation(child));
}
if (value != null) {
if (value.length() > MAX_VALUE_LEN) {
reporter.warning(XFormParserReporter.TYPE_ERROR_PRONE,
"choice value [" + value + "] is too long; max. suggested length " + MAX_VALUE_LEN + " chars",
getVagueLocation(child));
}
//validate
for (int k = 0; k < value.length(); k++) {
char c = value.charAt(k);
if (" \n\t\f\r\'\"`".indexOf(c) >= 0) {
boolean isMultiSelect = (q.getControlType() == Constants.CONTROL_SELECT_MULTI);
reporter.warning(XFormParserReporter.TYPE_ERROR_PRONE,
(isMultiSelect ? SELECT : SELECTONE) + " question <value>s [" + value + "] " +
(isMultiSelect ? "cannot" : "should not") + " contain spaces, and are recommended not to contain apostraphes/quotation marks",
getVagueLocation(child));
break;
}
}
}
}
}
if (textRef == null && labelInnerText == null) {
throw new XFormParseException("<item> without proper <label>",e);
}
if (value == null) {
throw new XFormParseException("<item> without proper <value>",e);
}
if (textRef != null) {
q.addSelectChoice(new SelectChoice(textRef, value));
} else {
q.addSelectChoice(new SelectChoice(null,labelInnerText, value, false));
}
//print unused attribute warning message for parent element
if(XFormUtils.showUnusedAttributeWarning(e, usedAtts)){
reporter.warning(XFormParserReporter.TYPE_UNKNOWN_MARKUP,XFormUtils.unusedAttWarning(e, usedAtts), getVagueLocation(e));
}
}
private void parseItemset (QuestionDef q, Element e, IFormElement qparent) {
ItemsetBinding itemset = new ItemsetBinding();
////////////////USED FOR PARSER WARNING OUTPUT ONLY
//catalogue of used attributes in this method/element
Vector usedAtts = new Vector();
Vector labelUA = new Vector(); //for child with name 'label'
Vector valueUA = new Vector(); //for child with name 'value'
Vector copyUA = new Vector(); //for child with name 'copy'
usedAtts.addElement(NODESET_ATTR);
labelUA.addElement(REF_ATTR);
valueUA.addElement(REF_ATTR);
valueUA.addElement(FORM_ATTR);
copyUA.addElement(REF_ATTR);
////////////////////////////////////////////////////
String nodesetStr = e.getAttributeValue("", NODESET_ATTR);
if(nodesetStr == null ) throw new RuntimeException("No nodeset attribute in element: ["+e.getName()+"]. This is required. (Element Printout:"+XFormSerializer.elementToString(e)+")");
XPathPathExpr path = XPathReference.getPathExpr(nodesetStr);
itemset.nodesetExpr = new XPathConditional(path);
itemset.contextRef = getFormElementRef(qparent);
itemset.nodesetRef = FormInstance.unpackReference(getAbsRef(new XPathReference(path.getReference(true)), itemset.contextRef));
for (int i = 0; i < e.getChildCount(); i++) {
int type = e.getType(i);
Element child = (type == Node.ELEMENT ? e.getElement(i) : null);
String childName = (child != null ? child.getName() : null);
if (LABEL_ELEMENT.equals(childName)) {
String labelXpath = child.getAttributeValue("", REF_ATTR);
boolean labelItext = false;
//print unused attribute warning message for child element
if(XFormUtils.showUnusedAttributeWarning(child, labelUA)){
reporter.warning(XFormParserReporter.TYPE_UNKNOWN_MARKUP, XFormUtils.unusedAttWarning(child, labelUA), getVagueLocation(child));
}
/////////////////////////////////////////////////////////////
if (labelXpath != null) {
if (labelXpath.startsWith("jr:itext(") && labelXpath.endsWith(")")) {
labelXpath = labelXpath.substring("jr:itext(".length(), labelXpath.indexOf(")"));
labelItext = true;
}
} else {
throw new XFormParseException("<label> in <itemset> requires 'ref'");
}
XPathPathExpr labelPath = XPathReference.getPathExpr(labelXpath);
itemset.labelRef = FormInstance.unpackReference(getAbsRef(new XPathReference(labelPath), itemset.nodesetRef));
itemset.labelExpr = new XPathConditional(labelPath);
itemset.labelIsItext = labelItext;
} else if ("copy".equals(childName)) {
String copyRef = child.getAttributeValue("", REF_ATTR);
//print unused attribute warning message for child element
if(XFormUtils.showUnusedAttributeWarning(child, copyUA)){
reporter.warning(XFormParserReporter.TYPE_UNKNOWN_MARKUP, XFormUtils.unusedAttWarning(child, copyUA), getVagueLocation(child));
}
if (copyRef == null) {
throw new XFormParseException("<copy> in <itemset> requires 'ref'");
}
itemset.copyRef = FormInstance.unpackReference(getAbsRef(new XPathReference(copyRef), itemset.nodesetRef));
itemset.copyMode = true;
} else if (VALUE.equals(childName)) {
String valueXpath = child.getAttributeValue("", REF_ATTR);
//print unused attribute warning message for child element
if(XFormUtils.showUnusedAttributeWarning(child, valueUA)){
reporter.warning(XFormParserReporter.TYPE_UNKNOWN_MARKUP, XFormUtils.unusedAttWarning(child, valueUA), getVagueLocation(child));
}
if (valueXpath == null) {
throw new XFormParseException("<value> in <itemset> requires 'ref'");
}
XPathPathExpr valuePath = XPathReference.getPathExpr(valueXpath);
itemset.valueRef = FormInstance.unpackReference(getAbsRef(new XPathReference(valuePath), itemset.nodesetRef));
itemset.valueExpr = new XPathConditional(valuePath);
itemset.copyMode = false;
}
}
if (itemset.labelRef == null) {
throw new XFormParseException("<itemset> requires <label>");
} else if (itemset.copyRef == null && itemset.valueRef == null) {
throw new XFormParseException("<itemset> requires <copy> or <value>");
}
if (itemset.copyRef != null) {
if (itemset.valueRef == null) {
reporter.warning(XFormParserReporter.TYPE_TECHNICAL, "<itemset>s with <copy> are STRONGLY recommended to have <value> as well; pre-selecting, default answers, and display of answers will not work properly otherwise",getVagueLocation(e));
} else if (!itemset.copyRef.isParentOf(itemset.valueRef, false)) {
throw new XFormParseException("<value> is outside <copy>");
}
}
q.setDynamicChoices(itemset);
itemsets.addElement(itemset);
//print unused attribute warning message for parent element
if(XFormUtils.showUnusedAttributeWarning(e, usedAtts)){
reporter.warning(XFormParserReporter.TYPE_UNKNOWN_MARKUP,XFormUtils.unusedAttWarning(e, usedAtts), getVagueLocation(e));
}
}
private void parseGroup (IFormElement parent, Element e, int groupType) {
GroupDef group = new GroupDef();
group.setID(serialQuestionID++); //until we come up with a better scheme
IDataReference dataRef = null;
boolean refFromBind = false;
Vector usedAtts = new Vector();
usedAtts.addElement(REF_ATTR);
usedAtts.addElement(NODESET_ATTR);
usedAtts.addElement(BIND_ATTR);
usedAtts.addElement(APPEARANCE_ATTR);
usedAtts.addElement("count");
usedAtts.addElement("noAddRemove");
if (groupType == CONTAINER_REPEAT) {
group.setRepeat(true);
}
String ref = e.getAttributeValue(null, REF_ATTR);
String nodeset = e.getAttributeValue(null, NODESET_ATTR);
String bind = e.getAttributeValue(null, BIND_ATTR);
group.setAppearanceAttr(e.getAttributeValue(null, APPEARANCE_ATTR));
if (bind != null) {
DataBinding binding = bindingsByID.get(bind);
if (binding == null) {
throw new XFormParseException("XForm Parse: invalid binding ID [" + bind + "]",e);
}
dataRef = binding.getReference();
refFromBind = true;
} else {
if (group.getRepeat()) {
if (nodeset != null) {
dataRef = new XPathReference(nodeset);
} else {
throw new XFormParseException("XForm Parse: <repeat> with no binding ('bind' or 'nodeset')",e);
}
} else {
if (ref != null) {
dataRef = new XPathReference(ref);
} //<group> not required to have a binding
}
}
if (!refFromBind) {
dataRef = getAbsRef(dataRef, parent);
}
group.setBind(dataRef);
if (group.getRepeat()) {
repeats.addElement((TreeReference)dataRef.getReference());
String countRef = e.getAttributeValue(NAMESPACE_JAVAROSA, "count");
if (countRef != null) {
group.count = getAbsRef(new XPathReference(countRef), parent);
group.noAddRemove = true;
} else {
group.noAddRemove = (e.getAttributeValue(NAMESPACE_JAVAROSA, "noAddRemove") != null);
}
}
for (int i = 0; i < e.getChildCount(); i++) {
int type = e.getType(i);
Element child = (type == Node.ELEMENT ? e.getElement(i) : null);
String childName = (child != null ? child.getName() : null);
String childNamespace = (child != null ? child.getNamespace() : null);
if (group.getRepeat() && NAMESPACE_JAVAROSA.equals(childNamespace)) {
if ("chooseCaption".equals(childName)) {
group.chooseCaption = getLabel(child);
} else if ("addCaption".equals(childName)) {
group.addCaption = getLabel(child);
} else if ("delCaption".equals(childName)) {
group.delCaption = getLabel(child);
} else if ("doneCaption".equals(childName)) {
group.doneCaption = getLabel(child);
} else if ("addEmptyCaption".equals(childName)) {
group.addEmptyCaption = getLabel(child);
} else if ("doneEmptyCaption".equals(childName)) {
group.doneEmptyCaption = getLabel(child);
} else if ("entryHeader".equals(childName)) {
group.entryHeader = getLabel(child);
} else if ("delHeader".equals(childName)) {
group.delHeader = getLabel(child);
} else if ("mainHeader".equals(childName)) {
group.mainHeader = getLabel(child);
}
}
}
//the case of a group wrapping a repeat is cleaned up in a post-processing step (collapseRepeatGroups)
for (int i = 0; i < e.getChildCount(); i++) {
if (e.getType(i) == Element.ELEMENT) {
parseElement(e.getElement(i), group, groupLevelHandlers);
}
}
//print unused attribute warning message for parent element
if(XFormUtils.showUnusedAttributeWarning(e, usedAtts)){
reporter.warning(XFormParserReporter.TYPE_UNKNOWN_MARKUP, XFormUtils.unusedAttWarning(e, usedAtts), getVagueLocation(e));
}
parent.addChild(group);
}
private TreeReference getFormElementRef (IFormElement fe) {
if (fe instanceof FormDef) {
TreeReference ref = TreeReference.rootRef();
ref.add(mainInstanceNode.getName(), 0);
return ref;
} else {
return (TreeReference)fe.getBind().getReference();
}
}
private IDataReference getAbsRef (IDataReference ref, IFormElement parent) {
return getAbsRef(ref, getFormElementRef(parent));
}
//take a (possibly relative) reference, and make it absolute based on its parent
private static IDataReference getAbsRef (IDataReference ref, TreeReference parentRef) {
TreeReference tref;
if (!parentRef.isAbsolute()) {
throw new RuntimeException("XFormParser.getAbsRef: parentRef must be absolute");
}
if (ref != null) {
tref = (TreeReference)ref.getReference();
} else {
tref = TreeReference.selfRef(); //only happens for <group>s with no binding
}
tref = tref.parent(parentRef);
if (tref == null) {
throw new XFormParseException("Binding path [" + tref + "] not allowed with parent binding of [" + parentRef + "]");
}
return new XPathReference(tref);
}
//collapse groups whose only child is a repeat into a single repeat that uses the label of the wrapping group
private static void collapseRepeatGroups (IFormElement fe) {
if (fe.getChildren() == null)
return;
for (int i = 0; i < fe.getChildren().size(); i++) {
IFormElement child = fe.getChild(i);
GroupDef group = null;
if (child instanceof GroupDef)
group = (GroupDef)child;
if (group != null) {
if (!group.getRepeat() && group.getChildren().size() == 1) {
IFormElement grandchild = (IFormElement)group.getChildren().elementAt(0);
GroupDef repeat = null;
if (grandchild instanceof GroupDef)
repeat = (GroupDef)grandchild;
if (repeat != null && repeat.getRepeat()) {
//collapse the wrapping group
//merge group into repeat
//id - later
//name - later
repeat.setLabelInnerText(group.getLabelInnerText());
repeat.setTextID(group.getTextID());
// repeat.setLongText(group.getLongText());
// repeat.setShortText(group.getShortText());
// repeat.setLongTextID(group.getLongTextID(), null);
// repeat.setShortTextID(group.getShortTextID(), null);
//don't merge binding; repeat will always already have one
//replace group with repeat
fe.getChildren().setElementAt(repeat, i);
group = repeat;
}
}
collapseRepeatGroups(group);
}
}
}
private void parseIText (Element itext) {
Localizer l = new Localizer(true, true);
_f.setLocalizer(l);
l.registerLocalizable(_f);
Vector usedAtts = new Vector(); //used for warning message
for (int i = 0; i < itext.getChildCount(); i++) {
Element trans = itext.getElement(i);
if (trans == null || !trans.getName().equals("translation"))
continue;
parseTranslation(l, trans);
}
if (l.getAvailableLocales().length == 0)
throw new XFormParseException("no <translation>s defined",itext);
if (l.getDefaultLocale() == null)
l.setDefaultLocale(l.getAvailableLocales()[0]);
//print unused attribute warning message for parent element
if(XFormUtils.showUnusedAttributeWarning(itext, usedAtts)){
reporter.warning(XFormParserReporter.TYPE_UNKNOWN_MARKUP, XFormUtils.unusedAttWarning(itext, usedAtts), getVagueLocation(itext));
}
}
private void parseTranslation (Localizer l, Element trans) {
/////for warning message
Vector usedAtts = new Vector();
usedAtts.addElement("lang");
usedAtts.addElement("default");
/////////////////////////
String lang = trans.getAttributeValue("", "lang");
if (lang == null || lang.length() == 0) {
throw new XFormParseException("no language specified for <translation>",trans);
}
String isDefault = trans.getAttributeValue("", "default");
if (!l.addAvailableLocale(lang)) {
throw new XFormParseException("duplicate <translation> for language '" + lang + "'",trans);
}
if (isDefault != null) {
if (l.getDefaultLocale() != null)
throw new XFormParseException("more than one <translation> set as default",trans);
l.setDefaultLocale(lang);
}
TableLocaleSource source = new TableLocaleSource();
//source.startEditing();
for (int j = 0; j < trans.getChildCount(); j++) {
Element text = trans.getElement(j);
if (text == null || !text.getName().equals("text")) {
continue;
}
parseTextHandle(source, text);
//Clayton Sims - Jun 17, 2009 - This code is used when the stinginess flag
//is set for the build. It dynamically wipes out old model nodes once they're
//used. This is sketchy if anything else plans on touching the nodes.
//This code can be removed once we're pull-parsing
//#if org.javarosa.xform.stingy
trans.removeChild(j);
--j;
//#endif
}
//print unused attribute warning message for parent element
if(XFormUtils.showUnusedAttributeWarning(trans, usedAtts)){
reporter.warning(XFormParserReporter.TYPE_UNKNOWN_MARKUP, XFormUtils.unusedAttWarning(trans, usedAtts), getVagueLocation(trans));
}
//source.stopEditing();
l.registerLocaleResource(lang, source);
}
private void parseTextHandle (TableLocaleSource l, Element text) {
String id = text.getAttributeValue("", ID_ATTR);
//used for parser warnings...
Vector usedAtts = new Vector();
Vector childUsedAtts = new Vector();
usedAtts.addElement(ID_ATTR);
usedAtts.addElement(FORM_ATTR);
childUsedAtts.addElement(FORM_ATTR);
childUsedAtts.addElement(ID_ATTR);
//////////
if (id == null || id.length() == 0) {
throw new XFormParseException("no id defined for <text>",text);
}
for (int k = 0; k < text.getChildCount(); k++) {
Element value = text.getElement(k);
if (value == null) continue;
if(!value.getName().equals(VALUE)){
throw new XFormParseException("Unrecognized element ["+value.getName()+"] in Itext->translation->text");
}
String form = value.getAttributeValue("", FORM_ATTR);
if (form != null && form.length() == 0) {
form = null;
}
String data = getLabel(value);
if (data == null) {
data = "";
}
String textID = (form == null ? id : id + ";" + form); //kind of a hack
if (l.hasMapping(textID)) {
throw new XFormParseException("duplicate definition for text ID \"" + id + "\" and form \"" + form + "\""+". Can only have one definition for each text form.",text);
}
l.setLocaleMapping(textID, data);
//print unused attribute warning message for child element
if(XFormUtils.showUnusedAttributeWarning(value, childUsedAtts)){
reporter.warning(XFormParserReporter.TYPE_UNKNOWN_MARKUP, XFormUtils.unusedAttWarning(value, childUsedAtts), getVagueLocation(value));
}
}
//print unused attribute warning message for parent element
if(XFormUtils.showUnusedAttributeWarning(text, usedAtts)){
reporter.warning(XFormParserReporter.TYPE_UNKNOWN_MARKUP, XFormUtils.unusedAttWarning(text, usedAtts), getVagueLocation(text));
}
}
private boolean hasITextMapping (String textID, String locale) {
Localizer l = _f.getLocalizer();
return l.hasMapping(locale == null ? l.getDefaultLocale() : locale, textID);
}
private void verifyTextMappings (String textID, String type, boolean allowSubforms) {
Localizer l = _f.getLocalizer();
String[] locales = l.getAvailableLocales();
for (int i = 0; i < locales.length; i++) {
//Test whether there is a default translation, or whether there is any special form available.
if (!(hasITextMapping(textID, locales[i]) ||
(allowSubforms && hasSpecialFormMapping(textID, locales[i])))) {
if (locales[i].equals(l.getDefaultLocale())) {
throw new XFormParseException(type + " '" + textID + "': text is not localizable for default locale [" + l.getDefaultLocale() + "]!");
} else {
reporter.warning(XFormParserReporter.TYPE_TECHNICAL, type + " '" + textID + "': text is not localizable for locale " + locales[i] + ".", null);
}
}
}
}
/**
* Tests whether or not there is any form (default or special) for the provided
* text id.
*
* @return True if a translation is present for the given textID in the form. False otherwise
*/
private boolean hasSpecialFormMapping(String textID, String locale) {
//First check our guesses
for(String guess : itextKnownForms) {
if(hasITextMapping(textID + ";" + guess, locale)) {
return true;
}
}
//Otherwise this sucks and we have to test the keys
OrderedHashtable table = _f.getLocalizer().getLocaleData(locale);
for(Enumeration keys = table.keys() ; keys.hasMoreElements() ;) {
String key = (String)keys.nextElement();
if(key.startsWith(textID + ";")) {
//A key is found, pull it out, add it to the list of guesses, and return positive
String textForm = key.substring(key.indexOf(";") + 1, key.length());
//Kind of a long story how we can end up getting here. It involves the default locale loading values
//for the other locale, but isn't super good.
//TODO: Clean up being able to get here
if(!itextKnownForms.contains(textForm)) {
System.out.println("adding unexpected special itext form: " + textForm + " to list of expected forms");
itextKnownForms.addElement(textForm);
}
return true;
}
}
return false;
}
protected DataBinding processStandardBindAttributes( Vector usedAtts, Element e) {
usedAtts.addElement(ID_ATTR);
usedAtts.addElement(NODESET_ATTR);
usedAtts.addElement("type");
usedAtts.addElement("relevant");
usedAtts.addElement("required");
usedAtts.addElement("readonly");
usedAtts.addElement("constraint");
usedAtts.addElement("constraintMsg");
usedAtts.addElement("calculate");
usedAtts.addElement("preload");
usedAtts.addElement("preloadParams");
DataBinding binding = new DataBinding();
binding.setId(e.getAttributeValue("", ID_ATTR));
String nodeset = e.getAttributeValue(null, NODESET_ATTR);
if (nodeset == null) {
throw new XFormParseException("XForm Parse: <bind> without nodeset",e);
}
IDataReference ref = new XPathReference(nodeset);
ref = getAbsRef(ref, _f);
binding.setReference(ref);
binding.setDataType(getDataType(e.getAttributeValue(null, "type")));
String xpathRel = e.getAttributeValue(null, "relevant");
if (xpathRel != null) {
if ("true()".equals(xpathRel)) {
binding.relevantAbsolute = true;
} else if ("false()".equals(xpathRel)) {
binding.relevantAbsolute = false;
} else {
Condition c = buildCondition(xpathRel, "relevant", ref);
c = (Condition)_f.addTriggerable(c);
binding.relevancyCondition = c;
}
}
String xpathReq = e.getAttributeValue(null, "required");
if (xpathReq != null) {
if ("true()".equals(xpathReq)) {
binding.requiredAbsolute = true;
} else if ("false()".equals(xpathReq)) {
binding.requiredAbsolute = false;
} else {
Condition c = buildCondition(xpathReq, "required", ref);
c = (Condition)_f.addTriggerable(c);
binding.requiredCondition = c;
}
}
String xpathRO = e.getAttributeValue(null, "readonly");
if (xpathRO != null) {
if ("true()".equals(xpathRO)) {
binding.readonlyAbsolute = true;
} else if ("false()".equals(xpathRO)) {
binding.readonlyAbsolute = false;
} else {
Condition c = buildCondition(xpathRO, "readonly", ref);
c = (Condition)_f.addTriggerable(c);
binding.readonlyCondition = c;
}
}
String xpathConstr = e.getAttributeValue(null, "constraint");
if (xpathConstr != null) {
try {
binding.constraint = new XPathConditional(xpathConstr);
} catch (XPathSyntaxException xse) {
reporter.error("bind for " + nodeset + " contains invalid constraint expression [" + xpathConstr + "] " + xse.getMessage());
}
binding.constraintMessage = e.getAttributeValue(NAMESPACE_JAVAROSA, "constraintMsg");
}
String xpathCalc = e.getAttributeValue(null, "calculate");
if (xpathCalc != null) {
Recalculate r;
try {
r = buildCalculate(xpathCalc, ref);
} catch (XPathSyntaxException xpse) {
throw new XFormParseException("Invalid calculate for the bind attached to \"" + nodeset + "\" : " + xpse.getMessage() + " in expression " + xpathCalc);
}
r = (Recalculate)_f.addTriggerable(r);
binding.calculate = r;
}
binding.setPreload(e.getAttributeValue(NAMESPACE_JAVAROSA, "preload"));
binding.setPreloadParams(e.getAttributeValue(NAMESPACE_JAVAROSA, "preloadParams"));
return binding;
}
protected void parseBind (Element e) {
Vector usedAtts = new Vector();
DataBinding binding = processStandardBindAttributes( usedAtts, e);
//print unused attribute warning message for parent element
if(XFormUtils.showUnusedAttributeWarning(e, usedAtts)){
reporter.warning(XFormParserReporter.TYPE_UNKNOWN_MARKUP, XFormUtils.unusedAttWarning(e, usedAtts), getVagueLocation(e));
}
addBinding(binding);
}
private Condition buildCondition (String xpath, String type, IDataReference contextRef) {
XPathConditional cond;
int trueAction = -1, falseAction = -1;
if ("relevant".equals(type)) {
trueAction = Condition.ACTION_SHOW;
falseAction = Condition.ACTION_HIDE;
} else if ("required".equals(type)) {
trueAction = Condition.ACTION_REQUIRE;
falseAction = Condition.ACTION_DONT_REQUIRE;
} else if ("readonly".equals(type)) {
trueAction = Condition.ACTION_DISABLE;
falseAction = Condition.ACTION_ENABLE;
}
try {
cond = new XPathConditional(xpath);
} catch (XPathSyntaxException xse) {
reporter.error("bind for " + contextRef.getReference().toString() + " contains invalid display condition [" + xpath + "] " + xse.getMessage());
return null;
}
Condition c = new Condition(cond, trueAction, falseAction, FormInstance.unpackReference(contextRef));
return c;
}
private static Recalculate buildCalculate (String xpath, IDataReference contextRef) throws XPathSyntaxException {
XPathConditional calc = new XPathConditional(xpath);
Recalculate r = new Recalculate(calc, FormInstance.unpackReference(contextRef));
return r;
}
protected void addBinding (DataBinding binding) {
bindings.addElement(binding);
if (binding.getId() != null) {
if (bindingsByID.put(binding.getId(), binding) != null) {
throw new XFormParseException("XForm Parse: <bind>s with duplicate ID: '" + binding.getId() + "'");
}
}
}
//e is the top-level _data_ node of the instance (immediate (and only) child of <instance>)
private void addMainInstanceToFormDef(Element e, FormInstance instanceModel) {
//TreeElement root = buildInstanceStructure(e, null);
loadInstanceData(e, instanceModel.getRoot(), _f);
checkDependencyCycles();
_f.setInstance(instanceModel);
try {
_f.finalizeTriggerables();
} catch(IllegalStateException ise) {
throw new XFormParseException(ise.getMessage() == null ? "Form has an illegal cycle in its calculate and relevancy expressions!" : ise.getMessage());
}
//print unused attribute warning message for parent element
//if(XFormUtils.showUnusedAttributeWarning(e, usedAtts)){
// reporter.warning(XFormParserReporter.TYPE_UNKNOWN_MARKUP, XFormUtils.unusedAttWarning(e, usedAtts), getVagueLocation(e));
//}
}
private FormInstance parseInstance (Element e, boolean isMainInstance) {
String name = instanceNodeIdStrs.elementAt(instanceNodes.indexOf(e));
TreeElement root = buildInstanceStructure(e, null, !isMainInstance ? name : null, e.getNamespace());
FormInstance instanceModel = new FormInstance(root, !isMainInstance ? name : null);
if(isMainInstance)
{
instanceModel.setName(_f.getTitle());
}
else
{
instanceModel.setName(name);
}
Vector usedAtts = new Vector();
usedAtts.addElement("version");
usedAtts.addElement("uiVersion");
usedAtts.addElement("name");
String schema = e.getNamespace();
if (schema != null && schema.length() > 0 && !schema.equals(defaultNamespace)) {
instanceModel.schema = schema;
}
instanceModel.formVersion = e.getAttributeValue(null, "version");
instanceModel.uiVersion = e.getAttributeValue(null, "uiVersion");
loadNamespaces(e, instanceModel);
if(isMainInstance)
{
processRepeats(instanceModel);
verifyBindings(instanceModel);
verifyActions(instanceModel);
}
applyInstanceProperties(instanceModel);
//print unused attribute warning message for parent element
if(XFormUtils.showUnusedAttributeWarning(e, usedAtts)){
reporter.warning(XFormParserReporter.TYPE_UNKNOWN_MARKUP, XFormUtils.unusedAttWarning(e, usedAtts), getVagueLocation(e));
}
return instanceModel;
}
private static Hashtable<String, String> loadNamespaces(Element e, FormInstance tree) {
Hashtable<String, String> prefixes = new Hashtable<String, String>();
for(int i = 0 ; i < e.getNamespaceCount(); ++i ) {
String uri = e.getNamespaceUri(i);
String prefix = e.getNamespacePrefix(i);
if(uri != null && prefix != null) {
tree.addNamespace(prefix, uri);
}
}
return prefixes;
}
public static TreeElement buildInstanceStructure (Element node, TreeElement parent) {
return buildInstanceStructure(node, parent, null, node.getNamespace());
}
//parse instance hierarchy and turn into a skeleton model; ignoring data content, but respecting repeated nodes and 'template' flags
public static TreeElement buildInstanceStructure (Element node, TreeElement parent, String instanceName, String docnamespace) {
TreeElement element = null;
//catch when text content is mixed with children
int numChildren = node.getChildCount();
boolean hasText = false;
boolean hasElements = false;
for (int i = 0; i < numChildren; i++) {
switch (node.getType(i)) {
case Node.ELEMENT:
hasElements = true; break;
case Node.TEXT:
if (node.getText(i).trim().length() > 0)
hasText = true;
break;
}
}
if (hasElements && hasText) {
System.out.println("Warning: instance node '" + node.getName() + "' contains both elements and text as children; text ignored");
}
//check for repeat templating
String name = node.getName();
int multiplicity;
if (node.getAttributeValue(NAMESPACE_JAVAROSA, "template") != null) {
multiplicity = TreeReference.INDEX_TEMPLATE;
if (parent != null && parent.getChild(name, TreeReference.INDEX_TEMPLATE) != null) {
throw new XFormParseException("More than one node declared as the template for the same repeated set [" + name + "]",node);
}
} else {
multiplicity = (parent == null ? 0 : parent.getChildMultiplicity(name));
}
String modelType = node.getAttributeValue(NAMESPACE_JAVAROSA, "modeltype");
//create node; handle children
if(modelType == null) {
element = new TreeElement(name, multiplicity);
element.setInstanceName(instanceName);
} else {
if( typeMappings.get(modelType) == null ){
throw new XFormParseException("ModelType " + modelType + " is not recognized.",node);
}
element = (TreeElement)modelPrototypes.getNewInstance(((Integer)typeMappings.get(modelType)).toString());
if(element == null) {
element = new TreeElement(name, multiplicity);
System.out.println("No model type prototype available for " + modelType);
} else {
element.setName(name);
element.setMult(multiplicity);
}
}
if(node.getNamespace() != null) {
if(!node.getNamespace().equals(docnamespace)) {
element.setNamespace(node.getNamespace());
}
}
if (hasElements) {
for (int i = 0; i < numChildren; i++) {
if (node.getType(i) == Node.ELEMENT) {
element.addChild(buildInstanceStructure(node.getElement(i), element, instanceName, docnamespace));
}
}
}
//handle attributes
if (node.getAttributeCount() > 0) {
for (int i = 0; i < node.getAttributeCount(); i++) {
String attrNamespace = node.getAttributeNamespace(i);
String attrName = node.getAttributeName(i);
if (attrNamespace.equals(NAMESPACE_JAVAROSA) && attrName.equals("template")) {
continue;
}
if (attrNamespace.equals(NAMESPACE_JAVAROSA) && attrName.equals("recordset")) {
continue;
}
element.setAttribute(attrNamespace, attrName, node.getAttributeValue(i));
}
}
return element;
}
private Vector<TreeReference> getRepeatableRefs () {
Vector<TreeReference> refs = new Vector<TreeReference>();
for (int i = 0; i < repeats.size(); i++) {
refs.addElement((TreeReference)repeats.elementAt(i));
}
for (int i = 0; i < itemsets.size(); i++) {
ItemsetBinding itemset = (ItemsetBinding)itemsets.elementAt(i);
TreeReference srcRef = itemset.nodesetRef;
if (!refs.contains(srcRef)) {
//CTS: Being an itemset root is not sufficient to mark
//a node as repeatable. It has to be nonstatic (which it
//must be inherently unless there's a wildcard).
boolean nonstatic = true;
for(int j = 0 ; j < srcRef.size(); ++j) {
if(TreeReference.NAME_WILDCARD.equals(srcRef.getName(j))) {
nonstatic = false;
}
}
//CTS: we're also going to go ahead and assume that all external
//instance are static (we can't modify them TODO: This may only be
//the case if the instances are of specific types (non Tree-Element
//style). Revisit if needed.
if(srcRef.getInstanceName() != null) {
nonstatic = false;
}
if(nonstatic) {
refs.addElement(srcRef);
}
}
if (itemset.copyMode) {
TreeReference destRef = itemset.getDestRef();
if (!refs.contains(destRef)) {
refs.addElement(destRef);
}
}
}
return refs;
}
//pre-process and clean up instance regarding repeats; in particular:
// 1) flag all repeat-related nodes as repeatable
// 2) catalog which repeat template nodes are explicitly defined, and note which repeats bindings lack templates
// 3) remove template nodes that are not valid for a repeat binding
// 4) generate template nodes for repeat bindings that do not have one defined explicitly
// (removed) 5) give a stern warning for any repeated instance nodes that do not correspond to a repeat binding
// 6) verify that all sets of repeated nodes are homogeneous
private void processRepeats (FormInstance instance) {
flagRepeatables(instance);
processTemplates(instance);
//2013-05-17 - ctsims - No longer call this, since we don't do the check
//checkDuplicateNodesAreRepeatable(instance.getRoot());
checkHomogeneity(instance);
}
//flag all nodes identified by repeat bindings as repeatable
private void flagRepeatables (FormInstance instance) {
Vector<TreeReference> refs = getRepeatableRefs();
for (int i = 0; i < refs.size(); i++) {
TreeReference ref = refs.elementAt(i);
Vector<TreeReference> nodes = new EvaluationContext(instance).expandReference(ref, true);
for (int j = 0; j < nodes.size(); j++) {
TreeReference nref = nodes.elementAt(j);
TreeElement node = instance.resolveReference(nref);
if (node != null) { // catch '/'
node.setRepeatable(true);
}
}
}
}
private void processTemplates (FormInstance instance) {
repeatTree = buildRepeatTree(getRepeatableRefs(), instance.getRoot().getName());
Vector<TreeReference> missingTemplates = new Vector<TreeReference>();
checkRepeatsForTemplate(instance, repeatTree, missingTemplates);
removeInvalidTemplates(instance, repeatTree);
createMissingTemplates(instance, missingTemplates);
}
//build a pseudo-data model tree that describes the repeat structure of the instance
//result is a FormInstance collapsed where all indexes are 0, and repeatable nodes are flagged as such
//return null if no repeats
//ignores (invalid) repeats that bind outside the top-level instance data node
private static FormInstance buildRepeatTree (Vector<TreeReference> repeatRefs, String topLevelName) {
TreeElement root = new TreeElement(null, 0);
for (int i = 0; i < repeatRefs.size(); i++) {
TreeReference repeatRef = repeatRefs.elementAt(i);
//check and see if this references a repeat from a non-main instance, if so, skip it
if(repeatRef.getInstanceName() != null)
{
continue;
}
if (repeatRef.size() <= 1) {
//invalid repeat: binds too high. ignore for now and error will be raised in verifyBindings
continue;
}
TreeElement cur = root;
for (int j = 0; j < repeatRef.size(); j++) {
String name = repeatRef.getName(j);
TreeElement child = cur.getChild(name, 0);
if (child == null) {
child = new TreeElement(name, 0);
cur.addChild(child);
}
cur = child;
}
cur.setRepeatable(true);
}
if (root.getNumChildren() == 0)
return null;
else
return new FormInstance(root.getChild(topLevelName, TreeReference.DEFAULT_MUTLIPLICITY));
}
//checks which repeat bindings have explicit template nodes; returns a vector of the bindings that do not
private static void checkRepeatsForTemplate (FormInstance instance, FormInstance repeatTree, Vector<TreeReference> missingTemplates) {
if (repeatTree != null)
checkRepeatsForTemplate(repeatTree.getRoot(), TreeReference.rootRef(), instance, missingTemplates);
}
//helper function for checkRepeatsForTemplate
private static void checkRepeatsForTemplate (TreeElement repeatTreeNode, TreeReference ref, FormInstance instance, Vector<TreeReference> missing) {
String name = repeatTreeNode.getName();
int mult = (repeatTreeNode.isRepeatable() ? TreeReference.INDEX_TEMPLATE : 0);
ref = ref.extendRef(name, mult);
if (repeatTreeNode.isRepeatable()) {
TreeElement template = instance.resolveReference(ref);
if (template == null) {
missing.addElement(ref);
}
}
for (int i = 0; i < repeatTreeNode.getNumChildren(); i++) {
checkRepeatsForTemplate(repeatTreeNode.getChildAt(i), ref, instance, missing);
}
}
//iterates through instance and removes template nodes that are not valid. a template is invalid if:
// it is declared for a node that is not repeatable
// it is for a repeat that is a child of another repeat and is not located within the parent's template node
private void removeInvalidTemplates (FormInstance instance, FormInstance repeatTree) {
removeInvalidTemplates(instance.getRoot(), (repeatTree == null ? null : repeatTree.getRoot()), true);
}
//helper function for removeInvalidTemplates
private boolean removeInvalidTemplates (TreeElement instanceNode, TreeElement repeatTreeNode, boolean templateAllowed) {
int mult = instanceNode.getMult();
boolean repeatable = (repeatTreeNode == null ? false : repeatTreeNode.isRepeatable());
if (mult == TreeReference.INDEX_TEMPLATE) {
if (!templateAllowed) {
reporter.warning(XFormParserReporter.TYPE_INVALID_STRUCTURE, "Template nodes for sub-repeats must be located within the template node of the parent repeat; ignoring template... [" + instanceNode.getName() + "]", null);
return true;
} else if (!repeatable) {
reporter.warning(XFormParserReporter.TYPE_INVALID_STRUCTURE, "Warning: template node found for ref that is not repeatable; ignoring... [" + instanceNode.getName() + "]", null);
return true;
}
}
if (repeatable && mult != TreeReference.INDEX_TEMPLATE)
templateAllowed = false;
for (int i = 0; i < instanceNode.getNumChildren(); i++) {
TreeElement child = instanceNode.getChildAt(i);
TreeElement rchild = (repeatTreeNode == null ? null : repeatTreeNode.getChild(child.getName(), 0));
if (removeInvalidTemplates(child, rchild, templateAllowed)) {
instanceNode.removeChildAt(i);
i--;
}
}
return false;
}
//if repeatables have no template node, duplicate first as template
private void createMissingTemplates (FormInstance instance, Vector<TreeReference> missingTemplates) {
//it is VERY important that the missing template refs are listed in depth-first or breadth-first order... namely, that
//every ref is listed after a ref that could be its parent. checkRepeatsForTemplate currently behaves this way
for (int i = 0; i < missingTemplates.size(); i++) {
TreeReference templRef = missingTemplates.elementAt(i);
TreeReference firstMatch;
//make template ref generic and choose first matching node
TreeReference ref = templRef.clone();
for (int j = 0; j < ref.size(); j++) {
ref.setMultiplicity(j, TreeReference.INDEX_UNBOUND);
}
Vector<TreeReference> nodes = new EvaluationContext(instance).expandReference(ref);
if (nodes.size() == 0) {
//binding error; not a single node matches the repeat binding; will be reported later
continue;
} else {
firstMatch = nodes.elementAt(0);
}
try {
instance.copyNode(firstMatch, templRef);
} catch (InvalidReferenceException e) {
reporter.warning(XFormParserReporter.TYPE_INVALID_STRUCTURE, "Could not create a default repeat template; this is almost certainly a homogeneity error! Your form will not work! (Failed on " + templRef.toString() + ")", null);
}
trimRepeatChildren(instance.resolveReference(templRef));
}
}
//trim repeatable children of newly created template nodes; we trim because the templates are supposed to be devoid of 'data',
// and # of repeats for a given repeat node is a kind of data. trust me
private static void trimRepeatChildren (TreeElement node) {
for (int i = 0; i < node.getNumChildren(); i++) {
TreeElement child = node.getChildAt(i);
if (child.isRepeatable()) {
node.removeChildAt(i);
i--;
} else {
trimRepeatChildren(child);
}
}
}
private static void checkDuplicateNodesAreRepeatable (TreeElement node) {
int mult = node.getMult();
if (mult > 0) { //repeated node
if (!node.isRepeatable()) {
//2013-05-17 - ctsims - I removed our check here, since we now support this
//much more cleanly.
//In theory, we should possibly make sure there are no _binds_ defined on these
//nodes at the very least, but that can be its own step
}
}
for (int i = 0; i < node.getNumChildren(); i++) {
checkDuplicateNodesAreRepeatable(node.getChildAt(i));
}
}
//check repeat sets for homogeneity
private void checkHomogeneity (FormInstance instance) {
Vector<TreeReference> refs = getRepeatableRefs();
for (int i = 0; i < refs.size(); i++) {
TreeReference ref = refs.elementAt(i);
TreeElement template = null;
Vector<TreeReference> nodes = new EvaluationContext(instance).expandReference(ref);
for (int j = 0; j < nodes.size(); j++) {
TreeReference nref = nodes.elementAt(j);
TreeElement node = instance.resolveReference(nref);
if (node == null) //don't crash on '/'... invalid repeat binding will be caught later
continue;
if (template == null)
template = instance.getTemplate(nref);
if (!FormInstance.isHomogeneous(template, node)) {
reporter.warning(XFormParserReporter.TYPE_INVALID_STRUCTURE, "Not all repeated nodes for a given repeat binding [" + nref.toString() + "] are homogeneous! This will cause serious problems!", null);
}
}
}
}
private void verifyBindings (FormInstance instance) {
//check <bind>s (can't bind to '/', bound nodes actually exist)
for (int i = 0; i < bindings.size(); i++) {
DataBinding bind = bindings.elementAt(i);
TreeReference ref = FormInstance.unpackReference(bind.getReference());
if (ref.size() == 0) {
System.out.println("Cannot bind to '/'; ignoring bind...");
bindings.removeElementAt(i);
i--;
} else {
Vector<TreeReference> nodes = new EvaluationContext(instance).expandReference(ref, true);
if (nodes.size() == 0) {
reporter.warning(XFormParserReporter.TYPE_ERROR_PRONE, "<bind> defined for a node that doesn't exist [" + ref.toString() + "]. The node's name was probably changed and the bind should be updated. ", null);
}
}
}
//check <repeat>s (can't bind to '/' or '/data')
Vector<TreeReference> refs = getRepeatableRefs();
for (int i = 0; i < refs.size(); i++) {
TreeReference ref = refs.elementAt(i);
if (ref.size() <= 1) {
throw new XFormParseException("Cannot bind repeat to '/' or '/" + mainInstanceNode.getName() + "'");
}
}
//check control/group/repeat bindings (bound nodes exist, question can't bind to '/')
Vector<String> bindErrors = new Vector<String>();
verifyControlBindings(_f, instance, bindErrors);
if (bindErrors.size() > 0) {
String errorMsg = "";
for (int i = 0; i < bindErrors.size(); i++) {
errorMsg += bindErrors.elementAt(i) + "\n";
}
throw new XFormParseException(errorMsg);
}
//check that repeat members bind to the proper scope (not above the binding of the parent repeat, and not within any sub-repeat (or outside repeat))
verifyRepeatMemberBindings(_f, instance, null);
//check that label/copy/value refs are children of nodeset ref, and exist
verifyItemsetBindings(instance);
verifyItemsetSrcDstCompatibility(instance);
}
private void verifyActions (FormInstance instance) {
//check the target of actions which are manipulating real values
for (int i = 0; i < actionTargets.size(); i++) {
TreeReference target = actionTargets.elementAt(i);
Vector<TreeReference> nodes = new EvaluationContext(instance).expandReference(target, true);
if (nodes.size() == 0) {
throw new XFormParseException("Invalid Action - Targets non-existent node: " + target.toString(true));
}
}
}
private void verifyControlBindings (IFormElement fe, FormInstance instance, Vector<String> errors) { //throws XmlPullParserException {
if (fe.getChildren() == null)
return;
for (int i = 0; i < fe.getChildren().size(); i++) {
IFormElement child = fe.getChildren().elementAt(i);
IDataReference ref = null;
String type = null;
if (child instanceof GroupDef) {
ref = ((GroupDef)child).getBind();
type = (((GroupDef)child).getRepeat() ? "Repeat" : "Group");
} else if (child instanceof QuestionDef) {
ref = ((QuestionDef)child).getBind();
type = "Question";
}
TreeReference tref = FormInstance.unpackReference(ref);
if (child instanceof QuestionDef && tref.size() == 0) {
//group can bind to '/'; repeat can't, but that's checked above
reporter.warning(XFormParserReporter.TYPE_INVALID_STRUCTURE, "Cannot bind control to '/'",null);
} else {
Vector<TreeReference> nodes = new EvaluationContext(instance).expandReference(tref, true);
if (nodes.size() == 0) {
String error = type+ " bound to non-existent node: [" + tref.toString() + "]";
reporter.error(error);
errors.addElement(error);
}
//we can't check whether questions map to the right kind of node ('data' node vs. 'sub-tree' node) as that depends
//on the question's data type, which we don't know yet
}
verifyControlBindings(child, instance, errors);
}
}
private void verifyRepeatMemberBindings (IFormElement fe, FormInstance instance, GroupDef parentRepeat) {
if (fe.getChildren() == null)
return;
for (int i = 0; i < fe.getChildren().size(); i++) {
IFormElement child = fe.getChildren().elementAt(i);
boolean isRepeat = (child instanceof GroupDef && ((GroupDef)child).getRepeat());
//get bindings of current node and nearest enclosing repeat
TreeReference repeatBind = (parentRepeat == null ? TreeReference.rootRef() : FormInstance.unpackReference(parentRepeat.getBind()));
TreeReference childBind = FormInstance.unpackReference(child.getBind());
//check if current binding is within scope of repeat binding
if (!repeatBind.isParentOf(childBind, false)) {
//catch <repeat nodeset="/a/b"><input ref="/a/c" /></repeat>: repeat question is not a child of the repeated node
throw new XFormParseException("<repeat> member's binding [" + childBind.toString() + "] is not a descendant of <repeat> binding [" + repeatBind.toString() + "]!");
} else if (repeatBind.equals(childBind) && isRepeat) {
//catch <repeat nodeset="/a/b"><repeat nodeset="/a/b">...</repeat></repeat> (<repeat nodeset="/a/b"><input ref="/a/b" /></repeat> is ok)
throw new XFormParseException("child <repeat>s [" + childBind.toString() + "] cannot bind to the same node as their parent <repeat>; only questions/groups can");
}
//check that, in the instance, current node is not within the scope of any closer repeat binding
//build a list of all the node's instance ancestors
Vector<TreeElement> repeatAncestry = new Vector<TreeElement>();
TreeElement repeatNode = (repeatTree == null ? null : repeatTree.getRoot());
if (repeatNode != null) {
repeatAncestry.addElement(repeatNode);
for (int j = 1; j < childBind.size(); j++) {
repeatNode = repeatNode.getChild(childBind.getName(j), 0);
if (repeatNode != null) {
repeatAncestry.addElement(repeatNode);
} else {
break;
}
}
}
//check that no nodes between the parent repeat and the target are repeatable
for (int k = repeatBind.size(); k < childBind.size(); k++) {
TreeElement rChild = (k < repeatAncestry.size() ? repeatAncestry.elementAt(k) : null);
boolean repeatable = (rChild == null ? false : rChild.isRepeatable());
if (repeatable && !(k == childBind.size() - 1 && isRepeat)) {
//catch <repeat nodeset="/a/b"><input ref="/a/b/c/d" /></repeat>...<repeat nodeset="/a/b/c">...</repeat>:
// question's/group's/repeat's most immediate repeat parent in the instance is not its most immediate repeat parent in the form def
throw new XFormParseException("<repeat> member's binding [" + childBind.toString() + "] is within the scope of a <repeat> that is not its closest containing <repeat>!");
}
}
verifyRepeatMemberBindings(child, instance, (isRepeat ? (GroupDef)child : parentRepeat));
}
}
private void verifyItemsetBindings (FormInstance instance) {
for (int i = 0; i < itemsets.size(); i++) {
ItemsetBinding itemset = itemsets.elementAt(i);
//check proper parent/child relationship
if (!itemset.nodesetRef.isParentOf(itemset.labelRef, false)) {
throw new XFormParseException("itemset nodeset ref is not a parent of label ref");
} else if (itemset.copyRef != null && !itemset.nodesetRef.isParentOf(itemset.copyRef, false)) {
throw new XFormParseException("itemset nodeset ref is not a parent of copy ref");
} else if (itemset.valueRef != null && !itemset.nodesetRef.isParentOf(itemset.valueRef, false)) {
throw new XFormParseException("itemset nodeset ref is not a parent of value ref");
}
//make sure the labelref is tested against the right instance
//check if it's not the main instance
DataInstance fi = null;
if(itemset.labelRef.getInstanceName()!= null)
{
fi = _f.getNonMainInstance(itemset.labelRef.getInstanceName());
if(fi == null)
{
throw new XFormParseException("Instance: "+ itemset.labelRef.getInstanceName() + " Does not exists");
}
}
else
{
fi = instance;
}
//If the data instance's structure isn't available until the form is entered, we can't really proceed further
//with consistency/sanity checks, so just bail.
if(fi.isRuntimeEvaluated()) {
return;
}
if(fi.getTemplatePath(itemset.labelRef) == null)
{
throw new XFormParseException("<label> node for itemset doesn't exist! [" + itemset.labelRef + "]");
}
/**** NOT SURE WHAT A COPYREF DOES OR IS, SO I'M NOT CHECKING FOR IT
else if (itemset.copyRef != null && instance.getTemplatePath(itemset.copyRef) == null) {
throw new XFormParseException("<copy> node for itemset doesn't exist! [" + itemset.copyRef + "]");
}
****/
//check value nodes exist
else if (itemset.valueRef != null && fi.getTemplatePath(itemset.valueRef) == null) {
throw new XFormParseException("<value> node for itemset doesn't exist! [" + itemset.valueRef + "]");
}
}
}
private void verifyItemsetSrcDstCompatibility (FormInstance instance) {
for (int i = 0; i < itemsets.size(); i++) {
ItemsetBinding itemset = itemsets.elementAt(i);
boolean destRepeatable = (instance.getTemplate(itemset.getDestRef()) != null);
if (itemset.copyMode) {
if (!destRepeatable) {
throw new XFormParseException("itemset copies to node(s) which are not repeatable");
}
//validate homogeneity between src and dst nodes
TreeElement srcNode = instance.getTemplatePath(itemset.copyRef);
TreeElement dstNode = instance.getTemplate(itemset.getDestRef());
if (!FormInstance.isHomogeneous(srcNode, dstNode)) {
reporter.warning(XFormParserReporter.TYPE_INVALID_STRUCTURE,
"Your itemset source [" + srcNode.getRef().toString() + "] and dest [" + dstNode.getRef().toString() +
"] of appear to be incompatible!", null);
}
//TODO: i feel like, in theory, i should additionally check that the repeatable children of src and dst
//match up (Achild is repeatable <--> Bchild is repeatable). isHomogeneous doesn't check this. but i'm
//hard-pressed to think of scenarios where this would actually cause problems
} else {
if (destRepeatable) {
throw new XFormParseException("itemset sets value on repeatable nodes");
}
}
}
}
private void applyInstanceProperties (FormInstance instance) {
for (int i = 0; i < bindings.size(); i++) {
DataBinding bind = bindings.elementAt(i);
TreeReference ref = FormInstance.unpackReference(bind.getReference());
Vector<TreeReference> nodes = new EvaluationContext(instance).expandReference(ref, true);
if (nodes.size() > 0) {
attachBindGeneral(bind);
}
for (int j = 0; j < nodes.size(); j++) {
TreeReference nref = nodes.elementAt(j);
attachBind(instance.resolveReference(nref), bind);
}
}
applyControlProperties(instance);
}
private static void attachBindGeneral (DataBinding bind) {
TreeReference ref = FormInstance.unpackReference(bind.getReference());
if (bind.relevancyCondition != null) {
bind.relevancyCondition.addTarget(ref);
}
if (bind.requiredCondition != null) {
bind.requiredCondition.addTarget(ref);
}
if (bind.readonlyCondition != null) {
bind.readonlyCondition.addTarget(ref);
}
if (bind.calculate != null) {
bind.calculate.addTarget(ref);
}
}
private static void attachBind(TreeElement node, DataBinding bind) {
node.setDataType(bind.getDataType());
if (bind.relevancyCondition == null) {
node.setRelevant(bind.relevantAbsolute);
}
if (bind.requiredCondition == null) {
node.setRequired(bind.requiredAbsolute);
}
if (bind.readonlyCondition == null) {
node.setEnabled(!bind.readonlyAbsolute);
}
if (bind.constraint != null) {
node.setConstraint(new Constraint(bind.constraint, bind.constraintMessage));
}
node.setPreloadHandler(bind.getPreload());
node.setPreloadParams(bind.getPreloadParams());
}
//apply properties to instance nodes that are determined by controls bound to those nodes
//this should make you feel slightly dirty, but it allows us to be somewhat forgiving with the form
//(e.g., a select question bound to a 'text' type node)
private void applyControlProperties (FormInstance instance) {
for (int h = 0; h < 2; h++) {
Vector<TreeReference> selectRefs = (h == 0 ? selectOnes : selectMultis);
int type = (h == 0 ? Constants.DATATYPE_CHOICE : Constants.DATATYPE_CHOICE_LIST);
for (int i = 0; i < selectRefs.size(); i++) {
TreeReference ref = selectRefs.elementAt(i);
Vector<TreeReference> nodes = new EvaluationContext(instance).expandReference(ref, true);
for (int j = 0; j < nodes.size(); j++) {
TreeElement node = instance.resolveReference(nodes.elementAt(j));
if (node.getDataType() == Constants.DATATYPE_CHOICE || node.getDataType() == Constants.DATATYPE_CHOICE_LIST) {
//do nothing
} else if (node.getDataType() == Constants.DATATYPE_NULL || node.getDataType() == Constants.DATATYPE_TEXT) {
node.setDataType(type);
} else {
reporter.warning(XFormParserReporter.TYPE_INVALID_STRUCTURE,
"Select question " + ref.toString() + " appears to have data type that is incompatible with selection", null);
}
}
}
}
}
//TODO: hook here for turning sub-trees into complex IAnswerData objects (like for immunizations)
//FIXME: the 'ref' and FormDef parameters (along with the helper function above that initializes them) are only needed so that we
//can fetch QuestionDefs bound to the given node, as the QuestionDef reference is needed to properly represent answers
//to select questions. obviously, we want to fix this.
private static void loadInstanceData (Element node, TreeElement cur, FormDef f) {
int numChildren = node.getChildCount();
boolean hasElements = false;
for (int i = 0; i < numChildren; i++) {
if (node.getType(i) == Node.ELEMENT) {
hasElements = true;
break;
}
}
if (hasElements) {
Hashtable<String, Integer> multiplicities = new Hashtable<String, Integer>(); //stores max multiplicity seen for a given node name thus far
for (int i = 0; i < numChildren; i++) {
if (node.getType(i) == Node.ELEMENT) {
Element child = node.getElement(i);
String name = child.getName();
int index;
boolean isTemplate = (child.getAttributeValue(NAMESPACE_JAVAROSA, "template") != null);
if (isTemplate) {
index = TreeReference.INDEX_TEMPLATE;
} else {
//update multiplicity counter
Integer mult = multiplicities.get(name);
index = (mult == null ? 0 : mult.intValue() + 1);
multiplicities.put(name, DataUtil.integer(index));
}
loadInstanceData(child, cur.getChild(name, index), f);
}
}
} else {
String text = getXMLText(node, true);
if (text != null && text.trim().length() > 0) { //ignore text that is only whitespace
//TODO: custom data types? modelPrototypes?
cur.setValue(AnswerDataFactory.templateByDataType(cur.getDataType()).cast(new UncastData(text.trim())));
}
}
}
//find a questiondef that binds to ref, if the data type is a 'select' question type
public static QuestionDef ghettoGetQuestionDef (int dataType, FormDef f, TreeReference ref) {
if (dataType == Constants.DATATYPE_CHOICE || dataType == Constants.DATATYPE_CHOICE_LIST) {
return FormDef.findQuestionByRef(ref, f);
} else {
return null;
}
}
private void checkDependencyCycles () {
Vector vertices = new Vector();
Vector edges = new Vector();
//build graph
for (Enumeration e = _f.triggerIndex.keys(); e.hasMoreElements(); ) {
TreeReference trigger = (TreeReference)e.nextElement();
if (!vertices.contains(trigger))
vertices.addElement(trigger);
Vector triggered = (Vector)_f.triggerIndex.get(trigger);
Vector targets = new Vector();
for (int i = 0; i < triggered.size(); i++) {
Triggerable t = (Triggerable)triggered.elementAt(i);
for (int j = 0; j < t.getTargets().size(); j++) {
TreeReference target = (TreeReference)t.getTargets().elementAt(j);
if (!targets.contains(target))
targets.addElement(target);
}
}
for (int i = 0; i < targets.size(); i++) {
TreeReference target = (TreeReference)targets.elementAt(i);
if (!vertices.contains(target))
vertices.addElement(target);
TreeReference[] edge = {trigger, target};
edges.addElement(edge);
}
}
//find cycles
boolean acyclic = true;
while (vertices.size() > 0) {
//determine leaf nodes
Vector leaves = new Vector();
for (int i = 0; i < vertices.size(); i++) {
leaves.addElement(vertices.elementAt(i));
}
for (int i = 0; i < edges.size(); i++) {
TreeReference[] edge = (TreeReference[])edges.elementAt(i);
leaves.removeElement(edge[0]);
}
//if no leaf nodes while graph still has nodes, graph has cycles
if (leaves.size() == 0) {
acyclic = false;
break;
}
//remove leaf nodes and edges pointing to them
for (int i = 0; i < leaves.size(); i++) {
TreeReference leaf = (TreeReference)leaves.elementAt(i);
vertices.removeElement(leaf);
}
for (int i = edges.size() - 1; i >= 0; i--) {
TreeReference[] edge = (TreeReference[])edges.elementAt(i);
if (leaves.contains(edge[1]))
edges.removeElementAt(i);
}
}
if (!acyclic) {
String errorMessage = "XPath Dependency Cycle:\n";
for (int i = 0; i < edges.size(); i++) {
TreeReference[] edge = (TreeReference[])edges.elementAt(i);
errorMessage += edge[0].toString() + " => " + edge[1].toString() + "\n";
}
reporter.error(errorMessage);
throw new RuntimeException("Dependency cycles amongst the xpath expressions in relevant/calculate");
}
}
public static void loadXmlInstance(FormDef f, Reader xmlReader) throws IOException {
loadXmlInstance(f, getXMLDocument(xmlReader));
}
/**
* Load a compatible xml instance into FormDef f
*
* call before f.initialize()!
*/
public static void loadXmlInstance(FormDef f, Document xmlInst) {
TreeElement savedRoot = XFormParser.restoreDataModel(xmlInst, null).getRoot();
TreeElement templateRoot = f.getMainInstance().getRoot().deepCopy(true);
// weak check for matching forms
// TODO: should check that namespaces match?
if (!savedRoot.getName().equals(templateRoot.getName()) || savedRoot.getMult() != 0) {
throw new RuntimeException("Saved form instance does not match template form definition");
}
// populate the data model
TreeReference tr = TreeReference.rootRef();
tr.add(templateRoot.getName(), TreeReference.INDEX_UNBOUND);
templateRoot.populate(savedRoot, f);
// populated model to current form
f.getMainInstance().setRoot(templateRoot);
// if the new instance is inserted into the formdef before f.initialize() is called, this
// locale refresh is unnecessary
// Localizer loc = f.getLocalizer();
// if (loc != null) {
// f.localeChanged(loc.getLocale(), loc);
// }
}
//returns data type corresponding to type string; doesn't handle defaulting to 'text' if type unrecognized/unknown
private int getDataType(String type) {
int dataType = Constants.DATATYPE_NULL;
if (type != null) {
//cheap out and ignore namespace
if (type.indexOf(":") != -1) {
type = type.substring(type.indexOf(":") + 1);
}
if (typeMappings.containsKey(type)) {
dataType = ((Integer)typeMappings.get(type)).intValue();
} else {
dataType = Constants.DATATYPE_UNSUPPORTED;
reporter.warning(XFormParserReporter.TYPE_ERROR_PRONE, "unrecognized data type [" + type + "]", null);
}
}
return dataType;
}
public static void addModelPrototype(int type, TreeElement element) {
modelPrototypes.addNewPrototype(String.valueOf(type), element.getClass());
}
public static void addDataType (String type, int dataType) {
typeMappings.put(type, DataUtil.integer(dataType));
}
public static void registerControlType(String type, final int typeId) {
IElementHandler newHandler = new IElementHandler() {
public void handle (XFormParser p, Element e, Object parent) { p.parseControl((IFormElement)parent, e, typeId); } };
topLevelHandlers.put(type, newHandler);
groupLevelHandlers.put(type, newHandler);
}
public static void registerHandler(String type, IElementHandler handler) {
topLevelHandlers.put(type, handler);
groupLevelHandlers.put(type, handler);
}
public static String getXMLText (Node n, boolean trim) {
return (n.getChildCount() == 0 ? null : getXMLText(n, 0, trim));
}
/**
* reads all subsequent text nodes and returns the combined string
* needed because escape sequences are parsed into consecutive text nodes
* e.g. "abc&123" --> (abc)(&)(123)
**/
public static String getXMLText (Node node, int i, boolean trim) {
StringBuffer strBuff = null;
String text = node.getText(i);
if (text == null)
return null;
for (i++; i < node.getChildCount() && node.getType(i) == Node.TEXT; i++) {
if (strBuff == null)
strBuff = new StringBuffer(text);
strBuff.append(node.getText(i));
}
if (strBuff != null)
text = strBuff.toString();
if (trim)
text = text.trim();
return text;
}
public static FormInstance restoreDataModel (InputStream input, Class restorableType) throws IOException {
Document doc = getXMLDocument(new InputStreamReader(input));
if (doc == null) {
throw new RuntimeException("syntax error in XML instance; could not parse");
}
return restoreDataModel(doc, restorableType);
}
public static FormInstance restoreDataModel (Document doc, Class restorableType) {
Restorable r = (restorableType != null ? (Restorable)PrototypeFactory.getInstance(restorableType) : null);
Element e = doc.getRootElement();
TreeElement te = buildInstanceStructure(e, null);
FormInstance dm = new FormInstance(te);
loadNamespaces(e, dm);
if (r != null) {
RestoreUtils.templateData(r, dm, null);
}
loadInstanceData(e, te, null);
return dm;
}
public static FormInstance restoreDataModel (byte[] data, Class restorableType) {
try {
return restoreDataModel(new ByteArrayInputStream(data), restorableType);
} catch (IOException e) {
e.printStackTrace();
throw new XFormParseException("Bad parsing from byte array " + e.getMessage());
}
}
public static String getVagueLocation(Element e) {
String path = e.getName();
Element walker = e;
while(walker != null) {
Node n = walker.getParent();
if(n instanceof Element) {
walker = (Element)n;
String step = walker.getName();
for(int i = 0; i < walker.getAttributeCount() ; ++i) {
step += "[@" +walker.getAttributeName(i) + "=";
step += walker.getAttributeValue(i) + "]";
}
path = step + "/" + path;
} else {
walker = null;
path = "/" + path;
}
}
String elementString = getVagueElementPrintout(e, 2);
String fullmsg = "\n Problem found at nodeset: " + path;
fullmsg += "\n With element " + elementString + "\n";
return fullmsg;
}
public static String getVagueElementPrintout(Element e, int maxDepth) {
String elementString = "<" + e.getName();
for(int i = 0; i < e.getAttributeCount() ; ++i) {
elementString += " " + e.getAttributeName(i) + "=\"";
elementString += e.getAttributeValue(i) + "\"";
}
if(e.getChildCount() > 0) {
elementString += ">";
if(e.getType(0) ==Element.ELEMENT) {
if(maxDepth > 0) {
elementString += getVagueElementPrintout((Element)e.getChild(0),maxDepth -1);
} else {
elementString += "...";
}
}
} else {
elementString += "/>";
}
return elementString;
}
} | Itemsets used to get the wrong context reference.
| core/src/org/javarosa/xform/parse/XFormParser.java | Itemsets used to get the wrong context reference. | <ide><path>ore/src/org/javarosa/xform/parse/XFormParser.java
<ide> if(nodesetStr == null ) throw new RuntimeException("No nodeset attribute in element: ["+e.getName()+"]. This is required. (Element Printout:"+XFormSerializer.elementToString(e)+")");
<ide> XPathPathExpr path = XPathReference.getPathExpr(nodesetStr);
<ide> itemset.nodesetExpr = new XPathConditional(path);
<del> itemset.contextRef = getFormElementRef(qparent);
<add> itemset.contextRef = getFormElementRef(q);
<ide> itemset.nodesetRef = FormInstance.unpackReference(getAbsRef(new XPathReference(path.getReference(true)), itemset.contextRef));
<ide>
<ide> for (int i = 0; i < e.getChildCount(); i++) { |
|
Java | apache-2.0 | 39d0d89dcd417b92e8f1c062d50865a1edae31c6 | 0 | WANdisco/gerrit,WANdisco/gerrit,WANdisco/gerrit,GerritCodeReview/gerrit,qtproject/qtqa-gerrit,qtproject/qtqa-gerrit,WANdisco/gerrit,qtproject/qtqa-gerrit,GerritCodeReview/gerrit,GerritCodeReview/gerrit,qtproject/qtqa-gerrit,qtproject/qtqa-gerrit,WANdisco/gerrit,GerritCodeReview/gerrit,GerritCodeReview/gerrit,GerritCodeReview/gerrit,GerritCodeReview/gerrit,GerritCodeReview/gerrit,qtproject/qtqa-gerrit,qtproject/qtqa-gerrit,WANdisco/gerrit,WANdisco/gerrit | // Copyright (C) 2009 The Android Open Source Project
//
// 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 com.google.gerrit.pgm.util;
import static com.google.gerrit.server.config.GerritServerConfigModule.getSecureStoreClassName;
import static com.google.inject.Scopes.SINGLETON;
import static com.google.inject.Stage.PRODUCTION;
import com.google.gerrit.common.Die;
import com.google.gerrit.extensions.events.LifecycleListener;
import com.google.gerrit.lifecycle.LifecycleModule;
import com.google.gerrit.metrics.DisabledMetricMaker;
import com.google.gerrit.metrics.MetricMaker;
import com.google.gerrit.metrics.dropwizard.DropWizardMetricMaker;
import com.google.gerrit.server.config.GerritServerConfig;
import com.google.gerrit.server.config.GerritServerConfigModule;
import com.google.gerrit.server.config.SitePath;
import com.google.gerrit.server.git.GitRepositoryManagerModule;
import com.google.gerrit.server.notedb.ConfigNotesMigration;
import com.google.gerrit.server.schema.DataSourceModule;
import com.google.gerrit.server.schema.DataSourceProvider;
import com.google.gerrit.server.schema.DataSourceType;
import com.google.gerrit.server.schema.DatabaseModule;
import com.google.gerrit.server.schema.SchemaModule;
import com.google.gerrit.server.securestore.SecureStoreClassName;
import com.google.gwtorm.server.OrmException;
import com.google.inject.AbstractModule;
import com.google.inject.Binding;
import com.google.inject.CreationException;
import com.google.inject.Guice;
import com.google.inject.Injector;
import com.google.inject.Key;
import com.google.inject.Module;
import com.google.inject.Provider;
import com.google.inject.ProvisionException;
import com.google.inject.TypeLiteral;
import com.google.inject.name.Named;
import com.google.inject.name.Names;
import com.google.inject.spi.Message;
import com.google.inject.util.Providers;
import java.lang.annotation.Annotation;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.sql.Connection;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;
import javax.sql.DataSource;
import org.eclipse.jgit.lib.Config;
import org.kohsuke.args4j.Option;
public abstract class SiteProgram extends AbstractProgram {
@Option(
name = "--site-path",
aliases = {"-d"},
usage = "Local directory containing site data")
private void setSitePath(String path) {
sitePath = Paths.get(path);
}
protected Provider<DataSource> dsProvider;
private Path sitePath = Paths.get(".");
protected SiteProgram() {}
protected SiteProgram(Path sitePath) {
this.sitePath = sitePath;
}
protected SiteProgram(Path sitePath, final Provider<DataSource> dsProvider) {
this.sitePath = sitePath;
this.dsProvider = dsProvider;
}
/** @return the site path specified on the command line. */
protected Path getSitePath() {
return sitePath;
}
/** Ensures we are running inside of a valid site, otherwise throws a Die. */
protected void mustHaveValidSite() throws Die {
if (!Files.exists(sitePath.resolve("etc").resolve("gerrit.config"))) {
throw die("not a Gerrit site: '" + getSitePath() + "'\nPerhaps you need to run init first?");
}
}
/** @return provides database connectivity and site path. */
protected Injector createDbInjector(DataSourceProvider.Context context) {
return createDbInjector(false, context);
}
/** @return provides database connectivity and site path. */
protected Injector createDbInjector(
final boolean enableMetrics, final DataSourceProvider.Context context) {
final List<Module> modules = new ArrayList<>();
Module sitePathModule =
new AbstractModule() {
@Override
protected void configure() {
bind(Path.class).annotatedWith(SitePath.class).toInstance(getSitePath());
bind(String.class)
.annotatedWith(SecureStoreClassName.class)
.toProvider(Providers.of(getConfiguredSecureStoreClass()));
}
};
modules.add(sitePathModule);
if (enableMetrics) {
modules.add(new DropWizardMetricMaker.ApiModule());
} else {
modules.add(
new AbstractModule() {
@Override
protected void configure() {
bind(MetricMaker.class).to(DisabledMetricMaker.class);
}
});
}
modules.add(
new LifecycleModule() {
@Override
protected void configure() {
bind(DataSourceProvider.Context.class).toInstance(context);
if (dsProvider != null) {
bind(Key.get(DataSource.class, Names.named("ReviewDb")))
.toProvider(dsProvider)
.in(SINGLETON);
if (LifecycleListener.class.isAssignableFrom(dsProvider.getClass())) {
listener().toInstance((LifecycleListener) dsProvider);
}
} else {
bind(Key.get(DataSource.class, Names.named("ReviewDb")))
.toProvider(SiteLibraryBasedDataSourceProvider.class)
.in(SINGLETON);
listener().to(SiteLibraryBasedDataSourceProvider.class);
}
}
});
Module configModule = new GerritServerConfigModule();
modules.add(configModule);
Injector cfgInjector = Guice.createInjector(sitePathModule, configModule);
Config cfg = cfgInjector.getInstance(Key.get(Config.class, GerritServerConfig.class));
String dbType;
if (dsProvider != null) {
dbType = getDbType(dsProvider);
} else {
dbType = cfg.getString("database", null, "type");
}
if (dbType == null) {
throw new ProvisionException("database.type must be defined");
}
final DataSourceType dst =
Guice.createInjector(new DataSourceModule(), configModule, sitePathModule)
.getInstance(Key.get(DataSourceType.class, Names.named(dbType.toLowerCase())));
modules.add(
new AbstractModule() {
@Override
protected void configure() {
bind(DataSourceType.class).toInstance(dst);
}
});
modules.add(new DatabaseModule());
modules.add(new SchemaModule());
modules.add(cfgInjector.getInstance(GitRepositoryManagerModule.class));
modules.add(new ConfigNotesMigration.Module());
try {
return Guice.createInjector(PRODUCTION, modules);
} catch (CreationException ce) {
final Message first = ce.getErrorMessages().iterator().next();
Throwable why = first.getCause();
if (why instanceof SQLException) {
throw die("Cannot connect to SQL database", why);
}
if (why instanceof OrmException
&& why.getCause() != null
&& "Unable to determine driver URL".equals(why.getMessage())) {
why = why.getCause();
if (isCannotCreatePoolException(why)) {
throw die("Cannot connect to SQL database", why.getCause());
}
throw die("Cannot connect to SQL database", why);
}
final StringBuilder buf = new StringBuilder();
if (why != null) {
buf.append(why.getMessage());
why = why.getCause();
} else {
buf.append(first.getMessage());
}
while (why != null) {
buf.append("\n caused by ");
buf.append(why.toString());
why = why.getCause();
}
throw die(buf.toString(), new RuntimeException("DbInjector failed", ce));
}
}
protected final String getConfiguredSecureStoreClass() {
return getSecureStoreClassName(sitePath);
}
private String getDbType(Provider<DataSource> dsProvider) {
String dbProductName;
try (Connection conn = dsProvider.get().getConnection()) {
dbProductName = conn.getMetaData().getDatabaseProductName().toLowerCase();
} catch (SQLException e) {
throw new RuntimeException(e);
}
List<Module> modules = new ArrayList<>();
modules.add(
new AbstractModule() {
@Override
protected void configure() {
bind(Path.class).annotatedWith(SitePath.class).toInstance(getSitePath());
}
});
modules.add(new GerritServerConfigModule());
modules.add(new DataSourceModule());
Injector i = Guice.createInjector(modules);
List<Binding<DataSourceType>> dsTypeBindings =
i.findBindingsByType(new TypeLiteral<DataSourceType>() {});
for (Binding<DataSourceType> binding : dsTypeBindings) {
Annotation annotation = binding.getKey().getAnnotation();
if (annotation instanceof Named) {
if (((Named) annotation).value().toLowerCase().contains(dbProductName)) {
return ((Named) annotation).value();
}
}
}
throw new IllegalStateException(
String.format(
"Cannot guess database type from the database product name '%s'", dbProductName));
}
@SuppressWarnings("deprecation")
private static boolean isCannotCreatePoolException(Throwable why) {
return why instanceof org.apache.commons.dbcp.SQLNestedException
&& why.getCause() != null
&& why.getMessage().startsWith("Cannot create PoolableConnectionFactory");
}
}
| gerrit-pgm/src/main/java/com/google/gerrit/pgm/util/SiteProgram.java | // Copyright (C) 2009 The Android Open Source Project
//
// 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 com.google.gerrit.pgm.util;
import static com.google.gerrit.server.config.GerritServerConfigModule.getSecureStoreClassName;
import static com.google.inject.Scopes.SINGLETON;
import static com.google.inject.Stage.PRODUCTION;
import com.google.gerrit.common.Die;
import com.google.gerrit.extensions.events.LifecycleListener;
import com.google.gerrit.lifecycle.LifecycleModule;
import com.google.gerrit.metrics.DisabledMetricMaker;
import com.google.gerrit.metrics.MetricMaker;
import com.google.gerrit.metrics.dropwizard.DropWizardMetricMaker;
import com.google.gerrit.server.config.GerritServerConfig;
import com.google.gerrit.server.config.GerritServerConfigModule;
import com.google.gerrit.server.config.SitePath;
import com.google.gerrit.server.git.GitRepositoryManagerModule;
import com.google.gerrit.server.notedb.ConfigNotesMigration;
import com.google.gerrit.server.schema.DataSourceModule;
import com.google.gerrit.server.schema.DataSourceProvider;
import com.google.gerrit.server.schema.DataSourceType;
import com.google.gerrit.server.schema.DatabaseModule;
import com.google.gerrit.server.schema.SchemaModule;
import com.google.gerrit.server.securestore.SecureStoreClassName;
import com.google.gwtorm.server.OrmException;
import com.google.inject.AbstractModule;
import com.google.inject.Binding;
import com.google.inject.CreationException;
import com.google.inject.Guice;
import com.google.inject.Injector;
import com.google.inject.Key;
import com.google.inject.Module;
import com.google.inject.Provider;
import com.google.inject.ProvisionException;
import com.google.inject.TypeLiteral;
import com.google.inject.name.Named;
import com.google.inject.name.Names;
import com.google.inject.spi.Message;
import com.google.inject.util.Providers;
import java.lang.annotation.Annotation;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.sql.Connection;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;
import javax.sql.DataSource;
import org.eclipse.jgit.lib.Config;
import org.kohsuke.args4j.Option;
public abstract class SiteProgram extends AbstractProgram {
@Option(
name = "--site-path",
aliases = {"-d"},
usage = "Local directory containing site data")
private void setSitePath(String path) {
sitePath = Paths.get(path);
}
protected Provider<DataSource> dsProvider;
private Path sitePath = Paths.get(".");
protected SiteProgram() {}
protected SiteProgram(Path sitePath) {
this.sitePath = sitePath;
}
protected SiteProgram(Path sitePath, final Provider<DataSource> dsProvider) {
this.sitePath = sitePath;
this.dsProvider = dsProvider;
}
/** @return the site path specified on the command line. */
protected Path getSitePath() {
return sitePath;
}
/** Ensures we are running inside of a valid site, otherwise throws a Die. */
protected void mustHaveValidSite() throws Die {
if (!Files.exists(sitePath.resolve("etc").resolve("gerrit.config"))) {
throw die("not a Gerrit site: '" + getSitePath() + "'\nPerhaps you need to run init first?");
}
}
/** @return provides database connectivity and site path. */
protected Injector createDbInjector(DataSourceProvider.Context context) {
return createDbInjector(false, context);
}
/** @return provides database connectivity and site path. */
protected Injector createDbInjector(
final boolean enableMetrics, final DataSourceProvider.Context context) {
final Path sitePath = getSitePath();
final List<Module> modules = new ArrayList<>();
Module sitePathModule =
new AbstractModule() {
@Override
protected void configure() {
bind(Path.class).annotatedWith(SitePath.class).toInstance(sitePath);
bind(String.class)
.annotatedWith(SecureStoreClassName.class)
.toProvider(Providers.of(getConfiguredSecureStoreClass()));
}
};
modules.add(sitePathModule);
if (enableMetrics) {
modules.add(new DropWizardMetricMaker.ApiModule());
} else {
modules.add(
new AbstractModule() {
@Override
protected void configure() {
bind(MetricMaker.class).to(DisabledMetricMaker.class);
}
});
}
modules.add(
new LifecycleModule() {
@Override
protected void configure() {
bind(DataSourceProvider.Context.class).toInstance(context);
if (dsProvider != null) {
bind(Key.get(DataSource.class, Names.named("ReviewDb")))
.toProvider(dsProvider)
.in(SINGLETON);
if (LifecycleListener.class.isAssignableFrom(dsProvider.getClass())) {
listener().toInstance((LifecycleListener) dsProvider);
}
} else {
bind(Key.get(DataSource.class, Names.named("ReviewDb")))
.toProvider(SiteLibraryBasedDataSourceProvider.class)
.in(SINGLETON);
listener().to(SiteLibraryBasedDataSourceProvider.class);
}
}
});
Module configModule = new GerritServerConfigModule();
modules.add(configModule);
Injector cfgInjector = Guice.createInjector(sitePathModule, configModule);
Config cfg = cfgInjector.getInstance(Key.get(Config.class, GerritServerConfig.class));
String dbType;
if (dsProvider != null) {
dbType = getDbType(dsProvider);
} else {
dbType = cfg.getString("database", null, "type");
}
if (dbType == null) {
throw new ProvisionException("database.type must be defined");
}
final DataSourceType dst =
Guice.createInjector(new DataSourceModule(), configModule, sitePathModule)
.getInstance(Key.get(DataSourceType.class, Names.named(dbType.toLowerCase())));
modules.add(
new AbstractModule() {
@Override
protected void configure() {
bind(DataSourceType.class).toInstance(dst);
}
});
modules.add(new DatabaseModule());
modules.add(new SchemaModule());
modules.add(cfgInjector.getInstance(GitRepositoryManagerModule.class));
modules.add(new ConfigNotesMigration.Module());
try {
return Guice.createInjector(PRODUCTION, modules);
} catch (CreationException ce) {
final Message first = ce.getErrorMessages().iterator().next();
Throwable why = first.getCause();
if (why instanceof SQLException) {
throw die("Cannot connect to SQL database", why);
}
if (why instanceof OrmException
&& why.getCause() != null
&& "Unable to determine driver URL".equals(why.getMessage())) {
why = why.getCause();
if (isCannotCreatePoolException(why)) {
throw die("Cannot connect to SQL database", why.getCause());
}
throw die("Cannot connect to SQL database", why);
}
final StringBuilder buf = new StringBuilder();
if (why != null) {
buf.append(why.getMessage());
why = why.getCause();
} else {
buf.append(first.getMessage());
}
while (why != null) {
buf.append("\n caused by ");
buf.append(why.toString());
why = why.getCause();
}
throw die(buf.toString(), new RuntimeException("DbInjector failed", ce));
}
}
protected final String getConfiguredSecureStoreClass() {
return getSecureStoreClassName(sitePath);
}
private String getDbType(Provider<DataSource> dsProvider) {
String dbProductName;
try (Connection conn = dsProvider.get().getConnection()) {
dbProductName = conn.getMetaData().getDatabaseProductName().toLowerCase();
} catch (SQLException e) {
throw new RuntimeException(e);
}
List<Module> modules = new ArrayList<>();
modules.add(
new AbstractModule() {
@Override
protected void configure() {
bind(Path.class).annotatedWith(SitePath.class).toInstance(getSitePath());
}
});
modules.add(new GerritServerConfigModule());
modules.add(new DataSourceModule());
Injector i = Guice.createInjector(modules);
List<Binding<DataSourceType>> dsTypeBindings =
i.findBindingsByType(new TypeLiteral<DataSourceType>() {});
for (Binding<DataSourceType> binding : dsTypeBindings) {
Annotation annotation = binding.getKey().getAnnotation();
if (annotation instanceof Named) {
if (((Named) annotation).value().toLowerCase().contains(dbProductName)) {
return ((Named) annotation).value();
}
}
}
throw new IllegalStateException(
String.format(
"Cannot guess database type from the database product name '%s'", dbProductName));
}
@SuppressWarnings("deprecation")
private static boolean isCannotCreatePoolException(Throwable why) {
return why instanceof org.apache.commons.dbcp.SQLNestedException
&& why.getCause() != null
&& why.getMessage().startsWith("Cannot create PoolableConnectionFactory");
}
}
| SiteProgram: Inline variable to avoid hiding field
Change-Id: I2ddd8c7cda96d77ed17fcf65b4702a61fe9832ea
| gerrit-pgm/src/main/java/com/google/gerrit/pgm/util/SiteProgram.java | SiteProgram: Inline variable to avoid hiding field | <ide><path>errit-pgm/src/main/java/com/google/gerrit/pgm/util/SiteProgram.java
<ide> /** @return provides database connectivity and site path. */
<ide> protected Injector createDbInjector(
<ide> final boolean enableMetrics, final DataSourceProvider.Context context) {
<del> final Path sitePath = getSitePath();
<ide> final List<Module> modules = new ArrayList<>();
<ide>
<ide> Module sitePathModule =
<ide> new AbstractModule() {
<ide> @Override
<ide> protected void configure() {
<del> bind(Path.class).annotatedWith(SitePath.class).toInstance(sitePath);
<add> bind(Path.class).annotatedWith(SitePath.class).toInstance(getSitePath());
<ide> bind(String.class)
<ide> .annotatedWith(SecureStoreClassName.class)
<ide> .toProvider(Providers.of(getConfiguredSecureStoreClass())); |
|
Java | apache-2.0 | 3f73b11177a96d868e1eee4cff3d7526115192c8 | 0 | DevStreet/FinanceAnalytics,DevStreet/FinanceAnalytics,jerome79/OG-Platform,DevStreet/FinanceAnalytics,jeorme/OG-Platform,nssales/OG-Platform,codeaudit/OG-Platform,ChinaQuants/OG-Platform,jeorme/OG-Platform,codeaudit/OG-Platform,jerome79/OG-Platform,ChinaQuants/OG-Platform,nssales/OG-Platform,codeaudit/OG-Platform,jeorme/OG-Platform,jeorme/OG-Platform,ChinaQuants/OG-Platform,jerome79/OG-Platform,nssales/OG-Platform,nssales/OG-Platform,ChinaQuants/OG-Platform,jerome79/OG-Platform,codeaudit/OG-Platform,DevStreet/FinanceAnalytics | /**
* Copyright (C) 2013 - present by OpenGamma Inc. and the OpenGamma group of companies
*
* Please see distribution for license.
*/
package com.opengamma.sesame.graph;
import java.util.Collections;
import java.util.Map;
import java.util.Set;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.Maps;
import com.opengamma.sesame.OutputName;
import com.opengamma.sesame.config.CompositeFunctionModelConfig;
import com.opengamma.sesame.config.FunctionModelConfig;
import com.opengamma.sesame.config.NonPortfolioOutput;
import com.opengamma.sesame.config.ViewColumn;
import com.opengamma.sesame.config.ViewConfig;
import com.opengamma.sesame.function.AvailableImplementations;
import com.opengamma.sesame.function.AvailableOutputs;
import com.opengamma.sesame.function.DefaultImplementationProvider;
import com.opengamma.sesame.function.FunctionMetadata;
import com.opengamma.sesame.function.NoOutputFunction;
import com.opengamma.util.ArgumentChecker;
/**
* Builder for a graph.
*/
public final class GraphBuilder {
/** Logger. */
private static final Logger s_logger = LoggerFactory.getLogger(GraphBuilder.class);
private final AvailableOutputs _availableOutputs;
private final FunctionModelConfig _defaultConfig;
private final NodeDecorator _nodeDecorator;
private final DefaultImplementationProvider _defaultImplProvider;
private final Set<Class<?>> _availableComponents;
public GraphBuilder(AvailableOutputs availableOutputs,
AvailableImplementations availableImplementations,
Set<Class<?>> availableComponents,
FunctionModelConfig defaultConfig,
NodeDecorator nodeDecorator) {
_availableOutputs = ArgumentChecker.notNull(availableOutputs, "functionRepo");
_availableComponents = ArgumentChecker.notNull(availableComponents, "availableComponents");
_defaultConfig = ArgumentChecker.notNull(defaultConfig, "defaultConfig");
_nodeDecorator = ArgumentChecker.notNull(nodeDecorator, "nodeDecorator");
// TODO should this be an argument?
_defaultImplProvider = new DefaultImplementationProvider(availableImplementations);
}
//-------------------------------------------------------------------------
/**
* Builds a model of the functions needed to calculate view outputs for a set of input types.
*
* @param viewConfig the configuration to use, not null
* @param inputTypes the types of the inputs to the calculations, e.g. trades, positions, securities
* @return the model, not null
*/
public GraphModel build(ViewConfig viewConfig, Set<Class<?>> inputTypes) {
ArgumentChecker.notNull(viewConfig, "viewConfig");
ArgumentChecker.notNull(inputTypes, "inputTypes");
ImmutableMap.Builder<String, Map<Class<?>, FunctionModel>> builder = ImmutableMap.builder();
FunctionModelConfig modelConfig = viewConfig.getDefaultConfig();
FunctionModelConfig defaultConfig = CompositeFunctionModelConfig.compose(modelConfig, _defaultConfig, _defaultImplProvider);
for (ViewColumn column : viewConfig.getColumns()) {
Map<Class<?>, FunctionModel> functions = Maps.newHashMap();
for (Class<?> inputType : inputTypes) {
// if we need to support stateful functions this is the place to do it.
// the FunctionModel could flag if its tree contains any functions annotated as @Stateful and
// it wouldn't be eligible for sharing with other inputs
// would need to key on input ID instead of type. would need to assign ID for in-memory trades
FunctionModel existingFunction = functions.get(inputType);
OutputName outputName = column.getOutputName(inputType);
FunctionMetadata function =
outputName != null ?
_availableOutputs.getOutputFunction(outputName, inputType) :
null;
if (existingFunction == null && function != null) {
FunctionModelConfig columnConfig = column.getFunctionConfig(inputType);
FunctionModelConfig config = CompositeFunctionModelConfig.compose(columnConfig, defaultConfig);
FunctionModel functionModel = FunctionModel.forFunction(function, config, _availableComponents, _nodeDecorator);
functions.put(inputType, functionModel);
s_logger.debug("created function for {}/{}\n{}",
column.getName(), inputType.getSimpleName(), functionModel.prettyPrint());
} else {
if (outputName != null) {
s_logger.warn("No function registered as an available output for input type {}, output name '{}', column '{}'",
inputType.getSimpleName(), outputName.getName(), column.getName());
} else {
s_logger.warn("No function registered as an available output for input type {}, column '{}'",
inputType.getSimpleName(), column.getName());
}
functions.put(inputType, FunctionModel.forFunction(NoOutputFunction.METADATA));
}
}
builder.put(column.getName(), Collections.unmodifiableMap(functions));
}
// build the function models for non-portfolio outputs
ImmutableMap.Builder<String, FunctionModel> nonPortfolioFunctionModels = ImmutableMap.builder();
for (NonPortfolioOutput output : viewConfig.getNonPortfolioOutputs()) {
OutputName outputName = output.getOutput().getOutputName();
FunctionMetadata function = _availableOutputs.getOutputFunction(outputName);
if (function != null) {
FunctionModelConfig functionModelConfig = output.getOutput().getFunctionModelConfig();
FunctionModelConfig config = CompositeFunctionModelConfig.compose(functionModelConfig, defaultConfig);
FunctionModel functionModel = FunctionModel.forFunction(function, config, _availableComponents, _nodeDecorator);
nonPortfolioFunctionModels.put(output.getName(), functionModel);
s_logger.debug("created function for {}/{}\n{}", output.getName(), functionModel.prettyPrint());
} else {
nonPortfolioFunctionModels.put(output.getName(), FunctionModel.forFunction(NoOutputFunction.METADATA));
s_logger.warn("Failed to find function to provide output named {}", outputName);
}
}
return new GraphModel(builder.build(), nonPortfolioFunctionModels.build());
}
}
| sesame-engine/src/main/java/com/opengamma/sesame/graph/GraphBuilder.java | /**
* Copyright (C) 2013 - present by OpenGamma Inc. and the OpenGamma group of companies
*
* Please see distribution for license.
*/
package com.opengamma.sesame.graph;
import java.util.Collections;
import java.util.Map;
import java.util.Set;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.Maps;
import com.opengamma.sesame.OutputName;
import com.opengamma.sesame.config.CompositeFunctionModelConfig;
import com.opengamma.sesame.config.FunctionModelConfig;
import com.opengamma.sesame.config.NonPortfolioOutput;
import com.opengamma.sesame.config.ViewColumn;
import com.opengamma.sesame.config.ViewConfig;
import com.opengamma.sesame.function.AvailableImplementations;
import com.opengamma.sesame.function.AvailableOutputs;
import com.opengamma.sesame.function.DefaultImplementationProvider;
import com.opengamma.sesame.function.FunctionMetadata;
import com.opengamma.sesame.function.NoOutputFunction;
import com.opengamma.util.ArgumentChecker;
/**
* Builder for a graph.
*/
public final class GraphBuilder {
/** Logger. */
private static final Logger s_logger = LoggerFactory.getLogger(GraphBuilder.class);
private final AvailableOutputs _availableOutputs;
private final FunctionModelConfig _defaultConfig;
private final NodeDecorator _nodeDecorator;
private final DefaultImplementationProvider _defaultImplProvider;
private final Set<Class<?>> _availableComponents;
public GraphBuilder(AvailableOutputs availableOutputs,
AvailableImplementations availableImplementations,
Set<Class<?>> availableComponents,
FunctionModelConfig defaultConfig,
NodeDecorator nodeDecorator) {
_availableOutputs = ArgumentChecker.notNull(availableOutputs, "functionRepo");
_availableComponents = ArgumentChecker.notNull(availableComponents, "availableComponents");
_defaultConfig = ArgumentChecker.notNull(defaultConfig, "defaultConfig");
_nodeDecorator = ArgumentChecker.notNull(nodeDecorator, "nodeDecorator");
// TODO should this be an argument?
_defaultImplProvider = new DefaultImplementationProvider(availableImplementations);
}
//-------------------------------------------------------------------------
/**
* Builds a model of the functions needed to calculate view outputs for a set of input types.
*
* @param viewConfig the configuration to use, not null
* @param inputTypes the types of the inputs to the calculations, e.g. trades, positions, securities
* @return the model, not null
*/
public GraphModel build(ViewConfig viewConfig, Set<Class<?>> inputTypes) {
ArgumentChecker.notNull(viewConfig, "viewConfig");
ArgumentChecker.notNull(inputTypes, "inputTypes");
ImmutableMap.Builder<String, Map<Class<?>, FunctionModel>> builder = ImmutableMap.builder();
// TODO each column could easily be done in parallel
FunctionModelConfig modelConfig = viewConfig.getDefaultConfig();
FunctionModelConfig defaultConfig = CompositeFunctionModelConfig.compose(modelConfig, _defaultConfig, _defaultImplProvider);
for (ViewColumn column : viewConfig.getColumns()) {
Map<Class<?>, FunctionModel> functions = Maps.newHashMap();
for (Class<?> inputType : inputTypes) {
// if we need to support stateful functions this is the place to do it.
// the FunctionModel could flag if its tree contains any functions annotated as @Stateful and
// it wouldn't be eligible for sharing with other inputs
// would need to key on input ID instead of type. would need to assign ID for in-memory trades
FunctionModel existingFunction = functions.get(inputType);
OutputName outputName = column.getOutputName(inputType);
FunctionMetadata function = outputName == null ?
null :
_availableOutputs.getOutputFunction(outputName, inputType);
if (existingFunction == null && function != null) {
FunctionModelConfig columnConfig = column.getFunctionConfig(inputType);
FunctionModelConfig config = CompositeFunctionModelConfig.compose(columnConfig, defaultConfig);
FunctionModel functionModel = FunctionModel.forFunction(function, config, _availableComponents, _nodeDecorator);
functions.put(inputType, functionModel);
s_logger.debug("created function for {}/{}\n{}",
column.getName(), inputType.getSimpleName(), functionModel.prettyPrint());
} else {
s_logger.warn("No function available for column '{}' for input type {}", column, inputType.getSimpleName());
functions.put(inputType, FunctionModel.forFunction(NoOutputFunction.METADATA));
}
}
builder.put(column.getName(), Collections.unmodifiableMap(functions));
}
// build the function models for non-portfolio outputs
ImmutableMap.Builder<String, FunctionModel> nonPortfolioFunctionModels = ImmutableMap.builder();
for (NonPortfolioOutput output : viewConfig.getNonPortfolioOutputs()) {
OutputName outputName = output.getOutput().getOutputName();
FunctionMetadata function = _availableOutputs.getOutputFunction(outputName);
if (function != null) {
FunctionModelConfig functionModelConfig = output.getOutput().getFunctionModelConfig();
FunctionModelConfig config = CompositeFunctionModelConfig.compose(functionModelConfig, defaultConfig);
FunctionModel functionModel = FunctionModel.forFunction(function, config, _availableComponents, _nodeDecorator);
nonPortfolioFunctionModels.put(output.getName(), functionModel);
s_logger.debug("created function for {}/{}\n{}", output.getName(), functionModel.prettyPrint());
} else {
nonPortfolioFunctionModels.put(output.getName(), FunctionModel.forFunction(NoOutputFunction.METADATA));
s_logger.warn("Failed to find function to provide output named {}", outputName);
}
}
return new GraphModel(builder.build(), nonPortfolioFunctionModels.build());
}
}
| SSM-314 - Improved logging in GraphBuilder when no function is available
| sesame-engine/src/main/java/com/opengamma/sesame/graph/GraphBuilder.java | SSM-314 - Improved logging in GraphBuilder when no function is available | <ide><path>esame-engine/src/main/java/com/opengamma/sesame/graph/GraphBuilder.java
<ide> ArgumentChecker.notNull(viewConfig, "viewConfig");
<ide> ArgumentChecker.notNull(inputTypes, "inputTypes");
<ide> ImmutableMap.Builder<String, Map<Class<?>, FunctionModel>> builder = ImmutableMap.builder();
<del> // TODO each column could easily be done in parallel
<ide> FunctionModelConfig modelConfig = viewConfig.getDefaultConfig();
<ide> FunctionModelConfig defaultConfig = CompositeFunctionModelConfig.compose(modelConfig, _defaultConfig, _defaultImplProvider);
<ide>
<ide>
<ide> FunctionModel existingFunction = functions.get(inputType);
<ide> OutputName outputName = column.getOutputName(inputType);
<del> FunctionMetadata function = outputName == null ?
<del> null :
<del> _availableOutputs.getOutputFunction(outputName, inputType);
<add> FunctionMetadata function =
<add> outputName != null ?
<add> _availableOutputs.getOutputFunction(outputName, inputType) :
<add> null;
<ide>
<ide> if (existingFunction == null && function != null) {
<ide> FunctionModelConfig columnConfig = column.getFunctionConfig(inputType);
<ide> s_logger.debug("created function for {}/{}\n{}",
<ide> column.getName(), inputType.getSimpleName(), functionModel.prettyPrint());
<ide> } else {
<del> s_logger.warn("No function available for column '{}' for input type {}", column, inputType.getSimpleName());
<add> if (outputName != null) {
<add> s_logger.warn("No function registered as an available output for input type {}, output name '{}', column '{}'",
<add> inputType.getSimpleName(), outputName.getName(), column.getName());
<add> } else {
<add> s_logger.warn("No function registered as an available output for input type {}, column '{}'",
<add> inputType.getSimpleName(), column.getName());
<add> }
<ide> functions.put(inputType, FunctionModel.forFunction(NoOutputFunction.METADATA));
<ide> }
<ide> } |
|
Java | agpl-3.0 | 77941f900adabbbfe53572287864eb69a88f4d00 | 0 | clintonhealthaccess/lmis-moz-mobile,clintonhealthaccess/lmis-moz-mobile,clintonhealthaccess/lmis-moz-mobile,clintonhealthaccess/lmis-moz-mobile | /*
* This program is part of the OpenLMIS logistics management information
* system platform software.
*
* Copyright © 2015 ThoughtWorks, Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published
* by the Free Software Foundation, either version 3 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 Affero General Public License for more details. You should
* have received a copy of the GNU Affero General Public License along with
* this program. If not, see http://www.gnu.org/licenses. For additional
* information contact [email protected]
*/
package org.openlmis.core.persistence;
import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.util.Log;
import com.j256.ormlite.android.apptools.OrmLiteSqliteOpenHelper;
import com.j256.ormlite.support.ConnectionSource;
import org.openlmis.core.persistence.migrations.AddActiveColumnToProductTable;
import org.openlmis.core.persistence.migrations.AddCategoryColumnToProductPrograms;
import org.openlmis.core.persistence.migrations.AddCmmTable;
import org.openlmis.core.persistence.migrations.AddCreatedTimeToStockMovement;
import org.openlmis.core.persistence.migrations.AddEmergencyColumnToRnr;
import org.openlmis.core.persistence.migrations.AddFacilityIdToUser;
import org.openlmis.core.persistence.migrations.AddInventoryTable;
import org.openlmis.core.persistence.migrations.AddIsArchivedToProduct;
import org.openlmis.core.persistence.migrations.AddIsCustomColumnToRegime;
import org.openlmis.core.persistence.migrations.AddIsEmergencyColumnToProgram;
import org.openlmis.core.persistence.migrations.AddIsKitColumnToProduct;
import org.openlmis.core.persistence.migrations.AddLowStockAvgColumnToStockCardTable;
import org.openlmis.core.persistence.migrations.AddNewPrograms;
import org.openlmis.core.persistence.migrations.AddParentCodeToProgramTable;
import org.openlmis.core.persistence.migrations.AddSignatureFieldInStockMovementItemTable;
import org.openlmis.core.persistence.migrations.AddSubmittedDateToRnRForm;
import org.openlmis.core.persistence.migrations.AddSyncErrorsMessageTable;
import org.openlmis.core.persistence.migrations.AddSyncTagToStockMovementItem;
import org.openlmis.core.persistence.migrations.ChangeMovementReasonToCode;
import org.openlmis.core.persistence.migrations.ChangeProgramTableName;
import org.openlmis.core.persistence.migrations.ConvertEssMedsToVIAProgram;
import org.openlmis.core.persistence.migrations.CreateDraftInventoryTable;
import org.openlmis.core.persistence.migrations.CreateDummyRegimes;
import org.openlmis.core.persistence.migrations.CreateInitTables;
import org.openlmis.core.persistence.migrations.CreateKitProductsTable;
import org.openlmis.core.persistence.migrations.CreateProductProgramsTable;
import org.openlmis.core.persistence.migrations.CreateRegimeShortCodeTable;
import org.openlmis.core.persistence.migrations.CreateRnRFormSignature;
import org.openlmis.core.persistence.migrations.SetQuantityOfStockMovementForInitialInventory;
import org.openlmis.core.persistence.migrations.UpdateAvgColumn;
import org.openlmis.core.persistence.migrations.UpdateCategoryColumnForMMIAProducts;
import org.openlmis.core.persistence.migrations.UpdateCreateTimeAndUpdateTime;
import org.openlmis.core.persistence.migrations.UpdateProductsFalseValueToZero;
import org.openlmis.core.persistence.migrations.UpdateRegimenType;
import java.util.ArrayList;
import java.util.List;
public final class LmisSqliteOpenHelper extends OrmLiteSqliteOpenHelper {
private static final List<Migration> MIGRATIONS = new ArrayList<Migration>() {
{
add(new CreateInitTables());
add(new CreateDummyRegimes());
add(new AddSignatureFieldInStockMovementItemTable());
add(new AddFacilityIdToUser());
add(new AddSyncTagToStockMovementItem());
add(new ChangeMovementReasonToCode());
add(new AddSubmittedDateToRnRForm());
add(new SetQuantityOfStockMovementForInitialInventory());
add(new CreateRnRFormSignature());
add(new CreateDraftInventoryTable());
add(new AddIsArchivedToProduct());
add(new AddCreatedTimeToStockMovement());
add(new AddSyncErrorsMessageTable());
add(new AddActiveColumnToProductTable());
add(new AddIsKitColumnToProduct());
add(new CreateKitProductsTable());
add(new UpdateProductsFalseValueToZero());
add(new UpdateCreateTimeAndUpdateTime());
add(new AddInventoryTable());
add(new AddParentCodeToProgramTable());
add(new UpdateRegimenType());
add(new AddIsCustomColumnToRegime());
add(new CreateRegimeShortCodeTable());
add(new ChangeProgramTableName());
add(new CreateProductProgramsTable());
add(new AddIsEmergencyColumnToProgram());
add(new AddNewPrograms());
add(new ConvertEssMedsToVIAProgram());
add(new AddEmergencyColumnToRnr());
add(new AddCategoryColumnToProductPrograms());
add(new AddLowStockAvgColumnToStockCardTable());
add(new UpdateCategoryColumnForMMIAProducts());
add(new AddCmmTable());
add(new UpdateAvgColumn());
}
};
private static int instanceCount = 0;
private static LmisSqliteOpenHelper _helperInstance;
private LmisSqliteOpenHelper(Context context) {
super(context, "lmis_db", null, MIGRATIONS.size());
++instanceCount;
Log.d("LmisSqliteOpenHelper", "Instance Created : total count : " + instanceCount);
}
public static synchronized LmisSqliteOpenHelper getInstance(Context context) {
if (_helperInstance == null) {
_helperInstance = new LmisSqliteOpenHelper(context);
}
return _helperInstance;
}
public static void closeHelper() {
_helperInstance = null;
--instanceCount;
Log.d("LmisSqliteOpenHelper", "Instance Destroyed : total count : " + instanceCount);
}
@Override
public void onCreate(SQLiteDatabase database, ConnectionSource connectionSource) {
for (Migration migration : MIGRATIONS) {
Log.i("DB Creation", "Upgrading migration [" + migration.getClass().getSimpleName() + "]");
migration.setSQLiteDatabase(database);
migration.up();
}
}
@Override
public void onUpgrade(SQLiteDatabase database, ConnectionSource connectionSource, int oldVersion, int newVersion) {
for (int currentVersion = oldVersion; currentVersion < newVersion; currentVersion++) {
Migration migration = MIGRATIONS.get(currentVersion);
Log.i("DB Migration", "Upgrading migration [" + migration.getClass().getSimpleName() + "]");
migration.setSQLiteDatabase(database);
migration.up();
}
}
@Override
public void onDowngrade(SQLiteDatabase database, int oldVersion, int newVersion) {
throw new RuntimeException("Unexpected downgrade happened, users are not supposed to obtain older versions!!!");
}
@Override
public void close() {
super.close();
getWritableDatabase().close();
closeHelper();
}
}
| app/src/main/java/org/openlmis/core/persistence/LmisSqliteOpenHelper.java | /*
* This program is part of the OpenLMIS logistics management information
* system platform software.
*
* Copyright © 2015 ThoughtWorks, Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published
* by the Free Software Foundation, either version 3 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 Affero General Public License for more details. You should
* have received a copy of the GNU Affero General Public License along with
* this program. If not, see http://www.gnu.org/licenses. For additional
* information contact [email protected]
*/
package org.openlmis.core.persistence;
import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.util.Log;
import com.j256.ormlite.android.apptools.OrmLiteSqliteOpenHelper;
import com.j256.ormlite.support.ConnectionSource;
import org.openlmis.core.persistence.migrations.AddActiveColumnToProductTable;
import org.openlmis.core.persistence.migrations.AddCategoryColumnToProductPrograms;
import org.openlmis.core.persistence.migrations.AddCmmTable;
import org.openlmis.core.persistence.migrations.AddCreatedTimeToStockMovement;
import org.openlmis.core.persistence.migrations.AddEmergencyColumnToRnr;
import org.openlmis.core.persistence.migrations.AddFacilityIdToUser;
import org.openlmis.core.persistence.migrations.AddInventoryTable;
import org.openlmis.core.persistence.migrations.AddIsArchivedToProduct;
import org.openlmis.core.persistence.migrations.AddIsCustomColumnToRegime;
import org.openlmis.core.persistence.migrations.AddIsEmergencyColumnToProgram;
import org.openlmis.core.persistence.migrations.AddIsKitColumnToProduct;
import org.openlmis.core.persistence.migrations.AddLowStockAvgColumnToStockCardTable;
import org.openlmis.core.persistence.migrations.AddNewPrograms;
import org.openlmis.core.persistence.migrations.AddParentCodeToProgramTable;
import org.openlmis.core.persistence.migrations.AddSignatureFieldInStockMovementItemTable;
import org.openlmis.core.persistence.migrations.AddSubmittedDateToRnRForm;
import org.openlmis.core.persistence.migrations.AddSyncErrorsMessageTable;
import org.openlmis.core.persistence.migrations.AddSyncTagToStockMovementItem;
import org.openlmis.core.persistence.migrations.ChangeMovementReasonToCode;
import org.openlmis.core.persistence.migrations.ChangeProgramTableName;
import org.openlmis.core.persistence.migrations.ConvertEssMedsToVIAProgram;
import org.openlmis.core.persistence.migrations.CreateDraftInventoryTable;
import org.openlmis.core.persistence.migrations.CreateDummyRegimes;
import org.openlmis.core.persistence.migrations.CreateInitTables;
import org.openlmis.core.persistence.migrations.CreateKitProductsTable;
import org.openlmis.core.persistence.migrations.CreateProductProgramsTable;
import org.openlmis.core.persistence.migrations.CreateRegimeShortCodeTable;
import org.openlmis.core.persistence.migrations.CreateRnRFormSignature;
import org.openlmis.core.persistence.migrations.SetQuantityOfStockMovementForInitialInventory;
import org.openlmis.core.persistence.migrations.UpdateAvgColumn;
import org.openlmis.core.persistence.migrations.UpdateCategoryColumnForMMIAProducts;
import org.openlmis.core.persistence.migrations.UpdateCreateTimeAndUpdateTime;
import org.openlmis.core.persistence.migrations.UpdateProductsFalseValueToZero;
import org.openlmis.core.persistence.migrations.UpdateRegimenType;
import java.util.ArrayList;
import java.util.List;
public final class LmisSqliteOpenHelper extends OrmLiteSqliteOpenHelper {
private static final List<Migration> MIGRATIONS = new ArrayList<Migration>() {
{
add(new CreateInitTables());
add(new CreateDummyRegimes());
add(new AddSignatureFieldInStockMovementItemTable());
add(new AddFacilityIdToUser());
add(new AddSyncTagToStockMovementItem());
add(new ChangeMovementReasonToCode());
add(new AddSubmittedDateToRnRForm());
add(new SetQuantityOfStockMovementForInitialInventory());
add(new CreateRnRFormSignature());
add(new CreateDraftInventoryTable());
add(new AddIsArchivedToProduct());
add(new AddCreatedTimeToStockMovement());
add(new AddSyncErrorsMessageTable());
add(new AddActiveColumnToProductTable());
add(new AddIsKitColumnToProduct());
add(new CreateKitProductsTable());
add(new UpdateProductsFalseValueToZero());
add(new UpdateCreateTimeAndUpdateTime());
add(new AddInventoryTable());
add(new AddParentCodeToProgramTable());
add(new UpdateRegimenType());
add(new AddIsCustomColumnToRegime());
add(new CreateRegimeShortCodeTable());
add(new ChangeProgramTableName());
add(new CreateProductProgramsTable());
add(new AddIsEmergencyColumnToProgram());
add(new AddNewPrograms());
add(new ConvertEssMedsToVIAProgram());
add(new AddEmergencyColumnToRnr());
add(new AddCategoryColumnToProductPrograms());
add(new AddLowStockAvgColumnToStockCardTable());
add(new UpdateCategoryColumnForMMIAProducts());
add(new UpdateAvgColumn());
add(new AddCmmTable());
}
};
private static int instanceCount = 0;
private static LmisSqliteOpenHelper _helperInstance;
private LmisSqliteOpenHelper(Context context) {
super(context, "lmis_db", null, MIGRATIONS.size());
++instanceCount;
Log.d("LmisSqliteOpenHelper", "Instance Created : total count : " + instanceCount);
}
public static synchronized LmisSqliteOpenHelper getInstance(Context context) {
if (_helperInstance == null) {
_helperInstance = new LmisSqliteOpenHelper(context);
}
return _helperInstance;
}
public static void closeHelper() {
_helperInstance = null;
--instanceCount;
Log.d("LmisSqliteOpenHelper", "Instance Destroyed : total count : " + instanceCount);
}
@Override
public void onCreate(SQLiteDatabase database, ConnectionSource connectionSource) {
for (Migration migration : MIGRATIONS) {
Log.i("DB Creation", "Upgrading migration [" + migration.getClass().getSimpleName() + "]");
migration.setSQLiteDatabase(database);
migration.up();
}
}
@Override
public void onUpgrade(SQLiteDatabase database, ConnectionSource connectionSource, int oldVersion, int newVersion) {
for (int currentVersion = oldVersion; currentVersion < newVersion; currentVersion++) {
Migration migration = MIGRATIONS.get(currentVersion);
Log.i("DB Migration", "Upgrading migration [" + migration.getClass().getSimpleName() + "]");
migration.setSQLiteDatabase(database);
migration.up();
}
}
@Override
public void onDowngrade(SQLiteDatabase database, int oldVersion, int newVersion) {
throw new RuntimeException("Unexpected downgrade happened, users are not supposed to obtain older versions!!!");
}
@Override
public void close() {
super.close();
getWritableDatabase().close();
closeHelper();
}
}
| MG - #000 - UpdateAvgColumn migration should behind the AddCmmTable migration cause UpdateAvgColumn would insert date to CMM
| app/src/main/java/org/openlmis/core/persistence/LmisSqliteOpenHelper.java | MG - #000 - UpdateAvgColumn migration should behind the AddCmmTable migration cause UpdateAvgColumn would insert date to CMM | <ide><path>pp/src/main/java/org/openlmis/core/persistence/LmisSqliteOpenHelper.java
<ide> add(new AddCategoryColumnToProductPrograms());
<ide> add(new AddLowStockAvgColumnToStockCardTable());
<ide> add(new UpdateCategoryColumnForMMIAProducts());
<add> add(new AddCmmTable());
<ide> add(new UpdateAvgColumn());
<del> add(new AddCmmTable());
<ide> }
<ide> };
<ide> private static int instanceCount = 0; |
|
Java | agpl-3.0 | error: pathspec 'src/test/java/com/akiban/cserver/itests/bugs/bug705063/BadTableStatRequestIT.java' did not match any file(s) known to git
| 57b2c733ba1b59c7fb9950afb198d0e27bff034d | 1 | ngaut/sql-layer,qiuyesuifeng/sql-layer,qiuyesuifeng/sql-layer,qiuyesuifeng/sql-layer,relateiq/sql-layer,ngaut/sql-layer,qiuyesuifeng/sql-layer,wfxiang08/sql-layer-1,wfxiang08/sql-layer-1,relateiq/sql-layer,jaytaylor/sql-layer,ngaut/sql-layer,jaytaylor/sql-layer,shunwang/sql-layer-1,jaytaylor/sql-layer,shunwang/sql-layer-1,relateiq/sql-layer,shunwang/sql-layer-1,wfxiang08/sql-layer-1,relateiq/sql-layer,wfxiang08/sql-layer-1,jaytaylor/sql-layer,shunwang/sql-layer-1,ngaut/sql-layer | package com.akiban.cserver.itests.bugs.bug705063;
import com.akiban.cserver.InvalidOperationException;
import com.akiban.cserver.api.common.NoSuchTableException;
import com.akiban.cserver.api.common.TableId;
import com.akiban.cserver.itests.ApiTestBase;
import org.junit.Test;
public final class BadTableStatRequestIT extends ApiTestBase {
@Test(expected= NoSuchTableException.class)
public void noTablesDefined_byID() throws InvalidOperationException {
dml().getTableStatistics(session, TableId.of(1), false);
}
@Test(expected= NoSuchTableException.class)
public void noTablesDefined_byName() throws InvalidOperationException {
dml().getTableStatistics(session, TableId.of("schema1", "table1"), false);
}
@Test(expected= NoSuchTableException.class)
public void wrongTableIdDefined_byID() throws InvalidOperationException {
TableId created = createATable();
final TableId wrong;
try {
wrong = TableId.of( 31 + ddl().resolveTableId(created).getTableId(null) );
} catch (InvalidOperationException e) {
throw new TestException(e);
}
dml().getTableStatistics(session, wrong, false);
}
@Test(expected= NoSuchTableException.class)
public void wrongTableIdDefined_byName() throws InvalidOperationException {
createATable();
dml().getTableStatistics(session, TableId.of("schema1", "table27"), false);
}
private TableId createATable() {
try {
return createTable("schema1", "test1", "id int key");
} catch (InvalidOperationException e) {
throw new TestException(e);
}
}
}
| src/test/java/com/akiban/cserver/itests/bugs/bug705063/BadTableStatRequestIT.java | Adding test to address a table stat request, as per the original bug. Failing when looking up by int. | src/test/java/com/akiban/cserver/itests/bugs/bug705063/BadTableStatRequestIT.java | Adding test to address a table stat request, as per the original bug. Failing when looking up by int. | <ide><path>rc/test/java/com/akiban/cserver/itests/bugs/bug705063/BadTableStatRequestIT.java
<add>package com.akiban.cserver.itests.bugs.bug705063;
<add>
<add>import com.akiban.cserver.InvalidOperationException;
<add>import com.akiban.cserver.api.common.NoSuchTableException;
<add>import com.akiban.cserver.api.common.TableId;
<add>import com.akiban.cserver.itests.ApiTestBase;
<add>import org.junit.Test;
<add>
<add>public final class BadTableStatRequestIT extends ApiTestBase {
<add> @Test(expected= NoSuchTableException.class)
<add> public void noTablesDefined_byID() throws InvalidOperationException {
<add> dml().getTableStatistics(session, TableId.of(1), false);
<add> }
<add>
<add> @Test(expected= NoSuchTableException.class)
<add> public void noTablesDefined_byName() throws InvalidOperationException {
<add> dml().getTableStatistics(session, TableId.of("schema1", "table1"), false);
<add> }
<add>
<add> @Test(expected= NoSuchTableException.class)
<add> public void wrongTableIdDefined_byID() throws InvalidOperationException {
<add> TableId created = createATable();
<add> final TableId wrong;
<add> try {
<add> wrong = TableId.of( 31 + ddl().resolveTableId(created).getTableId(null) );
<add> } catch (InvalidOperationException e) {
<add> throw new TestException(e);
<add> }
<add>
<add> dml().getTableStatistics(session, wrong, false);
<add> }
<add>
<add> @Test(expected= NoSuchTableException.class)
<add> public void wrongTableIdDefined_byName() throws InvalidOperationException {
<add> createATable();
<add> dml().getTableStatistics(session, TableId.of("schema1", "table27"), false);
<add> }
<add>
<add> private TableId createATable() {
<add> try {
<add> return createTable("schema1", "test1", "id int key");
<add> } catch (InvalidOperationException e) {
<add> throw new TestException(e);
<add> }
<add> }
<add>} |
|
JavaScript | mit | 511db7cd8a35d94baed6fdb3212e949f58a5c073 | 0 | ember-engines/ember-asset-loader,ember-engines/ember-asset-loader,ember-engines/ember-asset-loader | let cachedRequireEntries;
let cachedScriptTags;
let cachedLinkTags;
/**
* Determines whether an array contains the provided item.
*
* @param {Array} array
* @param {Any} item
* @return {Boolean}
*/
function has(array, item) {
return array.indexOf(item) !== -1;
}
/**
* Removes a DOM Node from the document.
*
* @param {Node} node
* @return {Void}
*/
function removeNode(node) {
node.parentNode.removeChild(node);
}
/**
* Converts an iterable object into an actual Array.
*
* @param {Iterable} iterable
* @return {Array}
*/
function toArray(iterable) {
return Array.prototype.slice.call(iterable);
}
/**
* Returns all of the HTML Elements matching a given selector as an array.
*
* @param {String} selector
* @return {Array<HTMLElement>}
*/
function getAll(selector) {
const htmlCollection = document.querySelectorAll(selector);
return toArray(htmlCollection);
}
/**
* Deletes an entry from require's list of modules.
*
* @param {String} entry
* @return {Void}
*/
function resetRequireEntry(entry) {
delete self.requirejs.entries[entry];
}
/**
* Compares two arrays, if they're different, invokes a callback for each
* entry that does not appear in the initial array.
*
* @param {Array} initial
* @param {Array} current
* @param {Function} diffHandler
* @return {Void}
*/
function compareAndIterate(initial, current, diffHandler) {
if (initial.length < current.length) {
for (let i = 0; i < current.length; i++) {
let entry = current[i];
if (!has(initial, entry)) {
diffHandler(entry);
}
}
}
}
/**
* Gets the current loaded asset state including scripts, links, and require
* modules.
*
* @return {Object}
*/
export function getLoadedAssetState() {
return {
requireEntries: Object.keys(self.requirejs.entries),
scripts: getAll('script'),
links: getAll('link')
};
}
/**
* Caches the current loaded asset state with regards to links, scripts, and JS
* modules currently present.
*
* @return {Void}
*/
export function cacheLoadedAssetState() {
({
requireEntries: cachedRequireEntries,
scripts: cachedScriptTags,
links: cachedLinkTags
} = getLoadedAssetState());
}
/**
* Restores the loaded asset state to the previous cached value with regards to
* links, scripts, and JS modules.
*
* @return {Void}
*/
export function resetLoadedAssetState() {
const {
requireEntries: currentRequireEntries,
scripts: currentScriptTags,
links: currentLinkTags
} = getLoadedAssetState();
compareAndIterate(cachedRequireEntries, currentRequireEntries, resetRequireEntry);
compareAndIterate(cachedScriptTags, currentScriptTags, removeNode);
compareAndIterate(cachedLinkTags, currentLinkTags, removeNode);
}
| addon-test-support/loaded-asset-state.js | import Ember from 'ember';
let cachedRequireEntries;
let cachedScriptTags;
let cachedLinkTags;
/**
* Determines whether an array contains the provided item.
*
* @param {Array} array
* @param {Any} item
* @return {Boolean}
*/
function has(array, item) {
return array.indexOf(item) !== -1;
}
/**
* Removes a DOM Node from the document.
*
* @param {Node} node
* @return {Void}
*/
function removeNode(node) {
node.parentNode.removeChild(node);
}
/**
* Converts an iterable object into an actual Array.
*
* @param {Iterable} iterable
* @return {Array}
*/
function toArray(iterable) {
return Array.prototype.slice.call(iterable);
}
/**
* Returns all of the HTML Elements matching a given selector as an array.
*
* @param {String} selector
* @return {Array<HTMLElement>}
*/
function getAll(selector) {
const htmlCollection = document.querySelectorAll(selector);
return toArray(htmlCollection);
}
/**
* Deletes an entry from require's list of modules.
*
* @param {String} entry
* @return {Void}
*/
function resetRequireEntry(entry) {
delete self.requirejs.entries[entry];
}
/**
* Compares two arrays, if they're different, invokes a callback for each
* entry that does not appear in the initial array.
*
* @param {Array} initial
* @param {Array} current
* @param {Function} diffHandler
* @return {Void}
*/
function compareAndIterate(initial, current, diffHandler) {
if (initial.length < current.length) {
for (let i = 0; i < current.length; i++) {
let entry = current[i];
if (!has(initial, entry)) {
diffHandler(entry);
}
}
}
}
/**
* Gets the current loaded asset state including scripts, links, and require
* modules.
*
* @return {Object}
*/
export function getLoadedAssetState() {
return {
requireEntries: Object.keys(self.requirejs.entries),
scripts: getAll('script'),
links: getAll('link')
};
}
/**
* Caches the current loaded asset state with regards to links, scripts, and JS
* modules currently present.
*
* @return {Void}
*/
export function cacheLoadedAssetState() {
({
requireEntries: cachedRequireEntries,
scripts: cachedScriptTags,
links: cachedLinkTags
} = getLoadedAssetState());
}
/**
* Restores the loaded asset state to the previous cached value with regards to
* links, scripts, and JS modules.
*
* @return {Void}
*/
export function resetLoadedAssetState() {
const {
requireEntries: currentRequireEntries,
scripts: currentScriptTags,
links: currentLinkTags
} = getLoadedAssetState();
compareAndIterate(cachedRequireEntries, currentRequireEntries, resetRequireEntry);
compareAndIterate(cachedScriptTags, currentScriptTags, removeNode);
compareAndIterate(cachedLinkTags, currentLinkTags, removeNode);
}
| Removes ember import
| addon-test-support/loaded-asset-state.js | Removes ember import | <ide><path>ddon-test-support/loaded-asset-state.js
<del>import Ember from 'ember';
<del>
<ide> let cachedRequireEntries;
<ide> let cachedScriptTags;
<ide> let cachedLinkTags; |
|
Java | apache-2.0 | 664c0a20fdc102da565a3a4908e26243851a460d | 0 | KonkerLabs/konker-platform,KonkerLabs/konker-platform,KonkerLabs/konker-platform,KonkerLabs/konker-platform,KonkerLabs/konker-platform | package com.konkerlabs.platform.registry.api.config;
import java.util.Arrays;
import java.util.Map;
import org.springframework.boot.autoconfigure.web.DefaultErrorAttributes;
import org.springframework.boot.autoconfigure.web.ErrorAttributes;
import org.springframework.context.MessageSource;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.support.ReloadableResourceBundleMessageSource;
import org.springframework.http.MediaType;
import org.springframework.web.context.request.RequestAttributes;
import org.springframework.web.servlet.config.annotation.ContentNegotiationConfigurer;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
import com.konkerlabs.platform.registry.api.web.interceptor.RequestResponseInterceptor;
@Configuration
public class WebMvcConfig extends WebMvcConfigurerAdapter {
@Bean(name = "messageSource")
public MessageSource getMessageSource() {
ReloadableResourceBundleMessageSource messageSource = new ReloadableResourceBundleMessageSource();
messageSource.addBasenames("classpath:/messages/alert-triggers");
messageSource.addBasenames("classpath:/messages/applications");
messageSource.addBasenames("classpath:/messages/device-model");
messageSource.addBasenames("classpath:/messages/devices");
messageSource.addBasenames("classpath:/messages/devices-config");
messageSource.addBasenames("classpath:/messages/gateways");
messageSource.addBasenames("classpath:/messages/locations");
messageSource.addBasenames("classpath:/messages/rest-destination");
messageSource.addBasenames("classpath:/messages/routes");
messageSource.addBasenames("classpath:/messages/transformations");
messageSource.addBasenames("classpath:/messages/users");
messageSource.addBasenames("classpath:/messages/tenants");
messageSource.addBasenames("classpath:/messages/health-alert");
messageSource.addBasenames("classpath:/mail/MailMessages");
messageSource.addBasenames("classpath:/messages/private-storage");
messageSource.addBasenames("classpath:/messages/global");
messageSource.setDefaultEncoding("UTF-8");
return messageSource;
}
@Bean
public ErrorAttributes errorAttributes() {
return new DefaultErrorAttributes() {
@Override
public Map<String, Object> getErrorAttributes(RequestAttributes requestAttributes,
boolean includeStackTrace) {
Map<String, Object> errorAttributes = super.getErrorAttributes(requestAttributes, includeStackTrace);
errorAttributes.remove("path");
errorAttributes.remove("exceptions");
errorAttributes.remove("error");
errorAttributes.put("code", errorAttributes.get("status"));
errorAttributes.put("status", "error");
Object message = errorAttributes.get("message");
errorAttributes.put("messages", Arrays.asList(message));
errorAttributes.remove("message");
return errorAttributes;
}
};
}
@Bean
public RequestResponseInterceptor requestResponseInterceptor() {
return new RequestResponseInterceptor();
}
@Override
public void addInterceptors(InterceptorRegistry registry) {
registry.addInterceptor(requestResponseInterceptor()).addPathPatterns("/applications/*", "/users/*");
}
@Override
public void configureContentNegotiation(ContentNegotiationConfigurer configurer) {
configurer.favorPathExtension(true)
.favorParameter(false)
.ignoreAcceptHeader(false)
.useJaf(false)
.defaultContentType(MediaType.APPLICATION_JSON)
.mediaType("xml", MediaType.APPLICATION_XML)
.mediaType("json", MediaType.APPLICATION_JSON);
}
}
| konker.registry.api/src/main/java/com/konkerlabs/platform/registry/api/config/WebMvcConfig.java | package com.konkerlabs.platform.registry.api.config;
import java.util.Arrays;
import java.util.Map;
import org.springframework.boot.autoconfigure.web.DefaultErrorAttributes;
import org.springframework.boot.autoconfigure.web.ErrorAttributes;
import org.springframework.context.MessageSource;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.support.ReloadableResourceBundleMessageSource;
import org.springframework.web.context.request.RequestAttributes;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
import com.konkerlabs.platform.registry.api.web.interceptor.RequestResponseInterceptor;
@Configuration
public class WebMvcConfig extends WebMvcConfigurerAdapter {
@Bean(name = "messageSource")
public MessageSource getMessageSource() {
ReloadableResourceBundleMessageSource messageSource = new ReloadableResourceBundleMessageSource();
messageSource.addBasenames("classpath:/messages/alert-triggers");
messageSource.addBasenames("classpath:/messages/applications");
messageSource.addBasenames("classpath:/messages/device-model");
messageSource.addBasenames("classpath:/messages/devices");
messageSource.addBasenames("classpath:/messages/devices-config");
messageSource.addBasenames("classpath:/messages/gateways");
messageSource.addBasenames("classpath:/messages/locations");
messageSource.addBasenames("classpath:/messages/rest-destination");
messageSource.addBasenames("classpath:/messages/routes");
messageSource.addBasenames("classpath:/messages/transformations");
messageSource.addBasenames("classpath:/messages/users");
messageSource.addBasenames("classpath:/messages/tenants");
messageSource.addBasenames("classpath:/messages/health-alert");
messageSource.addBasenames("classpath:/mail/MailMessages");
messageSource.addBasenames("classpath:/messages/private-storage");
messageSource.addBasenames("classpath:/messages/global");
messageSource.setDefaultEncoding("UTF-8");
return messageSource;
}
@Bean
public ErrorAttributes errorAttributes() {
return new DefaultErrorAttributes() {
@Override
public Map<String, Object> getErrorAttributes(RequestAttributes requestAttributes,
boolean includeStackTrace) {
Map<String, Object> errorAttributes = super.getErrorAttributes(requestAttributes, includeStackTrace);
errorAttributes.remove("path");
errorAttributes.remove("exceptions");
errorAttributes.remove("error");
errorAttributes.put("code", errorAttributes.get("status"));
errorAttributes.put("status", "error");
Object message = errorAttributes.get("message");
errorAttributes.put("messages", Arrays.asList(message));
errorAttributes.remove("message");
return errorAttributes;
}
};
}
@Bean
public RequestResponseInterceptor requestResponseInterceptor() {
return new RequestResponseInterceptor();
}
@Override
public void addInterceptors(InterceptorRegistry registry) {
registry.addInterceptor(requestResponseInterceptor()).addPathPatterns("/applications/*", "/users/*");
}
}
| Add ContentNegotiationManager to fix problem in get method with email in path
| konker.registry.api/src/main/java/com/konkerlabs/platform/registry/api/config/WebMvcConfig.java | Add ContentNegotiationManager to fix problem in get method with email in path | <ide><path>onker.registry.api/src/main/java/com/konkerlabs/platform/registry/api/config/WebMvcConfig.java
<ide> import org.springframework.context.annotation.Bean;
<ide> import org.springframework.context.annotation.Configuration;
<ide> import org.springframework.context.support.ReloadableResourceBundleMessageSource;
<add>import org.springframework.http.MediaType;
<ide> import org.springframework.web.context.request.RequestAttributes;
<add>import org.springframework.web.servlet.config.annotation.ContentNegotiationConfigurer;
<ide> import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
<ide> import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
<ide>
<ide> registry.addInterceptor(requestResponseInterceptor()).addPathPatterns("/applications/*", "/users/*");
<ide> }
<ide>
<add> @Override
<add> public void configureContentNegotiation(ContentNegotiationConfigurer configurer) {
<add> configurer.favorPathExtension(true)
<add> .favorParameter(false)
<add> .ignoreAcceptHeader(false)
<add> .useJaf(false)
<add> .defaultContentType(MediaType.APPLICATION_JSON)
<add> .mediaType("xml", MediaType.APPLICATION_XML)
<add> .mediaType("json", MediaType.APPLICATION_JSON);
<add> }
<ide> } |
|
Java | bsd-3-clause | 2e986c16fa343f34816562ed38935387313bf581 | 0 | NCIP/caaers,CBIIT/caaers,CBIIT/caaers,NCIP/caaers,CBIIT/caaers,NCIP/caaers,CBIIT/caaers,NCIP/caaers,CBIIT/caaers | /**
*
*/
package gov.nih.nci.cabig.caaers.grid;
import gov.nih.nci.cabig.caaers.CaaersDbTestCase;
import gov.nih.nci.cabig.caaers.CaaersTestCase;
import gov.nih.nci.cabig.caaers.dao.OrganizationDao;
import gov.nih.nci.cabig.caaers.domain.repository.OrganizationRepository;
import gov.nih.nci.cabig.caaers.dao.ParticipantDao;
import gov.nih.nci.cabig.caaers.dao.StudyDao;
import gov.nih.nci.cabig.caaers.dao.StudyParticipantAssignmentDao;
import gov.nih.nci.cabig.caaers.security.StudyParticipantAssignmentAspect;
import gov.nih.nci.cabig.caaers.utils.ConfigProperty;
import gov.nih.nci.cabig.ctms.audit.dao.AuditHistoryRepository;
import gov.nih.nci.cagrid.common.Utils;
import gov.nih.nci.cabig.ccts.domain.Registration;
import gov.nih.nci.security.acegi.csm.authorization.AuthorizationSwitch;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.Reader;
import org.springframework.orm.hibernate3.support.OpenSessionInViewInterceptor;
/**
* @author <a href="mailto:[email protected]>Joshua Phillips</a>
*
*/
public class CaaersRegistrationConsumerTest extends CaaersDbTestCase {
private String clientConfigFile;
private String registrationResourceName;
@Override
protected void setUp() throws Exception {
super.setUp();
//avoided calling super.setup
setUpAuthorization();
setUpAuditing();
// TODO Auto-generated method stub
this.clientConfigFile = "/gov/nih/nci/ccts/grid/client/client-config.wsdd";
this.registrationResourceName = "/SampleRegistrationMessage.xml"; // "C:/devtools/workspace/REF-RegistrationConsumer/test/resources/SampleRegistrationMessage.xml";
// this.serviceUrl = "http://localhost:8080/wsrf/services/cagrid/RegistrationConsumer";
}
@Override
protected void tearDown() throws Exception {
// TODO Auto-generated method stub
// super.tearDown();
}
public CaaersRegistrationConsumer getRegistrationConsumer() {
CaaersRegistrationConsumer consumer = new CaaersRegistrationConsumer();
// OpenSessionInViewInterceptor os = (OpenSessionInViewInterceptor) getDeployedApplicationContext()
// .getBean("openSessionInViewInterceptor");
//consumer.setOpenSessionInViewInterceptor(os);
consumer.setAuthorizationSwitch((AuthorizationSwitch) getDeployedApplicationContext()
.getBean("authorizationSwitch"));
consumer.setConfigurationProperty((ConfigProperty) getDeployedApplicationContext().getBean(
"configurationProperty"));
consumer.setOrganizationRepository((OrganizationRepository) getDeployedApplicationContext().getBean(
"organizationRepository"));
consumer.setParticipantDao((ParticipantDao) getDeployedApplicationContext().getBean(
"participantDao"));
consumer.setStudyDao((StudyDao) getDeployedApplicationContext().getBean("studyDao"));
consumer
.setStudyParticipantAssignmentAspect((StudyParticipantAssignmentAspect) getDeployedApplicationContext()
.getBean("studyParticipantAssignmentAspect"));
consumer
.setStudyParticipantAssignmentDao((StudyParticipantAssignmentDao) getDeployedApplicationContext()
.getBean("studyParticipantAssignmentDao"));
consumer.setAuditHistoryRepository((AuditHistoryRepository) getDeployedApplicationContext()
.getBean("auditHistoryRepository"));
consumer.setRegistrationConsumerGridServiceUrl("/pages/task");
consumer.setRollbackInterval(1);
return consumer;
}
public void testRegistrationLocal() throws Exception {
System.out.println("***********************************************");
try {
Registration reg = obtainRegistrationDTO();
CaaersRegistrationConsumer consumer = getRegistrationConsumer();
consumer.register(reg);
} catch (Exception e) {
e.printStackTrace();
// throw e;
}
}
public void testRollbackLocal() throws Exception {
try {
Registration reg = obtainRegistrationDTO();
CaaersRegistrationConsumer consumer = getRegistrationConsumer();
consumer.rollback(reg);
} catch (Exception e) {
e.printStackTrace();
//throw e;
}
}
public Registration obtainRegistrationDTO() throws Exception {
Registration registration = null;
try {
Reader reader = new InputStreamReader(getClass().getResourceAsStream(
registrationResourceName));
InputStream fis = getClass().getResourceAsStream(clientConfigFile);
registration = (Registration) Utils.deserializeObject(reader, Registration.class, fis);
} catch (Exception e) {
e.printStackTrace();
throw e;
}
return registration;
}
}
| caAERS/software/grid/registration-consumer/src/test/java/gov/nih/nci/cabig/caaers/grid/CaaersRegistrationConsumerTest.java | /**
*
*/
package gov.nih.nci.cabig.caaers.grid;
import gov.nih.nci.cabig.caaers.CaaersDbTestCase;
import gov.nih.nci.cabig.caaers.CaaersTestCase;
import gov.nih.nci.cabig.caaers.dao.OrganizationDao;
import gov.nih.nci.cabig.caaers.domain.repository.OrganizationRepository;
import gov.nih.nci.cabig.caaers.dao.ParticipantDao;
import gov.nih.nci.cabig.caaers.dao.StudyDao;
import gov.nih.nci.cabig.caaers.dao.StudyParticipantAssignmentDao;
import gov.nih.nci.cabig.caaers.security.StudyParticipantAssignmentAspect;
import gov.nih.nci.cabig.caaers.utils.ConfigProperty;
import gov.nih.nci.cabig.ctms.audit.dao.AuditHistoryRepository;
import gov.nih.nci.cagrid.common.Utils;
import gov.nih.nci.cabig.ccts.domain.Registration;
import gov.nih.nci.security.acegi.csm.authorization.AuthorizationSwitch;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.Reader;
import org.springframework.orm.hibernate3.support.OpenSessionInViewInterceptor;
/**
* @author <a href="mailto:[email protected]>Joshua Phillips</a>
*
*/
public class CaaersRegistrationConsumerTest extends CaaersDbTestCase {
private String clientConfigFile;
private String registrationResourceName;
@Override
protected void setUp() throws Exception {
super.setUp();
//avoided calling super.setup
setUpAuthorization();
setUpAuditing();
// TODO Auto-generated method stub
this.clientConfigFile = "/gov/nih/nci/ccts/grid/client/client-config.wsdd";
this.registrationResourceName = "/SampleRegistrationMessage.xml"; // "C:/devtools/workspace/REF-RegistrationConsumer/test/resources/SampleRegistrationMessage.xml";
// this.serviceUrl = "http://localhost:8080/wsrf/services/cagrid/RegistrationConsumer";
}
@Override
protected void tearDown() throws Exception {
// TODO Auto-generated method stub
// super.tearDown();
}
public CaaersRegistrationConsumer getRegistrationConsumer() {
CaaersRegistrationConsumer consumer = new CaaersRegistrationConsumer();
OpenSessionInViewInterceptor os = (OpenSessionInViewInterceptor) getDeployedApplicationContext()
.getBean("openSessionInViewInterceptor");
consumer.setOpenSessionInViewInterceptor(os);
consumer.setAuthorizationSwitch((AuthorizationSwitch) getDeployedApplicationContext()
.getBean("authorizationSwitch"));
consumer.setConfigurationProperty((ConfigProperty) getDeployedApplicationContext().getBean(
"configurationProperty"));
consumer.setOrganizationRepository((OrganizationRepository) getDeployedApplicationContext().getBean(
"organizationRepository"));
consumer.setParticipantDao((ParticipantDao) getDeployedApplicationContext().getBean(
"participantDao"));
consumer.setStudyDao((StudyDao) getDeployedApplicationContext().getBean("studyDao"));
consumer
.setStudyParticipantAssignmentAspect((StudyParticipantAssignmentAspect) getDeployedApplicationContext()
.getBean("studyParticipantAssignmentAspect"));
consumer
.setStudyParticipantAssignmentDao((StudyParticipantAssignmentDao) getDeployedApplicationContext()
.getBean("studyParticipantAssignmentDao"));
consumer.setAuditHistoryRepository((AuditHistoryRepository) getDeployedApplicationContext()
.getBean("auditHistoryRepository"));
consumer.setRegistrationConsumerGridServiceUrl("/pages/task");
consumer.setRollbackInterval(1);
return consumer;
}
public void testRegistrationLocal() throws Exception {
System.out.println("***********************************************");
try {
Registration reg = obtainRegistrationDTO();
CaaersRegistrationConsumer consumer = getRegistrationConsumer();
consumer.register(reg);
} catch (Exception e) {
e.printStackTrace();
// throw e;
}
}
public void testRollbackLocal() throws Exception {
try {
Registration reg = obtainRegistrationDTO();
CaaersRegistrationConsumer consumer = getRegistrationConsumer();
consumer.rollback(reg);
} catch (Exception e) {
e.printStackTrace();
//throw e;
}
}
public Registration obtainRegistrationDTO() throws Exception {
Registration registration = null;
try {
Reader reader = new InputStreamReader(getClass().getResourceAsStream(
registrationResourceName));
InputStream fis = getClass().getResourceAsStream(clientConfigFile);
registration = (Registration) Utils.deserializeObject(reader, Registration.class, fis);
} catch (Exception e) {
e.printStackTrace();
throw e;
}
return registration;
}
}
|
SVN-Revision: 11342
| caAERS/software/grid/registration-consumer/src/test/java/gov/nih/nci/cabig/caaers/grid/CaaersRegistrationConsumerTest.java | <ide><path>aAERS/software/grid/registration-consumer/src/test/java/gov/nih/nci/cabig/caaers/grid/CaaersRegistrationConsumerTest.java
<ide>
<ide> public CaaersRegistrationConsumer getRegistrationConsumer() {
<ide> CaaersRegistrationConsumer consumer = new CaaersRegistrationConsumer();
<del> OpenSessionInViewInterceptor os = (OpenSessionInViewInterceptor) getDeployedApplicationContext()
<del> .getBean("openSessionInViewInterceptor");
<del> consumer.setOpenSessionInViewInterceptor(os);
<add> // OpenSessionInViewInterceptor os = (OpenSessionInViewInterceptor) getDeployedApplicationContext()
<add> // .getBean("openSessionInViewInterceptor");
<add> //consumer.setOpenSessionInViewInterceptor(os);
<ide> consumer.setAuthorizationSwitch((AuthorizationSwitch) getDeployedApplicationContext()
<ide> .getBean("authorizationSwitch"));
<ide> consumer.setConfigurationProperty((ConfigProperty) getDeployedApplicationContext().getBean( |
||
Java | mit | error: pathspec 'src/main/java/io/github/mzmine/datamodel/features/types/GroupedFeatureListRow.java' did not match any file(s) known to git
| 67ff28e09ec03c47450ba76158debe87c18b6119 | 1 | mzmine/mzmine3,mzmine/mzmine3 | /*
* Copyright 2006-2020 The MZmine Development Team
*
* This file is part of MZmine.
*
* MZmine 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.
*
* MZmine 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 MZmine; if not,
* write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
* USA
*/
package io.github.mzmine.datamodel.features.types;
import io.github.mzmine.datamodel.features.FeatureListRow;
/**
* GroupedFeatureListRows always have a main (representative) row and sub rows to build a tree structure
*
* @author Robin Schmid ([email protected])
*
*/
public class GroupedFeatureListRow implements FeatureListRow {
private List<FeatureListRow> subRows;
private FeatureListRow mainRow;
}
| src/main/java/io/github/mzmine/datamodel/features/types/GroupedFeatureListRow.java | Started grouped row for ion identity networking
| src/main/java/io/github/mzmine/datamodel/features/types/GroupedFeatureListRow.java | Started grouped row for ion identity networking | <ide><path>rc/main/java/io/github/mzmine/datamodel/features/types/GroupedFeatureListRow.java
<add>/*
<add> * Copyright 2006-2020 The MZmine Development Team
<add> *
<add> * This file is part of MZmine.
<add> *
<add> * MZmine is free software; you can redistribute it and/or modify it under the terms of the GNU
<add> * General Public License as published by the Free Software Foundation; either version 2 of the
<add> * License, or (at your option) any later version.
<add> *
<add> * MZmine is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
<add> * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
<add> * Public License for more details.
<add> *
<add> * You should have received a copy of the GNU General Public License along with MZmine; if not,
<add> * write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
<add> * USA
<add> */
<add>
<add>package io.github.mzmine.datamodel.features.types;
<add>
<add>import io.github.mzmine.datamodel.features.FeatureListRow;
<add>
<add>/**
<add> * GroupedFeatureListRows always have a main (representative) row and sub rows to build a tree structure
<add> *
<add> * @author Robin Schmid ([email protected])
<add> *
<add> */
<add>public class GroupedFeatureListRow implements FeatureListRow {
<add>
<add> private List<FeatureListRow> subRows;
<add> private FeatureListRow mainRow;
<add>
<add>} |
|
Java | mit | aeda80cfaa85a19de971b76558236589d46093f9 | 0 | Avaja/OpenTechnology | package OpenTechnology;
import OpenTechnology.proxy.CommonProxy;
import OpenTechnology.utils.PointerList;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.EventHandler;
import cpw.mods.fml.common.SidedProxy;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import org.apache.logging.log4j.Logger;
@Mod(modid= OpenTechnology.MODID, name= OpenTechnology.MODID, version= OpenTechnology.VERSION)
public class OpenTechnology {
public final static String MODID = "OpenTechnology";
public final static String VERSION = "0.3.13a";
public static Logger logger;
public static CreativeTab tab = new CreativeTab();
@Mod.Instance
public static OpenTechnology instance;
@SidedProxy(clientSide = "OpenTechnology.proxy.ClientProxy", serverSide = "OpenTechnology.proxy.ServerProxy")
public static CommonProxy proxy;
@EventHandler
public void preInit(FMLPreInitializationEvent e) {
logger = e.getModLog();
Config.init(e.getSuggestedConfigurationFile());
proxy.preInit(e);
}
@EventHandler
public void init(FMLInitializationEvent e) {
proxy.init(e);
PointerList.timer.schedule(PointerList.task, 1000, 1000);
}
@EventHandler
public void postInit(FMLPostInitializationEvent e) {
proxy.postInit(e);
}
}
| src/main/java/OpenTechnology/OpenTechnology.java | package OpenTechnology;
import OpenTechnology.proxy.CommonProxy;
import OpenTechnology.utils.PointerList;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.EventHandler;
import cpw.mods.fml.common.SidedProxy;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import org.apache.logging.log4j.Logger;
@Mod(modid= OpenTechnology.MODID, name= OpenTechnology.MODID, version= OpenTechnology.VERSION)
public class OpenTechnology {
public final static String MODID = "OpenTechnology";
public final static String VERSION = "0.3.12a";
public static Logger logger;
public static CreativeTab tab = new CreativeTab();
@Mod.Instance
public static OpenTechnology instance;
@SidedProxy(clientSide = "OpenTechnology.proxy.ClientProxy", serverSide = "OpenTechnology.proxy.ServerProxy")
public static CommonProxy proxy;
@EventHandler
public void preInit(FMLPreInitializationEvent e) {
logger = e.getModLog();
Config.init(e.getSuggestedConfigurationFile());
proxy.preInit(e);
}
@EventHandler
public void init(FMLInitializationEvent e) {
proxy.init(e);
PointerList.timer.schedule(PointerList.task, 1000, 1000);
}
@EventHandler
public void postInit(FMLPostInitializationEvent e) {
proxy.postInit(e);
}
}
| change version
| src/main/java/OpenTechnology/OpenTechnology.java | change version | <ide><path>rc/main/java/OpenTechnology/OpenTechnology.java
<ide> @Mod(modid= OpenTechnology.MODID, name= OpenTechnology.MODID, version= OpenTechnology.VERSION)
<ide> public class OpenTechnology {
<ide> public final static String MODID = "OpenTechnology";
<del> public final static String VERSION = "0.3.12a";
<add> public final static String VERSION = "0.3.13a";
<ide>
<ide> public static Logger logger;
<ide> public static CreativeTab tab = new CreativeTab(); |
|
Java | apache-2.0 | 28ebbd393d775d6088079939cc5128562f9835ba | 0 | ppavlidis/Gemma,ppavlidis/Gemma,ppavlidis/Gemma,ppavlidis/Gemma,ppavlidis/Gemma,ppavlidis/Gemma,ppavlidis/Gemma | /*
* The Gemma project
*
* Copyright (c) 2007 University of British Columbia
*
* 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 ubic.gemma.web.controller.expression.experiment;
import java.awt.BasicStroke;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Font;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.geom.Ellipse2D;
import java.awt.geom.Rectangle2D;
import java.awt.image.BufferedImage;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.OutputStream;
import java.io.StringWriter;
import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Date;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.TreeMap;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import javax.imageio.ImageIO;
import org.apache.commons.lang.ArrayUtils;
import org.apache.commons.lang.StringUtils;
import org.jfree.chart.ChartFactory;
import org.jfree.chart.ChartUtilities;
import org.jfree.chart.JFreeChart;
import org.jfree.chart.StandardChartTheme;
import org.jfree.chart.axis.CategoryAxis;
import org.jfree.chart.axis.CategoryLabelPositions;
import org.jfree.chart.axis.NumberAxis;
import org.jfree.chart.axis.ValueAxis;
import org.jfree.chart.plot.CategoryPlot;
import org.jfree.chart.plot.PlotOrientation;
import org.jfree.chart.plot.XYPlot;
import org.jfree.chart.renderer.category.BarRenderer;
import org.jfree.chart.renderer.category.ScatterRenderer;
import org.jfree.chart.renderer.xy.XYDotRenderer;
import org.jfree.chart.renderer.xy.XYItemRenderer;
import org.jfree.chart.renderer.xy.XYLineAndShapeRenderer;
import org.jfree.data.category.CategoryDataset;
import org.jfree.data.category.DefaultCategoryDataset;
import org.jfree.data.statistics.DefaultMultiValueCategoryDataset;
import org.jfree.data.time.Hour;
import org.jfree.data.time.TimeSeries;
import org.jfree.data.time.TimeSeriesCollection;
import org.jfree.data.xy.DefaultXYDataset;
import org.jfree.data.xy.XYSeries;
import org.jfree.data.xy.XYSeriesCollection;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
import ubic.basecode.dataStructure.matrix.DenseDoubleMatrix;
import ubic.basecode.dataStructure.matrix.DoubleMatrix;
import ubic.basecode.graphics.ColorMatrix;
import ubic.basecode.graphics.MatrixDisplay;
import ubic.basecode.io.ByteArrayConverter;
import ubic.basecode.io.writer.MatrixWriter;
import ubic.basecode.math.DescriptiveWithMissing;
import ubic.basecode.math.distribution.Histogram;
import ubic.gemma.analysis.expression.diff.DifferentialExpressionFileUtils;
import ubic.gemma.analysis.preprocess.MeanVarianceService;
import ubic.gemma.analysis.preprocess.OutlierDetails;
import ubic.gemma.analysis.preprocess.OutlierDetectionService;
import ubic.gemma.analysis.preprocess.SampleCoexpressionMatrixService;
import ubic.gemma.analysis.preprocess.svd.SVDService;
import ubic.gemma.analysis.preprocess.svd.SVDValueObject;
import ubic.gemma.analysis.util.ExperimentalDesignUtils;
import ubic.gemma.expression.experiment.service.ExpressionExperimentService;
import ubic.gemma.model.analysis.expression.diff.DifferentialExpressionResultService;
import ubic.gemma.model.analysis.expression.diff.ExpressionAnalysisResultSet;
import ubic.gemma.model.analysis.expression.diff.PvalueDistribution;
import ubic.gemma.model.common.description.Characteristic;
import ubic.gemma.model.expression.bioAssay.BioAssay;
import ubic.gemma.model.expression.bioAssayData.MeanVarianceRelation;
import ubic.gemma.model.expression.experiment.ExperimentalFactor;
import ubic.gemma.model.expression.experiment.ExpressionExperiment;
import ubic.gemma.model.expression.experiment.FactorValue;
import ubic.gemma.tasks.analysis.expression.ProcessedExpressionDataVectorCreateTask;
import ubic.gemma.util.ConfigUtils;
import ubic.gemma.util.EntityUtils;
import ubic.gemma.web.controller.BaseController;
import ubic.gemma.web.view.TextView;
import cern.colt.list.DoubleArrayList;
import cern.colt.matrix.DoubleMatrix2D;
import cern.colt.matrix.doublealgo.Formatter;
import cern.colt.matrix.impl.DenseDoubleMatrix2D;
/**
* @author paul
* @version $Id$
*/
@Controller
public class ExpressionExperimentQCController extends BaseController {
private static final int MAX_HEATMAP_CELLSIZE = 12;
public static final int DEFAULT_QC_IMAGE_SIZE_PX = 200;
@Autowired
private ExpressionExperimentService expressionExperimentService;
@Autowired
private SVDService svdService;
@Autowired
ProcessedExpressionDataVectorCreateTask processedExpressionDataVectorCreateTask;
@Autowired
private MeanVarianceService meanVarianceService;
/**
* @param id
* @param os
* @throws Exception
*/
@RequestMapping("/expressionExperiment/detailedFactorAnalysis.html")
public void detailedFactorAnalysis( Long id, OutputStream os ) throws Exception {
ExpressionExperiment ee = expressionExperimentService.load( id );
if ( ee == null ) {
log.warn( "Could not load experiment with id " + id );
return;
}
boolean ok = writeDetailedFactorAnalysis( ee, os );
if ( !ok ) {
writePlaceholderImage( os );
}
}
/**
* @param id
* @param os
* @return
* @throws Exception
*/
@RequestMapping("/expressionExperiment/pcaFactors.html")
public ModelAndView pcaFactors( Long id, OutputStream os ) throws Exception {
if ( id == null ) return null;
ExpressionExperiment ee = expressionExperimentService.load( id );
if ( ee == null ) {
log.warn( "Could not load experiment with id " + id ); // or access denied.
writePlaceholderImage( os );
return null;
}
SVDValueObject svdo = null;
try {
svdo = svdService.getSvdFactorAnalysis( ee.getId() );
} catch ( Exception e ) {
// if there is no pca
// log.error( e, e );
}
if ( svdo != null ) {
this.writePCAFactors( os, ee, svdo );
} else
this.writePlaceholderImage( os );
return null;
}
/**
* @param request
* @param response
* @return
* @throws Exception
*/
@RequestMapping("/expressionExperiment/pcaScree.html")
public ModelAndView pcaScree( Long id, OutputStream os ) throws Exception {
ExpressionExperiment ee = expressionExperimentService.load( id );
if ( ee == null ) {
log.warn( "Could not load experiment with id " + id ); // or access deined.
writePlaceholderImage( os );
return null;
}
SVDValueObject svdo = svdService.getSvd( ee.getId() );
if ( svdo != null ) {
this.writePCAScree( os, svdo );
} else {
writePlaceholderImage( os );
}
return null;
}
/**
* @param id of experiment
*/
@RequestMapping("/expressionExperiment/outliers.html")
public ModelAndView identifyOutliers( Long id ) {
if ( id == null ) {
log.warn( "No id!" );
return null;
}
ExpressionExperiment ee = expressionExperimentService.load( id );
if ( ee == null ) {
log.warn( "Could not load experiment with id " + id );
return null;
}
DoubleMatrix<BioAssay, BioAssay> sampleCorrelationMatrix = sampleCoexpressionMatrixService.findOrCreate( ee );
Collection<OutlierDetails> outliers = outlierDetectionService.identifyOutliers( ee, sampleCorrelationMatrix,
15, 0.9 );
if ( !outliers.isEmpty() ) {
for ( OutlierDetails details : outliers ) {
// TODO
details.getBioAssay();
}
}
return null; // nothing to return;
}
@Autowired
private SampleCoexpressionMatrixService sampleCoexpressionMatrixService;
@Autowired
private OutlierDetectionService outlierDetectionService;
/**
* @param id of experiment
* @param size Multiplier on the cell size. 1 or null for standard small size.
* @param contrVal
* @param text if true, output a tabbed file instead of a png
* @param showLabels if the row and column labels of the matrix should be shown.
* @param os response output stream
* @return
* @throws Exception
*/
@RequestMapping("/expressionExperiment/visualizeCorrMat.html")
public ModelAndView visualizeCorrMat( Long id, Double size, String contrVal, Boolean text, Boolean showLabels,
Boolean forceShowLabels, OutputStream os ) throws Exception {
if ( id == null ) {
log.warn( "No id!" );
return null;
}
ExpressionExperiment ee = expressionExperimentService.load( id );
if ( ee == null ) {
log.warn( "Could not load experiment with id " + id );
return null;
}
DoubleMatrix<BioAssay, BioAssay> omatrix = sampleCoexpressionMatrixService.findOrCreate( ee );
List<String> stringNames = new ArrayList<String>();
for ( BioAssay ba : omatrix.getRowNames() ) {
stringNames.add( ba.getName() + " ID=" + ba.getId() );
}
DoubleMatrix<String, String> matrix = new DenseDoubleMatrix<String, String>( omatrix.getRawMatrix() );
matrix.setRowNames( stringNames );
matrix.setColumnNames( stringNames );
if ( text != null && text ) {
StringWriter s = new StringWriter();
MatrixWriter<String, String> mw = new MatrixWriter<String, String>( s, new DecimalFormat( "#.##" ) );
mw.writeMatrix( matrix, true );
ModelAndView mav = new ModelAndView( new TextView() );
mav.addObject( TextView.TEXT_PARAM, s.toString() );
return mav;
}
/*
* Blank out the diagonal so it doesn't affect the colour scale.
*/
for ( int i = 0; i < matrix.rows(); i++ ) {
matrix.set( i, i, Double.NaN );
}
ColorMatrix<String, String> cm = new ColorMatrix<String, String>( matrix );
cleanNames( matrix );
int row = matrix.rows();
int cellsize = ( int ) Math.min( MAX_HEATMAP_CELLSIZE, Math.max( 1, size * DEFAULT_QC_IMAGE_SIZE_PX / row ) );
MatrixDisplay<String, String> writer = new MatrixDisplay<String, String>( cm );
boolean reallyShowLabels;
int minimumCellSizeForText = 9;
if ( forceShowLabels != null && forceShowLabels ) {
cellsize = Math.min( MAX_HEATMAP_CELLSIZE, minimumCellSizeForText );
reallyShowLabels = true;
} else {
reallyShowLabels = showLabels == null ? false : showLabels && cellsize >= minimumCellSizeForText;
}
writer.setCellSize( new Dimension( cellsize, cellsize ) );
boolean showScalebar = size > 2;
writer.writeToPng( cm, os, reallyShowLabels, showScalebar );
return null; // nothing to return;
}
/**
* @param request
* @param response
* @return
*/
@RequestMapping("/expressionExperiment/visualizeProbeCorrDist.html")
public ModelAndView visualizeProbeCorrDist( Long id, OutputStream os ) throws Exception {
ExpressionExperiment ee = expressionExperimentService.load( id );
if ( ee == null ) {
log.warn( "Could not load experiment with id " + id );
return null;
}
writeProbeCorrHistImage( os, ee );
return null; // nothing to return;
}
/**
* @param id of the experiment
* @param analysisId of the analysis
* @param rsId resultSet Id
* @param factorName deprecated, we will use rsId instead. Maintained for backwards compatibility.
* @param size of the image.
* @param os stream to write the image to.
* @return null
* @throws Exception
*/
@RequestMapping("/expressionExperiment/visualizePvalueDist.html")
public ModelAndView visualizePvalueDist( Long id, Long analysisId, Long rsid, String factorName, Integer size,
OutputStream os ) throws Exception {
ExpressionExperiment ee = this.expressionExperimentService.load( id );
if ( ee == null ) {
this.log.warn( "Could not load experiment with id " + id );
return null;
}
if ( size == null ) {
if ( !this.writePValueHistImage( os, ee, analysisId, rsid, factorName ) ) {
writePlaceholderImage( os );
}
} else {
if ( !this.writePValueHistThumbnailImage( os, ee, analysisId, rsid, factorName, size ) ) {
writePlaceholderThumbnailImage( os, size );
}
}
return null; // nothing to return;
}
/**
* @param eeid
* @param os
* @throws IOException
*/
@RequestMapping("/expressionExperiment/eigenGenes.html")
public void writeEigenGenes( Long eeid, OutputStream os ) throws IOException {
ExpressionExperiment ee = expressionExperimentService.load( eeid );
if ( ee == null ) {
throw new IllegalArgumentException( "Could not load experiment with id " + eeid ); // or access deined.
}
SVDValueObject svdo = svdService.getSvd( ee.getId() );
DoubleMatrix<Long, Integer> vMatrix = svdo.getvMatrix();
/*
* FIXME put the biomaterial names in there instead of the IDs.
*/
MatrixWriter<Long, Integer> mr = new MatrixWriter<Long, Integer>( os );
mr.writeMatrix( vMatrix, true );
}
/**
* @param chart
* @param g2
* @param x
* @param y
* @param width
* @param height
*/
private void addChartToGraphics( JFreeChart chart, Graphics2D g2, double x, double y, double width, double height ) {
chart.draw( g2, new Rectangle2D.Double( x, y, width, height ), null, null );
}
/**
* clean up the names of the correlation matrix rows and columns, so they are not to long and also contain the
* bioassay id for reference purposes. Note that newly created coexpression matrices already give shorter names, so
* this is partly for backwards compatibility with the old format.
*
* @param matrix
*/
private void cleanNames( DoubleMatrix<String, String> matrix ) {
List<String> rawRowNames = matrix.getRowNames();
List<String> rowNames = new ArrayList<String>();
int i = 0;
Pattern p = Pattern.compile( "^.*?ID=([0-9]+).*$", Pattern.CASE_INSENSITIVE );
Pattern bipattern = Pattern.compile( "BioAssayImpl Id=[0-9]+ Name=", Pattern.CASE_INSENSITIVE );
int MAX_BIO_ASSAY_NAME_LEN = 30;
for ( String rn : rawRowNames ) {
Matcher matcher = p.matcher( rn );
Matcher bppat = bipattern.matcher( rn );
String bioassayid = null;
if ( matcher.matches() ) {
bioassayid = matcher.group( 1 );
}
String cleanRn = StringUtils.abbreviate( bppat.replaceFirst( "" ), MAX_BIO_ASSAY_NAME_LEN );
if ( bioassayid != null ) {
if ( !cleanRn.contains( bioassayid ) )
rowNames.add( cleanRn + " ID=" + bioassayid ); // ensure the rows are unique
else
rowNames.add( cleanRn + " " + ++i );
} else {
rowNames.add( cleanRn );
}
}
matrix.setRowNames( rowNames );
matrix.setColumnNames( rowNames );
}
/**
* Support method for writeDetailedFactorAnalysis
*
* @param efIdMap
* @param efId
* @param categories map of factor ID to text value. Strings will be unique, but possibly abbreviated and/or munged.
*/
private void getCategories( Map<Long, ExperimentalFactor> efIdMap, Long efId, Map<Long, String> categories ) {
ExperimentalFactor ef = efIdMap.get( efId );
if ( ef == null ) return;
int maxCategoryLabelLength = 10;
for ( FactorValue fv : ef.getFactorValues() ) {
String value = fv.getValue();
if ( StringUtils.isBlank( value ) || value.equals( "null" ) ) {
for ( Characteristic c : fv.getCharacteristics() ) {
if ( StringUtils.isNotBlank( c.getValue() ) ) {
if ( StringUtils.isNotBlank( value ) ) {
value = value + "; " + c.getValue();
} else {
value = c.getValue();
}
}
}
}
if ( StringUtils.isBlank( value ) ) {
value = fv.toString() + "--??";
}
if ( value.startsWith( ExperimentalDesignUtils.BATCH_FACTOR_NAME_PREFIX ) ) {
value = value.replaceFirst( ExperimentalDesignUtils.BATCH_FACTOR_NAME_PREFIX, "" );
} else {
value = StringUtils.abbreviate( value, maxCategoryLabelLength );
}
while ( categories.values().contains( value ) ) {
value = value + "+";// make unique, kludge, will end up with string of ++++
}
categories.put( fv.getId(), value );
}
}
/**
* @param ee
* @return JFreeChart XYSeries representing the histogram.
* @throws FileNotFoundException
* @throws IOException
*/
private XYSeries getCorrelHist( ExpressionExperiment ee ) throws FileNotFoundException, IOException {
File f = this.locateProbeCorrFile( ee );
XYSeries series = new XYSeries( ee.getId(), true, true );
BufferedReader in = new BufferedReader( new FileReader( f ) );
while ( in.ready() ) {
String line = in.readLine().trim();
if ( line.startsWith( "#" ) ) continue;
String[] split = StringUtils.split( line );
if ( split.length < 2 ) continue;
try {
double x = Double.parseDouble( split[0] );
double y = Double.parseDouble( split[1] );
series.add( x, y );
} catch ( NumberFormatException e ) {
// line wasn't useable.. no big deal. Heading is included.
}
}
return series;
}
@Autowired
private DifferentialExpressionResultService differentialExpressionResultService;
/**
* @param ee
* @param analysisId
* @param rsId
* @param factorName
* @return JFreeChart XYSeries representing the histogram for the requested result set
* @throws FileNotFoundException
* @throws IOException
*/
private XYSeries getDiffExPvalueHistXYSeries( ExpressionExperiment ee, Long analysisId, Long rsId, String factorName )
throws FileNotFoundException, IOException {
if ( ee == null || analysisId == null || rsId == null ) {
log.warn( "Got invalid values: " + ee + " " + analysisId + " " + rsId + " " + factorName );
return null;
}
Histogram hist = differentialExpressionResultService.loadPvalueDistribution( rsId );
XYSeries xySeries = null;
if ( hist != null ) {
xySeries = new XYSeries( rsId, true, true );
Double[] binEdges = hist.getBinEdges();
double[] counts = hist.getArray();
assert binEdges.length == counts.length;
for ( int i = 0; i < binEdges.length; i++ ) {
xySeries.add( binEdges[i].doubleValue(), counts[i] );
}
return xySeries;
}
/*
* Rest of this is for backwards compatibility - read from the file.
*/
File file = this.locatePvalueDistFile( ee, analysisId );
// Current format is to have just one file for each analysis.
if ( file == null ) {
return null;
}
BufferedReader in = new BufferedReader( new FileReader( file ) );
int factorNameIndex = -1;
boolean readHeader = false;
PvalueDistribution pvalueDist = PvalueDistribution.Factory.newInstance();
DoubleArrayList counts = new DoubleArrayList();
while ( in.ready() ) {
String line = in.readLine().trim();
if ( line.startsWith( "#" ) ) continue;
String[] split = StringUtils.split( line, "\t" );
if ( split.length < 2 ) continue;
if ( !readHeader ) {
for ( int i = 1; i < split.length; i++ ) {
String currFactorName = split[i];
// Note that currFactorName may have suffix such as __3
// (DifferentialExpressionAnalyzerService.FACTOR_NAME_MANGLING_DELIMITER followed by the ID).
if ( currFactorName.length() >= factorName.length()
&& factorName.equals( currFactorName.substring( 0, factorName.length() ) ) ) {
factorNameIndex = i;
}
}
readHeader = true;
if ( factorNameIndex < 0 ) {
// If factorName cannot be found, don't need to continue reading file.
break;
}
continue;
}
try {
double x = Double.parseDouble( split[0] );
double y = Double.parseDouble( split[factorNameIndex] );
if ( xySeries == null ) {
xySeries = new XYSeries( factorName, true, true );
}
xySeries.add( x, y );
/*
* Update the result set.
*/
counts.add( y );
} catch ( NumberFormatException e ) {
// line wasn't useable.. no big deal. Heading is included.
}
}
if ( counts.size() > 0 ) {
pvalueDistFileToPersistent( file, rsId, pvalueDist, counts );
}
return xySeries;
}
/**
* For conversion from legacy system.
*
* @param file
* @param rsId
* @param pvalueDist
* @param counts
*/
private void pvalueDistFileToPersistent( File file, Long rsId, PvalueDistribution pvalueDist, DoubleArrayList counts ) {
log.info( "Converting from pvalue distribution file to persistent stored version" );
ByteArrayConverter bac = new ByteArrayConverter();
Double[] countArray = ( Double[] ) counts.toList().toArray( new Double[] {} );
byte[] bytes = bac.doubleArrayToBytes( countArray );
pvalueDist.setBinCounts( bytes );
pvalueDist.setNumBins( countArray.length );
ExpressionAnalysisResultSet resultSet = differentialExpressionResultService.loadAnalysisResultSet( rsId );
resultSet.setPvalueDistribution( pvalueDist );
differentialExpressionResultService.update( resultSet );
if ( file.delete() ) {
log.info( "Old file deleted" );
} else {
log.info( "Old file could not be deleted" );
}
}
/**
* Get the eigengene for the given component.
* <p>
* The values are rescaled so that jfreechart can cope. Small numbers give it fits.
*
* @param svdo
* @param component
* @return
*/
private Double[] getEigenGene( SVDValueObject svdo, Integer component ) {
DoubleArrayList eigenGeneL = new DoubleArrayList( ArrayUtils.toPrimitive( svdo.getvMatrix().getColObj(
component ) ) );
DescriptiveWithMissing.standardize( eigenGeneL );
Double[] eigenGene = ArrayUtils.toObject( eigenGeneL.elements() );
return eigenGene;
}
/**
* @param ee
* @param maxWidth
* @return
*/
private Map<Long, String> getFactorNames( ExpressionExperiment ee, int maxWidth ) {
Collection<ExperimentalFactor> factors = ee.getExperimentalDesign().getExperimentalFactors();
Map<Long, String> efs = new HashMap<Long, String>();
for ( ExperimentalFactor ef : factors ) {
efs.put( ef.getId(), StringUtils.abbreviate( StringUtils.capitalize( ef.getName() ), maxWidth ) );
}
return efs;
}
/**
* @param svdo
* @return
*/
private CategoryDataset getPCAScree( SVDValueObject svdo ) {
DefaultCategoryDataset series = new DefaultCategoryDataset();
Double[] variances = svdo.getVariances();
if ( variances == null || variances.length == 0 ) {
return series;
}
int MAX_COMPONENTS_FOR_SCREE = 10; // make constant
for ( int i = 0; i < Math.min( MAX_COMPONENTS_FOR_SCREE, variances.length ); i++ ) {
series.addValue( variances[i], new Integer( 1 ), new Integer( i + 1 ) );
}
return series;
}
/**
* @param mvr MeanVarianceRelation object that contains the datapoints to plot
* @return XYSeriesCollection which contains the Mean-variance and Loess series
*/
private XYSeriesCollection getMeanVariance( MeanVarianceRelation mvr ) {
final ByteArrayConverter bac = new ByteArrayConverter();
XYSeriesCollection dataset = new XYSeriesCollection();
if ( mvr == null ) {
return dataset;
}
double[] means = bac.byteArrayToDoubles( mvr.getMeans() );
double[] variances = bac.byteArrayToDoubles( mvr.getVariances() );
double[] loessX = bac.byteArrayToDoubles( mvr.getLowessX() );
double[] loessY = bac.byteArrayToDoubles( mvr.getLowessY() );
if ( means == null || variances == null || loessX == null || loessY == null ) {
return dataset;
}
XYSeries series = new XYSeries( "Mean-variance" );
for ( int i = 0; i < means.length; i++ ) {
series.add( means[i], variances[i] );
}
// loess fit trend line
XYSeries loessSeries = new XYSeries( "Loess" );
for ( int i = 0; i < loessX.length; i++ ) {
loessSeries.add( loessX[i], loessY[i] );
}
dataset.addSeries( series );
dataset.addSeries( loessSeries );
return dataset;
}
/**
* @param ee
* @return
*/
private File locateProbeCorrFile( ExpressionExperiment ee ) {
String shortName = ee.getShortName();
String analysisStoragePath = ConfigUtils.getAnalysisStoragePath();
String suffix = ".correlDist.txt";
File f = new File( analysisStoragePath + File.separatorChar + shortName + suffix );
return f;
}
/**
* @param ee
* @param analysisId
* @return
* @deprecated because we store this in the db now.
*/
@Deprecated
private File locatePvalueDistFile( ExpressionExperiment ee, Long analysisId ) {
File file = null;
if ( ee != null && analysisId != null ) {
String shortName = ee.getShortName();
file = new File( DifferentialExpressionFileUtils.getBaseDifferentialDirectory( shortName ), shortName
+ ".an" + analysisId + ".pvalues" + DifferentialExpressionFileUtils.PVALUE_DIST_SUFFIX );
if ( !file.exists() ) {
file = null;
}
}
return file;
}
/**
* @param ee
* @param os
* @return
* @throws Exception
*/
private boolean writeDetailedFactorAnalysis( ExpressionExperiment ee, OutputStream os ) throws Exception {
SVDValueObject svdo = svdService.getSvdFactorAnalysis( ee.getId() );
if ( svdo == null ) return false;
if ( svdo.getFactors().isEmpty() && svdo.getDates().isEmpty() ) {
return false;
}
Map<Integer, Map<Long, Double>> factorCorrelations = svdo.getFactorCorrelations();
// Map<Integer, Map<Long, Double>> factorPvalues = svdo.getFactorPvalues();
Map<Integer, Double> dateCorrelations = svdo.getDateCorrelations();
assert ee.getId().equals( svdo.getId() );
ee = expressionExperimentService.thawLite( ee ); // need the experimental design
int maxWidth = 30;
Map<Long, String> efs = getFactorNames( ee, maxWidth );
Map<Long, ExperimentalFactor> efIdMap = EntityUtils.getIdMap( ee.getExperimentalDesign()
.getExperimentalFactors() );
Collection<Long> continuousFactors = new HashSet<Long>();
for ( ExperimentalFactor ef : ee.getExperimentalDesign().getExperimentalFactors() ) {
boolean isContinous = ExperimentalDesignUtils.isContinuous( ef );
if ( isContinous ) {
continuousFactors.add( ef.getId() );
}
}
/*
* Make plots of the dates vs. PCs, factors vs. PCs.
*/
int MAX_COMP = 3;
Map<Long, List<JFreeChart>> charts = new LinkedHashMap<Long, List<JFreeChart>>();
ChartFactory.setChartTheme( StandardChartTheme.createLegacyTheme() );
/*
* FACTORS
*/
String componentShorthand = "PC";
for ( Integer component : factorCorrelations.keySet() ) {
if ( component >= MAX_COMP ) break;
String xaxisLabel = componentShorthand + ( component + 1 );
for ( Long efId : factorCorrelations.get( component ).keySet() ) {
/*
* Should not happen.
*/
if ( !efs.containsKey( efId ) ) {
log.warn( "No experimental factor with id " + efId );
continue;
}
if ( !svdo.getFactors().containsKey( efId ) ) {
// this should not happen.
continue;
}
boolean isCategorical = !continuousFactors.contains( efId );
Map<Long, String> categories = new HashMap<Long, String>();
if ( isCategorical ) {
getCategories( efIdMap, efId, categories );
}
if ( !charts.containsKey( efId ) ) {
charts.put( efId, new ArrayList<JFreeChart>() );
}
Double a = factorCorrelations.get( component ).get( efId );
String plotname = ( efs.get( efId ) == null ? "?" : efs.get( efId ) ) + " " + xaxisLabel; // unique?
if ( a != null && !Double.isNaN( a ) ) {
Double corr = a;
String title = plotname + " " + String.format( "%.2f", corr );
List<Double> values = svdo.getFactors().get( efId );
Double[] eigenGene = getEigenGene( svdo, component );
assert values.size() == eigenGene.length;
/*
* Plot eigengene vs values, add correlation to the plot
*/
JFreeChart chart = null;
if ( isCategorical ) {
/*
* Categorical factor
*/
// use the absolute value of the correlation, since direction is arbitrary.
title = plotname + " " + String.format( "r=%.2f", Math.abs( corr ) );
DefaultMultiValueCategoryDataset dataset = new DefaultMultiValueCategoryDataset();
/*
* What this code does is organize the factor values by the groups.
*/
Map<String, List<Double>> groupedValues = new TreeMap<String, List<Double>>();
for ( int i = 0; i < values.size(); i++ ) {
Long fvId = values.get( i ).longValue();
String fvValue = categories.get( fvId );
if ( fvValue == null ) {
/*
* Problem ...eg gill2006fateinocean id=1748 -- missing values. We just don't plot
* anything for this sample.
*/
continue; // is this all we need to do?
}
if ( !groupedValues.containsKey( fvValue ) ) {
groupedValues.put( fvValue, new ArrayList<Double>() );
}
groupedValues.get( fvValue ).add( eigenGene[i] );
if ( log.isDebugEnabled() ) log.debug( fvValue + " " + values.get( i ) );
}
for ( String key : groupedValues.keySet() ) {
dataset.add( groupedValues.get( key ), plotname, key );
}
// don't show the name of the X axis: it's redundant with the title.
NumberAxis rangeAxis = new NumberAxis( xaxisLabel );
rangeAxis.setAutoRangeIncludesZero( false );
// rangeAxis.setAutoRange( false );
rangeAxis.setAutoRangeMinimumSize( 4.0 );
// rangeAxis.setRange( new Range( -2, 2 ) );
CategoryPlot plot = new CategoryPlot( dataset, new CategoryAxis( null ), rangeAxis,
new ScatterRenderer() );
plot.setRangeGridlinesVisible( false );
plot.setDomainGridlinesVisible( false );
chart = new JFreeChart( title, new Font( "SansSerif", Font.BOLD, 12 ), plot, false );
ScatterRenderer renderer = ( ScatterRenderer ) plot.getRenderer();
float saturationDrop = ( float ) Math.min( 1.0, component * 0.8f / MAX_COMP );
renderer.setSeriesFillPaint( 0, Color.getHSBColor( 0.0f, 1.0f - saturationDrop, 0.7f ) );
renderer.setSeriesShape( 0, new Ellipse2D.Double( 0, 0, 3, 3 ) );
renderer.setUseOutlinePaint( false );
renderer.setUseFillPaint( true );
renderer.setBaseFillPaint( Color.white );
CategoryAxis domainAxis = plot.getDomainAxis();
domainAxis.setCategoryLabelPositions( CategoryLabelPositions.UP_45 );
} else {
/*
* Continous value factor
*/
DefaultXYDataset series = new DefaultXYDataset();
series.addSeries( plotname,
new double[][] { ArrayUtils.toPrimitive( values.toArray( new Double[] {} ) ),
ArrayUtils.toPrimitive( eigenGene ) } );
// don't show x-axis label, which would otherwise be efs.get( efId )
chart = ChartFactory.createScatterPlot( title, null, xaxisLabel, series,
PlotOrientation.VERTICAL, false, false, false );
XYPlot plot = chart.getXYPlot();
plot.setRangeGridlinesVisible( false );
plot.setDomainGridlinesVisible( false );
XYItemRenderer renderer = plot.getRenderer();
renderer.setBasePaint( Color.white );
renderer.setSeriesShape( 0, new Ellipse2D.Double( 0, 0, 3, 3 ) );
float saturationDrop = ( float ) Math.min( 1.0, component * 0.8f / MAX_COMP );
renderer.setSeriesPaint( 0, Color.getHSBColor( 0.0f, 1.0f - saturationDrop, 0.7f ) );
plot.setRenderer( renderer );
}
chart.getTitle().setFont( new Font( "SansSerif", Font.BOLD, 12 ) );
charts.get( efId ).add( chart );
}
}
}
/*
* DATES
*/
charts.put( -1L, new ArrayList<JFreeChart>() );
for ( Integer component : dateCorrelations.keySet() ) {
String xaxisLabel = componentShorthand + ( component + 1 );
List<Date> dates = svdo.getDates();
if ( dates.isEmpty() ) break;
if ( component >= MAX_COMP ) break;
Double a = dateCorrelations.get( component );
if ( a != null && !Double.isNaN( a ) ) {
Double corr = a;
Double[] eigenGene = svdo.getvMatrix().getColObj( component );
/*
* Plot eigengene vs values, add correlation to the plot
*/
TimeSeries series = new TimeSeries( "Dates vs. eigen" + ( component + 1 ) );
int i = 0;
for ( Date d : dates ) {
series.addOrUpdate( new Hour( d ), eigenGene[i++] );
}
TimeSeriesCollection dataset = new TimeSeriesCollection();
dataset.addSeries( series );
JFreeChart chart = ChartFactory.createTimeSeriesChart(
"Dates: " + xaxisLabel + " " + String.format( "r=%.2f", corr ), null, xaxisLabel, dataset,
false, false, false );
XYPlot xyPlot = chart.getXYPlot();
chart.getTitle().setFont( new Font( "SansSerif", Font.BOLD, 12 ) );
// standard renderer makes lines.
XYDotRenderer renderer = new XYDotRenderer();
renderer.setBaseFillPaint( Color.white );
renderer.setDotHeight( 3 );
renderer.setDotWidth( 3 );
renderer.setSeriesShape( 0, new Ellipse2D.Double( 0, 0, 3, 3 ) ); // has no effect, need dotheight.
float saturationDrop = ( float ) Math.min( 1.0, component * 0.8f / MAX_COMP );
renderer.setSeriesPaint( 0, Color.getHSBColor( 0.0f, 1.0f - saturationDrop, 0.7f ) );
ValueAxis domainAxis = xyPlot.getDomainAxis();
domainAxis.setVerticalTickLabels( true );
xyPlot.setRenderer( renderer );
xyPlot.setRangeGridlinesVisible( false );
xyPlot.setDomainGridlinesVisible( false );
charts.get( -1L ).add( chart );
}
}
/*
* Plot in a grid, with each factor as a column. FIXME What if we have too many factors to fit on the screen?
*/
int rows = MAX_COMP;
int columns = ( int ) Math.ceil( charts.size() );
int perChartSize = DEFAULT_QC_IMAGE_SIZE_PX;
BufferedImage image = new BufferedImage( columns * perChartSize, rows * perChartSize,
BufferedImage.TYPE_INT_ARGB );
Graphics2D g2 = image.createGraphics();
int currentX = 0;
int currentY = 0;
for ( Long id : charts.keySet() ) {
for ( JFreeChart chart : charts.get( id ) ) {
addChartToGraphics( chart, g2, currentX, currentY, perChartSize, perChartSize );
if ( currentY + perChartSize < rows * perChartSize ) {
currentY += perChartSize;
} else {
currentY = 0;
currentX += perChartSize;
}
}
}
os.write( ChartUtilities.encodeAsPNG( image ) );
return true;
}
/**
* Visualization of the correlation of principal components with factors or the date samples were run.
*
* @param response
* @param ee
* @param svdo SVD value object
*/
private void writePCAFactors( OutputStream os, ExpressionExperiment ee, SVDValueObject svdo ) throws Exception {
Map<Integer, Map<Long, Double>> factorCorrelations = svdo.getFactorCorrelations();
// Map<Integer, Map<Long, Double>> factorPvalues = svdo.getFactorPvalues();
Map<Integer, Double> dateCorrelations = svdo.getDateCorrelations();
assert ee.getId().equals( svdo.getId() );
if ( factorCorrelations.isEmpty() && dateCorrelations.isEmpty() ) {
writePlaceholderImage( os );
return;
}
ee = expressionExperimentService.thawLite( ee ); // need the experimental design
int maxWidth = 10;
Map<Long, String> efs = getFactorNames( ee, maxWidth );
DefaultCategoryDataset series = new DefaultCategoryDataset();
/*
* With two groups, or a continuous factor, we get rank correlations
*/
int MAX_COMP = 3;
double STUB = 0.05; // always plot a little thing so we know its there.
for ( Integer component : factorCorrelations.keySet() ) {
if ( component >= MAX_COMP ) break;
for ( Long efId : factorCorrelations.get( component ).keySet() ) {
Double a = factorCorrelations.get( component ).get( efId );
String facname = efs.get( efId ) == null ? "?" : efs.get( efId );
if ( a != null && !Double.isNaN( a ) ) {
Double corr = Math.max( STUB, Math.abs( a ) );
series.addValue( corr, "PC" + ( component + 1 ), facname );
}
}
}
for ( Integer component : dateCorrelations.keySet() ) {
if ( component >= MAX_COMP ) break;
Double a = dateCorrelations.get( component );
if ( a != null && !Double.isNaN( a ) ) {
Double corr = Math.max( STUB, Math.abs( a ) );
series.addValue( corr, "PC" + ( component + 1 ), "Date run" );
}
}
ChartFactory.setChartTheme( StandardChartTheme.createLegacyTheme() );
JFreeChart chart = ChartFactory.createBarChart( "", "Factors", "Component assoc.", series,
PlotOrientation.VERTICAL, true, false, false );
chart.getCategoryPlot().getRangeAxis().setRange( 0, 1 );
BarRenderer renderer = ( BarRenderer ) chart.getCategoryPlot().getRenderer();
renderer.setBasePaint( Color.white );
renderer.setShadowVisible( false );
chart.getCategoryPlot().setRangeGridlinesVisible( false );
chart.getCategoryPlot().setDomainGridlinesVisible( false );
ChartUtilities.applyCurrentTheme( chart );
CategoryAxis domainAxis = chart.getCategoryPlot().getDomainAxis();
domainAxis.setCategoryLabelPositions( CategoryLabelPositions.UP_45 );
for ( int i = 0; i < MAX_COMP; i++ ) {
/*
* Hue is straightforward; brightness is set medium to make it muted; saturation we vary from high to low.
*/
float saturationDrop = ( float ) Math.min( 1.0, i * 0.8f / MAX_COMP );
renderer.setSeriesPaint( i, Color.getHSBColor( 0.0f, 1.0f - saturationDrop, 0.7f ) );
}
/*
* Give figure more room .. up to a limit
*/
int width = DEFAULT_QC_IMAGE_SIZE_PX;
if ( chart.getCategoryPlot().getCategories().size() > 3 ) {
width = width + 40 * ( chart.getCategoryPlot().getCategories().size() - 2 );
}
int MAX_QC_IMAGE_SIZE_PX = 500;
width = Math.min( width, MAX_QC_IMAGE_SIZE_PX );
ChartUtilities.writeChartAsPNG( os, chart, width, DEFAULT_QC_IMAGE_SIZE_PX );
}
/**
* @param response
* @param svdo
* @return
*/
private boolean writePCAScree( OutputStream os, SVDValueObject svdo ) throws Exception {
/*
* Make a scree plot.
*/
CategoryDataset series = getPCAScree( svdo );
if ( series.getColumnCount() == 0 ) {
return false;
}
int MAX_COMPONENTS_FOR_SCREE = 10;
ChartFactory.setChartTheme( StandardChartTheme.createLegacyTheme() );
JFreeChart chart = ChartFactory.createBarChart( "", "Component (up to" + MAX_COMPONENTS_FOR_SCREE + ")",
"Fraction of var.", series, PlotOrientation.VERTICAL, false, false, false );
BarRenderer renderer = ( BarRenderer ) chart.getCategoryPlot().getRenderer();
renderer.setBasePaint( Color.white );
renderer.setShadowVisible( false );
chart.getCategoryPlot().setRangeGridlinesVisible( false );
chart.getCategoryPlot().setDomainGridlinesVisible( false );
ChartUtilities.writeChartAsPNG( os, chart, DEFAULT_QC_IMAGE_SIZE_PX, DEFAULT_QC_IMAGE_SIZE_PX );
return true;
}
/**
* Write a blank image so user doesn't see the broken icon.
*
* @param os
* @throws IOException
*/
private void writePlaceholderImage( OutputStream os ) throws IOException {
int placeholderSize = ( int ) ( DEFAULT_QC_IMAGE_SIZE_PX * 0.75 );
BufferedImage buffer = new BufferedImage( placeholderSize, placeholderSize, BufferedImage.TYPE_INT_RGB );
Graphics g = buffer.createGraphics();
g.setColor( Color.lightGray );
g.fillRect( 0, 0, placeholderSize, placeholderSize );
g.setColor( Color.black );
g.drawString( "Not available", placeholderSize / 4, placeholderSize / 4 );
ImageIO.write( buffer, "png", os );
}
/**
* Write a blank thumbnail image so user doesn't see the broken icon.
*
* @param os
* @param placeholderSize
* @throws IOException
*/
private void writePlaceholderThumbnailImage( OutputStream os, int placeholderSize ) throws IOException {
// Make the image a bit bigger to account for the empty space around the generated image.
// If we can find a way to remove this empty space, we don't need to make the chart bigger.
BufferedImage buffer = new BufferedImage( placeholderSize + 16, placeholderSize + 9, BufferedImage.TYPE_INT_RGB );
Graphics g = buffer.createGraphics();
g.setColor( Color.white );
g.fillRect( 0, 0, placeholderSize + 16, placeholderSize + 9 );
g.setColor( Color.gray );
g.drawLine( 8, placeholderSize + 5, placeholderSize + 8, placeholderSize + 5 ); // x-axis
g.drawLine( 8, 5, 8, placeholderSize + 5 ); // y-axis
g.setColor( Color.black );
Font font = g.getFont();
g.setFont( new Font( font.getName(), font.getStyle(), 8 ) );
g.drawString( "N/A", 9, placeholderSize );
ImageIO.write( buffer, "png", os );
}
/**
* @param id of experiment
* @param size Multiplier on the cell size. 1 or null for standard small size.
* @param text if true, output a tabbed file instead of a png
* @param os response output stream
* @return ModelAndView object if text is true, otherwise null
* @throws Exception
*/
@RequestMapping("/expressionExperiment/visualizeMeanVariance.html")
public ModelAndView visualizeMeanVariance( Long id, Double size, Boolean text, OutputStream os ) throws Exception {
if ( id == null ) {
log.warn( "No id!" );
return null;
}
ExpressionExperiment ee = expressionExperimentService.load( id );
if ( ee == null ) {
log.warn( "Could not load experiment with id " + id );
return null;
}
MeanVarianceRelation mvr = meanVarianceService.find( ee );
if ( mvr == null ) {
return null;
}
if ( text != null && text && mvr != null ) {
final ByteArrayConverter bac = new ByteArrayConverter();
double[] means = bac.byteArrayToDoubles( mvr.getMeans() );
double[] variances = bac.byteArrayToDoubles( mvr.getVariances() );
DoubleMatrix2D matrix = new DenseDoubleMatrix2D( means.length, 2 );
matrix.viewColumn( 0 ).assign( means );
matrix.viewColumn( 1 ).assign( variances );
String matrixString = new Formatter( "%1.2G" ).toTitleString( matrix, null, new String[] { "mean",
"variance" }, null, null, null, null );
ModelAndView mav = new ModelAndView( new TextView() );
mav.addObject( TextView.TEXT_PARAM, matrixString );
return mav;
}
writeMeanVariance( os, mvr, size );
return null;
}
/**
* Overrides XYLineAndShapeRenderer such that lines are drawn on top of points.
*/
private class XYRegressionRenderer extends XYLineAndShapeRenderer {
private static final long serialVersionUID = 1L;
@Override
protected boolean isLinePass( int pass ) {
return pass == 1;
}
@Override
protected boolean isItemPass( int pass ) {
return pass == 0;
}
}
/**
* @param os response output stream
* @param mvr MeanVarianceRelation object to plot
* @param size
* @return true if mvr data points were plotted
*/
private boolean writeMeanVariance( OutputStream os, MeanVarianceRelation mvr, Double size ) throws Exception {
// if number of datapoints > THRESHOLD then alpha = TRANSLUCENT, else alpha = OPAQUE
final int THRESHOLD = 1000;
final int TRANSLUCENT = 50;
final int OPAQUE = 255;
// Set maximum plot range to Y_MAX - YSCALE * OFFSET to cut down on excess white space
final double OFFSET_FACTOR = 0.05f;
final double Y_SCALE = 10f;
// set the final image size to be the minimum of MAX_IMAGE_SIZE_PX or size
final int MAX_IMAGE_SIZE_PX = 5;
if ( mvr == null ) {
return false;
}
// get data points
XYSeriesCollection collection = getMeanVariance( mvr );
if ( collection.getSeries().size() == 0 ) {
return false;
}
ChartFactory.setChartTheme( StandardChartTheme.createLegacyTheme() );
JFreeChart chart = ChartFactory.createScatterPlot( "", "log2(mean)", "log2(variance)", collection,
PlotOrientation.VERTICAL, false, false, false );
// adjust colors and shapes
XYRegressionRenderer renderer = new XYRegressionRenderer();
renderer.setBasePaint( Color.white );
int alpha = collection.getSeries( 0 ).getItemCount() > THRESHOLD ? TRANSLUCENT : OPAQUE;
renderer.setSeriesPaint( 0, new Color( 0, 0, 0, alpha ) );
renderer.setSeriesPaint( 1, Color.red );
renderer.setSeriesStroke( 1, new BasicStroke( 4 ) );
renderer.setSeriesShape( 0, new Ellipse2D.Double( 4, 4, 4, 4 ) );
renderer.setSeriesShapesFilled( 0, false );
renderer.setSeriesLinesVisible( 0, false );
renderer.setSeriesLinesVisible( 1, true );
renderer.setSeriesShapesVisible( 1, false );
XYPlot plot = chart.getXYPlot();
plot.setRenderer( renderer );
plot.setRangeGridlinesVisible( false );
plot.setDomainGridlinesVisible( false );
// adjust the chart domain and ranges
double yRange = collection.getSeries( 0 ).getMaxY() - collection.getSeries( 0 ).getMinY();
double offset = ( yRange ) * OFFSET_FACTOR;
double newYMin = collection.getSeries( 0 ).getMinY() - offset;
double newYMax = collection.getSeries( 0 ).getMaxY() - Y_SCALE * offset; // cut off excess space at the top
double newXMin = collection.getSeries( 0 ).getMinX() - offset;
double newXMax = collection.getSeries( 0 ).getMaxX() + offset;
ValueAxis yAxis = new NumberAxis( "Variance" );
yAxis.setRange( newYMin, newYMax );
ValueAxis xAxis = new NumberAxis( "Mean" );
xAxis.setRange( newXMin, newXMax );
chart.getXYPlot().setRangeAxis( yAxis );
chart.getXYPlot().setDomainAxis( xAxis );
int finalSize = ( int ) Math
.min( MAX_IMAGE_SIZE_PX * DEFAULT_QC_IMAGE_SIZE_PX, size * DEFAULT_QC_IMAGE_SIZE_PX );
ChartUtilities.writeChartAsPNG( os, chart, finalSize, finalSize );
return true;
}
/**
* @param response
* @param ee
*/
private boolean writeProbeCorrHistImage( OutputStream os, ExpressionExperiment ee ) throws IOException {
XYSeries series = getCorrelHist( ee );
if ( series.getItemCount() == 0 ) {
return false;
}
ChartFactory.setChartTheme( StandardChartTheme.createLegacyTheme() );
XYSeriesCollection xySeriesCollection = new XYSeriesCollection();
xySeriesCollection.addSeries( series );
JFreeChart chart = ChartFactory.createXYLineChart( "", "Correlation", "Frequency", xySeriesCollection,
PlotOrientation.VERTICAL, false, false, false );
chart.getXYPlot().setRangeGridlinesVisible( false );
chart.getXYPlot().setDomainGridlinesVisible( false );
XYItemRenderer renderer = chart.getXYPlot().getRenderer();
renderer.setBasePaint( Color.white );
int size = ( int ) ( DEFAULT_QC_IMAGE_SIZE_PX * 0.8 );
ChartUtilities.writeChartAsPNG( os, chart, size, size );
return true;
}
/**
* Has to handle the situation where there might be more than one ResultSet.
*
* @param os
* @param ee
* @param analysisId
* @param rsId
* @throws IOException
*/
private boolean writePValueHistImage( OutputStream os, ExpressionExperiment ee, Long analysisId, Long rsId,
String factorName ) throws IOException {
XYSeries series = getDiffExPvalueHistXYSeries( ee, analysisId, rsId, factorName );
if ( series == null ) {
return false;
}
XYSeriesCollection xySeriesCollection = new XYSeriesCollection( series );
ChartFactory.setChartTheme( StandardChartTheme.createLegacyTheme() );
JFreeChart chart = ChartFactory.createXYLineChart( "", "P-value", "Frequency", xySeriesCollection,
PlotOrientation.VERTICAL, false, false, false );
chart.getXYPlot().setRangeGridlinesVisible( false );
chart.getXYPlot().setDomainGridlinesVisible( false );
XYItemRenderer renderer = chart.getXYPlot().getRenderer();
renderer.setBasePaint( Color.white );
ChartUtilities
.writeChartAsPNG( os, chart, ( int ) ( DEFAULT_QC_IMAGE_SIZE_PX * 1.4 ), DEFAULT_QC_IMAGE_SIZE_PX );
return true;
}
/**
* Write p-value histogram thumbnail image.
*
* @param os
* @param ee
* @param analysisId
* @param rsId
* @param size
* @throws IOException
*/
private boolean writePValueHistThumbnailImage( OutputStream os, ExpressionExperiment ee, Long analysisId,
Long rsId, String factorName, int size ) throws IOException {
XYSeries series = getDiffExPvalueHistXYSeries( ee, analysisId, rsId, factorName );
if ( series == null ) {
return false;
}
series.add( -0.01, 0.0 );
XYSeriesCollection xySeriesCollection = new XYSeriesCollection( series );
ChartFactory.setChartTheme( StandardChartTheme.createLegacyTheme() );
JFreeChart chart = ChartFactory.createXYLineChart( "", "", "", xySeriesCollection, PlotOrientation.VERTICAL,
false, false, false );
chart.getXYPlot().setBackgroundPaint( new Color( 230, 230, 230 ) );
chart.getXYPlot().setRangeGridlinesVisible( false );
chart.getXYPlot().setDomainGridlinesVisible( false );
chart.getXYPlot().setOutlineVisible( false ); // around the plot
chart.getXYPlot().getRangeAxis().setTickMarksVisible( false );
chart.getXYPlot().getRangeAxis().setTickLabelsVisible( false );
chart.getXYPlot().getRangeAxis().setAxisLineVisible( false );
chart.getXYPlot().getDomainAxis().setTickMarksVisible( false );
chart.getXYPlot().getDomainAxis().setTickLabelsVisible( false );
chart.getXYPlot().getDomainAxis().setAxisLineVisible( false );
chart.getXYPlot().getRenderer().setSeriesPaint( 0, Color.RED );
// chart.getXYPlot().getRenderer().setSeriesStroke( 0, new BasicStroke( 1 ) );
// Make the chart a bit bigger to account for the empty space around the generated image.
// If we can find a way to remove this empty space, we don't need to make the chart bigger.
ChartUtilities.writeChartAsPNG( os, chart, size + 16, size + 9 );
return true;
}
}
| gemma-web/src/main/java/ubic/gemma/web/controller/expression/experiment/ExpressionExperimentQCController.java | /*
* The Gemma project
*
* Copyright (c) 2007 University of British Columbia
*
* 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 ubic.gemma.web.controller.expression.experiment;
import java.awt.BasicStroke;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Font;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.geom.Ellipse2D;
import java.awt.geom.Rectangle2D;
import java.awt.image.BufferedImage;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.OutputStream;
import java.io.StringWriter;
import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Date;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.TreeMap;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import javax.imageio.ImageIO;
import org.apache.commons.lang.ArrayUtils;
import org.apache.commons.lang.StringUtils;
import org.jfree.chart.ChartFactory;
import org.jfree.chart.ChartUtilities;
import org.jfree.chart.JFreeChart;
import org.jfree.chart.StandardChartTheme;
import org.jfree.chart.axis.CategoryAxis;
import org.jfree.chart.axis.CategoryLabelPositions;
import org.jfree.chart.axis.NumberAxis;
import org.jfree.chart.axis.ValueAxis;
import org.jfree.chart.plot.CategoryPlot;
import org.jfree.chart.plot.PlotOrientation;
import org.jfree.chart.plot.XYPlot;
import org.jfree.chart.renderer.category.BarRenderer;
import org.jfree.chart.renderer.category.ScatterRenderer;
import org.jfree.chart.renderer.xy.XYDotRenderer;
import org.jfree.chart.renderer.xy.XYItemRenderer;
import org.jfree.chart.renderer.xy.XYLineAndShapeRenderer;
import org.jfree.data.category.CategoryDataset;
import org.jfree.data.category.DefaultCategoryDataset;
import org.jfree.data.statistics.DefaultMultiValueCategoryDataset;
import org.jfree.data.time.Hour;
import org.jfree.data.time.TimeSeries;
import org.jfree.data.time.TimeSeriesCollection;
import org.jfree.data.xy.DefaultXYDataset;
import org.jfree.data.xy.XYSeries;
import org.jfree.data.xy.XYSeriesCollection;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
import ubic.basecode.dataStructure.matrix.DenseDoubleMatrix;
import ubic.basecode.dataStructure.matrix.DoubleMatrix;
import ubic.basecode.graphics.ColorMatrix;
import ubic.basecode.graphics.MatrixDisplay;
import ubic.basecode.io.ByteArrayConverter;
import ubic.basecode.io.writer.MatrixWriter;
import ubic.basecode.math.DescriptiveWithMissing;
import ubic.basecode.math.distribution.Histogram;
import ubic.gemma.analysis.expression.diff.DifferentialExpressionFileUtils;
import ubic.gemma.analysis.preprocess.MeanVarianceService;
import ubic.gemma.analysis.preprocess.OutlierDetails;
import ubic.gemma.analysis.preprocess.OutlierDetectionService;
import ubic.gemma.analysis.preprocess.SampleCoexpressionMatrixService;
import ubic.gemma.analysis.preprocess.svd.SVDService;
import ubic.gemma.analysis.preprocess.svd.SVDValueObject;
import ubic.gemma.analysis.util.ExperimentalDesignUtils;
import ubic.gemma.expression.experiment.service.ExpressionExperimentService;
import ubic.gemma.model.analysis.expression.diff.DifferentialExpressionResultService;
import ubic.gemma.model.analysis.expression.diff.ExpressionAnalysisResultSet;
import ubic.gemma.model.analysis.expression.diff.PvalueDistribution;
import ubic.gemma.model.common.description.Characteristic;
import ubic.gemma.model.expression.bioAssay.BioAssay;
import ubic.gemma.model.expression.bioAssayData.MeanVarianceRelation;
import ubic.gemma.model.expression.experiment.ExperimentalFactor;
import ubic.gemma.model.expression.experiment.ExpressionExperiment;
import ubic.gemma.model.expression.experiment.FactorValue;
import ubic.gemma.tasks.analysis.expression.ProcessedExpressionDataVectorCreateTask;
import ubic.gemma.util.ConfigUtils;
import ubic.gemma.util.EntityUtils;
import ubic.gemma.web.controller.BaseController;
import ubic.gemma.web.view.TextView;
import cern.colt.list.DoubleArrayList;
import cern.colt.matrix.DoubleMatrix2D;
import cern.colt.matrix.doublealgo.Formatter;
import cern.colt.matrix.impl.DenseDoubleMatrix2D;
/**
* @author paul
* @version $Id$
*/
@Controller
public class ExpressionExperimentQCController extends BaseController {
private static final int MAX_HEATMAP_CELLSIZE = 12;
public static final int DEFAULT_QC_IMAGE_SIZE_PX = 200;
@Autowired
private ExpressionExperimentService expressionExperimentService;
@Autowired
private SVDService svdService;
@Autowired
ProcessedExpressionDataVectorCreateTask processedExpressionDataVectorCreateTask;
@Autowired
private MeanVarianceService meanVarianceService;
/**
* @param id
* @param os
* @throws Exception
*/
@RequestMapping("/expressionExperiment/detailedFactorAnalysis.html")
public void detailedFactorAnalysis( Long id, OutputStream os ) throws Exception {
ExpressionExperiment ee = expressionExperimentService.load( id );
if ( ee == null ) {
log.warn( "Could not load experiment with id " + id );
return;
}
boolean ok = writeDetailedFactorAnalysis( ee, os );
if ( !ok ) {
writePlaceholderImage( os );
}
}
/**
* @param id
* @param os
* @return
* @throws Exception
*/
@RequestMapping("/expressionExperiment/pcaFactors.html")
public ModelAndView pcaFactors( Long id, OutputStream os ) throws Exception {
if ( id == null ) return null;
ExpressionExperiment ee = expressionExperimentService.load( id );
if ( ee == null ) {
log.warn( "Could not load experiment with id " + id ); // or access denied.
writePlaceholderImage( os );
return null;
}
SVDValueObject svdo = null;
try {
svdo = svdService.getSvdFactorAnalysis( ee.getId() );
} catch ( Exception e ) {
// if there is no pca
// log.error( e, e );
}
if ( svdo != null ) {
this.writePCAFactors( os, ee, svdo );
} else
this.writePlaceholderImage( os );
return null;
}
/**
* @param request
* @param response
* @return
* @throws Exception
*/
@RequestMapping("/expressionExperiment/pcaScree.html")
public ModelAndView pcaScree( Long id, OutputStream os ) throws Exception {
ExpressionExperiment ee = expressionExperimentService.load( id );
if ( ee == null ) {
log.warn( "Could not load experiment with id " + id ); // or access deined.
writePlaceholderImage( os );
return null;
}
SVDValueObject svdo = svdService.getSvd( ee.getId() );
if ( svdo != null ) {
this.writePCAScree( os, svdo );
} else {
writePlaceholderImage( os );
}
return null;
}
/**
* @param id of experiment
*/
@RequestMapping("/expressionExperiment/outliers.html")
public ModelAndView identifyOutliers( Long id ) {
if ( id == null ) {
log.warn( "No id!" );
return null;
}
ExpressionExperiment ee = expressionExperimentService.load( id );
if ( ee == null ) {
log.warn( "Could not load experiment with id " + id );
return null;
}
DoubleMatrix<BioAssay, BioAssay> sampleCorrelationMatrix = sampleCoexpressionMatrixService.findOrCreate( ee );
Collection<OutlierDetails> outliers = outlierDetectionService.identifyOutliers( ee, sampleCorrelationMatrix,
15, 0.9 );
if ( !outliers.isEmpty() ) {
for ( OutlierDetails details : outliers ) {
// TODO
details.getBioAssay();
}
}
return null; // nothing to return;
}
@Autowired
private SampleCoexpressionMatrixService sampleCoexpressionMatrixService;
@Autowired
private OutlierDetectionService outlierDetectionService;
/**
* @param id of experiment
* @param size Multiplier on the cell size. 1 or null for standard small size.
* @param contrVal
* @param text if true, output a tabbed file instead of a png
* @param showLabels if the row and column labels of the matrix should be shown.
* @param os response output stream
* @return
* @throws Exception
*/
@RequestMapping("/expressionExperiment/visualizeCorrMat.html")
public ModelAndView visualizeCorrMat( Long id, Double size, String contrVal, Boolean text, Boolean showLabels,
Boolean forceShowLabels, OutputStream os ) throws Exception {
if ( id == null ) {
log.warn( "No id!" );
return null;
}
ExpressionExperiment ee = expressionExperimentService.load( id );
if ( ee == null ) {
log.warn( "Could not load experiment with id " + id );
return null;
}
DoubleMatrix<BioAssay, BioAssay> omatrix = sampleCoexpressionMatrixService.findOrCreate( ee );
List<String> stringNames = new ArrayList<String>();
for ( BioAssay ba : omatrix.getRowNames() ) {
stringNames.add( ba.getName() + " ID=" + ba.getId() );
}
DoubleMatrix<String, String> matrix = new DenseDoubleMatrix<String, String>( omatrix.getRawMatrix() );
matrix.setRowNames( stringNames );
matrix.setColumnNames( stringNames );
if ( text != null && text ) {
StringWriter s = new StringWriter();
MatrixWriter<String, String> mw = new MatrixWriter<String, String>( s, new DecimalFormat( "#.##" ) );
mw.writeMatrix( matrix, true );
ModelAndView mav = new ModelAndView( new TextView() );
mav.addObject( TextView.TEXT_PARAM, s.toString() );
return mav;
}
/*
* Blank out the diagonal so it doesn't affect the colour scale.
*/
for ( int i = 0; i < matrix.rows(); i++ ) {
matrix.set( i, i, Double.NaN );
}
ColorMatrix<String, String> cm = new ColorMatrix<String, String>( matrix );
cleanNames( matrix );
int row = matrix.rows();
int cellsize = ( int ) Math.min( MAX_HEATMAP_CELLSIZE, Math.max( 1, size * DEFAULT_QC_IMAGE_SIZE_PX / row ) );
MatrixDisplay<String, String> writer = new MatrixDisplay<String, String>( cm );
boolean reallyShowLabels;
int minimumCellSizeForText = 9;
if ( forceShowLabels != null && forceShowLabels ) {
cellsize = Math.min( MAX_HEATMAP_CELLSIZE, minimumCellSizeForText );
reallyShowLabels = true;
} else {
reallyShowLabels = showLabels == null ? false : showLabels && cellsize >= minimumCellSizeForText;
}
writer.setCellSize( new Dimension( cellsize, cellsize ) );
boolean showScalebar = size > 2;
writer.writeToPng( cm, os, reallyShowLabels, showScalebar );
return null; // nothing to return;
}
/**
* @param request
* @param response
* @return
*/
@RequestMapping("/expressionExperiment/visualizeProbeCorrDist.html")
public ModelAndView visualizeProbeCorrDist( Long id, OutputStream os ) throws Exception {
ExpressionExperiment ee = expressionExperimentService.load( id );
if ( ee == null ) {
log.warn( "Could not load experiment with id " + id );
return null;
}
writeProbeCorrHistImage( os, ee );
return null; // nothing to return;
}
/**
* @param id of the experiment
* @param analysisId of the analysis
* @param rsId resultSet Id
* @param factorName deprecated, we will use rsId instead. Maintained for backwards compatibility.
* @param size of the image.
* @param os stream to write the image to.
* @return null
* @throws Exception
*/
@RequestMapping("/expressionExperiment/visualizePvalueDist.html")
public ModelAndView visualizePvalueDist( Long id, Long analysisId, Long rsid, String factorName, Integer size,
OutputStream os ) throws Exception {
ExpressionExperiment ee = this.expressionExperimentService.load( id );
if ( ee == null ) {
this.log.warn( "Could not load experiment with id " + id );
return null;
}
if ( size == null ) {
if ( !this.writePValueHistImage( os, ee, analysisId, rsid, factorName ) ) {
writePlaceholderImage( os );
}
} else {
if ( !this.writePValueHistThumbnailImage( os, ee, analysisId, rsid, factorName, size ) ) {
writePlaceholderThumbnailImage( os, size );
}
}
return null; // nothing to return;
}
/**
* @param eeid
* @param os
* @throws IOException
*/
@RequestMapping("/expressionExperiment/eigenGenes.html")
public void writeEigenGenes( Long eeid, OutputStream os ) throws IOException {
ExpressionExperiment ee = expressionExperimentService.load( eeid );
if ( ee == null ) {
throw new IllegalArgumentException( "Could not load experiment with id " + eeid ); // or access deined.
}
SVDValueObject svdo = svdService.getSvd( ee.getId() );
DoubleMatrix<Long, Integer> vMatrix = svdo.getvMatrix();
/*
* FIXME put the biomaterial names in there instead of the IDs.
*/
MatrixWriter<Long, Integer> mr = new MatrixWriter<Long, Integer>( os );
mr.writeMatrix( vMatrix, true );
}
/**
* @param chart
* @param g2
* @param x
* @param y
* @param width
* @param height
*/
private void addChartToGraphics( JFreeChart chart, Graphics2D g2, double x, double y, double width, double height ) {
chart.draw( g2, new Rectangle2D.Double( x, y, width, height ), null, null );
}
/**
* clean up the names of the correlation matrix rows and columns, so they are not to long and also contain the
* bioassay id for reference purposes. Note that newly created coexpression matrices already give shorter names, so
* this is partly for backwards compatibility with the old format.
*
* @param matrix
*/
private void cleanNames( DoubleMatrix<String, String> matrix ) {
List<String> rawRowNames = matrix.getRowNames();
List<String> rowNames = new ArrayList<String>();
int i = 0;
Pattern p = Pattern.compile( "^.*?ID=([0-9]+).*$", Pattern.CASE_INSENSITIVE );
Pattern bipattern = Pattern.compile( "BioAssayImpl Id=[0-9]+ Name=", Pattern.CASE_INSENSITIVE );
int MAX_BIO_ASSAY_NAME_LEN = 30;
for ( String rn : rawRowNames ) {
Matcher matcher = p.matcher( rn );
Matcher bppat = bipattern.matcher( rn );
String bioassayid = null;
if ( matcher.matches() ) {
bioassayid = matcher.group( 1 );
}
String cleanRn = StringUtils.abbreviate( bppat.replaceFirst( "" ), MAX_BIO_ASSAY_NAME_LEN );
if ( bioassayid != null ) {
if ( !cleanRn.contains( bioassayid ) )
rowNames.add( cleanRn + " ID=" + bioassayid ); // ensure the rows are unique
else
rowNames.add( cleanRn + " " + ++i );
} else {
rowNames.add( cleanRn );
}
}
matrix.setRowNames( rowNames );
matrix.setColumnNames( rowNames );
}
/**
* Support method for writeDetailedFactorAnalysis
*
* @param efIdMap
* @param efId
* @param categories map of factor ID to text value. Strings will be unique, but possibly abbreviated and/or munged.
*/
private void getCategories( Map<Long, ExperimentalFactor> efIdMap, Long efId, Map<Long, String> categories ) {
ExperimentalFactor ef = efIdMap.get( efId );
if ( ef == null ) return;
int maxCategoryLabelLength = 10;
for ( FactorValue fv : ef.getFactorValues() ) {
String value = fv.getValue();
if ( StringUtils.isBlank( value ) || value.equals( "null" ) ) {
for ( Characteristic c : fv.getCharacteristics() ) {
if ( StringUtils.isNotBlank( c.getValue() ) ) {
if ( StringUtils.isNotBlank( value ) ) {
value = value + "; " + c.getValue();
} else {
value = c.getValue();
}
}
}
}
if ( StringUtils.isBlank( value ) ) {
value = fv.toString() + "--??";
}
if ( value.startsWith( ExperimentalDesignUtils.BATCH_FACTOR_NAME_PREFIX ) ) {
value = value.replaceFirst( ExperimentalDesignUtils.BATCH_FACTOR_NAME_PREFIX, "" );
} else {
value = StringUtils.abbreviate( value, maxCategoryLabelLength );
}
while ( categories.values().contains( value ) ) {
value = value + "+";// make unique, kludge, will end up with string of ++++
}
categories.put( fv.getId(), value );
}
}
/**
* @param ee
* @return JFreeChart XYSeries representing the histogram.
* @throws FileNotFoundException
* @throws IOException
*/
private XYSeries getCorrelHist( ExpressionExperiment ee ) throws FileNotFoundException, IOException {
File f = this.locateProbeCorrFile( ee );
XYSeries series = new XYSeries( ee.getId(), true, true );
BufferedReader in = new BufferedReader( new FileReader( f ) );
while ( in.ready() ) {
String line = in.readLine().trim();
if ( line.startsWith( "#" ) ) continue;
String[] split = StringUtils.split( line );
if ( split.length < 2 ) continue;
try {
double x = Double.parseDouble( split[0] );
double y = Double.parseDouble( split[1] );
series.add( x, y );
} catch ( NumberFormatException e ) {
// line wasn't useable.. no big deal. Heading is included.
}
}
return series;
}
@Autowired
private DifferentialExpressionResultService differentialExpressionResultService;
/**
* @param ee
* @param analysisId
* @param rsId
* @param factorName
* @return JFreeChart XYSeries representing the histogram for the requested result set
* @throws FileNotFoundException
* @throws IOException
*/
private XYSeries getDiffExPvalueHistXYSeries( ExpressionExperiment ee, Long analysisId, Long rsId, String factorName )
throws FileNotFoundException, IOException {
if ( ee == null || analysisId == null || rsId == null ) {
log.warn( "Got invalid values: " + ee + " " + analysisId + " " + rsId + " " + factorName );
return null;
}
Histogram hist = differentialExpressionResultService.loadPvalueDistribution( rsId );
XYSeries xySeries = null;
if ( hist != null ) {
xySeries = new XYSeries( rsId, true, true );
Double[] binEdges = hist.getBinEdges();
double[] counts = hist.getArray();
assert binEdges.length == counts.length;
for ( int i = 0; i < binEdges.length; i++ ) {
xySeries.add( binEdges[i].doubleValue(), counts[i] );
}
return xySeries;
}
/*
* Rest of this is for backwards compatibility - read from the file.
*/
File file = this.locatePvalueDistFile( ee, analysisId );
// Current format is to have just one file for each analysis.
if ( file == null ) {
return null;
}
BufferedReader in = new BufferedReader( new FileReader( file ) );
int factorNameIndex = -1;
boolean readHeader = false;
PvalueDistribution pvalueDist = PvalueDistribution.Factory.newInstance();
DoubleArrayList counts = new DoubleArrayList();
while ( in.ready() ) {
String line = in.readLine().trim();
if ( line.startsWith( "#" ) ) continue;
String[] split = StringUtils.split( line, "\t" );
if ( split.length < 2 ) continue;
if ( !readHeader ) {
for ( int i = 1; i < split.length; i++ ) {
String currFactorName = split[i];
// Note that currFactorName may have suffix such as __3
// (DifferentialExpressionAnalyzerService.FACTOR_NAME_MANGLING_DELIMITER followed by the ID).
if ( currFactorName.length() >= factorName.length()
&& factorName.equals( currFactorName.substring( 0, factorName.length() ) ) ) {
factorNameIndex = i;
}
}
readHeader = true;
if ( factorNameIndex < 0 ) {
// If factorName cannot be found, don't need to continue reading file.
break;
}
continue;
}
try {
double x = Double.parseDouble( split[0] );
double y = Double.parseDouble( split[factorNameIndex] );
if ( xySeries == null ) {
xySeries = new XYSeries( factorName, true, true );
}
xySeries.add( x, y );
/*
* Update the result set.
*/
counts.add( y );
} catch ( NumberFormatException e ) {
// line wasn't useable.. no big deal. Heading is included.
}
}
if ( counts.size() > 0 ) {
pvalueDistFileToPersistent( file, rsId, pvalueDist, counts );
}
return xySeries;
}
/**
* For conversion from legacy system.
*
* @param file
* @param rsId
* @param pvalueDist
* @param counts
*/
private void pvalueDistFileToPersistent( File file, Long rsId, PvalueDistribution pvalueDist, DoubleArrayList counts ) {
log.info( "Converting from pvalue distribution file to persistent stored version" );
ByteArrayConverter bac = new ByteArrayConverter();
Double[] countArray = ( Double[] ) counts.toList().toArray( new Double[] {} );
byte[] bytes = bac.doubleArrayToBytes( countArray );
pvalueDist.setBinCounts( bytes );
pvalueDist.setNumBins( countArray.length );
ExpressionAnalysisResultSet resultSet = differentialExpressionResultService.loadAnalysisResultSet( rsId );
resultSet.setPvalueDistribution( pvalueDist );
differentialExpressionResultService.update( resultSet );
if ( file.delete() ) {
log.info( "Old file deleted" );
} else {
log.info( "Old file could not be deleted" );
}
}
/**
* Get the eigengene for the given component.
* <p>
* The values are rescaled so that jfreechart can cope. Small numbers give it fits.
*
* @param svdo
* @param component
* @return
*/
private Double[] getEigenGene( SVDValueObject svdo, Integer component ) {
DoubleArrayList eigenGeneL = new DoubleArrayList( ArrayUtils.toPrimitive( svdo.getvMatrix().getColObj(
component ) ) );
DescriptiveWithMissing.standardize( eigenGeneL );
Double[] eigenGene = ArrayUtils.toObject( eigenGeneL.elements() );
return eigenGene;
}
/**
* @param ee
* @param maxWidth
* @return
*/
private Map<Long, String> getFactorNames( ExpressionExperiment ee, int maxWidth ) {
Collection<ExperimentalFactor> factors = ee.getExperimentalDesign().getExperimentalFactors();
Map<Long, String> efs = new HashMap<Long, String>();
for ( ExperimentalFactor ef : factors ) {
efs.put( ef.getId(), StringUtils.abbreviate( StringUtils.capitalize( ef.getName() ), maxWidth ) );
}
return efs;
}
/**
* @param svdo
* @return
*/
private CategoryDataset getPCAScree( SVDValueObject svdo ) {
DefaultCategoryDataset series = new DefaultCategoryDataset();
Double[] variances = svdo.getVariances();
if ( variances == null || variances.length == 0 ) {
return series;
}
int MAX_COMPONENTS_FOR_SCREE = 10; // make constant
for ( int i = 0; i < Math.min( MAX_COMPONENTS_FOR_SCREE, variances.length ); i++ ) {
series.addValue( variances[i], new Integer( 1 ), new Integer( i + 1 ) );
}
return series;
}
/**
* @param mvr MeanVarianceRelation object that contains the datapoints to plot
* @return XYSeriesCollection which contains the Mean-variance and Loess series
*/
private XYSeriesCollection getMeanVariance( MeanVarianceRelation mvr ) {
final ByteArrayConverter bac = new ByteArrayConverter();
XYSeriesCollection dataset = new XYSeriesCollection();
if ( mvr == null ) {
return dataset;
}
double[] means = bac.byteArrayToDoubles( mvr.getMeans() );
double[] variances = bac.byteArrayToDoubles( mvr.getVariances() );
double[] loessX = bac.byteArrayToDoubles( mvr.getLowessX() );
double[] loessY = bac.byteArrayToDoubles( mvr.getLowessY() );
if ( means == null || variances == null || loessX == null || loessY == null ) {
return dataset;
}
XYSeries series = new XYSeries( "Mean-variance" );
for ( int i = 0; i < means.length; i++ ) {
series.add( means[i], variances[i] );
}
// loess fit trend line
XYSeries loessSeries = new XYSeries( "Loess" );
for ( int i = 0; i < loessX.length; i++ ) {
loessSeries.add( loessX[i], loessY[i] );
}
dataset.addSeries( series );
dataset.addSeries( loessSeries );
return dataset;
}
/**
* @param ee
* @return
*/
private File locateProbeCorrFile( ExpressionExperiment ee ) {
String shortName = ee.getShortName();
String analysisStoragePath = ConfigUtils.getAnalysisStoragePath();
String suffix = ".correlDist.txt";
File f = new File( analysisStoragePath + File.separatorChar + shortName + suffix );
return f;
}
/**
* @param ee
* @param analysisId
* @return
* @deprecated because we store this in the db now.
*/
@Deprecated
private File locatePvalueDistFile( ExpressionExperiment ee, Long analysisId ) {
File file = null;
if ( ee != null && analysisId != null ) {
String shortName = ee.getShortName();
file = new File( DifferentialExpressionFileUtils.getBaseDifferentialDirectory( shortName ), shortName
+ ".an" + analysisId + ".pvalues" + DifferentialExpressionFileUtils.PVALUE_DIST_SUFFIX );
if ( !file.exists() ) {
file = null;
}
}
return file;
}
/**
* @param ee
* @param os
* @return
* @throws Exception
*/
private boolean writeDetailedFactorAnalysis( ExpressionExperiment ee, OutputStream os ) throws Exception {
SVDValueObject svdo = svdService.getSvdFactorAnalysis( ee.getId() );
if ( svdo == null ) return false;
if ( svdo.getFactors().isEmpty() && svdo.getDates().isEmpty() ) {
return false;
}
Map<Integer, Map<Long, Double>> factorCorrelations = svdo.getFactorCorrelations();
// Map<Integer, Map<Long, Double>> factorPvalues = svdo.getFactorPvalues();
Map<Integer, Double> dateCorrelations = svdo.getDateCorrelations();
assert ee.getId().equals( svdo.getId() );
ee = expressionExperimentService.thawLite( ee ); // need the experimental design
int maxWidth = 30;
Map<Long, String> efs = getFactorNames( ee, maxWidth );
Map<Long, ExperimentalFactor> efIdMap = EntityUtils.getIdMap( ee.getExperimentalDesign()
.getExperimentalFactors() );
Collection<Long> continuousFactors = new HashSet<Long>();
for ( ExperimentalFactor ef : ee.getExperimentalDesign().getExperimentalFactors() ) {
boolean isContinous = ExperimentalDesignUtils.isContinuous( ef );
if ( isContinous ) {
continuousFactors.add( ef.getId() );
}
}
/*
* Make plots of the dates vs. PCs, factors vs. PCs.
*/
int MAX_COMP = 3;
Map<Long, List<JFreeChart>> charts = new LinkedHashMap<Long, List<JFreeChart>>();
ChartFactory.setChartTheme( StandardChartTheme.createLegacyTheme() );
/*
* FACTORS
*/
String componentShorthand = "PC";
for ( Integer component : factorCorrelations.keySet() ) {
if ( component >= MAX_COMP ) break;
String xaxisLabel = componentShorthand + ( component + 1 );
for ( Long efId : factorCorrelations.get( component ).keySet() ) {
/*
* Should not happen.
*/
if ( !efs.containsKey( efId ) ) {
log.warn( "No experimental factor with id " + efId );
continue;
}
if ( !svdo.getFactors().containsKey( efId ) ) {
// this should not happen.
continue;
}
boolean isCategorical = !continuousFactors.contains( efId );
Map<Long, String> categories = new HashMap<Long, String>();
if ( isCategorical ) {
getCategories( efIdMap, efId, categories );
}
if ( !charts.containsKey( efId ) ) {
charts.put( efId, new ArrayList<JFreeChart>() );
}
Double a = factorCorrelations.get( component ).get( efId );
String plotname = ( efs.get( efId ) == null ? "?" : efs.get( efId ) ) + " " + xaxisLabel; // unique?
if ( a != null && !Double.isNaN( a ) ) {
Double corr = a;
String title = plotname + " " + String.format( "%.2f", corr );
List<Double> values = svdo.getFactors().get( efId );
Double[] eigenGene = getEigenGene( svdo, component );
assert values.size() == eigenGene.length;
/*
* Plot eigengene vs values, add correlation to the plot
*/
JFreeChart chart = null;
if ( isCategorical ) {
/*
* Categorical factor
*/
// use the absolute value of the correlation, since direction is arbitrary.
title = plotname + " " + String.format( "r=%.2f", Math.abs( corr ) );
DefaultMultiValueCategoryDataset dataset = new DefaultMultiValueCategoryDataset();
/*
* What this code does is organize the factor values by the groups.
*/
Map<String, List<Double>> groupedValues = new TreeMap<String, List<Double>>();
for ( int i = 0; i < values.size(); i++ ) {
Long fvId = values.get( i ).longValue();
String fvValue = categories.get( fvId );
if ( fvValue == null ) {
/*
* Problem ...eg gill2006fateinocean id=1748 -- missing values. We just don't plot
* anything for this sample.
*/
continue; // is this all we need to do?
}
if ( !groupedValues.containsKey( fvValue ) ) {
groupedValues.put( fvValue, new ArrayList<Double>() );
}
groupedValues.get( fvValue ).add( eigenGene[i] );
if ( log.isDebugEnabled() ) log.debug( fvValue + " " + values.get( i ) );
}
for ( String key : groupedValues.keySet() ) {
dataset.add( groupedValues.get( key ), plotname, key );
}
// don't show the name of the X axis: it's redundant with the title.
NumberAxis rangeAxis = new NumberAxis( xaxisLabel );
rangeAxis.setAutoRangeIncludesZero( false );
// rangeAxis.setAutoRange( false );
rangeAxis.setAutoRangeMinimumSize( 4.0 );
// rangeAxis.setRange( new Range( -2, 2 ) );
CategoryPlot plot = new CategoryPlot( dataset, new CategoryAxis( null ), rangeAxis,
new ScatterRenderer() );
plot.setRangeGridlinesVisible( false );
plot.setDomainGridlinesVisible( false );
chart = new JFreeChart( title, new Font( "SansSerif", Font.BOLD, 12 ), plot, false );
ScatterRenderer renderer = ( ScatterRenderer ) plot.getRenderer();
float saturationDrop = ( float ) Math.min( 1.0, component * 0.8f / MAX_COMP );
renderer.setSeriesFillPaint( 0, Color.getHSBColor( 0.0f, 1.0f - saturationDrop, 0.7f ) );
renderer.setSeriesShape( 0, new Ellipse2D.Double( 0, 0, 3, 3 ) );
renderer.setUseOutlinePaint( false );
renderer.setUseFillPaint( true );
renderer.setBaseFillPaint( Color.white );
CategoryAxis domainAxis = plot.getDomainAxis();
domainAxis.setCategoryLabelPositions( CategoryLabelPositions.UP_45 );
} else {
/*
* Continous value factor
*/
DefaultXYDataset series = new DefaultXYDataset();
series.addSeries( plotname,
new double[][] { ArrayUtils.toPrimitive( values.toArray( new Double[] {} ) ),
ArrayUtils.toPrimitive( eigenGene ) } );
// don't show x-axis label, which would otherwise be efs.get( efId )
chart = ChartFactory.createScatterPlot( title, null, xaxisLabel, series,
PlotOrientation.VERTICAL, false, false, false );
XYPlot plot = chart.getXYPlot();
plot.setRangeGridlinesVisible( false );
plot.setDomainGridlinesVisible( false );
XYItemRenderer renderer = plot.getRenderer();
renderer.setBasePaint( Color.white );
renderer.setSeriesShape( 0, new Ellipse2D.Double( 0, 0, 3, 3 ) );
float saturationDrop = ( float ) Math.min( 1.0, component * 0.8f / MAX_COMP );
renderer.setSeriesPaint( 0, Color.getHSBColor( 0.0f, 1.0f - saturationDrop, 0.7f ) );
plot.setRenderer( renderer );
}
chart.getTitle().setFont( new Font( "SansSerif", Font.BOLD, 12 ) );
charts.get( efId ).add( chart );
}
}
}
/*
* DATES
*/
charts.put( -1L, new ArrayList<JFreeChart>() );
for ( Integer component : dateCorrelations.keySet() ) {
String xaxisLabel = componentShorthand + ( component + 1 );
List<Date> dates = svdo.getDates();
if ( dates.isEmpty() ) break;
if ( component >= MAX_COMP ) break;
Double a = dateCorrelations.get( component );
if ( a != null && !Double.isNaN( a ) ) {
Double corr = a;
Double[] eigenGene = svdo.getvMatrix().getColObj( component );
/*
* Plot eigengene vs values, add correlation to the plot
*/
TimeSeries series = new TimeSeries( "Dates vs. eigen" + ( component + 1 ) );
int i = 0;
for ( Date d : dates ) {
series.addOrUpdate( new Hour( d ), eigenGene[i++] );
}
TimeSeriesCollection dataset = new TimeSeriesCollection();
dataset.addSeries( series );
JFreeChart chart = ChartFactory.createTimeSeriesChart(
"Dates: " + xaxisLabel + " " + String.format( "r=%.2f", corr ), null, xaxisLabel, dataset,
false, false, false );
XYPlot xyPlot = chart.getXYPlot();
chart.getTitle().setFont( new Font( "SansSerif", Font.BOLD, 12 ) );
// standard renderer makes lines.
XYDotRenderer renderer = new XYDotRenderer();
renderer.setBaseFillPaint( Color.white );
renderer.setDotHeight( 3 );
renderer.setDotWidth( 3 );
renderer.setSeriesShape( 0, new Ellipse2D.Double( 0, 0, 3, 3 ) ); // has no effect, need dotheight.
float saturationDrop = ( float ) Math.min( 1.0, component * 0.8f / MAX_COMP );
renderer.setSeriesPaint( 0, Color.getHSBColor( 0.0f, 1.0f - saturationDrop, 0.7f ) );
ValueAxis domainAxis = xyPlot.getDomainAxis();
domainAxis.setVerticalTickLabels( true );
xyPlot.setRenderer( renderer );
xyPlot.setRangeGridlinesVisible( false );
xyPlot.setDomainGridlinesVisible( false );
charts.get( -1L ).add( chart );
}
}
/*
* Plot in a grid, with each factor as a column. FIXME What if we have too many factors to fit on the screen?
*/
int rows = MAX_COMP;
int columns = ( int ) Math.ceil( charts.size() );
int perChartSize = DEFAULT_QC_IMAGE_SIZE_PX;
BufferedImage image = new BufferedImage( columns * perChartSize, rows * perChartSize,
BufferedImage.TYPE_INT_ARGB );
Graphics2D g2 = image.createGraphics();
int currentX = 0;
int currentY = 0;
for ( Long id : charts.keySet() ) {
for ( JFreeChart chart : charts.get( id ) ) {
addChartToGraphics( chart, g2, currentX, currentY, perChartSize, perChartSize );
if ( currentY + perChartSize < rows * perChartSize ) {
currentY += perChartSize;
} else {
currentY = 0;
currentX += perChartSize;
}
}
}
os.write( ChartUtilities.encodeAsPNG( image ) );
return true;
}
/**
* Visualization of the correlation of principal components with factors or the date samples were run.
*
* @param response
* @param ee
* @param svdo SVD value object
*/
private void writePCAFactors( OutputStream os, ExpressionExperiment ee, SVDValueObject svdo ) throws Exception {
Map<Integer, Map<Long, Double>> factorCorrelations = svdo.getFactorCorrelations();
// Map<Integer, Map<Long, Double>> factorPvalues = svdo.getFactorPvalues();
Map<Integer, Double> dateCorrelations = svdo.getDateCorrelations();
assert ee.getId().equals( svdo.getId() );
if ( factorCorrelations.isEmpty() && dateCorrelations.isEmpty() ) {
writePlaceholderImage( os );
return;
}
ee = expressionExperimentService.thawLite( ee ); // need the experimental design
int maxWidth = 10;
Map<Long, String> efs = getFactorNames( ee, maxWidth );
DefaultCategoryDataset series = new DefaultCategoryDataset();
/*
* With two groups, or a continuous factor, we get rank correlations
*/
int MAX_COMP = 3;
double STUB = 0.05; // always plot a little thing so we know its there.
for ( Integer component : factorCorrelations.keySet() ) {
if ( component >= MAX_COMP ) break;
for ( Long efId : factorCorrelations.get( component ).keySet() ) {
Double a = factorCorrelations.get( component ).get( efId );
String facname = efs.get( efId ) == null ? "?" : efs.get( efId );
if ( a != null && !Double.isNaN( a ) ) {
Double corr = Math.max( STUB, Math.abs( a ) );
series.addValue( corr, "PC" + ( component + 1 ), facname );
}
}
}
for ( Integer component : dateCorrelations.keySet() ) {
if ( component >= MAX_COMP ) break;
Double a = dateCorrelations.get( component );
if ( a != null && !Double.isNaN( a ) ) {
Double corr = Math.max( STUB, Math.abs( a ) );
series.addValue( corr, "PC" + ( component + 1 ), "Date run" );
}
}
ChartFactory.setChartTheme( StandardChartTheme.createLegacyTheme() );
JFreeChart chart = ChartFactory.createBarChart( "", "Factors", "Component assoc.", series,
PlotOrientation.VERTICAL, true, false, false );
chart.getCategoryPlot().getRangeAxis().setRange( 0, 1 );
BarRenderer renderer = ( BarRenderer ) chart.getCategoryPlot().getRenderer();
renderer.setBasePaint( Color.white );
renderer.setShadowVisible( false );
chart.getCategoryPlot().setRangeGridlinesVisible( false );
chart.getCategoryPlot().setDomainGridlinesVisible( false );
ChartUtilities.applyCurrentTheme( chart );
CategoryAxis domainAxis = chart.getCategoryPlot().getDomainAxis();
domainAxis.setCategoryLabelPositions( CategoryLabelPositions.UP_45 );
for ( int i = 0; i < MAX_COMP; i++ ) {
/*
* Hue is straightforward; brightness is set medium to make it muted; saturation we vary from high to low.
*/
float saturationDrop = ( float ) Math.min( 1.0, i * 0.8f / MAX_COMP );
renderer.setSeriesPaint( i, Color.getHSBColor( 0.0f, 1.0f - saturationDrop, 0.7f ) );
}
/*
* Give figure more room .. up to a limit
*/
int width = DEFAULT_QC_IMAGE_SIZE_PX;
if ( chart.getCategoryPlot().getCategories().size() > 3 ) {
width = width + 40 * ( chart.getCategoryPlot().getCategories().size() - 2 );
}
int MAX_QC_IMAGE_SIZE_PX = 500;
width = Math.min( width, MAX_QC_IMAGE_SIZE_PX );
ChartUtilities.writeChartAsPNG( os, chart, width, DEFAULT_QC_IMAGE_SIZE_PX );
}
/**
* @param response
* @param svdo
* @return
*/
private boolean writePCAScree( OutputStream os, SVDValueObject svdo ) throws Exception {
/*
* Make a scree plot.
*/
CategoryDataset series = getPCAScree( svdo );
if ( series.getColumnCount() == 0 ) {
return false;
}
int MAX_COMPONENTS_FOR_SCREE = 10;
ChartFactory.setChartTheme( StandardChartTheme.createLegacyTheme() );
JFreeChart chart = ChartFactory.createBarChart( "", "Component (up to" + MAX_COMPONENTS_FOR_SCREE + ")",
"Fraction of var.", series, PlotOrientation.VERTICAL, false, false, false );
BarRenderer renderer = ( BarRenderer ) chart.getCategoryPlot().getRenderer();
renderer.setBasePaint( Color.white );
renderer.setShadowVisible( false );
chart.getCategoryPlot().setRangeGridlinesVisible( false );
chart.getCategoryPlot().setDomainGridlinesVisible( false );
ChartUtilities.writeChartAsPNG( os, chart, DEFAULT_QC_IMAGE_SIZE_PX, DEFAULT_QC_IMAGE_SIZE_PX );
return true;
}
/**
* Write a blank image so user doesn't see the broken icon.
*
* @param os
* @throws IOException
*/
private void writePlaceholderImage( OutputStream os ) throws IOException {
int placeholderSize = ( int ) ( DEFAULT_QC_IMAGE_SIZE_PX * 0.75 );
BufferedImage buffer = new BufferedImage( placeholderSize, placeholderSize, BufferedImage.TYPE_INT_RGB );
Graphics g = buffer.createGraphics();
g.setColor( Color.lightGray );
g.fillRect( 0, 0, placeholderSize, placeholderSize );
g.setColor( Color.black );
g.drawString( "Not available", placeholderSize / 4, placeholderSize / 4 );
ImageIO.write( buffer, "png", os );
}
/**
* Write a blank thumbnail image so user doesn't see the broken icon.
*
* @param os
* @param placeholderSize
* @throws IOException
*/
private void writePlaceholderThumbnailImage( OutputStream os, int placeholderSize ) throws IOException {
// Make the image a bit bigger to account for the empty space around the generated image.
// If we can find a way to remove this empty space, we don't need to make the chart bigger.
BufferedImage buffer = new BufferedImage( placeholderSize + 16, placeholderSize + 9, BufferedImage.TYPE_INT_RGB );
Graphics g = buffer.createGraphics();
g.setColor( Color.white );
g.fillRect( 0, 0, placeholderSize + 16, placeholderSize + 9 );
g.setColor( Color.gray );
g.drawLine( 8, placeholderSize + 5, placeholderSize + 8, placeholderSize + 5 ); // x-axis
g.drawLine( 8, 5, 8, placeholderSize + 5 ); // y-axis
g.setColor( Color.black );
Font font = g.getFont();
g.setFont( new Font( font.getName(), font.getStyle(), 8 ) );
g.drawString( "N/A", 9, placeholderSize );
ImageIO.write( buffer, "png", os );
}
/**
* @param id of experiment
* @param size Multiplier on the cell size. 1 or null for standard small size.
* @param text if true, output a tabbed file instead of a png
* @param os response output stream
* @return ModelAndView object if text is true, otherwise null
* @throws Exception
*/
@RequestMapping("/expressionExperiment/visualizeMeanVariance.html")
public ModelAndView visualizeMeanVariance( Long id, Double size, Boolean text, OutputStream os ) throws Exception {
if ( id == null ) {
log.warn( "No id!" );
return null;
}
ExpressionExperiment ee = expressionExperimentService.load( id );
if ( ee == null ) {
log.warn( "Could not load experiment with id " + id );
return null;
}
MeanVarianceRelation mvr = meanVarianceService.find( ee );
if ( mvr == null ) {
return null;
}
if ( text != null && text && mvr != null ) {
final ByteArrayConverter bac = new ByteArrayConverter();
double[] means = bac.byteArrayToDoubles( mvr.getMeans() );
double[] variances = bac.byteArrayToDoubles( mvr.getVariances() );
DoubleMatrix2D matrix = new DenseDoubleMatrix2D( means.length, 2 );
matrix.viewColumn( 0 ).assign( means );
matrix.viewColumn( 1 ).assign( variances );
String matrixString = new Formatter( "%1.2G" ).toTitleString( matrix, null, new String[] { "mean",
"variance" }, null, null, null, null );
ModelAndView mav = new ModelAndView( new TextView() );
mav.addObject( TextView.TEXT_PARAM, matrixString );
return mav;
}
writeMeanVariance( os, mvr, size );
return null;
}
/**
* Overrides XYLineAndShapeRenderer such that lines are drawn on top of points.
*/
private class XYRegressionRenderer extends XYLineAndShapeRenderer {
private static final long serialVersionUID = 1L;
@Override
protected boolean isLinePass( int pass ) {
return pass == 1;
}
@Override
protected boolean isItemPass( int pass ) {
return pass == 0;
}
}
/**
* @param os response output stream
* @param mvr MeanVarianceRelation object to plot
* @param size
* @return true if mvr data points were plotted
*/
private boolean writeMeanVariance( OutputStream os, MeanVarianceRelation mvr, Double size ) throws Exception {
// if number of datapoints > THRESHOLD then alpha = TRANSLUCENT, else alpha = OPAQUE
final int THRESHOLD = 1000;
final int TRANSLUCENT = 50;
final int OPAQUE = 255;
// Set maximum plot range to Y_MAX - YSCALE * OFFSET to cut down on excess white space
final double OFFSET_FACTOR = 0.05f;
final double Y_SCALE = 10f;
// set the final image size to be the minimum of MAX_IMAGE_SIZE_PX or size
final int MAX_IMAGE_SIZE_PX = 5;
if ( mvr == null ) {
return false;
}
// get data points
XYSeriesCollection collection = getMeanVariance( mvr );
if ( collection.getSeries().size() == 0 ) {
return false;
}
ChartFactory.setChartTheme( StandardChartTheme.createLegacyTheme() );
JFreeChart chart = ChartFactory.createScatterPlot( "", "Mean", "Variance", collection,
PlotOrientation.VERTICAL, false, false, false );
// adjust colors and shapes
XYRegressionRenderer renderer = new XYRegressionRenderer();
renderer.setBasePaint( Color.white );
int alpha = collection.getSeries( 0 ).getItemCount() > THRESHOLD ? TRANSLUCENT : OPAQUE;
renderer.setSeriesPaint( 0, new Color( 0, 0, 0, alpha ) );
renderer.setSeriesPaint( 1, Color.red );
renderer.setSeriesStroke( 1, new BasicStroke( 4 ) );
renderer.setSeriesShape( 0, new Ellipse2D.Double( 4, 4, 4, 4 ) );
renderer.setSeriesShapesFilled( 0, false );
renderer.setSeriesLinesVisible( 0, false );
renderer.setSeriesLinesVisible( 1, true );
renderer.setSeriesShapesVisible( 1, false );
XYPlot plot = chart.getXYPlot();
plot.setRenderer( renderer );
plot.setRangeGridlinesVisible( false );
plot.setDomainGridlinesVisible( false );
// adjust the chart domain and ranges
double yRange = collection.getSeries( 0 ).getMaxY() - collection.getSeries( 0 ).getMinY();
double offset = ( yRange ) * OFFSET_FACTOR;
double newYMin = collection.getSeries( 0 ).getMinY() - offset;
double newYMax = collection.getSeries( 0 ).getMaxY() - Y_SCALE * offset; // cut off excess space at the top
double newXMin = collection.getSeries( 0 ).getMinX() - offset;
double newXMax = collection.getSeries( 0 ).getMaxX() + offset;
ValueAxis yAxis = new NumberAxis( "Variance" );
yAxis.setRange( newYMin, newYMax );
ValueAxis xAxis = new NumberAxis( "Mean" );
xAxis.setRange( newXMin, newXMax );
chart.getXYPlot().setRangeAxis( yAxis );
chart.getXYPlot().setDomainAxis( xAxis );
int finalSize = ( int ) Math
.min( MAX_IMAGE_SIZE_PX * DEFAULT_QC_IMAGE_SIZE_PX, size * DEFAULT_QC_IMAGE_SIZE_PX );
ChartUtilities.writeChartAsPNG( os, chart, finalSize, finalSize );
return true;
}
/**
* @param response
* @param ee
*/
private boolean writeProbeCorrHistImage( OutputStream os, ExpressionExperiment ee ) throws IOException {
XYSeries series = getCorrelHist( ee );
if ( series.getItemCount() == 0 ) {
return false;
}
ChartFactory.setChartTheme( StandardChartTheme.createLegacyTheme() );
XYSeriesCollection xySeriesCollection = new XYSeriesCollection();
xySeriesCollection.addSeries( series );
JFreeChart chart = ChartFactory.createXYLineChart( "", "Correlation", "Frequency", xySeriesCollection,
PlotOrientation.VERTICAL, false, false, false );
chart.getXYPlot().setRangeGridlinesVisible( false );
chart.getXYPlot().setDomainGridlinesVisible( false );
XYItemRenderer renderer = chart.getXYPlot().getRenderer();
renderer.setBasePaint( Color.white );
int size = ( int ) ( DEFAULT_QC_IMAGE_SIZE_PX * 0.8 );
ChartUtilities.writeChartAsPNG( os, chart, size, size );
return true;
}
/**
* Has to handle the situation where there might be more than one ResultSet.
*
* @param os
* @param ee
* @param analysisId
* @param rsId
* @throws IOException
*/
private boolean writePValueHistImage( OutputStream os, ExpressionExperiment ee, Long analysisId, Long rsId,
String factorName ) throws IOException {
XYSeries series = getDiffExPvalueHistXYSeries( ee, analysisId, rsId, factorName );
if ( series == null ) {
return false;
}
XYSeriesCollection xySeriesCollection = new XYSeriesCollection( series );
ChartFactory.setChartTheme( StandardChartTheme.createLegacyTheme() );
JFreeChart chart = ChartFactory.createXYLineChart( "", "P-value", "Frequency", xySeriesCollection,
PlotOrientation.VERTICAL, false, false, false );
chart.getXYPlot().setRangeGridlinesVisible( false );
chart.getXYPlot().setDomainGridlinesVisible( false );
XYItemRenderer renderer = chart.getXYPlot().getRenderer();
renderer.setBasePaint( Color.white );
ChartUtilities
.writeChartAsPNG( os, chart, ( int ) ( DEFAULT_QC_IMAGE_SIZE_PX * 1.4 ), DEFAULT_QC_IMAGE_SIZE_PX );
return true;
}
/**
* Write p-value histogram thumbnail image.
*
* @param os
* @param ee
* @param analysisId
* @param rsId
* @param size
* @throws IOException
*/
private boolean writePValueHistThumbnailImage( OutputStream os, ExpressionExperiment ee, Long analysisId,
Long rsId, String factorName, int size ) throws IOException {
XYSeries series = getDiffExPvalueHistXYSeries( ee, analysisId, rsId, factorName );
if ( series == null ) {
return false;
}
series.add( -0.01, 0.0 );
XYSeriesCollection xySeriesCollection = new XYSeriesCollection( series );
ChartFactory.setChartTheme( StandardChartTheme.createLegacyTheme() );
JFreeChart chart = ChartFactory.createXYLineChart( "", "", "", xySeriesCollection, PlotOrientation.VERTICAL,
false, false, false );
chart.getXYPlot().setBackgroundPaint( new Color( 230, 230, 230 ) );
chart.getXYPlot().setRangeGridlinesVisible( false );
chart.getXYPlot().setDomainGridlinesVisible( false );
chart.getXYPlot().setOutlineVisible( false ); // around the plot
chart.getXYPlot().getRangeAxis().setTickMarksVisible( false );
chart.getXYPlot().getRangeAxis().setTickLabelsVisible( false );
chart.getXYPlot().getRangeAxis().setAxisLineVisible( false );
chart.getXYPlot().getDomainAxis().setTickMarksVisible( false );
chart.getXYPlot().getDomainAxis().setTickLabelsVisible( false );
chart.getXYPlot().getDomainAxis().setAxisLineVisible( false );
chart.getXYPlot().getRenderer().setSeriesPaint( 0, Color.RED );
// chart.getXYPlot().getRenderer().setSeriesStroke( 0, new BasicStroke( 1 ) );
// Make the chart a bit bigger to account for the empty space around the generated image.
// If we can find a way to remove this empty space, we don't need to make the chart bigger.
ChartUtilities.writeChartAsPNG( os, chart, size + 16, size + 9 );
return true;
}
}
| Added which log transformation is used in the mean-variance figure legend.
| gemma-web/src/main/java/ubic/gemma/web/controller/expression/experiment/ExpressionExperimentQCController.java | Added which log transformation is used in the mean-variance figure legend. | <ide><path>emma-web/src/main/java/ubic/gemma/web/controller/expression/experiment/ExpressionExperimentQCController.java
<ide> }
<ide>
<ide> ChartFactory.setChartTheme( StandardChartTheme.createLegacyTheme() );
<del> JFreeChart chart = ChartFactory.createScatterPlot( "", "Mean", "Variance", collection,
<add> JFreeChart chart = ChartFactory.createScatterPlot( "", "log2(mean)", "log2(variance)", collection,
<ide> PlotOrientation.VERTICAL, false, false, false );
<ide>
<ide> // adjust colors and shapes |
|
JavaScript | mit | a13dbee750041c97b8b8621a22fd630cd57a3731 | 0 | RAN3D/foglet-core,RAN3D/foglet-core | /*
MIT License
Copyright (c) 2016 Grall Arnaud
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 strict';
const EventEmitter = require('events');
const uuid = require('uuid/v4');
const lmerge = require('lodash.merge');
// const debug = require('debug')('foglet-core:main');
// NetworkManager
const NetworkManager = require('./network/network-manager.js');
// SSH Control
const SSH = require('./utils/ssh.js');
// Foglet default options
const DEFAULT_OPTIONS = {
verbose: true, // want some logs ? switch to false otherwise
rps: {
type: 'spray-wrtc',
options: {
protocol: 'foglet-example-rps', // foglet running on the protocol foglet-example, defined for spray-wrtc
webrtc: { // add WebRTC options
trickle: true, // enable trickle (divide offers in multiple small offers sent by pieces)
iceServers : [] // define iceServers in non local instance
},
timeout: 2 * 60 * 1000, // spray-wrtc timeout before definitively close a WebRTC connection.
delta: 10 * 1000, // spray-wrtc shuffle interval
signaling: {
address: 'https://signaling.herokuapp.com/',
// signalingAdress: 'https://signaling.herokuapp.com/', // address of the signaling server
room: 'best-room-for-foglet-rps' // room to join
}
}
},
overlay: { // overlay options
options: { // these options will be propagated to all components, but overrided if same options are listed in the list of overlays
webrtc: { // add WebRTC options
trickle: true, // enable trickle (divide offers in multiple small offers sent by pieces)
iceServers : [] // define iceServers in non local instance
},
timeout: 2 * 60 * 1000, // spray-wrtc timeout before definitively close a WebRTC connection.
delta: 10 * 1000 // spray-wrtc shuffle interval
}, // options wiil be passed to all components of the overlay
overlays: [
// {
// class: 'latencies',
// options: {
// protocol: 'foglet-example-overlay-latencies', // foglet running on the protocol foglet-example, defined for spray-wrtc
// signaling: {
// address: 'https://signaling.herokuapp.com/',
// // signalingAdress: 'https://signaling.herokuapp.com/', // address of the signaling server
// room: 'best-room-for-foglet-overlay' // room to join
// }
// }
// }
] // add an latencies overlay
},
ssh: undefined /* {
address: 'http://localhost:4000/'
}*/
};
/**
* A configuration object used to build an overlay
* @typedef {Object} OverlayConfig
* @property {string} class - Name of the overlay
* @property {Object} options - Dedicated options used to build the overlay
* @property {string} options.protocol - Name of the protocol run by the overlay
* @property {Object} options.protocolsignaling - Options used to configure the interactions with the signaling server
* @property {string} options.protocol.signaling.address - URL of the signaling server
* @property {string} options.protocol.signaling.room - Name of the room in which the application run
*/
/**
* A callback invoked when a message is received (either by unicast or broadcast)
* @callback MessageCallback
* @param {string} id - The ID of the peer who send the message
* @param {object} message - The message received
*/
/**
* Foglet is the main class used to build fog computing applications.
*
* It serves as a High level API over a Random Peer Sampling (RPS) network, typically Spray ({@link https://github.com/RAN3D/spray-wrtc}).
* It provides utilities to send to other peers in the network, and to receives messages send to him by these same peers.
* Messages can be send to a single neighbour, in a **unicast** way, or to all peers in the network, in a **broadcast** way.
* @example
* 'use strict';
* const Foglet = require('foglet');
*
* // let's create a simple application that send message in broadcast
* const foglet = new Foglet({
* rps: {
* type: 'spray-wrtc', // we choose Spray as a our RPS
* options: {
* protocol: 'my-awesome-broadcast-application', // the name of the protocol run by our app
* webrtc: { // some WebRTC options
* trickle: true, // enable trickle
* iceServers : [] // define iceServers here if you want to run this code outside localhost
* },
* signaling: { // configure the signaling server
* address: 'http://signaling.herokuapp.com', // put the URL of the signaling server here
* room: 'my-awesome-broadcast-application' // the name of the room for the peers of our application
* }
* }
* }
* });
*
* // connect the foglet to the signaling server
* foglet.share();
*
* // Connect the foglet to our network
* foglet.connection().then(() => {
* // listen for broadcast messages
* foglet.onBroadcast((id, message) => {
* console.log('The peer', id, 'just sent me by broadcast:', message);
* });
*
* // send a message in broadcast
* foglet.sendBroadcast('Hello World !');
* });
* @author Grall Arnaud (folkvir)
*/
class Foglet extends EventEmitter {
/**
* Constructor of Foglet
* @constructs Foglet
* @param {Object} options - Options used to build the Foglet
* @param {boolean} options.verbose - If True, activate logging
* @param {Object} options.rps - Options used to configure the Random Peer Sampling (RPS) network
* @param {string} options.rps.type - The type of RPS (`spray-wrtc` for Spray or `fcn-wrtc` for a fully connected network over WebRTC)
* @param {Object} options.rps.options - Options by the type of RPS choosed
* @param {string} options.rps.options.protocol - Name of the protocol run by the application
* @param {Object} options.rps.options.webrtc - WebRTC dedicated options (see WebRTC docs for more details)
* @param {number} options.rps.options.timeout - RPS timeout before definitively close a WebRTC connection
* @param {number} options.rps.options.delta - RPS shuffle interval
* @param {Object} options.rps.options.signaling - Options used to configure the interactions with the signaling server
* @param {string} options.rps.options.signaling.address - URL of the signaling server
* @param {string} options.rps.options.signaling.room - Name of the room in which the application run
* @param {Object} options.overlay - Options used to configure custom overlay in addition of the RPS
* @param {Object} options.overlay.options - Options propagated to all overlays, same as the options field used to configure the RPS.
* @param {OverlayConfig[]} options.overlay.overlays - Set of config objects used to build the overlays
* @throws {InitConstructException} thrown when options are not provided
* @throws {ConstructException} thrown when key options are missing
* @returns {void}
*/
constructor (options = {}) {
super();
this._id = uuid();
this._options = lmerge(DEFAULT_OPTIONS, options);
this._networkManager = new NetworkManager(this._options);
// SSH Control
// currently disabled
if (this._options.ssh && this._options.ssh.address) {
this._ssh = new SSH({
foglet: this,
address: this._options.ssh.address
});
}
}
/**
* Get the foglet ID.
*
* **WARNING:** this id is not the same as used by the RPS.
* @return {string} The foglet ID
*/
get id () {
return this._id;
}
/**
* Get the in-view ID of this foglet
* @return {string} The in-view ID of the foglet
*/
get inViewID () {
return this.getNetwork().network.inviewId;
}
/**
* Get the out-view ID of this foglet
* @return {string} The out-view ID of the foglet
*/
get outViewID () {
return this.getNetwork().network.outviewId;
}
/**
* Connect the Foglet to the network.
* If a parameter is supplied, the foglet try to connect with another foglet.
*
* Otherwise, it uses the signaling server to perform the connection.
* In this case, one must call {@link Foglet#share} before, to connect the foglet to the signaling server first.
*
* By default, connect the foglet to the base RPS. Use the `index` parameter to select which network (rps or overlay) to connect with.
* The RPS is always the first network, at `index = 0`.
* Then, overlays are indexed by the order in which they were declared in the options, strating from `index = 1`
* for the first overlay.
* @param {Foglet} [foglet=null] - (optional) Foglet to connect with. Leav to `null` rely on the signaling server.
* @param {integer} [index=0] - (optional) Index of the network to connect. Default to the RPS.
* @param {number} [timeout=6000] - (optional) Connection timeout. Default to 6.0s
* @return {Promise} A Promise fullfilled when the foglet is connected
* @example
* const foglet = new Foglet({
* // some options...
* });
* foglet.share();
* foglet.connection().then(console.log).catch(console.err);
*/
connection (foglet = null, index = 0, timeout = 60000) {
if(foglet !== null)
// console.log('dest: ', foglet._defaultOverlay().rps, 'src: ', this._defaultOverlay().rps);
return this.getNetwork(index).signaling.connection(foglet.getNetwork().network.rps, timeout);
return this.getNetwork(index).signaling.connection(foglet, timeout);
}
/**
* Connect the foglet to the signaling server.
*
* By default, connect the RPS to the signaling server. Use the `index` parameter to select which network (rps or overlay) to connect.
* he RPS is always the first network, at `index = 0`.
* Then, overlays are indexed by the order in which they were declared in the options, strating from `index = 1`
* for the first overlay.
* @param {integer} [index=0] - (optional) Index of the network to connect to the signaling server. Default to the RPS.
* @return {void}
*/
share (index = 0) {
this.getNetwork(index).signaling.signaling();
}
/**
* Revoke the connection with the signaling server.
*
* By default, disconnect the RPS from the signaling server. Use the `index` parameter to select which network (rps or overlay) to connect.
* he RPS is always the first network, at `index = 0`.
* Then, overlays are indexed by the order in which they were declared in the options, strating from `index = 1`
* for the first overlay.
* @param {integer} [index=0] - (optional) Index of the network to disconnect from the signaling server. Default to the RPS.
* @return {void}
*/
unshare (index = 0) {
this.getNetwork(index).signaling.unsignaling();
}
/**
* Select and get an overlay to use for communication using its index.
* The RPS is always the first network, at `index = 0`.
* Then, overlays are indexed by the order in which they were declared in the options, strating from `index = 1`
* for the first overlay.
* @param {integer} [index=0] - (optional) Index of the network to get. Default to the RPS.
* @return {Network} Return the network for the given ID.
* @example
* const foglet = new Foglet({
* // some options...
* });
*
* // Get the RPS
* const rps = foglet.getNetwork();
*
* // Get the third overlay
* const thirdOverlay = foglet.getNetwork(3);
*/
getNetwork (index = 0) {
return this._networkManager.use(index);
}
/**
* Register a middleware, with an optional priority
* @param {Object} middleware - The middleware to register
* @param {function} middleware.in - Function applied on middleware input
* @param {function} middleware.out - Function applied on middleware output
* @param {Number} [priority=0] - (optional) The middleware priority
* @return {void}
* @example
* const foglet = new Foglet({
* // some options...
* });
*
* const middleware = {
* in: msg => {
* return msg + ' and Thanks';
* },
* out: msg => {
* return msg + ' for all the Fish';
* }
* };
*
* foglet.use(middleware);
*/
use (middleware, priority = 0) {
this._networkManager.registerMiddleware(middleware, priority);
}
/**
* Listen for incoming **broadcast** messages, and invoke a callback on each of them.
* @param {MessageCallback} callback - Callback function inovked with the message
* @returns {void}
* @example
* const foglet = new Foglet({
* // some options...
* });
*
* foglet.onBroadcast((id, msg) => {
* console.log('The peer', id, 'just sent by broadcast:', msg);
* });
**/
onBroadcast (callback) {
this.getNetwork().communication.onBroadcast(callback);
}
/**
* Listen on incoming unicasted streams
* @param {MessageCallback} callback - Callback invoked with a {@link StreamMessage} as message
* @return {void}
* @example
* const foglet = getSomeFoglet();
*
* foglet.onStreamBroadcast((id, stream) => {
* console.log('a peer with id = ', id, ' is streaming data to me');
* stream.on('data', data => console.log(data));
* stream.on('end', () => console.log('no more data available from the stream'));
* });
*/
onStreamBroadcast (callback) {
this.getNetwork().communication.onStreamBroadcast(callback);
}
/**
* Send a broadcast message to all connected peers in the network.
* @param {object} message - The message to send
* @return {boolean} True if the messahe has been sent, False otherwise
* @example
* const foglet = new Foglet({
* // some options...
* });
*
* foglet.sendBroadcast('Hello everyone!');
*/
sendBroadcast (message) {
return this.getNetwork().communication.sendBroadcast(message);
}
/**
* Begin the streaming of a message to all peers (using broadcast)
* @param {VersionVector} [isReady=undefined] - Id of the message to wait before this message is received
* @return {StreamRequest} Stream used to transmit data to all peers
* @example
* const foglet = getSomeFoglet();
*
* const stream = foglet.sendBroadcast();
* stream.write('Hello');
* stream.write(' world!');
* stream.end();
*/
streamBroadcast (isReady = undefined) {
return this.getNetwork().communication.streamBroadcast(isReady);
}
/**
* Listen for incoming **unicast** messages, and invoke a callback on each of them.
* @param {MessageCallback} callback - Callback function inovked with the message
* @return {void}
* @example
* const foglet = new Foglet({
* // some options...
* });
*
* foglet.onUnicast((id, msg) => {
* console.log('My neighbour', id, 'just sent me by unicast:', msg);
* });
**/
onUnicast (callback) {
this.getNetwork().communication.onUnicast(callback);
}
/**
* Listen on incoming unicasted streams
* @param {MessageCallback} callback - Callback invoked with a {@link StreamMessage} as message
* @return {void}
* @example
* const foglet = getSomeFoglet();
*
* foglet.onStreamUnicast((id, stream) => {
* console.log('a peer with id = ', id, ' is streaming data to me');
* stream.on('data', data => console.log(data));
* stream.on('end', () => console.log('no more data available from the stream'));
* });
*/
onStreamUnicast (callback) {
this.getNetwork().communication.onStreamUnicast(callback);
}
/**
* Send a message to a specific neighbour (in a **unicast** way).
* @param {string} id - The ID of the targeted neighbour
* @param {object} message - The message to send
* @return {boolean} True if the messahe has been sent, False otherwise
* @example
* const foglet = new Foglet({
* // some options...
* });
*
* // get the ID of one neighbour
* const id = foglet.getRandomNeighbourId();
*
* foglet.sendUnicast(id, 'Hi diddly ho neighborino!');
*/
sendUnicast (id, message) {
return this.getNetwork().communication.sendUnicast(id, message);
}
/**
* Begin the streaming of a message to another peer (using unicast)
* @param {string} id - Id of the peer
* @return {StreamRequest} Stream used to transmit data to another peer
* @example
* const foglet = getSomeFoglet();
* const peerID = getSomePeerID();
*
* const stream = foglet.streamUnicast(peerID);
* stream.write('Hello');
* stream.write(' world!');
* stream.end();
*/
streamUnicast (id) {
return this.getNetwork().communication.streamUnicast(id);
}
/**
* Send a message to a set of neighbours (in a **multicast** way).
* These messages will be received by neighbours on the **unicast** channel.
* @param {string[]} ids - The IDs of the targeted neighbours
* @param {object} message - The message to send
* @return {boolean} True if the messahe has been sent, False otherwise
* @example
* const foglet = new Foglet({
* // some options...
* });
*
* // get IDs of some neighbours
* const ids = foglet.getNeighbours(5);
*
* foglet.sendMulticast(ids, 'Everyone, get in here!');
*/
sendMulticast (ids = [], message) {
return this.getNetwork().communication.sendMulticast(ids, message);
}
/**
* Get the ID of a random neighbour
* @return {string|null} The ID of a random neighbour, or `null` if not found
*/
getRandomNeighbourId () {
const peers = this.getNetwork().network.getNeighbours();
if(peers.length === 0) {
return null;
} else {
try {
const random = Math.floor(Math.random() * peers.length);
const result = peers[random];
return result;
} catch (e) {
console.err(e);
return null;
}
}
}
/**
* Get the IDs of all available neighbours
* @param {integer} limit - Max number of neighours to get
* @return {string[]} Set of IDs for all available neighbours
* @example
* const foglet = new Foglet({
* // some options...
* });
*
* // print the IDs of up to five neighbours
* console.log(foglet.getNeighbours(5));
*
* // print the IDs of all neighbours
* console.log(foglet.getNeighbours());
*/
getNeighbours (limit = undefined) {
return this.getNetwork().network.getNeighbours(limit);
}
}
module.exports = Foglet;
| src/foglet.js | /*
MIT License
Copyright (c) 2016 Grall Arnaud
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 strict';
const EventEmitter = require('events');
const uuid = require('uuid/v4');
const lmerge = require('lodash.merge');
// const debug = require('debug')('foglet-core:main');
// NetworkManager
const NetworkManager = require('./network/network-manager.js');
// SSH Control
const SSH = require('./utils/ssh.js');
// Foglet default options
const DEFAULT_OPTIONS = {
verbose: true, // want some logs ? switch to false otherwise
rps: {
type: 'spray-wrtc',
options: {
protocol: 'foglet-example-rps', // foglet running on the protocol foglet-example, defined for spray-wrtc
webrtc: { // add WebRTC options
trickle: true, // enable trickle (divide offers in multiple small offers sent by pieces)
iceServers : [] // define iceServers in non local instance
},
timeout: 2 * 60 * 1000, // spray-wrtc timeout before definitively close a WebRTC connection.
delta: 10 * 1000, // spray-wrtc shuffle interval
signaling: {
address: 'https://signaling.herokuapp.com/',
// signalingAdress: 'https://signaling.herokuapp.com/', // address of the signaling server
room: 'best-room-for-foglet-rps' // room to join
}
}
},
overlay: { // overlay options
options: { // these options will be propagated to all components, but overrided if same options are listed in the list of overlays
webrtc: { // add WebRTC options
trickle: true, // enable trickle (divide offers in multiple small offers sent by pieces)
iceServers : [] // define iceServers in non local instance
},
timeout: 2 * 60 * 1000, // spray-wrtc timeout before definitively close a WebRTC connection.
delta: 10 * 1000 // spray-wrtc shuffle interval
}, // options wiil be passed to all components of the overlay
overlays: [
// {
// class: 'latencies',
// options: {
// protocol: 'foglet-example-overlay-latencies', // foglet running on the protocol foglet-example, defined for spray-wrtc
// signaling: {
// address: 'https://signaling.herokuapp.com/',
// // signalingAdress: 'https://signaling.herokuapp.com/', // address of the signaling server
// room: 'best-room-for-foglet-overlay' // room to join
// }
// }
// }
] // add an latencies overlay
},
ssh: undefined /* {
address: 'http://localhost:4000/'
}*/
};
/**
* A configuration object used to build an overlay
* @typedef {Object} OverlayConfig
* @property {string} class - Name of the overlay
* @property {Object} options - Dedicated options used to build the overlay
* @property {string} options.protocol - Name of the protocol run by the overlay
* @property {Object} options.protocolsignaling - Options used to configure the interactions with the signaling server
* @property {string} options.protocol.signaling.address - URL of the signaling server
* @property {string} options.protocol.signaling.room - Name of the room in which the application run
*/
/**
* A callback invoked when a message is received (either by unicast or broadcast)
* @callback MessageCallback
* @param {string} id - The ID of the peer who send the message
* @param {object} message - The message received
*/
/**
* Foglet is the main class used to build fog computing applications.
*
* It serves as a High level API over a Random Peer Sampling (RPS) network, typically Spray ({@link https://github.com/RAN3D/spray-wrtc}).
* It provides utilities to send to other peers in the network, and to receives messages send to him by these same peers.
* Messages can be send to a single neighbour, in a **unicast** way, or to all peers in the network, in a **broadcast** way.
* @example
* 'use strict';
* const Foglet = require('foglet');
*
* // let's create a simple application that send message in broadcast
* const foglet = new Foglet({
* rps: {
* type: 'spray-wrtc', // we choose Spray as a our RPS
* options: {
* protocol: 'my-awesome-broadcast-application', // the name of the protocol run by our app
* webrtc: { // some WebRTC options
* trickle: true, // enable trickle
* iceServers : [] // define iceServers here if you want to run this code outside localhost
* },
* signaling: { // configure the signaling server
* address: 'http://signaling.herokuapp.com', // put the URL of the signaling server here
* room: 'my-awesome-broadcast-application' // the name of the room for the peers of our application
* }
* }
* }
* });
*
* // connect the foglet to the signaling server
* foglet.share();
*
* // Connect the foglet to our network
* foglet.connection().then(() => {
* // listen for broadcast messages
* foglet.onBroadcast((id, message) => {
* console.log('The peer', id, 'just sent me by broadcast:', message);
* });
*
* // send a message in broadcast
* foglet.sendBroadcast('Hello World !');
* });
* @author Grall Arnaud (folkvir)
*/
class Foglet extends EventEmitter {
/**
* Constructor of Foglet
* @constructs Foglet
* @param {Object} options - Options used to build the Foglet
* @param {boolean} options.verbose - If True, activate logging
* @param {Object} options.rps - Options used to configure the Random Peer Sampling (RPS) network
* @param {string} options.rps.type - The type of RPS (`spray-wrtc` for Spray or `fcn-wrtc` for a fully connected network over WebRTC)
* @param {Object} options.rps.options - Options by the type of RPS choosed
* @param {string} options.rps.options.protocol - Name of the protocol run by the application
* @param {Object} options.rps.options.webrtc - WebRTC dedicated options (see WebRTC docs for more details)
* @param {number} options.rps.options.timeout - RPS timeout before definitively close a WebRTC connection
* @param {number} options.rps.options.delta - RPS shuffle interval
* @param {Object} options.rps.options.signaling - Options used to configure the interactions with the signaling server
* @param {string} options.rps.options.signaling.address - URL of the signaling server
* @param {string} options.rps.options.signaling.room - Name of the room in which the application run
* @param {Object} options.overlay - Options used to configure custom overlay in addition of the RPS
* @param {Object} options.overlay.options - Options propagated to all overlays, same as the options field used to configure the RPS.
* @param {OverlayConfig[]} options.overlay.overlays - Set of config objects used to build the overlays
* @throws {InitConstructException} thrown when options are not provided
* @throws {ConstructException} thrown when key options are missing
* @returns {void}
*/
constructor (options = {}) {
super();
this._id = uuid();
this._options = lmerge(DEFAULT_OPTIONS, options);
this._networkManager = new NetworkManager(this._options);
// SSH Control
// currently disabled
if (this._options.ssh && this._options.ssh.address) {
this._ssh = new SSH({
foglet: this,
address: this._options.ssh.address
});
this._ssh.on('logs', (message, data) => this._log(data));
}
}
/**
* Get the foglet ID.
*
* **WARNING:** this id is not the same as used by the RPS.
* @return {string} The foglet ID
*/
get id () {
return this._id;
}
/**
* Get the in-view ID of this foglet
* @return {string} The in-view ID of the foglet
*/
get inViewID () {
return this.getNetwork().network.inviewId;
}
/**
* Get the out-view ID of this foglet
* @return {string} The out-view ID of the foglet
*/
get outViewID () {
return this.getNetwork().network.outviewId;
}
/**
* Connect the Foglet to the network.
* If a parameter is supplied, the foglet try to connect with another foglet.
*
* Otherwise, it uses the signaling server to perform the connection.
* In this case, one must call {@link Foglet#share} before, to connect the foglet to the signaling server first.
*
* By default, connect the foglet to the base RPS. Use the `index` parameter to select which network (rps or overlay) to connect with.
* The RPS is always the first network, at `index = 0`.
* Then, overlays are indexed by the order in which they were declared in the options, strating from `index = 1`
* for the first overlay.
* @param {Foglet} [foglet=null] - (optional) Foglet to connect with. Leav to `null` rely on the signaling server.
* @param {integer} [index=0] - (optional) Index of the network to connect. Default to the RPS.
* @param {number} [timeout=6000] - (optional) Connection timeout. Default to 6.0s
* @return {Promise} A Promise fullfilled when the foglet is connected
* @example
* const foglet = new Foglet({
* // some options...
* });
* foglet.share();
* foglet.connection().then(console.log).catch(console.err);
*/
connection (foglet = null, index = 0, timeout = 60000) {
if(foglet !== null)
// console.log('dest: ', foglet._defaultOverlay().rps, 'src: ', this._defaultOverlay().rps);
return this.getNetwork(index).signaling.connection(foglet.getNetwork().network.rps, timeout);
return this.getNetwork(index).signaling.connection(foglet, timeout);
}
/**
* Connect the foglet to the signaling server.
*
* By default, connect the RPS to the signaling server. Use the `index` parameter to select which network (rps or overlay) to connect.
* he RPS is always the first network, at `index = 0`.
* Then, overlays are indexed by the order in which they were declared in the options, strating from `index = 1`
* for the first overlay.
* @param {integer} [index=0] - (optional) Index of the network to connect to the signaling server. Default to the RPS.
* @return {void}
*/
share (index = 0) {
this.getNetwork(index).signaling.signaling();
}
/**
* Revoke the connection with the signaling server.
*
* By default, disconnect the RPS from the signaling server. Use the `index` parameter to select which network (rps or overlay) to connect.
* he RPS is always the first network, at `index = 0`.
* Then, overlays are indexed by the order in which they were declared in the options, strating from `index = 1`
* for the first overlay.
* @param {integer} [index=0] - (optional) Index of the network to disconnect from the signaling server. Default to the RPS.
* @return {void}
*/
unshare (index = 0) {
this.getNetwork(index).signaling.unsignaling();
}
/**
* Select and get an overlay to use for communication using its index.
* The RPS is always the first network, at `index = 0`.
* Then, overlays are indexed by the order in which they were declared in the options, strating from `index = 1`
* for the first overlay.
* @param {integer} [index=0] - (optional) Index of the network to get. Default to the RPS.
* @return {Network} Return the network for the given ID.
* @example
* const foglet = new Foglet({
* // some options...
* });
*
* // Get the RPS
* const rps = foglet.getNetwork();
*
* // Get the third overlay
* const thirdOverlay = foglet.getNetwork(3);
*/
getNetwork (index = 0) {
return this._networkManager.use(index);
}
/**
* Register a middleware, with an optional priority
* @param {Object} middleware - The middleware to register
* @param {function} middleware.in - Function applied on middleware input
* @param {function} middleware.out - Function applied on middleware output
* @param {Number} [priority=0] - (optional) The middleware priority
* @return {void}
* @example
* const foglet = new Foglet({
* // some options...
* });
*
* const middleware = {
* in: msg => {
* return msg + ' and Thanks';
* },
* out: msg => {
* return msg + ' for all the Fish';
* }
* };
*
* foglet.use(middleware);
*/
use (middleware, priority = 0) {
this._networkManager.registerMiddleware(middleware, priority);
}
/**
* Listen for incoming **broadcast** messages, and invoke a callback on each of them.
* @param {MessageCallback} callback - Callback function inovked with the message
* @returns {void}
* @example
* const foglet = new Foglet({
* // some options...
* });
*
* foglet.onBroadcast((id, msg) => {
* console.log('The peer', id, 'just sent by broadcast:', msg);
* });
**/
onBroadcast (callback) {
this.getNetwork().communication.onBroadcast(callback);
}
/**
* Listen on incoming unicasted streams
* @param {MessageCallback} callback - Callback invoked with a {@link StreamMessage} as message
* @return {void}
* @example
* const foglet = getSomeFoglet();
*
* foglet.onStreamBroadcast((id, stream) => {
* console.log('a peer with id = ', id, ' is streaming data to me');
* stream.on('data', data => console.log(data));
* stream.on('end', () => console.log('no more data available from the stream'));
* });
*/
onStreamBroadcast (callback) {
this.getNetwork().communication.onStreamBroadcast(callback);
}
/**
* Send a broadcast message to all connected peers in the network.
* @param {object} message - The message to send
* @return {boolean} True if the messahe has been sent, False otherwise
* @example
* const foglet = new Foglet({
* // some options...
* });
*
* foglet.sendBroadcast('Hello everyone!');
*/
sendBroadcast (message) {
return this.getNetwork().communication.sendBroadcast(message);
}
/**
* Begin the streaming of a message to all peers (using broadcast)
* @param {VersionVector} [isReady=undefined] - Id of the message to wait before this message is received
* @return {StreamRequest} Stream used to transmit data to all peers
* @example
* const foglet = getSomeFoglet();
*
* const stream = foglet.sendBroadcast();
* stream.write('Hello');
* stream.write(' world!');
* stream.end();
*/
streamBroadcast (isReady = undefined) {
return this.getNetwork().communication.streamBroadcast(isReady);
}
/**
* Listen for incoming **unicast** messages, and invoke a callback on each of them.
* @param {MessageCallback} callback - Callback function inovked with the message
* @return {void}
* @example
* const foglet = new Foglet({
* // some options...
* });
*
* foglet.onUnicast((id, msg) => {
* console.log('My neighbour', id, 'just sent me by unicast:', msg);
* });
**/
onUnicast (callback) {
this.getNetwork().communication.onUnicast(callback);
}
/**
* Listen on incoming unicasted streams
* @param {MessageCallback} callback - Callback invoked with a {@link StreamMessage} as message
* @return {void}
* @example
* const foglet = getSomeFoglet();
*
* foglet.onStreamUnicast((id, stream) => {
* console.log('a peer with id = ', id, ' is streaming data to me');
* stream.on('data', data => console.log(data));
* stream.on('end', () => console.log('no more data available from the stream'));
* });
*/
onStreamUnicast (callback) {
this.getNetwork().communication.onStreamUnicast(callback);
}
/**
* Send a message to a specific neighbour (in a **unicast** way).
* @param {string} id - The ID of the targeted neighbour
* @param {object} message - The message to send
* @return {boolean} True if the messahe has been sent, False otherwise
* @example
* const foglet = new Foglet({
* // some options...
* });
*
* // get the ID of one neighbour
* const id = foglet.getRandomNeighbourId();
*
* foglet.sendUnicast(id, 'Hi diddly ho neighborino!');
*/
sendUnicast (id, message) {
return this.getNetwork().communication.sendUnicast(id, message);
}
/**
* Begin the streaming of a message to another peer (using unicast)
* @param {string} id - Id of the peer
* @return {StreamRequest} Stream used to transmit data to another peer
* @example
* const foglet = getSomeFoglet();
* const peerID = getSomePeerID();
*
* const stream = foglet.streamUnicast(peerID);
* stream.write('Hello');
* stream.write(' world!');
* stream.end();
*/
streamUnicast (id) {
return this.getNetwork().communication.streamUnicast(id);
}
/**
* Send a message to a set of neighbours (in a **multicast** way).
* These messages will be received by neighbours on the **unicast** channel.
* @param {string[]} ids - The IDs of the targeted neighbours
* @param {object} message - The message to send
* @return {boolean} True if the messahe has been sent, False otherwise
* @example
* const foglet = new Foglet({
* // some options...
* });
*
* // get IDs of some neighbours
* const ids = foglet.getNeighbours(5);
*
* foglet.sendMulticast(ids, 'Everyone, get in here!');
*/
sendMulticast (ids = [], message) {
return this.getNetwork().communication.sendMulticast(ids, message);
}
/**
* Get the ID of a random neighbour
* @return {string|null} The ID of a random neighbour, or `null` if not found
*/
getRandomNeighbourId () {
const peers = this.getNetwork().network.getNeighbours();
if(peers.length === 0) {
return null;
} else {
try {
const random = Math.floor(Math.random() * peers.length);
const result = peers[random];
return result;
} catch (e) {
console.err(e);
return null;
}
}
}
/**
* Get the IDs of all available neighbours
* @param {integer} limit - Max number of neighours to get
* @return {string[]} Set of IDs for all available neighbours
* @example
* const foglet = new Foglet({
* // some options...
* });
*
* // print the IDs of up to five neighbours
* console.log(foglet.getNeighbours(5));
*
* // print the IDs of all neighbours
* console.log(foglet.getNeighbours());
*/
getNeighbours (limit = undefined) {
return this.getNetwork().network.getNeighbours(limit);
}
}
module.exports = Foglet;
| bug fix #14
| src/foglet.js | bug fix #14 | <ide><path>rc/foglet.js
<ide> foglet: this,
<ide> address: this._options.ssh.address
<ide> });
<del> this._ssh.on('logs', (message, data) => this._log(data));
<ide> }
<ide>
<ide> } |
|
Java | apache-2.0 | d5f8adc9f9cca9eb411f8bb8696fdbf137348065 | 0 | wso2/carbon-apimgt,ruks/carbon-apimgt,prasa7/carbon-apimgt,isharac/carbon-apimgt,sanjeewa-malalgoda/carbon-apimgt,chamindias/carbon-apimgt,tharikaGitHub/carbon-apimgt,harsha89/carbon-apimgt,prasa7/carbon-apimgt,chamilaadhi/carbon-apimgt,prasa7/carbon-apimgt,chamindias/carbon-apimgt,chamilaadhi/carbon-apimgt,ruks/carbon-apimgt,wso2/carbon-apimgt,malinthaprasan/carbon-apimgt,fazlan-nazeem/carbon-apimgt,chamilaadhi/carbon-apimgt,sanjeewa-malalgoda/carbon-apimgt,tharindu1st/carbon-apimgt,malinthaprasan/carbon-apimgt,nuwand/carbon-apimgt,praminda/carbon-apimgt,harsha89/carbon-apimgt,nuwand/carbon-apimgt,harsha89/carbon-apimgt,sanjeewa-malalgoda/carbon-apimgt,tharindu1st/carbon-apimgt,Rajith90/carbon-apimgt,ruks/carbon-apimgt,tharikaGitHub/carbon-apimgt,uvindra/carbon-apimgt,fazlan-nazeem/carbon-apimgt,tharikaGitHub/carbon-apimgt,praminda/carbon-apimgt,fazlan-nazeem/carbon-apimgt,prasa7/carbon-apimgt,tharindu1st/carbon-apimgt,uvindra/carbon-apimgt,nuwand/carbon-apimgt,wso2/carbon-apimgt,tharindu1st/carbon-apimgt,uvindra/carbon-apimgt,tharikaGitHub/carbon-apimgt,Rajith90/carbon-apimgt,Rajith90/carbon-apimgt,malinthaprasan/carbon-apimgt,praminda/carbon-apimgt,ruks/carbon-apimgt,isharac/carbon-apimgt,nuwand/carbon-apimgt,isharac/carbon-apimgt,bhathiya/carbon-apimgt,fazlan-nazeem/carbon-apimgt,jaadds/carbon-apimgt,jaadds/carbon-apimgt,chamilaadhi/carbon-apimgt,sanjeewa-malalgoda/carbon-apimgt,bhathiya/carbon-apimgt,wso2/carbon-apimgt,chamindias/carbon-apimgt,malinthaprasan/carbon-apimgt,chamindias/carbon-apimgt,jaadds/carbon-apimgt,bhathiya/carbon-apimgt,Rajith90/carbon-apimgt,jaadds/carbon-apimgt,uvindra/carbon-apimgt,bhathiya/carbon-apimgt,isharac/carbon-apimgt,harsha89/carbon-apimgt | /*
* Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
*
* WSO2 Inc. 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.
*/
package org.wso2.carbon.apimgt.impl;
import org.apache.axis2.util.JavaUtils;
import org.apache.commons.codec.binary.Base64;
import org.apache.commons.io.FileUtils;
import org.apache.commons.io.IOUtils;
import org.apache.commons.io.output.ByteArrayOutputStream;
import org.apache.commons.lang3.BooleanUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.http.HttpResponse;
import org.apache.http.HttpStatus;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.entity.StringEntity;
import org.apache.solr.client.solrj.util.ClientUtils;
import org.json.simple.JSONArray;
import org.json.simple.JSONObject;
import org.json.simple.parser.JSONParser;
import org.json.simple.parser.ParseException;
import org.wso2.carbon.CarbonConstants;
import org.wso2.carbon.apimgt.api.APIConsumer;
import org.wso2.carbon.apimgt.api.APIDefinition;
import org.wso2.carbon.apimgt.api.APIManagementException;
import org.wso2.carbon.apimgt.api.APIMgtResourceNotFoundException;
import org.wso2.carbon.apimgt.api.ExceptionCodes;
import org.wso2.carbon.apimgt.api.WorkflowResponse;
import org.wso2.carbon.apimgt.api.model.API;
import org.wso2.carbon.apimgt.api.model.APIIdentifier;
import org.wso2.carbon.apimgt.api.model.APIKey;
import org.wso2.carbon.apimgt.api.model.APIProduct;
import org.wso2.carbon.apimgt.api.model.APIProductIdentifier;
import org.wso2.carbon.apimgt.api.model.APIRating;
import org.wso2.carbon.apimgt.api.model.AccessTokenInfo;
import org.wso2.carbon.apimgt.api.model.AccessTokenRequest;
import org.wso2.carbon.apimgt.api.model.ApiTypeWrapper;
import org.wso2.carbon.apimgt.api.model.Application;
import org.wso2.carbon.apimgt.api.model.ApplicationConstants;
import org.wso2.carbon.apimgt.api.model.ApplicationKeysDTO;
import org.wso2.carbon.apimgt.api.model.Comment;
import org.wso2.carbon.apimgt.api.model.Documentation;
import org.wso2.carbon.apimgt.api.model.Identifier;
import org.wso2.carbon.apimgt.api.model.KeyManager;
import org.wso2.carbon.apimgt.api.model.Label;
import org.wso2.carbon.apimgt.api.model.Monetization;
import org.wso2.carbon.apimgt.api.model.OAuthAppRequest;
import org.wso2.carbon.apimgt.api.model.OAuthApplicationInfo;
import org.wso2.carbon.apimgt.api.model.ResourceFile;
import org.wso2.carbon.apimgt.api.model.Scope;
import org.wso2.carbon.apimgt.api.model.SubscribedAPI;
import org.wso2.carbon.apimgt.api.model.Subscriber;
import org.wso2.carbon.apimgt.api.model.SubscriptionResponse;
import org.wso2.carbon.apimgt.api.model.Tag;
import org.wso2.carbon.apimgt.api.model.Tier;
import org.wso2.carbon.apimgt.api.model.TierPermission;
import org.wso2.carbon.apimgt.impl.caching.CacheInvalidator;
import org.wso2.carbon.apimgt.impl.definitions.OASParserUtil;
import org.wso2.carbon.apimgt.impl.dto.ApplicationDTO;
import org.wso2.carbon.apimgt.impl.dto.ApplicationRegistrationWorkflowDTO;
import org.wso2.carbon.apimgt.impl.dto.ApplicationWorkflowDTO;
import org.wso2.carbon.apimgt.impl.dto.Environment;
import org.wso2.carbon.apimgt.impl.dto.JwtTokenInfoDTO;
import org.wso2.carbon.apimgt.impl.dto.SubscriptionWorkflowDTO;
import org.wso2.carbon.apimgt.impl.dto.TierPermissionDTO;
import org.wso2.carbon.apimgt.impl.dto.WorkflowDTO;
import org.wso2.carbon.apimgt.impl.factory.KeyManagerHolder;
import org.wso2.carbon.apimgt.impl.internal.ServiceReferenceHolder;
import org.wso2.carbon.apimgt.impl.monetization.DefaultMonetizationImpl;
import org.wso2.carbon.apimgt.impl.token.ApiKeyGenerator;
import org.wso2.carbon.apimgt.impl.utils.APIFileUtil;
import org.wso2.carbon.apimgt.impl.utils.APIMWSDLReader;
import org.wso2.carbon.apimgt.impl.utils.APINameComparator;
import org.wso2.carbon.apimgt.impl.utils.APIUtil;
import org.wso2.carbon.apimgt.impl.utils.APIVersionComparator;
import org.wso2.carbon.apimgt.impl.utils.ApplicationUtils;
import org.wso2.carbon.apimgt.impl.utils.ContentSearchResultNameComparator;
import org.wso2.carbon.apimgt.impl.workflow.AbstractApplicationRegistrationWorkflowExecutor;
import org.wso2.carbon.apimgt.impl.workflow.GeneralWorkflowResponse;
import org.wso2.carbon.apimgt.impl.workflow.WorkflowConstants;
import org.wso2.carbon.apimgt.impl.workflow.WorkflowException;
import org.wso2.carbon.apimgt.impl.workflow.WorkflowExecutor;
import org.wso2.carbon.apimgt.impl.workflow.WorkflowExecutorFactory;
import org.wso2.carbon.apimgt.impl.workflow.WorkflowStatus;
import org.wso2.carbon.apimgt.impl.wsdl.WSDLProcessor;
import org.wso2.carbon.apimgt.impl.wsdl.model.WSDLArchiveInfo;
import org.wso2.carbon.apimgt.impl.wsdl.model.WSDLValidationResponse;
import org.wso2.carbon.context.PrivilegedCarbonContext;
import org.wso2.carbon.governance.api.common.dataobjects.GovernanceArtifact;
import org.wso2.carbon.governance.api.exception.GovernanceException;
import org.wso2.carbon.governance.api.generic.GenericArtifactManager;
import org.wso2.carbon.governance.api.generic.dataobjects.GenericArtifact;
import org.wso2.carbon.governance.api.util.GovernanceUtils;
import org.wso2.carbon.registry.common.TermData;
import org.wso2.carbon.registry.core.ActionConstants;
import org.wso2.carbon.registry.core.Association;
import org.wso2.carbon.registry.core.Registry;
import org.wso2.carbon.registry.core.RegistryConstants;
import org.wso2.carbon.registry.core.Resource;
import org.wso2.carbon.registry.core.config.RegistryContext;
import org.wso2.carbon.registry.core.exceptions.RegistryException;
import org.wso2.carbon.registry.core.pagination.PaginationContext;
import org.wso2.carbon.registry.core.service.RegistryService;
import org.wso2.carbon.registry.core.session.UserRegistry;
import org.wso2.carbon.registry.core.utils.RegistryUtils;
import org.wso2.carbon.user.api.AuthorizationManager;
import org.wso2.carbon.user.api.UserStoreException;
import org.wso2.carbon.user.core.service.RealmService;
import org.wso2.carbon.utils.multitenancy.MultitenantConstants;
import org.wso2.carbon.utils.multitenancy.MultitenantUtils;
import javax.cache.Caching;
import javax.wsdl.Definition;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.net.MalformedURLException;
import java.net.URL;
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.SortedSet;
import java.util.TreeSet;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
/**
* This class provides the core API store functionality. It is implemented in a very
* self-contained and 'pure' manner, without taking requirements like security into account,
* which are subject to frequent change. Due to this 'pure' nature and the significance of
* the class to the overall API management functionality, the visibility of the class has
* been reduced to package level. This means we can still use it for internal purposes and
* possibly even extend it, but it's totally off the limits of the users. Users wishing to
* programmatically access this functionality should use one of the extensions of this
* class which is visible to them. These extensions may add additional features like
* security to this class.
*/
public class APIConsumerImpl extends AbstractAPIManager implements APIConsumer {
private static final Log log = LogFactory.getLog(APIConsumerImpl.class);
private static final Log audit = CarbonConstants.AUDIT_LOG;
public static final char COLON_CHAR = ':';
public static final String EMPTY_STRING = "";
public static final String ENVIRONMENT_NAME = "environmentName";
public static final String ENVIRONMENT_TYPE = "environmentType";
public static final String API_NAME = "apiName";
public static final String API_VERSION = "apiVersion";
public static final String API_PROVIDER = "apiProvider";
private static final String PRESERVED_CASE_SENSITIVE_VARIABLE = "preservedCaseSensitive";
/* Map to Store APIs against Tag */
private ConcurrentMap<String, Set<API>> taggedAPIs = new ConcurrentHashMap<String, Set<API>>();
private boolean isTenantModeStoreView;
private String requestedTenant;
private boolean isTagCacheEnabled;
private Set<Tag> tagSet;
private long tagCacheValidityTime;
private volatile long lastUpdatedTime;
private volatile long lastUpdatedTimeForTagApi;
private final Object tagCacheMutex = new Object();
private final Object tagWithAPICacheMutex = new Object();
protected APIMRegistryService apimRegistryService;
protected String userNameWithoutChange;
public APIConsumerImpl() throws APIManagementException {
super();
readTagCacheConfigs();
}
public APIConsumerImpl(String username, APIMRegistryService apimRegistryService) throws APIManagementException {
super(username);
userNameWithoutChange = username;
readTagCacheConfigs();
this.apimRegistryService = apimRegistryService;
}
private void readTagCacheConfigs() {
APIManagerConfiguration config = getAPIManagerConfiguration();
String enableTagCache = config.getFirstProperty(APIConstants.STORE_TAG_CACHE_DURATION);
if (enableTagCache == null) {
isTagCacheEnabled = false;
tagCacheValidityTime = 0;
} else {
isTagCacheEnabled = true;
tagCacheValidityTime = Long.parseLong(enableTagCache);
}
}
@Override
public Subscriber getSubscriber(String subscriberId) throws APIManagementException {
Subscriber subscriber = null;
try {
subscriber = apiMgtDAO.getSubscriber(subscriberId);
} catch (APIManagementException e) {
handleException("Failed to get Subscriber", e);
}
return subscriber;
}
/**
* Returns the set of APIs with the given tag from the taggedAPIs Map
*
* @param tagName The name of the tag
* @return Set of {@link API} with the given tag
* @throws APIManagementException
*/
@Override
public Set<API> getAPIsWithTag(String tagName, String requestedTenantDomain) throws APIManagementException {
/* We keep track of the lastUpdatedTime of the TagCache to determine its freshness.
*/
long lastUpdatedTimeAtStart = lastUpdatedTimeForTagApi;
long currentTimeAtStart = System.currentTimeMillis();
if(isTagCacheEnabled && ( (currentTimeAtStart- lastUpdatedTimeAtStart) < tagCacheValidityTime)){
if (taggedAPIs != null && taggedAPIs.containsKey(tagName)) {
return taggedAPIs.get(tagName);
}
}else{
synchronized (tagWithAPICacheMutex) {
lastUpdatedTimeForTagApi = System.currentTimeMillis();
taggedAPIs = new ConcurrentHashMap<String, Set<API>>();
}
}
boolean isTenantMode = requestedTenantDomain != null && !"null".equalsIgnoreCase(requestedTenantDomain);
this.isTenantModeStoreView = isTenantMode;
if (requestedTenantDomain != null && !"null".equals(requestedTenantDomain)) {
this.requestedTenant = requestedTenantDomain;
}
Registry userRegistry;
boolean isTenantFlowStarted = false;
Set<API> apisWithTag = null;
try {
//start the tenant flow prior to loading registry
if (requestedTenant != null && !MultitenantConstants.SUPER_TENANT_DOMAIN_NAME.equals(requestedTenant)) {
isTenantFlowStarted = startTenantFlowForTenantDomain(requestedTenantDomain);
}
if ((isTenantMode && this.tenantDomain == null) ||
(isTenantMode && isTenantDomainNotMatching(requestedTenantDomain))) {//Tenant store anonymous mode
int tenantId = getTenantId(requestedTenantDomain);
// explicitly load the tenant's registry
APIUtil.loadTenantRegistry(tenantId);
userRegistry = getGovernanceUserRegistry(tenantId);
setUsernameToThreadLocalCarbonContext(CarbonConstants.REGISTRY_ANONNYMOUS_USERNAME);
} else {
userRegistry = registry;
setUsernameToThreadLocalCarbonContext(this.username);
}
apisWithTag = getAPIsWithTag(userRegistry, tagName);
/* Add the APIs against the tag name */
if (!apisWithTag.isEmpty()) {
if (taggedAPIs.containsKey(tagName)) {
for (API api : apisWithTag) {
taggedAPIs.get(tagName).add(api);
}
} else {
taggedAPIs.putIfAbsent(tagName, apisWithTag);
}
}
} catch (RegistryException e) {
handleException("Failed to get api by the tag", e);
} catch (UserStoreException e) {
handleException("Failed to get api by the tag", e);
} finally {
if (isTenantFlowStarted) {
endTenantFlow();
}
}
return apisWithTag;
}
protected void setUsernameToThreadLocalCarbonContext(String username) {
PrivilegedCarbonContext.getThreadLocalCarbonContext().setUsername(username);
}
protected UserRegistry getGovernanceUserRegistry(int tenantId) throws RegistryException {
return ServiceReferenceHolder.getInstance().getRegistryService().
getGovernanceUserRegistry(CarbonConstants.REGISTRY_ANONNYMOUS_USERNAME, tenantId);
}
protected int getTenantId(String requestedTenantDomain) throws UserStoreException {
return ServiceReferenceHolder.getInstance().getRealmService().getTenantManager()
.getTenantId(requestedTenantDomain);
}
/**
* Returns the set of APIs with the given tag from the taggedAPIs Map.
*
* @param tag The name of the tag
* @param start The starting index of the return result set
* @param end The end index of the return result set
* @return A {@link Map} of APIs(between the given indexes) and the total number indicating all the available
* APIs count
* @throws APIManagementException
*/
@Override
public Map<String, Object> getPaginatedAPIsWithTag(String tag, int start, int end, String tenantDomain) throws APIManagementException {
List<API> apiList = new ArrayList<API>();
Set<API> resultSet = new TreeSet<API>(new APIVersionComparator());
Map<String, Object> results = new HashMap<String, Object>();
Set<API> taggedAPISet = this.getAPIsWithTag(tag,tenantDomain);
if (taggedAPISet != null) {
if (taggedAPISet.size() < end) {
end = taggedAPISet.size();
}
int totalLength;
apiList.addAll(taggedAPISet);
totalLength = apiList.size();
if (totalLength <= ((start + end) - 1)) {
end = totalLength;
} else {
end = start + end;
}
for (int i = start; i < end; i++) {
resultSet.add(apiList.get(i));
}
results.put("apis", resultSet);
results.put("length", taggedAPISet.size());
} else {
results.put("apis", null);
results.put("length", 0);
}
return results;
}
/**
* Returns the set of APIs with the given tag, retrieved from registry
*
* @param registry - Current registry; tenant/SuperTenant
* @param tag - The tag name
* @return A {@link Set} of {@link API} objects.
* @throws APIManagementException
*/
private Set<API> getAPIsWithTag(Registry registry, String tag)
throws APIManagementException {
Set<API> apiSet = new TreeSet<API>(new APINameComparator());
try {
List<GovernanceArtifact> genericArtifacts =
GovernanceUtils.findGovernanceArtifacts(getSearchQuery(APIConstants.TAGS_EQ_SEARCH_TYPE_PREFIX + tag), registry,
APIConstants.API_RXT_MEDIA_TYPE);
for (GovernanceArtifact genericArtifact : genericArtifacts) {
try {
String apiStatus = APIUtil.getLcStateFromArtifact(genericArtifact);
if (genericArtifact != null && (APIConstants.PUBLISHED.equals(apiStatus)
|| APIConstants.PROTOTYPED.equals(apiStatus))) {
API api = APIUtil.getAPI(genericArtifact);
if (api != null) {
apiSet.add(api);
}
}
} catch (RegistryException e) {
log.warn("User is not authorized to get an API with tag " + tag, e);
}
}
} catch (RegistryException e) {
handleException("Failed to get API for tag " + tag, e);
}
return apiSet;
}
/**
* The method to get APIs to Store view
*
* @return Set<API> Set of APIs
* @throws APIManagementException
*/
@Override
public Set<API> getAllPublishedAPIs(String tenantDomain) throws APIManagementException {
SortedSet<API> apiSortedSet = new TreeSet<API>(new APINameComparator());
SortedSet<API> apiVersionsSortedSet = new TreeSet<API>(new APIVersionComparator());
try {
Registry userRegistry;
boolean isTenantMode=(tenantDomain != null);
if ((isTenantMode && this.tenantDomain==null) || (isTenantMode && isTenantDomainNotMatching(tenantDomain))) {//Tenant store anonymous mode
int tenantId = getTenantId(tenantDomain);
userRegistry = getGovernanceUserRegistry(tenantId);
} else {
userRegistry = registry;
}
this.isTenantModeStoreView = isTenantMode;
this.requestedTenant = tenantDomain;
GenericArtifactManager artifactManager = APIUtil.getArtifactManager(userRegistry, APIConstants.API_KEY);
if (artifactManager != null) {
GenericArtifact[] genericArtifacts = artifactManager.getAllGenericArtifacts();
if (genericArtifacts == null || genericArtifacts.length == 0) {
return apiSortedSet;
}
Map<String, API> latestPublishedAPIs = new HashMap<String, API>();
List<API> multiVersionedAPIs = new ArrayList<API>();
Comparator<API> versionComparator = new APIVersionComparator();
Boolean displayMultipleVersions = APIUtil.isAllowDisplayMultipleVersions();
Boolean displayAPIsWithMultipleStatus = APIUtil.isAllowDisplayAPIsWithMultipleStatus();
for (GenericArtifact artifact : genericArtifacts) {
// adding the API provider can mark the latest API .
String status = APIUtil.getLcStateFromArtifact(artifact);
API api = null;
//Check the api-manager.xml config file entry <DisplayAllAPIs> value is false
if (!displayAPIsWithMultipleStatus) {
// then we are only interested in published APIs here...
if (APIConstants.PUBLISHED.equals(status)) {
api = APIUtil.getAPI(artifact);
}
} else { // else we are interested in both deprecated/published APIs here...
if (APIConstants.PUBLISHED.equals(status) || APIConstants.DEPRECATED.equals(status)) {
api = APIUtil.getAPI(artifact);
}
}
if (api != null) {
try {
checkAccessControlPermission(api.getId());
} catch (APIManagementException e) {
// This is a second level of filter to get apis based on access control and visibility.
// Hence log is set as debug and continued.
if(log.isDebugEnabled()) {
log.debug("User is not authorized to view the api " + api.getId().getApiName(), e);
}
continue;
}
String key;
//Check the configuration to allow showing multiple versions of an API true/false
if (!displayMultipleVersions) { //If allow only showing the latest version of an API
key = api.getId().getProviderName() + COLON_CHAR + api.getId().getApiName();
API existingAPI = latestPublishedAPIs.get(key);
if (existingAPI != null) {
// If we have already seen an API with the same name, make sure
// this one has a higher version number
if (versionComparator.compare(api, existingAPI) > 0) {
latestPublishedAPIs.put(key, api);
}
} else {
// We haven't seen this API before
latestPublishedAPIs.put(key, api);
}
} else { //If allow showing multiple versions of an API
multiVersionedAPIs.add(api);
}
}
}
if (!displayMultipleVersions) {
apiSortedSet.addAll(latestPublishedAPIs.values());
return apiSortedSet;
} else {
apiVersionsSortedSet.addAll(multiVersionedAPIs);
return apiVersionsSortedSet;
}
} else {
String errorMessage = "Artifact manager is null for tenant domain " + tenantDomain
+ " when retrieving APIs for store. User : " + PrivilegedCarbonContext
.getThreadLocalCarbonContext().getUsername();
log.error(errorMessage);
throw new APIManagementException(errorMessage);
}
} catch (RegistryException e) {
handleException("Failed to get all published APIs", e);
} catch (UserStoreException e) {
handleException("Failed to get all published APIs", e);
}
return apiSortedSet;
}
/**
* The method to get APIs to Store view *
*
* @return Set<API> Set of APIs
* @throws APIManagementException
*/
@Override
@Deprecated
public Map<String,Object> getAllPaginatedPublishedAPIs(String tenantDomain,int start,int end)
throws APIManagementException {
Boolean displayAPIsWithMultipleStatus = false;
try {
if (tenantDomain != null) {
PrivilegedCarbonContext.startTenantFlow();
PrivilegedCarbonContext.getThreadLocalCarbonContext().setTenantDomain(tenantDomain, true);
}
displayAPIsWithMultipleStatus = APIUtil.isAllowDisplayAPIsWithMultipleStatus();
}finally {
endTenantFlow();
}
Map<String, List<String>> listMap = new HashMap<String, List<String>>();
//Check the api-manager.xml config file entry <DisplayAllAPIs> value is false
if (!displayAPIsWithMultipleStatus) {
//Create the search attribute map
listMap.put(APIConstants.API_OVERVIEW_STATUS, new ArrayList<String>() {{
add(APIConstants.PUBLISHED);
}});
} else{
return getAllPaginatedAPIs(tenantDomain, start, end);
}
Map<String, Object> result = new HashMap<String, Object>();
SortedSet<API> apiSortedSet = new TreeSet<API>(new APINameComparator());
SortedSet<API> apiVersionsSortedSet = new TreeSet<API>(new APIVersionComparator());
int totalLength = 0;
try {
Registry userRegistry;
boolean isTenantMode = (tenantDomain != null);
if ((isTenantMode && this.tenantDomain == null) ||
(isTenantMode && isTenantDomainNotMatching(tenantDomain))) {//Tenant store anonymous mode
int tenantId = getTenantId(tenantDomain);
// explicitly load the tenant's registry
APIUtil.loadTenantRegistry(tenantId);
userRegistry = getGovernanceUserRegistry(tenantId);
setUsernameToThreadLocalCarbonContext(CarbonConstants.REGISTRY_ANONNYMOUS_USERNAME);
} else {
userRegistry = registry;
setUsernameToThreadLocalCarbonContext(this.username);
}
this.isTenantModeStoreView = isTenantMode;
this.requestedTenant = tenantDomain;
Map<String, API> latestPublishedAPIs = new HashMap<String, API>();
List<API> multiVersionedAPIs = new ArrayList<API>();
Comparator<API> versionComparator = new APIVersionComparator();
Boolean displayMultipleVersions = APIUtil.isAllowDisplayMultipleVersions();
PaginationContext.init(start, end, "ASC", APIConstants.API_OVERVIEW_NAME, Integer.MAX_VALUE);
GenericArtifactManager artifactManager = APIUtil.getArtifactManager(userRegistry, APIConstants.API_KEY);
if (artifactManager != null) {
GenericArtifact[] genericArtifacts = artifactManager.findGenericArtifacts(listMap);
totalLength = PaginationContext.getInstance().getLength();
if (genericArtifacts == null || genericArtifacts.length == 0) {
result.put("apis", apiSortedSet);
result.put("totalLength", totalLength);
return result;
}
for (GenericArtifact artifact : genericArtifacts) {
if (artifact == null) {
log.error("Failed to retrieve artifact when getting paginated published API.");
continue;
}
// adding the API provider can mark the latest API .
API api = APIUtil.getAPI(artifact);
if (api != null) {
String key;
//Check the configuration to allow showing multiple versions of an API true/false
if (!displayMultipleVersions) { //If allow only showing the latest version of an API
key = api.getId().getProviderName() + COLON_CHAR + api.getId().getApiName();
API existingAPI = latestPublishedAPIs.get(key);
if (existingAPI != null) {
// If we have already seen an API with the same name, make sure
// this one has a higher version number
if (versionComparator.compare(api, existingAPI) > 0) {
latestPublishedAPIs.put(key, api);
}
} else {
// We haven't seen this API before
latestPublishedAPIs.put(key, api);
}
} else { //If allow showing multiple versions of an API
multiVersionedAPIs.add(api);
}
}
}
if (!displayMultipleVersions) {
apiSortedSet.addAll(latestPublishedAPIs.values());
result.put("apis", apiSortedSet);
result.put("totalLength", totalLength);
return result;
} else {
apiVersionsSortedSet.addAll(multiVersionedAPIs);
result.put("apis", apiVersionsSortedSet);
result.put("totalLength", totalLength);
return result;
}
} else {
String errorMessage = "Artifact manager is null for tenant domain " + tenantDomain
+ " when retrieving all Published APIs.";
log.error(errorMessage);
}
} catch (RegistryException e) {
handleException("Failed to get all published APIs", e);
} catch (UserStoreException e) {
handleException("Failed to get all published APIs", e);
} finally {
PaginationContext.destroy();
}
result.put("apis", apiSortedSet);
result.put("totalLength", totalLength);
return result;
}
/**
* The method to get Light Weight APIs to Store view *
* @return Set<API> Set of APIs
* @throws APIManagementException
*/
public Map<String, Object> getAllPaginatedPublishedLightWeightAPIs(String tenantDomain, int start, int end)
throws APIManagementException {
Boolean displayAPIsWithMultipleStatus = false;
try {
if (tenantDomain != null) {
PrivilegedCarbonContext.startTenantFlow();
PrivilegedCarbonContext.getThreadLocalCarbonContext().setTenantDomain(tenantDomain, true);
}
displayAPIsWithMultipleStatus = APIUtil.isAllowDisplayAPIsWithMultipleStatus();
} finally {
endTenantFlow();
}
Map<String, List<String>> listMap = new HashMap<String, List<String>>();
//Check the api-manager.xml config file entry <DisplayAllAPIs> value is false
if (!displayAPIsWithMultipleStatus) {
//Create the search attribute map
listMap.put(APIConstants.API_OVERVIEW_STATUS, new ArrayList<String>() {{
add(APIConstants.PUBLISHED);
}});
} else {
return getAllPaginatedAPIs(tenantDomain, start, end);
}
Map<String, Object> result = new HashMap<String, Object>();
SortedSet<API> apiSortedSet = new TreeSet<API>(new APINameComparator());
SortedSet<API> apiVersionsSortedSet = new TreeSet<API>(new APIVersionComparator());
int totalLength = 0;
try {
Registry userRegistry;
boolean isTenantMode = (tenantDomain != null);
if ((isTenantMode && this.tenantDomain == null) ||
(isTenantMode && isTenantDomainNotMatching(tenantDomain))) {//Tenant store anonymous mode
int tenantId = getTenantId(tenantDomain);
// explicitly load the tenant's registry
APIUtil.loadTenantRegistry(tenantId);
userRegistry = getGovernanceUserRegistry(tenantId);
setUsernameToThreadLocalCarbonContext(CarbonConstants.REGISTRY_ANONNYMOUS_USERNAME);
} else {
userRegistry = registry;
setUsernameToThreadLocalCarbonContext(this.username);
}
this.isTenantModeStoreView = isTenantMode;
this.requestedTenant = tenantDomain;
Map<String, API> latestPublishedAPIs = new HashMap<String, API>();
List<API> multiVersionedAPIs = new ArrayList<API>();
Comparator<API> versionComparator = new APIVersionComparator();
Boolean displayMultipleVersions = APIUtil.isAllowDisplayMultipleVersions();
PaginationContext.init(start, end, "ASC", APIConstants.API_OVERVIEW_NAME, Integer.MAX_VALUE);
GenericArtifactManager artifactManager = APIUtil.getArtifactManager(userRegistry, APIConstants.API_KEY);
if (artifactManager != null) {
GenericArtifact[] genericArtifacts = artifactManager.findGenericArtifacts(listMap);
totalLength = PaginationContext.getInstance().getLength();
if (genericArtifacts == null || genericArtifacts.length == 0) {
result.put("apis", apiSortedSet);
result.put("totalLength", totalLength);
return result;
}
for (GenericArtifact artifact : genericArtifacts) {
if (artifact == null) {
log.error("Failed to retrieve artifact when getting paginated published API.");
continue;
}
// adding the API provider can mark the latest API .
API api = APIUtil.getLightWeightAPI(artifact);
if (api != null) {
String key;
//Check the configuration to allow showing multiple versions of an API true/false
if (!displayMultipleVersions) { //If allow only showing the latest version of an API
key = api.getId().getProviderName() + COLON_CHAR + api.getId().getApiName();
API existingAPI = latestPublishedAPIs.get(key);
if (existingAPI != null) {
// If we have already seen an API with the same name, make sure
// this one has a higher version number
if (versionComparator.compare(api, existingAPI) > 0) {
latestPublishedAPIs.put(key, api);
}
} else {
// We haven't seen this API before
latestPublishedAPIs.put(key, api);
}
} else { //If allow showing multiple versions of an API
multiVersionedAPIs.add(api);
}
}
}
if (!displayMultipleVersions) {
apiSortedSet.addAll(latestPublishedAPIs.values());
result.put("apis", apiSortedSet);
result.put("totalLength", totalLength);
return result;
} else {
apiVersionsSortedSet.addAll(multiVersionedAPIs);
result.put("apis", apiVersionsSortedSet);
result.put("totalLength", totalLength);
return result;
}
} else {
String errorMessage = "Artifact manager is null for tenant domain " + tenantDomain +
" when retrieving all Published APIs.";
log.error(errorMessage);
}
} catch (RegistryException e) {
handleException("Failed to get all published APIs", e);
} catch (UserStoreException e) {
handleException("Failed to get all published APIs", e);
} finally {
PaginationContext.destroy();
}
result.put("apis", apiSortedSet);
result.put("totalLength", totalLength);
return result;
}
/**
* The method to get APIs in any of the given LC status array
*
* @return Map<String, Object> API result set with pagination information
* @throws APIManagementException
*/
@Override
public Map<String, Object> getAllPaginatedLightWeightAPIsByStatus(String tenantDomain,
int start, int end, final String[] apiStatus,
boolean returnAPITags)
throws APIManagementException {
Map<String, Object> result = new HashMap<String, Object>();
SortedSet<API> apiSortedSet = new TreeSet<API>(new APINameComparator());
SortedSet<API> apiVersionsSortedSet = new TreeSet<API>(new APIVersionComparator());
int totalLength = 0;
boolean isMore = false;
String criteria = "lcState=";
try {
Registry userRegistry;
boolean isTenantMode = (tenantDomain != null);
if ((isTenantMode && this.tenantDomain == null) || (isTenantMode && isTenantDomainNotMatching(tenantDomain))) {
//Tenant store anonymous mode
int tenantId = getTenantId(tenantDomain);
// explicitly load the tenant's registry
APIUtil.loadTenantRegistry(tenantId);
userRegistry = ServiceReferenceHolder.getInstance().getRegistryService().
getGovernanceUserRegistry(CarbonConstants.REGISTRY_ANONNYMOUS_USERNAME, tenantId);
setUsernameToThreadLocalCarbonContext(CarbonConstants.REGISTRY_ANONNYMOUS_USERNAME);
} else {
userRegistry = registry;
setUsernameToThreadLocalCarbonContext(this.username);
}
this.isTenantModeStoreView = isTenantMode;
this.requestedTenant = tenantDomain;
Map<String, API> latestPublishedAPIs = new HashMap<String, API>();
List<API> multiVersionedAPIs = new ArrayList<API>();
Comparator<API> versionComparator = new APIVersionComparator();
Boolean displayMultipleVersions = APIUtil.isAllowDisplayMultipleVersions();
String paginationLimit = ServiceReferenceHolder.getInstance().getAPIManagerConfigurationService()
.getAPIManagerConfiguration().getFirstProperty(APIConstants.API_STORE_APIS_PER_PAGE);
// If the Config exists use it to set the pagination limit
final int maxPaginationLimit;
if (paginationLimit != null) {
// The additional 1 added to the maxPaginationLimit is to help us determine if more
// APIs may exist so that we know that we are unable to determine the actual total
// API count. We will subtract this 1 later on so that it does not interfere with
// the logic of the rest of the application
int pagination = Integer.parseInt(paginationLimit);
// Because the store jaggery pagination logic is 10 results per a page we need to set pagination
// limit to at least 11 or the pagination done at this level will conflict with the store pagination
// leading to some of the APIs not being displayed
if (pagination < 11) {
pagination = 11;
log.warn("Value of '" + APIConstants.API_STORE_APIS_PER_PAGE + "' is too low, defaulting to 11");
}
maxPaginationLimit = start + pagination + 1;
}
// Else if the config is not specified we go with default functionality and load all
else {
maxPaginationLimit = Integer.MAX_VALUE;
}
PaginationContext.init(start, end, "ASC", APIConstants.API_OVERVIEW_NAME, maxPaginationLimit);
criteria = criteria + APIUtil.getORBasedSearchCriteria(apiStatus);
GenericArtifactManager artifactManager = APIUtil.getArtifactManager(userRegistry, APIConstants.API_KEY);
if (artifactManager != null) {
if (apiStatus != null && apiStatus.length > 0) {
List<GovernanceArtifact> genericArtifacts = GovernanceUtils.findGovernanceArtifacts
(getSearchQuery(criteria), userRegistry, APIConstants.API_RXT_MEDIA_TYPE);
totalLength = PaginationContext.getInstance().getLength();
if (genericArtifacts == null || genericArtifacts.size() == 0) {
result.put("apis", apiSortedSet);
result.put("totalLength", totalLength);
result.put("isMore", isMore);
return result;
}
// Check to see if we can speculate that there are more APIs to be loaded
if (maxPaginationLimit == totalLength) {
isMore = true; // More APIs exist so we cannot determine the total API count without
// incurring a performance hit
--totalLength; // Remove the additional 1 we added earlier when setting max pagination limit
}
int tempLength = 0;
for (GovernanceArtifact artifact : genericArtifacts) {
API api = null;
try {
api = APIUtil.getLightWeightAPI(artifact);
} catch (APIManagementException e) {
//log and continue since we want to load the rest of the APIs.
log.error("Error while loading API " + artifact.getAttribute(
APIConstants.API_OVERVIEW_NAME),
e);
}
if (api != null) {
if (returnAPITags) {
String artifactPath = GovernanceUtils.getArtifactPath(registry, artifact.getId());
Set<String> tags = new HashSet<String>();
org.wso2.carbon.registry.core.Tag[] tag = registry.getTags(artifactPath);
for (org.wso2.carbon.registry.core.Tag tag1 : tag) {
tags.add(tag1.getTagName());
}
api.addTags(tags);
}
String key;
//Check the configuration to allow showing multiple versions of an API true/false
if (!displayMultipleVersions) { //If allow only showing the latest version of an API
key = api.getId().getProviderName() + COLON_CHAR + api.getId().getApiName();
API existingAPI = latestPublishedAPIs.get(key);
if (existingAPI != null) {
// If we have already seen an API with the same name, make sure
// this one has a higher version number
if (versionComparator.compare(api, existingAPI) > 0) {
latestPublishedAPIs.put(key, api);
}
} else {
// We haven't seen this API before
latestPublishedAPIs.put(key, api);
}
} else { //If allow showing multiple versions of an API
multiVersionedAPIs.add(api);
}
}
tempLength++;
if (tempLength >= totalLength) {
break;
}
}
if (!displayMultipleVersions) {
apiSortedSet.addAll(latestPublishedAPIs.values());
result.put("apis", apiSortedSet);
result.put("totalLength", totalLength);
result.put("isMore", isMore);
return result;
} else {
apiVersionsSortedSet.addAll(multiVersionedAPIs);
result.put("apis", apiVersionsSortedSet);
result.put("totalLength", totalLength);
result.put("isMore", isMore);
return result;
}
}
} else {
String errorMessage = "Artifact manager is null for tenant domain " + tenantDomain +
" when retrieving all paginated APIs by status.";
log.error(errorMessage);
}
} catch (RegistryException e) {
handleException("Failed to get all published APIs", e);
} catch (UserStoreException e) {
handleException("Failed to get all published APIs", e);
} finally {
PaginationContext.destroy();
}
result.put("apis", apiSortedSet);
result.put("totalLength", totalLength);
result.put("isMore", isMore);
return result;
}
/**
* Regenerate consumer secret.
*
* @param clientId For which consumer key we need to regenerate consumer secret.
* @return New consumer secret.
* @throws APIManagementException This is the custom exception class for API management.
*/
public String renewConsumerSecret(String clientId) throws APIManagementException {
// Create Token Request with parameters provided from UI.
AccessTokenRequest tokenRequest = new AccessTokenRequest();
tokenRequest.setClientId(clientId);
KeyManager keyManager = KeyManagerHolder.getKeyManagerInstance();
return keyManager.getNewApplicationConsumerSecret(tokenRequest);
}
/**
* The method to get APIs in any of the given LC status array
*
* @return Map<String, Object> API result set with pagination information
* @throws APIManagementException
*/
@Override
public Map<String, Object> getAllPaginatedAPIsByStatus(String tenantDomain,
int start, int end, final String[] apiStatus, boolean returnAPITags) throws APIManagementException {
Map<String, Object> result = new HashMap<String, Object>();
SortedSet<API> apiSortedSet = new TreeSet<API>(new APINameComparator());
SortedSet<API> apiVersionsSortedSet = new TreeSet<API>(new APIVersionComparator());
int totalLength = 0;
boolean isMore = false;
String criteria = APIConstants.LCSTATE_SEARCH_TYPE_KEY;
try {
Registry userRegistry;
boolean isTenantMode = (tenantDomain != null);
if ((isTenantMode && this.tenantDomain == null) || (isTenantMode && isTenantDomainNotMatching(tenantDomain))) {//Tenant store anonymous mode
int tenantId = getTenantId(tenantDomain);
// explicitly load the tenant's registry
APIUtil.loadTenantRegistry(tenantId);
userRegistry = getGovernanceUserRegistry(tenantId);
setUsernameToThreadLocalCarbonContext(CarbonConstants.REGISTRY_ANONNYMOUS_USERNAME);
} else {
userRegistry = registry;
setUsernameToThreadLocalCarbonContext(this.username);
}
this.isTenantModeStoreView = isTenantMode;
this.requestedTenant = tenantDomain;
Map<String, API> latestPublishedAPIs = new HashMap<String, API>();
List<API> multiVersionedAPIs = new ArrayList<API>();
Comparator<API> versionComparator = new APIVersionComparator();
Boolean displayMultipleVersions = APIUtil.isAllowDisplayMultipleVersions();
String paginationLimit = getAPIManagerConfiguration().
getFirstProperty(APIConstants.API_STORE_APIS_PER_PAGE);
// If the Config exists use it to set the pagination limit
final int maxPaginationLimit;
if (paginationLimit != null) {
// The additional 1 added to the maxPaginationLimit is to help us determine if more
// APIs may exist so that we know that we are unable to determine the actual total
// API count. We will subtract this 1 later on so that it does not interfere with
// the logic of the rest of the application
int pagination = Integer.parseInt(paginationLimit);
// Because the store jaggery pagination logic is 10 results per a page we need to set pagination
// limit to at least 11 or the pagination done at this level will conflict with the store pagination
// leading to some of the APIs not being displayed
if (pagination < 11) {
pagination = 11;
log.warn("Value of '" + APIConstants.API_STORE_APIS_PER_PAGE + "' is too low, defaulting to 11");
}
maxPaginationLimit = start + pagination + 1;
}
// Else if the config is not specified we go with default functionality and load all
else {
maxPaginationLimit = Integer.MAX_VALUE;
}
PaginationContext.init(start, end, "ASC", APIConstants.API_OVERVIEW_NAME, maxPaginationLimit);
criteria = criteria + APIUtil.getORBasedSearchCriteria(apiStatus);
GenericArtifactManager artifactManager = APIUtil.getArtifactManager(userRegistry, APIConstants.API_KEY);
if (artifactManager != null) {
if (apiStatus != null && apiStatus.length > 0) {
List<GovernanceArtifact> genericArtifacts = GovernanceUtils.findGovernanceArtifacts
(getSearchQuery(criteria), userRegistry, APIConstants.API_RXT_MEDIA_TYPE);
totalLength = PaginationContext.getInstance().getLength();
if (genericArtifacts == null || genericArtifacts.size() == 0) {
result.put("apis", apiSortedSet);
result.put("totalLength", totalLength);
result.put("isMore", isMore);
return result;
}
// Check to see if we can speculate that there are more APIs to be loaded
if (maxPaginationLimit == totalLength) {
isMore = true; // More APIs exist so we cannot determine the total API count without incurring a
// performance hit
--totalLength; // Remove the additional 1 we added earlier when setting max pagination limit
}
int tempLength = 0;
for (GovernanceArtifact artifact : genericArtifacts) {
API api = null;
try {
api = APIUtil.getAPI(artifact);
} catch (APIManagementException e) {
//log and continue since we want to load the rest of the APIs.
log.error("Error while loading API " + artifact.getAttribute(APIConstants.API_OVERVIEW_NAME),
e);
}
if (api != null) {
if (returnAPITags) {
String artifactPath = GovernanceUtils.getArtifactPath(registry, artifact.getId());
Set<String> tags = new HashSet<String>();
org.wso2.carbon.registry.core.Tag[] tag = registry.getTags(artifactPath);
for (org.wso2.carbon.registry.core.Tag tag1 : tag) {
tags.add(tag1.getTagName());
}
api.addTags(tags);
}
String key;
//Check the configuration to allow showing multiple versions of an API true/false
if (!displayMultipleVersions) { //If allow only showing the latest version of an API
key = api.getId().getProviderName() + COLON_CHAR + api.getId().getApiName();
API existingAPI = latestPublishedAPIs.get(key);
if (existingAPI != null) {
// If we have already seen an API with the same name, make sure
// this one has a higher version number
if (versionComparator.compare(api, existingAPI) > 0) {
latestPublishedAPIs.put(key, api);
}
} else {
// We haven't seen this API before
latestPublishedAPIs.put(key, api);
}
} else { //If allow showing multiple versions of an API
multiVersionedAPIs.add(api);
}
}
tempLength++;
if (tempLength >= totalLength) {
break;
}
}
if (!displayMultipleVersions) {
apiSortedSet.addAll(latestPublishedAPIs.values());
result.put("apis", apiSortedSet);
result.put("totalLength", totalLength);
result.put("isMore", isMore);
return result;
} else {
apiVersionsSortedSet.addAll(multiVersionedAPIs);
result.put("apis", apiVersionsSortedSet);
result.put("totalLength", totalLength);
result.put("isMore", isMore);
return result;
}
}
} else {
String errorMessage = "Artifact manager is null for tenant domain " + tenantDomain
+ " when retrieving all paginated APIs by status.";
log.error(errorMessage);
}
} catch (RegistryException e) {
handleException("Failed to get all published APIs", e);
} catch (UserStoreException e) {
handleException("Failed to get all published APIs", e);
} finally {
PaginationContext.destroy();
}
result.put("apis", apiSortedSet);
result.put("totalLength", totalLength);
result.put("isMore", isMore);
return result;
}
/**
* The method to get APIs by given status to Store view
*
* @return Set<API> Set of APIs
* @throws APIManagementException
*/
@Override
@Deprecated
public Map<String, Object> getAllPaginatedAPIsByStatus(String tenantDomain,
int start, int end, final String apiStatus, boolean returnAPITags) throws APIManagementException {
try {
if (tenantDomain != null) {
PrivilegedCarbonContext.startTenantFlow();
PrivilegedCarbonContext.getThreadLocalCarbonContext().setTenantDomain(tenantDomain, true);
}
}finally {
endTenantFlow();
}
Boolean displayAPIsWithMultipleStatus = APIUtil.isAllowDisplayAPIsWithMultipleStatus();
Map<String, List<String>> listMap = new HashMap<String, List<String>>();
//Check the api-manager.xml config file entry <DisplayAllAPIs> value is false
if (APIConstants.PROTOTYPED.equals(apiStatus)) {
listMap.put(APIConstants.API_OVERVIEW_STATUS, new ArrayList<String>() {{
add(apiStatus);
}});
} else {
if (!displayAPIsWithMultipleStatus) {
//Create the search attribute map
listMap.put(APIConstants.API_OVERVIEW_STATUS, new ArrayList<String>() {{
add(apiStatus);
}});
} else {
return getAllPaginatedAPIs(tenantDomain, start, end);
}
}
Map<String,Object> result=new HashMap<String, Object>();
SortedSet<API> apiSortedSet = new TreeSet<API>(new APINameComparator());
SortedSet<API> apiVersionsSortedSet = new TreeSet<API>(new APIVersionComparator());
int totalLength=0;
boolean isMore = false;
try {
Registry userRegistry;
boolean isTenantMode=(tenantDomain != null);
if ((isTenantMode && this.tenantDomain==null) || (isTenantMode && isTenantDomainNotMatching(tenantDomain))) {//Tenant store anonymous mode
int tenantId = getTenantId(tenantDomain);
// explicitly load the tenant's registry
APIUtil.loadTenantRegistry(tenantId);
userRegistry = getGovernanceUserRegistry(tenantId);
setUsernameToThreadLocalCarbonContext(CarbonConstants.REGISTRY_ANONNYMOUS_USERNAME);
} else {
userRegistry = registry;
setUsernameToThreadLocalCarbonContext(this.username);
}
this.isTenantModeStoreView = isTenantMode;
this.requestedTenant = tenantDomain;
Map<String, API> latestPublishedAPIs = new HashMap<String, API>();
List<API> multiVersionedAPIs = new ArrayList<API>();
Comparator<API> versionComparator = new APIVersionComparator();
Boolean displayMultipleVersions = APIUtil.isAllowDisplayMultipleVersions();
String paginationLimit = getAPIManagerConfiguration()
.getFirstProperty(APIConstants.API_STORE_APIS_PER_PAGE);
// If the Config exists use it to set the pagination limit
final int maxPaginationLimit;
if (paginationLimit != null) {
// The additional 1 added to the maxPaginationLimit is to help us determine if more
// APIs may exist so that we know that we are unable to determine the actual total
// API count. We will subtract this 1 later on so that it does not interfere with
// the logic of the rest of the application
int pagination = Integer.parseInt(paginationLimit);
// Because the store jaggery pagination logic is 10 results per a page we need to set pagination
// limit to at least 11 or the pagination done at this level will conflict with the store pagination
// leading to some of the APIs not being displayed
if (pagination < 11) {
pagination = 11;
log.warn("Value of '" + APIConstants.API_STORE_APIS_PER_PAGE + "' is too low, defaulting to 11");
}
maxPaginationLimit = start + pagination + 1;
}
// Else if the config is not specified we go with default functionality and load all
else {
maxPaginationLimit = Integer.MAX_VALUE;
}
PaginationContext.init(start, end, "ASC", APIConstants.API_OVERVIEW_NAME, maxPaginationLimit);
GenericArtifactManager artifactManager = APIUtil.getArtifactManager(userRegistry, APIConstants.API_KEY);
if (artifactManager != null) {
GenericArtifact[] genericArtifacts = artifactManager.findGenericArtifacts(listMap);
totalLength=PaginationContext.getInstance().getLength();
if (genericArtifacts == null || genericArtifacts.length == 0) {
result.put("apis",apiSortedSet);
result.put("totalLength",totalLength);
result.put("isMore", isMore);
return result;
}
// Check to see if we can speculate that there are more APIs to be loaded
if (maxPaginationLimit == totalLength) {
isMore = true; // More APIs exist so we cannot determine the total API count without incurring a
// performance hit
--totalLength; // Remove the additional 1 we added earlier when setting max pagination limit
}
int tempLength=0;
for (GenericArtifact artifact : genericArtifacts) {
if (artifact == null) {
log.error("Failed to retrieve artifact when getting all paginated APIs by status.");
continue;
}
API api = null;
try {
api = APIUtil.getAPI(artifact);
} catch (APIManagementException e) {
//log and continue since we want to load the rest of the APIs.
log.error("Error while loading API " + artifact.getAttribute(APIConstants.API_OVERVIEW_NAME),
e);
}
if (api != null) {
if (returnAPITags) {
String artifactPath = GovernanceUtils.getArtifactPath(registry, artifact.getId());
Set<String> tags = new HashSet<String>();
org.wso2.carbon.registry.core.Tag[] tag = registry.getTags(artifactPath);
for (org.wso2.carbon.registry.core.Tag tag1 : tag) {
tags.add(tag1.getTagName());
}
api.addTags(tags);
}
String key;
//Check the configuration to allow showing multiple versions of an API true/false
if (!displayMultipleVersions) { //If allow only showing the latest version of an API
key = api.getId().getProviderName() + COLON_CHAR + api.getId().getApiName();
API existingAPI = latestPublishedAPIs.get(key);
if (existingAPI != null) {
// If we have already seen an API with the same name, make sure
// this one has a higher version number
if (versionComparator.compare(api, existingAPI) > 0) {
latestPublishedAPIs.put(key, api);
}
} else {
// We haven't seen this API before
latestPublishedAPIs.put(key, api);
}
} else { //If allow showing multiple versions of an API
multiVersionedAPIs.add(api);
}
}
tempLength++;
if (tempLength >= totalLength){
break;
}
}
if (!displayMultipleVersions) {
apiSortedSet.addAll(latestPublishedAPIs.values());
result.put("apis",apiSortedSet);
result.put("totalLength",totalLength);
result.put("isMore", isMore);
return result;
} else {
apiVersionsSortedSet.addAll(multiVersionedAPIs);
result.put("apis",apiVersionsSortedSet);
result.put("totalLength",totalLength);
result.put("isMore", isMore);
return result;
}
} else {
String errorMessage = "Artifact manager is null for tenant domain " + tenantDomain
+ " when retrieving APIs by status.";
log.error(errorMessage);
}
} catch (RegistryException e) {
handleException("Failed to get all published APIs", e);
} catch (UserStoreException e) {
handleException("Failed to get all published APIs", e);
} finally {
PaginationContext.destroy();
}
result.put("apis", apiSortedSet);
result.put("totalLength", totalLength);
result.put("isMore", isMore);
return result;
}
/**
* Re-generates the access token.
* @param oldAccessToken Token to be revoked
* @param clientId Consumer Key for the Application
* @param clientSecret Consumer Secret for the Application
* @param validityTime Desired Validity time for the token
* @param jsonInput Additional parameters if Authorization server needs any.
* @return Renewed Access Token.
* @throws APIManagementException
*/
@Override
public AccessTokenInfo renewAccessToken(String oldAccessToken, String clientId, String clientSecret,
String validityTime, String
requestedScopes[], String jsonInput) throws APIManagementException {
// Create Token Request with parameters provided from UI.
AccessTokenRequest tokenRequest = new AccessTokenRequest();
tokenRequest.setClientId(clientId);
tokenRequest.setClientSecret(clientSecret);
tokenRequest.setValidityPeriod(Long.parseLong(validityTime));
tokenRequest.setTokenToRevoke(oldAccessToken);
tokenRequest.setScope(requestedScopes);
try {
// Populating additional parameters.
tokenRequest = ApplicationUtils.populateTokenRequest(jsonInput, tokenRequest);
KeyManager keyManager = KeyManagerHolder.getKeyManagerInstance();
JSONObject appLogObject = new JSONObject();
appLogObject.put("Re-Generated Keys for application with client Id", clientId);
APIUtil.logAuditMessage(APIConstants.AuditLogConstants.APPLICATION, appLogObject.toString(),
APIConstants.AuditLogConstants.UPDATED, this.username);
return keyManager.getNewApplicationAccessToken(tokenRequest);
} catch (APIManagementException e) {
log.error("Error while re-generating AccessToken", e);
throw e;
}
}
@Override
public String generateApiKey(Application application, String userName, long validityPeriod) throws APIManagementException {
JwtTokenInfoDTO jwtTokenInfoDTO = APIUtil.getJwtTokenInfoDTO(application, userName,
MultitenantUtils.getTenantDomain(userName));
ApplicationDTO applicationDTO = new ApplicationDTO();
applicationDTO.setId(application.getId());
applicationDTO.setName(application.getName());
applicationDTO.setOwner(application.getOwner());
applicationDTO.setTier(application.getTier());
applicationDTO.setUuid(application.getUUID());
jwtTokenInfoDTO.setApplication(applicationDTO);
jwtTokenInfoDTO.setSubscriber(userName);
jwtTokenInfoDTO.setExpirationTime(validityPeriod);
jwtTokenInfoDTO.setKeyType(application.getKeyType());
return ApiKeyGenerator.generateToken(jwtTokenInfoDTO);
}
/**
* The method to get All PUBLISHED and DEPRECATED APIs, to Store view
*
* @return Set<API> Set of APIs
* @throws APIManagementException
*/
@Deprecated
public Map<String,Object> getAllPaginatedAPIs(String tenantDomain,int start,int end) throws APIManagementException {
Map<String,Object> result=new HashMap<String, Object>();
SortedSet<API> apiSortedSet = new TreeSet<API>(new APINameComparator());
SortedSet<API> apiVersionsSortedSet = new TreeSet<API>(new APIVersionComparator());
int totalLength=0;
try {
Registry userRegistry;
boolean isTenantMode=(tenantDomain != null);
if ((isTenantMode && this.tenantDomain==null) || (isTenantMode && isTenantDomainNotMatching(tenantDomain))) {//Tenant store anonymous mode
int tenantId = getTenantId(tenantDomain);
userRegistry = getGovernanceUserRegistry(tenantId);
setUsernameToThreadLocalCarbonContext(CarbonConstants.REGISTRY_ANONNYMOUS_USERNAME);
} else {
userRegistry = registry;
setUsernameToThreadLocalCarbonContext(this.username);
}
this.isTenantModeStoreView = isTenantMode;
this.requestedTenant = tenantDomain;
Map<String, API> latestPublishedAPIs = new HashMap<String, API>();
List<API> multiVersionedAPIs = new ArrayList<API>();
Comparator<API> versionComparator = new APIVersionComparator();
Boolean displayMultipleVersions = APIUtil.isAllowDisplayMultipleVersions();
GenericArtifactManager artifactManager = APIUtil.getArtifactManager(userRegistry, APIConstants.API_KEY);
PaginationContext.init(start, end, "ASC", APIConstants.API_OVERVIEW_NAME, Integer.MAX_VALUE);
boolean noPublishedAPIs = false;
if (artifactManager != null) {
//Create the search attribute map for PUBLISHED APIs
Map<String, List<String>> listMap = new HashMap<String, List<String>>();
listMap.put(APIConstants.API_OVERVIEW_STATUS, new ArrayList<String>() {{
add(APIConstants.PUBLISHED);
}});
GenericArtifact[] genericArtifacts = artifactManager.findGenericArtifacts(listMap);
totalLength = PaginationContext.getInstance().getLength();
if (genericArtifacts == null || genericArtifacts.length == 0) {
noPublishedAPIs = true;
}
int publishedAPICount;
if (genericArtifacts != null) {
for (GenericArtifact artifact : genericArtifacts) {
if (artifact == null) {
log.error("Failed to retrieve artifact when getting all paginated APIs.");
continue;
}
// adding the API provider can mark the latest API .
// String status = artifact.getAttribute(APIConstants.API_OVERVIEW_STATUS);
API api = APIUtil.getAPI(artifact);
if (api != null) {
String key;
//Check the configuration to allow showing multiple versions of an API true/false
if (!displayMultipleVersions) { //If allow only showing the latest version of an API
key = api.getId().getProviderName() + COLON_CHAR + api.getId().getApiName();
API existingAPI = latestPublishedAPIs.get(key);
if (existingAPI != null) {
// If we have already seen an API with the same name, make sure
// this one has a higher version number
if (versionComparator.compare(api, existingAPI) > 0) {
latestPublishedAPIs.put(key, api);
}
} else {
// We haven't seen this API before
latestPublishedAPIs.put(key, api);
}
} else { //If allow showing multiple versions of an API
// key = api.getId().getProviderName() + ":" + api.getId().getApiName() + ":" + api.getId()
// .getVersion();
multiVersionedAPIs.add(api);
}
}
}
}
if (!displayMultipleVersions) {
publishedAPICount = latestPublishedAPIs.size();
} else {
publishedAPICount = multiVersionedAPIs.size();
}
if ((start + end) > publishedAPICount) {
if (publishedAPICount > 0) {
/*Starting to retrieve DEPRECATED APIs*/
start = 0;
/* publishedAPICount is always less than end*/
end = end - publishedAPICount;
} else {
start = start - totalLength;
}
PaginationContext.init(start, end, "ASC", APIConstants.API_OVERVIEW_NAME, Integer.MAX_VALUE);
//Create the search attribute map for DEPRECATED APIs
Map<String, List<String>> listMapForDeprecatedAPIs = new HashMap<String, List<String>>();
listMapForDeprecatedAPIs.put(APIConstants.API_OVERVIEW_STATUS, new ArrayList<String>() {{
add(APIConstants.DEPRECATED);
}});
GenericArtifact[] genericArtifactsForDeprecatedAPIs = artifactManager.findGenericArtifacts(listMapForDeprecatedAPIs);
totalLength = totalLength + PaginationContext.getInstance().getLength();
if ((genericArtifactsForDeprecatedAPIs == null || genericArtifactsForDeprecatedAPIs.length == 0) && noPublishedAPIs) {
result.put("apis",apiSortedSet);
result.put("totalLength",totalLength);
return result;
}
if (genericArtifactsForDeprecatedAPIs != null) {
for (GenericArtifact artifact : genericArtifactsForDeprecatedAPIs) {
if (artifact == null) {
log.error("Failed to retrieve artifact when getting deprecated APIs.");
continue;
}
// adding the API provider can mark the latest API .
API api = APIUtil.getAPI(artifact);
if (api != null) {
String key;
//Check the configuration to allow showing multiple versions of an API true/false
if (!displayMultipleVersions) { //If allow only showing the latest version of an API
key = api.getId().getProviderName() + COLON_CHAR + api.getId().getApiName();
API existingAPI = latestPublishedAPIs.get(key);
if (existingAPI != null) {
// If we have already seen an API with the same name, make sure
// this one has a higher version number
if (versionComparator.compare(api, existingAPI) > 0) {
latestPublishedAPIs.put(key, api);
}
} else {
// We haven't seen this API before
latestPublishedAPIs.put(key, api);
}
} else { //If allow showing multiple versions of an API
multiVersionedAPIs.add(api);
}
}
}
}
}
if (!displayMultipleVersions) {
for (API api : latestPublishedAPIs.values()) {
apiSortedSet.add(api);
}
result.put("apis",apiSortedSet);
result.put("totalLength",totalLength);
return result;
} else {
apiVersionsSortedSet.addAll(multiVersionedAPIs);
result.put("apis",apiVersionsSortedSet);
result.put("totalLength",totalLength);
return result;
}
} else {
String errorMessage = "Artifact manager is null for tenant domain " + tenantDomain
+ " when retrieving all paginated APIs.";
log.error(errorMessage);
}
} catch (RegistryException e) {
handleException("Failed to get all published APIs", e);
} catch (UserStoreException e) {
handleException("Failed to get all published APIs", e);
}finally {
PaginationContext.destroy();
}
result.put("apis", apiSortedSet);
result.put("totalLength", totalLength);
return result;
}
@Override
public Set<API> getTopRatedAPIs(int limit) throws APIManagementException {
int returnLimit = 0;
SortedSet<API> apiSortedSet = new TreeSet<API>(new APINameComparator());
try {
GenericArtifactManager artifactManager = APIUtil.getArtifactManager(registry, APIConstants.API_KEY);
if (artifactManager == null) {
String errorMessage = "Artifact manager is null when retrieving top rated APIs.";
log.error(errorMessage);
throw new APIManagementException(errorMessage);
}
GenericArtifact[] genericArtifacts = artifactManager.getAllGenericArtifacts();
if (genericArtifacts == null || genericArtifacts.length == 0) {
return apiSortedSet;
}
for (GenericArtifact genericArtifact : genericArtifacts) {
String status = APIUtil.getLcStateFromArtifact(genericArtifact);
if (APIConstants.PUBLISHED.equals(status)) {
String artifactPath = genericArtifact.getPath();
float rating = registry.getAverageRating(artifactPath);
if (rating > APIConstants.TOP_TATE_MARGIN && (returnLimit < limit)) {
returnLimit++;
API api = APIUtil.getAPI(genericArtifact, registry);
if (api != null) {
apiSortedSet.add(api);
}
}
}
}
} catch (RegistryException e) {
handleException("Failed to get top rated API", e);
}
return apiSortedSet;
}
/**
* Get the recently added APIs set
*
* @param limit no limit. Return everything else, limit the return list to specified value.
* @return Set<API>
* @throws APIManagementException
*/
@Override
public Set<API> getRecentlyAddedAPIs(int limit, String tenantDomain)
throws APIManagementException {
SortedSet<API> recentlyAddedAPIs = new TreeSet<API>(new APINameComparator());
SortedSet<API> recentlyAddedAPIsWithMultipleVersions = new TreeSet<API>(new APIVersionComparator());
Registry userRegistry;
APIManagerConfiguration config = getAPIManagerConfiguration();
boolean isRecentlyAddedAPICacheEnabled =
Boolean.parseBoolean(config.getFirstProperty(APIConstants.API_STORE_RECENTLY_ADDED_API_CACHE_ENABLE));
PrivilegedCarbonContext.startTenantFlow();
boolean isTenantFlowStarted ;
if (tenantDomain != null && !MultitenantConstants.SUPER_TENANT_DOMAIN_NAME.equals(tenantDomain)) {
PrivilegedCarbonContext.getThreadLocalCarbonContext().setTenantDomain(tenantDomain, true);
isTenantFlowStarted = true;
} else {
PrivilegedCarbonContext.getThreadLocalCarbonContext().setTenantDomain(MultitenantConstants.SUPER_TENANT_DOMAIN_NAME, true);
isTenantFlowStarted = true;
}
try {
boolean isTenantMode = (tenantDomain != null);
if ((isTenantMode && this.tenantDomain == null) || (isTenantMode && isTenantDomainNotMatching(tenantDomain))) {//Tenant based store anonymous mode
int tenantId = getTenantId(tenantDomain);
// explicitly load the tenant's registry
APIUtil.loadTenantRegistry(tenantId);
setUsernameToThreadLocalCarbonContext(CarbonConstants.REGISTRY_ANONNYMOUS_USERNAME);
isTenantFlowStarted = true;
userRegistry = getGovernanceUserRegistry(tenantId);
} else {
userRegistry = registry;
setUsernameToThreadLocalCarbonContext(this.username);
isTenantFlowStarted = true;
}
if (isRecentlyAddedAPICacheEnabled) {
boolean isStatusChanged = false;
Set<API> recentlyAddedAPI = (Set<API>) Caching.getCacheManager(APIConstants.API_MANAGER_CACHE_MANAGER)
.getCache(APIConstants.RECENTLY_ADDED_API_CACHE_NAME).get(username + COLON_CHAR + tenantDomain);
if (recentlyAddedAPI != null) {
for (API api : recentlyAddedAPI) {
try {
if (!APIConstants.PUBLISHED.equalsIgnoreCase(userRegistry.get(APIUtil.getAPIPath(api.getId())).getProperty(APIConstants.API_STATUS))) {
isStatusChanged = true;
break;
}
} catch (Exception ex) {
log.error("Error while checking API status for APP " + api.getId().getApiName() + '-' +
api.getId().getVersion(), ex);
}
}
if (!isStatusChanged) {
return recentlyAddedAPI;
}
}
}
PaginationContext.init(0, limit, APIConstants.REGISTRY_ARTIFACT_SEARCH_DESC_ORDER,
APIConstants.CREATED_DATE, Integer.MAX_VALUE);
Map<String, List<String>> listMap = new HashMap<String, List<String>>();
listMap.put(APIConstants.API_OVERVIEW_STATUS, new ArrayList<String>() {{
add(APIConstants.PUBLISHED);
}});
listMap.put(APIConstants.STORE_VIEW_ROLES, getUserRoleList());
String searchCriteria = APIConstants.LCSTATE_SEARCH_KEY + "= (" + APIConstants.PUBLISHED + ")";
//Find UUID
GenericArtifactManager artifactManager = APIUtil.getArtifactManager(userRegistry, APIConstants.API_KEY);
if (artifactManager != null) {
GenericArtifact[] genericArtifacts = artifactManager.findGovernanceArtifacts(getSearchQuery(searchCriteria));
SortedSet<API> allAPIs = new TreeSet<API>(new APINameComparator());
for (GenericArtifact artifact : genericArtifacts) {
API api = null;
try {
api = APIUtil.getAPI(artifact);
} catch (APIManagementException e) {
//just log and continue since we want to go through the other APIs as well.
log.error("Error loading API " + artifact.getAttribute(APIConstants.API_OVERVIEW_NAME), e);
}
if (api != null) {
allAPIs.add(api);
}
}
if (!APIUtil.isAllowDisplayMultipleVersions()) {
Map<String, API> latestPublishedAPIs = new HashMap<String, API>();
Comparator<API> versionComparator = new APIVersionComparator();
String key;
for (API api : allAPIs) {
key = api.getId().getProviderName() + COLON_CHAR + api.getId().getApiName();
API existingAPI = latestPublishedAPIs.get(key);
if (existingAPI != null) {
// If we have already seen an API with the same
// name, make sure this one has a higher version
// number
if (versionComparator.compare(api, existingAPI) > 0) {
latestPublishedAPIs.put(key, api);
}
} else {
// We haven't seen this API before
latestPublishedAPIs.put(key, api);
}
}
recentlyAddedAPIs.addAll(latestPublishedAPIs.values());
if (isRecentlyAddedAPICacheEnabled) {
Caching.getCacheManager(APIConstants.API_MANAGER_CACHE_MANAGER)
.getCache(APIConstants.RECENTLY_ADDED_API_CACHE_NAME)
.put(username + COLON_CHAR + tenantDomain, allAPIs);
}
return recentlyAddedAPIs;
} else {
recentlyAddedAPIsWithMultipleVersions.addAll(allAPIs);
if (isRecentlyAddedAPICacheEnabled) {
Caching.getCacheManager(APIConstants.API_MANAGER_CACHE_MANAGER)
.getCache(APIConstants.RECENTLY_ADDED_API_CACHE_NAME)
.put(username + COLON_CHAR + tenantDomain, allAPIs);
}
return recentlyAddedAPIsWithMultipleVersions;
}
} else {
String errorMessage = "Artifact manager is null when retrieving recently added APIs for tenant domain "
+ tenantDomain;
log.error(errorMessage);
}
} catch (RegistryException e) {
handleException("Failed to get all published APIs", e);
} catch (UserStoreException e) {
handleException("Failed to get all published APIs", e);
} finally {
PaginationContext.destroy();
if (isTenantFlowStarted) {
endTenantFlow();
}
}
return recentlyAddedAPIs;
}
@Override
public Set<Tag> getAllTags(String requestedTenantDomain) throws APIManagementException {
this.isTenantModeStoreView = (requestedTenantDomain != null);
if(requestedTenantDomain != null){
this.requestedTenant = requestedTenantDomain;
}
/* We keep track of the lastUpdatedTime of the TagCache to determine its freshness.
*/
long lastUpdatedTimeAtStart = lastUpdatedTime;
long currentTimeAtStart = System.currentTimeMillis();
if(isTagCacheEnabled && ( (currentTimeAtStart- lastUpdatedTimeAtStart) < tagCacheValidityTime)){
if(tagSet != null){
return tagSet;
}
}
TreeSet<Tag> tempTagSet = new TreeSet<Tag>(new Comparator<Tag>() {
@Override
public int compare(Tag o1, Tag o2) {
return o1.getName().compareTo(o2.getName());
}
});
Registry userRegistry = null;
boolean isTenantFlowStarted = false;
String tagsQueryPath = null;
try {
tagsQueryPath = RegistryConstants.QUERIES_COLLECTION_PATH + "/tag-summary";
Map<String, String> params = new HashMap<String, String>();
params.put(RegistryConstants.RESULT_TYPE_PROPERTY_NAME, RegistryConstants.TAG_SUMMARY_RESULT_TYPE);
//as a tenant, I'm browsing my own Store or I'm browsing a Store of another tenant..
if ((this.isTenantModeStoreView && this.tenantDomain==null) || (this.isTenantModeStoreView && isTenantDomainNotMatching(requestedTenantDomain))) {//Tenant based store anonymous mode
int tenantId = getTenantId(this.requestedTenant);
userRegistry = ServiceReferenceHolder.getInstance().getRegistryService().
getGovernanceUserRegistry(CarbonConstants.REGISTRY_ANONNYMOUS_USERNAME, tenantId);
} else {
userRegistry = registry;
}
Map<String, Tag> tagsData = new HashMap<String, Tag>();
try {
PrivilegedCarbonContext.getThreadLocalCarbonContext().setUsername(((UserRegistry)userRegistry).getUserName());
if (requestedTenant != null ) {
isTenantFlowStarted = startTenantFlowForTenantDomain(requestedTenant);
PrivilegedCarbonContext.getThreadLocalCarbonContext().setUsername(((UserRegistry)userRegistry).getUserName());
}
Map <String, List<String>> criteriaPublished = new HashMap<String, List<String>>();
criteriaPublished.put(APIConstants.LCSTATE_SEARCH_KEY, new ArrayList<String>() {{
add(APIConstants.PUBLISHED);
}});
//rxt api media type
List<TermData> termsPublished = GovernanceUtils
.getTermDataList(criteriaPublished, APIConstants.API_OVERVIEW_TAG,
APIConstants.API_RXT_MEDIA_TYPE, true);
if(termsPublished != null){
for(TermData data : termsPublished){
tempTagSet.add(new Tag(data.getTerm(), (int)data.getFrequency()));
}
}
Map<String, List<String>> criteriaPrototyped = new HashMap<String, List<String>>();
criteriaPrototyped.put(APIConstants.LCSTATE_SEARCH_KEY, new ArrayList<String>() {{
add(APIConstants.PROTOTYPED);
}});
//rxt api media type
List<TermData> termsPrototyped = GovernanceUtils
.getTermDataList(criteriaPrototyped, APIConstants.API_OVERVIEW_TAG,
APIConstants.API_RXT_MEDIA_TYPE, true);
if(termsPrototyped != null){
for(TermData data : termsPrototyped){
tempTagSet.add(new Tag(data.getTerm(), (int)data.getFrequency()));
}
}
} finally {
if (isTenantFlowStarted) {
endTenantFlow();
}
}
synchronized (tagCacheMutex) {
lastUpdatedTime = System.currentTimeMillis();
this.tagSet = tempTagSet;
}
} catch (RegistryException e) {
try {
//Before a tenant login to the store or publisher at least one time,
//a registry exception is thrown when the tenant store is accessed in anonymous mode.
//This fix checks whether query resource available in the registry. If not
// give a warn.
if (userRegistry != null && !userRegistry.resourceExists(tagsQueryPath)) {
log.warn("Failed to retrieve tags query resource at " + tagsQueryPath);
return tagSet == null ? Collections.EMPTY_SET : tagSet;
}
} catch (RegistryException e1) {
// Even if we should ignore this exception, we are logging this as a warn log.
// The reason is that, this error happens when we try to add some additional logs in an error
// scenario and it does not affect the execution path.
log.warn("Unable to execute the resource exist method for tags query resource path : " + tagsQueryPath,
e1);
}
handleException("Failed to get all the tags", e);
} catch (UserStoreException e) {
handleException("Failed to get all the tags", e);
}
return tagSet;
}
@Override
public Set<Tag> getTagsWithAttributes(String tenantDomain) throws APIManagementException {
// Fetch the all the tags first.
Set<Tag> tags = getAllTags(tenantDomain);
// For each and every tag get additional attributes from the registry.
String descriptionPathPattern = APIConstants.TAGS_INFO_ROOT_LOCATION + "/%s/description.txt";
String thumbnailPathPattern = APIConstants.TAGS_INFO_ROOT_LOCATION + "/%s/thumbnail.png";
//if the tenantDomain is not specified super tenant domain is used
if (StringUtils.isBlank(tenantDomain)) {
try {
tenantDomain = ServiceReferenceHolder.getInstance().getRealmService().getTenantManager().getSuperTenantDomain();
} catch (org.wso2.carbon.user.core.UserStoreException e) {
handleException("Cannot get super tenant domain name", e);
}
}
//get the registry instance related to the tenant domain
UserRegistry govRegistry = null;
try {
int tenantId = getTenantId(tenantDomain);
RegistryService registryService = ServiceReferenceHolder.getInstance().getRegistryService();
govRegistry = registryService.getGovernanceSystemRegistry(tenantId);
} catch (UserStoreException e) {
handleException("Cannot get tenant id for tenant domain name:" + tenantDomain, e);
} catch (RegistryException e) {
handleException("Cannot get registry for tenant domain name:" + tenantDomain, e);
}
if (govRegistry != null) {
for (Tag tag : tags) {
// Get the description.
Resource descriptionResource = null;
String descriptionPath = String.format(descriptionPathPattern, tag.getName());
try {
if (govRegistry.resourceExists(descriptionPath)) {
descriptionResource = govRegistry.get(descriptionPath);
}
} catch (RegistryException e) {
//warn and proceed to the next tag
log.warn(String.format("Error while querying the existence of the description for the tag '%s'",
tag.getName()), e);
}
// The resource is assumed to be a byte array since its the content
// of a text file.
if (descriptionResource != null) {
try {
String description = new String((byte[]) descriptionResource.getContent(),
Charset.defaultCharset());
tag.setDescription(description);
} catch (ClassCastException e) {
//added warnings as it can then proceed to load rest of resources/tags
log.warn(String.format("Cannot cast content of %s to byte[]", descriptionPath), e);
} catch (RegistryException e) {
//added warnings as it can then proceed to load rest of resources/tags
log.warn(String.format("Cannot read content of %s", descriptionPath), e);
}
}
// Checks whether the thumbnail exists.
String thumbnailPath = String.format(thumbnailPathPattern, tag.getName());
try {
boolean isThumbnailExists = govRegistry.resourceExists(thumbnailPath);
tag.setThumbnailExists(isThumbnailExists);
if (isThumbnailExists) {
tag.setThumbnailUrl(APIUtil.getRegistryResourcePathForUI(
APIConstants.RegistryResourceTypesForUI.TAG_THUMBNAIL, tenantDomain, thumbnailPath));
}
} catch (RegistryException e) {
//warn and then proceed to load rest of tags
log.warn(String.format("Error while querying the existence of %s", thumbnailPath), e);
}
}
}
return tags;
}
@Override
public void rateAPI(Identifier id, APIRating rating, String user) throws APIManagementException {
apiMgtDAO.addRating(id, rating.getRating(), user);
}
@Override
public void removeAPIRating(Identifier id, String user) throws APIManagementException {
apiMgtDAO.removeAPIRating(id, user);
}
@Override
public int getUserRating(Identifier apiId, String user) throws APIManagementException {
return apiMgtDAO.getUserRating(apiId, user);
}
@Override
public JSONObject getUserRatingInfo(Identifier id, String user) throws APIManagementException {
JSONObject obj = apiMgtDAO.getUserRatingInfo(id, user);
if (obj == null || obj.isEmpty()) {
String msg = "Failed to get API ratings for API " + id.getName() + " for user " + user;
log.error(msg);
throw new APIMgtResourceNotFoundException(msg);
}
return obj;
}
@Override
public JSONArray getAPIRatings(Identifier apiId) throws APIManagementException {
return apiMgtDAO.getAPIRatings(apiId);
}
@Override
public float getAverageAPIRating(Identifier apiId) throws APIManagementException {
return apiMgtDAO.getAverageRating(apiId);
}
@Override
public Set<API> getPublishedAPIsByProvider(String providerId, int limit)
throws APIManagementException {
SortedSet<API> apiSortedSet = new TreeSet<API>(new APINameComparator());
SortedSet<API> apiVersionsSortedSet = new TreeSet<API>(new APIVersionComparator());
try {
Map<String, API> latestPublishedAPIs = new HashMap<String, API>();
List<API> multiVersionedAPIs = new ArrayList<API>();
Comparator<API> versionComparator = new APIVersionComparator();
Boolean displayMultipleVersions = APIUtil.isAllowDisplayMultipleVersions();
Boolean displayAPIsWithMultipleStatus = APIUtil.isAllowDisplayAPIsWithMultipleStatus();
String providerPath = APIConstants.API_ROOT_LOCATION + RegistryConstants.PATH_SEPARATOR + providerId;
GenericArtifactManager artifactManager = APIUtil.getArtifactManager(registry, APIConstants.API_KEY);
if (artifactManager == null) {
String errorMessage =
"Artifact manager is null when retrieving published APIs by provider ID " + providerId;
log.error(errorMessage);
throw new APIManagementException(errorMessage);
}
Association[] associations = registry.getAssociations(providerPath, APIConstants.PROVIDER_ASSOCIATION);
if (associations.length < limit || limit == -1) {
limit = associations.length;
}
for (int i = 0; i < limit; i++) {
Association association = associations[i];
String apiPath = association.getDestinationPath();
Resource resource = registry.get(apiPath);
String apiArtifactId = resource.getUUID();
if (apiArtifactId != null) {
GenericArtifact artifact = artifactManager.getGenericArtifact(apiArtifactId);
// check the API status
String status = APIUtil.getLcStateFromArtifact(artifact);
API api = null;
//Check the api-manager.xml config file entry <DisplayAllAPIs> value is false
if (!displayAPIsWithMultipleStatus) {
// then we are only interested in published APIs here...
if (APIConstants.PUBLISHED.equals(status)) {
api = APIUtil.getAPI(artifact);
}
} else { // else we are interested in both deprecated/published APIs here...
if (APIConstants.PUBLISHED.equals(status) || APIConstants.DEPRECATED.equals(status)) {
api = APIUtil.getAPI(artifact);
}
}
if (api != null) {
String key;
//Check the configuration to allow showing multiple versions of an API true/false
if (!displayMultipleVersions) { //If allow only showing the latest version of an API
key = api.getId().getProviderName() + COLON_CHAR + api.getId().getApiName();
API existingAPI = latestPublishedAPIs.get(key);
if (existingAPI != null) {
// If we have already seen an API with the same name, make sure
// this one has a higher version number
if (versionComparator.compare(api, existingAPI) > 0) {
latestPublishedAPIs.put(key, api);
}
} else {
// We haven't seen this API before
latestPublishedAPIs.put(key, api);
}
} else { //If allow showing multiple versions of an API
multiVersionedAPIs.add(api);
}
}
} else {
throw new GovernanceException("artifact id is null of " + apiPath);
}
}
if (!displayMultipleVersions) {
apiSortedSet.addAll(latestPublishedAPIs.values());
return apiSortedSet;
} else {
apiVersionsSortedSet.addAll(multiVersionedAPIs);
return apiVersionsSortedSet;
}
} catch (RegistryException e) {
handleException("Failed to get Published APIs for provider : " + providerId, e);
}
return null;
}
@Override
public Set<API> getPublishedAPIsByProvider(String providerId, String loggedUsername, int limit, String apiOwner,
String apiBizOwner) throws APIManagementException {
try {
Boolean allowMultipleVersions = APIUtil.isAllowDisplayMultipleVersions();
Boolean showAllAPIs = APIUtil.isAllowDisplayAPIsWithMultipleStatus();
String providerDomain = MultitenantUtils.getTenantDomain(APIUtil.replaceEmailDomainBack(providerId));
int tenantId = getTenantId(providerDomain);
final Registry registry = ServiceReferenceHolder.getInstance().
getRegistryService().getGovernanceSystemRegistry(tenantId);
GenericArtifactManager artifactManager = APIUtil.getArtifactManager(registry,
APIConstants.API_KEY);
if (artifactManager == null) {
String errorMessage =
"Artifact manager is null when retrieving all published APIs by provider ID " + providerId;
log.error(errorMessage);
throw new APIManagementException(errorMessage);
}
int publishedAPICount = 0;
Map<String, API> apiCollection = new HashMap<String, API>();
if(apiBizOwner != null && !apiBizOwner.isEmpty()){
try {
final String bizOwner = apiBizOwner;
Map<String, List<String>> listMap = new HashMap<String, List<String>>();
listMap.put(APIConstants.API_OVERVIEW_BUSS_OWNER, new ArrayList<String>() {{
add(bizOwner);
}});
PrivilegedCarbonContext.getThreadLocalCarbonContext().setUsername(this.username);
GenericArtifact[] genericArtifacts = artifactManager.findGenericArtifacts(listMap);
if(genericArtifacts != null && genericArtifacts.length > 0){
for(GenericArtifact artifact : genericArtifacts){
if (publishedAPICount >= limit) {
break;
}
if(isCandidateAPI(artifact.getPath(), loggedUsername, artifactManager, tenantId, showAllAPIs,
allowMultipleVersions, apiOwner, providerId, registry, apiCollection)){
publishedAPICount += 1;
}
}
}
} catch (GovernanceException e) {
log.error("Error while finding APIs by business owner " + apiBizOwner, e);
return null;
}
}
else{
String providerPath = APIConstants.API_ROOT_LOCATION + RegistryConstants.PATH_SEPARATOR + providerId;
Association[] associations = registry.getAssociations(providerPath, APIConstants.PROVIDER_ASSOCIATION);
for (Association association : associations) {
if (publishedAPICount >= limit) {
break;
}
String apiPath = association.getDestinationPath();
if(isCandidateAPI(apiPath, loggedUsername, artifactManager, tenantId, showAllAPIs,
allowMultipleVersions, apiOwner, providerId, registry, apiCollection)){
publishedAPICount += 1;
}
}
}
return new HashSet<API>(apiCollection.values());
} catch (RegistryException e) {
handleException("Failed to get Published APIs for provider : " + providerId, e);
return null;
} catch (org.wso2.carbon.user.core.UserStoreException e) {
handleException("Failed to get Published APIs for provider : " + providerId, e);
return null;
} catch (UserStoreException e) {
handleException("Failed to get Published APIs for provider : " + providerId, e);
return null;
}
}
private boolean isCandidateAPI(String apiPath, String loggedUsername, GenericArtifactManager artifactManager,
int tenantId, boolean showAllAPIs, boolean allowMultipleVersions,
String apiOwner, String providerId, Registry registry, Map<String, API> apiCollection)
throws UserStoreException, RegistryException, APIManagementException {
AuthorizationManager manager = ServiceReferenceHolder.getInstance().getRealmService().
getTenantUserRealm(tenantId).getAuthorizationManager();
Comparator<API> versionComparator = new APIVersionComparator();
Resource resource;
String path = RegistryUtils.getAbsolutePath(RegistryContext.getBaseInstance(),
APIUtil.getMountedPath(RegistryContext.getBaseInstance(),
RegistryConstants.GOVERNANCE_REGISTRY_BASE_PATH) +
apiPath);
boolean checkAuthorized;
String userNameWithoutDomain = loggedUsername;
if (!loggedUsername.isEmpty() && !MultitenantConstants.SUPER_TENANT_DOMAIN_NAME.equals(super.tenantDomain)) {
String[] nameParts = loggedUsername.split("@");
userNameWithoutDomain = nameParts[0];
}
int loggedInUserTenantDomain = -1;
if(!StringUtils.isEmpty(loggedUsername)) {
loggedInUserTenantDomain = APIUtil.getTenantId(loggedUsername);
}
if (loggedUsername.isEmpty()) {
// Anonymous user is viewing.
checkAuthorized = manager.isRoleAuthorized(APIConstants.ANONYMOUS_ROLE, path, ActionConstants.GET);
} else if (tenantId != loggedInUserTenantDomain) {
//Cross tenant scenario
providerId = APIUtil.replaceEmailDomainBack(providerId);
String[] nameParts = providerId.split("@");
String provideNameWithoutDomain = nameParts[0];
checkAuthorized = manager.isUserAuthorized(provideNameWithoutDomain, path, ActionConstants.GET);
} else {
// Some user is logged in also user and api provider tenant domain are same.
checkAuthorized = manager.isUserAuthorized(userNameWithoutDomain, path, ActionConstants.GET);
}
String apiArtifactId = null;
if (checkAuthorized) {
resource = registry.get(apiPath);
apiArtifactId = resource.getUUID();
}
if (apiArtifactId != null) {
GenericArtifact artifact = artifactManager.getGenericArtifact(apiArtifactId);
// check the API status
String status = APIUtil.getLcStateFromArtifact(artifact);
API api = null;
//Check the api-manager.xml config file entry <DisplayAllAPIs> value is false
if (!showAllAPIs) {
// then we are only interested in published APIs here...
if (APIConstants.PUBLISHED.equals(status)) {
api = APIUtil.getAPI(artifact);
}
} else { // else we are interested in both deprecated/published APIs here...
if (APIConstants.PUBLISHED.equals(status) || APIConstants.DEPRECATED.equals(status)) {
api = APIUtil.getAPI(artifact);
}
}
if (api != null) {
String apiVisibility = api.getVisibility();
if(!StringUtils.isEmpty(apiVisibility) && !APIConstants.API_GLOBAL_VISIBILITY.equalsIgnoreCase(apiVisibility)) {
String providerDomain = MultitenantUtils.getTenantDomain(APIUtil.replaceEmailDomainBack(providerId));
String loginUserDomain = MultitenantUtils.getTenantDomain(loggedUsername);
if(!StringUtils.isEmpty(providerDomain) && !StringUtils.isEmpty(loginUserDomain)
&& !providerDomain.equals(loginUserDomain)){
return false;
}
}
// apiOwner is the value coming from front end and compared against the API instance
if (apiOwner != null && !apiOwner.isEmpty()) {
if (APIUtil.replaceEmailDomainBack(providerId).equals(APIUtil.replaceEmailDomainBack(apiOwner)) &&
api.getApiOwner() != null && !api.getApiOwner().isEmpty() &&
!APIUtil.replaceEmailDomainBack(apiOwner)
.equals(APIUtil.replaceEmailDomainBack(api.getApiOwner()))) {
return false; // reject remote APIs when local admin user's API selected
} else if (!APIUtil.replaceEmailDomainBack(providerId).equals(APIUtil.replaceEmailDomainBack(apiOwner)) &&
!APIUtil.replaceEmailDomainBack(apiOwner)
.equals(APIUtil.replaceEmailDomainBack(api.getApiOwner()))) {
return false; // reject local admin's APIs when remote API selected
}
}
String key;
//Check the configuration to allow showing multiple versions of an API true/false
if (!allowMultipleVersions) { //If allow only showing the latest version of an API
key = api.getId().getProviderName() + COLON_CHAR + api.getId().getApiName();
API existingAPI = apiCollection.get(key);
if (existingAPI != null) {
// If we have already seen an API with the same name, make sure
// this one has a higher version number
if (versionComparator.compare(api, existingAPI) > 0) {
apiCollection.put(key, api);
return true;
}
} else {
// We haven't seen this API before
apiCollection.put(key, api);
return true;
}
} else { //If allow showing multiple versions of an API
key = api.getId().getProviderName() + COLON_CHAR + api.getId().getApiName() + COLON_CHAR + api.getId()
.getVersion();
//we're not really interested in the key, so generate one for the sake of adding this element to
//the map.
key = key + '_' + apiCollection.size();
apiCollection.put(key, api);
return true;
}
}
}
return false;
}
@Override
public Map<String,Object> searchPaginatedAPIs(String searchTerm, String searchType, String requestedTenantDomain,int start,int end, boolean isLazyLoad)
throws APIManagementException {
Map<String,Object> result = new HashMap<String,Object>();
boolean isTenantFlowStarted = false;
try {
boolean isTenantMode=(requestedTenantDomain != null);
if (isTenantMode && !org.wso2.carbon.base.MultitenantConstants.SUPER_TENANT_DOMAIN_NAME.equals(requestedTenantDomain)) {
isTenantFlowStarted = true;
PrivilegedCarbonContext.startTenantFlow();
PrivilegedCarbonContext.getThreadLocalCarbonContext().setTenantDomain(requestedTenantDomain, true);
} else {
requestedTenantDomain = org.wso2.carbon.base.MultitenantConstants.SUPER_TENANT_DOMAIN_NAME;
isTenantFlowStarted = true;
PrivilegedCarbonContext.startTenantFlow();
PrivilegedCarbonContext.getThreadLocalCarbonContext().setTenantDomain(requestedTenantDomain, true);
}
Registry userRegistry;
int tenantIDLocal = 0;
String userNameLocal = this.username;
if ((isTenantMode && this.tenantDomain==null) || (isTenantMode && isTenantDomainNotMatching(requestedTenantDomain))) {//Tenant store anonymous mode
tenantIDLocal = ServiceReferenceHolder.getInstance().getRealmService().getTenantManager()
.getTenantId(requestedTenantDomain);
userRegistry = ServiceReferenceHolder.getInstance().
getRegistryService().getGovernanceUserRegistry(CarbonConstants.REGISTRY_ANONNYMOUS_USERNAME, tenantIDLocal);
userNameLocal = CarbonConstants.REGISTRY_ANONNYMOUS_USERNAME;
} else {
userRegistry = this.registry;
tenantIDLocal = tenantId;
}
PrivilegedCarbonContext.getThreadLocalCarbonContext().setUsername(userNameLocal);
if (APIConstants.DOCUMENTATION_SEARCH_TYPE_PREFIX.equalsIgnoreCase(searchType)) {
Map<Documentation, API> apiDocMap =
APIUtil.searchAPIsByDoc(userRegistry, tenantIDLocal, userNameLocal, searchTerm,
APIConstants.STORE_CLIENT);
result.put("apis", apiDocMap);
/*Pagination for Document search results is not supported yet, hence length is sent as end-start*/
if (apiDocMap.isEmpty()) {
result.put("length", 0);
} else {
result.put("length", end-start);
}
}
else if ("subcontext".equalsIgnoreCase(searchType)) {
result = APIUtil.searchAPIsByURLPattern(userRegistry, searchTerm, start,end); ;
}else {
result=searchPaginatedAPIs(userRegistry, searchTerm, searchType,start,end,isLazyLoad);
}
} catch (Exception e) {
handleException("Failed to Search APIs", e);
} finally {
if (isTenantFlowStarted) {
PrivilegedCarbonContext.endTenantFlow();
}
}
return result;
}
@Override
public Map<String, Object> searchPaginatedAPIs(String searchQuery, String requestedTenantDomain, int start, int end,
boolean isLazyLoad) throws APIManagementException {
Map<String, Object> searchResults =
super.searchPaginatedAPIs(searchQuery, requestedTenantDomain, start, end, isLazyLoad);
return filterMultipleVersionedAPIs(searchResults);
}
/**
* Pagination API search based on solr indexing
*
* @param registry
* @param searchTerm
* @param searchType
* @return
* @throws APIManagementException
*/
public Map<String,Object> searchPaginatedAPIs(Registry registry, String searchTerm, String searchType,int start,int end, boolean limitAttributes) throws APIManagementException {
SortedSet<API> apiSet = new TreeSet<API>(new APINameComparator());
List<API> apiList = new ArrayList<API>();
searchTerm = searchTerm.trim();
Map<String,Object> result=new HashMap<String, Object>();
int totalLength=0;
boolean isMore = false;
String criteria=APIConstants.API_OVERVIEW_NAME;
try {
String paginationLimit = getAPIManagerConfiguration()
.getFirstProperty(APIConstants.API_STORE_APIS_PER_PAGE);
// If the Config exists use it to set the pagination limit
final int maxPaginationLimit;
if (paginationLimit != null) {
// The additional 1 added to the maxPaginationLimit is to help us determine if more
// APIs may exist so that we know that we are unable to determine the actual total
// API count. We will subtract this 1 later on so that it does not interfere with
// the logic of the rest of the application
int pagination = Integer.parseInt(paginationLimit);
// Because the store jaggery pagination logic is 10 results per a page we need to set pagination
// limit to at least 11 or the pagination done at this level will conflict with the store pagination
// leading to some of the APIs not being displayed
if (pagination < 11) {
pagination = 11;
log.warn("Value of '" + APIConstants.API_STORE_APIS_PER_PAGE + "' is too low, defaulting to 11");
}
maxPaginationLimit = start + pagination + 1;
}
// Else if the config is not specified we go with default functionality and load all
else {
maxPaginationLimit = Integer.MAX_VALUE;
}
GenericArtifactManager artifactManager = APIUtil.getArtifactManager(registry, APIConstants.API_KEY);
PaginationContext.init(start, end, "ASC", APIConstants.API_OVERVIEW_NAME, maxPaginationLimit);
if (artifactManager != null) {
if (APIConstants.API_PROVIDER.equalsIgnoreCase(searchType)) {
criteria = APIConstants.API_OVERVIEW_PROVIDER;
searchTerm = searchTerm.replaceAll("@", "-AT-");
} else if (APIConstants.API_VERSION_LABEL.equalsIgnoreCase(searchType)) {
criteria = APIConstants.API_OVERVIEW_VERSION;
} else if (APIConstants.API_CONTEXT.equalsIgnoreCase(searchType)) {
criteria = APIConstants.API_OVERVIEW_CONTEXT;
} else if (APIConstants.API_DESCRIPTION.equalsIgnoreCase(searchType)) {
criteria = APIConstants.API_OVERVIEW_DESCRIPTION;
} else if (APIConstants.API_TAG.equalsIgnoreCase(searchType)) {
criteria = APIConstants.API_OVERVIEW_TAG;
}
//Create the search attribute map for PUBLISHED APIs
final String searchValue = searchTerm;
Map<String, List<String>> listMap = new HashMap<String, List<String>>();
listMap.put(criteria, new ArrayList<String>() {{
add(searchValue);
}});
boolean displayAPIsWithMultipleStatus = APIUtil.isAllowDisplayAPIsWithMultipleStatus();
//This is due to take only the published APIs from the search if there is no need to return APIs with
//multiple status. This is because pagination is breaking when we do a another filtering with the API Status
if (!displayAPIsWithMultipleStatus) {
listMap.put(APIConstants.API_OVERVIEW_STATUS, new ArrayList<String>() {{
add(APIConstants.PUBLISHED);
}});
}
GenericArtifact[] genericArtifacts = artifactManager.findGenericArtifacts(listMap);
totalLength = PaginationContext.getInstance().getLength();
boolean isFound = true;
if (genericArtifacts == null || genericArtifacts.length == 0) {
if (APIConstants.API_OVERVIEW_PROVIDER.equals(criteria)) {
genericArtifacts = searchAPIsByOwner(artifactManager, searchValue);
if (genericArtifacts == null || genericArtifacts.length == 0) {
isFound = false;
}
}
else {
isFound = false;
}
}
if (!isFound) {
result.put("apis", apiSet);
result.put("length", 0);
result.put("isMore", isMore);
return result;
}
// Check to see if we can speculate that there are more APIs to be loaded
if (maxPaginationLimit == totalLength) {
isMore = true; // More APIs exist, cannot determine total API count without incurring perf hit
--totalLength; // Remove the additional 1 added earlier when setting max pagination limit
}
int tempLength =0;
for (GenericArtifact artifact : genericArtifacts) {
String status = artifact.getAttribute(APIConstants.API_OVERVIEW_STATUS);
if (APIUtil.isAllowDisplayAPIsWithMultipleStatus()) {
if (APIConstants.PROTOTYPED.equals(status) || APIConstants.PUBLISHED.equals(status)
|| APIConstants.DEPRECATED.equals(status)) {
API resultAPI;
if (limitAttributes) {
resultAPI = APIUtil.getAPI(artifact);
} else {
resultAPI = APIUtil.getAPI(artifact, registry);
}
if (resultAPI != null) {
apiList.add(resultAPI);
}
}
} else {
if (APIConstants.PROTOTYPED.equals(status) || APIConstants.PUBLISHED.equals(status)) {
API resultAPI;
if (limitAttributes) {
resultAPI = APIUtil.getAPI(artifact);
} else {
resultAPI = APIUtil.getAPI(artifact, registry);
}
if (resultAPI != null) {
apiList.add(resultAPI);
}
}
}
// Ensure the APIs returned matches the length, there could be an additional API
// returned due incrementing the pagination limit when getting from registry
tempLength++;
if (tempLength >= totalLength){
break;
}
}
apiSet.addAll(apiList);
}
} catch (RegistryException e) {
handleException("Failed to search APIs with type", e);
}
result.put("apis",apiSet);
result.put("length",totalLength);
result.put("isMore", isMore);
return result;
}
private GenericArtifact[] searchAPIsByOwner(GenericArtifactManager artifactManager, final String searchValue) throws GovernanceException {
Map<String, List<String>> listMap = new HashMap<String, List<String>>();
listMap.put(APIConstants.API_OVERVIEW_OWNER, new ArrayList<String>() {
{
add(searchValue);
}
});
return artifactManager.findGenericArtifacts(listMap);
}
/**
*This method will delete application key mapping table and application registration table.
*@param applicationName application Name
*@param tokenType Token Type.
*@param groupId group id.
*@param userName user name.
*@return
*@throws APIManagementException
*/
@Override
public void cleanUpApplicationRegistration(String applicationName ,String tokenType ,String groupId ,String
userName) throws APIManagementException{
Application application = apiMgtDAO.getApplicationByName(applicationName, userName, groupId);
String applicationId = String.valueOf(application.getId());
cleanUpApplicationRegistrationByApplicationId(applicationId, tokenType);
}
/*
* @see super.cleanUpApplicationRegistrationByApplicationId
* */
@Override
public void cleanUpApplicationRegistrationByApplicationId(String applicationId, String tokenType) throws APIManagementException {
apiMgtDAO.deleteApplicationRegistration(applicationId , tokenType);
apiMgtDAO.deleteApplicationKeyMappingByApplicationIdAndType(applicationId, tokenType);
apiMgtDAO.getConsumerkeyByApplicationIdAndKeyType(applicationId, tokenType);
}
/**
*
* @param jsonString this string will contain oAuth app details
* @param userName user name of logged in user.
* @param clientId this is the consumer key of oAuthApplication
* @param applicationName this is the APIM appication name.
* @param keyType
* @param tokenType this is theApplication Token Type. This can be either default or jwt.
* @return
* @throws APIManagementException
*/
@Override
public Map<String, Object> mapExistingOAuthClient(String jsonString, String userName, String clientId,
String applicationName, String keyType, String tokenType)
throws APIManagementException {
String callBackURL = null;
OAuthAppRequest oauthAppRequest = ApplicationUtils.createOauthAppRequest(applicationName, clientId, callBackURL,
"default",
jsonString, tokenType);
KeyManager keyManager = KeyManagerHolder.getKeyManagerInstance();
// Checking if clientId is mapped with another application.
if (apiMgtDAO.isMappingExistsforConsumerKey(clientId)) {
String message = "Consumer Key " + clientId + " is used for another Application.";
log.error(message);
throw new APIManagementException(message);
}
log.debug("Client ID not mapped previously with another application.");
//createApplication on oAuthorization server.
OAuthApplicationInfo oAuthApplication = keyManager.mapOAuthApplication(oauthAppRequest);
//Do application mapping with consumerKey.
apiMgtDAO.createApplicationKeyTypeMappingForManualClients(keyType, applicationName, userName, clientId);
AccessTokenInfo tokenInfo;
if (oAuthApplication.getJsonString().contains(APIConstants.GRANT_TYPE_CLIENT_CREDENTIALS)) {
AccessTokenRequest tokenRequest = ApplicationUtils.createAccessTokenRequest(oAuthApplication, null);
tokenInfo = keyManager.getNewApplicationAccessToken(tokenRequest);
} else {
tokenInfo = new AccessTokenInfo();
tokenInfo.setAccessToken("");
tokenInfo.setValidityPeriod(0L);
String[] noScopes = new String[] {"N/A"};
tokenInfo.setScope(noScopes);
oAuthApplication.addParameter("tokenScope", Arrays.toString(noScopes));
}
Map<String, Object> keyDetails = new HashMap<String, Object>();
if (tokenInfo != null) {
keyDetails.put("validityTime", tokenInfo.getValidityPeriod());
keyDetails.put("accessToken", tokenInfo.getAccessToken());
keyDetails.put("tokenDetails", tokenInfo.getJSONString());
}
keyDetails.put("consumerKey", oAuthApplication.getClientId());
keyDetails.put("consumerSecret", oAuthApplication.getParameter("client_secret"));
keyDetails.put("appDetails", oAuthApplication.getJsonString());
return keyDetails;
}
/** returns the SubscribedAPI object which is related to the subscriptionId
*
* @param subscriptionId subscription id
* @return
* @throws APIManagementException
*/
@Override
public SubscribedAPI getSubscriptionById(int subscriptionId) throws APIManagementException {
return apiMgtDAO.getSubscriptionById(subscriptionId);
}
@Override
public Set<SubscribedAPI> getSubscribedAPIs(Subscriber subscriber) throws APIManagementException {
return getSubscribedAPIs(subscriber, null);
}
@Override
public Set<SubscribedAPI> getSubscribedAPIs(Subscriber subscriber, String groupingId) throws APIManagementException {
Set<SubscribedAPI> originalSubscribedAPIs;
Set<SubscribedAPI> subscribedAPIs = new HashSet<SubscribedAPI>();
try {
originalSubscribedAPIs = apiMgtDAO.getSubscribedAPIs(subscriber, groupingId);
if (originalSubscribedAPIs != null && !originalSubscribedAPIs.isEmpty()) {
Map<String, Tier> tiers = APIUtil.getTiers(tenantId);
for (SubscribedAPI subscribedApi : originalSubscribedAPIs) {
Tier tier = tiers.get(subscribedApi.getTier().getName());
subscribedApi.getTier().setDisplayName(tier != null ? tier.getDisplayName() : subscribedApi.getTier().getName());
if (tier.getMonetizationAttributes() != null) {
subscribedApi.getTier().setMonetizationAttributes(tier.getMonetizationAttributes());
}
subscribedAPIs.add(subscribedApi);
}
}
} catch (APIManagementException e) {
handleException("Failed to get APIs of " + subscriber.getName(), e);
}
return subscribedAPIs;
}
private Set<SubscribedAPI> getLightWeightSubscribedAPIs(Subscriber subscriber, String groupingId) throws
APIManagementException {
Set<SubscribedAPI> originalSubscribedAPIs;
Set<SubscribedAPI> subscribedAPIs = new HashSet<SubscribedAPI>();
try {
originalSubscribedAPIs = apiMgtDAO.getSubscribedAPIs(subscriber, groupingId);
if (originalSubscribedAPIs != null && !originalSubscribedAPIs.isEmpty()) {
Map<String, Tier> tiers = APIUtil.getTiers(tenantId);
for (SubscribedAPI subscribedApi : originalSubscribedAPIs) {
Application application = subscribedApi.getApplication();
if (application != null) {
int applicationId = application.getId();
}
Tier tier = tiers.get(subscribedApi.getTier().getName());
subscribedApi.getTier().setDisplayName(tier != null ? tier.getDisplayName() : subscribedApi
.getTier().getName());
subscribedAPIs.add(subscribedApi);
}
}
} catch (APIManagementException e) {
handleException("Failed to get APIs of " + subscriber.getName(), e);
}
return subscribedAPIs;
}
@Override
public Set<SubscribedAPI> getSubscribedAPIs(Subscriber subscriber, String applicationName, String groupingId)
throws APIManagementException {
Set<SubscribedAPI> subscribedAPIs = null;
try {
subscribedAPIs = apiMgtDAO.getSubscribedAPIs(subscriber, applicationName, groupingId);
if (subscribedAPIs != null && !subscribedAPIs.isEmpty()) {
Map<String, Tier> tiers = APIUtil.getTiers(tenantId);
for (SubscribedAPI subscribedApi : subscribedAPIs) {
Tier tier = tiers.get(subscribedApi.getTier().getName());
subscribedApi.getTier().setDisplayName(tier != null ? tier.getDisplayName() : subscribedApi
.getTier().getName());
// We do not need to add the modified object again.
}
}
} catch (APIManagementException e) {
handleException("Failed to get APIs of " + subscriber.getName() + " under application " + applicationName, e);
}
return subscribedAPIs;
}
public JSONArray getScopesForApplicationSubscription(String username, int applicationId)
throws APIManagementException {
Set<Scope> scopeSet;
JSONArray scopeArray = new JSONArray();
Subscriber subscriber = new Subscriber(username);
scopeSet = apiMgtDAO.getScopesForApplicationSubscription(subscriber, applicationId);
for (Scope scope : scopeSet) {
JSONObject scopeObj = new JSONObject();
scopeObj.put("scopeKey", scope.getKey());
scopeObj.put("scopeName", scope.getName());
scopeArray.add(scopeObj);
}
return scopeArray;
}
/*
*@see super.getSubscribedAPIsByApplicationId
*
*/
@Override
public Set<SubscribedAPI> getSubscribedAPIsByApplicationId(Subscriber subscriber, int applicationId, String groupingId) throws APIManagementException {
Set<SubscribedAPI> subscribedAPIs = null;
try {
subscribedAPIs = apiMgtDAO.getSubscribedAPIsByApplicationId(subscriber, applicationId, groupingId);
if (subscribedAPIs != null && !subscribedAPIs.isEmpty()) {
Map<String, Tier> tiers = APIUtil.getTiers(tenantId);
for (SubscribedAPI subscribedApi : subscribedAPIs) {
Tier tier = tiers.get(subscribedApi.getTier().getName());
subscribedApi.getTier().setDisplayName(tier != null ? tier.getDisplayName() : subscribedApi
.getTier().getName());
// We do not need to add the modified object again.
}
}
} catch (APIManagementException e) {
handleException("Failed to get APIs of " + subscriber.getName() + " under application " + applicationId, e);
}
return subscribedAPIs;
}
@Override
public Set<SubscribedAPI> getPaginatedSubscribedAPIs(Subscriber subscriber, String applicationName,
int startSubIndex, int endSubIndex, String groupingId)
throws APIManagementException {
Set<SubscribedAPI> subscribedAPIs = null;
try {
subscribedAPIs = apiMgtDAO.getPaginatedSubscribedAPIs(subscriber, applicationName, startSubIndex,
endSubIndex, groupingId);
if (subscribedAPIs != null && !subscribedAPIs.isEmpty()) {
Map<String, Tier> tiers = APIUtil.getTiers(tenantId);
for (SubscribedAPI subscribedApi : subscribedAPIs) {
Tier tier = tiers.get(subscribedApi.getTier().getName());
subscribedApi.getTier().setDisplayName(tier != null ? tier.getDisplayName() : subscribedApi
.getTier().getName());
// We do not need to add the modified object again.
// subscribedAPIs.add(subscribedApi);
}
}
} catch (APIManagementException e) {
handleException("Failed to get APIs of " + subscriber.getName() + " under application " + applicationName, e);
}
return subscribedAPIs;
}
@Override
public Set<SubscribedAPI> getPaginatedSubscribedAPIs(Subscriber subscriber, int applicationId, int startSubIndex,
int endSubIndex, String groupingId) throws APIManagementException {
Set<SubscribedAPI> subscribedAPIs = null;
try {
subscribedAPIs = apiMgtDAO.getPaginatedSubscribedAPIs(subscriber, applicationId, startSubIndex,
endSubIndex, groupingId);
if (subscribedAPIs != null && !subscribedAPIs.isEmpty()) {
Map<String, Tier> tiers = APIUtil.getTiers(tenantId);
for (SubscribedAPI subscribedApi : subscribedAPIs) {
Tier tier = tiers.get(subscribedApi.getTier().getName());
subscribedApi.getTier().setDisplayName(tier != null ? tier.getDisplayName() : subscribedApi
.getTier().getName());
// We do not need to add the modified object again.
// subscribedAPIs.add(subscribedApi);
}
}
} catch (APIManagementException e) {
String msg = "Failed to get APIs of " + subscriber.getName() + " under application " + applicationId;
log.error(msg, e);
throw new APIManagementException(msg, e);
}
return subscribedAPIs;
}
public Integer getSubscriptionCount(Subscriber subscriber,String applicationName,String groupingId)
throws APIManagementException {
return apiMgtDAO.getSubscriptionCount(subscriber,applicationName,groupingId);
}
public Integer getSubscriptionCountByApplicationId(Subscriber subscriber, int applicationId, String groupingId)
throws APIManagementException {
return apiMgtDAO.getSubscriptionCountByApplicationId(subscriber, applicationId, groupingId);
}
@Override
public Set<APIIdentifier> getAPIByConsumerKey(String accessToken) throws APIManagementException {
try {
return apiMgtDAO.getAPIByConsumerKey(accessToken);
} catch (APIManagementException e) {
handleException("Error while obtaining API from API key", e);
}
return null;
}
@Override
public boolean isSubscribed(APIIdentifier apiIdentifier, String userId)
throws APIManagementException {
boolean isSubscribed;
try {
isSubscribed = apiMgtDAO.isSubscribed(apiIdentifier, userId);
} catch (APIManagementException e) {
String msg = "Failed to check if user(" + userId + ") has subscribed to " + apiIdentifier;
log.error(msg, e);
throw new APIManagementException(msg, e);
}
return isSubscribed;
}
/**
* This methods loads the monetization implementation class
*
* @return monetization implementation class
* @throws APIManagementException if failed to load monetization implementation class
*/
public Monetization getMonetizationImplClass() throws APIManagementException {
APIManagerConfiguration configuration = getAPIManagerConfiguration();
Monetization monetizationImpl = null;
if (configuration == null) {
log.error("API Manager configuration is not initialized.");
} else {
String monetizationImplClass = configuration.getFirstProperty(APIConstants.Monetization.MONETIZATION_IMPL);
if (monetizationImplClass == null) {
monetizationImpl = new DefaultMonetizationImpl();
} else {
try {
monetizationImpl = (Monetization) APIUtil.getClassForName(monetizationImplClass).newInstance();
} catch (ClassNotFoundException | IllegalAccessException | InstantiationException e) {
APIUtil.handleException("Failed to load monetization implementation class.", e);
}
}
}
return monetizationImpl;
}
@Override
public SubscriptionResponse addSubscription(ApiTypeWrapper apiTypeWrapper, String userId, int applicationId)
throws APIManagementException {
API api = null;
APIProduct product = null;
Identifier identifier = null;
String tenantAwareUsername = MultitenantUtils.getTenantAwareUsername(userId);
String tenantDomain = MultitenantUtils.getTenantDomain(tenantAwareUsername);
final boolean isApiProduct = apiTypeWrapper.isAPIProduct();
String state;
String apiContext;
if (isApiProduct) {
product = apiTypeWrapper.getApiProduct();
state = product.getState();
identifier = product.getId();
apiContext = product.getContext();
} else {
api = apiTypeWrapper.getApi();
state = api.getStatus();
identifier = api.getId();
apiContext = api.getContext();
}
WorkflowResponse workflowResponse = null;
int subscriptionId;
if (APIConstants.PUBLISHED.equals(state)) {
subscriptionId = apiMgtDAO.addSubscription(apiTypeWrapper, applicationId,
APIConstants.SubscriptionStatus.ON_HOLD);
boolean isTenantFlowStarted = false;
if (tenantDomain != null && !MultitenantConstants.SUPER_TENANT_DOMAIN_NAME.equals(tenantDomain)) {
isTenantFlowStarted = startTenantFlowForTenantDomain(tenantDomain);
}
String applicationName = apiMgtDAO.getApplicationNameFromId(applicationId);
try {
WorkflowExecutor addSubscriptionWFExecutor = getWorkflowExecutor(WorkflowConstants.WF_TYPE_AM_SUBSCRIPTION_CREATION);
SubscriptionWorkflowDTO workflowDTO = new SubscriptionWorkflowDTO();
workflowDTO.setStatus(WorkflowStatus.CREATED);
workflowDTO.setCreatedTime(System.currentTimeMillis());
workflowDTO.setTenantDomain(tenantDomain);
workflowDTO.setTenantId(tenantId);
workflowDTO.setExternalWorkflowReference(addSubscriptionWFExecutor.generateUUID());
workflowDTO.setWorkflowReference(String.valueOf(subscriptionId));
workflowDTO.setWorkflowType(WorkflowConstants.WF_TYPE_AM_SUBSCRIPTION_CREATION);
workflowDTO.setCallbackUrl(addSubscriptionWFExecutor.getCallbackURL());
workflowDTO.setApiName(identifier.getName());
workflowDTO.setApiContext(apiContext);
workflowDTO.setApiVersion(identifier.getVersion());
workflowDTO.setApiProvider(identifier.getProviderName());
workflowDTO.setTierName(identifier.getTier());
workflowDTO.setApplicationName(apiMgtDAO.getApplicationNameFromId(applicationId));
workflowDTO.setApplicationId(applicationId);
workflowDTO.setSubscriber(userId);
Tier tier = null;
Set<Tier> policies = Collections.emptySet();
if (!isApiProduct) {
policies = api.getAvailableTiers();
} else {
policies = product.getAvailableTiers();
}
for (Tier policy : policies) {
if (policy.getName() != null && (policy.getName()).equals(workflowDTO.getTierName())) {
tier = policy;
}
}
boolean isMonetizationEnabled = false;
if (api != null) {
isMonetizationEnabled = api.getMonetizationStatus();
//check whether monetization is enabled for API and tier plan is commercial
if (isMonetizationEnabled && APIConstants.COMMERCIAL_TIER_PLAN.equals(tier.getTierPlan())) {
workflowResponse = addSubscriptionWFExecutor.monetizeSubscription(workflowDTO, api);
} else {
workflowResponse = addSubscriptionWFExecutor.execute(workflowDTO);
}
} else {
isMonetizationEnabled = product.getMonetizationStatus();
//check whether monetization is enabled for API and tier plan is commercial
if (isMonetizationEnabled && APIConstants.COMMERCIAL_TIER_PLAN.equals(tier.getTierPlan())) {
workflowResponse = addSubscriptionWFExecutor.monetizeSubscription(workflowDTO, product);
} else {
workflowResponse = addSubscriptionWFExecutor.execute(workflowDTO);
}
}
} catch (WorkflowException e) {
//If the workflow execution fails, roll back transaction by removing the subscription entry.
apiMgtDAO.removeSubscriptionById(subscriptionId);
log.error("Could not execute Workflow", e);
throw new APIManagementException("Could not execute Workflow", e);
} finally {
if (isTenantFlowStarted) {
endTenantFlow();
}
}
if (APIUtil.isAPIGatewayKeyCacheEnabled()) {
invalidateCachedKeys(applicationId);
}
//to handle on-the-fly subscription rejection (and removal of subscription entry from the database)
//the response should have {"Status":"REJECTED"} in the json payload for this to work.
boolean subscriptionRejected = false;
String subscriptionStatus = null;
String subscriptionUUID = "";
if (workflowResponse != null && workflowResponse.getJSONPayload() != null
&& !workflowResponse.getJSONPayload().isEmpty()) {
try {
JSONObject wfResponseJson = (JSONObject) new JSONParser().parse(workflowResponse.getJSONPayload());
if (APIConstants.SubscriptionStatus.REJECTED.equals(wfResponseJson.get("Status"))) {
subscriptionRejected = true;
subscriptionStatus = APIConstants.SubscriptionStatus.REJECTED;
}
} catch (ParseException e) {
log.error('\'' + workflowResponse.getJSONPayload() + "' is not a valid JSON.", e);
}
}
if (!subscriptionRejected) {
SubscribedAPI addedSubscription = getSubscriptionById(subscriptionId);
subscriptionStatus = addedSubscription.getSubStatus();
subscriptionUUID = addedSubscription.getUUID();
JSONObject subsLogObject = new JSONObject();
subsLogObject.put(APIConstants.AuditLogConstants.API_NAME, identifier.getName());
subsLogObject.put(APIConstants.AuditLogConstants.PROVIDER, identifier.getProviderName());
subsLogObject.put(APIConstants.AuditLogConstants.APPLICATION_ID, applicationId);
subsLogObject.put(APIConstants.AuditLogConstants.APPLICATION_NAME, applicationName);
subsLogObject.put(APIConstants.AuditLogConstants.TIER, identifier.getTier());
APIUtil.logAuditMessage(APIConstants.AuditLogConstants.SUBSCRIPTION, subsLogObject.toString(),
APIConstants.AuditLogConstants.CREATED, this.username);
if (workflowResponse == null) {
workflowResponse = new GeneralWorkflowResponse();
}
}
if (log.isDebugEnabled()) {
String logMessage = "API Name: " + identifier.getName() + ", API Version " + identifier.getVersion()
+ ", Subscription Status: " + subscriptionStatus + " subscribe by " + userId + " for app "
+ applicationName;
log.debug(logMessage);
}
return new SubscriptionResponse(subscriptionStatus, subscriptionUUID, workflowResponse);
} else {
throw new APIMgtResourceNotFoundException("Subscriptions not allowed on APIs/API Products in the state: " +
state);
}
}
@Override
public SubscriptionResponse addSubscription(ApiTypeWrapper apiTypeWrapper, String userId, int applicationId,
String groupId) throws APIManagementException {
boolean isValid = validateApplication(userId, applicationId, groupId);
if (!isValid) {
log.error("Application " + applicationId + " is not accessible to user " + userId);
throw new APIManagementException("Application is not accessible to user " + userId);
}
return addSubscription(apiTypeWrapper, userId, applicationId);
}
/**
* Check whether the application is accessible to the specified user
* @param userId username
* @param applicationId application ID
* @param groupId GroupId list of the application
* @return true if the application is accessible by the specified user
*/
private boolean validateApplication(String userId, int applicationId, String groupId) {
try {
return apiMgtDAO.isAppAllowed(applicationId, userId, groupId);
} catch (APIManagementException e) {
log.error("Error occurred while getting user group id for user: " + userId, e);
}
return false;
}
@Override
public String getSubscriptionStatusById(int subscriptionId) throws APIManagementException {
return apiMgtDAO.getSubscriptionStatusById(subscriptionId);
}
@Override
public void removeSubscription(Identifier identifier, String userId, int applicationId)
throws APIManagementException {
boolean isTenantFlowStarted = false;
APIIdentifier apiIdentifier = null;
APIProductIdentifier apiProdIdentifier = null;
if (identifier instanceof APIIdentifier) {
apiIdentifier = (APIIdentifier) identifier;
}
if (identifier instanceof APIProductIdentifier) {
apiProdIdentifier = (APIProductIdentifier) identifier;
}
String providerTenantDomain = MultitenantUtils.getTenantDomain(APIUtil.
replaceEmailDomainBack(identifier.getProviderName()));
String applicationName = apiMgtDAO.getApplicationNameFromId(applicationId);
try {
if (providerTenantDomain != null && !MultitenantConstants.SUPER_TENANT_DOMAIN_NAME
.equals(providerTenantDomain)) {
PrivilegedCarbonContext.startTenantFlow();
PrivilegedCarbonContext.getThreadLocalCarbonContext().setTenantDomain(providerTenantDomain, true);
isTenantFlowStarted = true;
}
SubscriptionWorkflowDTO workflowDTO;
WorkflowExecutor createSubscriptionWFExecutor = getWorkflowExecutor(WorkflowConstants.WF_TYPE_AM_SUBSCRIPTION_CREATION);
WorkflowExecutor removeSubscriptionWFExecutor = getWorkflowExecutor(WorkflowConstants.WF_TYPE_AM_SUBSCRIPTION_DELETION);
String workflowExtRef = apiMgtDAO.getExternalWorkflowReferenceForSubscription(identifier, applicationId);
// in a normal flow workflowExtRef is null when workflows are not enabled
if (workflowExtRef == null) {
workflowDTO = new SubscriptionWorkflowDTO();
} else {
workflowDTO = (SubscriptionWorkflowDTO) apiMgtDAO.retrieveWorkflow(workflowExtRef);
// set tiername to the workflowDTO only when workflows are enabled
SubscribedAPI subscription = apiMgtDAO
.getSubscriptionById(Integer.parseInt(workflowDTO.getWorkflowReference()));
workflowDTO.setTierName(subscription.getTier().getName());
}
workflowDTO.setApiProvider(identifier.getProviderName());
API api = null;
APIProduct product = null;
String context = null;
if (apiIdentifier != null) {
api = getAPI(apiIdentifier);
context = api.getContext();
} else if (apiProdIdentifier != null) {
product = getAPIProduct(apiProdIdentifier);
context = product.getContext();
}
workflowDTO.setApiContext(context);
workflowDTO.setApiName(identifier.getName());
workflowDTO.setApiVersion(identifier.getVersion());
workflowDTO.setApplicationName(applicationName);
workflowDTO.setTenantDomain(tenantDomain);
workflowDTO.setTenantId(tenantId);
workflowDTO.setExternalWorkflowReference(workflowExtRef);
workflowDTO.setSubscriber(userId);
workflowDTO.setCallbackUrl(removeSubscriptionWFExecutor.getCallbackURL());
workflowDTO.setApplicationId(applicationId);
String status = apiMgtDAO.getSubscriptionStatus(identifier, applicationId);
if (APIConstants.SubscriptionStatus.ON_HOLD.equals(status)) {
try {
createSubscriptionWFExecutor.cleanUpPendingTask(workflowExtRef);
} catch (WorkflowException ex) {
// failed cleanup processes are ignored to prevent failing the deletion process
log.warn("Failed to clean pending subscription approval task");
}
}
// update attributes of the new remove workflow to be created
workflowDTO.setStatus(WorkflowStatus.CREATED);
workflowDTO.setWorkflowType(WorkflowConstants.WF_TYPE_AM_SUBSCRIPTION_DELETION);
workflowDTO.setCreatedTime(System.currentTimeMillis());
workflowDTO.setExternalWorkflowReference(removeSubscriptionWFExecutor.generateUUID());
Tier tier = null;
if (api != null) {
Set<Tier> policies = api.getAvailableTiers();
Iterator<Tier> iterator = policies.iterator();
boolean isPolicyAllowed = false;
while (iterator.hasNext()) {
Tier policy = iterator.next();
if (policy.getName() != null && (policy.getName()).equals(workflowDTO.getTierName())) {
tier = policy;
}
}
} else if (product != null) {
Set<Tier> policies = product.getAvailableTiers();
Iterator<Tier> iterator = policies.iterator();
boolean isPolicyAllowed = false;
while (iterator.hasNext()) {
Tier policy = iterator.next();
if (policy.getName() != null && (policy.getName()).equals(workflowDTO.getTierName())) {
tier = policy;
}
}
}
if (api != null) {
//check whether monetization is enabled for API and tier plan is commercial
if (api.getMonetizationStatus() && APIConstants.COMMERCIAL_TIER_PLAN.equals(tier.getTierPlan())) {
removeSubscriptionWFExecutor.deleteMonetizedSubscription(workflowDTO, api);
} else {
removeSubscriptionWFExecutor.execute(workflowDTO);
}
} else if (product != null) {
//check whether monetization is enabled for API product and tier plan is commercial
if (product.getMonetizationStatus() && APIConstants.COMMERCIAL_TIER_PLAN.equals(tier.getTierPlan())) {
removeSubscriptionWFExecutor.deleteMonetizedSubscription(workflowDTO, product);
} else {
removeSubscriptionWFExecutor.execute(workflowDTO);
}
}
JSONObject subsLogObject = new JSONObject();
subsLogObject.put(APIConstants.AuditLogConstants.API_NAME, identifier.getName());
subsLogObject.put(APIConstants.AuditLogConstants.PROVIDER, identifier.getProviderName());
subsLogObject.put(APIConstants.AuditLogConstants.APPLICATION_ID, applicationId);
subsLogObject.put(APIConstants.AuditLogConstants.APPLICATION_NAME, applicationName);
APIUtil.logAuditMessage(APIConstants.AuditLogConstants.SUBSCRIPTION, subsLogObject.toString(),
APIConstants.AuditLogConstants.DELETED, this.username);
} catch (WorkflowException e) {
String errorMsg = "Could not execute Workflow, " + WorkflowConstants.WF_TYPE_AM_SUBSCRIPTION_DELETION
+ " for resource " + identifier.toString();
handleException(errorMsg, e);
} finally {
if (isTenantFlowStarted) {
endTenantFlow();
}
}
if (APIUtil.isAPIGatewayKeyCacheEnabled()) {
invalidateCachedKeys(applicationId);
}
if (log.isDebugEnabled()) {
String logMessage = "Subscription removed from app " + applicationName + " by " + userId + " For Id: "
+ identifier.toString();
log.debug(logMessage);
}
}
@Override
public void removeSubscription(APIIdentifier identifier, String userId, int applicationId, String groupId) throws
APIManagementException {
//check application is viewable to logged user
boolean isValid = validateApplication(userId, applicationId, groupId);
if (!isValid) {
log.error("Application " + applicationId + " is not accessible to user " + userId);
throw new APIManagementException("Application is not accessible to user " + userId);
}
removeSubscription(identifier, userId, applicationId);
}
/**
* Removes a subscription specified by SubscribedAPI object
*
* @param subscription SubscribedAPI object
* @throws APIManagementException
*/
@Override
public void removeSubscription(SubscribedAPI subscription) throws APIManagementException {
String uuid = subscription.getUUID();
SubscribedAPI subscribedAPI = apiMgtDAO.getSubscriptionByUUID(uuid);
if (subscribedAPI != null) {
Application application = subscribedAPI.getApplication();
Identifier identifier = subscribedAPI.getApiId() != null ? subscribedAPI.getApiId()
: subscribedAPI.getProductId();
String userId = application.getSubscriber().getName();
removeSubscription(identifier, userId, application.getId());
if (log.isDebugEnabled()) {
String appName = application.getName();
String logMessage = "Identifier: " + identifier.toString() + " subscription (uuid : " + uuid
+ ") removed from app " + appName;
log.debug(logMessage);
}
} else {
throw new APIManagementException("Subscription for UUID:" + uuid +" does not exist.");
}
}
/**
*
* @param applicationId Application ID related cache keys to be cleared
* @throws APIManagementException
*/
private void invalidateCachedKeys(int applicationId) throws APIManagementException {
CacheInvalidator.getInstance().invalidateCacheForApp(applicationId);
}
@Override
public void removeSubscriber(APIIdentifier identifier, String userId)
throws APIManagementException {
throw new UnsupportedOperationException("Unsubscribe operation is not yet implemented");
}
@Override
public void updateSubscriptions(APIIdentifier identifier, String userId, int applicationId)
throws APIManagementException {
API api = getAPI(identifier);
apiMgtDAO.updateSubscriptions(new ApiTypeWrapper(api), applicationId);
}
/**
* @deprecated
* This method needs to be removed once the Jaggery web apps are removed.
*
*/
@Override
public void addComment(APIIdentifier identifier, String commentText, String user) throws APIManagementException {
apiMgtDAO.addComment(identifier, commentText, user);
}
@Override
public String addComment(Identifier identifier, Comment comment, String user) throws APIManagementException {
return apiMgtDAO.addComment(identifier, comment, user);
}
@Override
public org.wso2.carbon.apimgt.api.model.Comment[] getComments(APIIdentifier identifier)
throws APIManagementException {
return apiMgtDAO.getComments(identifier);
}
@Override
public Comment getComment(Identifier identifier, String commentId) throws APIManagementException {
return apiMgtDAO.getComment(identifier, commentId);
}
@Override
public org.wso2.carbon.apimgt.api.model.Comment[] getComments(ApiTypeWrapper apiTypeWrapper)
throws APIManagementException {
return apiMgtDAO.getComments(apiTypeWrapper);
}
@Override
public void deleteComment(APIIdentifier identifier, String commentId) throws APIManagementException {
apiMgtDAO.deleteComment(identifier, commentId);
}
/**
* Add a new Application from the store.
* @param application - {@link org.wso2.carbon.apimgt.api.model.Application}
* @param userId - {@link String}
* @return {@link String}
*/
@Override
public int addApplication(Application application, String userId)
throws APIManagementException {
if (application.getName() != null && (application.getName().length() != application.getName().trim().length())) {
handleApplicationNameContainSpacesException("Application name " +
"cannot contain leading or trailing white spaces");
}
JSONArray applicationAttributesFromConfig =
getAppAttributesFromConfig(MultitenantUtils.getTenantDomain(userId));
Map<String, String> applicationAttributes = application.getApplicationAttributes();
if (applicationAttributes == null) {
/*
* This empty Hashmap is set to avoid throwing a null pointer exception, in case no application attributes
* are set when creating an application
*/
applicationAttributes = new HashMap<String, String>();
}
Set<String> configAttributes = new HashSet<>();
if (applicationAttributesFromConfig != null) {
for (Object object : applicationAttributesFromConfig) {
JSONObject attribute = (JSONObject) object;
Boolean hidden = (Boolean) attribute.get(APIConstants.ApplicationAttributes.HIDDEN);
Boolean required = (Boolean) attribute.get(APIConstants.ApplicationAttributes.REQUIRED);
String attributeName = (String) attribute.get(APIConstants.ApplicationAttributes.ATTRIBUTE);
String defaultValue = (String) attribute.get(APIConstants.ApplicationAttributes.DEFAULT);
if (BooleanUtils.isTrue(hidden) && BooleanUtils.isTrue(required) && StringUtils.isEmpty(defaultValue)) {
/*
* In case a default value is not provided for a required hidden attribute, an exception is thrown,
* we don't do this validation in server startup to support multi tenancy scenarios
*/
handleException("Default value not provided for hidden required attribute. Please check the " +
"configuration");
}
configAttributes.add(attributeName);
if (BooleanUtils.isTrue(required)) {
if (BooleanUtils.isTrue(hidden)) {
/*
* If a required hidden attribute is attempted to be populated, we replace it with
* the default value.
*/
String oldValue = applicationAttributes.put(attributeName, defaultValue);
if (StringUtils.isNotEmpty(oldValue)) {
log.info("Replaced provided value: " + oldValue + " with default the value" +
" for the hidden application attribute: " + attributeName);
}
} else if (!applicationAttributes.keySet().contains(attributeName)) {
if (StringUtils.isNotEmpty(defaultValue)) {
/*
* If a required attribute is not provided and a default value is given, we replace it with
* the default value.
*/
applicationAttributes.put(attributeName, defaultValue);
log.info("Added default value: " + defaultValue +
" as required attribute: " + attributeName + "is not provided");
} else {
/*
* If a required attribute is not provided but a default value not given, we throw a bad
* request exception.
*/
handleException("Bad Request. Required application attribute not provided");
}
}
} else if (BooleanUtils.isTrue(hidden)) {
/*
* If an optional hidden attribute is provided, we remove it and leave it blank, and leave it for
* an extension to populate it.
*/
applicationAttributes.remove(attributeName);
}
}
application.setApplicationAttributes(validateApplicationAttributes(applicationAttributes, configAttributes));
} else {
application.setApplicationAttributes(null);
}
String regex = "^[a-zA-Z0-9 ._-]*$";
Pattern pattern = Pattern.compile(regex);
Matcher matcher = pattern.matcher(application.getName());
if (!matcher.find()) {
handleApplicationNameContainsInvalidCharactersException("Application name contains invalid characters");
}
if (APIUtil.isApplicationExist(userId, application.getName(), application.getGroupId())) {
handleResourceAlreadyExistsException(
"A duplicate application already exists by the name - " + application.getName());
}
//check whether callback url is empty and set null
if (StringUtils.isBlank(application.getCallbackUrl())) {
application.setCallbackUrl(null);
}
int applicationId = apiMgtDAO.addApplication(application, userId);
JSONObject appLogObject = new JSONObject();
appLogObject.put(APIConstants.AuditLogConstants.NAME, application.getName());
appLogObject.put(APIConstants.AuditLogConstants.TIER, application.getTier());
appLogObject.put(APIConstants.AuditLogConstants.CALLBACK, application.getCallbackUrl());
appLogObject.put(APIConstants.AuditLogConstants.GROUPS, application.getGroupId());
appLogObject.put(APIConstants.AuditLogConstants.OWNER, application.getSubscriber().getName());
APIUtil.logAuditMessage(APIConstants.AuditLogConstants.APPLICATION, appLogObject.toString(),
APIConstants.AuditLogConstants.CREATED, this.username);
boolean isTenantFlowStarted = false;
if (tenantDomain != null && !MultitenantConstants.SUPER_TENANT_DOMAIN_NAME.equals(tenantDomain)) {
isTenantFlowStarted = startTenantFlowForTenantDomain(tenantDomain);
}
try {
WorkflowExecutor appCreationWFExecutor = getWorkflowExecutor(WorkflowConstants.WF_TYPE_AM_APPLICATION_CREATION);
ApplicationWorkflowDTO appWFDto = new ApplicationWorkflowDTO();
appWFDto.setApplication(application);
appWFDto.setExternalWorkflowReference(appCreationWFExecutor.generateUUID());
appWFDto.setWorkflowReference(String.valueOf(applicationId));
appWFDto.setWorkflowType(WorkflowConstants.WF_TYPE_AM_APPLICATION_CREATION);
appWFDto.setCallbackUrl(appCreationWFExecutor.getCallbackURL());
appWFDto.setStatus(WorkflowStatus.CREATED);
appWFDto.setTenantDomain(tenantDomain);
appWFDto.setTenantId(tenantId);
appWFDto.setUserName(userId);
appWFDto.setCreatedTime(System.currentTimeMillis());
appCreationWFExecutor.execute(appWFDto);
} catch (WorkflowException e) {
//If the workflow execution fails, roll back transaction by removing the application entry.
application.setId(applicationId);
apiMgtDAO.deleteApplication(application);
log.error("Unable to execute Application Creation Workflow", e);
handleException("Unable to execute Application Creation Workflow", e);
} finally {
if (isTenantFlowStarted) {
endTenantFlow();
}
}
if (log.isDebugEnabled()) {
log.debug("Application Name: " + application.getName() +" added successfully.");
}
return applicationId;
}
/** Updates an Application identified by its id
*
* @param application Application object to be updated
* @throws APIManagementException
*/
@Override
public void updateApplication(Application application) throws APIManagementException {
Application existingApp;
String uuid = application.getUUID();
if (!StringUtils.isEmpty(uuid)) {
existingApp = apiMgtDAO.getApplicationByUUID(uuid);
if (existingApp != null) {
Set<APIKey> keys = getApplicationKeys(existingApp.getId());
for (APIKey key : keys) {
existingApp.addKey(key);
}
}
application.setId(existingApp.getId());
} else {
existingApp = apiMgtDAO.getApplicationById(application.getId());
}
if (existingApp != null && APIConstants.ApplicationStatus.APPLICATION_CREATED.equals(existingApp.getStatus())) {
throw new APIManagementException("Cannot update the application while it is INACTIVE");
}
boolean isCaseInsensitiveComparisons = Boolean.parseBoolean(getAPIManagerConfiguration().
getFirstProperty(APIConstants.API_STORE_FORCE_CI_COMPARISIONS));
boolean isUserAppOwner;
if (isCaseInsensitiveComparisons) {
isUserAppOwner = application.getSubscriber().getName().
equalsIgnoreCase(existingApp.getSubscriber().getName());
} else {
isUserAppOwner = application.getSubscriber().getName().equals(existingApp.getSubscriber().getName());
}
if (!isUserAppOwner) {
throw new APIManagementException("user: " + application.getSubscriber().getName() + ", " +
"attempted to update application owned by: " + existingApp.getSubscriber().getName());
}
if (application.getName() != null && (application.getName().length() != application.getName().trim().length())) {
handleApplicationNameContainSpacesException("Application name " +
"cannot contain leading or trailing white spaces");
}
String regex = "^[a-zA-Z0-9 ._-]*$";
Pattern pattern = Pattern.compile(regex);
Matcher matcher = pattern.matcher(application.getName());
if (!matcher.find()) {
handleApplicationNameContainsInvalidCharactersException("Application name contains invalid characters");
}
Subscriber subscriber = application.getSubscriber();
String tenantDomain = MultitenantUtils.getTenantDomain(subscriber.getName());
JSONArray applicationAttributesFromConfig = getAppAttributesFromConfig(tenantDomain);
Map<String, String> applicationAttributes = application.getApplicationAttributes();
Map<String, String> existingApplicationAttributes = existingApp.getApplicationAttributes();
if (applicationAttributes == null) {
/*
* This empty Hashmap is set to avoid throwing a null pointer exception, in case no application attributes
* are set when updating an application
*/
applicationAttributes = new HashMap<String, String>();
}
Set<String> configAttributes = new HashSet<>();
if (applicationAttributesFromConfig != null) {
for (Object object : applicationAttributesFromConfig) {
boolean isExistingValue = false;
JSONObject attribute = (JSONObject) object;
Boolean hidden = (Boolean) attribute.get(APIConstants.ApplicationAttributes.HIDDEN);
Boolean required = (Boolean) attribute.get(APIConstants.ApplicationAttributes.REQUIRED);
String attributeName = (String) attribute.get(APIConstants.ApplicationAttributes.ATTRIBUTE);
String defaultValue = (String) attribute.get(APIConstants.ApplicationAttributes.DEFAULT);
if (BooleanUtils.isTrue(hidden) && BooleanUtils.isTrue(required) && StringUtils.isEmpty(defaultValue)) {
/*
* In case a default value is not provided for a required hidden attribute, an exception is thrown,
* we don't do this validation in server startup to support multi tenancy scenarios
*/
handleException("Default value not provided for hidden required attribute. Please check the " +
"configuration");
}
configAttributes.add(attributeName);
if (existingApplicationAttributes.containsKey(attributeName)) {
/*
* If a there is an existing attribute value, that is used as the default value.
*/
isExistingValue = true;
defaultValue = existingApplicationAttributes.get(attributeName);
}
if (BooleanUtils.isTrue(required)) {
if (BooleanUtils.isTrue(hidden)) {
String oldValue = applicationAttributes.put(attributeName, defaultValue);
if (StringUtils.isNotEmpty(oldValue)) {
log.info("Replaced provided value: " + oldValue + " with the default/existing value for" +
" the hidden application attribute: " + attributeName);
}
} else if (!applicationAttributes.keySet().contains(attributeName)) {
if (StringUtils.isNotEmpty(defaultValue)) {
applicationAttributes.put(attributeName, defaultValue);
} else {
handleException("Bad Request. Required application attribute not provided");
}
}
} else if (BooleanUtils.isTrue(hidden)) {
if (isExistingValue) {
applicationAttributes.put(attributeName, defaultValue);
} else {
applicationAttributes.remove(attributeName);
}
}
}
application.setApplicationAttributes(validateApplicationAttributes(applicationAttributes, configAttributes));
} else {
application.setApplicationAttributes(null);
}
apiMgtDAO.updateApplication(application);
if (log.isDebugEnabled()) {
log.debug("Successfully updated the Application: " + application.getId() +" in the database.");
}
JSONObject appLogObject = new JSONObject();
appLogObject.put(APIConstants.AuditLogConstants.NAME, application.getName());
appLogObject.put(APIConstants.AuditLogConstants.TIER, application.getTier());
appLogObject.put(APIConstants.AuditLogConstants.STATUS, existingApp != null ? existingApp.getStatus() : "");
appLogObject.put(APIConstants.AuditLogConstants.CALLBACK, application.getCallbackUrl());
appLogObject.put(APIConstants.AuditLogConstants.GROUPS, application.getGroupId());
appLogObject.put(APIConstants.AuditLogConstants.OWNER, application.getSubscriber().getName());
APIUtil.logAuditMessage(APIConstants.AuditLogConstants.APPLICATION, appLogObject.toString(),
APIConstants.AuditLogConstants.UPDATED, this.username);
try {
invalidateCachedKeys(application.getId());
} catch (APIManagementException ignore) {
//Log and ignore since we do not want to throw exceptions to the front end due to cache invalidation failure.
log.warn("Failed to invalidate Gateway Cache " + ignore.getMessage(), ignore);
}
}
/**
* Function to remove an Application from the API Store
*
* @param application - The Application Object that represents the Application
* @param username
* @throws APIManagementException
*/
@Override
public void removeApplication(Application application, String username) throws APIManagementException {
String uuid = application.getUUID();
if (application.getId() == 0 && !StringUtils.isEmpty(uuid)) {
application = apiMgtDAO.getApplicationByUUID(uuid);
if (application != null) {
Set<APIKey> keys = getApplicationKeys(application.getId());
for (APIKey key : keys) {
application.addKey(key);
}
}
}
boolean isTenantFlowStarted = false;
int applicationId = application.getId();
boolean isCaseInsensitiveComparisons = Boolean.parseBoolean(getAPIManagerConfiguration().
getFirstProperty(APIConstants.API_STORE_FORCE_CI_COMPARISIONS));
boolean isUserAppOwner;
if (isCaseInsensitiveComparisons) {
isUserAppOwner = application.getSubscriber().getName().equalsIgnoreCase(username);
} else {
isUserAppOwner = application.getSubscriber().getName().equals(username);
}
if (!isUserAppOwner) {
throw new APIManagementException("user: " + username + ", " +
"attempted to remove application owned by: " + application.getSubscriber().getName());
}
try {
String workflowExtRef;
ApplicationWorkflowDTO workflowDTO;
if (tenantDomain != null && !MultitenantConstants.SUPER_TENANT_DOMAIN_NAME.equals(tenantDomain)) {
PrivilegedCarbonContext.startTenantFlow();
isTenantFlowStarted = true;
PrivilegedCarbonContext.getThreadLocalCarbonContext().setTenantDomain(tenantDomain, true);
}
WorkflowExecutor createApplicationWFExecutor = getWorkflowExecutor(WorkflowConstants.WF_TYPE_AM_APPLICATION_CREATION);
WorkflowExecutor createSubscriptionWFExecutor = getWorkflowExecutor(WorkflowConstants.WF_TYPE_AM_SUBSCRIPTION_CREATION);
WorkflowExecutor createProductionRegistrationWFExecutor = getWorkflowExecutor(WorkflowConstants.WF_TYPE_AM_APPLICATION_REGISTRATION_PRODUCTION);
WorkflowExecutor createSandboxRegistrationWFExecutor = getWorkflowExecutor(WorkflowConstants.WF_TYPE_AM_APPLICATION_REGISTRATION_SANDBOX);
WorkflowExecutor removeApplicationWFExecutor = getWorkflowExecutor(WorkflowConstants.WF_TYPE_AM_APPLICATION_DELETION);
workflowExtRef = apiMgtDAO.getExternalWorkflowReferenceByApplicationID(application.getId());
// in a normal flow workflowExtRef is null when workflows are not enabled
if (workflowExtRef == null) {
workflowDTO = new ApplicationWorkflowDTO();
} else {
workflowDTO = (ApplicationWorkflowDTO) apiMgtDAO.retrieveWorkflow(workflowExtRef);
}
workflowDTO.setApplication(application);
workflowDTO.setCallbackUrl(removeApplicationWFExecutor.getCallbackURL());
workflowDTO.setUserName(this.username);
workflowDTO.setTenantDomain(tenantDomain);
workflowDTO.setTenantId(tenantId);
// Remove from cache first since we won't be able to find active access tokens
// once the application is removed.
invalidateCachedKeys(application.getId());
// clean up pending subscription tasks
Set<Integer> pendingSubscriptions = apiMgtDAO.getPendingSubscriptionsByApplicationId(applicationId);
for (int subscription : pendingSubscriptions) {
try {
workflowExtRef = apiMgtDAO.getExternalWorkflowReferenceForSubscription(subscription);
createSubscriptionWFExecutor.cleanUpPendingTask(workflowExtRef);
} catch (APIManagementException ex) {
// failed cleanup processes are ignored to prevent failing the application removal process
log.warn("Failed to get external workflow reference for subscription " + subscription);
} catch (WorkflowException ex) {
// failed cleanup processes are ignored to prevent failing the application removal process
log.warn("Failed to clean pending subscription approval task: " + subscription);
}
}
// cleanup pending application registration tasks
String productionKeyStatus = apiMgtDAO
.getRegistrationApprovalState(applicationId, APIConstants.API_KEY_TYPE_PRODUCTION);
String sandboxKeyStatus = apiMgtDAO
.getRegistrationApprovalState(applicationId, APIConstants.API_KEY_TYPE_SANDBOX);
if (WorkflowStatus.CREATED.toString().equals(productionKeyStatus)) {
try {
workflowExtRef = apiMgtDAO
.getRegistrationWFReference(applicationId, APIConstants.API_KEY_TYPE_PRODUCTION);
createProductionRegistrationWFExecutor.cleanUpPendingTask(workflowExtRef);
} catch (APIManagementException ex) {
// failed cleanup processes are ignored to prevent failing the application removal process
log.warn("Failed to get external workflow reference for production key of application "
+ applicationId);
} catch (WorkflowException ex) {
// failed cleanup processes are ignored to prevent failing the application removal process
log.warn("Failed to clean pending production key approval task of " + applicationId);
}
}
if (WorkflowStatus.CREATED.toString().equals(sandboxKeyStatus)) {
try {
workflowExtRef = apiMgtDAO
.getRegistrationWFReference(applicationId, APIConstants.API_KEY_TYPE_SANDBOX);
createSandboxRegistrationWFExecutor.cleanUpPendingTask(workflowExtRef);
} catch (APIManagementException ex) {
// failed cleanup processes are ignored to prevent failing the application removal process
log.warn("Failed to get external workflow reference for sandbox key of application "
+ applicationId);
} catch (WorkflowException ex) {
// failed cleanup processes are ignored to prevent failing the application removal process
log.warn("Failed to clean pending sandbox key approval task of " + applicationId);
}
}
if (workflowExtRef != null) {
try {
createApplicationWFExecutor.cleanUpPendingTask(workflowExtRef);
} catch (WorkflowException ex) {
// failed cleanup processes are ignored to prevent failing the application removal process
log.warn("Failed to clean pending application approval task of " + applicationId);
}
}
// update attributes of the new remove workflow to be created
workflowDTO.setStatus(WorkflowStatus.CREATED);
workflowDTO.setCreatedTime(System.currentTimeMillis());
workflowDTO.setWorkflowType(WorkflowConstants.WF_TYPE_AM_APPLICATION_DELETION);
workflowDTO.setExternalWorkflowReference(removeApplicationWFExecutor.generateUUID());
removeApplicationWFExecutor.execute(workflowDTO);
JSONObject appLogObject = new JSONObject();
appLogObject.put(APIConstants.AuditLogConstants.NAME, application.getName());
appLogObject.put(APIConstants.AuditLogConstants.TIER, application.getTier());
appLogObject.put(APIConstants.AuditLogConstants.CALLBACK, application.getCallbackUrl());
appLogObject.put(APIConstants.AuditLogConstants.GROUPS, application.getGroupId());
appLogObject.put(APIConstants.AuditLogConstants.OWNER, application.getSubscriber().getName());
APIUtil.logAuditMessage(APIConstants.AuditLogConstants.APPLICATION, appLogObject.toString(),
APIConstants.AuditLogConstants.DELETED, this.username);
} catch (WorkflowException e) {
String errorMsg = "Could not execute Workflow, " + WorkflowConstants.WF_TYPE_AM_APPLICATION_DELETION + " " +
"for applicationID " + application.getId();
handleException(errorMsg, e);
} finally {
if (isTenantFlowStarted) {
endTenantFlow();
}
}
if (log.isDebugEnabled()) {
String logMessage = "Application Name: " + application.getName() + " successfully removed";
log.debug(logMessage);
}
}
/**
* This method specifically implemented for REST API by removing application and data access logic
* from host object layer. So as per new implementation we need to pass requested scopes to this method
* as tokenScope. So we will do scope related other logic here in this method.
* So host object should only pass required 9 parameters.
* */
@Override
public Map<String, Object> requestApprovalForApplicationRegistration(String userId, String applicationName,
String tokenType, String callbackUrl,
String[] allowedDomains, String validityTime,
String tokenScope, String groupingId,
String jsonString
)
throws APIManagementException {
boolean isTenantFlowStarted = false;
String tenantDomain = MultitenantUtils.getTenantDomain(userId);
int tenantId = MultitenantConstants.INVALID_TENANT_ID;
try {
tenantId = ServiceReferenceHolder.getInstance().getRealmService().getTenantManager()
.getTenantId(tenantDomain);
} catch (UserStoreException e) {
handleException("Unable to retrieve the tenant information of the current user.", e);
}
//checking for authorized scopes
Set<Scope> scopeSet = new LinkedHashSet<Scope>();
List<Scope> authorizedScopes = new ArrayList<Scope>();
String authScopeString;
if (tokenScope != null && tokenScope.length() != 0 &&
!APIConstants.OAUTH2_DEFAULT_SCOPE.equals(tokenScope)) {
scopeSet.addAll(getScopesByScopeKeys(tokenScope, tenantId));
authorizedScopes = getAllowedScopesForUserApplication(userId, scopeSet);
}
if (!authorizedScopes.isEmpty()) {
Set<Scope> authorizedScopeSet = new HashSet<Scope>(authorizedScopes);
StringBuilder scopeBuilder = new StringBuilder();
for (Scope scope : authorizedScopeSet) {
scopeBuilder.append(scope.getKey()).append(' ');
}
authScopeString = scopeBuilder.toString();
} else {
authScopeString = APIConstants.OAUTH2_DEFAULT_SCOPE;
}
try {
if (tenantDomain != null && !MultitenantConstants.SUPER_TENANT_DOMAIN_NAME.equals(tenantDomain)) {
isTenantFlowStarted = startTenantFlowForTenantDomain(tenantDomain);
}
// initiate WorkflowExecutor
WorkflowExecutor appRegistrationWorkflow = null;
// initiate ApplicationRegistrationWorkflowDTO
ApplicationRegistrationWorkflowDTO appRegWFDto = null;
ApplicationKeysDTO appKeysDto = new ApplicationKeysDTO();
// get APIM application by Application Name and userId.
Application application = ApplicationUtils.retrieveApplication(applicationName, userId, groupingId);
boolean isCaseInsensitiveComparisons = Boolean.parseBoolean(getAPIManagerConfiguration().
getFirstProperty(APIConstants.API_STORE_FORCE_CI_COMPARISIONS));
boolean isUserAppOwner;
if (isCaseInsensitiveComparisons) {
isUserAppOwner = application.getSubscriber().getName().equalsIgnoreCase(userId);
} else {
isUserAppOwner = application.getSubscriber().getName().equals(userId);
}
if (!isUserAppOwner) {
throw new APIManagementException("user: " + application.getSubscriber().getName() + ", " +
"attempted to generate tokens for application owned by: " + userId);
}
// if its a PRODUCTION application.
if (APIConstants.API_KEY_TYPE_PRODUCTION.equals(tokenType)) {
// initiate workflow type. By default simple work flow will be
// executed.
appRegistrationWorkflow =
getWorkflowExecutor(WorkflowConstants.WF_TYPE_AM_APPLICATION_REGISTRATION_PRODUCTION);
appRegWFDto =
(ApplicationRegistrationWorkflowDTO) WorkflowExecutorFactory.getInstance()
.createWorkflowDTO(WorkflowConstants.WF_TYPE_AM_APPLICATION_REGISTRATION_PRODUCTION);
}// if it is a sandBox application.
else if (APIConstants.API_KEY_TYPE_SANDBOX.equals(tokenType)) { // if
// its
// a
// SANDBOX
// application.
appRegistrationWorkflow =
getWorkflowExecutor(WorkflowConstants.WF_TYPE_AM_APPLICATION_REGISTRATION_SANDBOX);
appRegWFDto =
(ApplicationRegistrationWorkflowDTO) WorkflowExecutorFactory.getInstance()
.createWorkflowDTO(WorkflowConstants.WF_TYPE_AM_APPLICATION_REGISTRATION_SANDBOX);
} else {
throw new APIManagementException("Invalid Token Type '" + tokenType + "' requested.");
}
//check whether callback url is empty and set null
if (StringUtils.isBlank(callbackUrl)) {
callbackUrl = null;
}
String applicationTokenType = application.getTokenType();
if (StringUtils.isEmpty(application.getTokenType())) {
applicationTokenType = APIConstants.DEFAULT_TOKEN_TYPE;
}
// Build key manager instance and create oAuthAppRequest by jsonString.
OAuthAppRequest request =
ApplicationUtils.createOauthAppRequest(applicationName, null,
callbackUrl, authScopeString, jsonString, applicationTokenType);
request.getOAuthApplicationInfo().addParameter(ApplicationConstants.VALIDITY_PERIOD, validityTime);
request.getOAuthApplicationInfo().addParameter(ApplicationConstants.APP_KEY_TYPE, tokenType);
request.getOAuthApplicationInfo().addParameter(ApplicationConstants.APP_CALLBACK_URL, callbackUrl);
// Setting request values in WorkflowDTO - In future we should keep
// Application/OAuthApplication related
// information in the respective entities not in the workflowDTO.
appRegWFDto.setStatus(WorkflowStatus.CREATED);
appRegWFDto.setCreatedTime(System.currentTimeMillis());
appRegWFDto.setTenantDomain(tenantDomain);
appRegWFDto.setTenantId(tenantId);
appRegWFDto.setExternalWorkflowReference(appRegistrationWorkflow.generateUUID());
appRegWFDto.setWorkflowReference(appRegWFDto.getExternalWorkflowReference());
appRegWFDto.setApplication(application);
request.setMappingId(appRegWFDto.getWorkflowReference());
if (!application.getSubscriber().getName().equals(userId)) {
appRegWFDto.setUserName(application.getSubscriber().getName());
} else {
appRegWFDto.setUserName(userId);
}
appRegWFDto.setCallbackUrl(appRegistrationWorkflow.getCallbackURL());
appRegWFDto.setAppInfoDTO(request);
appRegWFDto.setDomainList(allowedDomains);
appRegWFDto.setKeyDetails(appKeysDto);
appRegistrationWorkflow.execute(appRegWFDto);
Map<String, Object> keyDetails = new HashMap<String, Object>();
keyDetails.put("keyState", appRegWFDto.getStatus().toString());
OAuthApplicationInfo applicationInfo = appRegWFDto.getApplicationInfo();
if (applicationInfo != null) {
keyDetails.put("consumerKey", applicationInfo.getClientId());
keyDetails.put("consumerSecret", applicationInfo.getClientSecret());
keyDetails.put("appDetails", applicationInfo.getJsonString());
}
// There can be instances where generating the Application Token is
// not required. In those cases,
// token info will have nothing.
AccessTokenInfo tokenInfo = appRegWFDto.getAccessTokenInfo();
if (tokenInfo != null) {
keyDetails.put("accessToken", tokenInfo.getAccessToken());
keyDetails.put("validityTime", tokenInfo.getValidityPeriod());
keyDetails.put("tokenDetails", tokenInfo.getJSONString());
keyDetails.put("tokenScope", tokenInfo.getScopes());
}
JSONObject appLogObject = new JSONObject();
appLogObject.put("Generated keys for application", application.getName());
APIUtil.logAuditMessage(APIConstants.AuditLogConstants.APPLICATION, appLogObject.toString(),
APIConstants.AuditLogConstants.UPDATED, this.username);
return keyDetails;
} catch (WorkflowException e) {
log.error("Could not execute Workflow", e);
throw new APIManagementException(e);
} finally {
if (isTenantFlowStarted) {
endTenantFlow();
}
}
}
@Override
public Map<String, Object> requestApprovalForApplicationRegistrationByApplicationId(
Map<String, Object> appInfo) throws APIManagementException {
if (appInfo == null || appInfo.isEmpty()) {
log.error("Application information is not provided to request approval For Application Registration");
return new HashMap<String, Object>(0);
}
boolean isTenantFlowStarted = false;
String username = appInfo.get("username").toString();
String scopes = appInfo.get("scopes").toString();
String applicationName = appInfo.get("applicationName").toString();
String groupingId = appInfo.get("groupingId").toString();
String tokenType = appInfo.get("tokenType").toString();
String callbackUrl = appInfo.get("callbackUrl").toString();
String jsonParams = appInfo.get("jsonParams").toString();
String[] allowedDomains = (String[]) appInfo.get("allowedDomains");
String validityTime = appInfo.get("validityPeriod").toString();
int applicationId = Integer.valueOf(appInfo.get("applicationId").toString());
String tenantDomain = MultitenantUtils.getTenantDomain(username);
int tenantId = MultitenantConstants.INVALID_TENANT_ID;
try {
tenantId = ServiceReferenceHolder.getInstance().getRealmService().getTenantManager()
.getTenantId(tenantDomain);
} catch (UserStoreException e) {
String msg = "Unable to retrieve the tenant information of the current user.";
log.error(msg, e);
throw new APIManagementException(msg, e);
}
//checking for authorized scopes
Set<Scope> scopeSet = new LinkedHashSet<Scope>();
List<Scope> authorizedScopes = new ArrayList<Scope>();
String authScopeString;
if (scopes != null && scopes.length() != 0 && !APIConstants.OAUTH2_DEFAULT_SCOPE.equals(scopes)) {
scopeSet.addAll(getScopesByScopeKeys(scopes, tenantId));
authorizedScopes = getAllowedScopesForUserApplication(username, scopeSet);
}
if (!authorizedScopes.isEmpty()) {
StringBuilder scopeBuilder = new StringBuilder();
for (Scope scope : authorizedScopes) {
scopeBuilder.append(scope.getKey()).append(' ');
}
authScopeString = scopeBuilder.toString();
} else {
authScopeString = APIConstants.OAUTH2_DEFAULT_SCOPE;
}
try {
if (tenantDomain != null && !MultitenantConstants.SUPER_TENANT_DOMAIN_NAME.equals(tenantDomain)) {
isTenantFlowStarted = startTenantFlowForTenantDomain(tenantDomain);
}
// initiate WorkflowExecutor
WorkflowExecutor appRegistrationWorkflow = null;
// initiate ApplicationRegistrationWorkflowDTO
ApplicationRegistrationWorkflowDTO appRegWFDto = null;
ApplicationKeysDTO appKeysDto = new ApplicationKeysDTO();
// get APIM application by Application Id.
Application application = ApplicationUtils.retrieveApplicationById(applicationId);
// if its a PRODUCTION application.
if (APIConstants.API_KEY_TYPE_PRODUCTION.equals(tokenType)) {
// initiate workflow type. By default simple work flow will be
// executed.
appRegistrationWorkflow = getWorkflowExecutor(
WorkflowConstants.WF_TYPE_AM_APPLICATION_REGISTRATION_PRODUCTION);
appRegWFDto = (ApplicationRegistrationWorkflowDTO) WorkflowExecutorFactory.getInstance()
.createWorkflowDTO(WorkflowConstants.WF_TYPE_AM_APPLICATION_REGISTRATION_PRODUCTION);
}// if it is a sandBox application.
else if (APIConstants.API_KEY_TYPE_SANDBOX.equals(tokenType)) {
appRegistrationWorkflow = getWorkflowExecutor(
WorkflowConstants.WF_TYPE_AM_APPLICATION_REGISTRATION_SANDBOX);
appRegWFDto = (ApplicationRegistrationWorkflowDTO) WorkflowExecutorFactory.getInstance()
.createWorkflowDTO(WorkflowConstants.WF_TYPE_AM_APPLICATION_REGISTRATION_SANDBOX);
} else {
throw new APIManagementException("Invalid Token Type '" + tokenType + "' requested.");
}
//check whether callback url is empty and set null
if (StringUtils.isBlank(callbackUrl)) {
callbackUrl = null;
}
String applicationTokenType = application.getTokenType();
if (StringUtils.isEmpty(application.getTokenType())) {
applicationTokenType = APIConstants.DEFAULT_TOKEN_TYPE;
}
// Build key manager instance and create oAuthAppRequest by jsonString.
OAuthAppRequest request = ApplicationUtils
.createOauthAppRequest(applicationName, null, callbackUrl, authScopeString, jsonParams,
applicationTokenType);
request.getOAuthApplicationInfo().addParameter(ApplicationConstants.VALIDITY_PERIOD, validityTime);
request.getOAuthApplicationInfo().addParameter(ApplicationConstants.APP_KEY_TYPE, tokenType);
request.getOAuthApplicationInfo().addParameter(ApplicationConstants.APP_CALLBACK_URL, callbackUrl);
// Setting request values in WorkflowDTO - In future we should keep
// Application/OAuthApplication related
// information in the respective entities not in the workflowDTO.
appRegWFDto.setStatus(WorkflowStatus.CREATED);
appRegWFDto.setCreatedTime(System.currentTimeMillis());
appRegWFDto.setTenantDomain(tenantDomain);
appRegWFDto.setTenantId(tenantId);
appRegWFDto.setExternalWorkflowReference(appRegistrationWorkflow.generateUUID());
appRegWFDto.setWorkflowReference(appRegWFDto.getExternalWorkflowReference());
appRegWFDto.setApplication(application);
request.setMappingId(appRegWFDto.getWorkflowReference());
if (!application.getSubscriber().getName().equals(username)) {
appRegWFDto.setUserName(application.getSubscriber().getName());
} else {
appRegWFDto.setUserName(username);
}
appRegWFDto.setCallbackUrl(appRegistrationWorkflow.getCallbackURL());
appRegWFDto.setAppInfoDTO(request);
appRegWFDto.setDomainList(allowedDomains);
appRegWFDto.setKeyDetails(appKeysDto);
appRegistrationWorkflow.execute(appRegWFDto);
Map<String, Object> keyDetails = new HashMap<String, Object>();
keyDetails.put("keyState", appRegWFDto.getStatus().toString());
OAuthApplicationInfo applicationInfo = appRegWFDto.getApplicationInfo();
if (applicationInfo != null) {
keyDetails.put("consumerKey", applicationInfo.getClientId());
keyDetails.put("consumerSecret", applicationInfo.getClientSecret());
keyDetails.put("appDetails", applicationInfo.getJsonString());
}
// There can be instances where generating the Application Token is
// not required. In those cases,
// token info will have nothing.
AccessTokenInfo tokenInfo = appRegWFDto.getAccessTokenInfo();
if (tokenInfo != null) {
keyDetails.put("accessToken", tokenInfo.getAccessToken());
keyDetails.put("validityTime", tokenInfo.getValidityPeriod());
keyDetails.put("tokenDetails", tokenInfo.getJSONString());
keyDetails.put("tokenScope", tokenInfo.getScopes());
}
JSONObject appLogObject = new JSONObject();
appLogObject.put("Generated keys for application", application.getName());
APIUtil.logAuditMessage(APIConstants.AuditLogConstants.APPLICATION, appLogObject.toString(),
APIConstants.AuditLogConstants.UPDATED, this.username);
return keyDetails;
} catch (WorkflowException e) {
log.error("Could not execute Workflow", e);
throw new APIManagementException("Could not execute Workflow", e);
} finally {
if (isTenantFlowStarted) {
endTenantFlow();
}
}
}
private static List<Scope> getAllowedScopesForUserApplication(String username,
Set<Scope> reqScopeSet) {
String[] userRoles = null;
org.wso2.carbon.user.api.UserStoreManager userStoreManager = null;
String preservedCaseSensitiveValue = System.getProperty(PRESERVED_CASE_SENSITIVE_VARIABLE);
boolean preservedCaseSensitive = JavaUtils.isTrueExplicitly(preservedCaseSensitiveValue);
List<Scope> authorizedScopes = new ArrayList<Scope>();
try {
RealmService realmService = ServiceReferenceHolder.getInstance().getRealmService();
int tenantId = ServiceReferenceHolder.getInstance().getRealmService().getTenantManager()
.getTenantId(MultitenantUtils.getTenantDomain(username));
userStoreManager = realmService.getTenantUserRealm(tenantId).getUserStoreManager();
userRoles = userStoreManager.getRoleListOfUser(MultitenantUtils.getTenantAwareUsername(username));
} catch (org.wso2.carbon.user.api.UserStoreException e) {
// Log and return since we do not want to stop issuing the token in
// case of scope validation failures.
log.error("Error when getting the tenant's UserStoreManager or when getting roles of user ", e);
}
List<String> userRoleList;
if (userRoles != null) {
if (preservedCaseSensitive) {
userRoleList = Arrays.asList(userRoles);
} else {
userRoleList = new ArrayList<String>();
for (String userRole : userRoles) {
userRoleList.add(userRole.toLowerCase());
}
}
} else {
userRoleList = Collections.emptyList();
}
//Iterate the requested scopes list.
for (Scope scope : reqScopeSet) {
//Get the set of roles associated with the requested scope.
String roles = scope.getRoles();
//If the scope has been defined in the context of the App and if roles have been defined for the scope
if (roles != null && roles.length() != 0) {
List<String> roleList = new ArrayList<String>();
for (String scopeRole : roles.split(",")) {
if (preservedCaseSensitive) {
roleList.add(scopeRole.trim());
} else {
roleList.add(scopeRole.trim().toLowerCase());
}
}
//Check if user has at least one of the roles associated with the scope
roleList.retainAll(userRoleList);
if (!roleList.isEmpty()) {
authorizedScopes.add(scope);
}
}
}
return authorizedScopes;
}
@Override
public Map<String, String> completeApplicationRegistration(String userId, String applicationName, String tokenType,
String tokenScope, String groupingId)
throws APIManagementException {
Application application = apiMgtDAO.getApplicationByName(applicationName, userId, groupingId);
String status = apiMgtDAO.getRegistrationApprovalState(application.getId(), tokenType);
Map<String, String> keyDetails = null;
if (!application.getSubscriber().getName().equals(userId)) {
userId = application.getSubscriber().getName();
}
String workflowReference = apiMgtDAO.getWorkflowReference(applicationName, userId);
if (workflowReference != null) {
WorkflowDTO workflowDTO = null;
// Creating workflowDTO for the correct key type.
if (APIConstants.API_KEY_TYPE_PRODUCTION.equals(tokenType)) {
workflowDTO = WorkflowExecutorFactory.getInstance().createWorkflowDTO(
WorkflowConstants.WF_TYPE_AM_APPLICATION_REGISTRATION_PRODUCTION);
} else if (APIConstants.API_KEY_TYPE_SANDBOX.equals(tokenType)) {
workflowDTO = WorkflowExecutorFactory.getInstance().createWorkflowDTO(
WorkflowConstants.WF_TYPE_AM_APPLICATION_REGISTRATION_SANDBOX);
}
if (workflowDTO != null) {
// Set the workflow reference in the workflow dto and the populate method will fill in other details
// using the persisted request.
ApplicationRegistrationWorkflowDTO registrationWorkflowDTO = (ApplicationRegistrationWorkflowDTO)
workflowDTO;
registrationWorkflowDTO.setExternalWorkflowReference(workflowReference);
if (APIConstants.AppRegistrationStatus.REGISTRATION_APPROVED.equals(status)) {
apiMgtDAO.populateAppRegistrationWorkflowDTO(registrationWorkflowDTO);
try {
AbstractApplicationRegistrationWorkflowExecutor.dogenerateKeysForApplication
(registrationWorkflowDTO);
AccessTokenInfo tokenInfo = registrationWorkflowDTO.getAccessTokenInfo();
OAuthApplicationInfo oauthApp = registrationWorkflowDTO.getApplicationInfo();
keyDetails = new HashMap<String, String>();
if (tokenInfo != null) {
keyDetails.put("accessToken", tokenInfo.getAccessToken());
keyDetails.put("validityTime", Long.toString(tokenInfo.getValidityPeriod()));
keyDetails.put("tokenDetails", tokenInfo.getJSONString());
}
keyDetails.put("consumerKey", oauthApp.getClientId());
keyDetails.put("consumerSecret", oauthApp.getClientSecret());
keyDetails.put("appDetails", oauthApp.getJsonString());
} catch (APIManagementException e) {
APIUtil.handleException("Error occurred while Creating Keys.", e);
}
}
}
}
return keyDetails;
}
@Override
public Map<String, String> completeApplicationRegistration(String userId, int applicationId,
String tokenType, String tokenScope, String groupingId) throws APIManagementException {
Application application = apiMgtDAO.getApplicationById(applicationId);
String status = apiMgtDAO.getRegistrationApprovalState(application.getId(), tokenType);
Map<String, String> keyDetails = null;
if (!application.getSubscriber().getName().equals(userId)) {
userId = application.getSubscriber().getName();
}
//todo get workflow reference by appId
String workflowReference = apiMgtDAO.getWorkflowReferenceByApplicationId(application.getId(), userId);
if (workflowReference != null) {
WorkflowDTO workflowDTO = null;
// Creating workflowDTO for the correct key type.
if (APIConstants.API_KEY_TYPE_PRODUCTION.equals(tokenType)) {
workflowDTO = WorkflowExecutorFactory.getInstance()
.createWorkflowDTO(WorkflowConstants.WF_TYPE_AM_APPLICATION_REGISTRATION_PRODUCTION);
} else if (APIConstants.API_KEY_TYPE_SANDBOX.equals(tokenType)) {
workflowDTO = WorkflowExecutorFactory.getInstance()
.createWorkflowDTO(WorkflowConstants.WF_TYPE_AM_APPLICATION_REGISTRATION_SANDBOX);
}
if (workflowDTO != null) {
// Set the workflow reference in the workflow dto and the populate method will fill in other details
// using the persisted request.
ApplicationRegistrationWorkflowDTO registrationWorkflowDTO = (ApplicationRegistrationWorkflowDTO) workflowDTO;
registrationWorkflowDTO.setExternalWorkflowReference(workflowReference);
if (APIConstants.AppRegistrationStatus.REGISTRATION_APPROVED.equals(status)) {
apiMgtDAO.populateAppRegistrationWorkflowDTO(registrationWorkflowDTO);
try {
AbstractApplicationRegistrationWorkflowExecutor
.dogenerateKeysForApplication(registrationWorkflowDTO);
AccessTokenInfo tokenInfo = registrationWorkflowDTO.getAccessTokenInfo();
OAuthApplicationInfo oauthApp = registrationWorkflowDTO.getApplicationInfo();
keyDetails = new HashMap<String, String>();
if (tokenInfo != null) {
keyDetails.put("accessToken", tokenInfo.getAccessToken());
keyDetails.put("validityTime", Long.toString(tokenInfo.getValidityPeriod()));
keyDetails.put("tokenDetails", tokenInfo.getJSONString());
}
keyDetails.put("consumerKey", oauthApp.getClientId());
keyDetails.put("consumerSecret", oauthApp.getClientSecret());
keyDetails.put("accessallowdomains", registrationWorkflowDTO.getDomainList());
keyDetails.put("appDetails", oauthApp.getJsonString());
} catch (APIManagementException e) {
APIUtil.handleException("Error occurred while Creating Keys.", e);
}
}
}
}
return keyDetails;
}
/**
*
* @param userId APIM subscriber user ID.
* @param ApplicationName APIM application name.
* @return
* @throws APIManagementException
*/
@Override
public Application getApplicationsByName(String userId, String ApplicationName, String groupingId) throws
APIManagementException {
Application application = apiMgtDAO.getApplicationByName(ApplicationName, userId,groupingId);
if (application != null) {
checkAppAttributes(application, userId);
}
application = apiMgtDAO.getApplicationWithOAuthApps(ApplicationName, userId, groupingId);
if (application != null) {
Set<APIKey> keys = getApplicationKeys(application.getId());
for (APIKey key : keys) {
application.addKey(key);
}
}
return application;
}
/**
* Returns the corresponding application given the Id
* @param id Id of the Application
* @return it will return Application corresponds to the id.
* @throws APIManagementException
*/
@Override
public Application getApplicationById(int id) throws APIManagementException {
Application application = apiMgtDAO.getApplicationById(id);
if (application != null) {
Set<APIKey> keys = getApplicationKeys(application.getId());
for (APIKey key : keys) {
application.addKey(key);
}
}
return application;
}
/*
* @see super.getApplicationById(int id, String userId, String groupId)
* */
@Override
public Application getApplicationById(int id, String userId, String groupId) throws APIManagementException {
Application application = apiMgtDAO.getApplicationById(id, userId, groupId);
if (application != null) {
checkAppAttributes(application, userId);
Set<APIKey> keys = getApplicationKeys(application.getId());
for (APIKey key : keys) {
application.addKey(key);
}
}
return application;
}
/** get the status of the Application creation process given the application Id
*
* @param applicationId Id of the Application
* @return
* @throws APIManagementException
*/
@Override
public String getApplicationStatusById(int applicationId) throws APIManagementException {
return apiMgtDAO.getApplicationStatusById(applicationId);
}
@Override
public boolean isApplicationTokenExists(String accessToken) throws APIManagementException {
return apiMgtDAO.isAccessTokenExists(accessToken);
}
@Override
public String getGraphqlSchema(APIIdentifier apiId) throws APIManagementException {
return getGraphqlSchemaDefinition(apiId);
}
@Override
public Set<SubscribedAPI> getSubscribedIdentifiers(Subscriber subscriber, Identifier identifier, String groupingId)
throws APIManagementException {
Set<SubscribedAPI> subscribedAPISet = new HashSet<>();
Set<SubscribedAPI> subscribedAPIs = getSubscribedAPIs(subscriber, groupingId);
for (SubscribedAPI api : subscribedAPIs) {
if (identifier instanceof APIIdentifier && identifier.equals(api.getApiId())) {
Set<APIKey> keys = getApplicationKeys(api.getApplication().getId());
for (APIKey key : keys) {
api.addKey(key);
}
subscribedAPISet.add(api);
} else if (identifier instanceof APIProductIdentifier && identifier.equals(api.getProductId())) {
Set<APIKey> keys = getApplicationKeys(api.getApplication().getId());
for (APIKey key : keys) {
api.addKey(key);
}
subscribedAPISet.add(api);
}
}
return subscribedAPISet;
}
/**
* Returns a list of tiers denied
*
* @return Set<Tier>
*/
@Override
public Set<String> getDeniedTiers() throws APIManagementException {
// '0' is passed as argument whenever tenant id of logged in user is needed
return getDeniedTiers(0);
}
/**
* Returns a list of tiers denied
* @param apiProviderTenantId tenant id of API provider
* @return Set<Tier>
*/
@Override
public Set<String> getDeniedTiers(int apiProviderTenantId) throws APIManagementException {
Set<String> deniedTiers = new HashSet<String>();
String[] currentUserRoles;
if (apiProviderTenantId == 0) {
apiProviderTenantId = tenantId;
}
try {
if (apiProviderTenantId != 0) {
/* Get the roles of the Current User */
currentUserRoles = ((UserRegistry) ((UserAwareAPIConsumer) this).registry).
getUserRealm().getUserStoreManager().getRoleListOfUser(((UserRegistry) this.registry)
.getUserName());
Set<TierPermissionDTO> tierPermissions;
if (APIUtil.isAdvanceThrottlingEnabled()) {
tierPermissions = apiMgtDAO.getThrottleTierPermissions(apiProviderTenantId);
} else {
tierPermissions = apiMgtDAO.getTierPermissions(apiProviderTenantId);
}
for (TierPermissionDTO tierPermission : tierPermissions) {
String type = tierPermission.getPermissionType();
List<String> currentRolesList = new ArrayList<String>(Arrays.asList(currentUserRoles));
List<String> roles = new ArrayList<String>(Arrays.asList(tierPermission.getRoles()));
currentRolesList.retainAll(roles);
if (APIConstants.TIER_PERMISSION_ALLOW.equals(type)) {
/* Current User is not allowed for this Tier*/
if (currentRolesList.isEmpty()) {
deniedTiers.add(tierPermission.getTierName());
}
} else {
/* Current User is denied for this Tier*/
if (currentRolesList.size() > 0) {
deniedTiers.add(tierPermission.getTierName());
}
}
}
}
} catch (org.wso2.carbon.user.api.UserStoreException e) {
log.error("cannot retrieve user role list for tenant" + tenantDomain, e);
}
return deniedTiers;
}
@Override
public Set<TierPermission> getTierPermissions() throws APIManagementException {
Set<TierPermission> tierPermissions = new HashSet<TierPermission>();
if (tenantId != 0) {
Set<TierPermissionDTO> tierPermissionDtos;
if (APIUtil.isAdvanceThrottlingEnabled()) {
tierPermissionDtos = apiMgtDAO.getThrottleTierPermissions(tenantId);
} else {
tierPermissionDtos = apiMgtDAO.getTierPermissions(tenantId);
}
for (TierPermissionDTO tierDto : tierPermissionDtos) {
TierPermission tierPermission = new TierPermission(tierDto.getTierName());
tierPermission.setRoles(tierDto.getRoles());
tierPermission.setPermissionType(tierDto.getPermissionType());
tierPermissions.add(tierPermission);
}
}
return tierPermissions;
}
/**
* Check whether given Tier is denied for the user
*
* @param tierName
* @return
* @throws APIManagementException if failed to get the tiers
*/
@Override
public boolean isTierDeneid(String tierName) throws APIManagementException {
String[] currentUserRoles;
try {
if (tenantId != 0) {
/* Get the roles of the Current User */
currentUserRoles = ((UserRegistry) ((UserAwareAPIConsumer) this).registry).
getUserRealm().getUserStoreManager().getRoleListOfUser(((UserRegistry) this.registry).getUserName());
TierPermissionDTO tierPermission;
if(APIUtil.isAdvanceThrottlingEnabled()){
tierPermission = apiMgtDAO.getThrottleTierPermission(tierName, tenantId);
}else{
tierPermission = apiMgtDAO.getTierPermission(tierName, tenantId);
}
if (tierPermission == null) {
return false;
} else {
List<String> currentRolesList = new ArrayList<String>(Arrays.asList(currentUserRoles));
List<String> roles = new ArrayList<String>(Arrays.asList(tierPermission.getRoles()));
currentRolesList.retainAll(roles);
if (APIConstants.TIER_PERMISSION_ALLOW.equals(tierPermission.getPermissionType())) {
if (currentRolesList.isEmpty()) {
return true;
}
} else {
if (currentRolesList.size() > 0) {
return true;
}
}
}
}
} catch (org.wso2.carbon.user.api.UserStoreException e) {
log.error("cannot retrieve user role list for tenant" + tenantDomain, e);
}
return false;
}
private boolean isTenantDomainNotMatching(String tenantDomain) {
if (this.tenantDomain != null) {
return !(this.tenantDomain.equals(tenantDomain));
}
return true;
}
@Override
public Set<API> searchAPI(String searchTerm, String searchType, String tenantDomain)
throws APIManagementException {
return null;
}
public Set<Scope> getScopesBySubscribedAPIs(List<APIIdentifier> identifiers)
throws APIManagementException {
return apiMgtDAO.getScopesBySubscribedAPIs(identifiers);
}
public String getScopesByToken(String accessToken) throws APIManagementException {
return null;
}
public Set<Scope> getScopesByScopeKeys(String scopeKeys, int tenantId)
throws APIManagementException {
return apiMgtDAO.getScopesByScopeKeys(scopeKeys, tenantId);
}
@Override
public String getGroupId(int appId) throws APIManagementException {
return apiMgtDAO.getGroupId(appId);
}
@Override
public String[] getGroupIds(String response) throws APIManagementException {
String groupingExtractorClass = APIUtil.getGroupingExtractorImplementation();
return APIUtil.getGroupIdsFromExtractor(response, groupingExtractorClass);
}
/**
* Returns all applications associated with given subscriber, groupingId and search criteria.
*
* @param subscriber Subscriber
* @param groupingId The groupId to which the applications must belong.
* @param offset The offset.
* @param search The search string.
* @param sortColumn The sort column.
* @param sortOrder The sort order.
* @return Application[] The Applications.
* @throws APIManagementException
*/
@Override
public Application[] getApplicationsWithPagination(Subscriber subscriber, String groupingId, int start , int offset
, String search, String sortColumn, String sortOrder)
throws APIManagementException {
return apiMgtDAO.getApplicationsWithPagination(subscriber, groupingId, start, offset,
search, sortColumn, sortOrder);
}
/**
* Returns all applications associated with given subscriber and groupingId.
*
* @param subscriber The subscriber.
* @param groupingId The groupId to which the applications must belong.
* @return Application[] Array of applications.
* @throws APIManagementException
*/
@Override
public Application[] getApplications(Subscriber subscriber, String groupingId)
throws APIManagementException {
Application[] applications = apiMgtDAO.getApplications(subscriber, groupingId);
for (Application application : applications) {
Set<APIKey> keys = getApplicationKeys(application.getId());
for (APIKey key : keys) {
application.addKey(key);
}
}
return applications;
}
/**
* Returns all API keys associated with given application id.
*
* @param applicationId The id of the application.
* @return Set<APIKey> Set of API keys of the application.
* @throws APIManagementException
*/
protected Set<APIKey> getApplicationKeys(int applicationId) throws APIManagementException {
Set<APIKey> apiKeys = new HashSet<APIKey>();
APIKey productionKey = getApplicationKey(applicationId, APIConstants.API_KEY_TYPE_PRODUCTION);
if (productionKey != null) {
apiKeys.add(productionKey);
} else {
productionKey = apiMgtDAO.getKeyStatusOfApplication(APIConstants.API_KEY_TYPE_PRODUCTION, applicationId);
if (productionKey != null) {
productionKey.setType(APIConstants.API_KEY_TYPE_PRODUCTION);
apiKeys.add(productionKey);
}
}
APIKey sandboxKey = getApplicationKey(applicationId, APIConstants.API_KEY_TYPE_SANDBOX);
if (sandboxKey != null) {
apiKeys.add(sandboxKey);
} else {
sandboxKey = apiMgtDAO.getKeyStatusOfApplication(APIConstants.API_KEY_TYPE_SANDBOX, applicationId);
if (sandboxKey != null) {
sandboxKey.setType(APIConstants.API_KEY_TYPE_SANDBOX);
apiKeys.add(sandboxKey);
}
}
return apiKeys;
}
/**
* Returns the key associated with given application id and key type.
*
* @param applicationId Id of the Application.
* @param keyType The type of key.
* @return APIKey The key of the application.
* @throws APIManagementException
*/
protected APIKey getApplicationKey(int applicationId, String keyType) throws APIManagementException {
String consumerKey = apiMgtDAO.getConsumerkeyByApplicationIdAndKeyType(String.valueOf(applicationId), keyType);
if (StringUtils.isNotEmpty(consumerKey)) {
String consumerKeyStatus = apiMgtDAO.getKeyStatusOfApplication(keyType, applicationId).getState();
KeyManager keyManager = KeyManagerHolder.getKeyManagerInstance();
OAuthApplicationInfo oAuthApplicationInfo = keyManager.retrieveApplication(consumerKey);
AccessTokenInfo tokenInfo = keyManager.getAccessTokenByConsumerKey(consumerKey);
APIKey apiKey = new APIKey();
apiKey.setConsumerKey(consumerKey);
apiKey.setType(keyType);
apiKey.setState(consumerKeyStatus);
if (oAuthApplicationInfo != null) {
apiKey.setConsumerSecret(oAuthApplicationInfo.getClientSecret());
apiKey.setCallbackUrl(oAuthApplicationInfo.getCallBackURL());
if (oAuthApplicationInfo.getParameter(APIConstants.JSON_GRANT_TYPES) != null) {
apiKey.setGrantTypes(oAuthApplicationInfo.getParameter(APIConstants.JSON_GRANT_TYPES).toString());
}
}
if (tokenInfo != null) {
apiKey.setAccessToken(tokenInfo.getAccessToken());
apiKey.setValidityPeriod(tokenInfo.getValidityPeriod());
apiKey.setTokenScope(getScopeString(tokenInfo.getScopes()));
} else {
if (log.isDebugEnabled()) {
log.debug("Access token does not exist for Consumer Key: " + consumerKey);
}
}
return apiKey;
}
if (log.isDebugEnabled()) {
log.debug("Consumer key does not exist for Application Id: " + applicationId + " Key Type: " + keyType);
}
return null;
}
/**
* Returns a single string containing the provided array of scopes.
*
* @param scopes The array of scopes.
* @return String Single string containing the provided array of scopes.
*/
private String getScopeString(String[] scopes) {
return StringUtils.join(scopes, " ");
}
@Override
public Application[] getLightWeightApplications(Subscriber subscriber, String groupingId) throws
APIManagementException {
return apiMgtDAO.getLightWeightApplications(subscriber, groupingId);
}
/**
* @param userId Subscriber name.
* @param applicationName of the Application.
* @param tokenType Token type (PRODUCTION | SANDBOX)
* @param callbackUrl callback URL
* @param allowedDomains allowedDomains for token.
* @param validityTime validity time period.
* @param groupingId APIM application id.
* @param jsonString Callback URL for the Application.
* @param tokenScope Scopes for the requested tokens.
* @return
* @throws APIManagementException
*/
@Override
public OAuthApplicationInfo updateAuthClient(String userId, String applicationName,
String tokenType,
String callbackUrl, String[] allowedDomains,
String validityTime,
String tokenScope,
String groupingId,
String jsonString) throws APIManagementException {
boolean tenantFlowStarted = false;
try {
if (tenantDomain != null && !MultitenantConstants.SUPER_TENANT_DOMAIN_NAME.equals(tenantDomain)) {
PrivilegedCarbonContext.startTenantFlow();
PrivilegedCarbonContext.getThreadLocalCarbonContext().setTenantDomain(tenantDomain, true);
tenantFlowStarted = true;
}
Application application = ApplicationUtils.retrieveApplication(applicationName, userId, groupingId);
final String subscriberName = application.getSubscriber().getName();
boolean isCaseInsensitiveComparisons = Boolean.parseBoolean(getAPIManagerConfiguration().
getFirstProperty(APIConstants.API_STORE_FORCE_CI_COMPARISIONS));
boolean isUserAppOwner;
if (isCaseInsensitiveComparisons) {
isUserAppOwner = subscriberName.equalsIgnoreCase(userId);
} else {
isUserAppOwner = subscriberName.equals(userId);
}
if (!isUserAppOwner) {
throw new APIManagementException("user: " + userId + ", attempted to update OAuth application " +
"owned by: " + subscriberName);
}
//Create OauthAppRequest object by passing json String.
OAuthAppRequest oauthAppRequest = ApplicationUtils.createOauthAppRequest(applicationName, null, callbackUrl,
tokenScope, jsonString, application.getTokenType());
oauthAppRequest.getOAuthApplicationInfo().addParameter(ApplicationConstants.APP_KEY_TYPE, tokenType);
String consumerKey = apiMgtDAO.getConsumerKeyForApplicationKeyType(applicationName, userId, tokenType,
groupingId);
oauthAppRequest.getOAuthApplicationInfo().setClientId(consumerKey);
//get key manager instance.
KeyManager keyManager = KeyManagerHolder.getKeyManagerInstance();
//call update method.
OAuthApplicationInfo updatedAppInfo = keyManager.updateApplication(oauthAppRequest);
JSONObject appLogObject = new JSONObject();
appLogObject.put(APIConstants.AuditLogConstants.APPLICATION_NAME, updatedAppInfo.getClientName());
appLogObject.put("Updated Oauth app with Call back URL", callbackUrl);
appLogObject.put("Updated Oauth app with grant types", jsonString);
APIUtil.logAuditMessage(APIConstants.AuditLogConstants.APPLICATION, appLogObject.toString(),
APIConstants.AuditLogConstants.UPDATED, this.username);
return updatedAppInfo;
} finally {
if (tenantFlowStarted) {
endTenantFlow();
}
}
}
/**
* @param userId Subscriber name.
* @param applicationName of the Application.
* @param applicationId of the Application.
* @param tokenType Token type (PRODUCTION | SANDBOX)
* @param callbackUrl callback URL
* @param allowedDomains allowedDomains for token.
* @param validityTime validity time period.
* @param groupingId APIM application id.
* @param jsonString Callback URL for the Application.
* @param tokenScope Scopes for the requested tokens.
* @return
* @throws APIManagementException
*/
@Override
public OAuthApplicationInfo updateAuthClientByAppId(String userId, String applicationName, int applicationId,
String tokenType, String callbackUrl, String[] allowedDomains, String validityTime, String tokenScope,
String groupingId, String jsonString) throws APIManagementException {
boolean tenantFlowStarted = false;
try {
if (tenantDomain != null && !MultitenantConstants.SUPER_TENANT_DOMAIN_NAME.equals(tenantDomain)) {
tenantFlowStarted = startTenantFlowForTenantDomain(tenantDomain);
}
Application application = ApplicationUtils.retrieveApplicationById(applicationId);
//Create OauthAppRequest object by passing json String.
OAuthAppRequest oauthAppRequest = ApplicationUtils.createOauthAppRequest(applicationName, null, callbackUrl,
tokenScope, jsonString, application.getTokenType());
oauthAppRequest.getOAuthApplicationInfo().addParameter(ApplicationConstants.APP_KEY_TYPE, tokenType);
String consumerKey = apiMgtDAO.getConsumerKeyForApplicationKeyType(applicationId, userId, tokenType,
groupingId);
oauthAppRequest.getOAuthApplicationInfo().setClientId(consumerKey);
//get key manager instance.
KeyManager keyManager = KeyManagerHolder.getKeyManagerInstance();
//call update method.
OAuthApplicationInfo updatedAppInfo = keyManager.updateApplication(oauthAppRequest);
JSONObject appLogObject = new JSONObject();
appLogObject.put(APIConstants.AuditLogConstants.APPLICATION_NAME, updatedAppInfo.getClientName());
appLogObject.put("Updated Oauth app with Call back URL", callbackUrl);
appLogObject.put("Updated Oauth app with grant types", jsonString);
APIUtil.logAuditMessage(APIConstants.AuditLogConstants.APPLICATION, appLogObject.toString(),
APIConstants.AuditLogConstants.UPDATED, this.username);
return updatedAppInfo;
} finally {
if (tenantFlowStarted) {
endTenantFlow();
}
}
}
/**
* This method perform delete oAuth application.
*
* @param consumerKey
* @throws APIManagementException
*/
@Override
public void deleteOAuthApplication(String consumerKey) throws APIManagementException {
//get key manager instance.
KeyManager keyManager = KeyManagerHolder.getKeyManagerInstance();
//delete oAuthApplication by calling key manager implementation
keyManager.deleteApplication(consumerKey);
Map<String, String> applicationIdAndTokenTypeMap =
apiMgtDAO.getApplicationIdAndTokenTypeByConsumerKey(consumerKey);
if (applicationIdAndTokenTypeMap != null) {
String applicationId = applicationIdAndTokenTypeMap.get("application_id");
String tokenType = applicationIdAndTokenTypeMap.get("token_type");
if (applicationId != null && tokenType != null) {
apiMgtDAO.deleteApplicationKeyMappingByConsumerKey(consumerKey);
apiMgtDAO.deleteApplicationRegistration(applicationId, tokenType);
}
}
}
@Override
public Application[] getApplicationsByOwner(String userId) throws APIManagementException {
return apiMgtDAO.getApplicationsByOwner(userId);
}
public boolean isSubscriberValid(String userId)
throws APIManagementException {
boolean isSubscribeValid = false;
if (apiMgtDAO.getSubscriber(userId) != null) {
isSubscribeValid = true;
} else {
return false;
}
return isSubscribeValid;
}
public boolean updateApplicationOwner(String userId, Application application) throws APIManagementException {
boolean isAppUpdated;
String consumerKey;
String oldUserName = application.getSubscriber().getName();
String oldTenantDomain = MultitenantUtils.getTenantDomain(oldUserName);
String newTenantDomain = MultitenantUtils.getTenantDomain(userId);
if (oldTenantDomain.equals(newTenantDomain)) {
if (isSubscriberValid(userId)) {
String applicationName = application.getName();
if (!APIUtil.isApplicationOwnedBySubscriber(userId, applicationName)) {
for (int i = 0; i < application.getKeys().size(); i++) {
KeyManager keyManager = KeyManagerHolder.getKeyManagerInstance();
/* retrieving OAuth application information for specific consumer key */
consumerKey = ((APIKey) ((ArrayList) application.getKeys()).get(i)).getConsumerKey();
OAuthApplicationInfo oAuthApplicationInfo = keyManager.retrieveApplication(consumerKey);
if (oAuthApplicationInfo.getParameter(ApplicationConstants.OAUTH_CLIENT_NAME) != null) {
OAuthAppRequest oauthAppRequest = ApplicationUtils.createOauthAppRequest(oAuthApplicationInfo.
getParameter(ApplicationConstants.OAUTH_CLIENT_NAME).toString(), null,
oAuthApplicationInfo.getCallBackURL(), null,
null, application.getTokenType());
oauthAppRequest.getOAuthApplicationInfo().setAppOwner(userId);
oauthAppRequest.getOAuthApplicationInfo().setClientId(consumerKey);
/* updating the owner of the OAuth application with userId */
OAuthApplicationInfo updatedAppInfo = keyManager.updateApplicationOwner(oauthAppRequest,
oldUserName);
isAppUpdated = true;
audit.info("Successfully updated the owner of application " + application.getName() +
" from " + oldUserName + " to " + userId + ".");
} else {
throw new APIManagementException("Unable to retrieve OAuth application information.");
}
}
} else {
throw new APIManagementException("Unable to update application owner to " + userId +
" as this user has an application with the same name. Update owner to another user.");
}
} else {
throw new APIManagementException(userId + " is not a subscriber");
}
} else {
throw new APIManagementException("Unable to update application owner to " +
userId + " as this user does not belong to " + oldTenantDomain + " domain.");
}
isAppUpdated = apiMgtDAO.updateApplicationOwner(userId, application);
return isAppUpdated;
}
public JSONObject resumeWorkflow(Object[] args) {
JSONObject row = new JSONObject();
if (args != null && APIUtil.isStringArray(args)) {
String workflowReference = (String) args[0];
String status = (String) args[1];
String description = null;
if (args.length > 2 && args[2] != null) {
description = (String) args[2];
}
boolean isTenantFlowStarted = false;
try {
// if (workflowReference != null) {
WorkflowDTO workflowDTO = apiMgtDAO.retrieveWorkflow(workflowReference);
if (workflowDTO == null) {
log.error("Could not find workflow for reference " + workflowReference);
row.put("error", Boolean.TRUE);
row.put("statusCode", 500);
row.put("message", "Could not find workflow for reference " + workflowReference);
return row;
}
String tenantDomain = workflowDTO.getTenantDomain();
if (tenantDomain != null && !org.wso2.carbon.utils.multitenancy.MultitenantConstants
.SUPER_TENANT_DOMAIN_NAME.equals(tenantDomain)) {
isTenantFlowStarted = startTenantFlowForTenantDomain(tenantDomain);
}
workflowDTO.setWorkflowDescription(description);
workflowDTO.setStatus(WorkflowStatus.valueOf(status));
String workflowType = workflowDTO.getWorkflowType();
WorkflowExecutor workflowExecutor;
try {
workflowExecutor = getWorkflowExecutor(workflowType);
workflowExecutor.complete(workflowDTO);
} catch (WorkflowException e) {
throw new APIManagementException(e);
}
row.put("error", Boolean.FALSE);
row.put("statusCode", 200);
row.put("message", "Invoked workflow completion successfully.");
// }
} catch (IllegalArgumentException e) {
String msg = "Illegal argument provided. Valid values for status are APPROVED and REJECTED.";
log.error(msg, e);
row.put("error", Boolean.TRUE);
row.put("statusCode", 500);
row.put("message", msg);
} catch (APIManagementException e) {
String msg = "Error while resuming the workflow. ";
log.error(msg, e);
row.put("error", Boolean.TRUE);
row.put("statusCode", 500);
row.put("message", msg + e.getMessage());
} finally {
if (isTenantFlowStarted) {
endTenantFlow();
}
}
}
return row;
}
protected void endTenantFlow() {
PrivilegedCarbonContext.endTenantFlow();
}
protected boolean startTenantFlowForTenantDomain(String tenantDomain) {
boolean isTenantFlowStarted = true;
PrivilegedCarbonContext.startTenantFlow();
PrivilegedCarbonContext.getThreadLocalCarbonContext().setTenantDomain(tenantDomain, true);
return isTenantFlowStarted;
}
/**
* Returns a workflow executor
*
* @param workflowType Workflow executor type
* @return WorkflowExecutor of given type
* @throws WorkflowException if an error occurred while getting WorkflowExecutor
*/
protected WorkflowExecutor getWorkflowExecutor(String workflowType) throws WorkflowException {
return WorkflowExecutorFactory.getInstance().getWorkflowExecutor(workflowType);
}
@Override
public boolean isMonetizationEnabled(String tenantDomain) throws APIManagementException {
JSONObject apiTenantConfig = null;
try {
String content = apimRegistryService.getConfigRegistryResourceContent(tenantDomain, APIConstants.API_TENANT_CONF_LOCATION);
if (content != null) {
JSONParser parser = new JSONParser();
apiTenantConfig = (JSONObject) parser.parse(content);
}
} catch (UserStoreException e) {
handleException("UserStoreException thrown when getting API tenant config from registry", e);
} catch (RegistryException e) {
handleException("RegistryException thrown when getting API tenant config from registry", e);
} catch (ParseException e) {
handleException("ParseException thrown when passing API tenant config from registry", e);
}
return getTenantConfigValue(tenantDomain, apiTenantConfig, APIConstants.API_TENANT_CONF_ENABLE_MONITZATION_KEY);
}
private boolean getTenantConfigValue(String tenantDomain, JSONObject apiTenantConfig, String configKey) throws APIManagementException {
if (apiTenantConfig != null) {
Object value = apiTenantConfig.get(configKey);
if (value != null) {
return Boolean.parseBoolean(value.toString());
}
else {
throw new APIManagementException(configKey + " config does not exist for tenant " + tenantDomain);
}
}
return false;
}
/**
* To get the query to retrieve user role list query based on current role list.
*
* @return the query with user role list.
* @throws APIManagementException API Management Exception.
*/
private String getUserRoleListQuery() throws APIManagementException {
StringBuilder rolesQuery = new StringBuilder();
rolesQuery.append('(');
rolesQuery.append(APIConstants.NULL_USER_ROLE_LIST);
String[] userRoles = APIUtil.getListOfRoles((userNameWithoutChange != null)? userNameWithoutChange: username);
if (userRoles != null) {
for (String userRole : userRoles) {
rolesQuery.append(" OR ");
rolesQuery.append(ClientUtils.escapeQueryChars(APIUtil.sanitizeUserRole(userRole.toLowerCase())));
}
}
rolesQuery.append(")");
if(log.isDebugEnabled()) {
log.debug("User role list solr query " + APIConstants.STORE_VIEW_ROLES + "=" + rolesQuery.toString());
}
return APIConstants.STORE_VIEW_ROLES + "=" + rolesQuery.toString();
}
/**
* To get the current user's role list.
*
* @return user role list.
* @throws APIManagementException API Management Exception.
*/
private List<String> getUserRoleList() throws APIManagementException {
List<String> userRoleList;
if (userNameWithoutChange == null) {
userRoleList = new ArrayList<String>() {{
add(APIConstants.NULL_USER_ROLE_LIST);
}};
} else {
userRoleList = new ArrayList<String>(Arrays.asList(APIUtil.getListOfRoles(userNameWithoutChange)));
}
return userRoleList;
}
@Override
protected String getSearchQuery(String searchQuery) throws APIManagementException {
if (!isAccessControlRestrictionEnabled || ( userNameWithoutChange != null &&
APIUtil.hasPermission(userNameWithoutChange, APIConstants.Permissions
.APIM_ADMIN))) {
return searchQuery;
}
String criteria = getUserRoleListQuery();
if (searchQuery != null && !searchQuery.trim().isEmpty()) {
criteria = criteria + "&" + searchQuery;
}
return criteria;
}
@Deprecated // Remove this method once the jaggery store app is removed.
@Override
public String getWSDLDocument(String username, String tenantDomain, String resourceUrl,
Map environmentDetails, Map apiDetails) throws APIManagementException {
if (username == null) {
username = APIConstants.END_USER_ANONYMOUS;
}
if (tenantDomain == null) {
tenantDomain = MultitenantConstants.SUPER_TENANT_DOMAIN_NAME;
}
Map<String, Object> docResourceMap = APIUtil.getDocument(username, resourceUrl, tenantDomain);
String wsdlContent = "";
if (log.isDebugEnabled()) {
log.debug("WSDL document resource availability: " + docResourceMap.isEmpty());
}
if (!docResourceMap.isEmpty()) {
try {
ByteArrayOutputStream arrayOutputStream = new ByteArrayOutputStream();
IOUtils.copy((InputStream) docResourceMap.get("Data"), arrayOutputStream);
String apiName = (String) apiDetails.get(API_NAME);
String apiVersion = (String) apiDetails.get(API_VERSION);
String apiProvider = (String) apiDetails.get(API_PROVIDER);
String environmentName = (String) environmentDetails.get(ENVIRONMENT_NAME);
String environmentType = (String) environmentDetails.get(ENVIRONMENT_TYPE);
if (log.isDebugEnabled()) {
log.debug("Published SOAP api gateway environment name: " + environmentName + " environment type: "
+ environmentType);
}
if (resourceUrl.endsWith(APIConstants.ZIP_FILE_EXTENSION)) {
WSDLArchiveInfo archiveInfo = APIMWSDLReader
.extractAndValidateWSDLArchive((InputStream) docResourceMap.get("Data"))
.getWsdlArchiveInfo();
File folderToImport = new File(
archiveInfo.getLocation() + File.separator + APIConstants.API_WSDL_EXTRACTED_DIRECTORY);
Collection<File> wsdlFiles = APIFileUtil
.searchFilesWithMatchingExtension(folderToImport, APIFileUtil.WSDL_FILE_EXTENSION);
Collection<File> xsdFiles = APIFileUtil
.searchFilesWithMatchingExtension(folderToImport, APIFileUtil.XSD_FILE_EXTENSION);
if (wsdlFiles != null) {
for (File foundWSDLFile : wsdlFiles) {
Path fileLocation = Paths.get(foundWSDLFile.getAbsolutePath());
byte[] updatedWSDLContent = this
.getUpdatedWSDLByEnvironment(resourceUrl, Files.readAllBytes(fileLocation),
environmentName, environmentType, apiName, apiVersion, apiProvider);
File updatedWSDLFile = new File(foundWSDLFile.getPath());
wsdlFiles.remove(foundWSDLFile);
FileUtils.writeByteArrayToFile(updatedWSDLFile, updatedWSDLContent);
wsdlFiles.add(updatedWSDLFile);
}
wsdlFiles.addAll(xsdFiles);
ZIPUtils.zipFiles(folderToImport.getCanonicalPath() + APIConstants.UPDATED_WSDL_ZIP,
wsdlFiles);
wsdlContent = folderToImport.getCanonicalPath() + APIConstants.UPDATED_WSDL_ZIP;
}
} else {
arrayOutputStream = new ByteArrayOutputStream();
IOUtils.copy((InputStream) docResourceMap.get("Data"), arrayOutputStream);
byte[] updatedWSDLContent = this
.getUpdatedWSDLByEnvironment(resourceUrl, arrayOutputStream.toByteArray(), environmentName,
environmentType, apiName, apiVersion, apiProvider);
wsdlContent = new String(updatedWSDLContent);
}
} catch (IOException e) {
handleException("Error occurred while copying wsdl content into byte array stream for resource: "
+ resourceUrl, e);
}
} else {
handleException("No wsdl resource found for resource path: " + resourceUrl);
}
JSONObject data = new JSONObject();
data.put(APIConstants.DOCUMENTATION_RESOURCE_MAP_CONTENT_TYPE,
docResourceMap.get(APIConstants.DOCUMENTATION_RESOURCE_MAP_CONTENT_TYPE));
data.put(APIConstants.DOCUMENTATION_RESOURCE_MAP_NAME,
docResourceMap.get(APIConstants.DOCUMENTATION_RESOURCE_MAP_NAME));
data.put(APIConstants.DOCUMENTATION_RESOURCE_MAP_DATA, wsdlContent);
if (log.isDebugEnabled()) {
log.debug("Updated wsdl content details for wsdl resource: " + docResourceMap.get("name") + " is " +
data.toJSONString());
}
return data.toJSONString();
}
@Override
public ResourceFile getWSDL(APIIdentifier apiIdentifier, String environmentName, String environmentType)
throws APIManagementException {
WSDLValidationResponse validationResponse;
ResourceFile resourceFile = getWSDL(apiIdentifier);
if (resourceFile.getContentType().contains(APIConstants.APPLICATION_ZIP)) {
validationResponse = APIMWSDLReader.extractAndValidateWSDLArchive(resourceFile.getContent());
} else {
validationResponse = APIMWSDLReader.validateWSDLFile(resourceFile.getContent());
}
if (validationResponse.isValid()) {
API api = getAPI(apiIdentifier);
WSDLProcessor wsdlProcessor = validationResponse.getWsdlProcessor();
wsdlProcessor.updateEndpoints(api, environmentName, environmentType);
InputStream wsdlDataStream = wsdlProcessor.getWSDL();
return new ResourceFile(wsdlDataStream, resourceFile.getContentType());
} else {
throw new APIManagementException(ExceptionCodes.from(ExceptionCodes.CORRUPTED_STORED_WSDL,
apiIdentifier.toString()));
}
}
@Override
public Set<SubscribedAPI> getLightWeightSubscribedIdentifiers(Subscriber subscriber, APIIdentifier apiIdentifier,
String groupingId) throws APIManagementException {
Set<SubscribedAPI> subscribedAPISet = new HashSet<SubscribedAPI>();
Set<SubscribedAPI> subscribedAPIs = getLightWeightSubscribedAPIs(subscriber, groupingId);
for (SubscribedAPI api : subscribedAPIs) {
if (api.getApiId().equals(apiIdentifier)) {
subscribedAPISet.add(api);
}
}
return subscribedAPISet;
}
public Set<APIKey> getApplicationKeysOfApplication(int applicationId) throws APIManagementException {
Set<APIKey> apikeys = getApplicationKeys(applicationId);
return apikeys;
}
/**
* To check authorization of the API against current logged in user. If the user is not authorized an exception
* will be thrown.
*
* @param identifier API identifier
* @throws APIManagementException APIManagementException
*/
protected void checkAccessControlPermission(Identifier identifier) throws APIManagementException {
if (identifier == null || !isAccessControlRestrictionEnabled) {
if (!isAccessControlRestrictionEnabled && log.isDebugEnabled() && identifier != null) {
log.debug(
"Publisher access control restriction is not enabled. Hence the API/Product " + identifier.getName()
+ " should not be checked for further permission. Registry permission check "
+ "is sufficient");
}
return;
}
String resourcePath = StringUtils.EMPTY;
String identifierType = StringUtils.EMPTY;
if (identifier instanceof APIIdentifier) {
resourcePath = APIUtil.getAPIPath((APIIdentifier) identifier);
identifierType = APIConstants.API_IDENTIFIER_TYPE;
} else if (identifier instanceof APIProductIdentifier) {
resourcePath = APIUtil.getAPIProductPath((APIProductIdentifier) identifier);
identifierType = APIConstants.API_PRODUCT_IDENTIFIER_TYPE;
}
Registry registry;
try {
// Need user name with tenant domain to get correct domain name from
// MultitenantUtils.getTenantDomain(username)
String userNameWithTenantDomain = (userNameWithoutChange != null) ? userNameWithoutChange : username;
String apiTenantDomain = getTenantDomain(identifier);
int apiTenantId = getTenantManager().getTenantId(apiTenantDomain);
if (!MultitenantConstants.SUPER_TENANT_DOMAIN_NAME.equals(apiTenantDomain)) {
APIUtil.loadTenantRegistry(apiTenantId);
}
if (this.tenantDomain == null || !this.tenantDomain.equals(apiTenantDomain)) { //cross tenant scenario
registry = getRegistryService().getGovernanceUserRegistry(
getTenantAwareUsername(APIUtil.replaceEmailDomainBack(identifier.getProviderName())),
apiTenantId);
} else {
registry = this.registry;
}
Resource resource = registry.get(resourcePath);
String accessControlProperty = resource.getProperty(APIConstants.ACCESS_CONTROL);
if (accessControlProperty == null || accessControlProperty.trim().isEmpty() || accessControlProperty
.equalsIgnoreCase(APIConstants.NO_ACCESS_CONTROL)) {
if (log.isDebugEnabled()) {
log.debug(identifierType + " in the path " + resourcePath + " does not have any access control restriction");
}
return;
}
if (APIUtil.hasPermission(userNameWithTenantDomain, APIConstants.Permissions.APIM_ADMIN)) {
return;
}
String storeVisibilityRoles = resource.getProperty(APIConstants.STORE_VIEW_ROLES);
if (storeVisibilityRoles != null && !storeVisibilityRoles.trim().isEmpty()) {
String[] storeVisibilityRoleList = storeVisibilityRoles.split(",");
if (log.isDebugEnabled()) {
log.debug(identifierType + " has restricted access to users with the roles : " + Arrays
.toString(storeVisibilityRoleList));
}
String[] userRoleList = APIUtil.getListOfRoles(userNameWithTenantDomain);
if (log.isDebugEnabled()) {
log.debug("User " + username + " has roles " + Arrays.toString(userRoleList));
}
for (String role : storeVisibilityRoleList) {
role = role.trim();
if (role.equalsIgnoreCase(APIConstants.NULL_USER_ROLE_LIST) || APIUtil
.compareRoleList(userRoleList, role)) {
return;
}
}
if (log.isDebugEnabled()) {
log.debug(identifierType + " " + identifier + " cannot be accessed by user '" + username + "'. It "
+ "has a store visibility restriction");
}
throw new APIManagementException(
APIConstants.UN_AUTHORIZED_ERROR_MESSAGE + " view the " + identifierType + " " + identifier);
}
} catch (RegistryException e) {
throw new APIManagementException(
"Registry Exception while trying to check the store visibility restriction of " + identifierType + " " + identifier
.getName(), e);
} catch (org.wso2.carbon.user.api.UserStoreException e) {
String msg = "Failed to get " + identifierType + " from : " + resourcePath;
log.error(msg, e);
throw new APIManagementException(msg, e);
}
}
/**
* This method is used to get the updated wsdl with the respective environment apis are published
*
* @param wsdlResourcePath registry resource path to the wsdl
* @param wsdlContent wsdl resource content as byte array
* @param environmentType gateway environment type
* @return updated wsdl content with environment endpoints
* @throws APIManagementException
*/
private byte[] getUpdatedWSDLByEnvironment(String wsdlResourcePath, byte[] wsdlContent, String environmentName,
String environmentType, String apiName, String apiVersion, String apiProvider)
throws APIManagementException {
APIMWSDLReader apimwsdlReader = new APIMWSDLReader(wsdlResourcePath);
Definition definition = apimwsdlReader.getWSDLDefinitionFromByteContent(wsdlContent, false);
byte[] updatedWSDLContent = null;
boolean isTenantFlowStarted = false;
try {
String tenantDomain = MultitenantUtils.getTenantDomain(APIUtil.replaceEmailDomainBack(apiProvider));
if (tenantDomain != null && !MultitenantConstants.SUPER_TENANT_DOMAIN_NAME.equals(tenantDomain)) {
isTenantFlowStarted = true;
PrivilegedCarbonContext.startTenantFlow();
PrivilegedCarbonContext.getThreadLocalCarbonContext().setTenantDomain(tenantDomain, true);
}
RegistryService registryService = ServiceReferenceHolder.getInstance().getRegistryService();
int tenantId;
UserRegistry registry;
try {
tenantId = ServiceReferenceHolder.getInstance().getRealmService().getTenantManager()
.getTenantId(tenantDomain);
APIUtil.loadTenantRegistry(tenantId);
registry = registryService.getGovernanceSystemRegistry(tenantId);
API api = null;
if (!StringUtils.isEmpty(apiName) && !StringUtils.isEmpty(apiVersion)) {
APIIdentifier apiIdentifier = new APIIdentifier(APIUtil.replaceEmailDomain(apiProvider), apiName, apiVersion);
if (log.isDebugEnabled()) {
log.debug("Api identifier for the soap api artifact: " + apiIdentifier + "for api name: "
+ apiName + ", version: " + apiVersion);
}
GenericArtifact apiArtifact = APIUtil.getAPIArtifact(apiIdentifier, registry);
api = APIUtil.getAPI(apiArtifact);
if (log.isDebugEnabled()) {
if (api != null) {
log.debug(
"Api context for the artifact with id:" + api.getId() + " is " + api.getContext());
} else {
log.debug("Api does not exist for api name: " + apiIdentifier.getApiName());
}
}
} else {
handleException("Artifact does not exist in the registry for api name: " + apiName +
" and version: " + apiVersion);
}
if (api != null) {
try {
apimwsdlReader.setServiceDefinition(definition, api, environmentName, environmentType);
if (log.isDebugEnabled()) {
log.debug("Soap api with context:" + api.getContext() + " in " + environmentName
+ " with environment type" + environmentType);
}
updatedWSDLContent = apimwsdlReader.getWSDL(definition);
} catch (APIManagementException e) {
handleException("Error occurred while processing the wsdl for api: [" + api.getId() + "]", e);
}
} else {
handleException("Error while getting API object for wsdl artifact");
}
} catch (UserStoreException e) {
handleException("Error while reading tenant information", e);
} catch (RegistryException e) {
handleException("Error when create registry instance", e);
}
} finally {
if (isTenantFlowStarted) {
PrivilegedCarbonContext.endTenantFlow();
}
}
return updatedWSDLContent;
}
/**
* This method is used to get keys of custom attributes, configured by user
*
* @param userId user name of logged in user
* @return Array of JSONObject, contains keys of attributes
* @throws APIManagementException
*/
public JSONArray getAppAttributesFromConfig(String userId) throws APIManagementException {
String tenantDomain = MultitenantUtils.getTenantDomain(userId);
int tenantId = 0;
try {
tenantId = getTenantId(tenantDomain);
} catch (UserStoreException e) {
handleException("Error in getting tenantId of " + tenantDomain, e);
}
JSONArray applicationAttributes = null;
JSONObject applicationConfig = APIUtil.getAppAttributeKeysFromRegistry(tenantId);
if (applicationConfig != null) {
applicationAttributes = (JSONArray) applicationConfig.get(APIConstants.ApplicationAttributes.ATTRIBUTES);
} else {
APIManagerConfiguration configuration = getAPIManagerConfiguration();
applicationAttributes = configuration.getApplicationAttributes();
}
return applicationAttributes;
}
/**
* This method is used to validate keys of custom attributes, configured by user
*
* @param application
* @param userId user name of logged in user
* @throws APIManagementException
*/
public void checkAppAttributes(Application application, String userId) throws APIManagementException {
JSONArray applicationAttributesFromConfig = getAppAttributesFromConfig(userId);
Map<String, String> applicationAttributes = application.getApplicationAttributes();
List attributeKeys = new ArrayList<String>();
int applicationId = application.getId();
int tenantId = 0;
Map<String, String> newApplicationAttributes = new HashMap<>();
String tenantDomain = MultitenantUtils.getTenantDomain(userId);
try {
tenantId = getTenantId(tenantDomain);
} catch (UserStoreException e) {
handleException("Error in getting tenantId of " + tenantDomain, e);
}
for (Object object : applicationAttributesFromConfig) {
JSONObject attribute = (JSONObject) object;
attributeKeys.add(attribute.get(APIConstants.ApplicationAttributes.ATTRIBUTE));
}
for (Object key : applicationAttributes.keySet()) {
if (!attributeKeys.contains(key)) {
apiMgtDAO.deleteApplicationAttributes((String) key, applicationId);
if (log.isDebugEnabled()) {
log.debug("Removing " + key + "from application - " + application.getName());
}
}
}
for (Object key : attributeKeys) {
if (!applicationAttributes.keySet().contains(key)) {
newApplicationAttributes.put((String) key, "");
}
}
apiMgtDAO.addApplicationAttributes(newApplicationAttributes, applicationId, tenantId);
}
/**
* Store specific implementation of search paginated apis by content
* @param registry
* @param searchQuery
* @param start
* @param end
* @return
* @throws APIManagementException
*/
public Map<String, Object> searchPaginatedAPIsByContent(Registry registry, int tenantId, String searchQuery,
int start, int end, boolean limitAttributes) throws APIManagementException {
Map<String, Object> searchResults = super
.searchPaginatedAPIsByContent(registry, tenantId, searchQuery, start, end, limitAttributes);
return filterMultipleVersionedAPIs(searchResults);
}
@Override
public String getOpenAPIDefinition(Identifier apiId) throws APIManagementException {
String definition = super.getOpenAPIDefinition(apiId);
return APIUtil.removeXMediationScriptsFromSwagger(definition);
}
@Override
public String getOpenAPIDefinitionForEnvironment(Identifier apiId, String environmentName)
throws APIManagementException {
String apiTenantDomain;
String updatedDefinition = null;
String hostWithScheme;
String definition = super.getOpenAPIDefinition(apiId);
APIDefinition oasParser = OASParserUtil.getOASParser(definition);
if (apiId instanceof APIIdentifier) {
API api = getLightweightAPI((APIIdentifier) apiId);
//todo: use get api by id, so no need to set scopes or uri templates
api.setScopes(oasParser.getScopes(definition));
api.setUriTemplates(oasParser.getURITemplates(definition));
apiTenantDomain = MultitenantUtils.getTenantDomain(api.getId().getProviderName());
hostWithScheme = getHostWithSchemeForEnvironment(apiTenantDomain, environmentName);
api.setContext(getBasePath(apiTenantDomain, api.getContext()));
updatedDefinition = oasParser.getOASDefinitionForStore(api, definition, hostWithScheme);
} else if (apiId instanceof APIProductIdentifier) {
APIProduct apiProduct = getAPIProduct((APIProductIdentifier) apiId);
apiTenantDomain = MultitenantUtils.getTenantDomain(apiProduct.getId().getProviderName());
hostWithScheme = getHostWithSchemeForEnvironment(apiTenantDomain, environmentName);
apiProduct.setContext(getBasePath(apiTenantDomain, apiProduct.getContext()));
updatedDefinition = oasParser.getOASDefinitionForStore(apiProduct, definition, hostWithScheme);
}
return updatedDefinition;
}
@Override
public String getOpenAPIDefinitionForLabel(Identifier apiId, String labelName) throws APIManagementException {
List<Label> gatewayLabels;
String updatedDefinition = null;
String hostWithScheme;
String definition = super.getOpenAPIDefinition(apiId);
APIDefinition oasParser = OASParserUtil.getOASParser(definition);
if (apiId instanceof APIIdentifier) {
API api = getLightweightAPI((APIIdentifier) apiId);
gatewayLabels = api.getGatewayLabels();
hostWithScheme = getHostWithSchemeForLabel(gatewayLabels, labelName);
updatedDefinition = oasParser.getOASDefinitionForStore(api, definition, hostWithScheme);
} else if (apiId instanceof APIProductIdentifier) {
APIProduct apiProduct = getAPIProduct((APIProductIdentifier) apiId);
gatewayLabels = apiProduct.getGatewayLabels();
hostWithScheme = getHostWithSchemeForLabel(gatewayLabels, labelName);
updatedDefinition = oasParser.getOASDefinitionForStore(apiProduct, definition, hostWithScheme);
}
return updatedDefinition;
}
public void revokeAPIKey(String apiKey, long expiryTime, String tenantDomain) throws APIManagementException {
String baseUrl = APIConstants.HTTPS_PROTOCOL_URL_PREFIX + System.getProperty(APIConstants.KEYMANAGER_HOSTNAME) + ":" +
System.getProperty(APIConstants.KEYMANAGER_PORT) + APIConstants.UTILITY_WEB_APP_EP;
String apiKeyRevokeEp = baseUrl + APIConstants.API_KEY_REVOKE_PATH;
HttpPost method = new HttpPost(apiKeyRevokeEp);
int tenantId = APIUtil.getTenantIdFromTenantDomain(tenantDomain);
URL keyMgtURL = null;
try {
keyMgtURL = new URL(apiKeyRevokeEp);
APIManagerConfiguration config = ServiceReferenceHolder.getInstance()
.getAPIManagerConfigurationService().getAPIManagerConfiguration();
String username = config.getFirstProperty(APIConstants.API_KEY_VALIDATOR_USERNAME);
String password = config.getFirstProperty(APIConstants.API_KEY_VALIDATOR_PASSWORD);
byte[] credentials = Base64.encodeBase64((username + ":" + password).getBytes
(StandardCharsets.UTF_8));
int keyMgtPort = keyMgtURL.getPort();
String keyMgtProtocol = keyMgtURL.getProtocol();
method.setHeader("Authorization", "Basic " + new String(credentials, StandardCharsets.UTF_8));
HttpClient httpClient = APIUtil.getHttpClient(keyMgtPort, keyMgtProtocol);
JSONObject revokeRequestPayload = new JSONObject();
revokeRequestPayload.put("apikey", apiKey);
revokeRequestPayload.put("expiryTime", expiryTime);
revokeRequestPayload.put("tenantId", tenantId);
StringEntity requestEntity = new StringEntity(revokeRequestPayload.toString());
requestEntity.setContentType(APIConstants.APPLICATION_JSON_MEDIA_TYPE);
method.setEntity(requestEntity);
HttpResponse httpResponse = null;
httpResponse = httpClient.execute(method);
if (HttpStatus.SC_OK != httpResponse.getStatusLine().getStatusCode()) {
log.error("API Key revocation is unsuccessful with token signature " + APIUtil.getMaskedToken(apiKey));
throw new APIManagementException("Error while revoking API Key");
}
} catch (MalformedURLException e) {
String msg = "Error while constructing key manager URL " + apiKeyRevokeEp;
log.error(msg, e);
throw new APIManagementException(msg, e);
} catch (IOException e) {
String msg = "Error while executing the http client " + apiKeyRevokeEp;
log.error(msg, e);
throw new APIManagementException(msg, e);
}
}
private Map<String, Object> filterMultipleVersionedAPIs(Map<String, Object> searchResults) {
Object apiObj = searchResults.get("apis");
ArrayList<Object> apiSet;
ArrayList<APIProduct> apiProductSet = new ArrayList<>();
if (apiObj instanceof Set) {
apiSet = new ArrayList<>(((Set) apiObj));
} else {
apiSet = (ArrayList<Object>) apiObj;
}
//filter store results if displayMultipleVersions is set to false
Boolean displayMultipleVersions = APIUtil.isAllowDisplayMultipleVersions();
if (!displayMultipleVersions) {
SortedSet<API> resultApis = new TreeSet<API>(new APINameComparator());
for (Object result : apiSet) {
if (result instanceof API) {
resultApis.add((API)result);
} else if (result instanceof Map.Entry) {
Map.Entry<Documentation, API> entry = (Map.Entry<Documentation, API>)result;
resultApis.add(entry.getValue());
} else if (result instanceof APIProduct) {
apiProductSet.add((APIProduct)result);
}
}
Map<String, API> latestPublishedAPIs = new HashMap<String, API>();
Comparator<API> versionComparator = new APIVersionComparator();
String key;
//Run the result api list through API version comparator and filter out multiple versions
for (API api : resultApis) {
key = api.getId().getProviderName() + COLON_CHAR + api.getId().getApiName();
API existingAPI = latestPublishedAPIs.get(key);
if (existingAPI != null) {
// If we have already seen an API with the same name, make sure
// this one has a higher version number
if (versionComparator.compare(api, existingAPI) > 0) {
latestPublishedAPIs.put(key, api);
}
} else {
// We haven't seen this API before
latestPublishedAPIs.put(key, api);
}
}
//filter apiSet
ArrayList<Object> tempApiSet = new ArrayList<Object>();
for (Object result : apiSet) {
API api = null;
String mapKey;
API latestAPI;
if (result instanceof API) {
api = (API) result;
mapKey = api.getId().getProviderName() + COLON_CHAR + api.getId().getApiName();
if (latestPublishedAPIs.containsKey(mapKey)) {
latestAPI = latestPublishedAPIs.get(mapKey);
if (latestAPI.getId().equals(api.getId())) {
tempApiSet.add(api);
}
}
} else if (result instanceof Map.Entry) {
Map.Entry<Documentation, API> docEntry = (Map.Entry<Documentation, API>) result;
api = docEntry.getValue();
mapKey = api.getId().getProviderName() + COLON_CHAR + api.getId().getApiName();
if (latestPublishedAPIs.containsKey(mapKey)) {
latestAPI = latestPublishedAPIs.get(mapKey);
if (latestAPI.getId().equals(api.getId())) {
tempApiSet.add(docEntry);
}
}
}
}
apiSet = tempApiSet;
ArrayList<Object> resultAPIandProductSet = new ArrayList<>();
resultAPIandProductSet.addAll(apiSet);
resultAPIandProductSet.addAll(apiProductSet);
resultAPIandProductSet.sort(new ContentSearchResultNameComparator());
if (apiObj instanceof Set) {
searchResults.put("apis", new HashSet<>(resultAPIandProductSet));
} else {
searchResults.put("apis", resultAPIandProductSet);
}
}
return searchResults;
}
/**
* Validate application attributes and remove attributes that does not exist in the config
*
* @param applicationAttributes Application attributes provided
* @param keys Application attribute keys in config
* @return Validated application attributes
*/
private Map<String, String> validateApplicationAttributes(Map<String, String> applicationAttributes, Set keys) {
Iterator iterator = applicationAttributes.keySet().iterator();
while (iterator.hasNext()) {
String key = (String) iterator.next();
if (!keys.contains(key)) {
iterator.remove();
applicationAttributes.remove(key);
}
}
return applicationAttributes;
}
private String getHostWithSchemeForEnvironment(String apiTenantDomain, String environmentName) throws APIManagementException {
Map<String, String> domains = getTenantDomainMappings(apiTenantDomain, APIConstants.API_DOMAIN_MAPPINGS_GATEWAY);
String hostWithScheme = null;
if (!domains.isEmpty()) {
hostWithScheme = domains.get(APIConstants.CUSTOM_URL);
} else {
APIManagerConfiguration config = ServiceReferenceHolder.getInstance()
.getAPIManagerConfigurationService().getAPIManagerConfiguration();
Map<String, Environment> allEnvironments = config.getApiGatewayEnvironments();
Environment environment = allEnvironments.get(environmentName);
if (environment == null) {
handleException(
"Could not find provided environment '" + environmentName);
}
assert environment != null;
String[] hostsWithScheme = environment.getApiGatewayEndpoint().split(",");
for (String url : hostsWithScheme) {
if (url.startsWith(APIConstants.HTTPS_PROTOCOL_URL_PREFIX)) {
hostWithScheme = url;
break;
}
}
if (hostWithScheme == null) {
hostWithScheme = hostsWithScheme[0];
}
}
return hostWithScheme;
}
private String getHostWithSchemeForLabel(List<Label> gatewayLabels, String labelName) throws APIManagementException {
Label labelObj = null;
for (Label label : gatewayLabels) {
if (label.getName().equals(labelName)) {
labelObj = label;
break;
}
}
if (labelObj == null) {
handleException(
"Could not find provided label '" + labelName);
return null;
}
String hostWithScheme = null;
List<String> accessUrls = labelObj.getAccessUrls();
for (String url : accessUrls) {
if (url.startsWith(APIConstants.HTTPS_PROTOCOL_URL_PREFIX)) {
hostWithScheme = url;
break;
}
}
if (hostWithScheme == null) {
hostWithScheme = accessUrls.get(0);
}
return hostWithScheme;
}
private String getBasePath(String apiTenantDomain, String basePath) throws APIManagementException {
Map<String, String> domains =
getTenantDomainMappings(apiTenantDomain, APIConstants.API_DOMAIN_MAPPINGS_GATEWAY);
if (!domains.isEmpty()) {
return basePath.replace("/t/" + apiTenantDomain, "");
}
return basePath;
}
}
| components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/APIConsumerImpl.java | /*
* Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
*
* WSO2 Inc. 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.
*/
package org.wso2.carbon.apimgt.impl;
import org.apache.axis2.util.JavaUtils;
import org.apache.commons.codec.binary.Base64;
import org.apache.commons.io.FileUtils;
import org.apache.commons.io.IOUtils;
import org.apache.commons.io.output.ByteArrayOutputStream;
import org.apache.commons.lang3.BooleanUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.http.HttpResponse;
import org.apache.http.HttpStatus;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.entity.StringEntity;
import org.apache.solr.client.solrj.util.ClientUtils;
import org.json.simple.JSONArray;
import org.json.simple.JSONObject;
import org.json.simple.parser.JSONParser;
import org.json.simple.parser.ParseException;
import org.wso2.carbon.CarbonConstants;
import org.wso2.carbon.apimgt.api.APIConsumer;
import org.wso2.carbon.apimgt.api.APIDefinition;
import org.wso2.carbon.apimgt.api.APIManagementException;
import org.wso2.carbon.apimgt.api.APIMgtResourceNotFoundException;
import org.wso2.carbon.apimgt.api.ExceptionCodes;
import org.wso2.carbon.apimgt.api.WorkflowResponse;
import org.wso2.carbon.apimgt.api.model.API;
import org.wso2.carbon.apimgt.api.model.APIIdentifier;
import org.wso2.carbon.apimgt.api.model.APIKey;
import org.wso2.carbon.apimgt.api.model.APIProduct;
import org.wso2.carbon.apimgt.api.model.APIProductIdentifier;
import org.wso2.carbon.apimgt.api.model.APIRating;
import org.wso2.carbon.apimgt.api.model.AccessTokenInfo;
import org.wso2.carbon.apimgt.api.model.AccessTokenRequest;
import org.wso2.carbon.apimgt.api.model.ApiTypeWrapper;
import org.wso2.carbon.apimgt.api.model.Application;
import org.wso2.carbon.apimgt.api.model.ApplicationConstants;
import org.wso2.carbon.apimgt.api.model.ApplicationKeysDTO;
import org.wso2.carbon.apimgt.api.model.Comment;
import org.wso2.carbon.apimgt.api.model.Documentation;
import org.wso2.carbon.apimgt.api.model.Identifier;
import org.wso2.carbon.apimgt.api.model.KeyManager;
import org.wso2.carbon.apimgt.api.model.Label;
import org.wso2.carbon.apimgt.api.model.Monetization;
import org.wso2.carbon.apimgt.api.model.OAuthAppRequest;
import org.wso2.carbon.apimgt.api.model.OAuthApplicationInfo;
import org.wso2.carbon.apimgt.api.model.ResourceFile;
import org.wso2.carbon.apimgt.api.model.Scope;
import org.wso2.carbon.apimgt.api.model.SubscribedAPI;
import org.wso2.carbon.apimgt.api.model.Subscriber;
import org.wso2.carbon.apimgt.api.model.SubscriptionResponse;
import org.wso2.carbon.apimgt.api.model.Tag;
import org.wso2.carbon.apimgt.api.model.Tier;
import org.wso2.carbon.apimgt.api.model.TierPermission;
import org.wso2.carbon.apimgt.impl.caching.CacheInvalidator;
import org.wso2.carbon.apimgt.impl.definitions.OASParserUtil;
import org.wso2.carbon.apimgt.impl.dto.ApplicationDTO;
import org.wso2.carbon.apimgt.impl.dto.ApplicationRegistrationWorkflowDTO;
import org.wso2.carbon.apimgt.impl.dto.ApplicationWorkflowDTO;
import org.wso2.carbon.apimgt.impl.dto.Environment;
import org.wso2.carbon.apimgt.impl.dto.JwtTokenInfoDTO;
import org.wso2.carbon.apimgt.impl.dto.SubscriptionWorkflowDTO;
import org.wso2.carbon.apimgt.impl.dto.TierPermissionDTO;
import org.wso2.carbon.apimgt.impl.dto.WorkflowDTO;
import org.wso2.carbon.apimgt.impl.factory.KeyManagerHolder;
import org.wso2.carbon.apimgt.impl.internal.ServiceReferenceHolder;
import org.wso2.carbon.apimgt.impl.monetization.DefaultMonetizationImpl;
import org.wso2.carbon.apimgt.impl.token.ApiKeyGenerator;
import org.wso2.carbon.apimgt.impl.utils.APIFileUtil;
import org.wso2.carbon.apimgt.impl.utils.APIMWSDLReader;
import org.wso2.carbon.apimgt.impl.utils.APINameComparator;
import org.wso2.carbon.apimgt.impl.utils.APIUtil;
import org.wso2.carbon.apimgt.impl.utils.APIVersionComparator;
import org.wso2.carbon.apimgt.impl.utils.ApplicationUtils;
import org.wso2.carbon.apimgt.impl.utils.ContentSearchResultNameComparator;
import org.wso2.carbon.apimgt.impl.workflow.AbstractApplicationRegistrationWorkflowExecutor;
import org.wso2.carbon.apimgt.impl.workflow.GeneralWorkflowResponse;
import org.wso2.carbon.apimgt.impl.workflow.WorkflowConstants;
import org.wso2.carbon.apimgt.impl.workflow.WorkflowException;
import org.wso2.carbon.apimgt.impl.workflow.WorkflowExecutor;
import org.wso2.carbon.apimgt.impl.workflow.WorkflowExecutorFactory;
import org.wso2.carbon.apimgt.impl.workflow.WorkflowStatus;
import org.wso2.carbon.apimgt.impl.wsdl.WSDLProcessor;
import org.wso2.carbon.apimgt.impl.wsdl.model.WSDLArchiveInfo;
import org.wso2.carbon.apimgt.impl.wsdl.model.WSDLValidationResponse;
import org.wso2.carbon.context.PrivilegedCarbonContext;
import org.wso2.carbon.governance.api.common.dataobjects.GovernanceArtifact;
import org.wso2.carbon.governance.api.exception.GovernanceException;
import org.wso2.carbon.governance.api.generic.GenericArtifactManager;
import org.wso2.carbon.governance.api.generic.dataobjects.GenericArtifact;
import org.wso2.carbon.governance.api.util.GovernanceUtils;
import org.wso2.carbon.registry.common.TermData;
import org.wso2.carbon.registry.core.ActionConstants;
import org.wso2.carbon.registry.core.Association;
import org.wso2.carbon.registry.core.Registry;
import org.wso2.carbon.registry.core.RegistryConstants;
import org.wso2.carbon.registry.core.Resource;
import org.wso2.carbon.registry.core.config.RegistryContext;
import org.wso2.carbon.registry.core.exceptions.RegistryException;
import org.wso2.carbon.registry.core.pagination.PaginationContext;
import org.wso2.carbon.registry.core.service.RegistryService;
import org.wso2.carbon.registry.core.session.UserRegistry;
import org.wso2.carbon.registry.core.utils.RegistryUtils;
import org.wso2.carbon.user.api.AuthorizationManager;
import org.wso2.carbon.user.api.UserStoreException;
import org.wso2.carbon.user.core.service.RealmService;
import org.wso2.carbon.utils.multitenancy.MultitenantConstants;
import org.wso2.carbon.utils.multitenancy.MultitenantUtils;
import javax.cache.Caching;
import javax.wsdl.Definition;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.net.MalformedURLException;
import java.net.URL;
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.SortedSet;
import java.util.TreeSet;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
/**
* This class provides the core API store functionality. It is implemented in a very
* self-contained and 'pure' manner, without taking requirements like security into account,
* which are subject to frequent change. Due to this 'pure' nature and the significance of
* the class to the overall API management functionality, the visibility of the class has
* been reduced to package level. This means we can still use it for internal purposes and
* possibly even extend it, but it's totally off the limits of the users. Users wishing to
* programmatically access this functionality should use one of the extensions of this
* class which is visible to them. These extensions may add additional features like
* security to this class.
*/
public class APIConsumerImpl extends AbstractAPIManager implements APIConsumer {
private static final Log log = LogFactory.getLog(APIConsumerImpl.class);
private static final Log audit = CarbonConstants.AUDIT_LOG;
public static final char COLON_CHAR = ':';
public static final String EMPTY_STRING = "";
public static final String ENVIRONMENT_NAME = "environmentName";
public static final String ENVIRONMENT_TYPE = "environmentType";
public static final String API_NAME = "apiName";
public static final String API_VERSION = "apiVersion";
public static final String API_PROVIDER = "apiProvider";
private static final String PRESERVED_CASE_SENSITIVE_VARIABLE = "preservedCaseSensitive";
/* Map to Store APIs against Tag */
private ConcurrentMap<String, Set<API>> taggedAPIs = new ConcurrentHashMap<String, Set<API>>();
private boolean isTenantModeStoreView;
private String requestedTenant;
private boolean isTagCacheEnabled;
private Set<Tag> tagSet;
private long tagCacheValidityTime;
private volatile long lastUpdatedTime;
private volatile long lastUpdatedTimeForTagApi;
private final Object tagCacheMutex = new Object();
private final Object tagWithAPICacheMutex = new Object();
protected APIMRegistryService apimRegistryService;
protected String userNameWithoutChange;
public APIConsumerImpl() throws APIManagementException {
super();
readTagCacheConfigs();
}
public APIConsumerImpl(String username, APIMRegistryService apimRegistryService) throws APIManagementException {
super(username);
userNameWithoutChange = username;
readTagCacheConfigs();
this.apimRegistryService = apimRegistryService;
}
private void readTagCacheConfigs() {
APIManagerConfiguration config = getAPIManagerConfiguration();
String enableTagCache = config.getFirstProperty(APIConstants.STORE_TAG_CACHE_DURATION);
if (enableTagCache == null) {
isTagCacheEnabled = false;
tagCacheValidityTime = 0;
} else {
isTagCacheEnabled = true;
tagCacheValidityTime = Long.parseLong(enableTagCache);
}
}
@Override
public Subscriber getSubscriber(String subscriberId) throws APIManagementException {
Subscriber subscriber = null;
try {
subscriber = apiMgtDAO.getSubscriber(subscriberId);
} catch (APIManagementException e) {
handleException("Failed to get Subscriber", e);
}
return subscriber;
}
/**
* Returns the set of APIs with the given tag from the taggedAPIs Map
*
* @param tagName The name of the tag
* @return Set of {@link API} with the given tag
* @throws APIManagementException
*/
@Override
public Set<API> getAPIsWithTag(String tagName, String requestedTenantDomain) throws APIManagementException {
/* We keep track of the lastUpdatedTime of the TagCache to determine its freshness.
*/
long lastUpdatedTimeAtStart = lastUpdatedTimeForTagApi;
long currentTimeAtStart = System.currentTimeMillis();
if(isTagCacheEnabled && ( (currentTimeAtStart- lastUpdatedTimeAtStart) < tagCacheValidityTime)){
if (taggedAPIs != null && taggedAPIs.containsKey(tagName)) {
return taggedAPIs.get(tagName);
}
}else{
synchronized (tagWithAPICacheMutex) {
lastUpdatedTimeForTagApi = System.currentTimeMillis();
taggedAPIs = new ConcurrentHashMap<String, Set<API>>();
}
}
boolean isTenantMode = requestedTenantDomain != null && !"null".equalsIgnoreCase(requestedTenantDomain);
this.isTenantModeStoreView = isTenantMode;
if (requestedTenantDomain != null && !"null".equals(requestedTenantDomain)) {
this.requestedTenant = requestedTenantDomain;
}
Registry userRegistry;
boolean isTenantFlowStarted = false;
Set<API> apisWithTag = null;
try {
//start the tenant flow prior to loading registry
if (requestedTenant != null && !MultitenantConstants.SUPER_TENANT_DOMAIN_NAME.equals(requestedTenant)) {
isTenantFlowStarted = startTenantFlowForTenantDomain(requestedTenantDomain);
}
if ((isTenantMode && this.tenantDomain == null) ||
(isTenantMode && isTenantDomainNotMatching(requestedTenantDomain))) {//Tenant store anonymous mode
int tenantId = getTenantId(requestedTenantDomain);
// explicitly load the tenant's registry
APIUtil.loadTenantRegistry(tenantId);
userRegistry = getGovernanceUserRegistry(tenantId);
setUsernameToThreadLocalCarbonContext(CarbonConstants.REGISTRY_ANONNYMOUS_USERNAME);
} else {
userRegistry = registry;
setUsernameToThreadLocalCarbonContext(this.username);
}
apisWithTag = getAPIsWithTag(userRegistry, tagName);
/* Add the APIs against the tag name */
if (!apisWithTag.isEmpty()) {
if (taggedAPIs.containsKey(tagName)) {
for (API api : apisWithTag) {
taggedAPIs.get(tagName).add(api);
}
} else {
taggedAPIs.putIfAbsent(tagName, apisWithTag);
}
}
} catch (RegistryException e) {
handleException("Failed to get api by the tag", e);
} catch (UserStoreException e) {
handleException("Failed to get api by the tag", e);
} finally {
if (isTenantFlowStarted) {
endTenantFlow();
}
}
return apisWithTag;
}
protected void setUsernameToThreadLocalCarbonContext(String username) {
PrivilegedCarbonContext.getThreadLocalCarbonContext().setUsername(username);
}
protected UserRegistry getGovernanceUserRegistry(int tenantId) throws RegistryException {
return ServiceReferenceHolder.getInstance().getRegistryService().
getGovernanceUserRegistry(CarbonConstants.REGISTRY_ANONNYMOUS_USERNAME, tenantId);
}
protected int getTenantId(String requestedTenantDomain) throws UserStoreException {
return ServiceReferenceHolder.getInstance().getRealmService().getTenantManager()
.getTenantId(requestedTenantDomain);
}
/**
* Returns the set of APIs with the given tag from the taggedAPIs Map.
*
* @param tag The name of the tag
* @param start The starting index of the return result set
* @param end The end index of the return result set
* @return A {@link Map} of APIs(between the given indexes) and the total number indicating all the available
* APIs count
* @throws APIManagementException
*/
@Override
public Map<String, Object> getPaginatedAPIsWithTag(String tag, int start, int end, String tenantDomain) throws APIManagementException {
List<API> apiList = new ArrayList<API>();
Set<API> resultSet = new TreeSet<API>(new APIVersionComparator());
Map<String, Object> results = new HashMap<String, Object>();
Set<API> taggedAPISet = this.getAPIsWithTag(tag,tenantDomain);
if (taggedAPISet != null) {
if (taggedAPISet.size() < end) {
end = taggedAPISet.size();
}
int totalLength;
apiList.addAll(taggedAPISet);
totalLength = apiList.size();
if (totalLength <= ((start + end) - 1)) {
end = totalLength;
} else {
end = start + end;
}
for (int i = start; i < end; i++) {
resultSet.add(apiList.get(i));
}
results.put("apis", resultSet);
results.put("length", taggedAPISet.size());
} else {
results.put("apis", null);
results.put("length", 0);
}
return results;
}
/**
* Returns the set of APIs with the given tag, retrieved from registry
*
* @param registry - Current registry; tenant/SuperTenant
* @param tag - The tag name
* @return A {@link Set} of {@link API} objects.
* @throws APIManagementException
*/
private Set<API> getAPIsWithTag(Registry registry, String tag)
throws APIManagementException {
Set<API> apiSet = new TreeSet<API>(new APINameComparator());
try {
List<GovernanceArtifact> genericArtifacts =
GovernanceUtils.findGovernanceArtifacts(getSearchQuery(APIConstants.TAGS_EQ_SEARCH_TYPE_PREFIX + tag), registry,
APIConstants.API_RXT_MEDIA_TYPE);
for (GovernanceArtifact genericArtifact : genericArtifacts) {
try {
String apiStatus = APIUtil.getLcStateFromArtifact(genericArtifact);
if (genericArtifact != null && (APIConstants.PUBLISHED.equals(apiStatus)
|| APIConstants.PROTOTYPED.equals(apiStatus))) {
API api = APIUtil.getAPI(genericArtifact);
if (api != null) {
apiSet.add(api);
}
}
} catch (RegistryException e) {
log.warn("User is not authorized to get an API with tag " + tag, e);
}
}
} catch (RegistryException e) {
handleException("Failed to get API for tag " + tag, e);
}
return apiSet;
}
/**
* The method to get APIs to Store view
*
* @return Set<API> Set of APIs
* @throws APIManagementException
*/
@Override
public Set<API> getAllPublishedAPIs(String tenantDomain) throws APIManagementException {
SortedSet<API> apiSortedSet = new TreeSet<API>(new APINameComparator());
SortedSet<API> apiVersionsSortedSet = new TreeSet<API>(new APIVersionComparator());
try {
Registry userRegistry;
boolean isTenantMode=(tenantDomain != null);
if ((isTenantMode && this.tenantDomain==null) || (isTenantMode && isTenantDomainNotMatching(tenantDomain))) {//Tenant store anonymous mode
int tenantId = getTenantId(tenantDomain);
userRegistry = getGovernanceUserRegistry(tenantId);
} else {
userRegistry = registry;
}
this.isTenantModeStoreView = isTenantMode;
this.requestedTenant = tenantDomain;
GenericArtifactManager artifactManager = APIUtil.getArtifactManager(userRegistry, APIConstants.API_KEY);
if (artifactManager != null) {
GenericArtifact[] genericArtifacts = artifactManager.getAllGenericArtifacts();
if (genericArtifacts == null || genericArtifacts.length == 0) {
return apiSortedSet;
}
Map<String, API> latestPublishedAPIs = new HashMap<String, API>();
List<API> multiVersionedAPIs = new ArrayList<API>();
Comparator<API> versionComparator = new APIVersionComparator();
Boolean displayMultipleVersions = APIUtil.isAllowDisplayMultipleVersions();
Boolean displayAPIsWithMultipleStatus = APIUtil.isAllowDisplayAPIsWithMultipleStatus();
for (GenericArtifact artifact : genericArtifacts) {
// adding the API provider can mark the latest API .
String status = APIUtil.getLcStateFromArtifact(artifact);
API api = null;
//Check the api-manager.xml config file entry <DisplayAllAPIs> value is false
if (!displayAPIsWithMultipleStatus) {
// then we are only interested in published APIs here...
if (APIConstants.PUBLISHED.equals(status)) {
api = APIUtil.getAPI(artifact);
}
} else { // else we are interested in both deprecated/published APIs here...
if (APIConstants.PUBLISHED.equals(status) || APIConstants.DEPRECATED.equals(status)) {
api = APIUtil.getAPI(artifact);
}
}
if (api != null) {
try {
checkAccessControlPermission(api.getId());
} catch (APIManagementException e) {
// This is a second level of filter to get apis based on access control and visibility.
// Hence log is set as debug and continued.
if(log.isDebugEnabled()) {
log.debug("User is not authorized to view the api " + api.getId().getApiName(), e);
}
continue;
}
String key;
//Check the configuration to allow showing multiple versions of an API true/false
if (!displayMultipleVersions) { //If allow only showing the latest version of an API
key = api.getId().getProviderName() + COLON_CHAR + api.getId().getApiName();
API existingAPI = latestPublishedAPIs.get(key);
if (existingAPI != null) {
// If we have already seen an API with the same name, make sure
// this one has a higher version number
if (versionComparator.compare(api, existingAPI) > 0) {
latestPublishedAPIs.put(key, api);
}
} else {
// We haven't seen this API before
latestPublishedAPIs.put(key, api);
}
} else { //If allow showing multiple versions of an API
multiVersionedAPIs.add(api);
}
}
}
if (!displayMultipleVersions) {
apiSortedSet.addAll(latestPublishedAPIs.values());
return apiSortedSet;
} else {
apiVersionsSortedSet.addAll(multiVersionedAPIs);
return apiVersionsSortedSet;
}
} else {
String errorMessage = "Artifact manager is null for tenant domain " + tenantDomain
+ " when retrieving APIs for store. User : " + PrivilegedCarbonContext
.getThreadLocalCarbonContext().getUsername();
log.error(errorMessage);
throw new APIManagementException(errorMessage);
}
} catch (RegistryException e) {
handleException("Failed to get all published APIs", e);
} catch (UserStoreException e) {
handleException("Failed to get all published APIs", e);
}
return apiSortedSet;
}
/**
* The method to get APIs to Store view *
*
* @return Set<API> Set of APIs
* @throws APIManagementException
*/
@Override
@Deprecated
public Map<String,Object> getAllPaginatedPublishedAPIs(String tenantDomain,int start,int end)
throws APIManagementException {
Boolean displayAPIsWithMultipleStatus = false;
try {
if (tenantDomain != null) {
PrivilegedCarbonContext.startTenantFlow();
PrivilegedCarbonContext.getThreadLocalCarbonContext().setTenantDomain(tenantDomain, true);
}
displayAPIsWithMultipleStatus = APIUtil.isAllowDisplayAPIsWithMultipleStatus();
}finally {
endTenantFlow();
}
Map<String, List<String>> listMap = new HashMap<String, List<String>>();
//Check the api-manager.xml config file entry <DisplayAllAPIs> value is false
if (!displayAPIsWithMultipleStatus) {
//Create the search attribute map
listMap.put(APIConstants.API_OVERVIEW_STATUS, new ArrayList<String>() {{
add(APIConstants.PUBLISHED);
}});
} else{
return getAllPaginatedAPIs(tenantDomain, start, end);
}
Map<String, Object> result = new HashMap<String, Object>();
SortedSet<API> apiSortedSet = new TreeSet<API>(new APINameComparator());
SortedSet<API> apiVersionsSortedSet = new TreeSet<API>(new APIVersionComparator());
int totalLength = 0;
try {
Registry userRegistry;
boolean isTenantMode = (tenantDomain != null);
if ((isTenantMode && this.tenantDomain == null) ||
(isTenantMode && isTenantDomainNotMatching(tenantDomain))) {//Tenant store anonymous mode
int tenantId = getTenantId(tenantDomain);
// explicitly load the tenant's registry
APIUtil.loadTenantRegistry(tenantId);
userRegistry = getGovernanceUserRegistry(tenantId);
setUsernameToThreadLocalCarbonContext(CarbonConstants.REGISTRY_ANONNYMOUS_USERNAME);
} else {
userRegistry = registry;
setUsernameToThreadLocalCarbonContext(this.username);
}
this.isTenantModeStoreView = isTenantMode;
this.requestedTenant = tenantDomain;
Map<String, API> latestPublishedAPIs = new HashMap<String, API>();
List<API> multiVersionedAPIs = new ArrayList<API>();
Comparator<API> versionComparator = new APIVersionComparator();
Boolean displayMultipleVersions = APIUtil.isAllowDisplayMultipleVersions();
PaginationContext.init(start, end, "ASC", APIConstants.API_OVERVIEW_NAME, Integer.MAX_VALUE);
GenericArtifactManager artifactManager = APIUtil.getArtifactManager(userRegistry, APIConstants.API_KEY);
if (artifactManager != null) {
GenericArtifact[] genericArtifacts = artifactManager.findGenericArtifacts(listMap);
totalLength = PaginationContext.getInstance().getLength();
if (genericArtifacts == null || genericArtifacts.length == 0) {
result.put("apis", apiSortedSet);
result.put("totalLength", totalLength);
return result;
}
for (GenericArtifact artifact : genericArtifacts) {
if (artifact == null) {
log.error("Failed to retrieve artifact when getting paginated published API.");
continue;
}
// adding the API provider can mark the latest API .
API api = APIUtil.getAPI(artifact);
if (api != null) {
String key;
//Check the configuration to allow showing multiple versions of an API true/false
if (!displayMultipleVersions) { //If allow only showing the latest version of an API
key = api.getId().getProviderName() + COLON_CHAR + api.getId().getApiName();
API existingAPI = latestPublishedAPIs.get(key);
if (existingAPI != null) {
// If we have already seen an API with the same name, make sure
// this one has a higher version number
if (versionComparator.compare(api, existingAPI) > 0) {
latestPublishedAPIs.put(key, api);
}
} else {
// We haven't seen this API before
latestPublishedAPIs.put(key, api);
}
} else { //If allow showing multiple versions of an API
multiVersionedAPIs.add(api);
}
}
}
if (!displayMultipleVersions) {
apiSortedSet.addAll(latestPublishedAPIs.values());
result.put("apis", apiSortedSet);
result.put("totalLength", totalLength);
return result;
} else {
apiVersionsSortedSet.addAll(multiVersionedAPIs);
result.put("apis", apiVersionsSortedSet);
result.put("totalLength", totalLength);
return result;
}
} else {
String errorMessage = "Artifact manager is null for tenant domain " + tenantDomain
+ " when retrieving all Published APIs.";
log.error(errorMessage);
}
} catch (RegistryException e) {
handleException("Failed to get all published APIs", e);
} catch (UserStoreException e) {
handleException("Failed to get all published APIs", e);
} finally {
PaginationContext.destroy();
}
result.put("apis", apiSortedSet);
result.put("totalLength", totalLength);
return result;
}
/**
* The method to get Light Weight APIs to Store view *
* @return Set<API> Set of APIs
* @throws APIManagementException
*/
public Map<String, Object> getAllPaginatedPublishedLightWeightAPIs(String tenantDomain, int start, int end)
throws APIManagementException {
Boolean displayAPIsWithMultipleStatus = false;
try {
if (tenantDomain != null) {
PrivilegedCarbonContext.startTenantFlow();
PrivilegedCarbonContext.getThreadLocalCarbonContext().setTenantDomain(tenantDomain, true);
}
displayAPIsWithMultipleStatus = APIUtil.isAllowDisplayAPIsWithMultipleStatus();
} finally {
endTenantFlow();
}
Map<String, List<String>> listMap = new HashMap<String, List<String>>();
//Check the api-manager.xml config file entry <DisplayAllAPIs> value is false
if (!displayAPIsWithMultipleStatus) {
//Create the search attribute map
listMap.put(APIConstants.API_OVERVIEW_STATUS, new ArrayList<String>() {{
add(APIConstants.PUBLISHED);
}});
} else {
return getAllPaginatedAPIs(tenantDomain, start, end);
}
Map<String, Object> result = new HashMap<String, Object>();
SortedSet<API> apiSortedSet = new TreeSet<API>(new APINameComparator());
SortedSet<API> apiVersionsSortedSet = new TreeSet<API>(new APIVersionComparator());
int totalLength = 0;
try {
Registry userRegistry;
boolean isTenantMode = (tenantDomain != null);
if ((isTenantMode && this.tenantDomain == null) ||
(isTenantMode && isTenantDomainNotMatching(tenantDomain))) {//Tenant store anonymous mode
int tenantId = getTenantId(tenantDomain);
// explicitly load the tenant's registry
APIUtil.loadTenantRegistry(tenantId);
userRegistry = getGovernanceUserRegistry(tenantId);
setUsernameToThreadLocalCarbonContext(CarbonConstants.REGISTRY_ANONNYMOUS_USERNAME);
} else {
userRegistry = registry;
setUsernameToThreadLocalCarbonContext(this.username);
}
this.isTenantModeStoreView = isTenantMode;
this.requestedTenant = tenantDomain;
Map<String, API> latestPublishedAPIs = new HashMap<String, API>();
List<API> multiVersionedAPIs = new ArrayList<API>();
Comparator<API> versionComparator = new APIVersionComparator();
Boolean displayMultipleVersions = APIUtil.isAllowDisplayMultipleVersions();
PaginationContext.init(start, end, "ASC", APIConstants.API_OVERVIEW_NAME, Integer.MAX_VALUE);
GenericArtifactManager artifactManager = APIUtil.getArtifactManager(userRegistry, APIConstants.API_KEY);
if (artifactManager != null) {
GenericArtifact[] genericArtifacts = artifactManager.findGenericArtifacts(listMap);
totalLength = PaginationContext.getInstance().getLength();
if (genericArtifacts == null || genericArtifacts.length == 0) {
result.put("apis", apiSortedSet);
result.put("totalLength", totalLength);
return result;
}
for (GenericArtifact artifact : genericArtifacts) {
if (artifact == null) {
log.error("Failed to retrieve artifact when getting paginated published API.");
continue;
}
// adding the API provider can mark the latest API .
API api = APIUtil.getLightWeightAPI(artifact);
if (api != null) {
String key;
//Check the configuration to allow showing multiple versions of an API true/false
if (!displayMultipleVersions) { //If allow only showing the latest version of an API
key = api.getId().getProviderName() + COLON_CHAR + api.getId().getApiName();
API existingAPI = latestPublishedAPIs.get(key);
if (existingAPI != null) {
// If we have already seen an API with the same name, make sure
// this one has a higher version number
if (versionComparator.compare(api, existingAPI) > 0) {
latestPublishedAPIs.put(key, api);
}
} else {
// We haven't seen this API before
latestPublishedAPIs.put(key, api);
}
} else { //If allow showing multiple versions of an API
multiVersionedAPIs.add(api);
}
}
}
if (!displayMultipleVersions) {
apiSortedSet.addAll(latestPublishedAPIs.values());
result.put("apis", apiSortedSet);
result.put("totalLength", totalLength);
return result;
} else {
apiVersionsSortedSet.addAll(multiVersionedAPIs);
result.put("apis", apiVersionsSortedSet);
result.put("totalLength", totalLength);
return result;
}
} else {
String errorMessage = "Artifact manager is null for tenant domain " + tenantDomain +
" when retrieving all Published APIs.";
log.error(errorMessage);
}
} catch (RegistryException e) {
handleException("Failed to get all published APIs", e);
} catch (UserStoreException e) {
handleException("Failed to get all published APIs", e);
} finally {
PaginationContext.destroy();
}
result.put("apis", apiSortedSet);
result.put("totalLength", totalLength);
return result;
}
/**
* The method to get APIs in any of the given LC status array
*
* @return Map<String, Object> API result set with pagination information
* @throws APIManagementException
*/
@Override
public Map<String, Object> getAllPaginatedLightWeightAPIsByStatus(String tenantDomain,
int start, int end, final String[] apiStatus,
boolean returnAPITags)
throws APIManagementException {
Map<String, Object> result = new HashMap<String, Object>();
SortedSet<API> apiSortedSet = new TreeSet<API>(new APINameComparator());
SortedSet<API> apiVersionsSortedSet = new TreeSet<API>(new APIVersionComparator());
int totalLength = 0;
boolean isMore = false;
String criteria = "lcState=";
try {
Registry userRegistry;
boolean isTenantMode = (tenantDomain != null);
if ((isTenantMode && this.tenantDomain == null) || (isTenantMode && isTenantDomainNotMatching(tenantDomain))) {
//Tenant store anonymous mode
int tenantId = getTenantId(tenantDomain);
// explicitly load the tenant's registry
APIUtil.loadTenantRegistry(tenantId);
userRegistry = ServiceReferenceHolder.getInstance().getRegistryService().
getGovernanceUserRegistry(CarbonConstants.REGISTRY_ANONNYMOUS_USERNAME, tenantId);
setUsernameToThreadLocalCarbonContext(CarbonConstants.REGISTRY_ANONNYMOUS_USERNAME);
} else {
userRegistry = registry;
setUsernameToThreadLocalCarbonContext(this.username);
}
this.isTenantModeStoreView = isTenantMode;
this.requestedTenant = tenantDomain;
Map<String, API> latestPublishedAPIs = new HashMap<String, API>();
List<API> multiVersionedAPIs = new ArrayList<API>();
Comparator<API> versionComparator = new APIVersionComparator();
Boolean displayMultipleVersions = APIUtil.isAllowDisplayMultipleVersions();
String paginationLimit = ServiceReferenceHolder.getInstance().getAPIManagerConfigurationService()
.getAPIManagerConfiguration().getFirstProperty(APIConstants.API_STORE_APIS_PER_PAGE);
// If the Config exists use it to set the pagination limit
final int maxPaginationLimit;
if (paginationLimit != null) {
// The additional 1 added to the maxPaginationLimit is to help us determine if more
// APIs may exist so that we know that we are unable to determine the actual total
// API count. We will subtract this 1 later on so that it does not interfere with
// the logic of the rest of the application
int pagination = Integer.parseInt(paginationLimit);
// Because the store jaggery pagination logic is 10 results per a page we need to set pagination
// limit to at least 11 or the pagination done at this level will conflict with the store pagination
// leading to some of the APIs not being displayed
if (pagination < 11) {
pagination = 11;
log.warn("Value of '" + APIConstants.API_STORE_APIS_PER_PAGE + "' is too low, defaulting to 11");
}
maxPaginationLimit = start + pagination + 1;
}
// Else if the config is not specified we go with default functionality and load all
else {
maxPaginationLimit = Integer.MAX_VALUE;
}
PaginationContext.init(start, end, "ASC", APIConstants.API_OVERVIEW_NAME, maxPaginationLimit);
criteria = criteria + APIUtil.getORBasedSearchCriteria(apiStatus);
GenericArtifactManager artifactManager = APIUtil.getArtifactManager(userRegistry, APIConstants.API_KEY);
if (artifactManager != null) {
if (apiStatus != null && apiStatus.length > 0) {
List<GovernanceArtifact> genericArtifacts = GovernanceUtils.findGovernanceArtifacts
(getSearchQuery(criteria), userRegistry, APIConstants.API_RXT_MEDIA_TYPE);
totalLength = PaginationContext.getInstance().getLength();
if (genericArtifacts == null || genericArtifacts.size() == 0) {
result.put("apis", apiSortedSet);
result.put("totalLength", totalLength);
result.put("isMore", isMore);
return result;
}
// Check to see if we can speculate that there are more APIs to be loaded
if (maxPaginationLimit == totalLength) {
isMore = true; // More APIs exist so we cannot determine the total API count without
// incurring a performance hit
--totalLength; // Remove the additional 1 we added earlier when setting max pagination limit
}
int tempLength = 0;
for (GovernanceArtifact artifact : genericArtifacts) {
API api = null;
try {
api = APIUtil.getLightWeightAPI(artifact);
} catch (APIManagementException e) {
//log and continue since we want to load the rest of the APIs.
log.error("Error while loading API " + artifact.getAttribute(
APIConstants.API_OVERVIEW_NAME),
e);
}
if (api != null) {
if (returnAPITags) {
String artifactPath = GovernanceUtils.getArtifactPath(registry, artifact.getId());
Set<String> tags = new HashSet<String>();
org.wso2.carbon.registry.core.Tag[] tag = registry.getTags(artifactPath);
for (org.wso2.carbon.registry.core.Tag tag1 : tag) {
tags.add(tag1.getTagName());
}
api.addTags(tags);
}
String key;
//Check the configuration to allow showing multiple versions of an API true/false
if (!displayMultipleVersions) { //If allow only showing the latest version of an API
key = api.getId().getProviderName() + COLON_CHAR + api.getId().getApiName();
API existingAPI = latestPublishedAPIs.get(key);
if (existingAPI != null) {
// If we have already seen an API with the same name, make sure
// this one has a higher version number
if (versionComparator.compare(api, existingAPI) > 0) {
latestPublishedAPIs.put(key, api);
}
} else {
// We haven't seen this API before
latestPublishedAPIs.put(key, api);
}
} else { //If allow showing multiple versions of an API
multiVersionedAPIs.add(api);
}
}
tempLength++;
if (tempLength >= totalLength) {
break;
}
}
if (!displayMultipleVersions) {
apiSortedSet.addAll(latestPublishedAPIs.values());
result.put("apis", apiSortedSet);
result.put("totalLength", totalLength);
result.put("isMore", isMore);
return result;
} else {
apiVersionsSortedSet.addAll(multiVersionedAPIs);
result.put("apis", apiVersionsSortedSet);
result.put("totalLength", totalLength);
result.put("isMore", isMore);
return result;
}
}
} else {
String errorMessage = "Artifact manager is null for tenant domain " + tenantDomain +
" when retrieving all paginated APIs by status.";
log.error(errorMessage);
}
} catch (RegistryException e) {
handleException("Failed to get all published APIs", e);
} catch (UserStoreException e) {
handleException("Failed to get all published APIs", e);
} finally {
PaginationContext.destroy();
}
result.put("apis", apiSortedSet);
result.put("totalLength", totalLength);
result.put("isMore", isMore);
return result;
}
/**
* Regenerate consumer secret.
*
* @param clientId For which consumer key we need to regenerate consumer secret.
* @return New consumer secret.
* @throws APIManagementException This is the custom exception class for API management.
*/
public String renewConsumerSecret(String clientId) throws APIManagementException {
// Create Token Request with parameters provided from UI.
AccessTokenRequest tokenRequest = new AccessTokenRequest();
tokenRequest.setClientId(clientId);
KeyManager keyManager = KeyManagerHolder.getKeyManagerInstance();
return keyManager.getNewApplicationConsumerSecret(tokenRequest);
}
/**
* The method to get APIs in any of the given LC status array
*
* @return Map<String, Object> API result set with pagination information
* @throws APIManagementException
*/
@Override
public Map<String, Object> getAllPaginatedAPIsByStatus(String tenantDomain,
int start, int end, final String[] apiStatus, boolean returnAPITags) throws APIManagementException {
Map<String, Object> result = new HashMap<String, Object>();
SortedSet<API> apiSortedSet = new TreeSet<API>(new APINameComparator());
SortedSet<API> apiVersionsSortedSet = new TreeSet<API>(new APIVersionComparator());
int totalLength = 0;
boolean isMore = false;
String criteria = APIConstants.LCSTATE_SEARCH_TYPE_KEY;
try {
Registry userRegistry;
boolean isTenantMode = (tenantDomain != null);
if ((isTenantMode && this.tenantDomain == null) || (isTenantMode && isTenantDomainNotMatching(tenantDomain))) {//Tenant store anonymous mode
int tenantId = getTenantId(tenantDomain);
// explicitly load the tenant's registry
APIUtil.loadTenantRegistry(tenantId);
userRegistry = getGovernanceUserRegistry(tenantId);
setUsernameToThreadLocalCarbonContext(CarbonConstants.REGISTRY_ANONNYMOUS_USERNAME);
} else {
userRegistry = registry;
setUsernameToThreadLocalCarbonContext(this.username);
}
this.isTenantModeStoreView = isTenantMode;
this.requestedTenant = tenantDomain;
Map<String, API> latestPublishedAPIs = new HashMap<String, API>();
List<API> multiVersionedAPIs = new ArrayList<API>();
Comparator<API> versionComparator = new APIVersionComparator();
Boolean displayMultipleVersions = APIUtil.isAllowDisplayMultipleVersions();
String paginationLimit = getAPIManagerConfiguration().
getFirstProperty(APIConstants.API_STORE_APIS_PER_PAGE);
// If the Config exists use it to set the pagination limit
final int maxPaginationLimit;
if (paginationLimit != null) {
// The additional 1 added to the maxPaginationLimit is to help us determine if more
// APIs may exist so that we know that we are unable to determine the actual total
// API count. We will subtract this 1 later on so that it does not interfere with
// the logic of the rest of the application
int pagination = Integer.parseInt(paginationLimit);
// Because the store jaggery pagination logic is 10 results per a page we need to set pagination
// limit to at least 11 or the pagination done at this level will conflict with the store pagination
// leading to some of the APIs not being displayed
if (pagination < 11) {
pagination = 11;
log.warn("Value of '" + APIConstants.API_STORE_APIS_PER_PAGE + "' is too low, defaulting to 11");
}
maxPaginationLimit = start + pagination + 1;
}
// Else if the config is not specified we go with default functionality and load all
else {
maxPaginationLimit = Integer.MAX_VALUE;
}
PaginationContext.init(start, end, "ASC", APIConstants.API_OVERVIEW_NAME, maxPaginationLimit);
criteria = criteria + APIUtil.getORBasedSearchCriteria(apiStatus);
GenericArtifactManager artifactManager = APIUtil.getArtifactManager(userRegistry, APIConstants.API_KEY);
if (artifactManager != null) {
if (apiStatus != null && apiStatus.length > 0) {
List<GovernanceArtifact> genericArtifacts = GovernanceUtils.findGovernanceArtifacts
(getSearchQuery(criteria), userRegistry, APIConstants.API_RXT_MEDIA_TYPE);
totalLength = PaginationContext.getInstance().getLength();
if (genericArtifacts == null || genericArtifacts.size() == 0) {
result.put("apis", apiSortedSet);
result.put("totalLength", totalLength);
result.put("isMore", isMore);
return result;
}
// Check to see if we can speculate that there are more APIs to be loaded
if (maxPaginationLimit == totalLength) {
isMore = true; // More APIs exist so we cannot determine the total API count without incurring a
// performance hit
--totalLength; // Remove the additional 1 we added earlier when setting max pagination limit
}
int tempLength = 0;
for (GovernanceArtifact artifact : genericArtifacts) {
API api = null;
try {
api = APIUtil.getAPI(artifact);
} catch (APIManagementException e) {
//log and continue since we want to load the rest of the APIs.
log.error("Error while loading API " + artifact.getAttribute(APIConstants.API_OVERVIEW_NAME),
e);
}
if (api != null) {
if (returnAPITags) {
String artifactPath = GovernanceUtils.getArtifactPath(registry, artifact.getId());
Set<String> tags = new HashSet<String>();
org.wso2.carbon.registry.core.Tag[] tag = registry.getTags(artifactPath);
for (org.wso2.carbon.registry.core.Tag tag1 : tag) {
tags.add(tag1.getTagName());
}
api.addTags(tags);
}
String key;
//Check the configuration to allow showing multiple versions of an API true/false
if (!displayMultipleVersions) { //If allow only showing the latest version of an API
key = api.getId().getProviderName() + COLON_CHAR + api.getId().getApiName();
API existingAPI = latestPublishedAPIs.get(key);
if (existingAPI != null) {
// If we have already seen an API with the same name, make sure
// this one has a higher version number
if (versionComparator.compare(api, existingAPI) > 0) {
latestPublishedAPIs.put(key, api);
}
} else {
// We haven't seen this API before
latestPublishedAPIs.put(key, api);
}
} else { //If allow showing multiple versions of an API
multiVersionedAPIs.add(api);
}
}
tempLength++;
if (tempLength >= totalLength) {
break;
}
}
if (!displayMultipleVersions) {
apiSortedSet.addAll(latestPublishedAPIs.values());
result.put("apis", apiSortedSet);
result.put("totalLength", totalLength);
result.put("isMore", isMore);
return result;
} else {
apiVersionsSortedSet.addAll(multiVersionedAPIs);
result.put("apis", apiVersionsSortedSet);
result.put("totalLength", totalLength);
result.put("isMore", isMore);
return result;
}
}
} else {
String errorMessage = "Artifact manager is null for tenant domain " + tenantDomain
+ " when retrieving all paginated APIs by status.";
log.error(errorMessage);
}
} catch (RegistryException e) {
handleException("Failed to get all published APIs", e);
} catch (UserStoreException e) {
handleException("Failed to get all published APIs", e);
} finally {
PaginationContext.destroy();
}
result.put("apis", apiSortedSet);
result.put("totalLength", totalLength);
result.put("isMore", isMore);
return result;
}
/**
* The method to get APIs by given status to Store view
*
* @return Set<API> Set of APIs
* @throws APIManagementException
*/
@Override
@Deprecated
public Map<String, Object> getAllPaginatedAPIsByStatus(String tenantDomain,
int start, int end, final String apiStatus, boolean returnAPITags) throws APIManagementException {
try {
if (tenantDomain != null) {
PrivilegedCarbonContext.startTenantFlow();
PrivilegedCarbonContext.getThreadLocalCarbonContext().setTenantDomain(tenantDomain, true);
}
}finally {
endTenantFlow();
}
Boolean displayAPIsWithMultipleStatus = APIUtil.isAllowDisplayAPIsWithMultipleStatus();
Map<String, List<String>> listMap = new HashMap<String, List<String>>();
//Check the api-manager.xml config file entry <DisplayAllAPIs> value is false
if (APIConstants.PROTOTYPED.equals(apiStatus)) {
listMap.put(APIConstants.API_OVERVIEW_STATUS, new ArrayList<String>() {{
add(apiStatus);
}});
} else {
if (!displayAPIsWithMultipleStatus) {
//Create the search attribute map
listMap.put(APIConstants.API_OVERVIEW_STATUS, new ArrayList<String>() {{
add(apiStatus);
}});
} else {
return getAllPaginatedAPIs(tenantDomain, start, end);
}
}
Map<String,Object> result=new HashMap<String, Object>();
SortedSet<API> apiSortedSet = new TreeSet<API>(new APINameComparator());
SortedSet<API> apiVersionsSortedSet = new TreeSet<API>(new APIVersionComparator());
int totalLength=0;
boolean isMore = false;
try {
Registry userRegistry;
boolean isTenantMode=(tenantDomain != null);
if ((isTenantMode && this.tenantDomain==null) || (isTenantMode && isTenantDomainNotMatching(tenantDomain))) {//Tenant store anonymous mode
int tenantId = getTenantId(tenantDomain);
// explicitly load the tenant's registry
APIUtil.loadTenantRegistry(tenantId);
userRegistry = getGovernanceUserRegistry(tenantId);
setUsernameToThreadLocalCarbonContext(CarbonConstants.REGISTRY_ANONNYMOUS_USERNAME);
} else {
userRegistry = registry;
setUsernameToThreadLocalCarbonContext(this.username);
}
this.isTenantModeStoreView = isTenantMode;
this.requestedTenant = tenantDomain;
Map<String, API> latestPublishedAPIs = new HashMap<String, API>();
List<API> multiVersionedAPIs = new ArrayList<API>();
Comparator<API> versionComparator = new APIVersionComparator();
Boolean displayMultipleVersions = APIUtil.isAllowDisplayMultipleVersions();
String paginationLimit = getAPIManagerConfiguration()
.getFirstProperty(APIConstants.API_STORE_APIS_PER_PAGE);
// If the Config exists use it to set the pagination limit
final int maxPaginationLimit;
if (paginationLimit != null) {
// The additional 1 added to the maxPaginationLimit is to help us determine if more
// APIs may exist so that we know that we are unable to determine the actual total
// API count. We will subtract this 1 later on so that it does not interfere with
// the logic of the rest of the application
int pagination = Integer.parseInt(paginationLimit);
// Because the store jaggery pagination logic is 10 results per a page we need to set pagination
// limit to at least 11 or the pagination done at this level will conflict with the store pagination
// leading to some of the APIs not being displayed
if (pagination < 11) {
pagination = 11;
log.warn("Value of '" + APIConstants.API_STORE_APIS_PER_PAGE + "' is too low, defaulting to 11");
}
maxPaginationLimit = start + pagination + 1;
}
// Else if the config is not specified we go with default functionality and load all
else {
maxPaginationLimit = Integer.MAX_VALUE;
}
PaginationContext.init(start, end, "ASC", APIConstants.API_OVERVIEW_NAME, maxPaginationLimit);
GenericArtifactManager artifactManager = APIUtil.getArtifactManager(userRegistry, APIConstants.API_KEY);
if (artifactManager != null) {
GenericArtifact[] genericArtifacts = artifactManager.findGenericArtifacts(listMap);
totalLength=PaginationContext.getInstance().getLength();
if (genericArtifacts == null || genericArtifacts.length == 0) {
result.put("apis",apiSortedSet);
result.put("totalLength",totalLength);
result.put("isMore", isMore);
return result;
}
// Check to see if we can speculate that there are more APIs to be loaded
if (maxPaginationLimit == totalLength) {
isMore = true; // More APIs exist so we cannot determine the total API count without incurring a
// performance hit
--totalLength; // Remove the additional 1 we added earlier when setting max pagination limit
}
int tempLength=0;
for (GenericArtifact artifact : genericArtifacts) {
if (artifact == null) {
log.error("Failed to retrieve artifact when getting all paginated APIs by status.");
continue;
}
API api = null;
try {
api = APIUtil.getAPI(artifact);
} catch (APIManagementException e) {
//log and continue since we want to load the rest of the APIs.
log.error("Error while loading API " + artifact.getAttribute(APIConstants.API_OVERVIEW_NAME),
e);
}
if (api != null) {
if (returnAPITags) {
String artifactPath = GovernanceUtils.getArtifactPath(registry, artifact.getId());
Set<String> tags = new HashSet<String>();
org.wso2.carbon.registry.core.Tag[] tag = registry.getTags(artifactPath);
for (org.wso2.carbon.registry.core.Tag tag1 : tag) {
tags.add(tag1.getTagName());
}
api.addTags(tags);
}
String key;
//Check the configuration to allow showing multiple versions of an API true/false
if (!displayMultipleVersions) { //If allow only showing the latest version of an API
key = api.getId().getProviderName() + COLON_CHAR + api.getId().getApiName();
API existingAPI = latestPublishedAPIs.get(key);
if (existingAPI != null) {
// If we have already seen an API with the same name, make sure
// this one has a higher version number
if (versionComparator.compare(api, existingAPI) > 0) {
latestPublishedAPIs.put(key, api);
}
} else {
// We haven't seen this API before
latestPublishedAPIs.put(key, api);
}
} else { //If allow showing multiple versions of an API
multiVersionedAPIs.add(api);
}
}
tempLength++;
if (tempLength >= totalLength){
break;
}
}
if (!displayMultipleVersions) {
apiSortedSet.addAll(latestPublishedAPIs.values());
result.put("apis",apiSortedSet);
result.put("totalLength",totalLength);
result.put("isMore", isMore);
return result;
} else {
apiVersionsSortedSet.addAll(multiVersionedAPIs);
result.put("apis",apiVersionsSortedSet);
result.put("totalLength",totalLength);
result.put("isMore", isMore);
return result;
}
} else {
String errorMessage = "Artifact manager is null for tenant domain " + tenantDomain
+ " when retrieving APIs by status.";
log.error(errorMessage);
}
} catch (RegistryException e) {
handleException("Failed to get all published APIs", e);
} catch (UserStoreException e) {
handleException("Failed to get all published APIs", e);
} finally {
PaginationContext.destroy();
}
result.put("apis", apiSortedSet);
result.put("totalLength", totalLength);
result.put("isMore", isMore);
return result;
}
/**
* Re-generates the access token.
* @param oldAccessToken Token to be revoked
* @param clientId Consumer Key for the Application
* @param clientSecret Consumer Secret for the Application
* @param validityTime Desired Validity time for the token
* @param jsonInput Additional parameters if Authorization server needs any.
* @return Renewed Access Token.
* @throws APIManagementException
*/
@Override
public AccessTokenInfo renewAccessToken(String oldAccessToken, String clientId, String clientSecret,
String validityTime, String
requestedScopes[], String jsonInput) throws APIManagementException {
// Create Token Request with parameters provided from UI.
AccessTokenRequest tokenRequest = new AccessTokenRequest();
tokenRequest.setClientId(clientId);
tokenRequest.setClientSecret(clientSecret);
tokenRequest.setValidityPeriod(Long.parseLong(validityTime));
tokenRequest.setTokenToRevoke(oldAccessToken);
tokenRequest.setScope(requestedScopes);
try {
// Populating additional parameters.
tokenRequest = ApplicationUtils.populateTokenRequest(jsonInput, tokenRequest);
KeyManager keyManager = KeyManagerHolder.getKeyManagerInstance();
JSONObject appLogObject = new JSONObject();
appLogObject.put("Re-Generated Keys for application with client Id", clientId);
APIUtil.logAuditMessage(APIConstants.AuditLogConstants.APPLICATION, appLogObject.toString(),
APIConstants.AuditLogConstants.UPDATED, this.username);
return keyManager.getNewApplicationAccessToken(tokenRequest);
} catch (APIManagementException e) {
log.error("Error while re-generating AccessToken", e);
throw e;
}
}
@Override
public String generateApiKey(Application application, String userName, long validityPeriod) throws APIManagementException {
JwtTokenInfoDTO jwtTokenInfoDTO = APIUtil.getJwtTokenInfoDTO(application, userName,
MultitenantUtils.getTenantDomain(userName));
ApplicationDTO applicationDTO = new ApplicationDTO();
applicationDTO.setId(application.getId());
applicationDTO.setName(application.getName());
applicationDTO.setOwner(application.getOwner());
applicationDTO.setTier(application.getTier());
applicationDTO.setUuid(application.getUUID());
jwtTokenInfoDTO.setApplication(applicationDTO);
jwtTokenInfoDTO.setSubscriber(userName);
jwtTokenInfoDTO.setExpirationTime(validityPeriod);
jwtTokenInfoDTO.setKeyType(application.getKeyType());
return ApiKeyGenerator.generateToken(jwtTokenInfoDTO);
}
/**
* The method to get All PUBLISHED and DEPRECATED APIs, to Store view
*
* @return Set<API> Set of APIs
* @throws APIManagementException
*/
@Deprecated
public Map<String,Object> getAllPaginatedAPIs(String tenantDomain,int start,int end) throws APIManagementException {
Map<String,Object> result=new HashMap<String, Object>();
SortedSet<API> apiSortedSet = new TreeSet<API>(new APINameComparator());
SortedSet<API> apiVersionsSortedSet = new TreeSet<API>(new APIVersionComparator());
int totalLength=0;
try {
Registry userRegistry;
boolean isTenantMode=(tenantDomain != null);
if ((isTenantMode && this.tenantDomain==null) || (isTenantMode && isTenantDomainNotMatching(tenantDomain))) {//Tenant store anonymous mode
int tenantId = getTenantId(tenantDomain);
userRegistry = getGovernanceUserRegistry(tenantId);
setUsernameToThreadLocalCarbonContext(CarbonConstants.REGISTRY_ANONNYMOUS_USERNAME);
} else {
userRegistry = registry;
setUsernameToThreadLocalCarbonContext(this.username);
}
this.isTenantModeStoreView = isTenantMode;
this.requestedTenant = tenantDomain;
Map<String, API> latestPublishedAPIs = new HashMap<String, API>();
List<API> multiVersionedAPIs = new ArrayList<API>();
Comparator<API> versionComparator = new APIVersionComparator();
Boolean displayMultipleVersions = APIUtil.isAllowDisplayMultipleVersions();
GenericArtifactManager artifactManager = APIUtil.getArtifactManager(userRegistry, APIConstants.API_KEY);
PaginationContext.init(start, end, "ASC", APIConstants.API_OVERVIEW_NAME, Integer.MAX_VALUE);
boolean noPublishedAPIs = false;
if (artifactManager != null) {
//Create the search attribute map for PUBLISHED APIs
Map<String, List<String>> listMap = new HashMap<String, List<String>>();
listMap.put(APIConstants.API_OVERVIEW_STATUS, new ArrayList<String>() {{
add(APIConstants.PUBLISHED);
}});
GenericArtifact[] genericArtifacts = artifactManager.findGenericArtifacts(listMap);
totalLength = PaginationContext.getInstance().getLength();
if (genericArtifacts == null || genericArtifacts.length == 0) {
noPublishedAPIs = true;
}
int publishedAPICount;
if (genericArtifacts != null) {
for (GenericArtifact artifact : genericArtifacts) {
if (artifact == null) {
log.error("Failed to retrieve artifact when getting all paginated APIs.");
continue;
}
// adding the API provider can mark the latest API .
// String status = artifact.getAttribute(APIConstants.API_OVERVIEW_STATUS);
API api = APIUtil.getAPI(artifact);
if (api != null) {
String key;
//Check the configuration to allow showing multiple versions of an API true/false
if (!displayMultipleVersions) { //If allow only showing the latest version of an API
key = api.getId().getProviderName() + COLON_CHAR + api.getId().getApiName();
API existingAPI = latestPublishedAPIs.get(key);
if (existingAPI != null) {
// If we have already seen an API with the same name, make sure
// this one has a higher version number
if (versionComparator.compare(api, existingAPI) > 0) {
latestPublishedAPIs.put(key, api);
}
} else {
// We haven't seen this API before
latestPublishedAPIs.put(key, api);
}
} else { //If allow showing multiple versions of an API
// key = api.getId().getProviderName() + ":" + api.getId().getApiName() + ":" + api.getId()
// .getVersion();
multiVersionedAPIs.add(api);
}
}
}
}
if (!displayMultipleVersions) {
publishedAPICount = latestPublishedAPIs.size();
} else {
publishedAPICount = multiVersionedAPIs.size();
}
if ((start + end) > publishedAPICount) {
if (publishedAPICount > 0) {
/*Starting to retrieve DEPRECATED APIs*/
start = 0;
/* publishedAPICount is always less than end*/
end = end - publishedAPICount;
} else {
start = start - totalLength;
}
PaginationContext.init(start, end, "ASC", APIConstants.API_OVERVIEW_NAME, Integer.MAX_VALUE);
//Create the search attribute map for DEPRECATED APIs
Map<String, List<String>> listMapForDeprecatedAPIs = new HashMap<String, List<String>>();
listMapForDeprecatedAPIs.put(APIConstants.API_OVERVIEW_STATUS, new ArrayList<String>() {{
add(APIConstants.DEPRECATED);
}});
GenericArtifact[] genericArtifactsForDeprecatedAPIs = artifactManager.findGenericArtifacts(listMapForDeprecatedAPIs);
totalLength = totalLength + PaginationContext.getInstance().getLength();
if ((genericArtifactsForDeprecatedAPIs == null || genericArtifactsForDeprecatedAPIs.length == 0) && noPublishedAPIs) {
result.put("apis",apiSortedSet);
result.put("totalLength",totalLength);
return result;
}
if (genericArtifactsForDeprecatedAPIs != null) {
for (GenericArtifact artifact : genericArtifactsForDeprecatedAPIs) {
if (artifact == null) {
log.error("Failed to retrieve artifact when getting deprecated APIs.");
continue;
}
// adding the API provider can mark the latest API .
API api = APIUtil.getAPI(artifact);
if (api != null) {
String key;
//Check the configuration to allow showing multiple versions of an API true/false
if (!displayMultipleVersions) { //If allow only showing the latest version of an API
key = api.getId().getProviderName() + COLON_CHAR + api.getId().getApiName();
API existingAPI = latestPublishedAPIs.get(key);
if (existingAPI != null) {
// If we have already seen an API with the same name, make sure
// this one has a higher version number
if (versionComparator.compare(api, existingAPI) > 0) {
latestPublishedAPIs.put(key, api);
}
} else {
// We haven't seen this API before
latestPublishedAPIs.put(key, api);
}
} else { //If allow showing multiple versions of an API
multiVersionedAPIs.add(api);
}
}
}
}
}
if (!displayMultipleVersions) {
for (API api : latestPublishedAPIs.values()) {
apiSortedSet.add(api);
}
result.put("apis",apiSortedSet);
result.put("totalLength",totalLength);
return result;
} else {
apiVersionsSortedSet.addAll(multiVersionedAPIs);
result.put("apis",apiVersionsSortedSet);
result.put("totalLength",totalLength);
return result;
}
} else {
String errorMessage = "Artifact manager is null for tenant domain " + tenantDomain
+ " when retrieving all paginated APIs.";
log.error(errorMessage);
}
} catch (RegistryException e) {
handleException("Failed to get all published APIs", e);
} catch (UserStoreException e) {
handleException("Failed to get all published APIs", e);
}finally {
PaginationContext.destroy();
}
result.put("apis", apiSortedSet);
result.put("totalLength", totalLength);
return result;
}
@Override
public Set<API> getTopRatedAPIs(int limit) throws APIManagementException {
int returnLimit = 0;
SortedSet<API> apiSortedSet = new TreeSet<API>(new APINameComparator());
try {
GenericArtifactManager artifactManager = APIUtil.getArtifactManager(registry, APIConstants.API_KEY);
if (artifactManager == null) {
String errorMessage = "Artifact manager is null when retrieving top rated APIs.";
log.error(errorMessage);
throw new APIManagementException(errorMessage);
}
GenericArtifact[] genericArtifacts = artifactManager.getAllGenericArtifacts();
if (genericArtifacts == null || genericArtifacts.length == 0) {
return apiSortedSet;
}
for (GenericArtifact genericArtifact : genericArtifacts) {
String status = APIUtil.getLcStateFromArtifact(genericArtifact);
if (APIConstants.PUBLISHED.equals(status)) {
String artifactPath = genericArtifact.getPath();
float rating = registry.getAverageRating(artifactPath);
if (rating > APIConstants.TOP_TATE_MARGIN && (returnLimit < limit)) {
returnLimit++;
API api = APIUtil.getAPI(genericArtifact, registry);
if (api != null) {
apiSortedSet.add(api);
}
}
}
}
} catch (RegistryException e) {
handleException("Failed to get top rated API", e);
}
return apiSortedSet;
}
/**
* Get the recently added APIs set
*
* @param limit no limit. Return everything else, limit the return list to specified value.
* @return Set<API>
* @throws APIManagementException
*/
@Override
public Set<API> getRecentlyAddedAPIs(int limit, String tenantDomain)
throws APIManagementException {
SortedSet<API> recentlyAddedAPIs = new TreeSet<API>(new APINameComparator());
SortedSet<API> recentlyAddedAPIsWithMultipleVersions = new TreeSet<API>(new APIVersionComparator());
Registry userRegistry;
APIManagerConfiguration config = getAPIManagerConfiguration();
boolean isRecentlyAddedAPICacheEnabled =
Boolean.parseBoolean(config.getFirstProperty(APIConstants.API_STORE_RECENTLY_ADDED_API_CACHE_ENABLE));
PrivilegedCarbonContext.startTenantFlow();
boolean isTenantFlowStarted ;
if (tenantDomain != null && !MultitenantConstants.SUPER_TENANT_DOMAIN_NAME.equals(tenantDomain)) {
PrivilegedCarbonContext.getThreadLocalCarbonContext().setTenantDomain(tenantDomain, true);
isTenantFlowStarted = true;
} else {
PrivilegedCarbonContext.getThreadLocalCarbonContext().setTenantDomain(MultitenantConstants.SUPER_TENANT_DOMAIN_NAME, true);
isTenantFlowStarted = true;
}
try {
boolean isTenantMode = (tenantDomain != null);
if ((isTenantMode && this.tenantDomain == null) || (isTenantMode && isTenantDomainNotMatching(tenantDomain))) {//Tenant based store anonymous mode
int tenantId = getTenantId(tenantDomain);
// explicitly load the tenant's registry
APIUtil.loadTenantRegistry(tenantId);
setUsernameToThreadLocalCarbonContext(CarbonConstants.REGISTRY_ANONNYMOUS_USERNAME);
isTenantFlowStarted = true;
userRegistry = getGovernanceUserRegistry(tenantId);
} else {
userRegistry = registry;
setUsernameToThreadLocalCarbonContext(this.username);
isTenantFlowStarted = true;
}
if (isRecentlyAddedAPICacheEnabled) {
boolean isStatusChanged = false;
Set<API> recentlyAddedAPI = (Set<API>) Caching.getCacheManager(APIConstants.API_MANAGER_CACHE_MANAGER)
.getCache(APIConstants.RECENTLY_ADDED_API_CACHE_NAME).get(username + COLON_CHAR + tenantDomain);
if (recentlyAddedAPI != null) {
for (API api : recentlyAddedAPI) {
try {
if (!APIConstants.PUBLISHED.equalsIgnoreCase(userRegistry.get(APIUtil.getAPIPath(api.getId())).getProperty(APIConstants.API_STATUS))) {
isStatusChanged = true;
break;
}
} catch (Exception ex) {
log.error("Error while checking API status for APP " + api.getId().getApiName() + '-' +
api.getId().getVersion(), ex);
}
}
if (!isStatusChanged) {
return recentlyAddedAPI;
}
}
}
PaginationContext.init(0, limit, APIConstants.REGISTRY_ARTIFACT_SEARCH_DESC_ORDER,
APIConstants.CREATED_DATE, Integer.MAX_VALUE);
Map<String, List<String>> listMap = new HashMap<String, List<String>>();
listMap.put(APIConstants.API_OVERVIEW_STATUS, new ArrayList<String>() {{
add(APIConstants.PUBLISHED);
}});
listMap.put(APIConstants.STORE_VIEW_ROLES, getUserRoleList());
String searchCriteria = APIConstants.LCSTATE_SEARCH_KEY + "= (" + APIConstants.PUBLISHED + ")";
//Find UUID
GenericArtifactManager artifactManager = APIUtil.getArtifactManager(userRegistry, APIConstants.API_KEY);
if (artifactManager != null) {
GenericArtifact[] genericArtifacts = artifactManager.findGovernanceArtifacts(getSearchQuery(searchCriteria));
SortedSet<API> allAPIs = new TreeSet<API>(new APINameComparator());
for (GenericArtifact artifact : genericArtifacts) {
API api = null;
try {
api = APIUtil.getAPI(artifact);
} catch (APIManagementException e) {
//just log and continue since we want to go through the other APIs as well.
log.error("Error loading API " + artifact.getAttribute(APIConstants.API_OVERVIEW_NAME), e);
}
if (api != null) {
allAPIs.add(api);
}
}
if (!APIUtil.isAllowDisplayMultipleVersions()) {
Map<String, API> latestPublishedAPIs = new HashMap<String, API>();
Comparator<API> versionComparator = new APIVersionComparator();
String key;
for (API api : allAPIs) {
key = api.getId().getProviderName() + COLON_CHAR + api.getId().getApiName();
API existingAPI = latestPublishedAPIs.get(key);
if (existingAPI != null) {
// If we have already seen an API with the same
// name, make sure this one has a higher version
// number
if (versionComparator.compare(api, existingAPI) > 0) {
latestPublishedAPIs.put(key, api);
}
} else {
// We haven't seen this API before
latestPublishedAPIs.put(key, api);
}
}
recentlyAddedAPIs.addAll(latestPublishedAPIs.values());
if (isRecentlyAddedAPICacheEnabled) {
Caching.getCacheManager(APIConstants.API_MANAGER_CACHE_MANAGER)
.getCache(APIConstants.RECENTLY_ADDED_API_CACHE_NAME)
.put(username + COLON_CHAR + tenantDomain, allAPIs);
}
return recentlyAddedAPIs;
} else {
recentlyAddedAPIsWithMultipleVersions.addAll(allAPIs);
if (isRecentlyAddedAPICacheEnabled) {
Caching.getCacheManager(APIConstants.API_MANAGER_CACHE_MANAGER)
.getCache(APIConstants.RECENTLY_ADDED_API_CACHE_NAME)
.put(username + COLON_CHAR + tenantDomain, allAPIs);
}
return recentlyAddedAPIsWithMultipleVersions;
}
} else {
String errorMessage = "Artifact manager is null when retrieving recently added APIs for tenant domain "
+ tenantDomain;
log.error(errorMessage);
}
} catch (RegistryException e) {
handleException("Failed to get all published APIs", e);
} catch (UserStoreException e) {
handleException("Failed to get all published APIs", e);
} finally {
PaginationContext.destroy();
if (isTenantFlowStarted) {
endTenantFlow();
}
}
return recentlyAddedAPIs;
}
@Override
public Set<Tag> getAllTags(String requestedTenantDomain) throws APIManagementException {
this.isTenantModeStoreView = (requestedTenantDomain != null);
if(requestedTenantDomain != null){
this.requestedTenant = requestedTenantDomain;
}
/* We keep track of the lastUpdatedTime of the TagCache to determine its freshness.
*/
long lastUpdatedTimeAtStart = lastUpdatedTime;
long currentTimeAtStart = System.currentTimeMillis();
if(isTagCacheEnabled && ( (currentTimeAtStart- lastUpdatedTimeAtStart) < tagCacheValidityTime)){
if(tagSet != null){
return tagSet;
}
}
TreeSet<Tag> tempTagSet = new TreeSet<Tag>(new Comparator<Tag>() {
@Override
public int compare(Tag o1, Tag o2) {
return o1.getName().compareTo(o2.getName());
}
});
Registry userRegistry = null;
boolean isTenantFlowStarted = false;
String tagsQueryPath = null;
try {
tagsQueryPath = RegistryConstants.QUERIES_COLLECTION_PATH + "/tag-summary";
Map<String, String> params = new HashMap<String, String>();
params.put(RegistryConstants.RESULT_TYPE_PROPERTY_NAME, RegistryConstants.TAG_SUMMARY_RESULT_TYPE);
//as a tenant, I'm browsing my own Store or I'm browsing a Store of another tenant..
if ((this.isTenantModeStoreView && this.tenantDomain==null) || (this.isTenantModeStoreView && isTenantDomainNotMatching(requestedTenantDomain))) {//Tenant based store anonymous mode
int tenantId = getTenantId(this.requestedTenant);
userRegistry = ServiceReferenceHolder.getInstance().getRegistryService().
getGovernanceUserRegistry(CarbonConstants.REGISTRY_ANONNYMOUS_USERNAME, tenantId);
} else {
userRegistry = registry;
}
Map<String, Tag> tagsData = new HashMap<String, Tag>();
try {
PrivilegedCarbonContext.getThreadLocalCarbonContext().setUsername(((UserRegistry)userRegistry).getUserName());
if (requestedTenant != null ) {
isTenantFlowStarted = startTenantFlowForTenantDomain(requestedTenant);
PrivilegedCarbonContext.getThreadLocalCarbonContext().setUsername(((UserRegistry)userRegistry).getUserName());
}
Map <String, List<String>> criteriaPublished = new HashMap<String, List<String>>();
criteriaPublished.put(APIConstants.LCSTATE_SEARCH_KEY, new ArrayList<String>() {{
add(APIConstants.PUBLISHED);
}});
//rxt api media type
List<TermData> termsPublished = GovernanceUtils
.getTermDataList(criteriaPublished, APIConstants.API_OVERVIEW_TAG,
APIConstants.API_RXT_MEDIA_TYPE, true);
if(termsPublished != null){
for(TermData data : termsPublished){
tempTagSet.add(new Tag(data.getTerm(), (int)data.getFrequency()));
}
}
Map<String, List<String>> criteriaPrototyped = new HashMap<String, List<String>>();
criteriaPrototyped.put(APIConstants.LCSTATE_SEARCH_KEY, new ArrayList<String>() {{
add(APIConstants.PROTOTYPED);
}});
//rxt api media type
List<TermData> termsPrototyped = GovernanceUtils
.getTermDataList(criteriaPrototyped, APIConstants.API_OVERVIEW_TAG,
APIConstants.API_RXT_MEDIA_TYPE, true);
if(termsPrototyped != null){
for(TermData data : termsPrototyped){
tempTagSet.add(new Tag(data.getTerm(), (int)data.getFrequency()));
}
}
} finally {
if (isTenantFlowStarted) {
endTenantFlow();
}
}
synchronized (tagCacheMutex) {
lastUpdatedTime = System.currentTimeMillis();
this.tagSet = tempTagSet;
}
} catch (RegistryException e) {
try {
//Before a tenant login to the store or publisher at least one time,
//a registry exception is thrown when the tenant store is accessed in anonymous mode.
//This fix checks whether query resource available in the registry. If not
// give a warn.
if (userRegistry != null && !userRegistry.resourceExists(tagsQueryPath)) {
log.warn("Failed to retrieve tags query resource at " + tagsQueryPath);
return tagSet == null ? Collections.EMPTY_SET : tagSet;
}
} catch (RegistryException e1) {
// Even if we should ignore this exception, we are logging this as a warn log.
// The reason is that, this error happens when we try to add some additional logs in an error
// scenario and it does not affect the execution path.
log.warn("Unable to execute the resource exist method for tags query resource path : " + tagsQueryPath,
e1);
}
handleException("Failed to get all the tags", e);
} catch (UserStoreException e) {
handleException("Failed to get all the tags", e);
}
return tagSet;
}
@Override
public Set<Tag> getTagsWithAttributes(String tenantDomain) throws APIManagementException {
// Fetch the all the tags first.
Set<Tag> tags = getAllTags(tenantDomain);
// For each and every tag get additional attributes from the registry.
String descriptionPathPattern = APIConstants.TAGS_INFO_ROOT_LOCATION + "/%s/description.txt";
String thumbnailPathPattern = APIConstants.TAGS_INFO_ROOT_LOCATION + "/%s/thumbnail.png";
//if the tenantDomain is not specified super tenant domain is used
if (StringUtils.isBlank(tenantDomain)) {
try {
tenantDomain = ServiceReferenceHolder.getInstance().getRealmService().getTenantManager().getSuperTenantDomain();
} catch (org.wso2.carbon.user.core.UserStoreException e) {
handleException("Cannot get super tenant domain name", e);
}
}
//get the registry instance related to the tenant domain
UserRegistry govRegistry = null;
try {
int tenantId = getTenantId(tenantDomain);
RegistryService registryService = ServiceReferenceHolder.getInstance().getRegistryService();
govRegistry = registryService.getGovernanceSystemRegistry(tenantId);
} catch (UserStoreException e) {
handleException("Cannot get tenant id for tenant domain name:" + tenantDomain, e);
} catch (RegistryException e) {
handleException("Cannot get registry for tenant domain name:" + tenantDomain, e);
}
if (govRegistry != null) {
for (Tag tag : tags) {
// Get the description.
Resource descriptionResource = null;
String descriptionPath = String.format(descriptionPathPattern, tag.getName());
try {
if (govRegistry.resourceExists(descriptionPath)) {
descriptionResource = govRegistry.get(descriptionPath);
}
} catch (RegistryException e) {
//warn and proceed to the next tag
log.warn(String.format("Error while querying the existence of the description for the tag '%s'",
tag.getName()), e);
}
// The resource is assumed to be a byte array since its the content
// of a text file.
if (descriptionResource != null) {
try {
String description = new String((byte[]) descriptionResource.getContent(),
Charset.defaultCharset());
tag.setDescription(description);
} catch (ClassCastException e) {
//added warnings as it can then proceed to load rest of resources/tags
log.warn(String.format("Cannot cast content of %s to byte[]", descriptionPath), e);
} catch (RegistryException e) {
//added warnings as it can then proceed to load rest of resources/tags
log.warn(String.format("Cannot read content of %s", descriptionPath), e);
}
}
// Checks whether the thumbnail exists.
String thumbnailPath = String.format(thumbnailPathPattern, tag.getName());
try {
boolean isThumbnailExists = govRegistry.resourceExists(thumbnailPath);
tag.setThumbnailExists(isThumbnailExists);
if (isThumbnailExists) {
tag.setThumbnailUrl(APIUtil.getRegistryResourcePathForUI(
APIConstants.RegistryResourceTypesForUI.TAG_THUMBNAIL, tenantDomain, thumbnailPath));
}
} catch (RegistryException e) {
//warn and then proceed to load rest of tags
log.warn(String.format("Error while querying the existence of %s", thumbnailPath), e);
}
}
}
return tags;
}
@Override
public void rateAPI(Identifier id, APIRating rating, String user) throws APIManagementException {
apiMgtDAO.addRating(id, rating.getRating(), user);
}
@Override
public void removeAPIRating(Identifier id, String user) throws APIManagementException {
apiMgtDAO.removeAPIRating(id, user);
}
@Override
public int getUserRating(Identifier apiId, String user) throws APIManagementException {
return apiMgtDAO.getUserRating(apiId, user);
}
@Override
public JSONObject getUserRatingInfo(Identifier id, String user) throws APIManagementException {
JSONObject obj = apiMgtDAO.getUserRatingInfo(id, user);
if (obj == null || obj.isEmpty()) {
String msg = "Failed to get API ratings for API " + id.getName() + " for user " + user;
log.error(msg);
throw new APIMgtResourceNotFoundException(msg);
}
return obj;
}
@Override
public JSONArray getAPIRatings(Identifier apiId) throws APIManagementException {
return apiMgtDAO.getAPIRatings(apiId);
}
@Override
public float getAverageAPIRating(Identifier apiId) throws APIManagementException {
return apiMgtDAO.getAverageRating(apiId);
}
@Override
public Set<API> getPublishedAPIsByProvider(String providerId, int limit)
throws APIManagementException {
SortedSet<API> apiSortedSet = new TreeSet<API>(new APINameComparator());
SortedSet<API> apiVersionsSortedSet = new TreeSet<API>(new APIVersionComparator());
try {
Map<String, API> latestPublishedAPIs = new HashMap<String, API>();
List<API> multiVersionedAPIs = new ArrayList<API>();
Comparator<API> versionComparator = new APIVersionComparator();
Boolean displayMultipleVersions = APIUtil.isAllowDisplayMultipleVersions();
Boolean displayAPIsWithMultipleStatus = APIUtil.isAllowDisplayAPIsWithMultipleStatus();
String providerPath = APIConstants.API_ROOT_LOCATION + RegistryConstants.PATH_SEPARATOR + providerId;
GenericArtifactManager artifactManager = APIUtil.getArtifactManager(registry, APIConstants.API_KEY);
if (artifactManager == null) {
String errorMessage =
"Artifact manager is null when retrieving published APIs by provider ID " + providerId;
log.error(errorMessage);
throw new APIManagementException(errorMessage);
}
Association[] associations = registry.getAssociations(providerPath, APIConstants.PROVIDER_ASSOCIATION);
if (associations.length < limit || limit == -1) {
limit = associations.length;
}
for (int i = 0; i < limit; i++) {
Association association = associations[i];
String apiPath = association.getDestinationPath();
Resource resource = registry.get(apiPath);
String apiArtifactId = resource.getUUID();
if (apiArtifactId != null) {
GenericArtifact artifact = artifactManager.getGenericArtifact(apiArtifactId);
// check the API status
String status = APIUtil.getLcStateFromArtifact(artifact);
API api = null;
//Check the api-manager.xml config file entry <DisplayAllAPIs> value is false
if (!displayAPIsWithMultipleStatus) {
// then we are only interested in published APIs here...
if (APIConstants.PUBLISHED.equals(status)) {
api = APIUtil.getAPI(artifact);
}
} else { // else we are interested in both deprecated/published APIs here...
if (APIConstants.PUBLISHED.equals(status) || APIConstants.DEPRECATED.equals(status)) {
api = APIUtil.getAPI(artifact);
}
}
if (api != null) {
String key;
//Check the configuration to allow showing multiple versions of an API true/false
if (!displayMultipleVersions) { //If allow only showing the latest version of an API
key = api.getId().getProviderName() + COLON_CHAR + api.getId().getApiName();
API existingAPI = latestPublishedAPIs.get(key);
if (existingAPI != null) {
// If we have already seen an API with the same name, make sure
// this one has a higher version number
if (versionComparator.compare(api, existingAPI) > 0) {
latestPublishedAPIs.put(key, api);
}
} else {
// We haven't seen this API before
latestPublishedAPIs.put(key, api);
}
} else { //If allow showing multiple versions of an API
multiVersionedAPIs.add(api);
}
}
} else {
throw new GovernanceException("artifact id is null of " + apiPath);
}
}
if (!displayMultipleVersions) {
apiSortedSet.addAll(latestPublishedAPIs.values());
return apiSortedSet;
} else {
apiVersionsSortedSet.addAll(multiVersionedAPIs);
return apiVersionsSortedSet;
}
} catch (RegistryException e) {
handleException("Failed to get Published APIs for provider : " + providerId, e);
}
return null;
}
@Override
public Set<API> getPublishedAPIsByProvider(String providerId, String loggedUsername, int limit, String apiOwner,
String apiBizOwner) throws APIManagementException {
try {
Boolean allowMultipleVersions = APIUtil.isAllowDisplayMultipleVersions();
Boolean showAllAPIs = APIUtil.isAllowDisplayAPIsWithMultipleStatus();
String providerDomain = MultitenantUtils.getTenantDomain(APIUtil.replaceEmailDomainBack(providerId));
int tenantId = getTenantId(providerDomain);
final Registry registry = ServiceReferenceHolder.getInstance().
getRegistryService().getGovernanceSystemRegistry(tenantId);
GenericArtifactManager artifactManager = APIUtil.getArtifactManager(registry,
APIConstants.API_KEY);
if (artifactManager == null) {
String errorMessage =
"Artifact manager is null when retrieving all published APIs by provider ID " + providerId;
log.error(errorMessage);
throw new APIManagementException(errorMessage);
}
int publishedAPICount = 0;
Map<String, API> apiCollection = new HashMap<String, API>();
if(apiBizOwner != null && !apiBizOwner.isEmpty()){
try {
final String bizOwner = apiBizOwner;
Map<String, List<String>> listMap = new HashMap<String, List<String>>();
listMap.put(APIConstants.API_OVERVIEW_BUSS_OWNER, new ArrayList<String>() {{
add(bizOwner);
}});
PrivilegedCarbonContext.getThreadLocalCarbonContext().setUsername(this.username);
GenericArtifact[] genericArtifacts = artifactManager.findGenericArtifacts(listMap);
if(genericArtifacts != null && genericArtifacts.length > 0){
for(GenericArtifact artifact : genericArtifacts){
if (publishedAPICount >= limit) {
break;
}
if(isCandidateAPI(artifact.getPath(), loggedUsername, artifactManager, tenantId, showAllAPIs,
allowMultipleVersions, apiOwner, providerId, registry, apiCollection)){
publishedAPICount += 1;
}
}
}
} catch (GovernanceException e) {
log.error("Error while finding APIs by business owner " + apiBizOwner, e);
return null;
}
}
else{
String providerPath = APIConstants.API_ROOT_LOCATION + RegistryConstants.PATH_SEPARATOR + providerId;
Association[] associations = registry.getAssociations(providerPath, APIConstants.PROVIDER_ASSOCIATION);
for (Association association : associations) {
if (publishedAPICount >= limit) {
break;
}
String apiPath = association.getDestinationPath();
if(isCandidateAPI(apiPath, loggedUsername, artifactManager, tenantId, showAllAPIs,
allowMultipleVersions, apiOwner, providerId, registry, apiCollection)){
publishedAPICount += 1;
}
}
}
return new HashSet<API>(apiCollection.values());
} catch (RegistryException e) {
handleException("Failed to get Published APIs for provider : " + providerId, e);
return null;
} catch (org.wso2.carbon.user.core.UserStoreException e) {
handleException("Failed to get Published APIs for provider : " + providerId, e);
return null;
} catch (UserStoreException e) {
handleException("Failed to get Published APIs for provider : " + providerId, e);
return null;
}
}
private boolean isCandidateAPI(String apiPath, String loggedUsername, GenericArtifactManager artifactManager,
int tenantId, boolean showAllAPIs, boolean allowMultipleVersions,
String apiOwner, String providerId, Registry registry, Map<String, API> apiCollection)
throws UserStoreException, RegistryException, APIManagementException {
AuthorizationManager manager = ServiceReferenceHolder.getInstance().getRealmService().
getTenantUserRealm(tenantId).getAuthorizationManager();
Comparator<API> versionComparator = new APIVersionComparator();
Resource resource;
String path = RegistryUtils.getAbsolutePath(RegistryContext.getBaseInstance(),
APIUtil.getMountedPath(RegistryContext.getBaseInstance(),
RegistryConstants.GOVERNANCE_REGISTRY_BASE_PATH) +
apiPath);
boolean checkAuthorized;
String userNameWithoutDomain = loggedUsername;
if (!loggedUsername.isEmpty() && !MultitenantConstants.SUPER_TENANT_DOMAIN_NAME.equals(super.tenantDomain)) {
String[] nameParts = loggedUsername.split("@");
userNameWithoutDomain = nameParts[0];
}
int loggedInUserTenantDomain = -1;
if(!StringUtils.isEmpty(loggedUsername)) {
loggedInUserTenantDomain = APIUtil.getTenantId(loggedUsername);
}
if (loggedUsername.isEmpty()) {
// Anonymous user is viewing.
checkAuthorized = manager.isRoleAuthorized(APIConstants.ANONYMOUS_ROLE, path, ActionConstants.GET);
} else if (tenantId != loggedInUserTenantDomain) {
//Cross tenant scenario
providerId = APIUtil.replaceEmailDomainBack(providerId);
String[] nameParts = providerId.split("@");
String provideNameWithoutDomain = nameParts[0];
checkAuthorized = manager.isUserAuthorized(provideNameWithoutDomain, path, ActionConstants.GET);
} else {
// Some user is logged in also user and api provider tenant domain are same.
checkAuthorized = manager.isUserAuthorized(userNameWithoutDomain, path, ActionConstants.GET);
}
String apiArtifactId = null;
if (checkAuthorized) {
resource = registry.get(apiPath);
apiArtifactId = resource.getUUID();
}
if (apiArtifactId != null) {
GenericArtifact artifact = artifactManager.getGenericArtifact(apiArtifactId);
// check the API status
String status = APIUtil.getLcStateFromArtifact(artifact);
API api = null;
//Check the api-manager.xml config file entry <DisplayAllAPIs> value is false
if (!showAllAPIs) {
// then we are only interested in published APIs here...
if (APIConstants.PUBLISHED.equals(status)) {
api = APIUtil.getAPI(artifact);
}
} else { // else we are interested in both deprecated/published APIs here...
if (APIConstants.PUBLISHED.equals(status) || APIConstants.DEPRECATED.equals(status)) {
api = APIUtil.getAPI(artifact);
}
}
if (api != null) {
String apiVisibility = api.getVisibility();
if(!StringUtils.isEmpty(apiVisibility) && !APIConstants.API_GLOBAL_VISIBILITY.equalsIgnoreCase(apiVisibility)) {
String providerDomain = MultitenantUtils.getTenantDomain(APIUtil.replaceEmailDomainBack(providerId));
String loginUserDomain = MultitenantUtils.getTenantDomain(loggedUsername);
if(!StringUtils.isEmpty(providerDomain) && !StringUtils.isEmpty(loginUserDomain)
&& !providerDomain.equals(loginUserDomain)){
return false;
}
}
// apiOwner is the value coming from front end and compared against the API instance
if (apiOwner != null && !apiOwner.isEmpty()) {
if (APIUtil.replaceEmailDomainBack(providerId).equals(APIUtil.replaceEmailDomainBack(apiOwner)) &&
api.getApiOwner() != null && !api.getApiOwner().isEmpty() &&
!APIUtil.replaceEmailDomainBack(apiOwner)
.equals(APIUtil.replaceEmailDomainBack(api.getApiOwner()))) {
return false; // reject remote APIs when local admin user's API selected
} else if (!APIUtil.replaceEmailDomainBack(providerId).equals(APIUtil.replaceEmailDomainBack(apiOwner)) &&
!APIUtil.replaceEmailDomainBack(apiOwner)
.equals(APIUtil.replaceEmailDomainBack(api.getApiOwner()))) {
return false; // reject local admin's APIs when remote API selected
}
}
String key;
//Check the configuration to allow showing multiple versions of an API true/false
if (!allowMultipleVersions) { //If allow only showing the latest version of an API
key = api.getId().getProviderName() + COLON_CHAR + api.getId().getApiName();
API existingAPI = apiCollection.get(key);
if (existingAPI != null) {
// If we have already seen an API with the same name, make sure
// this one has a higher version number
if (versionComparator.compare(api, existingAPI) > 0) {
apiCollection.put(key, api);
return true;
}
} else {
// We haven't seen this API before
apiCollection.put(key, api);
return true;
}
} else { //If allow showing multiple versions of an API
key = api.getId().getProviderName() + COLON_CHAR + api.getId().getApiName() + COLON_CHAR + api.getId()
.getVersion();
//we're not really interested in the key, so generate one for the sake of adding this element to
//the map.
key = key + '_' + apiCollection.size();
apiCollection.put(key, api);
return true;
}
}
}
return false;
}
@Override
public Map<String,Object> searchPaginatedAPIs(String searchTerm, String searchType, String requestedTenantDomain,int start,int end, boolean isLazyLoad)
throws APIManagementException {
Map<String,Object> result = new HashMap<String,Object>();
boolean isTenantFlowStarted = false;
try {
boolean isTenantMode=(requestedTenantDomain != null);
if (isTenantMode && !org.wso2.carbon.base.MultitenantConstants.SUPER_TENANT_DOMAIN_NAME.equals(requestedTenantDomain)) {
isTenantFlowStarted = true;
PrivilegedCarbonContext.startTenantFlow();
PrivilegedCarbonContext.getThreadLocalCarbonContext().setTenantDomain(requestedTenantDomain, true);
} else {
requestedTenantDomain = org.wso2.carbon.base.MultitenantConstants.SUPER_TENANT_DOMAIN_NAME;
isTenantFlowStarted = true;
PrivilegedCarbonContext.startTenantFlow();
PrivilegedCarbonContext.getThreadLocalCarbonContext().setTenantDomain(requestedTenantDomain, true);
}
Registry userRegistry;
int tenantIDLocal = 0;
String userNameLocal = this.username;
if ((isTenantMode && this.tenantDomain==null) || (isTenantMode && isTenantDomainNotMatching(requestedTenantDomain))) {//Tenant store anonymous mode
tenantIDLocal = ServiceReferenceHolder.getInstance().getRealmService().getTenantManager()
.getTenantId(requestedTenantDomain);
userRegistry = ServiceReferenceHolder.getInstance().
getRegistryService().getGovernanceUserRegistry(CarbonConstants.REGISTRY_ANONNYMOUS_USERNAME, tenantIDLocal);
userNameLocal = CarbonConstants.REGISTRY_ANONNYMOUS_USERNAME;
} else {
userRegistry = this.registry;
tenantIDLocal = tenantId;
}
PrivilegedCarbonContext.getThreadLocalCarbonContext().setUsername(userNameLocal);
if (APIConstants.DOCUMENTATION_SEARCH_TYPE_PREFIX.equalsIgnoreCase(searchType)) {
Map<Documentation, API> apiDocMap =
APIUtil.searchAPIsByDoc(userRegistry, tenantIDLocal, userNameLocal, searchTerm,
APIConstants.STORE_CLIENT);
result.put("apis", apiDocMap);
/*Pagination for Document search results is not supported yet, hence length is sent as end-start*/
if (apiDocMap.isEmpty()) {
result.put("length", 0);
} else {
result.put("length", end-start);
}
}
else if ("subcontext".equalsIgnoreCase(searchType)) {
result = APIUtil.searchAPIsByURLPattern(userRegistry, searchTerm, start,end); ;
}else {
result=searchPaginatedAPIs(userRegistry, searchTerm, searchType,start,end,isLazyLoad);
}
} catch (Exception e) {
handleException("Failed to Search APIs", e);
} finally {
if (isTenantFlowStarted) {
PrivilegedCarbonContext.endTenantFlow();
}
}
return result;
}
@Override
public Map<String, Object> searchPaginatedAPIs(String searchQuery, String requestedTenantDomain, int start, int end,
boolean isLazyLoad) throws APIManagementException {
Map<String, Object> searchResults =
super.searchPaginatedAPIs(searchQuery, requestedTenantDomain, start, end, isLazyLoad);
return filterMultipleVersionedAPIs(searchResults);
}
/**
* Pagination API search based on solr indexing
*
* @param registry
* @param searchTerm
* @param searchType
* @return
* @throws APIManagementException
*/
public Map<String,Object> searchPaginatedAPIs(Registry registry, String searchTerm, String searchType,int start,int end, boolean limitAttributes) throws APIManagementException {
SortedSet<API> apiSet = new TreeSet<API>(new APINameComparator());
List<API> apiList = new ArrayList<API>();
searchTerm = searchTerm.trim();
Map<String,Object> result=new HashMap<String, Object>();
int totalLength=0;
boolean isMore = false;
String criteria=APIConstants.API_OVERVIEW_NAME;
try {
String paginationLimit = getAPIManagerConfiguration()
.getFirstProperty(APIConstants.API_STORE_APIS_PER_PAGE);
// If the Config exists use it to set the pagination limit
final int maxPaginationLimit;
if (paginationLimit != null) {
// The additional 1 added to the maxPaginationLimit is to help us determine if more
// APIs may exist so that we know that we are unable to determine the actual total
// API count. We will subtract this 1 later on so that it does not interfere with
// the logic of the rest of the application
int pagination = Integer.parseInt(paginationLimit);
// Because the store jaggery pagination logic is 10 results per a page we need to set pagination
// limit to at least 11 or the pagination done at this level will conflict with the store pagination
// leading to some of the APIs not being displayed
if (pagination < 11) {
pagination = 11;
log.warn("Value of '" + APIConstants.API_STORE_APIS_PER_PAGE + "' is too low, defaulting to 11");
}
maxPaginationLimit = start + pagination + 1;
}
// Else if the config is not specified we go with default functionality and load all
else {
maxPaginationLimit = Integer.MAX_VALUE;
}
GenericArtifactManager artifactManager = APIUtil.getArtifactManager(registry, APIConstants.API_KEY);
PaginationContext.init(start, end, "ASC", APIConstants.API_OVERVIEW_NAME, maxPaginationLimit);
if (artifactManager != null) {
if (APIConstants.API_PROVIDER.equalsIgnoreCase(searchType)) {
criteria = APIConstants.API_OVERVIEW_PROVIDER;
searchTerm = searchTerm.replaceAll("@", "-AT-");
} else if (APIConstants.API_VERSION_LABEL.equalsIgnoreCase(searchType)) {
criteria = APIConstants.API_OVERVIEW_VERSION;
} else if (APIConstants.API_CONTEXT.equalsIgnoreCase(searchType)) {
criteria = APIConstants.API_OVERVIEW_CONTEXT;
} else if (APIConstants.API_DESCRIPTION.equalsIgnoreCase(searchType)) {
criteria = APIConstants.API_OVERVIEW_DESCRIPTION;
} else if (APIConstants.API_TAG.equalsIgnoreCase(searchType)) {
criteria = APIConstants.API_OVERVIEW_TAG;
}
//Create the search attribute map for PUBLISHED APIs
final String searchValue = searchTerm;
Map<String, List<String>> listMap = new HashMap<String, List<String>>();
listMap.put(criteria, new ArrayList<String>() {{
add(searchValue);
}});
boolean displayAPIsWithMultipleStatus = APIUtil.isAllowDisplayAPIsWithMultipleStatus();
//This is due to take only the published APIs from the search if there is no need to return APIs with
//multiple status. This is because pagination is breaking when we do a another filtering with the API Status
if (!displayAPIsWithMultipleStatus) {
listMap.put(APIConstants.API_OVERVIEW_STATUS, new ArrayList<String>() {{
add(APIConstants.PUBLISHED);
}});
}
GenericArtifact[] genericArtifacts = artifactManager.findGenericArtifacts(listMap);
totalLength = PaginationContext.getInstance().getLength();
boolean isFound = true;
if (genericArtifacts == null || genericArtifacts.length == 0) {
if (APIConstants.API_OVERVIEW_PROVIDER.equals(criteria)) {
genericArtifacts = searchAPIsByOwner(artifactManager, searchValue);
if (genericArtifacts == null || genericArtifacts.length == 0) {
isFound = false;
}
}
else {
isFound = false;
}
}
if (!isFound) {
result.put("apis", apiSet);
result.put("length", 0);
result.put("isMore", isMore);
return result;
}
// Check to see if we can speculate that there are more APIs to be loaded
if (maxPaginationLimit == totalLength) {
isMore = true; // More APIs exist, cannot determine total API count without incurring perf hit
--totalLength; // Remove the additional 1 added earlier when setting max pagination limit
}
int tempLength =0;
for (GenericArtifact artifact : genericArtifacts) {
String status = artifact.getAttribute(APIConstants.API_OVERVIEW_STATUS);
if (APIUtil.isAllowDisplayAPIsWithMultipleStatus()) {
if (APIConstants.PROTOTYPED.equals(status) || APIConstants.PUBLISHED.equals(status)
|| APIConstants.DEPRECATED.equals(status)) {
API resultAPI;
if (limitAttributes) {
resultAPI = APIUtil.getAPI(artifact);
} else {
resultAPI = APIUtil.getAPI(artifact, registry);
}
if (resultAPI != null) {
apiList.add(resultAPI);
}
}
} else {
if (APIConstants.PROTOTYPED.equals(status) || APIConstants.PUBLISHED.equals(status)) {
API resultAPI;
if (limitAttributes) {
resultAPI = APIUtil.getAPI(artifact);
} else {
resultAPI = APIUtil.getAPI(artifact, registry);
}
if (resultAPI != null) {
apiList.add(resultAPI);
}
}
}
// Ensure the APIs returned matches the length, there could be an additional API
// returned due incrementing the pagination limit when getting from registry
tempLength++;
if (tempLength >= totalLength){
break;
}
}
apiSet.addAll(apiList);
}
} catch (RegistryException e) {
handleException("Failed to search APIs with type", e);
}
result.put("apis",apiSet);
result.put("length",totalLength);
result.put("isMore", isMore);
return result;
}
private GenericArtifact[] searchAPIsByOwner(GenericArtifactManager artifactManager, final String searchValue) throws GovernanceException {
Map<String, List<String>> listMap = new HashMap<String, List<String>>();
listMap.put(APIConstants.API_OVERVIEW_OWNER, new ArrayList<String>() {
{
add(searchValue);
}
});
return artifactManager.findGenericArtifacts(listMap);
}
/**
*This method will delete application key mapping table and application registration table.
*@param applicationName application Name
*@param tokenType Token Type.
*@param groupId group id.
*@param userName user name.
*@return
*@throws APIManagementException
*/
@Override
public void cleanUpApplicationRegistration(String applicationName ,String tokenType ,String groupId ,String
userName) throws APIManagementException{
Application application = apiMgtDAO.getApplicationByName(applicationName, userName, groupId);
String applicationId = String.valueOf(application.getId());
cleanUpApplicationRegistrationByApplicationId(applicationId, tokenType);
}
/*
* @see super.cleanUpApplicationRegistrationByApplicationId
* */
@Override
public void cleanUpApplicationRegistrationByApplicationId(String applicationId, String tokenType) throws APIManagementException {
apiMgtDAO.deleteApplicationRegistration(applicationId , tokenType);
apiMgtDAO.deleteApplicationKeyMappingByApplicationIdAndType(applicationId, tokenType);
apiMgtDAO.getConsumerkeyByApplicationIdAndKeyType(applicationId, tokenType);
}
/**
*
* @param jsonString this string will contain oAuth app details
* @param userName user name of logged in user.
* @param clientId this is the consumer key of oAuthApplication
* @param applicationName this is the APIM appication name.
* @param keyType
* @param tokenType this is theApplication Token Type. This can be either default or jwt.
* @return
* @throws APIManagementException
*/
@Override
public Map<String, Object> mapExistingOAuthClient(String jsonString, String userName, String clientId,
String applicationName, String keyType, String tokenType)
throws APIManagementException {
String callBackURL = null;
OAuthAppRequest oauthAppRequest = ApplicationUtils.createOauthAppRequest(applicationName, clientId, callBackURL,
"default",
jsonString, tokenType);
KeyManager keyManager = KeyManagerHolder.getKeyManagerInstance();
// Checking if clientId is mapped with another application.
if (apiMgtDAO.isMappingExistsforConsumerKey(clientId)) {
String message = "Consumer Key " + clientId + " is used for another Application.";
log.error(message);
throw new APIManagementException(message);
}
log.debug("Client ID not mapped previously with another application.");
//createApplication on oAuthorization server.
OAuthApplicationInfo oAuthApplication = keyManager.mapOAuthApplication(oauthAppRequest);
//Do application mapping with consumerKey.
apiMgtDAO.createApplicationKeyTypeMappingForManualClients(keyType, applicationName, userName, clientId);
AccessTokenInfo tokenInfo;
if (oAuthApplication.getJsonString().contains(APIConstants.GRANT_TYPE_CLIENT_CREDENTIALS)) {
AccessTokenRequest tokenRequest = ApplicationUtils.createAccessTokenRequest(oAuthApplication, null);
tokenInfo = keyManager.getNewApplicationAccessToken(tokenRequest);
} else {
tokenInfo = new AccessTokenInfo();
tokenInfo.setAccessToken("");
tokenInfo.setValidityPeriod(0L);
String[] noScopes = new String[] {"N/A"};
tokenInfo.setScope(noScopes);
oAuthApplication.addParameter("tokenScope", Arrays.toString(noScopes));
}
Map<String, Object> keyDetails = new HashMap<String, Object>();
if (tokenInfo != null) {
keyDetails.put("validityTime", tokenInfo.getValidityPeriod());
keyDetails.put("accessToken", tokenInfo.getAccessToken());
keyDetails.put("tokenDetails", tokenInfo.getJSONString());
}
keyDetails.put("consumerKey", oAuthApplication.getClientId());
keyDetails.put("consumerSecret", oAuthApplication.getParameter("client_secret"));
keyDetails.put("appDetails", oAuthApplication.getJsonString());
return keyDetails;
}
/** returns the SubscribedAPI object which is related to the subscriptionId
*
* @param subscriptionId subscription id
* @return
* @throws APIManagementException
*/
@Override
public SubscribedAPI getSubscriptionById(int subscriptionId) throws APIManagementException {
return apiMgtDAO.getSubscriptionById(subscriptionId);
}
@Override
public Set<SubscribedAPI> getSubscribedAPIs(Subscriber subscriber) throws APIManagementException {
return getSubscribedAPIs(subscriber, null);
}
@Override
public Set<SubscribedAPI> getSubscribedAPIs(Subscriber subscriber, String groupingId) throws APIManagementException {
Set<SubscribedAPI> originalSubscribedAPIs;
Set<SubscribedAPI> subscribedAPIs = new HashSet<SubscribedAPI>();
try {
originalSubscribedAPIs = apiMgtDAO.getSubscribedAPIs(subscriber, groupingId);
if (originalSubscribedAPIs != null && !originalSubscribedAPIs.isEmpty()) {
Map<String, Tier> tiers = APIUtil.getTiers(tenantId);
for (SubscribedAPI subscribedApi : originalSubscribedAPIs) {
Tier tier = tiers.get(subscribedApi.getTier().getName());
subscribedApi.getTier().setDisplayName(tier != null ? tier.getDisplayName() : subscribedApi.getTier().getName());
subscribedAPIs.add(subscribedApi);
}
}
} catch (APIManagementException e) {
handleException("Failed to get APIs of " + subscriber.getName(), e);
}
return subscribedAPIs;
}
private Set<SubscribedAPI> getLightWeightSubscribedAPIs(Subscriber subscriber, String groupingId) throws
APIManagementException {
Set<SubscribedAPI> originalSubscribedAPIs;
Set<SubscribedAPI> subscribedAPIs = new HashSet<SubscribedAPI>();
try {
originalSubscribedAPIs = apiMgtDAO.getSubscribedAPIs(subscriber, groupingId);
if (originalSubscribedAPIs != null && !originalSubscribedAPIs.isEmpty()) {
Map<String, Tier> tiers = APIUtil.getTiers(tenantId);
for (SubscribedAPI subscribedApi : originalSubscribedAPIs) {
Application application = subscribedApi.getApplication();
if (application != null) {
int applicationId = application.getId();
}
Tier tier = tiers.get(subscribedApi.getTier().getName());
subscribedApi.getTier().setDisplayName(tier != null ? tier.getDisplayName() : subscribedApi
.getTier().getName());
subscribedAPIs.add(subscribedApi);
}
}
} catch (APIManagementException e) {
handleException("Failed to get APIs of " + subscriber.getName(), e);
}
return subscribedAPIs;
}
@Override
public Set<SubscribedAPI> getSubscribedAPIs(Subscriber subscriber, String applicationName, String groupingId)
throws APIManagementException {
Set<SubscribedAPI> subscribedAPIs = null;
try {
subscribedAPIs = apiMgtDAO.getSubscribedAPIs(subscriber, applicationName, groupingId);
if (subscribedAPIs != null && !subscribedAPIs.isEmpty()) {
Map<String, Tier> tiers = APIUtil.getTiers(tenantId);
for (SubscribedAPI subscribedApi : subscribedAPIs) {
Tier tier = tiers.get(subscribedApi.getTier().getName());
subscribedApi.getTier().setDisplayName(tier != null ? tier.getDisplayName() : subscribedApi
.getTier().getName());
// We do not need to add the modified object again.
}
}
} catch (APIManagementException e) {
handleException("Failed to get APIs of " + subscriber.getName() + " under application " + applicationName, e);
}
return subscribedAPIs;
}
public JSONArray getScopesForApplicationSubscription(String username, int applicationId)
throws APIManagementException {
Set<Scope> scopeSet;
JSONArray scopeArray = new JSONArray();
Subscriber subscriber = new Subscriber(username);
scopeSet = apiMgtDAO.getScopesForApplicationSubscription(subscriber, applicationId);
for (Scope scope : scopeSet) {
JSONObject scopeObj = new JSONObject();
scopeObj.put("scopeKey", scope.getKey());
scopeObj.put("scopeName", scope.getName());
scopeArray.add(scopeObj);
}
return scopeArray;
}
/*
*@see super.getSubscribedAPIsByApplicationId
*
*/
@Override
public Set<SubscribedAPI> getSubscribedAPIsByApplicationId(Subscriber subscriber, int applicationId, String groupingId) throws APIManagementException {
Set<SubscribedAPI> subscribedAPIs = null;
try {
subscribedAPIs = apiMgtDAO.getSubscribedAPIsByApplicationId(subscriber, applicationId, groupingId);
if (subscribedAPIs != null && !subscribedAPIs.isEmpty()) {
Map<String, Tier> tiers = APIUtil.getTiers(tenantId);
for (SubscribedAPI subscribedApi : subscribedAPIs) {
Tier tier = tiers.get(subscribedApi.getTier().getName());
subscribedApi.getTier().setDisplayName(tier != null ? tier.getDisplayName() : subscribedApi
.getTier().getName());
// We do not need to add the modified object again.
}
}
} catch (APIManagementException e) {
handleException("Failed to get APIs of " + subscriber.getName() + " under application " + applicationId, e);
}
return subscribedAPIs;
}
@Override
public Set<SubscribedAPI> getPaginatedSubscribedAPIs(Subscriber subscriber, String applicationName,
int startSubIndex, int endSubIndex, String groupingId)
throws APIManagementException {
Set<SubscribedAPI> subscribedAPIs = null;
try {
subscribedAPIs = apiMgtDAO.getPaginatedSubscribedAPIs(subscriber, applicationName, startSubIndex,
endSubIndex, groupingId);
if (subscribedAPIs != null && !subscribedAPIs.isEmpty()) {
Map<String, Tier> tiers = APIUtil.getTiers(tenantId);
for (SubscribedAPI subscribedApi : subscribedAPIs) {
Tier tier = tiers.get(subscribedApi.getTier().getName());
subscribedApi.getTier().setDisplayName(tier != null ? tier.getDisplayName() : subscribedApi
.getTier().getName());
// We do not need to add the modified object again.
// subscribedAPIs.add(subscribedApi);
}
}
} catch (APIManagementException e) {
handleException("Failed to get APIs of " + subscriber.getName() + " under application " + applicationName, e);
}
return subscribedAPIs;
}
@Override
public Set<SubscribedAPI> getPaginatedSubscribedAPIs(Subscriber subscriber, int applicationId, int startSubIndex,
int endSubIndex, String groupingId) throws APIManagementException {
Set<SubscribedAPI> subscribedAPIs = null;
try {
subscribedAPIs = apiMgtDAO.getPaginatedSubscribedAPIs(subscriber, applicationId, startSubIndex,
endSubIndex, groupingId);
if (subscribedAPIs != null && !subscribedAPIs.isEmpty()) {
Map<String, Tier> tiers = APIUtil.getTiers(tenantId);
for (SubscribedAPI subscribedApi : subscribedAPIs) {
Tier tier = tiers.get(subscribedApi.getTier().getName());
subscribedApi.getTier().setDisplayName(tier != null ? tier.getDisplayName() : subscribedApi
.getTier().getName());
// We do not need to add the modified object again.
// subscribedAPIs.add(subscribedApi);
}
}
} catch (APIManagementException e) {
String msg = "Failed to get APIs of " + subscriber.getName() + " under application " + applicationId;
log.error(msg, e);
throw new APIManagementException(msg, e);
}
return subscribedAPIs;
}
public Integer getSubscriptionCount(Subscriber subscriber,String applicationName,String groupingId)
throws APIManagementException {
return apiMgtDAO.getSubscriptionCount(subscriber,applicationName,groupingId);
}
public Integer getSubscriptionCountByApplicationId(Subscriber subscriber, int applicationId, String groupingId)
throws APIManagementException {
return apiMgtDAO.getSubscriptionCountByApplicationId(subscriber, applicationId, groupingId);
}
@Override
public Set<APIIdentifier> getAPIByConsumerKey(String accessToken) throws APIManagementException {
try {
return apiMgtDAO.getAPIByConsumerKey(accessToken);
} catch (APIManagementException e) {
handleException("Error while obtaining API from API key", e);
}
return null;
}
@Override
public boolean isSubscribed(APIIdentifier apiIdentifier, String userId)
throws APIManagementException {
boolean isSubscribed;
try {
isSubscribed = apiMgtDAO.isSubscribed(apiIdentifier, userId);
} catch (APIManagementException e) {
String msg = "Failed to check if user(" + userId + ") has subscribed to " + apiIdentifier;
log.error(msg, e);
throw new APIManagementException(msg, e);
}
return isSubscribed;
}
/**
* This methods loads the monetization implementation class
*
* @return monetization implementation class
* @throws APIManagementException if failed to load monetization implementation class
*/
public Monetization getMonetizationImplClass() throws APIManagementException {
APIManagerConfiguration configuration = getAPIManagerConfiguration();
Monetization monetizationImpl = null;
if (configuration == null) {
log.error("API Manager configuration is not initialized.");
} else {
String monetizationImplClass = configuration.getFirstProperty(APIConstants.Monetization.MONETIZATION_IMPL);
if (monetizationImplClass == null) {
monetizationImpl = new DefaultMonetizationImpl();
} else {
try {
monetizationImpl = (Monetization) APIUtil.getClassForName(monetizationImplClass).newInstance();
} catch (ClassNotFoundException | IllegalAccessException | InstantiationException e) {
APIUtil.handleException("Failed to load monetization implementation class.", e);
}
}
}
return monetizationImpl;
}
@Override
public SubscriptionResponse addSubscription(ApiTypeWrapper apiTypeWrapper, String userId, int applicationId)
throws APIManagementException {
API api = null;
APIProduct product = null;
Identifier identifier = null;
String tenantAwareUsername = MultitenantUtils.getTenantAwareUsername(userId);
String tenantDomain = MultitenantUtils.getTenantDomain(tenantAwareUsername);
final boolean isApiProduct = apiTypeWrapper.isAPIProduct();
String state;
String apiContext;
if (isApiProduct) {
product = apiTypeWrapper.getApiProduct();
state = product.getState();
identifier = product.getId();
apiContext = product.getContext();
} else {
api = apiTypeWrapper.getApi();
state = api.getStatus();
identifier = api.getId();
apiContext = api.getContext();
}
WorkflowResponse workflowResponse = null;
int subscriptionId;
if (APIConstants.PUBLISHED.equals(state)) {
subscriptionId = apiMgtDAO.addSubscription(apiTypeWrapper, applicationId,
APIConstants.SubscriptionStatus.ON_HOLD);
boolean isTenantFlowStarted = false;
if (tenantDomain != null && !MultitenantConstants.SUPER_TENANT_DOMAIN_NAME.equals(tenantDomain)) {
isTenantFlowStarted = startTenantFlowForTenantDomain(tenantDomain);
}
String applicationName = apiMgtDAO.getApplicationNameFromId(applicationId);
try {
WorkflowExecutor addSubscriptionWFExecutor = getWorkflowExecutor(WorkflowConstants.WF_TYPE_AM_SUBSCRIPTION_CREATION);
SubscriptionWorkflowDTO workflowDTO = new SubscriptionWorkflowDTO();
workflowDTO.setStatus(WorkflowStatus.CREATED);
workflowDTO.setCreatedTime(System.currentTimeMillis());
workflowDTO.setTenantDomain(tenantDomain);
workflowDTO.setTenantId(tenantId);
workflowDTO.setExternalWorkflowReference(addSubscriptionWFExecutor.generateUUID());
workflowDTO.setWorkflowReference(String.valueOf(subscriptionId));
workflowDTO.setWorkflowType(WorkflowConstants.WF_TYPE_AM_SUBSCRIPTION_CREATION);
workflowDTO.setCallbackUrl(addSubscriptionWFExecutor.getCallbackURL());
workflowDTO.setApiName(identifier.getName());
workflowDTO.setApiContext(apiContext);
workflowDTO.setApiVersion(identifier.getVersion());
workflowDTO.setApiProvider(identifier.getProviderName());
workflowDTO.setTierName(identifier.getTier());
workflowDTO.setApplicationName(apiMgtDAO.getApplicationNameFromId(applicationId));
workflowDTO.setApplicationId(applicationId);
workflowDTO.setSubscriber(userId);
Tier tier = null;
Set<Tier> policies = Collections.emptySet();
if (!isApiProduct) {
policies = api.getAvailableTiers();
} else {
policies = product.getAvailableTiers();
}
for (Tier policy : policies) {
if (policy.getName() != null && (policy.getName()).equals(workflowDTO.getTierName())) {
tier = policy;
}
}
boolean isMonetizationEnabled = false;
if (api != null) {
isMonetizationEnabled = api.getMonetizationStatus();
//check whether monetization is enabled for API and tier plan is commercial
if (isMonetizationEnabled && APIConstants.COMMERCIAL_TIER_PLAN.equals(tier.getTierPlan())) {
workflowResponse = addSubscriptionWFExecutor.monetizeSubscription(workflowDTO, api);
} else {
workflowResponse = addSubscriptionWFExecutor.execute(workflowDTO);
}
} else {
isMonetizationEnabled = product.getMonetizationStatus();
//check whether monetization is enabled for API and tier plan is commercial
if (isMonetizationEnabled && APIConstants.COMMERCIAL_TIER_PLAN.equals(tier.getTierPlan())) {
workflowResponse = addSubscriptionWFExecutor.monetizeSubscription(workflowDTO, product);
} else {
workflowResponse = addSubscriptionWFExecutor.execute(workflowDTO);
}
}
} catch (WorkflowException e) {
//If the workflow execution fails, roll back transaction by removing the subscription entry.
apiMgtDAO.removeSubscriptionById(subscriptionId);
log.error("Could not execute Workflow", e);
throw new APIManagementException("Could not execute Workflow", e);
} finally {
if (isTenantFlowStarted) {
endTenantFlow();
}
}
if (APIUtil.isAPIGatewayKeyCacheEnabled()) {
invalidateCachedKeys(applicationId);
}
//to handle on-the-fly subscription rejection (and removal of subscription entry from the database)
//the response should have {"Status":"REJECTED"} in the json payload for this to work.
boolean subscriptionRejected = false;
String subscriptionStatus = null;
String subscriptionUUID = "";
if (workflowResponse != null && workflowResponse.getJSONPayload() != null
&& !workflowResponse.getJSONPayload().isEmpty()) {
try {
JSONObject wfResponseJson = (JSONObject) new JSONParser().parse(workflowResponse.getJSONPayload());
if (APIConstants.SubscriptionStatus.REJECTED.equals(wfResponseJson.get("Status"))) {
subscriptionRejected = true;
subscriptionStatus = APIConstants.SubscriptionStatus.REJECTED;
}
} catch (ParseException e) {
log.error('\'' + workflowResponse.getJSONPayload() + "' is not a valid JSON.", e);
}
}
if (!subscriptionRejected) {
SubscribedAPI addedSubscription = getSubscriptionById(subscriptionId);
subscriptionStatus = addedSubscription.getSubStatus();
subscriptionUUID = addedSubscription.getUUID();
JSONObject subsLogObject = new JSONObject();
subsLogObject.put(APIConstants.AuditLogConstants.API_NAME, identifier.getName());
subsLogObject.put(APIConstants.AuditLogConstants.PROVIDER, identifier.getProviderName());
subsLogObject.put(APIConstants.AuditLogConstants.APPLICATION_ID, applicationId);
subsLogObject.put(APIConstants.AuditLogConstants.APPLICATION_NAME, applicationName);
subsLogObject.put(APIConstants.AuditLogConstants.TIER, identifier.getTier());
APIUtil.logAuditMessage(APIConstants.AuditLogConstants.SUBSCRIPTION, subsLogObject.toString(),
APIConstants.AuditLogConstants.CREATED, this.username);
if (workflowResponse == null) {
workflowResponse = new GeneralWorkflowResponse();
}
}
if (log.isDebugEnabled()) {
String logMessage = "API Name: " + identifier.getName() + ", API Version " + identifier.getVersion()
+ ", Subscription Status: " + subscriptionStatus + " subscribe by " + userId + " for app "
+ applicationName;
log.debug(logMessage);
}
return new SubscriptionResponse(subscriptionStatus, subscriptionUUID, workflowResponse);
} else {
throw new APIMgtResourceNotFoundException("Subscriptions not allowed on APIs/API Products in the state: " +
state);
}
}
@Override
public SubscriptionResponse addSubscription(ApiTypeWrapper apiTypeWrapper, String userId, int applicationId,
String groupId) throws APIManagementException {
boolean isValid = validateApplication(userId, applicationId, groupId);
if (!isValid) {
log.error("Application " + applicationId + " is not accessible to user " + userId);
throw new APIManagementException("Application is not accessible to user " + userId);
}
return addSubscription(apiTypeWrapper, userId, applicationId);
}
/**
* Check whether the application is accessible to the specified user
* @param userId username
* @param applicationId application ID
* @param groupId GroupId list of the application
* @return true if the application is accessible by the specified user
*/
private boolean validateApplication(String userId, int applicationId, String groupId) {
try {
return apiMgtDAO.isAppAllowed(applicationId, userId, groupId);
} catch (APIManagementException e) {
log.error("Error occurred while getting user group id for user: " + userId, e);
}
return false;
}
@Override
public String getSubscriptionStatusById(int subscriptionId) throws APIManagementException {
return apiMgtDAO.getSubscriptionStatusById(subscriptionId);
}
@Override
public void removeSubscription(Identifier identifier, String userId, int applicationId)
throws APIManagementException {
boolean isTenantFlowStarted = false;
APIIdentifier apiIdentifier = null;
APIProductIdentifier apiProdIdentifier = null;
if (identifier instanceof APIIdentifier) {
apiIdentifier = (APIIdentifier) identifier;
}
if (identifier instanceof APIProductIdentifier) {
apiProdIdentifier = (APIProductIdentifier) identifier;
}
String providerTenantDomain = MultitenantUtils.getTenantDomain(APIUtil.
replaceEmailDomainBack(identifier.getProviderName()));
String applicationName = apiMgtDAO.getApplicationNameFromId(applicationId);
try {
if (providerTenantDomain != null && !MultitenantConstants.SUPER_TENANT_DOMAIN_NAME
.equals(providerTenantDomain)) {
PrivilegedCarbonContext.startTenantFlow();
PrivilegedCarbonContext.getThreadLocalCarbonContext().setTenantDomain(providerTenantDomain, true);
isTenantFlowStarted = true;
}
SubscriptionWorkflowDTO workflowDTO;
WorkflowExecutor createSubscriptionWFExecutor = getWorkflowExecutor(WorkflowConstants.WF_TYPE_AM_SUBSCRIPTION_CREATION);
WorkflowExecutor removeSubscriptionWFExecutor = getWorkflowExecutor(WorkflowConstants.WF_TYPE_AM_SUBSCRIPTION_DELETION);
String workflowExtRef = apiMgtDAO.getExternalWorkflowReferenceForSubscription(identifier, applicationId);
// in a normal flow workflowExtRef is null when workflows are not enabled
if (workflowExtRef == null) {
workflowDTO = new SubscriptionWorkflowDTO();
} else {
workflowDTO = (SubscriptionWorkflowDTO) apiMgtDAO.retrieveWorkflow(workflowExtRef);
// set tiername to the workflowDTO only when workflows are enabled
SubscribedAPI subscription = apiMgtDAO
.getSubscriptionById(Integer.parseInt(workflowDTO.getWorkflowReference()));
workflowDTO.setTierName(subscription.getTier().getName());
}
workflowDTO.setApiProvider(identifier.getProviderName());
API api = null;
APIProduct product = null;
String context = null;
if (apiIdentifier != null) {
api = getAPI(apiIdentifier);
context = api.getContext();
} else if (apiProdIdentifier != null) {
product = getAPIProduct(apiProdIdentifier);
context = product.getContext();
}
workflowDTO.setApiContext(context);
workflowDTO.setApiName(identifier.getName());
workflowDTO.setApiVersion(identifier.getVersion());
workflowDTO.setApplicationName(applicationName);
workflowDTO.setTenantDomain(tenantDomain);
workflowDTO.setTenantId(tenantId);
workflowDTO.setExternalWorkflowReference(workflowExtRef);
workflowDTO.setSubscriber(userId);
workflowDTO.setCallbackUrl(removeSubscriptionWFExecutor.getCallbackURL());
workflowDTO.setApplicationId(applicationId);
String status = apiMgtDAO.getSubscriptionStatus(identifier, applicationId);
if (APIConstants.SubscriptionStatus.ON_HOLD.equals(status)) {
try {
createSubscriptionWFExecutor.cleanUpPendingTask(workflowExtRef);
} catch (WorkflowException ex) {
// failed cleanup processes are ignored to prevent failing the deletion process
log.warn("Failed to clean pending subscription approval task");
}
}
// update attributes of the new remove workflow to be created
workflowDTO.setStatus(WorkflowStatus.CREATED);
workflowDTO.setWorkflowType(WorkflowConstants.WF_TYPE_AM_SUBSCRIPTION_DELETION);
workflowDTO.setCreatedTime(System.currentTimeMillis());
workflowDTO.setExternalWorkflowReference(removeSubscriptionWFExecutor.generateUUID());
Tier tier = null;
if (api != null) {
Set<Tier> policies = api.getAvailableTiers();
Iterator<Tier> iterator = policies.iterator();
boolean isPolicyAllowed = false;
while (iterator.hasNext()) {
Tier policy = iterator.next();
if (policy.getName() != null && (policy.getName()).equals(workflowDTO.getTierName())) {
tier = policy;
}
}
} else if (product != null) {
Set<Tier> policies = product.getAvailableTiers();
Iterator<Tier> iterator = policies.iterator();
boolean isPolicyAllowed = false;
while (iterator.hasNext()) {
Tier policy = iterator.next();
if (policy.getName() != null && (policy.getName()).equals(workflowDTO.getTierName())) {
tier = policy;
}
}
}
if (api != null) {
//check whether monetization is enabled for API and tier plan is commercial
if (api.getMonetizationStatus() && APIConstants.COMMERCIAL_TIER_PLAN.equals(tier.getTierPlan())) {
removeSubscriptionWFExecutor.deleteMonetizedSubscription(workflowDTO, api);
} else {
removeSubscriptionWFExecutor.execute(workflowDTO);
}
} else if (product != null) {
//check whether monetization is enabled for API product and tier plan is commercial
if (product.getMonetizationStatus() && APIConstants.COMMERCIAL_TIER_PLAN.equals(tier.getTierPlan())) {
removeSubscriptionWFExecutor.deleteMonetizedSubscription(workflowDTO, product);
} else {
removeSubscriptionWFExecutor.execute(workflowDTO);
}
}
JSONObject subsLogObject = new JSONObject();
subsLogObject.put(APIConstants.AuditLogConstants.API_NAME, identifier.getName());
subsLogObject.put(APIConstants.AuditLogConstants.PROVIDER, identifier.getProviderName());
subsLogObject.put(APIConstants.AuditLogConstants.APPLICATION_ID, applicationId);
subsLogObject.put(APIConstants.AuditLogConstants.APPLICATION_NAME, applicationName);
APIUtil.logAuditMessage(APIConstants.AuditLogConstants.SUBSCRIPTION, subsLogObject.toString(),
APIConstants.AuditLogConstants.DELETED, this.username);
} catch (WorkflowException e) {
String errorMsg = "Could not execute Workflow, " + WorkflowConstants.WF_TYPE_AM_SUBSCRIPTION_DELETION
+ " for resource " + identifier.toString();
handleException(errorMsg, e);
} finally {
if (isTenantFlowStarted) {
endTenantFlow();
}
}
if (APIUtil.isAPIGatewayKeyCacheEnabled()) {
invalidateCachedKeys(applicationId);
}
if (log.isDebugEnabled()) {
String logMessage = "Subscription removed from app " + applicationName + " by " + userId + " For Id: "
+ identifier.toString();
log.debug(logMessage);
}
}
@Override
public void removeSubscription(APIIdentifier identifier, String userId, int applicationId, String groupId) throws
APIManagementException {
//check application is viewable to logged user
boolean isValid = validateApplication(userId, applicationId, groupId);
if (!isValid) {
log.error("Application " + applicationId + " is not accessible to user " + userId);
throw new APIManagementException("Application is not accessible to user " + userId);
}
removeSubscription(identifier, userId, applicationId);
}
/**
* Removes a subscription specified by SubscribedAPI object
*
* @param subscription SubscribedAPI object
* @throws APIManagementException
*/
@Override
public void removeSubscription(SubscribedAPI subscription) throws APIManagementException {
String uuid = subscription.getUUID();
SubscribedAPI subscribedAPI = apiMgtDAO.getSubscriptionByUUID(uuid);
if (subscribedAPI != null) {
Application application = subscribedAPI.getApplication();
Identifier identifier = subscribedAPI.getApiId() != null ? subscribedAPI.getApiId()
: subscribedAPI.getProductId();
String userId = application.getSubscriber().getName();
removeSubscription(identifier, userId, application.getId());
if (log.isDebugEnabled()) {
String appName = application.getName();
String logMessage = "Identifier: " + identifier.toString() + " subscription (uuid : " + uuid
+ ") removed from app " + appName;
log.debug(logMessage);
}
} else {
throw new APIManagementException("Subscription for UUID:" + uuid +" does not exist.");
}
}
/**
*
* @param applicationId Application ID related cache keys to be cleared
* @throws APIManagementException
*/
private void invalidateCachedKeys(int applicationId) throws APIManagementException {
CacheInvalidator.getInstance().invalidateCacheForApp(applicationId);
}
@Override
public void removeSubscriber(APIIdentifier identifier, String userId)
throws APIManagementException {
throw new UnsupportedOperationException("Unsubscribe operation is not yet implemented");
}
@Override
public void updateSubscriptions(APIIdentifier identifier, String userId, int applicationId)
throws APIManagementException {
API api = getAPI(identifier);
apiMgtDAO.updateSubscriptions(new ApiTypeWrapper(api), applicationId);
}
/**
* @deprecated
* This method needs to be removed once the Jaggery web apps are removed.
*
*/
@Override
public void addComment(APIIdentifier identifier, String commentText, String user) throws APIManagementException {
apiMgtDAO.addComment(identifier, commentText, user);
}
@Override
public String addComment(Identifier identifier, Comment comment, String user) throws APIManagementException {
return apiMgtDAO.addComment(identifier, comment, user);
}
@Override
public org.wso2.carbon.apimgt.api.model.Comment[] getComments(APIIdentifier identifier)
throws APIManagementException {
return apiMgtDAO.getComments(identifier);
}
@Override
public Comment getComment(Identifier identifier, String commentId) throws APIManagementException {
return apiMgtDAO.getComment(identifier, commentId);
}
@Override
public org.wso2.carbon.apimgt.api.model.Comment[] getComments(ApiTypeWrapper apiTypeWrapper)
throws APIManagementException {
return apiMgtDAO.getComments(apiTypeWrapper);
}
@Override
public void deleteComment(APIIdentifier identifier, String commentId) throws APIManagementException {
apiMgtDAO.deleteComment(identifier, commentId);
}
/**
* Add a new Application from the store.
* @param application - {@link org.wso2.carbon.apimgt.api.model.Application}
* @param userId - {@link String}
* @return {@link String}
*/
@Override
public int addApplication(Application application, String userId)
throws APIManagementException {
if (application.getName() != null && (application.getName().length() != application.getName().trim().length())) {
handleApplicationNameContainSpacesException("Application name " +
"cannot contain leading or trailing white spaces");
}
JSONArray applicationAttributesFromConfig =
getAppAttributesFromConfig(MultitenantUtils.getTenantDomain(userId));
Map<String, String> applicationAttributes = application.getApplicationAttributes();
if (applicationAttributes == null) {
/*
* This empty Hashmap is set to avoid throwing a null pointer exception, in case no application attributes
* are set when creating an application
*/
applicationAttributes = new HashMap<String, String>();
}
Set<String> configAttributes = new HashSet<>();
if (applicationAttributesFromConfig != null) {
for (Object object : applicationAttributesFromConfig) {
JSONObject attribute = (JSONObject) object;
Boolean hidden = (Boolean) attribute.get(APIConstants.ApplicationAttributes.HIDDEN);
Boolean required = (Boolean) attribute.get(APIConstants.ApplicationAttributes.REQUIRED);
String attributeName = (String) attribute.get(APIConstants.ApplicationAttributes.ATTRIBUTE);
String defaultValue = (String) attribute.get(APIConstants.ApplicationAttributes.DEFAULT);
if (BooleanUtils.isTrue(hidden) && BooleanUtils.isTrue(required) && StringUtils.isEmpty(defaultValue)) {
/*
* In case a default value is not provided for a required hidden attribute, an exception is thrown,
* we don't do this validation in server startup to support multi tenancy scenarios
*/
handleException("Default value not provided for hidden required attribute. Please check the " +
"configuration");
}
configAttributes.add(attributeName);
if (BooleanUtils.isTrue(required)) {
if (BooleanUtils.isTrue(hidden)) {
/*
* If a required hidden attribute is attempted to be populated, we replace it with
* the default value.
*/
String oldValue = applicationAttributes.put(attributeName, defaultValue);
if (StringUtils.isNotEmpty(oldValue)) {
log.info("Replaced provided value: " + oldValue + " with default the value" +
" for the hidden application attribute: " + attributeName);
}
} else if (!applicationAttributes.keySet().contains(attributeName)) {
if (StringUtils.isNotEmpty(defaultValue)) {
/*
* If a required attribute is not provided and a default value is given, we replace it with
* the default value.
*/
applicationAttributes.put(attributeName, defaultValue);
log.info("Added default value: " + defaultValue +
" as required attribute: " + attributeName + "is not provided");
} else {
/*
* If a required attribute is not provided but a default value not given, we throw a bad
* request exception.
*/
handleException("Bad Request. Required application attribute not provided");
}
}
} else if (BooleanUtils.isTrue(hidden)) {
/*
* If an optional hidden attribute is provided, we remove it and leave it blank, and leave it for
* an extension to populate it.
*/
applicationAttributes.remove(attributeName);
}
}
application.setApplicationAttributes(validateApplicationAttributes(applicationAttributes, configAttributes));
} else {
application.setApplicationAttributes(null);
}
String regex = "^[a-zA-Z0-9 ._-]*$";
Pattern pattern = Pattern.compile(regex);
Matcher matcher = pattern.matcher(application.getName());
if (!matcher.find()) {
handleApplicationNameContainsInvalidCharactersException("Application name contains invalid characters");
}
if (APIUtil.isApplicationExist(userId, application.getName(), application.getGroupId())) {
handleResourceAlreadyExistsException(
"A duplicate application already exists by the name - " + application.getName());
}
//check whether callback url is empty and set null
if (StringUtils.isBlank(application.getCallbackUrl())) {
application.setCallbackUrl(null);
}
int applicationId = apiMgtDAO.addApplication(application, userId);
JSONObject appLogObject = new JSONObject();
appLogObject.put(APIConstants.AuditLogConstants.NAME, application.getName());
appLogObject.put(APIConstants.AuditLogConstants.TIER, application.getTier());
appLogObject.put(APIConstants.AuditLogConstants.CALLBACK, application.getCallbackUrl());
appLogObject.put(APIConstants.AuditLogConstants.GROUPS, application.getGroupId());
appLogObject.put(APIConstants.AuditLogConstants.OWNER, application.getSubscriber().getName());
APIUtil.logAuditMessage(APIConstants.AuditLogConstants.APPLICATION, appLogObject.toString(),
APIConstants.AuditLogConstants.CREATED, this.username);
boolean isTenantFlowStarted = false;
if (tenantDomain != null && !MultitenantConstants.SUPER_TENANT_DOMAIN_NAME.equals(tenantDomain)) {
isTenantFlowStarted = startTenantFlowForTenantDomain(tenantDomain);
}
try {
WorkflowExecutor appCreationWFExecutor = getWorkflowExecutor(WorkflowConstants.WF_TYPE_AM_APPLICATION_CREATION);
ApplicationWorkflowDTO appWFDto = new ApplicationWorkflowDTO();
appWFDto.setApplication(application);
appWFDto.setExternalWorkflowReference(appCreationWFExecutor.generateUUID());
appWFDto.setWorkflowReference(String.valueOf(applicationId));
appWFDto.setWorkflowType(WorkflowConstants.WF_TYPE_AM_APPLICATION_CREATION);
appWFDto.setCallbackUrl(appCreationWFExecutor.getCallbackURL());
appWFDto.setStatus(WorkflowStatus.CREATED);
appWFDto.setTenantDomain(tenantDomain);
appWFDto.setTenantId(tenantId);
appWFDto.setUserName(userId);
appWFDto.setCreatedTime(System.currentTimeMillis());
appCreationWFExecutor.execute(appWFDto);
} catch (WorkflowException e) {
//If the workflow execution fails, roll back transaction by removing the application entry.
application.setId(applicationId);
apiMgtDAO.deleteApplication(application);
log.error("Unable to execute Application Creation Workflow", e);
handleException("Unable to execute Application Creation Workflow", e);
} finally {
if (isTenantFlowStarted) {
endTenantFlow();
}
}
if (log.isDebugEnabled()) {
log.debug("Application Name: " + application.getName() +" added successfully.");
}
return applicationId;
}
/** Updates an Application identified by its id
*
* @param application Application object to be updated
* @throws APIManagementException
*/
@Override
public void updateApplication(Application application) throws APIManagementException {
Application existingApp;
String uuid = application.getUUID();
if (!StringUtils.isEmpty(uuid)) {
existingApp = apiMgtDAO.getApplicationByUUID(uuid);
if (existingApp != null) {
Set<APIKey> keys = getApplicationKeys(existingApp.getId());
for (APIKey key : keys) {
existingApp.addKey(key);
}
}
application.setId(existingApp.getId());
} else {
existingApp = apiMgtDAO.getApplicationById(application.getId());
}
if (existingApp != null && APIConstants.ApplicationStatus.APPLICATION_CREATED.equals(existingApp.getStatus())) {
throw new APIManagementException("Cannot update the application while it is INACTIVE");
}
boolean isCaseInsensitiveComparisons = Boolean.parseBoolean(getAPIManagerConfiguration().
getFirstProperty(APIConstants.API_STORE_FORCE_CI_COMPARISIONS));
boolean isUserAppOwner;
if (isCaseInsensitiveComparisons) {
isUserAppOwner = application.getSubscriber().getName().
equalsIgnoreCase(existingApp.getSubscriber().getName());
} else {
isUserAppOwner = application.getSubscriber().getName().equals(existingApp.getSubscriber().getName());
}
if (!isUserAppOwner) {
throw new APIManagementException("user: " + application.getSubscriber().getName() + ", " +
"attempted to update application owned by: " + existingApp.getSubscriber().getName());
}
if (application.getName() != null && (application.getName().length() != application.getName().trim().length())) {
handleApplicationNameContainSpacesException("Application name " +
"cannot contain leading or trailing white spaces");
}
String regex = "^[a-zA-Z0-9 ._-]*$";
Pattern pattern = Pattern.compile(regex);
Matcher matcher = pattern.matcher(application.getName());
if (!matcher.find()) {
handleApplicationNameContainsInvalidCharactersException("Application name contains invalid characters");
}
Subscriber subscriber = application.getSubscriber();
String tenantDomain = MultitenantUtils.getTenantDomain(subscriber.getName());
JSONArray applicationAttributesFromConfig = getAppAttributesFromConfig(tenantDomain);
Map<String, String> applicationAttributes = application.getApplicationAttributes();
Map<String, String> existingApplicationAttributes = existingApp.getApplicationAttributes();
if (applicationAttributes == null) {
/*
* This empty Hashmap is set to avoid throwing a null pointer exception, in case no application attributes
* are set when updating an application
*/
applicationAttributes = new HashMap<String, String>();
}
Set<String> configAttributes = new HashSet<>();
if (applicationAttributesFromConfig != null) {
for (Object object : applicationAttributesFromConfig) {
boolean isExistingValue = false;
JSONObject attribute = (JSONObject) object;
Boolean hidden = (Boolean) attribute.get(APIConstants.ApplicationAttributes.HIDDEN);
Boolean required = (Boolean) attribute.get(APIConstants.ApplicationAttributes.REQUIRED);
String attributeName = (String) attribute.get(APIConstants.ApplicationAttributes.ATTRIBUTE);
String defaultValue = (String) attribute.get(APIConstants.ApplicationAttributes.DEFAULT);
if (BooleanUtils.isTrue(hidden) && BooleanUtils.isTrue(required) && StringUtils.isEmpty(defaultValue)) {
/*
* In case a default value is not provided for a required hidden attribute, an exception is thrown,
* we don't do this validation in server startup to support multi tenancy scenarios
*/
handleException("Default value not provided for hidden required attribute. Please check the " +
"configuration");
}
configAttributes.add(attributeName);
if (existingApplicationAttributes.containsKey(attributeName)) {
/*
* If a there is an existing attribute value, that is used as the default value.
*/
isExistingValue = true;
defaultValue = existingApplicationAttributes.get(attributeName);
}
if (BooleanUtils.isTrue(required)) {
if (BooleanUtils.isTrue(hidden)) {
String oldValue = applicationAttributes.put(attributeName, defaultValue);
if (StringUtils.isNotEmpty(oldValue)) {
log.info("Replaced provided value: " + oldValue + " with the default/existing value for" +
" the hidden application attribute: " + attributeName);
}
} else if (!applicationAttributes.keySet().contains(attributeName)) {
if (StringUtils.isNotEmpty(defaultValue)) {
applicationAttributes.put(attributeName, defaultValue);
} else {
handleException("Bad Request. Required application attribute not provided");
}
}
} else if (BooleanUtils.isTrue(hidden)) {
if (isExistingValue) {
applicationAttributes.put(attributeName, defaultValue);
} else {
applicationAttributes.remove(attributeName);
}
}
}
application.setApplicationAttributes(validateApplicationAttributes(applicationAttributes, configAttributes));
} else {
application.setApplicationAttributes(null);
}
apiMgtDAO.updateApplication(application);
if (log.isDebugEnabled()) {
log.debug("Successfully updated the Application: " + application.getId() +" in the database.");
}
JSONObject appLogObject = new JSONObject();
appLogObject.put(APIConstants.AuditLogConstants.NAME, application.getName());
appLogObject.put(APIConstants.AuditLogConstants.TIER, application.getTier());
appLogObject.put(APIConstants.AuditLogConstants.STATUS, existingApp != null ? existingApp.getStatus() : "");
appLogObject.put(APIConstants.AuditLogConstants.CALLBACK, application.getCallbackUrl());
appLogObject.put(APIConstants.AuditLogConstants.GROUPS, application.getGroupId());
appLogObject.put(APIConstants.AuditLogConstants.OWNER, application.getSubscriber().getName());
APIUtil.logAuditMessage(APIConstants.AuditLogConstants.APPLICATION, appLogObject.toString(),
APIConstants.AuditLogConstants.UPDATED, this.username);
try {
invalidateCachedKeys(application.getId());
} catch (APIManagementException ignore) {
//Log and ignore since we do not want to throw exceptions to the front end due to cache invalidation failure.
log.warn("Failed to invalidate Gateway Cache " + ignore.getMessage(), ignore);
}
}
/**
* Function to remove an Application from the API Store
*
* @param application - The Application Object that represents the Application
* @param username
* @throws APIManagementException
*/
@Override
public void removeApplication(Application application, String username) throws APIManagementException {
String uuid = application.getUUID();
if (application.getId() == 0 && !StringUtils.isEmpty(uuid)) {
application = apiMgtDAO.getApplicationByUUID(uuid);
if (application != null) {
Set<APIKey> keys = getApplicationKeys(application.getId());
for (APIKey key : keys) {
application.addKey(key);
}
}
}
boolean isTenantFlowStarted = false;
int applicationId = application.getId();
boolean isCaseInsensitiveComparisons = Boolean.parseBoolean(getAPIManagerConfiguration().
getFirstProperty(APIConstants.API_STORE_FORCE_CI_COMPARISIONS));
boolean isUserAppOwner;
if (isCaseInsensitiveComparisons) {
isUserAppOwner = application.getSubscriber().getName().equalsIgnoreCase(username);
} else {
isUserAppOwner = application.getSubscriber().getName().equals(username);
}
if (!isUserAppOwner) {
throw new APIManagementException("user: " + username + ", " +
"attempted to remove application owned by: " + application.getSubscriber().getName());
}
try {
String workflowExtRef;
ApplicationWorkflowDTO workflowDTO;
if (tenantDomain != null && !MultitenantConstants.SUPER_TENANT_DOMAIN_NAME.equals(tenantDomain)) {
PrivilegedCarbonContext.startTenantFlow();
isTenantFlowStarted = true;
PrivilegedCarbonContext.getThreadLocalCarbonContext().setTenantDomain(tenantDomain, true);
}
WorkflowExecutor createApplicationWFExecutor = getWorkflowExecutor(WorkflowConstants.WF_TYPE_AM_APPLICATION_CREATION);
WorkflowExecutor createSubscriptionWFExecutor = getWorkflowExecutor(WorkflowConstants.WF_TYPE_AM_SUBSCRIPTION_CREATION);
WorkflowExecutor createProductionRegistrationWFExecutor = getWorkflowExecutor(WorkflowConstants.WF_TYPE_AM_APPLICATION_REGISTRATION_PRODUCTION);
WorkflowExecutor createSandboxRegistrationWFExecutor = getWorkflowExecutor(WorkflowConstants.WF_TYPE_AM_APPLICATION_REGISTRATION_SANDBOX);
WorkflowExecutor removeApplicationWFExecutor = getWorkflowExecutor(WorkflowConstants.WF_TYPE_AM_APPLICATION_DELETION);
workflowExtRef = apiMgtDAO.getExternalWorkflowReferenceByApplicationID(application.getId());
// in a normal flow workflowExtRef is null when workflows are not enabled
if (workflowExtRef == null) {
workflowDTO = new ApplicationWorkflowDTO();
} else {
workflowDTO = (ApplicationWorkflowDTO) apiMgtDAO.retrieveWorkflow(workflowExtRef);
}
workflowDTO.setApplication(application);
workflowDTO.setCallbackUrl(removeApplicationWFExecutor.getCallbackURL());
workflowDTO.setUserName(this.username);
workflowDTO.setTenantDomain(tenantDomain);
workflowDTO.setTenantId(tenantId);
// Remove from cache first since we won't be able to find active access tokens
// once the application is removed.
invalidateCachedKeys(application.getId());
// clean up pending subscription tasks
Set<Integer> pendingSubscriptions = apiMgtDAO.getPendingSubscriptionsByApplicationId(applicationId);
for (int subscription : pendingSubscriptions) {
try {
workflowExtRef = apiMgtDAO.getExternalWorkflowReferenceForSubscription(subscription);
createSubscriptionWFExecutor.cleanUpPendingTask(workflowExtRef);
} catch (APIManagementException ex) {
// failed cleanup processes are ignored to prevent failing the application removal process
log.warn("Failed to get external workflow reference for subscription " + subscription);
} catch (WorkflowException ex) {
// failed cleanup processes are ignored to prevent failing the application removal process
log.warn("Failed to clean pending subscription approval task: " + subscription);
}
}
// cleanup pending application registration tasks
String productionKeyStatus = apiMgtDAO
.getRegistrationApprovalState(applicationId, APIConstants.API_KEY_TYPE_PRODUCTION);
String sandboxKeyStatus = apiMgtDAO
.getRegistrationApprovalState(applicationId, APIConstants.API_KEY_TYPE_SANDBOX);
if (WorkflowStatus.CREATED.toString().equals(productionKeyStatus)) {
try {
workflowExtRef = apiMgtDAO
.getRegistrationWFReference(applicationId, APIConstants.API_KEY_TYPE_PRODUCTION);
createProductionRegistrationWFExecutor.cleanUpPendingTask(workflowExtRef);
} catch (APIManagementException ex) {
// failed cleanup processes are ignored to prevent failing the application removal process
log.warn("Failed to get external workflow reference for production key of application "
+ applicationId);
} catch (WorkflowException ex) {
// failed cleanup processes are ignored to prevent failing the application removal process
log.warn("Failed to clean pending production key approval task of " + applicationId);
}
}
if (WorkflowStatus.CREATED.toString().equals(sandboxKeyStatus)) {
try {
workflowExtRef = apiMgtDAO
.getRegistrationWFReference(applicationId, APIConstants.API_KEY_TYPE_SANDBOX);
createSandboxRegistrationWFExecutor.cleanUpPendingTask(workflowExtRef);
} catch (APIManagementException ex) {
// failed cleanup processes are ignored to prevent failing the application removal process
log.warn("Failed to get external workflow reference for sandbox key of application "
+ applicationId);
} catch (WorkflowException ex) {
// failed cleanup processes are ignored to prevent failing the application removal process
log.warn("Failed to clean pending sandbox key approval task of " + applicationId);
}
}
if (workflowExtRef != null) {
try {
createApplicationWFExecutor.cleanUpPendingTask(workflowExtRef);
} catch (WorkflowException ex) {
// failed cleanup processes are ignored to prevent failing the application removal process
log.warn("Failed to clean pending application approval task of " + applicationId);
}
}
// update attributes of the new remove workflow to be created
workflowDTO.setStatus(WorkflowStatus.CREATED);
workflowDTO.setCreatedTime(System.currentTimeMillis());
workflowDTO.setWorkflowType(WorkflowConstants.WF_TYPE_AM_APPLICATION_DELETION);
workflowDTO.setExternalWorkflowReference(removeApplicationWFExecutor.generateUUID());
removeApplicationWFExecutor.execute(workflowDTO);
JSONObject appLogObject = new JSONObject();
appLogObject.put(APIConstants.AuditLogConstants.NAME, application.getName());
appLogObject.put(APIConstants.AuditLogConstants.TIER, application.getTier());
appLogObject.put(APIConstants.AuditLogConstants.CALLBACK, application.getCallbackUrl());
appLogObject.put(APIConstants.AuditLogConstants.GROUPS, application.getGroupId());
appLogObject.put(APIConstants.AuditLogConstants.OWNER, application.getSubscriber().getName());
APIUtil.logAuditMessage(APIConstants.AuditLogConstants.APPLICATION, appLogObject.toString(),
APIConstants.AuditLogConstants.DELETED, this.username);
} catch (WorkflowException e) {
String errorMsg = "Could not execute Workflow, " + WorkflowConstants.WF_TYPE_AM_APPLICATION_DELETION + " " +
"for applicationID " + application.getId();
handleException(errorMsg, e);
} finally {
if (isTenantFlowStarted) {
endTenantFlow();
}
}
if (log.isDebugEnabled()) {
String logMessage = "Application Name: " + application.getName() + " successfully removed";
log.debug(logMessage);
}
}
/**
* This method specifically implemented for REST API by removing application and data access logic
* from host object layer. So as per new implementation we need to pass requested scopes to this method
* as tokenScope. So we will do scope related other logic here in this method.
* So host object should only pass required 9 parameters.
* */
@Override
public Map<String, Object> requestApprovalForApplicationRegistration(String userId, String applicationName,
String tokenType, String callbackUrl,
String[] allowedDomains, String validityTime,
String tokenScope, String groupingId,
String jsonString
)
throws APIManagementException {
boolean isTenantFlowStarted = false;
String tenantDomain = MultitenantUtils.getTenantDomain(userId);
int tenantId = MultitenantConstants.INVALID_TENANT_ID;
try {
tenantId = ServiceReferenceHolder.getInstance().getRealmService().getTenantManager()
.getTenantId(tenantDomain);
} catch (UserStoreException e) {
handleException("Unable to retrieve the tenant information of the current user.", e);
}
//checking for authorized scopes
Set<Scope> scopeSet = new LinkedHashSet<Scope>();
List<Scope> authorizedScopes = new ArrayList<Scope>();
String authScopeString;
if (tokenScope != null && tokenScope.length() != 0 &&
!APIConstants.OAUTH2_DEFAULT_SCOPE.equals(tokenScope)) {
scopeSet.addAll(getScopesByScopeKeys(tokenScope, tenantId));
authorizedScopes = getAllowedScopesForUserApplication(userId, scopeSet);
}
if (!authorizedScopes.isEmpty()) {
Set<Scope> authorizedScopeSet = new HashSet<Scope>(authorizedScopes);
StringBuilder scopeBuilder = new StringBuilder();
for (Scope scope : authorizedScopeSet) {
scopeBuilder.append(scope.getKey()).append(' ');
}
authScopeString = scopeBuilder.toString();
} else {
authScopeString = APIConstants.OAUTH2_DEFAULT_SCOPE;
}
try {
if (tenantDomain != null && !MultitenantConstants.SUPER_TENANT_DOMAIN_NAME.equals(tenantDomain)) {
isTenantFlowStarted = startTenantFlowForTenantDomain(tenantDomain);
}
// initiate WorkflowExecutor
WorkflowExecutor appRegistrationWorkflow = null;
// initiate ApplicationRegistrationWorkflowDTO
ApplicationRegistrationWorkflowDTO appRegWFDto = null;
ApplicationKeysDTO appKeysDto = new ApplicationKeysDTO();
// get APIM application by Application Name and userId.
Application application = ApplicationUtils.retrieveApplication(applicationName, userId, groupingId);
boolean isCaseInsensitiveComparisons = Boolean.parseBoolean(getAPIManagerConfiguration().
getFirstProperty(APIConstants.API_STORE_FORCE_CI_COMPARISIONS));
boolean isUserAppOwner;
if (isCaseInsensitiveComparisons) {
isUserAppOwner = application.getSubscriber().getName().equalsIgnoreCase(userId);
} else {
isUserAppOwner = application.getSubscriber().getName().equals(userId);
}
if (!isUserAppOwner) {
throw new APIManagementException("user: " + application.getSubscriber().getName() + ", " +
"attempted to generate tokens for application owned by: " + userId);
}
// if its a PRODUCTION application.
if (APIConstants.API_KEY_TYPE_PRODUCTION.equals(tokenType)) {
// initiate workflow type. By default simple work flow will be
// executed.
appRegistrationWorkflow =
getWorkflowExecutor(WorkflowConstants.WF_TYPE_AM_APPLICATION_REGISTRATION_PRODUCTION);
appRegWFDto =
(ApplicationRegistrationWorkflowDTO) WorkflowExecutorFactory.getInstance()
.createWorkflowDTO(WorkflowConstants.WF_TYPE_AM_APPLICATION_REGISTRATION_PRODUCTION);
}// if it is a sandBox application.
else if (APIConstants.API_KEY_TYPE_SANDBOX.equals(tokenType)) { // if
// its
// a
// SANDBOX
// application.
appRegistrationWorkflow =
getWorkflowExecutor(WorkflowConstants.WF_TYPE_AM_APPLICATION_REGISTRATION_SANDBOX);
appRegWFDto =
(ApplicationRegistrationWorkflowDTO) WorkflowExecutorFactory.getInstance()
.createWorkflowDTO(WorkflowConstants.WF_TYPE_AM_APPLICATION_REGISTRATION_SANDBOX);
} else {
throw new APIManagementException("Invalid Token Type '" + tokenType + "' requested.");
}
//check whether callback url is empty and set null
if (StringUtils.isBlank(callbackUrl)) {
callbackUrl = null;
}
String applicationTokenType = application.getTokenType();
if (StringUtils.isEmpty(application.getTokenType())) {
applicationTokenType = APIConstants.DEFAULT_TOKEN_TYPE;
}
// Build key manager instance and create oAuthAppRequest by jsonString.
OAuthAppRequest request =
ApplicationUtils.createOauthAppRequest(applicationName, null,
callbackUrl, authScopeString, jsonString, applicationTokenType);
request.getOAuthApplicationInfo().addParameter(ApplicationConstants.VALIDITY_PERIOD, validityTime);
request.getOAuthApplicationInfo().addParameter(ApplicationConstants.APP_KEY_TYPE, tokenType);
request.getOAuthApplicationInfo().addParameter(ApplicationConstants.APP_CALLBACK_URL, callbackUrl);
// Setting request values in WorkflowDTO - In future we should keep
// Application/OAuthApplication related
// information in the respective entities not in the workflowDTO.
appRegWFDto.setStatus(WorkflowStatus.CREATED);
appRegWFDto.setCreatedTime(System.currentTimeMillis());
appRegWFDto.setTenantDomain(tenantDomain);
appRegWFDto.setTenantId(tenantId);
appRegWFDto.setExternalWorkflowReference(appRegistrationWorkflow.generateUUID());
appRegWFDto.setWorkflowReference(appRegWFDto.getExternalWorkflowReference());
appRegWFDto.setApplication(application);
request.setMappingId(appRegWFDto.getWorkflowReference());
if (!application.getSubscriber().getName().equals(userId)) {
appRegWFDto.setUserName(application.getSubscriber().getName());
} else {
appRegWFDto.setUserName(userId);
}
appRegWFDto.setCallbackUrl(appRegistrationWorkflow.getCallbackURL());
appRegWFDto.setAppInfoDTO(request);
appRegWFDto.setDomainList(allowedDomains);
appRegWFDto.setKeyDetails(appKeysDto);
appRegistrationWorkflow.execute(appRegWFDto);
Map<String, Object> keyDetails = new HashMap<String, Object>();
keyDetails.put("keyState", appRegWFDto.getStatus().toString());
OAuthApplicationInfo applicationInfo = appRegWFDto.getApplicationInfo();
if (applicationInfo != null) {
keyDetails.put("consumerKey", applicationInfo.getClientId());
keyDetails.put("consumerSecret", applicationInfo.getClientSecret());
keyDetails.put("appDetails", applicationInfo.getJsonString());
}
// There can be instances where generating the Application Token is
// not required. In those cases,
// token info will have nothing.
AccessTokenInfo tokenInfo = appRegWFDto.getAccessTokenInfo();
if (tokenInfo != null) {
keyDetails.put("accessToken", tokenInfo.getAccessToken());
keyDetails.put("validityTime", tokenInfo.getValidityPeriod());
keyDetails.put("tokenDetails", tokenInfo.getJSONString());
keyDetails.put("tokenScope", tokenInfo.getScopes());
}
JSONObject appLogObject = new JSONObject();
appLogObject.put("Generated keys for application", application.getName());
APIUtil.logAuditMessage(APIConstants.AuditLogConstants.APPLICATION, appLogObject.toString(),
APIConstants.AuditLogConstants.UPDATED, this.username);
return keyDetails;
} catch (WorkflowException e) {
log.error("Could not execute Workflow", e);
throw new APIManagementException(e);
} finally {
if (isTenantFlowStarted) {
endTenantFlow();
}
}
}
@Override
public Map<String, Object> requestApprovalForApplicationRegistrationByApplicationId(
Map<String, Object> appInfo) throws APIManagementException {
if (appInfo == null || appInfo.isEmpty()) {
log.error("Application information is not provided to request approval For Application Registration");
return new HashMap<String, Object>(0);
}
boolean isTenantFlowStarted = false;
String username = appInfo.get("username").toString();
String scopes = appInfo.get("scopes").toString();
String applicationName = appInfo.get("applicationName").toString();
String groupingId = appInfo.get("groupingId").toString();
String tokenType = appInfo.get("tokenType").toString();
String callbackUrl = appInfo.get("callbackUrl").toString();
String jsonParams = appInfo.get("jsonParams").toString();
String[] allowedDomains = (String[]) appInfo.get("allowedDomains");
String validityTime = appInfo.get("validityPeriod").toString();
int applicationId = Integer.valueOf(appInfo.get("applicationId").toString());
String tenantDomain = MultitenantUtils.getTenantDomain(username);
int tenantId = MultitenantConstants.INVALID_TENANT_ID;
try {
tenantId = ServiceReferenceHolder.getInstance().getRealmService().getTenantManager()
.getTenantId(tenantDomain);
} catch (UserStoreException e) {
String msg = "Unable to retrieve the tenant information of the current user.";
log.error(msg, e);
throw new APIManagementException(msg, e);
}
//checking for authorized scopes
Set<Scope> scopeSet = new LinkedHashSet<Scope>();
List<Scope> authorizedScopes = new ArrayList<Scope>();
String authScopeString;
if (scopes != null && scopes.length() != 0 && !APIConstants.OAUTH2_DEFAULT_SCOPE.equals(scopes)) {
scopeSet.addAll(getScopesByScopeKeys(scopes, tenantId));
authorizedScopes = getAllowedScopesForUserApplication(username, scopeSet);
}
if (!authorizedScopes.isEmpty()) {
StringBuilder scopeBuilder = new StringBuilder();
for (Scope scope : authorizedScopes) {
scopeBuilder.append(scope.getKey()).append(' ');
}
authScopeString = scopeBuilder.toString();
} else {
authScopeString = APIConstants.OAUTH2_DEFAULT_SCOPE;
}
try {
if (tenantDomain != null && !MultitenantConstants.SUPER_TENANT_DOMAIN_NAME.equals(tenantDomain)) {
isTenantFlowStarted = startTenantFlowForTenantDomain(tenantDomain);
}
// initiate WorkflowExecutor
WorkflowExecutor appRegistrationWorkflow = null;
// initiate ApplicationRegistrationWorkflowDTO
ApplicationRegistrationWorkflowDTO appRegWFDto = null;
ApplicationKeysDTO appKeysDto = new ApplicationKeysDTO();
// get APIM application by Application Id.
Application application = ApplicationUtils.retrieveApplicationById(applicationId);
// if its a PRODUCTION application.
if (APIConstants.API_KEY_TYPE_PRODUCTION.equals(tokenType)) {
// initiate workflow type. By default simple work flow will be
// executed.
appRegistrationWorkflow = getWorkflowExecutor(
WorkflowConstants.WF_TYPE_AM_APPLICATION_REGISTRATION_PRODUCTION);
appRegWFDto = (ApplicationRegistrationWorkflowDTO) WorkflowExecutorFactory.getInstance()
.createWorkflowDTO(WorkflowConstants.WF_TYPE_AM_APPLICATION_REGISTRATION_PRODUCTION);
}// if it is a sandBox application.
else if (APIConstants.API_KEY_TYPE_SANDBOX.equals(tokenType)) {
appRegistrationWorkflow = getWorkflowExecutor(
WorkflowConstants.WF_TYPE_AM_APPLICATION_REGISTRATION_SANDBOX);
appRegWFDto = (ApplicationRegistrationWorkflowDTO) WorkflowExecutorFactory.getInstance()
.createWorkflowDTO(WorkflowConstants.WF_TYPE_AM_APPLICATION_REGISTRATION_SANDBOX);
} else {
throw new APIManagementException("Invalid Token Type '" + tokenType + "' requested.");
}
//check whether callback url is empty and set null
if (StringUtils.isBlank(callbackUrl)) {
callbackUrl = null;
}
String applicationTokenType = application.getTokenType();
if (StringUtils.isEmpty(application.getTokenType())) {
applicationTokenType = APIConstants.DEFAULT_TOKEN_TYPE;
}
// Build key manager instance and create oAuthAppRequest by jsonString.
OAuthAppRequest request = ApplicationUtils
.createOauthAppRequest(applicationName, null, callbackUrl, authScopeString, jsonParams,
applicationTokenType);
request.getOAuthApplicationInfo().addParameter(ApplicationConstants.VALIDITY_PERIOD, validityTime);
request.getOAuthApplicationInfo().addParameter(ApplicationConstants.APP_KEY_TYPE, tokenType);
request.getOAuthApplicationInfo().addParameter(ApplicationConstants.APP_CALLBACK_URL, callbackUrl);
// Setting request values in WorkflowDTO - In future we should keep
// Application/OAuthApplication related
// information in the respective entities not in the workflowDTO.
appRegWFDto.setStatus(WorkflowStatus.CREATED);
appRegWFDto.setCreatedTime(System.currentTimeMillis());
appRegWFDto.setTenantDomain(tenantDomain);
appRegWFDto.setTenantId(tenantId);
appRegWFDto.setExternalWorkflowReference(appRegistrationWorkflow.generateUUID());
appRegWFDto.setWorkflowReference(appRegWFDto.getExternalWorkflowReference());
appRegWFDto.setApplication(application);
request.setMappingId(appRegWFDto.getWorkflowReference());
if (!application.getSubscriber().getName().equals(username)) {
appRegWFDto.setUserName(application.getSubscriber().getName());
} else {
appRegWFDto.setUserName(username);
}
appRegWFDto.setCallbackUrl(appRegistrationWorkflow.getCallbackURL());
appRegWFDto.setAppInfoDTO(request);
appRegWFDto.setDomainList(allowedDomains);
appRegWFDto.setKeyDetails(appKeysDto);
appRegistrationWorkflow.execute(appRegWFDto);
Map<String, Object> keyDetails = new HashMap<String, Object>();
keyDetails.put("keyState", appRegWFDto.getStatus().toString());
OAuthApplicationInfo applicationInfo = appRegWFDto.getApplicationInfo();
if (applicationInfo != null) {
keyDetails.put("consumerKey", applicationInfo.getClientId());
keyDetails.put("consumerSecret", applicationInfo.getClientSecret());
keyDetails.put("appDetails", applicationInfo.getJsonString());
}
// There can be instances where generating the Application Token is
// not required. In those cases,
// token info will have nothing.
AccessTokenInfo tokenInfo = appRegWFDto.getAccessTokenInfo();
if (tokenInfo != null) {
keyDetails.put("accessToken", tokenInfo.getAccessToken());
keyDetails.put("validityTime", tokenInfo.getValidityPeriod());
keyDetails.put("tokenDetails", tokenInfo.getJSONString());
keyDetails.put("tokenScope", tokenInfo.getScopes());
}
JSONObject appLogObject = new JSONObject();
appLogObject.put("Generated keys for application", application.getName());
APIUtil.logAuditMessage(APIConstants.AuditLogConstants.APPLICATION, appLogObject.toString(),
APIConstants.AuditLogConstants.UPDATED, this.username);
return keyDetails;
} catch (WorkflowException e) {
log.error("Could not execute Workflow", e);
throw new APIManagementException("Could not execute Workflow", e);
} finally {
if (isTenantFlowStarted) {
endTenantFlow();
}
}
}
private static List<Scope> getAllowedScopesForUserApplication(String username,
Set<Scope> reqScopeSet) {
String[] userRoles = null;
org.wso2.carbon.user.api.UserStoreManager userStoreManager = null;
String preservedCaseSensitiveValue = System.getProperty(PRESERVED_CASE_SENSITIVE_VARIABLE);
boolean preservedCaseSensitive = JavaUtils.isTrueExplicitly(preservedCaseSensitiveValue);
List<Scope> authorizedScopes = new ArrayList<Scope>();
try {
RealmService realmService = ServiceReferenceHolder.getInstance().getRealmService();
int tenantId = ServiceReferenceHolder.getInstance().getRealmService().getTenantManager()
.getTenantId(MultitenantUtils.getTenantDomain(username));
userStoreManager = realmService.getTenantUserRealm(tenantId).getUserStoreManager();
userRoles = userStoreManager.getRoleListOfUser(MultitenantUtils.getTenantAwareUsername(username));
} catch (org.wso2.carbon.user.api.UserStoreException e) {
// Log and return since we do not want to stop issuing the token in
// case of scope validation failures.
log.error("Error when getting the tenant's UserStoreManager or when getting roles of user ", e);
}
List<String> userRoleList;
if (userRoles != null) {
if (preservedCaseSensitive) {
userRoleList = Arrays.asList(userRoles);
} else {
userRoleList = new ArrayList<String>();
for (String userRole : userRoles) {
userRoleList.add(userRole.toLowerCase());
}
}
} else {
userRoleList = Collections.emptyList();
}
//Iterate the requested scopes list.
for (Scope scope : reqScopeSet) {
//Get the set of roles associated with the requested scope.
String roles = scope.getRoles();
//If the scope has been defined in the context of the App and if roles have been defined for the scope
if (roles != null && roles.length() != 0) {
List<String> roleList = new ArrayList<String>();
for (String scopeRole : roles.split(",")) {
if (preservedCaseSensitive) {
roleList.add(scopeRole.trim());
} else {
roleList.add(scopeRole.trim().toLowerCase());
}
}
//Check if user has at least one of the roles associated with the scope
roleList.retainAll(userRoleList);
if (!roleList.isEmpty()) {
authorizedScopes.add(scope);
}
}
}
return authorizedScopes;
}
@Override
public Map<String, String> completeApplicationRegistration(String userId, String applicationName, String tokenType,
String tokenScope, String groupingId)
throws APIManagementException {
Application application = apiMgtDAO.getApplicationByName(applicationName, userId, groupingId);
String status = apiMgtDAO.getRegistrationApprovalState(application.getId(), tokenType);
Map<String, String> keyDetails = null;
if (!application.getSubscriber().getName().equals(userId)) {
userId = application.getSubscriber().getName();
}
String workflowReference = apiMgtDAO.getWorkflowReference(applicationName, userId);
if (workflowReference != null) {
WorkflowDTO workflowDTO = null;
// Creating workflowDTO for the correct key type.
if (APIConstants.API_KEY_TYPE_PRODUCTION.equals(tokenType)) {
workflowDTO = WorkflowExecutorFactory.getInstance().createWorkflowDTO(
WorkflowConstants.WF_TYPE_AM_APPLICATION_REGISTRATION_PRODUCTION);
} else if (APIConstants.API_KEY_TYPE_SANDBOX.equals(tokenType)) {
workflowDTO = WorkflowExecutorFactory.getInstance().createWorkflowDTO(
WorkflowConstants.WF_TYPE_AM_APPLICATION_REGISTRATION_SANDBOX);
}
if (workflowDTO != null) {
// Set the workflow reference in the workflow dto and the populate method will fill in other details
// using the persisted request.
ApplicationRegistrationWorkflowDTO registrationWorkflowDTO = (ApplicationRegistrationWorkflowDTO)
workflowDTO;
registrationWorkflowDTO.setExternalWorkflowReference(workflowReference);
if (APIConstants.AppRegistrationStatus.REGISTRATION_APPROVED.equals(status)) {
apiMgtDAO.populateAppRegistrationWorkflowDTO(registrationWorkflowDTO);
try {
AbstractApplicationRegistrationWorkflowExecutor.dogenerateKeysForApplication
(registrationWorkflowDTO);
AccessTokenInfo tokenInfo = registrationWorkflowDTO.getAccessTokenInfo();
OAuthApplicationInfo oauthApp = registrationWorkflowDTO.getApplicationInfo();
keyDetails = new HashMap<String, String>();
if (tokenInfo != null) {
keyDetails.put("accessToken", tokenInfo.getAccessToken());
keyDetails.put("validityTime", Long.toString(tokenInfo.getValidityPeriod()));
keyDetails.put("tokenDetails", tokenInfo.getJSONString());
}
keyDetails.put("consumerKey", oauthApp.getClientId());
keyDetails.put("consumerSecret", oauthApp.getClientSecret());
keyDetails.put("appDetails", oauthApp.getJsonString());
} catch (APIManagementException e) {
APIUtil.handleException("Error occurred while Creating Keys.", e);
}
}
}
}
return keyDetails;
}
@Override
public Map<String, String> completeApplicationRegistration(String userId, int applicationId,
String tokenType, String tokenScope, String groupingId) throws APIManagementException {
Application application = apiMgtDAO.getApplicationById(applicationId);
String status = apiMgtDAO.getRegistrationApprovalState(application.getId(), tokenType);
Map<String, String> keyDetails = null;
if (!application.getSubscriber().getName().equals(userId)) {
userId = application.getSubscriber().getName();
}
//todo get workflow reference by appId
String workflowReference = apiMgtDAO.getWorkflowReferenceByApplicationId(application.getId(), userId);
if (workflowReference != null) {
WorkflowDTO workflowDTO = null;
// Creating workflowDTO for the correct key type.
if (APIConstants.API_KEY_TYPE_PRODUCTION.equals(tokenType)) {
workflowDTO = WorkflowExecutorFactory.getInstance()
.createWorkflowDTO(WorkflowConstants.WF_TYPE_AM_APPLICATION_REGISTRATION_PRODUCTION);
} else if (APIConstants.API_KEY_TYPE_SANDBOX.equals(tokenType)) {
workflowDTO = WorkflowExecutorFactory.getInstance()
.createWorkflowDTO(WorkflowConstants.WF_TYPE_AM_APPLICATION_REGISTRATION_SANDBOX);
}
if (workflowDTO != null) {
// Set the workflow reference in the workflow dto and the populate method will fill in other details
// using the persisted request.
ApplicationRegistrationWorkflowDTO registrationWorkflowDTO = (ApplicationRegistrationWorkflowDTO) workflowDTO;
registrationWorkflowDTO.setExternalWorkflowReference(workflowReference);
if (APIConstants.AppRegistrationStatus.REGISTRATION_APPROVED.equals(status)) {
apiMgtDAO.populateAppRegistrationWorkflowDTO(registrationWorkflowDTO);
try {
AbstractApplicationRegistrationWorkflowExecutor
.dogenerateKeysForApplication(registrationWorkflowDTO);
AccessTokenInfo tokenInfo = registrationWorkflowDTO.getAccessTokenInfo();
OAuthApplicationInfo oauthApp = registrationWorkflowDTO.getApplicationInfo();
keyDetails = new HashMap<String, String>();
if (tokenInfo != null) {
keyDetails.put("accessToken", tokenInfo.getAccessToken());
keyDetails.put("validityTime", Long.toString(tokenInfo.getValidityPeriod()));
keyDetails.put("tokenDetails", tokenInfo.getJSONString());
}
keyDetails.put("consumerKey", oauthApp.getClientId());
keyDetails.put("consumerSecret", oauthApp.getClientSecret());
keyDetails.put("accessallowdomains", registrationWorkflowDTO.getDomainList());
keyDetails.put("appDetails", oauthApp.getJsonString());
} catch (APIManagementException e) {
APIUtil.handleException("Error occurred while Creating Keys.", e);
}
}
}
}
return keyDetails;
}
/**
*
* @param userId APIM subscriber user ID.
* @param ApplicationName APIM application name.
* @return
* @throws APIManagementException
*/
@Override
public Application getApplicationsByName(String userId, String ApplicationName, String groupingId) throws
APIManagementException {
Application application = apiMgtDAO.getApplicationByName(ApplicationName, userId,groupingId);
if (application != null) {
checkAppAttributes(application, userId);
}
application = apiMgtDAO.getApplicationWithOAuthApps(ApplicationName, userId, groupingId);
if (application != null) {
Set<APIKey> keys = getApplicationKeys(application.getId());
for (APIKey key : keys) {
application.addKey(key);
}
}
return application;
}
/**
* Returns the corresponding application given the Id
* @param id Id of the Application
* @return it will return Application corresponds to the id.
* @throws APIManagementException
*/
@Override
public Application getApplicationById(int id) throws APIManagementException {
Application application = apiMgtDAO.getApplicationById(id);
if (application != null) {
Set<APIKey> keys = getApplicationKeys(application.getId());
for (APIKey key : keys) {
application.addKey(key);
}
}
return application;
}
/*
* @see super.getApplicationById(int id, String userId, String groupId)
* */
@Override
public Application getApplicationById(int id, String userId, String groupId) throws APIManagementException {
Application application = apiMgtDAO.getApplicationById(id, userId, groupId);
if (application != null) {
checkAppAttributes(application, userId);
Set<APIKey> keys = getApplicationKeys(application.getId());
for (APIKey key : keys) {
application.addKey(key);
}
}
return application;
}
/** get the status of the Application creation process given the application Id
*
* @param applicationId Id of the Application
* @return
* @throws APIManagementException
*/
@Override
public String getApplicationStatusById(int applicationId) throws APIManagementException {
return apiMgtDAO.getApplicationStatusById(applicationId);
}
@Override
public boolean isApplicationTokenExists(String accessToken) throws APIManagementException {
return apiMgtDAO.isAccessTokenExists(accessToken);
}
@Override
public String getGraphqlSchema(APIIdentifier apiId) throws APIManagementException {
return getGraphqlSchemaDefinition(apiId);
}
@Override
public Set<SubscribedAPI> getSubscribedIdentifiers(Subscriber subscriber, Identifier identifier, String groupingId)
throws APIManagementException {
Set<SubscribedAPI> subscribedAPISet = new HashSet<>();
Set<SubscribedAPI> subscribedAPIs = getSubscribedAPIs(subscriber, groupingId);
for (SubscribedAPI api : subscribedAPIs) {
if (identifier instanceof APIIdentifier && identifier.equals(api.getApiId())) {
Set<APIKey> keys = getApplicationKeys(api.getApplication().getId());
for (APIKey key : keys) {
api.addKey(key);
}
subscribedAPISet.add(api);
} else if (identifier instanceof APIProductIdentifier && identifier.equals(api.getProductId())) {
Set<APIKey> keys = getApplicationKeys(api.getApplication().getId());
for (APIKey key : keys) {
api.addKey(key);
}
subscribedAPISet.add(api);
}
}
return subscribedAPISet;
}
/**
* Returns a list of tiers denied
*
* @return Set<Tier>
*/
@Override
public Set<String> getDeniedTiers() throws APIManagementException {
// '0' is passed as argument whenever tenant id of logged in user is needed
return getDeniedTiers(0);
}
/**
* Returns a list of tiers denied
* @param apiProviderTenantId tenant id of API provider
* @return Set<Tier>
*/
@Override
public Set<String> getDeniedTiers(int apiProviderTenantId) throws APIManagementException {
Set<String> deniedTiers = new HashSet<String>();
String[] currentUserRoles;
if (apiProviderTenantId == 0) {
apiProviderTenantId = tenantId;
}
try {
if (apiProviderTenantId != 0) {
/* Get the roles of the Current User */
currentUserRoles = ((UserRegistry) ((UserAwareAPIConsumer) this).registry).
getUserRealm().getUserStoreManager().getRoleListOfUser(((UserRegistry) this.registry)
.getUserName());
Set<TierPermissionDTO> tierPermissions;
if (APIUtil.isAdvanceThrottlingEnabled()) {
tierPermissions = apiMgtDAO.getThrottleTierPermissions(apiProviderTenantId);
} else {
tierPermissions = apiMgtDAO.getTierPermissions(apiProviderTenantId);
}
for (TierPermissionDTO tierPermission : tierPermissions) {
String type = tierPermission.getPermissionType();
List<String> currentRolesList = new ArrayList<String>(Arrays.asList(currentUserRoles));
List<String> roles = new ArrayList<String>(Arrays.asList(tierPermission.getRoles()));
currentRolesList.retainAll(roles);
if (APIConstants.TIER_PERMISSION_ALLOW.equals(type)) {
/* Current User is not allowed for this Tier*/
if (currentRolesList.isEmpty()) {
deniedTiers.add(tierPermission.getTierName());
}
} else {
/* Current User is denied for this Tier*/
if (currentRolesList.size() > 0) {
deniedTiers.add(tierPermission.getTierName());
}
}
}
}
} catch (org.wso2.carbon.user.api.UserStoreException e) {
log.error("cannot retrieve user role list for tenant" + tenantDomain, e);
}
return deniedTiers;
}
@Override
public Set<TierPermission> getTierPermissions() throws APIManagementException {
Set<TierPermission> tierPermissions = new HashSet<TierPermission>();
if (tenantId != 0) {
Set<TierPermissionDTO> tierPermissionDtos;
if (APIUtil.isAdvanceThrottlingEnabled()) {
tierPermissionDtos = apiMgtDAO.getThrottleTierPermissions(tenantId);
} else {
tierPermissionDtos = apiMgtDAO.getTierPermissions(tenantId);
}
for (TierPermissionDTO tierDto : tierPermissionDtos) {
TierPermission tierPermission = new TierPermission(tierDto.getTierName());
tierPermission.setRoles(tierDto.getRoles());
tierPermission.setPermissionType(tierDto.getPermissionType());
tierPermissions.add(tierPermission);
}
}
return tierPermissions;
}
/**
* Check whether given Tier is denied for the user
*
* @param tierName
* @return
* @throws APIManagementException if failed to get the tiers
*/
@Override
public boolean isTierDeneid(String tierName) throws APIManagementException {
String[] currentUserRoles;
try {
if (tenantId != 0) {
/* Get the roles of the Current User */
currentUserRoles = ((UserRegistry) ((UserAwareAPIConsumer) this).registry).
getUserRealm().getUserStoreManager().getRoleListOfUser(((UserRegistry) this.registry).getUserName());
TierPermissionDTO tierPermission;
if(APIUtil.isAdvanceThrottlingEnabled()){
tierPermission = apiMgtDAO.getThrottleTierPermission(tierName, tenantId);
}else{
tierPermission = apiMgtDAO.getTierPermission(tierName, tenantId);
}
if (tierPermission == null) {
return false;
} else {
List<String> currentRolesList = new ArrayList<String>(Arrays.asList(currentUserRoles));
List<String> roles = new ArrayList<String>(Arrays.asList(tierPermission.getRoles()));
currentRolesList.retainAll(roles);
if (APIConstants.TIER_PERMISSION_ALLOW.equals(tierPermission.getPermissionType())) {
if (currentRolesList.isEmpty()) {
return true;
}
} else {
if (currentRolesList.size() > 0) {
return true;
}
}
}
}
} catch (org.wso2.carbon.user.api.UserStoreException e) {
log.error("cannot retrieve user role list for tenant" + tenantDomain, e);
}
return false;
}
private boolean isTenantDomainNotMatching(String tenantDomain) {
if (this.tenantDomain != null) {
return !(this.tenantDomain.equals(tenantDomain));
}
return true;
}
@Override
public Set<API> searchAPI(String searchTerm, String searchType, String tenantDomain)
throws APIManagementException {
return null;
}
public Set<Scope> getScopesBySubscribedAPIs(List<APIIdentifier> identifiers)
throws APIManagementException {
return apiMgtDAO.getScopesBySubscribedAPIs(identifiers);
}
public String getScopesByToken(String accessToken) throws APIManagementException {
return null;
}
public Set<Scope> getScopesByScopeKeys(String scopeKeys, int tenantId)
throws APIManagementException {
return apiMgtDAO.getScopesByScopeKeys(scopeKeys, tenantId);
}
@Override
public String getGroupId(int appId) throws APIManagementException {
return apiMgtDAO.getGroupId(appId);
}
@Override
public String[] getGroupIds(String response) throws APIManagementException {
String groupingExtractorClass = APIUtil.getGroupingExtractorImplementation();
return APIUtil.getGroupIdsFromExtractor(response, groupingExtractorClass);
}
/**
* Returns all applications associated with given subscriber, groupingId and search criteria.
*
* @param subscriber Subscriber
* @param groupingId The groupId to which the applications must belong.
* @param offset The offset.
* @param search The search string.
* @param sortColumn The sort column.
* @param sortOrder The sort order.
* @return Application[] The Applications.
* @throws APIManagementException
*/
@Override
public Application[] getApplicationsWithPagination(Subscriber subscriber, String groupingId, int start , int offset
, String search, String sortColumn, String sortOrder)
throws APIManagementException {
return apiMgtDAO.getApplicationsWithPagination(subscriber, groupingId, start, offset,
search, sortColumn, sortOrder);
}
/**
* Returns all applications associated with given subscriber and groupingId.
*
* @param subscriber The subscriber.
* @param groupingId The groupId to which the applications must belong.
* @return Application[] Array of applications.
* @throws APIManagementException
*/
@Override
public Application[] getApplications(Subscriber subscriber, String groupingId)
throws APIManagementException {
Application[] applications = apiMgtDAO.getApplications(subscriber, groupingId);
for (Application application : applications) {
Set<APIKey> keys = getApplicationKeys(application.getId());
for (APIKey key : keys) {
application.addKey(key);
}
}
return applications;
}
/**
* Returns all API keys associated with given application id.
*
* @param applicationId The id of the application.
* @return Set<APIKey> Set of API keys of the application.
* @throws APIManagementException
*/
protected Set<APIKey> getApplicationKeys(int applicationId) throws APIManagementException {
Set<APIKey> apiKeys = new HashSet<APIKey>();
APIKey productionKey = getApplicationKey(applicationId, APIConstants.API_KEY_TYPE_PRODUCTION);
if (productionKey != null) {
apiKeys.add(productionKey);
} else {
productionKey = apiMgtDAO.getKeyStatusOfApplication(APIConstants.API_KEY_TYPE_PRODUCTION, applicationId);
if (productionKey != null) {
productionKey.setType(APIConstants.API_KEY_TYPE_PRODUCTION);
apiKeys.add(productionKey);
}
}
APIKey sandboxKey = getApplicationKey(applicationId, APIConstants.API_KEY_TYPE_SANDBOX);
if (sandboxKey != null) {
apiKeys.add(sandboxKey);
} else {
sandboxKey = apiMgtDAO.getKeyStatusOfApplication(APIConstants.API_KEY_TYPE_SANDBOX, applicationId);
if (sandboxKey != null) {
sandboxKey.setType(APIConstants.API_KEY_TYPE_SANDBOX);
apiKeys.add(sandboxKey);
}
}
return apiKeys;
}
/**
* Returns the key associated with given application id and key type.
*
* @param applicationId Id of the Application.
* @param keyType The type of key.
* @return APIKey The key of the application.
* @throws APIManagementException
*/
protected APIKey getApplicationKey(int applicationId, String keyType) throws APIManagementException {
String consumerKey = apiMgtDAO.getConsumerkeyByApplicationIdAndKeyType(String.valueOf(applicationId), keyType);
if (StringUtils.isNotEmpty(consumerKey)) {
String consumerKeyStatus = apiMgtDAO.getKeyStatusOfApplication(keyType, applicationId).getState();
KeyManager keyManager = KeyManagerHolder.getKeyManagerInstance();
OAuthApplicationInfo oAuthApplicationInfo = keyManager.retrieveApplication(consumerKey);
AccessTokenInfo tokenInfo = keyManager.getAccessTokenByConsumerKey(consumerKey);
APIKey apiKey = new APIKey();
apiKey.setConsumerKey(consumerKey);
apiKey.setType(keyType);
apiKey.setState(consumerKeyStatus);
if (oAuthApplicationInfo != null) {
apiKey.setConsumerSecret(oAuthApplicationInfo.getClientSecret());
apiKey.setCallbackUrl(oAuthApplicationInfo.getCallBackURL());
if (oAuthApplicationInfo.getParameter(APIConstants.JSON_GRANT_TYPES) != null) {
apiKey.setGrantTypes(oAuthApplicationInfo.getParameter(APIConstants.JSON_GRANT_TYPES).toString());
}
}
if (tokenInfo != null) {
apiKey.setAccessToken(tokenInfo.getAccessToken());
apiKey.setValidityPeriod(tokenInfo.getValidityPeriod());
apiKey.setTokenScope(getScopeString(tokenInfo.getScopes()));
} else {
if (log.isDebugEnabled()) {
log.debug("Access token does not exist for Consumer Key: " + consumerKey);
}
}
return apiKey;
}
if (log.isDebugEnabled()) {
log.debug("Consumer key does not exist for Application Id: " + applicationId + " Key Type: " + keyType);
}
return null;
}
/**
* Returns a single string containing the provided array of scopes.
*
* @param scopes The array of scopes.
* @return String Single string containing the provided array of scopes.
*/
private String getScopeString(String[] scopes) {
return StringUtils.join(scopes, " ");
}
@Override
public Application[] getLightWeightApplications(Subscriber subscriber, String groupingId) throws
APIManagementException {
return apiMgtDAO.getLightWeightApplications(subscriber, groupingId);
}
/**
* @param userId Subscriber name.
* @param applicationName of the Application.
* @param tokenType Token type (PRODUCTION | SANDBOX)
* @param callbackUrl callback URL
* @param allowedDomains allowedDomains for token.
* @param validityTime validity time period.
* @param groupingId APIM application id.
* @param jsonString Callback URL for the Application.
* @param tokenScope Scopes for the requested tokens.
* @return
* @throws APIManagementException
*/
@Override
public OAuthApplicationInfo updateAuthClient(String userId, String applicationName,
String tokenType,
String callbackUrl, String[] allowedDomains,
String validityTime,
String tokenScope,
String groupingId,
String jsonString) throws APIManagementException {
boolean tenantFlowStarted = false;
try {
if (tenantDomain != null && !MultitenantConstants.SUPER_TENANT_DOMAIN_NAME.equals(tenantDomain)) {
PrivilegedCarbonContext.startTenantFlow();
PrivilegedCarbonContext.getThreadLocalCarbonContext().setTenantDomain(tenantDomain, true);
tenantFlowStarted = true;
}
Application application = ApplicationUtils.retrieveApplication(applicationName, userId, groupingId);
final String subscriberName = application.getSubscriber().getName();
boolean isCaseInsensitiveComparisons = Boolean.parseBoolean(getAPIManagerConfiguration().
getFirstProperty(APIConstants.API_STORE_FORCE_CI_COMPARISIONS));
boolean isUserAppOwner;
if (isCaseInsensitiveComparisons) {
isUserAppOwner = subscriberName.equalsIgnoreCase(userId);
} else {
isUserAppOwner = subscriberName.equals(userId);
}
if (!isUserAppOwner) {
throw new APIManagementException("user: " + userId + ", attempted to update OAuth application " +
"owned by: " + subscriberName);
}
//Create OauthAppRequest object by passing json String.
OAuthAppRequest oauthAppRequest = ApplicationUtils.createOauthAppRequest(applicationName, null, callbackUrl,
tokenScope, jsonString, application.getTokenType());
oauthAppRequest.getOAuthApplicationInfo().addParameter(ApplicationConstants.APP_KEY_TYPE, tokenType);
String consumerKey = apiMgtDAO.getConsumerKeyForApplicationKeyType(applicationName, userId, tokenType,
groupingId);
oauthAppRequest.getOAuthApplicationInfo().setClientId(consumerKey);
//get key manager instance.
KeyManager keyManager = KeyManagerHolder.getKeyManagerInstance();
//call update method.
OAuthApplicationInfo updatedAppInfo = keyManager.updateApplication(oauthAppRequest);
JSONObject appLogObject = new JSONObject();
appLogObject.put(APIConstants.AuditLogConstants.APPLICATION_NAME, updatedAppInfo.getClientName());
appLogObject.put("Updated Oauth app with Call back URL", callbackUrl);
appLogObject.put("Updated Oauth app with grant types", jsonString);
APIUtil.logAuditMessage(APIConstants.AuditLogConstants.APPLICATION, appLogObject.toString(),
APIConstants.AuditLogConstants.UPDATED, this.username);
return updatedAppInfo;
} finally {
if (tenantFlowStarted) {
endTenantFlow();
}
}
}
/**
* @param userId Subscriber name.
* @param applicationName of the Application.
* @param applicationId of the Application.
* @param tokenType Token type (PRODUCTION | SANDBOX)
* @param callbackUrl callback URL
* @param allowedDomains allowedDomains for token.
* @param validityTime validity time period.
* @param groupingId APIM application id.
* @param jsonString Callback URL for the Application.
* @param tokenScope Scopes for the requested tokens.
* @return
* @throws APIManagementException
*/
@Override
public OAuthApplicationInfo updateAuthClientByAppId(String userId, String applicationName, int applicationId,
String tokenType, String callbackUrl, String[] allowedDomains, String validityTime, String tokenScope,
String groupingId, String jsonString) throws APIManagementException {
boolean tenantFlowStarted = false;
try {
if (tenantDomain != null && !MultitenantConstants.SUPER_TENANT_DOMAIN_NAME.equals(tenantDomain)) {
tenantFlowStarted = startTenantFlowForTenantDomain(tenantDomain);
}
Application application = ApplicationUtils.retrieveApplicationById(applicationId);
//Create OauthAppRequest object by passing json String.
OAuthAppRequest oauthAppRequest = ApplicationUtils.createOauthAppRequest(applicationName, null, callbackUrl,
tokenScope, jsonString, application.getTokenType());
oauthAppRequest.getOAuthApplicationInfo().addParameter(ApplicationConstants.APP_KEY_TYPE, tokenType);
String consumerKey = apiMgtDAO.getConsumerKeyForApplicationKeyType(applicationId, userId, tokenType,
groupingId);
oauthAppRequest.getOAuthApplicationInfo().setClientId(consumerKey);
//get key manager instance.
KeyManager keyManager = KeyManagerHolder.getKeyManagerInstance();
//call update method.
OAuthApplicationInfo updatedAppInfo = keyManager.updateApplication(oauthAppRequest);
JSONObject appLogObject = new JSONObject();
appLogObject.put(APIConstants.AuditLogConstants.APPLICATION_NAME, updatedAppInfo.getClientName());
appLogObject.put("Updated Oauth app with Call back URL", callbackUrl);
appLogObject.put("Updated Oauth app with grant types", jsonString);
APIUtil.logAuditMessage(APIConstants.AuditLogConstants.APPLICATION, appLogObject.toString(),
APIConstants.AuditLogConstants.UPDATED, this.username);
return updatedAppInfo;
} finally {
if (tenantFlowStarted) {
endTenantFlow();
}
}
}
/**
* This method perform delete oAuth application.
*
* @param consumerKey
* @throws APIManagementException
*/
@Override
public void deleteOAuthApplication(String consumerKey) throws APIManagementException {
//get key manager instance.
KeyManager keyManager = KeyManagerHolder.getKeyManagerInstance();
//delete oAuthApplication by calling key manager implementation
keyManager.deleteApplication(consumerKey);
Map<String, String> applicationIdAndTokenTypeMap =
apiMgtDAO.getApplicationIdAndTokenTypeByConsumerKey(consumerKey);
if (applicationIdAndTokenTypeMap != null) {
String applicationId = applicationIdAndTokenTypeMap.get("application_id");
String tokenType = applicationIdAndTokenTypeMap.get("token_type");
if (applicationId != null && tokenType != null) {
apiMgtDAO.deleteApplicationKeyMappingByConsumerKey(consumerKey);
apiMgtDAO.deleteApplicationRegistration(applicationId, tokenType);
}
}
}
@Override
public Application[] getApplicationsByOwner(String userId) throws APIManagementException {
return apiMgtDAO.getApplicationsByOwner(userId);
}
public boolean isSubscriberValid(String userId)
throws APIManagementException {
boolean isSubscribeValid = false;
if (apiMgtDAO.getSubscriber(userId) != null) {
isSubscribeValid = true;
} else {
return false;
}
return isSubscribeValid;
}
public boolean updateApplicationOwner(String userId, Application application) throws APIManagementException {
boolean isAppUpdated;
String consumerKey;
String oldUserName = application.getSubscriber().getName();
String oldTenantDomain = MultitenantUtils.getTenantDomain(oldUserName);
String newTenantDomain = MultitenantUtils.getTenantDomain(userId);
if (oldTenantDomain.equals(newTenantDomain)) {
if (isSubscriberValid(userId)) {
String applicationName = application.getName();
if (!APIUtil.isApplicationOwnedBySubscriber(userId, applicationName)) {
for (int i = 0; i < application.getKeys().size(); i++) {
KeyManager keyManager = KeyManagerHolder.getKeyManagerInstance();
/* retrieving OAuth application information for specific consumer key */
consumerKey = ((APIKey) ((ArrayList) application.getKeys()).get(i)).getConsumerKey();
OAuthApplicationInfo oAuthApplicationInfo = keyManager.retrieveApplication(consumerKey);
if (oAuthApplicationInfo.getParameter(ApplicationConstants.OAUTH_CLIENT_NAME) != null) {
OAuthAppRequest oauthAppRequest = ApplicationUtils.createOauthAppRequest(oAuthApplicationInfo.
getParameter(ApplicationConstants.OAUTH_CLIENT_NAME).toString(), null,
oAuthApplicationInfo.getCallBackURL(), null,
null, application.getTokenType());
oauthAppRequest.getOAuthApplicationInfo().setAppOwner(userId);
oauthAppRequest.getOAuthApplicationInfo().setClientId(consumerKey);
/* updating the owner of the OAuth application with userId */
OAuthApplicationInfo updatedAppInfo = keyManager.updateApplicationOwner(oauthAppRequest,
oldUserName);
isAppUpdated = true;
audit.info("Successfully updated the owner of application " + application.getName() +
" from " + oldUserName + " to " + userId + ".");
} else {
throw new APIManagementException("Unable to retrieve OAuth application information.");
}
}
} else {
throw new APIManagementException("Unable to update application owner to " + userId +
" as this user has an application with the same name. Update owner to another user.");
}
} else {
throw new APIManagementException(userId + " is not a subscriber");
}
} else {
throw new APIManagementException("Unable to update application owner to " +
userId + " as this user does not belong to " + oldTenantDomain + " domain.");
}
isAppUpdated = apiMgtDAO.updateApplicationOwner(userId, application);
return isAppUpdated;
}
public JSONObject resumeWorkflow(Object[] args) {
JSONObject row = new JSONObject();
if (args != null && APIUtil.isStringArray(args)) {
String workflowReference = (String) args[0];
String status = (String) args[1];
String description = null;
if (args.length > 2 && args[2] != null) {
description = (String) args[2];
}
boolean isTenantFlowStarted = false;
try {
// if (workflowReference != null) {
WorkflowDTO workflowDTO = apiMgtDAO.retrieveWorkflow(workflowReference);
if (workflowDTO == null) {
log.error("Could not find workflow for reference " + workflowReference);
row.put("error", Boolean.TRUE);
row.put("statusCode", 500);
row.put("message", "Could not find workflow for reference " + workflowReference);
return row;
}
String tenantDomain = workflowDTO.getTenantDomain();
if (tenantDomain != null && !org.wso2.carbon.utils.multitenancy.MultitenantConstants
.SUPER_TENANT_DOMAIN_NAME.equals(tenantDomain)) {
isTenantFlowStarted = startTenantFlowForTenantDomain(tenantDomain);
}
workflowDTO.setWorkflowDescription(description);
workflowDTO.setStatus(WorkflowStatus.valueOf(status));
String workflowType = workflowDTO.getWorkflowType();
WorkflowExecutor workflowExecutor;
try {
workflowExecutor = getWorkflowExecutor(workflowType);
workflowExecutor.complete(workflowDTO);
} catch (WorkflowException e) {
throw new APIManagementException(e);
}
row.put("error", Boolean.FALSE);
row.put("statusCode", 200);
row.put("message", "Invoked workflow completion successfully.");
// }
} catch (IllegalArgumentException e) {
String msg = "Illegal argument provided. Valid values for status are APPROVED and REJECTED.";
log.error(msg, e);
row.put("error", Boolean.TRUE);
row.put("statusCode", 500);
row.put("message", msg);
} catch (APIManagementException e) {
String msg = "Error while resuming the workflow. ";
log.error(msg, e);
row.put("error", Boolean.TRUE);
row.put("statusCode", 500);
row.put("message", msg + e.getMessage());
} finally {
if (isTenantFlowStarted) {
endTenantFlow();
}
}
}
return row;
}
protected void endTenantFlow() {
PrivilegedCarbonContext.endTenantFlow();
}
protected boolean startTenantFlowForTenantDomain(String tenantDomain) {
boolean isTenantFlowStarted = true;
PrivilegedCarbonContext.startTenantFlow();
PrivilegedCarbonContext.getThreadLocalCarbonContext().setTenantDomain(tenantDomain, true);
return isTenantFlowStarted;
}
/**
* Returns a workflow executor
*
* @param workflowType Workflow executor type
* @return WorkflowExecutor of given type
* @throws WorkflowException if an error occurred while getting WorkflowExecutor
*/
protected WorkflowExecutor getWorkflowExecutor(String workflowType) throws WorkflowException {
return WorkflowExecutorFactory.getInstance().getWorkflowExecutor(workflowType);
}
@Override
public boolean isMonetizationEnabled(String tenantDomain) throws APIManagementException {
JSONObject apiTenantConfig = null;
try {
String content = apimRegistryService.getConfigRegistryResourceContent(tenantDomain, APIConstants.API_TENANT_CONF_LOCATION);
if (content != null) {
JSONParser parser = new JSONParser();
apiTenantConfig = (JSONObject) parser.parse(content);
}
} catch (UserStoreException e) {
handleException("UserStoreException thrown when getting API tenant config from registry", e);
} catch (RegistryException e) {
handleException("RegistryException thrown when getting API tenant config from registry", e);
} catch (ParseException e) {
handleException("ParseException thrown when passing API tenant config from registry", e);
}
return getTenantConfigValue(tenantDomain, apiTenantConfig, APIConstants.API_TENANT_CONF_ENABLE_MONITZATION_KEY);
}
private boolean getTenantConfigValue(String tenantDomain, JSONObject apiTenantConfig, String configKey) throws APIManagementException {
if (apiTenantConfig != null) {
Object value = apiTenantConfig.get(configKey);
if (value != null) {
return Boolean.parseBoolean(value.toString());
}
else {
throw new APIManagementException(configKey + " config does not exist for tenant " + tenantDomain);
}
}
return false;
}
/**
* To get the query to retrieve user role list query based on current role list.
*
* @return the query with user role list.
* @throws APIManagementException API Management Exception.
*/
private String getUserRoleListQuery() throws APIManagementException {
StringBuilder rolesQuery = new StringBuilder();
rolesQuery.append('(');
rolesQuery.append(APIConstants.NULL_USER_ROLE_LIST);
String[] userRoles = APIUtil.getListOfRoles((userNameWithoutChange != null)? userNameWithoutChange: username);
if (userRoles != null) {
for (String userRole : userRoles) {
rolesQuery.append(" OR ");
rolesQuery.append(ClientUtils.escapeQueryChars(APIUtil.sanitizeUserRole(userRole.toLowerCase())));
}
}
rolesQuery.append(")");
if(log.isDebugEnabled()) {
log.debug("User role list solr query " + APIConstants.STORE_VIEW_ROLES + "=" + rolesQuery.toString());
}
return APIConstants.STORE_VIEW_ROLES + "=" + rolesQuery.toString();
}
/**
* To get the current user's role list.
*
* @return user role list.
* @throws APIManagementException API Management Exception.
*/
private List<String> getUserRoleList() throws APIManagementException {
List<String> userRoleList;
if (userNameWithoutChange == null) {
userRoleList = new ArrayList<String>() {{
add(APIConstants.NULL_USER_ROLE_LIST);
}};
} else {
userRoleList = new ArrayList<String>(Arrays.asList(APIUtil.getListOfRoles(userNameWithoutChange)));
}
return userRoleList;
}
@Override
protected String getSearchQuery(String searchQuery) throws APIManagementException {
if (!isAccessControlRestrictionEnabled || ( userNameWithoutChange != null &&
APIUtil.hasPermission(userNameWithoutChange, APIConstants.Permissions
.APIM_ADMIN))) {
return searchQuery;
}
String criteria = getUserRoleListQuery();
if (searchQuery != null && !searchQuery.trim().isEmpty()) {
criteria = criteria + "&" + searchQuery;
}
return criteria;
}
@Deprecated // Remove this method once the jaggery store app is removed.
@Override
public String getWSDLDocument(String username, String tenantDomain, String resourceUrl,
Map environmentDetails, Map apiDetails) throws APIManagementException {
if (username == null) {
username = APIConstants.END_USER_ANONYMOUS;
}
if (tenantDomain == null) {
tenantDomain = MultitenantConstants.SUPER_TENANT_DOMAIN_NAME;
}
Map<String, Object> docResourceMap = APIUtil.getDocument(username, resourceUrl, tenantDomain);
String wsdlContent = "";
if (log.isDebugEnabled()) {
log.debug("WSDL document resource availability: " + docResourceMap.isEmpty());
}
if (!docResourceMap.isEmpty()) {
try {
ByteArrayOutputStream arrayOutputStream = new ByteArrayOutputStream();
IOUtils.copy((InputStream) docResourceMap.get("Data"), arrayOutputStream);
String apiName = (String) apiDetails.get(API_NAME);
String apiVersion = (String) apiDetails.get(API_VERSION);
String apiProvider = (String) apiDetails.get(API_PROVIDER);
String environmentName = (String) environmentDetails.get(ENVIRONMENT_NAME);
String environmentType = (String) environmentDetails.get(ENVIRONMENT_TYPE);
if (log.isDebugEnabled()) {
log.debug("Published SOAP api gateway environment name: " + environmentName + " environment type: "
+ environmentType);
}
if (resourceUrl.endsWith(APIConstants.ZIP_FILE_EXTENSION)) {
WSDLArchiveInfo archiveInfo = APIMWSDLReader
.extractAndValidateWSDLArchive((InputStream) docResourceMap.get("Data"))
.getWsdlArchiveInfo();
File folderToImport = new File(
archiveInfo.getLocation() + File.separator + APIConstants.API_WSDL_EXTRACTED_DIRECTORY);
Collection<File> wsdlFiles = APIFileUtil
.searchFilesWithMatchingExtension(folderToImport, APIFileUtil.WSDL_FILE_EXTENSION);
Collection<File> xsdFiles = APIFileUtil
.searchFilesWithMatchingExtension(folderToImport, APIFileUtil.XSD_FILE_EXTENSION);
if (wsdlFiles != null) {
for (File foundWSDLFile : wsdlFiles) {
Path fileLocation = Paths.get(foundWSDLFile.getAbsolutePath());
byte[] updatedWSDLContent = this
.getUpdatedWSDLByEnvironment(resourceUrl, Files.readAllBytes(fileLocation),
environmentName, environmentType, apiName, apiVersion, apiProvider);
File updatedWSDLFile = new File(foundWSDLFile.getPath());
wsdlFiles.remove(foundWSDLFile);
FileUtils.writeByteArrayToFile(updatedWSDLFile, updatedWSDLContent);
wsdlFiles.add(updatedWSDLFile);
}
wsdlFiles.addAll(xsdFiles);
ZIPUtils.zipFiles(folderToImport.getCanonicalPath() + APIConstants.UPDATED_WSDL_ZIP,
wsdlFiles);
wsdlContent = folderToImport.getCanonicalPath() + APIConstants.UPDATED_WSDL_ZIP;
}
} else {
arrayOutputStream = new ByteArrayOutputStream();
IOUtils.copy((InputStream) docResourceMap.get("Data"), arrayOutputStream);
byte[] updatedWSDLContent = this
.getUpdatedWSDLByEnvironment(resourceUrl, arrayOutputStream.toByteArray(), environmentName,
environmentType, apiName, apiVersion, apiProvider);
wsdlContent = new String(updatedWSDLContent);
}
} catch (IOException e) {
handleException("Error occurred while copying wsdl content into byte array stream for resource: "
+ resourceUrl, e);
}
} else {
handleException("No wsdl resource found for resource path: " + resourceUrl);
}
JSONObject data = new JSONObject();
data.put(APIConstants.DOCUMENTATION_RESOURCE_MAP_CONTENT_TYPE,
docResourceMap.get(APIConstants.DOCUMENTATION_RESOURCE_MAP_CONTENT_TYPE));
data.put(APIConstants.DOCUMENTATION_RESOURCE_MAP_NAME,
docResourceMap.get(APIConstants.DOCUMENTATION_RESOURCE_MAP_NAME));
data.put(APIConstants.DOCUMENTATION_RESOURCE_MAP_DATA, wsdlContent);
if (log.isDebugEnabled()) {
log.debug("Updated wsdl content details for wsdl resource: " + docResourceMap.get("name") + " is " +
data.toJSONString());
}
return data.toJSONString();
}
@Override
public ResourceFile getWSDL(APIIdentifier apiIdentifier, String environmentName, String environmentType)
throws APIManagementException {
WSDLValidationResponse validationResponse;
ResourceFile resourceFile = getWSDL(apiIdentifier);
if (resourceFile.getContentType().contains(APIConstants.APPLICATION_ZIP)) {
validationResponse = APIMWSDLReader.extractAndValidateWSDLArchive(resourceFile.getContent());
} else {
validationResponse = APIMWSDLReader.validateWSDLFile(resourceFile.getContent());
}
if (validationResponse.isValid()) {
API api = getAPI(apiIdentifier);
WSDLProcessor wsdlProcessor = validationResponse.getWsdlProcessor();
wsdlProcessor.updateEndpoints(api, environmentName, environmentType);
InputStream wsdlDataStream = wsdlProcessor.getWSDL();
return new ResourceFile(wsdlDataStream, resourceFile.getContentType());
} else {
throw new APIManagementException(ExceptionCodes.from(ExceptionCodes.CORRUPTED_STORED_WSDL,
apiIdentifier.toString()));
}
}
@Override
public Set<SubscribedAPI> getLightWeightSubscribedIdentifiers(Subscriber subscriber, APIIdentifier apiIdentifier,
String groupingId) throws APIManagementException {
Set<SubscribedAPI> subscribedAPISet = new HashSet<SubscribedAPI>();
Set<SubscribedAPI> subscribedAPIs = getLightWeightSubscribedAPIs(subscriber, groupingId);
for (SubscribedAPI api : subscribedAPIs) {
if (api.getApiId().equals(apiIdentifier)) {
subscribedAPISet.add(api);
}
}
return subscribedAPISet;
}
public Set<APIKey> getApplicationKeysOfApplication(int applicationId) throws APIManagementException {
Set<APIKey> apikeys = getApplicationKeys(applicationId);
return apikeys;
}
/**
* To check authorization of the API against current logged in user. If the user is not authorized an exception
* will be thrown.
*
* @param identifier API identifier
* @throws APIManagementException APIManagementException
*/
protected void checkAccessControlPermission(Identifier identifier) throws APIManagementException {
if (identifier == null || !isAccessControlRestrictionEnabled) {
if (!isAccessControlRestrictionEnabled && log.isDebugEnabled() && identifier != null) {
log.debug(
"Publisher access control restriction is not enabled. Hence the API/Product " + identifier.getName()
+ " should not be checked for further permission. Registry permission check "
+ "is sufficient");
}
return;
}
String resourcePath = StringUtils.EMPTY;
String identifierType = StringUtils.EMPTY;
if (identifier instanceof APIIdentifier) {
resourcePath = APIUtil.getAPIPath((APIIdentifier) identifier);
identifierType = APIConstants.API_IDENTIFIER_TYPE;
} else if (identifier instanceof APIProductIdentifier) {
resourcePath = APIUtil.getAPIProductPath((APIProductIdentifier) identifier);
identifierType = APIConstants.API_PRODUCT_IDENTIFIER_TYPE;
}
Registry registry;
try {
// Need user name with tenant domain to get correct domain name from
// MultitenantUtils.getTenantDomain(username)
String userNameWithTenantDomain = (userNameWithoutChange != null) ? userNameWithoutChange : username;
String apiTenantDomain = getTenantDomain(identifier);
int apiTenantId = getTenantManager().getTenantId(apiTenantDomain);
if (!MultitenantConstants.SUPER_TENANT_DOMAIN_NAME.equals(apiTenantDomain)) {
APIUtil.loadTenantRegistry(apiTenantId);
}
if (this.tenantDomain == null || !this.tenantDomain.equals(apiTenantDomain)) { //cross tenant scenario
registry = getRegistryService().getGovernanceUserRegistry(
getTenantAwareUsername(APIUtil.replaceEmailDomainBack(identifier.getProviderName())),
apiTenantId);
} else {
registry = this.registry;
}
Resource resource = registry.get(resourcePath);
String accessControlProperty = resource.getProperty(APIConstants.ACCESS_CONTROL);
if (accessControlProperty == null || accessControlProperty.trim().isEmpty() || accessControlProperty
.equalsIgnoreCase(APIConstants.NO_ACCESS_CONTROL)) {
if (log.isDebugEnabled()) {
log.debug(identifierType + " in the path " + resourcePath + " does not have any access control restriction");
}
return;
}
if (APIUtil.hasPermission(userNameWithTenantDomain, APIConstants.Permissions.APIM_ADMIN)) {
return;
}
String storeVisibilityRoles = resource.getProperty(APIConstants.STORE_VIEW_ROLES);
if (storeVisibilityRoles != null && !storeVisibilityRoles.trim().isEmpty()) {
String[] storeVisibilityRoleList = storeVisibilityRoles.split(",");
if (log.isDebugEnabled()) {
log.debug(identifierType + " has restricted access to users with the roles : " + Arrays
.toString(storeVisibilityRoleList));
}
String[] userRoleList = APIUtil.getListOfRoles(userNameWithTenantDomain);
if (log.isDebugEnabled()) {
log.debug("User " + username + " has roles " + Arrays.toString(userRoleList));
}
for (String role : storeVisibilityRoleList) {
role = role.trim();
if (role.equalsIgnoreCase(APIConstants.NULL_USER_ROLE_LIST) || APIUtil
.compareRoleList(userRoleList, role)) {
return;
}
}
if (log.isDebugEnabled()) {
log.debug(identifierType + " " + identifier + " cannot be accessed by user '" + username + "'. It "
+ "has a store visibility restriction");
}
throw new APIManagementException(
APIConstants.UN_AUTHORIZED_ERROR_MESSAGE + " view the " + identifierType + " " + identifier);
}
} catch (RegistryException e) {
throw new APIManagementException(
"Registry Exception while trying to check the store visibility restriction of " + identifierType + " " + identifier
.getName(), e);
} catch (org.wso2.carbon.user.api.UserStoreException e) {
String msg = "Failed to get " + identifierType + " from : " + resourcePath;
log.error(msg, e);
throw new APIManagementException(msg, e);
}
}
/**
* This method is used to get the updated wsdl with the respective environment apis are published
*
* @param wsdlResourcePath registry resource path to the wsdl
* @param wsdlContent wsdl resource content as byte array
* @param environmentType gateway environment type
* @return updated wsdl content with environment endpoints
* @throws APIManagementException
*/
private byte[] getUpdatedWSDLByEnvironment(String wsdlResourcePath, byte[] wsdlContent, String environmentName,
String environmentType, String apiName, String apiVersion, String apiProvider)
throws APIManagementException {
APIMWSDLReader apimwsdlReader = new APIMWSDLReader(wsdlResourcePath);
Definition definition = apimwsdlReader.getWSDLDefinitionFromByteContent(wsdlContent, false);
byte[] updatedWSDLContent = null;
boolean isTenantFlowStarted = false;
try {
String tenantDomain = MultitenantUtils.getTenantDomain(APIUtil.replaceEmailDomainBack(apiProvider));
if (tenantDomain != null && !MultitenantConstants.SUPER_TENANT_DOMAIN_NAME.equals(tenantDomain)) {
isTenantFlowStarted = true;
PrivilegedCarbonContext.startTenantFlow();
PrivilegedCarbonContext.getThreadLocalCarbonContext().setTenantDomain(tenantDomain, true);
}
RegistryService registryService = ServiceReferenceHolder.getInstance().getRegistryService();
int tenantId;
UserRegistry registry;
try {
tenantId = ServiceReferenceHolder.getInstance().getRealmService().getTenantManager()
.getTenantId(tenantDomain);
APIUtil.loadTenantRegistry(tenantId);
registry = registryService.getGovernanceSystemRegistry(tenantId);
API api = null;
if (!StringUtils.isEmpty(apiName) && !StringUtils.isEmpty(apiVersion)) {
APIIdentifier apiIdentifier = new APIIdentifier(APIUtil.replaceEmailDomain(apiProvider), apiName, apiVersion);
if (log.isDebugEnabled()) {
log.debug("Api identifier for the soap api artifact: " + apiIdentifier + "for api name: "
+ apiName + ", version: " + apiVersion);
}
GenericArtifact apiArtifact = APIUtil.getAPIArtifact(apiIdentifier, registry);
api = APIUtil.getAPI(apiArtifact);
if (log.isDebugEnabled()) {
if (api != null) {
log.debug(
"Api context for the artifact with id:" + api.getId() + " is " + api.getContext());
} else {
log.debug("Api does not exist for api name: " + apiIdentifier.getApiName());
}
}
} else {
handleException("Artifact does not exist in the registry for api name: " + apiName +
" and version: " + apiVersion);
}
if (api != null) {
try {
apimwsdlReader.setServiceDefinition(definition, api, environmentName, environmentType);
if (log.isDebugEnabled()) {
log.debug("Soap api with context:" + api.getContext() + " in " + environmentName
+ " with environment type" + environmentType);
}
updatedWSDLContent = apimwsdlReader.getWSDL(definition);
} catch (APIManagementException e) {
handleException("Error occurred while processing the wsdl for api: [" + api.getId() + "]", e);
}
} else {
handleException("Error while getting API object for wsdl artifact");
}
} catch (UserStoreException e) {
handleException("Error while reading tenant information", e);
} catch (RegistryException e) {
handleException("Error when create registry instance", e);
}
} finally {
if (isTenantFlowStarted) {
PrivilegedCarbonContext.endTenantFlow();
}
}
return updatedWSDLContent;
}
/**
* This method is used to get keys of custom attributes, configured by user
*
* @param userId user name of logged in user
* @return Array of JSONObject, contains keys of attributes
* @throws APIManagementException
*/
public JSONArray getAppAttributesFromConfig(String userId) throws APIManagementException {
String tenantDomain = MultitenantUtils.getTenantDomain(userId);
int tenantId = 0;
try {
tenantId = getTenantId(tenantDomain);
} catch (UserStoreException e) {
handleException("Error in getting tenantId of " + tenantDomain, e);
}
JSONArray applicationAttributes = null;
JSONObject applicationConfig = APIUtil.getAppAttributeKeysFromRegistry(tenantId);
if (applicationConfig != null) {
applicationAttributes = (JSONArray) applicationConfig.get(APIConstants.ApplicationAttributes.ATTRIBUTES);
} else {
APIManagerConfiguration configuration = getAPIManagerConfiguration();
applicationAttributes = configuration.getApplicationAttributes();
}
return applicationAttributes;
}
/**
* This method is used to validate keys of custom attributes, configured by user
*
* @param application
* @param userId user name of logged in user
* @throws APIManagementException
*/
public void checkAppAttributes(Application application, String userId) throws APIManagementException {
JSONArray applicationAttributesFromConfig = getAppAttributesFromConfig(userId);
Map<String, String> applicationAttributes = application.getApplicationAttributes();
List attributeKeys = new ArrayList<String>();
int applicationId = application.getId();
int tenantId = 0;
Map<String, String> newApplicationAttributes = new HashMap<>();
String tenantDomain = MultitenantUtils.getTenantDomain(userId);
try {
tenantId = getTenantId(tenantDomain);
} catch (UserStoreException e) {
handleException("Error in getting tenantId of " + tenantDomain, e);
}
for (Object object : applicationAttributesFromConfig) {
JSONObject attribute = (JSONObject) object;
attributeKeys.add(attribute.get(APIConstants.ApplicationAttributes.ATTRIBUTE));
}
for (Object key : applicationAttributes.keySet()) {
if (!attributeKeys.contains(key)) {
apiMgtDAO.deleteApplicationAttributes((String) key, applicationId);
if (log.isDebugEnabled()) {
log.debug("Removing " + key + "from application - " + application.getName());
}
}
}
for (Object key : attributeKeys) {
if (!applicationAttributes.keySet().contains(key)) {
newApplicationAttributes.put((String) key, "");
}
}
apiMgtDAO.addApplicationAttributes(newApplicationAttributes, applicationId, tenantId);
}
/**
* Store specific implementation of search paginated apis by content
* @param registry
* @param searchQuery
* @param start
* @param end
* @return
* @throws APIManagementException
*/
public Map<String, Object> searchPaginatedAPIsByContent(Registry registry, int tenantId, String searchQuery,
int start, int end, boolean limitAttributes) throws APIManagementException {
Map<String, Object> searchResults = super
.searchPaginatedAPIsByContent(registry, tenantId, searchQuery, start, end, limitAttributes);
return filterMultipleVersionedAPIs(searchResults);
}
@Override
public String getOpenAPIDefinition(Identifier apiId) throws APIManagementException {
String definition = super.getOpenAPIDefinition(apiId);
return APIUtil.removeXMediationScriptsFromSwagger(definition);
}
@Override
public String getOpenAPIDefinitionForEnvironment(Identifier apiId, String environmentName)
throws APIManagementException {
String apiTenantDomain;
String updatedDefinition = null;
String hostWithScheme;
String definition = super.getOpenAPIDefinition(apiId);
APIDefinition oasParser = OASParserUtil.getOASParser(definition);
if (apiId instanceof APIIdentifier) {
API api = getLightweightAPI((APIIdentifier) apiId);
//todo: use get api by id, so no need to set scopes or uri templates
api.setScopes(oasParser.getScopes(definition));
api.setUriTemplates(oasParser.getURITemplates(definition));
apiTenantDomain = MultitenantUtils.getTenantDomain(api.getId().getProviderName());
hostWithScheme = getHostWithSchemeForEnvironment(apiTenantDomain, environmentName);
api.setContext(getBasePath(apiTenantDomain, api.getContext()));
updatedDefinition = oasParser.getOASDefinitionForStore(api, definition, hostWithScheme);
} else if (apiId instanceof APIProductIdentifier) {
APIProduct apiProduct = getAPIProduct((APIProductIdentifier) apiId);
apiTenantDomain = MultitenantUtils.getTenantDomain(apiProduct.getId().getProviderName());
hostWithScheme = getHostWithSchemeForEnvironment(apiTenantDomain, environmentName);
apiProduct.setContext(getBasePath(apiTenantDomain, apiProduct.getContext()));
updatedDefinition = oasParser.getOASDefinitionForStore(apiProduct, definition, hostWithScheme);
}
return updatedDefinition;
}
@Override
public String getOpenAPIDefinitionForLabel(Identifier apiId, String labelName) throws APIManagementException {
List<Label> gatewayLabels;
String updatedDefinition = null;
String hostWithScheme;
String definition = super.getOpenAPIDefinition(apiId);
APIDefinition oasParser = OASParserUtil.getOASParser(definition);
if (apiId instanceof APIIdentifier) {
API api = getLightweightAPI((APIIdentifier) apiId);
gatewayLabels = api.getGatewayLabels();
hostWithScheme = getHostWithSchemeForLabel(gatewayLabels, labelName);
updatedDefinition = oasParser.getOASDefinitionForStore(api, definition, hostWithScheme);
} else if (apiId instanceof APIProductIdentifier) {
APIProduct apiProduct = getAPIProduct((APIProductIdentifier) apiId);
gatewayLabels = apiProduct.getGatewayLabels();
hostWithScheme = getHostWithSchemeForLabel(gatewayLabels, labelName);
updatedDefinition = oasParser.getOASDefinitionForStore(apiProduct, definition, hostWithScheme);
}
return updatedDefinition;
}
public void revokeAPIKey(String apiKey, long expiryTime, String tenantDomain) throws APIManagementException {
String baseUrl = APIConstants.HTTPS_PROTOCOL_URL_PREFIX + System.getProperty(APIConstants.KEYMANAGER_HOSTNAME) + ":" +
System.getProperty(APIConstants.KEYMANAGER_PORT) + APIConstants.UTILITY_WEB_APP_EP;
String apiKeyRevokeEp = baseUrl + APIConstants.API_KEY_REVOKE_PATH;
HttpPost method = new HttpPost(apiKeyRevokeEp);
int tenantId = APIUtil.getTenantIdFromTenantDomain(tenantDomain);
URL keyMgtURL = null;
try {
keyMgtURL = new URL(apiKeyRevokeEp);
APIManagerConfiguration config = ServiceReferenceHolder.getInstance()
.getAPIManagerConfigurationService().getAPIManagerConfiguration();
String username = config.getFirstProperty(APIConstants.API_KEY_VALIDATOR_USERNAME);
String password = config.getFirstProperty(APIConstants.API_KEY_VALIDATOR_PASSWORD);
byte[] credentials = Base64.encodeBase64((username + ":" + password).getBytes
(StandardCharsets.UTF_8));
int keyMgtPort = keyMgtURL.getPort();
String keyMgtProtocol = keyMgtURL.getProtocol();
method.setHeader("Authorization", "Basic " + new String(credentials, StandardCharsets.UTF_8));
HttpClient httpClient = APIUtil.getHttpClient(keyMgtPort, keyMgtProtocol);
JSONObject revokeRequestPayload = new JSONObject();
revokeRequestPayload.put("apikey", apiKey);
revokeRequestPayload.put("expiryTime", expiryTime);
revokeRequestPayload.put("tenantId", tenantId);
StringEntity requestEntity = new StringEntity(revokeRequestPayload.toString());
requestEntity.setContentType(APIConstants.APPLICATION_JSON_MEDIA_TYPE);
method.setEntity(requestEntity);
HttpResponse httpResponse = null;
httpResponse = httpClient.execute(method);
if (HttpStatus.SC_OK != httpResponse.getStatusLine().getStatusCode()) {
log.error("API Key revocation is unsuccessful with token signature " + APIUtil.getMaskedToken(apiKey));
throw new APIManagementException("Error while revoking API Key");
}
} catch (MalformedURLException e) {
String msg = "Error while constructing key manager URL " + apiKeyRevokeEp;
log.error(msg, e);
throw new APIManagementException(msg, e);
} catch (IOException e) {
String msg = "Error while executing the http client " + apiKeyRevokeEp;
log.error(msg, e);
throw new APIManagementException(msg, e);
}
}
private Map<String, Object> filterMultipleVersionedAPIs(Map<String, Object> searchResults) {
Object apiObj = searchResults.get("apis");
ArrayList<Object> apiSet;
ArrayList<APIProduct> apiProductSet = new ArrayList<>();
if (apiObj instanceof Set) {
apiSet = new ArrayList<>(((Set) apiObj));
} else {
apiSet = (ArrayList<Object>) apiObj;
}
//filter store results if displayMultipleVersions is set to false
Boolean displayMultipleVersions = APIUtil.isAllowDisplayMultipleVersions();
if (!displayMultipleVersions) {
SortedSet<API> resultApis = new TreeSet<API>(new APINameComparator());
for (Object result : apiSet) {
if (result instanceof API) {
resultApis.add((API)result);
} else if (result instanceof Map.Entry) {
Map.Entry<Documentation, API> entry = (Map.Entry<Documentation, API>)result;
resultApis.add(entry.getValue());
} else if (result instanceof APIProduct) {
apiProductSet.add((APIProduct)result);
}
}
Map<String, API> latestPublishedAPIs = new HashMap<String, API>();
Comparator<API> versionComparator = new APIVersionComparator();
String key;
//Run the result api list through API version comparator and filter out multiple versions
for (API api : resultApis) {
key = api.getId().getProviderName() + COLON_CHAR + api.getId().getApiName();
API existingAPI = latestPublishedAPIs.get(key);
if (existingAPI != null) {
// If we have already seen an API with the same name, make sure
// this one has a higher version number
if (versionComparator.compare(api, existingAPI) > 0) {
latestPublishedAPIs.put(key, api);
}
} else {
// We haven't seen this API before
latestPublishedAPIs.put(key, api);
}
}
//filter apiSet
ArrayList<Object> tempApiSet = new ArrayList<Object>();
for (Object result : apiSet) {
API api = null;
String mapKey;
API latestAPI;
if (result instanceof API) {
api = (API) result;
mapKey = api.getId().getProviderName() + COLON_CHAR + api.getId().getApiName();
if (latestPublishedAPIs.containsKey(mapKey)) {
latestAPI = latestPublishedAPIs.get(mapKey);
if (latestAPI.getId().equals(api.getId())) {
tempApiSet.add(api);
}
}
} else if (result instanceof Map.Entry) {
Map.Entry<Documentation, API> docEntry = (Map.Entry<Documentation, API>) result;
api = docEntry.getValue();
mapKey = api.getId().getProviderName() + COLON_CHAR + api.getId().getApiName();
if (latestPublishedAPIs.containsKey(mapKey)) {
latestAPI = latestPublishedAPIs.get(mapKey);
if (latestAPI.getId().equals(api.getId())) {
tempApiSet.add(docEntry);
}
}
}
}
apiSet = tempApiSet;
ArrayList<Object> resultAPIandProductSet = new ArrayList<>();
resultAPIandProductSet.addAll(apiSet);
resultAPIandProductSet.addAll(apiProductSet);
resultAPIandProductSet.sort(new ContentSearchResultNameComparator());
if (apiObj instanceof Set) {
searchResults.put("apis", new HashSet<>(resultAPIandProductSet));
} else {
searchResults.put("apis", resultAPIandProductSet);
}
}
return searchResults;
}
/**
* Validate application attributes and remove attributes that does not exist in the config
*
* @param applicationAttributes Application attributes provided
* @param keys Application attribute keys in config
* @return Validated application attributes
*/
private Map<String, String> validateApplicationAttributes(Map<String, String> applicationAttributes, Set keys) {
Iterator iterator = applicationAttributes.keySet().iterator();
while (iterator.hasNext()) {
String key = (String) iterator.next();
if (!keys.contains(key)) {
iterator.remove();
applicationAttributes.remove(key);
}
}
return applicationAttributes;
}
private String getHostWithSchemeForEnvironment(String apiTenantDomain, String environmentName) throws APIManagementException {
Map<String, String> domains = getTenantDomainMappings(apiTenantDomain, APIConstants.API_DOMAIN_MAPPINGS_GATEWAY);
String hostWithScheme = null;
if (!domains.isEmpty()) {
hostWithScheme = domains.get(APIConstants.CUSTOM_URL);
} else {
APIManagerConfiguration config = ServiceReferenceHolder.getInstance()
.getAPIManagerConfigurationService().getAPIManagerConfiguration();
Map<String, Environment> allEnvironments = config.getApiGatewayEnvironments();
Environment environment = allEnvironments.get(environmentName);
if (environment == null) {
handleException(
"Could not find provided environment '" + environmentName);
}
assert environment != null;
String[] hostsWithScheme = environment.getApiGatewayEndpoint().split(",");
for (String url : hostsWithScheme) {
if (url.startsWith(APIConstants.HTTPS_PROTOCOL_URL_PREFIX)) {
hostWithScheme = url;
break;
}
}
if (hostWithScheme == null) {
hostWithScheme = hostsWithScheme[0];
}
}
return hostWithScheme;
}
private String getHostWithSchemeForLabel(List<Label> gatewayLabels, String labelName) throws APIManagementException {
Label labelObj = null;
for (Label label : gatewayLabels) {
if (label.getName().equals(labelName)) {
labelObj = label;
break;
}
}
if (labelObj == null) {
handleException(
"Could not find provided label '" + labelName);
return null;
}
String hostWithScheme = null;
List<String> accessUrls = labelObj.getAccessUrls();
for (String url : accessUrls) {
if (url.startsWith(APIConstants.HTTPS_PROTOCOL_URL_PREFIX)) {
hostWithScheme = url;
break;
}
}
if (hostWithScheme == null) {
hostWithScheme = accessUrls.get(0);
}
return hostWithScheme;
}
private String getBasePath(String apiTenantDomain, String basePath) throws APIManagementException {
Map<String, String> domains =
getTenantDomainMappings(apiTenantDomain, APIConstants.API_DOMAIN_MAPPINGS_GATEWAY);
if (!domains.isEmpty()) {
return basePath.replace("/t/" + apiTenantDomain, "");
}
return basePath;
}
}
| Fix product-apim/issues/6593
| components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/APIConsumerImpl.java | Fix product-apim/issues/6593 | <ide><path>omponents/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/APIConsumerImpl.java
<ide> for (SubscribedAPI subscribedApi : originalSubscribedAPIs) {
<ide> Tier tier = tiers.get(subscribedApi.getTier().getName());
<ide> subscribedApi.getTier().setDisplayName(tier != null ? tier.getDisplayName() : subscribedApi.getTier().getName());
<add> if (tier.getMonetizationAttributes() != null) {
<add> subscribedApi.getTier().setMonetizationAttributes(tier.getMonetizationAttributes());
<add> }
<ide> subscribedAPIs.add(subscribedApi);
<ide> }
<ide> } |
|
JavaScript | mit | ce9b438d2bd7143d81805f9f31efe769d83d5f29 | 0 | jbmorley/gameplay,jbmorley/gameplay,jbmorley/gameplay |
(function($) {
App.Grid = function () {
this.init();
};
App.Grid.MARGIN = 30;
App.Grid.Cell = {
WIDTH: 120,
HEIGHT: 120,
};
App.Grid.MOVE_THRESHOLD = 10;
jQuery.extend(App.Grid.prototype, {
init: function () {
var self = this;
self.identifier = '#list-games';
self.element = $(self.identifier);
self.content = $('#list-games-content');
self.count = 0;
self.rows = 0;
self.width = 0;
self.pageWidth = 0;
self.page = 0;
self.dataSource = {
'count' : function() { return 0; },
'titleForIndex': function(index) { return ''; },
'didSelectItemForRow': function(index) {},
};
self.touchListener = new App.TouchListener(self.identifier, self);
self.touchStart = { x: 0, y: 0};
self.touchDidMove = false;
self.scrolling = false;
self.updateLayout();
$(window).resize(function() {
self.updateLayout();
});
},
reloadData: function() {
var self = this;
self.count = 0;
self.content.html("");
for (var i=0; i<self.dataSource.count(); i++) {
var title = self.dataSource.titleForIndex(i);
self.add(i, title);
}
},
updateLayout: function() {
var self = this;
var rows = Math.floor((self.content.height() + App.Grid.MARGIN) / (App.Grid.Cell.HEIGHT + App.Grid.MARGIN));
var width = Math.floor((self.element.width() + App.Grid.MARGIN) / (App.Grid.Cell.WIDTH + App.Grid.MARGIN));
// Relayout if required.
if ((rows != self.rows) || (width != self.width)) {
self.rows = rows;
self.width = width;
self.pageWidth = self.width * (App.Grid.Cell.WIDTH + App.Grid.MARGIN);
self.page = 0;
self.content.css('left', 0);
self.reloadData();
}
},
add: function(index, title) {
var self = this;
var row = self.count % self.rows;
var col = Math.floor(self.count / self.rows);
var game = $('<div class="game">');
game.html(title)
game.css('top', (App.Grid.Cell.HEIGHT + App.Grid.MARGIN) * row);
game.css('left', (App.Grid.Cell.WIDTH + App.Grid.MARGIN) * col);
game.css('height', App.Grid.Cell.HEIGHT);
game.css('width', App.Grid.Cell.WIDTH);
self.content.append(game);
self.count += 1;
},
// Convert a position in container coordinates to content coordinates.
contentPosition: function(position) {
var self = this;
var contentPosition = {
x: position.x + (self.pageWidth * self.page),
y: position.y
};
return contentPosition;
},
// Determine with which item a touch position intersects.
// undefined if the touch does not intersect an item.
itemForPosition: function(position) {
var self = this;
// Work out which item it is.
var contentPosition = self.contentPosition(position);
var x = Math.floor(contentPosition.x / (App.Grid.Cell.WIDTH + App.Grid.MARGIN));
var y = Math.floor(contentPosition.y / (App.Grid.Cell.HEIGHT + App.Grid.MARGIN));
// TODO Take into account the dead space of the margins.
var index = (x * self.rows) + y;
self.dataSource.didSelectItemForRow(index);
},
next: function() {
var self = this;
var max = Math.floor(self.count / (self.rows * self.width));
if (self.page < max) {
self.setPage(self.page += 1);
}
},
previous: function() {
var self = this;
if (self.page > 0) {
self.setPage(self.page -= 1);
}
},
setPage: function(page) {
var self = this;
self.page = page;
self.content.animate({
'left': -1 * (self.page * self.pageWidth)
}, 300, function() {
});
},
// Returns the distance between two points.
distance: function(a, b) {
var self = this;
var x = a.x - b.x;
var y = a.y - b.y;
return Math.sqrt(x*x + y*y);
},
// Returns the horizontal distance between two points.
distanceX: function(a, b) {
var self = this;
return Math.abs(a.x - b.x);
},
// Returns the vertical distance between two points.
distanceY: function(a, b) {
var self = this;
return Math.abs(a.y - b.y);
},
// Returns true if the touch event represents a move from the
// original touchStart position.
touchIsMove: function(position) {
var self = this;
var distance = self.distanceX(self.touchStart, position);
return (distance >= App.Grid.MOVE_THRESHOLD);
},
onTouchEvent: function(state, position) {
var self = this;
// TODO Don't break on multiple touches.
if (state === App.Control.Touch.START) {
self.offset = self.content.offset();
self.touchStart = position;
self.touchDidMove = false;
self.scrolling = true;
} else if (state === App.Control.Touch.MOVE) {
if (self.scrolling) {
// Update the move status.
self.touchDidMove = self.touchDidMove | self.touchIsMove(position);
// Update the position.
var left = position.x - self.touchStart.x
self.content.offset({
'left': self.offset.left + left,
'top': self.offset.top
});
}
} else if (state === App.Control.Touch.END) {
if (self.scrolling) {
// Update the move status.
self.touchDidMove = self.touchDidMove | self.touchIsMove(position);
// Update the position.
var left = position.x - self.touchStart.x
self.content.offset({
'left': self.offset.left + left,
'top': self.offset.top
});
if (self.touchDidMove) {
// Snap to a page.
var offset = self.content.offset().left - (self.pageWidth / 2);
var p = Math.floor(-1 * offset / self.pageWidth);
self.setPage(p);
} else {
self.item = self.itemForPosition(position);
}
// Finish scrolling.
// TODO Consider if this is the right place.
self.scrolling = false;
}
}
},
});
})(jQuery);
| src/js/grid.js |
(function($) {
App.Grid = function () {
this.init();
};
App.Grid.MARGIN = 30;
App.Grid.Cell = {
WIDTH: 120,
HEIGHT: 120,
};
jQuery.extend(App.Grid.prototype, {
init: function () {
var self = this;
self.identifier = '#list-games';
self.element = $(self.identifier);
self.content = $('#list-games-content');
self.count = 0;
self.rows = 0;
self.width = 0;
self.page = 0;
self.dataSource = {
'count' : function() { return 0; },
'titleForIndex': function(index) { return ''; },
'didSelectItemForRow': function(index) {},
};
self.touchListener = new App.TouchListener(self.identifier, self);
self.scrolling = false;
self.updateLayout();
$(window).resize(function() {
self.updateLayout();
});
},
reloadData: function() {
var self = this;
self.count = 0;
self.content.html("");
for (var i=0; i<self.dataSource.count(); i++) {
var title = self.dataSource.titleForIndex(i);
self.add(i, title);
}
},
updateLayout: function() {
var self = this;
var rows = Math.floor((self.content.height() + App.Grid.MARGIN) / (App.Grid.Cell.HEIGHT + App.Grid.MARGIN));
var width = Math.floor((self.element.width() + App.Grid.MARGIN) / (App.Grid.Cell.WIDTH + App.Grid.MARGIN));
// Relayout if required.
if ((rows != self.rows) || (width != self.width)) {
self.rows = rows;
self.width = width;
self.page = 0;
self.content.css('left', 0);
self.reloadData();
}
},
add: function(index, title) {
var self = this;
var row = self.count % self.rows;
var col = Math.floor(self.count / self.rows);
var game = $('<div class="game">');
game.html(title)
game.css('top', (App.Grid.Cell.HEIGHT + App.Grid.MARGIN) * row);
game.css('left', (App.Grid.Cell.WIDTH + App.Grid.MARGIN) * col);
game.css('height', App.Grid.Cell.HEIGHT);
game.css('width', App.Grid.Cell.WIDTH);
game.click(function() {
self.dataSource.didSelectItemForRow(index);
});
self.content.append(game);
self.count += 1;
},
next: function() {
var self = this;
var max = Math.floor(self.count / (self.rows * self.width));
if (self.page < max) {
self.setPage(self.page += 1);
}
},
previous: function() {
var self = this;
if (self.page > 0) {
self.setPage(self.page -= 1);
}
},
setPage: function(page) {
var self = this;
self.page = page;
self.content.animate({
'left': -1 * (self.page * self.pageWidth())
}, 300, function() {
});
},
pageWidth: function() {
var self = this;
return self.width * (App.Grid.Cell.WIDTH + App.Grid.MARGIN)
},
onTouchEvent: function(state, position) {
var self = this;
// TODO Don't break on multiple touches.
if (state === App.Control.Touch.START) {
self.offset = self.content.offset();
self.touchStart = position;
self.scrolling = true;
} else if (state === App.Control.Touch.MOVE) {
if (self.scrolling) {
// Updae the position.
var left = position.x - self.touchStart.x
self.content.offset({
'left': self.offset.left + left,
'top': self.offset.top
});
}
} else if (state === App.Control.Touch.END) {
if (self.scrolling) {
// Update the position.
var left = position.x - self.touchStart.x
self.content.offset({
'left': self.offset.left + left,
'top': self.offset.top
});
// Snap to a page.
var offset = self.content.offset().left - (self.pageWidth() / 2);
var p = Math.floor(-1 * offset / self.pageWidth());
self.setPage(p);
console.log("Page: " + p);
// Finish scrolling.
self.scrolling = false;
}
}
},
});
})(jQuery);
| Cooperative support for tapping items and scrolling the grid.
| src/js/grid.js | Cooperative support for tapping items and scrolling the grid. | <ide><path>rc/js/grid.js
<ide> HEIGHT: 120,
<ide> };
<ide>
<add> App.Grid.MOVE_THRESHOLD = 10;
<add>
<ide> jQuery.extend(App.Grid.prototype, {
<ide>
<ide> init: function () {
<ide> self.count = 0;
<ide> self.rows = 0;
<ide> self.width = 0;
<add> self.pageWidth = 0;
<ide> self.page = 0;
<ide> self.dataSource = {
<ide> 'count' : function() { return 0; },
<ide> 'didSelectItemForRow': function(index) {},
<ide> };
<ide> self.touchListener = new App.TouchListener(self.identifier, self);
<add> self.touchStart = { x: 0, y: 0};
<add> self.touchDidMove = false;
<ide> self.scrolling = false;
<ide>
<ide> self.updateLayout();
<ide> if ((rows != self.rows) || (width != self.width)) {
<ide> self.rows = rows;
<ide> self.width = width;
<add> self.pageWidth = self.width * (App.Grid.Cell.WIDTH + App.Grid.MARGIN);
<ide> self.page = 0;
<ide> self.content.css('left', 0);
<ide> self.reloadData();
<ide> game.css('height', App.Grid.Cell.HEIGHT);
<ide> game.css('width', App.Grid.Cell.WIDTH);
<ide>
<del> game.click(function() {
<del> self.dataSource.didSelectItemForRow(index);
<del> });
<del>
<ide> self.content.append(game);
<ide> self.count += 1;
<ide>
<add> },
<add>
<add> // Convert a position in container coordinates to content coordinates.
<add> contentPosition: function(position) {
<add> var self = this;
<add> var contentPosition = {
<add> x: position.x + (self.pageWidth * self.page),
<add> y: position.y
<add> };
<add> return contentPosition;
<add> },
<add>
<add> // Determine with which item a touch position intersects.
<add> // undefined if the touch does not intersect an item.
<add> itemForPosition: function(position) {
<add> var self = this;
<add>
<add> // Work out which item it is.
<add> var contentPosition = self.contentPosition(position);
<add> var x = Math.floor(contentPosition.x / (App.Grid.Cell.WIDTH + App.Grid.MARGIN));
<add> var y = Math.floor(contentPosition.y / (App.Grid.Cell.HEIGHT + App.Grid.MARGIN));
<add>
<add> // TODO Take into account the dead space of the margins.
<add>
<add> var index = (x * self.rows) + y;
<add>
<add> self.dataSource.didSelectItemForRow(index);
<add>
<ide> },
<ide>
<ide> next: function() {
<ide> var self = this;
<ide> self.page = page;
<ide> self.content.animate({
<del> 'left': -1 * (self.page * self.pageWidth())
<add> 'left': -1 * (self.page * self.pageWidth)
<ide> }, 300, function() {
<ide> });
<ide> },
<ide>
<del> pageWidth: function() {
<del> var self = this;
<del> return self.width * (App.Grid.Cell.WIDTH + App.Grid.MARGIN)
<add> // Returns the distance between two points.
<add> distance: function(a, b) {
<add> var self = this;
<add> var x = a.x - b.x;
<add> var y = a.y - b.y;
<add> return Math.sqrt(x*x + y*y);
<add> },
<add>
<add> // Returns the horizontal distance between two points.
<add> distanceX: function(a, b) {
<add> var self = this;
<add> return Math.abs(a.x - b.x);
<add> },
<add>
<add> // Returns the vertical distance between two points.
<add> distanceY: function(a, b) {
<add> var self = this;
<add> return Math.abs(a.y - b.y);
<add> },
<add>
<add> // Returns true if the touch event represents a move from the
<add> // original touchStart position.
<add> touchIsMove: function(position) {
<add> var self = this;
<add> var distance = self.distanceX(self.touchStart, position);
<add> return (distance >= App.Grid.MOVE_THRESHOLD);
<ide> },
<ide>
<ide> onTouchEvent: function(state, position) {
<ide>
<ide> self.offset = self.content.offset();
<ide> self.touchStart = position;
<add> self.touchDidMove = false;
<ide> self.scrolling = true;
<ide>
<ide> } else if (state === App.Control.Touch.MOVE) {
<ide> if (self.scrolling) {
<ide>
<del> // Updae the position.
<del> var left = position.x - self.touchStart.x
<del> self.content.offset({
<del> 'left': self.offset.left + left,
<del> 'top': self.offset.top
<del> });
<del>
<del> }
<del> } else if (state === App.Control.Touch.END) {
<del> if (self.scrolling) {
<add> // Update the move status.
<add> self.touchDidMove = self.touchDidMove | self.touchIsMove(position);
<ide>
<ide> // Update the position.
<ide> var left = position.x - self.touchStart.x
<ide> 'top': self.offset.top
<ide> });
<ide>
<del> // Snap to a page.
<del> var offset = self.content.offset().left - (self.pageWidth() / 2);
<del> var p = Math.floor(-1 * offset / self.pageWidth());
<del> self.setPage(p);
<del> console.log("Page: " + p);
<add> }
<add> } else if (state === App.Control.Touch.END) {
<add> if (self.scrolling) {
<add>
<add> // Update the move status.
<add> self.touchDidMove = self.touchDidMove | self.touchIsMove(position);
<add>
<add> // Update the position.
<add> var left = position.x - self.touchStart.x
<add> self.content.offset({
<add> 'left': self.offset.left + left,
<add> 'top': self.offset.top
<add> });
<add>
<add> if (self.touchDidMove) {
<add>
<add> // Snap to a page.
<add> var offset = self.content.offset().left - (self.pageWidth / 2);
<add> var p = Math.floor(-1 * offset / self.pageWidth);
<add> self.setPage(p);
<add>
<add> } else {
<add>
<add> self.item = self.itemForPosition(position);
<add>
<add> }
<ide>
<ide> // Finish scrolling.
<add> // TODO Consider if this is the right place.
<ide> self.scrolling = false;
<ide> }
<ide> } |
|
JavaScript | mit | 4ca9dc6c82b3cd50cb343a5dd7088e78679d4e9f | 0 | s0ph1e/node-css-url-parser | var embeddedRegexp = /data:(.*?);base64,/;
var commentRegexp = /\/\*([\s\S]*?)\*\//g;
var urlsRegexp = /((?:@import\s+)?url\s*\(['"]?)(\S*?)(['"]?\s*\))|(@import\s+['"]?)([^;'"]+)/ig;
function isEmbedded (src) {
return embeddedRegexp.test(src);
}
function getUrls (text) {
var urls = [];
var urlMatch, url;
text = text.replace(commentRegexp, '');
while (urlMatch = urlsRegexp.exec(text)) {
// Match 2 group if '[@import] url(path)', match 5 group if '@import path'
url = urlMatch[2] || urlMatch[5];
if (url && !isEmbedded(url) && urls.indexOf(url) === -1) {
urls.push(url);
}
}
return urls;
}
module.exports = getUrls;
| lib/css-parser.js | var embeddedRegexp = /data:(.*?);base64,/;
var commentRegexp = /\/\*([\s\S]*?)\*\//g;
var urlsRegexp = /((?:@import\s+)?url\s*\(['"]?)(\S*?)(['"]?\s*\))|(@import\s+['"]?)([^;'"]+)/ig;
function isEmbedded (src) {
return embeddedRegexp.test(src);
}
function getUrls (text) {
var urls = [];
var urlMatch, url, isEmbeddedUrl, isDuplicatedUrl;
text = text.replace(commentRegexp, '');
while (urlMatch = urlsRegexp.exec(text)) {
// Match 2 group if '[@import] url(path)', match 5 group if '@import path'
url = urlMatch[2] || urlMatch[5];
isEmbeddedUrl = isEmbedded(url);
isDuplicatedUrl = urls.indexOf(url) !== -1;
if (url && !isEmbeddedUrl && !isDuplicatedUrl) {
urls.push(url);
}
}
return urls;
}
module.exports = getUrls;
| Check isEmbedded and isDuplicate only when needed
| lib/css-parser.js | Check isEmbedded and isDuplicate only when needed | <ide><path>ib/css-parser.js
<ide>
<ide> function getUrls (text) {
<ide> var urls = [];
<del> var urlMatch, url, isEmbeddedUrl, isDuplicatedUrl;
<add> var urlMatch, url;
<ide>
<ide> text = text.replace(commentRegexp, '');
<ide>
<ide> // Match 2 group if '[@import] url(path)', match 5 group if '@import path'
<ide> url = urlMatch[2] || urlMatch[5];
<ide>
<del> isEmbeddedUrl = isEmbedded(url);
<del> isDuplicatedUrl = urls.indexOf(url) !== -1;
<del>
<del> if (url && !isEmbeddedUrl && !isDuplicatedUrl) {
<add> if (url && !isEmbedded(url) && urls.indexOf(url) === -1) {
<ide> urls.push(url);
<ide> }
<ide> } |
|
JavaScript | mit | d2fdbe6d402d8ae26a25d83f99b3172b286114dc | 0 | kpfefferle/ember-cli-deploy-cloudfront | /* eslint-env node */
var CoreObject = require('core-object');
var RSVP = require('rsvp');
var uuid = require('uuid');
module.exports = CoreObject.extend({
init: function(options) {
this._super();
this._plugin = options.plugin;
var AWS = require('aws-sdk');
const accessKeyId = this._plugin.readConfig('accessKeyId');
const secretAccessKey = this._plugin.readConfig('secretAccessKey');
const profile = this._plugin.readConfig('profile');
var awsOptions = {
region: this._plugin.readConfig('region')
};
if (this._plugin.readConfig('sessionToken')) {
awsOptions.sessionToken = this._plugin.readConfig('sessionToken');
}
if (accessKeyId && secretAccessKey) {
awsOptions.accessKeyId = accessKeyId;
awsOptions.secretAccessKey = secretAccessKey;
}
if (profile) {
this._plugin.log('Using AWS profile from config', { verbose: true });
AWS.config.credentials = new AWS.SharedIniFileCredentials({ profile });
}
this._client = this._plugin.readConfig('cloudfrontClient') || new AWS.CloudFront(awsOptions);
},
invalidate: function(options) {
options = options || {};
return new RSVP.Promise(function(resolve, reject) {
var distribution = options.distribution;
var objectPaths = options.objectPaths || [];
if (typeof objectPaths === 'string') {
objectPaths = [objectPaths];
}
var params = {
DistributionId: distribution,
InvalidationBatch: {
CallerReference: uuid.v4(),
Paths: {
Quantity: objectPaths.length,
Items: objectPaths
}
}
};
this._client.createInvalidation(params, function(error, data) {
if (error) {
reject(error);
} else {
resolve(data.Invalidation.Id);
}
}.bind(this));
}.bind(this));
}
});
| lib/cloudfront.js | /* eslint-env node */
var CoreObject = require('core-object');
var RSVP = require('rsvp');
var uuid = require('uuid');
module.exports = CoreObject.extend({
init: function(options) {
this._super();
this._plugin = options.plugin;
var AWS = require('aws-sdk');
const accessKeyId = this._plugin.readConfig('accessKeyId');
const secretAccessKey = this._plugin.readConfig('secretAccessKey');
const profile = this.plugin.readConfig('profile');
var awsOptions = {
region: this._plugin.readConfig('region')
};
if (this._plugin.readConfig('sessionToken')) {
awsOptions.sessionToken = this._plugin.readConfig('sessionToken');
}
if (accessKeyId && secretAccessKey) {
awsOptions.accessKeyId = accessKeyId;
awsOptions.secretAccessKey = secretAccessKey;
}
if (profile) {
this._plugin.log('Using AWS profile from config', { verbose: true });
AWS.config.credentials = new AWS.SharedIniFileCredentials({ profile });
}
this._client = this._plugin.readConfig('cloudfrontClient') || new AWS.CloudFront(awsOptions);
},
invalidate: function(options) {
options = options || {};
return new RSVP.Promise(function(resolve, reject) {
var distribution = options.distribution;
var objectPaths = options.objectPaths || [];
if (typeof objectPaths === 'string') {
objectPaths = [objectPaths];
}
var params = {
DistributionId: distribution,
InvalidationBatch: {
CallerReference: uuid.v4(),
Paths: {
Quantity: objectPaths.length,
Items: objectPaths
}
}
};
this._client.createInvalidation(params, function(error, data) {
if (error) {
reject(error);
} else {
resolve(data.Invalidation.Id);
}
}.bind(this));
}.bind(this));
}
});
| adds _to this.plugin
| lib/cloudfront.js | adds _to this.plugin | <ide><path>ib/cloudfront.js
<ide> var AWS = require('aws-sdk');
<ide> const accessKeyId = this._plugin.readConfig('accessKeyId');
<ide> const secretAccessKey = this._plugin.readConfig('secretAccessKey');
<del> const profile = this.plugin.readConfig('profile');
<add> const profile = this._plugin.readConfig('profile');
<ide>
<ide> var awsOptions = {
<ide> region: this._plugin.readConfig('region') |
|
JavaScript | mit | 89760df21c3b47cdd5a57e7ea27881c5c53eaefd | 0 | vadimsva/waitMe,vadimsva/waitMe | /*
waitMe - 1.08 [20.02.15]
Author: vadimsva
Github: https://github.com/vadimsva/waitMe
*/
(function($) {
$.fn.waitMe = function(method) {
return this.each(function() {
var elem = $(this),
elemClass = 'waitMe',
waitMe_text,
effectObj,
effectElemCount,
createSubElem = false,
specificAttr = 'background-color',
addStyle = '',
effectElemHTML = '',
waitMeObj,
containerSize,
elemSize,
_options,
currentID;
var methods = {
init : function() {
var _defaults = {
effect: 'bounce',
text: '',
bg: 'rgba(255,255,255,0.7)',
color: '#000',
sizeW: '',
sizeH: '',
source: ''
};
_options = $.extend(_defaults, method);
currentID = new Date().getMilliseconds();
waitMeObj = $('<div class="' + elemClass + '" data-waitme_id="' + currentID + '"></div>');
var size = 'width:' + _options.sizeW + ';height:' + _options.sizeH;
switch (_options.effect) {
case 'none':
effectElemCount = 0;
break;
case 'bounce':
effectElemCount = 3;
containerSize = '';
elemSize = size;
break;
case 'rotateplane':
effectElemCount = 1;
containerSize = '';
elemSize = size;
break;
case 'stretch':
effectElemCount = 5;
containerSize = '';
elemSize = size;
break;
case 'orbit':
effectElemCount = 2;
containerSize = size;
elemSize = '';
break;
case 'roundBounce':
effectElemCount = 12;
containerSize = size;
elemSize = '';
break;
case 'win8':
effectElemCount = 5;
createSubElem = true;
containerSize = size;
elemSize = size;
break;
case 'win8_linear':
effectElemCount = 5;
createSubElem = true;
containerSize = size;
elemSize = '';
break;
case 'ios':
effectElemCount = 12;
containerSize = size;
elemSize = '';
break;
case 'facebook':
effectElemCount = 3;
containerSize = '';
elemSize = size;
break;
case 'rotation':
effectElemCount = 1;
specificAttr = 'border-color';
containerSize = '';
elemSize = size;
break;
case 'timer':
effectElemCount = 2;
addStyle = 'border-color:' + _options.color;
containerSize = size;
elemSize = '';
break;
case 'pulse':
effectElemCount = 1;
specificAttr = 'border-color';
containerSize = '';
elemSize = size;
break;
case 'progressBar':
effectElemCount = 1;
containerSize = '';
elemSize = size;
break;
case 'bouncePulse':
effectElemCount = 3;
containerSize = '';
elemSize = size;
break;
case 'img':
effectElemCount = 1;
containerSize = '';
elemSize = size;
break;
}
if (_options.sizeW == '' && _options.sizeH == '') {
elemSize = '';
containerSize = '';
}
if (containerSize != '' && addStyle != '') {
addStyle = ';' + addStyle;
}
if (effectElemCount > 0) {
effectObj = $('<div class="' + elemClass + '_progress ' + _options.effect + '"></div>');
if(_options.effect == 'img') {
effectElemHTML = '<img src="' + _options.source + '" style="' + elemSize + '">';
} else {
for (var i = 1; i <= effectElemCount; ++i) {
if (createSubElem) {
effectElemHTML += '<div class="' + elemClass + '_progress_elem' + i + '" style="' + elemSize + '"><div style="' + specificAttr +':' + _options.color +'"></div></div>';
} else {
effectElemHTML += '<div class="' + elemClass + '_progress_elem' + i + '" style="' + specificAttr + ':' + _options.color +';' + elemSize + '"></div>';
}
}
}
effectObj = $('<div class="' + elemClass + '_progress ' + _options.effect + '" style="' + containerSize + addStyle + '">' + effectElemHTML + '</div>');
}
if (_options.text) {
waitMe_text = $('<div class="' + elemClass + '_text" style="color:' + _options.color + '">' + _options.text + '</div>');
}
if (elem.find('> .' + elemClass)) {
elem.find('> .' + elemClass).remove();
}
waitMeDivObj = $('<div class="' + elemClass + '_content"></div>');
waitMeDivObj.append(effectObj, waitMe_text);
waitMeObj.append(waitMeDivObj);
if (elem[0].tagName == 'HTML') {
elem = $('body');
}
elem.addClass(elemClass + '_container').attr('data-waitme_id', currentID).append(waitMeObj);
elem.find('> .' + elemClass).css({background: _options.bg});
elem.find('.' + elemClass + '_content').css({marginTop: - elem.find('.' + elemClass + '_content').outerHeight() / 2 + 'px'});
},
hide : function() {
waitMeClose();
}
};
function waitMeClose() {
var currentID = elem.attr('data-waitme_id');
elem.removeClass(elemClass + '_container').removeAttr('data-waitme_id');
elem.find('.' + elemClass + '[data-waitme_id="' + currentID + '"]').remove();
}
if (methods[method]) {
return methods[method].apply( this, Array.prototype.slice.call(arguments, 1));
} else if (typeof method === 'object' || ! method) {
return methods.init.apply(this, arguments);
}
$.event.special.destroyed = {
remove: function(o) {
if (o.handler) {
o.handler()
}
}
}
});
}
$(window).load(function(){
$('body.waitMe_body').find('.waitMe_container').remove();
$('body.waitMe_body').removeClass('waitMe_body');
});
})(jQuery);
| waitMe.js | /*
waitMe - 1.07 [11.02.15]
Author: vadimsva
Github: https://github.com/vadimsva/waitMe
*/
(function($) {
$.fn.waitMe = function(method) {
return this.each(function() {
var elem = $(this),
elemClass = 'waitMe',
waitMe_text,
effectObj,
effectElemCount,
createSubElem = false,
specificAttr = 'background-color',
addStyle = '',
effectElemHTML = '',
waitMeObj,
containerSize,
elemSize,
_options,
currentID;
var methods = {
init : function() {
var _defaults = {
effect: 'bounce',
text: '',
bg: 'rgba(255,255,255,0.7)',
color: '#000',
sizeW: '',
sizeH: '',
source: ''
};
_options = $.extend(_defaults, method);
currentID = new Date().getMilliseconds();
waitMeObj = $('<div class="' + elemClass + '" data-waitme_id="' + currentID + '"></div>');
var size = 'width:' + _options.sizeW + ';height:' + _options.sizeH;
switch (_options.effect) {
case 'none':
effectElemCount = 0;
break;
case 'bounce':
effectElemCount = 3;
containerSize = '';
elemSize = size;
break;
case 'rotateplane':
effectElemCount = 1;
containerSize = '';
elemSize = size;
break;
case 'stretch':
effectElemCount = 5;
containerSize = '';
elemSize = size;
break;
case 'orbit':
effectElemCount = 2;
containerSize = size;
elemSize = '';
break;
case 'roundBounce':
effectElemCount = 12;
containerSize = size;
elemSize = '';
break;
case 'win8':
effectElemCount = 5;
createSubElem = true;
containerSize = size;
elemSize = size;
break;
case 'win8_linear':
effectElemCount = 5;
createSubElem = true;
containerSize = size;
elemSize = '';
break;
case 'ios':
effectElemCount = 12;
containerSize = size;
elemSize = '';
break;
case 'facebook':
effectElemCount = 3;
containerSize = '';
elemSize = size;
break;
case 'rotation':
effectElemCount = 1;
specificAttr = 'border-color';
containerSize = '';
elemSize = size;
break;
case 'timer':
effectElemCount = 2;
addStyle = 'border-color:' + _options.color;
containerSize = size;
elemSize = '';
break;
case 'pulse':
effectElemCount = 1;
specificAttr = 'border-color';
containerSize = '';
elemSize = size;
break;
case 'progressBar':
effectElemCount = 1;
containerSize = '';
elemSize = size;
break;
case 'bouncePulse':
effectElemCount = 3;
containerSize = '';
elemSize = size;
break;
case 'img':
effectElemCount = 1;
containerSize = '';
elemSize = size;
break;
}
if (_options.sizeW == '' && _options.sizeH == '') {
elemSize = '';
containerSize = '';
}
if (containerSize != '' && addStyle != '') {
addStyle = ';' + addStyle;
}
if (effectElemCount > 0) {
effectObj = $('<div class="' + elemClass + '_progress ' + _options.effect + '"></div>');
if(_options.effect == 'img') {
effectElemHTML = '<img src="' + _options.source + '" style="' + elemSize + '">';
} else {
for (var i = 1; i <= effectElemCount; ++i) {
if (createSubElem) {
effectElemHTML += '<div class="' + elemClass + '_progress_elem' + i + '" style="' + elemSize + '"><div style="' + specificAttr +':' + _options.color +'"></div></div>';
} else {
effectElemHTML += '<div class="' + elemClass + '_progress_elem' + i + '" style="' + specificAttr + ':' + _options.color +';' + elemSize + '"></div>';
}
}
}
effectObj = $('<div class="' + elemClass + '_progress ' + _options.effect + '" style="' + containerSize + addStyle + '">' + effectElemHTML + '</div>');
}
if (_options.text) {
waitMe_text = $('<div class="' + elemClass + '_text" style="color:' + _options.color + '">' + _options.text + '</div>');
}
if (elem.find('> .' + elemClass)) {
elem.find('> .' + elemClass).remove();
}
waitMeDivObj = $('<div class="' + elemClass + '_content"></div>');
waitMeDivObj.append(effectObj, waitMe_text);
waitMeObj.append(waitMeDivObj);
if (elem[0].tagName == 'HTML') {
elem = $('body');
}
elem.addClass(elemClass + '_container').attr('data-waitme_id', currentID).append(waitMeObj);
elem.find('> .' + elemClass).css({background: _options.bg});
elem.find('.' + elemClass + '_content').css({marginTop: - elem.find('.' + elemClass + '_content').outerHeight() / 2 + 'px'});
},
hide : function() {
waitMeClose();
}
};
function waitMeClose() {
var currentID = elem.attr('data-waitme_id');
elem.removeClass(elemClass + '_container').removeAttr('data-waitme_id');
elem.find('.' + elemClass + '[data-waitme_id="' + currentID + '"]').remove();
}
if (methods[method]) {
return methods[method].apply( this, Array.prototype.slice.call(arguments, 1));
} else if (typeof method === 'object' || ! method) {
return methods.init.apply(this, arguments);
}
$.event.special.destroyed = {
remove: function(o) {
if (o.handler) {
o.handler()
}
}
}
});
}
})(jQuery);
| 20.02.15 | waitMe.js | 20.02.15 | <ide><path>aitMe.js
<ide> /*
<del>waitMe - 1.07 [11.02.15]
<add>waitMe - 1.08 [20.02.15]
<ide> Author: vadimsva
<ide> Github: https://github.com/vadimsva/waitMe
<ide> */
<ide> });
<ide>
<ide> }
<add> $(window).load(function(){
<add> $('body.waitMe_body').find('.waitMe_container').remove();
<add> $('body.waitMe_body').removeClass('waitMe_body');
<add> });
<ide> })(jQuery); |
|
Java | apache-2.0 | e11f19023a30b1bac45c1444a35b64f06eed8eeb | 0 | ImmobilienScout24/deadcode4j | package de.is24.deadcode4j.plugin;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugins.annotations.Mojo;
/**
* Finds dead (i.e. unused) code. In contrast to <code>find</code>, no phase is executed.<br/>
* This goal is deprecated; use <code>find-only</code> instead.
*
* @see FindDeadCodeMojo
* @see FindDeadCodeOnlyMojo
* @since 1.4
* @deprecated use {@link FindDeadCodeOnlyMojo} instead
*/
@Mojo(name = "find-without-packaging", aggregator = true, threadSafe = true, requiresProject = true)
@Deprecated
public class FindDeadCodeWithoutPackagingMojo extends FindDeadCodeOnlyMojo {
@Override
public void execute() throws MojoExecutionException {
getLog().warn("##########################################################");
getLog().warn("This goal is deprecated and will be removed in the future!");
getLog().warn(" Instead, use the goal [find-only].");
getLog().warn("##########################################################");
super.execute();
}
}
| src/main/java/de/is24/deadcode4j/plugin/FindDeadCodeWithoutPackagingMojo.java | package de.is24.deadcode4j.plugin;
import org.apache.maven.plugins.annotations.Mojo;
/**
* Finds dead (i.e. unused) code. In contrast to <code>find</code>, no phase is executed.<br/>
* This goal is deprecated; use <code>find-only</code> instead.
*
* @see FindDeadCodeMojo
* @see FindDeadCodeOnlyMojo
* @since 1.4
* @deprecated use {@link FindDeadCodeOnlyMojo} instead
*/
@Mojo(name = "find-without-packaging", aggregator = true, threadSafe = true, requiresProject = true)
@Deprecated
public class FindDeadCodeWithoutPackagingMojo extends FindDeadCodeOnlyMojo {
}
| add deprecation warning
| src/main/java/de/is24/deadcode4j/plugin/FindDeadCodeWithoutPackagingMojo.java | add deprecation warning | <ide><path>rc/main/java/de/is24/deadcode4j/plugin/FindDeadCodeWithoutPackagingMojo.java
<ide> package de.is24.deadcode4j.plugin;
<ide>
<add>import org.apache.maven.plugin.MojoExecutionException;
<ide> import org.apache.maven.plugins.annotations.Mojo;
<ide>
<ide> /**
<ide> @Deprecated
<ide> public class FindDeadCodeWithoutPackagingMojo extends FindDeadCodeOnlyMojo {
<ide>
<add> @Override
<add> public void execute() throws MojoExecutionException {
<add> getLog().warn("##########################################################");
<add> getLog().warn("This goal is deprecated and will be removed in the future!");
<add> getLog().warn(" Instead, use the goal [find-only].");
<add> getLog().warn("##########################################################");
<add> super.execute();
<add> }
<add>
<ide> } |
|
Java | mit | 267d77e748c22ce653ab7c4aea46953cd036d8f2 | 0 | meandor/rechnernetze | package de.haw.rnp.chat.controller;
import de.haw.rnp.chat.model.Message;
import de.haw.rnp.chat.model.User;
import de.haw.rnp.chat.networkmanager.Node;
import de.haw.rnp.chat.networkmanager.OutgoingChatProtocolMessageHandler;
import de.haw.rnp.chat.networkmanager.OutgoingMessageHandler;
import de.haw.rnp.chat.networkmanager.tasks.ServerAwaitConnectionsTask;
import de.haw.rnp.chat.networkmanager.tasks.ServerCloseTask;
import de.haw.rnp.chat.networkmanager.tasks.ServerReadTask;
import de.haw.rnp.chat.networkmanager.tasks.ServerStartTask;
import de.haw.rnp.chat.view.IView;
import de.haw.rnp.chat.view.ViewController;
import javafx.application.Platform;
import javafx.stage.Stage;
import java.net.InetAddress;
import java.net.UnknownHostException;
import java.util.ArrayList;
import java.util.concurrent.*;
/**
* This class represents the Controller of the mvc pattern. The controller is a singleton and has a thread pool.
*/
public class Controller implements IControllerService {
private User loggedInUser;
private Node server;
private IView view;
private ExecutorService executor;
private ServerAwaitConnectionsTask waitingConnection;
private BlockingQueue<User> userList;
private BlockingQueue<Message> messageQueue;
static private Controller controller;
private OutgoingMessageHandler outgoingMessageHandler;
static public Controller getInstance() {
if (controller == null) {
controller = new Controller();
}
return controller;
}
private Controller() {
this.messageQueue = new LinkedBlockingQueue<>();
this.userList = new LinkedBlockingQueue<>();
/*try {
User u = new User("asd", 8080, InetAddress.getByName("10.0.0.1"));
this.userList.add(u);
} catch (UnknownHostException e) {
e.printStackTrace();
}*/
this.executor = Executors.newCachedThreadPool();
this.outgoingMessageHandler = new OutgoingChatProtocolMessageHandler(this);
}
/**
* Starts the view
*
* @param stage Stage for the view (JavaFx)
*/
public void startView(Stage stage) {
this.view = new ViewController(stage, this);
stage.setOnCloseRequest(t -> {
if (server != null) {
ServerCloseTask closeTask = new ServerCloseTask(this.server);
Future<Boolean> closed = this.outgoingMessageHandler.getExecutor().submit(closeTask);
this.waitingConnection.stop();
this.executor.shutdownNow();
}
Platform.exit();
});
}
@Override
public boolean addMessageToQueue(Message message) {
if (this.messageQueue.offer(message)) {
this.view.appendMessage(message.getSender().getName(), message.getText());
return true;
}
return false;
}
@Override
public boolean addUser(User u) {
if (userList.offer(u)) {
if (this.view != null) {
this.view.updateUserlist(this.userList);
}
return true;
}
return false;
}
@Override
public boolean removeUser(User u) {
if (userList.remove(u)) {
this.view.updateUserlist(this.userList);
return true;
}
return false;
}
@Override
public ExecutorService getExecutor() {
return executor;
}
@Override
public boolean login(String userName, InetAddress address, InetAddress localAddress, int port, int localport) {
this.loggedInUser = this.outgoingMessageHandler.login(address, port, userName, localAddress, localport);
this.userList.offer(this.loggedInUser);
return (this.loggedInUser != null);
}
@Override
public void logout() {
User activePeer = null;
try {
activePeer = userList.take();
} catch (InterruptedException e) {
e.printStackTrace();
}
if (activePeer != null) {
InetAddress activePeerHostName = activePeer.getHostName();
int activePeerPort = activePeer.getPort();
outgoingMessageHandler.logout(activePeerHostName, activePeerPort, this.loggedInUser.getHostName(), this.loggedInUser.getPort());
}
}
@Override
public boolean sendMessage(String recipient, String message) {
ArrayList<User> usersList = new ArrayList<>();
String[] recipients = recipient.split(",");
for (String u : recipients) {
User user = getUserByName(u);
if (user != null) {
usersList.add(user);
}
}
if (usersList.size() > 0) {
Message ms = new Message(message, loggedInUser, usersList);
outgoingMessageHandler.sendMessage(ms);
return true;
}
return false;
}
@Override
public boolean startServer(InetAddress hostName, int port) {
this.server = this.outgoingMessageHandler.getFactory().createNode(hostName, port);
ServerStartTask startServerTask = new ServerStartTask(server, this);
Future<Boolean> serverStarted = this.executor.submit(startServerTask);
try {
if (serverStarted.get()) {
ServerReadTask readTask = new ServerReadTask(server);
this.executor.execute(readTask);
this.waitingConnection = new ServerAwaitConnectionsTask(server);
this.executor.execute(this.waitingConnection);
return true;
}
} catch (InterruptedException | ExecutionException e) {
e.printStackTrace();
}
return false;
}
@Override
public User getLoggedInUser() {
return loggedInUser;
}
@Override
public void setLoggedInUser(User loggedInUser) {
this.loggedInUser = loggedInUser;
}
@Override
public BlockingQueue<User> getUserList() {
return userList;
}
public BlockingQueue getMessageQueue() {
return messageQueue;
}
/**
* Finds the user by the given username
*
* @param userName String username of the user
* @return User if any found that matches the username
*/
private User getUserByName(String userName) {
for (User user : userList) {
if (user.getName().equals(userName))
return user;
}
return null;
}
}
| exercise02/src/main/java/de/haw/rnp/chat/controller/Controller.java | package de.haw.rnp.chat.controller;
import de.haw.rnp.chat.model.Message;
import de.haw.rnp.chat.model.User;
import de.haw.rnp.chat.networkmanager.Node;
import de.haw.rnp.chat.networkmanager.OutgoingChatProtocolMessageHandler;
import de.haw.rnp.chat.networkmanager.OutgoingMessageHandler;
import de.haw.rnp.chat.networkmanager.tasks.ServerAwaitConnectionsTask;
import de.haw.rnp.chat.networkmanager.tasks.ServerCloseTask;
import de.haw.rnp.chat.networkmanager.tasks.ServerReadTask;
import de.haw.rnp.chat.networkmanager.tasks.ServerStartTask;
import de.haw.rnp.chat.view.IView;
import de.haw.rnp.chat.view.ViewController;
import javafx.application.Platform;
import javafx.stage.Stage;
import java.net.InetAddress;
import java.net.UnknownHostException;
import java.util.ArrayList;
import java.util.concurrent.*;
/**
* This class represents the Controller of the mvc pattern. The controller is a singleton and has a thread pool.
*/
public class Controller implements IControllerService {
private User loggedInUser;
private Node server;
private IView view;
private ExecutorService executor;
private ServerAwaitConnectionsTask waitingConnection;
private BlockingQueue<User> userList;
private BlockingQueue<Message> messageQueue;
static private Controller controller;
private OutgoingMessageHandler outgoingMessageHandler;
static public Controller getInstance() {
if (controller == null) {
controller = new Controller();
}
return controller;
}
private Controller() {
this.messageQueue = new LinkedBlockingQueue<>();
this.userList = new LinkedBlockingQueue<>();
/*try {
User u = new User("asd", 8080, InetAddress.getByName("10.0.0.1"));
this.userList.add(u);
} catch (UnknownHostException e) {
e.printStackTrace();
}*/
this.executor = Executors.newCachedThreadPool();
this.outgoingMessageHandler = new OutgoingChatProtocolMessageHandler(this);
}
/**
* Starts the view
*
* @param stage Stage for the view (JavaFx)
*/
public void startView(Stage stage) {
this.view = new ViewController(stage, this);
stage.setOnCloseRequest(t -> {
if (server != null) {
ServerCloseTask closeTask = new ServerCloseTask(this.server);
Future<Boolean> closed = this.outgoingMessageHandler.getExecutor().submit(closeTask);
this.waitingConnection.stop();
this.executor.shutdownNow();
}
Platform.exit();
});
}
@Override
public boolean addMessageToQueue(Message message) {
if (this.messageQueue.offer(message)) {
this.view.appendMessage(message.getSender().getName(), message.getText());
return true;
}
return false;
}
@Override
public boolean addUser(User u) {
if (userList.offer(u)) {
this.view.updateUserlist(this.userList);
return true;
}
return false;
}
@Override
public boolean removeUser(User u) {
if (userList.remove(u)) {
this.view.updateUserlist(this.userList);
return true;
}
return false;
}
@Override
public ExecutorService getExecutor() {
return executor;
}
@Override
public boolean login(String userName, InetAddress address, InetAddress localAddress, int port, int localport) {
this.loggedInUser = this.outgoingMessageHandler.login(address, port, userName, localAddress, localport);
this.userList.offer(this.loggedInUser);
return (this.loggedInUser != null);
}
@Override
public void logout() {
User activePeer = null;
try {
activePeer = userList.take();
} catch (InterruptedException e) {
e.printStackTrace();
}
if (activePeer != null) {
InetAddress activePeerHostName = activePeer.getHostName();
int activePeerPort = activePeer.getPort();
outgoingMessageHandler.logout(activePeerHostName, activePeerPort, this.loggedInUser.getHostName(), this.loggedInUser.getPort());
}
}
@Override
public boolean sendMessage(String recipient, String message) {
ArrayList<User> usersList = new ArrayList<>();
String[] recipients = recipient.split(",");
for (String u : recipients) {
User user = getUserByName(u);
if (user != null) {
usersList.add(user);
}
}
if (usersList.size() > 0) {
Message ms = new Message(message, loggedInUser, usersList);
outgoingMessageHandler.sendMessage(ms);
return true;
}
return false;
}
@Override
public boolean startServer(InetAddress hostName, int port) {
this.server = this.outgoingMessageHandler.getFactory().createNode(hostName, port);
ServerStartTask startServerTask = new ServerStartTask(server, this);
Future<Boolean> serverStarted = this.executor.submit(startServerTask);
try {
if (serverStarted.get()) {
ServerReadTask readTask = new ServerReadTask(server);
this.executor.execute(readTask);
this.waitingConnection = new ServerAwaitConnectionsTask(server);
this.executor.execute(this.waitingConnection);
return true;
}
} catch (InterruptedException | ExecutionException e) {
e.printStackTrace();
}
return false;
}
@Override
public User getLoggedInUser() {
return loggedInUser;
}
@Override
public void setLoggedInUser(User loggedInUser) {
this.loggedInUser = loggedInUser;
}
@Override
public BlockingQueue<User> getUserList() {
return userList;
}
public BlockingQueue getMessageQueue() {
return messageQueue;
}
/**
* Finds the user by the given username
*
* @param userName String username of the user
* @return User if any found that matches the username
*/
private User getUserByName(String userName) {
for (User user : userList) {
if (user.getName().equals(userName))
return user;
}
return null;
}
}
| Nullpointer exception
| exercise02/src/main/java/de/haw/rnp/chat/controller/Controller.java | Nullpointer exception | <ide><path>xercise02/src/main/java/de/haw/rnp/chat/controller/Controller.java
<ide> @Override
<ide> public boolean addUser(User u) {
<ide> if (userList.offer(u)) {
<del> this.view.updateUserlist(this.userList);
<add> if (this.view != null) {
<add> this.view.updateUserlist(this.userList);
<add> }
<ide> return true;
<ide> }
<ide> return false; |
|
Java | apache-2.0 | 8b8fee704523e4c93546fca2a4fd4f970193215d | 0 | froop/checkdep | package checkdep.check;
/**
* 不必要な制約.
* 存在しない依存を制約として定義している場合は無駄なので知らせる.
*/
class NeedlessConstraintException extends RuntimeException {
private static final long serialVersionUID = 1L;
public NeedlessConstraintException(String message) {
super(message);
}
}
| src/main/java/checkdep/check/NeedlessConstraintException.java | package checkdep.check;
/**
* 不必要な制約.
* 存在しない依存を制約として定義している場合は無駄なので知らせる.
*/
public class NeedlessConstraintException extends RuntimeException {
private static final long serialVersionUID = 1L;
public NeedlessConstraintException(String message) {
super(message);
}
}
| refactoring class scope | src/main/java/checkdep/check/NeedlessConstraintException.java | refactoring class scope | <ide><path>rc/main/java/checkdep/check/NeedlessConstraintException.java
<ide> * 不必要な制約.
<ide> * 存在しない依存を制約として定義している場合は無駄なので知らせる.
<ide> */
<del>public class NeedlessConstraintException extends RuntimeException {
<add>class NeedlessConstraintException extends RuntimeException {
<ide> private static final long serialVersionUID = 1L;
<ide>
<ide> public NeedlessConstraintException(String message) { |
|
Java | apache-2.0 | 7ddd8bbe554870823c039c32281c7e86402db03a | 0 | openengsb/openengsb,openengsb/openengsb,openengsb/openengsb,openengsb/openengsb,openengsb/openengsb,openengsb/openengsb | /**
Copyright 2010 OpenEngSB Division, Vienna University of Technology
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 org.openengsb.ui.web;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.swing.tree.DefaultMutableTreeNode;
import javax.swing.tree.DefaultTreeModel;
import javax.swing.tree.TreeModel;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior;
import org.apache.wicket.ajax.form.AjaxFormSubmitBehavior;
import org.apache.wicket.markup.html.WebMarkupContainer;
import org.apache.wicket.markup.html.form.ChoiceRenderer;
import org.apache.wicket.markup.html.form.DropDownChoice;
import org.apache.wicket.markup.html.form.Form;
import org.apache.wicket.markup.html.link.BookmarkablePageLink;
import org.apache.wicket.markup.html.tree.BaseTree;
import org.apache.wicket.markup.html.tree.LinkTree;
import org.apache.wicket.markup.repeater.RepeatingView;
import org.apache.wicket.model.PropertyModel;
import org.apache.wicket.spring.injection.annot.SpringBean;
import org.openengsb.core.config.DomainProvider;
import org.openengsb.ui.web.editor.BeanArgumentPanel;
import org.openengsb.ui.web.editor.SimpleArgumentPanel;
import org.openengsb.ui.web.model.MethodCall;
import org.openengsb.ui.web.model.MethodId;
import org.openengsb.ui.web.model.ServiceId;
import org.openengsb.ui.web.service.DomainService;
import org.osgi.framework.ServiceReference;
@SuppressWarnings("serial")
public class TestClient extends BasePage {
private static Log log = LogFactory.getLog(TestClient.class);
@SpringBean
private DomainService services;
private final DropDownChoice<MethodId> methodList;
private final MethodCall call = new MethodCall();
private final RepeatingView argumentList;
private final WebMarkupContainer argumentListContainer;
// private final DropDownChoice<ServiceId> serviceList;
private final LinkTree serviceList;
public TestClient() {
Form<Object> form = new Form<Object>("methodCallForm");
form.add(new AjaxFormSubmitBehavior(form, "onsubmit") {
@Override
protected void onError(AjaxRequestTarget target) {
throw new RuntimeException("submit error");
}
@Override
protected void onSubmit(AjaxRequestTarget target) {
performCall();
call.getArguments().clear();
call.setMethod(null);
call.setService(null);
populateMethodList();
target.addComponent(serviceList);
target.addComponent(methodList);
target.addComponent(argumentListContainer);
}
});
serviceList = new LinkTree("serviceList", createModel()) {
@Override
protected void onNodeLinkClicked(Object node, BaseTree tree, AjaxRequestTarget target) {
DefaultMutableTreeNode mnode = (DefaultMutableTreeNode) node;
call.setService((ServiceId) mnode.getUserObject());
populateMethodList();
target.addComponent(methodList);
log.info(node);
log.info((node.getClass()));
};
};
// serviceList = new DropDownChoice<ServiceId>("serviceList", new
// PropertyModel<ServiceId>(call, "service"),
// getServiceInstances());
serviceList.setOutputMarkupId(true);
// serviceList.add(new AjaxFormComponentUpdatingBehavior("onchange") {
// @Override
// protected void onUpdate(AjaxRequestTarget target) {
// log.info("onchange triggered");
// call.setMethod(null);
// populateMethodList();
// target.addComponent(methodList);
// }
// });
form.add(serviceList);
methodList = new DropDownChoice<MethodId>("methodList");
methodList.setModel(new PropertyModel<MethodId>(call, "method"));
methodList.setChoiceRenderer(new ChoiceRenderer<MethodId>());
methodList.setOutputMarkupId(true);
methodList.add(new AjaxFormComponentUpdatingBehavior("onchange") {
@Override
protected void onUpdate(AjaxRequestTarget target) {
populateArgumentList();
target.addComponent(argumentListContainer);
}
});
form.add(methodList);
argumentListContainer = new WebMarkupContainer("argumentListContainer");
argumentListContainer.setOutputMarkupId(true);
argumentList = new RepeatingView("argumentList");
argumentList.setOutputMarkupId(true);
argumentListContainer.add(argumentList);
form.add(argumentListContainer);
add(form);
this.add(new BookmarkablePageLink<Index>("index", Index.class));
}
private TreeModel createModel() {
DefaultMutableTreeNode node = new DefaultMutableTreeNode("Select Instance");
TreeModel model = new DefaultTreeModel(node);
log.info("adding domains");
for (DomainProvider provider : services.domains()) {
log.info("adding " + provider.getName());
addDomainProvider(provider, node);
}
log.info("done adding domains;");
return model;
}
private void addDomainProvider(DomainProvider provider, DefaultMutableTreeNode node) {
DefaultMutableTreeNode providerNode = new DefaultMutableTreeNode(provider.getName());
node.add(providerNode);
// for (ServiceManager manager : services.serviceManagersForDomain(provider.getDomainInterface())) {
// log.info("found servicemanager");
// DefaultMutableTreeNode serviceManagerNode = new DefaultMutableTreeNode(manager.getDescriptor().getName());
// providerNode.add(serviceManagerNode);
for (ServiceReference serviceReference : this.services.serviceReferencesForConnector(provider
.getDomainInterface())) {
String id = (String) serviceReference.getProperty("id");
if (id != null) {
ServiceId serviceId = new ServiceId();
serviceId.setServiceId(id);
serviceId.setServiceClass(services.getService(serviceReference).getClass().getName());
DefaultMutableTreeNode referenceNode = new DefaultMutableTreeNode(serviceId, false);
providerNode.add(referenceNode);
}
}
// }
}
protected void performCall() {
Object service = getService(call.getService());
MethodId mid = call.getMethod();
Method m;
try {
m = service.getClass().getMethod(mid.getName(), mid.getArgumentTypesAsClasses());
} catch (SecurityException e) {
throw new IllegalStateException(e);
} catch (NoSuchMethodException e) {
throw new IllegalArgumentException(e);
}
try {
Object result = m.invoke(service, call.getArgumentsAsArray());
log.info("result: " + result);
} catch (IllegalAccessException e) {
throw new IllegalArgumentException(e);
} catch (InvocationTargetException e) {
throw new IllegalArgumentException(e);
}
}
protected void populateArgumentList() {
argumentList.removeAll();
Method m = findMethod();
List<ArgumentModel> arguments = new ArrayList<ArgumentModel>();
call.setArguments(arguments);
int i = 0;
for (Class<?> p : m.getParameterTypes()) {
ArgumentModel argModel = new ArgumentModel(i, p, null);
arguments.add(argModel);
if (p.isPrimitive() || p.equals(String.class)) {
SimpleArgumentPanel arg = new SimpleArgumentPanel("arg" + i, argModel);
argumentList.add(arg);
} else {
Map<String, String> beanAttrs = new HashMap<String, String>();
argModel.setValue(beanAttrs);
argModel.setBean(true);
BeanArgumentPanel arg = new BeanArgumentPanel("arg" + i, argModel, beanAttrs);
argumentList.add(arg);
}
i++;
}
call.setArguments(arguments);
}
private void populateMethodList() {
ServiceId service = call.getService();
List<Method> methods = getServiceMethods(service);
List<MethodId> methodChoices = new ArrayList<MethodId>();
for (Method m : methods) {
methodChoices.add(new MethodId(m));
}
methodList.setChoices(methodChoices);
log.info("populating list with: " + methodChoices);
}
private List<Method> getServiceMethods(ServiceId service) {
if (service == null) {
return Collections.emptyList();
}
Object serviceObject = getService(service);
log.info("retrieved service Object of type " + serviceObject.getClass().getName());
List<Method> methods = MethodUtil.getServiceMethods(serviceObject);
return methods;
}
private Object getService(ServiceId service) {
Object serviceObject = services.getService(service.getServiceClass(), service.getServiceId());
return serviceObject;
}
private Method findMethod() {
ServiceId service = call.getService();
Object serviceObject = getService(service);
Class<?> serviceClass = serviceObject.getClass();
MethodId methodId = call.getMethod();
try {
return serviceClass.getMethod(methodId.getName(), methodId.getArgumentTypesAsClasses());
} catch (SecurityException e) {
throw new IllegalStateException(e);
} catch (NoSuchMethodException e) {
throw new IllegalArgumentException(e);
}
}
}
| ui/web/src/main/java/org/openengsb/ui/web/TestClient.java | /**
Copyright 2010 OpenEngSB Division, Vienna University of Technology
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 org.openengsb.ui.web;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.swing.tree.DefaultMutableTreeNode;
import javax.swing.tree.DefaultTreeModel;
import javax.swing.tree.TreeModel;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.ajax.form.AjaxFormComponentUpdatingBehavior;
import org.apache.wicket.ajax.form.AjaxFormSubmitBehavior;
import org.apache.wicket.markup.html.WebMarkupContainer;
import org.apache.wicket.markup.html.form.ChoiceRenderer;
import org.apache.wicket.markup.html.form.DropDownChoice;
import org.apache.wicket.markup.html.form.Form;
import org.apache.wicket.markup.html.link.BookmarkablePageLink;
import org.apache.wicket.markup.html.tree.BaseTree;
import org.apache.wicket.markup.html.tree.LinkTree;
import org.apache.wicket.markup.repeater.RepeatingView;
import org.apache.wicket.model.PropertyModel;
import org.apache.wicket.spring.injection.annot.SpringBean;
import org.openengsb.core.config.DomainProvider;
import org.openengsb.ui.web.editor.BeanArgumentPanel;
import org.openengsb.ui.web.editor.SimpleArgumentPanel;
import org.openengsb.ui.web.model.MethodCall;
import org.openengsb.ui.web.model.MethodId;
import org.openengsb.ui.web.model.ServiceId;
import org.openengsb.ui.web.service.DomainService;
import org.osgi.framework.ServiceReference;
@SuppressWarnings("serial")
public class TestClient extends BasePage {
private static Log log = LogFactory.getLog(TestClient.class);
@SpringBean
private DomainService services;
private final DropDownChoice<MethodId> methodList;
private final MethodCall call = new MethodCall();
private final RepeatingView argumentList;
private final WebMarkupContainer argumentListContainer;
// private final DropDownChoice<ServiceId> serviceList;
private final LinkTree serviceList;
public TestClient() {
Form<Object> form = new Form<Object>("methodCallForm");
form.add(new AjaxFormSubmitBehavior(form, "onsubmit") {
@Override
protected void onError(AjaxRequestTarget target) {
throw new RuntimeException("submit error");
}
@Override
protected void onSubmit(AjaxRequestTarget target) {
performCall();
call.getArguments().clear();
call.setMethod(null);
call.setService(null);
populateMethodList();
target.addComponent(serviceList);
target.addComponent(methodList);
target.addComponent(argumentListContainer);
}
});
serviceList = new LinkTree("serviceList", createModel()) {
@Override
protected void onNodeLinkClicked(Object node, BaseTree tree, AjaxRequestTarget target) {
DefaultMutableTreeNode mnode = (DefaultMutableTreeNode) node;
call.setService((ServiceId) mnode.getUserObject());
populateMethodList();
target.addComponent(methodList);
log.info(node);
log.info((node.getClass()));
};
};
// serviceList = new DropDownChoice<ServiceId>("serviceList", new
// PropertyModel<ServiceId>(call, "service"),
// getServiceInstances());
serviceList.setOutputMarkupId(true);
// serviceList.add(new AjaxFormComponentUpdatingBehavior("onchange") {
// @Override
// protected void onUpdate(AjaxRequestTarget target) {
// log.info("onchange triggered");
// call.setMethod(null);
// populateMethodList();
// target.addComponent(methodList);
// }
// });
form.add(serviceList);
methodList = new DropDownChoice<MethodId>("methodList");
methodList.setModel(new PropertyModel<MethodId>(call, "method"));
methodList.setChoiceRenderer(new ChoiceRenderer<MethodId>());
methodList.setOutputMarkupId(true);
methodList.add(new AjaxFormComponentUpdatingBehavior("onchange") {
@Override
protected void onUpdate(AjaxRequestTarget target) {
populateArgumentList();
target.addComponent(argumentListContainer);
}
});
form.add(methodList);
argumentListContainer = new WebMarkupContainer("argumentListContainer");
argumentListContainer.setOutputMarkupId(true);
argumentList = new RepeatingView("argumentList");
argumentList.setOutputMarkupId(true);
argumentListContainer.add(argumentList);
form.add(argumentListContainer);
add(form);
this.add(new BookmarkablePageLink<Index>("index", Index.class));
}
private TreeModel createModel() {
DefaultMutableTreeNode node = new DefaultMutableTreeNode("Select Instance");
TreeModel model = new DefaultTreeModel(node);
log.info("adding domains");
for (DomainProvider provider : services.domains()) {
log.info("adding " + provider.getName());
addDomainProvider(provider, node);
}
log.info("done adding domains;");
return model;
}
private void addDomainProvider(DomainProvider provider, DefaultMutableTreeNode node) {
DefaultMutableTreeNode providerNode = new DefaultMutableTreeNode(provider.getName());
node.add(providerNode);
// for (ServiceManager manager : services.serviceManagersForDomain(provider.getDomainInterface())) {
// log.info("found servicemanager");
// DefaultMutableTreeNode serviceManagerNode = new DefaultMutableTreeNode(manager.getDescriptor().getName());
// providerNode.add(serviceManagerNode);
for (ServiceReference serviceReference : this.services.serviceReferencesForConnector(provider
.getDomainInterface())) {
String id = (String) serviceReference.getProperty("id");
if (id != null) {
ServiceId serviceId = new ServiceId();
serviceId.setServiceId(id);
serviceId.setServiceClass(services.getService(serviceReference).getClass().getName());
DefaultMutableTreeNode referenceNode = new DefaultMutableTreeNode(serviceId, false);
providerNode.add(referenceNode);
}
}
// }
}
protected void performCall() {
Object service = getService(call.getService());
MethodId mid = call.getMethod();
Method m;
try {
m = service.getClass().getMethod(mid.getName(), mid.getArgumentTypesAsClasses());
} catch (SecurityException e) {
throw new IllegalStateException(e);
} catch (NoSuchMethodException e) {
throw new IllegalArgumentException(e);
}
try {
Object result = m.invoke(service, call.getArgumentsAsArray());
log.info("result: " + result);
} catch (IllegalAccessException e) {
throw new IllegalArgumentException(e);
} catch (InvocationTargetException e) {
throw new IllegalArgumentException(e);
}
}
protected void populateArgumentList() {
argumentList.removeAll();
Method m = findMethod();
List<ArgumentModel> arguments = new ArrayList<ArgumentModel>();
call.setArguments(arguments);
int i = 0;
for (Class<?> p : m.getParameterTypes()) {
ArgumentModel argModel = new ArgumentModel(i, p, null);
arguments.add(argModel);
if (p.isPrimitive() || p.equals(String.class)) {
SimpleArgumentPanel arg = new SimpleArgumentPanel("arg" + i, argModel);
argumentList.add(arg);
} else {
Map<String, String> beanAttrs = new HashMap<String, String>();
argModel.setValue(beanAttrs);
argModel.setBean(true);
BeanArgumentPanel arg = new BeanArgumentPanel("arg" + i, argModel, beanAttrs);
argumentList.add(arg);
}
i++;
}
call.setArguments(arguments);
}
private List<ServiceId> getServiceInstances() {
List<ServiceId> result = new ArrayList<ServiceId>();
for (ServiceReference s : services.getManagedServiceInstances()) {
String id = (String) s.getProperty("id");
if (id != null) {
ServiceId serviceId = new ServiceId();
serviceId.setServiceId(id);
serviceId.setServiceClass(services.getService(s).getClass().getName());
result.add(serviceId);
}
}
return result;
}
private void populateMethodList() {
ServiceId service = call.getService();
List<Method> methods = getServiceMethods(service);
List<MethodId> methodChoices = new ArrayList<MethodId>();
for (Method m : methods) {
methodChoices.add(new MethodId(m));
}
methodList.setChoices(methodChoices);
log.info("populating list with: " + methodChoices);
}
private List<Method> getServiceMethods(ServiceId service) {
if (service == null) {
return Collections.emptyList();
}
Object serviceObject = getService(service);
log.info("retrieved service Object of type " + serviceObject.getClass().getName());
List<Method> methods = MethodUtil.getServiceMethods(serviceObject);
return methods;
}
private Object getService(ServiceId service) {
Object serviceObject = services.getService(service.getServiceClass(), service.getServiceId());
return serviceObject;
}
private Method findMethod() {
ServiceId service = call.getService();
Object serviceObject = getService(service);
Class<?> serviceClass = serviceObject.getClass();
MethodId methodId = call.getMethod();
try {
return serviceClass.getMethod(methodId.getName(), methodId.getArgumentTypesAsClasses());
} catch (SecurityException e) {
throw new IllegalStateException(e);
} catch (NoSuchMethodException e) {
throw new IllegalArgumentException(e);
}
}
}
| removed unused method
Signed-off-by: Andreas Pieber <[email protected]>
| ui/web/src/main/java/org/openengsb/ui/web/TestClient.java | removed unused method | <ide><path>i/web/src/main/java/org/openengsb/ui/web/TestClient.java
<ide> call.setArguments(arguments);
<ide> }
<ide>
<del> private List<ServiceId> getServiceInstances() {
<del> List<ServiceId> result = new ArrayList<ServiceId>();
<del> for (ServiceReference s : services.getManagedServiceInstances()) {
<del> String id = (String) s.getProperty("id");
<del> if (id != null) {
<del> ServiceId serviceId = new ServiceId();
<del> serviceId.setServiceId(id);
<del> serviceId.setServiceClass(services.getService(s).getClass().getName());
<del> result.add(serviceId);
<del> }
<del> }
<del> return result;
<del> }
<del>
<ide> private void populateMethodList() {
<ide> ServiceId service = call.getService();
<ide> List<Method> methods = getServiceMethods(service); |
|
Java | apache-2.0 | 4bc85037771e26bf6a384f4d2801db82633b803d | 0 | Ali-Razmjoo/zaproxy,thc202/zaproxy,Ali-Razmjoo/zaproxy,psiinon/zaproxy,meitar/zaproxy,psiinon/zaproxy,thc202/zaproxy,gmaran23/zaproxy,meitar/zaproxy,meitar/zaproxy,zaproxy/zaproxy,gmaran23/zaproxy,gmaran23/zaproxy,thc202/zaproxy,kingthorin/zaproxy,Ali-Razmjoo/zaproxy,zapbot/zaproxy,psiinon/zaproxy,psiinon/zaproxy,Ali-Razmjoo/zaproxy,kingthorin/zaproxy,gmaran23/zaproxy,thc202/zaproxy,meitar/zaproxy,thc202/zaproxy,meitar/zaproxy,psiinon/zaproxy,thc202/zaproxy,zapbot/zaproxy,thc202/zaproxy,zapbot/zaproxy,kingthorin/zaproxy,kingthorin/zaproxy,Ali-Razmjoo/zaproxy,zaproxy/zaproxy,kingthorin/zaproxy,zapbot/zaproxy,meitar/zaproxy,gmaran23/zaproxy,kingthorin/zaproxy,zapbot/zaproxy,meitar/zaproxy,zapbot/zaproxy,Ali-Razmjoo/zaproxy,zaproxy/zaproxy,zapbot/zaproxy,psiinon/zaproxy,psiinon/zaproxy,kingthorin/zaproxy,zaproxy/zaproxy,zaproxy/zaproxy,zaproxy/zaproxy,gmaran23/zaproxy,zaproxy/zaproxy,Ali-Razmjoo/zaproxy,gmaran23/zaproxy,meitar/zaproxy | /*
* Zed Attack Proxy (ZAP) and its related class files.
*
* ZAP is an HTTP/HTTPS proxy for assessing web application security.
*
* Copyright 2018 The ZAP Development Team
*
* 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 org.zaproxy.zap.authentication;
import java.awt.Component;
import java.awt.GridBagLayout;
import java.awt.event.FocusAdapter;
import java.awt.event.FocusEvent;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.function.UnaryOperator;
import javax.swing.DefaultComboBoxModel;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.JLabel;
import javax.swing.JList;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.border.Border;
import javax.swing.border.EmptyBorder;
import javax.swing.plaf.basic.BasicComboBoxRenderer;
import net.sf.json.JSONObject;
import org.apache.commons.configuration.Configuration;
import org.apache.commons.configuration.ConfigurationException;
import org.apache.commons.httpclient.URI;
import org.apache.commons.httpclient.URIException;
import org.apache.log4j.Logger;
import org.parosproxy.paros.Constant;
import org.parosproxy.paros.control.Control;
import org.parosproxy.paros.db.DatabaseException;
import org.parosproxy.paros.db.RecordContext;
import org.parosproxy.paros.extension.ExtensionHook;
import org.parosproxy.paros.model.Model;
import org.parosproxy.paros.model.Session;
import org.parosproxy.paros.model.SiteNode;
import org.parosproxy.paros.network.HttpHeader;
import org.parosproxy.paros.network.HttpMalformedHeaderException;
import org.parosproxy.paros.network.HttpMessage;
import org.parosproxy.paros.network.HttpRequestHeader;
import org.parosproxy.paros.network.HttpSender;
import org.parosproxy.paros.view.SessionDialog;
import org.parosproxy.paros.view.View;
import org.zaproxy.zap.authentication.UsernamePasswordAuthenticationCredentials.UsernamePasswordAuthenticationCredentialsOptionsPanel;
import org.zaproxy.zap.extension.anticsrf.AntiCsrfToken;
import org.zaproxy.zap.extension.anticsrf.ExtensionAntiCSRF;
import org.zaproxy.zap.extension.api.ApiDynamicActionImplementor;
import org.zaproxy.zap.extension.api.ApiException;
import org.zaproxy.zap.extension.api.ApiResponse;
import org.zaproxy.zap.extension.authentication.AuthenticationAPI;
import org.zaproxy.zap.extension.authentication.ContextAuthenticationPanel;
import org.zaproxy.zap.extension.users.ExtensionUserManagement;
import org.zaproxy.zap.model.Context;
import org.zaproxy.zap.model.NameValuePair;
import org.zaproxy.zap.session.SessionManagementMethod;
import org.zaproxy.zap.session.WebSession;
import org.zaproxy.zap.users.User;
import org.zaproxy.zap.utils.ApiUtils;
import org.zaproxy.zap.utils.ZapTextField;
import org.zaproxy.zap.view.LayoutHelper;
import org.zaproxy.zap.view.NodeSelectDialog;
import org.zaproxy.zap.view.popup.PopupMenuItemContext;
import org.zaproxy.zap.view.popup.PopupMenuItemSiteNodeContextMenuFactory;
/**
* An {@link AuthenticationMethodType} where the Users are authenticated by POSTing the username and password.
* <p>
* The actual format of the POST body is defined by extending classes.
*
* @since TODO add version
*/
public abstract class PostBasedAuthenticationMethodType extends AuthenticationMethodType {
private static final String CONTEXT_CONFIG_AUTH_FORM = AuthenticationMethod.CONTEXT_CONFIG_AUTH + ".form";
private static final String CONTEXT_CONFIG_AUTH_FORM_LOGINURL = CONTEXT_CONFIG_AUTH_FORM + ".loginurl";
private static final String CONTEXT_CONFIG_AUTH_FORM_LOGINBODY = CONTEXT_CONFIG_AUTH_FORM + ".loginbody";
private static final String POST_DATA_LABEL = Constant.messages
.getString("authentication.method.pb.field.label.postData");
private static final String POST_DATA_REQUIRED_LABEL = Constant.messages
.getString("authentication.method.pb.field.label.postDataRequired");
private static final String USERNAME_PARAM_LABEL = Constant.messages
.getString("authentication.method.pb.field.label.usernameParam");
private static final String PASSWORD_PARAM_LABEL = Constant.messages
.getString("authentication.method.pb.field.label.passwordParam");
private static final String LOGIN_URL_LABEL = Constant.messages
.getString("authentication.method.pb.field.label.loginUrl");
private static final String AUTH_DESCRIPTION = Constant.messages
.getString("authentication.method.pb.field.label.description");
private static final Logger LOGGER = Logger.getLogger(PostBasedAuthenticationMethodType.class);
private final String methodName;
private final int methodIdentifier;
private final String apiMethodName;
private final String labelPopupMenuKey;
private final boolean postDataRequired;
/**
* Constructs a {@code PostBasedAuthenticationMethodType} with the given data.
*
* @param methodName the name of the authentication method, should not be {@code null}.
* @param methodIdentifier the ID of the authentication method.
* @param apiMethodName the API name of the authentication method, should not be {@code null}.
* @param labelPopupMenuKey the name of the menu item that flags the request as login.
* @param postDataRequired {@code true} if the POST data is required by the authentication method, {@code false} otherwise.
*/
protected PostBasedAuthenticationMethodType(
String methodName,
int methodIdentifier,
String apiMethodName,
String labelPopupMenuKey,
boolean postDataRequired) {
this.methodName = methodName;
this.methodIdentifier = methodIdentifier;
this.apiMethodName = apiMethodName;
this.labelPopupMenuKey = labelPopupMenuKey;
this.postDataRequired = postDataRequired;
}
/**
* An {@link AuthenticationMethod} where the Users are authenticated by POSTing the username and password.
* <p>
* The actual format of the POST body is defined by extending classes.
*/
public abstract class PostBasedAuthenticationMethod extends AuthenticationMethod {
private static final String LOGIN_ICON_RESOURCE = "/resource/icon/fugue/door-open-green-arrow.png";
public static final String MSG_USER_PATTERN = "{%username%}";
public static final String MSG_PASS_PATTERN = "{%password%}";
private final String contentType;
private final UnaryOperator<String> paramEncoder;
private HttpSender httpSender;
private SiteNode markedLoginSiteNode;
private SiteNode loginSiteNode = null;
private String loginRequestURL;
private String loginRequestBody;
private ExtensionAntiCSRF extAntiCsrf;
/**
* Constructs a {@code PostBasedAuthenticationMethod} with the given data.
*
* @param contentType the value of the Content-Type, to be added to the authentication message.
* @param paramEncoder the encoder to be used on the authentication credentials set in the POST body.
* @param authenticationMethod the authentication method to copy from, might be {@code null}.
*/
protected PostBasedAuthenticationMethod(
String contentType,
UnaryOperator<String> paramEncoder,
PostBasedAuthenticationMethod authenticationMethod) {
this.contentType = contentType + "; charset=utf-8";
this.paramEncoder = paramEncoder;
if (authenticationMethod != null) {
this.loginRequestURL = authenticationMethod.loginRequestURL;
this.loginRequestBody = authenticationMethod.loginRequestBody;
this.loginSiteNode = authenticationMethod.loginSiteNode;
this.markedLoginSiteNode = authenticationMethod.markedLoginSiteNode;
}
}
@Override
public boolean isConfigured() {
if (postDataRequired) {
if (loginRequestBody == null || loginRequestBody.isEmpty()) {
return false;
}
}
// check if the login url is valid
return loginRequestURL != null && !loginRequestURL.isEmpty();
}
@Override
public AuthenticationCredentials createAuthenticationCredentials() {
return new UsernamePasswordAuthenticationCredentials();
}
protected HttpSender getHttpSender() {
if (this.httpSender == null) {
this.httpSender = new HttpSender(Model.getSingleton().getOptionsParam().getConnectionParam(),
true, HttpSender.AUTHENTICATION_INITIATOR);
}
return httpSender;
}
/**
* Prepares a request message, by filling the appropriate 'username' and 'password' fields
* in the request URI and the POST data, if any.
*
* @param credentials the credentials
* @return the HTTP message prepared for authentication
* @throws URIException if failed to create the request URI
* @throws HttpMalformedHeaderException if the constructed HTTP request is malformed
* @throws DatabaseException if an error occurred while reading the request from database
*/
protected HttpMessage prepareRequestMessage(UsernamePasswordAuthenticationCredentials credentials)
throws URIException, HttpMalformedHeaderException, DatabaseException {
URI requestURI = createLoginUrl(loginRequestURL, credentials.getUsername(), credentials.getPassword());
// Replace the username and password in the post data of the request, if needed
String requestBody = null;
if (loginRequestBody != null && !loginRequestBody.isEmpty()) {
requestBody = replaceUserData(loginRequestBody, credentials.getUsername(), credentials.getPassword(), paramEncoder);
}
// Prepare the actual message, either based on the existing one, or create a new one
HttpMessage requestMessage;
if (this.loginSiteNode != null) {
// TODO: What happens if the SiteNode was deleted?
requestMessage = loginSiteNode.getHistoryReference().getHttpMessage().cloneRequest();
requestMessage.getRequestHeader().setURI(requestURI);
if (requestBody != null) {
requestMessage.getRequestBody().setBody(requestBody);
requestMessage.getRequestHeader().setHeader(HttpHeader.CONTENT_LENGTH, null);
}
} else {
String method = (requestBody != null) ? HttpRequestHeader.POST : HttpRequestHeader.GET;
requestMessage = new HttpMessage();
requestMessage.setRequestHeader(
new HttpRequestHeader(method, requestURI, HttpHeader.HTTP10));
if (requestBody != null) {
requestMessage.getRequestHeader().setHeader(HttpHeader.CONTENT_TYPE, contentType);
requestMessage.getRequestBody().setBody(requestBody);
}
}
return requestMessage;
}
@Override
public WebSession authenticate(SessionManagementMethod sessionManagementMethod,
AuthenticationCredentials credentials, User user)
throws AuthenticationMethod.UnsupportedAuthenticationCredentialsException {
// type check
if (!(credentials instanceof UsernamePasswordAuthenticationCredentials)) {
throw new UnsupportedAuthenticationCredentialsException(
"Post based authentication method only supports "
+ UsernamePasswordAuthenticationCredentials.class.getSimpleName()
+ ". Received: " + credentials.getClass());
}
UsernamePasswordAuthenticationCredentials cred = (UsernamePasswordAuthenticationCredentials) credentials;
if (!cred.isConfigured()) {
LOGGER.warn("No credentials to authenticate user: " + user.getName());
return null;
}
// Prepare login message
HttpMessage msg;
try {
// Make sure the message will be sent with a good WebSession that can record the changes
if (user.getAuthenticatedSession() == null)
user.setAuthenticatedSession(sessionManagementMethod.createEmptyWebSession());
HttpMessage loginMsgToRenewCookie = new HttpMessage(new URI(loginRequestURL, true));
loginMsgToRenewCookie.setRequestingUser(user);
getHttpSender().sendAndReceive(loginMsgToRenewCookie);
AuthenticationHelper.addAuthMessageToHistory(loginMsgToRenewCookie);
msg = prepareRequestMessage(cred);
msg.setRequestingUser(user);
replaceAntiCsrfTokenValueIfRequired(msg, loginMsgToRenewCookie);
} catch (Exception e) {
LOGGER.error("Unable to prepare authentication message: " + e.getMessage(), e);
return null;
}
// Clear any session identifiers
msg.getRequestHeader().setHeader(HttpRequestHeader.COOKIE, null);
if (LOGGER.isDebugEnabled()) {
LOGGER.debug("Authentication request header: \n" + msg.getRequestHeader());
if (!msg.getRequestHeader().getMethod().equals(HttpRequestHeader.GET))
LOGGER.debug("Authentication request body: \n" + msg.getRequestBody());
}
// Send the authentication message
try {
getHttpSender().sendAndReceive(msg);
} catch (IOException e) {
LOGGER.error("Unable to send authentication message: " + e.getMessage());
return null;
}
if (this.isAuthenticated(msg)) {
// Let the user know it worked
AuthenticationHelper.notifyOutputAuthSuccessful(msg);
} else {
// Let the user know it failed
AuthenticationHelper.notifyOutputAuthFailure(msg);
}
// Add message to history
AuthenticationHelper.addAuthMessageToHistory(msg);
// Return the web session as extracted by the session management method
return sessionManagementMethod.extractWebSession(msg);
}
/**
* <strong>Modifies</strong> the input {@code requestMessage} by replacing
* old anti-CSRF(ACSRF) token value with the fresh one in the request body.
* It first checks if the input {@code loginMsgWithFreshAcsrfToken} has any ACSRF token.
* If yes, then it modifies the input {@code requestMessage} with the fresh ACSRF token value.
* If the {@code loginMsgWithFreshAcsrfToken} does not have any ACSRF token
* then the input {@code requestMessage} is left as it is.
* <p>
* This logic relies on {@code ExtensionAntiCSRF} to extract the ACSRF token value from the response.
* If {@code ExtensionAntiCSRF} is not available for some reason, no further processing is done.
*
* @param requestMessage the login ({@code POST})request message with correct credentials
* @param loginMsgWithFreshAcsrfToken the {@code HttpMessage} of the login page(form) with fresh cookie and ACSRF token.
*/
private void replaceAntiCsrfTokenValueIfRequired(HttpMessage requestMessage, HttpMessage loginMsgWithFreshAcsrfToken) {
if(extAntiCsrf == null) {
extAntiCsrf = Control.getSingleton().getExtensionLoader().getExtension(ExtensionAntiCSRF.class);
}
List<AntiCsrfToken> freshAcsrfTokens = null;
if(extAntiCsrf != null) {
freshAcsrfTokens = extAntiCsrf.getTokensFromResponse(loginMsgWithFreshAcsrfToken);
} else {
LOGGER.debug("ExtensionAntiCSRF is not available, skipping ACSRF replacing task");
return;
}
if(freshAcsrfTokens == null || freshAcsrfTokens.size() == 0) {
if(LOGGER.isDebugEnabled()) {
LOGGER.debug("No ACSRF token found in the response of " + loginMsgWithFreshAcsrfToken.getRequestHeader());
}
return;
}
if(LOGGER.isDebugEnabled()) {
LOGGER.debug("The login page has " + freshAcsrfTokens.size() + " ACSRF token(s)");
}
String postRequestBody = requestMessage.getRequestBody().toString();
Map<String, String> parameters = extractParametersFromPostData(postRequestBody);
if(parameters != null) {
String oldAcsrfTokenValue = null;
String replacedPostData = null;
for (AntiCsrfToken antiCsrfToken : freshAcsrfTokens) {
oldAcsrfTokenValue = parameters.get(antiCsrfToken.getName());
replacedPostData = postRequestBody.replace(oldAcsrfTokenValue, antiCsrfToken.getValue());
if(LOGGER.isDebugEnabled()) {
LOGGER.debug("replaced " + oldAcsrfTokenValue + " old ACSRF token value with " + antiCsrfToken.getValue());
}
}
requestMessage.getRequestBody().setBody(replacedPostData);
} else {
LOGGER.debug("ACSRF token found but could not replace old value with fresh value");
}
}
private Map<String, String> extractParametersFromPostData(String postRequestBody) {
Context context = Model.getSingleton().getSession().getContextsForUrl(loginRequestURL).get(0);
if(context != null) {
return context.getPostParamParser().parse(postRequestBody);
} else {
return null;
}
}
/**
* Sets the login request as being an existing SiteNode.
*
* @param loginSiteNode the new login request
* @throws Exception if an error occurred while obtaining the message from the node
*/
public void setLoginRequest(SiteNode loginSiteNode) throws Exception {
this.loginSiteNode = loginSiteNode;
HttpMessage requestMessage = loginSiteNode.getHistoryReference().getHttpMessage();
this.loginRequestURL = requestMessage.getRequestHeader().getURI().toString();
if (!requestMessage.getRequestHeader().getMethod().equalsIgnoreCase(HttpRequestHeader.GET)) {
this.loginRequestBody = requestMessage.getRequestBody().toString();
} else {
this.loginRequestBody = null;
}
}
/**
* Gets the login request url.
*
* @return the login request url
*/
public String getLoginRequestURL() {
return loginRequestURL;
}
/**
* Marks the provided Site Login as being a Login request. If {@code null} is provided, no
* site node will be marked as login request (for the {@link Context} corresponding to this
* AuthenticationMethod).
*
* @param sn the new login site node
*/
private void markLoginSiteNode(SiteNode sn) {
// No need for resetting everything up if it's already the right node
if (this.markedLoginSiteNode == sn) {
return;
}
if (this.markedLoginSiteNode != null) {
this.markedLoginSiteNode.removeCustomIcon(LOGIN_ICON_RESOURCE);
}
this.markedLoginSiteNode = sn;
if (sn == null) {
return;
}
sn.addCustomIcon(LOGIN_ICON_RESOURCE, false);
}
/**
* Sets the login request, based on a given url and, if needed, post data. If post data is
* provided, the assumed HTTP method is POST.
* <p>
* If there is a SiteNode that matches the URL and post data (with the exception of the
* 'username' and 'password' parameters), it is marked as the 'Login' site node.
* </p>
*
* @param url the url
* @param postData the post data, or {@code null} if the request should be a GET one
* @throws Exception the exception
*/
protected void setLoginRequest(String url, String postData) throws Exception {
if (url == null || url.length() == 0) {
this.loginRequestURL = null;
this.loginRequestBody = null;
this.loginSiteNode = null;
} else {
String method = HttpRequestHeader.GET;
if (postData != null && postData.length() > 0) {
method = HttpRequestHeader.POST;
}
this.loginRequestURL = url;
this.loginRequestBody = postData;
URI uri = createLoginUrl(loginRequestURL, "", "");
// Note: The findNode just checks the parameter names, not their values
// Note: No need to make sure the other parameters (besides user/password) are the
// same, as POSTs with different values are not delimited in the SitesTree anyway
// Note: Set the login site node anyway (even if null), to make sure any previously
// marked SiteNode is unmarked
this.loginSiteNode = Model.getSingleton().getSession().getSiteTree()
.findNode(uri, method, postData);
}
}
@Override
public String toString() {
return getClass().getSimpleName() + " [loginURI=" + loginRequestURL + "]";
}
@Override
public void onMethodPersisted() {
markLoginSiteNode(loginSiteNode);
}
@Override
public void onMethodDiscarded() {
markLoginSiteNode(null);
}
@Override
public ApiResponse getApiResponseRepresentation() {
Map<String, String> values = new HashMap<>();
values.put("methodName", apiMethodName);
values.put("loginUrl", loginRequestURL);
values.put("loginRequestData", this.loginRequestBody);
return new AuthMethodApiResponseRepresentation<>(values);
}
@Override
public int hashCode() {
final int prime = 31;
int result = super.hashCode();
result = prime * result + ((loginRequestBody == null) ? 0 : loginRequestBody.hashCode());
result = prime * result + ((loginRequestURL == null) ? 0 : loginRequestURL.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (!super.equals(obj))
return false;
if (getClass() != obj.getClass())
return false;
PostBasedAuthenticationMethod other = (PostBasedAuthenticationMethod) obj;
if (loginRequestBody == null) {
if (other.loginRequestBody != null)
return false;
} else if (!loginRequestBody.equals(other.loginRequestBody))
return false;
if (loginRequestURL == null) {
if (other.loginRequestURL != null)
return false;
} else if (!loginRequestURL.equals(other.loginRequestURL))
return false;
return true;
}
}
private static URI createLoginUrl(String loginData, String username, String password) throws URIException {
return new URI(replaceUserData(loginData, username, password, PostBasedAuthenticationMethodType::encodeParameter), true);
}
private static String replaceUserData(String loginData, String username, String password, UnaryOperator<String> encoder) {
return loginData.replace(PostBasedAuthenticationMethod.MSG_USER_PATTERN, encoder.apply(username))
.replace(PostBasedAuthenticationMethod.MSG_PASS_PATTERN, encoder.apply(password));
}
private static String encodeParameter(String parameter) {
try {
return URLEncoder.encode(parameter, "UTF-8");
} catch (UnsupportedEncodingException ignore) {
// UTF-8 is one of the standard charsets (see StandardCharsets.UTF_8).
}
return "";
}
private static boolean isValidLoginUrl(String loginUrl) {
if (loginUrl.isEmpty()) {
return false;
}
try {
createLoginUrl(loginUrl, "", "");
return true;
} catch (Exception e) {
return false;
}
}
/**
* The Options Panel used for configuring a {@link PostBasedAuthenticationMethod}.
*/
protected abstract class PostBasedAuthenticationMethodOptionsPanel extends
AbstractAuthenticationMethodOptionsPanel {
private static final long serialVersionUID = 1L;
private ZapTextField loginUrlField;
private ZapTextField postDataField;
private JComboBox<NameValuePair> usernameParameterCombo;
private JComboBox<NameValuePair> passwordParameterCombo;
private PostBasedAuthenticationMethod authenticationMethod;
private Context context;
private ExtensionUserManagement userExt = null;
private final UnaryOperator<String> paramDecoder;
public PostBasedAuthenticationMethodOptionsPanel(Context context, UnaryOperator<String> paramDecoder) {
super();
initialize();
this.context = context;
this.paramDecoder = paramDecoder;
}
@SuppressWarnings("unchecked")
private void initialize() {
this.setLayout(new GridBagLayout());
this.add(new JLabel(LOGIN_URL_LABEL), LayoutHelper.getGBC(0, 0, 2, 1.0d, 0.0d));
JPanel urlSelectPanel = new JPanel(new GridBagLayout());
this.loginUrlField = new ZapTextField();
this.postDataField = new ZapTextField();
JButton selectButton = new JButton(Constant.messages.getString("all.button.select"));
selectButton.setIcon(new ImageIcon(View.class.getResource("/resource/icon/16/094.png"))); // Globe
// Add behaviour for Node Select dialog
selectButton.addActionListener(new java.awt.event.ActionListener() {
@Override
public void actionPerformed(java.awt.event.ActionEvent e) {
NodeSelectDialog nsd = new NodeSelectDialog(View.getSingleton().getMainFrame());
// Try to pre-select the node according to what has been inserted in the fields
SiteNode node = null;
if (loginUrlField.getText().trim().length() > 0)
try {
// If it's a POST query
if (postDataField.getText().trim().length() > 0)
node = Model
.getSingleton()
.getSession()
.getSiteTree()
.findNode(new URI(loginUrlField.getText(), false),
HttpRequestHeader.POST, postDataField.getText());
else
node = Model.getSingleton().getSession().getSiteTree()
.findNode(new URI(loginUrlField.getText(), false));
} catch (Exception e2) {
// Ignore. It means we could not properly get a node for the existing
// value and does not have any harmful effects
}
// Show the dialog and wait for input
node = nsd.showDialog(node);
if (node != null && node.getHistoryReference() != null) {
try {
if (LOGGER.isInfoEnabled()) {
LOGGER.info("Selected Post Based Auth Login URL via dialog: "
+ node.getHistoryReference().getURI().toString());
}
loginUrlField.setText(node.getHistoryReference().getURI().toString());
postDataField.setText(node.getHistoryReference().getHttpMessage()
.getRequestBody().toString());
updateParameters();
} catch (Exception e1) {
LOGGER.error(e1.getMessage(), e1);
}
}
}
});
urlSelectPanel.add(this.loginUrlField, LayoutHelper.getGBC(0, 0, 1, 1.0D));
urlSelectPanel.add(selectButton, LayoutHelper.getGBC(1, 0, 1, 0.0D));
this.add(urlSelectPanel, LayoutHelper.getGBC(0, 1, 2, 1.0d, 0.0d));
this.add(new JLabel(postDataRequired ? POST_DATA_REQUIRED_LABEL : POST_DATA_LABEL), LayoutHelper.getGBC(0, 2, 2, 1.0d, 0.0d));
this.add(this.postDataField, LayoutHelper.getGBC(0, 3, 2, 1.0d, 0.0d));
this.add(new JLabel(USERNAME_PARAM_LABEL), LayoutHelper.getGBC(0, 4, 1, 1.0d, 0.0d));
this.usernameParameterCombo = new JComboBox<>();
this.usernameParameterCombo.setRenderer(NameValuePairRenderer.INSTANCE);
this.add(usernameParameterCombo, LayoutHelper.getGBC(0, 5, 1, 1.0d, 0.0d));
this.add(new JLabel(PASSWORD_PARAM_LABEL), LayoutHelper.getGBC(1, 4, 1, 1.0d, 0.0d));
this.passwordParameterCombo = new JComboBox<>();
this.passwordParameterCombo.setRenderer(NameValuePairRenderer.INSTANCE);
this.add(passwordParameterCombo, LayoutHelper.getGBC(1, 5, 1, 1.0d, 0.0d));
this.add(new JLabel(AUTH_DESCRIPTION), LayoutHelper.getGBC(0, 8, 2, 1.0d, 0.0d));
// Make sure we update the parameters when something has been changed in the
// postDataField
this.postDataField.addFocusListener(new FocusAdapter() {
@Override
public void focusLost(FocusEvent e) {
updateParameters();
}
});
}
/**
* Gets the context being configured.
*
* @return the context, never {@code null}.
*/
protected Context getContext() {
return context;
}
@Override
public void validateFields() {
if (!isValidLoginUrl(loginUrlField.getText())) {
loginUrlField.requestFocusInWindow();
throw new IllegalStateException(
Constant.messages.getString("authentication.method.pb.dialog.error.url.text"));
}
if (postDataRequired && postDataField.getText().isEmpty()) {
postDataField.requestFocusInWindow();
throw new IllegalStateException(
Constant.messages.getString("authentication.method.pb.dialog.error.postData.text"));
}
}
protected abstract String replaceParameterValue(String originalString, NameValuePair parameter, String replaceString);
private ExtensionUserManagement getUserExt() {
if (userExt == null) {
userExt = Control.getSingleton().getExtensionLoader().getExtension(ExtensionUserManagement.class);
}
return userExt;
}
@Override
public void saveMethod() {
try {
String postData = postDataField.getText();
if (!postData.isEmpty()) {
NameValuePair userParam = (NameValuePair) usernameParameterCombo.getSelectedItem();
NameValuePair passwdParam = (NameValuePair) passwordParameterCombo.getSelectedItem();
ExtensionUserManagement userExt = getUserExt();
if (userExt != null && userExt.getUIConfiguredUsers(context.getIndex()).size() == 0) {
String username = userParam.getValue();
String password = passwdParam.getValue();
if (!username.isEmpty() && !username.contains(PostBasedAuthenticationMethod.MSG_USER_PATTERN)
&& !password.contains(PostBasedAuthenticationMethod.MSG_PASS_PATTERN)) {
// Add the user based on the details provided
String userStr = paramDecoder.apply(username);
String passwdStr = paramDecoder.apply(password);
if (!userStr.isEmpty() && !passwdStr.isEmpty()) {
User user = new User(context.getIndex(), userStr);
UsernamePasswordAuthenticationCredentials upac =
new UsernamePasswordAuthenticationCredentials(userStr, passwdStr);
user.setAuthenticationCredentials(upac);
getUserExt().getContextUserAuthManager(context.getIndex()).addUser(user);
}
}
}
postData = this.replaceParameterValue(postData, userParam,
PostBasedAuthenticationMethod.MSG_USER_PATTERN);
postData = this.replaceParameterValue(postData, passwdParam,
PostBasedAuthenticationMethod.MSG_PASS_PATTERN);
}
getMethod().setLoginRequest(loginUrlField.getText(), postData);
} catch (Exception e) {
LOGGER.error(e.getMessage(), e);
}
}
@Override
public void bindMethod(AuthenticationMethod method) {
this.authenticationMethod = (PostBasedAuthenticationMethod) method;
this.loginUrlField.setText(authenticationMethod.loginRequestURL);
this.postDataField.setText(authenticationMethod.loginRequestBody);
updateParameters();
}
/**
* Gets the index of the parameter with a given value.
*
* @param params the params
* @param value the value
* @return the index of param with value, or -1 if no match was found
*/
private int getIndexOfParamWithValue(NameValuePair[] params, String value) {
for (int i = 0; i < params.length; i++)
if (value.equals(params[i].getValue()))
return i;
return -1;
}
private void updateParameters() {
try {
List<NameValuePair> params = extractParameters(this.postDataField.getText());
NameValuePair[] paramsArray = params.toArray(new NameValuePair[params.size()]);
this.usernameParameterCombo.setModel(new DefaultComboBoxModel<>(paramsArray));
this.passwordParameterCombo.setModel(new DefaultComboBoxModel<>(paramsArray));
int index = getIndexOfParamWithValue(paramsArray,
PostBasedAuthenticationMethod.MSG_USER_PATTERN);
if (index >= 0) {
this.usernameParameterCombo.setSelectedIndex(index);
}
index = getIndexOfParamWithValue(paramsArray, PostBasedAuthenticationMethod.MSG_PASS_PATTERN);
if (index >= 0) {
this.passwordParameterCombo.setSelectedIndex(index);
}
} catch (Exception e) {
LOGGER.error(e.getMessage(), e);
}
}
protected abstract List<NameValuePair> extractParameters(String postData);
@Override
public PostBasedAuthenticationMethod getMethod() {
return this.authenticationMethod;
}
}
/**
* A renderer for properly displaying the name of a {@link NameValuePair} in a ComboBox.
*
* @see #INSTANCE
*/
private static class NameValuePairRenderer extends BasicComboBoxRenderer {
public static final NameValuePairRenderer INSTANCE = new NameValuePairRenderer();
private static final long serialVersionUID = 3654541772447187317L;
private static final Border BORDER = new EmptyBorder(2, 3, 3, 3);
private NameValuePairRenderer() {
}
@Override
@SuppressWarnings("rawtypes")
public Component getListCellRendererComponent(JList list, Object value, int index,
boolean isSelected, boolean cellHasFocus) {
super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
if (value != null) {
setBorder(BORDER);
NameValuePair item = (NameValuePair) value;
setText(item.getName());
}
return this;
}
}
@Override
public abstract PostBasedAuthenticationMethod createAuthenticationMethod(int contextId);
@Override
public String getName() {
return methodName;
}
@Override
public boolean hasOptionsPanel() {
return true;
}
@Override
public AbstractCredentialsOptionsPanel<? extends AuthenticationCredentials> buildCredentialsOptionsPanel(
AuthenticationCredentials credentials, Context uiSharedContext) {
return new UsernamePasswordAuthenticationCredentialsOptionsPanel(
(UsernamePasswordAuthenticationCredentials) credentials);
}
@Override
public boolean hasCredentialsOptionsPanel() {
return true;
}
@Override
public void hook(ExtensionHook extensionHook) {
extensionHook.getHookMenu().addPopupMenuItem(getPopupFlagLoginRequestMenuFactory());
}
/**
* Gets the popup menu factory for flagging login requests.
*
* @return the popup flag login request menu factory
*/
private PopupMenuItemSiteNodeContextMenuFactory getPopupFlagLoginRequestMenuFactory() {
PopupMenuItemSiteNodeContextMenuFactory popupFlagLoginRequestMenuFactory = new PopupMenuItemSiteNodeContextMenuFactory(
Constant.messages.getString("context.flag.popup")) {
private static final long serialVersionUID = 8927418764L;
@Override
public PopupMenuItemContext getContextMenu(Context context, String parentMenu) {
return new PopupMenuItemContext(context, parentMenu,
Constant.messages.getString(labelPopupMenuKey, context.getName())) {
private static final long serialVersionUID = 1967885623005183801L;
private ExtensionUserManagement usersExtension;
private Context uiSharedContext;
/**
* Make sure the user acknowledges the Users corresponding to this context will
* be deleted.
*
* @return true, if successful
*/
private boolean confirmUsersDeletion(Context uiSharedContext) {
usersExtension = Control.getSingleton().getExtensionLoader().getExtension(ExtensionUserManagement.class);
if (usersExtension != null) {
if (usersExtension.getSharedContextUsers(uiSharedContext).size() > 0) {
int choice = JOptionPane.showConfirmDialog(this, Constant.messages
.getString("authentication.dialog.confirmChange.label"),
Constant.messages
.getString("authentication.dialog.confirmChange.title"),
JOptionPane.OK_CANCEL_OPTION);
if (choice == JOptionPane.CANCEL_OPTION) {
return false;
}
}
}
return true;
}
@Override
public void performAction(SiteNode sn) {
// Manually create the UI shared contexts so any modifications are done
// on an UI shared Context, so changes can be undone by pressing Cancel
SessionDialog sessionDialog = View.getSingleton().getSessionDialog();
sessionDialog.recreateUISharedContexts(Model.getSingleton().getSession());
uiSharedContext = sessionDialog.getUISharedContext(this.getContext().getIndex());
// Do the work/changes on the UI shared context
if (isTypeForMethod(this.getContext().getAuthenticationMethod())) {
LOGGER.info("Selected new login request via PopupMenu. Changing existing " + methodName + " instance for Context "
+ getContext().getIndex());
PostBasedAuthenticationMethod method = (PostBasedAuthenticationMethod) uiSharedContext
.getAuthenticationMethod();
try {
method.setLoginRequest(sn);
} catch (Exception e) {
LOGGER.error("Failed to set login request: " + e.getMessage(), e);
return;
}
// Show the session dialog without recreating UI Shared contexts
View.getSingleton()
.showSessionDialog(
Model.getSingleton().getSession(),
ContextAuthenticationPanel
.buildName(this.getContext().getIndex()), false);
} else {
LOGGER.info("Selected new login request via PopupMenu. Creating new " + methodName + " instance for Context "
+ getContext().getIndex());
PostBasedAuthenticationMethod method = createAuthenticationMethod(getContext().getIndex());
try {
method.setLoginRequest(sn);
} catch (Exception e) {
LOGGER.error("Failed to set login request: " + e.getMessage(), e);
return;
}
if (!confirmUsersDeletion(uiSharedContext)) {
LOGGER.debug("Cancelled change of authentication type.");
return;
}
uiSharedContext.setAuthenticationMethod(method);
// Show the session dialog without recreating UI Shared contexts
// NOTE: First init the panels of the dialog so old users data gets
// loaded and just then delete the users
// from the UI data model, otherwise the 'real' users from the
// non-shared context would be loaded
// and would override any deletions made.
View.getSingleton().showSessionDialog(Model.getSingleton().getSession(),
ContextAuthenticationPanel.buildName(this.getContext().getIndex()),
false, new Runnable() {
@Override
public void run() {
// Removing the users from the 'shared context' (the UI)
// will cause their removal at
// save as well
if (usersExtension != null)
usersExtension.removeSharedContextUsers(uiSharedContext);
}
});
}
}
};
}
@Override
public int getParentMenuIndex() {
return 3;
}
};
return popupFlagLoginRequestMenuFactory;
}
@Override
public AuthenticationMethod loadMethodFromSession(Session session, int contextId) throws DatabaseException {
PostBasedAuthenticationMethod method = createAuthenticationMethod(contextId);
List<String> urls = session.getContextDataStrings(contextId, RecordContext.TYPE_AUTH_METHOD_FIELD_1);
String url = "";
if (urls != null && urls.size() > 0) {
url = urls.get(0);
}
List<String> postDatas = session.getContextDataStrings(contextId,
RecordContext.TYPE_AUTH_METHOD_FIELD_2);
String postData = null;
if (postDatas != null && postDatas.size() > 0) {
postData = postDatas.get(0);
}
try {
method.setLoginRequest(url, postData);
} catch (Exception e) {
LOGGER.error("Unable to load Post based authentication method data:", e);
}
return method;
}
@Override
public void persistMethodToSession(Session session, int contextId, AuthenticationMethod authMethod)
throws DatabaseException {
if (!(authMethod instanceof PostBasedAuthenticationMethod)) {
throw new UnsupportedAuthenticationMethodException(
"Post based authentication type only supports: " + PostBasedAuthenticationMethod.class);
}
PostBasedAuthenticationMethod method = (PostBasedAuthenticationMethod) authMethod;
session.setContextData(contextId, RecordContext.TYPE_AUTH_METHOD_FIELD_1, method.loginRequestURL);
session.setContextData(contextId, RecordContext.TYPE_AUTH_METHOD_FIELD_2, method.loginRequestBody);
}
@Override
public int getUniqueIdentifier() {
return methodIdentifier;
}
@Override
public UsernamePasswordAuthenticationCredentials createAuthenticationCredentials() {
return new UsernamePasswordAuthenticationCredentials();
}
/* API related constants and methods. */
private static final String PARAM_LOGIN_URL = "loginUrl";
private static final String PARAM_LOGIN_REQUEST_DATA = "loginRequestData";
@Override
public ApiDynamicActionImplementor getSetMethodForContextApiAction() {
String[] mandatoryParamNames;
String[] optionalParamNames;
if (postDataRequired) {
mandatoryParamNames = new String[] { PARAM_LOGIN_URL, PARAM_LOGIN_REQUEST_DATA };
optionalParamNames = null;
} else {
mandatoryParamNames = new String[] { PARAM_LOGIN_URL };
optionalParamNames = new String[] { PARAM_LOGIN_REQUEST_DATA };
}
return new ApiDynamicActionImplementor(apiMethodName, mandatoryParamNames, optionalParamNames) {
@Override
public void handleAction(JSONObject params) throws ApiException {
Context context = ApiUtils.getContextByParamId(params, AuthenticationAPI.PARAM_CONTEXT_ID);
String loginUrl = ApiUtils.getNonEmptyStringParam(params, PARAM_LOGIN_URL);
if (!isValidLoginUrl(loginUrl)) {
throw new ApiException(ApiException.Type.ILLEGAL_PARAMETER, PARAM_LOGIN_URL);
}
String postData = "";
if (postDataRequired) {
postData = ApiUtils.getNonEmptyStringParam(params, PARAM_LOGIN_REQUEST_DATA);
} else if (params.containsKey(PARAM_LOGIN_REQUEST_DATA)) {
postData = params.getString(PARAM_LOGIN_REQUEST_DATA);
}
// Set the method
PostBasedAuthenticationMethod method = createAuthenticationMethod(context.getIndex());
try {
method.setLoginRequest(loginUrl, postData);
} catch (Exception e) {
throw new ApiException(ApiException.Type.INTERNAL_ERROR, e.getMessage());
}
if (!context.getAuthenticationMethod().isSameType(method))
apiChangedAuthenticationMethodForContext(context.getIndex());
context.setAuthenticationMethod(method);
}
};
}
@Override
public ApiDynamicActionImplementor getSetCredentialsForUserApiAction() {
return UsernamePasswordAuthenticationCredentials.getSetCredentialsForUserApiAction(this);
}
@Override
public void exportData(Configuration config, AuthenticationMethod authMethod) {
if (!(authMethod instanceof PostBasedAuthenticationMethod)) {
throw new UnsupportedAuthenticationMethodException(
"Post based authentication type only supports: " + PostBasedAuthenticationMethod.class.getName());
}
PostBasedAuthenticationMethod method = (PostBasedAuthenticationMethod) authMethod;
config.setProperty(CONTEXT_CONFIG_AUTH_FORM_LOGINURL, method.loginRequestURL);
config.setProperty(CONTEXT_CONFIG_AUTH_FORM_LOGINBODY, method.loginRequestBody);
}
@Override
public void importData(Configuration config, AuthenticationMethod authMethod) throws ConfigurationException {
if (!(authMethod instanceof PostBasedAuthenticationMethod)) {
throw new UnsupportedAuthenticationMethodException(
"Post based authentication type only supports: " + PostBasedAuthenticationMethod.class.getName());
}
PostBasedAuthenticationMethod method = (PostBasedAuthenticationMethod) authMethod;
try {
method.setLoginRequest(config.getString(CONTEXT_CONFIG_AUTH_FORM_LOGINURL),
config.getString(CONTEXT_CONFIG_AUTH_FORM_LOGINBODY));
} catch (Exception e) {
throw new ConfigurationException(e);
}
}
}
| src/org/zaproxy/zap/authentication/PostBasedAuthenticationMethodType.java | /*
* Zed Attack Proxy (ZAP) and its related class files.
*
* ZAP is an HTTP/HTTPS proxy for assessing web application security.
*
* Copyright 2018 The ZAP Development Team
*
* 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 org.zaproxy.zap.authentication;
import java.awt.Component;
import java.awt.GridBagLayout;
import java.awt.event.FocusAdapter;
import java.awt.event.FocusEvent;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.function.UnaryOperator;
import javax.swing.DefaultComboBoxModel;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.JLabel;
import javax.swing.JList;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.border.Border;
import javax.swing.border.EmptyBorder;
import javax.swing.plaf.basic.BasicComboBoxRenderer;
import net.sf.json.JSONObject;
import org.apache.commons.configuration.Configuration;
import org.apache.commons.configuration.ConfigurationException;
import org.apache.commons.httpclient.URI;
import org.apache.commons.httpclient.URIException;
import org.apache.log4j.Logger;
import org.parosproxy.paros.Constant;
import org.parosproxy.paros.control.Control;
import org.parosproxy.paros.db.DatabaseException;
import org.parosproxy.paros.db.RecordContext;
import org.parosproxy.paros.extension.ExtensionHook;
import org.parosproxy.paros.model.Model;
import org.parosproxy.paros.model.Session;
import org.parosproxy.paros.model.SiteNode;
import org.parosproxy.paros.network.HttpHeader;
import org.parosproxy.paros.network.HttpMalformedHeaderException;
import org.parosproxy.paros.network.HttpMessage;
import org.parosproxy.paros.network.HttpRequestHeader;
import org.parosproxy.paros.network.HttpSender;
import org.parosproxy.paros.view.SessionDialog;
import org.parosproxy.paros.view.View;
import org.zaproxy.zap.authentication.UsernamePasswordAuthenticationCredentials.UsernamePasswordAuthenticationCredentialsOptionsPanel;
import org.zaproxy.zap.extension.anticsrf.AntiCsrfToken;
import org.zaproxy.zap.extension.anticsrf.ExtensionAntiCSRF;
import org.zaproxy.zap.extension.api.ApiDynamicActionImplementor;
import org.zaproxy.zap.extension.api.ApiException;
import org.zaproxy.zap.extension.api.ApiResponse;
import org.zaproxy.zap.extension.authentication.AuthenticationAPI;
import org.zaproxy.zap.extension.authentication.ContextAuthenticationPanel;
import org.zaproxy.zap.extension.users.ExtensionUserManagement;
import org.zaproxy.zap.model.Context;
import org.zaproxy.zap.model.NameValuePair;
import org.zaproxy.zap.session.SessionManagementMethod;
import org.zaproxy.zap.session.WebSession;
import org.zaproxy.zap.users.User;
import org.zaproxy.zap.utils.ApiUtils;
import org.zaproxy.zap.utils.ZapTextField;
import org.zaproxy.zap.view.LayoutHelper;
import org.zaproxy.zap.view.NodeSelectDialog;
import org.zaproxy.zap.view.popup.PopupMenuItemContext;
import org.zaproxy.zap.view.popup.PopupMenuItemSiteNodeContextMenuFactory;
/**
* An {@link AuthenticationMethodType} where the Users are authenticated by POSTing the username and password.
* <p>
* The actual format of the POST body is defined by extending classes.
*
* @since TODO add version
*/
public abstract class PostBasedAuthenticationMethodType extends AuthenticationMethodType {
private static final String CONTEXT_CONFIG_AUTH_FORM = AuthenticationMethod.CONTEXT_CONFIG_AUTH + ".form";
private static final String CONTEXT_CONFIG_AUTH_FORM_LOGINURL = CONTEXT_CONFIG_AUTH_FORM + ".loginurl";
private static final String CONTEXT_CONFIG_AUTH_FORM_LOGINBODY = CONTEXT_CONFIG_AUTH_FORM + ".loginbody";
private static final String POST_DATA_LABEL = Constant.messages
.getString("authentication.method.pb.field.label.postData");
private static final String POST_DATA_REQUIRED_LABEL = Constant.messages
.getString("authentication.method.pb.field.label.postDataRequired");
private static final String USERNAME_PARAM_LABEL = Constant.messages
.getString("authentication.method.pb.field.label.usernameParam");
private static final String PASSWORD_PARAM_LABEL = Constant.messages
.getString("authentication.method.pb.field.label.passwordParam");
private static final String LOGIN_URL_LABEL = Constant.messages
.getString("authentication.method.pb.field.label.loginUrl");
private static final String AUTH_DESCRIPTION = Constant.messages
.getString("authentication.method.pb.field.label.description");
private static final Logger LOGGER = Logger.getLogger(PostBasedAuthenticationMethodType.class);
private final String methodName;
private final int methodIdentifier;
private final String apiMethodName;
private final String labelPopupMenuKey;
private final boolean postDataRequired;
/**
* Constructs a {@code PostBasedAuthenticationMethodType} with the given data.
*
* @param methodName the name of the authentication method, should not be {@code null}.
* @param methodIdentifier the ID of the authentication method.
* @param apiMethodName the API name of the authentication method, should not be {@code null}.
* @param labelPopupMenuKey the name of the menu item that flags the request as login.
* @param postDataRequired {@code true} if the POST data is required by the authentication method, {@code false} otherwise.
*/
protected PostBasedAuthenticationMethodType(
String methodName,
int methodIdentifier,
String apiMethodName,
String labelPopupMenuKey,
boolean postDataRequired) {
this.methodName = methodName;
this.methodIdentifier = methodIdentifier;
this.apiMethodName = apiMethodName;
this.labelPopupMenuKey = labelPopupMenuKey;
this.postDataRequired = postDataRequired;
}
/**
* An {@link AuthenticationMethod} where the Users are authenticated by POSTing the username and password.
* <p>
* The actual format of the POST body is defined by extending classes.
*/
public abstract class PostBasedAuthenticationMethod extends AuthenticationMethod {
private static final String LOGIN_ICON_RESOURCE = "/resource/icon/fugue/door-open-green-arrow.png";
public static final String MSG_USER_PATTERN = "{%username%}";
public static final String MSG_PASS_PATTERN = "{%password%}";
private final String contentType;
private final UnaryOperator<String> paramEncoder;
private HttpSender httpSender;
private SiteNode markedLoginSiteNode;
private SiteNode loginSiteNode = null;
private String loginRequestURL;
private String loginRequestBody;
private ExtensionAntiCSRF extAntiCsrf;
/**
* Constructs a {@code PostBasedAuthenticationMethod} with the given data.
*
* @param contentType the value of the Content-Type, to be added to the authentication message.
* @param paramEncoder the encoder to be used on the authentication credentials set in the POST body.
* @param authenticationMethod the authentication method to copy from, might be {@code null}.
*/
protected PostBasedAuthenticationMethod(
String contentType,
UnaryOperator<String> paramEncoder,
PostBasedAuthenticationMethod authenticationMethod) {
this.contentType = contentType + "; charset=utf-8";
this.paramEncoder = paramEncoder;
if (authenticationMethod != null) {
this.loginRequestURL = authenticationMethod.loginRequestURL;
this.loginRequestBody = authenticationMethod.loginRequestBody;
this.loginSiteNode = authenticationMethod.loginSiteNode;
this.markedLoginSiteNode = authenticationMethod.markedLoginSiteNode;
}
}
@Override
public boolean isConfigured() {
if (postDataRequired) {
if (loginRequestBody == null || loginRequestBody.isEmpty()) {
return false;
}
}
// check if the login url is valid
return loginRequestURL != null && !loginRequestURL.isEmpty();
}
@Override
public AuthenticationCredentials createAuthenticationCredentials() {
return new UsernamePasswordAuthenticationCredentials();
}
protected HttpSender getHttpSender() {
if (this.httpSender == null) {
this.httpSender = new HttpSender(Model.getSingleton().getOptionsParam().getConnectionParam(),
true, HttpSender.AUTHENTICATION_INITIATOR);
}
return httpSender;
}
/**
* Prepares a request message, by filling the appropriate 'username' and 'password' fields
* in the request URI and the POST data, if any.
*
* @param credentials the credentials
* @return the HTTP message prepared for authentication
* @throws URIException if failed to create the request URI
* @throws HttpMalformedHeaderException if the constructed HTTP request is malformed
* @throws DatabaseException if an error occurred while reading the request from database
*/
protected HttpMessage prepareRequestMessage(UsernamePasswordAuthenticationCredentials credentials)
throws URIException, HttpMalformedHeaderException, DatabaseException {
URI requestURI = createLoginUrl(loginRequestURL, credentials.getUsername(), credentials.getPassword());
// Replace the username and password in the post data of the request, if needed
String requestBody = null;
if (loginRequestBody != null && !loginRequestBody.isEmpty()) {
requestBody = replaceUserData(loginRequestBody, credentials.getUsername(), credentials.getPassword(), paramEncoder);
}
// Prepare the actual message, either based on the existing one, or create a new one
HttpMessage requestMessage;
if (this.loginSiteNode != null) {
// TODO: What happens if the SiteNode was deleted?
requestMessage = loginSiteNode.getHistoryReference().getHttpMessage().cloneRequest();
requestMessage.getRequestHeader().setURI(requestURI);
if (requestBody != null) {
requestMessage.getRequestBody().setBody(requestBody);
requestMessage.getRequestHeader().setHeader(HttpHeader.CONTENT_LENGTH, null);
}
} else {
String method = (requestBody != null) ? HttpRequestHeader.POST : HttpRequestHeader.GET;
requestMessage = new HttpMessage();
requestMessage.setRequestHeader(
new HttpRequestHeader(method, requestURI, HttpHeader.HTTP10));
if (requestBody != null) {
requestMessage.getRequestHeader().setHeader(HttpHeader.CONTENT_TYPE, contentType);
requestMessage.getRequestBody().setBody(requestBody);
}
}
return requestMessage;
}
@Override
public WebSession authenticate(SessionManagementMethod sessionManagementMethod,
AuthenticationCredentials credentials, User user)
throws AuthenticationMethod.UnsupportedAuthenticationCredentialsException {
// type check
if (!(credentials instanceof UsernamePasswordAuthenticationCredentials)) {
throw new UnsupportedAuthenticationCredentialsException(
"Post based authentication method only supports "
+ UsernamePasswordAuthenticationCredentials.class.getSimpleName()
+ ". Received: " + credentials.getClass());
}
UsernamePasswordAuthenticationCredentials cred = (UsernamePasswordAuthenticationCredentials) credentials;
if (!cred.isConfigured()) {
LOGGER.warn("No credentials to authenticate user: " + user.getName());
return null;
}
// Prepare login message
HttpMessage msg;
try {
msg = prepareRequestMessage(cred);
// Make sure the message will be sent with a good WebSession that can record the changes
if (user.getAuthenticatedSession() == null)
user.setAuthenticatedSession(sessionManagementMethod.createEmptyWebSession());
msg.setRequestingUser(user);
replaceAntiCsrfTokenValueIfRequired(msg, user);
} catch (Exception e) {
LOGGER.error("Unable to prepare authentication message: " + e.getMessage(), e);
return null;
}
// Clear any session identifiers
msg.getRequestHeader().setHeader(HttpRequestHeader.COOKIE, null);
if (LOGGER.isDebugEnabled()) {
LOGGER.debug("Authentication request header: \n" + msg.getRequestHeader());
if (!msg.getRequestHeader().getMethod().equals(HttpRequestHeader.GET))
LOGGER.debug("Authentication request body: \n" + msg.getRequestBody());
}
// Send the authentication message
try {
getHttpSender().sendAndReceive(msg);
} catch (IOException e) {
LOGGER.error("Unable to send authentication message: " + e.getMessage());
return null;
}
if (this.isAuthenticated(msg)) {
// Let the user know it worked
AuthenticationHelper.notifyOutputAuthSuccessful(msg);
} else {
// Let the user know it failed
AuthenticationHelper.notifyOutputAuthFailure(msg);
}
// Add message to history
AuthenticationHelper.addAuthMessageToHistory(msg);
// Return the web session as extracted by the session management method
return sessionManagementMethod.extractWebSession(msg);
}
/**
* Modifies the input {@code requestMessage} by replacing fresh anti-CSRF token value in the request body.
* It first checks if the input {@code requestMessage} has an anti-CSRF token.
* If yes, then it makes a {@code GET} request to the login page in order to renew the anti-CSRF token.
* Then it modifies the input {@code requestMessage} with the regenerated anti-CSRF token value.
* If the first {@code POST} login request does not have anti-CSRF token
* then the input {@code requestMessage} is left as it is.
*
* @param requestMessage the login request message with correct credential
* @param user the user of the context
* @throws IOException if problem occurs when sending login request to get login page.
*/
private void replaceAntiCsrfTokenValueIfRequired(HttpMessage requestMessage, User user) throws IOException {
if(extAntiCsrf == null) {
extAntiCsrf = Control.getSingleton().getExtensionLoader().getExtension(ExtensionAntiCSRF.class);
}
List<AntiCsrfToken> antiCsrfTokensOfFirstLoginMsg = null;
if(extAntiCsrf != null) {
antiCsrfTokensOfFirstLoginMsg = extAntiCsrf.getTokens(requestMessage);
}
AntiCsrfToken antiCsrfTokenOfFirstLoginMsg = null;
if(antiCsrfTokensOfFirstLoginMsg != null && antiCsrfTokensOfFirstLoginMsg.size() > 0) {
antiCsrfTokenOfFirstLoginMsg = antiCsrfTokensOfFirstLoginMsg.get(0);
}
if (antiCsrfTokenOfFirstLoginMsg != null) {
HttpMessage loginMsgToRegenerateAntiCsrfToken = antiCsrfTokenOfFirstLoginMsg.getMsg().cloneAll();
loginMsgToRegenerateAntiCsrfToken.setRequestingUser(user);
// Clear any session identifiers
loginMsgToRegenerateAntiCsrfToken.getRequestHeader().setHeader(HttpRequestHeader.COOKIE, null);
getHttpSender().sendAndReceive(loginMsgToRegenerateAntiCsrfToken);
AuthenticationHelper.addAuthMessageToHistory(loginMsgToRegenerateAntiCsrfToken);
String regeneratedAntiCsrfTokenValue = extAntiCsrf.getTokenValue(loginMsgToRegenerateAntiCsrfToken, antiCsrfTokenOfFirstLoginMsg.getName());
String requestBody = requestMessage.getRequestBody().toString();
if (regeneratedAntiCsrfTokenValue != null) {
requestBody = requestBody.replace(
antiCsrfTokenOfFirstLoginMsg.getValue(), paramEncoder.apply(regeneratedAntiCsrfTokenValue));
requestMessage.getRequestBody().setBody(requestBody);
}
}
}
/**
* Sets the login request as being an existing SiteNode.
*
* @param loginSiteNode the new login request
* @throws Exception if an error occurred while obtaining the message from the node
*/
public void setLoginRequest(SiteNode loginSiteNode) throws Exception {
this.loginSiteNode = loginSiteNode;
HttpMessage requestMessage = loginSiteNode.getHistoryReference().getHttpMessage();
this.loginRequestURL = requestMessage.getRequestHeader().getURI().toString();
if (!requestMessage.getRequestHeader().getMethod().equalsIgnoreCase(HttpRequestHeader.GET)) {
this.loginRequestBody = requestMessage.getRequestBody().toString();
} else {
this.loginRequestBody = null;
}
}
/**
* Gets the login request url.
*
* @return the login request url
*/
public String getLoginRequestURL() {
return loginRequestURL;
}
/**
* Marks the provided Site Login as being a Login request. If {@code null} is provided, no
* site node will be marked as login request (for the {@link Context} corresponding to this
* AuthenticationMethod).
*
* @param sn the new login site node
*/
private void markLoginSiteNode(SiteNode sn) {
// No need for resetting everything up if it's already the right node
if (this.markedLoginSiteNode == sn) {
return;
}
if (this.markedLoginSiteNode != null) {
this.markedLoginSiteNode.removeCustomIcon(LOGIN_ICON_RESOURCE);
}
this.markedLoginSiteNode = sn;
if (sn == null) {
return;
}
sn.addCustomIcon(LOGIN_ICON_RESOURCE, false);
}
/**
* Sets the login request, based on a given url and, if needed, post data. If post data is
* provided, the assumed HTTP method is POST.
* <p>
* If there is a SiteNode that matches the URL and post data (with the exception of the
* 'username' and 'password' parameters), it is marked as the 'Login' site node.
* </p>
*
* @param url the url
* @param postData the post data, or {@code null} if the request should be a GET one
* @throws Exception the exception
*/
protected void setLoginRequest(String url, String postData) throws Exception {
if (url == null || url.length() == 0) {
this.loginRequestURL = null;
this.loginRequestBody = null;
this.loginSiteNode = null;
} else {
String method = HttpRequestHeader.GET;
if (postData != null && postData.length() > 0) {
method = HttpRequestHeader.POST;
}
this.loginRequestURL = url;
this.loginRequestBody = postData;
URI uri = createLoginUrl(loginRequestURL, "", "");
// Note: The findNode just checks the parameter names, not their values
// Note: No need to make sure the other parameters (besides user/password) are the
// same, as POSTs with different values are not delimited in the SitesTree anyway
// Note: Set the login site node anyway (even if null), to make sure any previously
// marked SiteNode is unmarked
this.loginSiteNode = Model.getSingleton().getSession().getSiteTree()
.findNode(uri, method, postData);
}
}
@Override
public String toString() {
return getClass().getSimpleName() + " [loginURI=" + loginRequestURL + "]";
}
@Override
public void onMethodPersisted() {
markLoginSiteNode(loginSiteNode);
}
@Override
public void onMethodDiscarded() {
markLoginSiteNode(null);
}
@Override
public ApiResponse getApiResponseRepresentation() {
Map<String, String> values = new HashMap<>();
values.put("methodName", apiMethodName);
values.put("loginUrl", loginRequestURL);
values.put("loginRequestData", this.loginRequestBody);
return new AuthMethodApiResponseRepresentation<>(values);
}
@Override
public int hashCode() {
final int prime = 31;
int result = super.hashCode();
result = prime * result + ((loginRequestBody == null) ? 0 : loginRequestBody.hashCode());
result = prime * result + ((loginRequestURL == null) ? 0 : loginRequestURL.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (!super.equals(obj))
return false;
if (getClass() != obj.getClass())
return false;
PostBasedAuthenticationMethod other = (PostBasedAuthenticationMethod) obj;
if (loginRequestBody == null) {
if (other.loginRequestBody != null)
return false;
} else if (!loginRequestBody.equals(other.loginRequestBody))
return false;
if (loginRequestURL == null) {
if (other.loginRequestURL != null)
return false;
} else if (!loginRequestURL.equals(other.loginRequestURL))
return false;
return true;
}
}
private static URI createLoginUrl(String loginData, String username, String password) throws URIException {
return new URI(replaceUserData(loginData, username, password, PostBasedAuthenticationMethodType::encodeParameter), true);
}
private static String replaceUserData(String loginData, String username, String password, UnaryOperator<String> encoder) {
return loginData.replace(PostBasedAuthenticationMethod.MSG_USER_PATTERN, encoder.apply(username))
.replace(PostBasedAuthenticationMethod.MSG_PASS_PATTERN, encoder.apply(password));
}
private static String encodeParameter(String parameter) {
try {
return URLEncoder.encode(parameter, "UTF-8");
} catch (UnsupportedEncodingException ignore) {
// UTF-8 is one of the standard charsets (see StandardCharsets.UTF_8).
}
return "";
}
private static boolean isValidLoginUrl(String loginUrl) {
if (loginUrl.isEmpty()) {
return false;
}
try {
createLoginUrl(loginUrl, "", "");
return true;
} catch (Exception e) {
return false;
}
}
/**
* The Options Panel used for configuring a {@link PostBasedAuthenticationMethod}.
*/
protected abstract class PostBasedAuthenticationMethodOptionsPanel extends
AbstractAuthenticationMethodOptionsPanel {
private static final long serialVersionUID = 1L;
private ZapTextField loginUrlField;
private ZapTextField postDataField;
private JComboBox<NameValuePair> usernameParameterCombo;
private JComboBox<NameValuePair> passwordParameterCombo;
private PostBasedAuthenticationMethod authenticationMethod;
private Context context;
private ExtensionUserManagement userExt = null;
private final UnaryOperator<String> paramDecoder;
public PostBasedAuthenticationMethodOptionsPanel(Context context, UnaryOperator<String> paramDecoder) {
super();
initialize();
this.context = context;
this.paramDecoder = paramDecoder;
}
@SuppressWarnings("unchecked")
private void initialize() {
this.setLayout(new GridBagLayout());
this.add(new JLabel(LOGIN_URL_LABEL), LayoutHelper.getGBC(0, 0, 2, 1.0d, 0.0d));
JPanel urlSelectPanel = new JPanel(new GridBagLayout());
this.loginUrlField = new ZapTextField();
this.postDataField = new ZapTextField();
JButton selectButton = new JButton(Constant.messages.getString("all.button.select"));
selectButton.setIcon(new ImageIcon(View.class.getResource("/resource/icon/16/094.png"))); // Globe
// Add behaviour for Node Select dialog
selectButton.addActionListener(new java.awt.event.ActionListener() {
@Override
public void actionPerformed(java.awt.event.ActionEvent e) {
NodeSelectDialog nsd = new NodeSelectDialog(View.getSingleton().getMainFrame());
// Try to pre-select the node according to what has been inserted in the fields
SiteNode node = null;
if (loginUrlField.getText().trim().length() > 0)
try {
// If it's a POST query
if (postDataField.getText().trim().length() > 0)
node = Model
.getSingleton()
.getSession()
.getSiteTree()
.findNode(new URI(loginUrlField.getText(), false),
HttpRequestHeader.POST, postDataField.getText());
else
node = Model.getSingleton().getSession().getSiteTree()
.findNode(new URI(loginUrlField.getText(), false));
} catch (Exception e2) {
// Ignore. It means we could not properly get a node for the existing
// value and does not have any harmful effects
}
// Show the dialog and wait for input
node = nsd.showDialog(node);
if (node != null && node.getHistoryReference() != null) {
try {
if (LOGGER.isInfoEnabled()) {
LOGGER.info("Selected Post Based Auth Login URL via dialog: "
+ node.getHistoryReference().getURI().toString());
}
loginUrlField.setText(node.getHistoryReference().getURI().toString());
postDataField.setText(node.getHistoryReference().getHttpMessage()
.getRequestBody().toString());
updateParameters();
} catch (Exception e1) {
LOGGER.error(e1.getMessage(), e1);
}
}
}
});
urlSelectPanel.add(this.loginUrlField, LayoutHelper.getGBC(0, 0, 1, 1.0D));
urlSelectPanel.add(selectButton, LayoutHelper.getGBC(1, 0, 1, 0.0D));
this.add(urlSelectPanel, LayoutHelper.getGBC(0, 1, 2, 1.0d, 0.0d));
this.add(new JLabel(postDataRequired ? POST_DATA_REQUIRED_LABEL : POST_DATA_LABEL), LayoutHelper.getGBC(0, 2, 2, 1.0d, 0.0d));
this.add(this.postDataField, LayoutHelper.getGBC(0, 3, 2, 1.0d, 0.0d));
this.add(new JLabel(USERNAME_PARAM_LABEL), LayoutHelper.getGBC(0, 4, 1, 1.0d, 0.0d));
this.usernameParameterCombo = new JComboBox<>();
this.usernameParameterCombo.setRenderer(NameValuePairRenderer.INSTANCE);
this.add(usernameParameterCombo, LayoutHelper.getGBC(0, 5, 1, 1.0d, 0.0d));
this.add(new JLabel(PASSWORD_PARAM_LABEL), LayoutHelper.getGBC(1, 4, 1, 1.0d, 0.0d));
this.passwordParameterCombo = new JComboBox<>();
this.passwordParameterCombo.setRenderer(NameValuePairRenderer.INSTANCE);
this.add(passwordParameterCombo, LayoutHelper.getGBC(1, 5, 1, 1.0d, 0.0d));
this.add(new JLabel(AUTH_DESCRIPTION), LayoutHelper.getGBC(0, 8, 2, 1.0d, 0.0d));
// Make sure we update the parameters when something has been changed in the
// postDataField
this.postDataField.addFocusListener(new FocusAdapter() {
@Override
public void focusLost(FocusEvent e) {
updateParameters();
}
});
}
/**
* Gets the context being configured.
*
* @return the context, never {@code null}.
*/
protected Context getContext() {
return context;
}
@Override
public void validateFields() {
if (!isValidLoginUrl(loginUrlField.getText())) {
loginUrlField.requestFocusInWindow();
throw new IllegalStateException(
Constant.messages.getString("authentication.method.pb.dialog.error.url.text"));
}
if (postDataRequired && postDataField.getText().isEmpty()) {
postDataField.requestFocusInWindow();
throw new IllegalStateException(
Constant.messages.getString("authentication.method.pb.dialog.error.postData.text"));
}
}
protected abstract String replaceParameterValue(String originalString, NameValuePair parameter, String replaceString);
private ExtensionUserManagement getUserExt() {
if (userExt == null) {
userExt = Control.getSingleton().getExtensionLoader().getExtension(ExtensionUserManagement.class);
}
return userExt;
}
@Override
public void saveMethod() {
try {
String postData = postDataField.getText();
if (!postData.isEmpty()) {
NameValuePair userParam = (NameValuePair) usernameParameterCombo.getSelectedItem();
NameValuePair passwdParam = (NameValuePair) passwordParameterCombo.getSelectedItem();
ExtensionUserManagement userExt = getUserExt();
if (userExt != null && userExt.getUIConfiguredUsers(context.getIndex()).size() == 0) {
String username = userParam.getValue();
String password = passwdParam.getValue();
if (!username.isEmpty() && !username.contains(PostBasedAuthenticationMethod.MSG_USER_PATTERN)
&& !password.contains(PostBasedAuthenticationMethod.MSG_PASS_PATTERN)) {
// Add the user based on the details provided
String userStr = paramDecoder.apply(username);
String passwdStr = paramDecoder.apply(password);
if (!userStr.isEmpty() && !passwdStr.isEmpty()) {
User user = new User(context.getIndex(), userStr);
UsernamePasswordAuthenticationCredentials upac =
new UsernamePasswordAuthenticationCredentials(userStr, passwdStr);
user.setAuthenticationCredentials(upac);
getUserExt().getContextUserAuthManager(context.getIndex()).addUser(user);
}
}
}
postData = this.replaceParameterValue(postData, userParam,
PostBasedAuthenticationMethod.MSG_USER_PATTERN);
postData = this.replaceParameterValue(postData, passwdParam,
PostBasedAuthenticationMethod.MSG_PASS_PATTERN);
}
getMethod().setLoginRequest(loginUrlField.getText(), postData);
} catch (Exception e) {
LOGGER.error(e.getMessage(), e);
}
}
@Override
public void bindMethod(AuthenticationMethod method) {
this.authenticationMethod = (PostBasedAuthenticationMethod) method;
this.loginUrlField.setText(authenticationMethod.loginRequestURL);
this.postDataField.setText(authenticationMethod.loginRequestBody);
updateParameters();
}
/**
* Gets the index of the parameter with a given value.
*
* @param params the params
* @param value the value
* @return the index of param with value, or -1 if no match was found
*/
private int getIndexOfParamWithValue(NameValuePair[] params, String value) {
for (int i = 0; i < params.length; i++)
if (value.equals(params[i].getValue()))
return i;
return -1;
}
private void updateParameters() {
try {
List<NameValuePair> params = extractParameters(this.postDataField.getText());
NameValuePair[] paramsArray = params.toArray(new NameValuePair[params.size()]);
this.usernameParameterCombo.setModel(new DefaultComboBoxModel<>(paramsArray));
this.passwordParameterCombo.setModel(new DefaultComboBoxModel<>(paramsArray));
int index = getIndexOfParamWithValue(paramsArray,
PostBasedAuthenticationMethod.MSG_USER_PATTERN);
if (index >= 0) {
this.usernameParameterCombo.setSelectedIndex(index);
}
index = getIndexOfParamWithValue(paramsArray, PostBasedAuthenticationMethod.MSG_PASS_PATTERN);
if (index >= 0) {
this.passwordParameterCombo.setSelectedIndex(index);
}
} catch (Exception e) {
LOGGER.error(e.getMessage(), e);
}
}
protected abstract List<NameValuePair> extractParameters(String postData);
@Override
public PostBasedAuthenticationMethod getMethod() {
return this.authenticationMethod;
}
}
/**
* A renderer for properly displaying the name of a {@link NameValuePair} in a ComboBox.
*
* @see #INSTANCE
*/
private static class NameValuePairRenderer extends BasicComboBoxRenderer {
public static final NameValuePairRenderer INSTANCE = new NameValuePairRenderer();
private static final long serialVersionUID = 3654541772447187317L;
private static final Border BORDER = new EmptyBorder(2, 3, 3, 3);
private NameValuePairRenderer() {
}
@Override
@SuppressWarnings("rawtypes")
public Component getListCellRendererComponent(JList list, Object value, int index,
boolean isSelected, boolean cellHasFocus) {
super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
if (value != null) {
setBorder(BORDER);
NameValuePair item = (NameValuePair) value;
setText(item.getName());
}
return this;
}
}
@Override
public abstract PostBasedAuthenticationMethod createAuthenticationMethod(int contextId);
@Override
public String getName() {
return methodName;
}
@Override
public boolean hasOptionsPanel() {
return true;
}
@Override
public AbstractCredentialsOptionsPanel<? extends AuthenticationCredentials> buildCredentialsOptionsPanel(
AuthenticationCredentials credentials, Context uiSharedContext) {
return new UsernamePasswordAuthenticationCredentialsOptionsPanel(
(UsernamePasswordAuthenticationCredentials) credentials);
}
@Override
public boolean hasCredentialsOptionsPanel() {
return true;
}
@Override
public void hook(ExtensionHook extensionHook) {
extensionHook.getHookMenu().addPopupMenuItem(getPopupFlagLoginRequestMenuFactory());
}
/**
* Gets the popup menu factory for flagging login requests.
*
* @return the popup flag login request menu factory
*/
private PopupMenuItemSiteNodeContextMenuFactory getPopupFlagLoginRequestMenuFactory() {
PopupMenuItemSiteNodeContextMenuFactory popupFlagLoginRequestMenuFactory = new PopupMenuItemSiteNodeContextMenuFactory(
Constant.messages.getString("context.flag.popup")) {
private static final long serialVersionUID = 8927418764L;
@Override
public PopupMenuItemContext getContextMenu(Context context, String parentMenu) {
return new PopupMenuItemContext(context, parentMenu,
Constant.messages.getString(labelPopupMenuKey, context.getName())) {
private static final long serialVersionUID = 1967885623005183801L;
private ExtensionUserManagement usersExtension;
private Context uiSharedContext;
/**
* Make sure the user acknowledges the Users corresponding to this context will
* be deleted.
*
* @return true, if successful
*/
private boolean confirmUsersDeletion(Context uiSharedContext) {
usersExtension = Control.getSingleton().getExtensionLoader().getExtension(ExtensionUserManagement.class);
if (usersExtension != null) {
if (usersExtension.getSharedContextUsers(uiSharedContext).size() > 0) {
int choice = JOptionPane.showConfirmDialog(this, Constant.messages
.getString("authentication.dialog.confirmChange.label"),
Constant.messages
.getString("authentication.dialog.confirmChange.title"),
JOptionPane.OK_CANCEL_OPTION);
if (choice == JOptionPane.CANCEL_OPTION) {
return false;
}
}
}
return true;
}
@Override
public void performAction(SiteNode sn) {
// Manually create the UI shared contexts so any modifications are done
// on an UI shared Context, so changes can be undone by pressing Cancel
SessionDialog sessionDialog = View.getSingleton().getSessionDialog();
sessionDialog.recreateUISharedContexts(Model.getSingleton().getSession());
uiSharedContext = sessionDialog.getUISharedContext(this.getContext().getIndex());
// Do the work/changes on the UI shared context
if (isTypeForMethod(this.getContext().getAuthenticationMethod())) {
LOGGER.info("Selected new login request via PopupMenu. Changing existing " + methodName + " instance for Context "
+ getContext().getIndex());
PostBasedAuthenticationMethod method = (PostBasedAuthenticationMethod) uiSharedContext
.getAuthenticationMethod();
try {
method.setLoginRequest(sn);
} catch (Exception e) {
LOGGER.error("Failed to set login request: " + e.getMessage(), e);
return;
}
// Show the session dialog without recreating UI Shared contexts
View.getSingleton()
.showSessionDialog(
Model.getSingleton().getSession(),
ContextAuthenticationPanel
.buildName(this.getContext().getIndex()), false);
} else {
LOGGER.info("Selected new login request via PopupMenu. Creating new " + methodName + " instance for Context "
+ getContext().getIndex());
PostBasedAuthenticationMethod method = createAuthenticationMethod(getContext().getIndex());
try {
method.setLoginRequest(sn);
} catch (Exception e) {
LOGGER.error("Failed to set login request: " + e.getMessage(), e);
return;
}
if (!confirmUsersDeletion(uiSharedContext)) {
LOGGER.debug("Cancelled change of authentication type.");
return;
}
uiSharedContext.setAuthenticationMethod(method);
// Show the session dialog without recreating UI Shared contexts
// NOTE: First init the panels of the dialog so old users data gets
// loaded and just then delete the users
// from the UI data model, otherwise the 'real' users from the
// non-shared context would be loaded
// and would override any deletions made.
View.getSingleton().showSessionDialog(Model.getSingleton().getSession(),
ContextAuthenticationPanel.buildName(this.getContext().getIndex()),
false, new Runnable() {
@Override
public void run() {
// Removing the users from the 'shared context' (the UI)
// will cause their removal at
// save as well
if (usersExtension != null)
usersExtension.removeSharedContextUsers(uiSharedContext);
}
});
}
}
};
}
@Override
public int getParentMenuIndex() {
return 3;
}
};
return popupFlagLoginRequestMenuFactory;
}
@Override
public AuthenticationMethod loadMethodFromSession(Session session, int contextId) throws DatabaseException {
PostBasedAuthenticationMethod method = createAuthenticationMethod(contextId);
List<String> urls = session.getContextDataStrings(contextId, RecordContext.TYPE_AUTH_METHOD_FIELD_1);
String url = "";
if (urls != null && urls.size() > 0) {
url = urls.get(0);
}
List<String> postDatas = session.getContextDataStrings(contextId,
RecordContext.TYPE_AUTH_METHOD_FIELD_2);
String postData = null;
if (postDatas != null && postDatas.size() > 0) {
postData = postDatas.get(0);
}
try {
method.setLoginRequest(url, postData);
} catch (Exception e) {
LOGGER.error("Unable to load Post based authentication method data:", e);
}
return method;
}
@Override
public void persistMethodToSession(Session session, int contextId, AuthenticationMethod authMethod)
throws DatabaseException {
if (!(authMethod instanceof PostBasedAuthenticationMethod)) {
throw new UnsupportedAuthenticationMethodException(
"Post based authentication type only supports: " + PostBasedAuthenticationMethod.class);
}
PostBasedAuthenticationMethod method = (PostBasedAuthenticationMethod) authMethod;
session.setContextData(contextId, RecordContext.TYPE_AUTH_METHOD_FIELD_1, method.loginRequestURL);
session.setContextData(contextId, RecordContext.TYPE_AUTH_METHOD_FIELD_2, method.loginRequestBody);
}
@Override
public int getUniqueIdentifier() {
return methodIdentifier;
}
@Override
public UsernamePasswordAuthenticationCredentials createAuthenticationCredentials() {
return new UsernamePasswordAuthenticationCredentials();
}
/* API related constants and methods. */
private static final String PARAM_LOGIN_URL = "loginUrl";
private static final String PARAM_LOGIN_REQUEST_DATA = "loginRequestData";
@Override
public ApiDynamicActionImplementor getSetMethodForContextApiAction() {
String[] mandatoryParamNames;
String[] optionalParamNames;
if (postDataRequired) {
mandatoryParamNames = new String[] { PARAM_LOGIN_URL, PARAM_LOGIN_REQUEST_DATA };
optionalParamNames = null;
} else {
mandatoryParamNames = new String[] { PARAM_LOGIN_URL };
optionalParamNames = new String[] { PARAM_LOGIN_REQUEST_DATA };
}
return new ApiDynamicActionImplementor(apiMethodName, mandatoryParamNames, optionalParamNames) {
@Override
public void handleAction(JSONObject params) throws ApiException {
Context context = ApiUtils.getContextByParamId(params, AuthenticationAPI.PARAM_CONTEXT_ID);
String loginUrl = ApiUtils.getNonEmptyStringParam(params, PARAM_LOGIN_URL);
if (!isValidLoginUrl(loginUrl)) {
throw new ApiException(ApiException.Type.ILLEGAL_PARAMETER, PARAM_LOGIN_URL);
}
String postData = "";
if (postDataRequired) {
postData = ApiUtils.getNonEmptyStringParam(params, PARAM_LOGIN_REQUEST_DATA);
} else if (params.containsKey(PARAM_LOGIN_REQUEST_DATA)) {
postData = params.getString(PARAM_LOGIN_REQUEST_DATA);
}
// Set the method
PostBasedAuthenticationMethod method = createAuthenticationMethod(context.getIndex());
try {
method.setLoginRequest(loginUrl, postData);
} catch (Exception e) {
throw new ApiException(ApiException.Type.INTERNAL_ERROR, e.getMessage());
}
if (!context.getAuthenticationMethod().isSameType(method))
apiChangedAuthenticationMethodForContext(context.getIndex());
context.setAuthenticationMethod(method);
}
};
}
@Override
public ApiDynamicActionImplementor getSetCredentialsForUserApiAction() {
return UsernamePasswordAuthenticationCredentials.getSetCredentialsForUserApiAction(this);
}
@Override
public void exportData(Configuration config, AuthenticationMethod authMethod) {
if (!(authMethod instanceof PostBasedAuthenticationMethod)) {
throw new UnsupportedAuthenticationMethodException(
"Post based authentication type only supports: " + PostBasedAuthenticationMethod.class.getName());
}
PostBasedAuthenticationMethod method = (PostBasedAuthenticationMethod) authMethod;
config.setProperty(CONTEXT_CONFIG_AUTH_FORM_LOGINURL, method.loginRequestURL);
config.setProperty(CONTEXT_CONFIG_AUTH_FORM_LOGINBODY, method.loginRequestBody);
}
@Override
public void importData(Configuration config, AuthenticationMethod authMethod) throws ConfigurationException {
if (!(authMethod instanceof PostBasedAuthenticationMethod)) {
throw new UnsupportedAuthenticationMethodException(
"Post based authentication type only supports: " + PostBasedAuthenticationMethod.class.getName());
}
PostBasedAuthenticationMethod method = (PostBasedAuthenticationMethod) authMethod;
try {
method.setLoginRequest(config.getString(CONTEXT_CONFIG_AUTH_FORM_LOGINURL),
config.getString(CONTEXT_CONFIG_AUTH_FORM_LOGINBODY));
} catch (Exception e) {
throw new ConfigurationException(e);
}
}
}
| replace fresh ACSRF token value without depending on the ACSRF token
value in the first post request
| src/org/zaproxy/zap/authentication/PostBasedAuthenticationMethodType.java | replace fresh ACSRF token value without depending on the ACSRF token value in the first post request | <ide><path>rc/org/zaproxy/zap/authentication/PostBasedAuthenticationMethodType.java
<ide> // Prepare login message
<ide> HttpMessage msg;
<ide> try {
<del> msg = prepareRequestMessage(cred);
<ide> // Make sure the message will be sent with a good WebSession that can record the changes
<ide> if (user.getAuthenticatedSession() == null)
<ide> user.setAuthenticatedSession(sessionManagementMethod.createEmptyWebSession());
<add>
<add> HttpMessage loginMsgToRenewCookie = new HttpMessage(new URI(loginRequestURL, true));
<add> loginMsgToRenewCookie.setRequestingUser(user);
<add> getHttpSender().sendAndReceive(loginMsgToRenewCookie);
<add> AuthenticationHelper.addAuthMessageToHistory(loginMsgToRenewCookie);
<add>
<add> msg = prepareRequestMessage(cred);
<ide> msg.setRequestingUser(user);
<ide>
<del> replaceAntiCsrfTokenValueIfRequired(msg, user);
<add> replaceAntiCsrfTokenValueIfRequired(msg, loginMsgToRenewCookie);
<ide> } catch (Exception e) {
<ide> LOGGER.error("Unable to prepare authentication message: " + e.getMessage(), e);
<ide> return null;
<ide> }
<ide>
<ide> /**
<del> * Modifies the input {@code requestMessage} by replacing fresh anti-CSRF token value in the request body.
<del> * It first checks if the input {@code requestMessage} has an anti-CSRF token.
<del> * If yes, then it makes a {@code GET} request to the login page in order to renew the anti-CSRF token.
<del> * Then it modifies the input {@code requestMessage} with the regenerated anti-CSRF token value.
<del> * If the first {@code POST} login request does not have anti-CSRF token
<add> * <strong>Modifies</strong> the input {@code requestMessage} by replacing
<add> * old anti-CSRF(ACSRF) token value with the fresh one in the request body.
<add> * It first checks if the input {@code loginMsgWithFreshAcsrfToken} has any ACSRF token.
<add> * If yes, then it modifies the input {@code requestMessage} with the fresh ACSRF token value.
<add> * If the {@code loginMsgWithFreshAcsrfToken} does not have any ACSRF token
<ide> * then the input {@code requestMessage} is left as it is.
<add> * <p>
<add> * This logic relies on {@code ExtensionAntiCSRF} to extract the ACSRF token value from the response.
<add> * If {@code ExtensionAntiCSRF} is not available for some reason, no further processing is done.
<ide> *
<del> * @param requestMessage the login request message with correct credential
<del> * @param user the user of the context
<del> * @throws IOException if problem occurs when sending login request to get login page.
<add> * @param requestMessage the login ({@code POST})request message with correct credentials
<add> * @param loginMsgWithFreshAcsrfToken the {@code HttpMessage} of the login page(form) with fresh cookie and ACSRF token.
<ide> */
<del> private void replaceAntiCsrfTokenValueIfRequired(HttpMessage requestMessage, User user) throws IOException {
<add> private void replaceAntiCsrfTokenValueIfRequired(HttpMessage requestMessage, HttpMessage loginMsgWithFreshAcsrfToken) {
<ide> if(extAntiCsrf == null) {
<ide> extAntiCsrf = Control.getSingleton().getExtensionLoader().getExtension(ExtensionAntiCSRF.class);
<ide> }
<del> List<AntiCsrfToken> antiCsrfTokensOfFirstLoginMsg = null;
<add> List<AntiCsrfToken> freshAcsrfTokens = null;
<ide> if(extAntiCsrf != null) {
<del> antiCsrfTokensOfFirstLoginMsg = extAntiCsrf.getTokens(requestMessage);
<del> }
<del> AntiCsrfToken antiCsrfTokenOfFirstLoginMsg = null;
<del> if(antiCsrfTokensOfFirstLoginMsg != null && antiCsrfTokensOfFirstLoginMsg.size() > 0) {
<del> antiCsrfTokenOfFirstLoginMsg = antiCsrfTokensOfFirstLoginMsg.get(0);
<add> freshAcsrfTokens = extAntiCsrf.getTokensFromResponse(loginMsgWithFreshAcsrfToken);
<add> } else {
<add> LOGGER.debug("ExtensionAntiCSRF is not available, skipping ACSRF replacing task");
<add> return;
<add> }
<add> if(freshAcsrfTokens == null || freshAcsrfTokens.size() == 0) {
<add> if(LOGGER.isDebugEnabled()) {
<add> LOGGER.debug("No ACSRF token found in the response of " + loginMsgWithFreshAcsrfToken.getRequestHeader());
<add> }
<add> return;
<add> }
<add>
<add> if(LOGGER.isDebugEnabled()) {
<add> LOGGER.debug("The login page has " + freshAcsrfTokens.size() + " ACSRF token(s)");
<ide> }
<ide>
<del> if (antiCsrfTokenOfFirstLoginMsg != null) {
<del> HttpMessage loginMsgToRegenerateAntiCsrfToken = antiCsrfTokenOfFirstLoginMsg.getMsg().cloneAll();
<del> loginMsgToRegenerateAntiCsrfToken.setRequestingUser(user);
<del>
<del> // Clear any session identifiers
<del> loginMsgToRegenerateAntiCsrfToken.getRequestHeader().setHeader(HttpRequestHeader.COOKIE, null);
<del>
<del> getHttpSender().sendAndReceive(loginMsgToRegenerateAntiCsrfToken);
<del> AuthenticationHelper.addAuthMessageToHistory(loginMsgToRegenerateAntiCsrfToken);
<del>
<del> String regeneratedAntiCsrfTokenValue = extAntiCsrf.getTokenValue(loginMsgToRegenerateAntiCsrfToken, antiCsrfTokenOfFirstLoginMsg.getName());
<del> String requestBody = requestMessage.getRequestBody().toString();
<del> if (regeneratedAntiCsrfTokenValue != null) {
<del> requestBody = requestBody.replace(
<del> antiCsrfTokenOfFirstLoginMsg.getValue(), paramEncoder.apply(regeneratedAntiCsrfTokenValue));
<del> requestMessage.getRequestBody().setBody(requestBody);
<del> }
<add> String postRequestBody = requestMessage.getRequestBody().toString();
<add> Map<String, String> parameters = extractParametersFromPostData(postRequestBody);
<add> if(parameters != null) {
<add> String oldAcsrfTokenValue = null;
<add> String replacedPostData = null;
<add> for (AntiCsrfToken antiCsrfToken : freshAcsrfTokens) {
<add> oldAcsrfTokenValue = parameters.get(antiCsrfToken.getName());
<add> replacedPostData = postRequestBody.replace(oldAcsrfTokenValue, antiCsrfToken.getValue());
<add>
<add> if(LOGGER.isDebugEnabled()) {
<add> LOGGER.debug("replaced " + oldAcsrfTokenValue + " old ACSRF token value with " + antiCsrfToken.getValue());
<add> }
<add> }
<add> requestMessage.getRequestBody().setBody(replacedPostData);
<add> } else {
<add> LOGGER.debug("ACSRF token found but could not replace old value with fresh value");
<add> }
<add> }
<add>
<add> private Map<String, String> extractParametersFromPostData(String postRequestBody) {
<add> Context context = Model.getSingleton().getSession().getContextsForUrl(loginRequestURL).get(0);
<add> if(context != null) {
<add> return context.getPostParamParser().parse(postRequestBody);
<add> } else {
<add> return null;
<ide> }
<ide> }
<ide> |
|
Java | mit | 00182d5c500457e840df98b2af763a83b1df8848 | 0 | andreasb242/settlers-remake,phirschbeck/settlers-remake,andreas-eberle/settlers-remake,jsettlers/settlers-remake,jsettlers/settlers-remake,andreasb242/settlers-remake,phirschbeck/settlers-remake,Peter-Maximilian/settlers-remake,phirschbeck/settlers-remake,andreas-eberle/settlers-remake,JKatzwinkel/settlers-remake,jsettlers/settlers-remake,andreas-eberle/settlers-remake,andreasb242/settlers-remake | package jsettlers.algorithms;
import jsettlers.common.material.ESearchType;
import jsettlers.common.position.ISPosition2D;
import jsettlers.common.position.ShortPoint2D;
import jsettlers.logic.algorithms.path.IPathCalculateable;
import jsettlers.logic.algorithms.path.Path;
import jsettlers.logic.algorithms.path.astar.HexAStar;
import jsettlers.logic.algorithms.path.dijkstra.DijkstraAlgorithm;
import jsettlers.logic.algorithms.path.dijkstra.IDijkstraPathMap;
import jsettlers.logic.algorithms.path.test.DummyEmptyAStarMap;
public class SimpleDijkstraTester {
private static final short WIDTH = (short) 200;
private static final short HEIGHT = (short) 200;
public static void main(String args[]) {
IDijkstraPathMap map = new IDijkstraPathMap() {
@Override
public boolean fitsSearchType(short x, short y, ESearchType type, IPathCalculateable requester) {
if (x == 120 && y == 100)
return true;
if (x == 110 && y == 110)
return true;
if (x == 118 && y == 115)
return true;
return false;
}
@Override
public void setDijkstraSearched(short x, short y) {
}
};
DummyEmptyAStarMap aStarMap = new DummyEmptyAStarMap(WIDTH, HEIGHT);
aStarMap.setBlocked(120, 100, true);
DijkstraAlgorithm dijkstra = new DijkstraAlgorithm(map, new HexAStar(aStarMap, WIDTH, HEIGHT), WIDTH, HEIGHT);
IPathCalculateable requester = new IPathCalculateable() {
@Override
public ISPosition2D getPos() {
return new ShortPoint2D(100, 100);
}
@Override
public byte getPlayer() {
// TODO Auto-generated method stub
return 0;
}
@Override
public boolean needsPlayersGround() {
return false;
}
};
Path path = dijkstra.find(requester, (short) 100, (short) 100, (short) 1, (short) 30, null);
System.out.println("path: " + path);
}
}
| src/jsettlers/algorithms/SimpleDijkstraTester.java | package jsettlers.algorithms;
import jsettlers.common.material.ESearchType;
import jsettlers.common.position.ISPosition2D;
import jsettlers.common.position.ShortPoint2D;
import jsettlers.logic.algorithms.path.IPathCalculateable;
import jsettlers.logic.algorithms.path.Path;
import jsettlers.logic.algorithms.path.astar.HexAStar;
import jsettlers.logic.algorithms.path.dijkstra.IDijkstraPathMap;
import jsettlers.logic.algorithms.path.dijkstra.DijkstraAlgorithm;
import jsettlers.logic.algorithms.path.test.DummyEmptyAStarMap;
public class SimpleDijkstraTester {
public static void main(String args[]) {
IDijkstraPathMap map = new IDijkstraPathMap() {
@Override
public short getHeight() {
return 200;
}
@Override
public short getWidth() {
return 200;
}
@Override
public boolean fitsSearchType(short x, short y, ESearchType type, IPathCalculateable requester) {
if (x == 120 && y == 100)
return true;
if (x == 110 && y == 110)
return true;
if (x == 118 && y == 115)
return true;
return false;
}
@Override
public void setDijkstraSearched(short x, short y) {
}
};
DummyEmptyAStarMap aStarMap = new DummyEmptyAStarMap((short) 200, (short) 200);
aStarMap.setBlocked(120, 100, true);
DijkstraAlgorithm dijkstra = new DijkstraAlgorithm(map, new HexAStar(aStarMap));
IPathCalculateable requester = new IPathCalculateable() {
@Override
public ISPosition2D getPos() {
return new ShortPoint2D(100, 100);
}
@Override
public byte getPlayer() {
// TODO Auto-generated method stub
return 0;
}
@Override
public boolean needsPlayersGround() {
return false;
}
};
Path path = dijkstra.find(requester, (short) 100, (short) 100, (short) 1, (short) 30, null);
System.out.println("path: " + path);
}
}
| - minor performance improvements (finaled methods to get inlined, removed unneccessary method calls)
| src/jsettlers/algorithms/SimpleDijkstraTester.java | - minor performance improvements (finaled methods to get inlined, removed unneccessary method calls) | <ide><path>rc/jsettlers/algorithms/SimpleDijkstraTester.java
<ide> import jsettlers.logic.algorithms.path.IPathCalculateable;
<ide> import jsettlers.logic.algorithms.path.Path;
<ide> import jsettlers.logic.algorithms.path.astar.HexAStar;
<add>import jsettlers.logic.algorithms.path.dijkstra.DijkstraAlgorithm;
<ide> import jsettlers.logic.algorithms.path.dijkstra.IDijkstraPathMap;
<del>import jsettlers.logic.algorithms.path.dijkstra.DijkstraAlgorithm;
<ide> import jsettlers.logic.algorithms.path.test.DummyEmptyAStarMap;
<ide>
<ide> public class SimpleDijkstraTester {
<add> private static final short WIDTH = (short) 200;
<add> private static final short HEIGHT = (short) 200;
<add>
<ide> public static void main(String args[]) {
<ide> IDijkstraPathMap map = new IDijkstraPathMap() {
<del> @Override
<del> public short getHeight() {
<del> return 200;
<del> }
<del>
<del> @Override
<del> public short getWidth() {
<del> return 200;
<del> }
<del>
<ide> @Override
<ide> public boolean fitsSearchType(short x, short y, ESearchType type, IPathCalculateable requester) {
<ide> if (x == 120 && y == 100)
<ide> public void setDijkstraSearched(short x, short y) {
<ide> }
<ide> };
<del> DummyEmptyAStarMap aStarMap = new DummyEmptyAStarMap((short) 200, (short) 200);
<add> DummyEmptyAStarMap aStarMap = new DummyEmptyAStarMap(WIDTH, HEIGHT);
<ide> aStarMap.setBlocked(120, 100, true);
<ide>
<del> DijkstraAlgorithm dijkstra = new DijkstraAlgorithm(map, new HexAStar(aStarMap));
<add> DijkstraAlgorithm dijkstra = new DijkstraAlgorithm(map, new HexAStar(aStarMap, WIDTH, HEIGHT), WIDTH, HEIGHT);
<ide>
<ide> IPathCalculateable requester = new IPathCalculateable() {
<ide> |
|
JavaScript | mit | 6c19a1b420c494838427a93b51406d2ec678c8fb | 0 | mbinet/Hypertube | /**
* Created by mbinet on 3/27/17.
*/
import cookie from 'react-cookie'
function getLang() {
var user;
if (user = cookie.load('user')) {
if (user[0] == 'j') {
user = user.substr(2)
user = JSON.parse(user)
}
if (user.profile)
return (user.profile.lang)
else
return ('en')
}
else {
return ('en')
}
}
export default getLang;
| app/utils/lang.js | /**
* Created by mbinet on 3/27/17.
*/
import cookie from 'react-cookie'
function getLang() {
var user;
if (user = cookie.load('user')) {
return (user.profile.lang)
}
else {
return ('en')
}
}
export default getLang;
| Fix 'j:' issue on cookie
| app/utils/lang.js | Fix 'j:' issue on cookie | <ide><path>pp/utils/lang.js
<ide>
<ide> var user;
<ide> if (user = cookie.load('user')) {
<del> return (user.profile.lang)
<add> if (user[0] == 'j') {
<add> user = user.substr(2)
<add> user = JSON.parse(user)
<add> }
<add> if (user.profile)
<add> return (user.profile.lang)
<add> else
<add> return ('en')
<ide> }
<ide> else {
<ide> return ('en') |
|
Java | apache-2.0 | 6a8a7302f4ab74e47a94170236697d96d67304c9 | 0 | pcollaog/velocity-engine,diydyq/velocity-engine,diydyq/velocity-engine,pcollaog/velocity-engine | package org.apache.velocity.test;
/*
* The Apache Software License, Version 1.1
*
* Copyright (c) 2000 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The end-user documentation included with the redistribution, if
* any, must include the following acknowlegement:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowlegement may appear in the software itself,
* if and wherever such third-party acknowlegements normally appear.
*
* 4. The names "The Jakarta Project", "Velocity", and "Apache Software
* Foundation" must not be used to endorse or promote products derived
* from this software without prior written permission. For written
* permission, please contact [email protected].
*
* 5. Products derived from this software may not be called "Apache"
* nor may "Apache" appear in their names without prior written
* permission of the Apache Group.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*/
import java.io.*;
import java.util.ArrayList;
import java.util.Hashtable;
import junit.framework.*;
import org.apache.velocity.Context;
import org.apache.velocity.Template;
import org.apache.velocity.test.provider.TestProvider;
import org.apache.velocity.runtime.Runtime;
import org.apache.velocity.io.FastWriter;
import org.apache.velocity.util.StringUtils;
/**
* Easily add test cases which evaluate templates and check their output.
*
* @author <a href="mailto:[email protected]">Daniel Rall</a>
* @author <a href="mailto:[email protected]">Jason van Zyl</a>
* @version $Id: TemplateTestCase.java,v 1.12 2000/10/26 22:06:22 dlr Exp $
*/
public class TemplateTestCase extends RuntimeTestCase
{
/**
* VTL file extension.
*/
private static final String TMPL_FILE_EXT = "vm";
/**
* Comparison file extension.
*/
private static final String CMP_FILE_EXT = "cmp";
/**
* Comparison file extension.
*/
private static final String RESULT_FILE_EXT = "res";
/**
* Results relative to the build directory.
*/
private static final String RESULT_DIR = "../test/templates/results";
/**
* Results relative to the build directory.
*/
private static final String COMPARE_DIR = "../test/templates/compare";
/**
* The base file name of the template and comparison file (i.e. array for
* array.vm and array.cmp).
*/
protected String baseFileName;
/**
* The writer used to output evaluated templates.
*/
private FastWriter writer;
private TestProvider provider;
private ArrayList al;
private Hashtable h;
private Context context;
/**
* Creates a new instance.
*
* @param baseFileName The base name of the template and comparison file to
* use (i.e. array for array.vm and array.cmp).
*/
public TemplateTestCase (String baseFileName)
{
super(getTestCaseName(baseFileName));
this.baseFileName = baseFileName;
}
/**
* Sets up the test.
*/
protected void setUp ()
{
provider = new TestProvider();
al = provider.getCustomers();
h = new Hashtable();
h.put("Bar", "this is from a hashtable!");
context = new Context();
context.put("provider", provider);
context.put("name", "jason");
context.put("providers", provider.getCustomers2());
context.put("list", al);
context.put("hashtable", h);
context.put("search", provider.getSearch());
context.put("relatedSearches", provider.getRelSearches());
context.put("searchResults", provider.getRelSearches());
}
/**
* Runs the test.
*/
public void runTest ()
{
try
{
Template template = Runtime.getTemplate
(getFileName(null, baseFileName, TMPL_FILE_EXT));
assureResultsDirectoryExists();
template.merge(context, getWriter(new FileOutputStream
(getFileName(RESULT_DIR, baseFileName, RESULT_FILE_EXT))));
closeWriter();
if (!isMatch())
{
fail("Processed template did not match expected output");
}
}
catch (Exception e)
{
fail(e.getMessage());
}
}
/**
* Concatenates the file name parts together appropriately.
*
* @return The full path to the file.
*/
private static String getFileName (String dir, String base, String ext)
{
StringBuffer buf = new StringBuffer();
if (dir != null)
{
buf.append(dir).append('/');
}
buf.append(base).append('.').append(ext);
return buf.toString();
}
/**
* Assures that the results directory exists. If the results directory
* cannot be created, fails the test.
*/
private static void assureResultsDirectoryExists ()
{
File resultDir = new File(RESULT_DIR);
if (!resultDir.exists())
{
Runtime.info("Template results directory did not exist");
if (resultDir.mkdirs())
{
Runtime.info("Created template results directory");
}
else
{
String errMsg = "Unable to create template results directory";
Runtime.warn(errMsg);
fail(errMsg);
}
}
}
/**
* Turns a base file name into a test case name.
*
* @param s The base file name.
* @return The test case name.
*/
private static final String getTestCaseName (String s)
{
StringBuffer name = new StringBuffer();
name.append(Character.toTitleCase(s.charAt(0)));
name.append(s.substring(1, s.length()).toLowerCase());
return name.toString();
}
/**
* Returns whether the processed template matches the content of the
* provided comparison file.
*
* @return Whether the output matches the contents of the comparison file.
*
* @exception Exception Test failure condition.
*/
protected boolean isMatch () throws Exception
{
String result = StringUtils.fileContentsToString
(getFileName(RESULT_DIR, baseFileName, RESULT_FILE_EXT));
String compare = StringUtils.fileContentsToString
(getFileName(COMPARE_DIR, baseFileName, CMP_FILE_EXT));
return result.equals(compare);
}
/**
* Performs cleanup activities for this test case.
*/
protected void tearDown () throws Exception
{
// No op.
}
/**
* Returns a <code>FastWriter</code> instance.
*
* @param out The output stream for the writer to write to. If
* <code>null</code>, defaults to <code>System.out</code>.
* @return The writer.
*/
protected Writer getWriter (OutputStream out)
throws UnsupportedEncodingException, IOException
{
if (writer == null)
{
if (out == null)
{
out = System.out;
}
writer = new FastWriter
(out, Runtime.getString(Runtime.TEMPLATE_ENCODING));
writer.setAsciiHack
(Runtime.getBoolean(Runtime.TEMPLATE_ASCIIHACK));
}
return writer;
}
/**
* Closes the writer (if it has been opened).
*/
protected void closeWriter ()
throws IOException
{
if (writer != null)
{
writer.flush();
writer.close();
}
}
}
| src/java/org/apache/velocity/test/TemplateTestCase.java | package org.apache.velocity.test;
/*
* The Apache Software License, Version 1.1
*
* Copyright (c) 2000 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The end-user documentation included with the redistribution, if
* any, must include the following acknowlegement:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowlegement may appear in the software itself,
* if and wherever such third-party acknowlegements normally appear.
*
* 4. The names "The Jakarta Project", "Velocity", and "Apache Software
* Foundation" must not be used to endorse or promote products derived
* from this software without prior written permission. For written
* permission, please contact [email protected].
*
* 5. Products derived from this software may not be called "Apache"
* nor may "Apache" appear in their names without prior written
* permission of the Apache Group.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*/
import java.io.*;
import java.util.ArrayList;
import java.util.Hashtable;
import junit.framework.*;
import org.apache.velocity.Context;
import org.apache.velocity.Template;
import org.apache.velocity.test.provider.TestProvider;
import org.apache.velocity.runtime.Runtime;
import org.apache.velocity.io.FastWriter;
import org.apache.velocity.util.StringUtils;
/**
* Easily add test cases which evaluate templates and check their output.
*
* @author <a href="mailto:[email protected]">Daniel Rall</a>
* @author <a href="mailto:[email protected]">Jason van Zyl</a>
* @version $Id: TemplateTestCase.java,v 1.11 2000/10/25 23:25:54 dlr Exp $
*/
public class TemplateTestCase extends RuntimeTestCase
{
/**
* VTL file extension.
*/
private static final String TMPL_FILE_EXT = "vm";
/**
* Comparison file extension.
*/
private static final String CMP_FILE_EXT = "cmp";
/**
* Comparison file extension.
*/
private static final String RESULT_FILE_EXT = "res";
/**
* Results relative to the build directory.
*/
private static final String RESULT_DIR = "../test/templates/results";
/**
* Results relative to the build directory.
*/
private static final String COMPARE_DIR = "../test/templates/compare";
/**
* The base file name of the template and comparison file (i.e. array for
* array.vm and array.cmp).
*/
protected String baseFileName;
/**
* The writer used to output evaluated templates.
*/
private FastWriter writer;
private TestProvider provider;
private ArrayList al;
private Hashtable h;
private Context context;
/**
* Creates a new instance.
*
* @param baseFileName The base name of the template and comparison file to
* use (i.e. array for array.vm and array.cmp).
*/
public TemplateTestCase (String baseFileName)
{
super(getTestCaseName(baseFileName));
this.baseFileName = baseFileName;
}
/**
* Sets up the test.
*/
protected void setUp ()
{
provider = new TestProvider();
al = provider.getCustomers();
h = new Hashtable();
h.put("Bar", "this is from a hashtable!");
context = new Context();
context.put("provider", provider);
context.put("name", "jason");
context.put("providers", provider.getCustomers2());
context.put("list", al);
context.put("hashtable", h);
context.put("search", provider.getSearch());
context.put("relatedSearches", provider.getRelSearches());
context.put("searchResults", provider.getRelSearches());
}
/**
* Runs the test.
*/
public void runTest ()
{
try
{
Template template = Runtime.getTemplate
(getFileName(null, baseFileName, TMPL_FILE_EXT));
template.merge(context, getWriter(new FileOutputStream
(getFileName(RESULT_DIR, baseFileName, RESULT_FILE_EXT))));
closeWriter();
if (!isMatch())
{
fail("Processed template did not match expected output");
}
}
catch (Exception e)
{
fail(e.getMessage());
}
}
/**
* Concatenates the file name parts together appropriately.
*
* @return The full path to the file.
*/
private String getFileName (String dir, String base, String ext)
{
StringBuffer buf = new StringBuffer();
if (dir != null)
{
buf.append(dir).append('/');
}
buf.append(base).append('.').append(ext);
return buf.toString();
}
/**
* Turns a base file name into a test case name.
*
* @param s The base file name.
* @return The test case name.
*/
private static final String getTestCaseName (String s)
{
StringBuffer name = new StringBuffer();
name.append(Character.toTitleCase(s.charAt(0)));
name.append(s.substring(1, s.length()).toLowerCase());
return name.toString();
}
/**
* Returns whether the processed template matches the content of the
* provided comparison file.
*
* @return Whether the output matches the contents of the comparison file.
*
* @exception Exception Test failure condition.
*/
protected boolean isMatch () throws Exception
{
String result = StringUtils.fileContentsToString
(getFileName(RESULT_DIR, baseFileName, RESULT_FILE_EXT));
String compare = StringUtils.fileContentsToString
(getFileName(COMPARE_DIR, baseFileName, CMP_FILE_EXT));
return result.equals(compare);
}
/**
* Performs cleanup activities for this test case.
*/
protected void tearDown () throws Exception
{
// No op.
}
/**
* Returns a <code>FastWriter</code> instance.
*
* @param out The output stream for the writer to write to. If
* <code>null</code>, defaults to <code>System.out</code>.
* @return The writer.
*/
protected Writer getWriter (OutputStream out)
throws UnsupportedEncodingException, IOException
{
if (writer == null)
{
if (out == null)
{
out = System.out;
}
writer = new FastWriter
(out, Runtime.getString(Runtime.TEMPLATE_ENCODING));
writer.setAsciiHack
(Runtime.getBoolean(Runtime.TEMPLATE_ASCIIHACK));
}
return writer;
}
/**
* Closes the writer (if it has been opened).
*/
protected void closeWriter ()
throws IOException
{
if (writer != null)
{
writer.flush();
writer.close();
}
}
}
| Assure that the results directory exists.
git-svn-id: 7267684f36935cb3df12efc1f4c0216d758271d4@73449 13f79535-47bb-0310-9956-ffa450edef68
| src/java/org/apache/velocity/test/TemplateTestCase.java | Assure that the results directory exists. | <ide><path>rc/java/org/apache/velocity/test/TemplateTestCase.java
<ide> *
<ide> * @author <a href="mailto:[email protected]">Daniel Rall</a>
<ide> * @author <a href="mailto:[email protected]">Jason van Zyl</a>
<del> * @version $Id: TemplateTestCase.java,v 1.11 2000/10/25 23:25:54 dlr Exp $
<add> * @version $Id: TemplateTestCase.java,v 1.12 2000/10/26 22:06:22 dlr Exp $
<ide> */
<ide> public class TemplateTestCase extends RuntimeTestCase
<ide> {
<ide> {
<ide> Template template = Runtime.getTemplate
<ide> (getFileName(null, baseFileName, TMPL_FILE_EXT));
<add> assureResultsDirectoryExists();
<ide> template.merge(context, getWriter(new FileOutputStream
<ide> (getFileName(RESULT_DIR, baseFileName, RESULT_FILE_EXT))));
<ide> closeWriter();
<ide> *
<ide> * @return The full path to the file.
<ide> */
<del> private String getFileName (String dir, String base, String ext)
<add> private static String getFileName (String dir, String base, String ext)
<ide> {
<ide> StringBuffer buf = new StringBuffer();
<ide> if (dir != null)
<ide> }
<ide> buf.append(base).append('.').append(ext);
<ide> return buf.toString();
<add> }
<add>
<add> /**
<add> * Assures that the results directory exists. If the results directory
<add> * cannot be created, fails the test.
<add> */
<add> private static void assureResultsDirectoryExists ()
<add> {
<add> File resultDir = new File(RESULT_DIR);
<add> if (!resultDir.exists())
<add> {
<add> Runtime.info("Template results directory did not exist");
<add> if (resultDir.mkdirs())
<add> {
<add> Runtime.info("Created template results directory");
<add> }
<add> else
<add> {
<add> String errMsg = "Unable to create template results directory";
<add> Runtime.warn(errMsg);
<add> fail(errMsg);
<add> }
<add> }
<ide> }
<ide>
<ide> /** |
|
Java | apache-2.0 | 88345f3b2e8013e6245febbed8db0417b55402f2 | 0 | OpenMaths/parboiled,1986HlaMin/parboiled,sirthias/parboiled,parboiled1/parboiled | /*
* Copyright (C) 2009-2011 Mathias Doenitz
*
* 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 org.parboiled.errors;
import static org.parboiled.common.Preconditions.*;
import org.parboiled.buffers.InputBuffer;
import org.parboiled.common.Formatter;
import org.parboiled.common.StringUtils;
import org.parboiled.matchers.Matcher;
import org.parboiled.matchers.TestNotMatcher;
import org.parboiled.support.MatcherPath;
import org.parboiled.support.ParsingResult;
import org.parboiled.support.Position;
import java.util.ArrayList;
import java.util.List;
import java.util.ListIterator;
/**
* General utility methods regarding parse errors.
*/
public final class ErrorUtils {
private ErrorUtils() {}
/**
* Finds the Matcher in the given failedMatcherPath whose label is best for presentation in "expected" strings
* of parse error messages, given the provided lastMatchPath.
*
* @param path the path to the failed matcher
* @param errorIndex the start index of the respective parse error
* @return the matcher whose label is best for presentation in "expected" strings
*/
static Matcher findProperLabelMatcher(MatcherPath path, int errorIndex) {
checkArgNotNull(path, "path");
List<MatcherPath.Element> elements = new ArrayList<MatcherPath.Element>();
for (MatcherPath cur = path; cur.parent != null; cur = cur.parent) {
elements.add(cur.element);
}
ListIterator<MatcherPath.Element> li = elements.listIterator(elements.size());
while (li.hasPrevious()) {
MatcherPath.Element element = li.previous();
if (element.matcher instanceof TestNotMatcher) {
return null;
}
if (element.startIndex == errorIndex && element.matcher.hasCustomLabel()) {
return path.element.matcher;
}
}
return null;
}
/**
* Pretty prints the parse errors of the given ParsingResult showing their location in the given input buffer.
*
* @param parsingResult the parsing result
* @return the pretty print text
*/
public static String printParseErrors(ParsingResult<?> parsingResult) {
checkArgNotNull(parsingResult, "parsingResult");
return printParseErrors(parsingResult.parseErrors);
}
/**
* Pretty prints the given parse errors showing their location in the given input buffer.
*
* @param errors the parse errors
* @return the pretty print text
*/
public static String printParseErrors(List<ParseError> errors) {
checkArgNotNull(errors, "errors");
StringBuilder sb = new StringBuilder();
for (ParseError error : errors) {
if (sb.length() > 0) sb.append("---\n");
sb.append(printParseError(error));
}
return sb.toString();
}
/**
* Pretty prints the given parse error showing its location in the given input buffer.
*
* @param error the parse error
* @return the pretty print text
*/
public static String printParseError(ParseError error) {
checkArgNotNull(error, "error");
return printParseError(error, new DefaultInvalidInputErrorFormatter());
}
/**
* Pretty prints the given parse error showing its location in the given input buffer.
*
* @param error the parse error
* @param formatter the formatter for InvalidInputErrors
* @return the pretty print text
*/
public static String printParseError(ParseError error, Formatter<InvalidInputError> formatter) {
checkArgNotNull(error, "error");
checkArgNotNull(formatter, "formatter");
String message = error.getErrorMessage() != null ? error.getErrorMessage() :
error instanceof InvalidInputError ?
formatter.format((InvalidInputError) error) : error.getClass().getSimpleName();
return printErrorMessage("%s (line %s, pos %s):", message,
error.getStartIndex(), error.getEndIndex(), error.getInputBuffer());
}
/**
* Prints an error message showing a location in the given InputBuffer.
*
* @param format the format string, must include three placeholders for a string
* (the error message) and two integers (the error line / column respectively)
* @param errorMessage the error message
* @param errorIndex the error location as an index into the inputBuffer
* @param inputBuffer the underlying InputBuffer
* @return the error message including the relevant line from the underlying input plus location indicator
*/
public static String printErrorMessage(String format, String errorMessage, int errorIndex,
InputBuffer inputBuffer) {
checkArgNotNull(inputBuffer, "inputBuffer");
return printErrorMessage(format, errorMessage, errorIndex, errorIndex + 1, inputBuffer);
}
/**
* Prints an error message showing a location in the given InputBuffer.
*
* @param format the format string, must include three placeholders for a string
* (the error message) and two integers (the error line / column respectively)
* @param errorMessage the error message
* @param startIndex the start location of the error as an index into the inputBuffer
* @param endIndex the end location of the error as an index into the inputBuffer
* @param inputBuffer the underlying InputBuffer
* @return the error message including the relevant line from the underlying input plus location indicators
*/
public static String printErrorMessage(String format, String errorMessage, int startIndex, int endIndex,
InputBuffer inputBuffer) {
checkArgNotNull(inputBuffer, "inputBuffer");
checkArgument(startIndex <= endIndex);
Position pos = inputBuffer.getPosition(startIndex);
StringBuilder sb = new StringBuilder(String.format(format, errorMessage, pos.line, pos.column));
sb.append('\n');
String line = inputBuffer.extractLine(pos.line);
sb.append(line);
sb.append('\n');
int charCount = Math.max(Math.min(endIndex - startIndex, StringUtils.length(line) - pos.column + 2), 1);
for (int i = 0; i < pos.column - 1; i++) sb.append(' ');
for (int i = 0; i < charCount; i++) sb.append('^');
sb.append("\n");
return sb.toString();
}
}
| parboiled-core/src/main/java/org/parboiled/errors/ErrorUtils.java | /*
* Copyright (C) 2009-2011 Mathias Doenitz
*
* 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 org.parboiled.errors;
import static org.parboiled.common.Preconditions.*;
import org.parboiled.buffers.InputBuffer;
import org.parboiled.common.Formatter;
import org.parboiled.common.StringUtils;
import org.parboiled.matchers.Matcher;
import org.parboiled.support.MatcherPath;
import org.parboiled.support.ParsingResult;
import org.parboiled.support.Position;
import java.util.List;
/**
* General utility methods regarding parse errors.
*/
public final class ErrorUtils {
private ErrorUtils() {}
/**
* Finds the Matcher in the given failedMatcherPath whose label is best for presentation in "expected" strings
* of parse error messages, given the provided lastMatchPath.
*
* @param path the path to the failed matcher
* @param errorIndex the start index of the respective parse error
* @return the matcher whose label is best for presentation in "expected" strings
*/
static Matcher findProperLabelMatcher(MatcherPath path, int errorIndex) {
checkArgNotNull(path, "path");
Matcher found = path.parent != null ? findProperLabelMatcher(path.parent, errorIndex) : null;
if (found != null) return found;
if (path.element.startIndex == errorIndex && path.element.matcher.hasCustomLabel()) {
return path.element.matcher;
}
return null;
}
/**
* Pretty prints the parse errors of the given ParsingResult showing their location in the given input buffer.
*
* @param parsingResult the parsing result
* @return the pretty print text
*/
public static String printParseErrors(ParsingResult<?> parsingResult) {
checkArgNotNull(parsingResult, "parsingResult");
return printParseErrors(parsingResult.parseErrors);
}
/**
* Pretty prints the given parse errors showing their location in the given input buffer.
*
* @param errors the parse errors
* @return the pretty print text
*/
public static String printParseErrors(List<ParseError> errors) {
checkArgNotNull(errors, "errors");
StringBuilder sb = new StringBuilder();
for (ParseError error : errors) {
if (sb.length() > 0) sb.append("---\n");
sb.append(printParseError(error));
}
return sb.toString();
}
/**
* Pretty prints the given parse error showing its location in the given input buffer.
*
* @param error the parse error
* @return the pretty print text
*/
public static String printParseError(ParseError error) {
checkArgNotNull(error, "error");
return printParseError(error, new DefaultInvalidInputErrorFormatter());
}
/**
* Pretty prints the given parse error showing its location in the given input buffer.
*
* @param error the parse error
* @param formatter the formatter for InvalidInputErrors
* @return the pretty print text
*/
public static String printParseError(ParseError error, Formatter<InvalidInputError> formatter) {
checkArgNotNull(error, "error");
checkArgNotNull(formatter, "formatter");
String message = error.getErrorMessage() != null ? error.getErrorMessage() :
error instanceof InvalidInputError ?
formatter.format((InvalidInputError) error) : error.getClass().getSimpleName();
return printErrorMessage("%s (line %s, pos %s):", message,
error.getStartIndex(), error.getEndIndex(), error.getInputBuffer());
}
/**
* Prints an error message showing a location in the given InputBuffer.
*
* @param format the format string, must include three placeholders for a string
* (the error message) and two integers (the error line / column respectively)
* @param errorMessage the error message
* @param errorIndex the error location as an index into the inputBuffer
* @param inputBuffer the underlying InputBuffer
* @return the error message including the relevant line from the underlying input plus location indicator
*/
public static String printErrorMessage(String format, String errorMessage, int errorIndex,
InputBuffer inputBuffer) {
checkArgNotNull(inputBuffer, "inputBuffer");
return printErrorMessage(format, errorMessage, errorIndex, errorIndex + 1, inputBuffer);
}
/**
* Prints an error message showing a location in the given InputBuffer.
*
* @param format the format string, must include three placeholders for a string
* (the error message) and two integers (the error line / column respectively)
* @param errorMessage the error message
* @param startIndex the start location of the error as an index into the inputBuffer
* @param endIndex the end location of the error as an index into the inputBuffer
* @param inputBuffer the underlying InputBuffer
* @return the error message including the relevant line from the underlying input plus location indicators
*/
public static String printErrorMessage(String format, String errorMessage, int startIndex, int endIndex,
InputBuffer inputBuffer) {
checkArgNotNull(inputBuffer, "inputBuffer");
checkArgument(startIndex <= endIndex);
Position pos = inputBuffer.getPosition(startIndex);
StringBuilder sb = new StringBuilder(String.format(format, errorMessage, pos.line, pos.column));
sb.append('\n');
String line = inputBuffer.extractLine(pos.line);
sb.append(line);
sb.append('\n');
int charCount = Math.max(Math.min(endIndex - startIndex, StringUtils.length(line) - pos.column + 2), 1);
for (int i = 0; i < pos.column - 1; i++) sb.append(' ');
for (int i = 0; i < charCount; i++) sb.append('^');
sb.append("\n");
return sb.toString();
}
}
| Fix TestNot reporting issue
Does not accept labeled matchers existing below a TestNot matcher
| parboiled-core/src/main/java/org/parboiled/errors/ErrorUtils.java | Fix TestNot reporting issue | <ide><path>arboiled-core/src/main/java/org/parboiled/errors/ErrorUtils.java
<ide> import org.parboiled.common.Formatter;
<ide> import org.parboiled.common.StringUtils;
<ide> import org.parboiled.matchers.Matcher;
<add>import org.parboiled.matchers.TestNotMatcher;
<ide> import org.parboiled.support.MatcherPath;
<ide> import org.parboiled.support.ParsingResult;
<ide> import org.parboiled.support.Position;
<ide>
<add>import java.util.ArrayList;
<ide> import java.util.List;
<add>import java.util.ListIterator;
<ide>
<ide> /**
<ide> * General utility methods regarding parse errors.
<ide> */
<ide> static Matcher findProperLabelMatcher(MatcherPath path, int errorIndex) {
<ide> checkArgNotNull(path, "path");
<del> Matcher found = path.parent != null ? findProperLabelMatcher(path.parent, errorIndex) : null;
<del> if (found != null) return found;
<del> if (path.element.startIndex == errorIndex && path.element.matcher.hasCustomLabel()) {
<del> return path.element.matcher;
<add>
<add> List<MatcherPath.Element> elements = new ArrayList<MatcherPath.Element>();
<add> for (MatcherPath cur = path; cur.parent != null; cur = cur.parent) {
<add> elements.add(cur.element);
<add> }
<add>
<add> ListIterator<MatcherPath.Element> li = elements.listIterator(elements.size());
<add> while (li.hasPrevious()) {
<add> MatcherPath.Element element = li.previous();
<add> if (element.matcher instanceof TestNotMatcher) {
<add> return null;
<add> }
<add> if (element.startIndex == errorIndex && element.matcher.hasCustomLabel()) {
<add> return path.element.matcher;
<add> }
<ide> }
<ide> return null;
<ide> } |
|
Java | epl-1.0 | a5cc0da0dd8ed0125bcc1ac14c63b898ceaacab4 | 0 | NovusTheory/yangtools,opendaylight/yangtools,522986491/yangtools,opendaylight/yangtools | /*
* Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
package org.opendaylight.yangtools.yang.data.codec.gson;
import com.google.common.base.Preconditions;
import com.google.common.base.Strings;
import com.google.common.collect.ImmutableSet;
import com.google.gson.stream.JsonWriter;
import java.io.IOException;
import java.io.Writer;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.net.URI;
import java.util.ArrayDeque;
import java.util.Collection;
import java.util.Deque;
import org.opendaylight.yangtools.concepts.Codec;
import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.AugmentationIdentifier;
import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifier;
import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifierWithPredicates;
import org.opendaylight.yangtools.yang.data.api.schema.stream.NormalizedNodeStreamWriter;
import org.opendaylight.yangtools.yang.data.impl.codec.SchemaTracker;
import org.opendaylight.yangtools.yang.model.api.AnyXmlSchemaNode;
import org.opendaylight.yangtools.yang.model.api.LeafListSchemaNode;
import org.opendaylight.yangtools.yang.model.api.LeafSchemaNode;
import org.opendaylight.yangtools.yang.model.api.Module;
import org.opendaylight.yangtools.yang.model.api.SchemaContext;
import org.opendaylight.yangtools.yang.model.api.SchemaPath;
/**
* This implementation will create JSON output as output stream.
*
* Values of leaf and leaf-list are NOT translated according to codecs.
*
* FIXME: rewrite this in terms of {@link JsonWriter}.
*/
public class JSONNormalizedNodeStreamWriter implements NormalizedNodeStreamWriter {
private static enum NodeType {
OBJECT,
LIST,
OTHER,
}
private static class TypeInfo {
private boolean hasAtLeastOneChild = false;
private final NodeType type;
private final URI uri;
public TypeInfo(final NodeType type, final URI uri) {
this.type = type;
this.uri = uri;
}
public void setHasAtLeastOneChild(final boolean hasChildren) {
this.hasAtLeastOneChild = hasChildren;
}
public NodeType getType() {
return type;
}
public URI getNamespace() {
return uri;
}
public boolean hasAtLeastOneChild() {
return hasAtLeastOneChild;
}
}
private static final Collection<Class<?>> NUMERIC_CLASSES =
ImmutableSet.<Class<?>>of(Byte.class, Short.class, Integer.class, Long.class, BigInteger.class, BigDecimal.class);
private final Deque<TypeInfo> stack = new ArrayDeque<>();
private final SchemaContext schemaContext;
private final CodecFactory codecs;
private final SchemaTracker tracker;
private final Writer writer;
private final String indent;
private URI currentNamespace = null;
private int currentDepth = 0;
private JSONNormalizedNodeStreamWriter(final SchemaContext schemaContext,
final Writer writer, final int indentSize) {
this.schemaContext = Preconditions.checkNotNull(schemaContext);
this.writer = Preconditions.checkNotNull(writer);
Preconditions.checkArgument(indentSize >= 0, "Indent size must be non-negative");
if (indentSize != 0) {
indent = Strings.repeat(" ", indentSize);
} else {
indent = null;
}
this.codecs = CodecFactory.create(schemaContext);
this.tracker = SchemaTracker.create(schemaContext);
}
private JSONNormalizedNodeStreamWriter(final SchemaContext schemaContext, final SchemaPath path,
final Writer writer, final URI initialNs,final int indentSize) {
this.schemaContext = Preconditions.checkNotNull(schemaContext);
this.writer = Preconditions.checkNotNull(writer);
Preconditions.checkArgument(indentSize >= 0, "Indent size must be non-negative");
if (indentSize != 0) {
indent = Strings.repeat(" ", indentSize);
} else {
indent = null;
}
this.currentNamespace = initialNs;
this.codecs = CodecFactory.create(schemaContext);
this.tracker = SchemaTracker.create(schemaContext,path);
}
/**
* Create a new stream writer, which writes to the specified {@link Writer}.
*
* @param schemaContext Schema context
* @param writer Output writer
* @return A stream writer instance
*/
public static NormalizedNodeStreamWriter create(final SchemaContext schemaContext, final Writer writer) {
return new JSONNormalizedNodeStreamWriter(schemaContext, writer, 0);
}
/**
* Create a new stream writer, which writes to the specified {@link Writer}.
*
* @param schemaContext Schema context
* @param writer Output writer
* @return A stream writer instance
*/
public static NormalizedNodeStreamWriter create(final SchemaContext schemaContext, final SchemaPath path,final Writer writer) {
return new JSONNormalizedNodeStreamWriter(schemaContext, path, writer, null, 0);
}
/**
* Create a new stream writer, which writes to the specified {@link Writer}.
*
* @param schemaContext Schema context
* @param writer Output writer
* @param initialNs Initial namespace
* @return A stream writer instance
*/
public static NormalizedNodeStreamWriter create(final SchemaContext schemaContext, final SchemaPath path,final URI initialNs, final Writer writer) {
return new JSONNormalizedNodeStreamWriter(schemaContext, path, writer, initialNs, 0);
}
/**
* Create a new stream writer, which writes to the specified output stream.
*
* @param schemaContext Schema context
* @param writer Output writer
* @param indentSize indentation size
* @return A stream writer instance
*/
public static NormalizedNodeStreamWriter create(final SchemaContext schemaContext, final Writer writer, final int indentSize) {
return new JSONNormalizedNodeStreamWriter(schemaContext, writer, indentSize);
}
@Override
public void leafNode(final NodeIdentifier name, final Object value) throws IOException {
final LeafSchemaNode schema = tracker.leafNode(name);
final Codec<Object, Object> codec = codecs.codecFor(schema.getType());
separateElementFromPreviousElement();
writeJsonIdentifier(name);
currentNamespace = stack.peek().getNamespace();
writeValue(codec.serialize(value));
separateNextSiblingsWithComma();
}
@Override
public void startLeafSet(final NodeIdentifier name, final int childSizeHint) throws IOException {
tracker.startLeafSet(name);
separateElementFromPreviousElement();
stack.push(new TypeInfo(NodeType.LIST, name.getNodeType().getNamespace()));
writeJsonIdentifier(name);
writeStartList();
indentRight();
}
@Override
public void leafSetEntryNode(final Object value) throws IOException {
final LeafListSchemaNode schema = tracker.leafSetEntryNode();
final Codec<Object, Object> codec = codecs.codecFor(schema.getType());
separateElementFromPreviousElement();
writeValue(codec.serialize(value));
separateNextSiblingsWithComma();
}
@Override
public void startContainerNode(final NodeIdentifier name, final int childSizeHint) throws IOException {
tracker.startContainerNode(name);
separateElementFromPreviousElement();
stack.push(new TypeInfo(NodeType.OBJECT, name.getNodeType().getNamespace()));
writeJsonIdentifier(name);
writeStartObject();
indentRight();
}
@Override
public void startUnkeyedList(final NodeIdentifier name, final int childSizeHint) throws IOException {
tracker.startList(name);
separateElementFromPreviousElement();
stack.push(new TypeInfo(NodeType.LIST, name.getNodeType().getNamespace()));
writeJsonIdentifier(name);
writeStartList();
indentRight();
}
@Override
public void startUnkeyedListItem(final NodeIdentifier name, final int childSizeHint) throws IOException {
tracker.startListItem(name);
separateElementFromPreviousElement();
stack.push(new TypeInfo(NodeType.OBJECT, name.getNodeType().getNamespace()));
writeStartObject();
indentRight();
}
@Override
public void startMapNode(final NodeIdentifier name, final int childSizeHint) throws IOException {
tracker.startList(name);
separateElementFromPreviousElement();
stack.push(new TypeInfo(NodeType.LIST, name.getNodeType().getNamespace()));
writeJsonIdentifier(name);
writeStartList();
indentRight();
}
@Override
public void startMapEntryNode(final NodeIdentifierWithPredicates identifier, final int childSizeHint)
throws IOException {
tracker.startListItem(identifier);
separateElementFromPreviousElement();
stack.push(new TypeInfo(NodeType.OBJECT, identifier.getNodeType().getNamespace()));
writeStartObject();
indentRight();
}
@Override
public void startOrderedMapNode(final NodeIdentifier name, final int childSizeHint) throws IOException {
tracker.startListItem(name);
stack.push(new TypeInfo(NodeType.LIST, name.getNodeType().getNamespace()));
separateElementFromPreviousElement();
writeJsonIdentifier(name);
writeStartList();
indentRight();
}
@Override
public void startChoiceNode(final NodeIdentifier name, final int childSizeHint) throws IllegalArgumentException {
tracker.startChoiceNode(name);
handleInvisibleNode(name.getNodeType().getNamespace());
}
@Override
public void startAugmentationNode(final AugmentationIdentifier identifier) throws IllegalArgumentException {
tracker.startAugmentationNode(identifier);
handleInvisibleNode(currentNamespace);
}
@Override
public void anyxmlNode(final NodeIdentifier name, final Object value) throws IOException {
final AnyXmlSchemaNode schema = tracker.anyxmlNode(name);
// FIXME: should have a codec based on this :)
separateElementFromPreviousElement();
writeJsonIdentifier(name);
currentNamespace = stack.peek().getNamespace();
writeValue(value);
separateNextSiblingsWithComma();
}
@Override
public void endNode() throws IOException {
tracker.endNode();
final TypeInfo t = stack.pop();
switch (t.getType()) {
case LIST:
indentLeft();
newLine();
writer.append(']');
break;
case OBJECT:
indentLeft();
newLine();
writer.append('}');
break;
default:
break;
}
currentNamespace = stack.isEmpty() ? null : stack.peek().getNamespace();
separateNextSiblingsWithComma();
}
private void separateElementFromPreviousElement() throws IOException {
if (!stack.isEmpty() && stack.peek().hasAtLeastOneChild()) {
writer.append(',');
}
newLine();
}
private void newLine() throws IOException {
if (indent != null) {
writer.append('\n');
for (int i = 0; i < currentDepth; i++) {
writer.append(indent);
}
}
}
private void separateNextSiblingsWithComma() {
if (!stack.isEmpty()) {
stack.peek().setHasAtLeastOneChild(true);
}
}
/**
* Invisible nodes have to be also pushed to stack because of pairing of start*() and endNode() methods. Information
* about child existing (due to printing comma) has to be transfered to invisible node.
*/
private void handleInvisibleNode(final URI uri) {
TypeInfo typeInfo = new TypeInfo(NodeType.OTHER, uri);
typeInfo.setHasAtLeastOneChild(stack.peek().hasAtLeastOneChild());
stack.push(typeInfo);
}
private void writeStartObject() throws IOException {
writer.append('{');
}
private void writeStartList() throws IOException {
writer.append('[');
}
private void writeModulName(final URI namespace) throws IOException {
if (this.currentNamespace == null || namespace != this.currentNamespace) {
Module module = schemaContext.findModuleByNamespaceAndRevision(namespace, null);
writer.append(module.getName());
writer.append(':');
currentNamespace = namespace;
}
}
private void writeValue(final Object value) throws IOException {
final String str = String.valueOf(value);
if (!NUMERIC_CLASSES.contains(value.getClass())) {
writer.append('"');
writer.append(str);
writer.append('"');
} else {
writer.append(str);
}
}
private void writeJsonIdentifier(final NodeIdentifier name) throws IOException {
writer.append('"');
writeModulName(name.getNodeType().getNamespace());
writer.append(name.getNodeType().getLocalName());
writer.append("\":");
}
private void indentRight() {
currentDepth++;
}
private void indentLeft() {
currentDepth--;
}
@Override
public void flush() throws IOException {
writer.flush();
}
@Override
public void close() throws IOException {
writer.flush();
writer.close();
}
}
| yang/yang-data-codec-gson/src/main/java/org/opendaylight/yangtools/yang/data/codec/gson/JSONNormalizedNodeStreamWriter.java | /*
* Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
package org.opendaylight.yangtools.yang.data.codec.gson;
import com.google.common.base.Preconditions;
import com.google.common.base.Strings;
import com.google.gson.stream.JsonWriter;
import java.io.IOException;
import java.io.Writer;
import java.net.URI;
import java.util.ArrayDeque;
import java.util.Deque;
import org.opendaylight.yangtools.concepts.Codec;
import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.AugmentationIdentifier;
import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifier;
import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifierWithPredicates;
import org.opendaylight.yangtools.yang.data.api.schema.stream.NormalizedNodeStreamWriter;
import org.opendaylight.yangtools.yang.data.impl.codec.SchemaTracker;
import org.opendaylight.yangtools.yang.model.api.AnyXmlSchemaNode;
import org.opendaylight.yangtools.yang.model.api.LeafListSchemaNode;
import org.opendaylight.yangtools.yang.model.api.LeafSchemaNode;
import org.opendaylight.yangtools.yang.model.api.Module;
import org.opendaylight.yangtools.yang.model.api.SchemaContext;
import org.opendaylight.yangtools.yang.model.api.SchemaPath;
/**
* This implementation will create JSON output as output stream.
*
* Values of leaf and leaf-list are NOT translated according to codecs.
*
* FIXME: rewrite this in terms of {@link JsonWriter}.
*/
public class JSONNormalizedNodeStreamWriter implements NormalizedNodeStreamWriter {
private static enum NodeType {
OBJECT,
LIST,
OTHER,
}
private static class TypeInfo {
private boolean hasAtLeastOneChild = false;
private final NodeType type;
private final URI uri;
public TypeInfo(final NodeType type, final URI uri) {
this.type = type;
this.uri = uri;
}
public void setHasAtLeastOneChild(final boolean hasChildren) {
this.hasAtLeastOneChild = hasChildren;
}
public NodeType getType() {
return type;
}
public URI getNamespace() {
return uri;
}
public boolean hasAtLeastOneChild() {
return hasAtLeastOneChild;
}
}
private final Deque<TypeInfo> stack = new ArrayDeque<>();
private final SchemaContext schemaContext;
private final CodecFactory codecs;
private final SchemaTracker tracker;
private final Writer writer;
private final String indent;
private URI currentNamespace = null;
private int currentDepth = 0;
private JSONNormalizedNodeStreamWriter(final SchemaContext schemaContext,
final Writer writer, final int indentSize) {
this.schemaContext = Preconditions.checkNotNull(schemaContext);
this.writer = Preconditions.checkNotNull(writer);
Preconditions.checkArgument(indentSize >= 0, "Indent size must be non-negative");
if (indentSize != 0) {
indent = Strings.repeat(" ", indentSize);
} else {
indent = null;
}
this.codecs = CodecFactory.create(schemaContext);
this.tracker = SchemaTracker.create(schemaContext);
}
private JSONNormalizedNodeStreamWriter(final SchemaContext schemaContext, final SchemaPath path,
final Writer writer, final URI initialNs,final int indentSize) {
this.schemaContext = Preconditions.checkNotNull(schemaContext);
this.writer = Preconditions.checkNotNull(writer);
Preconditions.checkArgument(indentSize >= 0, "Indent size must be non-negative");
if (indentSize != 0) {
indent = Strings.repeat(" ", indentSize);
} else {
indent = null;
}
this.currentNamespace = initialNs;
this.codecs = CodecFactory.create(schemaContext);
this.tracker = SchemaTracker.create(schemaContext,path);
}
/**
* Create a new stream writer, which writes to the specified {@link Writer}.
*
* @param schemaContext Schema context
* @param writer Output writer
* @return A stream writer instance
*/
public static NormalizedNodeStreamWriter create(final SchemaContext schemaContext, final Writer writer) {
return new JSONNormalizedNodeStreamWriter(schemaContext, writer, 0);
}
/**
* Create a new stream writer, which writes to the specified {@link Writer}.
*
* @param schemaContext Schema context
* @param writer Output writer
* @return A stream writer instance
*/
public static NormalizedNodeStreamWriter create(final SchemaContext schemaContext, SchemaPath path,final Writer writer) {
return new JSONNormalizedNodeStreamWriter(schemaContext, path, writer, null, 0);
}
/**
* Create a new stream writer, which writes to the specified {@link Writer}.
*
* @param schemaContext Schema context
* @param writer Output writer
* @param initialNs Initial namespace
* @return A stream writer instance
*/
public static NormalizedNodeStreamWriter create(final SchemaContext schemaContext, SchemaPath path,URI initialNs, final Writer writer) {
return new JSONNormalizedNodeStreamWriter(schemaContext, path, writer, initialNs, 0);
}
/**
* Create a new stream writer, which writes to the specified output stream.
*
* @param schemaContext Schema context
* @param writer Output writer
* @param indentSize indentation size
* @return A stream writer instance
*/
public static NormalizedNodeStreamWriter create(final SchemaContext schemaContext, final Writer writer, final int indentSize) {
return new JSONNormalizedNodeStreamWriter(schemaContext, writer, indentSize);
}
@Override
public void leafNode(final NodeIdentifier name, final Object value) throws IOException {
final LeafSchemaNode schema = tracker.leafNode(name);
final Codec<Object, Object> codec = codecs.codecFor(schema.getType());
separateElementFromPreviousElement();
writeJsonIdentifier(name);
currentNamespace = stack.peek().getNamespace();
writeValue(String.valueOf(codec.serialize(value)));
separateNextSiblingsWithComma();
}
@Override
public void startLeafSet(final NodeIdentifier name, final int childSizeHint) throws IOException {
tracker.startLeafSet(name);
separateElementFromPreviousElement();
stack.push(new TypeInfo(NodeType.LIST, name.getNodeType().getNamespace()));
writeJsonIdentifier(name);
writeStartList();
indentRight();
}
@Override
public void leafSetEntryNode(final Object value) throws IOException {
final LeafListSchemaNode schema = tracker.leafSetEntryNode();
final Codec<Object, Object> codec = codecs.codecFor(schema.getType());
separateElementFromPreviousElement();
writeValue(String.valueOf(codec.serialize(value)));
separateNextSiblingsWithComma();
}
@Override
public void startContainerNode(final NodeIdentifier name, final int childSizeHint) throws IOException {
tracker.startContainerNode(name);
separateElementFromPreviousElement();
stack.push(new TypeInfo(NodeType.OBJECT, name.getNodeType().getNamespace()));
writeJsonIdentifier(name);
writeStartObject();
indentRight();
}
@Override
public void startUnkeyedList(final NodeIdentifier name, final int childSizeHint) throws IOException {
tracker.startList(name);
separateElementFromPreviousElement();
stack.push(new TypeInfo(NodeType.LIST, name.getNodeType().getNamespace()));
writeJsonIdentifier(name);
writeStartList();
indentRight();
}
@Override
public void startUnkeyedListItem(final NodeIdentifier name, final int childSizeHint) throws IOException {
tracker.startListItem(name);
separateElementFromPreviousElement();
stack.push(new TypeInfo(NodeType.OBJECT, name.getNodeType().getNamespace()));
writeStartObject();
indentRight();
}
@Override
public void startMapNode(final NodeIdentifier name, final int childSizeHint) throws IOException {
tracker.startList(name);
separateElementFromPreviousElement();
stack.push(new TypeInfo(NodeType.LIST, name.getNodeType().getNamespace()));
writeJsonIdentifier(name);
writeStartList();
indentRight();
}
@Override
public void startMapEntryNode(final NodeIdentifierWithPredicates identifier, final int childSizeHint)
throws IOException {
tracker.startListItem(identifier);
separateElementFromPreviousElement();
stack.push(new TypeInfo(NodeType.OBJECT, identifier.getNodeType().getNamespace()));
writeStartObject();
indentRight();
}
@Override
public void startOrderedMapNode(final NodeIdentifier name, final int childSizeHint) throws IOException {
tracker.startListItem(name);
stack.push(new TypeInfo(NodeType.LIST, name.getNodeType().getNamespace()));
separateElementFromPreviousElement();
writeJsonIdentifier(name);
writeStartList();
indentRight();
}
@Override
public void startChoiceNode(final NodeIdentifier name, final int childSizeHint) throws IllegalArgumentException {
tracker.startChoiceNode(name);
handleInvisibleNode(name.getNodeType().getNamespace());
}
@Override
public void startAugmentationNode(final AugmentationIdentifier identifier) throws IllegalArgumentException {
tracker.startAugmentationNode(identifier);
handleInvisibleNode(currentNamespace);
}
@Override
public void anyxmlNode(final NodeIdentifier name, final Object value) throws IOException {
final AnyXmlSchemaNode schema = tracker.anyxmlNode(name);
// FIXME: should have a codec based on this :)
separateElementFromPreviousElement();
writeJsonIdentifier(name);
currentNamespace = stack.peek().getNamespace();
writeValue(value.toString());
separateNextSiblingsWithComma();
}
@Override
public void endNode() throws IOException {
tracker.endNode();
final TypeInfo t = stack.pop();
switch (t.getType()) {
case LIST:
indentLeft();
newLine();
writer.append(']');
break;
case OBJECT:
indentLeft();
newLine();
writer.append('}');
break;
default:
break;
}
currentNamespace = stack.isEmpty() ? null : stack.peek().getNamespace();
separateNextSiblingsWithComma();
}
private void separateElementFromPreviousElement() throws IOException {
if (!stack.isEmpty() && stack.peek().hasAtLeastOneChild()) {
writer.append(',');
}
newLine();
}
private void newLine() throws IOException {
if (indent != null) {
writer.append('\n');
for (int i = 0; i < currentDepth; i++) {
writer.append(indent);
}
}
}
private void separateNextSiblingsWithComma() {
if (!stack.isEmpty()) {
stack.peek().setHasAtLeastOneChild(true);
}
}
/**
* Invisible nodes have to be also pushed to stack because of pairing of start*() and endNode() methods. Information
* about child existing (due to printing comma) has to be transfered to invisible node.
*/
private void handleInvisibleNode(final URI uri) {
TypeInfo typeInfo = new TypeInfo(NodeType.OTHER, uri);
typeInfo.setHasAtLeastOneChild(stack.peek().hasAtLeastOneChild());
stack.push(typeInfo);
}
private void writeStartObject() throws IOException {
writer.append('{');
}
private void writeStartList() throws IOException {
writer.append('[');
}
private void writeModulName(final URI namespace) throws IOException {
if (this.currentNamespace == null || namespace != this.currentNamespace) {
Module module = schemaContext.findModuleByNamespaceAndRevision(namespace, null);
writer.append(module.getName());
writer.append(':');
currentNamespace = namespace;
}
}
private void writeValue(final String value) throws IOException {
writer.append('"');
writer.append(value);
writer.append('"');
}
private void writeJsonIdentifier(final NodeIdentifier name) throws IOException {
writer.append('"');
writeModulName(name.getNodeType().getNamespace());
writer.append(name.getNodeType().getLocalName());
writer.append("\":");
}
private void indentRight() {
currentDepth++;
}
private void indentLeft() {
currentDepth--;
}
@Override
public void flush() throws IOException {
writer.flush();
}
@Override
public void close() throws IOException {
writer.flush();
writer.close();
}
}
| BUG-1676: do not emit double quotes for numbers
Look up the value type in a set of known-numeric types and
emit quotes only if the type is not found there.
Change-Id: Ied303486bbda04126861fb709922fc21fafa1c95
Signed-off-by: Robert Varga <[email protected]>
| yang/yang-data-codec-gson/src/main/java/org/opendaylight/yangtools/yang/data/codec/gson/JSONNormalizedNodeStreamWriter.java | BUG-1676: do not emit double quotes for numbers | <ide><path>ang/yang-data-codec-gson/src/main/java/org/opendaylight/yangtools/yang/data/codec/gson/JSONNormalizedNodeStreamWriter.java
<ide>
<ide> import com.google.common.base.Preconditions;
<ide> import com.google.common.base.Strings;
<add>import com.google.common.collect.ImmutableSet;
<ide> import com.google.gson.stream.JsonWriter;
<add>
<ide> import java.io.IOException;
<ide> import java.io.Writer;
<add>import java.math.BigDecimal;
<add>import java.math.BigInteger;
<ide> import java.net.URI;
<ide> import java.util.ArrayDeque;
<add>import java.util.Collection;
<ide> import java.util.Deque;
<add>
<ide> import org.opendaylight.yangtools.concepts.Codec;
<ide> import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.AugmentationIdentifier;
<ide> import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.NodeIdentifier;
<ide> }
<ide> }
<ide>
<add> private static final Collection<Class<?>> NUMERIC_CLASSES =
<add> ImmutableSet.<Class<?>>of(Byte.class, Short.class, Integer.class, Long.class, BigInteger.class, BigDecimal.class);
<ide> private final Deque<TypeInfo> stack = new ArrayDeque<>();
<ide> private final SchemaContext schemaContext;
<ide> private final CodecFactory codecs;
<ide> * @param writer Output writer
<ide> * @return A stream writer instance
<ide> */
<del> public static NormalizedNodeStreamWriter create(final SchemaContext schemaContext, SchemaPath path,final Writer writer) {
<add> public static NormalizedNodeStreamWriter create(final SchemaContext schemaContext, final SchemaPath path,final Writer writer) {
<ide> return new JSONNormalizedNodeStreamWriter(schemaContext, path, writer, null, 0);
<ide> }
<ide>
<ide> * @param initialNs Initial namespace
<ide> * @return A stream writer instance
<ide> */
<del> public static NormalizedNodeStreamWriter create(final SchemaContext schemaContext, SchemaPath path,URI initialNs, final Writer writer) {
<add> public static NormalizedNodeStreamWriter create(final SchemaContext schemaContext, final SchemaPath path,final URI initialNs, final Writer writer) {
<ide> return new JSONNormalizedNodeStreamWriter(schemaContext, path, writer, initialNs, 0);
<ide> }
<ide>
<ide> separateElementFromPreviousElement();
<ide> writeJsonIdentifier(name);
<ide> currentNamespace = stack.peek().getNamespace();
<del> writeValue(String.valueOf(codec.serialize(value)));
<add> writeValue(codec.serialize(value));
<ide> separateNextSiblingsWithComma();
<ide> }
<ide>
<ide> final Codec<Object, Object> codec = codecs.codecFor(schema.getType());
<ide>
<ide> separateElementFromPreviousElement();
<del> writeValue(String.valueOf(codec.serialize(value)));
<add> writeValue(codec.serialize(value));
<ide> separateNextSiblingsWithComma();
<ide> }
<ide>
<ide> separateElementFromPreviousElement();
<ide> writeJsonIdentifier(name);
<ide> currentNamespace = stack.peek().getNamespace();
<del> writeValue(value.toString());
<add> writeValue(value);
<ide> separateNextSiblingsWithComma();
<ide> }
<ide>
<ide> }
<ide> }
<ide>
<del> private void writeValue(final String value) throws IOException {
<del> writer.append('"');
<del> writer.append(value);
<del> writer.append('"');
<add> private void writeValue(final Object value) throws IOException {
<add> final String str = String.valueOf(value);
<add>
<add> if (!NUMERIC_CLASSES.contains(value.getClass())) {
<add> writer.append('"');
<add> writer.append(str);
<add> writer.append('"');
<add> } else {
<add> writer.append(str);
<add> }
<ide> }
<ide>
<ide> private void writeJsonIdentifier(final NodeIdentifier name) throws IOException { |
|
Java | apache-2.0 | 5b0f05554602e542a9704cf258d145c2580e1a4b | 0 | shevek/spring-rich-client,shevek/spring-rich-client | /*
* Copyright 2002-2004 the original author or 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 org.springframework.binding.form.support;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import junit.framework.TestCase;
import org.springframework.beans.NotReadablePropertyException;
import org.springframework.binding.convert.ConversionExecutor;
import org.springframework.binding.convert.ConversionService;
import org.springframework.binding.form.CommitListener;
import org.springframework.binding.form.FormModel;
import org.springframework.binding.support.BeanPropertyAccessStrategy;
import org.springframework.binding.support.TestBean;
import org.springframework.binding.support.TestPropertyChangeListener;
import org.springframework.binding.value.ValueModel;
import org.springframework.richclient.application.Application;
import org.springframework.richclient.application.config.DefaultApplicationLifecycleAdvisor;
/**
* Tests for @link AbstractFormModel
*
* @author Oliver Hutchison
*/
public class AbstractFormModelTests extends TestCase {
public void setUp() {
Application.load(null);
new Application(new DefaultApplicationLifecycleAdvisor());
}
protected AbstractFormModel getFormModel(Object formObject) {
return new TestAbstractFormModel(formObject);
}
protected AbstractFormModel getFormModel(BeanPropertyAccessStrategy pas, boolean buffering) {
return new TestAbstractFormModel(pas, buffering);
}
public void testGetValueModelFromPAS() {
TestBean p = new TestBean();
TestPropertyAccessStrategy tpas = new TestPropertyAccessStrategy(p);
AbstractFormModel fm = getFormModel(tpas, true);
ValueModel vm1 = fm.getValueModel("simpleProperty");
assertEquals(1, tpas.numValueModelRequests());
assertEquals("simpleProperty", tpas.lastRequestedValueModel());
ValueModel vm2 = fm.getValueModel("simpleProperty");
assertEquals(vm1, vm2);
assertEquals(1, tpas.numValueModelRequests());
try {
fm.getValueModel("iDontExist");
fail("should't be able to get value model for invalid property");
}
catch (NotReadablePropertyException e) {
// exprected
}
}
public void testUnbufferedWritesThrough() {
TestBean p = new TestBean();
BeanPropertyAccessStrategy pas = new BeanPropertyAccessStrategy(p);
AbstractFormModel fm = getFormModel(pas, false);
ValueModel vm = fm.getValueModel("simpleProperty");
vm.setValue("1");
assertEquals("1", p.getSimpleProperty());
vm.setValue(null);
assertEquals(null, p.getSimpleProperty());
}
public void testBufferedDoesNotWriteThrough() {
TestBean p = new TestBean();
BeanPropertyAccessStrategy pas = new BeanPropertyAccessStrategy(p);
AbstractFormModel fm = getFormModel(pas, true);
ValueModel vm = fm.getValueModel("simpleProperty");
vm.setValue("1");
assertEquals(null, p.getSimpleProperty());
vm.setValue(null);
assertEquals(null, p.getSimpleProperty());
}
public void testDirtyTrackingWithBuffering() {
testDirtyTracking(true);
}
public void testDirtyTrackingWithoutBuffering() {
testDirtyTracking(false);
}
public void testDirtyTracking(boolean buffering) {
TestBean p = new TestBean();
BeanPropertyAccessStrategy pas = new BeanPropertyAccessStrategy(p);
TestPropertyChangeListener pcl = new TestPropertyChangeListener(FormModel.DIRTY_PROPERTY);
AbstractFormModel fm = getFormModel(pas, buffering);
fm.addPropertyChangeListener(FormModel.DIRTY_PROPERTY, pcl);
ValueModel vm = fm.getValueModel("simpleProperty");
assertTrue(!fm.isDirty());
vm.setValue("2");
assertTrue(fm.isDirty());
assertEquals(1, pcl.eventCount());
fm.commit();
assertTrue(!fm.isDirty());
assertEquals(2, pcl.eventCount());
vm.setValue("1");
assertTrue(fm.isDirty());
assertEquals(3, pcl.eventCount());
fm.setFormObject(new TestBean());
assertTrue(!fm.isDirty());
assertEquals(4, pcl.eventCount());
vm.setValue("2");
assertTrue(fm.isDirty());
assertEquals(5, pcl.eventCount());
fm.revert();
assertTrue(!fm.isDirty());
assertEquals(6, pcl.eventCount());
}
public void testDirtyTracksKids() {
TestPropertyChangeListener pcl = new TestPropertyChangeListener(FormModel.DIRTY_PROPERTY);
AbstractFormModel pfm = getFormModel(new TestBean());
AbstractFormModel fm = getFormModel(new TestBean());
pfm.addPropertyChangeListener(FormModel.DIRTY_PROPERTY, pcl);
pfm.addChild(fm);
ValueModel childSimpleProperty = fm.getValueModel("simpleProperty");
ValueModel parentSimpleProperty = pfm.getValueModel("simpleProperty");
childSimpleProperty.setValue("1");
assertTrue(pfm.isDirty());
assertEquals(1, pcl.eventCount());
fm.revert();
assertTrue(!pfm.isDirty());
assertEquals(2, pcl.eventCount());
childSimpleProperty.setValue("1");
assertTrue(pfm.isDirty());
assertEquals(3, pcl.eventCount());
parentSimpleProperty.setValue("2");
assertTrue(pfm.isDirty());
assertEquals(3, pcl.eventCount());
fm.revert();
assertTrue(pfm.isDirty());
assertEquals(3, pcl.eventCount());
pfm.revert();
assertTrue(!pfm.isDirty());
assertEquals(4, pcl.eventCount());
}
public void testSetFormObjectDoesNotRevertChangesToPreviousFormObject() {
TestBean p1 = new TestBean();
BeanPropertyAccessStrategy pas = new BeanPropertyAccessStrategy(p1);
AbstractFormModel fm = getFormModel(pas, false);
fm.getValueModel("simpleProperty").setValue("1");
fm.setFormObject(new TestBean());
assertEquals("1", p1.getSimpleProperty());
}
public void testCommitEvents() {
TestBean p = new TestBean();
BeanPropertyAccessStrategy pas = new BeanPropertyAccessStrategy(p);
TestCommitListener cl = new TestCommitListener();
AbstractFormModel fm = getFormModel(pas, false);
fm.addCommitListener(cl);
ValueModel vm = fm.getValueModel("simpleProperty");
vm.setValue("1");
fm.commit();
assertEquals(1, cl.preEditCalls);
assertEquals(1, cl.postEditCalls);
}
public void testCommitWritesBufferingThrough() {
TestBean p = new TestBean();
BeanPropertyAccessStrategy pas = new BeanPropertyAccessStrategy(p);
TestCommitListener cl = new TestCommitListener();
AbstractFormModel fm = getFormModel(pas, true);
fm.addCommitListener(cl);
ValueModel vm = fm.getValueModel("simpleProperty");
vm.setValue("1");
fm.commit();
assertEquals("1", p.getSimpleProperty());
}
public void testRevertWithBuffering() {
testRevert(true);
}
public void testRevertWithoutBuffering() {
testRevert(false);
}
public void testRevert(boolean buffering) {
TestBean p = new TestBean();
BeanPropertyAccessStrategy pas = new BeanPropertyAccessStrategy(p);
TestPropertyChangeListener pcl = new TestPropertyChangeListener(FormModel.DIRTY_PROPERTY);
AbstractFormModel fm = getFormModel(pas, buffering);
fm.addPropertyChangeListener(FormModel.DIRTY_PROPERTY, pcl);
ValueModel vm = fm.getValueModel("simpleProperty");
vm.setValue("1");
fm.revert();
assertEquals(null, vm.getValue());
assertEquals(null, p.getSimpleProperty());
TestBean tb2 = new TestBean();
tb2.setSimpleProperty("tb2");
fm.setFormObject(tb2);
vm.setValue("1");
fm.revert();
assertEquals("tb2", vm.getValue());
assertEquals("tb2", tb2.getSimpleProperty());
}
public void testEnabledEvents() {
TestPropertyChangeListener pcl = new TestPropertyChangeListener(FormModel.ENABLED_PROPERTY);
AbstractFormModel fm = getFormModel(new Object());
fm.addPropertyChangeListener(FormModel.ENABLED_PROPERTY, pcl);
assertTrue(fm.isEnabled());
fm.setEnabled(false);
assertTrue(!fm.isEnabled());
assertEquals(1, pcl.eventCount());
fm.setEnabled(false);
assertTrue(!fm.isEnabled());
assertEquals(1, pcl.eventCount());
fm.setEnabled(true);
assertTrue(fm.isEnabled());
assertEquals(2, pcl.eventCount());
fm.setEnabled(true);
assertTrue(fm.isEnabled());
assertEquals(2, pcl.eventCount());
}
public void testEnabledTracksParent() {
TestPropertyChangeListener pcl = new TestPropertyChangeListener(FormModel.ENABLED_PROPERTY);
AbstractFormModel pfm = getFormModel(new Object());
AbstractFormModel fm = getFormModel(new Object());
fm.addPropertyChangeListener(FormModel.ENABLED_PROPERTY, pcl);
pfm.addChild(fm);
pfm.setEnabled(false);
assertTrue(!fm.isEnabled());
assertEquals(1, pcl.eventCount());
pfm.setEnabled(true);
assertTrue(fm.isEnabled());
assertEquals(2, pcl.eventCount());
pfm.setEnabled(false);
assertTrue(!fm.isEnabled());
assertEquals(3, pcl.eventCount());
fm.setEnabled(false);
assertTrue(!fm.isEnabled());
assertEquals(3, pcl.eventCount());
pfm.setEnabled(true);
assertTrue(!fm.isEnabled());
assertEquals(3, pcl.eventCount());
fm.setEnabled(true);
assertTrue(fm.isEnabled());
assertEquals(4, pcl.eventCount());
}
public void testConvertingValueModels() {
AbstractFormModel fm = getFormModel(new TestBean());
TestConversionService cs = new TestConversionService();
fm.setConversionService(cs);
ValueModel vm = fm.getValueModel("simpleProperty", String.class);
assertEquals(fm.getValueModel("simpleProperty"), vm);
assertEquals(0, cs.calls);
try {
fm.getValueModel("simpleProperty", Integer.class);
fail("should have throw IllegalArgumentException");
}
catch (IllegalArgumentException e) {
// expected
}
assertEquals(1, cs.calls);
assertEquals(String.class, cs.lastSource);
assertEquals(Integer.class, cs.lastTarget);
cs.executer = new ConversionExecutor(null, null);
ValueModel cvm = fm.getValueModel("simpleProperty", Integer.class);
assertEquals(3, cs.calls);
assertEquals(Integer.class, cs.lastSource);
assertEquals(String.class, cs.lastTarget);
assertEquals(fm.getValueModel("simpleProperty", Integer.class), cvm);
assertEquals(3, cs.calls);
}
public void testPropertyMetadata() {
AbstractFormModel fm = getFormModel(new TestBean());
assertEquals(String.class, fm.getPropertyMetadata("simpleProperty").getPropertyType());
assertTrue(!fm.getPropertyMetadata("simpleProperty").isReadOnly());
assertEquals(Object.class, fm.getPropertyMetadata("readOnly").getPropertyType());
assertTrue(fm.getPropertyMetadata("readOnly").isReadOnly());
}
public void testSetFormObjectUpdatesDirtyState() {
final AbstractFormModel fm = getFormModel(new TestBean());
fm.add("simpleProperty");
fm.add("singleSelectListProperty");
assertTrue(!fm.isDirty());
fm.getValueModel("simpleProperty").addValueChangeListener(new PropertyChangeListener() {
public void propertyChange(PropertyChangeEvent evt) {
fm.getValueModel("singleSelectListProperty").setValue(null);
}
});
TestBean newBean = new TestBean();
newBean.setSimpleProperty("simpleProperty");
newBean.setSingleSelectListProperty("singleSelectListProperty");
fm.setFormObject(newBean);
assertEquals(null, fm.getValueModel("singleSelectListProperty").getValue());
assertTrue(fm.isDirty());
fm.getValueModel("singleSelectListProperty").setValue("singleSelectListProperty");
assertTrue(!fm.isDirty());
}
public void testFormPropertiesAreAccessableFromFormObjectChangeEvents() {
final AbstractFormModel fm = getFormModel(new TestBean());
assertEquals(null, fm.getValueModel("simpleProperty").getValue());
TestBean newTestBean = new TestBean();
newTestBean.setSimpleProperty("NewValue");
fm.getFormObjectHolder().addValueChangeListener(new PropertyChangeListener() {
public void propertyChange(PropertyChangeEvent evt) {
assertEquals("NewValue", fm.getValueModel("simpleProperty").getValue());
}
});
fm.setFormObject(newTestBean);
}
public void testFormObjectChangeEventComesBeforePropertyChangeEvent() {
final AbstractFormModel fm = getFormModel(new TestBean());
TestBean newTestBean = new TestBean();
newTestBean.setSimpleProperty("NewValue");
final boolean[] formObjectChangeCalled = new boolean[1];
fm.getFormObjectHolder().addValueChangeListener(new PropertyChangeListener() {
public void propertyChange(PropertyChangeEvent evt) {
formObjectChangeCalled[0] = true;
}
});
fm.getValueModel("simpleProperty").addValueChangeListener(new PropertyChangeListener() {
public void propertyChange(PropertyChangeEvent evt) {
assertEquals("Form property change event was called before form object change event", true, formObjectChangeCalled[0]);
}
});
fm.setFormObject(newTestBean);
}
public static class TestCommitListener implements CommitListener {
int preEditCalls;
int postEditCalls;
public void preCommit(FormModel formModel) {
preEditCalls++;
}
public void postCommit(FormModel formModel) {
postEditCalls++;
}
}
public class TestConversionService implements ConversionService {
public int calls;
public Class lastSource;
public Class lastTarget;
public ConversionExecutor executer;
public ConversionExecutor getConversionExecutor(Class source, Class target) {
calls++;
lastSource = source;
lastTarget = target;
if (executer != null) {
return executer;
}
else {
throw new IllegalArgumentException("no converter found");
}
}
public ConversionExecutor getConversionExecutorByTargetAlias(Class arg0, String arg1)
throws IllegalArgumentException {
fail("this method should never be called");
return null;
}
public Class getClassByAlias(String arg0) {
fail("this method should never be called");
return null;
}
}
}
| test/org/springframework/binding/form/support/AbstractFormModelTests.java | /*
* Copyright 2002-2004 the original author or 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 org.springframework.binding.form.support;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import junit.framework.TestCase;
import org.springframework.beans.NotReadablePropertyException;
import org.springframework.binding.convert.ConversionExecutor;
import org.springframework.binding.convert.ConversionService;
import org.springframework.binding.form.CommitListener;
import org.springframework.binding.form.FormModel;
import org.springframework.binding.support.BeanPropertyAccessStrategy;
import org.springframework.binding.support.TestBean;
import org.springframework.binding.support.TestPropertyChangeListener;
import org.springframework.binding.value.ValueModel;
import org.springframework.richclient.application.Application;
import org.springframework.richclient.application.config.DefaultApplicationLifecycleAdvisor;
/**
* Tests for @link AbstractFormModel
*
* @author Oliver Hutchison
*/
public class AbstractFormModelTests extends TestCase {
public void setUp() {
Application.load(null);
new Application(new DefaultApplicationLifecycleAdvisor());
}
protected AbstractFormModel getFormModel(Object formObject) {
return new TestAbstractFormModel(formObject);
}
protected AbstractFormModel getFormModel(BeanPropertyAccessStrategy pas, boolean buffering) {
return new TestAbstractFormModel(pas, buffering);
}
public void testGetValueModelFromPAS() {
TestBean p = new TestBean();
TestPropertyAccessStrategy tpas = new TestPropertyAccessStrategy(p);
AbstractFormModel fm = getFormModel(tpas, true);
ValueModel vm1 = fm.getValueModel("simpleProperty");
assertEquals(1, tpas.numValueModelRequests());
assertEquals("simpleProperty", tpas.lastRequestedValueModel());
ValueModel vm2 = fm.getValueModel("simpleProperty");
assertEquals(vm1, vm2);
assertEquals(1, tpas.numValueModelRequests());
try {
fm.getValueModel("iDontExist");
fail("should't be able to get value model for invalid property");
}
catch (NotReadablePropertyException e) {
// exprected
}
}
public void testUnbufferedWritesThrough() {
TestBean p = new TestBean();
BeanPropertyAccessStrategy pas = new BeanPropertyAccessStrategy(p);
AbstractFormModel fm = getFormModel(pas, false);
ValueModel vm = fm.getValueModel("simpleProperty");
vm.setValue("1");
assertEquals("1", p.getSimpleProperty());
vm.setValue(null);
assertEquals(null, p.getSimpleProperty());
}
public void testBufferedDoesNotWriteThrough() {
TestBean p = new TestBean();
BeanPropertyAccessStrategy pas = new BeanPropertyAccessStrategy(p);
AbstractFormModel fm = getFormModel(pas, true);
ValueModel vm = fm.getValueModel("simpleProperty");
vm.setValue("1");
assertEquals(null, p.getSimpleProperty());
vm.setValue(null);
assertEquals(null, p.getSimpleProperty());
}
public void testDirtyTrackingWithBuffering() {
testDirtyTracking(true);
}
public void testDirtyTrackingWithoutBuffering() {
testDirtyTracking(false);
}
public void testDirtyTracking(boolean buffering) {
TestBean p = new TestBean();
BeanPropertyAccessStrategy pas = new BeanPropertyAccessStrategy(p);
TestPropertyChangeListener pcl = new TestPropertyChangeListener(FormModel.DIRTY_PROPERTY);
AbstractFormModel fm = getFormModel(pas, buffering);
fm.addPropertyChangeListener(FormModel.DIRTY_PROPERTY, pcl);
ValueModel vm = fm.getValueModel("simpleProperty");
assertTrue(!fm.isDirty());
vm.setValue("2");
assertTrue(fm.isDirty());
assertEquals(1, pcl.eventCount());
fm.commit();
assertTrue(!fm.isDirty());
assertEquals(2, pcl.eventCount());
vm.setValue("1");
assertTrue(fm.isDirty());
assertEquals(3, pcl.eventCount());
fm.setFormObject(new TestBean());
assertTrue(!fm.isDirty());
assertEquals(4, pcl.eventCount());
vm.setValue("2");
assertTrue(fm.isDirty());
assertEquals(5, pcl.eventCount());
fm.revert();
assertTrue(!fm.isDirty());
assertEquals(6, pcl.eventCount());
}
public void testDirtyTracksKids() {
TestPropertyChangeListener pcl = new TestPropertyChangeListener(FormModel.DIRTY_PROPERTY);
AbstractFormModel pfm = getFormModel(new TestBean());
AbstractFormModel fm = getFormModel(new TestBean());
pfm.addPropertyChangeListener(FormModel.DIRTY_PROPERTY, pcl);
pfm.addChild(fm);
ValueModel childSimpleProperty = fm.getValueModel("simpleProperty");
ValueModel parentSimpleProperty = pfm.getValueModel("simpleProperty");
childSimpleProperty.setValue("1");
assertTrue(pfm.isDirty());
assertEquals(1, pcl.eventCount());
fm.revert();
assertTrue(!pfm.isDirty());
assertEquals(2, pcl.eventCount());
childSimpleProperty.setValue("1");
assertTrue(pfm.isDirty());
assertEquals(3, pcl.eventCount());
parentSimpleProperty.setValue("2");
assertTrue(pfm.isDirty());
assertEquals(3, pcl.eventCount());
fm.revert();
assertTrue(pfm.isDirty());
assertEquals(3, pcl.eventCount());
pfm.revert();
assertTrue(!pfm.isDirty());
assertEquals(4, pcl.eventCount());
}
public void testSetFormObjectDoesNotRevertChangesToPreviousFormObject() {
TestBean p1 = new TestBean();
BeanPropertyAccessStrategy pas = new BeanPropertyAccessStrategy(p1);
AbstractFormModel fm = getFormModel(pas, false);
fm.getValueModel("simpleProperty").setValue("1");
fm.setFormObject(new TestBean());
assertEquals("1", p1.getSimpleProperty());
}
public void testCommitEvents() {
TestBean p = new TestBean();
BeanPropertyAccessStrategy pas = new BeanPropertyAccessStrategy(p);
TestCommitListener cl = new TestCommitListener();
AbstractFormModel fm = getFormModel(pas, false);
fm.addCommitListener(cl);
ValueModel vm = fm.getValueModel("simpleProperty");
vm.setValue("1");
fm.commit();
assertEquals(1, cl.preEditCalls);
assertEquals(1, cl.postEditCalls);
}
public void testCommitWritesBufferingThrough() {
TestBean p = new TestBean();
BeanPropertyAccessStrategy pas = new BeanPropertyAccessStrategy(p);
TestCommitListener cl = new TestCommitListener();
AbstractFormModel fm = getFormModel(pas, true);
fm.addCommitListener(cl);
ValueModel vm = fm.getValueModel("simpleProperty");
vm.setValue("1");
fm.commit();
assertEquals("1", p.getSimpleProperty());
}
public void testRevertWithBuffering() {
testRevert(true);
}
public void testRevertWithoutBuffering() {
testRevert(false);
}
public void testRevert(boolean buffering) {
TestBean p = new TestBean();
BeanPropertyAccessStrategy pas = new BeanPropertyAccessStrategy(p);
TestPropertyChangeListener pcl = new TestPropertyChangeListener(FormModel.DIRTY_PROPERTY);
AbstractFormModel fm = getFormModel(pas, buffering);
fm.addPropertyChangeListener(FormModel.DIRTY_PROPERTY, pcl);
ValueModel vm = fm.getValueModel("simpleProperty");
vm.setValue("1");
fm.revert();
assertEquals(null, vm.getValue());
assertEquals(null, p.getSimpleProperty());
TestBean tb2 = new TestBean();
tb2.setSimpleProperty("tb2");
fm.setFormObject(tb2);
vm.setValue("1");
fm.revert();
assertEquals("tb2", vm.getValue());
assertEquals("tb2", tb2.getSimpleProperty());
}
public void testEnabledEvents() {
TestPropertyChangeListener pcl = new TestPropertyChangeListener(FormModel.ENABLED_PROPERTY);
AbstractFormModel fm = getFormModel(new Object());
fm.addPropertyChangeListener(FormModel.ENABLED_PROPERTY, pcl);
assertTrue(fm.isEnabled());
fm.setEnabled(false);
assertTrue(!fm.isEnabled());
assertEquals(1, pcl.eventCount());
fm.setEnabled(false);
assertTrue(!fm.isEnabled());
assertEquals(1, pcl.eventCount());
fm.setEnabled(true);
assertTrue(fm.isEnabled());
assertEquals(2, pcl.eventCount());
fm.setEnabled(true);
assertTrue(fm.isEnabled());
assertEquals(2, pcl.eventCount());
}
public void testEnabledTracksParent() {
TestPropertyChangeListener pcl = new TestPropertyChangeListener(FormModel.ENABLED_PROPERTY);
AbstractFormModel pfm = getFormModel(new Object());
AbstractFormModel fm = getFormModel(new Object());
fm.addPropertyChangeListener(FormModel.ENABLED_PROPERTY, pcl);
pfm.addChild(fm);
pfm.setEnabled(false);
assertTrue(!fm.isEnabled());
assertEquals(1, pcl.eventCount());
pfm.setEnabled(true);
assertTrue(fm.isEnabled());
assertEquals(2, pcl.eventCount());
pfm.setEnabled(false);
assertTrue(!fm.isEnabled());
assertEquals(3, pcl.eventCount());
fm.setEnabled(false);
assertTrue(!fm.isEnabled());
assertEquals(3, pcl.eventCount());
pfm.setEnabled(true);
assertTrue(!fm.isEnabled());
assertEquals(3, pcl.eventCount());
fm.setEnabled(true);
assertTrue(fm.isEnabled());
assertEquals(4, pcl.eventCount());
}
public void testConvertingValueModels() {
AbstractFormModel fm = getFormModel(new TestBean());
TestConversionService cs = new TestConversionService();
fm.setConversionService(cs);
ValueModel vm = fm.getValueModel("simpleProperty", String.class);
assertEquals(fm.getValueModel("simpleProperty"), vm);
assertEquals(0, cs.calls);
try {
fm.getValueModel("simpleProperty", Integer.class);
fail("should have throw IllegalArgumentException");
}
catch (IllegalArgumentException e) {
// expected
}
assertEquals(1, cs.calls);
assertEquals(String.class, cs.lastSource);
assertEquals(Integer.class, cs.lastTarget);
cs.executer = new ConversionExecutor(null, null);
ValueModel cvm = fm.getValueModel("simpleProperty", Integer.class);
assertEquals(3, cs.calls);
assertEquals(Integer.class, cs.lastSource);
assertEquals(String.class, cs.lastTarget);
assertEquals(fm.getValueModel("simpleProperty", Integer.class), cvm);
assertEquals(3, cs.calls);
}
public void testPropertyMetadata() {
AbstractFormModel fm = getFormModel(new TestBean());
assertEquals(String.class, fm.getPropertyMetadata("simpleProperty").getPropertyType());
assertTrue(!fm.getPropertyMetadata("simpleProperty").isReadOnly());
assertEquals(Object.class, fm.getPropertyMetadata("readOnly").getPropertyType());
assertTrue(fm.getPropertyMetadata("readOnly").isReadOnly());
}
public void testSetFormObjectUpdatesDirtyState() {
final AbstractFormModel fm = getFormModel(new TestBean());
fm.add("simpleProperty");
fm.add("singleSelectListProperty");
assertTrue(!fm.isDirty());
fm.getValueModel("simpleProperty").addValueChangeListener(new PropertyChangeListener() {
public void propertyChange(PropertyChangeEvent evt) {
fm.getValueModel("singleSelectListProperty").setValue(null);
}
});
TestBean newBean = new TestBean();
newBean.setSimpleProperty("simpleProperty");
newBean.setSingleSelectListProperty("singleSelectListProperty");
fm.setFormObject(newBean);
assertEquals(null, fm.getValueModel("singleSelectListProperty").getValue());
assertTrue(fm.isDirty());
fm.getValueModel("singleSelectListProperty").setValue("singleSelectListProperty");
assertTrue(!fm.isDirty());
}
public static class TestCommitListener implements CommitListener {
int preEditCalls;
int postEditCalls;
public void preCommit(FormModel formModel) {
preEditCalls++;
}
public void postCommit(FormModel formModel) {
postEditCalls++;
}
}
public class TestConversionService implements ConversionService {
public int calls;
public Class lastSource;
public Class lastTarget;
public ConversionExecutor executer;
public ConversionExecutor getConversionExecutor(Class source, Class target) {
calls++;
lastSource = source;
lastTarget = target;
if (executer != null) {
return executer;
}
else {
throw new IllegalArgumentException("no converter found");
}
}
public ConversionExecutor getConversionExecutorByTargetAlias(Class arg0, String arg1)
throws IllegalArgumentException {
fail("this method should never be called");
return null;
}
public Class getClassByAlias(String arg0) {
fail("this method should never be called");
return null;
}
}
}
| Disconnected value models should still be readable and writeable but should not deliver change events.
git-svn-id: 789609e278efc0cd74c84a9bb7abaca0738de801@900 817809c7-9d0e-0410-b92d-a7ac8b8adc13
| test/org/springframework/binding/form/support/AbstractFormModelTests.java | Disconnected value models should still be readable and writeable but should not deliver change events. | <ide><path>est/org/springframework/binding/form/support/AbstractFormModelTests.java
<ide> fm.getValueModel("singleSelectListProperty").setValue("singleSelectListProperty");
<ide> assertTrue(!fm.isDirty());
<ide> }
<add>
<add> public void testFormPropertiesAreAccessableFromFormObjectChangeEvents() {
<add> final AbstractFormModel fm = getFormModel(new TestBean());
<add> assertEquals(null, fm.getValueModel("simpleProperty").getValue());
<add> TestBean newTestBean = new TestBean();
<add> newTestBean.setSimpleProperty("NewValue");
<add> fm.getFormObjectHolder().addValueChangeListener(new PropertyChangeListener() {
<add>
<add> public void propertyChange(PropertyChangeEvent evt) {
<add> assertEquals("NewValue", fm.getValueModel("simpleProperty").getValue());
<add> }
<add> });
<add> fm.setFormObject(newTestBean);
<add> }
<add>
<add> public void testFormObjectChangeEventComesBeforePropertyChangeEvent() {
<add> final AbstractFormModel fm = getFormModel(new TestBean());
<add> TestBean newTestBean = new TestBean();
<add> newTestBean.setSimpleProperty("NewValue");
<add> final boolean[] formObjectChangeCalled = new boolean[1];
<add> fm.getFormObjectHolder().addValueChangeListener(new PropertyChangeListener() {
<add>
<add> public void propertyChange(PropertyChangeEvent evt) {
<add> formObjectChangeCalled[0] = true;
<add> }
<add> });
<add> fm.getValueModel("simpleProperty").addValueChangeListener(new PropertyChangeListener() {
<add>
<add> public void propertyChange(PropertyChangeEvent evt) {
<add> assertEquals("Form property change event was called before form object change event", true, formObjectChangeCalled[0]);
<add> }
<add> });
<add> fm.setFormObject(newTestBean);
<add> }
<ide>
<ide> public static class TestCommitListener implements CommitListener {
<ide> int preEditCalls; |
|
Java | apache-2.0 | 5889b3a5de32bebeb1c2d6b0dc8d2ce2c3752b46 | 0 | alibaba/nacos,alibaba/nacos,alibaba/nacos,alibaba/nacos | /*
* Copyright 1999-2020 Alibaba Group Holding Ltd.
*
* 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 com.alibaba.nacos.naming.core;
import com.alibaba.nacos.api.common.Constants;
import com.alibaba.nacos.api.exception.NacosException;
import com.alibaba.nacos.api.naming.utils.NamingUtils;
import com.alibaba.nacos.common.utils.JacksonUtils;
import com.alibaba.nacos.naming.constants.FieldsConstants;
import com.alibaba.nacos.naming.core.v2.ServiceManager;
import com.alibaba.nacos.naming.core.v2.index.ServiceStorage;
import com.alibaba.nacos.naming.core.v2.metadata.ClusterMetadata;
import com.alibaba.nacos.naming.core.v2.metadata.NamingMetadataManager;
import com.alibaba.nacos.naming.core.v2.metadata.NamingMetadataOperateService;
import com.alibaba.nacos.naming.core.v2.metadata.ServiceMetadata;
import com.alibaba.nacos.naming.core.v2.pojo.Service;
import com.alibaba.nacos.naming.utils.ServiceUtil;
import com.fasterxml.jackson.databind.node.ArrayNode;
import com.fasterxml.jackson.databind.node.ObjectNode;
import org.springframework.stereotype.Component;
import java.util.Collection;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Objects;
/**
* Implementation of service operator for v2.x.
*
* @author xiweng.yy
*/
@Component
public class ServiceOperatorV2Impl implements ServiceOperator {
private final NamingMetadataOperateService metadataOperateService;
private final NamingMetadataManager metadataManager;
private final ServiceStorage serviceStorage;
public ServiceOperatorV2Impl(NamingMetadataOperateService metadataOperateService,
NamingMetadataManager metadataManager, ServiceStorage serviceStorage) {
this.metadataOperateService = metadataOperateService;
this.metadataManager = metadataManager;
this.serviceStorage = serviceStorage;
}
@Override
public void create(String namespaceId, String serviceName, ServiceMetadata metadata) throws NacosException {
Service service = getServiceFromGroupedServiceName(namespaceId, serviceName, metadata.isEphemeral());
if (ServiceManager.getInstance().containSingleton(service)) {
throw new NacosException(NacosException.INVALID_PARAM,
String.format("specified service %s already exists!", service.getGroupedServiceName()));
}
metadataOperateService.updateServiceMetadata(service, metadata);
}
@Override
public void update(Service service, ServiceMetadata metadata) throws NacosException {
if (!ServiceManager.getInstance().containSingleton(service)) {
throw new NacosException(NacosException.INVALID_PARAM,
String.format("service %s not found!", service.getGroupedServiceName()));
}
metadataOperateService.updateServiceMetadata(service, metadata);
}
@Override
public void delete(String namespaceId, String serviceName) throws NacosException {
Service service = getServiceFromGroupedServiceName(namespaceId, serviceName, true);
if (!ServiceManager.getInstance().containSingleton(service)) {
throw new NacosException(NacosException.INVALID_PARAM,
String.format("service %s not found!", service.getGroupedServiceName()));
}
if (!serviceStorage.getPushData(service).getHosts().isEmpty()) {
throw new NacosException(NacosException.INVALID_PARAM,
"Service " + serviceName + " is not empty, can't be delete. Please unregister instance first");
}
metadataOperateService.deleteServiceMetadata(service);
}
@Override
public ObjectNode queryService(String namespaceId, String serviceName) throws NacosException {
Service service = getServiceFromGroupedServiceName(namespaceId, serviceName, true);
if (!ServiceManager.getInstance().containSingleton(service)) {
throw new NacosException(NacosException.INVALID_PARAM,
"service not found, namespace: " + namespaceId + ", serviceName: " + serviceName);
}
ObjectNode result = JacksonUtils.createEmptyJsonNode();
ServiceMetadata serviceMetadata = metadataManager.getServiceMetadata(service).orElse(new ServiceMetadata());
setServiceMetadata(result, serviceMetadata, service);
ArrayNode clusters = JacksonUtils.createEmptyArrayNode();
for (String each : serviceStorage.getClusters(service)) {
ClusterMetadata clusterMetadata =
serviceMetadata.getClusters().containsKey(each) ? serviceMetadata.getClusters().get(each)
: new ClusterMetadata();
clusters.add(newClusterNode(each, clusterMetadata));
}
result.set(FieldsConstants.CLUSTERS, clusters);
return result;
}
private void setServiceMetadata(ObjectNode serviceDetail, ServiceMetadata serviceMetadata, Service service) {
serviceDetail.put(FieldsConstants.NAME_SPACE_ID, service.getNamespace());
serviceDetail.put(FieldsConstants.GROUP_NAME, service.getGroup());
serviceDetail.put(FieldsConstants.NAME, service.getName());
serviceDetail.put(FieldsConstants.PROTECT_THRESHOLD, serviceMetadata.getProtectThreshold());
serviceDetail
.replace(FieldsConstants.METADATA, JacksonUtils.transferToJsonNode(serviceMetadata.getExtendData()));
serviceDetail.replace(FieldsConstants.SELECTOR, JacksonUtils.transferToJsonNode(serviceMetadata.getSelector()));
}
private ObjectNode newClusterNode(String clusterName, ClusterMetadata clusterMetadata) {
ObjectNode result = JacksonUtils.createEmptyJsonNode();
result.put(FieldsConstants.NAME, clusterName);
result.replace(FieldsConstants.HEALTH_CHECKER,
JacksonUtils.transferToJsonNode(clusterMetadata.getHealthChecker()));
result.replace(FieldsConstants.METADATA, JacksonUtils.transferToJsonNode(clusterMetadata.getExtendData()));
return result;
}
@Override
@SuppressWarnings("unchecked")
public List<String> listService(String namespaceId, String groupName, String selector, int pageSize, int pageNo)
throws NacosException {
Collection<Service> services = ServiceManager.getInstance().getSingletons(namespaceId);
if (services.isEmpty()) {
return Collections.EMPTY_LIST;
}
Collection<String> serviceNameSet = selectServiceWithGroupName(services, groupName);
// TODO select service by selector
return ServiceUtil.pageServiceName(pageNo, pageSize, serviceNameSet);
}
private Collection<String> selectServiceWithGroupName(Collection<Service> serviceSet, String groupName) {
Collection<String> result = new HashSet<>(serviceSet.size());
for (Service each : serviceSet) {
if (Objects.equals(groupName, each.getGroup())) {
result.add(each.getGroupedServiceName());
}
}
return result;
}
private Service getServiceFromGroupedServiceName(String namespaceId, String groupedServiceName, boolean ephemeral) {
String groupName = NamingUtils.getGroupName(groupedServiceName);
String serviceName = NamingUtils.getServiceName(groupedServiceName);
return Service.newService(namespaceId, groupName, serviceName, ephemeral);
}
@Override
public Collection<String> listAllNamespace() {
return ServiceManager.getInstance().getAllNamespaces();
}
@Override
public Collection<String> searchServiceName(String namespaceId, String expr, boolean responsibleOnly)
throws NacosException {
String regex = Constants.ANY_PATTERN + expr + Constants.ANY_PATTERN;
Collection<String> result = new HashSet<>();
for (Service each : ServiceManager.getInstance().getSingletons(namespaceId)) {
String groupedServiceName = each.getGroupedServiceName();
if (groupedServiceName.matches(regex)) {
result.add(groupedServiceName);
}
}
return result;
}
}
| naming/src/main/java/com/alibaba/nacos/naming/core/ServiceOperatorV2Impl.java | /*
* Copyright 1999-2020 Alibaba Group Holding Ltd.
*
* 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 com.alibaba.nacos.naming.core;
import com.alibaba.nacos.api.common.Constants;
import com.alibaba.nacos.api.exception.NacosException;
import com.alibaba.nacos.api.naming.utils.NamingUtils;
import com.alibaba.nacos.common.utils.JacksonUtils;
import com.alibaba.nacos.naming.constants.FieldsConstants;
import com.alibaba.nacos.naming.core.v2.ServiceManager;
import com.alibaba.nacos.naming.core.v2.index.ServiceStorage;
import com.alibaba.nacos.naming.core.v2.metadata.ClusterMetadata;
import com.alibaba.nacos.naming.core.v2.metadata.NamingMetadataManager;
import com.alibaba.nacos.naming.core.v2.metadata.NamingMetadataOperateService;
import com.alibaba.nacos.naming.core.v2.metadata.ServiceMetadata;
import com.alibaba.nacos.naming.core.v2.pojo.Service;
import com.alibaba.nacos.naming.utils.ServiceUtil;
import com.fasterxml.jackson.databind.node.ArrayNode;
import com.fasterxml.jackson.databind.node.ObjectNode;
import org.springframework.stereotype.Component;
import java.util.Collection;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Objects;
/**
* Implementation of service operator for v2.x.
*
* @author xiweng.yy
*/
@Component
public class ServiceOperatorV2Impl implements ServiceOperator {
private final NamingMetadataOperateService metadataOperateService;
private final NamingMetadataManager metadataManager;
private final ServiceStorage serviceStorage;
public ServiceOperatorV2Impl(NamingMetadataOperateService metadataOperateService,
NamingMetadataManager metadataManager, ServiceStorage serviceStorage) {
this.metadataOperateService = metadataOperateService;
this.metadataManager = metadataManager;
this.serviceStorage = serviceStorage;
}
@Override
public void create(String namespaceId, String serviceName, ServiceMetadata metadata) throws NacosException {
Service service = getServiceFromGroupedServiceName(namespaceId, serviceName, metadata.isEphemeral());
if (ServiceManager.getInstance().containSingleton(service)) {
throw new NacosException(NacosException.INVALID_PARAM,
String.format("specified service %s already exists!", service.getGroupedServiceName()));
}
metadataOperateService.updateServiceMetadata(service, metadata);
}
@Override
public void update(Service service, ServiceMetadata metadata) throws NacosException {
if (!ServiceManager.getInstance().containSingleton(service)) {
throw new NacosException(NacosException.INVALID_PARAM,
String.format("service %s not found!", service.getGroupedServiceName()));
}
metadataOperateService.updateServiceMetadata(service, metadata);
}
@Override
public void delete(String namespaceId, String serviceName) throws NacosException {
Service service = getServiceFromGroupedServiceName(namespaceId, serviceName, true);
if (!serviceStorage.getPushData(service).getHosts().isEmpty()) {
throw new NacosException(NacosException.INVALID_PARAM,
"Service " + serviceName + " is not empty, can't be delete. Please unregister instance first");
}
metadataOperateService.deleteServiceMetadata(service);
}
@Override
public ObjectNode queryService(String namespaceId, String serviceName) throws NacosException {
Service service = getServiceFromGroupedServiceName(namespaceId, serviceName, true);
if (!ServiceManager.getInstance().containSingleton(service)) {
throw new NacosException(NacosException.INVALID_PARAM,
"service not found, namespace: " + namespaceId + ", serviceName: " + serviceName);
}
ObjectNode result = JacksonUtils.createEmptyJsonNode();
ServiceMetadata serviceMetadata = metadataManager.getServiceMetadata(service).orElse(new ServiceMetadata());
setServiceMetadata(result, serviceMetadata, service);
ArrayNode clusters = JacksonUtils.createEmptyArrayNode();
for (String each : serviceStorage.getClusters(service)) {
ClusterMetadata clusterMetadata =
serviceMetadata.getClusters().containsKey(each) ? serviceMetadata.getClusters().get(each)
: new ClusterMetadata();
clusters.add(newClusterNode(each, clusterMetadata));
}
result.set(FieldsConstants.CLUSTERS, clusters);
return result;
}
private void setServiceMetadata(ObjectNode serviceDetail, ServiceMetadata serviceMetadata, Service service) {
serviceDetail.put(FieldsConstants.NAME_SPACE_ID, service.getNamespace());
serviceDetail.put(FieldsConstants.GROUP_NAME, service.getGroup());
serviceDetail.put(FieldsConstants.NAME, service.getName());
serviceDetail.put(FieldsConstants.PROTECT_THRESHOLD, serviceMetadata.getProtectThreshold());
serviceDetail
.replace(FieldsConstants.METADATA, JacksonUtils.transferToJsonNode(serviceMetadata.getExtendData()));
serviceDetail.replace(FieldsConstants.SELECTOR, JacksonUtils.transferToJsonNode(serviceMetadata.getSelector()));
}
private ObjectNode newClusterNode(String clusterName, ClusterMetadata clusterMetadata) {
ObjectNode result = JacksonUtils.createEmptyJsonNode();
result.put(FieldsConstants.NAME, clusterName);
result.replace(FieldsConstants.HEALTH_CHECKER,
JacksonUtils.transferToJsonNode(clusterMetadata.getHealthChecker()));
result.replace(FieldsConstants.METADATA, JacksonUtils.transferToJsonNode(clusterMetadata.getExtendData()));
return result;
}
@Override
@SuppressWarnings("unchecked")
public List<String> listService(String namespaceId, String groupName, String selector, int pageSize, int pageNo)
throws NacosException {
Collection<Service> services = ServiceManager.getInstance().getSingletons(namespaceId);
if (services.isEmpty()) {
return Collections.EMPTY_LIST;
}
Collection<String> serviceNameSet = selectServiceWithGroupName(services, groupName);
// TODO select service by selector
return ServiceUtil.pageServiceName(pageNo, pageSize, serviceNameSet);
}
private Collection<String> selectServiceWithGroupName(Collection<Service> serviceSet, String groupName) {
Collection<String> result = new HashSet<>(serviceSet.size());
for (Service each : serviceSet) {
if (Objects.equals(groupName, each.getGroup())) {
result.add(each.getGroupedServiceName());
}
}
return result;
}
private Service getServiceFromGroupedServiceName(String namespaceId, String groupedServiceName, boolean ephemeral) {
String groupName = NamingUtils.getGroupName(groupedServiceName);
String serviceName = NamingUtils.getServiceName(groupedServiceName);
return Service.newService(namespaceId, groupName, serviceName, ephemeral);
}
@Override
public Collection<String> listAllNamespace() {
return ServiceManager.getInstance().getAllNamespaces();
}
@Override
public Collection<String> searchServiceName(String namespaceId, String expr, boolean responsibleOnly)
throws NacosException {
String regex = Constants.ANY_PATTERN + expr + Constants.ANY_PATTERN;
Collection<String> result = new HashSet<>();
for (Service each : ServiceManager.getInstance().getSingletons(namespaceId)) {
String groupedServiceName = each.getGroupedServiceName();
if (groupedServiceName.matches(regex)) {
result.add(groupedServiceName);
}
}
return result;
}
}
| [ISSUE #6703] when delete an nonexistent, return services not exist error. (#6704)
| naming/src/main/java/com/alibaba/nacos/naming/core/ServiceOperatorV2Impl.java | [ISSUE #6703] when delete an nonexistent, return services not exist error. (#6704) | <ide><path>aming/src/main/java/com/alibaba/nacos/naming/core/ServiceOperatorV2Impl.java
<ide> @Override
<ide> public void delete(String namespaceId, String serviceName) throws NacosException {
<ide> Service service = getServiceFromGroupedServiceName(namespaceId, serviceName, true);
<add> if (!ServiceManager.getInstance().containSingleton(service)) {
<add> throw new NacosException(NacosException.INVALID_PARAM,
<add> String.format("service %s not found!", service.getGroupedServiceName()));
<add> }
<add>
<ide> if (!serviceStorage.getPushData(service).getHosts().isEmpty()) {
<ide> throw new NacosException(NacosException.INVALID_PARAM,
<ide> "Service " + serviceName + " is not empty, can't be delete. Please unregister instance first"); |
|
JavaScript | mit | d93a92e4d5dec6f0aead286552e7a68a92c85880 | 0 | daanpape/grader,daanpape/grader | // View model for the courses page
function pageViewModel(gvm) {
// Page specific i18n bindings
gvm.title = ko.computed(function(){i18n.setLocale(gvm.lang()); return gvm.app() + ' - ' + i18n.__("CoursesTitle");}, gvm);
gvm.pageHeader = ko.computed(function(){i18n.setLocale(gvm.lang()); return i18n.__("CoursesHeader");}, gvm);
gvm.projectname = ko.computed(function(){i18n.setLocale(gvm.lang()); return i18n.__("ProjectName");}, gvm);
gvm.isUpdating = false;
gvm.availableLocations = ko.observableArray([]);
gvm.availableTrainings = ko.observableArray([]);
gvm.availableCourses = ko.observableArray([]);
gvm.addAvailableLocations = function(id, name) {
var selectObject = {id: id, locationName: name};
gvm.availableLocations.push(selectObject);
}
gvm.addAvailableTrainings = function(id, name) {
var selectObject = {id: id, trainingName: name};
gvm.availableTrainings.push(selectObject);
}
gvm.addAvailableCourses = function(id, name) {
var selectObject = {id: id, courseName: name};
gvm.availableCourses.push(selectObject);
}
gvm.clearAll = function() {
gvm.availableLocations.removeAll();
gvm.availableTrainings.removeAll();
gvm.availableCourses.removeAll();
}
}
function loadAllSelects($locationid, $trainingid)
{
viewModel.clearAll();
$.getJSON('/api/courses/' + $locationid + '/' + $trainingid, function(data) {
$.each(data[1],function(i, item) {
viewModel.addAvailableLocations(item.id, item.name);
});
$.each(data[2], function(i, item) {
viewModel.addAvailableTrainings(item.id, item.name);
});
$.each(data[3], function(i, item) {
viewModel.addAvailableCourses(item.id, item.name);
});
}).done($(function() {("#location").bind("change", function() {
loadTrainingsAndCourses($("#location").val(), $("#training").val());
})}));
}
function loadTrainingsAndCourses($locationid, $trainingid) {
viewModel.availableTrainings.removeAll();
viewModel.availableCourses.removeAll();
$.getJSON('/api/courses/' + $locationid + '/' + $trainingid, function(data) {
$.each(data[2], function(i, item) {
viewModel.addAvailableTrainings(item.id, item.name);
});
}).done(loadCourses($("#location").val(), $("#training").val()));
}
function loadCourses($locationid, $trainingid) {
viewModel.availableCourses.removeAll();
$.getJSON('/api/courses/' + $locationid + '/' + $trainingid, function(data) {
$.each(data[3], function(i, item) {
viewModel.addAvailableCourses(item.id, item.name);
});
});
}
function initPage() {
loadAllSelects(1,4);
} | js/coursesViewModel.js | // View model for the courses page
function pageViewModel(gvm) {
// Page specific i18n bindings
gvm.title = ko.computed(function(){i18n.setLocale(gvm.lang()); return gvm.app() + ' - ' + i18n.__("CoursesTitle");}, gvm);
gvm.pageHeader = ko.computed(function(){i18n.setLocale(gvm.lang()); return i18n.__("CoursesHeader");}, gvm);
gvm.projectname = ko.computed(function(){i18n.setLocale(gvm.lang()); return i18n.__("ProjectName");}, gvm);
gvm.isUpdating = false;
gvm.availableLocations = ko.observableArray([]);
gvm.availableTrainings = ko.observableArray([]);
gvm.availableCourses = ko.observableArray([]);
gvm.addAvailableLocations = function(id, name) {
var selectObject = {id: id, locationName: name};
gvm.availableLocations.push(selectObject);
}
gvm.addAvailableTrainings = function(id, name) {
var selectObject = {id: id, trainingName: name};
gvm.availableTrainings.push(selectObject);
}
gvm.addAvailableCourses = function(id, name) {
var selectObject = {id: id, courseName: name};
gvm.availableCourses.push(selectObject);
}
gvm.clearAll = function() {
gvm.availableLocations.removeAll();
gvm.availableTrainings.removeAll();
gvm.availableCourses.removeAll();
}
}
function loadAllSelects($locationid, $trainingid)
{
viewModel.clearAll();
$.getJSON('/api/courses/' + $locationid + '/' + $trainingid, function(data) {
$.each(data[1],function(i, item) {
viewModel.addAvailableLocations(item.id, item.name);
});
$.each(data[2], function(i, item) {
viewModel.addAvailableTrainings(item.id, item.name);
});
$.each(data[3], function(i, item) {
viewModel.addAvailableCourses(item.id, item.name);
});
}).done($("#location").bind("change", function() {
loadTrainingsAndCourses($("#location").val(), $("#training").val());
}));
}
function loadTrainingsAndCourses($locationid, $trainingid) {
viewModel.availableTrainings.removeAll();
viewModel.availableCourses.removeAll();
$.getJSON('/api/courses/' + $locationid + '/' + $trainingid, function(data) {
$.each(data[2], function(i, item) {
viewModel.addAvailableTrainings(item.id, item.name);
});
}).done(loadCourses($("#location").val(), $("#training").val()));
}
function loadCourses($locationid, $trainingid) {
viewModel.availableCourses.removeAll();
$.getJSON('/api/courses/' + $locationid + '/' + $trainingid, function(data) {
$.each(data[3], function(i, item) {
viewModel.addAvailableCourses(item.id, item.name);
});
});
}
function initPage() {
loadAllSelects(1,4);
} | courses
| js/coursesViewModel.js | courses | <ide><path>s/coursesViewModel.js
<ide> $.each(data[3], function(i, item) {
<ide> viewModel.addAvailableCourses(item.id, item.name);
<ide> });
<del> }).done($("#location").bind("change", function() {
<add> }).done($(function() {("#location").bind("change", function() {
<ide> loadTrainingsAndCourses($("#location").val(), $("#training").val());
<del> }));
<add> })}));
<ide> }
<ide>
<ide> function loadTrainingsAndCourses($locationid, $trainingid) { |
|
Java | lgpl-2.1 | 5509a64ce2ef61386c736ee5857f8040951f1b46 | 0 | ACS-Community/ACS,csrg-utfsm/acscb,jbarriosc/ACSUFRO,jbarriosc/ACSUFRO,csrg-utfsm/acscb,jbarriosc/ACSUFRO,csrg-utfsm/acscb,jbarriosc/ACSUFRO,jbarriosc/ACSUFRO,csrg-utfsm/acscb,ACS-Community/ACS,ACS-Community/ACS,jbarriosc/ACSUFRO,ACS-Community/ACS,csrg-utfsm/acscb,ACS-Community/ACS,csrg-utfsm/acscb,jbarriosc/ACSUFRO,jbarriosc/ACSUFRO,ACS-Community/ACS,csrg-utfsm/acscb,ACS-Community/ACS,jbarriosc/ACSUFRO,csrg-utfsm/acscb,ACS-Community/ACS | /*
* ALMA - Atacama Large Millimiter Array
* (c) European Southern Observatory, 2005
* Copyright by ESO (in the framework of the ALMA collaboration),
* All rights reserved
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*/
package alma.acs.config.validators;
import java.io.File;
import java.io.FileFilter;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Set;
import java.util.logging.Level;
import java.util.logging.Logger;
import com.cosylab.util.FileHelper;
import alma.acs.testsupport.TestLogger;
import alma.acs.util.CmdLineArgs;
import alma.acs.util.CmdLineRegisteredOption;
/**
* Tool that scans modules (or all of ALMA software) for files that may be configuration files
* and therefore should be considered for moving to a different location.
* <p>
* All files in and below the directory given by the option <code>-baseDir</code> are scanned.
* Those files with certain endings are suspected of being configuration files, but then some of these files get cleared
* if they are recognized by one of the filters which check all suspicious files.
* For example, a filter specialized in xml files will recognize those files used for ACS error definitions.
* All files that are still suspect after filtering will be reported, either by printing their pathname to stdout,
* or by copying them to a target directory if the <code>-targetDir</code> option is given.
*
* @author hsommer
*/
public class ConfigFileFinder {
private Logger logger;
/** directory under which we look for config files */
private File baseDir;
/** optional target dir to which suspected config files are copied */
private File targetDir;
/** endings of files to consider, e.g. {"xml", "properties"} */
private Set<String> fileEndings = new HashSet<String>();
/** should files be copied to targetDir flat, i.e. w/o subdir structure? */
private boolean targetFilesFlat;
/** classes that can recognize specific suspect files and state that they are actually not config files */
private List<ConfigFileRedeemer> redeemers = new ArrayList<ConfigFileRedeemer>();
/**
* @throws Exception
*/
public ConfigFileFinder() throws Exception {
targetFilesFlat = false;
logger = TestLogger.getLogger(getClass().getName());
// hardwired file endings that don't need to be supplied by any filters
addFileEndings(new String[] {".properties", ".config"});
// here we add specialized config file redeemers
addFileFilter(new ConfigFileRedeemerXml());
// todo: perhaps allow user-supplied redeemers to be added, based on a command line parameter (classname)
}
public void addFileFilter(ConfigFileRedeemer filter) {
redeemers.add(filter);
addFileEndings(filter.getFileEndings());
}
public void configureFromArgs(String[] args) {
CmdLineArgs cmdArgs = new CmdLineArgs();
CmdLineRegisteredOption optBaseDir = new CmdLineRegisteredOption("-baseDir", 1);
cmdArgs.registerOption(optBaseDir);
CmdLineRegisteredOption optTargetDir = new CmdLineRegisteredOption("-targetDir", 1);
cmdArgs.registerOption(optTargetDir);
CmdLineRegisteredOption optTargetFilesFlat = new CmdLineRegisteredOption("-targetFilesFlat", 0);
cmdArgs.registerOption(optTargetFilesFlat);
CmdLineRegisteredOption optFileEndings = new CmdLineRegisteredOption("-fileEndings", 1);
cmdArgs.registerOption(optFileEndings);
cmdArgs.parseArgs(args);
if (cmdArgs.isSpecified(optBaseDir)) {
String baseDirName = cmdArgs.getValues(optBaseDir)[0].trim();
setBaseDir(new File(baseDirName));
}
if (cmdArgs.isSpecified(optTargetDir)) {
String targetDirName = cmdArgs.getValues(optTargetDir)[0].trim();
setTargetDir(new File(targetDirName));
}
targetFilesFlat = cmdArgs.isSpecified(optTargetFilesFlat);
if (cmdArgs.isSpecified(optFileEndings)) {
addFileEndings(cmdArgs.getValues(optFileEndings));
}
}
public void checkConfiguration() throws IllegalStateException {
String err = "";
String warn = "";
if (baseDir == null || !baseDir.exists()) {
err += "baseDir '" + baseDir + "' does not exist. ";
}
if (targetDir == null || !targetDir.exists()) {
warn += "targetDir does not exist. No files will be copied. ";
}
if (fileEndings.isEmpty()) {
// should never happen thanks to default endings
err += "no files can be selected. Specify option \"-fileEndings\". ";
}
if (err.length() > 0) {
throw new IllegalStateException("Bad configuration: " + err);
}
if (warn.length() > 0) {
System.err.println("Configuration warning: " + warn);
}
}
/**
* Gets all Files under {@link #baseDir} whose name ends with any of the Strings given in {@link #fileEndings},
* and runs them through the filter chain to suppress files of known and safe content.
* @return
*/
private void run() {
String msg = "Tool " + getClass().getSimpleName() + " will search for configuration files in '" + baseDir +
"' and below, suspecting all files ending with ";
for (Iterator<String> iter = fileEndings.iterator(); iter.hasNext();) {
msg += "'" + iter.next() + "'";
if (iter.hasNext()) {
msg += ", ";
}
}
msg += " and will then prune those files recognized by any of the filters ";
for (Iterator<ConfigFileRedeemer> iter = redeemers.iterator(); iter.hasNext();) {
msg += iter.next().getName();
if (iter.hasNext()) {
msg += ", ";
}
}
msg += ". ";
if (targetDir != null) {
msg += "The remaining potential config files are copied to '" + targetDir + "' with their original directory structure ";
if (targetFilesFlat) {
msg += "flattened.";
}
else {
msg += "maintained.";
}
}
logger.info(msg);
FileFilter fileFilter = new FileFilter() {
public boolean accept(File pathname) {
if (pathname.isDirectory()) {
return true;
}
String name = pathname.getName();
for (Iterator iter = fileEndings.iterator(); iter.hasNext();) {
String fnEnding = (String) iter.next();
if (name.endsWith(fnEnding)) {
return true;
}
}
return false;
}
};
runRecursive(baseDir, fileFilter);
}
private void runRecursive(File currentDir, FileFilter fileFilter) {
if (currentDir == null || !currentDir.exists() || !currentDir.isDirectory() ) {
return;
}
if (!currentDir.canRead()) {
logger.warning("failed to read from directory " + currentDir.getAbsolutePath());
return;
}
// get files and subdirs from the current directory
File[] allFiles = currentDir.listFiles(fileFilter);
for (int i = 0; i < allFiles.length; i++) {
if (allFiles[i].isFile()) {
// check if the current file is known to be not a config file
boolean redeemed = false;
for (Iterator<ConfigFileRedeemer> iter = redeemers.iterator(); iter.hasNext();) {
ConfigFileRedeemer filter = iter.next();
if (filter.isNotAConfigFile(allFiles[i])) {
redeemed = true;
break;
}
}
if (!redeemed) {
handleConfigFile(allFiles[i]);
}
}
else if (allFiles[i].isDirectory()) {
runRecursive(allFiles[i], fileFilter);
}
}
}
protected void handleConfigFile(File configFile) {
try {
if (targetDir != null) {
try {
if (targetFilesFlat) {
File targetFile = new File(targetDir, configFile.getName());
FileHelper.copy(configFile, targetFile, true);
}
else {
String relPathName = configFile.getAbsolutePath().substring(baseDir.getAbsolutePath().length());
if (!relPathName.startsWith(File.separator)) {
relPathName = File.separator + relPathName;
}
File targetFile = new File(targetDir, relPathName);
// System.err.println("will create " + targetFile.getAbsolutePath());
FileHelper.copy(configFile, targetFile, true);
}
} catch (IOException e) {
e.printStackTrace();
}
}
System.out.println("Potential config file: " + configFile.getAbsolutePath());
}
catch (Throwable thr) {
logger.log(Level.SEVERE, "Failed to handle file " + configFile.getAbsolutePath(), thr);
}
}
protected void setBaseDir(File baseDir) {
this.baseDir = baseDir;
}
protected void setTargetDir(File targetDir) {
this.targetDir = targetDir;
}
protected void addFileEndings(String[] moreFileEndings) {
for (int i = 0; i < moreFileEndings.length; i++) {
if (moreFileEndings[i] == null || moreFileEndings[i].trim().length() == 0) {
throw new IllegalArgumentException("illegal empty file ending.");
}
this.fileEndings.add(moreFileEndings[i].trim());
}
}
public static void main(String[] args) {
try {
ConfigFileFinder configFinder = new ConfigFileFinder();
configFinder.configureFromArgs(args);
configFinder.checkConfiguration();
configFinder.run();
System.out.println("done.");
} catch (Exception e) {
e.printStackTrace();
}
}
} | LGPL/CommonSoftware/jacsutil/src/alma/acs/config/validators/ConfigFileFinder.java | /*
* ALMA - Atacama Large Millimiter Array
* (c) European Southern Observatory, 2005
* Copyright by ESO (in the framework of the ALMA collaboration),
* All rights reserved
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*/
package alma.acs.config.validators;
import java.io.File;
import java.io.FileFilter;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Set;
import java.util.logging.Logger;
import com.cosylab.util.FileHelper;
import alma.acs.testsupport.TestLogger;
import alma.acs.util.CmdLineArgs;
import alma.acs.util.CmdLineRegisteredOption;
/**
* @author hsommer
*
*/
public class ConfigFileFinder {
/** directory under which we look for config files */
private File baseDir;
/** optional target dir to which suspected config files are copied */
private File targetDir;
/** endings of files to consider, e.g. {"xml", "properties"} */
private Set<String> fileEndings = new HashSet<String>();
/** should files be copied to targetDir flat, i.e. w/o subdir structure? */
private boolean targetFilesFlat;
private Logger logger;
private List<ConfigFileRedeemer> filters = new ArrayList<ConfigFileRedeemer>();
/**
* @throws Exception
*
*/
public ConfigFileFinder() throws Exception {
targetFilesFlat = false;
logger = TestLogger.getLogger(getClass().getName());
// hardwired file endings
addFileEndings(new String[] {".properties", ".config"});
// here we add specialized config file redeemers
addFileFilter(new ConfigFileRedeemerXml());
}
public void addFileFilter(ConfigFileRedeemer filter) {
filters.add(filter);
addFileEndings(filter.getFileEndings());
}
public void configureFromArgs(String[] args) {
CmdLineArgs cmdArgs = new CmdLineArgs();
CmdLineRegisteredOption optBaseDir = new CmdLineRegisteredOption("-baseDir", 1);
cmdArgs.registerOption(optBaseDir);
CmdLineRegisteredOption optTargetDir = new CmdLineRegisteredOption("-targetDir", 1);
cmdArgs.registerOption(optTargetDir);
CmdLineRegisteredOption optTargetFilesFlat = new CmdLineRegisteredOption("-targetFilesFlat", 0);
cmdArgs.registerOption(optTargetFilesFlat);
CmdLineRegisteredOption optFileEndings = new CmdLineRegisteredOption("-fileEndings", 1);
cmdArgs.registerOption(optFileEndings);
cmdArgs.parseArgs(args);
if (cmdArgs.isSpecified(optBaseDir)) {
String baseDirName = cmdArgs.getValues(optBaseDir)[0].trim();
setBaseDir(new File(baseDirName));
}
if (cmdArgs.isSpecified(optTargetDir)) {
String targetDirName = cmdArgs.getValues(optTargetDir)[0].trim();
setTargetDir(new File(targetDirName));
}
targetFilesFlat = cmdArgs.isSpecified(optTargetFilesFlat);
if (cmdArgs.isSpecified(optFileEndings)) {
addFileEndings(cmdArgs.getValues(optFileEndings));
}
}
public void checkConfiguration() throws IllegalStateException {
String err = "";
String warn = "";
if (baseDir == null || !baseDir.exists()) {
err += "baseDir '" + baseDir + "' does not exist. ";
}
if (targetDir == null || !targetDir.exists()) {
warn += "targetDir does not exist. No files will be copied. ";
}
if (fileEndings.isEmpty()) {
// should never happen thanks to default endings
err += "no files can be selected. Specify option \"-fileEndings\". ";
}
if (err.length() > 0) {
throw new IllegalStateException("Bad configuration: " + err);
}
if (warn.length() > 0) {
System.err.println("Configuration warning: " + warn);
}
}
/**
* Gets all Files under {@link #baseDir} whose name ends with any of the Strings given in {@link #fileEndings},
* and runs them through the filter chain to suppress files of known and safe content.
* @return
*/
private void run() {
FileFilter fileFilter = new FileFilter() {
public boolean accept(File pathname) {
if (pathname.isDirectory()) {
return true;
}
String name = pathname.getName();
for (Iterator iter = fileEndings.iterator(); iter.hasNext();) {
String fnEnding = (String) iter.next();
if (name.endsWith(fnEnding)) {
return true;
}
}
return false;
}
};
runRecursive(baseDir, fileFilter);
}
private void runRecursive(File currentDir, FileFilter fileFilter) {
if (currentDir == null || !currentDir.exists() || !currentDir.isDirectory() ) {
return;
}
if (!currentDir.canRead()) {
logger.warning("failed to read from directory " + currentDir.getAbsolutePath());
return;
}
// get files and subdirs from the current directory
File[] allFiles = currentDir.listFiles(fileFilter);
for (int i = 0; i < allFiles.length; i++) {
if (allFiles[i].isFile()) {
// check if the current file is known to be not a config file
boolean redeemed = false;
for (Iterator<ConfigFileRedeemer> iter = filters.iterator(); iter.hasNext();) {
ConfigFileRedeemer filter = iter.next();
if (filter.isNotAConfigFile(allFiles[i])) {
redeemed = true;
break;
}
}
if (!redeemed) {
handleConfigFile(allFiles[i]);
}
}
else if (allFiles[i].isDirectory()) {
runRecursive(allFiles[i], fileFilter);
}
}
}
private void handleConfigFile(File configFile) {
if (targetDir != null) {
try {
if (targetFilesFlat) {
File targetFile = new File(targetDir, configFile.getName());
FileHelper.copy(configFile, targetFile);
}
else {
// todo
logger.info("copy to target dir not yet implemented!" );
}
} catch (IOException e) {
e.printStackTrace();
}
}
System.out.println("Potential config file: " + configFile.getAbsolutePath());
}
protected void setBaseDir(File baseDir) {
this.baseDir = baseDir;
}
protected void setTargetDir(File targetDir) {
this.targetDir = targetDir;
}
protected void addFileEndings(String[] moreFileEndings) {
for (int i = 0; i < moreFileEndings.length; i++) {
if (moreFileEndings[i] == null || moreFileEndings[i].trim().length() == 0) {
throw new IllegalArgumentException("illegal empty file ending.");
}
this.fileEndings.add(moreFileEndings[i].trim());
}
}
public static void main(String[] args) {
try {
ConfigFileFinder configFinder = new ConfigFileFinder();
configFinder.configureFromArgs(args);
configFinder.checkConfiguration();
configFinder.run();
System.out.println("done.");
} catch (Exception e) {
e.printStackTrace();
}
}
} | log messages, javadoc, impl of "copy to target dir non-flat"
git-svn-id: afcf11d89342f630bd950d18a70234a9e277d909@52849 523d945c-050c-4681-91ec-863ad3bb968a
| LGPL/CommonSoftware/jacsutil/src/alma/acs/config/validators/ConfigFileFinder.java | log messages, javadoc, impl of "copy to target dir non-flat" | <ide><path>GPL/CommonSoftware/jacsutil/src/alma/acs/config/validators/ConfigFileFinder.java
<ide> import java.util.Iterator;
<ide> import java.util.List;
<ide> import java.util.Set;
<add>import java.util.logging.Level;
<ide> import java.util.logging.Logger;
<ide>
<ide> import com.cosylab.util.FileHelper;
<ide> import alma.acs.util.CmdLineRegisteredOption;
<ide>
<ide> /**
<add> * Tool that scans modules (or all of ALMA software) for files that may be configuration files
<add> * and therefore should be considered for moving to a different location.
<add> * <p>
<add> * All files in and below the directory given by the option <code>-baseDir</code> are scanned.
<add> * Those files with certain endings are suspected of being configuration files, but then some of these files get cleared
<add> * if they are recognized by one of the filters which check all suspicious files.
<add> * For example, a filter specialized in xml files will recognize those files used for ACS error definitions.
<add> * All files that are still suspect after filtering will be reported, either by printing their pathname to stdout,
<add> * or by copying them to a target directory if the <code>-targetDir</code> option is given.
<add> *
<ide> * @author hsommer
<del> *
<ide> */
<ide> public class ConfigFileFinder {
<ide>
<add> private Logger logger;
<add>
<ide> /** directory under which we look for config files */
<ide> private File baseDir;
<ide>
<ide> /** should files be copied to targetDir flat, i.e. w/o subdir structure? */
<ide> private boolean targetFilesFlat;
<ide>
<del> private Logger logger;
<del>
<del> private List<ConfigFileRedeemer> filters = new ArrayList<ConfigFileRedeemer>();
<add> /** classes that can recognize specific suspect files and state that they are actually not config files */
<add> private List<ConfigFileRedeemer> redeemers = new ArrayList<ConfigFileRedeemer>();
<ide>
<ide>
<ide> /**
<ide> * @throws Exception
<del> *
<ide> */
<ide> public ConfigFileFinder() throws Exception {
<ide> targetFilesFlat = false;
<ide> logger = TestLogger.getLogger(getClass().getName());
<ide>
<del> // hardwired file endings
<add> // hardwired file endings that don't need to be supplied by any filters
<ide> addFileEndings(new String[] {".properties", ".config"});
<add>
<ide> // here we add specialized config file redeemers
<del> addFileFilter(new ConfigFileRedeemerXml());
<add> addFileFilter(new ConfigFileRedeemerXml());
<add>
<add> // todo: perhaps allow user-supplied redeemers to be added, based on a command line parameter (classname)
<ide> }
<ide>
<ide> public void addFileFilter(ConfigFileRedeemer filter) {
<del> filters.add(filter);
<add> redeemers.add(filter);
<ide> addFileEndings(filter.getFileEndings());
<ide> }
<ide>
<ide> * @return
<ide> */
<ide> private void run() {
<add> String msg = "Tool " + getClass().getSimpleName() + " will search for configuration files in '" + baseDir +
<add> "' and below, suspecting all files ending with ";
<add> for (Iterator<String> iter = fileEndings.iterator(); iter.hasNext();) {
<add> msg += "'" + iter.next() + "'";
<add> if (iter.hasNext()) {
<add> msg += ", ";
<add> }
<add> }
<add> msg += " and will then prune those files recognized by any of the filters ";
<add> for (Iterator<ConfigFileRedeemer> iter = redeemers.iterator(); iter.hasNext();) {
<add> msg += iter.next().getName();
<add> if (iter.hasNext()) {
<add> msg += ", ";
<add> }
<add> }
<add> msg += ". ";
<add> if (targetDir != null) {
<add> msg += "The remaining potential config files are copied to '" + targetDir + "' with their original directory structure ";
<add> if (targetFilesFlat) {
<add> msg += "flattened.";
<add> }
<add> else {
<add> msg += "maintained.";
<add> }
<add> }
<add> logger.info(msg);
<add>
<ide> FileFilter fileFilter = new FileFilter() {
<ide> public boolean accept(File pathname) {
<ide> if (pathname.isDirectory()) {
<ide> }
<ide> return false;
<ide> }
<del>
<ide> };
<add>
<ide> runRecursive(baseDir, fileFilter);
<ide> }
<ide>
<ide> if (allFiles[i].isFile()) {
<ide> // check if the current file is known to be not a config file
<ide> boolean redeemed = false;
<del> for (Iterator<ConfigFileRedeemer> iter = filters.iterator(); iter.hasNext();) {
<add> for (Iterator<ConfigFileRedeemer> iter = redeemers.iterator(); iter.hasNext();) {
<ide> ConfigFileRedeemer filter = iter.next();
<ide> if (filter.isNotAConfigFile(allFiles[i])) {
<ide> redeemed = true;
<ide> }
<ide> }
<ide>
<del> private void handleConfigFile(File configFile) {
<del> if (targetDir != null) {
<del> try {
<del> if (targetFilesFlat) {
<del> File targetFile = new File(targetDir, configFile.getName());
<del> FileHelper.copy(configFile, targetFile);
<del> }
<del> else {
<del> // todo
<del> logger.info("copy to target dir not yet implemented!" );
<del> }
<del> } catch (IOException e) {
<del> e.printStackTrace();
<del> }
<del> }
<del> System.out.println("Potential config file: " + configFile.getAbsolutePath());
<del> }
<add> protected void handleConfigFile(File configFile) {
<add> try {
<add> if (targetDir != null) {
<add> try {
<add> if (targetFilesFlat) {
<add> File targetFile = new File(targetDir, configFile.getName());
<add> FileHelper.copy(configFile, targetFile, true);
<add> }
<add> else {
<add> String relPathName = configFile.getAbsolutePath().substring(baseDir.getAbsolutePath().length());
<add> if (!relPathName.startsWith(File.separator)) {
<add> relPathName = File.separator + relPathName;
<add> }
<add> File targetFile = new File(targetDir, relPathName);
<add>// System.err.println("will create " + targetFile.getAbsolutePath());
<add> FileHelper.copy(configFile, targetFile, true);
<add> }
<add> } catch (IOException e) {
<add> e.printStackTrace();
<add> }
<add> }
<add> System.out.println("Potential config file: " + configFile.getAbsolutePath());
<add> }
<add> catch (Throwable thr) {
<add> logger.log(Level.SEVERE, "Failed to handle file " + configFile.getAbsolutePath(), thr);
<add> }
<add> }
<add>
<ide>
<ide> protected void setBaseDir(File baseDir) {
<ide> this.baseDir = baseDir; |
|
JavaScript | mit | a24bf9b62b47bee8d3ddb3675a053e315cca5938 | 0 | kostyll/docurium,libgit2/docurium,libgit2/docurium,kostyll/docurium,libgit2/docurium,kostyll/docurium | $(function() {
// our document model - stores the datastructure generated from docurium
var Docurium = Backbone.Model.extend({
defaults: {'version': 'unknown'},
initialize: function() {
this.loadVersions()
},
loadVersions: function() {
$.getJSON("project.json", function(data) {
docurium.set({'versions': data.versions, 'github': data.github, 'signatures': data.signatures, 'name': data.name, 'groups': data.groups})
if(data.name) {
$('#site-title').text(data.name + ' API')
document.title = data.name + ' API'
}
docurium.setVersionPicker()
docurium.setVersion()
})
},
setVersionPicker: function () {
vers = docurium.get('versions')
$('#version-list').empty().hide()
for(var i in vers) {
version = vers[i]
vlink = $('<a>').attr('href', '#' + version).append(version).click( function() {
$('#version-list').hide(100)
})
$('#version-list').append($('<li>').append(vlink))
}
vlink = $('<a>').attr('href', '#' + 'p/changelog').append("Changelog").click ( function () {
$('#version-list').hide(100)
})
$('#version-list').append($('<li>').append(vlink))
},
setVersion: function (version) {
if(!version) {
version = _.first(docurium.get('versions'))
}
if(docurium.get('version') != version) {
docurium.set({'version': version})
$('#site-title').attr('href', '#' + version)
docurium.loadDoc()
}
},
loadDoc: function() {
version = this.get('version')
$.ajax({
url: version + '.json',
context: this,
dataType: 'json',
success: function(data){
this.set({'data': data})
Backbone.history.start()
}
})
},
collapseSection: function(data) {
$(this).next().toggle(100)
return false
},
showIndexPage: function() {
version = docurium.get('version')
ws.saveLocation(version)
data = docurium.get('data')
content = $('.content')
content.empty()
content.append($('<h1>').append("Public API Functions"))
sigHist = docurium.get('signatures')
// Function Groups
for (var i in data['groups']) {
group = data['groups'][i]
content.append($('<h2>').addClass('funcGroup').append(group[0]))
list = $('<p>').addClass('functionList')
for(var j in group[1]) {
fun = group[1][j]
link = $('<a>').attr('href', '#' + groupLink(group[0], fun)).append(fun)
if(sigHist[fun].changes[version]) {
link.addClass('changed')
}
if(version == _.first(sigHist[fun].exists)) {
link.addClass('introd')
}
list.append(link)
if(j < group[1].length - 1) {
list.append(', ')
}
}
content.append(list)
}
},
getGroup: function(gname) {
var groups = docurium.get('data')['groups']
for(var i in groups) {
if(groups[i][0] == gname) {
return groups[i]
}
}
},
showFun: function(gname, fname) {
group = docurium.getGroup(gname)
fdata = docurium.get('data')['functions']
gname = group[0]
functions = group[1]
content = $('.content')
content.empty()
// Show Function Name
content.append($('<h1>').addClass('funcTitle').append(fname))
if(fdata[fname]['description']) {
sub = content.append($('<h3>').addClass('funcDesc').append( ' ' + fdata[fname]['description'] ))
}
// Show Function Arguments
argtable = $('<table>').addClass('funcTable')
args = fdata[fname]['args']
for(var i=0; i<args.length; i++) {
arg = args[i]
row = $('<tr>')
row.append($('<td>').attr('valign', 'top').attr('nowrap', true).append(this.hotLink(arg.type)))
row.append($('<td>').attr('valign', 'top').addClass('var').append(arg.name))
row.append($('<td>').addClass('comment').append(arg.comment))
argtable.append(row)
}
content.append(argtable)
// Show Function Return Value
retdiv = $('<div>').addClass('returns')
retdiv.append($('<h3>').append("returns"))
rettable = $('<table>').addClass('funcTable')
retrow = $('<tr>')
rettable.append(retrow)
retdiv.append(rettable)
ret = fdata[fname]['return']
retrow.append($('<td>').attr('valign', 'top').append(this.hotLink(ret.type)))
if(ret.comment) {
retrow.append($('<td>').addClass('comment').append(ret.comment))
}
content.append(retdiv)
// Show Non-Parsed Function Comments
if (fdata[fname]['comments']) {
content.append($('<pre>').append(fdata[fname]['comments']))
}
// Show Function Signature
ex = $('<code>').addClass('params')
ex.append(this.hotLink(fdata[fname]['return']['type'] + ' ' + fname + '(' + fdata[fname]['argline'] + ');'))
example = $('<div>').addClass('example')
example.append($('<h3>').append("signature"))
example.append(ex)
content.append(example)
// Show Function History
sigs = $('<div>').addClass('signatures')
sigs.append($('<h3>').append("versions"))
sigHist = docurium.get('signatures')[fname]
for(var i in sigHist.exists) {
ver = sigHist.exists[i]
link = $('<a>').attr('href', '#' + groupLink(gname, fname, ver)).append(ver)
if(sigHist.changes[ver]) {
link.addClass('changed')
}
if(ver == docurium.get('version')) {
link.addClass('current')
}
sigs.append(link)
}
content.append(sigs)
// Link to Function Def on GitHub
link = this.github_file(fdata[fname].file, fdata[fname].line, fdata[fname].lineto)
flink = $('<a>').attr('target', 'github').attr('href', link).append(fdata[fname].file)
content.append($('<div>').addClass('fileLink').append("Defined in: ").append(flink))
// Show where this is used in the examples
if(ex = fdata[fname].examples) {
also = $('<div>').addClass('funcEx')
also.append("Used in examples: ")
for( fname in ex ) {
lines = ex[fname]
line = $('<li>')
line.append($('<strong>').append(fname))
for( var i in lines ) {
flink = $('<a>').attr('href', lines[i]).append(' [' + (parseInt(i) + 1) + '] ')
line.append(flink)
}
also.append(line)
}
content.append(also)
}
// Show other functions in this group
also = $('<div>').addClass('also')
flink = $('<a href="#' + docurium.get('version') + '/group/' + group[0] + '">' + group[0] + '</a>')
flink.click( docurium.showGroup )
also.append("Also in ")
also.append(flink)
also.append(" group: <br/>")
for(i=0; i<functions.length; i++) {
f = functions[i]
d = fdata[f]
link = $('<a>').attr('href', '#' + groupLink(gname, f)).append(f)
also.append(link)
also.append(', ')
}
content.append(also)
this.addHotlinks()
},
showChangeLog: function() {
content = $('.content')
content.empty()
content.append($('<h1>').append("Function Changelog"))
// for every version, show which functions added, removed, changed - from HEAD down
versions = docurium.get('versions')
sigHist = docurium.get('signatures')
lastVer = _.first(versions)
// fill changelog struct
changelog = {}
for(var i in versions) {
version = versions[i]
changelog[version] = {'deletes': [], 'changes': [], 'adds': []}
}
// figure out the adds, deletes and changes
for(var func in sigHist) {
lastv = _.last(sigHist[func].exists)
firstv = _.first(sigHist[func].exists)
if (func != '__attribute__') {
changelog[firstv]['adds'].push(func)
}
if(lastv && (lastv != lastVer)) {
vi = _.indexOf(versions, lastv)
delv = versions[vi - 1]
changelog[delv]['deletes'].push(func)
}
for(var v in sigHist[func].changes) {
changelog[v]['changes'].push(func)
}
}
// display the data
for(var i in versions) {
version = versions[i]
content.append($('<h3>').append(version))
cl = $('<div>').addClass('changelog')
console.log(version)
for(var type in changelog[version]) {
adds = changelog[version][type]
adds.sort()
addsection = $('<p>')
for(var j in adds) {
add = adds[j]
if(type != 'deletes') {
gname = docurium.groupOf(add)
addlink = $('<a>').attr('href', '#' + groupLink(gname, add, version)).append(add)
} else {
addlink = add
}
addsection.append($('<li>').addClass(type).append(addlink))
}
cl.append(addsection)
}
content.append(cl)
}
},
showType: function(data, manual) {
if(manual) {
id = '#typeItem' + domSafe(manual)
ref = parseInt($(id).attr('ref'))
} else {
ref = parseInt($(this).attr('ref'))
}
tdata = docurium.get('data')['types'][ref]
tname = tdata[0]
data = tdata[1]
ws.saveLocation(typeLink(tname))
content = $('.content')
content.empty()
content.append($('<h1>').addClass('funcTitle').append(tname).append($("<small>").append(data.type)))
content.append($('<p>').append(data.value))
if(data.block) {
content.append($('<pre>').append(data.block))
}
var ret = data.used.returns
if (ret.length > 0) {
content.append($('<h3>').append('Returns'))
}
for(var i=0; i<ret.length; i++) {
gname = docurium.groupOf(ret[i])
flink = $('<a>').attr('href', '#' + groupLink(gname, ret[i])).append(ret[i])
flink.click( docurium.showFun )
content.append(flink)
content.append(', ')
}
var needs = data.used.needs
if (needs.length > 0) {
content.append($('<h3>').append('Argument In'))
}
for(var i=0; i<needs.length; i++) {
gname = docurium.groupOf(needs[i])
flink = $('<a>').attr('href', '#' + groupLink(gname, needs[i])).append(needs[i])
flink.click( docurium.showFun )
content.append(flink)
content.append(', ')
}
link = docurium.github_file(data.file, data.line, data.lineto)
flink = $('<a>').attr('target', 'github').attr('href', link).append(data.file)
content.append($('<div>').addClass('fileLink').append("Defined in: ").append(flink))
return false
},
showGroup: function(data, manual, flink) {
if(manual) {
id = '#groupItem' + manual
ref = parseInt($(id).attr('ref'))
} else {
ref = parseInt($(this).attr('ref'))
}
group = docurium.get('data')['groups'][ref]
fdata = docurium.get('data')['functions']
gname = group[0]
ws.saveLocation(groupLink(gname));
functions = group[1]
$('.content').empty()
$('.content').append($('<h1>').append(gname + ' functions'))
table = $('<table>').addClass('methods')
for(i=0; i<functions.length; i++) {
f = functions[i]
d = fdata[f]
row = $('<tr>')
row.append($('<td>').attr('nowrap', true).attr('valign', 'top').append(d['return']['type'].substring(0, 20)))
link = $('<a>').attr('href', '#' + groupLink(gname, f)).append(f)
row.append($('<td>').attr('valign', 'top').addClass('methodName').append( link ))
args = d['args']
argtd = $('<td>')
for(j=0; j<args.length; j++) {
argtd.append(args[j].type + ' ' + args[j].name)
argtd.append($('<br>'))
}
row.append(argtd)
table.append(row)
}
$('.content').append(table)
for(var i=0; i<functions.length; i++) {
f = functions[i]
argsText = '( ' + fdata[f]['argline'] + ' )'
link = $('<a>').attr('href', '#' + groupLink(gname, f)).append(f)
$('.content').append($('<h2>').append(link).append($('<small>').append(argsText)))
description = fdata[f]['description']
if(fdata[f]['comments'])
description += "\n\n" + fdata[f]['comments']
$('.content').append($('<pre>').append(description))
}
return false
},
// look for structs and link them
hotLink: function(text) {
types = this.get('data')['types']
for(var i=0; i<types.length; i++) {
type = types[i]
typeName = type[0]
typeData = type[1]
re = new RegExp(typeName + ' ', 'gi');
link = '<a ref="' + i.toString() + '" class="typeLink' + domSafe(typeName) + '" href="#">' + typeName + '</a> '
text = text.replace(re, link)
}
return text
},
groupOf: function (func) {
return this.get('groups')[func]
},
addHotlinks: function() {
types = this.get('data')['types']
for(var i=0; i<types.length; i++) {
type = types[i]
typeName = type[0]
className = '.typeLink' + domSafe(typeName)
$(className).click( this.showType )
}
},
refreshView: function() {
data = this.get('data')
// Function Groups
menu = $('<li>')
title = $('<h3><a href="#">Functions</a></h3>').click( this.collapseSection )
menu.append(title)
list = $('<ul>')
_.each(data['groups'], function(group, i) {
flink = $('<a href="#" ref="' + i.toString() + '" id="groupItem' + group[0] + '">' + group[0] + ' <small>(' + group[1].length + ')</small></a>')
flink.click( this.showGroup )
fitem = $('<li>')
fitem.append(flink)
list.append(fitem)
}, this)
menu.append(list)
// Types
title = $('<h3><a href="#">Types</a></h3>').click( this.collapseSection )
menu.append(title)
list = $('<ul>')
fitem = $('<li>')
fitem.append($('<span>').addClass('divide').append("Enums"))
list.append(fitem)
_.each(data['types'], function(group, i) {
if(group[1]['block'] && group[1]['type'] == 'enum') {
flink = $('<a href="#" ref="' + i.toString() + '" id="typeItem' + domSafe(group[0]) + '">' + group[0] + '</a>')
flink.click( this.showType )
fitem = $('<li>')
fitem.append(flink)
list.append(fitem)
}
}, this)
fitem = $('<li>')
fitem.append($('<span>').addClass('divide').append("Structs"))
list.append(fitem)
_.each(data['types'], function(group, i) {
if(group[1]['block'] && group[1]['type'] != 'enum') {
flink = $('<a href="#" ref="' + i.toString() + '" id="typeItem' + domSafe(group[0]) + '">' + group[0] + '</a>')
flink.click( this.showType )
fitem = $('<li>')
fitem.append(flink)
list.append(fitem)
}
}, this)
fitem = $('<li>')
fitem.append($('<span>').addClass('divide').append("Opaque Structs"))
list.append(fitem)
_.each(data['types'], function(group, i) {
if(!group[1]['block']) {
flink = $('<a href="#" ref="' + i.toString() + '" id="typeItem' + domSafe(group[0]) + '">' + group[0] + '</a>')
flink.click( this.showType )
fitem = $('<li>')
fitem.append(flink)
list.append(fitem)
}
}, this)
list.hide()
menu.append(list)
// File Listing
title = $('<h3><a href="#">Files</a></h3>').click( this.collapseSection )
menu.append(title)
filelist = $('<ul>')
_.each(data['files'], function(file) {
url = this.github_file(file['file'])
flink = $('<a target="github" href="' + url + '">' + file['file'] + '</a>')
fitem = $('<li>')
fitem.append(flink)
filelist.append(fitem)
}, this)
filelist.hide()
menu.append(filelist)
// Examples List
if(data['examples'] && (data['examples'].length > 0)) {
title = $('<h3><a href="#">Examples</a></h3>').click( this.collapseSection )
menu.append(title)
filelist = $('<ul>')
_.each(data['examples'], function(file) {
fname = file[0]
fpath = file[1]
flink = $('<a>').attr('href', fpath).append(fname)
fitem = $('<li>')
fitem.append(flink)
filelist.append(fitem)
}, this)
menu.append(filelist)
}
list = $('#files-list')
list.empty()
list.append(menu)
},
github_file: function(file, line, lineto) {
url = "https://github.com/" + docurium.get('github')
url += "/blob/" + docurium.get('version') + '/' + data.prefix + '/' + file
if(line) {
url += '#L' + line.toString()
if(lineto) {
url += '-' + lineto.toString()
}
} else {
url += '#files'
}
return url
},
search: function(data) {
var searchResults = []
var value = $('#search-field').attr('value')
if (value.length < 3) {
return false
}
this.searchResults = []
ws.saveLocation(searchLink(value))
data = docurium.get('data')
// look for functions (name, comment, argline)
for (var name in data.functions) {
f = data.functions[name]
if (name.search(value) > -1) {
gname = docurium.groupOf(name)
var flink = $('<a>').attr('href', '#' + groupLink(gname, name)).append(name)
searchResults.push(['fun-' + name, flink, 'function'])
}
if (f.argline) {
if (f.argline.search(value) > -1) {
gname = docurium.groupOf(name)
var flink = $('<a>').attr('href', '#' + groupLink(gname, name)).append(name)
searchResults.push(['fun-' + name, flink, f.argline])
}
}
}
for (var i in data.types) {
var type = data.types[i]
name = type[0]
if (name.search(value) > -1) {
var link = $('<a>').attr('href', '#' + typeLink(name)).append(name)
searchResults.push(['type-' + name, link, type[1].type])
}
}
// look for types
// look for files
content = $('.content')
content.empty()
content.append($('<h1>').append("Search Results"))
table = $("<table>")
var shown = {}
for (var i in searchResults) {
row = $("<tr>")
result = searchResults[i]
if (!shown[result[0]]) {
link = result[1]
match = result[2]
row.append($('<td>').append(link))
row.append($('<td>').append(match))
table.append(row)
shown[result[0]] = true
}
}
content.append(table)
}
})
var Workspace = Backbone.Controller.extend({
routes: {
"": "main",
":version": "main",
":version/group/:group": "group",
":version/type/:type": "showtype",
":version/group/:group/:func": "groupFun",
":version/search/:query": "search",
"p/changelog": "changelog",
},
main: function(version) {
docurium.setVersion(version)
docurium.showIndexPage()
},
group: function(version, gname) {
docurium.setVersion(version)
docurium.showGroup(null, gname)
},
groupFun: function(version, gname, fname) {
docurium.setVersion(version)
docurium.showFun(gname, fname)
},
showtype: function(version, tname) {
docurium.setVersion(version)
docurium.showType(null, tname)
},
search: function(version, query) {
docurium.setVersion(version)
$('#search-field').attr('value', query)
docurium.search()
},
changelog: function(version, tname) {
docurium.setVersion()
docurium.showChangeLog()
},
});
function groupLink(gname, fname, version) {
if(!version) {
version = docurium.get('version')
}
if(fname) {
return version + "/group/" + gname + '/' + fname
} else {
return version + "/group/" + gname
}
}
function typeLink(tname) {
return docurium.get('version') + "/type/" + tname
}
function searchLink(tname) {
return docurium.get('version') + "/search/" + tname
}
function domSafe(str) {
return str.replace('_', '-')
}
window.docurium = new Docurium
window.ws = new Workspace
docurium.bind('change:version', function(model, version) {
$('#version').text(version)
})
docurium.bind('change:data', function(model, data) {
model.refreshView()
})
$('#search-field').keyup( docurium.search )
$('#version-picker').click( docurium.collapseSection )
})
| site/js/docurium.js | $(function() {
// our document model - stores the datastructure generated from docurium
var Docurium = Backbone.Model.extend({
defaults: {'version': 'unknown'},
initialize: function() {
this.loadVersions()
},
loadVersions: function() {
$.getJSON("project.json", function(data) {
docurium.set({'versions': data.versions, 'github': data.github, 'signatures': data.signatures, 'name': data.name, 'groups': data.groups})
if(data.name) {
$('#site-title').text(data.name + ' API')
document.title = data.name + ' API'
}
docurium.setVersionPicker()
docurium.setVersion()
})
},
setVersionPicker: function () {
vers = docurium.get('versions')
$('#version-list').empty().hide()
for(var i in vers) {
version = vers[i]
vlink = $('<a>').attr('href', '#' + version).append(version).click( function() {
$('#version-list').hide(100)
})
$('#version-list').append($('<li>').append(vlink))
}
vlink = $('<a>').attr('href', '#' + 'p/changelog').append("Changelog").click ( function () {
$('#version-list').hide(100)
})
$('#version-list').append($('<li>').append(vlink))
},
setVersion: function (version) {
if(!version) {
version = _.first(docurium.get('versions'))
}
if(docurium.get('version') != version) {
docurium.set({'version': version})
$('#site-title').attr('href', '#' + version)
docurium.loadDoc()
}
},
loadDoc: function() {
version = this.get('version')
$.ajax({
url: version + '.json',
context: this,
dataType: 'json',
success: function(data){
this.set({'data': data})
Backbone.history.start()
}
})
},
collapseSection: function(data) {
$(this).next().toggle(100)
return false
},
showIndexPage: function() {
version = docurium.get('version')
ws.saveLocation(version)
data = docurium.get('data')
content = $('.content')
content.empty()
content.append($('<h1>').append("Public API Functions"))
sigHist = docurium.get('signatures')
// Function Groups
for (var i in data['groups']) {
group = data['groups'][i]
content.append($('<h2>').addClass('funcGroup').append(group[0]))
list = $('<p>').addClass('functionList')
for(var j in group[1]) {
fun = group[1][j]
link = $('<a>').attr('href', '#' + groupLink(group[0], fun)).append(fun)
if(sigHist[fun].changes[version]) {
link.addClass('changed')
}
if(version == _.first(sigHist[fun].exists)) {
link.addClass('introd')
}
list.append(link)
if(j < group[1].length - 1) {
list.append(', ')
}
}
content.append(list)
}
},
getGroup: function(gname) {
var groups = docurium.get('data')['groups']
for(var i in groups) {
if(groups[i][0] == gname) {
return groups[i]
}
}
},
showFun: function(gname, fname) {
group = docurium.getGroup(gname)
fdata = docurium.get('data')['functions']
gname = group[0]
functions = group[1]
content = $('.content')
content.empty()
// Show Function Name
content.append($('<h1>').addClass('funcTitle').append(fname))
if(fdata[fname]['description']) {
sub = content.append($('<h3>').addClass('funcDesc').append( ' ' + fdata[fname]['description'] ))
}
// Show Function Arguments
argtable = $('<table>').addClass('funcTable')
args = fdata[fname]['args']
for(var i=0; i<args.length; i++) {
arg = args[i]
row = $('<tr>')
row.append($('<td>').attr('valign', 'top').attr('nowrap', true).append(this.hotLink(arg.type)))
row.append($('<td>').attr('valign', 'top').addClass('var').append(arg.name))
row.append($('<td>').addClass('comment').append(arg.comment))
argtable.append(row)
}
content.append(argtable)
// Show Function Return Value
retdiv = $('<div>').addClass('returns')
retdiv.append($('<h3>').append("returns"))
rettable = $('<table>').addClass('funcTable')
retrow = $('<tr>')
rettable.append(retrow)
retdiv.append(rettable)
ret = fdata[fname]['return']
retrow.append($('<td>').attr('valign', 'top').append(this.hotLink(ret.type)))
if(ret.comment) {
retrow.append($('<td>').addClass('comment').append(ret.comment))
}
content.append(retdiv)
// Show Non-Parsed Function Comments
if (fdata[fname]['comments']) {
content.append($('<pre>').append(fdata[fname]['comments']))
}
// Show Function Signature
ex = $('<code>').addClass('params')
ex.append(this.hotLink(fdata[fname]['return']['type'] + ' ' + fname + '(' + fdata[fname]['argline'] + ');'))
example = $('<div>').addClass('example')
example.append($('<h3>').append("signature"))
example.append(ex)
content.append(example)
// Show Function History
sigs = $('<div>').addClass('signatures')
sigs.append($('<h3>').append("versions"))
sigHist = docurium.get('signatures')[fname]
for(var i in sigHist.exists) {
ver = sigHist.exists[i]
link = $('<a>').attr('href', '#' + groupLink(gname, fname, ver)).append(ver)
if(sigHist.changes[ver]) {
link.addClass('changed')
}
if(ver == docurium.get('version')) {
link.addClass('current')
}
sigs.append(link)
}
content.append(sigs)
// Link to Function Def on GitHub
link = this.github_file(fdata[fname].file, fdata[fname].line, fdata[fname].lineto)
flink = $('<a>').attr('target', 'github').attr('href', link).append(fdata[fname].file)
content.append($('<div>').addClass('fileLink').append("Defined in: ").append(flink))
// Show where this is used in the examples
if(ex = fdata[fname].examples) {
also = $('<div>').addClass('funcEx')
also.append("Used in examples: ")
for( fname in ex ) {
lines = ex[fname]
line = $('<li>')
line.append($('<strong>').append(fname))
for( var i in lines ) {
flink = $('<a>').attr('href', lines[i]).append(' [' + (parseInt(i) + 1) + '] ')
line.append(flink)
}
also.append(line)
}
content.append(also)
}
// Show other functions in this group
also = $('<div>').addClass('also')
flink = $('<a href="#' + docurium.get('version') + '/group/' + group[0] + '">' + group[0] + '</a>')
flink.click( docurium.showGroup )
also.append("Also in ")
also.append(flink)
also.append(" group: <br/>")
for(i=0; i<functions.length; i++) {
f = functions[i]
d = fdata[f]
link = $('<a>').attr('href', '#' + groupLink(gname, f)).append(f)
also.append(link)
also.append(', ')
}
content.append(also)
this.addHotlinks()
},
showChangeLog: function() {
content = $('.content')
content.empty()
content.append($('<h1>').append("Function Changelog"))
// for every version, show which functions added, removed, changed - from HEAD down
versions = docurium.get('versions')
sigHist = docurium.get('signatures')
lastVer = _.first(versions)
// fill changelog struct
changelog = {}
for(var i in versions) {
version = versions[i]
changelog[version] = {'deletes': [], 'changes': [], 'adds': []}
}
// figure out the adds, deletes and changes
for(var func in sigHist) {
lastv = _.last(sigHist[func].exists)
firstv = _.first(sigHist[func].exists)
if (func != '__attribute__') {
changelog[firstv]['adds'].push(func)
}
if(lastv && (lastv != lastVer)) {
vi = _.indexOf(versions, lastv)
delv = versions[vi - 1]
changelog[delv]['deletes'].push(func)
}
for(var v in sigHist[func].changes) {
changelog[v]['changes'].push(func)
}
}
// display the data
for(var i in versions) {
version = versions[i]
content.append($('<h3>').append(version))
cl = $('<div>').addClass('changelog')
console.log(version)
for(var type in changelog[version]) {
adds = changelog[version][type]
adds.sort()
addsection = $('<p>')
for(var j in adds) {
add = adds[j]
if(type != 'deletes') {
gname = docurium.groupOf(add)
addlink = $('<a>').attr('href', '#' + groupLink(gname, add, version)).append(add)
} else {
addlink = add
}
addsection.append($('<li>').addClass(type).append(addlink))
}
cl.append(addsection)
}
content.append(cl)
}
},
showType: function(data, manual) {
if(manual) {
id = '#typeItem' + domSafe(manual)
ref = parseInt($(id).attr('ref'))
} else {
ref = parseInt($(this).attr('ref'))
}
tdata = docurium.get('data')['types'][ref]
tname = tdata[0]
data = tdata[1]
ws.saveLocation(typeLink(tname))
content = $('.content')
content.empty()
content.append($('<h1>').addClass('funcTitle').append(tname).append($("<small>").append(data.type)))
content.append($('<p>').append(data.value))
if(data.block) {
content.append($('<pre>').append(data.block))
}
var ret = data.used.returns
if (ret.length > 0) {
content.append($('<h3>').append('Returns'))
}
for(var i=0; i<ret.length; i++) {
gname = docurium.groupOf(ret[i])
flink = $('<a>').attr('href', '#' + groupLink(gname, ret[i])).append(ret[i])
flink.click( docurium.showFun )
content.append(flink)
content.append(', ')
}
var needs = data.used.needs
if (needs.length > 0) {
content.append($('<h3>').append('Argument In'))
}
for(var i=0; i<needs.length; i++) {
gname = docurium.groupOf(needs[i])
flink = $('<a>').attr('href', '#' + groupLink(gname, needs[i])).append(needs[i])
flink.click( docurium.showFun )
content.append(flink)
content.append(', ')
}
link = docurium.github_file(data.file, data.line, data.lineto)
flink = $('<a>').attr('target', 'github').attr('href', link).append(data.file)
content.append($('<div>').addClass('fileLink').append("Defined in: ").append(flink))
return false
},
showGroup: function(data, manual, flink) {
if(manual) {
id = '#groupItem' + manual
ref = parseInt($(id).attr('ref'))
} else {
ref = parseInt($(this).attr('ref'))
}
group = docurium.get('data')['groups'][ref]
fdata = docurium.get('data')['functions']
gname = group[0]
ws.saveLocation(groupLink(gname));
functions = group[1]
$('.content').empty()
$('.content').append($('<h1>').append(gname + ' functions'))
table = $('<table>').addClass('methods')
for(i=0; i<functions.length; i++) {
f = functions[i]
d = fdata[f]
row = $('<tr>')
row.append($('<td>').attr('nowrap', true).attr('valign', 'top').append(d['return']['type'].substring(0, 20)))
link = $('<a>').attr('href', '#' + groupLink(gname, f)).append(f)
row.append($('<td>').attr('valign', 'top').addClass('methodName').append( link ))
args = d['args']
argtd = $('<td>')
for(j=0; j<args.length; j++) {
argtd.append(args[j].type + ' ' + args[j].name)
argtd.append($('<br>'))
}
row.append(argtd)
table.append(row)
}
$('.content').append(table)
for(var i=0; i<functions.length; i++) {
f = functions[i]
argsText = '( ' + fdata[f]['argline'] + ' )'
link = $('<a>').attr('href', '#' + groupLink(gname, f)).append(f)
$('.content').append($('<h2>').append(link).append($('<small>').append(argsText)))
$('.content').append($('<pre>').append(fdata[f]['rawComments']))
}
return false
},
// look for structs and link them
hotLink: function(text) {
types = this.get('data')['types']
for(var i=0; i<types.length; i++) {
type = types[i]
typeName = type[0]
typeData = type[1]
re = new RegExp(typeName + ' ', 'gi');
link = '<a ref="' + i.toString() + '" class="typeLink' + domSafe(typeName) + '" href="#">' + typeName + '</a> '
text = text.replace(re, link)
}
return text
},
groupOf: function (func) {
return this.get('groups')[func]
},
addHotlinks: function() {
types = this.get('data')['types']
for(var i=0; i<types.length; i++) {
type = types[i]
typeName = type[0]
className = '.typeLink' + domSafe(typeName)
$(className).click( this.showType )
}
},
refreshView: function() {
data = this.get('data')
// Function Groups
menu = $('<li>')
title = $('<h3><a href="#">Functions</a></h3>').click( this.collapseSection )
menu.append(title)
list = $('<ul>')
_.each(data['groups'], function(group, i) {
flink = $('<a href="#" ref="' + i.toString() + '" id="groupItem' + group[0] + '">' + group[0] + ' <small>(' + group[1].length + ')</small></a>')
flink.click( this.showGroup )
fitem = $('<li>')
fitem.append(flink)
list.append(fitem)
}, this)
menu.append(list)
// Types
title = $('<h3><a href="#">Types</a></h3>').click( this.collapseSection )
menu.append(title)
list = $('<ul>')
fitem = $('<li>')
fitem.append($('<span>').addClass('divide').append("Enums"))
list.append(fitem)
_.each(data['types'], function(group, i) {
if(group[1]['block'] && group[1]['type'] == 'enum') {
flink = $('<a href="#" ref="' + i.toString() + '" id="typeItem' + domSafe(group[0]) + '">' + group[0] + '</a>')
flink.click( this.showType )
fitem = $('<li>')
fitem.append(flink)
list.append(fitem)
}
}, this)
fitem = $('<li>')
fitem.append($('<span>').addClass('divide').append("Structs"))
list.append(fitem)
_.each(data['types'], function(group, i) {
if(group[1]['block'] && group[1]['type'] != 'enum') {
flink = $('<a href="#" ref="' + i.toString() + '" id="typeItem' + domSafe(group[0]) + '">' + group[0] + '</a>')
flink.click( this.showType )
fitem = $('<li>')
fitem.append(flink)
list.append(fitem)
}
}, this)
fitem = $('<li>')
fitem.append($('<span>').addClass('divide').append("Opaque Structs"))
list.append(fitem)
_.each(data['types'], function(group, i) {
if(!group[1]['block']) {
flink = $('<a href="#" ref="' + i.toString() + '" id="typeItem' + domSafe(group[0]) + '">' + group[0] + '</a>')
flink.click( this.showType )
fitem = $('<li>')
fitem.append(flink)
list.append(fitem)
}
}, this)
list.hide()
menu.append(list)
// File Listing
title = $('<h3><a href="#">Files</a></h3>').click( this.collapseSection )
menu.append(title)
filelist = $('<ul>')
_.each(data['files'], function(file) {
url = this.github_file(file['file'])
flink = $('<a target="github" href="' + url + '">' + file['file'] + '</a>')
fitem = $('<li>')
fitem.append(flink)
filelist.append(fitem)
}, this)
filelist.hide()
menu.append(filelist)
// Examples List
if(data['examples'] && (data['examples'].length > 0)) {
title = $('<h3><a href="#">Examples</a></h3>').click( this.collapseSection )
menu.append(title)
filelist = $('<ul>')
_.each(data['examples'], function(file) {
fname = file[0]
fpath = file[1]
flink = $('<a>').attr('href', fpath).append(fname)
fitem = $('<li>')
fitem.append(flink)
filelist.append(fitem)
}, this)
menu.append(filelist)
}
list = $('#files-list')
list.empty()
list.append(menu)
},
github_file: function(file, line, lineto) {
url = "https://github.com/" + docurium.get('github')
url += "/blob/" + docurium.get('version') + '/' + data.prefix + '/' + file
if(line) {
url += '#L' + line.toString()
if(lineto) {
url += '-' + lineto.toString()
}
} else {
url += '#files'
}
return url
},
search: function(data) {
var searchResults = []
var value = $('#search-field').attr('value')
if (value.length < 3) {
return false
}
this.searchResults = []
ws.saveLocation(searchLink(value))
data = docurium.get('data')
// look for functions (name, comment, argline)
for (var name in data.functions) {
f = data.functions[name]
if (name.search(value) > -1) {
gname = docurium.groupOf(name)
var flink = $('<a>').attr('href', '#' + groupLink(gname, name)).append(name)
searchResults.push(['fun-' + name, flink, 'function'])
}
if (f.argline) {
if (f.argline.search(value) > -1) {
gname = docurium.groupOf(name)
var flink = $('<a>').attr('href', '#' + groupLink(gname, name)).append(name)
searchResults.push(['fun-' + name, flink, f.argline])
}
}
}
for (var i in data.types) {
var type = data.types[i]
name = type[0]
if (name.search(value) > -1) {
var link = $('<a>').attr('href', '#' + typeLink(name)).append(name)
searchResults.push(['type-' + name, link, type[1].type])
}
}
// look for types
// look for files
content = $('.content')
content.empty()
content.append($('<h1>').append("Search Results"))
table = $("<table>")
var shown = {}
for (var i in searchResults) {
row = $("<tr>")
result = searchResults[i]
if (!shown[result[0]]) {
link = result[1]
match = result[2]
row.append($('<td>').append(link))
row.append($('<td>').append(match))
table.append(row)
shown[result[0]] = true
}
}
content.append(table)
}
})
var Workspace = Backbone.Controller.extend({
routes: {
"": "main",
":version": "main",
":version/group/:group": "group",
":version/type/:type": "showtype",
":version/group/:group/:func": "groupFun",
":version/search/:query": "search",
"p/changelog": "changelog",
},
main: function(version) {
docurium.setVersion(version)
docurium.showIndexPage()
},
group: function(version, gname) {
docurium.setVersion(version)
docurium.showGroup(null, gname)
},
groupFun: function(version, gname, fname) {
docurium.setVersion(version)
docurium.showFun(gname, fname)
},
showtype: function(version, tname) {
docurium.setVersion(version)
docurium.showType(null, tname)
},
search: function(version, query) {
docurium.setVersion(version)
$('#search-field').attr('value', query)
docurium.search()
},
changelog: function(version, tname) {
docurium.setVersion()
docurium.showChangeLog()
},
});
function groupLink(gname, fname, version) {
if(!version) {
version = docurium.get('version')
}
if(fname) {
return version + "/group/" + gname + '/' + fname
} else {
return version + "/group/" + gname
}
}
function typeLink(tname) {
return docurium.get('version') + "/type/" + tname
}
function searchLink(tname) {
return docurium.get('version') + "/search/" + tname
}
function domSafe(str) {
return str.replace('_', '-')
}
window.docurium = new Docurium
window.ws = new Workspace
docurium.bind('change:version', function(model, version) {
$('#version').text(version)
})
docurium.bind('change:data', function(model, data) {
model.refreshView()
})
$('#search-field').keyup( docurium.search )
$('#version-picker').click( docurium.collapseSection )
})
| Show the description in the group view
rawComments doesn't exist anymore, use comments and
description
| site/js/docurium.js | Show the description in the group view | <ide><path>ite/js/docurium.js
<ide> argsText = '( ' + fdata[f]['argline'] + ' )'
<ide> link = $('<a>').attr('href', '#' + groupLink(gname, f)).append(f)
<ide> $('.content').append($('<h2>').append(link).append($('<small>').append(argsText)))
<del> $('.content').append($('<pre>').append(fdata[f]['rawComments']))
<add> description = fdata[f]['description']
<add> if(fdata[f]['comments'])
<add> description += "\n\n" + fdata[f]['comments']
<add> $('.content').append($('<pre>').append(description))
<ide> }
<ide> return false
<ide> }, |
|
Java | apache-2.0 | 74e4246d036c03500dc8e6d0204dddb04e2a3990 | 0 | maheshika/carbon-business-messaging,abeykoon/carbon-business-messaging,ramith/carbon-business-messaging,wso2/carbon-business-messaging,sdkottegoda/carbon-business-messaging,ChamNDeSilva/carbon-business-messaging,hastef88/carbon-business-messaging,hastef88/carbon-business-messaging,chanakaudaya/carbon-business-messaging,Asitha/carbon-business-messaging,abeykoon/carbon-business-messaging,a5anka/carbon-business-messaging,maheshika/carbon-business-messaging,chanakaudaya/carbon-business-messaging,ramith/carbon-business-messaging,ChamNDeSilva/carbon-business-messaging,pamod/carbon-business-messaging,sdkottegoda/carbon-business-messaging,pumudu88/carbon-business-messaging,pamod/carbon-business-messaging,hemikak/carbon-business-messaging,madhawa-gunasekara/carbon-business-messaging,madhawa-gunasekara/carbon-business-messaging,Asitha/carbon-business-messaging,wso2/carbon-business-messaging,sdkottegoda/carbon-business-messaging,wso2/carbon-business-messaging,hemikak/carbon-business-messaging,ThilankaBowala/carbon-business-messaging,AnujaLK/carbon-business-messaging,ramith/carbon-business-messaging,hemikak/carbon-business-messaging,pumudu88/carbon-business-messaging,abeykoon/carbon-business-messaging,indikasampath2000/carbon-business-messaging,ThilankaBowala/carbon-business-messaging,ThilankaBowala/carbon-business-messaging,a5anka/carbon-business-messaging,sajinidesilva/carbon-business-messaging,pumudu88/carbon-business-messaging,Asitha/carbon-business-messaging,ChamNDeSilva/carbon-business-messaging,chanakaudaya/carbon-business-messaging,AnujaLK/carbon-business-messaging,hastef88/carbon-business-messaging,a5anka/carbon-business-messaging,AnujaLK/carbon-business-messaging,sajinidesilva/carbon-business-messaging | /*
* Copyright (c) 2008, WSO2 Inc. (http://www.wso2.org) 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.
*/
package org.wso2.carbon.andes.internal;
import com.hazelcast.core.HazelcastInstance;
import org.apache.axis2.clustering.ClusteringAgent;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.osgi.framework.ServiceRegistration;
import org.osgi.service.component.ComponentContext;
import org.wso2.andes.kernel.AndesContext;
import org.wso2.andes.server.BrokerOptions;
import org.wso2.andes.server.Main;
import org.wso2.andes.server.cluster.coordination.hazelcast.HazelcastAgent;
import org.wso2.andes.server.registry.ApplicationRegistry;
import org.wso2.andes.wso2.service.QpidNotificationService;
import org.wso2.carbon.andes.authentication.service.AuthenticationService;
import org.wso2.carbon.andes.service.QpidService;
import org.wso2.carbon.andes.service.QpidServiceImpl;
import org.wso2.carbon.base.ServerConfiguration;
import org.wso2.carbon.base.api.ServerConfigurationService;
import org.wso2.carbon.cassandra.server.service.CassandraServerService;
import org.wso2.carbon.event.core.EventBundleNotificationService;
import org.wso2.carbon.event.core.qpid.QpidServerDetails;
import org.wso2.carbon.utils.ConfigurationContextService;
import org.wso2.carbon.utils.ServerConstants;
import javax.management.MBeanServer;
import javax.management.MalformedObjectNameException;
import javax.management.ObjectName;
import java.io.IOException;
import java.lang.management.ManagementFactory;
import java.net.InetAddress;
import java.net.Socket;
import java.net.UnknownHostException;
import java.util.Set;
/**
* @scr.component name="org.wso2.carbon.andes.internal.QpidServiceComponent"
* immediate="true"
* @scr.reference name="org.wso2.carbon.andes.authentication.service.AuthenticationService"
* interface="org.wso2.carbon.andes.authentication.service.AuthenticationService"
* cardinality="1..1"
* policy="dynamic"
* bind="setAccessKey"
* unbind="unsetAccessKey"
* @scr.reference name="org.wso2.andes.wso2.service.QpidNotificationService"
* interface="org.wso2.andes.wso2.service.QpidNotificationService"
* cardinality="1..1"
* policy="dynamic"
* bind="setQpidNotificationService"
* unbind="unsetQpidNotificationService"
* @scr.reference name="server.configuration"
* interface="org.wso2.carbon.base.api.ServerConfigurationService"
* cardinality="1..1"
* policy="dynamic"
* bind="setServerConfiguration"
* unbind="unsetServerConfiguration"
* @scr.reference name="event.broker"
* interface="org.wso2.carbon.event.core.EventBundleNotificationService"
* cardinality="1..1"
* policy="dynamic"
* bind="setEventBundleNotificationService"
* unbind="unsetEventBundleNotificationService"
* @scr.reference name="cassandra.service"
* interface="org.wso2.carbon.cassandra.server.service.CassandraServerService"
* cardinality="1..1"
* policy="dynamic"
* bind="setCassandraServerService"
* unbind="unsetCassandraServerService"
* @scr.reference name="hazelcast.instance.service"
* interface="com.hazelcast.core.HazelcastInstance"
* cardinality="0..1"
* policy="dynamic"
* bind="setHazelcastInstance"
* unbind="unsetHazelcastInstance"
* @scr.reference name="config.context.service"
* interface="org.wso2.carbon.utils.ConfigurationContextService"
* cardinality="1..1" policy="dynamic"
* bind="setConfigurationContextService"
* unbind="unsetConfigurationContextService"
*/
public class QpidServiceComponent {
private static final Log log = LogFactory.getLog(QpidServiceComponent.class);
private static final String VM_BROKER_AUTO_CREATE = "amqj.AutoCreateVMBroker";
private static final String DERBY_LOG_FILE = "derby.stream.error.file";
private static final String QPID_DERBY_LOG_FILE = "/repository/logs/qpid-derby-store.log";
private static final int CASSANDRA_THRIFT_PORT= 9160;
private static String CARBON_CONFIG_PORT_OFFSET = "Ports.Offset";
private static String CARBON_CONFIG_HOST_NAME = "HostName";
private static int CARBON_DEFAULT_PORT_OFFSET = 0;
private ServiceRegistration qpidService = null;
private boolean activated = false;
/**
* Is clustering enabled in axis2.xml.
*/
private boolean isClusteringEnabled;
protected void activate(ComponentContext ctx) {
if (ctx.getBundleContext().getServiceReference(QpidService.class.getName()) != null) {
return;
}
// Make it possible to create VM brokers automatically
System.setProperty(VM_BROKER_AUTO_CREATE, "true");
// Set Derby log filename
System.setProperty(DERBY_LOG_FILE, System.getProperty(ServerConstants.CARBON_HOME) + QPID_DERBY_LOG_FILE);
QpidServiceImpl qpidServiceImpl =
new QpidServiceImpl(QpidServiceDataHolder.getInstance().getAccessKey());
AndesContext.getInstance().setClusteringEnabled(this.isClusteringEnabled);
// set message store and andes context store related configurationsz z
AndesContext.getInstance().setMessageStoreClass(qpidServiceImpl.getMessageStoreClassName());
AndesContext.getInstance().setAndesContextStoreClass(qpidServiceImpl.getAndesContextStoreClassName());
AndesContext.getInstance().setMessageStoreDataSourceName(qpidServiceImpl.getMessageStoreDataSourceName());
AndesContext.getInstance().setContextStoreDataSourceName(qpidServiceImpl.getAndesContextStoreDataSourceName());
CassandraServerService cassandraServerService = QpidServiceDataHolder.getInstance().getCassandraServerService();
if(this.isClusteringEnabled) {
log.info("Starting Message Broker in -- CLUSTERED MODE --");
} else {
log.info("Starting Message Broker in -- STANDALONE MODE --");
}
if(cassandraServerService != null) {
if(!qpidServiceImpl.isExternalCassandraServerRequired()) {
log.info("Activating Carbonized Cassandra Server...");
cassandraServerService.startServer();
int count = 0;
while (!isCassandraStarted()) {
count++;
if(count > 10) {
break;
}
try {
Thread.sleep(30*1000);
} catch (InterruptedException e) {
}
}
}
} else {
log.error("Cassandra Server service not set properly server will not start properly");
throw new RuntimeException("Cassandra Server service not set properly server will not start properly");
}
// Start andes broker
try {
log.info("Activating Andes Message Broker Engine...");
System.setProperty(BrokerOptions.ANDES_HOME, qpidServiceImpl.getQpidHome());
String[] args = {"-p" + qpidServiceImpl.getPort(), "-s" + qpidServiceImpl.getSSLPort(), "-o" + qpidServiceImpl.getCassandraConnectionPort(),
"-q" + qpidServiceImpl.getMQTTPort()};
//Main.setStandaloneMode(false);
Main.main(args);
// Remove Qpid shutdown hook so that I have control over shutting the broker down
Runtime.getRuntime().removeShutdownHook(ApplicationRegistry.getShutdownHook());
// Wait until the broker has started
while (!isBrokerRunning()) {
try {
Thread.sleep(500);
} catch (InterruptedException e) {}
}
//check whether the tcp port has started. some times the server started thread may return
//before Qpid server actually bind to the tcp port. in that case there are some connection
//time out issues.
boolean isServerStarted = false;
int port;
if(qpidServiceImpl.getIfSSLOnly()) {
port = Integer.parseInt(qpidServiceImpl.getSSLPort());
} else {
port = Integer.parseInt(qpidServiceImpl.getPort());
}
while (!isServerStarted) {
Socket socket = null;
try {
InetAddress address = InetAddress.getByName(getCarbonHostName());
socket = new Socket(address, port);
isServerStarted = socket.isConnected();
if (isServerStarted) {
log.info("WSO2 Message Broker is Started. Successfully connected to the server on port " + port);
}
} catch (IOException e) {
log.info("Wait until Qpid server starts on port " + port);
Thread.sleep(500);
} finally {
try {
if ((socket != null) && (socket.isConnected())) {
socket.close();
}
} catch (IOException e) {
log.error("Can not close the socket which is used to check the server status ");
}
}
}
} catch (Exception e) {
log.error("Failed to start Qpid broker : " + e.getMessage());
} finally {
// Publish Qpid properties
qpidService = ctx.getBundleContext().registerService(
QpidService.class.getName(), qpidServiceImpl, null);
String brokerPort = null;
if(qpidServiceImpl.getIfSSLOnly()) {
brokerPort = qpidServiceImpl.getSSLPort();
} else {
brokerPort = qpidServiceImpl.getPort();
}
QpidServerDetails qpidServerDetails =
new QpidServerDetails(qpidServiceImpl.getAccessKey(),
qpidServiceImpl.getClientID(),
qpidServiceImpl.getVirtualHostName(),
qpidServiceImpl.getHostname(),
brokerPort,qpidServiceImpl.getIfSSLOnly());
QpidServiceDataHolder.getInstance().getEventBundleNotificationService().notifyStart(qpidServerDetails);
activated =true;
}
}
protected void deactivate(ComponentContext ctx) {
// Unregister QpidService
try {
if (null != qpidService) {
qpidService.unregister();
}
} catch (Exception e) {}
// Shutdown the Qpid broker
ApplicationRegistry.remove();
}
protected void setAccessKey(AuthenticationService authenticationService) {
QpidServiceDataHolder.getInstance().setAccessKey(authenticationService.getAccessKey());
}
protected void unsetAccessKey(AuthenticationService authenticationService) {
QpidServiceDataHolder.getInstance().setAccessKey(null);
}
protected void setQpidNotificationService(QpidNotificationService qpidNotificationService) {
// Qpid broker should not start until Qpid bundle is activated.
// QpidNotificationService informs that the Qpid bundle has started.
}
protected void unsetQpidNotificationService(QpidNotificationService qpidNotificationService) {}
protected void setServerConfiguration(ServerConfigurationService serverConfiguration) {
QpidServiceDataHolder.getInstance().setCarbonConfiguration(serverConfiguration);
}
protected void unsetServerConfiguration(ServerConfigurationService serverConfiguration) {
QpidServiceDataHolder.getInstance().setCarbonConfiguration(null);
}
protected void setEventBundleNotificationService(EventBundleNotificationService eventBundleNotificationService){
QpidServiceDataHolder.getInstance().registerEventBundleNotificationService(eventBundleNotificationService);
}
protected void unsetEventBundleNotificationService(EventBundleNotificationService eventBundleNotificationService){
// unsetting
}
protected void setCassandraServerService(CassandraServerService cassandraServerService){
if (QpidServiceDataHolder.getInstance().getCassandraServerService() == null) {
QpidServiceDataHolder.getInstance().registerCassandraServerService(cassandraServerService);
}
}
protected void unsetCassandraServerService(CassandraServerService cassandraServerService){
}
/**
* Access Hazelcast Instance, which is exposed as an OSGI service.
* @param hazelcastInstance hazelcastInstance found from the OSGI service
*/
protected void setHazelcastInstance(HazelcastInstance hazelcastInstance) {
HazelcastAgent.getInstance().init(hazelcastInstance);
}
protected void unsetHazelcastInstance(HazelcastInstance hazelcastInstance) {
// Do nothing
}
/**
* Access ConfigurationContextService, which is exposed as an OSGI service, to read cluster configuration.
* @param configurationContextService
*/
protected void setConfigurationContextService(ConfigurationContextService configurationContextService) {
ClusteringAgent agent = configurationContextService.getServerConfigContext().getAxisConfiguration().getClusteringAgent();
AndesContext.getInstance().setClusteringAgent(agent);
this.isClusteringEnabled = (agent != null);
}
protected void unsetConfigurationContextService(ConfigurationContextService configurationContextService) {
// Do nothing
}
/**
* Check if the broker is up and running
*
* @return
* true if the broker is running or false otherwise
*/
private boolean isBrokerRunning() {
boolean response = false;
try {
MBeanServer mBeanServer = ManagementFactory.getPlatformMBeanServer();
Set<ObjectName> set = mBeanServer.queryNames(
new ObjectName("org.wso2.andes:type=VirtualHost.VirtualHostManager,*"), null);
if (set.size() > 0) { // Virtual hosts created, hence broker running.
response = true;
}
} catch (MalformedObjectNameException e) {
}
return response;
}
private boolean isCassandraStarted() {
Socket socket = null;
boolean status = false;
try {
int listenPort = CASSANDRA_THRIFT_PORT + readPortOffset();
socket = new Socket(InetAddress.getByName(getCarbonHostName()),listenPort);
} catch (UnknownHostException e) {
throw new RuntimeException("Unexpected Error while Checking for Cassandra Startup",e);
} catch (IOException e) {
} finally {
if(socket != null) {
try {
socket.close();
} catch (IOException e) {
}
status = true;
}
}
log.debug("Checking for Cassandra server started status - status :" + status);
return status;
}
private int readPortOffset() {
ServerConfiguration carbonConfig = ServerConfiguration.getInstance();
String portOffset = System.getProperty("portOffset",
carbonConfig.getFirstProperty(CARBON_CONFIG_PORT_OFFSET));
try {
return ((portOffset != null) ? Integer.parseInt(portOffset.trim()) : CARBON_DEFAULT_PORT_OFFSET);
} catch (NumberFormatException e) {
return CARBON_DEFAULT_PORT_OFFSET;
}
}
private String getCarbonHostName() {
ServerConfiguration carbonConfig = ServerConfiguration.getInstance();
String hostName = carbonConfig.getFirstProperty(CARBON_CONFIG_HOST_NAME);
return hostName != null ? hostName : "localhost";
}
}
| components/andes/org.wso2.carbon.andes/src/main/java/org/wso2/carbon/andes/internal/QpidServiceComponent.java | /*
* Copyright (c) 2008, WSO2 Inc. (http://www.wso2.org) 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.
*/
package org.wso2.carbon.andes.internal;
import com.hazelcast.core.HazelcastInstance;
import org.apache.axis2.clustering.ClusteringAgent;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.osgi.framework.ServiceRegistration;
import org.osgi.service.component.ComponentContext;
import org.wso2.andes.kernel.AndesContext;
import org.wso2.andes.server.BrokerOptions;
import org.wso2.andes.server.Main;
import org.wso2.andes.server.cluster.coordination.hazelcast.HazelcastAgent;
import org.wso2.andes.server.registry.ApplicationRegistry;
import org.wso2.andes.wso2.service.QpidNotificationService;
import org.wso2.carbon.andes.authentication.service.AuthenticationService;
import org.wso2.carbon.andes.service.QpidService;
import org.wso2.carbon.andes.service.QpidServiceImpl;
import org.wso2.carbon.base.ServerConfiguration;
import org.wso2.carbon.base.api.ServerConfigurationService;
import org.wso2.carbon.cassandra.server.service.CassandraServerService;
import org.wso2.carbon.event.core.EventBundleNotificationService;
import org.wso2.carbon.event.core.qpid.QpidServerDetails;
import org.wso2.carbon.utils.ConfigurationContextService;
import org.wso2.carbon.utils.ServerConstants;
import javax.management.MBeanServer;
import javax.management.MalformedObjectNameException;
import javax.management.ObjectName;
import java.io.IOException;
import java.lang.management.ManagementFactory;
import java.net.InetAddress;
import java.net.Socket;
import java.net.UnknownHostException;
import java.util.Set;
/**
* @scr.component name="org.wso2.carbon.andes.internal.QpidServiceComponent"
* immediate="true"
* @scr.reference name="org.wso2.carbon.andes.authentication.service.AuthenticationService"
* interface="org.wso2.carbon.andes.authentication.service.AuthenticationService"
* cardinality="1..1"
* policy="dynamic"
* bind="setAccessKey"
* unbind="unsetAccessKey"
* @scr.reference name="org.wso2.andes.wso2.service.QpidNotificationService"
* interface="org.wso2.andes.wso2.service.QpidNotificationService"
* cardinality="1..1"
* policy="dynamic"
* bind="setQpidNotificationService"
* unbind="unsetQpidNotificationService"
* @scr.reference name="server.configuration"
* interface="org.wso2.carbon.base.api.ServerConfigurationService"
* cardinality="1..1"
* policy="dynamic"
* bind="setServerConfiguration"
* unbind="unsetServerConfiguration"
* @scr.reference name="event.broker"
* interface="org.wso2.carbon.event.core.EventBundleNotificationService"
* cardinality="1..1"
* policy="dynamic"
* bind="setEventBundleNotificationService"
* unbind="unsetEventBundleNotificationService"
* @scr.reference name="cassandra.service"
* interface="org.wso2.carbon.cassandra.server.service.CassandraServerService"
* cardinality="1..1"
* policy="dynamic"
* bind="setCassandraServerService"
* unbind="unsetCassandraServerService"
* @scr.reference name="hazelcast.instance.service"
* interface="com.hazelcast.core.HazelcastInstance"
* cardinality="0..1"
* policy="dynamic"
* bind="setHazelcastInstance"
* unbind="unsetHazelcastInstance"
* @scr.reference name="config.context.service"
* interface="org.wso2.carbon.utils.ConfigurationContextService"
* cardinality="1..1" policy="dynamic"
* bind="setConfigurationContextService"
* unbind="unsetConfigurationContextService"
*/
public class QpidServiceComponent {
private static final Log log = LogFactory.getLog(QpidServiceComponent.class);
private static final String VM_BROKER_AUTO_CREATE = "amqj.AutoCreateVMBroker";
private static final String DERBY_LOG_FILE = "derby.stream.error.file";
private static final String QPID_DERBY_LOG_FILE = "/repository/logs/qpid-derby-store.log";
private static final int CASSANDRA_THRIFT_PORT= 9160;
private static String CARBON_CONFIG_PORT_OFFSET = "Ports.Offset";
private static String CARBON_CONFIG_HOST_NAME = "HostName";
private static int CARBON_DEFAULT_PORT_OFFSET = 0;
private ServiceRegistration qpidService = null;
private boolean activated = false;
/**
* Is clustering enabled in axis2.xml.
*/
private boolean isClusteringEnabled;
protected void activate(ComponentContext ctx) {
if (ctx.getBundleContext().getServiceReference(QpidService.class.getName()) != null) {
return;
}
// Make it possible to create VM brokers automatically
System.setProperty(VM_BROKER_AUTO_CREATE, "true");
// Set Derby log filename
System.setProperty(DERBY_LOG_FILE, System.getProperty(ServerConstants.CARBON_HOME) + QPID_DERBY_LOG_FILE);
QpidServiceImpl qpidServiceImpl =
new QpidServiceImpl(QpidServiceDataHolder.getInstance().getAccessKey());
AndesContext.getInstance().setClusteringEnabled(this.isClusteringEnabled);
// set message store and andes context store related configurationsz z
AndesContext.getInstance().setMessageStoreClass(qpidServiceImpl.getMessageStoreClassName());
AndesContext.getInstance().setAndesContextStoreClass(qpidServiceImpl.getAndesContextStoreClassName());
AndesContext.getInstance().setMessageStoreDataSourceName(qpidServiceImpl.getMessageStoreDataSourceName());
AndesContext.getInstance().setContextStoreDataSourceName(qpidServiceImpl.getAndesContextStoreDataSourceName());
CassandraServerService cassandraServerService = QpidServiceDataHolder.getInstance().getCassandraServerService();
if(this.isClusteringEnabled) {
log.info("Starting Message Broker in -- CLUSTERED MODE --");
} else {
log.info("Starting Message Broker in -- STANDALONE MODE --");
}
if(cassandraServerService != null) {
if(!qpidServiceImpl.isExternalCassandraServerRequired()) {
log.info("Activating Carbonized Cassandra Server...");
cassandraServerService.startServer();
int count = 0;
while (!isCassandraStarted()) {
count++;
if(count > 10) {
break;
}
try {
Thread.sleep(30*1000);
} catch (InterruptedException e) {
}
}
}
} else {
log.error("Cassandra Server service not set properly server will not start properly");
throw new RuntimeException("Cassandra Server service not set properly server will not start properly");
}
// Start andes broker
try {
log.info("Activating Andes Message Broker Engine...");
System.setProperty(BrokerOptions.ANDES_HOME, qpidServiceImpl.getQpidHome());
String[] args = {"-p" + qpidServiceImpl.getPort(), "-s" + qpidServiceImpl.getSSLPort(), "-o" + qpidServiceImpl.getCassandraConnectionPort(),
"-q" + qpidServiceImpl.getMQTTPort()};
//Main.setStandaloneMode(false);
Main.main(args);
// Remove Qpid shutdown hook so that I have control over shutting the broker down
Runtime.getRuntime().removeShutdownHook(ApplicationRegistry.getShutdownHook());
// Wait until the broker has started
while (!isBrokerRunning()) {
try {
Thread.sleep(500);
} catch (InterruptedException e) {}
}
//check whether the tcp port has started. some times the server started thread may return
//before Qpid server actually bind to the tcp port. in that case there are some connection
//time out issues.
boolean isServerStarted = false;
int port;
if(qpidServiceImpl.getIfSSLOnly()) {
port = Integer.parseInt(qpidServiceImpl.getSSLPort());
} else {
port = Integer.parseInt(qpidServiceImpl.getPort());
}
while (!isServerStarted) {
Socket socket = null;
try {
InetAddress address = InetAddress.getByName(getCarbonHostName());
socket = new Socket(address, port);
isServerStarted = socket.isConnected();
if (isServerStarted) {
log.info("WSO2 Message Broker is Started. Successfully connected to the server on port " + port);
}
} catch (IOException e) {
log.info("Wait until Qpid server starts on port " + port);
Thread.sleep(500);
} finally {
try {
if ((socket != null) && (socket.isConnected())) {
socket.close();
}
} catch (IOException e) {
log.error("Can not close the socket which is used to check the server status ");
}
}
}
} catch (Exception e) {
log.error("Failed to start Qpid broker : " + e.getMessage());
} finally {
// Publish Qpid properties
qpidService = ctx.getBundleContext().registerService(
QpidService.class.getName(), qpidServiceImpl, null);
String brokerPort = null;
if(qpidServiceImpl.getIfSSLOnly()) {
brokerPort = qpidServiceImpl.getSSLPort();
} else {
brokerPort = qpidServiceImpl.getPort();
}
QpidServerDetails qpidServerDetails =
new QpidServerDetails(qpidServiceImpl.getAccessKey(),
qpidServiceImpl.getClientID(),
qpidServiceImpl.getVirtualHostName(),
qpidServiceImpl.getHostname(),
brokerPort,qpidServiceImpl.getIfSSLOnly());
QpidServiceDataHolder.getInstance().getEventBundleNotificationService().notifyStart(qpidServerDetails);
activated =true;
}
}
protected void deactivate(ComponentContext ctx) {
// Unregister QpidService
try {
if (null != qpidService) {
qpidService.unregister();
}
} catch (Exception e) {}
// Shutdown the Qpid broker
ApplicationRegistry.remove();
}
protected void setAccessKey(AuthenticationService authenticationService) {
QpidServiceDataHolder.getInstance().setAccessKey(authenticationService.getAccessKey());
}
protected void unsetAccessKey(AuthenticationService authenticationService) {
QpidServiceDataHolder.getInstance().setAccessKey(null);
}
protected void setQpidNotificationService(QpidNotificationService qpidNotificationService) {
// Qpid broker should not start until Qpid bundle is activated.
// QpidNotificationService informs that the Qpid bundle has started.
}
protected void unsetQpidNotificationService(QpidNotificationService qpidNotificationService) {}
protected void setServerConfiguration(ServerConfigurationService serverConfiguration) {
QpidServiceDataHolder.getInstance().setCarbonConfiguration(serverConfiguration);
}
protected void unsetServerConfiguration(ServerConfigurationService serverConfiguration) {
QpidServiceDataHolder.getInstance().setCarbonConfiguration(null);
}
protected void setEventBundleNotificationService(EventBundleNotificationService eventBundleNotificationService){
QpidServiceDataHolder.getInstance().registerEventBundleNotificationService(eventBundleNotificationService);
}
protected void unsetEventBundleNotificationService(EventBundleNotificationService eventBundleNotificationService){
// unsetting
}
protected void setCassandraServerService(CassandraServerService cassandraServerService){
if (QpidServiceDataHolder.getInstance().getCassandraServerService() == null) {
QpidServiceDataHolder.getInstance().registerCassandraServerService(cassandraServerService);
}
}
protected void unsetCassandraServerService(CassandraServerService cassandraServerService){
}
/**
* Access Hazelcast Instance, which is exposed as an OSGI service.
* @param hazelcastInstance hazelcastInstance found from the OSGI service
*/
protected void setHazelcastInstance(HazelcastInstance hazelcastInstance) {
HazelcastAgent.getInstance().init(hazelcastInstance);
}
protected void unsetHazelcastInstance(HazelcastInstance hazelcastInstance) {
// Do nothing
}
/**
* Access ConfigurationContextService, which is exposed as an OSGI service, to read cluster configuration.
* @param configurationContextService
*/
protected void setConfigurationContextService(ConfigurationContextService configurationContextService) {
ClusteringAgent agent = configurationContextService.getServerConfigContext().getAxisConfiguration().getClusteringAgent();
this.isClusteringEnabled = (agent != null);
}
protected void unsetConfigurationContextService(ConfigurationContextService configurationContextService) {
// Do nothing
}
/**
* Check if the broker is up and running
*
* @return
* true if the broker is running or false otherwise
*/
private boolean isBrokerRunning() {
boolean response = false;
try {
MBeanServer mBeanServer = ManagementFactory.getPlatformMBeanServer();
Set<ObjectName> set = mBeanServer.queryNames(
new ObjectName("org.wso2.andes:type=VirtualHost.VirtualHostManager,*"), null);
if (set.size() > 0) { // Virtual hosts created, hence broker running.
response = true;
}
} catch (MalformedObjectNameException e) {
}
return response;
}
private boolean isCassandraStarted() {
Socket socket = null;
boolean status = false;
try {
int listenPort = CASSANDRA_THRIFT_PORT + readPortOffset();
socket = new Socket(InetAddress.getByName(getCarbonHostName()),listenPort);
} catch (UnknownHostException e) {
throw new RuntimeException("Unexpected Error while Checking for Cassandra Startup",e);
} catch (IOException e) {
} finally {
if(socket != null) {
try {
socket.close();
} catch (IOException e) {
}
status = true;
}
}
log.debug("Checking for Cassandra server started status - status :" + status);
return status;
}
private int readPortOffset() {
ServerConfiguration carbonConfig = ServerConfiguration.getInstance();
String portOffset = System.getProperty("portOffset",
carbonConfig.getFirstProperty(CARBON_CONFIG_PORT_OFFSET));
try {
return ((portOffset != null) ? Integer.parseInt(portOffset.trim()) : CARBON_DEFAULT_PORT_OFFSET);
} catch (NumberFormatException e) {
return CARBON_DEFAULT_PORT_OFFSET;
}
}
private String getCarbonHostName() {
ServerConfiguration carbonConfig = ServerConfiguration.getInstance();
String hostName = carbonConfig.getFirstProperty(CARBON_CONFIG_HOST_NAME);
return hostName != null ? hostName : "localhost";
}
}
| ClusterAgentConfiguration added
| components/andes/org.wso2.carbon.andes/src/main/java/org/wso2/carbon/andes/internal/QpidServiceComponent.java | ClusterAgentConfiguration added | <ide><path>omponents/andes/org.wso2.carbon.andes/src/main/java/org/wso2/carbon/andes/internal/QpidServiceComponent.java
<ide> */
<ide> protected void setConfigurationContextService(ConfigurationContextService configurationContextService) {
<ide> ClusteringAgent agent = configurationContextService.getServerConfigContext().getAxisConfiguration().getClusteringAgent();
<add> AndesContext.getInstance().setClusteringAgent(agent);
<ide> this.isClusteringEnabled = (agent != null);
<ide> }
<ide> |
|
JavaScript | mit | 253bdc5c53aae3132715c103abc2a48461b11eae | 0 | Pro4People/Semantic-UI,codeRuth/Semantic-UI,wildKids/Semantic-UI,not001praween001/Semantic-UI,gangeshwark/Semantic-UI,JonathanRamier/Semantic-UI,raoenhui/Semantic-UI-DIV,exicon/Semantic-UI,kevinrodbe/Semantic-UI,dhj2020/Semantic-UI,m2lan/Semantic-UI,neomadara/Semantic-UI,jcdc21/Semantic-UI,Faisalawanisee/Semantic-UI,Faisalawanisee/Semantic-UI,codedogfish/Semantic-UI,1246419375/git-ui,SungDiYen/Semantic-UI,guiquanz/Semantic-UI,wang508x102/Semantic-UI,eyethereal/archer-Semantic-UI,BobJavascript/Semantic-UI,kk9599/Semantic-UI,jcdc21/Semantic-UI,vibhatha/Semantic-UI,jayphelps/Semantic-UI,zcodes/Semantic-UI,bandzoogle/Semantic-UI,bradbird1990/Semantic-UI,bandzoogle/Semantic-UI,ikhakoo/Semantic-UI,ryancanhelpyou/Semantic-UI,tamdao/Semantic-UI,ikhakoo/Semantic-UI,techpool/Semantic-UI,Sweetymeow/Semantic-UI,rwoll/Semantic-UI,larsbo/Semantic-UI,leguian/SUI-Less,openbizgit/Semantic-UI,tarvos21/Semantic-UI,youprofit/Semantic-UI,MichelSpanholi/Semantic-UI,zcodes/Semantic-UI,Chrismarcel/Semantic-UI,martindale/Semantic-UI,newsiberian/Semantic-UI,rockmandew/Semantic-UI,manukall/Semantic-UI,sudhakar/Semantic-UI,martindale/Semantic-UI,Semantic-Org/Semantic-UI,gangeshwark/Semantic-UI,elliottisonfire/Semantic-UI,flashadicts/Semantic-UI,tareq-s/Semantic-UI,AlbertoBarrago/Semantic-UI,snwfog/hamijia-semantic,zanjs/Semantic-UI,davialexandre/Semantic-UI,jahnaviancha/Semantic-UI,gextech/Semantic-UI,avorio/Semantic-UI,abbasmhd/Semantic-UI,FlyingWHR/Semantic-UI,TagNewk/Semantic-UI,lucienevans/Semantic-UI,sudhakar/Semantic-UI,MrFusion42/Semantic-UI,jayphelps/Semantic-UI,marciovicente/Semantic-UI,dhj2020/Semantic-UI,FlyingWHR/Semantic-UI,shengwenming/Semantic-UI,kk9599/Semantic-UI,kevinrodbe/Semantic-UI,rwoll/Semantic-UI,lucienevans/Semantic-UI,ListnPlay/Semantic-UI,davialexandre/Semantic-UI,Dineshs91/Semantic-UI,shengwenming/Semantic-UI,abbasmhd/Semantic-UI,m4tx/egielda-Semantic-UI,androidesk/Semantic-UI,listepo/Semantic-UI,Chrismarcel/Semantic-UI,guodong/Semantic-UI,rockmandew/Semantic-UI,raoenhui/Semantic-UI-DIV,BobJavascript/Semantic-UI,MichelSpanholi/Semantic-UI,leguian/SUI-Less,flashadicts/Semantic-UI,guiquanz/Semantic-UI,johnschult/Semantic-UI,gsls1817/Semantic-UI,dominicwong617/Semantic-UI,SeanOceanHu/Semantic-UI,Acceptd/Semantic-UI,exicon/Semantic-UI,dieface/Semantic-UI,edumucelli/Semantic-UI,Sweetymeow/Semantic-UI,newsiberian/Semantic-UI,maher17/Semantic-UI,raphaelfruneaux/Semantic-UI,86yankai/Semantic-UI,liangxiaojuan/Semantic-UI,chlorm-forks/Semantic-UI,besrabasant/Semantic-UI,wlzc/semantic-ui.src,neomadara/Semantic-UI,Centiq/semantic-ui,86yankai/Semantic-UI,teefresh/Semantic-UI,zanjs/Semantic-UI,teefresh/Semantic-UI,TagNewk/Semantic-UI,MrFusion42/Semantic-UI,Pro4People/Semantic-UI,Semantic-Org/Semantic-UI,kongdw/Semantic-UI,champagne-randy/Semantic-UI,nik4152/Semantic-UI,openbizgit/Semantic-UI,snwfog/hamijia-semantic,artemkaint/Semantic-UI,gextech/Semantic-UI,xiwc/semantic-ui.src,champagne-randy/Semantic-UI,bradbird1990/Semantic-UI,wildKids/Semantic-UI,manukall/Semantic-UI,listepo/Semantic-UI,chrismoulton/Semantic-UI,tamdao/Semantic-UI,androidesk/Semantic-UI,Azzurrio/Semantic-UI,IveWong/Semantic-UI,vibhatha/Semantic-UI,artemkaint/Semantic-UI,maher17/Semantic-UI,JonathanRamier/Semantic-UI,not001praween001/Semantic-UI,Acceptd/Semantic-UI,jahnaviancha/Semantic-UI,youprofit/Semantic-UI,yangyitao/Semantic-UI,elliottisonfire/Semantic-UI,1246419375/git-ui,akinsella/Semantic-UI,antyang/Semantic-UI,Centiq/semantic-ui,m4tx/egielda-Semantic-UI,tarvos21/Semantic-UI,Pyrotoxin/Semantic-UI,imtapps-dev/imt-semantic-ui,marciovicente/Semantic-UI,MathB/Semantic-UI,m2lan/Semantic-UI,eyethereal/archer-Semantic-UI,CapeSepias/Semantic-UI,Azzurrio/Semantic-UI,larsbo/Semantic-UI,SungDiYen/Semantic-UI,chrismoulton/Semantic-UI,codedogfish/Semantic-UI,Neaox/Semantic-UI,ListnPlay/Semantic-UI,SeanOceanHu/Semantic-UI,eyethereal/archer-Semantic-UI,AlbertoBarrago/Semantic-UI,CapeSepias/Semantic-UI,akinsella/Semantic-UI,Eynaliyev/Semantic-UI,antyang/Semantic-UI,Eynaliyev/Semantic-UI,codeRuth/Semantic-UI,FernandoMueller/Semantic-UI,avorio/Semantic-UI,MathB/Semantic-UI,tarvos21/Semantic-UI,johnschult/Semantic-UI,raphaelfruneaux/Semantic-UI,chlorm-forks/Semantic-UI,FernandoMueller/Semantic-UI,besrabasant/Semantic-UI,Pyrotoxin/Semantic-UI,nik4152/Semantic-UI,techpool/Semantic-UI,kongdw/Semantic-UI,dieface/Semantic-UI,gsls1817/Semantic-UI,sunseth/Semantic-UI,guodong/Semantic-UI,CapsuleHealth/Semantic-UI,ryancanhelpyou/Semantic-UI,tareq-s/Semantic-UI,IveWong/Semantic-UI,CapsuleHealth/Semantic-UI,edumucelli/Semantic-UI,sunseth/Semantic-UI,dominicwong617/Semantic-UI,wang508x102/Semantic-UI,xiwc/semantic-ui.src,wlzc/semantic-ui.src,Dineshs91/Semantic-UI,Neaox/Semantic-UI,imtapps-dev/imt-semantic-ui,liangxiaojuan/Semantic-UI,yangyitao/Semantic-UI | /*!
* # Semantic UI - Sticky
* http://github.com/semantic-org/semantic-ui/
*
*
* Copyright 2015 Contributors
* Released under the MIT license
* http://opensource.org/licenses/MIT
*
*/
;(function ( $, window, document, undefined ) {
"use strict";
$.fn.sticky = function(parameters) {
var
$allModules = $(this),
moduleSelector = $allModules.selector || '',
time = new Date().getTime(),
performance = [],
query = arguments[0],
methodInvoked = (typeof query == 'string'),
queryArguments = [].slice.call(arguments, 1),
returnedValue
;
$allModules
.each(function() {
var
settings = ( $.isPlainObject(parameters) )
? $.extend(true, {}, $.fn.sticky.settings, parameters)
: $.extend({}, $.fn.sticky.settings),
className = settings.className,
namespace = settings.namespace,
error = settings.error,
eventNamespace = '.' + namespace,
moduleNamespace = 'module-' + namespace,
$module = $(this),
$window = $(window),
$scroll = $(settings.scrollContext),
$container,
$context,
selector = $module.selector || '',
instance = $module.data(moduleNamespace),
requestAnimationFrame = window.requestAnimationFrame
|| window.mozRequestAnimationFrame
|| window.webkitRequestAnimationFrame
|| window.msRequestAnimationFrame
|| function(callback) { setTimeout(callback, 0); },
element = this,
observer,
module
;
module = {
initialize: function() {
module.determineContainer();
module.determineContext();
module.verbose('Initializing sticky', settings, $container);
module.save.positions();
module.checkErrors();
module.bind.events();
if(settings.observeChanges) {
module.observeChanges();
}
module.instantiate();
},
instantiate: function() {
module.verbose('Storing instance of module', module);
instance = module;
$module
.data(moduleNamespace, module)
;
},
destroy: function() {
module.verbose('Destroying previous instance');
module.reset();
if(observer) {
observer.disconnect();
}
$window
.off('load' + eventNamespace, module.event.load)
.off('resize' + eventNamespace, module.event.resize)
;
$scroll
.off('scrollchange' + eventNamespace, module.event.scrollchange)
;
$module.removeData(moduleNamespace);
},
observeChanges: function() {
var
context = $context[0]
;
if('MutationObserver' in window) {
observer = new MutationObserver(function(mutations) {
clearTimeout(module.timer);
module.timer = setTimeout(function() {
module.verbose('DOM tree modified, updating sticky menu', mutations);
module.refresh();
}, 100);
});
observer.observe(element, {
childList : true,
subtree : true
});
observer.observe(context, {
childList : true,
subtree : true
});
module.debug('Setting up mutation observer', observer);
}
},
determineContainer: function() {
$container = $module.offsetParent();
},
determineContext: function() {
if(settings.context) {
$context = $(settings.context);
}
else {
$context = $container;
}
if($context.length === 0) {
module.error(error.invalidContext, settings.context, $module);
return;
}
},
checkErrors: function() {
if( module.is.hidden() ) {
module.error(error.visible, $module);
}
if(module.cache.element.height > module.cache.context.height) {
module.reset();
module.error(error.elementSize, $module);
return;
}
},
bind: {
events: function() {
$window
.on('load' + eventNamespace, module.event.load)
.on('resize' + eventNamespace, module.event.resize)
;
// pub/sub pattern
$scroll
.off('scroll' + eventNamespace)
.on('scroll' + eventNamespace, module.event.scroll)
.on('scrollchange' + eventNamespace, module.event.scrollchange)
;
}
},
event: {
load: function() {
module.verbose('Page contents finished loading');
requestAnimationFrame(module.refresh);
},
resize: function() {
module.verbose('Window resized');
requestAnimationFrame(module.refresh);
},
scroll: function() {
requestAnimationFrame(function() {
$scroll.triggerHandler('scrollchange' + eventNamespace, $scroll.scrollTop() );
});
},
scrollchange: function(event, scrollPosition) {
module.stick(scrollPosition);
settings.onScroll.call(element);
}
},
refresh: function(hardRefresh) {
module.reset();
if(!settings.context) {
module.determineContext();
}
if(hardRefresh) {
module.determineContainer();
}
module.save.positions();
module.stick();
settings.onReposition.call(element);
},
supports: {
sticky: function() {
var
$element = $('<div/>'),
element = $element[0]
;
$element.addClass(className.supported);
return($element.css('position').match('sticky'));
}
},
save: {
lastScroll: function(scroll) {
module.lastScroll = scroll;
},
elementScroll: function(scroll) {
module.elementScroll = scroll;
},
positions: function() {
var
window = {
height: $window.height()
},
element = {
margin: {
top : parseInt($module.css('margin-top'), 10),
bottom : parseInt($module.css('margin-bottom'), 10),
},
offset : $module.offset(),
width : $module.outerWidth(),
height : $module.outerHeight()
},
context = {
offset : $context.offset(),
height : $context.outerHeight()
},
container = {
height: $container.outerHeight()
}
;
module.cache = {
fits : ( element.height < window.height ),
window: {
height: window.height
},
element: {
margin : element.margin,
top : element.offset.top - element.margin.top,
left : element.offset.left,
width : element.width,
height : element.height,
bottom : element.offset.top + element.height
},
context: {
top : context.offset.top,
height : context.height,
bottom : context.offset.top + context.height
}
};
module.set.containerSize();
module.set.size();
module.stick();
module.debug('Caching element positions', module.cache);
}
},
get: {
direction: function(scroll) {
var
direction = 'down'
;
scroll = scroll || $scroll.scrollTop();
if(module.lastScroll !== undefined) {
if(module.lastScroll < scroll) {
direction = 'down';
}
else if(module.lastScroll > scroll) {
direction = 'up';
}
}
return direction;
},
scrollChange: function(scroll) {
scroll = scroll || $scroll.scrollTop();
return (module.lastScroll)
? (scroll - module.lastScroll)
: 0
;
},
currentElementScroll: function() {
if(module.elementScroll) {
return module.elementScroll;
}
return ( module.is.top() )
? Math.abs(parseInt($module.css('top'), 10)) || 0
: Math.abs(parseInt($module.css('bottom'), 10)) || 0
;
},
elementScroll: function(scroll) {
scroll = scroll || $scroll.scrollTop();
var
element = module.cache.element,
window = module.cache.window,
delta = module.get.scrollChange(scroll),
maxScroll = (element.height - window.height + settings.offset),
elementScroll = module.get.currentElementScroll(),
possibleScroll = (elementScroll + delta)
;
if(module.cache.fits || possibleScroll < 0) {
elementScroll = 0;
}
else if(possibleScroll > maxScroll ) {
elementScroll = maxScroll;
}
else {
elementScroll = possibleScroll;
}
return elementScroll;
}
},
remove: {
lastScroll: function() {
delete module.lastScroll;
},
elementScroll: function(scroll) {
delete module.elementScroll;
},
offset: function() {
$module.css('margin-top', '');
}
},
set: {
offset: function() {
module.verbose('Setting offset on element', settings.offset);
$module
.css('margin-top', settings.offset)
;
},
containerSize: function() {
var
tagName = $container.get(0).tagName
;
if(tagName === 'HTML' || tagName == 'body') {
// this can trigger for too many reasons
//module.error(error.container, tagName, $module);
module.determineContainer();
}
else {
if( Math.abs($container.outerHeight() - module.cache.context.height) > settings.jitter) {
module.debug('Context has padding, specifying exact height for container', module.cache.context.height);
$container.css({
height: module.cache.context.height
});
}
}
},
minimumSize: function() {
var
element = module.cache.element
;
$container
.css('min-height', element.height)
;
},
scroll: function(scroll) {
module.debug('Setting scroll on element', scroll);
if(module.elementScroll == scroll) {
return;
}
if( module.is.top() ) {
$module
.css('bottom', '')
.css('top', -scroll)
;
}
if( module.is.bottom() ) {
$module
.css('top', '')
.css('bottom', scroll)
;
}
},
size: function() {
if(module.cache.element.height !== 0 && module.cache.element.width !== 0) {
$module
.css({
width : module.cache.element.width,
height : module.cache.element.height
})
;
}
}
},
is: {
top: function() {
return $module.hasClass(className.top);
},
bottom: function() {
return $module.hasClass(className.bottom);
},
initialPosition: function() {
return (!module.is.fixed() && !module.is.bound());
},
hidden: function() {
return (!$module.is(':visible'));
},
bound: function() {
return $module.hasClass(className.bound);
},
fixed: function() {
return $module.hasClass(className.fixed);
}
},
stick: function(scroll) {
var
cachedPosition = scroll || $scroll.scrollTop(),
cache = module.cache,
fits = cache.fits,
element = cache.element,
window = cache.window,
context = cache.context,
offset = (module.is.bottom() && settings.pushing)
? settings.bottomOffset
: settings.offset,
scroll = {
top : cachedPosition + offset,
bottom : cachedPosition + offset + window.height
},
direction = module.get.direction(scroll.top),
elementScroll = (fits)
? 0
: module.get.elementScroll(scroll.top),
// shorthand
doesntFit = !fits,
elementVisible = (element.height !== 0)
;
if(elementVisible) {
if( module.is.initialPosition() ) {
if(scroll.top > context.bottom) {
module.debug('Element bottom of container');
module.bindBottom();
}
else if(scroll.top > element.top) {
module.debug('Element passed, fixing element to page');
if( (element.height + scroll.top - elementScroll) > context.bottom ) {
module.bindBottom();
}
else {
module.fixTop();
}
}
}
else if( module.is.fixed() ) {
// currently fixed top
if( module.is.top() ) {
if( scroll.top < element.top ) {
module.debug('Fixed element reached top of container');
module.setInitialPosition();
}
else if( (element.height + scroll.top - elementScroll) > context.bottom ) {
module.debug('Fixed element reached bottom of container');
module.bindBottom();
}
// scroll element if larger than screen
else if(doesntFit) {
module.set.scroll(elementScroll);
module.save.lastScroll(scroll.top);
module.save.elementScroll(elementScroll);
}
}
// currently fixed bottom
else if(module.is.bottom() ) {
// top edge
if( (scroll.bottom - element.height) < element.top) {
module.debug('Bottom fixed rail has reached top of container');
module.setInitialPosition();
}
// bottom edge
else if(scroll.bottom > context.bottom) {
module.debug('Bottom fixed rail has reached bottom of container');
module.bindBottom();
}
// scroll element if larger than screen
else if(doesntFit) {
module.set.scroll(elementScroll);
module.save.lastScroll(scroll.top);
module.save.elementScroll(elementScroll);
}
}
}
else if( module.is.bottom() ) {
if(settings.pushing) {
if(module.is.bound() && scroll.bottom < context.bottom ) {
module.debug('Fixing bottom attached element to bottom of browser.');
module.fixBottom();
}
}
else {
if(module.is.bound() && (scroll.top < context.bottom - element.height) ) {
module.debug('Fixing bottom attached element to top of browser.');
module.fixTop();
}
}
}
}
},
bindTop: function() {
module.debug('Binding element to top of parent container');
module.remove.offset();
$module
.css({
left : '',
top : '',
marginBottom : ''
})
.removeClass(className.fixed)
.removeClass(className.bottom)
.addClass(className.bound)
.addClass(className.top)
;
settings.onTop.call(element);
settings.onUnstick.call(element);
},
bindBottom: function() {
module.debug('Binding element to bottom of parent container');
module.remove.offset();
$module
.css({
left : '',
top : ''
})
.removeClass(className.fixed)
.removeClass(className.top)
.addClass(className.bound)
.addClass(className.bottom)
;
settings.onBottom.call(element);
settings.onUnstick.call(element);
},
setInitialPosition: function() {
module.unfix();
module.unbind();
},
fixTop: function() {
module.debug('Fixing element to top of page');
module.set.minimumSize();
module.set.offset();
$module
.css({
left : module.cache.element.left,
bottom : '',
marginBottom : ''
})
.removeClass(className.bound)
.removeClass(className.bottom)
.addClass(className.fixed)
.addClass(className.top)
;
settings.onStick.call(element);
},
fixBottom: function() {
module.debug('Sticking element to bottom of page');
module.set.minimumSize();
module.set.offset();
$module
.css({
left : module.cache.element.left,
bottom : '',
marginBottom : ''
})
.removeClass(className.bound)
.removeClass(className.top)
.addClass(className.fixed)
.addClass(className.bottom)
;
settings.onStick.call(element);
},
unbind: function() {
module.debug('Removing absolute position on element');
module.remove.offset();
$module
.removeClass(className.bound)
.removeClass(className.top)
.removeClass(className.bottom)
;
},
unfix: function() {
module.debug('Removing fixed position on element');
module.remove.offset();
$module
.removeClass(className.fixed)
.removeClass(className.top)
.removeClass(className.bottom)
;
settings.onUnstick.call(element);
},
reset: function() {
module.debug('Reseting elements position');
module.unbind();
module.unfix();
module.resetCSS();
module.remove.offset();
module.remove.lastScroll();
},
resetCSS: function() {
$module
.css({
width : '',
height : ''
})
;
$container
.css({
height: ''
})
;
},
setting: function(name, value) {
if( $.isPlainObject(name) ) {
$.extend(true, settings, name);
}
else if(value !== undefined) {
settings[name] = value;
}
else {
return settings[name];
}
},
internal: function(name, value) {
if( $.isPlainObject(name) ) {
$.extend(true, module, name);
}
else if(value !== undefined) {
module[name] = value;
}
else {
return module[name];
}
},
debug: function() {
if(settings.debug) {
if(settings.performance) {
module.performance.log(arguments);
}
else {
module.debug = Function.prototype.bind.call(console.info, console, settings.name + ':');
module.debug.apply(console, arguments);
}
}
},
verbose: function() {
if(settings.verbose && settings.debug) {
if(settings.performance) {
module.performance.log(arguments);
}
else {
module.verbose = Function.prototype.bind.call(console.info, console, settings.name + ':');
module.verbose.apply(console, arguments);
}
}
},
error: function() {
module.error = Function.prototype.bind.call(console.error, console, settings.name + ':');
module.error.apply(console, arguments);
},
performance: {
log: function(message) {
var
currentTime,
executionTime,
previousTime
;
if(settings.performance) {
currentTime = new Date().getTime();
previousTime = time || currentTime;
executionTime = currentTime - previousTime;
time = currentTime;
performance.push({
'Name' : message[0],
'Arguments' : [].slice.call(message, 1) || '',
'Element' : element,
'Execution Time' : executionTime
});
}
clearTimeout(module.performance.timer);
module.performance.timer = setTimeout(module.performance.display, 0);
},
display: function() {
var
title = settings.name + ':',
totalTime = 0
;
time = false;
clearTimeout(module.performance.timer);
$.each(performance, function(index, data) {
totalTime += data['Execution Time'];
});
title += ' ' + totalTime + 'ms';
if(moduleSelector) {
title += ' \'' + moduleSelector + '\'';
}
if( (console.group !== undefined || console.table !== undefined) && performance.length > 0) {
console.groupCollapsed(title);
if(console.table) {
console.table(performance);
}
else {
$.each(performance, function(index, data) {
console.log(data['Name'] + ': ' + data['Execution Time']+'ms');
});
}
console.groupEnd();
}
performance = [];
}
},
invoke: function(query, passedArguments, context) {
var
object = instance,
maxDepth,
found,
response
;
passedArguments = passedArguments || queryArguments;
context = element || context;
if(typeof query == 'string' && object !== undefined) {
query = query.split(/[\. ]/);
maxDepth = query.length - 1;
$.each(query, function(depth, value) {
var camelCaseValue = (depth != maxDepth)
? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1)
: query
;
if( $.isPlainObject( object[camelCaseValue] ) && (depth != maxDepth) ) {
object = object[camelCaseValue];
}
else if( object[camelCaseValue] !== undefined ) {
found = object[camelCaseValue];
return false;
}
else if( $.isPlainObject( object[value] ) && (depth != maxDepth) ) {
object = object[value];
}
else if( object[value] !== undefined ) {
found = object[value];
return false;
}
else {
return false;
}
});
}
if ( $.isFunction( found ) ) {
response = found.apply(context, passedArguments);
}
else if(found !== undefined) {
response = found;
}
if($.isArray(returnedValue)) {
returnedValue.push(response);
}
else if(returnedValue !== undefined) {
returnedValue = [returnedValue, response];
}
else if(response !== undefined) {
returnedValue = response;
}
return found;
}
};
if(methodInvoked) {
if(instance === undefined) {
module.initialize();
}
module.invoke(query);
}
else {
if(instance !== undefined) {
instance.invoke('destroy');
}
module.initialize();
}
})
;
return (returnedValue !== undefined)
? returnedValue
: this
;
};
$.fn.sticky.settings = {
name : 'Sticky',
namespace : 'sticky',
debug : false,
verbose : true,
performance : true,
// whether to stick in the opposite direction on scroll up
pushing : false,
context : false,
// Context to watch scroll events
scrollContext : window,
// Offset to adjust scroll
offset : 0,
// Offset to adjust scroll when attached to bottom of screen
bottomOffset : 0,
jitter : 5, // will only set container height if difference between context and container is larger than this number
// Whether to automatically observe changes with Mutation Observers
observeChanges : false,
// Called when position is recalculated
onReposition : function(){},
// Called on each scroll
onScroll : function(){},
// Called when element is stuck to viewport
onStick : function(){},
// Called when element is unstuck from viewport
onUnstick : function(){},
// Called when element reaches top of context
onTop : function(){},
// Called when element reaches bottom of context
onBottom : function(){},
error : {
container : 'Sticky element must be inside a relative container',
visible : 'Element is hidden, you must call refresh after element becomes visible',
method : 'The method you called is not defined.',
invalidContext : 'Context specified does not exist',
elementSize : 'Sticky element is larger than its container, cannot create sticky.'
},
className : {
bound : 'bound',
fixed : 'fixed',
supported : 'native',
top : 'top',
bottom : 'bottom'
}
};
})( jQuery, window , document ); | src/definitions/modules/sticky.js | /*!
* # Semantic UI - Sticky
* http://github.com/semantic-org/semantic-ui/
*
*
* Copyright 2015 Contributors
* Released under the MIT license
* http://opensource.org/licenses/MIT
*
*/
;(function ( $, window, document, undefined ) {
"use strict";
$.fn.sticky = function(parameters) {
var
$allModules = $(this),
moduleSelector = $allModules.selector || '',
time = new Date().getTime(),
performance = [],
query = arguments[0],
methodInvoked = (typeof query == 'string'),
queryArguments = [].slice.call(arguments, 1),
returnedValue
;
$allModules
.each(function() {
var
settings = ( $.isPlainObject(parameters) )
? $.extend(true, {}, $.fn.sticky.settings, parameters)
: $.extend({}, $.fn.sticky.settings),
className = settings.className,
namespace = settings.namespace,
error = settings.error,
eventNamespace = '.' + namespace,
moduleNamespace = 'module-' + namespace,
$module = $(this),
$window = $(window),
$scroll = $(settings.scrollContext),
$container,
$context,
selector = $module.selector || '',
instance = $module.data(moduleNamespace),
requestAnimationFrame = window.requestAnimationFrame
|| window.mozRequestAnimationFrame
|| window.webkitRequestAnimationFrame
|| window.msRequestAnimationFrame
|| function(callback) { setTimeout(callback, 0); },
element = this,
observer,
module
;
module = {
initialize: function() {
module.determineContainer();
module.determineContext();
module.verbose('Initializing sticky', settings, $container);
module.save.positions();
module.checkErrors();
module.bind.events();
if(settings.observeChanges) {
module.observeChanges();
}
module.instantiate();
},
instantiate: function() {
module.verbose('Storing instance of module', module);
instance = module;
$module
.data(moduleNamespace, module)
;
},
destroy: function() {
module.verbose('Destroying previous instance');
module.reset();
if(observer) {
observer.disconnect();
}
$window
.off('load' + eventNamespace, module.event.load)
.off('resize' + eventNamespace, module.event.resize)
;
$scroll
.off('scrollchange' + eventNamespace, module.event.scrollchange)
;
$module.removeData(moduleNamespace);
},
observeChanges: function() {
var
context = $context[0]
;
if('MutationObserver' in window) {
observer = new MutationObserver(function(mutations) {
clearTimeout(module.timer);
module.timer = setTimeout(function() {
module.verbose('DOM tree modified, updating sticky menu', mutations);
module.refresh();
}, 100);
});
observer.observe(element, {
childList : true,
subtree : true
});
observer.observe(context, {
childList : true,
subtree : true
});
module.debug('Setting up mutation observer', observer);
}
},
determineContainer: function() {
$container = $module.offsetParent();
},
determineContext: function() {
if(settings.context) {
$context = $(settings.context);
}
else {
$context = $container;
}
if($context.length === 0) {
module.error(error.invalidContext, settings.context, $module);
return;
}
},
checkErrors: function() {
if( module.is.hidden() ) {
module.error(error.visible, $module);
}
if(module.cache.element.height > module.cache.context.height) {
module.reset();
module.error(error.elementSize, $module);
return;
}
},
bind: {
events: function() {
$window
.on('load' + eventNamespace, module.event.load)
.on('resize' + eventNamespace, module.event.resize)
;
// pub/sub pattern
$scroll
.off('scroll' + eventNamespace)
.on('scroll' + eventNamespace, module.event.scroll)
.on('scrollchange' + eventNamespace, module.event.scrollchange)
;
}
},
event: {
load: function() {
module.verbose('Page contents finished loading');
requestAnimationFrame(module.refresh);
},
resize: function() {
module.verbose('Window resized');
requestAnimationFrame(module.refresh);
},
scroll: function() {
requestAnimationFrame(function() {
$scroll.triggerHandler('scrollchange' + eventNamespace, $scroll.scrollTop() );
});
},
scrollchange: function(event, scrollPosition) {
module.stick(scrollPosition);
settings.onScroll.call(element);
}
},
refresh: function(hardRefresh) {
module.reset();
if(!settings.context) {
module.determineContext();
}
if(hardRefresh) {
module.determineContainer();
}
module.save.positions();
module.stick();
settings.onReposition.call(element);
},
supports: {
sticky: function() {
var
$element = $('<div/>'),
element = $element[0]
;
$element.addClass(className.supported);
return($element.css('position').match('sticky'));
}
},
save: {
lastScroll: function(scroll) {
module.lastScroll = scroll;
},
elementScroll: function(scroll) {
module.elementScroll = scroll;
},
positions: function() {
var
window = {
height: $window.height()
},
element = {
margin: {
top : parseInt($module.css('margin-top'), 10),
bottom : parseInt($module.css('margin-bottom'), 10),
},
offset : $module.offset(),
width : $module.outerWidth(),
height : $module.outerHeight()
},
context = {
offset : $context.offset(),
height : $context.outerHeight(),
bottomPadding : parseInt($context.css('padding-bottom'), 10)
},
container = {
height: $container.outerHeight()
}
;
module.cache = {
fits : ( element.height < window.height ),
window: {
height: window.height
},
element: {
margin : element.margin,
top : element.offset.top - element.margin.top,
left : element.offset.left,
width : element.width,
height : element.height,
bottom : element.offset.top + element.height
},
context: {
top : context.offset.top,
height : context.height,
bottomPadding : context.bottomPadding,
bottom : context.offset.top + context.height - context.bottomPadding
}
};
module.set.containerSize();
module.set.size();
module.stick();
module.debug('Caching element positions', module.cache);
}
},
get: {
direction: function(scroll) {
var
direction = 'down'
;
scroll = scroll || $scroll.scrollTop();
if(module.lastScroll !== undefined) {
if(module.lastScroll < scroll) {
direction = 'down';
}
else if(module.lastScroll > scroll) {
direction = 'up';
}
}
return direction;
},
scrollChange: function(scroll) {
scroll = scroll || $scroll.scrollTop();
return (module.lastScroll)
? (scroll - module.lastScroll)
: 0
;
},
currentElementScroll: function() {
if(module.elementScroll) {
return module.elementScroll;
}
return ( module.is.top() )
? Math.abs(parseInt($module.css('top'), 10)) || 0
: Math.abs(parseInt($module.css('bottom'), 10)) || 0
;
},
elementScroll: function(scroll) {
scroll = scroll || $scroll.scrollTop();
var
element = module.cache.element,
window = module.cache.window,
delta = module.get.scrollChange(scroll),
maxScroll = (element.height - window.height + settings.offset),
elementScroll = module.get.currentElementScroll(),
possibleScroll = (elementScroll + delta)
;
if(module.cache.fits || possibleScroll < 0) {
elementScroll = 0;
}
else if(possibleScroll > maxScroll ) {
elementScroll = maxScroll;
}
else {
elementScroll = possibleScroll;
}
return elementScroll;
}
},
remove: {
lastScroll: function() {
delete module.lastScroll;
},
elementScroll: function(scroll) {
delete module.elementScroll;
},
offset: function() {
$module.css('margin-top', '');
}
},
set: {
offset: function() {
module.verbose('Setting offset on element', settings.offset);
$module
.css('margin-top', settings.offset)
;
},
containerSize: function() {
var
tagName = $container.get(0).tagName
;
if(tagName === 'HTML' || tagName == 'body') {
// this can trigger for too many reasons
//module.error(error.container, tagName, $module);
module.determineContainer();
}
else {
if( Math.abs($container.outerHeight() - module.cache.context.height) > settings.jitter) {
module.debug('Context has padding, specifying exact height for container', module.cache.context.height);
$container.css({
height: module.cache.context.height
});
}
}
},
minimumSize: function() {
var
element = module.cache.element
;
$container
.css('min-height', element.height)
;
},
scroll: function(scroll) {
module.debug('Setting scroll on element', scroll);
if(module.elementScroll == scroll) {
return;
}
if( module.is.top() ) {
$module
.css('bottom', '')
.css('top', -scroll)
;
}
if( module.is.bottom() ) {
$module
.css('top', '')
.css('bottom', scroll)
;
}
},
size: function() {
if(module.cache.element.height !== 0 && module.cache.element.width !== 0) {
$module
.css({
width : module.cache.element.width,
height : module.cache.element.height
})
;
}
}
},
is: {
top: function() {
return $module.hasClass(className.top);
},
bottom: function() {
return $module.hasClass(className.bottom);
},
initialPosition: function() {
return (!module.is.fixed() && !module.is.bound());
},
hidden: function() {
return (!$module.is(':visible'));
},
bound: function() {
return $module.hasClass(className.bound);
},
fixed: function() {
return $module.hasClass(className.fixed);
}
},
stick: function(scroll) {
var
cachedPosition = scroll || $scroll.scrollTop(),
cache = module.cache,
fits = cache.fits,
element = cache.element,
window = cache.window,
context = cache.context,
offset = (module.is.bottom() && settings.pushing)
? settings.bottomOffset
: settings.offset,
scroll = {
top : cachedPosition + offset,
bottom : cachedPosition + offset + window.height
},
direction = module.get.direction(scroll.top),
elementScroll = (fits)
? 0
: module.get.elementScroll(scroll.top),
// shorthand
doesntFit = !fits,
elementVisible = (element.height !== 0)
;
if(elementVisible) {
if( module.is.initialPosition() ) {
if(scroll.top > context.bottom) {
module.debug('Element bottom of container');
module.bindBottom();
}
else if(scroll.top > element.top) {
module.debug('Element passed, fixing element to page');
module.fixTop();
}
}
else if( module.is.fixed() ) {
// currently fixed top
if( module.is.top() ) {
if( scroll.top < element.top ) {
module.debug('Fixed element reached top of container');
module.setInitialPosition();
}
else if( (element.height + scroll.top - elementScroll) > context.bottom ) {
module.debug('Fixed element reached bottom of container');
module.bindBottom();
}
// scroll element if larger than screen
else if(doesntFit) {
module.set.scroll(elementScroll);
module.save.lastScroll(scroll.top);
module.save.elementScroll(elementScroll);
}
}
// currently fixed bottom
else if(module.is.bottom() ) {
// top edge
if( (scroll.bottom - element.height) < element.top) {
module.debug('Bottom fixed rail has reached top of container');
module.setInitialPosition();
}
// bottom edge
else if(scroll.bottom > context.bottom) {
module.debug('Bottom fixed rail has reached bottom of container');
module.bindBottom();
}
// scroll element if larger than screen
else if(doesntFit) {
module.set.scroll(elementScroll);
module.save.lastScroll(scroll.top);
module.save.elementScroll(elementScroll);
}
}
}
else if( module.is.bottom() ) {
if(settings.pushing) {
if(module.is.bound() && scroll.bottom < context.bottom ) {
module.debug('Fixing bottom attached element to bottom of browser.');
module.fixBottom();
}
}
else {
if(module.is.bound() && (scroll.top < context.bottom - element.height) ) {
module.debug('Fixing bottom attached element to top of browser.');
module.fixTop();
}
}
}
}
},
bindTop: function() {
module.debug('Binding element to top of parent container');
module.remove.offset();
$module
.css({
left : '',
top : '',
marginBottom : ''
})
.removeClass(className.fixed)
.removeClass(className.bottom)
.addClass(className.bound)
.addClass(className.top)
;
settings.onTop.call(element);
settings.onUnstick.call(element);
},
bindBottom: function() {
module.debug('Binding element to bottom of parent container');
module.remove.offset();
$module
.css({
left : '',
top : '',
marginBottom : module.cache.context.bottomPadding
})
.removeClass(className.fixed)
.removeClass(className.top)
.addClass(className.bound)
.addClass(className.bottom)
;
settings.onBottom.call(element);
settings.onUnstick.call(element);
},
setInitialPosition: function() {
module.unfix();
module.unbind();
},
fixTop: function() {
module.debug('Fixing element to top of page');
module.set.minimumSize();
module.set.offset();
$module
.css({
left : module.cache.element.left,
bottom : '',
marginBottom : ''
})
.removeClass(className.bound)
.removeClass(className.bottom)
.addClass(className.fixed)
.addClass(className.top)
;
settings.onStick.call(element);
},
fixBottom: function() {
module.debug('Sticking element to bottom of page');
module.set.minimumSize();
module.set.offset();
$module
.css({
left : module.cache.element.left,
bottom : '',
marginBottom : ''
})
.removeClass(className.bound)
.removeClass(className.top)
.addClass(className.fixed)
.addClass(className.bottom)
;
settings.onStick.call(element);
},
unbind: function() {
module.debug('Removing absolute position on element');
module.remove.offset();
$module
.removeClass(className.bound)
.removeClass(className.top)
.removeClass(className.bottom)
;
},
unfix: function() {
module.debug('Removing fixed position on element');
module.remove.offset();
$module
.removeClass(className.fixed)
.removeClass(className.top)
.removeClass(className.bottom)
;
settings.onUnstick.call(element);
},
reset: function() {
module.debug('Reseting elements position');
module.unbind();
module.unfix();
module.resetCSS();
module.remove.offset();
module.remove.lastScroll();
},
resetCSS: function() {
$module
.css({
width : '',
height : ''
})
;
$container
.css({
height: ''
})
;
},
setting: function(name, value) {
if( $.isPlainObject(name) ) {
$.extend(true, settings, name);
}
else if(value !== undefined) {
settings[name] = value;
}
else {
return settings[name];
}
},
internal: function(name, value) {
if( $.isPlainObject(name) ) {
$.extend(true, module, name);
}
else if(value !== undefined) {
module[name] = value;
}
else {
return module[name];
}
},
debug: function() {
if(settings.debug) {
if(settings.performance) {
module.performance.log(arguments);
}
else {
module.debug = Function.prototype.bind.call(console.info, console, settings.name + ':');
module.debug.apply(console, arguments);
}
}
},
verbose: function() {
if(settings.verbose && settings.debug) {
if(settings.performance) {
module.performance.log(arguments);
}
else {
module.verbose = Function.prototype.bind.call(console.info, console, settings.name + ':');
module.verbose.apply(console, arguments);
}
}
},
error: function() {
module.error = Function.prototype.bind.call(console.error, console, settings.name + ':');
module.error.apply(console, arguments);
},
performance: {
log: function(message) {
var
currentTime,
executionTime,
previousTime
;
if(settings.performance) {
currentTime = new Date().getTime();
previousTime = time || currentTime;
executionTime = currentTime - previousTime;
time = currentTime;
performance.push({
'Name' : message[0],
'Arguments' : [].slice.call(message, 1) || '',
'Element' : element,
'Execution Time' : executionTime
});
}
clearTimeout(module.performance.timer);
module.performance.timer = setTimeout(module.performance.display, 0);
},
display: function() {
var
title = settings.name + ':',
totalTime = 0
;
time = false;
clearTimeout(module.performance.timer);
$.each(performance, function(index, data) {
totalTime += data['Execution Time'];
});
title += ' ' + totalTime + 'ms';
if(moduleSelector) {
title += ' \'' + moduleSelector + '\'';
}
if( (console.group !== undefined || console.table !== undefined) && performance.length > 0) {
console.groupCollapsed(title);
if(console.table) {
console.table(performance);
}
else {
$.each(performance, function(index, data) {
console.log(data['Name'] + ': ' + data['Execution Time']+'ms');
});
}
console.groupEnd();
}
performance = [];
}
},
invoke: function(query, passedArguments, context) {
var
object = instance,
maxDepth,
found,
response
;
passedArguments = passedArguments || queryArguments;
context = element || context;
if(typeof query == 'string' && object !== undefined) {
query = query.split(/[\. ]/);
maxDepth = query.length - 1;
$.each(query, function(depth, value) {
var camelCaseValue = (depth != maxDepth)
? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1)
: query
;
if( $.isPlainObject( object[camelCaseValue] ) && (depth != maxDepth) ) {
object = object[camelCaseValue];
}
else if( object[camelCaseValue] !== undefined ) {
found = object[camelCaseValue];
return false;
}
else if( $.isPlainObject( object[value] ) && (depth != maxDepth) ) {
object = object[value];
}
else if( object[value] !== undefined ) {
found = object[value];
return false;
}
else {
return false;
}
});
}
if ( $.isFunction( found ) ) {
response = found.apply(context, passedArguments);
}
else if(found !== undefined) {
response = found;
}
if($.isArray(returnedValue)) {
returnedValue.push(response);
}
else if(returnedValue !== undefined) {
returnedValue = [returnedValue, response];
}
else if(response !== undefined) {
returnedValue = response;
}
return found;
}
};
if(methodInvoked) {
if(instance === undefined) {
module.initialize();
}
module.invoke(query);
}
else {
if(instance !== undefined) {
instance.invoke('destroy');
}
module.initialize();
}
})
;
return (returnedValue !== undefined)
? returnedValue
: this
;
};
$.fn.sticky.settings = {
name : 'Sticky',
namespace : 'sticky',
debug : false,
verbose : true,
performance : true,
// whether to stick in the opposite direction on scroll up
pushing : false,
context : false,
// Context to watch scroll events
scrollContext : window,
// Offset to adjust scroll
offset : 0,
// Offset to adjust scroll when attached to bottom of screen
bottomOffset : 0,
jitter : 5, // will only set container height if difference between context and container is larger than this number
// Whether to automatically observe changes with Mutation Observers
observeChanges : false,
// Called when position is recalculated
onReposition : function(){},
// Called on each scroll
onScroll : function(){},
// Called when element is stuck to viewport
onStick : function(){},
// Called when element is unstuck from viewport
onUnstick : function(){},
// Called when element reaches top of context
onTop : function(){},
// Called when element reaches bottom of context
onBottom : function(){},
error : {
container : 'Sticky element must be inside a relative container',
visible : 'Element is hidden, you must call refresh after element becomes visible',
method : 'The method you called is not defined.',
invalidContext : 'Context specified does not exist',
elementSize : 'Sticky element is larger than its container, cannot create sticky.'
},
className : {
bound : 'bound',
fixed : 'fixed',
supported : 'native',
top : 'top',
bottom : 'bottom'
}
};
})( jQuery, window , document ); | Related #2605, sticky no longer uses bottomPadding for determining bottom edge of context. This is counterintuitive and in most cases wrong
| src/definitions/modules/sticky.js | Related #2605, sticky no longer uses bottomPadding for determining bottom edge of context. This is counterintuitive and in most cases wrong | <ide><path>rc/definitions/modules/sticky.js
<ide> },
<ide> context = {
<ide> offset : $context.offset(),
<del> height : $context.outerHeight(),
<del> bottomPadding : parseInt($context.css('padding-bottom'), 10)
<add> height : $context.outerHeight()
<ide> },
<ide> container = {
<ide> height: $container.outerHeight()
<ide> context: {
<ide> top : context.offset.top,
<ide> height : context.height,
<del> bottomPadding : context.bottomPadding,
<del> bottom : context.offset.top + context.height - context.bottomPadding
<add> bottom : context.offset.top + context.height
<ide> }
<ide> };
<ide> module.set.containerSize();
<ide> }
<ide> else if(scroll.top > element.top) {
<ide> module.debug('Element passed, fixing element to page');
<del> module.fixTop();
<del> }
<add> if( (element.height + scroll.top - elementScroll) > context.bottom ) {
<add> module.bindBottom();
<add> }
<add> else {
<add> module.fixTop();
<add> }
<add> }
<add>
<ide> }
<ide> else if( module.is.fixed() ) {
<ide>
<ide> $module
<ide> .css({
<ide> left : '',
<del> top : '',
<del> marginBottom : module.cache.context.bottomPadding
<add> top : ''
<ide> })
<ide> .removeClass(className.fixed)
<ide> .removeClass(className.top) |
|
Java | apache-2.0 | 3059b58a9c8d215f430c2d3b316f5d25e645daae | 0 | codeabovelab/haven-platform,codeabovelab/haven-platform,codeabovelab/haven-platform,codeabovelab/haven-platform | /*
* Copyright 2016 Code Above Lab LLC
*
* 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 com.codeabovelab.dm.cluman.ui;
import com.codeabovelab.dm.cluman.utils.ContainerUtils;
import com.codeabovelab.dm.cluman.cluster.docker.management.DockerService;
import com.codeabovelab.dm.cluman.cluster.docker.management.argument.GetImagesArg;
import com.codeabovelab.dm.cluman.cluster.docker.management.argument.RemoveImageArg;
import com.codeabovelab.dm.cluman.cluster.docker.management.argument.TagImageArg;
import com.codeabovelab.dm.cluman.cluster.docker.management.result.ResultCode;
import com.codeabovelab.dm.cluman.cluster.docker.management.result.ServiceCallResult;
import com.codeabovelab.dm.cluman.cluster.docker.model.ImageItem;
import com.codeabovelab.dm.cluman.cluster.filter.Filter;
import com.codeabovelab.dm.cluman.cluster.filter.FilterFactory;
import com.codeabovelab.dm.cluman.cluster.registry.RegistryRepository;
import com.codeabovelab.dm.cluman.cluster.registry.RegistrySearchHelper;
import com.codeabovelab.dm.cluman.cluster.registry.RegistryService;
import com.codeabovelab.dm.cluman.cluster.registry.data.ImageCatalog;
import com.codeabovelab.dm.cluman.cluster.registry.data.SearchResult;
import com.codeabovelab.dm.cluman.ds.DockerServiceRegistry;
import com.codeabovelab.dm.cluman.model.*;
import com.codeabovelab.dm.cluman.ui.model.UiImageData;
import com.codeabovelab.dm.cluman.ui.model.UiSearchResult;
import com.codeabovelab.dm.cluman.ui.model.UiImageCatalog;
import com.codeabovelab.dm.cluman.ui.model.UiTagCatalog;
import com.codeabovelab.dm.cluman.validate.ExtendedAssert;
import com.codeabovelab.dm.common.cache.DefineCache;
import com.google.common.base.Splitter;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse;
import lombok.Data;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.http.ResponseEntity;
import org.springframework.util.Assert;
import org.springframework.util.CollectionUtils;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.*;
import java.util.*;
import java.util.stream.Collectors;
import static org.springframework.http.MediaType.APPLICATION_JSON_VALUE;
import static org.springframework.web.bind.annotation.RequestMethod.GET;
@Slf4j
@RestController
@RequestMapping(value = "/ui/api/images", produces = APPLICATION_JSON_VALUE)
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
public class ImagesApi {
public static final Splitter SPLITTER = Splitter.on(",").omitEmptyStrings().trimResults();
private final DockerServiceRegistry dockerServices;
private final DiscoveryStorage discoveryStorage;
private final RegistryRepository registryRepository;
private final FilterFactory filterFactory;
@RequestMapping(value = "/clusters/{cluster}/list", method = RequestMethod.GET)
public List<ImageItem> getImages(@PathVariable("cluster") String cluster) {
//TODO check usage of this method in CLI and if it not used - remove
List<ImageItem> images = dockerServices.getService(cluster).getImages(GetImagesArg.ALL);
return images;
}
@ApiOperation("search by image substring, if you specify repository then you can use expression like '*word*' ")
@RequestMapping(value = "/search", method = RequestMethod.GET)
public UiSearchResult search(@RequestParam(value = "registry", required = false) String registryParam,
@RequestParam(value = "cluster", required = false) String cluster,
@RequestParam(value = "query", required = false) String query,
@RequestParam(value = "page") int page,
@RequestParam(value = "size") int size) {
List<String> registries = new ArrayList<>();
if (StringUtils.hasText(cluster)) {
DockerService dockerService = dockerServices.getService(cluster);
ExtendedAssert.notFound(cluster, "Cluster not found " + cluster);
registries.addAll(dockerService.getClusterConfig().getRegistries());
}
//possibly we must place below code into 'registryRepository'
if (!StringUtils.hasText(registryParam)) {
// we may get registry name from query
try {
registryParam = ContainerUtils.getRegistryName(query);
// registry may be a mask
if (registryParam != null && registryParam.contains("*")) {
registryParam = "";
}
if (StringUtils.hasText(registryParam)) {
registries.retainAll(SPLITTER.splitToList(registryParam));
}
} catch (Exception e) {
//nothing
}
}
SearchResult result;
if (!CollectionUtils.isEmpty(registries)) {
RegistrySearchHelper rsh = new RegistrySearchHelper(query, page, size);
for(String registry: registries) {
RegistryService service = registryRepository.getByName(registry);
if(service != null) {
rsh.search(service);
}
}
result = rsh.collect();
} else {
result = registryRepository.search(query, page, size);
}
if (result == null) {
return UiSearchResult.builder().build();
}
return UiSearchResult.from(result);
}
@RequestMapping(value = "/image", method = RequestMethod.GET)
public ImageDescriptor getImage(@RequestParam("fullImageName") String fullImageName) {
final boolean isId = ContainerUtils.isImageId(fullImageName);
ImageDescriptor image;
if(isId) { // id usually produced by clusters, therefore we can find it at clusters
DockerService docker = this.discoveryStorage.getCluster(DiscoveryStorage.GROUP_ID_ALL).getDocker();
// not that it simply iterate over all nodes until image is appeared
image = docker.getImage(fullImageName);
} else {
String name = ContainerUtils.getImageName(fullImageName);
String registry = ContainerUtils.getRegistryName(fullImageName);
String tag = ContainerUtils.getImageVersion(fullImageName);
image = registryRepository.getImage(name, tag, registry);
}
ExtendedAssert.notFound(image, "Can not find image: " + fullImageName);
return image;
}
// we must use job instead of it
@Deprecated
@ApiOperation("Can be passed image w/o tag then will be deleted all tags, returns list of deleted tags")
@RequestMapping(value = "/", method = RequestMethod.DELETE)
public List<String> removeImageFromRegistry(@RequestParam("fullImageName") String fullImageName,
@RequestParam(value = "filter", required = false) String filter) {
String name = ContainerUtils.getImageName(fullImageName);
String registry = ContainerUtils.getRegistryName(fullImageName);
String tag = ContainerUtils.getImageVersion(fullImageName);
if (StringUtils.hasText(tag)) {
ImageDescriptor image = registryRepository.getImage(name, tag, registry);
Assert.notNull("can't find image " + name + "/" + tag);
registryRepository.deleteTag(name, image.getId(), registry);
return Collections.singletonList(tag);
} else {
return removeImagesFromRegistry(registry, name, filter);
}
}
private List<String> removeImagesFromRegistry(String registry,
String name,
String filter) {
List<String> tags = registryRepository.getTags(name, registry, getFilter(filter));
return tags.stream().map(tag -> {
try {
registryRepository.deleteTag(name, tag, registry);
return tag;
} catch (Exception e) {
return null;
}
}).filter(s -> s != null).collect(Collectors.toList());
}
@RequestMapping(value = "/{registry}/{name}/digest/{reference}", method = RequestMethod.DELETE)
public void removeImageFromRegistryByReference(@PathVariable("registry") String registry,
@PathVariable("name") String name,
@PathVariable("reference") String reference) {
registryRepository.deleteTag(name, reference, registry);
}
// we must use job instead of it
@Deprecated
@RequestMapping(value = "/clusters/{cluster}/all", method = RequestMethod.DELETE)
@ApiResponse(message = "Returns list of deleted images", code = 200)
public List<String> removeAllImages(@PathVariable("cluster") String cluster) {
List<ImageItem> images = dockerServices.getService(cluster).getImages(GetImagesArg.ALL);
List<String> collect = images.stream().map(i -> dockerServices.getService(cluster).removeImage(RemoveImageArg.builder()
.cluster(cluster)
.imageId(i.getId())
.build())).filter(r -> r.getCode() != ResultCode.ERROR).map(s -> s.getImage()).collect(Collectors.toList());
return collect;
}
/**
* Tag an image into a repository
*
* @param repository The repository to tag in
* @param force (not documented)
*/
@RequestMapping(value = "/clusters/{cluster}/tag", method = RequestMethod.PUT)
public ResponseEntity<?> createTag(@PathVariable("cluster") String cluster,
@RequestParam(value = "imageName") String imageName,
@RequestParam(value = "currentTag", defaultValue = "latest") String currentTag,
@RequestParam(value = "newTag") String newTag,
@RequestParam(value = "repository") String repository,
@RequestParam(value = "force", required = false, defaultValue = "false") Boolean force) {
TagImageArg tagImageArg = TagImageArg.builder()
.force(force)
.newTag(newTag)
.currentTag(currentTag)
.cluster(cluster)
.imageName(imageName)
.repository(repository).build();
ServiceCallResult res = dockerServices.getService(cluster).createTag(tagImageArg);
return UiUtils.createResponse(res);
}
@ApiOperation("get tags, filter expression is SpEL cluster image filter")
@RequestMapping(value = "/tags", method = GET)
@Cacheable("TagsList")
@DefineCache(expireAfterWrite = 60_000)
public List<String> listTags(@RequestParam("imageName") String imageName,
@RequestParam(value = "filter", required = false) String filter) {
Filter imageFilter = getFilter(filter);
String name = ContainerUtils.getImageName(imageName);
String registry = ContainerUtils.getRegistryName(imageName);
List<String> tags = registryRepository.getTags(name, registry, imageFilter);
return tags;
}
private Filter getFilter(String filter) {
if (filter == null) {
return Filter.any();
}
return this.filterFactory.createFilter(filter);
}
@ApiOperation("get tags catalog (contains additional information), filter expression is SpEL cluster image filter")
@RequestMapping(value = "/tags-detailed", method = GET)
@Cacheable("UiImageCatalog")
@DefineCache(expireAfterWrite = 60_000)
public List<UiTagCatalog> listTagsDetailed(@RequestParam("imageName") String imageName,
@RequestParam(value = "filter", required = false) String filter) {
Filter imageFilter = getFilter(filter);
String name = ContainerUtils.getImageName(imageName);
String registry = ContainerUtils.getRegistryName(imageName);
List<String> tags = registryRepository.getTags(name, registry, imageFilter);
return tags.stream().map(t -> {
try {
ImageDescriptor image = registryRepository.getImage(name, t, registry);
return new UiTagCatalog(registry, name, null, t, image != null ? image.getId() : null,
image != null ? image.getCreated() : null,
image != null ? image.getContainerConfig().getLabels() : null);
} catch (Exception e) {
log.error("can't download image {} / {} : {}, cause: {}", registry, name, t, e.getMessage());
return null;
}
}).filter(f -> f != null).collect(Collectors.toList());
}
@ApiOperation("get images catalogs, filter expression is SpEL cluster image filter")
@RequestMapping(value = "/", method = GET)
@Cacheable("UiImageCatalog")
@DefineCache(expireAfterWrite = 60_000)
public List<UiImageCatalog> listImageCatalogs(@RequestParam(value = "filter", required = false) String filterStr) {
final Filter filter = getFilter(filterStr);
Map<String, UiImageCatalog> catalogs = getDownloadedImages(filter);
Collection<String> registries = registryRepository.getAvailableRegistries();
ImageObject io = new ImageObject();
for (String registry : registries) {
RegistryService registryService = registryRepository.getRegistry(registry);
if (!registryService.getConfig().isDisabled()) {
String registryName = registryService.getConfig().getName();
ImageCatalog ic = registryService.getCatalog();
if (ic != null) {
for (String name : ic.getImages()) {
io.setName(name);
io.setRegistry(registryName);
String fullName = StringUtils.isEmpty(registryName) ? name : registryName + "/" + name;
io.setFullName(fullName);
if (!filter.test(io)) {
continue;
}
//we simply create uic if it absent
UiImageCatalog uic = catalogs.computeIfAbsent(fullName, UiImageCatalog::new);
}
}
}
}
List<UiImageCatalog> list = new ArrayList<>(catalogs.values());
Collections.sort(list);
return list;
}
private Map<String, UiImageCatalog> getDownloadedImages(Filter filter) {
//we can use result of this it for evaluate used space and deleting images, so need to se all images
List<NodesGroup> nodesGroups = discoveryStorage.getClusters();
Map<String, UiImageCatalog> catalogs = new TreeMap<>();
for (NodesGroup nodesGroup : nodesGroups) {
// we gather images from real clusters and orphans nodes
String groupName = nodesGroup.getName();
if (!nodesGroup.getFeatures().contains(NodesGroup.Feature.SWARM) &&
!DiscoveryStorage.GROUP_ID_ORPHANS.equals(groupName)) {
continue;
}
try {
processGroup(filter, catalogs, nodesGroup);
} catch (Exception e) {
log.error("Error while process images of \"{}\"", groupName, e);
}
}
return catalogs;
}
private void processGroup(Filter filter, Map<String, UiImageCatalog> catalogs, NodesGroup nodesGroup) {
ImageObject io = new ImageObject();
GetImagesArg getImagesArg = GetImagesArg.ALL;
List<ImageItem> images = nodesGroup.getDocker().getImages(getImagesArg);
final String clusterName = nodesGroup.getName();
io.setCluster(clusterName);
//note that in some cases not all nodes of cluster have same images set, but we ignore it at this time
final List<String> nodes = nodesGroup.getNodes().stream().map(Node::getName).collect(Collectors.toList());
io.setNodes(nodes);
for (ImageItem image : images) {
for (String tag : image.getRepoTags()) {
String imageName = ContainerUtils.getRegistryAndImageName(tag);
if(imageName.contains(ImageName.NONE)) {
imageName = image.getId();
} else {
io.setFullName(imageName);
}
if (!filter.test(io)) {
continue;
}
UiImageCatalog uic = catalogs.computeIfAbsent(imageName, UiImageCatalog::new);
if(!DiscoveryStorage.GROUP_ID_ORPHANS.equals(clusterName)) {
// we set name of real clusters only
uic.getClusters().add(clusterName);
}
String version = ContainerUtils.getImageVersion(tag);
UiImageData imgdt = uic.getOrAddId(image.getId());
imgdt.setCreated(image.getCreated());
imgdt.setSize(image.getSize());
if(!ImageName.NONE.equals(version)) {
imgdt.getTags().add(version);
}
imgdt.getNodes().addAll(nodes);
}
}
}
@Data
private static class ImageObject {
private String name;
private String cluster;
private Set<String> nodes = new TreeSet<>();
private String fullName;
private String registry;
void setNodes(Collection<String> nodes) {
this.nodes.clear();
if (nodes != null) {
this.nodes.addAll(nodes);
}
}
void setFullName(String name) {
setName(ContainerUtils.getImageName(name));
setRegistry(ContainerUtils.getRegistryName(name));
}
@Override
public String toString() {
return fullName;
}
public void clear() {
name = null;
cluster = null;
nodes.clear();
fullName = null;
registry = null;
}
}
}
| cluster-manager/src/main/java/com/codeabovelab/dm/cluman/ui/ImagesApi.java | /*
* Copyright 2016 Code Above Lab LLC
*
* 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 com.codeabovelab.dm.cluman.ui;
import com.codeabovelab.dm.cluman.utils.ContainerUtils;
import com.codeabovelab.dm.cluman.cluster.docker.management.DockerService;
import com.codeabovelab.dm.cluman.cluster.docker.management.argument.GetImagesArg;
import com.codeabovelab.dm.cluman.cluster.docker.management.argument.RemoveImageArg;
import com.codeabovelab.dm.cluman.cluster.docker.management.argument.TagImageArg;
import com.codeabovelab.dm.cluman.cluster.docker.management.result.ResultCode;
import com.codeabovelab.dm.cluman.cluster.docker.management.result.ServiceCallResult;
import com.codeabovelab.dm.cluman.cluster.docker.model.ImageItem;
import com.codeabovelab.dm.cluman.cluster.filter.Filter;
import com.codeabovelab.dm.cluman.cluster.filter.FilterFactory;
import com.codeabovelab.dm.cluman.cluster.registry.RegistryRepository;
import com.codeabovelab.dm.cluman.cluster.registry.RegistrySearchHelper;
import com.codeabovelab.dm.cluman.cluster.registry.RegistryService;
import com.codeabovelab.dm.cluman.cluster.registry.data.ImageCatalog;
import com.codeabovelab.dm.cluman.cluster.registry.data.SearchResult;
import com.codeabovelab.dm.cluman.ds.DockerServiceRegistry;
import com.codeabovelab.dm.cluman.model.*;
import com.codeabovelab.dm.cluman.ui.model.UiImageData;
import com.codeabovelab.dm.cluman.ui.model.UiSearchResult;
import com.codeabovelab.dm.cluman.ui.model.UiImageCatalog;
import com.codeabovelab.dm.cluman.ui.model.UiTagCatalog;
import com.codeabovelab.dm.cluman.validate.ExtendedAssert;
import com.codeabovelab.dm.common.cache.DefineCache;
import com.google.common.base.Splitter;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse;
import lombok.Data;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.http.ResponseEntity;
import org.springframework.util.Assert;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.*;
import java.util.*;
import java.util.stream.Collectors;
import static org.springframework.http.MediaType.APPLICATION_JSON_VALUE;
import static org.springframework.web.bind.annotation.RequestMethod.GET;
@Slf4j
@RestController
@RequestMapping(value = "/ui/api/images", produces = APPLICATION_JSON_VALUE)
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
public class ImagesApi {
public static final Splitter SPLITTER = Splitter.on(",").omitEmptyStrings().trimResults();
private final DockerServiceRegistry dockerServices;
private final DiscoveryStorage discoveryStorage;
private final RegistryRepository registryRepository;
private final FilterFactory filterFactory;
@RequestMapping(value = "/clusters/{cluster}/list", method = RequestMethod.GET)
public List<ImageItem> getImages(@PathVariable("cluster") String cluster) {
//TODO check usage of this method in CLI and if it not used - remove
List<ImageItem> images = dockerServices.getService(cluster).getImages(GetImagesArg.ALL);
return images;
}
@ApiOperation("search by image substring, if you specify repository then you can use expression like '*word*' ")
@RequestMapping(value = "/search", method = RequestMethod.GET)
public UiSearchResult search(@RequestParam(value = "registry", required = false) String registryParam,
@RequestParam(value = "query", required = false) String query,
@RequestParam(value = "page") int page,
@RequestParam(value = "size") int size) {
SearchResult result;
//possibly we must place below code into 'registryRepository'
if (!StringUtils.hasText(registryParam)) {
// we may get registry name from query
try {
registryParam = ContainerUtils.getRegistryName(query);
// registry may be a mask
if (registryParam != null && registryParam.contains("*")) {
registryParam = "";
}
} catch (Exception e) {
//nothing
}
}
if (StringUtils.hasText(registryParam)) {
List<String> registries = SPLITTER.splitToList(registryParam);
RegistrySearchHelper rsh = new RegistrySearchHelper(query, page, size);
for(String registry: registries) {
RegistryService service = registryRepository.getByName(registry);
if(service != null) {
rsh.search(service);
}
}
result = rsh.collect();
} else {
result = registryRepository.search(query, page, size);
}
if (result == null) {
return UiSearchResult.builder().build();
}
return UiSearchResult.from(result);
}
@RequestMapping(value = "/image", method = RequestMethod.GET)
public ImageDescriptor getImage(@RequestParam("fullImageName") String fullImageName) {
final boolean isId = ContainerUtils.isImageId(fullImageName);
ImageDescriptor image;
if(isId) { // id usually produced by clusters, therefore we can find it at clusters
DockerService docker = this.discoveryStorage.getCluster(DiscoveryStorage.GROUP_ID_ALL).getDocker();
// not that it simply iterate over all nodes until image is appeared
image = docker.getImage(fullImageName);
} else {
String name = ContainerUtils.getImageName(fullImageName);
String registry = ContainerUtils.getRegistryName(fullImageName);
String tag = ContainerUtils.getImageVersion(fullImageName);
image = registryRepository.getImage(name, tag, registry);
}
ExtendedAssert.notFound(image, "Can not find image: " + fullImageName);
return image;
}
// we must use job instead of it
@Deprecated
@ApiOperation("Can be passed image w/o tag then will be deleted all tags, returns list of deleted tags")
@RequestMapping(value = "/", method = RequestMethod.DELETE)
public List<String> removeImageFromRegistry(@RequestParam("fullImageName") String fullImageName,
@RequestParam(value = "filter", required = false) String filter) {
String name = ContainerUtils.getImageName(fullImageName);
String registry = ContainerUtils.getRegistryName(fullImageName);
String tag = ContainerUtils.getImageVersion(fullImageName);
if (StringUtils.hasText(tag)) {
ImageDescriptor image = registryRepository.getImage(name, tag, registry);
Assert.notNull("can't find image " + name + "/" + tag);
registryRepository.deleteTag(name, image.getId(), registry);
return Collections.singletonList(tag);
} else {
return removeImagesFromRegistry(registry, name, filter);
}
}
private List<String> removeImagesFromRegistry(String registry,
String name,
String filter) {
List<String> tags = registryRepository.getTags(name, registry, getFilter(filter));
return tags.stream().map(tag -> {
try {
registryRepository.deleteTag(name, tag, registry);
return tag;
} catch (Exception e) {
return null;
}
}).filter(s -> s != null).collect(Collectors.toList());
}
@RequestMapping(value = "/{registry}/{name}/digest/{reference}", method = RequestMethod.DELETE)
public void removeImageFromRegistryByReference(@PathVariable("registry") String registry,
@PathVariable("name") String name,
@PathVariable("reference") String reference) {
registryRepository.deleteTag(name, reference, registry);
}
// we must use job instead of it
@Deprecated
@RequestMapping(value = "/clusters/{cluster}/all", method = RequestMethod.DELETE)
@ApiResponse(message = "Returns list of deleted images", code = 200)
public List<String> removeAllImages(@PathVariable("cluster") String cluster) {
List<ImageItem> images = dockerServices.getService(cluster).getImages(GetImagesArg.ALL);
List<String> collect = images.stream().map(i -> dockerServices.getService(cluster).removeImage(RemoveImageArg.builder()
.cluster(cluster)
.imageId(i.getId())
.build())).filter(r -> r.getCode() != ResultCode.ERROR).map(s -> s.getImage()).collect(Collectors.toList());
return collect;
}
/**
* Tag an image into a repository
*
* @param repository The repository to tag in
* @param force (not documented)
*/
@RequestMapping(value = "/clusters/{cluster}/tag", method = RequestMethod.PUT)
public ResponseEntity<?> createTag(@PathVariable("cluster") String cluster,
@RequestParam(value = "imageName") String imageName,
@RequestParam(value = "currentTag", defaultValue = "latest") String currentTag,
@RequestParam(value = "newTag") String newTag,
@RequestParam(value = "repository") String repository,
@RequestParam(value = "force", required = false, defaultValue = "false") Boolean force) {
TagImageArg tagImageArg = TagImageArg.builder()
.force(force)
.newTag(newTag)
.currentTag(currentTag)
.cluster(cluster)
.imageName(imageName)
.repository(repository).build();
ServiceCallResult res = dockerServices.getService(cluster).createTag(tagImageArg);
return UiUtils.createResponse(res);
}
@ApiOperation("get tags, filter expression is SpEL cluster image filter")
@RequestMapping(value = "/tags", method = GET)
@Cacheable("TagsList")
@DefineCache(expireAfterWrite = 60_000)
public List<String> listTags(@RequestParam("imageName") String imageName,
@RequestParam(value = "filter", required = false) String filter) {
Filter imageFilter = getFilter(filter);
String name = ContainerUtils.getImageName(imageName);
String registry = ContainerUtils.getRegistryName(imageName);
List<String> tags = registryRepository.getTags(name, registry, imageFilter);
return tags;
}
private Filter getFilter(String filter) {
if (filter == null) {
return Filter.any();
}
return this.filterFactory.createFilter(filter);
}
@ApiOperation("get tags catalog (contains additional information), filter expression is SpEL cluster image filter")
@RequestMapping(value = "/tags-detailed", method = GET)
@Cacheable("UiImageCatalog")
@DefineCache(expireAfterWrite = 60_000)
public List<UiTagCatalog> listTagsDetailed(@RequestParam("imageName") String imageName,
@RequestParam(value = "filter", required = false) String filter) {
Filter imageFilter = getFilter(filter);
String name = ContainerUtils.getImageName(imageName);
String registry = ContainerUtils.getRegistryName(imageName);
List<String> tags = registryRepository.getTags(name, registry, imageFilter);
return tags.stream().map(t -> {
try {
ImageDescriptor image = registryRepository.getImage(name, t, registry);
return new UiTagCatalog(registry, name, null, t, image != null ? image.getId() : null,
image != null ? image.getCreated() : null,
image != null ? image.getContainerConfig().getLabels() : null);
} catch (Exception e) {
log.error("can't download image {} / {} : {}, cause: {}", registry, name, t, e.getMessage());
return null;
}
}).filter(f -> f != null).collect(Collectors.toList());
}
@ApiOperation("get images catalogs, filter expression is SpEL cluster image filter")
@RequestMapping(value = "/", method = GET)
@Cacheable("UiImageCatalog")
@DefineCache(expireAfterWrite = 60_000)
public List<UiImageCatalog> listImageCatalogs(@RequestParam(value = "filter", required = false) String filterStr) {
final Filter filter = getFilter(filterStr);
Map<String, UiImageCatalog> catalogs = getDownloadedImages(filter);
Collection<String> registries = registryRepository.getAvailableRegistries();
ImageObject io = new ImageObject();
for (String registry : registries) {
RegistryService registryService = registryRepository.getRegistry(registry);
if (!registryService.getConfig().isDisabled()) {
String registryName = registryService.getConfig().getName();
ImageCatalog ic = registryService.getCatalog();
if (ic != null) {
for (String name : ic.getImages()) {
io.setName(name);
io.setRegistry(registryName);
String fullName = StringUtils.isEmpty(registryName) ? name : registryName + "/" + name;
io.setFullName(fullName);
if (!filter.test(io)) {
continue;
}
//we simply create uic if it absent
UiImageCatalog uic = catalogs.computeIfAbsent(fullName, UiImageCatalog::new);
}
}
}
}
List<UiImageCatalog> list = new ArrayList<>(catalogs.values());
Collections.sort(list);
return list;
}
private Map<String, UiImageCatalog> getDownloadedImages(Filter filter) {
//we can use result of this it for evaluate used space and deleting images, so need to se all images
List<NodesGroup> nodesGroups = discoveryStorage.getClusters();
Map<String, UiImageCatalog> catalogs = new TreeMap<>();
for (NodesGroup nodesGroup : nodesGroups) {
// we gather images from real clusters and orphans nodes
String groupName = nodesGroup.getName();
if (!nodesGroup.getFeatures().contains(NodesGroup.Feature.SWARM) &&
!DiscoveryStorage.GROUP_ID_ORPHANS.equals(groupName)) {
continue;
}
try {
processGroup(filter, catalogs, nodesGroup);
} catch (Exception e) {
log.error("Error while process images of \"{}\"", groupName, e);
}
}
return catalogs;
}
private void processGroup(Filter filter, Map<String, UiImageCatalog> catalogs, NodesGroup nodesGroup) {
ImageObject io = new ImageObject();
GetImagesArg getImagesArg = GetImagesArg.ALL;
List<ImageItem> images = nodesGroup.getDocker().getImages(getImagesArg);
final String clusterName = nodesGroup.getName();
io.setCluster(clusterName);
//note that in some cases not all nodes of cluster have same images set, but we ignore it at this time
final List<String> nodes = nodesGroup.getNodes().stream().map(Node::getName).collect(Collectors.toList());
io.setNodes(nodes);
for (ImageItem image : images) {
for (String tag : image.getRepoTags()) {
String imageName = ContainerUtils.getRegistryAndImageName(tag);
if(imageName.contains(ImageName.NONE)) {
imageName = image.getId();
} else {
io.setFullName(imageName);
}
if (!filter.test(io)) {
continue;
}
UiImageCatalog uic = catalogs.computeIfAbsent(imageName, UiImageCatalog::new);
if(!DiscoveryStorage.GROUP_ID_ORPHANS.equals(clusterName)) {
// we set name of real clusters only
uic.getClusters().add(clusterName);
}
String version = ContainerUtils.getImageVersion(tag);
UiImageData imgdt = uic.getOrAddId(image.getId());
imgdt.setCreated(image.getCreated());
imgdt.setSize(image.getSize());
if(!ImageName.NONE.equals(version)) {
imgdt.getTags().add(version);
}
imgdt.getNodes().addAll(nodes);
}
}
}
@Data
private static class ImageObject {
private String name;
private String cluster;
private Set<String> nodes = new TreeSet<>();
private String fullName;
private String registry;
void setNodes(Collection<String> nodes) {
this.nodes.clear();
if (nodes != null) {
this.nodes.addAll(nodes);
}
}
void setFullName(String name) {
setName(ContainerUtils.getImageName(name));
setRegistry(ContainerUtils.getRegistryName(name));
}
@Override
public String toString() {
return fullName;
}
public void clear() {
name = null;
cluster = null;
nodes.clear();
fullName = null;
registry = null;
}
}
}
| added search for cluster
| cluster-manager/src/main/java/com/codeabovelab/dm/cluman/ui/ImagesApi.java | added search for cluster | <ide><path>luster-manager/src/main/java/com/codeabovelab/dm/cluman/ui/ImagesApi.java
<ide> import org.springframework.cache.annotation.Cacheable;
<ide> import org.springframework.http.ResponseEntity;
<ide> import org.springframework.util.Assert;
<add>import org.springframework.util.CollectionUtils;
<ide> import org.springframework.util.StringUtils;
<ide> import org.springframework.web.bind.annotation.*;
<ide>
<ide> @ApiOperation("search by image substring, if you specify repository then you can use expression like '*word*' ")
<ide> @RequestMapping(value = "/search", method = RequestMethod.GET)
<ide> public UiSearchResult search(@RequestParam(value = "registry", required = false) String registryParam,
<add> @RequestParam(value = "cluster", required = false) String cluster,
<ide> @RequestParam(value = "query", required = false) String query,
<ide> @RequestParam(value = "page") int page,
<ide> @RequestParam(value = "size") int size) {
<del> SearchResult result;
<add>
<add> List<String> registries = new ArrayList<>();
<add>
<add> if (StringUtils.hasText(cluster)) {
<add> DockerService dockerService = dockerServices.getService(cluster);
<add> ExtendedAssert.notFound(cluster, "Cluster not found " + cluster);
<add> registries.addAll(dockerService.getClusterConfig().getRegistries());
<add> }
<add>
<ide> //possibly we must place below code into 'registryRepository'
<ide> if (!StringUtils.hasText(registryParam)) {
<ide> // we may get registry name from query
<ide> if (registryParam != null && registryParam.contains("*")) {
<ide> registryParam = "";
<ide> }
<add> if (StringUtils.hasText(registryParam)) {
<add> registries.retainAll(SPLITTER.splitToList(registryParam));
<add> }
<ide> } catch (Exception e) {
<ide> //nothing
<ide> }
<ide> }
<del> if (StringUtils.hasText(registryParam)) {
<del> List<String> registries = SPLITTER.splitToList(registryParam);
<add>
<add> SearchResult result;
<add> if (!CollectionUtils.isEmpty(registries)) {
<ide> RegistrySearchHelper rsh = new RegistrySearchHelper(query, page, size);
<ide> for(String registry: registries) {
<ide> RegistryService service = registryRepository.getByName(registry); |
|
Java | apache-2.0 | 5fd2ad2e14896bcf264c856a82d0f55d8e8d4a4c | 0 | idunnololz/LoLCraft | package com.ggstudios.lolcraft;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Stack;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import android.graphics.Color;
import android.util.Log;
import android.util.SparseIntArray;
import com.ggstudios.lolcraft.ChampionInfo.Skill;
import com.ggstudios.utils.DebugLog;
import com.google.gson.Gson;
/**
* Class that holds information about a build, such as build order, stats and cost.
*/
public class Build {
private static final String TAG = "Build";
public static final int RUNE_TYPE_RED = 0;
public static final int RUNE_TYPE_BLUE = 1;
public static final int RUNE_TYPE_YELLOW = 2;
public static final int RUNE_TYPE_BLACK = 3;
public static final double MAX_ATTACK_SPEED = 2.5;
public static final double MAX_CDR = 0.4;
private static final int[] RUNE_COUNT_MAX = new int[] {
9, 9, 9, 3
};
private static final int[] GROUP_COLOR = new int[] {
0xff2ecc71, // emerald
//0xffe74c3c, // alizarin
0xff3498db, // peter river
0xff9b59b6, // amethyst
0xffe67e22, // carrot
0xff34495e, // wet asphalt
0xff1abc9c, // turquoise
0xfff1c40f, // sun flower
};
private static final int FLAG_SCALING = 0x80000000;
public static final String SN_NULL = "null";
public static final int STAT_NULL = 0;
public static final int STAT_HP = 1;
public static final int STAT_HPR = 2;
public static final int STAT_MP = 3;
public static final int STAT_MPR = 4;
public static final int STAT_AD = 5;
//public static final int STAT_BASE_AS = asdf;
public static final int STAT_ASP = 6;
public static final int STAT_AR = 7;
public static final int STAT_MR = 8;
public static final int STAT_MS = 9;
public static final int STAT_RANGE = 10;
public static final int STAT_CRIT = 11;
public static final int STAT_AP = 12;
public static final int STAT_LS = 13;
public static final int STAT_MSP = 14;
public static final int STAT_CDR = 15;
public static final int STAT_ARPEN = 16;
public static final int STAT_NRG = 17;
public static final int STAT_NRGR = 18;
public static final int STAT_GP10 = 19;
public static final int STAT_MRP = 20;
public static final int STAT_CD = 21;
public static final int STAT_DT = 22;
public static final int STAT_APP = 23;
public static final int STAT_SV = 24;
public static final int STAT_MPENP = 25;
public static final int STAT_APENP = 26;
public static final int STAT_DMG_REDUCTION = 27;
public static final int STAT_CC_RED = 28;
public static final int STAT_AA_TRUE_DAMAGE = 29;
public static final int STAT_AA_MAGIC_DAMAGE = 30;
public static final int STAT_MAGIC_DMG_REDUCTION = 31;
public static final int STAT_MAGIC_HP = 32;
public static final int STAT_INVULNERABILITY = 33;
public static final int STAT_SPELL_BLOCK = 34;
public static final int STAT_CC_IMMUNE = 35;
public static final int STAT_INVULNERABILITY_ALL_BUT_ONE = 36;
public static final int STAT_AOE_DPS_MAGIC = 37;
public static final int STAT_PERCENT_HP_MISSING = 38;
public static final int STAT_TOTAL_AR = 40;
public static final int STAT_TOTAL_AD = 41;
public static final int STAT_TOTAL_HP = 42;
public static final int STAT_CD_MOD = 43;
public static final int STAT_TOTAL_AP = 44;
public static final int STAT_TOTAL_MS = 45;
public static final int STAT_TOTAL_MR = 46;
public static final int STAT_AS = 47;
public static final int STAT_LEVEL = 48;
public static final int STAT_TOTAL_RANGE = 49;
public static final int STAT_TOTAL_MP = 50;
public static final int STAT_BONUS_AD = 60;
public static final int STAT_BONUS_HP = 61;
public static final int STAT_BONUS_MS = 62;
public static final int STAT_BONUS_AP = 44; // note that cause base AP is always 0, bonusAp always = totalAp
public static final int STAT_BONUS_AR = 63;
public static final int STAT_BONUS_MR = 64;
public static final int STAT_LEVEL_MINUS_ONE = 65;
public static final int STAT_CRIT_DMG = 66;
public static final int STAT_AA_DPS = 70;
public static final int STAT_NAUTILUS_Q_CD = 80;
public static final int STAT_RENGAR_Q_BASE_DAMAGE = 81;
public static final int STAT_VI_W = 82;
public static final int STAT_STACKS = 83; // generic stat... could be used for Ashe/Nasus, etc
public static final int STAT_SOULS = 84;
public static final int STAT_ENEMY_MISSING_HP = 100;
public static final int STAT_ENEMY_CURRENT_HP = 101;
public static final int STAT_ENEMY_MAX_HP = 102;
public static final int STAT_ONE = 120;
public static final int STAT_TYPE_DEFAULT = 0;
public static final int STAT_TYPE_PERCENT = 1;
private static final int MAX_STATS = 121;
private static final int MAX_ACTIVE_ITEMS = 6;
public static final String JSON_KEY_RUNES = "runes";
public static final String JSON_KEY_ITEMS = "items";
public static final String JSON_KEY_BUILD_NAME = "build_name";
public static final String JSON_KEY_COLOR = "color";
private static final Map<String, Integer> statKeyToIndex = new HashMap<String, Integer>();
private static final SparseIntArray statIdToStringId = new SparseIntArray();
private static final SparseIntArray statIdToSkillStatDescStringId = new SparseIntArray();
private static final int COLOR_AP = 0xFF59BD1A;
private static final int COLOR_AD = 0xFFFAA316;
private static final int COLOR_TANK = 0xFF1092E8;
private static final float STAT_VALUE_HP = 2.66f;
private static final float STAT_VALUE_AR = 20f;
private static final float STAT_VALUE_MR = 20f;
private static final float STAT_VALUE_AD = 36f;
private static final float STAT_VALUE_AP = 21.75f;
private static final float STAT_VALUE_CRIT = 50f;
private static final float STAT_VALUE_ASP = 30f;
private static ItemLibrary itemLibrary;
private static RuneLibrary runeLibrary;
private static final double[] RENGAR_Q_BASE = new double[] {
30,
45,
60,
75,
90,
105,
120,
135,
150,
160,
170,
180,
190,
200,
210,
220,
230,
240
};
static {
statKeyToIndex.put("FlatArmorMod", STAT_AR);
statKeyToIndex.put("FlatAttackSpeedMod", STAT_NULL);
statKeyToIndex.put("FlatBlockMod", STAT_NULL);
statKeyToIndex.put("FlatCritChanceMod", STAT_CRIT);
statKeyToIndex.put("FlatCritDamageMod", STAT_NULL);
statKeyToIndex.put("FlatEXPBonus", STAT_NULL);
statKeyToIndex.put("FlatEnergyPoolMod", STAT_NULL);
statKeyToIndex.put("FlatEnergyRegenMod", STAT_NULL);
statKeyToIndex.put("FlatHPPoolMod", STAT_HP);
statKeyToIndex.put("FlatHPRegenMod", STAT_HPR);
statKeyToIndex.put("FlatMPPoolMod", STAT_MP);
statKeyToIndex.put("FlatMPRegenMod", STAT_MPR);
statKeyToIndex.put("FlatMagicDamageMod", STAT_AP);
statKeyToIndex.put("FlatMovementSpeedMod", STAT_MS);
statKeyToIndex.put("FlatPhysicalDamageMod", STAT_AD);
statKeyToIndex.put("FlatSpellBlockMod", STAT_MR);
statKeyToIndex.put("FlatCoolDownRedMod", STAT_CDR);
statKeyToIndex.put("PercentArmorMod", STAT_NULL);
statKeyToIndex.put("PercentAttackSpeedMod", STAT_ASP);
statKeyToIndex.put("PercentBlockMod", STAT_NULL);
statKeyToIndex.put("PercentCritChanceMod", STAT_NULL);
statKeyToIndex.put("PercentCritDamageMod", STAT_NULL);
statKeyToIndex.put("PercentDodgeMod", STAT_NULL);
statKeyToIndex.put("PercentEXPBonus", STAT_NULL);
statKeyToIndex.put("PercentHPPoolMod", STAT_NULL);
statKeyToIndex.put("PercentHPRegenMod", STAT_NULL);
statKeyToIndex.put("PercentLifeStealMod", STAT_LS);
statKeyToIndex.put("PercentMPPoolMod", STAT_NULL);
statKeyToIndex.put("PercentMPRegenMod", STAT_NULL);
statKeyToIndex.put("PercentMagicDamageMod", STAT_APP);
statKeyToIndex.put("PercentMovementSpeedMod", STAT_MSP);
statKeyToIndex.put("PercentPhysicalDamageMod", STAT_NULL);
statKeyToIndex.put("PercentSpellBlockMod", STAT_NULL);
statKeyToIndex.put("PercentSpellVampMod", STAT_SV);
statKeyToIndex.put("CCRed", STAT_CC_RED);
statKeyToIndex.put("FlatAaTrueDamageMod", STAT_AA_TRUE_DAMAGE);
statKeyToIndex.put("FlatAaMagicDamageMod", STAT_AA_MAGIC_DAMAGE);
statKeyToIndex.put("magic_aoe_dps", STAT_AOE_DPS_MAGIC);
statKeyToIndex.put("perpercenthpmissing", STAT_PERCENT_HP_MISSING);
statKeyToIndex.put("rFlatArmorModPerLevel", STAT_AR | FLAG_SCALING);
statKeyToIndex.put("rFlatArmorPenetrationMod", STAT_ARPEN);
statKeyToIndex.put("rFlatArmorPenetrationModPerLevel", STAT_ARPEN | FLAG_SCALING);
statKeyToIndex.put("rFlatEnergyModPerLevel", STAT_NRG | FLAG_SCALING);
statKeyToIndex.put("rFlatEnergyRegenModPerLevel", STAT_NRGR | FLAG_SCALING);
statKeyToIndex.put("rFlatGoldPer10Mod", STAT_GP10);
statKeyToIndex.put("rFlatHPModPerLevel", STAT_HP | FLAG_SCALING);
statKeyToIndex.put("rFlatHPRegenModPerLevel", STAT_HPR | FLAG_SCALING);
statKeyToIndex.put("rFlatMPModPerLevel", STAT_MP | FLAG_SCALING);
statKeyToIndex.put("rFlatMPRegenModPerLevel", STAT_MPR | FLAG_SCALING);
statKeyToIndex.put("rFlatMagicDamageModPerLevel", STAT_AP | FLAG_SCALING);
statKeyToIndex.put("rFlatMagicPenetrationMod", STAT_MRP);
statKeyToIndex.put("rFlatMagicPenetrationModPerLevel", STAT_MRP | FLAG_SCALING);
statKeyToIndex.put("rFlatPhysicalDamageModPerLevel", STAT_AD | FLAG_SCALING);
statKeyToIndex.put("rFlatSpellBlockModPerLevel", STAT_MR | FLAG_SCALING);
statKeyToIndex.put("rPercentCooldownMod", STAT_CD); // negative val...
statKeyToIndex.put("rPercentCooldownModPerLevel", STAT_CD | FLAG_SCALING);
statKeyToIndex.put("rPercentTimeDeadMod", STAT_DT);
statKeyToIndex.put("rPercentTimeDeadModPerLevel", STAT_DT | FLAG_SCALING);
statKeyToIndex.put("rPercentMagicPenetrationMod", STAT_MPENP);
statKeyToIndex.put("rPercentArmorPenetrationMod", STAT_APENP);
statKeyToIndex.put("damagereduction", STAT_DMG_REDUCTION);
statKeyToIndex.put("magicaldamagereduction", STAT_MAGIC_DMG_REDUCTION);
statKeyToIndex.put("FlatMagicHp", STAT_MAGIC_HP);
statKeyToIndex.put("Invulnerability", STAT_INVULNERABILITY);
statKeyToIndex.put("SpellBlock", STAT_SPELL_BLOCK);
statKeyToIndex.put("CcImmune", STAT_CC_IMMUNE);
statKeyToIndex.put("InvulnerabilityButOne", STAT_INVULNERABILITY_ALL_BUT_ONE);
// keys used for skills...
statKeyToIndex.put("spelldamage", STAT_TOTAL_AP);
statKeyToIndex.put("attackdamage", STAT_TOTAL_AD);
statKeyToIndex.put("bonushealth", STAT_BONUS_HP);
statKeyToIndex.put("armor", STAT_TOTAL_AR);
statKeyToIndex.put("bonusattackdamage", STAT_BONUS_AD);
statKeyToIndex.put("health", STAT_TOTAL_HP);
statKeyToIndex.put("bonusarmor", STAT_BONUS_AR);
statKeyToIndex.put("bonusspellblock", STAT_BONUS_MR);
statKeyToIndex.put("levelMinusOne", STAT_LEVEL_MINUS_ONE);
statKeyToIndex.put("level", STAT_LEVEL);
statKeyToIndex.put("RangeMod", STAT_RANGE);
statKeyToIndex.put("mana", STAT_TOTAL_MP);
statKeyToIndex.put("critdamage", STAT_CRIT_DMG);
statKeyToIndex.put("enemymissinghealth", STAT_ENEMY_MISSING_HP);
statKeyToIndex.put("enemycurrenthealth", STAT_ENEMY_CURRENT_HP);
statKeyToIndex.put("enemymaxhealth", STAT_ENEMY_MAX_HP);
statKeyToIndex.put("movementspeed", STAT_TOTAL_MS);
// special keys...
statKeyToIndex.put("@special.BraumWArmor", STAT_NULL);
statKeyToIndex.put("@special.BraumWMR", STAT_NULL);
statKeyToIndex.put("@cooldownchampion", STAT_CD_MOD);
statKeyToIndex.put("@stacks", STAT_STACKS);
statKeyToIndex.put("@souls", STAT_SOULS);
// heim
statKeyToIndex.put("@dynamic.abilitypower", STAT_AP);
// rengar
statKeyToIndex.put("@dynamic.attackdamage", STAT_RENGAR_Q_BASE_DAMAGE);
statKeyToIndex.put("@special.nautilusq", STAT_NAUTILUS_Q_CD);
// vi
statKeyToIndex.put("@special.viw", STAT_VI_W);
// darius
statKeyToIndex.put("@special.dariusr3", STAT_ONE);
statKeyToIndex.put("null", STAT_NULL);
SparseIntArray a = statIdToStringId;
a.put(STAT_NULL, R.string.stat_desc_null);
a.put(STAT_HP, R.string.stat_desc_hp);
a.put(STAT_HPR, R.string.stat_desc_hpr);
a.put(STAT_MP, R.string.stat_desc_mp);
a.put(STAT_MPR, R.string.stat_desc_mpr);
a.put(STAT_AD, R.string.stat_desc_ad);
a.put(STAT_ASP, R.string.stat_desc_asp);
a.put(STAT_AR, R.string.stat_desc_ar);
a.put(STAT_MR, R.string.stat_desc_mr);
// public static final int STAT_MS = 9;
a.put(STAT_RANGE, R.string.stat_desc_range);
// public static final int STAT_CRIT = 11;
// public static final int STAT_AP = 12;
// public static final int STAT_LS = 13;
// public static final int STAT_MSP = 14;
// public static final int STAT_CDR = 15;
// public static final int STAT_ARPEN = 16;
// public static final int STAT_NRG = 17;
// public static final int STAT_NRGR = 18;
// public static final int STAT_GP10 = 19;
// public static final int STAT_MRP = 20;
// public static final int STAT_CD = 21;
// public static final int STAT_DT = 22;
// public static final int STAT_APP = 23;
// public static final int STAT_SV = 24;
// public static final int STAT_MPENP = 25;
// public static final int STAT_APENP = 26;
a.put(STAT_DMG_REDUCTION, R.string.stat_desc_damage_reduction);
//
// public static final int STAT_TOTAL_AR = 40;
// public static final int STAT_TOTAL_AD = 41;
// public static final int STAT_TOTAL_HP = 42;
// public static final int STAT_CD_MOD = 43;
// public static final int STAT_TOTAL_AP = 44;
// public static final int STAT_TOTAL_MS = 45;
// public static final int STAT_TOTAL_MR = 46;
// public static final int STAT_AS = 47;
// public static final int STAT_LEVEL = 48;
//
// public static final int STAT_BONUS_AD = 50;
// public static final int STAT_BONUS_HP = 51;
// public static final int STAT_BONUS_MS = 52;
// public static final int STAT_BONUS_AP = 44; // note that cause base AP is always 0, bonusAp always = totalAp
// public static final int STAT_BONUS_AR = 53;
// public static final int STAT_BONUS_MR = 54;
//
//
// public static final int STAT_AA_DPS = 60;
SparseIntArray b = statIdToSkillStatDescStringId;
b.put(STAT_NULL, R.string.skill_stat_null);
b.put(STAT_TOTAL_AP, R.string.skill_stat_ap);
b.put(STAT_LEVEL_MINUS_ONE, R.string.skill_stat_level_minus_one);
b.put(STAT_TOTAL_AD, R.string.skill_stat_ad);
b.put(STAT_BONUS_AD, R.string.skill_stat_bonus_ad);
b.put(STAT_CD_MOD, R.string.skill_stat_cd_mod);
b.put(STAT_STACKS, R.string.skill_stat_stacks);
b.put(STAT_ONE, R.string.skill_stat_one);
// public static final int STAT_TOTAL_AR = 40;
// public static final int STAT_TOTAL_AD = 41;
// public static final int STAT_TOTAL_HP = 42;
// public static final int STAT_CD_MOD = 43;
// public static final int STAT_TOTAL_MS = 45;
// public static final int STAT_TOTAL_MR = 46;
// public static final int STAT_AS = 47;
// public static final int STAT_LEVEL = 48;
// public static final int STAT_TOTAL_RANGE = 49;
// public static final int STAT_TOTAL_MP = 50;
//
// public static final int STAT_BONUS_HP = 61;
// public static final int STAT_BONUS_MS = 62;
// public static final int STAT_BONUS_AP = 44; // note that cause base AP is always 0, bonusAp always = totalAp
// public static final int STAT_BONUS_AR = 63;
// public static final int STAT_BONUS_MR = 64;
// public static final int STAT_LEVEL_MINUS_ONE = 65;
// public static final int STAT_CRIT_DMG = 66;
}
private String buildName;
private List<BuildSkill> activeSkills;
private List<BuildRune> runeBuild;
private List<BuildItem> itemBuild;
private ChampionInfo champ;
private int champLevel;
private List<BuildObserver> observers = new ArrayList<BuildObserver>();
private int enabledBuildStart = 0;
private int enabledBuildEnd = 0;
private int currentGroupCounter = 0;
private int[] runeCount = new int[4];
private double[] stats = new double[MAX_STATS];
private double[] statsWithActives = new double[MAX_STATS];
private boolean itemBuildDirty = false;
private Gson gson;
private OnRuneCountChangedListener onRuneCountChangedListener = new OnRuneCountChangedListener() {
@Override
public void onRuneCountChanged(BuildRune rune, int oldCount, int newCount) {
Build.this.onRuneCountChanged(rune, oldCount, newCount);
}
};
public Build() {
itemBuild = new ArrayList<BuildItem>();
runeBuild = new ArrayList<BuildRune>();
activeSkills = new ArrayList<BuildSkill>();
gson = StateManager.getInstance().getGson();
if (itemLibrary == null) {
itemLibrary = LibraryManager.getInstance().getItemLibrary();
}
if (runeLibrary == null) {
runeLibrary = LibraryManager.getInstance().getRuneLibrary();
}
champLevel = 1;
}
public void setBuildName(String name) {
buildName = name;
}
public String getBuildName() {
return buildName;
}
private void clearGroups() {
for (BuildItem item : itemBuild) {
item.group = -1;
item.to = null;
item.depth = 0;
item.from.clear();
}
currentGroupCounter = 0;
}
private void recalculateAllGroups() {
clearGroups();
for (int i = 0; i < itemBuild.size(); i++) {
labelAllIngredients(itemBuild.get(i), i);
}
}
private BuildItem getFreeItemWithId(int id, int index) {
for (int i = index - 1; i >= 0; i--) {
if (itemBuild.get(i).getId() == id && itemBuild.get(i).to == null) {
return itemBuild.get(i);
}
}
return null;
}
private void labelAllIngredients(BuildItem item, int index) {
int curGroup = currentGroupCounter;
boolean grouped = false;
Stack<Integer> from = new Stack<Integer>();
from.addAll(item.info.from);
while (!from.empty()) {
int i = from.pop();
BuildItem ingredient = getFreeItemWithId(i, index);
if (ingredient != null && ingredient.to == null) {
if (ingredient.group != -1) {
curGroup = ingredient.group;
}
ingredient.to = item;
item.from.add(ingredient);
grouped = true;
calculateItemCost(item);
} else {
from.addAll(itemLibrary.getItemInfo(i).from);
}
}
if (grouped) {
increaseIngredientDepth(item);
for (BuildItem i : item.from) {
i.group = curGroup;
}
item.group = curGroup;
if (curGroup == currentGroupCounter) {
currentGroupCounter++;
}
}
}
private void calculateItemCost(BuildItem item) {
int p = item.info.totalGold;
for (BuildItem i : item.from) {
p -= i.info.totalGold;
}
item.costPer = p;
}
private void recalculateItemCosts() {
for (BuildItem item : itemBuild) {
calculateItemCost(item);
}
}
private void increaseIngredientDepth(BuildItem item) {
for (BuildItem i : item.from) {
i.depth++;
increaseIngredientDepth(i);
}
}
public void addItem(ItemInfo item) {
addItem(item, 1, true);
}
public void addItem(ItemInfo item, int count, boolean isAll) {
BuildItem buildItem = null;
BuildItem last = getLastItem();
if (last != null && item == last.info) {
if (item.stacks > last.count) {
last.count += count;
buildItem = last;
}
}
if (isAll == false) {
itemBuildDirty = true;
}
boolean itemNull = buildItem == null;
if (itemNull) {
buildItem = new BuildItem(item);
buildItem.count = Math.min(item.stacks, count);
// check if ingredients of this item is already part of the build...
labelAllIngredients(buildItem, itemBuild.size());
if (itemBuild.size() == enabledBuildEnd) {
enabledBuildEnd++;
}
itemBuild.add(buildItem);
calculateItemCost(buildItem);
}
if (isAll) {
recalculateStats();
if (itemBuildDirty) {
itemBuildDirty = false;
buildItem = null;
}
notifyItemAdded(buildItem, itemNull);
}
}
public void clearItems() {
itemBuild.clear();
normalizeValues();
recalculateItemCosts();
recalculateAllGroups();
recalculateStats();
notifyBuildChanged();
}
public void removeItemAt(int position) {
BuildItem item = itemBuild.get(position);
itemBuild.remove(position);
normalizeValues();
recalculateItemCosts();
recalculateAllGroups();
recalculateStats();
notifyBuildChanged();
}
public int getItemCount() {
return itemBuild.size();
}
private void clearStats(double[] stats) {
for (int i = 0; i < stats.length; i++) {
stats[i] = 0;
}
}
private void recalculateStats() {
calculateStats(stats, enabledBuildStart, enabledBuildEnd, false, champLevel);
}
private void calculateStats(double[] stats, int startItemBuild, int endItemBuild, boolean onlyDoRawCalculation, int champLevel) {
clearStats(stats);
int active = 0;
for (BuildRune r : runeBuild) {
appendStat(stats, r);
}
if (!onlyDoRawCalculation) {
for (BuildItem item : itemBuild) {
item.active = false;
}
}
HashSet<Integer> alreadyAdded = new HashSet<Integer>();
for (int i = endItemBuild - 1; i >= startItemBuild; i--) {
BuildItem item = itemBuild.get(i);
if (item.to == null || itemBuild.indexOf(item.to) >= enabledBuildEnd) {
if (!onlyDoRawCalculation) {
item.active = true;
}
ItemInfo info = item.info;
appendStat(stats, info.stats);
int id = info.id;
if (info.uniquePassiveStat != null && !alreadyAdded.contains(id)) {
alreadyAdded.add(info.id);
appendStat(stats, info.uniquePassiveStat);
}
active++;
if (active == MAX_ACTIVE_ITEMS)
break;
}
}
calculateTotalStats(stats, champLevel);
if (!onlyDoRawCalculation) {
notifyBuildStatsChanged();
}
}
private void appendStat(double[] stats, JSONObject jsonStats) {
Iterator<?> iter = jsonStats.keys();
while (iter.hasNext()) {
String key = (String) iter.next();
try {
stats[getStatIndex(key)] += jsonStats.getDouble(key);
} catch (JSONException e) {
DebugLog.e(TAG, e);
}
}
}
private void appendStat(double[] stats, BuildRune rune) {
RuneInfo info = rune.info;
Iterator<?> iter = info.stats.keys();
while (iter.hasNext()) {
String key = (String) iter.next();
try {
int f = getStatIndex(key);
if ((f & FLAG_SCALING) != 0) {
stats[f & ~FLAG_SCALING] += info.stats.getDouble(key) * champLevel * rune.count;
} else {
stats[f] += info.stats.getDouble(key) * rune.count;
}
} catch (JSONException e) {
DebugLog.e(TAG, e);
}
}
}
private void calculateTotalStats() {
calculateTotalStats(stats, champLevel);
}
private void calculateTotalStats(double[] stats, int champLevel) {
// do some stat normalization...
stats[STAT_CDR] = Math.min(MAX_CDR, stats[STAT_CDR] - stats[STAT_CD]);
int levMinusOne = champLevel - 1;
stats[STAT_TOTAL_AR] = stats[STAT_AR] + champ.ar + champ.arG * levMinusOne;
stats[STAT_TOTAL_AD] = stats[STAT_AD] + champ.ad + champ.adG * levMinusOne;
stats[STAT_TOTAL_HP] = stats[STAT_HP] + champ.hp + champ.hpG * levMinusOne;
stats[STAT_CD_MOD] = 1.0 - stats[STAT_CDR];
stats[STAT_TOTAL_MS] = (stats[STAT_MS] + champ.ms) * stats[STAT_MSP] + stats[STAT_MS] + champ.ms;
stats[STAT_TOTAL_AP] = stats[STAT_AP] * (stats[STAT_APP] + 1);
stats[STAT_TOTAL_MR] = stats[STAT_MR] + champ.mr + champ.mrG * levMinusOne;
stats[STAT_AS] = Math.min(champ.as * (1 + levMinusOne * champ.asG + stats[STAT_ASP]), MAX_ATTACK_SPEED);
stats[STAT_LEVEL] = champLevel;
stats[STAT_TOTAL_RANGE] = stats[STAT_RANGE] + champ.range;
stats[STAT_TOTAL_MP] = stats[STAT_MP] + champ.mp + champ.mpG * levMinusOne;
stats[STAT_BONUS_AD] = stats[STAT_TOTAL_AD] - champ.ad;
stats[STAT_BONUS_HP] = stats[STAT_TOTAL_HP] - champ.hp;
stats[STAT_BONUS_MS] = stats[STAT_TOTAL_MS] - champ.ms;
stats[STAT_BONUS_AR] = stats[STAT_TOTAL_AR] - champ.ar;
stats[STAT_BONUS_MR] = stats[STAT_TOTAL_MR] - champ.mr;
stats[STAT_LEVEL_MINUS_ONE] = stats[STAT_LEVEL] - 1;
stats[STAT_CRIT_DMG] = stats[STAT_TOTAL_AD] * 2.0;
// pure stats...
stats[STAT_AA_DPS] = stats[STAT_TOTAL_AD] * stats[STAT_AS];
// static values...
stats[STAT_NAUTILUS_Q_CD] = 0.5;
stats[STAT_ONE] = 1;
}
private static int addColor(int base, int value) {
double result = 1 - (1 - base / 256.0) * (1 - value / 256.0);
return (int) (result * 256);
}
public int generateColorBasedOnBuild() {
int r = 0, g = 0, b = 0;
int hp = 0;
int mr = 0;
int ar = 0;
int ad = 0;
int ap = 0;
int crit = 0;
int as = 0;
calculateTotalStats(stats, 1);
hp = (int) (stats[STAT_BONUS_HP] * STAT_VALUE_HP);
mr = (int) (stats[STAT_BONUS_MR] * STAT_VALUE_MR);
ar = (int) (stats[STAT_BONUS_AR] * STAT_VALUE_AR);
ad = (int) (stats[STAT_BONUS_AD] * STAT_VALUE_AD);
ap = (int) (stats[STAT_BONUS_AP] * STAT_VALUE_AP);
crit = (int) (stats[STAT_CRIT] * 100 * STAT_VALUE_CRIT);
as = (int) (stats[STAT_ASP] * 100 * STAT_VALUE_ASP);
int tank = hp + mr + ar;
int dps = ad + as + crit;
int burst = ap;
double total = tank + dps + burst;
double tankness = tank / total;
double adness = dps / total;
double apness = burst / total;
r = addColor((int) (Color.red(COLOR_AD) * adness), r);
r = addColor((int) (Color.red(COLOR_AP) * apness), r);
r = addColor((int) (Color.red(COLOR_TANK) * tankness), r);
g = addColor((int) (Color.green(COLOR_AD) * adness), g);
g = addColor((int) (Color.green(COLOR_AP) * apness), g);
g = addColor((int) (Color.green(COLOR_TANK) * tankness), g);
b = addColor((int) (Color.blue(COLOR_AD) * adness), b);
b = addColor((int) (Color.blue(COLOR_AP) * apness), b);
b = addColor((int) (Color.blue(COLOR_TANK) * tankness), b);
Log.d(TAG, String.format("Tankiness: %f Apness: %f Adness: %f", tankness, apness, adness));
return Color.rgb(r, g, b);
}
public BuildRune addRune(RuneInfo rune) {
return addRune(rune, 1, true);
}
public BuildRune addRune(RuneInfo rune, int count, boolean isAll) {
// Check if this rune is already in the build...
BuildRune r = null;
for (BuildRune br : runeBuild) {
if (br.id == rune.id) {
r = br;
break;
}
}
if (r == null) {
r = new BuildRune(rune, rune.id);
runeBuild.add(r);
r.listener = onRuneCountChangedListener;
notifyRuneAdded(r);
}
r.addRune(count);
recalculateStats();
return r;
}
public void clearRunes() {
for (BuildRune r : runeBuild) {
r.listener = null;
notifyRuneRemoved(r);
}
runeBuild.clear();
recalculateStats();
}
public boolean canAdd(RuneInfo rune) {
return runeCount[rune.runeType] + 1 <= RUNE_COUNT_MAX[rune.runeType];
}
public void removeRune(BuildRune rune) {
rune.listener = null;
runeBuild.remove(rune);
recalculateStats();
notifyRuneRemoved(rune);
}
private void onRuneCountChanged(BuildRune rune, int oldCount, int newCount) {
int runeType = rune.info.runeType;
if (runeCount[runeType] + (newCount - oldCount) > RUNE_COUNT_MAX[runeType]) {
rune.count = oldCount;
return;
}
runeCount[runeType] += (newCount - oldCount);
if (rune.getCount() == 0) {
removeRune(rune);
} else {
recalculateStats();
}
}
public BuildSkill addActiveSkill(Skill skill, double base, double scaling, String scaleType, String bonusType) {
BuildSkill sk = new BuildSkill();
sk.skill = skill;
sk.base = base;
sk.scaleTypeId = getStatIndex(scaleType);
sk.bonusTypeId = getStatIndex(bonusType);
sk.scaling = scaling;
activeSkills.add(sk);
DebugLog.d(TAG, "Skill " + skill.name + " bonus: " + base + "; ");
return sk;
}
public double[] calculateStatWithActives(int gold, int champLevel) {
double[] s = new double[stats.length];
int itemEndIndex = itemBuild.size();
int buildCost = 0;
for (int i = 0; i < itemBuild.size(); i++) {
BuildItem item = itemBuild.get(i);
int itemCost = item.costPer * item.count;
if (buildCost + itemCost > gold) {
itemEndIndex = i;
break;
} else {
buildCost += itemCost;
}
}
calculateStats(s, 0, itemEndIndex, true, champLevel);
for (BuildSkill sk : activeSkills) {
sk.totalBonus = s[sk.scaleTypeId] * sk.scaling + sk.base;
s[sk.bonusTypeId] += sk.totalBonus;
}
calculateTotalStats(s, champLevel);
return s;
}
public List<BuildSkill> getActives() {
return activeSkills;
}
public void clearActiveSkills() {
activeSkills.clear();
}
public void setChampion(ChampionInfo champ) {
this.champ = champ;
recalculateStats();
}
public void setChampionLevel(int level) {
champLevel = level;
recalculateStats();
}
public void registerObserver(BuildObserver observer) {
observers.add(observer);
}
public void unregisterObserver(BuildObserver observer) {
observers.remove(observer);
}
private void notifyBuildChanged() {
for (BuildObserver o : observers) {
o.onBuildChanged(this);
}
}
private void notifyItemAdded(BuildItem item, boolean isNewItem) {
for (BuildObserver o : observers) {
o.onItemAdded(this, item, isNewItem);
}
}
private void notifyRuneAdded(BuildRune rune) {
for (BuildObserver o : observers) {
o.onRuneAdded(this, rune);
}
}
private void notifyRuneRemoved(BuildRune rune) {
for (BuildObserver o : observers) {
o.onRuneRemoved(this, rune);
}
}
private void notifyBuildStatsChanged() {
for (BuildObserver o : observers) {
o.onBuildStatsChanged();
}
}
private void normalizeValues() {
if (enabledBuildStart < 0) {
enabledBuildStart = 0;
}
if (enabledBuildEnd > itemBuild.size()) {
enabledBuildEnd = itemBuild.size();
}
}
public BuildItem getItem(int index) {
return itemBuild.get(index);
}
public int getBuildSize() {
return itemBuild.size();
}
public BuildRune getRune(int index) {
return runeBuild.get(index);
}
public int getRuneCount() {
return runeBuild.size();
}
public BuildItem getLastItem() {
if (itemBuild.size() == 0) return null;
return itemBuild.get(itemBuild.size() - 1);
}
public double getBonusHp() {
return stats[STAT_HP];
}
public double getBonusHpRegen() {
return stats[STAT_HPR];
}
public double getBonusMp() {
if (champ.partype == ChampionInfo.TYPE_MANA) {
return stats[STAT_MP];
} else {
return 0;
}
}
public double getBonusMpRegen() {
if (champ.partype == ChampionInfo.TYPE_MANA) {
return stats[STAT_MPR];
} else {
return 0;
}
}
public double getBonusAd() {
return stats[STAT_AD];
}
public double getBonusAs() {
return stats[STAT_ASP];
}
public double getBonusAr() {
return stats[STAT_AR];
}
public double getBonusMr() {
return stats[STAT_MR];
}
public double getBonusMs() {
return stats[STAT_BONUS_MS];
}
public double getBonusRange() {
return stats[STAT_RANGE];
}
public double getBonusAp() {
return stats[STAT_BONUS_AP];
}
public double getBonusEnergy() {
return stats[STAT_NRG];
}
public double getBonusEnergyRegen() {
return stats[STAT_NRGR];
}
public double[] getRawStats() {
return stats;
}
public double getStat(String key) {
int statId = getStatIndex(key);
if (statId == STAT_NULL) return 0.0;
if (statId == STAT_RENGAR_Q_BASE_DAMAGE) {
// refresh rengar q base damage since it looks like we are going to be using it...
stats[STAT_RENGAR_Q_BASE_DAMAGE] = RENGAR_Q_BASE[champLevel - 1];
}
if (statId == STAT_VI_W) {
stats[STAT_VI_W] = 0.00081632653 * stats[STAT_BONUS_AD];
}
return stats[statId];
}
public double getStat(int statId) {
if (statId == STAT_NULL) return 0.0;
return stats[statId];
}
public void reorder(int itemOldPosition, int itemNewPosition) {
BuildItem item = itemBuild.get(itemOldPosition);
itemBuild.remove(itemOldPosition);
itemBuild.add(itemNewPosition, item);
recalculateAllGroups();
recalculateStats();
notifyBuildStatsChanged();
}
public int getEnabledBuildStart() {
return enabledBuildStart;
}
public int getEnabledBuildEnd() {
return enabledBuildEnd;
}
public void setEnabledBuildStart(int start) {
enabledBuildStart = start;
recalculateStats();
notifyBuildStatsChanged();
}
public void setEnabledBuildEnd(int end) {
enabledBuildEnd = end;
recalculateStats();
notifyBuildStatsChanged();
}
public BuildSaveObject toSaveObject() {
BuildSaveObject o = new BuildSaveObject();
for (BuildRune r : runeBuild) {
o.runes.add(r.info.id);
o.runes.add(r.count);
}
for (BuildItem i : itemBuild) {
o.items.add(i.info.id);
o.items.add(i.count);
}
o.buildName = buildName;
o.buildColor = generateColorBasedOnBuild();
return o;
}
public void fromSaveObject(BuildSaveObject o) {
clearItems();
clearRunes();
int count = o.runes.size();
for (int i = 0; i < count; i += 2) {
addRune(runeLibrary.getRuneInfo(o.runes.get(i)), o.runes.get(i++), i + 2 >= count);
}
count = o.items.size();
for (int i = 0; i < count; i += 2) {
int itemId = o.items.get(i);
int c = o.items.get(i + 1);
addItem(itemLibrary.getItemInfo(itemId), c, i == count - 2);
}
buildName = o.buildName;
}
public static int getSuggestedColorForGroup(int groupId) {
return GROUP_COLOR[groupId % GROUP_COLOR.length];
}
public static interface BuildObserver {
public void onBuildChanged(Build build);
public void onItemAdded(Build build, BuildItem item, boolean isNewItem);
public void onRuneAdded(Build build, BuildRune rune);
public void onRuneRemoved(Build build, BuildRune rune);
public void onBuildStatsChanged();
}
public static class BuildItem {
ItemInfo info;
int group = -1;
boolean active = true;
int count = 1;
int costPer = 0;
int depth = 0;
List<BuildItem> from;
BuildItem to;
private BuildItem(ItemInfo info) {
this.info = info;
from = new ArrayList<BuildItem>();
}
public int getId() {
return info.id;
}
}
public static class BuildRune {
RuneInfo info;
Object tag;
int id;
private int count;
private OnRuneCountChangedListener listener;
private OnRuneCountChangedListener onRuneCountChangedListener;
private BuildRune(RuneInfo info, int id) {
this.info = info;
count = 0;
this.id = id;
}
public void addRune() {
addRune(1);
}
public void addRune(int n) {
count += n;
int c = count;
listener.onRuneCountChanged(this, count - n, count);
if (c == count && onRuneCountChangedListener != null) {
onRuneCountChangedListener.onRuneCountChanged(this, count - n, count);
}
}
public void removeRune() {
if (count == 0) return;
count--;
int c = count;
listener.onRuneCountChanged(this, count + 1, count);
if (c == count && onRuneCountChangedListener != null) {
onRuneCountChangedListener.onRuneCountChanged(this, count + 1, count);
}
}
public int getCount() {
return count;
}
public void setOnRuneCountChangedListener(OnRuneCountChangedListener listener) {
onRuneCountChangedListener = listener;
}
}
public static class BuildSkill {
public double totalBonus;
Skill skill;
double base;
double scaling;
int scaleTypeId;
int bonusTypeId;
}
public static interface OnRuneCountChangedListener {
public void onRuneCountChanged(BuildRune rune, int oldCount, int newCount);
}
public static int getStatIndex(String statName) {
Integer i;
i = statKeyToIndex.get(statName);
if (i == null) {
throw new RuntimeException("Stat name not found: " + statName);
}
return i;
}
public static int getStatName(int statId) {
int i;
i = statIdToStringId.get(statId);
if (i == 0) {
throw new RuntimeException("Stat id does not have string resource: " + statId);
}
return i;
}
public static int getSkillStatDesc(int statId) {
int i;
i = statIdToSkillStatDescStringId.get(statId);
if (i == 0) {
throw new RuntimeException("Stat id does not have a skill stat description: " + statId);
}
return i;
}
public static int getStatType(int statId) {
switch (statId) {
case STAT_DMG_REDUCTION:
return STAT_TYPE_PERCENT;
default:
return STAT_TYPE_DEFAULT;
}
}
public static int getScalingType(int statId) {
switch (statId) {
case STAT_CD_MOD:
case STAT_STACKS:
case STAT_ONE:
return STAT_TYPE_DEFAULT;
default:
return STAT_TYPE_PERCENT;
}
}
}
| app/src/main/java/com/ggstudios/lolcraft/Build.java | package com.ggstudios.lolcraft;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Stack;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import android.graphics.Color;
import android.util.Log;
import android.util.SparseIntArray;
import com.ggstudios.lolcraft.ChampionInfo.Skill;
import com.ggstudios.utils.DebugLog;
import com.google.gson.Gson;
/**
* Class that holds information about a build, such as build order, stats and cost.
*/
public class Build {
private static final String TAG = "Build";
public static final int RUNE_TYPE_RED = 0;
public static final int RUNE_TYPE_BLUE = 1;
public static final int RUNE_TYPE_YELLOW = 2;
public static final int RUNE_TYPE_BLACK = 3;
public static final double MAX_ATTACK_SPEED = 2.5;
public static final double MAX_CDR = 0.4;
private static final int[] RUNE_COUNT_MAX = new int[] {
9, 9, 9, 3
};
private static final int[] GROUP_COLOR = new int[] {
0xff2ecc71, // emerald
//0xffe74c3c, // alizarin
0xff3498db, // peter river
0xff9b59b6, // amethyst
0xffe67e22, // carrot
0xff34495e, // wet asphalt
0xff1abc9c, // turquoise
0xfff1c40f, // sun flower
};
private static final int FLAG_SCALING = 0x80000000;
public static final String SN_NULL = "null";
public static final int STAT_NULL = 0;
public static final int STAT_HP = 1;
public static final int STAT_HPR = 2;
public static final int STAT_MP = 3;
public static final int STAT_MPR = 4;
public static final int STAT_AD = 5;
//public static final int STAT_BASE_AS = asdf;
public static final int STAT_ASP = 6;
public static final int STAT_AR = 7;
public static final int STAT_MR = 8;
public static final int STAT_MS = 9;
public static final int STAT_RANGE = 10;
public static final int STAT_CRIT = 11;
public static final int STAT_AP = 12;
public static final int STAT_LS = 13;
public static final int STAT_MSP = 14;
public static final int STAT_CDR = 15;
public static final int STAT_ARPEN = 16;
public static final int STAT_NRG = 17;
public static final int STAT_NRGR = 18;
public static final int STAT_GP10 = 19;
public static final int STAT_MRP = 20;
public static final int STAT_CD = 21;
public static final int STAT_DT = 22;
public static final int STAT_APP = 23;
public static final int STAT_SV = 24;
public static final int STAT_MPENP = 25;
public static final int STAT_APENP = 26;
public static final int STAT_DMG_REDUCTION = 27;
public static final int STAT_CC_RED = 28;
public static final int STAT_AA_TRUE_DAMAGE = 29;
public static final int STAT_AA_MAGIC_DAMAGE = 30;
public static final int STAT_MAGIC_DMG_REDUCTION = 31;
public static final int STAT_MAGIC_HP = 32;
public static final int STAT_INVULNERABILITY = 33;
public static final int STAT_SPELL_BLOCK = 34;
public static final int STAT_CC_IMMUNE = 35;
public static final int STAT_INVULNERABILITY_ALL_BUT_ONE = 36;
public static final int STAT_AOE_DPS_MAGIC = 37;
public static final int STAT_PERCENT_HP_MISSING = 38;
public static final int STAT_TOTAL_AR = 40;
public static final int STAT_TOTAL_AD = 41;
public static final int STAT_TOTAL_HP = 42;
public static final int STAT_CD_MOD = 43;
public static final int STAT_TOTAL_AP = 44;
public static final int STAT_TOTAL_MS = 45;
public static final int STAT_TOTAL_MR = 46;
public static final int STAT_AS = 47;
public static final int STAT_LEVEL = 48;
public static final int STAT_TOTAL_RANGE = 49;
public static final int STAT_TOTAL_MP = 50;
public static final int STAT_BONUS_AD = 60;
public static final int STAT_BONUS_HP = 61;
public static final int STAT_BONUS_MS = 62;
public static final int STAT_BONUS_AP = 44; // note that cause base AP is always 0, bonusAp always = totalAp
public static final int STAT_BONUS_AR = 63;
public static final int STAT_BONUS_MR = 64;
public static final int STAT_LEVEL_MINUS_ONE = 65;
public static final int STAT_CRIT_DMG = 66;
public static final int STAT_AA_DPS = 70;
public static final int STAT_NAUTILUS_Q_CD = 80;
public static final int STAT_RENGAR_Q_BASE_DAMAGE = 81;
public static final int STAT_VI_W = 82;
public static final int STAT_STACKS = 83; // generic stat... could be used for Ashe/Nasus, etc
public static final int STAT_ENEMY_MISSING_HP = 100;
public static final int STAT_ENEMY_CURRENT_HP = 101;
public static final int STAT_ENEMY_MAX_HP = 102;
public static final int STAT_ONE = 120;
public static final int STAT_TYPE_DEFAULT = 0;
public static final int STAT_TYPE_PERCENT = 1;
private static final int MAX_STATS = 121;
private static final int MAX_ACTIVE_ITEMS = 6;
public static final String JSON_KEY_RUNES = "runes";
public static final String JSON_KEY_ITEMS = "items";
public static final String JSON_KEY_BUILD_NAME = "build_name";
public static final String JSON_KEY_COLOR = "color";
private static final Map<String, Integer> statKeyToIndex = new HashMap<String, Integer>();
private static final SparseIntArray statIdToStringId = new SparseIntArray();
private static final SparseIntArray statIdToSkillStatDescStringId = new SparseIntArray();
private static final int COLOR_AP = 0xFF59BD1A;
private static final int COLOR_AD = 0xFFFAA316;
private static final int COLOR_TANK = 0xFF1092E8;
private static final float STAT_VALUE_HP = 2.66f;
private static final float STAT_VALUE_AR = 20f;
private static final float STAT_VALUE_MR = 20f;
private static final float STAT_VALUE_AD = 36f;
private static final float STAT_VALUE_AP = 21.75f;
private static final float STAT_VALUE_CRIT = 50f;
private static final float STAT_VALUE_ASP = 30f;
private static ItemLibrary itemLibrary;
private static RuneLibrary runeLibrary;
private static final double[] RENGAR_Q_BASE = new double[] {
30,
45,
60,
75,
90,
105,
120,
135,
150,
160,
170,
180,
190,
200,
210,
220,
230,
240
};
static {
statKeyToIndex.put("FlatArmorMod", STAT_AR);
statKeyToIndex.put("FlatAttackSpeedMod", STAT_NULL);
statKeyToIndex.put("FlatBlockMod", STAT_NULL);
statKeyToIndex.put("FlatCritChanceMod", STAT_CRIT);
statKeyToIndex.put("FlatCritDamageMod", STAT_NULL);
statKeyToIndex.put("FlatEXPBonus", STAT_NULL);
statKeyToIndex.put("FlatEnergyPoolMod", STAT_NULL);
statKeyToIndex.put("FlatEnergyRegenMod", STAT_NULL);
statKeyToIndex.put("FlatHPPoolMod", STAT_HP);
statKeyToIndex.put("FlatHPRegenMod", STAT_HPR);
statKeyToIndex.put("FlatMPPoolMod", STAT_MP);
statKeyToIndex.put("FlatMPRegenMod", STAT_MPR);
statKeyToIndex.put("FlatMagicDamageMod", STAT_AP);
statKeyToIndex.put("FlatMovementSpeedMod", STAT_MS);
statKeyToIndex.put("FlatPhysicalDamageMod", STAT_AD);
statKeyToIndex.put("FlatSpellBlockMod", STAT_MR);
statKeyToIndex.put("FlatCoolDownRedMod", STAT_CDR);
statKeyToIndex.put("PercentArmorMod", STAT_NULL);
statKeyToIndex.put("PercentAttackSpeedMod", STAT_ASP);
statKeyToIndex.put("PercentBlockMod", STAT_NULL);
statKeyToIndex.put("PercentCritChanceMod", STAT_NULL);
statKeyToIndex.put("PercentCritDamageMod", STAT_NULL);
statKeyToIndex.put("PercentDodgeMod", STAT_NULL);
statKeyToIndex.put("PercentEXPBonus", STAT_NULL);
statKeyToIndex.put("PercentHPPoolMod", STAT_NULL);
statKeyToIndex.put("PercentHPRegenMod", STAT_NULL);
statKeyToIndex.put("PercentLifeStealMod", STAT_LS);
statKeyToIndex.put("PercentMPPoolMod", STAT_NULL);
statKeyToIndex.put("PercentMPRegenMod", STAT_NULL);
statKeyToIndex.put("PercentMagicDamageMod", STAT_APP);
statKeyToIndex.put("PercentMovementSpeedMod", STAT_MSP);
statKeyToIndex.put("PercentPhysicalDamageMod", STAT_NULL);
statKeyToIndex.put("PercentSpellBlockMod", STAT_NULL);
statKeyToIndex.put("PercentSpellVampMod", STAT_SV);
statKeyToIndex.put("CCRed", STAT_CC_RED);
statKeyToIndex.put("FlatAaTrueDamageMod", STAT_AA_TRUE_DAMAGE);
statKeyToIndex.put("FlatAaMagicDamageMod", STAT_AA_MAGIC_DAMAGE);
statKeyToIndex.put("magic_aoe_dps", STAT_AOE_DPS_MAGIC);
statKeyToIndex.put("perpercenthpmissing", STAT_PERCENT_HP_MISSING);
statKeyToIndex.put("rFlatArmorModPerLevel", STAT_AR | FLAG_SCALING);
statKeyToIndex.put("rFlatArmorPenetrationMod", STAT_ARPEN);
statKeyToIndex.put("rFlatArmorPenetrationModPerLevel", STAT_ARPEN | FLAG_SCALING);
statKeyToIndex.put("rFlatEnergyModPerLevel", STAT_NRG | FLAG_SCALING);
statKeyToIndex.put("rFlatEnergyRegenModPerLevel", STAT_NRGR | FLAG_SCALING);
statKeyToIndex.put("rFlatGoldPer10Mod", STAT_GP10);
statKeyToIndex.put("rFlatHPModPerLevel", STAT_HP | FLAG_SCALING);
statKeyToIndex.put("rFlatHPRegenModPerLevel", STAT_HPR | FLAG_SCALING);
statKeyToIndex.put("rFlatMPModPerLevel", STAT_MP | FLAG_SCALING);
statKeyToIndex.put("rFlatMPRegenModPerLevel", STAT_MPR | FLAG_SCALING);
statKeyToIndex.put("rFlatMagicDamageModPerLevel", STAT_AP | FLAG_SCALING);
statKeyToIndex.put("rFlatMagicPenetrationMod", STAT_MRP);
statKeyToIndex.put("rFlatMagicPenetrationModPerLevel", STAT_MRP | FLAG_SCALING);
statKeyToIndex.put("rFlatPhysicalDamageModPerLevel", STAT_AD | FLAG_SCALING);
statKeyToIndex.put("rFlatSpellBlockModPerLevel", STAT_MR | FLAG_SCALING);
statKeyToIndex.put("rPercentCooldownMod", STAT_CD); // negative val...
statKeyToIndex.put("rPercentCooldownModPerLevel", STAT_CD | FLAG_SCALING);
statKeyToIndex.put("rPercentTimeDeadMod", STAT_DT);
statKeyToIndex.put("rPercentTimeDeadModPerLevel", STAT_DT | FLAG_SCALING);
statKeyToIndex.put("rPercentMagicPenetrationMod", STAT_MPENP);
statKeyToIndex.put("rPercentArmorPenetrationMod", STAT_APENP);
statKeyToIndex.put("damagereduction", STAT_DMG_REDUCTION);
statKeyToIndex.put("magicaldamagereduction", STAT_MAGIC_DMG_REDUCTION);
statKeyToIndex.put("FlatMagicHp", STAT_MAGIC_HP);
statKeyToIndex.put("Invulnerability", STAT_INVULNERABILITY);
statKeyToIndex.put("SpellBlock", STAT_SPELL_BLOCK);
statKeyToIndex.put("CcImmune", STAT_CC_IMMUNE);
statKeyToIndex.put("InvulnerabilityButOne", STAT_INVULNERABILITY_ALL_BUT_ONE);
// keys used for skills...
statKeyToIndex.put("spelldamage", STAT_TOTAL_AP);
statKeyToIndex.put("attackdamage", STAT_TOTAL_AD);
statKeyToIndex.put("bonushealth", STAT_BONUS_HP);
statKeyToIndex.put("armor", STAT_TOTAL_AR);
statKeyToIndex.put("bonusattackdamage", STAT_BONUS_AD);
statKeyToIndex.put("health", STAT_TOTAL_HP);
statKeyToIndex.put("bonusarmor", STAT_BONUS_AR);
statKeyToIndex.put("bonusspellblock", STAT_BONUS_MR);
statKeyToIndex.put("levelMinusOne", STAT_LEVEL_MINUS_ONE);
statKeyToIndex.put("level", STAT_LEVEL);
statKeyToIndex.put("RangeMod", STAT_RANGE);
statKeyToIndex.put("mana", STAT_TOTAL_MP);
statKeyToIndex.put("critdamage", STAT_CRIT_DMG);
statKeyToIndex.put("enemymissinghealth", STAT_ENEMY_MISSING_HP);
statKeyToIndex.put("enemycurrenthealth", STAT_ENEMY_CURRENT_HP);
statKeyToIndex.put("enemymaxhealth", STAT_ENEMY_MAX_HP);
statKeyToIndex.put("movementspeed", STAT_TOTAL_MS);
// special keys...
statKeyToIndex.put("@special.BraumWArmor", STAT_NULL);
statKeyToIndex.put("@special.BraumWMR", STAT_NULL);
statKeyToIndex.put("@cooldownchampion", STAT_CD_MOD);
statKeyToIndex.put("@stacks", STAT_STACKS);
// heim
statKeyToIndex.put("@dynamic.abilitypower", STAT_AP);
// rengar
statKeyToIndex.put("@dynamic.attackdamage", STAT_RENGAR_Q_BASE_DAMAGE);
statKeyToIndex.put("@special.nautilusq", STAT_NAUTILUS_Q_CD);
// vi
statKeyToIndex.put("@special.viw", STAT_VI_W);
// darius
statKeyToIndex.put("@special.dariusr3", STAT_ONE);
statKeyToIndex.put("null", STAT_NULL);
SparseIntArray a = statIdToStringId;
a.put(STAT_NULL, R.string.stat_desc_null);
a.put(STAT_HP, R.string.stat_desc_hp);
a.put(STAT_HPR, R.string.stat_desc_hpr);
a.put(STAT_MP, R.string.stat_desc_mp);
a.put(STAT_MPR, R.string.stat_desc_mpr);
a.put(STAT_AD, R.string.stat_desc_ad);
a.put(STAT_ASP, R.string.stat_desc_asp);
a.put(STAT_AR, R.string.stat_desc_ar);
a.put(STAT_MR, R.string.stat_desc_mr);
// public static final int STAT_MS = 9;
a.put(STAT_RANGE, R.string.stat_desc_range);
// public static final int STAT_CRIT = 11;
// public static final int STAT_AP = 12;
// public static final int STAT_LS = 13;
// public static final int STAT_MSP = 14;
// public static final int STAT_CDR = 15;
// public static final int STAT_ARPEN = 16;
// public static final int STAT_NRG = 17;
// public static final int STAT_NRGR = 18;
// public static final int STAT_GP10 = 19;
// public static final int STAT_MRP = 20;
// public static final int STAT_CD = 21;
// public static final int STAT_DT = 22;
// public static final int STAT_APP = 23;
// public static final int STAT_SV = 24;
// public static final int STAT_MPENP = 25;
// public static final int STAT_APENP = 26;
a.put(STAT_DMG_REDUCTION, R.string.stat_desc_damage_reduction);
//
// public static final int STAT_TOTAL_AR = 40;
// public static final int STAT_TOTAL_AD = 41;
// public static final int STAT_TOTAL_HP = 42;
// public static final int STAT_CD_MOD = 43;
// public static final int STAT_TOTAL_AP = 44;
// public static final int STAT_TOTAL_MS = 45;
// public static final int STAT_TOTAL_MR = 46;
// public static final int STAT_AS = 47;
// public static final int STAT_LEVEL = 48;
//
// public static final int STAT_BONUS_AD = 50;
// public static final int STAT_BONUS_HP = 51;
// public static final int STAT_BONUS_MS = 52;
// public static final int STAT_BONUS_AP = 44; // note that cause base AP is always 0, bonusAp always = totalAp
// public static final int STAT_BONUS_AR = 53;
// public static final int STAT_BONUS_MR = 54;
//
//
// public static final int STAT_AA_DPS = 60;
SparseIntArray b = statIdToSkillStatDescStringId;
b.put(STAT_NULL, R.string.skill_stat_null);
b.put(STAT_TOTAL_AP, R.string.skill_stat_ap);
b.put(STAT_LEVEL_MINUS_ONE, R.string.skill_stat_level_minus_one);
b.put(STAT_TOTAL_AD, R.string.skill_stat_ad);
b.put(STAT_BONUS_AD, R.string.skill_stat_bonus_ad);
b.put(STAT_CD_MOD, R.string.skill_stat_cd_mod);
b.put(STAT_STACKS, R.string.skill_stat_stacks);
b.put(STAT_ONE, R.string.skill_stat_one);
// public static final int STAT_TOTAL_AR = 40;
// public static final int STAT_TOTAL_AD = 41;
// public static final int STAT_TOTAL_HP = 42;
// public static final int STAT_CD_MOD = 43;
// public static final int STAT_TOTAL_MS = 45;
// public static final int STAT_TOTAL_MR = 46;
// public static final int STAT_AS = 47;
// public static final int STAT_LEVEL = 48;
// public static final int STAT_TOTAL_RANGE = 49;
// public static final int STAT_TOTAL_MP = 50;
//
// public static final int STAT_BONUS_HP = 61;
// public static final int STAT_BONUS_MS = 62;
// public static final int STAT_BONUS_AP = 44; // note that cause base AP is always 0, bonusAp always = totalAp
// public static final int STAT_BONUS_AR = 63;
// public static final int STAT_BONUS_MR = 64;
// public static final int STAT_LEVEL_MINUS_ONE = 65;
// public static final int STAT_CRIT_DMG = 66;
}
private String buildName;
private List<BuildSkill> activeSkills;
private List<BuildRune> runeBuild;
private List<BuildItem> itemBuild;
private ChampionInfo champ;
private int champLevel;
private List<BuildObserver> observers = new ArrayList<BuildObserver>();
private int enabledBuildStart = 0;
private int enabledBuildEnd = 0;
private int currentGroupCounter = 0;
private int[] runeCount = new int[4];
private double[] stats = new double[MAX_STATS];
private double[] statsWithActives = new double[MAX_STATS];
private boolean itemBuildDirty = false;
private Gson gson;
private OnRuneCountChangedListener onRuneCountChangedListener = new OnRuneCountChangedListener() {
@Override
public void onRuneCountChanged(BuildRune rune, int oldCount, int newCount) {
Build.this.onRuneCountChanged(rune, oldCount, newCount);
}
};
public Build() {
itemBuild = new ArrayList<BuildItem>();
runeBuild = new ArrayList<BuildRune>();
activeSkills = new ArrayList<BuildSkill>();
gson = StateManager.getInstance().getGson();
if (itemLibrary == null) {
itemLibrary = LibraryManager.getInstance().getItemLibrary();
}
if (runeLibrary == null) {
runeLibrary = LibraryManager.getInstance().getRuneLibrary();
}
champLevel = 1;
}
public void setBuildName(String name) {
buildName = name;
}
public String getBuildName() {
return buildName;
}
private void clearGroups() {
for (BuildItem item : itemBuild) {
item.group = -1;
item.to = null;
item.depth = 0;
item.from.clear();
}
currentGroupCounter = 0;
}
private void recalculateAllGroups() {
clearGroups();
for (int i = 0; i < itemBuild.size(); i++) {
labelAllIngredients(itemBuild.get(i), i);
}
}
private BuildItem getFreeItemWithId(int id, int index) {
for (int i = index - 1; i >= 0; i--) {
if (itemBuild.get(i).getId() == id && itemBuild.get(i).to == null) {
return itemBuild.get(i);
}
}
return null;
}
private void labelAllIngredients(BuildItem item, int index) {
int curGroup = currentGroupCounter;
boolean grouped = false;
Stack<Integer> from = new Stack<Integer>();
from.addAll(item.info.from);
while (!from.empty()) {
int i = from.pop();
BuildItem ingredient = getFreeItemWithId(i, index);
if (ingredient != null && ingredient.to == null) {
if (ingredient.group != -1) {
curGroup = ingredient.group;
}
ingredient.to = item;
item.from.add(ingredient);
grouped = true;
calculateItemCost(item);
} else {
from.addAll(itemLibrary.getItemInfo(i).from);
}
}
if (grouped) {
increaseIngredientDepth(item);
for (BuildItem i : item.from) {
i.group = curGroup;
}
item.group = curGroup;
if (curGroup == currentGroupCounter) {
currentGroupCounter++;
}
}
}
private void calculateItemCost(BuildItem item) {
int p = item.info.totalGold;
for (BuildItem i : item.from) {
p -= i.info.totalGold;
}
item.costPer = p;
}
private void recalculateItemCosts() {
for (BuildItem item : itemBuild) {
calculateItemCost(item);
}
}
private void increaseIngredientDepth(BuildItem item) {
for (BuildItem i : item.from) {
i.depth++;
increaseIngredientDepth(i);
}
}
public void addItem(ItemInfo item) {
addItem(item, 1, true);
}
public void addItem(ItemInfo item, int count, boolean isAll) {
BuildItem buildItem = null;
BuildItem last = getLastItem();
if (last != null && item == last.info) {
if (item.stacks > last.count) {
last.count += count;
buildItem = last;
}
}
if (isAll == false) {
itemBuildDirty = true;
}
boolean itemNull = buildItem == null;
if (itemNull) {
buildItem = new BuildItem(item);
buildItem.count = Math.min(item.stacks, count);
// check if ingredients of this item is already part of the build...
labelAllIngredients(buildItem, itemBuild.size());
if (itemBuild.size() == enabledBuildEnd) {
enabledBuildEnd++;
}
itemBuild.add(buildItem);
calculateItemCost(buildItem);
}
if (isAll) {
recalculateStats();
if (itemBuildDirty) {
itemBuildDirty = false;
buildItem = null;
}
notifyItemAdded(buildItem, itemNull);
}
}
public void clearItems() {
itemBuild.clear();
normalizeValues();
recalculateItemCosts();
recalculateAllGroups();
recalculateStats();
notifyBuildChanged();
}
public void removeItemAt(int position) {
BuildItem item = itemBuild.get(position);
itemBuild.remove(position);
normalizeValues();
recalculateItemCosts();
recalculateAllGroups();
recalculateStats();
notifyBuildChanged();
}
public int getItemCount() {
return itemBuild.size();
}
private void clearStats(double[] stats) {
for (int i = 0; i < stats.length; i++) {
stats[i] = 0;
}
}
private void recalculateStats() {
calculateStats(stats, enabledBuildStart, enabledBuildEnd, false, champLevel);
}
private void calculateStats(double[] stats, int startItemBuild, int endItemBuild, boolean onlyDoRawCalculation, int champLevel) {
clearStats(stats);
int active = 0;
for (BuildRune r : runeBuild) {
appendStat(stats, r);
}
if (!onlyDoRawCalculation) {
for (BuildItem item : itemBuild) {
item.active = false;
}
}
HashSet<Integer> alreadyAdded = new HashSet<Integer>();
for (int i = endItemBuild - 1; i >= startItemBuild; i--) {
BuildItem item = itemBuild.get(i);
if (item.to == null || itemBuild.indexOf(item.to) >= enabledBuildEnd) {
if (!onlyDoRawCalculation) {
item.active = true;
}
ItemInfo info = item.info;
appendStat(stats, info.stats);
int id = info.id;
if (info.uniquePassiveStat != null && !alreadyAdded.contains(id)) {
alreadyAdded.add(info.id);
appendStat(stats, info.uniquePassiveStat);
}
active++;
if (active == MAX_ACTIVE_ITEMS)
break;
}
}
calculateTotalStats(stats, champLevel);
if (!onlyDoRawCalculation) {
notifyBuildStatsChanged();
}
}
private void appendStat(double[] stats, JSONObject jsonStats) {
Iterator<?> iter = jsonStats.keys();
while (iter.hasNext()) {
String key = (String) iter.next();
try {
stats[getStatIndex(key)] += jsonStats.getDouble(key);
} catch (JSONException e) {
DebugLog.e(TAG, e);
}
}
}
private void appendStat(double[] stats, BuildRune rune) {
RuneInfo info = rune.info;
Iterator<?> iter = info.stats.keys();
while (iter.hasNext()) {
String key = (String) iter.next();
try {
int f = getStatIndex(key);
if ((f & FLAG_SCALING) != 0) {
stats[f & ~FLAG_SCALING] += info.stats.getDouble(key) * champLevel * rune.count;
} else {
stats[f] += info.stats.getDouble(key) * rune.count;
}
} catch (JSONException e) {
DebugLog.e(TAG, e);
}
}
}
private void calculateTotalStats() {
calculateTotalStats(stats, champLevel);
}
private void calculateTotalStats(double[] stats, int champLevel) {
// do some stat normalization...
stats[STAT_CDR] = Math.min(MAX_CDR, stats[STAT_CDR] - stats[STAT_CD]);
int levMinusOne = champLevel - 1;
stats[STAT_TOTAL_AR] = stats[STAT_AR] + champ.ar + champ.arG * levMinusOne;
stats[STAT_TOTAL_AD] = stats[STAT_AD] + champ.ad + champ.adG * levMinusOne;
stats[STAT_TOTAL_HP] = stats[STAT_HP] + champ.hp + champ.hpG * levMinusOne;
stats[STAT_CD_MOD] = 1.0 - stats[STAT_CDR];
stats[STAT_TOTAL_MS] = (stats[STAT_MS] + champ.ms) * stats[STAT_MSP] + stats[STAT_MS] + champ.ms;
stats[STAT_TOTAL_AP] = stats[STAT_AP] * (stats[STAT_APP] + 1);
stats[STAT_TOTAL_MR] = stats[STAT_MR] + champ.mr + champ.mrG * levMinusOne;
stats[STAT_AS] = Math.min(champ.as * (1 + levMinusOne * champ.asG + stats[STAT_ASP]), MAX_ATTACK_SPEED);
stats[STAT_LEVEL] = champLevel;
stats[STAT_TOTAL_RANGE] = stats[STAT_RANGE] + champ.range;
stats[STAT_TOTAL_MP] = stats[STAT_MP] + champ.mp + champ.mpG * levMinusOne;
stats[STAT_BONUS_AD] = stats[STAT_TOTAL_AD] - champ.ad;
stats[STAT_BONUS_HP] = stats[STAT_TOTAL_HP] - champ.hp;
stats[STAT_BONUS_MS] = stats[STAT_TOTAL_MS] - champ.ms;
stats[STAT_BONUS_AR] = stats[STAT_TOTAL_AR] - champ.ar;
stats[STAT_BONUS_MR] = stats[STAT_TOTAL_MR] - champ.mr;
stats[STAT_LEVEL_MINUS_ONE] = stats[STAT_LEVEL] - 1;
stats[STAT_CRIT_DMG] = stats[STAT_TOTAL_AD] * 2.0;
// pure stats...
stats[STAT_AA_DPS] = stats[STAT_TOTAL_AD] * stats[STAT_AS];
// static values...
stats[STAT_NAUTILUS_Q_CD] = 0.5;
stats[STAT_ONE] = 1;
}
private static int addColor(int base, int value) {
double result = 1 - (1 - base / 256.0) * (1 - value / 256.0);
return (int) (result * 256);
}
public int generateColorBasedOnBuild() {
int r = 0, g = 0, b = 0;
int hp = 0;
int mr = 0;
int ar = 0;
int ad = 0;
int ap = 0;
int crit = 0;
int as = 0;
calculateTotalStats(stats, 1);
hp = (int) (stats[STAT_BONUS_HP] * STAT_VALUE_HP);
mr = (int) (stats[STAT_BONUS_MR] * STAT_VALUE_MR);
ar = (int) (stats[STAT_BONUS_AR] * STAT_VALUE_AR);
ad = (int) (stats[STAT_BONUS_AD] * STAT_VALUE_AD);
ap = (int) (stats[STAT_BONUS_AP] * STAT_VALUE_AP);
crit = (int) (stats[STAT_CRIT] * 100 * STAT_VALUE_CRIT);
as = (int) (stats[STAT_ASP] * 100 * STAT_VALUE_ASP);
int tank = hp + mr + ar;
int dps = ad + as + crit;
int burst = ap;
double total = tank + dps + burst;
double tankness = tank / total;
double adness = dps / total;
double apness = burst / total;
r = addColor((int) (Color.red(COLOR_AD) * adness), r);
r = addColor((int) (Color.red(COLOR_AP) * apness), r);
r = addColor((int) (Color.red(COLOR_TANK) * tankness), r);
g = addColor((int) (Color.green(COLOR_AD) * adness), g);
g = addColor((int) (Color.green(COLOR_AP) * apness), g);
g = addColor((int) (Color.green(COLOR_TANK) * tankness), g);
b = addColor((int) (Color.blue(COLOR_AD) * adness), b);
b = addColor((int) (Color.blue(COLOR_AP) * apness), b);
b = addColor((int) (Color.blue(COLOR_TANK) * tankness), b);
Log.d(TAG, String.format("Tankiness: %f Apness: %f Adness: %f", tankness, apness, adness));
return Color.rgb(r, g, b);
}
public BuildRune addRune(RuneInfo rune) {
return addRune(rune, 1, true);
}
public BuildRune addRune(RuneInfo rune, int count, boolean isAll) {
// Check if this rune is already in the build...
BuildRune r = null;
for (BuildRune br : runeBuild) {
if (br.id == rune.id) {
r = br;
break;
}
}
if (r == null) {
r = new BuildRune(rune, rune.id);
runeBuild.add(r);
r.listener = onRuneCountChangedListener;
notifyRuneAdded(r);
}
r.addRune(count);
recalculateStats();
return r;
}
public void clearRunes() {
for (BuildRune r : runeBuild) {
r.listener = null;
notifyRuneRemoved(r);
}
runeBuild.clear();
recalculateStats();
}
public boolean canAdd(RuneInfo rune) {
return runeCount[rune.runeType] + 1 <= RUNE_COUNT_MAX[rune.runeType];
}
public void removeRune(BuildRune rune) {
rune.listener = null;
runeBuild.remove(rune);
recalculateStats();
notifyRuneRemoved(rune);
}
private void onRuneCountChanged(BuildRune rune, int oldCount, int newCount) {
int runeType = rune.info.runeType;
if (runeCount[runeType] + (newCount - oldCount) > RUNE_COUNT_MAX[runeType]) {
rune.count = oldCount;
return;
}
runeCount[runeType] += (newCount - oldCount);
if (rune.getCount() == 0) {
removeRune(rune);
} else {
recalculateStats();
}
}
public BuildSkill addActiveSkill(Skill skill, double base, double scaling, String scaleType, String bonusType) {
BuildSkill sk = new BuildSkill();
sk.skill = skill;
sk.base = base;
sk.scaleTypeId = getStatIndex(scaleType);
sk.bonusTypeId = getStatIndex(bonusType);
sk.scaling = scaling;
activeSkills.add(sk);
DebugLog.d(TAG, "Skill " + skill.name + " bonus: " + base + "; ");
return sk;
}
public double[] calculateStatWithActives(int gold, int champLevel) {
double[] s = new double[stats.length];
int itemEndIndex = itemBuild.size();
int buildCost = 0;
for (int i = 0; i < itemBuild.size(); i++) {
BuildItem item = itemBuild.get(i);
int itemCost = item.costPer * item.count;
if (buildCost + itemCost > gold) {
itemEndIndex = i;
break;
} else {
buildCost += itemCost;
}
}
calculateStats(s, 0, itemEndIndex, true, champLevel);
for (BuildSkill sk : activeSkills) {
sk.totalBonus = s[sk.scaleTypeId] * sk.scaling + sk.base;
s[sk.bonusTypeId] += sk.totalBonus;
}
calculateTotalStats(s, champLevel);
return s;
}
public List<BuildSkill> getActives() {
return activeSkills;
}
public void clearActiveSkills() {
activeSkills.clear();
}
public void setChampion(ChampionInfo champ) {
this.champ = champ;
recalculateStats();
}
public void setChampionLevel(int level) {
champLevel = level;
recalculateStats();
}
public void registerObserver(BuildObserver observer) {
observers.add(observer);
}
public void unregisterObserver(BuildObserver observer) {
observers.remove(observer);
}
private void notifyBuildChanged() {
for (BuildObserver o : observers) {
o.onBuildChanged(this);
}
}
private void notifyItemAdded(BuildItem item, boolean isNewItem) {
for (BuildObserver o : observers) {
o.onItemAdded(this, item, isNewItem);
}
}
private void notifyRuneAdded(BuildRune rune) {
for (BuildObserver o : observers) {
o.onRuneAdded(this, rune);
}
}
private void notifyRuneRemoved(BuildRune rune) {
for (BuildObserver o : observers) {
o.onRuneRemoved(this, rune);
}
}
private void notifyBuildStatsChanged() {
for (BuildObserver o : observers) {
o.onBuildStatsChanged();
}
}
private void normalizeValues() {
if (enabledBuildStart < 0) {
enabledBuildStart = 0;
}
if (enabledBuildEnd > itemBuild.size()) {
enabledBuildEnd = itemBuild.size();
}
}
public BuildItem getItem(int index) {
return itemBuild.get(index);
}
public int getBuildSize() {
return itemBuild.size();
}
public BuildRune getRune(int index) {
return runeBuild.get(index);
}
public int getRuneCount() {
return runeBuild.size();
}
public BuildItem getLastItem() {
if (itemBuild.size() == 0) return null;
return itemBuild.get(itemBuild.size() - 1);
}
public double getBonusHp() {
return stats[STAT_HP];
}
public double getBonusHpRegen() {
return stats[STAT_HPR];
}
public double getBonusMp() {
if (champ.partype == ChampionInfo.TYPE_MANA) {
return stats[STAT_MP];
} else {
return 0;
}
}
public double getBonusMpRegen() {
if (champ.partype == ChampionInfo.TYPE_MANA) {
return stats[STAT_MPR];
} else {
return 0;
}
}
public double getBonusAd() {
return stats[STAT_AD];
}
public double getBonusAs() {
return stats[STAT_ASP];
}
public double getBonusAr() {
return stats[STAT_AR];
}
public double getBonusMr() {
return stats[STAT_MR];
}
public double getBonusMs() {
return stats[STAT_BONUS_MS];
}
public double getBonusRange() {
return stats[STAT_RANGE];
}
public double getBonusAp() {
return stats[STAT_BONUS_AP];
}
public double getBonusEnergy() {
return stats[STAT_NRG];
}
public double getBonusEnergyRegen() {
return stats[STAT_NRGR];
}
public double[] getRawStats() {
return stats;
}
public double getStat(String key) {
int statId = getStatIndex(key);
if (statId == STAT_NULL) return 0.0;
if (statId == STAT_RENGAR_Q_BASE_DAMAGE) {
// refresh rengar q base damage since it looks like we are going to be using it...
stats[STAT_RENGAR_Q_BASE_DAMAGE] = RENGAR_Q_BASE[champLevel - 1];
}
if (statId == STAT_VI_W) {
stats[STAT_VI_W] = 0.00081632653 * stats[STAT_BONUS_AD];
}
return stats[statId];
}
public double getStat(int statId) {
if (statId == STAT_NULL) return 0.0;
return stats[statId];
}
public void reorder(int itemOldPosition, int itemNewPosition) {
BuildItem item = itemBuild.get(itemOldPosition);
itemBuild.remove(itemOldPosition);
itemBuild.add(itemNewPosition, item);
recalculateAllGroups();
recalculateStats();
notifyBuildStatsChanged();
}
public int getEnabledBuildStart() {
return enabledBuildStart;
}
public int getEnabledBuildEnd() {
return enabledBuildEnd;
}
public void setEnabledBuildStart(int start) {
enabledBuildStart = start;
recalculateStats();
notifyBuildStatsChanged();
}
public void setEnabledBuildEnd(int end) {
enabledBuildEnd = end;
recalculateStats();
notifyBuildStatsChanged();
}
public BuildSaveObject toSaveObject() {
BuildSaveObject o = new BuildSaveObject();
for (BuildRune r : runeBuild) {
o.runes.add(r.info.id);
o.runes.add(r.count);
}
for (BuildItem i : itemBuild) {
o.items.add(i.info.id);
o.items.add(i.count);
}
o.buildName = buildName;
o.buildColor = generateColorBasedOnBuild();
return o;
}
public void fromSaveObject(BuildSaveObject o) {
clearItems();
clearRunes();
int count = o.runes.size();
for (int i = 0; i < count; i += 2) {
addRune(runeLibrary.getRuneInfo(o.runes.get(i)), o.runes.get(i++), i + 2 >= count);
}
count = o.items.size();
for (int i = 0; i < count; i += 2) {
int itemId = o.items.get(i);
int c = o.items.get(i + 1);
addItem(itemLibrary.getItemInfo(itemId), c, i == count - 2);
}
buildName = o.buildName;
}
public static int getSuggestedColorForGroup(int groupId) {
return GROUP_COLOR[groupId % GROUP_COLOR.length];
}
public static interface BuildObserver {
public void onBuildChanged(Build build);
public void onItemAdded(Build build, BuildItem item, boolean isNewItem);
public void onRuneAdded(Build build, BuildRune rune);
public void onRuneRemoved(Build build, BuildRune rune);
public void onBuildStatsChanged();
}
public static class BuildItem {
ItemInfo info;
int group = -1;
boolean active = true;
int count = 1;
int costPer = 0;
int depth = 0;
List<BuildItem> from;
BuildItem to;
private BuildItem(ItemInfo info) {
this.info = info;
from = new ArrayList<BuildItem>();
}
public int getId() {
return info.id;
}
}
public static class BuildRune {
RuneInfo info;
Object tag;
int id;
private int count;
private OnRuneCountChangedListener listener;
private OnRuneCountChangedListener onRuneCountChangedListener;
private BuildRune(RuneInfo info, int id) {
this.info = info;
count = 0;
this.id = id;
}
public void addRune() {
addRune(1);
}
public void addRune(int n) {
count += n;
int c = count;
listener.onRuneCountChanged(this, count - n, count);
if (c == count && onRuneCountChangedListener != null) {
onRuneCountChangedListener.onRuneCountChanged(this, count - n, count);
}
}
public void removeRune() {
if (count == 0) return;
count--;
int c = count;
listener.onRuneCountChanged(this, count + 1, count);
if (c == count && onRuneCountChangedListener != null) {
onRuneCountChangedListener.onRuneCountChanged(this, count + 1, count);
}
}
public int getCount() {
return count;
}
public void setOnRuneCountChangedListener(OnRuneCountChangedListener listener) {
onRuneCountChangedListener = listener;
}
}
public static class BuildSkill {
public double totalBonus;
Skill skill;
double base;
double scaling;
int scaleTypeId;
int bonusTypeId;
}
public static interface OnRuneCountChangedListener {
public void onRuneCountChanged(BuildRune rune, int oldCount, int newCount);
}
public static int getStatIndex(String statName) {
Integer i;
i = statKeyToIndex.get(statName);
if (i == null) {
throw new RuntimeException("Stat name not found: " + statName);
}
return i;
}
public static int getStatName(int statId) {
int i;
i = statIdToStringId.get(statId);
if (i == 0) {
throw new RuntimeException("Stat id does not have string resource: " + statId);
}
return i;
}
public static int getSkillStatDesc(int statId) {
int i;
i = statIdToSkillStatDescStringId.get(statId);
if (i == 0) {
throw new RuntimeException("Stat id does not have a skill stat description: " + statId);
}
return i;
}
public static int getStatType(int statId) {
switch (statId) {
case STAT_DMG_REDUCTION:
return STAT_TYPE_PERCENT;
default:
return STAT_TYPE_DEFAULT;
}
}
public static int getScalingType(int statId) {
switch (statId) {
case STAT_CD_MOD:
case STAT_STACKS:
case STAT_ONE:
return STAT_TYPE_DEFAULT;
default:
return STAT_TYPE_PERCENT;
}
}
}
| Fix indentation
| app/src/main/java/com/ggstudios/lolcraft/Build.java | Fix indentation | <ide><path>pp/src/main/java/com/ggstudios/lolcraft/Build.java
<ide> * Class that holds information about a build, such as build order, stats and cost.
<ide> */
<ide> public class Build {
<del> private static final String TAG = "Build";
<del>
<del> public static final int RUNE_TYPE_RED = 0;
<del> public static final int RUNE_TYPE_BLUE = 1;
<del> public static final int RUNE_TYPE_YELLOW = 2;
<del> public static final int RUNE_TYPE_BLACK = 3;
<del>
<del> public static final double MAX_ATTACK_SPEED = 2.5;
<del> public static final double MAX_CDR = 0.4;
<del>
<del> private static final int[] RUNE_COUNT_MAX = new int[] {
<del> 9, 9, 9, 3
<del> };
<del>
<del> private static final int[] GROUP_COLOR = new int[] {
<del> 0xff2ecc71, // emerald
<del> //0xffe74c3c, // alizarin
<del> 0xff3498db, // peter river
<del> 0xff9b59b6, // amethyst
<del> 0xffe67e22, // carrot
<del> 0xff34495e, // wet asphalt
<del> 0xff1abc9c, // turquoise
<del> 0xfff1c40f, // sun flower
<del> };
<del>
<del> private static final int FLAG_SCALING = 0x80000000;
<del>
<del> public static final String SN_NULL = "null";
<del>
<del> public static final int STAT_NULL = 0;
<del> public static final int STAT_HP = 1;
<del> public static final int STAT_HPR = 2;
<del> public static final int STAT_MP = 3;
<del> public static final int STAT_MPR = 4;
<del> public static final int STAT_AD = 5;
<del> //public static final int STAT_BASE_AS = asdf;
<del> public static final int STAT_ASP = 6;
<del> public static final int STAT_AR = 7;
<del> public static final int STAT_MR = 8;
<del> public static final int STAT_MS = 9;
<del> public static final int STAT_RANGE = 10;
<del> public static final int STAT_CRIT = 11;
<del> public static final int STAT_AP = 12;
<del> public static final int STAT_LS = 13;
<del> public static final int STAT_MSP = 14;
<del> public static final int STAT_CDR = 15;
<del> public static final int STAT_ARPEN = 16;
<del> public static final int STAT_NRG = 17;
<del> public static final int STAT_NRGR = 18;
<del> public static final int STAT_GP10 = 19;
<del> public static final int STAT_MRP = 20;
<del> public static final int STAT_CD = 21;
<del> public static final int STAT_DT = 22;
<del> public static final int STAT_APP = 23;
<del> public static final int STAT_SV = 24;
<del> public static final int STAT_MPENP = 25;
<del> public static final int STAT_APENP = 26;
<add> private static final String TAG = "Build";
<add>
<add> public static final int RUNE_TYPE_RED = 0;
<add> public static final int RUNE_TYPE_BLUE = 1;
<add> public static final int RUNE_TYPE_YELLOW = 2;
<add> public static final int RUNE_TYPE_BLACK = 3;
<add>
<add> public static final double MAX_ATTACK_SPEED = 2.5;
<add> public static final double MAX_CDR = 0.4;
<add>
<add> private static final int[] RUNE_COUNT_MAX = new int[] {
<add> 9, 9, 9, 3
<add> };
<add>
<add> private static final int[] GROUP_COLOR = new int[] {
<add> 0xff2ecc71, // emerald
<add> //0xffe74c3c, // alizarin
<add> 0xff3498db, // peter river
<add> 0xff9b59b6, // amethyst
<add> 0xffe67e22, // carrot
<add> 0xff34495e, // wet asphalt
<add> 0xff1abc9c, // turquoise
<add> 0xfff1c40f, // sun flower
<add> };
<add>
<add> private static final int FLAG_SCALING = 0x80000000;
<add>
<add> public static final String SN_NULL = "null";
<add>
<add> public static final int STAT_NULL = 0;
<add> public static final int STAT_HP = 1;
<add> public static final int STAT_HPR = 2;
<add> public static final int STAT_MP = 3;
<add> public static final int STAT_MPR = 4;
<add> public static final int STAT_AD = 5;
<add> //public static final int STAT_BASE_AS = asdf;
<add> public static final int STAT_ASP = 6;
<add> public static final int STAT_AR = 7;
<add> public static final int STAT_MR = 8;
<add> public static final int STAT_MS = 9;
<add> public static final int STAT_RANGE = 10;
<add> public static final int STAT_CRIT = 11;
<add> public static final int STAT_AP = 12;
<add> public static final int STAT_LS = 13;
<add> public static final int STAT_MSP = 14;
<add> public static final int STAT_CDR = 15;
<add> public static final int STAT_ARPEN = 16;
<add> public static final int STAT_NRG = 17;
<add> public static final int STAT_NRGR = 18;
<add> public static final int STAT_GP10 = 19;
<add> public static final int STAT_MRP = 20;
<add> public static final int STAT_CD = 21;
<add> public static final int STAT_DT = 22;
<add> public static final int STAT_APP = 23;
<add> public static final int STAT_SV = 24;
<add> public static final int STAT_MPENP = 25;
<add> public static final int STAT_APENP = 26;
<ide> public static final int STAT_DMG_REDUCTION = 27;
<ide> public static final int STAT_CC_RED = 28;
<ide> public static final int STAT_AA_TRUE_DAMAGE = 29;
<ide> public static final int STAT_AOE_DPS_MAGIC = 37;
<ide> public static final int STAT_PERCENT_HP_MISSING = 38;
<ide>
<del> public static final int STAT_TOTAL_AR = 40;
<del> public static final int STAT_TOTAL_AD = 41;
<del> public static final int STAT_TOTAL_HP = 42;
<del> public static final int STAT_CD_MOD = 43;
<del> public static final int STAT_TOTAL_AP = 44;
<del> public static final int STAT_TOTAL_MS = 45;
<del> public static final int STAT_TOTAL_MR = 46;
<del> public static final int STAT_AS = 47;
<del> public static final int STAT_LEVEL = 48;
<del> public static final int STAT_TOTAL_RANGE = 49;
<add> public static final int STAT_TOTAL_AR = 40;
<add> public static final int STAT_TOTAL_AD = 41;
<add> public static final int STAT_TOTAL_HP = 42;
<add> public static final int STAT_CD_MOD = 43;
<add> public static final int STAT_TOTAL_AP = 44;
<add> public static final int STAT_TOTAL_MS = 45;
<add> public static final int STAT_TOTAL_MR = 46;
<add> public static final int STAT_AS = 47;
<add> public static final int STAT_LEVEL = 48;
<add> public static final int STAT_TOTAL_RANGE = 49;
<ide> public static final int STAT_TOTAL_MP = 50;
<ide>
<del> public static final int STAT_BONUS_AD = 60;
<del> public static final int STAT_BONUS_HP = 61;
<del> public static final int STAT_BONUS_MS = 62;
<del> public static final int STAT_BONUS_AP = 44; // note that cause base AP is always 0, bonusAp always = totalAp
<del> public static final int STAT_BONUS_AR = 63;
<del> public static final int STAT_BONUS_MR = 64;
<del> public static final int STAT_LEVEL_MINUS_ONE = 65;
<add> public static final int STAT_BONUS_AD = 60;
<add> public static final int STAT_BONUS_HP = 61;
<add> public static final int STAT_BONUS_MS = 62;
<add> public static final int STAT_BONUS_AP = 44; // note that cause base AP is always 0, bonusAp always = totalAp
<add> public static final int STAT_BONUS_AR = 63;
<add> public static final int STAT_BONUS_MR = 64;
<add> public static final int STAT_LEVEL_MINUS_ONE = 65;
<ide> public static final int STAT_CRIT_DMG = 66;
<ide>
<del> public static final int STAT_AA_DPS = 70;
<add> public static final int STAT_AA_DPS = 70;
<ide>
<ide> public static final int STAT_NAUTILUS_Q_CD = 80;
<ide> public static final int STAT_RENGAR_Q_BASE_DAMAGE = 81;
<ide> public static final int STAT_VI_W = 82;
<ide> public static final int STAT_STACKS = 83; // generic stat... could be used for Ashe/Nasus, etc
<add> public static final int STAT_SOULS = 84;
<ide>
<ide> public static final int STAT_ENEMY_MISSING_HP = 100;
<ide> public static final int STAT_ENEMY_CURRENT_HP = 101;
<ide> public static final int STAT_TYPE_DEFAULT = 0;
<ide> public static final int STAT_TYPE_PERCENT = 1;
<ide>
<del> private static final int MAX_STATS = 121;
<del> private static final int MAX_ACTIVE_ITEMS = 6;
<del>
<del> public static final String JSON_KEY_RUNES = "runes";
<del> public static final String JSON_KEY_ITEMS = "items";
<add> private static final int MAX_STATS = 121;
<add> private static final int MAX_ACTIVE_ITEMS = 6;
<add>
<add> public static final String JSON_KEY_RUNES = "runes";
<add> public static final String JSON_KEY_ITEMS = "items";
<ide> public static final String JSON_KEY_BUILD_NAME = "build_name";
<ide> public static final String JSON_KEY_COLOR = "color";
<ide>
<del> private static final Map<String, Integer> statKeyToIndex = new HashMap<String, Integer>();
<del> private static final SparseIntArray statIdToStringId = new SparseIntArray();
<add> private static final Map<String, Integer> statKeyToIndex = new HashMap<String, Integer>();
<add> private static final SparseIntArray statIdToStringId = new SparseIntArray();
<ide> private static final SparseIntArray statIdToSkillStatDescStringId = new SparseIntArray();
<ide>
<ide> private static final int COLOR_AP = 0xFF59BD1A;
<ide> private static final float STAT_VALUE_ASP = 30f;
<ide>
<ide> private static ItemLibrary itemLibrary;
<del> private static RuneLibrary runeLibrary;
<add> private static RuneLibrary runeLibrary;
<ide>
<ide> private static final double[] RENGAR_Q_BASE = new double[] {
<del> 30,
<del> 45,
<del> 60,
<del> 75,
<del> 90,
<del> 105,
<del> 120,
<del> 135,
<del> 150,
<del> 160,
<del> 170,
<del> 180,
<del> 190,
<del> 200,
<del> 210,
<del> 220,
<del> 230,
<del> 240
<add> 30,
<add> 45,
<add> 60,
<add> 75,
<add> 90,
<add> 105,
<add> 120,
<add> 135,
<add> 150,
<add> 160,
<add> 170,
<add> 180,
<add> 190,
<add> 200,
<add> 210,
<add> 220,
<add> 230,
<add> 240
<ide> };
<ide>
<del> static {
<del> statKeyToIndex.put("FlatArmorMod", STAT_AR);
<del> statKeyToIndex.put("FlatAttackSpeedMod", STAT_NULL);
<del> statKeyToIndex.put("FlatBlockMod", STAT_NULL);
<del> statKeyToIndex.put("FlatCritChanceMod", STAT_CRIT);
<del> statKeyToIndex.put("FlatCritDamageMod", STAT_NULL);
<del> statKeyToIndex.put("FlatEXPBonus", STAT_NULL);
<del> statKeyToIndex.put("FlatEnergyPoolMod", STAT_NULL);
<del> statKeyToIndex.put("FlatEnergyRegenMod", STAT_NULL);
<del> statKeyToIndex.put("FlatHPPoolMod", STAT_HP);
<del> statKeyToIndex.put("FlatHPRegenMod", STAT_HPR);
<del> statKeyToIndex.put("FlatMPPoolMod", STAT_MP);
<del> statKeyToIndex.put("FlatMPRegenMod", STAT_MPR);
<del> statKeyToIndex.put("FlatMagicDamageMod", STAT_AP);
<del> statKeyToIndex.put("FlatMovementSpeedMod", STAT_MS);
<del> statKeyToIndex.put("FlatPhysicalDamageMod", STAT_AD);
<del> statKeyToIndex.put("FlatSpellBlockMod", STAT_MR);
<del> statKeyToIndex.put("FlatCoolDownRedMod", STAT_CDR);
<del> statKeyToIndex.put("PercentArmorMod", STAT_NULL);
<del> statKeyToIndex.put("PercentAttackSpeedMod", STAT_ASP);
<del> statKeyToIndex.put("PercentBlockMod", STAT_NULL);
<del> statKeyToIndex.put("PercentCritChanceMod", STAT_NULL);
<del> statKeyToIndex.put("PercentCritDamageMod", STAT_NULL);
<del> statKeyToIndex.put("PercentDodgeMod", STAT_NULL);
<del> statKeyToIndex.put("PercentEXPBonus", STAT_NULL);
<del> statKeyToIndex.put("PercentHPPoolMod", STAT_NULL);
<del> statKeyToIndex.put("PercentHPRegenMod", STAT_NULL);
<del> statKeyToIndex.put("PercentLifeStealMod", STAT_LS);
<del> statKeyToIndex.put("PercentMPPoolMod", STAT_NULL);
<del> statKeyToIndex.put("PercentMPRegenMod", STAT_NULL);
<del> statKeyToIndex.put("PercentMagicDamageMod", STAT_APP);
<del> statKeyToIndex.put("PercentMovementSpeedMod", STAT_MSP);
<del> statKeyToIndex.put("PercentPhysicalDamageMod", STAT_NULL);
<del> statKeyToIndex.put("PercentSpellBlockMod", STAT_NULL);
<del> statKeyToIndex.put("PercentSpellVampMod", STAT_SV);
<add> static {
<add> statKeyToIndex.put("FlatArmorMod", STAT_AR);
<add> statKeyToIndex.put("FlatAttackSpeedMod", STAT_NULL);
<add> statKeyToIndex.put("FlatBlockMod", STAT_NULL);
<add> statKeyToIndex.put("FlatCritChanceMod", STAT_CRIT);
<add> statKeyToIndex.put("FlatCritDamageMod", STAT_NULL);
<add> statKeyToIndex.put("FlatEXPBonus", STAT_NULL);
<add> statKeyToIndex.put("FlatEnergyPoolMod", STAT_NULL);
<add> statKeyToIndex.put("FlatEnergyRegenMod", STAT_NULL);
<add> statKeyToIndex.put("FlatHPPoolMod", STAT_HP);
<add> statKeyToIndex.put("FlatHPRegenMod", STAT_HPR);
<add> statKeyToIndex.put("FlatMPPoolMod", STAT_MP);
<add> statKeyToIndex.put("FlatMPRegenMod", STAT_MPR);
<add> statKeyToIndex.put("FlatMagicDamageMod", STAT_AP);
<add> statKeyToIndex.put("FlatMovementSpeedMod", STAT_MS);
<add> statKeyToIndex.put("FlatPhysicalDamageMod", STAT_AD);
<add> statKeyToIndex.put("FlatSpellBlockMod", STAT_MR);
<add> statKeyToIndex.put("FlatCoolDownRedMod", STAT_CDR);
<add> statKeyToIndex.put("PercentArmorMod", STAT_NULL);
<add> statKeyToIndex.put("PercentAttackSpeedMod", STAT_ASP);
<add> statKeyToIndex.put("PercentBlockMod", STAT_NULL);
<add> statKeyToIndex.put("PercentCritChanceMod", STAT_NULL);
<add> statKeyToIndex.put("PercentCritDamageMod", STAT_NULL);
<add> statKeyToIndex.put("PercentDodgeMod", STAT_NULL);
<add> statKeyToIndex.put("PercentEXPBonus", STAT_NULL);
<add> statKeyToIndex.put("PercentHPPoolMod", STAT_NULL);
<add> statKeyToIndex.put("PercentHPRegenMod", STAT_NULL);
<add> statKeyToIndex.put("PercentLifeStealMod", STAT_LS);
<add> statKeyToIndex.put("PercentMPPoolMod", STAT_NULL);
<add> statKeyToIndex.put("PercentMPRegenMod", STAT_NULL);
<add> statKeyToIndex.put("PercentMagicDamageMod", STAT_APP);
<add> statKeyToIndex.put("PercentMovementSpeedMod", STAT_MSP);
<add> statKeyToIndex.put("PercentPhysicalDamageMod", STAT_NULL);
<add> statKeyToIndex.put("PercentSpellBlockMod", STAT_NULL);
<add> statKeyToIndex.put("PercentSpellVampMod", STAT_SV);
<ide> statKeyToIndex.put("CCRed", STAT_CC_RED);
<ide> statKeyToIndex.put("FlatAaTrueDamageMod", STAT_AA_TRUE_DAMAGE);
<ide> statKeyToIndex.put("FlatAaMagicDamageMod", STAT_AA_MAGIC_DAMAGE);
<ide> statKeyToIndex.put("magic_aoe_dps", STAT_AOE_DPS_MAGIC);
<ide> statKeyToIndex.put("perpercenthpmissing", STAT_PERCENT_HP_MISSING);
<ide>
<del> statKeyToIndex.put("rFlatArmorModPerLevel", STAT_AR | FLAG_SCALING);
<del> statKeyToIndex.put("rFlatArmorPenetrationMod", STAT_ARPEN);
<del> statKeyToIndex.put("rFlatArmorPenetrationModPerLevel", STAT_ARPEN | FLAG_SCALING);
<del> statKeyToIndex.put("rFlatEnergyModPerLevel", STAT_NRG | FLAG_SCALING);
<del> statKeyToIndex.put("rFlatEnergyRegenModPerLevel", STAT_NRGR | FLAG_SCALING);
<del> statKeyToIndex.put("rFlatGoldPer10Mod", STAT_GP10);
<del> statKeyToIndex.put("rFlatHPModPerLevel", STAT_HP | FLAG_SCALING);
<del> statKeyToIndex.put("rFlatHPRegenModPerLevel", STAT_HPR | FLAG_SCALING);
<del> statKeyToIndex.put("rFlatMPModPerLevel", STAT_MP | FLAG_SCALING);
<del> statKeyToIndex.put("rFlatMPRegenModPerLevel", STAT_MPR | FLAG_SCALING);
<del> statKeyToIndex.put("rFlatMagicDamageModPerLevel", STAT_AP | FLAG_SCALING);
<del> statKeyToIndex.put("rFlatMagicPenetrationMod", STAT_MRP);
<del> statKeyToIndex.put("rFlatMagicPenetrationModPerLevel", STAT_MRP | FLAG_SCALING);
<del> statKeyToIndex.put("rFlatPhysicalDamageModPerLevel", STAT_AD | FLAG_SCALING);
<del> statKeyToIndex.put("rFlatSpellBlockModPerLevel", STAT_MR | FLAG_SCALING);
<del> statKeyToIndex.put("rPercentCooldownMod", STAT_CD); // negative val...
<del> statKeyToIndex.put("rPercentCooldownModPerLevel", STAT_CD | FLAG_SCALING);
<del> statKeyToIndex.put("rPercentTimeDeadMod", STAT_DT);
<del> statKeyToIndex.put("rPercentTimeDeadModPerLevel", STAT_DT | FLAG_SCALING);
<del> statKeyToIndex.put("rPercentMagicPenetrationMod", STAT_MPENP);
<del> statKeyToIndex.put("rPercentArmorPenetrationMod", STAT_APENP);
<add> statKeyToIndex.put("rFlatArmorModPerLevel", STAT_AR | FLAG_SCALING);
<add> statKeyToIndex.put("rFlatArmorPenetrationMod", STAT_ARPEN);
<add> statKeyToIndex.put("rFlatArmorPenetrationModPerLevel", STAT_ARPEN | FLAG_SCALING);
<add> statKeyToIndex.put("rFlatEnergyModPerLevel", STAT_NRG | FLAG_SCALING);
<add> statKeyToIndex.put("rFlatEnergyRegenModPerLevel", STAT_NRGR | FLAG_SCALING);
<add> statKeyToIndex.put("rFlatGoldPer10Mod", STAT_GP10);
<add> statKeyToIndex.put("rFlatHPModPerLevel", STAT_HP | FLAG_SCALING);
<add> statKeyToIndex.put("rFlatHPRegenModPerLevel", STAT_HPR | FLAG_SCALING);
<add> statKeyToIndex.put("rFlatMPModPerLevel", STAT_MP | FLAG_SCALING);
<add> statKeyToIndex.put("rFlatMPRegenModPerLevel", STAT_MPR | FLAG_SCALING);
<add> statKeyToIndex.put("rFlatMagicDamageModPerLevel", STAT_AP | FLAG_SCALING);
<add> statKeyToIndex.put("rFlatMagicPenetrationMod", STAT_MRP);
<add> statKeyToIndex.put("rFlatMagicPenetrationModPerLevel", STAT_MRP | FLAG_SCALING);
<add> statKeyToIndex.put("rFlatPhysicalDamageModPerLevel", STAT_AD | FLAG_SCALING);
<add> statKeyToIndex.put("rFlatSpellBlockModPerLevel", STAT_MR | FLAG_SCALING);
<add> statKeyToIndex.put("rPercentCooldownMod", STAT_CD); // negative val...
<add> statKeyToIndex.put("rPercentCooldownModPerLevel", STAT_CD | FLAG_SCALING);
<add> statKeyToIndex.put("rPercentTimeDeadMod", STAT_DT);
<add> statKeyToIndex.put("rPercentTimeDeadModPerLevel", STAT_DT | FLAG_SCALING);
<add> statKeyToIndex.put("rPercentMagicPenetrationMod", STAT_MPENP);
<add> statKeyToIndex.put("rPercentArmorPenetrationMod", STAT_APENP);
<ide> statKeyToIndex.put("damagereduction", STAT_DMG_REDUCTION);
<ide> statKeyToIndex.put("magicaldamagereduction", STAT_MAGIC_DMG_REDUCTION);
<ide> statKeyToIndex.put("FlatMagicHp", STAT_MAGIC_HP);
<ide> statKeyToIndex.put("CcImmune", STAT_CC_IMMUNE);
<ide> statKeyToIndex.put("InvulnerabilityButOne", STAT_INVULNERABILITY_ALL_BUT_ONE);
<ide>
<del>
<del> // keys used for skills...
<del> statKeyToIndex.put("spelldamage", STAT_TOTAL_AP);
<del> statKeyToIndex.put("attackdamage", STAT_TOTAL_AD);
<del> statKeyToIndex.put("bonushealth", STAT_BONUS_HP);
<del> statKeyToIndex.put("armor", STAT_TOTAL_AR);
<del> statKeyToIndex.put("bonusattackdamage", STAT_BONUS_AD);
<del> statKeyToIndex.put("health", STAT_TOTAL_HP);
<del> statKeyToIndex.put("bonusarmor", STAT_BONUS_AR);
<del> statKeyToIndex.put("bonusspellblock", STAT_BONUS_MR);
<del> statKeyToIndex.put("levelMinusOne", STAT_LEVEL_MINUS_ONE);
<add> // keys used for skills...
<add> statKeyToIndex.put("spelldamage", STAT_TOTAL_AP);
<add> statKeyToIndex.put("attackdamage", STAT_TOTAL_AD);
<add> statKeyToIndex.put("bonushealth", STAT_BONUS_HP);
<add> statKeyToIndex.put("armor", STAT_TOTAL_AR);
<add> statKeyToIndex.put("bonusattackdamage", STAT_BONUS_AD);
<add> statKeyToIndex.put("health", STAT_TOTAL_HP);
<add> statKeyToIndex.put("bonusarmor", STAT_BONUS_AR);
<add> statKeyToIndex.put("bonusspellblock", STAT_BONUS_MR);
<add> statKeyToIndex.put("levelMinusOne", STAT_LEVEL_MINUS_ONE);
<ide> statKeyToIndex.put("level", STAT_LEVEL);
<del> statKeyToIndex.put("RangeMod", STAT_RANGE);
<add> statKeyToIndex.put("RangeMod", STAT_RANGE);
<ide> statKeyToIndex.put("mana", STAT_TOTAL_MP);
<ide> statKeyToIndex.put("critdamage", STAT_CRIT_DMG);
<ide> statKeyToIndex.put("enemymissinghealth", STAT_ENEMY_MISSING_HP);
<ide> statKeyToIndex.put("enemymaxhealth", STAT_ENEMY_MAX_HP);
<ide> statKeyToIndex.put("movementspeed", STAT_TOTAL_MS);
<ide>
<del> // special keys...
<del> statKeyToIndex.put("@special.BraumWArmor", STAT_NULL);
<del> statKeyToIndex.put("@special.BraumWMR", STAT_NULL);
<del>
<del> statKeyToIndex.put("@cooldownchampion", STAT_CD_MOD);
<add> // special keys...
<add> statKeyToIndex.put("@special.BraumWArmor", STAT_NULL);
<add> statKeyToIndex.put("@special.BraumWMR", STAT_NULL);
<add>
<add> statKeyToIndex.put("@cooldownchampion", STAT_CD_MOD);
<ide> statKeyToIndex.put("@stacks", STAT_STACKS);
<add> statKeyToIndex.put("@souls", STAT_SOULS);
<ide>
<ide> // heim
<ide> statKeyToIndex.put("@dynamic.abilitypower", STAT_AP);
<ide> // darius
<ide> statKeyToIndex.put("@special.dariusr3", STAT_ONE);
<ide>
<del> statKeyToIndex.put("null", STAT_NULL);
<del>
<del> SparseIntArray a = statIdToStringId;
<del> a.put(STAT_NULL, R.string.stat_desc_null);
<del> a.put(STAT_HP, R.string.stat_desc_hp);
<del> a.put(STAT_HPR, R.string.stat_desc_hpr);
<del> a.put(STAT_MP, R.string.stat_desc_mp);
<del> a.put(STAT_MPR, R.string.stat_desc_mpr);
<del> a.put(STAT_AD, R.string.stat_desc_ad);
<del> a.put(STAT_ASP, R.string.stat_desc_asp);
<del> a.put(STAT_AR, R.string.stat_desc_ar);
<del> a.put(STAT_MR, R.string.stat_desc_mr);
<del> // public static final int STAT_MS = 9;
<del> a.put(STAT_RANGE, R.string.stat_desc_range);
<del> // public static final int STAT_CRIT = 11;
<del> // public static final int STAT_AP = 12;
<del> // public static final int STAT_LS = 13;
<del> // public static final int STAT_MSP = 14;
<del> // public static final int STAT_CDR = 15;
<del> // public static final int STAT_ARPEN = 16;
<del> // public static final int STAT_NRG = 17;
<del> // public static final int STAT_NRGR = 18;
<del> // public static final int STAT_GP10 = 19;
<del> // public static final int STAT_MRP = 20;
<del> // public static final int STAT_CD = 21;
<del> // public static final int STAT_DT = 22;
<del> // public static final int STAT_APP = 23;
<del> // public static final int STAT_SV = 24;
<del> // public static final int STAT_MPENP = 25;
<del> // public static final int STAT_APENP = 26;
<add> statKeyToIndex.put("null", STAT_NULL);
<add>
<add> SparseIntArray a = statIdToStringId;
<add> a.put(STAT_NULL, R.string.stat_desc_null);
<add> a.put(STAT_HP, R.string.stat_desc_hp);
<add> a.put(STAT_HPR, R.string.stat_desc_hpr);
<add> a.put(STAT_MP, R.string.stat_desc_mp);
<add> a.put(STAT_MPR, R.string.stat_desc_mpr);
<add> a.put(STAT_AD, R.string.stat_desc_ad);
<add> a.put(STAT_ASP, R.string.stat_desc_asp);
<add> a.put(STAT_AR, R.string.stat_desc_ar);
<add> a.put(STAT_MR, R.string.stat_desc_mr);
<add> // public static final int STAT_MS = 9;
<add> a.put(STAT_RANGE, R.string.stat_desc_range);
<add> // public static final int STAT_CRIT = 11;
<add> // public static final int STAT_AP = 12;
<add> // public static final int STAT_LS = 13;
<add> // public static final int STAT_MSP = 14;
<add> // public static final int STAT_CDR = 15;
<add> // public static final int STAT_ARPEN = 16;
<add> // public static final int STAT_NRG = 17;
<add> // public static final int STAT_NRGR = 18;
<add> // public static final int STAT_GP10 = 19;
<add> // public static final int STAT_MRP = 20;
<add> // public static final int STAT_CD = 21;
<add> // public static final int STAT_DT = 22;
<add> // public static final int STAT_APP = 23;
<add> // public static final int STAT_SV = 24;
<add> // public static final int STAT_MPENP = 25;
<add> // public static final int STAT_APENP = 26;
<ide> a.put(STAT_DMG_REDUCTION, R.string.stat_desc_damage_reduction);
<del> //
<del> // public static final int STAT_TOTAL_AR = 40;
<del> // public static final int STAT_TOTAL_AD = 41;
<del> // public static final int STAT_TOTAL_HP = 42;
<del> // public static final int STAT_CD_MOD = 43;
<del> // public static final int STAT_TOTAL_AP = 44;
<del> // public static final int STAT_TOTAL_MS = 45;
<del> // public static final int STAT_TOTAL_MR = 46;
<del> // public static final int STAT_AS = 47;
<del> // public static final int STAT_LEVEL = 48;
<del> //
<del> // public static final int STAT_BONUS_AD = 50;
<del> // public static final int STAT_BONUS_HP = 51;
<del> // public static final int STAT_BONUS_MS = 52;
<del> // public static final int STAT_BONUS_AP = 44; // note that cause base AP is always 0, bonusAp always = totalAp
<del> // public static final int STAT_BONUS_AR = 53;
<del> // public static final int STAT_BONUS_MR = 54;
<del> //
<del> //
<del> // public static final int STAT_AA_DPS = 60;
<add> //
<add> // public static final int STAT_TOTAL_AR = 40;
<add> // public static final int STAT_TOTAL_AD = 41;
<add> // public static final int STAT_TOTAL_HP = 42;
<add> // public static final int STAT_CD_MOD = 43;
<add> // public static final int STAT_TOTAL_AP = 44;
<add> // public static final int STAT_TOTAL_MS = 45;
<add> // public static final int STAT_TOTAL_MR = 46;
<add> // public static final int STAT_AS = 47;
<add> // public static final int STAT_LEVEL = 48;
<add> //
<add> // public static final int STAT_BONUS_AD = 50;
<add> // public static final int STAT_BONUS_HP = 51;
<add> // public static final int STAT_BONUS_MS = 52;
<add> // public static final int STAT_BONUS_AP = 44; // note that cause base AP is always 0, bonusAp always = totalAp
<add> // public static final int STAT_BONUS_AR = 53;
<add> // public static final int STAT_BONUS_MR = 54;
<add> //
<add> //
<add> // public static final int STAT_AA_DPS = 60;
<ide>
<ide> SparseIntArray b = statIdToSkillStatDescStringId;
<ide> b.put(STAT_NULL, R.string.skill_stat_null);
<ide> // public static final int STAT_BONUS_MR = 64;
<ide> // public static final int STAT_LEVEL_MINUS_ONE = 65;
<ide> // public static final int STAT_CRIT_DMG = 66;
<del> }
<add> }
<ide>
<ide> private String buildName;
<ide>
<del> private List<BuildSkill> activeSkills;
<del> private List<BuildRune> runeBuild;
<del> private List<BuildItem> itemBuild;
<del>
<del> private ChampionInfo champ;
<del> private int champLevel;
<del>
<del> private List<BuildObserver> observers = new ArrayList<BuildObserver>();
<del>
<del> private int enabledBuildStart = 0;
<del> private int enabledBuildEnd = 0;
<del>
<del> private int currentGroupCounter = 0;
<del>
<del> private int[] runeCount = new int[4];
<del>
<del> private double[] stats = new double[MAX_STATS];
<del> private double[] statsWithActives = new double[MAX_STATS];
<del>
<del> private boolean itemBuildDirty = false;
<add> private List<BuildSkill> activeSkills;
<add> private List<BuildRune> runeBuild;
<add> private List<BuildItem> itemBuild;
<add>
<add> private ChampionInfo champ;
<add> private int champLevel;
<add>
<add> private List<BuildObserver> observers = new ArrayList<BuildObserver>();
<add>
<add> private int enabledBuildStart = 0;
<add> private int enabledBuildEnd = 0;
<add>
<add> private int currentGroupCounter = 0;
<add>
<add> private int[] runeCount = new int[4];
<add>
<add> private double[] stats = new double[MAX_STATS];
<add> private double[] statsWithActives = new double[MAX_STATS];
<add>
<add> private boolean itemBuildDirty = false;
<ide>
<ide> private Gson gson;
<ide>
<del> private OnRuneCountChangedListener onRuneCountChangedListener = new OnRuneCountChangedListener() {
<del>
<del> @Override
<del> public void onRuneCountChanged(BuildRune rune, int oldCount, int newCount) {
<del> Build.this.onRuneCountChanged(rune, oldCount, newCount);
<del> }
<del>
<del> };
<del>
<del> public Build() {
<del> itemBuild = new ArrayList<BuildItem>();
<del> runeBuild = new ArrayList<BuildRune>();
<del> activeSkills = new ArrayList<BuildSkill>();
<add> private OnRuneCountChangedListener onRuneCountChangedListener = new OnRuneCountChangedListener() {
<add>
<add> @Override
<add> public void onRuneCountChanged(BuildRune rune, int oldCount, int newCount) {
<add> Build.this.onRuneCountChanged(rune, oldCount, newCount);
<add> }
<add>
<add> };
<add>
<add> public Build() {
<add> itemBuild = new ArrayList<BuildItem>();
<add> runeBuild = new ArrayList<BuildRune>();
<add> activeSkills = new ArrayList<BuildSkill>();
<ide>
<ide> gson = StateManager.getInstance().getGson();
<ide>
<del> if (itemLibrary == null) {
<del> itemLibrary = LibraryManager.getInstance().getItemLibrary();
<del> }
<del> if (runeLibrary == null) {
<del> runeLibrary = LibraryManager.getInstance().getRuneLibrary();
<del> }
<del>
<del> champLevel = 1;
<del> }
<add> if (itemLibrary == null) {
<add> itemLibrary = LibraryManager.getInstance().getItemLibrary();
<add> }
<add> if (runeLibrary == null) {
<add> runeLibrary = LibraryManager.getInstance().getRuneLibrary();
<add> }
<add>
<add> champLevel = 1;
<add> }
<ide>
<ide> public void setBuildName(String name) {
<ide> buildName = name;
<ide> return buildName;
<ide> }
<ide>
<del> private void clearGroups() {
<del> for (BuildItem item : itemBuild) {
<del> item.group = -1;
<del> item.to = null;
<del> item.depth = 0;
<del> item.from.clear();
<del> }
<del>
<del> currentGroupCounter = 0;
<del> }
<del>
<del> private void recalculateAllGroups() {
<del> clearGroups();
<del>
<del> for (int i = 0; i < itemBuild.size(); i++) {
<del> labelAllIngredients(itemBuild.get(i), i);
<del> }
<del> }
<del>
<del> private BuildItem getFreeItemWithId(int id, int index) {
<del> for (int i = index - 1; i >= 0; i--) {
<del> if (itemBuild.get(i).getId() == id && itemBuild.get(i).to == null) {
<del> return itemBuild.get(i);
<del> }
<del> }
<del> return null;
<del> }
<del>
<del> private void labelAllIngredients(BuildItem item, int index) {
<del> int curGroup = currentGroupCounter;
<del>
<del> boolean grouped = false;
<del> Stack<Integer> from = new Stack<Integer>();
<del> from.addAll(item.info.from);
<del> while (!from.empty()) {
<del> int i = from.pop();
<del> BuildItem ingredient = getFreeItemWithId(i, index);
<del>
<del> if (ingredient != null && ingredient.to == null) {
<del> if (ingredient.group != -1) {
<del> curGroup = ingredient.group;
<del> }
<del> ingredient.to = item;
<del> item.from.add(ingredient);
<del> grouped = true;
<del>
<del> calculateItemCost(item);
<del> } else {
<del> from.addAll(itemLibrary.getItemInfo(i).from);
<del> }
<del> }
<del>
<del> if (grouped) {
<del> increaseIngredientDepth(item);
<del>
<del> for (BuildItem i : item.from) {
<del> i.group = curGroup;
<del> }
<del>
<del> item.group = curGroup;
<del>
<del> if (curGroup == currentGroupCounter) {
<del> currentGroupCounter++;
<del> }
<del> }
<del> }
<del>
<del> private void calculateItemCost(BuildItem item) {
<del> int p = item.info.totalGold;
<del> for (BuildItem i : item.from) {
<del> p -= i.info.totalGold;
<del> }
<del>
<del> item.costPer = p;
<del> }
<del>
<del> private void recalculateItemCosts() {
<del> for (BuildItem item : itemBuild) {
<del> calculateItemCost(item);
<del> }
<del> }
<del>
<del> private void increaseIngredientDepth(BuildItem item) {
<del> for (BuildItem i : item.from) {
<del> i.depth++;
<del>
<del> increaseIngredientDepth(i);
<del> }
<del> }
<del>
<del> public void addItem(ItemInfo item) {
<del> addItem(item, 1, true);
<del> }
<del>
<del> public void addItem(ItemInfo item, int count, boolean isAll) {
<del> BuildItem buildItem = null;
<del> BuildItem last = getLastItem();
<del> if (last != null && item == last.info) {
<del> if (item.stacks > last.count) {
<del> last.count += count;
<del> buildItem = last;
<del> }
<del> }
<del>
<del> if (isAll == false) {
<del> itemBuildDirty = true;
<del> }
<del>
<del> boolean itemNull = buildItem == null;
<del> if (itemNull) {
<del> buildItem = new BuildItem(item);
<del> buildItem.count = Math.min(item.stacks, count);
<del> // check if ingredients of this item is already part of the build...
<del> labelAllIngredients(buildItem, itemBuild.size());
<del>
<del> if (itemBuild.size() == enabledBuildEnd) {
<del> enabledBuildEnd++;
<del> }
<del> itemBuild.add(buildItem);
<del>
<del> calculateItemCost(buildItem);
<del> }
<del>
<del> if (isAll) {
<del> recalculateStats();
<del> if (itemBuildDirty) {
<del> itemBuildDirty = false;
<del> buildItem = null;
<del> }
<del> notifyItemAdded(buildItem, itemNull);
<del> }
<del> }
<del>
<del> public void clearItems() {
<del> itemBuild.clear();
<del>
<del> normalizeValues();
<del> recalculateItemCosts();
<del> recalculateAllGroups();
<del>
<del> recalculateStats();
<del> notifyBuildChanged();
<del> }
<del>
<del> public void removeItemAt(int position) {
<del> BuildItem item = itemBuild.get(position);
<del> itemBuild.remove(position);
<del> normalizeValues();
<del> recalculateItemCosts();
<del> recalculateAllGroups();
<del>
<del> recalculateStats();
<del> notifyBuildChanged();
<del> }
<del>
<del> public int getItemCount() {
<del> return itemBuild.size();
<del> }
<del>
<del> private void clearStats(double[] stats) {
<del> for (int i = 0; i < stats.length; i++) {
<del> stats[i] = 0;
<del> }
<del> }
<del>
<del> private void recalculateStats() {
<del> calculateStats(stats, enabledBuildStart, enabledBuildEnd, false, champLevel);
<del> }
<del>
<del> private void calculateStats(double[] stats, int startItemBuild, int endItemBuild, boolean onlyDoRawCalculation, int champLevel) {
<del> clearStats(stats);
<del>
<del> int active = 0;
<del>
<del> for (BuildRune r : runeBuild) {
<del> appendStat(stats, r);
<del> }
<del>
<del> if (!onlyDoRawCalculation) {
<del> for (BuildItem item : itemBuild) {
<del> item.active = false;
<del> }
<del> }
<del>
<del> HashSet<Integer> alreadyAdded = new HashSet<Integer>();
<del>
<del> for (int i = endItemBuild - 1; i >= startItemBuild; i--) {
<del> BuildItem item = itemBuild.get(i);
<del> if (item.to == null || itemBuild.indexOf(item.to) >= enabledBuildEnd) {
<del> if (!onlyDoRawCalculation) {
<del> item.active = true;
<del> }
<del>
<del> ItemInfo info = item.info;
<del>
<del> appendStat(stats, info.stats);
<del>
<del> int id = info.id;
<del> if (info.uniquePassiveStat != null && !alreadyAdded.contains(id)) {
<del> alreadyAdded.add(info.id);
<del> appendStat(stats, info.uniquePassiveStat);
<del> }
<del>
<del>
<del> active++;
<del>
<del> if (active == MAX_ACTIVE_ITEMS)
<del> break;
<del> }
<del> }
<del>
<del> calculateTotalStats(stats, champLevel);
<del> if (!onlyDoRawCalculation) {
<del> notifyBuildStatsChanged();
<del> }
<del> }
<del>
<del> private void appendStat(double[] stats, JSONObject jsonStats) {
<del> Iterator<?> iter = jsonStats.keys();
<del> while (iter.hasNext()) {
<del> String key = (String) iter.next();
<del> try {
<del> stats[getStatIndex(key)] += jsonStats.getDouble(key);
<del>
<del> } catch (JSONException e) {
<del> DebugLog.e(TAG, e);
<del> }
<del> }
<del> }
<del>
<del> private void appendStat(double[] stats, BuildRune rune) {
<del> RuneInfo info = rune.info;
<del> Iterator<?> iter = info.stats.keys();
<del> while (iter.hasNext()) {
<del> String key = (String) iter.next();
<del> try {
<del> int f = getStatIndex(key);
<del> if ((f & FLAG_SCALING) != 0) {
<del> stats[f & ~FLAG_SCALING] += info.stats.getDouble(key) * champLevel * rune.count;
<del> } else {
<del> stats[f] += info.stats.getDouble(key) * rune.count;
<del> }
<del>
<del> } catch (JSONException e) {
<del> DebugLog.e(TAG, e);
<del> }
<del> }
<del> }
<del>
<del> private void calculateTotalStats() {
<del> calculateTotalStats(stats, champLevel);
<del> }
<del>
<del> private void calculateTotalStats(double[] stats, int champLevel) {
<del> // do some stat normalization...
<del> stats[STAT_CDR] = Math.min(MAX_CDR, stats[STAT_CDR] - stats[STAT_CD]);
<add> private void clearGroups() {
<add> for (BuildItem item : itemBuild) {
<add> item.group = -1;
<add> item.to = null;
<add> item.depth = 0;
<add> item.from.clear();
<add> }
<add>
<add> currentGroupCounter = 0;
<add> }
<add>
<add> private void recalculateAllGroups() {
<add> clearGroups();
<add>
<add> for (int i = 0; i < itemBuild.size(); i++) {
<add> labelAllIngredients(itemBuild.get(i), i);
<add> }
<add> }
<add>
<add> private BuildItem getFreeItemWithId(int id, int index) {
<add> for (int i = index - 1; i >= 0; i--) {
<add> if (itemBuild.get(i).getId() == id && itemBuild.get(i).to == null) {
<add> return itemBuild.get(i);
<add> }
<add> }
<add> return null;
<add> }
<add>
<add> private void labelAllIngredients(BuildItem item, int index) {
<add> int curGroup = currentGroupCounter;
<add>
<add> boolean grouped = false;
<add> Stack<Integer> from = new Stack<Integer>();
<add> from.addAll(item.info.from);
<add> while (!from.empty()) {
<add> int i = from.pop();
<add> BuildItem ingredient = getFreeItemWithId(i, index);
<add>
<add> if (ingredient != null && ingredient.to == null) {
<add> if (ingredient.group != -1) {
<add> curGroup = ingredient.group;
<add> }
<add> ingredient.to = item;
<add> item.from.add(ingredient);
<add> grouped = true;
<add>
<add> calculateItemCost(item);
<add> } else {
<add> from.addAll(itemLibrary.getItemInfo(i).from);
<add> }
<add> }
<add>
<add> if (grouped) {
<add> increaseIngredientDepth(item);
<add>
<add> for (BuildItem i : item.from) {
<add> i.group = curGroup;
<add> }
<add>
<add> item.group = curGroup;
<add>
<add> if (curGroup == currentGroupCounter) {
<add> currentGroupCounter++;
<add> }
<add> }
<add> }
<add>
<add> private void calculateItemCost(BuildItem item) {
<add> int p = item.info.totalGold;
<add> for (BuildItem i : item.from) {
<add> p -= i.info.totalGold;
<add> }
<add>
<add> item.costPer = p;
<add> }
<add>
<add> private void recalculateItemCosts() {
<add> for (BuildItem item : itemBuild) {
<add> calculateItemCost(item);
<add> }
<add> }
<add>
<add> private void increaseIngredientDepth(BuildItem item) {
<add> for (BuildItem i : item.from) {
<add> i.depth++;
<add>
<add> increaseIngredientDepth(i);
<add> }
<add> }
<add>
<add> public void addItem(ItemInfo item) {
<add> addItem(item, 1, true);
<add> }
<add>
<add> public void addItem(ItemInfo item, int count, boolean isAll) {
<add> BuildItem buildItem = null;
<add> BuildItem last = getLastItem();
<add> if (last != null && item == last.info) {
<add> if (item.stacks > last.count) {
<add> last.count += count;
<add> buildItem = last;
<add> }
<add> }
<add>
<add> if (isAll == false) {
<add> itemBuildDirty = true;
<add> }
<add>
<add> boolean itemNull = buildItem == null;
<add> if (itemNull) {
<add> buildItem = new BuildItem(item);
<add> buildItem.count = Math.min(item.stacks, count);
<add> // check if ingredients of this item is already part of the build...
<add> labelAllIngredients(buildItem, itemBuild.size());
<add>
<add> if (itemBuild.size() == enabledBuildEnd) {
<add> enabledBuildEnd++;
<add> }
<add> itemBuild.add(buildItem);
<add>
<add> calculateItemCost(buildItem);
<add> }
<add>
<add> if (isAll) {
<add> recalculateStats();
<add> if (itemBuildDirty) {
<add> itemBuildDirty = false;
<add> buildItem = null;
<add> }
<add> notifyItemAdded(buildItem, itemNull);
<add> }
<add> }
<add>
<add> public void clearItems() {
<add> itemBuild.clear();
<add>
<add> normalizeValues();
<add> recalculateItemCosts();
<add> recalculateAllGroups();
<add>
<add> recalculateStats();
<add> notifyBuildChanged();
<add> }
<add>
<add> public void removeItemAt(int position) {
<add> BuildItem item = itemBuild.get(position);
<add> itemBuild.remove(position);
<add> normalizeValues();
<add> recalculateItemCosts();
<add> recalculateAllGroups();
<add>
<add> recalculateStats();
<add> notifyBuildChanged();
<add> }
<add>
<add> public int getItemCount() {
<add> return itemBuild.size();
<add> }
<add>
<add> private void clearStats(double[] stats) {
<add> for (int i = 0; i < stats.length; i++) {
<add> stats[i] = 0;
<add> }
<add> }
<add>
<add> private void recalculateStats() {
<add> calculateStats(stats, enabledBuildStart, enabledBuildEnd, false, champLevel);
<add> }
<add>
<add> private void calculateStats(double[] stats, int startItemBuild, int endItemBuild, boolean onlyDoRawCalculation, int champLevel) {
<add> clearStats(stats);
<add>
<add> int active = 0;
<add>
<add> for (BuildRune r : runeBuild) {
<add> appendStat(stats, r);
<add> }
<add>
<add> if (!onlyDoRawCalculation) {
<add> for (BuildItem item : itemBuild) {
<add> item.active = false;
<add> }
<add> }
<add>
<add> HashSet<Integer> alreadyAdded = new HashSet<Integer>();
<add>
<add> for (int i = endItemBuild - 1; i >= startItemBuild; i--) {
<add> BuildItem item = itemBuild.get(i);
<add> if (item.to == null || itemBuild.indexOf(item.to) >= enabledBuildEnd) {
<add> if (!onlyDoRawCalculation) {
<add> item.active = true;
<add> }
<add>
<add> ItemInfo info = item.info;
<add>
<add> appendStat(stats, info.stats);
<add>
<add> int id = info.id;
<add> if (info.uniquePassiveStat != null && !alreadyAdded.contains(id)) {
<add> alreadyAdded.add(info.id);
<add> appendStat(stats, info.uniquePassiveStat);
<add> }
<add>
<add>
<add> active++;
<add>
<add> if (active == MAX_ACTIVE_ITEMS)
<add> break;
<add> }
<add> }
<add>
<add> calculateTotalStats(stats, champLevel);
<add> if (!onlyDoRawCalculation) {
<add> notifyBuildStatsChanged();
<add> }
<add> }
<add>
<add> private void appendStat(double[] stats, JSONObject jsonStats) {
<add> Iterator<?> iter = jsonStats.keys();
<add> while (iter.hasNext()) {
<add> String key = (String) iter.next();
<add> try {
<add> stats[getStatIndex(key)] += jsonStats.getDouble(key);
<add>
<add> } catch (JSONException e) {
<add> DebugLog.e(TAG, e);
<add> }
<add> }
<add> }
<add>
<add> private void appendStat(double[] stats, BuildRune rune) {
<add> RuneInfo info = rune.info;
<add> Iterator<?> iter = info.stats.keys();
<add> while (iter.hasNext()) {
<add> String key = (String) iter.next();
<add> try {
<add> int f = getStatIndex(key);
<add> if ((f & FLAG_SCALING) != 0) {
<add> stats[f & ~FLAG_SCALING] += info.stats.getDouble(key) * champLevel * rune.count;
<add> } else {
<add> stats[f] += info.stats.getDouble(key) * rune.count;
<add> }
<add>
<add> } catch (JSONException e) {
<add> DebugLog.e(TAG, e);
<add> }
<add> }
<add> }
<add>
<add> private void calculateTotalStats() {
<add> calculateTotalStats(stats, champLevel);
<add> }
<add>
<add> private void calculateTotalStats(double[] stats, int champLevel) {
<add> // do some stat normalization...
<add> stats[STAT_CDR] = Math.min(MAX_CDR, stats[STAT_CDR] - stats[STAT_CD]);
<ide>
<ide> int levMinusOne = champLevel - 1;
<ide>
<del> stats[STAT_TOTAL_AR] = stats[STAT_AR] + champ.ar + champ.arG * levMinusOne;
<del> stats[STAT_TOTAL_AD] = stats[STAT_AD] + champ.ad + champ.adG * levMinusOne;
<del> stats[STAT_TOTAL_HP] = stats[STAT_HP] + champ.hp + champ.hpG * levMinusOne;
<del> stats[STAT_CD_MOD] = 1.0 - stats[STAT_CDR];
<del> stats[STAT_TOTAL_MS] = (stats[STAT_MS] + champ.ms) * stats[STAT_MSP] + stats[STAT_MS] + champ.ms;
<del> stats[STAT_TOTAL_AP] = stats[STAT_AP] * (stats[STAT_APP] + 1);
<del> stats[STAT_TOTAL_MR] = stats[STAT_MR] + champ.mr + champ.mrG * levMinusOne;
<del> stats[STAT_AS] = Math.min(champ.as * (1 + levMinusOne * champ.asG + stats[STAT_ASP]), MAX_ATTACK_SPEED);
<del> stats[STAT_LEVEL] = champLevel;
<del> stats[STAT_TOTAL_RANGE] = stats[STAT_RANGE] + champ.range;
<add> stats[STAT_TOTAL_AR] = stats[STAT_AR] + champ.ar + champ.arG * levMinusOne;
<add> stats[STAT_TOTAL_AD] = stats[STAT_AD] + champ.ad + champ.adG * levMinusOne;
<add> stats[STAT_TOTAL_HP] = stats[STAT_HP] + champ.hp + champ.hpG * levMinusOne;
<add> stats[STAT_CD_MOD] = 1.0 - stats[STAT_CDR];
<add> stats[STAT_TOTAL_MS] = (stats[STAT_MS] + champ.ms) * stats[STAT_MSP] + stats[STAT_MS] + champ.ms;
<add> stats[STAT_TOTAL_AP] = stats[STAT_AP] * (stats[STAT_APP] + 1);
<add> stats[STAT_TOTAL_MR] = stats[STAT_MR] + champ.mr + champ.mrG * levMinusOne;
<add> stats[STAT_AS] = Math.min(champ.as * (1 + levMinusOne * champ.asG + stats[STAT_ASP]), MAX_ATTACK_SPEED);
<add> stats[STAT_LEVEL] = champLevel;
<add> stats[STAT_TOTAL_RANGE] = stats[STAT_RANGE] + champ.range;
<ide> stats[STAT_TOTAL_MP] = stats[STAT_MP] + champ.mp + champ.mpG * levMinusOne;
<ide>
<del> stats[STAT_BONUS_AD] = stats[STAT_TOTAL_AD] - champ.ad;
<del> stats[STAT_BONUS_HP] = stats[STAT_TOTAL_HP] - champ.hp;
<del> stats[STAT_BONUS_MS] = stats[STAT_TOTAL_MS] - champ.ms;
<del> stats[STAT_BONUS_AR] = stats[STAT_TOTAL_AR] - champ.ar;
<del> stats[STAT_BONUS_MR] = stats[STAT_TOTAL_MR] - champ.mr;
<del> stats[STAT_LEVEL_MINUS_ONE] = stats[STAT_LEVEL] - 1;
<add> stats[STAT_BONUS_AD] = stats[STAT_TOTAL_AD] - champ.ad;
<add> stats[STAT_BONUS_HP] = stats[STAT_TOTAL_HP] - champ.hp;
<add> stats[STAT_BONUS_MS] = stats[STAT_TOTAL_MS] - champ.ms;
<add> stats[STAT_BONUS_AR] = stats[STAT_TOTAL_AR] - champ.ar;
<add> stats[STAT_BONUS_MR] = stats[STAT_TOTAL_MR] - champ.mr;
<add> stats[STAT_LEVEL_MINUS_ONE] = stats[STAT_LEVEL] - 1;
<ide> stats[STAT_CRIT_DMG] = stats[STAT_TOTAL_AD] * 2.0;
<ide>
<del> // pure stats...
<del> stats[STAT_AA_DPS] = stats[STAT_TOTAL_AD] * stats[STAT_AS];
<add> // pure stats...
<add> stats[STAT_AA_DPS] = stats[STAT_TOTAL_AD] * stats[STAT_AS];
<ide>
<ide> // static values...
<ide> stats[STAT_NAUTILUS_Q_CD] = 0.5;
<ide> stats[STAT_ONE] = 1;
<del> }
<add> }
<ide>
<ide> private static int addColor(int base, int value) {
<ide> double result = 1 - (1 - base / 256.0) * (1 - value / 256.0);
<ide> return Color.rgb(r, g, b);
<ide> }
<ide>
<del> public BuildRune addRune(RuneInfo rune) {
<del> return addRune(rune, 1, true);
<del> }
<del>
<del> public BuildRune addRune(RuneInfo rune, int count, boolean isAll) {
<del> // Check if this rune is already in the build...
<del>
<del> BuildRune r = null;
<del> for (BuildRune br : runeBuild) {
<del> if (br.id == rune.id) {
<del> r = br;
<del> break;
<del> }
<del> }
<del>
<del> if (r == null) {
<del> r = new BuildRune(rune, rune.id);
<del> runeBuild.add(r);
<del> r.listener = onRuneCountChangedListener;
<del> notifyRuneAdded(r);
<del> }
<del>
<del> r.addRune(count);
<del>
<del> recalculateStats();
<del>
<del> return r;
<del> }
<del>
<del> public void clearRunes() {
<del> for (BuildRune r : runeBuild) {
<del> r.listener = null;
<del> notifyRuneRemoved(r);
<del> }
<del>
<del> runeBuild.clear();
<del> recalculateStats();
<del> }
<del>
<del> public boolean canAdd(RuneInfo rune) {
<del> return runeCount[rune.runeType] + 1 <= RUNE_COUNT_MAX[rune.runeType];
<del> }
<del>
<del> public void removeRune(BuildRune rune) {
<del> rune.listener = null;
<del> runeBuild.remove(rune);
<del>
<del> recalculateStats();
<del> notifyRuneRemoved(rune);
<del> }
<del>
<del> private void onRuneCountChanged(BuildRune rune, int oldCount, int newCount) {
<del> int runeType = rune.info.runeType;
<del> if (runeCount[runeType] + (newCount - oldCount) > RUNE_COUNT_MAX[runeType]) {
<del> rune.count = oldCount;
<del> return;
<del> }
<del>
<del> runeCount[runeType] += (newCount - oldCount);
<del>
<del> if (rune.getCount() == 0) {
<del> removeRune(rune);
<del> } else {
<del> recalculateStats();
<del> }
<del> }
<del>
<del> public BuildSkill addActiveSkill(Skill skill, double base, double scaling, String scaleType, String bonusType) {
<del> BuildSkill sk = new BuildSkill();
<del> sk.skill = skill;
<del> sk.base = base;
<del> sk.scaleTypeId = getStatIndex(scaleType);
<del> sk.bonusTypeId = getStatIndex(bonusType);
<del> sk.scaling = scaling;
<del> activeSkills.add(sk);
<del>
<del> DebugLog.d(TAG, "Skill " + skill.name + " bonus: " + base + "; ");
<del>
<del> return sk;
<del> }
<del>
<del> public double[] calculateStatWithActives(int gold, int champLevel) {
<del> double[] s = new double[stats.length];
<del>
<del> int itemEndIndex = itemBuild.size();
<del> int buildCost = 0;
<del> for (int i = 0; i < itemBuild.size(); i++) {
<del> BuildItem item = itemBuild.get(i);
<del> int itemCost = item.costPer * item.count;
<del>
<del> if (buildCost + itemCost > gold) {
<del> itemEndIndex = i;
<del> break;
<del> } else {
<del> buildCost += itemCost;
<del> }
<del> }
<del>
<del> calculateStats(s, 0, itemEndIndex, true, champLevel);
<del>
<del> for (BuildSkill sk : activeSkills) {
<del> sk.totalBonus = s[sk.scaleTypeId] * sk.scaling + sk.base;
<del> s[sk.bonusTypeId] += sk.totalBonus;
<del> }
<del>
<del> calculateTotalStats(s, champLevel);
<del>
<del> return s;
<del> }
<del>
<del> public List<BuildSkill> getActives() {
<del> return activeSkills;
<del> }
<del>
<del> public void clearActiveSkills() {
<del> activeSkills.clear();
<del> }
<del>
<del>
<del> public void setChampion(ChampionInfo champ) {
<del> this.champ = champ;
<del>
<del> recalculateStats();
<del> }
<del>
<del> public void setChampionLevel(int level) {
<del> champLevel = level;
<del>
<del> recalculateStats();
<del> }
<del>
<del> public void registerObserver(BuildObserver observer) {
<del> observers.add(observer);
<del> }
<del>
<del> public void unregisterObserver(BuildObserver observer) {
<del> observers.remove(observer);
<del> }
<del>
<del> private void notifyBuildChanged() {
<del> for (BuildObserver o : observers) {
<del> o.onBuildChanged(this);
<del> }
<del> }
<del>
<del> private void notifyItemAdded(BuildItem item, boolean isNewItem) {
<del> for (BuildObserver o : observers) {
<del> o.onItemAdded(this, item, isNewItem);
<del> }
<del> }
<del>
<del> private void notifyRuneAdded(BuildRune rune) {
<del> for (BuildObserver o : observers) {
<del> o.onRuneAdded(this, rune);
<del> }
<del> }
<del>
<del> private void notifyRuneRemoved(BuildRune rune) {
<del> for (BuildObserver o : observers) {
<del> o.onRuneRemoved(this, rune);
<del> }
<del> }
<del>
<del> private void notifyBuildStatsChanged() {
<del> for (BuildObserver o : observers) {
<del> o.onBuildStatsChanged();
<del> }
<del> }
<del>
<del> private void normalizeValues() {
<del> if (enabledBuildStart < 0) {
<del> enabledBuildStart = 0;
<del> }
<del>
<del> if (enabledBuildEnd > itemBuild.size()) {
<del> enabledBuildEnd = itemBuild.size();
<del> }
<del> }
<del>
<del> public BuildItem getItem(int index) {
<del> return itemBuild.get(index);
<del> }
<del>
<del> public int getBuildSize() {
<del> return itemBuild.size();
<del> }
<del>
<del> public BuildRune getRune(int index) {
<del> return runeBuild.get(index);
<del> }
<del>
<del> public int getRuneCount() {
<del> return runeBuild.size();
<del> }
<del>
<del> public BuildItem getLastItem() {
<del> if (itemBuild.size() == 0) return null;
<del> return itemBuild.get(itemBuild.size() - 1);
<del> }
<del>
<del> public double getBonusHp() {
<del> return stats[STAT_HP];
<del> }
<del>
<del> public double getBonusHpRegen() {
<del> return stats[STAT_HPR];
<del> }
<del>
<del> public double getBonusMp() {
<del> if (champ.partype == ChampionInfo.TYPE_MANA) {
<del> return stats[STAT_MP];
<del> } else {
<del> return 0;
<del> }
<del> }
<del>
<del> public double getBonusMpRegen() {
<del> if (champ.partype == ChampionInfo.TYPE_MANA) {
<del> return stats[STAT_MPR];
<del> } else {
<del> return 0;
<del> }
<del> }
<del>
<del> public double getBonusAd() {
<del> return stats[STAT_AD];
<del> }
<del>
<del> public double getBonusAs() {
<del> return stats[STAT_ASP];
<del> }
<del>
<del> public double getBonusAr() {
<del> return stats[STAT_AR];
<del> }
<del>
<del> public double getBonusMr() {
<del> return stats[STAT_MR];
<del> }
<del>
<del> public double getBonusMs() {
<del> return stats[STAT_BONUS_MS];
<del> }
<del>
<del> public double getBonusRange() {
<del> return stats[STAT_RANGE];
<del> }
<del>
<del> public double getBonusAp() {
<del> return stats[STAT_BONUS_AP];
<del> }
<del>
<del> public double getBonusEnergy() {
<del> return stats[STAT_NRG];
<del> }
<del>
<del> public double getBonusEnergyRegen() {
<del> return stats[STAT_NRGR];
<del> }
<del>
<del> public double[] getRawStats() {
<del> return stats;
<del> }
<del>
<del> public double getStat(String key) {
<add> public BuildRune addRune(RuneInfo rune) {
<add> return addRune(rune, 1, true);
<add> }
<add>
<add> public BuildRune addRune(RuneInfo rune, int count, boolean isAll) {
<add> // Check if this rune is already in the build...
<add>
<add> BuildRune r = null;
<add> for (BuildRune br : runeBuild) {
<add> if (br.id == rune.id) {
<add> r = br;
<add> break;
<add> }
<add> }
<add>
<add> if (r == null) {
<add> r = new BuildRune(rune, rune.id);
<add> runeBuild.add(r);
<add> r.listener = onRuneCountChangedListener;
<add> notifyRuneAdded(r);
<add> }
<add>
<add> r.addRune(count);
<add>
<add> recalculateStats();
<add>
<add> return r;
<add> }
<add>
<add> public void clearRunes() {
<add> for (BuildRune r : runeBuild) {
<add> r.listener = null;
<add> notifyRuneRemoved(r);
<add> }
<add>
<add> runeBuild.clear();
<add> recalculateStats();
<add> }
<add>
<add> public boolean canAdd(RuneInfo rune) {
<add> return runeCount[rune.runeType] + 1 <= RUNE_COUNT_MAX[rune.runeType];
<add> }
<add>
<add> public void removeRune(BuildRune rune) {
<add> rune.listener = null;
<add> runeBuild.remove(rune);
<add>
<add> recalculateStats();
<add> notifyRuneRemoved(rune);
<add> }
<add>
<add> private void onRuneCountChanged(BuildRune rune, int oldCount, int newCount) {
<add> int runeType = rune.info.runeType;
<add> if (runeCount[runeType] + (newCount - oldCount) > RUNE_COUNT_MAX[runeType]) {
<add> rune.count = oldCount;
<add> return;
<add> }
<add>
<add> runeCount[runeType] += (newCount - oldCount);
<add>
<add> if (rune.getCount() == 0) {
<add> removeRune(rune);
<add> } else {
<add> recalculateStats();
<add> }
<add> }
<add>
<add> public BuildSkill addActiveSkill(Skill skill, double base, double scaling, String scaleType, String bonusType) {
<add> BuildSkill sk = new BuildSkill();
<add> sk.skill = skill;
<add> sk.base = base;
<add> sk.scaleTypeId = getStatIndex(scaleType);
<add> sk.bonusTypeId = getStatIndex(bonusType);
<add> sk.scaling = scaling;
<add> activeSkills.add(sk);
<add>
<add> DebugLog.d(TAG, "Skill " + skill.name + " bonus: " + base + "; ");
<add>
<add> return sk;
<add> }
<add>
<add> public double[] calculateStatWithActives(int gold, int champLevel) {
<add> double[] s = new double[stats.length];
<add>
<add> int itemEndIndex = itemBuild.size();
<add> int buildCost = 0;
<add> for (int i = 0; i < itemBuild.size(); i++) {
<add> BuildItem item = itemBuild.get(i);
<add> int itemCost = item.costPer * item.count;
<add>
<add> if (buildCost + itemCost > gold) {
<add> itemEndIndex = i;
<add> break;
<add> } else {
<add> buildCost += itemCost;
<add> }
<add> }
<add>
<add> calculateStats(s, 0, itemEndIndex, true, champLevel);
<add>
<add> for (BuildSkill sk : activeSkills) {
<add> sk.totalBonus = s[sk.scaleTypeId] * sk.scaling + sk.base;
<add> s[sk.bonusTypeId] += sk.totalBonus;
<add> }
<add>
<add> calculateTotalStats(s, champLevel);
<add>
<add> return s;
<add> }
<add>
<add> public List<BuildSkill> getActives() {
<add> return activeSkills;
<add> }
<add>
<add> public void clearActiveSkills() {
<add> activeSkills.clear();
<add> }
<add>
<add>
<add> public void setChampion(ChampionInfo champ) {
<add> this.champ = champ;
<add>
<add> recalculateStats();
<add> }
<add>
<add> public void setChampionLevel(int level) {
<add> champLevel = level;
<add>
<add> recalculateStats();
<add> }
<add>
<add> public void registerObserver(BuildObserver observer) {
<add> observers.add(observer);
<add> }
<add>
<add> public void unregisterObserver(BuildObserver observer) {
<add> observers.remove(observer);
<add> }
<add>
<add> private void notifyBuildChanged() {
<add> for (BuildObserver o : observers) {
<add> o.onBuildChanged(this);
<add> }
<add> }
<add>
<add> private void notifyItemAdded(BuildItem item, boolean isNewItem) {
<add> for (BuildObserver o : observers) {
<add> o.onItemAdded(this, item, isNewItem);
<add> }
<add> }
<add>
<add> private void notifyRuneAdded(BuildRune rune) {
<add> for (BuildObserver o : observers) {
<add> o.onRuneAdded(this, rune);
<add> }
<add> }
<add>
<add> private void notifyRuneRemoved(BuildRune rune) {
<add> for (BuildObserver o : observers) {
<add> o.onRuneRemoved(this, rune);
<add> }
<add> }
<add>
<add> private void notifyBuildStatsChanged() {
<add> for (BuildObserver o : observers) {
<add> o.onBuildStatsChanged();
<add> }
<add> }
<add>
<add> private void normalizeValues() {
<add> if (enabledBuildStart < 0) {
<add> enabledBuildStart = 0;
<add> }
<add>
<add> if (enabledBuildEnd > itemBuild.size()) {
<add> enabledBuildEnd = itemBuild.size();
<add> }
<add> }
<add>
<add> public BuildItem getItem(int index) {
<add> return itemBuild.get(index);
<add> }
<add>
<add> public int getBuildSize() {
<add> return itemBuild.size();
<add> }
<add>
<add> public BuildRune getRune(int index) {
<add> return runeBuild.get(index);
<add> }
<add>
<add> public int getRuneCount() {
<add> return runeBuild.size();
<add> }
<add>
<add> public BuildItem getLastItem() {
<add> if (itemBuild.size() == 0) return null;
<add> return itemBuild.get(itemBuild.size() - 1);
<add> }
<add>
<add> public double getBonusHp() {
<add> return stats[STAT_HP];
<add> }
<add>
<add> public double getBonusHpRegen() {
<add> return stats[STAT_HPR];
<add> }
<add>
<add> public double getBonusMp() {
<add> if (champ.partype == ChampionInfo.TYPE_MANA) {
<add> return stats[STAT_MP];
<add> } else {
<add> return 0;
<add> }
<add> }
<add>
<add> public double getBonusMpRegen() {
<add> if (champ.partype == ChampionInfo.TYPE_MANA) {
<add> return stats[STAT_MPR];
<add> } else {
<add> return 0;
<add> }
<add> }
<add>
<add> public double getBonusAd() {
<add> return stats[STAT_AD];
<add> }
<add>
<add> public double getBonusAs() {
<add> return stats[STAT_ASP];
<add> }
<add>
<add> public double getBonusAr() {
<add> return stats[STAT_AR];
<add> }
<add>
<add> public double getBonusMr() {
<add> return stats[STAT_MR];
<add> }
<add>
<add> public double getBonusMs() {
<add> return stats[STAT_BONUS_MS];
<add> }
<add>
<add> public double getBonusRange() {
<add> return stats[STAT_RANGE];
<add> }
<add>
<add> public double getBonusAp() {
<add> return stats[STAT_BONUS_AP];
<add> }
<add>
<add> public double getBonusEnergy() {
<add> return stats[STAT_NRG];
<add> }
<add>
<add> public double getBonusEnergyRegen() {
<add> return stats[STAT_NRGR];
<add> }
<add>
<add> public double[] getRawStats() {
<add> return stats;
<add> }
<add>
<add> public double getStat(String key) {
<ide> int statId = getStatIndex(key);
<ide> if (statId == STAT_NULL) return 0.0;
<ide>
<ide> stats[STAT_VI_W] = 0.00081632653 * stats[STAT_BONUS_AD];
<ide> }
<ide>
<del> return stats[statId];
<del> }
<add> return stats[statId];
<add> }
<ide>
<ide> public double getStat(int statId) {
<ide> if (statId == STAT_NULL) return 0.0;
<ide> return stats[statId];
<ide> }
<ide>
<del> public void reorder(int itemOldPosition, int itemNewPosition) {
<del> BuildItem item = itemBuild.get(itemOldPosition);
<del> itemBuild.remove(itemOldPosition);
<del> itemBuild.add(itemNewPosition, item);
<del>
<del> recalculateAllGroups();
<del>
<del> recalculateStats();
<del> notifyBuildStatsChanged();
<del> }
<del>
<del> public int getEnabledBuildStart() {
<del> return enabledBuildStart;
<del> }
<del>
<del> public int getEnabledBuildEnd() {
<del> return enabledBuildEnd;
<del> }
<del>
<del> public void setEnabledBuildStart(int start) {
<del> enabledBuildStart = start;
<del>
<del> recalculateStats();
<del> notifyBuildStatsChanged();
<del> }
<del>
<del> public void setEnabledBuildEnd(int end) {
<del> enabledBuildEnd = end;
<del>
<del> recalculateStats();
<del> notifyBuildStatsChanged();
<del> }
<del>
<del> public BuildSaveObject toSaveObject() {
<add> public void reorder(int itemOldPosition, int itemNewPosition) {
<add> BuildItem item = itemBuild.get(itemOldPosition);
<add> itemBuild.remove(itemOldPosition);
<add> itemBuild.add(itemNewPosition, item);
<add>
<add> recalculateAllGroups();
<add>
<add> recalculateStats();
<add> notifyBuildStatsChanged();
<add> }
<add>
<add> public int getEnabledBuildStart() {
<add> return enabledBuildStart;
<add> }
<add>
<add> public int getEnabledBuildEnd() {
<add> return enabledBuildEnd;
<add> }
<add>
<add> public void setEnabledBuildStart(int start) {
<add> enabledBuildStart = start;
<add>
<add> recalculateStats();
<add> notifyBuildStatsChanged();
<add> }
<add>
<add> public void setEnabledBuildEnd(int end) {
<add> enabledBuildEnd = end;
<add>
<add> recalculateStats();
<add> notifyBuildStatsChanged();
<add> }
<add>
<add> public BuildSaveObject toSaveObject() {
<ide> BuildSaveObject o = new BuildSaveObject();
<ide>
<del> for (BuildRune r : runeBuild) {
<del> o.runes.add(r.info.id);
<add> for (BuildRune r : runeBuild) {
<add> o.runes.add(r.info.id);
<ide> o.runes.add(r.count);
<del> }
<del>
<del> for (BuildItem i : itemBuild) {
<del> o.items.add(i.info.id);
<del> o.items.add(i.count);
<del> }
<add> }
<add>
<add> for (BuildItem i : itemBuild) {
<add> o.items.add(i.info.id);
<add> o.items.add(i.count);
<add> }
<ide>
<ide> o.buildName = buildName;
<ide> o.buildColor = generateColorBasedOnBuild();
<del> return o;
<del> }
<del>
<del> public void fromSaveObject(BuildSaveObject o) {
<add> return o;
<add> }
<add>
<add> public void fromSaveObject(BuildSaveObject o) {
<ide> clearItems();
<ide> clearRunes();
<ide>
<ide> int count = o.runes.size();
<del> for (int i = 0; i < count; i += 2) {
<del> addRune(runeLibrary.getRuneInfo(o.runes.get(i)), o.runes.get(i++), i + 2 >= count);
<del> }
<del>
<del> count = o.items.size();
<del> for (int i = 0; i < count; i += 2) {
<del> int itemId = o.items.get(i);
<del> int c = o.items.get(i + 1);
<del> addItem(itemLibrary.getItemInfo(itemId), c, i == count - 2);
<del> }
<add> for (int i = 0; i < count; i += 2) {
<add> addRune(runeLibrary.getRuneInfo(o.runes.get(i)), o.runes.get(i++), i + 2 >= count);
<add> }
<add>
<add> count = o.items.size();
<add> for (int i = 0; i < count; i += 2) {
<add> int itemId = o.items.get(i);
<add> int c = o.items.get(i + 1);
<add> addItem(itemLibrary.getItemInfo(itemId), c, i == count - 2);
<add> }
<ide>
<ide> buildName = o.buildName;
<del> }
<del>
<del> public static int getSuggestedColorForGroup(int groupId) {
<del> return GROUP_COLOR[groupId % GROUP_COLOR.length];
<del> }
<del>
<del> public static interface BuildObserver {
<del> public void onBuildChanged(Build build);
<del> public void onItemAdded(Build build, BuildItem item, boolean isNewItem);
<del> public void onRuneAdded(Build build, BuildRune rune);
<del> public void onRuneRemoved(Build build, BuildRune rune);
<del> public void onBuildStatsChanged();
<del> }
<del>
<del> public static class BuildItem {
<del> ItemInfo info;
<del> int group = -1;
<del> boolean active = true;
<del>
<del> int count = 1;
<del> int costPer = 0;
<del>
<del> int depth = 0;
<del>
<del> List<BuildItem> from;
<del> BuildItem to;
<del>
<del> private BuildItem(ItemInfo info) {
<del> this.info = info;
<del>
<del> from = new ArrayList<BuildItem>();
<del> }
<del>
<del> public int getId() {
<del> return info.id;
<del> }
<del> }
<del>
<del> public static class BuildRune {
<del> RuneInfo info;
<del> Object tag;
<del> int id;
<del>
<del> private int count;
<del> private OnRuneCountChangedListener listener;
<del> private OnRuneCountChangedListener onRuneCountChangedListener;
<del>
<del> private BuildRune(RuneInfo info, int id) {
<del> this.info = info;
<del> count = 0;
<del> this.id = id;
<del> }
<del>
<del> public void addRune() {
<del> addRune(1);
<del> }
<del>
<del> public void addRune(int n) {
<del> count += n;
<del>
<del> int c = count;
<del>
<del> listener.onRuneCountChanged(this, count - n, count);
<del> if (c == count && onRuneCountChangedListener != null) {
<del> onRuneCountChangedListener.onRuneCountChanged(this, count - n, count);
<del> }
<del> }
<del>
<del> public void removeRune() {
<del> if (count == 0) return;
<del> count--;
<del>
<del> int c = count;
<del>
<del> listener.onRuneCountChanged(this, count + 1, count);
<del> if (c == count && onRuneCountChangedListener != null) {
<del> onRuneCountChangedListener.onRuneCountChanged(this, count + 1, count);
<del> }
<del> }
<del>
<del> public int getCount() {
<del> return count;
<del> }
<del>
<del> public void setOnRuneCountChangedListener(OnRuneCountChangedListener listener) {
<del> onRuneCountChangedListener = listener;
<del> }
<del> }
<del>
<del> public static class BuildSkill {
<del> public double totalBonus;
<del> Skill skill;
<del> double base;
<del> double scaling;
<del> int scaleTypeId;
<del> int bonusTypeId;
<del> }
<del>
<del> public static interface OnRuneCountChangedListener {
<del> public void onRuneCountChanged(BuildRune rune, int oldCount, int newCount);
<del> }
<del>
<del> public static int getStatIndex(String statName) {
<del> Integer i;
<del> i = statKeyToIndex.get(statName);
<del> if (i == null) {
<del> throw new RuntimeException("Stat name not found: " + statName);
<del> }
<del>
<del> return i;
<del> }
<del>
<del> public static int getStatName(int statId) {
<del> int i;
<del> i = statIdToStringId.get(statId);
<del> if (i == 0) {
<del> throw new RuntimeException("Stat id does not have string resource: " + statId);
<del> }
<del>
<del> return i;
<del> }
<add> }
<add>
<add> public static int getSuggestedColorForGroup(int groupId) {
<add> return GROUP_COLOR[groupId % GROUP_COLOR.length];
<add> }
<add>
<add> public static interface BuildObserver {
<add> public void onBuildChanged(Build build);
<add> public void onItemAdded(Build build, BuildItem item, boolean isNewItem);
<add> public void onRuneAdded(Build build, BuildRune rune);
<add> public void onRuneRemoved(Build build, BuildRune rune);
<add> public void onBuildStatsChanged();
<add> }
<add>
<add> public static class BuildItem {
<add> ItemInfo info;
<add> int group = -1;
<add> boolean active = true;
<add>
<add> int count = 1;
<add> int costPer = 0;
<add>
<add> int depth = 0;
<add>
<add> List<BuildItem> from;
<add> BuildItem to;
<add>
<add> private BuildItem(ItemInfo info) {
<add> this.info = info;
<add>
<add> from = new ArrayList<BuildItem>();
<add> }
<add>
<add> public int getId() {
<add> return info.id;
<add> }
<add> }
<add>
<add> public static class BuildRune {
<add> RuneInfo info;
<add> Object tag;
<add> int id;
<add>
<add> private int count;
<add> private OnRuneCountChangedListener listener;
<add> private OnRuneCountChangedListener onRuneCountChangedListener;
<add>
<add> private BuildRune(RuneInfo info, int id) {
<add> this.info = info;
<add> count = 0;
<add> this.id = id;
<add> }
<add>
<add> public void addRune() {
<add> addRune(1);
<add> }
<add>
<add> public void addRune(int n) {
<add> count += n;
<add>
<add> int c = count;
<add>
<add> listener.onRuneCountChanged(this, count - n, count);
<add> if (c == count && onRuneCountChangedListener != null) {
<add> onRuneCountChangedListener.onRuneCountChanged(this, count - n, count);
<add> }
<add> }
<add>
<add> public void removeRune() {
<add> if (count == 0) return;
<add> count--;
<add>
<add> int c = count;
<add>
<add> listener.onRuneCountChanged(this, count + 1, count);
<add> if (c == count && onRuneCountChangedListener != null) {
<add> onRuneCountChangedListener.onRuneCountChanged(this, count + 1, count);
<add> }
<add> }
<add>
<add> public int getCount() {
<add> return count;
<add> }
<add>
<add> public void setOnRuneCountChangedListener(OnRuneCountChangedListener listener) {
<add> onRuneCountChangedListener = listener;
<add> }
<add> }
<add>
<add> public static class BuildSkill {
<add> public double totalBonus;
<add> Skill skill;
<add> double base;
<add> double scaling;
<add> int scaleTypeId;
<add> int bonusTypeId;
<add> }
<add>
<add> public static interface OnRuneCountChangedListener {
<add> public void onRuneCountChanged(BuildRune rune, int oldCount, int newCount);
<add> }
<add>
<add> public static int getStatIndex(String statName) {
<add> Integer i;
<add> i = statKeyToIndex.get(statName);
<add> if (i == null) {
<add> throw new RuntimeException("Stat name not found: " + statName);
<add> }
<add>
<add> return i;
<add> }
<add>
<add> public static int getStatName(int statId) {
<add> int i;
<add> i = statIdToStringId.get(statId);
<add> if (i == 0) {
<add> throw new RuntimeException("Stat id does not have string resource: " + statId);
<add> }
<add>
<add> return i;
<add> }
<ide>
<ide> public static int getSkillStatDesc(int statId) {
<ide> int i; |
|
Java | epl-1.0 | 570e7e6d33a936dc08434fe3528b6ed4f42bda0d | 0 | gayanper/eclipse-plugins-extras,gayanper/eclipse-plugins-extras | package org.gap.eclipse.plugins.extras.fixes.asist;
import java.util.ArrayList;
import java.util.List;
import java.util.Optional;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.jdt.core.Flags;
import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jdt.core.IField;
import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.jdt.core.IMember;
import org.eclipse.jdt.core.IMethod;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.core.Signature;
import org.eclipse.jdt.core.dom.AST;
import org.eclipse.jdt.core.dom.ASTNode;
import org.eclipse.jdt.core.dom.FieldAccess;
import org.eclipse.jdt.core.dom.IMethodBinding;
import org.eclipse.jdt.core.dom.ITypeBinding;
import org.eclipse.jdt.core.dom.MethodInvocation;
import org.eclipse.jdt.core.dom.SimpleName;
import org.eclipse.jdt.core.dom.rewrite.ASTRewrite;
import org.eclipse.jdt.core.search.IJavaSearchConstants;
import org.eclipse.jdt.core.search.IJavaSearchScope;
import org.eclipse.jdt.core.search.SearchEngine;
import org.eclipse.jdt.core.search.SearchMatch;
import org.eclipse.jdt.core.search.SearchParticipant;
import org.eclipse.jdt.core.search.SearchPattern;
import org.eclipse.jdt.core.search.SearchRequestor;
import org.eclipse.jdt.internal.ui.JavaPluginImages;
import org.eclipse.jdt.ui.text.java.IInvocationContext;
import org.eclipse.jdt.ui.text.java.IJavaCompletionProposal;
import org.eclipse.jdt.ui.text.java.IProblemLocation;
import org.eclipse.jdt.ui.text.java.IQuickAssistProcessor;
import org.eclipse.jdt.ui.text.java.correction.ASTRewriteCorrectionProposal;
import org.gap.eclipse.plugins.extras.fixes.PluginActivator;
@SuppressWarnings("restriction")
public class SearchStaticAssistProcessor implements IQuickAssistProcessor {
private static final String SEARCH_STATIC_ID = "org.gap.eclipse.plugins.extras.fixes.asist.SearchStaticAssistProcessor.assist"; //$NON-NLS-1$ ;
@Override
public boolean hasAssists(IInvocationContext context) throws CoreException {
return isApplicable(context);
}
@Override
public IJavaCompletionProposal[] getAssists(IInvocationContext context, IProblemLocation[] locations)
throws CoreException {
if (!isApplicable(context))
return null;
return findProposals(context, false);
}
private IJavaCompletionProposal[] findProposals(IInvocationContext context, boolean evalOnly) {
ASTNode node = context.getCoveringNode();
if (node instanceof SimpleName) {
Optional<String> expectedType = extractExpectedType((SimpleName) node);
SearchPattern fieldPattern = SearchPattern.createPattern(((SimpleName) node).getIdentifier(),
IJavaSearchConstants.FIELD, IJavaSearchConstants.DECLARATIONS, SearchPattern.R_EXACT_MATCH);
SearchPattern methodPattern = SearchPattern.createPattern(((SimpleName) node).getIdentifier(),
IJavaSearchConstants.METHOD, IJavaSearchConstants.DECLARATIONS, SearchPattern.R_EXACT_MATCH);
SearchEngine engine = new SearchEngine();
List<IMember> staticMatches = new ArrayList<>();
try {
engine.search(SearchPattern.createOrPattern(fieldPattern, methodPattern),
new SearchParticipant[] { SearchEngine.getDefaultSearchParticipant() },
createSearchScope(context),
new SearchRequestor() {
@Override
public void acceptSearchMatch(SearchMatch match) throws CoreException {
Object element = match.getElement();
if (element instanceof IMember) {
IMember member = (IMember) element;
if ((member.getFlags() & Flags.AccStatic) == Flags.AccStatic) {
if (expectedType.isPresent()) {
if (expectedType.get().equals(memberType(member))) {
staticMatches.add(member);
}
} else {
staticMatches.add(member);
}
}
}
}
}, new NullProgressMonitor());
List<IJavaCompletionProposal> proposals = new ArrayList<>(staticMatches.size());
for (IMember member : staticMatches) {
if (member instanceof IField) {
proposals.add(createFieldProposal(context, node, (IField) member));
} else if (member instanceof IMethod) {
proposals.add(createMethodProposal(context, node, (IMethod) member));
}
}
return proposals.toArray(new IJavaCompletionProposal[proposals.size()]);
} catch (CoreException e) {
PluginActivator.getDefault().log(IStatus.ERROR, e.getMessage(), e);
}
}
return null;
}
private String memberType(IMember member) throws JavaModelException {
if ((member instanceof IMethod)) {
return ((IMethod) member).getReturnType();
} else if (member instanceof IField) {
String rawSignature = ((IField) member).getTypeSignature();
String typeSignature = Signature.toString(rawSignature);
if (!typeSignature.contains(".") && (rawSignature.startsWith("Q") || rawSignature.startsWith("L"))) {
return "java.lang." + typeSignature;
} else {
return typeSignature;
}
}
return "";
}
private Optional<String> extractExpectedType(SimpleName node) {
if (node.getParent() instanceof MethodInvocation) {
MethodInvocation invocation = (MethodInvocation) node.getParent();
@SuppressWarnings("unchecked")
List<ASTNode> args = invocation.arguments();
int argIndex = 0;
for (int i = 0; i < args.size(); i++) {
if (args.get(i).equals(node)) {
argIndex = i;
break;
}
}
IMethodBinding binding = invocation.resolveMethodBinding();
if (binding != null) {
ITypeBinding[] parameterTypes = binding.getParameterTypes();
if (parameterTypes.length < argIndex) {
if (binding.isVarargs()) {
String qualifiedName = parameterTypes[parameterTypes.length - 1].getComponentType()
.getQualifiedName();
if (!"java.lang.Object".equals(qualifiedName)) {
return Optional.ofNullable(qualifiedName);
}
}
return Optional.empty();
} else {
if (binding.isVarargs() && parameterTypes[argIndex].isArray()) {
String qualifiedName = parameterTypes[argIndex].getComponentType().getQualifiedName();
if (!"java.lang.Object".equals(qualifiedName)) {
return Optional.ofNullable(qualifiedName);
}
} else {
return Optional.ofNullable(parameterTypes[argIndex].getTypeDeclaration().getQualifiedName());
}
}
}
}
return Optional.empty();
}
private static IJavaSearchScope createSearchScope(IInvocationContext context) throws JavaModelException {
return SearchEngine.createJavaSearchScope(new IJavaProject[] { context.getCompilationUnit().getJavaProject() },
IJavaSearchScope.SOURCES);
}
private IJavaCompletionProposal createFieldProposal(IInvocationContext context, ASTNode astNode, IField field) {
final ICompilationUnit cu = context.getCompilationUnit();
final AST ast = astNode.getAST();
final ASTRewrite rewrite = ASTRewrite.create(ast);
ASTRewriteCorrectionProposal proposal = new ASTRewriteCorrectionProposal(
"Replace with " + qualifiedName(field), cu, rewrite, 0,
JavaPluginImages.get(JavaPluginImages.IMG_CORRECTION_CHANGE));
proposal.setCommandId(SEARCH_STATIC_ID);
FieldAccess fieldAccess = ast.newFieldAccess();
fieldAccess.setExpression(ast.newName(field.getDeclaringType().getFullyQualifiedName()));
fieldAccess.setName(ast.newSimpleName(field.getElementName()));
rewrite.replace(astNode, fieldAccess, null);
return proposal;
}
private IJavaCompletionProposal createMethodProposal(IInvocationContext context, ASTNode astNode, IMethod method) {
final ICompilationUnit cu = context.getCompilationUnit();
final AST ast = astNode.getAST();
final ASTRewrite rewrite = ASTRewrite.create(ast);
ASTRewriteCorrectionProposal proposal = new ASTRewriteCorrectionProposal(
"Replace with " + qualifiedName(method) + "()", cu, rewrite, 0,
JavaPluginImages.get(JavaPluginImages.IMG_CORRECTION_CHANGE));
proposal.setCommandId(SEARCH_STATIC_ID);
MethodInvocation invocation = ast.newMethodInvocation();
invocation.setExpression(ast.newName(method.getDeclaringType().getFullyQualifiedName()));
invocation.setName(ast.newSimpleName(method.getElementName()));
rewrite.replace(astNode, invocation, null);
return proposal;
}
private String qualifiedName(IMember member) {
return member.getDeclaringType().getFullyQualifiedName() + "." + member.getElementName();
}
private boolean isApplicable(IInvocationContext context) {
return context.getCoveringNode() instanceof SimpleName;
}
}
| eclipse-plugins-extras-fixes/src/org/gap/eclipse/plugins/extras/fixes/asist/SearchStaticAssistProcessor.java | package org.gap.eclipse.plugins.extras.fixes.asist;
import java.util.ArrayList;
import java.util.List;
import java.util.Optional;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.jdt.core.Flags;
import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jdt.core.IField;
import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.jdt.core.IMember;
import org.eclipse.jdt.core.IMethod;
import org.eclipse.jdt.core.JavaCore;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.core.Signature;
import org.eclipse.jdt.core.dom.AST;
import org.eclipse.jdt.core.dom.ASTNode;
import org.eclipse.jdt.core.dom.FieldAccess;
import org.eclipse.jdt.core.dom.IMethodBinding;
import org.eclipse.jdt.core.dom.ITypeBinding;
import org.eclipse.jdt.core.dom.MethodInvocation;
import org.eclipse.jdt.core.dom.SimpleName;
import org.eclipse.jdt.core.dom.rewrite.ASTRewrite;
import org.eclipse.jdt.core.search.IJavaSearchConstants;
import org.eclipse.jdt.core.search.IJavaSearchScope;
import org.eclipse.jdt.core.search.SearchEngine;
import org.eclipse.jdt.core.search.SearchMatch;
import org.eclipse.jdt.core.search.SearchParticipant;
import org.eclipse.jdt.core.search.SearchPattern;
import org.eclipse.jdt.core.search.SearchRequestor;
import org.eclipse.jdt.internal.ui.JavaPluginImages;
import org.eclipse.jdt.ui.text.java.IInvocationContext;
import org.eclipse.jdt.ui.text.java.IJavaCompletionProposal;
import org.eclipse.jdt.ui.text.java.IProblemLocation;
import org.eclipse.jdt.ui.text.java.IQuickAssistProcessor;
import org.eclipse.jdt.ui.text.java.correction.ASTRewriteCorrectionProposal;
import org.gap.eclipse.plugins.extras.fixes.PluginActivator;
@SuppressWarnings("restriction")
public class SearchStaticAssistProcessor implements IQuickAssistProcessor {
private static final String SEARCH_STATIC_ID = "org.gap.eclipse.plugins.extras.fixes.asist.SearchStaticAssistProcessor.assist"; //$NON-NLS-1$ ;
@Override
public boolean hasAssists(IInvocationContext context) throws CoreException {
return isApplicable(context);
}
@Override
public IJavaCompletionProposal[] getAssists(IInvocationContext context, IProblemLocation[] locations)
throws CoreException {
if (!isApplicable(context))
return null;
return findProposals(context, false);
}
private IJavaCompletionProposal[] findProposals(IInvocationContext context, boolean evalOnly) {
ASTNode node = context.getCoveringNode();
if (node instanceof SimpleName) {
Optional<String> expectedType = extractExpectedType((SimpleName) node);
SearchPattern fieldPattern = SearchPattern.createPattern(((SimpleName) node).getIdentifier(),
IJavaSearchConstants.FIELD, IJavaSearchConstants.DECLARATIONS, SearchPattern.R_EXACT_MATCH);
SearchPattern methodPattern = SearchPattern.createPattern(((SimpleName) node).getIdentifier(),
IJavaSearchConstants.METHOD, IJavaSearchConstants.DECLARATIONS, SearchPattern.R_EXACT_MATCH);
SearchEngine engine = new SearchEngine();
List<IMember> staticMatches = new ArrayList<>();
try {
engine.search(SearchPattern.createOrPattern(fieldPattern, methodPattern),
new SearchParticipant[] { SearchEngine.getDefaultSearchParticipant() }, createSearchScope(),
new SearchRequestor() {
@Override
public void acceptSearchMatch(SearchMatch match) throws CoreException {
Object element = match.getElement();
if (element instanceof IMember) {
IMember member = (IMember) element;
if ((member.getFlags() & Flags.AccStatic) == Flags.AccStatic) {
if (expectedType.isPresent()) {
if (expectedType.get().equals(memberType(member))) {
staticMatches.add(member);
}
} else {
staticMatches.add(member);
}
}
}
}
}, new NullProgressMonitor());
List<IJavaCompletionProposal> proposals = new ArrayList<>(staticMatches.size());
for (IMember member : staticMatches) {
if (member instanceof IField) {
proposals.add(createFieldProposal(context, node, (IField) member));
} else if (member instanceof IMethod) {
proposals.add(createMethodProposal(context, node, (IMethod) member));
}
}
return proposals.toArray(new IJavaCompletionProposal[proposals.size()]);
} catch (CoreException e) {
PluginActivator.getDefault().log(IStatus.ERROR, e.getMessage(), e);
}
}
return null;
}
private String memberType(IMember member) throws JavaModelException {
if ((member instanceof IMethod)) {
return ((IMethod) member).getReturnType();
} else if (member instanceof IField) {
String rawSignature = ((IField) member).getTypeSignature();
String typeSignature = Signature.toString(rawSignature);
if (!typeSignature.contains(".") && (rawSignature.startsWith("Q") || rawSignature.startsWith("L"))) {
return "java.lang." + typeSignature;
} else {
return typeSignature;
}
}
return "";
}
private Optional<String> extractExpectedType(SimpleName node) {
if (node.getParent() instanceof MethodInvocation) {
MethodInvocation invocation = (MethodInvocation) node.getParent();
@SuppressWarnings("unchecked")
List<ASTNode> args = invocation.arguments();
int argIndex = 0;
for (int i = 0; i < args.size(); i++) {
if (args.get(i).equals(node)) {
argIndex = i;
break;
}
}
IMethodBinding binding = invocation.resolveMethodBinding();
if (binding != null) {
ITypeBinding[] parameterTypes = binding.getParameterTypes();
if (parameterTypes.length < argIndex) {
if (binding.isVarargs()) {
String qualifiedName = parameterTypes[parameterTypes.length - 1].getComponentType()
.getQualifiedName();
if (!"java.lang.Object".equals(qualifiedName)) {
return Optional.ofNullable(qualifiedName);
}
}
return Optional.empty();
} else {
if (binding.isVarargs() && parameterTypes[argIndex].isArray()) {
String qualifiedName = parameterTypes[argIndex].getComponentType().getQualifiedName();
if (!"java.lang.Object".equals(qualifiedName)) {
return Optional.ofNullable(qualifiedName);
}
} else {
return Optional.ofNullable(parameterTypes[argIndex].getTypeDeclaration().getQualifiedName());
}
}
}
}
return Optional.empty();
}
private static IJavaSearchScope createSearchScope() throws JavaModelException {
IJavaProject[] projects = JavaCore.create(ResourcesPlugin.getWorkspace().getRoot()).getJavaProjects();
return SearchEngine.createJavaSearchScope(projects, IJavaSearchScope.SOURCES);
}
private IJavaCompletionProposal createFieldProposal(IInvocationContext context, ASTNode astNode, IField field) {
final ICompilationUnit cu = context.getCompilationUnit();
final AST ast = astNode.getAST();
final ASTRewrite rewrite = ASTRewrite.create(ast);
ASTRewriteCorrectionProposal proposal = new ASTRewriteCorrectionProposal(
"Replace with " + qualifiedName(field), cu, rewrite, 0,
JavaPluginImages.get(JavaPluginImages.IMG_CORRECTION_CHANGE));
proposal.setCommandId(SEARCH_STATIC_ID);
FieldAccess fieldAccess = ast.newFieldAccess();
fieldAccess.setExpression(ast.newName(field.getDeclaringType().getFullyQualifiedName()));
fieldAccess.setName(ast.newSimpleName(field.getElementName()));
rewrite.replace(astNode, fieldAccess, null);
return proposal;
}
private IJavaCompletionProposal createMethodProposal(IInvocationContext context, ASTNode astNode, IMethod method) {
final ICompilationUnit cu = context.getCompilationUnit();
final AST ast = astNode.getAST();
final ASTRewrite rewrite = ASTRewrite.create(ast);
ASTRewriteCorrectionProposal proposal = new ASTRewriteCorrectionProposal(
"Replace with " + qualifiedName(method) + "()", cu, rewrite, 0,
JavaPluginImages.get(JavaPluginImages.IMG_CORRECTION_CHANGE));
proposal.setCommandId(SEARCH_STATIC_ID);
MethodInvocation invocation = ast.newMethodInvocation();
invocation.setExpression(ast.newName(method.getDeclaringType().getFullyQualifiedName()));
invocation.setName(ast.newSimpleName(method.getElementName()));
rewrite.replace(astNode, invocation, null);
return proposal;
}
private String qualifiedName(IMember member) {
return member.getDeclaringType().getFullyQualifiedName() + "." + member.getElementName();
}
private boolean isApplicable(IInvocationContext context) {
return context.getCoveringNode() instanceof SimpleName;
}
}
| Optimize search be scoping for current project of CU | eclipse-plugins-extras-fixes/src/org/gap/eclipse/plugins/extras/fixes/asist/SearchStaticAssistProcessor.java | Optimize search be scoping for current project of CU | <ide><path>clipse-plugins-extras-fixes/src/org/gap/eclipse/plugins/extras/fixes/asist/SearchStaticAssistProcessor.java
<ide> import java.util.List;
<ide> import java.util.Optional;
<ide>
<del>import org.eclipse.core.resources.ResourcesPlugin;
<ide> import org.eclipse.core.runtime.CoreException;
<ide> import org.eclipse.core.runtime.IStatus;
<ide> import org.eclipse.core.runtime.NullProgressMonitor;
<ide> import org.eclipse.jdt.core.IJavaProject;
<ide> import org.eclipse.jdt.core.IMember;
<ide> import org.eclipse.jdt.core.IMethod;
<del>import org.eclipse.jdt.core.JavaCore;
<ide> import org.eclipse.jdt.core.JavaModelException;
<ide> import org.eclipse.jdt.core.Signature;
<ide> import org.eclipse.jdt.core.dom.AST;
<ide> List<IMember> staticMatches = new ArrayList<>();
<ide> try {
<ide> engine.search(SearchPattern.createOrPattern(fieldPattern, methodPattern),
<del> new SearchParticipant[] { SearchEngine.getDefaultSearchParticipant() }, createSearchScope(),
<add> new SearchParticipant[] { SearchEngine.getDefaultSearchParticipant() },
<add> createSearchScope(context),
<ide> new SearchRequestor() {
<ide>
<ide> @Override
<ide> return Optional.empty();
<ide> }
<ide>
<del> private static IJavaSearchScope createSearchScope() throws JavaModelException {
<del> IJavaProject[] projects = JavaCore.create(ResourcesPlugin.getWorkspace().getRoot()).getJavaProjects();
<del> return SearchEngine.createJavaSearchScope(projects, IJavaSearchScope.SOURCES);
<add> private static IJavaSearchScope createSearchScope(IInvocationContext context) throws JavaModelException {
<add> return SearchEngine.createJavaSearchScope(new IJavaProject[] { context.getCompilationUnit().getJavaProject() },
<add> IJavaSearchScope.SOURCES);
<ide> }
<ide>
<ide> private IJavaCompletionProposal createFieldProposal(IInvocationContext context, ASTNode astNode, IField field) { |
|
Java | apache-2.0 | a2825801ec17814ff8ee34e7275dbaa06dca0f44 | 0 | NitorCreations/javaxdelta,NitorCreations/javaxdelta | /*
* Copyright (c) 2003, 2007 s IT Solutions AT Spardat GmbH.
*
* 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.
*
*/
package at.spardat.xma.xdelta;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.zip.ZipException;
import org.apache.commons.compress.archivers.zip.ExtraFieldUtils;
import org.apache.commons.compress.archivers.zip.ZipArchiveEntry;
import org.apache.commons.compress.archivers.zip.ZipArchiveOutputStream;
import org.apache.commons.compress.archivers.zip.ZipFile;
import com.nothome.delta.GDiffPatcher;
import com.nothome.delta.PatchException;
/**
* This class applys a zip file containing deltas created with {@link JarDelta} using
* {@link com.nothome.delta.GDiffPatcher} on the files contained in the jar file.
* The result of this operation is not binary equal to the original target zip file.
* Timestamps of files and directories are not reconstructed. But the contents of all
* files in the reconstructed target zip file are complely equal to their originals.
*
* @author s2877
*/
public class JarPatcher {
/** The patch name. */
private final String patchName;
/** The source name. */
private final String sourceName;
/** The buffer. */
private final byte[] buffer = new byte[8 * 1024];
/** The next. */
private String next = null;
/**
* Applies the differences in patch to source to create the target file. All binary difference files
* are applied to their corresponding file in source using {@link com.nothome.delta.GDiffPatcher}.
* All other files listed in <code>META-INF/file.list</code> are copied from patch to output.
*
* @param patch a zip file created by {@link JarDelta#computeDelta(String, String, ZipFile, ZipFile, ZipArchiveOutputStream)}
* containing the patches to apply
* @param source the original zip file, where the patches have to be applied
* @param output the patched zip file to create
* @param list the list
* @throws IOException if an error occures reading or writing any entry in a zip file
*/
public void applyDelta(ZipFile patch, ZipFile source, ZipArchiveOutputStream output, BufferedReader list) throws IOException {
applyDelta(patch, source, output, list, "");
patch.close();
}
/**
* Apply delta.
*
* @param patch the patch
* @param source the source
* @param output the output
* @param list the list
* @param prefix the prefix
* @throws IOException Signals that an I/O exception has occurred.
*/
public void applyDelta(ZipFile patch, ZipFile source, ZipArchiveOutputStream output, BufferedReader list, String prefix) throws IOException {
String fileName = null;
try {
for (fileName = (next == null ? list.readLine() : next); fileName != null; fileName = (next == null ? list.readLine() : next)) {
if (next != null)
next = null;
if (!fileName.startsWith(prefix)) {
next = fileName;
return;
}
int crcDelim = fileName.lastIndexOf(':');
int crcStart = fileName.lastIndexOf('|');
long crc = Long.valueOf(fileName.substring(crcStart + 1, crcDelim), 16);
long crcSrc = Long.valueOf(fileName.substring(crcDelim + 1), 16);
fileName = fileName.substring(prefix.length(), crcStart);
if ("META-INF/file.list".equalsIgnoreCase(fileName))
continue;
if (fileName.contains("!")) {
String[] embeds = fileName.split("\\!");
ZipArchiveEntry original = getEntry(source, embeds[0], crcSrc);
File originalFile = File.createTempFile("jardelta-tmp-origin-", ".zip");
File outputFile = File.createTempFile("jardelta-tmp-output-", ".zip");
Exception thrown = null;
try (FileOutputStream out = new FileOutputStream(originalFile); InputStream in = source.getInputStream(original)) {
int read = 0;
while (-1 < (read = in.read(buffer))) {
out.write(buffer, 0, read);
}
out.flush();
applyDelta(patch, new ZipFile(originalFile), new ZipArchiveOutputStream(outputFile), list, prefix + embeds[0] + "!");
} catch (Exception e) {
thrown = e;
throw e;
} finally {
originalFile.delete();
try (FileInputStream in = new FileInputStream(outputFile)) {
if (thrown == null) {
ZipArchiveEntry outEntry = copyEntry(original);
output.putArchiveEntry(outEntry);
int read = 0;
while (-1 < (read = in.read(buffer))) {
output.write(buffer, 0, read);
}
output.flush();
output.closeArchiveEntry();
}
} finally {
outputFile.delete();
}
}
} else {
try {
ZipArchiveEntry patchEntry = getEntry(patch, prefix + fileName, crc);
if (patchEntry != null) { // new Entry
ZipArchiveEntry outputEntry = JarDelta.entryToNewName(patchEntry, fileName);
output.putArchiveEntry(outputEntry);
if (!patchEntry.isDirectory()) {
try (InputStream in = patch.getInputStream(patchEntry)) {
int read = 0;
while (-1 < (read = in.read(buffer))) {
output.write(buffer, 0, read);
}
}
}
closeEntry(output, outputEntry, crc);
} else {
ZipArchiveEntry sourceEntry = getEntry(source, fileName, crcSrc);
if (sourceEntry == null) {
throw new FileNotFoundException(fileName + " not found in " + sourceName + " or " + patchName);
}
if (sourceEntry.isDirectory()) {
ZipArchiveEntry outputEntry = new ZipArchiveEntry(sourceEntry);
output.putArchiveEntry(outputEntry);
closeEntry(output, outputEntry, crc);
continue;
}
patchEntry = getPatchEntry(patch, prefix + fileName + ".gdiff", crc);
if (patchEntry != null) { // changed Entry
ZipArchiveEntry outputEntry = new ZipArchiveEntry(sourceEntry);
outputEntry.setTime(patchEntry.getTime());
output.putArchiveEntry(outputEntry);
byte[] sourceBytes = new byte[(int) sourceEntry.getSize()];
try (InputStream sourceStream = source.getInputStream(sourceEntry)) {
for (int erg = sourceStream.read(sourceBytes); erg < sourceBytes.length; erg += sourceStream.read(sourceBytes, erg, sourceBytes.length - erg));
}
InputStream patchStream = patch.getInputStream(patchEntry);
GDiffPatcher diffPatcher = new GDiffPatcher();
diffPatcher.patch(sourceBytes, patchStream, output);
patchStream.close();
outputEntry.setCrc(crc);
closeEntry(output, outputEntry, crc);
} else { // unchanged Entry
ZipArchiveEntry outputEntry = new ZipArchiveEntry(sourceEntry);
if (JarDelta.zipFilesPattern.matcher(sourceEntry.getName()).matches()) {
crc = sourceEntry.getCrc();
}
output.putArchiveEntry(outputEntry);
try (InputStream in = source.getInputStream(sourceEntry)) {
int read = 0;
while (-1 < (read = in.read(buffer))) {
output.write(buffer, 0, read);
}
}
output.flush();
closeEntry(output, outputEntry, crc);
}
}
} catch (PatchException pe) {
IOException ioe = new IOException();
ioe.initCause(pe);
throw ioe;
}
}
}
} catch (Exception e) {
System.err.println(prefix + fileName);
throw e;
} finally {
source.close();
output.close();
}
}
/**
* Gets the entry.
*
* @param source the source
* @param name the name
* @param crc the crc
* @return the entry
*/
private ZipArchiveEntry getEntry(ZipFile source, String name, long crc) {
for (ZipArchiveEntry next : source.getEntries(name)) {
if (next.getCrc() == crc)
return next;
}
if (!JarDelta.zipFilesPattern.matcher(name).matches()) {
return null;
} else {
return source.getEntry(name);
}
}
/**
* Gets the patch entry.
*
* @param source the source
* @param name the name
* @param crc the crc
* @return the patch entry
*/
private ZipArchiveEntry getPatchEntry(ZipFile source, String name, long crc) {
for (ZipArchiveEntry next : source.getEntries(name)) {
long nextCrc = Long.parseLong(next.getComment());
if (nextCrc == crc)
return next;
}
return null;
}
/**
* Close entry.
*
* @param output the output
* @param outEntry the out entry
* @param crc the crc
* @throws IOException Signals that an I/O exception has occurred.
*/
private void closeEntry(ZipArchiveOutputStream output, ZipArchiveEntry outEntry, long crc) throws IOException {
output.flush();
output.closeArchiveEntry();
if (outEntry.getCrc() != crc)
throw new IOException("CRC mismatch for " + outEntry.getName());
}
/**
* Instantiates a new jar patcher.
*
* @param patchName the patch name
* @param sourceName the source name
*/
public JarPatcher(String patchName, String sourceName) {
this.patchName = patchName;
this.sourceName = sourceName;
}
/**
* Main method to make {@link #applyDelta(ZipFile, ZipFile, ZipArchiveOutputStream, BufferedReader)} available at
* the command line.<br>
* usage JarPatcher source patch output
*
* @param args the arguments
* @throws IOException Signals that an I/O exception has occurred.
*/
public static void main(String[] args) throws IOException {
String patchName = null;
String outputName = null;
String sourceName = null;
if (args.length == 0) {
System.err.println("usage JarPatcher patch [output [source]]");
System.exit(1);
} else {
patchName = args[0];
if (args.length > 1) {
outputName = args[1];
if (args.length > 2) {
sourceName = args[2];
}
}
}
ZipFile patch = new ZipFile(patchName);
ZipArchiveEntry listEntry = patch.getEntry("META-INF/file.list");
if (listEntry == null) {
System.err.println("Invalid patch - list entry 'META-INF/file.list' not found");
System.exit(2);
}
BufferedReader list = new BufferedReader(new InputStreamReader(patch.getInputStream(listEntry)));
String next = list.readLine();
if (sourceName == null) {
sourceName = next;
}
next = list.readLine();
if (outputName == null) {
outputName = next;
}
int ignoreSourcePaths = Integer.parseInt(System.getProperty("patcher.ignoreSourcePathElements", "0"));
int ignoreOutputPaths = Integer.parseInt(System.getProperty("patcher.ignoreOutputPathElements", "0"));
Path sourcePath = Paths.get(sourceName);
Path outputPath = Paths.get(outputName);
if (ignoreOutputPaths >= outputPath.getNameCount()) {
patch.close();
StringBuilder b = new StringBuilder().append("Not enough path elements to ignore in output (").append(ignoreOutputPaths).append(" in ").append(outputName).append(")");
throw new IOException(b.toString());
}
if (ignoreSourcePaths >= sourcePath.getNameCount()) {
patch.close();
StringBuilder b = new StringBuilder().append("Not enough path elements to ignore in source (").append(sourcePath).append(" in ").append(sourceName).append(")");
throw new IOException(b.toString());
}
sourcePath = sourcePath.subpath(ignoreSourcePaths, sourcePath.getNameCount());
outputPath = outputPath.subpath(ignoreOutputPaths, outputPath.getNameCount());
File sourceFile = sourcePath.toFile();
File outputFile = outputPath.toFile();
if (!(outputFile.getAbsoluteFile().getParentFile().mkdirs() || outputFile.getAbsoluteFile().getParentFile().exists())) {
patch.close();
throw new IOException("Failed to create " + outputFile.getAbsolutePath());
}
new JarPatcher(patchName, sourceFile.getName()).applyDelta(patch, new ZipFile(sourceFile), new ZipArchiveOutputStream(new FileOutputStream(outputFile)), list);
list.close();
}
/**
* Entry to new name.
*
* @param source the source
* @param name the name
* @return the zip archive entry
* @throws ZipException the zip exception
*/
private ZipArchiveEntry copyEntry(ZipArchiveEntry source) throws ZipException {
ZipArchiveEntry ret = new ZipArchiveEntry(source.getName());
byte[] extra = source.getExtra();
if (extra != null) {
ret.setExtraFields(ExtraFieldUtils.parse(extra, true, ExtraFieldUtils.UnparseableExtraField.READ));
} else {
ret.setExtra(ExtraFieldUtils.mergeLocalFileDataData(source.getExtraFields(true)));
}
ret.setInternalAttributes(source.getInternalAttributes());
ret.setExternalAttributes(source.getExternalAttributes());
ret.setExtraFields(source.getExtraFields(true));
return ret;
}
}
| src/main/java/at/spardat/xma/xdelta/JarPatcher.java | /*
* Copyright (c) 2003, 2007 s IT Solutions AT Spardat GmbH.
*
* 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.
*
*/
package at.spardat.xma.xdelta;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.zip.ZipException;
import org.apache.commons.compress.archivers.zip.ExtraFieldUtils;
import org.apache.commons.compress.archivers.zip.ZipArchiveEntry;
import org.apache.commons.compress.archivers.zip.ZipArchiveOutputStream;
import org.apache.commons.compress.archivers.zip.ZipFile;
import com.nothome.delta.GDiffPatcher;
import com.nothome.delta.PatchException;
/**
* This class applys a zip file containing deltas created with {@link JarDelta} using
* {@link com.nothome.delta.GDiffPatcher} on the files contained in the jar file.
* The result of this operation is not binary equal to the original target zip file.
* Timestamps of files and directories are not reconstructed. But the contents of all
* files in the reconstructed target zip file are complely equal to their originals.
*
* @author s2877
*/
public class JarPatcher {
/** The patch name. */
private final String patchName;
/** The source name. */
private final String sourceName;
/** The buffer. */
private final byte[] buffer = new byte[8 * 1024];
/** The next. */
private String next = null;
/**
* Applies the differences in patch to source to create the target file. All binary difference files
* are applied to their corresponding file in source using {@link com.nothome.delta.GDiffPatcher}.
* All other files listed in <code>META-INF/file.list</code> are copied from patch to output.
*
* @param patch a zip file created by {@link JarDelta#computeDelta(String, String, ZipFile, ZipFile, ZipArchiveOutputStream)}
* containing the patches to apply
* @param source the original zip file, where the patches have to be applied
* @param output the patched zip file to create
* @param list the list
* @throws IOException if an error occures reading or writing any entry in a zip file
*/
public void applyDelta(ZipFile patch, ZipFile source, ZipArchiveOutputStream output, BufferedReader list) throws IOException {
applyDelta(patch, source, output, list, "");
patch.close();
}
/**
* Apply delta.
*
* @param patch the patch
* @param source the source
* @param output the output
* @param list the list
* @param prefix the prefix
* @throws IOException Signals that an I/O exception has occurred.
*/
public void applyDelta(ZipFile patch, ZipFile source, ZipArchiveOutputStream output, BufferedReader list, String prefix) throws IOException {
String fileName = null;
try {
for (fileName = (next == null ? list.readLine() : next); fileName != null; fileName = (next == null ? list.readLine() : next)) {
if (next != null)
next = null;
if (!fileName.startsWith(prefix)) {
next = fileName;
return;
}
int crcDelim = fileName.lastIndexOf(':');
int crcStart = fileName.lastIndexOf('|');
long crc = Long.valueOf(fileName.substring(crcStart + 1, crcDelim), 16);
long crcSrc = Long.valueOf(fileName.substring(crcDelim + 1), 16);
fileName = fileName.substring(prefix.length(), crcStart);
if ("META-INF/file.list".equalsIgnoreCase(fileName))
continue;
if (fileName.contains("!")) {
String[] embeds = fileName.split("\\!");
ZipArchiveEntry original = getEntry(source, embeds[0], crcSrc);
File originalFile = File.createTempFile("jardelta-tmp-origin-", ".zip");
File outputFile = File.createTempFile("jardelta-tmp-output-", ".zip");
Exception thrown = null;
try (FileOutputStream out = new FileOutputStream(originalFile); InputStream in = source.getInputStream(original)) {
int read = 0;
while (-1 < (read = in.read(buffer))) {
out.write(buffer, 0, read);
}
out.flush();
applyDelta(patch, new ZipFile(originalFile), new ZipArchiveOutputStream(outputFile), list, prefix + embeds[0] + "!");
} catch (Exception e) {
thrown = e;
throw e;
} finally {
originalFile.delete();
try (FileInputStream in = new FileInputStream(outputFile)) {
if (thrown == null) {
ZipArchiveEntry outEntry = copyEntry(original);
output.putArchiveEntry(outEntry);
int read = 0;
while (-1 < (read = in.read(buffer))) {
output.write(buffer, 0, read);
}
output.flush();
output.closeArchiveEntry();
}
} finally {
outputFile.delete();
}
}
} else {
try {
ZipArchiveEntry patchEntry = getEntry(patch, prefix + fileName, crc);
if (patchEntry != null) { // new Entry
ZipArchiveEntry outputEntry = JarDelta.entryToNewName(patchEntry, fileName);
output.putArchiveEntry(outputEntry);
if (!patchEntry.isDirectory()) {
try (InputStream in = patch.getInputStream(patchEntry)) {
int read = 0;
while (-1 < (read = in.read(buffer))) {
output.write(buffer, 0, read);
}
}
}
closeEntry(output, outputEntry, crc);
} else {
ZipArchiveEntry sourceEntry = getEntry(source, fileName, crcSrc);
if (sourceEntry == null) {
throw new FileNotFoundException(fileName + " not found in " + sourceName + " or " + patchName);
}
if (sourceEntry.isDirectory()) {
ZipArchiveEntry outputEntry = new ZipArchiveEntry(sourceEntry);
output.putArchiveEntry(outputEntry);
closeEntry(output, outputEntry, crc);
continue;
}
patchEntry = getPatchEntry(patch, prefix + fileName + ".gdiff", crc);
if (patchEntry != null) { // changed Entry
ZipArchiveEntry outputEntry = new ZipArchiveEntry(sourceEntry);
outputEntry.setTime(patchEntry.getTime());
output.putArchiveEntry(outputEntry);
byte[] sourceBytes = new byte[(int) sourceEntry.getSize()];
try (InputStream sourceStream = source.getInputStream(sourceEntry)) {
for (int erg = sourceStream.read(sourceBytes); erg < sourceBytes.length; erg += sourceStream.read(sourceBytes, erg, sourceBytes.length - erg));
}
InputStream patchStream = patch.getInputStream(patchEntry);
GDiffPatcher diffPatcher = new GDiffPatcher();
diffPatcher.patch(sourceBytes, patchStream, output);
patchStream.close();
outputEntry.setCrc(crc);
closeEntry(output, outputEntry, crc);
} else { // unchanged Entry
ZipArchiveEntry outputEntry = new ZipArchiveEntry(sourceEntry);
output.putArchiveEntry(outputEntry);
try (InputStream in = source.getInputStream(sourceEntry)) {
int read = 0;
while (-1 < (read = in.read(buffer))) {
output.write(buffer, 0, read);
}
}
output.flush();
closeEntry(output, outputEntry, crc);
}
}
} catch (PatchException pe) {
IOException ioe = new IOException();
ioe.initCause(pe);
throw ioe;
}
}
}
} catch (Exception e) {
System.err.println(prefix + fileName);
throw e;
} finally {
source.close();
output.close();
}
}
/**
* Gets the entry.
*
* @param source the source
* @param name the name
* @param crc the crc
* @return the entry
*/
private ZipArchiveEntry getEntry(ZipFile source, String name, long crc) {
for (ZipArchiveEntry next : source.getEntries(name)) {
if (next.getCrc() == crc)
return next;
}
if (!JarDelta.zipFilesPattern.matcher(name).matches()) {
return null;
} else {
return source.getEntry(name);
}
}
/**
* Gets the patch entry.
*
* @param source the source
* @param name the name
* @param crc the crc
* @return the patch entry
*/
private ZipArchiveEntry getPatchEntry(ZipFile source, String name, long crc) {
for (ZipArchiveEntry next : source.getEntries(name)) {
long nextCrc = Long.parseLong(next.getComment());
if (nextCrc == crc)
return next;
}
return null;
}
/**
* Close entry.
*
* @param output the output
* @param outEntry the out entry
* @param crc the crc
* @throws IOException Signals that an I/O exception has occurred.
*/
private void closeEntry(ZipArchiveOutputStream output, ZipArchiveEntry outEntry, long crc) throws IOException {
output.flush();
output.closeArchiveEntry();
if (outEntry.getCrc() != crc)
throw new IOException("CRC mismatch for " + outEntry.getName());
}
/**
* Instantiates a new jar patcher.
*
* @param patchName the patch name
* @param sourceName the source name
*/
public JarPatcher(String patchName, String sourceName) {
this.patchName = patchName;
this.sourceName = sourceName;
}
/**
* Main method to make {@link #applyDelta(ZipFile, ZipFile, ZipArchiveOutputStream, BufferedReader)} available at
* the command line.<br>
* usage JarPatcher source patch output
*
* @param args the arguments
* @throws IOException Signals that an I/O exception has occurred.
*/
public static void main(String[] args) throws IOException {
String patchName = null;
String outputName = null;
String sourceName = null;
if (args.length == 0) {
System.err.println("usage JarPatcher patch [output [source]]");
System.exit(1);
} else {
patchName = args[0];
if (args.length > 1) {
outputName = args[1];
if (args.length > 2) {
sourceName = args[2];
}
}
}
ZipFile patch = new ZipFile(patchName);
ZipArchiveEntry listEntry = patch.getEntry("META-INF/file.list");
if (listEntry == null) {
System.err.println("Invalid patch - list entry 'META-INF/file.list' not found");
System.exit(2);
}
BufferedReader list = new BufferedReader(new InputStreamReader(patch.getInputStream(listEntry)));
String next = list.readLine();
if (sourceName == null) {
sourceName = next;
}
next = list.readLine();
if (outputName == null) {
outputName = next;
}
int ignoreSourcePaths = Integer.parseInt(System.getProperty("patcher.ignoreSourcePathElements", "0"));
int ignoreOutputPaths = Integer.parseInt(System.getProperty("patcher.ignoreOutputPathElements", "0"));
Path sourcePath = Paths.get(sourceName);
Path outputPath = Paths.get(outputName);
if (ignoreOutputPaths >= outputPath.getNameCount()) {
patch.close();
StringBuilder b = new StringBuilder().append("Not enough path elements to ignore in output (").append(ignoreOutputPaths).append(" in ").append(outputName).append(")");
throw new IOException(b.toString());
}
if (ignoreSourcePaths >= sourcePath.getNameCount()) {
patch.close();
StringBuilder b = new StringBuilder().append("Not enough path elements to ignore in source (").append(sourcePath).append(" in ").append(sourceName).append(")");
throw new IOException(b.toString());
}
sourcePath = sourcePath.subpath(ignoreSourcePaths, sourcePath.getNameCount());
outputPath = outputPath.subpath(ignoreOutputPaths, outputPath.getNameCount());
File sourceFile = sourcePath.toFile();
File outputFile = outputPath.toFile();
if (!(outputFile.getAbsoluteFile().getParentFile().mkdirs() || outputFile.getAbsoluteFile().getParentFile().exists())) {
patch.close();
throw new IOException("Failed to create " + outputFile.getAbsolutePath());
}
new JarPatcher(patchName, sourceFile.getName()).applyDelta(patch, new ZipFile(sourceFile), new ZipArchiveOutputStream(new FileOutputStream(outputFile)), list);
list.close();
}
/**
* Entry to new name.
*
* @param source the source
* @param name the name
* @return the zip archive entry
* @throws ZipException the zip exception
*/
private ZipArchiveEntry copyEntry(ZipArchiveEntry source) throws ZipException {
ZipArchiveEntry ret = new ZipArchiveEntry(source.getName());
byte[] extra = source.getExtra();
if (extra != null) {
ret.setExtraFields(ExtraFieldUtils.parse(extra, true, ExtraFieldUtils.UnparseableExtraField.READ));
} else {
ret.setExtra(ExtraFieldUtils.mergeLocalFileDataData(source.getExtraFields(true)));
}
ret.setInternalAttributes(source.getInternalAttributes());
ret.setExternalAttributes(source.getExternalAttributes());
ret.setExtraFields(source.getExtraFields(true));
return ret;
}
}
| Fix crc bug for internal zip entries that have changed in previous patchings
| src/main/java/at/spardat/xma/xdelta/JarPatcher.java | Fix crc bug for internal zip entries that have changed in previous patchings | <ide><path>rc/main/java/at/spardat/xma/xdelta/JarPatcher.java
<ide> closeEntry(output, outputEntry, crc);
<ide> } else { // unchanged Entry
<ide> ZipArchiveEntry outputEntry = new ZipArchiveEntry(sourceEntry);
<add> if (JarDelta.zipFilesPattern.matcher(sourceEntry.getName()).matches()) {
<add> crc = sourceEntry.getCrc();
<add> }
<ide> output.putArchiveEntry(outputEntry);
<ide> try (InputStream in = source.getInputStream(sourceEntry)) {
<ide> int read = 0; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.