You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
397 lines
12 KiB
JavaScript
397 lines
12 KiB
JavaScript
/*
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
*/
|
|
|
|
var SETTINGS = {
|
|
cacheversion: "v1.6.6_0",
|
|
activitylog_maxlength: 500,
|
|
maptileurls: {
|
|
liberty: {
|
|
url: "https://maps.netsyms.net/styles/osm-liberty/{z}/{x}/{y}.png",
|
|
json: "https://maps.netsyms.net/styles/osm-liberty/style.json",
|
|
name: "Light",
|
|
bgcolor: "#EFEFEF"
|
|
},
|
|
libertydark: {
|
|
url: "https://maps.netsyms.net/styles/osm-liberty-dark/{z}/{x}/{y}.png",
|
|
json: "https://maps.netsyms.net/styles/osm-liberty-dark/style.json",
|
|
name: "Dark",
|
|
bgcolor: "#1A1A1A"
|
|
},
|
|
terrain: {
|
|
url: "https://maps.netsyms.net/styles/klokantech-terrain/{z}/{x}/{y}.png",
|
|
json: "https://maps.netsyms.net/styles/klokantech-terrain/style.json",
|
|
name: "Terrain",
|
|
bgcolor: "#EDF5F3"
|
|
},
|
|
satellite: {
|
|
url: "https://api.mapbox.com/styles/v1/mapbox/satellite-streets-v11/tiles/{z}/{x}/{y}?access_token={mapboxpublictoken}",
|
|
json: "mapbox://styles/mapbox/satellite-streets-v11",
|
|
name: "Satellite",
|
|
bgcolor: "#EDF5F3"
|
|
},
|
|
fiord: {
|
|
url: "https://maps.netsyms.net/styles/fiord-color/{z}/{x}/{y}.png",
|
|
json: "https://maps.netsyms.net/styles/fiord-color/style.json",
|
|
name: "Blue",
|
|
bgcolor: "#45516E"
|
|
},
|
|
oledblack: {
|
|
url: "https://maps.netsyms.net/styles/oled-black/{z}/{x}/{y}.png",
|
|
json: "https://maps.netsyms.net/styles/oled-black/style.json",
|
|
name: "Black",
|
|
bgcolor: "#000000"
|
|
}
|
|
},
|
|
mapboxpublictoken: "{mapboxpublictoken}",
|
|
alertsounds: {
|
|
coin: {
|
|
name: "Coin",
|
|
file: "alert.coin.mp3"
|
|
},
|
|
jump: {
|
|
name: "Jump",
|
|
file: "alert.jump.mp3"
|
|
},
|
|
robot: {
|
|
name: "Robot",
|
|
file: "alert.robot.mp3"
|
|
},
|
|
sonar: {
|
|
name: "Sonar",
|
|
file: "alert.sonar.mp3"
|
|
}
|
|
},
|
|
/*
|
|
* id = key: internal type ID
|
|
* name: human-readable type label
|
|
* icon: CSS classes for displaying an icon with <i class="[icon]"></i>
|
|
* mapicon: assets/images/[mapicon].png
|
|
* pluralmapicon: same as mapicon but when there's more than one of the type
|
|
* selected: true for the default type, not present for other entries
|
|
* allowedlocationtypes: Pipe-seperated list of location types this item can be delivered to. Should include "address" somewhere to keep the server happy.
|
|
*/
|
|
itemtypes: {
|
|
package: {
|
|
id: "package",
|
|
name: "Package",
|
|
icon: "fas fa-box fa-fw",
|
|
mapicon: "box",
|
|
pluralmapicon: "boxes",
|
|
selected: true,
|
|
allowedlocationtypes: "locker|address"
|
|
},
|
|
large: {
|
|
id: "large",
|
|
name: "Oversized Package",
|
|
icon: "fas fa-pallet fa-fw",
|
|
mapicon: "largebox",
|
|
pluralmapicon: "largeboxes",
|
|
allowedlocationtypes: "address"
|
|
},
|
|
small: {
|
|
id: "small",
|
|
name: "Small Package/SPR",
|
|
icon: "fas fa-envelope-square fa-fw",
|
|
mapicon: "smallpackage",
|
|
pluralmapicon: "smallpackages",
|
|
allowedlocationtypes: "mailbox|locker|address"
|
|
},
|
|
letter: {
|
|
id: "letter",
|
|
name: "Letter",
|
|
icon: "fas fa-envelope fa-fw",
|
|
mapicon: "envelope",
|
|
pluralmapicon: "envelopes",
|
|
allowedlocationtypes: "mailbox|address"
|
|
},
|
|
signature: {
|
|
id: "signature",
|
|
name: "Signature Item",
|
|
icon: "fas fa-file-signature fa-fw",
|
|
mapicon: "signature",
|
|
pluralmapicon: "signatures",
|
|
allowedlocationtypes: "address"
|
|
},
|
|
express: {
|
|
id: "express",
|
|
name: "Express Item",
|
|
icon: "fas fa-shipping-fast fa-fw",
|
|
mapicon: "express",
|
|
pluralmapicon: "multiple-items",
|
|
allowedlocationtypes: "address"
|
|
}
|
|
},
|
|
weathericons: [
|
|
"clear",
|
|
"cloudy",
|
|
"partly-cloudy",
|
|
"mostly-sunny",
|
|
"rain",
|
|
"snow",
|
|
"fog",
|
|
"heat",
|
|
"windy",
|
|
"hazard",
|
|
"none"
|
|
],
|
|
scannerevents: [
|
|
{
|
|
button: 1,
|
|
title: "Delivered",
|
|
type: "event",
|
|
after: [
|
|
{
|
|
button: 1,
|
|
title: "In/At Mailbox",
|
|
type: "type",
|
|
after: false
|
|
},
|
|
{
|
|
button: 2,
|
|
title: "Front Door/Porch",
|
|
type: "type",
|
|
after: false
|
|
},
|
|
{
|
|
button: 3,
|
|
title: "Left with Individual at Address",
|
|
type: "type",
|
|
after: false
|
|
},
|
|
{
|
|
button: 4,
|
|
title: "Front Desk/Reception/Mail Room",
|
|
type: "type",
|
|
after: false
|
|
},
|
|
{
|
|
button: 5,
|
|
title: "Parcel Locker",
|
|
type: "type",
|
|
after: false
|
|
},
|
|
{
|
|
button: 6,
|
|
title: "Garage or Other Location at Address",
|
|
type: "type",
|
|
after: false
|
|
},
|
|
{
|
|
button: 7,
|
|
title: "Left with Neighbor",
|
|
type: "type",
|
|
after: false
|
|
},
|
|
{
|
|
button: 'G',
|
|
title: "Authorized Agent",
|
|
type: "type",
|
|
after: false
|
|
},
|
|
{
|
|
button: 'U',
|
|
title: "Tendered to Authorized Agent",
|
|
type: "type",
|
|
after: false
|
|
}
|
|
]
|
|
},
|
|
{
|
|
button: 2,
|
|
title: "Attempted",
|
|
type: "event",
|
|
after: [
|
|
{
|
|
button: 2,
|
|
title: "No Secure Location Available",
|
|
type: "type",
|
|
after: "3849"
|
|
},
|
|
{
|
|
button: 3,
|
|
title: "No Access",
|
|
type: "type",
|
|
after: false
|
|
},
|
|
{
|
|
button: 7,
|
|
title: "Business Closed",
|
|
type: "type",
|
|
after: false
|
|
},
|
|
{
|
|
button: 4,
|
|
title: "Receptacle Full/Item Oversized",
|
|
type: "type",
|
|
after: "3849"
|
|
},
|
|
{
|
|
button: 5,
|
|
title: "Customer Hold",
|
|
type: "type",
|
|
after: false
|
|
},
|
|
{
|
|
button: 6,
|
|
title: "Animal Interference",
|
|
type: "type",
|
|
after: false
|
|
}
|
|
]
|
|
},
|
|
{
|
|
button: 3,
|
|
title: "Return to Sender or Forward",
|
|
type: "event",
|
|
after: [
|
|
{
|
|
button: 1,
|
|
title: "Forwarded",
|
|
type: "type",
|
|
after: false
|
|
},
|
|
{
|
|
button: 2,
|
|
title: "Insufficient Address",
|
|
type: "type",
|
|
after: false
|
|
},
|
|
{
|
|
button: 3,
|
|
title: "No Such Number",
|
|
type: "type",
|
|
after: false
|
|
},
|
|
{
|
|
button: 4,
|
|
title: "Addressee Unknown",
|
|
type: "type",
|
|
after: false
|
|
},
|
|
{
|
|
button: 5,
|
|
title: "Vacant",
|
|
type: "type",
|
|
after: false
|
|
},
|
|
{
|
|
button: 6,
|
|
title: "Unable to Forward / Forward Order Expired",
|
|
type: "type",
|
|
after: false
|
|
},
|
|
{
|
|
button: 7,
|
|
title: "Deceased",
|
|
type: "type",
|
|
after: false
|
|
},
|
|
{
|
|
button: 8,
|
|
title: "Refused",
|
|
type: "type",
|
|
after: false
|
|
},
|
|
{
|
|
button: 9,
|
|
title: "Returned for Other Reason",
|
|
type: "type",
|
|
after: false
|
|
}
|
|
]
|
|
},
|
|
{
|
|
button: 4,
|
|
title: "Other",
|
|
type: "event",
|
|
after: [
|
|
{
|
|
button: 1,
|
|
title: "Out for Redelivery",
|
|
type: "type",
|
|
after: false
|
|
},
|
|
{
|
|
button: 2,
|
|
title: "Out for Delivery",
|
|
type: "type",
|
|
after: false
|
|
},
|
|
{
|
|
button: 'X',
|
|
title: "Dispatch to Military/Diplomatic PO",
|
|
type: "type",
|
|
after: false
|
|
},
|
|
{
|
|
button: 3,
|
|
title: "Return to Post Office Not Attempted / Delivery Delay",
|
|
type: "type",
|
|
after: false
|
|
},
|
|
{
|
|
button: 4,
|
|
title: "Local Weather Delay",
|
|
type: "type",
|
|
after: false
|
|
},
|
|
{
|
|
button: 5,
|
|
title: "Visible Damage",
|
|
type: "type",
|
|
after: false
|
|
}
|
|
]
|
|
}
|
|
],
|
|
routenotetoggles: [
|
|
{
|
|
name: "Vacant",
|
|
id: "vacant",
|
|
preventsDelivery: true,
|
|
reason: "is vacant",
|
|
icon: "far fa-circle"
|
|
},
|
|
{
|
|
name: "No Mail Receptacle",
|
|
id: "nmr",
|
|
preventsDelivery: true,
|
|
reason: "has no mailbox",
|
|
icon: "far fa-times-circle"
|
|
},
|
|
{
|
|
name: "Outside delivery radius",
|
|
id: "undeliverable",
|
|
preventsDelivery: true,
|
|
reason: "is too far from the route",
|
|
icon: "fas fa-route"
|
|
},
|
|
{
|
|
name: "On hold",
|
|
id: "hold",
|
|
preventsDelivery: true,
|
|
reason: "is on hold",
|
|
icon: "fas fa-pause-circle"
|
|
}
|
|
],
|
|
synckeyblacklist: [
|
|
"username", "password", "trackingcodehistory", "packages",
|
|
"user_latitude", "user_longitude", "geocode_cache", "scanevents",
|
|
"lastsync", "lastchange", "syncstateversion"
|
|
],
|
|
geocodecacheexpiry: 604800, // One week
|
|
geocodeapi: "https://apis.netsyms.net/packagehelper/geocode.php",
|
|
geocodebarcodeapi: "https://apis.netsyms.net/packagehelper/geocode_barcode.php",
|
|
trackingapi: "https://data.netsyms.net/v1/logistics/tracking/key=packagehelper1/",
|
|
weatherapi: "https://data.netsyms.net/v1/gis/weather/key=packagehelper1/",
|
|
geoipapi: "https://data.netsyms.net/v1/net/geoip/key=packagehelper1/",
|
|
sharelistapi: "https://apis.netsyms.net/packagehelper/sharepackagelist.php",
|
|
loginurl: "https://apis.netsyms.net/packagehelper/login/",
|
|
syncapi: "https://apis.netsyms.net/packagehelper/sync_1.7.php",
|
|
mapfixapi: "https://apis.netsyms.net/packagehelper/contribgeocode.php",
|
|
addrlookupapi: "https://apis.netsyms.net/packagehelper/addresslookup.php"
|
|
}
|