aboutsummaryrefslogtreecommitdiffstats
path: root/op25/gr-op25_repeater/apps
diff options
context:
space:
mode:
Diffstat (limited to 'op25/gr-op25_repeater/apps')
-rw-r--r--op25/gr-op25_repeater/apps/900.tsv2
-rw-r--r--op25/gr-op25_repeater/apps/README80
-rw-r--r--op25/gr-op25_repeater/apps/README-July-2021291
-rw-r--r--op25/gr-op25_repeater/apps/README-example-udp38
-rw-r--r--op25/gr-op25_repeater/apps/README-hls268
-rw-r--r--op25/gr-op25_repeater/apps/alt-colors.json7
-rwxr-xr-xop25/gr-op25_repeater/apps/audio.py55
-rw-r--r--op25/gr-op25_repeater/apps/cfg-900.json40
-rw-r--r--op25/gr-op25_repeater/apps/cfg-trunk.json40
-rw-r--r--op25/gr-op25_repeater/apps/cfg-trunk2.json50
-rw-r--r--op25/gr-op25_repeater/apps/cfg-trunkx.json98
-rw-r--r--op25/gr-op25_repeater/apps/cfg-udp.json76
-rw-r--r--op25/gr-op25_repeater/apps/cfg.json49
-rw-r--r--op25/gr-op25_repeater/apps/color-map.json602
-rw-r--r--op25/gr-op25_repeater/apps/correlation.json27
-rw-r--r--op25/gr-op25_repeater/apps/create_image.py57
-rw-r--r--op25/gr-op25_repeater/apps/emap.py383
-rw-r--r--op25/gr-op25_repeater/apps/example_liquidsoap.liq73
-rwxr-xr-xop25/gr-op25_repeater/apps/ffmpeg.liq15
-rwxr-xr-xop25/gr-op25_repeater/apps/ffmpeg.sh42
-rw-r--r--op25/gr-op25_repeater/apps/gr_gnuplot.py683
-rw-r--r--op25/gr-op25_repeater/apps/h_cpm.m350
-rwxr-xr-xop25/gr-op25_repeater/apps/http_server.py589
-rwxr-xr-xop25/gr-op25_repeater/apps/install-sql.sh31
-rwxr-xr-xop25/gr-op25_repeater/apps/log_ts.py42
-rwxr-xr-xop25/gr-op25_repeater/apps/multi_rx.py864
-rw-r--r--op25/gr-op25_repeater/apps/nxdn_trunking.py316
-rw-r--r--op25/gr-op25_repeater/apps/op25-liq.service15
-rwxr-xr-xop25/gr-op25_repeater/apps/op25.liq54
-rw-r--r--op25/gr-op25_repeater/apps/oplog/app.cfg4
-rw-r--r--op25/gr-op25_repeater/apps/oplog/op25/__init__.py844
-rw-r--r--op25/gr-op25_repeater/apps/oplog/op25/static/css/bootstrap/bootstrap-darkly.css11038
-rw-r--r--op25/gr-op25_repeater/apps/oplog/op25/static/css/bootstrap/bootstrap.css6763
-rw-r--r--op25/gr-op25_repeater/apps/oplog/op25/static/css/datatables/jquery.dataTables-dark.css461
-rw-r--r--op25/gr-op25_repeater/apps/oplog/op25/static/css/datatables/jquery.dataTables.css453
-rw-r--r--op25/gr-op25_repeater/apps/oplog/op25/static/css/images/sort_asc.pngbin0 -> 160 bytes
-rw-r--r--op25/gr-op25_repeater/apps/oplog/op25/static/css/images/sort_asc_disabled.pngbin0 -> 148 bytes
-rw-r--r--op25/gr-op25_repeater/apps/oplog/op25/static/css/images/sort_both.pngbin0 -> 201 bytes
-rw-r--r--op25/gr-op25_repeater/apps/oplog/op25/static/css/images/sort_desc.pngbin0 -> 158 bytes
-rw-r--r--op25/gr-op25_repeater/apps/oplog/op25/static/css/images/sort_desc_disabled.pngbin0 -> 146 bytes
-rw-r--r--op25/gr-op25_repeater/apps/oplog/op25/static/css/op25.css237
-rw-r--r--op25/gr-op25_repeater/apps/oplog/op25/static/dtpick/dtpick2.js2930
-rw-r--r--op25/gr-op25_repeater/apps/oplog/op25/static/dtpick/jquery.datetimepicker.css568
-rw-r--r--op25/gr-op25_repeater/apps/oplog/op25/static/dtpick/jquery.datetimepicker.js2718
-rw-r--r--op25/gr-op25_repeater/apps/oplog/op25/static/favicon.icobin0 -> 1150 bytes
-rw-r--r--op25/gr-op25_repeater/apps/oplog/op25/static/jquery/jquery-1.11.3.min.js5
-rw-r--r--op25/gr-op25_repeater/apps/oplog/op25/static/jquery/jquery-2.2.4.min.js4
-rw-r--r--op25/gr-op25_repeater/apps/oplog/op25/static/js/bootstrap/bootstrap.bundle.min.js7
-rw-r--r--op25/gr-op25_repeater/apps/oplog/op25/static/js/bootstrap/bootstrap.min.js7
-rw-r--r--op25/gr-op25_repeater/apps/oplog/op25/static/js/datatables/jquery.dataTables.js15212
-rw-r--r--op25/gr-op25_repeater/apps/oplog/op25/static/js/op25.js227
-rw-r--r--op25/gr-op25_repeater/apps/oplog/op25/static/loading.gifbin0 -> 54553 bytes
-rw-r--r--op25/gr-op25_repeater/apps/oplog/op25/static/op25-dark-h.pngbin0 -> 3953 bytes
-rw-r--r--op25/gr-op25_repeater/apps/oplog/op25/static/op25-dark.pngbin0 -> 3984 bytes
-rw-r--r--op25/gr-op25_repeater/apps/oplog/op25/static/op25.pngbin0 -> 2031 bytes
-rw-r--r--op25/gr-op25_repeater/apps/oplog/op25/templates/about.html144
-rw-r--r--op25/gr-op25_repeater/apps/oplog/op25/templates/base.html167
-rw-r--r--op25/gr-op25_repeater/apps/oplog/op25/templates/dbstats.html53
-rw-r--r--op25/gr-op25_repeater/apps/oplog/op25/templates/edit_tags.html293
-rw-r--r--op25/gr-op25_repeater/apps/oplog/op25/templates/editsys.html151
-rw-r--r--op25/gr-op25_repeater/apps/oplog/op25/templates/error.html191
-rw-r--r--op25/gr-op25_repeater/apps/oplog/op25/templates/footer-links.html17
-rw-r--r--op25/gr-op25_repeater/apps/oplog/op25/templates/home.html129
-rw-r--r--op25/gr-op25_repeater/apps/oplog/op25/templates/inspect.html18
-rw-r--r--op25/gr-op25_repeater/apps/oplog/op25/templates/logs.html212
-rw-r--r--op25/gr-op25_repeater/apps/oplog/op25/templates/purge.html123
-rw-r--r--op25/gr-op25_repeater/apps/oplog/op25/templates/switch_db.html129
-rwxr-xr-xop25/gr-op25_repeater/apps/oplog/oplog.sh4
-rw-r--r--op25/gr-op25_repeater/apps/oplog/setup.py30
-rw-r--r--op25/gr-op25_repeater/apps/p25_decoder.py23
-rw-r--r--op25/gr-op25_repeater/apps/p25_demodulator.py276
-rw-r--r--op25/gr-op25_repeater/apps/plot-colors.json7
-rw-r--r--op25/gr-op25_repeater/apps/runudp.sh7
-rwxr-xr-xop25/gr-op25_repeater/apps/rx.py632
-rw-r--r--op25/gr-op25_repeater/apps/site-alias.json12
-rwxr-xr-xop25/gr-op25_repeater/apps/sockaudio.py669
-rwxr-xr-xop25/gr-op25_repeater/apps/sql_dbi.py338
-rw-r--r--op25/gr-op25_repeater/apps/tdma/bit_utils.py14
-rw-r--r--op25/gr-op25_repeater/apps/tdma/lfsr.py83
-rwxr-xr-xop25/gr-op25_repeater/apps/tdma/tdma_audio.py2
-rwxr-xr-x[-rw-r--r--]op25/gr-op25_repeater/apps/terminal.py372
-rw-r--r--op25/gr-op25_repeater/apps/trunk.tsv3
-rw-r--r--op25/gr-op25_repeater/apps/trunking.py1543
-rwxr-xr-xop25/gr-op25_repeater/apps/tsvfile.py191
-rw-r--r--op25/gr-op25_repeater/apps/tx/README-fakecc.txt31
-rw-r--r--op25/gr-op25_repeater/apps/tx/dstar-cfg.dat41
-rwxr-xr-xop25/gr-op25_repeater/apps/tx/dv_tx.py97
-rwxr-xr-xop25/gr-op25_repeater/apps/tx/generate-tsbks.py12
-rwxr-xr-xop25/gr-op25_repeater/apps/tx/multi_tx.py348
-rw-r--r--op25/gr-op25_repeater/apps/tx/nxdn-cfg.dat42
-rwxr-xr-xop25/gr-op25_repeater/apps/tx/op25_c4fm_mod.py97
-rwxr-xr-xop25/gr-op25_repeater/apps/tx/op25_tx.py4
-rwxr-xr-xop25/gr-op25_repeater/apps/tx/p25craft.py175
-rw-r--r--op25/gr-op25_repeater/apps/tx/testpatterns/1011.patternbin0 -> 1728 bytes
-rw-r--r--op25/gr-op25_repeater/apps/tx/testpatterns/afc1011.patternbin0 -> 1728 bytes
-rw-r--r--op25/gr-op25_repeater/apps/tx/testpatterns/bercalhex.patternbin0 -> 1728 bytes
-rw-r--r--op25/gr-op25_repeater/apps/tx/testpatterns/busyhex.patternbin0 -> 1728 bytes
-rw-r--r--op25/gr-op25_repeater/apps/tx/testpatterns/idlehex.patternbin0 -> 1728 bytes
-rw-r--r--op25/gr-op25_repeater/apps/tx/testpatterns/silencehex.patternbin0 -> 1728 bytes
-rw-r--r--op25/gr-op25_repeater/apps/tx/testpatterns/sources/1011hex.dat24
-rw-r--r--op25/gr-op25_repeater/apps/tx/testpatterns/sources/afc1011hex.dat24
-rw-r--r--op25/gr-op25_repeater/apps/tx/testpatterns/sources/bercalhex.dat24
-rw-r--r--op25/gr-op25_repeater/apps/tx/testpatterns/sources/busyhex.dat24
-rw-r--r--op25/gr-op25_repeater/apps/tx/testpatterns/sources/idlehex.dat24
-rwxr-xr-xop25/gr-op25_repeater/apps/tx/testpatterns/sources/make-bin.py25
-rw-r--r--op25/gr-op25_repeater/apps/tx/testpatterns/sources/silencehex.dat24
-rw-r--r--op25/gr-op25_repeater/apps/tx/testpatterns/test.wavbin0 -> 136932 bytes
-rwxr-xr-xop25/gr-op25_repeater/apps/tx/unpack.py4
-rw-r--r--op25/gr-op25_repeater/apps/tx/ysf-cfg.dat2
-rw-r--r--op25/gr-op25_repeater/apps/ui-settings.json34
-rwxr-xr-xop25/gr-op25_repeater/apps/util/arb-resample.py4
-rwxr-xr-xop25/gr-op25_repeater/apps/util/cqpsk-demod-file.py6
112 files changed, 52428 insertions, 1186 deletions
diff --git a/op25/gr-op25_repeater/apps/900.tsv b/op25/gr-op25_repeater/apps/900.tsv
new file mode 100644
index 0000000..6cc8224
--- /dev/null
+++ b/op25/gr-op25_repeater/apps/900.tsv
@@ -0,0 +1,2 @@
+"Sysname" "Control Channel List" "Offset" "NAC" "Modulation" "TGID Tags File" "Whitelist" "Blacklist" "Center Frequency"
+"Fake" "924.975" "0" "0x293" "FSK4" "" "" "" "924.95"
diff --git a/op25/gr-op25_repeater/apps/README b/op25/gr-op25_repeater/apps/README
index f02f687..513f0b6 100644
--- a/op25/gr-op25_repeater/apps/README
+++ b/op25/gr-op25_repeater/apps/README
@@ -37,6 +37,7 @@ should open. You must click on the terminal window to restore it to
focus, otherwise all keystrokes are consumed by gnuplot. Once in the
terminal window there are several keyboard commands:
h - hold
+ H - hold/goto the specified tgid
l - lockout
s - skip
q - quit program
@@ -52,6 +53,19 @@ to suspend the program and examine stderr.2 for error messages. If there
is a traceback please report the full traceback (and the command line) to
the mail list.
+REMOTE TERMINAL
+===============
+Adding (for example) "-l 56111" to the rx.py command starts rx.py but does
+not attach a curses terminal. Instead the program runs as normal in the
+foreground (hit CTRL-C to end rx.py as desired). To connect to a running
+instance of rx.py, (in this example)
+ ./terminal.py 127.0.0.1 56111
+NOTE: rx.py and terminal.py need not run on the same machine. The machine
+where terminal.py is running need not have an SDR device directly attached;
+but GNU Radio (and OP25) must be available.
+
+WARNING: there is no security or encryption on the UDP port.
+
EXTERNAL UDP AUDIO SERVER
=========================
Starting rx.py with the "-w -W host" options directs udp audio data to
@@ -129,6 +143,8 @@ Options:
-H HAMLIB_MODEL, --hamlib-model=HAMLIB_MODEL
specify model for hamlib
-s SEEK, --seek=SEEK ifile seek in K
+ -l TERMINAL_TYPE, --terminal-type=TERMINAL_TYPE
+ 'curses' or udp port or 'http:host:port'
-L LOGFILE_WORKERS, --logfile-workers=LOGFILE_WORKERS
number of demodulators to instantiate
-S SAMPLE_RATE, --sample-rate=SAMPLE_RATE
@@ -161,3 +177,67 @@ Options:
-2, --phase2-tdma enable phase2 tdma decode
-Z DECIM_AMT, --decim-amt=DECIM_AMT
spectrum decimation
+
+HTTP CONSOLE
+============
+New as of Jan. 2018, the OP25 dashboard is accessible to any Web browser over
+HTTP. Include the option "-l http:<host>:<port>" when starting the rx.py app,
+where <host> is either "127.0.0.1" to limit access from only this host, or
+"0.0.0.0" if HTTP access from anywhere is to be allowed*. After rx.py has
+started it begins listening on the specified port for incoming connections.
+
+Once connected the status page should automatically update to show trunking
+system status, frequency list, adjacent sites, and other data.
+
+Example: you have started rx.py with the option "-l http:127.0.0.1:8080".
+To connect, set your web browser URL to "http://127.0.0.1:8080".
+
+If one or more plot modes has been selected using the "-P" option you may
+view them by clicking the "PLOT" button. The plots are updated approx.
+every five seconds. Click "STATUS" to return to the main status page.
+
+*WARNING*: there is no security or encryption. Be careful when using "0.0.0.0"
+as the listening address since anyone with access to the network can connect.
+
+NOTE: the python-pyramid package is required when using this option. It can
+be installed by running
+ sudo apt-get install python-pyramid
+
+MULTI-RECEIVER
+==============
+The multi_rx.py app allows an arbitrary number of SDR devices and channels
+to be defined. Each channel may have one or more plot windows attached.
+
+Configuration is achieved via a json file (see cfg.json for an example).
+In this version, channels are automatically assigned to the first device
+found whose frequency span includes the selected frequency.
+
+As of this writing (winter, 2017), neither trunking nor P25 P2/TDMA are
+supported in multi_rx.py. The rx.py app should be used for P25 trunking,
+for either P1/FDMA or P2/TDMA.
+
+Below is a summary of the major config file keys:
+demod_type: 'cqpsk' for qpsk p25 only; 'fsk4' for ysf/dstar/dmr/fsk4 p25
+filter_type: 'rc' for p25; 'rrc' for dmr and ysf; 'gmsk' for d-star
+plot: 'fft', 'constellation', 'datascope', 'symbol'
+ [if more than one plot desired, provide a comma-separated list]
+destination: 'udp://host:port' or 'file://<filename>'
+name: arbitrary string used to identify channels and devices
+
+bug: 'fft' and 'constellation' currently mutually exclusive
+bug: 'gmsk' needs work
+
+Note: DMR audio for the second time slot is sent on the specified port number
+plus two. In the example 'udp://127.0.0.1:56122', audio for the first slot
+would use 56122; and 56124 for the second.
+
+The command line options for multi_rx:
+Usage: multi_rx.py [options]
+
+Options:
+ -h, --help show this help message and exit
+ -c CONFIG_FILE, --config-file=CONFIG_FILE
+ specify config file name
+ -v VERBOSITY, --verbosity=VERBOSITY
+ message debug level
+ -p, --pause block on startup
diff --git a/op25/gr-op25_repeater/apps/README-July-2021 b/op25/gr-op25_repeater/apps/README-July-2021
new file mode 100644
index 0000000..911a07e
--- /dev/null
+++ b/op25/gr-op25_repeater/apps/README-July-2021
@@ -0,0 +1,291 @@
+
+New features in this release (June, 2021)
+=========================================
+
+1. With thanks to OP25 user Triptolemus, the web client is enhanced to
+ include comprehensive logs of recent control channel signalling and
+ call activity. Many other features are also added:
+ * unit ID (subscriber ID) tagging - similar to the existing TGID
+ tags setup.
+ * tag color coding (for both TGID and SUID tags).
+ * tag ranges and wildcarding - for both the TGID and SUID tag maps,
+ a single definition line may be used to create tags for a range of
+ IDs.
+ * real time system frequency status table
+ * smart colors
+ * user settings (colors, preferences) may be edited and saved via a
+ convenient set of web forms and applications
+
+2. The multi_rx app adds extensions to include trunked P25 call following
+ concurrent with full-time tracking of one or more P25 control channels.
+ If necessary, additional SDR devices may be configured to allow full
+ coverage of all control channels without loss of CC data even during voice
+ call reception. Several new command line options to multi_rx have been
+ added - -T (trunking TSV file) -l (terminal type) as well as -X and -U,
+ all having the same meaning as in rx.py.
+
+3. Control channel logging to SQL database is added. For details see the
+ section on the Flask Datatables App, below.
+
+4. Experimental TDMA Control Channel support
+
+Installation
+============
+
+First locate and change to your current OP25 install build/ directory and
+run the command
+ sude make uninstall
+
+Since this version includes library C++ code updates it requires a full
+source rebuild via the standard install script (install.sh).
+
+The installation will include one or more SDR receivers, depending
+on the the amount of spectrum utilized by the target trunking system, how
+many control channels are to be monitored concurrently, and whether voice
+call following is desired.
+
+ * When SQL logging is used, it is most desirable to keep the control channel
+ tuned in 100% of the time. With a single SDR this is not possible when the
+ range of control channel and voice channel frequencies exceed the tuning band
+ of the SDR.
+ * When voice call following is to be used, a separate voice channel must be
+ defined for each device over which voice reception is desired. It is
+ redundant to have more than one voice channel assigned to a given device.
+ * A separate SDR can be dedicated to voice call following if needed. If there
+ is already a frequency-locked ("tunable"=false) device whose tuning band
+ includes all desired voice frequencies, a separate voice SDR is not needed.
+ * This version of OP25 follows the same voice call system as in rx.py.
+ That is, a single call at a time is monitored and a 3-second (nominal)
+ time delay is applied at the end of each call to catch possible replies.
+ * A single device may be shared by multiple channels. When more than one channel
+ is assigned to a device, the device should be tuned to a fixed frequency and
+ "tunable" should be set to "false".
+
+Simplified example: Of all frequencies (control and voice) in the system,
+the lowest frequency is 464.05 and the highest is 464.6. An RTL-SDR having
+a maximum sample rate of 2.56 MHz is to be used. Since the band required is
+0.55 MHz, a single SDR configuration can be used. The sample rate for
+this example, 2.56 MHz, could be reduced to 1.0 MHz to conserve CPU.
+
+NOTE: Proper logging of CC activity requires two things:
+ 1) Device and/or channel resources must be allocated so that there
+ is 100% time coverage of the control channel. Voice channel
+ operation on the same SDR can only occur when the entire system
+ fits within the SDR tuning band.
+ 2) Control channel reception and demodulation must be 100% error-free.
+ Occasional errors are potentially corrected by the FEC but a better
+ course is to increase the receive SNR and/or decrease the system BER.
+
+Notes on JSON Configuration/Parameters
+======================================
+Example json config files are included in the apps/ directory. You
+should choose one of these files (as described above) and make edits
+to a working copy of the file. The name of the resulting JSON config
+file must be passed to multi_rx.py via the "-c" parameter.
+ cfg-trunk.json - When all system frequencies (CC and VC) will fit
+ within the SDR tuning band (without retuning the SDR),
+ or voice decode is not needed.
+ cfg-trunk2.json - When two SDRs are needed to cover both CC and all VCs.
+ cfg-trunkx.json - Large system example with voice following and several CCs.
+
+There are several key values to note:
+"tunable" In the single-SDR configuration where all system frequencies
+ (primary/secondary CCs and VCs) are within the SDR band,
+ you should set this to "false". In this case the SDR is
+ fixed-tuned and remains on a single frequency, the center
+ frequency. You must set the center frequency to a value
+ halfway between the lowest and highest frequencies in the
+ system, via the device "frequency" setting.
+"frequency" See above. When "tunable" is set to "true" this value must
+ be filled in. Otherwise the value is used to set the device
+ frequency at startup time (must be a valid frequency for the
+ device). The device will most likely be retuned one or more
+ times during execution.
+"decode" Assists multi_rx in assigning channels to the proper device(s).
+ If the value of "decode" starts with the string "p25_decoder",
+ multi_rx uses the p25 decoder instead of its standard decoder.
+
+Note that "tunable" is a device-specific parameter, and that "decode" is a
+channel-specific parameter. Also, while both the device and channel define
+the "frequency" parameter, the description above is for device entries. A
+channel entry may also define a frequency, but the channel "frequency" parameter
+is ignored (in this version).
+
+When the p25_decoder is used, there is a parameter string consisting of a
+colon-separated list of parameters with each parameter in the form "key=value",
+with the parameter string defined as the value of the "decode" parameter.
+
+Here are two examples:
+ "decode": "p25_decoder:role=cc:dev=rtl11:nac=0x4e1", [control]
+ "decode": "p25_decoder:role=vc:dev=rtl12_vc", [voice]
+The valid parameter keywords are:
+"p25_decoder" Required for trunked P25. This keyword introduces the
+ parameter list. There is no value.
+"role" Must be set to "vc" or "cc".
+"dev" Must be set to the name of the device. Each channel is
+ assigned to exactly one device.
+"nac" Comma-separated list of NACs for the channel. Only trunked
+ systems having a NAC in the list can be assigned to this
+ channel.
+"sysid" Comma-separated list of SYSIDs for the channel. Only trunked
+ systems having a SYSID in the list can be assigned to this
+ channel.
+
+The "nac" and "sysid" options are only checked for control channels ("role=cc").
+Values starting with "0x" are hexadecimal; otherwise decimal values are assumed .
+A blank/default value for "sysid" and/or "nac" indicates that parameter is not
+checked.
+
+The following startup messages in the stderr log are typical in a 2-SDR config:
+ assigning channel "p25 control channel" (channel id 1) to device "rtl11_cc"
+ assigning channel "p25 voice channel" (channel id 2) to device "rtl12_vc"
+Note that the channel ID displayed in the "tuning error +/-1200" messages can be
+linked to the specific device(s) encountering the error using this ID.
+
+Experimental TDMA Control Channel Support
+=========================================
+
+The following specifics detail the JSON configuration file channel parameters
+needed to define a TDMA control channel:
+ "demod_type": "cqpsk",
+ "if_rate": 24000,
+ "symbol_rate": 6000,
+ "decode": "p25_decoder:role=cc:dev=<device-name>:nac=0x4e1",
+The NAC should be changed to match that of the system being received, and
+<device-name> should refer to the assigned device.
+
+Colors and Tags for Talkgroup and Radio IDs
+===========================================
+Tags and colors are defined in two TSV files, one for TGIDs and one for SUIDs.
+The TSV file format, compatible with earlier versions of OP25 has the TAB
+separated columns defined as:
+column one: decimal TG or SU ID. May contain wildcards (see below)
+column two: tag text (string)
+column three(optional): encoded priority/color value, decimal (see below)
+The color code is directly mapped by client JS into style sheet (CSS) colors.
+If only two columns are present the third column is defaulted to zero.
+
+The file names of the two files are specified (comma-separated) in the
+trunking TSV "TGID Tags File" column (the trunking TSV in turn is the
+file referred to by the "-T" command option of rx.py or multi_rx.py).
+The talkgroup tags file name is specified first, followed by a comma,
+then the SUID tags file. The SUID tags file can't be specified alone.
+
+Wildcard IDs (column one) may be (for example)
+ * 123-678 [all IDs in range, inclusive, are set to same tag/color]
+ * 444.... [all IDs from 4440000 to 4449999]
+ * 456* [all IDs starting with 456]
+ * 54321 [defines that one ID]
+
+Column three contains a color value from 0-99 (decimal).
+In the TGID file (only), the column value also contains a talkgroup
+priority, encoded as follows:
+ - the low-order two decimal digits (tens and units digits) are the
+ color code
+ - the remaining upper-order decimal digits (hundreds digit and above) are
+ the priority value for talkgroup pre-emption purposes.
+
+Setup SQL Log Database (Optional)
+=================================
+
+This addition provides a permanent server-side log of control channel
+activity via logging to an SQL database. See the next section for details
+on installing and using the log viewer.
+
+1. Make sure that sqlite3 is installed in python
+
+ WARNING: OP25 MUST NOT BE RUNNING DURING THIS STEP
+2. Initialize DB (any existing DB data will be destroyed)
+op25/.../apps$ python sql_dbi.py reset_db
+ WARNING: OP25 MUST NOT BE RUNNING DURING THIS STEP
+
+3. Import talkgroups tags file
+op25/.../apps$ python sql_dbi.py import_tgid tags.tsv <sysid>
+ also, import the radio ID tags file (optional)
+op25/.../apps$ python sql_dbi.py import_unit radio-tags.tsv <sysid>
+ import the System ID tags file (see below)
+op25/.../apps$ python sql_dbi.py import_sysid sysid-tags.tsv 0
+
+The sysid tags must be a TSV file containing two columns
+column 1 is the P25 trunked sysid (int, decimal)
+colunn 2 is the System Name (text)
+(Note: there is no header row line in this TSV file).
+
+NOTE: in the various import commands above, the sysid (decimal) must follow
+as the next argument after the TSV file name. For the sysid tags file, the
+sysid should be set to zero.
+
+4. Run op25 as usual. Logfile data should be inserted into DB in real time
+ and you should be able to view activity via the OP25 http console (once
+ the flask/datatables app has been set up; see next section).
+
+Setup Flask Datatables App
+==========================
+
+0. The DB must first be established (see previous section)
+
+1. Install the necessary libs. If you are running the install in Ubuntu
+ 16.04 there are two lines in the script that must be un-commented prior
+ to running; then, in any case do:
+op25/.../apps$ sh install-sql.sh
+
+Note: you may need to 'sudo apt install git' prior to running this script.
+
+2. Update your .bashrc file as instructed, then re-login to pick up the
+ update to PATH. Verify that the updated PATH is correct. You can run
+ the command "echo $PATH" to display its current value. Here is an example
+ response: /home/op25/.local/bin:/usr/local/sbin:/usr/local/bin.....
+ You should confirm that the file "flask" exists and is executable (see
+ warning below).
+
+ $ ls -l ~/.local/bin/flask
+-rwxr-xr-x 1 op25 op25 212 Apr 29 21:43 /home/op25/.local/bin/flask
+
+3. First change to the "..../apps/oplog" directory, then run the following
+ commands to start the flask http process (listens on port 5000)
+
+op25/.../apps/oplog$ export FLASK_APP=op25
+op25/.../apps/oplog$ FLASK_DEBUG=1 flask run
+
+WARNING: if you receive the following messages when attempting the "flask run"
+command
+-------------------------------------------------------------
+Command 'flask' not found, but can be installed with:
+sudo apt install python3-flask
+-------------------------------------------------------------
+most likely this indicates the PATH is not properly set up (see step 2).
+In this case we do NOT recommend that you attempt to install the apt version
+of flask. The install-sql.sh script (step 1, above) should have installed a
+version of flask in a directory such as:
+
+ $ ls -l ~/.local/bin/flask
+-rwxr-xr-x 1 op25 op25 212 Apr 29 21:43 /home/op25/.local/bin/flask
+
+If install of the apt version of flask is attempted, it may result in an
+obsolete and/or incompatible flask version being installed.
+
+NOTE: The following command example can be used when starting the oplog
+process as a system service:
+ /home/<user>/op25/op25/gr-op25_repeater/apps/oplog/oplog.sh
+ * Change <user> to match the username
+ * Make appropriate corrections if the git repo is cloned into a different
+ directory than in the command shown
+ * Verify the resulting path and filename is correct.
+============ oplog.sh ============
+#! /bin/sh
+
+export FLASK_APP=op25
+FLASK_DEBUG=1 flask run --host=0.0.0.0
+==================================
+
+In lieu of setting the flask PATH (as per step 2, above) you could also
+specify it explicitly. In that case, replace the last line of oplog.sh as
+follows:
+FLASK_DEBUG=1 /home/<user>/.local/bin/flask run --host=0.0.0.0
+ * Change <user> to match the username
+ * Confirm the "flask" file is present in ..../bin/ and is executable
+ * Set "host" to "127.0.0.1" to restrict HTTP connections to the local
+ machine.
+ * WARNING The web server is not security-hardened. It is not
+ designed for exposure to public web-facing applications.
+
diff --git a/op25/gr-op25_repeater/apps/README-example-udp b/op25/gr-op25_repeater/apps/README-example-udp
new file mode 100644
index 0000000..ae3aeb4
--- /dev/null
+++ b/op25/gr-op25_repeater/apps/README-example-udp
@@ -0,0 +1,38 @@
+
+Linking OP25 TX and RX December 2020
+===================================================================
+
+The OP25 TX application can be configured to transmit one or more
+channels directly to one of the RX apps (rx.py or multi_rx.py) in
+each case by specifying a device args string of the form
+ udp:host:port
+where host and port are the IP address and UDP port number,
+respectively. Typically, the TX is started first followed by
+the RX, but they can be started in any order. UDP port 25252 is
+used in the examples.
+
+The sample RX script is in runudp.sh, and the sample TX json config
+is in cfg-900.json .
+
+To start the TX
+ cd .../op25/op25-gr_repeater/apps/tx
+ ./multi_tx.py -c ../cfg-900.json
+
+The RX is started with
+ cd .../op25/op25-gr_repeater/apps
+ ./runudp.sh
+
+There is a 120KHz sized block of spectrum transmitted (SR=120000)
+which is treated as complex baseband with each side pretending that
+the spectrum is converted to/from the 900 MHz band. On the RX side
+any frequency-change requests are ignored; instead, a "center
+frequency" is defined. There are two channels (P25 trunk control
+channel and P25 voice channel) spaced at 50 KHz separation.
+
+The TX reads two data files that must be created beforehand. To
+create the trunk control channel data symbol file, refer to
+ tx/README-fakecc.txt
+An audio file (PCM/ rate 8000 / mono / signed int16) must also be
+created - this file will be real-time encoded with the voice codec
+and sent on the P25 voice channel. These two files must be defined
+in the cfg-900.json file (channel "source" keyword).
diff --git a/op25/gr-op25_repeater/apps/README-hls b/op25/gr-op25_repeater/apps/README-hls
new file mode 100644
index 0000000..ba9cd60
--- /dev/null
+++ b/op25/gr-op25_repeater/apps/README-hls
@@ -0,0 +1,268 @@
+
+OP25 HTTP live streaming December 2020
+=====================================================================
+
+These hacks ("OP25-hls hacks") add a new option for audio reception
+and playback in OP25; namely, via an HTTP live stream to any remote
+client using a standard Web browser*. The web server software used
+(nginx) is industrial-strength and immediately scalable to dozens or
+hundreds of simultaneous remote users with zero added effort. More
+than one upstream source (in parallel) can be served simultaneously.
+
+OP25's liquidsoap script is hacked to pipe output PCM audio data
+to ffmpeg, which also reads the www/images/status.png image file
+that makes up the video portion of the encoded live stream. The
+image png file is kept updated by rx.py.
+
+The selection of ffmpeg codecs ("libx264" for video and "aac" for
+audio) allows us directly to send the encoded data stream from
+ffmpeg to the web server (nginx) utilizing RTMP. Individual
+MPEG-TS segments are stored as files in nginx web server URL-space,
+and served to web clients via standard HTTP GET requests. The
+hls.js package is used at the client.
+
+The entire effort mostly involved assembling existing off-the-shelf
+building blocks. The ffmpeg package was built manually from source
+to enable the "libx264" codec, and a modified nginx config was
+used.
+
+*the web browser must support the "MediaSource Extensions" API.
+All recent broswer versions should qualify.
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+1. nginx installation
+
+The libnginx-mod-rtmp package must be installed (in addition to
+nginx itself). You can copy the sample nginx configuration at the
+end of this README file to /etc/nginx/nginx.conf, followed by
+restarting the web server
+ sudo systemctl stop nginx
+ sudo systemctl start nginx
+With this configuration the web server should listen on HTTP port
+8081 and RTMP port 1935.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+2. ffmpeg installation
+ git clone https://code.videolan.org/videolan/x264.git
+ git clone https://git.ffmpeg.org/ffmpeg.git
+ cd x264
+ ./configure
+ make
+ sudo make install
+ cd ../ffmpeg
+ ./configure --enable-shared --enable-libx264 --enable-gpl
+ make
+ sudo make install
+
+ To confirm the installation run the "ffmpeg" command and
+ verify the presence of "--enable-shared" and "--enable-libx264"
+ in the "configuration:" section of the output.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+3. liquidsoap installation
+ Both packages "liquidsoap" and "liquidsoap-plugin-all" were
+ installed, but not tested whether the plugins are required for
+ this application.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+4. nginx setup
+ with the custom config installed as per step 1, copy the files
+ from op25/gr_op25_repeater/www to /var/www/html as follows:
+
+ live.html
+ live.m3u8
+ hls.js
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+5. liquidsoap setup
+ in the op25/gr_op25_repeater/apps directory, note the ffmpeg.liq
+ script. Overall the filtering and buffering options should be
+ similar to those in op25.liq. The default version of ffmpeg.liq
+ should be OK for most uses.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+6. operation
+ With OP25 rx.py started using the options -V -w (and -2 if using
+ TDMA) and with ffmpeg.liq started (both from the apps directory),
+ you should be able to connect to http://hostip:8081/live.html
+ and click the Play button to begin. NOTE: See note E for more
+ details about how to specify the value for 'hostip' in the above
+ link.
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+7. troubleshooting
+ A. with the ffmpeg.liq script running ffmpeg should start sending
+ rtmp data over port 1935 to nginx. You should see files
+ start being populated in /var/www/html/hls/ .
+ B. If /var/www/html/hls is empty, check ffmpeg message output
+ for possible errors, and also check the nginx access and
+ error logs. Note that the /var/www/html/hls directory should
+ start receiving files a few seconds after ffmpeg.liq is started
+ (regardless of whether OP25 is actively receiving a station,
+ or is not receiving).
+ C. js debug can be enabled for hls.js by editing that file as
+ follows; locate the lines of code and change the "debug"
+ setting to "true"
+
+var hlsDefaultConfig = _objectSpread(_objectSpread({
+ autoStartLoad: true,
+ // used by stream-controller
+ startPosition: -1,
+ // used by stream-controller
+ defaultAudioCodec: void 0,
+ // used by stream-controller
+ debug: true, ///// <<<=== change this line from
+ ///// "false" to "true"
+
+ D. after reloading the page and with the web browser js console
+ opened (and with all message types enabled), debug messages
+ should now start appearing in the console. As before another
+ place to look for messages is in the nginx access and error
+ logs.
+ E. if you are doing heavy client-side debugging it may be helpful
+ to obtain a copy of the hls.js distribution and to populate
+ the hls.js.map file (with updated hls.js) in /var/www/html.
+
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+8. notes
+ A. due to the propagation delay inherent in the streaming
+ process, there is a latency of several seconds from when
+ the transmissions are receieved before they are played in
+ the remote web browser. OP25 attempts to keep the video
+ and audio synchronized but the usual user controls (hold,
+ lockout, etc). are not available (in this release) because
+ the several-second delay could cause the commands to operate
+ on stale talkgroup data (without additional work).
+ B. in keeping with the current OP25 liquidsoap setup, the audio
+ stream is converted to mono prior to streaming. It might be
+ possible to retain the stereo data (in cases where the L and
+ R channels contain separate information), but this has not
+ been tested. The ffmpeg.liq script would need to be changed to
+ use "output" instead of "mean(output)" and the ffmpeg script
+ would need to change "-ac 1" to "-ac 2". In addition the
+ options stereo=true and channels=2 would need to be set in the
+ %wav specification parameters.
+ C. multiple independent streams can be served simultaneously by
+ invoking a separate ffmpeg.sh script for each stream and by
+ changing the last component of the rtmp URL to a unique
+ value; for example:
+ rtmp://localhost/live/stream2
+ A unified (parameterized) version of ffmpeg.sh could also be
+ used.
+ Also, new versions of live.html and live.m3u8 in /var/www/html
+ (reflecting the above modification) would need to be added.
+ D. note that pausing and seeking etc. in the media feed isn't
+ possible when doing live streaming.
+ E. when connecting from the remote client to the nginx server as
+ detailed in step 6 (above) you should specify the value for
+ 'hostip' as follows (omitting the quotes):
+
+ 'localhost' (default) - use this when the client is on the same
+ machine as the server
+ 'host.ip.address' - specify the IP address of the server when
+ the client and server machines are different, and the server
+ does not have a DNS hostname.
+ 'hostname' - if the server has a DNS hostname, this name should
+ be used in place of 'hostip'.
+
+ Note that in the second and third cases above you must also
+ change the hostname from 'localhost' to the IP address or DNS
+ hostname, respectively, in the following files
+ live.html
+ live.m3u8
+ in /var/www/html (total three occurrences).
+
+ Similarly, if an IP port other than 8081 is to be used, the same
+ updates as above must be made, and also the nginx conf file must
+ be updated to reflect the changed port number.
+
+
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+########################################################################
+####### tested on ubuntu 18.04 #######
+####### sample nginx conf file - copy everything below this line #######
+
+user www-data;
+worker_processes auto;
+pid /run/nginx.pid;
+include /etc/nginx/modules-enabled/*.conf;
+
+events {
+ worker_connections 768;
+ # multi_accept on;
+}
+
+# RTMP configuration
+rtmp {
+ server {
+ listen 1935; # Listen on standard RTMP port
+ chunk_size 4000;
+
+ application live {
+ live on;
+ # Turn on HLS
+ hls on;
+ hls_path /var/www/html/hls/;
+ hls_fragment 3;
+ hls_playlist_length 60;
+ # disable consuming the stream from nginx as rtmp
+ deny play all;
+ }
+ }
+}
+
+http {
+ sendfile off;
+ tcp_nopush on;
+ #aio on;
+ directio 512;
+ default_type application/octet-stream;
+
+ server {
+ listen 8081;
+
+ location / {
+ # Disable cache
+ add_header 'Cache-Control' 'no-cache';
+
+ # CORS setup
+ add_header 'Access-Control-Allow-Origin' '*' always;
+ add_header 'Access-Control-Expose-Headers' 'Content-Length';
+
+ # allow CORS preflight requests
+ if ($request_method = 'OPTIONS') {
+ add_header 'Access-Control-Allow-Origin' '*';
+ add_header 'Access-Control-Max-Age' 1728000;
+ add_header 'Content-Type' 'text/plain charset=UTF-8';
+ add_header 'Content-Length' 0;
+ return 204;
+ }
+
+# include /etc/nginx/mime.types;
+ types {
+ text/html html;
+ text/css css;
+ application/javascript js;
+ application/dash+xml mpd;
+ application/vnd.apple.mpegurl m3u8;
+ video/mp2t ts;
+ }
+
+ access_log /var/log/nginx/access.log;
+ error_log /var/log/nginx/error.log;
+
+ root /var/www/html;
+
+ }
+ }
+}
+
diff --git a/op25/gr-op25_repeater/apps/alt-colors.json b/op25/gr-op25_repeater/apps/alt-colors.json
new file mode 100644
index 0000000..0f338d3
--- /dev/null
+++ b/op25/gr-op25_repeater/apps/alt-colors.json
@@ -0,0 +1,7 @@
+{
+ "label_color": "#000000",
+ "tic_color": "#000000",
+ "border_color": "#000000",
+ "plot_color": "#c000ff",
+ "background_color": "#ffffff"
+}
diff --git a/op25/gr-op25_repeater/apps/audio.py b/op25/gr-op25_repeater/apps/audio.py
new file mode 100755
index 0000000..255812f
--- /dev/null
+++ b/op25/gr-op25_repeater/apps/audio.py
@@ -0,0 +1,55 @@
+#!/usr/bin/env python3
+
+# Copyright 2017, 2018 Graham Norbury
+#
+# Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 Max H. Parke KA1RBI
+#
+# This file is part of OP25 and part of GNU Radio
+#
+# OP25 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 3, or (at your option)
+# any later version.
+#
+# OP25 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 OP25; see the file COPYING. If not, write to the Free
+# Software Foundation, Inc., 51 Franklin Street, Boston, MA
+# 02110-1301, USA.
+
+import signal
+import sys
+import time
+
+from optparse import OptionParser
+from sockaudio import socket_audio
+
+def signal_handler(signal, frame):
+ sys.stderr.write("audio.py shutting down\n")
+ audio_handler.stop()
+ sys.exit(0)
+
+parser = OptionParser()
+parser.add_option("-O", "--audio-output", type="string", default="default", help="audio output device name")
+parser.add_option("-H", "--host-ip", type="string", default="0.0.0.0", help="IP address to bind to")
+parser.add_option("-u", "--wireshark-port", type="int", default=23456, help="Wireshark port")
+parser.add_option("-2", "--two-channel", action="store_true", default=False, help="single or two channel audio")
+parser.add_option("-x", "--audio-gain", type="float", default="1.0", help="audio gain (default = 1.0)")
+parser.add_option("-s", "--stdout", action="store_true", default=False, help="write to stdout instead of audio device")
+parser.add_option("-S", "--silence", action="store_true", default=False, help="suppress output of zeros after timeout")
+
+(options, args) = parser.parse_args()
+if len(args) != 0:
+ parser.print_help()
+ sys.exit(1)
+
+audio_handler = socket_audio(options.host_ip, options.wireshark_port, options.audio_output, options.two_channel, options.audio_gain, options.stdout, silent_flag=options.silence)
+
+if __name__ == "__main__":
+ signal.signal(signal.SIGINT, signal_handler)
+ audio_handler.run()
+
diff --git a/op25/gr-op25_repeater/apps/cfg-900.json b/op25/gr-op25_repeater/apps/cfg-900.json
new file mode 100644
index 0000000..b1bb041
--- /dev/null
+++ b/op25/gr-op25_repeater/apps/cfg-900.json
@@ -0,0 +1,40 @@
+{
+ "channels": [
+ {
+ "demod_type": "fsk4",
+ "destination": "udp://127.0.0.1:56120",
+ "excess_bw": 0.2,
+ "filter_type": "rc",
+ "frequency": 924975000,
+ "if_rate": 24000,
+ "name": "p25 control channel",
+ "plot": "datascope",
+ "source": "symbols:sym-cc925.dat",
+ "symbol_rate": 4800
+ },
+ {
+ "demod_type": "fsk4",
+ "destination": "udp://127.0.0.1:56124",
+ "excess_bw": 0.2,
+ "filter_type": "rc",
+ "frequency": 924925000,
+ "if_rate": 24000,
+ "name": "p25 voice channel",
+ "plot": "datascope",
+ "source": "/home/mhp/rand4.raw",
+ "symbol_rate": 4800
+ }
+ ],
+ "devices": [
+ {
+ "args": "udp:127.0.0.1:25252",
+ "frequency": 924950000,
+ "gains": "",
+ "name": "udp",
+ "offset": 0,
+ "ppm": 0,
+ "rate": 120000,
+ "tunable": false
+ }
+ ]
+}
diff --git a/op25/gr-op25_repeater/apps/cfg-trunk.json b/op25/gr-op25_repeater/apps/cfg-trunk.json
new file mode 100644
index 0000000..b9a2d87
--- /dev/null
+++ b/op25/gr-op25_repeater/apps/cfg-trunk.json
@@ -0,0 +1,40 @@
+{
+ "channels": [
+ {
+ "demod_type": "cqpsk",
+ "destination": "udp://127.0.0.1:56124",
+ "excess_bw": 0.2,
+ "filter_type": "rc",
+ "frequency": 0,
+ "if_rate": 24000,
+ "name": "p25 control channel",
+ "plot": "symbol",
+ "decode": "p25_decoder:cc",
+ "symbol_rate": 4800
+ },
+ {
+ "demod_type": "cqpsk",
+ "destination": "udp://127.0.0.1:23456",
+ "excess_bw": 0.2,
+ "filter_type": "rc",
+ "frequency": 0,
+ "if_rate": 24000,
+ "name": "p25 voice channel",
+ "plot": "symbol",
+ "decode": "p25_decoder:vc",
+ "symbol_rate": 4800
+ }
+ ],
+ "devices": [
+ {
+ "args": "rtl=1",
+ "frequency": 454300000,
+ "gains": "lna:49",
+ "name": "rtl0",
+ "offset": 0,
+ "ppm": 54,
+ "rate": 1000000,
+ "tunable": false
+ }
+ ]
+}
diff --git a/op25/gr-op25_repeater/apps/cfg-trunk2.json b/op25/gr-op25_repeater/apps/cfg-trunk2.json
new file mode 100644
index 0000000..3759492
--- /dev/null
+++ b/op25/gr-op25_repeater/apps/cfg-trunk2.json
@@ -0,0 +1,50 @@
+{
+ "channels": [
+ {
+ "demod_type": "cqpsk",
+ "destination": "udp://127.0.0.1:56124",
+ "excess_bw": 0.2,
+ "filter_type": "rc",
+ "frequency": 0,
+ "if_rate": 24000,
+ "name": "p25 control channel",
+ "plot": "symbol",
+ "decode": "p25_decoder:cc",
+ "symbol_rate": 4800
+ },
+ {
+ "demod_type": "cqpsk",
+ "destination": "udp://127.0.0.1:23456",
+ "excess_bw": 0.2,
+ "filter_type": "rc",
+ "frequency": 0,
+ "if_rate": 24000,
+ "name": "p25 voice channel",
+ "plot": "symbol",
+ "decode": "p25_decoder:vc",
+ "symbol_rate": 4800
+ }
+ ],
+ "devices": [
+ {
+ "args": "rtl=00000011",
+ "frequency": 460300000,
+ "gains": "lna:49",
+ "name": "rtl11_cc",
+ "offset": 0,
+ "ppm": 54,
+ "rate": 1000000,
+ "tunable": false
+ },
+ {
+ "args": "rtl=00000012",
+ "frequency": 453000000,
+ "gains": "lna:49",
+ "name": "rtl12_vc",
+ "offset": 0,
+ "ppm": 54,
+ "rate": 1000000,
+ "tunable": false
+ }
+ ]
+}
diff --git a/op25/gr-op25_repeater/apps/cfg-trunkx.json b/op25/gr-op25_repeater/apps/cfg-trunkx.json
new file mode 100644
index 0000000..a004d56
--- /dev/null
+++ b/op25/gr-op25_repeater/apps/cfg-trunkx.json
@@ -0,0 +1,98 @@
+{
+ "channels": [
+ {
+ "demod_type": "cqpsk",
+ "destination": "udp://127.0.0.1:23456",
+ "excess_bw": 0.2,
+ "filter_type": "rc",
+ "frequency": 0,
+ "if_rate": 24000,
+ "name": "Oswego CC",
+ "plot": "symbol",
+ "decode": "p25_decoder:role=cc:dev=rtl12:nac=0x2a4",
+ "symbol_rate": 4800
+ },
+ {
+ "demod_type": "cqpsk",
+ "destination": "udp://127.0.0.1:23456",
+ "excess_bw": 0.2,
+ "filter_type": "rc",
+ "frequency": 0,
+ "if_rate": 24000,
+ "name": "Cayuga CC",
+ "plot": "symbol",
+ "decode": "p25_decoder:role=cc:dev=rtl12:nac=0x2a8",
+ "symbol_rate": 4800
+ },
+ {
+ "demod_type": "cqpsk",
+ "destination": "udp://127.0.0.1:23456",
+ "excess_bw": 0.2,
+ "filter_type": "rc",
+ "frequency": 0,
+ "if_rate": 24000,
+ "name": "460 MHz VC",
+ "plot": "symbol",
+ "decode": "p25_decoder:role=vc:dev=rtl12",
+ "symbol_rate": 4800
+ },
+ {
+ "demod_type": "cqpsk",
+ "destination": "udp://127.0.0.1:23456",
+ "excess_bw": 0.2,
+ "filter_type": "rc",
+ "frequency": 0,
+ "if_rate": 24000,
+ "name": "453-454 MHz VC",
+ "plot": "symbol",
+ "decode": "p25_decoder:role=vc:dev=rtl11",
+ "symbol_rate": 4800
+ },
+ {
+ "demod_type": "cqpsk",
+ "destination": "udp://127.0.0.1:56124",
+ "excess_bw": 0.2,
+ "filter_type": "rc",
+ "frequency": 0,
+ "if_rate": 24000,
+ "name": "Onondaga CC",
+ "plot": "symbol",
+ "decode": "p25_decoder:role=cc:dev=rtl12:nac=0x2a0",
+ "symbol_rate": 4800
+ },
+ {
+ "demod_type": "cqpsk",
+ "destination": "udp://127.0.0.1:56124",
+ "excess_bw": 0.2,
+ "filter_type": "rc",
+ "frequency": 0,
+ "if_rate": 24000,
+ "name": "Cortland CC",
+ "plot": "constellation",
+ "decode": "p25_decoder:role=cc:dev=rtl11:nac=0x4e1",
+ "symbol_rate": 4800
+ }
+ ],
+ "devices": [
+ {
+ "args": "rtl=00000012",
+ "frequency": 460500000,
+ "gains": "lna:49",
+ "name": "rtl12",
+ "offset": 0,
+ "ppm": 54,
+ "rate": 1000000,
+ "tunable": false
+ },
+ {
+ "args": "rtl=00000011",
+ "frequency": 453850000,
+ "gains": "lna:49",
+ "name": "rtl11",
+ "offset": 0,
+ "ppm": 55,
+ "rate": 2048000,
+ "tunable": false
+ }
+ ]
+}
diff --git a/op25/gr-op25_repeater/apps/cfg-udp.json b/op25/gr-op25_repeater/apps/cfg-udp.json
new file mode 100644
index 0000000..26c476d
--- /dev/null
+++ b/op25/gr-op25_repeater/apps/cfg-udp.json
@@ -0,0 +1,76 @@
+{
+ "channels": [
+ {
+ "demod_type": "fsk4",
+ "destination": "udp://127.0.0.1:56124",
+ "excess_bw": 0.2,
+ "filter_type": "nxdn",
+ "frequency": 442112500,
+ "if_rate": 24000,
+ "name": "nxdn48",
+ "plot": "datascope",
+ "source": "/home/mhp/rand0.raw",
+ "symbol_rate": 2400
+ },
+ {
+ "demod_type": "fsk4",
+ "destination": "udp://127.0.0.1:56128",
+ "excess_bw": 0.2,
+ "filter_type": "rrc",
+ "frequency": 442187500,
+ "if_rate": 24000,
+ "name": "dmr",
+ "plot": "datascope",
+ "source": "/home/mhp/rand1.raw",
+ "symbol_rate": 4800
+ },
+ {
+ "demod_type": "fsk4",
+ "destination": "udp://127.0.0.1:56132",
+ "excess_bw": 0.2,
+ "filter_type": "gmsk",
+ "frequency": 442262500,
+ "if_rate": 24000,
+ "name": "dstar",
+ "plot": "datascope",
+ "source": "/home/mhp/rand2.raw",
+ "symbol_rate": 4800
+ },
+ {
+ "demod_type": "fsk4",
+ "destination": "udp://127.0.0.1:56136",
+ "excess_bw": 0.2,
+ "filter_type": "rrc",
+ "frequency": 442337500,
+ "if_rate": 24000,
+ "name": "ysf",
+ "plot": "datascope",
+ "source": "/home/mhp/rand3.raw",
+ "symbol_rate": 4800
+ },
+ {
+ "demod_type": "fsk4",
+ "destination": "udp://127.0.0.1:56120",
+ "excess_bw": 0.2,
+ "filter_type": "rc",
+ "frequency": 442412500,
+ "if_rate": 24000,
+ "name": "p25",
+ "plot": "datascope",
+ "source": "/home/mhp/rand4.raw",
+ "symbol_rate": 4800
+ }
+ ],
+ "devices": [
+ {
+ "args": "udp:127.0.0.1:25252",
+ "frequency": 442262500,
+ "gains": "",
+ "name": "udp",
+ "offset": 0,
+ "ppm": 0,
+ "rate": 480000,
+ "tunable": false
+ }
+ ]
+}
diff --git a/op25/gr-op25_repeater/apps/cfg.json b/op25/gr-op25_repeater/apps/cfg.json
new file mode 100644
index 0000000..57a66c7
--- /dev/null
+++ b/op25/gr-op25_repeater/apps/cfg.json
@@ -0,0 +1,49 @@
+{
+ "channels": [
+ {
+ "demod_type": "cqpsk",
+ "destination": "udp://127.0.0.1:56120",
+ "excess_bw": 0.2,
+ "filter_type": "rc",
+ "frequency": 460412500,
+ "if_rate": 24000,
+ "name": "p25",
+ "plot": "symbol",
+ "symbol_rate": 4800
+ },
+ {
+ "demod_type": "fsk4",
+ "destination": "file:///tmp/out1.raw",
+ "excess_bw": 0.2,
+ "filter_type": "rrc",
+ "frequency": 460500000,
+ "if_rate": 24000,
+ "name": "ysf",
+ "plot": "datascope",
+ "symbol_rate": 4800
+ },
+ {
+ "demod_type": "fsk4",
+ "destination": "udp://127.0.0.1:56122",
+ "excess_bw": 0.2,
+ "filter_type": "rrc",
+ "frequency": 460050000,
+ "if_rate": 24000,
+ "name": "dmr",
+ "plot": "symbol",
+ "symbol_rate": 4800
+ }
+ ],
+ "devices": [
+ {
+ "args": "rtl=0",
+ "frequency": 460100000,
+ "gains": "lna:49",
+ "name": "rtl0",
+ "offset": 0,
+ "ppm": 38,
+ "rate": 1000000,
+ "tunable": false
+ }
+ ]
+}
diff --git a/op25/gr-op25_repeater/apps/color-map.json b/op25/gr-op25_repeater/apps/color-map.json
new file mode 100644
index 0000000..ad90812
--- /dev/null
+++ b/op25/gr-op25_repeater/apps/color-map.json
@@ -0,0 +1,602 @@
+[
+ [
+ 500,
+ "placeholder",
+ "do-not-use",
+ false
+ ],
+ [
+ 1,
+ "#0066ff",
+ "",
+ false
+ ],
+ [
+ 2,
+ "#ff0000",
+ "",
+ false
+ ],
+ [
+ 3,
+ "#ff9900",
+ "",
+ false
+ ],
+ [
+ 4,
+ "#eeeeee",
+ "",
+ false
+ ],
+ [
+ 5,
+ "#9966ff",
+ "",
+ false
+ ],
+ [
+ 6,
+ "#00ff00",
+ "",
+ false
+ ],
+ [
+ 7,
+ "#009933",
+ "",
+ false
+ ],
+ [
+ 8,
+ "#ffff00",
+ "",
+ false
+ ],
+ [
+ 9,
+ "#eee",
+ "",
+ false
+ ],
+ [
+ 10,
+ "#ff6666",
+ "",
+ false
+ ],
+ [
+ 11,
+ "#0080C0",
+ "",
+ false
+ ],
+ [
+ 12,
+ "#666666",
+ "",
+ false
+ ],
+ [
+ 13,
+ "#666666",
+ "",
+ false
+ ],
+ [
+ 14,
+ "#666666",
+ "",
+ false
+ ],
+ [
+ 15,
+ "#666666",
+ "",
+ false
+ ],
+ [
+ 16,
+ "#666666",
+ "",
+ false
+ ],
+ [
+ 17,
+ "#666666",
+ "",
+ false
+ ],
+ [
+ 18,
+ "#666666",
+ "",
+ false
+ ],
+ [
+ 19,
+ "#666666",
+ "",
+ false
+ ],
+ [
+ 20,
+ "#666666",
+ "",
+ false
+ ],
+ [
+ 21,
+ "#666666",
+ "",
+ false
+ ],
+ [
+ 22,
+ "#ff0000",
+ "",
+ true
+ ],
+ [
+ 23,
+ "#666666",
+ "",
+ false
+ ],
+ [
+ 24,
+ "#666666",
+ "",
+ false
+ ],
+ [
+ 25,
+ "#666666",
+ "",
+ false
+ ],
+ [
+ 26,
+ "#666666",
+ "",
+ false
+ ],
+ [
+ 27,
+ "#666666",
+ "",
+ false
+ ],
+ [
+ 28,
+ "#666666",
+ "",
+ false
+ ],
+ [
+ 29,
+ "#666666",
+ "",
+ false
+ ],
+ [
+ 30,
+ "#666666",
+ "",
+ false
+ ],
+ [
+ 31,
+ "#666666",
+ "",
+ false
+ ],
+ [
+ 32,
+ "#666666",
+ "",
+ false
+ ],
+ [
+ 33,
+ "#666666",
+ "",
+ false
+ ],
+ [
+ 34,
+ "#666666",
+ "",
+ false
+ ],
+ [
+ 35,
+ "#666666",
+ "",
+ false
+ ],
+ [
+ 36,
+ "#666666",
+ "",
+ false
+ ],
+ [
+ 37,
+ "#666666",
+ "",
+ false
+ ],
+ [
+ 38,
+ "#666666",
+ "",
+ false
+ ],
+ [
+ 39,
+ "#666666",
+ "",
+ false
+ ],
+ [
+ 40,
+ "#666666",
+ "",
+ false
+ ],
+ [
+ 41,
+ "#666666",
+ "",
+ false
+ ],
+ [
+ 42,
+ "#666666",
+ "",
+ false
+ ],
+ [
+ 43,
+ "#666666",
+ "",
+ false
+ ],
+ [
+ 44,
+ "#666666",
+ "",
+ false
+ ],
+ [
+ 45,
+ "#666666",
+ "",
+ false
+ ],
+ [
+ 46,
+ "#666666",
+ "",
+ false
+ ],
+ [
+ 47,
+ "#666666",
+ "",
+ false
+ ],
+ [
+ 48,
+ "#666666",
+ "",
+ false
+ ],
+ [
+ 49,
+ "#666666",
+ "",
+ false
+ ],
+ [
+ 50,
+ "#666666",
+ "",
+ false
+ ],
+ [
+ 51,
+ "#666666",
+ "",
+ false
+ ],
+ [
+ 52,
+ "#666666",
+ "",
+ false
+ ],
+ [
+ 53,
+ "#666666",
+ "",
+ false
+ ],
+ [
+ 54,
+ "#666666",
+ "",
+ false
+ ],
+ [
+ 55,
+ "#666666",
+ "",
+ false
+ ],
+ [
+ 56,
+ "#666666",
+ "",
+ false
+ ],
+ [
+ 57,
+ "#666666",
+ "",
+ false
+ ],
+ [
+ 58,
+ "#666666",
+ "",
+ false
+ ],
+ [
+ 59,
+ "#666666",
+ "",
+ false
+ ],
+ [
+ 60,
+ "#666666",
+ "",
+ false
+ ],
+ [
+ 61,
+ "#666666",
+ "",
+ false
+ ],
+ [
+ 62,
+ "#666666",
+ "",
+ false
+ ],
+ [
+ 63,
+ "#666666",
+ "",
+ false
+ ],
+ [
+ 64,
+ "#666666",
+ "",
+ false
+ ],
+ [
+ 65,
+ "#666666",
+ "",
+ false
+ ],
+ [
+ 66,
+ "#666666",
+ "",
+ false
+ ],
+ [
+ 67,
+ "#666666",
+ "",
+ false
+ ],
+ [
+ 68,
+ "#666666",
+ "",
+ false
+ ],
+ [
+ 69,
+ "#666666",
+ "",
+ false
+ ],
+ [
+ 70,
+ "#666666",
+ "",
+ false
+ ],
+ [
+ 71,
+ "#666666",
+ "",
+ false
+ ],
+ [
+ 72,
+ "#666666",
+ "",
+ false
+ ],
+ [
+ 73,
+ "#666666",
+ "",
+ false
+ ],
+ [
+ 74,
+ "#666666",
+ "",
+ false
+ ],
+ [
+ 75,
+ "#666666",
+ "",
+ false
+ ],
+ [
+ 76,
+ "#666666",
+ "",
+ false
+ ],
+ [
+ 77,
+ "#666666",
+ "",
+ false
+ ],
+ [
+ 78,
+ "#666666",
+ "",
+ false
+ ],
+ [
+ 79,
+ "#666666",
+ "",
+ false
+ ],
+ [
+ 80,
+ "#666666",
+ "",
+ false
+ ],
+ [
+ 81,
+ "#666666",
+ "",
+ false
+ ],
+ [
+ 82,
+ "#666666",
+ "",
+ false
+ ],
+ [
+ 83,
+ "#666666",
+ "",
+ false
+ ],
+ [
+ 84,
+ "#666666",
+ "",
+ false
+ ],
+ [
+ 85,
+ "#666666",
+ "",
+ false
+ ],
+ [
+ 86,
+ "#666666",
+ "",
+ false
+ ],
+ [
+ 87,
+ "#666666",
+ "",
+ false
+ ],
+ [
+ 88,
+ "#666666",
+ "",
+ false
+ ],
+ [
+ 89,
+ "#666666",
+ "",
+ false
+ ],
+ [
+ 90,
+ "#666666",
+ "",
+ false
+ ],
+ [
+ 91,
+ "#666666",
+ "",
+ false
+ ],
+ [
+ 92,
+ "#666666",
+ "",
+ false
+ ],
+ [
+ 93,
+ "#666666",
+ "",
+ false
+ ],
+ [
+ 94,
+ "#666666",
+ "",
+ false
+ ],
+ [
+ 95,
+ "#666666",
+ "",
+ false
+ ],
+ [
+ 96,
+ "#666666",
+ "",
+ false
+ ],
+ [
+ 97,
+ "#666666",
+ "",
+ false
+ ],
+ [
+ 98,
+ "#666666",
+ "",
+ false
+ ],
+ [
+ 99,
+ "#00ff00",
+ "#000000",
+ false
+ ]
+] \ No newline at end of file
diff --git a/op25/gr-op25_repeater/apps/correlation.json b/op25/gr-op25_repeater/apps/correlation.json
new file mode 100644
index 0000000..8f143b0
--- /dev/null
+++ b/op25/gr-op25_repeater/apps/correlation.json
@@ -0,0 +1,27 @@
+[
+ {
+ "fs":[ 1, 1, 1, 1, 1, -1, 1, 1, -1, -1, 1, 1, -1, -1, -1, -1, 1, -1, 1, -1, -1, -1, -1, -1 ],
+ "length":864,
+ "name":"P25"
+ },
+ {
+ "fs":[ -3, -3, 1, 1, -3, -3, 3, 3, -3, -3, -3, -3, 3, 3, 3, 3, -1, -1, 3, 3 ],
+ "length":384,
+ "name":"NXDN48"
+ },
+ {
+ "fs":[ -3, 1, -3, 3, -3, -3, 3, 3, -1, 3 ],
+ "length":192,
+ "name":"NXDN96"
+ },
+ {
+ "fs":[ 1, -1, 1, 1, 1, 1, -1, -1, -1, 1, 1, -1, -1, 1, -1, -1, 1, -1, 1, 1, -1, -1, 1, -1 ],
+ "length":576,
+ "name":"DMR"
+ },
+ {
+ "fs":[ -3, 3, 3, 1, 3, -3, 1, 3, -3, 1, -1, 3, 3, -1, 1, -3, 3, 1, -3, 3 ],
+ "length":480,
+ "name":"YSF"
+ }
+]
diff --git a/op25/gr-op25_repeater/apps/create_image.py b/op25/gr-op25_repeater/apps/create_image.py
new file mode 100644
index 0000000..17c5d25
--- /dev/null
+++ b/op25/gr-op25_repeater/apps/create_image.py
@@ -0,0 +1,57 @@
+#!/usr/bin/env python
+
+#
+# (c) Copyright 2020, OP25
+#
+# This file is part of OP25 and part of GNU Radio
+#
+# OP25 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 3, or (at your option)
+# any later version.
+#
+# OP25 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 OP25; see the file COPYING. If not, write to the Free
+# Software Foundation, Inc., 51 Franklin Street, Boston, MA
+# 02110-1301, USA.
+
+""" generate named image file consisting of multi-line text """
+
+from PIL import Image, ImageDraw, ImageFont
+import os
+
+_TTF_FILE = '/usr/share/fonts/truetype/freefont/FreeSerif.ttf'
+
+def create_image(textlist=["Blank"], imgfile="test.png", bgcolor='red', fgcolor='black', windowsize=(400,300)):
+ global _TTF_FILE
+ width=windowsize[0]
+ height=windowsize[1]
+
+ margin = 4
+ if not os.access(_TTF_FILE, os.R_OK):
+ font = ImageFont.load_default()
+ else:
+ font = ImageFont.truetype(_TTF_FILE, 16)
+ img = Image.new('RGB', (width, height), bgcolor)
+ draw = ImageDraw.Draw(img)
+ cursor = 0
+ for line in textlist:
+ w,h = draw.textsize(line, font)
+ # TODO: overwidth check needed?
+ if cursor+h >= height:
+ break
+ draw.text((margin, cursor), line,'black',font)
+ cursor += h + margin // 2
+
+ img.save(imgfile)
+
+if __name__ == '__main__':
+ s = []
+ s.append('Starting...')
+
+ create_image(textlist=s, bgcolor='#c0c0c0')
diff --git a/op25/gr-op25_repeater/apps/emap.py b/op25/gr-op25_repeater/apps/emap.py
new file mode 100644
index 0000000..efd63cc
--- /dev/null
+++ b/op25/gr-op25_repeater/apps/emap.py
@@ -0,0 +1,383 @@
+#sql_dbi events map
+
+events_map = {
+ "grp_v_ch_grant_mbt": [
+ ['time', 'time'],
+ ['sysid', 'sysid'],
+ ['opcode', 'opcode'],
+ ['cc_event', 'cc_event'],
+ ['p', 'options'],
+ ['frequency', 'frequency'],
+ ['tgid', 'group'],
+ ['suid', 'srcaddr'],
+ ],
+ "grg_exenc_cmd": [
+ ['time', 'time'],
+ ['sysid', 'sysid'],
+ ['opcode', 'opcode'],
+ ['cc_event', 'cc_event'],
+ ['mfrid', 'mfrid'],
+ ['tgid', 'sg'],
+ ['p', 'keyid'],
+ ],
+ "grp_v_ch_grant": [
+ ['time', 'time'],
+ ['sysid', 'sysid'],
+ ['opcode', 'opcode'],
+ ['cc_event', 'cc_event'],
+ ['mfrid', 'mfrid'],
+ ['p', 'options'],
+ ['frequency', 'frequency'],
+ ['tgid', 'group'],
+ ['suid', 'srcaddr'],
+ ],
+ "mot_grg_cn_grant": [
+ ['time', 'time'],
+ ['sysid', 'sysid'],
+ ['opcode', 'opcode'],
+ ['cc_event', 'cc_event'],
+ ['mfrid', 'mfrid'],
+ ['frequency', 'frequency'],
+ ['tgid', 'sg'],
+ ['suid', 'sa'],
+ ],
+ "grp_v_ch_grant_updt": [
+ ['time', 'time'],
+ ['sysid', 'sysid'],
+ ['opcode', 'opcode'],
+ ['cc_event', 'cc_event'],
+ ['mfrid', 'mfrid'],
+ ['frequency', 'frequency1'],
+ ['tgid', 'group1'],
+ ],
+ "grp_v_ch_grant_updt_exp": [
+ ['time', 'time'],
+ ['sysid', 'sysid'],
+ ['opcode', 'opcode'],
+ ['cc_event', 'cc_event'],
+ ['mfrid', 'mfrid'],
+ ['p', 'options'],
+ ['frequency', 'frequency'],
+ ['tgid', 'group'],
+ ],
+ "ack_resp_fne": [
+ ['time', 'time'],
+ ['sysid', 'sysid'],
+ ['opcode', 'opcode'],
+ ['cc_event', 'cc_event'],
+ ['p', 'aiv'],
+ ['p2', 'ex'],
+ ['p3', 'addl'],
+ ['wacn', 'wacn'],
+ ['suid', 'source'],
+ ['suid2', 'target'],
+ ],
+ "deny_resp": [
+ ['time', 'time'],
+ ['sysid', 'sysid'],
+ ['opcode', 'opcode'],
+ ['cc_event', 'cc_event'],
+ ['p', 'aiv'],
+ ['p2', 'reason'],
+ ['p3', 'additional'],
+ ['suid', 'target'],
+ ],
+ "grp_aff_resp": [
+ ['time', 'time'],
+ ['sysid', 'sysid'],
+ ['opcode', 'opcode'],
+ ['cc_event', 'cc_event'],
+ ['p', 'affiliation'],
+ ['p2', 'group_aff_value'],
+ ['tgid', 'announce_group'],
+ ['tgid2', 'group'],
+ ['suid', 'target'],
+ ],
+ "grp_aff_q": [
+ ['time', 'time'],
+ ['sysid', 'sysid'],
+ ['opcode', 'opcode'],
+ ['cc_event', 'cc_event'],
+ ['suid', 'source'],
+ ['suid2', 'target'],
+ ],
+ "loc_reg_resp": [
+ ['time', 'time'],
+ ['sysid', 'sysid'],
+ ['opcode', 'opcode'],
+ ['cc_event', 'cc_event'],
+ ['p', 'rv'],
+ ['p2', 'rfss'],
+ ['p3', 'siteid'],
+ ['tgid', 'group'],
+ ['suid', 'target'],
+ ],
+ "u_reg_resp": [
+ ['time', 'time'],
+ ['sysid', 'sysid'],
+ ['opcode', 'opcode'],
+ ['cc_event', 'cc_event'],
+ ['p', 'rv'],
+ ['suid', 'source'],
+ ['suid2', 'target'],
+ ],
+ "u_reg_cmd": [
+ ['time', 'time'],
+ ['sysid', 'sysid'],
+ ['opcode', 'opcode'],
+ ['cc_event', 'cc_event'],
+ ['suid', 'source'],
+ ['suid2', 'target'],
+ ],
+ "u_de_reg_ack": [
+ ['time', 'time'],
+ ['sysid', 'sysid'],
+ ['opcode', 'opcode'],
+ ['cc_event', 'cc_event'],
+ ['wacn', 'wacn'],
+ ['suid', 'source'],
+ ],
+ "ext_fnct_cmd": [
+ ['time', 'time'],
+ ['sysid', 'sysid'],
+ ['opcode', 'opcode'],
+ ['cc_event', 'cc_event'],
+ ['mfrid', 'mfrid'],
+ ['p', 'efclass'],
+ ['p2', 'efoperand'],
+ ['suid', 'efargs'],
+ ],
+ "end_call": [
+ ['time', 'time'],
+ ['sysid', 'sysid'],
+ ['opcode', 'opcode'],
+ ['cc_event', 'cc_event'],
+ ['p', 'code'],
+ ['suid', 'srcaddr'],
+ ['tgid', 'tgid'],
+ ['p2', 'duration'],
+ ['p3', 'count'],
+ ],
+}
+
+# cc_event to numerical id (oplog and sql_dbi)
+cc_events = {
+ "ack_resp_fne": 1,
+ "deny_resp": 2,
+ "end_call": 3,
+ "ext_fnct_cmd": 4,
+ "grg_exenc_cmd": 5,
+ "grp_aff_q": 6,
+ "grp_aff_resp": 7,
+ "grp_v_ch_grant": 8,
+ "grp_v_ch_grant_mbt": 9,
+ "grp_v_ch_grant_updt": 10,
+ "grp_v_ch_grant_updt_exp": 11,
+ "loc_reg_resp": 12,
+ "u_de_reg_ack": 13,
+ "u_reg_cmd": 14,
+ "u_reg_resp": 15,
+ "mot_grg_cn_grant": 16,
+}
+
+# sql column names to DataTables (Oplog)
+oplog_map = {
+ "grp_v_ch_grant_mbt": [
+ ['time', 'Time'],
+ ['sysid', 'System'],
+ ['opcode', 'opcode'],
+ ['cc_event', 'cc_event'],
+ ['mfrid', 'MFRID'],
+ ['p', 'Options'],
+ ['frequency', 'Frequency'],
+ ['tgid', 'Talkgroup ID'],
+ ['tgid', 'Talkgroup'],
+ ['suid', 'Source ID'],
+ ['suid', 'Source'],
+ ],
+ "grg_exenc_cmd": [
+ ['time', 'Time'],
+ ['sysid', 'System'],
+ ['opcode', 'opcode'],
+ ['cc_event', 'cc_event'],
+ ['mfrid', 'MFRID'],
+ ['tgid', 'SG (tgid)'],
+ ['p', 'Key ID'],
+ ],
+ "grp_v_ch_grant": [
+ ['time', 'Time'],
+ ['sysid', 'System'],
+ ['opcode', 'opcode'],
+ ['cc_event', 'cc_event'],
+ ['mfrid', 'MFRID'],
+ ['p', 'Options'],
+ ['frequency', 'Frequency'],
+ ['tgid', 'Talkgroup ID'],
+ ['tgid', 'Talkgroup'],
+ ['suid', 'Source ID'],
+ ['suid', 'Source'],
+ ],
+ "mot_grg_cn_grant": [
+ ['time', 'Time'],
+ ['sysid', 'System'],
+ ['opcode', 'opcode'],
+ ['cc_event', 'cc_event'],
+ ['mfrid', 'MFRID'],
+ ['frequency', 'Frequency'],
+ ['tgid', 'Talkgroup ID'],
+ ['tgid', 'Talkgroup'],
+ ['suid', 'Source ID'],
+ ['suid', 'Source'],
+ ],
+ "grp_v_ch_grant_updt": [
+ ['time', 'Time'],
+ ['sysid', 'System'],
+ ['opcode', 'opcode'],
+ ['cc_event', 'cc_event'],
+ ['mfrid', 'MFRID'],
+ ['frequency', 'Frequency'],
+ ['tgid', 'Talkgroup ID'],
+ ['tgid', 'Talkgroup'],
+ ],
+ "grp_v_ch_grant_updt_exp": [
+ ['time', 'Time'],
+ ['sysid', 'System'],
+ ['opcode', 'opcode'],
+ ['cc_event', 'cc_event'],
+ ['mfrid', 'mfrid'],
+ ['p', 'Options'],
+ ['frequency', 'Frequency'],
+ ['tgid', 'Talkgroup ID'],
+ ['tgid', 'Talkgroup'],
+ ],
+ "ack_resp_fne": [
+ ['time', 'Time'],
+ ['sysid', 'System'],
+ ['opcode', 'opcode'],
+ ['cc_event', 'cc_event'],
+ ['p', 'aiv'],
+ ['p2', 'ex'],
+ ['p3', 'Additional'],
+ ['wacn', 'wacn'],
+ ['suid', 'System Source'],
+ ['suid2', 'Target ID'],
+ ['suid2', 'Target'],
+ ],
+ "deny_resp": [
+ ['time', 'Time'],
+ ['sysid', 'System'],
+ ['opcode', 'opcode'],
+ ['cc_event', 'cc_event'],
+ ['p', 'aiv'],
+ ['p2', 'Reason'],
+ ['p3', 'Additional'],
+ ['suid', 'Target ID'],
+ ['suid', 'Target'],
+ ],
+ "grp_aff_resp": [
+ ['time', 'Time'],
+ ['sysid', 'System'],
+ ['opcode', 'opcode'],
+ ['cc_event', 'cc_event'],
+ ['p', 'Affiliation'],
+ ['p2', 'Group Aff Value'],
+ ['tgid', 'Announce Group'],
+ ['tgid2', 'Talkgroup ID'],
+ ['tgid2', 'Talkgroup'],
+ ['suid', 'Target ID'],
+ ['suid', 'Target'],
+ ],
+ "grp_aff_q": [
+ ['time', 'Time'],
+ ['sysid', 'System'],
+ ['opcode', 'opcode'],
+ ['cc_event', 'cc_event'],
+ ['suid', 'System Source'],
+ ['suid2', 'Target ID'],
+ ['suid2', 'Target'],
+ ],
+ "loc_reg_resp": [
+ ['time', 'Time'],
+ ['sysid', 'System'],
+ ['opcode', 'opcode'],
+ ['cc_event', 'cc_event'],
+ ['p', 'rv'],
+ ['p2', 'RFSS'],
+ ['p3', 'Site'],
+ ['tgid', 'Talkgroup ID'],
+ ['tgid', 'Talkgroup'],
+ ['suid', 'Target ID'],
+ ['suid', 'Target'],
+ ],
+ "u_reg_resp": [
+ ['time', 'Time'],
+ ['sysid', 'System'],
+ ['opcode', 'opcode'],
+ ['cc_event', 'cc_event'],
+ ['p', 'rv'],
+ ['suid', 'Source ID'],
+ ['suid', 'Source'],
+ ['suid2', 'Target'],
+ ],
+ "u_reg_cmd": [
+ ['time', 'Time'],
+ ['sysid', 'System'],
+ ['opcode', 'opcode'],
+ ['cc_event', 'cc_event'],
+ ['suid', 'System Source'],
+ ['suid2', 'Target ID'],
+ ['suid2', 'Target'],
+ ],
+ "u_de_reg_ack": [
+ ['time', 'Time'],
+ ['sysid', 'System'],
+ ['opcode', 'opcode'],
+ ['cc_event', 'cc_event'],
+ ['wacn', 'WACN'],
+ ['suid', 'Source ID'],
+ ['suid', 'Source'],
+ ],
+ "ext_fnct_cmd": [
+ ['time', 'Time'],
+ ['sysid', 'System'],
+ ['opcode', 'opcode'],
+ ['cc_event', 'cc_event'],
+ ['mfrid', 'MFRID'],
+ ['p', 'Class'],
+ ['p2', 'Operand'],
+ ['suid', 'System Source'],
+ ],
+ "end_call": [
+ ['time', 'Time'],
+ ['sysid', 'System'],
+ ['opcode', 'opcode'],
+ ['cc_event', 'cc_event'],
+ ['p', 'Code'],
+ ['suid', 'Source ID'],
+ ['suid', 'Source'],
+ ['tgid', 'Talkgroup ID'],
+ ['tgid', 'Talkgroup'],
+ ['p2', 'Duration (ms)'],
+ ['p3', 'Count (p3)'],
+ ],
+}
+
+# friendly long description strings, used in Oplog
+cc_desc = {
+ "ack_resp_fne": "Acknowledge Response FNE - 0x20",
+ "deny_resp": "Deny Response - 0x27",
+ "end_call": "End Call (not a naitve control channel event)",
+ "ext_fnct_cmd": "Extended Function Command - 0x24",
+ "grg_exenc_cmd": "Harris Group Regroup Explicit Encryption Command - 0x30",
+ "grp_aff_q": "Group Affiliation Query - 0x2A",
+ "grp_aff_resp": "Group Affiliation Response - 0x28",
+ "grp_v_ch_grant": "Group Voice Channel Grant - 0x00",
+ "grp_v_ch_grant_mbt": "Group Voice Channel Grant, Multiple Block Trunking",
+ "grp_v_ch_grant_updt": "Group Voice Channel Grant Update - 0x02",
+ "grp_v_ch_grant_updt_exp": "Group Voice Channel Grant Update, Explicit - 0x03",
+ "loc_reg_resp": "Location Registration Response 0x2B",
+ "mot_grg_cn_grant": "Motorola Patch Channel Grant - 0x02",
+ "u_de_reg_ack": "De-Registration Acknowledge (Logout) - 0x2F",
+ "u_reg_cmd": "Unit Registration Command (Force Unit Registration) - 0x2D",
+ "u_reg_resp": "Unit Registration Response - 0x2C"
+}
diff --git a/op25/gr-op25_repeater/apps/example_liquidsoap.liq b/op25/gr-op25_repeater/apps/example_liquidsoap.liq
new file mode 100644
index 0000000..a0ee73e
--- /dev/null
+++ b/op25/gr-op25_repeater/apps/example_liquidsoap.liq
@@ -0,0 +1,73 @@
+#!/usr/bin/liquidsoap
+
+# Example liquidsoap streaming from op25 to icecast
+# (c) 2019, 2020 gnorbury@bondcar.com, wllmbecks@gmail.com
+#
+
+set("log.stdout", true)
+set("log.file.path", "/home/pi/op25/op25/gr-op25_repeater/apps/liquidsoap.log")
+set("log.file", true)
+set("log.level", 3)
+
+# Make the native sample rate compatible with op25
+set("frame.audio.samplerate", 8000)
+
+# SOURCE INPUT BLOCK OPTIONS
+# Mono and stereo input sources are mutually exclusive. Choose type.
+
+# Mono input source
+input = mksafe(input.external(buffer=0.25, channels=2, samplerate=8000, restart_on_error=false, "./audio.py -x 2 -s"))
+# Consider increasing the buffer value on slow systems such as RPi3. e.g. buffer=0.25
+# Longer buffer results in less choppy audio but at the expense of increased latency.
+
+# Left channel input source and audio summing for two-slot protocols
+#left = input.external(buffer=0.25, channels=2, samplerate=8000, restart_on_error=false, "./audio.py -u 23450 -x 2 -s")
+#left = audio_to_stereo(left)
+#left = stereo.pan(pan=1., left)
+
+# Right channel input source and audio summing for two-slot protocols
+#right = input.external(buffer=0.25, channels=2, samplerate=8000, restart_on_error=false, "./audio.py -u 23460 -x 2 -s")
+#right = audio_to_stereo(right)
+#right = stereo.pan(pan=-1., right)
+
+# OPTIONAL AUDIO SIGNAL PROCESSING BLOCKS
+# Uncomment to enable
+#
+# High pass filter mono
+input = filter.iir.butterworth.high(frequency = 200.0, order = 4, input)
+
+# High pass filter stereo
+#left = filter.iir.butterworth.high(frequency = 200.0, order = 4, left)
+#right = filter.iir.butterworth.high(frequency = 200.0, order = 4, right)
+
+# Low pass filter mono
+input = filter.iir.butterworth.low(frequency = 3250.0, order = 4, input)
+
+# Low pass filter stereo
+#left = filter.iir.butterworth.low(frequency = 3250.0, order = 4, left)
+#right = filter.iir.butterworth.low(frequency = 3250.0, order = 4, right)
+
+# Normalization mono
+input = normalize(input, gain_max = 3.0, gain_min = -3.0, target = -16.0, threshold = -40.0)
+
+# Normalization stereo -- Note -- Adjust target gains independently to achieve left/right balance
+#left = normalize(left, gain_max = 3.0, gain_min = -3.0, target = -16.0, threshold = -40.0)
+#right = normalize(right, gain_max = 3.0, gain_min = -3.0, target = -16.0, threshold = -40.0)
+
+# Commnent out the line below for "non-stereo" (mono) output
+#input = mksafe(add(normalize=false, [left,right]))
+
+# LOCAL AUDIO OUTPUT
+# Uncomment the line below to enable local sound
+#output.ao(input)
+
+# ICECAST STREAMING
+# Uncomment to enable output to an icecast server
+# Change the "host", "password", and "mount" strings appropriately first!
+# For metadata to work properly, the host address given here MUST MATCH the address in op25's meta.json file
+#
+# Mono Stream
+output.icecast(%mp3(bitrate=16, samplerate=22050, stereo=false), description="op25", genre="Public Safety", url="", fallible=false, icy_metadata="false", host="localhost", port=8000, mount="op25", password="hackme", mean(input))
+#
+# Stereo Stream
+#output.icecast(%mp3(bitrate=16, samplerate=22050, stereo=true), description="op25", genre="Public Safety", url="", fallible=false, icy_metadata="false", host="localhost", port=8000, mount="op25", password="hackme", input)
diff --git a/op25/gr-op25_repeater/apps/ffmpeg.liq b/op25/gr-op25_repeater/apps/ffmpeg.liq
new file mode 100755
index 0000000..5a13376
--- /dev/null
+++ b/op25/gr-op25_repeater/apps/ffmpeg.liq
@@ -0,0 +1,15 @@
+#!/usr/bin/liquidsoap
+
+# Example liquidsoap hls streaming from op25 to nginx
+# (c) 2019, 2020 gnorbury@bondcar.com, wllmbecks@gmail.com
+# (c) 2020 KA1RBI
+
+set("log.stdout", true)
+set("log.file", false)
+set("log.level", 1)
+
+set("frame.audio.samplerate", 8000)
+
+input = mksafe(input.external(buffer=0.02, channels=2, samplerate=8000, restart_on_error=false, "./audio.py -x 2 -s -S"))
+
+output.external(%wav(stereo=false, channels=1, samplesize=16, header=false, samplerate=8000), fallible=false, flush=true, "./ffmpeg.sh", mean(input))
diff --git a/op25/gr-op25_repeater/apps/ffmpeg.sh b/op25/gr-op25_repeater/apps/ffmpeg.sh
new file mode 100755
index 0000000..57e946e
--- /dev/null
+++ b/op25/gr-op25_repeater/apps/ffmpeg.sh
@@ -0,0 +1,42 @@
+#! /bin/sh
+
+# Copyright (c) 2020 OP25
+#
+# This file is part of OP25 and part of GNU Radio
+#
+# OP25 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 3, or (at your option)
+# any later version.
+#
+# OP25 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 OP25; see the file COPYING. If not, write to the Free
+# Software Foundation, Inc., 51 Franklin Street, Boston, MA
+# 02110-1301, USA.
+
+#
+# this script should not be run directly - run ffmpeg.liq instead
+#
+# requires ffmpeg configured with --enable-libx264
+#
+
+ffmpeg \
+ -ar 8000 \
+ -ac 1 \
+ -acodec pcm_s16le \
+ -f s16le \
+ -i pipe:0 \
+ -f image2 \
+ -loop 1 \
+ -i ../www/images/status.png \
+ -vcodec libx264 \
+ -pix_fmt yuv420p \
+ -f flv \
+ -acodec aac \
+ -b:a 48k \
+ rtmp://localhost/live/stream
diff --git a/op25/gr-op25_repeater/apps/gr_gnuplot.py b/op25/gr-op25_repeater/apps/gr_gnuplot.py
index 2fe3c92..cd828cc 100644
--- a/op25/gr-op25_repeater/apps/gr_gnuplot.py
+++ b/op25/gr-op25_repeater/apps/gr_gnuplot.py
@@ -20,33 +20,93 @@
# 02110-1301, USA.
import sys
+import os
+import time
import subprocess
+import json
+import threading
+import glob
-from gnuradio import gr, gru, eng_notation
+from gnuradio import gr, eng_notation
from gnuradio import blocks, audio
from gnuradio.eng_option import eng_option
import numpy as np
from gnuradio import gr
+from math import pi, sin, cos
_def_debug = 0
_def_sps = 10
+_def_cpm_mode = 'cpm'
GNUPLOT = '/usr/bin/gnuplot'
FFT_AVG = 0.25
+MIX_AVG = 0.15
+BAL_AVG = 0.05
FFT_BINS = 512
+def degrees(r):
+ d = 360 * r / (2*pi)
+ while d <0:
+ d += 360
+ while d > 360:
+ d -= 360
+ return d
+
+def limit(a,lim):
+ if a > lim:
+ return lim
+ return a
+
+def ensure_str(s): # for python 2/3
+ if isinstance(s[0], str):
+ return s
+ ns = ''
+ for i in range(len(s)):
+ ns += chr(s[i])
+ return ns
+
+PSEQ = 0
+
class wrap_gp(object):
- def __init__(self, sps=_def_sps):
+ def __init__(self, sps=_def_sps, logfile=None, title="", color_cfg='plot-colors.json'):
+ global PSEQ
self.sps = sps
- self.center_freq = None
+ self.center_freq = 0.0
self.relative_freq = 0.0
+ self.offset_freq = 0.0
self.width = None
self.ffts = ()
self.freqs = ()
self.avg_pwr = np.zeros(FFT_BINS)
- self.buf = []
+ self.avg_sum_pwr = 0.0
+ self.buf = np.array([])
self.plot_count = 0
+ self.last_plot = 0
+ self.plot_interval = None
+ self.sequence = 0
+ self.output_dir = None
+ self.filename = None
+ self.logfile = logfile
+ self.title = title
+ self.sequence_id = PSEQ
+ PSEQ += 1
+ x = self.sequence_id % 3
+ y = self.sequence_id // 3
+ self.position = (x, y)
+
+ self.colors = {}
+ self.colors['label_color'] = ''
+ self.colors['tic_color'] = ''
+ self.colors['border_color'] = ''
+ self.colors['plot_color'] = ''
+ self.colors['background_color'] = ''
+ if color_cfg and os.access(color_cfg, os.R_OK):
+ ccfg = json.loads(open(color_cfg).read())
+ for color in ccfg:
+ self.colors[color] = ccfg[color]
+
+ self.next_cpmd = time.time()
self.attach_gp()
@@ -56,88 +116,316 @@ class wrap_gp(object):
self.gp = subprocess.Popen(args, executable=exe, stdin=subprocess.PIPE)
def kill(self):
- self.gp.kill()
- self.gp.wait()
+ try:
+ self.gp.stdin.close() # closing pipe should cause subprocess to exit
+ except IOError:
+ pass
+ sleep_count = 0
+ while True: # wait politely, but only for so long
+ self.gp.poll()
+ if self.gp.returncode is not None:
+ break
+ time.sleep(0.1)
+ if self.gp.returncode is not None:
+ break
+ sleep_count += 1
+ if (sleep_count & 1) == 0:
+ self.gp.kill()
+ if sleep_count >= 3:
+ break
+
+ def set_interval(self, v):
+ self.plot_interval = v
+
+ def set_output_dir(self, v):
+ self.output_dir = v
+
+ def set_sps(self, sps):
+ self.sps = sps
def plot(self, buf, bufsz, mode='eye'):
BUFSZ = bufsz
consumed = min(len(buf), BUFSZ-len(self.buf))
if len(self.buf) < BUFSZ:
- self.buf.extend(buf[:consumed])
+ self.buf = np.concatenate((self.buf, buf[:int(consumed)]))
if len(self.buf) < BUFSZ:
return consumed
self.plot_count += 1
if mode == 'eye' and self.plot_count % 20 != 0:
- self.buf = []
+ self.buf = np.array([])
return consumed
plots = []
s = ''
- while(len(self.buf)):
- if mode == 'eye':
- if len(self.buf) < self.sps:
+ plot_size = (320,240)
+ if mode == 'eye':
+ nplots = len(self.buf) // self.sps - 2
+ for i in range(nplots):
+ s += '\n'.join(['%f' % self.buf[i*self.sps+j] for j in range(self.sps+1)])
+ s += '\ne\n'
+ plots.append('"-" with lines')
+ elif mode == 'cpm':
+ nplots = len(self.buf)
+ ab = np.abs(self.buf)
+ for i in range(len(ab)):
+ s += '%f\n' % ab[i]
+ s += 'e\n'
+ plots.append('"-" with lines')
+ elif mode == 'cpmd':
+ if time.time() < self.next_cpmd:
+ self.buf = np.array([])
+ return 0
+ self.next_cpmd = time.time() + 0.5
+ ab = np.abs(self.buf)
+ thresh = np.max(ab) / 2.0
+ mask1 = np.array(ab > thresh, dtype=np.int)
+ maskdf = mask1[1:] - mask1[:-1]
+ nz = np.array(np.nonzero(maskdf), dtype=np.int)[0]
+ nzd = nz[1:]-nz[:-1]
+ nzdn = nzd // self.sps
+ sel = (nzdn > 165) & (nzdn < 185)
+ valid = np.array(np.nonzero(sel), dtype=np.int)[0]
+ if len(valid) < 1:
+ self.buf = np.array([])
+ return 0
+ v0 = valid[0]
+ i0 = nz[v0]
+ samples = self.buf[i0 : i0+170*self.sps+2]
+ fmd = np.angle(samples[1:] * np.conj(samples[:-1]))
+ fmd = fmd[12*self.sps:]
+ for n in range(0,len(fmd),self.sps):
+ sl = fmd[n:n+self.sps+1]
+ if len(sl) != self.sps+1:
break
- for i in range(self.sps):
- s += '%f\n' % self.buf[i]
- s += 'e\n'
- self.buf=self.buf[self.sps:]
+ s += '\n'.join(['%f' % (x*self.sps) for x in sl])
+ s += '\ne\n'
plots.append('"-" with lines')
- elif mode == 'constellation':
- for b in self.buf:
- s += '%f\t%f\n' % (b.real, b.imag)
- s += 'e\n'
- self.buf = []
- plots.append('"-" with points')
- elif mode == 'symbol':
- for b in self.buf:
- s += '%f\n' % (b)
- s += 'e\n'
- self.buf = []
- plots.append('"-" with dots')
- elif mode == 'fft':
- self.ffts = np.fft.fft(self.buf * np.blackman(BUFSZ)) / (0.42 * BUFSZ)
- self.ffts = np.fft.fftshift(self.ffts)
- self.freqs = np.fft.fftfreq(len(self.ffts))
- self.freqs = np.fft.fftshift(self.freqs)
- if self.center_freq and self.width:
- self.freqs = ((self.freqs * self.width) + self.center_freq) / 1e6
- for i in xrange(len(self.ffts)):
+ elif mode == 'constellation':
+ plot_size = (240,240)
+ self.buf = self.buf[:100]
+ for b in self.buf:
+ s += '%f\t%f\n' % (degrees(np.angle(b)), limit(np.abs(b),1.0))
+ s += 'e\n'
+ plots.append('"-" with points')
+ for b in self.buf:
+ #s += '%f\t%f\n' % (b.real, b.imag)
+ s += '%f\t%f\n' % (degrees(np.angle(b)), limit(np.abs(b),1.0))
+ s += 'e\n'
+ plots.append('"-" with lines')
+ elif mode == 'symbol':
+ for b in self.buf:
+ s += '%f\n' % (b)
+ s += 'e\n'
+ plots.append('"-" with points')
+ elif mode == 'fftf':
+ self.ffts = np.fft.rfft(self.buf * np.blackman(BUFSZ)) / (0.42 * BUFSZ)
+ #self.ffts = np.fft.fftshift(self.ffts)
+ self.ffts = np.abs(self.ffts) ** 2.0
+ self.ffts /= np.max(self.ffts)
+ for i in range(len(self.ffts)):
+ s += '%f\n' % (self.ffts[i])
+ s += 'e\n'
+ plots.append('"-" with lines')
+ elif mode == 'fft' or mode == 'mixer':
+ sum_pwr = 0.0
+ self.ffts = np.fft.fft(self.buf * np.blackman(BUFSZ)) / (0.42 * BUFSZ)
+ self.ffts = np.fft.fftshift(self.ffts)
+ self.freqs = np.fft.fftfreq(len(self.ffts))
+ self.freqs = np.fft.fftshift(self.freqs)
+ tune_freq = (self.center_freq - self.relative_freq) / 1e6
+ if self.center_freq and self.width:
+ self.freqs = ((self.freqs * self.width) + self.center_freq + self.offset_freq) / 1e6
+ for i in range(len(self.ffts)):
+ if mode == 'fft':
self.avg_pwr[i] = ((1.0 - FFT_AVG) * self.avg_pwr[i]) + (FFT_AVG * np.abs(self.ffts[i]))
- s += '%f\t%f\n' % (self.freqs[i], 20 * np.log10(self.avg_pwr[i]))
+ else:
+ self.avg_pwr[i] = ((1.0 - MIX_AVG) * self.avg_pwr[i]) + (MIX_AVG * np.abs(self.ffts[i]))
+ s += '%f\t%f\n' % (self.freqs[i], 20 * np.log10(self.avg_pwr[i]))
+ if (mode == 'mixer') and (self.avg_pwr[i] > 1e-5):
+ if (self.freqs[i] - self.center_freq) < 0:
+ sum_pwr -= self.avg_pwr[i]
+ elif (self.freqs[i] - self.center_freq) > 0:
+ sum_pwr += self.avg_pwr[i]
+ self.avg_sum_pwr = ((1.0 - BAL_AVG) * self.avg_sum_pwr) + (BAL_AVG * sum_pwr)
+ s += 'e\n'
+ plots.append('"-" with lines')
+ elif mode == 'float' or mode == 'correlation':
+ for b in self.buf:
+ s += '%f\n' % (b)
+ s += 'e\n'
+ plots.append('"-" with lines')
+ elif mode == 'sync':
+ s_abs = np.abs(self.buf)
+ sums = np.zeros(self.sps)
+ for i in range(self.sps):
+ sums[i] = np.sum(s_abs[range(i, len(self.buf), self.sps)])
+ am = np.argmax(sums)
+ samples = self.buf[am:]
+
+ a1 = -np.angle(samples[0])
+ rz = cos(a1) + 1j * sin(a1)
+
+ while len(samples) >= self.sps+1:
+ for i in range(self.sps+1):
+ z = samples[i] * rz
+ s += '%f\t%f\n' % (z.real, z.imag)
s += 'e\n'
- self.buf = []
- plots.append('"-" with lines')
- self.buf = []
+ plots.append('"-" with linespoints')
+ samples = samples[self.sps:]
+
+ self.buf = np.array([])
- h= 'set terminal x11 noraise\n'
- #background = 'set object 1 circle at screen 0,0 size screen 1 fillcolor rgb"black"\n' #FIXME!
+ # FFT processing needs to be completed to maintain the weighted average buckets
+ # regardless of whether we actually produce a new plot or not.
+ if self.plot_interval and self.last_plot + self.plot_interval > time.time():
+ return consumed
+ self.last_plot = time.time()
+
+ filename = None
+ if self.output_dir:
+ if self.sequence >= 2:
+ delete_pathname = '%s/plot-%s%d-%d.png' % (self.output_dir, mode, self.sequence_id, self.sequence-2)
+ if os.access(delete_pathname, os.W_OK):
+ os.remove(delete_pathname)
+ h0= 'set terminal png size %d, %d\n' % (plot_size)
+ filename = 'plot-%s%d-%d.png' % (mode, self.sequence_id, self.sequence)
+ h0 += 'set output "%s/%s"\n' % (self.output_dir, filename)
+ self.sequence += 1
+ else:
+ pos = ''
+ if self.position is not None:
+ x = self.position[0] * plot_size[0]
+ y = self.position[1] * plot_size[1]
+ x += 50
+ y += 75
+ pos = ' position %d, %d' % (x, y)
+ h0= 'set terminal x11 noraise size %d, %d%s title "%s"\n' % (plot_size[0], plot_size[1], pos, self.title)
background = ''
- h+= 'set key off\n'
+
+ label_color = ''
+ tic_color = ''
+ border_color = ''
+ plot_color = ''
+ background_color = ''
+
+ if self.colors['label_color']:
+ label_color = 'textcolor rgb"%s"' % self.colors['label_color']
+ if self.colors['tic_color']:
+ tic_color = 'textcolor rgb"%s"' % self.colors['tic_color']
+ if self.colors['border_color']:
+ border_color = 'linecolor rgb"%s"' % self.colors['border_color']
+ if self.colors['plot_color']:
+ plot_color = 'linecolor rgb"%s"' % self.colors['plot_color']
+ if self.colors['background_color']:
+ background_color = 'fillcolor rgb"%s"' % self.colors['background_color']
+
+ background += 'set object 1 rectangle from screen 0,0 to screen 1,1 %s behind\n' % (background_color)
+ background += 'set xtics %s\n' % (tic_color)
+ background += 'set ytics %s\n' % (tic_color)
+ background += 'set border %s\n' % (border_color)
+
+ h = 'set key off\n'
if mode == 'constellation':
- h+= background
+ #h+= background
+ plot_color = ''
h+= 'set size square\n'
h+= 'set xrange [-1:1]\n'
h+= 'set yrange [-1:1]\n'
+ h += 'unset border\n'
+ h += 'set polar\n'
+ h += 'set angles degrees\n'
+ h += 'unset raxis\n'
+ h += 'set object 1 rectangle from screen 0,0 to screen 1,1 %s behind\n' % (background_color)
+ h += 'set object 2 circle at 0,0 size 1 fillcolor rgb 0x0f01 fillstyle solid behind\n'
+ h += 'set object 3 circle at 0,0 size 1 %s\n' % 'linecolor rgb"#0000f0"'
+ h += 'set style line 10 lt 1 lc rgb 0x404040 lw 0.1\n'
+ h += 'set grid polar 45\n'
+ h += 'set grid ls 10\n'
+ h += 'set xtics axis\n'
+ h += 'set ytics axis\n'
+ h += 'set xtics scale 0\n'
+ h += 'set xtics ("" 0.2, "" 0.4, "" 0.6, "" 0.8, "" 1)\n'
+ h += 'set ytics 0, 0.2, 1\n'
+ h += 'set format ""\n'
+ h += 'set style line 11 lt 1 lw 2 pt 2 ps 2\n'
+
+ h+= 'set title "Constellation %s" %s\n' % (self.title, label_color)
elif mode == 'eye':
h+= background
h+= 'set yrange [-4:4]\n'
+ h+= 'set title "Datascope %s" %s\n' % (self.title, label_color)
+ plot_color = ''
+ elif mode == 'cpm':
+ h+= background
+ #h+= 'set yrange [-4:4]\n'
+ h+= 'set title "CPM RSSI %s" %s\n' % (self.title, label_color)
+ #plot_color = ''
+ elif mode == 'cpmd':
+ h+= background
+ h+= 'set yrange [-4:4]\n'
+ h+= 'set title "CPM Datascope %s" %s\n' % (self.title, label_color)
+ plot_color = ''
+ elif mode == 'sync':
+ h += 'set object 1 rect from screen 0,0 to screen 1,1 %s behind\n' % (background_color)
+ h += 'set size square\n'
+ h += 'set xtics %s\n' % (tic_color)
+ h += 'set ytics %s\n' % (tic_color)
+ h += 'set border %s\n' % (border_color)
elif mode == 'symbol':
h+= background
h+= 'set yrange [-4:4]\n'
- elif mode == 'fft':
+ h+= 'set title "Symbol %s" %s\n' % (self.title, label_color)
+ elif mode == 'fft' or mode == 'mixer':
+ h+= background
h+= 'unset arrow; unset title\n'
h+= 'set xrange [%f:%f]\n' % (self.freqs[0], self.freqs[len(self.freqs)-1])
+ h+= 'set xlabel "Frequency"\n'
+ h+= 'set ylabel "Power(dB)"\n'
+ h+= 'set grid\n'
h+= 'set yrange [-100:0]\n'
- h+= 'set xlabel "Frequency"\n'
- h+= 'set ylabel "Power(dB)"\n'
- h+= 'set grid\n'
- if self.center_freq:
- arrow_pos = (self.center_freq - self.relative_freq) / 1e6
- h+= 'set arrow from %f, graph 0 to %f, graph 1 nohead\n' % (arrow_pos, arrow_pos)
- h+= 'set title "Tuned to %f Mhz"\n' % ((self.center_freq - self.relative_freq) / 1e6)
- dat = '%splot %s\n%s' % (h, ','.join(plots), s)
- self.gp.stdin.write(dat)
+ if mode == 'mixer': # mixer
+ h+= 'set title "Mixer %s: balance %3.0f (smaller is better)" %s\n' % (self.title, np.abs(self.avg_sum_pwr * 1000), label_color)
+ else: # fft
+ h+= 'set title "Spectrum %s" %s\n' % (self.title, label_color)
+ if self.center_freq:
+ arrow_pos = (self.center_freq - self.relative_freq) / 1e6
+ h+= 'set arrow from %f, graph 0 to %f, graph 1 nohead\n' % (arrow_pos, arrow_pos)
+ h+= 'set title "Spectrum: tuned to %f Mhz" %s\n' % (arrow_pos, label_color)
+ elif mode == 'fftf':
+ h+= 'set yrange [-1:1.2]\n'
+ h+= 'set title "fftf"\n'
+ elif mode == 'float':
+ h+= background
+ h+= 'set yrange [-2:2]\n'
+ h+= 'set title "Oscilloscope %s" %s\n' % (self.title, label_color)
+ elif mode == 'correlation':
+ h+= background
+ title = 'Correlation'
+ if self.title:
+ title = self.title
+ h+= 'set yrange [-1.1:1.1]\n'
+ h+= 'set title "%s" %s\n' % (title, label_color)
+ if self.output_dir:
+ s += 'set output\n' ## flush output png
+ dat = '%s%splot %s %s\n%s' % (h0, h, ','.join(plots), plot_color, s)
+ if self.logfile is not None:
+ with open(self.logfile, 'a') as fd:
+ fd.write(dat)
+ if sys.version[0] != '2':
+ dat = bytes(dat, 'utf8')
+ self.gp.poll()
+ if self.gp.returncode is None: # make sure gnuplot is still running
+ try:
+ rc = self.gp.stdin.write(dat)
+ except (IOError, ValueError):
+ pass
+ try:
+ self.gp.stdin.flush()
+ except (IOError, ValueError):
+ pass
+ if filename:
+ self.filename = filename
return consumed
def set_center_freq(self, f):
@@ -146,9 +434,18 @@ class wrap_gp(object):
def set_relative_freq(self, f):
self.relative_freq = f
+ def set_offset(self, f):
+ self.offset_freq = f
+
def set_width(self, w):
self.width = w
+ def set_logfile(self, logfile=None):
+ self.logfile = logfile
+
+ def set_title(self, title):
+ self.title = title
+
class eye_sink_f(gr.sync_block):
"""
"""
@@ -163,9 +460,37 @@ class eye_sink_f(gr.sync_block):
def work(self, input_items, output_items):
in0 = input_items[0]
- consumed = self.gnuplot.plot(in0, 100 * self.sps, mode='eye')
+ consumed = self.gnuplot.plot(in0, 100*self.sps, mode='eye')
return consumed ### len(input_items[0])
+ def set_title(self, title):
+ self.gnuplot.set_title(title)
+
+ def kill(self):
+ self.gnuplot.kill()
+
+class cpm_sink_c(gr.sync_block):
+ """
+ """
+ def __init__(self, debug = _def_debug, sps = _def_sps, plot_mode=_def_cpm_mode):
+ gr.sync_block.__init__(self,
+ name="cpm_sink_c",
+ in_sig=[np.complex64],
+ out_sig=None)
+ self.debug = debug
+ self.sps = sps
+ self.gnuplot = wrap_gp(sps=self.sps)
+ self.plot_mode=plot_mode
+
+ def work(self, input_items, output_items):
+ in0 = input_items[0]
+ l = len(in0)
+ consumed = self.gnuplot.plot(in0, self.sps*180*10, mode=self.plot_mode)
+ return len(input_items[0])
+
+ def set_title(self, title):
+ self.gnuplot.set_title(title)
+
def kill(self):
self.gnuplot.kill()
@@ -182,7 +507,33 @@ class constellation_sink_c(gr.sync_block):
def work(self, input_items, output_items):
in0 = input_items[0]
- self.gnuplot.plot(in0, 1000, mode='constellation')
+ self.gnuplot.plot(in0, 1000, mode='constellation')
+ return len(input_items[0])
+
+ def set_title(self, title):
+ self.gnuplot.set_title(title)
+
+ def kill(self):
+ self.gnuplot.kill()
+
+class fft_sink_f(gr.sync_block):
+ """
+ """
+ def __init__(self, debug = _def_debug):
+ gr.sync_block.__init__(self,
+ name="fft_sink_f",
+ in_sig=[np.float32],
+ out_sig=None)
+ self.debug = debug
+ self.gnuplot = wrap_gp()
+ self.skip = 0
+
+ def work(self, input_items, output_items):
+ self.skip += 1
+ if self.skip >= 50:
+ self.skip = 0
+ in0 = input_items[0]
+ self.gnuplot.plot(in0, FFT_BINS, mode='fftf')
return len(input_items[0])
def kill(self):
@@ -202,25 +553,140 @@ class fft_sink_c(gr.sync_block):
def work(self, input_items, output_items):
self.skip += 1
- if self.skip == 50:
+ if self.skip >= 50:
self.skip = 0
in0 = input_items[0]
- self.gnuplot.plot(in0, FFT_BINS, mode='fft')
+ self.gnuplot.plot(in0, FFT_BINS, mode='fft')
return len(input_items[0])
+ def set_title(self, title):
+ self.gnuplot.set_title(title)
+
def kill(self):
self.gnuplot.kill()
def set_center_freq(self, f):
self.gnuplot.set_center_freq(f)
- self.gnuplot.set_relative_freq(0.0)
+ self.gnuplot.set_relative_freq(0.0)
def set_relative_freq(self, f):
self.gnuplot.set_relative_freq(f)
+ def set_offset(self, f):
+ self.gnuplot.set_offset(f)
+
def set_width(self, w):
self.gnuplot.set_width(w)
+class mixer_sink_c(gr.sync_block):
+ """
+ """
+ def __init__(self, debug = _def_debug):
+ gr.sync_block.__init__(self,
+ name="mixer_sink_c",
+ in_sig=[np.complex64],
+ out_sig=None)
+ self.debug = debug
+ self.gnuplot = wrap_gp()
+ self.skip = 0
+
+ def work(self, input_items, output_items):
+ self.skip += 1
+ if self.skip >= 10:
+ self.skip = 0
+ in0 = input_items[0]
+ self.gnuplot.plot(in0, FFT_BINS, mode='mixer')
+ return len(input_items[0])
+
+ def set_title(self, title):
+ self.gnuplot.set_title(title)
+
+ def kill(self):
+ self.gnuplot.kill()
+
+class sync_plot(threading.Thread):
+ """
+ """
+ def __init__(self, debug = _def_debug, block = None, **kwds):
+ threading.Thread.__init__ (self, **kwds)
+ self.setDaemon(1)
+ self.SLEEP_TIME = 3 ## TODO - make more configurable
+ self.sleep_until = time.time() + self.SLEEP_TIME
+ self.last_file_time = time.time()
+ self.keep_running = True
+ self.debug = debug
+ self.warned = False
+
+ block.enable_sync_plot(True) # block must refer to a gardner/costas instance
+ self.blk_id = block.unique_id()
+
+ self.gnuplot = wrap_gp(sps = _def_sps)
+ self.start()
+
+ def run(self):
+ while self.keep_running == True:
+ curr_time = time.time()
+ if curr_time < self.sleep_until:
+ time.sleep(1.0)
+ if self.keep_running == False:
+ break
+ else:
+ self.sleep_until = time.time() + self.SLEEP_TIME
+ self.check_update()
+
+ def read_raw_file(self, fn):
+ s = open(fn, 'rb').read()
+ s_msg = ensure_str(s)
+ p = s_msg.find('\n')
+ if p < 1 or p > 24:
+ return None # error
+ hdrline = s_msg[:p]
+ rest = s[p+1:]
+ params = hdrline.split()
+ params = [int(p) for p in params] #idx, p1p2, sps, error
+ idx = params[0]
+ p1p2 = params[1]
+ sps = params[2]
+ error_amt = params[3]
+ self.gnuplot.set_sps(sps)
+ if error_amt != 0:
+ self.set_title("Tuning Error %d" % error_amt)
+ else:
+ self.set_title("")
+ samples = np.frombuffer(rest, dtype=np.complex64)
+ samples2 = np.concatenate((samples[idx:], samples[:idx]))
+ needed = sps * 25 if p1p2 == 1 else sps * 21
+ if len(samples2) < needed:
+ if not self.warned:
+ self.warned = True
+ sys.stderr.write('read_raw_file: insufficient samples %d, needed %d\n' % (needed, len(samples2)))
+ elif len(samples2) > needed:
+ trim = len(samples2) - needed
+ samples2 = samples2[trim:]
+ return samples2 # return trimmed buf in np.complex64 format
+
+ def check_update(self):
+ patt = 'sample-%d*.dat' % (self.blk_id)
+ names = glob.glob(patt)
+ if len(names) < 1: # no files to work with
+ return
+ d = {n: os.stat(n).st_mtime for n in names}
+ ds = sorted(d.items(), key=lambda x:x[1], reverse = True)[0]
+ if ds[1] <= self.last_file_time:
+ return
+ self.last_file_time = ds[1]
+ dat = self.read_raw_file(ds[0])
+ self.gnuplot.plot(dat, len(dat), mode='sync')
+
+ def kill(self):
+ self.keep_running = False
+
+ def set_title(self, title):
+ self.gnuplot.set_title(title)
+
+ def kill(self):
+ self.gnuplot.kill()
+
class symbol_sink_f(gr.sync_block):
"""
"""
@@ -234,8 +700,107 @@ class symbol_sink_f(gr.sync_block):
def work(self, input_items, output_items):
in0 = input_items[0]
- self.gnuplot.plot(in0, 2400, mode='symbol')
+ self.gnuplot.plot(in0, 2400, mode='symbol')
+ return len(input_items[0])
+
+ def set_title(self, title):
+ self.gnuplot.set_title(title)
+
+ def kill(self):
+ self.gnuplot.kill()
+
+class float_sink_f(gr.sync_block):
+ """
+ """
+ def __init__(self, debug = _def_debug):
+ gr.sync_block.__init__(self,
+ name="float_sink_f",
+ in_sig=[np.float32],
+ out_sig=None)
+ self.debug = debug
+ self.gnuplot = wrap_gp()
+
+ def work(self, input_items, output_items):
+ in0 = input_items[0]
+ self.gnuplot.plot(in0, 2000, mode='float')
+ return len(input_items[0])
+
+ def set_title(self, title):
+ self.gnuplot.set_title(title)
+
+ def kill(self):
+ self.gnuplot.kill()
+
+class correlation_sink_f(gr.sync_block):
+ """
+ """
+ def __init__(self, sps=_def_sps, debug = _def_debug):
+ gr.sync_block.__init__(self,
+ name="plot_sink_f",
+ in_sig=[np.float32],
+ out_sig=None)
+ self.debug = debug
+ self.sps = sps
+ self.gnuplot = wrap_gp()
+ self.fs = []
+ self.cbuf = np.array([])
+ self.ignore = 0
+ self.pktlen = 1024
+
+ def set_length(self, l):
+ self.pktlen = l
+
+ def set_title(self, title):
+ self.gnuplot.set_title(title)
+
+ def set_signature(self, fs):
+ self.fs = []
+ for s in fs:
+ for i in range(self.sps):
+ self.fs.append(s)
+ self.fs.reverse() # reverse order for np.convolve
+ self.fs = np.array(self.fs)
+
+ def work(self, input_items, output_items):
+ if len(self.cbuf) == 0 and self.ignore > 0:
+ self.ignore -= len(input_items[0])
+ if self.ignore < 0:
+ self.ignore = 0
+ return len(input_items[0])
+ if len(self.fs) == 0:
+ return len(input_items[0])
+ in0 = input_items[0]
+ self.cbuf = np.append(self.cbuf, in0)
+ if len(self.cbuf) < self.pktlen:
+ return len(input_items[0])
+ result = np.convolve(self.cbuf[:self.pktlen], self.fs)
+ hi = np.max(np.abs(result))
+ if hi != 0:
+ result = result / hi
+ self.cbuf = []
+ self.ignore = 3000 * self.sps
+ self.gnuplot.plot(result, len(result), mode='correlation')
return len(input_items[0])
def kill(self):
self.gnuplot.kill()
+
+def setup_correlation(sps, title, connect_bb):
+ CFG_FILE = 'correlation.json'
+ if not os.access(CFG_FILE, os.R_OK):
+ sys.stderr.write('correlation plot ignored, missing config file %s\n' % CFG_FILE)
+ return []
+ ccfg = json.loads(open(CFG_FILE).read())
+ sinks = []
+ for cfg in ccfg:
+ sink = correlation_sink_f(sps=sps)
+ sink.set_title('%s %s' % (title, cfg['name']))
+ l = cfg['length'] * sps * 4
+ LENGTH_LIMIT = 10000
+ if l > LENGTH_LIMIT:
+ l = LENGTH_LIMIT
+ sink.set_length(l)
+ sink.set_signature(cfg['fs'])
+ connect_bb('baseband_amp', sink)
+ sinks.append(sink)
+ return sinks
diff --git a/op25/gr-op25_repeater/apps/h_cpm.m b/op25/gr-op25_repeater/apps/h_cpm.m
new file mode 100644
index 0000000..3b67d7f
--- /dev/null
+++ b/op25/gr-op25_repeater/apps/h_cpm.m
@@ -0,0 +1,350 @@
+
+% P25 H-CPM Demodulator (C) Copyright 2022 Max H. Parke KA1RBI
+% % Experimental H-CPM Demodulator - Release 0 %
+%
+% This file is part of OP25
+%
+% OP25 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 3, or (at your option)
+% any later version.
+%
+% OP25 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 OP25; see the file COPYING. If not, write to the Free
+% Software Foundation, Inc., 51 Franklin Street, Boston, MA
+% 02110-1301, USA.
+%
+%
+%
+% Accepts input IF file in GR binary complex64 format;
+% file must be at sample rate 24,000 samples/sec.
+%
+% this implementation has several simplifications, shortcuts,
+% and pitfalls, some of which are:
+%
+% * input sample must be clean and error free, there is
+% currently no tree search (viterbi) stage - decode errors
+% that should be recoverable are not autocorrected
+% * since the first and last one-quarter of the partial-response
+% period (in L=4) appear to contribute a negligible delta-phase,
+% this correlator ignores these intervals, using only the inner-
+% most two periods - accordingly, the value L=2 is assumed
+% * the code is too slow to demod in real time and there are no claims
+% to efficiency
+% * at each symbol period the received waveform vector is derotated.
+% this reduces the number of rows in the waveform matrix by a factor of
+% six (6); instead of derotating the samples, a correct correlator would
+% include these (approx. 80) additional rows
+%
+
+pkg load signal;
+
+global WI0 = [
+ 1.000000, 0.999827, 0.998111, 0.963512, 0.819784, 0.500000,
+ 1.000000, 0.958473, 0.800512, 0.483695, 0.022053, -0.475169,
+ 1.000000, 0.978152, 0.913558, 0.808999, 0.669116, 0.500000,
+ 1.000000, 0.966921, 0.819689, 0.504702, 0.047650, -0.424375,
+ 1.000000, 0.984174, 0.926374, 0.822966, 0.687929, 0.548428,
+ 1.000000, 0.918644, 0.736098, 0.572238, 0.506066, 0.548428,
+ 1.000000, 0.995165, 0.986853, 0.986153, 0.994884, 0.999596,
+ 1.000000, 0.947207, 0.867963, 0.865831, 0.946296, 0.999596,
+ 1.000000, 0.869202, 0.540278, 0.146957, -0.204506, -0.475169,
+ 1.000000, 0.884236, 0.567518, 0.170815, -0.179370, -0.424375,
+ 1.000000, 0.827032, 0.340050, -0.286034, -0.793734, -0.998382,
+ 1.000000, 0.905842, 0.713560, 0.552256, 0.483811, 0.500000,
+ 1.000000, 0.936720, 0.851252, 0.853489, 0.937706, 0.999596,
+ 1.000000, 0.998757, 0.999587, 0.969698, 0.834181, 0.548428,
+ 1.000000, 0.844204, 0.370632, -0.262797, -0.777895, -0.993535,
+ 1.000000, 0.991608, 0.981038, 0.981858, 0.991970, 0.999596,
+ 1.0, 1.0, 1.0, 1.0, 1.0, 1.0,
+ 0.99179 0.98062998 0.95472002 0.92157 0.89235997 0.87256002];
+
+global WQ0 = [
+ 0.000000, -0.018594, 0.061430, 0.267665, 0.572673, 0.866026,
+ 0.000000, 0.285183, 0.599317, 0.875237, 0.999757, 0.879895,
+ 0.000000, 0.207893, 0.406709, 0.587810, 0.743158, 0.866026,
+ 0.000000, -0.255075, -0.572808, -0.863294, -0.998864, -0.905486,
+ 0.000000, -0.177207, -0.376605, -0.568091, -0.725778, -0.836198,
+ 0.000000, -0.395087, -0.676875, -0.820088, -0.862495, -0.836198,
+ 0.000000, -0.098212, -0.161618, -0.165838, -0.101028, 0.028438,
+ 0.000000, -0.320622, -0.496628, -0.500337, -0.323300, 0.028438,
+ 0.000000, 0.494458, 0.841486, 0.989143, 0.978865, 0.879895,
+ 0.000000, -0.467040, -0.823361, -0.985303, -0.983782, -0.905486,
+ 0.000000, 0.562154, 0.940407, 0.958220, 0.608265, 0.056855,
+ 0.000000, 0.423616, 0.700594, 0.833674, 0.875173, 0.866025,
+ 0.000000, 0.350080, 0.524757, 0.521112, 0.347429, 0.028438,
+ 0.000000, 0.049845, -0.028745, -0.244306, -0.551491, -0.836198,
+ 0.000000, -0.536021, -0.928780, -0.964851, -0.628394, -0.113525,
+ 0.000000, 0.129280, 0.193816, 0.189618, 0.126474, 0.028438,
+ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
+ 0. 0.13601001 0.26787999 0.37345001 0.44356 0.48087999];
+
+global S_A = zeros(18,"int");
+global S_B = zeros(18,"int");
+S_A(1) = -1;
+S_B(1) = 3;
+S_A(2) = 1;
+S_B(2) = 3;
+S_A(3) = 1;
+S_B(3) = 1;
+S_A(4) = -1;
+S_B(4) = -3;
+S_A(5) = -1;
+S_B(5) = -1;
+S_A(6) = -3;
+S_B(6) = 1;
+S_A(7) = -1;
+S_B(7) = 1;
+S_A(8) = -3;
+S_B(8) = 3;
+S_A(9) = 3;
+S_B(9) = 1;
+S_A(10) = -3;
+S_B(10) = -1;
+S_A(11) = 3;
+S_B(11) = 3;
+S_A(12) = 3;
+S_B(12) = -1;
+S_A(13) = 3;
+S_B(13) = -3;
+S_A(14) = 1;
+S_B(14) = -3;
+S_A(15) = -3;
+S_B(15) = -3;
+S_A(16) = 1;
+S_B(16) = -1;
+S_A(17) = 0;
+S_B(17) = 0;
+S_A(18) = 1;
+S_B(18) = 1;
+
+global L = 4; %sps
+global M = 10 % interp factor
+global LM = L*M;
+global Q = 8; % decim amount
+global NEWSPS = 5; % after decimation
+global K=360.0 / (2 * pi); % radians -> degrees
+global k = 6.0 / (2 * pi);
+
+% change name of input data file
+fname = 'if-24000-IQ.dat';
+
+function samples = load_text(fname)
+ fid = fopen(fname, 'r');
+ nn = 0;
+ while 1
+ nn = nn+1;
+ s = fgetl(fid);
+ if s == -1
+ break;
+ endif
+ res = sscanf(s, "%f\t%f");
+ samples(nn) = res(1) + 1j*res(2);
+ endwhile
+ g = max(abs(samples));
+ samples = samples / g;
+endfunction
+
+function amt_left = process_dat(dat)
+ global L
+ iq = dat(1:2:end-1) .+ 1j * dat(2:2:end);
+ a = abs(iq);
+ thresh = max(a) / 2.0;
+ msk = a > thresh;
+ m1 = msk(2:end) - msk(1:end-1);
+ f = find(m1);
+ m1f = m1(f)(end);
+ lens = f(2:end) - f(1:end-1);
+ l1 = (lens/L > 170 & lens/L < 180) | (lens/L > 350 & lens/L < 360);
+ l2 = m1(f) == 1;
+ l2 = l2(1:end-1);
+ found = find(l1 & l2);
+ if(length(found)) < 1
+ amt_left = 0;
+ return;
+ endif
+ for n = 1:length(found)
+ valid = found(n);
+ start1 = f(valid);
+ len1 = lens(valid);
+ demod_frag(iq(start1:start1+len1));
+ end
+ validn = found(end);
+ startn = f(validn);
+ lenn = lens(validn);
+ datlen=length(dat);
+ amt_left = length(dat) - (startn + lenn);
+ if (amt_left < 0)
+ amt_left = 0;
+ endif
+endfunction
+
+function process_file(filename)
+ global L
+ bufsize = L * 180 * 12;
+ fid = fopen(filename, 'r');
+ save = [];
+ while 1
+ [dat, l] = fread(fid, bufsize, 'float32', 0);
+ if l < 1
+ break
+ endif
+ savel=size(save);
+ datl=size(dat);
+ concat = [save.' dat.'].';
+ amt_left = process_dat(concat);
+ if (amt_left > 0)
+ save = concat(end-amt_left:end);
+ else
+ save = [];
+ endif
+ endwhile
+endfunction
+
+function large_frag(msg)
+ msgl = length(msg);
+ padsz = 360 - msgl;
+ lenh = round(length(msg) / 2);
+ fmsg1 = frame_msg(msg(1:lenh),1);
+ decode_msg(fmsg1);
+ fmsg2 = frame_msg(msg(lenh:end),2);
+ decode_msg(fmsg2);
+endfunction
+
+function msg=demod_frag(frag)
+ global L
+ global NEWSPS
+ global M
+ amt_trim = mod(length(frag), L);
+ frag = frag(1:end-amt_trim);
+ g = max(abs(frag));
+ frag = frag / g;
+ nsyms = length(frag) / L;
+ intrp0 = interp(frag, M);
+ resampq=timing_sync(intrp0);
+ nsyms = length(resampq) / NEWSPS;
+ resamp1=frequency_sync(resampq);
+ msg=correlation(resamp1);
+ if length(msg) > 270
+ large_frag(msg);
+ else
+ fmsg=frame_msg(msg,1);
+ decode_msg(fmsg);
+ lfmsg=length(fmsg);
+ endif
+endfunction
+
+function decode_msg(msg)
+ if length(msg) != 160
+ return
+ endif
+ DMAP = [3 2 0 1];
+ duid = msg([37,74,123,160]) + 3;
+ duid = (duid / 2) + 1;
+ dibits = DMAP(duid);
+ duidx = dibits(1) * 64 + dibits(2) * 16 + dibits(3) * 4 + dibits(4);
+ printf ('hex %x\n' , duidx);
+endfunction
+
+function resampq=timing_sync(intrp0)
+ global LM
+ global NEWSPS
+ global Q
+ nsyms = length(intrp0) / LM;
+ fmd = angle(intrp0(2:end) .* conj(intrp0(1:end-1)));
+ fmx = mod(LM*6* ([fmd' 0] / (2*pi) + 0.5) + 0.5, 1);
+ matx= reshape(fmx, LM, nsyms );
+ res = std(matx');
+ [m, amin] = min(res);
+ amin = amin + 0 + (LM/2);
+ if amin > LM
+ amin = amin - LM;
+ endif
+ resampq = intrp0(amin:Q:end); # decim by Q
+ amt_trim = mod(length(resampq), NEWSPS);
+ resampq = resampq(1:end-amt_trim);
+endfunction
+
+function resamp1=frequency_sync(resampq)
+ global NEWSPS
+ global k
+ F = 0;
+ sz1 = length(resampq);
+ for iter = 1:4
+ osc = [0:sz1-1] * (F / 30000);
+ osc = exp(j*2*pi*osc);
+ resamp1 = resampq .* osc.';
+ row = resamp1(1:NEWSPS:end);
+ rowz = mod(k*angle(row)+0.5, 1);
+ rowz = unwrap((rowz-0.5) * 2*pi);
+ meanr = mean(rowz(5:15)) - mean(rowz(end-15:end-5));
+ F = F + meanr;
+ end
+ nsyms = length(resamp1) / NEWSPS;
+ rfm = angle(resamp1(2:end) .* conj(resamp1(1:end-1)));
+ afm = angle(resamp1);
+endfunction
+
+function eye_plot(dat, sps)
+ hold on
+ for nn = 1:sps:length(dat)-sps*2
+ sl = dat(nn:nn+sps);
+ plot(sl);
+ end
+ hold off
+ pause
+endfunction
+
+function msg=correlation(resamp1)
+ global NEWSPS
+ global WI0
+ global WQ0
+ global S_A
+ global S_B
+ global K
+ nsyms = length(resamp1) / NEWSPS;
+ for n= 1 : NEWSPS : length(resamp1) - NEWSPS
+ stepn=(n-1)/NEWSPS;
+ idx = ((n-1) / NEWSPS) + 1;
+ sl=resamp1(n:n+NEWSPS);
+ sl = sl * conj(sl(1));
+ sl_i = real(sl);
+ sl_q = imag(sl);
+ corr2 = sl_i' * WI0' + sl_q' * WQ0';
+ [m,am] = max(corr2);
+ msga(idx) = S_A(am);
+ msgb(idx) = S_B(am);
+ end
+ msgok=msga(2:end) == msgb(1:end-1);
+ ok=sum(msgok) / length(msga);
+ msg=msgb;
+endfunction
+
+function msg=frame_msg(imsg, fcode)
+ if (fcode == 1)
+ pilots = [1 -1 -1 1];
+ else
+ pilots = [-3 -3 -1 1];
+ endif
+ fml = length(imsg);
+ msg = [];
+ excess=length(imsg) - 160;
+ for n=1:excess
+ if n+163 > length(imsg)
+ break
+ endif
+ slx = [imsg(n:n+1), imsg(n+162:n+163)];
+ if sum(slx == pilots) == 4
+ msg = imsg(n+2:n+161);
+ return;
+ endif
+ end
+ return;
+endfunction
+
+process_file(fname);
diff --git a/op25/gr-op25_repeater/apps/http_server.py b/op25/gr-op25_repeater/apps/http_server.py
new file mode 100755
index 0000000..1d10795
--- /dev/null
+++ b/op25/gr-op25_repeater/apps/http_server.py
@@ -0,0 +1,589 @@
+#!/usr/bin/env python3
+
+# Copyright 2017, 2018, 2019, 2020 Max H. Parke KA1RBI
+#
+# This file is part of OP25
+#
+# OP25 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 3, or (at your option)
+# any later version.
+#
+# OP25 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 OP25; see the file COPYING. If not, write to the Free
+# Software Foundation, Inc., 51 Franklin Street, Boston, MA
+# 02110-1301, USA.
+
+import sys
+import os
+import time
+import re
+import json
+import socket
+import traceback
+import threading
+import glob
+import subprocess
+import zmq
+import op25
+
+from gnuradio import gr
+from waitress.server import create_server
+from optparse import OptionParser
+from multi_rx import byteify
+from tsvfile import load_tsv, make_config
+
+import logging
+logging.basicConfig()
+
+my_input_q = None
+my_output_q = None
+my_recv_q = None
+my_port = None
+my_backend = None
+CFG_DIR = '../www/config/'
+TSV_DIR = './'
+
+"""
+fake http and ajax server module
+TODO: make less fake
+"""
+def ensure_str(s): # for python 2/3
+ if isinstance(s[0], str):
+ return s
+ ns = ''
+ for i in range(len(s)):
+ ns += chr(s[i])
+ return ns
+
+class event_iterator:
+ def __iter__(self):
+ return self
+
+ def __next__(self):
+ _jslog_file = None # set to str(filename) to enable json log
+ msgs = []
+ while True:
+ msg = my_input_q.delete_head()
+ assert msg.type() == -4
+ d = json.loads(msg.to_string())
+ msgs.append(d)
+ if my_input_q.empty_p():
+ break
+ js = json.dumps(msgs)
+ # TODO: json.loads followed by dumps is redundant -
+ # can this be optimized?
+ s = 'data:%s\r\n\r\n' % (js)
+
+ if _jslog_file:
+ t = json.dumps(msgs, indent=4, separators=[',',':'], sort_keys=True)
+ with open(_jslog_file, 'a') as logfd:
+ logfd.write('%s\n' % t)
+
+ if sys.version[0] != '2':
+ if isinstance(s, str):
+ s = s.encode()
+ return s
+
+ next = __next__ # for python2
+
+def static_file(environ, start_response):
+ content_types = {'tsv': 'text/tab-separated-values', 'json': 'application/json', 'png': 'image/png', 'jpeg': 'image/jpeg', 'jpg': 'image/jpeg', 'gif': 'image/gif', 'css': 'text/css', 'js': 'application/javascript', 'html': 'text/html', 'ico': 'image/vnd.microsoft.icon'}
+ img_types = 'png jpg jpeg gif ico'.split()
+ data_types = 'tsv txt json db'.split()
+ if environ['PATH_INFO'] == '/':
+ filename = 'index.html'
+ else:
+ filename = re.sub(r'[^a-zA-Z0-9_.\-/]', '', environ['PATH_INFO'])
+ suf = filename.split('.')[-1]
+ pathname = '../www/www-static'
+ if suf in img_types:
+ pathname = '../www/images'
+ elif suf in data_types:
+ pathname = TSV_DIR
+ pathname = '%s/%s' % (pathname, filename)
+ if suf not in content_types.keys() or '..' in filename or not os.access(pathname, os.R_OK):
+ sys.stderr.write('404 %s\n' % pathname)
+ status = '404 NOT FOUND - PATHNAME: %s FILENAME: %s CWD: %s' % (pathname, filename, os. getcwd())
+ content_type = 'text/plain'
+ output = status
+ else:
+ output = open(pathname, 'rb').read()
+ content_type = content_types[suf]
+ status = '200 OK'
+ return status, content_type, output
+
+def valid_tsv(filename):
+ if not os.access(filename, os.R_OK):
+ return False
+ line = open(filename).readline()
+ for word in 'Sysname Offset NAC Modulation TGID Whitelist Blacklist'.split():
+ if word not in line:
+ return False
+ return True
+
+def tsv_config(filename):
+ DEFAULT_CFG = '../www/config/default.json'
+ filename = '%s%s' % (TSV_DIR, filename)
+ filename = filename.replace('[TSV]', '.tsv')
+ if not valid_tsv(filename):
+ return None
+ cfg = make_config(load_tsv(filename))
+ default_cfg = json.loads(open(DEFAULT_CFG).read())
+
+ result = default_cfg
+ channels = [ {'active': True,
+ 'blacklist': cfg[nac]['blacklist'],
+ 'whitelist': cfg[nac]['whitelist'],
+ 'cclist': cfg[nac]['cclist'],
+ 'demod_type': 'cqpsk',
+ 'destination': 'udp://127.0.0.1:23456',
+ 'filter_type': 'rc',
+ 'frequency': 500000000,
+ 'if_rate': 24000,
+ 'nac': nac,
+ 'name': cfg[nac]['sysname'],
+ 'phase2_tdma': False,
+ 'plot': "",
+ 'tgids': cfg[nac]['tgid_map'],
+ 'trunked': True
+ }
+ for nac in cfg.keys() ]
+ result['channels'] = channels
+ return {'json_type':'config_data', 'data': result}
+
+def do_request(d):
+ global my_backend
+ if d['command'].startswith('rx-'):
+ msg = gr.message().make_from_string(json.dumps(d), -2, 0, 0)
+ if not my_backend.input_q.full_p():
+ my_backend.input_q.insert_tail(msg)
+ return None
+ elif d['command'] == 'config-load':
+ if '[TSV]' in d['data']:
+ return tsv_config(d['data'])
+ filename = '%s%s.json' % (CFG_DIR, d['data'])
+ if not os.access(filename, os.R_OK):
+ return None
+ js_msg = json.loads(open(filename).read())
+ return {'json_type':'config_data', 'data': js_msg}
+ elif d['command'] == 'config-list':
+ files = glob.glob('%s*.json' % CFG_DIR)
+ files = [x.replace('.json', '') for x in files]
+ files = [x.replace(CFG_DIR, '') for x in files]
+ if d['data'] == 'tsv':
+ tsvfiles = glob.glob('%s*.tsv' % TSV_DIR)
+ tsvfiles = [x for x in tsvfiles if valid_tsv(x)]
+ tsvfiles = [x.replace('.tsv', '[TSV]') for x in tsvfiles]
+ tsvfiles = [x.replace(TSV_DIR, '') for x in tsvfiles]
+ files += tsvfiles
+ return {'json_type':'config_list', 'data': files}
+ elif d['command'] == 'config-save':
+ name = d['data']['name']
+ if '..' in name or '.json' in name or '/' in name:
+ return None
+ filename = '%s%s.json' % (CFG_DIR, d['data']['name'])
+ open(filename, 'w').write(json.dumps(d['data']['value'], indent=4, separators=[',',':'], sort_keys=True))
+ return None
+ elif d['command'] == 'config-savesettings':
+ filename = 'ui-settings.json'
+ open(filename, 'w').write(d['data'])
+ sys.stderr.write('saved UI settings to %s\n' % filename)
+ return None
+ elif d['command'] == 'config-tsvsave':
+ filename = d['file']
+ ok = True
+ if filename.lower().endswith('tsv'):
+ ok = True
+ elif filename.lower().endswith('json'):
+ ok = True
+ else:
+ ok = False
+ if filename.startswith('.'):
+ ok = False
+ if '/' in filename:
+ ok = False
+ if '..' in filename:
+ ok = False
+ if not ok:
+ sys.stderr.write('cfg-tsvsave: invalid filename %s\n' % filename)
+ return None
+ open(filename, 'w').write(d['data'])
+ sys.stderr.write('saved UI settings to %s\n' % filename)
+ return None
+
+def post_req(environ, start_response, postdata):
+ global my_input_q, my_output_q, my_recv_q, my_port
+ resp_msg = []
+ data = []
+ try:
+ data = json.loads(postdata)
+ except:
+ sys.stderr.write('post_req: error processing input: %s:\n' % (postdata))
+ traceback.print_exc(limit=None, file=sys.stderr)
+ sys.stderr.write('*** end traceback ***\n')
+ for d in data:
+ if type(d) is str:
+ sys.stderr.write('%f possible json sequence error: len %d type %s value %s\n' % (time.time(), len(d), type(d), d))
+ continue
+ elif type(d) is not dict:
+ sys.stderr.write('%f possible json sequence error: type %s value %s\n' % (time.time(), type(d), d))
+ continue
+ if d['command'].startswith('config-') or d['command'].startswith('rx-'):
+ resp = do_request(d)
+ if resp:
+ resp_msg.append(resp)
+ continue
+ if d['command'].startswith('settings-'):
+ msg = gr.message().make_from_string(json.dumps(d), -4, 0, 0)
+ else:
+ msg = gr.message().make_from_string(str(d['command']), -2, d['data'], 0)
+ if my_output_q.full_p():
+ my_output_q.delete_head_nowait() # ignores result
+ if not my_output_q.full_p():
+ my_output_q.insert_tail(msg)
+ time.sleep(0.2)
+
+ status = '200 OK'
+ content_type = 'application/json'
+ output = json.dumps(resp_msg)
+ return status, content_type, output
+
+def http_request(environ, start_response):
+ if environ['REQUEST_METHOD'] == 'GET' and '/stream' in environ['PATH_INFO']:
+ status = '200 OK'
+ content_type = 'text/event-stream'
+ response_headers = [('Content-type', content_type),
+ ('Access-Control-Allow-Origin', '*')]
+ start_response(status, response_headers)
+ return iter(event_iterator())
+ elif environ['REQUEST_METHOD'] == 'GET':
+ status, content_type, output = static_file(environ, start_response)
+ elif environ['REQUEST_METHOD'] == 'POST':
+ postdata = environ['wsgi.input'].read()
+ status, content_type, output = post_req(environ, start_response, postdata)
+ else:
+ status = '200 OK'
+ content_type = 'text/plain'
+ output = status
+ sys.stderr.write('http_request: unexpected input %s\n' % environ['PATH_INFO'])
+
+ response_headers = [('Content-type', content_type),
+ ('Access-Control-Allow-Origin', '*'),
+ ('Content-Length', str(len(output)))]
+ start_response(status, response_headers)
+
+ if sys.version[0] != '2':
+ if isinstance(output, str):
+ output = output.encode()
+ return [output]
+
+def application(environ, start_response):
+ failed = False
+ try:
+ result = http_request(environ, start_response)
+ except:
+ failed = True
+ sys.stderr.write('application: request failed:\n%s\n' % traceback.format_exc())
+ if failed:
+ status = '500 Internal Server Error'
+ response_headers = [ ('Access-Control-Allow-Origin', '*') ]
+ start_response(status, response_headers)
+ output = status
+ if sys.version[0] != '2':
+ if isinstance(output, str):
+ output = output.encode()
+ return [output]
+
+ return result
+
+def process_qmsg(msg):
+ if my_recv_q.full_p():
+ my_recv_q.delete_head_nowait() # ignores result
+ if my_recv_q.full_p():
+ return
+ my_recv_q.insert_tail(msg)
+
+class http_server(object):
+ def __init__(self, input_q, output_q, endpoint, **kwds):
+ global my_input_q, my_output_q, my_recv_q, my_port
+ host, port = endpoint.split(':')
+ if my_port is not None:
+ raise AssertionError('this server is already active on port %s' % my_port)
+ my_input_q = input_q
+ my_output_q = output_q
+ my_port = int(port)
+
+ my_recv_q = gr.msg_queue(10)
+
+ SEND_BYTES = 1024
+ NTHREADS = 10 # TODO: make #threads a function of #plots ?
+ self.server = create_server(application, host=host, port=my_port, send_bytes=SEND_BYTES, expose_tracebacks=True, threads=NTHREADS)
+
+ def run(self):
+ self.server.run()
+
+class queue_watcher(threading.Thread):
+ def __init__(self, msgq, callback, **kwds):
+ threading.Thread.__init__ (self, **kwds)
+ self.setDaemon(1)
+ self.msgq = msgq
+ self.callback = callback
+ self.keep_running = True
+ self.start()
+
+ def run(self):
+ while(self.keep_running):
+ msg = self.msgq.delete_head()
+ self.callback(msg)
+
+class Backend(threading.Thread):
+ def __init__(self, options, input_q, output_q, init_config=None, **kwds):
+ threading.Thread.__init__ (self, **kwds)
+ self.setDaemon(1)
+ self.keep_running = True
+ self.rx_options = None
+ self.input_q = input_q
+ self.output_q = output_q
+ self.verbosity = options.verbosity
+
+ self.zmq_context = zmq.Context()
+ self.zmq_port = options.zmq_port
+
+ self.zmq_sub = self.zmq_context.socket(zmq.SUB)
+ self.zmq_sub.connect('tcp://localhost:%d' % self.zmq_port)
+ self.zmq_sub.setsockopt_string(zmq.SUBSCRIBE, '')
+
+ self.zmq_pub = self.zmq_context.socket(zmq.PUB)
+ self.zmq_pub.sndhwm = 5
+ self.zmq_pub.bind('tcp://*:%d' % (self.zmq_port+1))
+
+ self.start()
+ self.subproc = None
+ self.msg = None
+
+ self.q_watcher = queue_watcher(self.input_q, self.process_msg)
+
+ if init_config:
+ d = {'command': 'rx-start', 'data': init_config}
+ msg = gr.message().make_from_string(json.dumps(d), -4, 0, 0)
+ self.input_q.insert_tail(msg)
+
+ def publish(self, msg):
+ t = msg.type()
+ s = msg.to_string()
+ a = msg.arg1()
+ s = ensure_str(s)
+ self.zmq_pub.send_string(json.dumps({'command': s, 'data': a, 'msgtype': t}))
+
+ def check_subproc(self): # return True if subprocess is active
+ if not self.subproc:
+ return False
+ rc = self.subproc.poll()
+ if rc is None:
+ return True
+ else:
+ self.subproc.wait()
+ self.subproc = None
+ return False
+
+ def process_msg(self, msg):
+ def make_command(options, config_file):
+ py_exe = 'python'
+ if sys.version[0] == '3':
+ py_exe = 'python3'
+ trunked_ct = [True for x in options._js_config['channels'] if x['trunked']]
+ total_ct = [True for x in options._js_config['channels']]
+ if trunked_ct and len(trunked_ct) != len(total_ct):
+ self.msg = 'no suitable backend found for this configuration'
+ return None
+ if not trunked_ct:
+ self.backend = '%s/%s' % (os.getcwd(), 'multi_rx.py')
+ opts = [py_exe, self.backend]
+ filename = '%s%s.json' % (CFG_DIR, config_file)
+ opts.append('--config-file')
+ opts.append(filename)
+ return opts
+
+ # TODO: this probably should be external and/or configurable
+ # these options must match up one for one with the rx.py cli opts
+ types = {'costas-alpha': 'float',
+ 'trunk-conf-file': 'str',
+ 'demod-type': 'str',
+ 'logfile-workers': 'int',
+ 'decim-amt': 'int',
+ 'wireshark-host': 'str',
+ 'gain-mu': 'float',
+ 'phase2-tdma': 'bool',
+ 'seek': 'int',
+ 'ifile': 'str',
+ 'pause': 'bool',
+ 'antenna': 'str',
+ 'calibration': 'float',
+ 'fine-tune': 'float',
+ 'raw-symbols': 'str',
+ 'audio-output': 'str',
+ 'vocoder': 'bool',
+ 'input': 'str',
+ 'wireshark': 'bool',
+ 'gains': 'str',
+ 'args': 'str',
+ 'sample-rate': 'int',
+ 'terminal-type': 'str',
+ 'gain': 'float',
+ 'excess-bw': 'float',
+ 'offset': 'float',
+ 'audio-input': 'str',
+ 'audio': 'bool',
+ 'plot-mode': 'str',
+ 'audio-if': 'bool',
+ 'tone-detect': 'bool',
+ 'frequency': 'int',
+ 'freq-corr': 'float',
+ 'hamlib-model': 'int',
+ 'udp-player': 'bool',
+ 'verbosity': 'int',
+ 'audio-gain': 'float',
+ 'freq-error-tracking': 'bool',
+ 'nocrypt': 'bool',
+ 'wireshark-port': 'int'
+ }
+ self.backend = '%s/%s' % (os.getcwd(), 'rx.py')
+ opts = [py_exe, self.backend]
+ for k in [ x for x in dir(options) if not x.startswith('_') ]:
+ kw = k.replace('_', '-')
+ val = getattr(options, k)
+ if kw not in types.keys():
+ self.msg = 'make_command: unknown option: %s %s type %s' % (k, val, type(val))
+ return None
+ elif types[kw] == 'str':
+ if val:
+ opts.append('--%s' % kw)
+ opts.append('%s' % (val))
+ elif types[kw] == 'float':
+ opts.append('--%s' % kw)
+ if val:
+ opts.append('%f' % (val))
+ else:
+ opts.append('%f' % (0))
+ elif types[kw] == 'int':
+ opts.append('--%s' % kw)
+ if val:
+ opts.append('%d' % (val))
+ else:
+ opts.append('%d' % (0))
+ elif types[kw] == 'bool':
+ if val:
+ opts.append('--%s' % kw)
+ else:
+ self.msg = 'make_command: unknown2 option: %s %s type %s' % (k, val, type(val))
+ return None
+ return opts
+
+ msg = json.loads(msg.to_string())
+ if msg['command'] == 'rx-start':
+ if self.check_subproc():
+ self.msg = 'start command failed: subprocess pid %d already active' % self.subproc.pid
+ return
+ options = rx_options(msg['data'])
+ if getattr(options, '_js_config', None) is None:
+ self.msg = 'start command failed: rx_options: unable to initialize config=%s' % (msg['data'])
+ return
+ options.verbosity = self.verbosity
+ options.terminal_type = 'zmq:tcp:%d' % (self.zmq_port)
+ cmd = make_command(options, msg['data'])
+ sys.stderr.write('executing %s\n' % (' '.join(cmd)))
+ if cmd:
+ self.subproc = subprocess.Popen(cmd)
+ elif msg['command'] == 'rx-stop':
+ if not self.check_subproc():
+ self.msg = 'stop command failed: subprocess not active'
+ return
+ if msg['data'] == 'kill':
+ self.subproc.kill()
+ else:
+ self.subproc.terminate()
+ elif msg['command'] == 'rx-state':
+ d = {}
+ if self.check_subproc():
+ d['rx-state'] = 'subprocess pid %d active' % self.subproc.pid
+ else:
+ d['rx-state'] = 'subprocess not active, last msg: %s' % self.msg
+ msg = gr.message().make_from_string(json.dumps(d), -4, 0, 0)
+ if not self.output_q.full_p():
+ self.output_q.insert_tail(msg)
+
+ def run(self):
+ while self.keep_running:
+ js = self.zmq_sub.recv()
+ if not self.keep_running:
+ break
+ js = ensure_str(js)
+ msg = gr.message().make_from_string(js, -4, 0, 0)
+ if not self.output_q.full_p():
+ self.output_q.insert_tail(msg)
+
+class rx_options(object):
+ def __init__(self, name):
+ def map_name(k):
+ return k.replace('-', '_')
+
+ filename = '%s%s.json' % (CFG_DIR, name)
+ if not os.access(filename, os.R_OK):
+ sys.stderr.write('unable to access config file %s\n' % (filename))
+ return
+ config = byteify(json.loads(open(filename).read()))
+ dev = [x for x in config['devices'] if x['active']][0]
+ if not dev:
+ return
+ chan = [x for x in config['channels'] if x['active']][0]
+ if not chan:
+ return
+ options = object()
+ for k in config['backend-rx'].keys():
+ setattr(self, map_name(k), config['backend-rx'][k])
+ for k in 'args frequency gains offset'.split():
+ setattr(self, k, dev[k])
+ self.demod_type = chan['demod_type']
+ self.freq_corr = dev['ppm']
+ self.sample_rate = dev['rate']
+ self.plot_mode = chan['plot']
+ self.phase2_tdma = chan['phase2_tdma']
+ self.trunk_conf_file = filename
+ self._js_config = config
+
+def http_main():
+ global my_backend
+ # command line argument parsing
+ parser = OptionParser()
+ parser.add_option("-c", "--config", type="string", default=None, help="config json name, without prefix/suffix")
+ parser.add_option("-e", "--endpoint", type="string", default="127.0.0.1:8080", help="address:port to listen on (use addr 0.0.0.0 to enable external clients)")
+ parser.add_option("-v", "--verbosity", type="int", default=0, help="message debug level")
+ parser.add_option("-p", "--pause", action="store_true", default=False, help="block on startup")
+ parser.add_option("-z", "--zmq-port", type="int", default=25000, help="backend sub port")
+ (options, args) = parser.parse_args()
+
+ # wait for gdb
+ if options.pause:
+ print ('Ready for GDB to attach (pid = %d)' % (os.getpid(),))
+ raw_input("Press 'Enter' to continue...")
+
+ input_q = gr.msg_queue(20)
+ output_q = gr.msg_queue(20)
+ backend_input_q = gr.msg_queue(20)
+ backend_output_q = gr.msg_queue(20)
+
+ my_backend = Backend(options, backend_input_q, backend_output_q, init_config=options.config)
+ server = http_server(input_q, output_q, options.endpoint)
+ q_watcher = queue_watcher(output_q, lambda msg : my_backend.publish(msg))
+ backend_q_watcher = queue_watcher(backend_output_q, lambda msg : process_qmsg(msg))
+
+ server.run()
+
+if __name__ == '__main__':
+ http_main()
diff --git a/op25/gr-op25_repeater/apps/install-sql.sh b/op25/gr-op25_repeater/apps/install-sql.sh
new file mode 100755
index 0000000..aa5c94d
--- /dev/null
+++ b/op25/gr-op25_repeater/apps/install-sql.sh
@@ -0,0 +1,31 @@
+#! /bin/sh
+
+PIP3=`which pip3`
+USERDIR=~/.local/bin
+
+sudo apt-get install python3-pip
+
+# PIP3=`which pip3`
+PIP3=/usr/bin/pip3
+
+# # # # # # un-comment the following two lines for ubuntu 16.04 # # # # # #
+#pip3 install --user pip==10.0.1
+#PIP3=$USERDIR/pip3
+
+echo PIP3 now set to $PIP3
+# # # $PIP3 --version # # # generates errors -- (?)
+
+$PIP3 install --user sqlalchemy
+$PIP3 install --user flask
+$PIP3 install --user datatables
+$PIP3 install --user flask-sqlalchemy
+
+cd
+git clone https://github.com/Pegase745/sqlalchemy-datatables.git
+cd sqlalchemy-datatables
+$PIP3 install --user .
+cd
+
+echo the following line must be added to your .bashrc
+echo "export PATH=$USERDIR:\$PATH"
+
diff --git a/op25/gr-op25_repeater/apps/log_ts.py b/op25/gr-op25_repeater/apps/log_ts.py
new file mode 100755
index 0000000..5306d49
--- /dev/null
+++ b/op25/gr-op25_repeater/apps/log_ts.py
@@ -0,0 +1,42 @@
+#!/usr/bin/env python
+
+# Copyright 2020 Graham Norbury
+#
+# This file is part of OP25
+#
+# OP25 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 3, or (at your option)
+# any later version.
+#
+# OP25 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 OP25; see the file COPYING. If not, write to the Free
+# Software Foundation, Inc., 51 Franklin Street, Boston, MA
+# 02110-1301, USA.
+
+# Modify TS_FORMAT to control logger timestamp format
+# 0 = legacy epoch seconds
+# 1 = formatted mm/dd/yy hh:mm:ss.usec
+TS_FORMAT = 1
+
+import time
+class log_ts(object):
+ @staticmethod
+ def get(supplied_ts=None):
+ if supplied_ts is None:
+ ts = time.time()
+ else:
+ ts = supplied_ts
+
+ if TS_FORMAT == 0:
+ formatted_ts = "{:.6f}".format(ts)
+ else:
+ formatted_ts = "{:s}{:s}".format(time.strftime("%m/%d/%y %H:%M:%S",time.localtime(ts)),"{:.6f}".format(ts - int(ts)).lstrip("0"))
+
+ return formatted_ts
+
diff --git a/op25/gr-op25_repeater/apps/multi_rx.py b/op25/gr-op25_repeater/apps/multi_rx.py
new file mode 100755
index 0000000..6ae3456
--- /dev/null
+++ b/op25/gr-op25_repeater/apps/multi_rx.py
@@ -0,0 +1,864 @@
+#!/usr/bin/env python3
+
+# Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Max H. Parke KA1RBI
+#
+# This file is part of OP25
+#
+# OP25 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 3, or (at your option)
+# any later version.
+#
+# OP25 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 OP25; see the file COPYING. If not, write to the Free
+# Software Foundation, Inc., 51 Franklin Street, Boston, MA
+# 02110-1301, USA.
+
+import os
+import sys
+import threading
+import time
+import json
+import select
+import traceback
+import osmosdr
+
+from gnuradio import audio, eng_notation, gr, filter, blocks, fft, analog, digital
+from gnuradio.eng_option import eng_option
+from math import pi
+from optparse import OptionParser
+
+import trunking
+
+import op25
+import op25_repeater
+import p25_demodulator
+import p25_decoder
+from sockaudio import audio_thread
+
+from sql_dbi import sql_dbi
+
+from gr_gnuplot import constellation_sink_c
+from gr_gnuplot import fft_sink_c
+from gr_gnuplot import mixer_sink_c
+from gr_gnuplot import symbol_sink_f
+from gr_gnuplot import eye_sink_f
+from gr_gnuplot import setup_correlation
+from gr_gnuplot import sync_plot
+from gr_gnuplot import cpm_sink_c
+
+from nxdn_trunking import cac_message
+
+from terminal import op25_terminal
+
+sys.path.append('tdma')
+import lfsr
+
+os.environ['IMBE'] = 'soft'
+
+_def_symbol_rate = 4800
+_def_interval = 3.0 # sec
+_def_file_dir = '../www/images'
+_def_audio_port = 23456 # udp port for audio thread
+_def_audio_output = 'default' # output device name for audio thread
+
+# The P25 receiver
+#
+
+def byteify(input): # thx so
+ if sys.version[0] != '2': # hack, must be a better way
+ return input
+ if isinstance(input, dict):
+ return {byteify(key): byteify(value)
+ for key, value in input.iteritems()}
+ elif isinstance(input, list):
+ return [byteify(element) for element in input]
+ elif isinstance(input, unicode):
+ return input.encode('utf-8')
+ else:
+ return input
+
+class device(object):
+ def __init__(self, config, tb):
+ self.name = config['name']
+ self.sample_rate = config['rate']
+ self.args = config['args']
+ self.tunable = config['tunable']
+ self.tb = tb
+ self.frequency = 0
+
+ if config['args'].startswith('audio-if:'):
+ self.init_audio_if(config)
+ elif config['args'].startswith('audio:'):
+ self.init_audio(config)
+ elif config['args'].startswith('file:'):
+ self.init_file(config)
+ elif config['args'].startswith('udp:'):
+ self.init_udp(config)
+ else:
+ self.init_osmosdr(config)
+
+ def init_file(self, config):
+ filename = config['args'].replace('file:', '', 1)
+ src = blocks.file_source(gr.sizeof_gr_complex, filename, repeat = False)
+ throttle = blocks.throttle(gr.sizeof_gr_complex, config['rate'])
+ self.tb.connect(src, throttle)
+ self.src = throttle
+ self.frequency = config['frequency']
+ self.offset = config['offset']
+
+ def init_audio_if(self, config):
+ filename = config['args'].replace('audio-if:', '')
+ self.audio_source = audio.source(config['rate'], filename)
+ self.null_source = blocks.null_source (gr.sizeof_float)
+ self.audio_cvt = blocks.float_to_complex()
+ self.tb.connect(self.audio_source, (self.audio_cvt, 0))
+ self.tb.connect(self.null_source, (self.audio_cvt, 1))
+ self.src = self.audio_cvt
+ self.frequency = config['frequency']
+ self.offset = config['offset']
+
+ def init_audio(self, config):
+ filename = config['args'].replace('audio:', '')
+ if filename.startswith('file:'):
+ filename = filename.replace('file:', '')
+ repeat = False
+ s2f = blocks.short_to_float()
+ K = 1 / 32767.0
+ src = blocks.multiply_const_ff(K)
+ throttle = blocks.throttle(gr.sizeof_short, self.sample_rate) # may be redundant in stdin case ?
+ if filename == '-':
+ fd = 0 # stdin
+ fsrc = blocks.file_descriptor_source(gr.sizeof_short, fd, repeat)
+ else:
+ fsrc = blocks.file_source(gr.sizeof_short, filename, repeat)
+ self.tb.connect(fsrc, throttle, s2f, src)
+ else:
+ src = audio.source(self.sample_rate, filename)
+ gain = 1.0
+ if config['gains'].startswith('audio:'):
+ gain = float(config['gains'].replace('audio:', ''))
+ self.src = blocks.multiply_const_ff(gain)
+ self.tb.connect(src, self.src)
+
+ def init_udp(self, config):
+ hostinfo = config['args'].split(':')
+ hostname = hostinfo[1]
+ udp_port = int(hostinfo[2])
+ bufsize = 32000 # might try enlarging this if packet loss
+ self.src = blocks.udp_source(gr.sizeof_gr_complex, hostname, udp_port, payload_size = bufsize)
+ self.ppm = 0
+ self.frequency = config['frequency']
+ self.offset = 0
+
+ def init_osmosdr(self, config):
+ speeds = [250000, 1000000, 1024000, 1800000, 1920000, 2000000, 2048000, 2400000, 2560000]
+
+ sys.stderr.write('device: %s\n' % config)
+ if config['args'].startswith('rtl') and config['rate'] not in speeds:
+ sys.stderr.write('WARNING: requested sample rate %d for device %s may not\n' % (config['rate'], config['name']))
+ sys.stderr.write("be optimal. You may want to use one of the following rates\n")
+ sys.stderr.write('%s\n' % speeds)
+ self.src = osmosdr.source(config['args'])
+
+ for tup in config['gains'].split(','):
+ name, gain = tup.split(':')
+ self.src.set_gain(int(gain), name)
+
+ self.src.set_freq_corr(config['ppm'])
+ self.ppm = config['ppm']
+
+ self.src.set_sample_rate(config['rate'])
+
+ self.src.set_center_freq(config['frequency'])
+ self.frequency = config['frequency']
+
+ self.offset = config['offset']
+
+ def set_frequency(self, frequency):
+ if frequency == self.frequency:
+ return
+ if not self.tunable:
+ return
+ self.frequency = frequency
+ self.src.set_center_freq(frequency)
+
+class channel(object):
+ def __init__(self, config, dev, verbosity, msgq = None, process_msg=None, msgq_id=-1, role=''):
+ sys.stderr.write('channel (dev %s): %s\n' % (dev.name, config))
+ self.device = dev
+ self.name = config['name']
+ self.symbol_rate = _def_symbol_rate
+ self.process_msg = process_msg
+ self.role = role
+ self.dev = ''
+ self.sysid = []
+ self.nac = []
+ if 'symbol_rate' in config.keys():
+ self.symbol_rate = config['symbol_rate']
+ self.config = config
+ self.verbosity = verbosity
+ self.frequency = config['frequency'] if self.device.args.startswith('audio-if') else 0
+ self.tdma_state = False
+ self.xor_cache = {}
+
+ self.tuning_error = 0
+ self.freq_correction = 0
+ self.error_band = 0
+ self.last_error_update = 0
+ self.last_set_freq_at = time.time()
+ self.warned_frequencies = {}
+ self.msgq_id = msgq_id
+ self.next_band_change = time.time()
+
+ self.audio_port = _def_audio_port
+ self.audio_output = _def_audio_output
+ self.audio_gain = 1.0
+ if 'audio_gain' in config:
+ self.audio_gain = float(config['audio_gain'])
+
+ if dev.args.startswith('audio:'):
+ self.demod = p25_demodulator.p25_demod_fb(
+ input_rate = dev.sample_rate,
+ filter_type = config['filter_type'],
+ if_rate = config['if_rate'],
+ symbol_rate = self.symbol_rate)
+ else:
+ self.demod = p25_demodulator.p25_demod_cb(
+ input_rate = dev.sample_rate,
+ demod_type = config['demod_type'],
+ filter_type = config['filter_type'],
+ excess_bw = config['excess_bw'],
+ relative_freq = dev.frequency + dev.offset - config['frequency'],
+ offset = dev.offset,
+ if_rate = config['if_rate'],
+ symbol_rate = self.symbol_rate,
+ use_old_decim = True if self.device.args.startswith('audio-if') else False)
+ if msgq is not None:
+ q = msgq
+ else:
+ q = gr.msg_queue(20)
+ if 'decode' in config.keys() and config['decode'].startswith('p25_decoder'):
+ num_ambe = 1
+ (proto, wireshark_host, udp_port) = config['destination'].split(':')
+ assert proto == 'udp'
+ wireshark_host = wireshark_host.replace('/', '')
+ udp_port = int(udp_port)
+ if role == 'vc':
+ self.audio_port = udp_port
+ if 'audio_output' in config.keys():
+ self.audio_output = config['audio_output']
+
+ self.decoder = p25_decoder.p25_decoder_sink_b(dest='audio', do_imbe=True, num_ambe=num_ambe, wireshark_host=wireshark_host, udp_port=udp_port, do_msgq = True, msgq=q, audio_output=self.audio_output, debug=verbosity, msgq_id=self.msgq_id)
+ else:
+ self.decoder = op25_repeater.frame_assembler(config['destination'], verbosity, q, self.msgq_id)
+
+ if self.symbol_rate == 6000 and role == 'cc':
+ sps = config['if_rate'] // self.symbol_rate
+ self.demod.set_symbol_rate(self.symbol_rate) # this and the foll. call should be merged?
+ self.demod.clock.set_omega(float(sps))
+ self.demod.clock.set_tdma(True)
+ sys.stderr.write('initializing TDMA control channel %s channel ID %d\n' % (self.name, self.msgq_id))
+
+ if self.process_msg is not None and msgq is None:
+ self.q_watcher = du_queue_watcher(q, lambda msg: self.process_msg(msg, sender=self))
+
+ self.kill_sink = []
+
+ if 'blacklist' in config.keys():
+ for g in config['blacklist'].split(','):
+ self.decoder.insert_blacklist(int(g))
+
+ if 'whitelist' in config.keys():
+ for g in config['whitelist'].split(','):
+ self.decoder.insert_whitelist(int(g))
+
+ self.sinks = []
+ if 'plot' not in config.keys():
+ return
+
+ for plot in config['plot'].split(','):
+ if plot == 'datascope':
+ assert config['demod_type'] == 'fsk4' ## datascope plot requires fsk4 demod type
+ sink = eye_sink_f(sps=config['if_rate'] // self.symbol_rate)
+ sink.set_title(self.name)
+ self.sinks.append(sink)
+ self.demod.connect_bb('symbol_filter', sink)
+ self.kill_sink.append(sink)
+ elif plot.startswith('cpm'):
+ if self.symbol_rate != 6000: # fixed rate value for p25p2
+ sys.stderr.write('warning: symbol rate %d may be incorrect for CPM channel %s\n' % (self.symbol_rate, self.name))
+ sink = cpm_sink_c(sps=config['if_rate'] // self.symbol_rate, plot_mode=plot)
+ sink.set_title(self.name)
+ self.sinks.append(sink)
+ self.demod.connect_complex('if_out', sink)
+ self.kill_sink.append(sink)
+ elif plot == 'symbol':
+ sink = symbol_sink_f()
+ sink.set_title(self.name)
+ self.sinks.append(sink)
+ self.demod.connect_float(sink)
+ self.kill_sink.append(sink)
+ elif plot == 'fft':
+ i = len(self.sinks)
+ sink = fft_sink_c()
+ sink.set_title(self.name)
+ self.sinks.append(sink)
+ self.demod.connect_complex('src', self.sinks[i])
+ self.kill_sink.append(self.sinks[i])
+ elif plot == 'mixer':
+ if config['demod_type'] == 'cqpsk':
+ blk = 'mixer'
+ else:
+ blk = 'cutoff'
+ i = len(self.sinks)
+ sink = mixer_sink_c()
+ sink.set_title(self.name)
+ self.sinks.append(sink)
+ self.demod.connect_complex(blk, self.sinks[i])
+ self.kill_sink.append(self.sinks[i])
+ elif plot == 'constellation':
+ i = len(self.sinks)
+ assert config['demod_type'] == 'cqpsk' ## constellation plot requires cqpsk demod type
+ sink = constellation_sink_c()
+ sink.set_title(self.name)
+ self.sinks.append(sink)
+ self.demod.connect_complex('diffdec', self.sinks[i])
+ self.kill_sink.append(self.sinks[i])
+ elif plot == 'correlation':
+ assert config['demod_type'] == 'fsk4' ## correlation plot requires fsk4 demod type
+ assert config['symbol_rate'] == 4800 ## 4800 required for correlation plot
+ sps=config['if_rate'] // self.symbol_rate
+ sinks = setup_correlation(sps, self.name, self.demod.connect_bb)
+ self.kill_sink += sinks
+ self.sinks += sinks
+ elif plot == 'sync':
+ assert config['demod_type'] == 'cqpsk' ## sync plot requires cqpsk demod type
+ i = len(self.sinks)
+ sink = sync_plot(block = self.demod.clock)
+ sink.set_title(self.name)
+ self.sinks.append(sink)
+ self.kill_sink.append(self.sinks[i])
+ # does not issue self.connect()
+ else:
+ sys.stderr.write('unrecognized plot type %s\n' % plot)
+ return
+
+ def set_frequency(self, frequency):
+ assert frequency
+ if self.device.tunable:
+ self.device.set_frequency(frequency)
+ f = self.frequency if self.device.args.startswith('audio-if') else frequency
+ relative_freq = self.device.frequency + self.device.offset + self.tuning_error - f
+ if (not self.device.tunable) and (not self.device.args.startswith('audio-if')) and abs(relative_freq) > ((self.demod.input_rate / 2) - (self.demod.if1 / 2)):
+ if frequency not in self.warned_frequencies:
+ sys.stderr.write('warning: set frequency %f to non-tunable device %s rejected.\n' % (frequency / 1000000.0, self.device.name))
+ self.warned_frequencies[frequency] = 0
+ self.warned_frequencies[frequency] += 1
+ #print 'set_relative_frequency: error, relative frequency %d exceeds limit %d' % (relative_freq, self.demod.input_rate/2)
+ return False
+ self.demod.set_relative_frequency(relative_freq)
+ self.last_set_freq_at = time.time()
+ if not self.device.args.startswith('audio-if'):
+ self.frequency = frequency
+
+ def error_tracking(self, last_change_freq):
+ curr_time = time.time()
+ if self.config['demod_type'] == 'fsk4':
+ return None # todo: allow tracking in fsk4 demod
+ UPDATE_TIME = 3
+ if self.last_error_update + UPDATE_TIME > curr_time:
+ return None
+ self.last_error_update = time.time()
+ if not self.demod.is_muted():
+ band = self.demod.get_error_band()
+ freq_error = self.demod.get_freq_error()
+ if band and curr_time >= self.next_band_change:
+ self.next_band_change = curr_time + 20.0
+ self.error_band += band
+ sys.stderr.write('channel %d set error band %d\n' % (self.msgq_id, self.error_band))
+ self.freq_correction += freq_error * 0.15
+ self.freq_correction = int(self.freq_correction)
+ if self.freq_correction > 600:
+ self.freq_correction -= 1200
+ self.error_band += 1
+ elif self.freq_correction < -600:
+ self.freq_correction += 1200
+ self.error_band -= 1
+ self.error_band = min(self.error_band, 2)
+ self.error_band = max(self.error_band, -2)
+ self.tuning_error = int(self.error_band * 1200 + self.freq_correction)
+ e = 0
+ if last_change_freq > 0:
+ e = (self.tuning_error*1e6) / float(last_change_freq)
+ else:
+ e = 0
+ freq_error = 0
+ band = 0
+ ### self.set_frequency(self.frequency) # adjust relative frequency with updated tuning_error
+ if self.verbosity >= 10:
+ sys.stderr.write('%f\terror_tracking\t%s\t%d\t%d\t%d\t%d\t%d\t%f\n' % (curr_time, self.name, self.msgq_id, freq_error, self.error_band, self.tuning_error, self.freq_correction, e))
+ d = {'time': time.time(), 'json_type': 'freq_error_tracking', 'name': self.name, 'device': self.device.name, 'freq_error': freq_error, 'band': band, 'error_band': self.error_band, 'tuning_error': self.tuning_error, 'freq_correction': self.freq_correction}
+ if self.frequency:
+ self.set_frequency(self.frequency)
+ return d
+
+ def configure_tdma(self, params):
+ set_tdma = False
+ if params['tdma'] is not None:
+ set_tdma = True
+ self.decoder.set_slotid(params['tdma'])
+ self.demod.clock.set_tdma(set_tdma)
+ if set_tdma == self.tdma_state:
+ return # already in desired state
+ self.tdma_state = set_tdma
+ if set_tdma:
+ hash = '%x%x%x' % (params['nac'], params['sysid'], params['wacn'])
+ if hash not in self.xor_cache:
+ self.xor_cache[hash] = lfsr.p25p2_lfsr(params['nac'], params['sysid'], params['wacn']).xor_chars
+ self.decoder.set_xormask(self.xor_cache[hash], hash)
+ self.decoder.set_nac(params['nac'])
+ rate = 6000
+ else:
+ rate = 4800
+ sps = self.config['if_rate'] / rate
+ self.demod.set_symbol_rate(rate) # this and the foll. call should be merged?
+ self.demod.clock.set_omega(float(sps))
+
+class du_queue_watcher(threading.Thread):
+ def __init__(self, msgq, callback, **kwds):
+ threading.Thread.__init__ (self, **kwds)
+ self.setDaemon(1)
+ self.msgq = msgq
+ self.callback = callback
+ self.keep_running = True
+ self.start()
+
+ def run(self):
+ while(self.keep_running):
+ msg = self.msgq.delete_head()
+ if not self.keep_running:
+ break
+ self.callback(msg)
+
+class rx_block (gr.top_block):
+
+ # Initialize the receiver
+ #
+ def __init__(self, verbosity, config, trunk_conf_file=None, terminal_type=None, track_errors=False, udp_player=None):
+ self.verbosity = verbosity
+ gr.top_block.__init__(self)
+ self.device_id_by_name = {}
+ self.msg_types = {}
+ self.terminal_type = terminal_type
+ self.last_process_update = 0
+ self.last_freq_params = {'freq' : 0.0, 'tgid' : None, 'tag' : "", 'tdma' : None}
+ self.trunk_rx = None
+ self.track_errors = track_errors
+ self.last_change_freq = 0
+ self.sql_db = sql_dbi()
+ self.input_q = gr.msg_queue(20)
+ self.output_q = gr.msg_queue(20)
+ self.last_voice_channel_id = 0
+ self.terminal = op25_terminal(self.input_q, self.output_q, terminal_type)
+ self.configure_devices(config['devices'])
+ self.configure_channels(config['channels'])
+ if trunk_conf_file:
+ self.trunk_rx = trunking.rx_ctl(frequency_set = self.change_freq, debug = self.verbosity, conf_file = trunk_conf_file, logfile_workers=[], send_event=self.send_event)
+ self.sinks = []
+ for chan in self.channels:
+ if len(chan.sinks):
+ self.sinks += chan.sinks
+ if self.is_http_term():
+ for sink in self.sinks:
+ sink.gnuplot.set_interval(_def_interval)
+ sink.gnuplot.set_output_dir(_def_file_dir)
+
+ if udp_player:
+ chan = self.find_audio_channel() # find chan used for audio
+ self.audio = audio_thread("127.0.0.1", chan.audio_port, chan.audio_output, False, chan.audio_gain)
+ else:
+ self.audio = None
+
+ def find_channel_uplink(self, params):
+ channels = []
+ for chan in self.channels:
+ if chan.role != 'uplink':
+ continue
+ channels.append(chan)
+ if self.verbosity > 0:
+ sys.stderr.write('%f find_channel_uplink: selected channel %d (%s) for tuning request type %s frequency %f\n' % (time.time(), chan.msgq_id, chan.name, 'vc', params['uplink'] / 1000000.0))
+ return channels
+
+ def find_channel_cc(self, params):
+ channels = []
+ for chan in self.channels:
+ if chan.role != 'cc':
+ continue
+ if len(chan.nac) and params['nac'] not in chan.nac:
+ continue
+ if len(chan.sysid) and params['sysid'] not in chan.sysid:
+ continue
+ channels.append(chan)
+ if self.verbosity > 0:
+ sys.stderr.write('%f find_channel_cc: selected channel %d (%s) for tuning request type %s frequency %f\n' % (time.time(), chan.msgq_id, chan.name, 'cc', params['freq'] / 1000000.0))
+ return channels
+
+ def find_channel_vc(self, params):
+ channels = []
+ for chan in self.channels: # pass1 - search for vc on non-tunable dev having frequency within band
+ if chan.role != 'vc':
+ continue
+ if chan.device.tunable:
+ continue
+ if abs(params['freq'] - chan.device.frequency) >= chan.demod.relative_limit:
+ #sys.stderr.write('%f skipping channel %d frequency %f dev freq %f limit %f\n' % (time.time(), chan.msgq_id, params['freq'] / 1000000.0, chan.device.frequency / 1000000.0, chan.demod.relative_limit / 1000000.0))
+ continue
+ channels.append(chan)
+ if self.verbosity > 0:
+ sys.stderr.write('%f find_channel_vc: selected channel %d (%s) for tuning request type %s frequency %f (1)\n' % (time.time(), chan.msgq_id, chan.name, 'vc', params['freq'] / 1000000.0))
+ return channels
+ for chan in self.channels: # pass2 - search for vc on tunable dev
+ if chan.role != 'vc':
+ continue
+ if not chan.device.tunable:
+ continue
+ channels.append(chan)
+ if self.verbosity > 0:
+ sys.stderr.write('%f find_channel_vc: selected channel %d (%s) for tuning request type %s frequency %f (2)\n' % (time.time(), chan.msgq_id, chan.name, 'vc', params['freq'] / 1000000.0))
+ return channels
+ return [] # pass 1 and 2 failed
+
+ def do_error_tracking(self):
+ if not self.track_errors:
+ return
+ for chan in self.channels:
+ d = chan.error_tracking(self.last_change_freq)
+ if d is not None and not self.input_q.full_p():
+ msg = gr.message().make_from_string(json.dumps(d), -4, 0, 0)
+ self.input_q.insert_tail(msg)
+
+ def change_freq(self, params):
+ self.last_freq_params = params
+ freq = params['freq']
+ self.last_change_freq = freq
+ channel_type = params['channel_type'] # vc or cc
+ self.uplink_change_freq(params)
+ if channel_type == 'vc':
+ channels = self.find_channel_vc(params)
+ elif channel_type == 'cc':
+ channels = self.find_channel_cc(params)
+ else:
+ raise ValueError('change_freq: invalid channel_type: %s' % channel_type)
+ if len(channels) == 0:
+ sys.stderr.write('change_freq: no channel(s) found for %s frequency %f\n' % (channel_type, freq/1000000.0))
+ return
+ for chan in channels:
+ chan.device.set_frequency(freq)
+ chan.set_frequency(freq)
+ chan.configure_tdma(params)
+ self.freq_update()
+ if channel_type == 'vc':
+ self.last_voice_channel_id = chan.msgq_id
+ #return
+ if self.trunk_rx is None:
+ return
+ voice_chans = [chan for chan in self.channels if chan.role == 'vc']
+ voice_state = channel_type == 'vc'
+ # FIXME: fsk4 case needs work/testing
+ for chan in voice_chans:
+ if voice_state and chan.msgq_id == self.last_voice_channel_id:
+ chan.demod.set_muted(False)
+ else:
+ chan.demod.set_muted(True)
+
+ def uplink_change_freq(self, params):
+ channel_type = params['channel_type'] # vc or cc
+ if 'uplink' not in params:
+ return
+ if channel_type != 'vc':
+ return
+ uplink = params['uplink']
+ channels = self.find_channel_uplink(params)
+ for chan in channels:
+ chan.device.set_frequency(uplink)
+ chan.set_frequency(uplink)
+ chan.configure_tdma(params)
+ if self.verbosity > 0:
+ sys.stderr.write('set uplink frequency %f, channel %s\n' % (uplink / 1000000.0, chan.name))
+
+ def is_http_term(self):
+ if self.terminal_type.startswith('http:'):
+ return True
+ else:
+ return False
+
+ def process_terminal_msg(self, msg):
+ # return true = end top block
+ RX_COMMANDS = 'skip lockout hold'.split()
+ s = msg.to_string()
+ t = msg.type()
+ if t == -4:
+ d = json.loads(s)
+ s = d['command']
+ if type(s) is not str and isinstance(s, bytes):
+ # should only get here if python3
+ s = s.decode()
+ if s == 'quit': return True
+ elif s == 'update': ## deprecated here: to be removed
+ pass
+ # self.process_update()
+ elif s == 'set_freq':
+ sys.stderr.write('set_freq not supported\n')
+ return
+ #freq = msg.arg1()
+ #self.last_freq_params['freq'] = freq
+ #self.set_freq(freq)
+ elif s == 'adj_tune':
+ freq = msg.arg1()
+ elif s == 'dump_tgids':
+ self.trunk_rx.dump_tgids()
+ elif s == 'reload_tags':
+ nac = msg.arg1()
+ self.trunk_rx.reload_tags(int(nac))
+ elif s == 'add_default_config':
+ nac = msg.arg1()
+ self.trunk_rx.add_default_config(int(nac))
+ elif s in RX_COMMANDS:
+ if self.trunk_rx is not None:
+ self.trunk_rx.process_qmsg(msg)
+ elif s == 'settings-enable' and self.trunk_rx is not None:
+ self.trunk_rx.enable_status(d['data'])
+ return False
+
+ def process_ajax(self):
+ if not self.is_http_term():
+ return
+ if self.input_q.full_p():
+ return
+ filenames = [sink.gnuplot.filename for sink in self.sinks if sink.gnuplot.filename]
+ error = []
+ for chan in self.channels:
+ if hasattr(chan.demod, 'get_freq_error'):
+ error.append(chan.demod.get_freq_error())
+ d = {'json_type': 'rx_update', 'error': error, 'files': filenames, 'time': time.time()}
+ msg = gr.message().make_from_string(json.dumps(d), -4, 0, 0)
+ self.input_q.insert_tail(msg)
+
+ def process_update(self):
+ UPDATE_INTERVAL = 1.0 # sec.
+ now = time.time()
+ if now < self.last_process_update + UPDATE_INTERVAL:
+ return
+ self.last_process_update = now
+ self.freq_update()
+ if self.input_q.full_p():
+ return
+ if self.trunk_rx is None:
+ return ## possible race cond - just ignore
+ js = self.trunk_rx.to_json()
+ msg = gr.message().make_from_string(js, -4, 0, 0)
+ self.input_q.insert_tail(msg)
+ self.process_ajax()
+
+ def send_event(self, d): ## called from trunking module to send json msgs / updates to client
+ if d is not None:
+ self.sql_db.event(d)
+ if d and not self.input_q.full_p():
+ msg = gr.message().make_from_string(json.dumps(d), -4, 0, 0)
+ self.input_q.insert_tail(msg)
+ self.process_update()
+
+ def freq_update(self):
+ if self.input_q.full_p():
+ return
+ params = self.last_freq_params
+ params['json_type'] = 'change_freq'
+ params['current_time'] = time.time()
+ js = json.dumps(params)
+ msg = gr.message().make_from_string(js, -4, 0, 0)
+ self.input_q.insert_tail(msg)
+
+ def process_msg(self, msg):
+ mtype = msg.type()
+ if mtype == -2 or mtype == -4:
+ self.process_terminal_msg(msg)
+ else:
+ self.process_channel_msg(msg, mtype)
+
+ def process_channel_msg(self, msg, mtype):
+ msgtext = msg.to_string()
+ aa55 = trunking.get_ordinals(msgtext[:2])
+ assert aa55 == 0xaa55
+ msgq_id = trunking.get_ordinals(msgtext[2:4])
+ msgtext = msgtext[4:]
+ if mtype == -5:
+ self.process_nxdn_msg(msgtext)
+ else:
+ self.process_trunked_qmsg(msg, msgq_id)
+
+ def process_nxdn_msg(self, s):
+ if isinstance(s[0], str): # for python 2/3
+ s = [ord(x) for x in s]
+ msgtype = chr(s[0])
+ lich = s[1]
+ if self.verbosity > 2:
+ sys.stderr.write ('process_nxdn_msg %s lich %x\n' % (msgtype, lich))
+ if msgtype == 'c': # CAC type
+ ran = s[2] & 0x3f
+ msg = cac_message(s[2:])
+ if msg['msg_type'] == 'CCH_INFO' and self.verbosity:
+ sys.stderr.write ('%-10s %-10s system %d site %d ran %d\n' % (msg['cc1']/1e6, msg['cc2']/1e6, msg['location_id']['system'], msg['location_id']['site'], ran))
+ if self.verbosity > 1:
+ sys.stderr.write('%s\n' % json.dumps(msg))
+
+ def filtered(self, msg, msgq_id):
+ # return True if msg should be suppressed
+ chan = self.channels[msgq_id-1]
+ t = msg.type()
+ if chan.role == 'vc' and t in [7, 12]: ## suppress tsbk/mbt/pdu received over vc
+ return True
+ if chan.role == 'uplink' and t in [-1, 7, 12]: ## suppress as above and also timeout
+ return True
+ return False
+
+ def process_trunked_qmsg(self, msg, msgq_id): # p25 trunked message
+ if self.trunk_rx is None:
+ return
+ if self.filtered(msg, msgq_id):
+ return
+ self.trunk_rx.process_qmsg(msg)
+ self.trunk_rx.parallel_hunt_cc()
+ self.do_error_tracking()
+
+ def configure_devices(self, config):
+ self.devices = []
+ for cfg in config:
+ self.device_id_by_name[cfg['name']] = len(self.devices)
+ self.devices.append(device(cfg, self))
+
+ def find_trunked_device(self, chan, requested_dev):
+ if len(self.devices) == 1: # single SDR
+ return self.devices[0]
+ for dev in self.devices:
+ if dev.name == requested_dev:
+ return dev
+ return None
+
+ def find_device(self, chan, requested_dev):
+ if 'decode' in chan.keys() and chan['decode'].startswith('p25_decoder'):
+ return self.find_trunked_device(chan, requested_dev)
+ for dev in self.devices:
+ if dev.args.startswith('audio:') and chan['demod_type'] == 'fsk4':
+ return dev
+ d = abs(chan['frequency'] - dev.frequency)
+ nf = dev.sample_rate // 2
+ if d + 6250 <= nf:
+ return dev
+ return None
+
+ def configure_channels(self, config):
+ self.channels = []
+ for cfg in config:
+ decode_d = {'role': '', 'dev': ''}
+ if 'decode' in cfg.keys() and cfg['decode'].startswith('p25_decoder'):
+ decode_p = cfg['decode'].split(':')[1:]
+ for p in decode_p: # possible keys: dev, role, nac, sysid; valid roles: cc vc
+ (k, v) = p.split('=')
+ if k == 'nac' or k == 'sysid':
+ v = [int(x, base=0) for x in v.split(',')]
+ decode_d[k] = v
+ dev = self.find_device(cfg, decode_d['dev'])
+ if dev is None:
+ sys.stderr.write('* * * No device found for channel %s- ignoring!\n' % cfg['name'])
+ continue
+ msgq_id = len(self.channels) + 1
+ chan = channel(cfg, dev, self.verbosity, msgq=self.output_q, msgq_id = msgq_id, role=decode_d['role'])
+ for k in decode_d.keys():
+ setattr(chan, k, decode_d[k])
+ self.channels.append(chan)
+ self.connect(dev.src, chan.demod, chan.decoder)
+ sys.stderr.write('assigning channel "%s" (channel id %d) to device "%s"\n' % (chan.name, chan.msgq_id, dev.name))
+ if 'log_if' in cfg.keys():
+ chan.logfile_if = blocks.file_sink(gr.sizeof_gr_complex, 'if-%d-%s' % (chan.config['if_rate'], cfg['log_if']))
+ if cfg['demod_type'] == 'cqpsk':
+ chan.demod.connect_complex('agc', chan.logfile_if)
+ else:
+ chan.demod.connect_complex('if_out', chan.logfile_if)
+ if 'log_symbols' in cfg.keys():
+ chan.logfile = blocks.file_sink(gr.sizeof_char, cfg['log_symbols'])
+ self.connect(chan.demod, chan.logfile)
+
+ def find_audio_channel(self):
+ for chan in self.channels: # pass1 - look for 'vc'
+ if chan.role == 'vc' and chan.audio_port:
+ return chan
+ for chan in self.channels: # pass2 - any chan with audio port specified
+ if chan.audio_port:
+ return chan
+ return self.channels[0]
+
+ def scan_channels(self):
+ for chan in self.channels:
+ sys.stderr.write('scan %s: error %d\n' % (chan.config['frequency'], chan.demod.get_freq_error()))
+
+class rx_main(object):
+ def __init__(self):
+ self.keep_running = True
+
+ # command line argument parsing
+ parser = OptionParser(option_class=eng_option)
+ parser.add_option("-c", "--config-file", type="string", default=None, help="specify config file name")
+ parser.add_option("-v", "--verbosity", type="int", default=0, help="message debug level")
+ parser.add_option("-p", "--pause", action="store_true", default=False, help="block on startup")
+ parser.add_option("-M", "--monitor-stdin", action="store_false", default=True, help="enable press ENTER to quit")
+ parser.add_option("-T", "--trunk-conf-file", type="string", default=None, help="trunking config file name")
+ parser.add_option("-l", "--terminal-type", type="string", default="curses", help="'curses' or udp port or 'http:host:port'")
+ parser.add_option("-X", "--freq-error-tracking", action="store_true", default=False, help="enable experimental frequency error tracking")
+ parser.add_option("-U", "--udp-player", action="store_true", default=False, help="enable built-in udp audio player")
+ (options, args) = parser.parse_args()
+
+ self.options = options
+
+ # wait for gdb
+ if options.pause:
+ print ('Ready for GDB to attach (pid = %d)' % (os.getpid(),))
+ raw_input("Press 'Enter' to continue...")
+
+ if options.config_file == '-':
+ config = json.loads(sys.stdin.read())
+ else:
+ config = json.loads(open(options.config_file).read())
+ self.tb = rx_block(options.verbosity, config = byteify(config), trunk_conf_file=options.trunk_conf_file, terminal_type=options.terminal_type, track_errors=options.freq_error_tracking, udp_player = options.udp_player)
+ sys.stderr.write('python version detected: %s\n' % sys.version)
+ sys.stderr.flush()
+
+ def run(self):
+ self.tb.start()
+ if self.options.monitor_stdin:
+ print("Running. press ENTER to quit")
+ while self.keep_running:
+ if self.options.monitor_stdin and select.select([sys.stdin,],[],[],0.0)[0]:
+ c = sys.stdin.read(1)
+ self.keep_running = False
+ break
+ msg = self.tb.output_q.delete_head()
+ if self.tb.process_msg(msg):
+ self.keep_running = False
+ break
+ print('Quitting - now stopping top block')
+ self.tb.stop()
+
+if __name__ == "__main__":
+ rx = rx_main()
+ try:
+ rx.run()
+ except KeyboardInterrupt:
+ rx.keep_running = False
+ print('Program ending')
+ time.sleep(1)
diff --git a/op25/gr-op25_repeater/apps/nxdn_trunking.py b/op25/gr-op25_repeater/apps/nxdn_trunking.py
new file mode 100644
index 0000000..b18f98b
--- /dev/null
+++ b/op25/gr-op25_repeater/apps/nxdn_trunking.py
@@ -0,0 +1,316 @@
+#!/usr/bin/env python
+
+#
+# (C) Copyright 2020 Max H. Parke, KA1RBI
+#
+# This file is part of OP25
+#
+# OP25 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 3, or (at your option)
+# any later version.
+#
+# OP25 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 OP25; see the file COPYING. If not, write to the Free
+# Software Foundation, Inc., 51 Franklin Street, Boston, MA
+# 02110-1301, USA.
+
+#
+# nxdn trunking:
+# - CAC decoding
+#
+
+import sys
+import os
+
+sys.path.append('tdma')
+from bit_utils import *
+
+def locid(id):
+ save_id = mk_int(id)
+ cat = mk_int(id[:2])
+ if cat == 0:
+ ssize = 10
+ elif cat == 2:
+ ssize = 14
+ elif cat == 1:
+ ssize = 17
+ else:
+ return {'category': -1, 'system': -1, 'site': -1, 'id': '0x%x' % save_id}
+ id = id[2:]
+ syscode = mk_int(id[:ssize])
+ id = id[ssize:]
+ sitecode = mk_int(id)
+ return {'category': cat, 'system': syscode, 'site': sitecode, 'id': '0x%x' % save_id}
+
+def mk_freq(f):
+ ### todo: UHF currently untested; may fail at 400 MHz
+ return int(f * 1250 + 100000000) # frequency in Hz
+
+def cac_message(s):
+ d = {}
+ bits = []
+ for c in s:
+ for i in range(8):
+ bits.append((c >> (7-i)) & 1)
+ d['structure'] = mk_int(bits[:2])
+ d['ran'] = mk_int(bits[2:8])
+ bits = bits[8:]
+ msg_type = mk_int(bits[2:8])
+ d['msg_typeid'] = msg_type
+ if msg_type == 0x18: # SITE_INFO
+ assert len(bits) == 144
+ d['msg_type'] = 'SITE_INFO'
+ bits = bits[8:]
+ d['location_id'] = locid(bits[:24])
+ bits = bits[24:]
+ d['channel_info'] = mk_int(bits[:16])
+ bits = bits[16:]
+ d['service_info'] = mk_int(bits[:16])
+ bits = bits[16:]
+ d['restr_info'] = mk_int(bits[:24])
+ bits = bits[24:]
+ d['access_info'] = mk_int(bits[:24])
+ bits = bits[24:]
+ d['version_no'] = mk_int(bits[:8])
+ bits = bits[8:]
+ d['adjacent_alloc'] = mk_int(bits[:4])
+ bits = bits[4:]
+ d['cc1'] = mk_int(bits[:10])
+ bits = bits[10:]
+ d['cc2'] = mk_int(bits[:10])
+ elif msg_type == 0x19: # SRV_INFO
+ assert len(bits) >= 72
+ d['msg_type'] = 'SRV_INFO'
+ bits = bits[8:]
+ d['location_id'] = locid(bits[:24])
+ bits = bits[24:]
+ d['service_info'] = mk_int(bits[:16])
+ bits = bits[16:]
+ d['restr_info'] = mk_int(bits[:24])
+ elif msg_type == 0x1a: # CCH_INFO
+ assert len(bits) >= 72
+ d['msg_type'] = 'CCH_INFO'
+ bits = bits[8:]
+ d['location_id'] = locid(bits[:24])
+ bits = bits[24:]
+ d['flags1'] = mk_int(bits[:8])
+ bits = bits[8:]
+ d['cc1'] = mk_freq(mk_int(bits[:16]))
+ bits = bits[16:]
+ d['cc2'] = mk_freq(mk_int(bits[:16]))
+ elif msg_type == 0x1b: # ADJ_SITE_INFO
+ assert len(bits) >= 72
+ d['msg_type'] = 'ADJ_SITE_INFO'
+ d1 = {}
+ d2 = {}
+ bits = bits[8:]
+ d1['location'] = locid(bits[:24])
+ bits = bits[24:]
+ d1['option'] = mk_int(bits[:8])
+ bits = bits[8:]
+ d1['cc'] = mk_freq(mk_int(bits[:16]))
+ bits = bits[16:]
+ d2['location'] = locid(bits[:24])
+ bits = bits[24:]
+ d2['option'] = mk_int(bits[:8])
+ bits = bits[8:]
+ d2['cc'] = mk_freq(mk_int(bits[:16]))
+ bits = bits[16:]
+ d['sites'] = [d1, d2]
+ #d['location_3'] = locid(bits[:24])
+ #bits = bits[24:]
+ #d['option_3'] = mk_int(bits[:6])
+ #bits = bits[6:]
+ #d['cc_3'] = mk_int(bits[:10])
+ elif msg_type == 0x01: # VCALL_RESP
+ assert len(bits) >= 64
+ d['msg_type'] = 'VCALL_RESP'
+ bits = bits[8:]
+ d['option'] = mk_int(bits[:8])
+ bits = bits[8:]
+ d['call_type'] = mk_int(bits[:3])
+ d['call_option'] = mk_int(bits[3:8])
+ bits = bits[8:]
+ d['source_id'] = mk_int(bits[:16])
+ bits = bits[16:]
+ d['destination_id'] = mk_int(bits[:16])
+ bits = bits[16:]
+ d['cause'] = mk_int(bits[:8])
+ bits = bits[8:]
+ elif msg_type == 0x09: # DCALL_RESP
+ assert len(bits) >= 64
+ d['msg_type'] = 'DCALL_RESP'
+ bits = bits[8:]
+ d['option'] = mk_int(bits[:8])
+ bits = bits[8:]
+ d['call_type'] = mk_int(bits[:3])
+ d['call_option'] = mk_int(bits[3:8])
+ bits = bits[8:]
+ d['source_id'] = mk_int(bits[:16])
+ bits = bits[16:]
+ d['destination_id'] = mk_int(bits[:16])
+ bits = bits[16:]
+ d['cause'] = mk_int(bits[:8])
+ bits = bits[8:]
+ elif msg_type == 0x04: # VCALL_ASSGN
+ assert len(bits) >= 72
+ bits2 = bits
+ s = ''
+ while len(bits2):
+ s += '%02x' % mk_int(bits2[:8])
+ bits2 = bits2[8:]
+ d['hexdata'] = s
+ d['msg_type'] = 'VCALL_ASSGN'
+ bits = bits[8:]
+ d['option'] = mk_int(bits[:8])
+ bits = bits[8:]
+ d['call_type'] = mk_int(bits[:3])
+ d['call_option'] = mk_int(bits[3:8])
+ bits = bits[8:]
+ d['source_id'] = mk_int(bits[:16])
+ bits = bits[16:]
+ d['group_id'] = mk_int(bits[:16])
+ bits = bits[16:]
+ d['timer'] = mk_int(bits[:8])
+ d['channel'] = mk_int(bits[6:16])
+ bits = bits[8:]
+ d['f1'] = mk_freq(mk_int(bits[:16]))
+ bits = bits[16:]
+ d['f2'] = mk_freq(mk_int(bits[:16]))
+ elif msg_type == 0x0e: # DCALL_ASSGN
+ assert len(bits) >= 104
+ d['msg_type'] = 'DCALL_ASSGN'
+ bits = bits[8:]
+ d['option'] = mk_int(bits[:8])
+ bits = bits[8:]
+ d['call_type'] = mk_int(bits[:3])
+ d['call_option'] = mk_int(bits[3:8])
+ bits = bits[8:]
+ d['source_id'] = mk_int(bits[:16])
+ bits = bits[16:]
+ d['group_id'] = mk_int(bits[:16])
+ bits = bits[16:]
+ d['timer'] = mk_int(bits[:8])
+ bits = bits[8:]
+ d['f1'] = mk_freq(mk_int(bits[:16]))
+ bits = bits[16:]
+ d['f2'] = mk_freq(mk_int(bits[:16]))
+ elif msg_type == 0x20: # REG_RESP
+ assert len(bits) >= 72
+ d['msg_type'] = 'REG_RESP'
+ bits = bits[8:]
+ d['option'] = mk_int(bits[:8])
+ bits = bits[8:]
+ d['location id'] = mk_int(bits[:16])
+ bits = bits[16:]
+ d['unit_id'] = mk_int(bits[:16])
+ bits = bits[16:]
+ d['group_id'] = mk_int(bits[:16])
+ bits = bits[16:]
+ d['cause'] = mk_int(bits[:8])
+ bits = bits[8:]
+ d['visitor_unit'] = mk_int(bits[:16])
+ bits = bits[16:]
+ d['visitor_group'] = mk_int(bits[:16])
+ elif msg_type == 0x22: # REG_C_RESP
+ assert len(bits) >= 56
+ d['msg_type'] = 'REG_C_RESP'
+ bits = bits[8:]
+ d['option'] = mk_int(bits[:8])
+ bits = bits[8:]
+ d['location id'] = mk_int(bits[:16])
+ bits = bits[16:]
+ d['unit_id'] = mk_int(bits[:16])
+ elif msg_type == 0x24: # GRP_REG_RESP
+ assert len(bits) >= 72
+ d['msg_type'] = 'GRP_REG_RESP'
+ bits = bits[8:]
+ d['option'] = mk_int(bits[:8])
+ bits = bits[8:]
+ d['destination id'] = mk_int(bits[:16])
+ bits = bits[16:]
+ d['group_id'] = mk_int(bits[:16])
+ bits = bits[16:]
+ d['cause'] = mk_int(bits[:8])
+ bits = bits[8:]
+ d['visitor_group_id'] = mk_int(bits[:16])
+ elif msg_type == 0x32: # STAT_REQ
+ assert len(bits) >= 72
+ d['msg_type'] = 'STAT_REQ'
+ bits = bits[8:]
+ d['option'] = mk_int(bits[:8])
+ bits = bits[8:]
+ d['call_type'] = mk_int(bits[:3])
+ d['call_option'] = mk_int(bits[3:8])
+ bits = bits[8:]
+ d['source id'] = mk_int(bits[:16])
+ bits = bits[16:]
+ d['destination_id'] = mk_int(bits[:16])
+ bits = bits[8:]
+ d['spare'] = mk_int(bits[:8])
+ status = bits[8:]
+ elif msg_type == 0x33: # STAT_RESP
+ assert len(bits) >= 64
+ d['msg_type'] = 'STAT_RESP'
+ bits = bits[8:]
+ d['option'] = mk_int(bits[:8])
+ bits = bits[8:]
+ d['call_type'] = mk_int(bits[:3])
+ d['call_option'] = mk_int(bits[3:8])
+ bits = bits[8:]
+ d['source id'] = mk_int(bits[:16])
+ bits = bits[16:]
+ d['destination_id'] = mk_int(bits[:16])
+ bits = bits[16:]
+ d['cause'] = mk_int(bits[:8])
+ elif msg_type == 0x38: # SDCALL_REQ_HEADER
+ assert len(bits) >= 64
+ d['msg_type'] = 'SDCALL_REQ_HEADER'
+ bits = bits[8:]
+ d['option'] = mk_int(bits[:8])
+ bits = bits[8:]
+ d['call_type'] = mk_int(bits[:3])
+ d['call_option'] = mk_int(bits[3:8])
+ bits = bits[8:]
+ d['source id'] = mk_int(bits[:16])
+ bits = bits[16:]
+ d['destination_id'] = mk_int(bits[:16])
+ bits = bits[16:]
+ d['cipher_type'] = mk_int(bits[:2])
+ d['key_id'] = mk_int(bits[2:8])
+ elif msg_type == 0x39: # SDCALL_REQ_USERDATA
+ assert len(bits) >= 64
+ d['msg_type'] = 'SDCALL_REQ_USERDATA'
+ bits = bits[8:]
+ d['packet_frame'] = mk_int(bits[:4])
+ d['block_number'] = mk_int(bits[4:8])
+ bits = bits[8:]
+ s = ''
+ while len(bits):
+ s += '%02x' % mk_int(bits[:8])
+ bits = bits[8:]
+ d['hexdata'] = s
+ elif msg_type == 0x3b: # SDCALL_RESP
+ assert len(bits) >= 64
+ d['msg_type'] = 'SDCALL_RESP'
+ bits = bits[8:]
+ d['option'] = mk_int(bits[:8])
+ bits = bits[8:]
+ d['call_type'] = mk_int(bits[:3])
+ d['call_option'] = mk_int(bits[3:8])
+ bits = bits[8:]
+ d['source id'] = mk_int(bits[:16])
+ bits = bits[16:]
+ d['destination_id'] = mk_int(bits[:16])
+ bits = bits[16:]
+ d['cause'] = mk_int(bits[:8])
+ bits = bits[8:]
+ else: # msg type unhandled
+ d['msg_type'] = 'UNSUPPORTED 0x%x' % (msg_type)
+ return d
diff --git a/op25/gr-op25_repeater/apps/op25-liq.service b/op25/gr-op25_repeater/apps/op25-liq.service
new file mode 100644
index 0000000..de485b6
--- /dev/null
+++ b/op25/gr-op25_repeater/apps/op25-liq.service
@@ -0,0 +1,15 @@
+[Unit]
+Description=op25-liq
+After=syslog.target network.target nss-lookup.target network-online.target
+Requires=network-online.target
+
+[Service]
+User=1000
+Group=1000
+WorkingDirectory=/home/pi/op25/op25/gr-op25_repeater/apps
+ExecStart=/usr/bin/liquidsoap op25.liq
+RestartSec=5
+Restart=on-failure
+
+[Install]
+WantedBy=multi-user.target
diff --git a/op25/gr-op25_repeater/apps/op25.liq b/op25/gr-op25_repeater/apps/op25.liq
new file mode 100755
index 0000000..b8fc31e
--- /dev/null
+++ b/op25/gr-op25_repeater/apps/op25.liq
@@ -0,0 +1,54 @@
+#!/usr/bin/liquidsoap
+
+# Example liquidsoap streaming from op25 to icecast
+# (c) 2019, 2020 gnorbury@bondcar.com, wllmbecks@gmail.com
+#
+
+set("log.stdout", true)
+set("log.file", false)
+set("log.level", 1)
+
+# Make the native sample rate compatible with op25
+set("frame.audio.samplerate", 8000)
+
+input = mksafe(input.external(buffer=0.02, channels=2, samplerate=8000, restart_on_error=false, "./audio.py -x 2 -s"))
+# Consider increasing the buffer value on slow systems such as RPi3. e.g. buffer=0.25
+# Longer buffer results in less choppy audio but at the expense of increased latency.
+
+
+
+# OPTIONAL AUDIO SIGNAL PROCESSING BLOCKS
+# Uncomment to enable
+#
+# High pass filter
+#input = filter.iir.butterworth.high(frequency = 200.0, order = 4, input)
+
+# Low pass filter
+#input = filter.iir.butterworth.low(frequency = 3250.0, order = 4, input)
+
+# Normalization
+#input = normalize(input, gain_max = 3.0, gain_min = -3.0, target = -16.0, threshold = -40.0)
+
+
+
+# LOCAL AUDIO OUTPUT
+# Uncomment the appropriate line below to enable local sound
+#
+# Default audio subsystem
+out (input)
+#
+# PulseAudio
+#output.pulseaudio(input)
+#
+# ALSA
+#output.alsa(input)
+
+
+
+# ICECAST STREAMING
+# Uncomment to enable output to an icecast server
+# Change the "host", "password", and "mount" strings appropriately first!
+# For metadata to work properly, the host address given here MUST MATCH the address in op25's meta.json file
+#
+#output.icecast(%mp3(bitrate=16, samplerate=22050, stereo=false), description="op25", genre="Public Safety", url="", fallible=false, icy_metadata="false", host="localhost", port=8000, mount="mountpoint", password="hackme", mean(input))
+
diff --git a/op25/gr-op25_repeater/apps/oplog/app.cfg b/op25/gr-op25_repeater/apps/oplog/app.cfg
new file mode 100644
index 0000000..23c026c
--- /dev/null
+++ b/op25/gr-op25_repeater/apps/oplog/app.cfg
@@ -0,0 +1,4 @@
+import os
+
+SQLALCHEMY_DATABASE_URI = 'sqlite:///%s/../op25-data.db' % (os.path.dirname(__file__))
+SQLALCHEMY_TRACK_MODIFICATIONS = False
diff --git a/op25/gr-op25_repeater/apps/oplog/op25/__init__.py b/op25/gr-op25_repeater/apps/oplog/op25/__init__.py
new file mode 100644
index 0000000..a0ddf99
--- /dev/null
+++ b/op25/gr-op25_repeater/apps/oplog/op25/__init__.py
@@ -0,0 +1,844 @@
+#! /usr/bin/env python
+
+# Copyright 2021 Max H. Parke KA1RBI, Michael Rose
+#
+# This file is part of OP25
+#
+# OP25 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 3, or (at your option)
+# any later version.
+#
+# OP25 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 OP25; see the file COPYING. If not, write to the Free
+# Software Foundation, Inc., 51 Franklin Street, Boston, MA
+# 02110-1301, USA.
+
+import time
+from time import sleep
+from time import gmtime, strftime
+import os
+from os import listdir
+from os.path import isfile, join
+import sys
+import traceback
+import math
+import json
+import click
+import datetime
+from datatables import ColumnDT, DataTables
+from flask import Flask, jsonify, render_template, request, redirect, session
+from flask_sqlalchemy import SQLAlchemy
+from sqlalchemy import func, desc, and_, or_, case, delete, insert, update, exc
+from sqlalchemy.orm import Query
+from sqlalchemy.exc import OperationalError
+import sqlalchemy.types as types
+from shutil import copyfile
+
+sys.path.append('..') # for emap
+from emap import oplog_map, cc_events, cc_desc
+
+app = Flask(__name__)
+app.config.from_pyfile("../app.cfg")
+app.config['SQLALCHEMY_ECHO'] = False # set to True to send sql statements to the console
+
+# enables session variables to be used
+app.secret_key = b'kH8HT0ucrh' # random bytes - this key not used anywhere else
+
+db = SQLAlchemy(app)
+# db.init_app(app)
+
+with app.app_context():
+ try:
+ db.reflect()
+ except OperationalError as e:
+ raise(e) # database is locked by another process
+
+class MyDateType(types.TypeDecorator):
+ impl = types.REAL
+ def process_result_value(self, value, dialect):
+ return datetime.datetime.fromtimestamp(value).strftime('%Y-%m-%d %H:%M:%S')
+
+class column_helper(object):
+ # convenience class - enables columns to be referenced as
+ # for example, Foo.bar instead of Foo['bar']
+ def __init__(self, table):
+ self.table_ = db.metadata.tables[table]
+ cols = self.table_.columns
+ for k in cols.keys():
+ setattr(self, k, cols[k])
+
+def dbstate():
+ database = app.config['SQLALCHEMY_DATABASE_URI'][10:]
+ if not os.path.isfile(database):
+ return 1 # db file does not exist
+ fs = os.path.getsize(database)
+ if fs < 1024:
+ return 2 # file size too small
+ DataStore = column_helper('data_store')
+ rows = db.session.query(DataStore.id).count()
+ if rows < 1:
+ return 4 # no rows present
+ return 0
+
+# clears the sm (successMessage) after being used in jinja
+def clear_sm():
+ session['sm'] = 0
+ return '' #must be an empty string or 'None' is displayed in the template
+
+def t_gmt():
+ t = time.strftime("%a, %d %b %Y %H:%M:%S", time.gmtime())
+ return t
+
+def t_loc():
+ t = strftime("%a, %d %b %Y %H:%M:%S %Z")
+ return t
+
+# make these functions available to jinja
+app.jinja_env.globals.update(t_gmt=t_gmt)
+app.jinja_env.globals.update(t_loc=t_loc)
+app.jinja_env.globals.update(clear_sm=clear_sm)
+
+# for displaying the db file size, shamelessly stolen from SO
+def convert_size(size_bytes):
+ if size_bytes == 0:
+ return "0 B"
+ size_name = ("B", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB")
+ i = int(math.floor(math.log(size_bytes, 1024)))
+ p = math.pow(1024, i)
+ s = round(size_bytes / p, 2)
+ return "%s %s" % (s, size_name[i])
+
+def dbStats():
+ DataStore = column_helper('data_store')
+ DataStore = column_helper('data_store')
+ SysIDTags = column_helper('sysid_tags')
+ DataStore.time.type = MyDateType()
+ rows = db.session.query(func.count(DataStore.id)).scalar()
+ if rows == 0:
+ return(0, 0, 0, 0, 0, 0, 0)
+
+ sys_count = db.session.query(DataStore.sysid) \
+ .distinct(DataStore.sysid) \
+ .group_by(DataStore.sysid) \
+ .filter(DataStore.sysid != 0) \
+ .count()
+
+ # TODO: talkgroups and subs should be distinct by system
+ talkgroups = db.session.query(DataStore.tgid) \
+ .distinct(DataStore.tgid) \
+ .group_by(DataStore.tgid) \
+ .count()
+
+ subs = db.session.query(DataStore.suid) \
+ .distinct(DataStore.suid) \
+ .group_by(DataStore.suid) \
+ .count()
+
+ firstRec = db.session.query(DataStore.time, func.min(DataStore.time)).scalar()
+ lastRec = db.session.query(DataStore.time, func.max(DataStore.time)).scalar()
+ f = app.config['SQLALCHEMY_DATABASE_URI'][10:] # db file name
+ dbsize = convert_size(os.path.getsize(f))
+ return(rows, sys_count, talkgroups, subs, firstRec, lastRec, dbsize, f)
+
+def sysList():
+ DataStore = column_helper('data_store')
+ rows = db.session.query(func.count(DataStore.id)).scalar()
+ if rows == 0:
+ return []
+ SysIDTags = column_helper('sysid_tags')
+ sysList = db.session.query(DataStore.sysid, SysIDTags.tag.label('tag')) \
+ .distinct(DataStore.sysid) \
+ .outerjoin(SysIDTags.table_, SysIDTags.sysid == DataStore.sysid) \
+ .filter(DataStore.sysid != 0)
+ return sysList
+
+def read_tsv(filename): # used by import_tsv and inspect_tsv, careful w/ changes
+ rows = []
+ with open(filename, 'r') as f:
+ lines = f.read().rstrip().split('\n')
+ for i in range(len(lines)):
+ a = lines[i].split('\t')
+ if i == 0: # check hdr
+ if not a[0].strip().isdigit():
+ continue
+ if not a[0].strip().isdigit(): # check each a[0] for wildcards and skip (continue) if wildcards found
+ continue
+ rid = int(a[0])
+ tag = a[1]
+ priority = 0 if len(a) < 3 else int(a[2])
+ s = (rid, tag, priority)
+ rows.append(s)
+ return rows
+
+def import_tsv(argv):
+ UnitIDTags = column_helper('unit_id_tags')
+ TGIDTags = column_helper('tgid_tags')
+ cmd = argv[1]
+ filename = argv[2]
+ sysid = int(argv[3])
+ if cmd == 'import_tgid':
+ tbl = TGIDTags
+ elif cmd == 'import_unit':
+ tbl = UnitIDTags
+ else:
+ print('%s unsupported' % (cmd))
+ return
+ rows = read_tsv(filename)
+ rm = 0 # records matched
+ nr = 0 # new records
+ dr = 0 # duplicate records
+ if len(rows):
+ for i in rows:
+ recCount = db.session.query(tbl.table_).where(and_(tbl.rid == i[0], tbl.sysid == argv[3])).count()
+ if recCount == 1:
+ # update record
+ q = update(tbl.table_) \
+ .where(and_(tbl.rid == i[0], tbl.sysid == argv[3])) \
+ .values(rid = int(i[0]), sysid = int(argv[3]), tag = i[1], priority = int(i[2]))
+ db.session.execute(q)
+ db.session.commit()
+ rm +=1
+ elif recCount == 0:
+ # insert record
+ q = insert(tbl.table_).values(rid = int(i[0]), sysid = int(argv[3]), tag = i[1], priority = int(i[2]))
+ db.session.execute(q)
+ db.session.commit()
+ nr += 1
+ else:
+ # delete all of the duplicates and insert new (duplicates break things)
+ print('command %s - db error - %s records for %s %s' % (cmd, recCount, i[0], i[1]))
+ delRec = delete(TGIDTags.table_).where(and_(tbl.rid == i[0], tbl.sysid == argv[3]))
+ db.session.execute(delRec)
+ db.session.commit()
+ q = insert(tbl.table_).values(rid = int(i[0]), sysid = int(argv[3]), tag = i[1], priority = int(i[2]))
+ db.session.execute(q)
+ db.session.commit()
+ dr += 1
+ return(rm, nr, dr)
+
+@app.route("/")
+def home():
+ ds = dbstate()
+ if ds != 0:
+ return redirect('error?code=%s' % ds)
+ params = request.args.to_dict()
+ params['ekeys'] = sorted(oplog_map.keys())
+ params['cc_desc'] = cc_desc
+ return render_template("home.html", project="op25", params=params, dbstats=dbStats(), sysList=sysList())
+
+@app.route("/about")
+def about():
+ ds = dbstate()
+ if ds != 0:
+ return redirect('error?code=%s' % ds)
+ params = request.args.to_dict()
+ params['ekeys'] = sorted(oplog_map.keys())
+ params['cc_desc'] = cc_desc
+ return render_template("about.html", project="op25", params=params, sysList=sysList())
+
+# error page for database errors
+@app.route("/error")
+def error_page():
+ params = request.args.to_dict()
+ params['file'] = app.config['SQLALCHEMY_DATABASE_URI'][10:]
+ return render_template("error.html", params=params, file=params['file'], code=int(params['code']))
+
+# Inspect TSV (import) - returns a table of the tsv for display in a div, accessed by ajax
+@app.route("/inspect")
+def inspect():
+ params = request.args.to_dict()
+ f = os.getcwd() + '/../' + params['file']
+ i = read_tsv(f)
+ return render_template("inspect.html", i=i)
+
+# edit and import tags
+@app.route("/edit_tags")
+def edit_tags():
+ UnitIDTags = column_helper('unit_id_tags')
+ TGIDTags = column_helper('tgid_tags')
+ SysIDTags = column_helper('sysid_tags')
+ params = request.args.to_dict()
+ params['ekeys'] = sorted(oplog_map.keys())
+ if 'cmd' not in params.keys(): # render talkgroup by default
+ params['cmd'] = 'tgid'
+ cmd = params['cmd']
+ session['cmd'] = cmd
+ systems = db.session.query(SysIDTags.sysid, SysIDTags.tag)
+ p = os.getcwd() + '/..'
+ tsvs = []
+ for root, dirs, files in os.walk(p, topdown=True):
+ for file in files:
+ if file.endswith(".tsv") and not file.startswith("._"):
+ print(os.path.join(root, file))
+ tsvs.append(os.path.join(root, file))
+ tsvs.sort()
+ return render_template("edit_tags.html", params=params, systems=systems, sysList=sysList(), p=p, cmd=cmd, tsvs=tsvs)
+
+# data for tags table editor
+@app.route("/edittg")
+def edittg():
+ params = request.args.to_dict()
+ params['ekeys'] = sorted(oplog_map.keys())
+ cmd = params['cmd']
+ sysid = int(params['sysid'])
+ UnitIDTags = column_helper('unit_id_tags')
+ TGIDTags = column_helper('tgid_tags')
+ SysIDTags = column_helper('sysid_tags')
+ if cmd == 'tgid':
+ tbl = TGIDTags
+ if cmd == 'unit':
+ tbl = UnitIDTags
+ column_d = {
+ 'tgid': [
+ ColumnDT(TGIDTags.id),
+ ColumnDT(TGIDTags.sysid),
+ ColumnDT(TGIDTags.rid),
+ ColumnDT(TGIDTags.tag),
+ ColumnDT(TGIDTags.id)
+ ],
+ 'unit': [
+ ColumnDT(UnitIDTags.id),
+ ColumnDT(UnitIDTags.sysid),
+ ColumnDT(UnitIDTags.rid),
+ ColumnDT(UnitIDTags.tag),
+ ColumnDT(UnitIDTags.id)
+ ]
+ }
+ q = db.session.query(tbl.id, tbl.sysid, tbl.rid, tbl.tag).order_by(tbl.rid)
+ if sysid != 0:
+ q = q.filter(tbl.sysid == sysid)
+ rowTable = DataTables(params, q, column_d[cmd])
+ js = jsonify(rowTable.output_result())
+ return js
+
+#dtd = delete tag data
+@app.route("/dtd")
+def dtd():
+ params = request.args.to_dict()
+ params['ekeys'] = sorted(oplog_map.keys())
+ cmd = params['cmd']
+ UnitIDTags = column_helper('unit_id_tags')
+ TGIDTags = column_helper('tgid_tags')
+ SysIDTags = column_helper('sysid_tags')
+ recId = params['id']
+ if cmd == 'tgid':
+ tbl = TGIDTags
+ if cmd == 'unit':
+ tbl = UnitIDTags
+ delRec = delete(tbl.table_).where(tbl.id == recId)
+ db.session.execute(delRec)
+ db.session.commit()
+ session['sm'] = 2
+ return redirect('/edit_tags?cmd=' + cmd)
+
+#utd = update tag data
+@app.route("/utd")
+def utd():
+ params = request.args.to_dict()
+ params['ekeys'] = sorted(oplog_map.keys())
+ cmd = params['cmd']
+ UnitIDTags = column_helper('unit_id_tags')
+ TGIDTags = column_helper('tgid_tags')
+ SysIDTags = column_helper('sysid_tags')
+ recId = params['id']
+ tag = params['tag']
+ if cmd == 'tgid':
+ tbl = TGIDTags
+ if cmd == 'unit':
+ tbl = UnitIDTags
+ upRec = update(tbl.table_).where(tbl.id == recId).values(tag=tag)
+ db.session.execute(upRec)
+ db.session.commit()
+ session['sm'] = 1
+ return redirect('/edit_tags?cmd=' + cmd)
+
+# import tags
+@app.route("/itt")
+def itt():
+ params = request.args.to_dict()
+ params['ekeys'] = sorted(oplog_map.keys())
+ cmd = params['cmd']
+ argv = [ None, 'import_' + cmd, os.getcwd() + '/../' + params['file'], params['sysid'] ]
+ session['imp_results'] = import_tsv(argv)
+ session['sm'] = 3
+ return redirect('/edit_tags?cmd=' + cmd)
+
+# delete all talkgroup/subscriber tags
+@app.route("/delTags")
+def delTags():
+ params = request.args.to_dict()
+ params['ekeys'] = sorted(oplog_map.keys())
+ cmd = params['cmd']
+ UnitIDTags = column_helper('unit_id_tags')
+ TGIDTags = column_helper('tgid_tags')
+ SysIDTags = column_helper('sysid_tags')
+ sysid = params['sysid']
+ if cmd == 'tgid':
+ tbl = TGIDTags
+ if cmd == 'unit':
+ tbl = UnitIDTags
+ delRec = delete(tbl.table_).where(tbl.sysid == sysid)
+ db.session.execute(delRec)
+ db.session.commit()
+ db.session.execute("VACUUM") # sqlite3 clean up -- reduces file size
+ session['sm'] = 4
+ return redirect('/edit_tags?cmd=' + cmd)
+
+# system tag editor functions (entirely separate from the tags editor above)
+@app.route("/editsys")
+def editsys():
+ params = request.args.to_dict()
+ params['ekeys'] = sorted(oplog_map.keys())
+ params['cc_desc'] = cc_desc
+ SysIDTags = column_helper('sysid_tags')
+ systems = db.session.query(SysIDTags.sysid, SysIDTags.tag)
+ return render_template("editsys.html", params=params, systems=systems, sysList=sysList())
+
+#dsd = delete system data
+@app.route("/dsd")
+def dsd():
+ params = request.args.to_dict()
+ SysIDTags = column_helper('sysid_tags')
+ recId = params['id']
+ delRec = delete(SysIDTags.table_).where(SysIDTags.id == recId)
+ db.session.execute(delRec)
+ db.session.commit()
+ return redirect('/editsys')
+
+#usd = update system data
+@app.route("/usd")
+def usd():
+ params = request.args.to_dict()
+ SysIDTags = column_helper('sysid_tags')
+ recId = params['id']
+ tag = params['tag']
+ upRec = update(SysIDTags.table_).where(SysIDTags.id == recId).values(tag=tag)
+ db.session.execute(upRec)
+ db.session.commit()
+ return redirect('/editsys')
+
+#esd = edit system data (system tags)
+@app.route("/esd")
+def esd():
+ params = request.args.to_dict()
+ SysIDTags = column_helper('sysid_tags')
+ column_d = {
+ 's': [
+ ColumnDT(SysIDTags.id),
+ ColumnDT(SysIDTags.sysid),
+ ColumnDT(SysIDTags.tag),
+ ColumnDT(SysIDTags.id)
+ ]
+ }
+ q = db.session.query(SysIDTags.id, SysIDTags.sysid, SysIDTags.tag)
+ rowTable = DataTables(params, q, column_d['s'])
+ js = jsonify(rowTable.output_result())
+ return js
+
+#asd = add system data
+@app.route("/asd")
+def asd():
+ params = request.args.to_dict()
+ ns = params['id']
+ nt = params['tag']
+ #todo: validate input
+ SysIDTags = column_helper('sysid_tags')
+ insRec = insert(SysIDTags.table_).values(sysid=ns, tag=nt)
+ db.session.execute(insRec)
+ db.session.commit()
+ return redirect('/editsys')
+
+# purge database functions
+@app.route("/purge")
+def purge():
+ params = request.args.to_dict()
+ params['ekeys'] = sorted(oplog_map.keys())
+ DataStore = column_helper('data_store')
+ destfile = ''
+ b = False
+ if 'bu' in params.keys():
+ if params['bu'] == 'true':
+ b = True
+ t = strftime("%Y%m%d_%H%M%S")
+ destfile = 'op25-backup-%s.db' % t
+ src = app.config['SQLALCHEMY_DATABASE_URI'][10:]
+ s = src.split('/')
+ f = s[-1]
+ dst = src.replace(f, destfile)
+ if 'simulate' in params.keys():
+ simulate = params['simulate']
+ if 'action' in params.keys():
+ if params['action'] == 'purge':
+ sd = params['sd']
+ ed = params['ed']
+ sysid = int(params['sysid'])
+ delRec = delete(DataStore.table_).where(DataStore.time >= int(sd), DataStore.time <= int(ed))
+ recCount = db.session.query(DataStore.id).filter(and_(DataStore.time >= int(sd), DataStore.time <= int(ed)))
+ if sysid != 0:
+ recCount = recCount.filter(DataStore.sysid == sysid)
+ delRec = delRec.where(DataStore.sysid == sysid)
+ if 'kv' in params.keys(): # keep voice calls
+ if params['kv'] == 'true':
+ recCount = recCount.where(and_(DataStore.opcode != 0, DataStore.opcode != 2))
+ delRec = delRec.where(and_(DataStore.opcode != 0, DataStore.opcode != 2))
+ recCount = recCount.count()
+ dispQuery = delRec.compile(compile_kwargs={"literal_binds": True})
+ if simulate == 'false':
+ if b == True:
+ copyfile(src, dst)
+ db.session.execute(delRec)
+ db.session.commit()
+ db.session.execute("VACUUM") # sqlite3 clean up -- reduces file size
+ successMessage = 1
+ else:
+ successMessage = 2
+ else:
+ recCount = 0
+ successMessage = 0
+ dispQuery = ''
+
+ return render_template("purge.html", \
+ project="op25", \
+ params=params, \
+ dbstats=dbStats(), \
+ sysList=sysList(), \
+ successMessage=successMessage, \
+ recCount=recCount, \
+ dispQuery=dispQuery, \
+ destfile=destfile )
+
+# displays all logs w/ datatables
+@app.route("/logs")
+def logs():
+ UnitIDTags = column_helper('unit_id_tags')
+ TGIDTags = column_helper('tgid_tags')
+ tag = ''
+ params = request.args.to_dict()
+ params['ekeys'] = oplog_map.keys()
+ params['cc_desc'] = cc_desc
+ t = None if 'q' not in params.keys() else params['q']
+ sysid = 0 if 'sysid' not in params.keys() else int(params['sysid'])
+ if sysid != 0:
+ if t is not None and params['r'] == 'tgid':
+ q = db.session.query(TGIDTags.tag).where(and_(TGIDTags.rid == t, TGIDTags.sysid == sysid))
+ if t is not None and params['r'] == 'su':
+ q = db.session.query(UnitIDTags.tag).where(and_(UnitIDTags.rid == t, UnitIDTags.sysid == sysid))
+ if q.count() > 0:
+ tg = (db.session.execute(q).one())
+ tag = (' - %s' % tg.tag)
+ if params['r'] == 'cc_event':
+ mapl = oplog_map[params['p'].strip()]
+ params['ckeys'] = [s[1] for s in mapl if s[0] != 'opcode' and s[0] != 'cc_event']
+
+ return render_template("logs.html", \
+ project="logs", \
+ params=params, \
+ sysList=sysList(), \
+ tag=tag )
+
+# data for /logs
+@app.route("/data")
+def data():
+ """Return server side data."""
+ # GET parameters
+ params = request.args.to_dict()
+
+ host_rid = None if 'host_rid' not in params.keys() else params['host_rid']
+ host_function_type = None if 'host_function_type' not in params.keys() else params['host_function_type']
+ host_function_param = None if 'host_function_param' not in params.keys() else params['host_function_param'].strip()
+
+ filter_tgid = None if 'tgid' not in params.keys() else int(params['tgid'].strip())
+ filter_suid = None if 'suid' not in params.keys() else int(params['suid'].strip())
+
+ start_time = None if 'sdate' not in params.keys() else datetime.datetime.utcfromtimestamp(float(params['sdate']))
+ end_time = None if 'edate' not in params.keys() else datetime.datetime.utcfromtimestamp(float(params['edate']))
+ print(params)
+ sysid = None if 'sysid' not in params.keys() else int(params['sysid'])
+
+ stime = int(params['sdate']) #used in the queries
+ etime = int(params['edate']) #used in the queries
+
+ DataStore = column_helper('data_store')
+ EventKeys = column_helper('event_keys')
+ SysIDTags = column_helper('sysid_tags')
+ UnitIDTags = column_helper('unit_id_tags')
+ TGIDTags = column_helper('tgid_tags')
+ LocRegResp = column_helper('loc_reg_resp_rv')
+
+ DataStore.time.type = MyDateType()
+
+ k = 'logs'
+ if host_function_type:
+ k = '%s_%s' % (k, host_function_type)
+
+ column_d = {
+ 'logs_su': [
+ ColumnDT(TGIDTags.tag),
+ ColumnDT(DataStore.tgid),
+ ColumnDT(DataStore.tgid),
+ ],
+ 'logs_tgid': [
+ ColumnDT(DataStore.suid),
+ ColumnDT(UnitIDTags.tag),
+ ColumnDT(DataStore.suid),
+ ColumnDT(DataStore.time)
+ ],
+
+ 'logs_calls': [
+ ColumnDT(DataStore.time),
+ ColumnDT(SysIDTags.tag),
+ ColumnDT(DataStore.tgid),
+ ColumnDT(TGIDTags.tag),
+ ColumnDT(DataStore.frequency),
+ ColumnDT(DataStore.suid)
+ ],
+ 'logs_joins': [
+ ColumnDT(DataStore.time),
+ ColumnDT(DataStore.opcode),
+ ColumnDT(DataStore.sysid),
+ ColumnDT(SysIDTags.tag),
+ ColumnDT(LocRegResp.tag),
+ ColumnDT(DataStore.tgid),
+ ColumnDT(TGIDTags.tag),
+ ColumnDT(DataStore.suid),
+ ColumnDT(UnitIDTags.tag)
+ ],
+ 'logs_total_tgid': [
+ ColumnDT(DataStore.sysid),
+ ColumnDT(SysIDTags.tag),
+ ColumnDT(DataStore.tgid),
+ ColumnDT(TGIDTags.tag),
+ ColumnDT(DataStore.tgid)
+ ],
+ 'logs_call_detail': [
+ ColumnDT(DataStore.time),
+ ColumnDT(DataStore.opcode),
+ ColumnDT(SysIDTags.sysid),
+ ColumnDT(SysIDTags.tag),
+ ColumnDT(DataStore.tgid),
+ ColumnDT(TGIDTags.tag),
+ ColumnDT(DataStore.suid),
+ ColumnDT(UnitIDTags.tag),
+ ColumnDT(DataStore.frequency)
+ ]
+ }
+
+ """or_( EventKeys.tag == 'grp_v_ch_grant', EventKeys.tag == 'grp_v_ch_grant_exp'),"""
+
+ query_d = {
+ 'logs_total_tgid': db.session.query(DataStore.sysid, \
+ SysIDTags.tag, \
+ DataStore.tgid, \
+ TGIDTags.tag, \
+ func.count(DataStore.tgid).label('count'))
+ .group_by(DataStore.tgid)
+ .outerjoin(SysIDTags.table_, DataStore.sysid == SysIDTags.sysid)
+ .outerjoin(TGIDTags.table_, DataStore.tgid == TGIDTags.rid)
+ .filter(and_(DataStore.tgid != 0), (DataStore.frequency != None) ),
+
+ 'logs_call_detail': db.session.query(DataStore.time, \
+ DataStore.opcode, \
+ DataStore.sysid, \
+ SysIDTags.tag, \
+ DataStore.tgid, \
+ TGIDTags.tag, \
+ DataStore.suid, \
+ UnitIDTags.tag, \
+ DataStore.frequency )
+ .outerjoin(SysIDTags.table_, DataStore.sysid == SysIDTags.sysid)
+ .outerjoin(TGIDTags.table_, and_(DataStore.tgid == TGIDTags.rid, DataStore.sysid == TGIDTags.sysid))
+ .outerjoin(UnitIDTags.table_, and_(DataStore.suid == UnitIDTags.rid, DataStore.sysid == UnitIDTags.sysid))
+ .filter(and_(DataStore.tgid != 0), (DataStore.frequency != None) )
+ .filter(or_(DataStore.opcode == 0, and_(DataStore.opcode == 2, DataStore.mfrid == 144)) ),
+
+
+ 'logs_tgid': db.session.query(DataStore.suid, \
+ UnitIDTags.tag, \
+ func.count(DataStore.suid).label('count'), func.max(DataStore.time).label('last') )
+ .outerjoin(UnitIDTags.table_, and_(DataStore.suid == UnitIDTags.rid, DataStore.sysid == UnitIDTags.sysid)),
+
+ 'logs_su': db.session.query(TGIDTags.tag, \
+ DataStore.tgid, \
+ func.count(DataStore.tgid).label('count') )
+ .outerjoin(TGIDTags.table_, DataStore.tgid == TGIDTags.rid),
+
+ 'logs_calls': db.session.query(DataStore.time, \
+ SysIDTags.tag, \
+ DataStore.tgid, \
+ TGIDTags.tag, \
+ DataStore.frequency, \
+ DataStore.suid )
+ .join(EventKeys.table_, and_(or_( EventKeys.tag == 'grp_v_ch_grant', EventKeys.tag == 'grp_v_ch_grant_mbt'),EventKeys.id == DataStore.cc_event))
+ .outerjoin(TGIDTags.table_, and_(TGIDTags.rid == DataStore.tgid, TGIDTags.sysid == DataStore.sysid))
+ .outerjoin(SysIDTags.table_, DataStore.sysid == SysIDTags.sysid),
+
+ 'logs_joins': db.session.query(DataStore.time, \
+ DataStore.opcode, \
+ DataStore.sysid, \
+ SysIDTags.tag, \
+ LocRegResp.tag, \
+ DataStore.tgid, \
+ TGIDTags.tag, \
+ DataStore.suid, \
+ UnitIDTags.tag )
+ .join(LocRegResp.table_, DataStore.p == LocRegResp.rv)
+ .outerjoin(SysIDTags.table_, DataStore.sysid == SysIDTags.sysid)
+ .outerjoin(TGIDTags.table_, and_(DataStore.tgid == TGIDTags.rid, DataStore.sysid == TGIDTags.sysid))
+ .outerjoin(UnitIDTags.table_, and_(DataStore.suid == UnitIDTags.rid, DataStore.sysid == UnitIDTags.sysid))
+ .filter(or_(DataStore.opcode == 40, DataStore.opcode == 43)) # joins
+ } # end query_d
+
+ if host_function_type != 'cc_event':
+ q = query_d[k]
+
+ if host_function_type in 'su tgid'.split():
+ filter_col = {'su': DataStore.suid, 'tgid': DataStore.tgid}
+ group_col = {'su': DataStore.tgid, 'tgid': DataStore.suid}
+ if '?' in host_rid:
+ id_start = int(host_rid.replace('?', '0'))
+ id_end = int(host_rid.replace('?', '9'))
+ q = q.filter(filter_col[host_function_type] >= id_start, filter_col[host_function_type] <= id_end)
+ elif '-' in host_rid:
+ id_start, id_end = host_rid.split('-')
+ id_start = int(id_start)
+ id_end = int(id_end)
+ q = q.filter(filter_col[host_function_type] >= id_start, filter_col[host_function_type] <= id_end)
+ else:
+ q = q.filter(filter_col[host_function_type] == int(host_rid))
+ q = q.group_by(group_col[host_function_type])
+ q = q.filter(DataStore.suid != None)
+
+ dt_cols = {
+ 'logs_tgid' : [ DataStore.suid, UnitIDTags.tag, 'count' ],
+ 'logs_su' : [ TGIDTags.tag, DataStore.tgid, 'count' ],
+ 'logs_calls' : [ DataStore.time, SysIDTags.tag, DataStore.tgid, TGIDTags.tag, DataStore.frequency, DataStore.suid ],
+ 'logs_joins' : [ DataStore.time, SysIDTags.tag, LocRegResp.tag, TGIDTags.tag, DataStore.suid ],
+ 'logs_total_tgid' : [ DataStore.sysid, SysIDTags.tag, DataStore.tgid, TGIDTags.tag, 'count' ]
+ }
+
+ if host_function_type == 'cc_event':
+ mapl = oplog_map[host_function_param]
+ columns = []
+ for row in mapl:
+ col = getattr(DataStore, row[0])
+ if row[0] == 'sysid':
+ col = SysIDTags.tag
+ elif row[1] == 'Talkgroup':
+ col = TGIDTags.tag
+ elif row[1] == 'Source' or row[1] == 'Target':
+ col = UnitIDTags.tag
+ elif row[0] == 'cc_event':
+ continue
+ #col = EventKeys.tag
+ elif row[0] == 'opcode':
+ continue
+ elif host_function_param == 'loc_reg_resp' and row[0] == 'p':
+ col = LocRegResp.tag
+ columns.append(col)
+
+ column_dt = [ColumnDT(s) for s in columns]
+
+ q = db.session.query(*columns
+ ).join(
+ EventKeys.table_, and_( EventKeys.tag == host_function_param, EventKeys.id == DataStore.cc_event)
+ ).outerjoin(
+ SysIDTags.table_, DataStore.sysid == SysIDTags.sysid
+ )
+ if host_function_param == 'grp_aff_resp':
+ q = q.outerjoin(
+ TGIDTags.table_, and_(DataStore.tgid2 == TGIDTags.rid, DataStore.sysid == TGIDTags.sysid)
+ ).outerjoin(
+ UnitIDTags.table_, and_(DataStore.suid == UnitIDTags.rid, DataStore.sysid == UnitIDTags.sysid)
+ )
+
+ elif host_function_param == 'ack_resp_fne' or host_function_param == 'grp_aff_q' or host_function_param == 'u_reg_cmd':
+ q = q.outerjoin(
+ TGIDTags.table_, and_(DataStore.tgid2 == TGIDTags.rid, DataStore.sysid == TGIDTags.sysid)
+ ).outerjoin(
+ UnitIDTags.table_, and_(DataStore.suid2 == UnitIDTags.rid, DataStore.sysid == UnitIDTags.sysid)
+ )
+ else:
+ q = q.outerjoin(
+ TGIDTags.table_, and_(DataStore.tgid == TGIDTags.rid, DataStore.sysid == TGIDTags.sysid)
+ ).outerjoin(
+ UnitIDTags.table_, and_(DataStore.suid == UnitIDTags.rid, DataStore.sysid == UnitIDTags.sysid)
+ )
+
+ if host_function_param == 'loc_reg_resp':
+ q = q.join(LocRegResp.table_, LocRegResp.rv == DataStore.p)
+
+ if host_function_type == 'cc_event':
+ cl = columns
+ elif k in dt_cols:
+ cl = dt_cols[k]
+ else:
+ cl = None
+
+ # apply tgid and suid filters if present
+ if host_function_type == 'cc_event':
+ if filter_tgid is not None and int(filter_tgid) != 0:
+ q = q.filter(DataStore.tgid == filter_tgid)
+ if filter_suid is not None and int(filter_suid) != 0:
+ q = q.filter(DataStore.suid == filter_suid)
+
+ if cl:
+ c = int(params['order[0][column]'])
+ d = params['order[0][dir]'] # asc or desc
+ if d == 'asc':
+ q = q.order_by(cl[c])
+ else:
+ q = q.order_by(desc(cl[c]))
+
+ q = q.filter(and_(DataStore.time >= int(stime), DataStore.time <= int(etime)))
+
+ if sysid != 0:
+ q = q.filter(DataStore.sysid == sysid)
+
+ if host_function_type == 'cc_event':
+ rowTable = DataTables(params, q, column_dt)
+ else:
+ rowTable = DataTables(params, q, column_d[k])
+
+ js = jsonify(rowTable.output_result())
+# j= 'skipped' # json.dumps(rowTable.output_result(), indent=4, separators=[',', ':'], sort_keys=True)
+# with open('data-log', 'a') as logf:
+# s = '\n\t'.join(['%s:%s' % (k, params[k]) for k in params.keys()])
+# logf.write('keys: %s\n' % (' '.join(params.keys())))
+# logf.write('params:\n\t%s\nrequest: %s\n' % (s, function_req))
+# logf.write('%s\n' % j)
+ return js
+
+# switch and backup database file
+@app.route("/switch_db")
+def switch_db():
+ params = request.args.to_dict()
+ params['ekeys'] = sorted(oplog_map.keys())
+ p = os.getcwd() + '/..'
+ files = [f for f in listdir(p) if isfile(join(p, f))]
+ files.sort()
+ if 'cmd' not in params.keys():
+ curr_file = app.config['SQLALCHEMY_DATABASE_URI'].split('/')[-1]
+ return render_template("switch_db.html", params=params, files=files, curr_file=curr_file)
+ if params['cmd'] == 'backup':
+ t = strftime("%Y-%m-%d_%H%M%S")
+ destfile = 'op25-backup-%s.db' % t
+ src = app.config['SQLALCHEMY_DATABASE_URI'][10:]
+ s = src.split('/')
+ curr_file = s[-1]
+ dst = src.replace(curr_file, destfile)
+ copyfile(src, dst)
+ return render_template("switch_db.html", params=params, destfile=destfile, curr_file=curr_file, files=files, sm=1)
+ if params['cmd'] == 'switch':
+ new_f = params['file']
+ database = app.config['SQLALCHEMY_DATABASE_URI']
+ f = database.split('/')[-1]
+ new_db = database.replace(f, new_f)
+ print('switching database to: %s' % new_db)
+ app.config['SQLALCHEMY_DATABASE_URI'] = new_db
+ return redirect('/')
diff --git a/op25/gr-op25_repeater/apps/oplog/op25/static/css/bootstrap/bootstrap-darkly.css b/op25/gr-op25_repeater/apps/oplog/op25/static/css/bootstrap/bootstrap-darkly.css
new file mode 100644
index 0000000..b03944b
--- /dev/null
+++ b/op25/gr-op25_repeater/apps/oplog/op25/static/css/bootstrap/bootstrap-darkly.css
@@ -0,0 +1,11038 @@
+/*!
+ * Bootswatch v5.0.1
+ * Homepage: https://bootswatch.com
+ * Copyright 2012-2021 Thomas Park
+ * Licensed under MIT
+ * Based on Bootstrap
+*/
+/*!
+ * Bootstrap v5.0.1 (https://getbootstrap.com/)
+ * Copyright 2011-2021 The Bootstrap Authors
+ * Copyright 2011-2021 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
+ */
+/* @import url("https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,400;0,700;1,400&display=swap"); */
+:root {
+ --bs-blue: #375a7f;
+ --bs-indigo: #6610f2;
+ --bs-purple: #6f42c1;
+ --bs-pink: #e83e8c;
+ --bs-red: #e74c3c;
+ --bs-orange: #fd7e14;
+ --bs-yellow: #f39c12;
+ --bs-green: #00bc8c;
+ --bs-teal: #20c997;
+ --bs-cyan: #3498db;
+ --bs-white: #fff;
+ --bs-gray: #888;
+ --bs-gray-dark: #303030;
+ --bs-primary: #375a7f;
+ --bs-secondary: #444;
+ --bs-success: #00bc8c;
+ --bs-info: #3498db;
+ --bs-warning: #f39c12;
+ --bs-danger: #e74c3c;
+ --bs-light: #adb5bd;
+ --bs-dark: #303030;
+ --bs-font-sans-serif: Lato, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
+ --bs-font-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
+ --bs-gradient: linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0));
+}
+
+*,
+*::before,
+*::after {
+ box-sizing: border-box;
+}
+
+@media (prefers-reduced-motion: no-preference) {
+ :root {
+ scroll-behavior: smooth;
+ }
+}
+
+body {
+ margin: 0;
+ font-family: var(--bs-font-sans-serif);
+ font-size: 1rem;
+ font-weight: 400;
+ line-height: 1.5;
+ color: #fff;
+ background-color: #060606;
+ -webkit-text-size-adjust: 100%;
+ -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
+}
+
+
+.navbar-right {
+ float: right !important;
+ margin-right: -15px;
+ }
+
+
+hr {
+ margin: 1rem 0;
+ color: inherit;
+ background-color: currentColor;
+ border: 0;
+ opacity: 0.25;
+}
+
+hr:not([size]) {
+ height: 1px;
+}
+
+h1, .h1, h2, .h2, h3, .h3, h4, .h4, h5, .h5, h6, .h6 {
+ margin-top: 0;
+ margin-bottom: 0.5rem;
+ font-weight: 500;
+ line-height: 1.2;
+}
+
+h1, .h1 {
+ font-size: calc(1.425rem + 2.1vw);
+}
+
+@media (min-width: 1200px) {
+ h1, .h1 {
+ font-size: 3rem;
+ }
+}
+
+h2, .h2 {
+ font-size: calc(1.375rem + 1.5vw);
+}
+
+@media (min-width: 1200px) {
+ h2, .h2 {
+ font-size: 2.5rem;
+ }
+}
+
+h3, .h3 {
+ font-size: calc(1.325rem + 0.9vw);
+}
+
+@media (min-width: 1200px) {
+ h3, .h3 {
+ font-size: 2rem;
+ }
+}
+
+h4, .h4 {
+ font-size: calc(1.275rem + 0.3vw);
+}
+
+@media (min-width: 1200px) {
+ h4, .h4 {
+ font-size: 1.5rem;
+ }
+}
+
+h5, .h5 {
+ font-size: 1.25rem;
+}
+
+h6, .h6 {
+ font-size: 1rem;
+}
+
+p {
+ margin-top: 0;
+ margin-bottom: 1rem;
+}
+
+abbr[title],
+abbr[data-bs-original-title] {
+ -webkit-text-decoration: underline dotted;
+ text-decoration: underline dotted;
+ cursor: help;
+ -webkit-text-decoration-skip-ink: none;
+ text-decoration-skip-ink: none;
+}
+
+address {
+ margin-bottom: 1rem;
+ font-style: normal;
+ line-height: inherit;
+}
+
+ol,
+ul {
+ padding-left: 2rem;
+}
+
+ol,
+ul,
+dl {
+ margin-top: 0;
+ margin-bottom: 1rem;
+}
+
+ol ol,
+ul ul,
+ol ul,
+ul ol {
+ margin-bottom: 0;
+}
+
+dt {
+ font-weight: 700;
+}
+
+dd {
+ margin-bottom: .5rem;
+ margin-left: 0;
+}
+
+blockquote {
+ margin: 0 0 1rem;
+}
+
+b,
+strong {
+ font-weight: bolder;
+}
+
+small, .small {
+ font-size: 0.875em;
+}
+
+mark, .mark {
+ padding: 0.2em;
+ background-color: #fcf8e3;
+}
+
+sub,
+sup {
+ position: relative;
+ font-size: 0.75em;
+ line-height: 0;
+ vertical-align: baseline;
+}
+
+sub {
+ bottom: -.25em;
+}
+
+sup {
+ top: -.5em;
+}
+
+a {
+ color: #00bc8c;
+ text-decoration: underline;
+}
+
+a:hover {
+ color: #009670;
+}
+
+a:not([href]):not([class]), a:not([href]):not([class]):hover {
+ color: inherit;
+ text-decoration: none;
+}
+
+pre,
+code,
+kbd,
+samp {
+ font-family: var(--bs-font-monospace);
+ font-size: 1em;
+ direction: ltr /* rtl:ignore */;
+ unicode-bidi: bidi-override;
+}
+
+pre {
+ display: block;
+ margin-top: 0;
+ margin-bottom: 1rem;
+ overflow: auto;
+ font-size: 0.875em;
+ color: inherit;
+}
+
+pre code {
+ font-size: inherit;
+ color: inherit;
+ word-break: normal;
+}
+
+code {
+ font-size: 0.875em;
+ color: #e83e8c;
+ word-wrap: break-word;
+}
+
+a > code {
+ color: inherit;
+}
+
+kbd {
+ padding: 0.2rem 0.4rem;
+ font-size: 0.875em;
+ color: #fff;
+ background-color: #222;
+ border-radius: 0.2rem;
+}
+
+kbd kbd {
+ padding: 0;
+ font-size: 1em;
+ font-weight: 700;
+}
+
+figure {
+ margin: 0 0 1rem;
+}
+
+img,
+svg {
+ vertical-align: middle;
+}
+
+table {
+ caption-side: bottom;
+ border-collapse: collapse;
+}
+
+caption {
+ padding-top: 0.5rem;
+ padding-bottom: 0.5rem;
+ color: #888;
+ text-align: left;
+}
+
+th {
+ text-align: inherit;
+ text-align: -webkit-match-parent;
+}
+
+thead,
+tbody,
+tfoot,
+tr,
+td,
+th {
+ border-color: inherit;
+ border-style: solid;
+ border-width: 0;
+}
+
+label {
+ display: inline-block;
+}
+
+button {
+ border-radius: 0;
+}
+
+button:focus:not(:focus-visible) {
+ outline: 0;
+}
+
+input,
+button,
+select,
+optgroup,
+textarea {
+ margin: 0;
+ font-family: inherit;
+ font-size: inherit;
+ line-height: inherit;
+}
+
+button,
+select {
+ text-transform: none;
+}
+
+[role="button"] {
+ cursor: pointer;
+}
+
+select {
+ word-wrap: normal;
+}
+
+select:disabled {
+ opacity: 1;
+}
+
+[list]::-webkit-calendar-picker-indicator {
+ display: none;
+}
+
+button,
+[type="button"],
+[type="reset"],
+[type="submit"] {
+ -webkit-appearance: button;
+}
+
+button:not(:disabled),
+[type="button"]:not(:disabled),
+[type="reset"]:not(:disabled),
+[type="submit"]:not(:disabled) {
+ cursor: pointer;
+}
+
+::-moz-focus-inner {
+ padding: 0;
+ border-style: none;
+}
+
+textarea {
+ resize: vertical;
+}
+
+fieldset {
+ min-width: 0;
+ padding: 0;
+ margin: 0;
+ border: 0;
+}
+
+legend {
+ float: left;
+ width: 100%;
+ padding: 0;
+ margin-bottom: 0.5rem;
+ font-size: calc(1.275rem + 0.3vw);
+ line-height: inherit;
+}
+
+@media (min-width: 1200px) {
+ legend {
+ font-size: 1.5rem;
+ }
+}
+
+legend + * {
+ clear: left;
+}
+
+::-webkit-datetime-edit-fields-wrapper,
+::-webkit-datetime-edit-text,
+::-webkit-datetime-edit-minute,
+::-webkit-datetime-edit-hour-field,
+::-webkit-datetime-edit-day-field,
+::-webkit-datetime-edit-month-field,
+::-webkit-datetime-edit-year-field {
+ padding: 0;
+}
+
+::-webkit-inner-spin-button {
+ height: auto;
+}
+
+[type="search"] {
+ outline-offset: -2px;
+ -webkit-appearance: textfield;
+}
+
+/* rtl:raw:
+[type="tel"],
+[type="url"],
+[type="email"],
+[type="number"] {
+ direction: ltr;
+}
+*/
+::-webkit-search-decoration {
+ -webkit-appearance: none;
+}
+
+::-webkit-color-swatch-wrapper {
+ padding: 0;
+}
+
+::file-selector-button {
+ font: inherit;
+}
+
+::-webkit-file-upload-button {
+ font: inherit;
+ -webkit-appearance: button;
+}
+
+output {
+ display: inline-block;
+}
+
+iframe {
+ border: 0;
+}
+
+summary {
+ display: list-item;
+ cursor: pointer;
+}
+
+progress {
+ vertical-align: baseline;
+}
+
+[hidden] {
+ display: none !important;
+}
+
+.lead {
+ font-size: 1.25rem;
+ font-weight: 300;
+}
+
+.display-1 {
+ font-size: calc(1.625rem + 4.5vw);
+ font-weight: 300;
+ line-height: 1.2;
+}
+
+@media (min-width: 1200px) {
+ .display-1 {
+ font-size: 5rem;
+ }
+}
+
+.display-2 {
+ font-size: calc(1.575rem + 3.9vw);
+ font-weight: 300;
+ line-height: 1.2;
+}
+
+@media (min-width: 1200px) {
+ .display-2 {
+ font-size: 4.5rem;
+ }
+}
+
+.display-3 {
+ font-size: calc(1.525rem + 3.3vw);
+ font-weight: 300;
+ line-height: 1.2;
+}
+
+@media (min-width: 1200px) {
+ .display-3 {
+ font-size: 4rem;
+ }
+}
+
+.display-4 {
+ font-size: calc(1.475rem + 2.7vw);
+ font-weight: 300;
+ line-height: 1.2;
+}
+
+@media (min-width: 1200px) {
+ .display-4 {
+ font-size: 3.5rem;
+ }
+}
+
+.display-5 {
+ font-size: calc(1.425rem + 2.1vw);
+ font-weight: 300;
+ line-height: 1.2;
+}
+
+@media (min-width: 1200px) {
+ .display-5 {
+ font-size: 3rem;
+ }
+}
+
+.display-6 {
+ font-size: calc(1.375rem + 1.5vw);
+ font-weight: 300;
+ line-height: 1.2;
+}
+
+@media (min-width: 1200px) {
+ .display-6 {
+ font-size: 2.5rem;
+ }
+}
+
+.list-unstyled {
+ padding-left: 0;
+ list-style: none;
+}
+
+.list-inline {
+ padding-left: 0;
+ list-style: none;
+}
+
+.list-inline-item {
+ display: inline-block;
+}
+
+.list-inline-item:not(:last-child) {
+ margin-right: 0.5rem;
+}
+
+.initialism {
+ font-size: 0.875em;
+ text-transform: uppercase;
+}
+
+.blockquote {
+ margin-bottom: 1rem;
+ font-size: 1.25rem;
+}
+
+.blockquote > :last-child {
+ margin-bottom: 0;
+}
+
+.blockquote-footer {
+ margin-top: -1rem;
+ margin-bottom: 1rem;
+ font-size: 0.875em;
+ color: #888;
+}
+
+.blockquote-footer::before {
+ content: "\2014\00A0";
+}
+
+.img-fluid {
+ max-width: 100%;
+ height: auto;
+}
+
+.img-thumbnail {
+ padding: 0.25rem;
+ background-color: #222;
+ border: 1px solid #dee2e6;
+ border-radius: 0.25rem;
+ max-width: 100%;
+ height: auto;
+}
+
+.figure {
+ display: inline-block;
+}
+
+.figure-img {
+ margin-bottom: 0.5rem;
+ line-height: 1;
+}
+
+.figure-caption {
+ font-size: 0.875em;
+ color: #888;
+}
+
+.container,
+.container-fluid,
+.container-sm,
+.container-md,
+.container-lg,
+.container-xl,
+.container-xxl {
+ width: 100%;
+ padding-right: var(--bs-gutter-x, 0.75rem);
+ padding-left: var(--bs-gutter-x, 0.75rem);
+ margin-right: auto;
+ margin-left: auto;
+}
+
+@media (min-width: 576px) {
+ .container, .container-sm {
+ max-width: 540px;
+ }
+}
+
+@media (min-width: 768px) {
+ .container, .container-sm, .container-md {
+ max-width: 720px;
+ }
+}
+
+@media (min-width: 992px) {
+ .container, .container-sm, .container-md, .container-lg {
+ max-width: 960px;
+ }
+}
+
+@media (min-width: 1200px) {
+ .container, .container-sm, .container-md, .container-lg, .container-xl {
+ max-width: 1140px;
+ }
+}
+
+@media (min-width: 1400px) {
+ .container, .container-sm, .container-md, .container-lg, .container-xl, .container-xxl {
+ max-width: 1320px;
+ }
+}
+
+.row {
+ --bs-gutter-x: 1.5rem;
+ --bs-gutter-y: 0;
+ display: -ms-flexbox;
+ display: flex;
+ -ms-flex-wrap: wrap;
+ flex-wrap: wrap;
+ margin-top: calc(var(--bs-gutter-y) * -1);
+ margin-right: calc(var(--bs-gutter-x) / -2);
+ margin-left: calc(var(--bs-gutter-x) / -2);
+}
+
+.row > * {
+ -ms-flex-negative: 0;
+ flex-shrink: 0;
+ width: 100%;
+ max-width: 100%;
+ padding-right: calc(var(--bs-gutter-x) / 2);
+ padding-left: calc(var(--bs-gutter-x) / 2);
+ margin-top: var(--bs-gutter-y);
+}
+
+.col {
+ -ms-flex: 1 0 0%;
+ flex: 1 0 0%;
+}
+
+.row-cols-auto > * {
+ -ms-flex: 0 0 auto;
+ flex: 0 0 auto;
+ width: auto;
+}
+
+.row-cols-1 > * {
+ -ms-flex: 0 0 auto;
+ flex: 0 0 auto;
+ width: 100%;
+}
+
+.row-cols-2 > * {
+ -ms-flex: 0 0 auto;
+ flex: 0 0 auto;
+ width: 50%;
+}
+
+.row-cols-3 > * {
+ -ms-flex: 0 0 auto;
+ flex: 0 0 auto;
+ width: 33.333333%;
+}
+
+.row-cols-4 > * {
+ -ms-flex: 0 0 auto;
+ flex: 0 0 auto;
+ width: 25%;
+}
+
+.row-cols-5 > * {
+ -ms-flex: 0 0 auto;
+ flex: 0 0 auto;
+ width: 20%;
+}
+
+.row-cols-6 > * {
+ -ms-flex: 0 0 auto;
+ flex: 0 0 auto;
+ width: 16.666667%;
+}
+
+.col-auto {
+ -ms-flex: 0 0 auto;
+ flex: 0 0 auto;
+ width: auto;
+}
+
+.col-1 {
+ -ms-flex: 0 0 auto;
+ flex: 0 0 auto;
+ width: 8.333333%;
+}
+
+.col-2 {
+ -ms-flex: 0 0 auto;
+ flex: 0 0 auto;
+ width: 16.666667%;
+}
+
+.col-3 {
+ -ms-flex: 0 0 auto;
+ flex: 0 0 auto;
+ width: 25%;
+}
+
+.col-4 {
+ -ms-flex: 0 0 auto;
+ flex: 0 0 auto;
+ width: 33.333333%;
+}
+
+.col-5 {
+ -ms-flex: 0 0 auto;
+ flex: 0 0 auto;
+ width: 41.666667%;
+}
+
+.col-6 {
+ -ms-flex: 0 0 auto;
+ flex: 0 0 auto;
+ width: 50%;
+}
+
+.col-7 {
+ -ms-flex: 0 0 auto;
+ flex: 0 0 auto;
+ width: 58.333333%;
+}
+
+.col-8 {
+ -ms-flex: 0 0 auto;
+ flex: 0 0 auto;
+ width: 66.666667%;
+}
+
+.col-9 {
+ -ms-flex: 0 0 auto;
+ flex: 0 0 auto;
+ width: 75%;
+}
+
+.col-10 {
+ -ms-flex: 0 0 auto;
+ flex: 0 0 auto;
+ width: 83.333333%;
+}
+
+.col-11 {
+ -ms-flex: 0 0 auto;
+ flex: 0 0 auto;
+ width: 91.666667%;
+}
+
+.col-12 {
+ -ms-flex: 0 0 auto;
+ flex: 0 0 auto;
+ width: 100%;
+}
+
+.offset-1 {
+ margin-left: 8.333333%;
+}
+
+.offset-2 {
+ margin-left: 16.666667%;
+}
+
+.offset-3 {
+ margin-left: 25%;
+}
+
+.offset-4 {
+ margin-left: 33.333333%;
+}
+
+.offset-5 {
+ margin-left: 41.666667%;
+}
+
+.offset-6 {
+ margin-left: 50%;
+}
+
+.offset-7 {
+ margin-left: 58.333333%;
+}
+
+.offset-8 {
+ margin-left: 66.666667%;
+}
+
+.offset-9 {
+ margin-left: 75%;
+}
+
+.offset-10 {
+ margin-left: 83.333333%;
+}
+
+.offset-11 {
+ margin-left: 91.666667%;
+}
+
+.g-0,
+.gx-0 {
+ --bs-gutter-x: 0;
+}
+
+.g-0,
+.gy-0 {
+ --bs-gutter-y: 0;
+}
+
+.g-1,
+.gx-1 {
+ --bs-gutter-x: 0.25rem;
+}
+
+.g-1,
+.gy-1 {
+ --bs-gutter-y: 0.25rem;
+}
+
+.g-2,
+.gx-2 {
+ --bs-gutter-x: 0.5rem;
+}
+
+.g-2,
+.gy-2 {
+ --bs-gutter-y: 0.5rem;
+}
+
+.g-3,
+.gx-3 {
+ --bs-gutter-x: 1rem;
+}
+
+.g-3,
+.gy-3 {
+ --bs-gutter-y: 1rem;
+}
+
+.g-4,
+.gx-4 {
+ --bs-gutter-x: 1.5rem;
+}
+
+.g-4,
+.gy-4 {
+ --bs-gutter-y: 1.5rem;
+}
+
+.g-5,
+.gx-5 {
+ --bs-gutter-x: 3rem;
+}
+
+.g-5,
+.gy-5 {
+ --bs-gutter-y: 3rem;
+}
+
+@media (min-width: 576px) {
+ .col-sm {
+ -ms-flex: 1 0 0%;
+ flex: 1 0 0%;
+ }
+ .row-cols-sm-auto > * {
+ -ms-flex: 0 0 auto;
+ flex: 0 0 auto;
+ width: auto;
+ }
+ .row-cols-sm-1 > * {
+ -ms-flex: 0 0 auto;
+ flex: 0 0 auto;
+ width: 100%;
+ }
+ .row-cols-sm-2 > * {
+ -ms-flex: 0 0 auto;
+ flex: 0 0 auto;
+ width: 50%;
+ }
+ .row-cols-sm-3 > * {
+ -ms-flex: 0 0 auto;
+ flex: 0 0 auto;
+ width: 33.333333%;
+ }
+ .row-cols-sm-4 > * {
+ -ms-flex: 0 0 auto;
+ flex: 0 0 auto;
+ width: 25%;
+ }
+ .row-cols-sm-5 > * {
+ -ms-flex: 0 0 auto;
+ flex: 0 0 auto;
+ width: 20%;
+ }
+ .row-cols-sm-6 > * {
+ -ms-flex: 0 0 auto;
+ flex: 0 0 auto;
+ width: 16.666667%;
+ }
+ .col-sm-auto {
+ -ms-flex: 0 0 auto;
+ flex: 0 0 auto;
+ width: auto;
+ }
+ .col-sm-1 {
+ -ms-flex: 0 0 auto;
+ flex: 0 0 auto;
+ width: 8.333333%;
+ }
+ .col-sm-2 {
+ -ms-flex: 0 0 auto;
+ flex: 0 0 auto;
+ width: 16.666667%;
+ }
+ .col-sm-3 {
+ -ms-flex: 0 0 auto;
+ flex: 0 0 auto;
+ width: 25%;
+ }
+ .col-sm-4 {
+ -ms-flex: 0 0 auto;
+ flex: 0 0 auto;
+ width: 33.333333%;
+ }
+ .col-sm-5 {
+ -ms-flex: 0 0 auto;
+ flex: 0 0 auto;
+ width: 41.666667%;
+ }
+ .col-sm-6 {
+ -ms-flex: 0 0 auto;
+ flex: 0 0 auto;
+ width: 50%;
+ }
+ .col-sm-7 {
+ -ms-flex: 0 0 auto;
+ flex: 0 0 auto;
+ width: 58.333333%;
+ }
+ .col-sm-8 {
+ -ms-flex: 0 0 auto;
+ flex: 0 0 auto;
+ width: 66.666667%;
+ }
+ .col-sm-9 {
+ -ms-flex: 0 0 auto;
+ flex: 0 0 auto;
+ width: 75%;
+ }
+ .col-sm-10 {
+ -ms-flex: 0 0 auto;
+ flex: 0 0 auto;
+ width: 83.333333%;
+ }
+ .col-sm-11 {
+ -ms-flex: 0 0 auto;
+ flex: 0 0 auto;
+ width: 91.666667%;
+ }
+ .col-sm-12 {
+ -ms-flex: 0 0 auto;
+ flex: 0 0 auto;
+ width: 100%;
+ }
+ .offset-sm-0 {
+ margin-left: 0;
+ }
+ .offset-sm-1 {
+ margin-left: 8.333333%;
+ }
+ .offset-sm-2 {
+ margin-left: 16.666667%;
+ }
+ .offset-sm-3 {
+ margin-left: 25%;
+ }
+ .offset-sm-4 {
+ margin-left: 33.333333%;
+ }
+ .offset-sm-5 {
+ margin-left: 41.666667%;
+ }
+ .offset-sm-6 {
+ margin-left: 50%;
+ }
+ .offset-sm-7 {
+ margin-left: 58.333333%;
+ }
+ .offset-sm-8 {
+ margin-left: 66.666667%;
+ }
+ .offset-sm-9 {
+ margin-left: 75%;
+ }
+ .offset-sm-10 {
+ margin-left: 83.333333%;
+ }
+ .offset-sm-11 {
+ margin-left: 91.666667%;
+ }
+ .g-sm-0,
+ .gx-sm-0 {
+ --bs-gutter-x: 0;
+ }
+ .g-sm-0,
+ .gy-sm-0 {
+ --bs-gutter-y: 0;
+ }
+ .g-sm-1,
+ .gx-sm-1 {
+ --bs-gutter-x: 0.25rem;
+ }
+ .g-sm-1,
+ .gy-sm-1 {
+ --bs-gutter-y: 0.25rem;
+ }
+ .g-sm-2,
+ .gx-sm-2 {
+ --bs-gutter-x: 0.5rem;
+ }
+ .g-sm-2,
+ .gy-sm-2 {
+ --bs-gutter-y: 0.5rem;
+ }
+ .g-sm-3,
+ .gx-sm-3 {
+ --bs-gutter-x: 1rem;
+ }
+ .g-sm-3,
+ .gy-sm-3 {
+ --bs-gutter-y: 1rem;
+ }
+ .g-sm-4,
+ .gx-sm-4 {
+ --bs-gutter-x: 1.5rem;
+ }
+ .g-sm-4,
+ .gy-sm-4 {
+ --bs-gutter-y: 1.5rem;
+ }
+ .g-sm-5,
+ .gx-sm-5 {
+ --bs-gutter-x: 3rem;
+ }
+ .g-sm-5,
+ .gy-sm-5 {
+ --bs-gutter-y: 3rem;
+ }
+}
+
+@media (min-width: 768px) {
+ .col-md {
+ -ms-flex: 1 0 0%;
+ flex: 1 0 0%;
+ }
+ .row-cols-md-auto > * {
+ -ms-flex: 0 0 auto;
+ flex: 0 0 auto;
+ width: auto;
+ }
+ .row-cols-md-1 > * {
+ -ms-flex: 0 0 auto;
+ flex: 0 0 auto;
+ width: 100%;
+ }
+ .row-cols-md-2 > * {
+ -ms-flex: 0 0 auto;
+ flex: 0 0 auto;
+ width: 50%;
+ }
+ .row-cols-md-3 > * {
+ -ms-flex: 0 0 auto;
+ flex: 0 0 auto;
+ width: 33.333333%;
+ }
+ .row-cols-md-4 > * {
+ -ms-flex: 0 0 auto;
+ flex: 0 0 auto;
+ width: 25%;
+ }
+ .row-cols-md-5 > * {
+ -ms-flex: 0 0 auto;
+ flex: 0 0 auto;
+ width: 20%;
+ }
+ .row-cols-md-6 > * {
+ -ms-flex: 0 0 auto;
+ flex: 0 0 auto;
+ width: 16.666667%;
+ }
+ .col-md-auto {
+ -ms-flex: 0 0 auto;
+ flex: 0 0 auto;
+ width: auto;
+ }
+ .col-md-1 {
+ -ms-flex: 0 0 auto;
+ flex: 0 0 auto;
+ width: 8.333333%;
+ }
+ .col-md-2 {
+ -ms-flex: 0 0 auto;
+ flex: 0 0 auto;
+ width: 16.666667%;
+ }
+ .col-md-3 {
+ -ms-flex: 0 0 auto;
+ flex: 0 0 auto;
+ width: 25%;
+ }
+ .col-md-4 {
+ -ms-flex: 0 0 auto;
+ flex: 0 0 auto;
+ width: 33.333333%;
+ }
+ .col-md-5 {
+ -ms-flex: 0 0 auto;
+ flex: 0 0 auto;
+ width: 41.666667%;
+ }
+ .col-md-6 {
+ -ms-flex: 0 0 auto;
+ flex: 0 0 auto;
+ width: 50%;
+ }
+ .col-md-7 {
+ -ms-flex: 0 0 auto;
+ flex: 0 0 auto;
+ width: 58.333333%;
+ }
+ .col-md-8 {
+ -ms-flex: 0 0 auto;
+ flex: 0 0 auto;
+ width: 66.666667%;
+ }
+ .col-md-9 {
+ -ms-flex: 0 0 auto;
+ flex: 0 0 auto;
+ width: 75%;
+ }
+ .col-md-10 {
+ -ms-flex: 0 0 auto;
+ flex: 0 0 auto;
+ width: 83.333333%;
+ }
+ .col-md-11 {
+ -ms-flex: 0 0 auto;
+ flex: 0 0 auto;
+ width: 91.666667%;
+ }
+ .col-md-12 {
+ -ms-flex: 0 0 auto;
+ flex: 0 0 auto;
+ width: 100%;
+ }
+ .offset-md-0 {
+ margin-left: 0;
+ }
+ .offset-md-1 {
+ margin-left: 8.333333%;
+ }
+ .offset-md-2 {
+ margin-left: 16.666667%;
+ }
+ .offset-md-3 {
+ margin-left: 25%;
+ }
+ .offset-md-4 {
+ margin-left: 33.333333%;
+ }
+ .offset-md-5 {
+ margin-left: 41.666667%;
+ }
+ .offset-md-6 {
+ margin-left: 50%;
+ }
+ .offset-md-7 {
+ margin-left: 58.333333%;
+ }
+ .offset-md-8 {
+ margin-left: 66.666667%;
+ }
+ .offset-md-9 {
+ margin-left: 75%;
+ }
+ .offset-md-10 {
+ margin-left: 83.333333%;
+ }
+ .offset-md-11 {
+ margin-left: 91.666667%;
+ }
+ .g-md-0,
+ .gx-md-0 {
+ --bs-gutter-x: 0;
+ }
+ .g-md-0,
+ .gy-md-0 {
+ --bs-gutter-y: 0;
+ }
+ .g-md-1,
+ .gx-md-1 {
+ --bs-gutter-x: 0.25rem;
+ }
+ .g-md-1,
+ .gy-md-1 {
+ --bs-gutter-y: 0.25rem;
+ }
+ .g-md-2,
+ .gx-md-2 {
+ --bs-gutter-x: 0.5rem;
+ }
+ .g-md-2,
+ .gy-md-2 {
+ --bs-gutter-y: 0.5rem;
+ }
+ .g-md-3,
+ .gx-md-3 {
+ --bs-gutter-x: 1rem;
+ }
+ .g-md-3,
+ .gy-md-3 {
+ --bs-gutter-y: 1rem;
+ }
+ .g-md-4,
+ .gx-md-4 {
+ --bs-gutter-x: 1.5rem;
+ }
+ .g-md-4,
+ .gy-md-4 {
+ --bs-gutter-y: 1.5rem;
+ }
+ .g-md-5,
+ .gx-md-5 {
+ --bs-gutter-x: 3rem;
+ }
+ .g-md-5,
+ .gy-md-5 {
+ --bs-gutter-y: 3rem;
+ }
+}
+
+@media (min-width: 992px) {
+ .col-lg {
+ -ms-flex: 1 0 0%;
+ flex: 1 0 0%;
+ }
+ .row-cols-lg-auto > * {
+ -ms-flex: 0 0 auto;
+ flex: 0 0 auto;
+ width: auto;
+ }
+ .row-cols-lg-1 > * {
+ -ms-flex: 0 0 auto;
+ flex: 0 0 auto;
+ width: 100%;
+ }
+ .row-cols-lg-2 > * {
+ -ms-flex: 0 0 auto;
+ flex: 0 0 auto;
+ width: 50%;
+ }
+ .row-cols-lg-3 > * {
+ -ms-flex: 0 0 auto;
+ flex: 0 0 auto;
+ width: 33.333333%;
+ }
+ .row-cols-lg-4 > * {
+ -ms-flex: 0 0 auto;
+ flex: 0 0 auto;
+ width: 25%;
+ }
+ .row-cols-lg-5 > * {
+ -ms-flex: 0 0 auto;
+ flex: 0 0 auto;
+ width: 20%;
+ }
+ .row-cols-lg-6 > * {
+ -ms-flex: 0 0 auto;
+ flex: 0 0 auto;
+ width: 16.666667%;
+ }
+ .col-lg-auto {
+ -ms-flex: 0 0 auto;
+ flex: 0 0 auto;
+ width: auto;
+ }
+ .col-lg-1 {
+ -ms-flex: 0 0 auto;
+ flex: 0 0 auto;
+ width: 8.333333%;
+ }
+ .col-lg-2 {
+ -ms-flex: 0 0 auto;
+ flex: 0 0 auto;
+ width: 16.666667%;
+ }
+ .col-lg-3 {
+ -ms-flex: 0 0 auto;
+ flex: 0 0 auto;
+ width: 25%;
+ }
+ .col-lg-4 {
+ -ms-flex: 0 0 auto;
+ flex: 0 0 auto;
+ width: 33.333333%;
+ }
+ .col-lg-5 {
+ -ms-flex: 0 0 auto;
+ flex: 0 0 auto;
+ width: 41.666667%;
+ }
+ .col-lg-6 {
+ -ms-flex: 0 0 auto;
+ flex: 0 0 auto;
+ width: 50%;
+ }
+ .col-lg-7 {
+ -ms-flex: 0 0 auto;
+ flex: 0 0 auto;
+ width: 58.333333%;
+ }
+ .col-lg-8 {
+ -ms-flex: 0 0 auto;
+ flex: 0 0 auto;
+ width: 66.666667%;
+ }
+ .col-lg-9 {
+ -ms-flex: 0 0 auto;
+ flex: 0 0 auto;
+ width: 75%;
+ }
+ .col-lg-10 {
+ -ms-flex: 0 0 auto;
+ flex: 0 0 auto;
+ width: 83.333333%;
+ }
+ .col-lg-11 {
+ -ms-flex: 0 0 auto;
+ flex: 0 0 auto;
+ width: 91.666667%;
+ }
+ .col-lg-12 {
+ -ms-flex: 0 0 auto;
+ flex: 0 0 auto;
+ width: 100%;
+ }
+ .offset-lg-0 {
+ margin-left: 0;
+ }
+ .offset-lg-1 {
+ margin-left: 8.333333%;
+ }
+ .offset-lg-2 {
+ margin-left: 16.666667%;
+ }
+ .offset-lg-3 {
+ margin-left: 25%;
+ }
+ .offset-lg-4 {
+ margin-left: 33.333333%;
+ }
+ .offset-lg-5 {
+ margin-left: 41.666667%;
+ }
+ .offset-lg-6 {
+ margin-left: 50%;
+ }
+ .offset-lg-7 {
+ margin-left: 58.333333%;
+ }
+ .offset-lg-8 {
+ margin-left: 66.666667%;
+ }
+ .offset-lg-9 {
+ margin-left: 75%;
+ }
+ .offset-lg-10 {
+ margin-left: 83.333333%;
+ }
+ .offset-lg-11 {
+ margin-left: 91.666667%;
+ }
+ .g-lg-0,
+ .gx-lg-0 {
+ --bs-gutter-x: 0;
+ }
+ .g-lg-0,
+ .gy-lg-0 {
+ --bs-gutter-y: 0;
+ }
+ .g-lg-1,
+ .gx-lg-1 {
+ --bs-gutter-x: 0.25rem;
+ }
+ .g-lg-1,
+ .gy-lg-1 {
+ --bs-gutter-y: 0.25rem;
+ }
+ .g-lg-2,
+ .gx-lg-2 {
+ --bs-gutter-x: 0.5rem;
+ }
+ .g-lg-2,
+ .gy-lg-2 {
+ --bs-gutter-y: 0.5rem;
+ }
+ .g-lg-3,
+ .gx-lg-3 {
+ --bs-gutter-x: 1rem;
+ }
+ .g-lg-3,
+ .gy-lg-3 {
+ --bs-gutter-y: 1rem;
+ }
+ .g-lg-4,
+ .gx-lg-4 {
+ --bs-gutter-x: 1.5rem;
+ }
+ .g-lg-4,
+ .gy-lg-4 {
+ --bs-gutter-y: 1.5rem;
+ }
+ .g-lg-5,
+ .gx-lg-5 {
+ --bs-gutter-x: 3rem;
+ }
+ .g-lg-5,
+ .gy-lg-5 {
+ --bs-gutter-y: 3rem;
+ }
+}
+
+@media (min-width: 1200px) {
+ .col-xl {
+ -ms-flex: 1 0 0%;
+ flex: 1 0 0%;
+ }
+ .row-cols-xl-auto > * {
+ -ms-flex: 0 0 auto;
+ flex: 0 0 auto;
+ width: auto;
+ }
+ .row-cols-xl-1 > * {
+ -ms-flex: 0 0 auto;
+ flex: 0 0 auto;
+ width: 100%;
+ }
+ .row-cols-xl-2 > * {
+ -ms-flex: 0 0 auto;
+ flex: 0 0 auto;
+ width: 50%;
+ }
+ .row-cols-xl-3 > * {
+ -ms-flex: 0 0 auto;
+ flex: 0 0 auto;
+ width: 33.333333%;
+ }
+ .row-cols-xl-4 > * {
+ -ms-flex: 0 0 auto;
+ flex: 0 0 auto;
+ width: 25%;
+ }
+ .row-cols-xl-5 > * {
+ -ms-flex: 0 0 auto;
+ flex: 0 0 auto;
+ width: 20%;
+ }
+ .row-cols-xl-6 > * {
+ -ms-flex: 0 0 auto;
+ flex: 0 0 auto;
+ width: 16.666667%;
+ }
+ .col-xl-auto {
+ -ms-flex: 0 0 auto;
+ flex: 0 0 auto;
+ width: auto;
+ }
+ .col-xl-1 {
+ -ms-flex: 0 0 auto;
+ flex: 0 0 auto;
+ width: 8.333333%;
+ }
+ .col-xl-2 {
+ -ms-flex: 0 0 auto;
+ flex: 0 0 auto;
+ width: 16.666667%;
+ }
+ .col-xl-3 {
+ -ms-flex: 0 0 auto;
+ flex: 0 0 auto;
+ width: 25%;
+ }
+ .col-xl-4 {
+ -ms-flex: 0 0 auto;
+ flex: 0 0 auto;
+ width: 33.333333%;
+ }
+ .col-xl-5 {
+ -ms-flex: 0 0 auto;
+ flex: 0 0 auto;
+ width: 41.666667%;
+ }
+ .col-xl-6 {
+ -ms-flex: 0 0 auto;
+ flex: 0 0 auto;
+ width: 50%;
+ }
+ .col-xl-7 {
+ -ms-flex: 0 0 auto;
+ flex: 0 0 auto;
+ width: 58.333333%;
+ }
+ .col-xl-8 {
+ -ms-flex: 0 0 auto;
+ flex: 0 0 auto;
+ width: 66.666667%;
+ }
+ .col-xl-9 {
+ -ms-flex: 0 0 auto;
+ flex: 0 0 auto;
+ width: 75%;
+ }
+ .col-xl-10 {
+ -ms-flex: 0 0 auto;
+ flex: 0 0 auto;
+ width: 83.333333%;
+ }
+ .col-xl-11 {
+ -ms-flex: 0 0 auto;
+ flex: 0 0 auto;
+ width: 91.666667%;
+ }
+ .col-xl-12 {
+ -ms-flex: 0 0 auto;
+ flex: 0 0 auto;
+ width: 100%;
+ }
+ .offset-xl-0 {
+ margin-left: 0;
+ }
+ .offset-xl-1 {
+ margin-left: 8.333333%;
+ }
+ .offset-xl-2 {
+ margin-left: 16.666667%;
+ }
+ .offset-xl-3 {
+ margin-left: 25%;
+ }
+ .offset-xl-4 {
+ margin-left: 33.333333%;
+ }
+ .offset-xl-5 {
+ margin-left: 41.666667%;
+ }
+ .offset-xl-6 {
+ margin-left: 50%;
+ }
+ .offset-xl-7 {
+ margin-left: 58.333333%;
+ }
+ .offset-xl-8 {
+ margin-left: 66.666667%;
+ }
+ .offset-xl-9 {
+ margin-left: 75%;
+ }
+ .offset-xl-10 {
+ margin-left: 83.333333%;
+ }
+ .offset-xl-11 {
+ margin-left: 91.666667%;
+ }
+ .g-xl-0,
+ .gx-xl-0 {
+ --bs-gutter-x: 0;
+ }
+ .g-xl-0,
+ .gy-xl-0 {
+ --bs-gutter-y: 0;
+ }
+ .g-xl-1,
+ .gx-xl-1 {
+ --bs-gutter-x: 0.25rem;
+ }
+ .g-xl-1,
+ .gy-xl-1 {
+ --bs-gutter-y: 0.25rem;
+ }
+ .g-xl-2,
+ .gx-xl-2 {
+ --bs-gutter-x: 0.5rem;
+ }
+ .g-xl-2,
+ .gy-xl-2 {
+ --bs-gutter-y: 0.5rem;
+ }
+ .g-xl-3,
+ .gx-xl-3 {
+ --bs-gutter-x: 1rem;
+ }
+ .g-xl-3,
+ .gy-xl-3 {
+ --bs-gutter-y: 1rem;
+ }
+ .g-xl-4,
+ .gx-xl-4 {
+ --bs-gutter-x: 1.5rem;
+ }
+ .g-xl-4,
+ .gy-xl-4 {
+ --bs-gutter-y: 1.5rem;
+ }
+ .g-xl-5,
+ .gx-xl-5 {
+ --bs-gutter-x: 3rem;
+ }
+ .g-xl-5,
+ .gy-xl-5 {
+ --bs-gutter-y: 3rem;
+ }
+}
+
+@media (min-width: 1400px) {
+ .col-xxl {
+ -ms-flex: 1 0 0%;
+ flex: 1 0 0%;
+ }
+ .row-cols-xxl-auto > * {
+ -ms-flex: 0 0 auto;
+ flex: 0 0 auto;
+ width: auto;
+ }
+ .row-cols-xxl-1 > * {
+ -ms-flex: 0 0 auto;
+ flex: 0 0 auto;
+ width: 100%;
+ }
+ .row-cols-xxl-2 > * {
+ -ms-flex: 0 0 auto;
+ flex: 0 0 auto;
+ width: 50%;
+ }
+ .row-cols-xxl-3 > * {
+ -ms-flex: 0 0 auto;
+ flex: 0 0 auto;
+ width: 33.333333%;
+ }
+ .row-cols-xxl-4 > * {
+ -ms-flex: 0 0 auto;
+ flex: 0 0 auto;
+ width: 25%;
+ }
+ .row-cols-xxl-5 > * {
+ -ms-flex: 0 0 auto;
+ flex: 0 0 auto;
+ width: 20%;
+ }
+ .row-cols-xxl-6 > * {
+ -ms-flex: 0 0 auto;
+ flex: 0 0 auto;
+ width: 16.666667%;
+ }
+ .col-xxl-auto {
+ -ms-flex: 0 0 auto;
+ flex: 0 0 auto;
+ width: auto;
+ }
+ .col-xxl-1 {
+ -ms-flex: 0 0 auto;
+ flex: 0 0 auto;
+ width: 8.333333%;
+ }
+ .col-xxl-2 {
+ -ms-flex: 0 0 auto;
+ flex: 0 0 auto;
+ width: 16.666667%;
+ }
+ .col-xxl-3 {
+ -ms-flex: 0 0 auto;
+ flex: 0 0 auto;
+ width: 25%;
+ }
+ .col-xxl-4 {
+ -ms-flex: 0 0 auto;
+ flex: 0 0 auto;
+ width: 33.333333%;
+ }
+ .col-xxl-5 {
+ -ms-flex: 0 0 auto;
+ flex: 0 0 auto;
+ width: 41.666667%;
+ }
+ .col-xxl-6 {
+ -ms-flex: 0 0 auto;
+ flex: 0 0 auto;
+ width: 50%;
+ }
+ .col-xxl-7 {
+ -ms-flex: 0 0 auto;
+ flex: 0 0 auto;
+ width: 58.333333%;
+ }
+ .col-xxl-8 {
+ -ms-flex: 0 0 auto;
+ flex: 0 0 auto;
+ width: 66.666667%;
+ }
+ .col-xxl-9 {
+ -ms-flex: 0 0 auto;
+ flex: 0 0 auto;
+ width: 75%;
+ }
+ .col-xxl-10 {
+ -ms-flex: 0 0 auto;
+ flex: 0 0 auto;
+ width: 83.333333%;
+ }
+ .col-xxl-11 {
+ -ms-flex: 0 0 auto;
+ flex: 0 0 auto;
+ width: 91.666667%;
+ }
+ .col-xxl-12 {
+ -ms-flex: 0 0 auto;
+ flex: 0 0 auto;
+ width: 100%;
+ }
+ .offset-xxl-0 {
+ margin-left: 0;
+ }
+ .offset-xxl-1 {
+ margin-left: 8.333333%;
+ }
+ .offset-xxl-2 {
+ margin-left: 16.666667%;
+ }
+ .offset-xxl-3 {
+ margin-left: 25%;
+ }
+ .offset-xxl-4 {
+ margin-left: 33.333333%;
+ }
+ .offset-xxl-5 {
+ margin-left: 41.666667%;
+ }
+ .offset-xxl-6 {
+ margin-left: 50%;
+ }
+ .offset-xxl-7 {
+ margin-left: 58.333333%;
+ }
+ .offset-xxl-8 {
+ margin-left: 66.666667%;
+ }
+ .offset-xxl-9 {
+ margin-left: 75%;
+ }
+ .offset-xxl-10 {
+ margin-left: 83.333333%;
+ }
+ .offset-xxl-11 {
+ margin-left: 91.666667%;
+ }
+ .g-xxl-0,
+ .gx-xxl-0 {
+ --bs-gutter-x: 0;
+ }
+ .g-xxl-0,
+ .gy-xxl-0 {
+ --bs-gutter-y: 0;
+ }
+ .g-xxl-1,
+ .gx-xxl-1 {
+ --bs-gutter-x: 0.25rem;
+ }
+ .g-xxl-1,
+ .gy-xxl-1 {
+ --bs-gutter-y: 0.25rem;
+ }
+ .g-xxl-2,
+ .gx-xxl-2 {
+ --bs-gutter-x: 0.5rem;
+ }
+ .g-xxl-2,
+ .gy-xxl-2 {
+ --bs-gutter-y: 0.5rem;
+ }
+ .g-xxl-3,
+ .gx-xxl-3 {
+ --bs-gutter-x: 1rem;
+ }
+ .g-xxl-3,
+ .gy-xxl-3 {
+ --bs-gutter-y: 1rem;
+ }
+ .g-xxl-4,
+ .gx-xxl-4 {
+ --bs-gutter-x: 1.5rem;
+ }
+ .g-xxl-4,
+ .gy-xxl-4 {
+ --bs-gutter-y: 1.5rem;
+ }
+ .g-xxl-5,
+ .gx-xxl-5 {
+ --bs-gutter-x: 3rem;
+ }
+ .g-xxl-5,
+ .gy-xxl-5 {
+ --bs-gutter-y: 3rem;
+ }
+}
+
+.table {
+ --bs-table-bg: transparent;
+ --bs-table-accent-bg: transparent;
+ --bs-table-striped-color: #fff;
+ --bs-table-striped-bg: rgba(0, 0, 0, 0.05);
+ --bs-table-active-color: #fff;
+ --bs-table-active-bg: rgba(0, 0, 0, 0.1);
+ --bs-table-hover-color: #fff;
+ --bs-table-hover-bg: rgba(0, 0, 0, 0.075);
+ width: 100%;
+ margin-bottom: 1rem;
+ color: #fff;
+ vertical-align: top;
+ border-color: #444;
+}
+
+.table > :not(caption) > * > * {
+ padding: 0.5rem 0.5rem;
+ background-color: var(--bs-table-bg);
+ border-bottom-width: 1px;
+ box-shadow: inset 0 0 0 9999px var(--bs-table-accent-bg);
+}
+
+.table > tbody {
+ vertical-align: inherit;
+}
+
+.table > thead {
+ vertical-align: bottom;
+}
+
+.table > :not(:last-child) > :last-child > * {
+ border-bottom-color: currentColor;
+}
+
+.caption-top {
+ caption-side: top;
+}
+
+.table-sm > :not(caption) > * > * {
+ padding: 0.25rem 0.25rem;
+}
+
+.table-bordered > :not(caption) > * {
+ border-width: 1px 0;
+}
+
+.table-bordered > :not(caption) > * > * {
+ border-width: 0 1px;
+}
+
+.table-borderless > :not(caption) > * > * {
+ border-bottom-width: 0;
+}
+
+.table-striped > tbody > tr:nth-of-type(odd) {
+ --bs-table-accent-bg: var(--bs-table-striped-bg);
+ color: var(--bs-table-striped-color);
+}
+
+.table-active {
+ --bs-table-accent-bg: var(--bs-table-active-bg);
+ color: var(--bs-table-active-color);
+}
+
+.table-hover > tbody > tr:hover {
+ --bs-table-accent-bg: var(--bs-table-hover-bg);
+ color: var(--bs-table-hover-color);
+}
+
+.table-primary {
+ --bs-table-bg: #375a7f;
+ --bs-table-striped-bg: #416285;
+ --bs-table-striped-color: #fff;
+ --bs-table-active-bg: #4b6b8c;
+ --bs-table-active-color: #fff;
+ --bs-table-hover-bg: #466689;
+ --bs-table-hover-color: #fff;
+ color: #fff;
+ border-color: #4b6b8c;
+}
+
+.table-secondary {
+ --bs-table-bg: #444444;
+ --bs-table-striped-bg: #4d4d4d;
+ --bs-table-striped-color: #fff;
+ --bs-table-active-bg: #575757;
+ --bs-table-active-color: #fff;
+ --bs-table-hover-bg: #525252;
+ --bs-table-hover-color: #fff;
+ color: #fff;
+ border-color: #575757;
+}
+
+.table-success {
+ --bs-table-bg: #00bc8c;
+ --bs-table-striped-bg: #0dbf92;
+ --bs-table-striped-color: #fff;
+ --bs-table-active-bg: #1ac398;
+ --bs-table-active-color: #fff;
+ --bs-table-hover-bg: #13c195;
+ --bs-table-hover-color: #fff;
+ color: #fff;
+ border-color: #1ac398;
+}
+
+.table-info {
+ --bs-table-bg: #3498db;
+ --bs-table-striped-bg: #3e9ddd;
+ --bs-table-striped-color: #fff;
+ --bs-table-active-bg: #48a2df;
+ --bs-table-active-color: #fff;
+ --bs-table-hover-bg: #43a0de;
+ --bs-table-hover-color: #fff;
+ color: #fff;
+ border-color: #48a2df;
+}
+
+.table-warning {
+ --bs-table-bg: #f39c12;
+ --bs-table-striped-bg: #f4a11e;
+ --bs-table-striped-color: #000;
+ --bs-table-active-bg: #f4a62a;
+ --bs-table-active-color: #000;
+ --bs-table-hover-bg: #f4a324;
+ --bs-table-hover-color: #000;
+ color: #fff;
+ border-color: #f4a62a;
+}
+
+.table-danger {
+ --bs-table-bg: #e74c3c;
+ --bs-table-striped-bg: #e85546;
+ --bs-table-striped-color: #fff;
+ --bs-table-active-bg: #e95e50;
+ --bs-table-active-color: #fff;
+ --bs-table-hover-bg: #e9594b;
+ --bs-table-hover-color: #fff;
+ color: #fff;
+ border-color: #e95e50;
+}
+
+.table-light {
+ --bs-table-bg: #adb5bd;
+ --bs-table-striped-bg: #a4acb4;
+ --bs-table-striped-color: #fff;
+ --bs-table-active-bg: #9ca3aa;
+ --bs-table-active-color: #fff;
+ --bs-table-hover-bg: #a0a7af;
+ --bs-table-hover-color: #fff;
+ color: #000;
+ border-color: #9ca3aa;
+}
+
+.table-dark {
+ --bs-table-bg: #303030;
+ --bs-table-striped-bg: #3a3a3a;
+ --bs-table-striped-color: #fff;
+ --bs-table-active-bg: #454545;
+ --bs-table-active-color: #fff;
+ --bs-table-hover-bg: #404040;
+ --bs-table-hover-color: #fff;
+ color: #fff;
+ border-color: #454545;
+}
+
+.table-responsive {
+ overflow-x: auto;
+ -webkit-overflow-scrolling: touch;
+}
+
+@media (max-width: 575.98px) {
+ .table-responsive-sm {
+ overflow-x: auto;
+ -webkit-overflow-scrolling: touch;
+ }
+}
+
+@media (max-width: 767.98px) {
+ .table-responsive-md {
+ overflow-x: auto;
+ -webkit-overflow-scrolling: touch;
+ }
+}
+
+@media (max-width: 991.98px) {
+ .table-responsive-lg {
+ overflow-x: auto;
+ -webkit-overflow-scrolling: touch;
+ }
+}
+
+@media (max-width: 1199.98px) {
+ .table-responsive-xl {
+ overflow-x: auto;
+ -webkit-overflow-scrolling: touch;
+ }
+}
+
+@media (max-width: 1399.98px) {
+ .table-responsive-xxl {
+ overflow-x: auto;
+ -webkit-overflow-scrolling: touch;
+ }
+}
+
+.form-label {
+ margin-bottom: 0.5rem;
+}
+
+.col-form-label {
+ padding-top: calc(0.375rem + 1px);
+ padding-bottom: calc(0.375rem + 1px);
+ margin-bottom: 0;
+ font-size: inherit;
+ line-height: 1.5;
+}
+
+.col-form-label-lg {
+ padding-top: calc(0.5rem + 1px);
+ padding-bottom: calc(0.5rem + 1px);
+ font-size: 1.25rem;
+}
+
+.col-form-label-sm {
+ padding-top: calc(0.25rem + 1px);
+ padding-bottom: calc(0.25rem + 1px);
+ font-size: 0.875rem;
+}
+
+.form-text {
+ margin-top: 0.25rem;
+ font-size: 0.875em;
+ color: #888;
+}
+
+.form-control {
+ display: block;
+ width: 100%;
+ padding: 0.375rem 0.75rem;
+ font-size: 1rem;
+ font-weight: 400;
+ line-height: 1.5;
+ color: #303030;
+ background-color: #fff;
+ background-clip: padding-box;
+ border: 1px solid #222;
+ -webkit-appearance: none;
+ -moz-appearance: none;
+ appearance: none;
+ border-radius: 0.25rem;
+ transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
+}
+
+@media (prefers-reduced-motion: reduce) {
+ .form-control {
+ transition: none;
+ }
+}
+
+.form-control[type="file"] {
+ overflow: hidden;
+}
+
+.form-control[type="file"]:not(:disabled):not([readonly]) {
+ cursor: pointer;
+}
+
+.form-control:focus {
+ color: #303030;
+ background-color: #fff;
+ border-color: #9badbf;
+ outline: 0;
+ box-shadow: 0 0 0 0.25rem rgba(55, 90, 127, 0.25);
+}
+
+.form-control::-webkit-date-and-time-value {
+ height: 1.5em;
+}
+
+.form-control::-webkit-input-placeholder {
+ color: #888;
+ opacity: 1;
+}
+
+.form-control::-moz-placeholder {
+ color: #888;
+ opacity: 1;
+}
+
+.form-control:-ms-input-placeholder {
+ color: #888;
+ opacity: 1;
+}
+
+.form-control::-ms-input-placeholder {
+ color: #888;
+ opacity: 1;
+}
+
+.form-control::placeholder {
+ color: #888;
+ opacity: 1;
+}
+
+.form-control:disabled, .form-control[readonly] {
+ background-color: #ebebeb;
+ opacity: 1;
+}
+
+.form-control::file-selector-button {
+ padding: 0.375rem 0.75rem;
+ margin: -0.375rem -0.75rem;
+ -webkit-margin-end: 0.75rem;
+ -moz-margin-end: 0.75rem;
+ margin-inline-end: 0.75rem;
+ color: #fff;
+ background-color: #444;
+ pointer-events: none;
+ border-color: inherit;
+ border-style: solid;
+ border-width: 0;
+ border-inline-end-width: 1px;
+ border-radius: 0;
+ transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
+}
+
+@media (prefers-reduced-motion: reduce) {
+ .form-control::file-selector-button {
+ transition: none;
+ }
+}
+
+.form-control:hover:not(:disabled):not([readonly])::file-selector-button {
+ background-color: #414141;
+}
+
+.form-control::-webkit-file-upload-button {
+ padding: 0.375rem 0.75rem;
+ margin: -0.375rem -0.75rem;
+ -webkit-margin-end: 0.75rem;
+ margin-inline-end: 0.75rem;
+ color: #fff;
+ background-color: #444;
+ pointer-events: none;
+ border-color: inherit;
+ border-style: solid;
+ border-width: 0;
+ border-inline-end-width: 1px;
+ border-radius: 0;
+ -webkit-transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
+ transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
+}
+
+@media (prefers-reduced-motion: reduce) {
+ .form-control::-webkit-file-upload-button {
+ -webkit-transition: none;
+ transition: none;
+ }
+}
+
+.form-control:hover:not(:disabled):not([readonly])::-webkit-file-upload-button {
+ background-color: #414141;
+}
+
+.form-control-plaintext {
+ display: block;
+ width: 100%;
+ padding: 0.375rem 0;
+ margin-bottom: 0;
+ line-height: 1.5;
+ color: #fff;
+ background-color: transparent;
+ border: solid transparent;
+ border-width: 1px 0;
+}
+
+.form-control-plaintext.form-control-sm, .form-control-plaintext.form-control-lg {
+ padding-right: 0;
+ padding-left: 0;
+}
+
+.form-control-sm {
+ min-height: calc(1.5em + 0.5rem + 2px);
+ padding: 0.25rem 0.5rem;
+ font-size: 0.875rem;
+ border-radius: 0.2rem;
+}
+
+.form-control-sm::file-selector-button {
+ padding: 0.25rem 0.5rem;
+ margin: -0.25rem -0.5rem;
+ -webkit-margin-end: 0.5rem;
+ -moz-margin-end: 0.5rem;
+ margin-inline-end: 0.5rem;
+}
+
+.form-control-sm::-webkit-file-upload-button {
+ padding: 0.25rem 0.5rem;
+ margin: -0.25rem -0.5rem;
+ -webkit-margin-end: 0.5rem;
+ margin-inline-end: 0.5rem;
+}
+
+.form-control-lg {
+ min-height: calc(1.5em + 1rem + 2px);
+ padding: 0.5rem 1rem;
+ font-size: 1.25rem;
+ border-radius: 0.3rem;
+}
+
+.form-control-lg::file-selector-button {
+ padding: 0.5rem 1rem;
+ margin: -0.5rem -1rem;
+ -webkit-margin-end: 1rem;
+ -moz-margin-end: 1rem;
+ margin-inline-end: 1rem;
+}
+
+.form-control-lg::-webkit-file-upload-button {
+ padding: 0.5rem 1rem;
+ margin: -0.5rem -1rem;
+ -webkit-margin-end: 1rem;
+ margin-inline-end: 1rem;
+}
+
+textarea.form-control {
+ min-height: calc(1.5em + 0.75rem + 2px);
+}
+
+textarea.form-control-sm {
+ min-height: calc(1.5em + 0.5rem + 2px);
+}
+
+textarea.form-control-lg {
+ min-height: calc(1.5em + 1rem + 2px);
+}
+
+.form-control-color {
+ max-width: 3rem;
+ height: auto;
+ padding: 0.375rem;
+}
+
+.form-control-color:not(:disabled):not([readonly]) {
+ cursor: pointer;
+}
+
+.form-control-color::-moz-color-swatch {
+ height: 1.5em;
+ border-radius: 0.25rem;
+}
+
+.form-control-color::-webkit-color-swatch {
+ height: 1.5em;
+ border-radius: 0.25rem;
+}
+
+.form-select {
+ display: block;
+ width: 100%;
+ padding: 0.375rem 2.25rem 0.375rem 0.75rem;
+ font-size: 1rem;
+ font-weight: 400;
+ line-height: 1.5;
+ color: #303030;
+ background-color: #fff;
+ background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23303030' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
+ background-repeat: no-repeat;
+ background-position: right 0.75rem center;
+ background-size: 16px 12px;
+ border: 1px solid #222;
+ border-radius: 0.25rem;
+ -webkit-appearance: none;
+ -moz-appearance: none;
+ appearance: none;
+}
+
+.form-select:focus {
+ border-color: #9badbf;
+ outline: 0;
+ box-shadow: 0 0 0 0.25rem rgba(55, 90, 127, 0.25);
+}
+
+.form-select[multiple], .form-select[size]:not([size="1"]) {
+ padding-right: 0.75rem;
+ background-image: none;
+}
+
+.form-select:disabled {
+ background-color: #ebebeb;
+}
+
+.form-select:-moz-focusring {
+ color: transparent;
+ text-shadow: 0 0 0 #303030;
+}
+
+.form-select-sm {
+ padding-top: 0.25rem;
+ padding-bottom: 0.25rem;
+ padding-left: 0.5rem;
+ font-size: 0.875rem;
+}
+
+.form-select-lg {
+ padding-top: 0.5rem;
+ padding-bottom: 0.5rem;
+ padding-left: 1rem;
+ font-size: 1.25rem;
+}
+
+.form-check {
+ display: block;
+ min-height: 1.5rem;
+ padding-left: 1.5em;
+ margin-bottom: 0.125rem;
+}
+
+.form-check .form-check-input {
+ float: left;
+ margin-left: -1.5em;
+}
+
+.form-check-input {
+ width: 1em;
+ height: 1em;
+ margin-top: 0.25em;
+ vertical-align: top;
+ background-color: #fff;
+ background-repeat: no-repeat;
+ background-position: center;
+ background-size: contain;
+ border: none;
+ -webkit-appearance: none;
+ -moz-appearance: none;
+ appearance: none;
+ -webkit-print-color-adjust: exact;
+ color-adjust: exact;
+}
+
+.form-check-input[type="checkbox"] {
+ border-radius: 0.25em;
+}
+
+.form-check-input[type="radio"] {
+ border-radius: 50%;
+}
+
+.form-check-input:active {
+ -webkit-filter: brightness(90%);
+ filter: brightness(90%);
+}
+
+.form-check-input:focus {
+ border-color: #9badbf;
+ outline: 0;
+ box-shadow: 0 0 0 0.25rem rgba(55, 90, 127, 0.25);
+}
+
+.form-check-input:checked {
+ background-color: #375a7f;
+ border-color: #375a7f;
+}
+
+.form-check-input:checked[type="checkbox"] {
+ background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10l3 3l6-6'/%3e%3c/svg%3e");
+}
+
+.form-check-input:checked[type="radio"] {
+ background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='2' fill='%23fff'/%3e%3c/svg%3e");
+}
+
+.form-check-input[type="checkbox"]:indeterminate {
+ background-color: #375a7f;
+ border-color: #375a7f;
+ background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10h8'/%3e%3c/svg%3e");
+}
+
+.form-check-input:disabled {
+ pointer-events: none;
+ -webkit-filter: none;
+ filter: none;
+ opacity: 0.5;
+}
+
+.form-check-input[disabled] ~ .form-check-label, .form-check-input:disabled ~ .form-check-label {
+ opacity: 0.5;
+}
+
+.form-switch {
+ padding-left: 2.5em;
+}
+
+.form-switch .form-check-input {
+ width: 2em;
+ margin-left: -2.5em;
+ background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='rgba%280, 0, 0, 0.25%29'/%3e%3c/svg%3e");
+ background-position: left center;
+ border-radius: 2em;
+ transition: background-position 0.15s ease-in-out;
+}
+
+@media (prefers-reduced-motion: reduce) {
+ .form-switch .form-check-input {
+ transition: none;
+ }
+}
+
+.form-switch .form-check-input:focus {
+ background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%239badbf'/%3e%3c/svg%3e");
+}
+
+.form-switch .form-check-input:checked {
+ background-position: right center;
+ background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e");
+}
+
+.form-check-inline {
+ display: inline-block;
+ margin-right: 1rem;
+}
+
+.btn-check {
+ position: absolute;
+ clip: rect(0, 0, 0, 0);
+ pointer-events: none;
+}
+
+.btn-check[disabled] + .btn, .btn-check:disabled + .btn {
+ pointer-events: none;
+ -webkit-filter: none;
+ filter: none;
+ opacity: 0.65;
+}
+
+.form-range {
+ width: 100%;
+ height: 1.5rem;
+ padding: 0;
+ background-color: transparent;
+ -webkit-appearance: none;
+ -moz-appearance: none;
+ appearance: none;
+}
+
+.form-range:focus {
+ outline: 0;
+}
+
+.form-range:focus::-webkit-slider-thumb {
+ box-shadow: 0 0 0 1px #222, 0 0 0 0.25rem rgba(55, 90, 127, 0.25);
+}
+
+.form-range:focus::-moz-range-thumb {
+ box-shadow: 0 0 0 1px #222, 0 0 0 0.25rem rgba(55, 90, 127, 0.25);
+}
+
+.form-range::-moz-focus-outer {
+ border: 0;
+}
+
+.form-range::-webkit-slider-thumb {
+ width: 1rem;
+ height: 1rem;
+ margin-top: -0.25rem;
+ background-color: #375a7f;
+ border: 0;
+ border-radius: 1rem;
+ -webkit-transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
+ transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
+ -webkit-appearance: none;
+ appearance: none;
+}
+
+@media (prefers-reduced-motion: reduce) {
+ .form-range::-webkit-slider-thumb {
+ -webkit-transition: none;
+ transition: none;
+ }
+}
+
+.form-range::-webkit-slider-thumb:active {
+ background-color: #c3ced9;
+}
+
+.form-range::-webkit-slider-runnable-track {
+ width: 100%;
+ height: 0.5rem;
+ color: transparent;
+ cursor: pointer;
+ background-color: #dee2e6;
+ border-color: transparent;
+ border-radius: 1rem;
+}
+
+.form-range::-moz-range-thumb {
+ width: 1rem;
+ height: 1rem;
+ background-color: #375a7f;
+ border: 0;
+ border-radius: 1rem;
+ -moz-transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
+ transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
+ -moz-appearance: none;
+ appearance: none;
+}
+
+@media (prefers-reduced-motion: reduce) {
+ .form-range::-moz-range-thumb {
+ -moz-transition: none;
+ transition: none;
+ }
+}
+
+.form-range::-moz-range-thumb:active {
+ background-color: #c3ced9;
+}
+
+.form-range::-moz-range-track {
+ width: 100%;
+ height: 0.5rem;
+ color: transparent;
+ cursor: pointer;
+ background-color: #dee2e6;
+ border-color: transparent;
+ border-radius: 1rem;
+}
+
+.form-range:disabled {
+ pointer-events: none;
+}
+
+.form-range:disabled::-webkit-slider-thumb {
+ background-color: #adb5bd;
+}
+
+.form-range:disabled::-moz-range-thumb {
+ background-color: #adb5bd;
+}
+
+.form-floating {
+ position: relative;
+}
+
+.form-floating > .form-control,
+.form-floating > .form-select {
+ height: calc(3.5rem + 2px);
+ padding: 1rem 0.75rem;
+}
+
+.form-floating > label {
+ position: absolute;
+ top: 0;
+ left: 0;
+ height: 100%;
+ padding: 1rem 0.75rem;
+ pointer-events: none;
+ border: 1px solid transparent;
+ -webkit-transform-origin: 0 0;
+ transform-origin: 0 0;
+ transition: opacity 0.1s ease-in-out, -webkit-transform 0.1s ease-in-out;
+ transition: opacity 0.1s ease-in-out, transform 0.1s ease-in-out;
+ transition: opacity 0.1s ease-in-out, transform 0.1s ease-in-out, -webkit-transform 0.1s ease-in-out;
+}
+
+@media (prefers-reduced-motion: reduce) {
+ .form-floating > label {
+ transition: none;
+ }
+}
+
+.form-floating > .form-control::-webkit-input-placeholder {
+ color: transparent;
+}
+
+.form-floating > .form-control::-moz-placeholder {
+ color: transparent;
+}
+
+.form-floating > .form-control:-ms-input-placeholder {
+ color: transparent;
+}
+
+.form-floating > .form-control::-ms-input-placeholder {
+ color: transparent;
+}
+
+.form-floating > .form-control::placeholder {
+ color: transparent;
+}
+
+.form-floating > .form-control:not(:-moz-placeholder-shown) {
+ padding-top: 1.625rem;
+ padding-bottom: 0.625rem;
+}
+
+.form-floating > .form-control:not(:-ms-input-placeholder) {
+ padding-top: 1.625rem;
+ padding-bottom: 0.625rem;
+}
+
+.form-floating > .form-control:focus, .form-floating > .form-control:not(:placeholder-shown) {
+ padding-top: 1.625rem;
+ padding-bottom: 0.625rem;
+}
+
+.form-floating > .form-control:-webkit-autofill {
+ padding-top: 1.625rem;
+ padding-bottom: 0.625rem;
+}
+
+.form-floating > .form-select {
+ padding-top: 1.625rem;
+ padding-bottom: 0.625rem;
+}
+
+.form-floating > .form-control:not(:-moz-placeholder-shown) ~ label {
+ opacity: 0.65;
+ transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem);
+}
+
+.form-floating > .form-control:not(:-ms-input-placeholder) ~ label {
+ opacity: 0.65;
+ transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem);
+}
+
+.form-floating > .form-control:focus ~ label,
+.form-floating > .form-control:not(:placeholder-shown) ~ label,
+.form-floating > .form-select ~ label {
+ opacity: 0.65;
+ -webkit-transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem);
+ transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem);
+}
+
+.form-floating > .form-control:-webkit-autofill ~ label {
+ opacity: 0.65;
+ -webkit-transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem);
+ transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem);
+}
+
+.input-group {
+ position: relative;
+ display: -ms-flexbox;
+ display: flex;
+ -ms-flex-wrap: wrap;
+ flex-wrap: wrap;
+ -ms-flex-align: stretch;
+ align-items: stretch;
+ width: 100%;
+}
+
+.input-group > .form-control,
+.input-group > .form-select {
+ position: relative;
+ -ms-flex: 1 1 auto;
+ flex: 1 1 auto;
+ width: 1%;
+ min-width: 0;
+}
+
+.input-group > .form-control:focus,
+.input-group > .form-select:focus {
+ z-index: 3;
+}
+
+.input-group .btn {
+ position: relative;
+ z-index: 2;
+}
+
+.input-group .btn:focus {
+ z-index: 3;
+}
+
+.input-group-text {
+ display: -ms-flexbox;
+ display: flex;
+ -ms-flex-align: center;
+ align-items: center;
+ padding: 0.375rem 0.75rem;
+ font-size: 1rem;
+ font-weight: 400;
+ line-height: 1.5;
+ color: #adb5bd;
+ text-align: center;
+ white-space: nowrap;
+ background-color: #444;
+ border: 1px solid #222;
+ border-radius: 0.25rem;
+}
+
+.input-group-lg > .form-control,
+.input-group-lg > .form-select,
+.input-group-lg > .input-group-text,
+.input-group-lg > .btn {
+ padding: 0.5rem 1rem;
+ font-size: 1.25rem;
+ border-radius: 0.3rem;
+}
+
+.input-group-sm > .form-control,
+.input-group-sm > .form-select,
+.input-group-sm > .input-group-text,
+.input-group-sm > .btn {
+ padding: 0.25rem 0.5rem;
+ font-size: 0.875rem;
+ border-radius: 0.2rem;
+}
+
+.input-group-lg > .form-select,
+.input-group-sm > .form-select {
+ padding-right: 3rem;
+}
+
+.input-group:not(.has-validation) > :not(:last-child):not(.dropdown-toggle):not(.dropdown-menu),
+.input-group:not(.has-validation) > .dropdown-toggle:nth-last-child(n + 3) {
+ border-top-right-radius: 0;
+ border-bottom-right-radius: 0;
+}
+
+.input-group.has-validation > :nth-last-child(n + 3):not(.dropdown-toggle):not(.dropdown-menu),
+.input-group.has-validation > .dropdown-toggle:nth-last-child(n + 4) {
+ border-top-right-radius: 0;
+ border-bottom-right-radius: 0;
+}
+
+.input-group > :not(:first-child):not(.dropdown-menu):not(.valid-tooltip):not(.valid-feedback):not(.invalid-tooltip):not(.invalid-feedback) {
+ margin-left: -1px;
+ border-top-left-radius: 0;
+ border-bottom-left-radius: 0;
+}
+
+.valid-feedback {
+ display: none;
+ width: 100%;
+ margin-top: 0.25rem;
+ font-size: 0.875em;
+ color: #00bc8c;
+}
+
+.valid-tooltip {
+ position: absolute;
+ top: 100%;
+ z-index: 5;
+ display: none;
+ max-width: 100%;
+ padding: 0.25rem 0.5rem;
+ margin-top: .1rem;
+ font-size: 0.875rem;
+ color: #fff;
+ background-color: rgba(0, 188, 140, 0.9);
+ border-radius: 0.25rem;
+}
+
+.was-validated :valid ~ .valid-feedback,
+.was-validated :valid ~ .valid-tooltip,
+.is-valid ~ .valid-feedback,
+.is-valid ~ .valid-tooltip {
+ display: block;
+}
+
+.was-validated .form-control:valid, .form-control.is-valid {
+ border-color: #00bc8c;
+ padding-right: calc(1.5em + 0.75rem);
+ background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%2300bc8c' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
+ background-repeat: no-repeat;
+ background-position: right calc(0.375em + 0.1875rem) center;
+ background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
+}
+
+.was-validated .form-control:valid:focus, .form-control.is-valid:focus {
+ border-color: #00bc8c;
+ box-shadow: 0 0 0 0.25rem rgba(0, 188, 140, 0.25);
+}
+
+.was-validated textarea.form-control:valid, textarea.form-control.is-valid {
+ padding-right: calc(1.5em + 0.75rem);
+ background-position: top calc(0.375em + 0.1875rem) right calc(0.375em + 0.1875rem);
+}
+
+.was-validated .form-select:valid, .form-select.is-valid {
+ border-color: #00bc8c;
+}
+
+.was-validated .form-select:valid:not([multiple]):not([size]), .was-validated .form-select:valid:not([multiple])[size="1"], .form-select.is-valid:not([multiple]):not([size]), .form-select.is-valid:not([multiple])[size="1"] {
+ padding-right: 4.125rem;
+ background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23303030' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e"), url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%2300bc8c' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
+ background-position: right 0.75rem center, center right 2.25rem;
+ background-size: 16px 12px, calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
+}
+
+.was-validated .form-select:valid:focus, .form-select.is-valid:focus {
+ border-color: #00bc8c;
+ box-shadow: 0 0 0 0.25rem rgba(0, 188, 140, 0.25);
+}
+
+.was-validated .form-check-input:valid, .form-check-input.is-valid {
+ border-color: #00bc8c;
+}
+
+.was-validated .form-check-input:valid:checked, .form-check-input.is-valid:checked {
+ background-color: #00bc8c;
+}
+
+.was-validated .form-check-input:valid:focus, .form-check-input.is-valid:focus {
+ box-shadow: 0 0 0 0.25rem rgba(0, 188, 140, 0.25);
+}
+
+.was-validated .form-check-input:valid ~ .form-check-label, .form-check-input.is-valid ~ .form-check-label {
+ color: #00bc8c;
+}
+
+.form-check-inline .form-check-input ~ .valid-feedback {
+ margin-left: .5em;
+}
+
+.was-validated .input-group .form-control:valid, .input-group .form-control.is-valid, .was-validated
+.input-group .form-select:valid,
+.input-group .form-select.is-valid {
+ z-index: 1;
+}
+
+.was-validated .input-group .form-control:valid:focus, .input-group .form-control.is-valid:focus, .was-validated
+.input-group .form-select:valid:focus,
+.input-group .form-select.is-valid:focus {
+ z-index: 3;
+}
+
+.invalid-feedback {
+ display: none;
+ width: 100%;
+ margin-top: 0.25rem;
+ font-size: 0.875em;
+ color: #e74c3c;
+}
+
+.invalid-tooltip {
+ position: absolute;
+ top: 100%;
+ z-index: 5;
+ display: none;
+ max-width: 100%;
+ padding: 0.25rem 0.5rem;
+ margin-top: .1rem;
+ font-size: 0.875rem;
+ color: #fff;
+ background-color: rgba(231, 76, 60, 0.9);
+ border-radius: 0.25rem;
+}
+
+.was-validated :invalid ~ .invalid-feedback,
+.was-validated :invalid ~ .invalid-tooltip,
+.is-invalid ~ .invalid-feedback,
+.is-invalid ~ .invalid-tooltip {
+ display: block;
+}
+
+.was-validated .form-control:invalid, .form-control.is-invalid {
+ border-color: #e74c3c;
+ padding-right: calc(1.5em + 0.75rem);
+ background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23e74c3c'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23e74c3c' stroke='none'/%3e%3c/svg%3e");
+ background-repeat: no-repeat;
+ background-position: right calc(0.375em + 0.1875rem) center;
+ background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
+}
+
+.was-validated .form-control:invalid:focus, .form-control.is-invalid:focus {
+ border-color: #e74c3c;
+ box-shadow: 0 0 0 0.25rem rgba(231, 76, 60, 0.25);
+}
+
+.was-validated textarea.form-control:invalid, textarea.form-control.is-invalid {
+ padding-right: calc(1.5em + 0.75rem);
+ background-position: top calc(0.375em + 0.1875rem) right calc(0.375em + 0.1875rem);
+}
+
+.was-validated .form-select:invalid, .form-select.is-invalid {
+ border-color: #e74c3c;
+}
+
+.was-validated .form-select:invalid:not([multiple]):not([size]), .was-validated .form-select:invalid:not([multiple])[size="1"], .form-select.is-invalid:not([multiple]):not([size]), .form-select.is-invalid:not([multiple])[size="1"] {
+ padding-right: 4.125rem;
+ background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23303030' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e"), url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23e74c3c'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23e74c3c' stroke='none'/%3e%3c/svg%3e");
+ background-position: right 0.75rem center, center right 2.25rem;
+ background-size: 16px 12px, calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
+}
+
+.was-validated .form-select:invalid:focus, .form-select.is-invalid:focus {
+ border-color: #e74c3c;
+ box-shadow: 0 0 0 0.25rem rgba(231, 76, 60, 0.25);
+}
+
+.was-validated .form-check-input:invalid, .form-check-input.is-invalid {
+ border-color: #e74c3c;
+}
+
+.was-validated .form-check-input:invalid:checked, .form-check-input.is-invalid:checked {
+ background-color: #e74c3c;
+}
+
+.was-validated .form-check-input:invalid:focus, .form-check-input.is-invalid:focus {
+ box-shadow: 0 0 0 0.25rem rgba(231, 76, 60, 0.25);
+}
+
+.was-validated .form-check-input:invalid ~ .form-check-label, .form-check-input.is-invalid ~ .form-check-label {
+ color: #e74c3c;
+}
+
+.form-check-inline .form-check-input ~ .invalid-feedback {
+ margin-left: .5em;
+}
+
+.was-validated .input-group .form-control:invalid, .input-group .form-control.is-invalid, .was-validated
+.input-group .form-select:invalid,
+.input-group .form-select.is-invalid {
+ z-index: 2;
+}
+
+.was-validated .input-group .form-control:invalid:focus, .input-group .form-control.is-invalid:focus, .was-validated
+.input-group .form-select:invalid:focus,
+.input-group .form-select.is-invalid:focus {
+ z-index: 3;
+}
+
+.btn {
+ display: inline-block;
+ font-weight: 400;
+ line-height: 1.5;
+ color: #fff;
+ text-align: center;
+ text-decoration: none;
+ vertical-align: middle;
+ cursor: pointer;
+ -webkit-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+ background-color: transparent;
+ border: 1px solid transparent;
+ padding: 0.375rem 0.75rem;
+ font-size: 1rem;
+ border-radius: 0.25rem;
+ transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
+}
+
+@media (prefers-reduced-motion: reduce) {
+ .btn {
+ transition: none;
+ }
+}
+
+.btn:hover {
+ color: #fff;
+}
+
+.btn-check:focus + .btn, .btn:focus {
+ outline: 0;
+ box-shadow: 0 0 0 0.25rem rgba(55, 90, 127, 0.25);
+}
+
+.btn:disabled, .btn.disabled,
+fieldset:disabled .btn {
+ pointer-events: none;
+ opacity: 0.65;
+}
+
+.btn-primary {
+ color: #fff;
+ background-color: #375a7f;
+ border-color: #375a7f;
+}
+
+.btn-primary:hover {
+ color: #fff;
+ background-color: #2f4d6c;
+ border-color: #2c4866;
+}
+
+.btn-check:focus + .btn-primary, .btn-primary:focus {
+ color: #fff;
+ background-color: #2f4d6c;
+ border-color: #2c4866;
+ box-shadow: 0 0 0 0.25rem rgba(85, 115, 146, 0.5);
+}
+
+.btn-check:checked + .btn-primary,
+.btn-check:active + .btn-primary, .btn-primary:active, .btn-primary.active,
+.show > .btn-primary.dropdown-toggle {
+ color: #fff;
+ background-color: #2c4866;
+ border-color: #29445f;
+}
+
+.btn-check:checked + .btn-primary:focus,
+.btn-check:active + .btn-primary:focus, .btn-primary:active:focus, .btn-primary.active:focus,
+.show > .btn-primary.dropdown-toggle:focus {
+ box-shadow: 0 0 0 0.25rem rgba(85, 115, 146, 0.5);
+}
+
+.btn-primary:disabled, .btn-primary.disabled {
+ color: #fff;
+ background-color: #375a7f;
+ border-color: #375a7f;
+}
+
+.btn-secondary {
+ color: #fff;
+ background-color: #444;
+ border-color: #444;
+}
+
+.btn-secondary:hover {
+ color: #fff;
+ background-color: #3a3a3a;
+ border-color: #363636;
+}
+
+.btn-check:focus + .btn-secondary, .btn-secondary:focus {
+ color: #fff;
+ background-color: #3a3a3a;
+ border-color: #363636;
+ box-shadow: 0 0 0 0.25rem rgba(96, 96, 96, 0.5);
+}
+
+.btn-check:checked + .btn-secondary,
+.btn-check:active + .btn-secondary, .btn-secondary:active, .btn-secondary.active,
+.show > .btn-secondary.dropdown-toggle {
+ color: #fff;
+ background-color: #363636;
+ border-color: #333333;
+}
+
+.btn-check:checked + .btn-secondary:focus,
+.btn-check:active + .btn-secondary:focus, .btn-secondary:active:focus, .btn-secondary.active:focus,
+.show > .btn-secondary.dropdown-toggle:focus {
+ box-shadow: 0 0 0 0.25rem rgba(96, 96, 96, 0.5);
+}
+
+.btn-secondary:disabled, .btn-secondary.disabled {
+ color: #fff;
+ background-color: #444;
+ border-color: #444;
+}
+
+.btn-success {
+ color: #fff;
+ background-color: #00bc8c;
+ border-color: #00bc8c;
+}
+
+.btn-success:hover {
+ color: #fff;
+ background-color: #00a077;
+ border-color: #009670;
+}
+
+.btn-check:focus + .btn-success, .btn-success:focus {
+ color: #fff;
+ background-color: #00a077;
+ border-color: #009670;
+ box-shadow: 0 0 0 0.25rem rgba(38, 198, 157, 0.5);
+}
+
+.btn-check:checked + .btn-success,
+.btn-check:active + .btn-success, .btn-success:active, .btn-success.active,
+.show > .btn-success.dropdown-toggle {
+ color: #fff;
+ background-color: #009670;
+ border-color: #008d69;
+}
+
+.btn-check:checked + .btn-success:focus,
+.btn-check:active + .btn-success:focus, .btn-success:active:focus, .btn-success.active:focus,
+.show > .btn-success.dropdown-toggle:focus {
+ box-shadow: 0 0 0 0.25rem rgba(38, 198, 157, 0.5);
+}
+
+.btn-success:disabled, .btn-success.disabled {
+ color: #fff;
+ background-color: #00bc8c;
+ border-color: #00bc8c;
+}
+
+.btn-info {
+ color: #fff;
+ background-color: #3498db;
+ border-color: #3498db;
+}
+
+.btn-info:hover {
+ color: #fff;
+ background-color: #2c81ba;
+ border-color: #2a7aaf;
+}
+
+.btn-check:focus + .btn-info, .btn-info:focus {
+ color: #fff;
+ background-color: #2c81ba;
+ border-color: #2a7aaf;
+ box-shadow: 0 0 0 0.25rem rgba(82, 167, 224, 0.5);
+}
+
+.btn-check:checked + .btn-info,
+.btn-check:active + .btn-info, .btn-info:active, .btn-info.active,
+.show > .btn-info.dropdown-toggle {
+ color: #fff;
+ background-color: #2a7aaf;
+ border-color: #2772a4;
+}
+
+.btn-check:checked + .btn-info:focus,
+.btn-check:active + .btn-info:focus, .btn-info:active:focus, .btn-info.active:focus,
+.show > .btn-info.dropdown-toggle:focus {
+ box-shadow: 0 0 0 0.25rem rgba(82, 167, 224, 0.5);
+}
+
+.btn-info:disabled, .btn-info.disabled {
+ color: #fff;
+ background-color: #3498db;
+ border-color: #3498db;
+}
+
+.btn-warning {
+ color: #fff;
+ background-color: #f39c12;
+ border-color: #f39c12;
+}
+
+.btn-warning:hover {
+ color: #fff;
+ background-color: #cf850f;
+ border-color: #c27d0e;
+}
+
+.btn-check:focus + .btn-warning, .btn-warning:focus {
+ color: #fff;
+ background-color: #cf850f;
+ border-color: #c27d0e;
+ box-shadow: 0 0 0 0.25rem rgba(245, 171, 54, 0.5);
+}
+
+.btn-check:checked + .btn-warning,
+.btn-check:active + .btn-warning, .btn-warning:active, .btn-warning.active,
+.show > .btn-warning.dropdown-toggle {
+ color: #fff;
+ background-color: #c27d0e;
+ border-color: #b6750e;
+}
+
+.btn-check:checked + .btn-warning:focus,
+.btn-check:active + .btn-warning:focus, .btn-warning:active:focus, .btn-warning.active:focus,
+.show > .btn-warning.dropdown-toggle:focus {
+ box-shadow: 0 0 0 0.25rem rgba(245, 171, 54, 0.5);
+}
+
+.btn-warning:disabled, .btn-warning.disabled {
+ color: #fff;
+ background-color: #f39c12;
+ border-color: #f39c12;
+}
+
+.btn-danger {
+ color: #fff;
+ background-color: #e74c3c;
+ border-color: #e74c3c;
+}
+
+.btn-danger:hover {
+ color: #fff;
+ background-color: #c44133;
+ border-color: #b93d30;
+}
+
+.btn-check:focus + .btn-danger, .btn-danger:focus {
+ color: #fff;
+ background-color: #c44133;
+ border-color: #b93d30;
+ box-shadow: 0 0 0 0.25rem rgba(235, 103, 89, 0.5);
+}
+
+.btn-check:checked + .btn-danger,
+.btn-check:active + .btn-danger, .btn-danger:active, .btn-danger.active,
+.show > .btn-danger.dropdown-toggle {
+ color: #fff;
+ background-color: #b93d30;
+ border-color: #ad392d;
+}
+
+.btn-check:checked + .btn-danger:focus,
+.btn-check:active + .btn-danger:focus, .btn-danger:active:focus, .btn-danger.active:focus,
+.show > .btn-danger.dropdown-toggle:focus {
+ box-shadow: 0 0 0 0.25rem rgba(235, 103, 89, 0.5);
+}
+
+.btn-danger:disabled, .btn-danger.disabled {
+ color: #fff;
+ background-color: #e74c3c;
+ border-color: #e74c3c;
+}
+
+.btn-light {
+ color: #000;
+ background-color: #adb5bd;
+ border-color: #adb5bd;
+}
+
+.btn-light:hover {
+ color: #000;
+ background-color: #b9c0c7;
+ border-color: #b5bcc4;
+}
+
+.btn-check:focus + .btn-light, .btn-light:focus {
+ color: #000;
+ background-color: #b9c0c7;
+ border-color: #b5bcc4;
+ box-shadow: 0 0 0 0.25rem rgba(147, 154, 161, 0.5);
+}
+
+.btn-check:checked + .btn-light,
+.btn-check:active + .btn-light, .btn-light:active, .btn-light.active,
+.show > .btn-light.dropdown-toggle {
+ color: #000;
+ background-color: #bdc4ca;
+ border-color: #b5bcc4;
+}
+
+.btn-check:checked + .btn-light:focus,
+.btn-check:active + .btn-light:focus, .btn-light:active:focus, .btn-light.active:focus,
+.show > .btn-light.dropdown-toggle:focus {
+ box-shadow: 0 0 0 0.25rem rgba(147, 154, 161, 0.5);
+}
+
+.btn-light:disabled, .btn-light.disabled {
+ color: #000;
+ background-color: #adb5bd;
+ border-color: #adb5bd;
+}
+
+.btn-dark {
+ color: #fff;
+ background-color: #303030;
+ border-color: #303030;
+}
+
+.btn-dark:hover {
+ color: #fff;
+ background-color: #292929;
+ border-color: #262626;
+}
+
+.btn-check:focus + .btn-dark, .btn-dark:focus {
+ color: #fff;
+ background-color: #292929;
+ border-color: #262626;
+ box-shadow: 0 0 0 0.25rem rgba(79, 79, 79, 0.5);
+}
+
+.btn-check:checked + .btn-dark,
+.btn-check:active + .btn-dark, .btn-dark:active, .btn-dark.active,
+.show > .btn-dark.dropdown-toggle {
+ color: #fff;
+ background-color: #262626;
+ border-color: #242424;
+}
+
+.btn-check:checked + .btn-dark:focus,
+.btn-check:active + .btn-dark:focus, .btn-dark:active:focus, .btn-dark.active:focus,
+.show > .btn-dark.dropdown-toggle:focus {
+ box-shadow: 0 0 0 0.25rem rgba(79, 79, 79, 0.5);
+}
+
+.btn-dark:disabled, .btn-dark.disabled {
+ color: #fff;
+ background-color: #303030;
+ border-color: #303030;
+}
+
+.btn-outline-primary {
+ color: #375a7f;
+ border-color: #375a7f;
+}
+
+.btn-outline-primary:hover {
+ color: #fff;
+ background-color: #375a7f;
+ border-color: #375a7f;
+}
+
+.btn-check:focus + .btn-outline-primary, .btn-outline-primary:focus {
+ box-shadow: 0 0 0 0.25rem rgba(55, 90, 127, 0.5);
+}
+
+.btn-check:checked + .btn-outline-primary,
+.btn-check:active + .btn-outline-primary, .btn-outline-primary:active, .btn-outline-primary.active, .btn-outline-primary.dropdown-toggle.show {
+ color: #fff;
+ background-color: #375a7f;
+ border-color: #375a7f;
+}
+
+.btn-check:checked + .btn-outline-primary:focus,
+.btn-check:active + .btn-outline-primary:focus, .btn-outline-primary:active:focus, .btn-outline-primary.active:focus, .btn-outline-primary.dropdown-toggle.show:focus {
+ box-shadow: 0 0 0 0.25rem rgba(55, 90, 127, 0.5);
+}
+
+.btn-outline-primary:disabled, .btn-outline-primary.disabled {
+ color: #375a7f;
+ background-color: transparent;
+}
+
+.btn-outline-secondary {
+ color: #444;
+ border-color: #444;
+}
+
+.btn-outline-secondary:hover {
+ color: #fff;
+ background-color: #444;
+ border-color: #444;
+}
+
+.btn-check:focus + .btn-outline-secondary, .btn-outline-secondary:focus {
+ box-shadow: 0 0 0 0.25rem rgba(68, 68, 68, 0.5);
+}
+
+.btn-check:checked + .btn-outline-secondary,
+.btn-check:active + .btn-outline-secondary, .btn-outline-secondary:active, .btn-outline-secondary.active, .btn-outline-secondary.dropdown-toggle.show {
+ color: #fff;
+ background-color: #444;
+ border-color: #444;
+}
+
+.btn-check:checked + .btn-outline-secondary:focus,
+.btn-check:active + .btn-outline-secondary:focus, .btn-outline-secondary:active:focus, .btn-outline-secondary.active:focus, .btn-outline-secondary.dropdown-toggle.show:focus {
+ box-shadow: 0 0 0 0.25rem rgba(68, 68, 68, 0.5);
+}
+
+.btn-outline-secondary:disabled, .btn-outline-secondary.disabled {
+ color: #444;
+ background-color: transparent;
+}
+
+.btn-outline-success {
+ color: #00bc8c;
+ border-color: #00bc8c;
+}
+
+.btn-outline-success:hover {
+ color: #fff;
+ background-color: #00bc8c;
+ border-color: #00bc8c;
+}
+
+.btn-check:focus + .btn-outline-success, .btn-outline-success:focus {
+ box-shadow: 0 0 0 0.25rem rgba(0, 188, 140, 0.5);
+}
+
+.btn-check:checked + .btn-outline-success,
+.btn-check:active + .btn-outline-success, .btn-outline-success:active, .btn-outline-success.active, .btn-outline-success.dropdown-toggle.show {
+ color: #fff;
+ background-color: #00bc8c;
+ border-color: #00bc8c;
+}
+
+.btn-check:checked + .btn-outline-success:focus,
+.btn-check:active + .btn-outline-success:focus, .btn-outline-success:active:focus, .btn-outline-success.active:focus, .btn-outline-success.dropdown-toggle.show:focus {
+ box-shadow: 0 0 0 0.25rem rgba(0, 188, 140, 0.5);
+}
+
+.btn-outline-success:disabled, .btn-outline-success.disabled {
+ color: #00bc8c;
+ background-color: transparent;
+}
+
+.btn-outline-info {
+ color: #3498db;
+ border-color: #3498db;
+}
+
+.btn-outline-info:hover {
+ color: #fff;
+ background-color: #3498db;
+ border-color: #3498db;
+}
+
+.btn-check:focus + .btn-outline-info, .btn-outline-info:focus {
+ box-shadow: 0 0 0 0.25rem rgba(52, 152, 219, 0.5);
+}
+
+.btn-check:checked + .btn-outline-info,
+.btn-check:active + .btn-outline-info, .btn-outline-info:active, .btn-outline-info.active, .btn-outline-info.dropdown-toggle.show {
+ color: #fff;
+ background-color: #3498db;
+ border-color: #3498db;
+}
+
+.btn-check:checked + .btn-outline-info:focus,
+.btn-check:active + .btn-outline-info:focus, .btn-outline-info:active:focus, .btn-outline-info.active:focus, .btn-outline-info.dropdown-toggle.show:focus {
+ box-shadow: 0 0 0 0.25rem rgba(52, 152, 219, 0.5);
+}
+
+.btn-outline-info:disabled, .btn-outline-info.disabled {
+ color: #3498db;
+ background-color: transparent;
+}
+
+.btn-outline-warning {
+ color: #f39c12;
+ border-color: #f39c12;
+}
+
+.btn-outline-warning:hover {
+ color: #fff;
+ background-color: #f39c12;
+ border-color: #f39c12;
+}
+
+.btn-check:focus + .btn-outline-warning, .btn-outline-warning:focus {
+ box-shadow: 0 0 0 0.25rem rgba(243, 156, 18, 0.5);
+}
+
+.btn-check:checked + .btn-outline-warning,
+.btn-check:active + .btn-outline-warning, .btn-outline-warning:active, .btn-outline-warning.active, .btn-outline-warning.dropdown-toggle.show {
+ color: #fff;
+ background-color: #f39c12;
+ border-color: #f39c12;
+}
+
+.btn-check:checked + .btn-outline-warning:focus,
+.btn-check:active + .btn-outline-warning:focus, .btn-outline-warning:active:focus, .btn-outline-warning.active:focus, .btn-outline-warning.dropdown-toggle.show:focus {
+ box-shadow: 0 0 0 0.25rem rgba(243, 156, 18, 0.5);
+}
+
+.btn-outline-warning:disabled, .btn-outline-warning.disabled {
+ color: #f39c12;
+ background-color: transparent;
+}
+
+.btn-outline-danger {
+ color: #e74c3c;
+ border-color: #e74c3c;
+}
+
+.btn-outline-danger:hover {
+ color: #fff;
+ background-color: #e74c3c;
+ border-color: #e74c3c;
+}
+
+.btn-check:focus + .btn-outline-danger, .btn-outline-danger:focus {
+ box-shadow: 0 0 0 0.25rem rgba(231, 76, 60, 0.5);
+}
+
+.btn-check:checked + .btn-outline-danger,
+.btn-check:active + .btn-outline-danger, .btn-outline-danger:active, .btn-outline-danger.active, .btn-outline-danger.dropdown-toggle.show {
+ color: #fff;
+ background-color: #e74c3c;
+ border-color: #e74c3c;
+}
+
+.btn-check:checked + .btn-outline-danger:focus,
+.btn-check:active + .btn-outline-danger:focus, .btn-outline-danger:active:focus, .btn-outline-danger.active:focus, .btn-outline-danger.dropdown-toggle.show:focus {
+ box-shadow: 0 0 0 0.25rem rgba(231, 76, 60, 0.5);
+}
+
+.btn-outline-danger:disabled, .btn-outline-danger.disabled {
+ color: #e74c3c;
+ background-color: transparent;
+}
+
+.btn-outline-light {
+ color: #adb5bd;
+ border-color: #adb5bd;
+}
+
+.btn-outline-light:hover {
+ color: #000;
+ background-color: #adb5bd;
+ border-color: #adb5bd;
+}
+
+.btn-check:focus + .btn-outline-light, .btn-outline-light:focus {
+ box-shadow: 0 0 0 0.25rem rgba(173, 181, 189, 0.5);
+}
+
+.btn-check:checked + .btn-outline-light,
+.btn-check:active + .btn-outline-light, .btn-outline-light:active, .btn-outline-light.active, .btn-outline-light.dropdown-toggle.show {
+ color: #000;
+ background-color: #adb5bd;
+ border-color: #adb5bd;
+}
+
+.btn-check:checked + .btn-outline-light:focus,
+.btn-check:active + .btn-outline-light:focus, .btn-outline-light:active:focus, .btn-outline-light.active:focus, .btn-outline-light.dropdown-toggle.show:focus {
+ box-shadow: 0 0 0 0.25rem rgba(173, 181, 189, 0.5);
+}
+
+.btn-outline-light:disabled, .btn-outline-light.disabled {
+ color: #adb5bd;
+ background-color: transparent;
+}
+
+.btn-outline-dark {
+ color: #303030;
+ border-color: #303030;
+}
+
+.btn-outline-dark:hover {
+ color: #fff;
+ background-color: #303030;
+ border-color: #303030;
+}
+
+.btn-check:focus + .btn-outline-dark, .btn-outline-dark:focus {
+ box-shadow: 0 0 0 0.25rem rgba(48, 48, 48, 0.5);
+}
+
+.btn-check:checked + .btn-outline-dark,
+.btn-check:active + .btn-outline-dark, .btn-outline-dark:active, .btn-outline-dark.active, .btn-outline-dark.dropdown-toggle.show {
+ color: #fff;
+ background-color: #303030;
+ border-color: #303030;
+}
+
+.btn-check:checked + .btn-outline-dark:focus,
+.btn-check:active + .btn-outline-dark:focus, .btn-outline-dark:active:focus, .btn-outline-dark.active:focus, .btn-outline-dark.dropdown-toggle.show:focus {
+ box-shadow: 0 0 0 0.25rem rgba(48, 48, 48, 0.5);
+}
+
+.btn-outline-dark:disabled, .btn-outline-dark.disabled {
+ color: #303030;
+ background-color: transparent;
+}
+
+.btn-link {
+ font-weight: 400;
+ color: #00bc8c;
+ text-decoration: underline;
+}
+
+.btn-link:hover {
+ color: #009670;
+}
+
+.btn-link:disabled, .btn-link.disabled {
+ color: #888;
+}
+
+.btn-lg, .btn-group-lg > .btn {
+ padding: 0.5rem 1rem;
+ font-size: 1.25rem;
+ border-radius: 0.3rem;
+}
+
+.btn-sm, .btn-group-sm > .btn {
+ padding: 0.25rem 0.5rem;
+ font-size: 0.875rem;
+ border-radius: 0.2rem;
+}
+
+.fade {
+ transition: opacity 0.15s linear;
+}
+
+@media (prefers-reduced-motion: reduce) {
+ .fade {
+ transition: none;
+ }
+}
+
+.fade:not(.show) {
+ opacity: 0;
+}
+
+.collapse:not(.show) {
+ display: none;
+}
+
+.collapsing {
+ height: 0;
+ overflow: hidden;
+ transition: height 0.35s ease;
+}
+
+@media (prefers-reduced-motion: reduce) {
+ .collapsing {
+ transition: none;
+ }
+}
+
+.dropup,
+.dropend,
+.dropdown,
+.dropstart {
+ position: relative;
+}
+
+.dropdown-toggle {
+ white-space: nowrap;
+}
+
+.dropdown-toggle::after {
+ display: inline-block;
+ margin-left: 0.255em;
+ vertical-align: 0.255em;
+ content: "";
+ border-top: 0.3em solid;
+ border-right: 0.3em solid transparent;
+ border-bottom: 0;
+ border-left: 0.3em solid transparent;
+}
+
+.dropdown-toggle:empty::after {
+ margin-left: 0;
+}
+
+.dropdown-menu {
+ position: absolute;
+ z-index: 1000;
+ display: none;
+ min-width: 10rem;
+ padding: 0.5rem 0;
+ margin: 0;
+ font-size: 1rem;
+ color: #fff;
+ text-align: left;
+ list-style: none;
+ background-color: #222;
+ background-clip: padding-box;
+ border: 1px solid #444;
+ border-radius: 0.25rem;
+}
+
+.dropdown-menu[data-bs-popper] {
+ top: 100%;
+ left: 0;
+ margin-top: 0.125rem;
+}
+
+.dropdown-menu-start {
+ --bs-position: start;
+}
+
+.dropdown-menu-start[data-bs-popper] {
+ right: auto /* rtl:ignore */;
+ left: 0 /* rtl:ignore */;
+}
+
+.dropdown-menu-end {
+ --bs-position: end;
+}
+
+.dropdown-menu-end[data-bs-popper] {
+ right: 0 /* rtl:ignore */;
+ left: auto /* rtl:ignore */;
+}
+
+@media (min-width: 576px) {
+ .dropdown-menu-sm-start {
+ --bs-position: start;
+ }
+ .dropdown-menu-sm-start[data-bs-popper] {
+ right: auto /* rtl:ignore */;
+ left: 0 /* rtl:ignore */;
+ }
+ .dropdown-menu-sm-end {
+ --bs-position: end;
+ }
+ .dropdown-menu-sm-end[data-bs-popper] {
+ right: 0 /* rtl:ignore */;
+ left: auto /* rtl:ignore */;
+ }
+}
+
+@media (min-width: 768px) {
+ .dropdown-menu-md-start {
+ --bs-position: start;
+ }
+ .dropdown-menu-md-start[data-bs-popper] {
+ right: auto /* rtl:ignore */;
+ left: 0 /* rtl:ignore */;
+ }
+ .dropdown-menu-md-end {
+ --bs-position: end;
+ }
+ .dropdown-menu-md-end[data-bs-popper] {
+ right: 0 /* rtl:ignore */;
+ left: auto /* rtl:ignore */;
+ }
+}
+
+@media (min-width: 992px) {
+ .dropdown-menu-lg-start {
+ --bs-position: start;
+ }
+ .dropdown-menu-lg-start[data-bs-popper] {
+ right: auto /* rtl:ignore */;
+ left: 0 /* rtl:ignore */;
+ }
+ .dropdown-menu-lg-end {
+ --bs-position: end;
+ }
+ .dropdown-menu-lg-end[data-bs-popper] {
+ right: 0 /* rtl:ignore */;
+ left: auto /* rtl:ignore */;
+ }
+}
+
+@media (min-width: 1200px) {
+ .dropdown-menu-xl-start {
+ --bs-position: start;
+ }
+ .dropdown-menu-xl-start[data-bs-popper] {
+ right: auto /* rtl:ignore */;
+ left: 0 /* rtl:ignore */;
+ }
+ .dropdown-menu-xl-end {
+ --bs-position: end;
+ }
+ .dropdown-menu-xl-end[data-bs-popper] {
+ right: 0 /* rtl:ignore */;
+ left: auto /* rtl:ignore */;
+ }
+}
+
+@media (min-width: 1400px) {
+ .dropdown-menu-xxl-start {
+ --bs-position: start;
+ }
+ .dropdown-menu-xxl-start[data-bs-popper] {
+ right: auto /* rtl:ignore */;
+ left: 0 /* rtl:ignore */;
+ }
+ .dropdown-menu-xxl-end {
+ --bs-position: end;
+ }
+ .dropdown-menu-xxl-end[data-bs-popper] {
+ right: 0 /* rtl:ignore */;
+ left: auto /* rtl:ignore */;
+ }
+}
+
+.dropup .dropdown-menu[data-bs-popper] {
+ top: auto;
+ bottom: 100%;
+ margin-top: 0;
+ margin-bottom: 0.125rem;
+}
+
+.dropup .dropdown-toggle::after {
+ display: inline-block;
+ margin-left: 0.255em;
+ vertical-align: 0.255em;
+ content: "";
+ border-top: 0;
+ border-right: 0.3em solid transparent;
+ border-bottom: 0.3em solid;
+ border-left: 0.3em solid transparent;
+}
+
+.dropup .dropdown-toggle:empty::after {
+ margin-left: 0;
+}
+
+.dropend .dropdown-menu[data-bs-popper] {
+ top: 0;
+ right: auto;
+ left: 100%;
+ margin-top: 0;
+ margin-left: 0.125rem;
+}
+
+.dropend .dropdown-toggle::after {
+ display: inline-block;
+ margin-left: 0.255em;
+ vertical-align: 0.255em;
+ content: "";
+ border-top: 0.3em solid transparent;
+ border-right: 0;
+ border-bottom: 0.3em solid transparent;
+ border-left: 0.3em solid;
+}
+
+.dropend .dropdown-toggle:empty::after {
+ margin-left: 0;
+}
+
+.dropend .dropdown-toggle::after {
+ vertical-align: 0;
+}
+
+.dropstart .dropdown-menu[data-bs-popper] {
+ top: 0;
+ right: 100%;
+ left: auto;
+ margin-top: 0;
+ margin-right: 0.125rem;
+}
+
+.dropstart .dropdown-toggle::after {
+ display: inline-block;
+ margin-left: 0.255em;
+ vertical-align: 0.255em;
+ content: "";
+}
+
+.dropstart .dropdown-toggle::after {
+ display: none;
+}
+
+.dropstart .dropdown-toggle::before {
+ display: inline-block;
+ margin-right: 0.255em;
+ vertical-align: 0.255em;
+ content: "";
+ border-top: 0.3em solid transparent;
+ border-right: 0.3em solid;
+ border-bottom: 0.3em solid transparent;
+}
+
+.dropstart .dropdown-toggle:empty::after {
+ margin-left: 0;
+}
+
+.dropstart .dropdown-toggle::before {
+ vertical-align: 0;
+}
+
+.dropdown-divider {
+ height: 0;
+ margin: 0.5rem 0;
+ overflow: hidden;
+ border-top: 1px solid #444;
+}
+
+.dropdown-item {
+ display: block;
+ width: 100%;
+ padding: 0.25rem 1rem;
+ clear: both;
+ font-weight: 400;
+ color: #fff;
+ text-align: inherit;
+ text-decoration: none;
+ white-space: nowrap;
+ background-color: transparent;
+ border: 0;
+}
+
+.dropdown-item:hover, .dropdown-item:focus {
+ color: #fff;
+ background-color: #375a7f;
+}
+
+.dropdown-item.active, .dropdown-item:active {
+ color: #fff;
+ text-decoration: none;
+ background-color: #375a7f;
+}
+
+.dropdown-item.disabled, .dropdown-item:disabled {
+ color: #adb5bd;
+ pointer-events: none;
+ background-color: transparent;
+}
+
+.dropdown-menu.show {
+ display: block;
+}
+
+.dropdown-header {
+ display: block;
+ padding: 0.5rem 1rem;
+ margin-bottom: 0;
+ font-size: 0.875rem;
+ color: #888;
+ white-space: nowrap;
+}
+
+.dropdown-item-text {
+ display: block;
+ padding: 0.25rem 1rem;
+ color: #fff;
+}
+
+.dropdown-menu-dark {
+ color: #dee2e6;
+ background-color: #303030;
+ border-color: #444;
+}
+
+.dropdown-menu-dark .dropdown-item {
+ color: #dee2e6;
+}
+
+.dropdown-menu-dark .dropdown-item:hover, .dropdown-menu-dark .dropdown-item:focus {
+ color: #fff;
+ background-color: rgba(255, 255, 255, 0.15);
+}
+
+.dropdown-menu-dark .dropdown-item.active, .dropdown-menu-dark .dropdown-item:active {
+ color: #fff;
+ background-color: #375a7f;
+}
+
+.dropdown-menu-dark .dropdown-item.disabled, .dropdown-menu-dark .dropdown-item:disabled {
+ color: #adb5bd;
+}
+
+.dropdown-menu-dark .dropdown-divider {
+ border-color: #444;
+}
+
+.dropdown-menu-dark .dropdown-item-text {
+ color: #dee2e6;
+}
+
+.dropdown-menu-dark .dropdown-header {
+ color: #adb5bd;
+}
+
+.btn-group,
+.btn-group-vertical {
+ position: relative;
+ display: -ms-inline-flexbox;
+ display: inline-flex;
+ vertical-align: middle;
+}
+
+.btn-group > .btn,
+.btn-group-vertical > .btn {
+ position: relative;
+ -ms-flex: 1 1 auto;
+ flex: 1 1 auto;
+}
+
+.btn-group > .btn-check:checked + .btn,
+.btn-group > .btn-check:focus + .btn,
+.btn-group > .btn:hover,
+.btn-group > .btn:focus,
+.btn-group > .btn:active,
+.btn-group > .btn.active,
+.btn-group-vertical > .btn-check:checked + .btn,
+.btn-group-vertical > .btn-check:focus + .btn,
+.btn-group-vertical > .btn:hover,
+.btn-group-vertical > .btn:focus,
+.btn-group-vertical > .btn:active,
+.btn-group-vertical > .btn.active {
+ z-index: 1;
+}
+
+.btn-toolbar {
+ display: -ms-flexbox;
+ display: flex;
+ -ms-flex-wrap: wrap;
+ flex-wrap: wrap;
+ -ms-flex-pack: start;
+ justify-content: flex-start;
+}
+
+.btn-toolbar .input-group {
+ width: auto;
+}
+
+.btn-group > .btn:not(:first-child),
+.btn-group > .btn-group:not(:first-child) {
+ margin-left: -1px;
+}
+
+.btn-group > .btn:not(:last-child):not(.dropdown-toggle),
+.btn-group > .btn-group:not(:last-child) > .btn {
+ border-top-right-radius: 0;
+ border-bottom-right-radius: 0;
+}
+
+.btn-group > .btn:nth-child(n + 3),
+.btn-group > :not(.btn-check) + .btn,
+.btn-group > .btn-group:not(:first-child) > .btn {
+ border-top-left-radius: 0;
+ border-bottom-left-radius: 0;
+}
+
+.dropdown-toggle-split {
+ padding-right: 0.5625rem;
+ padding-left: 0.5625rem;
+}
+
+.dropdown-toggle-split::after,
+.dropup .dropdown-toggle-split::after,
+.dropend .dropdown-toggle-split::after {
+ margin-left: 0;
+}
+
+.dropstart .dropdown-toggle-split::before {
+ margin-right: 0;
+}
+
+.btn-sm + .dropdown-toggle-split, .btn-group-sm > .btn + .dropdown-toggle-split {
+ padding-right: 0.375rem;
+ padding-left: 0.375rem;
+}
+
+.btn-lg + .dropdown-toggle-split, .btn-group-lg > .btn + .dropdown-toggle-split {
+ padding-right: 0.75rem;
+ padding-left: 0.75rem;
+}
+
+.btn-group-vertical {
+ -ms-flex-direction: column;
+ flex-direction: column;
+ -ms-flex-align: start;
+ align-items: flex-start;
+ -ms-flex-pack: center;
+ justify-content: center;
+}
+
+.btn-group-vertical > .btn,
+.btn-group-vertical > .btn-group {
+ width: 100%;
+}
+
+.btn-group-vertical > .btn:not(:first-child),
+.btn-group-vertical > .btn-group:not(:first-child) {
+ margin-top: -1px;
+}
+
+.btn-group-vertical > .btn:not(:last-child):not(.dropdown-toggle),
+.btn-group-vertical > .btn-group:not(:last-child) > .btn {
+ border-bottom-right-radius: 0;
+ border-bottom-left-radius: 0;
+}
+
+.btn-group-vertical > .btn ~ .btn,
+.btn-group-vertical > .btn-group:not(:first-child) > .btn {
+ border-top-left-radius: 0;
+ border-top-right-radius: 0;
+}
+
+.nav {
+ display: -ms-flexbox;
+ display: flex;
+ -ms-flex-wrap: wrap;
+ flex-wrap: wrap;
+ padding-left: 0;
+ margin-bottom: 0;
+ list-style: none;
+}
+
+.nav-link {
+ display: block;
+ padding: 0.5rem 2rem;
+ color: #00bc8c;
+ text-decoration: none;
+ transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out;
+}
+
+@media (prefers-reduced-motion: reduce) {
+ .nav-link {
+ transition: none;
+ }
+}
+
+.nav-link:hover, .nav-link:focus {
+ color: #009670;
+}
+
+.nav-link.disabled {
+ color: #adb5bd;
+ pointer-events: none;
+ cursor: default;
+}
+
+.nav-tabs {
+ border-bottom: 1px solid #444;
+}
+
+.nav-tabs .nav-link {
+ margin-bottom: -1px;
+ background: none;
+ border: 1px solid transparent;
+ border-top-left-radius: 0.25rem;
+ border-top-right-radius: 0.25rem;
+}
+
+.nav-tabs .nav-link:hover, .nav-tabs .nav-link:focus {
+ border-color: #444 #444 transparent;
+ isolation: isolate;
+}
+
+.nav-tabs .nav-link.disabled {
+ color: #adb5bd;
+ background-color: transparent;
+ border-color: transparent;
+}
+
+.nav-tabs .nav-link.active,
+.nav-tabs .nav-item.show .nav-link {
+ color: #fff;
+ background-color: #222;
+ border-color: #444 #444 transparent;
+}
+
+.nav-tabs .dropdown-menu {
+ margin-top: -1px;
+ border-top-left-radius: 0;
+ border-top-right-radius: 0;
+}
+
+.nav-pills .nav-link {
+ background: none;
+ border: 0;
+ border-radius: 0.25rem;
+}
+
+.nav-pills .nav-link.active,
+.nav-pills .show > .nav-link {
+ color: #fff;
+ background-color: #375a7f;
+}
+
+.nav-fill > .nav-link,
+.nav-fill .nav-item {
+ -ms-flex: 1 1 auto;
+ flex: 1 1 auto;
+ text-align: center;
+}
+
+.nav-justified > .nav-link,
+.nav-justified .nav-item {
+ -ms-flex-preferred-size: 0;
+ flex-basis: 0;
+ -ms-flex-positive: 1;
+ flex-grow: 1;
+ text-align: center;
+}
+
+.nav-fill .nav-item .nav-link,
+.nav-justified .nav-item .nav-link {
+ width: 100%;
+}
+
+.tab-content > .tab-pane {
+ display: none;
+}
+
+.tab-content > .active {
+ display: block;
+}
+
+.navbar {
+ position: relative;
+ display: -ms-flexbox;
+ display: flex;
+ -ms-flex-wrap: wrap;
+ flex-wrap: wrap;
+ -ms-flex-align: center;
+ align-items: center;
+ -ms-flex-pack: justify;
+ justify-content: space-between;
+ padding-top: 1rem;
+ padding-bottom: 1rem;
+}
+
+.navbar > .container,
+.navbar > .container-fluid, .navbar > .container-sm, .navbar > .container-md, .navbar > .container-lg, .navbar > .container-xl, .navbar > .container-xxl {
+ display: -ms-flexbox;
+ display: flex;
+ -ms-flex-wrap: inherit;
+ flex-wrap: inherit;
+ -ms-flex-align: center;
+ align-items: center;
+ -ms-flex-pack: justify;
+ justify-content: space-between;
+}
+
+.navbar-brand {
+ padding-top: 0.3125rem;
+ padding-bottom: 0.3125rem;
+ margin-right: 1rem;
+ font-size: 1.25rem;
+ text-decoration: none;
+ white-space: nowrap;
+}
+
+.navbar-nav {
+ display: -ms-flexbox;
+ display: flex;
+ -ms-flex-direction: column;
+ flex-direction: column;
+ padding-left: 0;
+ margin-bottom: 0;
+ list-style: none;
+}
+
+.navbar-nav .nav-link {
+ padding-right: 0;
+ padding-left: 0;
+}
+
+.navbar-nav .dropdown-menu {
+ position: static;
+}
+
+.navbar-text {
+ padding-top: 0.5rem;
+ padding-bottom: 0.5rem;
+}
+
+.navbar-collapse {
+ -ms-flex-preferred-size: 100%;
+ flex-basis: 100%;
+ -ms-flex-positive: 1;
+ flex-grow: 1;
+ -ms-flex-align: center;
+ align-items: center;
+}
+
+.navbar-toggler {
+ padding: 0.25rem 0.75rem;
+ font-size: 1.25rem;
+ line-height: 1;
+ background-color: transparent;
+ border: 1px solid transparent;
+ border-radius: 0.25rem;
+ transition: box-shadow 0.15s ease-in-out;
+}
+
+@media (prefers-reduced-motion: reduce) {
+ .navbar-toggler {
+ transition: none;
+ }
+}
+
+.navbar-toggler:hover {
+ text-decoration: none;
+}
+
+.navbar-toggler:focus {
+ text-decoration: none;
+ outline: 0;
+ box-shadow: 0 0 0 0.25rem;
+}
+
+.navbar-toggler-icon {
+ display: inline-block;
+ width: 1.5em;
+ height: 1.5em;
+ vertical-align: middle;
+ background-repeat: no-repeat;
+ background-position: center;
+ background-size: 100%;
+}
+
+.navbar-nav-scroll {
+ max-height: var(--bs-scroll-height, 75vh);
+ overflow-y: auto;
+}
+
+@media (min-width: 576px) {
+ .navbar-expand-sm {
+ -ms-flex-wrap: nowrap;
+ flex-wrap: nowrap;
+ -ms-flex-pack: start;
+ justify-content: flex-start;
+ }
+ .navbar-expand-sm .navbar-nav {
+ -ms-flex-direction: row;
+ flex-direction: row;
+ }
+ .navbar-expand-sm .navbar-nav .dropdown-menu {
+ position: absolute;
+ }
+ .navbar-expand-sm .navbar-nav .nav-link {
+ padding-right: 0.5rem;
+ padding-left: 0.5rem;
+ }
+ .navbar-expand-sm .navbar-nav-scroll {
+ overflow: visible;
+ }
+ .navbar-expand-sm .navbar-collapse {
+ display: -ms-flexbox !important;
+ display: flex !important;
+ -ms-flex-preferred-size: auto;
+ flex-basis: auto;
+ }
+ .navbar-expand-sm .navbar-toggler {
+ display: none;
+ }
+}
+
+@media (min-width: 768px) {
+ .navbar-expand-md {
+ -ms-flex-wrap: nowrap;
+ flex-wrap: nowrap;
+ -ms-flex-pack: start;
+ justify-content: flex-start;
+ }
+ .navbar-expand-md .navbar-nav {
+ -ms-flex-direction: row;
+ flex-direction: row;
+ }
+ .navbar-expand-md .navbar-nav .dropdown-menu {
+ position: absolute;
+ }
+ .navbar-expand-md .navbar-nav .nav-link {
+ padding-right: 0.5rem;
+ padding-left: 0.5rem;
+ }
+ .navbar-expand-md .navbar-nav-scroll {
+ overflow: visible;
+ }
+ .navbar-expand-md .navbar-collapse {
+ display: -ms-flexbox !important;
+ display: flex !important;
+ -ms-flex-preferred-size: auto;
+ flex-basis: auto;
+ }
+ .navbar-expand-md .navbar-toggler {
+ display: none;
+ }
+}
+
+@media (min-width: 992px) {
+ .navbar-expand-lg {
+ -ms-flex-wrap: nowrap;
+ flex-wrap: nowrap;
+ -ms-flex-pack: start;
+ justify-content: flex-start;
+ }
+ .navbar-expand-lg .navbar-nav {
+ -ms-flex-direction: row;
+ flex-direction: row;
+ }
+ .navbar-expand-lg .navbar-nav .dropdown-menu {
+ position: absolute;
+ }
+ .navbar-expand-lg .navbar-nav .nav-link {
+ padding-right: 0.5rem;
+ padding-left: 0.5rem;
+ }
+ .navbar-expand-lg .navbar-nav-scroll {
+ overflow: visible;
+ }
+ .navbar-expand-lg .navbar-collapse {
+ display: -ms-flexbox !important;
+ display: flex !important;
+ -ms-flex-preferred-size: auto;
+ flex-basis: auto;
+ }
+ .navbar-expand-lg .navbar-toggler {
+ display: none;
+ }
+}
+
+@media (min-width: 1200px) {
+ .navbar-expand-xl {
+ -ms-flex-wrap: nowrap;
+ flex-wrap: nowrap;
+ -ms-flex-pack: start;
+ justify-content: flex-start;
+ }
+ .navbar-expand-xl .navbar-nav {
+ -ms-flex-direction: row;
+ flex-direction: row;
+ }
+ .navbar-expand-xl .navbar-nav .dropdown-menu {
+ position: absolute;
+ }
+ .navbar-expand-xl .navbar-nav .nav-link {
+ padding-right: 0.5rem;
+ padding-left: 0.5rem;
+ }
+ .navbar-expand-xl .navbar-nav-scroll {
+ overflow: visible;
+ }
+ .navbar-expand-xl .navbar-collapse {
+ display: -ms-flexbox !important;
+ display: flex !important;
+ -ms-flex-preferred-size: auto;
+ flex-basis: auto;
+ }
+ .navbar-expand-xl .navbar-toggler {
+ display: none;
+ }
+}
+
+@media (min-width: 1400px) {
+ .navbar-expand-xxl {
+ -ms-flex-wrap: nowrap;
+ flex-wrap: nowrap;
+ -ms-flex-pack: start;
+ justify-content: flex-start;
+ }
+ .navbar-expand-xxl .navbar-nav {
+ -ms-flex-direction: row;
+ flex-direction: row;
+ }
+ .navbar-expand-xxl .navbar-nav .dropdown-menu {
+ position: absolute;
+ }
+ .navbar-expand-xxl .navbar-nav .nav-link {
+ padding-right: 0.5rem;
+ padding-left: 0.5rem;
+ }
+ .navbar-expand-xxl .navbar-nav-scroll {
+ overflow: visible;
+ }
+ .navbar-expand-xxl .navbar-collapse {
+ display: -ms-flexbox !important;
+ display: flex !important;
+ -ms-flex-preferred-size: auto;
+ flex-basis: auto;
+ }
+ .navbar-expand-xxl .navbar-toggler {
+ display: none;
+ }
+}
+
+.navbar-expand {
+ -ms-flex-wrap: nowrap;
+ flex-wrap: nowrap;
+ -ms-flex-pack: start;
+ justify-content: flex-start;
+}
+
+.navbar-expand .navbar-nav {
+ -ms-flex-direction: row;
+ flex-direction: row;
+}
+
+.navbar-expand .navbar-nav .dropdown-menu {
+ position: absolute;
+}
+
+.navbar-expand .navbar-nav .nav-link {
+ padding-right: 0.5rem;
+ padding-left: 0.5rem;
+}
+
+.navbar-expand .navbar-nav-scroll {
+ overflow: visible;
+}
+
+.navbar-expand .navbar-collapse {
+ display: -ms-flexbox !important;
+ display: flex !important;
+ -ms-flex-preferred-size: auto;
+ flex-basis: auto;
+}
+
+.navbar-expand .navbar-toggler {
+ display: none;
+}
+
+.navbar-light .navbar-brand {
+ color: #222;
+}
+
+.navbar-light .navbar-brand:hover, .navbar-light .navbar-brand:focus {
+ color: #222;
+}
+
+.navbar-light .navbar-nav .nav-link {
+ color: rgba(34, 34, 34, 0.7);
+}
+
+.navbar-light .navbar-nav .nav-link:hover, .navbar-light .navbar-nav .nav-link:focus {
+ color: #222;
+}
+
+.navbar-light .navbar-nav .nav-link.disabled {
+ color: rgba(0, 0, 0, 0.3);
+}
+
+.navbar-light .navbar-nav .show > .nav-link,
+.navbar-light .navbar-nav .nav-link.active {
+ color: #222;
+}
+
+.navbar-light .navbar-toggler {
+ color: rgba(34, 34, 34, 0.7);
+ border-color: rgba(34, 34, 34, 0.1);
+}
+
+.navbar-light .navbar-toggler-icon {
+ background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2834, 34, 34, 0.7%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
+}
+
+.navbar-light .navbar-text {
+ color: rgba(34, 34, 34, 0.7);
+}
+
+.navbar-light .navbar-text a,
+.navbar-light .navbar-text a:hover,
+.navbar-light .navbar-text a:focus {
+ color: #222;
+}
+
+.navbar-dark .navbar-brand {
+ color: #fff;
+}
+
+.navbar-dark .navbar-brand:hover, .navbar-dark .navbar-brand:focus {
+ color: #fff;
+}
+
+.navbar-dark .navbar-nav .nav-link {
+ color: rgba(255, 255, 255, 0.6);
+}
+
+.navbar-dark .navbar-nav .nav-link:hover, .navbar-dark .navbar-nav .nav-link:focus {
+ color: #fff;
+}
+
+.navbar-dark .navbar-nav .nav-link.disabled {
+ color: rgba(255, 255, 255, 0.25);
+}
+
+.navbar-dark .navbar-nav .show > .nav-link,
+.navbar-dark .navbar-nav .nav-link.active {
+ color: #fff;
+}
+
+.navbar-dark .navbar-toggler {
+ color: rgba(255, 255, 255, 0.6);
+ border-color: rgba(255, 255, 255, 0.1);
+}
+
+.navbar-dark .navbar-toggler-icon {
+ background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.6%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
+}
+
+.navbar-dark .navbar-text {
+ color: rgba(255, 255, 255, 0.6);
+}
+
+.navbar-dark .navbar-text a,
+.navbar-dark .navbar-text a:hover,
+.navbar-dark .navbar-text a:focus {
+ color: #fff;
+}
+
+.card {
+ position: relative;
+ display: -ms-flexbox;
+ display: flex;
+ -ms-flex-direction: column;
+ flex-direction: column;
+ min-width: 0;
+ word-wrap: break-word;
+ background-color: #303030;
+ background-clip: border-box;
+ border: 1px solid rgba(0, 0, 0, 0.125);
+ border-radius: 0.25rem;
+}
+
+.card > hr {
+ margin-right: 0;
+ margin-left: 0;
+}
+
+.card > .list-group {
+ border-top: inherit;
+ border-bottom: inherit;
+}
+
+.card > .list-group:first-child {
+ border-top-width: 0;
+ border-top-left-radius: calc(0.25rem - 1px);
+ border-top-right-radius: calc(0.25rem - 1px);
+}
+
+.card > .list-group:last-child {
+ border-bottom-width: 0;
+ border-bottom-right-radius: calc(0.25rem - 1px);
+ border-bottom-left-radius: calc(0.25rem - 1px);
+}
+
+.card > .card-header + .list-group,
+.card > .list-group + .card-footer {
+ border-top: 0;
+}
+
+.card-body {
+ -ms-flex: 1 1 auto;
+ flex: 1 1 auto;
+ padding: 1rem 1rem;
+}
+
+.card-title {
+ margin-bottom: 0.5rem;
+}
+
+.card-subtitle {
+ margin-top: -0.25rem;
+ margin-bottom: 0;
+}
+
+.card-text:last-child {
+ margin-bottom: 0;
+}
+
+.card-link:hover {
+ text-decoration: none;
+}
+
+.card-link + .card-link {
+ margin-left: 1rem;
+}
+
+.card-header {
+ padding: 0.5rem 1rem;
+ margin-bottom: 0;
+ background-color: #444;
+ border-bottom: 1px solid rgba(0, 0, 0, 0.125);
+}
+
+.card-header:first-child {
+ border-radius: calc(0.25rem - 1px) calc(0.25rem - 1px) 0 0;
+}
+
+.card-footer {
+ padding: 0.5rem 1rem;
+ background-color: #444;
+ border-top: 1px solid rgba(0, 0, 0, 0.125);
+}
+
+.card-footer:last-child {
+ border-radius: 0 0 calc(0.25rem - 1px) calc(0.25rem - 1px);
+}
+
+.card-header-tabs {
+ margin-right: -0.5rem;
+ margin-bottom: -0.5rem;
+ margin-left: -0.5rem;
+ border-bottom: 0;
+}
+
+.card-header-tabs .nav-link.active {
+ background-color: #303030;
+ border-bottom-color: #303030;
+}
+
+.card-header-pills {
+ margin-right: -0.5rem;
+ margin-left: -0.5rem;
+}
+
+.card-img-overlay {
+ position: absolute;
+ top: 0;
+ right: 0;
+ bottom: 0;
+ left: 0;
+ padding: 1rem;
+ border-radius: calc(0.25rem - 1px);
+}
+
+.card-img,
+.card-img-top,
+.card-img-bottom {
+ width: 100%;
+}
+
+.card-img,
+.card-img-top {
+ border-top-left-radius: calc(0.25rem - 1px);
+ border-top-right-radius: calc(0.25rem - 1px);
+}
+
+.card-img,
+.card-img-bottom {
+ border-bottom-right-radius: calc(0.25rem - 1px);
+ border-bottom-left-radius: calc(0.25rem - 1px);
+}
+
+.card-group > .card {
+ margin-bottom: 0.75rem;
+}
+
+@media (min-width: 576px) {
+ .card-group {
+ display: -ms-flexbox;
+ display: flex;
+ -ms-flex-flow: row wrap;
+ flex-flow: row wrap;
+ }
+ .card-group > .card {
+ -ms-flex: 1 0 0%;
+ flex: 1 0 0%;
+ margin-bottom: 0;
+ }
+ .card-group > .card + .card {
+ margin-left: 0;
+ border-left: 0;
+ }
+ .card-group > .card:not(:last-child) {
+ border-top-right-radius: 0;
+ border-bottom-right-radius: 0;
+ }
+ .card-group > .card:not(:last-child) .card-img-top,
+ .card-group > .card:not(:last-child) .card-header {
+ border-top-right-radius: 0;
+ }
+ .card-group > .card:not(:last-child) .card-img-bottom,
+ .card-group > .card:not(:last-child) .card-footer {
+ border-bottom-right-radius: 0;
+ }
+ .card-group > .card:not(:first-child) {
+ border-top-left-radius: 0;
+ border-bottom-left-radius: 0;
+ }
+ .card-group > .card:not(:first-child) .card-img-top,
+ .card-group > .card:not(:first-child) .card-header {
+ border-top-left-radius: 0;
+ }
+ .card-group > .card:not(:first-child) .card-img-bottom,
+ .card-group > .card:not(:first-child) .card-footer {
+ border-bottom-left-radius: 0;
+ }
+}
+
+.accordion-button {
+ position: relative;
+ display: -ms-flexbox;
+ display: flex;
+ -ms-flex-align: center;
+ align-items: center;
+ width: 100%;
+ padding: 1rem 1.25rem;
+ font-size: 1rem;
+ color: #fff;
+ text-align: left;
+ background-color: #222;
+ border: 0;
+ border-radius: 0;
+ overflow-anchor: none;
+ transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out, border-radius 0.15s ease;
+}
+
+@media (prefers-reduced-motion: reduce) {
+ .accordion-button {
+ transition: none;
+ }
+}
+
+.accordion-button:not(.collapsed) {
+ color: #325172;
+ background-color: #ebeff2;
+ box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.125);
+}
+
+.accordion-button:not(.collapsed)::after {
+ background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23325172'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
+ -webkit-transform: rotate(-180deg);
+ transform: rotate(-180deg);
+}
+
+.accordion-button::after {
+ -ms-flex-negative: 0;
+ flex-shrink: 0;
+ width: 1.25rem;
+ height: 1.25rem;
+ margin-left: auto;
+ content: "";
+ background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
+ background-repeat: no-repeat;
+ background-size: 1.25rem;
+ transition: -webkit-transform 0.2s ease-in-out;
+ transition: transform 0.2s ease-in-out;
+ transition: transform 0.2s ease-in-out, -webkit-transform 0.2s ease-in-out;
+}
+
+@media (prefers-reduced-motion: reduce) {
+ .accordion-button::after {
+ transition: none;
+ }
+}
+
+.accordion-button:hover {
+ z-index: 2;
+}
+
+.accordion-button:focus {
+ z-index: 3;
+ border-color: #9badbf;
+ outline: 0;
+ box-shadow: 0 0 0 0.25rem rgba(55, 90, 127, 0.25);
+}
+
+.accordion-header {
+ margin-bottom: 0;
+}
+
+.accordion-item {
+ background-color: #222;
+ border: 1px solid rgba(0, 0, 0, 0.125);
+}
+
+.accordion-item:first-of-type {
+ border-top-left-radius: 0.25rem;
+ border-top-right-radius: 0.25rem;
+}
+
+.accordion-item:first-of-type .accordion-button {
+ border-top-left-radius: calc(0.25rem - 1px);
+ border-top-right-radius: calc(0.25rem - 1px);
+}
+
+.accordion-item:not(:first-of-type) {
+ border-top: 0;
+}
+
+.accordion-item:last-of-type {
+ border-bottom-right-radius: 0.25rem;
+ border-bottom-left-radius: 0.25rem;
+}
+
+.accordion-item:last-of-type .accordion-button.collapsed {
+ border-bottom-right-radius: calc(0.25rem - 1px);
+ border-bottom-left-radius: calc(0.25rem - 1px);
+}
+
+.accordion-item:last-of-type .accordion-collapse {
+ border-bottom-right-radius: 0.25rem;
+ border-bottom-left-radius: 0.25rem;
+}
+
+.accordion-body {
+ padding: 1rem 1.25rem;
+}
+
+.accordion-flush .accordion-collapse {
+ border-width: 0;
+}
+
+.accordion-flush .accordion-item {
+ border-right: 0;
+ border-left: 0;
+ border-radius: 0;
+}
+
+.accordion-flush .accordion-item:first-child {
+ border-top: 0;
+}
+
+.accordion-flush .accordion-item:last-child {
+ border-bottom: 0;
+}
+
+.accordion-flush .accordion-item .accordion-button {
+ border-radius: 0;
+}
+
+.breadcrumb {
+ display: -ms-flexbox;
+ display: flex;
+ -ms-flex-wrap: wrap;
+ flex-wrap: wrap;
+ padding: 0.375rem 0.75rem;
+ margin-bottom: 1rem;
+ list-style: none;
+ background-color: #444;
+ border-radius: 0.25rem;
+}
+
+.breadcrumb-item + .breadcrumb-item {
+ padding-left: 0.5rem;
+}
+
+.breadcrumb-item + .breadcrumb-item::before {
+ float: left;
+ padding-right: 0.5rem;
+ color: #888;
+ content: var(--bs-breadcrumb-divider, "/") /* rtl: var(--bs-breadcrumb-divider, "/") */;
+}
+
+.breadcrumb-item.active {
+ color: #888;
+}
+
+.pagination {
+ display: -ms-flexbox;
+ display: flex;
+ padding-left: 0;
+ list-style: none;
+}
+
+.page-link {
+ position: relative;
+ display: block;
+ color: #fff;
+ text-decoration: none;
+ background-color: #00bc8c;
+ border: 0 solid transparent;
+ transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
+}
+
+@media (prefers-reduced-motion: reduce) {
+ .page-link {
+ transition: none;
+ }
+}
+
+.page-link:hover {
+ z-index: 2;
+ color: #fff;
+ background-color: #00efb2;
+ border-color: transparent;
+}
+
+.page-link:focus {
+ z-index: 3;
+ color: #009670;
+ background-color: #ebebeb;
+ outline: 0;
+ box-shadow: 0 0 0 0.25rem rgba(55, 90, 127, 0.25);
+}
+
+.page-item:not(:first-child) .page-link {
+ margin-left: 0;
+}
+
+.page-item.active .page-link {
+ z-index: 3;
+ color: #fff;
+ background-color: #00efb2;
+ border-color: transparent;
+}
+
+.page-item.disabled .page-link {
+ color: #fff;
+ pointer-events: none;
+ background-color: #007053;
+ border-color: transparent;
+}
+
+.page-link {
+ padding: 0.375rem 0.75rem;
+}
+
+.page-item:first-child .page-link {
+ border-top-left-radius: 0.25rem;
+ border-bottom-left-radius: 0.25rem;
+}
+
+.page-item:last-child .page-link {
+ border-top-right-radius: 0.25rem;
+ border-bottom-right-radius: 0.25rem;
+}
+
+.pagination-lg .page-link {
+ padding: 0.75rem 1.5rem;
+ font-size: 1.25rem;
+}
+
+.pagination-lg .page-item:first-child .page-link {
+ border-top-left-radius: 0.3rem;
+ border-bottom-left-radius: 0.3rem;
+}
+
+.pagination-lg .page-item:last-child .page-link {
+ border-top-right-radius: 0.3rem;
+ border-bottom-right-radius: 0.3rem;
+}
+
+.pagination-sm .page-link {
+ padding: 0.25rem 0.5rem;
+ font-size: 0.875rem;
+}
+
+.pagination-sm .page-item:first-child .page-link {
+ border-top-left-radius: 0.2rem;
+ border-bottom-left-radius: 0.2rem;
+}
+
+.pagination-sm .page-item:last-child .page-link {
+ border-top-right-radius: 0.2rem;
+ border-bottom-right-radius: 0.2rem;
+}
+
+.badge {
+ display: inline-block;
+ padding: 0.35em 0.65em;
+ font-size: 0.75em;
+ font-weight: 700;
+ line-height: 1;
+ color: #fff;
+ text-align: center;
+ white-space: nowrap;
+ vertical-align: baseline;
+ border-radius: 0.25rem;
+}
+
+.badge:empty {
+ display: none;
+}
+
+.btn .badge {
+ position: relative;
+ top: -1px;
+}
+
+.alert {
+ position: relative;
+ padding: 1rem 1rem;
+ margin-bottom: 1rem;
+ border: 1px solid transparent;
+ border-radius: 0.25rem;
+}
+
+.alert-heading {
+ color: inherit;
+}
+
+.alert-link {
+ font-weight: 700;
+}
+
+.alert-dismissible {
+ padding-right: 3rem;
+}
+
+.alert-dismissible .btn-close {
+ position: absolute;
+ top: 0;
+ right: 0;
+ z-index: 2;
+ padding: 1.25rem 1rem;
+}
+
+.alert-primary {
+ color: #21364c;
+ background-color: #d7dee5;
+ border-color: #c3ced9;
+}
+
+.alert-primary .alert-link {
+ color: #1a2b3d;
+}
+
+.alert-secondary {
+ color: #292929;
+ background-color: #dadada;
+ border-color: #c7c7c7;
+}
+
+.alert-secondary .alert-link {
+ color: #212121;
+}
+
+.alert-success {
+ color: #007154;
+ background-color: #ccf2e8;
+ border-color: #b3ebdd;
+}
+
+.alert-success .alert-link {
+ color: #005a43;
+}
+
+.alert-info {
+ color: #1f5b83;
+ background-color: #d6eaf8;
+ border-color: #c2e0f4;
+}
+
+.alert-info .alert-link {
+ color: #194969;
+}
+
+.alert-warning {
+ color: #925e0b;
+ background-color: #fdebd0;
+ border-color: #fbe1b8;
+}
+
+.alert-warning .alert-link {
+ color: #754b09;
+}
+
+.alert-danger {
+ color: #8b2e24;
+ background-color: #fadbd8;
+ border-color: #f8c9c5;
+}
+
+.alert-danger .alert-link {
+ color: #6f251d;
+}
+
+.alert-light {
+ color: #686d71;
+ background-color: #eff0f2;
+ border-color: #e6e9eb;
+}
+
+.alert-light .alert-link {
+ color: #53575a;
+}
+
+.alert-dark {
+ color: #1d1d1d;
+ background-color: #d6d6d6;
+ border-color: #c1c1c1;
+}
+
+.alert-dark .alert-link {
+ color: #171717;
+}
+
+@-webkit-keyframes progress-bar-stripes {
+ 0% {
+ background-position-x: 1rem;
+ }
+}
+
+@keyframes progress-bar-stripes {
+ 0% {
+ background-position-x: 1rem;
+ }
+}
+
+.progress {
+ display: -ms-flexbox;
+ display: flex;
+ height: 1rem;
+ overflow: hidden;
+ font-size: 0.75rem;
+ background-color: #444;
+ border-radius: 0.25rem;
+}
+
+.progress-bar {
+ display: -ms-flexbox;
+ display: flex;
+ -ms-flex-direction: column;
+ flex-direction: column;
+ -ms-flex-pack: center;
+ justify-content: center;
+ overflow: hidden;
+ color: #fff;
+ text-align: center;
+ white-space: nowrap;
+ background-color: #375a7f;
+ transition: width 0.6s ease;
+}
+
+@media (prefers-reduced-motion: reduce) {
+ .progress-bar {
+ transition: none;
+ }
+}
+
+.progress-bar-striped {
+ background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
+ background-size: 1rem 1rem;
+}
+
+.progress-bar-animated {
+ -webkit-animation: 1s linear infinite progress-bar-stripes;
+ animation: 1s linear infinite progress-bar-stripes;
+}
+
+@media (prefers-reduced-motion: reduce) {
+ .progress-bar-animated {
+ -webkit-animation: none;
+ animation: none;
+ }
+}
+
+.list-group {
+ display: -ms-flexbox;
+ display: flex;
+ -ms-flex-direction: column;
+ flex-direction: column;
+ padding-left: 0;
+ margin-bottom: 0;
+ border-radius: 0.25rem;
+}
+
+.list-group-numbered {
+ list-style-type: none;
+ counter-reset: section;
+}
+
+.list-group-numbered > li::before {
+ content: counters(section, ".") ". ";
+ counter-increment: section;
+}
+
+.list-group-item-action {
+ width: 100%;
+ color: #444;
+ text-align: inherit;
+}
+
+.list-group-item-action:hover, .list-group-item-action:focus {
+ z-index: 1;
+ color: #fff;
+ text-decoration: none;
+ background-color: #444;
+}
+
+.list-group-item-action:active {
+ color: #fff;
+ background-color: #222;
+}
+
+.list-group-item {
+ position: relative;
+ display: block;
+ padding: 0.5rem 1rem;
+ color: #fff;
+ text-decoration: none;
+ background-color: #303030;
+ border: 1px solid #444;
+}
+
+.list-group-item:first-child {
+ border-top-left-radius: inherit;
+ border-top-right-radius: inherit;
+}
+
+.list-group-item:last-child {
+ border-bottom-right-radius: inherit;
+ border-bottom-left-radius: inherit;
+}
+
+.list-group-item.disabled, .list-group-item:disabled {
+ color: #888;
+ pointer-events: none;
+ background-color: #303030;
+}
+
+.list-group-item.active {
+ z-index: 2;
+ color: #fff;
+ background-color: #375a7f;
+ border-color: #375a7f;
+}
+
+.list-group-item + .list-group-item {
+ border-top-width: 0;
+}
+
+.list-group-item + .list-group-item.active {
+ margin-top: -1px;
+ border-top-width: 1px;
+}
+
+.list-group-horizontal {
+ -ms-flex-direction: row;
+ flex-direction: row;
+}
+
+.list-group-horizontal > .list-group-item:first-child {
+ border-bottom-left-radius: 0.25rem;
+ border-top-right-radius: 0;
+}
+
+.list-group-horizontal > .list-group-item:last-child {
+ border-top-right-radius: 0.25rem;
+ border-bottom-left-radius: 0;
+}
+
+.list-group-horizontal > .list-group-item.active {
+ margin-top: 0;
+}
+
+.list-group-horizontal > .list-group-item + .list-group-item {
+ border-top-width: 1px;
+ border-left-width: 0;
+}
+
+.list-group-horizontal > .list-group-item + .list-group-item.active {
+ margin-left: -1px;
+ border-left-width: 1px;
+}
+
+@media (min-width: 576px) {
+ .list-group-horizontal-sm {
+ -ms-flex-direction: row;
+ flex-direction: row;
+ }
+ .list-group-horizontal-sm > .list-group-item:first-child {
+ border-bottom-left-radius: 0.25rem;
+ border-top-right-radius: 0;
+ }
+ .list-group-horizontal-sm > .list-group-item:last-child {
+ border-top-right-radius: 0.25rem;
+ border-bottom-left-radius: 0;
+ }
+ .list-group-horizontal-sm > .list-group-item.active {
+ margin-top: 0;
+ }
+ .list-group-horizontal-sm > .list-group-item + .list-group-item {
+ border-top-width: 1px;
+ border-left-width: 0;
+ }
+ .list-group-horizontal-sm > .list-group-item + .list-group-item.active {
+ margin-left: -1px;
+ border-left-width: 1px;
+ }
+}
+
+@media (min-width: 768px) {
+ .list-group-horizontal-md {
+ -ms-flex-direction: row;
+ flex-direction: row;
+ }
+ .list-group-horizontal-md > .list-group-item:first-child {
+ border-bottom-left-radius: 0.25rem;
+ border-top-right-radius: 0;
+ }
+ .list-group-horizontal-md > .list-group-item:last-child {
+ border-top-right-radius: 0.25rem;
+ border-bottom-left-radius: 0;
+ }
+ .list-group-horizontal-md > .list-group-item.active {
+ margin-top: 0;
+ }
+ .list-group-horizontal-md > .list-group-item + .list-group-item {
+ border-top-width: 1px;
+ border-left-width: 0;
+ }
+ .list-group-horizontal-md > .list-group-item + .list-group-item.active {
+ margin-left: -1px;
+ border-left-width: 1px;
+ }
+}
+
+@media (min-width: 992px) {
+ .list-group-horizontal-lg {
+ -ms-flex-direction: row;
+ flex-direction: row;
+ }
+ .list-group-horizontal-lg > .list-group-item:first-child {
+ border-bottom-left-radius: 0.25rem;
+ border-top-right-radius: 0;
+ }
+ .list-group-horizontal-lg > .list-group-item:last-child {
+ border-top-right-radius: 0.25rem;
+ border-bottom-left-radius: 0;
+ }
+ .list-group-horizontal-lg > .list-group-item.active {
+ margin-top: 0;
+ }
+ .list-group-horizontal-lg > .list-group-item + .list-group-item {
+ border-top-width: 1px;
+ border-left-width: 0;
+ }
+ .list-group-horizontal-lg > .list-group-item + .list-group-item.active {
+ margin-left: -1px;
+ border-left-width: 1px;
+ }
+}
+
+@media (min-width: 1200px) {
+ .list-group-horizontal-xl {
+ -ms-flex-direction: row;
+ flex-direction: row;
+ }
+ .list-group-horizontal-xl > .list-group-item:first-child {
+ border-bottom-left-radius: 0.25rem;
+ border-top-right-radius: 0;
+ }
+ .list-group-horizontal-xl > .list-group-item:last-child {
+ border-top-right-radius: 0.25rem;
+ border-bottom-left-radius: 0;
+ }
+ .list-group-horizontal-xl > .list-group-item.active {
+ margin-top: 0;
+ }
+ .list-group-horizontal-xl > .list-group-item + .list-group-item {
+ border-top-width: 1px;
+ border-left-width: 0;
+ }
+ .list-group-horizontal-xl > .list-group-item + .list-group-item.active {
+ margin-left: -1px;
+ border-left-width: 1px;
+ }
+}
+
+@media (min-width: 1400px) {
+ .list-group-horizontal-xxl {
+ -ms-flex-direction: row;
+ flex-direction: row;
+ }
+ .list-group-horizontal-xxl > .list-group-item:first-child {
+ border-bottom-left-radius: 0.25rem;
+ border-top-right-radius: 0;
+ }
+ .list-group-horizontal-xxl > .list-group-item:last-child {
+ border-top-right-radius: 0.25rem;
+ border-bottom-left-radius: 0;
+ }
+ .list-group-horizontal-xxl > .list-group-item.active {
+ margin-top: 0;
+ }
+ .list-group-horizontal-xxl > .list-group-item + .list-group-item {
+ border-top-width: 1px;
+ border-left-width: 0;
+ }
+ .list-group-horizontal-xxl > .list-group-item + .list-group-item.active {
+ margin-left: -1px;
+ border-left-width: 1px;
+ }
+}
+
+.list-group-flush {
+ border-radius: 0;
+}
+
+.list-group-flush > .list-group-item {
+ border-width: 0 0 1px;
+}
+
+.list-group-flush > .list-group-item:last-child {
+ border-bottom-width: 0;
+}
+
+.list-group-item-primary {
+ color: #21364c;
+ background-color: #d7dee5;
+}
+
+.list-group-item-primary.list-group-item-action:hover, .list-group-item-primary.list-group-item-action:focus {
+ color: #21364c;
+ background-color: #c2c8ce;
+}
+
+.list-group-item-primary.list-group-item-action.active {
+ color: #fff;
+ background-color: #21364c;
+ border-color: #21364c;
+}
+
+.list-group-item-secondary {
+ color: #292929;
+ background-color: #dadada;
+}
+
+.list-group-item-secondary.list-group-item-action:hover, .list-group-item-secondary.list-group-item-action:focus {
+ color: #292929;
+ background-color: #c4c4c4;
+}
+
+.list-group-item-secondary.list-group-item-action.active {
+ color: #fff;
+ background-color: #292929;
+ border-color: #292929;
+}
+
+.list-group-item-success {
+ color: #007154;
+ background-color: #ccf2e8;
+}
+
+.list-group-item-success.list-group-item-action:hover, .list-group-item-success.list-group-item-action:focus {
+ color: #007154;
+ background-color: #b8dad1;
+}
+
+.list-group-item-success.list-group-item-action.active {
+ color: #fff;
+ background-color: #007154;
+ border-color: #007154;
+}
+
+.list-group-item-info {
+ color: #1f5b83;
+ background-color: #d6eaf8;
+}
+
+.list-group-item-info.list-group-item-action:hover, .list-group-item-info.list-group-item-action:focus {
+ color: #1f5b83;
+ background-color: #c1d3df;
+}
+
+.list-group-item-info.list-group-item-action.active {
+ color: #fff;
+ background-color: #1f5b83;
+ border-color: #1f5b83;
+}
+
+.list-group-item-warning {
+ color: #925e0b;
+ background-color: #fdebd0;
+}
+
+.list-group-item-warning.list-group-item-action:hover, .list-group-item-warning.list-group-item-action:focus {
+ color: #925e0b;
+ background-color: #e4d4bb;
+}
+
+.list-group-item-warning.list-group-item-action.active {
+ color: #fff;
+ background-color: #925e0b;
+ border-color: #925e0b;
+}
+
+.list-group-item-danger {
+ color: #8b2e24;
+ background-color: #fadbd8;
+}
+
+.list-group-item-danger.list-group-item-action:hover, .list-group-item-danger.list-group-item-action:focus {
+ color: #8b2e24;
+ background-color: #e1c5c2;
+}
+
+.list-group-item-danger.list-group-item-action.active {
+ color: #fff;
+ background-color: #8b2e24;
+ border-color: #8b2e24;
+}
+
+.list-group-item-light {
+ color: #686d71;
+ background-color: #eff0f2;
+}
+
+.list-group-item-light.list-group-item-action:hover, .list-group-item-light.list-group-item-action:focus {
+ color: #686d71;
+ background-color: #d7d8da;
+}
+
+.list-group-item-light.list-group-item-action.active {
+ color: #fff;
+ background-color: #686d71;
+ border-color: #686d71;
+}
+
+.list-group-item-dark {
+ color: #1d1d1d;
+ background-color: #d6d6d6;
+}
+
+.list-group-item-dark.list-group-item-action:hover, .list-group-item-dark.list-group-item-action:focus {
+ color: #1d1d1d;
+ background-color: #c1c1c1;
+}
+
+.list-group-item-dark.list-group-item-action.active {
+ color: #fff;
+ background-color: #1d1d1d;
+ border-color: #1d1d1d;
+}
+
+.btn-close {
+ box-sizing: content-box;
+ width: 1em;
+ height: 1em;
+ padding: 0.25em 0.25em;
+ color: #fff;
+ background: transparent url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath d='M.293.293a1 1 0 011.414 0L8 6.586 14.293.293a1 1 0 111.414 1.414L9.414 8l6.293 6.293a1 1 0 01-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 01-1.414-1.414L6.586 8 .293 1.707a1 1 0 010-1.414z'/%3e%3c/svg%3e") center/1em auto no-repeat;
+ border: 0;
+ border-radius: 0.25rem;
+ opacity: 0.4;
+}
+
+.btn-close:hover {
+ color: #fff;
+ text-decoration: none;
+ opacity: 1;
+}
+
+.btn-close:focus {
+ outline: 0;
+ box-shadow: 0 0 0 0.25rem rgba(55, 90, 127, 0.25);
+ opacity: 1;
+}
+
+.btn-close:disabled, .btn-close.disabled {
+ pointer-events: none;
+ -webkit-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+ opacity: 0.25;
+}
+
+.btn-close-white {
+ -webkit-filter: invert(1) grayscale(100%) brightness(200%);
+ filter: invert(1) grayscale(100%) brightness(200%);
+}
+
+.toast {
+ width: 350px;
+ max-width: 100%;
+ font-size: 0.875rem;
+ pointer-events: auto;
+ background-color: #444;
+ background-clip: padding-box;
+ border: 1px solid rgba(0, 0, 0, 0.1);
+ box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
+ border-radius: 0.25rem;
+}
+
+.toast:not(.showing):not(.show) {
+ opacity: 0;
+}
+
+.toast.hide {
+ display: none;
+}
+
+.toast-container {
+ width: -webkit-max-content;
+ width: -moz-max-content;
+ width: max-content;
+ max-width: 100%;
+ pointer-events: none;
+}
+
+.toast-container > :not(:last-child) {
+ margin-bottom: 0.75rem;
+}
+
+.toast-header {
+ display: -ms-flexbox;
+ display: flex;
+ -ms-flex-align: center;
+ align-items: center;
+ padding: 0.5rem 0.75rem;
+ color: #888;
+ background-color: #303030;
+ background-clip: padding-box;
+ border-bottom: 1px solid rgba(0, 0, 0, 0.05);
+ border-top-left-radius: calc(0.25rem - 1px);
+ border-top-right-radius: calc(0.25rem - 1px);
+}
+
+.toast-header .btn-close {
+ margin-right: -0.375rem;
+ margin-left: 0.75rem;
+}
+
+.toast-body {
+ padding: 0.75rem;
+ word-wrap: break-word;
+}
+
+.modal {
+ position: fixed;
+ top: 0;
+ left: 0;
+ z-index: 1060;
+ display: none;
+ width: 100%;
+ height: 100%;
+ overflow-x: hidden;
+ overflow-y: auto;
+ outline: 0;
+}
+
+.modal-dialog {
+ position: relative;
+ width: auto;
+ margin: 0.5rem;
+ pointer-events: none;
+}
+
+.modal.fade .modal-dialog {
+ transition: -webkit-transform 0.3s ease-out;
+ transition: transform 0.3s ease-out;
+ transition: transform 0.3s ease-out, -webkit-transform 0.3s ease-out;
+ -webkit-transform: translate(0, -50px);
+ transform: translate(0, -50px);
+}
+
+@media (prefers-reduced-motion: reduce) {
+ .modal.fade .modal-dialog {
+ transition: none;
+ }
+}
+
+.modal.show .modal-dialog {
+ -webkit-transform: none;
+ transform: none;
+}
+
+.modal.modal-static .modal-dialog {
+ -webkit-transform: scale(1.02);
+ transform: scale(1.02);
+}
+
+.modal-dialog-scrollable {
+ height: calc(100% - 1rem);
+}
+
+.modal-dialog-scrollable .modal-content {
+ max-height: 100%;
+ overflow: hidden;
+}
+
+.modal-dialog-scrollable .modal-body {
+ overflow-y: auto;
+}
+
+.modal-dialog-centered {
+ display: -ms-flexbox;
+ display: flex;
+ -ms-flex-align: center;
+ align-items: center;
+ min-height: calc(100% - 1rem);
+}
+
+.modal-content {
+ position: relative;
+ display: -ms-flexbox;
+ display: flex;
+ -ms-flex-direction: column;
+ flex-direction: column;
+ width: 100%;
+ pointer-events: auto;
+ background-color: #303030;
+ background-clip: padding-box;
+ border: 1px solid #444;
+ border-radius: 0.3rem;
+ outline: 0;
+}
+
+.modal-backdrop {
+ position: fixed;
+ top: 0;
+ left: 0;
+ z-index: 1040;
+ width: 100vw;
+ height: 100vh;
+ background-color: #000;
+}
+
+.modal-backdrop.fade {
+ opacity: 0;
+}
+
+.modal-backdrop.show {
+ opacity: 0.5;
+}
+
+.modal-header {
+ display: -ms-flexbox;
+ display: flex;
+ -ms-flex-negative: 0;
+ flex-shrink: 0;
+ -ms-flex-align: center;
+ align-items: center;
+ -ms-flex-pack: justify;
+ justify-content: space-between;
+ padding: 1rem 1rem;
+ border-bottom: 1px solid #444;
+ border-top-left-radius: calc(0.3rem - 1px);
+ border-top-right-radius: calc(0.3rem - 1px);
+}
+
+.modal-header .btn-close {
+ padding: 0.5rem 0.5rem;
+ margin: -0.5rem -0.5rem -0.5rem auto;
+}
+
+.modal-title {
+ margin-bottom: 0;
+ line-height: 1.5;
+}
+
+.modal-body {
+ position: relative;
+ -ms-flex: 1 1 auto;
+ flex: 1 1 auto;
+ padding: 1rem;
+}
+
+.modal-footer {
+ display: -ms-flexbox;
+ display: flex;
+ -ms-flex-wrap: wrap;
+ flex-wrap: wrap;
+ -ms-flex-negative: 0;
+ flex-shrink: 0;
+ -ms-flex-align: center;
+ align-items: center;
+ -ms-flex-pack: end;
+ justify-content: flex-end;
+ padding: 0.75rem;
+ border-top: 1px solid #444;
+ border-bottom-right-radius: calc(0.3rem - 1px);
+ border-bottom-left-radius: calc(0.3rem - 1px);
+}
+
+.modal-footer > * {
+ margin: 0.25rem;
+}
+
+@media (min-width: 576px) {
+ .modal-dialog {
+ max-width: 500px;
+ margin: 1.75rem auto;
+ }
+ .modal-dialog-scrollable {
+ height: calc(100% - 3.5rem);
+ }
+ .modal-dialog-centered {
+ min-height: calc(100% - 3.5rem);
+ }
+ .modal-sm {
+ max-width: 300px;
+ }
+}
+
+@media (min-width: 992px) {
+ .modal-lg,
+ .modal-xl {
+ max-width: 800px;
+ }
+}
+
+@media (min-width: 1200px) {
+ .modal-xl {
+ max-width: 1140px;
+ }
+}
+
+.modal-fullscreen {
+ width: 100vw;
+ max-width: none;
+ height: 100%;
+ margin: 0;
+}
+
+.modal-fullscreen .modal-content {
+ height: 100%;
+ border: 0;
+ border-radius: 0;
+}
+
+.modal-fullscreen .modal-header {
+ border-radius: 0;
+}
+
+.modal-fullscreen .modal-body {
+ overflow-y: auto;
+}
+
+.modal-fullscreen .modal-footer {
+ border-radius: 0;
+}
+
+@media (max-width: 575.98px) {
+ .modal-fullscreen-sm-down {
+ width: 100vw;
+ max-width: none;
+ height: 100%;
+ margin: 0;
+ }
+ .modal-fullscreen-sm-down .modal-content {
+ height: 100%;
+ border: 0;
+ border-radius: 0;
+ }
+ .modal-fullscreen-sm-down .modal-header {
+ border-radius: 0;
+ }
+ .modal-fullscreen-sm-down .modal-body {
+ overflow-y: auto;
+ }
+ .modal-fullscreen-sm-down .modal-footer {
+ border-radius: 0;
+ }
+}
+
+@media (max-width: 767.98px) {
+ .modal-fullscreen-md-down {
+ width: 100vw;
+ max-width: none;
+ height: 100%;
+ margin: 0;
+ }
+ .modal-fullscreen-md-down .modal-content {
+ height: 100%;
+ border: 0;
+ border-radius: 0;
+ }
+ .modal-fullscreen-md-down .modal-header {
+ border-radius: 0;
+ }
+ .modal-fullscreen-md-down .modal-body {
+ overflow-y: auto;
+ }
+ .modal-fullscreen-md-down .modal-footer {
+ border-radius: 0;
+ }
+}
+
+@media (max-width: 991.98px) {
+ .modal-fullscreen-lg-down {
+ width: 100vw;
+ max-width: none;
+ height: 100%;
+ margin: 0;
+ }
+ .modal-fullscreen-lg-down .modal-content {
+ height: 100%;
+ border: 0;
+ border-radius: 0;
+ }
+ .modal-fullscreen-lg-down .modal-header {
+ border-radius: 0;
+ }
+ .modal-fullscreen-lg-down .modal-body {
+ overflow-y: auto;
+ }
+ .modal-fullscreen-lg-down .modal-footer {
+ border-radius: 0;
+ }
+}
+
+@media (max-width: 1199.98px) {
+ .modal-fullscreen-xl-down {
+ width: 100vw;
+ max-width: none;
+ height: 100%;
+ margin: 0;
+ }
+ .modal-fullscreen-xl-down .modal-content {
+ height: 100%;
+ border: 0;
+ border-radius: 0;
+ }
+ .modal-fullscreen-xl-down .modal-header {
+ border-radius: 0;
+ }
+ .modal-fullscreen-xl-down .modal-body {
+ overflow-y: auto;
+ }
+ .modal-fullscreen-xl-down .modal-footer {
+ border-radius: 0;
+ }
+}
+
+@media (max-width: 1399.98px) {
+ .modal-fullscreen-xxl-down {
+ width: 100vw;
+ max-width: none;
+ height: 100%;
+ margin: 0;
+ }
+ .modal-fullscreen-xxl-down .modal-content {
+ height: 100%;
+ border: 0;
+ border-radius: 0;
+ }
+ .modal-fullscreen-xxl-down .modal-header {
+ border-radius: 0;
+ }
+ .modal-fullscreen-xxl-down .modal-body {
+ overflow-y: auto;
+ }
+ .modal-fullscreen-xxl-down .modal-footer {
+ border-radius: 0;
+ }
+}
+
+.tooltip {
+ position: absolute;
+ z-index: 1080;
+ display: block;
+ margin: 0;
+ font-family: var(--bs-font-sans-serif);
+ font-style: normal;
+ font-weight: 400;
+ line-height: 1.5;
+ text-align: left;
+ text-align: start;
+ text-decoration: none;
+ text-shadow: none;
+ text-transform: none;
+ letter-spacing: normal;
+ word-break: normal;
+ word-spacing: normal;
+ white-space: normal;
+ line-break: auto;
+ font-size: 0.875rem;
+ word-wrap: break-word;
+ opacity: 0;
+}
+
+.tooltip.show {
+ opacity: 0.9;
+}
+
+.tooltip .tooltip-arrow {
+ position: absolute;
+ display: block;
+ width: 0.8rem;
+ height: 0.4rem;
+}
+
+.tooltip .tooltip-arrow::before {
+ position: absolute;
+ content: "";
+ border-color: transparent;
+ border-style: solid;
+}
+
+.bs-tooltip-top, .bs-tooltip-auto[data-popper-placement^="top"] {
+ padding: 0.4rem 0;
+}
+
+.bs-tooltip-top .tooltip-arrow, .bs-tooltip-auto[data-popper-placement^="top"] .tooltip-arrow {
+ bottom: 0;
+}
+
+.bs-tooltip-top .tooltip-arrow::before, .bs-tooltip-auto[data-popper-placement^="top"] .tooltip-arrow::before {
+ top: -1px;
+ border-width: 0.4rem 0.4rem 0;
+ border-top-color: #000;
+}
+
+.bs-tooltip-end, .bs-tooltip-auto[data-popper-placement^="right"] {
+ padding: 0 0.4rem;
+}
+
+.bs-tooltip-end .tooltip-arrow, .bs-tooltip-auto[data-popper-placement^="right"] .tooltip-arrow {
+ left: 0;
+ width: 0.4rem;
+ height: 0.8rem;
+}
+
+.bs-tooltip-end .tooltip-arrow::before, .bs-tooltip-auto[data-popper-placement^="right"] .tooltip-arrow::before {
+ right: -1px;
+ border-width: 0.4rem 0.4rem 0.4rem 0;
+ border-right-color: #000;
+}
+
+.bs-tooltip-bottom, .bs-tooltip-auto[data-popper-placement^="bottom"] {
+ padding: 0.4rem 0;
+}
+
+.bs-tooltip-bottom .tooltip-arrow, .bs-tooltip-auto[data-popper-placement^="bottom"] .tooltip-arrow {
+ top: 0;
+}
+
+.bs-tooltip-bottom .tooltip-arrow::before, .bs-tooltip-auto[data-popper-placement^="bottom"] .tooltip-arrow::before {
+ bottom: -1px;
+ border-width: 0 0.4rem 0.4rem;
+ border-bottom-color: #000;
+}
+
+.bs-tooltip-start, .bs-tooltip-auto[data-popper-placement^="left"] {
+ padding: 0 0.4rem;
+}
+
+.bs-tooltip-start .tooltip-arrow, .bs-tooltip-auto[data-popper-placement^="left"] .tooltip-arrow {
+ right: 0;
+ width: 0.4rem;
+ height: 0.8rem;
+}
+
+.bs-tooltip-start .tooltip-arrow::before, .bs-tooltip-auto[data-popper-placement^="left"] .tooltip-arrow::before {
+ left: -1px;
+ border-width: 0.4rem 0 0.4rem 0.4rem;
+ border-left-color: #000;
+}
+
+.tooltip-inner {
+ max-width: 200px;
+ padding: 0.25rem 0.5rem;
+ color: #fff;
+ text-align: center;
+ background-color: #000;
+ border-radius: 0.25rem;
+}
+
+.popover {
+ position: absolute;
+ top: 0;
+ left: 0 /* rtl:ignore */;
+ z-index: 1070;
+ display: block;
+ max-width: 276px;
+ font-family: var(--bs-font-sans-serif);
+ font-style: normal;
+ font-weight: 400;
+ line-height: 1.5;
+ text-align: left;
+ text-align: start;
+ text-decoration: none;
+ text-shadow: none;
+ text-transform: none;
+ letter-spacing: normal;
+ word-break: normal;
+ word-spacing: normal;
+ white-space: normal;
+ line-break: auto;
+ font-size: 0.875rem;
+ word-wrap: break-word;
+ background-color: #303030;
+ background-clip: padding-box;
+ border: 1px solid rgba(0, 0, 0, 0.2);
+ border-radius: 0.3rem;
+}
+
+.popover .popover-arrow {
+ position: absolute;
+ display: block;
+ width: 1rem;
+ height: 0.5rem;
+}
+
+.popover .popover-arrow::before, .popover .popover-arrow::after {
+ position: absolute;
+ display: block;
+ content: "";
+ border-color: transparent;
+ border-style: solid;
+}
+
+.bs-popover-top > .popover-arrow, .bs-popover-auto[data-popper-placement^="top"] > .popover-arrow {
+ bottom: calc(-0.5rem - 1px);
+}
+
+.bs-popover-top > .popover-arrow::before, .bs-popover-auto[data-popper-placement^="top"] > .popover-arrow::before {
+ bottom: 0;
+ border-width: 0.5rem 0.5rem 0;
+ border-top-color: rgba(0, 0, 0, 0.25);
+}
+
+.bs-popover-top > .popover-arrow::after, .bs-popover-auto[data-popper-placement^="top"] > .popover-arrow::after {
+ bottom: 1px;
+ border-width: 0.5rem 0.5rem 0;
+ border-top-color: #303030;
+}
+
+.bs-popover-end > .popover-arrow, .bs-popover-auto[data-popper-placement^="right"] > .popover-arrow {
+ left: calc(-0.5rem - 1px);
+ width: 0.5rem;
+ height: 1rem;
+}
+
+.bs-popover-end > .popover-arrow::before, .bs-popover-auto[data-popper-placement^="right"] > .popover-arrow::before {
+ left: 0;
+ border-width: 0.5rem 0.5rem 0.5rem 0;
+ border-right-color: rgba(0, 0, 0, 0.25);
+}
+
+.bs-popover-end > .popover-arrow::after, .bs-popover-auto[data-popper-placement^="right"] > .popover-arrow::after {
+ left: 1px;
+ border-width: 0.5rem 0.5rem 0.5rem 0;
+ border-right-color: #303030;
+}
+
+.bs-popover-bottom > .popover-arrow, .bs-popover-auto[data-popper-placement^="bottom"] > .popover-arrow {
+ top: calc(-0.5rem - 1px);
+}
+
+.bs-popover-bottom > .popover-arrow::before, .bs-popover-auto[data-popper-placement^="bottom"] > .popover-arrow::before {
+ top: 0;
+ border-width: 0 0.5rem 0.5rem 0.5rem;
+ border-bottom-color: rgba(0, 0, 0, 0.25);
+}
+
+.bs-popover-bottom > .popover-arrow::after, .bs-popover-auto[data-popper-placement^="bottom"] > .popover-arrow::after {
+ top: 1px;
+ border-width: 0 0.5rem 0.5rem 0.5rem;
+ border-bottom-color: #303030;
+}
+
+.bs-popover-bottom .popover-header::before, .bs-popover-auto[data-popper-placement^="bottom"] .popover-header::before {
+ position: absolute;
+ top: 0;
+ left: 50%;
+ display: block;
+ width: 1rem;
+ margin-left: -0.5rem;
+ content: "";
+ border-bottom: 1px solid #444;
+}
+
+.bs-popover-start > .popover-arrow, .bs-popover-auto[data-popper-placement^="left"] > .popover-arrow {
+ right: calc(-0.5rem - 1px);
+ width: 0.5rem;
+ height: 1rem;
+}
+
+.bs-popover-start > .popover-arrow::before, .bs-popover-auto[data-popper-placement^="left"] > .popover-arrow::before {
+ right: 0;
+ border-width: 0.5rem 0 0.5rem 0.5rem;
+ border-left-color: rgba(0, 0, 0, 0.25);
+}
+
+.bs-popover-start > .popover-arrow::after, .bs-popover-auto[data-popper-placement^="left"] > .popover-arrow::after {
+ right: 1px;
+ border-width: 0.5rem 0 0.5rem 0.5rem;
+ border-left-color: #303030;
+}
+
+.popover-header {
+ padding: 0.5rem 1rem;
+ margin-bottom: 0;
+ font-size: 1rem;
+ background-color: #444;
+ border-bottom: 1px solid #3d3d3d;
+ border-top-left-radius: calc(0.3rem - 1px);
+ border-top-right-radius: calc(0.3rem - 1px);
+}
+
+.popover-header:empty {
+ display: none;
+}
+
+.popover-body {
+ padding: 1rem 1rem;
+ color: #fff;
+}
+
+.carousel {
+ position: relative;
+}
+
+.carousel.pointer-event {
+ -ms-touch-action: pan-y;
+ touch-action: pan-y;
+}
+
+.carousel-inner {
+ position: relative;
+ width: 100%;
+ overflow: hidden;
+}
+
+.carousel-inner::after {
+ display: block;
+ clear: both;
+ content: "";
+}
+
+.carousel-item {
+ position: relative;
+ display: none;
+ float: left;
+ width: 100%;
+ margin-right: -100%;
+ -webkit-backface-visibility: hidden;
+ backface-visibility: hidden;
+ transition: -webkit-transform 0.6s ease-in-out;
+ transition: transform 0.6s ease-in-out;
+ transition: transform 0.6s ease-in-out, -webkit-transform 0.6s ease-in-out;
+}
+
+@media (prefers-reduced-motion: reduce) {
+ .carousel-item {
+ transition: none;
+ }
+}
+
+.carousel-item.active,
+.carousel-item-next,
+.carousel-item-prev {
+ display: block;
+}
+
+/* rtl:begin:ignore */
+.carousel-item-next:not(.carousel-item-start),
+.active.carousel-item-end {
+ -webkit-transform: translateX(100%);
+ transform: translateX(100%);
+}
+
+.carousel-item-prev:not(.carousel-item-end),
+.active.carousel-item-start {
+ -webkit-transform: translateX(-100%);
+ transform: translateX(-100%);
+}
+
+/* rtl:end:ignore */
+.carousel-fade .carousel-item {
+ opacity: 0;
+ transition-property: opacity;
+ -webkit-transform: none;
+ transform: none;
+}
+
+.carousel-fade .carousel-item.active,
+.carousel-fade .carousel-item-next.carousel-item-start,
+.carousel-fade .carousel-item-prev.carousel-item-end {
+ z-index: 1;
+ opacity: 1;
+}
+
+.carousel-fade .active.carousel-item-start,
+.carousel-fade .active.carousel-item-end {
+ z-index: 0;
+ opacity: 0;
+ transition: opacity 0s 0.6s;
+}
+
+@media (prefers-reduced-motion: reduce) {
+ .carousel-fade .active.carousel-item-start,
+ .carousel-fade .active.carousel-item-end {
+ transition: none;
+ }
+}
+
+.carousel-control-prev,
+.carousel-control-next {
+ position: absolute;
+ top: 0;
+ bottom: 0;
+ z-index: 1;
+ display: -ms-flexbox;
+ display: flex;
+ -ms-flex-align: center;
+ align-items: center;
+ -ms-flex-pack: center;
+ justify-content: center;
+ width: 15%;
+ padding: 0;
+ color: #fff;
+ text-align: center;
+ background: none;
+ border: 0;
+ opacity: 0.5;
+ transition: opacity 0.15s ease;
+}
+
+@media (prefers-reduced-motion: reduce) {
+ .carousel-control-prev,
+ .carousel-control-next {
+ transition: none;
+ }
+}
+
+.carousel-control-prev:hover, .carousel-control-prev:focus,
+.carousel-control-next:hover,
+.carousel-control-next:focus {
+ color: #fff;
+ text-decoration: none;
+ outline: 0;
+ opacity: 0.9;
+}
+
+.carousel-control-prev {
+ left: 0;
+}
+
+.carousel-control-next {
+ right: 0;
+}
+
+.carousel-control-prev-icon,
+.carousel-control-next-icon {
+ display: inline-block;
+ width: 2rem;
+ height: 2rem;
+ background-repeat: no-repeat;
+ background-position: 50%;
+ background-size: 100% 100%;
+}
+
+/* rtl:options: {
+ "autoRename": true,
+ "stringMap":[ {
+ "name" : "prev-next",
+ "search" : "prev",
+ "replace" : "next"
+ } ]
+} */
+.carousel-control-prev-icon {
+ background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath d='M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z'/%3e%3c/svg%3e");
+}
+
+.carousel-control-next-icon {
+ background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath d='M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
+}
+
+.carousel-indicators {
+ position: absolute;
+ right: 0;
+ bottom: 0;
+ left: 0;
+ z-index: 2;
+ display: -ms-flexbox;
+ display: flex;
+ -ms-flex-pack: center;
+ justify-content: center;
+ padding: 0;
+ margin-right: 15%;
+ margin-bottom: 1rem;
+ margin-left: 15%;
+ list-style: none;
+}
+
+.carousel-indicators [data-bs-target] {
+ box-sizing: content-box;
+ -ms-flex: 0 1 auto;
+ flex: 0 1 auto;
+ width: 30px;
+ height: 3px;
+ padding: 0;
+ margin-right: 3px;
+ margin-left: 3px;
+ text-indent: -999px;
+ cursor: pointer;
+ background-color: #fff;
+ background-clip: padding-box;
+ border: 0;
+ border-top: 10px solid transparent;
+ border-bottom: 10px solid transparent;
+ opacity: 0.5;
+ transition: opacity 0.6s ease;
+}
+
+@media (prefers-reduced-motion: reduce) {
+ .carousel-indicators [data-bs-target] {
+ transition: none;
+ }
+}
+
+.carousel-indicators .active {
+ opacity: 1;
+}
+
+.carousel-caption {
+ position: absolute;
+ right: 15%;
+ bottom: 1.25rem;
+ left: 15%;
+ padding-top: 1.25rem;
+ padding-bottom: 1.25rem;
+ color: #fff;
+ text-align: center;
+}
+
+.carousel-dark .carousel-control-prev-icon,
+.carousel-dark .carousel-control-next-icon {
+ -webkit-filter: invert(1) grayscale(100);
+ filter: invert(1) grayscale(100);
+}
+
+.carousel-dark .carousel-indicators [data-bs-target] {
+ background-color: #000;
+}
+
+.carousel-dark .carousel-caption {
+ color: #000;
+}
+
+@-webkit-keyframes spinner-border {
+ to {
+ -webkit-transform: rotate(360deg) /* rtl:ignore */;
+ transform: rotate(360deg) /* rtl:ignore */;
+ }
+}
+
+@keyframes spinner-border {
+ to {
+ -webkit-transform: rotate(360deg) /* rtl:ignore */;
+ transform: rotate(360deg) /* rtl:ignore */;
+ }
+}
+
+.spinner-border {
+ display: inline-block;
+ width: 2rem;
+ height: 2rem;
+ vertical-align: -0.125em;
+ border: 0.25em solid currentColor;
+ border-right-color: transparent;
+ border-radius: 50%;
+ -webkit-animation: 0.75s linear infinite spinner-border;
+ animation: 0.75s linear infinite spinner-border;
+}
+
+.spinner-border-sm {
+ width: 1rem;
+ height: 1rem;
+ border-width: 0.2em;
+}
+
+@-webkit-keyframes spinner-grow {
+ 0% {
+ -webkit-transform: scale(0);
+ transform: scale(0);
+ }
+ 50% {
+ opacity: 1;
+ -webkit-transform: none;
+ transform: none;
+ }
+}
+
+@keyframes spinner-grow {
+ 0% {
+ -webkit-transform: scale(0);
+ transform: scale(0);
+ }
+ 50% {
+ opacity: 1;
+ -webkit-transform: none;
+ transform: none;
+ }
+}
+
+.spinner-grow {
+ display: inline-block;
+ width: 2rem;
+ height: 2rem;
+ vertical-align: -0.125em;
+ background-color: currentColor;
+ border-radius: 50%;
+ opacity: 0;
+ -webkit-animation: 0.75s linear infinite spinner-grow;
+ animation: 0.75s linear infinite spinner-grow;
+}
+
+.spinner-grow-sm {
+ width: 1rem;
+ height: 1rem;
+}
+
+@media (prefers-reduced-motion: reduce) {
+ .spinner-border,
+ .spinner-grow {
+ -webkit-animation-duration: 1.5s;
+ animation-duration: 1.5s;
+ }
+}
+
+.offcanvas {
+ position: fixed;
+ bottom: 0;
+ z-index: 1050;
+ display: -ms-flexbox;
+ display: flex;
+ -ms-flex-direction: column;
+ flex-direction: column;
+ max-width: 100%;
+ visibility: hidden;
+ background-color: #303030;
+ background-clip: padding-box;
+ outline: 0;
+ transition: -webkit-transform 0.3s ease-in-out;
+ transition: transform 0.3s ease-in-out;
+ transition: transform 0.3s ease-in-out, -webkit-transform 0.3s ease-in-out;
+}
+
+@media (prefers-reduced-motion: reduce) {
+ .offcanvas {
+ transition: none;
+ }
+}
+
+.offcanvas-header {
+ display: -ms-flexbox;
+ display: flex;
+ -ms-flex-align: center;
+ align-items: center;
+ -ms-flex-pack: justify;
+ justify-content: space-between;
+ padding: 1rem 1rem;
+}
+
+.offcanvas-header .btn-close {
+ padding: 0.5rem 0.5rem;
+ margin: -0.5rem -0.5rem -0.5rem auto;
+}
+
+.offcanvas-title {
+ margin-bottom: 0;
+ line-height: 1.5;
+}
+
+.offcanvas-body {
+ -ms-flex-positive: 1;
+ flex-grow: 1;
+ padding: 1rem 1rem;
+ overflow-y: auto;
+}
+
+.offcanvas-start {
+ top: 0;
+ left: 0;
+ width: 400px;
+ border-right: 1px solid #444;
+ -webkit-transform: translateX(-100%);
+ transform: translateX(-100%);
+}
+
+.offcanvas-end {
+ top: 0;
+ right: 0;
+ width: 400px;
+ border-left: 1px solid #444;
+ -webkit-transform: translateX(100%);
+ transform: translateX(100%);
+}
+
+.offcanvas-top {
+ top: 0;
+ right: 0;
+ left: 0;
+ height: 30vh;
+ max-height: 100%;
+ border-bottom: 1px solid #444;
+ -webkit-transform: translateY(-100%);
+ transform: translateY(-100%);
+}
+
+.offcanvas-bottom {
+ right: 0;
+ left: 0;
+ height: 30vh;
+ max-height: 100%;
+ border-top: 1px solid #444;
+ -webkit-transform: translateY(100%);
+ transform: translateY(100%);
+}
+
+.offcanvas.show {
+ -webkit-transform: none;
+ transform: none;
+}
+
+.clearfix::after {
+ display: block;
+ clear: both;
+ content: "";
+}
+
+.link-primary {
+ color: #375a7f;
+}
+
+.link-primary:hover, .link-primary:focus {
+ color: #2c4866;
+}
+
+.link-secondary {
+ color: #444;
+}
+
+.link-secondary:hover, .link-secondary:focus {
+ color: #363636;
+}
+
+.link-success {
+ color: #00bc8c;
+}
+
+.link-success:hover, .link-success:focus {
+ color: #009670;
+}
+
+.link-info {
+ color: #3498db;
+}
+
+.link-info:hover, .link-info:focus {
+ color: #2a7aaf;
+}
+
+.link-warning {
+ color: #f39c12;
+}
+
+.link-warning:hover, .link-warning:focus {
+ color: #c27d0e;
+}
+
+.link-danger {
+ color: #e74c3c;
+}
+
+.link-danger:hover, .link-danger:focus {
+ color: #b93d30;
+}
+
+.link-light {
+ color: #adb5bd;
+}
+
+.link-light:hover, .link-light:focus {
+ color: #bdc4ca;
+}
+
+.link-dark {
+ color: #303030;
+}
+
+.link-dark:hover, .link-dark:focus {
+ color: #262626;
+}
+
+.ratio {
+ position: relative;
+ width: 100%;
+}
+
+.ratio::before {
+ display: block;
+ padding-top: var(--bs-aspect-ratio);
+ content: "";
+}
+
+.ratio > * {
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+}
+
+.ratio-1x1 {
+ --bs-aspect-ratio: 100%;
+}
+
+.ratio-4x3 {
+ --bs-aspect-ratio: calc(3 / 4 * 100%);
+}
+
+.ratio-16x9 {
+ --bs-aspect-ratio: calc(9 / 16 * 100%);
+}
+
+.ratio-21x9 {
+ --bs-aspect-ratio: calc(9 / 21 * 100%);
+}
+
+.fixed-top {
+ position: fixed;
+ top: 0;
+ right: 0;
+ left: 0;
+ z-index: 1030;
+}
+
+.fixed-bottom {
+ position: fixed;
+ right: 0;
+ bottom: 0;
+ left: 0;
+ z-index: 1030;
+}
+
+.sticky-top {
+ position: -webkit-sticky;
+ position: sticky;
+ top: 0;
+ z-index: 1020;
+}
+
+@media (min-width: 576px) {
+ .sticky-sm-top {
+ position: -webkit-sticky;
+ position: sticky;
+ top: 0;
+ z-index: 1020;
+ }
+}
+
+@media (min-width: 768px) {
+ .sticky-md-top {
+ position: -webkit-sticky;
+ position: sticky;
+ top: 0;
+ z-index: 1020;
+ }
+}
+
+@media (min-width: 992px) {
+ .sticky-lg-top {
+ position: -webkit-sticky;
+ position: sticky;
+ top: 0;
+ z-index: 1020;
+ }
+}
+
+@media (min-width: 1200px) {
+ .sticky-xl-top {
+ position: -webkit-sticky;
+ position: sticky;
+ top: 0;
+ z-index: 1020;
+ }
+}
+
+@media (min-width: 1400px) {
+ .sticky-xxl-top {
+ position: -webkit-sticky;
+ position: sticky;
+ top: 0;
+ z-index: 1020;
+ }
+}
+
+.visually-hidden,
+.visually-hidden-focusable:not(:focus):not(:focus-within) {
+ position: absolute !important;
+ width: 1px !important;
+ height: 1px !important;
+ padding: 0 !important;
+ margin: -1px !important;
+ overflow: hidden !important;
+ clip: rect(0, 0, 0, 0) !important;
+ white-space: nowrap !important;
+ border: 0 !important;
+}
+
+.stretched-link::after {
+ position: absolute;
+ top: 0;
+ right: 0;
+ bottom: 0;
+ left: 0;
+ z-index: 1;
+ content: "";
+}
+
+.text-truncate {
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+}
+
+.align-baseline {
+ vertical-align: baseline !important;
+}
+
+.align-top {
+ vertical-align: top !important;
+}
+
+.align-middle {
+ vertical-align: middle !important;
+}
+
+.align-bottom {
+ vertical-align: bottom !important;
+}
+
+.align-text-bottom {
+ vertical-align: text-bottom !important;
+}
+
+.align-text-top {
+ vertical-align: text-top !important;
+}
+
+.float-start {
+ float: left !important;
+}
+
+.float-end {
+ float: right !important;
+}
+
+.float-none {
+ float: none !important;
+}
+
+.overflow-auto {
+ overflow: auto !important;
+}
+
+.overflow-hidden {
+ overflow: hidden !important;
+}
+
+.overflow-visible {
+ overflow: visible !important;
+}
+
+.overflow-scroll {
+ overflow: scroll !important;
+}
+
+.d-inline {
+ display: inline !important;
+}
+
+.d-inline-block {
+ display: inline-block !important;
+}
+
+.d-block {
+ display: block !important;
+}
+
+.d-grid {
+ display: grid !important;
+}
+
+.d-table {
+ display: table !important;
+}
+
+.d-table-row {
+ display: table-row !important;
+}
+
+.d-table-cell {
+ display: table-cell !important;
+}
+
+.d-flex {
+ display: -ms-flexbox !important;
+ display: flex !important;
+}
+
+.d-inline-flex {
+ display: -ms-inline-flexbox !important;
+ display: inline-flex !important;
+}
+
+.d-none {
+ display: none !important;
+}
+
+.shadow {
+ box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
+}
+
+.shadow-sm {
+ box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
+}
+
+.shadow-lg {
+ box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175) !important;
+}
+
+.shadow-none {
+ box-shadow: none !important;
+}
+
+.position-static {
+ position: static !important;
+}
+
+.position-relative {
+ position: relative !important;
+}
+
+.position-absolute {
+ position: absolute !important;
+}
+
+.position-fixed {
+ position: fixed !important;
+}
+
+.position-sticky {
+ position: -webkit-sticky !important;
+ position: sticky !important;
+}
+
+.top-0 {
+ top: 0 !important;
+}
+
+.top-50 {
+ top: 50% !important;
+}
+
+.top-100 {
+ top: 100% !important;
+}
+
+.bottom-0 {
+ bottom: 0 !important;
+}
+
+.bottom-50 {
+ bottom: 50% !important;
+}
+
+.bottom-100 {
+ bottom: 100% !important;
+}
+
+.start-0 {
+ left: 0 !important;
+}
+
+.start-50 {
+ left: 50% !important;
+}
+
+.start-100 {
+ left: 100% !important;
+}
+
+.end-0 {
+ right: 0 !important;
+}
+
+.end-50 {
+ right: 50% !important;
+}
+
+.end-100 {
+ right: 100% !important;
+}
+
+.translate-middle {
+ -webkit-transform: translate(-50%, -50%) !important;
+ transform: translate(-50%, -50%) !important;
+}
+
+.translate-middle-x {
+ -webkit-transform: translateX(-50%) !important;
+ transform: translateX(-50%) !important;
+}
+
+.translate-middle-y {
+ -webkit-transform: translateY(-50%) !important;
+ transform: translateY(-50%) !important;
+}
+
+.border {
+ border: 1px solid #dee2e6 !important;
+}
+
+.border-0 {
+ border: 0 !important;
+}
+
+.border-top {
+ border-top: 1px solid #dee2e6 !important;
+}
+
+.border-top-0 {
+ border-top: 0 !important;
+}
+
+.border-end {
+ border-right: 1px solid #dee2e6 !important;
+}
+
+.border-end-0 {
+ border-right: 0 !important;
+}
+
+.border-bottom {
+ border-bottom: 1px solid #dee2e6 !important;
+}
+
+.border-bottom-0 {
+ border-bottom: 0 !important;
+}
+
+.border-start {
+ border-left: 1px solid #dee2e6 !important;
+}
+
+.border-start-0 {
+ border-left: 0 !important;
+}
+
+.border-primary {
+ border-color: #375a7f !important;
+}
+
+.border-secondary {
+ border-color: #444 !important;
+}
+
+.border-success {
+ border-color: #00bc8c !important;
+}
+
+.border-info {
+ border-color: #3498db !important;
+}
+
+.border-warning {
+ border-color: #f39c12 !important;
+}
+
+.border-danger {
+ border-color: #e74c3c !important;
+}
+
+.border-light {
+ border-color: #adb5bd !important;
+}
+
+.border-dark {
+ border-color: #303030 !important;
+}
+
+.border-white {
+ border-color: #fff !important;
+}
+
+.border-1 {
+ border-width: 1px !important;
+}
+
+.border-2 {
+ border-width: 2px !important;
+}
+
+.border-3 {
+ border-width: 3px !important;
+}
+
+.border-4 {
+ border-width: 4px !important;
+}
+
+.border-5 {
+ border-width: 5px !important;
+}
+
+.w-25 {
+ width: 25% !important;
+}
+
+.w-50 {
+ width: 50% !important;
+}
+
+.w-75 {
+ width: 75% !important;
+}
+
+.w-100 {
+ width: 100% !important;
+}
+
+.w-auto {
+ width: auto !important;
+}
+
+.mw-100 {
+ max-width: 100% !important;
+}
+
+.vw-100 {
+ width: 100vw !important;
+}
+
+.min-vw-100 {
+ min-width: 100vw !important;
+}
+
+.h-25 {
+ height: 25% !important;
+}
+
+.h-50 {
+ height: 50% !important;
+}
+
+.h-75 {
+ height: 75% !important;
+}
+
+.h-100 {
+ height: 100% !important;
+}
+
+.h-auto {
+ height: auto !important;
+}
+
+.mh-100 {
+ max-height: 100% !important;
+}
+
+.vh-100 {
+ height: 100vh !important;
+}
+
+.min-vh-100 {
+ min-height: 100vh !important;
+}
+
+.flex-fill {
+ -ms-flex: 1 1 auto !important;
+ flex: 1 1 auto !important;
+}
+
+.flex-row {
+ -ms-flex-direction: row !important;
+ flex-direction: row !important;
+}
+
+.flex-column {
+ -ms-flex-direction: column !important;
+ flex-direction: column !important;
+}
+
+.flex-row-reverse {
+ -ms-flex-direction: row-reverse !important;
+ flex-direction: row-reverse !important;
+}
+
+.flex-column-reverse {
+ -ms-flex-direction: column-reverse !important;
+ flex-direction: column-reverse !important;
+}
+
+.flex-grow-0 {
+ -ms-flex-positive: 0 !important;
+ flex-grow: 0 !important;
+}
+
+.flex-grow-1 {
+ -ms-flex-positive: 1 !important;
+ flex-grow: 1 !important;
+}
+
+.flex-shrink-0 {
+ -ms-flex-negative: 0 !important;
+ flex-shrink: 0 !important;
+}
+
+.flex-shrink-1 {
+ -ms-flex-negative: 1 !important;
+ flex-shrink: 1 !important;
+}
+
+.flex-wrap {
+ -ms-flex-wrap: wrap !important;
+ flex-wrap: wrap !important;
+}
+
+.flex-nowrap {
+ -ms-flex-wrap: nowrap !important;
+ flex-wrap: nowrap !important;
+}
+
+.flex-wrap-reverse {
+ -ms-flex-wrap: wrap-reverse !important;
+ flex-wrap: wrap-reverse !important;
+}
+
+.gap-0 {
+ gap: 0 !important;
+}
+
+.gap-1 {
+ gap: 0.25rem !important;
+}
+
+.gap-2 {
+ gap: 0.5rem !important;
+}
+
+.gap-3 {
+ gap: 1rem !important;
+}
+
+.gap-4 {
+ gap: 1.5rem !important;
+}
+
+.gap-5 {
+ gap: 3rem !important;
+}
+
+.justify-content-start {
+ -ms-flex-pack: start !important;
+ justify-content: flex-start !important;
+}
+
+.justify-content-end {
+ -ms-flex-pack: end !important;
+ justify-content: flex-end !important;
+}
+
+.justify-content-center {
+ -ms-flex-pack: center !important;
+ justify-content: center !important;
+}
+
+.justify-content-between {
+ -ms-flex-pack: justify !important;
+ justify-content: space-between !important;
+}
+
+.justify-content-around {
+ -ms-flex-pack: distribute !important;
+ justify-content: space-around !important;
+}
+
+.justify-content-evenly {
+ -ms-flex-pack: space-evenly !important;
+ justify-content: space-evenly !important;
+}
+
+.align-items-start {
+ -ms-flex-align: start !important;
+ align-items: flex-start !important;
+}
+
+.align-items-end {
+ -ms-flex-align: end !important;
+ align-items: flex-end !important;
+}
+
+.align-items-center {
+ -ms-flex-align: center !important;
+ align-items: center !important;
+}
+
+.align-items-baseline {
+ -ms-flex-align: baseline !important;
+ align-items: baseline !important;
+}
+
+.align-items-stretch {
+ -ms-flex-align: stretch !important;
+ align-items: stretch !important;
+}
+
+.align-content-start {
+ -ms-flex-line-pack: start !important;
+ align-content: flex-start !important;
+}
+
+.align-content-end {
+ -ms-flex-line-pack: end !important;
+ align-content: flex-end !important;
+}
+
+.align-content-center {
+ -ms-flex-line-pack: center !important;
+ align-content: center !important;
+}
+
+.align-content-between {
+ -ms-flex-line-pack: justify !important;
+ align-content: space-between !important;
+}
+
+.align-content-around {
+ -ms-flex-line-pack: distribute !important;
+ align-content: space-around !important;
+}
+
+.align-content-stretch {
+ -ms-flex-line-pack: stretch !important;
+ align-content: stretch !important;
+}
+
+.align-self-auto {
+ -ms-flex-item-align: auto !important;
+ align-self: auto !important;
+}
+
+.align-self-start {
+ -ms-flex-item-align: start !important;
+ align-self: flex-start !important;
+}
+
+.align-self-end {
+ -ms-flex-item-align: end !important;
+ align-self: flex-end !important;
+}
+
+.align-self-center {
+ -ms-flex-item-align: center !important;
+ align-self: center !important;
+}
+
+.align-self-baseline {
+ -ms-flex-item-align: baseline !important;
+ align-self: baseline !important;
+}
+
+.align-self-stretch {
+ -ms-flex-item-align: stretch !important;
+ align-self: stretch !important;
+}
+
+.order-first {
+ -ms-flex-order: -1 !important;
+ order: -1 !important;
+}
+
+.order-0 {
+ -ms-flex-order: 0 !important;
+ order: 0 !important;
+}
+
+.order-1 {
+ -ms-flex-order: 1 !important;
+ order: 1 !important;
+}
+
+.order-2 {
+ -ms-flex-order: 2 !important;
+ order: 2 !important;
+}
+
+.order-3 {
+ -ms-flex-order: 3 !important;
+ order: 3 !important;
+}
+
+.order-4 {
+ -ms-flex-order: 4 !important;
+ order: 4 !important;
+}
+
+.order-5 {
+ -ms-flex-order: 5 !important;
+ order: 5 !important;
+}
+
+.order-last {
+ -ms-flex-order: 6 !important;
+ order: 6 !important;
+}
+
+.m-0 {
+ margin: 0 !important;
+}
+
+.m-1 {
+ margin: 0.25rem !important;
+}
+
+.m-2 {
+ margin: 0.5rem !important;
+}
+
+.m-3 {
+ margin: 1rem !important;
+}
+
+.m-4 {
+ margin: 1.5rem !important;
+}
+
+.m-5 {
+ margin: 3rem !important;
+}
+
+.m-auto {
+ margin: auto !important;
+}
+
+.mx-0 {
+ margin-right: 0 !important;
+ margin-left: 0 !important;
+}
+
+.mx-1 {
+ margin-right: 0.25rem !important;
+ margin-left: 0.25rem !important;
+}
+
+.mx-2 {
+ margin-right: 0.5rem !important;
+ margin-left: 0.5rem !important;
+}
+
+.mx-3 {
+ margin-right: 1rem !important;
+ margin-left: 1rem !important;
+}
+
+.mx-4 {
+ margin-right: 1.5rem !important;
+ margin-left: 1.5rem !important;
+}
+
+.mx-5 {
+ margin-right: 3rem !important;
+ margin-left: 3rem !important;
+}
+
+.mx-auto {
+ margin-right: auto !important;
+ margin-left: auto !important;
+}
+
+.my-0 {
+ margin-top: 0 !important;
+ margin-bottom: 0 !important;
+}
+
+.my-1 {
+ margin-top: 0.25rem !important;
+ margin-bottom: 0.25rem !important;
+}
+
+.my-2 {
+ margin-top: 0.5rem !important;
+ margin-bottom: 0.5rem !important;
+}
+
+.my-3 {
+ margin-top: 1rem !important;
+ margin-bottom: 1rem !important;
+}
+
+.my-4 {
+ margin-top: 1.5rem !important;
+ margin-bottom: 1.5rem !important;
+}
+
+.my-5 {
+ margin-top: 3rem !important;
+ margin-bottom: 3rem !important;
+}
+
+.my-auto {
+ margin-top: auto !important;
+ margin-bottom: auto !important;
+}
+
+.mt-0 {
+ margin-top: 0 !important;
+}
+
+.mt-1 {
+ margin-top: 0.25rem !important;
+}
+
+.mt-2 {
+ margin-top: 0.5rem !important;
+}
+
+.mt-3 {
+ margin-top: 1rem !important;
+}
+
+.mt-4 {
+ margin-top: 1.5rem !important;
+}
+
+.mt-5 {
+ margin-top: 3rem !important;
+}
+
+.mt-auto {
+ margin-top: auto !important;
+}
+
+.me-0 {
+ margin-right: 0 !important;
+}
+
+.me-1 {
+ margin-right: 0.25rem !important;
+}
+
+.me-2 {
+ margin-right: 0.5rem !important;
+}
+
+.me-3 {
+ margin-right: 1rem !important;
+}
+
+.me-4 {
+ margin-right: 1.5rem !important;
+}
+
+.me-5 {
+ margin-right: 3rem !important;
+}
+
+.me-auto {
+ margin-right: auto !important;
+}
+
+.mb-0 {
+ margin-bottom: 0 !important;
+}
+
+.mb-1 {
+ margin-bottom: 0.25rem !important;
+}
+
+.mb-2 {
+ margin-bottom: 0.5rem !important;
+}
+
+.mb-3 {
+ margin-bottom: 1rem !important;
+}
+
+.mb-4 {
+ margin-bottom: 1.5rem !important;
+}
+
+.mb-5 {
+ margin-bottom: 3rem !important;
+}
+
+.mb-auto {
+ margin-bottom: auto !important;
+}
+
+.ms-0 {
+ margin-left: 0 !important;
+}
+
+.ms-1 {
+ margin-left: 0.25rem !important;
+}
+
+.ms-2 {
+ margin-left: 0.5rem !important;
+}
+
+.ms-3 {
+ margin-left: 1rem !important;
+}
+
+.ms-4 {
+ margin-left: 1.5rem !important;
+}
+
+.ms-5 {
+ margin-left: 3rem !important;
+}
+
+.ms-auto {
+ margin-left: auto !important;
+}
+
+.p-0 {
+ padding: 0 !important;
+}
+
+.p-1 {
+ padding: 0.25rem !important;
+}
+
+.p-2 {
+ padding: 0.5rem !important;
+}
+
+.p-3 {
+ padding: 1rem !important;
+}
+
+.p-4 {
+ padding: 1.5rem !important;
+}
+
+.p-5 {
+ padding: 3rem !important;
+}
+
+.px-0 {
+ padding-right: 0 !important;
+ padding-left: 0 !important;
+}
+
+.px-1 {
+ padding-right: 0.25rem !important;
+ padding-left: 0.25rem !important;
+}
+
+.px-2 {
+ padding-right: 0.5rem !important;
+ padding-left: 0.5rem !important;
+}
+
+.px-3 {
+ padding-right: 1rem !important;
+ padding-left: 1rem !important;
+}
+
+.px-4 {
+ padding-right: 1.5rem !important;
+ padding-left: 1.5rem !important;
+}
+
+.px-5 {
+ padding-right: 3rem !important;
+ padding-left: 3rem !important;
+}
+
+.py-0 {
+ padding-top: 0 !important;
+ padding-bottom: 0 !important;
+}
+
+.py-1 {
+ padding-top: 0.25rem !important;
+ padding-bottom: 0.25rem !important;
+}
+
+.py-2 {
+ padding-top: 0.5rem !important;
+ padding-bottom: 0.5rem !important;
+}
+
+.py-3 {
+ padding-top: 1rem !important;
+ padding-bottom: 1rem !important;
+}
+
+.py-4 {
+ padding-top: 1.5rem !important;
+ padding-bottom: 1.5rem !important;
+}
+
+.py-5 {
+ padding-top: 3rem !important;
+ padding-bottom: 3rem !important;
+}
+
+.pt-0 {
+ padding-top: 0 !important;
+}
+
+.pt-1 {
+ padding-top: 0.25rem !important;
+}
+
+.pt-2 {
+ padding-top: 0.5rem !important;
+}
+
+.pt-3 {
+ padding-top: 1rem !important;
+}
+
+.pt-4 {
+ padding-top: 1.5rem !important;
+}
+
+.pt-5 {
+ padding-top: 3rem !important;
+}
+
+.pe-0 {
+ padding-right: 0 !important;
+}
+
+.pe-1 {
+ padding-right: 0.25rem !important;
+}
+
+.pe-2 {
+ padding-right: 0.5rem !important;
+}
+
+.pe-3 {
+ padding-right: 1rem !important;
+}
+
+.pe-4 {
+ padding-right: 1.5rem !important;
+}
+
+.pe-5 {
+ padding-right: 3rem !important;
+}
+
+.pb-0 {
+ padding-bottom: 0 !important;
+}
+
+.pb-1 {
+ padding-bottom: 0.25rem !important;
+}
+
+.pb-2 {
+ padding-bottom: 0.5rem !important;
+}
+
+.pb-3 {
+ padding-bottom: 1rem !important;
+}
+
+.pb-4 {
+ padding-bottom: 1.5rem !important;
+}
+
+.pb-5 {
+ padding-bottom: 3rem !important;
+}
+
+.ps-0 {
+ padding-left: 0 !important;
+}
+
+.ps-1 {
+ padding-left: 0.25rem !important;
+}
+
+.ps-2 {
+ padding-left: 0.5rem !important;
+}
+
+.ps-3 {
+ padding-left: 1rem !important;
+}
+
+.ps-4 {
+ padding-left: 1.5rem !important;
+}
+
+.ps-5 {
+ padding-left: 3rem !important;
+}
+
+.font-monospace {
+ font-family: var(--bs-font-monospace) !important;
+}
+
+.fs-1 {
+ font-size: calc(1.425rem + 2.1vw) !important;
+}
+
+.fs-2 {
+ font-size: calc(1.375rem + 1.5vw) !important;
+}
+
+.fs-3 {
+ font-size: calc(1.325rem + 0.9vw) !important;
+}
+
+.fs-4 {
+ font-size: calc(1.275rem + 0.3vw) !important;
+}
+
+.fs-5 {
+ font-size: 1.25rem !important;
+}
+
+.fs-6 {
+ font-size: 1rem !important;
+}
+
+.fst-italic {
+ font-style: italic !important;
+}
+
+.fst-normal {
+ font-style: normal !important;
+}
+
+.fw-light {
+ font-weight: 300 !important;
+}
+
+.fw-lighter {
+ font-weight: lighter !important;
+}
+
+.fw-normal {
+ font-weight: 400 !important;
+}
+
+.fw-bold {
+ font-weight: 700 !important;
+}
+
+.fw-bolder {
+ font-weight: bolder !important;
+}
+
+.lh-1 {
+ line-height: 1 !important;
+}
+
+.lh-sm {
+ line-height: 1.25 !important;
+}
+
+.lh-base {
+ line-height: 1.5 !important;
+}
+
+.lh-lg {
+ line-height: 2 !important;
+}
+
+.text-start {
+ text-align: left !important;
+}
+
+.text-end {
+ text-align: right !important;
+}
+
+.text-center {
+ text-align: center !important;
+}
+
+.text-decoration-none {
+ text-decoration: none !important;
+}
+
+.text-decoration-underline {
+ text-decoration: underline !important;
+}
+
+.text-decoration-line-through {
+ text-decoration: line-through !important;
+}
+
+.text-lowercase {
+ text-transform: lowercase !important;
+}
+
+.text-uppercase {
+ text-transform: uppercase !important;
+}
+
+.text-capitalize {
+ text-transform: capitalize !important;
+}
+
+.text-wrap {
+ white-space: normal !important;
+}
+
+.text-nowrap {
+ white-space: nowrap !important;
+}
+
+/* rtl:begin:remove */
+.text-break {
+ word-wrap: break-word !important;
+ word-break: break-word !important;
+}
+
+/* rtl:end:remove */
+.text-primary {
+ color: #375a7f !important;
+}
+
+.text-secondary {
+ color: #444 !important;
+}
+
+.text-success {
+ color: #00bc8c !important;
+}
+
+.text-info {
+ color: #3498db !important;
+}
+
+.text-warning {
+ color: #f39c12 !important;
+}
+
+.text-danger {
+ color: #e74c3c !important;
+}
+
+.text-light {
+ color: #adb5bd !important;
+}
+
+.text-dark {
+ color: #303030 !important;
+}
+
+.text-white {
+ color: #fff !important;
+}
+
+.text-body {
+ color: #fff !important;
+}
+
+.text-muted {
+ color: #888 !important;
+}
+
+.text-black-50 {
+ color: rgba(0, 0, 0, 0.5) !important;
+}
+
+.text-white-50 {
+ color: rgba(255, 255, 255, 0.5) !important;
+}
+
+.text-reset {
+ color: inherit !important;
+}
+
+.bg-primary {
+ background-color: #375a7f !important;
+}
+
+.bg-secondary {
+ background-color: #444 !important;
+}
+
+.bg-success {
+ background-color: #00bc8c !important;
+}
+
+.bg-info {
+ background-color: #3498db !important;
+}
+
+.bg-warning {
+ background-color: #f39c12 !important;
+}
+
+.bg-danger {
+ background-color: #e74c3c !important;
+}
+
+.bg-light {
+ background-color: #adb5bd !important;
+}
+
+.bg-dark {
+ background-color: #303030 !important;
+}
+
+.bg-body {
+ background-color: #222 !important;
+}
+
+.bg-white {
+ background-color: #fff !important;
+}
+
+.bg-transparent {
+ background-color: transparent !important;
+}
+
+.bg-gradient {
+ background-image: var(--bs-gradient) !important;
+}
+
+.user-select-all {
+ -webkit-user-select: all !important;
+ -moz-user-select: all !important;
+ user-select: all !important;
+}
+
+.user-select-auto {
+ -webkit-user-select: auto !important;
+ -moz-user-select: auto !important;
+ -ms-user-select: auto !important;
+ user-select: auto !important;
+}
+
+.user-select-none {
+ -webkit-user-select: none !important;
+ -moz-user-select: none !important;
+ -ms-user-select: none !important;
+ user-select: none !important;
+}
+
+.pe-none {
+ pointer-events: none !important;
+}
+
+.pe-auto {
+ pointer-events: auto !important;
+}
+
+.rounded {
+ border-radius: 0.25rem !important;
+}
+
+.rounded-0 {
+ border-radius: 0 !important;
+}
+
+.rounded-1 {
+ border-radius: 0.2rem !important;
+}
+
+.rounded-2 {
+ border-radius: 0.25rem !important;
+}
+
+.rounded-3 {
+ border-radius: 0.3rem !important;
+}
+
+.rounded-circle {
+ border-radius: 50% !important;
+}
+
+.rounded-pill {
+ border-radius: 50rem !important;
+}
+
+.rounded-top {
+ border-top-left-radius: 0.25rem !important;
+ border-top-right-radius: 0.25rem !important;
+}
+
+.rounded-end {
+ border-top-right-radius: 0.25rem !important;
+ border-bottom-right-radius: 0.25rem !important;
+}
+
+.rounded-bottom {
+ border-bottom-right-radius: 0.25rem !important;
+ border-bottom-left-radius: 0.25rem !important;
+}
+
+.rounded-start {
+ border-bottom-left-radius: 0.25rem !important;
+ border-top-left-radius: 0.25rem !important;
+}
+
+.visible {
+ visibility: visible !important;
+}
+
+.invisible {
+ visibility: hidden !important;
+}
+
+@media (min-width: 576px) {
+ .float-sm-start {
+ float: left !important;
+ }
+ .float-sm-end {
+ float: right !important;
+ }
+ .float-sm-none {
+ float: none !important;
+ }
+ .d-sm-inline {
+ display: inline !important;
+ }
+ .d-sm-inline-block {
+ display: inline-block !important;
+ }
+ .d-sm-block {
+ display: block !important;
+ }
+ .d-sm-grid {
+ display: grid !important;
+ }
+ .d-sm-table {
+ display: table !important;
+ }
+ .d-sm-table-row {
+ display: table-row !important;
+ }
+ .d-sm-table-cell {
+ display: table-cell !important;
+ }
+ .d-sm-flex {
+ display: -ms-flexbox !important;
+ display: flex !important;
+ }
+ .d-sm-inline-flex {
+ display: -ms-inline-flexbox !important;
+ display: inline-flex !important;
+ }
+ .d-sm-none {
+ display: none !important;
+ }
+ .flex-sm-fill {
+ -ms-flex: 1 1 auto !important;
+ flex: 1 1 auto !important;
+ }
+ .flex-sm-row {
+ -ms-flex-direction: row !important;
+ flex-direction: row !important;
+ }
+ .flex-sm-column {
+ -ms-flex-direction: column !important;
+ flex-direction: column !important;
+ }
+ .flex-sm-row-reverse {
+ -ms-flex-direction: row-reverse !important;
+ flex-direction: row-reverse !important;
+ }
+ .flex-sm-column-reverse {
+ -ms-flex-direction: column-reverse !important;
+ flex-direction: column-reverse !important;
+ }
+ .flex-sm-grow-0 {
+ -ms-flex-positive: 0 !important;
+ flex-grow: 0 !important;
+ }
+ .flex-sm-grow-1 {
+ -ms-flex-positive: 1 !important;
+ flex-grow: 1 !important;
+ }
+ .flex-sm-shrink-0 {
+ -ms-flex-negative: 0 !important;
+ flex-shrink: 0 !important;
+ }
+ .flex-sm-shrink-1 {
+ -ms-flex-negative: 1 !important;
+ flex-shrink: 1 !important;
+ }
+ .flex-sm-wrap {
+ -ms-flex-wrap: wrap !important;
+ flex-wrap: wrap !important;
+ }
+ .flex-sm-nowrap {
+ -ms-flex-wrap: nowrap !important;
+ flex-wrap: nowrap !important;
+ }
+ .flex-sm-wrap-reverse {
+ -ms-flex-wrap: wrap-reverse !important;
+ flex-wrap: wrap-reverse !important;
+ }
+ .gap-sm-0 {
+ gap: 0 !important;
+ }
+ .gap-sm-1 {
+ gap: 0.25rem !important;
+ }
+ .gap-sm-2 {
+ gap: 0.5rem !important;
+ }
+ .gap-sm-3 {
+ gap: 1rem !important;
+ }
+ .gap-sm-4 {
+ gap: 1.5rem !important;
+ }
+ .gap-sm-5 {
+ gap: 3rem !important;
+ }
+ .justify-content-sm-start {
+ -ms-flex-pack: start !important;
+ justify-content: flex-start !important;
+ }
+ .justify-content-sm-end {
+ -ms-flex-pack: end !important;
+ justify-content: flex-end !important;
+ }
+ .justify-content-sm-center {
+ -ms-flex-pack: center !important;
+ justify-content: center !important;
+ }
+ .justify-content-sm-between {
+ -ms-flex-pack: justify !important;
+ justify-content: space-between !important;
+ }
+ .justify-content-sm-around {
+ -ms-flex-pack: distribute !important;
+ justify-content: space-around !important;
+ }
+ .justify-content-sm-evenly {
+ -ms-flex-pack: space-evenly !important;
+ justify-content: space-evenly !important;
+ }
+ .align-items-sm-start {
+ -ms-flex-align: start !important;
+ align-items: flex-start !important;
+ }
+ .align-items-sm-end {
+ -ms-flex-align: end !important;
+ align-items: flex-end !important;
+ }
+ .align-items-sm-center {
+ -ms-flex-align: center !important;
+ align-items: center !important;
+ }
+ .align-items-sm-baseline {
+ -ms-flex-align: baseline !important;
+ align-items: baseline !important;
+ }
+ .align-items-sm-stretch {
+ -ms-flex-align: stretch !important;
+ align-items: stretch !important;
+ }
+ .align-content-sm-start {
+ -ms-flex-line-pack: start !important;
+ align-content: flex-start !important;
+ }
+ .align-content-sm-end {
+ -ms-flex-line-pack: end !important;
+ align-content: flex-end !important;
+ }
+ .align-content-sm-center {
+ -ms-flex-line-pack: center !important;
+ align-content: center !important;
+ }
+ .align-content-sm-between {
+ -ms-flex-line-pack: justify !important;
+ align-content: space-between !important;
+ }
+ .align-content-sm-around {
+ -ms-flex-line-pack: distribute !important;
+ align-content: space-around !important;
+ }
+ .align-content-sm-stretch {
+ -ms-flex-line-pack: stretch !important;
+ align-content: stretch !important;
+ }
+ .align-self-sm-auto {
+ -ms-flex-item-align: auto !important;
+ align-self: auto !important;
+ }
+ .align-self-sm-start {
+ -ms-flex-item-align: start !important;
+ align-self: flex-start !important;
+ }
+ .align-self-sm-end {
+ -ms-flex-item-align: end !important;
+ align-self: flex-end !important;
+ }
+ .align-self-sm-center {
+ -ms-flex-item-align: center !important;
+ align-self: center !important;
+ }
+ .align-self-sm-baseline {
+ -ms-flex-item-align: baseline !important;
+ align-self: baseline !important;
+ }
+ .align-self-sm-stretch {
+ -ms-flex-item-align: stretch !important;
+ align-self: stretch !important;
+ }
+ .order-sm-first {
+ -ms-flex-order: -1 !important;
+ order: -1 !important;
+ }
+ .order-sm-0 {
+ -ms-flex-order: 0 !important;
+ order: 0 !important;
+ }
+ .order-sm-1 {
+ -ms-flex-order: 1 !important;
+ order: 1 !important;
+ }
+ .order-sm-2 {
+ -ms-flex-order: 2 !important;
+ order: 2 !important;
+ }
+ .order-sm-3 {
+ -ms-flex-order: 3 !important;
+ order: 3 !important;
+ }
+ .order-sm-4 {
+ -ms-flex-order: 4 !important;
+ order: 4 !important;
+ }
+ .order-sm-5 {
+ -ms-flex-order: 5 !important;
+ order: 5 !important;
+ }
+ .order-sm-last {
+ -ms-flex-order: 6 !important;
+ order: 6 !important;
+ }
+ .m-sm-0 {
+ margin: 0 !important;
+ }
+ .m-sm-1 {
+ margin: 0.25rem !important;
+ }
+ .m-sm-2 {
+ margin: 0.5rem !important;
+ }
+ .m-sm-3 {
+ margin: 1rem !important;
+ }
+ .m-sm-4 {
+ margin: 1.5rem !important;
+ }
+ .m-sm-5 {
+ margin: 3rem !important;
+ }
+ .m-sm-auto {
+ margin: auto !important;
+ }
+ .mx-sm-0 {
+ margin-right: 0 !important;
+ margin-left: 0 !important;
+ }
+ .mx-sm-1 {
+ margin-right: 0.25rem !important;
+ margin-left: 0.25rem !important;
+ }
+ .mx-sm-2 {
+ margin-right: 0.5rem !important;
+ margin-left: 0.5rem !important;
+ }
+ .mx-sm-3 {
+ margin-right: 1rem !important;
+ margin-left: 1rem !important;
+ }
+ .mx-sm-4 {
+ margin-right: 1.5rem !important;
+ margin-left: 1.5rem !important;
+ }
+ .mx-sm-5 {
+ margin-right: 3rem !important;
+ margin-left: 3rem !important;
+ }
+ .mx-sm-auto {
+ margin-right: auto !important;
+ margin-left: auto !important;
+ }
+ .my-sm-0 {
+ margin-top: 0 !important;
+ margin-bottom: 0 !important;
+ }
+ .my-sm-1 {
+ margin-top: 0.25rem !important;
+ margin-bottom: 0.25rem !important;
+ }
+ .my-sm-2 {
+ margin-top: 0.5rem !important;
+ margin-bottom: 0.5rem !important;
+ }
+ .my-sm-3 {
+ margin-top: 1rem !important;
+ margin-bottom: 1rem !important;
+ }
+ .my-sm-4 {
+ margin-top: 1.5rem !important;
+ margin-bottom: 1.5rem !important;
+ }
+ .my-sm-5 {
+ margin-top: 3rem !important;
+ margin-bottom: 3rem !important;
+ }
+ .my-sm-auto {
+ margin-top: auto !important;
+ margin-bottom: auto !important;
+ }
+ .mt-sm-0 {
+ margin-top: 0 !important;
+ }
+ .mt-sm-1 {
+ margin-top: 0.25rem !important;
+ }
+ .mt-sm-2 {
+ margin-top: 0.5rem !important;
+ }
+ .mt-sm-3 {
+ margin-top: 1rem !important;
+ }
+ .mt-sm-4 {
+ margin-top: 1.5rem !important;
+ }
+ .mt-sm-5 {
+ margin-top: 3rem !important;
+ }
+ .mt-sm-auto {
+ margin-top: auto !important;
+ }
+ .me-sm-0 {
+ margin-right: 0 !important;
+ }
+ .me-sm-1 {
+ margin-right: 0.25rem !important;
+ }
+ .me-sm-2 {
+ margin-right: 0.5rem !important;
+ }
+ .me-sm-3 {
+ margin-right: 1rem !important;
+ }
+ .me-sm-4 {
+ margin-right: 1.5rem !important;
+ }
+ .me-sm-5 {
+ margin-right: 3rem !important;
+ }
+ .me-sm-auto {
+ margin-right: auto !important;
+ }
+ .mb-sm-0 {
+ margin-bottom: 0 !important;
+ }
+ .mb-sm-1 {
+ margin-bottom: 0.25rem !important;
+ }
+ .mb-sm-2 {
+ margin-bottom: 0.5rem !important;
+ }
+ .mb-sm-3 {
+ margin-bottom: 1rem !important;
+ }
+ .mb-sm-4 {
+ margin-bottom: 1.5rem !important;
+ }
+ .mb-sm-5 {
+ margin-bottom: 3rem !important;
+ }
+ .mb-sm-auto {
+ margin-bottom: auto !important;
+ }
+ .ms-sm-0 {
+ margin-left: 0 !important;
+ }
+ .ms-sm-1 {
+ margin-left: 0.25rem !important;
+ }
+ .ms-sm-2 {
+ margin-left: 0.5rem !important;
+ }
+ .ms-sm-3 {
+ margin-left: 1rem !important;
+ }
+ .ms-sm-4 {
+ margin-left: 1.5rem !important;
+ }
+ .ms-sm-5 {
+ margin-left: 3rem !important;
+ }
+ .ms-sm-auto {
+ margin-left: auto !important;
+ }
+ .p-sm-0 {
+ padding: 0 !important;
+ }
+ .p-sm-1 {
+ padding: 0.25rem !important;
+ }
+ .p-sm-2 {
+ padding: 0.5rem !important;
+ }
+ .p-sm-3 {
+ padding: 1rem !important;
+ }
+ .p-sm-4 {
+ padding: 1.5rem !important;
+ }
+ .p-sm-5 {
+ padding: 3rem !important;
+ }
+ .px-sm-0 {
+ padding-right: 0 !important;
+ padding-left: 0 !important;
+ }
+ .px-sm-1 {
+ padding-right: 0.25rem !important;
+ padding-left: 0.25rem !important;
+ }
+ .px-sm-2 {
+ padding-right: 0.5rem !important;
+ padding-left: 0.5rem !important;
+ }
+ .px-sm-3 {
+ padding-right: 1rem !important;
+ padding-left: 1rem !important;
+ }
+ .px-sm-4 {
+ padding-right: 1.5rem !important;
+ padding-left: 1.5rem !important;
+ }
+ .px-sm-5 {
+ padding-right: 3rem !important;
+ padding-left: 3rem !important;
+ }
+ .py-sm-0 {
+ padding-top: 0 !important;
+ padding-bottom: 0 !important;
+ }
+ .py-sm-1 {
+ padding-top: 0.25rem !important;
+ padding-bottom: 0.25rem !important;
+ }
+ .py-sm-2 {
+ padding-top: 0.5rem !important;
+ padding-bottom: 0.5rem !important;
+ }
+ .py-sm-3 {
+ padding-top: 1rem !important;
+ padding-bottom: 1rem !important;
+ }
+ .py-sm-4 {
+ padding-top: 1.5rem !important;
+ padding-bottom: 1.5rem !important;
+ }
+ .py-sm-5 {
+ padding-top: 3rem !important;
+ padding-bottom: 3rem !important;
+ }
+ .pt-sm-0 {
+ padding-top: 0 !important;
+ }
+ .pt-sm-1 {
+ padding-top: 0.25rem !important;
+ }
+ .pt-sm-2 {
+ padding-top: 0.5rem !important;
+ }
+ .pt-sm-3 {
+ padding-top: 1rem !important;
+ }
+ .pt-sm-4 {
+ padding-top: 1.5rem !important;
+ }
+ .pt-sm-5 {
+ padding-top: 3rem !important;
+ }
+ .pe-sm-0 {
+ padding-right: 0 !important;
+ }
+ .pe-sm-1 {
+ padding-right: 0.25rem !important;
+ }
+ .pe-sm-2 {
+ padding-right: 0.5rem !important;
+ }
+ .pe-sm-3 {
+ padding-right: 1rem !important;
+ }
+ .pe-sm-4 {
+ padding-right: 1.5rem !important;
+ }
+ .pe-sm-5 {
+ padding-right: 3rem !important;
+ }
+ .pb-sm-0 {
+ padding-bottom: 0 !important;
+ }
+ .pb-sm-1 {
+ padding-bottom: 0.25rem !important;
+ }
+ .pb-sm-2 {
+ padding-bottom: 0.5rem !important;
+ }
+ .pb-sm-3 {
+ padding-bottom: 1rem !important;
+ }
+ .pb-sm-4 {
+ padding-bottom: 1.5rem !important;
+ }
+ .pb-sm-5 {
+ padding-bottom: 3rem !important;
+ }
+ .ps-sm-0 {
+ padding-left: 0 !important;
+ }
+ .ps-sm-1 {
+ padding-left: 0.25rem !important;
+ }
+ .ps-sm-2 {
+ padding-left: 0.5rem !important;
+ }
+ .ps-sm-3 {
+ padding-left: 1rem !important;
+ }
+ .ps-sm-4 {
+ padding-left: 1.5rem !important;
+ }
+ .ps-sm-5 {
+ padding-left: 3rem !important;
+ }
+ .text-sm-start {
+ text-align: left !important;
+ }
+ .text-sm-end {
+ text-align: right !important;
+ }
+ .text-sm-center {
+ text-align: center !important;
+ }
+}
+
+@media (min-width: 768px) {
+ .float-md-start {
+ float: left !important;
+ }
+ .float-md-end {
+ float: right !important;
+ }
+ .float-md-none {
+ float: none !important;
+ }
+ .d-md-inline {
+ display: inline !important;
+ }
+ .d-md-inline-block {
+ display: inline-block !important;
+ }
+ .d-md-block {
+ display: block !important;
+ }
+ .d-md-grid {
+ display: grid !important;
+ }
+ .d-md-table {
+ display: table !important;
+ }
+ .d-md-table-row {
+ display: table-row !important;
+ }
+ .d-md-table-cell {
+ display: table-cell !important;
+ }
+ .d-md-flex {
+ display: -ms-flexbox !important;
+ display: flex !important;
+ }
+ .d-md-inline-flex {
+ display: -ms-inline-flexbox !important;
+ display: inline-flex !important;
+ }
+ .d-md-none {
+ display: none !important;
+ }
+ .flex-md-fill {
+ -ms-flex: 1 1 auto !important;
+ flex: 1 1 auto !important;
+ }
+ .flex-md-row {
+ -ms-flex-direction: row !important;
+ flex-direction: row !important;
+ }
+ .flex-md-column {
+ -ms-flex-direction: column !important;
+ flex-direction: column !important;
+ }
+ .flex-md-row-reverse {
+ -ms-flex-direction: row-reverse !important;
+ flex-direction: row-reverse !important;
+ }
+ .flex-md-column-reverse {
+ -ms-flex-direction: column-reverse !important;
+ flex-direction: column-reverse !important;
+ }
+ .flex-md-grow-0 {
+ -ms-flex-positive: 0 !important;
+ flex-grow: 0 !important;
+ }
+ .flex-md-grow-1 {
+ -ms-flex-positive: 1 !important;
+ flex-grow: 1 !important;
+ }
+ .flex-md-shrink-0 {
+ -ms-flex-negative: 0 !important;
+ flex-shrink: 0 !important;
+ }
+ .flex-md-shrink-1 {
+ -ms-flex-negative: 1 !important;
+ flex-shrink: 1 !important;
+ }
+ .flex-md-wrap {
+ -ms-flex-wrap: wrap !important;
+ flex-wrap: wrap !important;
+ }
+ .flex-md-nowrap {
+ -ms-flex-wrap: nowrap !important;
+ flex-wrap: nowrap !important;
+ }
+ .flex-md-wrap-reverse {
+ -ms-flex-wrap: wrap-reverse !important;
+ flex-wrap: wrap-reverse !important;
+ }
+ .gap-md-0 {
+ gap: 0 !important;
+ }
+ .gap-md-1 {
+ gap: 0.25rem !important;
+ }
+ .gap-md-2 {
+ gap: 0.5rem !important;
+ }
+ .gap-md-3 {
+ gap: 1rem !important;
+ }
+ .gap-md-4 {
+ gap: 1.5rem !important;
+ }
+ .gap-md-5 {
+ gap: 3rem !important;
+ }
+ .justify-content-md-start {
+ -ms-flex-pack: start !important;
+ justify-content: flex-start !important;
+ }
+ .justify-content-md-end {
+ -ms-flex-pack: end !important;
+ justify-content: flex-end !important;
+ }
+ .justify-content-md-center {
+ -ms-flex-pack: center !important;
+ justify-content: center !important;
+ }
+ .justify-content-md-between {
+ -ms-flex-pack: justify !important;
+ justify-content: space-between !important;
+ }
+ .justify-content-md-around {
+ -ms-flex-pack: distribute !important;
+ justify-content: space-around !important;
+ }
+ .justify-content-md-evenly {
+ -ms-flex-pack: space-evenly !important;
+ justify-content: space-evenly !important;
+ }
+ .align-items-md-start {
+ -ms-flex-align: start !important;
+ align-items: flex-start !important;
+ }
+ .align-items-md-end {
+ -ms-flex-align: end !important;
+ align-items: flex-end !important;
+ }
+ .align-items-md-center {
+ -ms-flex-align: center !important;
+ align-items: center !important;
+ }
+ .align-items-md-baseline {
+ -ms-flex-align: baseline !important;
+ align-items: baseline !important;
+ }
+ .align-items-md-stretch {
+ -ms-flex-align: stretch !important;
+ align-items: stretch !important;
+ }
+ .align-content-md-start {
+ -ms-flex-line-pack: start !important;
+ align-content: flex-start !important;
+ }
+ .align-content-md-end {
+ -ms-flex-line-pack: end !important;
+ align-content: flex-end !important;
+ }
+ .align-content-md-center {
+ -ms-flex-line-pack: center !important;
+ align-content: center !important;
+ }
+ .align-content-md-between {
+ -ms-flex-line-pack: justify !important;
+ align-content: space-between !important;
+ }
+ .align-content-md-around {
+ -ms-flex-line-pack: distribute !important;
+ align-content: space-around !important;
+ }
+ .align-content-md-stretch {
+ -ms-flex-line-pack: stretch !important;
+ align-content: stretch !important;
+ }
+ .align-self-md-auto {
+ -ms-flex-item-align: auto !important;
+ align-self: auto !important;
+ }
+ .align-self-md-start {
+ -ms-flex-item-align: start !important;
+ align-self: flex-start !important;
+ }
+ .align-self-md-end {
+ -ms-flex-item-align: end !important;
+ align-self: flex-end !important;
+ }
+ .align-self-md-center {
+ -ms-flex-item-align: center !important;
+ align-self: center !important;
+ }
+ .align-self-md-baseline {
+ -ms-flex-item-align: baseline !important;
+ align-self: baseline !important;
+ }
+ .align-self-md-stretch {
+ -ms-flex-item-align: stretch !important;
+ align-self: stretch !important;
+ }
+ .order-md-first {
+ -ms-flex-order: -1 !important;
+ order: -1 !important;
+ }
+ .order-md-0 {
+ -ms-flex-order: 0 !important;
+ order: 0 !important;
+ }
+ .order-md-1 {
+ -ms-flex-order: 1 !important;
+ order: 1 !important;
+ }
+ .order-md-2 {
+ -ms-flex-order: 2 !important;
+ order: 2 !important;
+ }
+ .order-md-3 {
+ -ms-flex-order: 3 !important;
+ order: 3 !important;
+ }
+ .order-md-4 {
+ -ms-flex-order: 4 !important;
+ order: 4 !important;
+ }
+ .order-md-5 {
+ -ms-flex-order: 5 !important;
+ order: 5 !important;
+ }
+ .order-md-last {
+ -ms-flex-order: 6 !important;
+ order: 6 !important;
+ }
+ .m-md-0 {
+ margin: 0 !important;
+ }
+ .m-md-1 {
+ margin: 0.25rem !important;
+ }
+ .m-md-2 {
+ margin: 0.5rem !important;
+ }
+ .m-md-3 {
+ margin: 1rem !important;
+ }
+ .m-md-4 {
+ margin: 1.5rem !important;
+ }
+ .m-md-5 {
+ margin: 3rem !important;
+ }
+ .m-md-auto {
+ margin: auto !important;
+ }
+ .mx-md-0 {
+ margin-right: 0 !important;
+ margin-left: 0 !important;
+ }
+ .mx-md-1 {
+ margin-right: 0.25rem !important;
+ margin-left: 0.25rem !important;
+ }
+ .mx-md-2 {
+ margin-right: 0.5rem !important;
+ margin-left: 0.5rem !important;
+ }
+ .mx-md-3 {
+ margin-right: 1rem !important;
+ margin-left: 1rem !important;
+ }
+ .mx-md-4 {
+ margin-right: 1.5rem !important;
+ margin-left: 1.5rem !important;
+ }
+ .mx-md-5 {
+ margin-right: 3rem !important;
+ margin-left: 3rem !important;
+ }
+ .mx-md-auto {
+ margin-right: auto !important;
+ margin-left: auto !important;
+ }
+ .my-md-0 {
+ margin-top: 0 !important;
+ margin-bottom: 0 !important;
+ }
+ .my-md-1 {
+ margin-top: 0.25rem !important;
+ margin-bottom: 0.25rem !important;
+ }
+ .my-md-2 {
+ margin-top: 0.5rem !important;
+ margin-bottom: 0.5rem !important;
+ }
+ .my-md-3 {
+ margin-top: 1rem !important;
+ margin-bottom: 1rem !important;
+ }
+ .my-md-4 {
+ margin-top: 1.5rem !important;
+ margin-bottom: 1.5rem !important;
+ }
+ .my-md-5 {
+ margin-top: 3rem !important;
+ margin-bottom: 3rem !important;
+ }
+ .my-md-auto {
+ margin-top: auto !important;
+ margin-bottom: auto !important;
+ }
+ .mt-md-0 {
+ margin-top: 0 !important;
+ }
+ .mt-md-1 {
+ margin-top: 0.25rem !important;
+ }
+ .mt-md-2 {
+ margin-top: 0.5rem !important;
+ }
+ .mt-md-3 {
+ margin-top: 1rem !important;
+ }
+ .mt-md-4 {
+ margin-top: 1.5rem !important;
+ }
+ .mt-md-5 {
+ margin-top: 3rem !important;
+ }
+ .mt-md-auto {
+ margin-top: auto !important;
+ }
+ .me-md-0 {
+ margin-right: 0 !important;
+ }
+ .me-md-1 {
+ margin-right: 0.25rem !important;
+ }
+ .me-md-2 {
+ margin-right: 0.5rem !important;
+ }
+ .me-md-3 {
+ margin-right: 1rem !important;
+ }
+ .me-md-4 {
+ margin-right: 1.5rem !important;
+ }
+ .me-md-5 {
+ margin-right: 3rem !important;
+ }
+ .me-md-auto {
+ margin-right: auto !important;
+ }
+ .mb-md-0 {
+ margin-bottom: 0 !important;
+ }
+ .mb-md-1 {
+ margin-bottom: 0.25rem !important;
+ }
+ .mb-md-2 {
+ margin-bottom: 0.5rem !important;
+ }
+ .mb-md-3 {
+ margin-bottom: 1rem !important;
+ }
+ .mb-md-4 {
+ margin-bottom: 1.5rem !important;
+ }
+ .mb-md-5 {
+ margin-bottom: 3rem !important;
+ }
+ .mb-md-auto {
+ margin-bottom: auto !important;
+ }
+ .ms-md-0 {
+ margin-left: 0 !important;
+ }
+ .ms-md-1 {
+ margin-left: 0.25rem !important;
+ }
+ .ms-md-2 {
+ margin-left: 0.5rem !important;
+ }
+ .ms-md-3 {
+ margin-left: 1rem !important;
+ }
+ .ms-md-4 {
+ margin-left: 1.5rem !important;
+ }
+ .ms-md-5 {
+ margin-left: 3rem !important;
+ }
+ .ms-md-auto {
+ margin-left: auto !important;
+ }
+ .p-md-0 {
+ padding: 0 !important;
+ }
+ .p-md-1 {
+ padding: 0.25rem !important;
+ }
+ .p-md-2 {
+ padding: 0.5rem !important;
+ }
+ .p-md-3 {
+ padding: 1rem !important;
+ }
+ .p-md-4 {
+ padding: 1.5rem !important;
+ }
+ .p-md-5 {
+ padding: 3rem !important;
+ }
+ .px-md-0 {
+ padding-right: 0 !important;
+ padding-left: 0 !important;
+ }
+ .px-md-1 {
+ padding-right: 0.25rem !important;
+ padding-left: 0.25rem !important;
+ }
+ .px-md-2 {
+ padding-right: 0.5rem !important;
+ padding-left: 0.5rem !important;
+ }
+ .px-md-3 {
+ padding-right: 1rem !important;
+ padding-left: 1rem !important;
+ }
+ .px-md-4 {
+ padding-right: 1.5rem !important;
+ padding-left: 1.5rem !important;
+ }
+ .px-md-5 {
+ padding-right: 3rem !important;
+ padding-left: 3rem !important;
+ }
+ .py-md-0 {
+ padding-top: 0 !important;
+ padding-bottom: 0 !important;
+ }
+ .py-md-1 {
+ padding-top: 0.25rem !important;
+ padding-bottom: 0.25rem !important;
+ }
+ .py-md-2 {
+ padding-top: 0.5rem !important;
+ padding-bottom: 0.5rem !important;
+ }
+ .py-md-3 {
+ padding-top: 1rem !important;
+ padding-bottom: 1rem !important;
+ }
+ .py-md-4 {
+ padding-top: 1.5rem !important;
+ padding-bottom: 1.5rem !important;
+ }
+ .py-md-5 {
+ padding-top: 3rem !important;
+ padding-bottom: 3rem !important;
+ }
+ .pt-md-0 {
+ padding-top: 0 !important;
+ }
+ .pt-md-1 {
+ padding-top: 0.25rem !important;
+ }
+ .pt-md-2 {
+ padding-top: 0.5rem !important;
+ }
+ .pt-md-3 {
+ padding-top: 1rem !important;
+ }
+ .pt-md-4 {
+ padding-top: 1.5rem !important;
+ }
+ .pt-md-5 {
+ padding-top: 3rem !important;
+ }
+ .pe-md-0 {
+ padding-right: 0 !important;
+ }
+ .pe-md-1 {
+ padding-right: 0.25rem !important;
+ }
+ .pe-md-2 {
+ padding-right: 0.5rem !important;
+ }
+ .pe-md-3 {
+ padding-right: 1rem !important;
+ }
+ .pe-md-4 {
+ padding-right: 1.5rem !important;
+ }
+ .pe-md-5 {
+ padding-right: 3rem !important;
+ }
+ .pb-md-0 {
+ padding-bottom: 0 !important;
+ }
+ .pb-md-1 {
+ padding-bottom: 0.25rem !important;
+ }
+ .pb-md-2 {
+ padding-bottom: 0.5rem !important;
+ }
+ .pb-md-3 {
+ padding-bottom: 1rem !important;
+ }
+ .pb-md-4 {
+ padding-bottom: 1.5rem !important;
+ }
+ .pb-md-5 {
+ padding-bottom: 3rem !important;
+ }
+ .ps-md-0 {
+ padding-left: 0 !important;
+ }
+ .ps-md-1 {
+ padding-left: 0.25rem !important;
+ }
+ .ps-md-2 {
+ padding-left: 0.5rem !important;
+ }
+ .ps-md-3 {
+ padding-left: 1rem !important;
+ }
+ .ps-md-4 {
+ padding-left: 1.5rem !important;
+ }
+ .ps-md-5 {
+ padding-left: 3rem !important;
+ }
+ .text-md-start {
+ text-align: left !important;
+ }
+ .text-md-end {
+ text-align: right !important;
+ }
+ .text-md-center {
+ text-align: center !important;
+ }
+}
+
+@media (min-width: 992px) {
+ .float-lg-start {
+ float: left !important;
+ }
+ .float-lg-end {
+ float: right !important;
+ }
+ .float-lg-none {
+ float: none !important;
+ }
+ .d-lg-inline {
+ display: inline !important;
+ }
+ .d-lg-inline-block {
+ display: inline-block !important;
+ }
+ .d-lg-block {
+ display: block !important;
+ }
+ .d-lg-grid {
+ display: grid !important;
+ }
+ .d-lg-table {
+ display: table !important;
+ }
+ .d-lg-table-row {
+ display: table-row !important;
+ }
+ .d-lg-table-cell {
+ display: table-cell !important;
+ }
+ .d-lg-flex {
+ display: -ms-flexbox !important;
+ display: flex !important;
+ }
+ .d-lg-inline-flex {
+ display: -ms-inline-flexbox !important;
+ display: inline-flex !important;
+ }
+ .d-lg-none {
+ display: none !important;
+ }
+ .flex-lg-fill {
+ -ms-flex: 1 1 auto !important;
+ flex: 1 1 auto !important;
+ }
+ .flex-lg-row {
+ -ms-flex-direction: row !important;
+ flex-direction: row !important;
+ }
+ .flex-lg-column {
+ -ms-flex-direction: column !important;
+ flex-direction: column !important;
+ }
+ .flex-lg-row-reverse {
+ -ms-flex-direction: row-reverse !important;
+ flex-direction: row-reverse !important;
+ }
+ .flex-lg-column-reverse {
+ -ms-flex-direction: column-reverse !important;
+ flex-direction: column-reverse !important;
+ }
+ .flex-lg-grow-0 {
+ -ms-flex-positive: 0 !important;
+ flex-grow: 0 !important;
+ }
+ .flex-lg-grow-1 {
+ -ms-flex-positive: 1 !important;
+ flex-grow: 1 !important;
+ }
+ .flex-lg-shrink-0 {
+ -ms-flex-negative: 0 !important;
+ flex-shrink: 0 !important;
+ }
+ .flex-lg-shrink-1 {
+ -ms-flex-negative: 1 !important;
+ flex-shrink: 1 !important;
+ }
+ .flex-lg-wrap {
+ -ms-flex-wrap: wrap !important;
+ flex-wrap: wrap !important;
+ }
+ .flex-lg-nowrap {
+ -ms-flex-wrap: nowrap !important;
+ flex-wrap: nowrap !important;
+ }
+ .flex-lg-wrap-reverse {
+ -ms-flex-wrap: wrap-reverse !important;
+ flex-wrap: wrap-reverse !important;
+ }
+ .gap-lg-0 {
+ gap: 0 !important;
+ }
+ .gap-lg-1 {
+ gap: 0.25rem !important;
+ }
+ .gap-lg-2 {
+ gap: 0.5rem !important;
+ }
+ .gap-lg-3 {
+ gap: 1rem !important;
+ }
+ .gap-lg-4 {
+ gap: 1.5rem !important;
+ }
+ .gap-lg-5 {
+ gap: 3rem !important;
+ }
+ .justify-content-lg-start {
+ -ms-flex-pack: start !important;
+ justify-content: flex-start !important;
+ }
+ .justify-content-lg-end {
+ -ms-flex-pack: end !important;
+ justify-content: flex-end !important;
+ }
+ .justify-content-lg-center {
+ -ms-flex-pack: center !important;
+ justify-content: center !important;
+ }
+ .justify-content-lg-between {
+ -ms-flex-pack: justify !important;
+ justify-content: space-between !important;
+ }
+ .justify-content-lg-around {
+ -ms-flex-pack: distribute !important;
+ justify-content: space-around !important;
+ }
+ .justify-content-lg-evenly {
+ -ms-flex-pack: space-evenly !important;
+ justify-content: space-evenly !important;
+ }
+ .align-items-lg-start {
+ -ms-flex-align: start !important;
+ align-items: flex-start !important;
+ }
+ .align-items-lg-end {
+ -ms-flex-align: end !important;
+ align-items: flex-end !important;
+ }
+ .align-items-lg-center {
+ -ms-flex-align: center !important;
+ align-items: center !important;
+ }
+ .align-items-lg-baseline {
+ -ms-flex-align: baseline !important;
+ align-items: baseline !important;
+ }
+ .align-items-lg-stretch {
+ -ms-flex-align: stretch !important;
+ align-items: stretch !important;
+ }
+ .align-content-lg-start {
+ -ms-flex-line-pack: start !important;
+ align-content: flex-start !important;
+ }
+ .align-content-lg-end {
+ -ms-flex-line-pack: end !important;
+ align-content: flex-end !important;
+ }
+ .align-content-lg-center {
+ -ms-flex-line-pack: center !important;
+ align-content: center !important;
+ }
+ .align-content-lg-between {
+ -ms-flex-line-pack: justify !important;
+ align-content: space-between !important;
+ }
+ .align-content-lg-around {
+ -ms-flex-line-pack: distribute !important;
+ align-content: space-around !important;
+ }
+ .align-content-lg-stretch {
+ -ms-flex-line-pack: stretch !important;
+ align-content: stretch !important;
+ }
+ .align-self-lg-auto {
+ -ms-flex-item-align: auto !important;
+ align-self: auto !important;
+ }
+ .align-self-lg-start {
+ -ms-flex-item-align: start !important;
+ align-self: flex-start !important;
+ }
+ .align-self-lg-end {
+ -ms-flex-item-align: end !important;
+ align-self: flex-end !important;
+ }
+ .align-self-lg-center {
+ -ms-flex-item-align: center !important;
+ align-self: center !important;
+ }
+ .align-self-lg-baseline {
+ -ms-flex-item-align: baseline !important;
+ align-self: baseline !important;
+ }
+ .align-self-lg-stretch {
+ -ms-flex-item-align: stretch !important;
+ align-self: stretch !important;
+ }
+ .order-lg-first {
+ -ms-flex-order: -1 !important;
+ order: -1 !important;
+ }
+ .order-lg-0 {
+ -ms-flex-order: 0 !important;
+ order: 0 !important;
+ }
+ .order-lg-1 {
+ -ms-flex-order: 1 !important;
+ order: 1 !important;
+ }
+ .order-lg-2 {
+ -ms-flex-order: 2 !important;
+ order: 2 !important;
+ }
+ .order-lg-3 {
+ -ms-flex-order: 3 !important;
+ order: 3 !important;
+ }
+ .order-lg-4 {
+ -ms-flex-order: 4 !important;
+ order: 4 !important;
+ }
+ .order-lg-5 {
+ -ms-flex-order: 5 !important;
+ order: 5 !important;
+ }
+ .order-lg-last {
+ -ms-flex-order: 6 !important;
+ order: 6 !important;
+ }
+ .m-lg-0 {
+ margin: 0 !important;
+ }
+ .m-lg-1 {
+ margin: 0.25rem !important;
+ }
+ .m-lg-2 {
+ margin: 0.5rem !important;
+ }
+ .m-lg-3 {
+ margin: 1rem !important;
+ }
+ .m-lg-4 {
+ margin: 1.5rem !important;
+ }
+ .m-lg-5 {
+ margin: 3rem !important;
+ }
+ .m-lg-auto {
+ margin: auto !important;
+ }
+ .mx-lg-0 {
+ margin-right: 0 !important;
+ margin-left: 0 !important;
+ }
+ .mx-lg-1 {
+ margin-right: 0.25rem !important;
+ margin-left: 0.25rem !important;
+ }
+ .mx-lg-2 {
+ margin-right: 0.5rem !important;
+ margin-left: 0.5rem !important;
+ }
+ .mx-lg-3 {
+ margin-right: 1rem !important;
+ margin-left: 1rem !important;
+ }
+ .mx-lg-4 {
+ margin-right: 1.5rem !important;
+ margin-left: 1.5rem !important;
+ }
+ .mx-lg-5 {
+ margin-right: 3rem !important;
+ margin-left: 3rem !important;
+ }
+ .mx-lg-auto {
+ margin-right: auto !important;
+ margin-left: auto !important;
+ }
+ .my-lg-0 {
+ margin-top: 0 !important;
+ margin-bottom: 0 !important;
+ }
+ .my-lg-1 {
+ margin-top: 0.25rem !important;
+ margin-bottom: 0.25rem !important;
+ }
+ .my-lg-2 {
+ margin-top: 0.5rem !important;
+ margin-bottom: 0.5rem !important;
+ }
+ .my-lg-3 {
+ margin-top: 1rem !important;
+ margin-bottom: 1rem !important;
+ }
+ .my-lg-4 {
+ margin-top: 1.5rem !important;
+ margin-bottom: 1.5rem !important;
+ }
+ .my-lg-5 {
+ margin-top: 3rem !important;
+ margin-bottom: 3rem !important;
+ }
+ .my-lg-auto {
+ margin-top: auto !important;
+ margin-bottom: auto !important;
+ }
+ .mt-lg-0 {
+ margin-top: 0 !important;
+ }
+ .mt-lg-1 {
+ margin-top: 0.25rem !important;
+ }
+ .mt-lg-2 {
+ margin-top: 0.5rem !important;
+ }
+ .mt-lg-3 {
+ margin-top: 1rem !important;
+ }
+ .mt-lg-4 {
+ margin-top: 1.5rem !important;
+ }
+ .mt-lg-5 {
+ margin-top: 3rem !important;
+ }
+ .mt-lg-auto {
+ margin-top: auto !important;
+ }
+ .me-lg-0 {
+ margin-right: 0 !important;
+ }
+ .me-lg-1 {
+ margin-right: 0.25rem !important;
+ }
+ .me-lg-2 {
+ margin-right: 0.5rem !important;
+ }
+ .me-lg-3 {
+ margin-right: 1rem !important;
+ }
+ .me-lg-4 {
+ margin-right: 1.5rem !important;
+ }
+ .me-lg-5 {
+ margin-right: 3rem !important;
+ }
+ .me-lg-auto {
+ margin-right: auto !important;
+ }
+ .mb-lg-0 {
+ margin-bottom: 0 !important;
+ }
+ .mb-lg-1 {
+ margin-bottom: 0.25rem !important;
+ }
+ .mb-lg-2 {
+ margin-bottom: 0.5rem !important;
+ }
+ .mb-lg-3 {
+ margin-bottom: 1rem !important;
+ }
+ .mb-lg-4 {
+ margin-bottom: 1.5rem !important;
+ }
+ .mb-lg-5 {
+ margin-bottom: 3rem !important;
+ }
+ .mb-lg-auto {
+ margin-bottom: auto !important;
+ }
+ .ms-lg-0 {
+ margin-left: 0 !important;
+ }
+ .ms-lg-1 {
+ margin-left: 0.25rem !important;
+ }
+ .ms-lg-2 {
+ margin-left: 0.5rem !important;
+ }
+ .ms-lg-3 {
+ margin-left: 1rem !important;
+ }
+ .ms-lg-4 {
+ margin-left: 1.5rem !important;
+ }
+ .ms-lg-5 {
+ margin-left: 3rem !important;
+ }
+ .ms-lg-auto {
+ margin-left: auto !important;
+ }
+ .p-lg-0 {
+ padding: 0 !important;
+ }
+ .p-lg-1 {
+ padding: 0.25rem !important;
+ }
+ .p-lg-2 {
+ padding: 0.5rem !important;
+ }
+ .p-lg-3 {
+ padding: 1rem !important;
+ }
+ .p-lg-4 {
+ padding: 1.5rem !important;
+ }
+ .p-lg-5 {
+ padding: 3rem !important;
+ }
+ .px-lg-0 {
+ padding-right: 0 !important;
+ padding-left: 0 !important;
+ }
+ .px-lg-1 {
+ padding-right: 0.25rem !important;
+ padding-left: 0.25rem !important;
+ }
+ .px-lg-2 {
+ padding-right: 0.5rem !important;
+ padding-left: 0.5rem !important;
+ }
+ .px-lg-3 {
+ padding-right: 1rem !important;
+ padding-left: 1rem !important;
+ }
+ .px-lg-4 {
+ padding-right: 1.5rem !important;
+ padding-left: 1.5rem !important;
+ }
+ .px-lg-5 {
+ padding-right: 3rem !important;
+ padding-left: 3rem !important;
+ }
+ .py-lg-0 {
+ padding-top: 0 !important;
+ padding-bottom: 0 !important;
+ }
+ .py-lg-1 {
+ padding-top: 0.25rem !important;
+ padding-bottom: 0.25rem !important;
+ }
+ .py-lg-2 {
+ padding-top: 0.5rem !important;
+ padding-bottom: 0.5rem !important;
+ }
+ .py-lg-3 {
+ padding-top: 1rem !important;
+ padding-bottom: 1rem !important;
+ }
+ .py-lg-4 {
+ padding-top: 1.5rem !important;
+ padding-bottom: 1.5rem !important;
+ }
+ .py-lg-5 {
+ padding-top: 3rem !important;
+ padding-bottom: 3rem !important;
+ }
+ .pt-lg-0 {
+ padding-top: 0 !important;
+ }
+ .pt-lg-1 {
+ padding-top: 0.25rem !important;
+ }
+ .pt-lg-2 {
+ padding-top: 0.5rem !important;
+ }
+ .pt-lg-3 {
+ padding-top: 1rem !important;
+ }
+ .pt-lg-4 {
+ padding-top: 1.5rem !important;
+ }
+ .pt-lg-5 {
+ padding-top: 3rem !important;
+ }
+ .pe-lg-0 {
+ padding-right: 0 !important;
+ }
+ .pe-lg-1 {
+ padding-right: 0.25rem !important;
+ }
+ .pe-lg-2 {
+ padding-right: 0.5rem !important;
+ }
+ .pe-lg-3 {
+ padding-right: 1rem !important;
+ }
+ .pe-lg-4 {
+ padding-right: 1.5rem !important;
+ }
+ .pe-lg-5 {
+ padding-right: 3rem !important;
+ }
+ .pb-lg-0 {
+ padding-bottom: 0 !important;
+ }
+ .pb-lg-1 {
+ padding-bottom: 0.25rem !important;
+ }
+ .pb-lg-2 {
+ padding-bottom: 0.5rem !important;
+ }
+ .pb-lg-3 {
+ padding-bottom: 1rem !important;
+ }
+ .pb-lg-4 {
+ padding-bottom: 1.5rem !important;
+ }
+ .pb-lg-5 {
+ padding-bottom: 3rem !important;
+ }
+ .ps-lg-0 {
+ padding-left: 0 !important;
+ }
+ .ps-lg-1 {
+ padding-left: 0.25rem !important;
+ }
+ .ps-lg-2 {
+ padding-left: 0.5rem !important;
+ }
+ .ps-lg-3 {
+ padding-left: 1rem !important;
+ }
+ .ps-lg-4 {
+ padding-left: 1.5rem !important;
+ }
+ .ps-lg-5 {
+ padding-left: 3rem !important;
+ }
+ .text-lg-start {
+ text-align: left !important;
+ }
+ .text-lg-end {
+ text-align: right !important;
+ }
+ .text-lg-center {
+ text-align: center !important;
+ }
+}
+
+@media (min-width: 1200px) {
+ .float-xl-start {
+ float: left !important;
+ }
+ .float-xl-end {
+ float: right !important;
+ }
+ .float-xl-none {
+ float: none !important;
+ }
+ .d-xl-inline {
+ display: inline !important;
+ }
+ .d-xl-inline-block {
+ display: inline-block !important;
+ }
+ .d-xl-block {
+ display: block !important;
+ }
+ .d-xl-grid {
+ display: grid !important;
+ }
+ .d-xl-table {
+ display: table !important;
+ }
+ .d-xl-table-row {
+ display: table-row !important;
+ }
+ .d-xl-table-cell {
+ display: table-cell !important;
+ }
+ .d-xl-flex {
+ display: -ms-flexbox !important;
+ display: flex !important;
+ }
+ .d-xl-inline-flex {
+ display: -ms-inline-flexbox !important;
+ display: inline-flex !important;
+ }
+ .d-xl-none {
+ display: none !important;
+ }
+ .flex-xl-fill {
+ -ms-flex: 1 1 auto !important;
+ flex: 1 1 auto !important;
+ }
+ .flex-xl-row {
+ -ms-flex-direction: row !important;
+ flex-direction: row !important;
+ }
+ .flex-xl-column {
+ -ms-flex-direction: column !important;
+ flex-direction: column !important;
+ }
+ .flex-xl-row-reverse {
+ -ms-flex-direction: row-reverse !important;
+ flex-direction: row-reverse !important;
+ }
+ .flex-xl-column-reverse {
+ -ms-flex-direction: column-reverse !important;
+ flex-direction: column-reverse !important;
+ }
+ .flex-xl-grow-0 {
+ -ms-flex-positive: 0 !important;
+ flex-grow: 0 !important;
+ }
+ .flex-xl-grow-1 {
+ -ms-flex-positive: 1 !important;
+ flex-grow: 1 !important;
+ }
+ .flex-xl-shrink-0 {
+ -ms-flex-negative: 0 !important;
+ flex-shrink: 0 !important;
+ }
+ .flex-xl-shrink-1 {
+ -ms-flex-negative: 1 !important;
+ flex-shrink: 1 !important;
+ }
+ .flex-xl-wrap {
+ -ms-flex-wrap: wrap !important;
+ flex-wrap: wrap !important;
+ }
+ .flex-xl-nowrap {
+ -ms-flex-wrap: nowrap !important;
+ flex-wrap: nowrap !important;
+ }
+ .flex-xl-wrap-reverse {
+ -ms-flex-wrap: wrap-reverse !important;
+ flex-wrap: wrap-reverse !important;
+ }
+ .gap-xl-0 {
+ gap: 0 !important;
+ }
+ .gap-xl-1 {
+ gap: 0.25rem !important;
+ }
+ .gap-xl-2 {
+ gap: 0.5rem !important;
+ }
+ .gap-xl-3 {
+ gap: 1rem !important;
+ }
+ .gap-xl-4 {
+ gap: 1.5rem !important;
+ }
+ .gap-xl-5 {
+ gap: 3rem !important;
+ }
+ .justify-content-xl-start {
+ -ms-flex-pack: start !important;
+ justify-content: flex-start !important;
+ }
+ .justify-content-xl-end {
+ -ms-flex-pack: end !important;
+ justify-content: flex-end !important;
+ }
+ .justify-content-xl-center {
+ -ms-flex-pack: center !important;
+ justify-content: center !important;
+ }
+ .justify-content-xl-between {
+ -ms-flex-pack: justify !important;
+ justify-content: space-between !important;
+ }
+ .justify-content-xl-around {
+ -ms-flex-pack: distribute !important;
+ justify-content: space-around !important;
+ }
+ .justify-content-xl-evenly {
+ -ms-flex-pack: space-evenly !important;
+ justify-content: space-evenly !important;
+ }
+ .align-items-xl-start {
+ -ms-flex-align: start !important;
+ align-items: flex-start !important;
+ }
+ .align-items-xl-end {
+ -ms-flex-align: end !important;
+ align-items: flex-end !important;
+ }
+ .align-items-xl-center {
+ -ms-flex-align: center !important;
+ align-items: center !important;
+ }
+ .align-items-xl-baseline {
+ -ms-flex-align: baseline !important;
+ align-items: baseline !important;
+ }
+ .align-items-xl-stretch {
+ -ms-flex-align: stretch !important;
+ align-items: stretch !important;
+ }
+ .align-content-xl-start {
+ -ms-flex-line-pack: start !important;
+ align-content: flex-start !important;
+ }
+ .align-content-xl-end {
+ -ms-flex-line-pack: end !important;
+ align-content: flex-end !important;
+ }
+ .align-content-xl-center {
+ -ms-flex-line-pack: center !important;
+ align-content: center !important;
+ }
+ .align-content-xl-between {
+ -ms-flex-line-pack: justify !important;
+ align-content: space-between !important;
+ }
+ .align-content-xl-around {
+ -ms-flex-line-pack: distribute !important;
+ align-content: space-around !important;
+ }
+ .align-content-xl-stretch {
+ -ms-flex-line-pack: stretch !important;
+ align-content: stretch !important;
+ }
+ .align-self-xl-auto {
+ -ms-flex-item-align: auto !important;
+ align-self: auto !important;
+ }
+ .align-self-xl-start {
+ -ms-flex-item-align: start !important;
+ align-self: flex-start !important;
+ }
+ .align-self-xl-end {
+ -ms-flex-item-align: end !important;
+ align-self: flex-end !important;
+ }
+ .align-self-xl-center {
+ -ms-flex-item-align: center !important;
+ align-self: center !important;
+ }
+ .align-self-xl-baseline {
+ -ms-flex-item-align: baseline !important;
+ align-self: baseline !important;
+ }
+ .align-self-xl-stretch {
+ -ms-flex-item-align: stretch !important;
+ align-self: stretch !important;
+ }
+ .order-xl-first {
+ -ms-flex-order: -1 !important;
+ order: -1 !important;
+ }
+ .order-xl-0 {
+ -ms-flex-order: 0 !important;
+ order: 0 !important;
+ }
+ .order-xl-1 {
+ -ms-flex-order: 1 !important;
+ order: 1 !important;
+ }
+ .order-xl-2 {
+ -ms-flex-order: 2 !important;
+ order: 2 !important;
+ }
+ .order-xl-3 {
+ -ms-flex-order: 3 !important;
+ order: 3 !important;
+ }
+ .order-xl-4 {
+ -ms-flex-order: 4 !important;
+ order: 4 !important;
+ }
+ .order-xl-5 {
+ -ms-flex-order: 5 !important;
+ order: 5 !important;
+ }
+ .order-xl-last {
+ -ms-flex-order: 6 !important;
+ order: 6 !important;
+ }
+ .m-xl-0 {
+ margin: 0 !important;
+ }
+ .m-xl-1 {
+ margin: 0.25rem !important;
+ }
+ .m-xl-2 {
+ margin: 0.5rem !important;
+ }
+ .m-xl-3 {
+ margin: 1rem !important;
+ }
+ .m-xl-4 {
+ margin: 1.5rem !important;
+ }
+ .m-xl-5 {
+ margin: 3rem !important;
+ }
+ .m-xl-auto {
+ margin: auto !important;
+ }
+ .mx-xl-0 {
+ margin-right: 0 !important;
+ margin-left: 0 !important;
+ }
+ .mx-xl-1 {
+ margin-right: 0.25rem !important;
+ margin-left: 0.25rem !important;
+ }
+ .mx-xl-2 {
+ margin-right: 0.5rem !important;
+ margin-left: 0.5rem !important;
+ }
+ .mx-xl-3 {
+ margin-right: 1rem !important;
+ margin-left: 1rem !important;
+ }
+ .mx-xl-4 {
+ margin-right: 1.5rem !important;
+ margin-left: 1.5rem !important;
+ }
+ .mx-xl-5 {
+ margin-right: 3rem !important;
+ margin-left: 3rem !important;
+ }
+ .mx-xl-auto {
+ margin-right: auto !important;
+ margin-left: auto !important;
+ }
+ .my-xl-0 {
+ margin-top: 0 !important;
+ margin-bottom: 0 !important;
+ }
+ .my-xl-1 {
+ margin-top: 0.25rem !important;
+ margin-bottom: 0.25rem !important;
+ }
+ .my-xl-2 {
+ margin-top: 0.5rem !important;
+ margin-bottom: 0.5rem !important;
+ }
+ .my-xl-3 {
+ margin-top: 1rem !important;
+ margin-bottom: 1rem !important;
+ }
+ .my-xl-4 {
+ margin-top: 1.5rem !important;
+ margin-bottom: 1.5rem !important;
+ }
+ .my-xl-5 {
+ margin-top: 3rem !important;
+ margin-bottom: 3rem !important;
+ }
+ .my-xl-auto {
+ margin-top: auto !important;
+ margin-bottom: auto !important;
+ }
+ .mt-xl-0 {
+ margin-top: 0 !important;
+ }
+ .mt-xl-1 {
+ margin-top: 0.25rem !important;
+ }
+ .mt-xl-2 {
+ margin-top: 0.5rem !important;
+ }
+ .mt-xl-3 {
+ margin-top: 1rem !important;
+ }
+ .mt-xl-4 {
+ margin-top: 1.5rem !important;
+ }
+ .mt-xl-5 {
+ margin-top: 3rem !important;
+ }
+ .mt-xl-auto {
+ margin-top: auto !important;
+ }
+ .me-xl-0 {
+ margin-right: 0 !important;
+ }
+ .me-xl-1 {
+ margin-right: 0.25rem !important;
+ }
+ .me-xl-2 {
+ margin-right: 0.5rem !important;
+ }
+ .me-xl-3 {
+ margin-right: 1rem !important;
+ }
+ .me-xl-4 {
+ margin-right: 1.5rem !important;
+ }
+ .me-xl-5 {
+ margin-right: 3rem !important;
+ }
+ .me-xl-auto {
+ margin-right: auto !important;
+ }
+ .mb-xl-0 {
+ margin-bottom: 0 !important;
+ }
+ .mb-xl-1 {
+ margin-bottom: 0.25rem !important;
+ }
+ .mb-xl-2 {
+ margin-bottom: 0.5rem !important;
+ }
+ .mb-xl-3 {
+ margin-bottom: 1rem !important;
+ }
+ .mb-xl-4 {
+ margin-bottom: 1.5rem !important;
+ }
+ .mb-xl-5 {
+ margin-bottom: 3rem !important;
+ }
+ .mb-xl-auto {
+ margin-bottom: auto !important;
+ }
+ .ms-xl-0 {
+ margin-left: 0 !important;
+ }
+ .ms-xl-1 {
+ margin-left: 0.25rem !important;
+ }
+ .ms-xl-2 {
+ margin-left: 0.5rem !important;
+ }
+ .ms-xl-3 {
+ margin-left: 1rem !important;
+ }
+ .ms-xl-4 {
+ margin-left: 1.5rem !important;
+ }
+ .ms-xl-5 {
+ margin-left: 3rem !important;
+ }
+ .ms-xl-auto {
+ margin-left: auto !important;
+ }
+ .p-xl-0 {
+ padding: 0 !important;
+ }
+ .p-xl-1 {
+ padding: 0.25rem !important;
+ }
+ .p-xl-2 {
+ padding: 0.5rem !important;
+ }
+ .p-xl-3 {
+ padding: 1rem !important;
+ }
+ .p-xl-4 {
+ padding: 1.5rem !important;
+ }
+ .p-xl-5 {
+ padding: 3rem !important;
+ }
+ .px-xl-0 {
+ padding-right: 0 !important;
+ padding-left: 0 !important;
+ }
+ .px-xl-1 {
+ padding-right: 0.25rem !important;
+ padding-left: 0.25rem !important;
+ }
+ .px-xl-2 {
+ padding-right: 0.5rem !important;
+ padding-left: 0.5rem !important;
+ }
+ .px-xl-3 {
+ padding-right: 1rem !important;
+ padding-left: 1rem !important;
+ }
+ .px-xl-4 {
+ padding-right: 1.5rem !important;
+ padding-left: 1.5rem !important;
+ }
+ .px-xl-5 {
+ padding-right: 3rem !important;
+ padding-left: 3rem !important;
+ }
+ .py-xl-0 {
+ padding-top: 0 !important;
+ padding-bottom: 0 !important;
+ }
+ .py-xl-1 {
+ padding-top: 0.25rem !important;
+ padding-bottom: 0.25rem !important;
+ }
+ .py-xl-2 {
+ padding-top: 0.5rem !important;
+ padding-bottom: 0.5rem !important;
+ }
+ .py-xl-3 {
+ padding-top: 1rem !important;
+ padding-bottom: 1rem !important;
+ }
+ .py-xl-4 {
+ padding-top: 1.5rem !important;
+ padding-bottom: 1.5rem !important;
+ }
+ .py-xl-5 {
+ padding-top: 3rem !important;
+ padding-bottom: 3rem !important;
+ }
+ .pt-xl-0 {
+ padding-top: 0 !important;
+ }
+ .pt-xl-1 {
+ padding-top: 0.25rem !important;
+ }
+ .pt-xl-2 {
+ padding-top: 0.5rem !important;
+ }
+ .pt-xl-3 {
+ padding-top: 1rem !important;
+ }
+ .pt-xl-4 {
+ padding-top: 1.5rem !important;
+ }
+ .pt-xl-5 {
+ padding-top: 3rem !important;
+ }
+ .pe-xl-0 {
+ padding-right: 0 !important;
+ }
+ .pe-xl-1 {
+ padding-right: 0.25rem !important;
+ }
+ .pe-xl-2 {
+ padding-right: 0.5rem !important;
+ }
+ .pe-xl-3 {
+ padding-right: 1rem !important;
+ }
+ .pe-xl-4 {
+ padding-right: 1.5rem !important;
+ }
+ .pe-xl-5 {
+ padding-right: 3rem !important;
+ }
+ .pb-xl-0 {
+ padding-bottom: 0 !important;
+ }
+ .pb-xl-1 {
+ padding-bottom: 0.25rem !important;
+ }
+ .pb-xl-2 {
+ padding-bottom: 0.5rem !important;
+ }
+ .pb-xl-3 {
+ padding-bottom: 1rem !important;
+ }
+ .pb-xl-4 {
+ padding-bottom: 1.5rem !important;
+ }
+ .pb-xl-5 {
+ padding-bottom: 3rem !important;
+ }
+ .ps-xl-0 {
+ padding-left: 0 !important;
+ }
+ .ps-xl-1 {
+ padding-left: 0.25rem !important;
+ }
+ .ps-xl-2 {
+ padding-left: 0.5rem !important;
+ }
+ .ps-xl-3 {
+ padding-left: 1rem !important;
+ }
+ .ps-xl-4 {
+ padding-left: 1.5rem !important;
+ }
+ .ps-xl-5 {
+ padding-left: 3rem !important;
+ }
+ .text-xl-start {
+ text-align: left !important;
+ }
+ .text-xl-end {
+ text-align: right !important;
+ }
+ .text-xl-center {
+ text-align: center !important;
+ }
+}
+
+@media (min-width: 1400px) {
+ .float-xxl-start {
+ float: left !important;
+ }
+ .float-xxl-end {
+ float: right !important;
+ }
+ .float-xxl-none {
+ float: none !important;
+ }
+ .d-xxl-inline {
+ display: inline !important;
+ }
+ .d-xxl-inline-block {
+ display: inline-block !important;
+ }
+ .d-xxl-block {
+ display: block !important;
+ }
+ .d-xxl-grid {
+ display: grid !important;
+ }
+ .d-xxl-table {
+ display: table !important;
+ }
+ .d-xxl-table-row {
+ display: table-row !important;
+ }
+ .d-xxl-table-cell {
+ display: table-cell !important;
+ }
+ .d-xxl-flex {
+ display: -ms-flexbox !important;
+ display: flex !important;
+ }
+ .d-xxl-inline-flex {
+ display: -ms-inline-flexbox !important;
+ display: inline-flex !important;
+ }
+ .d-xxl-none {
+ display: none !important;
+ }
+ .flex-xxl-fill {
+ -ms-flex: 1 1 auto !important;
+ flex: 1 1 auto !important;
+ }
+ .flex-xxl-row {
+ -ms-flex-direction: row !important;
+ flex-direction: row !important;
+ }
+ .flex-xxl-column {
+ -ms-flex-direction: column !important;
+ flex-direction: column !important;
+ }
+ .flex-xxl-row-reverse {
+ -ms-flex-direction: row-reverse !important;
+ flex-direction: row-reverse !important;
+ }
+ .flex-xxl-column-reverse {
+ -ms-flex-direction: column-reverse !important;
+ flex-direction: column-reverse !important;
+ }
+ .flex-xxl-grow-0 {
+ -ms-flex-positive: 0 !important;
+ flex-grow: 0 !important;
+ }
+ .flex-xxl-grow-1 {
+ -ms-flex-positive: 1 !important;
+ flex-grow: 1 !important;
+ }
+ .flex-xxl-shrink-0 {
+ -ms-flex-negative: 0 !important;
+ flex-shrink: 0 !important;
+ }
+ .flex-xxl-shrink-1 {
+ -ms-flex-negative: 1 !important;
+ flex-shrink: 1 !important;
+ }
+ .flex-xxl-wrap {
+ -ms-flex-wrap: wrap !important;
+ flex-wrap: wrap !important;
+ }
+ .flex-xxl-nowrap {
+ -ms-flex-wrap: nowrap !important;
+ flex-wrap: nowrap !important;
+ }
+ .flex-xxl-wrap-reverse {
+ -ms-flex-wrap: wrap-reverse !important;
+ flex-wrap: wrap-reverse !important;
+ }
+ .gap-xxl-0 {
+ gap: 0 !important;
+ }
+ .gap-xxl-1 {
+ gap: 0.25rem !important;
+ }
+ .gap-xxl-2 {
+ gap: 0.5rem !important;
+ }
+ .gap-xxl-3 {
+ gap: 1rem !important;
+ }
+ .gap-xxl-4 {
+ gap: 1.5rem !important;
+ }
+ .gap-xxl-5 {
+ gap: 3rem !important;
+ }
+ .justify-content-xxl-start {
+ -ms-flex-pack: start !important;
+ justify-content: flex-start !important;
+ }
+ .justify-content-xxl-end {
+ -ms-flex-pack: end !important;
+ justify-content: flex-end !important;
+ }
+ .justify-content-xxl-center {
+ -ms-flex-pack: center !important;
+ justify-content: center !important;
+ }
+ .justify-content-xxl-between {
+ -ms-flex-pack: justify !important;
+ justify-content: space-between !important;
+ }
+ .justify-content-xxl-around {
+ -ms-flex-pack: distribute !important;
+ justify-content: space-around !important;
+ }
+ .justify-content-xxl-evenly {
+ -ms-flex-pack: space-evenly !important;
+ justify-content: space-evenly !important;
+ }
+ .align-items-xxl-start {
+ -ms-flex-align: start !important;
+ align-items: flex-start !important;
+ }
+ .align-items-xxl-end {
+ -ms-flex-align: end !important;
+ align-items: flex-end !important;
+ }
+ .align-items-xxl-center {
+ -ms-flex-align: center !important;
+ align-items: center !important;
+ }
+ .align-items-xxl-baseline {
+ -ms-flex-align: baseline !important;
+ align-items: baseline !important;
+ }
+ .align-items-xxl-stretch {
+ -ms-flex-align: stretch !important;
+ align-items: stretch !important;
+ }
+ .align-content-xxl-start {
+ -ms-flex-line-pack: start !important;
+ align-content: flex-start !important;
+ }
+ .align-content-xxl-end {
+ -ms-flex-line-pack: end !important;
+ align-content: flex-end !important;
+ }
+ .align-content-xxl-center {
+ -ms-flex-line-pack: center !important;
+ align-content: center !important;
+ }
+ .align-content-xxl-between {
+ -ms-flex-line-pack: justify !important;
+ align-content: space-between !important;
+ }
+ .align-content-xxl-around {
+ -ms-flex-line-pack: distribute !important;
+ align-content: space-around !important;
+ }
+ .align-content-xxl-stretch {
+ -ms-flex-line-pack: stretch !important;
+ align-content: stretch !important;
+ }
+ .align-self-xxl-auto {
+ -ms-flex-item-align: auto !important;
+ align-self: auto !important;
+ }
+ .align-self-xxl-start {
+ -ms-flex-item-align: start !important;
+ align-self: flex-start !important;
+ }
+ .align-self-xxl-end {
+ -ms-flex-item-align: end !important;
+ align-self: flex-end !important;
+ }
+ .align-self-xxl-center {
+ -ms-flex-item-align: center !important;
+ align-self: center !important;
+ }
+ .align-self-xxl-baseline {
+ -ms-flex-item-align: baseline !important;
+ align-self: baseline !important;
+ }
+ .align-self-xxl-stretch {
+ -ms-flex-item-align: stretch !important;
+ align-self: stretch !important;
+ }
+ .order-xxl-first {
+ -ms-flex-order: -1 !important;
+ order: -1 !important;
+ }
+ .order-xxl-0 {
+ -ms-flex-order: 0 !important;
+ order: 0 !important;
+ }
+ .order-xxl-1 {
+ -ms-flex-order: 1 !important;
+ order: 1 !important;
+ }
+ .order-xxl-2 {
+ -ms-flex-order: 2 !important;
+ order: 2 !important;
+ }
+ .order-xxl-3 {
+ -ms-flex-order: 3 !important;
+ order: 3 !important;
+ }
+ .order-xxl-4 {
+ -ms-flex-order: 4 !important;
+ order: 4 !important;
+ }
+ .order-xxl-5 {
+ -ms-flex-order: 5 !important;
+ order: 5 !important;
+ }
+ .order-xxl-last {
+ -ms-flex-order: 6 !important;
+ order: 6 !important;
+ }
+ .m-xxl-0 {
+ margin: 0 !important;
+ }
+ .m-xxl-1 {
+ margin: 0.25rem !important;
+ }
+ .m-xxl-2 {
+ margin: 0.5rem !important;
+ }
+ .m-xxl-3 {
+ margin: 1rem !important;
+ }
+ .m-xxl-4 {
+ margin: 1.5rem !important;
+ }
+ .m-xxl-5 {
+ margin: 3rem !important;
+ }
+ .m-xxl-auto {
+ margin: auto !important;
+ }
+ .mx-xxl-0 {
+ margin-right: 0 !important;
+ margin-left: 0 !important;
+ }
+ .mx-xxl-1 {
+ margin-right: 0.25rem !important;
+ margin-left: 0.25rem !important;
+ }
+ .mx-xxl-2 {
+ margin-right: 0.5rem !important;
+ margin-left: 0.5rem !important;
+ }
+ .mx-xxl-3 {
+ margin-right: 1rem !important;
+ margin-left: 1rem !important;
+ }
+ .mx-xxl-4 {
+ margin-right: 1.5rem !important;
+ margin-left: 1.5rem !important;
+ }
+ .mx-xxl-5 {
+ margin-right: 3rem !important;
+ margin-left: 3rem !important;
+ }
+ .mx-xxl-auto {
+ margin-right: auto !important;
+ margin-left: auto !important;
+ }
+ .my-xxl-0 {
+ margin-top: 0 !important;
+ margin-bottom: 0 !important;
+ }
+ .my-xxl-1 {
+ margin-top: 0.25rem !important;
+ margin-bottom: 0.25rem !important;
+ }
+ .my-xxl-2 {
+ margin-top: 0.5rem !important;
+ margin-bottom: 0.5rem !important;
+ }
+ .my-xxl-3 {
+ margin-top: 1rem !important;
+ margin-bottom: 1rem !important;
+ }
+ .my-xxl-4 {
+ margin-top: 1.5rem !important;
+ margin-bottom: 1.5rem !important;
+ }
+ .my-xxl-5 {
+ margin-top: 3rem !important;
+ margin-bottom: 3rem !important;
+ }
+ .my-xxl-auto {
+ margin-top: auto !important;
+ margin-bottom: auto !important;
+ }
+ .mt-xxl-0 {
+ margin-top: 0 !important;
+ }
+ .mt-xxl-1 {
+ margin-top: 0.25rem !important;
+ }
+ .mt-xxl-2 {
+ margin-top: 0.5rem !important;
+ }
+ .mt-xxl-3 {
+ margin-top: 1rem !important;
+ }
+ .mt-xxl-4 {
+ margin-top: 1.5rem !important;
+ }
+ .mt-xxl-5 {
+ margin-top: 3rem !important;
+ }
+ .mt-xxl-auto {
+ margin-top: auto !important;
+ }
+ .me-xxl-0 {
+ margin-right: 0 !important;
+ }
+ .me-xxl-1 {
+ margin-right: 0.25rem !important;
+ }
+ .me-xxl-2 {
+ margin-right: 0.5rem !important;
+ }
+ .me-xxl-3 {
+ margin-right: 1rem !important;
+ }
+ .me-xxl-4 {
+ margin-right: 1.5rem !important;
+ }
+ .me-xxl-5 {
+ margin-right: 3rem !important;
+ }
+ .me-xxl-auto {
+ margin-right: auto !important;
+ }
+ .mb-xxl-0 {
+ margin-bottom: 0 !important;
+ }
+ .mb-xxl-1 {
+ margin-bottom: 0.25rem !important;
+ }
+ .mb-xxl-2 {
+ margin-bottom: 0.5rem !important;
+ }
+ .mb-xxl-3 {
+ margin-bottom: 1rem !important;
+ }
+ .mb-xxl-4 {
+ margin-bottom: 1.5rem !important;
+ }
+ .mb-xxl-5 {
+ margin-bottom: 3rem !important;
+ }
+ .mb-xxl-auto {
+ margin-bottom: auto !important;
+ }
+ .ms-xxl-0 {
+ margin-left: 0 !important;
+ }
+ .ms-xxl-1 {
+ margin-left: 0.25rem !important;
+ }
+ .ms-xxl-2 {
+ margin-left: 0.5rem !important;
+ }
+ .ms-xxl-3 {
+ margin-left: 1rem !important;
+ }
+ .ms-xxl-4 {
+ margin-left: 1.5rem !important;
+ }
+ .ms-xxl-5 {
+ margin-left: 3rem !important;
+ }
+ .ms-xxl-auto {
+ margin-left: auto !important;
+ }
+ .p-xxl-0 {
+ padding: 0 !important;
+ }
+ .p-xxl-1 {
+ padding: 0.25rem !important;
+ }
+ .p-xxl-2 {
+ padding: 0.5rem !important;
+ }
+ .p-xxl-3 {
+ padding: 1rem !important;
+ }
+ .p-xxl-4 {
+ padding: 1.5rem !important;
+ }
+ .p-xxl-5 {
+ padding: 3rem !important;
+ }
+ .px-xxl-0 {
+ padding-right: 0 !important;
+ padding-left: 0 !important;
+ }
+ .px-xxl-1 {
+ padding-right: 0.25rem !important;
+ padding-left: 0.25rem !important;
+ }
+ .px-xxl-2 {
+ padding-right: 0.5rem !important;
+ padding-left: 0.5rem !important;
+ }
+ .px-xxl-3 {
+ padding-right: 1rem !important;
+ padding-left: 1rem !important;
+ }
+ .px-xxl-4 {
+ padding-right: 1.5rem !important;
+ padding-left: 1.5rem !important;
+ }
+ .px-xxl-5 {
+ padding-right: 3rem !important;
+ padding-left: 3rem !important;
+ }
+ .py-xxl-0 {
+ padding-top: 0 !important;
+ padding-bottom: 0 !important;
+ }
+ .py-xxl-1 {
+ padding-top: 0.25rem !important;
+ padding-bottom: 0.25rem !important;
+ }
+ .py-xxl-2 {
+ padding-top: 0.5rem !important;
+ padding-bottom: 0.5rem !important;
+ }
+ .py-xxl-3 {
+ padding-top: 1rem !important;
+ padding-bottom: 1rem !important;
+ }
+ .py-xxl-4 {
+ padding-top: 1.5rem !important;
+ padding-bottom: 1.5rem !important;
+ }
+ .py-xxl-5 {
+ padding-top: 3rem !important;
+ padding-bottom: 3rem !important;
+ }
+ .pt-xxl-0 {
+ padding-top: 0 !important;
+ }
+ .pt-xxl-1 {
+ padding-top: 0.25rem !important;
+ }
+ .pt-xxl-2 {
+ padding-top: 0.5rem !important;
+ }
+ .pt-xxl-3 {
+ padding-top: 1rem !important;
+ }
+ .pt-xxl-4 {
+ padding-top: 1.5rem !important;
+ }
+ .pt-xxl-5 {
+ padding-top: 3rem !important;
+ }
+ .pe-xxl-0 {
+ padding-right: 0 !important;
+ }
+ .pe-xxl-1 {
+ padding-right: 0.25rem !important;
+ }
+ .pe-xxl-2 {
+ padding-right: 0.5rem !important;
+ }
+ .pe-xxl-3 {
+ padding-right: 1rem !important;
+ }
+ .pe-xxl-4 {
+ padding-right: 1.5rem !important;
+ }
+ .pe-xxl-5 {
+ padding-right: 3rem !important;
+ }
+ .pb-xxl-0 {
+ padding-bottom: 0 !important;
+ }
+ .pb-xxl-1 {
+ padding-bottom: 0.25rem !important;
+ }
+ .pb-xxl-2 {
+ padding-bottom: 0.5rem !important;
+ }
+ .pb-xxl-3 {
+ padding-bottom: 1rem !important;
+ }
+ .pb-xxl-4 {
+ padding-bottom: 1.5rem !important;
+ }
+ .pb-xxl-5 {
+ padding-bottom: 3rem !important;
+ }
+ .ps-xxl-0 {
+ padding-left: 0 !important;
+ }
+ .ps-xxl-1 {
+ padding-left: 0.25rem !important;
+ }
+ .ps-xxl-2 {
+ padding-left: 0.5rem !important;
+ }
+ .ps-xxl-3 {
+ padding-left: 1rem !important;
+ }
+ .ps-xxl-4 {
+ padding-left: 1.5rem !important;
+ }
+ .ps-xxl-5 {
+ padding-left: 3rem !important;
+ }
+ .text-xxl-start {
+ text-align: left !important;
+ }
+ .text-xxl-end {
+ text-align: right !important;
+ }
+ .text-xxl-center {
+ text-align: center !important;
+ }
+}
+
+@media (min-width: 1200px) {
+ .fs-1 {
+ font-size: 3rem !important;
+ }
+ .fs-2 {
+ font-size: 2.5rem !important;
+ }
+ .fs-3 {
+ font-size: 2rem !important;
+ }
+ .fs-4 {
+ font-size: 1.5rem !important;
+ }
+}
+
+@media print {
+ .d-print-inline {
+ display: inline !important;
+ }
+ .d-print-inline-block {
+ display: inline-block !important;
+ }
+ .d-print-block {
+ display: block !important;
+ }
+ .d-print-grid {
+ display: grid !important;
+ }
+ .d-print-table {
+ display: table !important;
+ }
+ .d-print-table-row {
+ display: table-row !important;
+ }
+ .d-print-table-cell {
+ display: table-cell !important;
+ }
+ .d-print-flex {
+ display: -ms-flexbox !important;
+ display: flex !important;
+ }
+ .d-print-inline-flex {
+ display: -ms-inline-flexbox !important;
+ display: inline-flex !important;
+ }
+ .d-print-none {
+ display: none !important;
+ }
+}
+
+.blockquote-footer {
+ color: #888;
+}
+
+.input-group-addon {
+ color: #fff;
+}
+
+.form-floating > label {
+ color: #444;
+}
+
+.nav-tabs .nav-link,
+.nav-tabs .nav-link.active,
+.nav-tabs .nav-link.active:focus,
+.nav-tabs .nav-link.active:hover,
+.nav-tabs .nav-item.open .nav-link,
+.nav-tabs .nav-item.open .nav-link:focus,
+.nav-tabs .nav-item.open .nav-link:hover,
+.nav-pills .nav-link,
+.nav-pills .nav-link.active,
+.nav-pills .nav-link.active:focus,
+.nav-pills .nav-link.active:hover,
+.nav-pills .nav-item.open .nav-link,
+.nav-pills .nav-item.open .nav-link:focus,
+.nav-pills .nav-item.open .nav-link:hover {
+ color: #fff;
+}
+
+.breadcrumb a {
+ color: #fff;
+}
+
+.pagination a:hover {
+ text-decoration: none;
+}
+
+.alert {
+ border: none;
+ color: #fff;
+}
+
+.alert a,
+.alert .alert-link {
+ color: #fff;
+ text-decoration: underline;
+}
+
+.alert-primary {
+ background-color: #375a7f;
+}
+
+.alert-secondary {
+ background-color: #444;
+}
+
+.alert-success {
+ background-color: #00bc8c;
+}
+
+.alert-info {
+ background-color: #3498db;
+}
+
+.alert-warning {
+ background-color: #f39c12;
+}
+
+.alert-danger {
+ background-color: #e74c3c;
+}
+
+.alert-light {
+ background-color: #adb5bd;
+}
+
+.alert-dark {
+ background-color: #303030;
+}
diff --git a/op25/gr-op25_repeater/apps/oplog/op25/static/css/bootstrap/bootstrap.css b/op25/gr-op25_repeater/apps/oplog/op25/static/css/bootstrap/bootstrap.css
new file mode 100644
index 0000000..1cfdff2
--- /dev/null
+++ b/op25/gr-op25_repeater/apps/oplog/op25/static/css/bootstrap/bootstrap.css
@@ -0,0 +1,6763 @@
+/*!
+ * Bootstrap v3.3.6 (http://getbootstrap.com)
+ * Copyright 2011-2015 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ */
+/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */
+html {
+ font-family: sans-serif;
+ -webkit-text-size-adjust: 100%;
+ -ms-text-size-adjust: 100%;
+}
+
+body {
+/* margin: 0; */
+}
+
+article,
+aside,
+details,
+figcaption,
+figure,
+footer,
+header,
+hgroup,
+main,
+menu,
+nav,
+section,
+summary {
+ display: block;
+}
+audio,
+canvas,
+progress,
+video {
+ display: inline-block;
+ vertical-align: baseline;
+}
+audio:not([controls]) {
+ display: none;
+ height: 0;
+}
+[hidden],
+template {
+ display: none;
+}
+a {
+ background-color: transparent;
+}
+a:active,
+a:hover {
+ outline: 0;
+}
+abbr[title] {
+ border-bottom: 1px dotted;
+}
+b,
+strong {
+ font-weight: bold;
+}
+dfn {
+ font-style: italic;
+}
+h1 {
+ margin: .67em 0;
+ font-size: 2em;
+}
+mark {
+ color: #000;
+ background: #ff0;
+}
+small {
+ font-size: 80%;
+}
+sub,
+sup {
+ position: relative;
+ font-size: 75%;
+ line-height: 0;
+ vertical-align: baseline;
+}
+sup {
+ top: -.5em;
+}
+sub {
+ bottom: -.25em;
+}
+img {
+ border: 0;
+}
+svg:not(:root) {
+ overflow: hidden;
+}
+figure {
+ margin: 1em 40px;
+}
+hr {
+ height: 0;
+ -webkit-box-sizing: content-box;
+ -moz-box-sizing: content-box;
+ box-sizing: content-box;
+}
+pre {
+ overflow: auto;
+}
+code,
+kbd,
+pre,
+samp {
+ font-family: monospace, monospace;
+ font-size: 1em;
+}
+button,
+input,
+optgroup,
+select,
+textarea {
+ margin: 0;
+ font: inherit;
+ color: inherit;
+}
+button {
+ overflow: visible;
+}
+button,
+select {
+ text-transform: none;
+}
+button,
+html input[type="button"],
+input[type="reset"],
+input[type="submit"] {
+ -webkit-appearance: button;
+ cursor: pointer;
+}
+button[disabled],
+html input[disabled] {
+ cursor: default;
+}
+button::-moz-focus-inner,
+input::-moz-focus-inner {
+ padding: 0;
+ border: 0;
+}
+input {
+ line-height: normal;
+}
+input[type="checkbox"],
+input[type="radio"] {
+ -webkit-box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ box-sizing: border-box;
+ padding: 0;
+}
+input[type="number"]::-webkit-inner-spin-button,
+input[type="number"]::-webkit-outer-spin-button {
+ height: auto;
+}
+input[type="search"] {
+ -webkit-box-sizing: content-box;
+ -moz-box-sizing: content-box;
+ box-sizing: content-box;
+ -webkit-appearance: textfield;
+}
+input[type="search"]::-webkit-search-cancel-button,
+input[type="search"]::-webkit-search-decoration {
+ -webkit-appearance: none;
+}
+fieldset {
+ padding: .35em .625em .75em;
+ margin: 0 2px;
+ border: 1px solid #c0c0c0;
+}
+legend {
+ padding: 0;
+ border: 0;
+}
+textarea {
+ overflow: auto;
+}
+optgroup {
+ font-weight: bold;
+}
+table {
+ border-spacing: 0;
+ border-collapse: collapse;
+}
+td,
+th {
+ padding: 0;
+}
+/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */
+@media print {
+ *,
+ *:before,
+ *:after {
+ color: #000 !important;
+ text-shadow: none !important;
+ background: transparent !important;
+ -webkit-box-shadow: none !important;
+ box-shadow: none !important;
+ }
+ a,
+ a:visited {
+ text-decoration: underline;
+ }
+ a[href]:after {
+ content: " (" attr(href) ")";
+ }
+ abbr[title]:after {
+ content: " (" attr(title) ")";
+ }
+ a[href^="#"]:after,
+ a[href^="javascript:"]:after {
+ content: "";
+ }
+ pre,
+ blockquote {
+ border: 1px solid #999;
+
+ page-break-inside: avoid;
+ }
+ thead {
+ display: table-header-group;
+ }
+ tr,
+ img {
+ page-break-inside: avoid;
+ }
+ img {
+ max-width: 100% !important;
+ }
+ p,
+ h2,
+ h3 {
+ orphans: 3;
+ widows: 3;
+ }
+ h2,
+ h3 {
+ page-break-after: avoid;
+ }
+ .navbar {
+ display: none;
+ }
+ .btn > .caret,
+ .dropup > .btn > .caret {
+ border-top-color: #000 !important;
+ }
+ .label {
+ border: 1px solid #000;
+ }
+ .table {
+ border-collapse: collapse !important;
+ }
+ .table td,
+ .table th {
+ background-color: #fff !important;
+ }
+ .table-bordered th,
+ .table-bordered td {
+ border: 1px solid #ddd !important;
+ }
+}
+@font-face {
+ font-family: 'Glyphicons Halflings';
+
+ src: url('../fonts/glyphicons-halflings-regular.eot');
+ src: url('../fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'), url('../fonts/glyphicons-halflings-regular.woff2') format('woff2'), url('../fonts/glyphicons-halflings-regular.woff') format('woff'), url('../fonts/glyphicons-halflings-regular.ttf') format('truetype'), url('../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular') format('svg');
+}
+.glyphicon {
+ position: relative;
+ top: 1px;
+ display: inline-block;
+ font-family: 'Glyphicons Halflings';
+ font-style: normal;
+ font-weight: normal;
+ line-height: 1;
+
+ -webkit-font-smoothing: antialiased;
+ -moz-osx-font-smoothing: grayscale;
+}
+.glyphicon-asterisk:before {
+ content: "\002a";
+}
+.glyphicon-plus:before {
+ content: "\002b";
+}
+.glyphicon-euro:before,
+.glyphicon-eur:before {
+ content: "\20ac";
+}
+.glyphicon-minus:before {
+ content: "\2212";
+}
+.glyphicon-cloud:before {
+ content: "\2601";
+}
+.glyphicon-envelope:before {
+ content: "\2709";
+}
+.glyphicon-pencil:before {
+ content: "\270f";
+}
+.glyphicon-glass:before {
+ content: "\e001";
+}
+.glyphicon-music:before {
+ content: "\e002";
+}
+.glyphicon-search:before {
+ content: "\e003";
+}
+.glyphicon-heart:before {
+ content: "\e005";
+}
+.glyphicon-star:before {
+ content: "\e006";
+}
+.glyphicon-star-empty:before {
+ content: "\e007";
+}
+.glyphicon-user:before {
+ content: "\e008";
+}
+.glyphicon-film:before {
+ content: "\e009";
+}
+.glyphicon-th-large:before {
+ content: "\e010";
+}
+.glyphicon-th:before {
+ content: "\e011";
+}
+.glyphicon-th-list:before {
+ content: "\e012";
+}
+.glyphicon-ok:before {
+ content: "\e013";
+}
+.glyphicon-remove:before {
+ content: "\e014";
+}
+.glyphicon-zoom-in:before {
+ content: "\e015";
+}
+.glyphicon-zoom-out:before {
+ content: "\e016";
+}
+.glyphicon-off:before {
+ content: "\e017";
+}
+.glyphicon-signal:before {
+ content: "\e018";
+}
+.glyphicon-cog:before {
+ content: "\e019";
+}
+.glyphicon-trash:before {
+ content: "\e020";
+}
+.glyphicon-home:before {
+ content: "\e021";
+}
+.glyphicon-file:before {
+ content: "\e022";
+}
+.glyphicon-time:before {
+ content: "\e023";
+}
+.glyphicon-road:before {
+ content: "\e024";
+}
+.glyphicon-download-alt:before {
+ content: "\e025";
+}
+.glyphicon-download:before {
+ content: "\e026";
+}
+.glyphicon-upload:before {
+ content: "\e027";
+}
+.glyphicon-inbox:before {
+ content: "\e028";
+}
+.glyphicon-play-circle:before {
+ content: "\e029";
+}
+.glyphicon-repeat:before {
+ content: "\e030";
+}
+.glyphicon-refresh:before {
+ content: "\e031";
+}
+.glyphicon-list-alt:before {
+ content: "\e032";
+}
+.glyphicon-lock:before {
+ content: "\e033";
+}
+.glyphicon-flag:before {
+ content: "\e034";
+}
+.glyphicon-headphones:before {
+ content: "\e035";
+}
+.glyphicon-volume-off:before {
+ content: "\e036";
+}
+.glyphicon-volume-down:before {
+ content: "\e037";
+}
+.glyphicon-volume-up:before {
+ content: "\e038";
+}
+.glyphicon-qrcode:before {
+ content: "\e039";
+}
+.glyphicon-barcode:before {
+ content: "\e040";
+}
+.glyphicon-tag:before {
+ content: "\e041";
+}
+.glyphicon-tags:before {
+ content: "\e042";
+}
+.glyphicon-book:before {
+ content: "\e043";
+}
+.glyphicon-bookmark:before {
+ content: "\e044";
+}
+.glyphicon-print:before {
+ content: "\e045";
+}
+.glyphicon-camera:before {
+ content: "\e046";
+}
+.glyphicon-font:before {
+ content: "\e047";
+}
+.glyphicon-bold:before {
+ content: "\e048";
+}
+.glyphicon-italic:before {
+ content: "\e049";
+}
+.glyphicon-text-height:before {
+ content: "\e050";
+}
+.glyphicon-text-width:before {
+ content: "\e051";
+}
+.glyphicon-align-left:before {
+ content: "\e052";
+}
+.glyphicon-align-center:before {
+ content: "\e053";
+}
+.glyphicon-align-right:before {
+ content: "\e054";
+}
+.glyphicon-align-justify:before {
+ content: "\e055";
+}
+.glyphicon-list:before {
+ content: "\e056";
+}
+.glyphicon-indent-left:before {
+ content: "\e057";
+}
+.glyphicon-indent-right:before {
+ content: "\e058";
+}
+.glyphicon-facetime-video:before {
+ content: "\e059";
+}
+.glyphicon-picture:before {
+ content: "\e060";
+}
+.glyphicon-map-marker:before {
+ content: "\e062";
+}
+.glyphicon-adjust:before {
+ content: "\e063";
+}
+.glyphicon-tint:before {
+ content: "\e064";
+}
+.glyphicon-edit:before {
+ content: "\e065";
+}
+.glyphicon-share:before {
+ content: "\e066";
+}
+.glyphicon-check:before {
+ content: "\e067";
+}
+.glyphicon-move:before {
+ content: "\e068";
+}
+.glyphicon-step-backward:before {
+ content: "\e069";
+}
+.glyphicon-fast-backward:before {
+ content: "\e070";
+}
+.glyphicon-backward:before {
+ content: "\e071";
+}
+.glyphicon-play:before {
+ content: "\e072";
+}
+.glyphicon-pause:before {
+ content: "\e073";
+}
+.glyphicon-stop:before {
+ content: "\e074";
+}
+.glyphicon-forward:before {
+ content: "\e075";
+}
+.glyphicon-fast-forward:before {
+ content: "\e076";
+}
+.glyphicon-step-forward:before {
+ content: "\e077";
+}
+.glyphicon-eject:before {
+ content: "\e078";
+}
+.glyphicon-chevron-left:before {
+ content: "\e079";
+}
+.glyphicon-chevron-right:before {
+ content: "\e080";
+}
+.glyphicon-plus-sign:before {
+ content: "\e081";
+}
+.glyphicon-minus-sign:before {
+ content: "\e082";
+}
+.glyphicon-remove-sign:before {
+ content: "\e083";
+}
+.glyphicon-ok-sign:before {
+ content: "\e084";
+}
+.glyphicon-question-sign:before {
+ content: "\e085";
+}
+.glyphicon-info-sign:before {
+ content: "\e086";
+}
+.glyphicon-screenshot:before {
+ content: "\e087";
+}
+.glyphicon-remove-circle:before {
+ content: "\e088";
+}
+.glyphicon-ok-circle:before {
+ content: "\e089";
+}
+.glyphicon-ban-circle:before {
+ content: "\e090";
+}
+.glyphicon-arrow-left:before {
+ content: "\e091";
+}
+.glyphicon-arrow-right:before {
+ content: "\e092";
+}
+.glyphicon-arrow-up:before {
+ content: "\e093";
+}
+.glyphicon-arrow-down:before {
+ content: "\e094";
+}
+.glyphicon-share-alt:before {
+ content: "\e095";
+}
+.glyphicon-resize-full:before {
+ content: "\e096";
+}
+.glyphicon-resize-small:before {
+ content: "\e097";
+}
+.glyphicon-exclamation-sign:before {
+ content: "\e101";
+}
+.glyphicon-gift:before {
+ content: "\e102";
+}
+.glyphicon-leaf:before {
+ content: "\e103";
+}
+.glyphicon-fire:before {
+ content: "\e104";
+}
+.glyphicon-eye-open:before {
+ content: "\e105";
+}
+.glyphicon-eye-close:before {
+ content: "\e106";
+}
+.glyphicon-warning-sign:before {
+ content: "\e107";
+}
+.glyphicon-plane:before {
+ content: "\e108";
+}
+.glyphicon-calendar:before {
+ content: "\e109";
+}
+.glyphicon-random:before {
+ content: "\e110";
+}
+.glyphicon-comment:before {
+ content: "\e111";
+}
+.glyphicon-magnet:before {
+ content: "\e112";
+}
+.glyphicon-chevron-up:before {
+ content: "\e113";
+}
+.glyphicon-chevron-down:before {
+ content: "\e114";
+}
+.glyphicon-retweet:before {
+ content: "\e115";
+}
+.glyphicon-shopping-cart:before {
+ content: "\e116";
+}
+.glyphicon-folder-close:before {
+ content: "\e117";
+}
+.glyphicon-folder-open:before {
+ content: "\e118";
+}
+.glyphicon-resize-vertical:before {
+ content: "\e119";
+}
+.glyphicon-resize-horizontal:before {
+ content: "\e120";
+}
+.glyphicon-hdd:before {
+ content: "\e121";
+}
+.glyphicon-bullhorn:before {
+ content: "\e122";
+}
+.glyphicon-bell:before {
+ content: "\e123";
+}
+.glyphicon-certificate:before {
+ content: "\e124";
+}
+.glyphicon-thumbs-up:before {
+ content: "\e125";
+}
+.glyphicon-thumbs-down:before {
+ content: "\e126";
+}
+.glyphicon-hand-right:before {
+ content: "\e127";
+}
+.glyphicon-hand-left:before {
+ content: "\e128";
+}
+.glyphicon-hand-up:before {
+ content: "\e129";
+}
+.glyphicon-hand-down:before {
+ content: "\e130";
+}
+.glyphicon-circle-arrow-right:before {
+ content: "\e131";
+}
+.glyphicon-circle-arrow-left:before {
+ content: "\e132";
+}
+.glyphicon-circle-arrow-up:before {
+ content: "\e133";
+}
+.glyphicon-circle-arrow-down:before {
+ content: "\e134";
+}
+.glyphicon-globe:before {
+ content: "\e135";
+}
+.glyphicon-wrench:before {
+ content: "\e136";
+}
+.glyphicon-tasks:before {
+ content: "\e137";
+}
+.glyphicon-filter:before {
+ content: "\e138";
+}
+.glyphicon-briefcase:before {
+ content: "\e139";
+}
+.glyphicon-fullscreen:before {
+ content: "\e140";
+}
+.glyphicon-dashboard:before {
+ content: "\e141";
+}
+.glyphicon-paperclip:before {
+ content: "\e142";
+}
+.glyphicon-heart-empty:before {
+ content: "\e143";
+}
+.glyphicon-link:before {
+ content: "\e144";
+}
+.glyphicon-phone:before {
+ content: "\e145";
+}
+.glyphicon-pushpin:before {
+ content: "\e146";
+}
+.glyphicon-usd:before {
+ content: "\e148";
+}
+.glyphicon-gbp:before {
+ content: "\e149";
+}
+.glyphicon-sort:before {
+ content: "\e150";
+}
+.glyphicon-sort-by-alphabet:before {
+ content: "\e151";
+}
+.glyphicon-sort-by-alphabet-alt:before {
+ content: "\e152";
+}
+.glyphicon-sort-by-order:before {
+ content: "\e153";
+}
+.glyphicon-sort-by-order-alt:before {
+ content: "\e154";
+}
+.glyphicon-sort-by-attributes:before {
+ content: "\e155";
+}
+.glyphicon-sort-by-attributes-alt:before {
+ content: "\e156";
+}
+.glyphicon-unchecked:before {
+ content: "\e157";
+}
+.glyphicon-expand:before {
+ content: "\e158";
+}
+.glyphicon-collapse-down:before {
+ content: "\e159";
+}
+.glyphicon-collapse-up:before {
+ content: "\e160";
+}
+.glyphicon-log-in:before {
+ content: "\e161";
+}
+.glyphicon-flash:before {
+ content: "\e162";
+}
+.glyphicon-log-out:before {
+ content: "\e163";
+}
+.glyphicon-new-window:before {
+ content: "\e164";
+}
+.glyphicon-record:before {
+ content: "\e165";
+}
+.glyphicon-save:before {
+ content: "\e166";
+}
+.glyphicon-open:before {
+ content: "\e167";
+}
+.glyphicon-saved:before {
+ content: "\e168";
+}
+.glyphicon-import:before {
+ content: "\e169";
+}
+.glyphicon-export:before {
+ content: "\e170";
+}
+.glyphicon-send:before {
+ content: "\e171";
+}
+.glyphicon-floppy-disk:before {
+ content: "\e172";
+}
+.glyphicon-floppy-saved:before {
+ content: "\e173";
+}
+.glyphicon-floppy-remove:before {
+ content: "\e174";
+}
+.glyphicon-floppy-save:before {
+ content: "\e175";
+}
+.glyphicon-floppy-open:before {
+ content: "\e176";
+}
+.glyphicon-credit-card:before {
+ content: "\e177";
+}
+.glyphicon-transfer:before {
+ content: "\e178";
+}
+.glyphicon-cutlery:before {
+ content: "\e179";
+}
+.glyphicon-header:before {
+ content: "\e180";
+}
+.glyphicon-compressed:before {
+ content: "\e181";
+}
+.glyphicon-earphone:before {
+ content: "\e182";
+}
+.glyphicon-phone-alt:before {
+ content: "\e183";
+}
+.glyphicon-tower:before {
+ content: "\e184";
+}
+.glyphicon-stats:before {
+ content: "\e185";
+}
+.glyphicon-sd-video:before {
+ content: "\e186";
+}
+.glyphicon-hd-video:before {
+ content: "\e187";
+}
+.glyphicon-subtitles:before {
+ content: "\e188";
+}
+.glyphicon-sound-stereo:before {
+ content: "\e189";
+}
+.glyphicon-sound-dolby:before {
+ content: "\e190";
+}
+.glyphicon-sound-5-1:before {
+ content: "\e191";
+}
+.glyphicon-sound-6-1:before {
+ content: "\e192";
+}
+.glyphicon-sound-7-1:before {
+ content: "\e193";
+}
+.glyphicon-copyright-mark:before {
+ content: "\e194";
+}
+.glyphicon-registration-mark:before {
+ content: "\e195";
+}
+.glyphicon-cloud-download:before {
+ content: "\e197";
+}
+.glyphicon-cloud-upload:before {
+ content: "\e198";
+}
+.glyphicon-tree-conifer:before {
+ content: "\e199";
+}
+.glyphicon-tree-deciduous:before {
+ content: "\e200";
+}
+.glyphicon-cd:before {
+ content: "\e201";
+}
+.glyphicon-save-file:before {
+ content: "\e202";
+}
+.glyphicon-open-file:before {
+ content: "\e203";
+}
+.glyphicon-level-up:before {
+ content: "\e204";
+}
+.glyphicon-copy:before {
+ content: "\e205";
+}
+.glyphicon-paste:before {
+ content: "\e206";
+}
+.glyphicon-alert:before {
+ content: "\e209";
+}
+.glyphicon-equalizer:before {
+ content: "\e210";
+}
+.glyphicon-king:before {
+ content: "\e211";
+}
+.glyphicon-queen:before {
+ content: "\e212";
+}
+.glyphicon-pawn:before {
+ content: "\e213";
+}
+.glyphicon-bishop:before {
+ content: "\e214";
+}
+.glyphicon-knight:before {
+ content: "\e215";
+}
+.glyphicon-baby-formula:before {
+ content: "\e216";
+}
+.glyphicon-tent:before {
+ content: "\26fa";
+}
+.glyphicon-blackboard:before {
+ content: "\e218";
+}
+.glyphicon-bed:before {
+ content: "\e219";
+}
+.glyphicon-apple:before {
+ content: "\f8ff";
+}
+.glyphicon-erase:before {
+ content: "\e221";
+}
+.glyphicon-hourglass:before {
+ content: "\231b";
+}
+.glyphicon-lamp:before {
+ content: "\e223";
+}
+.glyphicon-duplicate:before {
+ content: "\e224";
+}
+.glyphicon-piggy-bank:before {
+ content: "\e225";
+}
+.glyphicon-scissors:before {
+ content: "\e226";
+}
+.glyphicon-bitcoin:before {
+ content: "\e227";
+}
+.glyphicon-btc:before {
+ content: "\e227";
+}
+.glyphicon-xbt:before {
+ content: "\e227";
+}
+.glyphicon-yen:before {
+ content: "\00a5";
+}
+.glyphicon-jpy:before {
+ content: "\00a5";
+}
+.glyphicon-ruble:before {
+ content: "\20bd";
+}
+.glyphicon-rub:before {
+ content: "\20bd";
+}
+.glyphicon-scale:before {
+ content: "\e230";
+}
+.glyphicon-ice-lolly:before {
+ content: "\e231";
+}
+.glyphicon-ice-lolly-tasted:before {
+ content: "\e232";
+}
+.glyphicon-education:before {
+ content: "\e233";
+}
+.glyphicon-option-horizontal:before {
+ content: "\e234";
+}
+.glyphicon-option-vertical:before {
+ content: "\e235";
+}
+.glyphicon-menu-hamburger:before {
+ content: "\e236";
+}
+.glyphicon-modal-window:before {
+ content: "\e237";
+}
+.glyphicon-oil:before {
+ content: "\e238";
+}
+.glyphicon-grain:before {
+ content: "\e239";
+}
+.glyphicon-sunglasses:before {
+ content: "\e240";
+}
+.glyphicon-text-size:before {
+ content: "\e241";
+}
+.glyphicon-text-color:before {
+ content: "\e242";
+}
+.glyphicon-text-background:before {
+ content: "\e243";
+}
+.glyphicon-object-align-top:before {
+ content: "\e244";
+}
+.glyphicon-object-align-bottom:before {
+ content: "\e245";
+}
+.glyphicon-object-align-horizontal:before {
+ content: "\e246";
+}
+.glyphicon-object-align-left:before {
+ content: "\e247";
+}
+.glyphicon-object-align-vertical:before {
+ content: "\e248";
+}
+.glyphicon-object-align-right:before {
+ content: "\e249";
+}
+.glyphicon-triangle-right:before {
+ content: "\e250";
+}
+.glyphicon-triangle-left:before {
+ content: "\e251";
+}
+.glyphicon-triangle-bottom:before {
+ content: "\e252";
+}
+.glyphicon-triangle-top:before {
+ content: "\e253";
+}
+.glyphicon-console:before {
+ content: "\e254";
+}
+.glyphicon-superscript:before {
+ content: "\e255";
+}
+.glyphicon-subscript:before {
+ content: "\e256";
+}
+.glyphicon-menu-left:before {
+ content: "\e257";
+}
+.glyphicon-menu-right:before {
+ content: "\e258";
+}
+.glyphicon-menu-down:before {
+ content: "\e259";
+}
+.glyphicon-menu-up:before {
+ content: "\e260";
+}
+* {
+ -webkit-box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ box-sizing: border-box;
+}
+*:before,
+*:after {
+ -webkit-box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ box-sizing: border-box;
+}
+html {
+ font-size: 10px;
+
+ -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
+}
+body {
+ font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
+ font-size: 14px;
+ line-height: 1.42857143;
+ color: #333;
+ background-color: #fff;
+}
+input,
+button,
+select,
+textarea {
+ font-family: inherit;
+ font-size: inherit;
+ line-height: inherit;
+}
+a {
+ color: #337ab7;
+ text-decoration: none;
+}
+a:hover,
+a:focus {
+ color: #23527c;
+ text-decoration: underline;
+}
+a:focus {
+ outline: thin dotted;
+ outline: 5px auto -webkit-focus-ring-color;
+ outline-offset: -2px;
+}
+figure {
+ margin: 0;
+}
+img {
+ vertical-align: middle;
+}
+.img-responsive,
+.thumbnail > img,
+.thumbnail a > img,
+.carousel-inner > .item > img,
+.carousel-inner > .item > a > img {
+ display: block;
+ max-width: 100%;
+ height: auto;
+}
+.img-rounded {
+ border-radius: 6px;
+}
+.img-thumbnail {
+ display: inline-block;
+ max-width: 100%;
+ height: auto;
+ padding: 4px;
+ line-height: 1.42857143;
+ background-color: #fff;
+ border: 1px solid #ddd;
+ border-radius: 4px;
+ -webkit-transition: all .2s ease-in-out;
+ -o-transition: all .2s ease-in-out;
+ transition: all .2s ease-in-out;
+}
+.img-circle {
+ border-radius: 50%;
+}
+hr {
+ margin-top: 20px;
+ margin-bottom: 20px;
+ border: 0;
+ border-top: 1px solid #eee;
+}
+.sr-only {
+ position: absolute;
+ width: 1px;
+ height: 1px;
+ padding: 0;
+ margin: -1px;
+ overflow: hidden;
+ clip: rect(0, 0, 0, 0);
+ border: 0;
+}
+.sr-only-focusable:active,
+.sr-only-focusable:focus {
+ position: static;
+ width: auto;
+ height: auto;
+ margin: 0;
+ overflow: visible;
+ clip: auto;
+}
+[role="button"] {
+ cursor: pointer;
+}
+h1,
+h2,
+h3,
+h4,
+h5,
+h6,
+.h1,
+.h2,
+.h3,
+.h4,
+.h5,
+.h6 {
+ font-family: inherit;
+ font-weight: 500;
+ line-height: 1.1;
+ color: inherit;
+}
+h1 small,
+h2 small,
+h3 small,
+h4 small,
+h5 small,
+h6 small,
+.h1 small,
+.h2 small,
+.h3 small,
+.h4 small,
+.h5 small,
+.h6 small,
+h1 .small,
+h2 .small,
+h3 .small,
+h4 .small,
+h5 .small,
+h6 .small,
+.h1 .small,
+.h2 .small,
+.h3 .small,
+.h4 .small,
+.h5 .small,
+.h6 .small {
+ font-weight: normal;
+ line-height: 1;
+ color: #777;
+}
+h1,
+.h1,
+h2,
+.h2,
+h3,
+.h3 {
+ margin-top: 20px;
+ margin-bottom: 10px;
+}
+h1 small,
+.h1 small,
+h2 small,
+.h2 small,
+h3 small,
+.h3 small,
+h1 .small,
+.h1 .small,
+h2 .small,
+.h2 .small,
+h3 .small,
+.h3 .small {
+ font-size: 65%;
+}
+h4,
+.h4,
+h5,
+.h5,
+h6,
+.h6 {
+ margin-top: 10px;
+ margin-bottom: 10px;
+}
+h4 small,
+.h4 small,
+h5 small,
+.h5 small,
+h6 small,
+.h6 small,
+h4 .small,
+.h4 .small,
+h5 .small,
+.h5 .small,
+h6 .small,
+.h6 .small {
+ font-size: 75%;
+}
+h1,
+.h1 {
+ font-size: 36px;
+}
+h2,
+.h2 {
+ font-size: 30px;
+}
+h3,
+.h3 {
+ font-size: 24px;
+}
+h4,
+.h4 {
+ font-size: 18px;
+}
+h5,
+.h5 {
+ font-size: 14px;
+}
+h6,
+.h6 {
+ font-size: 12px;
+}
+p {
+ margin: 0 0 10px;
+}
+.lead {
+ margin-bottom: 20px;
+ font-size: 16px;
+ font-weight: 300;
+ line-height: 1.4;
+}
+@media (min-width: 768px) {
+ .lead {
+ font-size: 21px;
+ }
+}
+small,
+.small {
+ font-size: 85%;
+}
+mark,
+.mark {
+ padding: .2em;
+ background-color: #fcf8e3;
+}
+.text-left {
+ text-align: left;
+}
+.text-right {
+ text-align: right;
+}
+.text-center {
+ text-align: center;
+}
+.text-justify {
+ text-align: justify;
+}
+.text-nowrap {
+ white-space: nowrap;
+}
+.text-lowercase {
+ text-transform: lowercase;
+}
+.text-uppercase {
+ text-transform: uppercase;
+}
+.text-capitalize {
+ text-transform: capitalize;
+}
+.text-muted {
+ color: #777;
+}
+.text-primary {
+ color: #337ab7;
+}
+a.text-primary:hover,
+a.text-primary:focus {
+ color: #286090;
+}
+.text-success {
+ color: #3c763d;
+}
+a.text-success:hover,
+a.text-success:focus {
+ color: #2b542c;
+}
+.text-info {
+ color: #31708f;
+}
+a.text-info:hover,
+a.text-info:focus {
+ color: #245269;
+}
+.text-warning {
+ color: #8a6d3b;
+}
+a.text-warning:hover,
+a.text-warning:focus {
+ color: #66512c;
+}
+.text-danger {
+ color: #a94442;
+}
+a.text-danger:hover,
+a.text-danger:focus {
+ color: #843534;
+}
+.bg-primary {
+ color: #fff;
+ background-color: #337ab7;
+}
+a.bg-primary:hover,
+a.bg-primary:focus {
+ background-color: #286090;
+}
+.bg-success {
+ background-color: #dff0d8;
+}
+a.bg-success:hover,
+a.bg-success:focus {
+ background-color: #c1e2b3;
+}
+.bg-info {
+ background-color: #d9edf7;
+}
+a.bg-info:hover,
+a.bg-info:focus {
+ background-color: #afd9ee;
+}
+.bg-warning {
+ background-color: #fcf8e3;
+}
+a.bg-warning:hover,
+a.bg-warning:focus {
+ background-color: #f7ecb5;
+}
+.bg-danger {
+ background-color: #f2dede;
+}
+a.bg-danger:hover,
+a.bg-danger:focus {
+ background-color: #e4b9b9;
+}
+.page-header {
+ padding-bottom: 9px;
+ margin: 40px 0 20px;
+ border-bottom: 1px solid #eee;
+}
+ul,
+ol {
+ margin-top: 0;
+ margin-bottom: 10px;
+}
+ul ul,
+ol ul,
+ul ol,
+ol ol {
+ margin-bottom: 0;
+}
+.list-unstyled {
+ padding-left: 0;
+ list-style: none;
+}
+.list-inline {
+ padding-left: 0;
+ margin-left: -5px;
+ list-style: none;
+}
+.list-inline > li {
+ display: inline-block;
+ padding-right: 5px;
+ padding-left: 5px;
+}
+dl {
+ margin-top: 0;
+ margin-bottom: 20px;
+}
+dt,
+dd {
+ line-height: 1.42857143;
+}
+dt {
+ font-weight: bold;
+}
+dd {
+ margin-left: 0;
+}
+@media (min-width: 768px) {
+ .dl-horizontal dt {
+ float: left;
+ width: 160px;
+ overflow: hidden;
+ clear: left;
+ text-align: right;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ }
+ .dl-horizontal dd {
+ margin-left: 180px;
+ }
+}
+abbr[title],
+abbr[data-original-title] {
+ cursor: help;
+ border-bottom: 1px dotted #777;
+}
+.initialism {
+ font-size: 90%;
+ text-transform: uppercase;
+}
+blockquote {
+ padding: 10px 20px;
+ margin: 0 0 20px;
+ font-size: 17.5px;
+ border-left: 5px solid #eee;
+}
+blockquote p:last-child,
+blockquote ul:last-child,
+blockquote ol:last-child {
+ margin-bottom: 0;
+}
+blockquote footer,
+blockquote small,
+blockquote .small {
+ display: block;
+ font-size: 80%;
+ line-height: 1.42857143;
+ color: #777;
+}
+blockquote footer:before,
+blockquote small:before,
+blockquote .small:before {
+ content: '\2014 \00A0';
+}
+.blockquote-reverse,
+blockquote.pull-right {
+ padding-right: 15px;
+ padding-left: 0;
+ text-align: right;
+ border-right: 5px solid #eee;
+ border-left: 0;
+}
+.blockquote-reverse footer:before,
+blockquote.pull-right footer:before,
+.blockquote-reverse small:before,
+blockquote.pull-right small:before,
+.blockquote-reverse .small:before,
+blockquote.pull-right .small:before {
+ content: '';
+}
+.blockquote-reverse footer:after,
+blockquote.pull-right footer:after,
+.blockquote-reverse small:after,
+blockquote.pull-right small:after,
+.blockquote-reverse .small:after,
+blockquote.pull-right .small:after {
+ content: '\00A0 \2014';
+}
+address {
+ margin-bottom: 20px;
+ font-style: normal;
+ line-height: 1.42857143;
+}
+code,
+kbd,
+pre,
+samp {
+ font-family: Menlo, Monaco, Consolas, "Courier New", monospace;
+}
+code {
+ padding: 2px 4px;
+ font-size: 90%;
+ color: #c7254e;
+ background-color: #f9f2f4;
+ border-radius: 4px;
+}
+kbd {
+ padding: 2px 4px;
+ font-size: 90%;
+ color: #fff;
+ background-color: #333;
+ border-radius: 3px;
+ -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .25);
+ box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .25);
+}
+kbd kbd {
+ padding: 0;
+ font-size: 100%;
+ font-weight: bold;
+ -webkit-box-shadow: none;
+ box-shadow: none;
+}
+pre {
+ display: block;
+ padding: 9.5px;
+ margin: 0 0 10px;
+ font-size: 13px;
+ line-height: 1.42857143;
+ color: #333;
+ word-break: break-all;
+ word-wrap: break-word;
+ background-color: #f5f5f5;
+ border: 1px solid #ccc;
+ border-radius: 4px;
+}
+pre code {
+ padding: 0;
+ font-size: inherit;
+ color: inherit;
+ white-space: pre-wrap;
+ background-color: transparent;
+ border-radius: 0;
+}
+.pre-scrollable {
+ max-height: 340px;
+ overflow-y: scroll;
+}
+.container {
+ padding-right: 15px;
+ padding-left: 15px;
+ margin-right: auto;
+ margin-left: auto;
+}
+@media (min-width: 768px) {
+ .container {
+ width: 750px;
+ }
+}
+@media (min-width: 992px) {
+ .container {
+ width: 970px;
+ }
+}
+@media (min-width: 1200px) {
+ .container {
+ width: 1170px;
+ }
+}
+.container-fluid {
+ padding-right: 15px;
+ padding-left: 15px;
+ margin-right: auto;
+ margin-left: auto;
+}
+.row {
+ margin-right: -15px;
+ margin-left: -15px;
+}
+.col-xs-1, .col-sm-1, .col-md-1, .col-lg-1, .col-xs-2, .col-sm-2, .col-md-2, .col-lg-2, .col-xs-3, .col-sm-3, .col-md-3, .col-lg-3, .col-xs-4, .col-sm-4, .col-md-4, .col-lg-4, .col-xs-5, .col-sm-5, .col-md-5, .col-lg-5, .col-xs-6, .col-sm-6, .col-md-6, .col-lg-6, .col-xs-7, .col-sm-7, .col-md-7, .col-lg-7, .col-xs-8, .col-sm-8, .col-md-8, .col-lg-8, .col-xs-9, .col-sm-9, .col-md-9, .col-lg-9, .col-xs-10, .col-sm-10, .col-md-10, .col-lg-10, .col-xs-11, .col-sm-11, .col-md-11, .col-lg-11, .col-xs-12, .col-sm-12, .col-md-12, .col-lg-12 {
+ position: relative;
+ min-height: 1px;
+ padding-right: 15px;
+ padding-left: 15px;
+}
+.col-xs-1, .col-xs-2, .col-xs-3, .col-xs-4, .col-xs-5, .col-xs-6, .col-xs-7, .col-xs-8, .col-xs-9, .col-xs-10, .col-xs-11, .col-xs-12 {
+ float: left;
+}
+.col-xs-12 {
+ width: 100%;
+}
+.col-xs-11 {
+ width: 91.66666667%;
+}
+.col-xs-10 {
+ width: 83.33333333%;
+}
+.col-xs-9 {
+ width: 75%;
+}
+.col-xs-8 {
+ width: 66.66666667%;
+}
+.col-xs-7 {
+ width: 58.33333333%;
+}
+.col-xs-6 {
+ width: 50%;
+}
+.col-xs-5 {
+ width: 41.66666667%;
+}
+.col-xs-4 {
+ width: 33.33333333%;
+}
+.col-xs-3 {
+ width: 25%;
+}
+.col-xs-2 {
+ width: 16.66666667%;
+}
+.col-xs-1 {
+ width: 8.33333333%;
+}
+.col-xs-pull-12 {
+ right: 100%;
+}
+.col-xs-pull-11 {
+ right: 91.66666667%;
+}
+.col-xs-pull-10 {
+ right: 83.33333333%;
+}
+.col-xs-pull-9 {
+ right: 75%;
+}
+.col-xs-pull-8 {
+ right: 66.66666667%;
+}
+.col-xs-pull-7 {
+ right: 58.33333333%;
+}
+.col-xs-pull-6 {
+ right: 50%;
+}
+.col-xs-pull-5 {
+ right: 41.66666667%;
+}
+.col-xs-pull-4 {
+ right: 33.33333333%;
+}
+.col-xs-pull-3 {
+ right: 25%;
+}
+.col-xs-pull-2 {
+ right: 16.66666667%;
+}
+.col-xs-pull-1 {
+ right: 8.33333333%;
+}
+.col-xs-pull-0 {
+ right: auto;
+}
+.col-xs-push-12 {
+ left: 100%;
+}
+.col-xs-push-11 {
+ left: 91.66666667%;
+}
+.col-xs-push-10 {
+ left: 83.33333333%;
+}
+.col-xs-push-9 {
+ left: 75%;
+}
+.col-xs-push-8 {
+ left: 66.66666667%;
+}
+.col-xs-push-7 {
+ left: 58.33333333%;
+}
+.col-xs-push-6 {
+ left: 50%;
+}
+.col-xs-push-5 {
+ left: 41.66666667%;
+}
+.col-xs-push-4 {
+ left: 33.33333333%;
+}
+.col-xs-push-3 {
+ left: 25%;
+}
+.col-xs-push-2 {
+ left: 16.66666667%;
+}
+.col-xs-push-1 {
+ left: 8.33333333%;
+}
+.col-xs-push-0 {
+ left: auto;
+}
+.col-xs-offset-12 {
+ margin-left: 100%;
+}
+.col-xs-offset-11 {
+ margin-left: 91.66666667%;
+}
+.col-xs-offset-10 {
+ margin-left: 83.33333333%;
+}
+.col-xs-offset-9 {
+ margin-left: 75%;
+}
+.col-xs-offset-8 {
+ margin-left: 66.66666667%;
+}
+.col-xs-offset-7 {
+ margin-left: 58.33333333%;
+}
+.col-xs-offset-6 {
+ margin-left: 50%;
+}
+.col-xs-offset-5 {
+ margin-left: 41.66666667%;
+}
+.col-xs-offset-4 {
+ margin-left: 33.33333333%;
+}
+.col-xs-offset-3 {
+ margin-left: 25%;
+}
+.col-xs-offset-2 {
+ margin-left: 16.66666667%;
+}
+.col-xs-offset-1 {
+ margin-left: 8.33333333%;
+}
+.col-xs-offset-0 {
+ margin-left: 0;
+}
+@media (min-width: 768px) {
+ .col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-sm-12 {
+ float: left;
+ }
+ .col-sm-12 {
+ width: 100%;
+ }
+ .col-sm-11 {
+ width: 91.66666667%;
+ }
+ .col-sm-10 {
+ width: 83.33333333%;
+ }
+ .col-sm-9 {
+ width: 75%;
+ }
+ .col-sm-8 {
+ width: 66.66666667%;
+ }
+ .col-sm-7 {
+ width: 58.33333333%;
+ }
+ .col-sm-6 {
+ width: 50%;
+ }
+ .col-sm-5 {
+ width: 41.66666667%;
+ }
+ .col-sm-4 {
+ width: 33.33333333%;
+ }
+ .col-sm-3 {
+ width: 25%;
+ }
+ .col-sm-2 {
+ width: 16.66666667%;
+ }
+ .col-sm-1 {
+ width: 8.33333333%;
+ }
+ .col-sm-pull-12 {
+ right: 100%;
+ }
+ .col-sm-pull-11 {
+ right: 91.66666667%;
+ }
+ .col-sm-pull-10 {
+ right: 83.33333333%;
+ }
+ .col-sm-pull-9 {
+ right: 75%;
+ }
+ .col-sm-pull-8 {
+ right: 66.66666667%;
+ }
+ .col-sm-pull-7 {
+ right: 58.33333333%;
+ }
+ .col-sm-pull-6 {
+ right: 50%;
+ }
+ .col-sm-pull-5 {
+ right: 41.66666667%;
+ }
+ .col-sm-pull-4 {
+ right: 33.33333333%;
+ }
+ .col-sm-pull-3 {
+ right: 25%;
+ }
+ .col-sm-pull-2 {
+ right: 16.66666667%;
+ }
+ .col-sm-pull-1 {
+ right: 8.33333333%;
+ }
+ .col-sm-pull-0 {
+ right: auto;
+ }
+ .col-sm-push-12 {
+ left: 100%;
+ }
+ .col-sm-push-11 {
+ left: 91.66666667%;
+ }
+ .col-sm-push-10 {
+ left: 83.33333333%;
+ }
+ .col-sm-push-9 {
+ left: 75%;
+ }
+ .col-sm-push-8 {
+ left: 66.66666667%;
+ }
+ .col-sm-push-7 {
+ left: 58.33333333%;
+ }
+ .col-sm-push-6 {
+ left: 50%;
+ }
+ .col-sm-push-5 {
+ left: 41.66666667%;
+ }
+ .col-sm-push-4 {
+ left: 33.33333333%;
+ }
+ .col-sm-push-3 {
+ left: 25%;
+ }
+ .col-sm-push-2 {
+ left: 16.66666667%;
+ }
+ .col-sm-push-1 {
+ left: 8.33333333%;
+ }
+ .col-sm-push-0 {
+ left: auto;
+ }
+ .col-sm-offset-12 {
+ margin-left: 100%;
+ }
+ .col-sm-offset-11 {
+ margin-left: 91.66666667%;
+ }
+ .col-sm-offset-10 {
+ margin-left: 83.33333333%;
+ }
+ .col-sm-offset-9 {
+ margin-left: 75%;
+ }
+ .col-sm-offset-8 {
+ margin-left: 66.66666667%;
+ }
+ .col-sm-offset-7 {
+ margin-left: 58.33333333%;
+ }
+ .col-sm-offset-6 {
+ margin-left: 50%;
+ }
+ .col-sm-offset-5 {
+ margin-left: 41.66666667%;
+ }
+ .col-sm-offset-4 {
+ margin-left: 33.33333333%;
+ }
+ .col-sm-offset-3 {
+ margin-left: 25%;
+ }
+ .col-sm-offset-2 {
+ margin-left: 16.66666667%;
+ }
+ .col-sm-offset-1 {
+ margin-left: 8.33333333%;
+ }
+ .col-sm-offset-0 {
+ margin-left: 0;
+ }
+}
+@media (min-width: 992px) {
+ .col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12 {
+ float: left;
+ }
+ .col-md-12 {
+ width: 100%;
+ }
+ .col-md-11 {
+ width: 91.66666667%;
+ }
+ .col-md-10 {
+ width: 83.33333333%;
+ }
+ .col-md-9 {
+ width: 75%;
+ }
+ .col-md-8 {
+ width: 66.66666667%;
+ }
+ .col-md-7 {
+ width: 58.33333333%;
+ }
+ .col-md-6 {
+ width: 50%;
+ }
+ .col-md-5 {
+ width: 41.66666667%;
+ }
+ .col-md-4 {
+ width: 33.33333333%;
+ }
+ .col-md-3 {
+ width: 25%;
+ }
+ .col-md-2 {
+ width: 16.66666667%;
+ }
+ .col-md-1 {
+ width: 8.33333333%;
+ }
+ .col-md-pull-12 {
+ right: 100%;
+ }
+ .col-md-pull-11 {
+ right: 91.66666667%;
+ }
+ .col-md-pull-10 {
+ right: 83.33333333%;
+ }
+ .col-md-pull-9 {
+ right: 75%;
+ }
+ .col-md-pull-8 {
+ right: 66.66666667%;
+ }
+ .col-md-pull-7 {
+ right: 58.33333333%;
+ }
+ .col-md-pull-6 {
+ right: 50%;
+ }
+ .col-md-pull-5 {
+ right: 41.66666667%;
+ }
+ .col-md-pull-4 {
+ right: 33.33333333%;
+ }
+ .col-md-pull-3 {
+ right: 25%;
+ }
+ .col-md-pull-2 {
+ right: 16.66666667%;
+ }
+ .col-md-pull-1 {
+ right: 8.33333333%;
+ }
+ .col-md-pull-0 {
+ right: auto;
+ }
+ .col-md-push-12 {
+ left: 100%;
+ }
+ .col-md-push-11 {
+ left: 91.66666667%;
+ }
+ .col-md-push-10 {
+ left: 83.33333333%;
+ }
+ .col-md-push-9 {
+ left: 75%;
+ }
+ .col-md-push-8 {
+ left: 66.66666667%;
+ }
+ .col-md-push-7 {
+ left: 58.33333333%;
+ }
+ .col-md-push-6 {
+ left: 50%;
+ }
+ .col-md-push-5 {
+ left: 41.66666667%;
+ }
+ .col-md-push-4 {
+ left: 33.33333333%;
+ }
+ .col-md-push-3 {
+ left: 25%;
+ }
+ .col-md-push-2 {
+ left: 16.66666667%;
+ }
+ .col-md-push-1 {
+ left: 8.33333333%;
+ }
+ .col-md-push-0 {
+ left: auto;
+ }
+ .col-md-offset-12 {
+ margin-left: 100%;
+ }
+ .col-md-offset-11 {
+ margin-left: 91.66666667%;
+ }
+ .col-md-offset-10 {
+ margin-left: 83.33333333%;
+ }
+ .col-md-offset-9 {
+ margin-left: 75%;
+ }
+ .col-md-offset-8 {
+ margin-left: 66.66666667%;
+ }
+ .col-md-offset-7 {
+ margin-left: 58.33333333%;
+ }
+ .col-md-offset-6 {
+ margin-left: 50%;
+ }
+ .col-md-offset-5 {
+ margin-left: 41.66666667%;
+ }
+ .col-md-offset-4 {
+ margin-left: 33.33333333%;
+ }
+ .col-md-offset-3 {
+ margin-left: 25%;
+ }
+ .col-md-offset-2 {
+ margin-left: 16.66666667%;
+ }
+ .col-md-offset-1 {
+ margin-left: 8.33333333%;
+ }
+ .col-md-offset-0 {
+ margin-left: 0;
+ }
+}
+@media (min-width: 1200px) {
+ .col-lg-1, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-lg-10, .col-lg-11, .col-lg-12 {
+ float: left;
+ }
+ .col-lg-12 {
+ width: 100%;
+ }
+ .col-lg-11 {
+ width: 91.66666667%;
+ }
+ .col-lg-10 {
+ width: 83.33333333%;
+ }
+ .col-lg-9 {
+ width: 75%;
+ }
+ .col-lg-8 {
+ width: 66.66666667%;
+ }
+ .col-lg-7 {
+ width: 58.33333333%;
+ }
+ .col-lg-6 {
+ width: 50%;
+ }
+ .col-lg-5 {
+ width: 41.66666667%;
+ }
+ .col-lg-4 {
+ width: 33.33333333%;
+ }
+ .col-lg-3 {
+ width: 25%;
+ }
+ .col-lg-2 {
+ width: 16.66666667%;
+ }
+ .col-lg-1 {
+ width: 8.33333333%;
+ }
+ .col-lg-pull-12 {
+ right: 100%;
+ }
+ .col-lg-pull-11 {
+ right: 91.66666667%;
+ }
+ .col-lg-pull-10 {
+ right: 83.33333333%;
+ }
+ .col-lg-pull-9 {
+ right: 75%;
+ }
+ .col-lg-pull-8 {
+ right: 66.66666667%;
+ }
+ .col-lg-pull-7 {
+ right: 58.33333333%;
+ }
+ .col-lg-pull-6 {
+ right: 50%;
+ }
+ .col-lg-pull-5 {
+ right: 41.66666667%;
+ }
+ .col-lg-pull-4 {
+ right: 33.33333333%;
+ }
+ .col-lg-pull-3 {
+ right: 25%;
+ }
+ .col-lg-pull-2 {
+ right: 16.66666667%;
+ }
+ .col-lg-pull-1 {
+ right: 8.33333333%;
+ }
+ .col-lg-pull-0 {
+ right: auto;
+ }
+ .col-lg-push-12 {
+ left: 100%;
+ }
+ .col-lg-push-11 {
+ left: 91.66666667%;
+ }
+ .col-lg-push-10 {
+ left: 83.33333333%;
+ }
+ .col-lg-push-9 {
+ left: 75%;
+ }
+ .col-lg-push-8 {
+ left: 66.66666667%;
+ }
+ .col-lg-push-7 {
+ left: 58.33333333%;
+ }
+ .col-lg-push-6 {
+ left: 50%;
+ }
+ .col-lg-push-5 {
+ left: 41.66666667%;
+ }
+ .col-lg-push-4 {
+ left: 33.33333333%;
+ }
+ .col-lg-push-3 {
+ left: 25%;
+ }
+ .col-lg-push-2 {
+ left: 16.66666667%;
+ }
+ .col-lg-push-1 {
+ left: 8.33333333%;
+ }
+ .col-lg-push-0 {
+ left: auto;
+ }
+ .col-lg-offset-12 {
+ margin-left: 100%;
+ }
+ .col-lg-offset-11 {
+ margin-left: 91.66666667%;
+ }
+ .col-lg-offset-10 {
+ margin-left: 83.33333333%;
+ }
+ .col-lg-offset-9 {
+ margin-left: 75%;
+ }
+ .col-lg-offset-8 {
+ margin-left: 66.66666667%;
+ }
+ .col-lg-offset-7 {
+ margin-left: 58.33333333%;
+ }
+ .col-lg-offset-6 {
+ margin-left: 50%;
+ }
+ .col-lg-offset-5 {
+ margin-left: 41.66666667%;
+ }
+ .col-lg-offset-4 {
+ margin-left: 33.33333333%;
+ }
+ .col-lg-offset-3 {
+ margin-left: 25%;
+ }
+ .col-lg-offset-2 {
+ margin-left: 16.66666667%;
+ }
+ .col-lg-offset-1 {
+ margin-left: 8.33333333%;
+ }
+ .col-lg-offset-0 {
+ margin-left: 0;
+ }
+}
+table {
+ background-color: transparent;
+}
+caption {
+ padding-top: 8px;
+ padding-bottom: 8px;
+ color: #777;
+ text-align: left;
+}
+th {
+ text-align: left;
+}
+.table {
+ width: 100%;
+ max-width: 100%;
+ margin-bottom: 20px;
+}
+.table > thead > tr > th,
+.table > tbody > tr > th,
+.table > tfoot > tr > th,
+.table > thead > tr > td,
+.table > tbody > tr > td,
+.table > tfoot > tr > td {
+ padding: 8px;
+ line-height: 1.42857143;
+ vertical-align: top;
+ border-top: 1px solid #ddd;
+}
+.table > thead > tr > th {
+ vertical-align: bottom;
+ border-bottom: 2px solid #ddd;
+}
+.table > caption + thead > tr:first-child > th,
+.table > colgroup + thead > tr:first-child > th,
+.table > thead:first-child > tr:first-child > th,
+.table > caption + thead > tr:first-child > td,
+.table > colgroup + thead > tr:first-child > td,
+.table > thead:first-child > tr:first-child > td {
+ border-top: 0;
+}
+.table > tbody + tbody {
+ border-top: 2px solid #ddd;
+}
+.table .table {
+ background-color: #fff;
+}
+.table-condensed > thead > tr > th,
+.table-condensed > tbody > tr > th,
+.table-condensed > tfoot > tr > th,
+.table-condensed > thead > tr > td,
+.table-condensed > tbody > tr > td,
+.table-condensed > tfoot > tr > td {
+ padding: 5px;
+}
+.table-bordered {
+ border: 1px solid #ddd;
+}
+.table-bordered > thead > tr > th,
+.table-bordered > tbody > tr > th,
+.table-bordered > tfoot > tr > th,
+.table-bordered > thead > tr > td,
+.table-bordered > tbody > tr > td,
+.table-bordered > tfoot > tr > td {
+ border: 1px solid #ddd;
+}
+.table-bordered > thead > tr > th,
+.table-bordered > thead > tr > td {
+ border-bottom-width: 2px;
+}
+.table-striped > tbody > tr:nth-of-type(odd) {
+ background-color: #f9f9f9;
+}
+.table-hover > tbody > tr:hover {
+ background-color: #f5f5f5;
+}
+table col[class*="col-"] {
+ position: static;
+ display: table-column;
+ float: none;
+}
+table td[class*="col-"],
+table th[class*="col-"] {
+ position: static;
+ display: table-cell;
+ float: none;
+}
+.table > thead > tr > td.active,
+.table > tbody > tr > td.active,
+.table > tfoot > tr > td.active,
+.table > thead > tr > th.active,
+.table > tbody > tr > th.active,
+.table > tfoot > tr > th.active,
+.table > thead > tr.active > td,
+.table > tbody > tr.active > td,
+.table > tfoot > tr.active > td,
+.table > thead > tr.active > th,
+.table > tbody > tr.active > th,
+.table > tfoot > tr.active > th {
+ background-color: #f5f5f5;
+}
+.table-hover > tbody > tr > td.active:hover,
+.table-hover > tbody > tr > th.active:hover,
+.table-hover > tbody > tr.active:hover > td,
+.table-hover > tbody > tr:hover > .active,
+.table-hover > tbody > tr.active:hover > th {
+ background-color: #e8e8e8;
+}
+.table > thead > tr > td.success,
+.table > tbody > tr > td.success,
+.table > tfoot > tr > td.success,
+.table > thead > tr > th.success,
+.table > tbody > tr > th.success,
+.table > tfoot > tr > th.success,
+.table > thead > tr.success > td,
+.table > tbody > tr.success > td,
+.table > tfoot > tr.success > td,
+.table > thead > tr.success > th,
+.table > tbody > tr.success > th,
+.table > tfoot > tr.success > th {
+ background-color: #dff0d8;
+}
+.table-hover > tbody > tr > td.success:hover,
+.table-hover > tbody > tr > th.success:hover,
+.table-hover > tbody > tr.success:hover > td,
+.table-hover > tbody > tr:hover > .success,
+.table-hover > tbody > tr.success:hover > th {
+ background-color: #d0e9c6;
+}
+.table > thead > tr > td.info,
+.table > tbody > tr > td.info,
+.table > tfoot > tr > td.info,
+.table > thead > tr > th.info,
+.table > tbody > tr > th.info,
+.table > tfoot > tr > th.info,
+.table > thead > tr.info > td,
+.table > tbody > tr.info > td,
+.table > tfoot > tr.info > td,
+.table > thead > tr.info > th,
+.table > tbody > tr.info > th,
+.table > tfoot > tr.info > th {
+ background-color: #d9edf7;
+}
+.table-hover > tbody > tr > td.info:hover,
+.table-hover > tbody > tr > th.info:hover,
+.table-hover > tbody > tr.info:hover > td,
+.table-hover > tbody > tr:hover > .info,
+.table-hover > tbody > tr.info:hover > th {
+ background-color: #c4e3f3;
+}
+.table > thead > tr > td.warning,
+.table > tbody > tr > td.warning,
+.table > tfoot > tr > td.warning,
+.table > thead > tr > th.warning,
+.table > tbody > tr > th.warning,
+.table > tfoot > tr > th.warning,
+.table > thead > tr.warning > td,
+.table > tbody > tr.warning > td,
+.table > tfoot > tr.warning > td,
+.table > thead > tr.warning > th,
+.table > tbody > tr.warning > th,
+.table > tfoot > tr.warning > th {
+ background-color: #fcf8e3;
+}
+.table-hover > tbody > tr > td.warning:hover,
+.table-hover > tbody > tr > th.warning:hover,
+.table-hover > tbody > tr.warning:hover > td,
+.table-hover > tbody > tr:hover > .warning,
+.table-hover > tbody > tr.warning:hover > th {
+ background-color: #faf2cc;
+}
+.table > thead > tr > td.danger,
+.table > tbody > tr > td.danger,
+.table > tfoot > tr > td.danger,
+.table > thead > tr > th.danger,
+.table > tbody > tr > th.danger,
+.table > tfoot > tr > th.danger,
+.table > thead > tr.danger > td,
+.table > tbody > tr.danger > td,
+.table > tfoot > tr.danger > td,
+.table > thead > tr.danger > th,
+.table > tbody > tr.danger > th,
+.table > tfoot > tr.danger > th {
+ background-color: #f2dede;
+}
+.table-hover > tbody > tr > td.danger:hover,
+.table-hover > tbody > tr > th.danger:hover,
+.table-hover > tbody > tr.danger:hover > td,
+.table-hover > tbody > tr:hover > .danger,
+.table-hover > tbody > tr.danger:hover > th {
+ background-color: #ebcccc;
+}
+.table-responsive {
+ min-height: .01%;
+ overflow-x: auto;
+}
+@media screen and (max-width: 767px) {
+ .table-responsive {
+ width: 100%;
+ margin-bottom: 15px;
+ overflow-y: hidden;
+ -ms-overflow-style: -ms-autohiding-scrollbar;
+ border: 1px solid #ddd;
+ }
+ .table-responsive > .table {
+ margin-bottom: 0;
+ }
+ .table-responsive > .table > thead > tr > th,
+ .table-responsive > .table > tbody > tr > th,
+ .table-responsive > .table > tfoot > tr > th,
+ .table-responsive > .table > thead > tr > td,
+ .table-responsive > .table > tbody > tr > td,
+ .table-responsive > .table > tfoot > tr > td {
+ white-space: nowrap;
+ }
+ .table-responsive > .table-bordered {
+ border: 0;
+ }
+ .table-responsive > .table-bordered > thead > tr > th:first-child,
+ .table-responsive > .table-bordered > tbody > tr > th:first-child,
+ .table-responsive > .table-bordered > tfoot > tr > th:first-child,
+ .table-responsive > .table-bordered > thead > tr > td:first-child,
+ .table-responsive > .table-bordered > tbody > tr > td:first-child,
+ .table-responsive > .table-bordered > tfoot > tr > td:first-child {
+ border-left: 0;
+ }
+ .table-responsive > .table-bordered > thead > tr > th:last-child,
+ .table-responsive > .table-bordered > tbody > tr > th:last-child,
+ .table-responsive > .table-bordered > tfoot > tr > th:last-child,
+ .table-responsive > .table-bordered > thead > tr > td:last-child,
+ .table-responsive > .table-bordered > tbody > tr > td:last-child,
+ .table-responsive > .table-bordered > tfoot > tr > td:last-child {
+ border-right: 0;
+ }
+ .table-responsive > .table-bordered > tbody > tr:last-child > th,
+ .table-responsive > .table-bordered > tfoot > tr:last-child > th,
+ .table-responsive > .table-bordered > tbody > tr:last-child > td,
+ .table-responsive > .table-bordered > tfoot > tr:last-child > td {
+ border-bottom: 0;
+ }
+}
+fieldset {
+ min-width: 0;
+ padding: 0;
+ margin: 0;
+ border: 0;
+}
+legend {
+ display: block;
+ width: 100%;
+ padding: 0;
+ margin-bottom: 20px;
+ font-size: 21px;
+ line-height: inherit;
+ color: #333;
+ border: 0;
+ border-bottom: 1px solid #e5e5e5;
+}
+label {
+ display: inline-block;
+ max-width: 100%;
+ margin-bottom: 5px;
+ font-weight: bold;
+}
+input[type="search"] {
+ -webkit-box-sizing: border-box;
+ -moz-box-sizing: border-box;
+ box-sizing: border-box;
+}
+input[type="radio"],
+input[type="checkbox"] {
+ margin: 4px 0 0;
+ margin-top: 1px \9;
+ line-height: normal;
+}
+input[type="file"] {
+ display: block;
+}
+input[type="range"] {
+ display: block;
+ width: 100%;
+}
+select[multiple],
+select[size] {
+ height: auto;
+}
+input[type="file"]:focus,
+input[type="radio"]:focus,
+input[type="checkbox"]:focus {
+ outline: thin dotted;
+ outline: 5px auto -webkit-focus-ring-color;
+ outline-offset: -2px;
+}
+output {
+ display: block;
+ padding-top: 7px;
+ font-size: 14px;
+ line-height: 1.42857143;
+ color: #555;
+}
+.form-control {
+ display: block;
+ width: 100%;
+ height: 34px;
+ padding: 6px 12px;
+ font-size: 14px;
+ line-height: 1.42857143;
+ color: #555;
+ background-color: #fff;
+ background-image: none;
+ border: 1px solid #ccc;
+ border-radius: 4px;
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
+ -webkit-transition: border-color ease-in-out .15s, -webkit-box-shadow ease-in-out .15s;
+ -o-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
+ transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
+}
+.form-control:focus {
+ border-color: #66afe9;
+ outline: 0;
+ -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, .6);
+ box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, .6);
+}
+.form-control::-moz-placeholder {
+ color: #999;
+ opacity: 1;
+}
+.form-control:-ms-input-placeholder {
+ color: #999;
+}
+.form-control::-webkit-input-placeholder {
+ color: #999;
+}
+.form-control::-ms-expand {
+ background-color: transparent;
+ border: 0;
+}
+.form-control[disabled],
+.form-control[readonly],
+fieldset[disabled] .form-control {
+ background-color: #eee;
+ opacity: 1;
+}
+.form-control[disabled],
+fieldset[disabled] .form-control {
+ cursor: not-allowed;
+}
+textarea.form-control {
+ height: auto;
+}
+input[type="search"] {
+ -webkit-appearance: none;
+}
+@media screen and (-webkit-min-device-pixel-ratio: 0) {
+ input[type="date"].form-control,
+ input[type="time"].form-control,
+ input[type="datetime-local"].form-control,
+ input[type="month"].form-control {
+ line-height: 34px;
+ }
+ input[type="date"].input-sm,
+ input[type="time"].input-sm,
+ input[type="datetime-local"].input-sm,
+ input[type="month"].input-sm,
+ .input-group-sm input[type="date"],
+ .input-group-sm input[type="time"],
+ .input-group-sm input[type="datetime-local"],
+ .input-group-sm input[type="month"] {
+ line-height: 30px;
+ }
+ input[type="date"].input-lg,
+ input[type="time"].input-lg,
+ input[type="datetime-local"].input-lg,
+ input[type="month"].input-lg,
+ .input-group-lg input[type="date"],
+ .input-group-lg input[type="time"],
+ .input-group-lg input[type="datetime-local"],
+ .input-group-lg input[type="month"] {
+ line-height: 46px;
+ }
+}
+.form-group {
+ margin-bottom: 15px;
+}
+.radio,
+.checkbox {
+ position: relative;
+ display: block;
+ margin-top: 10px;
+ margin-bottom: 10px;
+}
+.radio label,
+.checkbox label {
+ min-height: 20px;
+ padding-left: 20px;
+ margin-bottom: 0;
+ font-weight: normal;
+ cursor: pointer;
+}
+.radio input[type="radio"],
+.radio-inline input[type="radio"],
+.checkbox input[type="checkbox"],
+.checkbox-inline input[type="checkbox"] {
+ position: absolute;
+ margin-top: 4px \9;
+ margin-left: -20px;
+}
+.radio + .radio,
+.checkbox + .checkbox {
+ margin-top: -5px;
+}
+.radio-inline,
+.checkbox-inline {
+ position: relative;
+ display: inline-block;
+ padding-left: 20px;
+ margin-bottom: 0;
+ font-weight: normal;
+ vertical-align: middle;
+ cursor: pointer;
+}
+.radio-inline + .radio-inline,
+.checkbox-inline + .checkbox-inline {
+ margin-top: 0;
+ margin-left: 10px;
+}
+input[type="radio"][disabled],
+input[type="checkbox"][disabled],
+input[type="radio"].disabled,
+input[type="checkbox"].disabled,
+fieldset[disabled] input[type="radio"],
+fieldset[disabled] input[type="checkbox"] {
+ cursor: not-allowed;
+}
+.radio-inline.disabled,
+.checkbox-inline.disabled,
+fieldset[disabled] .radio-inline,
+fieldset[disabled] .checkbox-inline {
+ cursor: not-allowed;
+}
+.radio.disabled label,
+.checkbox.disabled label,
+fieldset[disabled] .radio label,
+fieldset[disabled] .checkbox label {
+ cursor: not-allowed;
+}
+.form-control-static {
+ min-height: 34px;
+ padding-top: 7px;
+ padding-bottom: 7px;
+ margin-bottom: 0;
+}
+.form-control-static.input-lg,
+.form-control-static.input-sm {
+ padding-right: 0;
+ padding-left: 0;
+}
+.input-sm {
+ height: 30px;
+ padding: 5px 10px;
+ font-size: 12px;
+ line-height: 1.5;
+ border-radius: 3px;
+}
+select.input-sm {
+ height: 30px;
+ line-height: 30px;
+}
+textarea.input-sm,
+select[multiple].input-sm {
+ height: auto;
+}
+.form-group-sm .form-control {
+ height: 30px;
+ padding: 5px 10px;
+ font-size: 12px;
+ line-height: 1.5;
+ border-radius: 3px;
+}
+.form-group-sm select.form-control {
+ height: 30px;
+ line-height: 30px;
+}
+.form-group-sm textarea.form-control,
+.form-group-sm select[multiple].form-control {
+ height: auto;
+}
+.form-group-sm .form-control-static {
+ height: 30px;
+ min-height: 32px;
+ padding: 6px 10px;
+ font-size: 12px;
+ line-height: 1.5;
+}
+.input-lg {
+ height: 46px;
+ padding: 10px 16px;
+ font-size: 18px;
+ line-height: 1.3333333;
+ border-radius: 6px;
+}
+select.input-lg {
+ height: 46px;
+ line-height: 46px;
+}
+textarea.input-lg,
+select[multiple].input-lg {
+ height: auto;
+}
+.form-group-lg .form-control {
+ height: 46px;
+ padding: 10px 16px;
+ font-size: 18px;
+ line-height: 1.3333333;
+ border-radius: 6px;
+}
+.form-group-lg select.form-control {
+ height: 46px;
+ line-height: 46px;
+}
+.form-group-lg textarea.form-control,
+.form-group-lg select[multiple].form-control {
+ height: auto;
+}
+.form-group-lg .form-control-static {
+ height: 46px;
+ min-height: 38px;
+ padding: 11px 16px;
+ font-size: 18px;
+ line-height: 1.3333333;
+}
+.has-feedback {
+ position: relative;
+}
+.has-feedback .form-control {
+ padding-right: 42.5px;
+}
+.form-control-feedback {
+ position: absolute;
+ top: 0;
+ right: 0;
+ z-index: 2;
+ display: block;
+ width: 34px;
+ height: 34px;
+ line-height: 34px;
+ text-align: center;
+ pointer-events: none;
+}
+.input-lg + .form-control-feedback,
+.input-group-lg + .form-control-feedback,
+.form-group-lg .form-control + .form-control-feedback {
+ width: 46px;
+ height: 46px;
+ line-height: 46px;
+}
+.input-sm + .form-control-feedback,
+.input-group-sm + .form-control-feedback,
+.form-group-sm .form-control + .form-control-feedback {
+ width: 30px;
+ height: 30px;
+ line-height: 30px;
+}
+.has-success .help-block,
+.has-success .control-label,
+.has-success .radio,
+.has-success .checkbox,
+.has-success .radio-inline,
+.has-success .checkbox-inline,
+.has-success.radio label,
+.has-success.checkbox label,
+.has-success.radio-inline label,
+.has-success.checkbox-inline label {
+ color: #3c763d;
+}
+.has-success .form-control {
+ border-color: #3c763d;
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
+}
+.has-success .form-control:focus {
+ border-color: #2b542c;
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #67b168;
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #67b168;
+}
+.has-success .input-group-addon {
+ color: #3c763d;
+ background-color: #dff0d8;
+ border-color: #3c763d;
+}
+.has-success .form-control-feedback {
+ color: #3c763d;
+}
+.has-warning .help-block,
+.has-warning .control-label,
+.has-warning .radio,
+.has-warning .checkbox,
+.has-warning .radio-inline,
+.has-warning .checkbox-inline,
+.has-warning.radio label,
+.has-warning.checkbox label,
+.has-warning.radio-inline label,
+.has-warning.checkbox-inline label {
+ color: #8a6d3b;
+}
+.has-warning .form-control {
+ border-color: #8a6d3b;
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
+}
+.has-warning .form-control:focus {
+ border-color: #66512c;
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #c0a16b;
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #c0a16b;
+}
+.has-warning .input-group-addon {
+ color: #8a6d3b;
+ background-color: #fcf8e3;
+ border-color: #8a6d3b;
+}
+.has-warning .form-control-feedback {
+ color: #8a6d3b;
+}
+.has-error .help-block,
+.has-error .control-label,
+.has-error .radio,
+.has-error .checkbox,
+.has-error .radio-inline,
+.has-error .checkbox-inline,
+.has-error.radio label,
+.has-error.checkbox label,
+.has-error.radio-inline label,
+.has-error.checkbox-inline label {
+ color: #a94442;
+}
+.has-error .form-control {
+ border-color: #a94442;
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075);
+}
+.has-error .form-control:focus {
+ border-color: #843534;
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #ce8483;
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075), 0 0 6px #ce8483;
+}
+.has-error .input-group-addon {
+ color: #a94442;
+ background-color: #f2dede;
+ border-color: #a94442;
+}
+.has-error .form-control-feedback {
+ color: #a94442;
+}
+.has-feedback label ~ .form-control-feedback {
+ top: 25px;
+}
+.has-feedback label.sr-only ~ .form-control-feedback {
+ top: 0;
+}
+.help-block {
+ display: block;
+ margin-top: 5px;
+ margin-bottom: 10px;
+ color: #737373;
+}
+@media (min-width: 768px) {
+ .form-inline .form-group {
+ display: inline-block;
+ margin-bottom: 0;
+ vertical-align: middle;
+ }
+ .form-inline .form-control {
+ display: inline-block;
+ width: auto;
+ vertical-align: middle;
+ }
+ .form-inline .form-control-static {
+ display: inline-block;
+ }
+ .form-inline .input-group {
+ display: inline-table;
+ vertical-align: middle;
+ }
+ .form-inline .input-group .input-group-addon,
+ .form-inline .input-group .input-group-btn,
+ .form-inline .input-group .form-control {
+ width: auto;
+ }
+ .form-inline .input-group > .form-control {
+ width: 100%;
+ }
+ .form-inline .control-label {
+ margin-bottom: 0;
+ vertical-align: middle;
+ }
+ .form-inline .radio,
+ .form-inline .checkbox {
+ display: inline-block;
+ margin-top: 0;
+ margin-bottom: 0;
+ vertical-align: middle;
+ }
+ .form-inline .radio label,
+ .form-inline .checkbox label {
+ padding-left: 0;
+ }
+ .form-inline .radio input[type="radio"],
+ .form-inline .checkbox input[type="checkbox"] {
+ position: relative;
+ margin-left: 0;
+ }
+ .form-inline .has-feedback .form-control-feedback {
+ top: 0;
+ }
+}
+.form-horizontal .radio,
+.form-horizontal .checkbox,
+.form-horizontal .radio-inline,
+.form-horizontal .checkbox-inline {
+ padding-top: 7px;
+ margin-top: 0;
+ margin-bottom: 0;
+}
+.form-horizontal .radio,
+.form-horizontal .checkbox {
+ min-height: 27px;
+}
+.form-horizontal .form-group {
+ margin-right: -15px;
+ margin-left: -15px;
+}
+@media (min-width: 768px) {
+ .form-horizontal .control-label {
+ padding-top: 7px;
+ margin-bottom: 0;
+ text-align: right;
+ }
+}
+.form-horizontal .has-feedback .form-control-feedback {
+ right: 15px;
+}
+@media (min-width: 768px) {
+ .form-horizontal .form-group-lg .control-label {
+ padding-top: 11px;
+ font-size: 18px;
+ }
+}
+@media (min-width: 768px) {
+ .form-horizontal .form-group-sm .control-label {
+ padding-top: 6px;
+ font-size: 12px;
+ }
+}
+.btn {
+ display: inline-block;
+ padding: 6px 12px;
+ margin-bottom: 0;
+ font-size: 14px;
+ font-weight: normal;
+ line-height: 1.42857143;
+ text-align: center;
+ white-space: nowrap;
+ vertical-align: middle;
+ -ms-touch-action: manipulation;
+ touch-action: manipulation;
+ cursor: pointer;
+ -webkit-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+ background-image: none;
+ border: 1px solid transparent;
+ border-radius: 4px;
+}
+.btn:focus,
+.btn:active:focus,
+.btn.active:focus,
+.btn.focus,
+.btn:active.focus,
+.btn.active.focus {
+ outline: thin dotted;
+ outline: 5px auto -webkit-focus-ring-color;
+ outline-offset: -2px;
+}
+.btn:hover,
+.btn:focus,
+.btn.focus {
+ color: #333;
+ text-decoration: none;
+}
+.btn:active,
+.btn.active {
+ background-image: none;
+ outline: 0;
+ -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
+ box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
+}
+.btn.disabled,
+.btn[disabled],
+fieldset[disabled] .btn {
+ cursor: not-allowed;
+ filter: alpha(opacity=65);
+ -webkit-box-shadow: none;
+ box-shadow: none;
+ opacity: .65;
+}
+a.btn.disabled,
+fieldset[disabled] a.btn {
+ pointer-events: none;
+}
+.btn-default {
+ color: #333;
+ background-color: #fff;
+ border-color: #ccc;
+}
+.btn-default:focus,
+.btn-default.focus {
+ color: #333;
+ background-color: #e6e6e6;
+ border-color: #8c8c8c;
+}
+.btn-default:hover {
+ color: #333;
+ background-color: #e6e6e6;
+ border-color: #adadad;
+}
+.btn-default:active,
+.btn-default.active,
+.open > .dropdown-toggle.btn-default {
+ color: #333;
+ background-color: #e6e6e6;
+ border-color: #adadad;
+}
+.btn-default:active:hover,
+.btn-default.active:hover,
+.open > .dropdown-toggle.btn-default:hover,
+.btn-default:active:focus,
+.btn-default.active:focus,
+.open > .dropdown-toggle.btn-default:focus,
+.btn-default:active.focus,
+.btn-default.active.focus,
+.open > .dropdown-toggle.btn-default.focus {
+ color: #333;
+ background-color: #d4d4d4;
+ border-color: #8c8c8c;
+}
+.btn-default:active,
+.btn-default.active,
+.open > .dropdown-toggle.btn-default {
+ background-image: none;
+}
+.btn-default.disabled:hover,
+.btn-default[disabled]:hover,
+fieldset[disabled] .btn-default:hover,
+.btn-default.disabled:focus,
+.btn-default[disabled]:focus,
+fieldset[disabled] .btn-default:focus,
+.btn-default.disabled.focus,
+.btn-default[disabled].focus,
+fieldset[disabled] .btn-default.focus {
+ background-color: #fff;
+ border-color: #ccc;
+}
+.btn-default .badge {
+ color: #fff;
+ background-color: #333;
+}
+.btn-primary {
+ color: #fff;
+ background-color: #337ab7;
+ border-color: #2e6da4;
+}
+.btn-primary:focus,
+.btn-primary.focus {
+ color: #fff;
+ background-color: #286090;
+ border-color: #122b40;
+}
+.btn-primary:hover {
+ color: #fff;
+ background-color: #286090;
+ border-color: #204d74;
+}
+.btn-primary:active,
+.btn-primary.active,
+.open > .dropdown-toggle.btn-primary {
+ color: #fff;
+ background-color: #286090;
+ border-color: #204d74;
+}
+.btn-primary:active:hover,
+.btn-primary.active:hover,
+.open > .dropdown-toggle.btn-primary:hover,
+.btn-primary:active:focus,
+.btn-primary.active:focus,
+.open > .dropdown-toggle.btn-primary:focus,
+.btn-primary:active.focus,
+.btn-primary.active.focus,
+.open > .dropdown-toggle.btn-primary.focus {
+ color: #fff;
+ background-color: #204d74;
+ border-color: #122b40;
+}
+.btn-primary:active,
+.btn-primary.active,
+.open > .dropdown-toggle.btn-primary {
+ background-image: none;
+}
+.btn-primary.disabled:hover,
+.btn-primary[disabled]:hover,
+fieldset[disabled] .btn-primary:hover,
+.btn-primary.disabled:focus,
+.btn-primary[disabled]:focus,
+fieldset[disabled] .btn-primary:focus,
+.btn-primary.disabled.focus,
+.btn-primary[disabled].focus,
+fieldset[disabled] .btn-primary.focus {
+ background-color: #337ab7;
+ border-color: #2e6da4;
+}
+.btn-primary .badge {
+ color: #337ab7;
+ background-color: #fff;
+}
+.btn-success {
+ color: #fff;
+ background-color: #5cb85c;
+ border-color: #4cae4c;
+}
+.btn-success:focus,
+.btn-success.focus {
+ color: #fff;
+ background-color: #449d44;
+ border-color: #255625;
+}
+.btn-success:hover {
+ color: #fff;
+ background-color: #449d44;
+ border-color: #398439;
+}
+.btn-success:active,
+.btn-success.active,
+.open > .dropdown-toggle.btn-success {
+ color: #fff;
+ background-color: #449d44;
+ border-color: #398439;
+}
+.btn-success:active:hover,
+.btn-success.active:hover,
+.open > .dropdown-toggle.btn-success:hover,
+.btn-success:active:focus,
+.btn-success.active:focus,
+.open > .dropdown-toggle.btn-success:focus,
+.btn-success:active.focus,
+.btn-success.active.focus,
+.open > .dropdown-toggle.btn-success.focus {
+ color: #fff;
+ background-color: #398439;
+ border-color: #255625;
+}
+.btn-success:active,
+.btn-success.active,
+.open > .dropdown-toggle.btn-success {
+ background-image: none;
+}
+.btn-success.disabled:hover,
+.btn-success[disabled]:hover,
+fieldset[disabled] .btn-success:hover,
+.btn-success.disabled:focus,
+.btn-success[disabled]:focus,
+fieldset[disabled] .btn-success:focus,
+.btn-success.disabled.focus,
+.btn-success[disabled].focus,
+fieldset[disabled] .btn-success.focus {
+ background-color: #5cb85c;
+ border-color: #4cae4c;
+}
+.btn-success .badge {
+ color: #5cb85c;
+ background-color: #fff;
+}
+.btn-info {
+ color: #fff;
+ background-color: #5bc0de;
+ border-color: #46b8da;
+}
+.btn-info:focus,
+.btn-info.focus {
+ color: #fff;
+ background-color: #31b0d5;
+ border-color: #1b6d85;
+}
+.btn-info:hover {
+ color: #fff;
+ background-color: #31b0d5;
+ border-color: #269abc;
+}
+.btn-info:active,
+.btn-info.active,
+.open > .dropdown-toggle.btn-info {
+ color: #fff;
+ background-color: #31b0d5;
+ border-color: #269abc;
+}
+.btn-info:active:hover,
+.btn-info.active:hover,
+.open > .dropdown-toggle.btn-info:hover,
+.btn-info:active:focus,
+.btn-info.active:focus,
+.open > .dropdown-toggle.btn-info:focus,
+.btn-info:active.focus,
+.btn-info.active.focus,
+.open > .dropdown-toggle.btn-info.focus {
+ color: #fff;
+ background-color: #269abc;
+ border-color: #1b6d85;
+}
+.btn-info:active,
+.btn-info.active,
+.open > .dropdown-toggle.btn-info {
+ background-image: none;
+}
+.btn-info.disabled:hover,
+.btn-info[disabled]:hover,
+fieldset[disabled] .btn-info:hover,
+.btn-info.disabled:focus,
+.btn-info[disabled]:focus,
+fieldset[disabled] .btn-info:focus,
+.btn-info.disabled.focus,
+.btn-info[disabled].focus,
+fieldset[disabled] .btn-info.focus {
+ background-color: #5bc0de;
+ border-color: #46b8da;
+}
+.btn-info .badge {
+ color: #5bc0de;
+ background-color: #fff;
+}
+.btn-warning {
+ color: #fff;
+ background-color: #f0ad4e;
+ border-color: #eea236;
+}
+.btn-warning:focus,
+.btn-warning.focus {
+ color: #fff;
+ background-color: #ec971f;
+ border-color: #985f0d;
+}
+.btn-warning:hover {
+ color: #fff;
+ background-color: #ec971f;
+ border-color: #d58512;
+}
+.btn-warning:active,
+.btn-warning.active,
+.open > .dropdown-toggle.btn-warning {
+ color: #fff;
+ background-color: #ec971f;
+ border-color: #d58512;
+}
+.btn-warning:active:hover,
+.btn-warning.active:hover,
+.open > .dropdown-toggle.btn-warning:hover,
+.btn-warning:active:focus,
+.btn-warning.active:focus,
+.open > .dropdown-toggle.btn-warning:focus,
+.btn-warning:active.focus,
+.btn-warning.active.focus,
+.open > .dropdown-toggle.btn-warning.focus {
+ color: #fff;
+ background-color: #d58512;
+ border-color: #985f0d;
+}
+.btn-warning:active,
+.btn-warning.active,
+.open > .dropdown-toggle.btn-warning {
+ background-image: none;
+}
+.btn-warning.disabled:hover,
+.btn-warning[disabled]:hover,
+fieldset[disabled] .btn-warning:hover,
+.btn-warning.disabled:focus,
+.btn-warning[disabled]:focus,
+fieldset[disabled] .btn-warning:focus,
+.btn-warning.disabled.focus,
+.btn-warning[disabled].focus,
+fieldset[disabled] .btn-warning.focus {
+ background-color: #f0ad4e;
+ border-color: #eea236;
+}
+.btn-warning .badge {
+ color: #f0ad4e;
+ background-color: #fff;
+}
+.btn-danger {
+ color: #fff;
+ background-color: #d9534f;
+ border-color: #d43f3a;
+}
+.btn-danger:focus,
+.btn-danger.focus {
+ color: #fff;
+ background-color: #c9302c;
+ border-color: #761c19;
+}
+.btn-danger:hover {
+ color: #fff;
+ background-color: #c9302c;
+ border-color: #ac2925;
+}
+.btn-danger:active,
+.btn-danger.active,
+.open > .dropdown-toggle.btn-danger {
+ color: #fff;
+ background-color: #c9302c;
+ border-color: #ac2925;
+}
+.btn-danger:active:hover,
+.btn-danger.active:hover,
+.open > .dropdown-toggle.btn-danger:hover,
+.btn-danger:active:focus,
+.btn-danger.active:focus,
+.open > .dropdown-toggle.btn-danger:focus,
+.btn-danger:active.focus,
+.btn-danger.active.focus,
+.open > .dropdown-toggle.btn-danger.focus {
+ color: #fff;
+ background-color: #ac2925;
+ border-color: #761c19;
+}
+.btn-danger:active,
+.btn-danger.active,
+.open > .dropdown-toggle.btn-danger {
+ background-image: none;
+}
+.btn-danger.disabled:hover,
+.btn-danger[disabled]:hover,
+fieldset[disabled] .btn-danger:hover,
+.btn-danger.disabled:focus,
+.btn-danger[disabled]:focus,
+fieldset[disabled] .btn-danger:focus,
+.btn-danger.disabled.focus,
+.btn-danger[disabled].focus,
+fieldset[disabled] .btn-danger.focus {
+ background-color: #d9534f;
+ border-color: #d43f3a;
+}
+.btn-danger .badge {
+ color: #d9534f;
+ background-color: #fff;
+}
+.btn-link {
+ font-weight: normal;
+ color: #337ab7;
+ border-radius: 0;
+}
+.btn-link,
+.btn-link:active,
+.btn-link.active,
+.btn-link[disabled],
+fieldset[disabled] .btn-link {
+ background-color: transparent;
+ -webkit-box-shadow: none;
+ box-shadow: none;
+}
+.btn-link,
+.btn-link:hover,
+.btn-link:focus,
+.btn-link:active {
+ border-color: transparent;
+}
+.btn-link:hover,
+.btn-link:focus {
+ color: #23527c;
+ text-decoration: underline;
+ background-color: transparent;
+}
+.btn-link[disabled]:hover,
+fieldset[disabled] .btn-link:hover,
+.btn-link[disabled]:focus,
+fieldset[disabled] .btn-link:focus {
+ color: #777;
+ text-decoration: none;
+}
+.btn-lg,
+.btn-group-lg > .btn {
+ padding: 10px 16px;
+ font-size: 18px;
+ line-height: 1.3333333;
+ border-radius: 6px;
+}
+.btn-sm,
+.btn-group-sm > .btn {
+ padding: 5px 10px;
+ font-size: 12px;
+ line-height: 1.5;
+ border-radius: 3px;
+}
+.btn-xs,
+.btn-group-xs > .btn {
+ padding: 1px 5px;
+ font-size: 12px;
+ line-height: 1.5;
+ border-radius: 3px;
+}
+.btn-block {
+ display: block;
+ width: 100%;
+}
+.btn-block + .btn-block {
+ margin-top: 5px;
+}
+input[type="submit"].btn-block,
+input[type="reset"].btn-block,
+input[type="button"].btn-block {
+ width: 100%;
+}
+.fade {
+ opacity: 0;
+ -webkit-transition: opacity .15s linear;
+ -o-transition: opacity .15s linear;
+ transition: opacity .15s linear;
+}
+.fade.in {
+ opacity: 1;
+}
+.collapse {
+ display: none;
+}
+.collapse.in {
+ display: block;
+}
+tr.collapse.in {
+ display: table-row;
+}
+tbody.collapse.in {
+ display: table-row-group;
+}
+.collapsing {
+ position: relative;
+ height: 0;
+ overflow: hidden;
+ -webkit-transition-timing-function: ease;
+ -o-transition-timing-function: ease;
+ transition-timing-function: ease;
+ -webkit-transition-duration: .35s;
+ -o-transition-duration: .35s;
+ transition-duration: .35s;
+ -webkit-transition-property: height, visibility;
+ -o-transition-property: height, visibility;
+ transition-property: height, visibility;
+}
+.caret {
+ display: inline-block;
+ width: 0;
+ height: 0;
+ margin-left: 2px;
+ vertical-align: middle;
+ border-top: 4px dashed;
+ border-top: 4px solid \9;
+ border-right: 4px solid transparent;
+ border-left: 4px solid transparent;
+}
+.dropup,
+.dropdown {
+ position: relative;
+}
+.dropdown-toggle:focus {
+ outline: 0;
+}
+.dropdown-menu {
+ position: absolute;
+ top: 100%;
+ left: 0;
+ z-index: 1000;
+ display: none;
+ float: left;
+ min-width: 160px;
+ padding: 5px 0;
+ margin: 2px 0 0;
+ font-size: 14px;
+ text-align: left;
+ list-style: none;
+ background-color: #fff;
+ -webkit-background-clip: padding-box;
+ background-clip: padding-box;
+ border: 1px solid #ccc;
+ border: 1px solid rgba(0, 0, 0, .15);
+ border-radius: 4px;
+ -webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, .175);
+ box-shadow: 0 6px 12px rgba(0, 0, 0, .175);
+}
+.dropdown-menu.pull-right {
+ right: 0;
+ left: auto;
+}
+.dropdown-menu .divider {
+ height: 1px;
+ margin: 9px 0;
+ overflow: hidden;
+ background-color: #e5e5e5;
+}
+.dropdown-menu > li > a {
+ display: block;
+ padding: 3px 20px;
+ clear: both;
+ font-weight: normal;
+ line-height: 1.42857143;
+ color: #333;
+ white-space: nowrap;
+}
+.dropdown-menu > li > a:hover,
+.dropdown-menu > li > a:focus {
+ color: #262626;
+ text-decoration: none;
+ background-color: #f5f5f5;
+}
+.dropdown-menu > .active > a,
+.dropdown-menu > .active > a:hover,
+.dropdown-menu > .active > a:focus {
+ color: #fff;
+ text-decoration: none;
+ background-color: #337ab7;
+ outline: 0;
+}
+.dropdown-menu > .disabled > a,
+.dropdown-menu > .disabled > a:hover,
+.dropdown-menu > .disabled > a:focus {
+ color: #777;
+}
+.dropdown-menu > .disabled > a:hover,
+.dropdown-menu > .disabled > a:focus {
+ text-decoration: none;
+ cursor: not-allowed;
+ background-color: transparent;
+ background-image: none;
+ filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
+}
+.open > .dropdown-menu {
+ display: block;
+}
+.open > a {
+ outline: 0;
+}
+.dropdown-menu-right {
+ right: 0;
+ left: auto;
+}
+.dropdown-menu-left {
+ right: auto;
+ left: 0;
+}
+.dropdown-header {
+ display: block;
+ padding: 3px 20px;
+ font-size: 12px;
+ line-height: 1.42857143;
+ color: #777;
+ white-space: nowrap;
+}
+.dropdown-backdrop {
+ position: fixed;
+ top: 0;
+ right: 0;
+ bottom: 0;
+ left: 0;
+ z-index: 990;
+}
+.pull-right > .dropdown-menu {
+ right: 0;
+ left: auto;
+}
+.dropup .caret,
+.navbar-fixed-bottom .dropdown .caret {
+ content: "";
+ border-top: 0;
+ border-bottom: 4px dashed;
+ border-bottom: 4px solid \9;
+}
+.dropup .dropdown-menu,
+.navbar-fixed-bottom .dropdown .dropdown-menu {
+ top: auto;
+ bottom: 100%;
+ margin-bottom: 2px;
+}
+@media (min-width: 768px) {
+ .navbar-right .dropdown-menu {
+ right: 0;
+ left: auto;
+ }
+ .navbar-right .dropdown-menu-left {
+ right: auto;
+ left: 0;
+ }
+}
+.btn-group,
+.btn-group-vertical {
+ position: relative;
+ display: inline-block;
+ vertical-align: middle;
+}
+.btn-group > .btn,
+.btn-group-vertical > .btn {
+ position: relative;
+ float: left;
+}
+.btn-group > .btn:hover,
+.btn-group-vertical > .btn:hover,
+.btn-group > .btn:focus,
+.btn-group-vertical > .btn:focus,
+.btn-group > .btn:active,
+.btn-group-vertical > .btn:active,
+.btn-group > .btn.active,
+.btn-group-vertical > .btn.active {
+ z-index: 2;
+}
+.btn-group .btn + .btn,
+.btn-group .btn + .btn-group,
+.btn-group .btn-group + .btn,
+.btn-group .btn-group + .btn-group {
+ margin-left: -1px;
+}
+.btn-toolbar {
+ margin-left: -5px;
+}
+.btn-toolbar .btn,
+.btn-toolbar .btn-group,
+.btn-toolbar .input-group {
+ float: left;
+}
+.btn-toolbar > .btn,
+.btn-toolbar > .btn-group,
+.btn-toolbar > .input-group {
+ margin-left: 5px;
+}
+.btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) {
+ border-radius: 0;
+}
+.btn-group > .btn:first-child {
+ margin-left: 0;
+}
+.btn-group > .btn:first-child:not(:last-child):not(.dropdown-toggle) {
+ border-top-right-radius: 0;
+ border-bottom-right-radius: 0;
+}
+.btn-group > .btn:last-child:not(:first-child),
+.btn-group > .dropdown-toggle:not(:first-child) {
+ border-top-left-radius: 0;
+ border-bottom-left-radius: 0;
+}
+.btn-group > .btn-group {
+ float: left;
+}
+.btn-group > .btn-group:not(:first-child):not(:last-child) > .btn {
+ border-radius: 0;
+}
+.btn-group > .btn-group:first-child:not(:last-child) > .btn:last-child,
+.btn-group > .btn-group:first-child:not(:last-child) > .dropdown-toggle {
+ border-top-right-radius: 0;
+ border-bottom-right-radius: 0;
+}
+.btn-group > .btn-group:last-child:not(:first-child) > .btn:first-child {
+ border-top-left-radius: 0;
+ border-bottom-left-radius: 0;
+}
+.btn-group .dropdown-toggle:active,
+.btn-group.open .dropdown-toggle {
+ outline: 0;
+}
+.btn-group > .btn + .dropdown-toggle {
+ padding-right: 8px;
+ padding-left: 8px;
+}
+.btn-group > .btn-lg + .dropdown-toggle {
+ padding-right: 12px;
+ padding-left: 12px;
+}
+.btn-group.open .dropdown-toggle {
+ -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
+ box-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
+}
+.btn-group.open .dropdown-toggle.btn-link {
+ -webkit-box-shadow: none;
+ box-shadow: none;
+}
+.btn .caret {
+ margin-left: 0;
+}
+.btn-lg .caret {
+ border-width: 5px 5px 0;
+ border-bottom-width: 0;
+}
+.dropup .btn-lg .caret {
+ border-width: 0 5px 5px;
+}
+.btn-group-vertical > .btn,
+.btn-group-vertical > .btn-group,
+.btn-group-vertical > .btn-group > .btn {
+ display: block;
+ float: none;
+ width: 100%;
+ max-width: 100%;
+}
+.btn-group-vertical > .btn-group > .btn {
+ float: none;
+}
+.btn-group-vertical > .btn + .btn,
+.btn-group-vertical > .btn + .btn-group,
+.btn-group-vertical > .btn-group + .btn,
+.btn-group-vertical > .btn-group + .btn-group {
+ margin-top: -1px;
+ margin-left: 0;
+}
+.btn-group-vertical > .btn:not(:first-child):not(:last-child) {
+ border-radius: 0;
+}
+.btn-group-vertical > .btn:first-child:not(:last-child) {
+ border-top-left-radius: 4px;
+ border-top-right-radius: 4px;
+ border-bottom-right-radius: 0;
+ border-bottom-left-radius: 0;
+}
+.btn-group-vertical > .btn:last-child:not(:first-child) {
+ border-top-left-radius: 0;
+ border-top-right-radius: 0;
+ border-bottom-right-radius: 4px;
+ border-bottom-left-radius: 4px;
+}
+.btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn {
+ border-radius: 0;
+}
+.btn-group-vertical > .btn-group:first-child:not(:last-child) > .btn:last-child,
+.btn-group-vertical > .btn-group:first-child:not(:last-child) > .dropdown-toggle {
+ border-bottom-right-radius: 0;
+ border-bottom-left-radius: 0;
+}
+.btn-group-vertical > .btn-group:last-child:not(:first-child) > .btn:first-child {
+ border-top-left-radius: 0;
+ border-top-right-radius: 0;
+}
+.btn-group-justified {
+ display: table;
+ width: 100%;
+ table-layout: fixed;
+ border-collapse: separate;
+}
+.btn-group-justified > .btn,
+.btn-group-justified > .btn-group {
+ display: table-cell;
+ float: none;
+ width: 1%;
+}
+.btn-group-justified > .btn-group .btn {
+ width: 100%;
+}
+.btn-group-justified > .btn-group .dropdown-menu {
+ left: auto;
+}
+[data-toggle="buttons"] > .btn input[type="radio"],
+[data-toggle="buttons"] > .btn-group > .btn input[type="radio"],
+[data-toggle="buttons"] > .btn input[type="checkbox"],
+[data-toggle="buttons"] > .btn-group > .btn input[type="checkbox"] {
+ position: absolute;
+ clip: rect(0, 0, 0, 0);
+ pointer-events: none;
+}
+.input-group {
+ position: relative;
+ display: table;
+ border-collapse: separate;
+}
+.input-group[class*="col-"] {
+ float: none;
+ padding-right: 0;
+ padding-left: 0;
+}
+.input-group .form-control {
+ position: relative;
+ z-index: 2;
+ float: left;
+ width: 100%;
+ margin-bottom: 0;
+}
+.input-group .form-control:focus {
+ z-index: 3;
+}
+.input-group-lg > .form-control,
+.input-group-lg > .input-group-addon,
+.input-group-lg > .input-group-btn > .btn {
+ height: 46px;
+ padding: 10px 16px;
+ font-size: 18px;
+ line-height: 1.3333333;
+ border-radius: 6px;
+}
+select.input-group-lg > .form-control,
+select.input-group-lg > .input-group-addon,
+select.input-group-lg > .input-group-btn > .btn {
+ height: 46px;
+ line-height: 46px;
+}
+textarea.input-group-lg > .form-control,
+textarea.input-group-lg > .input-group-addon,
+textarea.input-group-lg > .input-group-btn > .btn,
+select[multiple].input-group-lg > .form-control,
+select[multiple].input-group-lg > .input-group-addon,
+select[multiple].input-group-lg > .input-group-btn > .btn {
+ height: auto;
+}
+.input-group-sm > .form-control,
+.input-group-sm > .input-group-addon,
+.input-group-sm > .input-group-btn > .btn {
+ height: 30px;
+ padding: 5px 10px;
+ font-size: 12px;
+ line-height: 1.5;
+ border-radius: 3px;
+}
+select.input-group-sm > .form-control,
+select.input-group-sm > .input-group-addon,
+select.input-group-sm > .input-group-btn > .btn {
+ height: 30px;
+ line-height: 30px;
+}
+textarea.input-group-sm > .form-control,
+textarea.input-group-sm > .input-group-addon,
+textarea.input-group-sm > .input-group-btn > .btn,
+select[multiple].input-group-sm > .form-control,
+select[multiple].input-group-sm > .input-group-addon,
+select[multiple].input-group-sm > .input-group-btn > .btn {
+ height: auto;
+}
+.input-group-addon,
+.input-group-btn,
+.input-group .form-control {
+ display: table-cell;
+}
+.input-group-addon:not(:first-child):not(:last-child),
+.input-group-btn:not(:first-child):not(:last-child),
+.input-group .form-control:not(:first-child):not(:last-child) {
+ border-radius: 0;
+}
+.input-group-addon,
+.input-group-btn {
+ width: 1%;
+ white-space: nowrap;
+ vertical-align: middle;
+}
+.input-group-addon {
+ padding: 6px 12px;
+ font-size: 14px;
+ font-weight: normal;
+ line-height: 1;
+ color: #555;
+ text-align: center;
+ background-color: #eee;
+ border: 1px solid #ccc;
+ border-radius: 4px;
+}
+.input-group-addon.input-sm {
+ padding: 5px 10px;
+ font-size: 12px;
+ border-radius: 3px;
+}
+.input-group-addon.input-lg {
+ padding: 10px 16px;
+ font-size: 18px;
+ border-radius: 6px;
+}
+.input-group-addon input[type="radio"],
+.input-group-addon input[type="checkbox"] {
+ margin-top: 0;
+}
+.input-group .form-control:first-child,
+.input-group-addon:first-child,
+.input-group-btn:first-child > .btn,
+.input-group-btn:first-child > .btn-group > .btn,
+.input-group-btn:first-child > .dropdown-toggle,
+.input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle),
+.input-group-btn:last-child > .btn-group:not(:last-child) > .btn {
+ border-top-right-radius: 0;
+ border-bottom-right-radius: 0;
+}
+.input-group-addon:first-child {
+ border-right: 0;
+}
+.input-group .form-control:last-child,
+.input-group-addon:last-child,
+.input-group-btn:last-child > .btn,
+.input-group-btn:last-child > .btn-group > .btn,
+.input-group-btn:last-child > .dropdown-toggle,
+.input-group-btn:first-child > .btn:not(:first-child),
+.input-group-btn:first-child > .btn-group:not(:first-child) > .btn {
+ border-top-left-radius: 0;
+ border-bottom-left-radius: 0;
+}
+.input-group-addon:last-child {
+ border-left: 0;
+}
+.input-group-btn {
+ position: relative;
+ font-size: 0;
+ white-space: nowrap;
+}
+.input-group-btn > .btn {
+ position: relative;
+}
+.input-group-btn > .btn + .btn {
+ margin-left: -1px;
+}
+.input-group-btn > .btn:hover,
+.input-group-btn > .btn:focus,
+.input-group-btn > .btn:active {
+ z-index: 2;
+}
+.input-group-btn:first-child > .btn,
+.input-group-btn:first-child > .btn-group {
+ margin-right: -1px;
+}
+.input-group-btn:last-child > .btn,
+.input-group-btn:last-child > .btn-group {
+ z-index: 2;
+ margin-left: -1px;
+}
+.nav {
+ padding-left: 0;
+ margin-bottom: 0;
+ list-style: none;
+}
+.nav > li {
+ position: relative;
+ display: block;
+}
+.nav > li > a {
+ position: relative;
+ display: block;
+ padding: 10px 15px;
+}
+.nav > li > a:hover,
+.nav > li > a:focus {
+ text-decoration: none;
+ background-color: #eee;
+}
+.nav > li.disabled > a {
+ color: #777;
+}
+.nav > li.disabled > a:hover,
+.nav > li.disabled > a:focus {
+ color: #777;
+ text-decoration: none;
+ cursor: not-allowed;
+ background-color: transparent;
+}
+.nav .open > a,
+.nav .open > a:hover,
+.nav .open > a:focus {
+ background-color: #eee;
+ border-color: #337ab7;
+}
+.nav .nav-divider {
+ height: 1px;
+ margin: 9px 0;
+ overflow: hidden;
+ background-color: #e5e5e5;
+}
+.nav > li > a > img {
+ max-width: none;
+}
+.nav-tabs {
+ border-bottom: 1px solid #ddd;
+}
+.nav-tabs > li {
+ float: left;
+ margin-bottom: -1px;
+}
+.nav-tabs > li > a {
+ margin-right: 2px;
+ line-height: 1.42857143;
+ border: 1px solid transparent;
+ border-radius: 4px 4px 0 0;
+}
+.nav-tabs > li > a:hover {
+ border-color: #eee #eee #ddd;
+}
+.nav-tabs > li.active > a,
+.nav-tabs > li.active > a:hover,
+.nav-tabs > li.active > a:focus {
+ color: #555;
+ cursor: default;
+ background-color: #fff;
+ border: 1px solid #ddd;
+ border-bottom-color: transparent;
+}
+.nav-tabs.nav-justified {
+ width: 100%;
+ border-bottom: 0;
+}
+.nav-tabs.nav-justified > li {
+ float: none;
+}
+.nav-tabs.nav-justified > li > a {
+ margin-bottom: 5px;
+ text-align: center;
+}
+.nav-tabs.nav-justified > .dropdown .dropdown-menu {
+ top: auto;
+ left: auto;
+}
+@media (min-width: 768px) {
+ .nav-tabs.nav-justified > li {
+ display: table-cell;
+ width: 1%;
+ }
+ .nav-tabs.nav-justified > li > a {
+ margin-bottom: 0;
+ }
+}
+.nav-tabs.nav-justified > li > a {
+ margin-right: 0;
+ border-radius: 4px;
+}
+.nav-tabs.nav-justified > .active > a,
+.nav-tabs.nav-justified > .active > a:hover,
+.nav-tabs.nav-justified > .active > a:focus {
+ border: 1px solid #ddd;
+}
+@media (min-width: 768px) {
+ .nav-tabs.nav-justified > li > a {
+ border-bottom: 1px solid #ddd;
+ border-radius: 4px 4px 0 0;
+ }
+ .nav-tabs.nav-justified > .active > a,
+ .nav-tabs.nav-justified > .active > a:hover,
+ .nav-tabs.nav-justified > .active > a:focus {
+ border-bottom-color: #fff;
+ }
+}
+.nav-pills > li {
+ float: left;
+}
+.nav-pills > li > a {
+ border-radius: 4px;
+}
+.nav-pills > li + li {
+ margin-left: 2px;
+}
+.nav-pills > li.active > a,
+.nav-pills > li.active > a:hover,
+.nav-pills > li.active > a:focus {
+ color: #fff;
+ background-color: #337ab7;
+}
+.nav-stacked > li {
+ float: none;
+}
+.nav-stacked > li + li {
+ margin-top: 2px;
+ margin-left: 0;
+}
+.nav-justified {
+ width: 100%;
+}
+.nav-justified > li {
+ float: none;
+}
+.nav-justified > li > a {
+ margin-bottom: 5px;
+ text-align: center;
+}
+.nav-justified > .dropdown .dropdown-menu {
+ top: auto;
+ left: auto;
+}
+@media (min-width: 768px) {
+ .nav-justified > li {
+ display: table-cell;
+ width: 1%;
+ }
+ .nav-justified > li > a {
+ margin-bottom: 0;
+ }
+}
+.nav-tabs-justified {
+ border-bottom: 0;
+}
+.nav-tabs-justified > li > a {
+ margin-right: 0;
+ border-radius: 4px;
+}
+.nav-tabs-justified > .active > a,
+.nav-tabs-justified > .active > a:hover,
+.nav-tabs-justified > .active > a:focus {
+ border: 1px solid #ddd;
+}
+@media (min-width: 768px) {
+ .nav-tabs-justified > li > a {
+ border-bottom: 1px solid #ddd;
+ border-radius: 4px 4px 0 0;
+ }
+ .nav-tabs-justified > .active > a,
+ .nav-tabs-justified > .active > a:hover,
+ .nav-tabs-justified > .active > a:focus {
+ border-bottom-color: #fff;
+ }
+}
+.tab-content > .tab-pane {
+ display: none;
+}
+.tab-content > .active {
+ display: block;
+}
+.nav-tabs .dropdown-menu {
+ margin-top: -1px;
+ border-top-left-radius: 0;
+ border-top-right-radius: 0;
+}
+.navbar {
+ position: relative;
+ min-height: 50px;
+ margin-bottom: 20px;
+ border: 1px solid transparent;
+}
+@media (min-width: 768px) {
+ .navbar {
+ border-radius: 4px;
+ }
+}
+@media (min-width: 768px) {
+ .navbar-header {
+ float: left;
+ }
+}
+.navbar-collapse {
+ padding-right: 15px;
+ padding-left: 15px;
+ overflow-x: visible;
+ -webkit-overflow-scrolling: touch;
+ border-top: 1px solid transparent;
+ -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1);
+ box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1);
+}
+.navbar-collapse.in {
+ overflow-y: auto;
+}
+@media (min-width: 768px) {
+ .navbar-collapse {
+ width: auto;
+ border-top: 0;
+ -webkit-box-shadow: none;
+ box-shadow: none;
+ }
+ .navbar-collapse.collapse {
+ display: block !important;
+ height: auto !important;
+ padding-bottom: 0;
+ overflow: visible !important;
+ }
+ .navbar-collapse.in {
+ overflow-y: visible;
+ }
+ .navbar-fixed-top .navbar-collapse,
+ .navbar-static-top .navbar-collapse,
+ .navbar-fixed-bottom .navbar-collapse {
+ padding-right: 0;
+ padding-left: 0;
+ }
+}
+.navbar-fixed-top .navbar-collapse,
+.navbar-fixed-bottom .navbar-collapse {
+ max-height: 340px;
+}
+@media (max-device-width: 480px) and (orientation: landscape) {
+ .navbar-fixed-top .navbar-collapse,
+ .navbar-fixed-bottom .navbar-collapse {
+ max-height: 200px;
+ }
+}
+.container > .navbar-header,
+.container-fluid > .navbar-header,
+.container > .navbar-collapse,
+.container-fluid > .navbar-collapse {
+ margin-right: -15px;
+ margin-left: -15px;
+}
+@media (min-width: 768px) {
+ .container > .navbar-header,
+ .container-fluid > .navbar-header,
+ .container > .navbar-collapse,
+ .container-fluid > .navbar-collapse {
+ margin-right: 0;
+ margin-left: 0;
+ }
+}
+.navbar-static-top {
+ z-index: 1000;
+ border-width: 0 0 1px;
+}
+@media (min-width: 768px) {
+ .navbar-static-top {
+ border-radius: 0;
+ }
+}
+.navbar-fixed-top,
+.navbar-fixed-bottom {
+ position: fixed;
+ right: 0;
+ left: 0;
+ z-index: 1030;
+}
+@media (min-width: 768px) {
+ .navbar-fixed-top,
+ .navbar-fixed-bottom {
+ border-radius: 0;
+ }
+}
+.navbar-fixed-top {
+ top: 0;
+ border-width: 0 0 1px;
+}
+.navbar-fixed-bottom {
+ bottom: 0;
+ margin-bottom: 0;
+ border-width: 1px 0 0;
+}
+.navbar-brand {
+ float: left;
+ height: 50px;
+ padding: 15px 15px;
+ font-size: 18px;
+ line-height: 20px;
+}
+.navbar-brand:hover,
+.navbar-brand:focus {
+ text-decoration: none;
+}
+.navbar-brand > img {
+ display: block;
+}
+@media (min-width: 768px) {
+ .navbar > .container .navbar-brand,
+ .navbar > .container-fluid .navbar-brand {
+ margin-left: -15px;
+ }
+}
+.navbar-toggle {
+ position: relative;
+ float: right;
+ padding: 9px 10px;
+ margin-top: 8px;
+ margin-right: 15px;
+ margin-bottom: 8px;
+ background-color: transparent;
+ background-image: none;
+ border: 1px solid transparent;
+ border-radius: 4px;
+}
+.navbar-toggle:focus {
+ outline: 0;
+}
+.navbar-toggle .icon-bar {
+ display: block;
+ width: 22px;
+ height: 2px;
+ border-radius: 1px;
+}
+.navbar-toggle .icon-bar + .icon-bar {
+ margin-top: 4px;
+}
+@media (min-width: 768px) {
+ .navbar-toggle {
+ display: none;
+ }
+}
+.navbar-nav {
+ margin: 7.5px -15px;
+}
+.navbar-nav > li > a {
+ padding-top: 10px;
+ padding-bottom: 10px;
+ line-height: 20px;
+}
+@media (max-width: 767px) {
+ .navbar-nav .open .dropdown-menu {
+ position: static;
+ float: none;
+ width: auto;
+ margin-top: 0;
+ background-color: transparent;
+ border: 0;
+ -webkit-box-shadow: none;
+ box-shadow: none;
+ }
+ .navbar-nav .open .dropdown-menu > li > a,
+ .navbar-nav .open .dropdown-menu .dropdown-header {
+ padding: 5px 15px 5px 25px;
+ }
+ .navbar-nav .open .dropdown-menu > li > a {
+ line-height: 20px;
+ }
+ .navbar-nav .open .dropdown-menu > li > a:hover,
+ .navbar-nav .open .dropdown-menu > li > a:focus {
+ background-image: none;
+ }
+}
+@media (min-width: 768px) {
+ .navbar-nav {
+ float: left;
+ margin: 0;
+ }
+ .navbar-nav > li {
+ float: left;
+ }
+ .navbar-nav > li > a {
+ padding-top: 15px;
+ padding-bottom: 15px;
+ }
+}
+.navbar-form {
+ padding: 10px 15px;
+ margin-top: 8px;
+ margin-right: -15px;
+ margin-bottom: 8px;
+ margin-left: -15px;
+ border-top: 1px solid transparent;
+ border-bottom: 1px solid transparent;
+ -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 1px 0 rgba(255, 255, 255, .1);
+ box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 1px 0 rgba(255, 255, 255, .1);
+}
+@media (min-width: 768px) {
+ .navbar-form .form-group {
+ display: inline-block;
+ margin-bottom: 0;
+ vertical-align: middle;
+ }
+ .navbar-form .form-control {
+ display: inline-block;
+ width: auto;
+ vertical-align: middle;
+ }
+ .navbar-form .form-control-static {
+ display: inline-block;
+ }
+ .navbar-form .input-group {
+ display: inline-table;
+ vertical-align: middle;
+ }
+ .navbar-form .input-group .input-group-addon,
+ .navbar-form .input-group .input-group-btn,
+ .navbar-form .input-group .form-control {
+ width: auto;
+ }
+ .navbar-form .input-group > .form-control {
+ width: 100%;
+ }
+ .navbar-form .control-label {
+ margin-bottom: 0;
+ vertical-align: middle;
+ }
+ .navbar-form .radio,
+ .navbar-form .checkbox {
+ display: inline-block;
+ margin-top: 0;
+ margin-bottom: 0;
+ vertical-align: middle;
+ }
+ .navbar-form .radio label,
+ .navbar-form .checkbox label {
+ padding-left: 0;
+ }
+ .navbar-form .radio input[type="radio"],
+ .navbar-form .checkbox input[type="checkbox"] {
+ position: relative;
+ margin-left: 0;
+ }
+ .navbar-form .has-feedback .form-control-feedback {
+ top: 0;
+ }
+}
+@media (max-width: 767px) {
+ .navbar-form .form-group {
+ margin-bottom: 5px;
+ }
+ .navbar-form .form-group:last-child {
+ margin-bottom: 0;
+ }
+}
+@media (min-width: 768px) {
+ .navbar-form {
+ width: auto;
+ padding-top: 0;
+ padding-bottom: 0;
+ margin-right: 0;
+ margin-left: 0;
+ border: 0;
+ -webkit-box-shadow: none;
+ box-shadow: none;
+ }
+}
+.navbar-nav > li > .dropdown-menu {
+ margin-top: 0;
+ border-top-left-radius: 0;
+ border-top-right-radius: 0;
+}
+.navbar-fixed-bottom .navbar-nav > li > .dropdown-menu {
+ margin-bottom: 0;
+ border-top-left-radius: 4px;
+ border-top-right-radius: 4px;
+ border-bottom-right-radius: 0;
+ border-bottom-left-radius: 0;
+}
+.navbar-btn {
+ margin-top: 8px;
+ margin-bottom: 8px;
+}
+.navbar-btn.btn-sm {
+ margin-top: 10px;
+ margin-bottom: 10px;
+}
+.navbar-btn.btn-xs {
+ margin-top: 14px;
+ margin-bottom: 14px;
+}
+.navbar-text {
+ margin-top: 15px;
+ margin-bottom: 15px;
+}
+@media (min-width: 768px) {
+ .navbar-text {
+ float: left;
+ margin-right: 15px;
+ margin-left: 15px;
+ }
+}
+@media (min-width: 768px) {
+ .navbar-left {
+ float: left !important;
+ }
+ .navbar-right {
+ float: right !important;
+ margin-right: -15px;
+ }
+ .navbar-right ~ .navbar-right {
+ margin-right: 0;
+ }
+}
+.navbar-default {
+ background-color: #f8f8f8;
+ border-color: #e7e7e7;
+}
+.navbar-default .navbar-brand {
+ color: #777;
+}
+.navbar-default .navbar-brand:hover,
+.navbar-default .navbar-brand:focus {
+ color: #5e5e5e;
+ background-color: transparent;
+}
+.navbar-default .navbar-text {
+ color: #777;
+}
+.navbar-default .navbar-nav > li > a {
+ color: #777;
+}
+.navbar-default .navbar-nav > li > a:hover,
+.navbar-default .navbar-nav > li > a:focus {
+ color: #333;
+ background-color: transparent;
+}
+.navbar-default .navbar-nav > .active > a,
+.navbar-default .navbar-nav > .active > a:hover,
+.navbar-default .navbar-nav > .active > a:focus {
+ color: #555;
+ background-color: #e7e7e7;
+}
+.navbar-default .navbar-nav > .disabled > a,
+.navbar-default .navbar-nav > .disabled > a:hover,
+.navbar-default .navbar-nav > .disabled > a:focus {
+ color: #ccc;
+ background-color: transparent;
+}
+.navbar-default .navbar-toggle {
+ border-color: #ddd;
+}
+.navbar-default .navbar-toggle:hover,
+.navbar-default .navbar-toggle:focus {
+ background-color: #ddd;
+}
+.navbar-default .navbar-toggle .icon-bar {
+ background-color: #888;
+}
+.navbar-default .navbar-collapse,
+.navbar-default .navbar-form {
+ border-color: #e7e7e7;
+}
+.navbar-default .navbar-nav > .open > a,
+.navbar-default .navbar-nav > .open > a:hover,
+.navbar-default .navbar-nav > .open > a:focus {
+ color: #555;
+ background-color: #e7e7e7;
+}
+@media (max-width: 767px) {
+ .navbar-default .navbar-nav .open .dropdown-menu > li > a {
+ color: #777;
+ }
+ .navbar-default .navbar-nav .open .dropdown-menu > li > a:hover,
+ .navbar-default .navbar-nav .open .dropdown-menu > li > a:focus {
+ color: #333;
+ background-color: transparent;
+ }
+ .navbar-default .navbar-nav .open .dropdown-menu > .active > a,
+ .navbar-default .navbar-nav .open .dropdown-menu > .active > a:hover,
+ .navbar-default .navbar-nav .open .dropdown-menu > .active > a:focus {
+ color: #555;
+ background-color: #e7e7e7;
+ }
+ .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a,
+ .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:hover,
+ .navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:focus {
+ color: #ccc;
+ background-color: transparent;
+ }
+}
+.navbar-default .navbar-link {
+ color: #777;
+}
+.navbar-default .navbar-link:hover {
+ color: #333;
+}
+.navbar-default .btn-link {
+ color: #777;
+}
+.navbar-default .btn-link:hover,
+.navbar-default .btn-link:focus {
+ color: #333;
+}
+.navbar-default .btn-link[disabled]:hover,
+fieldset[disabled] .navbar-default .btn-link:hover,
+.navbar-default .btn-link[disabled]:focus,
+fieldset[disabled] .navbar-default .btn-link:focus {
+ color: #ccc;
+}
+.navbar-inverse {
+ background-color: #222;
+ border-color: #080808;
+}
+.navbar-inverse .navbar-brand {
+ color: #9d9d9d;
+}
+.navbar-inverse .navbar-brand:hover,
+.navbar-inverse .navbar-brand:focus {
+ color: #fff;
+ background-color: transparent;
+}
+.navbar-inverse .navbar-text {
+ color: #9d9d9d;
+}
+.navbar-inverse .navbar-nav > li > a {
+ color: #9d9d9d;
+}
+.navbar-inverse .navbar-nav > li > a:hover,
+.navbar-inverse .navbar-nav > li > a:focus {
+ color: #fff;
+ background-color: transparent;
+}
+.navbar-inverse .navbar-nav > .active > a,
+.navbar-inverse .navbar-nav > .active > a:hover,
+.navbar-inverse .navbar-nav > .active > a:focus {
+ color: #fff;
+ background-color: #080808;
+}
+.navbar-inverse .navbar-nav > .disabled > a,
+.navbar-inverse .navbar-nav > .disabled > a:hover,
+.navbar-inverse .navbar-nav > .disabled > a:focus {
+ color: #444;
+ background-color: transparent;
+}
+.navbar-inverse .navbar-toggle {
+ border-color: #333;
+}
+.navbar-inverse .navbar-toggle:hover,
+.navbar-inverse .navbar-toggle:focus {
+ background-color: #333;
+}
+.navbar-inverse .navbar-toggle .icon-bar {
+ background-color: #fff;
+}
+.navbar-inverse .navbar-collapse,
+.navbar-inverse .navbar-form {
+ border-color: #101010;
+}
+.navbar-inverse .navbar-nav > .open > a,
+.navbar-inverse .navbar-nav > .open > a:hover,
+.navbar-inverse .navbar-nav > .open > a:focus {
+ color: #fff;
+ background-color: #080808;
+}
+@media (max-width: 767px) {
+ .navbar-inverse .navbar-nav .open .dropdown-menu > .dropdown-header {
+ border-color: #080808;
+ }
+ .navbar-inverse .navbar-nav .open .dropdown-menu .divider {
+ background-color: #080808;
+ }
+ .navbar-inverse .navbar-nav .open .dropdown-menu > li > a {
+ color: #9d9d9d;
+ }
+ .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:hover,
+ .navbar-inverse .navbar-nav .open .dropdown-menu > li > a:focus {
+ color: #fff;
+ background-color: transparent;
+ }
+ .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a,
+ .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:hover,
+ .navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:focus {
+ color: #fff;
+ background-color: #080808;
+ }
+ .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a,
+ .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:hover,
+ .navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:focus {
+ color: #444;
+ background-color: transparent;
+ }
+}
+.navbar-inverse .navbar-link {
+ color: #9d9d9d;
+}
+.navbar-inverse .navbar-link:hover {
+ color: #fff;
+}
+.navbar-inverse .btn-link {
+ color: #9d9d9d;
+}
+.navbar-inverse .btn-link:hover,
+.navbar-inverse .btn-link:focus {
+ color: #fff;
+}
+.navbar-inverse .btn-link[disabled]:hover,
+fieldset[disabled] .navbar-inverse .btn-link:hover,
+.navbar-inverse .btn-link[disabled]:focus,
+fieldset[disabled] .navbar-inverse .btn-link:focus {
+ color: #444;
+}
+.breadcrumb {
+ padding: 8px 15px;
+ margin-bottom: 20px;
+ list-style: none;
+ background-color: #f5f5f5;
+ border-radius: 4px;
+}
+.breadcrumb > li {
+ display: inline-block;
+}
+.breadcrumb > li + li:before {
+ padding: 0 5px;
+ color: #ccc;
+ content: "/\00a0";
+}
+.breadcrumb > .active {
+ color: #777;
+}
+.pagination {
+ display: inline-block;
+ padding-left: 0;
+ margin: 20px 0;
+ border-radius: 4px;
+}
+.pagination > li {
+ display: inline;
+}
+.pagination > li > a,
+.pagination > li > span {
+ position: relative;
+ float: left;
+ padding: 6px 12px;
+ margin-left: -1px;
+ line-height: 1.42857143;
+ color: #337ab7;
+ text-decoration: none;
+ background-color: #fff;
+ border: 1px solid #ddd;
+}
+.pagination > li:first-child > a,
+.pagination > li:first-child > span {
+ margin-left: 0;
+ border-top-left-radius: 4px;
+ border-bottom-left-radius: 4px;
+}
+.pagination > li:last-child > a,
+.pagination > li:last-child > span {
+ border-top-right-radius: 4px;
+ border-bottom-right-radius: 4px;
+}
+.pagination > li > a:hover,
+.pagination > li > span:hover,
+.pagination > li > a:focus,
+.pagination > li > span:focus {
+ z-index: 2;
+ color: #23527c;
+ background-color: #eee;
+ border-color: #ddd;
+}
+.pagination > .active > a,
+.pagination > .active > span,
+.pagination > .active > a:hover,
+.pagination > .active > span:hover,
+.pagination > .active > a:focus,
+.pagination > .active > span:focus {
+ z-index: 3;
+ color: #fff;
+ cursor: default;
+ background-color: #337ab7;
+ border-color: #337ab7;
+}
+.pagination > .disabled > span,
+.pagination > .disabled > span:hover,
+.pagination > .disabled > span:focus,
+.pagination > .disabled > a,
+.pagination > .disabled > a:hover,
+.pagination > .disabled > a:focus {
+ color: #777;
+ cursor: not-allowed;
+ background-color: #fff;
+ border-color: #ddd;
+}
+.pagination-lg > li > a,
+.pagination-lg > li > span {
+ padding: 10px 16px;
+ font-size: 18px;
+ line-height: 1.3333333;
+}
+.pagination-lg > li:first-child > a,
+.pagination-lg > li:first-child > span {
+ border-top-left-radius: 6px;
+ border-bottom-left-radius: 6px;
+}
+.pagination-lg > li:last-child > a,
+.pagination-lg > li:last-child > span {
+ border-top-right-radius: 6px;
+ border-bottom-right-radius: 6px;
+}
+.pagination-sm > li > a,
+.pagination-sm > li > span {
+ padding: 5px 10px;
+ font-size: 12px;
+ line-height: 1.5;
+}
+.pagination-sm > li:first-child > a,
+.pagination-sm > li:first-child > span {
+ border-top-left-radius: 3px;
+ border-bottom-left-radius: 3px;
+}
+.pagination-sm > li:last-child > a,
+.pagination-sm > li:last-child > span {
+ border-top-right-radius: 3px;
+ border-bottom-right-radius: 3px;
+}
+.pager {
+ padding-left: 0;
+ margin: 20px 0;
+ text-align: center;
+ list-style: none;
+}
+.pager li {
+ display: inline;
+}
+.pager li > a,
+.pager li > span {
+ display: inline-block;
+ padding: 5px 14px;
+ background-color: #fff;
+ border: 1px solid #ddd;
+ border-radius: 15px;
+}
+.pager li > a:hover,
+.pager li > a:focus {
+ text-decoration: none;
+ background-color: #eee;
+}
+.pager .next > a,
+.pager .next > span {
+ float: right;
+}
+.pager .previous > a,
+.pager .previous > span {
+ float: left;
+}
+.pager .disabled > a,
+.pager .disabled > a:hover,
+.pager .disabled > a:focus,
+.pager .disabled > span {
+ color: #777;
+ cursor: not-allowed;
+ background-color: #fff;
+}
+.label {
+ display: inline;
+ padding: .2em .6em .3em;
+ font-size: 75%;
+ font-weight: bold;
+ line-height: 1;
+ color: #fff;
+ text-align: center;
+ white-space: nowrap;
+ vertical-align: baseline;
+ border-radius: .25em;
+}
+a.label:hover,
+a.label:focus {
+ color: #fff;
+ text-decoration: none;
+ cursor: pointer;
+}
+.label:empty {
+ display: none;
+}
+.btn .label {
+ position: relative;
+ top: -1px;
+}
+.label-default {
+ background-color: #777;
+}
+.label-default[href]:hover,
+.label-default[href]:focus {
+ background-color: #5e5e5e;
+}
+.label-primary {
+ background-color: #337ab7;
+}
+.label-primary[href]:hover,
+.label-primary[href]:focus {
+ background-color: #286090;
+}
+.label-success {
+ background-color: #5cb85c;
+}
+.label-success[href]:hover,
+.label-success[href]:focus {
+ background-color: #449d44;
+}
+.label-info {
+ background-color: #5bc0de;
+}
+.label-info[href]:hover,
+.label-info[href]:focus {
+ background-color: #31b0d5;
+}
+.label-warning {
+ background-color: #f0ad4e;
+}
+.label-warning[href]:hover,
+.label-warning[href]:focus {
+ background-color: #ec971f;
+}
+.label-danger {
+ background-color: #d9534f;
+}
+.label-danger[href]:hover,
+.label-danger[href]:focus {
+ background-color: #c9302c;
+}
+.badge {
+ display: inline-block;
+ min-width: 10px;
+ padding: 3px 7px;
+ font-size: 12px;
+ font-weight: bold;
+ line-height: 1;
+ color: #fff;
+ text-align: center;
+ white-space: nowrap;
+ vertical-align: middle;
+ background-color: #777;
+ border-radius: 10px;
+}
+.badge:empty {
+ display: none;
+}
+.btn .badge {
+ position: relative;
+ top: -1px;
+}
+.btn-xs .badge,
+.btn-group-xs > .btn .badge {
+ top: 0;
+ padding: 1px 5px;
+}
+a.badge:hover,
+a.badge:focus {
+ color: #fff;
+ text-decoration: none;
+ cursor: pointer;
+}
+.list-group-item.active > .badge,
+.nav-pills > .active > a > .badge {
+ color: #337ab7;
+ background-color: #fff;
+}
+.list-group-item > .badge {
+ float: right;
+}
+.list-group-item > .badge + .badge {
+ margin-right: 5px;
+}
+.nav-pills > li > a > .badge {
+ margin-left: 3px;
+}
+.jumbotron {
+ padding-top: 30px;
+ padding-bottom: 30px;
+ margin-bottom: 30px;
+ color: inherit;
+ background-color: #eee;
+}
+.jumbotron h1,
+.jumbotron .h1 {
+ color: inherit;
+}
+.jumbotron p {
+ margin-bottom: 15px;
+ font-size: 21px;
+ font-weight: 200;
+}
+.jumbotron > hr {
+ border-top-color: #d5d5d5;
+}
+.container .jumbotron,
+.container-fluid .jumbotron {
+ padding-right: 15px;
+ padding-left: 15px;
+ border-radius: 6px;
+}
+.jumbotron .container {
+ max-width: 100%;
+}
+@media screen and (min-width: 768px) {
+ .jumbotron {
+ padding-top: 48px;
+ padding-bottom: 48px;
+ }
+ .container .jumbotron,
+ .container-fluid .jumbotron {
+ padding-right: 60px;
+ padding-left: 60px;
+ }
+ .jumbotron h1,
+ .jumbotron .h1 {
+ font-size: 63px;
+ }
+}
+.thumbnail {
+ display: block;
+ padding: 4px;
+ margin-bottom: 20px;
+ line-height: 1.42857143;
+ background-color: #fff;
+ border: 1px solid #ddd;
+ border-radius: 4px;
+ -webkit-transition: border .2s ease-in-out;
+ -o-transition: border .2s ease-in-out;
+ transition: border .2s ease-in-out;
+}
+.thumbnail > img,
+.thumbnail a > img {
+ margin-right: auto;
+ margin-left: auto;
+}
+a.thumbnail:hover,
+a.thumbnail:focus,
+a.thumbnail.active {
+ border-color: #337ab7;
+}
+.thumbnail .caption {
+ padding: 9px;
+ color: #333;
+}
+.alert {
+ padding: 15px;
+ margin-bottom: 20px;
+ border: 1px solid transparent;
+ border-radius: 4px;
+}
+.alert h4 {
+ margin-top: 0;
+ color: inherit;
+}
+.alert .alert-link {
+ font-weight: bold;
+}
+.alert > p,
+.alert > ul {
+ margin-bottom: 0;
+}
+.alert > p + p {
+ margin-top: 5px;
+}
+.alert-dismissable,
+.alert-dismissible {
+ padding-right: 35px;
+}
+.alert-dismissable .close,
+.alert-dismissible .close {
+ position: relative;
+ top: -2px;
+ right: -21px;
+ color: inherit;
+}
+.alert-success {
+ color: #3c763d;
+ background-color: #dff0d8;
+ border-color: #d6e9c6;
+}
+.alert-success hr {
+ border-top-color: #c9e2b3;
+}
+.alert-success .alert-link {
+ color: #2b542c;
+}
+.alert-info {
+ color: #31708f;
+ background-color: #d9edf7;
+ border-color: #bce8f1;
+}
+.alert-info hr {
+ border-top-color: #a6e1ec;
+}
+.alert-info .alert-link {
+ color: #245269;
+}
+.alert-warning {
+ color: #8a6d3b;
+ background-color: #fcf8e3;
+ border-color: #faebcc;
+}
+.alert-warning hr {
+ border-top-color: #f7e1b5;
+}
+.alert-warning .alert-link {
+ color: #66512c;
+}
+.alert-danger {
+ color: #a94442;
+ background-color: #f2dede;
+ border-color: #ebccd1;
+}
+.alert-danger hr {
+ border-top-color: #e4b9c0;
+}
+.alert-danger .alert-link {
+ color: #843534;
+}
+@-webkit-keyframes progress-bar-stripes {
+ from {
+ background-position: 40px 0;
+ }
+ to {
+ background-position: 0 0;
+ }
+}
+@-o-keyframes progress-bar-stripes {
+ from {
+ background-position: 40px 0;
+ }
+ to {
+ background-position: 0 0;
+ }
+}
+@keyframes progress-bar-stripes {
+ from {
+ background-position: 40px 0;
+ }
+ to {
+ background-position: 0 0;
+ }
+}
+.progress {
+ height: 20px;
+ margin-bottom: 20px;
+ overflow: hidden;
+ background-color: #f5f5f5;
+ border-radius: 4px;
+ -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, .1);
+ box-shadow: inset 0 1px 2px rgba(0, 0, 0, .1);
+}
+.progress-bar {
+ float: left;
+ width: 0;
+ height: 100%;
+ font-size: 12px;
+ line-height: 20px;
+ color: #fff;
+ text-align: center;
+ background-color: #337ab7;
+ -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .15);
+ box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .15);
+ -webkit-transition: width .6s ease;
+ -o-transition: width .6s ease;
+ transition: width .6s ease;
+}
+.progress-striped .progress-bar,
+.progress-bar-striped {
+ background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
+ background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
+ background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
+ -webkit-background-size: 40px 40px;
+ background-size: 40px 40px;
+}
+.progress.active .progress-bar,
+.progress-bar.active {
+ -webkit-animation: progress-bar-stripes 2s linear infinite;
+ -o-animation: progress-bar-stripes 2s linear infinite;
+ animation: progress-bar-stripes 2s linear infinite;
+}
+.progress-bar-success {
+ background-color: #5cb85c;
+}
+.progress-striped .progress-bar-success {
+ background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
+ background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
+ background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
+}
+.progress-bar-info {
+ background-color: #5bc0de;
+}
+.progress-striped .progress-bar-info {
+ background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
+ background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
+ background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
+}
+.progress-bar-warning {
+ background-color: #f0ad4e;
+}
+.progress-striped .progress-bar-warning {
+ background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
+ background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
+ background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
+}
+.progress-bar-danger {
+ background-color: #d9534f;
+}
+.progress-striped .progress-bar-danger {
+ background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
+ background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
+ background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
+}
+.media {
+ margin-top: 15px;
+}
+.media:first-child {
+ margin-top: 0;
+}
+.media,
+.media-body {
+ overflow: hidden;
+ zoom: 1;
+}
+.media-body {
+ width: 10000px;
+}
+.media-object {
+ display: block;
+}
+.media-object.img-thumbnail {
+ max-width: none;
+}
+.media-right,
+.media > .pull-right {
+ padding-left: 10px;
+}
+.media-left,
+.media > .pull-left {
+ padding-right: 10px;
+}
+.media-left,
+.media-right,
+.media-body {
+ display: table-cell;
+ vertical-align: top;
+}
+.media-middle {
+ vertical-align: middle;
+}
+.media-bottom {
+ vertical-align: bottom;
+}
+.media-heading {
+ margin-top: 0;
+ margin-bottom: 5px;
+}
+.media-list {
+ padding-left: 0;
+ list-style: none;
+}
+.list-group {
+ padding-left: 0;
+ margin-bottom: 20px;
+}
+.list-group-item {
+ position: relative;
+ display: block;
+ padding: 10px 15px;
+ margin-bottom: -1px;
+ background-color: #fff;
+ border: 1px solid #ddd;
+}
+.list-group-item:first-child {
+ border-top-left-radius: 4px;
+ border-top-right-radius: 4px;
+}
+.list-group-item:last-child {
+ margin-bottom: 0;
+ border-bottom-right-radius: 4px;
+ border-bottom-left-radius: 4px;
+}
+a.list-group-item,
+button.list-group-item {
+ color: #555;
+}
+a.list-group-item .list-group-item-heading,
+button.list-group-item .list-group-item-heading {
+ color: #333;
+}
+a.list-group-item:hover,
+button.list-group-item:hover,
+a.list-group-item:focus,
+button.list-group-item:focus {
+ color: #555;
+ text-decoration: none;
+ background-color: #f5f5f5;
+}
+button.list-group-item {
+ width: 100%;
+ text-align: left;
+}
+.list-group-item.disabled,
+.list-group-item.disabled:hover,
+.list-group-item.disabled:focus {
+ color: #777;
+ cursor: not-allowed;
+ background-color: #eee;
+}
+.list-group-item.disabled .list-group-item-heading,
+.list-group-item.disabled:hover .list-group-item-heading,
+.list-group-item.disabled:focus .list-group-item-heading {
+ color: inherit;
+}
+.list-group-item.disabled .list-group-item-text,
+.list-group-item.disabled:hover .list-group-item-text,
+.list-group-item.disabled:focus .list-group-item-text {
+ color: #777;
+}
+.list-group-item.active,
+.list-group-item.active:hover,
+.list-group-item.active:focus {
+ z-index: 2;
+ color: #fff;
+ background-color: #337ab7;
+ border-color: #337ab7;
+}
+.list-group-item.active .list-group-item-heading,
+.list-group-item.active:hover .list-group-item-heading,
+.list-group-item.active:focus .list-group-item-heading,
+.list-group-item.active .list-group-item-heading > small,
+.list-group-item.active:hover .list-group-item-heading > small,
+.list-group-item.active:focus .list-group-item-heading > small,
+.list-group-item.active .list-group-item-heading > .small,
+.list-group-item.active:hover .list-group-item-heading > .small,
+.list-group-item.active:focus .list-group-item-heading > .small {
+ color: inherit;
+}
+.list-group-item.active .list-group-item-text,
+.list-group-item.active:hover .list-group-item-text,
+.list-group-item.active:focus .list-group-item-text {
+ color: #c7ddef;
+}
+.list-group-item-success {
+ color: #3c763d;
+ background-color: #dff0d8;
+}
+a.list-group-item-success,
+button.list-group-item-success {
+ color: #3c763d;
+}
+a.list-group-item-success .list-group-item-heading,
+button.list-group-item-success .list-group-item-heading {
+ color: inherit;
+}
+a.list-group-item-success:hover,
+button.list-group-item-success:hover,
+a.list-group-item-success:focus,
+button.list-group-item-success:focus {
+ color: #3c763d;
+ background-color: #d0e9c6;
+}
+a.list-group-item-success.active,
+button.list-group-item-success.active,
+a.list-group-item-success.active:hover,
+button.list-group-item-success.active:hover,
+a.list-group-item-success.active:focus,
+button.list-group-item-success.active:focus {
+ color: #fff;
+ background-color: #3c763d;
+ border-color: #3c763d;
+}
+.list-group-item-info {
+ color: #31708f;
+ background-color: #d9edf7;
+}
+a.list-group-item-info,
+button.list-group-item-info {
+ color: #31708f;
+}
+a.list-group-item-info .list-group-item-heading,
+button.list-group-item-info .list-group-item-heading {
+ color: inherit;
+}
+a.list-group-item-info:hover,
+button.list-group-item-info:hover,
+a.list-group-item-info:focus,
+button.list-group-item-info:focus {
+ color: #31708f;
+ background-color: #c4e3f3;
+}
+a.list-group-item-info.active,
+button.list-group-item-info.active,
+a.list-group-item-info.active:hover,
+button.list-group-item-info.active:hover,
+a.list-group-item-info.active:focus,
+button.list-group-item-info.active:focus {
+ color: #fff;
+ background-color: #31708f;
+ border-color: #31708f;
+}
+.list-group-item-warning {
+ color: #8a6d3b;
+ background-color: #fcf8e3;
+}
+a.list-group-item-warning,
+button.list-group-item-warning {
+ color: #8a6d3b;
+}
+a.list-group-item-warning .list-group-item-heading,
+button.list-group-item-warning .list-group-item-heading {
+ color: inherit;
+}
+a.list-group-item-warning:hover,
+button.list-group-item-warning:hover,
+a.list-group-item-warning:focus,
+button.list-group-item-warning:focus {
+ color: #8a6d3b;
+ background-color: #faf2cc;
+}
+a.list-group-item-warning.active,
+button.list-group-item-warning.active,
+a.list-group-item-warning.active:hover,
+button.list-group-item-warning.active:hover,
+a.list-group-item-warning.active:focus,
+button.list-group-item-warning.active:focus {
+ color: #fff;
+ background-color: #8a6d3b;
+ border-color: #8a6d3b;
+}
+.list-group-item-danger {
+ color: #a94442;
+ background-color: #f2dede;
+}
+a.list-group-item-danger,
+button.list-group-item-danger {
+ color: #a94442;
+}
+a.list-group-item-danger .list-group-item-heading,
+button.list-group-item-danger .list-group-item-heading {
+ color: inherit;
+}
+a.list-group-item-danger:hover,
+button.list-group-item-danger:hover,
+a.list-group-item-danger:focus,
+button.list-group-item-danger:focus {
+ color: #a94442;
+ background-color: #ebcccc;
+}
+a.list-group-item-danger.active,
+button.list-group-item-danger.active,
+a.list-group-item-danger.active:hover,
+button.list-group-item-danger.active:hover,
+a.list-group-item-danger.active:focus,
+button.list-group-item-danger.active:focus {
+ color: #fff;
+ background-color: #a94442;
+ border-color: #a94442;
+}
+.list-group-item-heading {
+ margin-top: 0;
+ margin-bottom: 5px;
+}
+.list-group-item-text {
+ margin-bottom: 0;
+ line-height: 1.3;
+}
+.panel {
+ margin-bottom: 20px;
+ background-color: #fff;
+ border: 1px solid transparent;
+ border-radius: 4px;
+ -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, .05);
+ box-shadow: 0 1px 1px rgba(0, 0, 0, .05);
+}
+.panel-body {
+ padding: 15px;
+}
+.panel-heading {
+ padding: 10px 15px;
+ border-bottom: 1px solid transparent;
+ border-top-left-radius: 3px;
+ border-top-right-radius: 3px;
+}
+.panel-heading > .dropdown .dropdown-toggle {
+ color: inherit;
+}
+.panel-title {
+ margin-top: 0;
+ margin-bottom: 0;
+ font-size: 16px;
+ color: inherit;
+}
+.panel-title > a,
+.panel-title > small,
+.panel-title > .small,
+.panel-title > small > a,
+.panel-title > .small > a {
+ color: inherit;
+}
+.panel-footer {
+ padding: 10px 15px;
+ background-color: #f5f5f5;
+ border-top: 1px solid #ddd;
+ border-bottom-right-radius: 3px;
+ border-bottom-left-radius: 3px;
+}
+.panel > .list-group,
+.panel > .panel-collapse > .list-group {
+ margin-bottom: 0;
+}
+.panel > .list-group .list-group-item,
+.panel > .panel-collapse > .list-group .list-group-item {
+ border-width: 1px 0;
+ border-radius: 0;
+}
+.panel > .list-group:first-child .list-group-item:first-child,
+.panel > .panel-collapse > .list-group:first-child .list-group-item:first-child {
+ border-top: 0;
+ border-top-left-radius: 3px;
+ border-top-right-radius: 3px;
+}
+.panel > .list-group:last-child .list-group-item:last-child,
+.panel > .panel-collapse > .list-group:last-child .list-group-item:last-child {
+ border-bottom: 0;
+ border-bottom-right-radius: 3px;
+ border-bottom-left-radius: 3px;
+}
+.panel > .panel-heading + .panel-collapse > .list-group .list-group-item:first-child {
+ border-top-left-radius: 0;
+ border-top-right-radius: 0;
+}
+.panel-heading + .list-group .list-group-item:first-child {
+ border-top-width: 0;
+}
+.list-group + .panel-footer {
+ border-top-width: 0;
+}
+.panel > .table,
+.panel > .table-responsive > .table,
+.panel > .panel-collapse > .table {
+ margin-bottom: 0;
+}
+.panel > .table caption,
+.panel > .table-responsive > .table caption,
+.panel > .panel-collapse > .table caption {
+ padding-right: 15px;
+ padding-left: 15px;
+}
+.panel > .table:first-child,
+.panel > .table-responsive:first-child > .table:first-child {
+ border-top-left-radius: 3px;
+ border-top-right-radius: 3px;
+}
+.panel > .table:first-child > thead:first-child > tr:first-child,
+.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child,
+.panel > .table:first-child > tbody:first-child > tr:first-child,
+.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child {
+ border-top-left-radius: 3px;
+ border-top-right-radius: 3px;
+}
+.panel > .table:first-child > thead:first-child > tr:first-child td:first-child,
+.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child td:first-child,
+.panel > .table:first-child > tbody:first-child > tr:first-child td:first-child,
+.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child td:first-child,
+.panel > .table:first-child > thead:first-child > tr:first-child th:first-child,
+.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child th:first-child,
+.panel > .table:first-child > tbody:first-child > tr:first-child th:first-child,
+.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child th:first-child {
+ border-top-left-radius: 3px;
+}
+.panel > .table:first-child > thead:first-child > tr:first-child td:last-child,
+.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child td:last-child,
+.panel > .table:first-child > tbody:first-child > tr:first-child td:last-child,
+.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child td:last-child,
+.panel > .table:first-child > thead:first-child > tr:first-child th:last-child,
+.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child th:last-child,
+.panel > .table:first-child > tbody:first-child > tr:first-child th:last-child,
+.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child th:last-child {
+ border-top-right-radius: 3px;
+}
+.panel > .table:last-child,
+.panel > .table-responsive:last-child > .table:last-child {
+ border-bottom-right-radius: 3px;
+ border-bottom-left-radius: 3px;
+}
+.panel > .table:last-child > tbody:last-child > tr:last-child,
+.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child,
+.panel > .table:last-child > tfoot:last-child > tr:last-child,
+.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child {
+ border-bottom-right-radius: 3px;
+ border-bottom-left-radius: 3px;
+}
+.panel > .table:last-child > tbody:last-child > tr:last-child td:first-child,
+.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child td:first-child,
+.panel > .table:last-child > tfoot:last-child > tr:last-child td:first-child,
+.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child td:first-child,
+.panel > .table:last-child > tbody:last-child > tr:last-child th:first-child,
+.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child th:first-child,
+.panel > .table:last-child > tfoot:last-child > tr:last-child th:first-child,
+.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child th:first-child {
+ border-bottom-left-radius: 3px;
+}
+.panel > .table:last-child > tbody:last-child > tr:last-child td:last-child,
+.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child td:last-child,
+.panel > .table:last-child > tfoot:last-child > tr:last-child td:last-child,
+.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child td:last-child,
+.panel > .table:last-child > tbody:last-child > tr:last-child th:last-child,
+.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child th:last-child,
+.panel > .table:last-child > tfoot:last-child > tr:last-child th:last-child,
+.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child th:last-child {
+ border-bottom-right-radius: 3px;
+}
+.panel > .panel-body + .table,
+.panel > .panel-body + .table-responsive,
+.panel > .table + .panel-body,
+.panel > .table-responsive + .panel-body {
+ border-top: 1px solid #ddd;
+}
+.panel > .table > tbody:first-child > tr:first-child th,
+.panel > .table > tbody:first-child > tr:first-child td {
+ border-top: 0;
+}
+.panel > .table-bordered,
+.panel > .table-responsive > .table-bordered {
+ border: 0;
+}
+.panel > .table-bordered > thead > tr > th:first-child,
+.panel > .table-responsive > .table-bordered > thead > tr > th:first-child,
+.panel > .table-bordered > tbody > tr > th:first-child,
+.panel > .table-responsive > .table-bordered > tbody > tr > th:first-child,
+.panel > .table-bordered > tfoot > tr > th:first-child,
+.panel > .table-responsive > .table-bordered > tfoot > tr > th:first-child,
+.panel > .table-bordered > thead > tr > td:first-child,
+.panel > .table-responsive > .table-bordered > thead > tr > td:first-child,
+.panel > .table-bordered > tbody > tr > td:first-child,
+.panel > .table-responsive > .table-bordered > tbody > tr > td:first-child,
+.panel > .table-bordered > tfoot > tr > td:first-child,
+.panel > .table-responsive > .table-bordered > tfoot > tr > td:first-child {
+ border-left: 0;
+}
+.panel > .table-bordered > thead > tr > th:last-child,
+.panel > .table-responsive > .table-bordered > thead > tr > th:last-child,
+.panel > .table-bordered > tbody > tr > th:last-child,
+.panel > .table-responsive > .table-bordered > tbody > tr > th:last-child,
+.panel > .table-bordered > tfoot > tr > th:last-child,
+.panel > .table-responsive > .table-bordered > tfoot > tr > th:last-child,
+.panel > .table-bordered > thead > tr > td:last-child,
+.panel > .table-responsive > .table-bordered > thead > tr > td:last-child,
+.panel > .table-bordered > tbody > tr > td:last-child,
+.panel > .table-responsive > .table-bordered > tbody > tr > td:last-child,
+.panel > .table-bordered > tfoot > tr > td:last-child,
+.panel > .table-responsive > .table-bordered > tfoot > tr > td:last-child {
+ border-right: 0;
+}
+.panel > .table-bordered > thead > tr:first-child > td,
+.panel > .table-responsive > .table-bordered > thead > tr:first-child > td,
+.panel > .table-bordered > tbody > tr:first-child > td,
+.panel > .table-responsive > .table-bordered > tbody > tr:first-child > td,
+.panel > .table-bordered > thead > tr:first-child > th,
+.panel > .table-responsive > .table-bordered > thead > tr:first-child > th,
+.panel > .table-bordered > tbody > tr:first-child > th,
+.panel > .table-responsive > .table-bordered > tbody > tr:first-child > th {
+ border-bottom: 0;
+}
+.panel > .table-bordered > tbody > tr:last-child > td,
+.panel > .table-responsive > .table-bordered > tbody > tr:last-child > td,
+.panel > .table-bordered > tfoot > tr:last-child > td,
+.panel > .table-responsive > .table-bordered > tfoot > tr:last-child > td,
+.panel > .table-bordered > tbody > tr:last-child > th,
+.panel > .table-responsive > .table-bordered > tbody > tr:last-child > th,
+.panel > .table-bordered > tfoot > tr:last-child > th,
+.panel > .table-responsive > .table-bordered > tfoot > tr:last-child > th {
+ border-bottom: 0;
+}
+.panel > .table-responsive {
+ margin-bottom: 0;
+ border: 0;
+}
+.panel-group {
+ margin-bottom: 20px;
+}
+.panel-group .panel {
+ margin-bottom: 0;
+ border-radius: 4px;
+}
+.panel-group .panel + .panel {
+ margin-top: 5px;
+}
+.panel-group .panel-heading {
+ border-bottom: 0;
+}
+.panel-group .panel-heading + .panel-collapse > .panel-body,
+.panel-group .panel-heading + .panel-collapse > .list-group {
+ border-top: 1px solid #ddd;
+}
+.panel-group .panel-footer {
+ border-top: 0;
+}
+.panel-group .panel-footer + .panel-collapse .panel-body {
+ border-bottom: 1px solid #ddd;
+}
+.panel-default {
+ border-color: #ddd;
+}
+.panel-default > .panel-heading {
+ color: #333;
+ background-color: #f5f5f5;
+ border-color: #ddd;
+}
+.panel-default > .panel-heading + .panel-collapse > .panel-body {
+ border-top-color: #ddd;
+}
+.panel-default > .panel-heading .badge {
+ color: #f5f5f5;
+ background-color: #333;
+}
+.panel-default > .panel-footer + .panel-collapse > .panel-body {
+ border-bottom-color: #ddd;
+}
+.panel-primary {
+ border-color: #337ab7;
+}
+.panel-primary > .panel-heading {
+ color: #fff;
+ background-color: #337ab7;
+ border-color: #337ab7;
+}
+.panel-primary > .panel-heading + .panel-collapse > .panel-body {
+ border-top-color: #337ab7;
+}
+.panel-primary > .panel-heading .badge {
+ color: #337ab7;
+ background-color: #fff;
+}
+.panel-primary > .panel-footer + .panel-collapse > .panel-body {
+ border-bottom-color: #337ab7;
+}
+.panel-success {
+ border-color: #d6e9c6;
+}
+.panel-success > .panel-heading {
+ color: #3c763d;
+ background-color: #dff0d8;
+ border-color: #d6e9c6;
+}
+.panel-success > .panel-heading + .panel-collapse > .panel-body {
+ border-top-color: #d6e9c6;
+}
+.panel-success > .panel-heading .badge {
+ color: #dff0d8;
+ background-color: #3c763d;
+}
+.panel-success > .panel-footer + .panel-collapse > .panel-body {
+ border-bottom-color: #d6e9c6;
+}
+.panel-info {
+ border-color: #bce8f1;
+}
+.panel-info > .panel-heading {
+ color: #31708f;
+ background-color: #d9edf7;
+ border-color: #bce8f1;
+}
+.panel-info > .panel-heading + .panel-collapse > .panel-body {
+ border-top-color: #bce8f1;
+}
+.panel-info > .panel-heading .badge {
+ color: #d9edf7;
+ background-color: #31708f;
+}
+.panel-info > .panel-footer + .panel-collapse > .panel-body {
+ border-bottom-color: #bce8f1;
+}
+.panel-warning {
+ border-color: #faebcc;
+}
+.panel-warning > .panel-heading {
+ color: #8a6d3b;
+ background-color: #fcf8e3;
+ border-color: #faebcc;
+}
+.panel-warning > .panel-heading + .panel-collapse > .panel-body {
+ border-top-color: #faebcc;
+}
+.panel-warning > .panel-heading .badge {
+ color: #fcf8e3;
+ background-color: #8a6d3b;
+}
+.panel-warning > .panel-footer + .panel-collapse > .panel-body {
+ border-bottom-color: #faebcc;
+}
+.panel-danger {
+ border-color: #ebccd1;
+}
+.panel-danger > .panel-heading {
+ color: #a94442;
+ background-color: #f2dede;
+ border-color: #ebccd1;
+}
+.panel-danger > .panel-heading + .panel-collapse > .panel-body {
+ border-top-color: #ebccd1;
+}
+.panel-danger > .panel-heading .badge {
+ color: #f2dede;
+ background-color: #a94442;
+}
+.panel-danger > .panel-footer + .panel-collapse > .panel-body {
+ border-bottom-color: #ebccd1;
+}
+.embed-responsive {
+ position: relative;
+ display: block;
+ height: 0;
+ padding: 0;
+ overflow: hidden;
+}
+.embed-responsive .embed-responsive-item,
+.embed-responsive iframe,
+.embed-responsive embed,
+.embed-responsive object,
+.embed-responsive video {
+ position: absolute;
+ top: 0;
+ bottom: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+ border: 0;
+}
+.embed-responsive-16by9 {
+ padding-bottom: 56.25%;
+}
+.embed-responsive-4by3 {
+ padding-bottom: 75%;
+}
+.well {
+ min-height: 20px;
+ padding: 19px;
+ margin-bottom: 20px;
+ background-color: #f5f5f5;
+ border: 1px solid #e3e3e3;
+ border-radius: 4px;
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .05);
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, .05);
+}
+.well blockquote {
+ border-color: #ddd;
+ border-color: rgba(0, 0, 0, .15);
+}
+.well-lg {
+ padding: 24px;
+ border-radius: 6px;
+}
+.well-sm {
+ padding: 9px;
+ border-radius: 3px;
+}
+.close {
+ float: right;
+ font-size: 21px;
+ font-weight: bold;
+ line-height: 1;
+ color: #000;
+ text-shadow: 0 1px 0 #fff;
+ filter: alpha(opacity=20);
+ opacity: .2;
+}
+.close:hover,
+.close:focus {
+ color: #000;
+ text-decoration: none;
+ cursor: pointer;
+ filter: alpha(opacity=50);
+ opacity: .5;
+}
+button.close {
+ -webkit-appearance: none;
+ padding: 0;
+ cursor: pointer;
+ background: transparent;
+ border: 0;
+}
+.modal-open {
+ overflow: hidden;
+}
+.modal {
+ position: fixed;
+ top: 0;
+ right: 0;
+ bottom: 0;
+ left: 0;
+ z-index: 1050;
+ display: none;
+ overflow: hidden;
+ -webkit-overflow-scrolling: touch;
+ outline: 0;
+}
+.modal.fade .modal-dialog {
+ -webkit-transition: -webkit-transform .3s ease-out;
+ -o-transition: -o-transform .3s ease-out;
+ transition: transform .3s ease-out;
+ -webkit-transform: translate(0, -25%);
+ -ms-transform: translate(0, -25%);
+ -o-transform: translate(0, -25%);
+ transform: translate(0, -25%);
+}
+.modal.in .modal-dialog {
+ -webkit-transform: translate(0, 0);
+ -ms-transform: translate(0, 0);
+ -o-transform: translate(0, 0);
+ transform: translate(0, 0);
+}
+.modal-open .modal {
+ overflow-x: hidden;
+ overflow-y: auto;
+}
+.modal-dialog {
+ position: relative;
+ width: auto;
+ margin: 10px;
+}
+.modal-content {
+ position: relative;
+ background-color: #fff;
+ -webkit-background-clip: padding-box;
+ background-clip: padding-box;
+ border: 1px solid #999;
+ border: 1px solid rgba(0, 0, 0, .2);
+ border-radius: 6px;
+ outline: 0;
+ -webkit-box-shadow: 0 3px 9px rgba(0, 0, 0, .5);
+ box-shadow: 0 3px 9px rgba(0, 0, 0, .5);
+}
+.modal-backdrop {
+ position: fixed;
+ top: 0;
+ right: 0;
+ bottom: 0;
+ left: 0;
+ z-index: 1040;
+ background-color: #000;
+}
+.modal-backdrop.fade {
+ filter: alpha(opacity=0);
+ opacity: 0;
+}
+.modal-backdrop.in {
+ filter: alpha(opacity=50);
+ opacity: .5;
+}
+.modal-header {
+ padding: 15px;
+ border-bottom: 1px solid #e5e5e5;
+}
+.modal-header .close {
+ margin-top: -2px;
+}
+.modal-title {
+ margin: 0;
+ line-height: 1.42857143;
+}
+.modal-body {
+ position: relative;
+ padding: 15px;
+}
+.modal-footer {
+ padding: 15px;
+ text-align: right;
+ border-top: 1px solid #e5e5e5;
+}
+.modal-footer .btn + .btn {
+ margin-bottom: 0;
+ margin-left: 5px;
+}
+.modal-footer .btn-group .btn + .btn {
+ margin-left: -1px;
+}
+.modal-footer .btn-block + .btn-block {
+ margin-left: 0;
+}
+.modal-scrollbar-measure {
+ position: absolute;
+ top: -9999px;
+ width: 50px;
+ height: 50px;
+ overflow: scroll;
+}
+@media (min-width: 768px) {
+ .modal-dialog {
+ width: 600px;
+ margin: 30px auto;
+ }
+ .modal-content {
+ -webkit-box-shadow: 0 5px 15px rgba(0, 0, 0, .5);
+ box-shadow: 0 5px 15px rgba(0, 0, 0, .5);
+ }
+ .modal-sm {
+ width: 300px;
+ }
+}
+@media (min-width: 992px) {
+ .modal-lg {
+ width: 900px;
+ }
+}
+.tooltip {
+ position: absolute;
+ z-index: 1070;
+ display: block;
+ font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
+ font-size: 12px;
+ font-style: normal;
+ font-weight: normal;
+ line-height: 1.42857143;
+ text-align: left;
+ text-align: start;
+ text-decoration: none;
+ text-shadow: none;
+ text-transform: none;
+ letter-spacing: normal;
+ word-break: normal;
+ word-spacing: normal;
+ word-wrap: normal;
+ white-space: normal;
+ filter: alpha(opacity=0);
+ opacity: 0;
+
+ line-break: auto;
+}
+.tooltip.in {
+ filter: alpha(opacity=90);
+ opacity: .9;
+}
+.tooltip.top {
+ padding: 5px 0;
+ margin-top: -3px;
+}
+.tooltip.right {
+ padding: 0 5px;
+ margin-left: 3px;
+}
+.tooltip.bottom {
+ padding: 5px 0;
+ margin-top: 3px;
+}
+.tooltip.left {
+ padding: 0 5px;
+ margin-left: -3px;
+}
+.tooltip-inner {
+ max-width: 200px;
+ padding: 3px 8px;
+ color: #fff;
+ text-align: center;
+ background-color: #000;
+ border-radius: 4px;
+}
+.tooltip-arrow {
+ position: absolute;
+ width: 0;
+ height: 0;
+ border-color: transparent;
+ border-style: solid;
+}
+.tooltip.top .tooltip-arrow {
+ bottom: 0;
+ left: 50%;
+ margin-left: -5px;
+ border-width: 5px 5px 0;
+ border-top-color: #000;
+}
+.tooltip.top-left .tooltip-arrow {
+ right: 5px;
+ bottom: 0;
+ margin-bottom: -5px;
+ border-width: 5px 5px 0;
+ border-top-color: #000;
+}
+.tooltip.top-right .tooltip-arrow {
+ bottom: 0;
+ left: 5px;
+ margin-bottom: -5px;
+ border-width: 5px 5px 0;
+ border-top-color: #000;
+}
+.tooltip.right .tooltip-arrow {
+ top: 50%;
+ left: 0;
+ margin-top: -5px;
+ border-width: 5px 5px 5px 0;
+ border-right-color: #000;
+}
+.tooltip.left .tooltip-arrow {
+ top: 50%;
+ right: 0;
+ margin-top: -5px;
+ border-width: 5px 0 5px 5px;
+ border-left-color: #000;
+}
+.tooltip.bottom .tooltip-arrow {
+ top: 0;
+ left: 50%;
+ margin-left: -5px;
+ border-width: 0 5px 5px;
+ border-bottom-color: #000;
+}
+.tooltip.bottom-left .tooltip-arrow {
+ top: 0;
+ right: 5px;
+ margin-top: -5px;
+ border-width: 0 5px 5px;
+ border-bottom-color: #000;
+}
+.tooltip.bottom-right .tooltip-arrow {
+ top: 0;
+ left: 5px;
+ margin-top: -5px;
+ border-width: 0 5px 5px;
+ border-bottom-color: #000;
+}
+.popover {
+ position: absolute;
+ top: 0;
+ left: 0;
+ z-index: 1060;
+ display: none;
+ max-width: 276px;
+ padding: 1px;
+ font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
+ font-size: 14px;
+ font-style: normal;
+ font-weight: normal;
+ line-height: 1.42857143;
+ text-align: left;
+ text-align: start;
+ text-decoration: none;
+ text-shadow: none;
+ text-transform: none;
+ letter-spacing: normal;
+ word-break: normal;
+ word-spacing: normal;
+ word-wrap: normal;
+ white-space: normal;
+ background-color: #fff;
+ -webkit-background-clip: padding-box;
+ background-clip: padding-box;
+ border: 1px solid #ccc;
+ border: 1px solid rgba(0, 0, 0, .2);
+ border-radius: 6px;
+ -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, .2);
+ box-shadow: 0 5px 10px rgba(0, 0, 0, .2);
+
+ line-break: auto;
+}
+.popover.top {
+ margin-top: -10px;
+}
+.popover.right {
+ margin-left: 10px;
+}
+.popover.bottom {
+ margin-top: 10px;
+}
+.popover.left {
+ margin-left: -10px;
+}
+.popover-title {
+ padding: 8px 14px;
+ margin: 0;
+ font-size: 14px;
+ background-color: #f7f7f7;
+ border-bottom: 1px solid #ebebeb;
+ border-radius: 5px 5px 0 0;
+}
+.popover-content {
+ padding: 9px 14px;
+}
+.popover > .arrow,
+.popover > .arrow:after {
+ position: absolute;
+ display: block;
+ width: 0;
+ height: 0;
+ border-color: transparent;
+ border-style: solid;
+}
+.popover > .arrow {
+ border-width: 11px;
+}
+.popover > .arrow:after {
+ content: "";
+ border-width: 10px;
+}
+.popover.top > .arrow {
+ bottom: -11px;
+ left: 50%;
+ margin-left: -11px;
+ border-top-color: #999;
+ border-top-color: rgba(0, 0, 0, .25);
+ border-bottom-width: 0;
+}
+.popover.top > .arrow:after {
+ bottom: 1px;
+ margin-left: -10px;
+ content: " ";
+ border-top-color: #fff;
+ border-bottom-width: 0;
+}
+.popover.right > .arrow {
+ top: 50%;
+ left: -11px;
+ margin-top: -11px;
+ border-right-color: #999;
+ border-right-color: rgba(0, 0, 0, .25);
+ border-left-width: 0;
+}
+.popover.right > .arrow:after {
+ bottom: -10px;
+ left: 1px;
+ content: " ";
+ border-right-color: #fff;
+ border-left-width: 0;
+}
+.popover.bottom > .arrow {
+ top: -11px;
+ left: 50%;
+ margin-left: -11px;
+ border-top-width: 0;
+ border-bottom-color: #999;
+ border-bottom-color: rgba(0, 0, 0, .25);
+}
+.popover.bottom > .arrow:after {
+ top: 1px;
+ margin-left: -10px;
+ content: " ";
+ border-top-width: 0;
+ border-bottom-color: #fff;
+}
+.popover.left > .arrow {
+ top: 50%;
+ right: -11px;
+ margin-top: -11px;
+ border-right-width: 0;
+ border-left-color: #999;
+ border-left-color: rgba(0, 0, 0, .25);
+}
+.popover.left > .arrow:after {
+ right: 1px;
+ bottom: -10px;
+ content: " ";
+ border-right-width: 0;
+ border-left-color: #fff;
+}
+.carousel {
+ position: relative;
+}
+.carousel-inner {
+ position: relative;
+ width: 100%;
+ overflow: hidden;
+}
+.carousel-inner > .item {
+ position: relative;
+ display: none;
+ -webkit-transition: .6s ease-in-out left;
+ -o-transition: .6s ease-in-out left;
+ transition: .6s ease-in-out left;
+}
+.carousel-inner > .item > img,
+.carousel-inner > .item > a > img {
+ line-height: 1;
+}
+@media all and (transform-3d), (-webkit-transform-3d) {
+ .carousel-inner > .item {
+ -webkit-transition: -webkit-transform .6s ease-in-out;
+ -o-transition: -o-transform .6s ease-in-out;
+ transition: transform .6s ease-in-out;
+
+ -webkit-backface-visibility: hidden;
+ backface-visibility: hidden;
+ -webkit-perspective: 1000px;
+ perspective: 1000px;
+ }
+ .carousel-inner > .item.next,
+ .carousel-inner > .item.active.right {
+ left: 0;
+ -webkit-transform: translate3d(100%, 0, 0);
+ transform: translate3d(100%, 0, 0);
+ }
+ .carousel-inner > .item.prev,
+ .carousel-inner > .item.active.left {
+ left: 0;
+ -webkit-transform: translate3d(-100%, 0, 0);
+ transform: translate3d(-100%, 0, 0);
+ }
+ .carousel-inner > .item.next.left,
+ .carousel-inner > .item.prev.right,
+ .carousel-inner > .item.active {
+ left: 0;
+ -webkit-transform: translate3d(0, 0, 0);
+ transform: translate3d(0, 0, 0);
+ }
+}
+.carousel-inner > .active,
+.carousel-inner > .next,
+.carousel-inner > .prev {
+ display: block;
+}
+.carousel-inner > .active {
+ left: 0;
+}
+.carousel-inner > .next,
+.carousel-inner > .prev {
+ position: absolute;
+ top: 0;
+ width: 100%;
+}
+.carousel-inner > .next {
+ left: 100%;
+}
+.carousel-inner > .prev {
+ left: -100%;
+}
+.carousel-inner > .next.left,
+.carousel-inner > .prev.right {
+ left: 0;
+}
+.carousel-inner > .active.left {
+ left: -100%;
+}
+.carousel-inner > .active.right {
+ left: 100%;
+}
+.carousel-control {
+ position: absolute;
+ top: 0;
+ bottom: 0;
+ left: 0;
+ width: 15%;
+ font-size: 20px;
+ color: #fff;
+ text-align: center;
+ text-shadow: 0 1px 2px rgba(0, 0, 0, .6);
+ background-color: rgba(0, 0, 0, 0);
+ filter: alpha(opacity=50);
+ opacity: .5;
+}
+.carousel-control.left {
+ background-image: -webkit-linear-gradient(left, rgba(0, 0, 0, .5) 0%, rgba(0, 0, 0, .0001) 100%);
+ background-image: -o-linear-gradient(left, rgba(0, 0, 0, .5) 0%, rgba(0, 0, 0, .0001) 100%);
+ background-image: -webkit-gradient(linear, left top, right top, from(rgba(0, 0, 0, .5)), to(rgba(0, 0, 0, .0001)));
+ background-image: linear-gradient(to right, rgba(0, 0, 0, .5) 0%, rgba(0, 0, 0, .0001) 100%);
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1);
+ background-repeat: repeat-x;
+}
+.carousel-control.right {
+ right: 0;
+ left: auto;
+ background-image: -webkit-linear-gradient(left, rgba(0, 0, 0, .0001) 0%, rgba(0, 0, 0, .5) 100%);
+ background-image: -o-linear-gradient(left, rgba(0, 0, 0, .0001) 0%, rgba(0, 0, 0, .5) 100%);
+ background-image: -webkit-gradient(linear, left top, right top, from(rgba(0, 0, 0, .0001)), to(rgba(0, 0, 0, .5)));
+ background-image: linear-gradient(to right, rgba(0, 0, 0, .0001) 0%, rgba(0, 0, 0, .5) 100%);
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1);
+ background-repeat: repeat-x;
+}
+.carousel-control:hover,
+.carousel-control:focus {
+ color: #fff;
+ text-decoration: none;
+ filter: alpha(opacity=90);
+ outline: 0;
+ opacity: .9;
+}
+.carousel-control .icon-prev,
+.carousel-control .icon-next,
+.carousel-control .glyphicon-chevron-left,
+.carousel-control .glyphicon-chevron-right {
+ position: absolute;
+ top: 50%;
+ z-index: 5;
+ display: inline-block;
+ margin-top: -10px;
+}
+.carousel-control .icon-prev,
+.carousel-control .glyphicon-chevron-left {
+ left: 50%;
+ margin-left: -10px;
+}
+.carousel-control .icon-next,
+.carousel-control .glyphicon-chevron-right {
+ right: 50%;
+ margin-right: -10px;
+}
+.carousel-control .icon-prev,
+.carousel-control .icon-next {
+ width: 20px;
+ height: 20px;
+ font-family: serif;
+ line-height: 1;
+}
+.carousel-control .icon-prev:before {
+ content: '\2039';
+}
+.carousel-control .icon-next:before {
+ content: '\203a';
+}
+.carousel-indicators {
+ position: absolute;
+ bottom: 10px;
+ left: 50%;
+ z-index: 15;
+ width: 60%;
+ padding-left: 0;
+ margin-left: -30%;
+ text-align: center;
+ list-style: none;
+}
+.carousel-indicators li {
+ display: inline-block;
+ width: 10px;
+ height: 10px;
+ margin: 1px;
+ text-indent: -999px;
+ cursor: pointer;
+ background-color: #000 \9;
+ background-color: rgba(0, 0, 0, 0);
+ border: 1px solid #fff;
+ border-radius: 10px;
+}
+.carousel-indicators .active {
+ width: 12px;
+ height: 12px;
+ margin: 0;
+ background-color: #fff;
+}
+.carousel-caption {
+ position: absolute;
+ right: 15%;
+ bottom: 20px;
+ left: 15%;
+ z-index: 10;
+ padding-top: 20px;
+ padding-bottom: 20px;
+ color: #fff;
+ text-align: center;
+ text-shadow: 0 1px 2px rgba(0, 0, 0, .6);
+}
+.carousel-caption .btn {
+ text-shadow: none;
+}
+@media screen and (min-width: 768px) {
+ .carousel-control .glyphicon-chevron-left,
+ .carousel-control .glyphicon-chevron-right,
+ .carousel-control .icon-prev,
+ .carousel-control .icon-next {
+ width: 30px;
+ height: 30px;
+ margin-top: -10px;
+ font-size: 30px;
+ }
+ .carousel-control .glyphicon-chevron-left,
+ .carousel-control .icon-prev {
+ margin-left: -10px;
+ }
+ .carousel-control .glyphicon-chevron-right,
+ .carousel-control .icon-next {
+ margin-right: -10px;
+ }
+ .carousel-caption {
+ right: 20%;
+ left: 20%;
+ padding-bottom: 30px;
+ }
+ .carousel-indicators {
+ bottom: 20px;
+ }
+}
+.clearfix:before,
+.clearfix:after,
+.dl-horizontal dd:before,
+.dl-horizontal dd:after,
+.container:before,
+.container:after,
+.container-fluid:before,
+.container-fluid:after,
+.row:before,
+.row:after,
+.form-horizontal .form-group:before,
+.form-horizontal .form-group:after,
+.btn-toolbar:before,
+.btn-toolbar:after,
+.btn-group-vertical > .btn-group:before,
+.btn-group-vertical > .btn-group:after,
+.nav:before,
+.nav:after,
+.navbar:before,
+.navbar:after,
+.navbar-header:before,
+.navbar-header:after,
+.navbar-collapse:before,
+.navbar-collapse:after,
+.pager:before,
+.pager:after,
+.panel-body:before,
+.panel-body:after,
+.modal-header:before,
+.modal-header:after,
+.modal-footer:before,
+.modal-footer:after {
+ display: table;
+ content: " ";
+}
+.clearfix:after,
+.dl-horizontal dd:after,
+.container:after,
+.container-fluid:after,
+.row:after,
+.form-horizontal .form-group:after,
+.btn-toolbar:after,
+.btn-group-vertical > .btn-group:after,
+.nav:after,
+.navbar:after,
+.navbar-header:after,
+.navbar-collapse:after,
+.pager:after,
+.panel-body:after,
+.modal-header:after,
+.modal-footer:after {
+ clear: both;
+}
+.center-block {
+ display: block;
+ margin-right: auto;
+ margin-left: auto;
+}
+.pull-right {
+ float: right !important;
+}
+.pull-left {
+ float: left !important;
+}
+.hide {
+ display: none !important;
+}
+.show {
+ display: block !important;
+}
+.invisible {
+ visibility: hidden;
+}
+.text-hide {
+ font: 0/0 a;
+ color: transparent;
+ text-shadow: none;
+ background-color: transparent;
+ border: 0;
+}
+.hidden {
+ display: none !important;
+}
+.affix {
+ position: fixed;
+}
+@-ms-viewport {
+ width: device-width;
+}
+.visible-xs,
+.visible-sm,
+.visible-md,
+.visible-lg {
+ display: none !important;
+}
+.visible-xs-block,
+.visible-xs-inline,
+.visible-xs-inline-block,
+.visible-sm-block,
+.visible-sm-inline,
+.visible-sm-inline-block,
+.visible-md-block,
+.visible-md-inline,
+.visible-md-inline-block,
+.visible-lg-block,
+.visible-lg-inline,
+.visible-lg-inline-block {
+ display: none !important;
+}
+@media (max-width: 767px) {
+ .visible-xs {
+ display: block !important;
+ }
+ table.visible-xs {
+ display: table !important;
+ }
+ tr.visible-xs {
+ display: table-row !important;
+ }
+ th.visible-xs,
+ td.visible-xs {
+ display: table-cell !important;
+ }
+}
+@media (max-width: 767px) {
+ .visible-xs-block {
+ display: block !important;
+ }
+}
+@media (max-width: 767px) {
+ .visible-xs-inline {
+ display: inline !important;
+ }
+}
+@media (max-width: 767px) {
+ .visible-xs-inline-block {
+ display: inline-block !important;
+ }
+}
+@media (min-width: 768px) and (max-width: 991px) {
+ .visible-sm {
+ display: block !important;
+ }
+ table.visible-sm {
+ display: table !important;
+ }
+ tr.visible-sm {
+ display: table-row !important;
+ }
+ th.visible-sm,
+ td.visible-sm {
+ display: table-cell !important;
+ }
+}
+@media (min-width: 768px) and (max-width: 991px) {
+ .visible-sm-block {
+ display: block !important;
+ }
+}
+@media (min-width: 768px) and (max-width: 991px) {
+ .visible-sm-inline {
+ display: inline !important;
+ }
+}
+@media (min-width: 768px) and (max-width: 991px) {
+ .visible-sm-inline-block {
+ display: inline-block !important;
+ }
+}
+@media (min-width: 992px) and (max-width: 1199px) {
+ .visible-md {
+ display: block !important;
+ }
+ table.visible-md {
+ display: table !important;
+ }
+ tr.visible-md {
+ display: table-row !important;
+ }
+ th.visible-md,
+ td.visible-md {
+ display: table-cell !important;
+ }
+}
+@media (min-width: 992px) and (max-width: 1199px) {
+ .visible-md-block {
+ display: block !important;
+ }
+}
+@media (min-width: 992px) and (max-width: 1199px) {
+ .visible-md-inline {
+ display: inline !important;
+ }
+}
+@media (min-width: 992px) and (max-width: 1199px) {
+ .visible-md-inline-block {
+ display: inline-block !important;
+ }
+}
+@media (min-width: 1200px) {
+ .visible-lg {
+ display: block !important;
+ }
+ table.visible-lg {
+ display: table !important;
+ }
+ tr.visible-lg {
+ display: table-row !important;
+ }
+ th.visible-lg,
+ td.visible-lg {
+ display: table-cell !important;
+ }
+}
+@media (min-width: 1200px) {
+ .visible-lg-block {
+ display: block !important;
+ }
+}
+@media (min-width: 1200px) {
+ .visible-lg-inline {
+ display: inline !important;
+ }
+}
+@media (min-width: 1200px) {
+ .visible-lg-inline-block {
+ display: inline-block !important;
+ }
+}
+@media (max-width: 767px) {
+ .hidden-xs {
+ display: none !important;
+ }
+}
+@media (min-width: 768px) and (max-width: 991px) {
+ .hidden-sm {
+ display: none !important;
+ }
+}
+@media (min-width: 992px) and (max-width: 1199px) {
+ .hidden-md {
+ display: none !important;
+ }
+}
+@media (min-width: 1200px) {
+ .hidden-lg {
+ display: none !important;
+ }
+}
+.visible-print {
+ display: none !important;
+}
+@media print {
+ .visible-print {
+ display: block !important;
+ }
+ table.visible-print {
+ display: table !important;
+ }
+ tr.visible-print {
+ display: table-row !important;
+ }
+ th.visible-print,
+ td.visible-print {
+ display: table-cell !important;
+ }
+}
+.visible-print-block {
+ display: none !important;
+}
+@media print {
+ .visible-print-block {
+ display: block !important;
+ }
+}
+.visible-print-inline {
+ display: none !important;
+}
+@media print {
+ .visible-print-inline {
+ display: inline !important;
+ }
+}
+.visible-print-inline-block {
+ display: none !important;
+}
+@media print {
+ .visible-print-inline-block {
+ display: inline-block !important;
+ }
+}
+@media print {
+ .hidden-print {
+ display: none !important;
+ }
+}
+/*# sourceMappingURL=bootstrap.css.map */
+
diff --git a/op25/gr-op25_repeater/apps/oplog/op25/static/css/datatables/jquery.dataTables-dark.css b/op25/gr-op25_repeater/apps/oplog/op25/static/css/datatables/jquery.dataTables-dark.css
new file mode 100644
index 0000000..98ded91
--- /dev/null
+++ b/op25/gr-op25_repeater/apps/oplog/op25/static/css/datatables/jquery.dataTables-dark.css
@@ -0,0 +1,461 @@
+/*
+ * Table styles
+ */
+table.dataTable {
+ width: 100%;
+ margin: 0 auto;
+ clear: both;
+ border-collapse: separate;
+ border-spacing: 0;
+ /*
+ * Header and footer styles
+ */
+ /*
+ * Body styles
+ */
+}
+
+
+table.dataTable thead th,
+table.dataTable tfoot th {
+ font-weight: bold;
+}
+table.dataTable thead th,
+table.dataTable thead td {
+ padding: 10px 18px;
+ border-bottom: 1px solid #dddddd;
+}
+table.dataTable thead th:active,
+table.dataTable thead td:active {
+ outline: none;
+}
+table.dataTable tfoot th,
+table.dataTable tfoot td {
+ padding: 10px 18px 6px 18px;
+ border-top: 1px solid #dddddd;
+}
+table.dataTable thead .sorting,
+table.dataTable thead .sorting_asc,
+table.dataTable thead .sorting_desc,
+table.dataTable thead .sorting_asc_disabled,
+table.dataTable thead .sorting_desc_disabled {
+ cursor: pointer;
+ *cursor: hand;
+ background-repeat: no-repeat;
+ background-position: center right;
+}
+table.dataTable thead .sorting {
+ background-image: url("../images/sort_both.png");
+}
+table.dataTable thead .sorting_asc {
+ background-image: url("../images/sort_asc.png") !important;
+}
+table.dataTable thead .sorting_desc {
+ background-image: url("../images/sort_desc.png") !important;
+}
+table.dataTable thead .sorting_asc_disabled {
+ background-image: url("../images/sort_asc_disabled.png");
+}
+table.dataTable thead .sorting_desc_disabled {
+ background-image: url("../images/sort_desc_disabled.png");
+}
+table.dataTable tbody tr {
+ background-color: #333333;
+}
+table.dataTable tbody tr.selected {
+ background-color: #666666;
+}
+table.dataTable tbody th,
+table.dataTable tbody td {
+ padding: 8px 10px;
+}
+table.dataTable.row-border tbody th, table.dataTable.row-border tbody td, table.dataTable.display tbody th, table.dataTable.display tbody td {
+ border-top: 1px solid #111111;
+}
+table.dataTable.row-border tbody tr:first-child th,
+table.dataTable.row-border tbody tr:first-child td, table.dataTable.display tbody tr:first-child th,
+table.dataTable.display tbody tr:first-child td {
+ border-top: none;
+}
+table.dataTable.cell-border tbody th, table.dataTable.cell-border tbody td {
+ border-top: 1px solid #111111;
+ border-right: 1px solid #111111;
+}
+table.dataTable.cell-border tbody tr th:first-child,
+table.dataTable.cell-border tbody tr td:first-child {
+ border-left: 1px solid #111111;
+}
+table.dataTable.cell-border tbody tr:first-child th,
+table.dataTable.cell-border tbody tr:first-child td {
+ border-top: none;
+}
+table.dataTable.stripe tbody tr.odd, table.dataTable.display tbody tr.odd {
+ background-color: #323232;
+}
+table.dataTable.stripe tbody tr.odd.selected, table.dataTable.display tbody tr.odd.selected {
+ background-color: #646464;
+}
+table.dataTable.hover tbody tr:hover, table.dataTable.display tbody tr:hover {
+ background-color: #313131;
+}
+table.dataTable.hover tbody tr:hover.selected, table.dataTable.display tbody tr:hover.selected {
+ background-color: #626262;
+}
+table.dataTable.order-column tbody tr > .sorting_1,
+table.dataTable.order-column tbody tr > .sorting_2,
+table.dataTable.order-column tbody tr > .sorting_3, table.dataTable.display tbody tr > .sorting_1,
+table.dataTable.display tbody tr > .sorting_2,
+table.dataTable.display tbody tr > .sorting_3 {
+ background-color: #323232;
+}
+table.dataTable.order-column tbody tr.selected > .sorting_1,
+table.dataTable.order-column tbody tr.selected > .sorting_2,
+table.dataTable.order-column tbody tr.selected > .sorting_3, table.dataTable.display tbody tr.selected > .sorting_1,
+table.dataTable.display tbody tr.selected > .sorting_2,
+table.dataTable.display tbody tr.selected > .sorting_3 {
+ background-color: #646464;
+}
+table.dataTable.display tbody tr.odd > .sorting_1, table.dataTable.order-column.stripe tbody tr.odd > .sorting_1 {
+ background-color: #303030;
+}
+table.dataTable.display tbody tr.odd > .sorting_2, table.dataTable.order-column.stripe tbody tr.odd > .sorting_2 {
+ background-color: #313131;
+}
+table.dataTable.display tbody tr.odd > .sorting_3, table.dataTable.order-column.stripe tbody tr.odd > .sorting_3 {
+ background-color: #313131;
+}
+table.dataTable.display tbody tr.odd.selected > .sorting_1, table.dataTable.order-column.stripe tbody tr.odd.selected > .sorting_1 {
+ background-color: #606060;
+}
+table.dataTable.display tbody tr.odd.selected > .sorting_2, table.dataTable.order-column.stripe tbody tr.odd.selected > .sorting_2 {
+ background-color: #616161;
+}
+table.dataTable.display tbody tr.odd.selected > .sorting_3, table.dataTable.order-column.stripe tbody tr.odd.selected > .sorting_3 {
+ background-color: #626262;
+}
+table.dataTable.display tbody tr.even > .sorting_1, table.dataTable.order-column.stripe tbody tr.even > .sorting_1 {
+ background-color: #323232;
+}
+table.dataTable.display tbody tr.even > .sorting_2, table.dataTable.order-column.stripe tbody tr.even > .sorting_2 {
+ background-color: #323232;
+}
+table.dataTable.display tbody tr.even > .sorting_3, table.dataTable.order-column.stripe tbody tr.even > .sorting_3 {
+ background-color: #333333;
+}
+table.dataTable.display tbody tr.even.selected > .sorting_1, table.dataTable.order-column.stripe tbody tr.even.selected > .sorting_1 {
+ background-color: #646464;
+}
+table.dataTable.display tbody tr.even.selected > .sorting_2, table.dataTable.order-column.stripe tbody tr.even.selected > .sorting_2 {
+ background-color: #656565;
+}
+table.dataTable.display tbody tr.even.selected > .sorting_3, table.dataTable.order-column.stripe tbody tr.even.selected > .sorting_3 {
+ background-color: #666666;
+}
+table.dataTable.display tbody tr:hover > .sorting_1, table.dataTable.order-column.hover tbody tr:hover > .sorting_1 {
+ background-color: #2f2f2f;
+}
+table.dataTable.display tbody tr:hover > .sorting_2, table.dataTable.order-column.hover tbody tr:hover > .sorting_2 {
+ background-color: #2f2f2f;
+}
+table.dataTable.display tbody tr:hover > .sorting_3, table.dataTable.order-column.hover tbody tr:hover > .sorting_3 {
+ background-color: #303030;
+}
+table.dataTable.display tbody tr:hover.selected > .sorting_1, table.dataTable.order-column.hover tbody tr:hover.selected > .sorting_1 {
+ background-color: #5e5e5e;
+}
+table.dataTable.display tbody tr:hover.selected > .sorting_2, table.dataTable.order-column.hover tbody tr:hover.selected > .sorting_2 {
+ background-color: #5e5e5e;
+}
+table.dataTable.display tbody tr:hover.selected > .sorting_3, table.dataTable.order-column.hover tbody tr:hover.selected > .sorting_3 {
+ background-color: #606060;
+}
+table.dataTable.no-footer {
+ border-bottom: 1px solid #dddddd;
+}
+table.dataTable.nowrap th, table.dataTable.nowrap td {
+ white-space: nowrap;
+}
+table.dataTable.compact thead th,
+table.dataTable.compact thead td {
+ padding: 4px 17px;
+}
+table.dataTable.compact tfoot th,
+table.dataTable.compact tfoot td {
+ padding: 4px;
+}
+table.dataTable.compact tbody th,
+table.dataTable.compact tbody td {
+ padding: 4px;
+}
+table.dataTable th.dt-left,
+table.dataTable td.dt-left {
+ text-align: left;
+}
+table.dataTable th.dt-center,
+table.dataTable td.dt-center,
+table.dataTable td.dataTables_empty {
+ text-align: center;
+}
+table.dataTable th.dt-right,
+table.dataTable td.dt-right {
+ text-align: right;
+}
+table.dataTable th.dt-justify,
+table.dataTable td.dt-justify {
+ text-align: justify;
+}
+table.dataTable th.dt-nowrap,
+table.dataTable td.dt-nowrap {
+ white-space: nowrap;
+}
+table.dataTable thead th.dt-head-left,
+table.dataTable thead td.dt-head-left,
+table.dataTable tfoot th.dt-head-left,
+table.dataTable tfoot td.dt-head-left {
+ text-align: left;
+}
+table.dataTable thead th.dt-head-center,
+table.dataTable thead td.dt-head-center,
+table.dataTable tfoot th.dt-head-center,
+table.dataTable tfoot td.dt-head-center {
+ text-align: center;
+}
+table.dataTable thead th.dt-head-right,
+table.dataTable thead td.dt-head-right,
+table.dataTable tfoot th.dt-head-right,
+table.dataTable tfoot td.dt-head-right {
+ text-align: right;
+}
+table.dataTable thead th.dt-head-justify,
+table.dataTable thead td.dt-head-justify,
+table.dataTable tfoot th.dt-head-justify,
+table.dataTable tfoot td.dt-head-justify {
+ text-align: justify;
+}
+table.dataTable thead th.dt-head-nowrap,
+table.dataTable thead td.dt-head-nowrap,
+table.dataTable tfoot th.dt-head-nowrap,
+table.dataTable tfoot td.dt-head-nowrap {
+ white-space: nowrap;
+}
+table.dataTable tbody th.dt-body-left,
+table.dataTable tbody td.dt-body-left {
+ text-align: left;
+}
+table.dataTable tbody th.dt-body-center,
+table.dataTable tbody td.dt-body-center {
+ text-align: center;
+}
+table.dataTable tbody th.dt-body-right,
+table.dataTable tbody td.dt-body-right {
+ text-align: right;
+}
+table.dataTable tbody th.dt-body-justify,
+table.dataTable tbody td.dt-body-justify {
+ text-align: justify;
+}
+table.dataTable tbody th.dt-body-nowrap,
+table.dataTable tbody td.dt-body-nowrap {
+ white-space: nowrap;
+}
+
+table.dataTable,
+table.dataTable th,
+table.dataTable td {
+ box-sizing: content-box;
+}
+
+/*
+ * Control feature layout
+ */
+.dataTables_wrapper {
+ position: relative;
+ clear: both;
+ *zoom: 1;
+ zoom: 1;
+}
+.dataTables_wrapper .dataTables_length {
+ float: left;
+}
+.dataTables_wrapper .dataTables_length select {
+ border: 1px solid #aaa;
+ border-radius: 3px;
+ padding: 5px;
+ background-color: transparent;
+ padding: 4px;
+}
+.dataTables_wrapper .dataTables_filter {
+ float: right;
+ text-align: right;
+}
+.dataTables_wrapper .dataTables_filter input {
+ border: 1px solid #aaa;
+ border-radius: 3px;
+ padding: 5px;
+ background-color: transparent;
+ margin-left: 3px;
+}
+.dataTables_wrapper .dataTables_info {
+ clear: both;
+ float: left;
+ padding-top: 0.755em;
+}
+.dataTables_wrapper .dataTables_paginate {
+ float: right;
+ text-align: right;
+ padding-top: 0.25em;
+}
+.dataTables_wrapper .dataTables_paginate .paginate_button {
+ box-sizing: border-box;
+ display: inline-block;
+ min-width: 1.5em;
+ padding: 0.5em 1em;
+ margin-left: 2px;
+ text-align: center;
+ text-decoration: none !important;
+ cursor: pointer;
+ *cursor: hand;
+ color: #aaaaaa !important;
+ border: 1px solid transparent;
+ border-radius: 2px;
+}
+.dataTables_wrapper .dataTables_paginate .paginate_button.current, .dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
+ color: #aaaaaa !important;
+ border: 1px solid #979797;
+ background-color: white;
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, white), color-stop(100%, #dcdcdc));
+ /* Chrome,Safari4+ */
+ background: -webkit-linear-gradient(top, white 0%, #dcdcdc 100%);
+ /* Chrome10+,Safari5.1+ */
+ background: -moz-linear-gradient(top, white 0%, #dcdcdc 100%);
+ /* FF3.6+ */
+ background: -ms-linear-gradient(top, white 0%, #dcdcdc 100%);
+ /* IE10+ */
+ background: -o-linear-gradient(top, white 0%, #dcdcdc 100%);
+ /* Opera 11.10+ */
+ background: linear-gradient(to bottom, white 0%, #dcdcdc 100%);
+ /* W3C */
+}
+.dataTables_wrapper .dataTables_paginate .paginate_button.disabled, .dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover, .dataTables_wrapper .dataTables_paginate .paginate_button.disabled:active {
+ cursor: default;
+ color: #666 !important;
+ border: 1px solid transparent;
+ background: transparent;
+ box-shadow: none;
+}
+.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
+ color: white !important;
+ border: 1px solid #375a7f;
+ background-color: #7ea1c7;
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #7ea1c7), color-stop(100%, #375a7f));
+ /* Chrome,Safari4+ */
+ background: -webkit-linear-gradient(top, #7ea1c7 0%, #375a7f 100%);
+ /* Chrome10+,Safari5.1+ */
+ background: -moz-linear-gradient(top, #7ea1c7 0%, #375a7f 100%);
+ /* FF3.6+ */
+ background: -ms-linear-gradient(top, #7ea1c7 0%, #375a7f 100%);
+ /* IE10+ */
+ background: -o-linear-gradient(top, #7ea1c7 0%, #375a7f 100%);
+ /* Opera 11.10+ */
+ background: linear-gradient(to bottom, #7ea1c7 0%, #375a7f 100%);
+ /* W3C */
+}
+.dataTables_wrapper .dataTables_paginate .paginate_button:active {
+ outline: none;
+ background-color: #4673a3;
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #4673a3), color-stop(100%, #345578));
+ /* Chrome,Safari4+ */
+ background: -webkit-linear-gradient(top, #4673a3 0%, #345578 100%);
+ /* Chrome10+,Safari5.1+ */
+ background: -moz-linear-gradient(top, #4673a3 0%, #345578 100%);
+ /* FF3.6+ */
+ background: -ms-linear-gradient(top, #4673a3 0%, #345578 100%);
+ /* IE10+ */
+ background: -o-linear-gradient(top, #4673a3 0%, #345578 100%);
+ /* Opera 11.10+ */
+ background: linear-gradient(to bottom, #4673a3 0%, #345578 100%);
+ /* W3C */
+ box-shadow: inset 0 0 3px #111;
+}
+.dataTables_wrapper .dataTables_paginate .ellipsis {
+ padding: 0 1em;
+}
+.dataTables_wrapper .dataTables_processing {
+ position: absolute;
+ top: 50%;
+ left: 50%;
+ width: 100%;
+ height: 90px;
+ margin-left: -50%;
+ margin-top: -25px;
+ padding-top: 20px;
+ text-align: center;
+ font-size: 2.0em;
+ background-color: white;
+ background: -webkit-gradient(linear, left top, right top, color-stop(0%, rgba(51, 51, 51, 0)), color-stop(25%, rgba(51, 51, 51, 0.9)), color-stop(75%, rgba(51, 51, 51, 0.9)), color-stop(100%, rgba(255, 255, 255, 0)));
+ background: -webkit-linear-gradient(left, rgba(51, 51, 51, 0) 0%, rgba(51, 51, 51, 0.9) 25%, rgba(51, 51, 51, 0.9) 75%, rgba(51, 51, 51, 0) 100%);
+ background: -moz-linear-gradient(left, rgba(51, 51, 51, 0) 0%, rgba(51, 51, 51, 0.9) 25%, rgba(51, 51, 51, 0.9) 75%, rgba(51, 51, 51, 0) 100%);
+ background: -ms-linear-gradient(left, rgba(51, 51, 51, 0) 0%, rgba(51, 51, 51, 0.9) 25%, rgba(51, 51, 51, 0.9) 75%, rgba(51, 51, 51, 0) 100%);
+ background: -o-linear-gradient(left, rgba(51, 51, 51, 0) 0%, rgba(51, 51, 51, 0.9) 25%, rgba(51, 51, 51, 0.9) 75%, rgba(51, 51, 51, 0) 100%);
+ background: linear-gradient(to right, rgba(51, 51, 51, 0) 0%, rgba(51, 51, 51, 0.9) 25%, rgba(51, 51, 51, 0.9) 75%, rgba(51, 51, 51, 0) 100%);
+}
+.dataTables_wrapper .dataTables_length,
+.dataTables_wrapper .dataTables_filter,
+.dataTables_wrapper .dataTables_info,
+.dataTables_wrapper .dataTables_processing,
+.dataTables_wrapper .dataTables_paginate {
+ color: #aaaaaa;
+}
+.dataTables_wrapper .dataTables_scroll {
+ clear: both;
+}
+.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody {
+ *margin-top: -1px;
+ -webkit-overflow-scrolling: touch;
+}
+.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > thead > tr > th, .dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > thead > tr > td, .dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > tbody > tr > th, .dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > tbody > tr > td {
+ vertical-align: middle;
+}
+.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > thead > tr > th > div.dataTables_sizing,
+.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > thead > tr > td > div.dataTables_sizing, .dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > tbody > tr > th > div.dataTables_sizing,
+.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > tbody > tr > td > div.dataTables_sizing {
+ height: 0;
+ overflow: hidden;
+ margin: 0 !important;
+ padding: 0 !important;
+}
+.dataTables_wrapper.no-footer .dataTables_scrollBody {
+ border-bottom: 1px solid #dddddd;
+}
+.dataTables_wrapper.no-footer div.dataTables_scrollHead table.dataTable,
+.dataTables_wrapper.no-footer div.dataTables_scrollBody > table {
+ border-bottom: none;
+}
+.dataTables_wrapper:after {
+ visibility: hidden;
+ display: block;
+ content: "";
+ clear: both;
+ height: 0;
+}
+
+@media screen and (max-width: 767px) {
+ .dataTables_wrapper .dataTables_info,
+.dataTables_wrapper .dataTables_paginate {
+ float: none;
+ text-align: center;
+ }
+ .dataTables_wrapper .dataTables_paginate {
+ margin-top: 0.5em;
+ }
+}
+@media screen and (max-width: 640px) {
+ .dataTables_wrapper .dataTables_length,
+.dataTables_wrapper .dataTables_filter {
+ float: none;
+ text-align: center;
+ }
+ .dataTables_wrapper .dataTables_filter {
+ margin-top: 0.5em;
+ }
+} \ No newline at end of file
diff --git a/op25/gr-op25_repeater/apps/oplog/op25/static/css/datatables/jquery.dataTables.css b/op25/gr-op25_repeater/apps/oplog/op25/static/css/datatables/jquery.dataTables.css
new file mode 100644
index 0000000..91cc0b5
--- /dev/null
+++ b/op25/gr-op25_repeater/apps/oplog/op25/static/css/datatables/jquery.dataTables.css
@@ -0,0 +1,453 @@
+/*
+ * Table styles
+ */
+table.dataTable {
+ width: 100%;
+ margin: 0 auto;
+ clear: both;
+ border-collapse: separate;
+ border-spacing: 0;
+ /*
+ * Header and footer styles
+ */
+ /*
+ * Body styles
+ */
+}
+table.dataTable thead th,
+table.dataTable tfoot th {
+ font-weight: bold;
+}
+table.dataTable thead th,
+table.dataTable thead td {
+ padding: 10px 18px;
+ border-bottom: 1px solid #111;
+}
+table.dataTable thead th:active,
+table.dataTable thead td:active {
+ outline: none;
+}
+table.dataTable tfoot th,
+table.dataTable tfoot td {
+ padding: 10px 18px 6px 18px;
+ border-top: 1px solid #111;
+}
+table.dataTable thead .sorting,
+table.dataTable thead .sorting_asc,
+table.dataTable thead .sorting_desc {
+ cursor: pointer;
+ *cursor: hand;
+}
+table.dataTable thead .sorting,
+table.dataTable thead .sorting_asc,
+table.dataTable thead .sorting_desc,
+table.dataTable thead .sorting_asc_disabled,
+table.dataTable thead .sorting_desc_disabled {
+ background-repeat: no-repeat;
+ background-position: center right;
+}
+table.dataTable thead .sorting {
+ background-image: url("../images/sort_both.png");
+}
+table.dataTable thead .sorting_asc {
+ background-image: url("../images/sort_asc.png");
+}
+table.dataTable thead .sorting_desc {
+ background-image: url("../images/sort_desc.png");
+}
+table.dataTable thead .sorting_asc_disabled {
+ background-image: url("../images/sort_asc_disabled.png");
+}
+table.dataTable thead .sorting_desc_disabled {
+ background-image: url("../images/sort_desc_disabled.png");
+}
+table.dataTable tbody tr {
+ background-color: #ffffff;
+}
+table.dataTable tbody tr.selected {
+ background-color: #B0BED9;
+}
+table.dataTable tbody th,
+table.dataTable tbody td {
+ padding: 8px 10px;
+}
+table.dataTable.row-border tbody th, table.dataTable.row-border tbody td, table.dataTable.display tbody th, table.dataTable.display tbody td {
+ border-top: 1px solid #ddd;
+}
+table.dataTable.row-border tbody tr:first-child th,
+table.dataTable.row-border tbody tr:first-child td, table.dataTable.display tbody tr:first-child th,
+table.dataTable.display tbody tr:first-child td {
+ border-top: none;
+}
+table.dataTable.cell-border tbody th, table.dataTable.cell-border tbody td {
+ border-top: 1px solid #ddd;
+ border-right: 1px solid #ddd;
+}
+table.dataTable.cell-border tbody tr th:first-child,
+table.dataTable.cell-border tbody tr td:first-child {
+ border-left: 1px solid #ddd;
+}
+table.dataTable.cell-border tbody tr:first-child th,
+table.dataTable.cell-border tbody tr:first-child td {
+ border-top: none;
+}
+table.dataTable.stripe tbody tr.odd, table.dataTable.display tbody tr.odd {
+ background-color: #f9f9f9;
+}
+table.dataTable.stripe tbody tr.odd.selected, table.dataTable.display tbody tr.odd.selected {
+ background-color: #acbad4;
+}
+table.dataTable.hover tbody tr:hover, table.dataTable.display tbody tr:hover {
+ background-color: #f6f6f6;
+}
+table.dataTable.hover tbody tr:hover.selected, table.dataTable.display tbody tr:hover.selected {
+ background-color: #aab7d1;
+}
+table.dataTable.order-column tbody tr > .sorting_1,
+table.dataTable.order-column tbody tr > .sorting_2,
+table.dataTable.order-column tbody tr > .sorting_3, table.dataTable.display tbody tr > .sorting_1,
+table.dataTable.display tbody tr > .sorting_2,
+table.dataTable.display tbody tr > .sorting_3 {
+ background-color: #fafafa;
+}
+table.dataTable.order-column tbody tr.selected > .sorting_1,
+table.dataTable.order-column tbody tr.selected > .sorting_2,
+table.dataTable.order-column tbody tr.selected > .sorting_3, table.dataTable.display tbody tr.selected > .sorting_1,
+table.dataTable.display tbody tr.selected > .sorting_2,
+table.dataTable.display tbody tr.selected > .sorting_3 {
+ background-color: #acbad5;
+}
+table.dataTable.display tbody tr.odd > .sorting_1, table.dataTable.order-column.stripe tbody tr.odd > .sorting_1 {
+ background-color: #f1f1f1;
+}
+table.dataTable.display tbody tr.odd > .sorting_2, table.dataTable.order-column.stripe tbody tr.odd > .sorting_2 {
+ background-color: #f3f3f3;
+}
+table.dataTable.display tbody tr.odd > .sorting_3, table.dataTable.order-column.stripe tbody tr.odd > .sorting_3 {
+ background-color: whitesmoke;
+}
+table.dataTable.display tbody tr.odd.selected > .sorting_1, table.dataTable.order-column.stripe tbody tr.odd.selected > .sorting_1 {
+ background-color: #a6b4cd;
+}
+table.dataTable.display tbody tr.odd.selected > .sorting_2, table.dataTable.order-column.stripe tbody tr.odd.selected > .sorting_2 {
+ background-color: #a8b5cf;
+}
+table.dataTable.display tbody tr.odd.selected > .sorting_3, table.dataTable.order-column.stripe tbody tr.odd.selected > .sorting_3 {
+ background-color: #a9b7d1;
+}
+table.dataTable.display tbody tr.even > .sorting_1, table.dataTable.order-column.stripe tbody tr.even > .sorting_1 {
+ background-color: #fafafa;
+}
+table.dataTable.display tbody tr.even > .sorting_2, table.dataTable.order-column.stripe tbody tr.even > .sorting_2 {
+ background-color: #fcfcfc;
+}
+table.dataTable.display tbody tr.even > .sorting_3, table.dataTable.order-column.stripe tbody tr.even > .sorting_3 {
+ background-color: #fefefe;
+}
+table.dataTable.display tbody tr.even.selected > .sorting_1, table.dataTable.order-column.stripe tbody tr.even.selected > .sorting_1 {
+ background-color: #acbad5;
+}
+table.dataTable.display tbody tr.even.selected > .sorting_2, table.dataTable.order-column.stripe tbody tr.even.selected > .sorting_2 {
+ background-color: #aebcd6;
+}
+table.dataTable.display tbody tr.even.selected > .sorting_3, table.dataTable.order-column.stripe tbody tr.even.selected > .sorting_3 {
+ background-color: #afbdd8;
+}
+table.dataTable.display tbody tr:hover > .sorting_1, table.dataTable.order-column.hover tbody tr:hover > .sorting_1 {
+ background-color: #eaeaea;
+}
+table.dataTable.display tbody tr:hover > .sorting_2, table.dataTable.order-column.hover tbody tr:hover > .sorting_2 {
+ background-color: #ececec;
+}
+table.dataTable.display tbody tr:hover > .sorting_3, table.dataTable.order-column.hover tbody tr:hover > .sorting_3 {
+ background-color: #efefef;
+}
+table.dataTable.display tbody tr:hover.selected > .sorting_1, table.dataTable.order-column.hover tbody tr:hover.selected > .sorting_1 {
+ background-color: #a2aec7;
+}
+table.dataTable.display tbody tr:hover.selected > .sorting_2, table.dataTable.order-column.hover tbody tr:hover.selected > .sorting_2 {
+ background-color: #a3b0c9;
+}
+table.dataTable.display tbody tr:hover.selected > .sorting_3, table.dataTable.order-column.hover tbody tr:hover.selected > .sorting_3 {
+ background-color: #a5b2cb;
+}
+table.dataTable.no-footer {
+ border-bottom: 1px solid #111;
+}
+table.dataTable.nowrap th, table.dataTable.nowrap td {
+ white-space: nowrap;
+}
+table.dataTable.compact thead th,
+table.dataTable.compact thead td {
+ padding: 4px 17px 4px 4px;
+}
+table.dataTable.compact tfoot th,
+table.dataTable.compact tfoot td {
+ padding: 4px;
+}
+table.dataTable.compact tbody th,
+table.dataTable.compact tbody td {
+ padding: 4px;
+}
+table.dataTable th.dt-left,
+table.dataTable td.dt-left {
+ text-align: left;
+}
+table.dataTable th.dt-center,
+table.dataTable td.dt-center,
+table.dataTable td.dataTables_empty {
+ text-align: center;
+}
+table.dataTable th.dt-right,
+table.dataTable td.dt-right {
+ text-align: right;
+}
+table.dataTable th.dt-justify,
+table.dataTable td.dt-justify {
+ text-align: justify;
+}
+table.dataTable th.dt-nowrap,
+table.dataTable td.dt-nowrap {
+ white-space: nowrap;
+}
+table.dataTable thead th.dt-head-left,
+table.dataTable thead td.dt-head-left,
+table.dataTable tfoot th.dt-head-left,
+table.dataTable tfoot td.dt-head-left {
+ text-align: left;
+}
+table.dataTable thead th.dt-head-center,
+table.dataTable thead td.dt-head-center,
+table.dataTable tfoot th.dt-head-center,
+table.dataTable tfoot td.dt-head-center {
+ text-align: center;
+}
+table.dataTable thead th.dt-head-right,
+table.dataTable thead td.dt-head-right,
+table.dataTable tfoot th.dt-head-right,
+table.dataTable tfoot td.dt-head-right {
+ text-align: right;
+}
+table.dataTable thead th.dt-head-justify,
+table.dataTable thead td.dt-head-justify,
+table.dataTable tfoot th.dt-head-justify,
+table.dataTable tfoot td.dt-head-justify {
+ text-align: justify;
+}
+table.dataTable thead th.dt-head-nowrap,
+table.dataTable thead td.dt-head-nowrap,
+table.dataTable tfoot th.dt-head-nowrap,
+table.dataTable tfoot td.dt-head-nowrap {
+ white-space: nowrap;
+}
+table.dataTable tbody th.dt-body-left,
+table.dataTable tbody td.dt-body-left {
+ text-align: left;
+}
+table.dataTable tbody th.dt-body-center,
+table.dataTable tbody td.dt-body-center {
+ text-align: center;
+}
+table.dataTable tbody th.dt-body-right,
+table.dataTable tbody td.dt-body-right {
+ text-align: right;
+}
+table.dataTable tbody th.dt-body-justify,
+table.dataTable tbody td.dt-body-justify {
+ text-align: justify;
+}
+table.dataTable tbody th.dt-body-nowrap,
+table.dataTable tbody td.dt-body-nowrap {
+ white-space: nowrap;
+}
+
+table.dataTable,
+table.dataTable th,
+table.dataTable td {
+ -webkit-box-sizing: content-box;
+ -moz-box-sizing: content-box;
+ box-sizing: content-box;
+}
+
+/*
+ * Control feature layout
+ */
+.dataTables_wrapper {
+ position: relative;
+ clear: both;
+ *zoom: 1;
+ zoom: 1;
+}
+.dataTables_wrapper .dataTables_length {
+ float: left;
+}
+.dataTables_wrapper .dataTables_filter {
+ float: right;
+ text-align: right;
+}
+.dataTables_wrapper .dataTables_filter input {
+ margin-left: 0.5em;
+}
+.dataTables_wrapper .dataTables_info {
+ clear: both;
+ float: left;
+ padding-top: 0.755em;
+}
+.dataTables_wrapper .dataTables_paginate {
+ float: right;
+ text-align: right;
+ padding-top: 0.25em;
+}
+.dataTables_wrapper .dataTables_paginate .paginate_button {
+ box-sizing: border-box;
+ display: inline-block;
+ min-width: 1.5em;
+ padding: 0.5em 1em;
+ margin-left: 2px;
+ text-align: center;
+ text-decoration: none !important;
+ cursor: pointer;
+ *cursor: hand;
+ color: #333 !important;
+ border: 1px solid transparent;
+ border-radius: 2px;
+}
+.dataTables_wrapper .dataTables_paginate .paginate_button.current, .dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
+ color: #333 !important;
+ border: 1px solid #979797;
+ background-color: white;
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, white), color-stop(100%, #dcdcdc));
+ /* Chrome,Safari4+ */
+ background: -webkit-linear-gradient(top, white 0%, #dcdcdc 100%);
+ /* Chrome10+,Safari5.1+ */
+ background: -moz-linear-gradient(top, white 0%, #dcdcdc 100%);
+ /* FF3.6+ */
+ background: -ms-linear-gradient(top, white 0%, #dcdcdc 100%);
+ /* IE10+ */
+ background: -o-linear-gradient(top, white 0%, #dcdcdc 100%);
+ /* Opera 11.10+ */
+ background: linear-gradient(to bottom, white 0%, #dcdcdc 100%);
+ /* W3C */
+}
+.dataTables_wrapper .dataTables_paginate .paginate_button.disabled, .dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover, .dataTables_wrapper .dataTables_paginate .paginate_button.disabled:active {
+ cursor: default;
+ color: #666 !important;
+ border: 1px solid transparent;
+ background: transparent;
+ box-shadow: none;
+}
+.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
+ color: white !important;
+ border: 1px solid #111;
+ background-color: #585858;
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #585858), color-stop(100%, #111));
+ /* Chrome,Safari4+ */
+ background: -webkit-linear-gradient(top, #585858 0%, #111 100%);
+ /* Chrome10+,Safari5.1+ */
+ background: -moz-linear-gradient(top, #585858 0%, #111 100%);
+ /* FF3.6+ */
+ background: -ms-linear-gradient(top, #585858 0%, #111 100%);
+ /* IE10+ */
+ background: -o-linear-gradient(top, #585858 0%, #111 100%);
+ /* Opera 11.10+ */
+ background: linear-gradient(to bottom, #585858 0%, #111 100%);
+ /* W3C */
+}
+.dataTables_wrapper .dataTables_paginate .paginate_button:active {
+ outline: none;
+ background-color: #2b2b2b;
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #2b2b2b), color-stop(100%, #0c0c0c));
+ /* Chrome,Safari4+ */
+ background: -webkit-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%);
+ /* Chrome10+,Safari5.1+ */
+ background: -moz-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%);
+ /* FF3.6+ */
+ background: -ms-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%);
+ /* IE10+ */
+ background: -o-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%);
+ /* Opera 11.10+ */
+ background: linear-gradient(to bottom, #2b2b2b 0%, #0c0c0c 100%);
+ /* W3C */
+ box-shadow: inset 0 0 3px #111;
+}
+.dataTables_wrapper .dataTables_paginate .ellipsis {
+ padding: 0 1em;
+}
+.dataTables_wrapper .dataTables_processing {
+ position: absolute;
+ top: 50%;
+ left: 50%;
+ width: 100%;
+ height: 40px;
+ margin-left: -50%;
+ margin-top: -25px;
+ padding-top: 20px;
+ text-align: center;
+ font-size: 1.2em;
+ background-color: white;
+ background: -webkit-gradient(linear, left top, right top, color-stop(0%, rgba(255, 255, 255, 0)), color-stop(25%, rgba(255, 255, 255, 0.9)), color-stop(75%, rgba(255, 255, 255, 0.9)), color-stop(100%, rgba(255, 255, 255, 0)));
+ background: -webkit-linear-gradient(left, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.9) 25%, rgba(255, 255, 255, 0.9) 75%, rgba(255, 255, 255, 0) 100%);
+ background: -moz-linear-gradient(left, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.9) 25%, rgba(255, 255, 255, 0.9) 75%, rgba(255, 255, 255, 0) 100%);
+ background: -ms-linear-gradient(left, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.9) 25%, rgba(255, 255, 255, 0.9) 75%, rgba(255, 255, 255, 0) 100%);
+ background: -o-linear-gradient(left, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.9) 25%, rgba(255, 255, 255, 0.9) 75%, rgba(255, 255, 255, 0) 100%);
+ background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.9) 25%, rgba(255, 255, 255, 0.9) 75%, rgba(255, 255, 255, 0) 100%);
+}
+.dataTables_wrapper .dataTables_length,
+.dataTables_wrapper .dataTables_filter,
+.dataTables_wrapper .dataTables_info,
+.dataTables_wrapper .dataTables_processing,
+.dataTables_wrapper .dataTables_paginate {
+ color: #333;
+}
+.dataTables_wrapper .dataTables_scroll {
+ clear: both;
+}
+.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody {
+ *margin-top: -1px;
+ -webkit-overflow-scrolling: touch;
+}
+.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody th, .dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody td {
+ vertical-align: middle;
+}
+.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody th > div.dataTables_sizing,
+.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody td > div.dataTables_sizing {
+ height: 0;
+ overflow: hidden;
+ margin: 0 !important;
+ padding: 0 !important;
+}
+.dataTables_wrapper.no-footer .dataTables_scrollBody {
+ border-bottom: 1px solid #111;
+}
+.dataTables_wrapper.no-footer div.dataTables_scrollHead table,
+.dataTables_wrapper.no-footer div.dataTables_scrollBody table {
+ border-bottom: none;
+}
+.dataTables_wrapper:after {
+ visibility: hidden;
+ display: block;
+ content: "";
+ clear: both;
+ height: 0;
+}
+
+@media screen and (max-width: 767px) {
+ .dataTables_wrapper .dataTables_info,
+ .dataTables_wrapper .dataTables_paginate {
+ float: none;
+ text-align: center;
+ }
+ .dataTables_wrapper .dataTables_paginate {
+ margin-top: 0.5em;
+ }
+}
+@media screen and (max-width: 640px) {
+ .dataTables_wrapper .dataTables_length,
+ .dataTables_wrapper .dataTables_filter {
+ float: none;
+ text-align: center;
+ }
+ .dataTables_wrapper .dataTables_filter {
+ margin-top: 0.5em;
+ }
+} \ No newline at end of file
diff --git a/op25/gr-op25_repeater/apps/oplog/op25/static/css/images/sort_asc.png b/op25/gr-op25_repeater/apps/oplog/op25/static/css/images/sort_asc.png
new file mode 100644
index 0000000..e1ba61a
--- /dev/null
+++ b/op25/gr-op25_repeater/apps/oplog/op25/static/css/images/sort_asc.png
Binary files differ
diff --git a/op25/gr-op25_repeater/apps/oplog/op25/static/css/images/sort_asc_disabled.png b/op25/gr-op25_repeater/apps/oplog/op25/static/css/images/sort_asc_disabled.png
new file mode 100644
index 0000000..fb11dfe
--- /dev/null
+++ b/op25/gr-op25_repeater/apps/oplog/op25/static/css/images/sort_asc_disabled.png
Binary files differ
diff --git a/op25/gr-op25_repeater/apps/oplog/op25/static/css/images/sort_both.png b/op25/gr-op25_repeater/apps/oplog/op25/static/css/images/sort_both.png
new file mode 100644
index 0000000..af5bc7c
--- /dev/null
+++ b/op25/gr-op25_repeater/apps/oplog/op25/static/css/images/sort_both.png
Binary files differ
diff --git a/op25/gr-op25_repeater/apps/oplog/op25/static/css/images/sort_desc.png b/op25/gr-op25_repeater/apps/oplog/op25/static/css/images/sort_desc.png
new file mode 100644
index 0000000..0e156de
--- /dev/null
+++ b/op25/gr-op25_repeater/apps/oplog/op25/static/css/images/sort_desc.png
Binary files differ
diff --git a/op25/gr-op25_repeater/apps/oplog/op25/static/css/images/sort_desc_disabled.png b/op25/gr-op25_repeater/apps/oplog/op25/static/css/images/sort_desc_disabled.png
new file mode 100644
index 0000000..c9fdd8a
--- /dev/null
+++ b/op25/gr-op25_repeater/apps/oplog/op25/static/css/images/sort_desc_disabled.png
Binary files differ
diff --git a/op25/gr-op25_repeater/apps/oplog/op25/static/css/op25.css b/op25/gr-op25_repeater/apps/oplog/op25/static/css/op25.css
new file mode 100644
index 0000000..48bbb28
--- /dev/null
+++ b/op25/gr-op25_repeater/apps/oplog/op25/static/css/op25.css
@@ -0,0 +1,237 @@
+body {
+/* min-height: 2000px; */
+/* padding: 0px 25px 0px 25px; */
+ margin: 5px 10px 5px 10px !important;
+/* background-color: #0f0; */
+}
+
+.li-text {
+ padding: 10px 15px 5px 15px;
+ color: #ddd;
+}
+
+.sel-date {
+ color: black;
+ width: 150px;
+ height: 33px;
+}
+
+/* Clear floats after the columns */
+.row:after {
+ content: "";
+ display: table;
+ clear: both;
+}
+ */
+
+/*
+#container {
+ width: 1000px;
+ min-height: 2000px;
+ margin: 0 auto;
+ border: 1px solid;
+ background-color: #f00; }
+
+#primary {
+ min-height: 2000px; float: left;
+ width: 15%;
+ padding: 5px;
+ background-color: #222;}
+
+#content {
+ min-height: 2000px; float: left;
+ width: 70%;
+ padding: 5px;
+ background-color: #fff; }
+
+#secondary {
+ min-height: 2000px; float: left;
+ width: 15%;
+ padding: 5px;
+ background-color: #eee;}
+ */
+
+#footer {
+ clear: both;
+ background-color: #375a7f;
+ min-height: 50px;
+ color: white;
+}
+
+.btnMain {
+ margin: 2px;
+ padding: 2px;
+ width: 210px;
+}
+
+.dataTables_length select {
+ color: #fff;
+}
+
+.dataTables_length select option {
+ background-color: #111;
+}
+
+.dataTables_filter input[type=search] {
+ color: #fff;
+}
+
+#systemSelect {
+ color: #000;
+ height: 33px;
+}
+
+#navSelect {
+ color: #000;
+ height: 30px;
+}
+
+.op-input {
+ display: inline-block;
+ font-weight: 400;
+ line-height: 1.5;
+ color: #fff;
+ text-align: center;
+ text-decoration: none;
+ vertical-align: middle;
+ cursor: pointer;
+ background-color: transparent;
+ border: 1px solid transparent;
+ padding: 0.375rem 0.75rem;
+ font-size: 1rem;
+ border-radius: 0.25rem;
+ transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
+}
+
+/*
+
+The Modal (background).modal {
+ display: none; Hidden by default position: fixed; Stay in place z-index: 1; Sit on top left: 0;
+ top: 0;
+ width: 100%; Full width height: 100%; Full height overflow: auto; Enable scroll if needed background-color: rgb(0,0,0); Fallback color background-color: rgba(0,0,0,0.4); Black w/ opacity}
+
+Modal Content/Box.modal-content {
+ background-color: #fefefe;
+ margin: 15% auto; 15% from the top and centered padding: 20px;
+ border: 1px solid #888;
+ width: 80%; Could be more or less, depending on screen size}
+
+The Close Button.close {
+ color: #aaa;
+ float: right;
+ font-size: 28px;
+ font-weight: bold;
+}
+
+.close:hover,
+.close:focus {
+ color: black;
+ text-decoration: none;
+ cursor: pointer;
+}
+ */
+
+#loading {
+ position: fixed;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ width: 100%;
+ height: 100%;
+ top: 0;
+ left: 0;
+ opacity: 0.5;
+ background-color: #fff;
+ z-index: 99;
+}
+
+#loading-image {
+ z-index: 100;
+}
+
+
+/* New layout stuff */
+
+/* Style the body */
+/*
+body {
+ font-family: Arial;
+ margin: 0;
+}
+ */
+
+/* Header/logo Title */
+/*
+.header {
+ padding: 60px;
+ text-align: center;
+ background: #1abc9c;
+ color: white;
+}
+
+Style the top navigation bar.navbar {
+ display: flex;
+ background-color: #333;
+}
+
+Style the navigation bar links.navbar a {
+ color: white;
+ padding: 14px 20px;
+ text-decoration: none;
+ text-align: center;
+}
+
+Change color on hover.navbar a:hover {
+ background-color: #ddd;
+ color: black;
+}
+ */
+
+/* Column container */
+.row-main {
+ display: flex;
+ flex-wrap: wrap;
+}
+
+/* Sidebar/left column */
+.side {
+ flex: 15%;
+/* flex: 0 0 275px; */
+/* width: 200px; */
+/* background-color: #111; */
+ padding: 0px;
+}
+
+/* Main column */
+.main {
+ flex: 70%;
+/* background-color: white; */
+ padding: 5px;
+}
+
+
+
+/* Footer */
+.footer {
+/* padding: 20px; */
+ text-align: center;
+/* background: #ddd; */
+}
+
+/* Responsive layout - when the screen is less than 700px wide, make the two columns stack on top of each other instead of next to each other */
+@media screen and (max-width: 790px) {
+ .row, .navbar {
+ flex-direction: column;
+ }
+}
+
+
+
+
+
+
+
+
+
+
+
diff --git a/op25/gr-op25_repeater/apps/oplog/op25/static/dtpick/dtpick2.js b/op25/gr-op25_repeater/apps/oplog/op25/static/dtpick/dtpick2.js
new file mode 100644
index 0000000..cb4da12
--- /dev/null
+++ b/op25/gr-op25_repeater/apps/oplog/op25/static/dtpick/dtpick2.js
@@ -0,0 +1,2930 @@
+/*!
+ * @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2014 - 2016
+ * @version 1.3.4
+ *
+ * Date formatter utility library that allows formatting date/time variables or Date objects using PHP DateTime format.
+ * @see http://php.net/manual/en/function.date.php
+ *
+ * For more JQuery plugins visit http://plugins.krajee.com
+ * For more Yii related demos visit http://demos.krajee.com
+ */var DateFormatter;!function(){"use strict";var t,e,r,n,a,u,i;u=864e5,i=3600,t=function(t,e){return"string"==typeof t&&"string"==typeof e&&t.toLowerCase()===e.toLowerCase()},e=function(t,r,n){var a=n||"0",u=t.toString();return u.length<r?e(a+u,r):u},r=function(t){var e,n;for(t=t||{},e=1;e<arguments.length;e++)if(n=arguments[e])for(var a in n)n.hasOwnProperty(a)&&("object"==typeof n[a]?r(t[a],n[a]):t[a]=n[a]);return t},n=function(t,e){for(var r=0;r<e.length;r++)if(e[r].toLowerCase()===t.toLowerCase())return r;return-1},a={dateSettings:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],daysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],meridiem:["AM","PM"],ordinal:function(t){var e=t%10,r={1:"st",2:"nd",3:"rd"};return 1!==Math.floor(t%100/10)&&r[e]?r[e]:"th"}},separators:/[ \-+\/\.T:@]/g,validParts:/[dDjlNSwzWFmMntLoYyaABgGhHisueTIOPZcrU]/g,intParts:/[djwNzmnyYhHgGis]/g,tzParts:/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,tzClip:/[^-+\dA-Z]/g},DateFormatter=function(t){var e=this,n=r(a,t);e.dateSettings=n.dateSettings,e.separators=n.separators,e.validParts=n.validParts,e.intParts=n.intParts,e.tzParts=n.tzParts,e.tzClip=n.tzClip},DateFormatter.prototype={constructor:DateFormatter,getMonth:function(t){var e,r=this;return e=n(t,r.dateSettings.monthsShort)+1,0===e&&(e=n(t,r.dateSettings.months)+1),e},parseDate:function(e,r){var n,a,u,i,s,o,c,f,l,h,d=this,g=!1,m=!1,p=d.dateSettings,y={date:null,year:null,month:null,day:null,hour:0,min:0,sec:0};if(!e)return null;if(e instanceof Date)return e;if("U"===r)return u=parseInt(e),u?new Date(1e3*u):e;switch(typeof e){case"number":return new Date(e);case"string":break;default:return null}if(n=r.match(d.validParts),!n||0===n.length)throw new Error("Invalid date format definition.");for(a=e.replace(d.separators,"\x00").split("\x00"),u=0;u<a.length;u++)switch(i=a[u],s=parseInt(i),n[u]){case"y":case"Y":if(!s)return null;l=i.length,y.year=2===l?parseInt((70>s?"20":"19")+i):s,g=!0;break;case"m":case"n":case"M":case"F":if(isNaN(s)){if(o=d.getMonth(i),!(o>0))return null;y.month=o}else{if(!(s>=1&&12>=s))return null;y.month=s}g=!0;break;case"d":case"j":if(!(s>=1&&31>=s))return null;y.day=s,g=!0;break;case"g":case"h":if(c=n.indexOf("a")>-1?n.indexOf("a"):n.indexOf("A")>-1?n.indexOf("A"):-1,h=a[c],c>-1)f=t(h,p.meridiem[0])?0:t(h,p.meridiem[1])?12:-1,s>=1&&12>=s&&f>-1?y.hour=s+f-1:s>=0&&23>=s&&(y.hour=s);else{if(!(s>=0&&23>=s))return null;y.hour=s}m=!0;break;case"G":case"H":if(!(s>=0&&23>=s))return null;y.hour=s,m=!0;break;case"i":if(!(s>=0&&59>=s))return null;y.min=s,m=!0;break;case"s":if(!(s>=0&&59>=s))return null;y.sec=s,m=!0}if(g===!0&&y.year&&y.month&&y.day)y.date=new Date(y.year,y.month-1,y.day,y.hour,y.min,y.sec,0);else{if(m!==!0)return null;y.date=new Date(0,0,0,y.hour,y.min,y.sec,0)}return y.date},guessDate:function(t,e){if("string"!=typeof t)return t;var r,n,a,u,i,s,o=this,c=t.replace(o.separators,"\x00").split("\x00"),f=/^[djmn]/g,l=e.match(o.validParts),h=new Date,d=0;if(!f.test(l[0]))return t;for(a=0;a<c.length;a++){if(d=2,i=c[a],s=parseInt(i.substr(0,2)),isNaN(s))return null;switch(a){case 0:"m"===l[0]||"n"===l[0]?h.setMonth(s-1):h.setDate(s);break;case 1:"m"===l[0]||"n"===l[0]?h.setDate(s):h.setMonth(s-1);break;case 2:if(n=h.getFullYear(),r=i.length,d=4>r?r:4,n=parseInt(4>r?n.toString().substr(0,4-r)+i:i.substr(0,4)),!n)return null;h.setFullYear(n);break;case 3:h.setHours(s);break;case 4:h.setMinutes(s);break;case 5:h.setSeconds(s)}u=i.substr(d),u.length>0&&c.splice(a+1,0,u)}return h},parseFormat:function(t,r){var n,a=this,s=a.dateSettings,o=/\\?(.?)/gi,c=function(t,e){return n[t]?n[t]():e};return n={d:function(){return e(n.j(),2)},D:function(){return s.daysShort[n.w()]},j:function(){return r.getDate()},l:function(){return s.days[n.w()]},N:function(){return n.w()||7},w:function(){return r.getDay()},z:function(){var t=new Date(n.Y(),n.n()-1,n.j()),e=new Date(n.Y(),0,1);return Math.round((t-e)/u)},W:function(){var t=new Date(n.Y(),n.n()-1,n.j()-n.N()+3),r=new Date(t.getFullYear(),0,4);return e(1+Math.round((t-r)/u/7),2)},F:function(){return s.months[r.getMonth()]},m:function(){return e(n.n(),2)},M:function(){return s.monthsShort[r.getMonth()]},n:function(){return r.getMonth()+1},t:function(){return new Date(n.Y(),n.n(),0).getDate()},L:function(){var t=n.Y();return t%4===0&&t%100!==0||t%400===0?1:0},o:function(){var t=n.n(),e=n.W(),r=n.Y();return r+(12===t&&9>e?1:1===t&&e>9?-1:0)},Y:function(){return r.getFullYear()},y:function(){return n.Y().toString().slice(-2)},a:function(){return n.A().toLowerCase()},A:function(){var t=n.G()<12?0:1;return s.meridiem[t]},B:function(){var t=r.getUTCHours()*i,n=60*r.getUTCMinutes(),a=r.getUTCSeconds();return e(Math.floor((t+n+a+i)/86.4)%1e3,3)},g:function(){return n.G()%12||12},G:function(){return r.getHours()},h:function(){return e(n.g(),2)},H:function(){return e(n.G(),2)},i:function(){return e(r.getMinutes(),2)},s:function(){return e(r.getSeconds(),2)},u:function(){return e(1e3*r.getMilliseconds(),6)},e:function(){var t=/\((.*)\)/.exec(String(r))[1];return t||"Coordinated Universal Time"},I:function(){var t=new Date(n.Y(),0),e=Date.UTC(n.Y(),0),r=new Date(n.Y(),6),a=Date.UTC(n.Y(),6);return t-e!==r-a?1:0},O:function(){var t=r.getTimezoneOffset(),n=Math.abs(t);return(t>0?"-":"+")+e(100*Math.floor(n/60)+n%60,4)},P:function(){var t=n.O();return t.substr(0,3)+":"+t.substr(3,2)},T:function(){var t=(String(r).match(a.tzParts)||[""]).pop().replace(a.tzClip,"");return t||"UTC"},Z:function(){return 60*-r.getTimezoneOffset()},c:function(){return"Y-m-d\\TH:i:sP".replace(o,c)},r:function(){return"D, d M Y H:i:s O".replace(o,c)},U:function(){return r.getTime()/1e3||0}},c(t,t)},formatDate:function(t,e){var r,n,a,u,i,s=this,o="",c="\\";if("string"==typeof t&&(t=s.parseDate(t,e),!t))return null;if(t instanceof Date){for(a=e.length,r=0;a>r;r++)i=e.charAt(r),"S"!==i&&i!==c&&(r>0&&e.charAt(r-1)===c?o+=i:(u=s.parseFormat(i,t),r!==a-1&&s.intParts.test(i)&&"S"===e.charAt(r+1)&&(n=parseInt(u)||0,u+=s.dateSettings.ordinal(n)),o+=u));return o}return""}}}();
+/**
+ * @preserve jQuery DateTimePicker
+ * @homepage http://xdsoft.net/jqplugins/datetimepicker/
+ * @author Chupurnov Valeriy (<chupurnov@gmail.com>)
+ */
+
+/**
+ * @param {jQuery} $
+ */
+var datetimepickerFactory = function ($) {
+ 'use strict';
+
+ var default_options = {
+ i18n: {
+ ar: { // Arabic
+ months: [
+ "كانون الثاني", "شباط", "آذار", "نيسان", "مايو", "حزيران", "تموز", "آب", "أيلول", "تشرين الأول", "تشرين الثاني", "كانون الأول"
+ ],
+ dayOfWeekShort: [
+ "ن", "ث", "ع", "خ", "ج", "س", "ح"
+ ],
+ dayOfWeek: ["الأحد", "الاثنين", "الثلاثاء", "الأربعاء", "الخميس", "الجمعة", "السبت", "الأحد"]
+ },
+ ro: { // Romanian
+ months: [
+ "Ianuarie", "Februarie", "Martie", "Aprilie", "Mai", "Iunie", "Iulie", "August", "Septembrie", "Octombrie", "Noiembrie", "Decembrie"
+ ],
+ dayOfWeekShort: [
+ "Du", "Lu", "Ma", "Mi", "Jo", "Vi", "Sâ"
+ ],
+ dayOfWeek: ["Duminică", "Luni", "Marţi", "Miercuri", "Joi", "Vineri", "Sâmbătă"]
+ },
+ id: { // Indonesian
+ months: [
+ "Januari", "Februari", "Maret", "April", "Mei", "Juni", "Juli", "Agustus", "September", "Oktober", "November", "Desember"
+ ],
+ dayOfWeekShort: [
+ "Min", "Sen", "Sel", "Rab", "Kam", "Jum", "Sab"
+ ],
+ dayOfWeek: ["Minggu", "Senin", "Selasa", "Rabu", "Kamis", "Jumat", "Sabtu"]
+ },
+ is: { // Icelandic
+ months: [
+ "Janúar", "Febrúar", "Mars", "Apríl", "Maí", "Júní", "Júlí", "Ágúst", "September", "Október", "Nóvember", "Desember"
+ ],
+ dayOfWeekShort: [
+ "Sun", "Mán", "Þrið", "Mið", "Fim", "Fös", "Lau"
+ ],
+ dayOfWeek: ["Sunnudagur", "Mánudagur", "Þriðjudagur", "Miðvikudagur", "Fimmtudagur", "Föstudagur", "Laugardagur"]
+ },
+ bg: { // Bulgarian
+ months: [
+ "Януари", "Февруари", "Март", "Април", "Май", "Юни", "Юли", "Август", "Септември", "Октомври", "Ноември", "Декември"
+ ],
+ dayOfWeekShort: [
+ "Нд", "Пн", "Вт", "Ср", "Чт", "Пт", "Сб"
+ ],
+ dayOfWeek: ["Неделя", "Понеделник", "Вторник", "Сряда", "Четвъртък", "Петък", "Събота"]
+ },
+ fa: { // Persian/Farsi
+ months: [
+ 'فروردین', 'اردیبهشت', 'خرداد', 'تیر', 'مرداد', 'شهریور', 'مهر', 'آبان', 'آذر', 'دی', 'بهمن', 'اسفند'
+ ],
+ dayOfWeekShort: [
+ 'یکشنبه', 'دوشنبه', 'سه شنبه', 'چهارشنبه', 'پنجشنبه', 'جمعه', 'شنبه'
+ ],
+ dayOfWeek: ["یک‌شنبه", "دوشنبه", "سه‌شنبه", "چهارشنبه", "پنج‌شنبه", "جمعه", "شنبه", "یک‌شنبه"]
+ },
+ ru: { // Russian
+ months: [
+ 'Январь', 'Февраль', 'Март', 'Апрель', 'Май', 'Июнь', 'Июль', 'Август', 'Сентябрь', 'Октябрь', 'Ноябрь', 'Декабрь'
+ ],
+ dayOfWeekShort: [
+ "Вс", "Пн", "Вт", "Ср", "Чт", "Пт", "Сб"
+ ],
+ dayOfWeek: ["Воскресенье", "Понедельник", "Вторник", "Среда", "Четверг", "Пятница", "Суббота"]
+ },
+ uk: { // Ukrainian
+ months: [
+ 'Січень', 'Лютий', 'Березень', 'Квітень', 'Травень', 'Червень', 'Липень', 'Серпень', 'Вересень', 'Жовтень', 'Листопад', 'Грудень'
+ ],
+ dayOfWeekShort: [
+ "Ндл", "Пнд", "Втр", "Срд", "Чтв", "Птн", "Сбт"
+ ],
+ dayOfWeek: ["Неділя", "Понеділок", "Вівторок", "Середа", "Четвер", "П'ятниця", "Субота"]
+ },
+ en: { // English
+ months: [
+ "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"
+ ],
+ dayOfWeekShort: [
+ "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"
+ ],
+ dayOfWeek: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]
+ },
+ el: { // Ελληνικά
+ months: [
+ "Ιανουάριος", "Φεβρουάριος", "Μάρτιος", "Απρίλιος", "Μάιος", "Ιούνιος", "Ιούλιος", "Αύγουστος", "Σεπτέμβριος", "Οκτώβριος", "Νοέμβριος", "Δεκέμβριος"
+ ],
+ dayOfWeekShort: [
+ "Κυρ", "Δευ", "Τρι", "Τετ", "Πεμ", "Παρ", "Σαβ"
+ ],
+ dayOfWeek: ["Κυριακή", "Δευτέρα", "Τρίτη", "Τετάρτη", "Πέμπτη", "Παρασκευή", "Σάββατο"]
+ },
+ de: { // German
+ months: [
+ 'Januar', 'Februar', 'März', 'April', 'Mai', 'Juni', 'Juli', 'August', 'September', 'Oktober', 'November', 'Dezember'
+ ],
+ dayOfWeekShort: [
+ "So", "Mo", "Di", "Mi", "Do", "Fr", "Sa"
+ ],
+ dayOfWeek: ["Sonntag", "Montag", "Dienstag", "Mittwoch", "Donnerstag", "Freitag", "Samstag"]
+ },
+ nl: { // Dutch
+ months: [
+ "januari", "februari", "maart", "april", "mei", "juni", "juli", "augustus", "september", "oktober", "november", "december"
+ ],
+ dayOfWeekShort: [
+ "zo", "ma", "di", "wo", "do", "vr", "za"
+ ],
+ dayOfWeek: ["zondag", "maandag", "dinsdag", "woensdag", "donderdag", "vrijdag", "zaterdag"]
+ },
+ tr: { // Turkish
+ months: [
+ "Ocak", "Şubat", "Mart", "Nisan", "Mayıs", "Haziran", "Temmuz", "Ağustos", "Eylül", "Ekim", "Kasım", "Aralık"
+ ],
+ dayOfWeekShort: [
+ "Paz", "Pts", "Sal", "Çar", "Per", "Cum", "Cts"
+ ],
+ dayOfWeek: ["Pazar", "Pazartesi", "Salı", "Çarşamba", "Perşembe", "Cuma", "Cumartesi"]
+ },
+ fr: { //French
+ months: [
+ "Janvier", "Février", "Mars", "Avril", "Mai", "Juin", "Juillet", "Août", "Septembre", "Octobre", "Novembre", "Décembre"
+ ],
+ dayOfWeekShort: [
+ "Dim", "Lun", "Mar", "Mer", "Jeu", "Ven", "Sam"
+ ],
+ dayOfWeek: ["dimanche", "lundi", "mardi", "mercredi", "jeudi", "vendredi", "samedi"]
+ },
+ es: { // Spanish
+ months: [
+ "Enero", "Febrero", "Marzo", "Abril", "Mayo", "Junio", "Julio", "Agosto", "Septiembre", "Octubre", "Noviembre", "Diciembre"
+ ],
+ dayOfWeekShort: [
+ "Dom", "Lun", "Mar", "Mié", "Jue", "Vie", "Sáb"
+ ],
+ dayOfWeek: ["Domingo", "Lunes", "Martes", "Miércoles", "Jueves", "Viernes", "Sábado"]
+ },
+ th: { // Thai
+ months: [
+ 'มกราคม', 'กุมภาพันธ์', 'มีนาคม', 'เมษายน', 'พฤษภาคม', 'มิถุนายน', 'กรกฎาคม', 'สิงหาคม', 'กันยายน', 'ตุลาคม', 'พฤศจิกายน', 'ธันวาคม'
+ ],
+ dayOfWeekShort: [
+ 'อา.', 'จ.', 'อ.', 'พ.', 'พฤ.', 'ศ.', 'ส.'
+ ],
+ dayOfWeek: ["อาทิตย์", "จันทร์", "อังคาร", "พุธ", "พฤหัส", "ศุกร์", "เสาร์", "อาทิตย์"]
+ },
+ pl: { // Polish
+ months: [
+ "styczeń", "luty", "marzec", "kwiecień", "maj", "czerwiec", "lipiec", "sierpień", "wrzesień", "październik", "listopad", "grudzień"
+ ],
+ dayOfWeekShort: [
+ "nd", "pn", "wt", "śr", "cz", "pt", "sb"
+ ],
+ dayOfWeek: ["niedziela", "poniedziałek", "wtorek", "środa", "czwartek", "piątek", "sobota"]
+ },
+ pt: { // Portuguese
+ months: [
+ "Janeiro", "Fevereiro", "Março", "Abril", "Maio", "Junho", "Julho", "Agosto", "Setembro", "Outubro", "Novembro", "Dezembro"
+ ],
+ dayOfWeekShort: [
+ "Dom", "Seg", "Ter", "Qua", "Qui", "Sex", "Sab"
+ ],
+ dayOfWeek: ["Domingo", "Segunda", "Terça", "Quarta", "Quinta", "Sexta", "Sábado"]
+ },
+ ch: { // Simplified Chinese
+ months: [
+ "一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"
+ ],
+ dayOfWeekShort: [
+ "日", "一", "二", "三", "四", "五", "六"
+ ]
+ },
+ se: { // Swedish
+ months: [
+ "Januari", "Februari", "Mars", "April", "Maj", "Juni", "Juli", "Augusti", "September", "Oktober", "November", "December"
+ ],
+ dayOfWeekShort: [
+ "Sön", "Mån", "Tis", "Ons", "Tor", "Fre", "Lör"
+ ]
+ },
+ km: { // Khmer (ភាសាខ្មែរ)
+ months: [
+ "មករា​", "កុម្ភៈ", "មិនា​", "មេសា​", "ឧសភា​", "មិថុនា​", "កក្កដា​", "សីហា​", "កញ្ញា​", "តុលា​", "វិច្ឆិកា", "ធ្នូ​"
+ ],
+ dayOfWeekShort: ["អាទិ​", "ច័ន្ទ​", "អង្គារ​", "ពុធ​", "ព្រហ​​", "សុក្រ​", "សៅរ៍"],
+ dayOfWeek: ["អាទិត្យ​", "ច័ន្ទ​", "អង្គារ​", "ពុធ​", "ព្រហស្បតិ៍​", "សុក្រ​", "សៅរ៍"]
+ },
+ kr: { // Korean
+ months: [
+ "1월", "2월", "3월", "4월", "5월", "6월", "7월", "8월", "9월", "10월", "11월", "12월"
+ ],
+ dayOfWeekShort: [
+ "일", "월", "화", "수", "목", "금", "토"
+ ],
+ dayOfWeek: ["일요일", "월요일", "화요일", "수요일", "목요일", "금요일", "토요일"]
+ },
+ it: { // Italian
+ months: [
+ "Gennaio", "Febbraio", "Marzo", "Aprile", "Maggio", "Giugno", "Luglio", "Agosto", "Settembre", "Ottobre", "Novembre", "Dicembre"
+ ],
+ dayOfWeekShort: [
+ "Dom", "Lun", "Mar", "Mer", "Gio", "Ven", "Sab"
+ ],
+ dayOfWeek: ["Domenica", "Lunedì", "Martedì", "Mercoledì", "Giovedì", "Venerdì", "Sabato"]
+ },
+ da: { // Dansk
+ months: [
+ "Januar", "Februar", "Marts", "April", "Maj", "Juni", "Juli", "August", "September", "Oktober", "November", "December"
+ ],
+ dayOfWeekShort: [
+ "Søn", "Man", "Tir", "Ons", "Tor", "Fre", "Lør"
+ ],
+ dayOfWeek: ["søndag", "mandag", "tirsdag", "onsdag", "torsdag", "fredag", "lørdag"]
+ },
+ no: { // Norwegian
+ months: [
+ "Januar", "Februar", "Mars", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Desember"
+ ],
+ dayOfWeekShort: [
+ "Søn", "Man", "Tir", "Ons", "Tor", "Fre", "Lør"
+ ],
+ dayOfWeek: ['Søndag', 'Mandag', 'Tirsdag', 'Onsdag', 'Torsdag', 'Fredag', 'Lørdag']
+ },
+ ja: { // Japanese
+ months: [
+ "1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"
+ ],
+ dayOfWeekShort: [
+ "日", "月", "火", "水", "木", "金", "土"
+ ],
+ dayOfWeek: ["日曜", "月曜", "火曜", "水曜", "木曜", "金曜", "土曜"]
+ },
+ vi: { // Vietnamese
+ months: [
+ "Tháng 1", "Tháng 2", "Tháng 3", "Tháng 4", "Tháng 5", "Tháng 6", "Tháng 7", "Tháng 8", "Tháng 9", "Tháng 10", "Tháng 11", "Tháng 12"
+ ],
+ dayOfWeekShort: [
+ "CN", "T2", "T3", "T4", "T5", "T6", "T7"
+ ],
+ dayOfWeek: ["Chủ nhật", "Thứ hai", "Thứ ba", "Thứ tư", "Thứ năm", "Thứ sáu", "Thứ bảy"]
+ },
+ sl: { // Slovenščina
+ months: [
+ "Januar", "Februar", "Marec", "April", "Maj", "Junij", "Julij", "Avgust", "September", "Oktober", "November", "December"
+ ],
+ dayOfWeekShort: [
+ "Ned", "Pon", "Tor", "Sre", "Čet", "Pet", "Sob"
+ ],
+ dayOfWeek: ["Nedelja", "Ponedeljek", "Torek", "Sreda", "Četrtek", "Petek", "Sobota"]
+ },
+ cs: { // Čeština
+ months: [
+ "Leden", "Únor", "Březen", "Duben", "Květen", "Červen", "Červenec", "Srpen", "Září", "Říjen", "Listopad", "Prosinec"
+ ],
+ dayOfWeekShort: [
+ "Ne", "Po", "Út", "St", "Čt", "Pá", "So"
+ ]
+ },
+ hu: { // Hungarian
+ months: [
+ "Január", "Február", "Március", "Április", "Május", "Június", "Július", "Augusztus", "Szeptember", "Október", "November", "December"
+ ],
+ dayOfWeekShort: [
+ "Va", "Hé", "Ke", "Sze", "Cs", "Pé", "Szo"
+ ],
+ dayOfWeek: ["vasárnap", "hétfő", "kedd", "szerda", "csütörtök", "péntek", "szombat"]
+ },
+ az: { //Azerbaijanian (Azeri)
+ months: [
+ "Yanvar", "Fevral", "Mart", "Aprel", "May", "Iyun", "Iyul", "Avqust", "Sentyabr", "Oktyabr", "Noyabr", "Dekabr"
+ ],
+ dayOfWeekShort: [
+ "B", "Be", "Ça", "Ç", "Ca", "C", "Ş"
+ ],
+ dayOfWeek: ["Bazar", "Bazar ertəsi", "Çərşənbə axşamı", "Çərşənbə", "Cümə axşamı", "Cümə", "Şənbə"]
+ },
+ bs: { //Bosanski
+ months: [
+ "Januar", "Februar", "Mart", "April", "Maj", "Jun", "Jul", "Avgust", "Septembar", "Oktobar", "Novembar", "Decembar"
+ ],
+ dayOfWeekShort: [
+ "Ned", "Pon", "Uto", "Sri", "Čet", "Pet", "Sub"
+ ],
+ dayOfWeek: ["Nedjelja","Ponedjeljak", "Utorak", "Srijeda", "Četvrtak", "Petak", "Subota"]
+ },
+ ca: { //Català
+ months: [
+ "Gener", "Febrer", "Març", "Abril", "Maig", "Juny", "Juliol", "Agost", "Setembre", "Octubre", "Novembre", "Desembre"
+ ],
+ dayOfWeekShort: [
+ "Dg", "Dl", "Dt", "Dc", "Dj", "Dv", "Ds"
+ ],
+ dayOfWeek: ["Diumenge", "Dilluns", "Dimarts", "Dimecres", "Dijous", "Divendres", "Dissabte"]
+ },
+ 'en-GB': { //English (British)
+ months: [
+ "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"
+ ],
+ dayOfWeekShort: [
+ "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"
+ ],
+ dayOfWeek: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]
+ },
+ et: { //"Eesti"
+ months: [
+ "Jaanuar", "Veebruar", "Märts", "Aprill", "Mai", "Juuni", "Juuli", "August", "September", "Oktoober", "November", "Detsember"
+ ],
+ dayOfWeekShort: [
+ "P", "E", "T", "K", "N", "R", "L"
+ ],
+ dayOfWeek: ["Pühapäev", "Esmaspäev", "Teisipäev", "Kolmapäev", "Neljapäev", "Reede", "Laupäev"]
+ },
+ eu: { //Euskara
+ months: [
+ "Urtarrila", "Otsaila", "Martxoa", "Apirila", "Maiatza", "Ekaina", "Uztaila", "Abuztua", "Iraila", "Urria", "Azaroa", "Abendua"
+ ],
+ dayOfWeekShort: [
+ "Ig.", "Al.", "Ar.", "Az.", "Og.", "Or.", "La."
+ ],
+ dayOfWeek: ['Igandea', 'Astelehena', 'Asteartea', 'Asteazkena', 'Osteguna', 'Ostirala', 'Larunbata']
+ },
+ fi: { //Finnish (Suomi)
+ months: [
+ "Tammikuu", "Helmikuu", "Maaliskuu", "Huhtikuu", "Toukokuu", "Kesäkuu", "Heinäkuu", "Elokuu", "Syyskuu", "Lokakuu", "Marraskuu", "Joulukuu"
+ ],
+ dayOfWeekShort: [
+ "Su", "Ma", "Ti", "Ke", "To", "Pe", "La"
+ ],
+ dayOfWeek: ["sunnuntai", "maanantai", "tiistai", "keskiviikko", "torstai", "perjantai", "lauantai"]
+ },
+ gl: { //Galego
+ months: [
+ "Xan", "Feb", "Maz", "Abr", "Mai", "Xun", "Xul", "Ago", "Set", "Out", "Nov", "Dec"
+ ],
+ dayOfWeekShort: [
+ "Dom", "Lun", "Mar", "Mer", "Xov", "Ven", "Sab"
+ ],
+ dayOfWeek: ["Domingo", "Luns", "Martes", "Mércores", "Xoves", "Venres", "Sábado"]
+ },
+ hr: { //Hrvatski
+ months: [
+ "Siječanj", "Veljača", "Ožujak", "Travanj", "Svibanj", "Lipanj", "Srpanj", "Kolovoz", "Rujan", "Listopad", "Studeni", "Prosinac"
+ ],
+ dayOfWeekShort: [
+ "Ned", "Pon", "Uto", "Sri", "Čet", "Pet", "Sub"
+ ],
+ dayOfWeek: ["Nedjelja", "Ponedjeljak", "Utorak", "Srijeda", "Četvrtak", "Petak", "Subota"]
+ },
+ ko: { //Korean (한국어)
+ months: [
+ "1월", "2월", "3월", "4월", "5월", "6월", "7월", "8월", "9월", "10월", "11월", "12월"
+ ],
+ dayOfWeekShort: [
+ "일", "월", "화", "수", "목", "금", "토"
+ ],
+ dayOfWeek: ["일요일", "월요일", "화요일", "수요일", "목요일", "금요일", "토요일"]
+ },
+ lt: { //Lithuanian (lietuvių)
+ months: [
+ "Sausio", "Vasario", "Kovo", "Balandžio", "Gegužės", "Birželio", "Liepos", "Rugpjūčio", "Rugsėjo", "Spalio", "Lapkričio", "Gruodžio"
+ ],
+ dayOfWeekShort: [
+ "Sek", "Pir", "Ant", "Tre", "Ket", "Pen", "Šeš"
+ ],
+ dayOfWeek: ["Sekmadienis", "Pirmadienis", "Antradienis", "Trečiadienis", "Ketvirtadienis", "Penktadienis", "Šeštadienis"]
+ },
+ lv: { //Latvian (Latviešu)
+ months: [
+ "Janvāris", "Februāris", "Marts", "Aprīlis ", "Maijs", "Jūnijs", "Jūlijs", "Augusts", "Septembris", "Oktobris", "Novembris", "Decembris"
+ ],
+ dayOfWeekShort: [
+ "Sv", "Pr", "Ot", "Tr", "Ct", "Pk", "St"
+ ],
+ dayOfWeek: ["Svētdiena", "Pirmdiena", "Otrdiena", "Trešdiena", "Ceturtdiena", "Piektdiena", "Sestdiena"]
+ },
+ mk: { //Macedonian (Македонски)
+ months: [
+ "јануари", "февруари", "март", "април", "мај", "јуни", "јули", "август", "септември", "октомври", "ноември", "декември"
+ ],
+ dayOfWeekShort: [
+ "нед", "пон", "вто", "сре", "чет", "пет", "саб"
+ ],
+ dayOfWeek: ["Недела", "Понеделник", "Вторник", "Среда", "Четврток", "Петок", "Сабота"]
+ },
+ mn: { //Mongolian (Монгол)
+ months: [
+ "1-р сар", "2-р сар", "3-р сар", "4-р сар", "5-р сар", "6-р сар", "7-р сар", "8-р сар", "9-р сар", "10-р сар", "11-р сар", "12-р сар"
+ ],
+ dayOfWeekShort: [
+ "Дав", "Мяг", "Лха", "Пүр", "Бсн", "Бям", "Ням"
+ ],
+ dayOfWeek: ["Даваа", "Мягмар", "Лхагва", "Пүрэв", "Баасан", "Бямба", "Ням"]
+ },
+ 'pt-BR': { //Português(Brasil)
+ months: [
+ "Janeiro", "Fevereiro", "Março", "Abril", "Maio", "Junho", "Julho", "Agosto", "Setembro", "Outubro", "Novembro", "Dezembro"
+ ],
+ dayOfWeekShort: [
+ "Dom", "Seg", "Ter", "Qua", "Qui", "Sex", "Sáb"
+ ],
+ dayOfWeek: ["Domingo", "Segunda", "Terça", "Quarta", "Quinta", "Sexta", "Sábado"]
+ },
+ sk: { //Slovenčina
+ months: [
+ "Január", "Február", "Marec", "Apríl", "Máj", "Jún", "Júl", "August", "September", "Október", "November", "December"
+ ],
+ dayOfWeekShort: [
+ "Ne", "Po", "Ut", "St", "Št", "Pi", "So"
+ ],
+ dayOfWeek: ["Nedeľa", "Pondelok", "Utorok", "Streda", "Štvrtok", "Piatok", "Sobota"]
+ },
+ sq: { //Albanian (Shqip)
+ months: [
+ "Janar", "Shkurt", "Mars", "Prill", "Maj", "Qershor", "Korrik", "Gusht", "Shtator", "Tetor", "Nëntor", "Dhjetor"
+ ],
+ dayOfWeekShort: [
+ "Die", "Hën", "Mar", "Mër", "Enj", "Pre", "Shtu"
+ ],
+ dayOfWeek: ["E Diel", "E Hënë", "E Martē", "E Mërkurë", "E Enjte", "E Premte", "E Shtunë"]
+ },
+ 'sr-YU': { //Serbian (Srpski)
+ months: [
+ "Januar", "Februar", "Mart", "April", "Maj", "Jun", "Jul", "Avgust", "Septembar", "Oktobar", "Novembar", "Decembar"
+ ],
+ dayOfWeekShort: [
+ "Ned", "Pon", "Uto", "Sre", "čet", "Pet", "Sub"
+ ],
+ dayOfWeek: ["Nedelja","Ponedeljak", "Utorak", "Sreda", "Četvrtak", "Petak", "Subota"]
+ },
+ sr: { //Serbian Cyrillic (Српски)
+ months: [
+ "јануар", "фебруар", "март", "април", "мај", "јун", "јул", "август", "септембар", "октобар", "новембар", "децембар"
+ ],
+ dayOfWeekShort: [
+ "нед", "пон", "уто", "сре", "чет", "пет", "суб"
+ ],
+ dayOfWeek: ["Недеља","Понедељак", "Уторак", "Среда", "Четвртак", "Петак", "Субота"]
+ },
+ sv: { //Svenska
+ months: [
+ "Januari", "Februari", "Mars", "April", "Maj", "Juni", "Juli", "Augusti", "September", "Oktober", "November", "December"
+ ],
+ dayOfWeekShort: [
+ "Sön", "Mån", "Tis", "Ons", "Tor", "Fre", "Lör"
+ ],
+ dayOfWeek: ["Söndag", "Måndag", "Tisdag", "Onsdag", "Torsdag", "Fredag", "Lördag"]
+ },
+ 'zh-TW': { //Traditional Chinese (繁體中文)
+ months: [
+ "一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"
+ ],
+ dayOfWeekShort: [
+ "日", "一", "二", "三", "四", "五", "六"
+ ],
+ dayOfWeek: ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"]
+ },
+ zh: { //Simplified Chinese (简体中文)
+ months: [
+ "一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"
+ ],
+ dayOfWeekShort: [
+ "日", "一", "二", "三", "四", "五", "六"
+ ],
+ dayOfWeek: ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"]
+ },
+ ug:{ // Uyghur(ئۇيغۇرچە)
+ months: [
+ "1-ئاي","2-ئاي","3-ئاي","4-ئاي","5-ئاي","6-ئاي","7-ئاي","8-ئاي","9-ئاي","10-ئاي","11-ئاي","12-ئاي"
+ ],
+ dayOfWeek: [
+ "يەكشەنبە", "دۈشەنبە","سەيشەنبە","چارشەنبە","پەيشەنبە","جۈمە","شەنبە"
+ ]
+ },
+ he: { //Hebrew (עברית)
+ months: [
+ 'ינואר', 'פברואר', 'מרץ', 'אפריל', 'מאי', 'יוני', 'יולי', 'אוגוסט', 'ספטמבר', 'אוקטובר', 'נובמבר', 'דצמבר'
+ ],
+ dayOfWeekShort: [
+ 'א\'', 'ב\'', 'ג\'', 'ד\'', 'ה\'', 'ו\'', 'שבת'
+ ],
+ dayOfWeek: ["ראשון", "שני", "שלישי", "רביעי", "חמישי", "שישי", "שבת", "ראשון"]
+ },
+ hy: { // Armenian
+ months: [
+ "Հունվար", "Փետրվար", "Մարտ", "Ապրիլ", "Մայիս", "Հունիս", "Հուլիս", "Օգոստոս", "Սեպտեմբեր", "Հոկտեմբեր", "Նոյեմբեր", "Դեկտեմբեր"
+ ],
+ dayOfWeekShort: [
+ "Կի", "Երկ", "Երք", "Չոր", "Հնգ", "Ուրբ", "Շբթ"
+ ],
+ dayOfWeek: ["Կիրակի", "Երկուշաբթի", "Երեքշաբթի", "Չորեքշաբթի", "Հինգշաբթի", "Ուրբաթ", "Շաբաթ"]
+ },
+ kg: { // Kyrgyz
+ months: [
+ 'Үчтүн айы', 'Бирдин айы', 'Жалган Куран', 'Чын Куран', 'Бугу', 'Кулжа', 'Теке', 'Баш Оона', 'Аяк Оона', 'Тогуздун айы', 'Жетинин айы', 'Бештин айы'
+ ],
+ dayOfWeekShort: [
+ "Жек", "Дүй", "Шей", "Шар", "Бей", "Жум", "Ише"
+ ],
+ dayOfWeek: [
+ "Жекшемб", "Дүйшөмб", "Шейшемб", "Шаршемб", "Бейшемби", "Жума", "Ишенб"
+ ]
+ },
+ rm: { // Romansh
+ months: [
+ "Schaner", "Favrer", "Mars", "Avrigl", "Matg", "Zercladur", "Fanadur", "Avust", "Settember", "October", "November", "December"
+ ],
+ dayOfWeekShort: [
+ "Du", "Gli", "Ma", "Me", "Gie", "Ve", "So"
+ ],
+ dayOfWeek: [
+ "Dumengia", "Glindesdi", "Mardi", "Mesemna", "Gievgia", "Venderdi", "Sonda"
+ ]
+ },
+ ka: { // Georgian
+ months: [
+ 'იანვარი', 'თებერვალი', 'მარტი', 'აპრილი', 'მაისი', 'ივნისი', 'ივლისი', 'აგვისტო', 'სექტემბერი', 'ოქტომბერი', 'ნოემბერი', 'დეკემბერი'
+ ],
+ dayOfWeekShort: [
+ "კვ", "ორშ", "სამშ", "ოთხ", "ხუთ", "პარ", "შაბ"
+ ],
+ dayOfWeek: ["კვირა", "ორშაბათი", "სამშაბათი", "ოთხშაბათი", "ხუთშაბათი", "პარასკევი", "შაბათი"]
+ }
+ },
+
+ ownerDocument: document,
+ contentWindow: window,
+
+ value: '',
+ rtl: false,
+
+ format: 'Y/m/d H:i',
+ formatTime: 'H:i',
+ formatDate: 'Y/m/d',
+
+ startDate: false, // new Date(), '1986/12/08', '-1970/01/05','-1970/01/05',
+ step: 60,
+ monthChangeSpinner: true,
+
+ closeOnDateSelect: false,
+ closeOnTimeSelect: true,
+ closeOnWithoutClick: true,
+ closeOnInputClick: true,
+ openOnFocus: true,
+
+ timepicker: true,
+ datepicker: true,
+ weeks: false,
+
+ defaultTime: false, // use formatTime format (ex. '10:00' for formatTime: 'H:i')
+ defaultDate: false, // use formatDate format (ex new Date() or '1986/12/08' or '-1970/01/05' or '-1970/01/05')
+
+ minDate: false,
+ maxDate: false,
+ minTime: false,
+ maxTime: false,
+ minDateTime: false,
+ maxDateTime: false,
+
+ allowTimes: [],
+ opened: false,
+ initTime: true,
+ inline: false,
+ theme: '',
+ touchMovedThreshold: 5,
+
+ onSelectDate: function () {},
+ onSelectTime: function () {},
+ onChangeMonth: function () {},
+ onGetWeekOfYear: function () {},
+ onChangeYear: function () {},
+ onChangeDateTime: function () {},
+ onShow: function () {},
+ onClose: function () {},
+ onGenerate: function () {},
+
+ withoutCopyright: true,
+ inverseButton: false,
+ hours12: false,
+ next: 'xdsoft_next',
+ prev : 'xdsoft_prev',
+ dayOfWeekStart: 0,
+ parentID: 'body',
+ timeHeightInTimePicker: 25,
+ timepickerScrollbar: true,
+ todayButton: true,
+ prevButton: true,
+ nextButton: true,
+ defaultSelect: true,
+
+ scrollMonth: true,
+ scrollTime: true,
+ scrollInput: true,
+
+ lazyInit: false,
+ mask: false,
+ validateOnBlur: true,
+ allowBlank: true,
+ yearStart: 1950,
+ yearEnd: 2050,
+ monthStart: 0,
+ monthEnd: 11,
+ style: '',
+ id: '',
+ fixed: false,
+ roundTime: 'round', // ceil, floor
+ className: '',
+ weekends: [],
+ highlightedDates: [],
+ highlightedPeriods: [],
+ allowDates : [],
+ allowDateRe : null,
+ disabledDates : [],
+ disabledWeekDays: [],
+ yearOffset: 0,
+ beforeShowDay: null,
+
+ enterLikeTab: true,
+ showApplyButton: false,
+ insideParent: false,
+ };
+
+ var dateHelper = null,
+ defaultDateHelper = null,
+ globalLocaleDefault = 'en',
+ globalLocale = 'en';
+
+ var dateFormatterOptionsDefault = {
+ meridiem: ['AM', 'PM']
+ };
+
+ var initDateFormatter = function(){
+ var locale = default_options.i18n[globalLocale],
+ opts = {
+ days: locale.dayOfWeek,
+ daysShort: locale.dayOfWeekShort,
+ months: locale.months,
+ monthsShort: $.map(locale.months, function(n){ return n.substring(0, 3) })
+ };
+
+ if (typeof DateFormatter === 'function') {
+ dateHelper = defaultDateHelper = new DateFormatter({
+ dateSettings: $.extend({}, dateFormatterOptionsDefault, opts)
+ });
+ }
+ };
+
+ var dateFormatters = {
+ moment: {
+ default_options:{
+ format: 'YYYY/MM/DD HH:mm',
+ formatDate: 'YYYY/MM/DD',
+ formatTime: 'HH:mm',
+ },
+ formatter: {
+ parseDate: function (date, format) {
+ if(isFormatStandard(format)){
+ return defaultDateHelper.parseDate(date, format);
+ }
+ var d = moment(date, format);
+ return d.isValid() ? d.toDate() : false;
+ },
+
+ formatDate: function (date, format) {
+ if(isFormatStandard(format)){
+ return defaultDateHelper.formatDate(date, format);
+ }
+ return moment(date).format(format);
+ },
+
+ formatMask: function(format){
+ return format
+ .replace(/Y{4}/g, '9999')
+ .replace(/Y{2}/g, '99')
+ .replace(/M{2}/g, '19')
+ .replace(/D{2}/g, '39')
+ .replace(/H{2}/g, '29')
+ .replace(/m{2}/g, '59')
+ .replace(/s{2}/g, '59');
+ },
+ }
+ }
+ }
+
+ // for locale settings
+ $.datetimepicker = {
+ setLocale: function(locale){
+ var newLocale = default_options.i18n[locale] ? locale : globalLocaleDefault;
+ if (globalLocale !== newLocale) {
+ globalLocale = newLocale;
+ // reinit date formatter
+ initDateFormatter();
+ }
+ },
+
+ setDateFormatter: function(dateFormatter) {
+ if(typeof dateFormatter === 'string' && dateFormatters.hasOwnProperty(dateFormatter)){
+ var df = dateFormatters[dateFormatter];
+ $.extend(default_options, df.default_options);
+ dateHelper = df.formatter;
+ }
+ else {
+ dateHelper = dateFormatter;
+ }
+ },
+ };
+
+ var standardFormats = {
+ RFC_2822: 'D, d M Y H:i:s O',
+ ATOM: 'Y-m-d\TH:i:sP',
+ ISO_8601: 'Y-m-d\TH:i:sO',
+ RFC_822: 'D, d M y H:i:s O',
+ RFC_850: 'l, d-M-y H:i:s T',
+ RFC_1036: 'D, d M y H:i:s O',
+ RFC_1123: 'D, d M Y H:i:s O',
+ RSS: 'D, d M Y H:i:s O',
+ W3C: 'Y-m-d\TH:i:sP'
+ }
+
+ var isFormatStandard = function(format){
+ return Object.values(standardFormats).indexOf(format) === -1 ? false : true;
+ }
+
+ $.extend($.datetimepicker, standardFormats);
+
+ // first init date formatter
+ initDateFormatter();
+
+ // fix for ie8
+ if (!window.getComputedStyle) {
+ window.getComputedStyle = function (el) {
+ this.el = el;
+ this.getPropertyValue = function (prop) {
+ var re = /(-([a-z]))/g;
+ if (prop === 'float') {
+ prop = 'styleFloat';
+ }
+ if (re.test(prop)) {
+ prop = prop.replace(re, function (a, b, c) {
+ return c.toUpperCase();
+ });
+ }
+ return el.currentStyle[prop] || null;
+ };
+ return this;
+ };
+ }
+ if (!Array.prototype.indexOf) {
+ Array.prototype.indexOf = function (obj, start) {
+ var i, j;
+ for (i = (start || 0), j = this.length; i < j; i += 1) {
+ if (this[i] === obj) { return i; }
+ }
+ return -1;
+ };
+ }
+
+ Date.prototype.countDaysInMonth = function () {
+ return new Date(this.getFullYear(), this.getMonth() + 1, 0).getDate();
+ };
+
+ $.fn.xdsoftScroller = function (options, percent) {
+ return this.each(function () {
+ var timeboxparent = $(this),
+ pointerEventToXY = function (e) {
+ var out = {x: 0, y: 0},
+ touch;
+ if (e.type === 'touchstart' || e.type === 'touchmove' || e.type === 'touchend' || e.type === 'touchcancel') {
+ touch = e.originalEvent.touches[0] || e.originalEvent.changedTouches[0];
+ out.x = touch.clientX;
+ out.y = touch.clientY;
+ } else if (e.type === 'mousedown' || e.type === 'mouseup' || e.type === 'mousemove' || e.type === 'mouseover' || e.type === 'mouseout' || e.type === 'mouseenter' || e.type === 'mouseleave') {
+ out.x = e.clientX;
+ out.y = e.clientY;
+ }
+ return out;
+ },
+ getWheelDelta = function (e) {
+ var deltaY = 0;
+
+ if ('detail' in e) { deltaY = e.detail; }
+ if ('wheelDelta' in e) { deltaY = -e.wheelDelta / 120; }
+ if ('wheelDeltaY' in e) { deltaY = -e.wheelDeltaY / 120; }
+ if ('axis' in e && e.axis === e.HORIZONTAL_AXIS) { deltaY = 0; }
+
+ deltaY *= 10;
+
+ if ('deltaY' in e) { deltaY = e.deltaY; }
+
+ if (deltaY && e.deltaMode) {
+ if (e.deltaMode === 1) {
+ deltaY *= 40;
+ } else {
+ deltaY *= 800;
+ }
+ }
+
+ return deltaY;
+ },
+ timebox,
+ timeboxTop = 0,
+ parentHeight,
+ height,
+ scrollbar,
+ scroller,
+ maximumOffset = 100,
+ start = false,
+ startY = 0,
+ startTop = 0,
+ h1 = 0,
+ touchStart = false,
+ startTopScroll = 0,
+ calcOffset = function () {};
+
+ if (percent === 'hide') {
+ timeboxparent.find('.xdsoft_scrollbar').hide();
+ return;
+ }
+
+ if (!$(this).hasClass('xdsoft_scroller_box')) {
+ timebox = timeboxparent.children().eq(0);
+ timeboxTop = Math.abs(parseInt(timebox.css('marginTop'), 10));
+ parentHeight = timeboxparent[0].clientHeight;
+ height = timebox[0].offsetHeight;
+ scrollbar = $('<div class="xdsoft_scrollbar"></div>');
+ scroller = $('<div class="xdsoft_scroller"></div>');
+ scrollbar.append(scroller);
+
+ timeboxparent.addClass('xdsoft_scroller_box').append(scrollbar);
+ calcOffset = function calcOffset(event) {
+ var offset = pointerEventToXY(event).y - startY + startTopScroll;
+ if (offset < 0) {
+ offset = 0;
+ }
+ if (offset + scroller[0].offsetHeight > h1) {
+ offset = h1 - scroller[0].offsetHeight;
+ }
+ timeboxparent.trigger('scroll_element.xdsoft_scroller', [maximumOffset ? offset / maximumOffset : 0]);
+ };
+
+ scroller
+ .on('touchstart.xdsoft_scroller mousedown.xdsoft_scroller', function (event) {
+ if (!parentHeight) {
+ timeboxparent.trigger('resize_scroll.xdsoft_scroller', [percent]);
+ }
+
+ startY = pointerEventToXY(event).y;
+ startTopScroll = parseInt(scroller.css('marginTop'), 10);
+ h1 = scrollbar[0].offsetHeight;
+
+ if (event.type === 'mousedown' || event.type === 'touchstart') {
+ if (options.ownerDocument) {
+ $(options.ownerDocument.body).addClass('xdsoft_noselect');
+ }
+ $([options.ownerDocument.body, options.contentWindow]).on('touchend mouseup.xdsoft_scroller', function arguments_callee() {
+ $([options.ownerDocument.body, options.contentWindow]).off('touchend mouseup.xdsoft_scroller', arguments_callee)
+ .off('mousemove.xdsoft_scroller', calcOffset)
+ .removeClass('xdsoft_noselect');
+ });
+ $(options.ownerDocument.body).on('mousemove.xdsoft_scroller', calcOffset);
+ } else {
+ touchStart = true;
+ event.stopPropagation();
+ event.preventDefault();
+ }
+ })
+ .on('touchmove', function (event) {
+ if (touchStart) {
+ event.preventDefault();
+ calcOffset(event);
+ }
+ })
+ .on('touchend touchcancel', function () {
+ touchStart = false;
+ startTopScroll = 0;
+ });
+
+ timeboxparent
+ .on('scroll_element.xdsoft_scroller', function (event, percentage) {
+ if (!parentHeight) {
+ timeboxparent.trigger('resize_scroll.xdsoft_scroller', [percentage, true]);
+ }
+ percentage = percentage > 1 ? 1 : (percentage < 0 || isNaN(percentage)) ? 0 : percentage;
+ timeboxTop = parseFloat(Math.abs((timebox[0].offsetHeight - parentHeight) * percentage).toFixed(4));
+
+ scroller.css('marginTop', maximumOffset * percentage);
+ timebox.css('marginTop', -timeboxTop);
+ })
+ .on('resize_scroll.xdsoft_scroller', function (event, percentage, noTriggerScroll) {
+ var percent, sh;
+ parentHeight = timeboxparent[0].clientHeight;
+ height = timebox[0].offsetHeight;
+ percent = parentHeight / height;
+ sh = percent * scrollbar[0].offsetHeight;
+ if (percent > 1) {
+ scroller.hide();
+ } else {
+ scroller.show();
+ scroller.css('height', parseInt(sh > 10 ? sh : 10, 10));
+ maximumOffset = scrollbar[0].offsetHeight - scroller[0].offsetHeight;
+ if (noTriggerScroll !== true) {
+ timeboxparent.trigger('scroll_element.xdsoft_scroller', [percentage || timeboxTop / (height - parentHeight)]);
+ }
+ }
+ });
+
+ timeboxparent.on('mousewheel', function (event) {
+ var deltaY = getWheelDelta(event.originalEvent);
+ var top = Math.max(0, timeboxTop - deltaY);
+ timeboxparent.trigger('scroll_element.xdsoft_scroller', [top / (height - parentHeight)]);
+ event.stopPropagation();
+ return false;
+ });
+
+ timeboxparent.on('touchstart', function (event) {
+ start = pointerEventToXY(event);
+ startTop = timeboxTop;
+ });
+
+ timeboxparent.on('touchmove', function (event) {
+ if (start) {
+ event.preventDefault();
+ var coord = pointerEventToXY(event);
+ timeboxparent.trigger('scroll_element.xdsoft_scroller', [(startTop - (coord.y - start.y)) / (height - parentHeight)]);
+ }
+ });
+
+ timeboxparent.on('touchend touchcancel', function () {
+ start = false;
+ startTop = 0;
+ });
+ }
+ timeboxparent.trigger('resize_scroll.xdsoft_scroller', [percent]);
+ });
+ };
+
+ $.fn.datetimepicker = function (opt, opt2) {
+ var result = this,
+ KEY0 = 48,
+ KEY9 = 57,
+ _KEY0 = 96,
+ _KEY9 = 105,
+ CTRLKEY = 17,
+ CMDKEY = 91,
+ DEL = 46,
+ ENTER = 13,
+ ESC = 27,
+ BACKSPACE = 8,
+ ARROWLEFT = 37,
+ ARROWUP = 38,
+ ARROWRIGHT = 39,
+ ARROWDOWN = 40,
+ TAB = 9,
+ F5 = 116,
+ AKEY = 65,
+ CKEY = 67,
+ VKEY = 86,
+ ZKEY = 90,
+ YKEY = 89,
+ ctrlDown = false,
+ cmdDown = false,
+ options = ($.isPlainObject(opt) || !opt) ? $.extend(true, {}, default_options, opt) : $.extend(true, {}, default_options),
+
+ lazyInitTimer = 0,
+ createDateTimePicker,
+ destroyDateTimePicker,
+
+ lazyInit = function (input) {
+ input
+ .on('open.xdsoft focusin.xdsoft mousedown.xdsoft touchstart', function initOnActionCallback() {
+ if (input.is(':disabled') || input.data('xdsoft_datetimepicker')) {
+ return;
+ }
+ clearTimeout(lazyInitTimer);
+ lazyInitTimer = setTimeout(function () {
+
+ if (!input.data('xdsoft_datetimepicker')) {
+ createDateTimePicker(input);
+ }
+ input
+ .off('open.xdsoft focusin.xdsoft mousedown.xdsoft touchstart', initOnActionCallback)
+ .trigger('open.xdsoft');
+ }, 100);
+ });
+ };
+
+ createDateTimePicker = function (input) {
+ var datetimepicker = $('<div class="xdsoft_datetimepicker xdsoft_noselect"></div>'),
+ xdsoft_copyright = $('<div class="xdsoft_copyright"><a target="_blank" href="http://xdsoft.net/jqplugins/datetimepicker/">xdsoft.net</a></div>'),
+ datepicker = $('<div class="xdsoft_datepicker active"></div>'),
+ month_picker = $('<div class="xdsoft_monthpicker"><button type="button" class="xdsoft_prev"></button><button type="button" class="xdsoft_today_button"></button>' +
+ '<div class="xdsoft_label xdsoft_month"><span></span><i></i></div>' +
+ '<div class="xdsoft_label xdsoft_year"><span></span><i></i></div>' +
+ '<button type="button" class="xdsoft_next"></button></div>'),
+ calendar = $('<div class="xdsoft_calendar"></div>'),
+ timepicker = $('<div class="xdsoft_timepicker active"><button type="button" class="xdsoft_prev"></button><div class="xdsoft_time_box"></div><button type="button" class="xdsoft_next"></button></div>'),
+ timeboxparent = timepicker.find('.xdsoft_time_box').eq(0),
+ timebox = $('<div class="xdsoft_time_variant"></div>'),
+ applyButton = $('<button type="button" class="xdsoft_save_selected blue-gradient-button">Save Selected</button>'),
+
+ monthselect = $('<div class="xdsoft_select xdsoft_monthselect"><div></div></div>'),
+ yearselect = $('<div class="xdsoft_select xdsoft_yearselect"><div></div></div>'),
+ triggerAfterOpen = false,
+ XDSoft_datetime,
+
+ xchangeTimer,
+ timerclick,
+ current_time_index,
+ setPos,
+ timer = 0,
+ _xdsoft_datetime,
+ forEachAncestorOf;
+
+ if (options.id) {
+ datetimepicker.attr('id', options.id);
+ }
+ if (options.style) {
+ datetimepicker.attr('style', options.style);
+ }
+ if (options.weeks) {
+ datetimepicker.addClass('xdsoft_showweeks');
+ }
+ if (options.rtl) {
+ datetimepicker.addClass('xdsoft_rtl');
+ }
+
+ datetimepicker.addClass('xdsoft_' + options.theme);
+ datetimepicker.addClass(options.className);
+
+ month_picker
+ .find('.xdsoft_month span')
+ .after(monthselect);
+ month_picker
+ .find('.xdsoft_year span')
+ .after(yearselect);
+
+ month_picker
+ .find('.xdsoft_month,.xdsoft_year')
+ .on('touchstart mousedown.xdsoft', function (event) {
+ var select = $(this).find('.xdsoft_select').eq(0),
+ val = 0,
+ top = 0,
+ visible = select.is(':visible'),
+ items,
+ i;
+
+ month_picker
+ .find('.xdsoft_select')
+ .hide();
+ if (_xdsoft_datetime.currentTime) {
+ val = _xdsoft_datetime.currentTime[$(this).hasClass('xdsoft_month') ? 'getMonth' : 'getFullYear']();
+ }
+
+ select[visible ? 'hide' : 'show']();
+ for (items = select.find('div.xdsoft_option'), i = 0; i < items.length; i += 1) {
+ if (items.eq(i).data('value') === val) {
+ break;
+ } else {
+ top += items[0].offsetHeight;
+ }
+ }
+
+ select.xdsoftScroller(options, top / (select.children()[0].offsetHeight - (select[0].clientHeight)));
+ event.stopPropagation();
+ return false;
+ });
+
+ var handleTouchMoved = function (event) {
+ var evt = event.originalEvent;
+ var touchPosition = evt.touches ? evt.touches[0] : evt;
+ this.touchStartPosition = this.touchStartPosition || touchPosition;
+ var xMovement = Math.abs(this.touchStartPosition.clientX - touchPosition.clientX);
+ var yMovement = Math.abs(this.touchStartPosition.clientY - touchPosition.clientY);
+ var distance = Math.sqrt(xMovement * xMovement + yMovement * yMovement);
+ if(distance > options.touchMovedThreshold) {
+ this.touchMoved = true;
+ }
+ }
+
+ month_picker
+ .find('.xdsoft_select')
+ .xdsoftScroller(options)
+ .on('touchstart mousedown.xdsoft', function (event) {
+ var evt = event.originalEvent;
+ this.touchMoved = false;
+ this.touchStartPosition = evt.touches ? evt.touches[0] : evt;
+ event.stopPropagation();
+ event.preventDefault();
+ })
+ .on('touchmove', '.xdsoft_option', handleTouchMoved)
+ .on('touchend mousedown.xdsoft', '.xdsoft_option', function () {
+ if (!this.touchMoved) {
+ if (_xdsoft_datetime.currentTime === undefined || _xdsoft_datetime.currentTime === null) {
+ _xdsoft_datetime.currentTime = _xdsoft_datetime.now();
+ }
+
+ var year = _xdsoft_datetime.currentTime.getFullYear();
+ if (_xdsoft_datetime && _xdsoft_datetime.currentTime) {
+ _xdsoft_datetime.currentTime[$(this).parent().parent().hasClass('xdsoft_monthselect') ? 'setMonth' : 'setFullYear']($(this).data('value'));
+ }
+
+ $(this).parent().parent().hide();
+
+ datetimepicker.trigger('xchange.xdsoft');
+ if (options.onChangeMonth && $.isFunction(options.onChangeMonth)) {
+ options.onChangeMonth.call(datetimepicker, _xdsoft_datetime.currentTime, datetimepicker.data('input'));
+ }
+
+ if (year !== _xdsoft_datetime.currentTime.getFullYear() && $.isFunction(options.onChangeYear)) {
+ options.onChangeYear.call(datetimepicker, _xdsoft_datetime.currentTime, datetimepicker.data('input'));
+ }
+ }
+ });
+
+ datetimepicker.getValue = function () {
+ return _xdsoft_datetime.getCurrentTime();
+ };
+
+ datetimepicker.setOptions = function (_options) {
+ var highlightedDates = {};
+
+ options = $.extend(true, {}, options, _options);
+
+ if (_options.allowTimes && $.isArray(_options.allowTimes) && _options.allowTimes.length) {
+ options.allowTimes = $.extend(true, [], _options.allowTimes);
+ }
+
+ if (_options.weekends && $.isArray(_options.weekends) && _options.weekends.length) {
+ options.weekends = $.extend(true, [], _options.weekends);
+ }
+
+ if (_options.allowDates && $.isArray(_options.allowDates) && _options.allowDates.length) {
+ options.allowDates = $.extend(true, [], _options.allowDates);
+ }
+
+ if (_options.allowDateRe && Object.prototype.toString.call(_options.allowDateRe)==="[object String]") {
+ options.allowDateRe = new RegExp(_options.allowDateRe);
+ }
+
+ if (_options.highlightedDates && $.isArray(_options.highlightedDates) && _options.highlightedDates.length) {
+ $.each(_options.highlightedDates, function (index, value) {
+ var splitData = $.map(value.split(','), $.trim),
+ exDesc,
+ hDate = new HighlightedDate(dateHelper.parseDate(splitData[0], options.formatDate), splitData[1], splitData[2]), // date, desc, style
+ keyDate = dateHelper.formatDate(hDate.date, options.formatDate);
+ if (highlightedDates[keyDate] !== undefined) {
+ exDesc = highlightedDates[keyDate].desc;
+ if (exDesc && exDesc.length && hDate.desc && hDate.desc.length) {
+ highlightedDates[keyDate].desc = exDesc + "\n" + hDate.desc;
+ }
+ } else {
+ highlightedDates[keyDate] = hDate;
+ }
+ });
+
+ options.highlightedDates = $.extend(true, [], highlightedDates);
+ }
+
+ if (_options.highlightedPeriods && $.isArray(_options.highlightedPeriods) && _options.highlightedPeriods.length) {
+ highlightedDates = $.extend(true, [], options.highlightedDates);
+ $.each(_options.highlightedPeriods, function (index, value) {
+ var dateTest, // start date
+ dateEnd,
+ desc,
+ hDate,
+ keyDate,
+ exDesc,
+ style;
+ if ($.isArray(value)) {
+ dateTest = value[0];
+ dateEnd = value[1];
+ desc = value[2];
+ style = value[3];
+ }
+ else {
+ var splitData = $.map(value.split(','), $.trim);
+ dateTest = dateHelper.parseDate(splitData[0], options.formatDate);
+ dateEnd = dateHelper.parseDate(splitData[1], options.formatDate);
+ desc = splitData[2];
+ style = splitData[3];
+ }
+
+ while (dateTest <= dateEnd) {
+ hDate = new HighlightedDate(dateTest, desc, style);
+ keyDate = dateHelper.formatDate(dateTest, options.formatDate);
+ dateTest.setDate(dateTest.getDate() + 1);
+ if (highlightedDates[keyDate] !== undefined) {
+ exDesc = highlightedDates[keyDate].desc;
+ if (exDesc && exDesc.length && hDate.desc && hDate.desc.length) {
+ highlightedDates[keyDate].desc = exDesc + "\n" + hDate.desc;
+ }
+ } else {
+ highlightedDates[keyDate] = hDate;
+ }
+ }
+ });
+
+ options.highlightedDates = $.extend(true, [], highlightedDates);
+ }
+
+ if (_options.disabledDates && $.isArray(_options.disabledDates) && _options.disabledDates.length) {
+ options.disabledDates = $.extend(true, [], _options.disabledDates);
+ }
+
+ if (_options.disabledWeekDays && $.isArray(_options.disabledWeekDays) && _options.disabledWeekDays.length) {
+ options.disabledWeekDays = $.extend(true, [], _options.disabledWeekDays);
+ }
+
+ if ((options.open || options.opened) && (!options.inline)) {
+ input.trigger('open.xdsoft');
+ }
+
+ if (options.inline) {
+ triggerAfterOpen = true;
+ datetimepicker.addClass('xdsoft_inline');
+ input.after(datetimepicker).hide();
+ }
+
+ if (options.inverseButton) {
+ options.next = 'xdsoft_prev';
+ options.prev = 'xdsoft_next';
+ }
+
+ if (options.datepicker) {
+ datepicker.addClass('active');
+ } else {
+ datepicker.removeClass('active');
+ }
+
+ if (options.timepicker) {
+ timepicker.addClass('active');
+ } else {
+ timepicker.removeClass('active');
+ }
+
+ if (options.value) {
+ _xdsoft_datetime.setCurrentTime(options.value);
+ if (input && input.val) {
+ input.val(_xdsoft_datetime.str);
+ }
+ }
+
+ if (isNaN(options.dayOfWeekStart)) {
+ options.dayOfWeekStart = 0;
+ } else {
+ options.dayOfWeekStart = parseInt(options.dayOfWeekStart, 10) % 7;
+ }
+
+ if (!options.timepickerScrollbar) {
+ timeboxparent.xdsoftScroller(options, 'hide');
+ }
+
+ if (options.minDate && /^[\+\-](.*)$/.test(options.minDate)) {
+ options.minDate = dateHelper.formatDate(_xdsoft_datetime.strToDateTime(options.minDate), options.formatDate);
+ }
+
+ if (options.maxDate && /^[\+\-](.*)$/.test(options.maxDate)) {
+ options.maxDate = dateHelper.formatDate(_xdsoft_datetime.strToDateTime(options.maxDate), options.formatDate);
+ }
+
+ if (options.minDateTime && /^\+(.*)$/.test(options.minDateTime)) {
+ options.minDateTime = _xdsoft_datetime.strToDateTime(options.minDateTime).dateFormat(options.formatDate);
+ }
+
+ if (options.maxDateTime && /^\+(.*)$/.test(options.maxDateTime)) {
+ options.maxDateTime = _xdsoft_datetime.strToDateTime(options.maxDateTime).dateFormat(options.formatDate);
+ }
+
+ applyButton.toggle(options.showApplyButton);
+
+ month_picker
+ .find('.xdsoft_today_button')
+ .css('visibility', !options.todayButton ? 'hidden' : 'visible');
+
+ month_picker
+ .find('.' + options.prev)
+ .css('visibility', !options.prevButton ? 'hidden' : 'visible');
+
+ month_picker
+ .find('.' + options.next)
+ .css('visibility', !options.nextButton ? 'hidden' : 'visible');
+
+ setMask(options);
+
+ if (options.validateOnBlur) {
+ input
+ .off('blur.xdsoft')
+ .on('blur.xdsoft', function () {
+ if (options.allowBlank && (!$.trim($(this).val()).length ||
+ (typeof options.mask === "string" && $.trim($(this).val()) === options.mask.replace(/[0-9]/g, '_')))) {
+ $(this).val(null);
+ datetimepicker.data('xdsoft_datetime').empty();
+ } else {
+ var d = dateHelper.parseDate($(this).val(), options.format);
+ if (d) { // parseDate() may skip some invalid parts like date or time, so make it clear for user: show parsed date/time
+ $(this).val(dateHelper.formatDate(d, options.format));
+ } else {
+ var splittedHours = +([$(this).val()[0], $(this).val()[1]].join('')),
+ splittedMinutes = +([$(this).val()[2], $(this).val()[3]].join(''));
+
+ // parse the numbers as 0312 => 03:12
+ if (!options.datepicker && options.timepicker && splittedHours >= 0 && splittedHours < 24 && splittedMinutes >= 0 && splittedMinutes < 60) {
+ $(this).val([splittedHours, splittedMinutes].map(function (item) {
+ return item > 9 ? item : '0' + item;
+ }).join(':'));
+ } else {
+ $(this).val(dateHelper.formatDate(_xdsoft_datetime.now(), options.format));
+ }
+ }
+ datetimepicker.data('xdsoft_datetime').setCurrentTime($(this).val());
+ }
+
+ datetimepicker.trigger('changedatetime.xdsoft');
+ datetimepicker.trigger('close.xdsoft');
+ });
+ }
+ options.dayOfWeekStartPrev = (options.dayOfWeekStart === 0) ? 6 : options.dayOfWeekStart - 1;
+
+ datetimepicker
+ .trigger('xchange.xdsoft')
+ .trigger('afterOpen.xdsoft');
+ };
+
+ datetimepicker
+ .data('options', options)
+ .on('touchstart mousedown.xdsoft', function (event) {
+ event.stopPropagation();
+ event.preventDefault();
+ yearselect.hide();
+ monthselect.hide();
+ return false;
+ });
+
+ //scroll_element = timepicker.find('.xdsoft_time_box');
+ timeboxparent.append(timebox);
+ timeboxparent.xdsoftScroller(options);
+
+ datetimepicker.on('afterOpen.xdsoft', function () {
+ timeboxparent.xdsoftScroller(options);
+ });
+
+ datetimepicker
+ .append(datepicker)
+ .append(timepicker);
+
+ if (options.withoutCopyright !== true) {
+ datetimepicker
+ .append(xdsoft_copyright);
+ }
+
+ datepicker
+ .append(month_picker)
+ .append(calendar)
+ .append(applyButton);
+
+ if (options.insideParent) {
+ $(input).parent().append(datetimepicker);
+ } else {
+ $(options.parentID).append(datetimepicker);
+ }
+
+ XDSoft_datetime = function () {
+ var _this = this;
+ _this.now = function (norecursion) {
+ var d = new Date(),
+ date,
+ time;
+
+ if (!norecursion && options.defaultDate) {
+ date = _this.strToDateTime(options.defaultDate);
+ d.setFullYear(date.getFullYear());
+ d.setMonth(date.getMonth());
+ d.setDate(date.getDate());
+ }
+
+ d.setFullYear(d.getFullYear());
+
+ if (!norecursion && options.defaultTime) {
+ time = _this.strtotime(options.defaultTime);
+ d.setHours(time.getHours());
+ d.setMinutes(time.getMinutes());
+ d.setSeconds(time.getSeconds());
+ d.setMilliseconds(time.getMilliseconds());
+ }
+ return d;
+ };
+
+ _this.isValidDate = function (d) {
+ if (Object.prototype.toString.call(d) !== "[object Date]") {
+ return false;
+ }
+ return !isNaN(d.getTime());
+ };
+
+ _this.setCurrentTime = function (dTime, requireValidDate) {
+ if (typeof dTime === 'string') {
+ _this.currentTime = _this.strToDateTime(dTime);
+ }
+ else if (_this.isValidDate(dTime)) {
+ _this.currentTime = dTime;
+ }
+ else if (!dTime && !requireValidDate && options.allowBlank && !options.inline) {
+ _this.currentTime = null;
+ }
+ else {
+ _this.currentTime = _this.now();
+ }
+
+ datetimepicker.trigger('xchange.xdsoft');
+ };
+
+ _this.empty = function () {
+ _this.currentTime = null;
+ };
+
+ _this.getCurrentTime = function () {
+ return _this.currentTime;
+ };
+
+ _this.nextMonth = function () {
+
+ if (_this.currentTime === undefined || _this.currentTime === null) {
+ _this.currentTime = _this.now();
+ }
+
+ var month = _this.currentTime.getMonth() + 1,
+ year;
+ if (month === 12) {
+ _this.currentTime.setFullYear(_this.currentTime.getFullYear() + 1);
+ month = 0;
+ }
+
+ year = _this.currentTime.getFullYear();
+
+ _this.currentTime.setDate(
+ Math.min(
+ new Date(_this.currentTime.getFullYear(), month + 1, 0).getDate(),
+ _this.currentTime.getDate()
+ )
+ );
+ _this.currentTime.setMonth(month);
+
+ if (options.onChangeMonth && $.isFunction(options.onChangeMonth)) {
+ options.onChangeMonth.call(datetimepicker, _xdsoft_datetime.currentTime, datetimepicker.data('input'));
+ }
+
+ if (year !== _this.currentTime.getFullYear() && $.isFunction(options.onChangeYear)) {
+ options.onChangeYear.call(datetimepicker, _xdsoft_datetime.currentTime, datetimepicker.data('input'));
+ }
+
+ datetimepicker.trigger('xchange.xdsoft');
+ return month;
+ };
+
+ _this.prevMonth = function () {
+
+ if (_this.currentTime === undefined || _this.currentTime === null) {
+ _this.currentTime = _this.now();
+ }
+
+ var month = _this.currentTime.getMonth() - 1;
+ if (month === -1) {
+ _this.currentTime.setFullYear(_this.currentTime.getFullYear() - 1);
+ month = 11;
+ }
+ _this.currentTime.setDate(
+ Math.min(
+ new Date(_this.currentTime.getFullYear(), month + 1, 0).getDate(),
+ _this.currentTime.getDate()
+ )
+ );
+ _this.currentTime.setMonth(month);
+ if (options.onChangeMonth && $.isFunction(options.onChangeMonth)) {
+ options.onChangeMonth.call(datetimepicker, _xdsoft_datetime.currentTime, datetimepicker.data('input'));
+ }
+ datetimepicker.trigger('xchange.xdsoft');
+ return month;
+ };
+
+ _this.getWeekOfYear = function (datetime) {
+ if (options.onGetWeekOfYear && $.isFunction(options.onGetWeekOfYear)) {
+ var week = options.onGetWeekOfYear.call(datetimepicker, datetime);
+ if (typeof week !== 'undefined') {
+ return week;
+ }
+ }
+ var onejan = new Date(datetime.getFullYear(), 0, 1);
+
+ //First week of the year is th one with the first Thursday according to ISO8601
+ if (onejan.getDay() !== 4) {
+ onejan.setMonth(0, 1 + ((4 - onejan.getDay()+ 7) % 7));
+ }
+
+ return Math.ceil((((datetime - onejan) / 86400000) + onejan.getDay() + 1) / 7);
+ };
+
+ _this.strToDateTime = function (sDateTime) {
+ var tmpDate = [], timeOffset, currentTime;
+
+ if (sDateTime && sDateTime instanceof Date && _this.isValidDate(sDateTime)) {
+ return sDateTime;
+ }
+
+ tmpDate = /^([+-]{1})(.*)$/.exec(sDateTime);
+
+ if (tmpDate) {
+ tmpDate[2] = dateHelper.parseDate(tmpDate[2], options.formatDate);
+ }
+
+ if (tmpDate && tmpDate[2]) {
+ timeOffset = tmpDate[2].getTime() - (tmpDate[2].getTimezoneOffset()) * 60000;
+ currentTime = new Date((_this.now(true)).getTime() + parseInt(tmpDate[1] + '1', 10) * timeOffset);
+ } else {
+ currentTime = sDateTime ? dateHelper.parseDate(sDateTime, options.format) : _this.now();
+ }
+
+ if (!_this.isValidDate(currentTime)) {
+ currentTime = _this.now();
+ }
+
+ return currentTime;
+ };
+
+ _this.strToDate = function (sDate) {
+ if (sDate && sDate instanceof Date && _this.isValidDate(sDate)) {
+ return sDate;
+ }
+
+ var currentTime = sDate ? dateHelper.parseDate(sDate, options.formatDate) : _this.now(true);
+ if (!_this.isValidDate(currentTime)) {
+ currentTime = _this.now(true);
+ }
+ return currentTime;
+ };
+
+ _this.strtotime = function (sTime) {
+ if (sTime && sTime instanceof Date && _this.isValidDate(sTime)) {
+ return sTime;
+ }
+ var currentTime = sTime ? dateHelper.parseDate(sTime, options.formatTime) : _this.now(true);
+ if (!_this.isValidDate(currentTime)) {
+ currentTime = _this.now(true);
+ }
+ return currentTime;
+ };
+
+ _this.str = function () {
+ var format = options.format;
+ if (options.yearOffset) {
+ format = format.replace('Y', _this.currentTime.getFullYear() + options.yearOffset);
+ format = format.replace('y', String(_this.currentTime.getFullYear() + options.yearOffset).substring(2, 4));
+ }
+ return dateHelper.formatDate(_this.currentTime, format);
+ };
+ _this.currentTime = this.now();
+ };
+
+ _xdsoft_datetime = new XDSoft_datetime();
+
+ applyButton.on('touchend click', function (e) {//pathbrite
+ e.preventDefault();
+ datetimepicker.data('changed', true);
+ _xdsoft_datetime.setCurrentTime(getCurrentValue());
+ input.val(_xdsoft_datetime.str());
+ datetimepicker.trigger('close.xdsoft');
+ });
+ month_picker
+ .find('.xdsoft_today_button')
+ .on('touchend mousedown.xdsoft', function () {
+ datetimepicker.data('changed', true);
+ _xdsoft_datetime.setCurrentTime(0, true);
+ datetimepicker.trigger('afterOpen.xdsoft');
+ }).on('dblclick.xdsoft', function () {
+ var currentDate = _xdsoft_datetime.getCurrentTime(), minDate, maxDate;
+ currentDate = new Date(currentDate.getFullYear(), currentDate.getMonth(), currentDate.getDate());
+ minDate = _xdsoft_datetime.strToDate(options.minDate);
+ minDate = new Date(minDate.getFullYear(), minDate.getMonth(), minDate.getDate());
+ if (currentDate < minDate) {
+ return;
+ }
+ maxDate = _xdsoft_datetime.strToDate(options.maxDate);
+ maxDate = new Date(maxDate.getFullYear(), maxDate.getMonth(), maxDate.getDate());
+ if (currentDate > maxDate) {
+ return;
+ }
+ input.val(_xdsoft_datetime.str());
+ input.trigger('change');
+ datetimepicker.trigger('close.xdsoft');
+ });
+ month_picker
+ .find('.xdsoft_prev,.xdsoft_next')
+ .on('touchend mousedown.xdsoft', function () {
+ var $this = $(this),
+ timer = 0,
+ stop = false;
+
+ (function arguments_callee1(v) {
+ if ($this.hasClass(options.next)) {
+ _xdsoft_datetime.nextMonth();
+ } else if ($this.hasClass(options.prev)) {
+ _xdsoft_datetime.prevMonth();
+ }
+ if (options.monthChangeSpinner) {
+ if (!stop) {
+ timer = setTimeout(arguments_callee1, v || 100);
+ }
+ }
+ }(500));
+
+ $([options.ownerDocument.body, options.contentWindow]).on('touchend mouseup.xdsoft', function arguments_callee2() {
+ clearTimeout(timer);
+ stop = true;
+ $([options.ownerDocument.body, options.contentWindow]).off('touchend mouseup.xdsoft', arguments_callee2);
+ });
+ });
+
+ timepicker
+ .find('.xdsoft_prev,.xdsoft_next')
+ .on('touchend mousedown.xdsoft', function () {
+ var $this = $(this),
+ timer = 0,
+ stop = false,
+ period = 110;
+ (function arguments_callee4(v) {
+ var pheight = timeboxparent[0].clientHeight,
+ height = timebox[0].offsetHeight,
+ top = Math.abs(parseInt(timebox.css('marginTop'), 10));
+ if ($this.hasClass(options.next) && (height - pheight) - options.timeHeightInTimePicker >= top) {
+ timebox.css('marginTop', '-' + (top + options.timeHeightInTimePicker) + 'px');
+ } else if ($this.hasClass(options.prev) && top - options.timeHeightInTimePicker >= 0) {
+ timebox.css('marginTop', '-' + (top - options.timeHeightInTimePicker) + 'px');
+ }
+ /**
+ * Fixed bug:
+ * When using css3 transition, it will cause a bug that you cannot scroll the timepicker list.
+ * The reason is that the transition-duration time, if you set it to 0, all things fine, otherwise, this
+ * would cause a bug when you use jquery.css method.
+ * Let's say: * { transition: all .5s ease; }
+ * jquery timebox.css('marginTop') will return the original value which is before you clicking the next/prev button,
+ * meanwhile the timebox[0].style.marginTop will return the right value which is after you clicking the
+ * next/prev button.
+ *
+ * What we should do:
+ * Replace timebox.css('marginTop') with timebox[0].style.marginTop.
+ */
+ timeboxparent.trigger('scroll_element.xdsoft_scroller', [Math.abs(parseInt(timebox[0].style.marginTop, 10) / (height - pheight))]);
+ period = (period > 10) ? 10 : period - 10;
+ if (!stop) {
+ timer = setTimeout(arguments_callee4, v || period);
+ }
+ }(500));
+ $([options.ownerDocument.body, options.contentWindow]).on('touchend mouseup.xdsoft', function arguments_callee5() {
+ clearTimeout(timer);
+ stop = true;
+ $([options.ownerDocument.body, options.contentWindow])
+ .off('touchend mouseup.xdsoft', arguments_callee5);
+ });
+ });
+
+ xchangeTimer = 0;
+ // base handler - generating a calendar and timepicker
+ datetimepicker
+ .on('xchange.xdsoft', function (event) {
+ clearTimeout(xchangeTimer);
+ xchangeTimer = setTimeout(function () {
+
+ if (_xdsoft_datetime.currentTime === undefined || _xdsoft_datetime.currentTime === null) {
+ _xdsoft_datetime.currentTime = _xdsoft_datetime.now();
+ }
+
+ var table = '',
+ start = new Date(_xdsoft_datetime.currentTime.getFullYear(), _xdsoft_datetime.currentTime.getMonth(), 1, 12, 0, 0),
+ i = 0,
+ j,
+ today = _xdsoft_datetime.now(),
+ maxDate = false,
+ minDate = false,
+ minDateTime = false,
+ maxDateTime = false,
+ hDate,
+ day,
+ d,
+ y,
+ m,
+ w,
+ classes = [],
+ customDateSettings,
+ newRow = true,
+ time = '',
+ h,
+ line_time,
+ description;
+
+ while (start.getDay() !== options.dayOfWeekStart) {
+ start.setDate(start.getDate() - 1);
+ }
+
+ table += '<table><thead><tr>';
+
+ if (options.weeks) {
+ table += '<th></th>';
+ }
+
+ for (j = 0; j < 7; j += 1) {
+ table += '<th>' + options.i18n[globalLocale].dayOfWeekShort[(j + options.dayOfWeekStart) % 7] + '</th>';
+ }
+
+ table += '</tr></thead>';
+ table += '<tbody>';
+
+ if (options.maxDate !== false) {
+ maxDate = _xdsoft_datetime.strToDate(options.maxDate);
+ maxDate = new Date(maxDate.getFullYear(), maxDate.getMonth(), maxDate.getDate(), 23, 59, 59, 999);
+ }
+
+ if (options.minDate !== false) {
+ minDate = _xdsoft_datetime.strToDate(options.minDate);
+ minDate = new Date(minDate.getFullYear(), minDate.getMonth(), minDate.getDate());
+ }
+
+ if (options.minDateTime !== false) {
+ minDateTime = _xdsoft_datetime.strToDate(options.minDateTime);
+ minDateTime = new Date(minDateTime.getFullYear(), minDateTime.getMonth(), minDateTime.getDate(), minDateTime.getHours(), minDateTime.getMinutes(), minDateTime.getSeconds());
+ }
+
+ if (options.maxDateTime !== false) {
+ maxDateTime = _xdsoft_datetime.strToDate(options.maxDateTime);
+ maxDateTime = new Date(maxDateTime.getFullYear(), maxDateTime.getMonth(), maxDateTime.getDate(), maxDateTime.getHours(), maxDateTime.getMinutes(), maxDateTime.getSeconds());
+ }
+
+ var maxDateTimeDay;
+ if (maxDateTime !== false) {
+ maxDateTimeDay = ((maxDateTime.getFullYear() * 12) + maxDateTime.getMonth()) * 31 + maxDateTime.getDate();
+ }
+
+ while (i < _xdsoft_datetime.currentTime.countDaysInMonth() || start.getDay() !== options.dayOfWeekStart || _xdsoft_datetime.currentTime.getMonth() === start.getMonth()) {
+ classes = [];
+ i += 1;
+
+ day = start.getDay();
+ d = start.getDate();
+ y = start.getFullYear();
+ m = start.getMonth();
+ w = _xdsoft_datetime.getWeekOfYear(start);
+ description = '';
+
+ classes.push('xdsoft_date');
+
+ if (options.beforeShowDay && $.isFunction(options.beforeShowDay.call)) {
+ customDateSettings = options.beforeShowDay.call(datetimepicker, start);
+ } else {
+ customDateSettings = null;
+ }
+
+ if(options.allowDateRe && Object.prototype.toString.call(options.allowDateRe) === "[object RegExp]"){
+ if(!options.allowDateRe.test(dateHelper.formatDate(start, options.formatDate))){
+ classes.push('xdsoft_disabled');
+ }
+ }
+
+ if(options.allowDates && options.allowDates.length>0){
+ if(options.allowDates.indexOf(dateHelper.formatDate(start, options.formatDate)) === -1){
+ classes.push('xdsoft_disabled');
+ }
+ }
+
+ var currentDay = ((start.getFullYear() * 12) + start.getMonth()) * 31 + start.getDate();
+ if ((maxDate !== false && start > maxDate) || (minDateTime !== false && start < minDateTime) || (minDate !== false && start < minDate) || (maxDateTime !== false && currentDay > maxDateTimeDay) || (customDateSettings && customDateSettings[0] === false)) {
+ classes.push('xdsoft_disabled');
+ }
+
+ if (options.disabledDates.indexOf(dateHelper.formatDate(start, options.formatDate)) !== -1) {
+ classes.push('xdsoft_disabled');
+ }
+
+ if (options.disabledWeekDays.indexOf(day) !== -1) {
+ classes.push('xdsoft_disabled');
+ }
+
+ if (input.is('[disabled]')) {
+ classes.push('xdsoft_disabled');
+ }
+
+ if (customDateSettings && customDateSettings[1] !== "") {
+ classes.push(customDateSettings[1]);
+ }
+
+ if (_xdsoft_datetime.currentTime.getMonth() !== m) {
+ classes.push('xdsoft_other_month');
+ }
+
+ if ((options.defaultSelect || datetimepicker.data('changed')) && dateHelper.formatDate(_xdsoft_datetime.currentTime, options.formatDate) === dateHelper.formatDate(start, options.formatDate)) {
+ classes.push('xdsoft_current');
+ }
+
+ if (dateHelper.formatDate(today, options.formatDate) === dateHelper.formatDate(start, options.formatDate)) {
+ classes.push('xdsoft_today');
+ }
+
+ if (start.getDay() === 0 || start.getDay() === 6 || options.weekends.indexOf(dateHelper.formatDate(start, options.formatDate)) !== -1) {
+ classes.push('xdsoft_weekend');
+ }
+
+ if (options.highlightedDates[dateHelper.formatDate(start, options.formatDate)] !== undefined) {
+ hDate = options.highlightedDates[dateHelper.formatDate(start, options.formatDate)];
+ classes.push(hDate.style === undefined ? 'xdsoft_highlighted_default' : hDate.style);
+ description = hDate.desc === undefined ? '' : hDate.desc;
+ }
+
+ if (options.beforeShowDay && $.isFunction(options.beforeShowDay)) {
+ classes.push(options.beforeShowDay(start));
+ }
+
+ if (newRow) {
+ table += '<tr>';
+ newRow = false;
+ if (options.weeks) {
+ table += '<th>' + w + '</th>';
+ }
+ }
+
+ table += '<td data-date="' + d + '" data-month="' + m + '" data-year="' + y + '"' + ' class="xdsoft_date xdsoft_day_of_week' + start.getDay() + ' ' + classes.join(' ') + '" title="' + description + '">' +
+ '<div>' + d + '</div>' +
+ '</td>';
+
+ if (start.getDay() === options.dayOfWeekStartPrev) {
+ table += '</tr>';
+ newRow = true;
+ }
+
+ start.setDate(d + 1);
+ }
+ table += '</tbody></table>';
+
+ calendar.html(table);
+
+ month_picker.find('.xdsoft_label span').eq(0).text(options.i18n[globalLocale].months[_xdsoft_datetime.currentTime.getMonth()]);
+ month_picker.find('.xdsoft_label span').eq(1).text(_xdsoft_datetime.currentTime.getFullYear() + options.yearOffset);
+
+ // generate timebox
+ time = '';
+ h = '';
+ m = '';
+
+ var minTimeMinutesOfDay = 0;
+ if (options.minTime !== false) {
+ var t = _xdsoft_datetime.strtotime(options.minTime);
+ minTimeMinutesOfDay = 60 * t.getHours() + t.getMinutes();
+ }
+ var maxTimeMinutesOfDay = 24 * 60;
+ if (options.maxTime !== false) {
+ var t = _xdsoft_datetime.strtotime(options.maxTime);
+ maxTimeMinutesOfDay = 60 * t.getHours() + t.getMinutes();
+ }
+
+ if (options.minDateTime !== false) {
+ var t = _xdsoft_datetime.strToDateTime(options.minDateTime);
+ var currentDayIsMinDateTimeDay = dateHelper.formatDate(_xdsoft_datetime.currentTime, options.formatDate) === dateHelper.formatDate(t, options.formatDate);
+ if (currentDayIsMinDateTimeDay) {
+ var m = 60 * t.getHours() + t.getMinutes();
+ if (m > minTimeMinutesOfDay) minTimeMinutesOfDay = m;
+ }
+ }
+
+ if (options.maxDateTime !== false) {
+ var t = _xdsoft_datetime.strToDateTime(options.maxDateTime);
+ var currentDayIsMaxDateTimeDay = dateHelper.formatDate(_xdsoft_datetime.currentTime, options.formatDate) === dateHelper.formatDate(t, options.formatDate);
+ if (currentDayIsMaxDateTimeDay) {
+ var m = 60 * t.getHours() + t.getMinutes();
+ if (m < maxTimeMinutesOfDay) maxTimeMinutesOfDay = m;
+ }
+ }
+
+ line_time = function line_time(h, m) {
+ var now = _xdsoft_datetime.now(), current_time,
+ isALlowTimesInit = options.allowTimes && $.isArray(options.allowTimes) && options.allowTimes.length;
+ now.setHours(h);
+ h = parseInt(now.getHours(), 10);
+ now.setMinutes(m);
+ m = parseInt(now.getMinutes(), 10);
+ classes = [];
+ var currentMinutesOfDay = 60 * h + m;
+ if (input.is('[disabled]') || (currentMinutesOfDay >= maxTimeMinutesOfDay) || (currentMinutesOfDay < minTimeMinutesOfDay)) {
+ classes.push('xdsoft_disabled');
+ }
+
+ current_time = new Date(_xdsoft_datetime.currentTime);
+ current_time.setHours(parseInt(_xdsoft_datetime.currentTime.getHours(), 10));
+
+ if (!isALlowTimesInit) {
+ current_time.setMinutes(Math[options.roundTime](_xdsoft_datetime.currentTime.getMinutes() / options.step) * options.step);
+ }
+
+ if ((options.initTime || options.defaultSelect || datetimepicker.data('changed')) && current_time.getHours() === parseInt(h, 10) && ((!isALlowTimesInit && options.step > 59) || current_time.getMinutes() === parseInt(m, 10))) {
+ if (options.defaultSelect || datetimepicker.data('changed')) {
+ classes.push('xdsoft_current');
+ } else if (options.initTime) {
+ classes.push('xdsoft_init_time');
+ }
+ }
+ if (parseInt(today.getHours(), 10) === parseInt(h, 10) && parseInt(today.getMinutes(), 10) === parseInt(m, 10)) {
+ classes.push('xdsoft_today');
+ }
+ time += '<div class="xdsoft_time ' + classes.join(' ') + '" data-hour="' + h + '" data-minute="' + m + '">' + dateHelper.formatDate(now, options.formatTime) + '</div>';
+ };
+
+ if (!options.allowTimes || !$.isArray(options.allowTimes) || !options.allowTimes.length) {
+ for (i = 0, j = 0; i < (options.hours12 ? 12 : 24); i += 1) {
+ for (j = 0; j < 60; j += options.step) {
+ var currentMinutesOfDay = i * 60 + j;
+ if (currentMinutesOfDay < minTimeMinutesOfDay) continue;
+ if (currentMinutesOfDay >= maxTimeMinutesOfDay) continue;
+ h = (i < 10 ? '0' : '') + i;
+ m = (j < 10 ? '0' : '') + j;
+ line_time(h, m);
+ }
+ }
+ } else {
+ for (i = 0; i < options.allowTimes.length; i += 1) {
+ h = _xdsoft_datetime.strtotime(options.allowTimes[i]).getHours();
+ m = _xdsoft_datetime.strtotime(options.allowTimes[i]).getMinutes();
+ line_time(h, m);
+ }
+ }
+
+ timebox.html(time);
+
+ opt = '';
+
+ for (i = parseInt(options.yearStart, 10); i <= parseInt(options.yearEnd, 10); i += 1) {
+ opt += '<div class="xdsoft_option ' + (_xdsoft_datetime.currentTime.getFullYear() === i ? 'xdsoft_current' : '') + '" data-value="' + i + '">' + (i + options.yearOffset) + '</div>';
+ }
+ yearselect.children().eq(0)
+ .html(opt);
+
+ for (i = parseInt(options.monthStart, 10), opt = ''; i <= parseInt(options.monthEnd, 10); i += 1) {
+ opt += '<div class="xdsoft_option ' + (_xdsoft_datetime.currentTime.getMonth() === i ? 'xdsoft_current' : '') + '" data-value="' + i + '">' + options.i18n[globalLocale].months[i] + '</div>';
+ }
+ monthselect.children().eq(0).html(opt);
+ $(datetimepicker)
+ .trigger('generate.xdsoft');
+ }, 10);
+ event.stopPropagation();
+ })
+ .on('afterOpen.xdsoft', function () {
+ if (options.timepicker) {
+ var classType, pheight, height, top;
+ if (timebox.find('.xdsoft_current').length) {
+ classType = '.xdsoft_current';
+ } else if (timebox.find('.xdsoft_init_time').length) {
+ classType = '.xdsoft_init_time';
+ }
+ if (classType) {
+ pheight = timeboxparent[0].clientHeight;
+ height = timebox[0].offsetHeight;
+ top = timebox.find(classType).index() * options.timeHeightInTimePicker + 1;
+ if ((height - pheight) < top) {
+ top = height - pheight;
+ }
+ timeboxparent.trigger('scroll_element.xdsoft_scroller', [parseInt(top, 10) / (height - pheight)]);
+ } else {
+ timeboxparent.trigger('scroll_element.xdsoft_scroller', [0]);
+ }
+ }
+ });
+
+ timerclick = 0;
+ calendar
+ .on('touchend click.xdsoft', 'td', function (xdevent) {
+ xdevent.stopPropagation(); // Prevents closing of Pop-ups, Modals and Flyouts in Bootstrap
+ timerclick += 1;
+ var $this = $(this),
+ currentTime = _xdsoft_datetime.currentTime;
+
+ if (currentTime === undefined || currentTime === null) {
+ _xdsoft_datetime.currentTime = _xdsoft_datetime.now();
+ currentTime = _xdsoft_datetime.currentTime;
+ }
+
+ if ($this.hasClass('xdsoft_disabled')) {
+ return false;
+ }
+
+ currentTime.setDate(1);
+ currentTime.setFullYear($this.data('year'));
+ currentTime.setMonth($this.data('month'));
+ currentTime.setDate($this.data('date'));
+
+ datetimepicker.trigger('select.xdsoft', [currentTime]);
+
+ input.val(_xdsoft_datetime.str());
+
+ if (options.onSelectDate && $.isFunction(options.onSelectDate)) {
+ options.onSelectDate.call(datetimepicker, _xdsoft_datetime.currentTime, datetimepicker.data('input'), xdevent);
+ }
+
+ datetimepicker.data('changed', true);
+ datetimepicker.trigger('xchange.xdsoft');
+ datetimepicker.trigger('changedatetime.xdsoft');
+ if ((timerclick > 1 || (options.closeOnDateSelect === true || (options.closeOnDateSelect === false && !options.timepicker))) && !options.inline) {
+ datetimepicker.trigger('close.xdsoft');
+ }
+ setTimeout(function () {
+ timerclick = 0;
+ }, 200);
+ });
+
+ timebox
+ .on('touchstart', 'div', function (xdevent) {
+ this.touchMoved = false;
+ })
+ .on('touchmove', 'div', handleTouchMoved)
+ .on('touchend click.xdsoft', 'div', function (xdevent) {
+ if (!this.touchMoved) {
+ xdevent.stopPropagation();
+ var $this = $(this),
+ currentTime = _xdsoft_datetime.currentTime;
+
+ if (currentTime === undefined || currentTime === null) {
+ _xdsoft_datetime.currentTime = _xdsoft_datetime.now();
+ currentTime = _xdsoft_datetime.currentTime;
+ }
+
+ if ($this.hasClass('xdsoft_disabled')) {
+ return false;
+ }
+ currentTime.setHours($this.data('hour'));
+ currentTime.setMinutes($this.data('minute'));
+ datetimepicker.trigger('select.xdsoft', [currentTime]);
+
+ datetimepicker.data('input').val(_xdsoft_datetime.str());
+
+ if (options.onSelectTime && $.isFunction(options.onSelectTime)) {
+ options.onSelectTime.call(datetimepicker, _xdsoft_datetime.currentTime, datetimepicker.data('input'), xdevent);
+ }
+ datetimepicker.data('changed', true);
+ datetimepicker.trigger('xchange.xdsoft');
+ datetimepicker.trigger('changedatetime.xdsoft');
+ if (options.inline !== true && options.closeOnTimeSelect === true) {
+ datetimepicker.trigger('close.xdsoft');
+ }
+ }
+ });
+
+ datepicker
+ .on('mousewheel.xdsoft', function (event) {
+ if (!options.scrollMonth) {
+ return true;
+ }
+ if (event.deltaY < 0) {
+ _xdsoft_datetime.nextMonth();
+ } else {
+ _xdsoft_datetime.prevMonth();
+ }
+ return false;
+ });
+
+ input
+ .on('mousewheel.xdsoft', function (event) {
+ if (!options.scrollInput) {
+ return true;
+ }
+ if (!options.datepicker && options.timepicker) {
+ current_time_index = timebox.find('.xdsoft_current').length ? timebox.find('.xdsoft_current').eq(0).index() : 0;
+ if (current_time_index + event.deltaY >= 0 && current_time_index + event.deltaY < timebox.children().length) {
+ current_time_index += event.deltaY;
+ }
+ if (timebox.children().eq(current_time_index).length) {
+ timebox.children().eq(current_time_index).trigger('mousedown');
+ }
+ return false;
+ }
+ if (options.datepicker && !options.timepicker) {
+ datepicker.trigger(event, [event.deltaY, event.deltaX, event.deltaY]);
+ if (input.val) {
+ input.val(_xdsoft_datetime.str());
+ }
+ datetimepicker.trigger('changedatetime.xdsoft');
+ return false;
+ }
+ });
+
+ datetimepicker
+ .on('changedatetime.xdsoft', function (event) {
+ if (options.onChangeDateTime && $.isFunction(options.onChangeDateTime)) {
+ var $input = datetimepicker.data('input');
+ options.onChangeDateTime.call(datetimepicker, _xdsoft_datetime.currentTime, $input, event);
+ delete options.value;
+ $input.trigger('change');
+ }
+ })
+ .on('generate.xdsoft', function () {
+ if (options.onGenerate && $.isFunction(options.onGenerate)) {
+ options.onGenerate.call(datetimepicker, _xdsoft_datetime.currentTime, datetimepicker.data('input'));
+ }
+ if (triggerAfterOpen) {
+ datetimepicker.trigger('afterOpen.xdsoft');
+ triggerAfterOpen = false;
+ }
+ })
+ .on('click.xdsoft', function (xdevent) {
+ xdevent.stopPropagation();
+ });
+
+ current_time_index = 0;
+
+ /**
+ * Runs the callback for each of the specified node's ancestors.
+ *
+ * Return FALSE from the callback to stop ascending.
+ *
+ * @param {DOMNode} node
+ * @param {Function} callback
+ * @returns {undefined}
+ */
+ forEachAncestorOf = function (node, callback) {
+ do {
+ node = node.parentNode;
+
+ if (!node || callback(node) === false) {
+ break;
+ }
+ } while (node.nodeName !== 'HTML');
+ };
+
+ /**
+ * Sets the position of the picker.
+ *
+ * @returns {undefined}
+ */
+ setPos = function () {
+ var dateInputOffset,
+ dateInputElem,
+ verticalPosition,
+ left,
+ position,
+ datetimepickerElem,
+ dateInputHasFixedAncestor,
+ $dateInput,
+ windowWidth,
+ verticalAnchorEdge,
+ datetimepickerCss,
+ windowHeight,
+ windowScrollTop;
+
+ $dateInput = datetimepicker.data('input');
+ dateInputOffset = $dateInput.offset();
+ dateInputElem = $dateInput[0];
+
+ verticalAnchorEdge = 'top';
+ verticalPosition = (dateInputOffset.top + dateInputElem.offsetHeight) - 1;
+ left = dateInputOffset.left;
+ position = "absolute";
+
+ windowWidth = $(options.contentWindow).width();
+ windowHeight = $(options.contentWindow).height();
+ windowScrollTop = $(options.contentWindow).scrollTop();
+
+ if ((options.ownerDocument.documentElement.clientWidth - dateInputOffset.left) < datepicker.parent().outerWidth(true)) {
+ var diff = datepicker.parent().outerWidth(true) - dateInputElem.offsetWidth;
+ left = left - diff;
+ }
+
+ if ($dateInput.parent().css('direction') === 'rtl') {
+ left -= (datetimepicker.outerWidth() - $dateInput.outerWidth());
+ }
+
+ if (options.fixed) {
+ verticalPosition -= windowScrollTop;
+ left -= $(options.contentWindow).scrollLeft();
+ position = "fixed";
+ } else {
+ dateInputHasFixedAncestor = false;
+
+ forEachAncestorOf(dateInputElem, function (ancestorNode) {
+ if (ancestorNode === null) {
+ return false;
+ }
+
+ if (options.contentWindow.getComputedStyle(ancestorNode).getPropertyValue('position') === 'fixed') {
+ dateInputHasFixedAncestor = true;
+ return false;
+ }
+ });
+
+ if (dateInputHasFixedAncestor && !options.insideParent) {
+ position = 'fixed';
+
+ //If the picker won't fit entirely within the viewport then display it above the date input.
+ if (verticalPosition + datetimepicker.outerHeight() > windowHeight + windowScrollTop) {
+ verticalAnchorEdge = 'bottom';
+ verticalPosition = (windowHeight + windowScrollTop) - dateInputOffset.top;
+ } else {
+ verticalPosition -= windowScrollTop;
+ }
+ } else {
+ if (verticalPosition + datetimepicker[0].offsetHeight > windowHeight + windowScrollTop) {
+ verticalPosition = dateInputOffset.top - datetimepicker[0].offsetHeight + 1;
+ }
+ }
+
+ if (verticalPosition < 0) {
+ verticalPosition = 0;
+ }
+
+ if (left + dateInputElem.offsetWidth > windowWidth) {
+ left = windowWidth - dateInputElem.offsetWidth;
+ }
+ }
+
+ datetimepickerElem = datetimepicker[0];
+
+ forEachAncestorOf(datetimepickerElem, function (ancestorNode) {
+ var ancestorNodePosition;
+
+ ancestorNodePosition = options.contentWindow.getComputedStyle(ancestorNode).getPropertyValue('position');
+
+ if (ancestorNodePosition === 'relative' && windowWidth >= ancestorNode.offsetWidth) {
+ left = left - ((windowWidth - ancestorNode.offsetWidth) / 2);
+ return false;
+ }
+ });
+
+ datetimepickerCss = {
+ position: position,
+ left: options.insideParent ? dateInputElem.offsetLeft : left,
+ top: '', //Initialize to prevent previous values interfering with new ones.
+ bottom: '' //Initialize to prevent previous values interfering with new ones.
+ };
+
+ if (options.insideParent) {
+ datetimepickerCss[verticalAnchorEdge] = dateInputElem.offsetTop + dateInputElem.offsetHeight;
+ } else {
+ datetimepickerCss[verticalAnchorEdge] = verticalPosition;
+ }
+
+ datetimepicker.css(datetimepickerCss);
+ };
+
+ datetimepicker
+ .on('open.xdsoft', function (event) {
+ var onShow = true;
+ if (options.onShow && $.isFunction(options.onShow)) {
+ onShow = options.onShow.call(datetimepicker, _xdsoft_datetime.currentTime, datetimepicker.data('input'), event);
+ }
+ if (onShow !== false) {
+ datetimepicker.show();
+ setPos();
+ $(options.contentWindow)
+ .off('resize.xdsoft', setPos)
+ .on('resize.xdsoft', setPos);
+
+ if (options.closeOnWithoutClick) {
+ $([options.ownerDocument.body, options.contentWindow]).on('touchstart mousedown.xdsoft', function arguments_callee6() {
+ datetimepicker.trigger('close.xdsoft');
+ $([options.ownerDocument.body, options.contentWindow]).off('touchstart mousedown.xdsoft', arguments_callee6);
+ });
+ }
+ }
+ })
+ .on('close.xdsoft', function (event) {
+ var onClose = true;
+ month_picker
+ .find('.xdsoft_month,.xdsoft_year')
+ .find('.xdsoft_select')
+ .hide();
+ if (options.onClose && $.isFunction(options.onClose)) {
+ onClose = options.onClose.call(datetimepicker, _xdsoft_datetime.currentTime, datetimepicker.data('input'), event);
+ }
+ if (onClose !== false && !options.opened && !options.inline) {
+ datetimepicker.hide();
+ }
+ event.stopPropagation();
+ })
+ .on('toggle.xdsoft', function () {
+ if (datetimepicker.is(':visible')) {
+ datetimepicker.trigger('close.xdsoft');
+ } else {
+ datetimepicker.trigger('open.xdsoft');
+ }
+ })
+ .data('input', input);
+
+ timer = 0;
+
+ datetimepicker.data('xdsoft_datetime', _xdsoft_datetime);
+ datetimepicker.setOptions(options);
+
+ function getCurrentValue() {
+ var ct = false, time;
+
+ if (options.startDate) {
+ ct = _xdsoft_datetime.strToDate(options.startDate);
+ } else {
+ ct = options.value || ((input && input.val && input.val()) ? input.val() : '');
+ if (ct) {
+ ct = _xdsoft_datetime.strToDateTime(ct);
+ if (options.yearOffset) {
+ ct = new Date(ct.getFullYear() - options.yearOffset, ct.getMonth(), ct.getDate(), ct.getHours(), ct.getMinutes(), ct.getSeconds(), ct.getMilliseconds());
+ }
+ } else if (options.defaultDate) {
+ ct = _xdsoft_datetime.strToDateTime(options.defaultDate);
+ if (options.defaultTime) {
+ time = _xdsoft_datetime.strtotime(options.defaultTime);
+ ct.setHours(time.getHours());
+ ct.setMinutes(time.getMinutes());
+ }
+ }
+ }
+
+ if (ct && _xdsoft_datetime.isValidDate(ct)) {
+ datetimepicker.data('changed', true);
+ } else {
+ ct = '';
+ }
+
+ return ct || 0;
+ }
+
+ function setMask(options) {
+
+ var isValidValue = function (mask, value) {
+ var reg = mask
+ .replace(/([\[\]\/\{\}\(\)\-\.\+]{1})/g, '\\$1')
+ .replace(/_/g, '{digit+}')
+ .replace(/([0-9]{1})/g, '{digit$1}')
+ .replace(/\{digit([0-9]{1})\}/g, '[0-$1_]{1}')
+ .replace(/\{digit[\+]\}/g, '[0-9_]{1}');
+ return (new RegExp(reg)).test(value);
+ },
+ getCaretPos = function (input) {
+ try {
+ if (options.ownerDocument.selection && options.ownerDocument.selection.createRange) {
+ var range = options.ownerDocument.selection.createRange();
+ return range.getBookmark().charCodeAt(2) - 2;
+ }
+ if (input.setSelectionRange) {
+ return input.selectionStart;
+ }
+ } catch (e) {
+ return 0;
+ }
+ },
+ setCaretPos = function (node, pos) {
+ node = (typeof node === "string" || node instanceof String) ? options.ownerDocument.getElementById(node) : node;
+ if (!node) {
+ return false;
+ }
+ if (node.createTextRange) {
+ var textRange = node.createTextRange();
+ textRange.collapse(true);
+ textRange.moveEnd('character', pos);
+ textRange.moveStart('character', pos);
+ textRange.select();
+ return true;
+ }
+ if (node.setSelectionRange) {
+ node.setSelectionRange(pos, pos);
+ return true;
+ }
+ return false;
+ };
+
+ if(options.mask) {
+ input.off('keydown.xdsoft');
+ }
+
+ if (options.mask === true) {
+ if (dateHelper.formatMask) {
+ options.mask = dateHelper.formatMask(options.format)
+ } else {
+ options.mask = options.format
+ .replace(/Y/g, '9999')
+ .replace(/F/g, '9999')
+ .replace(/m/g, '19')
+ .replace(/d/g, '39')
+ .replace(/H/g, '29')
+ .replace(/i/g, '59')
+ .replace(/s/g, '59');
+ }
+ }
+
+ if ($.type(options.mask) === 'string') {
+ if (!isValidValue(options.mask, input.val())) {
+ input.val(options.mask.replace(/[0-9]/g, '_'));
+ setCaretPos(input[0], 0);
+ }
+
+ input.on('paste.xdsoft', function (event) {
+ // couple options here
+ // 1. return false - tell them they can't paste
+ // 2. insert over current characters - minimal validation
+ // 3. full fledged parsing and validation
+ // let's go option 2 for now
+
+ // fires multiple times for some reason
+
+ // https://stackoverflow.com/a/30496488/1366033
+ var clipboardData = event.clipboardData || event.originalEvent.clipboardData || window.clipboardData,
+ pastedData = clipboardData.getData('text'),
+ val = this.value,
+ pos = this.selectionStart
+
+ var valueBeforeCursor = val.substr(0, pos);
+ var valueAfterPaste = val.substr(pos + pastedData.length);
+
+ val = valueBeforeCursor + pastedData + valueAfterPaste;
+ pos += pastedData.length;
+
+ if (isValidValue(options.mask, val)) {
+ this.value = val;
+ setCaretPos(this, pos);
+ } else if ($.trim(val) === '') {
+ this.value = options.mask.replace(/[0-9]/g, '_');
+ } else {
+ input.trigger('error_input.xdsoft');
+ }
+
+ event.preventDefault();
+ return false;
+ });
+
+ input.on('keydown.xdsoft', function (event) {
+ var val = this.value,
+ key = event.which,
+ pos = this.selectionStart,
+ selEnd = this.selectionEnd,
+ hasSel = pos !== selEnd,
+ digit;
+
+ // only alow these characters
+ if (((key >= KEY0 && key <= KEY9) ||
+ (key >= _KEY0 && key <= _KEY9)) ||
+ (key === BACKSPACE || key === DEL)) {
+
+ // get char to insert which is new character or placeholder ('_')
+ digit = (key === BACKSPACE || key === DEL) ? '_' :
+ String.fromCharCode((_KEY0 <= key && key <= _KEY9) ? key - KEY0 : key);
+
+ // we're deleting something, we're not at the start, and have normal cursor, move back one
+ // if we have a selection length, cursor actually sits behind deletable char, not in front
+ if (key === BACKSPACE && pos && !hasSel) {
+ pos -= 1;
+ }
+
+ // don't stop on a separator, continue whatever direction you were going
+ // value char - keep incrementing position while on separator char and we still have room
+ // del char - keep decrementing position while on separator char and we still have room
+ while (true) {
+ var maskValueAtCurPos = options.mask.substr(pos, 1);
+ var posShorterThanMaskLength = pos < options.mask.length;
+ var posGreaterThanZero = pos > 0;
+ var notNumberOrPlaceholder = /[^0-9_]/;
+ var curPosOnSep = notNumberOrPlaceholder.test(maskValueAtCurPos);
+ var continueMovingPosition = curPosOnSep && posShorterThanMaskLength && posGreaterThanZero
+
+ // if we hit a real char, stay where we are
+ if (!continueMovingPosition) break;
+
+ // hitting backspace in a selection, you can possibly go back any further - go forward
+ pos += (key === BACKSPACE && !hasSel) ? -1 : 1;
+
+ }
+
+ if (event.metaKey) { // cmd has been pressed
+ pos = 0;
+ hasSel = true;
+ }
+
+ if (hasSel) {
+ // pos might have moved so re-calc length
+ var selLength = selEnd - pos
+
+ // if we have a selection length we will wipe out entire selection and replace with default template for that range
+ var defaultBlank = options.mask.replace(/[0-9]/g, '_');
+ var defaultBlankSelectionReplacement = defaultBlank.substr(pos, selLength);
+ var selReplacementRemainder = defaultBlankSelectionReplacement.substr(1) // might be empty
+
+ var valueBeforeSel = val.substr(0, pos);
+ var insertChars = digit + selReplacementRemainder;
+ var charsAfterSelection = val.substr(pos + selLength);
+
+ val = valueBeforeSel + insertChars + charsAfterSelection
+
+ } else {
+ var valueBeforeCursor = val.substr(0, pos);
+ var insertChar = digit;
+ var valueAfterNextChar = val.substr(pos + 1);
+
+ val = valueBeforeCursor + insertChar + valueAfterNextChar
+ }
+
+ if ($.trim(val) === '') {
+ // if empty, set to default
+ val = defaultBlank
+ } else {
+ // if at the last character don't need to do anything
+ if (pos === options.mask.length) {
+ event.preventDefault();
+ return false;
+ }
+ }
+
+ // resume cursor location
+ pos += (key === BACKSPACE) ? 0 : 1;
+ // don't stop on a separator, continue whatever direction you were going
+ while (/[^0-9_]/.test(options.mask.substr(pos, 1)) && pos < options.mask.length && pos > 0) {
+ pos += (key === BACKSPACE) ? 0 : 1;
+ }
+
+ if (isValidValue(options.mask, val)) {
+ this.value = val;
+ setCaretPos(this, pos);
+ } else if ($.trim(val) === '') {
+ this.value = options.mask.replace(/[0-9]/g, '_');
+ } else {
+ input.trigger('error_input.xdsoft');
+ }
+ } else {
+ if (([AKEY, CKEY, VKEY, ZKEY, YKEY].indexOf(key) !== -1 && ctrlDown) || [ESC, ARROWUP, ARROWDOWN, ARROWLEFT, ARROWRIGHT, F5, CTRLKEY, TAB, ENTER].indexOf(key) !== -1) {
+ return true;
+ }
+ }
+
+ event.preventDefault();
+ return false;
+ });
+ }
+ }
+
+ _xdsoft_datetime.setCurrentTime(getCurrentValue());
+
+ input
+ .data('xdsoft_datetimepicker', datetimepicker)
+ .on('open.xdsoft focusin.xdsoft mousedown.xdsoft touchstart', function () {
+ if (input.is(':disabled') || (input.data('xdsoft_datetimepicker').is(':visible') && options.closeOnInputClick)) {
+ return;
+ }
+ if (!options.openOnFocus) {
+ return;
+ }
+ clearTimeout(timer);
+ timer = setTimeout(function () {
+ if (input.is(':disabled')) {
+ return;
+ }
+
+ triggerAfterOpen = true;
+ _xdsoft_datetime.setCurrentTime(getCurrentValue(), true);
+ if(options.mask) {
+ setMask(options);
+ }
+ datetimepicker.trigger('open.xdsoft');
+ }, 100);
+ })
+ .on('keydown.xdsoft', function (event) {
+ var elementSelector,
+ key = event.which;
+ if ([ENTER].indexOf(key) !== -1 && options.enterLikeTab) {
+ elementSelector = $("input:visible,textarea:visible,button:visible,a:visible");
+ datetimepicker.trigger('close.xdsoft');
+ elementSelector.eq(elementSelector.index(this) + 1).focus();
+ return false;
+ }
+ if ([TAB].indexOf(key) !== -1) {
+ datetimepicker.trigger('close.xdsoft');
+ return true;
+ }
+ })
+ .on('blur.xdsoft', function () {
+ datetimepicker.trigger('close.xdsoft');
+ });
+ };
+ destroyDateTimePicker = function (input) {
+ var datetimepicker = input.data('xdsoft_datetimepicker');
+ if (datetimepicker) {
+ datetimepicker.data('xdsoft_datetime', null);
+ datetimepicker.remove();
+ input
+ .data('xdsoft_datetimepicker', null)
+ .off('.xdsoft');
+ $(options.contentWindow).off('resize.xdsoft');
+ $([options.contentWindow, options.ownerDocument.body]).off('mousedown.xdsoft touchstart');
+ if (input.unmousewheel) {
+ input.unmousewheel();
+ }
+ }
+ };
+ $(options.ownerDocument)
+ .off('keydown.xdsoftctrl keyup.xdsoftctrl')
+ .off('keydown.xdsoftcmd keyup.xdsoftcmd')
+ .on('keydown.xdsoftctrl', function (e) {
+ if (e.keyCode === CTRLKEY) {
+ ctrlDown = true;
+ }
+ })
+ .on('keyup.xdsoftctrl', function (e) {
+ if (e.keyCode === CTRLKEY) {
+ ctrlDown = false;
+ }
+ })
+ .on('keydown.xdsoftcmd', function (e) {
+ if (e.keyCode === CMDKEY) {
+ cmdDown = true;
+ }
+ })
+ .on('keyup.xdsoftcmd', function (e) {
+ if (e.keyCode === CMDKEY) {
+ cmdDown = false;
+ }
+ });
+
+ this.each(function () {
+ var datetimepicker = $(this).data('xdsoft_datetimepicker'), $input;
+ if (datetimepicker) {
+ if ($.type(opt) === 'string') {
+ switch (opt) {
+ case 'show':
+ $(this).select().focus();
+ datetimepicker.trigger('open.xdsoft');
+ break;
+ case 'hide':
+ datetimepicker.trigger('close.xdsoft');
+ break;
+ case 'toggle':
+ datetimepicker.trigger('toggle.xdsoft');
+ break;
+ case 'destroy':
+ destroyDateTimePicker($(this));
+ break;
+ case 'reset':
+ this.value = this.defaultValue;
+ if (!this.value || !datetimepicker.data('xdsoft_datetime').isValidDate(dateHelper.parseDate(this.value, options.format))) {
+ datetimepicker.data('changed', false);
+ }
+ datetimepicker.data('xdsoft_datetime').setCurrentTime(this.value);
+ break;
+ case 'validate':
+ $input = datetimepicker.data('input');
+ $input.trigger('blur.xdsoft');
+ break;
+ default:
+ if (datetimepicker[opt] && $.isFunction(datetimepicker[opt])) {
+ result = datetimepicker[opt](opt2);
+ }
+ }
+ } else {
+ datetimepicker
+ .setOptions(opt);
+ }
+ return 0;
+ }
+ if ($.type(opt) !== 'string') {
+ if (!options.lazyInit || options.open || options.inline) {
+ createDateTimePicker($(this));
+ } else {
+ lazyInit($(this));
+ }
+ }
+ });
+
+ return result;
+ };
+
+ $.fn.datetimepicker.defaults = default_options;
+
+ function HighlightedDate(date, desc, style) {
+ "use strict";
+ this.date = date;
+ this.desc = desc;
+ this.style = style;
+ }
+};
+;(function (factory) {
+ if ( typeof define === 'function' && define.amd ) {
+ // AMD. Register as an anonymous module.
+ define(['jquery', 'jquery-mousewheel'], factory);
+ } else if (typeof exports === 'object') {
+ // Node/CommonJS style for Browserify
+ module.exports = factory(require('jquery'));;
+ } else {
+ // Browser globals
+ factory(jQuery);
+ }
+}(datetimepickerFactory));
+
+
+
+/*!
+ * jQuery Mousewheel 3.1.13
+ *
+ * Copyright jQuery Foundation and other contributors
+ * Released under the MIT license
+ * http://jquery.org/license
+ */
+
+(function (factory) {
+ if ( typeof define === 'function' && define.amd ) {
+ // AMD. Register as an anonymous module.
+ define(['jquery'], factory);
+ } else if (typeof exports === 'object') {
+ // Node/CommonJS style for Browserify
+ module.exports = factory;
+ } else {
+ // Browser globals
+ factory(jQuery);
+ }
+}(function ($) {
+
+ var toFix = ['wheel', 'mousewheel', 'DOMMouseScroll', 'MozMousePixelScroll'],
+ toBind = ( 'onwheel' in document || document.documentMode >= 9 ) ?
+ ['wheel'] : ['mousewheel', 'DomMouseScroll', 'MozMousePixelScroll'],
+ slice = Array.prototype.slice,
+ nullLowestDeltaTimeout, lowestDelta;
+
+ if ( $.event.fixHooks ) {
+ for ( var i = toFix.length; i; ) {
+ $.event.fixHooks[ toFix[--i] ] = $.event.mouseHooks;
+ }
+ }
+
+ var special = $.event.special.mousewheel = {
+ version: '3.1.12',
+
+ setup: function() {
+ if ( this.addEventListener ) {
+ for ( var i = toBind.length; i; ) {
+ this.addEventListener( toBind[--i], handler, false );
+ }
+ } else {
+ this.onmousewheel = handler;
+ }
+ // Store the line height and page height for this particular element
+ $.data(this, 'mousewheel-line-height', special.getLineHeight(this));
+ $.data(this, 'mousewheel-page-height', special.getPageHeight(this));
+ },
+
+ teardown: function() {
+ if ( this.removeEventListener ) {
+ for ( var i = toBind.length; i; ) {
+ this.removeEventListener( toBind[--i], handler, false );
+ }
+ } else {
+ this.onmousewheel = null;
+ }
+ // Clean up the data we added to the element
+ $.removeData(this, 'mousewheel-line-height');
+ $.removeData(this, 'mousewheel-page-height');
+ },
+
+ getLineHeight: function(elem) {
+ var $elem = $(elem),
+ $parent = $elem['offsetParent' in $.fn ? 'offsetParent' : 'parent']();
+ if (!$parent.length) {
+ $parent = $('body');
+ }
+ return parseInt($parent.css('fontSize'), 10) || parseInt($elem.css('fontSize'), 10) || 16;
+ },
+
+ getPageHeight: function(elem) {
+ return $(elem).height();
+ },
+
+ settings: {
+ adjustOldDeltas: true, // see shouldAdjustOldDeltas() below
+ normalizeOffset: true // calls getBoundingClientRect for each event
+ }
+ };
+
+ $.fn.extend({
+ mousewheel: function(fn) {
+ return fn ? this.bind('mousewheel', fn) : this.trigger('mousewheel');
+ },
+
+ unmousewheel: function(fn) {
+ return this.unbind('mousewheel', fn);
+ }
+ });
+
+
+ function handler(event) {
+ var orgEvent = event || window.event,
+ args = slice.call(arguments, 1),
+ delta = 0,
+ deltaX = 0,
+ deltaY = 0,
+ absDelta = 0,
+ offsetX = 0,
+ offsetY = 0;
+ event = $.event.fix(orgEvent);
+ event.type = 'mousewheel';
+
+ // Old school scrollwheel delta
+ if ( 'detail' in orgEvent ) { deltaY = orgEvent.detail * -1; }
+ if ( 'wheelDelta' in orgEvent ) { deltaY = orgEvent.wheelDelta; }
+ if ( 'wheelDeltaY' in orgEvent ) { deltaY = orgEvent.wheelDeltaY; }
+ if ( 'wheelDeltaX' in orgEvent ) { deltaX = orgEvent.wheelDeltaX * -1; }
+
+ // Firefox < 17 horizontal scrolling related to DOMMouseScroll event
+ if ( 'axis' in orgEvent && orgEvent.axis === orgEvent.HORIZONTAL_AXIS ) {
+ deltaX = deltaY * -1;
+ deltaY = 0;
+ }
+
+ // Set delta to be deltaY or deltaX if deltaY is 0 for backwards compatabilitiy
+ delta = deltaY === 0 ? deltaX : deltaY;
+
+ // New school wheel delta (wheel event)
+ if ( 'deltaY' in orgEvent ) {
+ deltaY = orgEvent.deltaY * -1;
+ delta = deltaY;
+ }
+ if ( 'deltaX' in orgEvent ) {
+ deltaX = orgEvent.deltaX;
+ if ( deltaY === 0 ) { delta = deltaX * -1; }
+ }
+
+ // No change actually happened, no reason to go any further
+ if ( deltaY === 0 && deltaX === 0 ) { return; }
+
+ // Need to convert lines and pages to pixels if we aren't already in pixels
+ // There are three delta modes:
+ // * deltaMode 0 is by pixels, nothing to do
+ // * deltaMode 1 is by lines
+ // * deltaMode 2 is by pages
+ if ( orgEvent.deltaMode === 1 ) {
+ var lineHeight = $.data(this, 'mousewheel-line-height');
+ delta *= lineHeight;
+ deltaY *= lineHeight;
+ deltaX *= lineHeight;
+ } else if ( orgEvent.deltaMode === 2 ) {
+ var pageHeight = $.data(this, 'mousewheel-page-height');
+ delta *= pageHeight;
+ deltaY *= pageHeight;
+ deltaX *= pageHeight;
+ }
+
+ // Store lowest absolute delta to normalize the delta values
+ absDelta = Math.max( Math.abs(deltaY), Math.abs(deltaX) );
+
+ if ( !lowestDelta || absDelta < lowestDelta ) {
+ lowestDelta = absDelta;
+
+ // Adjust older deltas if necessary
+ if ( shouldAdjustOldDeltas(orgEvent, absDelta) ) {
+ lowestDelta /= 40;
+ }
+ }
+
+ // Adjust older deltas if necessary
+ if ( shouldAdjustOldDeltas(orgEvent, absDelta) ) {
+ // Divide all the things by 40!
+ delta /= 40;
+ deltaX /= 40;
+ deltaY /= 40;
+ }
+
+ // Get a whole, normalized value for the deltas
+ delta = Math[ delta >= 1 ? 'floor' : 'ceil' ](delta / lowestDelta);
+ deltaX = Math[ deltaX >= 1 ? 'floor' : 'ceil' ](deltaX / lowestDelta);
+ deltaY = Math[ deltaY >= 1 ? 'floor' : 'ceil' ](deltaY / lowestDelta);
+
+ // Normalise offsetX and offsetY properties
+ if ( special.settings.normalizeOffset && this.getBoundingClientRect ) {
+ var boundingRect = this.getBoundingClientRect();
+ offsetX = event.clientX - boundingRect.left;
+ offsetY = event.clientY - boundingRect.top;
+ }
+
+ // Add information to the event object
+ event.deltaX = deltaX;
+ event.deltaY = deltaY;
+ event.deltaFactor = lowestDelta;
+ event.offsetX = offsetX;
+ event.offsetY = offsetY;
+ // Go ahead and set deltaMode to 0 since we converted to pixels
+ // Although this is a little odd since we overwrite the deltaX/Y
+ // properties with normalized deltas.
+ event.deltaMode = 0;
+
+ // Add event and delta to the front of the arguments
+ args.unshift(event, delta, deltaX, deltaY);
+
+ // Clearout lowestDelta after sometime to better
+ // handle multiple device types that give different
+ // a different lowestDelta
+ // Ex: trackpad = 3 and mouse wheel = 120
+ if (nullLowestDeltaTimeout) { clearTimeout(nullLowestDeltaTimeout); }
+ nullLowestDeltaTimeout = setTimeout(nullLowestDelta, 200);
+
+ return ($.event.dispatch || $.event.handle).apply(this, args);
+ }
+
+ function nullLowestDelta() {
+ lowestDelta = null;
+ }
+
+ function shouldAdjustOldDeltas(orgEvent, absDelta) {
+ // If this is an older event and the delta is divisable by 120,
+ // then we are assuming that the browser is treating this as an
+ // older mouse wheel event and that we should divide the deltas
+ // by 40 to try and get a more usable deltaFactor.
+ // Side note, this actually impacts the reported scroll distance
+ // in older browsers and can cause scrolling to be slower than native.
+ // Turn this off by setting $.event.special.mousewheel.settings.adjustOldDeltas to false.
+ return special.settings.adjustOldDeltas && orgEvent.type === 'mousewheel' && absDelta % 120 === 0;
+ }
+
+})); \ No newline at end of file
diff --git a/op25/gr-op25_repeater/apps/oplog/op25/static/dtpick/jquery.datetimepicker.css b/op25/gr-op25_repeater/apps/oplog/op25/static/dtpick/jquery.datetimepicker.css
new file mode 100644
index 0000000..4ed981a
--- /dev/null
+++ b/op25/gr-op25_repeater/apps/oplog/op25/static/dtpick/jquery.datetimepicker.css
@@ -0,0 +1,568 @@
+.xdsoft_datetimepicker {
+ box-shadow: 0 5px 15px -5px rgba(0, 0, 0, 0.506);
+ background: #fff;
+ border-bottom: 1px solid #bbb;
+ border-left: 1px solid #ccc;
+ border-right: 1px solid #ccc;
+ border-top: 1px solid #ccc;
+ color: #333;
+ font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
+ padding: 8px;
+ padding-left: 0;
+ padding-top: 2px;
+ position: absolute;
+ z-index: 9999;
+ -moz-box-sizing: border-box;
+ box-sizing: border-box;
+ display: none;
+}
+.xdsoft_datetimepicker.xdsoft_rtl {
+ padding: 8px 0 8px 8px;
+}
+
+.xdsoft_datetimepicker iframe {
+ position: absolute;
+ left: 0;
+ top: 0;
+ width: 75px;
+ height: 210px;
+ background: transparent;
+ border: none;
+}
+
+/*For IE8 or lower*/
+.xdsoft_datetimepicker button {
+ border: none !important;
+}
+
+.xdsoft_noselect {
+ -webkit-touch-callout: none;
+ -webkit-user-select: none;
+ -khtml-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ -o-user-select: none;
+ user-select: none;
+}
+
+.xdsoft_noselect::selection { background: transparent }
+.xdsoft_noselect::-moz-selection { background: transparent }
+
+.xdsoft_datetimepicker.xdsoft_inline {
+ display: inline-block;
+ position: static;
+ box-shadow: none;
+}
+
+.xdsoft_datetimepicker * {
+ -moz-box-sizing: border-box;
+ box-sizing: border-box;
+ padding: 0;
+ margin: 0;
+}
+
+.xdsoft_datetimepicker .xdsoft_datepicker, .xdsoft_datetimepicker .xdsoft_timepicker {
+ display: none;
+}
+
+.xdsoft_datetimepicker .xdsoft_datepicker.active, .xdsoft_datetimepicker .xdsoft_timepicker.active {
+ display: block;
+}
+
+.xdsoft_datetimepicker .xdsoft_datepicker {
+ width: 224px;
+ float: left;
+ margin-left: 8px;
+}
+.xdsoft_datetimepicker.xdsoft_rtl .xdsoft_datepicker {
+ float: right;
+ margin-right: 8px;
+ margin-left: 0;
+}
+
+.xdsoft_datetimepicker.xdsoft_showweeks .xdsoft_datepicker {
+ width: 256px;
+}
+
+.xdsoft_datetimepicker .xdsoft_timepicker {
+ width: 58px;
+ float: left;
+ text-align: center;
+ margin-left: 8px;
+ margin-top: 0;
+}
+.xdsoft_datetimepicker.xdsoft_rtl .xdsoft_timepicker {
+ float: right;
+ margin-right: 8px;
+ margin-left: 0;
+}
+
+.xdsoft_datetimepicker .xdsoft_datepicker.active+.xdsoft_timepicker {
+ margin-top: 8px;
+ margin-bottom: 3px
+}
+
+.xdsoft_datetimepicker .xdsoft_monthpicker {
+ position: relative;
+ text-align: center;
+}
+
+.xdsoft_datetimepicker .xdsoft_label i,
+.xdsoft_datetimepicker .xdsoft_prev,
+.xdsoft_datetimepicker .xdsoft_next,
+.xdsoft_datetimepicker .xdsoft_today_button {
+ background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAAAeCAYAAADaW7vzAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoV2luZG93cykiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6Q0NBRjI1NjM0M0UwMTFFNDk4NkFGMzJFQkQzQjEwRUIiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6Q0NBRjI1NjQ0M0UwMTFFNDk4NkFGMzJFQkQzQjEwRUIiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpDQ0FGMjU2MTQzRTAxMUU0OTg2QUYzMkVCRDNCMTBFQiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpDQ0FGMjU2MjQzRTAxMUU0OTg2QUYzMkVCRDNCMTBFQiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PoNEP54AAAIOSURBVHja7Jq9TsMwEMcxrZD4WpBYeKUCe+kTMCACHZh4BFfHO/AAIHZGFhYkBBsSEqxsLCAgXKhbXYOTxh9pfJVP+qutnZ5s/5Lz2Y5I03QhWji2GIcgAokWgfCxNvcOCCGKqiSqhUp0laHOne05vdEyGMfkdxJDVjgwDlEQgYQBgx+ULJaWSXXS6r/ER5FBVR8VfGftTKcITNs+a1XpcFoExREIDF14AVIFxgQUS+h520cdud6wNkC0UBw6BCO/HoCYwBhD8QCkQ/x1mwDyD4plh4D6DDV0TAGyo4HcawLIBBSLDkHeH0Mg2yVP3l4TQMZQDDsEOl/MgHQqhMNuE0D+oBh0CIr8MAKyazBH9WyBuKxDWgbXfjNf32TZ1KWm/Ap1oSk/R53UtQ5xTh3LUlMmT8gt6g51Q9p+SobxgJQ/qmsfZhWywGFSl0yBjCLJCMgXail3b7+rumdVJ2YRss4cN+r6qAHDkPWjPjdJCF4n9RmAD/V9A/Wp4NQassDjwlB6XBiCxcJQWmZZb8THFilfy/lfrTvLghq2TqTHrRMTKNJ0sIhdo15RT+RpyWwFdY96UZ/LdQKBGjcXpcc1AlSFEfLmouD+1knuxBDUVrvOBmoOC/rEcN7OQxKVeJTCiAdUzUJhA2Oez9QTkp72OTVcxDcXY8iKNkxGAJXmJCOQwOa6dhyXsOa6XwEGAKdeb5ET3rQdAAAAAElFTkSuQmCC);
+}
+
+.xdsoft_datetimepicker .xdsoft_label i {
+ opacity: 0.5;
+ background-position: -92px -19px;
+ display: inline-block;
+ width: 9px;
+ height: 20px;
+ vertical-align: middle;
+}
+
+.xdsoft_datetimepicker .xdsoft_prev {
+ float: left;
+ background-position: -20px 0;
+}
+.xdsoft_datetimepicker .xdsoft_today_button {
+ float: left;
+ background-position: -70px 0;
+ margin-left: 5px;
+}
+
+.xdsoft_datetimepicker .xdsoft_next {
+ float: right;
+ background-position: 0 0;
+}
+
+.xdsoft_datetimepicker .xdsoft_next,
+.xdsoft_datetimepicker .xdsoft_prev ,
+.xdsoft_datetimepicker .xdsoft_today_button {
+ background-color: transparent;
+ background-repeat: no-repeat;
+ border: 0 none;
+ cursor: pointer;
+ display: block;
+ height: 30px;
+ opacity: 0.5;
+ -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";
+ outline: medium none;
+ overflow: hidden;
+ padding: 0;
+ position: relative;
+ text-indent: 100%;
+ white-space: nowrap;
+ width: 20px;
+ min-width: 0;
+}
+
+.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_prev,
+.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_next {
+ float: none;
+ background-position: -40px -15px;
+ height: 15px;
+ width: 30px;
+ display: block;
+ margin-left: 14px;
+ margin-top: 7px;
+}
+.xdsoft_datetimepicker.xdsoft_rtl .xdsoft_timepicker .xdsoft_prev,
+.xdsoft_datetimepicker.xdsoft_rtl .xdsoft_timepicker .xdsoft_next {
+ float: none;
+ margin-left: 0;
+ margin-right: 14px;
+}
+
+.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_prev {
+ background-position: -40px 0;
+ margin-bottom: 7px;
+ margin-top: 0;
+}
+
+.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box {
+ height: 151px;
+ overflow: hidden;
+ border-bottom: 1px solid #ddd;
+}
+
+.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box >div >div {
+ background: #f5f5f5;
+ border-top: 1px solid #ddd;
+ color: #666;
+ font-size: 12px;
+ text-align: center;
+ border-collapse: collapse;
+ cursor: pointer;
+ border-bottom-width: 0;
+ height: 25px;
+ line-height: 25px;
+}
+
+.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box >div > div:first-child {
+ border-top-width: 0;
+}
+
+.xdsoft_datetimepicker .xdsoft_today_button:hover,
+.xdsoft_datetimepicker .xdsoft_next:hover,
+.xdsoft_datetimepicker .xdsoft_prev:hover {
+ opacity: 1;
+ -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";
+}
+
+.xdsoft_datetimepicker .xdsoft_label {
+ display: inline;
+ position: relative;
+ z-index: 9999;
+ margin: 0;
+ padding: 5px 3px;
+ font-size: 14px;
+ line-height: 20px;
+ font-weight: bold;
+ background-color: #fff;
+ float: left;
+ width: 182px;
+ text-align: center;
+ cursor: pointer;
+}
+
+.xdsoft_datetimepicker .xdsoft_label:hover>span {
+ text-decoration: underline;
+}
+
+.xdsoft_datetimepicker .xdsoft_label:hover i {
+ opacity: 1.0;
+}
+
+.xdsoft_datetimepicker .xdsoft_label > .xdsoft_select {
+ border: 1px solid #ccc;
+ position: absolute;
+ right: 0;
+ top: 30px;
+ z-index: 101;
+ display: none;
+ background: #fff;
+ max-height: 160px;
+ overflow-y: hidden;
+}
+
+.xdsoft_datetimepicker .xdsoft_label > .xdsoft_select.xdsoft_monthselect{ right: -7px }
+.xdsoft_datetimepicker .xdsoft_label > .xdsoft_select.xdsoft_yearselect{ right: 2px }
+.xdsoft_datetimepicker .xdsoft_label > .xdsoft_select > div > .xdsoft_option:hover {
+ color: #fff;
+ background: #ff8000;
+}
+
+.xdsoft_datetimepicker .xdsoft_label > .xdsoft_select > div > .xdsoft_option {
+ padding: 2px 10px 2px 5px;
+ text-decoration: none !important;
+}
+
+.xdsoft_datetimepicker .xdsoft_label > .xdsoft_select > div > .xdsoft_option.xdsoft_current {
+ background: #33aaff;
+ box-shadow: #178fe5 0 1px 3px 0 inset;
+ color: #fff;
+ font-weight: 700;
+}
+
+.xdsoft_datetimepicker .xdsoft_month {
+ width: 100px;
+ text-align: right;
+}
+
+.xdsoft_datetimepicker .xdsoft_calendar {
+ clear: both;
+}
+
+.xdsoft_datetimepicker .xdsoft_year{
+ width: 48px;
+ margin-left: 5px;
+}
+
+.xdsoft_datetimepicker .xdsoft_calendar table {
+ border-collapse: collapse;
+ width: 100%;
+
+}
+
+.xdsoft_datetimepicker .xdsoft_calendar td > div {
+ padding-right: 5px;
+}
+
+.xdsoft_datetimepicker .xdsoft_calendar th {
+ height: 25px;
+}
+
+.xdsoft_datetimepicker .xdsoft_calendar td,.xdsoft_datetimepicker .xdsoft_calendar th {
+ width: 14.2857142%;
+ background: #f5f5f5;
+ border: 1px solid #ddd;
+ color: #666;
+ font-size: 12px;
+ text-align: right;
+ vertical-align: middle;
+ padding: 0;
+ border-collapse: collapse;
+ cursor: pointer;
+ height: 25px;
+}
+.xdsoft_datetimepicker.xdsoft_showweeks .xdsoft_calendar td,.xdsoft_datetimepicker.xdsoft_showweeks .xdsoft_calendar th {
+ width: 12.5%;
+}
+
+.xdsoft_datetimepicker .xdsoft_calendar th {
+ background: #f1f1f1;
+}
+
+.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_today {
+ color: #33aaff;
+}
+
+.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_highlighted_default {
+ background: #ffe9d2;
+ box-shadow: #ffb871 0 1px 4px 0 inset;
+ color: #000;
+}
+.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_highlighted_mint {
+ background: #c1ffc9;
+ box-shadow: #00dd1c 0 1px 4px 0 inset;
+ color: #000;
+}
+
+.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_default,
+.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_current,
+.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box >div >div.xdsoft_current {
+ background: #33aaff;
+ box-shadow: #178fe5 0 1px 3px 0 inset;
+ color: #fff;
+ font-weight: 700;
+}
+
+.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_other_month,
+.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_disabled,
+.xdsoft_datetimepicker .xdsoft_time_box >div >div.xdsoft_disabled {
+ opacity: 0.5;
+ -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";
+ cursor: default;
+}
+
+.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_other_month.xdsoft_disabled {
+ opacity: 0.2;
+ -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=20)";
+}
+
+.xdsoft_datetimepicker .xdsoft_calendar td:hover,
+.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box >div >div:hover {
+ color: #fff !important;
+ background: #ff8000 !important;
+ box-shadow: none !important;
+}
+
+.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_current.xdsoft_disabled:hover,
+.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box>div>div.xdsoft_current.xdsoft_disabled:hover {
+ background: #33aaff !important;
+ box-shadow: #178fe5 0 1px 3px 0 inset !important;
+ color: #fff !important;
+}
+
+.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_disabled:hover,
+.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box >div >div.xdsoft_disabled:hover {
+ color: inherit !important;
+ background: inherit !important;
+ box-shadow: inherit !important;
+}
+
+.xdsoft_datetimepicker .xdsoft_calendar th {
+ font-weight: 700;
+ text-align: center;
+ color: #999;
+ cursor: default;
+}
+
+.xdsoft_datetimepicker .xdsoft_copyright {
+ color: #ccc !important;
+ font-size: 10px;
+ clear: both;
+ float: none;
+ margin-left: 8px;
+}
+
+.xdsoft_datetimepicker .xdsoft_copyright a { color: #eee !important }
+.xdsoft_datetimepicker .xdsoft_copyright a:hover { color: #aaa !important }
+
+.xdsoft_time_box {
+ position: relative;
+ border: 1px solid #ccc;
+}
+.xdsoft_scrollbar >.xdsoft_scroller {
+ background: #ccc !important;
+ height: 20px;
+ border-radius: 3px;
+}
+.xdsoft_scrollbar {
+ position: absolute;
+ width: 7px;
+ right: 0;
+ top: 0;
+ bottom: 0;
+ cursor: pointer;
+}
+.xdsoft_datetimepicker.xdsoft_rtl .xdsoft_scrollbar {
+ left: 0;
+ right: auto;
+}
+.xdsoft_scroller_box {
+ position: relative;
+}
+
+.xdsoft_datetimepicker.xdsoft_dark {
+ box-shadow: 0 5px 15px -5px rgba(255, 255, 255, 0.506);
+ background: #000;
+ border-bottom: 1px solid #444;
+ border-left: 1px solid #333;
+ border-right: 1px solid #333;
+ border-top: 1px solid #333;
+ color: #ccc;
+}
+
+.xdsoft_datetimepicker.xdsoft_dark .xdsoft_timepicker .xdsoft_time_box {
+ border-bottom: 1px solid #222;
+}
+.xdsoft_datetimepicker.xdsoft_dark .xdsoft_timepicker .xdsoft_time_box >div >div {
+ background: #0a0a0a;
+ border-top: 1px solid #222;
+ color: #999;
+}
+
+.xdsoft_datetimepicker.xdsoft_dark .xdsoft_label {
+ background-color: #000;
+}
+.xdsoft_datetimepicker.xdsoft_dark .xdsoft_label > .xdsoft_select {
+ border: 1px solid #333;
+ background: #000;
+}
+
+.xdsoft_datetimepicker.xdsoft_dark .xdsoft_label > .xdsoft_select > div > .xdsoft_option:hover {
+ color: #000;
+ background: #007fff;
+}
+
+.xdsoft_datetimepicker.xdsoft_dark .xdsoft_label > .xdsoft_select > div > .xdsoft_option.xdsoft_current {
+ background: #cc5500;
+ box-shadow: #b03e00 0 1px 3px 0 inset;
+ color: #000;
+}
+
+.xdsoft_datetimepicker.xdsoft_dark .xdsoft_label i,
+.xdsoft_datetimepicker.xdsoft_dark .xdsoft_prev,
+.xdsoft_datetimepicker.xdsoft_dark .xdsoft_next,
+.xdsoft_datetimepicker.xdsoft_dark .xdsoft_today_button {
+ background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAAAeCAYAAADaW7vzAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoV2luZG93cykiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6QUExQUUzOTA0M0UyMTFFNDlBM0FFQTJENTExRDVBODYiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6QUExQUUzOTE0M0UyMTFFNDlBM0FFQTJENTExRDVBODYiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpBQTFBRTM4RTQzRTIxMUU0OUEzQUVBMkQ1MTFENUE4NiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpBQTFBRTM4RjQzRTIxMUU0OUEzQUVBMkQ1MTFENUE4NiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pp0VxGEAAAIASURBVHja7JrNSgMxEMebtgh+3MSLr1T1Xn2CHoSKB08+QmR8Bx9A8e7RixdB9CKCoNdexIugxFlJa7rNZneTbLIpM/CnNLsdMvNjM8l0mRCiQ9Ye61IKCAgZAUnH+mU3MMZaHYChBnJUDzWOFZdVfc5+ZFLbrWDeXPwbxIqrLLfaeS0hEBVGIRQCEiZoHQwtlGSByCCdYBl8g8egTTAWoKQMRBRBcZxYlhzhKegqMOageErsCHVkk3hXIFooDgHB1KkHIHVgzKB4ADJQ/A1jAFmAYhkQqA5TOBtocrKrgXwQA8gcFIuAIO8sQSA7hidvPwaQGZSaAYHOUWJABhWWw2EMIH9QagQERU4SArJXo0ZZL18uvaxejXt/Em8xjVBXmvFr1KVm/AJ10tRe2XnraNqaJvKE3KHuUbfK1E+VHB0q40/y3sdQSxY4FHWeKJCunP8UyDdqJZenT3ntVV5jIYCAh20vT7ioP8tpf6E2lfEMwERe+whV1MHjwZB7PBiCxcGQWwKZKD62lfGNnP/1poFAA60T7rF1UgcKd2id3KDeUS+oLWV8DfWAepOfq00CgQabi9zjcgJVYVD7PVzQUAUGAQkbNJTBICDhgwYTjDYD6XeW08ZKh+A4pYkzenOxXUbvZcWz7E8ykRMnIHGX1XPl+1m2vPYpL+2qdb8CDAARlKFEz/ZVkAAAAABJRU5ErkJggg==);
+}
+
+.xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar td,
+.xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar th {
+ background: #0a0a0a;
+ border: 1px solid #222;
+ color: #999;
+}
+
+.xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar th {
+ background: #0e0e0e;
+}
+
+.xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar td.xdsoft_today {
+ color: #cc5500;
+}
+
+.xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar td.xdsoft_highlighted_default {
+ background: #ffe9d2;
+ box-shadow: #ffb871 0 1px 4px 0 inset;
+ color:#000;
+}
+.xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar td.xdsoft_highlighted_mint {
+ background: #c1ffc9;
+ box-shadow: #00dd1c 0 1px 4px 0 inset;
+ color:#000;
+}
+
+.xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar td.xdsoft_default,
+.xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar td.xdsoft_current,
+.xdsoft_datetimepicker.xdsoft_dark .xdsoft_timepicker .xdsoft_time_box >div >div.xdsoft_current {
+ background: #cc5500;
+ box-shadow: #b03e00 0 1px 3px 0 inset;
+ color: #000;
+}
+
+.xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar td:hover,
+.xdsoft_datetimepicker.xdsoft_dark .xdsoft_timepicker .xdsoft_time_box >div >div:hover {
+ color: #000 !important;
+ background: #007fff !important;
+}
+
+.xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar th {
+ color: #666;
+}
+
+.xdsoft_datetimepicker.xdsoft_dark .xdsoft_copyright { color: #333 !important }
+.xdsoft_datetimepicker.xdsoft_dark .xdsoft_copyright a { color: #111 !important }
+.xdsoft_datetimepicker.xdsoft_dark .xdsoft_copyright a:hover { color: #555 !important }
+
+.xdsoft_dark .xdsoft_time_box {
+ border: 1px solid #333;
+}
+
+.xdsoft_dark .xdsoft_scrollbar >.xdsoft_scroller {
+ background: #333 !important;
+}
+.xdsoft_datetimepicker .xdsoft_save_selected {
+ display: block;
+ border: 1px solid #dddddd !important;
+ margin-top: 5px;
+ width: 100%;
+ color: #454551;
+ font-size: 13px;
+}
+.xdsoft_datetimepicker .blue-gradient-button {
+ font-family: "museo-sans", "Book Antiqua", sans-serif;
+ font-size: 12px;
+ font-weight: 300;
+ color: #82878c;
+ height: 28px;
+ position: relative;
+ padding: 4px 17px 4px 33px;
+ border: 1px solid #d7d8da;
+ background: -moz-linear-gradient(top, #fff 0%, #f4f8fa 73%);
+ /* FF3.6+ */
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #fff), color-stop(73%, #f4f8fa));
+ /* Chrome,Safari4+ */
+ background: -webkit-linear-gradient(top, #fff 0%, #f4f8fa 73%);
+ /* Chrome10+,Safari5.1+ */
+ background: -o-linear-gradient(top, #fff 0%, #f4f8fa 73%);
+ /* Opera 11.10+ */
+ background: -ms-linear-gradient(top, #fff 0%, #f4f8fa 73%);
+ /* IE10+ */
+ background: linear-gradient(to bottom, #fff 0%, #f4f8fa 73%);
+ /* W3C */
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#fff', endColorstr='#f4f8fa',GradientType=0 );
+/* IE6-9 */
+}
+.xdsoft_datetimepicker .blue-gradient-button:hover, .xdsoft_datetimepicker .blue-gradient-button:focus, .xdsoft_datetimepicker .blue-gradient-button:hover span, .xdsoft_datetimepicker .blue-gradient-button:focus span {
+ color: #454551;
+ background: -moz-linear-gradient(top, #f4f8fa 0%, #FFF 73%);
+ /* FF3.6+ */
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #f4f8fa), color-stop(73%, #FFF));
+ /* Chrome,Safari4+ */
+ background: -webkit-linear-gradient(top, #f4f8fa 0%, #FFF 73%);
+ /* Chrome10+,Safari5.1+ */
+ background: -o-linear-gradient(top, #f4f8fa 0%, #FFF 73%);
+ /* Opera 11.10+ */
+ background: -ms-linear-gradient(top, #f4f8fa 0%, #FFF 73%);
+ /* IE10+ */
+ background: linear-gradient(to bottom, #f4f8fa 0%, #FFF 73%);
+ /* W3C */
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f4f8fa', endColorstr='#FFF',GradientType=0 );
+ /* IE6-9 */
+}
diff --git a/op25/gr-op25_repeater/apps/oplog/op25/static/dtpick/jquery.datetimepicker.js b/op25/gr-op25_repeater/apps/oplog/op25/static/dtpick/jquery.datetimepicker.js
new file mode 100644
index 0000000..7dab44e
--- /dev/null
+++ b/op25/gr-op25_repeater/apps/oplog/op25/static/dtpick/jquery.datetimepicker.js
@@ -0,0 +1,2718 @@
+/**
+ * @preserve jQuery DateTimePicker
+ * @homepage http://xdsoft.net/jqplugins/datetimepicker/
+ * @author Chupurnov Valeriy (<chupurnov@gmail.com>)
+ */
+
+/**
+ * @param {jQuery} $
+ */
+var datetimepickerFactory = function ($) {
+ 'use strict';
+
+ var default_options = {
+ i18n: {
+ ar: { // Arabic
+ months: [
+ "كانون الثاني", "شباط", "آذار", "نيسان", "مايو", "حزيران", "تموز", "آب", "أيلول", "تشرين الأول", "تشرين الثاني", "كانون الأول"
+ ],
+ dayOfWeekShort: [
+ "ن", "ث", "ع", "خ", "ج", "س", "ح"
+ ],
+ dayOfWeek: ["الأحد", "الاثنين", "الثلاثاء", "الأربعاء", "الخميس", "الجمعة", "السبت", "الأحد"]
+ },
+ ro: { // Romanian
+ months: [
+ "Ianuarie", "Februarie", "Martie", "Aprilie", "Mai", "Iunie", "Iulie", "August", "Septembrie", "Octombrie", "Noiembrie", "Decembrie"
+ ],
+ dayOfWeekShort: [
+ "Du", "Lu", "Ma", "Mi", "Jo", "Vi", "Sâ"
+ ],
+ dayOfWeek: ["Duminică", "Luni", "Marţi", "Miercuri", "Joi", "Vineri", "Sâmbătă"]
+ },
+ id: { // Indonesian
+ months: [
+ "Januari", "Februari", "Maret", "April", "Mei", "Juni", "Juli", "Agustus", "September", "Oktober", "November", "Desember"
+ ],
+ dayOfWeekShort: [
+ "Min", "Sen", "Sel", "Rab", "Kam", "Jum", "Sab"
+ ],
+ dayOfWeek: ["Minggu", "Senin", "Selasa", "Rabu", "Kamis", "Jumat", "Sabtu"]
+ },
+ is: { // Icelandic
+ months: [
+ "Janúar", "Febrúar", "Mars", "Apríl", "Maí", "Júní", "Júlí", "Ágúst", "September", "Október", "Nóvember", "Desember"
+ ],
+ dayOfWeekShort: [
+ "Sun", "Mán", "Þrið", "Mið", "Fim", "Fös", "Lau"
+ ],
+ dayOfWeek: ["Sunnudagur", "Mánudagur", "Þriðjudagur", "Miðvikudagur", "Fimmtudagur", "Föstudagur", "Laugardagur"]
+ },
+ bg: { // Bulgarian
+ months: [
+ "Януари", "Февруари", "Март", "Април", "Май", "Юни", "Юли", "Август", "Септември", "Октомври", "Ноември", "Декември"
+ ],
+ dayOfWeekShort: [
+ "Нд", "Пн", "Вт", "Ср", "Чт", "Пт", "Сб"
+ ],
+ dayOfWeek: ["Неделя", "Понеделник", "Вторник", "Сряда", "Четвъртък", "Петък", "Събота"]
+ },
+ fa: { // Persian/Farsi
+ months: [
+ 'فروردین', 'اردیبهشت', 'خرداد', 'تیر', 'مرداد', 'شهریور', 'مهر', 'آبان', 'آذر', 'دی', 'بهمن', 'اسفند'
+ ],
+ dayOfWeekShort: [
+ 'یکشنبه', 'دوشنبه', 'سه شنبه', 'چهارشنبه', 'پنجشنبه', 'جمعه', 'شنبه'
+ ],
+ dayOfWeek: ["یک‌شنبه", "دوشنبه", "سه‌شنبه", "چهارشنبه", "پنج‌شنبه", "جمعه", "شنبه", "یک‌شنبه"]
+ },
+ ru: { // Russian
+ months: [
+ 'Январь', 'Февраль', 'Март', 'Апрель', 'Май', 'Июнь', 'Июль', 'Август', 'Сентябрь', 'Октябрь', 'Ноябрь', 'Декабрь'
+ ],
+ dayOfWeekShort: [
+ "Вс", "Пн", "Вт", "Ср", "Чт", "Пт", "Сб"
+ ],
+ dayOfWeek: ["Воскресенье", "Понедельник", "Вторник", "Среда", "Четверг", "Пятница", "Суббота"]
+ },
+ uk: { // Ukrainian
+ months: [
+ 'Січень', 'Лютий', 'Березень', 'Квітень', 'Травень', 'Червень', 'Липень', 'Серпень', 'Вересень', 'Жовтень', 'Листопад', 'Грудень'
+ ],
+ dayOfWeekShort: [
+ "Нд", "Пн", "Вт", "Ср", "Чт", "Пт", "Сб"
+ ],
+ dayOfWeek: ["Неділя", "Понеділок", "Вівторок", "Середа", "Четвер", "П'ятниця", "Субота"]
+ },
+ en: { // English
+ months: [
+ "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"
+ ],
+ dayOfWeekShort: [
+ "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"
+ ],
+ dayOfWeek: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]
+ },
+ el: { // Ελληνικά
+ months: [
+ "Ιανουάριος", "Φεβρουάριος", "Μάρτιος", "Απρίλιος", "Μάιος", "Ιούνιος", "Ιούλιος", "Αύγουστος", "Σεπτέμβριος", "Οκτώβριος", "Νοέμβριος", "Δεκέμβριος"
+ ],
+ dayOfWeekShort: [
+ "Κυρ", "Δευ", "Τρι", "Τετ", "Πεμ", "Παρ", "Σαβ"
+ ],
+ dayOfWeek: ["Κυριακή", "Δευτέρα", "Τρίτη", "Τετάρτη", "Πέμπτη", "Παρασκευή", "Σάββατο"]
+ },
+ de: { // German
+ months: [
+ 'Januar', 'Februar', 'März', 'April', 'Mai', 'Juni', 'Juli', 'August', 'September', 'Oktober', 'November', 'Dezember'
+ ],
+ dayOfWeekShort: [
+ "So", "Mo", "Di", "Mi", "Do", "Fr", "Sa"
+ ],
+ dayOfWeek: ["Sonntag", "Montag", "Dienstag", "Mittwoch", "Donnerstag", "Freitag", "Samstag"]
+ },
+ nl: { // Dutch
+ months: [
+ "januari", "februari", "maart", "april", "mei", "juni", "juli", "augustus", "september", "oktober", "november", "december"
+ ],
+ dayOfWeekShort: [
+ "zo", "ma", "di", "wo", "do", "vr", "za"
+ ],
+ dayOfWeek: ["zondag", "maandag", "dinsdag", "woensdag", "donderdag", "vrijdag", "zaterdag"]
+ },
+ tr: { // Turkish
+ months: [
+ "Ocak", "Şubat", "Mart", "Nisan", "Mayıs", "Haziran", "Temmuz", "Ağustos", "Eylül", "Ekim", "Kasım", "Aralık"
+ ],
+ dayOfWeekShort: [
+ "Paz", "Pts", "Sal", "Çar", "Per", "Cum", "Cts"
+ ],
+ dayOfWeek: ["Pazar", "Pazartesi", "Salı", "Çarşamba", "Perşembe", "Cuma", "Cumartesi"]
+ },
+ fr: { //French
+ months: [
+ "Janvier", "Février", "Mars", "Avril", "Mai", "Juin", "Juillet", "Août", "Septembre", "Octobre", "Novembre", "Décembre"
+ ],
+ dayOfWeekShort: [
+ "Dim", "Lun", "Mar", "Mer", "Jeu", "Ven", "Sam"
+ ],
+ dayOfWeek: ["dimanche", "lundi", "mardi", "mercredi", "jeudi", "vendredi", "samedi"]
+ },
+ es: { // Spanish
+ months: [
+ "Enero", "Febrero", "Marzo", "Abril", "Mayo", "Junio", "Julio", "Agosto", "Septiembre", "Octubre", "Noviembre", "Diciembre"
+ ],
+ dayOfWeekShort: [
+ "Dom", "Lun", "Mar", "Mié", "Jue", "Vie", "Sáb"
+ ],
+ dayOfWeek: ["Domingo", "Lunes", "Martes", "Miércoles", "Jueves", "Viernes", "Sábado"]
+ },
+ th: { // Thai
+ months: [
+ 'มกราคม', 'กุมภาพันธ์', 'มีนาคม', 'เมษายน', 'พฤษภาคม', 'มิถุนายน', 'กรกฎาคม', 'สิงหาคม', 'กันยายน', 'ตุลาคม', 'พฤศจิกายน', 'ธันวาคม'
+ ],
+ dayOfWeekShort: [
+ 'อา.', 'จ.', 'อ.', 'พ.', 'พฤ.', 'ศ.', 'ส.'
+ ],
+ dayOfWeek: ["อาทิตย์", "จันทร์", "อังคาร", "พุธ", "พฤหัส", "ศุกร์", "เสาร์", "อาทิตย์"]
+ },
+ pl: { // Polish
+ months: [
+ "styczeń", "luty", "marzec", "kwiecień", "maj", "czerwiec", "lipiec", "sierpień", "wrzesień", "październik", "listopad", "grudzień"
+ ],
+ dayOfWeekShort: [
+ "nd", "pn", "wt", "śr", "cz", "pt", "sb"
+ ],
+ dayOfWeek: ["niedziela", "poniedziałek", "wtorek", "środa", "czwartek", "piątek", "sobota"]
+ },
+ pt: { // Portuguese
+ months: [
+ "Janeiro", "Fevereiro", "Março", "Abril", "Maio", "Junho", "Julho", "Agosto", "Setembro", "Outubro", "Novembro", "Dezembro"
+ ],
+ dayOfWeekShort: [
+ "Dom", "Seg", "Ter", "Qua", "Qui", "Sex", "Sab"
+ ],
+ dayOfWeek: ["Domingo", "Segunda", "Terça", "Quarta", "Quinta", "Sexta", "Sábado"]
+ },
+ ch: { // Simplified Chinese
+ months: [
+ "一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"
+ ],
+ dayOfWeekShort: [
+ "日", "一", "二", "三", "四", "五", "六"
+ ]
+ },
+ se: { // Swedish
+ months: [
+ "Januari", "Februari", "Mars", "April", "Maj", "Juni", "Juli", "Augusti", "September", "Oktober", "November", "December"
+ ],
+ dayOfWeekShort: [
+ "Sön", "Mån", "Tis", "Ons", "Tor", "Fre", "Lör"
+ ]
+ },
+ km: { // Khmer (ភាសាខ្មែរ)
+ months: [
+ "មករា​", "កុម្ភៈ", "មិនា​", "មេសា​", "ឧសភា​", "មិថុនា​", "កក្កដា​", "សីហា​", "កញ្ញា​", "តុលា​", "វិច្ឆិកា", "ធ្នូ​"
+ ],
+ dayOfWeekShort: ["អាទិ​", "ច័ន្ទ​", "អង្គារ​", "ពុធ​", "ព្រហ​​", "សុក្រ​", "សៅរ៍"],
+ dayOfWeek: ["អាទិត្យ​", "ច័ន្ទ​", "អង្គារ​", "ពុធ​", "ព្រហស្បតិ៍​", "សុក្រ​", "សៅរ៍"]
+ },
+ kr: { // Korean
+ months: [
+ "1월", "2월", "3월", "4월", "5월", "6월", "7월", "8월", "9월", "10월", "11월", "12월"
+ ],
+ dayOfWeekShort: [
+ "일", "월", "화", "수", "목", "금", "토"
+ ],
+ dayOfWeek: ["일요일", "월요일", "화요일", "수요일", "목요일", "금요일", "토요일"]
+ },
+ it: { // Italian
+ months: [
+ "Gennaio", "Febbraio", "Marzo", "Aprile", "Maggio", "Giugno", "Luglio", "Agosto", "Settembre", "Ottobre", "Novembre", "Dicembre"
+ ],
+ dayOfWeekShort: [
+ "Dom", "Lun", "Mar", "Mer", "Gio", "Ven", "Sab"
+ ],
+ dayOfWeek: ["Domenica", "Lunedì", "Martedì", "Mercoledì", "Giovedì", "Venerdì", "Sabato"]
+ },
+ da: { // Dansk
+ months: [
+ "Januar", "Februar", "Marts", "April", "Maj", "Juni", "Juli", "August", "September", "Oktober", "November", "December"
+ ],
+ dayOfWeekShort: [
+ "Søn", "Man", "Tir", "Ons", "Tor", "Fre", "Lør"
+ ],
+ dayOfWeek: ["søndag", "mandag", "tirsdag", "onsdag", "torsdag", "fredag", "lørdag"]
+ },
+ no: { // Norwegian
+ months: [
+ "Januar", "Februar", "Mars", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Desember"
+ ],
+ dayOfWeekShort: [
+ "Søn", "Man", "Tir", "Ons", "Tor", "Fre", "Lør"
+ ],
+ dayOfWeek: ['Søndag', 'Mandag', 'Tirsdag', 'Onsdag', 'Torsdag', 'Fredag', 'Lørdag']
+ },
+ ja: { // Japanese
+ months: [
+ "1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"
+ ],
+ dayOfWeekShort: [
+ "日", "月", "火", "水", "木", "金", "土"
+ ],
+ dayOfWeek: ["日曜", "月曜", "火曜", "水曜", "木曜", "金曜", "土曜"]
+ },
+ vi: { // Vietnamese
+ months: [
+ "Tháng 1", "Tháng 2", "Tháng 3", "Tháng 4", "Tháng 5", "Tháng 6", "Tháng 7", "Tháng 8", "Tháng 9", "Tháng 10", "Tháng 11", "Tháng 12"
+ ],
+ dayOfWeekShort: [
+ "CN", "T2", "T3", "T4", "T5", "T6", "T7"
+ ],
+ dayOfWeek: ["Chủ nhật", "Thứ hai", "Thứ ba", "Thứ tư", "Thứ năm", "Thứ sáu", "Thứ bảy"]
+ },
+ sl: { // Slovenščina
+ months: [
+ "Januar", "Februar", "Marec", "April", "Maj", "Junij", "Julij", "Avgust", "September", "Oktober", "November", "December"
+ ],
+ dayOfWeekShort: [
+ "Ned", "Pon", "Tor", "Sre", "Čet", "Pet", "Sob"
+ ],
+ dayOfWeek: ["Nedelja", "Ponedeljek", "Torek", "Sreda", "Četrtek", "Petek", "Sobota"]
+ },
+ cs: { // Čeština
+ months: [
+ "Leden", "Únor", "Březen", "Duben", "Květen", "Červen", "Červenec", "Srpen", "Září", "Říjen", "Listopad", "Prosinec"
+ ],
+ dayOfWeekShort: [
+ "Ne", "Po", "Út", "St", "Čt", "Pá", "So"
+ ]
+ },
+ hu: { // Hungarian
+ months: [
+ "Január", "Február", "Március", "Április", "Május", "Június", "Július", "Augusztus", "Szeptember", "Október", "November", "December"
+ ],
+ dayOfWeekShort: [
+ "Va", "Hé", "Ke", "Sze", "Cs", "Pé", "Szo"
+ ],
+ dayOfWeek: ["vasárnap", "hétfő", "kedd", "szerda", "csütörtök", "péntek", "szombat"]
+ },
+ az: { //Azerbaijanian (Azeri)
+ months: [
+ "Yanvar", "Fevral", "Mart", "Aprel", "May", "Iyun", "Iyul", "Avqust", "Sentyabr", "Oktyabr", "Noyabr", "Dekabr"
+ ],
+ dayOfWeekShort: [
+ "B", "Be", "Ça", "Ç", "Ca", "C", "Ş"
+ ],
+ dayOfWeek: ["Bazar", "Bazar ertəsi", "Çərşənbə axşamı", "Çərşənbə", "Cümə axşamı", "Cümə", "Şənbə"]
+ },
+ bs: { //Bosanski
+ months: [
+ "Januar", "Februar", "Mart", "April", "Maj", "Jun", "Jul", "Avgust", "Septembar", "Oktobar", "Novembar", "Decembar"
+ ],
+ dayOfWeekShort: [
+ "Ned", "Pon", "Uto", "Sri", "Čet", "Pet", "Sub"
+ ],
+ dayOfWeek: ["Nedjelja","Ponedjeljak", "Utorak", "Srijeda", "Četvrtak", "Petak", "Subota"]
+ },
+ ca: { //Català
+ months: [
+ "Gener", "Febrer", "Març", "Abril", "Maig", "Juny", "Juliol", "Agost", "Setembre", "Octubre", "Novembre", "Desembre"
+ ],
+ dayOfWeekShort: [
+ "Dg", "Dl", "Dt", "Dc", "Dj", "Dv", "Ds"
+ ],
+ dayOfWeek: ["Diumenge", "Dilluns", "Dimarts", "Dimecres", "Dijous", "Divendres", "Dissabte"]
+ },
+ 'en-GB': { //English (British)
+ months: [
+ "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"
+ ],
+ dayOfWeekShort: [
+ "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"
+ ],
+ dayOfWeek: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]
+ },
+ et: { //"Eesti"
+ months: [
+ "Jaanuar", "Veebruar", "Märts", "Aprill", "Mai", "Juuni", "Juuli", "August", "September", "Oktoober", "November", "Detsember"
+ ],
+ dayOfWeekShort: [
+ "P", "E", "T", "K", "N", "R", "L"
+ ],
+ dayOfWeek: ["Pühapäev", "Esmaspäev", "Teisipäev", "Kolmapäev", "Neljapäev", "Reede", "Laupäev"]
+ },
+ eu: { //Euskara
+ months: [
+ "Urtarrila", "Otsaila", "Martxoa", "Apirila", "Maiatza", "Ekaina", "Uztaila", "Abuztua", "Iraila", "Urria", "Azaroa", "Abendua"
+ ],
+ dayOfWeekShort: [
+ "Ig.", "Al.", "Ar.", "Az.", "Og.", "Or.", "La."
+ ],
+ dayOfWeek: ['Igandea', 'Astelehena', 'Asteartea', 'Asteazkena', 'Osteguna', 'Ostirala', 'Larunbata']
+ },
+ fi: { //Finnish (Suomi)
+ months: [
+ "Tammikuu", "Helmikuu", "Maaliskuu", "Huhtikuu", "Toukokuu", "Kesäkuu", "Heinäkuu", "Elokuu", "Syyskuu", "Lokakuu", "Marraskuu", "Joulukuu"
+ ],
+ dayOfWeekShort: [
+ "Su", "Ma", "Ti", "Ke", "To", "Pe", "La"
+ ],
+ dayOfWeek: ["sunnuntai", "maanantai", "tiistai", "keskiviikko", "torstai", "perjantai", "lauantai"]
+ },
+ gl: { //Galego
+ months: [
+ "Xan", "Feb", "Maz", "Abr", "Mai", "Xun", "Xul", "Ago", "Set", "Out", "Nov", "Dec"
+ ],
+ dayOfWeekShort: [
+ "Dom", "Lun", "Mar", "Mer", "Xov", "Ven", "Sab"
+ ],
+ dayOfWeek: ["Domingo", "Luns", "Martes", "Mércores", "Xoves", "Venres", "Sábado"]
+ },
+ hr: { //Hrvatski
+ months: [
+ "Siječanj", "Veljača", "Ožujak", "Travanj", "Svibanj", "Lipanj", "Srpanj", "Kolovoz", "Rujan", "Listopad", "Studeni", "Prosinac"
+ ],
+ dayOfWeekShort: [
+ "Ned", "Pon", "Uto", "Sri", "Čet", "Pet", "Sub"
+ ],
+ dayOfWeek: ["Nedjelja", "Ponedjeljak", "Utorak", "Srijeda", "Četvrtak", "Petak", "Subota"]
+ },
+ ko: { //Korean (한국어)
+ months: [
+ "1월", "2월", "3월", "4월", "5월", "6월", "7월", "8월", "9월", "10월", "11월", "12월"
+ ],
+ dayOfWeekShort: [
+ "일", "월", "화", "수", "목", "금", "토"
+ ],
+ dayOfWeek: ["일요일", "월요일", "화요일", "수요일", "목요일", "금요일", "토요일"]
+ },
+ lt: { //Lithuanian (lietuvių)
+ months: [
+ "Sausio", "Vasario", "Kovo", "Balandžio", "Gegužės", "Birželio", "Liepos", "Rugpjūčio", "Rugsėjo", "Spalio", "Lapkričio", "Gruodžio"
+ ],
+ dayOfWeekShort: [
+ "Sek", "Pir", "Ant", "Tre", "Ket", "Pen", "Šeš"
+ ],
+ dayOfWeek: ["Sekmadienis", "Pirmadienis", "Antradienis", "Trečiadienis", "Ketvirtadienis", "Penktadienis", "Šeštadienis"]
+ },
+ lv: { //Latvian (Latviešu)
+ months: [
+ "Janvāris", "Februāris", "Marts", "Aprīlis ", "Maijs", "Jūnijs", "Jūlijs", "Augusts", "Septembris", "Oktobris", "Novembris", "Decembris"
+ ],
+ dayOfWeekShort: [
+ "Sv", "Pr", "Ot", "Tr", "Ct", "Pk", "St"
+ ],
+ dayOfWeek: ["Svētdiena", "Pirmdiena", "Otrdiena", "Trešdiena", "Ceturtdiena", "Piektdiena", "Sestdiena"]
+ },
+ mk: { //Macedonian (Македонски)
+ months: [
+ "јануари", "февруари", "март", "април", "мај", "јуни", "јули", "август", "септември", "октомври", "ноември", "декември"
+ ],
+ dayOfWeekShort: [
+ "нед", "пон", "вто", "сре", "чет", "пет", "саб"
+ ],
+ dayOfWeek: ["Недела", "Понеделник", "Вторник", "Среда", "Четврток", "Петок", "Сабота"]
+ },
+ mn: { //Mongolian (Монгол)
+ months: [
+ "1-р сар", "2-р сар", "3-р сар", "4-р сар", "5-р сар", "6-р сар", "7-р сар", "8-р сар", "9-р сар", "10-р сар", "11-р сар", "12-р сар"
+ ],
+ dayOfWeekShort: [
+ "Дав", "Мяг", "Лха", "Пүр", "Бсн", "Бям", "Ням"
+ ],
+ dayOfWeek: ["Даваа", "Мягмар", "Лхагва", "Пүрэв", "Баасан", "Бямба", "Ням"]
+ },
+ 'pt-BR': { //Português(Brasil)
+ months: [
+ "Janeiro", "Fevereiro", "Março", "Abril", "Maio", "Junho", "Julho", "Agosto", "Setembro", "Outubro", "Novembro", "Dezembro"
+ ],
+ dayOfWeekShort: [
+ "Dom", "Seg", "Ter", "Qua", "Qui", "Sex", "Sáb"
+ ],
+ dayOfWeek: ["Domingo", "Segunda", "Terça", "Quarta", "Quinta", "Sexta", "Sábado"]
+ },
+ sk: { //Slovenčina
+ months: [
+ "Január", "Február", "Marec", "Apríl", "Máj", "Jún", "Júl", "August", "September", "Október", "November", "December"
+ ],
+ dayOfWeekShort: [
+ "Ne", "Po", "Ut", "St", "Št", "Pi", "So"
+ ],
+ dayOfWeek: ["Nedeľa", "Pondelok", "Utorok", "Streda", "Štvrtok", "Piatok", "Sobota"]
+ },
+ sq: { //Albanian (Shqip)
+ months: [
+ "Janar", "Shkurt", "Mars", "Prill", "Maj", "Qershor", "Korrik", "Gusht", "Shtator", "Tetor", "Nëntor", "Dhjetor"
+ ],
+ dayOfWeekShort: [
+ "Die", "Hën", "Mar", "Mër", "Enj", "Pre", "Shtu"
+ ],
+ dayOfWeek: ["E Diel", "E Hënë", "E Martē", "E Mërkurë", "E Enjte", "E Premte", "E Shtunë"]
+ },
+ 'sr-YU': { //Serbian (Srpski)
+ months: [
+ "Januar", "Februar", "Mart", "April", "Maj", "Jun", "Jul", "Avgust", "Septembar", "Oktobar", "Novembar", "Decembar"
+ ],
+ dayOfWeekShort: [
+ "Ned", "Pon", "Uto", "Sre", "čet", "Pet", "Sub"
+ ],
+ dayOfWeek: ["Nedelja","Ponedeljak", "Utorak", "Sreda", "Četvrtak", "Petak", "Subota"]
+ },
+ sr: { //Serbian Cyrillic (Српски)
+ months: [
+ "јануар", "фебруар", "март", "април", "мај", "јун", "јул", "август", "септембар", "октобар", "новембар", "децембар"
+ ],
+ dayOfWeekShort: [
+ "нед", "пон", "уто", "сре", "чет", "пет", "суб"
+ ],
+ dayOfWeek: ["Недеља","Понедељак", "Уторак", "Среда", "Четвртак", "Петак", "Субота"]
+ },
+ sv: { //Svenska
+ months: [
+ "Januari", "Februari", "Mars", "April", "Maj", "Juni", "Juli", "Augusti", "September", "Oktober", "November", "December"
+ ],
+ dayOfWeekShort: [
+ "Sön", "Mån", "Tis", "Ons", "Tor", "Fre", "Lör"
+ ],
+ dayOfWeek: ["Söndag", "Måndag", "Tisdag", "Onsdag", "Torsdag", "Fredag", "Lördag"]
+ },
+ 'zh-TW': { //Traditional Chinese (繁體中文)
+ months: [
+ "一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"
+ ],
+ dayOfWeekShort: [
+ "日", "一", "二", "三", "四", "五", "六"
+ ],
+ dayOfWeek: ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"]
+ },
+ zh: { //Simplified Chinese (简体中文)
+ months: [
+ "一月", "二月", "三月", "四月", "五月", "六月", "七月", "八月", "九月", "十月", "十一月", "十二月"
+ ],
+ dayOfWeekShort: [
+ "日", "一", "二", "三", "四", "五", "六"
+ ],
+ dayOfWeek: ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"]
+ },
+ ug:{ // Uyghur(ئۇيغۇرچە)
+ months: [
+ "1-ئاي","2-ئاي","3-ئاي","4-ئاي","5-ئاي","6-ئاي","7-ئاي","8-ئاي","9-ئاي","10-ئاي","11-ئاي","12-ئاي"
+ ],
+ dayOfWeek: [
+ "يەكشەنبە", "دۈشەنبە","سەيشەنبە","چارشەنبە","پەيشەنبە","جۈمە","شەنبە"
+ ]
+ },
+ he: { //Hebrew (עברית)
+ months: [
+ 'ינואר', 'פברואר', 'מרץ', 'אפריל', 'מאי', 'יוני', 'יולי', 'אוגוסט', 'ספטמבר', 'אוקטובר', 'נובמבר', 'דצמבר'
+ ],
+ dayOfWeekShort: [
+ 'א\'', 'ב\'', 'ג\'', 'ד\'', 'ה\'', 'ו\'', 'שבת'
+ ],
+ dayOfWeek: ["ראשון", "שני", "שלישי", "רביעי", "חמישי", "שישי", "שבת", "ראשון"]
+ },
+ hy: { // Armenian
+ months: [
+ "Հունվար", "Փետրվար", "Մարտ", "Ապրիլ", "Մայիս", "Հունիս", "Հուլիս", "Օգոստոս", "Սեպտեմբեր", "Հոկտեմբեր", "Նոյեմբեր", "Դեկտեմբեր"
+ ],
+ dayOfWeekShort: [
+ "Կի", "Երկ", "Երք", "Չոր", "Հնգ", "Ուրբ", "Շբթ"
+ ],
+ dayOfWeek: ["Կիրակի", "Երկուշաբթի", "Երեքշաբթի", "Չորեքշաբթի", "Հինգշաբթի", "Ուրբաթ", "Շաբաթ"]
+ },
+ kg: { // Kyrgyz
+ months: [
+ 'Үчтүн айы', 'Бирдин айы', 'Жалган Куран', 'Чын Куран', 'Бугу', 'Кулжа', 'Теке', 'Баш Оона', 'Аяк Оона', 'Тогуздун айы', 'Жетинин айы', 'Бештин айы'
+ ],
+ dayOfWeekShort: [
+ "Жек", "Дүй", "Шей", "Шар", "Бей", "Жум", "Ише"
+ ],
+ dayOfWeek: [
+ "Жекшемб", "Дүйшөмб", "Шейшемб", "Шаршемб", "Бейшемби", "Жума", "Ишенб"
+ ]
+ },
+ rm: { // Romansh
+ months: [
+ "Schaner", "Favrer", "Mars", "Avrigl", "Matg", "Zercladur", "Fanadur", "Avust", "Settember", "October", "November", "December"
+ ],
+ dayOfWeekShort: [
+ "Du", "Gli", "Ma", "Me", "Gie", "Ve", "So"
+ ],
+ dayOfWeek: [
+ "Dumengia", "Glindesdi", "Mardi", "Mesemna", "Gievgia", "Venderdi", "Sonda"
+ ]
+ },
+ ka: { // Georgian
+ months: [
+ 'იანვარი', 'თებერვალი', 'მარტი', 'აპრილი', 'მაისი', 'ივნისი', 'ივლისი', 'აგვისტო', 'სექტემბერი', 'ოქტომბერი', 'ნოემბერი', 'დეკემბერი'
+ ],
+ dayOfWeekShort: [
+ "კვ", "ორშ", "სამშ", "ოთხ", "ხუთ", "პარ", "შაბ"
+ ],
+ dayOfWeek: ["კვირა", "ორშაბათი", "სამშაბათი", "ოთხშაბათი", "ხუთშაბათი", "პარასკევი", "შაბათი"]
+ },
+ kk: { // Kazakh
+ months: [
+ 'Қаңтар', 'Ақпан', 'Наурыз', 'Сәуір', 'Мамыр', 'Маусым', 'Шілде', 'Тамыз', 'Қыркүйек', 'Қазан', 'Қараша', 'Желтоқсан'
+ ],
+ dayOfWeekShort: [
+ "Жк", "Дс", "Сс", "Ср", "Бс", "Жм", "Сб"
+ ],
+ dayOfWeek: ["Жексенбі", "Дүйсенбі", "Сейсенбі", "Сәрсенбі", "Бейсенбі", "Жұма", "Сенбі"]
+ }
+ },
+
+ ownerDocument: document,
+ contentWindow: window,
+
+ value: '',
+ rtl: false,
+
+ format: 'Y/m/d H:i',
+ formatTime: 'H:i',
+ formatDate: 'Y/m/d',
+
+ startDate: false, // new Date(), '1986/12/08', '-1970/01/05','-1970/01/05',
+ step: 60,
+ monthChangeSpinner: true,
+
+ closeOnDateSelect: false,
+ closeOnTimeSelect: true,
+ closeOnWithoutClick: true,
+ closeOnInputClick: true,
+ openOnFocus: true,
+
+ timepicker: true,
+ datepicker: true,
+ weeks: false,
+
+ defaultTime: false, // use formatTime format (ex. '10:00' for formatTime: 'H:i')
+ defaultDate: false, // use formatDate format (ex new Date() or '1986/12/08' or '-1970/01/05' or '-1970/01/05')
+
+ minDate: false,
+ maxDate: false,
+ minTime: false,
+ maxTime: false,
+ minDateTime: false,
+ maxDateTime: false,
+
+ allowTimes: [],
+ opened: false,
+ initTime: true,
+ inline: false,
+ theme: '',
+ touchMovedThreshold: 5,
+
+ onSelectDate: function () {},
+ onSelectTime: function () {},
+ onChangeMonth: function () {},
+ onGetWeekOfYear: function () {},
+ onChangeYear: function () {},
+ onChangeDateTime: function () {},
+ onShow: function () {},
+ onClose: function () {},
+ onGenerate: function () {},
+
+ withoutCopyright: true,
+ inverseButton: false,
+ hours12: false,
+ next: 'xdsoft_next',
+ prev : 'xdsoft_prev',
+ dayOfWeekStart: 0,
+ parentID: 'body',
+ timeHeightInTimePicker: 25,
+ timepickerScrollbar: true,
+ todayButton: true,
+ prevButton: true,
+ nextButton: true,
+ defaultSelect: true,
+
+ scrollMonth: true,
+ scrollTime: true,
+ scrollInput: true,
+
+ lazyInit: false,
+ mask: false,
+ validateOnBlur: true,
+ allowBlank: true,
+ yearStart: 1950,
+ yearEnd: 2050,
+ monthStart: 0,
+ monthEnd: 11,
+ style: '',
+ id: '',
+ fixed: false,
+ roundTime: 'round', // ceil, floor
+ className: '',
+ weekends: [],
+ highlightedDates: [],
+ highlightedPeriods: [],
+ allowDates : [],
+ allowDateRe : null,
+ disabledDates : [],
+ disabledWeekDays: [],
+ yearOffset: 0,
+ beforeShowDay: null,
+
+ enterLikeTab: true,
+ showApplyButton: false,
+ insideParent: false,
+ };
+
+ var dateHelper = null,
+ defaultDateHelper = null,
+ globalLocaleDefault = 'en',
+ globalLocale = 'en';
+
+ var dateFormatterOptionsDefault = {
+ meridiem: ['AM', 'PM']
+ };
+
+ var initDateFormatter = function(){
+ var locale = default_options.i18n[globalLocale],
+ opts = {
+ days: locale.dayOfWeek,
+ daysShort: locale.dayOfWeekShort,
+ months: locale.months,
+ monthsShort: $.map(locale.months, function(n){ return n.substring(0, 3) })
+ };
+
+ if (typeof DateFormatter === 'function') {
+ dateHelper = defaultDateHelper = new DateFormatter({
+ dateSettings: $.extend({}, dateFormatterOptionsDefault, opts)
+ });
+ }
+ };
+
+ var dateFormatters = {
+ moment: {
+ default_options:{
+ format: 'YYYY/MM/DD HH:mm',
+ formatDate: 'YYYY/MM/DD',
+ formatTime: 'HH:mm',
+ },
+ formatter: {
+ parseDate: function (date, format) {
+ if(isFormatStandard(format)){
+ return defaultDateHelper.parseDate(date, format);
+ }
+ var d = moment(date, format);
+ return d.isValid() ? d.toDate() : false;
+ },
+
+ formatDate: function (date, format) {
+ if(isFormatStandard(format)){
+ return defaultDateHelper.formatDate(date, format);
+ }
+ return moment(date).format(format);
+ },
+
+ formatMask: function(format){
+ return format
+ .replace(/Y{4}/g, '9999')
+ .replace(/Y{2}/g, '99')
+ .replace(/M{2}/g, '19')
+ .replace(/D{2}/g, '39')
+ .replace(/H{2}/g, '29')
+ .replace(/m{2}/g, '59')
+ .replace(/s{2}/g, '59');
+ },
+ }
+ }
+ }
+
+ // for locale settings
+ $.datetimepicker = {
+ setLocale: function(locale){
+ var newLocale = default_options.i18n[locale] ? locale : globalLocaleDefault;
+ if (globalLocale !== newLocale) {
+ globalLocale = newLocale;
+ // reinit date formatter
+ initDateFormatter();
+ }
+ },
+
+ setDateFormatter: function(dateFormatter) {
+ if(typeof dateFormatter === 'string' && dateFormatters.hasOwnProperty(dateFormatter)){
+ var df = dateFormatters[dateFormatter];
+ $.extend(default_options, df.default_options);
+ dateHelper = df.formatter;
+ }
+ else {
+ dateHelper = dateFormatter;
+ }
+ },
+ };
+
+ var standardFormats = {
+ RFC_2822: 'D, d M Y H:i:s O',
+ ATOM: 'Y-m-d\TH:i:sP',
+ ISO_8601: 'Y-m-d\TH:i:sO',
+ RFC_822: 'D, d M y H:i:s O',
+ RFC_850: 'l, d-M-y H:i:s T',
+ RFC_1036: 'D, d M y H:i:s O',
+ RFC_1123: 'D, d M Y H:i:s O',
+ RSS: 'D, d M Y H:i:s O',
+ W3C: 'Y-m-d\TH:i:sP'
+ }
+
+ var isFormatStandard = function(format){
+ return Object.values(standardFormats).indexOf(format) === -1 ? false : true;
+ }
+
+ $.extend($.datetimepicker, standardFormats);
+
+ // first init date formatter
+ initDateFormatter();
+
+ // fix for ie8
+ if (!window.getComputedStyle) {
+ window.getComputedStyle = function (el) {
+ this.el = el;
+ this.getPropertyValue = function (prop) {
+ var re = /(-([a-z]))/g;
+ if (prop === 'float') {
+ prop = 'styleFloat';
+ }
+ if (re.test(prop)) {
+ prop = prop.replace(re, function (a, b, c) {
+ return c.toUpperCase();
+ });
+ }
+ return el.currentStyle[prop] || null;
+ };
+ return this;
+ };
+ }
+ if (!Array.prototype.indexOf) {
+ Array.prototype.indexOf = function (obj, start) {
+ var i, j;
+ for (i = (start || 0), j = this.length; i < j; i += 1) {
+ if (this[i] === obj) { return i; }
+ }
+ return -1;
+ };
+ }
+
+ Date.prototype.countDaysInMonth = function () {
+ return new Date(this.getFullYear(), this.getMonth() + 1, 0).getDate();
+ };
+
+ $.fn.xdsoftScroller = function (options, percent) {
+ return this.each(function () {
+ var timeboxparent = $(this),
+ pointerEventToXY = function (e) {
+ var out = {x: 0, y: 0},
+ touch;
+ if (e.type === 'touchstart' || e.type === 'touchmove' || e.type === 'touchend' || e.type === 'touchcancel') {
+ touch = e.originalEvent.touches[0] || e.originalEvent.changedTouches[0];
+ out.x = touch.clientX;
+ out.y = touch.clientY;
+ } else if (e.type === 'mousedown' || e.type === 'mouseup' || e.type === 'mousemove' || e.type === 'mouseover' || e.type === 'mouseout' || e.type === 'mouseenter' || e.type === 'mouseleave') {
+ out.x = e.clientX;
+ out.y = e.clientY;
+ }
+ return out;
+ },
+ getWheelDelta = function (e) {
+ var deltaY = 0;
+
+ if ('detail' in e) { deltaY = e.detail; }
+ if ('wheelDelta' in e) { deltaY = -e.wheelDelta / 120; }
+ if ('wheelDeltaY' in e) { deltaY = -e.wheelDeltaY / 120; }
+ if ('axis' in e && e.axis === e.HORIZONTAL_AXIS) { deltaY = 0; }
+
+ deltaY *= 10;
+
+ if ('deltaY' in e) { deltaY = e.deltaY; }
+
+ if (deltaY && e.deltaMode) {
+ if (e.deltaMode === 1) {
+ deltaY *= 40;
+ } else {
+ deltaY *= 800;
+ }
+ }
+
+ return deltaY;
+ },
+ timebox,
+ timeboxTop = 0,
+ parentHeight,
+ height,
+ scrollbar,
+ scroller,
+ maximumOffset = 100,
+ start = false,
+ startY = 0,
+ startTop = 0,
+ h1 = 0,
+ touchStart = false,
+ startTopScroll = 0,
+ calcOffset = function () {};
+
+ if (percent === 'hide') {
+ timeboxparent.find('.xdsoft_scrollbar').hide();
+ return;
+ }
+
+ if (!$(this).hasClass('xdsoft_scroller_box')) {
+ timebox = timeboxparent.children().eq(0);
+ timeboxTop = Math.abs(parseInt(timebox.css('marginTop'), 10));
+ parentHeight = timeboxparent[0].clientHeight;
+ height = timebox[0].offsetHeight;
+ scrollbar = $('<div class="xdsoft_scrollbar"></div>');
+ scroller = $('<div class="xdsoft_scroller"></div>');
+ scrollbar.append(scroller);
+
+ timeboxparent.addClass('xdsoft_scroller_box').append(scrollbar);
+ calcOffset = function calcOffset(event) {
+ var offset = pointerEventToXY(event).y - startY + startTopScroll;
+ if (offset < 0) {
+ offset = 0;
+ }
+ if (offset + scroller[0].offsetHeight > h1) {
+ offset = h1 - scroller[0].offsetHeight;
+ }
+ timeboxparent.trigger('scroll_element.xdsoft_scroller', [maximumOffset ? offset / maximumOffset : 0]);
+ };
+
+ scroller
+ .on('touchstart.xdsoft_scroller mousedown.xdsoft_scroller', function (event) {
+ if (!parentHeight) {
+ timeboxparent.trigger('resize_scroll.xdsoft_scroller', [percent]);
+ }
+
+ startY = pointerEventToXY(event).y;
+ startTopScroll = parseInt(scroller.css('marginTop'), 10);
+ h1 = scrollbar[0].offsetHeight;
+
+ if (event.type === 'mousedown' || event.type === 'touchstart') {
+ if (options.ownerDocument) {
+ $(options.ownerDocument.body).addClass('xdsoft_noselect');
+ }
+ $([options.ownerDocument.body, options.contentWindow]).on('touchend mouseup.xdsoft_scroller', function arguments_callee() {
+ $([options.ownerDocument.body, options.contentWindow]).off('touchend mouseup.xdsoft_scroller', arguments_callee)
+ .off('mousemove.xdsoft_scroller', calcOffset)
+ .removeClass('xdsoft_noselect');
+ });
+ $(options.ownerDocument.body).on('mousemove.xdsoft_scroller', calcOffset);
+ } else {
+ touchStart = true;
+ event.stopPropagation();
+ event.preventDefault();
+ }
+ })
+ .on('touchmove', function (event) {
+ if (touchStart) {
+ event.preventDefault();
+ calcOffset(event);
+ }
+ })
+ .on('touchend touchcancel', function () {
+ touchStart = false;
+ startTopScroll = 0;
+ });
+
+ timeboxparent
+ .on('scroll_element.xdsoft_scroller', function (event, percentage) {
+ if (!parentHeight) {
+ timeboxparent.trigger('resize_scroll.xdsoft_scroller', [percentage, true]);
+ }
+ percentage = percentage > 1 ? 1 : (percentage < 0 || isNaN(percentage)) ? 0 : percentage;
+ timeboxTop = parseFloat(Math.abs((timebox[0].offsetHeight - parentHeight) * percentage).toFixed(4));
+
+ scroller.css('marginTop', maximumOffset * percentage);
+ timebox.css('marginTop', -timeboxTop);
+ })
+ .on('resize_scroll.xdsoft_scroller', function (event, percentage, noTriggerScroll) {
+ var percent, sh;
+ parentHeight = timeboxparent[0].clientHeight;
+ height = timebox[0].offsetHeight;
+ percent = parentHeight / height;
+ sh = percent * scrollbar[0].offsetHeight;
+ if (percent > 1) {
+ scroller.hide();
+ } else {
+ scroller.show();
+ scroller.css('height', parseInt(sh > 10 ? sh : 10, 10));
+ maximumOffset = scrollbar[0].offsetHeight - scroller[0].offsetHeight;
+ if (noTriggerScroll !== true) {
+ timeboxparent.trigger('scroll_element.xdsoft_scroller', [percentage || timeboxTop / (height - parentHeight)]);
+ }
+ }
+ });
+
+ timeboxparent.on('mousewheel', function (event) {
+ var deltaY = getWheelDelta(event.originalEvent);
+ var top = Math.max(0, timeboxTop - deltaY);
+ timeboxparent.trigger('scroll_element.xdsoft_scroller', [top / (height - parentHeight)]);
+ event.stopPropagation();
+ return false;
+ });
+
+ timeboxparent.on('touchstart', function (event) {
+ start = pointerEventToXY(event);
+ startTop = timeboxTop;
+ });
+
+ timeboxparent.on('touchmove', function (event) {
+ if (start) {
+ event.preventDefault();
+ var coord = pointerEventToXY(event);
+ timeboxparent.trigger('scroll_element.xdsoft_scroller', [(startTop - (coord.y - start.y)) / (height - parentHeight)]);
+ }
+ });
+
+ timeboxparent.on('touchend touchcancel', function () {
+ start = false;
+ startTop = 0;
+ });
+ }
+ timeboxparent.trigger('resize_scroll.xdsoft_scroller', [percent]);
+ });
+ };
+
+ $.fn.datetimepicker = function (opt, opt2) {
+ var result = this,
+ KEY0 = 48,
+ KEY9 = 57,
+ _KEY0 = 96,
+ _KEY9 = 105,
+ CTRLKEY = 17,
+ CMDKEY = 91,
+ DEL = 46,
+ ENTER = 13,
+ ESC = 27,
+ BACKSPACE = 8,
+ ARROWLEFT = 37,
+ ARROWUP = 38,
+ ARROWRIGHT = 39,
+ ARROWDOWN = 40,
+ TAB = 9,
+ F5 = 116,
+ AKEY = 65,
+ CKEY = 67,
+ VKEY = 86,
+ ZKEY = 90,
+ YKEY = 89,
+ ctrlDown = false,
+ cmdDown = false,
+ options = ($.isPlainObject(opt) || !opt) ? $.extend(true, {}, default_options, opt) : $.extend(true, {}, default_options),
+
+ lazyInitTimer = 0,
+ createDateTimePicker,
+ destroyDateTimePicker,
+
+ lazyInit = function (input) {
+ input
+ .on('open.xdsoft focusin.xdsoft mousedown.xdsoft touchstart', function initOnActionCallback() {
+ if (input.is(':disabled') || input.data('xdsoft_datetimepicker')) {
+ return;
+ }
+ clearTimeout(lazyInitTimer);
+ lazyInitTimer = setTimeout(function () {
+
+ if (!input.data('xdsoft_datetimepicker')) {
+ createDateTimePicker(input);
+ }
+ input
+ .off('open.xdsoft focusin.xdsoft mousedown.xdsoft touchstart', initOnActionCallback)
+ .trigger('open.xdsoft');
+ }, 100);
+ });
+ };
+
+ createDateTimePicker = function (input) {
+ var datetimepicker = $('<div class="xdsoft_datetimepicker xdsoft_noselect"></div>'),
+ xdsoft_copyright = $('<div class="xdsoft_copyright"><a target="_blank" href="http://xdsoft.net/jqplugins/datetimepicker/">xdsoft.net</a></div>'),
+ datepicker = $('<div class="xdsoft_datepicker active"></div>'),
+ month_picker = $('<div class="xdsoft_monthpicker"><button type="button" class="xdsoft_prev"></button><button type="button" class="xdsoft_today_button"></button>' +
+ '<div class="xdsoft_label xdsoft_month"><span></span><i></i></div>' +
+ '<div class="xdsoft_label xdsoft_year"><span></span><i></i></div>' +
+ '<button type="button" class="xdsoft_next"></button></div>'),
+ calendar = $('<div class="xdsoft_calendar"></div>'),
+ timepicker = $('<div class="xdsoft_timepicker active"><button type="button" class="xdsoft_prev"></button><div class="xdsoft_time_box"></div><button type="button" class="xdsoft_next"></button></div>'),
+ timeboxparent = timepicker.find('.xdsoft_time_box').eq(0),
+ timebox = $('<div class="xdsoft_time_variant"></div>'),
+ applyButton = $('<button type="button" class="xdsoft_save_selected blue-gradient-button">Save Selected</button>'),
+
+ monthselect = $('<div class="xdsoft_select xdsoft_monthselect"><div></div></div>'),
+ yearselect = $('<div class="xdsoft_select xdsoft_yearselect"><div></div></div>'),
+ triggerAfterOpen = false,
+ XDSoft_datetime,
+
+ xchangeTimer,
+ timerclick,
+ current_time_index,
+ setPos,
+ timer = 0,
+ _xdsoft_datetime,
+ forEachAncestorOf;
+
+ if (options.id) {
+ datetimepicker.attr('id', options.id);
+ }
+ if (options.style) {
+ datetimepicker.attr('style', options.style);
+ }
+ if (options.weeks) {
+ datetimepicker.addClass('xdsoft_showweeks');
+ }
+ if (options.rtl) {
+ datetimepicker.addClass('xdsoft_rtl');
+ }
+
+ datetimepicker.addClass('xdsoft_' + options.theme);
+ datetimepicker.addClass(options.className);
+
+ month_picker
+ .find('.xdsoft_month span')
+ .after(monthselect);
+ month_picker
+ .find('.xdsoft_year span')
+ .after(yearselect);
+
+ month_picker
+ .find('.xdsoft_month,.xdsoft_year')
+ .on('touchstart mousedown.xdsoft', function (event) {
+ var select = $(this).find('.xdsoft_select').eq(0),
+ val = 0,
+ top = 0,
+ visible = select.is(':visible'),
+ items,
+ i;
+
+ month_picker
+ .find('.xdsoft_select')
+ .hide();
+ if (_xdsoft_datetime.currentTime) {
+ val = _xdsoft_datetime.currentTime[$(this).hasClass('xdsoft_month') ? 'getMonth' : 'getFullYear']();
+ }
+
+ select[visible ? 'hide' : 'show']();
+ for (items = select.find('div.xdsoft_option'), i = 0; i < items.length; i += 1) {
+ if (items.eq(i).data('value') === val) {
+ break;
+ } else {
+ top += items[0].offsetHeight;
+ }
+ }
+
+ select.xdsoftScroller(options, top / (select.children()[0].offsetHeight - (select[0].clientHeight)));
+ event.stopPropagation();
+ return false;
+ });
+
+ var handleTouchMoved = function (event) {
+ var evt = event.originalEvent;
+ var touchPosition = evt.touches ? evt.touches[0] : evt;
+ this.touchStartPosition = this.touchStartPosition || touchPosition;
+ var xMovement = Math.abs(this.touchStartPosition.clientX - touchPosition.clientX);
+ var yMovement = Math.abs(this.touchStartPosition.clientY - touchPosition.clientY);
+ var distance = Math.sqrt(xMovement * xMovement + yMovement * yMovement);
+ if(distance > options.touchMovedThreshold) {
+ this.touchMoved = true;
+ }
+ }
+
+ month_picker
+ .find('.xdsoft_select')
+ .xdsoftScroller(options)
+ .on('touchstart mousedown.xdsoft', function (event) {
+ var evt = event.originalEvent;
+ this.touchMoved = false;
+ this.touchStartPosition = evt.touches ? evt.touches[0] : evt;
+ event.stopPropagation();
+ event.preventDefault();
+ })
+ .on('touchmove', '.xdsoft_option', handleTouchMoved)
+ .on('touchend mousedown.xdsoft', '.xdsoft_option', function () {
+ if (!this.touchMoved) {
+ if (_xdsoft_datetime.currentTime === undefined || _xdsoft_datetime.currentTime === null) {
+ _xdsoft_datetime.currentTime = _xdsoft_datetime.now();
+ }
+
+ var year = _xdsoft_datetime.currentTime.getFullYear();
+ if (_xdsoft_datetime && _xdsoft_datetime.currentTime) {
+ _xdsoft_datetime.currentTime[$(this).parent().parent().hasClass('xdsoft_monthselect') ? 'setMonth' : 'setFullYear']($(this).data('value'));
+ }
+
+ $(this).parent().parent().hide();
+
+ datetimepicker.trigger('xchange.xdsoft');
+ if (options.onChangeMonth && $.isFunction(options.onChangeMonth)) {
+ options.onChangeMonth.call(datetimepicker, _xdsoft_datetime.currentTime, datetimepicker.data('input'));
+ }
+
+ if (year !== _xdsoft_datetime.currentTime.getFullYear() && $.isFunction(options.onChangeYear)) {
+ options.onChangeYear.call(datetimepicker, _xdsoft_datetime.currentTime, datetimepicker.data('input'));
+ }
+ }
+ });
+
+ datetimepicker.getValue = function () {
+ return _xdsoft_datetime.getCurrentTime();
+ };
+
+ datetimepicker.setOptions = function (_options) {
+ var highlightedDates = {};
+
+ options = $.extend(true, {}, options, _options);
+
+ if (_options.allowTimes && $.isArray(_options.allowTimes) && _options.allowTimes.length) {
+ options.allowTimes = $.extend(true, [], _options.allowTimes);
+ }
+
+ if (_options.weekends && $.isArray(_options.weekends) && _options.weekends.length) {
+ options.weekends = $.extend(true, [], _options.weekends);
+ }
+
+ if (_options.allowDates && $.isArray(_options.allowDates) && _options.allowDates.length) {
+ options.allowDates = $.extend(true, [], _options.allowDates);
+ }
+
+ if (_options.allowDateRe && Object.prototype.toString.call(_options.allowDateRe)==="[object String]") {
+ options.allowDateRe = new RegExp(_options.allowDateRe);
+ }
+
+ if (_options.highlightedDates && $.isArray(_options.highlightedDates) && _options.highlightedDates.length) {
+ $.each(_options.highlightedDates, function (index, value) {
+ var splitData = $.map(value.split(','), $.trim),
+ exDesc,
+ hDate = new HighlightedDate(dateHelper.parseDate(splitData[0], options.formatDate), splitData[1], splitData[2]), // date, desc, style
+ keyDate = dateHelper.formatDate(hDate.date, options.formatDate);
+ if (highlightedDates[keyDate] !== undefined) {
+ exDesc = highlightedDates[keyDate].desc;
+ if (exDesc && exDesc.length && hDate.desc && hDate.desc.length) {
+ highlightedDates[keyDate].desc = exDesc + "\n" + hDate.desc;
+ }
+ } else {
+ highlightedDates[keyDate] = hDate;
+ }
+ });
+
+ options.highlightedDates = $.extend(true, [], highlightedDates);
+ }
+
+ if (_options.highlightedPeriods && $.isArray(_options.highlightedPeriods) && _options.highlightedPeriods.length) {
+ highlightedDates = $.extend(true, [], options.highlightedDates);
+ $.each(_options.highlightedPeriods, function (index, value) {
+ var dateTest, // start date
+ dateEnd,
+ desc,
+ hDate,
+ keyDate,
+ exDesc,
+ style;
+ if ($.isArray(value)) {
+ dateTest = value[0];
+ dateEnd = value[1];
+ desc = value[2];
+ style = value[3];
+ }
+ else {
+ var splitData = $.map(value.split(','), $.trim);
+ dateTest = dateHelper.parseDate(splitData[0], options.formatDate);
+ dateEnd = dateHelper.parseDate(splitData[1], options.formatDate);
+ desc = splitData[2];
+ style = splitData[3];
+ }
+
+ while (dateTest <= dateEnd) {
+ hDate = new HighlightedDate(dateTest, desc, style);
+ keyDate = dateHelper.formatDate(dateTest, options.formatDate);
+ dateTest.setDate(dateTest.getDate() + 1);
+ if (highlightedDates[keyDate] !== undefined) {
+ exDesc = highlightedDates[keyDate].desc;
+ if (exDesc && exDesc.length && hDate.desc && hDate.desc.length) {
+ highlightedDates[keyDate].desc = exDesc + "\n" + hDate.desc;
+ }
+ } else {
+ highlightedDates[keyDate] = hDate;
+ }
+ }
+ });
+
+ options.highlightedDates = $.extend(true, [], highlightedDates);
+ }
+
+ if (_options.disabledDates && $.isArray(_options.disabledDates) && _options.disabledDates.length) {
+ options.disabledDates = $.extend(true, [], _options.disabledDates);
+ }
+
+ if (_options.disabledWeekDays && $.isArray(_options.disabledWeekDays) && _options.disabledWeekDays.length) {
+ options.disabledWeekDays = $.extend(true, [], _options.disabledWeekDays);
+ }
+
+ if ((options.open || options.opened) && (!options.inline)) {
+ input.trigger('open.xdsoft');
+ }
+
+ if (options.inline) {
+ triggerAfterOpen = true;
+ datetimepicker.addClass('xdsoft_inline');
+ input.after(datetimepicker).hide();
+ }
+
+ if (options.inverseButton) {
+ options.next = 'xdsoft_prev';
+ options.prev = 'xdsoft_next';
+ }
+
+ if (options.datepicker) {
+ datepicker.addClass('active');
+ } else {
+ datepicker.removeClass('active');
+ }
+
+ if (options.timepicker) {
+ timepicker.addClass('active');
+ } else {
+ timepicker.removeClass('active');
+ }
+
+ if (options.value) {
+ _xdsoft_datetime.setCurrentTime(options.value);
+ if (input && input.val) {
+ input.val(_xdsoft_datetime.str);
+ }
+ }
+
+ if (isNaN(options.dayOfWeekStart)) {
+ options.dayOfWeekStart = 0;
+ } else {
+ options.dayOfWeekStart = parseInt(options.dayOfWeekStart, 10) % 7;
+ }
+
+ if (!options.timepickerScrollbar) {
+ timeboxparent.xdsoftScroller(options, 'hide');
+ }
+
+ if (options.minDate && /^[\+\-](.*)$/.test(options.minDate)) {
+ options.minDate = dateHelper.formatDate(_xdsoft_datetime.strToDateTime(options.minDate), options.formatDate);
+ }
+
+ if (options.maxDate && /^[\+\-](.*)$/.test(options.maxDate)) {
+ options.maxDate = dateHelper.formatDate(_xdsoft_datetime.strToDateTime(options.maxDate), options.formatDate);
+ }
+
+ if (options.minDateTime && /^\+(.*)$/.test(options.minDateTime)) {
+ options.minDateTime = _xdsoft_datetime.strToDateTime(options.minDateTime).dateFormat(options.formatDate);
+ }
+
+ if (options.maxDateTime && /^\+(.*)$/.test(options.maxDateTime)) {
+ options.maxDateTime = _xdsoft_datetime.strToDateTime(options.maxDateTime).dateFormat(options.formatDate);
+ }
+
+ applyButton.toggle(options.showApplyButton);
+
+ month_picker
+ .find('.xdsoft_today_button')
+ .css('visibility', !options.todayButton ? 'hidden' : 'visible');
+
+ month_picker
+ .find('.' + options.prev)
+ .css('visibility', !options.prevButton ? 'hidden' : 'visible');
+
+ month_picker
+ .find('.' + options.next)
+ .css('visibility', !options.nextButton ? 'hidden' : 'visible');
+
+ setMask(options);
+
+ if (options.validateOnBlur) {
+ input
+ .off('blur.xdsoft')
+ .on('blur.xdsoft', function () {
+ if (options.allowBlank && (!$.trim($(this).val()).length ||
+ (typeof options.mask === "string" && $.trim($(this).val()) === options.mask.replace(/[0-9]/g, '_')))) {
+ $(this).val(null);
+ datetimepicker.data('xdsoft_datetime').empty();
+ } else {
+ var d = dateHelper.parseDate($(this).val(), options.format);
+ if (d) { // parseDate() may skip some invalid parts like date or time, so make it clear for user: show parsed date/time
+ $(this).val(dateHelper.formatDate(d, options.format));
+ } else {
+ var splittedHours = +([$(this).val()[0], $(this).val()[1]].join('')),
+ splittedMinutes = +([$(this).val()[2], $(this).val()[3]].join(''));
+
+ // parse the numbers as 0312 => 03:12
+ if (!options.datepicker && options.timepicker && splittedHours >= 0 && splittedHours < 24 && splittedMinutes >= 0 && splittedMinutes < 60) {
+ $(this).val([splittedHours, splittedMinutes].map(function (item) {
+ return item > 9 ? item : '0' + item;
+ }).join(':'));
+ } else {
+ $(this).val(dateHelper.formatDate(_xdsoft_datetime.now(), options.format));
+ }
+ }
+ datetimepicker.data('xdsoft_datetime').setCurrentTime($(this).val());
+ }
+
+ datetimepicker.trigger('changedatetime.xdsoft');
+ datetimepicker.trigger('close.xdsoft');
+ });
+ }
+ options.dayOfWeekStartPrev = (options.dayOfWeekStart === 0) ? 6 : options.dayOfWeekStart - 1;
+
+ datetimepicker
+ .trigger('xchange.xdsoft')
+ .trigger('afterOpen.xdsoft');
+ };
+
+ datetimepicker
+ .data('options', options)
+ .on('touchstart mousedown.xdsoft', function (event) {
+ event.stopPropagation();
+ event.preventDefault();
+ yearselect.hide();
+ monthselect.hide();
+ return false;
+ });
+
+ //scroll_element = timepicker.find('.xdsoft_time_box');
+ timeboxparent.append(timebox);
+ timeboxparent.xdsoftScroller(options);
+
+ datetimepicker.on('afterOpen.xdsoft', function () {
+ timeboxparent.xdsoftScroller(options);
+ });
+
+ datetimepicker
+ .append(datepicker)
+ .append(timepicker);
+
+ if (options.withoutCopyright !== true) {
+ datetimepicker
+ .append(xdsoft_copyright);
+ }
+
+ datepicker
+ .append(month_picker)
+ .append(calendar)
+ .append(applyButton);
+
+ if (options.insideParent) {
+ $(input).parent().append(datetimepicker);
+ } else {
+ $(options.parentID).append(datetimepicker);
+ }
+
+ XDSoft_datetime = function () {
+ var _this = this;
+ _this.now = function (norecursion) {
+ var d = new Date(),
+ date,
+ time;
+
+ if (!norecursion && options.defaultDate) {
+ date = _this.strToDateTime(options.defaultDate);
+ d.setFullYear(date.getFullYear());
+ d.setMonth(date.getMonth());
+ d.setDate(date.getDate());
+ }
+
+ d.setFullYear(d.getFullYear());
+
+ if (!norecursion && options.defaultTime) {
+ time = _this.strtotime(options.defaultTime);
+ d.setHours(time.getHours());
+ d.setMinutes(time.getMinutes());
+ d.setSeconds(time.getSeconds());
+ d.setMilliseconds(time.getMilliseconds());
+ }
+ return d;
+ };
+
+ _this.isValidDate = function (d) {
+ if (Object.prototype.toString.call(d) !== "[object Date]") {
+ return false;
+ }
+ return !isNaN(d.getTime());
+ };
+
+ _this.setCurrentTime = function (dTime, requireValidDate) {
+ if (typeof dTime === 'string') {
+ _this.currentTime = _this.strToDateTime(dTime);
+ }
+ else if (_this.isValidDate(dTime)) {
+ _this.currentTime = dTime;
+ }
+ else if (!dTime && !requireValidDate && options.allowBlank && !options.inline) {
+ _this.currentTime = null;
+ }
+ else {
+ _this.currentTime = _this.now();
+ }
+
+ datetimepicker.trigger('xchange.xdsoft');
+ };
+
+ _this.empty = function () {
+ _this.currentTime = null;
+ };
+
+ _this.getCurrentTime = function () {
+ return _this.currentTime;
+ };
+
+ _this.nextMonth = function () {
+
+ if (_this.currentTime === undefined || _this.currentTime === null) {
+ _this.currentTime = _this.now();
+ }
+
+ var month = _this.currentTime.getMonth() + 1,
+ year;
+ if (month === 12) {
+ _this.currentTime.setFullYear(_this.currentTime.getFullYear() + 1);
+ month = 0;
+ }
+
+ year = _this.currentTime.getFullYear();
+
+ _this.currentTime.setDate(
+ Math.min(
+ new Date(_this.currentTime.getFullYear(), month + 1, 0).getDate(),
+ _this.currentTime.getDate()
+ )
+ );
+ _this.currentTime.setMonth(month);
+
+ if (options.onChangeMonth && $.isFunction(options.onChangeMonth)) {
+ options.onChangeMonth.call(datetimepicker, _xdsoft_datetime.currentTime, datetimepicker.data('input'));
+ }
+
+ if (year !== _this.currentTime.getFullYear() && $.isFunction(options.onChangeYear)) {
+ options.onChangeYear.call(datetimepicker, _xdsoft_datetime.currentTime, datetimepicker.data('input'));
+ }
+
+ datetimepicker.trigger('xchange.xdsoft');
+ return month;
+ };
+
+ _this.prevMonth = function () {
+
+ if (_this.currentTime === undefined || _this.currentTime === null) {
+ _this.currentTime = _this.now();
+ }
+
+ var month = _this.currentTime.getMonth() - 1;
+ if (month === -1) {
+ _this.currentTime.setFullYear(_this.currentTime.getFullYear() - 1);
+ month = 11;
+ }
+ _this.currentTime.setDate(
+ Math.min(
+ new Date(_this.currentTime.getFullYear(), month + 1, 0).getDate(),
+ _this.currentTime.getDate()
+ )
+ );
+ _this.currentTime.setMonth(month);
+ if (options.onChangeMonth && $.isFunction(options.onChangeMonth)) {
+ options.onChangeMonth.call(datetimepicker, _xdsoft_datetime.currentTime, datetimepicker.data('input'));
+ }
+ datetimepicker.trigger('xchange.xdsoft');
+ return month;
+ };
+
+ _this.getWeekOfYear = function (datetime) {
+ if (options.onGetWeekOfYear && $.isFunction(options.onGetWeekOfYear)) {
+ var week = options.onGetWeekOfYear.call(datetimepicker, datetime);
+ if (typeof week !== 'undefined') {
+ return week;
+ }
+ }
+ var onejan = new Date(datetime.getFullYear(), 0, 1);
+
+ //First week of the year is th one with the first Thursday according to ISO8601
+ if (onejan.getDay() !== 4) {
+ onejan.setMonth(0, 1 + ((4 - onejan.getDay()+ 7) % 7));
+ }
+
+ return Math.ceil((((datetime - onejan) / 86400000) + onejan.getDay() + 1) / 7);
+ };
+
+ _this.strToDateTime = function (sDateTime) {
+ var tmpDate = [], timeOffset, currentTime;
+
+ if (sDateTime && sDateTime instanceof Date && _this.isValidDate(sDateTime)) {
+ return sDateTime;
+ }
+
+ tmpDate = /^([+-]{1})(.*)$/.exec(sDateTime);
+
+ if (tmpDate) {
+ tmpDate[2] = dateHelper.parseDate(tmpDate[2], options.formatDate);
+ }
+
+ if (tmpDate && tmpDate[2]) {
+ timeOffset = tmpDate[2].getTime() - (tmpDate[2].getTimezoneOffset()) * 60000;
+ currentTime = new Date((_this.now(true)).getTime() + parseInt(tmpDate[1] + '1', 10) * timeOffset);
+ } else {
+ currentTime = sDateTime ? dateHelper.parseDate(sDateTime, options.format) : _this.now();
+ }
+
+ if (!_this.isValidDate(currentTime)) {
+ currentTime = _this.now();
+ }
+
+ return currentTime;
+ };
+
+ _this.strToDate = function (sDate) {
+ if (sDate && sDate instanceof Date && _this.isValidDate(sDate)) {
+ return sDate;
+ }
+
+ var currentTime = sDate ? dateHelper.parseDate(sDate, options.formatDate) : _this.now(true);
+ if (!_this.isValidDate(currentTime)) {
+ currentTime = _this.now(true);
+ }
+ return currentTime;
+ };
+
+ _this.strtotime = function (sTime) {
+ if (sTime && sTime instanceof Date && _this.isValidDate(sTime)) {
+ return sTime;
+ }
+ var currentTime = sTime ? dateHelper.parseDate(sTime, options.formatTime) : _this.now(true);
+ if (!_this.isValidDate(currentTime)) {
+ currentTime = _this.now(true);
+ }
+ return currentTime;
+ };
+
+ _this.str = function () {
+ var format = options.format;
+ if (options.yearOffset) {
+ format = format.replace('Y', _this.currentTime.getFullYear() + options.yearOffset);
+ format = format.replace('y', String(_this.currentTime.getFullYear() + options.yearOffset).substring(2, 4));
+ }
+ return dateHelper.formatDate(_this.currentTime, format);
+ };
+ _this.currentTime = this.now();
+ };
+
+ _xdsoft_datetime = new XDSoft_datetime();
+
+ applyButton.on('touchend click', function (e) {//pathbrite
+ e.preventDefault();
+ datetimepicker.data('changed', true);
+ _xdsoft_datetime.setCurrentTime(getCurrentValue());
+ input.val(_xdsoft_datetime.str());
+ datetimepicker.trigger('close.xdsoft');
+ });
+ month_picker
+ .find('.xdsoft_today_button')
+ .on('touchend mousedown.xdsoft', function () {
+ datetimepicker.data('changed', true);
+ _xdsoft_datetime.setCurrentTime(0, true);
+ datetimepicker.trigger('afterOpen.xdsoft');
+ }).on('dblclick.xdsoft', function () {
+ var currentDate = _xdsoft_datetime.getCurrentTime(), minDate, maxDate;
+ currentDate = new Date(currentDate.getFullYear(), currentDate.getMonth(), currentDate.getDate());
+ minDate = _xdsoft_datetime.strToDate(options.minDate);
+ minDate = new Date(minDate.getFullYear(), minDate.getMonth(), minDate.getDate());
+ if (currentDate < minDate) {
+ return;
+ }
+ maxDate = _xdsoft_datetime.strToDate(options.maxDate);
+ maxDate = new Date(maxDate.getFullYear(), maxDate.getMonth(), maxDate.getDate());
+ if (currentDate > maxDate) {
+ return;
+ }
+ input.val(_xdsoft_datetime.str());
+ input.trigger('change');
+ datetimepicker.trigger('close.xdsoft');
+ });
+ month_picker
+ .find('.xdsoft_prev,.xdsoft_next')
+ .on('touchend mousedown.xdsoft', function () {
+ var $this = $(this),
+ timer = 0,
+ stop = false;
+
+ (function arguments_callee1(v) {
+ if ($this.hasClass(options.next)) {
+ _xdsoft_datetime.nextMonth();
+ } else if ($this.hasClass(options.prev)) {
+ _xdsoft_datetime.prevMonth();
+ }
+ if (options.monthChangeSpinner) {
+ if (!stop) {
+ timer = setTimeout(arguments_callee1, v || 100);
+ }
+ }
+ }(500));
+
+ $([options.ownerDocument.body, options.contentWindow]).on('touchend mouseup.xdsoft', function arguments_callee2() {
+ clearTimeout(timer);
+ stop = true;
+ $([options.ownerDocument.body, options.contentWindow]).off('touchend mouseup.xdsoft', arguments_callee2);
+ });
+ });
+
+ timepicker
+ .find('.xdsoft_prev,.xdsoft_next')
+ .on('touchend mousedown.xdsoft', function () {
+ var $this = $(this),
+ timer = 0,
+ stop = false,
+ period = 110;
+ (function arguments_callee4(v) {
+ var pheight = timeboxparent[0].clientHeight,
+ height = timebox[0].offsetHeight,
+ top = Math.abs(parseInt(timebox.css('marginTop'), 10));
+ /**
+ * Fixes a bug which happens if:
+ * top is < the timeHeightInTimePicker, it will cause the up arrow to stop working
+ * same for the down arrow if it's not exactly on the pixel
+ */
+ if (top < options.timeHeightInTimePicker) {
+ top = options.timeHeightInTimePicker;
+ } else if ($this.hasClass(options.next) && (height - pheight) < top) {
+ timebox.css('marginTop', '-' + height + 'px');
+ }
+
+ if ($this.hasClass(options.next) && (height - pheight) > top) {
+ timebox.css('marginTop', '-' + (top + options.timeHeightInTimePicker) + 'px');
+ } else if ($this.hasClass(options.prev) && top - options.timeHeightInTimePicker >= 0) {
+ timebox.css('marginTop', '-' + (top - options.timeHeightInTimePicker) + 'px');
+ }
+ /**
+ * Fixed bug:
+ * When using css3 transition, it will cause a bug that you cannot scroll the timepicker list.
+ * The reason is that the transition-duration time, if you set it to 0, all things fine, otherwise, this
+ * would cause a bug when you use jquery.css method.
+ * Let's say: * { transition: all .5s ease; }
+ * jquery timebox.css('marginTop') will return the original value which is before you clicking the next/prev button,
+ * meanwhile the timebox[0].style.marginTop will return the right value which is after you clicking the
+ * next/prev button.
+ *
+ * What we should do:
+ * Replace timebox.css('marginTop') with timebox[0].style.marginTop.
+ */
+ timeboxparent.trigger('scroll_element.xdsoft_scroller', [Math.abs(parseInt(timebox[0].style.marginTop, 10) / (height - pheight))]);
+ period = (period > 10) ? 10 : period - 10;
+ if (!stop) {
+ timer = setTimeout(arguments_callee4, v || period);
+ }
+ }(500));
+ $([options.ownerDocument.body, options.contentWindow]).on('touchend mouseup.xdsoft', function arguments_callee5() {
+ clearTimeout(timer);
+ stop = true;
+ $([options.ownerDocument.body, options.contentWindow])
+ .off('touchend mouseup.xdsoft', arguments_callee5);
+ });
+ });
+
+ xchangeTimer = 0;
+ // base handler - generating a calendar and timepicker
+ datetimepicker
+ .on('xchange.xdsoft', function (event) {
+ clearTimeout(xchangeTimer);
+ xchangeTimer = setTimeout(function () {
+
+ if (_xdsoft_datetime.currentTime === undefined || _xdsoft_datetime.currentTime === null || isNaN(_xdsoft_datetime.currentTime.getTime())) {
+ _xdsoft_datetime.currentTime = _xdsoft_datetime.now();
+ }
+
+ var table = '',
+ start = new Date(_xdsoft_datetime.currentTime.getFullYear(), _xdsoft_datetime.currentTime.getMonth(), 1, 12, 0, 0),
+ i = 0,
+ j,
+ today = _xdsoft_datetime.now(),
+ maxDate = false,
+ minDate = false,
+ minDateTime = false,
+ maxDateTime = false,
+ hDate,
+ day,
+ d,
+ y,
+ m,
+ w,
+ classes = [],
+ customDateSettings,
+ newRow = true,
+ time = '',
+ h,
+ line_time,
+ description;
+
+ while (start.getDay() !== options.dayOfWeekStart) {
+ start.setDate(start.getDate() - 1);
+ }
+
+ table += '<table><thead><tr>';
+
+ if (options.weeks) {
+ table += '<th></th>';
+ }
+
+ for (j = 0; j < 7; j += 1) {
+ table += '<th>' + options.i18n[globalLocale].dayOfWeekShort[(j + options.dayOfWeekStart) % 7] + '</th>';
+ }
+
+ table += '</tr></thead>';
+ table += '<tbody>';
+
+ if (options.maxDate !== false) {
+ maxDate = _xdsoft_datetime.strToDate(options.maxDate);
+ maxDate = new Date(maxDate.getFullYear(), maxDate.getMonth(), maxDate.getDate(), 23, 59, 59, 999);
+ }
+
+ if (options.minDate !== false) {
+ minDate = _xdsoft_datetime.strToDate(options.minDate);
+ minDate = new Date(minDate.getFullYear(), minDate.getMonth(), minDate.getDate());
+ }
+
+ if (options.minDateTime !== false) {
+ minDateTime = _xdsoft_datetime.strToDate(options.minDateTime);
+ minDateTime = new Date(minDateTime.getFullYear(), minDateTime.getMonth(), minDateTime.getDate(), minDateTime.getHours(), minDateTime.getMinutes(), minDateTime.getSeconds());
+ }
+
+ if (options.maxDateTime !== false) {
+ maxDateTime = _xdsoft_datetime.strToDate(options.maxDateTime);
+ maxDateTime = new Date(maxDateTime.getFullYear(), maxDateTime.getMonth(), maxDateTime.getDate(), maxDateTime.getHours(), maxDateTime.getMinutes(), maxDateTime.getSeconds());
+ }
+
+ var maxDateTimeDay;
+ if (maxDateTime !== false) {
+ maxDateTimeDay = ((maxDateTime.getFullYear() * 12) + maxDateTime.getMonth()) * 31 + maxDateTime.getDate();
+ }
+
+ while (i < _xdsoft_datetime.currentTime.countDaysInMonth() || start.getDay() !== options.dayOfWeekStart || _xdsoft_datetime.currentTime.getMonth() === start.getMonth()) {
+ classes = [];
+ i += 1;
+
+ day = start.getDay();
+ d = start.getDate();
+ y = start.getFullYear();
+ m = start.getMonth();
+ w = _xdsoft_datetime.getWeekOfYear(start);
+ description = '';
+
+ classes.push('xdsoft_date');
+
+ if (options.beforeShowDay && $.isFunction(options.beforeShowDay.call)) {
+ customDateSettings = options.beforeShowDay.call(datetimepicker, start);
+ } else {
+ customDateSettings = null;
+ }
+
+ if(options.allowDateRe && Object.prototype.toString.call(options.allowDateRe) === "[object RegExp]"){
+ if(!options.allowDateRe.test(dateHelper.formatDate(start, options.formatDate))){
+ classes.push('xdsoft_disabled');
+ }
+ }
+
+ if(options.allowDates && options.allowDates.length>0){
+ if(options.allowDates.indexOf(dateHelper.formatDate(start, options.formatDate)) === -1){
+ classes.push('xdsoft_disabled');
+ }
+ }
+
+ var currentDay = ((start.getFullYear() * 12) + start.getMonth()) * 31 + start.getDate();
+ if ((maxDate !== false && start > maxDate) || (minDateTime !== false && start < minDateTime) || (minDate !== false && start < minDate) || (maxDateTime !== false && currentDay > maxDateTimeDay) || (customDateSettings && customDateSettings[0] === false)) {
+ classes.push('xdsoft_disabled');
+ }
+
+ if (options.disabledDates.indexOf(dateHelper.formatDate(start, options.formatDate)) !== -1) {
+ classes.push('xdsoft_disabled');
+ }
+
+ if (options.disabledWeekDays.indexOf(day) !== -1) {
+ classes.push('xdsoft_disabled');
+ }
+
+ if (input.is('[disabled]')) {
+ classes.push('xdsoft_disabled');
+ }
+
+ if (customDateSettings && customDateSettings[1] !== "") {
+ classes.push(customDateSettings[1]);
+ }
+
+ if (_xdsoft_datetime.currentTime.getMonth() !== m) {
+ classes.push('xdsoft_other_month');
+ }
+
+ if ((options.defaultSelect || datetimepicker.data('changed')) && dateHelper.formatDate(_xdsoft_datetime.currentTime, options.formatDate) === dateHelper.formatDate(start, options.formatDate)) {
+ classes.push('xdsoft_current');
+ }
+
+ if (dateHelper.formatDate(today, options.formatDate) === dateHelper.formatDate(start, options.formatDate)) {
+ classes.push('xdsoft_today');
+ }
+
+ if (start.getDay() === 0 || start.getDay() === 6 || options.weekends.indexOf(dateHelper.formatDate(start, options.formatDate)) !== -1) {
+ classes.push('xdsoft_weekend');
+ }
+
+ if (options.highlightedDates[dateHelper.formatDate(start, options.formatDate)] !== undefined) {
+ hDate = options.highlightedDates[dateHelper.formatDate(start, options.formatDate)];
+ classes.push(hDate.style === undefined ? 'xdsoft_highlighted_default' : hDate.style);
+ description = hDate.desc === undefined ? '' : hDate.desc;
+ }
+
+ if (options.beforeShowDay && $.isFunction(options.beforeShowDay)) {
+ classes.push(options.beforeShowDay(start));
+ }
+
+ if (newRow) {
+ table += '<tr>';
+ newRow = false;
+ if (options.weeks) {
+ table += '<th>' + w + '</th>';
+ }
+ }
+
+ table += '<td data-date="' + d + '" data-month="' + m + '" data-year="' + y + '"' + ' class="xdsoft_date xdsoft_day_of_week' + start.getDay() + ' ' + classes.join(' ') + '" title="' + description + '">' +
+ '<div>' + d + '</div>' +
+ '</td>';
+
+ if (start.getDay() === options.dayOfWeekStartPrev) {
+ table += '</tr>';
+ newRow = true;
+ }
+
+ start.setDate(d + 1);
+ }
+ table += '</tbody></table>';
+
+ calendar.html(table);
+
+ month_picker.find('.xdsoft_label span').eq(0).text(options.i18n[globalLocale].months[_xdsoft_datetime.currentTime.getMonth()]);
+ month_picker.find('.xdsoft_label span').eq(1).text(_xdsoft_datetime.currentTime.getFullYear() + options.yearOffset);
+
+ // generate timebox
+ time = '';
+ h = '';
+ m = '';
+
+ var minTimeMinutesOfDay = 0;
+ if (options.minTime !== false) {
+ var t = _xdsoft_datetime.strtotime(options.minTime);
+ minTimeMinutesOfDay = 60 * t.getHours() + t.getMinutes();
+ }
+ var maxTimeMinutesOfDay = 24 * 60;
+ if (options.maxTime !== false) {
+ var t = _xdsoft_datetime.strtotime(options.maxTime);
+ maxTimeMinutesOfDay = 60 * t.getHours() + t.getMinutes();
+ }
+
+ if (options.minDateTime !== false) {
+ var t = _xdsoft_datetime.strToDateTime(options.minDateTime);
+ var currentDayIsMinDateTimeDay = dateHelper.formatDate(_xdsoft_datetime.currentTime, options.formatDate) === dateHelper.formatDate(t, options.formatDate);
+ if (currentDayIsMinDateTimeDay) {
+ var m = 60 * t.getHours() + t.getMinutes();
+ if (m > minTimeMinutesOfDay) minTimeMinutesOfDay = m;
+ }
+ }
+
+ if (options.maxDateTime !== false) {
+ var t = _xdsoft_datetime.strToDateTime(options.maxDateTime);
+ var currentDayIsMaxDateTimeDay = dateHelper.formatDate(_xdsoft_datetime.currentTime, options.formatDate) === dateHelper.formatDate(t, options.formatDate);
+ if (currentDayIsMaxDateTimeDay) {
+ var m = 60 * t.getHours() + t.getMinutes();
+ if (m < maxTimeMinutesOfDay) maxTimeMinutesOfDay = m;
+ }
+ }
+
+ line_time = function line_time(h, m) {
+ var now = _xdsoft_datetime.now(), current_time,
+ isALlowTimesInit = options.allowTimes && $.isArray(options.allowTimes) && options.allowTimes.length;
+ now.setHours(h);
+ h = parseInt(now.getHours(), 10);
+ now.setMinutes(m);
+ m = parseInt(now.getMinutes(), 10);
+ classes = [];
+ var currentMinutesOfDay = 60 * h + m;
+ if (input.is('[disabled]') || (currentMinutesOfDay >= maxTimeMinutesOfDay) || (currentMinutesOfDay < minTimeMinutesOfDay)) {
+ classes.push('xdsoft_disabled');
+ }
+
+ current_time = new Date(_xdsoft_datetime.currentTime);
+ current_time.setHours(parseInt(_xdsoft_datetime.currentTime.getHours(), 10));
+
+ if (!isALlowTimesInit) {
+ current_time.setMinutes(Math[options.roundTime](_xdsoft_datetime.currentTime.getMinutes() / options.step) * options.step);
+ }
+
+ if ((options.initTime || options.defaultSelect || datetimepicker.data('changed')) && current_time.getHours() === parseInt(h, 10) && ((!isALlowTimesInit && options.step > 59) || current_time.getMinutes() === parseInt(m, 10))) {
+ if (options.defaultSelect || datetimepicker.data('changed')) {
+ classes.push('xdsoft_current');
+ } else if (options.initTime) {
+ classes.push('xdsoft_init_time');
+ }
+ }
+ if (parseInt(today.getHours(), 10) === parseInt(h, 10) && parseInt(today.getMinutes(), 10) === parseInt(m, 10)) {
+ classes.push('xdsoft_today');
+ }
+ time += '<div class="xdsoft_time ' + classes.join(' ') + '" data-hour="' + h + '" data-minute="' + m + '">' + dateHelper.formatDate(now, options.formatTime) + '</div>';
+ };
+
+ if (!options.allowTimes || !$.isArray(options.allowTimes) || !options.allowTimes.length) {
+ for (i = 0, j = 0; i < (options.hours12 ? 12 : 24); i += 1) {
+ for (j = 0; j < 60; j += options.step) {
+ var currentMinutesOfDay = i * 60 + j;
+ if (currentMinutesOfDay < minTimeMinutesOfDay) continue;
+ if (currentMinutesOfDay >= maxTimeMinutesOfDay) continue;
+ h = (i < 10 ? '0' : '') + i;
+ m = (j < 10 ? '0' : '') + j;
+ line_time(h, m);
+ }
+ }
+ } else {
+ for (i = 0; i < options.allowTimes.length; i += 1) {
+ h = _xdsoft_datetime.strtotime(options.allowTimes[i]).getHours();
+ m = _xdsoft_datetime.strtotime(options.allowTimes[i]).getMinutes();
+ line_time(h, m);
+ }
+ }
+
+ timebox.html(time);
+
+ opt = '';
+
+ for (i = parseInt(options.yearStart, 10); i <= parseInt(options.yearEnd, 10); i += 1) {
+ opt += '<div class="xdsoft_option ' + (_xdsoft_datetime.currentTime.getFullYear() === i ? 'xdsoft_current' : '') + '" data-value="' + i + '">' + (i + options.yearOffset) + '</div>';
+ }
+ yearselect.children().eq(0)
+ .html(opt);
+
+ for (i = parseInt(options.monthStart, 10), opt = ''; i <= parseInt(options.monthEnd, 10); i += 1) {
+ opt += '<div class="xdsoft_option ' + (_xdsoft_datetime.currentTime.getMonth() === i ? 'xdsoft_current' : '') + '" data-value="' + i + '">' + options.i18n[globalLocale].months[i] + '</div>';
+ }
+ monthselect.children().eq(0).html(opt);
+ $(datetimepicker)
+ .trigger('generate.xdsoft');
+ }, 10);
+ event.stopPropagation();
+ })
+ .on('afterOpen.xdsoft', function () {
+ if (options.timepicker) {
+ var classType, pheight, height, top;
+ if (timebox.find('.xdsoft_current').length) {
+ classType = '.xdsoft_current';
+ } else if (timebox.find('.xdsoft_init_time').length) {
+ classType = '.xdsoft_init_time';
+ }
+ if (classType) {
+ pheight = timeboxparent[0].clientHeight;
+ height = timebox[0].offsetHeight;
+ top = timebox.find(classType).index() * options.timeHeightInTimePicker + 1;
+ if ((height - pheight) < top) {
+ top = height - pheight;
+ }
+ timeboxparent.trigger('scroll_element.xdsoft_scroller', [parseInt(top, 10) / (height - pheight)]);
+ } else {
+ timeboxparent.trigger('scroll_element.xdsoft_scroller', [0]);
+ }
+ }
+ });
+
+ timerclick = 0;
+ calendar
+ .on('touchend click.xdsoft', 'td', function (xdevent) {
+ xdevent.stopPropagation(); // Prevents closing of Pop-ups, Modals and Flyouts in Bootstrap
+ timerclick += 1;
+ var $this = $(this),
+ currentTime = _xdsoft_datetime.currentTime;
+
+ if (currentTime === undefined || currentTime === null) {
+ _xdsoft_datetime.currentTime = _xdsoft_datetime.now();
+ currentTime = _xdsoft_datetime.currentTime;
+ }
+
+ if ($this.hasClass('xdsoft_disabled')) {
+ return false;
+ }
+
+ currentTime.setDate(1);
+ currentTime.setFullYear($this.data('year'));
+ currentTime.setMonth($this.data('month'));
+ currentTime.setDate($this.data('date'));
+
+ datetimepicker.trigger('select.xdsoft', [currentTime]);
+
+ input.val(_xdsoft_datetime.str());
+
+ if (options.onSelectDate && $.isFunction(options.onSelectDate)) {
+ options.onSelectDate.call(datetimepicker, _xdsoft_datetime.currentTime, datetimepicker.data('input'), xdevent);
+ }
+
+ datetimepicker.data('changed', true);
+ datetimepicker.trigger('xchange.xdsoft');
+ datetimepicker.trigger('changedatetime.xdsoft');
+ if ((timerclick > 1 || (options.closeOnDateSelect === true || (options.closeOnDateSelect === false && !options.timepicker))) && !options.inline) {
+ datetimepicker.trigger('close.xdsoft');
+ }
+ setTimeout(function () {
+ timerclick = 0;
+ }, 200);
+ });
+
+ timebox
+ .on('touchstart', 'div', function (xdevent) {
+ this.touchMoved = false;
+ })
+ .on('touchmove', 'div', handleTouchMoved)
+ .on('touchend click.xdsoft', 'div', function (xdevent) {
+ if (!this.touchMoved) {
+ xdevent.stopPropagation();
+ var $this = $(this),
+ currentTime = _xdsoft_datetime.currentTime;
+
+ if (currentTime === undefined || currentTime === null) {
+ _xdsoft_datetime.currentTime = _xdsoft_datetime.now();
+ currentTime = _xdsoft_datetime.currentTime;
+ }
+
+ if ($this.hasClass('xdsoft_disabled')) {
+ return false;
+ }
+ currentTime.setHours($this.data('hour'));
+ currentTime.setMinutes($this.data('minute'));
+ datetimepicker.trigger('select.xdsoft', [currentTime]);
+
+ datetimepicker.data('input').val(_xdsoft_datetime.str());
+
+ if (options.onSelectTime && $.isFunction(options.onSelectTime)) {
+ options.onSelectTime.call(datetimepicker, _xdsoft_datetime.currentTime, datetimepicker.data('input'), xdevent);
+ }
+ datetimepicker.data('changed', true);
+ datetimepicker.trigger('xchange.xdsoft');
+ datetimepicker.trigger('changedatetime.xdsoft');
+ if (options.inline !== true && options.closeOnTimeSelect === true) {
+ datetimepicker.trigger('close.xdsoft');
+ }
+ }
+ });
+
+ datepicker
+ .on('mousewheel.xdsoft', function (event) {
+ if (!options.scrollMonth) {
+ return true;
+ }
+ if (event.deltaY < 0) {
+ _xdsoft_datetime.nextMonth();
+ } else {
+ _xdsoft_datetime.prevMonth();
+ }
+ return false;
+ });
+
+ input
+ .on('mousewheel.xdsoft', function (event) {
+ if (!options.scrollInput) {
+ return true;
+ }
+ if (!options.datepicker && options.timepicker) {
+ current_time_index = timebox.find('.xdsoft_current').length ? timebox.find('.xdsoft_current').eq(0).index() : 0;
+ if (current_time_index + event.deltaY >= 0 && current_time_index + event.deltaY < timebox.children().length) {
+ current_time_index += event.deltaY;
+ }
+ if (timebox.children().eq(current_time_index).length) {
+ timebox.children().eq(current_time_index).trigger('mousedown');
+ }
+ return false;
+ }
+ if (options.datepicker && !options.timepicker) {
+ datepicker.trigger(event, [event.deltaY, event.deltaX, event.deltaY]);
+ if (input.val) {
+ input.val(_xdsoft_datetime.str());
+ }
+ datetimepicker.trigger('changedatetime.xdsoft');
+ return false;
+ }
+ });
+
+ datetimepicker
+ .on('changedatetime.xdsoft', function (event) {
+ if (options.onChangeDateTime && $.isFunction(options.onChangeDateTime)) {
+ var $input = datetimepicker.data('input');
+ options.onChangeDateTime.call(datetimepicker, _xdsoft_datetime.currentTime, $input, event);
+ delete options.value;
+ $input.trigger('change');
+ }
+ })
+ .on('generate.xdsoft', function () {
+ if (options.onGenerate && $.isFunction(options.onGenerate)) {
+ options.onGenerate.call(datetimepicker, _xdsoft_datetime.currentTime, datetimepicker.data('input'));
+ }
+ if (triggerAfterOpen) {
+ datetimepicker.trigger('afterOpen.xdsoft');
+ triggerAfterOpen = false;
+ }
+ })
+ .on('click.xdsoft', function (xdevent) {
+ xdevent.stopPropagation();
+ });
+
+ current_time_index = 0;
+
+ /**
+ * Runs the callback for each of the specified node's ancestors.
+ *
+ * Return FALSE from the callback to stop ascending.
+ *
+ * @param {DOMNode} node
+ * @param {Function} callback
+ * @returns {undefined}
+ */
+ forEachAncestorOf = function (node, callback) {
+ do {
+ node = node.parentNode;
+
+ if (!node || callback(node) === false) {
+ break;
+ }
+ } while (node.nodeName !== 'HTML');
+ };
+
+ /**
+ * Sets the position of the picker.
+ *
+ * @returns {undefined}
+ */
+ setPos = function () {
+ var dateInputOffset,
+ dateInputElem,
+ verticalPosition,
+ left,
+ position,
+ datetimepickerElem,
+ dateInputHasFixedAncestor,
+ $dateInput,
+ windowWidth,
+ verticalAnchorEdge,
+ datetimepickerCss,
+ windowHeight,
+ windowScrollTop;
+
+ $dateInput = datetimepicker.data('input');
+ dateInputOffset = $dateInput.offset();
+ dateInputElem = $dateInput[0];
+
+ verticalAnchorEdge = 'top';
+ verticalPosition = (dateInputOffset.top + dateInputElem.offsetHeight) - 1;
+ left = dateInputOffset.left;
+ position = "absolute";
+
+ windowWidth = $(options.contentWindow).width();
+ windowHeight = $(options.contentWindow).height();
+ windowScrollTop = $(options.contentWindow).scrollTop();
+
+ if ((options.ownerDocument.documentElement.clientWidth - dateInputOffset.left) < datepicker.parent().outerWidth(true)) {
+ var diff = datepicker.parent().outerWidth(true) - dateInputElem.offsetWidth;
+ left = left - diff;
+ }
+
+ if ($dateInput.parent().css('direction') === 'rtl') {
+ left -= (datetimepicker.outerWidth() - $dateInput.outerWidth());
+ }
+
+ if (options.fixed) {
+ verticalPosition -= windowScrollTop;
+ left -= $(options.contentWindow).scrollLeft();
+ position = "fixed";
+ } else {
+ dateInputHasFixedAncestor = false;
+
+ forEachAncestorOf(dateInputElem, function (ancestorNode) {
+ if (ancestorNode === null) {
+ return false;
+ }
+
+ if (options.contentWindow.getComputedStyle(ancestorNode).getPropertyValue('position') === 'fixed') {
+ dateInputHasFixedAncestor = true;
+ return false;
+ }
+ });
+
+ if (dateInputHasFixedAncestor && !options.insideParent) {
+ position = 'fixed';
+
+ //If the picker won't fit entirely within the viewport then display it above the date input.
+ if (verticalPosition + datetimepicker.outerHeight() > windowHeight + windowScrollTop) {
+ verticalAnchorEdge = 'bottom';
+ verticalPosition = (windowHeight + windowScrollTop) - dateInputOffset.top;
+ } else {
+ verticalPosition -= windowScrollTop;
+ }
+ } else {
+ if (verticalPosition + datetimepicker[0].offsetHeight > windowHeight + windowScrollTop) {
+ verticalPosition = dateInputOffset.top - datetimepicker[0].offsetHeight + 1;
+ }
+ }
+
+ if (verticalPosition < 0) {
+ verticalPosition = 0;
+ }
+
+ if (left + dateInputElem.offsetWidth > windowWidth) {
+ left = windowWidth - dateInputElem.offsetWidth;
+ }
+ }
+
+ datetimepickerElem = datetimepicker[0];
+
+ forEachAncestorOf(datetimepickerElem, function (ancestorNode) {
+ var ancestorNodePosition;
+
+ ancestorNodePosition = options.contentWindow.getComputedStyle(ancestorNode).getPropertyValue('position');
+
+ if (ancestorNodePosition === 'relative' && windowWidth >= ancestorNode.offsetWidth) {
+ left = left - ((windowWidth - ancestorNode.offsetWidth) / 2);
+ return false;
+ }
+ });
+
+ datetimepickerCss = {
+ position: position,
+ left: options.insideParent ? dateInputElem.offsetLeft : left,
+ top: '', //Initialize to prevent previous values interfering with new ones.
+ bottom: '' //Initialize to prevent previous values interfering with new ones.
+ };
+
+ if (options.insideParent) {
+ datetimepickerCss[verticalAnchorEdge] = dateInputElem.offsetTop + dateInputElem.offsetHeight;
+ } else {
+ datetimepickerCss[verticalAnchorEdge] = verticalPosition;
+ }
+
+ datetimepicker.css(datetimepickerCss);
+ };
+
+ datetimepicker
+ .on('open.xdsoft', function (event) {
+ var onShow = true;
+ if (options.onShow && $.isFunction(options.onShow)) {
+ onShow = options.onShow.call(datetimepicker, _xdsoft_datetime.currentTime, datetimepicker.data('input'), event);
+ }
+ if (onShow !== false) {
+ datetimepicker.show();
+ setPos();
+ $(options.contentWindow)
+ .off('resize.xdsoft', setPos)
+ .on('resize.xdsoft', setPos);
+
+ if (options.closeOnWithoutClick) {
+ $([options.ownerDocument.body, options.contentWindow]).on('touchstart mousedown.xdsoft', function arguments_callee6() {
+ datetimepicker.trigger('close.xdsoft');
+ $([options.ownerDocument.body, options.contentWindow]).off('touchstart mousedown.xdsoft', arguments_callee6);
+ });
+ }
+ }
+ })
+ .on('close.xdsoft', function (event) {
+ var onClose = true;
+ month_picker
+ .find('.xdsoft_month,.xdsoft_year')
+ .find('.xdsoft_select')
+ .hide();
+ if (options.onClose && $.isFunction(options.onClose)) {
+ onClose = options.onClose.call(datetimepicker, _xdsoft_datetime.currentTime, datetimepicker.data('input'), event);
+ }
+ if (onClose !== false && !options.opened && !options.inline) {
+ datetimepicker.hide();
+ }
+ event.stopPropagation();
+ })
+ .on('toggle.xdsoft', function () {
+ if (datetimepicker.is(':visible')) {
+ datetimepicker.trigger('close.xdsoft');
+ } else {
+ datetimepicker.trigger('open.xdsoft');
+ }
+ })
+ .data('input', input);
+
+ timer = 0;
+
+ datetimepicker.data('xdsoft_datetime', _xdsoft_datetime);
+ datetimepicker.setOptions(options);
+
+ function getCurrentValue() {
+ var ct = false, time;
+
+ if (options.startDate) {
+ ct = _xdsoft_datetime.strToDate(options.startDate);
+ } else {
+ ct = options.value || ((input && input.val && input.val()) ? input.val() : '');
+ if (ct) {
+ ct = _xdsoft_datetime.strToDateTime(ct);
+ if (options.yearOffset) {
+ ct = new Date(ct.getFullYear() - options.yearOffset, ct.getMonth(), ct.getDate(), ct.getHours(), ct.getMinutes(), ct.getSeconds(), ct.getMilliseconds());
+ }
+ } else if (options.defaultDate) {
+ ct = _xdsoft_datetime.strToDateTime(options.defaultDate);
+ if (options.defaultTime) {
+ time = _xdsoft_datetime.strtotime(options.defaultTime);
+ ct.setHours(time.getHours());
+ ct.setMinutes(time.getMinutes());
+ }
+ }
+ }
+
+ if (ct && _xdsoft_datetime.isValidDate(ct)) {
+ datetimepicker.data('changed', true);
+ } else {
+ ct = '';
+ }
+
+ return ct || 0;
+ }
+
+ function setMask(options) {
+
+ var isValidValue = function (mask, value) {
+ var reg = mask
+ .replace(/([\[\]\/\{\}\(\)\-\.\+]{1})/g, '\\$1')
+ .replace(/_/g, '{digit+}')
+ .replace(/([0-9]{1})/g, '{digit$1}')
+ .replace(/\{digit([0-9]{1})\}/g, '[0-$1_]{1}')
+ .replace(/\{digit[\+]\}/g, '[0-9_]{1}');
+ return (new RegExp(reg)).test(value);
+ },
+ getCaretPos = function (input) {
+ try {
+ if (options.ownerDocument.selection && options.ownerDocument.selection.createRange) {
+ var range = options.ownerDocument.selection.createRange();
+ return range.getBookmark().charCodeAt(2) - 2;
+ }
+ if (input.setSelectionRange) {
+ return input.selectionStart;
+ }
+ } catch (e) {
+ return 0;
+ }
+ },
+ setCaretPos = function (node, pos) {
+ node = (typeof node === "string" || node instanceof String) ? options.ownerDocument.getElementById(node) : node;
+ if (!node) {
+ return false;
+ }
+ if (node.createTextRange) {
+ var textRange = node.createTextRange();
+ textRange.collapse(true);
+ textRange.moveEnd('character', pos);
+ textRange.moveStart('character', pos);
+ textRange.select();
+ return true;
+ }
+ if (node.setSelectionRange) {
+ node.setSelectionRange(pos, pos);
+ return true;
+ }
+ return false;
+ };
+
+ if(options.mask) {
+ input.off('keydown.xdsoft');
+ }
+
+ if (options.mask === true) {
+ if (dateHelper.formatMask) {
+ options.mask = dateHelper.formatMask(options.format)
+ } else {
+ options.mask = options.format
+ .replace(/Y/g, '9999')
+ .replace(/F/g, '9999')
+ .replace(/m/g, '19')
+ .replace(/d/g, '39')
+ .replace(/H/g, '29')
+ .replace(/i/g, '59')
+ .replace(/s/g, '59');
+ }
+ }
+
+ if ($.type(options.mask) === 'string') {
+ if (!isValidValue(options.mask, input.val())) {
+ input.val(options.mask.replace(/[0-9]/g, '_'));
+ setCaretPos(input[0], 0);
+ }
+
+ input.on('paste.xdsoft', function (event) {
+ // couple options here
+ // 1. return false - tell them they can't paste
+ // 2. insert over current characters - minimal validation
+ // 3. full fledged parsing and validation
+ // let's go option 2 for now
+
+ // fires multiple times for some reason
+
+ // https://stackoverflow.com/a/30496488/1366033
+ var clipboardData = event.clipboardData || event.originalEvent.clipboardData || window.clipboardData,
+ pastedData = clipboardData.getData('text'),
+ val = this.value,
+ pos = this.selectionStart
+
+ var valueBeforeCursor = val.substr(0, pos);
+ var valueAfterPaste = val.substr(pos + pastedData.length);
+
+ val = valueBeforeCursor + pastedData + valueAfterPaste;
+ pos += pastedData.length;
+
+ if (isValidValue(options.mask, val)) {
+ this.value = val;
+ setCaretPos(this, pos);
+ } else if ($.trim(val) === '') {
+ this.value = options.mask.replace(/[0-9]/g, '_');
+ } else {
+ input.trigger('error_input.xdsoft');
+ }
+
+ event.preventDefault();
+ return false;
+ });
+
+ input.on('keydown.xdsoft', function (event) {
+ var val = this.value,
+ key = event.which,
+ pos = this.selectionStart,
+ selEnd = this.selectionEnd,
+ hasSel = pos !== selEnd,
+ digit;
+
+ // only alow these characters
+ if (((key >= KEY0 && key <= KEY9) ||
+ (key >= _KEY0 && key <= _KEY9)) ||
+ (key === BACKSPACE || key === DEL)) {
+
+ // get char to insert which is new character or placeholder ('_')
+ digit = (key === BACKSPACE || key === DEL) ? '_' :
+ String.fromCharCode((_KEY0 <= key && key <= _KEY9) ? key - KEY0 : key);
+
+ // we're deleting something, we're not at the start, and have normal cursor, move back one
+ // if we have a selection length, cursor actually sits behind deletable char, not in front
+ if (key === BACKSPACE && pos && !hasSel) {
+ pos -= 1;
+ }
+
+ // don't stop on a separator, continue whatever direction you were going
+ // value char - keep incrementing position while on separator char and we still have room
+ // del char - keep decrementing position while on separator char and we still have room
+ while (true) {
+ var maskValueAtCurPos = options.mask.substr(pos, 1);
+ var posShorterThanMaskLength = pos < options.mask.length;
+ var posGreaterThanZero = pos > 0;
+ var notNumberOrPlaceholder = /[^0-9_]/;
+ var curPosOnSep = notNumberOrPlaceholder.test(maskValueAtCurPos);
+ var continueMovingPosition = curPosOnSep && posShorterThanMaskLength && posGreaterThanZero
+
+ // if we hit a real char, stay where we are
+ if (!continueMovingPosition) break;
+
+ // hitting backspace in a selection, you can possibly go back any further - go forward
+ pos += (key === BACKSPACE && !hasSel) ? -1 : 1;
+
+ }
+
+ if (event.metaKey) { // cmd has been pressed
+ pos = 0;
+ hasSel = true;
+ }
+
+ if (hasSel) {
+ // pos might have moved so re-calc length
+ var selLength = selEnd - pos
+
+ // if we have a selection length we will wipe out entire selection and replace with default template for that range
+ var defaultBlank = options.mask.replace(/[0-9]/g, '_');
+ var defaultBlankSelectionReplacement = defaultBlank.substr(pos, selLength);
+ var selReplacementRemainder = defaultBlankSelectionReplacement.substr(1) // might be empty
+
+ var valueBeforeSel = val.substr(0, pos);
+ var insertChars = digit + selReplacementRemainder;
+ var charsAfterSelection = val.substr(pos + selLength);
+
+ val = valueBeforeSel + insertChars + charsAfterSelection
+
+ } else {
+ var valueBeforeCursor = val.substr(0, pos);
+ var insertChar = digit;
+ var valueAfterNextChar = val.substr(pos + 1);
+
+ val = valueBeforeCursor + insertChar + valueAfterNextChar
+ }
+
+ if ($.trim(val) === '') {
+ // if empty, set to default
+ val = defaultBlank
+ } else {
+ // if at the last character don't need to do anything
+ if (pos === options.mask.length) {
+ event.preventDefault();
+ return false;
+ }
+ }
+
+ // resume cursor location
+ pos += (key === BACKSPACE) ? 0 : 1;
+ // don't stop on a separator, continue whatever direction you were going
+ while (/[^0-9_]/.test(options.mask.substr(pos, 1)) && pos < options.mask.length && pos > 0) {
+ pos += (key === BACKSPACE) ? 0 : 1;
+ }
+
+ if (isValidValue(options.mask, val)) {
+ this.value = val;
+ setCaretPos(this, pos);
+ } else if ($.trim(val) === '') {
+ this.value = options.mask.replace(/[0-9]/g, '_');
+ } else {
+ input.trigger('error_input.xdsoft');
+ }
+ } else {
+ if (([AKEY, CKEY, VKEY, ZKEY, YKEY].indexOf(key) !== -1 && ctrlDown) || [ESC, ARROWUP, ARROWDOWN, ARROWLEFT, ARROWRIGHT, F5, CTRLKEY, TAB, ENTER].indexOf(key) !== -1) {
+ return true;
+ }
+ }
+
+ event.preventDefault();
+ return false;
+ });
+ }
+ }
+
+ _xdsoft_datetime.setCurrentTime(getCurrentValue());
+
+ input
+ .data('xdsoft_datetimepicker', datetimepicker)
+ .on('open.xdsoft focusin.xdsoft mousedown.xdsoft touchstart', function () {
+ if (input.is(':disabled') || (input.data('xdsoft_datetimepicker').is(':visible') && options.closeOnInputClick)) {
+ return;
+ }
+ if (!options.openOnFocus) {
+ return;
+ }
+ clearTimeout(timer);
+ timer = setTimeout(function () {
+ if (input.is(':disabled')) {
+ return;
+ }
+
+ triggerAfterOpen = true;
+ _xdsoft_datetime.setCurrentTime(getCurrentValue(), true);
+ if(options.mask) {
+ setMask(options);
+ }
+ datetimepicker.trigger('open.xdsoft');
+ }, 100);
+ })
+ .on('keydown.xdsoft', function (event) {
+ var elementSelector,
+ key = event.which;
+ if ([ENTER].indexOf(key) !== -1 && options.enterLikeTab) {
+ elementSelector = $("input:visible,textarea:visible,button:visible,a:visible");
+ datetimepicker.trigger('close.xdsoft');
+ elementSelector.eq(elementSelector.index(this) + 1).focus();
+ return false;
+ }
+ if ([TAB].indexOf(key) !== -1) {
+ datetimepicker.trigger('close.xdsoft');
+ return true;
+ }
+ })
+ .on('blur.xdsoft', function () {
+ datetimepicker.trigger('close.xdsoft');
+ });
+ };
+ destroyDateTimePicker = function (input) {
+ var datetimepicker = input.data('xdsoft_datetimepicker');
+ if (datetimepicker) {
+ datetimepicker.data('xdsoft_datetime', null);
+ datetimepicker.remove();
+ input
+ .data('xdsoft_datetimepicker', null)
+ .off('.xdsoft');
+ $(options.contentWindow).off('resize.xdsoft');
+ $([options.contentWindow, options.ownerDocument.body]).off('mousedown.xdsoft touchstart');
+ if (input.unmousewheel) {
+ input.unmousewheel();
+ }
+ }
+ };
+ $(options.ownerDocument)
+ .off('keydown.xdsoftctrl keyup.xdsoftctrl')
+ .off('keydown.xdsoftcmd keyup.xdsoftcmd')
+ .on('keydown.xdsoftctrl', function (e) {
+ if (e.keyCode === CTRLKEY) {
+ ctrlDown = true;
+ }
+ })
+ .on('keyup.xdsoftctrl', function (e) {
+ if (e.keyCode === CTRLKEY) {
+ ctrlDown = false;
+ }
+ })
+ .on('keydown.xdsoftcmd', function (e) {
+ if (e.keyCode === CMDKEY) {
+ cmdDown = true;
+ }
+ })
+ .on('keyup.xdsoftcmd', function (e) {
+ if (e.keyCode === CMDKEY) {
+ cmdDown = false;
+ }
+ });
+
+ this.each(function () {
+ var datetimepicker = $(this).data('xdsoft_datetimepicker'), $input;
+ if (datetimepicker) {
+ if ($.type(opt) === 'string') {
+ switch (opt) {
+ case 'show':
+ $(this).select().focus();
+ datetimepicker.trigger('open.xdsoft');
+ break;
+ case 'hide':
+ datetimepicker.trigger('close.xdsoft');
+ break;
+ case 'toggle':
+ datetimepicker.trigger('toggle.xdsoft');
+ break;
+ case 'destroy':
+ destroyDateTimePicker($(this));
+ break;
+ case 'reset':
+ this.value = this.defaultValue;
+ if (!this.value || !datetimepicker.data('xdsoft_datetime').isValidDate(dateHelper.parseDate(this.value, options.format))) {
+ datetimepicker.data('changed', false);
+ }
+ datetimepicker.data('xdsoft_datetime').setCurrentTime(this.value);
+ break;
+ case 'validate':
+ $input = datetimepicker.data('input');
+ $input.trigger('blur.xdsoft');
+ break;
+ default:
+ if (datetimepicker[opt] && $.isFunction(datetimepicker[opt])) {
+ result = datetimepicker[opt](opt2);
+ }
+ }
+ } else {
+ datetimepicker
+ .setOptions(opt);
+ }
+ return 0;
+ }
+ if ($.type(opt) !== 'string') {
+ if (!options.lazyInit || options.open || options.inline) {
+ createDateTimePicker($(this));
+ } else {
+ lazyInit($(this));
+ }
+ }
+ });
+
+ return result;
+ };
+
+ $.fn.datetimepicker.defaults = default_options;
+
+ function HighlightedDate(date, desc, style) {
+ "use strict";
+ this.date = date;
+ this.desc = desc;
+ this.style = style;
+ }
+};
+;(function (factory) {
+ if ( typeof define === 'function' && define.amd ) {
+ // AMD. Register as an anonymous module.
+ define(['jquery', 'jquery-mousewheel'], factory);
+ } else if (typeof exports === 'object') {
+ // Node/CommonJS style for Browserify
+ module.exports = factory(require('jquery'));;
+ } else {
+ // Browser globals
+ factory(jQuery);
+ }
+}(datetimepickerFactory));
+
+
diff --git a/op25/gr-op25_repeater/apps/oplog/op25/static/favicon.ico b/op25/gr-op25_repeater/apps/oplog/op25/static/favicon.ico
new file mode 100644
index 0000000..b47738f
--- /dev/null
+++ b/op25/gr-op25_repeater/apps/oplog/op25/static/favicon.ico
Binary files differ
diff --git a/op25/gr-op25_repeater/apps/oplog/op25/static/jquery/jquery-1.11.3.min.js b/op25/gr-op25_repeater/apps/oplog/op25/static/jquery/jquery-1.11.3.min.js
new file mode 100644
index 0000000..0f60b7b
--- /dev/null
+++ b/op25/gr-op25_repeater/apps/oplog/op25/static/jquery/jquery-1.11.3.min.js
@@ -0,0 +1,5 @@
+/*! jQuery v1.11.3 | (c) 2005, 2015 jQuery Foundation, Inc. | jquery.org/license */
+!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=c.slice,e=c.concat,f=c.push,g=c.indexOf,h={},i=h.toString,j=h.hasOwnProperty,k={},l="1.11.3",m=function(a,b){return new m.fn.init(a,b)},n=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,o=/^-ms-/,p=/-([\da-z])/gi,q=function(a,b){return b.toUpperCase()};m.fn=m.prototype={jquery:l,constructor:m,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=m.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a,b){return m.each(this,a,b)},map:function(a){return this.pushStack(m.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice},m.extend=m.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||m.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(e=arguments[h]))for(d in e)a=g[d],c=e[d],g!==c&&(j&&c&&(m.isPlainObject(c)||(b=m.isArray(c)))?(b?(b=!1,f=a&&m.isArray(a)?a:[]):f=a&&m.isPlainObject(a)?a:{},g[d]=m.extend(j,f,c)):void 0!==c&&(g[d]=c));return g},m.extend({expando:"jQuery"+(l+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===m.type(a)},isArray:Array.isArray||function(a){return"array"===m.type(a)},isWindow:function(a){return null!=a&&a==a.window},isNumeric:function(a){return!m.isArray(a)&&a-parseFloat(a)+1>=0},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},isPlainObject:function(a){var b;if(!a||"object"!==m.type(a)||a.nodeType||m.isWindow(a))return!1;try{if(a.constructor&&!j.call(a,"constructor")&&!j.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}if(k.ownLast)for(b in a)return j.call(a,b);for(b in a);return void 0===b||j.call(a,b)},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?h[i.call(a)]||"object":typeof a},globalEval:function(b){b&&m.trim(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(o,"ms-").replace(p,q)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=r(a);if(c){if(g){for(;f>e;e++)if(d=b.apply(a[e],c),d===!1)break}else for(e in a)if(d=b.apply(a[e],c),d===!1)break}else if(g){for(;f>e;e++)if(d=b.call(a[e],e,a[e]),d===!1)break}else for(e in a)if(d=b.call(a[e],e,a[e]),d===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(n,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(r(Object(a))?m.merge(c,"string"==typeof a?[a]:a):f.call(c,a)),c},inArray:function(a,b,c){var d;if(b){if(g)return g.call(b,a,c);for(d=b.length,c=c?0>c?Math.max(0,d+c):c:0;d>c;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,b){var c=+b.length,d=0,e=a.length;while(c>d)a[e++]=b[d++];if(c!==c)while(void 0!==b[d])a[e++]=b[d++];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,f=0,g=a.length,h=r(a),i=[];if(h)for(;g>f;f++)d=b(a[f],f,c),null!=d&&i.push(d);else for(f in a)d=b(a[f],f,c),null!=d&&i.push(d);return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;return"string"==typeof b&&(f=a[b],b=a,a=f),m.isFunction(a)?(c=d.call(arguments,2),e=function(){return a.apply(b||this,c.concat(d.call(arguments)))},e.guid=a.guid=a.guid||m.guid++,e):void 0},now:function(){return+new Date},support:k}),m.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function r(a){var b="length"in a&&a.length,c=m.type(a);return"function"===c||m.isWindow(a)?!1:1===a.nodeType&&b?!0:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var s=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=ha(),z=ha(),A=ha(),B=function(a,b){return a===b&&(l=!0),0},C=1<<31,D={}.hasOwnProperty,E=[],F=E.pop,G=E.push,H=E.push,I=E.slice,J=function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},K="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",L="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",N=M.replace("w","w#"),O="\\["+L+"*("+M+")(?:"+L+"*([*^$|!~]?=)"+L+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+N+"))|)"+L+"*\\]",P=":("+M+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+O+")*)|.*)\\)|)",Q=new RegExp(L+"+","g"),R=new RegExp("^"+L+"+|((?:^|[^\\\\])(?:\\\\.)*)"+L+"+$","g"),S=new RegExp("^"+L+"*,"+L+"*"),T=new RegExp("^"+L+"*([>+~]|"+L+")"+L+"*"),U=new RegExp("="+L+"*([^\\]'\"]*?)"+L+"*\\]","g"),V=new RegExp(P),W=new RegExp("^"+N+"$"),X={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),TAG:new RegExp("^("+M.replace("w","w*")+")"),ATTR:new RegExp("^"+O),PSEUDO:new RegExp("^"+P),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+L+"*(even|odd|(([+-]|)(\\d*)n|)"+L+"*(?:([+-]|)"+L+"*(\\d+)|))"+L+"*\\)|)","i"),bool:new RegExp("^(?:"+K+")$","i"),needsContext:new RegExp("^"+L+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+L+"*((?:-\\d)?\\d*)"+L+"*\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,$=/^[^{]+\{\s*\[native \w/,_=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,aa=/[+~]/,ba=/'|\\/g,ca=new RegExp("\\\\([\\da-f]{1,6}"+L+"?|("+L+")|.)","ig"),da=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},ea=function(){m()};try{H.apply(E=I.call(v.childNodes),v.childNodes),E[v.childNodes.length].nodeType}catch(fa){H={apply:E.length?function(a,b){G.apply(a,I.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function ga(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,d=d||[],k=b.nodeType,"string"!=typeof a||!a||1!==k&&9!==k&&11!==k)return d;if(!e&&p){if(11!==k&&(f=_.exec(a)))if(j=f[1]){if(9===k){if(h=b.getElementById(j),!h||!h.parentNode)return d;if(h.id===j)return d.push(h),d}else if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j)return d.push(h),d}else{if(f[2])return H.apply(d,b.getElementsByTagName(a)),d;if((j=f[3])&&c.getElementsByClassName)return H.apply(d,b.getElementsByClassName(j)),d}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=1!==k&&a,1===k&&"object"!==b.nodeName.toLowerCase()){o=g(a),(r=b.getAttribute("id"))?s=r.replace(ba,"\\$&"):b.setAttribute("id",s),s="[id='"+s+"'] ",l=o.length;while(l--)o[l]=s+ra(o[l]);w=aa.test(a)&&pa(b.parentNode)||b,x=o.join(",")}if(x)try{return H.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute("id")}}}return i(a.replace(R,"$1"),b,d,e)}function ha(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ia(a){return a[u]=!0,a}function ja(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function ka(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function la(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||C)-(~a.sourceIndex||C);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function ma(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function na(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function oa(a){return ia(function(b){return b=+b,ia(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function pa(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=ga.support={},f=ga.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=ga.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=g.documentElement,e=g.defaultView,e&&e!==e.top&&(e.addEventListener?e.addEventListener("unload",ea,!1):e.attachEvent&&e.attachEvent("onunload",ea)),p=!f(g),c.attributes=ja(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ja(function(a){return a.appendChild(g.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=$.test(g.getElementsByClassName),c.getById=ja(function(a){return o.appendChild(a).id=u,!g.getElementsByName||!g.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(ca,da);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(ca,da);return function(a){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):c.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(g.querySelectorAll))&&(ja(function(a){o.appendChild(a).innerHTML="<a id='"+u+"'></a><select id='"+u+"-\f]' msallowcapture=''><option selected=''></option></select>",a.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+L+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+L+"*(?:value|"+K+")"),a.querySelectorAll("[id~="+u+"-]").length||q.push("~="),a.querySelectorAll(":checked").length||q.push(":checked"),a.querySelectorAll("a#"+u+"+*").length||q.push(".#.+[+~]")}),ja(function(a){var b=g.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+L+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ja(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",P)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=$.test(o.compareDocumentPosition),t=b||$.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===g||a.ownerDocument===v&&t(v,a)?-1:b===g||b.ownerDocument===v&&t(v,b)?1:k?J(k,a)-J(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,e=a.parentNode,f=b.parentNode,h=[a],i=[b];if(!e||!f)return a===g?-1:b===g?1:e?-1:f?1:k?J(k,a)-J(k,b):0;if(e===f)return la(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)i.unshift(c);while(h[d]===i[d])d++;return d?la(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},g):n},ga.matches=function(a,b){return ga(a,null,null,b)},ga.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(U,"='$1']"),!(!c.matchesSelector||!p||r&&r.test(b)||q&&q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return ga(b,n,null,[a]).length>0},ga.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},ga.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&D.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},ga.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},ga.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=ga.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=ga.selectors={cacheLength:50,createPseudo:ia,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(ca,da),a[3]=(a[3]||a[4]||a[5]||"").replace(ca,da),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||ga.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&ga.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return X.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&V.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(ca,da).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+L+")"+a+"("+L+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=ga.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e.replace(Q," ")+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){k=q[u]||(q[u]={}),j=k[a]||[],n=j[0]===w&&j[1],m=j[0]===w&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[w,n,m];break}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(s&&((l[u]||(l[u]={}))[a]=[w,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||ga.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ia(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=J(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:ia(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?ia(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),b[0]=null,!c.pop()}}),has:ia(function(a){return function(b){return ga(a,b).length>0}}),contains:ia(function(a){return a=a.replace(ca,da),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ia(function(a){return W.test(a||"")||ga.error("unsupported lang: "+a),a=a.replace(ca,da).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Z.test(a.nodeName)},input:function(a){return Y.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:oa(function(){return[0]}),last:oa(function(a,b){return[b-1]}),eq:oa(function(a,b,c){return[0>c?c+b:c]}),even:oa(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:oa(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:oa(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:oa(function(a,b,c){for(var d=0>c?c+b:c;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=ma(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=na(b);function qa(){}qa.prototype=d.filters=d.pseudos,d.setFilters=new qa,g=ga.tokenize=function(a,b){var c,e,f,g,h,i,j,k=z[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){(!c||(e=S.exec(h)))&&(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=T.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(R," ")}),h=h.slice(c.length));for(g in d.filter)!(e=X[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?ga.error(a):z(a,i).slice(0)};function ra(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function sa(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[u]||(b[u]={}),(h=i[d])&&h[0]===w&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function ta(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function ua(a,b,c){for(var d=0,e=b.length;e>d;d++)ga(a,b[d],c);return c}function va(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function wa(a,b,c,d,e,f){return d&&!d[u]&&(d=wa(d)),e&&!e[u]&&(e=wa(e,f)),ia(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||ua(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:va(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=va(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?J(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=va(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):H.apply(g,r)})}function xa(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=sa(function(a){return a===b},h,!0),l=sa(function(a){return J(b,a)>-1},h,!0),m=[function(a,c,d){var e=!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d));return b=null,e}];f>i;i++)if(c=d.relative[a[i].type])m=[sa(ta(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return wa(i>1&&ta(m),i>1&&ra(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(R,"$1"),c,e>i&&xa(a.slice(i,e)),f>e&&xa(a=a.slice(e)),f>e&&ra(a))}m.push(c)}return ta(m)}function ya(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q="0",r=f&&[],s=[],t=j,u=f||e&&d.find.TAG("*",k),v=w+=null==t?1:Math.random()||.1,x=u.length;for(k&&(j=g!==n&&g);q!==x&&null!=(l=u[q]);q++){if(e&&l){m=0;while(o=a[m++])if(o(l,g,h)){i.push(l);break}k&&(w=v)}c&&((l=!o&&l)&&p--,f&&r.push(l))}if(p+=q,c&&q!==p){m=0;while(o=b[m++])o(r,s,g,h);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=F.call(i));s=va(s)}H.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&ga.uniqueSort(i)}return k&&(w=v,j=t),r};return c?ia(f):f}return h=ga.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=xa(b[c]),f[u]?d.push(f):e.push(f);f=A(a,ya(e,d)),f.selector=a}return f},i=ga.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(ca,da),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=X.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(ca,da),aa.test(j[0].type)&&pa(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&ra(j),!a)return H.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,aa.test(a)&&pa(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ja(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ja(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||ka("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ja(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||ka("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ja(function(a){return null==a.getAttribute("disabled")})||ka(K,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),ga}(a);m.find=s,m.expr=s.selectors,m.expr[":"]=m.expr.pseudos,m.unique=s.uniqueSort,m.text=s.getText,m.isXMLDoc=s.isXML,m.contains=s.contains;var t=m.expr.match.needsContext,u=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,v=/^.[^:#\[\.,]*$/;function w(a,b,c){if(m.isFunction(b))return m.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return m.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(v.test(b))return m.filter(b,a,c);b=m.filter(b,a)}return m.grep(a,function(a){return m.inArray(a,b)>=0!==c})}m.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?m.find.matchesSelector(d,a)?[d]:[]:m.find.matches(a,m.grep(b,function(a){return 1===a.nodeType}))},m.fn.extend({find:function(a){var b,c=[],d=this,e=d.length;if("string"!=typeof a)return this.pushStack(m(a).filter(function(){for(b=0;e>b;b++)if(m.contains(d[b],this))return!0}));for(b=0;e>b;b++)m.find(a,d[b],c);return c=this.pushStack(e>1?m.unique(c):c),c.selector=this.selector?this.selector+" "+a:a,c},filter:function(a){return this.pushStack(w(this,a||[],!1))},not:function(a){return this.pushStack(w(this,a||[],!0))},is:function(a){return!!w(this,"string"==typeof a&&t.test(a)?m(a):a||[],!1).length}});var x,y=a.document,z=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,A=m.fn.init=function(a,b){var c,d;if(!a)return this;if("string"==typeof a){if(c="<"===a.charAt(0)&&">"===a.charAt(a.length-1)&&a.length>=3?[null,a,null]:z.exec(a),!c||!c[1]&&b)return!b||b.jquery?(b||x).find(a):this.constructor(b).find(a);if(c[1]){if(b=b instanceof m?b[0]:b,m.merge(this,m.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:y,!0)),u.test(c[1])&&m.isPlainObject(b))for(c in b)m.isFunction(this[c])?this[c](b[c]):this.attr(c,b[c]);return this}if(d=y.getElementById(c[2]),d&&d.parentNode){if(d.id!==c[2])return x.find(a);this.length=1,this[0]=d}return this.context=y,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):m.isFunction(a)?"undefined"!=typeof x.ready?x.ready(a):a(m):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),m.makeArray(a,this))};A.prototype=m.fn,x=m(y);var B=/^(?:parents|prev(?:Until|All))/,C={children:!0,contents:!0,next:!0,prev:!0};m.extend({dir:function(a,b,c){var d=[],e=a[b];while(e&&9!==e.nodeType&&(void 0===c||1!==e.nodeType||!m(e).is(c)))1===e.nodeType&&d.push(e),e=e[b];return d},sibling:function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c}}),m.fn.extend({has:function(a){var b,c=m(a,this),d=c.length;return this.filter(function(){for(b=0;d>b;b++)if(m.contains(this,c[b]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=t.test(a)||"string"!=typeof a?m(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&m.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?m.unique(f):f)},index:function(a){return a?"string"==typeof a?m.inArray(this[0],m(a)):m.inArray(a.jquery?a[0]:a,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(m.unique(m.merge(this.get(),m(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function D(a,b){do a=a[b];while(a&&1!==a.nodeType);return a}m.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return m.dir(a,"parentNode")},parentsUntil:function(a,b,c){return m.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return m.dir(a,"nextSibling")},prevAll:function(a){return m.dir(a,"previousSibling")},nextUntil:function(a,b,c){return m.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return m.dir(a,"previousSibling",c)},siblings:function(a){return m.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return m.sibling(a.firstChild)},contents:function(a){return m.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:m.merge([],a.childNodes)}},function(a,b){m.fn[a]=function(c,d){var e=m.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=m.filter(d,e)),this.length>1&&(C[a]||(e=m.unique(e)),B.test(a)&&(e=e.reverse())),this.pushStack(e)}});var E=/\S+/g,F={};function G(a){var b=F[a]={};return m.each(a.match(E)||[],function(a,c){b[c]=!0}),b}m.Callbacks=function(a){a="string"==typeof a?F[a]||G(a):m.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){for(c=a.memory&&l,d=!0,f=g||0,g=0,e=h.length,b=!0;h&&e>f;f++)if(h[f].apply(l[0],l[1])===!1&&a.stopOnFalse){c=!1;break}b=!1,h&&(i?i.length&&j(i.shift()):c?h=[]:k.disable())},k={add:function(){if(h){var d=h.length;!function f(b){m.each(b,function(b,c){var d=m.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&f(c)})}(arguments),b?e=h.length:c&&(g=d,j(c))}return this},remove:function(){return h&&m.each(arguments,function(a,c){var d;while((d=m.inArray(c,h,d))>-1)h.splice(d,1),b&&(e>=d&&e--,f>=d&&f--)}),this},has:function(a){return a?m.inArray(a,h)>-1:!(!h||!h.length)},empty:function(){return h=[],e=0,this},disable:function(){return h=i=c=void 0,this},disabled:function(){return!h},lock:function(){return i=void 0,c||k.disable(),this},locked:function(){return!i},fireWith:function(a,c){return!h||d&&!i||(c=c||[],c=[a,c.slice?c.slice():c],b?i.push(c):j(c)),this},fire:function(){return k.fireWith(this,arguments),this},fired:function(){return!!d}};return k},m.extend({Deferred:function(a){var b=[["resolve","done",m.Callbacks("once memory"),"resolved"],["reject","fail",m.Callbacks("once memory"),"rejected"],["notify","progress",m.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return m.Deferred(function(c){m.each(b,function(b,f){var g=m.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&m.isFunction(a.promise)?a.promise().done(c.resolve).fail(c.reject).progress(c.notify):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?m.extend(a,d):d}},e={};return d.pipe=d.then,m.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=1!==e||a&&m.isFunction(a.promise)?e:0,g=1===f?a:m.Deferred(),h=function(a,b,c){return function(e){b[a]=this,c[a]=arguments.length>1?d.call(arguments):e,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(e>1)for(i=new Array(e),j=new Array(e),k=new Array(e);e>b;b++)c[b]&&m.isFunction(c[b].promise)?c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i)):--f;return f||g.resolveWith(k,c),g.promise()}});var H;m.fn.ready=function(a){return m.ready.promise().done(a),this},m.extend({isReady:!1,readyWait:1,holdReady:function(a){a?m.readyWait++:m.ready(!0)},ready:function(a){if(a===!0?!--m.readyWait:!m.isReady){if(!y.body)return setTimeout(m.ready);m.isReady=!0,a!==!0&&--m.readyWait>0||(H.resolveWith(y,[m]),m.fn.triggerHandler&&(m(y).triggerHandler("ready"),m(y).off("ready")))}}});function I(){y.addEventListener?(y.removeEventListener("DOMContentLoaded",J,!1),a.removeEventListener("load",J,!1)):(y.detachEvent("onreadystatechange",J),a.detachEvent("onload",J))}function J(){(y.addEventListener||"load"===event.type||"complete"===y.readyState)&&(I(),m.ready())}m.ready.promise=function(b){if(!H)if(H=m.Deferred(),"complete"===y.readyState)setTimeout(m.ready);else if(y.addEventListener)y.addEventListener("DOMContentLoaded",J,!1),a.addEventListener("load",J,!1);else{y.attachEvent("onreadystatechange",J),a.attachEvent("onload",J);var c=!1;try{c=null==a.frameElement&&y.documentElement}catch(d){}c&&c.doScroll&&!function e(){if(!m.isReady){try{c.doScroll("left")}catch(a){return setTimeout(e,50)}I(),m.ready()}}()}return H.promise(b)};var K="undefined",L;for(L in m(k))break;k.ownLast="0"!==L,k.inlineBlockNeedsLayout=!1,m(function(){var a,b,c,d;c=y.getElementsByTagName("body")[0],c&&c.style&&(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),typeof b.style.zoom!==K&&(b.style.cssText="display:inline;margin:0;border:0;padding:1px;width:1px;zoom:1",k.inlineBlockNeedsLayout=a=3===b.offsetWidth,a&&(c.style.zoom=1)),c.removeChild(d))}),function(){var a=y.createElement("div");if(null==k.deleteExpando){k.deleteExpando=!0;try{delete a.test}catch(b){k.deleteExpando=!1}}a=null}(),m.acceptData=function(a){var b=m.noData[(a.nodeName+" ").toLowerCase()],c=+a.nodeType||1;return 1!==c&&9!==c?!1:!b||b!==!0&&a.getAttribute("classid")===b};var M=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,N=/([A-Z])/g;function O(a,b,c){if(void 0===c&&1===a.nodeType){var d="data-"+b.replace(N,"-$1").toLowerCase();if(c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:M.test(c)?m.parseJSON(c):c}catch(e){}m.data(a,b,c)}else c=void 0}return c}function P(a){var b;for(b in a)if(("data"!==b||!m.isEmptyObject(a[b]))&&"toJSON"!==b)return!1;
+
+return!0}function Q(a,b,d,e){if(m.acceptData(a)){var f,g,h=m.expando,i=a.nodeType,j=i?m.cache:a,k=i?a[h]:a[h]&&h;if(k&&j[k]&&(e||j[k].data)||void 0!==d||"string"!=typeof b)return k||(k=i?a[h]=c.pop()||m.guid++:h),j[k]||(j[k]=i?{}:{toJSON:m.noop}),("object"==typeof b||"function"==typeof b)&&(e?j[k]=m.extend(j[k],b):j[k].data=m.extend(j[k].data,b)),g=j[k],e||(g.data||(g.data={}),g=g.data),void 0!==d&&(g[m.camelCase(b)]=d),"string"==typeof b?(f=g[b],null==f&&(f=g[m.camelCase(b)])):f=g,f}}function R(a,b,c){if(m.acceptData(a)){var d,e,f=a.nodeType,g=f?m.cache:a,h=f?a[m.expando]:m.expando;if(g[h]){if(b&&(d=c?g[h]:g[h].data)){m.isArray(b)?b=b.concat(m.map(b,m.camelCase)):b in d?b=[b]:(b=m.camelCase(b),b=b in d?[b]:b.split(" ")),e=b.length;while(e--)delete d[b[e]];if(c?!P(d):!m.isEmptyObject(d))return}(c||(delete g[h].data,P(g[h])))&&(f?m.cleanData([a],!0):k.deleteExpando||g!=g.window?delete g[h]:g[h]=null)}}}m.extend({cache:{},noData:{"applet ":!0,"embed ":!0,"object ":"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(a){return a=a.nodeType?m.cache[a[m.expando]]:a[m.expando],!!a&&!P(a)},data:function(a,b,c){return Q(a,b,c)},removeData:function(a,b){return R(a,b)},_data:function(a,b,c){return Q(a,b,c,!0)},_removeData:function(a,b){return R(a,b,!0)}}),m.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=m.data(f),1===f.nodeType&&!m._data(f,"parsedAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=m.camelCase(d.slice(5)),O(f,d,e[d])));m._data(f,"parsedAttrs",!0)}return e}return"object"==typeof a?this.each(function(){m.data(this,a)}):arguments.length>1?this.each(function(){m.data(this,a,b)}):f?O(f,a,m.data(f,a)):void 0},removeData:function(a){return this.each(function(){m.removeData(this,a)})}}),m.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=m._data(a,b),c&&(!d||m.isArray(c)?d=m._data(a,b,m.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=m.queue(a,b),d=c.length,e=c.shift(),f=m._queueHooks(a,b),g=function(){m.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return m._data(a,c)||m._data(a,c,{empty:m.Callbacks("once memory").add(function(){m._removeData(a,b+"queue"),m._removeData(a,c)})})}}),m.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?m.queue(this[0],a):void 0===b?this:this.each(function(){var c=m.queue(this,a,b);m._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&m.dequeue(this,a)})},dequeue:function(a){return this.each(function(){m.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=m.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=m._data(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var S=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,T=["Top","Right","Bottom","Left"],U=function(a,b){return a=b||a,"none"===m.css(a,"display")||!m.contains(a.ownerDocument,a)},V=m.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===m.type(c)){e=!0;for(h in c)m.access(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,m.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(m(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},W=/^(?:checkbox|radio)$/i;!function(){var a=y.createElement("input"),b=y.createElement("div"),c=y.createDocumentFragment();if(b.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",k.leadingWhitespace=3===b.firstChild.nodeType,k.tbody=!b.getElementsByTagName("tbody").length,k.htmlSerialize=!!b.getElementsByTagName("link").length,k.html5Clone="<:nav></:nav>"!==y.createElement("nav").cloneNode(!0).outerHTML,a.type="checkbox",a.checked=!0,c.appendChild(a),k.appendChecked=a.checked,b.innerHTML="<textarea>x</textarea>",k.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue,c.appendChild(b),b.innerHTML="<input type='radio' checked='checked' name='t'/>",k.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,k.noCloneEvent=!0,b.attachEvent&&(b.attachEvent("onclick",function(){k.noCloneEvent=!1}),b.cloneNode(!0).click()),null==k.deleteExpando){k.deleteExpando=!0;try{delete b.test}catch(d){k.deleteExpando=!1}}}(),function(){var b,c,d=y.createElement("div");for(b in{submit:!0,change:!0,focusin:!0})c="on"+b,(k[b+"Bubbles"]=c in a)||(d.setAttribute(c,"t"),k[b+"Bubbles"]=d.attributes[c].expando===!1);d=null}();var X=/^(?:input|select|textarea)$/i,Y=/^key/,Z=/^(?:mouse|pointer|contextmenu)|click/,$=/^(?:focusinfocus|focusoutblur)$/,_=/^([^.]*)(?:\.(.+)|)$/;function aa(){return!0}function ba(){return!1}function ca(){try{return y.activeElement}catch(a){}}m.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m._data(a);if(r){c.handler&&(i=c,c=i.handler,e=i.selector),c.guid||(c.guid=m.guid++),(g=r.events)||(g=r.events={}),(k=r.handle)||(k=r.handle=function(a){return typeof m===K||a&&m.event.triggered===a.type?void 0:m.event.dispatch.apply(k.elem,arguments)},k.elem=a),b=(b||"").match(E)||[""],h=b.length;while(h--)f=_.exec(b[h])||[],o=q=f[1],p=(f[2]||"").split(".").sort(),o&&(j=m.event.special[o]||{},o=(e?j.delegateType:j.bindType)||o,j=m.event.special[o]||{},l=m.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&m.expr.match.needsContext.test(e),namespace:p.join(".")},i),(n=g[o])||(n=g[o]=[],n.delegateCount=0,j.setup&&j.setup.call(a,d,p,k)!==!1||(a.addEventListener?a.addEventListener(o,k,!1):a.attachEvent&&a.attachEvent("on"+o,k))),j.add&&(j.add.call(a,l),l.handler.guid||(l.handler.guid=c.guid)),e?n.splice(n.delegateCount++,0,l):n.push(l),m.event.global[o]=!0);a=null}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,n,o,p,q,r=m.hasData(a)&&m._data(a);if(r&&(k=r.events)){b=(b||"").match(E)||[""],j=b.length;while(j--)if(h=_.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=m.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,n=k[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),i=f=n.length;while(f--)g=n[f],!e&&q!==g.origType||c&&c.guid!==g.guid||h&&!h.test(g.namespace)||d&&d!==g.selector&&("**"!==d||!g.selector)||(n.splice(f,1),g.selector&&n.delegateCount--,l.remove&&l.remove.call(a,g));i&&!n.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||m.removeEvent(a,o,r.handle),delete k[o])}else for(o in k)m.event.remove(a,o+b[j],c,d,!0);m.isEmptyObject(k)&&(delete r.handle,m._removeData(a,"events"))}},trigger:function(b,c,d,e){var f,g,h,i,k,l,n,o=[d||y],p=j.call(b,"type")?b.type:b,q=j.call(b,"namespace")?b.namespace.split("."):[];if(h=l=d=d||y,3!==d.nodeType&&8!==d.nodeType&&!$.test(p+m.event.triggered)&&(p.indexOf(".")>=0&&(q=p.split("."),p=q.shift(),q.sort()),g=p.indexOf(":")<0&&"on"+p,b=b[m.expando]?b:new m.Event(p,"object"==typeof b&&b),b.isTrigger=e?2:3,b.namespace=q.join("."),b.namespace_re=b.namespace?new RegExp("(^|\\.)"+q.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=d),c=null==c?[b]:m.makeArray(c,[b]),k=m.event.special[p]||{},e||!k.trigger||k.trigger.apply(d,c)!==!1)){if(!e&&!k.noBubble&&!m.isWindow(d)){for(i=k.delegateType||p,$.test(i+p)||(h=h.parentNode);h;h=h.parentNode)o.push(h),l=h;l===(d.ownerDocument||y)&&o.push(l.defaultView||l.parentWindow||a)}n=0;while((h=o[n++])&&!b.isPropagationStopped())b.type=n>1?i:k.bindType||p,f=(m._data(h,"events")||{})[b.type]&&m._data(h,"handle"),f&&f.apply(h,c),f=g&&h[g],f&&f.apply&&m.acceptData(h)&&(b.result=f.apply(h,c),b.result===!1&&b.preventDefault());if(b.type=p,!e&&!b.isDefaultPrevented()&&(!k._default||k._default.apply(o.pop(),c)===!1)&&m.acceptData(d)&&g&&d[p]&&!m.isWindow(d)){l=d[g],l&&(d[g]=null),m.event.triggered=p;try{d[p]()}catch(r){}m.event.triggered=void 0,l&&(d[g]=l)}return b.result}},dispatch:function(a){a=m.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(m._data(this,"events")||{})[a.type]||[],k=m.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=m.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,g=0;while((e=f.handlers[g++])&&!a.isImmediatePropagationStopped())(!a.namespace_re||a.namespace_re.test(e.namespace))&&(a.handleObj=e,a.data=e.data,c=((m.event.special[e.origType]||{}).handle||e.handler).apply(f.elem,i),void 0!==c&&(a.result=c)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||"click"!==a.type))for(;i!=this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(e=[],f=0;h>f;f++)d=b[f],c=d.selector+" ",void 0===e[c]&&(e[c]=d.needsContext?m(c,this).index(i)>=0:m.find(c,this,null,[i]).length),e[c]&&e.push(d);e.length&&g.push({elem:i,handlers:e})}return h<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},fix:function(a){if(a[m.expando])return a;var b,c,d,e=a.type,f=a,g=this.fixHooks[e];g||(this.fixHooks[e]=g=Z.test(e)?this.mouseHooks:Y.test(e)?this.keyHooks:{}),d=g.props?this.props.concat(g.props):this.props,a=new m.Event(f),b=d.length;while(b--)c=d[b],a[c]=f[c];return a.target||(a.target=f.srcElement||y),3===a.target.nodeType&&(a.target=a.target.parentNode),a.metaKey=!!a.metaKey,g.filter?g.filter(a,f):a},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){return null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){var c,d,e,f=b.button,g=b.fromElement;return null==a.pageX&&null!=b.clientX&&(d=a.target.ownerDocument||y,e=d.documentElement,c=d.body,a.pageX=b.clientX+(e&&e.scrollLeft||c&&c.scrollLeft||0)-(e&&e.clientLeft||c&&c.clientLeft||0),a.pageY=b.clientY+(e&&e.scrollTop||c&&c.scrollTop||0)-(e&&e.clientTop||c&&c.clientTop||0)),!a.relatedTarget&&g&&(a.relatedTarget=g===a.target?b.toElement:g),a.which||void 0===f||(a.which=1&f?1:2&f?3:4&f?2:0),a}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==ca()&&this.focus)try{return this.focus(),!1}catch(a){}},delegateType:"focusin"},blur:{trigger:function(){return this===ca()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return m.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):void 0},_default:function(a){return m.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&a.originalEvent&&(a.originalEvent.returnValue=a.result)}}},simulate:function(a,b,c,d){var e=m.extend(new m.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?m.event.trigger(e,null,b):m.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},m.removeEvent=y.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){var d="on"+b;a.detachEvent&&(typeof a[d]===K&&(a[d]=null),a.detachEvent(d,c))},m.Event=function(a,b){return this instanceof m.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&a.returnValue===!1?aa:ba):this.type=a,b&&m.extend(this,b),this.timeStamp=a&&a.timeStamp||m.now(),void(this[m.expando]=!0)):new m.Event(a,b)},m.Event.prototype={isDefaultPrevented:ba,isPropagationStopped:ba,isImmediatePropagationStopped:ba,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=aa,a&&(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=aa,a&&(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){var a=this.originalEvent;this.isImmediatePropagationStopped=aa,a&&a.stopImmediatePropagation&&a.stopImmediatePropagation(),this.stopPropagation()}},m.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(a,b){m.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return(!e||e!==d&&!m.contains(d,e))&&(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),k.submitBubbles||(m.event.special.submit={setup:function(){return m.nodeName(this,"form")?!1:void m.event.add(this,"click._submit keypress._submit",function(a){var b=a.target,c=m.nodeName(b,"input")||m.nodeName(b,"button")?b.form:void 0;c&&!m._data(c,"submitBubbles")&&(m.event.add(c,"submit._submit",function(a){a._submit_bubble=!0}),m._data(c,"submitBubbles",!0))})},postDispatch:function(a){a._submit_bubble&&(delete a._submit_bubble,this.parentNode&&!a.isTrigger&&m.event.simulate("submit",this.parentNode,a,!0))},teardown:function(){return m.nodeName(this,"form")?!1:void m.event.remove(this,"._submit")}}),k.changeBubbles||(m.event.special.change={setup:function(){return X.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(m.event.add(this,"propertychange._change",function(a){"checked"===a.originalEvent.propertyName&&(this._just_changed=!0)}),m.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1),m.event.simulate("change",this,a,!0)})),!1):void m.event.add(this,"beforeactivate._change",function(a){var b=a.target;X.test(b.nodeName)&&!m._data(b,"changeBubbles")&&(m.event.add(b,"change._change",function(a){!this.parentNode||a.isSimulated||a.isTrigger||m.event.simulate("change",this.parentNode,a,!0)}),m._data(b,"changeBubbles",!0))})},handle:function(a){var b=a.target;return this!==b||a.isSimulated||a.isTrigger||"radio"!==b.type&&"checkbox"!==b.type?a.handleObj.handler.apply(this,arguments):void 0},teardown:function(){return m.event.remove(this,"._change"),!X.test(this.nodeName)}}),k.focusinBubbles||m.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){m.event.simulate(b,a.target,m.event.fix(a),!0)};m.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=m._data(d,b);e||d.addEventListener(a,c,!0),m._data(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=m._data(d,b)-1;e?m._data(d,b,e):(d.removeEventListener(a,c,!0),m._removeData(d,b))}}}),m.fn.extend({on:function(a,b,c,d,e){var f,g;if("object"==typeof a){"string"!=typeof b&&(c=c||b,b=void 0);for(f in a)this.on(f,b,c,a[f],e);return this}if(null==c&&null==d?(d=b,c=b=void 0):null==d&&("string"==typeof b?(d=c,c=void 0):(d=c,c=b,b=void 0)),d===!1)d=ba;else if(!d)return this;return 1===e&&(g=d,d=function(a){return m().off(a),g.apply(this,arguments)},d.guid=g.guid||(g.guid=m.guid++)),this.each(function(){m.event.add(this,a,d,c,b)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,m(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return(b===!1||"function"==typeof b)&&(c=b,b=void 0),c===!1&&(c=ba),this.each(function(){m.event.remove(this,a,c,b)})},trigger:function(a,b){return this.each(function(){m.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?m.event.trigger(a,b,c,!0):void 0}});function da(a){var b=ea.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}var ea="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",fa=/ jQuery\d+="(?:null|\d+)"/g,ga=new RegExp("<(?:"+ea+")[\\s/>]","i"),ha=/^\s+/,ia=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,ja=/<([\w:]+)/,ka=/<tbody/i,la=/<|&#?\w+;/,ma=/<(?:script|style|link)/i,na=/checked\s*(?:[^=]|=\s*.checked.)/i,oa=/^$|\/(?:java|ecma)script/i,pa=/^true\/(.*)/,qa=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,ra={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:k.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},sa=da(y),ta=sa.appendChild(y.createElement("div"));ra.optgroup=ra.option,ra.tbody=ra.tfoot=ra.colgroup=ra.caption=ra.thead,ra.th=ra.td;function ua(a,b){var c,d,e=0,f=typeof a.getElementsByTagName!==K?a.getElementsByTagName(b||"*"):typeof a.querySelectorAll!==K?a.querySelectorAll(b||"*"):void 0;if(!f)for(f=[],c=a.childNodes||a;null!=(d=c[e]);e++)!b||m.nodeName(d,b)?f.push(d):m.merge(f,ua(d,b));return void 0===b||b&&m.nodeName(a,b)?m.merge([a],f):f}function va(a){W.test(a.type)&&(a.defaultChecked=a.checked)}function wa(a,b){return m.nodeName(a,"table")&&m.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function xa(a){return a.type=(null!==m.find.attr(a,"type"))+"/"+a.type,a}function ya(a){var b=pa.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function za(a,b){for(var c,d=0;null!=(c=a[d]);d++)m._data(c,"globalEval",!b||m._data(b[d],"globalEval"))}function Aa(a,b){if(1===b.nodeType&&m.hasData(a)){var c,d,e,f=m._data(a),g=m._data(b,f),h=f.events;if(h){delete g.handle,g.events={};for(c in h)for(d=0,e=h[c].length;e>d;d++)m.event.add(b,c,h[c][d])}g.data&&(g.data=m.extend({},g.data))}}function Ba(a,b){var c,d,e;if(1===b.nodeType){if(c=b.nodeName.toLowerCase(),!k.noCloneEvent&&b[m.expando]){e=m._data(b);for(d in e.events)m.removeEvent(b,d,e.handle);b.removeAttribute(m.expando)}"script"===c&&b.text!==a.text?(xa(b).text=a.text,ya(b)):"object"===c?(b.parentNode&&(b.outerHTML=a.outerHTML),k.html5Clone&&a.innerHTML&&!m.trim(b.innerHTML)&&(b.innerHTML=a.innerHTML)):"input"===c&&W.test(a.type)?(b.defaultChecked=b.checked=a.checked,b.value!==a.value&&(b.value=a.value)):"option"===c?b.defaultSelected=b.selected=a.defaultSelected:("input"===c||"textarea"===c)&&(b.defaultValue=a.defaultValue)}}m.extend({clone:function(a,b,c){var d,e,f,g,h,i=m.contains(a.ownerDocument,a);if(k.html5Clone||m.isXMLDoc(a)||!ga.test("<"+a.nodeName+">")?f=a.cloneNode(!0):(ta.innerHTML=a.outerHTML,ta.removeChild(f=ta.firstChild)),!(k.noCloneEvent&&k.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||m.isXMLDoc(a)))for(d=ua(f),h=ua(a),g=0;null!=(e=h[g]);++g)d[g]&&Ba(e,d[g]);if(b)if(c)for(h=h||ua(a),d=d||ua(f),g=0;null!=(e=h[g]);g++)Aa(e,d[g]);else Aa(a,f);return d=ua(f,"script"),d.length>0&&za(d,!i&&ua(a,"script")),d=h=e=null,f},buildFragment:function(a,b,c,d){for(var e,f,g,h,i,j,l,n=a.length,o=da(b),p=[],q=0;n>q;q++)if(f=a[q],f||0===f)if("object"===m.type(f))m.merge(p,f.nodeType?[f]:f);else if(la.test(f)){h=h||o.appendChild(b.createElement("div")),i=(ja.exec(f)||["",""])[1].toLowerCase(),l=ra[i]||ra._default,h.innerHTML=l[1]+f.replace(ia,"<$1></$2>")+l[2],e=l[0];while(e--)h=h.lastChild;if(!k.leadingWhitespace&&ha.test(f)&&p.push(b.createTextNode(ha.exec(f)[0])),!k.tbody){f="table"!==i||ka.test(f)?"<table>"!==l[1]||ka.test(f)?0:h:h.firstChild,e=f&&f.childNodes.length;while(e--)m.nodeName(j=f.childNodes[e],"tbody")&&!j.childNodes.length&&f.removeChild(j)}m.merge(p,h.childNodes),h.textContent="";while(h.firstChild)h.removeChild(h.firstChild);h=o.lastChild}else p.push(b.createTextNode(f));h&&o.removeChild(h),k.appendChecked||m.grep(ua(p,"input"),va),q=0;while(f=p[q++])if((!d||-1===m.inArray(f,d))&&(g=m.contains(f.ownerDocument,f),h=ua(o.appendChild(f),"script"),g&&za(h),c)){e=0;while(f=h[e++])oa.test(f.type||"")&&c.push(f)}return h=null,o},cleanData:function(a,b){for(var d,e,f,g,h=0,i=m.expando,j=m.cache,l=k.deleteExpando,n=m.event.special;null!=(d=a[h]);h++)if((b||m.acceptData(d))&&(f=d[i],g=f&&j[f])){if(g.events)for(e in g.events)n[e]?m.event.remove(d,e):m.removeEvent(d,e,g.handle);j[f]&&(delete j[f],l?delete d[i]:typeof d.removeAttribute!==K?d.removeAttribute(i):d[i]=null,c.push(f))}}}),m.fn.extend({text:function(a){return V(this,function(a){return void 0===a?m.text(this):this.empty().append((this[0]&&this[0].ownerDocument||y).createTextNode(a))},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wa(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=wa(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return this.domManip(arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},remove:function(a,b){for(var c,d=a?m.filter(a,this):this,e=0;null!=(c=d[e]);e++)b||1!==c.nodeType||m.cleanData(ua(c)),c.parentNode&&(b&&m.contains(c.ownerDocument,c)&&za(ua(c,"script")),c.parentNode.removeChild(c));return this},empty:function(){for(var a,b=0;null!=(a=this[b]);b++){1===a.nodeType&&m.cleanData(ua(a,!1));while(a.firstChild)a.removeChild(a.firstChild);a.options&&m.nodeName(a,"select")&&(a.options.length=0)}return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return m.clone(this,a,b)})},html:function(a){return V(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a)return 1===b.nodeType?b.innerHTML.replace(fa,""):void 0;if(!("string"!=typeof a||ma.test(a)||!k.htmlSerialize&&ga.test(a)||!k.leadingWhitespace&&ha.test(a)||ra[(ja.exec(a)||["",""])[1].toLowerCase()])){a=a.replace(ia,"<$1></$2>");try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(m.cleanData(ua(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];return this.domManip(arguments,function(b){a=this.parentNode,m.cleanData(ua(this)),a&&a.replaceChild(b,this)}),a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,!0)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,l=this.length,n=this,o=l-1,p=a[0],q=m.isFunction(p);if(q||l>1&&"string"==typeof p&&!k.checkClone&&na.test(p))return this.each(function(c){var d=n.eq(c);q&&(a[0]=p.call(this,c,d.html())),d.domManip(a,b)});if(l&&(i=m.buildFragment(a,this[0].ownerDocument,!1,this),c=i.firstChild,1===i.childNodes.length&&(i=c),c)){for(g=m.map(ua(i,"script"),xa),f=g.length;l>j;j++)d=i,j!==o&&(d=m.clone(d,!0,!0),f&&m.merge(g,ua(d,"script"))),b.call(this[j],d,j);if(f)for(h=g[g.length-1].ownerDocument,m.map(g,ya),j=0;f>j;j++)d=g[j],oa.test(d.type||"")&&!m._data(d,"globalEval")&&m.contains(h,d)&&(d.src?m._evalUrl&&m._evalUrl(d.src):m.globalEval((d.text||d.textContent||d.innerHTML||"").replace(qa,"")));i=c=null}return this}}),m.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){m.fn[a]=function(a){for(var c,d=0,e=[],g=m(a),h=g.length-1;h>=d;d++)c=d===h?this:this.clone(!0),m(g[d])[b](c),f.apply(e,c.get());return this.pushStack(e)}});var Ca,Da={};function Ea(b,c){var d,e=m(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:m.css(e[0],"display");return e.detach(),f}function Fa(a){var b=y,c=Da[a];return c||(c=Ea(a,b),"none"!==c&&c||(Ca=(Ca||m("<iframe frameborder='0' width='0' height='0'/>")).appendTo(b.documentElement),b=(Ca[0].contentWindow||Ca[0].contentDocument).document,b.write(),b.close(),c=Ea(a,b),Ca.detach()),Da[a]=c),c}!function(){var a;k.shrinkWrapBlocks=function(){if(null!=a)return a;a=!1;var b,c,d;return c=y.getElementsByTagName("body")[0],c&&c.style?(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),typeof b.style.zoom!==K&&(b.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:1px;width:1px;zoom:1",b.appendChild(y.createElement("div")).style.width="5px",a=3!==b.offsetWidth),c.removeChild(d),a):void 0}}();var Ga=/^margin/,Ha=new RegExp("^("+S+")(?!px)[a-z%]+$","i"),Ia,Ja,Ka=/^(top|right|bottom|left)$/;a.getComputedStyle?(Ia=function(b){return b.ownerDocument.defaultView.opener?b.ownerDocument.defaultView.getComputedStyle(b,null):a.getComputedStyle(b,null)},Ja=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Ia(a),g=c?c.getPropertyValue(b)||c[b]:void 0,c&&(""!==g||m.contains(a.ownerDocument,a)||(g=m.style(a,b)),Ha.test(g)&&Ga.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f)),void 0===g?g:g+""}):y.documentElement.currentStyle&&(Ia=function(a){return a.currentStyle},Ja=function(a,b,c){var d,e,f,g,h=a.style;return c=c||Ia(a),g=c?c[b]:void 0,null==g&&h&&h[b]&&(g=h[b]),Ha.test(g)&&!Ka.test(b)&&(d=h.left,e=a.runtimeStyle,f=e&&e.left,f&&(e.left=a.currentStyle.left),h.left="fontSize"===b?"1em":g,g=h.pixelLeft+"px",h.left=d,f&&(e.left=f)),void 0===g?g:g+""||"auto"});function La(a,b){return{get:function(){var c=a();if(null!=c)return c?void delete this.get:(this.get=b).apply(this,arguments)}}}!function(){var b,c,d,e,f,g,h;if(b=y.createElement("div"),b.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",d=b.getElementsByTagName("a")[0],c=d&&d.style){c.cssText="float:left;opacity:.5",k.opacity="0.5"===c.opacity,k.cssFloat=!!c.cssFloat,b.style.backgroundClip="content-box",b.cloneNode(!0).style.backgroundClip="",k.clearCloneStyle="content-box"===b.style.backgroundClip,k.boxSizing=""===c.boxSizing||""===c.MozBoxSizing||""===c.WebkitBoxSizing,m.extend(k,{reliableHiddenOffsets:function(){return null==g&&i(),g},boxSizingReliable:function(){return null==f&&i(),f},pixelPosition:function(){return null==e&&i(),e},reliableMarginRight:function(){return null==h&&i(),h}});function i(){var b,c,d,i;c=y.getElementsByTagName("body")[0],c&&c.style&&(b=y.createElement("div"),d=y.createElement("div"),d.style.cssText="position:absolute;border:0;width:0;height:0;top:0;left:-9999px",c.appendChild(d).appendChild(b),b.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute",e=f=!1,h=!0,a.getComputedStyle&&(e="1%"!==(a.getComputedStyle(b,null)||{}).top,f="4px"===(a.getComputedStyle(b,null)||{width:"4px"}).width,i=b.appendChild(y.createElement("div")),i.style.cssText=b.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",i.style.marginRight=i.style.width="0",b.style.width="1px",h=!parseFloat((a.getComputedStyle(i,null)||{}).marginRight),b.removeChild(i)),b.innerHTML="<table><tr><td></td><td>t</td></tr></table>",i=b.getElementsByTagName("td"),i[0].style.cssText="margin:0;border:0;padding:0;display:none",g=0===i[0].offsetHeight,g&&(i[0].style.display="",i[1].style.display="none",g=0===i[0].offsetHeight),c.removeChild(d))}}}(),m.swap=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e};var Ma=/alpha\([^)]*\)/i,Na=/opacity\s*=\s*([^)]*)/,Oa=/^(none|table(?!-c[ea]).+)/,Pa=new RegExp("^("+S+")(.*)$","i"),Qa=new RegExp("^([+-])=("+S+")","i"),Ra={position:"absolute",visibility:"hidden",display:"block"},Sa={letterSpacing:"0",fontWeight:"400"},Ta=["Webkit","O","Moz","ms"];function Ua(a,b){if(b in a)return b;var c=b.charAt(0).toUpperCase()+b.slice(1),d=b,e=Ta.length;while(e--)if(b=Ta[e]+c,b in a)return b;return d}function Va(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=m._data(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&U(d)&&(f[g]=m._data(d,"olddisplay",Fa(d.nodeName)))):(e=U(d),(c&&"none"!==c||!e)&&m._data(d,"olddisplay",e?c:m.css(d,"display"))));for(g=0;h>g;g++)d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"));return a}function Wa(a,b,c){var d=Pa.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function Xa(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;4>f;f+=2)"margin"===c&&(g+=m.css(a,c+T[f],!0,e)),d?("content"===c&&(g-=m.css(a,"padding"+T[f],!0,e)),"margin"!==c&&(g-=m.css(a,"border"+T[f]+"Width",!0,e))):(g+=m.css(a,"padding"+T[f],!0,e),"padding"!==c&&(g+=m.css(a,"border"+T[f]+"Width",!0,e)));return g}function Ya(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=Ia(a),g=k.boxSizing&&"border-box"===m.css(a,"boxSizing",!1,f);if(0>=e||null==e){if(e=Ja(a,b,f),(0>e||null==e)&&(e=a.style[b]),Ha.test(e))return e;d=g&&(k.boxSizingReliable()||e===a.style[b]),e=parseFloat(e)||0}return e+Xa(a,b,c||(g?"border":"content"),d,f)+"px"}m.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=Ja(a,"opacity");return""===c?"1":c}}}},cssNumber:{columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":k.cssFloat?"cssFloat":"styleFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=m.camelCase(b),i=a.style;if(b=m.cssProps[h]||(m.cssProps[h]=Ua(i,h)),g=m.cssHooks[b]||m.cssHooks[h],void 0===c)return g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b];if(f=typeof c,"string"===f&&(e=Qa.exec(c))&&(c=(e[1]+1)*e[2]+parseFloat(m.css(a,b)),f="number"),null!=c&&c===c&&("number"!==f||m.cssNumber[h]||(c+="px"),k.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),!(g&&"set"in g&&void 0===(c=g.set(a,c,d)))))try{i[b]=c}catch(j){}}},css:function(a,b,c,d){var e,f,g,h=m.camelCase(b);return b=m.cssProps[h]||(m.cssProps[h]=Ua(a.style,h)),g=m.cssHooks[b]||m.cssHooks[h],g&&"get"in g&&(f=g.get(a,!0,c)),void 0===f&&(f=Ja(a,b,d)),"normal"===f&&b in Sa&&(f=Sa[b]),""===c||c?(e=parseFloat(f),c===!0||m.isNumeric(e)?e||0:f):f}}),m.each(["height","width"],function(a,b){m.cssHooks[b]={get:function(a,c,d){return c?Oa.test(m.css(a,"display"))&&0===a.offsetWidth?m.swap(a,Ra,function(){return Ya(a,b,d)}):Ya(a,b,d):void 0},set:function(a,c,d){var e=d&&Ia(a);return Wa(a,c,d?Xa(a,b,d,k.boxSizing&&"border-box"===m.css(a,"boxSizing",!1,e),e):0)}}}),k.opacity||(m.cssHooks.opacity={get:function(a,b){return Na.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=m.isNumeric(b)?"alpha(opacity="+100*b+")":"",f=d&&d.filter||c.filter||"";c.zoom=1,(b>=1||""===b)&&""===m.trim(f.replace(Ma,""))&&c.removeAttribute&&(c.removeAttribute("filter"),""===b||d&&!d.filter)||(c.filter=Ma.test(f)?f.replace(Ma,e):f+" "+e)}}),m.cssHooks.marginRight=La(k.reliableMarginRight,function(a,b){return b?m.swap(a,{display:"inline-block"},Ja,[a,"marginRight"]):void 0}),m.each({margin:"",padding:"",border:"Width"},function(a,b){m.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+T[d]+b]=f[d]||f[d-2]||f[0];return e}},Ga.test(a)||(m.cssHooks[a+b].set=Wa)}),m.fn.extend({css:function(a,b){return V(this,function(a,b,c){var d,e,f={},g=0;if(m.isArray(b)){for(d=Ia(a),e=b.length;e>g;g++)f[b[g]]=m.css(a,b[g],!1,d);return f}return void 0!==c?m.style(a,b,c):m.css(a,b)},a,b,arguments.length>1)},show:function(){return Va(this,!0)},hide:function(){return Va(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){U(this)?m(this).show():m(this).hide()})}});function Za(a,b,c,d,e){
+return new Za.prototype.init(a,b,c,d,e)}m.Tween=Za,Za.prototype={constructor:Za,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||"swing",this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(m.cssNumber[c]?"":"px")},cur:function(){var a=Za.propHooks[this.prop];return a&&a.get?a.get(this):Za.propHooks._default.get(this)},run:function(a){var b,c=Za.propHooks[this.prop];return this.options.duration?this.pos=b=m.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):this.pos=b=a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):Za.propHooks._default.set(this),this}},Za.prototype.init.prototype=Za.prototype,Za.propHooks={_default:{get:function(a){var b;return null==a.elem[a.prop]||a.elem.style&&null!=a.elem.style[a.prop]?(b=m.css(a.elem,a.prop,""),b&&"auto"!==b?b:0):a.elem[a.prop]},set:function(a){m.fx.step[a.prop]?m.fx.step[a.prop](a):a.elem.style&&(null!=a.elem.style[m.cssProps[a.prop]]||m.cssHooks[a.prop])?m.style(a.elem,a.prop,a.now+a.unit):a.elem[a.prop]=a.now}}},Za.propHooks.scrollTop=Za.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},m.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}},m.fx=Za.prototype.init,m.fx.step={};var $a,_a,ab=/^(?:toggle|show|hide)$/,bb=new RegExp("^(?:([+-])=|)("+S+")([a-z%]*)$","i"),cb=/queueHooks$/,db=[ib],eb={"*":[function(a,b){var c=this.createTween(a,b),d=c.cur(),e=bb.exec(b),f=e&&e[3]||(m.cssNumber[a]?"":"px"),g=(m.cssNumber[a]||"px"!==f&&+d)&&bb.exec(m.css(c.elem,a)),h=1,i=20;if(g&&g[3]!==f){f=f||g[3],e=e||[],g=+d||1;do h=h||".5",g/=h,m.style(c.elem,a,g+f);while(h!==(h=c.cur()/d)&&1!==h&&--i)}return e&&(g=c.start=+g||+d||0,c.unit=f,c.end=e[1]?g+(e[1]+1)*e[2]:+e[2]),c}]};function fb(){return setTimeout(function(){$a=void 0}),$a=m.now()}function gb(a,b){var c,d={height:a},e=0;for(b=b?1:0;4>e;e+=2-b)c=T[e],d["margin"+c]=d["padding"+c]=a;return b&&(d.opacity=d.width=a),d}function hb(a,b,c){for(var d,e=(eb[b]||[]).concat(eb["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function ib(a,b,c){var d,e,f,g,h,i,j,l,n=this,o={},p=a.style,q=a.nodeType&&U(a),r=m._data(a,"fxshow");c.queue||(h=m._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,n.always(function(){n.always(function(){h.unqueued--,m.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[p.overflow,p.overflowX,p.overflowY],j=m.css(a,"display"),l="none"===j?m._data(a,"olddisplay")||Fa(a.nodeName):j,"inline"===l&&"none"===m.css(a,"float")&&(k.inlineBlockNeedsLayout&&"inline"!==Fa(a.nodeName)?p.zoom=1:p.display="inline-block")),c.overflow&&(p.overflow="hidden",k.shrinkWrapBlocks()||n.always(function(){p.overflow=c.overflow[0],p.overflowX=c.overflow[1],p.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],ab.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(q?"hide":"show")){if("show"!==e||!r||void 0===r[d])continue;q=!0}o[d]=r&&r[d]||m.style(a,d)}else j=void 0;if(m.isEmptyObject(o))"inline"===("none"===j?Fa(a.nodeName):j)&&(p.display=j);else{r?"hidden"in r&&(q=r.hidden):r=m._data(a,"fxshow",{}),f&&(r.hidden=!q),q?m(a).show():n.done(function(){m(a).hide()}),n.done(function(){var b;m._removeData(a,"fxshow");for(b in o)m.style(a,b,o[b])});for(d in o)g=hb(q?r[d]:0,d,n),d in r||(r[d]=g.start,q&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function jb(a,b){var c,d,e,f,g;for(c in a)if(d=m.camelCase(c),e=b[d],f=a[c],m.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=m.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function kb(a,b,c){var d,e,f=0,g=db.length,h=m.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=$a||fb(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;i>g;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:m.extend({},b),opts:m.extend(!0,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:$a||fb(),duration:c.duration,tweens:[],createTween:function(b,c){var d=m.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;d>c;c++)j.tweens[c].run(1);return b?h.resolveWith(a,[j,b]):h.rejectWith(a,[j,b]),this}}),k=j.props;for(jb(k,j.opts.specialEasing);g>f;f++)if(d=db[f].call(j,a,k,j.opts))return d;return m.map(k,hb,j),m.isFunction(j.opts.start)&&j.opts.start.call(a,j),m.fx.timer(m.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}m.Animation=m.extend(kb,{tweener:function(a,b){m.isFunction(a)?(b=a,a=["*"]):a=a.split(" ");for(var c,d=0,e=a.length;e>d;d++)c=a[d],eb[c]=eb[c]||[],eb[c].unshift(b)},prefilter:function(a,b){b?db.unshift(a):db.push(a)}}),m.speed=function(a,b,c){var d=a&&"object"==typeof a?m.extend({},a):{complete:c||!c&&b||m.isFunction(a)&&a,duration:a,easing:c&&b||b&&!m.isFunction(b)&&b};return d.duration=m.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in m.fx.speeds?m.fx.speeds[d.duration]:m.fx.speeds._default,(null==d.queue||d.queue===!0)&&(d.queue="fx"),d.old=d.complete,d.complete=function(){m.isFunction(d.old)&&d.old.call(this),d.queue&&m.dequeue(this,d.queue)},d},m.fn.extend({fadeTo:function(a,b,c,d){return this.filter(U).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=m.isEmptyObject(a),f=m.speed(b,c,d),g=function(){var b=kb(this,m.extend({},a),f);(e||m._data(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=m.timers,g=m._data(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&cb.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));(b||!c)&&m.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=m._data(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=m.timers,g=d?d.length:0;for(c.finish=!0,m.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),m.each(["toggle","show","hide"],function(a,b){var c=m.fn[b];m.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(gb(b,!0),a,d,e)}}),m.each({slideDown:gb("show"),slideUp:gb("hide"),slideToggle:gb("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){m.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),m.timers=[],m.fx.tick=function(){var a,b=m.timers,c=0;for($a=m.now();c<b.length;c++)a=b[c],a()||b[c]!==a||b.splice(c--,1);b.length||m.fx.stop(),$a=void 0},m.fx.timer=function(a){m.timers.push(a),a()?m.fx.start():m.timers.pop()},m.fx.interval=13,m.fx.start=function(){_a||(_a=setInterval(m.fx.tick,m.fx.interval))},m.fx.stop=function(){clearInterval(_a),_a=null},m.fx.speeds={slow:600,fast:200,_default:400},m.fn.delay=function(a,b){return a=m.fx?m.fx.speeds[a]||a:a,b=b||"fx",this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},function(){var a,b,c,d,e;b=y.createElement("div"),b.setAttribute("className","t"),b.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",d=b.getElementsByTagName("a")[0],c=y.createElement("select"),e=c.appendChild(y.createElement("option")),a=b.getElementsByTagName("input")[0],d.style.cssText="top:1px",k.getSetAttribute="t"!==b.className,k.style=/top/.test(d.getAttribute("style")),k.hrefNormalized="/a"===d.getAttribute("href"),k.checkOn=!!a.value,k.optSelected=e.selected,k.enctype=!!y.createElement("form").enctype,c.disabled=!0,k.optDisabled=!e.disabled,a=y.createElement("input"),a.setAttribute("value",""),k.input=""===a.getAttribute("value"),a.value="t",a.setAttribute("type","radio"),k.radioValue="t"===a.value}();var lb=/\r/g;m.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=m.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,m(this).val()):a,null==e?e="":"number"==typeof e?e+="":m.isArray(e)&&(e=m.map(e,function(a){return null==a?"":a+""})),b=m.valHooks[this.type]||m.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=m.valHooks[e.type]||m.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(lb,""):null==c?"":c)}}}),m.extend({valHooks:{option:{get:function(a){var b=m.find.attr(a,"value");return null!=b?b:m.trim(m.text(a))}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],!(!c.selected&&i!==e||(k.optDisabled?c.disabled:null!==c.getAttribute("disabled"))||c.parentNode.disabled&&m.nodeName(c.parentNode,"optgroup"))){if(b=m(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=m.makeArray(b),g=e.length;while(g--)if(d=e[g],m.inArray(m.valHooks.option.get(d),f)>=0)try{d.selected=c=!0}catch(h){d.scrollHeight}else d.selected=!1;return c||(a.selectedIndex=-1),e}}}}),m.each(["radio","checkbox"],function(){m.valHooks[this]={set:function(a,b){return m.isArray(b)?a.checked=m.inArray(m(a).val(),b)>=0:void 0}},k.checkOn||(m.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})});var mb,nb,ob=m.expr.attrHandle,pb=/^(?:checked|selected)$/i,qb=k.getSetAttribute,rb=k.input;m.fn.extend({attr:function(a,b){return V(this,m.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){m.removeAttr(this,a)})}}),m.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(a&&3!==f&&8!==f&&2!==f)return typeof a.getAttribute===K?m.prop(a,b,c):(1===f&&m.isXMLDoc(a)||(b=b.toLowerCase(),d=m.attrHooks[b]||(m.expr.match.bool.test(b)?nb:mb)),void 0===c?d&&"get"in d&&null!==(e=d.get(a,b))?e:(e=m.find.attr(a,b),null==e?void 0:e):null!==c?d&&"set"in d&&void 0!==(e=d.set(a,c,b))?e:(a.setAttribute(b,c+""),c):void m.removeAttr(a,b))},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(E);if(f&&1===a.nodeType)while(c=f[e++])d=m.propFix[c]||c,m.expr.match.bool.test(c)?rb&&qb||!pb.test(c)?a[d]=!1:a[m.camelCase("default-"+c)]=a[d]=!1:m.attr(a,c,""),a.removeAttribute(qb?c:d)},attrHooks:{type:{set:function(a,b){if(!k.radioValue&&"radio"===b&&m.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}}}),nb={set:function(a,b,c){return b===!1?m.removeAttr(a,c):rb&&qb||!pb.test(c)?a.setAttribute(!qb&&m.propFix[c]||c,c):a[m.camelCase("default-"+c)]=a[c]=!0,c}},m.each(m.expr.match.bool.source.match(/\w+/g),function(a,b){var c=ob[b]||m.find.attr;ob[b]=rb&&qb||!pb.test(b)?function(a,b,d){var e,f;return d||(f=ob[b],ob[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,ob[b]=f),e}:function(a,b,c){return c?void 0:a[m.camelCase("default-"+b)]?b.toLowerCase():null}}),rb&&qb||(m.attrHooks.value={set:function(a,b,c){return m.nodeName(a,"input")?void(a.defaultValue=b):mb&&mb.set(a,b,c)}}),qb||(mb={set:function(a,b,c){var d=a.getAttributeNode(c);return d||a.setAttributeNode(d=a.ownerDocument.createAttribute(c)),d.value=b+="","value"===c||b===a.getAttribute(c)?b:void 0}},ob.id=ob.name=ob.coords=function(a,b,c){var d;return c?void 0:(d=a.getAttributeNode(b))&&""!==d.value?d.value:null},m.valHooks.button={get:function(a,b){var c=a.getAttributeNode(b);return c&&c.specified?c.value:void 0},set:mb.set},m.attrHooks.contenteditable={set:function(a,b,c){mb.set(a,""===b?!1:b,c)}},m.each(["width","height"],function(a,b){m.attrHooks[b]={set:function(a,c){return""===c?(a.setAttribute(b,"auto"),c):void 0}}})),k.style||(m.attrHooks.style={get:function(a){return a.style.cssText||void 0},set:function(a,b){return a.style.cssText=b+""}});var sb=/^(?:input|select|textarea|button|object)$/i,tb=/^(?:a|area)$/i;m.fn.extend({prop:function(a,b){return V(this,m.prop,a,b,arguments.length>1)},removeProp:function(a){return a=m.propFix[a]||a,this.each(function(){try{this[a]=void 0,delete this[a]}catch(b){}})}}),m.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(a,b,c){var d,e,f,g=a.nodeType;if(a&&3!==g&&8!==g&&2!==g)return f=1!==g||!m.isXMLDoc(a),f&&(b=m.propFix[b]||b,e=m.propHooks[b]),void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){var b=m.find.attr(a,"tabindex");return b?parseInt(b,10):sb.test(a.nodeName)||tb.test(a.nodeName)&&a.href?0:-1}}}}),k.hrefNormalized||m.each(["href","src"],function(a,b){m.propHooks[b]={get:function(a){return a.getAttribute(b,4)}}}),k.optSelected||(m.propHooks.selected={get:function(a){var b=a.parentNode;return b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex),null}}),m.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){m.propFix[this.toLowerCase()]=this}),k.enctype||(m.propFix.enctype="encoding");var ub=/[\t\r\n\f]/g;m.fn.extend({addClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j="string"==typeof a&&a;if(m.isFunction(a))return this.each(function(b){m(this).addClass(a.call(this,b,this.className))});if(j)for(b=(a||"").match(E)||[];i>h;h++)if(c=this[h],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(ub," "):" ")){f=0;while(e=b[f++])d.indexOf(" "+e+" ")<0&&(d+=e+" ");g=m.trim(d),c.className!==g&&(c.className=g)}return this},removeClass:function(a){var b,c,d,e,f,g,h=0,i=this.length,j=0===arguments.length||"string"==typeof a&&a;if(m.isFunction(a))return this.each(function(b){m(this).removeClass(a.call(this,b,this.className))});if(j)for(b=(a||"").match(E)||[];i>h;h++)if(c=this[h],d=1===c.nodeType&&(c.className?(" "+c.className+" ").replace(ub," "):"")){f=0;while(e=b[f++])while(d.indexOf(" "+e+" ")>=0)d=d.replace(" "+e+" "," ");g=a?m.trim(d):"",c.className!==g&&(c.className=g)}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):this.each(m.isFunction(a)?function(c){m(this).toggleClass(a.call(this,c,this.className,b),b)}:function(){if("string"===c){var b,d=0,e=m(this),f=a.match(E)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else(c===K||"boolean"===c)&&(this.className&&m._data(this,"__className__",this.className),this.className=this.className||a===!1?"":m._data(this,"__className__")||"")})},hasClass:function(a){for(var b=" "+a+" ",c=0,d=this.length;d>c;c++)if(1===this[c].nodeType&&(" "+this[c].className+" ").replace(ub," ").indexOf(b)>=0)return!0;return!1}}),m.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){m.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),m.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)}});var vb=m.now(),wb=/\?/,xb=/(,)|(\[|{)|(}|])|"(?:[^"\\\r\n]|\\["\\\/bfnrt]|\\u[\da-fA-F]{4})*"\s*:?|true|false|null|-?(?!0\d)\d+(?:\.\d+|)(?:[eE][+-]?\d+|)/g;m.parseJSON=function(b){if(a.JSON&&a.JSON.parse)return a.JSON.parse(b+"");var c,d=null,e=m.trim(b+"");return e&&!m.trim(e.replace(xb,function(a,b,e,f){return c&&b&&(d=0),0===d?a:(c=e||b,d+=!f-!e,"")}))?Function("return "+e)():m.error("Invalid JSON: "+b)},m.parseXML=function(b){var c,d;if(!b||"string"!=typeof b)return null;try{a.DOMParser?(d=new DOMParser,c=d.parseFromString(b,"text/xml")):(c=new ActiveXObject("Microsoft.XMLDOM"),c.async="false",c.loadXML(b))}catch(e){c=void 0}return c&&c.documentElement&&!c.getElementsByTagName("parsererror").length||m.error("Invalid XML: "+b),c};var yb,zb,Ab=/#.*$/,Bb=/([?&])_=[^&]*/,Cb=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Db=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Eb=/^(?:GET|HEAD)$/,Fb=/^\/\//,Gb=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,Hb={},Ib={},Jb="*/".concat("*");try{zb=location.href}catch(Kb){zb=y.createElement("a"),zb.href="",zb=zb.href}yb=Gb.exec(zb.toLowerCase())||[];function Lb(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(E)||[];if(m.isFunction(c))while(d=f[e++])"+"===d.charAt(0)?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function Mb(a,b,c,d){var e={},f=a===Ib;function g(h){var i;return e[h]=!0,m.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function Nb(a,b){var c,d,e=m.ajaxSettings.flatOptions||{};for(d in b)void 0!==b[d]&&((e[d]?a:c||(c={}))[d]=b[d]);return c&&m.extend(!0,a,c),a}function Ob(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===e&&(e=a.mimeType||b.getResponseHeader("Content-Type"));if(e)for(g in h)if(h[g]&&h[g].test(e)){i.unshift(g);break}if(i[0]in c)f=i[0];else{for(g in c){if(!i[0]||a.converters[g+" "+i[0]]){f=g;break}d||(d=g)}f=f||d}return f?(f!==i[0]&&i.unshift(f),c[f]):void 0}function Pb(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}m.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:zb,type:"GET",isLocal:Db.test(yb[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Jb,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":m.parseJSON,"text xml":m.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?Nb(Nb(a,m.ajaxSettings),b):Nb(m.ajaxSettings,a)},ajaxPrefilter:Lb(Hb),ajaxTransport:Lb(Ib),ajax:function(a,b){"object"==typeof a&&(b=a,a=void 0),b=b||{};var c,d,e,f,g,h,i,j,k=m.ajaxSetup({},b),l=k.context||k,n=k.context&&(l.nodeType||l.jquery)?m(l):m.event,o=m.Deferred(),p=m.Callbacks("once memory"),q=k.statusCode||{},r={},s={},t=0,u="canceled",v={readyState:0,getResponseHeader:function(a){var b;if(2===t){if(!j){j={};while(b=Cb.exec(f))j[b[1].toLowerCase()]=b[2]}b=j[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===t?f:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return t||(a=s[c]=s[c]||a,r[a]=b),this},overrideMimeType:function(a){return t||(k.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>t)for(b in a)q[b]=[q[b],a[b]];else v.always(a[v.status]);return this},abort:function(a){var b=a||u;return i&&i.abort(b),x(0,b),this}};if(o.promise(v).complete=p.add,v.success=v.done,v.error=v.fail,k.url=((a||k.url||zb)+"").replace(Ab,"").replace(Fb,yb[1]+"//"),k.type=b.method||b.type||k.method||k.type,k.dataTypes=m.trim(k.dataType||"*").toLowerCase().match(E)||[""],null==k.crossDomain&&(c=Gb.exec(k.url.toLowerCase()),k.crossDomain=!(!c||c[1]===yb[1]&&c[2]===yb[2]&&(c[3]||("http:"===c[1]?"80":"443"))===(yb[3]||("http:"===yb[1]?"80":"443")))),k.data&&k.processData&&"string"!=typeof k.data&&(k.data=m.param(k.data,k.traditional)),Mb(Hb,k,b,v),2===t)return v;h=m.event&&k.global,h&&0===m.active++&&m.event.trigger("ajaxStart"),k.type=k.type.toUpperCase(),k.hasContent=!Eb.test(k.type),e=k.url,k.hasContent||(k.data&&(e=k.url+=(wb.test(e)?"&":"?")+k.data,delete k.data),k.cache===!1&&(k.url=Bb.test(e)?e.replace(Bb,"$1_="+vb++):e+(wb.test(e)?"&":"?")+"_="+vb++)),k.ifModified&&(m.lastModified[e]&&v.setRequestHeader("If-Modified-Since",m.lastModified[e]),m.etag[e]&&v.setRequestHeader("If-None-Match",m.etag[e])),(k.data&&k.hasContent&&k.contentType!==!1||b.contentType)&&v.setRequestHeader("Content-Type",k.contentType),v.setRequestHeader("Accept",k.dataTypes[0]&&k.accepts[k.dataTypes[0]]?k.accepts[k.dataTypes[0]]+("*"!==k.dataTypes[0]?", "+Jb+"; q=0.01":""):k.accepts["*"]);for(d in k.headers)v.setRequestHeader(d,k.headers[d]);if(k.beforeSend&&(k.beforeSend.call(l,v,k)===!1||2===t))return v.abort();u="abort";for(d in{success:1,error:1,complete:1})v[d](k[d]);if(i=Mb(Ib,k,b,v)){v.readyState=1,h&&n.trigger("ajaxSend",[v,k]),k.async&&k.timeout>0&&(g=setTimeout(function(){v.abort("timeout")},k.timeout));try{t=1,i.send(r,x)}catch(w){if(!(2>t))throw w;x(-1,w)}}else x(-1,"No Transport");function x(a,b,c,d){var j,r,s,u,w,x=b;2!==t&&(t=2,g&&clearTimeout(g),i=void 0,f=d||"",v.readyState=a>0?4:0,j=a>=200&&300>a||304===a,c&&(u=Ob(k,v,c)),u=Pb(k,u,v,j),j?(k.ifModified&&(w=v.getResponseHeader("Last-Modified"),w&&(m.lastModified[e]=w),w=v.getResponseHeader("etag"),w&&(m.etag[e]=w)),204===a||"HEAD"===k.type?x="nocontent":304===a?x="notmodified":(x=u.state,r=u.data,s=u.error,j=!s)):(s=x,(a||!x)&&(x="error",0>a&&(a=0))),v.status=a,v.statusText=(b||x)+"",j?o.resolveWith(l,[r,x,v]):o.rejectWith(l,[v,x,s]),v.statusCode(q),q=void 0,h&&n.trigger(j?"ajaxSuccess":"ajaxError",[v,k,j?r:s]),p.fireWith(l,[v,x]),h&&(n.trigger("ajaxComplete",[v,k]),--m.active||m.event.trigger("ajaxStop")))}return v},getJSON:function(a,b,c){return m.get(a,b,c,"json")},getScript:function(a,b){return m.get(a,void 0,b,"script")}}),m.each(["get","post"],function(a,b){m[b]=function(a,c,d,e){return m.isFunction(c)&&(e=e||d,d=c,c=void 0),m.ajax({url:a,type:b,dataType:e,data:c,success:d})}}),m._evalUrl=function(a){return m.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},m.fn.extend({wrapAll:function(a){if(m.isFunction(a))return this.each(function(b){m(this).wrapAll(a.call(this,b))});if(this[0]){var b=m(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&1===a.firstChild.nodeType)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){return this.each(m.isFunction(a)?function(b){m(this).wrapInner(a.call(this,b))}:function(){var b=m(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=m.isFunction(a);return this.each(function(c){m(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){m.nodeName(this,"body")||m(this).replaceWith(this.childNodes)}).end()}}),m.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0||!k.reliableHiddenOffsets()&&"none"===(a.style&&a.style.display||m.css(a,"display"))},m.expr.filters.visible=function(a){return!m.expr.filters.hidden(a)};var Qb=/%20/g,Rb=/\[\]$/,Sb=/\r?\n/g,Tb=/^(?:submit|button|image|reset|file)$/i,Ub=/^(?:input|select|textarea|keygen)/i;function Vb(a,b,c,d){var e;if(m.isArray(b))m.each(b,function(b,e){c||Rb.test(a)?d(a,e):Vb(a+"["+("object"==typeof e?b:"")+"]",e,c,d)});else if(c||"object"!==m.type(b))d(a,b);else for(e in b)Vb(a+"["+e+"]",b[e],c,d)}m.param=function(a,b){var c,d=[],e=function(a,b){b=m.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=m.ajaxSettings&&m.ajaxSettings.traditional),m.isArray(a)||a.jquery&&!m.isPlainObject(a))m.each(a,function(){e(this.name,this.value)});else for(c in a)Vb(c,a[c],b,e);return d.join("&").replace(Qb,"+")},m.fn.extend({serialize:function(){return m.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=m.prop(this,"elements");return a?m.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!m(this).is(":disabled")&&Ub.test(this.nodeName)&&!Tb.test(a)&&(this.checked||!W.test(a))}).map(function(a,b){var c=m(this).val();return null==c?null:m.isArray(c)?m.map(c,function(a){return{name:b.name,value:a.replace(Sb,"\r\n")}}):{name:b.name,value:c.replace(Sb,"\r\n")}}).get()}}),m.ajaxSettings.xhr=void 0!==a.ActiveXObject?function(){return!this.isLocal&&/^(get|post|head|put|delete|options)$/i.test(this.type)&&Zb()||$b()}:Zb;var Wb=0,Xb={},Yb=m.ajaxSettings.xhr();a.attachEvent&&a.attachEvent("onunload",function(){for(var a in Xb)Xb[a](void 0,!0)}),k.cors=!!Yb&&"withCredentials"in Yb,Yb=k.ajax=!!Yb,Yb&&m.ajaxTransport(function(a){if(!a.crossDomain||k.cors){var b;return{send:function(c,d){var e,f=a.xhr(),g=++Wb;if(f.open(a.type,a.url,a.async,a.username,a.password),a.xhrFields)for(e in a.xhrFields)f[e]=a.xhrFields[e];a.mimeType&&f.overrideMimeType&&f.overrideMimeType(a.mimeType),a.crossDomain||c["X-Requested-With"]||(c["X-Requested-With"]="XMLHttpRequest");for(e in c)void 0!==c[e]&&f.setRequestHeader(e,c[e]+"");f.send(a.hasContent&&a.data||null),b=function(c,e){var h,i,j;if(b&&(e||4===f.readyState))if(delete Xb[g],b=void 0,f.onreadystatechange=m.noop,e)4!==f.readyState&&f.abort();else{j={},h=f.status,"string"==typeof f.responseText&&(j.text=f.responseText);try{i=f.statusText}catch(k){i=""}h||!a.isLocal||a.crossDomain?1223===h&&(h=204):h=j.text?200:404}j&&d(h,i,j,f.getAllResponseHeaders())},a.async?4===f.readyState?setTimeout(b):f.onreadystatechange=Xb[g]=b:b()},abort:function(){b&&b(void 0,!0)}}}});function Zb(){try{return new a.XMLHttpRequest}catch(b){}}function $b(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}m.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){return m.globalEval(a),a}}}),m.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),m.ajaxTransport("script",function(a){if(a.crossDomain){var b,c=y.head||m("head")[0]||y.documentElement;return{send:function(d,e){b=y.createElement("script"),b.async=!0,a.scriptCharset&&(b.charset=a.scriptCharset),b.src=a.url,b.onload=b.onreadystatechange=function(a,c){(c||!b.readyState||/loaded|complete/.test(b.readyState))&&(b.onload=b.onreadystatechange=null,b.parentNode&&b.parentNode.removeChild(b),b=null,c||e(200,"success"))},c.insertBefore(b,c.firstChild)},abort:function(){b&&b.onload(void 0,!0)}}}});var _b=[],ac=/(=)\?(?=&|$)|\?\?/;m.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=_b.pop()||m.expando+"_"+vb++;return this[a]=!0,a}}),m.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(ac.test(b.url)?"url":"string"==typeof b.data&&!(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&ac.test(b.data)&&"data");return h||"jsonp"===b.dataTypes[0]?(e=b.jsonpCallback=m.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(ac,"$1"+e):b.jsonp!==!1&&(b.url+=(wb.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||m.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,_b.push(e)),g&&m.isFunction(f)&&f(g[0]),g=f=void 0}),"script"):void 0}),m.parseHTML=function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||y;var d=u.exec(a),e=!c&&[];return d?[b.createElement(d[1])]:(d=m.buildFragment([a],b,e),e&&e.length&&m(e).remove(),m.merge([],d.childNodes))};var bc=m.fn.load;m.fn.load=function(a,b,c){if("string"!=typeof a&&bc)return bc.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(" ");return h>=0&&(d=m.trim(a.slice(h,a.length)),a=a.slice(0,h)),m.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(f="POST"),g.length>0&&m.ajax({url:a,type:f,dataType:"html",data:b}).done(function(a){e=arguments,g.html(d?m("<div>").append(m.parseHTML(a)).find(d):a)}).complete(c&&function(a,b){g.each(c,e||[a.responseText,b,a])}),this},m.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){m.fn[b]=function(a){return this.on(b,a)}}),m.expr.filters.animated=function(a){return m.grep(m.timers,function(b){return a===b.elem}).length};var cc=a.document.documentElement;function dc(a){return m.isWindow(a)?a:9===a.nodeType?a.defaultView||a.parentWindow:!1}m.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=m.css(a,"position"),l=m(a),n={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=m.css(a,"top"),i=m.css(a,"left"),j=("absolute"===k||"fixed"===k)&&m.inArray("auto",[f,i])>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),m.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(n.top=b.top-h.top+g),null!=b.left&&(n.left=b.left-h.left+e),"using"in b?b.using.call(a,n):l.css(n)}},m.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){m.offset.setOffset(this,a,b)});var b,c,d={top:0,left:0},e=this[0],f=e&&e.ownerDocument;if(f)return b=f.documentElement,m.contains(b,e)?(typeof e.getBoundingClientRect!==K&&(d=e.getBoundingClientRect()),c=dc(f),{top:d.top+(c.pageYOffset||b.scrollTop)-(b.clientTop||0),left:d.left+(c.pageXOffset||b.scrollLeft)-(b.clientLeft||0)}):d},position:function(){if(this[0]){var a,b,c={top:0,left:0},d=this[0];return"fixed"===m.css(d,"position")?b=d.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),m.nodeName(a[0],"html")||(c=a.offset()),c.top+=m.css(a[0],"borderTopWidth",!0),c.left+=m.css(a[0],"borderLeftWidth",!0)),{top:b.top-c.top-m.css(d,"marginTop",!0),left:b.left-c.left-m.css(d,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||cc;while(a&&!m.nodeName(a,"html")&&"static"===m.css(a,"position"))a=a.offsetParent;return a||cc})}}),m.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,b){var c=/Y/.test(b);m.fn[a]=function(d){return V(this,function(a,d,e){var f=dc(a);return void 0===e?f?b in f?f[b]:f.document.documentElement[d]:a[d]:void(f?f.scrollTo(c?m(f).scrollLeft():e,c?e:m(f).scrollTop()):a[d]=e)},a,d,arguments.length,null)}}),m.each(["top","left"],function(a,b){m.cssHooks[b]=La(k.pixelPosition,function(a,c){return c?(c=Ja(a,b),Ha.test(c)?m(a).position()[b]+"px":c):void 0})}),m.each({Height:"height",Width:"width"},function(a,b){m.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){m.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return V(this,function(b,c,d){var e;return m.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?m.css(b,c,g):m.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),m.fn.size=function(){return this.length},m.fn.andSelf=m.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return m});var ec=a.jQuery,fc=a.$;return m.noConflict=function(b){return a.$===m&&(a.$=fc),b&&a.jQuery===m&&(a.jQuery=ec),m},typeof b===K&&(a.jQuery=a.$=m),m});
diff --git a/op25/gr-op25_repeater/apps/oplog/op25/static/jquery/jquery-2.2.4.min.js b/op25/gr-op25_repeater/apps/oplog/op25/static/jquery/jquery-2.2.4.min.js
new file mode 100644
index 0000000..4024b66
--- /dev/null
+++ b/op25/gr-op25_repeater/apps/oplog/op25/static/jquery/jquery-2.2.4.min.js
@@ -0,0 +1,4 @@
+/*! jQuery v2.2.4 | (c) jQuery Foundation | jquery.org/license */
+!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){var c=[],d=a.document,e=c.slice,f=c.concat,g=c.push,h=c.indexOf,i={},j=i.toString,k=i.hasOwnProperty,l={},m="2.2.4",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return e.call(this)},get:function(a){return null!=a?0>a?this[a+this.length]:this[a]:e.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);return b.prevObject=this,b.context=this.context,b},each:function(a){return n.each(this,a)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(e.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(0>a?b:0);return this.pushStack(c>=0&&b>c?[this[c]]:[])},end:function(){return this.prevObject||this.constructor()},push:g,sort:c.sort,splice:c.splice},n.extend=n.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=!1;for("boolean"==typeof g&&(j=g,g=arguments[h]||{},h++),"object"==typeof g||n.isFunction(g)||(g={}),h===i&&(g=this,h--);i>h;h++)if(null!=(a=arguments[h]))for(b in a)c=g[b],d=a[b],g!==d&&(j&&d&&(n.isPlainObject(d)||(e=n.isArray(d)))?(e?(e=!1,f=c&&n.isArray(c)?c:[]):f=c&&n.isPlainObject(c)?c:{},g[b]=n.extend(j,f,d)):void 0!==d&&(g[b]=d));return g},n.extend({expando:"jQuery"+(m+Math.random()).replace(/\D/g,""),isReady:!0,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return"function"===n.type(a)},isArray:Array.isArray,isWindow:function(a){return null!=a&&a===a.window},isNumeric:function(a){var b=a&&a.toString();return!n.isArray(a)&&b-parseFloat(b)+1>=0},isPlainObject:function(a){var b;if("object"!==n.type(a)||a.nodeType||n.isWindow(a))return!1;if(a.constructor&&!k.call(a,"constructor")&&!k.call(a.constructor.prototype||{},"isPrototypeOf"))return!1;for(b in a);return void 0===b||k.call(a,b)},isEmptyObject:function(a){var b;for(b in a)return!1;return!0},type:function(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?i[j.call(a)]||"object":typeof a},globalEval:function(a){var b,c=eval;a=n.trim(a),a&&(1===a.indexOf("use strict")?(b=d.createElement("script"),b.text=a,d.head.appendChild(b).parentNode.removeChild(b)):c(a))},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b){var c,d=0;if(s(a)){for(c=a.length;c>d;d++)if(b.call(a[d],d,a[d])===!1)break}else for(d in a)if(b.call(a[d],d,a[d])===!1)break;return a},trim:function(a){return null==a?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];return null!=a&&(s(Object(a))?n.merge(c,"string"==typeof a?[a]:a):g.call(c,a)),c},inArray:function(a,b,c){return null==b?-1:h.call(b,a,c)},merge:function(a,b){for(var c=+b.length,d=0,e=a.length;c>d;d++)a[e++]=b[d];return a.length=e,a},grep:function(a,b,c){for(var d,e=[],f=0,g=a.length,h=!c;g>f;f++)d=!b(a[f],f),d!==h&&e.push(a[f]);return e},map:function(a,b,c){var d,e,g=0,h=[];if(s(a))for(d=a.length;d>g;g++)e=b(a[g],g,c),null!=e&&h.push(e);else for(g in a)e=b(a[g],g,c),null!=e&&h.push(e);return f.apply([],h)},guid:1,proxy:function(a,b){var c,d,f;return"string"==typeof b&&(c=a[b],b=a,a=c),n.isFunction(a)?(d=e.call(arguments,2),f=function(){return a.apply(b||this,d.concat(e.call(arguments)))},f.guid=a.guid=a.guid||n.guid++,f):void 0},now:Date.now,support:l}),"function"==typeof Symbol&&(n.fn[Symbol.iterator]=c[Symbol.iterator]),n.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(a,b){i["[object "+b+"]"]=b.toLowerCase()});function s(a){var b=!!a&&"length"in a&&a.length,c=n.type(a);return"function"===c||n.isWindow(a)?!1:"array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=ga(),z=ga(),A=ga(),B=function(a,b){return a===b&&(l=!0),0},C=1<<31,D={}.hasOwnProperty,E=[],F=E.pop,G=E.push,H=E.push,I=E.slice,J=function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},K="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",L="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",N="\\["+L+"*("+M+")(?:"+L+"*([*^$|!~]?=)"+L+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+M+"))|)"+L+"*\\]",O=":("+M+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+N+")*)|.*)\\)|)",P=new RegExp(L+"+","g"),Q=new RegExp("^"+L+"+|((?:^|[^\\\\])(?:\\\\.)*)"+L+"+$","g"),R=new RegExp("^"+L+"*,"+L+"*"),S=new RegExp("^"+L+"*([>+~]|"+L+")"+L+"*"),T=new RegExp("="+L+"*([^\\]'\"]*?)"+L+"*\\]","g"),U=new RegExp(O),V=new RegExp("^"+M+"$"),W={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),TAG:new RegExp("^("+M+"|[*])"),ATTR:new RegExp("^"+N),PSEUDO:new RegExp("^"+O),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+L+"*(even|odd|(([+-]|)(\\d*)n|)"+L+"*(?:([+-]|)"+L+"*(\\d+)|))"+L+"*\\)|)","i"),bool:new RegExp("^(?:"+K+")$","i"),needsContext:new RegExp("^"+L+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+L+"*((?:-\\d)?\\d*)"+L+"*\\)|)(?=[^-]|$)","i")},X=/^(?:input|select|textarea|button)$/i,Y=/^h\d$/i,Z=/^[^{]+\{\s*\[native \w/,$=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,_=/[+~]/,aa=/'|\\/g,ba=new RegExp("\\\\([\\da-f]{1,6}"+L+"?|("+L+")|.)","ig"),ca=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},da=function(){m()};try{H.apply(E=I.call(v.childNodes),v.childNodes),E[v.childNodes.length].nodeType}catch(ea){H={apply:E.length?function(a,b){G.apply(a,I.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function fa(a,b,d,e){var f,h,j,k,l,o,r,s,w=b&&b.ownerDocument,x=b?b.nodeType:9;if(d=d||[],"string"!=typeof a||!a||1!==x&&9!==x&&11!==x)return d;if(!e&&((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,p)){if(11!==x&&(o=$.exec(a)))if(f=o[1]){if(9===x){if(!(j=b.getElementById(f)))return d;if(j.id===f)return d.push(j),d}else if(w&&(j=w.getElementById(f))&&t(b,j)&&j.id===f)return d.push(j),d}else{if(o[2])return H.apply(d,b.getElementsByTagName(a)),d;if((f=o[3])&&c.getElementsByClassName&&b.getElementsByClassName)return H.apply(d,b.getElementsByClassName(f)),d}if(c.qsa&&!A[a+" "]&&(!q||!q.test(a))){if(1!==x)w=b,s=a;else if("object"!==b.nodeName.toLowerCase()){(k=b.getAttribute("id"))?k=k.replace(aa,"\\$&"):b.setAttribute("id",k=u),r=g(a),h=r.length,l=V.test(k)?"#"+k:"[id='"+k+"']";while(h--)r[h]=l+" "+qa(r[h]);s=r.join(","),w=_.test(a)&&oa(b.parentNode)||b}if(s)try{return H.apply(d,w.querySelectorAll(s)),d}catch(y){}finally{k===u&&b.removeAttribute("id")}}}return i(a.replace(Q,"$1"),b,d,e)}function ga(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ha(a){return a[u]=!0,a}function ia(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function ja(a,b){var c=a.split("|"),e=c.length;while(e--)d.attrHandle[c[e]]=b}function ka(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||C)-(~a.sourceIndex||C);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function la(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function ma(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function na(a){return ha(function(b){return b=+b,ha(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function oa(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=fa.support={},f=fa.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=fa.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=n.documentElement,p=!f(n),(e=n.defaultView)&&e.top!==e&&(e.addEventListener?e.addEventListener("unload",da,!1):e.attachEvent&&e.attachEvent("onunload",da)),c.attributes=ia(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=ia(function(a){return a.appendChild(n.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=Z.test(n.getElementsByClassName),c.getById=ia(function(a){return o.appendChild(a).id=u,!n.getElementsByName||!n.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c=b.getElementById(a);return c?[c]:[]}},d.filter.ID=function(a){var b=a.replace(ba,ca);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(ba,ca);return function(a){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):c.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return"undefined"!=typeof b.getElementsByClassName&&p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=Z.test(n.querySelectorAll))&&(ia(function(a){o.appendChild(a).innerHTML="<a id='"+u+"'></a><select id='"+u+"-\r\\' msallowcapture=''><option selected=''></option></select>",a.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+L+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+L+"*(?:value|"+K+")"),a.querySelectorAll("[id~="+u+"-]").length||q.push("~="),a.querySelectorAll(":checked").length||q.push(":checked"),a.querySelectorAll("a#"+u+"+*").length||q.push(".#.+[+~]")}),ia(function(a){var b=n.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+L+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=Z.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&ia(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",O)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=Z.test(o.compareDocumentPosition),t=b||Z.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===n||a.ownerDocument===v&&t(v,a)?-1:b===n||b.ownerDocument===v&&t(v,b)?1:k?J(k,a)-J(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,e=a.parentNode,f=b.parentNode,g=[a],h=[b];if(!e||!f)return a===n?-1:b===n?1:e?-1:f?1:k?J(k,a)-J(k,b):0;if(e===f)return ka(a,b);c=a;while(c=c.parentNode)g.unshift(c);c=b;while(c=c.parentNode)h.unshift(c);while(g[d]===h[d])d++;return d?ka(g[d],h[d]):g[d]===v?-1:h[d]===v?1:0},n):n},fa.matches=function(a,b){return fa(a,null,null,b)},fa.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(T,"='$1']"),c.matchesSelector&&p&&!A[b+" "]&&(!r||!r.test(b))&&(!q||!q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return fa(b,n,null,[a]).length>0},fa.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},fa.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&D.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},fa.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},fa.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=fa.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=fa.selectors={cacheLength:50,createPseudo:ha,match:W,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(ba,ca),a[3]=(a[3]||a[4]||a[5]||"").replace(ba,ca),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||fa.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&fa.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return W.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&U.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(ba,ca).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+L+")"+a+"("+L+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=fa.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e.replace(P," ")+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h,t=!1;if(q){if(f){while(p){m=b;while(m=m[p])if(h?m.nodeName.toLowerCase()===r:1===m.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){m=q,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n&&j[2],m=n&&q.childNodes[n];while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if(1===m.nodeType&&++t&&m===b){k[a]=[w,n,t];break}}else if(s&&(m=b,l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),j=k[a]||[],n=j[0]===w&&j[1],t=n),t===!1)while(m=++n&&m&&m[p]||(t=n=0)||o.pop())if((h?m.nodeName.toLowerCase()===r:1===m.nodeType)&&++t&&(s&&(l=m[u]||(m[u]={}),k=l[m.uniqueID]||(l[m.uniqueID]={}),k[a]=[w,t]),m===b))break;return t-=e,t===d||t%d===0&&t/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||fa.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ha(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=J(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:ha(function(a){var b=[],c=[],d=h(a.replace(Q,"$1"));return d[u]?ha(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),b[0]=null,!c.pop()}}),has:ha(function(a){return function(b){return fa(a,b).length>0}}),contains:ha(function(a){return a=a.replace(ba,ca),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ha(function(a){return V.test(a||"")||fa.error("unsupported lang: "+a),a=a.replace(ba,ca).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Y.test(a.nodeName)},input:function(a){return X.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:na(function(){return[0]}),last:na(function(a,b){return[b-1]}),eq:na(function(a,b,c){return[0>c?c+b:c]}),even:na(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:na(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:na(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:na(function(a,b,c){for(var d=0>c?c+b:c;++d<b;)a.push(d);return a})}},d.pseudos.nth=d.pseudos.eq;for(b in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})d.pseudos[b]=la(b);for(b in{submit:!0,reset:!0})d.pseudos[b]=ma(b);function pa(){}pa.prototype=d.filters=d.pseudos,d.setFilters=new pa,g=fa.tokenize=function(a,b){var c,e,f,g,h,i,j,k=z[a+" "];if(k)return b?0:k.slice(0);h=a,i=[],j=d.preFilter;while(h){c&&!(e=R.exec(h))||(e&&(h=h.slice(e[0].length)||h),i.push(f=[])),c=!1,(e=S.exec(h))&&(c=e.shift(),f.push({value:c,type:e[0].replace(Q," ")}),h=h.slice(c.length));for(g in d.filter)!(e=W[g].exec(h))||j[g]&&!(e=j[g](e))||(c=e.shift(),f.push({value:c,type:g,matches:e}),h=h.slice(c.length));if(!c)break}return b?h.length:h?fa.error(a):z(a,i).slice(0)};function qa(a){for(var b=0,c=a.length,d="";c>b;b++)d+=a[b].value;return d}function ra(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j,k=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(j=b[u]||(b[u]={}),i=j[b.uniqueID]||(j[b.uniqueID]={}),(h=i[d])&&h[0]===w&&h[1]===f)return k[2]=h[2];if(i[d]=k,k[2]=a(b,c,g))return!0}}}function sa(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function ta(a,b,c){for(var d=0,e=b.length;e>d;d++)fa(a,b[d],c);return c}function ua(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(c&&!c(f,d,e)||(g.push(f),j&&b.push(h)));return g}function va(a,b,c,d,e,f){return d&&!d[u]&&(d=va(d)),e&&!e[u]&&(e=va(e,f)),ha(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||ta(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:ua(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=ua(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?J(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=ua(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):H.apply(g,r)})}function wa(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=ra(function(a){return a===b},h,!0),l=ra(function(a){return J(b,a)>-1},h,!0),m=[function(a,c,d){var e=!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d));return b=null,e}];f>i;i++)if(c=d.relative[a[i].type])m=[ra(sa(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return va(i>1&&sa(m),i>1&&qa(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(Q,"$1"),c,e>i&&wa(a.slice(i,e)),f>e&&wa(a=a.slice(e)),f>e&&qa(a))}m.push(c)}return sa(m)}function xa(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,o,q,r=0,s="0",t=f&&[],u=[],v=j,x=f||e&&d.find.TAG("*",k),y=w+=null==v?1:Math.random()||.1,z=x.length;for(k&&(j=g===n||g||k);s!==z&&null!=(l=x[s]);s++){if(e&&l){o=0,g||l.ownerDocument===n||(m(l),h=!p);while(q=a[o++])if(q(l,g||n,h)){i.push(l);break}k&&(w=y)}c&&((l=!q&&l)&&r--,f&&t.push(l))}if(r+=s,c&&s!==r){o=0;while(q=b[o++])q(t,u,g,h);if(f){if(r>0)while(s--)t[s]||u[s]||(u[s]=F.call(i));u=ua(u)}H.apply(i,u),k&&!f&&u.length>0&&r+b.length>1&&fa.uniqueSort(i)}return k&&(w=y,j=v),t};return c?ha(f):f}return h=fa.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=wa(b[c]),f[u]?d.push(f):e.push(f);f=A(a,xa(e,d)),f.selector=a}return f},i=fa.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(ba,ca),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=W.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(ba,ca),_.test(j[0].type)&&oa(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&qa(j),!a)return H.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,!b||_.test(a)&&oa(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=ia(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),ia(function(a){return a.innerHTML="<a href='#'></a>","#"===a.firstChild.getAttribute("href")})||ja("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&ia(function(a){return a.innerHTML="<input/>",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||ja("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),ia(function(a){return null==a.getAttribute("disabled")})||ja(K,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),fa}(a);n.find=t,n.expr=t.selectors,n.expr[":"]=n.expr.pseudos,n.uniqueSort=n.unique=t.uniqueSort,n.text=t.getText,n.isXMLDoc=t.isXML,n.contains=t.contains;var u=function(a,b,c){var d=[],e=void 0!==c;while((a=a[b])&&9!==a.nodeType)if(1===a.nodeType){if(e&&n(a).is(c))break;d.push(a)}return d},v=function(a,b){for(var c=[];a;a=a.nextSibling)1===a.nodeType&&a!==b&&c.push(a);return c},w=n.expr.match.needsContext,x=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,y=/^.[^:#\[\.,]*$/;function z(a,b,c){if(n.isFunction(b))return n.grep(a,function(a,d){return!!b.call(a,d,a)!==c});if(b.nodeType)return n.grep(a,function(a){return a===b!==c});if("string"==typeof b){if(y.test(b))return n.filter(b,a,c);b=n.filter(b,a)}return n.grep(a,function(a){return h.call(b,a)>-1!==c})}n.filter=function(a,b,c){var d=b[0];return c&&(a=":not("+a+")"),1===b.length&&1===d.nodeType?n.find.matchesSelector(d,a)?[d]:[]:n.find.matches(a,n.grep(b,function(a){return 1===a.nodeType}))},n.fn.extend({find:function(a){var b,c=this.length,d=[],e=this;if("string"!=typeof a)return this.pushStack(n(a).filter(function(){for(b=0;c>b;b++)if(n.contains(e[b],this))return!0}));for(b=0;c>b;b++)n.find(a,e[b],d);return d=this.pushStack(c>1?n.unique(d):d),d.selector=this.selector?this.selector+" "+a:a,d},filter:function(a){return this.pushStack(z(this,a||[],!1))},not:function(a){return this.pushStack(z(this,a||[],!0))},is:function(a){return!!z(this,"string"==typeof a&&w.test(a)?n(a):a||[],!1).length}});var A,B=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,C=n.fn.init=function(a,b,c){var e,f;if(!a)return this;if(c=c||A,"string"==typeof a){if(e="<"===a[0]&&">"===a[a.length-1]&&a.length>=3?[null,a,null]:B.exec(a),!e||!e[1]&&b)return!b||b.jquery?(b||c).find(a):this.constructor(b).find(a);if(e[1]){if(b=b instanceof n?b[0]:b,n.merge(this,n.parseHTML(e[1],b&&b.nodeType?b.ownerDocument||b:d,!0)),x.test(e[1])&&n.isPlainObject(b))for(e in b)n.isFunction(this[e])?this[e](b[e]):this.attr(e,b[e]);return this}return f=d.getElementById(e[2]),f&&f.parentNode&&(this.length=1,this[0]=f),this.context=d,this.selector=a,this}return a.nodeType?(this.context=this[0]=a,this.length=1,this):n.isFunction(a)?void 0!==c.ready?c.ready(a):a(n):(void 0!==a.selector&&(this.selector=a.selector,this.context=a.context),n.makeArray(a,this))};C.prototype=n.fn,A=n(d);var D=/^(?:parents|prev(?:Until|All))/,E={children:!0,contents:!0,next:!0,prev:!0};n.fn.extend({has:function(a){var b=n(a,this),c=b.length;return this.filter(function(){for(var a=0;c>a;a++)if(n.contains(this,b[a]))return!0})},closest:function(a,b){for(var c,d=0,e=this.length,f=[],g=w.test(a)||"string"!=typeof a?n(a,b||this.context):0;e>d;d++)for(c=this[d];c&&c!==b;c=c.parentNode)if(c.nodeType<11&&(g?g.index(c)>-1:1===c.nodeType&&n.find.matchesSelector(c,a))){f.push(c);break}return this.pushStack(f.length>1?n.uniqueSort(f):f)},index:function(a){return a?"string"==typeof a?h.call(n(a),this[0]):h.call(this,a.jquery?a[0]:a):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(a,b){return this.pushStack(n.uniqueSort(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(null==a?this.prevObject:this.prevObject.filter(a))}});function F(a,b){while((a=a[b])&&1!==a.nodeType);return a}n.each({parent:function(a){var b=a.parentNode;return b&&11!==b.nodeType?b:null},parents:function(a){return u(a,"parentNode")},parentsUntil:function(a,b,c){return u(a,"parentNode",c)},next:function(a){return F(a,"nextSibling")},prev:function(a){return F(a,"previousSibling")},nextAll:function(a){return u(a,"nextSibling")},prevAll:function(a){return u(a,"previousSibling")},nextUntil:function(a,b,c){return u(a,"nextSibling",c)},prevUntil:function(a,b,c){return u(a,"previousSibling",c)},siblings:function(a){return v((a.parentNode||{}).firstChild,a)},children:function(a){return v(a.firstChild)},contents:function(a){return a.contentDocument||n.merge([],a.childNodes)}},function(a,b){n.fn[a]=function(c,d){var e=n.map(this,b,c);return"Until"!==a.slice(-5)&&(d=c),d&&"string"==typeof d&&(e=n.filter(d,e)),this.length>1&&(E[a]||n.uniqueSort(e),D.test(a)&&e.reverse()),this.pushStack(e)}});var G=/\S+/g;function H(a){var b={};return n.each(a.match(G)||[],function(a,c){b[c]=!0}),b}n.Callbacks=function(a){a="string"==typeof a?H(a):n.extend({},a);var b,c,d,e,f=[],g=[],h=-1,i=function(){for(e=a.once,d=b=!0;g.length;h=-1){c=g.shift();while(++h<f.length)f[h].apply(c[0],c[1])===!1&&a.stopOnFalse&&(h=f.length,c=!1)}a.memory||(c=!1),b=!1,e&&(f=c?[]:"")},j={add:function(){return f&&(c&&!b&&(h=f.length-1,g.push(c)),function d(b){n.each(b,function(b,c){n.isFunction(c)?a.unique&&j.has(c)||f.push(c):c&&c.length&&"string"!==n.type(c)&&d(c)})}(arguments),c&&!b&&i()),this},remove:function(){return n.each(arguments,function(a,b){var c;while((c=n.inArray(b,f,c))>-1)f.splice(c,1),h>=c&&h--}),this},has:function(a){return a?n.inArray(a,f)>-1:f.length>0},empty:function(){return f&&(f=[]),this},disable:function(){return e=g=[],f=c="",this},disabled:function(){return!f},lock:function(){return e=g=[],c||(f=c=""),this},locked:function(){return!!e},fireWith:function(a,c){return e||(c=c||[],c=[a,c.slice?c.slice():c],g.push(c),b||i()),this},fire:function(){return j.fireWith(this,arguments),this},fired:function(){return!!d}};return j},n.extend({Deferred:function(a){var b=[["resolve","done",n.Callbacks("once memory"),"resolved"],["reject","fail",n.Callbacks("once memory"),"rejected"],["notify","progress",n.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){return e.done(arguments).fail(arguments),this},then:function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);a&&n.isFunction(a.promise)?a.promise().progress(c.notify).done(c.resolve).fail(c.reject):c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)})}),a=null}).promise()},promise:function(a){return null!=a?n.extend(a,d):d}},e={};return d.pipe=d.then,n.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add,h&&g.add(function(){c=h},b[1^a][2].disable,b[2][2].lock),e[f[0]]=function(){return e[f[0]+"With"](this===e?d:this,arguments),this},e[f[0]+"With"]=g.fireWith}),d.promise(e),a&&a.call(e,e),e},when:function(a){var b=0,c=e.call(arguments),d=c.length,f=1!==d||a&&n.isFunction(a.promise)?d:0,g=1===f?a:n.Deferred(),h=function(a,b,c){return function(d){b[a]=this,c[a]=arguments.length>1?e.call(arguments):d,c===i?g.notifyWith(b,c):--f||g.resolveWith(b,c)}},i,j,k;if(d>1)for(i=new Array(d),j=new Array(d),k=new Array(d);d>b;b++)c[b]&&n.isFunction(c[b].promise)?c[b].promise().progress(h(b,j,i)).done(h(b,k,c)).fail(g.reject):--f;return f||g.resolveWith(k,c),g.promise()}});var I;n.fn.ready=function(a){return n.ready.promise().done(a),this},n.extend({isReady:!1,readyWait:1,holdReady:function(a){a?n.readyWait++:n.ready(!0)},ready:function(a){(a===!0?--n.readyWait:n.isReady)||(n.isReady=!0,a!==!0&&--n.readyWait>0||(I.resolveWith(d,[n]),n.fn.triggerHandler&&(n(d).triggerHandler("ready"),n(d).off("ready"))))}});function J(){d.removeEventListener("DOMContentLoaded",J),a.removeEventListener("load",J),n.ready()}n.ready.promise=function(b){return I||(I=n.Deferred(),"complete"===d.readyState||"loading"!==d.readyState&&!d.documentElement.doScroll?a.setTimeout(n.ready):(d.addEventListener("DOMContentLoaded",J),a.addEventListener("load",J))),I.promise(b)},n.ready.promise();var K=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=null==c;if("object"===n.type(c)){e=!0;for(h in c)K(a,b,h,c[h],!0,f,g)}else if(void 0!==d&&(e=!0,n.isFunction(d)||(g=!0),j&&(g?(b.call(a,d),b=null):(j=b,b=function(a,b,c){return j.call(n(a),c)})),b))for(;i>h;h++)b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)));return e?a:j?b.call(a):i?b(a[0],c):f},L=function(a){return 1===a.nodeType||9===a.nodeType||!+a.nodeType};function M(){this.expando=n.expando+M.uid++}M.uid=1,M.prototype={register:function(a,b){var c=b||{};return a.nodeType?a[this.expando]=c:Object.defineProperty(a,this.expando,{value:c,writable:!0,configurable:!0}),a[this.expando]},cache:function(a){if(!L(a))return{};var b=a[this.expando];return b||(b={},L(a)&&(a.nodeType?a[this.expando]=b:Object.defineProperty(a,this.expando,{value:b,configurable:!0}))),b},set:function(a,b,c){var d,e=this.cache(a);if("string"==typeof b)e[b]=c;else for(d in b)e[d]=b[d];return e},get:function(a,b){return void 0===b?this.cache(a):a[this.expando]&&a[this.expando][b]},access:function(a,b,c){var d;return void 0===b||b&&"string"==typeof b&&void 0===c?(d=this.get(a,b),void 0!==d?d:this.get(a,n.camelCase(b))):(this.set(a,b,c),void 0!==c?c:b)},remove:function(a,b){var c,d,e,f=a[this.expando];if(void 0!==f){if(void 0===b)this.register(a);else{n.isArray(b)?d=b.concat(b.map(n.camelCase)):(e=n.camelCase(b),b in f?d=[b,e]:(d=e,d=d in f?[d]:d.match(G)||[])),c=d.length;while(c--)delete f[d[c]]}(void 0===b||n.isEmptyObject(f))&&(a.nodeType?a[this.expando]=void 0:delete a[this.expando])}},hasData:function(a){var b=a[this.expando];return void 0!==b&&!n.isEmptyObject(b)}};var N=new M,O=new M,P=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,Q=/[A-Z]/g;function R(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(Q,"-$&").toLowerCase(),c=a.getAttribute(d),"string"==typeof c){try{c="true"===c?!0:"false"===c?!1:"null"===c?null:+c+""===c?+c:P.test(c)?n.parseJSON(c):c;
+}catch(e){}O.set(a,b,c)}else c=void 0;return c}n.extend({hasData:function(a){return O.hasData(a)||N.hasData(a)},data:function(a,b,c){return O.access(a,b,c)},removeData:function(a,b){O.remove(a,b)},_data:function(a,b,c){return N.access(a,b,c)},_removeData:function(a,b){N.remove(a,b)}}),n.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(void 0===a){if(this.length&&(e=O.get(f),1===f.nodeType&&!N.get(f,"hasDataAttrs"))){c=g.length;while(c--)g[c]&&(d=g[c].name,0===d.indexOf("data-")&&(d=n.camelCase(d.slice(5)),R(f,d,e[d])));N.set(f,"hasDataAttrs",!0)}return e}return"object"==typeof a?this.each(function(){O.set(this,a)}):K(this,function(b){var c,d;if(f&&void 0===b){if(c=O.get(f,a)||O.get(f,a.replace(Q,"-$&").toLowerCase()),void 0!==c)return c;if(d=n.camelCase(a),c=O.get(f,d),void 0!==c)return c;if(c=R(f,d,void 0),void 0!==c)return c}else d=n.camelCase(a),this.each(function(){var c=O.get(this,d);O.set(this,d,b),a.indexOf("-")>-1&&void 0!==c&&O.set(this,a,b)})},null,b,arguments.length>1,null,!0)},removeData:function(a){return this.each(function(){O.remove(this,a)})}}),n.extend({queue:function(a,b,c){var d;return a?(b=(b||"fx")+"queue",d=N.get(a,b),c&&(!d||n.isArray(c)?d=N.access(a,b,n.makeArray(c)):d.push(c)),d||[]):void 0},dequeue:function(a,b){b=b||"fx";var c=n.queue(a,b),d=c.length,e=c.shift(),f=n._queueHooks(a,b),g=function(){n.dequeue(a,b)};"inprogress"===e&&(e=c.shift(),d--),e&&("fx"===b&&c.unshift("inprogress"),delete f.stop,e.call(a,g,f)),!d&&f&&f.empty.fire()},_queueHooks:function(a,b){var c=b+"queueHooks";return N.get(a,c)||N.access(a,c,{empty:n.Callbacks("once memory").add(function(){N.remove(a,[b+"queue",c])})})}}),n.fn.extend({queue:function(a,b){var c=2;return"string"!=typeof a&&(b=a,a="fx",c--),arguments.length<c?n.queue(this[0],a):void 0===b?this:this.each(function(){var c=n.queue(this,a,b);n._queueHooks(this,a),"fx"===a&&"inprogress"!==c[0]&&n.dequeue(this,a)})},dequeue:function(a){return this.each(function(){n.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=n.Deferred(),f=this,g=this.length,h=function(){--d||e.resolveWith(f,[f])};"string"!=typeof a&&(b=a,a=void 0),a=a||"fx";while(g--)c=N.get(f[g],a+"queueHooks"),c&&c.empty&&(d++,c.empty.add(h));return h(),e.promise(b)}});var S=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,T=new RegExp("^(?:([+-])=|)("+S+")([a-z%]*)$","i"),U=["Top","Right","Bottom","Left"],V=function(a,b){return a=b||a,"none"===n.css(a,"display")||!n.contains(a.ownerDocument,a)};function W(a,b,c,d){var e,f=1,g=20,h=d?function(){return d.cur()}:function(){return n.css(a,b,"")},i=h(),j=c&&c[3]||(n.cssNumber[b]?"":"px"),k=(n.cssNumber[b]||"px"!==j&&+i)&&T.exec(n.css(a,b));if(k&&k[3]!==j){j=j||k[3],c=c||[],k=+i||1;do f=f||".5",k/=f,n.style(a,b,k+j);while(f!==(f=h()/i)&&1!==f&&--g)}return c&&(k=+k||+i||0,e=c[1]?k+(c[1]+1)*c[2]:+c[2],d&&(d.unit=j,d.start=k,d.end=e)),e}var X=/^(?:checkbox|radio)$/i,Y=/<([\w:-]+)/,Z=/^$|\/(?:java|ecma)script/i,$={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};$.optgroup=$.option,$.tbody=$.tfoot=$.colgroup=$.caption=$.thead,$.th=$.td;function _(a,b){var c="undefined"!=typeof a.getElementsByTagName?a.getElementsByTagName(b||"*"):"undefined"!=typeof a.querySelectorAll?a.querySelectorAll(b||"*"):[];return void 0===b||b&&n.nodeName(a,b)?n.merge([a],c):c}function aa(a,b){for(var c=0,d=a.length;d>c;c++)N.set(a[c],"globalEval",!b||N.get(b[c],"globalEval"))}var ba=/<|&#?\w+;/;function ca(a,b,c,d,e){for(var f,g,h,i,j,k,l=b.createDocumentFragment(),m=[],o=0,p=a.length;p>o;o++)if(f=a[o],f||0===f)if("object"===n.type(f))n.merge(m,f.nodeType?[f]:f);else if(ba.test(f)){g=g||l.appendChild(b.createElement("div")),h=(Y.exec(f)||["",""])[1].toLowerCase(),i=$[h]||$._default,g.innerHTML=i[1]+n.htmlPrefilter(f)+i[2],k=i[0];while(k--)g=g.lastChild;n.merge(m,g.childNodes),g=l.firstChild,g.textContent=""}else m.push(b.createTextNode(f));l.textContent="",o=0;while(f=m[o++])if(d&&n.inArray(f,d)>-1)e&&e.push(f);else if(j=n.contains(f.ownerDocument,f),g=_(l.appendChild(f),"script"),j&&aa(g),c){k=0;while(f=g[k++])Z.test(f.type||"")&&c.push(f)}return l}!function(){var a=d.createDocumentFragment(),b=a.appendChild(d.createElement("div")),c=d.createElement("input");c.setAttribute("type","radio"),c.setAttribute("checked","checked"),c.setAttribute("name","t"),b.appendChild(c),l.checkClone=b.cloneNode(!0).cloneNode(!0).lastChild.checked,b.innerHTML="<textarea>x</textarea>",l.noCloneChecked=!!b.cloneNode(!0).lastChild.defaultValue}();var da=/^key/,ea=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,fa=/^([^.]*)(?:\.(.+)|)/;function ga(){return!0}function ha(){return!1}function ia(){try{return d.activeElement}catch(a){}}function ja(a,b,c,d,e,f){var g,h;if("object"==typeof b){"string"!=typeof c&&(d=d||c,c=void 0);for(h in b)ja(a,h,c,d,b[h],f);return a}if(null==d&&null==e?(e=c,d=c=void 0):null==e&&("string"==typeof c?(e=d,d=void 0):(e=d,d=c,c=void 0)),e===!1)e=ha;else if(!e)return a;return 1===f&&(g=e,e=function(a){return n().off(a),g.apply(this,arguments)},e.guid=g.guid||(g.guid=n.guid++)),a.each(function(){n.event.add(this,b,e,d,c)})}n.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=N.get(a);if(r){c.handler&&(f=c,c=f.handler,e=f.selector),c.guid||(c.guid=n.guid++),(i=r.events)||(i=r.events={}),(g=r.handle)||(g=r.handle=function(b){return"undefined"!=typeof n&&n.event.triggered!==b.type?n.event.dispatch.apply(a,arguments):void 0}),b=(b||"").match(G)||[""],j=b.length;while(j--)h=fa.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o&&(l=n.event.special[o]||{},o=(e?l.delegateType:l.bindType)||o,l=n.event.special[o]||{},k=n.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&n.expr.match.needsContext.test(e),namespace:p.join(".")},f),(m=i[o])||(m=i[o]=[],m.delegateCount=0,l.setup&&l.setup.call(a,d,p,g)!==!1||a.addEventListener&&a.addEventListener(o,g)),l.add&&(l.add.call(a,k),k.handler.guid||(k.handler.guid=c.guid)),e?m.splice(m.delegateCount++,0,k):m.push(k),n.event.global[o]=!0)}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=N.hasData(a)&&N.get(a);if(r&&(i=r.events)){b=(b||"").match(G)||[""],j=b.length;while(j--)if(h=fa.exec(b[j])||[],o=q=h[1],p=(h[2]||"").split(".").sort(),o){l=n.event.special[o]||{},o=(d?l.delegateType:l.bindType)||o,m=i[o]||[],h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),g=f=m.length;while(f--)k=m[f],!e&&q!==k.origType||c&&c.guid!==k.guid||h&&!h.test(k.namespace)||d&&d!==k.selector&&("**"!==d||!k.selector)||(m.splice(f,1),k.selector&&m.delegateCount--,l.remove&&l.remove.call(a,k));g&&!m.length&&(l.teardown&&l.teardown.call(a,p,r.handle)!==!1||n.removeEvent(a,o,r.handle),delete i[o])}else for(o in i)n.event.remove(a,o+b[j],c,d,!0);n.isEmptyObject(i)&&N.remove(a,"handle events")}},dispatch:function(a){a=n.event.fix(a);var b,c,d,f,g,h=[],i=e.call(arguments),j=(N.get(this,"events")||{})[a.type]||[],k=n.event.special[a.type]||{};if(i[0]=a,a.delegateTarget=this,!k.preDispatch||k.preDispatch.call(this,a)!==!1){h=n.event.handlers.call(this,a,j),b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem,c=0;while((g=f.handlers[c++])&&!a.isImmediatePropagationStopped())a.rnamespace&&!a.rnamespace.test(g.namespace)||(a.handleObj=g,a.data=g.data,d=((n.event.special[g.origType]||{}).handle||g.handler).apply(f.elem,i),void 0!==d&&(a.result=d)===!1&&(a.preventDefault(),a.stopPropagation()))}return k.postDispatch&&k.postDispatch.call(this,a),a.result}},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&("click"!==a.type||isNaN(a.button)||a.button<1))for(;i!==this;i=i.parentNode||this)if(1===i.nodeType&&(i.disabled!==!0||"click"!==a.type)){for(d=[],c=0;h>c;c++)f=b[c],e=f.selector+" ",void 0===d[e]&&(d[e]=f.needsContext?n(e,this).index(i)>-1:n.find(e,this,null,[i]).length),d[e]&&d.push(f);d.length&&g.push({elem:i,handlers:d})}return h<b.length&&g.push({elem:this,handlers:b.slice(h)}),g},props:"altKey bubbles cancelable ctrlKey currentTarget detail eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){return null==a.which&&(a.which=null!=b.charCode?b.charCode:b.keyCode),a}},mouseHooks:{props:"button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){var c,e,f,g=b.button;return null==a.pageX&&null!=b.clientX&&(c=a.target.ownerDocument||d,e=c.documentElement,f=c.body,a.pageX=b.clientX+(e&&e.scrollLeft||f&&f.scrollLeft||0)-(e&&e.clientLeft||f&&f.clientLeft||0),a.pageY=b.clientY+(e&&e.scrollTop||f&&f.scrollTop||0)-(e&&e.clientTop||f&&f.clientTop||0)),a.which||void 0===g||(a.which=1&g?1:2&g?3:4&g?2:0),a}},fix:function(a){if(a[n.expando])return a;var b,c,e,f=a.type,g=a,h=this.fixHooks[f];h||(this.fixHooks[f]=h=ea.test(f)?this.mouseHooks:da.test(f)?this.keyHooks:{}),e=h.props?this.props.concat(h.props):this.props,a=new n.Event(g),b=e.length;while(b--)c=e[b],a[c]=g[c];return a.target||(a.target=d),3===a.target.nodeType&&(a.target=a.target.parentNode),h.filter?h.filter(a,g):a},special:{load:{noBubble:!0},focus:{trigger:function(){return this!==ia()&&this.focus?(this.focus(),!1):void 0},delegateType:"focusin"},blur:{trigger:function(){return this===ia()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return"checkbox"===this.type&&this.click&&n.nodeName(this,"input")?(this.click(),!1):void 0},_default:function(a){return n.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){void 0!==a.result&&a.originalEvent&&(a.originalEvent.returnValue=a.result)}}}},n.removeEvent=function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c)},n.Event=function(a,b){return this instanceof n.Event?(a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||void 0===a.defaultPrevented&&a.returnValue===!1?ga:ha):this.type=a,b&&n.extend(this,b),this.timeStamp=a&&a.timeStamp||n.now(),void(this[n.expando]=!0)):new n.Event(a,b)},n.Event.prototype={constructor:n.Event,isDefaultPrevented:ha,isPropagationStopped:ha,isImmediatePropagationStopped:ha,isSimulated:!1,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=ga,a&&!this.isSimulated&&a.preventDefault()},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=ga,a&&!this.isSimulated&&a.stopPropagation()},stopImmediatePropagation:function(){var a=this.originalEvent;this.isImmediatePropagationStopped=ga,a&&!this.isSimulated&&a.stopImmediatePropagation(),this.stopPropagation()}},n.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(a,b){n.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;return e&&(e===d||n.contains(d,e))||(a.type=f.origType,c=f.handler.apply(this,arguments),a.type=b),c}}}),n.fn.extend({on:function(a,b,c,d){return ja(this,a,b,c,d)},one:function(a,b,c,d){return ja(this,a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj)return d=a.handleObj,n(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler),this;if("object"==typeof a){for(e in a)this.off(e,b,a[e]);return this}return b!==!1&&"function"!=typeof b||(c=b,b=void 0),c===!1&&(c=ha),this.each(function(){n.event.remove(this,a,c,b)})}});var ka=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,la=/<script|<style|<link/i,ma=/checked\s*(?:[^=]|=\s*.checked.)/i,na=/^true\/(.*)/,oa=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function pa(a,b){return n.nodeName(a,"table")&&n.nodeName(11!==b.nodeType?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function qa(a){return a.type=(null!==a.getAttribute("type"))+"/"+a.type,a}function ra(a){var b=na.exec(a.type);return b?a.type=b[1]:a.removeAttribute("type"),a}function sa(a,b){var c,d,e,f,g,h,i,j;if(1===b.nodeType){if(N.hasData(a)&&(f=N.access(a),g=N.set(b,f),j=f.events)){delete g.handle,g.events={};for(e in j)for(c=0,d=j[e].length;d>c;c++)n.event.add(b,e,j[e][c])}O.hasData(a)&&(h=O.access(a),i=n.extend({},h),O.set(b,i))}}function ta(a,b){var c=b.nodeName.toLowerCase();"input"===c&&X.test(a.type)?b.checked=a.checked:"input"!==c&&"textarea"!==c||(b.defaultValue=a.defaultValue)}function ua(a,b,c,d){b=f.apply([],b);var e,g,h,i,j,k,m=0,o=a.length,p=o-1,q=b[0],r=n.isFunction(q);if(r||o>1&&"string"==typeof q&&!l.checkClone&&ma.test(q))return a.each(function(e){var f=a.eq(e);r&&(b[0]=q.call(this,e,f.html())),ua(f,b,c,d)});if(o&&(e=ca(b,a[0].ownerDocument,!1,a,d),g=e.firstChild,1===e.childNodes.length&&(e=g),g||d)){for(h=n.map(_(e,"script"),qa),i=h.length;o>m;m++)j=e,m!==p&&(j=n.clone(j,!0,!0),i&&n.merge(h,_(j,"script"))),c.call(a[m],j,m);if(i)for(k=h[h.length-1].ownerDocument,n.map(h,ra),m=0;i>m;m++)j=h[m],Z.test(j.type||"")&&!N.access(j,"globalEval")&&n.contains(k,j)&&(j.src?n._evalUrl&&n._evalUrl(j.src):n.globalEval(j.textContent.replace(oa,"")))}return a}function va(a,b,c){for(var d,e=b?n.filter(b,a):a,f=0;null!=(d=e[f]);f++)c||1!==d.nodeType||n.cleanData(_(d)),d.parentNode&&(c&&n.contains(d.ownerDocument,d)&&aa(_(d,"script")),d.parentNode.removeChild(d));return a}n.extend({htmlPrefilter:function(a){return a.replace(ka,"<$1></$2>")},clone:function(a,b,c){var d,e,f,g,h=a.cloneNode(!0),i=n.contains(a.ownerDocument,a);if(!(l.noCloneChecked||1!==a.nodeType&&11!==a.nodeType||n.isXMLDoc(a)))for(g=_(h),f=_(a),d=0,e=f.length;e>d;d++)ta(f[d],g[d]);if(b)if(c)for(f=f||_(a),g=g||_(h),d=0,e=f.length;e>d;d++)sa(f[d],g[d]);else sa(a,h);return g=_(h,"script"),g.length>0&&aa(g,!i&&_(a,"script")),h},cleanData:function(a){for(var b,c,d,e=n.event.special,f=0;void 0!==(c=a[f]);f++)if(L(c)){if(b=c[N.expando]){if(b.events)for(d in b.events)e[d]?n.event.remove(c,d):n.removeEvent(c,d,b.handle);c[N.expando]=void 0}c[O.expando]&&(c[O.expando]=void 0)}}}),n.fn.extend({domManip:ua,detach:function(a){return va(this,a,!0)},remove:function(a){return va(this,a)},text:function(a){return K(this,function(a){return void 0===a?n.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=a)})},null,a,arguments.length)},append:function(){return ua(this,arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=pa(this,a);b.appendChild(a)}})},prepend:function(){return ua(this,arguments,function(a){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var b=pa(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return ua(this,arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this)})},after:function(){return ua(this,arguments,function(a){this.parentNode&&this.parentNode.insertBefore(a,this.nextSibling)})},empty:function(){for(var a,b=0;null!=(a=this[b]);b++)1===a.nodeType&&(n.cleanData(_(a,!1)),a.textContent="");return this},clone:function(a,b){return a=null==a?!1:a,b=null==b?a:b,this.map(function(){return n.clone(this,a,b)})},html:function(a){return K(this,function(a){var b=this[0]||{},c=0,d=this.length;if(void 0===a&&1===b.nodeType)return b.innerHTML;if("string"==typeof a&&!la.test(a)&&!$[(Y.exec(a)||["",""])[1].toLowerCase()]){a=n.htmlPrefilter(a);try{for(;d>c;c++)b=this[c]||{},1===b.nodeType&&(n.cleanData(_(b,!1)),b.innerHTML=a);b=0}catch(e){}}b&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(){var a=[];return ua(this,arguments,function(b){var c=this.parentNode;n.inArray(this,a)<0&&(n.cleanData(_(this)),c&&c.replaceChild(b,this))},a)}}),n.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){n.fn[a]=function(a){for(var c,d=[],e=n(a),f=e.length-1,h=0;f>=h;h++)c=h===f?this:this.clone(!0),n(e[h])[b](c),g.apply(d,c.get());return this.pushStack(d)}});var wa,xa={HTML:"block",BODY:"block"};function ya(a,b){var c=n(b.createElement(a)).appendTo(b.body),d=n.css(c[0],"display");return c.detach(),d}function za(a){var b=d,c=xa[a];return c||(c=ya(a,b),"none"!==c&&c||(wa=(wa||n("<iframe frameborder='0' width='0' height='0'/>")).appendTo(b.documentElement),b=wa[0].contentDocument,b.write(),b.close(),c=ya(a,b),wa.detach()),xa[a]=c),c}var Aa=/^margin/,Ba=new RegExp("^("+S+")(?!px)[a-z%]+$","i"),Ca=function(b){var c=b.ownerDocument.defaultView;return c&&c.opener||(c=a),c.getComputedStyle(b)},Da=function(a,b,c,d){var e,f,g={};for(f in b)g[f]=a.style[f],a.style[f]=b[f];e=c.apply(a,d||[]);for(f in b)a.style[f]=g[f];return e},Ea=d.documentElement;!function(){var b,c,e,f,g=d.createElement("div"),h=d.createElement("div");if(h.style){h.style.backgroundClip="content-box",h.cloneNode(!0).style.backgroundClip="",l.clearCloneStyle="content-box"===h.style.backgroundClip,g.style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",g.appendChild(h);function i(){h.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%",h.innerHTML="",Ea.appendChild(g);var d=a.getComputedStyle(h);b="1%"!==d.top,f="2px"===d.marginLeft,c="4px"===d.width,h.style.marginRight="50%",e="4px"===d.marginRight,Ea.removeChild(g)}n.extend(l,{pixelPosition:function(){return i(),b},boxSizingReliable:function(){return null==c&&i(),c},pixelMarginRight:function(){return null==c&&i(),e},reliableMarginLeft:function(){return null==c&&i(),f},reliableMarginRight:function(){var b,c=h.appendChild(d.createElement("div"));return c.style.cssText=h.style.cssText="-webkit-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",c.style.marginRight=c.style.width="0",h.style.width="1px",Ea.appendChild(g),b=!parseFloat(a.getComputedStyle(c).marginRight),Ea.removeChild(g),h.removeChild(c),b}})}}();function Fa(a,b,c){var d,e,f,g,h=a.style;return c=c||Ca(a),g=c?c.getPropertyValue(b)||c[b]:void 0,""!==g&&void 0!==g||n.contains(a.ownerDocument,a)||(g=n.style(a,b)),c&&!l.pixelMarginRight()&&Ba.test(g)&&Aa.test(b)&&(d=h.width,e=h.minWidth,f=h.maxWidth,h.minWidth=h.maxWidth=h.width=g,g=c.width,h.width=d,h.minWidth=e,h.maxWidth=f),void 0!==g?g+"":g}function Ga(a,b){return{get:function(){return a()?void delete this.get:(this.get=b).apply(this,arguments)}}}var Ha=/^(none|table(?!-c[ea]).+)/,Ia={position:"absolute",visibility:"hidden",display:"block"},Ja={letterSpacing:"0",fontWeight:"400"},Ka=["Webkit","O","Moz","ms"],La=d.createElement("div").style;function Ma(a){if(a in La)return a;var b=a[0].toUpperCase()+a.slice(1),c=Ka.length;while(c--)if(a=Ka[c]+b,a in La)return a}function Na(a,b,c){var d=T.exec(b);return d?Math.max(0,d[2]-(c||0))+(d[3]||"px"):b}function Oa(a,b,c,d,e){for(var f=c===(d?"border":"content")?4:"width"===b?1:0,g=0;4>f;f+=2)"margin"===c&&(g+=n.css(a,c+U[f],!0,e)),d?("content"===c&&(g-=n.css(a,"padding"+U[f],!0,e)),"margin"!==c&&(g-=n.css(a,"border"+U[f]+"Width",!0,e))):(g+=n.css(a,"padding"+U[f],!0,e),"padding"!==c&&(g+=n.css(a,"border"+U[f]+"Width",!0,e)));return g}function Pa(a,b,c){var d=!0,e="width"===b?a.offsetWidth:a.offsetHeight,f=Ca(a),g="border-box"===n.css(a,"boxSizing",!1,f);if(0>=e||null==e){if(e=Fa(a,b,f),(0>e||null==e)&&(e=a.style[b]),Ba.test(e))return e;d=g&&(l.boxSizingReliable()||e===a.style[b]),e=parseFloat(e)||0}return e+Oa(a,b,c||(g?"border":"content"),d,f)+"px"}function Qa(a,b){for(var c,d,e,f=[],g=0,h=a.length;h>g;g++)d=a[g],d.style&&(f[g]=N.get(d,"olddisplay"),c=d.style.display,b?(f[g]||"none"!==c||(d.style.display=""),""===d.style.display&&V(d)&&(f[g]=N.access(d,"olddisplay",za(d.nodeName)))):(e=V(d),"none"===c&&e||N.set(d,"olddisplay",e?c:n.css(d,"display"))));for(g=0;h>g;g++)d=a[g],d.style&&(b&&"none"!==d.style.display&&""!==d.style.display||(d.style.display=b?f[g]||"":"none"));return a}n.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=Fa(a,"opacity");return""===c?"1":c}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":"cssFloat"},style:function(a,b,c,d){if(a&&3!==a.nodeType&&8!==a.nodeType&&a.style){var e,f,g,h=n.camelCase(b),i=a.style;return b=n.cssProps[h]||(n.cssProps[h]=Ma(h)||h),g=n.cssHooks[b]||n.cssHooks[h],void 0===c?g&&"get"in g&&void 0!==(e=g.get(a,!1,d))?e:i[b]:(f=typeof c,"string"===f&&(e=T.exec(c))&&e[1]&&(c=W(a,b,e),f="number"),null!=c&&c===c&&("number"===f&&(c+=e&&e[3]||(n.cssNumber[h]?"":"px")),l.clearCloneStyle||""!==c||0!==b.indexOf("background")||(i[b]="inherit"),g&&"set"in g&&void 0===(c=g.set(a,c,d))||(i[b]=c)),void 0)}},css:function(a,b,c,d){var e,f,g,h=n.camelCase(b);return b=n.cssProps[h]||(n.cssProps[h]=Ma(h)||h),g=n.cssHooks[b]||n.cssHooks[h],g&&"get"in g&&(e=g.get(a,!0,c)),void 0===e&&(e=Fa(a,b,d)),"normal"===e&&b in Ja&&(e=Ja[b]),""===c||c?(f=parseFloat(e),c===!0||isFinite(f)?f||0:e):e}}),n.each(["height","width"],function(a,b){n.cssHooks[b]={get:function(a,c,d){return c?Ha.test(n.css(a,"display"))&&0===a.offsetWidth?Da(a,Ia,function(){return Pa(a,b,d)}):Pa(a,b,d):void 0},set:function(a,c,d){var e,f=d&&Ca(a),g=d&&Oa(a,b,d,"border-box"===n.css(a,"boxSizing",!1,f),f);return g&&(e=T.exec(c))&&"px"!==(e[3]||"px")&&(a.style[b]=c,c=n.css(a,b)),Na(a,c,g)}}}),n.cssHooks.marginLeft=Ga(l.reliableMarginLeft,function(a,b){return b?(parseFloat(Fa(a,"marginLeft"))||a.getBoundingClientRect().left-Da(a,{marginLeft:0},function(){return a.getBoundingClientRect().left}))+"px":void 0}),n.cssHooks.marginRight=Ga(l.reliableMarginRight,function(a,b){return b?Da(a,{display:"inline-block"},Fa,[a,"marginRight"]):void 0}),n.each({margin:"",padding:"",border:"Width"},function(a,b){n.cssHooks[a+b]={expand:function(c){for(var d=0,e={},f="string"==typeof c?c.split(" "):[c];4>d;d++)e[a+U[d]+b]=f[d]||f[d-2]||f[0];return e}},Aa.test(a)||(n.cssHooks[a+b].set=Na)}),n.fn.extend({css:function(a,b){return K(this,function(a,b,c){var d,e,f={},g=0;if(n.isArray(b)){for(d=Ca(a),e=b.length;e>g;g++)f[b[g]]=n.css(a,b[g],!1,d);return f}return void 0!==c?n.style(a,b,c):n.css(a,b)},a,b,arguments.length>1)},show:function(){return Qa(this,!0)},hide:function(){return Qa(this)},toggle:function(a){return"boolean"==typeof a?a?this.show():this.hide():this.each(function(){V(this)?n(this).show():n(this).hide()})}});function Ra(a,b,c,d,e){return new Ra.prototype.init(a,b,c,d,e)}n.Tween=Ra,Ra.prototype={constructor:Ra,init:function(a,b,c,d,e,f){this.elem=a,this.prop=c,this.easing=e||n.easing._default,this.options=b,this.start=this.now=this.cur(),this.end=d,this.unit=f||(n.cssNumber[c]?"":"px")},cur:function(){var a=Ra.propHooks[this.prop];return a&&a.get?a.get(this):Ra.propHooks._default.get(this)},run:function(a){var b,c=Ra.propHooks[this.prop];return this.options.duration?this.pos=b=n.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration):this.pos=b=a,this.now=(this.end-this.start)*b+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),c&&c.set?c.set(this):Ra.propHooks._default.set(this),this}},Ra.prototype.init.prototype=Ra.prototype,Ra.propHooks={_default:{get:function(a){var b;return 1!==a.elem.nodeType||null!=a.elem[a.prop]&&null==a.elem.style[a.prop]?a.elem[a.prop]:(b=n.css(a.elem,a.prop,""),b&&"auto"!==b?b:0)},set:function(a){n.fx.step[a.prop]?n.fx.step[a.prop](a):1!==a.elem.nodeType||null==a.elem.style[n.cssProps[a.prop]]&&!n.cssHooks[a.prop]?a.elem[a.prop]=a.now:n.style(a.elem,a.prop,a.now+a.unit)}}},Ra.propHooks.scrollTop=Ra.propHooks.scrollLeft={set:function(a){a.elem.nodeType&&a.elem.parentNode&&(a.elem[a.prop]=a.now)}},n.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2},_default:"swing"},n.fx=Ra.prototype.init,n.fx.step={};var Sa,Ta,Ua=/^(?:toggle|show|hide)$/,Va=/queueHooks$/;function Wa(){return a.setTimeout(function(){Sa=void 0}),Sa=n.now()}function Xa(a,b){var c,d=0,e={height:a};for(b=b?1:0;4>d;d+=2-b)c=U[d],e["margin"+c]=e["padding"+c]=a;return b&&(e.opacity=e.width=a),e}function Ya(a,b,c){for(var d,e=(_a.tweeners[b]||[]).concat(_a.tweeners["*"]),f=0,g=e.length;g>f;f++)if(d=e[f].call(c,b,a))return d}function Za(a,b,c){var d,e,f,g,h,i,j,k,l=this,m={},o=a.style,p=a.nodeType&&V(a),q=N.get(a,"fxshow");c.queue||(h=n._queueHooks(a,"fx"),null==h.unqueued&&(h.unqueued=0,i=h.empty.fire,h.empty.fire=function(){h.unqueued||i()}),h.unqueued++,l.always(function(){l.always(function(){h.unqueued--,n.queue(a,"fx").length||h.empty.fire()})})),1===a.nodeType&&("height"in b||"width"in b)&&(c.overflow=[o.overflow,o.overflowX,o.overflowY],j=n.css(a,"display"),k="none"===j?N.get(a,"olddisplay")||za(a.nodeName):j,"inline"===k&&"none"===n.css(a,"float")&&(o.display="inline-block")),c.overflow&&(o.overflow="hidden",l.always(function(){o.overflow=c.overflow[0],o.overflowX=c.overflow[1],o.overflowY=c.overflow[2]}));for(d in b)if(e=b[d],Ua.exec(e)){if(delete b[d],f=f||"toggle"===e,e===(p?"hide":"show")){if("show"!==e||!q||void 0===q[d])continue;p=!0}m[d]=q&&q[d]||n.style(a,d)}else j=void 0;if(n.isEmptyObject(m))"inline"===("none"===j?za(a.nodeName):j)&&(o.display=j);else{q?"hidden"in q&&(p=q.hidden):q=N.access(a,"fxshow",{}),f&&(q.hidden=!p),p?n(a).show():l.done(function(){n(a).hide()}),l.done(function(){var b;N.remove(a,"fxshow");for(b in m)n.style(a,b,m[b])});for(d in m)g=Ya(p?q[d]:0,d,l),d in q||(q[d]=g.start,p&&(g.end=g.start,g.start="width"===d||"height"===d?1:0))}}function $a(a,b){var c,d,e,f,g;for(c in a)if(d=n.camelCase(c),e=b[d],f=a[c],n.isArray(f)&&(e=f[1],f=a[c]=f[0]),c!==d&&(a[d]=f,delete a[c]),g=n.cssHooks[d],g&&"expand"in g){f=g.expand(f),delete a[d];for(c in f)c in a||(a[c]=f[c],b[c]=e)}else b[d]=e}function _a(a,b,c){var d,e,f=0,g=_a.prefilters.length,h=n.Deferred().always(function(){delete i.elem}),i=function(){if(e)return!1;for(var b=Sa||Wa(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;i>g;g++)j.tweens[g].run(f);return h.notifyWith(a,[j,f,c]),1>f&&i?c:(h.resolveWith(a,[j]),!1)},j=h.promise({elem:a,props:n.extend({},b),opts:n.extend(!0,{specialEasing:{},easing:n.easing._default},c),originalProperties:b,originalOptions:c,startTime:Sa||Wa(),duration:c.duration,tweens:[],createTween:function(b,c){var d=n.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);return j.tweens.push(d),d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e)return this;for(e=!0;d>c;c++)j.tweens[c].run(1);return b?(h.notifyWith(a,[j,1,0]),h.resolveWith(a,[j,b])):h.rejectWith(a,[j,b]),this}}),k=j.props;for($a(k,j.opts.specialEasing);g>f;f++)if(d=_a.prefilters[f].call(j,a,k,j.opts))return n.isFunction(d.stop)&&(n._queueHooks(j.elem,j.opts.queue).stop=n.proxy(d.stop,d)),d;return n.map(k,Ya,j),n.isFunction(j.opts.start)&&j.opts.start.call(a,j),n.fx.timer(n.extend(i,{elem:a,anim:j,queue:j.opts.queue})),j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}n.Animation=n.extend(_a,{tweeners:{"*":[function(a,b){var c=this.createTween(a,b);return W(c.elem,a,T.exec(b),c),c}]},tweener:function(a,b){n.isFunction(a)?(b=a,a=["*"]):a=a.match(G);for(var c,d=0,e=a.length;e>d;d++)c=a[d],_a.tweeners[c]=_a.tweeners[c]||[],_a.tweeners[c].unshift(b)},prefilters:[Za],prefilter:function(a,b){b?_a.prefilters.unshift(a):_a.prefilters.push(a)}}),n.speed=function(a,b,c){var d=a&&"object"==typeof a?n.extend({},a):{complete:c||!c&&b||n.isFunction(a)&&a,duration:a,easing:c&&b||b&&!n.isFunction(b)&&b};return d.duration=n.fx.off?0:"number"==typeof d.duration?d.duration:d.duration in n.fx.speeds?n.fx.speeds[d.duration]:n.fx.speeds._default,null!=d.queue&&d.queue!==!0||(d.queue="fx"),d.old=d.complete,d.complete=function(){n.isFunction(d.old)&&d.old.call(this),d.queue&&n.dequeue(this,d.queue)},d},n.fn.extend({fadeTo:function(a,b,c,d){return this.filter(V).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=n.isEmptyObject(a),f=n.speed(b,c,d),g=function(){var b=_a(this,n.extend({},a),f);(e||N.get(this,"finish"))&&b.stop(!0)};return g.finish=g,e||f.queue===!1?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop,b(c)};return"string"!=typeof a&&(c=b,b=a,a=void 0),b&&a!==!1&&this.queue(a||"fx",[]),this.each(function(){var b=!0,e=null!=a&&a+"queueHooks",f=n.timers,g=N.get(this);if(e)g[e]&&g[e].stop&&d(g[e]);else for(e in g)g[e]&&g[e].stop&&Va.test(e)&&d(g[e]);for(e=f.length;e--;)f[e].elem!==this||null!=a&&f[e].queue!==a||(f[e].anim.stop(c),b=!1,f.splice(e,1));!b&&c||n.dequeue(this,a)})},finish:function(a){return a!==!1&&(a=a||"fx"),this.each(function(){var b,c=N.get(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=n.timers,g=d?d.length:0;for(c.finish=!0,n.queue(this,a,[]),e&&e.stop&&e.stop.call(this,!0),b=f.length;b--;)f[b].elem===this&&f[b].queue===a&&(f[b].anim.stop(!0),f.splice(b,1));for(b=0;g>b;b++)d[b]&&d[b].finish&&d[b].finish.call(this);delete c.finish})}}),n.each(["toggle","show","hide"],function(a,b){var c=n.fn[b];n.fn[b]=function(a,d,e){return null==a||"boolean"==typeof a?c.apply(this,arguments):this.animate(Xa(b,!0),a,d,e)}}),n.each({slideDown:Xa("show"),slideUp:Xa("hide"),slideToggle:Xa("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){n.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),n.timers=[],n.fx.tick=function(){var a,b=0,c=n.timers;for(Sa=n.now();b<c.length;b++)a=c[b],a()||c[b]!==a||c.splice(b--,1);c.length||n.fx.stop(),Sa=void 0},n.fx.timer=function(a){n.timers.push(a),a()?n.fx.start():n.timers.pop()},n.fx.interval=13,n.fx.start=function(){Ta||(Ta=a.setInterval(n.fx.tick,n.fx.interval))},n.fx.stop=function(){a.clearInterval(Ta),Ta=null},n.fx.speeds={slow:600,fast:200,_default:400},n.fn.delay=function(b,c){return b=n.fx?n.fx.speeds[b]||b:b,c=c||"fx",this.queue(c,function(c,d){var e=a.setTimeout(c,b);d.stop=function(){a.clearTimeout(e)}})},function(){var a=d.createElement("input"),b=d.createElement("select"),c=b.appendChild(d.createElement("option"));a.type="checkbox",l.checkOn=""!==a.value,l.optSelected=c.selected,b.disabled=!0,l.optDisabled=!c.disabled,a=d.createElement("input"),a.value="t",a.type="radio",l.radioValue="t"===a.value}();var ab,bb=n.expr.attrHandle;n.fn.extend({attr:function(a,b){return K(this,n.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){n.removeAttr(this,a)})}}),n.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(3!==f&&8!==f&&2!==f)return"undefined"==typeof a.getAttribute?n.prop(a,b,c):(1===f&&n.isXMLDoc(a)||(b=b.toLowerCase(),e=n.attrHooks[b]||(n.expr.match.bool.test(b)?ab:void 0)),void 0!==c?null===c?void n.removeAttr(a,b):e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:(a.setAttribute(b,c+""),c):e&&"get"in e&&null!==(d=e.get(a,b))?d:(d=n.find.attr(a,b),null==d?void 0:d))},attrHooks:{type:{set:function(a,b){if(!l.radioValue&&"radio"===b&&n.nodeName(a,"input")){var c=a.value;return a.setAttribute("type",b),c&&(a.value=c),b}}}},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(G);if(f&&1===a.nodeType)while(c=f[e++])d=n.propFix[c]||c,n.expr.match.bool.test(c)&&(a[d]=!1),a.removeAttribute(c)}}),ab={set:function(a,b,c){return b===!1?n.removeAttr(a,c):a.setAttribute(c,c),c}},n.each(n.expr.match.bool.source.match(/\w+/g),function(a,b){var c=bb[b]||n.find.attr;bb[b]=function(a,b,d){var e,f;return d||(f=bb[b],bb[b]=e,e=null!=c(a,b,d)?b.toLowerCase():null,bb[b]=f),e}});var cb=/^(?:input|select|textarea|button)$/i,db=/^(?:a|area)$/i;n.fn.extend({prop:function(a,b){return K(this,n.prop,a,b,arguments.length>1)},removeProp:function(a){return this.each(function(){delete this[n.propFix[a]||a]})}}),n.extend({prop:function(a,b,c){var d,e,f=a.nodeType;if(3!==f&&8!==f&&2!==f)return 1===f&&n.isXMLDoc(a)||(b=n.propFix[b]||b,e=n.propHooks[b]),
+void 0!==c?e&&"set"in e&&void 0!==(d=e.set(a,c,b))?d:a[b]=c:e&&"get"in e&&null!==(d=e.get(a,b))?d:a[b]},propHooks:{tabIndex:{get:function(a){var b=n.find.attr(a,"tabindex");return b?parseInt(b,10):cb.test(a.nodeName)||db.test(a.nodeName)&&a.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),l.optSelected||(n.propHooks.selected={get:function(a){var b=a.parentNode;return b&&b.parentNode&&b.parentNode.selectedIndex,null},set:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex)}}),n.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){n.propFix[this.toLowerCase()]=this});var eb=/[\t\r\n\f]/g;function fb(a){return a.getAttribute&&a.getAttribute("class")||""}n.fn.extend({addClass:function(a){var b,c,d,e,f,g,h,i=0;if(n.isFunction(a))return this.each(function(b){n(this).addClass(a.call(this,b,fb(this)))});if("string"==typeof a&&a){b=a.match(G)||[];while(c=this[i++])if(e=fb(c),d=1===c.nodeType&&(" "+e+" ").replace(eb," ")){g=0;while(f=b[g++])d.indexOf(" "+f+" ")<0&&(d+=f+" ");h=n.trim(d),e!==h&&c.setAttribute("class",h)}}return this},removeClass:function(a){var b,c,d,e,f,g,h,i=0;if(n.isFunction(a))return this.each(function(b){n(this).removeClass(a.call(this,b,fb(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof a&&a){b=a.match(G)||[];while(c=this[i++])if(e=fb(c),d=1===c.nodeType&&(" "+e+" ").replace(eb," ")){g=0;while(f=b[g++])while(d.indexOf(" "+f+" ")>-1)d=d.replace(" "+f+" "," ");h=n.trim(d),e!==h&&c.setAttribute("class",h)}}return this},toggleClass:function(a,b){var c=typeof a;return"boolean"==typeof b&&"string"===c?b?this.addClass(a):this.removeClass(a):n.isFunction(a)?this.each(function(c){n(this).toggleClass(a.call(this,c,fb(this),b),b)}):this.each(function(){var b,d,e,f;if("string"===c){d=0,e=n(this),f=a.match(G)||[];while(b=f[d++])e.hasClass(b)?e.removeClass(b):e.addClass(b)}else void 0!==a&&"boolean"!==c||(b=fb(this),b&&N.set(this,"__className__",b),this.setAttribute&&this.setAttribute("class",b||a===!1?"":N.get(this,"__className__")||""))})},hasClass:function(a){var b,c,d=0;b=" "+a+" ";while(c=this[d++])if(1===c.nodeType&&(" "+fb(c)+" ").replace(eb," ").indexOf(b)>-1)return!0;return!1}});var gb=/\r/g,hb=/[\x20\t\r\n\f]+/g;n.fn.extend({val:function(a){var b,c,d,e=this[0];{if(arguments.length)return d=n.isFunction(a),this.each(function(c){var e;1===this.nodeType&&(e=d?a.call(this,c,n(this).val()):a,null==e?e="":"number"==typeof e?e+="":n.isArray(e)&&(e=n.map(e,function(a){return null==a?"":a+""})),b=n.valHooks[this.type]||n.valHooks[this.nodeName.toLowerCase()],b&&"set"in b&&void 0!==b.set(this,e,"value")||(this.value=e))});if(e)return b=n.valHooks[e.type]||n.valHooks[e.nodeName.toLowerCase()],b&&"get"in b&&void 0!==(c=b.get(e,"value"))?c:(c=e.value,"string"==typeof c?c.replace(gb,""):null==c?"":c)}}}),n.extend({valHooks:{option:{get:function(a){var b=n.find.attr(a,"value");return null!=b?b:n.trim(n.text(a)).replace(hb," ")}},select:{get:function(a){for(var b,c,d=a.options,e=a.selectedIndex,f="select-one"===a.type||0>e,g=f?null:[],h=f?e+1:d.length,i=0>e?h:f?e:0;h>i;i++)if(c=d[i],(c.selected||i===e)&&(l.optDisabled?!c.disabled:null===c.getAttribute("disabled"))&&(!c.parentNode.disabled||!n.nodeName(c.parentNode,"optgroup"))){if(b=n(c).val(),f)return b;g.push(b)}return g},set:function(a,b){var c,d,e=a.options,f=n.makeArray(b),g=e.length;while(g--)d=e[g],(d.selected=n.inArray(n.valHooks.option.get(d),f)>-1)&&(c=!0);return c||(a.selectedIndex=-1),f}}}}),n.each(["radio","checkbox"],function(){n.valHooks[this]={set:function(a,b){return n.isArray(b)?a.checked=n.inArray(n(a).val(),b)>-1:void 0}},l.checkOn||(n.valHooks[this].get=function(a){return null===a.getAttribute("value")?"on":a.value})});var ib=/^(?:focusinfocus|focusoutblur)$/;n.extend(n.event,{trigger:function(b,c,e,f){var g,h,i,j,l,m,o,p=[e||d],q=k.call(b,"type")?b.type:b,r=k.call(b,"namespace")?b.namespace.split("."):[];if(h=i=e=e||d,3!==e.nodeType&&8!==e.nodeType&&!ib.test(q+n.event.triggered)&&(q.indexOf(".")>-1&&(r=q.split("."),q=r.shift(),r.sort()),l=q.indexOf(":")<0&&"on"+q,b=b[n.expando]?b:new n.Event(q,"object"==typeof b&&b),b.isTrigger=f?2:3,b.namespace=r.join("."),b.rnamespace=b.namespace?new RegExp("(^|\\.)"+r.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,b.result=void 0,b.target||(b.target=e),c=null==c?[b]:n.makeArray(c,[b]),o=n.event.special[q]||{},f||!o.trigger||o.trigger.apply(e,c)!==!1)){if(!f&&!o.noBubble&&!n.isWindow(e)){for(j=o.delegateType||q,ib.test(j+q)||(h=h.parentNode);h;h=h.parentNode)p.push(h),i=h;i===(e.ownerDocument||d)&&p.push(i.defaultView||i.parentWindow||a)}g=0;while((h=p[g++])&&!b.isPropagationStopped())b.type=g>1?j:o.bindType||q,m=(N.get(h,"events")||{})[b.type]&&N.get(h,"handle"),m&&m.apply(h,c),m=l&&h[l],m&&m.apply&&L(h)&&(b.result=m.apply(h,c),b.result===!1&&b.preventDefault());return b.type=q,f||b.isDefaultPrevented()||o._default&&o._default.apply(p.pop(),c)!==!1||!L(e)||l&&n.isFunction(e[q])&&!n.isWindow(e)&&(i=e[l],i&&(e[l]=null),n.event.triggered=q,e[q](),n.event.triggered=void 0,i&&(e[l]=i)),b.result}},simulate:function(a,b,c){var d=n.extend(new n.Event,c,{type:a,isSimulated:!0});n.event.trigger(d,null,b)}}),n.fn.extend({trigger:function(a,b){return this.each(function(){n.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];return c?n.event.trigger(a,b,c,!0):void 0}}),n.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){n.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}}),n.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}}),l.focusin="onfocusin"in a,l.focusin||n.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){n.event.simulate(b,a.target,n.event.fix(a))};n.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=N.access(d,b);e||d.addEventListener(a,c,!0),N.access(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=N.access(d,b)-1;e?N.access(d,b,e):(d.removeEventListener(a,c,!0),N.remove(d,b))}}});var jb=a.location,kb=n.now(),lb=/\?/;n.parseJSON=function(a){return JSON.parse(a+"")},n.parseXML=function(b){var c;if(!b||"string"!=typeof b)return null;try{c=(new a.DOMParser).parseFromString(b,"text/xml")}catch(d){c=void 0}return c&&!c.getElementsByTagName("parsererror").length||n.error("Invalid XML: "+b),c};var mb=/#.*$/,nb=/([?&])_=[^&]*/,ob=/^(.*?):[ \t]*([^\r\n]*)$/gm,pb=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,qb=/^(?:GET|HEAD)$/,rb=/^\/\//,sb={},tb={},ub="*/".concat("*"),vb=d.createElement("a");vb.href=jb.href;function wb(a){return function(b,c){"string"!=typeof b&&(c=b,b="*");var d,e=0,f=b.toLowerCase().match(G)||[];if(n.isFunction(c))while(d=f[e++])"+"===d[0]?(d=d.slice(1)||"*",(a[d]=a[d]||[]).unshift(c)):(a[d]=a[d]||[]).push(c)}}function xb(a,b,c,d){var e={},f=a===tb;function g(h){var i;return e[h]=!0,n.each(a[h]||[],function(a,h){var j=h(b,c,d);return"string"!=typeof j||f||e[j]?f?!(i=j):void 0:(b.dataTypes.unshift(j),g(j),!1)}),i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function yb(a,b){var c,d,e=n.ajaxSettings.flatOptions||{};for(c in b)void 0!==b[c]&&((e[c]?a:d||(d={}))[c]=b[c]);return d&&n.extend(!0,a,d),a}function zb(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while("*"===i[0])i.shift(),void 0===d&&(d=a.mimeType||b.getResponseHeader("Content-Type"));if(d)for(e in h)if(h[e]&&h[e].test(d)){i.unshift(e);break}if(i[0]in c)f=i[0];else{for(e in c){if(!i[0]||a.converters[e+" "+i[0]]){f=e;break}g||(g=e)}f=f||g}return f?(f!==i[0]&&i.unshift(f),c[f]):void 0}function Ab(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1])for(g in a.converters)j[g.toLowerCase()]=a.converters[g];f=k.shift();while(f)if(a.responseFields[f]&&(c[a.responseFields[f]]=b),!i&&d&&a.dataFilter&&(b=a.dataFilter(b,a.dataType)),i=f,f=k.shift())if("*"===f)f=i;else if("*"!==i&&i!==f){if(g=j[i+" "+f]||j["* "+f],!g)for(e in j)if(h=e.split(" "),h[1]===f&&(g=j[i+" "+h[0]]||j["* "+h[0]])){g===!0?g=j[e]:j[e]!==!0&&(f=h[0],k.unshift(h[1]));break}if(g!==!0)if(g&&a["throws"])b=g(b);else try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}return{state:"success",data:b}}n.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:jb.href,type:"GET",isLocal:pb.test(jb.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":ub,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":n.parseJSON,"text xml":n.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(a,b){return b?yb(yb(a,n.ajaxSettings),b):yb(n.ajaxSettings,a)},ajaxPrefilter:wb(sb),ajaxTransport:wb(tb),ajax:function(b,c){"object"==typeof b&&(c=b,b=void 0),c=c||{};var e,f,g,h,i,j,k,l,m=n.ajaxSetup({},c),o=m.context||m,p=m.context&&(o.nodeType||o.jquery)?n(o):n.event,q=n.Deferred(),r=n.Callbacks("once memory"),s=m.statusCode||{},t={},u={},v=0,w="canceled",x={readyState:0,getResponseHeader:function(a){var b;if(2===v){if(!h){h={};while(b=ob.exec(g))h[b[1].toLowerCase()]=b[2]}b=h[a.toLowerCase()]}return null==b?null:b},getAllResponseHeaders:function(){return 2===v?g:null},setRequestHeader:function(a,b){var c=a.toLowerCase();return v||(a=u[c]=u[c]||a,t[a]=b),this},overrideMimeType:function(a){return v||(m.mimeType=a),this},statusCode:function(a){var b;if(a)if(2>v)for(b in a)s[b]=[s[b],a[b]];else x.always(a[x.status]);return this},abort:function(a){var b=a||w;return e&&e.abort(b),z(0,b),this}};if(q.promise(x).complete=r.add,x.success=x.done,x.error=x.fail,m.url=((b||m.url||jb.href)+"").replace(mb,"").replace(rb,jb.protocol+"//"),m.type=c.method||c.type||m.method||m.type,m.dataTypes=n.trim(m.dataType||"*").toLowerCase().match(G)||[""],null==m.crossDomain){j=d.createElement("a");try{j.href=m.url,j.href=j.href,m.crossDomain=vb.protocol+"//"+vb.host!=j.protocol+"//"+j.host}catch(y){m.crossDomain=!0}}if(m.data&&m.processData&&"string"!=typeof m.data&&(m.data=n.param(m.data,m.traditional)),xb(sb,m,c,x),2===v)return x;k=n.event&&m.global,k&&0===n.active++&&n.event.trigger("ajaxStart"),m.type=m.type.toUpperCase(),m.hasContent=!qb.test(m.type),f=m.url,m.hasContent||(m.data&&(f=m.url+=(lb.test(f)?"&":"?")+m.data,delete m.data),m.cache===!1&&(m.url=nb.test(f)?f.replace(nb,"$1_="+kb++):f+(lb.test(f)?"&":"?")+"_="+kb++)),m.ifModified&&(n.lastModified[f]&&x.setRequestHeader("If-Modified-Since",n.lastModified[f]),n.etag[f]&&x.setRequestHeader("If-None-Match",n.etag[f])),(m.data&&m.hasContent&&m.contentType!==!1||c.contentType)&&x.setRequestHeader("Content-Type",m.contentType),x.setRequestHeader("Accept",m.dataTypes[0]&&m.accepts[m.dataTypes[0]]?m.accepts[m.dataTypes[0]]+("*"!==m.dataTypes[0]?", "+ub+"; q=0.01":""):m.accepts["*"]);for(l in m.headers)x.setRequestHeader(l,m.headers[l]);if(m.beforeSend&&(m.beforeSend.call(o,x,m)===!1||2===v))return x.abort();w="abort";for(l in{success:1,error:1,complete:1})x[l](m[l]);if(e=xb(tb,m,c,x)){if(x.readyState=1,k&&p.trigger("ajaxSend",[x,m]),2===v)return x;m.async&&m.timeout>0&&(i=a.setTimeout(function(){x.abort("timeout")},m.timeout));try{v=1,e.send(t,z)}catch(y){if(!(2>v))throw y;z(-1,y)}}else z(-1,"No Transport");function z(b,c,d,h){var j,l,t,u,w,y=c;2!==v&&(v=2,i&&a.clearTimeout(i),e=void 0,g=h||"",x.readyState=b>0?4:0,j=b>=200&&300>b||304===b,d&&(u=zb(m,x,d)),u=Ab(m,u,x,j),j?(m.ifModified&&(w=x.getResponseHeader("Last-Modified"),w&&(n.lastModified[f]=w),w=x.getResponseHeader("etag"),w&&(n.etag[f]=w)),204===b||"HEAD"===m.type?y="nocontent":304===b?y="notmodified":(y=u.state,l=u.data,t=u.error,j=!t)):(t=y,!b&&y||(y="error",0>b&&(b=0))),x.status=b,x.statusText=(c||y)+"",j?q.resolveWith(o,[l,y,x]):q.rejectWith(o,[x,y,t]),x.statusCode(s),s=void 0,k&&p.trigger(j?"ajaxSuccess":"ajaxError",[x,m,j?l:t]),r.fireWith(o,[x,y]),k&&(p.trigger("ajaxComplete",[x,m]),--n.active||n.event.trigger("ajaxStop")))}return x},getJSON:function(a,b,c){return n.get(a,b,c,"json")},getScript:function(a,b){return n.get(a,void 0,b,"script")}}),n.each(["get","post"],function(a,b){n[b]=function(a,c,d,e){return n.isFunction(c)&&(e=e||d,d=c,c=void 0),n.ajax(n.extend({url:a,type:b,dataType:e,data:c,success:d},n.isPlainObject(a)&&a))}}),n._evalUrl=function(a){return n.ajax({url:a,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},n.fn.extend({wrapAll:function(a){var b;return n.isFunction(a)?this.each(function(b){n(this).wrapAll(a.call(this,b))}):(this[0]&&(b=n(a,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstElementChild)a=a.firstElementChild;return a}).append(this)),this)},wrapInner:function(a){return n.isFunction(a)?this.each(function(b){n(this).wrapInner(a.call(this,b))}):this.each(function(){var b=n(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=n.isFunction(a);return this.each(function(c){n(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){n.nodeName(this,"body")||n(this).replaceWith(this.childNodes)}).end()}}),n.expr.filters.hidden=function(a){return!n.expr.filters.visible(a)},n.expr.filters.visible=function(a){return a.offsetWidth>0||a.offsetHeight>0||a.getClientRects().length>0};var Bb=/%20/g,Cb=/\[\]$/,Db=/\r?\n/g,Eb=/^(?:submit|button|image|reset|file)$/i,Fb=/^(?:input|select|textarea|keygen)/i;function Gb(a,b,c,d){var e;if(n.isArray(b))n.each(b,function(b,e){c||Cb.test(a)?d(a,e):Gb(a+"["+("object"==typeof e&&null!=e?b:"")+"]",e,c,d)});else if(c||"object"!==n.type(b))d(a,b);else for(e in b)Gb(a+"["+e+"]",b[e],c,d)}n.param=function(a,b){var c,d=[],e=function(a,b){b=n.isFunction(b)?b():null==b?"":b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(void 0===b&&(b=n.ajaxSettings&&n.ajaxSettings.traditional),n.isArray(a)||a.jquery&&!n.isPlainObject(a))n.each(a,function(){e(this.name,this.value)});else for(c in a)Gb(c,a[c],b,e);return d.join("&").replace(Bb,"+")},n.fn.extend({serialize:function(){return n.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=n.prop(this,"elements");return a?n.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!n(this).is(":disabled")&&Fb.test(this.nodeName)&&!Eb.test(a)&&(this.checked||!X.test(a))}).map(function(a,b){var c=n(this).val();return null==c?null:n.isArray(c)?n.map(c,function(a){return{name:b.name,value:a.replace(Db,"\r\n")}}):{name:b.name,value:c.replace(Db,"\r\n")}}).get()}}),n.ajaxSettings.xhr=function(){try{return new a.XMLHttpRequest}catch(b){}};var Hb={0:200,1223:204},Ib=n.ajaxSettings.xhr();l.cors=!!Ib&&"withCredentials"in Ib,l.ajax=Ib=!!Ib,n.ajaxTransport(function(b){var c,d;return l.cors||Ib&&!b.crossDomain?{send:function(e,f){var g,h=b.xhr();if(h.open(b.type,b.url,b.async,b.username,b.password),b.xhrFields)for(g in b.xhrFields)h[g]=b.xhrFields[g];b.mimeType&&h.overrideMimeType&&h.overrideMimeType(b.mimeType),b.crossDomain||e["X-Requested-With"]||(e["X-Requested-With"]="XMLHttpRequest");for(g in e)h.setRequestHeader(g,e[g]);c=function(a){return function(){c&&(c=d=h.onload=h.onerror=h.onabort=h.onreadystatechange=null,"abort"===a?h.abort():"error"===a?"number"!=typeof h.status?f(0,"error"):f(h.status,h.statusText):f(Hb[h.status]||h.status,h.statusText,"text"!==(h.responseType||"text")||"string"!=typeof h.responseText?{binary:h.response}:{text:h.responseText},h.getAllResponseHeaders()))}},h.onload=c(),d=h.onerror=c("error"),void 0!==h.onabort?h.onabort=d:h.onreadystatechange=function(){4===h.readyState&&a.setTimeout(function(){c&&d()})},c=c("abort");try{h.send(b.hasContent&&b.data||null)}catch(i){if(c)throw i}},abort:function(){c&&c()}}:void 0}),n.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(a){return n.globalEval(a),a}}}),n.ajaxPrefilter("script",function(a){void 0===a.cache&&(a.cache=!1),a.crossDomain&&(a.type="GET")}),n.ajaxTransport("script",function(a){if(a.crossDomain){var b,c;return{send:function(e,f){b=n("<script>").prop({charset:a.scriptCharset,src:a.url}).on("load error",c=function(a){b.remove(),c=null,a&&f("error"===a.type?404:200,a.type)}),d.head.appendChild(b[0])},abort:function(){c&&c()}}}});var Jb=[],Kb=/(=)\?(?=&|$)|\?\?/;n.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=Jb.pop()||n.expando+"_"+kb++;return this[a]=!0,a}}),n.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==!1&&(Kb.test(b.url)?"url":"string"==typeof b.data&&0===(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&Kb.test(b.data)&&"data");return h||"jsonp"===b.dataTypes[0]?(e=b.jsonpCallback=n.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,h?b[h]=b[h].replace(Kb,"$1"+e):b.jsonp!==!1&&(b.url+=(lb.test(b.url)?"&":"?")+b.jsonp+"="+e),b.converters["script json"]=function(){return g||n.error(e+" was not called"),g[0]},b.dataTypes[0]="json",f=a[e],a[e]=function(){g=arguments},d.always(function(){void 0===f?n(a).removeProp(e):a[e]=f,b[e]&&(b.jsonpCallback=c.jsonpCallback,Jb.push(e)),g&&n.isFunction(f)&&f(g[0]),g=f=void 0}),"script"):void 0}),n.parseHTML=function(a,b,c){if(!a||"string"!=typeof a)return null;"boolean"==typeof b&&(c=b,b=!1),b=b||d;var e=x.exec(a),f=!c&&[];return e?[b.createElement(e[1])]:(e=ca([a],b,f),f&&f.length&&n(f).remove(),n.merge([],e.childNodes))};var Lb=n.fn.load;n.fn.load=function(a,b,c){if("string"!=typeof a&&Lb)return Lb.apply(this,arguments);var d,e,f,g=this,h=a.indexOf(" ");return h>-1&&(d=n.trim(a.slice(h)),a=a.slice(0,h)),n.isFunction(b)?(c=b,b=void 0):b&&"object"==typeof b&&(e="POST"),g.length>0&&n.ajax({url:a,type:e||"GET",dataType:"html",data:b}).done(function(a){f=arguments,g.html(d?n("<div>").append(n.parseHTML(a)).find(d):a)}).always(c&&function(a,b){g.each(function(){c.apply(this,f||[a.responseText,b,a])})}),this},n.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){n.fn[b]=function(a){return this.on(b,a)}}),n.expr.filters.animated=function(a){return n.grep(n.timers,function(b){return a===b.elem}).length};function Mb(a){return n.isWindow(a)?a:9===a.nodeType&&a.defaultView}n.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=n.css(a,"position"),l=n(a),m={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=n.css(a,"top"),i=n.css(a,"left"),j=("absolute"===k||"fixed"===k)&&(f+i).indexOf("auto")>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),n.isFunction(b)&&(b=b.call(a,c,n.extend({},h))),null!=b.top&&(m.top=b.top-h.top+g),null!=b.left&&(m.left=b.left-h.left+e),"using"in b?b.using.call(a,m):l.css(m)}},n.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){n.offset.setOffset(this,a,b)});var b,c,d=this[0],e={top:0,left:0},f=d&&d.ownerDocument;if(f)return b=f.documentElement,n.contains(b,d)?(e=d.getBoundingClientRect(),c=Mb(f),{top:e.top+c.pageYOffset-b.clientTop,left:e.left+c.pageXOffset-b.clientLeft}):e},position:function(){if(this[0]){var a,b,c=this[0],d={top:0,left:0};return"fixed"===n.css(c,"position")?b=c.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),n.nodeName(a[0],"html")||(d=a.offset()),d.top+=n.css(a[0],"borderTopWidth",!0),d.left+=n.css(a[0],"borderLeftWidth",!0)),{top:b.top-d.top-n.css(c,"marginTop",!0),left:b.left-d.left-n.css(c,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent;while(a&&"static"===n.css(a,"position"))a=a.offsetParent;return a||Ea})}}),n.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,b){var c="pageYOffset"===b;n.fn[a]=function(d){return K(this,function(a,d,e){var f=Mb(a);return void 0===e?f?f[b]:a[d]:void(f?f.scrollTo(c?f.pageXOffset:e,c?e:f.pageYOffset):a[d]=e)},a,d,arguments.length)}}),n.each(["top","left"],function(a,b){n.cssHooks[b]=Ga(l.pixelPosition,function(a,c){return c?(c=Fa(a,b),Ba.test(c)?n(a).position()[b]+"px":c):void 0})}),n.each({Height:"height",Width:"width"},function(a,b){n.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){n.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return K(this,function(b,c,d){var e;return n.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?n.css(b,c,g):n.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),n.fn.extend({bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return 1===arguments.length?this.off(a,"**"):this.off(b,a||"**",c)},size:function(){return this.length}}),n.fn.andSelf=n.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return n});var Nb=a.jQuery,Ob=a.$;return n.noConflict=function(b){return a.$===n&&(a.$=Ob),b&&a.jQuery===n&&(a.jQuery=Nb),n},b||(a.jQuery=a.$=n),n});
diff --git a/op25/gr-op25_repeater/apps/oplog/op25/static/js/bootstrap/bootstrap.bundle.min.js b/op25/gr-op25_repeater/apps/oplog/op25/static/js/bootstrap/bootstrap.bundle.min.js
new file mode 100644
index 0000000..9b6cec7
--- /dev/null
+++ b/op25/gr-op25_repeater/apps/oplog/op25/static/js/bootstrap/bootstrap.bundle.min.js
@@ -0,0 +1,7 @@
+/*!
+ * Bootstrap v5.0.1 (https://getbootstrap.com/)
+ * Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
+ */
+!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).bootstrap=e()}(this,(function(){"use strict";const t={find:(t,e=document.documentElement)=>[].concat(...Element.prototype.querySelectorAll.call(e,t)),findOne:(t,e=document.documentElement)=>Element.prototype.querySelector.call(e,t),children:(t,e)=>[].concat(...t.children).filter(t=>t.matches(e)),parents(t,e){const i=[];let n=t.parentNode;for(;n&&n.nodeType===Node.ELEMENT_NODE&&3!==n.nodeType;)n.matches(e)&&i.push(n),n=n.parentNode;return i},prev(t,e){let i=t.previousElementSibling;for(;i;){if(i.matches(e))return[i];i=i.previousElementSibling}return[]},next(t,e){let i=t.nextElementSibling;for(;i;){if(i.matches(e))return[i];i=i.nextElementSibling}return[]}},e=t=>{do{t+=Math.floor(1e6*Math.random())}while(document.getElementById(t));return t},i=t=>{let e=t.getAttribute("data-bs-target");if(!e||"#"===e){let i=t.getAttribute("href");if(!i||!i.includes("#")&&!i.startsWith("."))return null;i.includes("#")&&!i.startsWith("#")&&(i="#"+i.split("#")[1]),e=i&&"#"!==i?i.trim():null}return e},n=t=>{const e=i(t);return e&&document.querySelector(e)?e:null},s=t=>{const e=i(t);return e?document.querySelector(e):null},o=t=>{if(!t)return 0;let{transitionDuration:e,transitionDelay:i}=window.getComputedStyle(t);const n=Number.parseFloat(e),s=Number.parseFloat(i);return n||s?(e=e.split(",")[0],i=i.split(",")[0],1e3*(Number.parseFloat(e)+Number.parseFloat(i))):0},r=t=>{t.dispatchEvent(new Event("transitionend"))},a=t=>!(!t||"object"!=typeof t)&&(void 0!==t.jquery&&(t=t[0]),void 0!==t.nodeType),l=e=>a(e)?e.jquery?e[0]:e:"string"==typeof e&&e.length>0?t.findOne(e):null,c=(t,e)=>{let i=!1;const n=e+5;t.addEventListener("transitionend",(function e(){i=!0,t.removeEventListener("transitionend",e)})),setTimeout(()=>{i||r(t)},n)},d=(t,e,i)=>{Object.keys(i).forEach(n=>{const s=i[n],o=e[n],r=o&&a(o)?"element":null==(l=o)?""+l:{}.toString.call(l).match(/\s([a-z]+)/i)[1].toLowerCase();var l;if(!new RegExp(s).test(r))throw new TypeError(`${t.toUpperCase()}: Option "${n}" provided type "${r}" but expected type "${s}".`)})},h=t=>{if(!t)return!1;if(t.style&&t.parentNode&&t.parentNode.style){const e=getComputedStyle(t),i=getComputedStyle(t.parentNode);return"none"!==e.display&&"none"!==i.display&&"hidden"!==e.visibility}return!1},u=t=>!t||t.nodeType!==Node.ELEMENT_NODE||!!t.classList.contains("disabled")||(void 0!==t.disabled?t.disabled:t.hasAttribute("disabled")&&"false"!==t.getAttribute("disabled")),f=t=>{if(!document.documentElement.attachShadow)return null;if("function"==typeof t.getRootNode){const e=t.getRootNode();return e instanceof ShadowRoot?e:null}return t instanceof ShadowRoot?t:t.parentNode?f(t.parentNode):null},p=()=>{},m=t=>t.offsetHeight,g=()=>{const{jQuery:t}=window;return t&&!document.body.hasAttribute("data-bs-no-jquery")?t:null},_=()=>"rtl"===document.documentElement.dir,b=t=>{var e;e=()=>{const e=g();if(e){const i=t.NAME,n=e.fn[i];e.fn[i]=t.jQueryInterface,e.fn[i].Constructor=t,e.fn[i].noConflict=()=>(e.fn[i]=n,t.jQueryInterface)}},"loading"===document.readyState?document.addEventListener("DOMContentLoaded",e):e()},v=t=>{"function"==typeof t&&t()},y=new Map;var w={set(t,e,i){y.has(t)||y.set(t,new Map);const n=y.get(t);n.has(e)||0===n.size?n.set(e,i):console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(n.keys())[0]}.`)},get:(t,e)=>y.has(t)&&y.get(t).get(e)||null,remove(t,e){if(!y.has(t))return;const i=y.get(t);i.delete(e),0===i.size&&y.delete(t)}};const E=/[^.]*(?=\..*)\.|.*/,T=/\..*/,A=/::\d+$/,L={};let O=1;const k={mouseenter:"mouseover",mouseleave:"mouseout"},C=/^(mouseenter|mouseleave)/i,x=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function D(t,e){return e&&`${e}::${O++}`||t.uidEvent||O++}function N(t){const e=D(t);return t.uidEvent=e,L[e]=L[e]||{},L[e]}function S(t,e,i=null){const n=Object.keys(t);for(let s=0,o=n.length;s<o;s++){const o=t[n[s]];if(o.originalHandler===e&&o.delegationSelector===i)return o}return null}function I(t,e,i){const n="string"==typeof e,s=n?i:e;let o=M(t);return x.has(o)||(o=t),[n,s,o]}function j(t,e,i,n,s){if("string"!=typeof e||!t)return;if(i||(i=n,n=null),C.test(e)){const t=t=>function(e){if(!e.relatedTarget||e.relatedTarget!==e.delegateTarget&&!e.delegateTarget.contains(e.relatedTarget))return t.call(this,e)};n?n=t(n):i=t(i)}const[o,r,a]=I(e,i,n),l=N(t),c=l[a]||(l[a]={}),d=S(c,r,o?i:null);if(d)return void(d.oneOff=d.oneOff&&s);const h=D(r,e.replace(E,"")),u=o?function(t,e,i){return function n(s){const o=t.querySelectorAll(e);for(let{target:r}=s;r&&r!==this;r=r.parentNode)for(let a=o.length;a--;)if(o[a]===r)return s.delegateTarget=r,n.oneOff&&H.off(t,s.type,e,i),i.apply(r,[s]);return null}}(t,i,n):function(t,e){return function i(n){return n.delegateTarget=t,i.oneOff&&H.off(t,n.type,e),e.apply(t,[n])}}(t,i);u.delegationSelector=o?i:null,u.originalHandler=r,u.oneOff=s,u.uidEvent=h,c[h]=u,t.addEventListener(a,u,o)}function P(t,e,i,n,s){const o=S(e[i],n,s);o&&(t.removeEventListener(i,o,Boolean(s)),delete e[i][o.uidEvent])}function M(t){return t=t.replace(T,""),k[t]||t}const H={on(t,e,i,n){j(t,e,i,n,!1)},one(t,e,i,n){j(t,e,i,n,!0)},off(t,e,i,n){if("string"!=typeof e||!t)return;const[s,o,r]=I(e,i,n),a=r!==e,l=N(t),c=e.startsWith(".");if(void 0!==o){if(!l||!l[r])return;return void P(t,l,r,o,s?i:null)}c&&Object.keys(l).forEach(i=>{!function(t,e,i,n){const s=e[i]||{};Object.keys(s).forEach(o=>{if(o.includes(n)){const n=s[o];P(t,e,i,n.originalHandler,n.delegationSelector)}})}(t,l,i,e.slice(1))});const d=l[r]||{};Object.keys(d).forEach(i=>{const n=i.replace(A,"");if(!a||e.includes(n)){const e=d[i];P(t,l,r,e.originalHandler,e.delegationSelector)}})},trigger(t,e,i){if("string"!=typeof e||!t)return null;const n=g(),s=M(e),o=e!==s,r=x.has(s);let a,l=!0,c=!0,d=!1,h=null;return o&&n&&(a=n.Event(e,i),n(t).trigger(a),l=!a.isPropagationStopped(),c=!a.isImmediatePropagationStopped(),d=a.isDefaultPrevented()),r?(h=document.createEvent("HTMLEvents"),h.initEvent(s,l,!0)):h=new CustomEvent(e,{bubbles:l,cancelable:!0}),void 0!==i&&Object.keys(i).forEach(t=>{Object.defineProperty(h,t,{get:()=>i[t]})}),d&&h.preventDefault(),c&&t.dispatchEvent(h),h.defaultPrevented&&void 0!==a&&a.preventDefault(),h}};class R{constructor(t){(t=l(t))&&(this._element=t,w.set(this._element,this.constructor.DATA_KEY,this))}dispose(){w.remove(this._element,this.constructor.DATA_KEY),H.off(this._element,this.constructor.EVENT_KEY),Object.getOwnPropertyNames(this).forEach(t=>{this[t]=null})}_queueCallback(t,e,i=!0){if(!i)return void v(t);const n=o(e);H.one(e,"transitionend",()=>v(t)),c(e,n)}static getInstance(t){return w.get(t,this.DATA_KEY)}static get VERSION(){return"5.0.1"}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}static get DATA_KEY(){return"bs."+this.NAME}static get EVENT_KEY(){return"."+this.DATA_KEY}}class B extends R{static get NAME(){return"alert"}close(t){const e=t?this._getRootElement(t):this._element,i=this._triggerCloseEvent(e);null===i||i.defaultPrevented||this._removeElement(e)}_getRootElement(t){return s(t)||t.closest(".alert")}_triggerCloseEvent(t){return H.trigger(t,"close.bs.alert")}_removeElement(t){t.classList.remove("show");const e=t.classList.contains("fade");this._queueCallback(()=>this._destroyElement(t),t,e)}_destroyElement(t){t.parentNode&&t.parentNode.removeChild(t),H.trigger(t,"closed.bs.alert")}static jQueryInterface(t){return this.each((function(){let e=w.get(this,"bs.alert");e||(e=new B(this)),"close"===t&&e[t](this)}))}static handleDismiss(t){return function(e){e&&e.preventDefault(),t.close(this)}}}H.on(document,"click.bs.alert.data-api",'[data-bs-dismiss="alert"]',B.handleDismiss(new B)),b(B);class W extends R{static get NAME(){return"button"}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle("active"))}static jQueryInterface(t){return this.each((function(){let e=w.get(this,"bs.button");e||(e=new W(this)),"toggle"===t&&e[t]()}))}}function q(t){return"true"===t||"false"!==t&&(t===Number(t).toString()?Number(t):""===t||"null"===t?null:t)}function z(t){return t.replace(/[A-Z]/g,t=>"-"+t.toLowerCase())}H.on(document,"click.bs.button.data-api",'[data-bs-toggle="button"]',t=>{t.preventDefault();const e=t.target.closest('[data-bs-toggle="button"]');let i=w.get(e,"bs.button");i||(i=new W(e)),i.toggle()}),b(W);const U={setDataAttribute(t,e,i){t.setAttribute("data-bs-"+z(e),i)},removeDataAttribute(t,e){t.removeAttribute("data-bs-"+z(e))},getDataAttributes(t){if(!t)return{};const e={};return Object.keys(t.dataset).filter(t=>t.startsWith("bs")).forEach(i=>{let n=i.replace(/^bs/,"");n=n.charAt(0).toLowerCase()+n.slice(1,n.length),e[n]=q(t.dataset[i])}),e},getDataAttribute:(t,e)=>q(t.getAttribute("data-bs-"+z(e))),offset(t){const e=t.getBoundingClientRect();return{top:e.top+document.body.scrollTop,left:e.left+document.body.scrollLeft}},position:t=>({top:t.offsetTop,left:t.offsetLeft})},$={interval:5e3,keyboard:!0,slide:!1,pause:"hover",wrap:!0,touch:!0},F={interval:"(number|boolean)",keyboard:"boolean",slide:"(boolean|string)",pause:"(string|boolean)",wrap:"boolean",touch:"boolean"},V="next",K="prev",X="left",Y="right";class Q extends R{constructor(e,i){super(e),this._items=null,this._interval=null,this._activeElement=null,this._isPaused=!1,this._isSliding=!1,this.touchTimeout=null,this.touchStartX=0,this.touchDeltaX=0,this._config=this._getConfig(i),this._indicatorsElement=t.findOne(".carousel-indicators",this._element),this._touchSupported="ontouchstart"in document.documentElement||navigator.maxTouchPoints>0,this._pointerEvent=Boolean(window.PointerEvent),this._addEventListeners()}static get Default(){return $}static get NAME(){return"carousel"}next(){this._isSliding||this._slide(V)}nextWhenVisible(){!document.hidden&&h(this._element)&&this.next()}prev(){this._isSliding||this._slide(K)}pause(e){e||(this._isPaused=!0),t.findOne(".carousel-item-next, .carousel-item-prev",this._element)&&(r(this._element),this.cycle(!0)),clearInterval(this._interval),this._interval=null}cycle(t){t||(this._isPaused=!1),this._interval&&(clearInterval(this._interval),this._interval=null),this._config&&this._config.interval&&!this._isPaused&&(this._updateInterval(),this._interval=setInterval((document.visibilityState?this.nextWhenVisible:this.next).bind(this),this._config.interval))}to(e){this._activeElement=t.findOne(".active.carousel-item",this._element);const i=this._getItemIndex(this._activeElement);if(e>this._items.length-1||e<0)return;if(this._isSliding)return void H.one(this._element,"slid.bs.carousel",()=>this.to(e));if(i===e)return this.pause(),void this.cycle();const n=e>i?V:K;this._slide(n,this._items[e])}_getConfig(t){return t={...$,...t},d("carousel",t,F),t}_handleSwipe(){const t=Math.abs(this.touchDeltaX);if(t<=40)return;const e=t/this.touchDeltaX;this.touchDeltaX=0,e&&this._slide(e>0?Y:X)}_addEventListeners(){this._config.keyboard&&H.on(this._element,"keydown.bs.carousel",t=>this._keydown(t)),"hover"===this._config.pause&&(H.on(this._element,"mouseenter.bs.carousel",t=>this.pause(t)),H.on(this._element,"mouseleave.bs.carousel",t=>this.cycle(t))),this._config.touch&&this._touchSupported&&this._addTouchEventListeners()}_addTouchEventListeners(){const e=t=>{!this._pointerEvent||"pen"!==t.pointerType&&"touch"!==t.pointerType?this._pointerEvent||(this.touchStartX=t.touches[0].clientX):this.touchStartX=t.clientX},i=t=>{this.touchDeltaX=t.touches&&t.touches.length>1?0:t.touches[0].clientX-this.touchStartX},n=t=>{!this._pointerEvent||"pen"!==t.pointerType&&"touch"!==t.pointerType||(this.touchDeltaX=t.clientX-this.touchStartX),this._handleSwipe(),"hover"===this._config.pause&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout(t=>this.cycle(t),500+this._config.interval))};t.find(".carousel-item img",this._element).forEach(t=>{H.on(t,"dragstart.bs.carousel",t=>t.preventDefault())}),this._pointerEvent?(H.on(this._element,"pointerdown.bs.carousel",t=>e(t)),H.on(this._element,"pointerup.bs.carousel",t=>n(t)),this._element.classList.add("pointer-event")):(H.on(this._element,"touchstart.bs.carousel",t=>e(t)),H.on(this._element,"touchmove.bs.carousel",t=>i(t)),H.on(this._element,"touchend.bs.carousel",t=>n(t)))}_keydown(t){/input|textarea/i.test(t.target.tagName)||("ArrowLeft"===t.key?(t.preventDefault(),this._slide(Y)):"ArrowRight"===t.key&&(t.preventDefault(),this._slide(X)))}_getItemIndex(e){return this._items=e&&e.parentNode?t.find(".carousel-item",e.parentNode):[],this._items.indexOf(e)}_getItemByOrder(t,e){const i=t===V,n=t===K,s=this._getItemIndex(e),o=this._items.length-1;if((n&&0===s||i&&s===o)&&!this._config.wrap)return e;const r=(s+(n?-1:1))%this._items.length;return-1===r?this._items[this._items.length-1]:this._items[r]}_triggerSlideEvent(e,i){const n=this._getItemIndex(e),s=this._getItemIndex(t.findOne(".active.carousel-item",this._element));return H.trigger(this._element,"slide.bs.carousel",{relatedTarget:e,direction:i,from:s,to:n})}_setActiveIndicatorElement(e){if(this._indicatorsElement){const i=t.findOne(".active",this._indicatorsElement);i.classList.remove("active"),i.removeAttribute("aria-current");const n=t.find("[data-bs-target]",this._indicatorsElement);for(let t=0;t<n.length;t++)if(Number.parseInt(n[t].getAttribute("data-bs-slide-to"),10)===this._getItemIndex(e)){n[t].classList.add("active"),n[t].setAttribute("aria-current","true");break}}}_updateInterval(){const e=this._activeElement||t.findOne(".active.carousel-item",this._element);if(!e)return;const i=Number.parseInt(e.getAttribute("data-bs-interval"),10);i?(this._config.defaultInterval=this._config.defaultInterval||this._config.interval,this._config.interval=i):this._config.interval=this._config.defaultInterval||this._config.interval}_slide(e,i){const n=this._directionToOrder(e),s=t.findOne(".active.carousel-item",this._element),o=this._getItemIndex(s),r=i||this._getItemByOrder(n,s),a=this._getItemIndex(r),l=Boolean(this._interval),c=n===V,d=c?"carousel-item-start":"carousel-item-end",h=c?"carousel-item-next":"carousel-item-prev",u=this._orderToDirection(n);if(r&&r.classList.contains("active"))return void(this._isSliding=!1);if(this._triggerSlideEvent(r,u).defaultPrevented)return;if(!s||!r)return;this._isSliding=!0,l&&this.pause(),this._setActiveIndicatorElement(r),this._activeElement=r;const f=()=>{H.trigger(this._element,"slid.bs.carousel",{relatedTarget:r,direction:u,from:o,to:a})};if(this._element.classList.contains("slide")){r.classList.add(h),m(r),s.classList.add(d),r.classList.add(d);const t=()=>{r.classList.remove(d,h),r.classList.add("active"),s.classList.remove("active",h,d),this._isSliding=!1,setTimeout(f,0)};this._queueCallback(t,s,!0)}else s.classList.remove("active"),r.classList.add("active"),this._isSliding=!1,f();l&&this.cycle()}_directionToOrder(t){return[Y,X].includes(t)?_()?t===X?K:V:t===X?V:K:t}_orderToDirection(t){return[V,K].includes(t)?_()?t===K?X:Y:t===K?Y:X:t}static carouselInterface(t,e){let i=w.get(t,"bs.carousel"),n={...$,...U.getDataAttributes(t)};"object"==typeof e&&(n={...n,...e});const s="string"==typeof e?e:n.slide;if(i||(i=new Q(t,n)),"number"==typeof e)i.to(e);else if("string"==typeof s){if(void 0===i[s])throw new TypeError(`No method named "${s}"`);i[s]()}else n.interval&&n.ride&&(i.pause(),i.cycle())}static jQueryInterface(t){return this.each((function(){Q.carouselInterface(this,t)}))}static dataApiClickHandler(t){const e=s(this);if(!e||!e.classList.contains("carousel"))return;const i={...U.getDataAttributes(e),...U.getDataAttributes(this)},n=this.getAttribute("data-bs-slide-to");n&&(i.interval=!1),Q.carouselInterface(e,i),n&&w.get(e,"bs.carousel").to(n),t.preventDefault()}}H.on(document,"click.bs.carousel.data-api","[data-bs-slide], [data-bs-slide-to]",Q.dataApiClickHandler),H.on(window,"load.bs.carousel.data-api",()=>{const e=t.find('[data-bs-ride="carousel"]');for(let t=0,i=e.length;t<i;t++)Q.carouselInterface(e[t],w.get(e[t],"bs.carousel"))}),b(Q);const G={toggle:!0,parent:""},Z={toggle:"boolean",parent:"(string|element)"};class J extends R{constructor(e,i){super(e),this._isTransitioning=!1,this._config=this._getConfig(i),this._triggerArray=t.find(`[data-bs-toggle="collapse"][href="#${this._element.id}"],[data-bs-toggle="collapse"][data-bs-target="#${this._element.id}"]`);const s=t.find('[data-bs-toggle="collapse"]');for(let e=0,i=s.length;e<i;e++){const i=s[e],o=n(i),r=t.find(o).filter(t=>t===this._element);null!==o&&r.length&&(this._selector=o,this._triggerArray.push(i))}this._parent=this._config.parent?this._getParent():null,this._config.parent||this._addAriaAndCollapsedClass(this._element,this._triggerArray),this._config.toggle&&this.toggle()}static get Default(){return G}static get NAME(){return"collapse"}toggle(){this._element.classList.contains("show")?this.hide():this.show()}show(){if(this._isTransitioning||this._element.classList.contains("show"))return;let e,i;this._parent&&(e=t.find(".show, .collapsing",this._parent).filter(t=>"string"==typeof this._config.parent?t.getAttribute("data-bs-parent")===this._config.parent:t.classList.contains("collapse")),0===e.length&&(e=null));const n=t.findOne(this._selector);if(e){const t=e.find(t=>n!==t);if(i=t?w.get(t,"bs.collapse"):null,i&&i._isTransitioning)return}if(H.trigger(this._element,"show.bs.collapse").defaultPrevented)return;e&&e.forEach(t=>{n!==t&&J.collapseInterface(t,"hide"),i||w.set(t,"bs.collapse",null)});const s=this._getDimension();this._element.classList.remove("collapse"),this._element.classList.add("collapsing"),this._element.style[s]=0,this._triggerArray.length&&this._triggerArray.forEach(t=>{t.classList.remove("collapsed"),t.setAttribute("aria-expanded",!0)}),this.setTransitioning(!0);const o="scroll"+(s[0].toUpperCase()+s.slice(1));this._queueCallback(()=>{this._element.classList.remove("collapsing"),this._element.classList.add("collapse","show"),this._element.style[s]="",this.setTransitioning(!1),H.trigger(this._element,"shown.bs.collapse")},this._element,!0),this._element.style[s]=this._element[o]+"px"}hide(){if(this._isTransitioning||!this._element.classList.contains("show"))return;if(H.trigger(this._element,"hide.bs.collapse").defaultPrevented)return;const t=this._getDimension();this._element.style[t]=this._element.getBoundingClientRect()[t]+"px",m(this._element),this._element.classList.add("collapsing"),this._element.classList.remove("collapse","show");const e=this._triggerArray.length;if(e>0)for(let t=0;t<e;t++){const e=this._triggerArray[t],i=s(e);i&&!i.classList.contains("show")&&(e.classList.add("collapsed"),e.setAttribute("aria-expanded",!1))}this.setTransitioning(!0),this._element.style[t]="",this._queueCallback(()=>{this.setTransitioning(!1),this._element.classList.remove("collapsing"),this._element.classList.add("collapse"),H.trigger(this._element,"hidden.bs.collapse")},this._element,!0)}setTransitioning(t){this._isTransitioning=t}_getConfig(t){return(t={...G,...t}).toggle=Boolean(t.toggle),d("collapse",t,Z),t}_getDimension(){return this._element.classList.contains("width")?"width":"height"}_getParent(){let{parent:e}=this._config;e=l(e);const i=`[data-bs-toggle="collapse"][data-bs-parent="${e}"]`;return t.find(i,e).forEach(t=>{const e=s(t);this._addAriaAndCollapsedClass(e,[t])}),e}_addAriaAndCollapsedClass(t,e){if(!t||!e.length)return;const i=t.classList.contains("show");e.forEach(t=>{i?t.classList.remove("collapsed"):t.classList.add("collapsed"),t.setAttribute("aria-expanded",i)})}static collapseInterface(t,e){let i=w.get(t,"bs.collapse");const n={...G,...U.getDataAttributes(t),..."object"==typeof e&&e?e:{}};if(!i&&n.toggle&&"string"==typeof e&&/show|hide/.test(e)&&(n.toggle=!1),i||(i=new J(t,n)),"string"==typeof e){if(void 0===i[e])throw new TypeError(`No method named "${e}"`);i[e]()}}static jQueryInterface(t){return this.each((function(){J.collapseInterface(this,t)}))}}H.on(document,"click.bs.collapse.data-api",'[data-bs-toggle="collapse"]',(function(e){("A"===e.target.tagName||e.delegateTarget&&"A"===e.delegateTarget.tagName)&&e.preventDefault();const i=U.getDataAttributes(this),s=n(this);t.find(s).forEach(t=>{const e=w.get(t,"bs.collapse");let n;e?(null===e._parent&&"string"==typeof i.parent&&(e._config.parent=i.parent,e._parent=e._getParent()),n="toggle"):n=i,J.collapseInterface(t,n)})})),b(J);var tt="top",et="bottom",it="right",nt="left",st=[tt,et,it,nt],ot=st.reduce((function(t,e){return t.concat([e+"-start",e+"-end"])}),[]),rt=[].concat(st,["auto"]).reduce((function(t,e){return t.concat([e,e+"-start",e+"-end"])}),[]),at=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function lt(t){return t?(t.nodeName||"").toLowerCase():null}function ct(t){if(null==t)return window;if("[object Window]"!==t.toString()){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function dt(t){return t instanceof ct(t).Element||t instanceof Element}function ht(t){return t instanceof ct(t).HTMLElement||t instanceof HTMLElement}function ut(t){return"undefined"!=typeof ShadowRoot&&(t instanceof ct(t).ShadowRoot||t instanceof ShadowRoot)}var ft={name:"applyStyles",enabled:!0,phase:"write",fn:function(t){var e=t.state;Object.keys(e.elements).forEach((function(t){var i=e.styles[t]||{},n=e.attributes[t]||{},s=e.elements[t];ht(s)&&lt(s)&&(Object.assign(s.style,i),Object.keys(n).forEach((function(t){var e=n[t];!1===e?s.removeAttribute(t):s.setAttribute(t,!0===e?"":e)})))}))},effect:function(t){var e=t.state,i={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,i.popper),e.styles=i,e.elements.arrow&&Object.assign(e.elements.arrow.style,i.arrow),function(){Object.keys(e.elements).forEach((function(t){var n=e.elements[t],s=e.attributes[t]||{},o=Object.keys(e.styles.hasOwnProperty(t)?e.styles[t]:i[t]).reduce((function(t,e){return t[e]="",t}),{});ht(n)&&lt(n)&&(Object.assign(n.style,o),Object.keys(s).forEach((function(t){n.removeAttribute(t)})))}))}},requires:["computeStyles"]};function pt(t){return t.split("-")[0]}function mt(t){var e=t.getBoundingClientRect();return{width:e.width,height:e.height,top:e.top,right:e.right,bottom:e.bottom,left:e.left,x:e.left,y:e.top}}function gt(t){var e=mt(t),i=t.offsetWidth,n=t.offsetHeight;return Math.abs(e.width-i)<=1&&(i=e.width),Math.abs(e.height-n)<=1&&(n=e.height),{x:t.offsetLeft,y:t.offsetTop,width:i,height:n}}function _t(t,e){var i=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(i&&ut(i)){var n=e;do{if(n&&t.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function bt(t){return ct(t).getComputedStyle(t)}function vt(t){return["table","td","th"].indexOf(lt(t))>=0}function yt(t){return((dt(t)?t.ownerDocument:t.document)||window.document).documentElement}function wt(t){return"html"===lt(t)?t:t.assignedSlot||t.parentNode||(ut(t)?t.host:null)||yt(t)}function Et(t){return ht(t)&&"fixed"!==bt(t).position?t.offsetParent:null}function Tt(t){for(var e=ct(t),i=Et(t);i&&vt(i)&&"static"===bt(i).position;)i=Et(i);return i&&("html"===lt(i)||"body"===lt(i)&&"static"===bt(i).position)?e:i||function(t){var e=-1!==navigator.userAgent.toLowerCase().indexOf("firefox");if(-1!==navigator.userAgent.indexOf("Trident")&&ht(t)&&"fixed"===bt(t).position)return null;for(var i=wt(t);ht(i)&&["html","body"].indexOf(lt(i))<0;){var n=bt(i);if("none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||-1!==["transform","perspective"].indexOf(n.willChange)||e&&"filter"===n.willChange||e&&n.filter&&"none"!==n.filter)return i;i=i.parentNode}return null}(t)||e}function At(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}var Lt=Math.max,Ot=Math.min,kt=Math.round;function Ct(t,e,i){return Lt(t,Ot(e,i))}function xt(t){return Object.assign({},{top:0,right:0,bottom:0,left:0},t)}function Dt(t,e){return e.reduce((function(e,i){return e[i]=t,e}),{})}var Nt={name:"arrow",enabled:!0,phase:"main",fn:function(t){var e,i=t.state,n=t.name,s=t.options,o=i.elements.arrow,r=i.modifiersData.popperOffsets,a=pt(i.placement),l=At(a),c=[nt,it].indexOf(a)>=0?"height":"width";if(o&&r){var d=function(t,e){return xt("number"!=typeof(t="function"==typeof t?t(Object.assign({},e.rects,{placement:e.placement})):t)?t:Dt(t,st))}(s.padding,i),h=gt(o),u="y"===l?tt:nt,f="y"===l?et:it,p=i.rects.reference[c]+i.rects.reference[l]-r[l]-i.rects.popper[c],m=r[l]-i.rects.reference[l],g=Tt(o),_=g?"y"===l?g.clientHeight||0:g.clientWidth||0:0,b=p/2-m/2,v=d[u],y=_-h[c]-d[f],w=_/2-h[c]/2+b,E=Ct(v,w,y),T=l;i.modifiersData[n]=((e={})[T]=E,e.centerOffset=E-w,e)}},effect:function(t){var e=t.state,i=t.options.element,n=void 0===i?"[data-popper-arrow]":i;null!=n&&("string"!=typeof n||(n=e.elements.popper.querySelector(n)))&&_t(e.elements.popper,n)&&(e.elements.arrow=n)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},St={top:"auto",right:"auto",bottom:"auto",left:"auto"};function It(t){var e,i=t.popper,n=t.popperRect,s=t.placement,o=t.offsets,r=t.position,a=t.gpuAcceleration,l=t.adaptive,c=t.roundOffsets,d=!0===c?function(t){var e=t.x,i=t.y,n=window.devicePixelRatio||1;return{x:kt(kt(e*n)/n)||0,y:kt(kt(i*n)/n)||0}}(o):"function"==typeof c?c(o):o,h=d.x,u=void 0===h?0:h,f=d.y,p=void 0===f?0:f,m=o.hasOwnProperty("x"),g=o.hasOwnProperty("y"),_=nt,b=tt,v=window;if(l){var y=Tt(i),w="clientHeight",E="clientWidth";y===ct(i)&&"static"!==bt(y=yt(i)).position&&(w="scrollHeight",E="scrollWidth"),y=y,s===tt&&(b=et,p-=y[w]-n.height,p*=a?1:-1),s===nt&&(_=it,u-=y[E]-n.width,u*=a?1:-1)}var T,A=Object.assign({position:r},l&&St);return a?Object.assign({},A,((T={})[b]=g?"0":"",T[_]=m?"0":"",T.transform=(v.devicePixelRatio||1)<2?"translate("+u+"px, "+p+"px)":"translate3d("+u+"px, "+p+"px, 0)",T)):Object.assign({},A,((e={})[b]=g?p+"px":"",e[_]=m?u+"px":"",e.transform="",e))}var jt={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(t){var e=t.state,i=t.options,n=i.gpuAcceleration,s=void 0===n||n,o=i.adaptive,r=void 0===o||o,a=i.roundOffsets,l=void 0===a||a,c={placement:pt(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:s};null!=e.modifiersData.popperOffsets&&(e.styles.popper=Object.assign({},e.styles.popper,It(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:r,roundOffsets:l})))),null!=e.modifiersData.arrow&&(e.styles.arrow=Object.assign({},e.styles.arrow,It(Object.assign({},c,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})},data:{}},Pt={passive:!0},Mt={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(t){var e=t.state,i=t.instance,n=t.options,s=n.scroll,o=void 0===s||s,r=n.resize,a=void 0===r||r,l=ct(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return o&&c.forEach((function(t){t.addEventListener("scroll",i.update,Pt)})),a&&l.addEventListener("resize",i.update,Pt),function(){o&&c.forEach((function(t){t.removeEventListener("scroll",i.update,Pt)})),a&&l.removeEventListener("resize",i.update,Pt)}},data:{}},Ht={left:"right",right:"left",bottom:"top",top:"bottom"};function Rt(t){return t.replace(/left|right|bottom|top/g,(function(t){return Ht[t]}))}var Bt={start:"end",end:"start"};function Wt(t){return t.replace(/start|end/g,(function(t){return Bt[t]}))}function qt(t){var e=ct(t);return{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function zt(t){return mt(yt(t)).left+qt(t).scrollLeft}function Ut(t){var e=bt(t),i=e.overflow,n=e.overflowX,s=e.overflowY;return/auto|scroll|overlay|hidden/.test(i+s+n)}function $t(t,e){var i;void 0===e&&(e=[]);var n=function t(e){return["html","body","#document"].indexOf(lt(e))>=0?e.ownerDocument.body:ht(e)&&Ut(e)?e:t(wt(e))}(t),s=n===(null==(i=t.ownerDocument)?void 0:i.body),o=ct(n),r=s?[o].concat(o.visualViewport||[],Ut(n)?n:[]):n,a=e.concat(r);return s?a:a.concat($t(wt(r)))}function Ft(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function Vt(t,e){return"viewport"===e?Ft(function(t){var e=ct(t),i=yt(t),n=e.visualViewport,s=i.clientWidth,o=i.clientHeight,r=0,a=0;return n&&(s=n.width,o=n.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(r=n.offsetLeft,a=n.offsetTop)),{width:s,height:o,x:r+zt(t),y:a}}(t)):ht(e)?function(t){var e=mt(t);return e.top=e.top+t.clientTop,e.left=e.left+t.clientLeft,e.bottom=e.top+t.clientHeight,e.right=e.left+t.clientWidth,e.width=t.clientWidth,e.height=t.clientHeight,e.x=e.left,e.y=e.top,e}(e):Ft(function(t){var e,i=yt(t),n=qt(t),s=null==(e=t.ownerDocument)?void 0:e.body,o=Lt(i.scrollWidth,i.clientWidth,s?s.scrollWidth:0,s?s.clientWidth:0),r=Lt(i.scrollHeight,i.clientHeight,s?s.scrollHeight:0,s?s.clientHeight:0),a=-n.scrollLeft+zt(t),l=-n.scrollTop;return"rtl"===bt(s||i).direction&&(a+=Lt(i.clientWidth,s?s.clientWidth:0)-o),{width:o,height:r,x:a,y:l}}(yt(t)))}function Kt(t){return t.split("-")[1]}function Xt(t){var e,i=t.reference,n=t.element,s=t.placement,o=s?pt(s):null,r=s?Kt(s):null,a=i.x+i.width/2-n.width/2,l=i.y+i.height/2-n.height/2;switch(o){case tt:e={x:a,y:i.y-n.height};break;case et:e={x:a,y:i.y+i.height};break;case it:e={x:i.x+i.width,y:l};break;case nt:e={x:i.x-n.width,y:l};break;default:e={x:i.x,y:i.y}}var c=o?At(o):null;if(null!=c){var d="y"===c?"height":"width";switch(r){case"start":e[c]=e[c]-(i[d]/2-n[d]/2);break;case"end":e[c]=e[c]+(i[d]/2-n[d]/2)}}return e}function Yt(t,e){void 0===e&&(e={});var i=e,n=i.placement,s=void 0===n?t.placement:n,o=i.boundary,r=void 0===o?"clippingParents":o,a=i.rootBoundary,l=void 0===a?"viewport":a,c=i.elementContext,d=void 0===c?"popper":c,h=i.altBoundary,u=void 0!==h&&h,f=i.padding,p=void 0===f?0:f,m=xt("number"!=typeof p?p:Dt(p,st)),g="popper"===d?"reference":"popper",_=t.elements.reference,b=t.rects.popper,v=t.elements[u?g:d],y=function(t,e,i){var n="clippingParents"===e?function(t){var e=$t(wt(t)),i=["absolute","fixed"].indexOf(bt(t).position)>=0&&ht(t)?Tt(t):t;return dt(i)?e.filter((function(t){return dt(t)&&_t(t,i)&&"body"!==lt(t)})):[]}(t):[].concat(e),s=[].concat(n,[i]),o=s[0],r=s.reduce((function(e,i){var n=Vt(t,i);return e.top=Lt(n.top,e.top),e.right=Ot(n.right,e.right),e.bottom=Ot(n.bottom,e.bottom),e.left=Lt(n.left,e.left),e}),Vt(t,o));return r.width=r.right-r.left,r.height=r.bottom-r.top,r.x=r.left,r.y=r.top,r}(dt(v)?v:v.contextElement||yt(t.elements.popper),r,l),w=mt(_),E=Xt({reference:w,element:b,strategy:"absolute",placement:s}),T=Ft(Object.assign({},b,E)),A="popper"===d?T:w,L={top:y.top-A.top+m.top,bottom:A.bottom-y.bottom+m.bottom,left:y.left-A.left+m.left,right:A.right-y.right+m.right},O=t.modifiersData.offset;if("popper"===d&&O){var k=O[s];Object.keys(L).forEach((function(t){var e=[it,et].indexOf(t)>=0?1:-1,i=[tt,et].indexOf(t)>=0?"y":"x";L[t]+=k[i]*e}))}return L}function Qt(t,e){void 0===e&&(e={});var i=e,n=i.placement,s=i.boundary,o=i.rootBoundary,r=i.padding,a=i.flipVariations,l=i.allowedAutoPlacements,c=void 0===l?rt:l,d=Kt(n),h=d?a?ot:ot.filter((function(t){return Kt(t)===d})):st,u=h.filter((function(t){return c.indexOf(t)>=0}));0===u.length&&(u=h);var f=u.reduce((function(e,i){return e[i]=Yt(t,{placement:i,boundary:s,rootBoundary:o,padding:r})[pt(i)],e}),{});return Object.keys(f).sort((function(t,e){return f[t]-f[e]}))}var Gt={name:"flip",enabled:!0,phase:"main",fn:function(t){var e=t.state,i=t.options,n=t.name;if(!e.modifiersData[n]._skip){for(var s=i.mainAxis,o=void 0===s||s,r=i.altAxis,a=void 0===r||r,l=i.fallbackPlacements,c=i.padding,d=i.boundary,h=i.rootBoundary,u=i.altBoundary,f=i.flipVariations,p=void 0===f||f,m=i.allowedAutoPlacements,g=e.options.placement,_=pt(g),b=l||(_!==g&&p?function(t){if("auto"===pt(t))return[];var e=Rt(t);return[Wt(t),e,Wt(e)]}(g):[Rt(g)]),v=[g].concat(b).reduce((function(t,i){return t.concat("auto"===pt(i)?Qt(e,{placement:i,boundary:d,rootBoundary:h,padding:c,flipVariations:p,allowedAutoPlacements:m}):i)}),[]),y=e.rects.reference,w=e.rects.popper,E=new Map,T=!0,A=v[0],L=0;L<v.length;L++){var O=v[L],k=pt(O),C="start"===Kt(O),x=[tt,et].indexOf(k)>=0,D=x?"width":"height",N=Yt(e,{placement:O,boundary:d,rootBoundary:h,altBoundary:u,padding:c}),S=x?C?it:nt:C?et:tt;y[D]>w[D]&&(S=Rt(S));var I=Rt(S),j=[];if(o&&j.push(N[k]<=0),a&&j.push(N[S]<=0,N[I]<=0),j.every((function(t){return t}))){A=O,T=!1;break}E.set(O,j)}if(T)for(var P=function(t){var e=v.find((function(e){var i=E.get(e);if(i)return i.slice(0,t).every((function(t){return t}))}));if(e)return A=e,"break"},M=p?3:1;M>0&&"break"!==P(M);M--);e.placement!==A&&(e.modifiersData[n]._skip=!0,e.placement=A,e.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function Zt(t,e,i){return void 0===i&&(i={x:0,y:0}),{top:t.top-e.height-i.y,right:t.right-e.width+i.x,bottom:t.bottom-e.height+i.y,left:t.left-e.width-i.x}}function Jt(t){return[tt,it,et,nt].some((function(e){return t[e]>=0}))}var te={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(t){var e=t.state,i=t.name,n=e.rects.reference,s=e.rects.popper,o=e.modifiersData.preventOverflow,r=Yt(e,{elementContext:"reference"}),a=Yt(e,{altBoundary:!0}),l=Zt(r,n),c=Zt(a,s,o),d=Jt(l),h=Jt(c);e.modifiersData[i]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:d,hasPopperEscaped:h},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":d,"data-popper-escaped":h})}},ee={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(t){var e=t.state,i=t.options,n=t.name,s=i.offset,o=void 0===s?[0,0]:s,r=rt.reduce((function(t,i){return t[i]=function(t,e,i){var n=pt(t),s=[nt,tt].indexOf(n)>=0?-1:1,o="function"==typeof i?i(Object.assign({},e,{placement:t})):i,r=o[0],a=o[1];return r=r||0,a=(a||0)*s,[nt,it].indexOf(n)>=0?{x:a,y:r}:{x:r,y:a}}(i,e.rects,o),t}),{}),a=r[e.placement],l=a.x,c=a.y;null!=e.modifiersData.popperOffsets&&(e.modifiersData.popperOffsets.x+=l,e.modifiersData.popperOffsets.y+=c),e.modifiersData[n]=r}},ie={name:"popperOffsets",enabled:!0,phase:"read",fn:function(t){var e=t.state,i=t.name;e.modifiersData[i]=Xt({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})},data:{}},ne={name:"preventOverflow",enabled:!0,phase:"main",fn:function(t){var e=t.state,i=t.options,n=t.name,s=i.mainAxis,o=void 0===s||s,r=i.altAxis,a=void 0!==r&&r,l=i.boundary,c=i.rootBoundary,d=i.altBoundary,h=i.padding,u=i.tether,f=void 0===u||u,p=i.tetherOffset,m=void 0===p?0:p,g=Yt(e,{boundary:l,rootBoundary:c,padding:h,altBoundary:d}),_=pt(e.placement),b=Kt(e.placement),v=!b,y=At(_),w="x"===y?"y":"x",E=e.modifiersData.popperOffsets,T=e.rects.reference,A=e.rects.popper,L="function"==typeof m?m(Object.assign({},e.rects,{placement:e.placement})):m,O={x:0,y:0};if(E){if(o||a){var k="y"===y?tt:nt,C="y"===y?et:it,x="y"===y?"height":"width",D=E[y],N=E[y]+g[k],S=E[y]-g[C],I=f?-A[x]/2:0,j="start"===b?T[x]:A[x],P="start"===b?-A[x]:-T[x],M=e.elements.arrow,H=f&&M?gt(M):{width:0,height:0},R=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},B=R[k],W=R[C],q=Ct(0,T[x],H[x]),z=v?T[x]/2-I-q-B-L:j-q-B-L,U=v?-T[x]/2+I+q+W+L:P+q+W+L,$=e.elements.arrow&&Tt(e.elements.arrow),F=$?"y"===y?$.clientTop||0:$.clientLeft||0:0,V=e.modifiersData.offset?e.modifiersData.offset[e.placement][y]:0,K=E[y]+z-V-F,X=E[y]+U-V;if(o){var Y=Ct(f?Ot(N,K):N,D,f?Lt(S,X):S);E[y]=Y,O[y]=Y-D}if(a){var Q="x"===y?tt:nt,G="x"===y?et:it,Z=E[w],J=Z+g[Q],st=Z-g[G],ot=Ct(f?Ot(J,K):J,Z,f?Lt(st,X):st);E[w]=ot,O[w]=ot-Z}}e.modifiersData[n]=O}},requiresIfExists:["offset"]};function se(t,e,i){void 0===i&&(i=!1);var n,s,o=yt(e),r=mt(t),a=ht(e),l={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(a||!a&&!i)&&(("body"!==lt(e)||Ut(o))&&(l=(n=e)!==ct(n)&&ht(n)?{scrollLeft:(s=n).scrollLeft,scrollTop:s.scrollTop}:qt(n)),ht(e)?((c=mt(e)).x+=e.clientLeft,c.y+=e.clientTop):o&&(c.x=zt(o))),{x:r.left+l.scrollLeft-c.x,y:r.top+l.scrollTop-c.y,width:r.width,height:r.height}}var oe={placement:"bottom",modifiers:[],strategy:"absolute"};function re(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return!e.some((function(t){return!(t&&"function"==typeof t.getBoundingClientRect)}))}function ae(t){void 0===t&&(t={});var e=t,i=e.defaultModifiers,n=void 0===i?[]:i,s=e.defaultOptions,o=void 0===s?oe:s;return function(t,e,i){void 0===i&&(i=o);var s,r,a={placement:"bottom",orderedModifiers:[],options:Object.assign({},oe,o),modifiersData:{},elements:{reference:t,popper:e},attributes:{},styles:{}},l=[],c=!1,d={state:a,setOptions:function(i){h(),a.options=Object.assign({},o,a.options,i),a.scrollParents={reference:dt(t)?$t(t):t.contextElement?$t(t.contextElement):[],popper:$t(e)};var s,r,c=function(t){var e=function(t){var e=new Map,i=new Set,n=[];return t.forEach((function(t){e.set(t.name,t)})),t.forEach((function(t){i.has(t.name)||function t(s){i.add(s.name),[].concat(s.requires||[],s.requiresIfExists||[]).forEach((function(n){if(!i.has(n)){var s=e.get(n);s&&t(s)}})),n.push(s)}(t)})),n}(t);return at.reduce((function(t,i){return t.concat(e.filter((function(t){return t.phase===i})))}),[])}((s=[].concat(n,a.options.modifiers),r=s.reduce((function(t,e){var i=t[e.name];return t[e.name]=i?Object.assign({},i,e,{options:Object.assign({},i.options,e.options),data:Object.assign({},i.data,e.data)}):e,t}),{}),Object.keys(r).map((function(t){return r[t]}))));return a.orderedModifiers=c.filter((function(t){return t.enabled})),a.orderedModifiers.forEach((function(t){var e=t.name,i=t.options,n=void 0===i?{}:i,s=t.effect;if("function"==typeof s){var o=s({state:a,name:e,instance:d,options:n});l.push(o||function(){})}})),d.update()},forceUpdate:function(){if(!c){var t=a.elements,e=t.reference,i=t.popper;if(re(e,i)){a.rects={reference:se(e,Tt(i),"fixed"===a.options.strategy),popper:gt(i)},a.reset=!1,a.placement=a.options.placement,a.orderedModifiers.forEach((function(t){return a.modifiersData[t.name]=Object.assign({},t.data)}));for(var n=0;n<a.orderedModifiers.length;n++)if(!0!==a.reset){var s=a.orderedModifiers[n],o=s.fn,r=s.options,l=void 0===r?{}:r,h=s.name;"function"==typeof o&&(a=o({state:a,options:l,name:h,instance:d})||a)}else a.reset=!1,n=-1}}},update:(s=function(){return new Promise((function(t){d.forceUpdate(),t(a)}))},function(){return r||(r=new Promise((function(t){Promise.resolve().then((function(){r=void 0,t(s())}))}))),r}),destroy:function(){h(),c=!0}};if(!re(t,e))return d;function h(){l.forEach((function(t){return t()})),l=[]}return d.setOptions(i).then((function(t){!c&&i.onFirstUpdate&&i.onFirstUpdate(t)})),d}}var le=ae(),ce=ae({defaultModifiers:[Mt,ie,jt,ft]}),de=ae({defaultModifiers:[Mt,ie,jt,ft,ee,Gt,ne,Nt,te]}),he=Object.freeze({__proto__:null,popperGenerator:ae,detectOverflow:Yt,createPopperBase:le,createPopper:de,createPopperLite:ce,top:tt,bottom:et,right:it,left:nt,auto:"auto",basePlacements:st,start:"start",end:"end",clippingParents:"clippingParents",viewport:"viewport",popper:"popper",reference:"reference",variationPlacements:ot,placements:rt,beforeRead:"beforeRead",read:"read",afterRead:"afterRead",beforeMain:"beforeMain",main:"main",afterMain:"afterMain",beforeWrite:"beforeWrite",write:"write",afterWrite:"afterWrite",modifierPhases:at,applyStyles:ft,arrow:Nt,computeStyles:jt,eventListeners:Mt,flip:Gt,hide:te,offset:ee,popperOffsets:ie,preventOverflow:ne});const ue=new RegExp("ArrowUp|ArrowDown|Escape"),fe=_()?"top-end":"top-start",pe=_()?"top-start":"top-end",me=_()?"bottom-end":"bottom-start",ge=_()?"bottom-start":"bottom-end",_e=_()?"left-start":"right-start",be=_()?"right-start":"left-start",ve={offset:[0,2],boundary:"clippingParents",reference:"toggle",display:"dynamic",popperConfig:null,autoClose:!0},ye={offset:"(array|string|function)",boundary:"(string|element)",reference:"(string|element|object)",display:"string",popperConfig:"(null|object|function)",autoClose:"(boolean|string)"};class we extends R{constructor(t,e){super(t),this._popper=null,this._config=this._getConfig(e),this._menu=this._getMenuElement(),this._inNavbar=this._detectNavbar(),this._addEventListeners()}static get Default(){return ve}static get DefaultType(){return ye}static get NAME(){return"dropdown"}toggle(){u(this._element)||(this._element.classList.contains("show")?this.hide():this.show())}show(){if(u(this._element)||this._menu.classList.contains("show"))return;const t=we.getParentFromElement(this._element),e={relatedTarget:this._element};if(!H.trigger(this._element,"show.bs.dropdown",e).defaultPrevented){if(this._inNavbar)U.setDataAttribute(this._menu,"popper","none");else{if(void 0===he)throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org)");let e=this._element;"parent"===this._config.reference?e=t:a(this._config.reference)?e=l(this._config.reference):"object"==typeof this._config.reference&&(e=this._config.reference);const i=this._getPopperConfig(),n=i.modifiers.find(t=>"applyStyles"===t.name&&!1===t.enabled);this._popper=de(e,this._menu,i),n&&U.setDataAttribute(this._menu,"popper","static")}"ontouchstart"in document.documentElement&&!t.closest(".navbar-nav")&&[].concat(...document.body.children).forEach(t=>H.on(t,"mouseover",p)),this._element.focus(),this._element.setAttribute("aria-expanded",!0),this._menu.classList.toggle("show"),this._element.classList.toggle("show"),H.trigger(this._element,"shown.bs.dropdown",e)}}hide(){if(u(this._element)||!this._menu.classList.contains("show"))return;const t={relatedTarget:this._element};this._completeHide(t)}dispose(){this._popper&&this._popper.destroy(),super.dispose()}update(){this._inNavbar=this._detectNavbar(),this._popper&&this._popper.update()}_addEventListeners(){H.on(this._element,"click.bs.dropdown",t=>{t.preventDefault(),this.toggle()})}_completeHide(t){H.trigger(this._element,"hide.bs.dropdown",t).defaultPrevented||("ontouchstart"in document.documentElement&&[].concat(...document.body.children).forEach(t=>H.off(t,"mouseover",p)),this._popper&&this._popper.destroy(),this._menu.classList.remove("show"),this._element.classList.remove("show"),this._element.setAttribute("aria-expanded","false"),U.removeDataAttribute(this._menu,"popper"),H.trigger(this._element,"hidden.bs.dropdown",t))}_getConfig(t){if(t={...this.constructor.Default,...U.getDataAttributes(this._element),...t},d("dropdown",t,this.constructor.DefaultType),"object"==typeof t.reference&&!a(t.reference)&&"function"!=typeof t.reference.getBoundingClientRect)throw new TypeError("dropdown".toUpperCase()+': Option "reference" provided type "object" without a required "getBoundingClientRect" method.');return t}_getMenuElement(){return t.next(this._element,".dropdown-menu")[0]}_getPlacement(){const t=this._element.parentNode;if(t.classList.contains("dropend"))return _e;if(t.classList.contains("dropstart"))return be;const e="end"===getComputedStyle(this._menu).getPropertyValue("--bs-position").trim();return t.classList.contains("dropup")?e?pe:fe:e?ge:me}_detectNavbar(){return null!==this._element.closest(".navbar")}_getOffset(){const{offset:t}=this._config;return"string"==typeof t?t.split(",").map(t=>Number.parseInt(t,10)):"function"==typeof t?e=>t(e,this._element):t}_getPopperConfig(){const t={placement:this._getPlacement(),modifiers:[{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"offset",options:{offset:this._getOffset()}}]};return"static"===this._config.display&&(t.modifiers=[{name:"applyStyles",enabled:!1}]),{...t,..."function"==typeof this._config.popperConfig?this._config.popperConfig(t):this._config.popperConfig}}_selectMenuItem(e){const i=t.find(".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",this._menu).filter(h);if(!i.length)return;let n=i.indexOf(e.target);"ArrowUp"===e.key&&n>0&&n--,"ArrowDown"===e.key&&n<i.length-1&&n++,n=-1===n?0:n,i[n].focus()}static dropdownInterface(t,e){let i=w.get(t,"bs.dropdown");if(i||(i=new we(t,"object"==typeof e?e:null)),"string"==typeof e){if(void 0===i[e])throw new TypeError(`No method named "${e}"`);i[e]()}}static jQueryInterface(t){return this.each((function(){we.dropdownInterface(this,t)}))}static clearMenus(e){if(e&&(2===e.button||"keyup"===e.type&&"Tab"!==e.key))return;const i=t.find('[data-bs-toggle="dropdown"]');for(let t=0,n=i.length;t<n;t++){const n=w.get(i[t],"bs.dropdown");if(!n||!1===n._config.autoClose)continue;if(!n._element.classList.contains("show"))continue;const s={relatedTarget:n._element};if(e){const t=e.composedPath(),i=t.includes(n._menu);if(t.includes(n._element)||"inside"===n._config.autoClose&&!i||"outside"===n._config.autoClose&&i)continue;if(n._menu.contains(e.target)&&("keyup"===e.type&&"Tab"===e.key||/input|select|option|textarea|form/i.test(e.target.tagName)))continue;"click"===e.type&&(s.clickEvent=e)}n._completeHide(s)}}static getParentFromElement(t){return s(t)||t.parentNode}static dataApiKeydownHandler(e){if(/input|textarea/i.test(e.target.tagName)?"Space"===e.key||"Escape"!==e.key&&("ArrowDown"!==e.key&&"ArrowUp"!==e.key||e.target.closest(".dropdown-menu")):!ue.test(e.key))return;const i=this.classList.contains("show");if(!i&&"Escape"===e.key)return;if(e.preventDefault(),e.stopPropagation(),u(this))return;const n=()=>this.matches('[data-bs-toggle="dropdown"]')?this:t.prev(this,'[data-bs-toggle="dropdown"]')[0];if("Escape"===e.key)return n().focus(),void we.clearMenus();i||"ArrowUp"!==e.key&&"ArrowDown"!==e.key?i&&"Space"!==e.key?we.getInstance(n())._selectMenuItem(e):we.clearMenus():n().click()}}H.on(document,"keydown.bs.dropdown.data-api",'[data-bs-toggle="dropdown"]',we.dataApiKeydownHandler),H.on(document,"keydown.bs.dropdown.data-api",".dropdown-menu",we.dataApiKeydownHandler),H.on(document,"click.bs.dropdown.data-api",we.clearMenus),H.on(document,"keyup.bs.dropdown.data-api",we.clearMenus),H.on(document,"click.bs.dropdown.data-api",'[data-bs-toggle="dropdown"]',(function(t){t.preventDefault(),we.dropdownInterface(this)})),b(we);const Ee=()=>{const t=document.documentElement.clientWidth;return Math.abs(window.innerWidth-t)},Te=(t=Ee())=>{Ae(),Le("body","paddingRight",e=>e+t),Le(".fixed-top, .fixed-bottom, .is-fixed, .sticky-top","paddingRight",e=>e+t),Le(".sticky-top","marginRight",e=>e-t)},Ae=()=>{const t=document.body.style.overflow;t&&U.setDataAttribute(document.body,"overflow",t),document.body.style.overflow="hidden"},Le=(e,i,n)=>{const s=Ee();t.find(e).forEach(t=>{if(t!==document.body&&window.innerWidth>t.clientWidth+s)return;const e=t.style[i],o=window.getComputedStyle(t)[i];U.setDataAttribute(t,i,e),t.style[i]=n(Number.parseFloat(o))+"px"})},Oe=()=>{ke("body","overflow"),ke("body","paddingRight"),ke(".fixed-top, .fixed-bottom, .is-fixed, .sticky-top","paddingRight"),ke(".sticky-top","marginRight")},ke=(e,i)=>{t.find(e).forEach(t=>{const e=U.getDataAttribute(t,i);void 0===e?t.style.removeProperty(i):(U.removeDataAttribute(t,i),t.style[i]=e)})},Ce={isVisible:!0,isAnimated:!1,rootElement:document.body,clickCallback:null},xe={isVisible:"boolean",isAnimated:"boolean",rootElement:"element",clickCallback:"(function|null)"};class De{constructor(t){this._config=this._getConfig(t),this._isAppended=!1,this._element=null}show(t){this._config.isVisible?(this._append(),this._config.isAnimated&&m(this._getElement()),this._getElement().classList.add("show"),this._emulateAnimation(()=>{v(t)})):v(t)}hide(t){this._config.isVisible?(this._getElement().classList.remove("show"),this._emulateAnimation(()=>{this.dispose(),v(t)})):v(t)}_getElement(){if(!this._element){const t=document.createElement("div");t.className="modal-backdrop",this._config.isAnimated&&t.classList.add("fade"),this._element=t}return this._element}_getConfig(t){return(t={...Ce,..."object"==typeof t?t:{}}).rootElement=t.rootElement||document.body,d("backdrop",t,xe),t}_append(){this._isAppended||(this._config.rootElement.appendChild(this._getElement()),H.on(this._getElement(),"mousedown.bs.backdrop",()=>{v(this._config.clickCallback)}),this._isAppended=!0)}dispose(){this._isAppended&&(H.off(this._element,"mousedown.bs.backdrop"),this._getElement().parentNode.removeChild(this._element),this._isAppended=!1)}_emulateAnimation(t){if(!this._config.isAnimated)return void v(t);const e=o(this._getElement());H.one(this._getElement(),"transitionend",()=>v(t)),c(this._getElement(),e)}}const Ne={backdrop:!0,keyboard:!0,focus:!0},Se={backdrop:"(boolean|string)",keyboard:"boolean",focus:"boolean"};class Ie extends R{constructor(e,i){super(e),this._config=this._getConfig(i),this._dialog=t.findOne(".modal-dialog",this._element),this._backdrop=this._initializeBackDrop(),this._isShown=!1,this._ignoreBackdropClick=!1,this._isTransitioning=!1}static get Default(){return Ne}static get NAME(){return"modal"}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){if(this._isShown||this._isTransitioning)return;this._isAnimated()&&(this._isTransitioning=!0);const e=H.trigger(this._element,"show.bs.modal",{relatedTarget:t});this._isShown||e.defaultPrevented||(this._isShown=!0,Te(),document.body.classList.add("modal-open"),this._adjustDialog(),this._setEscapeEvent(),this._setResizeEvent(),H.on(this._element,"click.dismiss.bs.modal",'[data-bs-dismiss="modal"]',t=>this.hide(t)),H.on(this._dialog,"mousedown.dismiss.bs.modal",()=>{H.one(this._element,"mouseup.dismiss.bs.modal",t=>{t.target===this._element&&(this._ignoreBackdropClick=!0)})}),this._showBackdrop(()=>this._showElement(t)))}hide(t){if(t&&t.preventDefault(),!this._isShown||this._isTransitioning)return;if(H.trigger(this._element,"hide.bs.modal").defaultPrevented)return;this._isShown=!1;const e=this._isAnimated();e&&(this._isTransitioning=!0),this._setEscapeEvent(),this._setResizeEvent(),H.off(document,"focusin.bs.modal"),this._element.classList.remove("show"),H.off(this._element,"click.dismiss.bs.modal"),H.off(this._dialog,"mousedown.dismiss.bs.modal"),this._queueCallback(()=>this._hideModal(),this._element,e)}dispose(){[window,this._dialog].forEach(t=>H.off(t,".bs.modal")),this._backdrop.dispose(),super.dispose(),H.off(document,"focusin.bs.modal")}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new De({isVisible:Boolean(this._config.backdrop),isAnimated:this._isAnimated()})}_getConfig(t){return t={...Ne,...U.getDataAttributes(this._element),...t},d("modal",t,Se),t}_showElement(e){const i=this._isAnimated(),n=t.findOne(".modal-body",this._dialog);this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE||document.body.appendChild(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.scrollTop=0,n&&(n.scrollTop=0),i&&m(this._element),this._element.classList.add("show"),this._config.focus&&this._enforceFocus(),this._queueCallback(()=>{this._config.focus&&this._element.focus(),this._isTransitioning=!1,H.trigger(this._element,"shown.bs.modal",{relatedTarget:e})},this._dialog,i)}_enforceFocus(){H.off(document,"focusin.bs.modal"),H.on(document,"focusin.bs.modal",t=>{document===t.target||this._element===t.target||this._element.contains(t.target)||this._element.focus()})}_setEscapeEvent(){this._isShown?H.on(this._element,"keydown.dismiss.bs.modal",t=>{this._config.keyboard&&"Escape"===t.key?(t.preventDefault(),this.hide()):this._config.keyboard||"Escape"!==t.key||this._triggerBackdropTransition()}):H.off(this._element,"keydown.dismiss.bs.modal")}_setResizeEvent(){this._isShown?H.on(window,"resize.bs.modal",()=>this._adjustDialog()):H.off(window,"resize.bs.modal")}_hideModal(){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._backdrop.hide(()=>{document.body.classList.remove("modal-open"),this._resetAdjustments(),Oe(),H.trigger(this._element,"hidden.bs.modal")})}_showBackdrop(t){H.on(this._element,"click.dismiss.bs.modal",t=>{this._ignoreBackdropClick?this._ignoreBackdropClick=!1:t.target===t.currentTarget&&(!0===this._config.backdrop?this.hide():"static"===this._config.backdrop&&this._triggerBackdropTransition())}),this._backdrop.show(t)}_isAnimated(){return this._element.classList.contains("fade")}_triggerBackdropTransition(){if(H.trigger(this._element,"hidePrevented.bs.modal").defaultPrevented)return;const t=this._element.scrollHeight>document.documentElement.clientHeight;t||(this._element.style.overflowY="hidden"),this._element.classList.add("modal-static");const e=o(this._dialog);H.off(this._element,"transitionend"),H.one(this._element,"transitionend",()=>{this._element.classList.remove("modal-static"),t||(H.one(this._element,"transitionend",()=>{this._element.style.overflowY=""}),c(this._element,e))}),c(this._element,e),this._element.focus()}_adjustDialog(){const t=this._element.scrollHeight>document.documentElement.clientHeight,e=Ee(),i=e>0;(!i&&t&&!_()||i&&!t&&_())&&(this._element.style.paddingLeft=e+"px"),(i&&!t&&!_()||!i&&t&&_())&&(this._element.style.paddingRight=e+"px")}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(t,e){return this.each((function(){const i=Ie.getInstance(this)||new Ie(this,"object"==typeof t?t:{});if("string"==typeof t){if(void 0===i[t])throw new TypeError(`No method named "${t}"`);i[t](e)}}))}}H.on(document,"click.bs.modal.data-api",'[data-bs-toggle="modal"]',(function(t){const e=s(this);["A","AREA"].includes(this.tagName)&&t.preventDefault(),H.one(e,"show.bs.modal",t=>{t.defaultPrevented||H.one(e,"hidden.bs.modal",()=>{h(this)&&this.focus()})}),(Ie.getInstance(e)||new Ie(e)).toggle(this)})),b(Ie);const je={backdrop:!0,keyboard:!0,scroll:!1},Pe={backdrop:"boolean",keyboard:"boolean",scroll:"boolean"};class Me extends R{constructor(t,e){super(t),this._config=this._getConfig(e),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._addEventListeners()}static get NAME(){return"offcanvas"}static get Default(){return je}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){this._isShown||H.trigger(this._element,"show.bs.offcanvas",{relatedTarget:t}).defaultPrevented||(this._isShown=!0,this._element.style.visibility="visible",this._backdrop.show(),this._config.scroll||(Te(),this._enforceFocusOnElement(this._element)),this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add("show"),this._queueCallback(()=>{H.trigger(this._element,"shown.bs.offcanvas",{relatedTarget:t})},this._element,!0))}hide(){this._isShown&&(H.trigger(this._element,"hide.bs.offcanvas").defaultPrevented||(H.off(document,"focusin.bs.offcanvas"),this._element.blur(),this._isShown=!1,this._element.classList.remove("show"),this._backdrop.hide(),this._queueCallback(()=>{this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._element.style.visibility="hidden",this._config.scroll||Oe(),H.trigger(this._element,"hidden.bs.offcanvas")},this._element,!0)))}dispose(){this._backdrop.dispose(),super.dispose(),H.off(document,"focusin.bs.offcanvas")}_getConfig(t){return t={...je,...U.getDataAttributes(this._element),..."object"==typeof t?t:{}},d("offcanvas",t,Pe),t}_initializeBackDrop(){return new De({isVisible:this._config.backdrop,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:()=>this.hide()})}_enforceFocusOnElement(t){H.off(document,"focusin.bs.offcanvas"),H.on(document,"focusin.bs.offcanvas",e=>{document===e.target||t===e.target||t.contains(e.target)||t.focus()}),t.focus()}_addEventListeners(){H.on(this._element,"click.dismiss.bs.offcanvas",'[data-bs-dismiss="offcanvas"]',()=>this.hide()),H.on(this._element,"keydown.dismiss.bs.offcanvas",t=>{this._config.keyboard&&"Escape"===t.key&&this.hide()})}static jQueryInterface(t){return this.each((function(){const e=w.get(this,"bs.offcanvas")||new Me(this,"object"==typeof t?t:{});if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t](this)}}))}}H.on(document,"click.bs.offcanvas.data-api",'[data-bs-toggle="offcanvas"]',(function(e){const i=s(this);if(["A","AREA"].includes(this.tagName)&&e.preventDefault(),u(this))return;H.one(i,"hidden.bs.offcanvas",()=>{h(this)&&this.focus()});const n=t.findOne(".offcanvas.show");n&&n!==i&&Me.getInstance(n).hide(),(w.get(i,"bs.offcanvas")||new Me(i)).toggle(this)})),H.on(window,"load.bs.offcanvas.data-api",()=>{t.find(".offcanvas.show").forEach(t=>(w.get(t,"bs.offcanvas")||new Me(t)).show())}),b(Me);const He=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),Re=/^(?:(?:https?|mailto|ftp|tel|file):|[^#&/:?]*(?:[#/?]|$))/i,Be=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[\d+/a-z]+=*$/i,We=(t,e)=>{const i=t.nodeName.toLowerCase();if(e.includes(i))return!He.has(i)||Boolean(Re.test(t.nodeValue)||Be.test(t.nodeValue));const n=e.filter(t=>t instanceof RegExp);for(let t=0,e=n.length;t<e;t++)if(n[t].test(i))return!0;return!1};function qe(t,e,i){if(!t.length)return t;if(i&&"function"==typeof i)return i(t);const n=(new window.DOMParser).parseFromString(t,"text/html"),s=Object.keys(e),o=[].concat(...n.body.querySelectorAll("*"));for(let t=0,i=o.length;t<i;t++){const i=o[t],n=i.nodeName.toLowerCase();if(!s.includes(n)){i.parentNode.removeChild(i);continue}const r=[].concat(...i.attributes),a=[].concat(e["*"]||[],e[n]||[]);r.forEach(t=>{We(t,a)||i.removeAttribute(t.nodeName)})}return n.body.innerHTML}const ze=new RegExp("(^|\\s)bs-tooltip\\S+","g"),Ue=new Set(["sanitize","allowList","sanitizeFn"]),$e={animation:"boolean",template:"string",title:"(string|element|function)",trigger:"string",delay:"(number|object)",html:"boolean",selector:"(string|boolean)",placement:"(string|function)",offset:"(array|string|function)",container:"(string|element|boolean)",fallbackPlacements:"array",boundary:"(string|element)",customClass:"(string|function)",sanitize:"boolean",sanitizeFn:"(null|function)",allowList:"object",popperConfig:"(null|object|function)"},Fe={AUTO:"auto",TOP:"top",RIGHT:_()?"left":"right",BOTTOM:"bottom",LEFT:_()?"right":"left"},Ve={animation:!0,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:[0,0],container:!1,fallbackPlacements:["top","right","bottom","left"],boundary:"clippingParents",customClass:"",sanitize:!0,sanitizeFn:null,allowList:{"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},popperConfig:null},Ke={HIDE:"hide.bs.tooltip",HIDDEN:"hidden.bs.tooltip",SHOW:"show.bs.tooltip",SHOWN:"shown.bs.tooltip",INSERTED:"inserted.bs.tooltip",CLICK:"click.bs.tooltip",FOCUSIN:"focusin.bs.tooltip",FOCUSOUT:"focusout.bs.tooltip",MOUSEENTER:"mouseenter.bs.tooltip",MOUSELEAVE:"mouseleave.bs.tooltip"};class Xe extends R{constructor(t,e){if(void 0===he)throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");super(t),this._isEnabled=!0,this._timeout=0,this._hoverState="",this._activeTrigger={},this._popper=null,this._config=this._getConfig(e),this.tip=null,this._setListeners()}static get Default(){return Ve}static get NAME(){return"tooltip"}static get Event(){return Ke}static get DefaultType(){return $e}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(t){if(this._isEnabled)if(t){const e=this._initializeOnDelegatedTarget(t);e._activeTrigger.click=!e._activeTrigger.click,e._isWithActiveTrigger()?e._enter(null,e):e._leave(null,e)}else{if(this.getTipElement().classList.contains("show"))return void this._leave(null,this);this._enter(null,this)}}dispose(){clearTimeout(this._timeout),H.off(this._element.closest(".modal"),"hide.bs.modal",this._hideModalHandler),this.tip&&this.tip.parentNode&&this.tip.parentNode.removeChild(this.tip),this._popper&&this._popper.destroy(),super.dispose()}show(){if("none"===this._element.style.display)throw new Error("Please use show on visible elements");if(!this.isWithContent()||!this._isEnabled)return;const t=H.trigger(this._element,this.constructor.Event.SHOW),i=f(this._element),n=null===i?this._element.ownerDocument.documentElement.contains(this._element):i.contains(this._element);if(t.defaultPrevented||!n)return;const s=this.getTipElement(),o=e(this.constructor.NAME);s.setAttribute("id",o),this._element.setAttribute("aria-describedby",o),this.setContent(),this._config.animation&&s.classList.add("fade");const r="function"==typeof this._config.placement?this._config.placement.call(this,s,this._element):this._config.placement,a=this._getAttachment(r);this._addAttachmentClass(a);const{container:l}=this._config;w.set(s,this.constructor.DATA_KEY,this),this._element.ownerDocument.documentElement.contains(this.tip)||(l.appendChild(s),H.trigger(this._element,this.constructor.Event.INSERTED)),this._popper?this._popper.update():this._popper=de(this._element,s,this._getPopperConfig(a)),s.classList.add("show");const c="function"==typeof this._config.customClass?this._config.customClass():this._config.customClass;c&&s.classList.add(...c.split(" ")),"ontouchstart"in document.documentElement&&[].concat(...document.body.children).forEach(t=>{H.on(t,"mouseover",p)});const d=this.tip.classList.contains("fade");this._queueCallback(()=>{const t=this._hoverState;this._hoverState=null,H.trigger(this._element,this.constructor.Event.SHOWN),"out"===t&&this._leave(null,this)},this.tip,d)}hide(){if(!this._popper)return;const t=this.getTipElement();if(H.trigger(this._element,this.constructor.Event.HIDE).defaultPrevented)return;t.classList.remove("show"),"ontouchstart"in document.documentElement&&[].concat(...document.body.children).forEach(t=>H.off(t,"mouseover",p)),this._activeTrigger.click=!1,this._activeTrigger.focus=!1,this._activeTrigger.hover=!1;const e=this.tip.classList.contains("fade");this._queueCallback(()=>{this._isWithActiveTrigger()||("show"!==this._hoverState&&t.parentNode&&t.parentNode.removeChild(t),this._cleanTipClass(),this._element.removeAttribute("aria-describedby"),H.trigger(this._element,this.constructor.Event.HIDDEN),this._popper&&(this._popper.destroy(),this._popper=null))},this.tip,e),this._hoverState=""}update(){null!==this._popper&&this._popper.update()}isWithContent(){return Boolean(this.getTitle())}getTipElement(){if(this.tip)return this.tip;const t=document.createElement("div");return t.innerHTML=this._config.template,this.tip=t.children[0],this.tip}setContent(){const e=this.getTipElement();this.setElementContent(t.findOne(".tooltip-inner",e),this.getTitle()),e.classList.remove("fade","show")}setElementContent(t,e){if(null!==t)return a(e)?(e=l(e),void(this._config.html?e.parentNode!==t&&(t.innerHTML="",t.appendChild(e)):t.textContent=e.textContent)):void(this._config.html?(this._config.sanitize&&(e=qe(e,this._config.allowList,this._config.sanitizeFn)),t.innerHTML=e):t.textContent=e)}getTitle(){let t=this._element.getAttribute("data-bs-original-title");return t||(t="function"==typeof this._config.title?this._config.title.call(this._element):this._config.title),t}updateAttachment(t){return"right"===t?"end":"left"===t?"start":t}_initializeOnDelegatedTarget(t,e){const i=this.constructor.DATA_KEY;return(e=e||w.get(t.delegateTarget,i))||(e=new this.constructor(t.delegateTarget,this._getDelegateConfig()),w.set(t.delegateTarget,i,e)),e}_getOffset(){const{offset:t}=this._config;return"string"==typeof t?t.split(",").map(t=>Number.parseInt(t,10)):"function"==typeof t?e=>t(e,this._element):t}_getPopperConfig(t){const e={placement:t,modifiers:[{name:"flip",options:{fallbackPlacements:this._config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}},{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"arrow",options:{element:`.${this.constructor.NAME}-arrow`}},{name:"onChange",enabled:!0,phase:"afterWrite",fn:t=>this._handlePopperPlacementChange(t)}],onFirstUpdate:t=>{t.options.placement!==t.placement&&this._handlePopperPlacementChange(t)}};return{...e,..."function"==typeof this._config.popperConfig?this._config.popperConfig(e):this._config.popperConfig}}_addAttachmentClass(t){this.getTipElement().classList.add("bs-tooltip-"+this.updateAttachment(t))}_getAttachment(t){return Fe[t.toUpperCase()]}_setListeners(){this._config.trigger.split(" ").forEach(t=>{if("click"===t)H.on(this._element,this.constructor.Event.CLICK,this._config.selector,t=>this.toggle(t));else if("manual"!==t){const e="hover"===t?this.constructor.Event.MOUSEENTER:this.constructor.Event.FOCUSIN,i="hover"===t?this.constructor.Event.MOUSELEAVE:this.constructor.Event.FOCUSOUT;H.on(this._element,e,this._config.selector,t=>this._enter(t)),H.on(this._element,i,this._config.selector,t=>this._leave(t))}}),this._hideModalHandler=()=>{this._element&&this.hide()},H.on(this._element.closest(".modal"),"hide.bs.modal",this._hideModalHandler),this._config.selector?this._config={...this._config,trigger:"manual",selector:""}:this._fixTitle()}_fixTitle(){const t=this._element.getAttribute("title"),e=typeof this._element.getAttribute("data-bs-original-title");(t||"string"!==e)&&(this._element.setAttribute("data-bs-original-title",t||""),!t||this._element.getAttribute("aria-label")||this._element.textContent||this._element.setAttribute("aria-label",t),this._element.setAttribute("title",""))}_enter(t,e){e=this._initializeOnDelegatedTarget(t,e),t&&(e._activeTrigger["focusin"===t.type?"focus":"hover"]=!0),e.getTipElement().classList.contains("show")||"show"===e._hoverState?e._hoverState="show":(clearTimeout(e._timeout),e._hoverState="show",e._config.delay&&e._config.delay.show?e._timeout=setTimeout(()=>{"show"===e._hoverState&&e.show()},e._config.delay.show):e.show())}_leave(t,e){e=this._initializeOnDelegatedTarget(t,e),t&&(e._activeTrigger["focusout"===t.type?"focus":"hover"]=e._element.contains(t.relatedTarget)),e._isWithActiveTrigger()||(clearTimeout(e._timeout),e._hoverState="out",e._config.delay&&e._config.delay.hide?e._timeout=setTimeout(()=>{"out"===e._hoverState&&e.hide()},e._config.delay.hide):e.hide())}_isWithActiveTrigger(){for(const t in this._activeTrigger)if(this._activeTrigger[t])return!0;return!1}_getConfig(t){const e=U.getDataAttributes(this._element);return Object.keys(e).forEach(t=>{Ue.has(t)&&delete e[t]}),(t={...this.constructor.Default,...e,..."object"==typeof t&&t?t:{}}).container=!1===t.container?document.body:l(t.container),"number"==typeof t.delay&&(t.delay={show:t.delay,hide:t.delay}),"number"==typeof t.title&&(t.title=t.title.toString()),"number"==typeof t.content&&(t.content=t.content.toString()),d("tooltip",t,this.constructor.DefaultType),t.sanitize&&(t.template=qe(t.template,t.allowList,t.sanitizeFn)),t}_getDelegateConfig(){const t={};if(this._config)for(const e in this._config)this.constructor.Default[e]!==this._config[e]&&(t[e]=this._config[e]);return t}_cleanTipClass(){const t=this.getTipElement(),e=t.getAttribute("class").match(ze);null!==e&&e.length>0&&e.map(t=>t.trim()).forEach(e=>t.classList.remove(e))}_handlePopperPlacementChange(t){const{state:e}=t;e&&(this.tip=e.elements.popper,this._cleanTipClass(),this._addAttachmentClass(this._getAttachment(e.placement)))}static jQueryInterface(t){return this.each((function(){let e=w.get(this,"bs.tooltip");const i="object"==typeof t&&t;if((e||!/dispose|hide/.test(t))&&(e||(e=new Xe(this,i)),"string"==typeof t)){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}}b(Xe);const Ye=new RegExp("(^|\\s)bs-popover\\S+","g"),Qe={...Xe.Default,placement:"right",offset:[0,8],trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="popover-arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>'},Ge={...Xe.DefaultType,content:"(string|element|function)"},Ze={HIDE:"hide.bs.popover",HIDDEN:"hidden.bs.popover",SHOW:"show.bs.popover",SHOWN:"shown.bs.popover",INSERTED:"inserted.bs.popover",CLICK:"click.bs.popover",FOCUSIN:"focusin.bs.popover",FOCUSOUT:"focusout.bs.popover",MOUSEENTER:"mouseenter.bs.popover",MOUSELEAVE:"mouseleave.bs.popover"};class Je extends Xe{static get Default(){return Qe}static get NAME(){return"popover"}static get Event(){return Ze}static get DefaultType(){return Ge}isWithContent(){return this.getTitle()||this._getContent()}setContent(){const e=this.getTipElement();this.setElementContent(t.findOne(".popover-header",e),this.getTitle());let i=this._getContent();"function"==typeof i&&(i=i.call(this._element)),this.setElementContent(t.findOne(".popover-body",e),i),e.classList.remove("fade","show")}_addAttachmentClass(t){this.getTipElement().classList.add("bs-popover-"+this.updateAttachment(t))}_getContent(){return this._element.getAttribute("data-bs-content")||this._config.content}_cleanTipClass(){const t=this.getTipElement(),e=t.getAttribute("class").match(Ye);null!==e&&e.length>0&&e.map(t=>t.trim()).forEach(e=>t.classList.remove(e))}static jQueryInterface(t){return this.each((function(){let e=w.get(this,"bs.popover");const i="object"==typeof t?t:null;if((e||!/dispose|hide/.test(t))&&(e||(e=new Je(this,i),w.set(this,"bs.popover",e)),"string"==typeof t)){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}}b(Je);const ti={offset:10,method:"auto",target:""},ei={offset:"number",method:"string",target:"(string|element)"};class ii extends R{constructor(t,e){super(t),this._scrollElement="BODY"===this._element.tagName?window:this._element,this._config=this._getConfig(e),this._selector=`${this._config.target} .nav-link, ${this._config.target} .list-group-item, ${this._config.target} .dropdown-item`,this._offsets=[],this._targets=[],this._activeTarget=null,this._scrollHeight=0,H.on(this._scrollElement,"scroll.bs.scrollspy",()=>this._process()),this.refresh(),this._process()}static get Default(){return ti}static get NAME(){return"scrollspy"}refresh(){const e=this._scrollElement===this._scrollElement.window?"offset":"position",i="auto"===this._config.method?e:this._config.method,s="position"===i?this._getScrollTop():0;this._offsets=[],this._targets=[],this._scrollHeight=this._getScrollHeight(),t.find(this._selector).map(e=>{const o=n(e),r=o?t.findOne(o):null;if(r){const t=r.getBoundingClientRect();if(t.width||t.height)return[U[i](r).top+s,o]}return null}).filter(t=>t).sort((t,e)=>t[0]-e[0]).forEach(t=>{this._offsets.push(t[0]),this._targets.push(t[1])})}dispose(){H.off(this._scrollElement,".bs.scrollspy"),super.dispose()}_getConfig(t){if("string"!=typeof(t={...ti,...U.getDataAttributes(this._element),..."object"==typeof t&&t?t:{}}).target&&a(t.target)){let{id:i}=t.target;i||(i=e("scrollspy"),t.target.id=i),t.target="#"+i}return d("scrollspy",t,ei),t}_getScrollTop(){return this._scrollElement===window?this._scrollElement.pageYOffset:this._scrollElement.scrollTop}_getScrollHeight(){return this._scrollElement.scrollHeight||Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)}_getOffsetHeight(){return this._scrollElement===window?window.innerHeight:this._scrollElement.getBoundingClientRect().height}_process(){const t=this._getScrollTop()+this._config.offset,e=this._getScrollHeight(),i=this._config.offset+e-this._getOffsetHeight();if(this._scrollHeight!==e&&this.refresh(),t>=i){const t=this._targets[this._targets.length-1];this._activeTarget!==t&&this._activate(t)}else{if(this._activeTarget&&t<this._offsets[0]&&this._offsets[0]>0)return this._activeTarget=null,void this._clear();for(let e=this._offsets.length;e--;)this._activeTarget!==this._targets[e]&&t>=this._offsets[e]&&(void 0===this._offsets[e+1]||t<this._offsets[e+1])&&this._activate(this._targets[e])}}_activate(e){this._activeTarget=e,this._clear();const i=this._selector.split(",").map(t=>`${t}[data-bs-target="${e}"],${t}[href="${e}"]`),n=t.findOne(i.join(","));n.classList.contains("dropdown-item")?(t.findOne(".dropdown-toggle",n.closest(".dropdown")).classList.add("active"),n.classList.add("active")):(n.classList.add("active"),t.parents(n,".nav, .list-group").forEach(e=>{t.prev(e,".nav-link, .list-group-item").forEach(t=>t.classList.add("active")),t.prev(e,".nav-item").forEach(e=>{t.children(e,".nav-link").forEach(t=>t.classList.add("active"))})})),H.trigger(this._scrollElement,"activate.bs.scrollspy",{relatedTarget:e})}_clear(){t.find(this._selector).filter(t=>t.classList.contains("active")).forEach(t=>t.classList.remove("active"))}static jQueryInterface(t){return this.each((function(){const e=ii.getInstance(this)||new ii(this,"object"==typeof t?t:{});if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}}H.on(window,"load.bs.scrollspy.data-api",()=>{t.find('[data-bs-spy="scroll"]').forEach(t=>new ii(t))}),b(ii);class ni extends R{static get NAME(){return"tab"}show(){if(this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE&&this._element.classList.contains("active"))return;let e;const i=s(this._element),n=this._element.closest(".nav, .list-group");if(n){const i="UL"===n.nodeName||"OL"===n.nodeName?":scope > li > .active":".active";e=t.find(i,n),e=e[e.length-1]}const o=e?H.trigger(e,"hide.bs.tab",{relatedTarget:this._element}):null;if(H.trigger(this._element,"show.bs.tab",{relatedTarget:e}).defaultPrevented||null!==o&&o.defaultPrevented)return;this._activate(this._element,n);const r=()=>{H.trigger(e,"hidden.bs.tab",{relatedTarget:this._element}),H.trigger(this._element,"shown.bs.tab",{relatedTarget:e})};i?this._activate(i,i.parentNode,r):r()}_activate(e,i,n){const s=(!i||"UL"!==i.nodeName&&"OL"!==i.nodeName?t.children(i,".active"):t.find(":scope > li > .active",i))[0],o=n&&s&&s.classList.contains("fade"),r=()=>this._transitionComplete(e,s,n);s&&o?(s.classList.remove("show"),this._queueCallback(r,e,!0)):r()}_transitionComplete(e,i,n){if(i){i.classList.remove("active");const e=t.findOne(":scope > .dropdown-menu .active",i.parentNode);e&&e.classList.remove("active"),"tab"===i.getAttribute("role")&&i.setAttribute("aria-selected",!1)}e.classList.add("active"),"tab"===e.getAttribute("role")&&e.setAttribute("aria-selected",!0),m(e),e.classList.contains("fade")&&e.classList.add("show");let s=e.parentNode;if(s&&"LI"===s.nodeName&&(s=s.parentNode),s&&s.classList.contains("dropdown-menu")){const i=e.closest(".dropdown");i&&t.find(".dropdown-toggle",i).forEach(t=>t.classList.add("active")),e.setAttribute("aria-expanded",!0)}n&&n()}static jQueryInterface(t){return this.each((function(){const e=w.get(this,"bs.tab")||new ni(this);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}}H.on(document,"click.bs.tab.data-api",'[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',(function(t){["A","AREA"].includes(this.tagName)&&t.preventDefault(),u(this)||(w.get(this,"bs.tab")||new ni(this)).show()})),b(ni);const si={animation:"boolean",autohide:"boolean",delay:"number"},oi={animation:!0,autohide:!0,delay:5e3};class ri extends R{constructor(t,e){super(t),this._config=this._getConfig(e),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get DefaultType(){return si}static get Default(){return oi}static get NAME(){return"toast"}show(){H.trigger(this._element,"show.bs.toast").defaultPrevented||(this._clearTimeout(),this._config.animation&&this._element.classList.add("fade"),this._element.classList.remove("hide"),m(this._element),this._element.classList.add("showing"),this._queueCallback(()=>{this._element.classList.remove("showing"),this._element.classList.add("show"),H.trigger(this._element,"shown.bs.toast"),this._maybeScheduleHide()},this._element,this._config.animation))}hide(){this._element.classList.contains("show")&&(H.trigger(this._element,"hide.bs.toast").defaultPrevented||(this._element.classList.remove("show"),this._queueCallback(()=>{this._element.classList.add("hide"),H.trigger(this._element,"hidden.bs.toast")},this._element,this._config.animation)))}dispose(){this._clearTimeout(),this._element.classList.contains("show")&&this._element.classList.remove("show"),super.dispose()}_getConfig(t){return t={...oi,...U.getDataAttributes(this._element),..."object"==typeof t&&t?t:{}},d("toast",t,this.constructor.DefaultType),t}_maybeScheduleHide(){this._config.autohide&&(this._hasMouseInteraction||this._hasKeyboardInteraction||(this._timeout=setTimeout(()=>{this.hide()},this._config.delay)))}_onInteraction(t,e){switch(t.type){case"mouseover":case"mouseout":this._hasMouseInteraction=e;break;case"focusin":case"focusout":this._hasKeyboardInteraction=e}if(e)return void this._clearTimeout();const i=t.relatedTarget;this._element===i||this._element.contains(i)||this._maybeScheduleHide()}_setListeners(){H.on(this._element,"click.dismiss.bs.toast",'[data-bs-dismiss="toast"]',()=>this.hide()),H.on(this._element,"mouseover.bs.toast",t=>this._onInteraction(t,!0)),H.on(this._element,"mouseout.bs.toast",t=>this._onInteraction(t,!1)),H.on(this._element,"focusin.bs.toast",t=>this._onInteraction(t,!0)),H.on(this._element,"focusout.bs.toast",t=>this._onInteraction(t,!1))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(t){return this.each((function(){let e=w.get(this,"bs.toast");if(e||(e=new ri(this,"object"==typeof t&&t)),"string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t](this)}}))}}return b(ri),{Alert:B,Button:W,Carousel:Q,Collapse:J,Dropdown:we,Modal:Ie,Offcanvas:Me,Popover:Je,ScrollSpy:ii,Tab:ni,Toast:ri,Tooltip:Xe}}));
+//# sourceMappingURL=bootstrap.bundle.min.js.map \ No newline at end of file
diff --git a/op25/gr-op25_repeater/apps/oplog/op25/static/js/bootstrap/bootstrap.min.js b/op25/gr-op25_repeater/apps/oplog/op25/static/js/bootstrap/bootstrap.min.js
new file mode 100644
index 0000000..e364a13
--- /dev/null
+++ b/op25/gr-op25_repeater/apps/oplog/op25/static/js/bootstrap/bootstrap.min.js
@@ -0,0 +1,7 @@
+/*!
+ * Bootstrap v3.3.6 (http://getbootstrap.com)
+ * Copyright 2011-2015 Twitter, Inc.
+ * Licensed under the MIT license
+ */
+if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){"use strict";var b=a.fn.jquery.split(" ")[0].split(".");if(b[0]<2&&b[1]<9||1==b[0]&&9==b[1]&&b[2]<1||b[0]>2)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 3")}(jQuery),+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one("bsTransitionEnd",function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b(),a.support.transition&&(a.event.special.bsTransitionEnd={bindType:a.support.transition.end,delegateType:a.support.transition.end,handle:function(b){return a(b.target).is(this)?b.handleObj.handler.apply(this,arguments):void 0}})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var c=a(this),e=c.data("bs.alert");e||c.data("bs.alert",e=new d(this)),"string"==typeof b&&e[b].call(c)})}var c='[data-dismiss="alert"]',d=function(b){a(b).on("click",c,this.close)};d.VERSION="3.3.6",d.TRANSITION_DURATION=150,d.prototype.close=function(b){function c(){g.detach().trigger("closed.bs.alert").remove()}var e=a(this),f=e.attr("data-target");f||(f=e.attr("href"),f=f&&f.replace(/.*(?=#[^\s]*$)/,""));var g=a(f);b&&b.preventDefault(),g.length||(g=e.closest(".alert")),g.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(g.removeClass("in"),a.support.transition&&g.hasClass("fade")?g.one("bsTransitionEnd",c).emulateTransitionEnd(d.TRANSITION_DURATION):c())};var e=a.fn.alert;a.fn.alert=b,a.fn.alert.Constructor=d,a.fn.alert.noConflict=function(){return a.fn.alert=e,this},a(document).on("click.bs.alert.data-api",c,d.prototype.close)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof b&&b;e||d.data("bs.button",e=new c(this,f)),"toggle"==b?e.toggle():b&&e.setState(b)})}var c=function(b,d){this.$element=a(b),this.options=a.extend({},c.DEFAULTS,d),this.isLoading=!1};c.VERSION="3.3.6",c.DEFAULTS={loadingText:"loading..."},c.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",null==f.resetText&&d.data("resetText",d[e]()),setTimeout(a.proxy(function(){d[e](null==f[b]?this.options[b]:f[b]),"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c))},this),0)},c.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")?(c.prop("checked")&&(a=!1),b.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==c.prop("type")&&(c.prop("checked")!==this.$element.hasClass("active")&&(a=!1),this.$element.toggleClass("active")),c.prop("checked",this.$element.hasClass("active")),a&&c.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var d=a.fn.button;a.fn.button=b,a.fn.button.Constructor=c,a.fn.button.noConflict=function(){return a.fn.button=d,this},a(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(c){var d=a(c.target);d.hasClass("btn")||(d=d.closest(".btn")),b.call(d,"toggle"),a(c.target).is('input[type="radio"]')||a(c.target).is('input[type="checkbox"]')||c.preventDefault()}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(b){a(b.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(b.type))})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},c.DEFAULTS,d.data(),"object"==typeof b&&b),g="string"==typeof b?b:f.slide;e||d.data("bs.carousel",e=new c(this,f)),"number"==typeof b?e.to(b):g?e[g]():f.interval&&e.pause().cycle()})}var c=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",a.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",a.proxy(this.pause,this)).on("mouseleave.bs.carousel",a.proxy(this.cycle,this))};c.VERSION="3.3.6",c.TRANSITION_DURATION=600,c.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},c.prototype.keydown=function(a){if(!/input|textarea/i.test(a.target.tagName)){switch(a.which){case 37:this.prev();break;case 39:this.next();break;default:return}a.preventDefault()}},c.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},c.prototype.getItemIndex=function(a){return this.$items=a.parent().children(".item"),this.$items.index(a||this.$active)},c.prototype.getItemForDirection=function(a,b){var c=this.getItemIndex(b),d="prev"==a&&0===c||"next"==a&&c==this.$items.length-1;if(d&&!this.options.wrap)return b;var e="prev"==a?-1:1,f=(c+e)%this.$items.length;return this.$items.eq(f)},c.prototype.to=function(a){var b=this,c=this.getItemIndex(this.$active=this.$element.find(".item.active"));return a>this.$items.length-1||0>a?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){b.to(a)}):c==a?this.pause().cycle():this.slide(a>c?"next":"prev",this.$items.eq(a))},c.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},c.prototype.next=function(){return this.sliding?void 0:this.slide("next")},c.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},c.prototype.slide=function(b,d){var e=this.$element.find(".item.active"),f=d||this.getItemForDirection(b,e),g=this.interval,h="next"==b?"left":"right",i=this;if(f.hasClass("active"))return this.sliding=!1;var j=f[0],k=a.Event("slide.bs.carousel",{relatedTarget:j,direction:h});if(this.$element.trigger(k),!k.isDefaultPrevented()){if(this.sliding=!0,g&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var l=a(this.$indicators.children()[this.getItemIndex(f)]);l&&l.addClass("active")}var m=a.Event("slid.bs.carousel",{relatedTarget:j,direction:h});return a.support.transition&&this.$element.hasClass("slide")?(f.addClass(b),f[0].offsetWidth,e.addClass(h),f.addClass(h),e.one("bsTransitionEnd",function(){f.removeClass([b,h].join(" ")).addClass("active"),e.removeClass(["active",h].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger(m)},0)}).emulateTransitionEnd(c.TRANSITION_DURATION)):(e.removeClass("active"),f.addClass("active"),this.sliding=!1,this.$element.trigger(m)),g&&this.cycle(),this}};var d=a.fn.carousel;a.fn.carousel=b,a.fn.carousel.Constructor=c,a.fn.carousel.noConflict=function(){return a.fn.carousel=d,this};var e=function(c){var d,e=a(this),f=a(e.attr("data-target")||(d=e.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""));if(f.hasClass("carousel")){var g=a.extend({},f.data(),e.data()),h=e.attr("data-slide-to");h&&(g.interval=!1),b.call(f,g),h&&f.data("bs.carousel").to(h),c.preventDefault()}};a(document).on("click.bs.carousel.data-api","[data-slide]",e).on("click.bs.carousel.data-api","[data-slide-to]",e),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var c=a(this);b.call(c,c.data())})})}(jQuery),+function(a){"use strict";function b(b){var c,d=b.attr("data-target")||(c=b.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"");return a(d)}function c(b){return this.each(function(){var c=a(this),e=c.data("bs.collapse"),f=a.extend({},d.DEFAULTS,c.data(),"object"==typeof b&&b);!e&&f.toggle&&/show|hide/.test(b)&&(f.toggle=!1),e||c.data("bs.collapse",e=new d(this,f)),"string"==typeof b&&e[b]()})}var d=function(b,c){this.$element=a(b),this.options=a.extend({},d.DEFAULTS,c),this.$trigger=a('[data-toggle="collapse"][href="#'+b.id+'"],[data-toggle="collapse"][data-target="#'+b.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};d.VERSION="3.3.6",d.TRANSITION_DURATION=350,d.DEFAULTS={toggle:!0},d.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},d.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b,e=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(e&&e.length&&(b=e.data("bs.collapse"),b&&b.transitioning))){var f=a.Event("show.bs.collapse");if(this.$element.trigger(f),!f.isDefaultPrevented()){e&&e.length&&(c.call(e,"hide"),b||e.data("bs.collapse",null));var g=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[g](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var h=function(){this.$element.removeClass("collapsing").addClass("collapse in")[g](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return h.call(this);var i=a.camelCase(["scroll",g].join("-"));this.$element.one("bsTransitionEnd",a.proxy(h,this)).emulateTransitionEnd(d.TRANSITION_DURATION)[g](this.$element[0][i])}}}},d.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var e=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return a.support.transition?void this.$element[c](0).one("bsTransitionEnd",a.proxy(e,this)).emulateTransitionEnd(d.TRANSITION_DURATION):e.call(this)}}},d.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},d.prototype.getParent=function(){return a(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(a.proxy(function(c,d){var e=a(d);this.addAriaAndCollapsedClass(b(e),e)},this)).end()},d.prototype.addAriaAndCollapsedClass=function(a,b){var c=a.hasClass("in");a.attr("aria-expanded",c),b.toggleClass("collapsed",!c).attr("aria-expanded",c)};var e=a.fn.collapse;a.fn.collapse=c,a.fn.collapse.Constructor=d,a.fn.collapse.noConflict=function(){return a.fn.collapse=e,this},a(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(d){var e=a(this);e.attr("data-target")||d.preventDefault();var f=b(e),g=f.data("bs.collapse"),h=g?"toggle":e.data();c.call(f,h)})}(jQuery),+function(a){"use strict";function b(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}function c(c){c&&3===c.which||(a(e).remove(),a(f).each(function(){var d=a(this),e=b(d),f={relatedTarget:this};e.hasClass("open")&&(c&&"click"==c.type&&/input|textarea/i.test(c.target.tagName)&&a.contains(e[0],c.target)||(e.trigger(c=a.Event("hide.bs.dropdown",f)),c.isDefaultPrevented()||(d.attr("aria-expanded","false"),e.removeClass("open").trigger(a.Event("hidden.bs.dropdown",f)))))}))}function d(b){return this.each(function(){var c=a(this),d=c.data("bs.dropdown");d||c.data("bs.dropdown",d=new g(this)),"string"==typeof b&&d[b].call(c)})}var e=".dropdown-backdrop",f='[data-toggle="dropdown"]',g=function(b){a(b).on("click.bs.dropdown",this.toggle)};g.VERSION="3.3.6",g.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=b(e),g=f.hasClass("open");if(c(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(a(this)).on("click",c);var h={relatedTarget:this};if(f.trigger(d=a.Event("show.bs.dropdown",h)),d.isDefaultPrevented())return;e.trigger("focus").attr("aria-expanded","true"),f.toggleClass("open").trigger(a.Event("shown.bs.dropdown",h))}return!1}},g.prototype.keydown=function(c){if(/(38|40|27|32)/.test(c.which)&&!/input|textarea/i.test(c.target.tagName)){var d=a(this);if(c.preventDefault(),c.stopPropagation(),!d.is(".disabled, :disabled")){var e=b(d),g=e.hasClass("open");if(!g&&27!=c.which||g&&27==c.which)return 27==c.which&&e.find(f).trigger("focus"),d.trigger("click");var h=" li:not(.disabled):visible a",i=e.find(".dropdown-menu"+h);if(i.length){var j=i.index(c.target);38==c.which&&j>0&&j--,40==c.which&&j<i.length-1&&j++,~j||(j=0),i.eq(j).trigger("focus")}}}};var h=a.fn.dropdown;a.fn.dropdown=d,a.fn.dropdown.Constructor=g,a.fn.dropdown.noConflict=function(){return a.fn.dropdown=h,this},a(document).on("click.bs.dropdown.data-api",c).on("click.bs.dropdown.data-api",".dropdown form",function(a){a.stopPropagation()}).on("click.bs.dropdown.data-api",f,g.prototype.toggle).on("keydown.bs.dropdown.data-api",f,g.prototype.keydown).on("keydown.bs.dropdown.data-api",".dropdown-menu",g.prototype.keydown)}(jQuery),+function(a){"use strict";function b(b,d){return this.each(function(){var e=a(this),f=e.data("bs.modal"),g=a.extend({},c.DEFAULTS,e.data(),"object"==typeof b&&b);f||e.data("bs.modal",f=new c(this,g)),"string"==typeof b?f[b](d):g.show&&f.show(d)})}var c=function(b,c){this.options=c,this.$body=a(document.body),this.$element=a(b),this.$dialog=this.$element.find(".modal-dialog"),this.$backdrop=null,this.isShown=null,this.originalBodyPad=null,this.scrollbarWidth=0,this.ignoreBackdropClick=!1,this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,a.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))};c.VERSION="3.3.6",c.TRANSITION_DURATION=300,c.BACKDROP_TRANSITION_DURATION=150,c.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},c.prototype.toggle=function(a){return this.isShown?this.hide():this.show(a)},c.prototype.show=function(b){var d=this,e=a.Event("show.bs.modal",{relatedTarget:b});this.$element.trigger(e),this.isShown||e.isDefaultPrevented()||(this.isShown=!0,this.checkScrollbar(),this.setScrollbar(),this.$body.addClass("modal-open"),this.escape(),this.resize(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',a.proxy(this.hide,this)),this.$dialog.on("mousedown.dismiss.bs.modal",function(){d.$element.one("mouseup.dismiss.bs.modal",function(b){a(b.target).is(d.$element)&&(d.ignoreBackdropClick=!0)})}),this.backdrop(function(){var e=a.support.transition&&d.$element.hasClass("fade");d.$element.parent().length||d.$element.appendTo(d.$body),d.$element.show().scrollTop(0),d.adjustDialog(),e&&d.$element[0].offsetWidth,d.$element.addClass("in"),d.enforceFocus();var f=a.Event("shown.bs.modal",{relatedTarget:b});e?d.$dialog.one("bsTransitionEnd",function(){d.$element.trigger("focus").trigger(f)}).emulateTransitionEnd(c.TRANSITION_DURATION):d.$element.trigger("focus").trigger(f)}))},c.prototype.hide=function(b){b&&b.preventDefault(),b=a.Event("hide.bs.modal"),this.$element.trigger(b),this.isShown&&!b.isDefaultPrevented()&&(this.isShown=!1,this.escape(),this.resize(),a(document).off("focusin.bs.modal"),this.$element.removeClass("in").off("click.dismiss.bs.modal").off("mouseup.dismiss.bs.modal"),this.$dialog.off("mousedown.dismiss.bs.modal"),a.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",a.proxy(this.hideModal,this)).emulateTransitionEnd(c.TRANSITION_DURATION):this.hideModal())},c.prototype.enforceFocus=function(){a(document).off("focusin.bs.modal").on("focusin.bs.modal",a.proxy(function(a){this.$element[0]===a.target||this.$element.has(a.target).length||this.$element.trigger("focus")},this))},c.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keydown.dismiss.bs.modal",a.proxy(function(a){27==a.which&&this.hide()},this)):this.isShown||this.$element.off("keydown.dismiss.bs.modal")},c.prototype.resize=function(){this.isShown?a(window).on("resize.bs.modal",a.proxy(this.handleUpdate,this)):a(window).off("resize.bs.modal")},c.prototype.hideModal=function(){var a=this;this.$element.hide(),this.backdrop(function(){a.$body.removeClass("modal-open"),a.resetAdjustments(),a.resetScrollbar(),a.$element.trigger("hidden.bs.modal")})},c.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},c.prototype.backdrop=function(b){var d=this,e=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var f=a.support.transition&&e;if(this.$backdrop=a(document.createElement("div")).addClass("modal-backdrop "+e).appendTo(this.$body),this.$element.on("click.dismiss.bs.modal",a.proxy(function(a){return this.ignoreBackdropClick?void(this.ignoreBackdropClick=!1):void(a.target===a.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus():this.hide()))},this)),f&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!b)return;f?this.$backdrop.one("bsTransitionEnd",b).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION):b()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var g=function(){d.removeBackdrop(),b&&b()};a.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",g).emulateTransitionEnd(c.BACKDROP_TRANSITION_DURATION):g()}else b&&b()},c.prototype.handleUpdate=function(){this.adjustDialog()},c.prototype.adjustDialog=function(){var a=this.$element[0].scrollHeight>document.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&a?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!a?this.scrollbarWidth:""})},c.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},c.prototype.checkScrollbar=function(){var a=window.innerWidth;if(!a){var b=document.documentElement.getBoundingClientRect();a=b.right-Math.abs(b.left)}this.bodyIsOverflowing=document.body.clientWidth<a,this.scrollbarWidth=this.measureScrollbar()},c.prototype.setScrollbar=function(){var a=parseInt(this.$body.css("padding-right")||0,10);this.originalBodyPad=document.body.style.paddingRight||"",this.bodyIsOverflowing&&this.$body.css("padding-right",a+this.scrollbarWidth)},c.prototype.resetScrollbar=function(){this.$body.css("padding-right",this.originalBodyPad)},c.prototype.measureScrollbar=function(){var a=document.createElement("div");a.className="modal-scrollbar-measure",this.$body.append(a);var b=a.offsetWidth-a.clientWidth;return this.$body[0].removeChild(a),b};var d=a.fn.modal;a.fn.modal=b,a.fn.modal.Constructor=c,a.fn.modal.noConflict=function(){return a.fn.modal=d,this},a(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(c){var d=a(this),e=d.attr("href"),f=a(d.attr("data-target")||e&&e.replace(/.*(?=#[^\s]+$)/,"")),g=f.data("bs.modal")?"toggle":a.extend({remote:!/#/.test(e)&&e},f.data(),d.data());d.is("a")&&c.preventDefault(),f.one("show.bs.modal",function(a){a.isDefaultPrevented()||f.one("hidden.bs.modal",function(){d.is(":visible")&&d.trigger("focus")})}),b.call(f,g,this)})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.tooltip"),f="object"==typeof b&&b;(e||!/destroy|hide/.test(b))&&(e||d.data("bs.tooltip",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.type=null,this.options=null,this.enabled=null,this.timeout=null,this.hoverState=null,this.$element=null,this.inState=null,this.init("tooltip",a,b)};c.VERSION="3.3.6",c.TRANSITION_DURATION=150,c.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},c.prototype.init=function(b,c,d){if(this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d),this.$viewport=this.options.viewport&&a(a.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var e=this.options.trigger.split(" "),f=e.length;f--;){var g=e[f];if("click"==g)this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if("manual"!=g){var h="hover"==g?"mouseenter":"focusin",i="hover"==g?"mouseleave":"focusout";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},c.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},c.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusin"==b.type?"focus":"hover"]=!0),c.tip().hasClass("in")||"in"==c.hoverState?void(c.hoverState="in"):(clearTimeout(c.timeout),c.hoverState="in",c.options.delay&&c.options.delay.show?void(c.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show)):c.show())},c.prototype.isInStateTrue=function(){for(var a in this.inState)if(this.inState[a])return!0;return!1},c.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusout"==b.type?"focus":"hover"]=!1),c.isInStateTrue()?void 0:(clearTimeout(c.timeout),c.hoverState="out",c.options.delay&&c.options.delay.hide?void(c.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide)):c.hide())},c.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(b);var d=a.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(b.isDefaultPrevented()||!d)return;var e=this,f=this.tip(),g=this.getUID(this.type);this.setContent(),f.attr("id",g),this.$element.attr("aria-describedby",g),this.options.animation&&f.addClass("fade");var h="function"==typeof this.options.placement?this.options.placement.call(this,f[0],this.$element[0]):this.options.placement,i=/\s?auto?\s?/i,j=i.test(h);j&&(h=h.replace(i,"")||"top"),f.detach().css({top:0,left:0,display:"block"}).addClass(h).data("bs."+this.type,this),this.options.container?f.appendTo(this.options.container):f.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var k=this.getPosition(),l=f[0].offsetWidth,m=f[0].offsetHeight;if(j){var n=h,o=this.getPosition(this.$viewport);h="bottom"==h&&k.bottom+m>o.bottom?"top":"top"==h&&k.top-m<o.top?"bottom":"right"==h&&k.right+l>o.width?"left":"left"==h&&k.left-l<o.left?"right":h,f.removeClass(n).addClass(h)}var p=this.getCalculatedOffset(h,k,l,m);this.applyPlacement(p,h);var q=function(){var a=e.hoverState;e.$element.trigger("shown.bs."+e.type),e.hoverState=null,"out"==a&&e.leave(e)};a.support.transition&&this.$tip.hasClass("fade")?f.one("bsTransitionEnd",q).emulateTransitionEnd(c.TRANSITION_DURATION):q()}},c.prototype.applyPlacement=function(b,c){var d=this.tip(),e=d[0].offsetWidth,f=d[0].offsetHeight,g=parseInt(d.css("margin-top"),10),h=parseInt(d.css("margin-left"),10);isNaN(g)&&(g=0),isNaN(h)&&(h=0),b.top+=g,b.left+=h,a.offset.setOffset(d[0],a.extend({using:function(a){d.css({top:Math.round(a.top),left:Math.round(a.left)})}},b),0),d.addClass("in");var i=d[0].offsetWidth,j=d[0].offsetHeight;"top"==c&&j!=f&&(b.top=b.top+f-j);var k=this.getViewportAdjustedDelta(c,b,i,j);k.left?b.left+=k.left:b.top+=k.top;var l=/top|bottom/.test(c),m=l?2*k.left-e+i:2*k.top-f+j,n=l?"offsetWidth":"offsetHeight";d.offset(b),this.replaceArrow(m,d[0][n],l)},c.prototype.replaceArrow=function(a,b,c){this.arrow().css(c?"left":"top",50*(1-a/b)+"%").css(c?"top":"left","")},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle();a.find(".tooltip-inner")[this.options.html?"html":"text"](b),a.removeClass("fade in top bottom left right")},c.prototype.hide=function(b){function d(){"in"!=e.hoverState&&f.detach(),e.$element.removeAttr("aria-describedby").trigger("hidden.bs."+e.type),b&&b()}var e=this,f=a(this.$tip),g=a.Event("hide.bs."+this.type);return this.$element.trigger(g),g.isDefaultPrevented()?void 0:(f.removeClass("in"),a.support.transition&&f.hasClass("fade")?f.one("bsTransitionEnd",d).emulateTransitionEnd(c.TRANSITION_DURATION):d(),this.hoverState=null,this)},c.prototype.fixTitle=function(){var a=this.$element;(a.attr("title")||"string"!=typeof a.attr("data-original-title"))&&a.attr("data-original-title",a.attr("title")||"").attr("title","")},c.prototype.hasContent=function(){return this.getTitle()},c.prototype.getPosition=function(b){b=b||this.$element;var c=b[0],d="BODY"==c.tagName,e=c.getBoundingClientRect();null==e.width&&(e=a.extend({},e,{width:e.right-e.left,height:e.bottom-e.top}));var f=d?{top:0,left:0}:b.offset(),g={scroll:d?document.documentElement.scrollTop||document.body.scrollTop:b.scrollTop()},h=d?{width:a(window).width(),height:a(window).height()}:null;return a.extend({},e,g,h,f)},c.prototype.getCalculatedOffset=function(a,b,c,d){return"bottom"==a?{top:b.top+b.height,left:b.left+b.width/2-c/2}:"top"==a?{top:b.top-d,left:b.left+b.width/2-c/2}:"left"==a?{top:b.top+b.height/2-d/2,left:b.left-c}:{top:b.top+b.height/2-d/2,left:b.left+b.width}},c.prototype.getViewportAdjustedDelta=function(a,b,c,d){var e={top:0,left:0};if(!this.$viewport)return e;var f=this.options.viewport&&this.options.viewport.padding||0,g=this.getPosition(this.$viewport);if(/right|left/.test(a)){var h=b.top-f-g.scroll,i=b.top+f-g.scroll+d;h<g.top?e.top=g.top-h:i>g.top+g.height&&(e.top=g.top+g.height-i)}else{var j=b.left-f,k=b.left+f+c;j<g.left?e.left=g.left-j:k>g.right&&(e.left=g.left+g.width-k)}return e},c.prototype.getTitle=function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||("function"==typeof c.title?c.title.call(b[0]):c.title)},c.prototype.getUID=function(a){do a+=~~(1e6*Math.random());while(document.getElementById(a));return a},c.prototype.tip=function(){if(!this.$tip&&(this.$tip=a(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},c.prototype.enable=function(){this.enabled=!0},c.prototype.disable=function(){this.enabled=!1},c.prototype.toggleEnabled=function(){this.enabled=!this.enabled},c.prototype.toggle=function(b){var c=this;b&&(c=a(b.currentTarget).data("bs."+this.type),c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c))),b?(c.inState.click=!c.inState.click,c.isInStateTrue()?c.enter(c):c.leave(c)):c.tip().hasClass("in")?c.leave(c):c.enter(c)},c.prototype.destroy=function(){var a=this;clearTimeout(this.timeout),this.hide(function(){a.$element.off("."+a.type).removeData("bs."+a.type),a.$tip&&a.$tip.detach(),a.$tip=null,a.$arrow=null,a.$viewport=null})};var d=a.fn.tooltip;a.fn.tooltip=b,a.fn.tooltip.Constructor=c,a.fn.tooltip.noConflict=function(){return a.fn.tooltip=d,this}}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof b&&b;(e||!/destroy|hide/.test(b))&&(e||d.data("bs.popover",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.init("popover",a,b)};if(!a.fn.tooltip)throw new Error("Popover requires tooltip.js");c.VERSION="3.3.6",c.DEFAULTS=a.extend({},a.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),c.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),c.prototype.constructor=c,c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof c?"html":"append":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},c.prototype.hasContent=function(){return this.getTitle()||this.getContent()},c.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var d=a.fn.popover;a.fn.popover=b,a.fn.popover.Constructor=c,a.fn.popover.noConflict=function(){return a.fn.popover=d,this}}(jQuery),+function(a){"use strict";function b(c,d){this.$body=a(document.body),this.$scrollElement=a(a(c).is(document.body)?window:c),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",a.proxy(this.process,this)),this.refresh(),this.process()}function c(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})}b.VERSION="3.3.6",b.DEFAULTS={offset:10},b.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},b.prototype.refresh=function(){var b=this,c="offset",d=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),a.isWindow(this.$scrollElement[0])||(c="position",d=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var b=a(this),e=b.data("target")||b.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[c]().top+d,e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){b.offsets.push(this[0]),b.targets.push(this[1])})},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.getScrollHeight(),d=this.options.offset+c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(this.scrollHeight!=c&&this.refresh(),b>=d)return g!=(a=f[f.length-1])&&this.activate(a);if(g&&b<e[0])return this.activeTarget=null,this.clear();for(a=e.length;a--;)g!=f[a]&&b>=e[a]&&(void 0===e[a+1]||b<e[a+1])&&this.activate(f[a])},b.prototype.activate=function(b){this.activeTarget=b,this.clear();var c=this.selector+'[data-target="'+b+'"],'+this.selector+'[href="'+b+'"]',d=a(c).parents("li").addClass("active");
+d.parent(".dropdown-menu").length&&(d=d.closest("li.dropdown").addClass("active")),d.trigger("activate.bs.scrollspy")},b.prototype.clear=function(){a(this.selector).parentsUntil(this.options.target,".active").removeClass("active")};var d=a.fn.scrollspy;a.fn.scrollspy=c,a.fn.scrollspy.Constructor=b,a.fn.scrollspy.noConflict=function(){return a.fn.scrollspy=d,this},a(window).on("load.bs.scrollspy.data-api",function(){a('[data-spy="scroll"]').each(function(){var b=a(this);c.call(b,b.data())})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.tab");e||d.data("bs.tab",e=new c(this)),"string"==typeof b&&e[b]()})}var c=function(b){this.element=a(b)};c.VERSION="3.3.6",c.TRANSITION_DURATION=150,c.prototype.show=function(){var b=this.element,c=b.closest("ul:not(.dropdown-menu)"),d=b.data("target");if(d||(d=b.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,"")),!b.parent("li").hasClass("active")){var e=c.find(".active:last a"),f=a.Event("hide.bs.tab",{relatedTarget:b[0]}),g=a.Event("show.bs.tab",{relatedTarget:e[0]});if(e.trigger(f),b.trigger(g),!g.isDefaultPrevented()&&!f.isDefaultPrevented()){var h=a(d);this.activate(b.closest("li"),c),this.activate(h,h.parent(),function(){e.trigger({type:"hidden.bs.tab",relatedTarget:b[0]}),b.trigger({type:"shown.bs.tab",relatedTarget:e[0]})})}}},c.prototype.activate=function(b,d,e){function f(){g.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),b.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),h?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu").length&&b.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),e&&e()}var g=d.find("> .active"),h=e&&a.support.transition&&(g.length&&g.hasClass("fade")||!!d.find("> .fade").length);g.length&&h?g.one("bsTransitionEnd",f).emulateTransitionEnd(c.TRANSITION_DURATION):f(),g.removeClass("in")};var d=a.fn.tab;a.fn.tab=b,a.fn.tab.Constructor=c,a.fn.tab.noConflict=function(){return a.fn.tab=d,this};var e=function(c){c.preventDefault(),b.call(a(this),"show")};a(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',e).on("click.bs.tab.data-api",'[data-toggle="pill"]',e)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof b&&b;e||d.data("bs.affix",e=new c(this,f)),"string"==typeof b&&e[b]()})}var c=function(b,d){this.options=a.extend({},c.DEFAULTS,d),this.$target=a(this.options.target).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(b),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};c.VERSION="3.3.6",c.RESET="affix affix-top affix-bottom",c.DEFAULTS={offset:0,target:window},c.prototype.getState=function(a,b,c,d){var e=this.$target.scrollTop(),f=this.$element.offset(),g=this.$target.height();if(null!=c&&"top"==this.affixed)return c>e?"top":!1;if("bottom"==this.affixed)return null!=c?e+this.unpin<=f.top?!1:"bottom":a-d>=e+g?!1:"bottom";var h=null==this.affixed,i=h?e:f.top,j=h?g:b;return null!=c&&c>=e?"top":null!=d&&i+j>=a-d?"bottom":!1},c.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(c.RESET).addClass("affix");var a=this.$target.scrollTop(),b=this.$element.offset();return this.pinnedOffset=b.top-a},c.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},c.prototype.checkPosition=function(){if(this.$element.is(":visible")){var b=this.$element.height(),d=this.options.offset,e=d.top,f=d.bottom,g=Math.max(a(document).height(),a(document.body).height());"object"!=typeof d&&(f=e=d),"function"==typeof e&&(e=d.top(this.$element)),"function"==typeof f&&(f=d.bottom(this.$element));var h=this.getState(g,b,e,f);if(this.affixed!=h){null!=this.unpin&&this.$element.css("top","");var i="affix"+(h?"-"+h:""),j=a.Event(i+".bs.affix");if(this.$element.trigger(j),j.isDefaultPrevented())return;this.affixed=h,this.unpin="bottom"==h?this.getPinnedOffset():null,this.$element.removeClass(c.RESET).addClass(i).trigger(i.replace("affix","affixed")+".bs.affix")}"bottom"==h&&this.$element.offset({top:g-b-f})}};var d=a.fn.affix;a.fn.affix=b,a.fn.affix.Constructor=c,a.fn.affix.noConflict=function(){return a.fn.affix=d,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var c=a(this),d=c.data();d.offset=d.offset||{},null!=d.offsetBottom&&(d.offset.bottom=d.offsetBottom),null!=d.offsetTop&&(d.offset.top=d.offsetTop),b.call(c,d)})})}(jQuery);
diff --git a/op25/gr-op25_repeater/apps/oplog/op25/static/js/datatables/jquery.dataTables.js b/op25/gr-op25_repeater/apps/oplog/op25/static/js/datatables/jquery.dataTables.js
new file mode 100644
index 0000000..c061fd7
--- /dev/null
+++ b/op25/gr-op25_repeater/apps/oplog/op25/static/js/datatables/jquery.dataTables.js
@@ -0,0 +1,15212 @@
+/*! DataTables 1.10.10
+ * ©2008-2015 SpryMedia Ltd - datatables.net/license
+ */
+
+/**
+ * @summary DataTables
+ * @description Paginate, search and order HTML tables
+ * @version 1.10.10
+ * @file jquery.dataTables.js
+ * @author SpryMedia Ltd (www.sprymedia.co.uk)
+ * @contact www.sprymedia.co.uk/contact
+ * @copyright Copyright 2008-2015 SpryMedia Ltd.
+ *
+ * This source file is free software, available under the following license:
+ * MIT license - http://datatables.net/license
+ *
+ * This source file 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 license files for details.
+ *
+ * For details please refer to: http://www.datatables.net
+ */
+
+/*jslint evil: true, undef: true, browser: true */
+/*globals $,require,jQuery,define,_selector_run,_selector_opts,_selector_first,_selector_row_indexes,_ext,_Api,_api_register,_api_registerPlural,_re_new_lines,_re_html,_re_formatted_numeric,_re_escape_regex,_empty,_intVal,_numToDecimal,_isNumber,_isHtml,_htmlNumeric,_pluck,_pluck_order,_range,_stripHtml,_unique,_fnBuildAjax,_fnAjaxUpdate,_fnAjaxParameters,_fnAjaxUpdateDraw,_fnAjaxDataSrc,_fnAddColumn,_fnColumnOptions,_fnAdjustColumnSizing,_fnVisibleToColumnIndex,_fnColumnIndexToVisible,_fnVisbleColumns,_fnGetColumns,_fnColumnTypes,_fnApplyColumnDefs,_fnHungarianMap,_fnCamelToHungarian,_fnLanguageCompat,_fnBrowserDetect,_fnAddData,_fnAddTr,_fnNodeToDataIndex,_fnNodeToColumnIndex,_fnGetCellData,_fnSetCellData,_fnSplitObjNotation,_fnGetObjectDataFn,_fnSetObjectDataFn,_fnGetDataMaster,_fnClearTable,_fnDeleteIndex,_fnInvalidate,_fnGetRowElements,_fnCreateTr,_fnBuildHead,_fnDrawHead,_fnDraw,_fnReDraw,_fnAddOptionsHtml,_fnDetectHeader,_fnGetUniqueThs,_fnFeatureHtmlFilter,_fnFilterComplete,_fnFilterCustom,_fnFilterColumn,_fnFilter,_fnFilterCreateSearch,_fnEscapeRegex,_fnFilterData,_fnFeatureHtmlInfo,_fnUpdateInfo,_fnInfoMacros,_fnInitialise,_fnInitComplete,_fnLengthChange,_fnFeatureHtmlLength,_fnFeatureHtmlPaginate,_fnPageChange,_fnFeatureHtmlProcessing,_fnProcessingDisplay,_fnFeatureHtmlTable,_fnScrollDraw,_fnApplyToChildren,_fnCalculateColumnWidths,_fnThrottle,_fnConvertToWidth,_fnGetWidestNode,_fnGetMaxLenString,_fnStringToCss,_fnSortFlatten,_fnSort,_fnSortAria,_fnSortListener,_fnSortAttachListener,_fnSortingClasses,_fnSortData,_fnSaveState,_fnLoadState,_fnSettingsFromNode,_fnLog,_fnMap,_fnBindAction,_fnCallbackReg,_fnCallbackFire,_fnLengthOverflow,_fnRenderer,_fnDataSource,_fnRowAttributes*/
+
+(function( factory ) {
+ "use strict";
+
+ if ( typeof define === 'function' && define.amd ) {
+ // AMD
+ define( ['jquery'], function ( $ ) {
+ return factory( $, window, document );
+ } );
+ }
+ else if ( typeof exports === 'object' ) {
+ // CommonJS
+ module.exports = function (root, $) {
+ if ( ! root ) {
+ // CommonJS environments without a window global must pass a
+ // root. This will give an error otherwise
+ root = window;
+ }
+
+ if ( ! $ ) {
+ $ = typeof window !== 'undefined' ? // jQuery's factory checks for a global window
+ require('jquery') :
+ require('jquery')( root );
+ }
+
+ return factory( $, root, root.document );
+ };
+ }
+ else {
+ // Browser
+ factory( jQuery, window, document );
+ }
+}
+(function( $, window, document, undefined ) {
+ "use strict";
+
+ /**
+ * DataTables is a plug-in for the jQuery Javascript library. It is a highly
+ * flexible tool, based upon the foundations of progressive enhancement,
+ * which will add advanced interaction controls to any HTML table. For a
+ * full list of features please refer to
+ * [DataTables.net](href="http://datatables.net).
+ *
+ * Note that the `DataTable` object is not a global variable but is aliased
+ * to `jQuery.fn.DataTable` and `jQuery.fn.dataTable` through which it may
+ * be accessed.
+ *
+ * @class
+ * @param {object} [init={}] Configuration object for DataTables. Options
+ * are defined by {@link DataTable.defaults}
+ * @requires jQuery 1.7+
+ *
+ * @example
+ * // Basic initialisation
+ * $(document).ready( function {
+ * $('#example').dataTable();
+ * } );
+ *
+ * @example
+ * // Initialisation with configuration options - in this case, disable
+ * // pagination and sorting.
+ * $(document).ready( function {
+ * $('#example').dataTable( {
+ * "paginate": false,
+ * "sort": false
+ * } );
+ * } );
+ */
+ var DataTable;
+
+
+ /*
+ * It is useful to have variables which are scoped locally so only the
+ * DataTables functions can access them and they don't leak into global space.
+ * At the same time these functions are often useful over multiple files in the
+ * core and API, so we list, or at least document, all variables which are used
+ * by DataTables as private variables here. This also ensures that there is no
+ * clashing of variable names and that they can easily referenced for reuse.
+ */
+
+
+ // Defined else where
+ // _selector_run
+ // _selector_opts
+ // _selector_first
+ // _selector_row_indexes
+
+ var _ext; // DataTable.ext
+ var _Api; // DataTable.Api
+ var _api_register; // DataTable.Api.register
+ var _api_registerPlural; // DataTable.Api.registerPlural
+
+ var _re_dic = {};
+ var _re_new_lines = /[\r\n]/g;
+ var _re_html = /<.*?>/g;
+ var _re_date_start = /^[\w\+\-]/;
+ var _re_date_end = /[\w\+\-]$/;
+
+ // Escape regular expression special characters
+ var _re_escape_regex = new RegExp( '(\\' + [ '/', '.', '*', '+', '?', '|', '(', ')', '[', ']', '{', '}', '\\', '$', '^', '-' ].join('|\\') + ')', 'g' );
+
+ // http://en.wikipedia.org/wiki/Foreign_exchange_market
+ // - \u20BD - Russian ruble.
+ // - \u20a9 - South Korean Won
+ // - \u20BA - Turkish Lira
+ // - \u20B9 - Indian Rupee
+ // - R - Brazil (R$) and South Africa
+ // - fr - Swiss Franc
+ // - kr - Swedish krona, Norwegian krone and Danish krone
+ // - \u2009 is thin space and \u202F is narrow no-break space, both used in many
+ // standards as thousands separators.
+ var _re_formatted_numeric = /[',$£€¥%\u2009\u202F\u20BD\u20a9\u20BArfk]/gi;
+
+
+ var _empty = function ( d ) {
+ return !d || d === true || d === '-' ? true : false;
+ };
+
+
+ var _intVal = function ( s ) {
+ var integer = parseInt( s, 10 );
+ return !isNaN(integer) && isFinite(s) ? integer : null;
+ };
+
+ // Convert from a formatted number with characters other than `.` as the
+ // decimal place, to a Javascript number
+ var _numToDecimal = function ( num, decimalPoint ) {
+ // Cache created regular expressions for speed as this function is called often
+ if ( ! _re_dic[ decimalPoint ] ) {
+ _re_dic[ decimalPoint ] = new RegExp( _fnEscapeRegex( decimalPoint ), 'g' );
+ }
+ return typeof num === 'string' && decimalPoint !== '.' ?
+ num.replace( /\./g, '' ).replace( _re_dic[ decimalPoint ], '.' ) :
+ num;
+ };
+
+
+ var _isNumber = function ( d, decimalPoint, formatted ) {
+ var strType = typeof d === 'string';
+
+ // If empty return immediately so there must be a number if it is a
+ // formatted string (this stops the string "k", or "kr", etc being detected
+ // as a formatted number for currency
+ if ( _empty( d ) ) {
+ return true;
+ }
+
+ if ( decimalPoint && strType ) {
+ d = _numToDecimal( d, decimalPoint );
+ }
+
+ if ( formatted && strType ) {
+ d = d.replace( _re_formatted_numeric, '' );
+ }
+
+ return !isNaN( parseFloat(d) ) && isFinite( d );
+ };
+
+
+ // A string without HTML in it can be considered to be HTML still
+ var _isHtml = function ( d ) {
+ return _empty( d ) || typeof d === 'string';
+ };
+
+
+ var _htmlNumeric = function ( d, decimalPoint, formatted ) {
+ if ( _empty( d ) ) {
+ return true;
+ }
+
+ var html = _isHtml( d );
+ return ! html ?
+ null :
+ _isNumber( _stripHtml( d ), decimalPoint, formatted ) ?
+ true :
+ null;
+ };
+
+
+ var _pluck = function ( a, prop, prop2 ) {
+ var out = [];
+ var i=0, ien=a.length;
+
+ // Could have the test in the loop for slightly smaller code, but speed
+ // is essential here
+ if ( prop2 !== undefined ) {
+ for ( ; i<ien ; i++ ) {
+ if ( a[i] && a[i][ prop ] ) {
+ out.push( a[i][ prop ][ prop2 ] );
+ }
+ }
+ }
+ else {
+ for ( ; i<ien ; i++ ) {
+ if ( a[i] ) {
+ out.push( a[i][ prop ] );
+ }
+ }
+ }
+
+ return out;
+ };
+
+
+ // Basically the same as _pluck, but rather than looping over `a` we use `order`
+ // as the indexes to pick from `a`
+ var _pluck_order = function ( a, order, prop, prop2 )
+ {
+ var out = [];
+ var i=0, ien=order.length;
+
+ // Could have the test in the loop for slightly smaller code, but speed
+ // is essential here
+ if ( prop2 !== undefined ) {
+ for ( ; i<ien ; i++ ) {
+ if ( a[ order[i] ][ prop ] ) {
+ out.push( a[ order[i] ][ prop ][ prop2 ] );
+ }
+ }
+ }
+ else {
+ for ( ; i<ien ; i++ ) {
+ out.push( a[ order[i] ][ prop ] );
+ }
+ }
+
+ return out;
+ };
+
+
+ var _range = function ( len, start )
+ {
+ var out = [];
+ var end;
+
+ if ( start === undefined ) {
+ start = 0;
+ end = len;
+ }
+ else {
+ end = start;
+ start = len;
+ }
+
+ for ( var i=start ; i<end ; i++ ) {
+ out.push( i );
+ }
+
+ return out;
+ };
+
+
+ var _removeEmpty = function ( a )
+ {
+ var out = [];
+
+ for ( var i=0, ien=a.length ; i<ien ; i++ ) {
+ if ( a[i] ) { // careful - will remove all falsy values!
+ out.push( a[i] );
+ }
+ }
+
+ return out;
+ };
+
+
+ var _stripHtml = function ( d ) {
+ return d.replace( _re_html, '' );
+ };
+
+
+ /**
+ * Find the unique elements in a source array.
+ *
+ * @param {array} src Source array
+ * @return {array} Array of unique items
+ * @ignore
+ */
+ var _unique = function ( src )
+ {
+ // A faster unique method is to use object keys to identify used values,
+ // but this doesn't work with arrays or objects, which we must also
+ // consider. See jsperf.com/compare-array-unique-versions/4 for more
+ // information.
+ var
+ out = [],
+ val,
+ i, ien=src.length,
+ j, k=0;
+
+ again: for ( i=0 ; i<ien ; i++ ) {
+ val = src[i];
+
+ for ( j=0 ; j<k ; j++ ) {
+ if ( out[j] === val ) {
+ continue again;
+ }
+ }
+
+ out.push( val );
+ k++;
+ }
+
+ return out;
+ };
+
+
+
+ /**
+ * Create a mapping object that allows camel case parameters to be looked up
+ * for their Hungarian counterparts. The mapping is stored in a private
+ * parameter called `_hungarianMap` which can be accessed on the source object.
+ * @param {object} o
+ * @memberof DataTable#oApi
+ */
+ function _fnHungarianMap ( o )
+ {
+ var
+ hungarian = 'a aa ai ao as b fn i m o s ',
+ match,
+ newKey,
+ map = {};
+
+ $.each( o, function (key, val) {
+ match = key.match(/^([^A-Z]+?)([A-Z])/);
+
+ if ( match && hungarian.indexOf(match[1]+' ') !== -1 )
+ {
+ newKey = key.replace( match[0], match[2].toLowerCase() );
+ map[ newKey ] = key;
+
+ if ( match[1] === 'o' )
+ {
+ _fnHungarianMap( o[key] );
+ }
+ }
+ } );
+
+ o._hungarianMap = map;
+ }
+
+
+ /**
+ * Convert from camel case parameters to Hungarian, based on a Hungarian map
+ * created by _fnHungarianMap.
+ * @param {object} src The model object which holds all parameters that can be
+ * mapped.
+ * @param {object} user The object to convert from camel case to Hungarian.
+ * @param {boolean} force When set to `true`, properties which already have a
+ * Hungarian value in the `user` object will be overwritten. Otherwise they
+ * won't be.
+ * @memberof DataTable#oApi
+ */
+ function _fnCamelToHungarian ( src, user, force )
+ {
+ if ( ! src._hungarianMap ) {
+ _fnHungarianMap( src );
+ }
+
+ var hungarianKey;
+
+ $.each( user, function (key, val) {
+ hungarianKey = src._hungarianMap[ key ];
+
+ if ( hungarianKey !== undefined && (force || user[hungarianKey] === undefined) )
+ {
+ // For objects, we need to buzz down into the object to copy parameters
+ if ( hungarianKey.charAt(0) === 'o' )
+ {
+ // Copy the camelCase options over to the hungarian
+ if ( ! user[ hungarianKey ] ) {
+ user[ hungarianKey ] = {};
+ }
+ $.extend( true, user[hungarianKey], user[key] );
+
+ _fnCamelToHungarian( src[hungarianKey], user[hungarianKey], force );
+ }
+ else {
+ user[hungarianKey] = user[ key ];
+ }
+ }
+ } );
+ }
+
+
+ /**
+ * Language compatibility - when certain options are given, and others aren't, we
+ * need to duplicate the values over, in order to provide backwards compatibility
+ * with older language files.
+ * @param {object} oSettings dataTables settings object
+ * @memberof DataTable#oApi
+ */
+ function _fnLanguageCompat( lang )
+ {
+ var defaults = DataTable.defaults.oLanguage;
+ var zeroRecords = lang.sZeroRecords;
+
+ /* Backwards compatibility - if there is no sEmptyTable given, then use the same as
+ * sZeroRecords - assuming that is given.
+ */
+ if ( ! lang.sEmptyTable && zeroRecords &&
+ defaults.sEmptyTable === "No data available in table" )
+ {
+ _fnMap( lang, lang, 'sZeroRecords', 'sEmptyTable' );
+ }
+
+ /* Likewise with loading records */
+ if ( ! lang.sLoadingRecords && zeroRecords &&
+ defaults.sLoadingRecords === "Loading..." )
+ {
+ _fnMap( lang, lang, 'sZeroRecords', 'sLoadingRecords' );
+ }
+
+ // Old parameter name of the thousands separator mapped onto the new
+ if ( lang.sInfoThousands ) {
+ lang.sThousands = lang.sInfoThousands;
+ }
+
+ var decimal = lang.sDecimal;
+ if ( decimal ) {
+ _addNumericSort( decimal );
+ }
+ }
+
+
+ /**
+ * Map one parameter onto another
+ * @param {object} o Object to map
+ * @param {*} knew The new parameter name
+ * @param {*} old The old parameter name
+ */
+ var _fnCompatMap = function ( o, knew, old ) {
+ if ( o[ knew ] !== undefined ) {
+ o[ old ] = o[ knew ];
+ }
+ };
+
+
+ /**
+ * Provide backwards compatibility for the main DT options. Note that the new
+ * options are mapped onto the old parameters, so this is an external interface
+ * change only.
+ * @param {object} init Object to map
+ */
+ function _fnCompatOpts ( init )
+ {
+ _fnCompatMap( init, 'ordering', 'bSort' );
+ _fnCompatMap( init, 'orderMulti', 'bSortMulti' );
+ _fnCompatMap( init, 'orderClasses', 'bSortClasses' );
+ _fnCompatMap( init, 'orderCellsTop', 'bSortCellsTop' );
+ _fnCompatMap( init, 'order', 'aaSorting' );
+ _fnCompatMap( init, 'orderFixed', 'aaSortingFixed' );
+ _fnCompatMap( init, 'paging', 'bPaginate' );
+ _fnCompatMap( init, 'pagingType', 'sPaginationType' );
+ _fnCompatMap( init, 'pageLength', 'iDisplayLength' );
+ _fnCompatMap( init, 'searching', 'bFilter' );
+
+ // Boolean initialisation of x-scrolling
+ if ( typeof init.sScrollX === 'boolean' ) {
+ init.sScrollX = init.sScrollX ? '100%' : '';
+ }
+ if ( typeof init.scrollX === 'boolean' ) {
+ init.scrollX = init.scrollX ? '100%' : '';
+ }
+
+ // Column search objects are in an array, so it needs to be converted
+ // element by element
+ var searchCols = init.aoSearchCols;
+
+ if ( searchCols ) {
+ for ( var i=0, ien=searchCols.length ; i<ien ; i++ ) {
+ if ( searchCols[i] ) {
+ _fnCamelToHungarian( DataTable.models.oSearch, searchCols[i] );
+ }
+ }
+ }
+ }
+
+
+ /**
+ * Provide backwards compatibility for column options. Note that the new options
+ * are mapped onto the old parameters, so this is an external interface change
+ * only.
+ * @param {object} init Object to map
+ */
+ function _fnCompatCols ( init )
+ {
+ _fnCompatMap( init, 'orderable', 'bSortable' );
+ _fnCompatMap( init, 'orderData', 'aDataSort' );
+ _fnCompatMap( init, 'orderSequence', 'asSorting' );
+ _fnCompatMap( init, 'orderDataType', 'sortDataType' );
+
+ // orderData can be given as an integer
+ var dataSort = init.aDataSort;
+ if ( dataSort && ! $.isArray( dataSort ) ) {
+ init.aDataSort = [ dataSort ];
+ }
+ }
+
+
+ /**
+ * Browser feature detection for capabilities, quirks
+ * @param {object} settings dataTables settings object
+ * @memberof DataTable#oApi
+ */
+ function _fnBrowserDetect( settings )
+ {
+ // We don't need to do this every time DataTables is constructed, the values
+ // calculated are specific to the browser and OS configuration which we
+ // don't expect to change between initialisations
+ if ( ! DataTable.__browser ) {
+ var browser = {};
+ DataTable.__browser = browser;
+
+ // Scrolling feature / quirks detection
+ var n = $('<div/>')
+ .css( {
+ position: 'fixed',
+ top: 0,
+ left: 0,
+ height: 1,
+ width: 1,
+ overflow: 'hidden'
+ } )
+ .append(
+ $('<div/>')
+ .css( {
+ position: 'absolute',
+ top: 1,
+ left: 1,
+ width: 100,
+ overflow: 'scroll'
+ } )
+ .append(
+ $('<div/>')
+ .css( {
+ width: '100%',
+ height: 10
+ } )
+ )
+ )
+ .appendTo( 'body' );
+
+ var outer = n.children();
+ var inner = outer.children();
+
+ // Numbers below, in order, are:
+ // inner.offsetWidth, inner.clientWidth, outer.offsetWidth, outer.clientWidth
+ //
+ // IE6 XP: 100 100 100 83
+ // IE7 Vista: 100 100 100 83
+ // IE 8+ Windows: 83 83 100 83
+ // Evergreen Windows: 83 83 100 83
+ // Evergreen Mac with scrollbars: 85 85 100 85
+ // Evergreen Mac without scrollbars: 100 100 100 100
+
+ // Get scrollbar width
+ browser.barWidth = outer[0].offsetWidth - outer[0].clientWidth;
+
+ // IE6/7 will oversize a width 100% element inside a scrolling element, to
+ // include the width of the scrollbar, while other browsers ensure the inner
+ // element is contained without forcing scrolling
+ browser.bScrollOversize = inner[0].offsetWidth === 100 && outer[0].clientWidth !== 100;
+
+ // In rtl text layout, some browsers (most, but not all) will place the
+ // scrollbar on the left, rather than the right.
+ browser.bScrollbarLeft = Math.round( inner.offset().left ) !== 1;
+
+ // IE8- don't provide height and width for getBoundingClientRect
+ browser.bBounding = n[0].getBoundingClientRect().width ? true : false;
+
+ n.remove();
+ }
+
+ $.extend( settings.oBrowser, DataTable.__browser );
+ settings.oScroll.iBarWidth = DataTable.__browser.barWidth;
+ }
+
+
+ /**
+ * Array.prototype reduce[Right] method, used for browsers which don't support
+ * JS 1.6. Done this way to reduce code size, since we iterate either way
+ * @param {object} settings dataTables settings object
+ * @memberof DataTable#oApi
+ */
+ function _fnReduce ( that, fn, init, start, end, inc )
+ {
+ var
+ i = start,
+ value,
+ isSet = false;
+
+ if ( init !== undefined ) {
+ value = init;
+ isSet = true;
+ }
+
+ while ( i !== end ) {
+ if ( ! that.hasOwnProperty(i) ) {
+ continue;
+ }
+
+ value = isSet ?
+ fn( value, that[i], i, that ) :
+ that[i];
+
+ isSet = true;
+ i += inc;
+ }
+
+ return value;
+ }
+
+ /**
+ * Add a column to the list used for the table with default values
+ * @param {object} oSettings dataTables settings object
+ * @param {node} nTh The th element for this column
+ * @memberof DataTable#oApi
+ */
+ function _fnAddColumn( oSettings, nTh )
+ {
+ // Add column to aoColumns array
+ var oDefaults = DataTable.defaults.column;
+ var iCol = oSettings.aoColumns.length;
+ var oCol = $.extend( {}, DataTable.models.oColumn, oDefaults, {
+ "nTh": nTh ? nTh : document.createElement('th'),
+ "sTitle": oDefaults.sTitle ? oDefaults.sTitle : nTh ? nTh.innerHTML : '',
+ "aDataSort": oDefaults.aDataSort ? oDefaults.aDataSort : [iCol],
+ "mData": oDefaults.mData ? oDefaults.mData : iCol,
+ idx: iCol
+ } );
+ oSettings.aoColumns.push( oCol );
+
+ // Add search object for column specific search. Note that the `searchCols[ iCol ]`
+ // passed into extend can be undefined. This allows the user to give a default
+ // with only some of the parameters defined, and also not give a default
+ var searchCols = oSettings.aoPreSearchCols;
+ searchCols[ iCol ] = $.extend( {}, DataTable.models.oSearch, searchCols[ iCol ] );
+
+ // Use the default column options function to initialise classes etc
+ _fnColumnOptions( oSettings, iCol, $(nTh).data() );
+ }
+
+
+ /**
+ * Apply options for a column
+ * @param {object} oSettings dataTables settings object
+ * @param {int} iCol column index to consider
+ * @param {object} oOptions object with sType, bVisible and bSearchable etc
+ * @memberof DataTable#oApi
+ */
+ function _fnColumnOptions( oSettings, iCol, oOptions )
+ {
+ var oCol = oSettings.aoColumns[ iCol ];
+ var oClasses = oSettings.oClasses;
+ var th = $(oCol.nTh);
+
+ // Try to get width information from the DOM. We can't get it from CSS
+ // as we'd need to parse the CSS stylesheet. `width` option can override
+ if ( ! oCol.sWidthOrig ) {
+ // Width attribute
+ oCol.sWidthOrig = th.attr('width') || null;
+
+ // Style attribute
+ var t = (th.attr('style') || '').match(/width:\s*(\d+[pxem%]+)/);
+ if ( t ) {
+ oCol.sWidthOrig = t[1];
+ }
+ }
+
+ /* User specified column options */
+ if ( oOptions !== undefined && oOptions !== null )
+ {
+ // Backwards compatibility
+ _fnCompatCols( oOptions );
+
+ // Map camel case parameters to their Hungarian counterparts
+ _fnCamelToHungarian( DataTable.defaults.column, oOptions );
+
+ /* Backwards compatibility for mDataProp */
+ if ( oOptions.mDataProp !== undefined && !oOptions.mData )
+ {
+ oOptions.mData = oOptions.mDataProp;
+ }
+
+ if ( oOptions.sType )
+ {
+ oCol._sManualType = oOptions.sType;
+ }
+
+ // `class` is a reserved word in Javascript, so we need to provide
+ // the ability to use a valid name for the camel case input
+ if ( oOptions.className && ! oOptions.sClass )
+ {
+ oOptions.sClass = oOptions.className;
+ }
+
+ $.extend( oCol, oOptions );
+ _fnMap( oCol, oOptions, "sWidth", "sWidthOrig" );
+
+ /* iDataSort to be applied (backwards compatibility), but aDataSort will take
+ * priority if defined
+ */
+ if ( oOptions.iDataSort !== undefined )
+ {
+ oCol.aDataSort = [ oOptions.iDataSort ];
+ }
+ _fnMap( oCol, oOptions, "aDataSort" );
+ }
+
+ /* Cache the data get and set functions for speed */
+ var mDataSrc = oCol.mData;
+ var mData = _fnGetObjectDataFn( mDataSrc );
+ var mRender = oCol.mRender ? _fnGetObjectDataFn( oCol.mRender ) : null;
+
+ var attrTest = function( src ) {
+ return typeof src === 'string' && src.indexOf('@') !== -1;
+ };
+ oCol._bAttrSrc = $.isPlainObject( mDataSrc ) && (
+ attrTest(mDataSrc.sort) || attrTest(mDataSrc.type) || attrTest(mDataSrc.filter)
+ );
+
+ oCol.fnGetData = function (rowData, type, meta) {
+ var innerData = mData( rowData, type, undefined, meta );
+
+ return mRender && type ?
+ mRender( innerData, type, rowData, meta ) :
+ innerData;
+ };
+ oCol.fnSetData = function ( rowData, val, meta ) {
+ return _fnSetObjectDataFn( mDataSrc )( rowData, val, meta );
+ };
+
+ // Indicate if DataTables should read DOM data as an object or array
+ // Used in _fnGetRowElements
+ if ( typeof mDataSrc !== 'number' ) {
+ oSettings._rowReadObject = true;
+ }
+
+ /* Feature sorting overrides column specific when off */
+ if ( !oSettings.oFeatures.bSort )
+ {
+ oCol.bSortable = false;
+ th.addClass( oClasses.sSortableNone ); // Have to add class here as order event isn't called
+ }
+
+ /* Check that the class assignment is correct for sorting */
+ var bAsc = $.inArray('asc', oCol.asSorting) !== -1;
+ var bDesc = $.inArray('desc', oCol.asSorting) !== -1;
+ if ( !oCol.bSortable || (!bAsc && !bDesc) )
+ {
+ oCol.sSortingClass = oClasses.sSortableNone;
+ oCol.sSortingClassJUI = "";
+ }
+ else if ( bAsc && !bDesc )
+ {
+ oCol.sSortingClass = oClasses.sSortableAsc;
+ oCol.sSortingClassJUI = oClasses.sSortJUIAscAllowed;
+ }
+ else if ( !bAsc && bDesc )
+ {
+ oCol.sSortingClass = oClasses.sSortableDesc;
+ oCol.sSortingClassJUI = oClasses.sSortJUIDescAllowed;
+ }
+ else
+ {
+ oCol.sSortingClass = oClasses.sSortable;
+ oCol.sSortingClassJUI = oClasses.sSortJUI;
+ }
+ }
+
+
+ /**
+ * Adjust the table column widths for new data. Note: you would probably want to
+ * do a redraw after calling this function!
+ * @param {object} settings dataTables settings object
+ * @memberof DataTable#oApi
+ */
+ function _fnAdjustColumnSizing ( settings )
+ {
+ /* Not interested in doing column width calculation if auto-width is disabled */
+ if ( settings.oFeatures.bAutoWidth !== false )
+ {
+ var columns = settings.aoColumns;
+
+ _fnCalculateColumnWidths( settings );
+ for ( var i=0 , iLen=columns.length ; i<iLen ; i++ )
+ {
+ columns[i].nTh.style.width = columns[i].sWidth;
+ }
+ }
+
+ var scroll = settings.oScroll;
+ if ( scroll.sY !== '' || scroll.sX !== '')
+ {
+ _fnScrollDraw( settings );
+ }
+
+ _fnCallbackFire( settings, null, 'column-sizing', [settings] );
+ }
+
+
+ /**
+ * Covert the index of a visible column to the index in the data array (take account
+ * of hidden columns)
+ * @param {object} oSettings dataTables settings object
+ * @param {int} iMatch Visible column index to lookup
+ * @returns {int} i the data index
+ * @memberof DataTable#oApi
+ */
+ function _fnVisibleToColumnIndex( oSettings, iMatch )
+ {
+ var aiVis = _fnGetColumns( oSettings, 'bVisible' );
+
+ return typeof aiVis[iMatch] === 'number' ?
+ aiVis[iMatch] :
+ null;
+ }
+
+
+ /**
+ * Covert the index of an index in the data array and convert it to the visible
+ * column index (take account of hidden columns)
+ * @param {int} iMatch Column index to lookup
+ * @param {object} oSettings dataTables settings object
+ * @returns {int} i the data index
+ * @memberof DataTable#oApi
+ */
+ function _fnColumnIndexToVisible( oSettings, iMatch )
+ {
+ var aiVis = _fnGetColumns( oSettings, 'bVisible' );
+ var iPos = $.inArray( iMatch, aiVis );
+
+ return iPos !== -1 ? iPos : null;
+ }
+
+
+ /**
+ * Get the number of visible columns
+ * @param {object} oSettings dataTables settings object
+ * @returns {int} i the number of visible columns
+ * @memberof DataTable#oApi
+ */
+ function _fnVisbleColumns( oSettings )
+ {
+ return _fnGetColumns( oSettings, 'bVisible' ).length;
+ }
+
+
+ /**
+ * Get an array of column indexes that match a given property
+ * @param {object} oSettings dataTables settings object
+ * @param {string} sParam Parameter in aoColumns to look for - typically
+ * bVisible or bSearchable
+ * @returns {array} Array of indexes with matched properties
+ * @memberof DataTable#oApi
+ */
+ function _fnGetColumns( oSettings, sParam )
+ {
+ var a = [];
+
+ $.map( oSettings.aoColumns, function(val, i) {
+ if ( val[sParam] ) {
+ a.push( i );
+ }
+ } );
+
+ return a;
+ }
+
+
+ /**
+ * Calculate the 'type' of a column
+ * @param {object} settings dataTables settings object
+ * @memberof DataTable#oApi
+ */
+ function _fnColumnTypes ( settings )
+ {
+ var columns = settings.aoColumns;
+ var data = settings.aoData;
+ var types = DataTable.ext.type.detect;
+ var i, ien, j, jen, k, ken;
+ var col, cell, detectedType, cache;
+
+ // For each column, spin over the
+ for ( i=0, ien=columns.length ; i<ien ; i++ ) {
+ col = columns[i];
+ cache = [];
+
+ if ( ! col.sType && col._sManualType ) {
+ col.sType = col._sManualType;
+ }
+ else if ( ! col.sType ) {
+ for ( j=0, jen=types.length ; j<jen ; j++ ) {
+ for ( k=0, ken=data.length ; k<ken ; k++ ) {
+ // Use a cache array so we only need to get the type data
+ // from the formatter once (when using multiple detectors)
+ if ( cache[k] === undefined ) {
+ cache[k] = _fnGetCellData( settings, k, i, 'type' );
+ }
+
+ detectedType = types[j]( cache[k], settings );
+
+ // If null, then this type can't apply to this column, so
+ // rather than testing all cells, break out. There is an
+ // exception for the last type which is `html`. We need to
+ // scan all rows since it is possible to mix string and HTML
+ // types
+ if ( ! detectedType && j !== types.length-1 ) {
+ break;
+ }
+
+ // Only a single match is needed for html type since it is
+ // bottom of the pile and very similar to string
+ if ( detectedType === 'html' ) {
+ break;
+ }
+ }
+
+ // Type is valid for all data points in the column - use this
+ // type
+ if ( detectedType ) {
+ col.sType = detectedType;
+ break;
+ }
+ }
+
+ // Fall back - if no type was detected, always use string
+ if ( ! col.sType ) {
+ col.sType = 'string';
+ }
+ }
+ }
+ }
+
+
+ /**
+ * Take the column definitions and static columns arrays and calculate how
+ * they relate to column indexes. The callback function will then apply the
+ * definition found for a column to a suitable configuration object.
+ * @param {object} oSettings dataTables settings object
+ * @param {array} aoColDefs The aoColumnDefs array that is to be applied
+ * @param {array} aoCols The aoColumns array that defines columns individually
+ * @param {function} fn Callback function - takes two parameters, the calculated
+ * column index and the definition for that column.
+ * @memberof DataTable#oApi
+ */
+ function _fnApplyColumnDefs( oSettings, aoColDefs, aoCols, fn )
+ {
+ var i, iLen, j, jLen, k, kLen, def;
+ var columns = oSettings.aoColumns;
+
+ // Column definitions with aTargets
+ if ( aoColDefs )
+ {
+ /* Loop over the definitions array - loop in reverse so first instance has priority */
+ for ( i=aoColDefs.length-1 ; i>=0 ; i-- )
+ {
+ def = aoColDefs[i];
+
+ /* Each definition can target multiple columns, as it is an array */
+ var aTargets = def.targets !== undefined ?
+ def.targets :
+ def.aTargets;
+
+ if ( ! $.isArray( aTargets ) )
+ {
+ aTargets = [ aTargets ];
+ }
+
+ for ( j=0, jLen=aTargets.length ; j<jLen ; j++ )
+ {
+ if ( typeof aTargets[j] === 'number' && aTargets[j] >= 0 )
+ {
+ /* Add columns that we don't yet know about */
+ while( columns.length <= aTargets[j] )
+ {
+ _fnAddColumn( oSettings );
+ }
+
+ /* Integer, basic index */
+ fn( aTargets[j], def );
+ }
+ else if ( typeof aTargets[j] === 'number' && aTargets[j] < 0 )
+ {
+ /* Negative integer, right to left column counting */
+ fn( columns.length+aTargets[j], def );
+ }
+ else if ( typeof aTargets[j] === 'string' )
+ {
+ /* Class name matching on TH element */
+ for ( k=0, kLen=columns.length ; k<kLen ; k++ )
+ {
+ if ( aTargets[j] == "_all" ||
+ $(columns[k].nTh).hasClass( aTargets[j] ) )
+ {
+ fn( k, def );
+ }
+ }
+ }
+ }
+ }
+ }
+
+ // Statically defined columns array
+ if ( aoCols )
+ {
+ for ( i=0, iLen=aoCols.length ; i<iLen ; i++ )
+ {
+ fn( i, aoCols[i] );
+ }
+ }
+ }
+
+ /**
+ * Add a data array to the table, creating DOM node etc. This is the parallel to
+ * _fnGatherData, but for adding rows from a Javascript source, rather than a
+ * DOM source.
+ * @param {object} oSettings dataTables settings object
+ * @param {array} aData data array to be added
+ * @param {node} [nTr] TR element to add to the table - optional. If not given,
+ * DataTables will create a row automatically
+ * @param {array} [anTds] Array of TD|TH elements for the row - must be given
+ * if nTr is.
+ * @returns {int} >=0 if successful (index of new aoData entry), -1 if failed
+ * @memberof DataTable#oApi
+ */
+ function _fnAddData ( oSettings, aDataIn, nTr, anTds )
+ {
+ /* Create the object for storing information about this new row */
+ var iRow = oSettings.aoData.length;
+ var oData = $.extend( true, {}, DataTable.models.oRow, {
+ src: nTr ? 'dom' : 'data',
+ idx: iRow
+ } );
+
+ oData._aData = aDataIn;
+ oSettings.aoData.push( oData );
+
+ /* Create the cells */
+ var nTd, sThisType;
+ var columns = oSettings.aoColumns;
+
+ // Invalidate the column types as the new data needs to be revalidated
+ for ( var i=0, iLen=columns.length ; i<iLen ; i++ )
+ {
+ columns[i].sType = null;
+ }
+
+ /* Add to the display array */
+ oSettings.aiDisplayMaster.push( iRow );
+
+ var id = oSettings.rowIdFn( aDataIn );
+ if ( id !== undefined ) {
+ oSettings.aIds[ id ] = oData;
+ }
+
+ /* Create the DOM information, or register it if already present */
+ if ( nTr || ! oSettings.oFeatures.bDeferRender )
+ {
+ _fnCreateTr( oSettings, iRow, nTr, anTds );
+ }
+
+ return iRow;
+ }
+
+
+ /**
+ * Add one or more TR elements to the table. Generally we'd expect to
+ * use this for reading data from a DOM sourced table, but it could be
+ * used for an TR element. Note that if a TR is given, it is used (i.e.
+ * it is not cloned).
+ * @param {object} settings dataTables settings object
+ * @param {array|node|jQuery} trs The TR element(s) to add to the table
+ * @returns {array} Array of indexes for the added rows
+ * @memberof DataTable#oApi
+ */
+ function _fnAddTr( settings, trs )
+ {
+ var row;
+
+ // Allow an individual node to be passed in
+ if ( ! (trs instanceof $) ) {
+ trs = $(trs);
+ }
+
+ return trs.map( function (i, el) {
+ row = _fnGetRowElements( settings, el );
+ return _fnAddData( settings, row.data, el, row.cells );
+ } );
+ }
+
+
+ /**
+ * Take a TR element and convert it to an index in aoData
+ * @param {object} oSettings dataTables settings object
+ * @param {node} n the TR element to find
+ * @returns {int} index if the node is found, null if not
+ * @memberof DataTable#oApi
+ */
+ function _fnNodeToDataIndex( oSettings, n )
+ {
+ return (n._DT_RowIndex!==undefined) ? n._DT_RowIndex : null;
+ }
+
+
+ /**
+ * Take a TD element and convert it into a column data index (not the visible index)
+ * @param {object} oSettings dataTables settings object
+ * @param {int} iRow The row number the TD/TH can be found in
+ * @param {node} n The TD/TH element to find
+ * @returns {int} index if the node is found, -1 if not
+ * @memberof DataTable#oApi
+ */
+ function _fnNodeToColumnIndex( oSettings, iRow, n )
+ {
+ return $.inArray( n, oSettings.aoData[ iRow ].anCells );
+ }
+
+
+ /**
+ * Get the data for a given cell from the internal cache, taking into account data mapping
+ * @param {object} settings dataTables settings object
+ * @param {int} rowIdx aoData row id
+ * @param {int} colIdx Column index
+ * @param {string} type data get type ('display', 'type' 'filter' 'sort')
+ * @returns {*} Cell data
+ * @memberof DataTable#oApi
+ */
+ function _fnGetCellData( settings, rowIdx, colIdx, type )
+ {
+ var draw = settings.iDraw;
+ var col = settings.aoColumns[colIdx];
+ var rowData = settings.aoData[rowIdx]._aData;
+ var defaultContent = col.sDefaultContent;
+ var cellData = col.fnGetData( rowData, type, {
+ settings: settings,
+ row: rowIdx,
+ col: colIdx
+ } );
+
+ if ( cellData === undefined ) {
+ if ( settings.iDrawError != draw && defaultContent === null ) {
+ _fnLog( settings, 0, "Requested unknown parameter "+
+ (typeof col.mData=='function' ? '{function}' : "'"+col.mData+"'")+
+ " for row "+rowIdx+", column "+colIdx, 4 );
+ settings.iDrawError = draw;
+ }
+ return defaultContent;
+ }
+
+ /* When the data source is null, we can use default column data */
+ if ( (cellData === rowData || cellData === null) && defaultContent !== null ) {
+ cellData = defaultContent;
+ }
+ else if ( typeof cellData === 'function' ) {
+ // If the data source is a function, then we run it and use the return,
+ // executing in the scope of the data object (for instances)
+ return cellData.call( rowData );
+ }
+
+ if ( cellData === null && type == 'display' ) {
+ return '';
+ }
+ return cellData;
+ }
+
+
+ /**
+ * Set the value for a specific cell, into the internal data cache
+ * @param {object} settings dataTables settings object
+ * @param {int} rowIdx aoData row id
+ * @param {int} colIdx Column index
+ * @param {*} val Value to set
+ * @memberof DataTable#oApi
+ */
+ function _fnSetCellData( settings, rowIdx, colIdx, val )
+ {
+ var col = settings.aoColumns[colIdx];
+ var rowData = settings.aoData[rowIdx]._aData;
+
+ col.fnSetData( rowData, val, {
+ settings: settings,
+ row: rowIdx,
+ col: colIdx
+ } );
+ }
+
+
+ // Private variable that is used to match action syntax in the data property object
+ var __reArray = /\[.*?\]$/;
+ var __reFn = /\(\)$/;
+
+ /**
+ * Split string on periods, taking into account escaped periods
+ * @param {string} str String to split
+ * @return {array} Split string
+ */
+ function _fnSplitObjNotation( str )
+ {
+ return $.map( str.match(/(\\.|[^\.])+/g) || [''], function ( s ) {
+ return s.replace(/\\./g, '.');
+ } );
+ }
+
+
+ /**
+ * Return a function that can be used to get data from a source object, taking
+ * into account the ability to use nested objects as a source
+ * @param {string|int|function} mSource The data source for the object
+ * @returns {function} Data get function
+ * @memberof DataTable#oApi
+ */
+ function _fnGetObjectDataFn( mSource )
+ {
+ if ( $.isPlainObject( mSource ) )
+ {
+ /* Build an object of get functions, and wrap them in a single call */
+ var o = {};
+ $.each( mSource, function (key, val) {
+ if ( val ) {
+ o[key] = _fnGetObjectDataFn( val );
+ }
+ } );
+
+ return function (data, type, row, meta) {
+ var t = o[type] || o._;
+ return t !== undefined ?
+ t(data, type, row, meta) :
+ data;
+ };
+ }
+ else if ( mSource === null )
+ {
+ /* Give an empty string for rendering / sorting etc */
+ return function (data) { // type, row and meta also passed, but not used
+ return data;
+ };
+ }
+ else if ( typeof mSource === 'function' )
+ {
+ return function (data, type, row, meta) {
+ return mSource( data, type, row, meta );
+ };
+ }
+ else if ( typeof mSource === 'string' && (mSource.indexOf('.') !== -1 ||
+ mSource.indexOf('[') !== -1 || mSource.indexOf('(') !== -1) )
+ {
+ /* If there is a . in the source string then the data source is in a
+ * nested object so we loop over the data for each level to get the next
+ * level down. On each loop we test for undefined, and if found immediately
+ * return. This allows entire objects to be missing and sDefaultContent to
+ * be used if defined, rather than throwing an error
+ */
+ var fetchData = function (data, type, src) {
+ var arrayNotation, funcNotation, out, innerSrc;
+
+ if ( src !== "" )
+ {
+ var a = _fnSplitObjNotation( src );
+
+ for ( var i=0, iLen=a.length ; i<iLen ; i++ )
+ {
+ // Check if we are dealing with special notation
+ arrayNotation = a[i].match(__reArray);
+ funcNotation = a[i].match(__reFn);
+
+ if ( arrayNotation )
+ {
+ // Array notation
+ a[i] = a[i].replace(__reArray, '');
+
+ // Condition allows simply [] to be passed in
+ if ( a[i] !== "" ) {
+ data = data[ a[i] ];
+ }
+ out = [];
+
+ // Get the remainder of the nested object to get
+ a.splice( 0, i+1 );
+ innerSrc = a.join('.');
+
+ // Traverse each entry in the array getting the properties requested
+ if ( $.isArray( data ) ) {
+ for ( var j=0, jLen=data.length ; j<jLen ; j++ ) {
+ out.push( fetchData( data[j], type, innerSrc ) );
+ }
+ }
+
+ // If a string is given in between the array notation indicators, that
+ // is used to join the strings together, otherwise an array is returned
+ var join = arrayNotation[0].substring(1, arrayNotation[0].length-1);
+ data = (join==="") ? out : out.join(join);
+
+ // The inner call to fetchData has already traversed through the remainder
+ // of the source requested, so we exit from the loop
+ break;
+ }
+ else if ( funcNotation )
+ {
+ // Function call
+ a[i] = a[i].replace(__reFn, '');
+ data = data[ a[i] ]();
+ continue;
+ }
+
+ if ( data === null || data[ a[i] ] === undefined )
+ {
+ return undefined;
+ }
+ data = data[ a[i] ];
+ }
+ }
+
+ return data;
+ };
+
+ return function (data, type) { // row and meta also passed, but not used
+ return fetchData( data, type, mSource );
+ };
+ }
+ else
+ {
+ /* Array or flat object mapping */
+ return function (data, type) { // row and meta also passed, but not used
+ return data[mSource];
+ };
+ }
+ }
+
+
+ /**
+ * Return a function that can be used to set data from a source object, taking
+ * into account the ability to use nested objects as a source
+ * @param {string|int|function} mSource The data source for the object
+ * @returns {function} Data set function
+ * @memberof DataTable#oApi
+ */
+ function _fnSetObjectDataFn( mSource )
+ {
+ if ( $.isPlainObject( mSource ) )
+ {
+ /* Unlike get, only the underscore (global) option is used for for
+ * setting data since we don't know the type here. This is why an object
+ * option is not documented for `mData` (which is read/write), but it is
+ * for `mRender` which is read only.
+ */
+ return _fnSetObjectDataFn( mSource._ );
+ }
+ else if ( mSource === null )
+ {
+ /* Nothing to do when the data source is null */
+ return function () {};
+ }
+ else if ( typeof mSource === 'function' )
+ {
+ return function (data, val, meta) {
+ mSource( data, 'set', val, meta );
+ };
+ }
+ else if ( typeof mSource === 'string' && (mSource.indexOf('.') !== -1 ||
+ mSource.indexOf('[') !== -1 || mSource.indexOf('(') !== -1) )
+ {
+ /* Like the get, we need to get data from a nested object */
+ var setData = function (data, val, src) {
+ var a = _fnSplitObjNotation( src ), b;
+ var aLast = a[a.length-1];
+ var arrayNotation, funcNotation, o, innerSrc;
+
+ for ( var i=0, iLen=a.length-1 ; i<iLen ; i++ )
+ {
+ // Check if we are dealing with an array notation request
+ arrayNotation = a[i].match(__reArray);
+ funcNotation = a[i].match(__reFn);
+
+ if ( arrayNotation )
+ {
+ a[i] = a[i].replace(__reArray, '');
+ data[ a[i] ] = [];
+
+ // Get the remainder of the nested object to set so we can recurse
+ b = a.slice();
+ b.splice( 0, i+1 );
+ innerSrc = b.join('.');
+
+ // Traverse each entry in the array setting the properties requested
+ if ( $.isArray( val ) )
+ {
+ for ( var j=0, jLen=val.length ; j<jLen ; j++ )
+ {
+ o = {};
+ setData( o, val[j], innerSrc );
+ data[ a[i] ].push( o );
+ }
+ }
+ else
+ {
+ // We've been asked to save data to an array, but it
+ // isn't array data to be saved. Best that can be done
+ // is to just save the value.
+ data[ a[i] ] = val;
+ }
+
+ // The inner call to setData has already traversed through the remainder
+ // of the source and has set the data, thus we can exit here
+ return;
+ }
+ else if ( funcNotation )
+ {
+ // Function call
+ a[i] = a[i].replace(__reFn, '');
+ data = data[ a[i] ]( val );
+ }
+
+ // If the nested object doesn't currently exist - since we are
+ // trying to set the value - create it
+ if ( data[ a[i] ] === null || data[ a[i] ] === undefined )
+ {
+ data[ a[i] ] = {};
+ }
+ data = data[ a[i] ];
+ }
+
+ // Last item in the input - i.e, the actual set
+ if ( aLast.match(__reFn ) )
+ {
+ // Function call
+ data = data[ aLast.replace(__reFn, '') ]( val );
+ }
+ else
+ {
+ // If array notation is used, we just want to strip it and use the property name
+ // and assign the value. If it isn't used, then we get the result we want anyway
+ data[ aLast.replace(__reArray, '') ] = val;
+ }
+ };
+
+ return function (data, val) { // meta is also passed in, but not used
+ return setData( data, val, mSource );
+ };
+ }
+ else
+ {
+ /* Array or flat object mapping */
+ return function (data, val) { // meta is also passed in, but not used
+ data[mSource] = val;
+ };
+ }
+ }
+
+
+ /**
+ * Return an array with the full table data
+ * @param {object} oSettings dataTables settings object
+ * @returns array {array} aData Master data array
+ * @memberof DataTable#oApi
+ */
+ function _fnGetDataMaster ( settings )
+ {
+ return _pluck( settings.aoData, '_aData' );
+ }
+
+
+ /**
+ * Nuke the table
+ * @param {object} oSettings dataTables settings object
+ * @memberof DataTable#oApi
+ */
+ function _fnClearTable( settings )
+ {
+ settings.aoData.length = 0;
+ settings.aiDisplayMaster.length = 0;
+ settings.aiDisplay.length = 0;
+ settings.aIds = {};
+ }
+
+
+ /**
+ * Take an array of integers (index array) and remove a target integer (value - not
+ * the key!)
+ * @param {array} a Index array to target
+ * @param {int} iTarget value to find
+ * @memberof DataTable#oApi
+ */
+ function _fnDeleteIndex( a, iTarget, splice )
+ {
+ var iTargetIndex = -1;
+
+ for ( var i=0, iLen=a.length ; i<iLen ; i++ )
+ {
+ if ( a[i] == iTarget )
+ {
+ iTargetIndex = i;
+ }
+ else if ( a[i] > iTarget )
+ {
+ a[i]--;
+ }
+ }
+
+ if ( iTargetIndex != -1 && splice === undefined )
+ {
+ a.splice( iTargetIndex, 1 );
+ }
+ }
+
+
+ /**
+ * Mark cached data as invalid such that a re-read of the data will occur when
+ * the cached data is next requested. Also update from the data source object.
+ *
+ * @param {object} settings DataTables settings object
+ * @param {int} rowIdx Row index to invalidate
+ * @param {string} [src] Source to invalidate from: undefined, 'auto', 'dom'
+ * or 'data'
+ * @param {int} [colIdx] Column index to invalidate. If undefined the whole
+ * row will be invalidated
+ * @memberof DataTable#oApi
+ *
+ * @todo For the modularisation of v1.11 this will need to become a callback, so
+ * the sort and filter methods can subscribe to it. That will required
+ * initialisation options for sorting, which is why it is not already baked in
+ */
+ function _fnInvalidate( settings, rowIdx, src, colIdx )
+ {
+ var row = settings.aoData[ rowIdx ];
+ var i, ien;
+ var cellWrite = function ( cell, col ) {
+ // This is very frustrating, but in IE if you just write directly
+ // to innerHTML, and elements that are overwritten are GC'ed,
+ // even if there is a reference to them elsewhere
+ while ( cell.childNodes.length ) {
+ cell.removeChild( cell.firstChild );
+ }
+
+ cell.innerHTML = _fnGetCellData( settings, rowIdx, col, 'display' );
+ };
+
+ // Are we reading last data from DOM or the data object?
+ if ( src === 'dom' || ((! src || src === 'auto') && row.src === 'dom') ) {
+ // Read the data from the DOM
+ row._aData = _fnGetRowElements(
+ settings, row, colIdx, colIdx === undefined ? undefined : row._aData
+ )
+ .data;
+ }
+ else {
+ // Reading from data object, update the DOM
+ var cells = row.anCells;
+
+ if ( cells ) {
+ if ( colIdx !== undefined ) {
+ cellWrite( cells[colIdx], colIdx );
+ }
+ else {
+ for ( i=0, ien=cells.length ; i<ien ; i++ ) {
+ cellWrite( cells[i], i );
+ }
+ }
+ }
+ }
+
+ // For both row and cell invalidation, the cached data for sorting and
+ // filtering is nulled out
+ row._aSortData = null;
+ row._aFilterData = null;
+
+ // Invalidate the type for a specific column (if given) or all columns since
+ // the data might have changed
+ var cols = settings.aoColumns;
+ if ( colIdx !== undefined ) {
+ cols[ colIdx ].sType = null;
+ }
+ else {
+ for ( i=0, ien=cols.length ; i<ien ; i++ ) {
+ cols[i].sType = null;
+ }
+
+ // Update DataTables special `DT_*` attributes for the row
+ _fnRowAttributes( settings, row );
+ }
+ }
+
+
+ /**
+ * Build a data source object from an HTML row, reading the contents of the
+ * cells that are in the row.
+ *
+ * @param {object} settings DataTables settings object
+ * @param {node|object} TR element from which to read data or existing row
+ * object from which to re-read the data from the cells
+ * @param {int} [colIdx] Optional column index
+ * @param {array|object} [d] Data source object. If `colIdx` is given then this
+ * parameter should also be given and will be used to write the data into.
+ * Only the column in question will be written
+ * @returns {object} Object with two parameters: `data` the data read, in
+ * document order, and `cells` and array of nodes (they can be useful to the
+ * caller, so rather than needing a second traversal to get them, just return
+ * them from here).
+ * @memberof DataTable#oApi
+ */
+ function _fnGetRowElements( settings, row, colIdx, d )
+ {
+ var
+ tds = [],
+ td = row.firstChild,
+ name, col, o, i=0, contents,
+ columns = settings.aoColumns,
+ objectRead = settings._rowReadObject;
+
+ // Allow the data object to be passed in, or construct
+ d = d !== undefined ?
+ d :
+ objectRead ?
+ {} :
+ [];
+
+ var attr = function ( str, td ) {
+ if ( typeof str === 'string' ) {
+ var idx = str.indexOf('@');
+
+ if ( idx !== -1 ) {
+ var attr = str.substring( idx+1 );
+ var setter = _fnSetObjectDataFn( str );
+ setter( d, td.getAttribute( attr ) );
+ }
+ }
+ };
+
+ // Read data from a cell and store into the data object
+ var cellProcess = function ( cell ) {
+ if ( colIdx === undefined || colIdx === i ) {
+ col = columns[i];
+ contents = $.trim(cell.innerHTML);
+
+ if ( col && col._bAttrSrc ) {
+ var setter = _fnSetObjectDataFn( col.mData._ );
+ setter( d, contents );
+
+ attr( col.mData.sort, cell );
+ attr( col.mData.type, cell );
+ attr( col.mData.filter, cell );
+ }
+ else {
+ // Depending on the `data` option for the columns the data can
+ // be read to either an object or an array.
+ if ( objectRead ) {
+ if ( ! col._setter ) {
+ // Cache the setter function
+ col._setter = _fnSetObjectDataFn( col.mData );
+ }
+ col._setter( d, contents );
+ }
+ else {
+ d[i] = contents;
+ }
+ }
+ }
+
+ i++;
+ };
+
+ if ( td ) {
+ // `tr` element was passed in
+ while ( td ) {
+ name = td.nodeName.toUpperCase();
+
+ if ( name == "TD" || name == "TH" ) {
+ cellProcess( td );
+ tds.push( td );
+ }
+
+ td = td.nextSibling;
+ }
+ }
+ else {
+ // Existing row object passed in
+ tds = row.anCells;
+
+ for ( var j=0, jen=tds.length ; j<jen ; j++ ) {
+ cellProcess( tds[j] );
+ }
+ }
+
+ // Read the ID from the DOM if present
+ var rowNode = row.firstChild ? row : row.nTr;
+
+ if ( rowNode ) {
+ var id = rowNode.getAttribute( 'id' );
+
+ if ( id ) {
+ _fnSetObjectDataFn( settings.rowId )( d, id );
+ }
+ }
+
+ return {
+ data: d,
+ cells: tds
+ };
+ }
+ /**
+ * Create a new TR element (and it's TD children) for a row
+ * @param {object} oSettings dataTables settings object
+ * @param {int} iRow Row to consider
+ * @param {node} [nTrIn] TR element to add to the table - optional. If not given,
+ * DataTables will create a row automatically
+ * @param {array} [anTds] Array of TD|TH elements for the row - must be given
+ * if nTr is.
+ * @memberof DataTable#oApi
+ */
+ function _fnCreateTr ( oSettings, iRow, nTrIn, anTds )
+ {
+ var
+ row = oSettings.aoData[iRow],
+ rowData = row._aData,
+ cells = [],
+ nTr, nTd, oCol,
+ i, iLen;
+
+ if ( row.nTr === null )
+ {
+ nTr = nTrIn || document.createElement('tr');
+
+ row.nTr = nTr;
+ row.anCells = cells;
+
+ /* Use a private property on the node to allow reserve mapping from the node
+ * to the aoData array for fast look up
+ */
+ nTr._DT_RowIndex = iRow;
+
+ /* Special parameters can be given by the data source to be used on the row */
+ _fnRowAttributes( oSettings, row );
+
+ /* Process each column */
+ for ( i=0, iLen=oSettings.aoColumns.length ; i<iLen ; i++ )
+ {
+ oCol = oSettings.aoColumns[i];
+
+ nTd = nTrIn ? anTds[i] : document.createElement( oCol.sCellType );
+ nTd._DT_CellIndex = {
+ row: iRow,
+ column: i
+ };
+
+ cells.push( nTd );
+
+ // Need to create the HTML if new, or if a rendering function is defined
+ if ( !nTrIn || oCol.mRender || oCol.mData !== i )
+ {
+ nTd.innerHTML = _fnGetCellData( oSettings, iRow, i, 'display' );
+ }
+
+ /* Add user defined class */
+ if ( oCol.sClass )
+ {
+ nTd.className += ' '+oCol.sClass;
+ }
+
+ // Visibility - add or remove as required
+ if ( oCol.bVisible && ! nTrIn )
+ {
+ nTr.appendChild( nTd );
+ }
+ else if ( ! oCol.bVisible && nTrIn )
+ {
+ nTd.parentNode.removeChild( nTd );
+ }
+
+ if ( oCol.fnCreatedCell )
+ {
+ oCol.fnCreatedCell.call( oSettings.oInstance,
+ nTd, _fnGetCellData( oSettings, iRow, i ), rowData, iRow, i
+ );
+ }
+ }
+
+ _fnCallbackFire( oSettings, 'aoRowCreatedCallback', null, [nTr, rowData, iRow] );
+ }
+
+ // Remove once webkit bug 131819 and Chromium bug 365619 have been resolved
+ // and deployed
+ row.nTr.setAttribute( 'role', 'row' );
+ }
+
+
+ /**
+ * Add attributes to a row based on the special `DT_*` parameters in a data
+ * source object.
+ * @param {object} settings DataTables settings object
+ * @param {object} DataTables row object for the row to be modified
+ * @memberof DataTable#oApi
+ */
+ function _fnRowAttributes( settings, row )
+ {
+ var tr = row.nTr;
+ var data = row._aData;
+
+ if ( tr ) {
+ var id = settings.rowIdFn( data );
+
+ if ( id ) {
+ tr.id = id;
+ }
+
+ if ( data.DT_RowClass ) {
+ // Remove any classes added by DT_RowClass before
+ var a = data.DT_RowClass.split(' ');
+ row.__rowc = row.__rowc ?
+ _unique( row.__rowc.concat( a ) ) :
+ a;
+
+ $(tr)
+ .removeClass( row.__rowc.join(' ') )
+ .addClass( data.DT_RowClass );
+ }
+
+ if ( data.DT_RowAttr ) {
+ $(tr).attr( data.DT_RowAttr );
+ }
+
+ if ( data.DT_RowData ) {
+ $(tr).data( data.DT_RowData );
+ }
+ }
+ }
+
+
+ /**
+ * Create the HTML header for the table
+ * @param {object} oSettings dataTables settings object
+ * @memberof DataTable#oApi
+ */
+ function _fnBuildHead( oSettings )
+ {
+ var i, ien, cell, row, column;
+ var thead = oSettings.nTHead;
+ var tfoot = oSettings.nTFoot;
+ var createHeader = $('th, td', thead).length === 0;
+ var classes = oSettings.oClasses;
+ var columns = oSettings.aoColumns;
+
+ if ( createHeader ) {
+ row = $('<tr/>').appendTo( thead );
+ }
+
+ for ( i=0, ien=columns.length ; i<ien ; i++ ) {
+ column = columns[i];
+ cell = $( column.nTh ).addClass( column.sClass );
+
+ if ( createHeader ) {
+ cell.appendTo( row );
+ }
+
+ // 1.11 move into sorting
+ if ( oSettings.oFeatures.bSort ) {
+ cell.addClass( column.sSortingClass );
+
+ if ( column.bSortable !== false ) {
+ cell
+ .attr( 'tabindex', oSettings.iTabIndex )
+ .attr( 'aria-controls', oSettings.sTableId );
+
+ _fnSortAttachListener( oSettings, column.nTh, i );
+ }
+ }
+
+ if ( column.sTitle != cell[0].innerHTML ) {
+ cell.html( column.sTitle );
+ }
+
+ _fnRenderer( oSettings, 'header' )(
+ oSettings, cell, column, classes
+ );
+ }
+
+ if ( createHeader ) {
+ _fnDetectHeader( oSettings.aoHeader, thead );
+ }
+
+ /* ARIA role for the rows */
+ $(thead).find('>tr').attr('role', 'row');
+
+ /* Deal with the footer - add classes if required */
+ $(thead).find('>tr>th, >tr>td').addClass( classes.sHeaderTH );
+ $(tfoot).find('>tr>th, >tr>td').addClass( classes.sFooterTH );
+
+ // Cache the footer cells. Note that we only take the cells from the first
+ // row in the footer. If there is more than one row the user wants to
+ // interact with, they need to use the table().foot() method. Note also this
+ // allows cells to be used for multiple columns using colspan
+ if ( tfoot !== null ) {
+ var cells = oSettings.aoFooter[0];
+
+ for ( i=0, ien=cells.length ; i<ien ; i++ ) {
+ column = columns[i];
+ column.nTf = cells[i].cell;
+
+ if ( column.sClass ) {
+ $(column.nTf).addClass( column.sClass );
+ }
+ }
+ }
+ }
+
+
+ /**
+ * Draw the header (or footer) element based on the column visibility states. The
+ * methodology here is to use the layout array from _fnDetectHeader, modified for
+ * the instantaneous column visibility, to construct the new layout. The grid is
+ * traversed over cell at a time in a rows x columns grid fashion, although each
+ * cell insert can cover multiple elements in the grid - which is tracks using the
+ * aApplied array. Cell inserts in the grid will only occur where there isn't
+ * already a cell in that position.
+ * @param {object} oSettings dataTables settings object
+ * @param array {objects} aoSource Layout array from _fnDetectHeader
+ * @param {boolean} [bIncludeHidden=false] If true then include the hidden columns in the calc,
+ * @memberof DataTable#oApi
+ */
+ function _fnDrawHead( oSettings, aoSource, bIncludeHidden )
+ {
+ var i, iLen, j, jLen, k, kLen, n, nLocalTr;
+ var aoLocal = [];
+ var aApplied = [];
+ var iColumns = oSettings.aoColumns.length;
+ var iRowspan, iColspan;
+
+ if ( ! aoSource )
+ {
+ return;
+ }
+
+ if ( bIncludeHidden === undefined )
+ {
+ bIncludeHidden = false;
+ }
+
+ /* Make a copy of the master layout array, but without the visible columns in it */
+ for ( i=0, iLen=aoSource.length ; i<iLen ; i++ )
+ {
+ aoLocal[i] = aoSource[i].slice();
+ aoLocal[i].nTr = aoSource[i].nTr;
+
+ /* Remove any columns which are currently hidden */
+ for ( j=iColumns-1 ; j>=0 ; j-- )
+ {
+ if ( !oSettings.aoColumns[j].bVisible && !bIncludeHidden )
+ {
+ aoLocal[i].splice( j, 1 );
+ }
+ }
+
+ /* Prep the applied array - it needs an element for each row */
+ aApplied.push( [] );
+ }
+
+ for ( i=0, iLen=aoLocal.length ; i<iLen ; i++ )
+ {
+ nLocalTr = aoLocal[i].nTr;
+
+ /* All cells are going to be replaced, so empty out the row */
+ if ( nLocalTr )
+ {
+ while( (n = nLocalTr.firstChild) )
+ {
+ nLocalTr.removeChild( n );
+ }
+ }
+
+ for ( j=0, jLen=aoLocal[i].length ; j<jLen ; j++ )
+ {
+ iRowspan = 1;
+ iColspan = 1;
+
+ /* Check to see if there is already a cell (row/colspan) covering our target
+ * insert point. If there is, then there is nothing to do.
+ */
+ if ( aApplied[i][j] === undefined )
+ {
+ nLocalTr.appendChild( aoLocal[i][j].cell );
+ aApplied[i][j] = 1;
+
+ /* Expand the cell to cover as many rows as needed */
+ while ( aoLocal[i+iRowspan] !== undefined &&
+ aoLocal[i][j].cell == aoLocal[i+iRowspan][j].cell )
+ {
+ aApplied[i+iRowspan][j] = 1;
+ iRowspan++;
+ }
+
+ /* Expand the cell to cover as many columns as needed */
+ while ( aoLocal[i][j+iColspan] !== undefined &&
+ aoLocal[i][j].cell == aoLocal[i][j+iColspan].cell )
+ {
+ /* Must update the applied array over the rows for the columns */
+ for ( k=0 ; k<iRowspan ; k++ )
+ {
+ aApplied[i+k][j+iColspan] = 1;
+ }
+ iColspan++;
+ }
+
+ /* Do the actual expansion in the DOM */
+ $(aoLocal[i][j].cell)
+ .attr('rowspan', iRowspan)
+ .attr('colspan', iColspan);
+ }
+ }
+ }
+ }
+
+
+ /**
+ * Insert the required TR nodes into the table for display
+ * @param {object} oSettings dataTables settings object
+ * @memberof DataTable#oApi
+ */
+ function _fnDraw( oSettings )
+ {
+ /* Provide a pre-callback function which can be used to cancel the draw is false is returned */
+ var aPreDraw = _fnCallbackFire( oSettings, 'aoPreDrawCallback', 'preDraw', [oSettings] );
+ if ( $.inArray( false, aPreDraw ) !== -1 )
+ {
+ _fnProcessingDisplay( oSettings, false );
+ return;
+ }
+
+ var i, iLen, n;
+ var anRows = [];
+ var iRowCount = 0;
+ var asStripeClasses = oSettings.asStripeClasses;
+ var iStripes = asStripeClasses.length;
+ var iOpenRows = oSettings.aoOpenRows.length;
+ var oLang = oSettings.oLanguage;
+ var iInitDisplayStart = oSettings.iInitDisplayStart;
+ var bServerSide = _fnDataSource( oSettings ) == 'ssp';
+ var aiDisplay = oSettings.aiDisplay;
+
+ oSettings.bDrawing = true;
+
+ /* Check and see if we have an initial draw position from state saving */
+ if ( iInitDisplayStart !== undefined && iInitDisplayStart !== -1 )
+ {
+ oSettings._iDisplayStart = bServerSide ?
+ iInitDisplayStart :
+ iInitDisplayStart >= oSettings.fnRecordsDisplay() ?
+ 0 :
+ iInitDisplayStart;
+
+ oSettings.iInitDisplayStart = -1;
+ }
+
+ var iDisplayStart = oSettings._iDisplayStart;
+ var iDisplayEnd = oSettings.fnDisplayEnd();
+
+ /* Server-side processing draw intercept */
+ if ( oSettings.bDeferLoading )
+ {
+ oSettings.bDeferLoading = false;
+ oSettings.iDraw++;
+ _fnProcessingDisplay( oSettings, false );
+ }
+ else if ( !bServerSide )
+ {
+ oSettings.iDraw++;
+ }
+ else if ( !oSettings.bDestroying && !_fnAjaxUpdate( oSettings ) )
+ {
+ return;
+ }
+
+ if ( aiDisplay.length !== 0 )
+ {
+ var iStart = bServerSide ? 0 : iDisplayStart;
+ var iEnd = bServerSide ? oSettings.aoData.length : iDisplayEnd;
+
+ for ( var j=iStart ; j<iEnd ; j++ )
+ {
+ var iDataIndex = aiDisplay[j];
+ var aoData = oSettings.aoData[ iDataIndex ];
+ if ( aoData.nTr === null )
+ {
+ _fnCreateTr( oSettings, iDataIndex );
+ }
+
+ var nRow = aoData.nTr;
+
+ /* Remove the old striping classes and then add the new one */
+ if ( iStripes !== 0 )
+ {
+ var sStripe = asStripeClasses[ iRowCount % iStripes ];
+ if ( aoData._sRowStripe != sStripe )
+ {
+ $(nRow).removeClass( aoData._sRowStripe ).addClass( sStripe );
+ aoData._sRowStripe = sStripe;
+ }
+ }
+
+ // Row callback functions - might want to manipulate the row
+ // iRowCount and j are not currently documented. Are they at all
+ // useful?
+ _fnCallbackFire( oSettings, 'aoRowCallback', null,
+ [nRow, aoData._aData, iRowCount, j] );
+
+ anRows.push( nRow );
+ iRowCount++;
+ }
+ }
+ else
+ {
+ /* Table is empty - create a row with an empty message in it */
+ var sZero = oLang.sZeroRecords;
+ if ( oSettings.iDraw == 1 && _fnDataSource( oSettings ) == 'ajax' )
+ {
+ sZero = oLang.sLoadingRecords;
+ }
+ else if ( oLang.sEmptyTable && oSettings.fnRecordsTotal() === 0 )
+ {
+ sZero = oLang.sEmptyTable;
+ }
+
+ anRows[ 0 ] = $( '<tr/>', { 'class': iStripes ? asStripeClasses[0] : '' } )
+ .append( $('<td />', {
+ 'valign': 'top',
+ 'colSpan': _fnVisbleColumns( oSettings ),
+ 'class': oSettings.oClasses.sRowEmpty
+ } ).html( sZero ) )[0];
+ }
+
+ /* Header and footer callbacks */
+ _fnCallbackFire( oSettings, 'aoHeaderCallback', 'header', [ $(oSettings.nTHead).children('tr')[0],
+ _fnGetDataMaster( oSettings ), iDisplayStart, iDisplayEnd, aiDisplay ] );
+
+ _fnCallbackFire( oSettings, 'aoFooterCallback', 'footer', [ $(oSettings.nTFoot).children('tr')[0],
+ _fnGetDataMaster( oSettings ), iDisplayStart, iDisplayEnd, aiDisplay ] );
+
+ var body = $(oSettings.nTBody);
+
+ body.children().detach();
+ body.append( $(anRows) );
+
+ /* Call all required callback functions for the end of a draw */
+ _fnCallbackFire( oSettings, 'aoDrawCallback', 'draw', [oSettings] );
+
+ /* Draw is complete, sorting and filtering must be as well */
+ oSettings.bSorted = false;
+ oSettings.bFiltered = false;
+ oSettings.bDrawing = false;
+ }
+
+
+ /**
+ * Redraw the table - taking account of the various features which are enabled
+ * @param {object} oSettings dataTables settings object
+ * @param {boolean} [holdPosition] Keep the current paging position. By default
+ * the paging is reset to the first page
+ * @memberof DataTable#oApi
+ */
+ function _fnReDraw( settings, holdPosition )
+ {
+ var
+ features = settings.oFeatures,
+ sort = features.bSort,
+ filter = features.bFilter;
+
+ if ( sort ) {
+ _fnSort( settings );
+ }
+
+ if ( filter ) {
+ _fnFilterComplete( settings, settings.oPreviousSearch );
+ }
+ else {
+ // No filtering, so we want to just use the display master
+ settings.aiDisplay = settings.aiDisplayMaster.slice();
+ }
+
+ if ( holdPosition !== true ) {
+ settings._iDisplayStart = 0;
+ }
+
+ // Let any modules know about the draw hold position state (used by
+ // scrolling internally)
+ settings._drawHold = holdPosition;
+
+ _fnDraw( settings );
+
+ settings._drawHold = false;
+ }
+
+
+ /**
+ * Add the options to the page HTML for the table
+ * @param {object} oSettings dataTables settings object
+ * @memberof DataTable#oApi
+ */
+ function _fnAddOptionsHtml ( oSettings )
+ {
+ var classes = oSettings.oClasses;
+ var table = $(oSettings.nTable);
+ var holding = $('<div/>').insertBefore( table ); // Holding element for speed
+ var features = oSettings.oFeatures;
+
+ // All DataTables are wrapped in a div
+ var insert = $('<div/>', {
+ id: oSettings.sTableId+'_wrapper',
+ 'class': classes.sWrapper + (oSettings.nTFoot ? '' : ' '+classes.sNoFooter)
+ } );
+
+ oSettings.nHolding = holding[0];
+ oSettings.nTableWrapper = insert[0];
+ oSettings.nTableReinsertBefore = oSettings.nTable.nextSibling;
+
+ /* Loop over the user set positioning and place the elements as needed */
+ var aDom = oSettings.sDom.split('');
+ var featureNode, cOption, nNewNode, cNext, sAttr, j;
+ for ( var i=0 ; i<aDom.length ; i++ )
+ {
+ featureNode = null;
+ cOption = aDom[i];
+
+ if ( cOption == '<' )
+ {
+ /* New container div */
+ nNewNode = $('<div/>')[0];
+
+ /* Check to see if we should append an id and/or a class name to the container */
+ cNext = aDom[i+1];
+ if ( cNext == "'" || cNext == '"' )
+ {
+ sAttr = "";
+ j = 2;
+ while ( aDom[i+j] != cNext )
+ {
+ sAttr += aDom[i+j];
+ j++;
+ }
+
+ /* Replace jQuery UI constants @todo depreciated */
+ if ( sAttr == "H" )
+ {
+ sAttr = classes.sJUIHeader;
+ }
+ else if ( sAttr == "F" )
+ {
+ sAttr = classes.sJUIFooter;
+ }
+
+ /* The attribute can be in the format of "#id.class", "#id" or "class" This logic
+ * breaks the string into parts and applies them as needed
+ */
+ if ( sAttr.indexOf('.') != -1 )
+ {
+ var aSplit = sAttr.split('.');
+ nNewNode.id = aSplit[0].substr(1, aSplit[0].length-1);
+ nNewNode.className = aSplit[1];
+ }
+ else if ( sAttr.charAt(0) == "#" )
+ {
+ nNewNode.id = sAttr.substr(1, sAttr.length-1);
+ }
+ else
+ {
+ nNewNode.className = sAttr;
+ }
+
+ i += j; /* Move along the position array */
+ }
+
+ insert.append( nNewNode );
+ insert = $(nNewNode);
+ }
+ else if ( cOption == '>' )
+ {
+ /* End container div */
+ insert = insert.parent();
+ }
+ // @todo Move options into their own plugins?
+ else if ( cOption == 'l' && features.bPaginate && features.bLengthChange )
+ {
+ /* Length */
+ featureNode = _fnFeatureHtmlLength( oSettings );
+ }
+ else if ( cOption == 'f' && features.bFilter )
+ {
+ /* Filter */
+ featureNode = _fnFeatureHtmlFilter( oSettings );
+ }
+ else if ( cOption == 'r' && features.bProcessing )
+ {
+ /* pRocessing */
+ featureNode = _fnFeatureHtmlProcessing( oSettings );
+ }
+ else if ( cOption == 't' )
+ {
+ /* Table */
+ featureNode = _fnFeatureHtmlTable( oSettings );
+ }
+ else if ( cOption == 'i' && features.bInfo )
+ {
+ /* Info */
+ featureNode = _fnFeatureHtmlInfo( oSettings );
+ }
+ else if ( cOption == 'p' && features.bPaginate )
+ {
+ /* Pagination */
+ featureNode = _fnFeatureHtmlPaginate( oSettings );
+ }
+ else if ( DataTable.ext.feature.length !== 0 )
+ {
+ /* Plug-in features */
+ var aoFeatures = DataTable.ext.feature;
+ for ( var k=0, kLen=aoFeatures.length ; k<kLen ; k++ )
+ {
+ if ( cOption == aoFeatures[k].cFeature )
+ {
+ featureNode = aoFeatures[k].fnInit( oSettings );
+ break;
+ }
+ }
+ }
+
+ /* Add to the 2D features array */
+ if ( featureNode )
+ {
+ var aanFeatures = oSettings.aanFeatures;
+
+ if ( ! aanFeatures[cOption] )
+ {
+ aanFeatures[cOption] = [];
+ }
+
+ aanFeatures[cOption].push( featureNode );
+ insert.append( featureNode );
+ }
+ }
+
+ /* Built our DOM structure - replace the holding div with what we want */
+ holding.replaceWith( insert );
+ oSettings.nHolding = null;
+ }
+
+
+ /**
+ * Use the DOM source to create up an array of header cells. The idea here is to
+ * create a layout grid (array) of rows x columns, which contains a reference
+ * to the cell that that point in the grid (regardless of col/rowspan), such that
+ * any column / row could be removed and the new grid constructed
+ * @param array {object} aLayout Array to store the calculated layout in
+ * @param {node} nThead The header/footer element for the table
+ * @memberof DataTable#oApi
+ */
+ function _fnDetectHeader ( aLayout, nThead )
+ {
+ var nTrs = $(nThead).children('tr');
+ var nTr, nCell;
+ var i, k, l, iLen, jLen, iColShifted, iColumn, iColspan, iRowspan;
+ var bUnique;
+ var fnShiftCol = function ( a, i, j ) {
+ var k = a[i];
+ while ( k[j] ) {
+ j++;
+ }
+ return j;
+ };
+
+ aLayout.splice( 0, aLayout.length );
+
+ /* We know how many rows there are in the layout - so prep it */
+ for ( i=0, iLen=nTrs.length ; i<iLen ; i++ )
+ {
+ aLayout.push( [] );
+ }
+
+ /* Calculate a layout array */
+ for ( i=0, iLen=nTrs.length ; i<iLen ; i++ )
+ {
+ nTr = nTrs[i];
+ iColumn = 0;
+
+ /* For every cell in the row... */
+ nCell = nTr.firstChild;
+ while ( nCell ) {
+ if ( nCell.nodeName.toUpperCase() == "TD" ||
+ nCell.nodeName.toUpperCase() == "TH" )
+ {
+ /* Get the col and rowspan attributes from the DOM and sanitise them */
+ iColspan = nCell.getAttribute('colspan') * 1;
+ iRowspan = nCell.getAttribute('rowspan') * 1;
+ iColspan = (!iColspan || iColspan===0 || iColspan===1) ? 1 : iColspan;
+ iRowspan = (!iRowspan || iRowspan===0 || iRowspan===1) ? 1 : iRowspan;
+
+ /* There might be colspan cells already in this row, so shift our target
+ * accordingly
+ */
+ iColShifted = fnShiftCol( aLayout, i, iColumn );
+
+ /* Cache calculation for unique columns */
+ bUnique = iColspan === 1 ? true : false;
+
+ /* If there is col / rowspan, copy the information into the layout grid */
+ for ( l=0 ; l<iColspan ; l++ )
+ {
+ for ( k=0 ; k<iRowspan ; k++ )
+ {
+ aLayout[i+k][iColShifted+l] = {
+ "cell": nCell,
+ "unique": bUnique
+ };
+ aLayout[i+k].nTr = nTr;
+ }
+ }
+ }
+ nCell = nCell.nextSibling;
+ }
+ }
+ }
+
+
+ /**
+ * Get an array of unique th elements, one for each column
+ * @param {object} oSettings dataTables settings object
+ * @param {node} nHeader automatically detect the layout from this node - optional
+ * @param {array} aLayout thead/tfoot layout from _fnDetectHeader - optional
+ * @returns array {node} aReturn list of unique th's
+ * @memberof DataTable#oApi
+ */
+ function _fnGetUniqueThs ( oSettings, nHeader, aLayout )
+ {
+ var aReturn = [];
+ if ( !aLayout )
+ {
+ aLayout = oSettings.aoHeader;
+ if ( nHeader )
+ {
+ aLayout = [];
+ _fnDetectHeader( aLayout, nHeader );
+ }
+ }
+
+ for ( var i=0, iLen=aLayout.length ; i<iLen ; i++ )
+ {
+ for ( var j=0, jLen=aLayout[i].length ; j<jLen ; j++ )
+ {
+ if ( aLayout[i][j].unique &&
+ (!aReturn[j] || !oSettings.bSortCellsTop) )
+ {
+ aReturn[j] = aLayout[i][j].cell;
+ }
+ }
+ }
+
+ return aReturn;
+ }
+
+ /**
+ * Create an Ajax call based on the table's settings, taking into account that
+ * parameters can have multiple forms, and backwards compatibility.
+ *
+ * @param {object} oSettings dataTables settings object
+ * @param {array} data Data to send to the server, required by
+ * DataTables - may be augmented by developer callbacks
+ * @param {function} fn Callback function to run when data is obtained
+ */
+ function _fnBuildAjax( oSettings, data, fn )
+ {
+ // Compatibility with 1.9-, allow fnServerData and event to manipulate
+ _fnCallbackFire( oSettings, 'aoServerParams', 'serverParams', [data] );
+
+ // Convert to object based for 1.10+ if using the old array scheme which can
+ // come from server-side processing or serverParams
+ if ( data && $.isArray(data) ) {
+ var tmp = {};
+ var rbracket = /(.*?)\[\]$/;
+
+ $.each( data, function (key, val) {
+ var match = val.name.match(rbracket);
+
+ if ( match ) {
+ // Support for arrays
+ var name = match[0];
+
+ if ( ! tmp[ name ] ) {
+ tmp[ name ] = [];
+ }
+ tmp[ name ].push( val.value );
+ }
+ else {
+ tmp[val.name] = val.value;
+ }
+ } );
+ data = tmp;
+ }
+
+ var ajaxData;
+ var ajax = oSettings.ajax;
+ var instance = oSettings.oInstance;
+ var callback = function ( json ) {
+ _fnCallbackFire( oSettings, null, 'xhr', [oSettings, json, oSettings.jqXHR] );
+ fn( json );
+ };
+
+ if ( $.isPlainObject( ajax ) && ajax.data )
+ {
+ ajaxData = ajax.data;
+
+ var newData = $.isFunction( ajaxData ) ?
+ ajaxData( data, oSettings ) : // fn can manipulate data or return
+ ajaxData; // an object object or array to merge
+
+ // If the function returned something, use that alone
+ data = $.isFunction( ajaxData ) && newData ?
+ newData :
+ $.extend( true, data, newData );
+
+ // Remove the data property as we've resolved it already and don't want
+ // jQuery to do it again (it is restored at the end of the function)
+ delete ajax.data;
+ }
+
+ var baseAjax = {
+ "data": data,
+ "success": function (json) {
+ var error = json.error || json.sError;
+ if ( error ) {
+ _fnLog( oSettings, 0, error );
+ }
+
+ oSettings.json = json;
+ callback( json );
+ },
+ "dataType": "json",
+ "cache": false,
+ "type": oSettings.sServerMethod,
+ "error": function (xhr, error, thrown) {
+ var ret = _fnCallbackFire( oSettings, null, 'xhr', [oSettings, null, oSettings.jqXHR] );
+
+ if ( $.inArray( true, ret ) === -1 ) {
+ if ( error == "parsererror" ) {
+ _fnLog( oSettings, 0, 'Invalid JSON response', 1 );
+ }
+ else if ( xhr.readyState === 4 ) {
+ _fnLog( oSettings, 0, 'Ajax error', 7 );
+ }
+ }
+
+ _fnProcessingDisplay( oSettings, false );
+ }
+ };
+
+ // Store the data submitted for the API
+ oSettings.oAjaxData = data;
+
+ // Allow plug-ins and external processes to modify the data
+ _fnCallbackFire( oSettings, null, 'preXhr', [oSettings, data] );
+
+ if ( oSettings.fnServerData )
+ {
+ // DataTables 1.9- compatibility
+ oSettings.fnServerData.call( instance,
+ oSettings.sAjaxSource,
+ $.map( data, function (val, key) { // Need to convert back to 1.9 trad format
+ return { name: key, value: val };
+ } ),
+ callback,
+ oSettings
+ );
+ }
+ else if ( oSettings.sAjaxSource || typeof ajax === 'string' )
+ {
+ // DataTables 1.9- compatibility
+ oSettings.jqXHR = $.ajax( $.extend( baseAjax, {
+ url: ajax || oSettings.sAjaxSource
+ } ) );
+ }
+ else if ( $.isFunction( ajax ) )
+ {
+ // Is a function - let the caller define what needs to be done
+ oSettings.jqXHR = ajax.call( instance, data, callback, oSettings );
+ }
+ else
+ {
+ // Object to extend the base settings
+ oSettings.jqXHR = $.ajax( $.extend( baseAjax, ajax ) );
+
+ // Restore for next time around
+ ajax.data = ajaxData;
+ }
+ }
+
+
+ /**
+ * Update the table using an Ajax call
+ * @param {object} settings dataTables settings object
+ * @returns {boolean} Block the table drawing or not
+ * @memberof DataTable#oApi
+ */
+ function _fnAjaxUpdate( settings )
+ {
+ if ( settings.bAjaxDataGet ) {
+ settings.iDraw++;
+ _fnProcessingDisplay( settings, true );
+
+ _fnBuildAjax(
+ settings,
+ _fnAjaxParameters( settings ),
+ function(json) {
+ _fnAjaxUpdateDraw( settings, json );
+ }
+ );
+
+ return false;
+ }
+ return true;
+ }
+
+
+ /**
+ * Build up the parameters in an object needed for a server-side processing
+ * request. Note that this is basically done twice, is different ways - a modern
+ * method which is used by default in DataTables 1.10 which uses objects and
+ * arrays, or the 1.9- method with is name / value pairs. 1.9 method is used if
+ * the sAjaxSource option is used in the initialisation, or the legacyAjax
+ * option is set.
+ * @param {object} oSettings dataTables settings object
+ * @returns {bool} block the table drawing or not
+ * @memberof DataTable#oApi
+ */
+ function _fnAjaxParameters( settings )
+ {
+ var
+ columns = settings.aoColumns,
+ columnCount = columns.length,
+ features = settings.oFeatures,
+ preSearch = settings.oPreviousSearch,
+ preColSearch = settings.aoPreSearchCols,
+ i, data = [], dataProp, column, columnSearch,
+ sort = _fnSortFlatten( settings ),
+ displayStart = settings._iDisplayStart,
+ displayLength = features.bPaginate !== false ?
+ settings._iDisplayLength :
+ -1;
+
+ var param = function ( name, value ) {
+ data.push( { 'name': name, 'value': value } );
+ };
+
+ // DataTables 1.9- compatible method
+ param( 'sEcho', settings.iDraw );
+ param( 'iColumns', columnCount );
+ param( 'sColumns', _pluck( columns, 'sName' ).join(',') );
+ param( 'iDisplayStart', displayStart );
+ param( 'iDisplayLength', displayLength );
+
+ // DataTables 1.10+ method
+ var d = {
+ draw: settings.iDraw,
+ columns: [],
+ order: [],
+ start: displayStart,
+ length: displayLength,
+ search: {
+ value: preSearch.sSearch,
+ regex: preSearch.bRegex
+ }
+ };
+
+ for ( i=0 ; i<columnCount ; i++ ) {
+ column = columns[i];
+ columnSearch = preColSearch[i];
+ dataProp = typeof column.mData=="function" ? 'function' : column.mData ;
+
+ d.columns.push( {
+ data: dataProp,
+ name: column.sName,
+ searchable: column.bSearchable,
+ orderable: column.bSortable,
+ search: {
+ value: columnSearch.sSearch,
+ regex: columnSearch.bRegex
+ }
+ } );
+
+ param( "mDataProp_"+i, dataProp );
+
+ if ( features.bFilter ) {
+ param( 'sSearch_'+i, columnSearch.sSearch );
+ param( 'bRegex_'+i, columnSearch.bRegex );
+ param( 'bSearchable_'+i, column.bSearchable );
+ }
+
+ if ( features.bSort ) {
+ param( 'bSortable_'+i, column.bSortable );
+ }
+ }
+
+ if ( features.bFilter ) {
+ param( 'sSearch', preSearch.sSearch );
+ param( 'bRegex', preSearch.bRegex );
+ }
+
+ if ( features.bSort ) {
+ $.each( sort, function ( i, val ) {
+ d.order.push( { column: val.col, dir: val.dir } );
+
+ param( 'iSortCol_'+i, val.col );
+ param( 'sSortDir_'+i, val.dir );
+ } );
+
+ param( 'iSortingCols', sort.length );
+ }
+
+ // If the legacy.ajax parameter is null, then we automatically decide which
+ // form to use, based on sAjaxSource
+ var legacy = DataTable.ext.legacy.ajax;
+ if ( legacy === null ) {
+ return settings.sAjaxSource ? data : d;
+ }
+
+ // Otherwise, if legacy has been specified then we use that to decide on the
+ // form
+ return legacy ? data : d;
+ }
+
+
+ /**
+ * Data the data from the server (nuking the old) and redraw the table
+ * @param {object} oSettings dataTables settings object
+ * @param {object} json json data return from the server.
+ * @param {string} json.sEcho Tracking flag for DataTables to match requests
+ * @param {int} json.iTotalRecords Number of records in the data set, not accounting for filtering
+ * @param {int} json.iTotalDisplayRecords Number of records in the data set, accounting for filtering
+ * @param {array} json.aaData The data to display on this page
+ * @param {string} [json.sColumns] Column ordering (sName, comma separated)
+ * @memberof DataTable#oApi
+ */
+ function _fnAjaxUpdateDraw ( settings, json )
+ {
+ // v1.10 uses camelCase variables, while 1.9 uses Hungarian notation.
+ // Support both
+ var compat = function ( old, modern ) {
+ return json[old] !== undefined ? json[old] : json[modern];
+ };
+
+ var data = _fnAjaxDataSrc( settings, json );
+ var draw = compat( 'sEcho', 'draw' );
+ var recordsTotal = compat( 'iTotalRecords', 'recordsTotal' );
+ var recordsFiltered = compat( 'iTotalDisplayRecords', 'recordsFiltered' );
+
+ if ( draw ) {
+ // Protect against out of sequence returns
+ if ( draw*1 < settings.iDraw ) {
+ return;
+ }
+ settings.iDraw = draw * 1;
+ }
+
+ _fnClearTable( settings );
+ settings._iRecordsTotal = parseInt(recordsTotal, 10);
+ settings._iRecordsDisplay = parseInt(recordsFiltered, 10);
+
+ for ( var i=0, ien=data.length ; i<ien ; i++ ) {
+ _fnAddData( settings, data[i] );
+ }
+ settings.aiDisplay = settings.aiDisplayMaster.slice();
+
+ settings.bAjaxDataGet = false;
+ _fnDraw( settings );
+
+ if ( ! settings._bInitComplete ) {
+ _fnInitComplete( settings, json );
+ }
+
+ settings.bAjaxDataGet = true;
+ _fnProcessingDisplay( settings, false );
+ }
+
+
+ /**
+ * Get the data from the JSON data source to use for drawing a table. Using
+ * `_fnGetObjectDataFn` allows the data to be sourced from a property of the
+ * source object, or from a processing function.
+ * @param {object} oSettings dataTables settings object
+ * @param {object} json Data source object / array from the server
+ * @return {array} Array of data to use
+ */
+ function _fnAjaxDataSrc ( oSettings, json )
+ {
+ var dataSrc = $.isPlainObject( oSettings.ajax ) && oSettings.ajax.dataSrc !== undefined ?
+ oSettings.ajax.dataSrc :
+ oSettings.sAjaxDataProp; // Compatibility with 1.9-.
+
+ // Compatibility with 1.9-. In order to read from aaData, check if the
+ // default has been changed, if not, check for aaData
+ if ( dataSrc === 'data' ) {
+ return json.aaData || json[dataSrc];
+ }
+
+ return dataSrc !== "" ?
+ _fnGetObjectDataFn( dataSrc )( json ) :
+ json;
+ }
+
+ /**
+ * Generate the node required for filtering text
+ * @returns {node} Filter control element
+ * @param {object} oSettings dataTables settings object
+ * @memberof DataTable#oApi
+ */
+ function _fnFeatureHtmlFilter ( settings )
+ {
+ var classes = settings.oClasses;
+ var tableId = settings.sTableId;
+ var language = settings.oLanguage;
+ var previousSearch = settings.oPreviousSearch;
+ var features = settings.aanFeatures;
+ var input = '<input type="search" class="'+classes.sFilterInput+'"/>';
+
+ var str = language.sSearch;
+ str = str.match(/_INPUT_/) ?
+ str.replace('_INPUT_', input) :
+ str+input;
+
+ var filter = $('<div/>', {
+ 'id': ! features.f ? tableId+'_filter' : null,
+ 'class': classes.sFilter
+ } )
+ .append( $('<label/>' ).append( str ) );
+
+ var searchFn = function() {
+ /* Update all other filter input elements for the new display */
+ var n = features.f;
+ var val = !this.value ? "" : this.value; // mental IE8 fix :-(
+
+ /* Now do the filter */
+ if ( val != previousSearch.sSearch ) {
+ _fnFilterComplete( settings, {
+ "sSearch": val,
+ "bRegex": previousSearch.bRegex,
+ "bSmart": previousSearch.bSmart ,
+ "bCaseInsensitive": previousSearch.bCaseInsensitive
+ } );
+
+ // Need to redraw, without resorting
+ settings._iDisplayStart = 0;
+ _fnDraw( settings );
+ }
+ };
+
+ var searchDelay = settings.searchDelay !== null ?
+ settings.searchDelay :
+ _fnDataSource( settings ) === 'ssp' ?
+ 400 :
+ 0;
+
+ var jqFilter = $('input', filter)
+ .val( previousSearch.sSearch )
+ .attr( 'placeholder', language.sSearchPlaceholder )
+ .bind(
+ 'keyup.DT search.DT input.DT paste.DT cut.DT',
+ searchDelay ?
+ _fnThrottle( searchFn, searchDelay ) :
+ searchFn
+ )
+ .bind( 'keypress.DT', function(e) {
+ /* Prevent form submission */
+ if ( e.keyCode == 13 ) {
+ return false;
+ }
+ } )
+ .attr('aria-controls', tableId);
+
+ // Update the input elements whenever the table is filtered
+ $(settings.nTable).on( 'search.dt.DT', function ( ev, s ) {
+ if ( settings === s ) {
+ // IE9 throws an 'unknown error' if document.activeElement is used
+ // inside an iframe or frame...
+ try {
+ if ( jqFilter[0] !== document.activeElement ) {
+ jqFilter.val( previousSearch.sSearch );
+ }
+ }
+ catch ( e ) {}
+ }
+ } );
+
+ return filter[0];
+ }
+
+
+ /**
+ * Filter the table using both the global filter and column based filtering
+ * @param {object} oSettings dataTables settings object
+ * @param {object} oSearch search information
+ * @param {int} [iForce] force a research of the master array (1) or not (undefined or 0)
+ * @memberof DataTable#oApi
+ */
+ function _fnFilterComplete ( oSettings, oInput, iForce )
+ {
+ var oPrevSearch = oSettings.oPreviousSearch;
+ var aoPrevSearch = oSettings.aoPreSearchCols;
+ var fnSaveFilter = function ( oFilter ) {
+ /* Save the filtering values */
+ oPrevSearch.sSearch = oFilter.sSearch;
+ oPrevSearch.bRegex = oFilter.bRegex;
+ oPrevSearch.bSmart = oFilter.bSmart;
+ oPrevSearch.bCaseInsensitive = oFilter.bCaseInsensitive;
+ };
+ var fnRegex = function ( o ) {
+ // Backwards compatibility with the bEscapeRegex option
+ return o.bEscapeRegex !== undefined ? !o.bEscapeRegex : o.bRegex;
+ };
+
+ // Resolve any column types that are unknown due to addition or invalidation
+ // @todo As per sort - can this be moved into an event handler?
+ _fnColumnTypes( oSettings );
+
+ /* In server-side processing all filtering is done by the server, so no point hanging around here */
+ if ( _fnDataSource( oSettings ) != 'ssp' )
+ {
+ /* Global filter */
+ _fnFilter( oSettings, oInput.sSearch, iForce, fnRegex(oInput), oInput.bSmart, oInput.bCaseInsensitive );
+ fnSaveFilter( oInput );
+
+ /* Now do the individual column filter */
+ for ( var i=0 ; i<aoPrevSearch.length ; i++ )
+ {
+ _fnFilterColumn( oSettings, aoPrevSearch[i].sSearch, i, fnRegex(aoPrevSearch[i]),
+ aoPrevSearch[i].bSmart, aoPrevSearch[i].bCaseInsensitive );
+ }
+
+ /* Custom filtering */
+ _fnFilterCustom( oSettings );
+ }
+ else
+ {
+ fnSaveFilter( oInput );
+ }
+
+ /* Tell the draw function we have been filtering */
+ oSettings.bFiltered = true;
+ _fnCallbackFire( oSettings, null, 'search', [oSettings] );
+ }
+
+
+ /**
+ * Apply custom filtering functions
+ * @param {object} oSettings dataTables settings object
+ * @memberof DataTable#oApi
+ */
+ function _fnFilterCustom( settings )
+ {
+ var filters = DataTable.ext.search;
+ var displayRows = settings.aiDisplay;
+ var row, rowIdx;
+
+ for ( var i=0, ien=filters.length ; i<ien ; i++ ) {
+ var rows = [];
+
+ // Loop over each row and see if it should be included
+ for ( var j=0, jen=displayRows.length ; j<jen ; j++ ) {
+ rowIdx = displayRows[ j ];
+ row = settings.aoData[ rowIdx ];
+
+ if ( filters[i]( settings, row._aFilterData, rowIdx, row._aData, j ) ) {
+ rows.push( rowIdx );
+ }
+ }
+
+ // So the array reference doesn't break set the results into the
+ // existing array
+ displayRows.length = 0;
+ $.merge( displayRows, rows );
+ }
+ }
+
+
+ /**
+ * Filter the table on a per-column basis
+ * @param {object} oSettings dataTables settings object
+ * @param {string} sInput string to filter on
+ * @param {int} iColumn column to filter
+ * @param {bool} bRegex treat search string as a regular expression or not
+ * @param {bool} bSmart use smart filtering or not
+ * @param {bool} bCaseInsensitive Do case insenstive matching or not
+ * @memberof DataTable#oApi
+ */
+ function _fnFilterColumn ( settings, searchStr, colIdx, regex, smart, caseInsensitive )
+ {
+ if ( searchStr === '' ) {
+ return;
+ }
+
+ var data;
+ var display = settings.aiDisplay;
+ var rpSearch = _fnFilterCreateSearch( searchStr, regex, smart, caseInsensitive );
+
+ for ( var i=display.length-1 ; i>=0 ; i-- ) {
+ data = settings.aoData[ display[i] ]._aFilterData[ colIdx ];
+
+ if ( ! rpSearch.test( data ) ) {
+ display.splice( i, 1 );
+ }
+ }
+ }
+
+
+ /**
+ * Filter the data table based on user input and draw the table
+ * @param {object} settings dataTables settings object
+ * @param {string} input string to filter on
+ * @param {int} force optional - force a research of the master array (1) or not (undefined or 0)
+ * @param {bool} regex treat as a regular expression or not
+ * @param {bool} smart perform smart filtering or not
+ * @param {bool} caseInsensitive Do case insenstive matching or not
+ * @memberof DataTable#oApi
+ */
+ function _fnFilter( settings, input, force, regex, smart, caseInsensitive )
+ {
+ var rpSearch = _fnFilterCreateSearch( input, regex, smart, caseInsensitive );
+ var prevSearch = settings.oPreviousSearch.sSearch;
+ var displayMaster = settings.aiDisplayMaster;
+ var display, invalidated, i;
+
+ // Need to take account of custom filtering functions - always filter
+ if ( DataTable.ext.search.length !== 0 ) {
+ force = true;
+ }
+
+ // Check if any of the rows were invalidated
+ invalidated = _fnFilterData( settings );
+
+ // If the input is blank - we just want the full data set
+ if ( input.length <= 0 ) {
+ settings.aiDisplay = displayMaster.slice();
+ }
+ else {
+ // New search - start from the master array
+ if ( invalidated ||
+ force ||
+ prevSearch.length > input.length ||
+ input.indexOf(prevSearch) !== 0 ||
+ settings.bSorted // On resort, the display master needs to be
+ // re-filtered since indexes will have changed
+ ) {
+ settings.aiDisplay = displayMaster.slice();
+ }
+
+ // Search the display array
+ display = settings.aiDisplay;
+
+ for ( i=display.length-1 ; i>=0 ; i-- ) {
+ if ( ! rpSearch.test( settings.aoData[ display[i] ]._sFilterRow ) ) {
+ display.splice( i, 1 );
+ }
+ }
+ }
+ }
+
+
+ /**
+ * Build a regular expression object suitable for searching a table
+ * @param {string} sSearch string to search for
+ * @param {bool} bRegex treat as a regular expression or not
+ * @param {bool} bSmart perform smart filtering or not
+ * @param {bool} bCaseInsensitive Do case insensitive matching or not
+ * @returns {RegExp} constructed object
+ * @memberof DataTable#oApi
+ */
+ function _fnFilterCreateSearch( search, regex, smart, caseInsensitive )
+ {
+ search = regex ?
+ search :
+ _fnEscapeRegex( search );
+
+ if ( smart ) {
+ /* For smart filtering we want to allow the search to work regardless of
+ * word order. We also want double quoted text to be preserved, so word
+ * order is important - a la google. So this is what we want to
+ * generate:
+ *
+ * ^(?=.*?\bone\b)(?=.*?\btwo three\b)(?=.*?\bfour\b).*$
+ */
+ var a = $.map( search.match( /"[^"]+"|[^ ]+/g ) || [''], function ( word ) {
+ if ( word.charAt(0) === '"' ) {
+ var m = word.match( /^"(.*)"$/ );
+ word = m ? m[1] : word;
+ }
+
+ return word.replace('"', '');
+ } );
+
+ search = '^(?=.*?'+a.join( ')(?=.*?' )+').*$';
+ }
+
+ return new RegExp( search, caseInsensitive ? 'i' : '' );
+ }
+
+
+ /**
+ * Escape a string such that it can be used in a regular expression
+ * @param {string} sVal string to escape
+ * @returns {string} escaped string
+ * @memberof DataTable#oApi
+ */
+ function _fnEscapeRegex ( sVal )
+ {
+ return sVal.replace( _re_escape_regex, '\\$1' );
+ }
+
+
+
+ var __filter_div = $('<div>')[0];
+ var __filter_div_textContent = __filter_div.textContent !== undefined;
+
+ // Update the filtering data for each row if needed (by invalidation or first run)
+ function _fnFilterData ( settings )
+ {
+ var columns = settings.aoColumns;
+ var column;
+ var i, j, ien, jen, filterData, cellData, row;
+ var fomatters = DataTable.ext.type.search;
+ var wasInvalidated = false;
+
+ for ( i=0, ien=settings.aoData.length ; i<ien ; i++ ) {
+ row = settings.aoData[i];
+
+ if ( ! row._aFilterData ) {
+ filterData = [];
+
+ for ( j=0, jen=columns.length ; j<jen ; j++ ) {
+ column = columns[j];
+
+ if ( column.bSearchable ) {
+ cellData = _fnGetCellData( settings, i, j, 'filter' );
+
+ if ( fomatters[ column.sType ] ) {
+ cellData = fomatters[ column.sType ]( cellData );
+ }
+
+ // Search in DataTables 1.10 is string based. In 1.11 this
+ // should be altered to also allow strict type checking.
+ if ( cellData === null ) {
+ cellData = '';
+ }
+
+ if ( typeof cellData !== 'string' && cellData.toString ) {
+ cellData = cellData.toString();
+ }
+ }
+ else {
+ cellData = '';
+ }
+
+ // If it looks like there is an HTML entity in the string,
+ // attempt to decode it so sorting works as expected. Note that
+ // we could use a single line of jQuery to do this, but the DOM
+ // method used here is much faster http://jsperf.com/html-decode
+ if ( cellData.indexOf && cellData.indexOf('&') !== -1 ) {
+ __filter_div.innerHTML = cellData;
+ cellData = __filter_div_textContent ?
+ __filter_div.textContent :
+ __filter_div.innerText;
+ }
+
+ if ( cellData.replace ) {
+ cellData = cellData.replace(/[\r\n]/g, '');
+ }
+
+ filterData.push( cellData );
+ }
+
+ row._aFilterData = filterData;
+ row._sFilterRow = filterData.join(' ');
+ wasInvalidated = true;
+ }
+ }
+
+ return wasInvalidated;
+ }
+
+
+ /**
+ * Convert from the internal Hungarian notation to camelCase for external
+ * interaction
+ * @param {object} obj Object to convert
+ * @returns {object} Inverted object
+ * @memberof DataTable#oApi
+ */
+ function _fnSearchToCamel ( obj )
+ {
+ return {
+ search: obj.sSearch,
+ smart: obj.bSmart,
+ regex: obj.bRegex,
+ caseInsensitive: obj.bCaseInsensitive
+ };
+ }
+
+
+
+ /**
+ * Convert from camelCase notation to the internal Hungarian. We could use the
+ * Hungarian convert function here, but this is cleaner
+ * @param {object} obj Object to convert
+ * @returns {object} Inverted object
+ * @memberof DataTable#oApi
+ */
+ function _fnSearchToHung ( obj )
+ {
+ return {
+ sSearch: obj.search,
+ bSmart: obj.smart,
+ bRegex: obj.regex,
+ bCaseInsensitive: obj.caseInsensitive
+ };
+ }
+
+ /**
+ * Generate the node required for the info display
+ * @param {object} oSettings dataTables settings object
+ * @returns {node} Information element
+ * @memberof DataTable#oApi
+ */
+ function _fnFeatureHtmlInfo ( settings )
+ {
+ var
+ tid = settings.sTableId,
+ nodes = settings.aanFeatures.i,
+ n = $('<div/>', {
+ 'class': settings.oClasses.sInfo,
+ 'id': ! nodes ? tid+'_info' : null
+ } );
+
+ if ( ! nodes ) {
+ // Update display on each draw
+ settings.aoDrawCallback.push( {
+ "fn": _fnUpdateInfo,
+ "sName": "information"
+ } );
+
+ n
+ .attr( 'role', 'status' )
+ .attr( 'aria-live', 'polite' );
+
+ // Table is described by our info div
+ $(settings.nTable).attr( 'aria-describedby', tid+'_info' );
+ }
+
+ return n[0];
+ }
+
+
+ /**
+ * Update the information elements in the display
+ * @param {object} settings dataTables settings object
+ * @memberof DataTable#oApi
+ */
+ function _fnUpdateInfo ( settings )
+ {
+ /* Show information about the table */
+ var nodes = settings.aanFeatures.i;
+ if ( nodes.length === 0 ) {
+ return;
+ }
+
+ var
+ lang = settings.oLanguage,
+ start = settings._iDisplayStart+1,
+ end = settings.fnDisplayEnd(),
+ max = settings.fnRecordsTotal(),
+ total = settings.fnRecordsDisplay(),
+ out = total ?
+ lang.sInfo :
+ lang.sInfoEmpty;
+
+ if ( total !== max ) {
+ /* Record set after filtering */
+ out += ' ' + lang.sInfoFiltered;
+ }
+
+ // Convert the macros
+ out += lang.sInfoPostFix;
+ out = _fnInfoMacros( settings, out );
+
+ var callback = lang.fnInfoCallback;
+ if ( callback !== null ) {
+ out = callback.call( settings.oInstance,
+ settings, start, end, max, total, out
+ );
+ }
+
+ $(nodes).html( out );
+ }
+
+
+ function _fnInfoMacros ( settings, str )
+ {
+ // When infinite scrolling, we are always starting at 1. _iDisplayStart is used only
+ // internally
+ var
+ formatter = settings.fnFormatNumber,
+ start = settings._iDisplayStart+1,
+ len = settings._iDisplayLength,
+ vis = settings.fnRecordsDisplay(),
+ all = len === -1;
+
+ return str.
+ replace(/_START_/g, formatter.call( settings, start ) ).
+ replace(/_END_/g, formatter.call( settings, settings.fnDisplayEnd() ) ).
+ replace(/_MAX_/g, formatter.call( settings, settings.fnRecordsTotal() ) ).
+ replace(/_TOTAL_/g, formatter.call( settings, vis ) ).
+ replace(/_PAGE_/g, formatter.call( settings, all ? 1 : Math.ceil( start / len ) ) ).
+ replace(/_PAGES_/g, formatter.call( settings, all ? 1 : Math.ceil( vis / len ) ) );
+ }
+
+
+
+ /**
+ * Draw the table for the first time, adding all required features
+ * @param {object} settings dataTables settings object
+ * @memberof DataTable#oApi
+ */
+ function _fnInitialise ( settings )
+ {
+ var i, iLen, iAjaxStart=settings.iInitDisplayStart;
+ var columns = settings.aoColumns, column;
+ var features = settings.oFeatures;
+ var deferLoading = settings.bDeferLoading; // value modified by the draw
+
+ /* Ensure that the table data is fully initialised */
+ if ( ! settings.bInitialised ) {
+ setTimeout( function(){ _fnInitialise( settings ); }, 200 );
+ return;
+ }
+
+ /* Show the display HTML options */
+ _fnAddOptionsHtml( settings );
+
+ /* Build and draw the header / footer for the table */
+ _fnBuildHead( settings );
+ _fnDrawHead( settings, settings.aoHeader );
+ _fnDrawHead( settings, settings.aoFooter );
+
+ /* Okay to show that something is going on now */
+ _fnProcessingDisplay( settings, true );
+
+ /* Calculate sizes for columns */
+ if ( features.bAutoWidth ) {
+ _fnCalculateColumnWidths( settings );
+ }
+
+ for ( i=0, iLen=columns.length ; i<iLen ; i++ ) {
+ column = columns[i];
+
+ if ( column.sWidth ) {
+ column.nTh.style.width = _fnStringToCss( column.sWidth );
+ }
+ }
+
+ _fnCallbackFire( settings, null, 'preInit', [settings] );
+
+ // If there is default sorting required - let's do it. The sort function
+ // will do the drawing for us. Otherwise we draw the table regardless of the
+ // Ajax source - this allows the table to look initialised for Ajax sourcing
+ // data (show 'loading' message possibly)
+ _fnReDraw( settings );
+
+ // Server-side processing init complete is done by _fnAjaxUpdateDraw
+ var dataSrc = _fnDataSource( settings );
+ if ( dataSrc != 'ssp' || deferLoading ) {
+ // if there is an ajax source load the data
+ if ( dataSrc == 'ajax' ) {
+ _fnBuildAjax( settings, [], function(json) {
+ var aData = _fnAjaxDataSrc( settings, json );
+
+ // Got the data - add it to the table
+ for ( i=0 ; i<aData.length ; i++ ) {
+ _fnAddData( settings, aData[i] );
+ }
+
+ // Reset the init display for cookie saving. We've already done
+ // a filter, and therefore cleared it before. So we need to make
+ // it appear 'fresh'
+ settings.iInitDisplayStart = iAjaxStart;
+
+ _fnReDraw( settings );
+
+ _fnProcessingDisplay( settings, false );
+ _fnInitComplete( settings, json );
+ }, settings );
+ }
+ else {
+ _fnProcessingDisplay( settings, false );
+ _fnInitComplete( settings );
+ }
+ }
+ }
+
+
+ /**
+ * Draw the table for the first time, adding all required features
+ * @param {object} oSettings dataTables settings object
+ * @param {object} [json] JSON from the server that completed the table, if using Ajax source
+ * with client-side processing (optional)
+ * @memberof DataTable#oApi
+ */
+ function _fnInitComplete ( settings, json )
+ {
+ settings._bInitComplete = true;
+
+ // When data was added after the initialisation (data or Ajax) we need to
+ // calculate the column sizing
+ if ( json || settings.oInit.aaData ) {
+ _fnAdjustColumnSizing( settings );
+ }
+
+ _fnCallbackFire( settings, null, 'plugin-init', [settings, json] );
+ _fnCallbackFire( settings, 'aoInitComplete', 'init', [settings, json] );
+ }
+
+
+ function _fnLengthChange ( settings, val )
+ {
+ var len = parseInt( val, 10 );
+ settings._iDisplayLength = len;
+
+ _fnLengthOverflow( settings );
+
+ // Fire length change event
+ _fnCallbackFire( settings, null, 'length', [settings, len] );
+ }
+
+
+ /**
+ * Generate the node required for user display length changing
+ * @param {object} settings dataTables settings object
+ * @returns {node} Display length feature node
+ * @memberof DataTable#oApi
+ */
+ function _fnFeatureHtmlLength ( settings )
+ {
+ var
+ classes = settings.oClasses,
+ tableId = settings.sTableId,
+ menu = settings.aLengthMenu,
+ d2 = $.isArray( menu[0] ),
+ lengths = d2 ? menu[0] : menu,
+ language = d2 ? menu[1] : menu;
+
+ var select = $('<select/>', {
+ 'name': tableId+'_length',
+ 'aria-controls': tableId,
+ 'class': classes.sLengthSelect
+ } );
+
+ for ( var i=0, ien=lengths.length ; i<ien ; i++ ) {
+ select[0][ i ] = new Option( language[i], lengths[i] );
+ }
+
+ var div = $('<div><label/></div>').addClass( classes.sLength );
+ if ( ! settings.aanFeatures.l ) {
+ div[0].id = tableId+'_length';
+ }
+
+ div.children().append(
+ settings.oLanguage.sLengthMenu.replace( '_MENU_', select[0].outerHTML )
+ );
+
+ // Can't use `select` variable as user might provide their own and the
+ // reference is broken by the use of outerHTML
+ $('select', div)
+ .val( settings._iDisplayLength )
+ .bind( 'change.DT', function(e) {
+ _fnLengthChange( settings, $(this).val() );
+ _fnDraw( settings );
+ } );
+
+ // Update node value whenever anything changes the table's length
+ $(settings.nTable).bind( 'length.dt.DT', function (e, s, len) {
+ if ( settings === s ) {
+ $('select', div).val( len );
+ }
+ } );
+
+ return div[0];
+ }
+
+
+
+ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Note that most of the paging logic is done in
+ * DataTable.ext.pager
+ */
+
+ /**
+ * Generate the node required for default pagination
+ * @param {object} oSettings dataTables settings object
+ * @returns {node} Pagination feature node
+ * @memberof DataTable#oApi
+ */
+ function _fnFeatureHtmlPaginate ( settings )
+ {
+ var
+ type = settings.sPaginationType,
+ plugin = DataTable.ext.pager[ type ],
+ modern = typeof plugin === 'function',
+ redraw = function( settings ) {
+ _fnDraw( settings );
+ },
+ node = $('<div/>').addClass( settings.oClasses.sPaging + type )[0],
+ features = settings.aanFeatures;
+
+ if ( ! modern ) {
+ plugin.fnInit( settings, node, redraw );
+ }
+
+ /* Add a draw callback for the pagination on first instance, to update the paging display */
+ if ( ! features.p )
+ {
+ node.id = settings.sTableId+'_paginate';
+
+ settings.aoDrawCallback.push( {
+ "fn": function( settings ) {
+ if ( modern ) {
+ var
+ start = settings._iDisplayStart,
+ len = settings._iDisplayLength,
+ visRecords = settings.fnRecordsDisplay(),
+ all = len === -1,
+ page = all ? 0 : Math.ceil( start / len ),
+ pages = all ? 1 : Math.ceil( visRecords / len ),
+ buttons = plugin(page, pages),
+ i, ien;
+
+ for ( i=0, ien=features.p.length ; i<ien ; i++ ) {
+ _fnRenderer( settings, 'pageButton' )(
+ settings, features.p[i], i, buttons, page, pages
+ );
+ }
+ }
+ else {
+ plugin.fnUpdate( settings, redraw );
+ }
+ },
+ "sName": "pagination"
+ } );
+ }
+
+ return node;
+ }
+
+
+ /**
+ * Alter the display settings to change the page
+ * @param {object} settings DataTables settings object
+ * @param {string|int} action Paging action to take: "first", "previous",
+ * "next" or "last" or page number to jump to (integer)
+ * @param [bool] redraw Automatically draw the update or not
+ * @returns {bool} true page has changed, false - no change
+ * @memberof DataTable#oApi
+ */
+ function _fnPageChange ( settings, action, redraw )
+ {
+ var
+ start = settings._iDisplayStart,
+ len = settings._iDisplayLength,
+ records = settings.fnRecordsDisplay();
+
+ if ( records === 0 || len === -1 )
+ {
+ start = 0;
+ }
+ else if ( typeof action === "number" )
+ {
+ start = action * len;
+
+ if ( start > records )
+ {
+ start = 0;
+ }
+ }
+ else if ( action == "first" )
+ {
+ start = 0;
+ }
+ else if ( action == "previous" )
+ {
+ start = len >= 0 ?
+ start - len :
+ 0;
+
+ if ( start < 0 )
+ {
+ start = 0;
+ }
+ }
+ else if ( action == "next" )
+ {
+ if ( start + len < records )
+ {
+ start += len;
+ }
+ }
+ else if ( action == "last" )
+ {
+ start = Math.floor( (records-1) / len) * len;
+ }
+ else
+ {
+ _fnLog( settings, 0, "Unknown paging action: "+action, 5 );
+ }
+
+ var changed = settings._iDisplayStart !== start;
+ settings._iDisplayStart = start;
+
+ if ( changed ) {
+ _fnCallbackFire( settings, null, 'page', [settings] );
+
+ if ( redraw ) {
+ _fnDraw( settings );
+ }
+ }
+
+ return changed;
+ }
+
+
+
+ /**
+ * Generate the node required for the processing node
+ * @param {object} settings dataTables settings object
+ * @returns {node} Processing element
+ * @memberof DataTable#oApi
+ */
+ function _fnFeatureHtmlProcessing ( settings )
+ {
+ return $('<div/>', {
+ 'id': ! settings.aanFeatures.r ? settings.sTableId+'_processing' : null,
+ 'class': settings.oClasses.sProcessing
+ } )
+ .html( settings.oLanguage.sProcessing )
+ .insertBefore( settings.nTable )[0];
+ }
+
+
+ /**
+ * Display or hide the processing indicator
+ * @param {object} settings dataTables settings object
+ * @param {bool} show Show the processing indicator (true) or not (false)
+ * @memberof DataTable#oApi
+ */
+ function _fnProcessingDisplay ( settings, show )
+ {
+ if ( settings.oFeatures.bProcessing ) {
+ $(settings.aanFeatures.r).css( 'display', show ? 'block' : 'none' );
+ }
+
+ _fnCallbackFire( settings, null, 'processing', [settings, show] );
+ }
+
+ /**
+ * Add any control elements for the table - specifically scrolling
+ * @param {object} settings dataTables settings object
+ * @returns {node} Node to add to the DOM
+ * @memberof DataTable#oApi
+ */
+ function _fnFeatureHtmlTable ( settings )
+ {
+ var table = $(settings.nTable);
+
+ // Add the ARIA grid role to the table
+ table.attr( 'role', 'grid' );
+
+ // Scrolling from here on in
+ var scroll = settings.oScroll;
+
+ if ( scroll.sX === '' && scroll.sY === '' ) {
+ return settings.nTable;
+ }
+
+ var scrollX = scroll.sX;
+ var scrollY = scroll.sY;
+ var classes = settings.oClasses;
+ var caption = table.children('caption');
+ var captionSide = caption.length ? caption[0]._captionSide : null;
+ var headerClone = $( table[0].cloneNode(false) );
+ var footerClone = $( table[0].cloneNode(false) );
+ var footer = table.children('tfoot');
+ var _div = '<div/>';
+ var size = function ( s ) {
+ return !s ? null : _fnStringToCss( s );
+ };
+
+ if ( ! footer.length ) {
+ footer = null;
+ }
+
+ /*
+ * The HTML structure that we want to generate in this function is:
+ * div - scroller
+ * div - scroll head
+ * div - scroll head inner
+ * table - scroll head table
+ * thead - thead
+ * div - scroll body
+ * table - table (master table)
+ * thead - thead clone for sizing
+ * tbody - tbody
+ * div - scroll foot
+ * div - scroll foot inner
+ * table - scroll foot table
+ * tfoot - tfoot
+ */
+ var scroller = $( _div, { 'class': classes.sScrollWrapper } )
+ .append(
+ $(_div, { 'class': classes.sScrollHead } )
+ .css( {
+ overflow: 'hidden',
+ position: 'relative',
+ border: 0,
+ width: scrollX ? size(scrollX) : '100%'
+ } )
+ .append(
+ $(_div, { 'class': classes.sScrollHeadInner } )
+ .css( {
+ 'box-sizing': 'content-box',
+ width: scroll.sXInner || '100%'
+ } )
+ .append(
+ headerClone
+ .removeAttr('id')
+ .css( 'margin-left', 0 )
+ .append( captionSide === 'top' ? caption : null )
+ .append(
+ table.children('thead')
+ )
+ )
+ )
+ )
+ .append(
+ $(_div, { 'class': classes.sScrollBody } )
+ .css( {
+ position: 'relative',
+ overflow: 'auto',
+ width: size( scrollX )
+ } )
+ .append( table )
+ );
+
+ if ( footer ) {
+ scroller.append(
+ $(_div, { 'class': classes.sScrollFoot } )
+ .css( {
+ overflow: 'hidden',
+ border: 0,
+ width: scrollX ? size(scrollX) : '100%'
+ } )
+ .append(
+ $(_div, { 'class': classes.sScrollFootInner } )
+ .append(
+ footerClone
+ .removeAttr('id')
+ .css( 'margin-left', 0 )
+ .append( captionSide === 'bottom' ? caption : null )
+ .append(
+ table.children('tfoot')
+ )
+ )
+ )
+ );
+ }
+
+ var children = scroller.children();
+ var scrollHead = children[0];
+ var scrollBody = children[1];
+ var scrollFoot = footer ? children[2] : null;
+
+ // When the body is scrolled, then we also want to scroll the headers
+ if ( scrollX ) {
+ $(scrollBody).on( 'scroll.DT', function (e) {
+ var scrollLeft = this.scrollLeft;
+
+ scrollHead.scrollLeft = scrollLeft;
+
+ if ( footer ) {
+ scrollFoot.scrollLeft = scrollLeft;
+ }
+ } );
+ }
+
+ $(scrollBody).css(
+ scrollY && scroll.bCollapse ? 'max-height' : 'height',
+ scrollY
+ );
+
+ settings.nScrollHead = scrollHead;
+ settings.nScrollBody = scrollBody;
+ settings.nScrollFoot = scrollFoot;
+
+ // On redraw - align columns
+ settings.aoDrawCallback.push( {
+ "fn": _fnScrollDraw,
+ "sName": "scrolling"
+ } );
+
+ return scroller[0];
+ }
+
+
+
+ /**
+ * Update the header, footer and body tables for resizing - i.e. column
+ * alignment.
+ *
+ * Welcome to the most horrible function DataTables. The process that this
+ * function follows is basically:
+ * 1. Re-create the table inside the scrolling div
+ * 2. Take live measurements from the DOM
+ * 3. Apply the measurements to align the columns
+ * 4. Clean up
+ *
+ * @param {object} settings dataTables settings object
+ * @memberof DataTable#oApi
+ */
+ function _fnScrollDraw ( settings )
+ {
+ // Given that this is such a monster function, a lot of variables are use
+ // to try and keep the minimised size as small as possible
+ var
+ scroll = settings.oScroll,
+ scrollX = scroll.sX,
+ scrollXInner = scroll.sXInner,
+ scrollY = scroll.sY,
+ barWidth = scroll.iBarWidth,
+ divHeader = $(settings.nScrollHead),
+ divHeaderStyle = divHeader[0].style,
+ divHeaderInner = divHeader.children('div'),
+ divHeaderInnerStyle = divHeaderInner[0].style,
+ divHeaderTable = divHeaderInner.children('table'),
+ divBodyEl = settings.nScrollBody,
+ divBody = $(divBodyEl),
+ divBodyStyle = divBodyEl.style,
+ divFooter = $(settings.nScrollFoot),
+ divFooterInner = divFooter.children('div'),
+ divFooterTable = divFooterInner.children('table'),
+ header = $(settings.nTHead),
+ table = $(settings.nTable),
+ tableEl = table[0],
+ tableStyle = tableEl.style,
+ footer = settings.nTFoot ? $(settings.nTFoot) : null,
+ browser = settings.oBrowser,
+ ie67 = browser.bScrollOversize,
+ headerTrgEls, footerTrgEls,
+ headerSrcEls, footerSrcEls,
+ headerCopy, footerCopy,
+ headerWidths=[], footerWidths=[],
+ headerContent=[],
+ idx, correction, sanityWidth,
+ zeroOut = function(nSizer) {
+ var style = nSizer.style;
+ style.paddingTop = "0";
+ style.paddingBottom = "0";
+ style.borderTopWidth = "0";
+ style.borderBottomWidth = "0";
+ style.height = 0;
+ };
+
+ // If the scrollbar visibility has changed from the last draw, we need to
+ // adjust the column sizes as the table width will have changed to account
+ // for the scrollbar
+ var scrollBarVis = divBodyEl.scrollHeight > divBodyEl.clientHeight;
+
+ if ( settings.scrollBarVis !== scrollBarVis && settings.scrollBarVis !== undefined ) {
+ settings.scrollBarVis = scrollBarVis;
+ _fnAdjustColumnSizing( settings );
+ return; // adjust column sizing will call this function again
+ }
+ else {
+ settings.scrollBarVis = scrollBarVis;
+ }
+
+ /*
+ * 1. Re-create the table inside the scrolling div
+ */
+
+ // Remove the old minimised thead and tfoot elements in the inner table
+ table.children('thead, tfoot').remove();
+
+ // Clone the current header and footer elements and then place it into the inner table
+ headerCopy = header.clone().prependTo( table );
+ headerTrgEls = header.find('tr'); // original header is in its own table
+ headerSrcEls = headerCopy.find('tr');
+ headerCopy.find('th, td').removeAttr('tabindex');
+
+ if ( footer ) {
+ footerCopy = footer.clone().prependTo( table );
+ footerTrgEls = footer.find('tr'); // the original tfoot is in its own table and must be sized
+ footerSrcEls = footerCopy.find('tr');
+ }
+
+
+ /*
+ * 2. Take live measurements from the DOM - do not alter the DOM itself!
+ */
+
+ // Remove old sizing and apply the calculated column widths
+ // Get the unique column headers in the newly created (cloned) header. We want to apply the
+ // calculated sizes to this header
+ if ( ! scrollX )
+ {
+ divBodyStyle.width = '100%';
+ divHeader[0].style.width = '100%';
+ }
+
+ $.each( _fnGetUniqueThs( settings, headerCopy ), function ( i, el ) {
+ idx = _fnVisibleToColumnIndex( settings, i );
+ el.style.width = settings.aoColumns[idx].sWidth;
+ } );
+
+ if ( footer ) {
+ _fnApplyToChildren( function(n) {
+ n.style.width = "";
+ }, footerSrcEls );
+ }
+
+ // Size the table as a whole
+ sanityWidth = table.outerWidth();
+ if ( scrollX === "" ) {
+ // No x scrolling
+ tableStyle.width = "100%";
+
+ // IE7 will make the width of the table when 100% include the scrollbar
+ // - which is shouldn't. When there is a scrollbar we need to take this
+ // into account.
+ if ( ie67 && (table.find('tbody').height() > divBodyEl.offsetHeight ||
+ divBody.css('overflow-y') == "scroll")
+ ) {
+ tableStyle.width = _fnStringToCss( table.outerWidth() - barWidth);
+ }
+
+ // Recalculate the sanity width
+ sanityWidth = table.outerWidth();
+ }
+ else if ( scrollXInner !== "" ) {
+ // legacy x scroll inner has been given - use it
+ tableStyle.width = _fnStringToCss(scrollXInner);
+
+ // Recalculate the sanity width
+ sanityWidth = table.outerWidth();
+ }
+
+ // Hidden header should have zero height, so remove padding and borders. Then
+ // set the width based on the real headers
+
+ // Apply all styles in one pass
+ _fnApplyToChildren( zeroOut, headerSrcEls );
+
+ // Read all widths in next pass
+ _fnApplyToChildren( function(nSizer) {
+ headerContent.push( nSizer.innerHTML );
+ headerWidths.push( _fnStringToCss( $(nSizer).css('width') ) );
+ }, headerSrcEls );
+
+ // Apply all widths in final pass
+ _fnApplyToChildren( function(nToSize, i) {
+ nToSize.style.width = headerWidths[i];
+ }, headerTrgEls );
+
+ $(headerSrcEls).height(0);
+
+ /* Same again with the footer if we have one */
+ if ( footer )
+ {
+ _fnApplyToChildren( zeroOut, footerSrcEls );
+
+ _fnApplyToChildren( function(nSizer) {
+ footerWidths.push( _fnStringToCss( $(nSizer).css('width') ) );
+ }, footerSrcEls );
+
+ _fnApplyToChildren( function(nToSize, i) {
+ nToSize.style.width = footerWidths[i];
+ }, footerTrgEls );
+
+ $(footerSrcEls).height(0);
+ }
+
+
+ /*
+ * 3. Apply the measurements
+ */
+
+ // "Hide" the header and footer that we used for the sizing. We need to keep
+ // the content of the cell so that the width applied to the header and body
+ // both match, but we want to hide it completely. We want to also fix their
+ // width to what they currently are
+ _fnApplyToChildren( function(nSizer, i) {
+ nSizer.innerHTML = '<div class="dataTables_sizing" style="height:0;overflow:hidden;">'+headerContent[i]+'</div>';
+ nSizer.style.width = headerWidths[i];
+ }, headerSrcEls );
+
+ if ( footer )
+ {
+ _fnApplyToChildren( function(nSizer, i) {
+ nSizer.innerHTML = "";
+ nSizer.style.width = footerWidths[i];
+ }, footerSrcEls );
+ }
+
+ // Sanity check that the table is of a sensible width. If not then we are going to get
+ // misalignment - try to prevent this by not allowing the table to shrink below its min width
+ if ( table.outerWidth() < sanityWidth )
+ {
+ // The min width depends upon if we have a vertical scrollbar visible or not */
+ correction = ((divBodyEl.scrollHeight > divBodyEl.offsetHeight ||
+ divBody.css('overflow-y') == "scroll")) ?
+ sanityWidth+barWidth :
+ sanityWidth;
+
+ // IE6/7 are a law unto themselves...
+ if ( ie67 && (divBodyEl.scrollHeight >
+ divBodyEl.offsetHeight || divBody.css('overflow-y') == "scroll")
+ ) {
+ tableStyle.width = _fnStringToCss( correction-barWidth );
+ }
+
+ // And give the user a warning that we've stopped the table getting too small
+ if ( scrollX === "" || scrollXInner !== "" ) {
+ _fnLog( settings, 1, 'Possible column misalignment', 6 );
+ }
+ }
+ else
+ {
+ correction = '100%';
+ }
+
+ // Apply to the container elements
+ divBodyStyle.width = _fnStringToCss( correction );
+ divHeaderStyle.width = _fnStringToCss( correction );
+
+ if ( footer ) {
+ settings.nScrollFoot.style.width = _fnStringToCss( correction );
+ }
+
+
+ /*
+ * 4. Clean up
+ */
+ if ( ! scrollY ) {
+ /* IE7< puts a vertical scrollbar in place (when it shouldn't be) due to subtracting
+ * the scrollbar height from the visible display, rather than adding it on. We need to
+ * set the height in order to sort this. Don't want to do it in any other browsers.
+ */
+ if ( ie67 ) {
+ divBodyStyle.height = _fnStringToCss( tableEl.offsetHeight+barWidth );
+ }
+ }
+
+ /* Finally set the width's of the header and footer tables */
+ var iOuterWidth = table.outerWidth();
+ divHeaderTable[0].style.width = _fnStringToCss( iOuterWidth );
+ divHeaderInnerStyle.width = _fnStringToCss( iOuterWidth );
+
+ // Figure out if there are scrollbar present - if so then we need a the header and footer to
+ // provide a bit more space to allow "overflow" scrolling (i.e. past the scrollbar)
+ var bScrolling = table.height() > divBodyEl.clientHeight || divBody.css('overflow-y') == "scroll";
+ var padding = 'padding' + (browser.bScrollbarLeft ? 'Left' : 'Right' );
+ divHeaderInnerStyle[ padding ] = bScrolling ? barWidth+"px" : "0px";
+
+ if ( footer ) {
+ divFooterTable[0].style.width = _fnStringToCss( iOuterWidth );
+ divFooterInner[0].style.width = _fnStringToCss( iOuterWidth );
+ divFooterInner[0].style[padding] = bScrolling ? barWidth+"px" : "0px";
+ }
+
+ /* Adjust the position of the header in case we loose the y-scrollbar */
+ divBody.scroll();
+
+ // If sorting or filtering has occurred, jump the scrolling back to the top
+ // only if we aren't holding the position
+ if ( (settings.bSorted || settings.bFiltered) && ! settings._drawHold ) {
+ divBodyEl.scrollTop = 0;
+ }
+ }
+
+
+
+ /**
+ * Apply a given function to the display child nodes of an element array (typically
+ * TD children of TR rows
+ * @param {function} fn Method to apply to the objects
+ * @param array {nodes} an1 List of elements to look through for display children
+ * @param array {nodes} an2 Another list (identical structure to the first) - optional
+ * @memberof DataTable#oApi
+ */
+ function _fnApplyToChildren( fn, an1, an2 )
+ {
+ var index=0, i=0, iLen=an1.length;
+ var nNode1, nNode2;
+
+ while ( i < iLen ) {
+ nNode1 = an1[i].firstChild;
+ nNode2 = an2 ? an2[i].firstChild : null;
+
+ while ( nNode1 ) {
+ if ( nNode1.nodeType === 1 ) {
+ if ( an2 ) {
+ fn( nNode1, nNode2, index );
+ }
+ else {
+ fn( nNode1, index );
+ }
+
+ index++;
+ }
+
+ nNode1 = nNode1.nextSibling;
+ nNode2 = an2 ? nNode2.nextSibling : null;
+ }
+
+ i++;
+ }
+ }
+
+
+
+ var __re_html_remove = /<.*?>/g;
+
+
+ /**
+ * Calculate the width of columns for the table
+ * @param {object} oSettings dataTables settings object
+ * @memberof DataTable#oApi
+ */
+ function _fnCalculateColumnWidths ( oSettings )
+ {
+ var
+ table = oSettings.nTable,
+ columns = oSettings.aoColumns,
+ scroll = oSettings.oScroll,
+ scrollY = scroll.sY,
+ scrollX = scroll.sX,
+ scrollXInner = scroll.sXInner,
+ columnCount = columns.length,
+ visibleColumns = _fnGetColumns( oSettings, 'bVisible' ),
+ headerCells = $('th', oSettings.nTHead),
+ tableWidthAttr = table.getAttribute('width'), // from DOM element
+ tableContainer = table.parentNode,
+ userInputs = false,
+ i, column, columnIdx, width, outerWidth,
+ browser = oSettings.oBrowser,
+ ie67 = browser.bScrollOversize;
+
+ var styleWidth = table.style.width;
+ if ( styleWidth && styleWidth.indexOf('%') !== -1 ) {
+ tableWidthAttr = styleWidth;
+ }
+
+ /* Convert any user input sizes into pixel sizes */
+ for ( i=0 ; i<visibleColumns.length ; i++ ) {
+ column = columns[ visibleColumns[i] ];
+
+ if ( column.sWidth !== null ) {
+ column.sWidth = _fnConvertToWidth( column.sWidthOrig, tableContainer );
+
+ userInputs = true;
+ }
+ }
+
+ /* If the number of columns in the DOM equals the number that we have to
+ * process in DataTables, then we can use the offsets that are created by
+ * the web- browser. No custom sizes can be set in order for this to happen,
+ * nor scrolling used
+ */
+ if ( ie67 || ! userInputs && ! scrollX && ! scrollY &&
+ columnCount == _fnVisbleColumns( oSettings ) &&
+ columnCount == headerCells.length
+ ) {
+ for ( i=0 ; i<columnCount ; i++ ) {
+ var colIdx = _fnVisibleToColumnIndex( oSettings, i );
+
+ if ( colIdx !== null ) {
+ columns[ colIdx ].sWidth = _fnStringToCss( headerCells.eq(i).width() );
+ }
+ }
+ }
+ else
+ {
+ // Otherwise construct a single row, worst case, table with the widest
+ // node in the data, assign any user defined widths, then insert it into
+ // the DOM and allow the browser to do all the hard work of calculating
+ // table widths
+ var tmpTable = $(table).clone() // don't use cloneNode - IE8 will remove events on the main table
+ .css( 'visibility', 'hidden' )
+ .removeAttr( 'id' );
+
+ // Clean up the table body
+ tmpTable.find('tbody tr').remove();
+ var tr = $('<tr/>').appendTo( tmpTable.find('tbody') );
+
+ // Clone the table header and footer - we can't use the header / footer
+ // from the cloned table, since if scrolling is active, the table's
+ // real header and footer are contained in different table tags
+ tmpTable.find('thead, tfoot').remove();
+ tmpTable
+ .append( $(oSettings.nTHead).clone() )
+ .append( $(oSettings.nTFoot).clone() );
+
+ // Remove any assigned widths from the footer (from scrolling)
+ tmpTable.find('tfoot th, tfoot td').css('width', '');
+
+ // Apply custom sizing to the cloned header
+ headerCells = _fnGetUniqueThs( oSettings, tmpTable.find('thead')[0] );
+
+ for ( i=0 ; i<visibleColumns.length ; i++ ) {
+ column = columns[ visibleColumns[i] ];
+
+ headerCells[i].style.width = column.sWidthOrig !== null && column.sWidthOrig !== '' ?
+ _fnStringToCss( column.sWidthOrig ) :
+ '';
+
+ // For scrollX we need to force the column width otherwise the
+ // browser will collapse it. If this width is smaller than the
+ // width the column requires, then it will have no effect
+ if ( column.sWidthOrig && scrollX ) {
+ $( headerCells[i] ).append( $('<div/>').css( {
+ width: column.sWidthOrig,
+ margin: 0,
+ padding: 0,
+ border: 0,
+ height: 1
+ } ) );
+ }
+ }
+
+ // Find the widest cell for each column and put it into the table
+ if ( oSettings.aoData.length ) {
+ for ( i=0 ; i<visibleColumns.length ; i++ ) {
+ columnIdx = visibleColumns[i];
+ column = columns[ columnIdx ];
+
+ $( _fnGetWidestNode( oSettings, columnIdx ) )
+ .clone( false )
+ .append( column.sContentPadding )
+ .appendTo( tr );
+ }
+ }
+
+ // Table has been built, attach to the document so we can work with it.
+ // A holding element is used, positioned at the top of the container
+ // with minimal height, so it has no effect on if the container scrolls
+ // or not. Otherwise it might trigger scrolling when it actually isn't
+ // needed
+ var holder = $('<div/>').css( scrollX || scrollY ?
+ {
+ position: 'absolute',
+ top: 0,
+ left: 0,
+ height: 1,
+ right: 0,
+ overflow: 'hidden'
+ } :
+ {}
+ )
+ .append( tmpTable )
+ .appendTo( tableContainer );
+
+ // When scrolling (X or Y) we want to set the width of the table as
+ // appropriate. However, when not scrolling leave the table width as it
+ // is. This results in slightly different, but I think correct behaviour
+ if ( scrollX && scrollXInner ) {
+ tmpTable.width( scrollXInner );
+ }
+ else if ( scrollX ) {
+ tmpTable.css( 'width', 'auto' );
+ tmpTable.removeAttr('width');
+
+ // If there is no width attribute or style, then allow the table to
+ // collapse
+ if ( tmpTable.width() < tableContainer.clientWidth && tableWidthAttr ) {
+ tmpTable.width( tableContainer.clientWidth );
+ }
+ }
+ else if ( scrollY ) {
+ tmpTable.width( tableContainer.clientWidth );
+ }
+ else if ( tableWidthAttr ) {
+ tmpTable.width( tableWidthAttr );
+ }
+
+ // Get the width of each column in the constructed table - we need to
+ // know the inner width (so it can be assigned to the other table's
+ // cells) and the outer width so we can calculate the full width of the
+ // table. This is safe since DataTables requires a unique cell for each
+ // column, but if ever a header can span multiple columns, this will
+ // need to be modified.
+ var total = 0;
+ for ( i=0 ; i<visibleColumns.length ; i++ ) {
+ var cell = $(headerCells[i]);
+ var border = cell.outerWidth() - cell.width();
+
+ // Use getBounding... where possible (not IE8-) because it can give
+ // sub-pixel accuracy, which we then want to round up!
+ var bounding = browser.bBounding ?
+ Math.ceil( headerCells[i].getBoundingClientRect().width ) :
+ cell.outerWidth();
+
+ // Total is tracked to remove any sub-pixel errors as the outerWidth
+ // of the table might not equal the total given here (IE!).
+ total += bounding;
+
+ // Width for each column to use
+ columns[ visibleColumns[i] ].sWidth = _fnStringToCss( bounding - border );
+ }
+
+ table.style.width = _fnStringToCss( total );
+
+ // Finished with the table - ditch it
+ holder.remove();
+ }
+
+ // If there is a width attr, we want to attach an event listener which
+ // allows the table sizing to automatically adjust when the window is
+ // resized. Use the width attr rather than CSS, since we can't know if the
+ // CSS is a relative value or absolute - DOM read is always px.
+ if ( tableWidthAttr ) {
+ table.style.width = _fnStringToCss( tableWidthAttr );
+ }
+
+ if ( (tableWidthAttr || scrollX) && ! oSettings._reszEvt ) {
+ var bindResize = function () {
+ $(window).bind('resize.DT-'+oSettings.sInstance, _fnThrottle( function () {
+ _fnAdjustColumnSizing( oSettings );
+ } ) );
+ };
+
+ // IE6/7 will crash if we bind a resize event handler on page load.
+ // To be removed in 1.11 which drops IE6/7 support
+ if ( ie67 ) {
+ setTimeout( bindResize, 1000 );
+ }
+ else {
+ bindResize();
+ }
+
+ oSettings._reszEvt = true;
+ }
+ }
+
+
+ /**
+ * Throttle the calls to a function. Arguments and context are maintained for
+ * the throttled function
+ * @param {function} fn Function to be called
+ * @param {int} [freq=200] call frequency in mS
+ * @returns {function} wrapped function
+ * @memberof DataTable#oApi
+ */
+ function _fnThrottle( fn, freq ) {
+ var
+ frequency = freq !== undefined ? freq : 200,
+ last,
+ timer;
+
+ return function () {
+ var
+ that = this,
+ now = +new Date(),
+ args = arguments;
+
+ if ( last && now < last + frequency ) {
+ clearTimeout( timer );
+
+ timer = setTimeout( function () {
+ last = undefined;
+ fn.apply( that, args );
+ }, frequency );
+ }
+ else {
+ last = now;
+ fn.apply( that, args );
+ }
+ };
+ }
+
+
+ /**
+ * Convert a CSS unit width to pixels (e.g. 2em)
+ * @param {string} width width to be converted
+ * @param {node} parent parent to get the with for (required for relative widths) - optional
+ * @returns {int} width in pixels
+ * @memberof DataTable#oApi
+ */
+ function _fnConvertToWidth ( width, parent )
+ {
+ if ( ! width ) {
+ return 0;
+ }
+
+ var n = $('<div/>')
+ .css( 'width', _fnStringToCss( width ) )
+ .appendTo( parent || document.body );
+
+ var val = n[0].offsetWidth;
+ n.remove();
+
+ return val;
+ }
+
+
+ /**
+ * Get the widest node
+ * @param {object} settings dataTables settings object
+ * @param {int} colIdx column of interest
+ * @returns {node} widest table node
+ * @memberof DataTable#oApi
+ */
+ function _fnGetWidestNode( settings, colIdx )
+ {
+ var idx = _fnGetMaxLenString( settings, colIdx );
+ if ( idx < 0 ) {
+ return null;
+ }
+
+ var data = settings.aoData[ idx ];
+ return ! data.nTr ? // Might not have been created when deferred rendering
+ $('<td/>').html( _fnGetCellData( settings, idx, colIdx, 'display' ) )[0] :
+ data.anCells[ colIdx ];
+ }
+
+
+ /**
+ * Get the maximum strlen for each data column
+ * @param {object} settings dataTables settings object
+ * @param {int} colIdx column of interest
+ * @returns {string} max string length for each column
+ * @memberof DataTable#oApi
+ */
+ function _fnGetMaxLenString( settings, colIdx )
+ {
+ var s, max=-1, maxIdx = -1;
+
+ for ( var i=0, ien=settings.aoData.length ; i<ien ; i++ ) {
+ s = _fnGetCellData( settings, i, colIdx, 'display' )+'';
+ s = s.replace( __re_html_remove, '' );
+ s = s.replace( /&nbsp;/g, ' ' );
+
+ if ( s.length > max ) {
+ max = s.length;
+ maxIdx = i;
+ }
+ }
+
+ return maxIdx;
+ }
+
+
+ /**
+ * Append a CSS unit (only if required) to a string
+ * @param {string} value to css-ify
+ * @returns {string} value with css unit
+ * @memberof DataTable#oApi
+ */
+ function _fnStringToCss( s )
+ {
+ if ( s === null ) {
+ return '0px';
+ }
+
+ if ( typeof s == 'number' ) {
+ return s < 0 ?
+ '0px' :
+ s+'px';
+ }
+
+ // Check it has a unit character already
+ return s.match(/\d$/) ?
+ s+'px' :
+ s;
+ }
+
+
+
+ function _fnSortFlatten ( settings )
+ {
+ var
+ i, iLen, k, kLen,
+ aSort = [],
+ aiOrig = [],
+ aoColumns = settings.aoColumns,
+ aDataSort, iCol, sType, srcCol,
+ fixed = settings.aaSortingFixed,
+ fixedObj = $.isPlainObject( fixed ),
+ nestedSort = [],
+ add = function ( a ) {
+ if ( a.length && ! $.isArray( a[0] ) ) {
+ // 1D array
+ nestedSort.push( a );
+ }
+ else {
+ // 2D array
+ $.merge( nestedSort, a );
+ }
+ };
+
+ // Build the sort array, with pre-fix and post-fix options if they have been
+ // specified
+ if ( $.isArray( fixed ) ) {
+ add( fixed );
+ }
+
+ if ( fixedObj && fixed.pre ) {
+ add( fixed.pre );
+ }
+
+ add( settings.aaSorting );
+
+ if (fixedObj && fixed.post ) {
+ add( fixed.post );
+ }
+
+ for ( i=0 ; i<nestedSort.length ; i++ )
+ {
+ srcCol = nestedSort[i][0];
+ aDataSort = aoColumns[ srcCol ].aDataSort;
+
+ for ( k=0, kLen=aDataSort.length ; k<kLen ; k++ )
+ {
+ iCol = aDataSort[k];
+ sType = aoColumns[ iCol ].sType || 'string';
+
+ if ( nestedSort[i]._idx === undefined ) {
+ nestedSort[i]._idx = $.inArray( nestedSort[i][1], aoColumns[iCol].asSorting );
+ }
+
+ aSort.push( {
+ src: srcCol,
+ col: iCol,
+ dir: nestedSort[i][1],
+ index: nestedSort[i]._idx,
+ type: sType,
+ formatter: DataTable.ext.type.order[ sType+"-pre" ]
+ } );
+ }
+ }
+
+ return aSort;
+ }
+
+ /**
+ * Change the order of the table
+ * @param {object} oSettings dataTables settings object
+ * @memberof DataTable#oApi
+ * @todo This really needs split up!
+ */
+ function _fnSort ( oSettings )
+ {
+ var
+ i, ien, iLen, j, jLen, k, kLen,
+ sDataType, nTh,
+ aiOrig = [],
+ oExtSort = DataTable.ext.type.order,
+ aoData = oSettings.aoData,
+ aoColumns = oSettings.aoColumns,
+ aDataSort, data, iCol, sType, oSort,
+ formatters = 0,
+ sortCol,
+ displayMaster = oSettings.aiDisplayMaster,
+ aSort;
+
+ // Resolve any column types that are unknown due to addition or invalidation
+ // @todo Can this be moved into a 'data-ready' handler which is called when
+ // data is going to be used in the table?
+ _fnColumnTypes( oSettings );
+
+ aSort = _fnSortFlatten( oSettings );
+
+ for ( i=0, ien=aSort.length ; i<ien ; i++ ) {
+ sortCol = aSort[i];
+
+ // Track if we can use the fast sort algorithm
+ if ( sortCol.formatter ) {
+ formatters++;
+ }
+
+ // Load the data needed for the sort, for each cell
+ _fnSortData( oSettings, sortCol.col );
+ }
+
+ /* No sorting required if server-side or no sorting array */
+ if ( _fnDataSource( oSettings ) != 'ssp' && aSort.length !== 0 )
+ {
+ // Create a value - key array of the current row positions such that we can use their
+ // current position during the sort, if values match, in order to perform stable sorting
+ for ( i=0, iLen=displayMaster.length ; i<iLen ; i++ ) {
+ aiOrig[ displayMaster[i] ] = i;
+ }
+
+ /* Do the sort - here we want multi-column sorting based on a given data source (column)
+ * and sorting function (from oSort) in a certain direction. It's reasonably complex to
+ * follow on it's own, but this is what we want (example two column sorting):
+ * fnLocalSorting = function(a,b){
+ * var iTest;
+ * iTest = oSort['string-asc']('data11', 'data12');
+ * if (iTest !== 0)
+ * return iTest;
+ * iTest = oSort['numeric-desc']('data21', 'data22');
+ * if (iTest !== 0)
+ * return iTest;
+ * return oSort['numeric-asc']( aiOrig[a], aiOrig[b] );
+ * }
+ * Basically we have a test for each sorting column, if the data in that column is equal,
+ * test the next column. If all columns match, then we use a numeric sort on the row
+ * positions in the original data array to provide a stable sort.
+ *
+ * Note - I know it seems excessive to have two sorting methods, but the first is around
+ * 15% faster, so the second is only maintained for backwards compatibility with sorting
+ * methods which do not have a pre-sort formatting function.
+ */
+ if ( formatters === aSort.length ) {
+ // All sort types have formatting functions
+ displayMaster.sort( function ( a, b ) {
+ var
+ x, y, k, test, sort,
+ len=aSort.length,
+ dataA = aoData[a]._aSortData,
+ dataB = aoData[b]._aSortData;
+
+ for ( k=0 ; k<len ; k++ ) {
+ sort = aSort[k];
+
+ x = dataA[ sort.col ];
+ y = dataB[ sort.col ];
+
+ test = x<y ? -1 : x>y ? 1 : 0;
+ if ( test !== 0 ) {
+ return sort.dir === 'asc' ? test : -test;
+ }
+ }
+
+ x = aiOrig[a];
+ y = aiOrig[b];
+ return x<y ? -1 : x>y ? 1 : 0;
+ } );
+ }
+ else {
+ // Depreciated - remove in 1.11 (providing a plug-in option)
+ // Not all sort types have formatting methods, so we have to call their sorting
+ // methods.
+ displayMaster.sort( function ( a, b ) {
+ var
+ x, y, k, l, test, sort, fn,
+ len=aSort.length,
+ dataA = aoData[a]._aSortData,
+ dataB = aoData[b]._aSortData;
+
+ for ( k=0 ; k<len ; k++ ) {
+ sort = aSort[k];
+
+ x = dataA[ sort.col ];
+ y = dataB[ sort.col ];
+
+ fn = oExtSort[ sort.type+"-"+sort.dir ] || oExtSort[ "string-"+sort.dir ];
+ test = fn( x, y );
+ if ( test !== 0 ) {
+ return test;
+ }
+ }
+
+ x = aiOrig[a];
+ y = aiOrig[b];
+ return x<y ? -1 : x>y ? 1 : 0;
+ } );
+ }
+ }
+
+ /* Tell the draw function that we have sorted the data */
+ oSettings.bSorted = true;
+ }
+
+
+ function _fnSortAria ( settings )
+ {
+ var label;
+ var nextSort;
+ var columns = settings.aoColumns;
+ var aSort = _fnSortFlatten( settings );
+ var oAria = settings.oLanguage.oAria;
+
+ // ARIA attributes - need to loop all columns, to update all (removing old
+ // attributes as needed)
+ for ( var i=0, iLen=columns.length ; i<iLen ; i++ )
+ {
+ var col = columns[i];
+ var asSorting = col.asSorting;
+ var sTitle = col.sTitle.replace( /<.*?>/g, "" );
+ var th = col.nTh;
+
+ // IE7 is throwing an error when setting these properties with jQuery's
+ // attr() and removeAttr() methods...
+ th.removeAttribute('aria-sort');
+
+ /* In ARIA only the first sorting column can be marked as sorting - no multi-sort option */
+ if ( col.bSortable ) {
+ if ( aSort.length > 0 && aSort[0].col == i ) {
+ th.setAttribute('aria-sort', aSort[0].dir=="asc" ? "ascending" : "descending" );
+ nextSort = asSorting[ aSort[0].index+1 ] || asSorting[0];
+ }
+ else {
+ nextSort = asSorting[0];
+ }
+
+ label = sTitle + ( nextSort === "asc" ?
+ oAria.sSortAscending :
+ oAria.sSortDescending
+ );
+ }
+ else {
+ label = sTitle;
+ }
+
+ th.setAttribute('aria-label', label);
+ }
+ }
+
+
+ /**
+ * Function to run on user sort request
+ * @param {object} settings dataTables settings object
+ * @param {node} attachTo node to attach the handler to
+ * @param {int} colIdx column sorting index
+ * @param {boolean} [append=false] Append the requested sort to the existing
+ * sort if true (i.e. multi-column sort)
+ * @param {function} [callback] callback function
+ * @memberof DataTable#oApi
+ */
+ function _fnSortListener ( settings, colIdx, append, callback )
+ {
+ var col = settings.aoColumns[ colIdx ];
+ var sorting = settings.aaSorting;
+ var asSorting = col.asSorting;
+ var nextSortIdx;
+ var next = function ( a, overflow ) {
+ var idx = a._idx;
+ if ( idx === undefined ) {
+ idx = $.inArray( a[1], asSorting );
+ }
+
+ return idx+1 < asSorting.length ?
+ idx+1 :
+ overflow ?
+ null :
+ 0;
+ };
+
+ // Convert to 2D array if needed
+ if ( typeof sorting[0] === 'number' ) {
+ sorting = settings.aaSorting = [ sorting ];
+ }
+
+ // If appending the sort then we are multi-column sorting
+ if ( append && settings.oFeatures.bSortMulti ) {
+ // Are we already doing some kind of sort on this column?
+ var sortIdx = $.inArray( colIdx, _pluck(sorting, '0') );
+
+ if ( sortIdx !== -1 ) {
+ // Yes, modify the sort
+ nextSortIdx = next( sorting[sortIdx], true );
+
+ if ( nextSortIdx === null && sorting.length === 1 ) {
+ nextSortIdx = 0; // can't remove sorting completely
+ }
+
+ if ( nextSortIdx === null ) {
+ sorting.splice( sortIdx, 1 );
+ }
+ else {
+ sorting[sortIdx][1] = asSorting[ nextSortIdx ];
+ sorting[sortIdx]._idx = nextSortIdx;
+ }
+ }
+ else {
+ // No sort on this column yet
+ sorting.push( [ colIdx, asSorting[0], 0 ] );
+ sorting[sorting.length-1]._idx = 0;
+ }
+ }
+ else if ( sorting.length && sorting[0][0] == colIdx ) {
+ // Single column - already sorting on this column, modify the sort
+ nextSortIdx = next( sorting[0] );
+
+ sorting.length = 1;
+ sorting[0][1] = asSorting[ nextSortIdx ];
+ sorting[0]._idx = nextSortIdx;
+ }
+ else {
+ // Single column - sort only on this column
+ sorting.length = 0;
+ sorting.push( [ colIdx, asSorting[0] ] );
+ sorting[0]._idx = 0;
+ }
+
+ // Run the sort by calling a full redraw
+ _fnReDraw( settings );
+
+ // callback used for async user interaction
+ if ( typeof callback == 'function' ) {
+ callback( settings );
+ }
+ }
+
+
+ /**
+ * Attach a sort handler (click) to a node
+ * @param {object} settings dataTables settings object
+ * @param {node} attachTo node to attach the handler to
+ * @param {int} colIdx column sorting index
+ * @param {function} [callback] callback function
+ * @memberof DataTable#oApi
+ */
+ function _fnSortAttachListener ( settings, attachTo, colIdx, callback )
+ {
+ var col = settings.aoColumns[ colIdx ];
+
+ _fnBindAction( attachTo, {}, function (e) {
+ /* If the column is not sortable - don't to anything */
+ if ( col.bSortable === false ) {
+ return;
+ }
+
+ // If processing is enabled use a timeout to allow the processing
+ // display to be shown - otherwise to it synchronously
+ if ( settings.oFeatures.bProcessing ) {
+ _fnProcessingDisplay( settings, true );
+
+ setTimeout( function() {
+ _fnSortListener( settings, colIdx, e.shiftKey, callback );
+
+ // In server-side processing, the draw callback will remove the
+ // processing display
+ if ( _fnDataSource( settings ) !== 'ssp' ) {
+ _fnProcessingDisplay( settings, false );
+ }
+ }, 0 );
+ }
+ else {
+ _fnSortListener( settings, colIdx, e.shiftKey, callback );
+ }
+ } );
+ }
+
+
+ /**
+ * Set the sorting classes on table's body, Note: it is safe to call this function
+ * when bSort and bSortClasses are false
+ * @param {object} oSettings dataTables settings object
+ * @memberof DataTable#oApi
+ */
+ function _fnSortingClasses( settings )
+ {
+ var oldSort = settings.aLastSort;
+ var sortClass = settings.oClasses.sSortColumn;
+ var sort = _fnSortFlatten( settings );
+ var features = settings.oFeatures;
+ var i, ien, colIdx;
+
+ if ( features.bSort && features.bSortClasses ) {
+ // Remove old sorting classes
+ for ( i=0, ien=oldSort.length ; i<ien ; i++ ) {
+ colIdx = oldSort[i].src;
+
+ // Remove column sorting
+ $( _pluck( settings.aoData, 'anCells', colIdx ) )
+ .removeClass( sortClass + (i<2 ? i+1 : 3) );
+ }
+
+ // Add new column sorting
+ for ( i=0, ien=sort.length ; i<ien ; i++ ) {
+ colIdx = sort[i].src;
+
+ $( _pluck( settings.aoData, 'anCells', colIdx ) )
+ .addClass( sortClass + (i<2 ? i+1 : 3) );
+ }
+ }
+
+ settings.aLastSort = sort;
+ }
+
+
+ // Get the data to sort a column, be it from cache, fresh (populating the
+ // cache), or from a sort formatter
+ function _fnSortData( settings, idx )
+ {
+ // Custom sorting function - provided by the sort data type
+ var column = settings.aoColumns[ idx ];
+ var customSort = DataTable.ext.order[ column.sSortDataType ];
+ var customData;
+
+ if ( customSort ) {
+ customData = customSort.call( settings.oInstance, settings, idx,
+ _fnColumnIndexToVisible( settings, idx )
+ );
+ }
+
+ // Use / populate cache
+ var row, cellData;
+ var formatter = DataTable.ext.type.order[ column.sType+"-pre" ];
+
+ for ( var i=0, ien=settings.aoData.length ; i<ien ; i++ ) {
+ row = settings.aoData[i];
+
+ if ( ! row._aSortData ) {
+ row._aSortData = [];
+ }
+
+ if ( ! row._aSortData[idx] || customSort ) {
+ cellData = customSort ?
+ customData[i] : // If there was a custom sort function, use data from there
+ _fnGetCellData( settings, i, idx, 'sort' );
+
+ row._aSortData[ idx ] = formatter ?
+ formatter( cellData ) :
+ cellData;
+ }
+ }
+ }
+
+
+
+ /**
+ * Save the state of a table
+ * @param {object} oSettings dataTables settings object
+ * @memberof DataTable#oApi
+ */
+ function _fnSaveState ( settings )
+ {
+ if ( !settings.oFeatures.bStateSave || settings.bDestroying )
+ {
+ return;
+ }
+
+ /* Store the interesting variables */
+ var state = {
+ time: +new Date(),
+ start: settings._iDisplayStart,
+ length: settings._iDisplayLength,
+ order: $.extend( true, [], settings.aaSorting ),
+ search: _fnSearchToCamel( settings.oPreviousSearch ),
+ columns: $.map( settings.aoColumns, function ( col, i ) {
+ return {
+ visible: col.bVisible,
+ search: _fnSearchToCamel( settings.aoPreSearchCols[i] )
+ };
+ } )
+ };
+
+ _fnCallbackFire( settings, "aoStateSaveParams", 'stateSaveParams', [settings, state] );
+
+ settings.oSavedState = state;
+ settings.fnStateSaveCallback.call( settings.oInstance, settings, state );
+ }
+
+
+ /**
+ * Attempt to load a saved table state
+ * @param {object} oSettings dataTables settings object
+ * @param {object} oInit DataTables init object so we can override settings
+ * @memberof DataTable#oApi
+ */
+ function _fnLoadState ( settings, oInit )
+ {
+ var i, ien;
+ var columns = settings.aoColumns;
+
+ if ( ! settings.oFeatures.bStateSave ) {
+ return;
+ }
+
+ var state = settings.fnStateLoadCallback.call( settings.oInstance, settings );
+ if ( ! state || ! state.time ) {
+ return;
+ }
+
+ /* Allow custom and plug-in manipulation functions to alter the saved data set and
+ * cancelling of loading by returning false
+ */
+ var abStateLoad = _fnCallbackFire( settings, 'aoStateLoadParams', 'stateLoadParams', [settings, state] );
+ if ( $.inArray( false, abStateLoad ) !== -1 ) {
+ return;
+ }
+
+ /* Reject old data */
+ var duration = settings.iStateDuration;
+ if ( duration > 0 && state.time < +new Date() - (duration*1000) ) {
+ return;
+ }
+
+ // Number of columns have changed - all bets are off, no restore of settings
+ if ( columns.length !== state.columns.length ) {
+ return;
+ }
+
+ // Store the saved state so it might be accessed at any time
+ settings.oLoadedState = $.extend( true, {}, state );
+
+ // Restore key features - todo - for 1.11 this needs to be done by
+ // subscribed events
+ if ( state.start !== undefined ) {
+ settings._iDisplayStart = state.start;
+ settings.iInitDisplayStart = state.start;
+ }
+ if ( state.length !== undefined ) {
+ settings._iDisplayLength = state.length;
+ }
+
+ // Order
+ if ( state.order !== undefined ) {
+ settings.aaSorting = [];
+ $.each( state.order, function ( i, col ) {
+ settings.aaSorting.push( col[0] >= columns.length ?
+ [ 0, col[1] ] :
+ col
+ );
+ } );
+ }
+
+ // Search
+ if ( state.search !== undefined ) {
+ $.extend( settings.oPreviousSearch, _fnSearchToHung( state.search ) );
+ }
+
+ // Columns
+ for ( i=0, ien=state.columns.length ; i<ien ; i++ ) {
+ var col = state.columns[i];
+
+ // Visibility
+ if ( col.visible !== undefined ) {
+ columns[i].bVisible = col.visible;
+ }
+
+ // Search
+ if ( col.search !== undefined ) {
+ $.extend( settings.aoPreSearchCols[i], _fnSearchToHung( col.search ) );
+ }
+ }
+
+ _fnCallbackFire( settings, 'aoStateLoaded', 'stateLoaded', [settings, state] );
+ }
+
+
+ /**
+ * Return the settings object for a particular table
+ * @param {node} table table we are using as a dataTable
+ * @returns {object} Settings object - or null if not found
+ * @memberof DataTable#oApi
+ */
+ function _fnSettingsFromNode ( table )
+ {
+ var settings = DataTable.settings;
+ var idx = $.inArray( table, _pluck( settings, 'nTable' ) );
+
+ return idx !== -1 ?
+ settings[ idx ] :
+ null;
+ }
+
+
+ /**
+ * Log an error message
+ * @param {object} settings dataTables settings object
+ * @param {int} level log error messages, or display them to the user
+ * @param {string} msg error message
+ * @param {int} tn Technical note id to get more information about the error.
+ * @memberof DataTable#oApi
+ */
+ function _fnLog( settings, level, msg, tn )
+ {
+ msg = 'DataTables warning: '+
+ (settings ? 'table id='+settings.sTableId+' - ' : '')+msg;
+
+ if ( tn ) {
+ msg += '. For more information about this error, please see '+
+ 'http://datatables.net/tn/'+tn;
+ }
+
+ if ( ! level ) {
+ // Backwards compatibility pre 1.10
+ var ext = DataTable.ext;
+ var type = ext.sErrMode || ext.errMode;
+
+ if ( settings ) {
+ _fnCallbackFire( settings, null, 'error', [ settings, tn, msg ] );
+ }
+
+ if ( type == 'alert' ) {
+ alert( msg );
+ }
+ else if ( type == 'throw' ) {
+ throw new Error(msg);
+ }
+ else if ( typeof type == 'function' ) {
+ type( settings, tn, msg );
+ }
+ }
+ else if ( window.console && console.log ) {
+ console.log( msg );
+ }
+ }
+
+
+ /**
+ * See if a property is defined on one object, if so assign it to the other object
+ * @param {object} ret target object
+ * @param {object} src source object
+ * @param {string} name property
+ * @param {string} [mappedName] name to map too - optional, name used if not given
+ * @memberof DataTable#oApi
+ */
+ function _fnMap( ret, src, name, mappedName )
+ {
+ if ( $.isArray( name ) ) {
+ $.each( name, function (i, val) {
+ if ( $.isArray( val ) ) {
+ _fnMap( ret, src, val[0], val[1] );
+ }
+ else {
+ _fnMap( ret, src, val );
+ }
+ } );
+
+ return;
+ }
+
+ if ( mappedName === undefined ) {
+ mappedName = name;
+ }
+
+ if ( src[name] !== undefined ) {
+ ret[mappedName] = src[name];
+ }
+ }
+
+
+ /**
+ * Extend objects - very similar to jQuery.extend, but deep copy objects, and
+ * shallow copy arrays. The reason we need to do this, is that we don't want to
+ * deep copy array init values (such as aaSorting) since the dev wouldn't be
+ * able to override them, but we do want to deep copy arrays.
+ * @param {object} out Object to extend
+ * @param {object} extender Object from which the properties will be applied to
+ * out
+ * @param {boolean} breakRefs If true, then arrays will be sliced to take an
+ * independent copy with the exception of the `data` or `aaData` parameters
+ * if they are present. This is so you can pass in a collection to
+ * DataTables and have that used as your data source without breaking the
+ * references
+ * @returns {object} out Reference, just for convenience - out === the return.
+ * @memberof DataTable#oApi
+ * @todo This doesn't take account of arrays inside the deep copied objects.
+ */
+ function _fnExtend( out, extender, breakRefs )
+ {
+ var val;
+
+ for ( var prop in extender ) {
+ if ( extender.hasOwnProperty(prop) ) {
+ val = extender[prop];
+
+ if ( $.isPlainObject( val ) ) {
+ if ( ! $.isPlainObject( out[prop] ) ) {
+ out[prop] = {};
+ }
+ $.extend( true, out[prop], val );
+ }
+ else if ( breakRefs && prop !== 'data' && prop !== 'aaData' && $.isArray(val) ) {
+ out[prop] = val.slice();
+ }
+ else {
+ out[prop] = val;
+ }
+ }
+ }
+
+ return out;
+ }
+
+
+ /**
+ * Bind an event handers to allow a click or return key to activate the callback.
+ * This is good for accessibility since a return on the keyboard will have the
+ * same effect as a click, if the element has focus.
+ * @param {element} n Element to bind the action to
+ * @param {object} oData Data object to pass to the triggered function
+ * @param {function} fn Callback function for when the event is triggered
+ * @memberof DataTable#oApi
+ */
+ function _fnBindAction( n, oData, fn )
+ {
+ $(n)
+ .bind( 'click.DT', oData, function (e) {
+ n.blur(); // Remove focus outline for mouse users
+ fn(e);
+ } )
+ .bind( 'keypress.DT', oData, function (e){
+ if ( e.which === 13 ) {
+ e.preventDefault();
+ fn(e);
+ }
+ } )
+ .bind( 'selectstart.DT', function () {
+ /* Take the brutal approach to cancelling text selection */
+ return false;
+ } );
+ }
+
+
+ /**
+ * Register a callback function. Easily allows a callback function to be added to
+ * an array store of callback functions that can then all be called together.
+ * @param {object} oSettings dataTables settings object
+ * @param {string} sStore Name of the array storage for the callbacks in oSettings
+ * @param {function} fn Function to be called back
+ * @param {string} sName Identifying name for the callback (i.e. a label)
+ * @memberof DataTable#oApi
+ */
+ function _fnCallbackReg( oSettings, sStore, fn, sName )
+ {
+ if ( fn )
+ {
+ oSettings[sStore].push( {
+ "fn": fn,
+ "sName": sName
+ } );
+ }
+ }
+
+
+ /**
+ * Fire callback functions and trigger events. Note that the loop over the
+ * callback array store is done backwards! Further note that you do not want to
+ * fire off triggers in time sensitive applications (for example cell creation)
+ * as its slow.
+ * @param {object} settings dataTables settings object
+ * @param {string} callbackArr Name of the array storage for the callbacks in
+ * oSettings
+ * @param {string} eventName Name of the jQuery custom event to trigger. If
+ * null no trigger is fired
+ * @param {array} args Array of arguments to pass to the callback function /
+ * trigger
+ * @memberof DataTable#oApi
+ */
+ function _fnCallbackFire( settings, callbackArr, eventName, args )
+ {
+ var ret = [];
+
+ if ( callbackArr ) {
+ ret = $.map( settings[callbackArr].slice().reverse(), function (val, i) {
+ return val.fn.apply( settings.oInstance, args );
+ } );
+ }
+
+ if ( eventName !== null ) {
+ var e = $.Event( eventName+'.dt' );
+
+ $(settings.nTable).trigger( e, args );
+
+ ret.push( e.result );
+ }
+
+ return ret;
+ }
+
+
+ function _fnLengthOverflow ( settings )
+ {
+ var
+ start = settings._iDisplayStart,
+ end = settings.fnDisplayEnd(),
+ len = settings._iDisplayLength;
+
+ /* If we have space to show extra rows (backing up from the end point - then do so */
+ if ( start >= end )
+ {
+ start = end - len;
+ }
+
+ // Keep the start record on the current page
+ start -= (start % len);
+
+ if ( len === -1 || start < 0 )
+ {
+ start = 0;
+ }
+
+ settings._iDisplayStart = start;
+ }
+
+
+ function _fnRenderer( settings, type )
+ {
+ var renderer = settings.renderer;
+ var host = DataTable.ext.renderer[type];
+
+ if ( $.isPlainObject( renderer ) && renderer[type] ) {
+ // Specific renderer for this type. If available use it, otherwise use
+ // the default.
+ return host[renderer[type]] || host._;
+ }
+ else if ( typeof renderer === 'string' ) {
+ // Common renderer - if there is one available for this type use it,
+ // otherwise use the default
+ return host[renderer] || host._;
+ }
+
+ // Use the default
+ return host._;
+ }
+
+
+ /**
+ * Detect the data source being used for the table. Used to simplify the code
+ * a little (ajax) and to make it compress a little smaller.
+ *
+ * @param {object} settings dataTables settings object
+ * @returns {string} Data source
+ * @memberof DataTable#oApi
+ */
+ function _fnDataSource ( settings )
+ {
+ if ( settings.oFeatures.bServerSide ) {
+ return 'ssp';
+ }
+ else if ( settings.ajax || settings.sAjaxSource ) {
+ return 'ajax';
+ }
+ return 'dom';
+ }
+
+
+ DataTable = function( options )
+ {
+ /**
+ * Perform a jQuery selector action on the table's TR elements (from the tbody) and
+ * return the resulting jQuery object.
+ * @param {string|node|jQuery} sSelector jQuery selector or node collection to act on
+ * @param {object} [oOpts] Optional parameters for modifying the rows to be included
+ * @param {string} [oOpts.filter=none] Select TR elements that meet the current filter
+ * criterion ("applied") or all TR elements (i.e. no filter).
+ * @param {string} [oOpts.order=current] Order of the TR elements in the processed array.
+ * Can be either 'current', whereby the current sorting of the table is used, or
+ * 'original' whereby the original order the data was read into the table is used.
+ * @param {string} [oOpts.page=all] Limit the selection to the currently displayed page
+ * ("current") or not ("all"). If 'current' is given, then order is assumed to be
+ * 'current' and filter is 'applied', regardless of what they might be given as.
+ * @returns {object} jQuery object, filtered by the given selector.
+ * @dtopt API
+ * @deprecated Since v1.10
+ *
+ * @example
+ * $(document).ready(function() {
+ * var oTable = $('#example').dataTable();
+ *
+ * // Highlight every second row
+ * oTable.$('tr:odd').css('backgroundColor', 'blue');
+ * } );
+ *
+ * @example
+ * $(document).ready(function() {
+ * var oTable = $('#example').dataTable();
+ *
+ * // Filter to rows with 'Webkit' in them, add a background colour and then
+ * // remove the filter, thus highlighting the 'Webkit' rows only.
+ * oTable.fnFilter('Webkit');
+ * oTable.$('tr', {"search": "applied"}).css('backgroundColor', 'blue');
+ * oTable.fnFilter('');
+ * } );
+ */
+ this.$ = function ( sSelector, oOpts )
+ {
+ return this.api(true).$( sSelector, oOpts );
+ };
+
+
+ /**
+ * Almost identical to $ in operation, but in this case returns the data for the matched
+ * rows - as such, the jQuery selector used should match TR row nodes or TD/TH cell nodes
+ * rather than any descendants, so the data can be obtained for the row/cell. If matching
+ * rows are found, the data returned is the original data array/object that was used to
+ * create the row (or a generated array if from a DOM source).
+ *
+ * This method is often useful in-combination with $ where both functions are given the
+ * same parameters and the array indexes will match identically.
+ * @param {string|node|jQuery} sSelector jQuery selector or node collection to act on
+ * @param {object} [oOpts] Optional parameters for modifying the rows to be included
+ * @param {string} [oOpts.filter=none] Select elements that meet the current filter
+ * criterion ("applied") or all elements (i.e. no filter).
+ * @param {string} [oOpts.order=current] Order of the data in the processed array.
+ * Can be either 'current', whereby the current sorting of the table is used, or
+ * 'original' whereby the original order the data was read into the table is used.
+ * @param {string} [oOpts.page=all] Limit the selection to the currently displayed page
+ * ("current") or not ("all"). If 'current' is given, then order is assumed to be
+ * 'current' and filter is 'applied', regardless of what they might be given as.
+ * @returns {array} Data for the matched elements. If any elements, as a result of the
+ * selector, were not TR, TD or TH elements in the DataTable, they will have a null
+ * entry in the array.
+ * @dtopt API
+ * @deprecated Since v1.10
+ *
+ * @example
+ * $(document).ready(function() {
+ * var oTable = $('#example').dataTable();
+ *
+ * // Get the data from the first row in the table
+ * var data = oTable._('tr:first');
+ *
+ * // Do something useful with the data
+ * alert( "First cell is: "+data[0] );
+ * } );
+ *
+ * @example
+ * $(document).ready(function() {
+ * var oTable = $('#example').dataTable();
+ *
+ * // Filter to 'Webkit' and get all data for
+ * oTable.fnFilter('Webkit');
+ * var data = oTable._('tr', {"search": "applied"});
+ *
+ * // Do something with the data
+ * alert( data.length+" rows matched the search" );
+ * } );
+ */
+ this._ = function ( sSelector, oOpts )
+ {
+ return this.api(true).rows( sSelector, oOpts ).data();
+ };
+
+
+ /**
+ * Create a DataTables Api instance, with the currently selected tables for
+ * the Api's context.
+ * @param {boolean} [traditional=false] Set the API instance's context to be
+ * only the table referred to by the `DataTable.ext.iApiIndex` option, as was
+ * used in the API presented by DataTables 1.9- (i.e. the traditional mode),
+ * or if all tables captured in the jQuery object should be used.
+ * @return {DataTables.Api}
+ */
+ this.api = function ( traditional )
+ {
+ return traditional ?
+ new _Api(
+ _fnSettingsFromNode( this[ _ext.iApiIndex ] )
+ ) :
+ new _Api( this );
+ };
+
+
+ /**
+ * Add a single new row or multiple rows of data to the table. Please note
+ * that this is suitable for client-side processing only - if you are using
+ * server-side processing (i.e. "bServerSide": true), then to add data, you
+ * must add it to the data source, i.e. the server-side, through an Ajax call.
+ * @param {array|object} data The data to be added to the table. This can be:
+ * <ul>
+ * <li>1D array of data - add a single row with the data provided</li>
+ * <li>2D array of arrays - add multiple rows in a single call</li>
+ * <li>object - data object when using <i>mData</i></li>
+ * <li>array of objects - multiple data objects when using <i>mData</i></li>
+ * </ul>
+ * @param {bool} [redraw=true] redraw the table or not
+ * @returns {array} An array of integers, representing the list of indexes in
+ * <i>aoData</i> ({@link DataTable.models.oSettings}) that have been added to
+ * the table.
+ * @dtopt API
+ * @deprecated Since v1.10
+ *
+ * @example
+ * // Global var for counter
+ * var giCount = 2;
+ *
+ * $(document).ready(function() {
+ * $('#example').dataTable();
+ * } );
+ *
+ * function fnClickAddRow() {
+ * $('#example').dataTable().fnAddData( [
+ * giCount+".1",
+ * giCount+".2",
+ * giCount+".3",
+ * giCount+".4" ]
+ * );
+ *
+ * giCount++;
+ * }
+ */
+ this.fnAddData = function( data, redraw )
+ {
+ var api = this.api( true );
+
+ /* Check if we want to add multiple rows or not */
+ var rows = $.isArray(data) && ( $.isArray(data[0]) || $.isPlainObject(data[0]) ) ?
+ api.rows.add( data ) :
+ api.row.add( data );
+
+ if ( redraw === undefined || redraw ) {
+ api.draw();
+ }
+
+ return rows.flatten().toArray();
+ };
+
+
+ /**
+ * This function will make DataTables recalculate the column sizes, based on the data
+ * contained in the table and the sizes applied to the columns (in the DOM, CSS or
+ * through the sWidth parameter). This can be useful when the width of the table's
+ * parent element changes (for example a window resize).
+ * @param {boolean} [bRedraw=true] Redraw the table or not, you will typically want to
+ * @dtopt API
+ * @deprecated Since v1.10
+ *
+ * @example
+ * $(document).ready(function() {
+ * var oTable = $('#example').dataTable( {
+ * "sScrollY": "200px",
+ * "bPaginate": false
+ * } );
+ *
+ * $(window).bind('resize', function () {
+ * oTable.fnAdjustColumnSizing();
+ * } );
+ * } );
+ */
+ this.fnAdjustColumnSizing = function ( bRedraw )
+ {
+ var api = this.api( true ).columns.adjust();
+ var settings = api.settings()[0];
+ var scroll = settings.oScroll;
+
+ if ( bRedraw === undefined || bRedraw ) {
+ api.draw( false );
+ }
+ else if ( scroll.sX !== "" || scroll.sY !== "" ) {
+ /* If not redrawing, but scrolling, we want to apply the new column sizes anyway */
+ _fnScrollDraw( settings );
+ }
+ };
+
+
+ /**
+ * Quickly and simply clear a table
+ * @param {bool} [bRedraw=true] redraw the table or not
+ * @dtopt API
+ * @deprecated Since v1.10
+ *
+ * @example
+ * $(document).ready(function() {
+ * var oTable = $('#example').dataTable();
+ *
+ * // Immediately 'nuke' the current rows (perhaps waiting for an Ajax callback...)
+ * oTable.fnClearTable();
+ * } );
+ */
+ this.fnClearTable = function( bRedraw )
+ {
+ var api = this.api( true ).clear();
+
+ if ( bRedraw === undefined || bRedraw ) {
+ api.draw();
+ }
+ };
+
+
+ /**
+ * The exact opposite of 'opening' a row, this function will close any rows which
+ * are currently 'open'.
+ * @param {node} nTr the table row to 'close'
+ * @returns {int} 0 on success, or 1 if failed (can't find the row)
+ * @dtopt API
+ * @deprecated Since v1.10
+ *
+ * @example
+ * $(document).ready(function() {
+ * var oTable;
+ *
+ * // 'open' an information row when a row is clicked on
+ * $('#example tbody tr').click( function () {
+ * if ( oTable.fnIsOpen(this) ) {
+ * oTable.fnClose( this );
+ * } else {
+ * oTable.fnOpen( this, "Temporary row opened", "info_row" );
+ * }
+ * } );
+ *
+ * oTable = $('#example').dataTable();
+ * } );
+ */
+ this.fnClose = function( nTr )
+ {
+ this.api( true ).row( nTr ).child.hide();
+ };
+
+
+ /**
+ * Remove a row for the table
+ * @param {mixed} target The index of the row from aoData to be deleted, or
+ * the TR element you want to delete
+ * @param {function|null} [callBack] Callback function
+ * @param {bool} [redraw=true] Redraw the table or not
+ * @returns {array} The row that was deleted
+ * @dtopt API
+ * @deprecated Since v1.10
+ *
+ * @example
+ * $(document).ready(function() {
+ * var oTable = $('#example').dataTable();
+ *
+ * // Immediately remove the first row
+ * oTable.fnDeleteRow( 0 );
+ * } );
+ */
+ this.fnDeleteRow = function( target, callback, redraw )
+ {
+ var api = this.api( true );
+ var rows = api.rows( target );
+ var settings = rows.settings()[0];
+ var data = settings.aoData[ rows[0][0] ];
+
+ rows.remove();
+
+ if ( callback ) {
+ callback.call( this, settings, data );
+ }
+
+ if ( redraw === undefined || redraw ) {
+ api.draw();
+ }
+
+ return data;
+ };
+
+
+ /**
+ * Restore the table to it's original state in the DOM by removing all of DataTables
+ * enhancements, alterations to the DOM structure of the table and event listeners.
+ * @param {boolean} [remove=false] Completely remove the table from the DOM
+ * @dtopt API
+ * @deprecated Since v1.10
+ *
+ * @example
+ * $(document).ready(function() {
+ * // This example is fairly pointless in reality, but shows how fnDestroy can be used
+ * var oTable = $('#example').dataTable();
+ * oTable.fnDestroy();
+ * } );
+ */
+ this.fnDestroy = function ( remove )
+ {
+ this.api( true ).destroy( remove );
+ };
+
+
+ /**
+ * Redraw the table
+ * @param {bool} [complete=true] Re-filter and resort (if enabled) the table before the draw.
+ * @dtopt API
+ * @deprecated Since v1.10
+ *
+ * @example
+ * $(document).ready(function() {
+ * var oTable = $('#example').dataTable();
+ *
+ * // Re-draw the table - you wouldn't want to do it here, but it's an example :-)
+ * oTable.fnDraw();
+ * } );
+ */
+ this.fnDraw = function( complete )
+ {
+ // Note that this isn't an exact match to the old call to _fnDraw - it takes
+ // into account the new data, but can hold position.
+ this.api( true ).draw( complete );
+ };
+
+
+ /**
+ * Filter the input based on data
+ * @param {string} sInput String to filter the table on
+ * @param {int|null} [iColumn] Column to limit filtering to
+ * @param {bool} [bRegex=false] Treat as regular expression or not
+ * @param {bool} [bSmart=true] Perform smart filtering or not
+ * @param {bool} [bShowGlobal=true] Show the input global filter in it's input box(es)
+ * @param {bool} [bCaseInsensitive=true] Do case-insensitive matching (true) or not (false)
+ * @dtopt API
+ * @deprecated Since v1.10
+ *
+ * @example
+ * $(document).ready(function() {
+ * var oTable = $('#example').dataTable();
+ *
+ * // Sometime later - filter...
+ * oTable.fnFilter( 'test string' );
+ * } );
+ */
+ this.fnFilter = function( sInput, iColumn, bRegex, bSmart, bShowGlobal, bCaseInsensitive )
+ {
+ var api = this.api( true );
+
+ if ( iColumn === null || iColumn === undefined ) {
+ api.search( sInput, bRegex, bSmart, bCaseInsensitive );
+ }
+ else {
+ api.column( iColumn ).search( sInput, bRegex, bSmart, bCaseInsensitive );
+ }
+
+ api.draw();
+ };
+
+
+ /**
+ * Get the data for the whole table, an individual row or an individual cell based on the
+ * provided parameters.
+ * @param {int|node} [src] A TR row node, TD/TH cell node or an integer. If given as
+ * a TR node then the data source for the whole row will be returned. If given as a
+ * TD/TH cell node then iCol will be automatically calculated and the data for the
+ * cell returned. If given as an integer, then this is treated as the aoData internal
+ * data index for the row (see fnGetPosition) and the data for that row used.
+ * @param {int} [col] Optional column index that you want the data of.
+ * @returns {array|object|string} If mRow is undefined, then the data for all rows is
+ * returned. If mRow is defined, just data for that row, and is iCol is
+ * defined, only data for the designated cell is returned.
+ * @dtopt API
+ * @deprecated Since v1.10
+ *
+ * @example
+ * // Row data
+ * $(document).ready(function() {
+ * oTable = $('#example').dataTable();
+ *
+ * oTable.$('tr').click( function () {
+ * var data = oTable.fnGetData( this );
+ * // ... do something with the array / object of data for the row
+ * } );
+ * } );
+ *
+ * @example
+ * // Individual cell data
+ * $(document).ready(function() {
+ * oTable = $('#example').dataTable();
+ *
+ * oTable.$('td').click( function () {
+ * var sData = oTable.fnGetData( this );
+ * alert( 'The cell clicked on had the value of '+sData );
+ * } );
+ * } );
+ */
+ this.fnGetData = function( src, col )
+ {
+ var api = this.api( true );
+
+ if ( src !== undefined ) {
+ var type = src.nodeName ? src.nodeName.toLowerCase() : '';
+
+ return col !== undefined || type == 'td' || type == 'th' ?
+ api.cell( src, col ).data() :
+ api.row( src ).data() || null;
+ }
+
+ return api.data().toArray();
+ };
+
+
+ /**
+ * Get an array of the TR nodes that are used in the table's body. Note that you will
+ * typically want to use the '$' API method in preference to this as it is more
+ * flexible.
+ * @param {int} [iRow] Optional row index for the TR element you want
+ * @returns {array|node} If iRow is undefined, returns an array of all TR elements
+ * in the table's body, or iRow is defined, just the TR element requested.
+ * @dtopt API
+ * @deprecated Since v1.10
+ *
+ * @example
+ * $(document).ready(function() {
+ * var oTable = $('#example').dataTable();
+ *
+ * // Get the nodes from the table
+ * var nNodes = oTable.fnGetNodes( );
+ * } );
+ */
+ this.fnGetNodes = function( iRow )
+ {
+ var api = this.api( true );
+
+ return iRow !== undefined ?
+ api.row( iRow ).node() :
+ api.rows().nodes().flatten().toArray();
+ };
+
+
+ /**
+ * Get the array indexes of a particular cell from it's DOM element
+ * and column index including hidden columns
+ * @param {node} node this can either be a TR, TD or TH in the table's body
+ * @returns {int} If nNode is given as a TR, then a single index is returned, or
+ * if given as a cell, an array of [row index, column index (visible),
+ * column index (all)] is given.
+ * @dtopt API
+ * @deprecated Since v1.10
+ *
+ * @example
+ * $(document).ready(function() {
+ * $('#example tbody td').click( function () {
+ * // Get the position of the current data from the node
+ * var aPos = oTable.fnGetPosition( this );
+ *
+ * // Get the data array for this row
+ * var aData = oTable.fnGetData( aPos[0] );
+ *
+ * // Update the data array and return the value
+ * aData[ aPos[1] ] = 'clicked';
+ * this.innerHTML = 'clicked';
+ * } );
+ *
+ * // Init DataTables
+ * oTable = $('#example').dataTable();
+ * } );
+ */
+ this.fnGetPosition = function( node )
+ {
+ var api = this.api( true );
+ var nodeName = node.nodeName.toUpperCase();
+
+ if ( nodeName == 'TR' ) {
+ return api.row( node ).index();
+ }
+ else if ( nodeName == 'TD' || nodeName == 'TH' ) {
+ var cell = api.cell( node ).index();
+
+ return [
+ cell.row,
+ cell.columnVisible,
+ cell.column
+ ];
+ }
+ return null;
+ };
+
+
+ /**
+ * Check to see if a row is 'open' or not.
+ * @param {node} nTr the table row to check
+ * @returns {boolean} true if the row is currently open, false otherwise
+ * @dtopt API
+ * @deprecated Since v1.10
+ *
+ * @example
+ * $(document).ready(function() {
+ * var oTable;
+ *
+ * // 'open' an information row when a row is clicked on
+ * $('#example tbody tr').click( function () {
+ * if ( oTable.fnIsOpen(this) ) {
+ * oTable.fnClose( this );
+ * } else {
+ * oTable.fnOpen( this, "Temporary row opened", "info_row" );
+ * }
+ * } );
+ *
+ * oTable = $('#example').dataTable();
+ * } );
+ */
+ this.fnIsOpen = function( nTr )
+ {
+ return this.api( true ).row( nTr ).child.isShown();
+ };
+
+
+ /**
+ * This function will place a new row directly after a row which is currently
+ * on display on the page, with the HTML contents that is passed into the
+ * function. This can be used, for example, to ask for confirmation that a
+ * particular record should be deleted.
+ * @param {node} nTr The table row to 'open'
+ * @param {string|node|jQuery} mHtml The HTML to put into the row
+ * @param {string} sClass Class to give the new TD cell
+ * @returns {node} The row opened. Note that if the table row passed in as the
+ * first parameter, is not found in the table, this method will silently
+ * return.
+ * @dtopt API
+ * @deprecated Since v1.10
+ *
+ * @example
+ * $(document).ready(function() {
+ * var oTable;
+ *
+ * // 'open' an information row when a row is clicked on
+ * $('#example tbody tr').click( function () {
+ * if ( oTable.fnIsOpen(this) ) {
+ * oTable.fnClose( this );
+ * } else {
+ * oTable.fnOpen( this, "Temporary row opened", "info_row" );
+ * }
+ * } );
+ *
+ * oTable = $('#example').dataTable();
+ * } );
+ */
+ this.fnOpen = function( nTr, mHtml, sClass )
+ {
+ return this.api( true )
+ .row( nTr )
+ .child( mHtml, sClass )
+ .show()
+ .child()[0];
+ };
+
+
+ /**
+ * Change the pagination - provides the internal logic for pagination in a simple API
+ * function. With this function you can have a DataTables table go to the next,
+ * previous, first or last pages.
+ * @param {string|int} mAction Paging action to take: "first", "previous", "next" or "last"
+ * or page number to jump to (integer), note that page 0 is the first page.
+ * @param {bool} [bRedraw=true] Redraw the table or not
+ * @dtopt API
+ * @deprecated Since v1.10
+ *
+ * @example
+ * $(document).ready(function() {
+ * var oTable = $('#example').dataTable();
+ * oTable.fnPageChange( 'next' );
+ * } );
+ */
+ this.fnPageChange = function ( mAction, bRedraw )
+ {
+ var api = this.api( true ).page( mAction );
+
+ if ( bRedraw === undefined || bRedraw ) {
+ api.draw(false);
+ }
+ };
+
+
+ /**
+ * Show a particular column
+ * @param {int} iCol The column whose display should be changed
+ * @param {bool} bShow Show (true) or hide (false) the column
+ * @param {bool} [bRedraw=true] Redraw the table or not
+ * @dtopt API
+ * @deprecated Since v1.10
+ *
+ * @example
+ * $(document).ready(function() {
+ * var oTable = $('#example').dataTable();
+ *
+ * // Hide the second column after initialisation
+ * oTable.fnSetColumnVis( 1, false );
+ * } );
+ */
+ this.fnSetColumnVis = function ( iCol, bShow, bRedraw )
+ {
+ var api = this.api( true ).column( iCol ).visible( bShow );
+
+ if ( bRedraw === undefined || bRedraw ) {
+ api.columns.adjust().draw();
+ }
+ };
+
+
+ /**
+ * Get the settings for a particular table for external manipulation
+ * @returns {object} DataTables settings object. See
+ * {@link DataTable.models.oSettings}
+ * @dtopt API
+ * @deprecated Since v1.10
+ *
+ * @example
+ * $(document).ready(function() {
+ * var oTable = $('#example').dataTable();
+ * var oSettings = oTable.fnSettings();
+ *
+ * // Show an example parameter from the settings
+ * alert( oSettings._iDisplayStart );
+ * } );
+ */
+ this.fnSettings = function()
+ {
+ return _fnSettingsFromNode( this[_ext.iApiIndex] );
+ };
+
+
+ /**
+ * Sort the table by a particular column
+ * @param {int} iCol the data index to sort on. Note that this will not match the
+ * 'display index' if you have hidden data entries
+ * @dtopt API
+ * @deprecated Since v1.10
+ *
+ * @example
+ * $(document).ready(function() {
+ * var oTable = $('#example').dataTable();
+ *
+ * // Sort immediately with columns 0 and 1
+ * oTable.fnSort( [ [0,'asc'], [1,'asc'] ] );
+ * } );
+ */
+ this.fnSort = function( aaSort )
+ {
+ this.api( true ).order( aaSort ).draw();
+ };
+
+
+ /**
+ * Attach a sort listener to an element for a given column
+ * @param {node} nNode the element to attach the sort listener to
+ * @param {int} iColumn the column that a click on this node will sort on
+ * @param {function} [fnCallback] callback function when sort is run
+ * @dtopt API
+ * @deprecated Since v1.10
+ *
+ * @example
+ * $(document).ready(function() {
+ * var oTable = $('#example').dataTable();
+ *
+ * // Sort on column 1, when 'sorter' is clicked on
+ * oTable.fnSortListener( document.getElementById('sorter'), 1 );
+ * } );
+ */
+ this.fnSortListener = function( nNode, iColumn, fnCallback )
+ {
+ this.api( true ).order.listener( nNode, iColumn, fnCallback );
+ };
+
+
+ /**
+ * Update a table cell or row - this method will accept either a single value to
+ * update the cell with, an array of values with one element for each column or
+ * an object in the same format as the original data source. The function is
+ * self-referencing in order to make the multi column updates easier.
+ * @param {object|array|string} mData Data to update the cell/row with
+ * @param {node|int} mRow TR element you want to update or the aoData index
+ * @param {int} [iColumn] The column to update, give as null or undefined to
+ * update a whole row.
+ * @param {bool} [bRedraw=true] Redraw the table or not
+ * @param {bool} [bAction=true] Perform pre-draw actions or not
+ * @returns {int} 0 on success, 1 on error
+ * @dtopt API
+ * @deprecated Since v1.10
+ *
+ * @example
+ * $(document).ready(function() {
+ * var oTable = $('#example').dataTable();
+ * oTable.fnUpdate( 'Example update', 0, 0 ); // Single cell
+ * oTable.fnUpdate( ['a', 'b', 'c', 'd', 'e'], $('tbody tr')[0] ); // Row
+ * } );
+ */
+ this.fnUpdate = function( mData, mRow, iColumn, bRedraw, bAction )
+ {
+ var api = this.api( true );
+
+ if ( iColumn === undefined || iColumn === null ) {
+ api.row( mRow ).data( mData );
+ }
+ else {
+ api.cell( mRow, iColumn ).data( mData );
+ }
+
+ if ( bAction === undefined || bAction ) {
+ api.columns.adjust();
+ }
+
+ if ( bRedraw === undefined || bRedraw ) {
+ api.draw();
+ }
+ return 0;
+ };
+
+
+ /**
+ * Provide a common method for plug-ins to check the version of DataTables being used, in order
+ * to ensure compatibility.
+ * @param {string} sVersion Version string to check for, in the format "X.Y.Z". Note that the
+ * formats "X" and "X.Y" are also acceptable.
+ * @returns {boolean} true if this version of DataTables is greater or equal to the required
+ * version, or false if this version of DataTales is not suitable
+ * @method
+ * @dtopt API
+ * @deprecated Since v1.10
+ *
+ * @example
+ * $(document).ready(function() {
+ * var oTable = $('#example').dataTable();
+ * alert( oTable.fnVersionCheck( '1.9.0' ) );
+ * } );
+ */
+ this.fnVersionCheck = _ext.fnVersionCheck;
+
+
+ var _that = this;
+ var emptyInit = options === undefined;
+ var len = this.length;
+
+ if ( emptyInit ) {
+ options = {};
+ }
+
+ this.oApi = this.internal = _ext.internal;
+
+ // Extend with old style plug-in API methods
+ for ( var fn in DataTable.ext.internal ) {
+ if ( fn ) {
+ this[fn] = _fnExternApiFunc(fn);
+ }
+ }
+
+ this.each(function() {
+ // For each initialisation we want to give it a clean initialisation
+ // object that can be bashed around
+ var o = {};
+ var oInit = len > 1 ? // optimisation for single table case
+ _fnExtend( o, options, true ) :
+ options;
+
+ /*global oInit,_that,emptyInit*/
+ var i=0, iLen, j, jLen, k, kLen;
+ var sId = this.getAttribute( 'id' );
+ var bInitHandedOff = false;
+ var defaults = DataTable.defaults;
+ var $this = $(this);
+
+
+ /* Sanity check */
+ if ( this.nodeName.toLowerCase() != 'table' )
+ {
+ _fnLog( null, 0, 'Non-table node initialisation ('+this.nodeName+')', 2 );
+ return;
+ }
+
+ /* Backwards compatibility for the defaults */
+ _fnCompatOpts( defaults );
+ _fnCompatCols( defaults.column );
+
+ /* Convert the camel-case defaults to Hungarian */
+ _fnCamelToHungarian( defaults, defaults, true );
+ _fnCamelToHungarian( defaults.column, defaults.column, true );
+
+ /* Setting up the initialisation object */
+ _fnCamelToHungarian( defaults, $.extend( oInit, $this.data() ) );
+
+
+
+ /* Check to see if we are re-initialising a table */
+ var allSettings = DataTable.settings;
+ for ( i=0, iLen=allSettings.length ; i<iLen ; i++ )
+ {
+ var s = allSettings[i];
+
+ /* Base check on table node */
+ if ( s.nTable == this || s.nTHead.parentNode == this || (s.nTFoot && s.nTFoot.parentNode == this) )
+ {
+ var bRetrieve = oInit.bRetrieve !== undefined ? oInit.bRetrieve : defaults.bRetrieve;
+ var bDestroy = oInit.bDestroy !== undefined ? oInit.bDestroy : defaults.bDestroy;
+
+ if ( emptyInit || bRetrieve )
+ {
+ return s.oInstance;
+ }
+ else if ( bDestroy )
+ {
+ s.oInstance.fnDestroy();
+ break;
+ }
+ else
+ {
+ _fnLog( s, 0, 'Cannot reinitialise DataTable', 3 );
+ return;
+ }
+ }
+
+ /* If the element we are initialising has the same ID as a table which was previously
+ * initialised, but the table nodes don't match (from before) then we destroy the old
+ * instance by simply deleting it. This is under the assumption that the table has been
+ * destroyed by other methods. Anyone using non-id selectors will need to do this manually
+ */
+ if ( s.sTableId == this.id )
+ {
+ allSettings.splice( i, 1 );
+ break;
+ }
+ }
+
+ /* Ensure the table has an ID - required for accessibility */
+ if ( sId === null || sId === "" )
+ {
+ sId = "DataTables_Table_"+(DataTable.ext._unique++);
+ this.id = sId;
+ }
+
+ /* Create the settings object for this table and set some of the default parameters */
+ var oSettings = $.extend( true, {}, DataTable.models.oSettings, {
+ "sDestroyWidth": $this[0].style.width,
+ "sInstance": sId,
+ "sTableId": sId
+ } );
+ oSettings.nTable = this;
+ oSettings.oApi = _that.internal;
+ oSettings.oInit = oInit;
+
+ allSettings.push( oSettings );
+
+ // Need to add the instance after the instance after the settings object has been added
+ // to the settings array, so we can self reference the table instance if more than one
+ oSettings.oInstance = (_that.length===1) ? _that : $this.dataTable();
+
+ // Backwards compatibility, before we apply all the defaults
+ _fnCompatOpts( oInit );
+
+ if ( oInit.oLanguage )
+ {
+ _fnLanguageCompat( oInit.oLanguage );
+ }
+
+ // If the length menu is given, but the init display length is not, use the length menu
+ if ( oInit.aLengthMenu && ! oInit.iDisplayLength )
+ {
+ oInit.iDisplayLength = $.isArray( oInit.aLengthMenu[0] ) ?
+ oInit.aLengthMenu[0][0] : oInit.aLengthMenu[0];
+ }
+
+ // Apply the defaults and init options to make a single init object will all
+ // options defined from defaults and instance options.
+ oInit = _fnExtend( $.extend( true, {}, defaults ), oInit );
+
+
+ // Map the initialisation options onto the settings object
+ _fnMap( oSettings.oFeatures, oInit, [
+ "bPaginate",
+ "bLengthChange",
+ "bFilter",
+ "bSort",
+ "bSortMulti",
+ "bInfo",
+ "bProcessing",
+ "bAutoWidth",
+ "bSortClasses",
+ "bServerSide",
+ "bDeferRender"
+ ] );
+ _fnMap( oSettings, oInit, [
+ "asStripeClasses",
+ "ajax",
+ "fnServerData",
+ "fnFormatNumber",
+ "sServerMethod",
+ "aaSorting",
+ "aaSortingFixed",
+ "aLengthMenu",
+ "sPaginationType",
+ "sAjaxSource",
+ "sAjaxDataProp",
+ "iStateDuration",
+ "sDom",
+ "bSortCellsTop",
+ "iTabIndex",
+ "fnStateLoadCallback",
+ "fnStateSaveCallback",
+ "renderer",
+ "searchDelay",
+ "rowId",
+ [ "iCookieDuration", "iStateDuration" ], // backwards compat
+ [ "oSearch", "oPreviousSearch" ],
+ [ "aoSearchCols", "aoPreSearchCols" ],
+ [ "iDisplayLength", "_iDisplayLength" ],
+ [ "bJQueryUI", "bJUI" ]
+ ] );
+ _fnMap( oSettings.oScroll, oInit, [
+ [ "sScrollX", "sX" ],
+ [ "sScrollXInner", "sXInner" ],
+ [ "sScrollY", "sY" ],
+ [ "bScrollCollapse", "bCollapse" ]
+ ] );
+ _fnMap( oSettings.oLanguage, oInit, "fnInfoCallback" );
+
+ /* Callback functions which are array driven */
+ _fnCallbackReg( oSettings, 'aoDrawCallback', oInit.fnDrawCallback, 'user' );
+ _fnCallbackReg( oSettings, 'aoServerParams', oInit.fnServerParams, 'user' );
+ _fnCallbackReg( oSettings, 'aoStateSaveParams', oInit.fnStateSaveParams, 'user' );
+ _fnCallbackReg( oSettings, 'aoStateLoadParams', oInit.fnStateLoadParams, 'user' );
+ _fnCallbackReg( oSettings, 'aoStateLoaded', oInit.fnStateLoaded, 'user' );
+ _fnCallbackReg( oSettings, 'aoRowCallback', oInit.fnRowCallback, 'user' );
+ _fnCallbackReg( oSettings, 'aoRowCreatedCallback', oInit.fnCreatedRow, 'user' );
+ _fnCallbackReg( oSettings, 'aoHeaderCallback', oInit.fnHeaderCallback, 'user' );
+ _fnCallbackReg( oSettings, 'aoFooterCallback', oInit.fnFooterCallback, 'user' );
+ _fnCallbackReg( oSettings, 'aoInitComplete', oInit.fnInitComplete, 'user' );
+ _fnCallbackReg( oSettings, 'aoPreDrawCallback', oInit.fnPreDrawCallback, 'user' );
+
+ oSettings.rowIdFn = _fnGetObjectDataFn( oInit.rowId );
+
+ /* Browser support detection */
+ _fnBrowserDetect( oSettings );
+
+ var oClasses = oSettings.oClasses;
+
+ // @todo Remove in 1.11
+ if ( oInit.bJQueryUI )
+ {
+ /* Use the JUI classes object for display. You could clone the oStdClasses object if
+ * you want to have multiple tables with multiple independent classes
+ */
+ $.extend( oClasses, DataTable.ext.oJUIClasses, oInit.oClasses );
+
+ if ( oInit.sDom === defaults.sDom && defaults.sDom === "lfrtip" )
+ {
+ /* Set the DOM to use a layout suitable for jQuery UI's theming */
+ oSettings.sDom = '<"H"lfr>t<"F"ip>';
+ }
+
+ if ( ! oSettings.renderer ) {
+ oSettings.renderer = 'jqueryui';
+ }
+ else if ( $.isPlainObject( oSettings.renderer ) && ! oSettings.renderer.header ) {
+ oSettings.renderer.header = 'jqueryui';
+ }
+ }
+ else
+ {
+ $.extend( oClasses, DataTable.ext.classes, oInit.oClasses );
+ }
+ $this.addClass( oClasses.sTable );
+
+
+ if ( oSettings.iInitDisplayStart === undefined )
+ {
+ /* Display start point, taking into account the save saving */
+ oSettings.iInitDisplayStart = oInit.iDisplayStart;
+ oSettings._iDisplayStart = oInit.iDisplayStart;
+ }
+
+ if ( oInit.iDeferLoading !== null )
+ {
+ oSettings.bDeferLoading = true;
+ var tmp = $.isArray( oInit.iDeferLoading );
+ oSettings._iRecordsDisplay = tmp ? oInit.iDeferLoading[0] : oInit.iDeferLoading;
+ oSettings._iRecordsTotal = tmp ? oInit.iDeferLoading[1] : oInit.iDeferLoading;
+ }
+
+ /* Language definitions */
+ var oLanguage = oSettings.oLanguage;
+ $.extend( true, oLanguage, oInit.oLanguage );
+
+ if ( oLanguage.sUrl !== "" )
+ {
+ /* Get the language definitions from a file - because this Ajax call makes the language
+ * get async to the remainder of this function we use bInitHandedOff to indicate that
+ * _fnInitialise will be fired by the returned Ajax handler, rather than the constructor
+ */
+ $.ajax( {
+ dataType: 'json',
+ url: oLanguage.sUrl,
+ success: function ( json ) {
+ _fnLanguageCompat( json );
+ _fnCamelToHungarian( defaults.oLanguage, json );
+ $.extend( true, oLanguage, json );
+ _fnInitialise( oSettings );
+ },
+ error: function () {
+ // Error occurred loading language file, continue on as best we can
+ _fnInitialise( oSettings );
+ }
+ } );
+ bInitHandedOff = true;
+ }
+
+ /*
+ * Stripes
+ */
+ if ( oInit.asStripeClasses === null )
+ {
+ oSettings.asStripeClasses =[
+ oClasses.sStripeOdd,
+ oClasses.sStripeEven
+ ];
+ }
+
+ /* Remove row stripe classes if they are already on the table row */
+ var stripeClasses = oSettings.asStripeClasses;
+ var rowOne = $this.children('tbody').find('tr').eq(0);
+ if ( $.inArray( true, $.map( stripeClasses, function(el, i) {
+ return rowOne.hasClass(el);
+ } ) ) !== -1 ) {
+ $('tbody tr', this).removeClass( stripeClasses.join(' ') );
+ oSettings.asDestroyStripes = stripeClasses.slice();
+ }
+
+ /*
+ * Columns
+ * See if we should load columns automatically or use defined ones
+ */
+ var anThs = [];
+ var aoColumnsInit;
+ var nThead = this.getElementsByTagName('thead');
+ if ( nThead.length !== 0 )
+ {
+ _fnDetectHeader( oSettings.aoHeader, nThead[0] );
+ anThs = _fnGetUniqueThs( oSettings );
+ }
+
+ /* If not given a column array, generate one with nulls */
+ if ( oInit.aoColumns === null )
+ {
+ aoColumnsInit = [];
+ for ( i=0, iLen=anThs.length ; i<iLen ; i++ )
+ {
+ aoColumnsInit.push( null );
+ }
+ }
+ else
+ {
+ aoColumnsInit = oInit.aoColumns;
+ }
+
+ /* Add the columns */
+ for ( i=0, iLen=aoColumnsInit.length ; i<iLen ; i++ )
+ {
+ _fnAddColumn( oSettings, anThs ? anThs[i] : null );
+ }
+
+ /* Apply the column definitions */
+ _fnApplyColumnDefs( oSettings, oInit.aoColumnDefs, aoColumnsInit, function (iCol, oDef) {
+ _fnColumnOptions( oSettings, iCol, oDef );
+ } );
+
+ /* HTML5 attribute detection - build an mData object automatically if the
+ * attributes are found
+ */
+ if ( rowOne.length ) {
+ var a = function ( cell, name ) {
+ return cell.getAttribute( 'data-'+name ) !== null ? name : null;
+ };
+
+ $( rowOne[0] ).children('th, td').each( function (i, cell) {
+ var col = oSettings.aoColumns[i];
+
+ if ( col.mData === i ) {
+ var sort = a( cell, 'sort' ) || a( cell, 'order' );
+ var filter = a( cell, 'filter' ) || a( cell, 'search' );
+
+ if ( sort !== null || filter !== null ) {
+ col.mData = {
+ _: i+'.display',
+ sort: sort !== null ? i+'.@data-'+sort : undefined,
+ type: sort !== null ? i+'.@data-'+sort : undefined,
+ filter: filter !== null ? i+'.@data-'+filter : undefined
+ };
+
+ _fnColumnOptions( oSettings, i );
+ }
+ }
+ } );
+ }
+
+ var features = oSettings.oFeatures;
+
+ /* Must be done after everything which can be overridden by the state saving! */
+ if ( oInit.bStateSave )
+ {
+ features.bStateSave = true;
+ _fnLoadState( oSettings, oInit );
+ _fnCallbackReg( oSettings, 'aoDrawCallback', _fnSaveState, 'state_save' );
+ }
+
+
+ /*
+ * Sorting
+ * @todo For modularisation (1.11) this needs to do into a sort start up handler
+ */
+
+ // If aaSorting is not defined, then we use the first indicator in asSorting
+ // in case that has been altered, so the default sort reflects that option
+ if ( oInit.aaSorting === undefined )
+ {
+ var sorting = oSettings.aaSorting;
+ for ( i=0, iLen=sorting.length ; i<iLen ; i++ )
+ {
+ sorting[i][1] = oSettings.aoColumns[ i ].asSorting[0];
+ }
+ }
+
+ /* Do a first pass on the sorting classes (allows any size changes to be taken into
+ * account, and also will apply sorting disabled classes if disabled
+ */
+ _fnSortingClasses( oSettings );
+
+ if ( features.bSort )
+ {
+ _fnCallbackReg( oSettings, 'aoDrawCallback', function () {
+ if ( oSettings.bSorted ) {
+ var aSort = _fnSortFlatten( oSettings );
+ var sortedColumns = {};
+
+ $.each( aSort, function (i, val) {
+ sortedColumns[ val.src ] = val.dir;
+ } );
+
+ _fnCallbackFire( oSettings, null, 'order', [oSettings, aSort, sortedColumns] );
+ _fnSortAria( oSettings );
+ }
+ } );
+ }
+
+ _fnCallbackReg( oSettings, 'aoDrawCallback', function () {
+ if ( oSettings.bSorted || _fnDataSource( oSettings ) === 'ssp' || features.bDeferRender ) {
+ _fnSortingClasses( oSettings );
+ }
+ }, 'sc' );
+
+
+ /*
+ * Final init
+ * Cache the header, body and footer as required, creating them if needed
+ */
+
+ // Work around for Webkit bug 83867 - store the caption-side before removing from doc
+ var captions = $this.children('caption').each( function () {
+ this._captionSide = $this.css('caption-side');
+ } );
+
+ var thead = $this.children('thead');
+ if ( thead.length === 0 )
+ {
+ thead = $('<thead/>').appendTo(this);
+ }
+ oSettings.nTHead = thead[0];
+
+ var tbody = $this.children('tbody');
+ if ( tbody.length === 0 )
+ {
+ tbody = $('<tbody/>').appendTo(this);
+ }
+ oSettings.nTBody = tbody[0];
+
+ var tfoot = $this.children('tfoot');
+ if ( tfoot.length === 0 && captions.length > 0 && (oSettings.oScroll.sX !== "" || oSettings.oScroll.sY !== "") )
+ {
+ // If we are a scrolling table, and no footer has been given, then we need to create
+ // a tfoot element for the caption element to be appended to
+ tfoot = $('<tfoot/>').appendTo(this);
+ }
+
+ if ( tfoot.length === 0 || tfoot.children().length === 0 ) {
+ $this.addClass( oClasses.sNoFooter );
+ }
+ else if ( tfoot.length > 0 ) {
+ oSettings.nTFoot = tfoot[0];
+ _fnDetectHeader( oSettings.aoFooter, oSettings.nTFoot );
+ }
+
+ /* Check if there is data passing into the constructor */
+ if ( oInit.aaData )
+ {
+ for ( i=0 ; i<oInit.aaData.length ; i++ )
+ {
+ _fnAddData( oSettings, oInit.aaData[ i ] );
+ }
+ }
+ else if ( oSettings.bDeferLoading || _fnDataSource( oSettings ) == 'dom' )
+ {
+ /* Grab the data from the page - only do this when deferred loading or no Ajax
+ * source since there is no point in reading the DOM data if we are then going
+ * to replace it with Ajax data
+ */
+ _fnAddTr( oSettings, $(oSettings.nTBody).children('tr') );
+ }
+
+ /* Copy the data index array */
+ oSettings.aiDisplay = oSettings.aiDisplayMaster.slice();
+
+ /* Initialisation complete - table can be drawn */
+ oSettings.bInitialised = true;
+
+ /* Check if we need to initialise the table (it might not have been handed off to the
+ * language processor)
+ */
+ if ( bInitHandedOff === false )
+ {
+ _fnInitialise( oSettings );
+ }
+ } );
+ _that = null;
+ return this;
+ };
+
+
+
+ /**
+ * Computed structure of the DataTables API, defined by the options passed to
+ * `DataTable.Api.register()` when building the API.
+ *
+ * The structure is built in order to speed creation and extension of the Api
+ * objects since the extensions are effectively pre-parsed.
+ *
+ * The array is an array of objects with the following structure, where this
+ * base array represents the Api prototype base:
+ *
+ * [
+ * {
+ * name: 'data' -- string - Property name
+ * val: function () {}, -- function - Api method (or undefined if just an object
+ * methodExt: [ ... ], -- array - Array of Api object definitions to extend the method result
+ * propExt: [ ... ] -- array - Array of Api object definitions to extend the property
+ * },
+ * {
+ * name: 'row'
+ * val: {},
+ * methodExt: [ ... ],
+ * propExt: [
+ * {
+ * name: 'data'
+ * val: function () {},
+ * methodExt: [ ... ],
+ * propExt: [ ... ]
+ * },
+ * ...
+ * ]
+ * }
+ * ]
+ *
+ * @type {Array}
+ * @ignore
+ */
+ var __apiStruct = [];
+
+
+ /**
+ * `Array.prototype` reference.
+ *
+ * @type object
+ * @ignore
+ */
+ var __arrayProto = Array.prototype;
+
+
+ /**
+ * Abstraction for `context` parameter of the `Api` constructor to allow it to
+ * take several different forms for ease of use.
+ *
+ * Each of the input parameter types will be converted to a DataTables settings
+ * object where possible.
+ *
+ * @param {string|node|jQuery|object} mixed DataTable identifier. Can be one
+ * of:
+ *
+ * * `string` - jQuery selector. Any DataTables' matching the given selector
+ * with be found and used.
+ * * `node` - `TABLE` node which has already been formed into a DataTable.
+ * * `jQuery` - A jQuery object of `TABLE` nodes.
+ * * `object` - DataTables settings object
+ * * `DataTables.Api` - API instance
+ * @return {array|null} Matching DataTables settings objects. `null` or
+ * `undefined` is returned if no matching DataTable is found.
+ * @ignore
+ */
+ var _toSettings = function ( mixed )
+ {
+ var idx, jq;
+ var settings = DataTable.settings;
+ var tables = $.map( settings, function (el, i) {
+ return el.nTable;
+ } );
+
+ if ( ! mixed ) {
+ return [];
+ }
+ else if ( mixed.nTable && mixed.oApi ) {
+ // DataTables settings object
+ return [ mixed ];
+ }
+ else if ( mixed.nodeName && mixed.nodeName.toLowerCase() === 'table' ) {
+ // Table node
+ idx = $.inArray( mixed, tables );
+ return idx !== -1 ? [ settings[idx] ] : null;
+ }
+ else if ( mixed && typeof mixed.settings === 'function' ) {
+ return mixed.settings().toArray();
+ }
+ else if ( typeof mixed === 'string' ) {
+ // jQuery selector
+ jq = $(mixed);
+ }
+ else if ( mixed instanceof $ ) {
+ // jQuery object (also DataTables instance)
+ jq = mixed;
+ }
+
+ if ( jq ) {
+ return jq.map( function(i) {
+ idx = $.inArray( this, tables );
+ return idx !== -1 ? settings[idx] : null;
+ } ).toArray();
+ }
+ };
+
+
+ /**
+ * DataTables API class - used to control and interface with one or more
+ * DataTables enhanced tables.
+ *
+ * The API class is heavily based on jQuery, presenting a chainable interface
+ * that you can use to interact with tables. Each instance of the API class has
+ * a "context" - i.e. the tables that it will operate on. This could be a single
+ * table, all tables on a page or a sub-set thereof.
+ *
+ * Additionally the API is designed to allow you to easily work with the data in
+ * the tables, retrieving and manipulating it as required. This is done by
+ * presenting the API class as an array like interface. The contents of the
+ * array depend upon the actions requested by each method (for example
+ * `rows().nodes()` will return an array of nodes, while `rows().data()` will
+ * return an array of objects or arrays depending upon your table's
+ * configuration). The API object has a number of array like methods (`push`,
+ * `pop`, `reverse` etc) as well as additional helper methods (`each`, `pluck`,
+ * `unique` etc) to assist your working with the data held in a table.
+ *
+ * Most methods (those which return an Api instance) are chainable, which means
+ * the return from a method call also has all of the methods available that the
+ * top level object had. For example, these two calls are equivalent:
+ *
+ * // Not chained
+ * api.row.add( {...} );
+ * api.draw();
+ *
+ * // Chained
+ * api.row.add( {...} ).draw();
+ *
+ * @class DataTable.Api
+ * @param {array|object|string|jQuery} context DataTable identifier. This is
+ * used to define which DataTables enhanced tables this API will operate on.
+ * Can be one of:
+ *
+ * * `string` - jQuery selector. Any DataTables' matching the given selector
+ * with be found and used.
+ * * `node` - `TABLE` node which has already been formed into a DataTable.
+ * * `jQuery` - A jQuery object of `TABLE` nodes.
+ * * `object` - DataTables settings object
+ * @param {array} [data] Data to initialise the Api instance with.
+ *
+ * @example
+ * // Direct initialisation during DataTables construction
+ * var api = $('#example').DataTable();
+ *
+ * @example
+ * // Initialisation using a DataTables jQuery object
+ * var api = $('#example').dataTable().api();
+ *
+ * @example
+ * // Initialisation as a constructor
+ * var api = new $.fn.DataTable.Api( 'table.dataTable' );
+ */
+ _Api = function ( context, data )
+ {
+ if ( ! (this instanceof _Api) ) {
+ return new _Api( context, data );
+ }
+
+ var settings = [];
+ var ctxSettings = function ( o ) {
+ var a = _toSettings( o );
+ if ( a ) {
+ settings = settings.concat( a );
+ }
+ };
+
+ if ( $.isArray( context ) ) {
+ for ( var i=0, ien=context.length ; i<ien ; i++ ) {
+ ctxSettings( context[i] );
+ }
+ }
+ else {
+ ctxSettings( context );
+ }
+
+ // Remove duplicates
+ this.context = _unique( settings );
+
+ // Initial data
+ if ( data ) {
+ $.merge( this, data );
+ }
+
+ // selector
+ this.selector = {
+ rows: null,
+ cols: null,
+ opts: null
+ };
+
+ _Api.extend( this, this, __apiStruct );
+ };
+
+ DataTable.Api = _Api;
+
+ // Don't destroy the existing prototype, just extend it. Required for jQuery 2's
+ // isPlainObject.
+ $.extend( _Api.prototype, {
+ any: function ()
+ {
+ return this.count() !== 0;
+ },
+
+
+ concat: __arrayProto.concat,
+
+
+ context: [], // array of table settings objects
+
+
+ count: function ()
+ {
+ return this.flatten().length;
+ },
+
+
+ each: function ( fn )
+ {
+ for ( var i=0, ien=this.length ; i<ien; i++ ) {
+ fn.call( this, this[i], i, this );
+ }
+
+ return this;
+ },
+
+
+ eq: function ( idx )
+ {
+ var ctx = this.context;
+
+ return ctx.length > idx ?
+ new _Api( ctx[idx], this[idx] ) :
+ null;
+ },
+
+
+ filter: function ( fn )
+ {
+ var a = [];
+
+ if ( __arrayProto.filter ) {
+ a = __arrayProto.filter.call( this, fn, this );
+ }
+ else {
+ // Compatibility for browsers without EMCA-252-5 (JS 1.6)
+ for ( var i=0, ien=this.length ; i<ien ; i++ ) {
+ if ( fn.call( this, this[i], i, this ) ) {
+ a.push( this[i] );
+ }
+ }
+ }
+
+ return new _Api( this.context, a );
+ },
+
+
+ flatten: function ()
+ {
+ var a = [];
+ return new _Api( this.context, a.concat.apply( a, this.toArray() ) );
+ },
+
+
+ join: __arrayProto.join,
+
+
+ indexOf: __arrayProto.indexOf || function (obj, start)
+ {
+ for ( var i=(start || 0), ien=this.length ; i<ien ; i++ ) {
+ if ( this[i] === obj ) {
+ return i;
+ }
+ }
+ return -1;
+ },
+
+ iterator: function ( flatten, type, fn, alwaysNew ) {
+ var
+ a = [], ret,
+ i, ien, j, jen,
+ context = this.context,
+ rows, items, item,
+ selector = this.selector;
+
+ // Argument shifting
+ if ( typeof flatten === 'string' ) {
+ alwaysNew = fn;
+ fn = type;
+ type = flatten;
+ flatten = false;
+ }
+
+ for ( i=0, ien=context.length ; i<ien ; i++ ) {
+ var apiInst = new _Api( context[i] );
+
+ if ( type === 'table' ) {
+ ret = fn.call( apiInst, context[i], i );
+
+ if ( ret !== undefined ) {
+ a.push( ret );
+ }
+ }
+ else if ( type === 'columns' || type === 'rows' ) {
+ // this has same length as context - one entry for each table
+ ret = fn.call( apiInst, context[i], this[i], i );
+
+ if ( ret !== undefined ) {
+ a.push( ret );
+ }
+ }
+ else if ( type === 'column' || type === 'column-rows' || type === 'row' || type === 'cell' ) {
+ // columns and rows share the same structure.
+ // 'this' is an array of column indexes for each context
+ items = this[i];
+
+ if ( type === 'column-rows' ) {
+ rows = _selector_row_indexes( context[i], selector.opts );
+ }
+
+ for ( j=0, jen=items.length ; j<jen ; j++ ) {
+ item = items[j];
+
+ if ( type === 'cell' ) {
+ ret = fn.call( apiInst, context[i], item.row, item.column, i, j );
+ }
+ else {
+ ret = fn.call( apiInst, context[i], item, i, j, rows );
+ }
+
+ if ( ret !== undefined ) {
+ a.push( ret );
+ }
+ }
+ }
+ }
+
+ if ( a.length || alwaysNew ) {
+ var api = new _Api( context, flatten ? a.concat.apply( [], a ) : a );
+ var apiSelector = api.selector;
+ apiSelector.rows = selector.rows;
+ apiSelector.cols = selector.cols;
+ apiSelector.opts = selector.opts;
+ return api;
+ }
+ return this;
+ },
+
+
+ lastIndexOf: __arrayProto.lastIndexOf || function (obj, start)
+ {
+ // Bit cheeky...
+ return this.indexOf.apply( this.toArray.reverse(), arguments );
+ },
+
+
+ length: 0,
+
+
+ map: function ( fn )
+ {
+ var a = [];
+
+ if ( __arrayProto.map ) {
+ a = __arrayProto.map.call( this, fn, this );
+ }
+ else {
+ // Compatibility for browsers without EMCA-252-5 (JS 1.6)
+ for ( var i=0, ien=this.length ; i<ien ; i++ ) {
+ a.push( fn.call( this, this[i], i ) );
+ }
+ }
+
+ return new _Api( this.context, a );
+ },
+
+
+ pluck: function ( prop )
+ {
+ return this.map( function ( el ) {
+ return el[ prop ];
+ } );
+ },
+
+ pop: __arrayProto.pop,
+
+
+ push: __arrayProto.push,
+
+
+ // Does not return an API instance
+ reduce: __arrayProto.reduce || function ( fn, init )
+ {
+ return _fnReduce( this, fn, init, 0, this.length, 1 );
+ },
+
+
+ reduceRight: __arrayProto.reduceRight || function ( fn, init )
+ {
+ return _fnReduce( this, fn, init, this.length-1, -1, -1 );
+ },
+
+
+ reverse: __arrayProto.reverse,
+
+
+ // Object with rows, columns and opts
+ selector: null,
+
+
+ shift: __arrayProto.shift,
+
+
+ sort: __arrayProto.sort, // ? name - order?
+
+
+ splice: __arrayProto.splice,
+
+
+ toArray: function ()
+ {
+ return __arrayProto.slice.call( this );
+ },
+
+
+ to$: function ()
+ {
+ return $( this );
+ },
+
+
+ toJQuery: function ()
+ {
+ return $( this );
+ },
+
+
+ unique: function ()
+ {
+ return new _Api( this.context, _unique(this) );
+ },
+
+
+ unshift: __arrayProto.unshift
+ } );
+
+
+ _Api.extend = function ( scope, obj, ext )
+ {
+ // Only extend API instances and static properties of the API
+ if ( ! ext.length || ! obj || ( ! (obj instanceof _Api) && ! obj.__dt_wrapper ) ) {
+ return;
+ }
+
+ var
+ i, ien,
+ j, jen,
+ struct, inner,
+ methodScoping = function ( scope, fn, struc ) {
+ return function () {
+ var ret = fn.apply( scope, arguments );
+
+ // Method extension
+ _Api.extend( ret, ret, struc.methodExt );
+ return ret;
+ };
+ };
+
+ for ( i=0, ien=ext.length ; i<ien ; i++ ) {
+ struct = ext[i];
+
+ // Value
+ obj[ struct.name ] = typeof struct.val === 'function' ?
+ methodScoping( scope, struct.val, struct ) :
+ $.isPlainObject( struct.val ) ?
+ {} :
+ struct.val;
+
+ obj[ struct.name ].__dt_wrapper = true;
+
+ // Property extension
+ _Api.extend( scope, obj[ struct.name ], struct.propExt );
+ }
+ };
+
+
+ // @todo - Is there need for an augment function?
+ // _Api.augment = function ( inst, name )
+ // {
+ // // Find src object in the structure from the name
+ // var parts = name.split('.');
+
+ // _Api.extend( inst, obj );
+ // };
+
+
+ // [
+ // {
+ // name: 'data' -- string - Property name
+ // val: function () {}, -- function - Api method (or undefined if just an object
+ // methodExt: [ ... ], -- array - Array of Api object definitions to extend the method result
+ // propExt: [ ... ] -- array - Array of Api object definitions to extend the property
+ // },
+ // {
+ // name: 'row'
+ // val: {},
+ // methodExt: [ ... ],
+ // propExt: [
+ // {
+ // name: 'data'
+ // val: function () {},
+ // methodExt: [ ... ],
+ // propExt: [ ... ]
+ // },
+ // ...
+ // ]
+ // }
+ // ]
+
+ _Api.register = _api_register = function ( name, val )
+ {
+ if ( $.isArray( name ) ) {
+ for ( var j=0, jen=name.length ; j<jen ; j++ ) {
+ _Api.register( name[j], val );
+ }
+ return;
+ }
+
+ var
+ i, ien,
+ heir = name.split('.'),
+ struct = __apiStruct,
+ key, method;
+
+ var find = function ( src, name ) {
+ for ( var i=0, ien=src.length ; i<ien ; i++ ) {
+ if ( src[i].name === name ) {
+ return src[i];
+ }
+ }
+ return null;
+ };
+
+ for ( i=0, ien=heir.length ; i<ien ; i++ ) {
+ method = heir[i].indexOf('()') !== -1;
+ key = method ?
+ heir[i].replace('()', '') :
+ heir[i];
+
+ var src = find( struct, key );
+ if ( ! src ) {
+ src = {
+ name: key,
+ val: {},
+ methodExt: [],
+ propExt: []
+ };
+ struct.push( src );
+ }
+
+ if ( i === ien-1 ) {
+ src.val = val;
+ }
+ else {
+ struct = method ?
+ src.methodExt :
+ src.propExt;
+ }
+ }
+ };
+
+
+ _Api.registerPlural = _api_registerPlural = function ( pluralName, singularName, val ) {
+ _Api.register( pluralName, val );
+
+ _Api.register( singularName, function () {
+ var ret = val.apply( this, arguments );
+
+ if ( ret === this ) {
+ // Returned item is the API instance that was passed in, return it
+ return this;
+ }
+ else if ( ret instanceof _Api ) {
+ // New API instance returned, want the value from the first item
+ // in the returned array for the singular result.
+ return ret.length ?
+ $.isArray( ret[0] ) ?
+ new _Api( ret.context, ret[0] ) : // Array results are 'enhanced'
+ ret[0] :
+ undefined;
+ }
+
+ // Non-API return - just fire it back
+ return ret;
+ } );
+ };
+
+
+ /**
+ * Selector for HTML tables. Apply the given selector to the give array of
+ * DataTables settings objects.
+ *
+ * @param {string|integer} [selector] jQuery selector string or integer
+ * @param {array} Array of DataTables settings objects to be filtered
+ * @return {array}
+ * @ignore
+ */
+ var __table_selector = function ( selector, a )
+ {
+ // Integer is used to pick out a table by index
+ if ( typeof selector === 'number' ) {
+ return [ a[ selector ] ];
+ }
+
+ // Perform a jQuery selector on the table nodes
+ var nodes = $.map( a, function (el, i) {
+ return el.nTable;
+ } );
+
+ return $(nodes)
+ .filter( selector )
+ .map( function (i) {
+ // Need to translate back from the table node to the settings
+ var idx = $.inArray( this, nodes );
+ return a[ idx ];
+ } )
+ .toArray();
+ };
+
+
+
+ /**
+ * Context selector for the API's context (i.e. the tables the API instance
+ * refers to.
+ *
+ * @name DataTable.Api#tables
+ * @param {string|integer} [selector] Selector to pick which tables the iterator
+ * should operate on. If not given, all tables in the current context are
+ * used. This can be given as a jQuery selector (for example `':gt(0)'`) to
+ * select multiple tables or as an integer to select a single table.
+ * @returns {DataTable.Api} Returns a new API instance if a selector is given.
+ */
+ _api_register( 'tables()', function ( selector ) {
+ // A new instance is created if there was a selector specified
+ return selector ?
+ new _Api( __table_selector( selector, this.context ) ) :
+ this;
+ } );
+
+
+ _api_register( 'table()', function ( selector ) {
+ var tables = this.tables( selector );
+ var ctx = tables.context;
+
+ // Truncate to the first matched table
+ return ctx.length ?
+ new _Api( ctx[0] ) :
+ tables;
+ } );
+
+
+ _api_registerPlural( 'tables().nodes()', 'table().node()' , function () {
+ return this.iterator( 'table', function ( ctx ) {
+ return ctx.nTable;
+ }, 1 );
+ } );
+
+
+ _api_registerPlural( 'tables().body()', 'table().body()' , function () {
+ return this.iterator( 'table', function ( ctx ) {
+ return ctx.nTBody;
+ }, 1 );
+ } );
+
+
+ _api_registerPlural( 'tables().header()', 'table().header()' , function () {
+ return this.iterator( 'table', function ( ctx ) {
+ return ctx.nTHead;
+ }, 1 );
+ } );
+
+
+ _api_registerPlural( 'tables().footer()', 'table().footer()' , function () {
+ return this.iterator( 'table', function ( ctx ) {
+ return ctx.nTFoot;
+ }, 1 );
+ } );
+
+
+ _api_registerPlural( 'tables().containers()', 'table().container()' , function () {
+ return this.iterator( 'table', function ( ctx ) {
+ return ctx.nTableWrapper;
+ }, 1 );
+ } );
+
+
+
+ /**
+ * Redraw the tables in the current context.
+ */
+ _api_register( 'draw()', function ( paging ) {
+ return this.iterator( 'table', function ( settings ) {
+ if ( paging === 'page' ) {
+ _fnDraw( settings );
+ }
+ else {
+ if ( typeof paging === 'string' ) {
+ paging = paging === 'full-hold' ?
+ false :
+ true;
+ }
+
+ _fnReDraw( settings, paging===false );
+ }
+ } );
+ } );
+
+
+
+ /**
+ * Get the current page index.
+ *
+ * @return {integer} Current page index (zero based)
+ *//**
+ * Set the current page.
+ *
+ * Note that if you attempt to show a page which does not exist, DataTables will
+ * not throw an error, but rather reset the paging.
+ *
+ * @param {integer|string} action The paging action to take. This can be one of:
+ * * `integer` - The page index to jump to
+ * * `string` - An action to take:
+ * * `first` - Jump to first page.
+ * * `next` - Jump to the next page
+ * * `previous` - Jump to previous page
+ * * `last` - Jump to the last page.
+ * @returns {DataTables.Api} this
+ */
+ _api_register( 'page()', function ( action ) {
+ if ( action === undefined ) {
+ return this.page.info().page; // not an expensive call
+ }
+
+ // else, have an action to take on all tables
+ return this.iterator( 'table', function ( settings ) {
+ _fnPageChange( settings, action );
+ } );
+ } );
+
+
+ /**
+ * Paging information for the first table in the current context.
+ *
+ * If you require paging information for another table, use the `table()` method
+ * with a suitable selector.
+ *
+ * @return {object} Object with the following properties set:
+ * * `page` - Current page index (zero based - i.e. the first page is `0`)
+ * * `pages` - Total number of pages
+ * * `start` - Display index for the first record shown on the current page
+ * * `end` - Display index for the last record shown on the current page
+ * * `length` - Display length (number of records). Note that generally `start
+ * + length = end`, but this is not always true, for example if there are
+ * only 2 records to show on the final page, with a length of 10.
+ * * `recordsTotal` - Full data set length
+ * * `recordsDisplay` - Data set length once the current filtering criterion
+ * are applied.
+ */
+ _api_register( 'page.info()', function ( action ) {
+ if ( this.context.length === 0 ) {
+ return undefined;
+ }
+
+ var
+ settings = this.context[0],
+ start = settings._iDisplayStart,
+ len = settings.oFeatures.bPaginate ? settings._iDisplayLength : -1,
+ visRecords = settings.fnRecordsDisplay(),
+ all = len === -1;
+
+ return {
+ "page": all ? 0 : Math.floor( start / len ),
+ "pages": all ? 1 : Math.ceil( visRecords / len ),
+ "start": start,
+ "end": settings.fnDisplayEnd(),
+ "length": len,
+ "recordsTotal": settings.fnRecordsTotal(),
+ "recordsDisplay": visRecords,
+ "serverSide": _fnDataSource( settings ) === 'ssp'
+ };
+ } );
+
+
+ /**
+ * Get the current page length.
+ *
+ * @return {integer} Current page length. Note `-1` indicates that all records
+ * are to be shown.
+ *//**
+ * Set the current page length.
+ *
+ * @param {integer} Page length to set. Use `-1` to show all records.
+ * @returns {DataTables.Api} this
+ */
+ _api_register( 'page.len()', function ( len ) {
+ // Note that we can't call this function 'length()' because `length`
+ // is a Javascript property of functions which defines how many arguments
+ // the function expects.
+ if ( len === undefined ) {
+ return this.context.length !== 0 ?
+ this.context[0]._iDisplayLength :
+ undefined;
+ }
+
+ // else, set the page length
+ return this.iterator( 'table', function ( settings ) {
+ _fnLengthChange( settings, len );
+ } );
+ } );
+
+
+
+ var __reload = function ( settings, holdPosition, callback ) {
+ // Use the draw event to trigger a callback
+ if ( callback ) {
+ var api = new _Api( settings );
+
+ api.one( 'draw', function () {
+ callback( api.ajax.json() );
+ } );
+ }
+
+ if ( _fnDataSource( settings ) == 'ssp' ) {
+ _fnReDraw( settings, holdPosition );
+ }
+ else {
+ _fnProcessingDisplay( settings, true );
+
+ // Cancel an existing request
+ var xhr = settings.jqXHR;
+ if ( xhr && xhr.readyState !== 4 ) {
+ xhr.abort();
+ }
+
+ // Trigger xhr
+ _fnBuildAjax( settings, [], function( json ) {
+ _fnClearTable( settings );
+
+ var data = _fnAjaxDataSrc( settings, json );
+ for ( var i=0, ien=data.length ; i<ien ; i++ ) {
+ _fnAddData( settings, data[i] );
+ }
+
+ _fnReDraw( settings, holdPosition );
+ _fnProcessingDisplay( settings, false );
+ } );
+ }
+ };
+
+
+ /**
+ * Get the JSON response from the last Ajax request that DataTables made to the
+ * server. Note that this returns the JSON from the first table in the current
+ * context.
+ *
+ * @return {object} JSON received from the server.
+ */
+ _api_register( 'ajax.json()', function () {
+ var ctx = this.context;
+
+ if ( ctx.length > 0 ) {
+ return ctx[0].json;
+ }
+
+ // else return undefined;
+ } );
+
+
+ /**
+ * Get the data submitted in the last Ajax request
+ */
+ _api_register( 'ajax.params()', function () {
+ var ctx = this.context;
+
+ if ( ctx.length > 0 ) {
+ return ctx[0].oAjaxData;
+ }
+
+ // else return undefined;
+ } );
+
+
+ /**
+ * Reload tables from the Ajax data source. Note that this function will
+ * automatically re-draw the table when the remote data has been loaded.
+ *
+ * @param {boolean} [reset=true] Reset (default) or hold the current paging
+ * position. A full re-sort and re-filter is performed when this method is
+ * called, which is why the pagination reset is the default action.
+ * @returns {DataTables.Api} this
+ */
+ _api_register( 'ajax.reload()', function ( callback, resetPaging ) {
+ return this.iterator( 'table', function (settings) {
+ __reload( settings, resetPaging===false, callback );
+ } );
+ } );
+
+
+ /**
+ * Get the current Ajax URL. Note that this returns the URL from the first
+ * table in the current context.
+ *
+ * @return {string} Current Ajax source URL
+ *//**
+ * Set the Ajax URL. Note that this will set the URL for all tables in the
+ * current context.
+ *
+ * @param {string} url URL to set.
+ * @returns {DataTables.Api} this
+ */
+ _api_register( 'ajax.url()', function ( url ) {
+ var ctx = this.context;
+
+ if ( url === undefined ) {
+ // get
+ if ( ctx.length === 0 ) {
+ return undefined;
+ }
+ ctx = ctx[0];
+
+ return ctx.ajax ?
+ $.isPlainObject( ctx.ajax ) ?
+ ctx.ajax.url :
+ ctx.ajax :
+ ctx.sAjaxSource;
+ }
+
+ // set
+ return this.iterator( 'table', function ( settings ) {
+ if ( $.isPlainObject( settings.ajax ) ) {
+ settings.ajax.url = url;
+ }
+ else {
+ settings.ajax = url;
+ }
+ // No need to consider sAjaxSource here since DataTables gives priority
+ // to `ajax` over `sAjaxSource`. So setting `ajax` here, renders any
+ // value of `sAjaxSource` redundant.
+ } );
+ } );
+
+
+ /**
+ * Load data from the newly set Ajax URL. Note that this method is only
+ * available when `ajax.url()` is used to set a URL. Additionally, this method
+ * has the same effect as calling `ajax.reload()` but is provided for
+ * convenience when setting a new URL. Like `ajax.reload()` it will
+ * automatically redraw the table once the remote data has been loaded.
+ *
+ * @returns {DataTables.Api} this
+ */
+ _api_register( 'ajax.url().load()', function ( callback, resetPaging ) {
+ // Same as a reload, but makes sense to present it for easy access after a
+ // url change
+ return this.iterator( 'table', function ( ctx ) {
+ __reload( ctx, resetPaging===false, callback );
+ } );
+ } );
+
+
+
+
+ var _selector_run = function ( type, selector, selectFn, settings, opts )
+ {
+ var
+ out = [], res,
+ a, i, ien, j, jen,
+ selectorType = typeof selector;
+
+ // Can't just check for isArray here, as an API or jQuery instance might be
+ // given with their array like look
+ if ( ! selector || selectorType === 'string' || selectorType === 'function' || selector.length === undefined ) {
+ selector = [ selector ];
+ }
+
+ for ( i=0, ien=selector.length ; i<ien ; i++ ) {
+ a = selector[i] && selector[i].split ?
+ selector[i].split(',') :
+ [ selector[i] ];
+
+ for ( j=0, jen=a.length ; j<jen ; j++ ) {
+ res = selectFn( typeof a[j] === 'string' ? $.trim(a[j]) : a[j] );
+
+ if ( res && res.length ) {
+ out = out.concat( res );
+ }
+ }
+ }
+
+ // selector extensions
+ var ext = _ext.selector[ type ];
+ if ( ext.length ) {
+ for ( i=0, ien=ext.length ; i<ien ; i++ ) {
+ out = ext[i]( settings, opts, out );
+ }
+ }
+
+ return _unique( out );
+ };
+
+
+ var _selector_opts = function ( opts )
+ {
+ if ( ! opts ) {
+ opts = {};
+ }
+
+ // Backwards compatibility for 1.9- which used the terminology filter rather
+ // than search
+ if ( opts.filter && opts.search === undefined ) {
+ opts.search = opts.filter;
+ }
+
+ return $.extend( {
+ search: 'none',
+ order: 'current',
+ page: 'all'
+ }, opts );
+ };
+
+
+ var _selector_first = function ( inst )
+ {
+ // Reduce the API instance to the first item found
+ for ( var i=0, ien=inst.length ; i<ien ; i++ ) {
+ if ( inst[i].length > 0 ) {
+ // Assign the first element to the first item in the instance
+ // and truncate the instance and context
+ inst[0] = inst[i];
+ inst[0].length = 1;
+ inst.length = 1;
+ inst.context = [ inst.context[i] ];
+
+ return inst;
+ }
+ }
+
+ // Not found - return an empty instance
+ inst.length = 0;
+ return inst;
+ };
+
+
+ var _selector_row_indexes = function ( settings, opts )
+ {
+ var
+ i, ien, tmp, a=[],
+ displayFiltered = settings.aiDisplay,
+ displayMaster = settings.aiDisplayMaster;
+
+ var
+ search = opts.search, // none, applied, removed
+ order = opts.order, // applied, current, index (original - compatibility with 1.9)
+ page = opts.page; // all, current
+
+ if ( _fnDataSource( settings ) == 'ssp' ) {
+ // In server-side processing mode, most options are irrelevant since
+ // rows not shown don't exist and the index order is the applied order
+ // Removed is a special case - for consistency just return an empty
+ // array
+ return search === 'removed' ?
+ [] :
+ _range( 0, displayMaster.length );
+ }
+ else if ( page == 'current' ) {
+ // Current page implies that order=current and fitler=applied, since it is
+ // fairly senseless otherwise, regardless of what order and search actually
+ // are
+ for ( i=settings._iDisplayStart, ien=settings.fnDisplayEnd() ; i<ien ; i++ ) {
+ a.push( displayFiltered[i] );
+ }
+ }
+ else if ( order == 'current' || order == 'applied' ) {
+ a = search == 'none' ?
+ displayMaster.slice() : // no search
+ search == 'applied' ?
+ displayFiltered.slice() : // applied search
+ $.map( displayMaster, function (el, i) { // removed search
+ return $.inArray( el, displayFiltered ) === -1 ? el : null;
+ } );
+ }
+ else if ( order == 'index' || order == 'original' ) {
+ for ( i=0, ien=settings.aoData.length ; i<ien ; i++ ) {
+ if ( search == 'none' ) {
+ a.push( i );
+ }
+ else { // applied | removed
+ tmp = $.inArray( i, displayFiltered );
+
+ if ((tmp === -1 && search == 'removed') ||
+ (tmp >= 0 && search == 'applied') )
+ {
+ a.push( i );
+ }
+ }
+ }
+ }
+
+ return a;
+ };
+
+
+ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Rows
+ *
+ * {} - no selector - use all available rows
+ * {integer} - row aoData index
+ * {node} - TR node
+ * {string} - jQuery selector to apply to the TR elements
+ * {array} - jQuery array of nodes, or simply an array of TR nodes
+ *
+ */
+
+
+ var __row_selector = function ( settings, selector, opts )
+ {
+ var run = function ( sel ) {
+ var selInt = _intVal( sel );
+ var i, ien;
+
+ // Short cut - selector is a number and no options provided (default is
+ // all records, so no need to check if the index is in there, since it
+ // must be - dev error if the index doesn't exist).
+ if ( selInt !== null && ! opts ) {
+ return [ selInt ];
+ }
+
+ var rows = _selector_row_indexes( settings, opts );
+
+ if ( selInt !== null && $.inArray( selInt, rows ) !== -1 ) {
+ // Selector - integer
+ return [ selInt ];
+ }
+ else if ( ! sel ) {
+ // Selector - none
+ return rows;
+ }
+
+ // Selector - function
+ if ( typeof sel === 'function' ) {
+ return $.map( rows, function (idx) {
+ var row = settings.aoData[ idx ];
+ return sel( idx, row._aData, row.nTr ) ? idx : null;
+ } );
+ }
+
+ // Get nodes in the order from the `rows` array with null values removed
+ var nodes = _removeEmpty(
+ _pluck_order( settings.aoData, rows, 'nTr' )
+ );
+
+ // Selector - node
+ if ( sel.nodeName ) {
+ if ( $.inArray( sel, nodes ) !== -1 ) {
+ return [ sel._DT_RowIndex ]; // sel is a TR node that is in the table
+ // and DataTables adds a prop for fast lookup
+ }
+ }
+
+ // ID selector. Want to always be able to select rows by id, regardless
+ // of if the tr element has been created or not, so can't rely upon
+ // jQuery here - hence a custom implementation. This does not match
+ // Sizzle's fast selector or HTML4 - in HTML5 the ID can be anything,
+ // but to select it using a CSS selector engine (like Sizzle or
+ // querySelect) it would need to need to be escaped for some characters.
+ // DataTables simplifies this for row selectors since you can select
+ // only a row. A # indicates an id any anything that follows is the id -
+ // unescaped.
+ if ( typeof sel === 'string' && sel.charAt(0) === '#' ) {
+ // get row index from id
+ var rowObj = settings.aIds[ sel.replace( /^#/, '' ) ];
+ if ( rowObj !== undefined ) {
+ return [ rowObj.idx ];
+ }
+
+ // need to fall through to jQuery in case there is DOM id that
+ // matches
+ }
+
+ // Selector - jQuery selector string, array of nodes or jQuery object/
+ // As jQuery's .filter() allows jQuery objects to be passed in filter,
+ // it also allows arrays, so this will cope with all three options
+ return $(nodes)
+ .filter( sel )
+ .map( function () {
+ return this._DT_RowIndex;
+ } )
+ .toArray();
+ };
+
+ return _selector_run( 'row', selector, run, settings, opts );
+ };
+
+
+ _api_register( 'rows()', function ( selector, opts ) {
+ // argument shifting
+ if ( selector === undefined ) {
+ selector = '';
+ }
+ else if ( $.isPlainObject( selector ) ) {
+ opts = selector;
+ selector = '';
+ }
+
+ opts = _selector_opts( opts );
+
+ var inst = this.iterator( 'table', function ( settings ) {
+ return __row_selector( settings, selector, opts );
+ }, 1 );
+
+ // Want argument shifting here and in __row_selector?
+ inst.selector.rows = selector;
+ inst.selector.opts = opts;
+
+ return inst;
+ } );
+
+ _api_register( 'rows().nodes()', function () {
+ return this.iterator( 'row', function ( settings, row ) {
+ return settings.aoData[ row ].nTr || undefined;
+ }, 1 );
+ } );
+
+ _api_register( 'rows().data()', function () {
+ return this.iterator( true, 'rows', function ( settings, rows ) {
+ return _pluck_order( settings.aoData, rows, '_aData' );
+ }, 1 );
+ } );
+
+ _api_registerPlural( 'rows().cache()', 'row().cache()', function ( type ) {
+ return this.iterator( 'row', function ( settings, row ) {
+ var r = settings.aoData[ row ];
+ return type === 'search' ? r._aFilterData : r._aSortData;
+ }, 1 );
+ } );
+
+ _api_registerPlural( 'rows().invalidate()', 'row().invalidate()', function ( src ) {
+ return this.iterator( 'row', function ( settings, row ) {
+ _fnInvalidate( settings, row, src );
+ } );
+ } );
+
+ _api_registerPlural( 'rows().indexes()', 'row().index()', function () {
+ return this.iterator( 'row', function ( settings, row ) {
+ return row;
+ }, 1 );
+ } );
+
+ _api_registerPlural( 'rows().ids()', 'row().id()', function ( hash ) {
+ var a = [];
+ var context = this.context;
+
+ // `iterator` will drop undefined values, but in this case we want them
+ for ( var i=0, ien=context.length ; i<ien ; i++ ) {
+ for ( var j=0, jen=this[i].length ; j<jen ; j++ ) {
+ var id = context[i].rowIdFn( context[i].aoData[ this[i][j] ]._aData );
+ a.push( (hash === true ? '#' : '' )+ id );
+ }
+ }
+
+ return new _Api( context, a );
+ } );
+
+ _api_registerPlural( 'rows().remove()', 'row().remove()', function () {
+ var that = this;
+
+ this.iterator( 'row', function ( settings, row, thatIdx ) {
+ var data = settings.aoData;
+ var rowData = data[ row ];
+ var i, ien, j, jen;
+ var loopRow, loopCells;
+
+ data.splice( row, 1 );
+
+ // Update the cached indexes
+ for ( i=0, ien=data.length ; i<ien ; i++ ) {
+ loopRow = data[i];
+ loopCells = loopRow.anCells;
+
+ // Rows
+ if ( loopRow.nTr !== null ) {
+ loopRow.nTr._DT_RowIndex = i;
+ }
+
+ // Cells
+ if ( loopCells !== null ) {
+ for ( j=0, jen=loopCells.length ; j<jen ; j++ ) {
+ loopCells[j]._DT_CellIndex.row = i;
+ }
+ }
+ }
+
+ // Delete from the display arrays
+ _fnDeleteIndex( settings.aiDisplayMaster, row );
+ _fnDeleteIndex( settings.aiDisplay, row );
+ _fnDeleteIndex( that[ thatIdx ], row, false ); // maintain local indexes
+
+ // Check for an 'overflow' they case for displaying the table
+ _fnLengthOverflow( settings );
+
+ // Remove the row's ID reference if there is one
+ var id = settings.rowIdFn( rowData._aData );
+ if ( id !== undefined ) {
+ delete settings.aIds[ id ];
+ }
+ } );
+
+ this.iterator( 'table', function ( settings ) {
+ for ( var i=0, ien=settings.aoData.length ; i<ien ; i++ ) {
+ settings.aoData[i].idx = i;
+ }
+ } );
+
+ return this;
+ } );
+
+
+ _api_register( 'rows.add()', function ( rows ) {
+ var newRows = this.iterator( 'table', function ( settings ) {
+ var row, i, ien;
+ var out = [];
+
+ for ( i=0, ien=rows.length ; i<ien ; i++ ) {
+ row = rows[i];
+
+ if ( row.nodeName && row.nodeName.toUpperCase() === 'TR' ) {
+ out.push( _fnAddTr( settings, row )[0] );
+ }
+ else {
+ out.push( _fnAddData( settings, row ) );
+ }
+ }
+
+ return out;
+ }, 1 );
+
+ // Return an Api.rows() extended instance, so rows().nodes() etc can be used
+ var modRows = this.rows( -1 );
+ modRows.pop();
+ $.merge( modRows, newRows );
+
+ return modRows;
+ } );
+
+
+
+
+
+ /**
+ *
+ */
+ _api_register( 'row()', function ( selector, opts ) {
+ return _selector_first( this.rows( selector, opts ) );
+ } );
+
+
+ _api_register( 'row().data()', function ( data ) {
+ var ctx = this.context;
+
+ if ( data === undefined ) {
+ // Get
+ return ctx.length && this.length ?
+ ctx[0].aoData[ this[0] ]._aData :
+ undefined;
+ }
+
+ // Set
+ ctx[0].aoData[ this[0] ]._aData = data;
+
+ // Automatically invalidate
+ _fnInvalidate( ctx[0], this[0], 'data' );
+
+ return this;
+ } );
+
+
+ _api_register( 'row().node()', function () {
+ var ctx = this.context;
+
+ return ctx.length && this.length ?
+ ctx[0].aoData[ this[0] ].nTr || null :
+ null;
+ } );
+
+
+ _api_register( 'row.add()', function ( row ) {
+ // Allow a jQuery object to be passed in - only a single row is added from
+ // it though - the first element in the set
+ if ( row instanceof $ && row.length ) {
+ row = row[0];
+ }
+
+ var rows = this.iterator( 'table', function ( settings ) {
+ if ( row.nodeName && row.nodeName.toUpperCase() === 'TR' ) {
+ return _fnAddTr( settings, row )[0];
+ }
+ return _fnAddData( settings, row );
+ } );
+
+ // Return an Api.rows() extended instance, with the newly added row selected
+ return this.row( rows[0] );
+ } );
+
+
+
+ var __details_add = function ( ctx, row, data, klass )
+ {
+ // Convert to array of TR elements
+ var rows = [];
+ var addRow = function ( r, k ) {
+ // Recursion to allow for arrays of jQuery objects
+ if ( $.isArray( r ) || r instanceof $ ) {
+ for ( var i=0, ien=r.length ; i<ien ; i++ ) {
+ addRow( r[i], k );
+ }
+ return;
+ }
+
+ // If we get a TR element, then just add it directly - up to the dev
+ // to add the correct number of columns etc
+ if ( r.nodeName && r.nodeName.toLowerCase() === 'tr' ) {
+ rows.push( r );
+ }
+ else {
+ // Otherwise create a row with a wrapper
+ var created = $('<tr><td/></tr>').addClass( k );
+ $('td', created)
+ .addClass( k )
+ .html( r )
+ [0].colSpan = _fnVisbleColumns( ctx );
+
+ rows.push( created[0] );
+ }
+ };
+
+ addRow( data, klass );
+
+ if ( row._details ) {
+ row._details.remove();
+ }
+
+ row._details = $(rows);
+
+ // If the children were already shown, that state should be retained
+ if ( row._detailsShow ) {
+ row._details.insertAfter( row.nTr );
+ }
+ };
+
+
+ var __details_remove = function ( api, idx )
+ {
+ var ctx = api.context;
+
+ if ( ctx.length ) {
+ var row = ctx[0].aoData[ idx !== undefined ? idx : api[0] ];
+
+ if ( row && row._details ) {
+ row._details.remove();
+
+ row._detailsShow = undefined;
+ row._details = undefined;
+ }
+ }
+ };
+
+
+ var __details_display = function ( api, show ) {
+ var ctx = api.context;
+
+ if ( ctx.length && api.length ) {
+ var row = ctx[0].aoData[ api[0] ];
+
+ if ( row._details ) {
+ row._detailsShow = show;
+
+ if ( show ) {
+ row._details.insertAfter( row.nTr );
+ }
+ else {
+ row._details.detach();
+ }
+
+ __details_events( ctx[0] );
+ }
+ }
+ };
+
+
+ var __details_events = function ( settings )
+ {
+ var api = new _Api( settings );
+ var namespace = '.dt.DT_details';
+ var drawEvent = 'draw'+namespace;
+ var colvisEvent = 'column-visibility'+namespace;
+ var destroyEvent = 'destroy'+namespace;
+ var data = settings.aoData;
+
+ api.off( drawEvent +' '+ colvisEvent +' '+ destroyEvent );
+
+ if ( _pluck( data, '_details' ).length > 0 ) {
+ // On each draw, insert the required elements into the document
+ api.on( drawEvent, function ( e, ctx ) {
+ if ( settings !== ctx ) {
+ return;
+ }
+
+ api.rows( {page:'current'} ).eq(0).each( function (idx) {
+ // Internal data grab
+ var row = data[ idx ];
+
+ if ( row._detailsShow ) {
+ row._details.insertAfter( row.nTr );
+ }
+ } );
+ } );
+
+ // Column visibility change - update the colspan
+ api.on( colvisEvent, function ( e, ctx, idx, vis ) {
+ if ( settings !== ctx ) {
+ return;
+ }
+
+ // Update the colspan for the details rows (note, only if it already has
+ // a colspan)
+ var row, visible = _fnVisbleColumns( ctx );
+
+ for ( var i=0, ien=data.length ; i<ien ; i++ ) {
+ row = data[i];
+
+ if ( row._details ) {
+ row._details.children('td[colspan]').attr('colspan', visible );
+ }
+ }
+ } );
+
+ // Table destroyed - nuke any child rows
+ api.on( destroyEvent, function ( e, ctx ) {
+ if ( settings !== ctx ) {
+ return;
+ }
+
+ for ( var i=0, ien=data.length ; i<ien ; i++ ) {
+ if ( data[i]._details ) {
+ __details_remove( api, i );
+ }
+ }
+ } );
+ }
+ };
+
+ // Strings for the method names to help minification
+ var _emp = '';
+ var _child_obj = _emp+'row().child';
+ var _child_mth = _child_obj+'()';
+
+ // data can be:
+ // tr
+ // string
+ // jQuery or array of any of the above
+ _api_register( _child_mth, function ( data, klass ) {
+ var ctx = this.context;
+
+ if ( data === undefined ) {
+ // get
+ return ctx.length && this.length ?
+ ctx[0].aoData[ this[0] ]._details :
+ undefined;
+ }
+ else if ( data === true ) {
+ // show
+ this.child.show();
+ }
+ else if ( data === false ) {
+ // remove
+ __details_remove( this );
+ }
+ else if ( ctx.length && this.length ) {
+ // set
+ __details_add( ctx[0], ctx[0].aoData[ this[0] ], data, klass );
+ }
+
+ return this;
+ } );
+
+
+ _api_register( [
+ _child_obj+'.show()',
+ _child_mth+'.show()' // only when `child()` was called with parameters (without
+ ], function ( show ) { // it returns an object and this method is not executed)
+ __details_display( this, true );
+ return this;
+ } );
+
+
+ _api_register( [
+ _child_obj+'.hide()',
+ _child_mth+'.hide()' // only when `child()` was called with parameters (without
+ ], function () { // it returns an object and this method is not executed)
+ __details_display( this, false );
+ return this;
+ } );
+
+
+ _api_register( [
+ _child_obj+'.remove()',
+ _child_mth+'.remove()' // only when `child()` was called with parameters (without
+ ], function () { // it returns an object and this method is not executed)
+ __details_remove( this );
+ return this;
+ } );
+
+
+ _api_register( _child_obj+'.isShown()', function () {
+ var ctx = this.context;
+
+ if ( ctx.length && this.length ) {
+ // _detailsShown as false or undefined will fall through to return false
+ return ctx[0].aoData[ this[0] ]._detailsShow || false;
+ }
+ return false;
+ } );
+
+
+
+ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Columns
+ *
+ * {integer} - column index (>=0 count from left, <0 count from right)
+ * "{integer}:visIdx" - visible column index (i.e. translate to column index) (>=0 count from left, <0 count from right)
+ * "{integer}:visible" - alias for {integer}:visIdx (>=0 count from left, <0 count from right)
+ * "{string}:name" - column name
+ * "{string}" - jQuery selector on column header nodes
+ *
+ */
+
+ // can be an array of these items, comma separated list, or an array of comma
+ // separated lists
+
+ var __re_column_selector = /^(.+):(name|visIdx|visible)$/;
+
+
+ // r1 and r2 are redundant - but it means that the parameters match for the
+ // iterator callback in columns().data()
+ var __columnData = function ( settings, column, r1, r2, rows ) {
+ var a = [];
+ for ( var row=0, ien=rows.length ; row<ien ; row++ ) {
+ a.push( _fnGetCellData( settings, rows[row], column ) );
+ }
+ return a;
+ };
+
+
+ var __column_selector = function ( settings, selector, opts )
+ {
+ var
+ columns = settings.aoColumns,
+ names = _pluck( columns, 'sName' ),
+ nodes = _pluck( columns, 'nTh' );
+
+ var run = function ( s ) {
+ var selInt = _intVal( s );
+
+ // Selector - all
+ if ( s === '' ) {
+ return _range( columns.length );
+ }
+
+ // Selector - index
+ if ( selInt !== null ) {
+ return [ selInt >= 0 ?
+ selInt : // Count from left
+ columns.length + selInt // Count from right (+ because its a negative value)
+ ];
+ }
+
+ // Selector = function
+ if ( typeof s === 'function' ) {
+ var rows = _selector_row_indexes( settings, opts );
+
+ return $.map( columns, function (col, idx) {
+ return s(
+ idx,
+ __columnData( settings, idx, 0, 0, rows ),
+ nodes[ idx ]
+ ) ? idx : null;
+ } );
+ }
+
+ // jQuery or string selector
+ var match = typeof s === 'string' ?
+ s.match( __re_column_selector ) :
+ '';
+
+ if ( match ) {
+ switch( match[2] ) {
+ case 'visIdx':
+ case 'visible':
+ var idx = parseInt( match[1], 10 );
+ // Visible index given, convert to column index
+ if ( idx < 0 ) {
+ // Counting from the right
+ var visColumns = $.map( columns, function (col,i) {
+ return col.bVisible ? i : null;
+ } );
+ return [ visColumns[ visColumns.length + idx ] ];
+ }
+ // Counting from the left
+ return [ _fnVisibleToColumnIndex( settings, idx ) ];
+
+ case 'name':
+ // match by name. `names` is column index complete and in order
+ return $.map( names, function (name, i) {
+ return name === match[1] ? i : null;
+ } );
+ }
+ }
+ else {
+ // jQuery selector on the TH elements for the columns
+ return $( nodes )
+ .filter( s )
+ .map( function () {
+ return $.inArray( this, nodes ); // `nodes` is column index complete and in order
+ } )
+ .toArray();
+ }
+ };
+
+ return _selector_run( 'column', selector, run, settings, opts );
+ };
+
+
+ var __setColumnVis = function ( settings, column, vis, recalc ) {
+ var
+ cols = settings.aoColumns,
+ col = cols[ column ],
+ data = settings.aoData,
+ row, cells, i, ien, tr;
+
+ // Get
+ if ( vis === undefined ) {
+ return col.bVisible;
+ }
+
+ // Set
+ // No change
+ if ( col.bVisible === vis ) {
+ return;
+ }
+
+ if ( vis ) {
+ // Insert column
+ // Need to decide if we should use appendChild or insertBefore
+ var insertBefore = $.inArray( true, _pluck(cols, 'bVisible'), column+1 );
+
+ for ( i=0, ien=data.length ; i<ien ; i++ ) {
+ tr = data[i].nTr;
+ cells = data[i].anCells;
+
+ if ( tr ) {
+ // insertBefore can act like appendChild if 2nd arg is null
+ tr.insertBefore( cells[ column ], cells[ insertBefore ] || null );
+ }
+ }
+ }
+ else {
+ // Remove column
+ $( _pluck( settings.aoData, 'anCells', column ) ).detach();
+ }
+
+ // Common actions
+ col.bVisible = vis;
+ _fnDrawHead( settings, settings.aoHeader );
+ _fnDrawHead( settings, settings.aoFooter );
+
+ if ( recalc === undefined || recalc ) {
+ // Automatically adjust column sizing
+ _fnAdjustColumnSizing( settings );
+
+ // Realign columns for scrolling
+ if ( settings.oScroll.sX || settings.oScroll.sY ) {
+ _fnScrollDraw( settings );
+ }
+ }
+
+ _fnCallbackFire( settings, null, 'column-visibility', [settings, column, vis, recalc] );
+
+ _fnSaveState( settings );
+ };
+
+
+ _api_register( 'columns()', function ( selector, opts ) {
+ // argument shifting
+ if ( selector === undefined ) {
+ selector = '';
+ }
+ else if ( $.isPlainObject( selector ) ) {
+ opts = selector;
+ selector = '';
+ }
+
+ opts = _selector_opts( opts );
+
+ var inst = this.iterator( 'table', function ( settings ) {
+ return __column_selector( settings, selector, opts );
+ }, 1 );
+
+ // Want argument shifting here and in _row_selector?
+ inst.selector.cols = selector;
+ inst.selector.opts = opts;
+
+ return inst;
+ } );
+
+ _api_registerPlural( 'columns().header()', 'column().header()', function ( selector, opts ) {
+ return this.iterator( 'column', function ( settings, column ) {
+ return settings.aoColumns[column].nTh;
+ }, 1 );
+ } );
+
+ _api_registerPlural( 'columns().footer()', 'column().footer()', function ( selector, opts ) {
+ return this.iterator( 'column', function ( settings, column ) {
+ return settings.aoColumns[column].nTf;
+ }, 1 );
+ } );
+
+ _api_registerPlural( 'columns().data()', 'column().data()', function () {
+ return this.iterator( 'column-rows', __columnData, 1 );
+ } );
+
+ _api_registerPlural( 'columns().dataSrc()', 'column().dataSrc()', function () {
+ return this.iterator( 'column', function ( settings, column ) {
+ return settings.aoColumns[column].mData;
+ }, 1 );
+ } );
+
+ _api_registerPlural( 'columns().cache()', 'column().cache()', function ( type ) {
+ return this.iterator( 'column-rows', function ( settings, column, i, j, rows ) {
+ return _pluck_order( settings.aoData, rows,
+ type === 'search' ? '_aFilterData' : '_aSortData', column
+ );
+ }, 1 );
+ } );
+
+ _api_registerPlural( 'columns().nodes()', 'column().nodes()', function () {
+ return this.iterator( 'column-rows', function ( settings, column, i, j, rows ) {
+ return _pluck_order( settings.aoData, rows, 'anCells', column ) ;
+ }, 1 );
+ } );
+
+ _api_registerPlural( 'columns().visible()', 'column().visible()', function ( vis, calc ) {
+ return this.iterator( 'column', function ( settings, column ) {
+ if ( vis === undefined ) {
+ return settings.aoColumns[ column ].bVisible;
+ } // else
+ __setColumnVis( settings, column, vis, calc );
+ } );
+ } );
+
+ _api_registerPlural( 'columns().indexes()', 'column().index()', function ( type ) {
+ return this.iterator( 'column', function ( settings, column ) {
+ return type === 'visible' ?
+ _fnColumnIndexToVisible( settings, column ) :
+ column;
+ }, 1 );
+ } );
+
+ _api_register( 'columns.adjust()', function () {
+ return this.iterator( 'table', function ( settings ) {
+ _fnAdjustColumnSizing( settings );
+ }, 1 );
+ } );
+
+ _api_register( 'column.index()', function ( type, idx ) {
+ if ( this.context.length !== 0 ) {
+ var ctx = this.context[0];
+
+ if ( type === 'fromVisible' || type === 'toData' ) {
+ return _fnVisibleToColumnIndex( ctx, idx );
+ }
+ else if ( type === 'fromData' || type === 'toVisible' ) {
+ return _fnColumnIndexToVisible( ctx, idx );
+ }
+ }
+ } );
+
+ _api_register( 'column()', function ( selector, opts ) {
+ return _selector_first( this.columns( selector, opts ) );
+ } );
+
+
+
+
+ var __cell_selector = function ( settings, selector, opts )
+ {
+ var data = settings.aoData;
+ var rows = _selector_row_indexes( settings, opts );
+ var cells = _removeEmpty( _pluck_order( data, rows, 'anCells' ) );
+ var allCells = $( [].concat.apply([], cells) );
+ var row;
+ var columns = settings.aoColumns.length;
+ var a, i, ien, j, o, host;
+
+ var run = function ( s ) {
+ var fnSelector = typeof s === 'function';
+
+ if ( s === null || s === undefined || fnSelector ) {
+ // All cells and function selectors
+ a = [];
+
+ for ( i=0, ien=rows.length ; i<ien ; i++ ) {
+ row = rows[i];
+
+ for ( j=0 ; j<columns ; j++ ) {
+ o = {
+ row: row,
+ column: j
+ };
+
+ if ( fnSelector ) {
+ // Selector - function
+ host = data[ row ];
+
+ if ( s( o, _fnGetCellData(settings, row, j), host.anCells ? host.anCells[j] : null ) ) {
+ a.push( o );
+ }
+ }
+ else {
+ // Selector - all
+ a.push( o );
+ }
+ }
+ }
+
+ return a;
+ }
+
+ // Selector - index
+ if ( $.isPlainObject( s ) ) {
+ return [s];
+ }
+
+ // Selector - jQuery filtered cells
+ return allCells
+ .filter( s )
+ .map( function (i, el) {
+ return { // use a new object, in case someone changes the values
+ row: el._DT_CellIndex.row,
+ column: el._DT_CellIndex.column
+ };
+ } )
+ .toArray();
+ };
+
+ return _selector_run( 'cell', selector, run, settings, opts );
+ };
+
+
+
+
+ _api_register( 'cells()', function ( rowSelector, columnSelector, opts ) {
+ // Argument shifting
+ if ( $.isPlainObject( rowSelector ) ) {
+ // Indexes
+ if ( rowSelector.row === undefined ) {
+ // Selector options in first parameter
+ opts = rowSelector;
+ rowSelector = null;
+ }
+ else {
+ // Cell index objects in first parameter
+ opts = columnSelector;
+ columnSelector = null;
+ }
+ }
+ if ( $.isPlainObject( columnSelector ) ) {
+ opts = columnSelector;
+ columnSelector = null;
+ }
+
+ // Cell selector
+ if ( columnSelector === null || columnSelector === undefined ) {
+ return this.iterator( 'table', function ( settings ) {
+ return __cell_selector( settings, rowSelector, _selector_opts( opts ) );
+ } );
+ }
+
+ // Row + column selector
+ var columns = this.columns( columnSelector, opts );
+ var rows = this.rows( rowSelector, opts );
+ var a, i, ien, j, jen;
+
+ var cells = this.iterator( 'table', function ( settings, idx ) {
+ a = [];
+
+ for ( i=0, ien=rows[idx].length ; i<ien ; i++ ) {
+ for ( j=0, jen=columns[idx].length ; j<jen ; j++ ) {
+ a.push( {
+ row: rows[idx][i],
+ column: columns[idx][j]
+ } );
+ }
+ }
+
+ return a;
+ }, 1 );
+
+ $.extend( cells.selector, {
+ cols: columnSelector,
+ rows: rowSelector,
+ opts: opts
+ } );
+
+ return cells;
+ } );
+
+
+ _api_registerPlural( 'cells().nodes()', 'cell().node()', function () {
+ return this.iterator( 'cell', function ( settings, row, column ) {
+ var cells = settings.aoData[ row ].anCells;
+ return cells ?
+ cells[ column ] :
+ undefined;
+ }, 1 );
+ } );
+
+
+ _api_register( 'cells().data()', function () {
+ return this.iterator( 'cell', function ( settings, row, column ) {
+ return _fnGetCellData( settings, row, column );
+ }, 1 );
+ } );
+
+
+ _api_registerPlural( 'cells().cache()', 'cell().cache()', function ( type ) {
+ type = type === 'search' ? '_aFilterData' : '_aSortData';
+
+ return this.iterator( 'cell', function ( settings, row, column ) {
+ return settings.aoData[ row ][ type ][ column ];
+ }, 1 );
+ } );
+
+
+ _api_registerPlural( 'cells().render()', 'cell().render()', function ( type ) {
+ return this.iterator( 'cell', function ( settings, row, column ) {
+ return _fnGetCellData( settings, row, column, type );
+ }, 1 );
+ } );
+
+
+ _api_registerPlural( 'cells().indexes()', 'cell().index()', function () {
+ return this.iterator( 'cell', function ( settings, row, column ) {
+ return {
+ row: row,
+ column: column,
+ columnVisible: _fnColumnIndexToVisible( settings, column )
+ };
+ }, 1 );
+ } );
+
+
+ _api_registerPlural( 'cells().invalidate()', 'cell().invalidate()', function ( src ) {
+ return this.iterator( 'cell', function ( settings, row, column ) {
+ _fnInvalidate( settings, row, src, column );
+ } );
+ } );
+
+
+
+ _api_register( 'cell()', function ( rowSelector, columnSelector, opts ) {
+ return _selector_first( this.cells( rowSelector, columnSelector, opts ) );
+ } );
+
+
+ _api_register( 'cell().data()', function ( data ) {
+ var ctx = this.context;
+ var cell = this[0];
+
+ if ( data === undefined ) {
+ // Get
+ return ctx.length && cell.length ?
+ _fnGetCellData( ctx[0], cell[0].row, cell[0].column ) :
+ undefined;
+ }
+
+ // Set
+ _fnSetCellData( ctx[0], cell[0].row, cell[0].column, data );
+ _fnInvalidate( ctx[0], cell[0].row, 'data', cell[0].column );
+
+ return this;
+ } );
+
+
+
+ /**
+ * Get current ordering (sorting) that has been applied to the table.
+ *
+ * @returns {array} 2D array containing the sorting information for the first
+ * table in the current context. Each element in the parent array represents
+ * a column being sorted upon (i.e. multi-sorting with two columns would have
+ * 2 inner arrays). The inner arrays may have 2 or 3 elements. The first is
+ * the column index that the sorting condition applies to, the second is the
+ * direction of the sort (`desc` or `asc`) and, optionally, the third is the
+ * index of the sorting order from the `column.sorting` initialisation array.
+ *//**
+ * Set the ordering for the table.
+ *
+ * @param {integer} order Column index to sort upon.
+ * @param {string} direction Direction of the sort to be applied (`asc` or `desc`)
+ * @returns {DataTables.Api} this
+ *//**
+ * Set the ordering for the table.
+ *
+ * @param {array} order 1D array of sorting information to be applied.
+ * @param {array} [...] Optional additional sorting conditions
+ * @returns {DataTables.Api} this
+ *//**
+ * Set the ordering for the table.
+ *
+ * @param {array} order 2D array of sorting information to be applied.
+ * @returns {DataTables.Api} this
+ */
+ _api_register( 'order()', function ( order, dir ) {
+ var ctx = this.context;
+
+ if ( order === undefined ) {
+ // get
+ return ctx.length !== 0 ?
+ ctx[0].aaSorting :
+ undefined;
+ }
+
+ // set
+ if ( typeof order === 'number' ) {
+ // Simple column / direction passed in
+ order = [ [ order, dir ] ];
+ }
+ else if ( ! $.isArray( order[0] ) ) {
+ // Arguments passed in (list of 1D arrays)
+ order = Array.prototype.slice.call( arguments );
+ }
+ // otherwise a 2D array was passed in
+
+ return this.iterator( 'table', function ( settings ) {
+ settings.aaSorting = order.slice();
+ } );
+ } );
+
+
+ /**
+ * Attach a sort listener to an element for a given column
+ *
+ * @param {node|jQuery|string} node Identifier for the element(s) to attach the
+ * listener to. This can take the form of a single DOM node, a jQuery
+ * collection of nodes or a jQuery selector which will identify the node(s).
+ * @param {integer} column the column that a click on this node will sort on
+ * @param {function} [callback] callback function when sort is run
+ * @returns {DataTables.Api} this
+ */
+ _api_register( 'order.listener()', function ( node, column, callback ) {
+ return this.iterator( 'table', function ( settings ) {
+ _fnSortAttachListener( settings, node, column, callback );
+ } );
+ } );
+
+
+ _api_register( 'order.fixed()', function ( set ) {
+ if ( ! set ) {
+ var ctx = this.context;
+ var fixed = ctx.length ?
+ ctx[0].aaSortingFixed :
+ undefined;
+
+ return $.isArray( fixed ) ?
+ { pre: fixed } :
+ fixed;
+ }
+
+ return this.iterator( 'table', function ( settings ) {
+ settings.aaSortingFixed = $.extend( true, {}, set );
+ } );
+ } );
+
+
+ // Order by the selected column(s)
+ _api_register( [
+ 'columns().order()',
+ 'column().order()'
+ ], function ( dir ) {
+ var that = this;
+
+ return this.iterator( 'table', function ( settings, i ) {
+ var sort = [];
+
+ $.each( that[i], function (j, col) {
+ sort.push( [ col, dir ] );
+ } );
+
+ settings.aaSorting = sort;
+ } );
+ } );
+
+
+
+ _api_register( 'search()', function ( input, regex, smart, caseInsen ) {
+ var ctx = this.context;
+
+ if ( input === undefined ) {
+ // get
+ return ctx.length !== 0 ?
+ ctx[0].oPreviousSearch.sSearch :
+ undefined;
+ }
+
+ // set
+ return this.iterator( 'table', function ( settings ) {
+ if ( ! settings.oFeatures.bFilter ) {
+ return;
+ }
+
+ _fnFilterComplete( settings, $.extend( {}, settings.oPreviousSearch, {
+ "sSearch": input+"",
+ "bRegex": regex === null ? false : regex,
+ "bSmart": smart === null ? true : smart,
+ "bCaseInsensitive": caseInsen === null ? true : caseInsen
+ } ), 1 );
+ } );
+ } );
+
+
+ _api_registerPlural(
+ 'columns().search()',
+ 'column().search()',
+ function ( input, regex, smart, caseInsen ) {
+ return this.iterator( 'column', function ( settings, column ) {
+ var preSearch = settings.aoPreSearchCols;
+
+ if ( input === undefined ) {
+ // get
+ return preSearch[ column ].sSearch;
+ }
+
+ // set
+ if ( ! settings.oFeatures.bFilter ) {
+ return;
+ }
+
+ $.extend( preSearch[ column ], {
+ "sSearch": input+"",
+ "bRegex": regex === null ? false : regex,
+ "bSmart": smart === null ? true : smart,
+ "bCaseInsensitive": caseInsen === null ? true : caseInsen
+ } );
+
+ _fnFilterComplete( settings, settings.oPreviousSearch, 1 );
+ } );
+ }
+ );
+
+ /*
+ * State API methods
+ */
+
+ _api_register( 'state()', function () {
+ return this.context.length ?
+ this.context[0].oSavedState :
+ null;
+ } );
+
+
+ _api_register( 'state.clear()', function () {
+ return this.iterator( 'table', function ( settings ) {
+ // Save an empty object
+ settings.fnStateSaveCallback.call( settings.oInstance, settings, {} );
+ } );
+ } );
+
+
+ _api_register( 'state.loaded()', function () {
+ return this.context.length ?
+ this.context[0].oLoadedState :
+ null;
+ } );
+
+
+ _api_register( 'state.save()', function () {
+ return this.iterator( 'table', function ( settings ) {
+ _fnSaveState( settings );
+ } );
+ } );
+
+
+
+ /**
+ * Provide a common method for plug-ins to check the version of DataTables being
+ * used, in order to ensure compatibility.
+ *
+ * @param {string} version Version string to check for, in the format "X.Y.Z".
+ * Note that the formats "X" and "X.Y" are also acceptable.
+ * @returns {boolean} true if this version of DataTables is greater or equal to
+ * the required version, or false if this version of DataTales is not
+ * suitable
+ * @static
+ * @dtopt API-Static
+ *
+ * @example
+ * alert( $.fn.dataTable.versionCheck( '1.9.0' ) );
+ */
+ DataTable.versionCheck = DataTable.fnVersionCheck = function( version )
+ {
+ var aThis = DataTable.version.split('.');
+ var aThat = version.split('.');
+ var iThis, iThat;
+
+ for ( var i=0, iLen=aThat.length ; i<iLen ; i++ ) {
+ iThis = parseInt( aThis[i], 10 ) || 0;
+ iThat = parseInt( aThat[i], 10 ) || 0;
+
+ // Parts are the same, keep comparing
+ if (iThis === iThat) {
+ continue;
+ }
+
+ // Parts are different, return immediately
+ return iThis > iThat;
+ }
+
+ return true;
+ };
+
+
+ /**
+ * Check if a `<table>` node is a DataTable table already or not.
+ *
+ * @param {node|jquery|string} table Table node, jQuery object or jQuery
+ * selector for the table to test. Note that if more than more than one
+ * table is passed on, only the first will be checked
+ * @returns {boolean} true the table given is a DataTable, or false otherwise
+ * @static
+ * @dtopt API-Static
+ *
+ * @example
+ * if ( ! $.fn.DataTable.isDataTable( '#example' ) ) {
+ * $('#example').dataTable();
+ * }
+ */
+ DataTable.isDataTable = DataTable.fnIsDataTable = function ( table )
+ {
+ var t = $(table).get(0);
+ var is = false;
+
+ $.each( DataTable.settings, function (i, o) {
+ var head = o.nScrollHead ? $('table', o.nScrollHead)[0] : null;
+ var foot = o.nScrollFoot ? $('table', o.nScrollFoot)[0] : null;
+
+ if ( o.nTable === t || head === t || foot === t ) {
+ is = true;
+ }
+ } );
+
+ return is;
+ };
+
+
+ /**
+ * Get all DataTable tables that have been initialised - optionally you can
+ * select to get only currently visible tables.
+ *
+ * @param {boolean} [visible=false] Flag to indicate if you want all (default)
+ * or visible tables only.
+ * @returns {array} Array of `table` nodes (not DataTable instances) which are
+ * DataTables
+ * @static
+ * @dtopt API-Static
+ *
+ * @example
+ * $.each( $.fn.dataTable.tables(true), function () {
+ * $(table).DataTable().columns.adjust();
+ * } );
+ */
+ DataTable.tables = DataTable.fnTables = function ( visible )
+ {
+ var api = false;
+
+ if ( $.isPlainObject( visible ) ) {
+ api = visible.api;
+ visible = visible.visible;
+ }
+
+ var a = $.map( DataTable.settings, function (o) {
+ if ( !visible || (visible && $(o.nTable).is(':visible')) ) {
+ return o.nTable;
+ }
+ } );
+
+ return api ?
+ new _Api( a ) :
+ a;
+ };
+
+
+ /**
+ * DataTables utility methods
+ *
+ * This namespace provides helper methods that DataTables uses internally to
+ * create a DataTable, but which are not exclusively used only for DataTables.
+ * These methods can be used by extension authors to save the duplication of
+ * code.
+ *
+ * @namespace
+ */
+ DataTable.util = {
+ /**
+ * Throttle the calls to a function. Arguments and context are maintained
+ * for the throttled function.
+ *
+ * @param {function} fn Function to be called
+ * @param {integer} freq Call frequency in mS
+ * @return {function} Wrapped function
+ */
+ throttle: _fnThrottle,
+
+
+ /**
+ * Escape a string such that it can be used in a regular expression
+ *
+ * @param {string} sVal string to escape
+ * @returns {string} escaped string
+ */
+ escapeRegex: _fnEscapeRegex
+ };
+
+
+ /**
+ * Convert from camel case parameters to Hungarian notation. This is made public
+ * for the extensions to provide the same ability as DataTables core to accept
+ * either the 1.9 style Hungarian notation, or the 1.10+ style camelCase
+ * parameters.
+ *
+ * @param {object} src The model object which holds all parameters that can be
+ * mapped.
+ * @param {object} user The object to convert from camel case to Hungarian.
+ * @param {boolean} force When set to `true`, properties which already have a
+ * Hungarian value in the `user` object will be overwritten. Otherwise they
+ * won't be.
+ */
+ DataTable.camelToHungarian = _fnCamelToHungarian;
+
+
+
+ /**
+ *
+ */
+ _api_register( '$()', function ( selector, opts ) {
+ var
+ rows = this.rows( opts ).nodes(), // Get all rows
+ jqRows = $(rows);
+
+ return $( [].concat(
+ jqRows.filter( selector ).toArray(),
+ jqRows.find( selector ).toArray()
+ ) );
+ } );
+
+
+ // jQuery functions to operate on the tables
+ $.each( [ 'on', 'one', 'off' ], function (i, key) {
+ _api_register( key+'()', function ( /* event, handler */ ) {
+ var args = Array.prototype.slice.call(arguments);
+
+ // Add the `dt` namespace automatically if it isn't already present
+ if ( ! args[0].match(/\.dt\b/) ) {
+ args[0] += '.dt';
+ }
+
+ var inst = $( this.tables().nodes() );
+ inst[key].apply( inst, args );
+ return this;
+ } );
+ } );
+
+
+ _api_register( 'clear()', function () {
+ return this.iterator( 'table', function ( settings ) {
+ _fnClearTable( settings );
+ } );
+ } );
+
+
+ _api_register( 'settings()', function () {
+ return new _Api( this.context, this.context );
+ } );
+
+
+ _api_register( 'init()', function () {
+ var ctx = this.context;
+ return ctx.length ? ctx[0].oInit : null;
+ } );
+
+
+ _api_register( 'data()', function () {
+ return this.iterator( 'table', function ( settings ) {
+ return _pluck( settings.aoData, '_aData' );
+ } ).flatten();
+ } );
+
+
+ _api_register( 'destroy()', function ( remove ) {
+ remove = remove || false;
+
+ return this.iterator( 'table', function ( settings ) {
+ var orig = settings.nTableWrapper.parentNode;
+ var classes = settings.oClasses;
+ var table = settings.nTable;
+ var tbody = settings.nTBody;
+ var thead = settings.nTHead;
+ var tfoot = settings.nTFoot;
+ var jqTable = $(table);
+ var jqTbody = $(tbody);
+ var jqWrapper = $(settings.nTableWrapper);
+ var rows = $.map( settings.aoData, function (r) { return r.nTr; } );
+ var i, ien;
+
+ // Flag to note that the table is currently being destroyed - no action
+ // should be taken
+ settings.bDestroying = true;
+
+ // Fire off the destroy callbacks for plug-ins etc
+ _fnCallbackFire( settings, "aoDestroyCallback", "destroy", [settings] );
+
+ // If not being removed from the document, make all columns visible
+ if ( ! remove ) {
+ new _Api( settings ).columns().visible( true );
+ }
+
+ // Blitz all `DT` namespaced events (these are internal events, the
+ // lowercase, `dt` events are user subscribed and they are responsible
+ // for removing them
+ jqWrapper.unbind('.DT').find(':not(tbody *)').unbind('.DT');
+ $(window).unbind('.DT-'+settings.sInstance);
+
+ // When scrolling we had to break the table up - restore it
+ if ( table != thead.parentNode ) {
+ jqTable.children('thead').detach();
+ jqTable.append( thead );
+ }
+
+ if ( tfoot && table != tfoot.parentNode ) {
+ jqTable.children('tfoot').detach();
+ jqTable.append( tfoot );
+ }
+
+ settings.aaSorting = [];
+ settings.aaSortingFixed = [];
+ _fnSortingClasses( settings );
+
+ $( rows ).removeClass( settings.asStripeClasses.join(' ') );
+
+ $('th, td', thead).removeClass( classes.sSortable+' '+
+ classes.sSortableAsc+' '+classes.sSortableDesc+' '+classes.sSortableNone
+ );
+
+ if ( settings.bJUI ) {
+ $('th span.'+classes.sSortIcon+ ', td span.'+classes.sSortIcon, thead).detach();
+ $('th, td', thead).each( function () {
+ var wrapper = $('div.'+classes.sSortJUIWrapper, this);
+ $(this).append( wrapper.contents() );
+ wrapper.detach();
+ } );
+ }
+
+ // Add the TR elements back into the table in their original order
+ jqTbody.children().detach();
+ jqTbody.append( rows );
+
+ // Remove the DataTables generated nodes, events and classes
+ var removedMethod = remove ? 'remove' : 'detach';
+ jqTable[ removedMethod ]();
+ jqWrapper[ removedMethod ]();
+
+ // If we need to reattach the table to the document
+ if ( ! remove && orig ) {
+ // insertBefore acts like appendChild if !arg[1]
+ orig.insertBefore( table, settings.nTableReinsertBefore );
+
+ // Restore the width of the original table - was read from the style property,
+ // so we can restore directly to that
+ jqTable
+ .css( 'width', settings.sDestroyWidth )
+ .removeClass( classes.sTable );
+
+ // If the were originally stripe classes - then we add them back here.
+ // Note this is not fool proof (for example if not all rows had stripe
+ // classes - but it's a good effort without getting carried away
+ ien = settings.asDestroyStripes.length;
+
+ if ( ien ) {
+ jqTbody.children().each( function (i) {
+ $(this).addClass( settings.asDestroyStripes[i % ien] );
+ } );
+ }
+ }
+
+ /* Remove the settings object from the settings array */
+ var idx = $.inArray( settings, DataTable.settings );
+ if ( idx !== -1 ) {
+ DataTable.settings.splice( idx, 1 );
+ }
+ } );
+ } );
+
+
+ // Add the `every()` method for rows, columns and cells in a compact form
+ $.each( [ 'column', 'row', 'cell' ], function ( i, type ) {
+ _api_register( type+'s().every()', function ( fn ) {
+ var opts = this.selector.opts;
+ var api = this;
+
+ return this.iterator( type, function ( settings, arg1, arg2, arg3, arg4 ) {
+ // Rows and columns:
+ // arg1 - index
+ // arg2 - table counter
+ // arg3 - loop counter
+ // arg4 - undefined
+ // Cells:
+ // arg1 - row index
+ // arg2 - column index
+ // arg3 - table counter
+ // arg4 - loop counter
+ fn.call(
+ api[ type ](
+ arg1,
+ type==='cell' ? arg2 : opts,
+ type==='cell' ? opts : undefined
+ ),
+ arg1, arg2, arg3, arg4
+ );
+ } );
+ } );
+ } );
+
+
+ // i18n method for extensions to be able to use the language object from the
+ // DataTable
+ _api_register( 'i18n()', function ( token, def, plural ) {
+ var ctx = this.context[0];
+ var resolved = _fnGetObjectDataFn( token )( ctx.oLanguage );
+
+ if ( resolved === undefined ) {
+ resolved = def;
+ }
+
+ if ( plural !== undefined && $.isPlainObject( resolved ) ) {
+ resolved = resolved[ plural ] !== undefined ?
+ resolved[ plural ] :
+ resolved._;
+ }
+
+ return resolved.replace( '%d', plural ); // nb: plural might be undefined,
+ } );
+
+ /**
+ * Version string for plug-ins to check compatibility. Allowed format is
+ * `a.b.c-d` where: a:int, b:int, c:int, d:string(dev|beta|alpha). `d` is used
+ * only for non-release builds. See http://semver.org/ for more information.
+ * @member
+ * @type string
+ * @default Version number
+ */
+ DataTable.version = "1.10.10";
+
+ /**
+ * Private data store, containing all of the settings objects that are
+ * created for the tables on a given page.
+ *
+ * Note that the `DataTable.settings` object is aliased to
+ * `jQuery.fn.dataTableExt` through which it may be accessed and
+ * manipulated, or `jQuery.fn.dataTable.settings`.
+ * @member
+ * @type array
+ * @default []
+ * @private
+ */
+ DataTable.settings = [];
+
+ /**
+ * Object models container, for the various models that DataTables has
+ * available to it. These models define the objects that are used to hold
+ * the active state and configuration of the table.
+ * @namespace
+ */
+ DataTable.models = {};
+
+
+
+ /**
+ * Template object for the way in which DataTables holds information about
+ * search information for the global filter and individual column filters.
+ * @namespace
+ */
+ DataTable.models.oSearch = {
+ /**
+ * Flag to indicate if the filtering should be case insensitive or not
+ * @type boolean
+ * @default true
+ */
+ "bCaseInsensitive": true,
+
+ /**
+ * Applied search term
+ * @type string
+ * @default <i>Empty string</i>
+ */
+ "sSearch": "",
+
+ /**
+ * Flag to indicate if the search term should be interpreted as a
+ * regular expression (true) or not (false) and therefore and special
+ * regex characters escaped.
+ * @type boolean
+ * @default false
+ */
+ "bRegex": false,
+
+ /**
+ * Flag to indicate if DataTables is to use its smart filtering or not.
+ * @type boolean
+ * @default true
+ */
+ "bSmart": true
+ };
+
+
+
+
+ /**
+ * Template object for the way in which DataTables holds information about
+ * each individual row. This is the object format used for the settings
+ * aoData array.
+ * @namespace
+ */
+ DataTable.models.oRow = {
+ /**
+ * TR element for the row
+ * @type node
+ * @default null
+ */
+ "nTr": null,
+
+ /**
+ * Array of TD elements for each row. This is null until the row has been
+ * created.
+ * @type array nodes
+ * @default []
+ */
+ "anCells": null,
+
+ /**
+ * Data object from the original data source for the row. This is either
+ * an array if using the traditional form of DataTables, or an object if
+ * using mData options. The exact type will depend on the passed in
+ * data from the data source, or will be an array if using DOM a data
+ * source.
+ * @type array|object
+ * @default []
+ */
+ "_aData": [],
+
+ /**
+ * Sorting data cache - this array is ostensibly the same length as the
+ * number of columns (although each index is generated only as it is
+ * needed), and holds the data that is used for sorting each column in the
+ * row. We do this cache generation at the start of the sort in order that
+ * the formatting of the sort data need be done only once for each cell
+ * per sort. This array should not be read from or written to by anything
+ * other than the master sorting methods.
+ * @type array
+ * @default null
+ * @private
+ */
+ "_aSortData": null,
+
+ /**
+ * Per cell filtering data cache. As per the sort data cache, used to
+ * increase the performance of the filtering in DataTables
+ * @type array
+ * @default null
+ * @private
+ */
+ "_aFilterData": null,
+
+ /**
+ * Filtering data cache. This is the same as the cell filtering cache, but
+ * in this case a string rather than an array. This is easily computed with
+ * a join on `_aFilterData`, but is provided as a cache so the join isn't
+ * needed on every search (memory traded for performance)
+ * @type array
+ * @default null
+ * @private
+ */
+ "_sFilterRow": null,
+
+ /**
+ * Cache of the class name that DataTables has applied to the row, so we
+ * can quickly look at this variable rather than needing to do a DOM check
+ * on className for the nTr property.
+ * @type string
+ * @default <i>Empty string</i>
+ * @private
+ */
+ "_sRowStripe": "",
+
+ /**
+ * Denote if the original data source was from the DOM, or the data source
+ * object. This is used for invalidating data, so DataTables can
+ * automatically read data from the original source, unless uninstructed
+ * otherwise.
+ * @type string
+ * @default null
+ * @private
+ */
+ "src": null,
+
+ /**
+ * Index in the aoData array. This saves an indexOf lookup when we have the
+ * object, but want to know the index
+ * @type integer
+ * @default -1
+ * @private
+ */
+ "idx": -1
+ };
+
+
+ /**
+ * Template object for the column information object in DataTables. This object
+ * is held in the settings aoColumns array and contains all the information that
+ * DataTables needs about each individual column.
+ *
+ * Note that this object is related to {@link DataTable.defaults.column}
+ * but this one is the internal data store for DataTables's cache of columns.
+ * It should NOT be manipulated outside of DataTables. Any configuration should
+ * be done through the initialisation options.
+ * @namespace
+ */
+ DataTable.models.oColumn = {
+ /**
+ * Column index. This could be worked out on-the-fly with $.inArray, but it
+ * is faster to just hold it as a variable
+ * @type integer
+ * @default null
+ */
+ "idx": null,
+
+ /**
+ * A list of the columns that sorting should occur on when this column
+ * is sorted. That this property is an array allows multi-column sorting
+ * to be defined for a column (for example first name / last name columns
+ * would benefit from this). The values are integers pointing to the
+ * columns to be sorted on (typically it will be a single integer pointing
+ * at itself, but that doesn't need to be the case).
+ * @type array
+ */
+ "aDataSort": null,
+
+ /**
+ * Define the sorting directions that are applied to the column, in sequence
+ * as the column is repeatedly sorted upon - i.e. the first value is used
+ * as the sorting direction when the column if first sorted (clicked on).
+ * Sort it again (click again) and it will move on to the next index.
+ * Repeat until loop.
+ * @type array
+ */
+ "asSorting": null,
+
+ /**
+ * Flag to indicate if the column is searchable, and thus should be included
+ * in the filtering or not.
+ * @type boolean
+ */
+ "bSearchable": null,
+
+ /**
+ * Flag to indicate if the column is sortable or not.
+ * @type boolean
+ */
+ "bSortable": null,
+
+ /**
+ * Flag to indicate if the column is currently visible in the table or not
+ * @type boolean
+ */
+ "bVisible": null,
+
+ /**
+ * Store for manual type assignment using the `column.type` option. This
+ * is held in store so we can manipulate the column's `sType` property.
+ * @type string
+ * @default null
+ * @private
+ */
+ "_sManualType": null,
+
+ /**
+ * Flag to indicate if HTML5 data attributes should be used as the data
+ * source for filtering or sorting. True is either are.
+ * @type boolean
+ * @default false
+ * @private
+ */
+ "_bAttrSrc": false,
+
+ /**
+ * Developer definable function that is called whenever a cell is created (Ajax source,
+ * etc) or processed for input (DOM source). This can be used as a compliment to mRender
+ * allowing you to modify the DOM element (add background colour for example) when the
+ * element is available.
+ * @type function
+ * @param {element} nTd The TD node that has been created
+ * @param {*} sData The Data for the cell
+ * @param {array|object} oData The data for the whole row
+ * @param {int} iRow The row index for the aoData data store
+ * @default null
+ */
+ "fnCreatedCell": null,
+
+ /**
+ * Function to get data from a cell in a column. You should <b>never</b>
+ * access data directly through _aData internally in DataTables - always use
+ * the method attached to this property. It allows mData to function as
+ * required. This function is automatically assigned by the column
+ * initialisation method
+ * @type function
+ * @param {array|object} oData The data array/object for the array
+ * (i.e. aoData[]._aData)
+ * @param {string} sSpecific The specific data type you want to get -
+ * 'display', 'type' 'filter' 'sort'
+ * @returns {*} The data for the cell from the given row's data
+ * @default null
+ */
+ "fnGetData": null,
+
+ /**
+ * Function to set data for a cell in the column. You should <b>never</b>
+ * set the data directly to _aData internally in DataTables - always use
+ * this method. It allows mData to function as required. This function
+ * is automatically assigned by the column initialisation method
+ * @type function
+ * @param {array|object} oData The data array/object for the array
+ * (i.e. aoData[]._aData)
+ * @param {*} sValue Value to set
+ * @default null
+ */
+ "fnSetData": null,
+
+ /**
+ * Property to read the value for the cells in the column from the data
+ * source array / object. If null, then the default content is used, if a
+ * function is given then the return from the function is used.
+ * @type function|int|string|null
+ * @default null
+ */
+ "mData": null,
+
+ /**
+ * Partner property to mData which is used (only when defined) to get
+ * the data - i.e. it is basically the same as mData, but without the
+ * 'set' option, and also the data fed to it is the result from mData.
+ * This is the rendering method to match the data method of mData.
+ * @type function|int|string|null
+ * @default null
+ */
+ "mRender": null,
+
+ /**
+ * Unique header TH/TD element for this column - this is what the sorting
+ * listener is attached to (if sorting is enabled.)
+ * @type node
+ * @default null
+ */
+ "nTh": null,
+
+ /**
+ * Unique footer TH/TD element for this column (if there is one). Not used
+ * in DataTables as such, but can be used for plug-ins to reference the
+ * footer for each column.
+ * @type node
+ * @default null
+ */
+ "nTf": null,
+
+ /**
+ * The class to apply to all TD elements in the table's TBODY for the column
+ * @type string
+ * @default null
+ */
+ "sClass": null,
+
+ /**
+ * When DataTables calculates the column widths to assign to each column,
+ * it finds the longest string in each column and then constructs a
+ * temporary table and reads the widths from that. The problem with this
+ * is that "mmm" is much wider then "iiii", but the latter is a longer
+ * string - thus the calculation can go wrong (doing it properly and putting
+ * it into an DOM object and measuring that is horribly(!) slow). Thus as
+ * a "work around" we provide this option. It will append its value to the
+ * text that is found to be the longest string for the column - i.e. padding.
+ * @type string
+ */
+ "sContentPadding": null,
+
+ /**
+ * Allows a default value to be given for a column's data, and will be used
+ * whenever a null data source is encountered (this can be because mData
+ * is set to null, or because the data source itself is null).
+ * @type string
+ * @default null
+ */
+ "sDefaultContent": null,
+
+ /**
+ * Name for the column, allowing reference to the column by name as well as
+ * by index (needs a lookup to work by name).
+ * @type string
+ */
+ "sName": null,
+
+ /**
+ * Custom sorting data type - defines which of the available plug-ins in
+ * afnSortData the custom sorting will use - if any is defined.
+ * @type string
+ * @default std
+ */
+ "sSortDataType": 'std',
+
+ /**
+ * Class to be applied to the header element when sorting on this column
+ * @type string
+ * @default null
+ */
+ "sSortingClass": null,
+
+ /**
+ * Class to be applied to the header element when sorting on this column -
+ * when jQuery UI theming is used.
+ * @type string
+ * @default null
+ */
+ "sSortingClassJUI": null,
+
+ /**
+ * Title of the column - what is seen in the TH element (nTh).
+ * @type string
+ */
+ "sTitle": null,
+
+ /**
+ * Column sorting and filtering type
+ * @type string
+ * @default null
+ */
+ "sType": null,
+
+ /**
+ * Width of the column
+ * @type string
+ * @default null
+ */
+ "sWidth": null,
+
+ /**
+ * Width of the column when it was first "encountered"
+ * @type string
+ * @default null
+ */
+ "sWidthOrig": null
+ };
+
+
+ /*
+ * Developer note: The properties of the object below are given in Hungarian
+ * notation, that was used as the interface for DataTables prior to v1.10, however
+ * from v1.10 onwards the primary interface is camel case. In order to avoid
+ * breaking backwards compatibility utterly with this change, the Hungarian
+ * version is still, internally the primary interface, but is is not documented
+ * - hence the @name tags in each doc comment. This allows a Javascript function
+ * to create a map from Hungarian notation to camel case (going the other direction
+ * would require each property to be listed, which would at around 3K to the size
+ * of DataTables, while this method is about a 0.5K hit.
+ *
+ * Ultimately this does pave the way for Hungarian notation to be dropped
+ * completely, but that is a massive amount of work and will break current
+ * installs (therefore is on-hold until v2).
+ */
+
+ /**
+ * Initialisation options that can be given to DataTables at initialisation
+ * time.
+ * @namespace
+ */
+ DataTable.defaults = {
+ /**
+ * An array of data to use for the table, passed in at initialisation which
+ * will be used in preference to any data which is already in the DOM. This is
+ * particularly useful for constructing tables purely in Javascript, for
+ * example with a custom Ajax call.
+ * @type array
+ * @default null
+ *
+ * @dtopt Option
+ * @name DataTable.defaults.data
+ *
+ * @example
+ * // Using a 2D array data source
+ * $(document).ready( function () {
+ * $('#example').dataTable( {
+ * "data": [
+ * ['Trident', 'Internet Explorer 4.0', 'Win 95+', 4, 'X'],
+ * ['Trident', 'Internet Explorer 5.0', 'Win 95+', 5, 'C'],
+ * ],
+ * "columns": [
+ * { "title": "Engine" },
+ * { "title": "Browser" },
+ * { "title": "Platform" },
+ * { "title": "Version" },
+ * { "title": "Grade" }
+ * ]
+ * } );
+ * } );
+ *
+ * @example
+ * // Using an array of objects as a data source (`data`)
+ * $(document).ready( function () {
+ * $('#example').dataTable( {
+ * "data": [
+ * {
+ * "engine": "Trident",
+ * "browser": "Internet Explorer 4.0",
+ * "platform": "Win 95+",
+ * "version": 4,
+ * "grade": "X"
+ * },
+ * {
+ * "engine": "Trident",
+ * "browser": "Internet Explorer 5.0",
+ * "platform": "Win 95+",
+ * "version": 5,
+ * "grade": "C"
+ * }
+ * ],
+ * "columns": [
+ * { "title": "Engine", "data": "engine" },
+ * { "title": "Browser", "data": "browser" },
+ * { "title": "Platform", "data": "platform" },
+ * { "title": "Version", "data": "version" },
+ * { "title": "Grade", "data": "grade" }
+ * ]
+ * } );
+ * } );
+ */
+ "aaData": null,
+
+
+ /**
+ * If ordering is enabled, then DataTables will perform a first pass sort on
+ * initialisation. You can define which column(s) the sort is performed
+ * upon, and the sorting direction, with this variable. The `sorting` array
+ * should contain an array for each column to be sorted initially containing
+ * the column's index and a direction string ('asc' or 'desc').
+ * @type array
+ * @default [[0,'asc']]
+ *
+ * @dtopt Option
+ * @name DataTable.defaults.order
+ *
+ * @example
+ * // Sort by 3rd column first, and then 4th column
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "order": [[2,'asc'], [3,'desc']]
+ * } );
+ * } );
+ *
+ * // No initial sorting
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "order": []
+ * } );
+ * } );
+ */
+ "aaSorting": [[0,'asc']],
+
+
+ /**
+ * This parameter is basically identical to the `sorting` parameter, but
+ * cannot be overridden by user interaction with the table. What this means
+ * is that you could have a column (visible or hidden) which the sorting
+ * will always be forced on first - any sorting after that (from the user)
+ * will then be performed as required. This can be useful for grouping rows
+ * together.
+ * @type array
+ * @default null
+ *
+ * @dtopt Option
+ * @name DataTable.defaults.orderFixed
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "orderFixed": [[0,'asc']]
+ * } );
+ * } )
+ */
+ "aaSortingFixed": [],
+
+
+ /**
+ * DataTables can be instructed to load data to display in the table from a
+ * Ajax source. This option defines how that Ajax call is made and where to.
+ *
+ * The `ajax` property has three different modes of operation, depending on
+ * how it is defined. These are:
+ *
+ * * `string` - Set the URL from where the data should be loaded from.
+ * * `object` - Define properties for `jQuery.ajax`.
+ * * `function` - Custom data get function
+ *
+ * `string`
+ * --------
+ *
+ * As a string, the `ajax` property simply defines the URL from which
+ * DataTables will load data.
+ *
+ * `object`
+ * --------
+ *
+ * As an object, the parameters in the object are passed to
+ * [jQuery.ajax](http://api.jquery.com/jQuery.ajax/) allowing fine control
+ * of the Ajax request. DataTables has a number of default parameters which
+ * you can override using this option. Please refer to the jQuery
+ * documentation for a full description of the options available, although
+ * the following parameters provide additional options in DataTables or
+ * require special consideration:
+ *
+ * * `data` - As with jQuery, `data` can be provided as an object, but it
+ * can also be used as a function to manipulate the data DataTables sends
+ * to the server. The function takes a single parameter, an object of
+ * parameters with the values that DataTables has readied for sending. An
+ * object may be returned which will be merged into the DataTables
+ * defaults, or you can add the items to the object that was passed in and
+ * not return anything from the function. This supersedes `fnServerParams`
+ * from DataTables 1.9-.
+ *
+ * * `dataSrc` - By default DataTables will look for the property `data` (or
+ * `aaData` for compatibility with DataTables 1.9-) when obtaining data
+ * from an Ajax source or for server-side processing - this parameter
+ * allows that property to be changed. You can use Javascript dotted
+ * object notation to get a data source for multiple levels of nesting, or
+ * it my be used as a function. As a function it takes a single parameter,
+ * the JSON returned from the server, which can be manipulated as
+ * required, with the returned value being that used by DataTables as the
+ * data source for the table. This supersedes `sAjaxDataProp` from
+ * DataTables 1.9-.
+ *
+ * * `success` - Should not be overridden it is used internally in
+ * DataTables. To manipulate / transform the data returned by the server
+ * use `ajax.dataSrc`, or use `ajax` as a function (see below).
+ *
+ * `function`
+ * ----------
+ *
+ * As a function, making the Ajax call is left up to yourself allowing
+ * complete control of the Ajax request. Indeed, if desired, a method other
+ * than Ajax could be used to obtain the required data, such as Web storage
+ * or an AIR database.
+ *
+ * The function is given four parameters and no return is required. The
+ * parameters are:
+ *
+ * 1. _object_ - Data to send to the server
+ * 2. _function_ - Callback function that must be executed when the required
+ * data has been obtained. That data should be passed into the callback
+ * as the only parameter
+ * 3. _object_ - DataTables settings object for the table
+ *
+ * Note that this supersedes `fnServerData` from DataTables 1.9-.
+ *
+ * @type string|object|function
+ * @default null
+ *
+ * @dtopt Option
+ * @name DataTable.defaults.ajax
+ * @since 1.10.0
+ *
+ * @example
+ * // Get JSON data from a file via Ajax.
+ * // Note DataTables expects data in the form `{ data: [ ...data... ] }` by default).
+ * $('#example').dataTable( {
+ * "ajax": "data.json"
+ * } );
+ *
+ * @example
+ * // Get JSON data from a file via Ajax, using `dataSrc` to change
+ * // `data` to `tableData` (i.e. `{ tableData: [ ...data... ] }`)
+ * $('#example').dataTable( {
+ * "ajax": {
+ * "url": "data.json",
+ * "dataSrc": "tableData"
+ * }
+ * } );
+ *
+ * @example
+ * // Get JSON data from a file via Ajax, using `dataSrc` to read data
+ * // from a plain array rather than an array in an object
+ * $('#example').dataTable( {
+ * "ajax": {
+ * "url": "data.json",
+ * "dataSrc": ""
+ * }
+ * } );
+ *
+ * @example
+ * // Manipulate the data returned from the server - add a link to data
+ * // (note this can, should, be done using `render` for the column - this
+ * // is just a simple example of how the data can be manipulated).
+ * $('#example').dataTable( {
+ * "ajax": {
+ * "url": "data.json",
+ * "dataSrc": function ( json ) {
+ * for ( var i=0, ien=json.length ; i<ien ; i++ ) {
+ * json[i][0] = '<a href="/message/'+json[i][0]+'>View message</a>';
+ * }
+ * return json;
+ * }
+ * }
+ * } );
+ *
+ * @example
+ * // Add data to the request
+ * $('#example').dataTable( {
+ * "ajax": {
+ * "url": "data.json",
+ * "data": function ( d ) {
+ * return {
+ * "extra_search": $('#extra').val()
+ * };
+ * }
+ * }
+ * } );
+ *
+ * @example
+ * // Send request as POST
+ * $('#example').dataTable( {
+ * "ajax": {
+ * "url": "data.json",
+ * "type": "POST"
+ * }
+ * } );
+ *
+ * @example
+ * // Get the data from localStorage (could interface with a form for
+ * // adding, editing and removing rows).
+ * $('#example').dataTable( {
+ * "ajax": function (data, callback, settings) {
+ * callback(
+ * JSON.parse( localStorage.getItem('dataTablesData') )
+ * );
+ * }
+ * } );
+ */
+ "ajax": null,
+
+
+ /**
+ * This parameter allows you to readily specify the entries in the length drop
+ * down menu that DataTables shows when pagination is enabled. It can be
+ * either a 1D array of options which will be used for both the displayed
+ * option and the value, or a 2D array which will use the array in the first
+ * position as the value, and the array in the second position as the
+ * displayed options (useful for language strings such as 'All').
+ *
+ * Note that the `pageLength` property will be automatically set to the
+ * first value given in this array, unless `pageLength` is also provided.
+ * @type array
+ * @default [ 10, 25, 50, 100 ]
+ *
+ * @dtopt Option
+ * @name DataTable.defaults.lengthMenu
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "lengthMenu": [[10, 25, 50, -1], [10, 25, 50, "All"]]
+ * } );
+ * } );
+ */
+ "aLengthMenu": [ 10, 25, 50, 100 ],
+
+
+ /**
+ * The `columns` option in the initialisation parameter allows you to define
+ * details about the way individual columns behave. For a full list of
+ * column options that can be set, please see
+ * {@link DataTable.defaults.column}. Note that if you use `columns` to
+ * define your columns, you must have an entry in the array for every single
+ * column that you have in your table (these can be null if you don't which
+ * to specify any options).
+ * @member
+ *
+ * @name DataTable.defaults.column
+ */
+ "aoColumns": null,
+
+ /**
+ * Very similar to `columns`, `columnDefs` allows you to target a specific
+ * column, multiple columns, or all columns, using the `targets` property of
+ * each object in the array. This allows great flexibility when creating
+ * tables, as the `columnDefs` arrays can be of any length, targeting the
+ * columns you specifically want. `columnDefs` may use any of the column
+ * options available: {@link DataTable.defaults.column}, but it _must_
+ * have `targets` defined in each object in the array. Values in the `targets`
+ * array may be:
+ * <ul>
+ * <li>a string - class name will be matched on the TH for the column</li>
+ * <li>0 or a positive integer - column index counting from the left</li>
+ * <li>a negative integer - column index counting from the right</li>
+ * <li>the string "_all" - all columns (i.e. assign a default)</li>
+ * </ul>
+ * @member
+ *
+ * @name DataTable.defaults.columnDefs
+ */
+ "aoColumnDefs": null,
+
+
+ /**
+ * Basically the same as `search`, this parameter defines the individual column
+ * filtering state at initialisation time. The array must be of the same size
+ * as the number of columns, and each element be an object with the parameters
+ * `search` and `escapeRegex` (the latter is optional). 'null' is also
+ * accepted and the default will be used.
+ * @type array
+ * @default []
+ *
+ * @dtopt Option
+ * @name DataTable.defaults.searchCols
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "searchCols": [
+ * null,
+ * { "search": "My filter" },
+ * null,
+ * { "search": "^[0-9]", "escapeRegex": false }
+ * ]
+ * } );
+ * } )
+ */
+ "aoSearchCols": [],
+
+
+ /**
+ * An array of CSS classes that should be applied to displayed rows. This
+ * array may be of any length, and DataTables will apply each class
+ * sequentially, looping when required.
+ * @type array
+ * @default null <i>Will take the values determined by the `oClasses.stripe*`
+ * options</i>
+ *
+ * @dtopt Option
+ * @name DataTable.defaults.stripeClasses
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "stripeClasses": [ 'strip1', 'strip2', 'strip3' ]
+ * } );
+ * } )
+ */
+ "asStripeClasses": null,
+
+
+ /**
+ * Enable or disable automatic column width calculation. This can be disabled
+ * as an optimisation (it takes some time to calculate the widths) if the
+ * tables widths are passed in using `columns`.
+ * @type boolean
+ * @default true
+ *
+ * @dtopt Features
+ * @name DataTable.defaults.autoWidth
+ *
+ * @example
+ * $(document).ready( function () {
+ * $('#example').dataTable( {
+ * "autoWidth": false
+ * } );
+ * } );
+ */
+ "bAutoWidth": true,
+
+
+ /**
+ * Deferred rendering can provide DataTables with a huge speed boost when you
+ * are using an Ajax or JS data source for the table. This option, when set to
+ * true, will cause DataTables to defer the creation of the table elements for
+ * each row until they are needed for a draw - saving a significant amount of
+ * time.
+ * @type boolean
+ * @default false
+ *
+ * @dtopt Features
+ * @name DataTable.defaults.deferRender
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "ajax": "sources/arrays.txt",
+ * "deferRender": true
+ * } );
+ * } );
+ */
+ "bDeferRender": false,
+
+
+ /**
+ * Replace a DataTable which matches the given selector and replace it with
+ * one which has the properties of the new initialisation object passed. If no
+ * table matches the selector, then the new DataTable will be constructed as
+ * per normal.
+ * @type boolean
+ * @default false
+ *
+ * @dtopt Options
+ * @name DataTable.defaults.destroy
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "srollY": "200px",
+ * "paginate": false
+ * } );
+ *
+ * // Some time later....
+ * $('#example').dataTable( {
+ * "filter": false,
+ * "destroy": true
+ * } );
+ * } );
+ */
+ "bDestroy": false,
+
+
+ /**
+ * Enable or disable filtering of data. Filtering in DataTables is "smart" in
+ * that it allows the end user to input multiple words (space separated) and
+ * will match a row containing those words, even if not in the order that was
+ * specified (this allow matching across multiple columns). Note that if you
+ * wish to use filtering in DataTables this must remain 'true' - to remove the
+ * default filtering input box and retain filtering abilities, please use
+ * {@link DataTable.defaults.dom}.
+ * @type boolean
+ * @default true
+ *
+ * @dtopt Features
+ * @name DataTable.defaults.searching
+ *
+ * @example
+ * $(document).ready( function () {
+ * $('#example').dataTable( {
+ * "searching": false
+ * } );
+ * } );
+ */
+ "bFilter": true,
+
+
+ /**
+ * Enable or disable the table information display. This shows information
+ * about the data that is currently visible on the page, including information
+ * about filtered data if that action is being performed.
+ * @type boolean
+ * @default true
+ *
+ * @dtopt Features
+ * @name DataTable.defaults.info
+ *
+ * @example
+ * $(document).ready( function () {
+ * $('#example').dataTable( {
+ * "info": false
+ * } );
+ * } );
+ */
+ "bInfo": true,
+
+
+ /**
+ * Enable jQuery UI ThemeRoller support (required as ThemeRoller requires some
+ * slightly different and additional mark-up from what DataTables has
+ * traditionally used).
+ * @type boolean
+ * @default false
+ *
+ * @dtopt Features
+ * @name DataTable.defaults.jQueryUI
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "jQueryUI": true
+ * } );
+ * } );
+ */
+ "bJQueryUI": false,
+
+
+ /**
+ * Allows the end user to select the size of a formatted page from a select
+ * menu (sizes are 10, 25, 50 and 100). Requires pagination (`paginate`).
+ * @type boolean
+ * @default true
+ *
+ * @dtopt Features
+ * @name DataTable.defaults.lengthChange
+ *
+ * @example
+ * $(document).ready( function () {
+ * $('#example').dataTable( {
+ * "lengthChange": false
+ * } );
+ * } );
+ */
+ "bLengthChange": true,
+
+
+ /**
+ * Enable or disable pagination.
+ * @type boolean
+ * @default true
+ *
+ * @dtopt Features
+ * @name DataTable.defaults.paging
+ *
+ * @example
+ * $(document).ready( function () {
+ * $('#example').dataTable( {
+ * "paging": false
+ * } );
+ * } );
+ */
+ "bPaginate": true,
+
+
+ /**
+ * Enable or disable the display of a 'processing' indicator when the table is
+ * being processed (e.g. a sort). This is particularly useful for tables with
+ * large amounts of data where it can take a noticeable amount of time to sort
+ * the entries.
+ * @type boolean
+ * @default false
+ *
+ * @dtopt Features
+ * @name DataTable.defaults.processing
+ *
+ * @example
+ * $(document).ready( function () {
+ * $('#example').dataTable( {
+ * "processing": true
+ * } );
+ * } );
+ */
+ "bProcessing": false,
+
+
+ /**
+ * Retrieve the DataTables object for the given selector. Note that if the
+ * table has already been initialised, this parameter will cause DataTables
+ * to simply return the object that has already been set up - it will not take
+ * account of any changes you might have made to the initialisation object
+ * passed to DataTables (setting this parameter to true is an acknowledgement
+ * that you understand this). `destroy` can be used to reinitialise a table if
+ * you need.
+ * @type boolean
+ * @default false
+ *
+ * @dtopt Options
+ * @name DataTable.defaults.retrieve
+ *
+ * @example
+ * $(document).ready( function() {
+ * initTable();
+ * tableActions();
+ * } );
+ *
+ * function initTable ()
+ * {
+ * return $('#example').dataTable( {
+ * "scrollY": "200px",
+ * "paginate": false,
+ * "retrieve": true
+ * } );
+ * }
+ *
+ * function tableActions ()
+ * {
+ * var table = initTable();
+ * // perform API operations with oTable
+ * }
+ */
+ "bRetrieve": false,
+
+
+ /**
+ * When vertical (y) scrolling is enabled, DataTables will force the height of
+ * the table's viewport to the given height at all times (useful for layout).
+ * However, this can look odd when filtering data down to a small data set,
+ * and the footer is left "floating" further down. This parameter (when
+ * enabled) will cause DataTables to collapse the table's viewport down when
+ * the result set will fit within the given Y height.
+ * @type boolean
+ * @default false
+ *
+ * @dtopt Options
+ * @name DataTable.defaults.scrollCollapse
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "scrollY": "200",
+ * "scrollCollapse": true
+ * } );
+ * } );
+ */
+ "bScrollCollapse": false,
+
+
+ /**
+ * Configure DataTables to use server-side processing. Note that the
+ * `ajax` parameter must also be given in order to give DataTables a
+ * source to obtain the required data for each draw.
+ * @type boolean
+ * @default false
+ *
+ * @dtopt Features
+ * @dtopt Server-side
+ * @name DataTable.defaults.serverSide
+ *
+ * @example
+ * $(document).ready( function () {
+ * $('#example').dataTable( {
+ * "serverSide": true,
+ * "ajax": "xhr.php"
+ * } );
+ * } );
+ */
+ "bServerSide": false,
+
+
+ /**
+ * Enable or disable sorting of columns. Sorting of individual columns can be
+ * disabled by the `sortable` option for each column.
+ * @type boolean
+ * @default true
+ *
+ * @dtopt Features
+ * @name DataTable.defaults.ordering
+ *
+ * @example
+ * $(document).ready( function () {
+ * $('#example').dataTable( {
+ * "ordering": false
+ * } );
+ * } );
+ */
+ "bSort": true,
+
+
+ /**
+ * Enable or display DataTables' ability to sort multiple columns at the
+ * same time (activated by shift-click by the user).
+ * @type boolean
+ * @default true
+ *
+ * @dtopt Options
+ * @name DataTable.defaults.orderMulti
+ *
+ * @example
+ * // Disable multiple column sorting ability
+ * $(document).ready( function () {
+ * $('#example').dataTable( {
+ * "orderMulti": false
+ * } );
+ * } );
+ */
+ "bSortMulti": true,
+
+
+ /**
+ * Allows control over whether DataTables should use the top (true) unique
+ * cell that is found for a single column, or the bottom (false - default).
+ * This is useful when using complex headers.
+ * @type boolean
+ * @default false
+ *
+ * @dtopt Options
+ * @name DataTable.defaults.orderCellsTop
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "orderCellsTop": true
+ * } );
+ * } );
+ */
+ "bSortCellsTop": false,
+
+
+ /**
+ * Enable or disable the addition of the classes `sorting\_1`, `sorting\_2` and
+ * `sorting\_3` to the columns which are currently being sorted on. This is
+ * presented as a feature switch as it can increase processing time (while
+ * classes are removed and added) so for large data sets you might want to
+ * turn this off.
+ * @type boolean
+ * @default true
+ *
+ * @dtopt Features
+ * @name DataTable.defaults.orderClasses
+ *
+ * @example
+ * $(document).ready( function () {
+ * $('#example').dataTable( {
+ * "orderClasses": false
+ * } );
+ * } );
+ */
+ "bSortClasses": true,
+
+
+ /**
+ * Enable or disable state saving. When enabled HTML5 `localStorage` will be
+ * used to save table display information such as pagination information,
+ * display length, filtering and sorting. As such when the end user reloads
+ * the page the display display will match what thy had previously set up.
+ *
+ * Due to the use of `localStorage` the default state saving is not supported
+ * in IE6 or 7. If state saving is required in those browsers, use
+ * `stateSaveCallback` to provide a storage solution such as cookies.
+ * @type boolean
+ * @default false
+ *
+ * @dtopt Features
+ * @name DataTable.defaults.stateSave
+ *
+ * @example
+ * $(document).ready( function () {
+ * $('#example').dataTable( {
+ * "stateSave": true
+ * } );
+ * } );
+ */
+ "bStateSave": false,
+
+
+ /**
+ * This function is called when a TR element is created (and all TD child
+ * elements have been inserted), or registered if using a DOM source, allowing
+ * manipulation of the TR element (adding classes etc).
+ * @type function
+ * @param {node} row "TR" element for the current row
+ * @param {array} data Raw data array for this row
+ * @param {int} dataIndex The index of this row in the internal aoData array
+ *
+ * @dtopt Callbacks
+ * @name DataTable.defaults.createdRow
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "createdRow": function( row, data, dataIndex ) {
+ * // Bold the grade for all 'A' grade browsers
+ * if ( data[4] == "A" )
+ * {
+ * $('td:eq(4)', row).html( '<b>A</b>' );
+ * }
+ * }
+ * } );
+ * } );
+ */
+ "fnCreatedRow": null,
+
+
+ /**
+ * This function is called on every 'draw' event, and allows you to
+ * dynamically modify any aspect you want about the created DOM.
+ * @type function
+ * @param {object} settings DataTables settings object
+ *
+ * @dtopt Callbacks
+ * @name DataTable.defaults.drawCallback
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "drawCallback": function( settings ) {
+ * alert( 'DataTables has redrawn the table' );
+ * }
+ * } );
+ * } );
+ */
+ "fnDrawCallback": null,
+
+
+ /**
+ * Identical to fnHeaderCallback() but for the table footer this function
+ * allows you to modify the table footer on every 'draw' event.
+ * @type function
+ * @param {node} foot "TR" element for the footer
+ * @param {array} data Full table data (as derived from the original HTML)
+ * @param {int} start Index for the current display starting point in the
+ * display array
+ * @param {int} end Index for the current display ending point in the
+ * display array
+ * @param {array int} display Index array to translate the visual position
+ * to the full data array
+ *
+ * @dtopt Callbacks
+ * @name DataTable.defaults.footerCallback
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "footerCallback": function( tfoot, data, start, end, display ) {
+ * tfoot.getElementsByTagName('th')[0].innerHTML = "Starting index is "+start;
+ * }
+ * } );
+ * } )
+ */
+ "fnFooterCallback": null,
+
+
+ /**
+ * When rendering large numbers in the information element for the table
+ * (i.e. "Showing 1 to 10 of 57 entries") DataTables will render large numbers
+ * to have a comma separator for the 'thousands' units (e.g. 1 million is
+ * rendered as "1,000,000") to help readability for the end user. This
+ * function will override the default method DataTables uses.
+ * @type function
+ * @member
+ * @param {int} toFormat number to be formatted
+ * @returns {string} formatted string for DataTables to show the number
+ *
+ * @dtopt Callbacks
+ * @name DataTable.defaults.formatNumber
+ *
+ * @example
+ * // Format a number using a single quote for the separator (note that
+ * // this can also be done with the language.thousands option)
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "formatNumber": function ( toFormat ) {
+ * return toFormat.toString().replace(
+ * /\B(?=(\d{3})+(?!\d))/g, "'"
+ * );
+ * };
+ * } );
+ * } );
+ */
+ "fnFormatNumber": function ( toFormat ) {
+ return toFormat.toString().replace(
+ /\B(?=(\d{3})+(?!\d))/g,
+ this.oLanguage.sThousands
+ );
+ },
+
+
+ /**
+ * This function is called on every 'draw' event, and allows you to
+ * dynamically modify the header row. This can be used to calculate and
+ * display useful information about the table.
+ * @type function
+ * @param {node} head "TR" element for the header
+ * @param {array} data Full table data (as derived from the original HTML)
+ * @param {int} start Index for the current display starting point in the
+ * display array
+ * @param {int} end Index for the current display ending point in the
+ * display array
+ * @param {array int} display Index array to translate the visual position
+ * to the full data array
+ *
+ * @dtopt Callbacks
+ * @name DataTable.defaults.headerCallback
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "fheaderCallback": function( head, data, start, end, display ) {
+ * head.getElementsByTagName('th')[0].innerHTML = "Displaying "+(end-start)+" records";
+ * }
+ * } );
+ * } )
+ */
+ "fnHeaderCallback": null,
+
+
+ /**
+ * The information element can be used to convey information about the current
+ * state of the table. Although the internationalisation options presented by
+ * DataTables are quite capable of dealing with most customisations, there may
+ * be times where you wish to customise the string further. This callback
+ * allows you to do exactly that.
+ * @type function
+ * @param {object} oSettings DataTables settings object
+ * @param {int} start Starting position in data for the draw
+ * @param {int} end End position in data for the draw
+ * @param {int} max Total number of rows in the table (regardless of
+ * filtering)
+ * @param {int} total Total number of rows in the data set, after filtering
+ * @param {string} pre The string that DataTables has formatted using it's
+ * own rules
+ * @returns {string} The string to be displayed in the information element.
+ *
+ * @dtopt Callbacks
+ * @name DataTable.defaults.infoCallback
+ *
+ * @example
+ * $('#example').dataTable( {
+ * "infoCallback": function( settings, start, end, max, total, pre ) {
+ * return start +" to "+ end;
+ * }
+ * } );
+ */
+ "fnInfoCallback": null,
+
+
+ /**
+ * Called when the table has been initialised. Normally DataTables will
+ * initialise sequentially and there will be no need for this function,
+ * however, this does not hold true when using external language information
+ * since that is obtained using an async XHR call.
+ * @type function
+ * @param {object} settings DataTables settings object
+ * @param {object} json The JSON object request from the server - only
+ * present if client-side Ajax sourced data is used
+ *
+ * @dtopt Callbacks
+ * @name DataTable.defaults.initComplete
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "initComplete": function(settings, json) {
+ * alert( 'DataTables has finished its initialisation.' );
+ * }
+ * } );
+ * } )
+ */
+ "fnInitComplete": null,
+
+
+ /**
+ * Called at the very start of each table draw and can be used to cancel the
+ * draw by returning false, any other return (including undefined) results in
+ * the full draw occurring).
+ * @type function
+ * @param {object} settings DataTables settings object
+ * @returns {boolean} False will cancel the draw, anything else (including no
+ * return) will allow it to complete.
+ *
+ * @dtopt Callbacks
+ * @name DataTable.defaults.preDrawCallback
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "preDrawCallback": function( settings ) {
+ * if ( $('#test').val() == 1 ) {
+ * return false;
+ * }
+ * }
+ * } );
+ * } );
+ */
+ "fnPreDrawCallback": null,
+
+
+ /**
+ * This function allows you to 'post process' each row after it have been
+ * generated for each table draw, but before it is rendered on screen. This
+ * function might be used for setting the row class name etc.
+ * @type function
+ * @param {node} row "TR" element for the current row
+ * @param {array} data Raw data array for this row
+ * @param {int} displayIndex The display index for the current table draw
+ * @param {int} displayIndexFull The index of the data in the full list of
+ * rows (after filtering)
+ *
+ * @dtopt Callbacks
+ * @name DataTable.defaults.rowCallback
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "rowCallback": function( row, data, displayIndex, displayIndexFull ) {
+ * // Bold the grade for all 'A' grade browsers
+ * if ( data[4] == "A" ) {
+ * $('td:eq(4)', row).html( '<b>A</b>' );
+ * }
+ * }
+ * } );
+ * } );
+ */
+ "fnRowCallback": null,
+
+
+ /**
+ * __Deprecated__ The functionality provided by this parameter has now been
+ * superseded by that provided through `ajax`, which should be used instead.
+ *
+ * This parameter allows you to override the default function which obtains
+ * the data from the server so something more suitable for your application.
+ * For example you could use POST data, or pull information from a Gears or
+ * AIR database.
+ * @type function
+ * @member
+ * @param {string} source HTTP source to obtain the data from (`ajax`)
+ * @param {array} data A key/value pair object containing the data to send
+ * to the server
+ * @param {function} callback to be called on completion of the data get
+ * process that will draw the data on the page.
+ * @param {object} settings DataTables settings object
+ *
+ * @dtopt Callbacks
+ * @dtopt Server-side
+ * @name DataTable.defaults.serverData
+ *
+ * @deprecated 1.10. Please use `ajax` for this functionality now.
+ */
+ "fnServerData": null,
+
+
+ /**
+ * __Deprecated__ The functionality provided by this parameter has now been
+ * superseded by that provided through `ajax`, which should be used instead.
+ *
+ * It is often useful to send extra data to the server when making an Ajax
+ * request - for example custom filtering information, and this callback
+ * function makes it trivial to send extra information to the server. The
+ * passed in parameter is the data set that has been constructed by
+ * DataTables, and you can add to this or modify it as you require.
+ * @type function
+ * @param {array} data Data array (array of objects which are name/value
+ * pairs) that has been constructed by DataTables and will be sent to the
+ * server. In the case of Ajax sourced data with server-side processing
+ * this will be an empty array, for server-side processing there will be a
+ * significant number of parameters!
+ * @returns {undefined} Ensure that you modify the data array passed in,
+ * as this is passed by reference.
+ *
+ * @dtopt Callbacks
+ * @dtopt Server-side
+ * @name DataTable.defaults.serverParams
+ *
+ * @deprecated 1.10. Please use `ajax` for this functionality now.
+ */
+ "fnServerParams": null,
+
+
+ /**
+ * Load the table state. With this function you can define from where, and how, the
+ * state of a table is loaded. By default DataTables will load from `localStorage`
+ * but you might wish to use a server-side database or cookies.
+ * @type function
+ * @member
+ * @param {object} settings DataTables settings object
+ * @return {object} The DataTables state object to be loaded
+ *
+ * @dtopt Callbacks
+ * @name DataTable.defaults.stateLoadCallback
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "stateSave": true,
+ * "stateLoadCallback": function (settings) {
+ * var o;
+ *
+ * // Send an Ajax request to the server to get the data. Note that
+ * // this is a synchronous request.
+ * $.ajax( {
+ * "url": "/state_load",
+ * "async": false,
+ * "dataType": "json",
+ * "success": function (json) {
+ * o = json;
+ * }
+ * } );
+ *
+ * return o;
+ * }
+ * } );
+ * } );
+ */
+ "fnStateLoadCallback": function ( settings ) {
+ try {
+ return JSON.parse(
+ (settings.iStateDuration === -1 ? sessionStorage : localStorage).getItem(
+ 'DataTables_'+settings.sInstance+'_'+location.pathname
+ )
+ );
+ } catch (e) {}
+ },
+
+
+ /**
+ * Callback which allows modification of the saved state prior to loading that state.
+ * This callback is called when the table is loading state from the stored data, but
+ * prior to the settings object being modified by the saved state. Note that for
+ * plug-in authors, you should use the `stateLoadParams` event to load parameters for
+ * a plug-in.
+ * @type function
+ * @param {object} settings DataTables settings object
+ * @param {object} data The state object that is to be loaded
+ *
+ * @dtopt Callbacks
+ * @name DataTable.defaults.stateLoadParams
+ *
+ * @example
+ * // Remove a saved filter, so filtering is never loaded
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "stateSave": true,
+ * "stateLoadParams": function (settings, data) {
+ * data.oSearch.sSearch = "";
+ * }
+ * } );
+ * } );
+ *
+ * @example
+ * // Disallow state loading by returning false
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "stateSave": true,
+ * "stateLoadParams": function (settings, data) {
+ * return false;
+ * }
+ * } );
+ * } );
+ */
+ "fnStateLoadParams": null,
+
+
+ /**
+ * Callback that is called when the state has been loaded from the state saving method
+ * and the DataTables settings object has been modified as a result of the loaded state.
+ * @type function
+ * @param {object} settings DataTables settings object
+ * @param {object} data The state object that was loaded
+ *
+ * @dtopt Callbacks
+ * @name DataTable.defaults.stateLoaded
+ *
+ * @example
+ * // Show an alert with the filtering value that was saved
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "stateSave": true,
+ * "stateLoaded": function (settings, data) {
+ * alert( 'Saved filter was: '+data.oSearch.sSearch );
+ * }
+ * } );
+ * } );
+ */
+ "fnStateLoaded": null,
+
+
+ /**
+ * Save the table state. This function allows you to define where and how the state
+ * information for the table is stored By default DataTables will use `localStorage`
+ * but you might wish to use a server-side database or cookies.
+ * @type function
+ * @member
+ * @param {object} settings DataTables settings object
+ * @param {object} data The state object to be saved
+ *
+ * @dtopt Callbacks
+ * @name DataTable.defaults.stateSaveCallback
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "stateSave": true,
+ * "stateSaveCallback": function (settings, data) {
+ * // Send an Ajax request to the server with the state object
+ * $.ajax( {
+ * "url": "/state_save",
+ * "data": data,
+ * "dataType": "json",
+ * "method": "POST"
+ * "success": function () {}
+ * } );
+ * }
+ * } );
+ * } );
+ */
+ "fnStateSaveCallback": function ( settings, data ) {
+ try {
+ (settings.iStateDuration === -1 ? sessionStorage : localStorage).setItem(
+ 'DataTables_'+settings.sInstance+'_'+location.pathname,
+ JSON.stringify( data )
+ );
+ } catch (e) {}
+ },
+
+
+ /**
+ * Callback which allows modification of the state to be saved. Called when the table
+ * has changed state a new state save is required. This method allows modification of
+ * the state saving object prior to actually doing the save, including addition or
+ * other state properties or modification. Note that for plug-in authors, you should
+ * use the `stateSaveParams` event to save parameters for a plug-in.
+ * @type function
+ * @param {object} settings DataTables settings object
+ * @param {object} data The state object to be saved
+ *
+ * @dtopt Callbacks
+ * @name DataTable.defaults.stateSaveParams
+ *
+ * @example
+ * // Remove a saved filter, so filtering is never saved
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "stateSave": true,
+ * "stateSaveParams": function (settings, data) {
+ * data.oSearch.sSearch = "";
+ * }
+ * } );
+ * } );
+ */
+ "fnStateSaveParams": null,
+
+
+ /**
+ * Duration for which the saved state information is considered valid. After this period
+ * has elapsed the state will be returned to the default.
+ * Value is given in seconds.
+ * @type int
+ * @default 7200 <i>(2 hours)</i>
+ *
+ * @dtopt Options
+ * @name DataTable.defaults.stateDuration
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "stateDuration": 60*60*24; // 1 day
+ * } );
+ * } )
+ */
+ "iStateDuration": 7200,
+
+
+ /**
+ * When enabled DataTables will not make a request to the server for the first
+ * page draw - rather it will use the data already on the page (no sorting etc
+ * will be applied to it), thus saving on an XHR at load time. `deferLoading`
+ * is used to indicate that deferred loading is required, but it is also used
+ * to tell DataTables how many records there are in the full table (allowing
+ * the information element and pagination to be displayed correctly). In the case
+ * where a filtering is applied to the table on initial load, this can be
+ * indicated by giving the parameter as an array, where the first element is
+ * the number of records available after filtering and the second element is the
+ * number of records without filtering (allowing the table information element
+ * to be shown correctly).
+ * @type int | array
+ * @default null
+ *
+ * @dtopt Options
+ * @name DataTable.defaults.deferLoading
+ *
+ * @example
+ * // 57 records available in the table, no filtering applied
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "serverSide": true,
+ * "ajax": "scripts/server_processing.php",
+ * "deferLoading": 57
+ * } );
+ * } );
+ *
+ * @example
+ * // 57 records after filtering, 100 without filtering (an initial filter applied)
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "serverSide": true,
+ * "ajax": "scripts/server_processing.php",
+ * "deferLoading": [ 57, 100 ],
+ * "search": {
+ * "search": "my_filter"
+ * }
+ * } );
+ * } );
+ */
+ "iDeferLoading": null,
+
+
+ /**
+ * Number of rows to display on a single page when using pagination. If
+ * feature enabled (`lengthChange`) then the end user will be able to override
+ * this to a custom setting using a pop-up menu.
+ * @type int
+ * @default 10
+ *
+ * @dtopt Options
+ * @name DataTable.defaults.pageLength
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "pageLength": 50
+ * } );
+ * } )
+ */
+ "iDisplayLength": 10,
+
+
+ /**
+ * Define the starting point for data display when using DataTables with
+ * pagination. Note that this parameter is the number of records, rather than
+ * the page number, so if you have 10 records per page and want to start on
+ * the third page, it should be "20".
+ * @type int
+ * @default 0
+ *
+ * @dtopt Options
+ * @name DataTable.defaults.displayStart
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "displayStart": 20
+ * } );
+ * } )
+ */
+ "iDisplayStart": 0,
+
+
+ /**
+ * By default DataTables allows keyboard navigation of the table (sorting, paging,
+ * and filtering) by adding a `tabindex` attribute to the required elements. This
+ * allows you to tab through the controls and press the enter key to activate them.
+ * The tabindex is default 0, meaning that the tab follows the flow of the document.
+ * You can overrule this using this parameter if you wish. Use a value of -1 to
+ * disable built-in keyboard navigation.
+ * @type int
+ * @default 0
+ *
+ * @dtopt Options
+ * @name DataTable.defaults.tabIndex
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "tabIndex": 1
+ * } );
+ * } );
+ */
+ "iTabIndex": 0,
+
+
+ /**
+ * Classes that DataTables assigns to the various components and features
+ * that it adds to the HTML table. This allows classes to be configured
+ * during initialisation in addition to through the static
+ * {@link DataTable.ext.oStdClasses} object).
+ * @namespace
+ * @name DataTable.defaults.classes
+ */
+ "oClasses": {},
+
+
+ /**
+ * All strings that DataTables uses in the user interface that it creates
+ * are defined in this object, allowing you to modified them individually or
+ * completely replace them all as required.
+ * @namespace
+ * @name DataTable.defaults.language
+ */
+ "oLanguage": {
+ /**
+ * Strings that are used for WAI-ARIA labels and controls only (these are not
+ * actually visible on the page, but will be read by screenreaders, and thus
+ * must be internationalised as well).
+ * @namespace
+ * @name DataTable.defaults.language.aria
+ */
+ "oAria": {
+ /**
+ * ARIA label that is added to the table headers when the column may be
+ * sorted ascending by activing the column (click or return when focused).
+ * Note that the column header is prefixed to this string.
+ * @type string
+ * @default : activate to sort column ascending
+ *
+ * @dtopt Language
+ * @name DataTable.defaults.language.aria.sortAscending
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "language": {
+ * "aria": {
+ * "sortAscending": " - click/return to sort ascending"
+ * }
+ * }
+ * } );
+ * } );
+ */
+ "sSortAscending": ": activate to sort column ascending",
+
+ /**
+ * ARIA label that is added to the table headers when the column may be
+ * sorted descending by activing the column (click or return when focused).
+ * Note that the column header is prefixed to this string.
+ * @type string
+ * @default : activate to sort column ascending
+ *
+ * @dtopt Language
+ * @name DataTable.defaults.language.aria.sortDescending
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "language": {
+ * "aria": {
+ * "sortDescending": " - click/return to sort descending"
+ * }
+ * }
+ * } );
+ * } );
+ */
+ "sSortDescending": ": activate to sort column descending"
+ },
+
+ /**
+ * Pagination string used by DataTables for the built-in pagination
+ * control types.
+ * @namespace
+ * @name DataTable.defaults.language.paginate
+ */
+ "oPaginate": {
+ /**
+ * Text to use when using the 'full_numbers' type of pagination for the
+ * button to take the user to the first page.
+ * @type string
+ * @default First
+ *
+ * @dtopt Language
+ * @name DataTable.defaults.language.paginate.first
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "language": {
+ * "paginate": {
+ * "first": "First page"
+ * }
+ * }
+ * } );
+ * } );
+ */
+ "sFirst": "First",
+
+
+ /**
+ * Text to use when using the 'full_numbers' type of pagination for the
+ * button to take the user to the last page.
+ * @type string
+ * @default Last
+ *
+ * @dtopt Language
+ * @name DataTable.defaults.language.paginate.last
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "language": {
+ * "paginate": {
+ * "last": "Last page"
+ * }
+ * }
+ * } );
+ * } );
+ */
+ "sLast": "Last",
+
+
+ /**
+ * Text to use for the 'next' pagination button (to take the user to the
+ * next page).
+ * @type string
+ * @default Next
+ *
+ * @dtopt Language
+ * @name DataTable.defaults.language.paginate.next
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "language": {
+ * "paginate": {
+ * "next": "Next page"
+ * }
+ * }
+ * } );
+ * } );
+ */
+ "sNext": "Next",
+
+
+ /**
+ * Text to use for the 'previous' pagination button (to take the user to
+ * the previous page).
+ * @type string
+ * @default Previous
+ *
+ * @dtopt Language
+ * @name DataTable.defaults.language.paginate.previous
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "language": {
+ * "paginate": {
+ * "previous": "Previous page"
+ * }
+ * }
+ * } );
+ * } );
+ */
+ "sPrevious": "Previous"
+ },
+
+ /**
+ * This string is shown in preference to `zeroRecords` when the table is
+ * empty of data (regardless of filtering). Note that this is an optional
+ * parameter - if it is not given, the value of `zeroRecords` will be used
+ * instead (either the default or given value).
+ * @type string
+ * @default No data available in table
+ *
+ * @dtopt Language
+ * @name DataTable.defaults.language.emptyTable
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "language": {
+ * "emptyTable": "No data available in table"
+ * }
+ * } );
+ * } );
+ */
+ "sEmptyTable": "No data available in table",
+
+
+ /**
+ * This string gives information to the end user about the information
+ * that is current on display on the page. The following tokens can be
+ * used in the string and will be dynamically replaced as the table
+ * display updates. This tokens can be placed anywhere in the string, or
+ * removed as needed by the language requires:
+ *
+ * * `\_START\_` - Display index of the first record on the current page
+ * * `\_END\_` - Display index of the last record on the current page
+ * * `\_TOTAL\_` - Number of records in the table after filtering
+ * * `\_MAX\_` - Number of records in the table without filtering
+ * * `\_PAGE\_` - Current page number
+ * * `\_PAGES\_` - Total number of pages of data in the table
+ *
+ * @type string
+ * @default Showing _START_ to _END_ of _TOTAL_ entries
+ *
+ * @dtopt Language
+ * @name DataTable.defaults.language.info
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "language": {
+ * "info": "Showing page _PAGE_ of _PAGES_"
+ * }
+ * } );
+ * } );
+ */
+ "sInfo": "Showing _START_ to _END_ of _TOTAL_ entries",
+
+
+ /**
+ * Display information string for when the table is empty. Typically the
+ * format of this string should match `info`.
+ * @type string
+ * @default Showing 0 to 0 of 0 entries
+ *
+ * @dtopt Language
+ * @name DataTable.defaults.language.infoEmpty
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "language": {
+ * "infoEmpty": "No entries to show"
+ * }
+ * } );
+ * } );
+ */
+ "sInfoEmpty": "Showing 0 to 0 of 0 entries",
+
+
+ /**
+ * When a user filters the information in a table, this string is appended
+ * to the information (`info`) to give an idea of how strong the filtering
+ * is. The variable _MAX_ is dynamically updated.
+ * @type string
+ * @default (filtered from _MAX_ total entries)
+ *
+ * @dtopt Language
+ * @name DataTable.defaults.language.infoFiltered
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "language": {
+ * "infoFiltered": " - filtering from _MAX_ records"
+ * }
+ * } );
+ * } );
+ */
+ "sInfoFiltered": "(filtered from _MAX_ total entries)",
+
+
+ /**
+ * If can be useful to append extra information to the info string at times,
+ * and this variable does exactly that. This information will be appended to
+ * the `info` (`infoEmpty` and `infoFiltered` in whatever combination they are
+ * being used) at all times.
+ * @type string
+ * @default <i>Empty string</i>
+ *
+ * @dtopt Language
+ * @name DataTable.defaults.language.infoPostFix
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "language": {
+ * "infoPostFix": "All records shown are derived from real information."
+ * }
+ * } );
+ * } );
+ */
+ "sInfoPostFix": "",
+
+
+ /**
+ * This decimal place operator is a little different from the other
+ * language options since DataTables doesn't output floating point
+ * numbers, so it won't ever use this for display of a number. Rather,
+ * what this parameter does is modify the sort methods of the table so
+ * that numbers which are in a format which has a character other than
+ * a period (`.`) as a decimal place will be sorted numerically.
+ *
+ * Note that numbers with different decimal places cannot be shown in
+ * the same table and still be sortable, the table must be consistent.
+ * However, multiple different tables on the page can use different
+ * decimal place characters.
+ * @type string
+ * @default
+ *
+ * @dtopt Language
+ * @name DataTable.defaults.language.decimal
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "language": {
+ * "decimal": ","
+ * "thousands": "."
+ * }
+ * } );
+ * } );
+ */
+ "sDecimal": "",
+
+
+ /**
+ * DataTables has a build in number formatter (`formatNumber`) which is
+ * used to format large numbers that are used in the table information.
+ * By default a comma is used, but this can be trivially changed to any
+ * character you wish with this parameter.
+ * @type string
+ * @default ,
+ *
+ * @dtopt Language
+ * @name DataTable.defaults.language.thousands
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "language": {
+ * "thousands": "'"
+ * }
+ * } );
+ * } );
+ */
+ "sThousands": ",",
+
+
+ /**
+ * Detail the action that will be taken when the drop down menu for the
+ * pagination length option is changed. The '_MENU_' variable is replaced
+ * with a default select list of 10, 25, 50 and 100, and can be replaced
+ * with a custom select box if required.
+ * @type string
+ * @default Show _MENU_ entries
+ *
+ * @dtopt Language
+ * @name DataTable.defaults.language.lengthMenu
+ *
+ * @example
+ * // Language change only
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "language": {
+ * "lengthMenu": "Display _MENU_ records"
+ * }
+ * } );
+ * } );
+ *
+ * @example
+ * // Language and options change
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "language": {
+ * "lengthMenu": 'Display <select>'+
+ * '<option value="10">10</option>'+
+ * '<option value="20">20</option>'+
+ * '<option value="30">30</option>'+
+ * '<option value="40">40</option>'+
+ * '<option value="50">50</option>'+
+ * '<option value="-1">All</option>'+
+ * '</select> records'
+ * }
+ * } );
+ * } );
+ */
+ "sLengthMenu": "Show _MENU_ entries",
+
+
+ /**
+ * When using Ajax sourced data and during the first draw when DataTables is
+ * gathering the data, this message is shown in an empty row in the table to
+ * indicate to the end user the the data is being loaded. Note that this
+ * parameter is not used when loading data by server-side processing, just
+ * Ajax sourced data with client-side processing.
+ * @type string
+ * @default Loading...
+ *
+ * @dtopt Language
+ * @name DataTable.defaults.language.loadingRecords
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "language": {
+ * "loadingRecords": "Please wait - loading..."
+ * }
+ * } );
+ * } );
+ */
+ "sLoadingRecords": "Loading...",
+
+
+ /**
+ * Text which is displayed when the table is processing a user action
+ * (usually a sort command or similar).
+ * @type string
+ * @default Processing...
+ *
+ * @dtopt Language
+ * @name DataTable.defaults.language.processing
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "language": {
+ * "processing": "DataTables is currently busy"
+ * }
+ * } );
+ * } );
+ */
+ "sProcessing": "Processing...",
+
+
+ /**
+ * Details the actions that will be taken when the user types into the
+ * filtering input text box. The variable "_INPUT_", if used in the string,
+ * is replaced with the HTML text box for the filtering input allowing
+ * control over where it appears in the string. If "_INPUT_" is not given
+ * then the input box is appended to the string automatically.
+ * @type string
+ * @default Search:
+ *
+ * @dtopt Language
+ * @name DataTable.defaults.language.search
+ *
+ * @example
+ * // Input text box will be appended at the end automatically
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "language": {
+ * "search": "Filter records:"
+ * }
+ * } );
+ * } );
+ *
+ * @example
+ * // Specify where the filter should appear
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "language": {
+ * "search": "Apply filter _INPUT_ to table"
+ * }
+ * } );
+ * } );
+ */
+ "sSearch": "Search:",
+
+
+ /**
+ * Assign a `placeholder` attribute to the search `input` element
+ * @type string
+ * @default
+ *
+ * @dtopt Language
+ * @name DataTable.defaults.language.searchPlaceholder
+ */
+ "sSearchPlaceholder": "",
+
+
+ /**
+ * All of the language information can be stored in a file on the
+ * server-side, which DataTables will look up if this parameter is passed.
+ * It must store the URL of the language file, which is in a JSON format,
+ * and the object has the same properties as the oLanguage object in the
+ * initialiser object (i.e. the above parameters). Please refer to one of
+ * the example language files to see how this works in action.
+ * @type string
+ * @default <i>Empty string - i.e. disabled</i>
+ *
+ * @dtopt Language
+ * @name DataTable.defaults.language.url
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "language": {
+ * "url": "http://www.sprymedia.co.uk/dataTables/lang.txt"
+ * }
+ * } );
+ * } );
+ */
+ "sUrl": "",
+
+
+ /**
+ * Text shown inside the table records when the is no information to be
+ * displayed after filtering. `emptyTable` is shown when there is simply no
+ * information in the table at all (regardless of filtering).
+ * @type string
+ * @default No matching records found
+ *
+ * @dtopt Language
+ * @name DataTable.defaults.language.zeroRecords
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "language": {
+ * "zeroRecords": "No records to display"
+ * }
+ * } );
+ * } );
+ */
+ "sZeroRecords": "No matching records found"
+ },
+
+
+ /**
+ * This parameter allows you to have define the global filtering state at
+ * initialisation time. As an object the `search` parameter must be
+ * defined, but all other parameters are optional. When `regex` is true,
+ * the search string will be treated as a regular expression, when false
+ * (default) it will be treated as a straight string. When `smart`
+ * DataTables will use it's smart filtering methods (to word match at
+ * any point in the data), when false this will not be done.
+ * @namespace
+ * @extends DataTable.models.oSearch
+ *
+ * @dtopt Options
+ * @name DataTable.defaults.search
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "search": {"search": "Initial search"}
+ * } );
+ * } )
+ */
+ "oSearch": $.extend( {}, DataTable.models.oSearch ),
+
+
+ /**
+ * __Deprecated__ The functionality provided by this parameter has now been
+ * superseded by that provided through `ajax`, which should be used instead.
+ *
+ * By default DataTables will look for the property `data` (or `aaData` for
+ * compatibility with DataTables 1.9-) when obtaining data from an Ajax
+ * source or for server-side processing - this parameter allows that
+ * property to be changed. You can use Javascript dotted object notation to
+ * get a data source for multiple levels of nesting.
+ * @type string
+ * @default data
+ *
+ * @dtopt Options
+ * @dtopt Server-side
+ * @name DataTable.defaults.ajaxDataProp
+ *
+ * @deprecated 1.10. Please use `ajax` for this functionality now.
+ */
+ "sAjaxDataProp": "data",
+
+
+ /**
+ * __Deprecated__ The functionality provided by this parameter has now been
+ * superseded by that provided through `ajax`, which should be used instead.
+ *
+ * You can instruct DataTables to load data from an external
+ * source using this parameter (use aData if you want to pass data in you
+ * already have). Simply provide a url a JSON object can be obtained from.
+ * @type string
+ * @default null
+ *
+ * @dtopt Options
+ * @dtopt Server-side
+ * @name DataTable.defaults.ajaxSource
+ *
+ * @deprecated 1.10. Please use `ajax` for this functionality now.
+ */
+ "sAjaxSource": null,
+
+
+ /**
+ * This initialisation variable allows you to specify exactly where in the
+ * DOM you want DataTables to inject the various controls it adds to the page
+ * (for example you might want the pagination controls at the top of the
+ * table). DIV elements (with or without a custom class) can also be added to
+ * aid styling. The follow syntax is used:
+ * <ul>
+ * <li>The following options are allowed:
+ * <ul>
+ * <li>'l' - Length changing</li>
+ * <li>'f' - Filtering input</li>
+ * <li>'t' - The table!</li>
+ * <li>'i' - Information</li>
+ * <li>'p' - Pagination</li>
+ * <li>'r' - pRocessing</li>
+ * </ul>
+ * </li>
+ * <li>The following constants are allowed:
+ * <ul>
+ * <li>'H' - jQueryUI theme "header" classes ('fg-toolbar ui-widget-header ui-corner-tl ui-corner-tr ui-helper-clearfix')</li>
+ * <li>'F' - jQueryUI theme "footer" classes ('fg-toolbar ui-widget-header ui-corner-bl ui-corner-br ui-helper-clearfix')</li>
+ * </ul>
+ * </li>
+ * <li>The following syntax is expected:
+ * <ul>
+ * <li>'&lt;' and '&gt;' - div elements</li>
+ * <li>'&lt;"class" and '&gt;' - div with a class</li>
+ * <li>'&lt;"#id" and '&gt;' - div with an ID</li>
+ * </ul>
+ * </li>
+ * <li>Examples:
+ * <ul>
+ * <li>'&lt;"wrapper"flipt&gt;'</li>
+ * <li>'&lt;lf&lt;t&gt;ip&gt;'</li>
+ * </ul>
+ * </li>
+ * </ul>
+ * @type string
+ * @default lfrtip <i>(when `jQueryUI` is false)</i> <b>or</b>
+ * <"H"lfr>t<"F"ip> <i>(when `jQueryUI` is true)</i>
+ *
+ * @dtopt Options
+ * @name DataTable.defaults.dom
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "dom": '&lt;"top"i&gt;rt&lt;"bottom"flp&gt;&lt;"clear"&gt;'
+ * } );
+ * } );
+ */
+ "sDom": "lfrtip",
+
+
+ /**
+ * Search delay option. This will throttle full table searches that use the
+ * DataTables provided search input element (it does not effect calls to
+ * `dt-api search()`, providing a delay before the search is made.
+ * @type integer
+ * @default 0
+ *
+ * @dtopt Options
+ * @name DataTable.defaults.searchDelay
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "searchDelay": 200
+ * } );
+ * } )
+ */
+ "searchDelay": null,
+
+
+ /**
+ * DataTables features four different built-in options for the buttons to
+ * display for pagination control:
+ *
+ * * `simple` - 'Previous' and 'Next' buttons only
+ * * 'simple_numbers` - 'Previous' and 'Next' buttons, plus page numbers
+ * * `full` - 'First', 'Previous', 'Next' and 'Last' buttons
+ * * `full_numbers` - 'First', 'Previous', 'Next' and 'Last' buttons, plus
+ * page numbers
+ *
+ * Further methods can be added using {@link DataTable.ext.oPagination}.
+ * @type string
+ * @default simple_numbers
+ *
+ * @dtopt Options
+ * @name DataTable.defaults.pagingType
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "pagingType": "full_numbers"
+ * } );
+ * } )
+ */
+ "sPaginationType": "simple_numbers",
+
+
+ /**
+ * Enable horizontal scrolling. When a table is too wide to fit into a
+ * certain layout, or you have a large number of columns in the table, you
+ * can enable x-scrolling to show the table in a viewport, which can be
+ * scrolled. This property can be `true` which will allow the table to
+ * scroll horizontally when needed, or any CSS unit, or a number (in which
+ * case it will be treated as a pixel measurement). Setting as simply `true`
+ * is recommended.
+ * @type boolean|string
+ * @default <i>blank string - i.e. disabled</i>
+ *
+ * @dtopt Features
+ * @name DataTable.defaults.scrollX
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "scrollX": true,
+ * "scrollCollapse": true
+ * } );
+ * } );
+ */
+ "sScrollX": "",
+
+
+ /**
+ * This property can be used to force a DataTable to use more width than it
+ * might otherwise do when x-scrolling is enabled. For example if you have a
+ * table which requires to be well spaced, this parameter is useful for
+ * "over-sizing" the table, and thus forcing scrolling. This property can by
+ * any CSS unit, or a number (in which case it will be treated as a pixel
+ * measurement).
+ * @type string
+ * @default <i>blank string - i.e. disabled</i>
+ *
+ * @dtopt Options
+ * @name DataTable.defaults.scrollXInner
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "scrollX": "100%",
+ * "scrollXInner": "110%"
+ * } );
+ * } );
+ */
+ "sScrollXInner": "",
+
+
+ /**
+ * Enable vertical scrolling. Vertical scrolling will constrain the DataTable
+ * to the given height, and enable scrolling for any data which overflows the
+ * current viewport. This can be used as an alternative to paging to display
+ * a lot of data in a small area (although paging and scrolling can both be
+ * enabled at the same time). This property can be any CSS unit, or a number
+ * (in which case it will be treated as a pixel measurement).
+ * @type string
+ * @default <i>blank string - i.e. disabled</i>
+ *
+ * @dtopt Features
+ * @name DataTable.defaults.scrollY
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "scrollY": "200px",
+ * "paginate": false
+ * } );
+ * } );
+ */
+ "sScrollY": "",
+
+
+ /**
+ * __Deprecated__ The functionality provided by this parameter has now been
+ * superseded by that provided through `ajax`, which should be used instead.
+ *
+ * Set the HTTP method that is used to make the Ajax call for server-side
+ * processing or Ajax sourced data.
+ * @type string
+ * @default GET
+ *
+ * @dtopt Options
+ * @dtopt Server-side
+ * @name DataTable.defaults.serverMethod
+ *
+ * @deprecated 1.10. Please use `ajax` for this functionality now.
+ */
+ "sServerMethod": "GET",
+
+
+ /**
+ * DataTables makes use of renderers when displaying HTML elements for
+ * a table. These renderers can be added or modified by plug-ins to
+ * generate suitable mark-up for a site. For example the Bootstrap
+ * integration plug-in for DataTables uses a paging button renderer to
+ * display pagination buttons in the mark-up required by Bootstrap.
+ *
+ * For further information about the renderers available see
+ * DataTable.ext.renderer
+ * @type string|object
+ * @default null
+ *
+ * @name DataTable.defaults.renderer
+ *
+ */
+ "renderer": null,
+
+
+ /**
+ * Set the data property name that DataTables should use to get a row's id
+ * to set as the `id` property in the node.
+ * @type string
+ * @default DT_RowId
+ *
+ * @name DataTable.defaults.rowId
+ */
+ "rowId": "DT_RowId"
+ };
+
+ _fnHungarianMap( DataTable.defaults );
+
+
+
+ /*
+ * Developer note - See note in model.defaults.js about the use of Hungarian
+ * notation and camel case.
+ */
+
+ /**
+ * Column options that can be given to DataTables at initialisation time.
+ * @namespace
+ */
+ DataTable.defaults.column = {
+ /**
+ * Define which column(s) an order will occur on for this column. This
+ * allows a column's ordering to take multiple columns into account when
+ * doing a sort or use the data from a different column. For example first
+ * name / last name columns make sense to do a multi-column sort over the
+ * two columns.
+ * @type array|int
+ * @default null <i>Takes the value of the column index automatically</i>
+ *
+ * @name DataTable.defaults.column.orderData
+ * @dtopt Columns
+ *
+ * @example
+ * // Using `columnDefs`
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "columnDefs": [
+ * { "orderData": [ 0, 1 ], "targets": [ 0 ] },
+ * { "orderData": [ 1, 0 ], "targets": [ 1 ] },
+ * { "orderData": 2, "targets": [ 2 ] }
+ * ]
+ * } );
+ * } );
+ *
+ * @example
+ * // Using `columns`
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "columns": [
+ * { "orderData": [ 0, 1 ] },
+ * { "orderData": [ 1, 0 ] },
+ * { "orderData": 2 },
+ * null,
+ * null
+ * ]
+ * } );
+ * } );
+ */
+ "aDataSort": null,
+ "iDataSort": -1,
+
+
+ /**
+ * You can control the default ordering direction, and even alter the
+ * behaviour of the sort handler (i.e. only allow ascending ordering etc)
+ * using this parameter.
+ * @type array
+ * @default [ 'asc', 'desc' ]
+ *
+ * @name DataTable.defaults.column.orderSequence
+ * @dtopt Columns
+ *
+ * @example
+ * // Using `columnDefs`
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "columnDefs": [
+ * { "orderSequence": [ "asc" ], "targets": [ 1 ] },
+ * { "orderSequence": [ "desc", "asc", "asc" ], "targets": [ 2 ] },
+ * { "orderSequence": [ "desc" ], "targets": [ 3 ] }
+ * ]
+ * } );
+ * } );
+ *
+ * @example
+ * // Using `columns`
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "columns": [
+ * null,
+ * { "orderSequence": [ "asc" ] },
+ * { "orderSequence": [ "desc", "asc", "asc" ] },
+ * { "orderSequence": [ "desc" ] },
+ * null
+ * ]
+ * } );
+ * } );
+ */
+ "asSorting": [ 'asc', 'desc' ],
+
+
+ /**
+ * Enable or disable filtering on the data in this column.
+ * @type boolean
+ * @default true
+ *
+ * @name DataTable.defaults.column.searchable
+ * @dtopt Columns
+ *
+ * @example
+ * // Using `columnDefs`
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "columnDefs": [
+ * { "searchable": false, "targets": [ 0 ] }
+ * ] } );
+ * } );
+ *
+ * @example
+ * // Using `columns`
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "columns": [
+ * { "searchable": false },
+ * null,
+ * null,
+ * null,
+ * null
+ * ] } );
+ * } );
+ */
+ "bSearchable": true,
+
+
+ /**
+ * Enable or disable ordering on this column.
+ * @type boolean
+ * @default true
+ *
+ * @name DataTable.defaults.column.orderable
+ * @dtopt Columns
+ *
+ * @example
+ * // Using `columnDefs`
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "columnDefs": [
+ * { "orderable": false, "targets": [ 0 ] }
+ * ] } );
+ * } );
+ *
+ * @example
+ * // Using `columns`
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "columns": [
+ * { "orderable": false },
+ * null,
+ * null,
+ * null,
+ * null
+ * ] } );
+ * } );
+ */
+ "bSortable": true,
+
+
+ /**
+ * Enable or disable the display of this column.
+ * @type boolean
+ * @default true
+ *
+ * @name DataTable.defaults.column.visible
+ * @dtopt Columns
+ *
+ * @example
+ * // Using `columnDefs`
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "columnDefs": [
+ * { "visible": false, "targets": [ 0 ] }
+ * ] } );
+ * } );
+ *
+ * @example
+ * // Using `columns`
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "columns": [
+ * { "visible": false },
+ * null,
+ * null,
+ * null,
+ * null
+ * ] } );
+ * } );
+ */
+ "bVisible": true,
+
+
+ /**
+ * Developer definable function that is called whenever a cell is created (Ajax source,
+ * etc) or processed for input (DOM source). This can be used as a compliment to mRender
+ * allowing you to modify the DOM element (add background colour for example) when the
+ * element is available.
+ * @type function
+ * @param {element} td The TD node that has been created
+ * @param {*} cellData The Data for the cell
+ * @param {array|object} rowData The data for the whole row
+ * @param {int} row The row index for the aoData data store
+ * @param {int} col The column index for aoColumns
+ *
+ * @name DataTable.defaults.column.createdCell
+ * @dtopt Columns
+ *
+ * @example
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "columnDefs": [ {
+ * "targets": [3],
+ * "createdCell": function (td, cellData, rowData, row, col) {
+ * if ( cellData == "1.7" ) {
+ * $(td).css('color', 'blue')
+ * }
+ * }
+ * } ]
+ * });
+ * } );
+ */
+ "fnCreatedCell": null,
+
+
+ /**
+ * This parameter has been replaced by `data` in DataTables to ensure naming
+ * consistency. `dataProp` can still be used, as there is backwards
+ * compatibility in DataTables for this option, but it is strongly
+ * recommended that you use `data` in preference to `dataProp`.
+ * @name DataTable.defaults.column.dataProp
+ */
+
+
+ /**
+ * This property can be used to read data from any data source property,
+ * including deeply nested objects / properties. `data` can be given in a
+ * number of different ways which effect its behaviour:
+ *
+ * * `integer` - treated as an array index for the data source. This is the
+ * default that DataTables uses (incrementally increased for each column).
+ * * `string` - read an object property from the data source. There are
+ * three 'special' options that can be used in the string to alter how
+ * DataTables reads the data from the source object:
+ * * `.` - Dotted Javascript notation. Just as you use a `.` in
+ * Javascript to read from nested objects, so to can the options
+ * specified in `data`. For example: `browser.version` or
+ * `browser.name`. If your object parameter name contains a period, use
+ * `\\` to escape it - i.e. `first\\.name`.
+ * * `[]` - Array notation. DataTables can automatically combine data
+ * from and array source, joining the data with the characters provided
+ * between the two brackets. For example: `name[, ]` would provide a
+ * comma-space separated list from the source array. If no characters
+ * are provided between the brackets, the original array source is
+ * returned.
+ * * `()` - Function notation. Adding `()` to the end of a parameter will
+ * execute a function of the name given. For example: `browser()` for a
+ * simple function on the data source, `browser.version()` for a
+ * function in a nested property or even `browser().version` to get an
+ * object property if the function called returns an object. Note that
+ * function notation is recommended for use in `render` rather than
+ * `data` as it is much simpler to use as a renderer.
+ * * `null` - use the original data source for the row rather than plucking
+ * data directly from it. This action has effects on two other
+ * initialisation options:
+ * * `defaultContent` - When null is given as the `data` option and
+ * `defaultContent` is specified for the column, the value defined by
+ * `defaultContent` will be used for the cell.
+ * * `render` - When null is used for the `data` option and the `render`
+ * option is specified for the column, the whole data source for the
+ * row is used for the renderer.
+ * * `function` - the function given will be executed whenever DataTables
+ * needs to set or get the data for a cell in the column. The function
+ * takes three parameters:
+ * * Parameters:
+ * * `{array|object}` The data source for the row
+ * * `{string}` The type call data requested - this will be 'set' when
+ * setting data or 'filter', 'display', 'type', 'sort' or undefined
+ * when gathering data. Note that when `undefined` is given for the
+ * type DataTables expects to get the raw data for the object back<
+ * * `{*}` Data to set when the second parameter is 'set'.
+ * * Return:
+ * * The return value from the function is not required when 'set' is
+ * the type of call, but otherwise the return is what will be used
+ * for the data requested.
+ *
+ * Note that `data` is a getter and setter option. If you just require
+ * formatting of data for output, you will likely want to use `render` which
+ * is simply a getter and thus simpler to use.
+ *
+ * Note that prior to DataTables 1.9.2 `data` was called `mDataProp`. The
+ * name change reflects the flexibility of this property and is consistent
+ * with the naming of mRender. If 'mDataProp' is given, then it will still
+ * be used by DataTables, as it automatically maps the old name to the new
+ * if required.
+ *
+ * @type string|int|function|null
+ * @default null <i>Use automatically calculated column index</i>
+ *
+ * @name DataTable.defaults.column.data
+ * @dtopt Columns
+ *
+ * @example
+ * // Read table data from objects
+ * // JSON structure for each row:
+ * // {
+ * // "engine": {value},
+ * // "browser": {value},
+ * // "platform": {value},
+ * // "version": {value},
+ * // "grade": {value}
+ * // }
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "ajaxSource": "sources/objects.txt",
+ * "columns": [
+ * { "data": "engine" },
+ * { "data": "browser" },
+ * { "data": "platform" },
+ * { "data": "version" },
+ * { "data": "grade" }
+ * ]
+ * } );
+ * } );
+ *
+ * @example
+ * // Read information from deeply nested objects
+ * // JSON structure for each row:
+ * // {
+ * // "engine": {value},
+ * // "browser": {value},
+ * // "platform": {
+ * // "inner": {value}
+ * // },
+ * // "details": [
+ * // {value}, {value}
+ * // ]
+ * // }
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "ajaxSource": "sources/deep.txt",
+ * "columns": [
+ * { "data": "engine" },
+ * { "data": "browser" },
+ * { "data": "platform.inner" },
+ * { "data": "platform.details.0" },
+ * { "data": "platform.details.1" }
+ * ]
+ * } );
+ * } );
+ *
+ * @example
+ * // Using `data` as a function to provide different information for
+ * // sorting, filtering and display. In this case, currency (price)
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "columnDefs": [ {
+ * "targets": [ 0 ],
+ * "data": function ( source, type, val ) {
+ * if (type === 'set') {
+ * source.price = val;
+ * // Store the computed dislay and filter values for efficiency
+ * source.price_display = val=="" ? "" : "$"+numberFormat(val);
+ * source.price_filter = val=="" ? "" : "$"+numberFormat(val)+" "+val;
+ * return;
+ * }
+ * else if (type === 'display') {
+ * return source.price_display;
+ * }
+ * else if (type === 'filter') {
+ * return source.price_filter;
+ * }
+ * // 'sort', 'type' and undefined all just use the integer
+ * return source.price;
+ * }
+ * } ]
+ * } );
+ * } );
+ *
+ * @example
+ * // Using default content
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "columnDefs": [ {
+ * "targets": [ 0 ],
+ * "data": null,
+ * "defaultContent": "Click to edit"
+ * } ]
+ * } );
+ * } );
+ *
+ * @example
+ * // Using array notation - outputting a list from an array
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "columnDefs": [ {
+ * "targets": [ 0 ],
+ * "data": "name[, ]"
+ * } ]
+ * } );
+ * } );
+ *
+ */
+ "mData": null,
+
+
+ /**
+ * This property is the rendering partner to `data` and it is suggested that
+ * when you want to manipulate data for display (including filtering,
+ * sorting etc) without altering the underlying data for the table, use this
+ * property. `render` can be considered to be the the read only companion to
+ * `data` which is read / write (then as such more complex). Like `data`
+ * this option can be given in a number of different ways to effect its
+ * behaviour:
+ *
+ * * `integer` - treated as an array index for the data source. This is the
+ * default that DataTables uses (incrementally increased for each column).
+ * * `string` - read an object property from the data source. There are
+ * three 'special' options that can be used in the string to alter how
+ * DataTables reads the data from the source object:
+ * * `.` - Dotted Javascript notation. Just as you use a `.` in
+ * Javascript to read from nested objects, so to can the options
+ * specified in `data`. For example: `browser.version` or
+ * `browser.name`. If your object parameter name contains a period, use
+ * `\\` to escape it - i.e. `first\\.name`.
+ * * `[]` - Array notation. DataTables can automatically combine data
+ * from and array source, joining the data with the characters provided
+ * between the two brackets. For example: `name[, ]` would provide a
+ * comma-space separated list from the source array. If no characters
+ * are provided between the brackets, the original array source is
+ * returned.
+ * * `()` - Function notation. Adding `()` to the end of a parameter will
+ * execute a function of the name given. For example: `browser()` for a
+ * simple function on the data source, `browser.version()` for a
+ * function in a nested property or even `browser().version` to get an
+ * object property if the function called returns an object.
+ * * `object` - use different data for the different data types requested by
+ * DataTables ('filter', 'display', 'type' or 'sort'). The property names
+ * of the object is the data type the property refers to and the value can
+ * defined using an integer, string or function using the same rules as
+ * `render` normally does. Note that an `_` option _must_ be specified.
+ * This is the default value to use if you haven't specified a value for
+ * the data type requested by DataTables.
+ * * `function` - the function given will be executed whenever DataTables
+ * needs to set or get the data for a cell in the column. The function
+ * takes three parameters:
+ * * Parameters:
+ * * {array|object} The data source for the row (based on `data`)
+ * * {string} The type call data requested - this will be 'filter',
+ * 'display', 'type' or 'sort'.
+ * * {array|object} The full data source for the row (not based on
+ * `data`)
+ * * Return:
+ * * The return value from the function is what will be used for the
+ * data requested.
+ *
+ * @type string|int|function|object|null
+ * @default null Use the data source value.
+ *
+ * @name DataTable.defaults.column.render
+ * @dtopt Columns
+ *
+ * @example
+ * // Create a comma separated list from an array of objects
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "ajaxSource": "sources/deep.txt",
+ * "columns": [
+ * { "data": "engine" },
+ * { "data": "browser" },
+ * {
+ * "data": "platform",
+ * "render": "[, ].name"
+ * }
+ * ]
+ * } );
+ * } );
+ *
+ * @example
+ * // Execute a function to obtain data
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "columnDefs": [ {
+ * "targets": [ 0 ],
+ * "data": null, // Use the full data source object for the renderer's source
+ * "render": "browserName()"
+ * } ]
+ * } );
+ * } );
+ *
+ * @example
+ * // As an object, extracting different data for the different types
+ * // This would be used with a data source such as:
+ * // { "phone": 5552368, "phone_filter": "5552368 555-2368", "phone_display": "555-2368" }
+ * // Here the `phone` integer is used for sorting and type detection, while `phone_filter`
+ * // (which has both forms) is used for filtering for if a user inputs either format, while
+ * // the formatted phone number is the one that is shown in the table.
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "columnDefs": [ {
+ * "targets": [ 0 ],
+ * "data": null, // Use the full data source object for the renderer's source
+ * "render": {
+ * "_": "phone",
+ * "filter": "phone_filter",
+ * "display": "phone_display"
+ * }
+ * } ]
+ * } );
+ * } );
+ *
+ * @example
+ * // Use as a function to create a link from the data source
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "columnDefs": [ {
+ * "targets": [ 0 ],
+ * "data": "download_link",
+ * "render": function ( data, type, full ) {
+ * return '<a href="'+data+'">Download</a>';
+ * }
+ * } ]
+ * } );
+ * } );
+ */
+ "mRender": null,
+
+
+ /**
+ * Change the cell type created for the column - either TD cells or TH cells. This
+ * can be useful as TH cells have semantic meaning in the table body, allowing them
+ * to act as a header for a row (you may wish to add scope='row' to the TH elements).
+ * @type string
+ * @default td
+ *
+ * @name DataTable.defaults.column.cellType
+ * @dtopt Columns
+ *
+ * @example
+ * // Make the first column use TH cells
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "columnDefs": [ {
+ * "targets": [ 0 ],
+ * "cellType": "th"
+ * } ]
+ * } );
+ * } );
+ */
+ "sCellType": "td",
+
+
+ /**
+ * Class to give to each cell in this column.
+ * @type string
+ * @default <i>Empty string</i>
+ *
+ * @name DataTable.defaults.column.class
+ * @dtopt Columns
+ *
+ * @example
+ * // Using `columnDefs`
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "columnDefs": [
+ * { "class": "my_class", "targets": [ 0 ] }
+ * ]
+ * } );
+ * } );
+ *
+ * @example
+ * // Using `columns`
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "columns": [
+ * { "class": "my_class" },
+ * null,
+ * null,
+ * null,
+ * null
+ * ]
+ * } );
+ * } );
+ */
+ "sClass": "",
+
+ /**
+ * When DataTables calculates the column widths to assign to each column,
+ * it finds the longest string in each column and then constructs a
+ * temporary table and reads the widths from that. The problem with this
+ * is that "mmm" is much wider then "iiii", but the latter is a longer
+ * string - thus the calculation can go wrong (doing it properly and putting
+ * it into an DOM object and measuring that is horribly(!) slow). Thus as
+ * a "work around" we provide this option. It will append its value to the
+ * text that is found to be the longest string for the column - i.e. padding.
+ * Generally you shouldn't need this!
+ * @type string
+ * @default <i>Empty string<i>
+ *
+ * @name DataTable.defaults.column.contentPadding
+ * @dtopt Columns
+ *
+ * @example
+ * // Using `columns`
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "columns": [
+ * null,
+ * null,
+ * null,
+ * {
+ * "contentPadding": "mmm"
+ * }
+ * ]
+ * } );
+ * } );
+ */
+ "sContentPadding": "",
+
+
+ /**
+ * Allows a default value to be given for a column's data, and will be used
+ * whenever a null data source is encountered (this can be because `data`
+ * is set to null, or because the data source itself is null).
+ * @type string
+ * @default null
+ *
+ * @name DataTable.defaults.column.defaultContent
+ * @dtopt Columns
+ *
+ * @example
+ * // Using `columnDefs`
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "columnDefs": [
+ * {
+ * "data": null,
+ * "defaultContent": "Edit",
+ * "targets": [ -1 ]
+ * }
+ * ]
+ * } );
+ * } );
+ *
+ * @example
+ * // Using `columns`
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "columns": [
+ * null,
+ * null,
+ * null,
+ * {
+ * "data": null,
+ * "defaultContent": "Edit"
+ * }
+ * ]
+ * } );
+ * } );
+ */
+ "sDefaultContent": null,
+
+
+ /**
+ * This parameter is only used in DataTables' server-side processing. It can
+ * be exceptionally useful to know what columns are being displayed on the
+ * client side, and to map these to database fields. When defined, the names
+ * also allow DataTables to reorder information from the server if it comes
+ * back in an unexpected order (i.e. if you switch your columns around on the
+ * client-side, your server-side code does not also need updating).
+ * @type string
+ * @default <i>Empty string</i>
+ *
+ * @name DataTable.defaults.column.name
+ * @dtopt Columns
+ *
+ * @example
+ * // Using `columnDefs`
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "columnDefs": [
+ * { "name": "engine", "targets": [ 0 ] },
+ * { "name": "browser", "targets": [ 1 ] },
+ * { "name": "platform", "targets": [ 2 ] },
+ * { "name": "version", "targets": [ 3 ] },
+ * { "name": "grade", "targets": [ 4 ] }
+ * ]
+ * } );
+ * } );
+ *
+ * @example
+ * // Using `columns`
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "columns": [
+ * { "name": "engine" },
+ * { "name": "browser" },
+ * { "name": "platform" },
+ * { "name": "version" },
+ * { "name": "grade" }
+ * ]
+ * } );
+ * } );
+ */
+ "sName": "",
+
+
+ /**
+ * Defines a data source type for the ordering which can be used to read
+ * real-time information from the table (updating the internally cached
+ * version) prior to ordering. This allows ordering to occur on user
+ * editable elements such as form inputs.
+ * @type string
+ * @default std
+ *
+ * @name DataTable.defaults.column.orderDataType
+ * @dtopt Columns
+ *
+ * @example
+ * // Using `columnDefs`
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "columnDefs": [
+ * { "orderDataType": "dom-text", "targets": [ 2, 3 ] },
+ * { "type": "numeric", "targets": [ 3 ] },
+ * { "orderDataType": "dom-select", "targets": [ 4 ] },
+ * { "orderDataType": "dom-checkbox", "targets": [ 5 ] }
+ * ]
+ * } );
+ * } );
+ *
+ * @example
+ * // Using `columns`
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "columns": [
+ * null,
+ * null,
+ * { "orderDataType": "dom-text" },
+ * { "orderDataType": "dom-text", "type": "numeric" },
+ * { "orderDataType": "dom-select" },
+ * { "orderDataType": "dom-checkbox" }
+ * ]
+ * } );
+ * } );
+ */
+ "sSortDataType": "std",
+
+
+ /**
+ * The title of this column.
+ * @type string
+ * @default null <i>Derived from the 'TH' value for this column in the
+ * original HTML table.</i>
+ *
+ * @name DataTable.defaults.column.title
+ * @dtopt Columns
+ *
+ * @example
+ * // Using `columnDefs`
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "columnDefs": [
+ * { "title": "My column title", "targets": [ 0 ] }
+ * ]
+ * } );
+ * } );
+ *
+ * @example
+ * // Using `columns`
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "columns": [
+ * { "title": "My column title" },
+ * null,
+ * null,
+ * null,
+ * null
+ * ]
+ * } );
+ * } );
+ */
+ "sTitle": null,
+
+
+ /**
+ * The type allows you to specify how the data for this column will be
+ * ordered. Four types (string, numeric, date and html (which will strip
+ * HTML tags before ordering)) are currently available. Note that only date
+ * formats understood by Javascript's Date() object will be accepted as type
+ * date. For example: "Mar 26, 2008 5:03 PM". May take the values: 'string',
+ * 'numeric', 'date' or 'html' (by default). Further types can be adding
+ * through plug-ins.
+ * @type string
+ * @default null <i>Auto-detected from raw data</i>
+ *
+ * @name DataTable.defaults.column.type
+ * @dtopt Columns
+ *
+ * @example
+ * // Using `columnDefs`
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "columnDefs": [
+ * { "type": "html", "targets": [ 0 ] }
+ * ]
+ * } );
+ * } );
+ *
+ * @example
+ * // Using `columns`
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "columns": [
+ * { "type": "html" },
+ * null,
+ * null,
+ * null,
+ * null
+ * ]
+ * } );
+ * } );
+ */
+ "sType": null,
+
+
+ /**
+ * Defining the width of the column, this parameter may take any CSS value
+ * (3em, 20px etc). DataTables applies 'smart' widths to columns which have not
+ * been given a specific width through this interface ensuring that the table
+ * remains readable.
+ * @type string
+ * @default null <i>Automatic</i>
+ *
+ * @name DataTable.defaults.column.width
+ * @dtopt Columns
+ *
+ * @example
+ * // Using `columnDefs`
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "columnDefs": [
+ * { "width": "20%", "targets": [ 0 ] }
+ * ]
+ * } );
+ * } );
+ *
+ * @example
+ * // Using `columns`
+ * $(document).ready( function() {
+ * $('#example').dataTable( {
+ * "columns": [
+ * { "width": "20%" },
+ * null,
+ * null,
+ * null,
+ * null
+ * ]
+ * } );
+ * } );
+ */
+ "sWidth": null
+ };
+
+ _fnHungarianMap( DataTable.defaults.column );
+
+
+
+ /**
+ * DataTables settings object - this holds all the information needed for a
+ * given table, including configuration, data and current application of the
+ * table options. DataTables does not have a single instance for each DataTable
+ * with the settings attached to that instance, but rather instances of the
+ * DataTable "class" are created on-the-fly as needed (typically by a
+ * $().dataTable() call) and the settings object is then applied to that
+ * instance.
+ *
+ * Note that this object is related to {@link DataTable.defaults} but this
+ * one is the internal data store for DataTables's cache of columns. It should
+ * NOT be manipulated outside of DataTables. Any configuration should be done
+ * through the initialisation options.
+ * @namespace
+ * @todo Really should attach the settings object to individual instances so we
+ * don't need to create new instances on each $().dataTable() call (if the
+ * table already exists). It would also save passing oSettings around and
+ * into every single function. However, this is a very significant
+ * architecture change for DataTables and will almost certainly break
+ * backwards compatibility with older installations. This is something that
+ * will be done in 2.0.
+ */
+ DataTable.models.oSettings = {
+ /**
+ * Primary features of DataTables and their enablement state.
+ * @namespace
+ */
+ "oFeatures": {
+
+ /**
+ * Flag to say if DataTables should automatically try to calculate the
+ * optimum table and columns widths (true) or not (false).
+ * Note that this parameter will be set by the initialisation routine. To
+ * set a default use {@link DataTable.defaults}.
+ * @type boolean
+ */
+ "bAutoWidth": null,
+
+ /**
+ * Delay the creation of TR and TD elements until they are actually
+ * needed by a driven page draw. This can give a significant speed
+ * increase for Ajax source and Javascript source data, but makes no
+ * difference at all fro DOM and server-side processing tables.
+ * Note that this parameter will be set by the initialisation routine. To
+ * set a default use {@link DataTable.defaults}.
+ * @type boolean
+ */
+ "bDeferRender": null,
+
+ /**
+ * Enable filtering on the table or not. Note that if this is disabled
+ * then there is no filtering at all on the table, including fnFilter.
+ * To just remove the filtering input use sDom and remove the 'f' option.
+ * Note that this parameter will be set by the initialisation routine. To
+ * set a default use {@link DataTable.defaults}.
+ * @type boolean
+ */
+ "bFilter": null,
+
+ /**
+ * Table information element (the 'Showing x of y records' div) enable
+ * flag.
+ * Note that this parameter will be set by the initialisation routine. To
+ * set a default use {@link DataTable.defaults}.
+ * @type boolean
+ */
+ "bInfo": null,
+
+ /**
+ * Present a user control allowing the end user to change the page size
+ * when pagination is enabled.
+ * Note that this parameter will be set by the initialisation routine. To
+ * set a default use {@link DataTable.defaults}.
+ * @type boolean
+ */
+ "bLengthChange": null,
+
+ /**
+ * Pagination enabled or not. Note that if this is disabled then length
+ * changing must also be disabled.
+ * Note that this parameter will be set by the initialisation routine. To
+ * set a default use {@link DataTable.defaults}.
+ * @type boolean
+ */
+ "bPaginate": null,
+
+ /**
+ * Processing indicator enable flag whenever DataTables is enacting a
+ * user request - typically an Ajax request for server-side processing.
+ * Note that this parameter will be set by the initialisation routine. To
+ * set a default use {@link DataTable.defaults}.
+ * @type boolean
+ */
+ "bProcessing": null,
+
+ /**
+ * Server-side processing enabled flag - when enabled DataTables will
+ * get all data from the server for every draw - there is no filtering,
+ * sorting or paging done on the client-side.
+ * Note that this parameter will be set by the initialisation routine. To
+ * set a default use {@link DataTable.defaults}.
+ * @type boolean
+ */
+ "bServerSide": null,
+
+ /**
+ * Sorting enablement flag.
+ * Note that this parameter will be set by the initialisation routine. To
+ * set a default use {@link DataTable.defaults}.
+ * @type boolean
+ */
+ "bSort": null,
+
+ /**
+ * Multi-column sorting
+ * Note that this parameter will be set by the initialisation routine. To
+ * set a default use {@link DataTable.defaults}.
+ * @type boolean
+ */
+ "bSortMulti": null,
+
+ /**
+ * Apply a class to the columns which are being sorted to provide a
+ * visual highlight or not. This can slow things down when enabled since
+ * there is a lot of DOM interaction.
+ * Note that this parameter will be set by the initialisation routine. To
+ * set a default use {@link DataTable.defaults}.
+ * @type boolean
+ */
+ "bSortClasses": null,
+
+ /**
+ * State saving enablement flag.
+ * Note that this parameter will be set by the initialisation routine. To
+ * set a default use {@link DataTable.defaults}.
+ * @type boolean
+ */
+ "bStateSave": null
+ },
+
+
+ /**
+ * Scrolling settings for a table.
+ * @namespace
+ */
+ "oScroll": {
+ /**
+ * When the table is shorter in height than sScrollY, collapse the
+ * table container down to the height of the table (when true).
+ * Note that this parameter will be set by the initialisation routine. To
+ * set a default use {@link DataTable.defaults}.
+ * @type boolean
+ */
+ "bCollapse": null,
+
+ /**
+ * Width of the scrollbar for the web-browser's platform. Calculated
+ * during table initialisation.
+ * @type int
+ * @default 0
+ */
+ "iBarWidth": 0,
+
+ /**
+ * Viewport width for horizontal scrolling. Horizontal scrolling is
+ * disabled if an empty string.
+ * Note that this parameter will be set by the initialisation routine. To
+ * set a default use {@link DataTable.defaults}.
+ * @type string
+ */
+ "sX": null,
+
+ /**
+ * Width to expand the table to when using x-scrolling. Typically you
+ * should not need to use this.
+ * Note that this parameter will be set by the initialisation routine. To
+ * set a default use {@link DataTable.defaults}.
+ * @type string
+ * @deprecated
+ */
+ "sXInner": null,
+
+ /**
+ * Viewport height for vertical scrolling. Vertical scrolling is disabled
+ * if an empty string.
+ * Note that this parameter will be set by the initialisation routine. To
+ * set a default use {@link DataTable.defaults}.
+ * @type string
+ */
+ "sY": null
+ },
+
+ /**
+ * Language information for the table.
+ * @namespace
+ * @extends DataTable.defaults.oLanguage
+ */
+ "oLanguage": {
+ /**
+ * Information callback function. See
+ * {@link DataTable.defaults.fnInfoCallback}
+ * @type function
+ * @default null
+ */
+ "fnInfoCallback": null
+ },
+
+ /**
+ * Browser support parameters
+ * @namespace
+ */
+ "oBrowser": {
+ /**
+ * Indicate if the browser incorrectly calculates width:100% inside a
+ * scrolling element (IE6/7)
+ * @type boolean
+ * @default false
+ */
+ "bScrollOversize": false,
+
+ /**
+ * Determine if the vertical scrollbar is on the right or left of the
+ * scrolling container - needed for rtl language layout, although not
+ * all browsers move the scrollbar (Safari).
+ * @type boolean
+ * @default false
+ */
+ "bScrollbarLeft": false,
+
+ /**
+ * Flag for if `getBoundingClientRect` is fully supported or not
+ * @type boolean
+ * @default false
+ */
+ "bBounding": false,
+
+ /**
+ * Browser scrollbar width
+ * @type integer
+ * @default 0
+ */
+ "barWidth": 0
+ },
+
+
+ "ajax": null,
+
+
+ /**
+ * Array referencing the nodes which are used for the features. The
+ * parameters of this object match what is allowed by sDom - i.e.
+ * <ul>
+ * <li>'l' - Length changing</li>
+ * <li>'f' - Filtering input</li>
+ * <li>'t' - The table!</li>
+ * <li>'i' - Information</li>
+ * <li>'p' - Pagination</li>
+ * <li>'r' - pRocessing</li>
+ * </ul>
+ * @type array
+ * @default []
+ */
+ "aanFeatures": [],
+
+ /**
+ * Store data information - see {@link DataTable.models.oRow} for detailed
+ * information.
+ * @type array
+ * @default []
+ */
+ "aoData": [],
+
+ /**
+ * Array of indexes which are in the current display (after filtering etc)
+ * @type array
+ * @default []
+ */
+ "aiDisplay": [],
+
+ /**
+ * Array of indexes for display - no filtering
+ * @type array
+ * @default []
+ */
+ "aiDisplayMaster": [],
+
+ /**
+ * Map of row ids to data indexes
+ * @type object
+ * @default {}
+ */
+ "aIds": {},
+
+ /**
+ * Store information about each column that is in use
+ * @type array
+ * @default []
+ */
+ "aoColumns": [],
+
+ /**
+ * Store information about the table's header
+ * @type array
+ * @default []
+ */
+ "aoHeader": [],
+
+ /**
+ * Store information about the table's footer
+ * @type array
+ * @default []
+ */
+ "aoFooter": [],
+
+ /**
+ * Store the applied global search information in case we want to force a
+ * research or compare the old search to a new one.
+ * Note that this parameter will be set by the initialisation routine. To
+ * set a default use {@link DataTable.defaults}.
+ * @namespace
+ * @extends DataTable.models.oSearch
+ */
+ "oPreviousSearch": {},
+
+ /**
+ * Store the applied search for each column - see
+ * {@link DataTable.models.oSearch} for the format that is used for the
+ * filtering information for each column.
+ * @type array
+ * @default []
+ */
+ "aoPreSearchCols": [],
+
+ /**
+ * Sorting that is applied to the table. Note that the inner arrays are
+ * used in the following manner:
+ * <ul>
+ * <li>Index 0 - column number</li>
+ * <li>Index 1 - current sorting direction</li>
+ * </ul>
+ * Note that this parameter will be set by the initialisation routine. To
+ * set a default use {@link DataTable.defaults}.
+ * @type array
+ * @todo These inner arrays should really be objects
+ */
+ "aaSorting": null,
+
+ /**
+ * Sorting that is always applied to the table (i.e. prefixed in front of
+ * aaSorting).
+ * Note that this parameter will be set by the initialisation routine. To
+ * set a default use {@link DataTable.defaults}.
+ * @type array
+ * @default []
+ */
+ "aaSortingFixed": [],
+
+ /**
+ * Classes to use for the striping of a table.
+ * Note that this parameter will be set by the initialisation routine. To
+ * set a default use {@link DataTable.defaults}.
+ * @type array
+ * @default []
+ */
+ "asStripeClasses": null,
+
+ /**
+ * If restoring a table - we should restore its striping classes as well
+ * @type array
+ * @default []
+ */
+ "asDestroyStripes": [],
+
+ /**
+ * If restoring a table - we should restore its width
+ * @type int
+ * @default 0
+ */
+ "sDestroyWidth": 0,
+
+ /**
+ * Callback functions array for every time a row is inserted (i.e. on a draw).
+ * @type array
+ * @default []
+ */
+ "aoRowCallback": [],
+
+ /**
+ * Callback functions for the header on each draw.
+ * @type array
+ * @default []
+ */
+ "aoHeaderCallback": [],
+
+ /**
+ * Callback function for the footer on each draw.
+ * @type array
+ * @default []
+ */
+ "aoFooterCallback": [],
+
+ /**
+ * Array of callback functions for draw callback functions
+ * @type array
+ * @default []
+ */
+ "aoDrawCallback": [],
+
+ /**
+ * Array of callback functions for row created function
+ * @type array
+ * @default []
+ */
+ "aoRowCreatedCallback": [],
+
+ /**
+ * Callback functions for just before the table is redrawn. A return of
+ * false will be used to cancel the draw.
+ * @type array
+ * @default []
+ */
+ "aoPreDrawCallback": [],
+
+ /**
+ * Callback functions for when the table has been initialised.
+ * @type array
+ * @default []
+ */
+ "aoInitComplete": [],
+
+
+ /**
+ * Callbacks for modifying the settings to be stored for state saving, prior to
+ * saving state.
+ * @type array
+ * @default []
+ */
+ "aoStateSaveParams": [],
+
+ /**
+ * Callbacks for modifying the settings that have been stored for state saving
+ * prior to using the stored values to restore the state.
+ * @type array
+ * @default []
+ */
+ "aoStateLoadParams": [],
+
+ /**
+ * Callbacks for operating on the settings object once the saved state has been
+ * loaded
+ * @type array
+ * @default []
+ */
+ "aoStateLoaded": [],
+
+ /**
+ * Cache the table ID for quick access
+ * @type string
+ * @default <i>Empty string</i>
+ */
+ "sTableId": "",
+
+ /**
+ * The TABLE node for the main table
+ * @type node
+ * @default null
+ */
+ "nTable": null,
+
+ /**
+ * Permanent ref to the thead element
+ * @type node
+ * @default null
+ */
+ "nTHead": null,
+
+ /**
+ * Permanent ref to the tfoot element - if it exists
+ * @type node
+ * @default null
+ */
+ "nTFoot": null,
+
+ /**
+ * Permanent ref to the tbody element
+ * @type node
+ * @default null
+ */
+ "nTBody": null,
+
+ /**
+ * Cache the wrapper node (contains all DataTables controlled elements)
+ * @type node
+ * @default null
+ */
+ "nTableWrapper": null,
+
+ /**
+ * Indicate if when using server-side processing the loading of data
+ * should be deferred until the second draw.
+ * Note that this parameter will be set by the initialisation routine. To
+ * set a default use {@link DataTable.defaults}.
+ * @type boolean
+ * @default false
+ */
+ "bDeferLoading": false,
+
+ /**
+ * Indicate if all required information has been read in
+ * @type boolean
+ * @default false
+ */
+ "bInitialised": false,
+
+ /**
+ * Information about open rows. Each object in the array has the parameters
+ * 'nTr' and 'nParent'
+ * @type array
+ * @default []
+ */
+ "aoOpenRows": [],
+
+ /**
+ * Dictate the positioning of DataTables' control elements - see
+ * {@link DataTable.model.oInit.sDom}.
+ * Note that this parameter will be set by the initialisation routine. To
+ * set a default use {@link DataTable.defaults}.
+ * @type string
+ * @default null
+ */
+ "sDom": null,
+
+ /**
+ * Search delay (in mS)
+ * @type integer
+ * @default null
+ */
+ "searchDelay": null,
+
+ /**
+ * Which type of pagination should be used.
+ * Note that this parameter will be set by the initialisation routine. To
+ * set a default use {@link DataTable.defaults}.
+ * @type string
+ * @default two_button
+ */
+ "sPaginationType": "two_button",
+
+ /**
+ * The state duration (for `stateSave`) in seconds.
+ * Note that this parameter will be set by the initialisation routine. To
+ * set a default use {@link DataTable.defaults}.
+ * @type int
+ * @default 0
+ */
+ "iStateDuration": 0,
+
+ /**
+ * Array of callback functions for state saving. Each array element is an
+ * object with the following parameters:
+ * <ul>
+ * <li>function:fn - function to call. Takes two parameters, oSettings
+ * and the JSON string to save that has been thus far created. Returns
+ * a JSON string to be inserted into a json object
+ * (i.e. '"param": [ 0, 1, 2]')</li>
+ * <li>string:sName - name of callback</li>
+ * </ul>
+ * @type array
+ * @default []
+ */
+ "aoStateSave": [],
+
+ /**
+ * Array of callback functions for state loading. Each array element is an
+ * object with the following parameters:
+ * <ul>
+ * <li>function:fn - function to call. Takes two parameters, oSettings
+ * and the object stored. May return false to cancel state loading</li>
+ * <li>string:sName - name of callback</li>
+ * </ul>
+ * @type array
+ * @default []
+ */
+ "aoStateLoad": [],
+
+ /**
+ * State that was saved. Useful for back reference
+ * @type object
+ * @default null
+ */
+ "oSavedState": null,
+
+ /**
+ * State that was loaded. Useful for back reference
+ * @type object
+ * @default null
+ */
+ "oLoadedState": null,
+
+ /**
+ * Source url for AJAX data for the table.
+ * Note that this parameter will be set by the initialisation routine. To
+ * set a default use {@link DataTable.defaults}.
+ * @type string
+ * @default null
+ */
+ "sAjaxSource": null,
+
+ /**
+ * Property from a given object from which to read the table data from. This
+ * can be an empty string (when not server-side processing), in which case
+ * it is assumed an an array is given directly.
+ * Note that this parameter will be set by the initialisation routine. To
+ * set a default use {@link DataTable.defaults}.
+ * @type string
+ */
+ "sAjaxDataProp": null,
+
+ /**
+ * Note if draw should be blocked while getting data
+ * @type boolean
+ * @default true
+ */
+ "bAjaxDataGet": true,
+
+ /**
+ * The last jQuery XHR object that was used for server-side data gathering.
+ * This can be used for working with the XHR information in one of the
+ * callbacks
+ * @type object
+ * @default null
+ */
+ "jqXHR": null,
+
+ /**
+ * JSON returned from the server in the last Ajax request
+ * @type object
+ * @default undefined
+ */
+ "json": undefined,
+
+ /**
+ * Data submitted as part of the last Ajax request
+ * @type object
+ * @default undefined
+ */
+ "oAjaxData": undefined,
+
+ /**
+ * Function to get the server-side data.
+ * Note that this parameter will be set by the initialisation routine. To
+ * set a default use {@link DataTable.defaults}.
+ * @type function
+ */
+ "fnServerData": null,
+
+ /**
+ * Functions which are called prior to sending an Ajax request so extra
+ * parameters can easily be sent to the server
+ * @type array
+ * @default []
+ */
+ "aoServerParams": [],
+
+ /**
+ * Send the XHR HTTP method - GET or POST (could be PUT or DELETE if
+ * required).
+ * Note that this parameter will be set by the initialisation routine. To
+ * set a default use {@link DataTable.defaults}.
+ * @type string
+ */
+ "sServerMethod": null,
+
+ /**
+ * Format numbers for display.
+ * Note that this parameter will be set by the initialisation routine. To
+ * set a default use {@link DataTable.defaults}.
+ * @type function
+ */
+ "fnFormatNumber": null,
+
+ /**
+ * List of options that can be used for the user selectable length menu.
+ * Note that this parameter will be set by the initialisation routine. To
+ * set a default use {@link DataTable.defaults}.
+ * @type array
+ * @default []
+ */
+ "aLengthMenu": null,
+
+ /**
+ * Counter for the draws that the table does. Also used as a tracker for
+ * server-side processing
+ * @type int
+ * @default 0
+ */
+ "iDraw": 0,
+
+ /**
+ * Indicate if a redraw is being done - useful for Ajax
+ * @type boolean
+ * @default false
+ */
+ "bDrawing": false,
+
+ /**
+ * Draw index (iDraw) of the last error when parsing the returned data
+ * @type int
+ * @default -1
+ */
+ "iDrawError": -1,
+
+ /**
+ * Paging display length
+ * @type int
+ * @default 10
+ */
+ "_iDisplayLength": 10,
+
+ /**
+ * Paging start point - aiDisplay index
+ * @type int
+ * @default 0
+ */
+ "_iDisplayStart": 0,
+
+ /**
+ * Server-side processing - number of records in the result set
+ * (i.e. before filtering), Use fnRecordsTotal rather than
+ * this property to get the value of the number of records, regardless of
+ * the server-side processing setting.
+ * @type int
+ * @default 0
+ * @private
+ */
+ "_iRecordsTotal": 0,
+
+ /**
+ * Server-side processing - number of records in the current display set
+ * (i.e. after filtering). Use fnRecordsDisplay rather than
+ * this property to get the value of the number of records, regardless of
+ * the server-side processing setting.
+ * @type boolean
+ * @default 0
+ * @private
+ */
+ "_iRecordsDisplay": 0,
+
+ /**
+ * Flag to indicate if jQuery UI marking and classes should be used.
+ * Note that this parameter will be set by the initialisation routine. To
+ * set a default use {@link DataTable.defaults}.
+ * @type boolean
+ */
+ "bJUI": null,
+
+ /**
+ * The classes to use for the table
+ * @type object
+ * @default {}
+ */
+ "oClasses": {},
+
+ /**
+ * Flag attached to the settings object so you can check in the draw
+ * callback if filtering has been done in the draw. Deprecated in favour of
+ * events.
+ * @type boolean
+ * @default false
+ * @deprecated
+ */
+ "bFiltered": false,
+
+ /**
+ * Flag attached to the settings object so you can check in the draw
+ * callback if sorting has been done in the draw. Deprecated in favour of
+ * events.
+ * @type boolean
+ * @default false
+ * @deprecated
+ */
+ "bSorted": false,
+
+ /**
+ * Indicate that if multiple rows are in the header and there is more than
+ * one unique cell per column, if the top one (true) or bottom one (false)
+ * should be used for sorting / title by DataTables.
+ * Note that this parameter will be set by the initialisation routine. To
+ * set a default use {@link DataTable.defaults}.
+ * @type boolean
+ */
+ "bSortCellsTop": null,
+
+ /**
+ * Initialisation object that is used for the table
+ * @type object
+ * @default null
+ */
+ "oInit": null,
+
+ /**
+ * Destroy callback functions - for plug-ins to attach themselves to the
+ * destroy so they can clean up markup and events.
+ * @type array
+ * @default []
+ */
+ "aoDestroyCallback": [],
+
+
+ /**
+ * Get the number of records in the current record set, before filtering
+ * @type function
+ */
+ "fnRecordsTotal": function ()
+ {
+ return _fnDataSource( this ) == 'ssp' ?
+ this._iRecordsTotal * 1 :
+ this.aiDisplayMaster.length;
+ },
+
+ /**
+ * Get the number of records in the current record set, after filtering
+ * @type function
+ */
+ "fnRecordsDisplay": function ()
+ {
+ return _fnDataSource( this ) == 'ssp' ?
+ this._iRecordsDisplay * 1 :
+ this.aiDisplay.length;
+ },
+
+ /**
+ * Get the display end point - aiDisplay index
+ * @type function
+ */
+ "fnDisplayEnd": function ()
+ {
+ var
+ len = this._iDisplayLength,
+ start = this._iDisplayStart,
+ calc = start + len,
+ records = this.aiDisplay.length,
+ features = this.oFeatures,
+ paginate = features.bPaginate;
+
+ if ( features.bServerSide ) {
+ return paginate === false || len === -1 ?
+ start + records :
+ Math.min( start+len, this._iRecordsDisplay );
+ }
+ else {
+ return ! paginate || calc>records || len===-1 ?
+ records :
+ calc;
+ }
+ },
+
+ /**
+ * The DataTables object for this table
+ * @type object
+ * @default null
+ */
+ "oInstance": null,
+
+ /**
+ * Unique identifier for each instance of the DataTables object. If there
+ * is an ID on the table node, then it takes that value, otherwise an
+ * incrementing internal counter is used.
+ * @type string
+ * @default null
+ */
+ "sInstance": null,
+
+ /**
+ * tabindex attribute value that is added to DataTables control elements, allowing
+ * keyboard navigation of the table and its controls.
+ */
+ "iTabIndex": 0,
+
+ /**
+ * DIV container for the footer scrolling table if scrolling
+ */
+ "nScrollHead": null,
+
+ /**
+ * DIV container for the footer scrolling table if scrolling
+ */
+ "nScrollFoot": null,
+
+ /**
+ * Last applied sort
+ * @type array
+ * @default []
+ */
+ "aLastSort": [],
+
+ /**
+ * Stored plug-in instances
+ * @type object
+ * @default {}
+ */
+ "oPlugins": {},
+
+ /**
+ * Function used to get a row's id from the row's data
+ * @type function
+ * @default null
+ */
+ "rowIdFn": null,
+
+ /**
+ * Data location where to store a row's id
+ * @type string
+ * @default null
+ */
+ "rowId": null
+ };
+
+ /**
+ * Extension object for DataTables that is used to provide all extension
+ * options.
+ *
+ * Note that the `DataTable.ext` object is available through
+ * `jQuery.fn.dataTable.ext` where it may be accessed and manipulated. It is
+ * also aliased to `jQuery.fn.dataTableExt` for historic reasons.
+ * @namespace
+ * @extends DataTable.models.ext
+ */
+
+
+ /**
+ * DataTables extensions
+ *
+ * This namespace acts as a collection area for plug-ins that can be used to
+ * extend DataTables capabilities. Indeed many of the build in methods
+ * use this method to provide their own capabilities (sorting methods for
+ * example).
+ *
+ * Note that this namespace is aliased to `jQuery.fn.dataTableExt` for legacy
+ * reasons
+ *
+ * @namespace
+ */
+ DataTable.ext = _ext = {
+ /**
+ * Buttons. For use with the Buttons extension for DataTables. This is
+ * defined here so other extensions can define buttons regardless of load
+ * order. It is _not_ used by DataTables core.
+ *
+ * @type object
+ * @default {}
+ */
+ buttons: {},
+
+
+ /**
+ * Element class names
+ *
+ * @type object
+ * @default {}
+ */
+ classes: {},
+
+
+ /**
+ * DataTables build type (expanded by the download builder)
+ *
+ * @type string
+ */
+ builder: "-source-",
+
+
+ /**
+ * Error reporting.
+ *
+ * How should DataTables report an error. Can take the value 'alert',
+ * 'throw', 'none' or a function.
+ *
+ * @type string|function
+ * @default alert
+ */
+ errMode: "alert",
+
+
+ /**
+ * Feature plug-ins.
+ *
+ * This is an array of objects which describe the feature plug-ins that are
+ * available to DataTables. These feature plug-ins are then available for
+ * use through the `dom` initialisation option.
+ *
+ * Each feature plug-in is described by an object which must have the
+ * following properties:
+ *
+ * * `fnInit` - function that is used to initialise the plug-in,
+ * * `cFeature` - a character so the feature can be enabled by the `dom`
+ * instillation option. This is case sensitive.
+ *
+ * The `fnInit` function has the following input parameters:
+ *
+ * 1. `{object}` DataTables settings object: see
+ * {@link DataTable.models.oSettings}
+ *
+ * And the following return is expected:
+ *
+ * * {node|null} The element which contains your feature. Note that the
+ * return may also be void if your plug-in does not require to inject any
+ * DOM elements into DataTables control (`dom`) - for example this might
+ * be useful when developing a plug-in which allows table control via
+ * keyboard entry
+ *
+ * @type array
+ *
+ * @example
+ * $.fn.dataTable.ext.features.push( {
+ * "fnInit": function( oSettings ) {
+ * return new TableTools( { "oDTSettings": oSettings } );
+ * },
+ * "cFeature": "T"
+ * } );
+ */
+ feature: [],
+
+
+ /**
+ * Row searching.
+ *
+ * This method of searching is complimentary to the default type based
+ * searching, and a lot more comprehensive as it allows you complete control
+ * over the searching logic. Each element in this array is a function
+ * (parameters described below) that is called for every row in the table,
+ * and your logic decides if it should be included in the searching data set
+ * or not.
+ *
+ * Searching functions have the following input parameters:
+ *
+ * 1. `{object}` DataTables settings object: see
+ * {@link DataTable.models.oSettings}
+ * 2. `{array|object}` Data for the row to be processed (same as the
+ * original format that was passed in as the data source, or an array
+ * from a DOM data source
+ * 3. `{int}` Row index ({@link DataTable.models.oSettings.aoData}), which
+ * can be useful to retrieve the `TR` element if you need DOM interaction.
+ *
+ * And the following return is expected:
+ *
+ * * {boolean} Include the row in the searched result set (true) or not
+ * (false)
+ *
+ * Note that as with the main search ability in DataTables, technically this
+ * is "filtering", since it is subtractive. However, for consistency in
+ * naming we call it searching here.
+ *
+ * @type array
+ * @default []
+ *
+ * @example
+ * // The following example shows custom search being applied to the
+ * // fourth column (i.e. the data[3] index) based on two input values
+ * // from the end-user, matching the data in a certain range.
+ * $.fn.dataTable.ext.search.push(
+ * function( settings, data, dataIndex ) {
+ * var min = document.getElementById('min').value * 1;
+ * var max = document.getElementById('max').value * 1;
+ * var version = data[3] == "-" ? 0 : data[3]*1;
+ *
+ * if ( min == "" && max == "" ) {
+ * return true;
+ * }
+ * else if ( min == "" && version < max ) {
+ * return true;
+ * }
+ * else if ( min < version && "" == max ) {
+ * return true;
+ * }
+ * else if ( min < version && version < max ) {
+ * return true;
+ * }
+ * return false;
+ * }
+ * );
+ */
+ search: [],
+
+
+ /**
+ * Selector extensions
+ *
+ * The `selector` option can be used to extend the options available for the
+ * selector modifier options (`selector-modifier` object data type) that
+ * each of the three built in selector types offer (row, column and cell +
+ * their plural counterparts). For example the Select extension uses this
+ * mechanism to provide an option to select only rows, columns and cells
+ * that have been marked as selected by the end user (`{selected: true}`),
+ * which can be used in conjunction with the existing built in selector
+ * options.
+ *
+ * Each property is an array to which functions can be pushed. The functions
+ * take three attributes:
+ *
+ * * Settings object for the host table
+ * * Options object (`selector-modifier` object type)
+ * * Array of selected item indexes
+ *
+ * The return is an array of the resulting item indexes after the custom
+ * selector has been applied.
+ *
+ * @type object
+ */
+ selector: {
+ cell: [],
+ column: [],
+ row: []
+ },
+
+
+ /**
+ * Internal functions, exposed for used in plug-ins.
+ *
+ * Please note that you should not need to use the internal methods for
+ * anything other than a plug-in (and even then, try to avoid if possible).
+ * The internal function may change between releases.
+ *
+ * @type object
+ * @default {}
+ */
+ internal: {},
+
+
+ /**
+ * Legacy configuration options. Enable and disable legacy options that
+ * are available in DataTables.
+ *
+ * @type object
+ */
+ legacy: {
+ /**
+ * Enable / disable DataTables 1.9 compatible server-side processing
+ * requests
+ *
+ * @type boolean
+ * @default null
+ */
+ ajax: null
+ },
+
+
+ /**
+ * Pagination plug-in methods.
+ *
+ * Each entry in this object is a function and defines which buttons should
+ * be shown by the pagination rendering method that is used for the table:
+ * {@link DataTable.ext.renderer.pageButton}. The renderer addresses how the
+ * buttons are displayed in the document, while the functions here tell it
+ * what buttons to display. This is done by returning an array of button
+ * descriptions (what each button will do).
+ *
+ * Pagination types (the four built in options and any additional plug-in
+ * options defined here) can be used through the `paginationType`
+ * initialisation parameter.
+ *
+ * The functions defined take two parameters:
+ *
+ * 1. `{int} page` The current page index
+ * 2. `{int} pages` The number of pages in the table
+ *
+ * Each function is expected to return an array where each element of the
+ * array can be one of:
+ *
+ * * `first` - Jump to first page when activated
+ * * `last` - Jump to last page when activated
+ * * `previous` - Show previous page when activated
+ * * `next` - Show next page when activated
+ * * `{int}` - Show page of the index given
+ * * `{array}` - A nested array containing the above elements to add a
+ * containing 'DIV' element (might be useful for styling).
+ *
+ * Note that DataTables v1.9- used this object slightly differently whereby
+ * an object with two functions would be defined for each plug-in. That
+ * ability is still supported by DataTables 1.10+ to provide backwards
+ * compatibility, but this option of use is now decremented and no longer
+ * documented in DataTables 1.10+.
+ *
+ * @type object
+ * @default {}
+ *
+ * @example
+ * // Show previous, next and current page buttons only
+ * $.fn.dataTableExt.oPagination.current = function ( page, pages ) {
+ * return [ 'previous', page, 'next' ];
+ * };
+ */
+ pager: {},
+
+
+ renderer: {
+ pageButton: {},
+ header: {}
+ },
+
+
+ /**
+ * Ordering plug-ins - custom data source
+ *
+ * The extension options for ordering of data available here is complimentary
+ * to the default type based ordering that DataTables typically uses. It
+ * allows much greater control over the the data that is being used to
+ * order a column, but is necessarily therefore more complex.
+ *
+ * This type of ordering is useful if you want to do ordering based on data
+ * live from the DOM (for example the contents of an 'input' element) rather
+ * than just the static string that DataTables knows of.
+ *
+ * The way these plug-ins work is that you create an array of the values you
+ * wish to be ordering for the column in question and then return that
+ * array. The data in the array much be in the index order of the rows in
+ * the table (not the currently ordering order!). Which order data gathering
+ * function is run here depends on the `dt-init columns.orderDataType`
+ * parameter that is used for the column (if any).
+ *
+ * The functions defined take two parameters:
+ *
+ * 1. `{object}` DataTables settings object: see
+ * {@link DataTable.models.oSettings}
+ * 2. `{int}` Target column index
+ *
+ * Each function is expected to return an array:
+ *
+ * * `{array}` Data for the column to be ordering upon
+ *
+ * @type array
+ *
+ * @example
+ * // Ordering using `input` node values
+ * $.fn.dataTable.ext.order['dom-text'] = function ( settings, col )
+ * {
+ * return this.api().column( col, {order:'index'} ).nodes().map( function ( td, i ) {
+ * return $('input', td).val();
+ * } );
+ * }
+ */
+ order: {},
+
+
+ /**
+ * Type based plug-ins.
+ *
+ * Each column in DataTables has a type assigned to it, either by automatic
+ * detection or by direct assignment using the `type` option for the column.
+ * The type of a column will effect how it is ordering and search (plug-ins
+ * can also make use of the column type if required).
+ *
+ * @namespace
+ */
+ type: {
+ /**
+ * Type detection functions.
+ *
+ * The functions defined in this object are used to automatically detect
+ * a column's type, making initialisation of DataTables super easy, even
+ * when complex data is in the table.
+ *
+ * The functions defined take two parameters:
+ *
+ * 1. `{*}` Data from the column cell to be analysed
+ * 2. `{settings}` DataTables settings object. This can be used to
+ * perform context specific type detection - for example detection
+ * based on language settings such as using a comma for a decimal
+ * place. Generally speaking the options from the settings will not
+ * be required
+ *
+ * Each function is expected to return:
+ *
+ * * `{string|null}` Data type detected, or null if unknown (and thus
+ * pass it on to the other type detection functions.
+ *
+ * @type array
+ *
+ * @example
+ * // Currency type detection plug-in:
+ * $.fn.dataTable.ext.type.detect.push(
+ * function ( data, settings ) {
+ * // Check the numeric part
+ * if ( ! $.isNumeric( data.substring(1) ) ) {
+ * return null;
+ * }
+ *
+ * // Check prefixed by currency
+ * if ( data.charAt(0) == '$' || data.charAt(0) == '&pound;' ) {
+ * return 'currency';
+ * }
+ * return null;
+ * }
+ * );
+ */
+ detect: [],
+
+
+ /**
+ * Type based search formatting.
+ *
+ * The type based searching functions can be used to pre-format the
+ * data to be search on. For example, it can be used to strip HTML
+ * tags or to de-format telephone numbers for numeric only searching.
+ *
+ * Note that is a search is not defined for a column of a given type,
+ * no search formatting will be performed.
+ *
+ * Pre-processing of searching data plug-ins - When you assign the sType
+ * for a column (or have it automatically detected for you by DataTables
+ * or a type detection plug-in), you will typically be using this for
+ * custom sorting, but it can also be used to provide custom searching
+ * by allowing you to pre-processing the data and returning the data in
+ * the format that should be searched upon. This is done by adding
+ * functions this object with a parameter name which matches the sType
+ * for that target column. This is the corollary of <i>afnSortData</i>
+ * for searching data.
+ *
+ * The functions defined take a single parameter:
+ *
+ * 1. `{*}` Data from the column cell to be prepared for searching
+ *
+ * Each function is expected to return:
+ *
+ * * `{string|null}` Formatted string that will be used for the searching.
+ *
+ * @type object
+ * @default {}
+ *
+ * @example
+ * $.fn.dataTable.ext.type.search['title-numeric'] = function ( d ) {
+ * return d.replace(/\n/g," ").replace( /<.*?>/g, "" );
+ * }
+ */
+ search: {},
+
+
+ /**
+ * Type based ordering.
+ *
+ * The column type tells DataTables what ordering to apply to the table
+ * when a column is sorted upon. The order for each type that is defined,
+ * is defined by the functions available in this object.
+ *
+ * Each ordering option can be described by three properties added to
+ * this object:
+ *
+ * * `{type}-pre` - Pre-formatting function
+ * * `{type}-asc` - Ascending order function
+ * * `{type}-desc` - Descending order function
+ *
+ * All three can be used together, only `{type}-pre` or only
+ * `{type}-asc` and `{type}-desc` together. It is generally recommended
+ * that only `{type}-pre` is used, as this provides the optimal
+ * implementation in terms of speed, although the others are provided
+ * for compatibility with existing Javascript sort functions.
+ *
+ * `{type}-pre`: Functions defined take a single parameter:
+ *
+ * 1. `{*}` Data from the column cell to be prepared for ordering
+ *
+ * And return:
+ *
+ * * `{*}` Data to be sorted upon
+ *
+ * `{type}-asc` and `{type}-desc`: Functions are typical Javascript sort
+ * functions, taking two parameters:
+ *
+ * 1. `{*}` Data to compare to the second parameter
+ * 2. `{*}` Data to compare to the first parameter
+ *
+ * And returning:
+ *
+ * * `{*}` Ordering match: <0 if first parameter should be sorted lower
+ * than the second parameter, ===0 if the two parameters are equal and
+ * >0 if the first parameter should be sorted height than the second
+ * parameter.
+ *
+ * @type object
+ * @default {}
+ *
+ * @example
+ * // Numeric ordering of formatted numbers with a pre-formatter
+ * $.extend( $.fn.dataTable.ext.type.order, {
+ * "string-pre": function(x) {
+ * a = (a === "-" || a === "") ? 0 : a.replace( /[^\d\-\.]/g, "" );
+ * return parseFloat( a );
+ * }
+ * } );
+ *
+ * @example
+ * // Case-sensitive string ordering, with no pre-formatting method
+ * $.extend( $.fn.dataTable.ext.order, {
+ * "string-case-asc": function(x,y) {
+ * return ((x < y) ? -1 : ((x > y) ? 1 : 0));
+ * },
+ * "string-case-desc": function(x,y) {
+ * return ((x < y) ? 1 : ((x > y) ? -1 : 0));
+ * }
+ * } );
+ */
+ order: {}
+ },
+
+ /**
+ * Unique DataTables instance counter
+ *
+ * @type int
+ * @private
+ */
+ _unique: 0,
+
+
+ //
+ // Depreciated
+ // The following properties are retained for backwards compatiblity only.
+ // The should not be used in new projects and will be removed in a future
+ // version
+ //
+
+ /**
+ * Version check function.
+ * @type function
+ * @depreciated Since 1.10
+ */
+ fnVersionCheck: DataTable.fnVersionCheck,
+
+
+ /**
+ * Index for what 'this' index API functions should use
+ * @type int
+ * @deprecated Since v1.10
+ */
+ iApiIndex: 0,
+
+
+ /**
+ * jQuery UI class container
+ * @type object
+ * @deprecated Since v1.10
+ */
+ oJUIClasses: {},
+
+
+ /**
+ * Software version
+ * @type string
+ * @deprecated Since v1.10
+ */
+ sVersion: DataTable.version
+ };
+
+
+ //
+ // Backwards compatibility. Alias to pre 1.10 Hungarian notation counter parts
+ //
+ $.extend( _ext, {
+ afnFiltering: _ext.search,
+ aTypes: _ext.type.detect,
+ ofnSearch: _ext.type.search,
+ oSort: _ext.type.order,
+ afnSortData: _ext.order,
+ aoFeatures: _ext.feature,
+ oApi: _ext.internal,
+ oStdClasses: _ext.classes,
+ oPagination: _ext.pager
+ } );
+
+
+ $.extend( DataTable.ext.classes, {
+ "sTable": "dataTable",
+ "sNoFooter": "no-footer",
+
+ /* Paging buttons */
+ "sPageButton": "paginate_button",
+ "sPageButtonActive": "current",
+ "sPageButtonDisabled": "disabled",
+
+ /* Striping classes */
+ "sStripeOdd": "odd",
+ "sStripeEven": "even",
+
+ /* Empty row */
+ "sRowEmpty": "dataTables_empty",
+
+ /* Features */
+ "sWrapper": "dataTables_wrapper",
+ "sFilter": "dataTables_filter",
+ "sInfo": "dataTables_info",
+ "sPaging": "dataTables_paginate paging_", /* Note that the type is postfixed */
+ "sLength": "dataTables_length",
+ "sProcessing": "dataTables_processing",
+
+ /* Sorting */
+ "sSortAsc": "sorting_asc",
+ "sSortDesc": "sorting_desc",
+ "sSortable": "sorting", /* Sortable in both directions */
+ "sSortableAsc": "sorting_asc_disabled",
+ "sSortableDesc": "sorting_desc_disabled",
+ "sSortableNone": "sorting_disabled",
+ "sSortColumn": "sorting_", /* Note that an int is postfixed for the sorting order */
+
+ /* Filtering */
+ "sFilterInput": "",
+
+ /* Page length */
+ "sLengthSelect": "",
+
+ /* Scrolling */
+ "sScrollWrapper": "dataTables_scroll",
+ "sScrollHead": "dataTables_scrollHead",
+ "sScrollHeadInner": "dataTables_scrollHeadInner",
+ "sScrollBody": "dataTables_scrollBody",
+ "sScrollFoot": "dataTables_scrollFoot",
+ "sScrollFootInner": "dataTables_scrollFootInner",
+
+ /* Misc */
+ "sHeaderTH": "",
+ "sFooterTH": "",
+
+ // Deprecated
+ "sSortJUIAsc": "",
+ "sSortJUIDesc": "",
+ "sSortJUI": "",
+ "sSortJUIAscAllowed": "",
+ "sSortJUIDescAllowed": "",
+ "sSortJUIWrapper": "",
+ "sSortIcon": "",
+ "sJUIHeader": "",
+ "sJUIFooter": ""
+ } );
+
+
+ (function() {
+
+ // Reused strings for better compression. Closure compiler appears to have a
+ // weird edge case where it is trying to expand strings rather than use the
+ // variable version. This results in about 200 bytes being added, for very
+ // little preference benefit since it this run on script load only.
+ var _empty = '';
+ _empty = '';
+
+ var _stateDefault = _empty + 'ui-state-default';
+ var _sortIcon = _empty + 'css_right ui-icon ui-icon-';
+ var _headerFooter = _empty + 'fg-toolbar ui-toolbar ui-widget-header ui-helper-clearfix';
+
+ $.extend( DataTable.ext.oJUIClasses, DataTable.ext.classes, {
+ /* Full numbers paging buttons */
+ "sPageButton": "fg-button ui-button "+_stateDefault,
+ "sPageButtonActive": "ui-state-disabled",
+ "sPageButtonDisabled": "ui-state-disabled",
+
+ /* Features */
+ "sPaging": "dataTables_paginate fg-buttonset ui-buttonset fg-buttonset-multi "+
+ "ui-buttonset-multi paging_", /* Note that the type is postfixed */
+
+ /* Sorting */
+ "sSortAsc": _stateDefault+" sorting_asc",
+ "sSortDesc": _stateDefault+" sorting_desc",
+ "sSortable": _stateDefault+" sorting",
+ "sSortableAsc": _stateDefault+" sorting_asc_disabled",
+ "sSortableDesc": _stateDefault+" sorting_desc_disabled",
+ "sSortableNone": _stateDefault+" sorting_disabled",
+ "sSortJUIAsc": _sortIcon+"triangle-1-n",
+ "sSortJUIDesc": _sortIcon+"triangle-1-s",
+ "sSortJUI": _sortIcon+"carat-2-n-s",
+ "sSortJUIAscAllowed": _sortIcon+"carat-1-n",
+ "sSortJUIDescAllowed": _sortIcon+"carat-1-s",
+ "sSortJUIWrapper": "DataTables_sort_wrapper",
+ "sSortIcon": "DataTables_sort_icon",
+
+ /* Scrolling */
+ "sScrollHead": "dataTables_scrollHead "+_stateDefault,
+ "sScrollFoot": "dataTables_scrollFoot "+_stateDefault,
+
+ /* Misc */
+ "sHeaderTH": _stateDefault,
+ "sFooterTH": _stateDefault,
+ "sJUIHeader": _headerFooter+" ui-corner-tl ui-corner-tr",
+ "sJUIFooter": _headerFooter+" ui-corner-bl ui-corner-br"
+ } );
+
+ }());
+
+
+
+ var extPagination = DataTable.ext.pager;
+
+ function _numbers ( page, pages ) {
+ var
+ numbers = [],
+ buttons = extPagination.numbers_length,
+ half = Math.floor( buttons / 2 ),
+ i = 1;
+
+ if ( pages <= buttons ) {
+ numbers = _range( 0, pages );
+ }
+ else if ( page <= half ) {
+ numbers = _range( 0, buttons-2 );
+ numbers.push( 'ellipsis' );
+ numbers.push( pages-1 );
+ }
+ else if ( page >= pages - 1 - half ) {
+ numbers = _range( pages-(buttons-2), pages );
+ numbers.splice( 0, 0, 'ellipsis' ); // no unshift in ie6
+ numbers.splice( 0, 0, 0 );
+ }
+ else {
+ numbers = _range( page-half+2, page+half-1 );
+ numbers.push( 'ellipsis' );
+ numbers.push( pages-1 );
+ numbers.splice( 0, 0, 'ellipsis' );
+ numbers.splice( 0, 0, 0 );
+ }
+
+ numbers.DT_el = 'span';
+ return numbers;
+ }
+
+
+ $.extend( extPagination, {
+ simple: function ( page, pages ) {
+ return [ 'previous', 'next' ];
+ },
+
+ full: function ( page, pages ) {
+ return [ 'first', 'previous', 'next', 'last' ];
+ },
+
+ numbers: function ( page, pages ) {
+ return [ _numbers(page, pages) ];
+ },
+
+ simple_numbers: function ( page, pages ) {
+ return [ 'previous', _numbers(page, pages), 'next' ];
+ },
+
+ full_numbers: function ( page, pages ) {
+ return [ 'first', 'previous', _numbers(page, pages), 'next', 'last' ];
+ },
+
+ // For testing and plug-ins to use
+ _numbers: _numbers,
+
+ // Number of number buttons (including ellipsis) to show. _Must be odd!_
+ numbers_length: 7
+ } );
+
+
+ $.extend( true, DataTable.ext.renderer, {
+ pageButton: {
+ _: function ( settings, host, idx, buttons, page, pages ) {
+ var classes = settings.oClasses;
+ var lang = settings.oLanguage.oPaginate;
+ var aria = settings.oLanguage.oAria.paginate || {};
+ var btnDisplay, btnClass, counter=0;
+
+ var attach = function( container, buttons ) {
+ var i, ien, node, button;
+ var clickHandler = function ( e ) {
+ _fnPageChange( settings, e.data.action, true );
+ };
+
+ for ( i=0, ien=buttons.length ; i<ien ; i++ ) {
+ button = buttons[i];
+
+ if ( $.isArray( button ) ) {
+ var inner = $( '<'+(button.DT_el || 'div')+'/>' )
+ .appendTo( container );
+ attach( inner, button );
+ }
+ else {
+ btnDisplay = null;
+ btnClass = '';
+
+ switch ( button ) {
+ case 'ellipsis':
+ container.append('<span class="ellipsis">&#x2026;</span>');
+ break;
+
+ case 'first':
+ btnDisplay = lang.sFirst;
+ btnClass = button + (page > 0 ?
+ '' : ' '+classes.sPageButtonDisabled);
+ break;
+
+ case 'previous':
+ btnDisplay = lang.sPrevious;
+ btnClass = button + (page > 0 ?
+ '' : ' '+classes.sPageButtonDisabled);
+ break;
+
+ case 'next':
+ btnDisplay = lang.sNext;
+ btnClass = button + (page < pages-1 ?
+ '' : ' '+classes.sPageButtonDisabled);
+ break;
+
+ case 'last':
+ btnDisplay = lang.sLast;
+ btnClass = button + (page < pages-1 ?
+ '' : ' '+classes.sPageButtonDisabled);
+ break;
+
+ default:
+ btnDisplay = button + 1;
+ btnClass = page === button ?
+ classes.sPageButtonActive : '';
+ break;
+ }
+
+ if ( btnDisplay !== null ) {
+ node = $('<a>', {
+ 'class': classes.sPageButton+' '+btnClass,
+ 'aria-controls': settings.sTableId,
+ 'aria-label': aria[ button ],
+ 'data-dt-idx': counter,
+ 'tabindex': settings.iTabIndex,
+ 'id': idx === 0 && typeof button === 'string' ?
+ settings.sTableId +'_'+ button :
+ null
+ } )
+ .html( btnDisplay )
+ .appendTo( container );
+
+ _fnBindAction(
+ node, {action: button}, clickHandler
+ );
+
+ counter++;
+ }
+ }
+ }
+ };
+
+ // IE9 throws an 'unknown error' if document.activeElement is used
+ // inside an iframe or frame. Try / catch the error. Not good for
+ // accessibility, but neither are frames.
+ var activeEl;
+
+ try {
+ // Because this approach is destroying and recreating the paging
+ // elements, focus is lost on the select button which is bad for
+ // accessibility. So we want to restore focus once the draw has
+ // completed
+ activeEl = $(host).find(document.activeElement).data('dt-idx');
+ }
+ catch (e) {}
+
+ attach( $(host).empty(), buttons );
+
+ if ( activeEl ) {
+ $(host).find( '[data-dt-idx='+activeEl+']' ).focus();
+ }
+ }
+ }
+ } );
+
+
+
+ // Built in type detection. See model.ext.aTypes for information about
+ // what is required from this methods.
+ $.extend( DataTable.ext.type.detect, [
+ // Plain numbers - first since V8 detects some plain numbers as dates
+ // e.g. Date.parse('55') (but not all, e.g. Date.parse('22')...).
+ function ( d, settings )
+ {
+ var decimal = settings.oLanguage.sDecimal;
+ return _isNumber( d, decimal ) ? 'num'+decimal : null;
+ },
+
+ // Dates (only those recognised by the browser's Date.parse)
+ function ( d, settings )
+ {
+ // V8 will remove any unknown characters at the start and end of the
+ // expression, leading to false matches such as `$245.12` or `10%` being
+ // a valid date. See forum thread 18941 for detail.
+ if ( d && !(d instanceof Date) && ( ! _re_date_start.test(d) || ! _re_date_end.test(d) ) ) {
+ return null;
+ }
+ var parsed = Date.parse(d);
+ return (parsed !== null && !isNaN(parsed)) || _empty(d) ? 'date' : null;
+ },
+
+ // Formatted numbers
+ function ( d, settings )
+ {
+ var decimal = settings.oLanguage.sDecimal;
+ return _isNumber( d, decimal, true ) ? 'num-fmt'+decimal : null;
+ },
+
+ // HTML numeric
+ function ( d, settings )
+ {
+ var decimal = settings.oLanguage.sDecimal;
+ return _htmlNumeric( d, decimal ) ? 'html-num'+decimal : null;
+ },
+
+ // HTML numeric, formatted
+ function ( d, settings )
+ {
+ var decimal = settings.oLanguage.sDecimal;
+ return _htmlNumeric( d, decimal, true ) ? 'html-num-fmt'+decimal : null;
+ },
+
+ // HTML (this is strict checking - there must be html)
+ function ( d, settings )
+ {
+ return _empty( d ) || (typeof d === 'string' && d.indexOf('<') !== -1) ?
+ 'html' : null;
+ }
+ ] );
+
+
+
+ // Filter formatting functions. See model.ext.ofnSearch for information about
+ // what is required from these methods.
+ //
+ // Note that additional search methods are added for the html numbers and
+ // html formatted numbers by `_addNumericSort()` when we know what the decimal
+ // place is
+
+
+ $.extend( DataTable.ext.type.search, {
+ html: function ( data ) {
+ return _empty(data) ?
+ data :
+ typeof data === 'string' ?
+ data
+ .replace( _re_new_lines, " " )
+ .replace( _re_html, "" ) :
+ '';
+ },
+
+ string: function ( data ) {
+ return _empty(data) ?
+ data :
+ typeof data === 'string' ?
+ data.replace( _re_new_lines, " " ) :
+ data;
+ }
+ } );
+
+
+
+ var __numericReplace = function ( d, decimalPlace, re1, re2 ) {
+ if ( d !== 0 && (!d || d === '-') ) {
+ return -Infinity;
+ }
+
+ // If a decimal place other than `.` is used, it needs to be given to the
+ // function so we can detect it and replace with a `.` which is the only
+ // decimal place Javascript recognises - it is not locale aware.
+ if ( decimalPlace ) {
+ d = _numToDecimal( d, decimalPlace );
+ }
+
+ if ( d.replace ) {
+ if ( re1 ) {
+ d = d.replace( re1, '' );
+ }
+
+ if ( re2 ) {
+ d = d.replace( re2, '' );
+ }
+ }
+
+ return d * 1;
+ };
+
+
+ // Add the numeric 'deformatting' functions for sorting and search. This is done
+ // in a function to provide an easy ability for the language options to add
+ // additional methods if a non-period decimal place is used.
+ function _addNumericSort ( decimalPlace ) {
+ $.each(
+ {
+ // Plain numbers
+ "num": function ( d ) {
+ return __numericReplace( d, decimalPlace );
+ },
+
+ // Formatted numbers
+ "num-fmt": function ( d ) {
+ return __numericReplace( d, decimalPlace, _re_formatted_numeric );
+ },
+
+ // HTML numeric
+ "html-num": function ( d ) {
+ return __numericReplace( d, decimalPlace, _re_html );
+ },
+
+ // HTML numeric, formatted
+ "html-num-fmt": function ( d ) {
+ return __numericReplace( d, decimalPlace, _re_html, _re_formatted_numeric );
+ }
+ },
+ function ( key, fn ) {
+ // Add the ordering method
+ _ext.type.order[ key+decimalPlace+'-pre' ] = fn;
+
+ // For HTML types add a search formatter that will strip the HTML
+ if ( key.match(/^html\-/) ) {
+ _ext.type.search[ key+decimalPlace ] = _ext.type.search.html;
+ }
+ }
+ );
+ }
+
+
+ // Default sort methods
+ $.extend( _ext.type.order, {
+ // Dates
+ "date-pre": function ( d ) {
+ return Date.parse( d ) || 0;
+ },
+
+ // html
+ "html-pre": function ( a ) {
+ return _empty(a) ?
+ '' :
+ a.replace ?
+ a.replace( /<.*?>/g, "" ).toLowerCase() :
+ a+'';
+ },
+
+ // string
+ "string-pre": function ( a ) {
+ // This is a little complex, but faster than always calling toString,
+ // http://jsperf.com/tostring-v-check
+ return _empty(a) ?
+ '' :
+ typeof a === 'string' ?
+ a.toLowerCase() :
+ ! a.toString ?
+ '' :
+ a.toString();
+ },
+
+ // string-asc and -desc are retained only for compatibility with the old
+ // sort methods
+ "string-asc": function ( x, y ) {
+ return ((x < y) ? -1 : ((x > y) ? 1 : 0));
+ },
+
+ "string-desc": function ( x, y ) {
+ return ((x < y) ? 1 : ((x > y) ? -1 : 0));
+ }
+ } );
+
+
+ // Numeric sorting types - order doesn't matter here
+ _addNumericSort( '' );
+
+
+ $.extend( true, DataTable.ext.renderer, {
+ header: {
+ _: function ( settings, cell, column, classes ) {
+ // No additional mark-up required
+ // Attach a sort listener to update on sort - note that using the
+ // `DT` namespace will allow the event to be removed automatically
+ // on destroy, while the `dt` namespaced event is the one we are
+ // listening for
+ $(settings.nTable).on( 'order.dt.DT', function ( e, ctx, sorting, columns ) {
+ if ( settings !== ctx ) { // need to check this this is the host
+ return; // table, not a nested one
+ }
+
+ var colIdx = column.idx;
+
+ cell
+ .removeClass(
+ column.sSortingClass +' '+
+ classes.sSortAsc +' '+
+ classes.sSortDesc
+ )
+ .addClass( columns[ colIdx ] == 'asc' ?
+ classes.sSortAsc : columns[ colIdx ] == 'desc' ?
+ classes.sSortDesc :
+ column.sSortingClass
+ );
+ } );
+ },
+
+ jqueryui: function ( settings, cell, column, classes ) {
+ $('<div/>')
+ .addClass( classes.sSortJUIWrapper )
+ .append( cell.contents() )
+ .append( $('<span/>')
+ .addClass( classes.sSortIcon+' '+column.sSortingClassJUI )
+ )
+ .appendTo( cell );
+
+ // Attach a sort listener to update on sort
+ $(settings.nTable).on( 'order.dt.DT', function ( e, ctx, sorting, columns ) {
+ if ( settings !== ctx ) {
+ return;
+ }
+
+ var colIdx = column.idx;
+
+ cell
+ .removeClass( classes.sSortAsc +" "+classes.sSortDesc )
+ .addClass( columns[ colIdx ] == 'asc' ?
+ classes.sSortAsc : columns[ colIdx ] == 'desc' ?
+ classes.sSortDesc :
+ column.sSortingClass
+ );
+
+ cell
+ .find( 'span.'+classes.sSortIcon )
+ .removeClass(
+ classes.sSortJUIAsc +" "+
+ classes.sSortJUIDesc +" "+
+ classes.sSortJUI +" "+
+ classes.sSortJUIAscAllowed +" "+
+ classes.sSortJUIDescAllowed
+ )
+ .addClass( columns[ colIdx ] == 'asc' ?
+ classes.sSortJUIAsc : columns[ colIdx ] == 'desc' ?
+ classes.sSortJUIDesc :
+ column.sSortingClassJUI
+ );
+ } );
+ }
+ }
+ } );
+
+ /*
+ * Public helper functions. These aren't used internally by DataTables, or
+ * called by any of the options passed into DataTables, but they can be used
+ * externally by developers working with DataTables. They are helper functions
+ * to make working with DataTables a little bit easier.
+ */
+
+ /**
+ * Helpers for `columns.render`.
+ *
+ * The options defined here can be used with the `columns.render` initialisation
+ * option to provide a display renderer. The following functions are defined:
+ *
+ * * `number` - Will format numeric data (defined by `columns.data`) for
+ * display, retaining the original unformatted data for sorting and filtering.
+ * It takes 5 parameters:
+ * * `string` - Thousands grouping separator
+ * * `string` - Decimal point indicator
+ * * `integer` - Number of decimal points to show
+ * * `string` (optional) - Prefix.
+ * * `string` (optional) - Postfix (/suffix).
+ * * `text` - Escape HTML to help prevent XSS attacks. It has no optional
+ * parameters.
+ *
+ * @example
+ * // Column definition using the number renderer
+ * {
+ * data: "salary",
+ * render: $.fn.dataTable.render.number( '\'', '.', 0, '$' )
+ * }
+ *
+ * @namespace
+ */
+ DataTable.render = {
+ number: function ( thousands, decimal, precision, prefix, postfix ) {
+ return {
+ display: function ( d ) {
+ if ( typeof d !== 'number' && typeof d !== 'string' ) {
+ return d;
+ }
+
+ var negative = d < 0 ? '-' : '';
+ var flo = parseFloat( d );
+
+ // If NaN then there isn't much formatting that we can do - just
+ // return immediately
+ if ( isNaN( flo ) ) {
+ return d;
+ }
+
+ d = Math.abs( flo );
+
+ var intPart = parseInt( d, 10 );
+ var floatPart = precision ?
+ decimal+(d - intPart).toFixed( precision ).substring( 2 ):
+ '';
+
+ return negative + (prefix||'') +
+ intPart.toString().replace(
+ /\B(?=(\d{3})+(?!\d))/g, thousands
+ ) +
+ floatPart +
+ (postfix||'');
+ }
+ };
+ },
+
+ text: function () {
+ return {
+ display: function ( d ) {
+ return typeof d === 'string' ?
+ d.replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;') :
+ d;
+ }
+ };
+ }
+ };
+
+
+ /*
+ * This is really a good bit rubbish this method of exposing the internal methods
+ * publicly... - To be fixed in 2.0 using methods on the prototype
+ */
+
+
+ /**
+ * Create a wrapper function for exporting an internal functions to an external API.
+ * @param {string} fn API function name
+ * @returns {function} wrapped function
+ * @memberof DataTable#internal
+ */
+ function _fnExternApiFunc (fn)
+ {
+ return function() {
+ var args = [_fnSettingsFromNode( this[DataTable.ext.iApiIndex] )].concat(
+ Array.prototype.slice.call(arguments)
+ );
+ return DataTable.ext.internal[fn].apply( this, args );
+ };
+ }
+
+
+ /**
+ * Reference to internal functions for use by plug-in developers. Note that
+ * these methods are references to internal functions and are considered to be
+ * private. If you use these methods, be aware that they are liable to change
+ * between versions.
+ * @namespace
+ */
+ $.extend( DataTable.ext.internal, {
+ _fnExternApiFunc: _fnExternApiFunc,
+ _fnBuildAjax: _fnBuildAjax,
+ _fnAjaxUpdate: _fnAjaxUpdate,
+ _fnAjaxParameters: _fnAjaxParameters,
+ _fnAjaxUpdateDraw: _fnAjaxUpdateDraw,
+ _fnAjaxDataSrc: _fnAjaxDataSrc,
+ _fnAddColumn: _fnAddColumn,
+ _fnColumnOptions: _fnColumnOptions,
+ _fnAdjustColumnSizing: _fnAdjustColumnSizing,
+ _fnVisibleToColumnIndex: _fnVisibleToColumnIndex,
+ _fnColumnIndexToVisible: _fnColumnIndexToVisible,
+ _fnVisbleColumns: _fnVisbleColumns,
+ _fnGetColumns: _fnGetColumns,
+ _fnColumnTypes: _fnColumnTypes,
+ _fnApplyColumnDefs: _fnApplyColumnDefs,
+ _fnHungarianMap: _fnHungarianMap,
+ _fnCamelToHungarian: _fnCamelToHungarian,
+ _fnLanguageCompat: _fnLanguageCompat,
+ _fnBrowserDetect: _fnBrowserDetect,
+ _fnAddData: _fnAddData,
+ _fnAddTr: _fnAddTr,
+ _fnNodeToDataIndex: _fnNodeToDataIndex,
+ _fnNodeToColumnIndex: _fnNodeToColumnIndex,
+ _fnGetCellData: _fnGetCellData,
+ _fnSetCellData: _fnSetCellData,
+ _fnSplitObjNotation: _fnSplitObjNotation,
+ _fnGetObjectDataFn: _fnGetObjectDataFn,
+ _fnSetObjectDataFn: _fnSetObjectDataFn,
+ _fnGetDataMaster: _fnGetDataMaster,
+ _fnClearTable: _fnClearTable,
+ _fnDeleteIndex: _fnDeleteIndex,
+ _fnInvalidate: _fnInvalidate,
+ _fnGetRowElements: _fnGetRowElements,
+ _fnCreateTr: _fnCreateTr,
+ _fnBuildHead: _fnBuildHead,
+ _fnDrawHead: _fnDrawHead,
+ _fnDraw: _fnDraw,
+ _fnReDraw: _fnReDraw,
+ _fnAddOptionsHtml: _fnAddOptionsHtml,
+ _fnDetectHeader: _fnDetectHeader,
+ _fnGetUniqueThs: _fnGetUniqueThs,
+ _fnFeatureHtmlFilter: _fnFeatureHtmlFilter,
+ _fnFilterComplete: _fnFilterComplete,
+ _fnFilterCustom: _fnFilterCustom,
+ _fnFilterColumn: _fnFilterColumn,
+ _fnFilter: _fnFilter,
+ _fnFilterCreateSearch: _fnFilterCreateSearch,
+ _fnEscapeRegex: _fnEscapeRegex,
+ _fnFilterData: _fnFilterData,
+ _fnFeatureHtmlInfo: _fnFeatureHtmlInfo,
+ _fnUpdateInfo: _fnUpdateInfo,
+ _fnInfoMacros: _fnInfoMacros,
+ _fnInitialise: _fnInitialise,
+ _fnInitComplete: _fnInitComplete,
+ _fnLengthChange: _fnLengthChange,
+ _fnFeatureHtmlLength: _fnFeatureHtmlLength,
+ _fnFeatureHtmlPaginate: _fnFeatureHtmlPaginate,
+ _fnPageChange: _fnPageChange,
+ _fnFeatureHtmlProcessing: _fnFeatureHtmlProcessing,
+ _fnProcessingDisplay: _fnProcessingDisplay,
+ _fnFeatureHtmlTable: _fnFeatureHtmlTable,
+ _fnScrollDraw: _fnScrollDraw,
+ _fnApplyToChildren: _fnApplyToChildren,
+ _fnCalculateColumnWidths: _fnCalculateColumnWidths,
+ _fnThrottle: _fnThrottle,
+ _fnConvertToWidth: _fnConvertToWidth,
+ _fnGetWidestNode: _fnGetWidestNode,
+ _fnGetMaxLenString: _fnGetMaxLenString,
+ _fnStringToCss: _fnStringToCss,
+ _fnSortFlatten: _fnSortFlatten,
+ _fnSort: _fnSort,
+ _fnSortAria: _fnSortAria,
+ _fnSortListener: _fnSortListener,
+ _fnSortAttachListener: _fnSortAttachListener,
+ _fnSortingClasses: _fnSortingClasses,
+ _fnSortData: _fnSortData,
+ _fnSaveState: _fnSaveState,
+ _fnLoadState: _fnLoadState,
+ _fnSettingsFromNode: _fnSettingsFromNode,
+ _fnLog: _fnLog,
+ _fnMap: _fnMap,
+ _fnBindAction: _fnBindAction,
+ _fnCallbackReg: _fnCallbackReg,
+ _fnCallbackFire: _fnCallbackFire,
+ _fnLengthOverflow: _fnLengthOverflow,
+ _fnRenderer: _fnRenderer,
+ _fnDataSource: _fnDataSource,
+ _fnRowAttributes: _fnRowAttributes,
+ _fnCalculateEnd: function () {} // Used by a lot of plug-ins, but redundant
+ // in 1.10, so this dead-end function is
+ // added to prevent errors
+ } );
+
+
+ // jQuery access
+ $.fn.dataTable = DataTable;
+
+ // Provide access to the host jQuery object (circular reference)
+ DataTable.$ = $;
+
+ // Legacy aliases
+ $.fn.dataTableSettings = DataTable.settings;
+ $.fn.dataTableExt = DataTable.ext;
+
+ // With a capital `D` we return a DataTables API instance rather than a
+ // jQuery object
+ $.fn.DataTable = function ( opts ) {
+ return $(this).dataTable( opts ).api();
+ };
+
+ // All properties that are available to $.fn.dataTable should also be
+ // available on $.fn.DataTable
+ $.each( DataTable, function ( prop, val ) {
+ $.fn.DataTable[ prop ] = val;
+ } );
+
+
+ // Information about events fired by DataTables - for documentation.
+ /**
+ * Draw event, fired whenever the table is redrawn on the page, at the same
+ * point as fnDrawCallback. This may be useful for binding events or
+ * performing calculations when the table is altered at all.
+ * @name DataTable#draw.dt
+ * @event
+ * @param {event} e jQuery event object
+ * @param {object} o DataTables settings object {@link DataTable.models.oSettings}
+ */
+
+ /**
+ * Search event, fired when the searching applied to the table (using the
+ * built-in global search, or column filters) is altered.
+ * @name DataTable#search.dt
+ * @event
+ * @param {event} e jQuery event object
+ * @param {object} o DataTables settings object {@link DataTable.models.oSettings}
+ */
+
+ /**
+ * Page change event, fired when the paging of the table is altered.
+ * @name DataTable#page.dt
+ * @event
+ * @param {event} e jQuery event object
+ * @param {object} o DataTables settings object {@link DataTable.models.oSettings}
+ */
+
+ /**
+ * Order event, fired when the ordering applied to the table is altered.
+ * @name DataTable#order.dt
+ * @event
+ * @param {event} e jQuery event object
+ * @param {object} o DataTables settings object {@link DataTable.models.oSettings}
+ */
+
+ /**
+ * DataTables initialisation complete event, fired when the table is fully
+ * drawn, including Ajax data loaded, if Ajax data is required.
+ * @name DataTable#init.dt
+ * @event
+ * @param {event} e jQuery event object
+ * @param {object} oSettings DataTables settings object
+ * @param {object} json The JSON object request from the server - only
+ * present if client-side Ajax sourced data is used</li></ol>
+ */
+
+ /**
+ * State save event, fired when the table has changed state a new state save
+ * is required. This event allows modification of the state saving object
+ * prior to actually doing the save, including addition or other state
+ * properties (for plug-ins) or modification of a DataTables core property.
+ * @name DataTable#stateSaveParams.dt
+ * @event
+ * @param {event} e jQuery event object
+ * @param {object} oSettings DataTables settings object
+ * @param {object} json The state information to be saved
+ */
+
+ /**
+ * State load event, fired when the table is loading state from the stored
+ * data, but prior to the settings object being modified by the saved state
+ * - allowing modification of the saved state is required or loading of
+ * state for a plug-in.
+ * @name DataTable#stateLoadParams.dt
+ * @event
+ * @param {event} e jQuery event object
+ * @param {object} oSettings DataTables settings object
+ * @param {object} json The saved state information
+ */
+
+ /**
+ * State loaded event, fired when state has been loaded from stored data and
+ * the settings object has been modified by the loaded data.
+ * @name DataTable#stateLoaded.dt
+ * @event
+ * @param {event} e jQuery event object
+ * @param {object} oSettings DataTables settings object
+ * @param {object} json The saved state information
+ */
+
+ /**
+ * Processing event, fired when DataTables is doing some kind of processing
+ * (be it, order, searcg or anything else). It can be used to indicate to
+ * the end user that there is something happening, or that something has
+ * finished.
+ * @name DataTable#processing.dt
+ * @event
+ * @param {event} e jQuery event object
+ * @param {object} oSettings DataTables settings object
+ * @param {boolean} bShow Flag for if DataTables is doing processing or not
+ */
+
+ /**
+ * Ajax (XHR) event, fired whenever an Ajax request is completed from a
+ * request to made to the server for new data. This event is called before
+ * DataTables processed the returned data, so it can also be used to pre-
+ * process the data returned from the server, if needed.
+ *
+ * Note that this trigger is called in `fnServerData`, if you override
+ * `fnServerData` and which to use this event, you need to trigger it in you
+ * success function.
+ * @name DataTable#xhr.dt
+ * @event
+ * @param {event} e jQuery event object
+ * @param {object} o DataTables settings object {@link DataTable.models.oSettings}
+ * @param {object} json JSON returned from the server
+ *
+ * @example
+ * // Use a custom property returned from the server in another DOM element
+ * $('#table').dataTable().on('xhr.dt', function (e, settings, json) {
+ * $('#status').html( json.status );
+ * } );
+ *
+ * @example
+ * // Pre-process the data returned from the server
+ * $('#table').dataTable().on('xhr.dt', function (e, settings, json) {
+ * for ( var i=0, ien=json.aaData.length ; i<ien ; i++ ) {
+ * json.aaData[i].sum = json.aaData[i].one + json.aaData[i].two;
+ * }
+ * // Note no return - manipulate the data directly in the JSON object.
+ * } );
+ */
+
+ /**
+ * Destroy event, fired when the DataTable is destroyed by calling fnDestroy
+ * or passing the bDestroy:true parameter in the initialisation object. This
+ * can be used to remove bound events, added DOM nodes, etc.
+ * @name DataTable#destroy.dt
+ * @event
+ * @param {event} e jQuery event object
+ * @param {object} o DataTables settings object {@link DataTable.models.oSettings}
+ */
+
+ /**
+ * Page length change event, fired when number of records to show on each
+ * page (the length) is changed.
+ * @name DataTable#length.dt
+ * @event
+ * @param {event} e jQuery event object
+ * @param {object} o DataTables settings object {@link DataTable.models.oSettings}
+ * @param {integer} len New length
+ */
+
+ /**
+ * Column sizing has changed.
+ * @name DataTable#column-sizing.dt
+ * @event
+ * @param {event} e jQuery event object
+ * @param {object} o DataTables settings object {@link DataTable.models.oSettings}
+ */
+
+ /**
+ * Column visibility has changed.
+ * @name DataTable#column-visibility.dt
+ * @event
+ * @param {event} e jQuery event object
+ * @param {object} o DataTables settings object {@link DataTable.models.oSettings}
+ * @param {int} column Column index
+ * @param {bool} vis `false` if column now hidden, or `true` if visible
+ */
+
+ return $.fn.dataTable;
+})); \ No newline at end of file
diff --git a/op25/gr-op25_repeater/apps/oplog/op25/static/js/op25.js b/op25/gr-op25_repeater/apps/oplog/op25/static/js/op25.js
new file mode 100644
index 0000000..8a6faf3
--- /dev/null
+++ b/op25/gr-op25_repeater/apps/oplog/op25/static/js/op25.js
@@ -0,0 +1,227 @@
+// Copyright 2017, 2018, 2019, 2020, 2021 Max H. Parke KA1RBI
+//
+// This file is part of OP25
+//
+// OP25 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 3, or (at your option)
+// any later version.
+//
+// OP25 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 OP25; see the file COPYING. If not, write to the Free
+// Software Foundation, Inc., 51 Franklin Street, Boston, MA
+// 02110-1301, USA.
+//
+// OP25 Logs
+
+$(window).load(function() {
+ $('#loading').hide();
+});
+
+$(document).ready(function() {
+ $('#startDate').val(localStorage.logStart);
+ $('#endDate').val(localStorage.logEnd);
+ randCss(); // force css reload each time for dev
+ $('#records').text(comma(parseInt(($('#records').text()))));
+ $('#systems').text(comma(parseInt(($('#systems').text()))));
+ $('#talkgroups').text(comma(parseInt(($('#talkgroups').text()))));
+ $('#subs').text(comma(parseInt(($('#subs').text()))));
+ if (localStorage.systemSelect) {
+ $('#systemSelect').val(localStorage.systemSelect);
+ }
+ if (localStorage.systemSelect4) {
+ $('#systemSelect4').val(localStorage.systemSelect4);
+ }
+});
+
+$(window).load(function() {
+ $('#loading').hide();
+});
+
+function resetDates() {
+ $('#startDate').val('');
+ $('#endDate').val('');
+ $('#systemSelect').val('0');
+ window.localStorage.removeItem('logStart');
+ window.localStorage.removeItem('logEnd');
+ window.localStorage.removeItem('systemSelect');
+}
+
+$('#navSelect').change(function(){
+ console.log("shit");
+ var ns = $('#navSelect').val();
+ if (ns == '0')
+ return;
+ console.log(ns);
+ load_new_page1(ns);
+});
+
+// forces css to reload - helpful during dev
+function randCss() {
+ var h, a, f;
+ a = document.getElementsByTagName('link');
+ for (h = 0; h < a.length; h++) {
+ f = a[h];
+ if (f.rel.toLowerCase().match(/stylesheet/) && f.href) {
+ var g = f.href.replace(/(&|\?)rnd=\d+/, '');
+ f.href = g + (g.match(/\?/) ? '&' : '?');
+ f.href += 'rnd=' + (new Date().valueOf());
+ }
+ }
+}
+
+
+function load_new_page1(request,param) {
+ var v1 = $('#resource_id').val();
+ tgid = $('#cc_filter_tgid').val();
+ suid = $('#cc_filter_suid').val();
+ tgid = (Number.isInteger(parseInt(tgid)) == true) ? parseInt(tgid) : 0;
+ suid = (Number.isInteger(parseInt(suid)) == true) ? parseInt(suid) : 0;
+ load_new_page('/logs', 'q=' + v1 + '&r=' + request + '&p=' + param + '&tgid=' + tgid + '&suid=' + suid);
+}
+
+
+//SUID and TGID 'specified' buttons!
+function load_new_page0(request) {
+ var v1 = $('#resource_id').val();
+ var sysid = $('#systemSelect').val();
+ if (v1 == '') {
+ alert("Subscriber unit ID or talkgroup ID is required!");
+ return;
+ }
+ if (v1.split('-').length > 2) {
+ alert("Too many values for a range.");
+ return;
+ }
+
+ load_new_page('/logs', 'q=' + v1 + '&r=' + request + '&sysid=' + sysid);
+}
+
+function load_new_page(url, arg) {
+ var u = url;
+ if (arg)
+ u = u + "?" + arg;
+ window.open(u, "_self", "resizable,location,menubar,toolbar,scrollbars,status")
+}
+
+function sdate() {
+ var s = $('#startDate').val() ? new Date($('#startDate').val()) : new Date("2001/01/01 01:00");
+ var stime = s.getTime() / 1000;
+ return stime | 0;
+}
+
+function edate() {
+ var e = $('#endDate').val() ? new Date($('#endDate').val()) : new Date();
+ var etime = e.getTime() / 1000;
+ return etime | 0;
+}
+
+function comma(x) {
+ // add comma formatting to whatever you give it (xx,xxxx,xxxx)
+ return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',');
+}
+
+function doPurge(sim) {
+ var kv = $('#keepVoice').prop('checked');
+ var bu = $('#createBackup').prop('checked');
+ if ($('#startDate').val() == '' || $('#endDate').val() == '') {
+ alert('Start date and end date are required.');
+ return;
+ }
+ var sd = sdate();
+ var ed = edate();
+ var sysid = $('#systemSelect').val();
+ window.location.href='/purge?action=purge&sd=' + sd + '&ed=' + ed + '&sysid=' + sysid + '&simulate=' + sim + '&kv=' + kv + '&bu=' + bu;
+
+}
+
+function addNewSystemTag() {
+ if ($('#newSysId').val() == '' || $('#newSysTag').val() == '') {
+ alert('System ID (dec) and System Tag are required.');
+ return;
+ }
+ var hexId = $('#newSysId').val();
+ var newId = parseInt(dec(hexId));
+ var newTag = $('#newSysTag').val()
+ if (! Number.isInteger(newId)) {
+ alert('Invalid system ID.');
+ return;
+ }
+ window.location.href='/asd?id=' + newId + '&tag=' + newTag;
+}
+
+function importTalkgroupTsv(cmd) {
+ $('#impProc').show()
+ if ($('#selTsv').val() == '0' || $('#systemSelect2').val() == '0') {
+ alert('TSV file selection and System selection are required.');
+ $('#impProc').hide()
+ return;
+ }
+
+ if ($('#invtsv').length){
+ $('#impProc').hide()
+ alert('The TSV is invalid!');
+ return;
+ }
+
+ var sysid = $('#systemSelect2').val();
+ var tsvfile = $('#selTsv').val();
+ window.location.href='/itt?sysid=' + sysid + '&file=' + tsvfile + '&cmd=' + cmd;
+}
+
+function deleteTags(cmd) {
+ if ($('#systemSelect3').val() == '0') {
+ alert('System selection is required.');
+ return;
+ }
+ sysid = $('#systemSelect3').val();
+ window.location.href='/delTags?sysid=' + sysid + '&cmd=' + cmd;
+}
+
+function hex(dec) {
+ if (!dec) return;
+ return dec.toString(16);
+}
+
+function dec(hex) {
+ if (!hex) return;
+ return parseInt(hex, 16);
+}
+
+function csvTable(table_id, separator = ',') { // Quick and simple export target #table_id into a csv
+ var rows = document.querySelectorAll('table#' + table_id + ' tr');
+ // Construct csv
+ var csv = [];
+ for (var i = 0; i < rows.length; i++) {
+ var row = [],
+ cols = rows[i].querySelectorAll('td, th');
+ for (var j = 0; j < cols.length; j++) {
+ // Clean innertext to remove multiple spaces and jumpline (break csv)
+ var data = cols[j].innerText.replace(/(\r\n|\n|\r)/gm, '').replace(/(\s\s)/gm, ' ');
+ // Escape double-quote with double-double-quote
+ data = data.replace(/"/g, '""');
+ // Push escaped string
+ row.push('"' + data + '"');
+ }
+ csv.push(row.join(separator));
+ }
+ var csv_string = csv.join('\n');
+ // Download it
+ var filename = 'export_' + table_id + '_' + new Date().toLocaleDateString() + '.csv';
+ var link = document.createElement('a');
+ link.style.display = 'none';
+ link.setAttribute('target', '_blank');
+ link.setAttribute('href', 'data:text/csv;charset=utf-8,' + encodeURIComponent(csv_string));
+ link.setAttribute('download', filename);
+ document.body.appendChild(link);
+ link.click();
+ document.body.removeChild(link);
+}
+
+
+
diff --git a/op25/gr-op25_repeater/apps/oplog/op25/static/loading.gif b/op25/gr-op25_repeater/apps/oplog/op25/static/loading.gif
new file mode 100644
index 0000000..c1d8473
--- /dev/null
+++ b/op25/gr-op25_repeater/apps/oplog/op25/static/loading.gif
Binary files differ
diff --git a/op25/gr-op25_repeater/apps/oplog/op25/static/op25-dark-h.png b/op25/gr-op25_repeater/apps/oplog/op25/static/op25-dark-h.png
new file mode 100644
index 0000000..73d771a
--- /dev/null
+++ b/op25/gr-op25_repeater/apps/oplog/op25/static/op25-dark-h.png
Binary files differ
diff --git a/op25/gr-op25_repeater/apps/oplog/op25/static/op25-dark.png b/op25/gr-op25_repeater/apps/oplog/op25/static/op25-dark.png
new file mode 100644
index 0000000..4847302
--- /dev/null
+++ b/op25/gr-op25_repeater/apps/oplog/op25/static/op25-dark.png
Binary files differ
diff --git a/op25/gr-op25_repeater/apps/oplog/op25/static/op25.png b/op25/gr-op25_repeater/apps/oplog/op25/static/op25.png
new file mode 100644
index 0000000..a549857
--- /dev/null
+++ b/op25/gr-op25_repeater/apps/oplog/op25/static/op25.png
Binary files differ
diff --git a/op25/gr-op25_repeater/apps/oplog/op25/templates/about.html b/op25/gr-op25_repeater/apps/oplog/op25/templates/about.html
new file mode 100644
index 0000000..88d0878
--- /dev/null
+++ b/op25/gr-op25_repeater/apps/oplog/op25/templates/about.html
@@ -0,0 +1,144 @@
+<!--
+ Copyright 2017, 2018 Max H. Parke KA1RBI
+ Copyright 2020, 2021 Michael Rose
+
+ This file is part of OP25
+
+ OP25 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 3, or (at your option)
+ any later version.
+
+ OP25 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 OP25; see the file COPYING. If not, write to the Free
+ Software Foundation, Inc., 51 Franklin Street, Boston, MA
+ 02110-1301, USA.
+
+ -->
+
+{% include 'base.html' %}
+{% block extra_stylesheets %}
+<link href="static/css/datatables/jquery.dataTables-dark.css" rel="stylesheet">
+{% endblock %}
+
+{% block content %}
+
+<div class="row-main">
+ <div class="side">
+ &nbsp;
+ </div> <!-- end side -->
+
+ <div class="main">
+
+ <div class="card mb-3 border-primary">
+ <h4 class="card-header">About OP25 Logs</h4>
+ <div class="card-body">
+ <p class="card-text">
+
+ <div align="center">
+ <div class="card border-secondary mb-3" style="max-width: 40rem; text-align: left;">
+ <div class="card-body">
+ <p class="card-text">
+ OP25 Logs (aka Oplog) is the OP25 sqlite3 logs database viewer.
+ </p>
+
+ <p class="card-text">
+ Copyright &copy; 2020, 2021 Max H. Parke KA1RBI<br>
+ Copyright &copy; 2020, 2021 Michael Rose
+ </p>
+ <p class="card-text">
+ OP25 Logs 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 3, or (at your option)
+ any later version.
+ </p>
+ <p class="card-text">
+ OP25 Logs 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.
+ </p>
+ </div>
+ </div>
+ </div>
+ </div>
+</div>
+{% include 'footer-links.html' %}
+</div> <!-- end main -->
+
+ <div class="side">
+ &nbsp;
+ </div>
+</div> <!-- end row -->
+
+<!-- end secondary -->
+</div>
+<!-- end content -->
+
+
+</div>
+<br>
+
+{% endblock %}
+
+<!-- js moved to op25.js -->
+
+{% block extra_javascripts %}
+<script src="static/js/datatables/jquery.dataTables.js"></script>
+<script>
+ $(document).ready(function () {
+ $('#startDate').prop('disabled', true );
+ $('#endDate').prop('disabled', true );
+ $('#op25_esd').DataTable({
+ "processing": true,
+ "serverSide": true,
+ 'bFilter': false,
+ 'paging': false,
+ "ajax": '/esd',
+ "columns": [
+ null,
+ {
+ "data": [1],
+ "render": function(data, type, row, meta){
+ if(type === 'display'){
+ data = data + ' - ' + hex(data).toUpperCase();
+ }
+ return data;
+ }
+ },
+ null,
+
+ {
+ "data": [3],
+ "render": function(data, type, row, meta){
+ if(type === 'display'){
+ data = '<button type="button" class="btn btn-primary btn-sm" onclick="this.blur(); editTagName(' + data + ', \'' + row[2] + '\')">Edit Tag</button>&nbsp;\
+ <button type="button" class="btn btn-primary btn-sm" onclick="window.location.href=\'\/dsd?id=' + data + '\'">Delete</button>';
+
+ }
+ return data;
+ },
+ "width": "150px"
+ }
+ ]
+
+ });
+ });
+
+function editTagName(id, t) {
+ var tag = prompt("Enter new system tag:", t);
+ if (tag == null || tag == '') {
+ return;
+ }
+ window.location.href='/usd?id=' + id + '&tag=' + tag;
+
+}
+</script>
+
+
+{% endblock %}
diff --git a/op25/gr-op25_repeater/apps/oplog/op25/templates/base.html b/op25/gr-op25_repeater/apps/oplog/op25/templates/base.html
new file mode 100644
index 0000000..257318b
--- /dev/null
+++ b/op25/gr-op25_repeater/apps/oplog/op25/templates/base.html
@@ -0,0 +1,167 @@
+<!--
+ Copyright 2017, 2018 Max H. Parke KA1RBI
+ Copyright 2020, 2021 Michael Rose
+
+ This file is part of OP25
+
+ OP25 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 3, or (at your option)
+ any later version.
+
+ OP25 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 OP25; see the file COPYING. If not, write to the Free
+ Software Foundation, Inc., 51 Franklin Street, Boston, MA
+ 02110-1301, USA.
+
+-->
+
+<!DOCTYPE html>
+<html lang="{{ request.locale_name }}">
+ <head>
+ <meta charset="utf-8">
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="pyramid web application">
+ <meta name="author" content="Pylons Project">
+ <title>OP25 - Logs</title>
+ <link rel="shortcut icon" href="{{ url_for('static', filename='favicon.ico') }}">
+ <link rel="stylesheet" type="text/css" href="static/css/op25.css">
+ <link href="static/css/bootstrap/bootstrap-darkly.css" rel="stylesheet">
+ <link rel="stylesheet" type="text/css" href="static/dtpick/jquery.datetimepicker.css">
+ <style>
+ </style>
+ {% block extra_stylesheets %} {% endblock %}
+ <script src="static/jquery/jquery-2.2.4.min.js"></script>
+ <script src="static/js/bootstrap/bootstrap.bundle.min.js"></script>
+ <script src="static/dtpick/dtpick2.js"></script>
+ <script src="static/js/op25.js"></script>
+ </head>
+
+<body>
+ <div class="card text-white bg-primary mb-3">
+ <div class="card-body">
+ <table style="width: 100%;">
+ <tr>
+ <td>
+ <a style="width: 200px;" class="nav-link dropdown-toggle navbar-brand text-white" data-bs-toggle="dropdown" href="#" role="button" aria-haspopup="true" aria-expanded="false"><b>OP25 - Logs</b></a>
+ <div class="dropdown-menu">
+ <a class="dropdown-item" href="{{ url_for('home') }}">Home</a>
+ <div class="dropdown-divider"></div>
+ <a class="dropdown-item" href="{{ url_for('logs') }}?r=total_tgid">Total Talkgroup Voice Activity</a>
+ <a class="dropdown-item" href="{{ url_for('logs') }}?r=call_detail">Call Detail</a>
+ <a class="dropdown-item" href="{{ url_for('logs') }}?r=joins">Join Activity</a>
+ <div class="dropdown-divider"></div>
+ {% for s in params['ekeys'] %}
+ <a class="dropdown-item" href="#" onclick="javascript:load_new_page1('cc_event', '{{ s }}');"> {{ s|replace("_", " ") }}</a> {% endfor %}
+ <div class="dropdown-divider"></div>
+ <a class="dropdown-item" href="{{ url_for('editsys') }}">Edit System Tags</a>
+ <a class="dropdown-item" href="{{ url_for('edit_tags') }}?cmd=tgid">Update Talkgroup Tags</a>
+ <a class="dropdown-item" href="{{ url_for('edit_tags') }}?cmd=unit">Update Subscriber Tags</a>
+ <a class="dropdown-item" href="{{ url_for('switch_db') }}">Backup & Switch Database</a>
+ <a class="dropdown-item text-danger" href="{{ url_for('purge') }}">Purge Database</a>
+ <div class="dropdown-divider"></div>
+ <a class="dropdown-item" href="{{ url_for('about') }}">About</a>
+ </div>
+ </td>
+ <td>
+ <div style="float: right;">
+ <b>System</b>
+ <select id="systemSelect" style="">
+ <option value="0" selected>All</option>
+ </select>
+ &nbsp;&nbsp;&nbsp;&nbsp;
+ <span>Start <input class="sel-date" type="text" id="startDate"></span>
+ <span>End <input class="sel-date" type="text" id="endDate">&nbsp;&nbsp;&nbsp;</span>
+ <button style="width: 75px;" class="btn btn-info btn-sm" id="btnReset" onclick="location.reload();">Refresh</button>&nbsp;&nbsp;
+ <button style="width: 75px;" class="btn btn-info btn-sm" id="btnClear" onclick="resetDates();">Clear</button>
+ </div>
+ </td>
+ </tr>
+ </table>
+ </div>
+ </div>
+
+ <div class="container" style="margin-top: 0px; margin-bottom: 15px;">
+ <div align="center">
+ <a href="/"><img src="static/op25-dark-h.png" title="OP25"></a>
+ </div>
+ {% block content %} {% endblock %}
+ </div>
+
+ {% block extra_javascripts %}
+
+ <script>
+ $('#startDate').datetimepicker({
+ inline:false,
+ });
+
+ $('#endDate').datetimepicker({
+ inline:false,
+ });
+
+ $('#startDate').change( function(){
+ localStorage.logStart = $('#startDate').val();
+ });
+
+ $('#endDate').change( function(){
+ localStorage.logEnd = $('#endDate').val();
+ });
+
+ {% if sysList is not none %}
+ {% for i in sysList %}
+ {% if i.tag is not none %}
+ $('#systemSelect').append(new Option('{{ i.tag }} - {{ i.sysid }} - 0x{{ ( '%0x' % i.sysid ).upper() }}', '{{ i.sysid }}'));
+ {% else %}
+ $('#systemSelect').append(new Option('{{ i.sysid }} - 0x{{ ( '%0x' % i.sysid ).upper() }}', '{{ i.sysid }}'));
+ {% endif %}
+ {% endfor %}
+ {% endif %}
+
+ $('#systemSelect').change( function(){
+ localStorage.systemSelect = $('#systemSelect').val();
+ });
+
+ $('#navSelect').append(new Option('Home', '4'));
+ $('#navSelect').append(new Option('Total Talkgroup Voice Activity', '1'));
+ $('#navSelect').append(new Option('Call Detail', '2'));
+ $('#navSelect').append(new Option('Join Activity', '3'));
+
+ {% for s in params['ekeys'] %}
+ $('#navSelect').append(new Option( '{{ s }}', '{{ s }}' ));
+ {% endfor %}
+
+ // pretty sure this is not used anymore 7/2
+ $('#navSelect').change(function(){
+ var ns = $('#navSelect').val();
+ if (ns == '0')
+ return;
+ if (ns == '1') {
+ window.location.href='/logs?r=total_tgid';
+ return;
+ }
+ if (ns == '2'){
+ window.location.href='/logs?r=call_detail';
+ return;
+ }
+ if (ns == '3'){
+ window.location.href='/logs?r=joins';
+ return;
+ }
+ if (ns == '4'){
+ window.location.href='/';
+ return;
+ }
+ load_new_page1('cc_event', ns);
+ });
+ </script>
+
+ {% endblock %}
+
+ </body>
+</html> \ No newline at end of file
diff --git a/op25/gr-op25_repeater/apps/oplog/op25/templates/dbstats.html b/op25/gr-op25_repeater/apps/oplog/op25/templates/dbstats.html
new file mode 100644
index 0000000..4f4ee2d
--- /dev/null
+++ b/op25/gr-op25_repeater/apps/oplog/op25/templates/dbstats.html
@@ -0,0 +1,53 @@
+ <div class="card mb-3 border-primary">
+ <h4 class="card-header">Database Statistics</h4>
+ <div class="card-body">
+ <div class="card mb-3 bg-dark border-primary">
+ <table border="0" style="width: 100%;" class="border-primary">
+ <tr>
+ <td style="vertical-align: top; padding: 0px;">
+ <div class="card mb-3 bg-dark border-dark">
+ <span class="card-header">Records</span>
+ <div class="card-body">
+ <table style="padding: 5px; width: 100%; border="0">
+ <tr><td>Total Records: <b><span id="records">{{ dbstats[0] }}</span></b>
+ &nbsp;&nbsp;&nbsp;&nbsp;
+ Talkgroups: <b><span id="talkgroups">{{ dbstats[2] }}</span></b>
+ &nbsp;&nbsp;&nbsp;&nbsp;
+ Subscribers: <b><span id="subs">{{ dbstats[3] }}</span></b>
+ </td></tr>
+ <tr>
+ <td>First: <b><span id="firstDate"> {{ dbstats[4] }} </b></span></td>
+ </tr><tr>
+ <td>Last: <b><span id="lastDate"> {{ dbstats[5] }} </b></span></td>
+ </tr><tr>
+ <td>Database Size: <b><span id="dbSize"> {{ dbstats[6] }} </b></span></td>
+ </tr><tr>
+ {% set fn = dbstats[7].split('/') %}
+ <td>Database File: <b><span id="dbFile"> {{ fn|last }} </b> <a href="#" title=" {{ dbstats[7] }}">?</a></span></td>
+ </tr>
+ </table>
+ </div>
+ </div>
+ </td>
+ <td style="vertical-align: top; padding: 0px;">
+ <div class="card mb-3 bg-dark border-dark">
+ <span class="card-header">Logged Systems: <b><span id="systems">{{ dbstats[1] }}</span></b><br></span>
+ <div class="card-body">
+ <table style="padding: 5px; width: 100%;" class="table table-hover">
+ {% for i in sysList %}
+ <tr>
+ {% if i.tag is not none %}
+ <td style="padding: 2px;"> {{ i.sysid }} </td><td style="padding: 2px;"> 0x{{ ( '%0x' % i.sysid ).upper() }} </td><td style="padding: 2px;"> {{ i.tag }} </td>
+ {% else %}
+ <td style="padding: 2px;"> {{ i.sysid }}</td><td style="padding: 2px;"> 0x{{ ( '%0x' % i.sysid ).upper() }} </td><td style="padding: 2px;"> &mdash; </td>
+ {% endif %}
+ </tr>
+ {% endfor %}
+ </table>
+ </div>
+ </div>
+ </td></tr></table>
+ </div>
+ </div>
+ </div>
+ \ No newline at end of file
diff --git a/op25/gr-op25_repeater/apps/oplog/op25/templates/edit_tags.html b/op25/gr-op25_repeater/apps/oplog/op25/templates/edit_tags.html
new file mode 100644
index 0000000..5045916
--- /dev/null
+++ b/op25/gr-op25_repeater/apps/oplog/op25/templates/edit_tags.html
@@ -0,0 +1,293 @@
+<!--
+ Copyright 2017, 2018 Max H. Parke KA1RBI
+ Copyright 2020, 2021 Michael Rose
+
+ This file is part of OP25
+
+ OP25 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 3, or (at your option)
+ any later version.
+
+ OP25 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 OP25; see the file COPYING. If not, write to the Free
+ Software Foundation, Inc., 51 Franklin Street, Boston, MA
+ 02110-1301, USA.
+
+ -->
+
+{% include 'base.html' %}
+{% block extra_stylesheets %}
+<link href="static/css/datatables/jquery.dataTables-dark.css" rel="stylesheet">
+{% endblock %}
+
+{% block content %}
+
+<div class="row-main">
+ <div class="side">
+ &nbsp;
+ </div> <!-- end side -->
+
+ <div class="main">
+ <div class="card mb-3 border-primary">
+ {% if cmd == 'tgid' %}
+ <h4 class="card-header">Talkgroup Tags</h4>
+ {% elif cmd == 'unit' %}
+ <h4 class="card-header">Subscriber Tags</h4>
+ {% endif %}
+ <div class="card-body">
+
+ <div class="card mb-3 border-secondary">
+ <h5 class="card-header">Import Tool</h4>
+ <div class="card-body">
+ <p class="card-text">
+ This tool imports tags from the selected TSV and associates them with the
+ selected system. Existing System ID and Talkgroup or Subscriber ID combinations will be overwritten by the tag values in the TSV file.
+ To add new tags: Add in OP25 Web UI, then import them here. Wildcard entries are not imported.
+ </p>
+<label for="selTsv">Choose TSV file:</label>
+ <select name="selTsv" id="selTsv">
+ <option value='0' >Select...</option>
+ {% for i in tsvs %}
+ {% if '.tsv' in i and '._' not in i %}
+ <option value="{{ i.split('/../')[-1] }}">{{ i.split('/../')[-1] }}</option>
+ {% endif %}
+ {% endfor %}
+ </select>
+&nbsp;&nbsp;&nbsp;
+<label for="systemSelect2">Choose System: </label>
+<select id="systemSelect2">
+<option value="0" selected>Select...</option>
+</select>
+<br><br>
+
+<button class="btn btn-primary" onclick="this.blur(); inspectTsv();">Inspect TSV</button>
+<br>
+<div id="inspect" style="display: none;">
+ <br>
+ <div id="inspectText" style="width: 100%; height: 225px; overflow: auto;"></div>
+ <br>
+ <button class="btn btn-primary" onclick="this.blur(); importTalkgroupTsv('{{ cmd }}');">Import TSV</button>
+ &nbsp;&nbsp;<img id="impProc" src="static/loading.gif" style="height: 20px; display: none;" alt="loading">
+</div>
+
+ {% if session['sm'] == 3 %}
+ <br>
+ <div class="alert alert-dismissible alert-success">
+ <button type="button" class="btn-close" data-bs-dismiss="alert"></button>
+ <strong>Import completed.</strong><br><br>
+ Existing records updated:<b> {{ session['imp_results'][0] }}</b> &nbsp;&nbsp;&nbsp;&nbsp;
+ New records added:<b> {{ session['imp_results'][1] }} </b> &nbsp;&nbsp;&nbsp;&nbsp;
+ Duplicate records corrected:<b> {{ session['imp_results'][2] }} </b>
+ </div>
+ {{ clear_sm() }}
+ {% endif %}
+
+ {% if session['sm'] == 4 %}
+ <br>
+ <div class="alert alert-dismissible alert-primary">
+ <button type="button" class="btn-close" data-bs-dismiss="alert"></button>
+ <strong>Tags deleted.</strong><br><br>
+ </div>
+ {{ clear_sm() }}
+ {% endif %}
+
+</div>
+</div>
+<hr>
+
+<div class="card mb-3 border-secondary">
+ <h5 class="card-header">Editor</h4>
+ <div class="card-body">
+<div align="right">
+ <label for="systemSelect4">Filter by system: </label>
+<select id="systemSelect4">
+<option value="0" selected>All</option>
+</select><br><br>
+<button style="width: 75px;" class="btn btn-primary btn-sm" id="applyFilter" onclick="location.reload();">Apply</button>
+<br><br></div>
+
+ {% if session['sm'] == 1 %}
+ <div class="alert alert-dismissible alert-success">
+ <button type="button" class="btn-close" data-bs-dismiss="alert"></button>
+ <strong>Edit completed.</strong>
+ </div>
+ {{ clear_sm() }}
+ {% endif %}
+
+ {% if session['sm'] == 2 %}
+ <div class="alert alert-dismissible alert-warning">
+ <button type="button" class="btn-close" data-bs-dismiss="alert"></button>
+ <strong>Record deleted.</strong>
+ </div>
+ {{ clear_sm() }}
+ {% endif %}
+
+ <table id="op25_esd" class="display" cellspacing="0" width="100%">
+ <thead>
+ <tr>
+ {% if cmd == 'tgid' %}
+ <th>Record ID</th>
+ <th>System ID</th>
+ <th>Talkgroup ID</th>
+ <th>Talkgroup Tag</th>
+ <th>Actions</th>
+ {% elif cmd == 'unit' %}
+ <th>Record ID</th>
+ <th>System ID</th>
+ <th>Subscriber ID</th>
+ <th>Subscriber Tag</th>
+ <th>Actions</th>
+ {% endif %}
+ </thead>
+ <tbody></tbody>
+ </table>
+ </div>
+ </div>
+</div>
+</div>
+
+<div class="card mb-3 border-danger">
+<h5 class="card-header">Delete Tags</h4>
+ <div class="card-body">
+ Delete all
+ {% if cmd == 'tgid' %}
+ talkgroup
+ {% elif cmd == 'unit' %}
+ subscriber
+ {% endif %}
+ tags associated with a system. You cannot undo this action!
+ <br><br>
+<label for="systemSelect3">Choose System: </label>
+<select id="systemSelect3">
+<option value="0" selected>Select...</option>
+</select>
+<br><br>
+ <div align="center">
+ <button id="btnPurge" class="btn btn-danger" onclick="this.blur(); deleteTags('{{ cmd }}');">Delete
+ {% if cmd == 'tgid' %}
+ Talkgroup
+ {% elif cmd == 'unit' %}
+ Subscriber
+ {% endif %}
+ Tags
+ </button>
+ </div>
+ </div>
+ </div>
+{% include 'footer-links.html' %}
+</div> <!-- end main -->
+
+ <div class="side">
+ &nbsp;
+ </div>
+</div> <!-- end row -->
+<br>
+
+{% endblock %}
+
+{% block extra_javascripts %}
+
+<script src="static/js/datatables/jquery.dataTables.js"></script>
+
+<script>
+ $(document).ready(function () {
+ $('#startDate').prop('disabled', true );
+ $('#endDate').prop('disabled', true );
+ var sysid = $('#systemSelect4').val();
+ $('#op25_esd').DataTable({
+ "processing": true,
+ "serverSide": true,
+ 'bFilter': true,
+ 'paging': true,
+
+ "ajax": {
+ "url": '/edittg',
+ "data": { "sysid": sysid,
+ "cmd": '{{ cmd }}',
+ }
+ },
+
+ "columns": [
+ { "visible": false },
+ {
+ "data": [1],
+ "render": function(data, type, row, meta){
+ if(type === 'display'){
+ data = data + ' - ' + hex(data).toUpperCase();
+ }
+ return data;
+ }
+ },
+ null,
+ null,
+ {
+ "data": [3],
+ "render": function(data, type, row, meta){
+ if(type === 'display'){
+ data = '<button type="button" class="btn btn-primary btn-sm" onclick="this.blur(); editTagName(' + row[0] + ', \'' + row[3] + '\')">Edit Tag</button>&nbsp;\
+ <button type="button" class="btn btn-primary btn-sm" onclick="window.location.href=\'\/dtd?cmd={{ cmd }}&id=' + row[0] + '\'">Delete</button>';
+ }
+ return data;
+ },
+ "width": "150px"
+ }
+ ]
+
+ });
+ });
+
+function editTagName(id, t) {
+ var tag = prompt("Enter new tag:", t);
+ if (tag == null || tag == '')
+ return;
+ window.location.href='/utd?id=' + id + '&tag=' + tag + '&cmd={{ cmd }}';
+}
+
+function inspectTsv() {
+ var file = $('#selTsv').val();
+ if (file == '0')
+ return;
+
+ f = '/inspect?file=' + file;
+ $.ajax({
+ url : f,
+ type : 'GET',
+ success : popInsp,
+ error : function(XMLHttpRequest, textStatus, errorThrown) {alert('Error: \n\nFile:' + f + '\n\n' + errorThrown + '\n\n');}
+ });
+}
+
+function popInsp(h) {
+ $('#inspect').show();
+ $('#inspectText').html(h).scrollTop(0);
+}
+
+ {% if systems is not none %}
+ {% for i in systems %}
+ {% if i.tag is not none %}
+ $('#systemSelect2').append(new Option('{{ i.sysid }} - 0x{{ ( '%0x' % i.sysid ).upper() }} - {{ i.tag }}', '{{ i.sysid }}'));
+ $('#systemSelect3').append(new Option('{{ i.sysid }} - 0x{{ ( '%0x' % i.sysid ).upper() }} - {{ i.tag }}', '{{ i.sysid }}'));
+ $('#systemSelect4').append(new Option('{{ i.sysid }} - 0x{{ ( '%0x' % i.sysid ).upper() }} - {{ i.tag }}', '{{ i.sysid }}'));
+ {% else %}
+ $('#systemSelect2').append(new Option('{{ i.sysid }} - 0x{{ ( '%0x' % i.sysid ).upper() }}', '{{ i.sysid }}'));
+ $('#systemSelect3').append(new Option('{{ i.sysid }} - 0x{{ ( '%0x' % i.sysid ).upper() }}', '{{ i.sysid }}'));
+ $('#systemSelect4').append(new Option('{{ i.sysid }} - 0x{{ ( '%0x' % i.sysid ).upper() }}', '{{ i.sysid }}'));
+ {% endif %}
+ {% endfor %}
+ {% endif %}
+
+ $('#systemSelect4').change( function(){
+ localStorage.systemSelect4 = $('#systemSelect4').val();
+ });
+
+</script>
+
+
+{% endblock %}
+
diff --git a/op25/gr-op25_repeater/apps/oplog/op25/templates/editsys.html b/op25/gr-op25_repeater/apps/oplog/op25/templates/editsys.html
new file mode 100644
index 0000000..4fe288d
--- /dev/null
+++ b/op25/gr-op25_repeater/apps/oplog/op25/templates/editsys.html
@@ -0,0 +1,151 @@
+<!--
+ Copyright 2017, 2018 Max H. Parke KA1RBI
+ Copyright 2020, 2021 Michael Rose
+
+ This file is part of OP25
+
+ OP25 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 3, or (at your option)
+ any later version.
+
+ OP25 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 OP25; see the file COPYING. If not, write to the Free
+ Software Foundation, Inc., 51 Franklin Street, Boston, MA
+ 02110-1301, USA.
+
+ -->
+
+{% include 'base.html' %}
+{% block extra_stylesheets %}
+<link href="static/css/datatables/jquery.dataTables-dark.css" rel="stylesheet">
+{% endblock %}
+
+{% block content %}
+
+<div class="row-main">
+ <div class="side">
+ &nbsp;
+ </div> <!-- end side -->
+
+ <div class="main">
+
+ <div class="card mb-3 border-primary">
+ <h4 class="card-header">System Tags</h4>
+ <div class="card-body">
+ <p class="card-text">
+ </p>
+
+ <table id="op25_esd" class="display" cellspacing="0" width="100%">
+ <thead>
+ <tr>
+ <th>Record ID</th>
+ <th>System ID</th>
+ <th>System Name</th>
+ <th>Actions</th>
+ </tr>
+ </thead>
+ <tbody></tbody>
+ </table>
+ <br><br>
+ <table style="width: 65%; padding: 0px;" class="border-primary">
+ <tr>
+ <td style="vertical-align: top;">
+ <div class="form-floating mb-3 primary">
+ <input type="text" width="10" class="form-control" id="newSysId" placeholder="">
+ <label for="floatingInput">System ID (hex)</label>
+ </div>
+ </td>
+ <td>
+ <div class="form-floating mb-3">
+ <input type="text" class="form-control" size="25" id="newSysTag" placeholder="">
+ <label for="floatingInput">System Tag</label>
+ </div>
+ </td>
+ </tr>
+ <tr>
+ <td style="text-align: left; vertical-align: top;">
+ <button class="btn btn-primary" onclick="this.blur; addNewSystemTag();">Add New</button>
+ </td>
+ </table>
+ </div>
+</div>
+{% include 'footer-links.html' %}
+</div> <!-- end main -->
+
+ <div class="side">
+ &nbsp;
+ </div>
+</div> <!-- end row -->
+
+<!-- end secondary -->
+</div>
+<!-- end content -->
+
+
+</div>
+<br>
+
+{% endblock %}
+
+<!-- js moved to op25.js -->
+
+{% block extra_javascripts %}
+<script src="static/js/datatables/jquery.dataTables.js"></script>
+<script>
+ $(document).ready(function () {
+ $('#startDate').prop('disabled', true );
+ $('#endDate').prop('disabled', true );
+ $('#op25_esd').DataTable({
+ "processing": true,
+ "serverSide": true,
+ 'bFilter': false,
+ 'paging': false,
+ "ajax": '/esd',
+ "columns": [
+ null,
+ {
+ "data": [1],
+ "render": function(data, type, row, meta){
+ if(type === 'display'){
+ data = data + ' - ' + hex(data).toUpperCase();
+ }
+ return data;
+ }
+ },
+ null,
+
+ {
+ "data": [3],
+ "render": function(data, type, row, meta){
+ if(type === 'display'){
+ data = '<button type="button" class="btn btn-primary btn-sm" onclick="this.blur(); editTagName(' + data + ', \'' + row[2] + '\')">Edit Tag</button>&nbsp;\
+ <button type="button" class="btn btn-primary btn-sm" onclick="window.location.href=\'\/dsd?id=' + data + '\'">Delete</button>';
+
+ }
+ return data;
+ },
+ "width": "150px"
+ }
+ ]
+
+ });
+ });
+
+function editTagName(id, t) {
+ var tag = prompt("Enter new system tag:", t);
+ if (tag == null || tag == '') {
+ return;
+ }
+ window.location.href='/usd?id=' + id + '&tag=' + tag;
+
+}
+</script>
+
+
+{% endblock %}
diff --git a/op25/gr-op25_repeater/apps/oplog/op25/templates/error.html b/op25/gr-op25_repeater/apps/oplog/op25/templates/error.html
new file mode 100644
index 0000000..257b985
--- /dev/null
+++ b/op25/gr-op25_repeater/apps/oplog/op25/templates/error.html
@@ -0,0 +1,191 @@
+<!--
+ Copyright 2017, 2018 Max H. Parke KA1RBI
+ Copyright 2020, 2021 Michael Rose
+
+ This file is part of OP25
+
+ OP25 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 3, or (at your option)
+ any later version.
+
+ OP25 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 OP25; see the file COPYING. If not, write to the Free
+ Software Foundation, Inc., 51 Franklin Street, Boston, MA
+ 02110-1301, USA.
+
+ -->
+
+
+{% block content %}
+
+<html lang="{{ request.locale_name }}">
+ <head>
+ <meta charset="utf-8">
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="pyramid web application">
+ <meta name="author" content="Pylons Project">
+ <title>OP25 - Logs</title>
+ <link rel="shortcut icon" href="{{ url_for('static', filename='favicon.ico') }}">
+ <link rel="stylesheet" type="text/css" href="static/css/op25.css">
+ <link href="static/css/bootstrap/bootstrap-darkly.css" rel="stylesheet">
+ <link rel="stylesheet" type="text/css" href="static/dtpick/jquery.datetimepicker.css">
+ <style>
+ </style>
+ {% block extra_stylesheets %} {% endblock %}
+ <script src="static/jquery/jquery-2.2.4.min.js"></script>
+ <script src="static/js/bootstrap/bootstrap.bundle.min.js"></script>
+ <script src="static/dtpick/dtpick2.js"></script>
+ <script src="static/js/op25.js"></script>
+ </head>
+<div id="container">
+ <div id="header">
+ <p>&nbsp;</p>
+ </div>
+ <div id="primary">
+ &nbsp;
+ </div>
+<div id="content" align="center">
+ <div class="card mb-3 border-primary" style="max-width: 60rem; text-align: left;">
+ <h4 class="card-header bg-danger">OP25 Logs - Database Error (Code {{ code }})</h4>
+ <div class="card-body">
+
+ {% if code == 1 %}
+ <div class="alert alert-dismissible">
+ <strong>Database file does not exist.</strong> <br><br> {{ file }}</span> <Br><Br>File not found.
+ </div>
+ {% endif %}
+
+ {% if code == 2 %}
+ <div class="alert alert-dismissible">
+ <strong>Database file is too small. </strong> <br><Br> {{ file }} <br><br>Attributes do not conform.
+ </div>
+ {% endif %}
+
+ {% if code == 4 %}
+ <div class="alert alert-dismissible">
+ <strong>Database contains no data. </strong> <br><Br> {{ file }} <br><br> Database structure is good, but no data was found. <br><br>0 rows in table 'data_store'.
+ </div>
+ {% endif %}
+
+ {% if code == 5 %}
+ <div class="alert alert-dismissible">
+ <strong>Database access error. </strong> <br><Br> {{ file }} <br><br> Database might be locked or in use by another process (OP25). <br><br>
+ Source: {{ source }}
+ </div>
+ {% endif %}
+
+ </div>
+ </div>
+
+
+
+ <div align="center">
+ <button class="btnMain btn btn-outline-info" onclick="window.location.href='/'">Try Again</button>
+ <br><br>
+ </div>
+
+ {% if code == 5 %}
+ <div class="card mb-3 border-primary" style="max-width: 60rem; text-align: left;">
+ <h4 class="card-header bg-secondary">Traceback</h4>
+ <div class="card-body">
+
+ {{ e }} <br><br>
+ {{ err }}
+ </div></div>
+ {% endif %}
+
+ {% if code != 5 %}
+
+ <div class="card mb-3 border-primary" style="max-width: 60rem;">
+ <h4 class="card-header bg-primary">../op25/gr-op25_repeater/apps/README</h4>
+ <div class="card-body" style="text-align: left;">
+
+ <h4>Setup SQL Log Database (Optional)</h4>
+ <p>
+
+ This addition provides a permanent server-side log of control channel
+ activity via logging to an SQL database. See the next section for details
+ on installing and using the log viewer.
+ </p>
+ <p>
+ 1. Make sure that sqlite3 is installed in python
+ </p>
+ <p>
+ 2. Initialize DB (any existing DB data will be destroyed)
+ </p>
+ <p>
+ WARNING: OP25 MUST NOT BE RUNNING DURING THIS STEP
+ </p>
+ <p>
+ op25/.../apps$ python sql_dbi.py reset_db
+ </p>
+ <p>
+ 3. Import talkgroups tags file
+ </p>
+ <p>
+ op25/.../apps$ python sql_dbi.py import_tgid tags.tsv
+ </p>
+ <p>
+ also, import the radio ID tags file (optional)
+ </p>
+ <p>
+ op25/.../apps$ python sql_dbi.py import_unit radio-tags.tsv
+ </p>
+ <p>
+ import the System ID tags file (see below)
+ </p>
+ <p>
+ op25/.../apps$ python sql_dbi.py import_sysid sysid-tags.tsv
+ </p>
+ <p>
+ The sysid tags must be a TSV file containing two columns
+ column 1 is the P25 trunked sysid (int, decimal)
+ colunn 2 is the System Name (text)
+ (Note: there is no header row line in this TSV file).
+ </p>
+ <p>
+ 4. Run op25 as usual. Logfile data should be inserted into DB in real time
+ and you should be able to view activity via the OP25 http console (once
+ the flask/datatables app has been set up; see next section).
+ </p>
+ </div>
+ </div>
+
+ {% endif %}
+ </div>
+</div>
+
+
+</div>
+
+<div id="secondary">
+ &nbsp;
+ </div>
+</div>
+</div>
+<!-- end secondary -->
+
+</div>
+<!-- end content -->
+
+</div>
+<br>
+
+
+
+
+
+
+
+{% endblock %}
+
+{% block extra_javascripts %}
+
+{% endblock %} \ No newline at end of file
diff --git a/op25/gr-op25_repeater/apps/oplog/op25/templates/footer-links.html b/op25/gr-op25_repeater/apps/oplog/op25/templates/footer-links.html
new file mode 100644
index 0000000..630c2af
--- /dev/null
+++ b/op25/gr-op25_repeater/apps/oplog/op25/templates/footer-links.html
@@ -0,0 +1,17 @@
+<!-- footer links -->
+<div class="card border-primary mb-3">
+ <div class="card-body">
+ <div align="center">
+ <a href="{{ url_for('home') }}">Home</a>&nbsp;&nbsp;&nbsp;
+ <a href="{{ url_for('editsys') }}">System Tags</a>&nbsp;&nbsp;&nbsp;
+ <a href="{{ url_for('edit_tags') }}?cmd=tgid">Talkgroup Tags</a>&nbsp;&nbsp;&nbsp;
+ <a href="{{ url_for('edit_tags') }}?cmd=unit">Unit Tags</a>&nbsp;&nbsp;&nbsp;
+ <a href="{{ url_for('purge') }}">Purge</a>&nbsp;&nbsp;&nbsp;
+ <a href="{{ url_for('switch_db') }}">Backup & Switch</a>&nbsp;&nbsp;&nbsp;
+ <a href="{{ url_for('about') }}">About</a>
+ <br>
+ Server time: {{ t_loc() }} <br>
+ 08.29.2021
+ </div>
+ </div>
+</div> \ No newline at end of file
diff --git a/op25/gr-op25_repeater/apps/oplog/op25/templates/home.html b/op25/gr-op25_repeater/apps/oplog/op25/templates/home.html
new file mode 100644
index 0000000..64c7e91
--- /dev/null
+++ b/op25/gr-op25_repeater/apps/oplog/op25/templates/home.html
@@ -0,0 +1,129 @@
+<!--
+ Copyright 2017, 2018 Max H. Parke KA1RBI
+ Copyright 2020, 2021 Michael Rose
+
+ This file is part of OP25
+
+ OP25 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 3, or (at your option)
+ any later version.
+
+ OP25 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 OP25; see the file COPYING. If not, write to the Free
+ Software Foundation, Inc., 51 Franklin Street, Boston, MA
+ 02110-1301, USA.
+
+ -->
+
+{% include 'base.html' %}
+
+{% block content %}
+
+<div class="row-main">
+ <div class="side">
+ &nbsp;
+ </div> <!-- end side -->
+
+ <div class="main">
+
+ {% include "dbstats.html" %}
+
+
+ <div class="card mb-3 border-primary">
+ <h4 class="card-header">Activity and Counts by Subscriber or Talkgroup</h4>
+ <div class="card-body">
+ <p class="card-text">
+ <button class="btnMain btn btn-outline-info" onclick="window.location.href='/logs?r=total_tgid'">Total Talkgroup<br>Voice Activity</button>
+ &nbsp;&nbsp;
+ <button class="btnMain btn btn-outline-info" onclick="window.location.href='/logs?r=call_detail'">Call<br>Detail</button>
+ &nbsp;&nbsp;
+ <button class="btnMain btn btn-outline-info" onclick="window.location.href='/logs?r=joins'">Join<br>Activity</button>
+ <hr style="height: 2px;">
+<!-- <input class="op-input" style="height: 62px; text-align: center; width: 210px; border: 1px solid orange; background-color: #333; color:#ccc;" placeholder="Enter SU or Talkgroup ID" type="text" id="resource_id"</input> -->
+
+ <div class="form-floating mb-3 primary" style="width: 215px;">
+ <input type="text" width="10" class="form-control" style="height: 62px;" id="resource_id" placeholder="">
+ <label for="floatingInput">TGID or SUID</label>
+ </div>
+
+ <button class="btnMain btn btn-outline-warning" onclick="this.blur(); load_new_page0('tgid');">SU ID Activity for Specified TGID</button>
+ &nbsp;&nbsp;
+ <button class="btnMain btn btn-outline-warning" onclick="this.blur(); load_new_page0('su');">Count of Calls by TGID for Specified SU ID</button>
+ <p><br>Note: The ID you enter can define a range of IDs to search, for example:
+ <br>
+ <ul>
+ <li>1234000-1234599 to search specified range</li>
+ </li>
+ <li>1234??? Search for matches between 1234000 and 1234999</li>
+ </ul>
+ </p>
+ </div>
+ </div>
+ <div class="card mb-3 border-primary">
+ <h4 class="card-header">Control Channel Events</h4>
+ <div class="card-body">
+ Filter by talkgroup ID, subscriber ID, or both (optional):
+ <table style="width: 400px; padding: 0px;">
+ <tr>
+ <td style="vertical-align: top;">
+ <div class="form-floating mb-3 primary">
+ <input type="text" width="10" class="form-control" id="cc_filter_tgid" style="width: 150px;" placeholder="">
+ <label for="floatingInput">Talkgroup ID</label>
+ </div>
+ </td>
+ <td>
+ <div class="form-floating mb-3">
+ <input type="text" class="form-control" size="25" id="cc_filter_suid" style="width: 150px;" placeholder="">
+ <label for="floatingInput">Subscriber ID</label>
+ </div>
+ </td>
+ <td>&nbsp;&nbsp;
+ <button class="btn btn-primary" onclick="this.blur(); clrcc();">Clear</button>
+ </td>
+ </tr>
+ </table>
+<br>
+ <table>
+ {% for i in params['ekeys'] %}
+ <tr>
+ <td><button class="btnMain btn btn-outline-info" style="height: 38px;" onclick="this.blur(); load_new_page1('cc_event', '{{ i }}');">{{ i|replace("_", " ") }}</button></td>
+ <td>&nbsp;{{ params['cc_desc'][i] }} </td>
+ </tr>
+ {% endfor %}
+ </table>
+ </div>
+ </div>
+ {% include 'footer-links.html' %}
+</div> <!-- end main -->
+
+ <div class="side">
+ &nbsp;
+ </div>
+</div> <!-- end row -->
+
+
+
+
+<br>
+
+{% endblock %}
+
+<!-- js moved to op25.js -->
+
+{% block extra_javascripts %}
+
+<script>
+
+function clrcc() {
+ $('#cc_filter_tgid').val('');
+ $('#cc_filter_suid').val('');
+}
+</script>
+
+{% endblock %}
diff --git a/op25/gr-op25_repeater/apps/oplog/op25/templates/inspect.html b/op25/gr-op25_repeater/apps/oplog/op25/templates/inspect.html
new file mode 100644
index 0000000..72f6ad8
--- /dev/null
+++ b/op25/gr-op25_repeater/apps/oplog/op25/templates/inspect.html
@@ -0,0 +1,18 @@
+<!-- Import TSV inspection -->
+{% if i|length == 0 %}
+<div class="alert alert-dismissible alert-danger" id="invtsv">
+ <button type="button" class="btn-close" data-bs-dismiss="alert"></button>
+ <strong>Invalid TSV</strong><br><br> The TSV is not valid for import.
+</div>
+{% else %}
+<div class="text-warning">Records: <b> {{ i|length }} </b></div><br>
+<table class="table table-hover">
+<th>ID</th>
+<th>Tag</th>
+<th>Priority/Color</th>
+{% for s in i %}
+<tr><td style="padding 2px; width: 150px;"> {{ s[0] }} </td><td style="padding 2px; width: 350px;"> {{ s[1] }} </td><td style="padding 2px;"> {{ s[2] }}</td></tr>
+{% endfor %}
+</table>
+<br>
+{% endif %} \ No newline at end of file
diff --git a/op25/gr-op25_repeater/apps/oplog/op25/templates/logs.html b/op25/gr-op25_repeater/apps/oplog/op25/templates/logs.html
new file mode 100644
index 0000000..d4caf65
--- /dev/null
+++ b/op25/gr-op25_repeater/apps/oplog/op25/templates/logs.html
@@ -0,0 +1,212 @@
+<!--
+ Copyright 2017, 2018 Max H. Parke KA1RBI
+ Copyright 2020, 2021 Michael Rose
+
+ This file is part of OP25
+
+ OP25 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 3, or (at your option)
+ any later version.
+
+ OP25 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 OP25; see the file COPYING. If not, write to the Free
+ Software Foundation, Inc., 51 Franklin Street, Boston, MA
+ 02110-1301, USA.
+
+ -->
+{% include 'base.html' %}
+{% block extra_stylesheets %}
+<link href="static/css/datatables/jquery.dataTables-dark.css" rel="stylesheet">
+{% endblock %}
+{% block content %}
+<div class="row-main">
+ <div class="main">
+<br>
+
+<br>
+ {% if params['r'] == 'su' %}
+ <h3>Count by Unit for SU ID {{ params['q'] }} {{ tag }}</h3>
+ {% elif params['r'] == 'joins' %}
+ <h3>Group Join Detail</h3>
+ {% elif params['r'] == 'cc_event' %}
+ <h3>CC Event Type: {{ params['cc_desc'][ params['p']] }}</h3>
+ {% if params['tgid'] != '0' or params['suid'] != '0' %}
+ Filtered by:
+ {% endif %}
+
+ {% if params['tgid'] != '0' %}
+ Talkgroup ID = {{ params['tgid'] }} &nbsp;&nbsp;
+ {% endif %}
+
+ {% if params['suid'] != '0' %}
+ Source ID = {{ params['suid'] }}
+ {% endif %}
+ {% elif params['r'] == 'total_tgid' %}
+ <h3>Total Talkgroup Voice Activity</h3>
+ {% elif params['r'] == 'call_detail' %}
+ <h3>Call Detail</h3>
+ Includes opcodes 0x00 and 0x02
+ {% else %}
+ <h3>Count by Unit for Talkgroup ID {{ params['q'] }} {{ tag }}</h3>
+ {% endif %}
+ <hr>
+ <table id="op25_logs" class="display" cellspacing="0" width="100%">
+ <thead>
+ <tr>
+ {% if params['r'] == 'tgid' %}
+ <th>Subscriber ID</th>
+ <th>Subscriber Tag</th>
+ <th>Count</th>
+ <th>Last Seen</th>
+ {% elif params['r'] == 'total_tgid' %}
+ <th>System ID</th>
+ <th>System</th>
+ <th>Talkgroup ID</th>
+ <th>Talkgroup</th>
+ <th>Count</th>
+ {% elif params['r'] == 'call_detail' %}
+ <th>Time</th>
+ <th>Opcode</th>
+ <th>System ID</th>
+ <th>System</th>
+ <th>Talkgrou ID</th>
+ <th>Talkgroup</th>
+ <th>Source ID</th>
+ <th>Source</th>
+ <th>Frequency</th>
+ {% elif params['r'] == 'joins' %}
+ <th>Time</th>
+ <th>Opcode</th>
+ <th>System ID</th>
+ <th>System</th>
+ <th>RV</th>
+ <th>Talkgrou ID</th>
+ <th>Talkgroup</th>
+ <th>Source ID</th>
+ <th>Source</th>
+ {% elif params['r'] == 'calls' %}
+ <th>Time</th>
+ <th>Sysid</th>
+ <th>Tgid</th>
+ <th>Talkgroup</th>
+ <th>Frequency</th>
+ <th>SU ID</th>
+
+ {% elif params['r'] == 'cc_event' %}
+ {% for i in params['ckeys'] %}
+ <th> {{ i }} </th>
+ {% endfor %}
+
+ {% else %}
+ <th>Talkgroup</th>
+ <th>TGID</th>
+ <th>Count</th>
+ {% endif %}
+ </tr>
+ </thead>
+ <tbody></tbody>
+ </table>
+
+<button onclick="this.blur(); csvTable('op25_logs')" class="btn btn-light btn-sm" title="Export current view to CSV.">Export CSV</button>
+
+</div>
+</div>
+
+{% endblock %}
+{% block extra_javascripts %}
+<!-- <script src="https://cdn.datatables.net/1.10.10/js/jquery.dataTables.min.js"></script> -->
+<script src="static/js/datatables/jquery.dataTables.js"></script>
+<script type="text/javascript" charset="utf-8">
+ $(document).ready(function () {
+ var sd = sdate();
+ var ed = edate();
+ var sysid = $('#systemSelect').val();
+
+ var filter_tgid = {% if params['tgid'] is defined %}
+ {{ params['tgid'] }};
+ {% else %}
+ 0;
+ {% endif %}
+ var filter_suid = {% if params['suid'] is defined %}
+ {{ params['suid'] }};
+ {% else %}
+ 0;
+ {% endif %}
+
+ console.log('filter_tgid=' + filter_tgid);
+ console.log(typeof filter_tgid);
+ console.log('filter_suid=' + filter_suid);
+ console.log(typeof filter_suid);
+
+ var table = $('#op25_logs').DataTable({
+ "lengthMenu": [[10, 25, 50, 100, 500, 1000, 2500], [10, 25, 50, 100, 500, '1,000', '2,500']],
+ "processing": true,
+ "serverSide": true,
+
+ {% if params['p'] == 'grp_v_ch_grant' %}
+ "columns": [
+ null,
+ null,
+ null,
+ null,
+ { render: function(data){ return data / 1000000; }},
+ null,
+ null,
+ null,
+ null
+ ],
+ {% endif %}
+
+ {% if params['p'] == 'mot_grg_cn_grant' %}
+ "columns": [
+ null,
+ null,
+ null,
+ { render: function(data){ return data / 1000000; }},
+ null,
+ null,
+ null,
+ null
+ ],
+ {% endif %}
+
+ {% if params['r'] == 'call_detail' %}
+ "columns": [
+ null,
+ null,
+ null,
+ null,
+ null,
+ null,
+ null,
+ null,
+ { render: function(data){ return data / 1000000; } },
+ ],
+ {% endif %}
+
+
+ "ajax": {
+ "url": "{{ url_for('data') }}",
+ "data": {
+ "host_rid": "{{ params['q'] }}",
+ "host_function_type": "{{ params['r'] }}",
+ "host_function_param": "{{ params['p'] }}",
+ "sdate": sd,
+ "edate": ed,
+ "sysid": sysid,
+ "tgid": filter_tgid,
+ "suid": filter_suid
+ }
+ }
+ });
+ });
+</script>
+{% endblock %}
+<br><br><br>
+{% include 'footer-links.html' %} \ No newline at end of file
diff --git a/op25/gr-op25_repeater/apps/oplog/op25/templates/purge.html b/op25/gr-op25_repeater/apps/oplog/op25/templates/purge.html
new file mode 100644
index 0000000..1a1f906
--- /dev/null
+++ b/op25/gr-op25_repeater/apps/oplog/op25/templates/purge.html
@@ -0,0 +1,123 @@
+<!--
+ Copyright 2017, 2018 Max H. Parke KA1RBI
+ Copyright 2020, 2021 Michael Rose
+
+ This file is part of OP25
+
+ OP25 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 3, or (at your option)
+ any later version.
+
+ OP25 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 OP25; see the file COPYING. If not, write to the Free
+ Software Foundation, Inc., 51 Franklin Street, Boston, MA
+ 02110-1301, USA.
+
+ -->
+
+{% include 'base.html' %}
+
+{% block content %}
+
+<div id="loading">
+ <img id="loading-image" src="static/loading.gif" height="35px" alt="Loading..." />
+ <br>Processing...
+</div>
+
+
+
+<div class="row-main">
+ <div class="side">
+ &nbsp;
+ </div> <!-- end side -->
+
+ <div class="main">
+
+ {% include "dbstats.html" %}
+
+
+ <div class="card mb-3 border-primary">
+ <h4 class="card-header bg-danger">Purge Database</h4>
+ <div class="card-body">
+ {% if successMessage == 1 %}
+ <div class="alert alert-dismissible alert-primary">
+ <button type="button" class="btn-close" data-bs-dismiss="alert"></button>
+ <strong>Operation completed.</strong> <span id="recCount">{{ recCount }}</span> records have been deleted.<br><br>Executed query:<br><br> {{ dispQuery }}</a>
+ {% if params['bu'] == 'true' %}
+ <br><br>Backup file created: {{ destfile }}
+ {% endif %}
+ </div>
+ {% endif %}
+ {% if successMessage == 2 %}
+ <div class="alert alert-dismissible alert-info">
+ <button type="button" class="btn-close" data-bs-dismiss="alert"></button>
+ <strong>Simulated operation completed.</strong> <span id="recCount">{{ recCount }}</span> records will be deleted.<br><br>Simulated query:<br><br> {{ dispQuery }}</a>
+ {% if params['bu'] == 'true' %}
+ <br><br>Simulated backup file created: {{ destfile }}
+ {% endif %}
+ </div>
+ {% endif %}
+ To purge records from the database, select the system, start date and end date above, then click Purge Database. Talkgroup and subscriber tags are not affected.
+ <Br><Br>
+ To prevent accidental data loss, a start date and end date are required.
+ <Br><Br>
+ <div class="form-check form-switch">
+ <input class="form-check-input" type="checkbox" id="keepVoice" checked="checked">
+ <label class="form-check-label" for="keepVoice"><b>Keep Voice Channel Grant Data</b></label>&nbsp;&nbsp;
+ When selected, all voice channel grant data will be saved.
+ <br>
+ <input class="form-check-input" type="checkbox" id="createBackup">
+ <label class="form-check-label" for="createBackup"><b>Create Database Backup File</b></label>&nbsp;&nbsp;
+ Create a backup of the database before purging.
+ </div>
+ <br>
+ <span class="text-danger"><b>FINAL WARNING:</b></span> Once you click "Purge Database", the action cannot be undone.</span></b><br><br>
+ <div align="center">
+ <button id="btnPurge" class="btnMain btn btn-danger" onclick="$('#processing').show(); purgeBtn(); this.blur; doPurge(false);">Purge<br>Database</button>
+ <button class="btnMain btn btn-warning" onclick="this.blur; doPurge(true);">Simulate Purge and<br>Display Query</button>
+ <button class="btnMain btn btn-success" onclick="this.blur; window.location.href='/'">Cancel<br>Purge</button>
+ </div><br>
+ <div align="center" id="processing" style="display: none;">
+ <img src="static/loading.gif" style="height: 20px;" alt="loading">
+ <br>Processing...<br>
+ </div>
+ </div>
+ </div>
+
+{% include 'footer-links.html' %}
+</div> <!-- end main -->
+
+ <div class="side">
+ &nbsp;
+ </div>
+</div> <!-- end row -->
+
+{% endblock %}
+
+<!-- js moved to op25.js -->
+
+<script>
+
+function purgeBtn() {
+ // full page modal while loading, or the little Processing icon below the buttons??
+ // $('#loading').show();
+}
+
+</script>
+
+
+
+
+{% block extra_javascripts %}
+
+<script>
+ x = $('#recCount').html();
+ $('#recCount').html(comma(x));
+</script>
+{% endblock %}
diff --git a/op25/gr-op25_repeater/apps/oplog/op25/templates/switch_db.html b/op25/gr-op25_repeater/apps/oplog/op25/templates/switch_db.html
new file mode 100644
index 0000000..a655757
--- /dev/null
+++ b/op25/gr-op25_repeater/apps/oplog/op25/templates/switch_db.html
@@ -0,0 +1,129 @@
+<!--
+ Copyright 2017, 2018 Max H. Parke KA1RBI
+ Copyright 2020, 2021 Michael Rose
+
+ This file is part of OP25
+
+ OP25 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 3, or (at your option)
+ any later version.
+
+ OP25 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 OP25; see the file COPYING. If not, write to the Free
+ Software Foundation, Inc., 51 Franklin Street, Boston, MA
+ 02110-1301, USA.
+
+ -->
+
+{% include 'base.html' %}
+{% block extra_stylesheets %}
+<link href="static/css/datatables/jquery.dataTables-dark.css" rel="stylesheet">
+{% endblock %}
+
+{% block content %}
+
+<div class="row-main">
+ <div class="side">
+ &nbsp;
+ </div> <!-- end side -->
+
+ <div class="main">
+ <div class="card mb-3 border-primary">
+ <div class="card-body">
+
+ <div class="card mb-3 border-secondary">
+ <h5 class="card-header">Switch Database</h4>
+ <div class="card-body">
+ <p class="card-text">
+ Switch OP25 Logs database. This does not affect live sql logging in OP25. Database selection will persist with Flask session.<br>
+ </p>
+<br><div align="center">
+
+ Current database: {{ curr_file }}<br><br>
+
+<label for="selTsv">Choose db file:</label>
+ <select name="seldb" id="seldb">
+ <option value='0' >Select...</option>
+ {% for i in files %}
+ {% if '.db' in i and '._' not in i %}
+ <option value="{{ i }}">{{ i }}</option>
+ {% endif %}
+ {% endfor %}
+ </select>
+<br><br>
+<Br>
+<button class="btn btn-primary" onclick="this.blur(); switch_database();">Swtich Database</button>
+<button class="btn btn-primary" onclick="this.blur(); window.location.href='/'">Cancel</button>
+</div>
+
+</div>
+</div>
+ <div class="card mb-3 border-secondary">
+ <h5 class="card-header">Create Backup of Current Database</h4>
+ <div class="card-body">
+ <p class="card-text">
+ <div align="center">
+ Current database: {{ curr_file }}<br><br>
+ <button class="btn btn-primary" onclick="this.blur(); create_backup();">Create Backup Now</button>
+ </div>
+ <br>
+ {% if sm == 1 %}
+ <br>
+ <div class="alert alert-dismissible alert-success">
+ <button type="button" class="btn-close" data-bs-dismiss="alert"></button>
+ <strong>Backup Created.</strong><br><br>
+ New backup: <b> {{ destfile }}</b>
+ </div>
+ {{ clear_sm() }}
+ {% endif %}
+
+</div>
+</div>
+
+</div>
+</div>
+
+{% include 'footer-links.html' %}
+</div> <!-- end main -->
+
+ <div class="side">
+ &nbsp;
+ </div>
+</div> <!-- end row -->
+
+
+
+<script>
+
+ $(document).ready(function () {
+ $('#startDate').prop('disabled', true );
+ $('#endDate').prop('disabled', true );
+ $('#systemSelect').prop('disabled', true );
+ var sysid = $('#systemSelect4').val();
+ });
+
+ function switch_database() {
+ var file = $('#seldb').val();
+ if (file == '0')
+ return;
+ window.location.href='/switch_db?cmd=switch&file=' + file;
+ }
+
+
+ function create_backup() {
+ window.location.href='/switch_db?cmd=backup';
+ }
+
+</script>
+
+{% endblock %}
+
+{% block extra_javascripts %}
+{% endblock %}
+
diff --git a/op25/gr-op25_repeater/apps/oplog/oplog.sh b/op25/gr-op25_repeater/apps/oplog/oplog.sh
new file mode 100755
index 0000000..90d18c8
--- /dev/null
+++ b/op25/gr-op25_repeater/apps/oplog/oplog.sh
@@ -0,0 +1,4 @@
+#! /bin/sh
+
+export FLASK_APP=op25
+FLASK_DEBUG=1 flask run --host=0.0.0.0
diff --git a/op25/gr-op25_repeater/apps/oplog/setup.py b/op25/gr-op25_repeater/apps/oplog/setup.py
new file mode 100644
index 0000000..491a5a6
--- /dev/null
+++ b/op25/gr-op25_repeater/apps/oplog/setup.py
@@ -0,0 +1,30 @@
+import os
+
+from setuptools import find_packages, setup
+
+here = os.path.abspath(os.path.dirname(__file__))
+
+with open(os.path.join(here, "README.rst")) as f:
+ README = f.read()
+
+setup(
+ name="flask_tut",
+ version="0.0",
+ description="flask_tut",
+ long_description=README,
+ classifiers=[
+ "Programming Language :: Python",
+ "Framework :: Pyramid",
+ "Topic :: Internet :: WWW/HTTP",
+ "Topic :: Internet :: WWW/HTTP :: WSGI :: Application",
+ ],
+ author="",
+ author_email="",
+ url="",
+ keywords="web wsgi bfg flask",
+ packages=find_packages(),
+ include_package_data=True,
+ zip_safe=False,
+ test_suite="flask_tut",
+ install_requires=[],
+)
diff --git a/op25/gr-op25_repeater/apps/p25_decoder.py b/op25/gr-op25_repeater/apps/p25_decoder.py
index bb7dc51..c15b94f 100644
--- a/op25/gr-op25_repeater/apps/p25_decoder.py
+++ b/op25/gr-op25_repeater/apps/p25_decoder.py
@@ -27,7 +27,7 @@ P25 decoding block.
"""
import time
-from gnuradio import gr, gru, eng_notation
+from gnuradio import gr, eng_notation
from gnuradio import blocks, audio
from gnuradio.eng_option import eng_option
import op25
@@ -59,7 +59,8 @@ class p25_decoder_sink_b(gr.hier_block2):
do_msgq = False,
msgq = None,
audio_output = _def_audio_output,
- debug = _def_debug):
+ debug = _def_debug,
+ msgq_id = 0):
"""
Hierarchical block for P25 decoding.
@@ -67,7 +68,7 @@ class p25_decoder_sink_b(gr.hier_block2):
@type debug: int
"""
- gr.hier_block2.__init__(self, "p25_demod_c",
+ gr.hier_block2.__init__(self, "p25_demod_c",
gr.io_signature(1, 1, gr.sizeof_char), # Input signature
gr.io_signature(0, 0, 0)) # Output signature
@@ -77,9 +78,16 @@ class p25_decoder_sink_b(gr.hier_block2):
self.debug = debug
self.dest = dest
do_output = False
+ do_audio_output = False
+ do_phase2_tdma = False
if dest == 'wav':
do_output = True
- do_audio_output = True
+
+ if do_imbe:
+ do_audio_output = True
+
+ if num_ambe > 0:
+ do_phase2_tdma = True
if msgq is None:
msgq = gr.msg_queue(1)
@@ -92,8 +100,8 @@ class p25_decoder_sink_b(gr.hier_block2):
num_decoders = 1
if num_ambe > 1:
num_decoders += num_ambe - 1
- for slot in xrange(num_decoders):
- self.p25_decoders.append(op25_repeater.p25_frame_assembler(wireshark_host, udp_port, debug, do_imbe, do_output, do_msgq, msgq, do_audio_output, True))
+ for slot in range(num_decoders):
+ self.p25_decoders.append(op25_repeater.p25_frame_assembler(wireshark_host, udp_port, debug, do_imbe, do_output, do_msgq, msgq, do_audio_output, do_phase2_tdma, msgq_id+slot))
self.p25_decoders[slot].set_slotid(slot)
self.xorhash.append('')
@@ -123,6 +131,9 @@ class p25_decoder_sink_b(gr.hier_block2):
return
self.audio_sink[index].open(filename)
+ def set_nac(self, nac, index=0):
+ self.p25_decoders[index].set_nac(nac)
+
def set_xormask(self, xormask, xorhash, index=0):
if self.xorhash[index] == xorhash:
return
diff --git a/op25/gr-op25_repeater/apps/p25_demodulator.py b/op25/gr-op25_repeater/apps/p25_demodulator.py
index 646d621..046aaaf 100644
--- a/op25/gr-op25_repeater/apps/p25_demodulator.py
+++ b/op25/gr-op25_repeater/apps/p25_demodulator.py
@@ -2,7 +2,7 @@
# Copyright 2005,2006,2007 Free Software Foundation, Inc.
#
# OP25 Demodulator Block
-# Copyright 2009, 2010, 2011, 2012, 2013, 2014, 2015 Max H. Parke KA1RBI
+# Copyright 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Max H. Parke KA1RBI
#
# This file is part of GNU Radio and part of OP25
#
@@ -27,8 +27,8 @@ P25 C4FM/CQPSK demodulation block.
"""
import sys
-from gnuradio import gr, gru, eng_notation
-from gnuradio import filter, analog, digital, blocks
+from gnuradio import gr, eng_notation
+from gnuradio import filter, analog, digital, blocks, fft
from gnuradio.eng_option import eng_option
import op25
import op25_repeater
@@ -45,14 +45,40 @@ _def_costas_alpha = 0.04
_def_symbol_rate = 4800
_def_symbol_deviation = 600.0
_def_bb_gain = 1.0
+_def_excess_bw = 0.2
+
+_def_gmsk_mu = None
+_def_mu = 0.5
+_def_freq_error = 0.0
+_def_omega_relative_limit = 0.005
# /////////////////////////////////////////////////////////////////////////////
# demodulator
# /////////////////////////////////////////////////////////////////////////////
+def get_decim(speed):
+ s = int(speed)
+ if_freqs = [24000, 25000, 32000]
+ for i_f in if_freqs:
+ if s % i_f != 0:
+ continue
+ q = s // i_f
+ if q & 1:
+ continue
+ if q >= 40 and q & 3 == 0:
+ decim = q//4
+ decim2 = 4
+ else:
+ decim = q//2
+ decim2 = 2
+ return decim, decim2
+ return None
+
class p25_demod_base(gr.hier_block2):
def __init__(self,
if_rate = None,
+ filter_type = None,
+ excess_bw = _def_excess_bw,
symbol_rate = _def_symbol_rate):
"""
Hierarchical block for P25 demodulation base class
@@ -62,41 +88,86 @@ class p25_demod_base(gr.hier_block2):
"""
self.if_rate = if_rate
self.symbol_rate = symbol_rate
- self.bb_sink = None
+ self.bb_sinks = []
self.baseband_amp = blocks.multiply_const_ff(_def_bb_gain)
coeffs = op25_c4fm_mod.c4fm_taps(sample_rate=self.if_rate, span=9, generator=op25_c4fm_mod.transfer_function_rx).generate()
- self.symbol_filter = filter.fir_filter_fff(1, coeffs)
- autotuneq = gr.msg_queue(2)
- self.fsk4_demod = op25.fsk4_demod_ff(autotuneq, self.if_rate, self.symbol_rate)
+ sps = self.if_rate // self.symbol_rate
+ if filter_type == 'rrc':
+ ntaps = 7 * sps
+ if ntaps & 1 == 0:
+ ntaps += 1
+ coeffs = filter.firdes.root_raised_cosine(1.0, if_rate, symbol_rate, excess_bw, ntaps)
+ coeffs = [x*1.5 for x in coeffs]
+ if filter_type == 'nxdn':
+ coeffs = op25_c4fm_mod.c4fm_taps(sample_rate=self.if_rate, span=9, generator=op25_c4fm_mod.transfer_function_nxdn, symbol_rate=self.symbol_rate).generate()
+ gain_adj = 1.8 # for nxdn48 6.25 KHz
+ if self.symbol_rate == 4800:
+ gain_adj = 0.77 # nxdn96 12.5 KHz
+ coeffs = coeffs * gain_adj
+ if filter_type == 'gmsk':
+ # lifted from gmsk.py
+ _omega = sps
+ _gain_mu = _def_gmsk_mu
+ _mu = _def_mu
+ if not _gain_mu:
+ _gain_mu = 0.175
+ _gain_omega = .25 * _gain_mu * _gain_mu # critically damped
+ self.symbol_filter = blocks.multiply_const_ff(1.0)
+ self.fsk4_demod = digital.clock_recovery_mm_ff(_omega, _gain_omega,
+ _mu, _gain_mu,
+ _def_omega_relative_limit)
+ self.slicer = digital.binary_slicer_fb()
+ elif filter_type == 'fsk4mm':
+ self.symbol_filter = filter.fir_filter_fff(1, coeffs)
+ _omega = sps
+ _gain_mu = _def_gmsk_mu
+ _mu = _def_mu
+ if not _gain_mu:
+ _gain_mu = 0.0175
+ _gain_omega = .25 * _gain_mu * _gain_mu # critically damped
+ self.fsk4_demod = digital.clock_recovery_mm_ff(_omega, _gain_omega,
+ _mu, _gain_mu,
+ _def_omega_relative_limit)
+ levels = [ -2.0, 0.0, 2.0, 4.0 ]
+ self.slicer = op25_repeater.fsk4_slicer_fb(levels)
+ else:
+ self.symbol_filter = filter.fir_filter_fff(1, coeffs)
+ autotuneq = gr.msg_queue(2)
+ self.fsk4_demod = op25.fsk4_demod_ff(autotuneq, self.if_rate, self.symbol_rate)
+ levels = [ -2.0, 0.0, 2.0, 4.0 ]
+ self.slicer = op25_repeater.fsk4_slicer_fb(levels)
- levels = [ -2.0, 0.0, 2.0, 4.0 ]
- self.slicer = op25_repeater.fsk4_slicer_fb(levels)
+ def set_symbol_rate(self, rate):
+ self.symbol_rate = rate
def set_baseband_gain(self, k):
self.baseband_amp.set_k(k)
def disconnect_bb(self):
# assumes lock held or init
- if not self.bb_sink:
+ if not len(self.bb_sinks):
return
- self.disconnect(self.bb_sink[0], self.bb_sink[1])
- self.bb_sink = None
+ for t in self.bb_sinks:
+ self.disconnect(t[0], t[1])
+ self.bb_sinks = []
def connect_bb(self, src, sink):
# assumes lock held or init
- self.disconnect_bb()
if src == 'symbol_filter':
- self.connect(self.symbol_filter, sink)
- self.bb_sink = [self.symbol_filter, sink]
+ b = self.symbol_filter
elif src == 'baseband_amp':
- self.connect(self.baseband_amp, sink)
- self.bb_sink = [self.baseband_amp, sink]
+ b = self.baseband_amp
+ self.connect(b, sink)
+ self.bb_sinks.append([b, sink])
class p25_demod_fb(p25_demod_base):
def __init__(self,
input_rate = None,
+ filter_type = None,
+ excess_bw = _def_excess_bw,
+ if_rate = _def_if_rate,
symbol_rate = _def_symbol_rate):
"""
Hierarchical block for P25 demodulation.
@@ -106,16 +177,25 @@ class p25_demod_fb(p25_demod_base):
@type input_rate: int
"""
- gr.hier_block2.__init__(self, "p25_demod_fb",
+ gr.hier_block2.__init__(self, "p25_demod_fb",
gr.io_signature(1, 1, gr.sizeof_float), # Input signature
gr.io_signature(1, 1, gr.sizeof_char)) # Output signature
- p25_demod_base.__init__(self, if_rate=input_rate, symbol_rate=symbol_rate)
+ p25_demod_base.__init__(self, if_rate=if_rate, symbol_rate=symbol_rate, filter_type=filter_type)
self.input_rate = input_rate
+ self.if_rate = if_rate
self.float_sink = None
-
- self.connect(self, self.baseband_amp, self.symbol_filter, self.fsk4_demod, self.slicer, self)
+ if input_rate != if_rate:
+ assert if_rate < input_rate
+ assert input_rate % if_rate == 0 ### input rate must be multiple of if rate
+ decim = input_rate // if_rate
+ maxf = min(if_rate // 2, 6000) ### lpf cutoff at most 6 KHz
+ lpf_coeffs = filter.firdes.low_pass(1.0, input_rate, maxf, maxf//8, filter.firdes.WIN_HAMMING)
+ self.bb_decim = filter.fir_filter_fff(decim, lpf_coeffs)
+ self.connect(self, self.bb_decim, self.baseband_amp, self.symbol_filter, self.fsk4_demod, self.slicer, self)
+ else:
+ self.connect(self, self.baseband_amp, self.symbol_filter, self.fsk4_demod, self.slicer, self)
def disconnect_float(self):
# assumes lock held or init
@@ -135,12 +215,15 @@ class p25_demod_cb(p25_demod_base):
def __init__(self,
input_rate = None,
demod_type = 'cqpsk',
+ filter_type = None,
+ excess_bw = _def_excess_bw,
relative_freq = 0,
offset = 0,
if_rate = _def_if_rate,
gain_mu = _def_gain_mu,
costas_alpha = _def_costas_alpha,
- symbol_rate = _def_symbol_rate):
+ symbol_rate = _def_symbol_rate,
+ use_old_decim = False):
"""
Hierarchical block for P25 demodulation.
@@ -149,11 +232,11 @@ class p25_demod_cb(p25_demod_base):
@type input_rate: int
"""
- gr.hier_block2.__init__(self, "p25_demod_cb",
+ gr.hier_block2.__init__(self, "p25_demod_cb",
gr.io_signature(1, 1, gr.sizeof_gr_complex), # Input signature
gr.io_signature(1, 1, gr.sizeof_char)) # Output signature
# gr.io_signature(0, 0, 0)) # Output signature
- p25_demod_base.__init__(self, if_rate=if_rate, symbol_rate=symbol_rate)
+ p25_demod_base.__init__(self, if_rate=if_rate, symbol_rate=symbol_rate, filter_type=filter_type)
self.input_rate = input_rate
self.if_rate = if_rate
@@ -164,25 +247,65 @@ class p25_demod_cb(p25_demod_base):
self.lo_freq = 0
self.float_sink = None
self.complex_sink = None
+ self.if1 = 0
+ self.if2 = 0
+ self.t_cache = {}
+ if filter_type == 'rrc':
+ self.set_baseband_gain(0.61)
- # local osc
- self.lo = analog.sig_source_c (input_rate, analog.GR_SIN_WAVE, 0, 1.0, 0)
self.mixer = blocks.multiply_cc()
- lpf_coeffs = filter.firdes.low_pass(1.0, input_rate, 7250, 725, filter.firdes.WIN_HANN)
- decimation = int(input_rate / if_rate)
- self.lpf = filter.fir_filter_ccf(decimation, lpf_coeffs)
-
- resampled_rate = float(input_rate) / float(decimation) # rate at output of self.lpf
-
- self.arb_resampler = filter.pfb.arb_resampler_ccf(
- float(self.if_rate) / resampled_rate)
-
- self.connect(self, (self.mixer, 0))
- self.connect(self.lo, (self.mixer, 1))
- self.connect(self.mixer, self.lpf, self.arb_resampler)
+ if use_old_decim:
+ decimator_values = None # disable two stage decimator
+ else:
+ decimator_values = get_decim(input_rate)
+ if decimator_values:
+ self.decim, self.decim2 = decimator_values
+ self.if1 = input_rate / self.decim
+ self.if2 = self.if1 / self.decim2
+ sys.stderr.write( 'Using two-stage decimator for speed=%d, decim=%d/%d if1=%d if2=%d\n' % (input_rate, self.decim, self.decim2, self.if1, self.if2))
+ bpf_coeffs = filter.firdes.complex_band_pass(1.0, input_rate, -self.if1/2, self.if1/2, self.if1/2, filter.firdes.WIN_HAMMING)
+ self.t_cache[0] = bpf_coeffs
+ fa = 6250
+ fb = self.if2 / 2
+ if filter_type == 'nxdn' and self.symbol_rate == 2400: # nxdn48 6.25 KHz
+ fa = 3125
+ lpf_coeffs = filter.firdes.low_pass(1.0, self.if1, (fb+fa)/2, fb-fa, filter.firdes.WIN_HAMMING)
+ self.bpf = filter.fir_filter_ccc(self.decim, bpf_coeffs)
+ self.lpf = filter.fir_filter_ccf(self.decim2, lpf_coeffs)
+ resampled_rate = self.if2
+ self.relative_limit = (input_rate // 2) - (self.if1 // 2)
+ self.bfo = analog.sig_source_c (self.if1, analog.GR_SIN_WAVE, 0, 1.0, 0)
+ self.connect(self, self.bpf, (self.mixer, 0))
+ self.connect(self.bfo, (self.mixer, 1))
+ else:
+ sys.stderr.write( 'Unable to use two-stage decimator for speed=%d\n' % (input_rate))
+ # local osc
+ self.lo = analog.sig_source_c (input_rate, analog.GR_SIN_WAVE, 0, 1.0, 0)
+ f1 = 7250
+ f2 = 1450
+ if filter_type == 'nxdn' and self.symbol_rate == 2400: # nxdn48 6.25 KHz
+ f1 = 3125
+ f2 = 625
+ lpf_coeffs = filter.firdes.low_pass(1.0, input_rate, f1, f2, filter.firdes.WIN_HANN)
+ decimation = int(input_rate / if_rate)
+ self.lpf = filter.fir_filter_ccf(decimation, lpf_coeffs)
+ resampled_rate = float(input_rate) / float(decimation) # rate at output of self.lpf
+ self.relative_limit = (input_rate // 2) - f1
+ self.connect(self, (self.mixer, 0))
+ self.connect(self.lo, (self.mixer, 1))
+ self.connect(self.mixer, self.lpf)
+
+
+ if self.if_rate != resampled_rate:
+ self.if_out = filter.pfb.arb_resampler_ccf(float(self.if_rate) / resampled_rate)
+ self.connect(self.lpf, self.if_out)
+ else:
+ self.if_out = self.lpf
- levels = [ -2.0, 0.0, 2.0, 4.0 ]
- self.slicer = op25_repeater.fsk4_slicer_fb(levels)
+ fa = 6250
+ fb = fa + 625
+ cutoff_coeffs = filter.firdes.low_pass(1.0, self.if_rate, (fb+fa)/2, fb-fa, filter.firdes.WIN_HANN)
+ self.cutoff = filter.fir_filter_ccf(1, cutoff_coeffs)
omega = float(self.if_rate) / float(self.symbol_rate)
gain_omega = 0.1 * gain_mu * gain_mu
@@ -214,31 +337,62 @@ class p25_demod_cb(p25_demod_base):
self.set_relative_frequency(relative_freq)
+ def get_error_band(self):
+ return int(self.clock.get_error_band())
+
+ def get_freq_error(self): # get error in Hz (approx).
+ return int(self.clock.get_freq_error() * self.symbol_rate)
+
+ def is_muted(self):
+ return self.clock.is_muted()
+
+ def set_muted(self, v):
+ self.clock.set_muted(v)
+
def set_omega(self, omega):
sps = self.if_rate / float(omega)
if sps == self.sps:
return
self.sps = sps
- print 'set_omega %d %f' % (omega, sps)
+ print ('set_omega %d %f' % (omega, sps))
self.clock.set_omega(self.sps)
def set_relative_frequency(self, freq):
- if abs(freq) > self.input_rate/2:
+ N = 500 # Hz, we tune the bpf in discrete steps of size N
+ if abs(freq) > self.relative_limit:
#print 'set_relative_frequency: error, relative frequency %d exceeds limit %d' % (freq, self.input_rate/2)
return False
if freq == self.lo_freq:
return True
- #print 'set_relative_frequency', freq
self.lo_freq = freq
- self.lo.set_frequency(self.lo_freq)
+ if self.if1:
+ r = freq % N
+ bpf_freq = freq - r
+ if r > N//2:
+ bpf_freq += N # round to nearest N Hz
+ if bpf_freq not in self.t_cache.keys():
+ if abs(bpf_freq) > self.relative_limit:
+ sys.stderr.write( 'set_relative_frequency: error, relative frequency %d(%d) exceeds limit %d\n' % (bpf_freq, freq, self.relative_limit))
+ return False
+ self.t_cache[bpf_freq] = filter.firdes.complex_band_pass(1.0, self.input_rate, -bpf_freq - self.if1/2, -bpf_freq + self.if1/2, self.if1/2, filter.firdes.WIN_HAMMING)
+ self.bpf.set_taps(self.t_cache[bpf_freq])
+ bfo_f = self.decim * -freq / float(self.input_rate)
+ bfo_f -= int(bfo_f)
+ while bfo_f < -0.5:
+ bfo_f += 1.0
+ while bfo_f > 0.5:
+ bfo_f -= 1.0
+ self.bfo.set_frequency(-bfo_f * self.if1)
+ else:
+ self.lo.set_frequency(self.lo_freq)
return True
# assumes lock held or init
def disconnect_chain(self):
if self.connect_state == 'cqpsk':
- self.disconnect(self.arb_resampler, self.agc, self.clock, self.diffdec, self.to_float, self.rescale, self.slicer)
+ self.disconnect(self.if_out, self.cutoff, self.agc, self.clock, self.diffdec, self.to_float, self.rescale, self.slicer)
elif self.connect_state == 'fsk4':
- self.disconnect(self.arb_resampler, self.fm_demod, self.baseband_amp, self.symbol_filter, self.fsk4_demod, self.slicer)
+ self.disconnect(self.if_out, self.cutoff, self.fm_demod, self.baseband_amp, self.symbol_filter, self.fsk4_demod, self.slicer)
self.connect_state = None
# assumes lock held or init
@@ -248,11 +402,11 @@ class p25_demod_cb(p25_demod_base):
self.disconnect_chain()
self.connect_state = demod_type
if demod_type == 'fsk4':
- self.connect(self.arb_resampler, self.fm_demod, self.baseband_amp, self.symbol_filter, self.fsk4_demod, self.slicer)
+ self.connect(self.if_out, self.cutoff, self.fm_demod, self.baseband_amp, self.symbol_filter, self.fsk4_demod, self.slicer)
elif demod_type == 'cqpsk':
- self.connect(self.arb_resampler, self.agc, self.clock, self.diffdec, self.to_float, self.rescale, self.slicer)
+ self.connect(self.if_out, self.cutoff, self.agc, self.clock, self.diffdec, self.to_float, self.rescale, self.slicer)
else:
- print 'connect_chain failed, type: %s' % demod_type
+ print ('connect_chain failed, type: %s' % demod_type)
assert 0 == 1
if self.float_sink is not None:
self.connect_float(self.float_sink[1])
@@ -274,28 +428,24 @@ class p25_demod_cb(p25_demod_base):
self.connect(self.fsk4_demod, sink)
self.float_sink = [self.fsk4_demod, sink]
else:
- print 'connect_float: state error', self.connect_state
+ print ('connect_float: state error', self.connect_state)
assert 0 == 1
- def disconnect_complex(self):
- # assumes lock held or init
- if not self.complex_sink:
- return
- self.disconnect(self.complex_sink[0], self.complex_sink[1])
- self.complex_sink = None
-
def connect_complex(self, src, sink):
# assumes lock held or init
- self.disconnect_complex()
if src == 'clock':
self.connect(self.clock, sink)
- self.complex_sink = [self.clock, sink]
elif src == 'diffdec':
self.connect(self.diffdec, sink)
- self.complex_sink = [self.diffdec, sink]
elif src == 'mixer':
- self.connect(self.mixer, sink)
- self.complex_sink = [self.mixer, sink]
+ self.connect(self.agc, sink)
elif src == 'src':
self.connect(self, sink)
- self.complex_sink = [self, sink]
+ elif src == 'bpf':
+ self.connect(self.bpf, sink)
+ elif src == 'if_out':
+ self.connect(self.if_out, sink)
+ elif src == 'agc':
+ self.connect(self.agc, sink)
+ elif src == 'cutoff':
+ self.connect(self.cutoff, sink)
diff --git a/op25/gr-op25_repeater/apps/plot-colors.json b/op25/gr-op25_repeater/apps/plot-colors.json
new file mode 100644
index 0000000..dca2dd0
--- /dev/null
+++ b/op25/gr-op25_repeater/apps/plot-colors.json
@@ -0,0 +1,7 @@
+{
+ "label_color": "#ffffff",
+ "tic_color": "#cccccc",
+ "border_color": "#cccccc",
+ "plot_color": "#00a000",
+ "background_color": "#000000"
+}
diff --git a/op25/gr-op25_repeater/apps/runudp.sh b/op25/gr-op25_repeater/apps/runudp.sh
new file mode 100644
index 0000000..7ece287
--- /dev/null
+++ b/op25/gr-op25_repeater/apps/runudp.sh
@@ -0,0 +1,7 @@
+#! /bin/sh
+
+t="-T 900.tsv"
+sr="-S 120000"
+v="-v 255"
+
+python3 rx.py --args "udp:127.0.0.1:25252" -f 924975000 $sr -q 0 -D fsk4 -P "datascope" -V -w -v 255 $t $v 2> stderr.2
diff --git a/op25/gr-op25_repeater/apps/rx.py b/op25/gr-op25_repeater/apps/rx.py
index 95f7cfe..56e4ac0 100755
--- a/op25/gr-op25_repeater/apps/rx.py
+++ b/op25/gr-op25_repeater/apps/rx.py
@@ -1,8 +1,8 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
# Copyright 2008-2011 Steve Glass
#
-# Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 Max H. Parke KA1RBI
+# Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Max H. Parke KA1RBI
#
# Copyright 2003,2004,2005,2006 Free Software Foundation, Inc.
# (from radiorausch)
@@ -44,7 +44,7 @@ try:
except:
pass
-from gnuradio import audio, eng_notation, gr, gru, filter, blocks, fft, analog, digital
+from gnuradio import audio, eng_notation, gr, filter, blocks, fft, analog, digital
from gnuradio.eng_option import eng_option
from math import pi
from optparse import OptionParser
@@ -64,9 +64,14 @@ from gr_gnuplot import constellation_sink_c
from gr_gnuplot import fft_sink_c
from gr_gnuplot import symbol_sink_f
from gr_gnuplot import eye_sink_f
+from gr_gnuplot import mixer_sink_c
+from gr_gnuplot import setup_correlation
+from gr_gnuplot import sync_plot
-from terminal import curses_terminal
-from sockaudio import socket_audio
+from terminal import op25_terminal
+from sockaudio import audio_thread
+
+from sql_dbi import sql_dbi
#speeds = [300, 600, 900, 1200, 1440, 1800, 1920, 2400, 2880, 3200, 3600, 3840, 4000, 4800, 6000, 6400, 7200, 8000, 9600, 14400, 19200]
speeds = [4800, 6000]
@@ -75,101 +80,106 @@ os.environ['IMBE'] = 'soft'
WIRESHARK_PORT = 23456
+_def_interval = 3.0 # sec
+_def_file_dir = '../www/images'
+_def_error_update_time = 3.0 # freq error tracking interval
+_def_lo_adj_limit = 2500 # Hz
+
+class udp_source_c(gr.hier_block2):
+ def __init__(self, hostname, udp_port):
+ gr.hier_block2.__init__(self, "udp_source_c",
+ gr.io_signature(0, 0, 0), # Input signature
+ gr.io_signature(1, 1, gr.sizeof_gr_complex)) # Output signature
+ bufsize = 32000
+ self.src = blocks.udp_source(gr.sizeof_gr_complex, hostname, udp_port, payload_size = bufsize)
+ self.sample_rate = 0
+ self.connect(self.src, self)
+
+ def set_center_freq(self, f):
+ sys.stderr.write('udp source: set_center_freq(%s) ignored\n' % f)
+
+ def set_bandwidth(self, f):
+ sys.stderr.write('udp source: set_bandwidth(%s) ignored\n' % f)
+
+ def set_sample_rate(self, f):
+ self.sample_rate = f
+ return f
+
+ def set_antenna(self, a):
+ sys.stderr.write('udp source: set_antenna(%s) ignored\n' % a)
+
# The P25 receiver
#
class p25_rx_block (gr.top_block):
# Initialize the P25 receiver
#
- def __init__(self):
+ def __init__(self, options):
self.trunk_rx = None
- self.kill_sink = None
+ self.plot_sinks = []
gr.top_block.__init__(self)
- # command line argument parsing
- parser = OptionParser(option_class=eng_option)
- parser.add_option("--args", type="string", default="", help="device args")
- parser.add_option("--antenna", type="string", default="", help="select antenna")
- parser.add_option("-a", "--audio", action="store_true", default=False, help="use direct audio input")
- parser.add_option("-A", "--audio-if", action="store_true", default=False, help="soundcard IF mode (use --calibration to set IF freq)")
- parser.add_option("-I", "--audio-input", type="string", default="", help="pcm input device name. E.g., hw:0,0 or /dev/dsp")
- parser.add_option("-i", "--input", default=None, help="input file name")
- parser.add_option("-b", "--excess-bw", type="eng_float", default=0.2, help="for RRC filter", metavar="Hz")
- parser.add_option("-c", "--calibration", type="eng_float", default=0.0, help="USRP offset or audio IF frequency", metavar="Hz")
- parser.add_option("-C", "--costas-alpha", type="eng_float", default=0.04, help="value of alpha for Costas loop", metavar="Hz")
- parser.add_option("-D", "--demod-type", type="choice", default="cqpsk", choices=('cqpsk', 'fsk4'), help="cqpsk | fsk4")
- parser.add_option("-P", "--plot-mode", type="choice", default=None, choices=(None, 'constellation', 'fft', 'symbol', 'datascope'), help="constellation | fft | symbol | datascope")
- parser.add_option("-f", "--frequency", type="eng_float", default=0.0, help="USRP center frequency", metavar="Hz")
- parser.add_option("-F", "--ifile", type="string", default=None, help="read input from complex capture file")
- parser.add_option("-H", "--hamlib-model", type="int", default=None, help="specify model for hamlib")
- parser.add_option("-s", "--seek", type="int", default=0, help="ifile seek in K")
- parser.add_option("-L", "--logfile-workers", type="int", default=None, help="number of demodulators to instantiate")
- parser.add_option("-S", "--sample-rate", type="int", default=320e3, help="source samp rate")
- parser.add_option("-t", "--tone-detect", action="store_true", default=False, help="use experimental tone detect algorithm")
- parser.add_option("-T", "--trunk-conf-file", type="string", default=None, help="trunking config file name")
- parser.add_option("-v", "--verbosity", type="int", default=0, help="message debug level")
- parser.add_option("-V", "--vocoder", action="store_true", default=False, help="voice codec")
- parser.add_option("-o", "--offset", type="eng_float", default=0.0, help="tuning offset frequency [to circumvent DC offset]", metavar="Hz")
- parser.add_option("-p", "--pause", action="store_true", default=False, help="block on startup")
- parser.add_option("-w", "--wireshark", action="store_true", default=False, help="output data to Wireshark")
- parser.add_option("-W", "--wireshark-host", type="string", default="127.0.0.1", help="Wireshark host")
- parser.add_option("-r", "--raw-symbols", type="string", default=None, help="dump decoded symbols to file")
- parser.add_option("-R", "--rx-subdev-spec", type="subdev", default=(0, 0), help="select USRP Rx side A or B (default=A)")
- parser.add_option("-g", "--gain", type="eng_float", default=None, help="set USRP gain in dB (default is midpoint) or set audio gain")
- parser.add_option("-G", "--gain-mu", type="eng_float", default=0.025, help="gardner gain")
- parser.add_option("-N", "--gains", type="string", default=None, help="gain settings")
- parser.add_option("-O", "--audio-output", type="string", default="default", help="audio output device name")
- parser.add_option("-U", "--udp-player", action="store_true", default=False, help="enable built-in udp audio player")
- parser.add_option("-q", "--freq-corr", type="eng_float", default=0.0, help="frequency correction")
- parser.add_option("-d", "--fine-tune", type="eng_float", default=0.0, help="fine tuning")
- parser.add_option("-2", "--phase2-tdma", action="store_true", default=False, help="enable phase2 tdma decode")
- parser.add_option("-Z", "--decim-amt", type="int", default=1, help="spectrum decimation")
- (options, args) = parser.parse_args()
- if len(args) != 0:
- parser.print_help()
- sys.exit(1)
-
self.channel_rate = 0
self.baseband_input = False
self.rtl_found = False
self.channel_rate = options.sample_rate
self.fft_sink = None
+ self.last_error_update = 0
+ self.error_band = 0
+ self.tuning_error = 0
+ self.freq_correction = 0
+ self.last_set_freq = 0
+ self.last_set_freq_at = time.time()
+ self.last_change_freq = 0
+ self.last_change_freq_at = time.time()
+ self.last_freq_params = {'freq' : 0.0, 'tgid' : None, 'tag' : "", 'tdma' : None}
+ self.next_status_png = time.time()
+ self.last_process_update = 0
+ self.sql_db = sql_dbi()
+ self.last_center_freq = 0
+ self.last_relative_freq = 0
self.src = None
- if not options.input:
+ if (not options.input) and (not options.audio) and (not options.audio_if) and (not options.args.startswith('udp:')):
# check if osmocom is accessible
try:
import osmosdr
self.src = osmosdr.source(options.args)
except Exception:
- print "osmosdr source_c creation failure"
+ print ("osmosdr source_c creation failure")
ignore = True
- if "rtl" in options.args.lower():
- #print "'rtl' has been found in options.args (%s)" % (options.args)
+ if any(x in options.args.lower() for x in ['rtl', 'airspy', 'hackrf', 'uhd']):
+ #print ("'rtl' has been found in options.args (%s)" % (options.args))
self.rtl_found = True
gain_names = self.src.get_gain_names()
- for name in gain_names:
- range = self.src.get_gain_range(name)
- print "gain: name: %s range: start %d stop %d step %d" % (name, range[0].start(), range[0].stop(), range[0].step())
+ if 0: # pending fix crash ### for name in gain_names:
+ range1 = self.src.get_gain_range(name)
+ print ("gain: name: %s range: start %d stop %d step %d" % (name, range1[0].start(), range1[0].stop(), range1[0].step()))
if options.gains:
- for tuple in options.gains.split(","):
- name, gain = tuple.split(":")
+ for tup in options.gains.split(","):
+ name, gain = tup.split(":")
gain = int(gain)
- print "setting gain %s to %d" % (name, gain)
+ print ("setting gain %s to %d" % (name, gain))
self.src.set_gain(gain, name)
rates = self.src.get_sample_rates()
try:
- print 'supported sample rates %d-%d step %d' % (rates.start(), rates.stop(), rates.step())
+ print ('supported sample rates %d-%d step %d' % (rates.start(), rates.stop(), rates.step()))
except:
pass # ignore
if options.freq_corr:
self.src.set_freq_corr(options.freq_corr)
+ elif (not options.input) and (not options.audio) and (not options.audio_if) and options.args.startswith('udp:'):
+ hostinfo = options.args.split(':')
+ hostname = hostinfo[1]
+ udp_port = int(hostinfo[2])
+ self.src = udp_source_c(hostname, udp_port)
+ sys.stderr.write('started udp listener: %s %s\n' % (hostname, udp_port))
if options.audio:
self.channel_rate = 48000
@@ -184,8 +194,9 @@ class p25_rx_block (gr.top_block):
# setup (read-only) attributes
self.symbol_rate = 4800
self.symbol_deviation = 600.0
- self.basic_rate = 48000
+ self.basic_rate = 24000
_default_speed = 4800
+ self.options = options
# keep track of flow graph connections
self.cnxns = []
@@ -195,9 +206,7 @@ class p25_rx_block (gr.top_block):
self.constellation_scope_connected = False
- self.options = options
-
- for i in xrange(len(speeds)):
+ for i in range(len(speeds)):
if speeds[i] == _default_speed:
self.current_speed = i
self.default_speed_idx = i
@@ -207,32 +216,34 @@ class p25_rx_block (gr.top_block):
# wait for gdb
if options.pause:
- print 'Ready for GDB to attach (pid = %d)' % (os.getpid(),)
+ print ('Ready for GDB to attach (pid = %d)' % (os.getpid(),))
raw_input("Press 'Enter' to continue...")
- self.input_q = gr.msg_queue(10)
+ self.input_q = gr.msg_queue(20)
self.output_q = gr.msg_queue(10)
# configure specified data source
if options.input:
self.open_file(options.input)
- elif options.frequency:
- self.open_usrp()
elif options.audio_if:
self.open_audio_c(self.channel_rate, options.gain, options.audio_input)
elif options.audio:
self.open_audio(self.channel_rate, options.gain, options.audio_input)
elif options.ifile:
self.open_ifile(self.channel_rate, options.gain, options.ifile, options.seek)
+ elif (self.rtl_found or options.frequency):
+ self.open_usrp()
else:
pass
- # attach terminal thread
- self.terminal = curses_terminal(self.input_q, self.output_q)
+ # attach terminal thread and make sure currently tuned frequency is displayed
+ self.terminal = op25_terminal(self.input_q, self.output_q, self.options.terminal_type)
+ if self.terminal is None:
+ sys.stderr.write('warning: no terminal attached\n')
# attach audio thread
if self.options.udp_player:
- self.audio = socket_audio("127.0.0.1", WIRESHARK_PORT, self.options.audio_output)
+ self.audio = audio_thread("127.0.0.1", self.options.wireshark_port, self.options.audio_output, False, self.options.audio_gain)
else:
self.audio = None
@@ -241,72 +252,98 @@ class p25_rx_block (gr.top_block):
def __build_graph(self, source, capture_rate):
global speeds
global WIRESHARK_PORT
- # tell the scope the source rate
+
+ sps = 5 # samples / symbol
+ if_rate = sps * 4800
self.rx_q = gr.msg_queue(100)
udp_port = 0
- if self.options.udp_player or self.options.wireshark or (self.options.wireshark_host != "127.0.0.1"):
- udp_port = WIRESHARK_PORT
+ vocoder = self.options.vocoder
+ wireshark = self.options.wireshark
+ wireshark_host = self.options.wireshark_host
+ if self.options.udp_player:
+ vocoder = True
+ wireshark = True
+ wireshark_host = "127.0.0.1"
+
+ if wireshark or (wireshark_host != "127.0.0.1"):
+ udp_port = self.options.wireshark_port
self.tdma_state = False
self.xor_cache = {}
- self.fft_state = False
- self.c4fm_state = False
- self.fscope_state = False
- self.corr_state = False
- self.fac_state = False
- self.fsk4_demod_connected = False
- self.psk_demod_connected = False
- self.fsk4_demod_mode = False
- self.corr_i_chan = False
-
if self.baseband_input:
- self.demod = p25_demodulator.p25_demod_fb(input_rate=capture_rate)
+ self.demod = p25_demodulator.p25_demod_fb(input_rate=capture_rate, excess_bw=self.options.excess_bw,if_rate=if_rate)
else: # complex input
# local osc
- self.lo_freq = self.options.offset + self.options.fine_tune
- if self.options.audio_if or self.options.ifile or self.options.input:
+ self.lo_freq = self.options.offset
+ if self.options.ifile or self.options.input:
self.lo_freq += self.options.calibration
self.demod = p25_demodulator.p25_demod_cb( input_rate = capture_rate,
demod_type = self.options.demod_type,
relative_freq = self.lo_freq,
offset = self.options.offset,
- if_rate = 48000,
+ if_rate = if_rate,
gain_mu = self.options.gain_mu,
costas_alpha = self.options.costas_alpha,
- symbol_rate = self.symbol_rate)
+ excess_bw = self.options.excess_bw,
+ symbol_rate = self.symbol_rate,
+ use_old_decim = True if self.options.audio_if else False)
num_ambe = 0
if self.options.phase2_tdma:
num_ambe = 1
- self.decoder = p25_decoder.p25_decoder_sink_b(dest='audio', do_imbe=True, num_ambe=num_ambe, wireshark_host=self.options.wireshark_host, udp_port=udp_port, do_msgq = True, msgq=self.rx_q, audio_output=self.options.audio_output, debug=self.options.verbosity)
+ self.decoder = p25_decoder.p25_decoder_sink_b(dest='audio', do_imbe=vocoder, num_ambe=num_ambe, wireshark_host=wireshark_host, udp_port=udp_port, do_msgq = True, msgq=self.rx_q, audio_output=self.options.audio_output, debug=self.options.verbosity)
# connect it all up
self.connect(source, self.demod, self.decoder)
- if self.options.plot_mode == 'constellation':
- assert self.options.demod_type == 'cqpsk' ## constellation requires cqpsk demod-type
- self.constellation_sink = constellation_sink_c()
- self.demod.connect_complex('diffdec', self.constellation_sink)
- self.kill_sink = self.constellation_sink
- elif self.options.plot_mode == 'symbol':
- self.symbol_sink = symbol_sink_f()
- self.demod.connect_float(self.symbol_sink)
- self.kill_sink = self.symbol_sink
- elif self.options.plot_mode == 'fft':
- self.fft_sink = fft_sink_c()
- self.spectrum_decim = filter.rational_resampler_ccf(1, self.options.decim_amt)
- self.connect(self.spectrum_decim, self.fft_sink)
- self.demod.connect_complex('src', self.spectrum_decim)
- self.kill_sink = self.fft_sink
- elif self.options.plot_mode == 'datascope':
- assert self.options.demod_type == 'fsk4' ## datascope requires fsk4 demod-type
- self.eye_sink = eye_sink_f(sps=10)
- self.demod.connect_bb('symbol_filter', self.eye_sink)
- self.kill_sink = self.eye_sink
+ if self.baseband_input:
+ sps = if_rate // 4800
+ plot_modes = []
+ if self.options.plot_mode is not None:
+ plot_modes = self.options.plot_mode.split(',')
+ for plot_mode in plot_modes:
+ if plot_mode == 'constellation':
+ assert self.options.demod_type == 'cqpsk' ## constellation requires cqpsk demod-type
+ sink = constellation_sink_c()
+ self.plot_sinks.append(sink)
+ self.demod.connect_complex('diffdec', sink)
+ elif plot_mode == 'symbol':
+ sink = symbol_sink_f()
+ self.plot_sinks.append(sink)
+ self.demod.connect_float(sink)
+ elif plot_mode == 'fft':
+ sink = fft_sink_c()
+ self.plot_sinks.append(sink)
+ self.spectrum_decim = filter.rational_resampler_ccf(1, self.options.decim_amt)
+ self.connect(self.spectrum_decim, sink)
+ self.demod.connect_complex('src', self.spectrum_decim)
+ elif plot_mode == 'mixer':
+ sink = mixer_sink_c()
+ self.plot_sinks.append(sink)
+ self.demod.connect_complex('mixer', sink)
+ elif plot_mode == 'datascope':
+ assert self.options.demod_type == 'fsk4' ## datascope requires fsk4 demod-type
+ sink = eye_sink_f(sps=sps)
+ self.plot_sinks.append(sink)
+ self.demod.connect_bb('symbol_filter', sink)
+ elif plot_mode == 'correlation':
+ assert self.options.demod_type == 'fsk4' ## correlation plot requires fsk4 demod type
+ self.plot_sinks += setup_correlation(sps, "", self.demod.connect_bb)
+ elif plot_mode == 'sync':
+ assert self.options.demod_type == 'cqpsk' ## sync plot requires cqpsk demod-type
+ sink = sync_plot(block = self.demod.clock)
+ self.plot_sinks.append(sink)
+ # no flowgraph connection in this plot
+ else:
+ raise ValueError('unsupported plot type: %s' % plot_mode)
+ if self.is_http_term():
+ for sink in self.plot_sinks:
+ sink.gnuplot.set_interval(_def_interval)
+ sink.gnuplot.set_output_dir(_def_file_dir)
if self.options.raw_symbols:
self.sink_sf = blocks.file_sink(gr.sizeof_char, self.options.raw_symbols)
@@ -316,17 +353,26 @@ class p25_rx_block (gr.top_block):
if self.options.phase2_tdma:
num_ambe = 2
if self.options.logfile_workers:
- for i in xrange(self.options.logfile_workers):
+ for i in range(self.options.logfile_workers):
demod = p25_demodulator.p25_demod_cb(input_rate=capture_rate,
demod_type=self.options.demod_type,
offset=self.options.offset)
- decoder = p25_decoder.p25_decoder_sink_b(debug = self.options.verbosity, do_imbe = self.options.vocoder, num_ambe=num_ambe)
+ decoder = p25_decoder.p25_decoder_sink_b(debug = self.options.verbosity, do_imbe = vocoder, num_ambe=num_ambe)
logfile_workers.append({'demod': demod, 'decoder': decoder, 'active': False})
self.connect(source, demod, decoder)
- self.trunk_rx = trunking.rx_ctl(frequency_set = self.change_freq, debug = self.options.verbosity, conf_file = self.options.trunk_conf_file, logfile_workers=logfile_workers)
+ self.trunk_rx = trunking.rx_ctl(frequency_set = self.change_freq, debug = self.options.verbosity, conf_file = self.options.trunk_conf_file, logfile_workers=logfile_workers, send_event=self.send_event)
- self.du_watcher = du_queue_watcher(self.rx_q, self.trunk_rx.process_qmsg)
+ self.du_watcher = du_queue_watcher(self.rx_q, self.preprocess_qmsg)
+
+ def preprocess_qmsg(self, msg):
+ self.trunk_rx.process_qmsg(msg)
+ if self.options.freq_error_tracking:
+ if self.last_error_update + _def_error_update_time > time.time() \
+ or self.last_change_freq_at + _def_error_update_time > time.time():
+ pass
+ else:
+ self.error_tracking()
# Connect up the flow graph
#
@@ -360,55 +406,135 @@ class p25_rx_block (gr.top_block):
def configure_tdma(self, params):
if params['tdma'] is not None and not self.options.phase2_tdma:
- print '***TDMA request for frequency %d failed- phase2_tdma option not enabled' % params['freq']
+ sys.stderr.write("***TDMA request for frequency %d failed- phase2_tdma option not enabled\n" % params['freq'])
return
set_tdma = False
if params['tdma'] is not None:
set_tdma = True
+ self.decoder.set_slotid(params['tdma'])
+ self.demod.clock.set_tdma(set_tdma)
if set_tdma == self.tdma_state:
return # already in desired state
self.tdma_state = set_tdma
if set_tdma:
- self.decoder.set_slotid(params['tdma'])
hash = '%x%x%x' % (params['nac'], params['sysid'], params['wacn'])
if hash not in self.xor_cache:
self.xor_cache[hash] = lfsr.p25p2_lfsr(params['nac'], params['sysid'], params['wacn']).xor_chars
self.decoder.set_xormask(self.xor_cache[hash], hash)
- sps = self.basic_rate / 6000
+ self.decoder.set_nac(params['nac'])
+ rate = 6000
else:
- sps = self.basic_rate / 4800
+ rate = 4800
+ sps = self.basic_rate / rate
+ self.demod.set_symbol_rate(rate) # this and the foll. call should be merged?
self.demod.clock.set_omega(float(sps))
+ def error_tracking(self):
+ if self.last_error_update + _def_error_update_time > time.time() \
+ or self.last_change_freq_at + _def_error_update_time > time.time():
+ return
+ self.last_error_update = time.time()
+ band = self.demod.get_error_band()
+ freq_error = self.demod.get_freq_error()
+ if band:
+ self.error_band += band
+ self.freq_correction += freq_error * 0.15
+ self.freq_correction = int(self.freq_correction)
+ if self.freq_correction > 600:
+ self.freq_correction -= 1200
+ self.error_band += 1
+ elif self.freq_correction < -600:
+ self.freq_correction += 1200
+ self.error_band -= 1
+ self.tuning_error = int(self.error_band * 1200 + self.freq_correction)
+ e = 0
+ if self.last_change_freq > 0:
+ e = (self.tuning_error*1e6) / float(self.last_change_freq)
+ if self.options.verbosity >= 10:
+ sys.stderr.write('frequency_tracking\t%d\t%d\t%d\t%d\t%f\n' % (freq_error, self.error_band, self.tuning_error, self.freq_correction, e))
+
+ self.adjust_lo_freq() # adjust lo based on updated tuning error
+
+ d = {'time': time.time(), 'json_type': 'freq_error_tracking', 'name': 'rx.py', 'device': self.options.args, 'freq_error': freq_error, 'band': band, 'error_band': self.error_band, 'tuning_error': self.tuning_error, 'freq_correction': self.freq_correction}
+ js = json.dumps(d)
+ if self.options.verbosity > 0:
+ sys.stderr.write('%f error tracking: %s\n' % (time.time(), js))
+ if self.input_q.full_p():
+ if self.options.verbosity > 0:
+ sys.stderr.write('%f error_tracking: qfull\n' % (time.time()))
+ return
+ msg = gr.message().make_from_string(js, -4, 0, 0)
+ self.input_q.insert_tail(msg)
+
+ def adjust_lo_freq(self):
+ # apply tuning error updates to adjust lo frequency
+ center_freq = self.last_center_freq
+ offset = self.options.offset
+ if not center_freq:
+ new_lo_freq = offset + self.tuning_error
+ else:
+ new_lo_freq = self.last_relative_freq + offset + self.tuning_error
+ if abs(self.lo_freq - new_lo_freq) > _def_lo_adj_limit:
+ sys.stderr.write('adjust_lo_freq: adjustment exceeds limit: previous %d requested %d\n' % (self.lo_freq, new_lo_freq))
+ return
+ self.lo_freq = new_lo_freq
+ self.demod.set_relative_frequency(self.lo_freq)
+
def change_freq(self, params):
+ if self.options.verbosity > 1:
+ sys.stderr.write('%f change_freq: %s\n' % (time.time(), params))
+ self.last_freq_params = params
freq = params['freq']
- offset = params['offset']
+ offset = self.options.offset
center_freq = params['center_frequency']
- fine_tune = self.options.fine_tune
+ self.last_center_freq = center_freq
+ if self.options.freq_error_tracking:
+ self.error_tracking()
+ if self.last_change_freq != freq:
+ self.last_change_freq = freq
+ self.last_change_freq_at = time.time()
+
+ self.configure_tdma(params)
if self.options.hamlib_model:
self.hamlib.set_freq(freq)
- elif params['center_frequency']:
- relative_freq = center_freq - freq
- if abs(relative_freq + self.options.offset) > self.channel_rate / 2:
- self.lo_freq = self.options.offset + self.options.fine_tune # relative tune not possible
- self.demod.set_relative_frequency(self.lo_freq) # reset demod relative freq
- self.set_freq(freq + offset) # direct tune instead
- else:
- self.lo_freq = self.options.offset + relative_freq + fine_tune
- if self.demod.set_relative_frequency(self.lo_freq): # relative tune successful
- self.set_freq(center_freq + offset)
- if self.fft_sink:
- self.fft_sink.set_relative_freq(self.lo_freq)
- else:
- self.lo_freq = self.options.offset + self.options.fine_tune # relative tune unsuccessful
- self.demod.set_relative_frequency(self.lo_freq) # reset demod relative freq
- self.set_freq(freq + offset) # direct tune instead
- else:
- self.set_freq(freq + offset)
+ return
+
+ if not center_freq:
+ self.lo_freq = offset + self.tuning_error
+ self.demod.set_relative_frequency(self.lo_freq)
+ self.set_freq(freq)
+ return
+ relative_freq = center_freq - freq
+ self.last_relative_freq = relative_freq
+
+ if abs(relative_freq + offset + self.tuning_error) > self.channel_rate / 2:
+ self.lo_freq = offset + self.tuning_error # relative tune not possible
+ self.demod.set_relative_frequency(self.lo_freq) # reset demod relative freq
+ self.set_freq(freq) # direct tune instead
+ return
+
+ self.lo_freq = relative_freq + offset + self.tuning_error
+ if self.demod.set_relative_frequency(self.lo_freq): # relative tune successful
+ self.set_freq(center_freq)
+ if self.fft_sink:
+ self.fft_sink.set_relative_freq(self.lo_freq)
+ return
+
+ self.lo_freq = offset + self.tuning_error # relative tune unsuccessful
+ self.demod.set_relative_frequency(self.lo_freq) # reset demod relative freq
+ self.set_freq(freq + offset) # direct tune instead
self.configure_tdma(params)
+ self.freq_update()
+ def freq_update(self):
+ if self.input_q.full_p():
+ return
+ params = self.last_freq_params
params['json_type'] = 'change_freq'
+ params['fine_tune'] = self.options.fine_tune
+ params['current_time'] = time.time()
js = json.dumps(params)
msg = gr.message().make_from_string(js, -4, 0, 0)
self.input_q.insert_tail(msg)
@@ -430,7 +556,7 @@ class p25_rx_block (gr.top_block):
if self.rtl_found:
self.src.set_gain(gain, 'LNA')
if self.options.verbosity:
- print 'RTL Gain of %d set to: %.1f' % (gain, self.src.get_gain('LNA'))
+ print ('RTL Gain of %d set to: %.1f' % (gain, self.src.get_gain('LNA')))
else:
if self.baseband_input:
f = 1.0
@@ -439,8 +565,9 @@ class p25_rx_block (gr.top_block):
self.demod.set_baseband_gain(float(gain) * f)
def set_audio_scaler(self, vol):
- #print 'audio scaler: %f' % ((1 / 32768.0) * (vol * 0.1))
- self.decoder.set_scaler_k((1 / 32768.0) * (vol * 0.1))
+ #print ('audio scaler: %f' % ((1 / 32768.0) * (vol * 0.1)))
+ if hasattr(self.decoder, 'set_scaler_k'):
+ self.decoder.set_scaler_k((1 / 32768.0) * (vol * 0.1))
def set_rtl_ppm(self, ppm):
self.src.set_freq_corr(ppm)
@@ -462,11 +589,12 @@ class p25_rx_block (gr.top_block):
"""
if not self.src:
return False
- tune_freq = target_freq + self.options.calibration + self.options.offset
+ self.target_freq = target_freq
+ tune_freq = target_freq + self.options.calibration + self.options.offset + self.options.fine_tune
r = self.src.set_center_freq(tune_freq)
if self.fft_sink:
- self.fft_sink.set_center_freq(tune_freq)
+ self.fft_sink.set_center_freq(target_freq)
self.fft_sink.set_width(self.options.sample_rate)
if r:
@@ -474,6 +602,9 @@ class p25_rx_block (gr.top_block):
#if self.show_debug_info:
# self.myform['baseband'].set_value(r.baseband_freq)
# self.myform['ddc'].set_value(r.dxc_freq)
+ if self.last_set_freq != tune_freq:
+ self.last_set_freq = tune_freq
+ self.last_set_freq_at = time.time()
return True
return False
@@ -509,10 +640,9 @@ class p25_rx_block (gr.top_block):
self.src.set_antenna(self.options.antenna)
self.info["capture-rate"] = capture_rate
self.src.set_bandwidth(capture_rate)
- r = self.src.set_center_freq(self.options.frequency + self.options.calibration+ self.options.offset)
- print 'set_center_freq: %d' % r
+ r = self.src.set_center_freq(self.options.frequency + self.options.calibration+ self.options.offset + self.options.fine_tune)
if not r:
- raise RuntimeError("failed to set USRP frequency")
+ sys.stderr.write("__set_rx_from_osmosdr(): failed to set frequency\n")
# capture file
# if preserve:
if 0:
@@ -534,22 +664,13 @@ class p25_rx_block (gr.top_block):
pickle.dump(self.info, f)
f.close()
- # Adjust the channel offset
- #
- def adjust_channel_offset(self, delta_hz):
- max_delta_hz = 12000.0
- delta_hz *= self.symbol_deviation
- delta_hz = max(delta_hz, -max_delta_hz)
- delta_hz = min(delta_hz, max_delta_hz)
- self.channel_filter.set_center_freq(self.channel_offset - delta_hz+ self.options.offset)
-
def open_ifile(self, capture_rate, gain, input_filename, file_seek):
speed = 96000 # TODO: fixme
ifile = blocks.file_source(gr.sizeof_gr_complex, input_filename, 1)
if file_seek > 0:
rc = ifile.seek(file_seek*1024, gr.SEEK_SET)
assert rc == True
- #print "seek: %d, rc = %d" % (file_seek, rc)
+ #print ("seek: %d, rc = %d" % (file_seek, rc))
throttle = blocks.throttle(gr.sizeof_gr_complex, speed)
self.source = blocks.multiply_const_cc(gain)
self.connect(ifile, throttle, self.source)
@@ -562,13 +683,17 @@ class p25_rx_block (gr.top_block):
"source-dev": "AUDIO",
"source-decim": 1 }
self.audio_source = audio.source(capture_rate, audio_input_filename)
+ self.null_source = blocks.null_source (gr.sizeof_float)
self.audio_cvt = blocks.float_to_complex()
- self.connect((self.audio_source, 0), (self.audio_cvt, 0))
- self.connect((self.audio_source, 1), (self.audio_cvt, 1))
+ self.connect(self.audio_source, (self.audio_cvt, 0))
+ self.connect(self.null_source, (self.audio_cvt, 1))
self.source = blocks.multiply_const_cc(gain)
self.connect(self.audio_cvt, self.source)
self.__set_rx_from_audio(capture_rate)
+ rc = self.demod.set_relative_frequency(self.options.calibration)
+ sys.stderr.write('open_audio_c: set_relative_frequency %d: %s\n' % (self.options.calibration, rc))
+
def open_audio(self, capture_rate, gain, audio_input_filename):
self.info = {
"capture-rate": capture_rate,
@@ -590,41 +715,94 @@ class p25_rx_block (gr.top_block):
"source-dev": "USRP",
"source-decim": 1 }
self.__set_rx_from_osmosdr()
+ if self.options.frequency:
+ self.last_freq_params['freq'] = self.options.frequency
+ self.set_freq(self.options.frequency)
# except Exception, x:
# wx.MessageBox("Cannot open USRP: " + x.message, "USRP Error", wx.CANCEL | wx.ICON_EXCLAMATION)
- # Set the channel offset
- #
- def set_channel_offset(self, offset_hz, scale, units):
- self.channel_offset = -offset_hz
- self.channel_filter.set_center_freq(self.channel_offset+ self.options.offset)
- self.frame.SetStatusText("Channel offset: " + str(offset_hz * scale) + units, 1)
+ def is_http_term(self):
+ if self.options.terminal_type.startswith('http:'):
+ return True
+ elif self.options.terminal_type.startswith('zmq:'):
+ return True
+ else:
+ return False
- # Set the RF squelch threshold level
- #
- def set_squelch_threshold(self, squelch_db):
- self.squelch.set_threshold(squelch_db)
- self.frame.SetStatusText("Squelch: " + str(squelch_db) + "dB", 2)
+ def process_ajax(self):
+ if not self.is_http_term():
+ return
+ if self.input_q.full_p():
+ return
+ filenames = [sink.gnuplot.filename for sink in self.plot_sinks if sink.gnuplot.filename]
+ error = None
+ if self.options.demod_type == 'cqpsk':
+ error = self.demod.get_freq_error()
+ d = {'json_type': 'rx_update', 'error': error, 'fine_tune': self.options.fine_tune, 'files': filenames, 'time': time.time()}
+ msg = gr.message().make_from_string(json.dumps(d), -4, 0, 0)
+ self.input_q.insert_tail(msg)
+
+ def process_update(self):
+ UPDATE_INTERVAL = 1.0 # sec.
+ now = time.time()
+ if self.options.freq_error_tracking:
+ self.error_tracking()
+ if self.input_q.full_p():
+ return
+ if now < self.last_process_update + UPDATE_INTERVAL:
+ return
+ self.last_process_update = now
+ self.freq_update()
+ if self.trunk_rx is None:
+ return ## possible race cond - just ignore
+ if self.input_q.full_p():
+ return
+ js = self.trunk_rx.to_json()
+ msg = gr.message().make_from_string(js, -4, 0, 0)
+ self.input_q.insert_tail(msg)
+ self.process_ajax()
+
+ def send_event(self, d): ## called from trunking module to send json msgs / updates to client
+ if d is not None:
+ self.sql_db.event(d)
+ if d and not self.input_q.full_p():
+ msg = gr.message().make_from_string(json.dumps(d), -4, 0, 0)
+ self.input_q.insert_tail(msg)
+ self.process_update()
def process_qmsg(self, msg):
# return true = end top block
- RX_COMMANDS = 'skip lockout hold'
+ RX_COMMANDS = 'skip lockout hold'.split()
s = msg.to_string()
+ t = msg.type()
+ if t == -4:
+ d = json.loads(s)
+ s = d['command']
+ if type(s) is not str and isinstance(s, bytes):
+ # should only get here if python3
+ s = s.decode()
if s == 'quit': return True
- elif s == 'update':
- if self.trunk_rx is None:
- return False ## possible race cond - just ignore
- js = self.trunk_rx.to_json()
- msg = gr.message().make_from_string(js, -4, 0, 0)
- self.input_q.insert_tail(msg)
+ elif s == 'update': ## deprecated here: to be removed
+ pass
+ # self.process_update()
elif s == 'set_freq':
freq = msg.arg1()
+ self.last_freq_params['freq'] = freq
self.set_freq(freq)
+ elif s == 'adj_tune':
+ freq = msg.arg1()
+ elif s == 'dump_tgids':
+ self.trunk_rx.dump_tgids()
+ elif s == 'reload_tags':
+ nac = msg.arg1()
+ self.trunk_rx.reload_tags(int(nac))
elif s == 'add_default_config':
nac = msg.arg1()
- self.trunk_rx.add_default_config(nac)
+ self.trunk_rx.add_default_config(int(nac))
elif s in RX_COMMANDS:
self.rx_q.insert_tail(msg)
+ elif s == 'settings-enable' and self.trunk_rx is not None:
+ self.trunk_rx.enable_status(d['data'])
return False
############################################################################
@@ -644,26 +822,90 @@ class du_queue_watcher(threading.Thread):
def run(self):
while(self.keep_running):
msg = self.msgq.delete_head()
+ if not self.keep_running:
+ break
self.callback(msg)
+class rx_main(object):
+ def __init__(self):
+ self.keep_running = True
+ self.cli_options()
+ self.tb = p25_rx_block(self.options)
+ self.q_watcher = du_queue_watcher(self.tb.output_q, self.process_qmsg)
+ sys.stderr.write('python version detected: %s\n' % sys.version)
+
+ def process_qmsg(self, msg):
+ if self.tb.process_qmsg(msg):
+ self.keep_running = False
+
+ def run(self):
+ try:
+ self.tb.start()
+ while self.keep_running:
+ time.sleep(1)
+ except:
+ sys.stderr.write('main: exception occurred\n')
+ sys.stderr.write('main: exception:\n%s\n' % traceback.format_exc())
+ if self.tb.terminal:
+ self.tb.terminal.end_terminal()
+ if self.tb.audio:
+ self.tb.audio.stop()
+ self.tb.stop()
+ for sink in self.tb.plot_sinks:
+ sink.kill()
+
+ def cli_options(self):
+ # command line argument parsing
+ parser = OptionParser(option_class=eng_option)
+ parser.add_option("--args", type="string", default="", help="device args")
+ parser.add_option("--antenna", type="string", default="", help="select antenna")
+ parser.add_option("-a", "--audio", action="store_true", default=False, help="use direct audio input")
+ parser.add_option("-A", "--audio-if", action="store_true", default=False, help="soundcard IF mode (use --calibration to set IF freq)")
+ parser.add_option("-I", "--audio-input", type="string", default="", help="pcm input device name. E.g., hw:0,0 or /dev/dsp")
+ parser.add_option("-i", "--input", type="string", default=None, help="input file name")
+ parser.add_option("-b", "--excess-bw", type="eng_float", default=0.2, help="for RRC filter", metavar="Hz")
+ parser.add_option("-c", "--calibration", type="eng_float", default=0.0, help="USRP offset or audio IF frequency", metavar="Hz")
+ parser.add_option("-C", "--costas-alpha", type="eng_float", default=0.04, help="value of alpha for Costas loop", metavar="Hz")
+ parser.add_option("-D", "--demod-type", type="choice", default="cqpsk", choices=('cqpsk', 'fsk4'), help="cqpsk | fsk4")
+ parser.add_option("-P", "--plot-mode", type="string", default=None, help="one or more of constellation, fft, symbol, datascope (comma-separated)")
+ parser.add_option("-f", "--frequency", type="eng_float", default=0.0, help="USRP center frequency", metavar="Hz")
+ parser.add_option("-F", "--ifile", type="string", default=None, help="read input from complex capture file")
+ parser.add_option("-H", "--hamlib-model", type="int", default=None, help="specify model for hamlib")
+ parser.add_option("-s", "--seek", type="int", default=0, help="ifile seek in K")
+ parser.add_option("-l", "--terminal-type", type="string", default='curses', help="'curses' or udp port or 'http:host:port'")
+ parser.add_option("-L", "--logfile-workers", type="int", default=None, help="number of demodulators to instantiate")
+ parser.add_option("-S", "--sample-rate", type="int", default=320e3, help="source samp rate")
+ parser.add_option("-t", "--tone-detect", action="store_true", default=False, help="use experimental tone detect algorithm")
+ parser.add_option("-T", "--trunk-conf-file", type="string", default=None, help="trunking config file name")
+ parser.add_option("-v", "--verbosity", type="int", default=0, help="message debug level")
+ parser.add_option("-V", "--vocoder", action="store_true", default=False, help="voice codec")
+ parser.add_option("-n", "--nocrypt", action="store_true", default=False, help="silence encrypted traffic")
+ parser.add_option("-o", "--offset", type="eng_float", default=0.0, help="tuning offset frequency [to circumvent DC offset]", metavar="Hz")
+ parser.add_option("-p", "--pause", action="store_true", default=False, help="block on startup")
+ parser.add_option("-w", "--wireshark", action="store_true", default=False, help="output data to Wireshark")
+ parser.add_option("-W", "--wireshark-host", type="string", default="127.0.0.1", help="Wireshark host")
+ parser.add_option("-u", "--wireshark-port", type="int", default=23456, help="Wireshark udp port")
+ parser.add_option("-r", "--raw-symbols", type="string", default=None, help="dump decoded symbols to file")
+ parser.add_option("-g", "--gain", type="eng_float", default=None, help="set USRP gain in dB (default is midpoint) or set audio gain")
+ parser.add_option("-G", "--gain-mu", type="eng_float", default=0.025, help="gardner gain")
+ parser.add_option("-N", "--gains", type="string", default=None, help="gain settings")
+ parser.add_option("-O", "--audio-output", type="string", default="default", help="audio output device name")
+ parser.add_option("-x", "--audio-gain", type="eng_float", default="1.0", help="audio gain (default = 1.0)")
+ parser.add_option("-X", "--freq-error-tracking", action="store_true", default=False, help="enable experimental frequency error tracking")
+ parser.add_option("-U", "--udp-player", action="store_true", default=False, help="enable built-in udp audio player")
+ parser.add_option("-q", "--freq-corr", type="eng_float", default=0.0, help="frequency correction")
+ parser.add_option("-d", "--fine-tune", type="eng_float", default=0.0, help="fine tuning")
+ parser.add_option("-2", "--phase2-tdma", action="store_true", default=False, help="enable phase2 tdma decode")
+ parser.add_option("-Z", "--decim-amt", type="int", default=1, help="spectrum decimation")
+ (options, args) = parser.parse_args()
+ if len(args) != 0:
+ parser.print_help()
+ sys.exit(1)
+ self.options = options
+
# Start the receiver
#
if __name__ == "__main__":
- tb = p25_rx_block()
- tb.start()
- try:
- while True:
- msg = tb.output_q.delete_head()
- if tb.process_qmsg(msg):
- break
- except:
- sys.stderr.write('main: exception occurred\n')
- sys.stderr.write('main: exception:\n%s\n' % traceback.format_exc())
- if tb.terminal:
- tb.terminal.end_curses()
- if tb.audio:
- tb.audio.stop()
- tb.stop()
- if tb.kill_sink:
- tb.kill_sink.kill()
+ rx = rx_main()
+ rx.run()
diff --git a/op25/gr-op25_repeater/apps/site-alias.json b/op25/gr-op25_repeater/apps/site-alias.json
new file mode 100644
index 0000000..63cfb94
--- /dev/null
+++ b/op25/gr-op25_repeater/apps/site-alias.json
@@ -0,0 +1,12 @@
+{
+ "552": {
+ "1": {
+ "1": {
+ "alias": "new1"
+ },
+ "2": {
+ "alias": "new2"
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/op25/gr-op25_repeater/apps/sockaudio.py b/op25/gr-op25_repeater/apps/sockaudio.py
index d0f7432..68c6adb 100755
--- a/op25/gr-op25_repeater/apps/sockaudio.py
+++ b/op25/gr-op25_repeater/apps/sockaudio.py
@@ -1,6 +1,8 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
-# Copyright 2017 Graham Norbury
+# Copyright 2017, 2018 Graham Norbury
+#
+# Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 Max H. Parke KA1RBI
#
# This file is part of OP25
#
@@ -20,20 +22,26 @@
# 02110-1301, USA.
from ctypes import *
+import os
import sys
import time
import threading
+import select
import socket
import errno
+import struct
+import ctypes
+import numpy as np
+from log_ts import log_ts
# OP25 defaults
-PCM_RATE = 8000 # audio sample rate (Hz)
-PCM_BUFFER_SIZE = 2000 # size of ALSA buffer in frames
+PCM_RATE = 8000 # audio sample rate (Hz)
+PCM_BUFFER_SIZE = 4000 # size of ALSA buffer in frames
-MAX_SUPERFRAME_SIZE = 320 # maximum size of incoming UDP audio buffer
+MAX_SUPERFRAME_SIZE = 320 # maximum size of incoming UDP audio buffer
# Debug
-LOG_AUDIO_XRUNS = True # log audio underruns to stderr
+LOG_AUDIO_XRUNS = True # log audio underruns to stderr
# Alsa PCM constants
SND_PCM_FORMAT_S8 = c_int(0)
@@ -99,211 +107,450 @@ SND_PCM_ACCESS_RW_INTERLEAVED = c_int(3)
SND_PCM_ACCESS_RW_NONINTERLEAVED = c_int(4)
SND_PCM_ACCESS_LAST = SND_PCM_ACCESS_RW_NONINTERLEAVED
+PA_STREAM_PLAYBACK = 1
+PA_SAMPLE_S16LE = 3
+
# Python CTypes wrapper to Alsa libasound2
class alsasound(object):
- def __init__(self):
- self.libasound = cdll.LoadLibrary("libasound.so.2")
- self.c_pcm = c_void_p()
- self.format = 0
- self.channels = 0
- self.rate = 0
- self.framesize = 0
-
- def open(self, hwdev):
- b_hwdev = create_string_buffer(str.encode(hwdev))
- c_stream = SND_PCM_STREAM_PLAYBACK
- err = self.libasound.snd_pcm_open(byref(self.c_pcm), b_hwdev, c_stream, SND_PCM_NORMAL)
- return err
-
- def close(self):
- if (self.c_pcm.value == None):
- return
- self.libasound.snd_pcm_close(self.c_pcm)
- self.c_pcm.value = None
-
- def setup(self, pcm_format, pcm_channels, pcm_rate, pcm_buffer_size):
- if (self.c_pcm.value == None):
- return
-
- self.format = pcm_format
- self.channels = pcm_channels
- self.rate = pcm_rate
- pcm_start_threshold = int(pcm_buffer_size * 0.75)
-
- c_pars = (c_void_p * int(self.libasound.snd_pcm_hw_params_sizeof() / sizeof(c_void_p)))()
- err = self.libasound.snd_pcm_hw_params_any(self.c_pcm, c_pars)
- if err < 0:
- sys.stderr.write("hw_params_any failed: %d\n" % err)
- return err
-
- err = self.libasound.snd_pcm_hw_params_set_access(self.c_pcm, c_pars, SND_PCM_ACCESS_RW_INTERLEAVED);
- if err < 0:
- sys.stderr.write("set_access failed: %d\n" % err)
- return err
- err = self.libasound.snd_pcm_hw_params_set_format(self.c_pcm, c_pars, c_uint(self.format));
- if err < 0:
- sys.stderr.write("set_format failed: %d\n" % err)
- return err
- err = self.libasound.snd_pcm_hw_params_set_channels(self.c_pcm, c_pars, c_uint(self.channels));
- if err < 0:
- sys.stderr.write("set_channels failed: %d\n" % err)
- return err
- err = self.libasound.snd_pcm_hw_params_set_rate(self.c_pcm, c_pars, c_uint(self.rate), c_int(0));
- if err < 0:
- sys.stderr.write("set_rate failed: %d\n" % err)
- return err
- err = 0 ########self.libasound.snd_pcm_hw_params_set_buffer_size(self.c_pcm, c_pars, c_ulong(pcm_buffer_size), c_int(0));
- if err < 0:
- sys.stderr.write("set_buffer_size failed: %d\n" % err)
- return err
- err = self.libasound.snd_pcm_hw_params(self.c_pcm, c_pars);
- if err < 0:
- sys.stderr.write("hw_params failed: %d\n" % err)
- return err
-
- self.libasound.snd_pcm_hw_params_current(self.c_pcm, c_pars)
- c_bits = self.libasound.snd_pcm_hw_params_get_sbits(c_pars)
- self.framesize = self.channels * c_bits/8;
-
- c_sw_pars = (c_void_p * int(self.libasound.snd_pcm_sw_params_sizeof() / sizeof(c_void_p)))()
- err = self.libasound.snd_pcm_sw_params_current(self.c_pcm, c_sw_pars)
- if err < 0:
- sys.stderr.write("get_sw_params_current failed: %d\n" % err)
- return err
- err = self.libasound.snd_pcm_sw_params_set_start_threshold(self.c_pcm, c_sw_pars, c_uint(pcm_start_threshold))
- if err < 0:
- sys.stderr.write("set_sw_params_start_threshold failed: %d\n" % err)
- return err
- err = self.libasound.snd_pcm_sw_params(self.c_pcm, c_sw_pars)
- if err < 0:
- sys.stderr.write("sw_params failed: %d\n" % err)
- return err
-
- ret = self.libasound.snd_pcm_prepare(self.c_pcm)
- #self.dump()
- return ret
-
- def write(self, pcm_data):
- datalen = len(pcm_data)
- n_frames = c_ulong(datalen / self.framesize)
- c_data = c_char_p(pcm_data)
- ret = 0
-
- if (self.c_pcm.value == None):
- sys.stderr.write("PCM device is closed\n")
- return -1
-
- ret = self.libasound.snd_pcm_writei(self.c_pcm, cast(c_data, POINTER(c_void_p)), n_frames)
- if (ret < 0):
- if (ret == -errno.EPIPE): # underrun
- if (LOG_AUDIO_XRUNS):
- sys.stderr.write("[%f] PCM underrun\n" % time.time())
- ret = self.libasound.snd_pcm_recover(self.c_pcm, ret, 1)
- if (ret >= 0):
- ret = self.libasound.snd_pcm_writei(self.c_pcm, cast(c_data, POINTER(c_void_p)), n_frames)
- else:
- ret = self.libasound.snd_pcm_prepare(self.c_pcm)
- ret = self.libasound.snd_pcm_writei(self.c_pcm, cast(c_data, POINTER(c_void_p)), n_frames)
- elif (ret == -errno.ESTRPIPE): # suspended
- while True:
- ret = self.libasound.snd_pcm_resume(self.c_pcm)
- if (ret != -errno.EAGAIN):
- break
- time.sleep(1)
- if (ret < 0):
- ret = self.libasound.snd_pcm_prepare(self.c_pcm)
- elif (ret < 0): # other error
- ret = self.libasound.snd_pcm_prepare(self.c_pcm)
-
- return ret
-
- def drain(self):
- ret = self.libasound.snd_pcm_drain(self.c_pcm)
- if (ret == -errno.ESTRPIPE): # suspended
- while True:
- ret = self.libasound.snd_pcm_resume(self.c_pcm)
- if (ret != -errno.EAGAIN):
- break
- time.sleep(1)
- ret = self.libasound.snd_pcm_prepare(self.c_pcm)
-
- def dump(self):
- if (self.c_pcm.value == None):
- return
-
- c_buf_p = c_void_p()
- c_str_p = c_char_p()
- c_strlen = c_uint(0)
- self.libasound.snd_output_buffer_open(byref(c_buf_p))
- self.libasound.snd_pcm_dump_setup(self.c_pcm, c_buf_p)
- c_strlen = self.libasound.snd_output_buffer_string(c_buf_p, byref(c_str_p))
- sys.stderr.write("%s\n" % c_str_p.value[0:c_strlen-1])
- self.libasound.snd_output_close(c_buf_p)
-
-# OP25 thread to receive UDP audio samples and send to Alsa driver
-class socket_audio(threading.Thread):
- def __init__(self, udp_host, udp_port, pcm_device, **kwds):
- threading.Thread.__init__(self, **kwds)
- self.setDaemon(1)
- self.keep_running = True
- self.sock = None
- self.pcm = alsasound()
- self.setup_socket(udp_host, udp_port)
- self.setup_pcm(pcm_device)
- self.start()
- return
-
- def run(self):
- while self.keep_running:
- # Data received on the udp port is 320 bytes for an audio frame or 2 bytes for a flag
- #
- d = self.sock.recvfrom(MAX_SUPERFRAME_SIZE) # recvfrom blocks until data becomes available
- if d[0]:
- d_len = len(d[0])
- if (d_len == 2): # flag
- flag = ord(d[0][0]) + (ord(d[0][1]) << 8) # 16 bit little endian
- if (flag == 0): # 0x0000 = drain pcm buffer
- self.pcm.drain()
- else: # audio data
- self.pcm.write(d[0])
- else:
- break
-
- self.close_socket()
- self.close_pcm()
- return
-
- def stop(self):
- self.keep_running = False
- return
-
- def setup_socket(self, udp_host, udp_port):
- self.sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
- self.sock.bind((udp_host, udp_port))
- sys.stderr.write('setup_socket: %d\n' % udp_port)
- return
-
- def close_socket(self):
- self.sock.close()
- return
-
- def setup_pcm(self, hwdevice):
- sys.stderr.write('audio device: %s\n' % hwdevice)
- err = self.pcm.open(hwdevice)
- if err < 0:
- sys.stderr.write('failed to open audio device: %s\n' % hwdevice)
- self.pcm.dump()
- self.keep_running = False
- return
-
- err = self.pcm.setup(SND_PCM_FORMAT_S16_LE.value, 1, PCM_RATE, PCM_BUFFER_SIZE)
- if err < 0:
- sys.stderr.write('failed to set up pcm stream\n')
- self.keep_running = False
- return
- return
-
- def close_pcm(self):
- self.pcm.close()
- return
+ def __init__(self):
+ self.libasound = cdll.LoadLibrary("libasound.so.2")
+ self.c_pcm = c_void_p()
+ self.format = 0
+ self.channels = 0
+ self.rate = 0
+ self.framesize = 0
+
+ def open(self, hwdev):
+ b_hwdev = create_string_buffer(str.encode(hwdev))
+ c_stream = SND_PCM_STREAM_PLAYBACK
+ err = self.libasound.snd_pcm_open(byref(self.c_pcm), b_hwdev, c_stream, SND_PCM_NORMAL)
+ return err
+
+ def close(self):
+ if (self.c_pcm.value == None):
+ return
+ self.libasound.snd_pcm_close(self.c_pcm)
+ self.c_pcm.value = None
+
+ def setup(self, pcm_format, pcm_channels, pcm_rate, pcm_buffer_size):
+ if (self.c_pcm.value == None):
+ return
+
+ self.format = pcm_format
+ self.channels = pcm_channels
+ self.rate = pcm_rate
+ pcm_buf_sz = c_ulong(pcm_buffer_size)
+
+ c_pars = (c_void_p * int(self.libasound.snd_pcm_hw_params_sizeof() / sizeof(c_void_p)))()
+ err = self.libasound.snd_pcm_hw_params_any(self.c_pcm, c_pars)
+ if err < 0:
+ sys.stderr.write("hw_params_any failed: %d\n" % err)
+ return err
+
+ err = self.libasound.snd_pcm_hw_params_set_access(self.c_pcm, c_pars, SND_PCM_ACCESS_RW_INTERLEAVED)
+ if err < 0:
+ sys.stderr.write("set_access failed: %d\n" % err)
+ return err
+ err = self.libasound.snd_pcm_hw_params_set_format(self.c_pcm, c_pars, c_uint(self.format))
+ if err < 0:
+ sys.stderr.write("set_format failed: %d\n" % err)
+ return err
+ err = self.libasound.snd_pcm_hw_params_set_channels(self.c_pcm, c_pars, c_uint(self.channels))
+ if err < 0:
+ sys.stderr.write("set_channels failed: %d\n" % err)
+ return err
+ err = self.libasound.snd_pcm_hw_params_set_rate(self.c_pcm, c_pars, c_uint(self.rate), c_int(0))
+ if err < 0:
+ sys.stderr.write("set_rate failed: %d\n" % err)
+ return err
+ err = self.libasound.snd_pcm_hw_params_set_buffer_size_near(self.c_pcm, c_pars, byref(pcm_buf_sz))
+ if err < 0:
+ sys.stderr.write("set_buffer_size_near failed: %d\n" % err)
+ return err
+ if pcm_buf_sz.value != pcm_buffer_size:
+ sys.stderr.write("set_buffer_size_near requested %d, but returned %d\n" % (pcm_buffer_size, pcm_buf_sz.value))
+ err = self.libasound.snd_pcm_hw_params(self.c_pcm, c_pars)
+ if err < 0:
+ sys.stderr.write("hw_params failed: %d\n" % err)
+ return err
+
+ self.libasound.snd_pcm_hw_params_current(self.c_pcm, c_pars)
+ c_bits = self.libasound.snd_pcm_hw_params_get_sbits(c_pars)
+ self.framesize = self.channels * c_bits//8
+
+ c_sw_pars = (c_void_p * int(self.libasound.snd_pcm_sw_params_sizeof() / sizeof(c_void_p)))()
+ err = self.libasound.snd_pcm_sw_params_current(self.c_pcm, c_sw_pars)
+ if err < 0:
+ sys.stderr.write("get_sw_params_current failed: %d\n" % err)
+ return err
+ pcm_start_threshold = int(pcm_buf_sz.value * 0.75)
+ err = self.libasound.snd_pcm_sw_params_set_start_threshold(self.c_pcm, c_sw_pars, c_uint(pcm_start_threshold))
+ if err < 0:
+ sys.stderr.write("set_sw_params_start_threshold failed: %d\n" % err)
+ return err
+ err = self.libasound.snd_pcm_sw_params(self.c_pcm, c_sw_pars)
+ if err < 0:
+ sys.stderr.write("sw_params failed: %d\n" % err)
+ return err
+
+ ret = self.libasound.snd_pcm_prepare(self.c_pcm)
+ #self.dump()
+ return ret
+
+ def write(self, pcm_data):
+ datalen = len(pcm_data)
+ n_frames = c_ulong(datalen // self.framesize)
+ c_data = c_char_p(pcm_data)
+ ret = 0
+
+ if (self.c_pcm.value == None):
+ sys.stderr.write("PCM device is closed\n")
+ return -1
+
+ ret = self.libasound.snd_pcm_writei(self.c_pcm, cast(c_data, POINTER(c_void_p)), n_frames)
+ if (ret < 0):
+ if (ret == -errno.EPIPE): # underrun
+ if (LOG_AUDIO_XRUNS):
+ sys.stderr.write("%s PCM underrun\n" % log_ts.get())
+ ret = self.libasound.snd_pcm_recover(self.c_pcm, ret, 1)
+ if (ret >= 0):
+ ret = self.libasound.snd_pcm_writei(self.c_pcm, cast(c_data, POINTER(c_void_p)), n_frames)
+ else:
+ ret = self.libasound.snd_pcm_prepare(self.c_pcm)
+ ret = self.libasound.snd_pcm_writei(self.c_pcm, cast(c_data, POINTER(c_void_p)), n_frames)
+ elif (ret == -errno.ESTRPIPE): # suspended
+ while True:
+ ret = self.libasound.snd_pcm_resume(self.c_pcm)
+ if (ret != -errno.EAGAIN):
+ break
+ time.sleep(1)
+ if (ret < 0):
+ ret = self.libasound.snd_pcm_prepare(self.c_pcm)
+ elif (ret < 0): # other error
+ ret = self.libasound.snd_pcm_prepare(self.c_pcm)
+
+ return ret
+
+ def drain(self):
+ ret = self.libasound.snd_pcm_drain(self.c_pcm)
+ if (ret == -errno.ESTRPIPE): # suspended
+ while True:
+ ret = self.libasound.snd_pcm_resume(self.c_pcm)
+ if (ret != -errno.EAGAIN):
+ break
+ time.sleep(1)
+ ret = self.libasound.snd_pcm_prepare(self.c_pcm)
+ return ret
+
+ def drop(self):
+ ret = self.libasound.snd_pcm_drop(self.c_pcm)
+ if (ret == -errno.ESTRPIPE): # suspended
+ while True:
+ ret = self.libasound.snd_pcm_resume(self.c_pcm)
+ if (ret != -errno.EAGAIN):
+ break
+ time.sleep(1)
+ ret = self.libasound.snd_pcm_prepare(self.c_pcm)
+ return ret
+
+ def dump(self):
+ if (self.c_pcm.value == None):
+ return
+
+ c_buf_p = c_void_p()
+ c_str_p = c_char_p()
+ c_strlen = c_uint(0)
+ self.libasound.snd_output_buffer_open(byref(c_buf_p))
+ self.libasound.snd_pcm_dump_setup(self.c_pcm, c_buf_p)
+ c_strlen = self.libasound.snd_output_buffer_string(c_buf_p, byref(c_str_p))
+ sys.stderr.write("%s\n" % c_str_p.value[0:c_strlen-1])
+ self.libasound.snd_output_close(c_buf_p)
+
+ def check(self):
+ return 0
+
+class _struct_pa_sample_spec(Structure):
+ _fields_ = [("format", c_int),
+ ("rate", c_uint32),
+ ("channels", c_uint8)]
+
+class pa_sound(object):
+ def __init__(self):
+ self.error = c_int(0)
+ self.libpa = cdll.LoadLibrary("libpulse-simple.so.0")
+ self.libpa.strerror.restype = c_char_p
+ self.ss = _struct_pa_sample_spec(PA_SAMPLE_S16LE, 8000, 2)
+
+ def open(self, hwdevice):
+ self.out = c_void_p(self.libpa.pa_simple_new(None,
+ "OP25".encode("ascii"),
+ PA_STREAM_PLAYBACK,
+ None,
+ "OP25 Playback".encode('ascii'),
+ byref(self.ss),
+ None,
+ None,
+ byref(self.error)))
+
+ if not self.out:
+ sys.stderr.write("%s Could not open PulseAudio stream: %s\n" % (log_ts.get(), self.libpa.strerror(self.error)))
+
+ return self.error.value
+
+ def close(self):
+ self.libpa.pa_simple_free(self.out)
+
+ def setup(self, pcm_format, pcm_channels, pcm_rate, pcm_buffer_size):
+ self.ss.format = PA_SAMPLE_S16LE # fixed format
+ self.ss.channels = pcm_channels
+ self.ss.rate = pcm_rate
+ return 0
+
+ def write(self, pcm_data):
+ self.libpa.pa_simple_write(self.out, pcm_data, len(pcm_data), byref(self.error))
+ return self.error
+
+ def drain(self):
+ self.libpa.pa_simple_drain(self.out, byref(self.error))
+ return self.error.value
+
+ def drop(self):
+ self.libpa.pa_simple_flush(self.out, byref(self.error))
+ return self.error.value
+
+ def dump(self):
+ return 0
+
+ def check(self):
+ return 0
+
+
+
+# Wrapper to emulate pcm writes of sound samples to stdout (for liquidsoap)
+class stdout_wrapper(object):
+ def __init__(self):
+ self.silence = chr(0) * 640
+ pass
+
+ def open(self, hwdev):
+ return 0
+
+ def close(self):
+ return 0
+
+ def setup(self, pcm_format, pcm_channels, pcm_rate, pcm_buffer_size):
+ return 0
+
+ def drain(self):
+ try:
+ sys.stdout.flush()
+ except IOError: # IOError means listener has terminated
+ return -1
+ return 0
+
+ def drop(self):
+ return 0
+
+ def write(self, pcm_data):
+ try:
+ if sys.version[0] != '2' and type(pcm_data) is str:
+ pcm_data = pcm_data.encode('latin1') # python3 strikes again
+ sys.stdout.write(pcm_data)
+ except IOError: # IOError means listener has terminated
+ return -1
+ return 0
+
+ def check(self):
+ rc = 0
+ if (self.write(self.silence) < 0) or (self.drain() < 0): # write silence to check pipe connectivity
+ rc = -1
+ return rc
+
+ def dump(self):
+ pass
+
+# Main class that receives UDP audio samples and sends them to a PCM subsystem (currently ALSA or STDOUT)
+class socket_audio(object):
+ def __init__(self, udp_host, udp_port, pcm_device, two_channels = False, audio_gain = 1.0, dest_stdout = False, silent_flag=False, **kwds):
+ self.keep_running = True
+ self.two_channels = two_channels
+ self.audio_gain = audio_gain
+ self.dest_stdout = dest_stdout
+ self.sock_a = None
+ self.sock_b = None
+ self.pcm = None
+ self.silent_flag = silent_flag
+ if dest_stdout:
+ pcm_device = "stdout"
+ sys.stdout = os.fdopen(sys.stdout.fileno(), 'wb', 0) # reopen stdout with buffering disabled
+ self.pcm = stdout_wrapper()
+ else:
+ if pcm_device.lower() == "pulse":
+ try:
+ self.pcm = pa_sound() # first try to use PulseAudio
+ sys.stderr.write("using PulseAudio sound system\n")
+ except:
+ sys.stderr.write("unable to load PulseAudio library\n")
+ pcm_device = "default"
+
+ if self.pcm is None:
+ try:
+ self.pcm = alsasound() # if PulseAudio not available, try to use ALSA
+ sys.stderr.write("using ALSA sound system\n")
+ except:
+ sys.stderr.write("unable to load ALSA library\n")
+
+ if self.pcm is not None:
+ self.setup_pcm(pcm_device)
+ else:
+ self.keep_running = False
+
+ self.setup_sockets(udp_host, udp_port)
+
+ def run(self):
+ rc = 0
+ while self.keep_running and (rc >= 0):
+ readable, writable, exceptional = select.select( [self.sock_a, self.sock_b], [], [self.sock_a, self.sock_b], 5.0)
+ in_a = None
+ in_b = None
+ data_a = ""
+ data_b = ""
+ flag_a = -1
+ flag_b = -1
+
+ # Check for select() polling timeout and pcm self-check
+ if (not readable) and (not writable) and (not exceptional):
+ if self.silent_flag:
+ rc = 0 # suppress additional zeros to preserve timing
+ else:
+ rc = self.pcm.check()
+ if isinstance(rc, ctypes.c_int):
+ rc = rc.value
+ continue
+
+ # Data received on the udp port is 320 bytes for an audio frame or 2 bytes for a flag
+ if self.sock_a in readable:
+ in_a = self.sock_a.recvfrom(MAX_SUPERFRAME_SIZE)
+
+ if self.sock_b in readable:
+ in_b = self.sock_b.recvfrom(MAX_SUPERFRAME_SIZE)
+
+ if in_a is not None:
+ len_a = len(in_a[0])
+ if len_a == 2:
+ flag_a = np.frombuffer(in_a[0], dtype=np.int16)[0]
+ elif len_a > 0:
+ data_a = in_a[0]
+
+ if in_b is not None:
+ len_b = len(in_b[0])
+ if len_b == 2:
+ flag_b = np.frombuffer(in_b[0], dtype=np.int16)[0]
+ elif len_b > 0:
+ data_b = in_b[0]
+
+ if (flag_a == 0) or (flag_b == 0):
+ rc = self.pcm.drain()
+ if isinstance(rc, ctypes.c_int):
+ rc = rc.value
+ continue
+
+ if (((flag_a == 1) and (flag_b == 1)) or
+ ((flag_a == 1) and (in_b is None)) or
+ ((flag_b == 1) and (in_a is None))):
+ rc = self.pcm.drop()
+ if isinstance(rc, ctypes.c_int):
+ rc = rc.value
+ continue
+
+ if not self.two_channels:
+ data_a = self.scale(data_a)
+ rc = self.pcm.write(self.interleave(data_a, data_a))
+ if isinstance(rc, ctypes.c_int):
+ rc = rc.value
+ else:
+ data_a = self.scale(data_a)
+ data_b = self.scale(data_b)
+ rc = self.pcm.write(self.interleave(data_a, data_b))
+ if isinstance(rc, ctypes.c_int):
+ rc = rc.value
+
+ self.close_sockets()
+ self.close_pcm()
+ return
+
+ def scale(self, data): # crude amplitude scaler (volume) for S16_LE samples
+ arr = np.array(np.frombuffer(data, dtype=np.int16), dtype=np.float32)
+ result = np.zeros(len(arr), dtype=np.int16)
+ arr = np.clip(arr*self.audio_gain, -32767, 32766, out=result)
+ return result.tobytes('C')
+
+ def interleave(self, data_a, data_b):
+ arr_a = np.frombuffer(data_a, dtype=np.int16)
+ arr_b = np.frombuffer(data_b, dtype=np.int16)
+ d_len = max(len(arr_a), len(arr_b))
+ result = np.zeros(d_len*2, dtype=np.int16)
+ if len(arr_a):
+ # copy arr_a to result[0,2,4, ...]
+ result[ range(0, len(arr_a)*2, 2) ] = arr_a
+ if len(arr_b):
+ # copy arr_b to result[1,3,5, ...]
+ result[ range(1, len(arr_b)*2, 2) ] = arr_b
+ return result.tobytes('C')
+
+ def stop(self):
+ self.keep_running = False
+ return
+
+ def setup_sockets(self, udp_host, udp_port):
+ sys.stderr.write("Listening on %s:%d\n" % (udp_host, udp_port))
+ self.sock_a = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
+ self.sock_b = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
+ self.sock_a.setblocking(0)
+ self.sock_b.setblocking(0)
+ self.sock_a.bind((udp_host, udp_port))
+ self.sock_b.bind((udp_host, udp_port + 2))
+ return
+
+ def close_sockets(self):
+ self.sock_a.close()
+ self.sock_b.close()
+ return
+
+ def setup_pcm(self, hwdevice):
+ sys.stderr.write('audio device: %s\n' % hwdevice)
+ err = self.pcm.open(hwdevice)
+ if err < 0:
+ sys.stderr.write('failed to open audio device: %s\n' % hwdevice)
+ self.pcm.dump()
+ self.keep_running = False
+ return
+
+ err = self.pcm.setup(SND_PCM_FORMAT_S16_LE.value, 2, PCM_RATE, PCM_BUFFER_SIZE)
+ if err < 0:
+ sys.stderr.write('failed to set up pcm stream\n')
+ self.keep_running = False
+ return
+ return
+
+ def close_pcm(self):
+ sys.stderr.write('audio closing\n')
+ if self.pcm is not None:
+ self.pcm.close()
+ return
+
+class audio_thread(threading.Thread):
+ def __init__(self, udp_host, udp_port, pcm_device, two_channels = False, audio_gain = 1.0, dest_stdout = False, **kwds):
+ threading.Thread.__init__(self, **kwds)
+ self.setDaemon(True)
+ self.keep_running = True
+ self.sock_audio = socket_audio(udp_host, udp_port, pcm_device, two_channels, audio_gain, dest_stdout, **kwds)
+ self.start()
+ return
+
+ def run(self):
+ self.sock_audio.run()
+
+ def stop(self):
+ self.sock_audio.stop()
diff --git a/op25/gr-op25_repeater/apps/sql_dbi.py b/op25/gr-op25_repeater/apps/sql_dbi.py
new file mode 100755
index 0000000..4837359
--- /dev/null
+++ b/op25/gr-op25_repeater/apps/sql_dbi.py
@@ -0,0 +1,338 @@
+#!/usr/bin/env python
+
+# Copyright 2021 Max H. Parke KA1RBI
+#
+# This file is part of OP25
+#
+# OP25 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 3, or (at your option)
+# any later version.
+#
+# OP25 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 OP25; see the file COPYING. If not, write to the Free
+# Software Foundation, Inc., 51 Franklin Street, Boston, MA
+# 02110-1301, USA.
+
+import sys
+import os
+import time
+import json
+import threading
+import traceback
+import sqlite3
+
+import op25
+from gnuradio import gr
+
+from emap import events_map, cc_events
+
+_def_db_file = 'op25-data.db'
+_def_msgq_size = 100
+_def_uncommitted = 25
+
+class du_queue_runner(threading.Thread):
+ def __init__(self, msgq, **kwds):
+ threading.Thread.__init__ (self, **kwds)
+ self.setDaemon(1)
+ self.msgq = msgq
+ self.db_filename = _def_db_file
+ self.conn = None
+ self.cursor = None
+ self.failed = False
+ self.keep_running = True
+ self.uncommitted = 0
+ self.max_q = 0
+ self.next_t = time.time()
+ self.start()
+
+ def run(self):
+ self.connect()
+ while self.keep_running and not self.failed:
+ self.max_q = max(self.max_q, self.msgq.count())
+ if time.time() > self.next_t:
+ self.next_t = time.time() + 2
+ msg = self.msgq.delete_head()
+ if self.failed or not self.keep_running:
+ break
+ self.insert_row(msg)
+
+ def disconnect(self):
+ self.conn.close()
+ self.cursor = None
+ self.conn = None
+
+ def connect(self):
+ self.conn = sqlite3.connect(self.db_filename)
+ self.cursor = self.conn.cursor()
+
+ def insert_row(self, msg):
+ if self.cursor is None or self.conn is None:
+ return
+ d = json.loads(msg.to_string())
+ try:
+ self.cursor.execute(d['command'], d['row'])
+ # optimization: only commit when no more msgs queued (or limit reached)
+ if self.uncommitted < _def_uncommitted and self.msgq.count():
+ self.uncommitted += 1
+ else:
+ self.conn.commit()
+ self.uncommitted = 0
+ except:
+ self.failed = True
+ traceback.print_exc(limit=None, file=sys.stdout)
+ traceback.print_exc(limit=None, file=sys.stderr)
+ sys.stderr.write('sql_dbi: db logging stopped due to error (or db not initialized)\n')
+ # TODO - add error recovery?
+
+class sql_dbi:
+ def __init__(self, db_filename=_def_db_file):
+ self.conn = None
+ self.cursor = None
+ self.db_filename = db_filename
+ self.db_msgq = gr.msg_queue(_def_msgq_size)
+ self.q_runner = du_queue_runner(self.db_msgq)
+ self.db_msgq_overflow = 0
+
+ self.sql_commands = {
+ 'calls': 'INSERT INTO calls(time, sysid, options, tgid, srcid)',
+ 'joins': 'INSERT INTO joins(time, sysid, rv, tgid, srcid)',
+ 'create_data_store': '''CREATE TABLE data_store (
+ id INTEGER PRIMARY KEY,
+ time REAL NOT NULL,
+ cc_event INTEGER NOT NULL,
+ opcode INTEGER NOT NULL,
+ sysid INTEGER NOT NULL,
+ mfrid INTEGER NULL,
+ p INTEGER NULL,
+ p2 INTEGER NULL,
+ p3 INTEGER NULL,
+ wacn INTEGER NULL,
+ frequency INTEGER NULL,
+ tgid INTEGER NULL,
+ tgid2 INTEGER NULL,
+ suid INTEGER NULL,
+ suid2 INTEGER NULL,
+ tsbk_sysid INTEGER NULL,
+ FOREIGN KEY(cc_event) REFERENCES event_keys (id))''',
+ 'create_event_keys': '''CREATE TABLE event_keys (
+ id INTEGER PRIMARY KEY,
+ tag TEXT NOT NULL )''',
+ 'create_sysid': '''CREATE TABLE sysid_tags (
+ id INTEGER PRIMARY KEY,
+ sysid INTEGER NOT NULL,
+ tag TEXT)''',
+ 'create_tgid': '''CREATE TABLE tgid_tags (
+ id INTEGER PRIMARY KEY,
+ rid INTEGER NOT NULL,
+ sysid INTEGER NOT NULL,
+ tag TEXT,
+ priority INTEGER)''',
+ 'create_unit_id': '''CREATE TABLE unit_id_tags (
+ id INTEGER PRIMARY KEY,
+ rid INTEGER NOT NULL,
+ sysid INTEGER NOT NULL,
+ tag TEXT,
+ priority INTEGER)''',
+ 'create_2b_rv': '''CREATE TABLE loc_reg_resp_rv (
+ rv INTEGER NOT NULL,
+ tag TEXT NOT NULL)''',
+ 'populate_2b_rv': '''INSERT INTO loc_reg_resp_rv(rv, tag) VALUES(0, "join")
+ INSERT INTO loc_reg_resp_rv(rv, tag) VALUES(1, "fail")
+ INSERT INTO loc_reg_resp_rv(rv, tag) VALUES(2, "deny")
+ INSERT INTO loc_reg_resp_rv(rv, tag) VALUES(3, "refuse")''',
+ 'create_index': '''CREATE INDEX tgid_idx ON data_store(tgid)
+ CREATE INDEX tgid2_idx ON data_store(tgid2)
+ CREATE INDEX suid_idx ON data_store(suid)
+ CREATE INDEX suid2_idx ON data_store(suid2)
+ CREATE INDEX t_tgid_idx ON tgid_tags(rid)
+ CREATE INDEX t_unit_id_idx ON unit_id_tags(rid)'''
+ }
+
+ def disconnect(self):
+ self.conn.close()
+ self.cursor = None
+ self.conn = None
+
+ def connect(self):
+ self.conn = sqlite3.connect(self.db_filename)
+ self.cursor = self.conn.cursor()
+
+ def reset_db(self): # any data in db will be destroyed!
+ if os.access(self.db_filename, os.W_OK):
+ os.remove(self.db_filename)
+ self.conn = sqlite3.connect(self.db_filename)
+ self.cursor = self.conn.cursor()
+ self.execute('create_sysid')
+ self.execute('create_2b_rv')
+ self.execute_lines('populate_2b_rv')
+ self.execute('create_tgid')
+ self.execute('create_unit_id')
+ self.execute('create_event_keys')
+ self.execute('create_data_store')
+ self.execute_lines('create_index')
+ self.conn.commit()
+ self.populate_event_keys()
+ self.conn.close()
+
+ def execute(self, q):
+ self.cursor.execute(self.sql_commands[q])
+ self.conn.commit()
+
+ def execute_lines(self,q):
+ for line in self.sql_commands[q].split('\n'):
+ self.cursor.execute(line)
+ self.conn.commit()
+
+ def q(self, query):
+ if query != '-':
+ return self.cursor.execute(query)
+ lines = sys.stdin.read().strip().split('\n')
+ for query in lines:
+ self.cursor.execute(query)
+ self.conn.commit()
+ return None
+
+ def write(self, table_name, row):
+ # the number of elements in tuple 'row' must be two less than the number of table columns
+ curr_time = time.time()
+ row = (curr_time,) + row
+ qs = ['?'] * len(row)
+ command = self.sql_commands[table_name] + ' VALUES (' + ','.join(qs) + ')'
+ self.cursor.execute(command, row)
+ self.conn.commit()
+
+ def event(self, d):
+ if d['cc_event'] not in events_map:
+ return
+ if not os.access(_def_db_file, os.W_OK): # if DB not (yet) set up or not writable
+ return
+ mapl = events_map[d['cc_event']]
+ row = []
+ column_names = []
+ for col in mapl:
+ colname = col[0]
+ k = col[1]
+ # special mappings: unwrap tgid and srcid objects
+ if colname.startswith('tgid') and type(d[k]) is dict:
+ val = d[k]['tg_id']
+ elif colname.startswith('suid') and type(d[k]) is dict:
+ val = d[k]['unit_id']
+ elif type(d[k]) is not dict:
+ val = d[k]
+ else:
+ sys.stderr.write('value retrieval error %s %s %s\n' % (d['cc_event'], type(d[k]) is dict, k))
+ val = -1
+ # special mappings: map cc_event tag to an int
+ if colname == 'cc_event':
+ val = cc_events[d[k]]
+ # special mappings: map affiliation to int
+ if k == 'affiliation':
+ if d[k] == 'global':
+ val = 1
+ elif d[k] == 'local':
+ val = 0
+ else:
+ val = -1
+ # special mappings: map duration to int(msec).
+ if k == 'duration':
+ val = int(d[k] * 1000)
+ row.append(val)
+ column_names.append(colname)
+ command = "INSERT INTO data_store(%s) VALUES(%s)" % (','.join(column_names), ','.join(['?'] * len(row)))
+ js = json.dumps({'command': command, 'row': row})
+ if not self.db_msgq.full_p():
+ msg = gr.message().make_from_string(js, 0, 0, 0)
+ self.db_msgq.insert_tail(msg)
+ else:
+ self.db_msgq_overflow += 1
+
+ def import_tsv(self, argv):
+ cmd = argv[1]
+ filename = argv[2]
+ sysid = int(argv[3])
+ if cmd == 'import_tgid':
+ table = 'tgid_tags'
+ elif cmd == 'import_unit':
+ table = 'unit_id_tags'
+ elif cmd == 'import_sysid':
+ table = 'sysid_tags'
+ else:
+ print('%s unsupported' % (cmd))
+ return
+ q = 'INSERT INTO ' + table + '(rid, sysid, tag, priority) VALUES(?,?,?,?)'
+ if table == 'sysid_tags':
+ q = 'INSERT INTO ' + table + '(sysid, tag) VALUES(?,?)'
+ rows = []
+ with open(filename, 'r') as f:
+ lines = f.read().rstrip().split('\n')
+ for i in range(len(lines)):
+ a = lines[i].split('\t')
+ if i == 0: # check hdr
+ if not a[0].strip().isdigit():
+ continue
+ rid = int(a[0])
+ tag = a[1]
+ priority = 0 if len(a) < 3 else int(a[2])
+ s = (rid, sysid, tag, priority)
+ if table == 'sysid_tags':
+ s = (rid, tag)
+ rows.append(s)
+ if len(rows):
+ self.cursor.executemany(q, rows)
+ self.conn.commit()
+
+ def populate_event_keys(self):
+ d = {cc_events[k]:k for k in cc_events}
+ query = 'INSERT INTO event_keys(id, tag) VALUES(?, ?)'
+ for k in sorted(d.keys()):
+ self.cursor.execute(query, [k, d[k]])
+ self.conn.commit()
+
+def main():
+ if len(sys.argv) > 1 and sys.argv[1] == 'reset_db':
+ sql_dbi().reset_db()
+ return
+
+ db1 = sql_dbi()
+ db1.connect()
+
+ if len(sys.argv) > 1 and sys.argv[1] == 'setup':
+ db1.cursor.execute(db1.sql_commands['create_tgid'])
+ db1.cursor.execute(db1.sql_commands['create_unit_id'])
+ db1.conn.commit()
+ db1.conn.close()
+ return
+
+ if len(sys.argv) > 1 and sys.argv[1] == 'execute_lines':
+ db1.execute_lines(sys.argv[2])
+ return
+
+ if len(sys.argv) > 1 and sys.argv[1] == 'execute':
+ db1.execute(sys.argv[2])
+ return
+
+ if len(sys.argv) > 1 and sys.argv[1] == 'insert':
+ db1.write('joins', (555, 5555, 5555555))
+ return
+
+ if len(sys.argv) > 3 and sys.argv[1].startswith('import_'):
+ db1.import_tsv(sys.argv)
+ return
+
+ if len(sys.argv) < 3 or sys.argv[1] != 'query':
+ print('nothing done')
+ return
+
+ result = db1.q(sys.argv[2])
+ if result:
+ for row in result:
+ print ('%s' % ('\t'.join([str(x) for x in row])))
+
+if __name__ == '__main__':
+ main()
diff --git a/op25/gr-op25_repeater/apps/tdma/bit_utils.py b/op25/gr-op25_repeater/apps/tdma/bit_utils.py
index df667dd..7238807 100644
--- a/op25/gr-op25_repeater/apps/tdma/bit_utils.py
+++ b/op25/gr-op25_repeater/apps/tdma/bit_utils.py
@@ -22,7 +22,7 @@ import numpy as np
def rev_int(n,l):
j=0
- for i in xrange(l):
+ for i in range(l):
b=n&1
n=n>>1
j = (j << 1) | b
@@ -30,7 +30,7 @@ def rev_int(n,l):
def bits_to_dibits(bits):
d = []
- for i in xrange(len(bits)>>1):
+ for i in range(len(bits)>>1):
d.append((bits[i*2]<<1) + bits[i*2+1])
return d
@@ -43,14 +43,14 @@ def dibits_to_bits(dibits):
def mk_array(n, l):
a = []
- for i in xrange(0,l):
+ for i in range(0,l):
a.insert(0, n & 1)
n = n >> 1
return np.array(a)
def mk_int(a):
- res= 0L
- for i in xrange(0, len(a)):
+ res= 0
+ for i in range(0, len(a)):
res = res * 2
res = res + (a[i] & 1)
return res
@@ -61,7 +61,7 @@ def mk_str(a):
def check_l(a,b):
ans = 0
assert len(a) == len(b)
- for i in xrange(len(a)):
+ for i in range(len(a)):
if (a[i] == b[i]):
ans += 1
return ans
@@ -77,7 +77,7 @@ def fixup(a):
return res
def find_sym(pattern, symbols):
- for i in xrange(0, len(symbols)-len(pattern)):
+ for i in range(0, len(symbols)-len(pattern)):
chunk = symbols[i : i + len(pattern)]
if chunk == pattern:
return i
diff --git a/op25/gr-op25_repeater/apps/tdma/lfsr.py b/op25/gr-op25_repeater/apps/tdma/lfsr.py
index 6a7d8ac..b746e92 100644
--- a/op25/gr-op25_repeater/apps/tdma/lfsr.py
+++ b/op25/gr-op25_repeater/apps/tdma/lfsr.py
@@ -25,65 +25,80 @@ class p25p2_lfsr(object):
def __init__(self,nac,sysid,wacn):
xorbits = self.mk_xor_bits(nac,sysid,wacn)
#self.xorsyms = np.zeros(len(xorbits)/2)
- self.xorsyms = [0] * (len(xorbits)/2)
- for i in xrange(len(self.xorsyms)):
+ self.xorsyms = [0] * (len(xorbits)//2)
+ for i in range(len(self.xorsyms)):
self.xorsyms[i] = (xorbits[i*2] << 1) + xorbits[i*2+1]
self.xor_chars = ''.join([chr(c) for c in self.xorsyms])
def asm_reg(self,s1,s2,s3,s4,s5,s6):
- s1 = s1 & 0xfL
- s2 = s2 & 0x1fL
- s3 = s3 & 0x3fL
- s4 = s4 & 0x1fL
- s5 = s5 & 0x3fffL
- s6 = s6 & 0x3ffL
+ s1 = s1 & 0xf
+ s2 = s2 & 0x1f
+ s3 = s3 & 0x3f
+ s4 = s4 & 0x1f
+ s5 = s5 & 0x3fff
+ s6 = s6 & 0x3ff
return (s1<<40)+(s2<<35)+(s3<<29)+(s4<<24)+(s5<<10)+s6
def disasm_reg(self,r):
- s1 = (r>>40) & 0xfL
- s2 = (r>>35) & 0x1fL
- s3 = (r>>29) & 0x3fL
- s4 = (r>>24) & 0x1fL
- s5 = (r>>10) & 0x3fffL
- s6 = r & 0x3ffL
+ s1 = (r>>40) & 0xf
+ s2 = (r>>35) & 0x1f
+ s3 = (r>>29) & 0x3f
+ s4 = (r>>24) & 0x1f
+ s5 = (r>>10) & 0x3fff
+ s6 = r & 0x3ff
return s1,s2,s3,s4,s5,s6
def cyc_reg(self, reg):
s1,s2,s3,s4,s5,s6 = self.disasm_reg(reg)
- cy1 = (s1 >> 3) & 1L
- cy2 = (s2 >> 4) & 1L
- cy3 = (s3 >> 5) & 1L
- cy4 = (s4 >> 4) & 1L
- cy5 = (s5 >> 13) & 1L
- cy6 = (s6 >> 9) & 1L
+ cy1 = (s1 >> 3) & 1
+ cy2 = (s2 >> 4) & 1
+ cy3 = (s3 >> 5) & 1
+ cy4 = (s4 >> 4) & 1
+ cy5 = (s5 >> 13) & 1
+ cy6 = (s6 >> 9) & 1
x1 = cy1 ^ cy2
x2 = cy1 ^ cy3
x3 = cy1 ^ cy4
x4 = cy1 ^ cy5
x5 = cy1 ^ cy6
- s1 = (s1 << 1) & 0xfL
- s2 = (s2 << 1) & 0x1fL
- s3 = (s3 << 1) & 0x3fL
- s4 = (s4 << 1) & 0x1fL
- s5 = (s5 << 1) & 0x3fffL
- s6 = (s6 << 1) & 0x3ffL
- s1 = s1 | (x1 & 1L)
- s2 = s2 | (x2 & 1L)
- s3 = s3 | (x3 & 1L)
- s4 = s4 | (x4 & 1L)
- s5 = s5 | (x5 & 1L)
- s6 = s6 | (cy1 & 1L)
+ s1 = (s1 << 1) & 0xf
+ s2 = (s2 << 1) & 0x1f
+ s3 = (s3 << 1) & 0x3f
+ s4 = (s4 << 1) & 0x1f
+ s5 = (s5 << 1) & 0x3fff
+ s6 = (s6 << 1) & 0x3ff
+ s1 = s1 | (x1 & 1)
+ s2 = s2 | (x2 & 1)
+ s3 = s3 | (x3 & 1)
+ s4 = s4 | (x4 & 1)
+ s5 = s5 | (x5 & 1)
+ s6 = s6 | (cy1 & 1)
return self.asm_reg(s1,s2,s3,s4,s5,s6)
def mk_xor_bits(self, nac,sysid,wacn):
- reg = mk_array(16777216*wacn + 4096*sysid + nac, 44)
+ reg = np.int64(mk_array(16777216*wacn + 4096*sysid + nac, 44))
M = np.array(np.mat('1 0 0 0 1 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0; 0 1 0 0 0 1 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0; 0 0 1 0 0 0 1 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0; 0 0 0 1 0 0 0 1 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0; 0 0 0 0 1 0 0 0 1 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0; 0 0 0 0 0 1 0 0 0 1 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0; 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0; 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0; 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0; 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1; 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0; 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0; 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0; 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0; 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0; 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0; 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0; 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0; 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0; 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0; 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 1 0 0 0; 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 1 0 0; 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 1 0; 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 1; 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0; 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 1 0 0 0 0 0 1 0 0 0; 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 1 0 0 0 0 0 1 0 0; 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 1 0 0 0 0 0 1 0; 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 1 0 0 0 0 0 1; 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 1 0 0 0 0 0; 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 1 0 0 0 0; 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 1 0 0 0; 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 1 0 0; 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 1 0; 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 1; 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0; 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0; 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0; 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0; 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1; 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0; 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0; 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0; 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1'))
reg = mk_int(np.dot(reg,M))
s = []
- for i in xrange(4320):
+ for i in range(4320):
s.append((reg >> 43) & 1)
reg = self.cyc_reg(reg)
return s
+
+if __name__ == '__main__':
+ import sys
+
+ xor_cache = {}
+ params = {}
+ params['nac'] = 0x293
+ params['sysid'] = 0x18
+ params['wacn'] = 0x1
+
+ hash = '%x%x%x' % (params['nac'], params['sysid'], params['wacn'])
+ if hash not in xor_cache:
+ xor_cache[hash] = p25p2_lfsr(params['nac'], params['sysid'], params['wacn']).xor_chars
+
+ sys.stdout.write(xor_cache[hash])
diff --git a/op25/gr-op25_repeater/apps/tdma/tdma_audio.py b/op25/gr-op25_repeater/apps/tdma/tdma_audio.py
index 391ed9f..ade6bb6 100755
--- a/op25/gr-op25_repeater/apps/tdma/tdma_audio.py
+++ b/op25/gr-op25_repeater/apps/tdma/tdma_audio.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
-from gnuradio import gr, gru, audio, eng_notation, analog, blocks, filter
+from gnuradio import gr, audio, eng_notation, analog, blocks, filter
from gnuradio.eng_option import eng_option
from optparse import OptionParser
import numpy as np
diff --git a/op25/gr-op25_repeater/apps/terminal.py b/op25/gr-op25_repeater/apps/terminal.py
index 46efa1a..fb4b7f8 100644..100755
--- a/op25/gr-op25_repeater/apps/terminal.py
+++ b/op25/gr-op25_repeater/apps/terminal.py
@@ -1,8 +1,8 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
# Copyright 2008-2011 Steve Glass
#
-# Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 Max H. Parke KA1RBI
+# Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Max H. Parke KA1RBI
#
# This file is part of OP25
#
@@ -28,11 +28,29 @@ import time
import json
import threading
import traceback
+import socket
+import op25
from gnuradio import gr
+KEEPALIVE_TIME = 3.0 # no data received in (seconds)
+
+class q_watcher(threading.Thread):
+ def __init__(self, msgq, callback, **kwds):
+ threading.Thread.__init__ (self, **kwds)
+ self.setDaemon(1)
+ self.msgq = msgq
+ self.callback = callback
+ self.keep_running = True
+ self.start()
+
+ def run(self):
+ while(self.keep_running):
+ msg = self.msgq.delete_head()
+ self.callback(msg)
+
class curses_terminal(threading.Thread):
- def __init__(self, input_q, output_q, **kwds):
+ def __init__(self, input_q, output_q, sock=None, **kwds):
threading.Thread.__init__ (self, **kwds)
self.setDaemon(1)
self.input_q = input_q
@@ -41,31 +59,83 @@ class curses_terminal(threading.Thread):
self.last_update = 0
self.auto_update = True
self.current_nac = None
+ self.maxx = 0
+ self.maxy = 0
+ self.sock = sock
self.start()
def setup_curses(self):
self.stdscr = curses.initscr()
+ self.maxy, self.maxx = self.stdscr.getmaxyx()
+ if (self.maxy < 6) or (self.maxx < 60):
+ sys.stderr.write("Terminal window too small! Minimum size [70 x 6], actual [%d x %d]\n" % (self.maxx, self.maxy))
+ print ("Terminal window too small! Minimum size [70 x 6], actual [%d x %d]\n" % (self.maxx, self.maxy))
+ self.keep_running = False
+ return
curses.noecho()
curses.halfdelay(1)
- self.top_bar = curses.newwin(1, 80, 0, 0)
- self.freq_list = curses.newwin(20, 80, 1, 0)
- self.active1 = curses.newwin(1, 80, 21, 0)
- self.active2 = curses.newwin(1, 80, 22, 0)
- self.prompt = curses.newwin(1, 10, 23, 0)
- self.text_win = curses.newwin(1, 70, 23, 10)
-
+ self.title_bar = curses.newwin(1, self.maxx, 0, 0)
+ self.help_bar = curses.newwin(1, self.maxx, self.maxy-1, 0)
+ self.top_bar = curses.newwin(1, self.maxx, 1, 0)
+ self.freq_list = curses.newwin(self.maxy-5, self.maxx, 2, 0)
+ self.active1 = curses.newwin(1, self.maxx-15, self.maxy-3, 0)
+ self.active2 = curses.newwin(1, self.maxx-15, self.maxy-2, 0)
+ self.status1 = curses.newwin(1, 15, self.maxy-3, self.maxx-15)
+ self.status2 = curses.newwin(1, 15, self.maxy-2, self.maxx-15)
+ self.prompt = curses.newwin(1, 10, self.maxy-1, 0)
+ self.text_win = curses.newwin(1, 11, self.maxy-1, 10)
self.textpad = curses.textpad.Textbox(self.text_win)
+ self.stdscr.refresh()
+
+ self.title_help()
+
+ def resize_curses(self):
+ self.maxy, self.maxx = self.stdscr.getmaxyx()
+
+ if (self.maxx < 60) or (self.maxy < 6): # do not resize if window is now too small
+ return
- def end_curses(self):
+ self.stdscr.erase()
+
+ self.title_bar.resize(1, self.maxx)
+ self.help_bar.resize(1, self.maxx)
+ self.help_bar.mvwin(self.maxy-1, 0)
+ self.top_bar.resize(1, self.maxx)
+ self.freq_list.resize(self.maxy-5, self.maxx)
+ self.active1.resize(1, self.maxx-15)
+ self.active1.mvwin(self.maxy-3, 0)
+ self.active2.resize(1, self.maxx-15)
+ self.active2.mvwin(self.maxy-2, 0)
+ self.status1.resize(1, 15)
+ self.status1.mvwin(self.maxy-3, self.maxx-15)
+ self.status2.resize(1, 15)
+ self.status2.mvwin(self.maxy-2, self.maxx-15)
+ self.stdscr.refresh()
+
+ self.title_help()
+
+ def end_terminal(self):
try:
curses.endwin()
except:
pass
+ def title_help(self):
+ title_str = "OP25"
+ help_str = "(f)req (h)old (s)kip (l)ock (q)uit"
+ self.title_bar.erase()
+ self.help_bar.erase()
+ self.title_bar.addstr(0, 0, title_str.center(self.maxx-1, " "), curses.A_REVERSE)
+ self.help_bar.addstr(0, 0, help_str.center(self.maxx-1, " "), curses.A_REVERSE)
+ self.title_bar.refresh()
+ self.help_bar.refresh()
+ self.stdscr.move(1,0)
+ self.stdscr.refresh()
+
def do_auto_update(self):
- UPDATE_INTERVAL = 1 # sec.
+ UPDATE_INTERVAL = 0.5 # sec.
if not self.auto_update:
return False
if self.last_update + UPDATE_INTERVAL > time.time():
@@ -75,32 +145,33 @@ class curses_terminal(threading.Thread):
def process_terminal_events(self):
# return true signifies end of main event loop
+ if curses.is_term_resized(self.maxy, self.maxx) is True:
+ self.resize_curses()
+
_ORD_S = ord('s')
_ORD_L = ord('l')
_ORD_H = ord('h')
COMMANDS = {_ORD_S: 'skip', _ORD_L: 'lockout', _ORD_H: 'hold'}
c = self.stdscr.getch()
if c == ord('u') or self.do_auto_update():
- msg = gr.message().make_from_string('update', -2, 0, 0)
- self.output_q.insert_tail(msg)
+ self.send_command('update', 0)
if c in COMMANDS.keys():
- msg = gr.message().make_from_string(COMMANDS[c], -2, 0, 0)
- self.output_q.insert_tail(msg)
+ self.send_command(COMMANDS[c], 0)
elif c == ord('q'):
- return True
+ return True
elif c == ord('t'):
if self.current_nac:
- msg = gr.message().make_from_string('add_default_config', -2, int(self.current_nac), 0)
- self.output_q.insert_tail(msg)
+ self.send_command('add_default_config', int(self.current_nac))
elif c == ord('f'):
self.prompt.addstr(0, 0, 'Frequency')
self.prompt.refresh()
- self.text_win.clear()
+ self.text_win.erase()
response = self.textpad.edit()
- self.prompt.clear()
+ self.prompt.erase()
self.prompt.refresh()
- self.text_win.clear()
+ self.text_win.erase()
self.text_win.refresh()
+ self.title_help()
try:
freq = float(response)
if freq < 10000:
@@ -108,8 +179,37 @@ class curses_terminal(threading.Thread):
except:
freq = None
if freq:
- msg = gr.message().make_from_string('set_freq', -2, freq, 0)
- self.output_q.insert_tail(msg)
+ self.send_command('set_freq', freq)
+ elif c == ord('H'):
+ self.prompt.addstr(0, 0, 'Hold tgid')
+ self.prompt.refresh()
+ self.text_win.erase()
+ response = self.textpad.edit()
+ self.prompt.erase()
+ self.prompt.refresh()
+ self.text_win.erase()
+ self.text_win.refresh()
+ self.title_help()
+ try:
+ tgid = int(response)
+ if (tgid < 0) or (tgid > 65535):
+ tgid = 0
+ except:
+ tgid = 0
+ self.send_command('hold', tgid)
+
+ elif c == ord(','):
+ self.send_command('adj_tune', -100)
+ elif c == ord('.'):
+ self.send_command('adj_tune', 100)
+ elif c == ord('<'):
+ self.send_command('adj_tune', -1200)
+ elif c == ord('>'):
+ self.send_command('adj_tune', 1200)
+ elif (c >= ord('1') ) and (c <= ord('5')):
+ self.send_command('toggle_plot', (c - ord('0')))
+ elif c == ord('d'):
+ self.send_command('dump_tgids', 0)
elif c == ord('x'):
assert 1 == 0
return False
@@ -118,11 +218,14 @@ class curses_terminal(threading.Thread):
# return true signifies end of main event loop
msg = json.loads(js)
if msg['json_type'] == 'trunk_update':
- nacs = [x for x in msg.keys() if x != 'json_type']
+ nacs = [x for x in msg.keys() if x.isnumeric() ]
if not nacs:
return
- times = {msg[nac]['last_tsbk']:nac for nac in nacs}
- current_nac = times[ sorted(times.keys(), reverse=True)[0] ]
+ if msg.get('nac'):
+ current_nac = str(msg['nac'])
+ else:
+ times = {msg[nac]['last_tsbk']:nac for nac in nacs}
+ current_nac = times[ sorted(times.keys(), reverse=True)[0] ]
self.current_nac = current_nac
s = 'NAC 0x%x' % (int(current_nac))
s += ' WACN 0x%x' % (msg[current_nac]['wacn'])
@@ -131,30 +234,50 @@ class curses_terminal(threading.Thread):
s += '/%f' % (msg[current_nac]['txchan']/ 1000000.0)
s += ' tsbks %d' % (msg[current_nac]['tsbks'])
freqs = sorted(msg[current_nac]['frequencies'].keys())
- s = s[:79]
- self.top_bar.clear()
+ s = s[:(self.maxx - 1)]
+ self.top_bar.erase()
self.top_bar.addstr(0, 0, s)
self.top_bar.refresh()
- self.freq_list.clear()
- for i in xrange(len(freqs)):
+ self.freq_list.erase()
+ for i in range(len(freqs)):
+ if i > (self.maxy - 6):
+ break
s=msg[current_nac]['frequencies'][freqs[i]]
- s = s[:79]
+ s = s[:(self.maxx - 1)]
self.freq_list.addstr(i, 0, s)
self.freq_list.refresh()
+ self.status1.erase()
+ if 'srcaddr' in msg:
+ srcaddr = msg['srcaddr']
+ if (srcaddr != 0) and (srcaddr != 0xffffff):
+ s = '%d' % (srcaddr)
+ s = s[:14]
+ self.status1.addstr(0, (14-len(s)), s)
+ self.status1.refresh()
+ self.status2.erase()
+ if 'encrypted' in msg:
+ encrypted = msg['encrypted']
+ if encrypted != 0:
+ s = 'ENCRYPTED'
+ self.status2.addstr(0, (14-len(s)), s, curses.A_REVERSE)
+ self.status2.refresh()
self.stdscr.refresh()
elif msg['json_type'] == 'change_freq':
s = 'Frequency %f' % (msg['freq'] / 1000000.0)
+ if 'fine_tune' in msg and msg['fine_tune'] is not None:
+ s +='(%d)' % msg['fine_tune']
if msg['tgid'] is not None:
s += ' Talkgroup ID %s' % (msg['tgid'])
if msg['tdma'] is not None:
s += ' TDMA Slot %s' % msg['tdma']
- self.active1.clear()
- self.active2.clear()
+ s = s[:(self.maxx - 16)]
+ self.active1.erase()
+ self.active2.erase()
self.active1.addstr(0, 0, s)
self.active1.refresh()
if msg['tag']:
s = msg['tag']
- s = s[:79]
+ s = s[:(self.maxx - 16)]
self.active2.addstr(0, 0, s)
self.active2.refresh()
self.stdscr.refresh()
@@ -163,6 +286,8 @@ class curses_terminal(threading.Thread):
def process_q_events(self):
# return true signifies end of main event loop
while True:
+ if curses.is_term_resized(self.maxy, self.maxx) is True:
+ self.resize_curses()
if self.input_q.empty_p():
break
msg = self.input_q.delete_head_nowait()
@@ -170,18 +295,187 @@ class curses_terminal(threading.Thread):
return self.process_json(msg.to_string())
return False
+ def send_command(self, command, data):
+ if self.sock:
+ self.sock.send(json.dumps({'command': command, 'data': data}))
+ else:
+ msg = gr.message().make_from_string(command, -2, data, 0)
+ self.output_q.insert_tail(msg)
+
def run(self):
try:
self.setup_curses()
+
while(self.keep_running):
if self.process_terminal_events():
break
if self.process_q_events():
break
except:
- sys.stderr.write('terminal: exception occurred\n')
+ sys.stderr.write('terminal: exception occurred (%d, %d)\n' % (self.maxx, self.maxy))
sys.stderr.write('terminal: exception:\n%s\n' % traceback.format_exc())
finally:
- self.end_curses()
- msg = gr.message().make_from_string('quit', -2, 0, 0)
- self.output_q.insert_tail(msg)
+ self.end_terminal()
+ self.keep_running = False
+ self.send_command('quit', 0)
+
+class zeromq_terminal(threading.Thread):
+ def __init__(self, input_q, output_q, endpoint, **kwds):
+ import zmq
+ threading.Thread.__init__ (self, **kwds)
+ self.setDaemon(1)
+ self.input_q = input_q
+ self.output_q = output_q
+ self.endpoint = endpoint
+ self.keep_running = True
+
+ if not endpoint.startswith('tcp:'):
+ sys.stderr.write('zeromq_terminal unsupported endpoint: %s\n' % endpoint)
+ return
+ port = endpoint.replace('tcp:', '')
+ port = int(port)
+
+ self.zmq_context = zmq.Context()
+
+ self.zmq_sub = self.zmq_context.socket(zmq.SUB)
+ self.zmq_sub.connect('tcp://localhost:%d' % (port+1))
+ self.zmq_sub.setsockopt(zmq.SUBSCRIBE, '')
+
+ self.zmq_pub = self.zmq_context.socket(zmq.PUB)
+ self.zmq_pub.sndhwm = 5
+ self.zmq_pub.bind('tcp://*:%d' % port)
+
+ self.queue_watcher = q_watcher(self.input_q, lambda msg : self.zmq_pub.send(msg.to_string()))
+ self.start()
+
+ def end_terminal(self):
+ self.keep_running = False
+
+ def run(self):
+ while self.keep_running:
+ js = self.zmq_sub.recv()
+ if not self.keep_running:
+ break
+ d = json.loads(js)
+ msg = gr.message().make_from_string(str(d['command']), d['msgtype'], d['data'], 0)
+ if self.output_q.full_p():
+ self.output_q.delete_head()
+ if not self.output_q.full_p():
+ self.output_q.insert_tail(msg)
+
+class http_terminal(threading.Thread):
+ def __init__(self, input_q, output_q, endpoint, **kwds):
+ from http_server import http_server
+
+ threading.Thread.__init__ (self, **kwds)
+ self.setDaemon(1)
+ self.input_q = input_q
+ self.output_q = output_q
+ self.endpoint = endpoint
+ self.keep_running = True
+ self.server = http_server(self.input_q, self.output_q, self.endpoint)
+
+ self.start()
+
+ def end_terminal(self):
+ self.keep_running = False
+
+ def run(self):
+ self.server.run()
+
+class udp_terminal(threading.Thread):
+ def __init__(self, input_q, output_q, port, **kwds):
+ threading.Thread.__init__ (self, **kwds)
+ self.setDaemon(1)
+ self.input_q = input_q
+ self.output_q = output_q
+ self.keep_running = True
+ self.port = port
+ self.remote_ip = '127.0.0.1'
+ self.remote_port = 0
+ self.keepalive_until = 0
+
+ self.setup_socket(port)
+ self.q_handler = q_watcher(self.input_q, self.process_qmsg)
+ self.start()
+
+ def setup_socket(self, port):
+ self.sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
+ self.sock.bind(('0.0.0.0', port))
+
+ def process_qmsg(self, msg):
+ if time.time() >= self.keepalive_until:
+ return
+ s = msg.to_string()
+ if msg.type() == -4 and self.remote_port > 0:
+ self.sock.sendto(s, (self.remote_ip, self.remote_port))
+
+ def end_terminal(self):
+ self.keep_running = False
+
+ def run(self):
+ while self.keep_running:
+ data, addr = self.sock.recvfrom(2048)
+ data = json.loads(data)
+ if data['command'] == 'quit':
+ self.keepalive_until = 0
+ continue
+ msg = gr.message().make_from_string(str(data['command']), -2, data['data'], 0)
+ self.output_q.insert_tail(msg)
+ self.remote_ip = addr[0]
+ self.remote_port = addr[1]
+ self.keepalive_until = time.time() + KEEPALIVE_TIME
+
+def op25_terminal(input_q, output_q, terminal_type):
+ if terminal_type == 'curses':
+ return curses_terminal(input_q, output_q)
+ elif terminal_type.startswith('zmq:'):
+ return zeromq_terminal(input_q, output_q, terminal_type.replace('zmq:', ''))
+ elif terminal_type[0].isdigit():
+ port = int(terminal_type)
+ return udp_terminal(input_q, output_q, port)
+ elif terminal_type.startswith('http:'):
+ return http_terminal(input_q, output_q, terminal_type.replace('http:', ''))
+ else:
+ sys.stderr.write('warning: unsupported terminal type: %s\n' % terminal_type)
+ return None
+
+class terminal_client(object):
+ def __init__(self):
+ self.input_q = gr.msg_queue(10)
+ self.keep_running = True
+ self.terminal = None
+
+ ip_addr = sys.argv[1]
+ port = int(sys.argv[2])
+
+ self.sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
+ self.sock.connect((ip_addr, port))
+ self.sock.settimeout(0.1)
+
+ self.terminal = curses_terminal(self.input_q, None, sock=self.sock)
+
+ def run(self):
+ while self.keep_running:
+ try:
+ js, addr = self.sock.recvfrom(2048)
+ msg = gr.message().make_from_string(js, -4, 0, 0)
+ self.input_q.insert_tail(msg)
+ except socket.timeout:
+ pass
+ except:
+ raise
+ if not self.terminal.keep_running:
+ self.keep_running = False
+
+if __name__ == '__main__':
+ terminal = None
+ try:
+ terminal = terminal_client()
+ terminal.run()
+ except:
+ sys.stderr.write('terminal: exception occurred\n')
+ sys.stderr.write('terminal: exception:\n%s\n' % traceback.format_exc())
+ finally:
+ if terminal is not None and terminal.terminal is not None:
+ terminal.terminal.end_terminal()
diff --git a/op25/gr-op25_repeater/apps/trunk.tsv b/op25/gr-op25_repeater/apps/trunk.tsv
index 2bcc560..8305356 100644
--- a/op25/gr-op25_repeater/apps/trunk.tsv
+++ b/op25/gr-op25_repeater/apps/trunk.tsv
@@ -3,5 +3,6 @@
"Cortland" "454.05" "0" "0x4e1" "CQPSK"
"Onondaga" "460.5" "0" "0x2a0" "CQPSK" "onondaga.tsv"
"Cayuga" "460.4125" "0" "0x2a8" "CQPSK" "onondaga.tsv"
-"Ontario" "769.55625,769.85625,770.10625" "0" "0x47f" "CQPSK" "ontario.tsv"
+"Ontario" "769.28125,769.55625,769.85625,770.10625" "0" "0x47f" "CQPSK" "ontario.tsv"
+"460.375" "460.375" "0" "0x2a4" "CQPSK" "onondaga.tsv"
"NYSEG" "152.0225" "0" "0x260" "C4FM" "nyseg.tsv"
diff --git a/op25/gr-op25_repeater/apps/trunking.py b/op25/gr-op25_repeater/apps/trunking.py
index aaf28b7..7aa4019 100644
--- a/op25/gr-op25_repeater/apps/trunking.py
+++ b/op25/gr-op25_repeater/apps/trunking.py
@@ -1,5 +1,6 @@
+#! /usr/bin/env python
-# Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 Max H. Parke KA1RBI
+# Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Max H. Parke KA1RBI
#
# This file is part of OP25
#
@@ -20,11 +21,16 @@
#
import sys
+import os
import time
import collections
import json
sys.path.append('tdma')
import lfsr
+from tsvfile import make_config, load_tsv, id_registry, read_tags_file
+from create_image import create_image
+
+FILTERED_CC_EVENT = 'mot_grg_add_cmd grp_v_ch_grant_updt grp_v_ch_grant_updt_exp'.split()
def crc16(dat,len): # slow version
poly = (1<<12) + (1<<5) + (1<<0)
@@ -39,14 +45,18 @@ def crc16(dat,len): # slow version
crc = crc ^ 0xffff
return crc
-def get_frequency(f): # return frequency in Hz
- if f.find('.') == -1: # assume in Hz
- return int(f)
- else: # assume in MHz due to '.'
- return int(float(f) * 1000000)
+def get_ordinals(s):
+ t = 0
+ if type(s) is not str and isinstance(s, bytes):
+ for c in s:
+ t = (t << 8) + c
+ else:
+ for c in s:
+ t = (t << 8) + ord(c)
+ return t
class trunked_system (object):
- def __init__(self, debug=0, config=None):
+ def __init__(self, debug=0, config=None, send_event=None, nac=None):
self.debug = debug
self.freq_table = {}
self.stats = {}
@@ -55,6 +65,7 @@ class trunked_system (object):
self.tsbk_cache = {}
self.secondary = {}
self.adjacent = {}
+ self.adjacent_data = {}
self.rfss_syid = 0
self.rfss_rfid = 0
self.rfss_stid = 0
@@ -66,23 +77,34 @@ class trunked_system (object):
self.voice_frequencies = {}
self.blacklist = {}
self.whitelist = None
- self.tgid_map = {}
+ self.tgid_map = None
+ self.unit_id_map = None
self.offset = 0
self.sysname = 0
+ self.tgid_tags_tsv = ""
+ self.unit_id_tags_tsv = ""
self.trunk_cc = 0
+ self.last_trunk_cc = 0
self.cc_list = []
self.cc_list_index = 0
self.CC_HUNT_TIME = 5.0
self.center_frequency = 0
self.last_tsbk = 0
self.cc_timeouts = 0
+ self.next_hunt_cc = time.time() + 8.0
+ self.last_voice_time = 0.0
self.talkgroups = {}
+ self.frequency_table = {}
+ self.CALL_TIMEOUT = 0.7 # call expiration time (sec.)
+ self.CHECK_INTERVAL = 0.1 # freq tracking check interval
+ self.next_frequency_tracking_expire = 0
if config:
self.blacklist = config['blacklist']
self.whitelist = config['whitelist']
self.tgid_map = config['tgid_map']
+ self.unit_id_map = config['unit_id_map']
self.offset = config['offset']
self.sysname = config['sysname']
self.trunk_cc = config['cclist'][0] # TODO: scan thru list
@@ -90,25 +112,52 @@ class trunked_system (object):
self.center_frequency = config['center_frequency']
self.modulation = config['modulation']
- def to_json(self):
+ self.current_srcaddr = 0
+ self.current_grpaddr = 0 # from P25 LCW
+ self.current_alg = ""
+ self.current_algid = 128
+ self.current_keyid = 0
+ self.send_event = send_event
+ self.harris_sgs = {}
+ self.nac = nac
+
+ def to_dict(self):
d = {}
d['syid'] = self.rfss_syid
+ d['sysname'] = self.sysname
d['rfid'] = self.rfss_rfid
d['stid'] = self.rfss_stid
d['sysid'] = self.ns_syid
d['rxchan'] = self.rfss_chan
d['txchan'] = self.rfss_txchan
d['wacn'] = self.ns_wacn
- d['secondary'] = self.secondary.keys()
+ d['secondary'] = [k for k in self.secondary.keys()]
d['tsbks'] = self.stats['tsbks']
d['frequencies'] = {}
+ d['frequency_data'] = {}
d['last_tsbk'] = self.last_tsbk
+ d['srcaddr'] = self.current_srcaddr
+ d['grpaddr'] = self.current_grpaddr
+ d['algid'] = self.current_algid
+ d['alg'] = self.current_alg
+ d['keyid'] = self.current_keyid
t = time.time()
for f in self.voice_frequencies.keys():
tgs = '%s %s' % (self.voice_frequencies[f]['tgid'][0], self.voice_frequencies[f]['tgid'][1])
d['frequencies'][f] = 'voice frequency %f tgid(s) %s %4.1fs ago count %d' % (f / 1000000.0, tgs, t - self.voice_frequencies[f]['time'], self.voice_frequencies[f]['counter'])
- return json.dumps(d)
+ d['frequency_data'][f] = {'tgids': self.voice_frequencies[f]['tgid'], 'last_activity': '%7.1f' % (t - self.voice_frequencies[f]['time']), 'counter': self.voice_frequencies[f]['counter']}
+ for s in 'srcaddr tg_tag tg_color srcaddr_tag srcaddr_color'.split():
+ d['frequency_data'][f][s] = self.voice_frequencies[f][s]
+ d['adjacent_data'] = self.adjacent_data
+ d['talkgroup_data'] = self.talkgroups
+ self.frequency_tracking_expire(always=True)
+ d['frequency_tracking'] = self.frequency_table
+ d['harris_supergroups'] = self.harris_sgs
+ return d
+
+ def to_json(self):
+ return json.dumps(self.to_dict())
def to_string(self):
s = []
@@ -132,6 +181,24 @@ class trunked_system (object):
s.append('adjacent %f: %s' % (float(f) / 1000000.0, self.adjacent[f]))
return '\n'.join(s)
+ def post_event(self, d):
+ if self.send_event is None:
+ return
+ if d['cc_event'] in FILTERED_CC_EVENT:
+ return
+ d['json_type'] = 'cc_event'
+ d['sysid'] = self.rfss_syid if self.rfss_syid else 0
+ d['sysname'] = self.sysname
+ d['time'] = time.time()
+ d['nac'] = self.nac
+ self.send_event(d)
+
+ def mk_tg_dict(self, tgid):
+ return {'tg_id': tgid, 'tag': self.get_tag(tgid), 'priority': self.get_prio(tgid), 'color': self.get_tag_color(tgid)}
+
+ def mk_src_dict(self, srcaddr):
+ return {'unit_id': srcaddr, 'tag': self.get_unit_id_tag(srcaddr), 'color': self.get_unit_id_color(srcaddr)}
+
def get_tdma_slot(self, id):
table = (id >> 12) & 0xf
channel = id & 0xfff
@@ -142,14 +209,19 @@ class trunked_system (object):
return channel & 1
# return frequency in Hz
- def channel_id_to_frequency(self, id):
+ def channel_id_to_frequency(self, id, uplink=False):
table = (id >> 12) & 0xf
channel = id & 0xfff
if table not in self.freq_table:
return None
if 'tdma' not in self.freq_table[table]:
- return self.freq_table[table]['frequency'] + self.freq_table[table]['step'] * channel
- return self.freq_table[table]['frequency'] + self.freq_table[table]['step'] * int(channel / self.freq_table[table]['tdma'])
+ f = self.freq_table[table]['frequency'] + self.freq_table[table]['step'] * channel
+ else:
+ f = self.freq_table[table]['frequency'] + self.freq_table[table]['step'] * int(channel / self.freq_table[table]['tdma'])
+ uplink_f = f + self.freq_table[table]['offset']
+ if uplink:
+ f = uplink_f
+ return f
def channel_id_to_string(self, id):
f = self.channel_id_to_frequency(id)
@@ -157,35 +229,185 @@ class trunked_system (object):
return "ID-0x%x" % (id)
return "%f" % (f / 1000000.0)
+ def get_unit_id_color(self, unit_id):
+ if not unit_id:
+ return 0
+ elif self.unit_id_map is None:
+ return 0
+ return self.unit_id_map.get_color(unit_id)
+
+ def get_unit_id_tag(self, unit_id):
+ if not unit_id:
+ return ""
+ elif self.unit_id_map is None:
+ return "Unit %d" % unit_id
+ return self.unit_id_map.get_tag(unit_id)
+
def get_tag(self, tgid):
if not tgid:
return ""
- if tgid not in self.tgid_map:
- return "Talkgroup ID %d [0x%x]" % (tgid, tgid)
- return self.tgid_map[tgid]
+ elif self.tgid_map is None:
+ return "Talkgroup %d" % tgid
+ return self.tgid_map.get_tag(tgid)
+
+ def get_tag_color(self, tgid):
+ if not tgid:
+ return 0
+ elif self.tgid_map is None:
+ return 0
+ return self.tgid_map.get_color(tgid) % 100
+
+ # the third col in the tsv file performs two separate roles
+ # low-order 2 decimal digits are taken as the tag color code
+ # remaining upper digits are priority - this is incompatibile
+ # with previous tsv files (if priorities are in use).
+ def get_prio(self, tgid):
+ if not tgid:
+ return 0
+ elif self.tgid_map is None:
+ return 0
+ return int(self.tgid_map.get_color(tgid) // 100)
+
+ def end_call(self, call, code):
+ d = {'cc_event': 'end_call', 'code': code, 'srcaddr': call['srcaddr'], 'tgid': call['tgid'], 'duration': call['end_time'] - call['start_time'], 'count': call['count'], 'opcode': -1 }
+ self.post_event(d)
+ return
+
+ def frequency_tracking_expire(self, always=False):
+ current_time = time.time()
+ if current_time < self.next_frequency_tracking_expire and not always:
+ return
+ self.next_frequency_tracking_expire = current_time + self.CHECK_INTERVAL
+ for f in self.frequency_table.keys():
+ freq = self.frequency_table[f]
+ for i in range(len(freq['calls'])):
+ call = freq['calls'][i]
+ if call is not None and call['end_time'] == 0 and call['last_active'] + self.CALL_TIMEOUT < current_time:
+ call['end_time'] = current_time
+ self.end_call(call, 1)
+
+ def frequency_tracking(self, frequency, tgid, tdma_slot, srcaddr, protected):
+ current_time = time.time()
+ is_tdma = tdma_slot is not None
+ slot = tdma_slot if is_tdma else 0
+ if frequency not in self.frequency_table.keys():
+ self.frequency_table[frequency] = {'counter':0,
+ 'calls': [None,None],
+ 'tgids': [None,None],
+ 'last_active': current_time}
+ self.frequency_table[frequency]['tdma'] = is_tdma
+ call = {'srcaddr': self.mk_src_dict(srcaddr),
+ 'protected': protected,
+ 'tgid': self.mk_tg_dict(tgid),
+ 'count': 0,
+ 'start_time': current_time,
+ 'last_active': current_time,
+ 'end_time': 0}
+
+ self.frequency_table[frequency]['tgids'][slot] = tgid
+ self.frequency_table[frequency]['calls'][slot] = call
+ return
+
+ self.frequency_table[frequency]['counter'] += 1
+ self.frequency_table[frequency]['last_active'] = current_time
+ found = 0
+ for f in self.frequency_table.keys():
+ freq = self.frequency_table[f]
+ for i in range(len(freq['tgids'])):
+ tg = freq['tgids'][i]
+ call = freq['calls'][i]
+ if tg is None or call is None or tg != tgid:
+ continue
+ # general housekeeping: expire calls
+ if call['end_time'] == 0 and call['last_active'] + self.CALL_TIMEOUT < current_time:
+ call['end_time'] = current_time
+ self.end_call(call, 2)
+ if f == frequency and freq['tdma'] == is_tdma and i == slot :
+ found = 1
+ call['last_active'] = current_time
+ call['end_time'] = 0
+ call['count'] += 1
+ if srcaddr is not None:
+ call['srcaddr'] = self.mk_src_dict(srcaddr)
+ if protected is not None:
+ call['protected'] = protected
+ else: # found other entry with matching tgid but freq and/or tdma is wrong
+ if call['end_time'] == 0:
+ call['end_time'] = current_time
+ self.end_call(call, 3)
+ if found:
+ return
+
+ call = {'srcaddr': self.mk_src_dict(srcaddr),
+ 'protected': protected,
+ 'tgid': self.mk_tg_dict(tgid),
+ 'count': 0,
+ 'start_time': current_time,
+ 'last_active': current_time,
+ 'end_time': 0}
+ self.frequency_table[frequency]['tdma'] = is_tdma
+ self.frequency_table[frequency]['tgids'][slot] = tgid
+ self.frequency_table[frequency]['calls'][slot] = call
+ if not is_tdma:
+ self.frequency_table[frequency]['tgids'][1] = None
+ call = self.frequency_table[frequency]['calls'][1]
+ if call and call['end_time'] == 0:
+ call['end_time'] = current_time
+ self.end_call(call, 4)
+ self.frequency_table[frequency]['calls'][1] = None
+
+ def update_talkgroup(self, frequency, tgid, tdma_slot, srcaddr, uplink):
+ if self.debug >= 5:
+ sys.stderr.write('%f set tgid=%s, srcaddr=%s\n' % (time.time(), tgid, srcaddr))
- def update_talkgroup(self, frequency, tgid, tdma_slot):
if tgid not in self.talkgroups:
self.talkgroups[tgid] = {'counter':0}
+ if self.debug >= 5:
+ sys.stderr.write('%f new tgid: %s %s prio %d\n' % (time.time(), tgid, self.get_tag(tgid), self.get_prio(tgid)))
self.talkgroups[tgid]['time'] = time.time()
self.talkgroups[tgid]['frequency'] = frequency
self.talkgroups[tgid]['tdma_slot'] = tdma_slot
+ self.talkgroups[tgid]['prio'] = self.get_prio(tgid)
+ self.talkgroups[tgid]['tag_color'] = self.get_tag_color(tgid)
+ self.talkgroups[tgid]['uplink'] = uplink
+
+ if srcaddr is None or not srcaddr:
+ self.talkgroups[tgid]['srcaddr'] = 0
+ self.talkgroups[tgid]['srcaddr_tag'] = ""
+ self.talkgroups[tgid]['srcaddr_color'] = 0
+ else:
+ self.talkgroups[tgid]['srcaddr'] = srcaddr
+ self.talkgroups[tgid]['srcaddr_tag'] = self.get_unit_id_tag(srcaddr)
+ self.talkgroups[tgid]['srcaddr_color'] = self.get_unit_id_color(srcaddr)
- def update_voice_frequency(self, frequency, tgid=None, tdma_slot=None):
+ def update_voice_frequency(self, frequency, tgid=None, tdma_slot=None, srcaddr=None, protected=None, uplink=None):
if not frequency: # e.g., channel identifier not yet known
return
- self.update_talkgroup(frequency, tgid, tdma_slot)
+ self.frequency_tracking(frequency, tgid, tdma_slot, srcaddr, protected)
+ self.update_talkgroup(frequency, tgid, tdma_slot, srcaddr, uplink)
if frequency not in self.voice_frequencies:
self.voice_frequencies[frequency] = {'counter':0}
sorted_freqs = collections.OrderedDict(sorted(self.voice_frequencies.items()))
self.voice_frequencies = sorted_freqs
+ if self.debug >= 5:
+ sys.stderr.write('%f new freq: %f\n' % (time.time(), frequency/1000000.0))
+
if tdma_slot is None:
tdma_slot = 0
- if 'tgid' not in self.voice_frequencies[frequency]:
- self.voice_frequencies[frequency]['tgid'] = [None, None]
+
+ for s in 'tgid srcaddr tg_tag tg_color srcaddr_tag srcaddr_color'.split():
+ if s not in self.voice_frequencies[frequency].keys():
+ self.voice_frequencies[frequency][s] = [None, None]
+
self.voice_frequencies[frequency]['tgid'][tdma_slot] = tgid
self.voice_frequencies[frequency]['counter'] += 1
self.voice_frequencies[frequency]['time'] = time.time()
+ self.voice_frequencies[frequency]['tg_tag'][tdma_slot] = self.get_tag(tgid)
+ self.voice_frequencies[frequency]['tg_color'][tdma_slot] = self.get_tag_color(tgid)
+ if srcaddr is not None:
+ self.voice_frequencies[frequency]['srcaddr'][tdma_slot] = srcaddr
+ self.voice_frequencies[frequency]['srcaddr_tag'][tdma_slot] = self.get_unit_id_tag(srcaddr)
+ self.voice_frequencies[frequency]['srcaddr_color'][tdma_slot] = self.get_unit_id_color(srcaddr)
def get_updated_talkgroups(self, start_time):
return [tgid for tgid in self.talkgroups if (
@@ -200,11 +422,16 @@ class trunked_system (object):
for tg in expired_tgs:
self.blacklist.pop(tg)
- def find_talkgroup(self, start_time, tgid=None):
+ def find_talkgroup(self, start_time, tgid=None, hold=False):
+ tgt_tgid = None
self.blacklist_update(start_time)
- if tgid is not None and tgid in self.talkgroups and self.talkgroups[tgid]['time'] >= start_time:
- return self.talkgroups[tgid]['frequency'], tgid, self.talkgroups[tgid]['tdma_slot']
+
+ if tgid is not None and tgid in self.talkgroups:
+ tgt_tgid = tgid
+
for active_tgid in self.talkgroups:
+ if hold:
+ break
if self.talkgroups[active_tgid]['time'] < start_time:
continue
if active_tgid in self.blacklist:
@@ -213,31 +440,50 @@ class trunked_system (object):
continue
if self.talkgroups[active_tgid]['tdma_slot'] is not None and (self.ns_syid < 0 or self.ns_wacn < 0):
continue
- if tgid is None:
- return self.talkgroups[active_tgid]['frequency'], active_tgid, self.talkgroups[active_tgid]['tdma_slot']
- return None, None, None
+ if tgt_tgid is None:
+ tgt_tgid = active_tgid
+ elif self.talkgroups[active_tgid]['prio'] < self.talkgroups[tgt_tgid]['prio']:
+ tgt_tgid = active_tgid
+
+ if tgt_tgid is not None and self.talkgroups[tgt_tgid]['time'] >= start_time:
+ return self.talkgroups[tgt_tgid]['frequency'], tgt_tgid, self.talkgroups[tgt_tgid]['tdma_slot'], self.talkgroups[tgt_tgid]['srcaddr'], self.talkgroups[tgt_tgid]['uplink']
+ return None, None, None, None, None
+
+ def dump_tgids(self):
+ sys.stderr.write("Known tgids: { ")
+ for tgid in sorted(self.talkgroups.keys()):
+ sys.stderr.write("%d " % tgid);
+ sys.stderr.write("}\n")
def add_blacklist(self, tgid, end_time=None):
if not tgid:
return
self.blacklist[tgid] = end_time
- def decode_mbt_data(self, opcode, header, mbt_data):
+ def decode_mbt_data(self, opcode, src, header, mbt_data):
self.cc_timeouts = 0
self.last_tsbk = time.time()
updated = 0
if self.debug > 10:
- print "decode_mbt_data: %x %x" %(opcode, mbt_data)
+ sys.stderr.write('decode_mbt_data: %x %x\n' %(opcode, mbt_data))
if opcode == 0x0: # grp voice channel grant
+ mfrid = (header >> 72) & 0xff
+ srcaddr = (header >> 48) & 0xffffff
+ opts = (header >> 24) & 0xff
ch1 = (mbt_data >> 64) & 0xffff
ch2 = (mbt_data >> 48) & 0xffff
ga = (mbt_data >> 32) & 0xffff
f = self.channel_id_to_frequency(ch1)
- self.update_voice_frequency(f, tgid=ga, tdma_slot=self.get_tdma_slot(ch1))
+ uplink = self.channel_id_to_frequency(ch2)
+ if self.debug > 0 and src != srcaddr:
+ sys.stderr.write('decode_mbt_data: grp_v_ch_grant: src %d does not match srcaddr %d\n' % (src, srcaddr))
+ d = {'cc_event': 'grp_v_ch_grant_mbt', 'mfrid': mfrid, 'options': opts, 'frequency': f, 'group': self.mk_tg_dict(ga), 'srcaddr': self.mk_src_dict(srcaddr), 'opcode': opcode, 'tdma_slot': self.get_tdma_slot(ch1) }
+ self.post_event(d)
+ self.update_voice_frequency(f, tgid=ga, tdma_slot=self.get_tdma_slot(ch1), srcaddr=srcaddr, protected=opts&64 == 64, uplink=uplink)
if f:
updated += 1
if self.debug > 10:
- print "mbt00 voice grant ch1 %x ch2 %x addr 0x%x" %(ch1, ch2, ga)
+ sys.stderr.write('mbt00 voice grant ch1 %x ch2 %x addr 0x%x\n' %(ch1, ch2, ga))
elif opcode == 0x3c: # adjacent status
syid = (header >> 48) & 0xfff
rfid = (header >> 24) & 0xff
@@ -248,8 +494,9 @@ class trunked_system (object):
f2 = self.channel_id_to_frequency(ch2)
if f1 and f2:
self.adjacent[f1] = 'rfid: %d stid:%d uplink:%f' % (rfid, stid, f2 / 1000000.0)
+ self.adjacent_data[f1] = {'rfid': rfid, 'stid':stid, 'uplink': f2, 'table': None, 'sysid': syid}
if self.debug > 10:
- print "mbt3c adjacent sys %x rfid %x stid %x ch1 %x ch2 %x f1 %s f2 %s" %(syid, rfid, stid, ch1, ch2, self.channel_id_to_string(ch1), self.channel_id_to_string(ch2))
+ sys.stderr.write('mbt3c adjacent sys %x rfid %x stid %x ch1 %x ch2 %x f1 %s f2 %s\n' % (syid, rfid, stid, ch1, ch2, self.channel_id_to_string(ch1), self.channel_id_to_string(ch2)))
elif opcode == 0x3b: # network status
syid = (header >> 48) & 0xfff
wacn = (mbt_data >> 76) & 0xfffff
@@ -262,7 +509,7 @@ class trunked_system (object):
self.ns_wacn = wacn
self.ns_chan = f1
if self.debug > 10:
- print "mbt3b net stat sys %x wacn %x ch1 %s ch2 %s" %(syid, wacn, self.channel_id_to_string(ch1), self.channel_id_to_string(ch2))
+ sys.stderr.write('mbt3b net stat sys %x wacn %x ch1 %s ch2 %s\n' %(syid, wacn, self.channel_id_to_string(ch1), self.channel_id_to_string(ch2)))
elif opcode == 0x3a: # rfss status
syid = (header >> 48) & 0xfff
rfid = (mbt_data >> 88) & 0xff
@@ -278,9 +525,305 @@ class trunked_system (object):
self.rfss_chan = f1
self.rfss_txchan = f2
if self.debug > 10:
- print "mbt3a rfss stat sys %x rfid %x stid %x ch1 %s ch2 %s" %(syid, rfid, stid, self.channel_id_to_string(ch1), self.channel_id_to_string(ch2))
- #else:
- # print "mbt other %x" % opcode
+ sys.stderr.write('mbt3a rfss stat sys %x rfid %x stid %x ch1 %s ch2 %s\n' %(syid, rfid, stid, self.channel_id_to_string(ch1), self.channel_id_to_string(ch2)))
+ elif opcode == 0x31: # AUTH_DMD
+ mfrid = (header >> 72) & 0xff
+ target_address = (header >> 48) & 0xffffff
+ wacn_p1 = (header >> 16) & 0xffff
+ msg_wacn = (wacn_p1 << 4) | (mbt_data >> 188) & 0xf
+ msg_sysid = (mbt_data >> 176) & 0xfff
+ target_id = (mbt_data >> 152) & 0xffffff
+ rs = (mbt_data >> 72) & 0x3ff
+ rand1 = (mbt_data >> 32) & 0x1f
+ d = {'cc_event': 'auth_dmd', 'mfrid': mfrid, 'target_address': self.mk_src_dict(target_address), 'target_id': self.mk_src_dict(target_id), 'opcode': opcode, 'msg_sysid': msg_sysid, 'msg_wacn': msg_wacn, 'rs': rs, 'rand1': rand1 }
+ self.post_event(d)
+ if self.debug > 10:
+ sys.stderr.write('mbt31 auth_dmd target %d wacn 0x%x sysid 0x%x target id %d rs 0x%x rand1 0x%x\n' % (target_address, msg_wacn, msg_sysid, target_id, rs, rand1))
+ else:
+ sys.stderr.write('decode_mbt_data(): received unsupported mbt opcode %x\n' % opcode)
+ return updated
+
+ def decode_tdma_blk(self, blk):
+ self.stats['tsbks'] += 1
+ msg0 = get_ordinals(blk[:1])
+ op = (msg0 >> 6) & 3
+ moc = msg0 & 0x3f
+ if self.debug > 1:
+ sys.stderr.write('tdma_cc: decode_blk: op %x moc %x len %d msg0 0x%x\n' % (op, moc, len(blk), msg0))
+ if op == 0 and moc == 0: # null msg
+ if self.debug > 10:
+ sys.stderr.write('tdma_cc: null block\n')
+ return -1;
+ if op == 0 and moc == 8: # null msg zero bias
+ if self.debug > 10:
+ sys.stderr.write('tdma_cc: null block zero bias\n')
+ return -1;
+
+ if op == 1 and moc == 0x38: # system service broadcast
+ if self.debug > 10:
+ sys.stderr.write('tdma_cc: system service broadcast\n')
+ msglen = 9
+ elif op == 3 and moc == 0x16: # SNDCP data ch
+ if self.debug > 10:
+ sys.stderr.write('tdma_cc: SNDCP data channel announce\n')
+ msglen = 9
+ elif op == 0 and moc == 1: # group voice channel user
+ msglen = 7
+ msg = get_ordinals(blk[:msglen])
+ options = (msg >> 40) & 0xff
+ ga1 = (msg >> 24) & 0xffff
+ sa1 = (msg ) & 0xffffff
+ if self.debug > 1:
+ sys.stderr.write('decode_blk: group voice channel user opts %x ga %x sa %x\n' % (options, ga1, sa1))
+ elif op == 0 and moc == 0x30: # power control sq
+ msglen = 5
+ if self.debug > 1:
+ sys.stderr.write('decode_blk: power control sq\n')
+ elif op == 1 and moc == 0x30: # sync broadcast
+ msglen = 9
+ msg = get_ordinals(blk[:msglen])
+ year = (msg >> 33) & 0x7f
+ month = (msg >> 29) & 0xf
+ day = (msg >> 24) & 0x1f
+ if self.debug > 1:
+ sys.stderr.write('decode_blk: synchronization broadcast %d %d %d\n' % (year, month, day))
+ elif op == 1 and moc == 2: # group voice channel grant update
+ msglen = 9
+ msg = get_ordinals(blk[:msglen])
+ ch1 = (msg >> 48) & 0xffff
+ ga1 = (msg >> 32) & 0xffff
+ ch2 = (msg >> 16) & 0xffff
+ ga2 = (msg ) & 0xffff
+ f1 = self.channel_id_to_frequency(ch1)
+ f2 = self.channel_id_to_frequency(ch2)
+ uplink1 = self.channel_id_to_frequency(ch1, uplink=True)
+ uplink2 = self.channel_id_to_frequency(ch2, uplink=True)
+ if self.debug > 1:
+ sys.stderr.write('decode_blk: group voice channel grant update ga1 %d ch1 %s ga2 %d ch2 %s\n' % (ga1, f1, ga2, f2))
+ opcode = 2 # (p25p1 opcode)
+ d = {'cc_event': 'grp_v_ch_grant_updt', 'mfrid': 0, 'frequency1': f1, 'group1': self.mk_tg_dict(ga1), 'opcode': opcode, 'tdma_slot': self.get_tdma_slot(ch1) }
+ self.update_voice_frequency(f1, tgid=ga1, tdma_slot=self.get_tdma_slot(ch1), uplink=uplink1)
+ if f1 != f2:
+ self.update_voice_frequency(f2, tgid=ga2, tdma_slot=self.get_tdma_slot(ch2), uplink=uplink2)
+ d['frequency2'] = f2
+ d['group2'] = self.mk_tg_dict(ga2)
+ self.post_event(d)
+ if self.debug > 10:
+ sys.stderr.write('phase 2 tsbk02 grant update: chan %s %d %s %d\n' %(self.channel_id_to_string(ch1), ga1, self.channel_id_to_string(ch2), ga2))
+ elif op == 1 and moc == 0x3c: # adjacent
+ msglen = 9
+ msg = get_ordinals(blk[:msglen])
+ syid = (msg >> 40) & 0xfff
+ rfid = (msg >> 32) & 0xff
+ stid = (msg >> 24) & 0xff
+ ch1 = (msg >> 8) & 0xffff
+ table = (ch1 >> 12) & 0xf
+ cls = msg & 0xff
+ f1 = self.channel_id_to_frequency(ch1)
+ if f1 and table in self.freq_table:
+ self.adjacent[f1] = 'rfid: %d stid:%d uplink:%f tbl:%d sysid:0x%x' % (rfid, stid, (f1 + self.freq_table[table]['offset']) / 1000000.0, table, syid)
+ self.adjacent_data[f1] = {'rfid': rfid, 'stid':stid, 'uplink': f1 + self.freq_table[table]['offset'], 'table': table, 'sysid':syid}
+ if self.debug > 10:
+ sys.stderr.write('tsbk3c adjacent: rfid %x stid %d ch1 %x(%s)\n' %(rfid, stid, ch1, self.channel_id_to_string(ch1)))
+ if table in self.freq_table:
+ sys.stderr.write('tsbk3c : %s %s\n' % (self.freq_table[table]['frequency'] , self.freq_table[table]['step'] ))
+ elif op == 1 and moc == 0x33: # iden up tdma
+ msglen = 9
+ opcode = 0x33
+ msg = get_ordinals(blk[:msglen])
+ iden = (msg >> 60) & 0xf
+ channel_type = (msg >> 56) & 0xf
+ toff0 = (msg >> 42) & 0x3fff
+ toff_sign = (toff0 >> 13) & 1
+ toff = toff0 & 0x1fff
+ if toff_sign == 0:
+ toff = 0 - toff
+ spac = (msg >> 32) & 0x3ff
+ f1 = (msg) & 0xffffffff
+ slots_per_carrier = [1,1,1,2,4,2]
+ self.freq_table[iden] = {}
+ self.freq_table[iden]['offset'] = toff * spac * 125
+ self.freq_table[iden]['step'] = spac * 125
+ self.freq_table[iden]['frequency'] = f1 * 5
+ if slots_per_carrier[channel_type] > 1:
+ self.freq_table[iden]['tdma'] = slots_per_carrier[channel_type]
+ d = {'cc_event': 'iden_up_tdma', 'iden': iden, 'offset': self.freq_table[iden]['offset'], 'step': self.freq_table[iden]['step'], 'freq': self.freq_table[iden]['frequency'], 'slots': slots_per_carrier[channel_type], 'opcode': opcode }
+ self.post_event(d)
+ if self.debug > 10:
+ sys.stderr.write('tsbk33 iden up tdma id %d f %d offset %d spacing %d slots/carrier %d\n' % (iden, self.freq_table[iden]['frequency'], self.freq_table[iden]['offset'], self.freq_table[iden]['step'], self.freq_table[iden]['tdma']))
+ elif op == 1 and moc == 0x3b: # network status
+ msglen = 11
+ opcode = 0x3b
+ msg = get_ordinals(blk[:msglen])
+ wacn = (msg >> 52) & 0xfffff
+ syid = (msg >> 40) & 0xfff
+ ch1 = (msg >> 24) & 0xffff
+ color = (msg ) & 0xfff
+ sys.stderr.write('tsbk3b net stat: color: 0x%x\n' % color)
+ f1 = self.channel_id_to_frequency(ch1)
+ if f1:
+ self.ns_syid = syid
+ self.ns_wacn = wacn
+ self.ns_chan = f1
+ if self.debug > 10:
+ sys.stderr.write('tsbk3b net stat: wacn %x syid %x ch1 %x(%s)\n' %(wacn, syid, ch1, self.channel_id_to_string(ch1)))
+ elif op == 1 and moc == 0x3a: # rfss status
+ msglen = 9
+ opcode = 0x3a
+ msg = get_ordinals(blk[:msglen])
+ syid = (msg >> 40) & 0xfff
+ rfid = (msg >> 32) & 0xff
+ stid = (msg >> 24) & 0xff
+ chan = (msg >> 8) & 0xffff
+ f1 = self.channel_id_to_frequency(chan)
+ if f1:
+ self.rfss_syid = syid
+ self.rfss_rfid = rfid
+ self.rfss_stid = stid
+ self.rfss_chan = f1
+ self.rfss_txchan = f1 + self.freq_table[chan >> 12]['offset']
+ if self.debug > 10:
+ sys.stderr.write('tsbk3a rfss status: syid: %x rfid %x stid %d ch1 %x(%s)\n' %(syid, rfid, stid, chan, self.channel_id_to_string(chan)))
+ elif op == 1 and moc == 0x39: # secondary cc
+ msglen = 9
+ opcode = 0x39
+ msg = get_ordinals(blk[:msglen])
+ rfid = (msg >> 56) & 0xff
+ stid = (msg >> 48) & 0xff
+ ch1 = (msg >> 32) & 0xffff
+ ch2 = (msg >> 8) & 0xffff
+ f1 = self.channel_id_to_frequency(ch1)
+ f2 = self.channel_id_to_frequency(ch2)
+ if f1 and f2:
+ self.secondary[ f1 ] = 1
+ self.secondary[ f2 ] = 1
+ sorted_freqs = collections.OrderedDict(sorted(self.secondary.items()))
+ self.secondary = sorted_freqs
+ if self.debug > 10:
+ sys.stderr.write('tsbk39 secondary cc: rfid %x stid %d ch1 %x(%s) ch2 %x(%s)\n' %(rfid, stid, ch1, self.channel_id_to_string(ch1), ch2, self.channel_id_to_string(ch2)))
+ elif op == 1 and moc == 0x3d: # iden_up
+ msglen = 9
+ opcode = 0x3d
+ msg = get_ordinals(blk[:msglen])
+ iden = (msg >> 60) & 0xf
+ bw = (msg >> 51) & 0x1ff
+ toff0 = (msg >> 42) & 0x1ff
+ spac = (msg >> 32) & 0x3ff
+ freq = msg & 0xffffffff
+ toff_sign = (toff0 >> 8) & 1
+ toff = toff0 & 0xff
+ if toff_sign == 0:
+ toff = 0 - toff
+ txt = ["mob xmit < recv", "mob xmit > recv"]
+ self.freq_table[iden] = {}
+ self.freq_table[iden]['offset'] = toff * 250000
+ self.freq_table[iden]['step'] = spac * 125
+ self.freq_table[iden]['frequency'] = freq * 5
+ d = {'cc_event': 'iden_up', 'iden': iden, 'offset': self.freq_table[iden]['offset'], 'step': self.freq_table[iden]['step'], 'freq': self.freq_table[iden]['frequency'], 'opcode': opcode }
+ self.post_event(d)
+ if self.debug > 10:
+ sys.stderr.write('tsbk3d iden id %d toff %f spac %f freq %f\n' % (iden, toff * 0.25, spac * 0.125, freq * 0.000005))
+ else:
+ msglen = -1
+ if self.debug > 0:
+ sys.stderr.write ('tdma_cc unknown request: %x %x %x\n' % (op, moc, get_ordinals(blk)))
+ return msglen
+
+ def decode_tdma_cc(self, blk):
+ while True:
+ rc = self.decode_tdma_blk(blk)
+ if rc < 1:
+ break
+ if rc >= len(blk):
+ break
+ blk = blk[rc:]
+
+ def decode_tsbk_harris(self, tsbk, opcode, mfrid):
+ HARRIS_SGS_EXPIRES = 5.0 # sec.
+ updated = 0
+ if opcode != 0x30: # GRG_EXENC_CMD
+ sys.stderr.write('decode_tsbk: unsupported opcode %02x mfrid %02x\n' % (opcode, mfrid))
+ return updated
+ grg_options = (tsbk >> 72) & 0xff
+ opt_2way = (grg_options & 0x80) == 0
+ opt_group = (grg_options & 0x40) != 0
+ opt_act = (grg_options & 0x20) != 0
+ opt_ssn = grg_options & 0x1f
+ sg = (tsbk >> 56) & 0xffff
+ keyid = (tsbk >> 40) & 0xffff
+ target = (tsbk >> 16) & 0xffffff
+ d = {'cc_event': 'grg_exenc_cmd', 'mfrid': mfrid, 'opt_2way': opt_2way, 'opt_group': opt_group, 'opt_act': opt_act, 'opt_ssn': opt_ssn, 'sg': self.mk_tg_dict(sg), 'keyid': keyid}
+ if opt_group: # target is a group
+ algid = (target >> 16) & 0xff
+ target = target & 0xffff
+ d['target_group'] = self.mk_tg_dict(target)
+ else: # target is a subscriber unit id
+ algid = 128
+ d['target_unit'] = self.mk_src_dict(target)
+ d['algid'] = algid
+ if opt_act and opt_group: # only group id type supported
+ sgkey = '%d-%d' % (sg, target)
+ self.harris_sgs[sgkey] = {'supergroup': self.mk_tg_dict(sg), 'target_group': self.mk_tg_dict(target), 'algid': algid, 'keyid': keyid, 'expires': time.time() + HARRIS_SGS_EXPIRES}
+ return updated
+
+ def decode_tsbk_mot(self, tsbk, opcode, mfrid):
+ updated = 0
+ if opcode == 0x00: # MOT_GRG_ADD_CMD
+ sg = (tsbk >> 64) & 0xffff
+ ga1 = (tsbk >> 48) & 0xffff
+ ga2 = (tsbk >> 32) & 0xffff
+ ga3 = (tsbk >> 16) & 0xffff
+ d = {'cc_event': 'mot_grg_add_cmd', 'mfrid': mfrid, 'sg': self.mk_tg_dict(sg), 'ga1': self.mk_tg_dict(ga1), 'ga2': self.mk_tg_dict(ga2), 'ga3': self.mk_tg_dict(ga3), 'opcode': opcode }
+ self.post_event(d)
+ if self.debug > 10:
+ sys.stderr.write('MOT_GRG_ADD_CMD(0x00): sg:%d ga1:%d ga2:%d ga3:%d\n' % (sg, ga1, ga2, ga3))
+ elif opcode == 0x01: #MOT_GRG_DEL_CMD
+ sg = (tsbk >> 64) & 0xffff
+ ga1 = (tsbk >> 48) & 0xffff
+ ga2 = (tsbk >> 32) & 0xffff
+ ga3 = (tsbk >> 16) & 0xffff
+ d = {'cc_event': 'mot_grg_del_cmd', 'mfrid': mfrid, 'sg': self.mk_tg_dict(sg), 'ga1': self.mk_tg_dict(ga1), 'ga2': self.mk_tg_dict(ga2), 'ga3': self.mk_tg_dict(ga3), 'opcode': opcode }
+ self.post_event(d)
+ if self.debug > 10:
+ sys.stderr.write('MOT_GRG_DEL_CMD(0x01): sg:%d ga1:%d ga2:%d ga3:%d\n' % (sg, ga1, ga2, ga3))
+ elif opcode == 0x02: # MOT_GRG_CN_CRANT
+ ch = (tsbk >> 56) & 0xffff
+ sg = (tsbk >> 40) & 0xffff
+ sa = (tsbk >> 16) & 0xffffff
+ f = self.channel_id_to_frequency(ch)
+ uplink = self.channel_id_to_frequency(ch, uplink=True)
+ d = {'cc_event': 'mot_grg_cn_grant', 'mfrid': mfrid, 'frequency': f, 'sg': self.mk_tg_dict(sg), 'sa': self.mk_src_dict(sa), 'opcode': opcode }
+ self.post_event(d)
+ self.update_voice_frequency(f, tgid=sg, tdma_slot=self.get_tdma_slot(ch), srcaddr=sa, uplink=uplink)
+ if f:
+ updated += 1
+ if self.debug > 10:
+ sys.stderr.write('MOT_GRG_CN_GRANT(0x02): freq %s sg:%d sa:%d\n' % (self.channel_id_to_string(ch), sg, sa))
+ elif opcode == 0x03: #MOT_GRG_CN_GRANT_UPDT
+ ch1 = (tsbk >> 64) & 0xffff
+ sg1 = (tsbk >> 48) & 0xffff
+ ch2 = (tsbk >> 32) & 0xffff
+ sg2 = (tsbk >> 16) & 0xffff
+ f1 = self.channel_id_to_frequency(ch1)
+ f2 = self.channel_id_to_frequency(ch2)
+ uplink1 = self.channel_id_to_frequency(ch1, uplink=True)
+ uplink2 = self.channel_id_to_frequency(ch2, uplink=True)
+ d = {'cc_event': 'mot_grg_cn_grant_updt', 'mfrid': mfrid, 'frequency1': f1, 'sg1': self.mk_tg_dict(sg1), 'opcode': opcode }
+ self.update_voice_frequency(f1, tgid=sg1, tdma_slot=self.get_tdma_slot(ch1), uplink=uplink1)
+ if f1 != f2:
+ self.update_voice_frequency(f2, tgid=sg2, tdma_slot=self.get_tdma_slot(ch2), uplink=uplink2)
+ d['sg2'] = self.mk_tg_dict(sg2)
+ d['frequency2'] = f2
+ self.post_event(d)
+ if f1:
+ updated += 1
+ if f2:
+ updated += 1
+ if self.debug > 10:
+ sys.stderr.write('MOT_GRG_CN_GRANT_UPDT(0x03): freq %s sg1:%d freq %s sg2:%d\n' % (self.channel_id_to_string(ch1), sg1, self.channel_id_to_string(ch2), sg2))
+ else:
+ if self.debug > 10:
+ sys.stderr.write('decode_tsbk: unsupported opcode %02x mfrid %02x\n' % (opcode, mfrid))
return updated
def decode_tsbk(self, tsbk):
@@ -288,104 +831,76 @@ class trunked_system (object):
self.last_tsbk = time.time()
self.stats['tsbks'] += 1
updated = 0
- #if crc16(tsbk, 12) != 0:
- # self.stats['crc'] += 1
- # return # crc check failed
tsbk = tsbk << 16 # for missing crc
opcode = (tsbk >> 88) & 0x3f
+ mfrid = (tsbk >> 80) & 0xff # mfrid
if self.debug > 10:
- print "TSBK: 0x%02x 0x%024x" % (opcode, tsbk)
+ sys.stderr.write('TSBK: 0x%02x 0x%024x mfrid %02x\n' % (opcode, tsbk, mfrid))
+
+ if mfrid == 0x90:
+ return self.decode_tsbk_mot(tsbk, opcode, mfrid)
+ elif mfrid == 0xa4:
+ return self.decode_tsbk_harris(tsbk, opcode, mfrid)
+ elif mfrid != 0:
+ sys.stderr.write('unsupported tsbk mfrid: 0x%02x opcode 0x%02x\n' % (mfrid, opcode))
+ return updated
+
if opcode == 0x00: # group voice chan grant
- mfrid = (tsbk >> 80) & 0xff
- if mfrid == 0x90: # MOT_GRG_ADD_CMD
- sg = (tsbk >> 64) & 0xffff
- ga1 = (tsbk >> 48) & 0xffff
- ga2 = (tsbk >> 32) & 0xffff
- ga3 = (tsbk >> 16) & 0xffff
- if self.debug > 10:
- print "MOT_GRG_ADD_CMD(0x00): sg:%d ga1:%d ga2:%d ga3:%d" % (sg, ga1, ga2, ga3)
- else:
- opts = (tsbk >> 72) & 0xff
- ch = (tsbk >> 56) & 0xffff
- ga = (tsbk >> 40) & 0xffff
- sa = (tsbk >> 16) & 0xffffff
- f = self.channel_id_to_frequency(ch)
- self.update_voice_frequency(f, tgid=ga, tdma_slot=self.get_tdma_slot(ch))
- if f:
- updated += 1
- if self.debug > 10:
- print "tsbk00 grant freq %s ga %d sa %d" % (self.channel_id_to_string(ch), ga, sa)
- elif opcode == 0x01: # reserved
- mfrid = (tsbk >> 80) & 0xff
- if mfrid == 0x90: #MOT_GRG_DEL_CMD
- sg = (tsbk >> 64) & 0xffff
- ga1 = (tsbk >> 48) & 0xffff
- ga2 = (tsbk >> 32) & 0xffff
- ga3 = (tsbk >> 16) & 0xffff
- if self.debug > 10:
- print "MOT_GRG_DEL_CMD(0x01): sg:%d ga1:%d ga2:%d ga3:%d" % (sg, ga1, ga2, ga3)
+ opts = (tsbk >> 72) & 0xff
+ ch = (tsbk >> 56) & 0xffff
+ ga = (tsbk >> 40) & 0xffff
+ sa = (tsbk >> 16) & 0xffffff
+ f = self.channel_id_to_frequency(ch)
+ uplink = self.channel_id_to_frequency(ch, uplink=True)
+ d = {'cc_event': 'grp_v_ch_grant', 'mfrid': mfrid, 'options': opts, 'frequency': f, 'group': self.mk_tg_dict(ga), 'srcaddr': self.mk_src_dict(sa), 'opcode': opcode, 'tdma_slot': self.get_tdma_slot(ch) }
+ self.post_event(d)
+ self.update_voice_frequency(f, tgid=ga, tdma_slot=self.get_tdma_slot(ch), srcaddr=sa, protected=opts&64 == 64, uplink=uplink)
+ if f:
+ updated += 1
+ if self.debug > 10:
+ sys.stderr.write('tsbk00 grant freq %s ga %d sa %d\n' % (self.channel_id_to_string(ch), ga, sa))
elif opcode == 0x02: # group voice chan grant update
- mfrid = (tsbk >> 80) & 0xff
- if mfrid == 0x90:
- ch = (tsbk >> 56) & 0xffff
- sg = (tsbk >> 40) & 0xffff
- sa = (tsbk >> 16) & 0xffffff
- f = self.channel_id_to_frequency(ch)
- self.update_voice_frequency(f, tgid=sg, tdma_slot=self.get_tdma_slot(ch))
- if f:
- updated += 1
- if self.debug > 10:
- print "MOT_GRG_CN_GRANT(0x02): freq %s sg:%d sa:%d" % (self.channel_id_to_string(ch), sg, sa)
- else:
- ch1 = (tsbk >> 64) & 0xffff
- ga1 = (tsbk >> 48) & 0xffff
- ch2 = (tsbk >> 32) & 0xffff
- ga2 = (tsbk >> 16) & 0xffff
- f1 = self.channel_id_to_frequency(ch1)
- f2 = self.channel_id_to_frequency(ch2)
- self.update_voice_frequency(f1, tgid=ga1, tdma_slot=self.get_tdma_slot(ch1))
- if f1 != f2:
- self.update_voice_frequency(f2, tgid=ga2, tdma_slot=self.get_tdma_slot(ch2))
- if f1:
- updated += 1
- if f2:
- updated += 1
- if self.debug > 10:
- print "tsbk02 grant update: chan %s %d %s %d" %(self.channel_id_to_string(ch1), ga1, self.channel_id_to_string(ch2), ga2)
+ ch1 = (tsbk >> 64) & 0xffff
+ ga1 = (tsbk >> 48) & 0xffff
+ ch2 = (tsbk >> 32) & 0xffff
+ ga2 = (tsbk >> 16) & 0xffff
+ f1 = self.channel_id_to_frequency(ch1)
+ f2 = self.channel_id_to_frequency(ch2)
+ uplink1 = self.channel_id_to_frequency(ch1, uplink=True)
+ uplink2 = self.channel_id_to_frequency(ch2, uplink=True)
+ d = {'cc_event': 'grp_v_ch_grant_updt', 'mfrid': mfrid, 'frequency1': f1, 'group1': self.mk_tg_dict(ga1), 'opcode': opcode, 'tdma_slot': self.get_tdma_slot(ch1) }
+ self.update_voice_frequency(f1, tgid=ga1, tdma_slot=self.get_tdma_slot(ch1), uplink=uplink1)
+ if f1 != f2:
+ self.update_voice_frequency(f2, tgid=ga2, tdma_slot=self.get_tdma_slot(ch2), uplink=uplink2)
+ d['frequency2'] = f2
+ d['group2'] = self.mk_tg_dict(ga2)
+ if f1:
+ updated += 1
+ if f2:
+ updated += 1
+ self.post_event(d)
+ if self.debug > 10:
+ sys.stderr.write('tsbk02 grant update: chan %s %d %s %d\n' %(self.channel_id_to_string(ch1), ga1, self.channel_id_to_string(ch2), ga2))
elif opcode == 0x03: # group voice chan grant update exp : TIA.102-AABC-B-2005 page 56
- mfrid = (tsbk >> 80) & 0xff
- if mfrid == 0x90: #MOT_GRG_CN_GRANT_UPDT
- ch1 = (tsbk >> 64) & 0xffff
- sg1 = (tsbk >> 48) & 0xffff
- ch2 = (tsbk >> 32) & 0xffff
- sg2 = (tsbk >> 16) & 0xffff
- f1 = self.channel_id_to_frequency(ch1)
- f2 = self.channel_id_to_frequency(ch2)
- self.update_voice_frequency(f1, tgid=sg1, tdma_slot=self.get_tdma_slot(ch1))
- if f1 != f2:
- self.update_voice_frequency(f2, tgid=sg2, tdma_slot=self.get_tdma_slot(ch2))
- if f1:
- updated += 1
- if f2:
- updated += 1
- if self.debug > 10:
- print "MOT_GRG_CN_GRANT_UPDT(0x03): freq %s sg1:%d freq %s sg2:%d" % (self.channel_id_to_string(ch1), sg1, self.channel_id_to_string(ch2), sg2)
- elif mfrid == 0:
- ch1 = (tsbk >> 48) & 0xffff
- ch2 = (tsbk >> 32) & 0xffff
- ga = (tsbk >> 16) & 0xffff
- f = self.channel_id_to_frequency(ch1)
- self.update_voice_frequency(f, tgid=ga, tdma_slot=self.get_tdma_slot(ch1))
- if f:
- updated += 1
- if self.debug > 10:
- print "tsbk03: freq-t %s freq-r %s ga:%d" % (self.channel_id_to_string(ch1), self.channel_id_to_string(ch2), ga)
+ opts = (tsbk >> 72) & 0xff
+ ch1 = (tsbk >> 48) & 0xffff
+ ch2 = (tsbk >> 32) & 0xffff
+ ga = (tsbk >> 16) & 0xffff
+ f = self.channel_id_to_frequency(ch1)
+ uplink = self.channel_id_to_frequency(ch2)
+ d = {'cc_event': 'grp_v_ch_grant_updt_exp', 'mfrid': mfrid, 'options': opts, 'frequency': f, 'group': self.mk_tg_dict(ga), 'opcode': opcode, 'tdma_slot': self.get_tdma_slot(ch1) }
+ self.post_event(d)
+ self.update_voice_frequency(f, tgid=ga, tdma_slot=self.get_tdma_slot(ch1), uplink=uplink)
+ if f:
+ updated += 1
+ if self.debug > 10:
+ sys.stderr.write('tsbk03: freq-t %s freq-r %s ga:%d\n' % (self.channel_id_to_string(ch1), self.channel_id_to_string(ch2), ga))
elif opcode == 0x16: # sndcp data ch
ch1 = (tsbk >> 48) & 0xffff
ch2 = (tsbk >> 32) & 0xffff
if self.debug > 10:
- print "tsbk16 sndcp data ch: chan %x %x" %(ch1, ch2)
+ sys.stderr.write('tsbk16 sndcp data ch: chan %x %x\n' % (ch1, ch2))
elif opcode == 0x34: # iden_up vhf uhf
iden = (tsbk >> 76) & 0xf
bwvu = (tsbk >> 72) & 0xf
@@ -401,29 +916,31 @@ class trunked_system (object):
self.freq_table[iden]['offset'] = toff * spac * 125
self.freq_table[iden]['step'] = spac * 125
self.freq_table[iden]['frequency'] = freq * 5
+ d = {'cc_event': 'iden_up_vu', 'iden': iden, 'bwvu': bwvu, 'offset': self.freq_table[iden]['offset'], 'step': self.freq_table[iden]['step'], 'freq': self.freq_table[iden]['frequency'], 'opcode': opcode }
+ self.post_event(d)
if self.debug > 10:
- print "tsbk34 iden vhf/uhf id %d toff %f spac %f freq %f [%s]" % (iden, toff * spac * 0.125 * 1e-3, spac * 0.125, freq * 0.000005, txt[toff_sign])
+ sys.stderr.write('tsbk34 iden vhf/uhf id %d toff %f spac %f freq %f [%s]\n' % (iden, toff * spac * 0.125 * 1e-3, spac * 0.125, freq * 0.000005, txt[toff_sign]))
elif opcode == 0x33: # iden_up_tdma
- mfrid = (tsbk >> 80) & 0xff
- if mfrid == 0:
- iden = (tsbk >> 76) & 0xf
- channel_type = (tsbk >> 72) & 0xf
- toff0 = (tsbk >> 58) & 0x3fff
- spac = (tsbk >> 48) & 0x3ff
- toff_sign = (toff0 >> 13) & 1
- toff = toff0 & 0x1fff
- if toff_sign == 0:
- toff = 0 - toff
- f1 = (tsbk >> 16) & 0xffffffff
- slots_per_carrier = [1,1,1,2,4,2]
- self.freq_table[iden] = {}
- self.freq_table[iden]['offset'] = toff * spac * 125
- self.freq_table[iden]['step'] = spac * 125
- self.freq_table[iden]['frequency'] = f1 * 5
+ iden = (tsbk >> 76) & 0xf
+ channel_type = (tsbk >> 72) & 0xf
+ toff0 = (tsbk >> 58) & 0x3fff
+ spac = (tsbk >> 48) & 0x3ff
+ toff_sign = (toff0 >> 13) & 1
+ toff = toff0 & 0x1fff
+ if toff_sign == 0:
+ toff = 0 - toff
+ f1 = (tsbk >> 16) & 0xffffffff
+ slots_per_carrier = [1,1,1,2,4,2]
+ self.freq_table[iden] = {}
+ self.freq_table[iden]['offset'] = toff * spac * 125
+ self.freq_table[iden]['step'] = spac * 125
+ self.freq_table[iden]['frequency'] = f1 * 5
+ if slots_per_carrier[channel_type] > 1:
self.freq_table[iden]['tdma'] = slots_per_carrier[channel_type]
- if self.debug > 10:
- print "tsbk33 iden up tdma id %d f %d offset %d spacing %d slots/carrier %d" % (iden, self.freq_table[iden]['frequency'], self.freq_table[iden]['offset'], self.freq_table[iden]['step'], self.freq_table[iden]['tdma'])
-
+ d = {'cc_event': 'iden_up_tdma', 'iden': iden, 'offset': self.freq_table[iden]['offset'], 'step': self.freq_table[iden]['step'], 'freq': self.freq_table[iden]['frequency'], 'slots': slots_per_carrier[channel_type], 'opcode': opcode }
+ self.post_event(d)
+ if self.debug > 10:
+ sys.stderr.write('tsbk33 iden up tdma id %d f %d offset %d spacing %d slots/carrier %d\n' % (iden, self.freq_table[iden]['frequency'], self.freq_table[iden]['offset'], self.freq_table[iden]['step'], self.freq_table[iden]['tdma']))
elif opcode == 0x3d: # iden_up
iden = (tsbk >> 76) & 0xf
bw = (tsbk >> 67) & 0x1ff
@@ -439,8 +956,10 @@ class trunked_system (object):
self.freq_table[iden]['offset'] = toff * 250000
self.freq_table[iden]['step'] = spac * 125
self.freq_table[iden]['frequency'] = freq * 5
+ d = {'cc_event': 'iden_up', 'iden': iden, 'offset': self.freq_table[iden]['offset'], 'step': self.freq_table[iden]['step'], 'freq': self.freq_table[iden]['frequency'], 'opcode': opcode }
+ self.post_event(d)
if self.debug > 10:
- print "tsbk3d iden id %d toff %f spac %f freq %f" % (iden, toff * 0.25, spac * 0.125, freq * 0.000005)
+ sys.stderr.write('tsbk3d iden id %d toff %f spac %f freq %f\n' % (iden, toff * 0.25, spac * 0.125, freq * 0.000005))
elif opcode == 0x3a: # rfss status
syid = (tsbk >> 56) & 0xfff
rfid = (tsbk >> 48) & 0xff
@@ -454,7 +973,32 @@ class trunked_system (object):
self.rfss_chan = f1
self.rfss_txchan = f1 + self.freq_table[chan >> 12]['offset']
if self.debug > 10:
- print "tsbk3a rfss status: syid: %x rfid %x stid %d ch1 %x(%s)" %(syid, rfid, stid, chan, self.channel_id_to_string(chan))
+ sys.stderr.write('tsbk3a rfss status: syid: %x rfid %x stid %d ch1 %x(%s)\n' %(syid, rfid, stid, chan, self.channel_id_to_string(chan)))
+ elif opcode == 0x29: # secondary cc explicit
+ rfid = (tsbk >> 72) & 0xff # octet 2
+ stid = (tsbk >> 64) & 0xff # octet 3
+ ch_t = (tsbk >> 48) & 0xffff # octet 4,5
+ ch_r = (tsbk >> 24) & 0xffff # octet 7,8
+ ss = (tsbk >> 16) & 0xff # octet 9
+ ft = self.channel_id_to_frequency(ch_t)
+ if ft:
+ self.secondary[ft] = 1
+ if self.debug > 10:
+ sys.stderr.write('tsbk29 sccb_exp: rfid %x stid %d %x(%s) %x(%s)\n' %(rfid, stid, ch_t, self.channel_id_to_string(ch_t), ch_r, self.channel_id_to_string(ch_r)))
+ elif opcode == 0x35: # time and date
+ flags = (tsbk >> 76) & 0xf # octet 2 upper nib
+ local_time_offset = (tsbk >> 64) & 0xfff # octet 2 lower nib and octet 3
+ dt = (tsbk >> 40) & 0xffffff # octet 4-6
+ tm = (tsbk >> 16) & 0xffffff # octet 7-9
+ # TODO: FIXME: check 'flags' bits to verify time/date/offset valid prior to use
+ yy = (dt >> 2) & 0x1fff
+ dd = (dt >> 15) & 0x1f
+ mm = (dt >> 20) & 0xf
+ hh = (tm >> 19) & 0x1f
+ mn = (tm >> 13) & 0x3f
+ ss = (tm >> 7) & 0x3f
+ if self.debug > 10:
+ sys.stderr.write('tsbk35 time and date: flags %x offset %d %02d/%02d/%02d %02d:%02d:%02d\n' % (flags, local_time_offset, yy, mm, dd, hh, mn, ss))
elif opcode == 0x39: # secondary cc
rfid = (tsbk >> 72) & 0xff
stid = (tsbk >> 64) & 0xff
@@ -468,7 +1012,7 @@ class trunked_system (object):
sorted_freqs = collections.OrderedDict(sorted(self.secondary.items()))
self.secondary = sorted_freqs
if self.debug > 10:
- print "tsbk39 secondary cc: rfid %x stid %d ch1 %x(%s) ch2 %x(%s)" %(rfid, stid, ch1, self.channel_id_to_string(ch1), ch2, self.channel_id_to_string(ch2))
+ sys.stderr.write('tsbk39 secondary cc: rfid %x stid %d ch1 %x(%s) ch2 %x(%s)\n' %(rfid, stid, ch1, self.channel_id_to_string(ch1), ch2, self.channel_id_to_string(ch2)))
elif opcode == 0x3b: # network status
wacn = (tsbk >> 52) & 0xfffff
syid = (tsbk >> 40) & 0xfff
@@ -479,8 +1023,9 @@ class trunked_system (object):
self.ns_wacn = wacn
self.ns_chan = f1
if self.debug > 10:
- print "tsbk3b net stat: wacn %x syid %x ch1 %x(%s)" %(wacn, syid, ch1, self.channel_id_to_string(ch1))
+ sys.stderr.write('tsbk3b net stat: wacn %x syid %x ch1 %x(%s)\n' %(wacn, syid, ch1, self.channel_id_to_string(ch1)))
elif opcode == 0x3c: # adjacent status
+ syid = (tsbk >> 56) & 0xfff
rfid = (tsbk >> 48) & 0xff
stid = (tsbk >> 40) & 0xff
ch1 = (tsbk >> 24) & 0xffff
@@ -488,31 +1033,157 @@ class trunked_system (object):
f1 = self.channel_id_to_frequency(ch1)
if f1 and table in self.freq_table:
self.adjacent[f1] = 'rfid: %d stid:%d uplink:%f tbl:%d' % (rfid, stid, (f1 + self.freq_table[table]['offset']) / 1000000.0, table)
+ self.adjacent_data[f1] = {'rfid': rfid, 'stid':stid, 'uplink': f1 + self.freq_table[table]['offset'], 'table': table, 'sysid':syid}
if self.debug > 10:
- print "tsbk3c adjacent: rfid %x stid %d ch1 %x(%s)" %(rfid, stid, ch1, self.channel_id_to_string(ch1))
+ sys.stderr.write('tsbk3c adjacent: rfid %x stid %d ch1 %x(%s) sysid 0x%x\n' %(rfid, stid, ch1, self.channel_id_to_string(ch1), syid))
if table in self.freq_table:
- print "tsbk3c : %s %s" % (self.freq_table[table]['frequency'] , self.freq_table[table]['step'] )
- #else:
- # print "tsbk other %x" % opcode
+ sys.stderr.write('tsbk3c : %s %s\n' % (self.freq_table[table]['frequency'] , self.freq_table[table]['step'] ))
+ elif opcode == 0x20: # ACK_RESP_FNE
+ aiv = (tsbk >> 79) & 1
+ ex = (tsbk >> 78) & 1
+ addl = (tsbk >> 40) & 0xffffffff
+ wacn = None
+ sysid = None
+ srcaddr = None
+ if ex:
+ wacn = (addl > 12) & 0xfffff
+ sysid = addl & 0xfff
+ else:
+ srcaddr = addl & 0xffffff
+ target = (tsbk >> 16) & 0xffffff
+ d = {'cc_event': 'ack_resp_fne', 'aiv': aiv, 'ex': ex, 'addl': addl, 'wacn': wacn, 'tsbk_sysid': sysid, 'source': self.mk_src_dict(srcaddr), 'target': self.mk_src_dict(target), 'opcode': opcode}
+ self.post_event(d)
+ if self.debug > 10:
+ sys.stderr.write('tsbk20 ack_resp_fne: aiv %d ex %d wacn %s sysid %s src %s\n' % (aiv, ex, wacn, sysid, srcaddr))
+ elif opcode == 0x27: # DENY_RESP
+ aiv = (tsbk >> 79) & 1
+ reason = (tsbk >> 64) & 0xff
+ addl = (tsbk >> 40) & 0xffffff
+ target = (tsbk >> 16) & 0xffffff
+ d = {'cc_event': 'deny_resp', 'aiv': aiv, 'reason': reason, 'additional': addl, 'target': self.mk_src_dict(target), 'opcode': opcode}
+ self.post_event(d)
+ if self.debug > 10:
+ sys.stderr.write('tsbk27 deny_resp: aiv %d reason %02x additional %x target %d\n' % (aiv, reason, addl, target))
+ elif opcode == 0x28: # grp_aff_rsp
+ lg = (tsbk >> 79) & 0x01
+ gav = (tsbk >> 72) & 0x03
+ aga = (tsbk >> 56) & 0xffff
+ ga = (tsbk >> 40) & 0xffff
+ ta = (tsbk >> 16) & 0xffffff
+ d = {'cc_event': 'grp_aff_resp', 'affiliation': ['local', 'global'][lg], 'group_aff_value': gav, 'announce_group': self.mk_tg_dict(aga), 'group': self.mk_tg_dict(ga), 'target': self.mk_src_dict(ta), 'opcode': opcode}
+ self.post_event(d)
+ if self.debug > 10:
+ sys.stderr.write('tsbk28 grp_aff_resp: mfrid: 0x%x, gav: %d, aga: %d, ga: %d, ta: %d\n' % (mfrid, gav, aga, ga, ta))
+ elif opcode == 0x2a: # GRP_AFF_Q
+ target = (tsbk >> 40) & 0xffffff
+ source = (tsbk >> 16) & 0xffffff
+ d = {'cc_event': 'grp_aff_q', 'source': self.mk_src_dict(source), 'target': self.mk_src_dict(target), 'opcode': opcode}
+ self.post_event(d)
+ if self.debug > 10:
+ sys.stderr.write('tsbk2a grp_aff_q: mfrid: 0x%x, target %d source %d\n' % (mfrid, target, source))
+ elif opcode == 0x2b: # LOC_REG_RESP
+ rv = (tsbk >> 72) & 3
+ ga = (tsbk >> 56) & 0xffff
+ rfss = (tsbk >> 48) & 0xff
+ siteid = (tsbk >> 40) & 0xff
+ target = (tsbk >> 16) & 0xffffff
+ d = {'cc_event': 'loc_reg_resp', 'rv': rv, 'rfss': rfss, 'siteid': siteid, 'group': self.mk_tg_dict(ga), 'target': self.mk_src_dict(target), 'opcode': opcode}
+ self.post_event(d)
+ if self.debug > 10:
+ sys.stderr.write('tsbk2b loc_reg_resp: mfrid: 0x%x, rv %d group %d rfss 0x%x siteid 0x%x target %d\n' % (mfrid, rv, ga, rfss, siteid, target))
+ elif opcode == 0x2c: # U_REG_RESP
+ rv = (tsbk >> 76) & 1
+ sysid = (tsbk >> 64) & 0xfff
+ target = (tsbk >> 40) & 0xffffff
+ source = (tsbk >> 16) & 0xffffff
+ d = {'cc_event': 'u_reg_resp', 'rv': rv, 'tsbk_sysid': sysid, 'source': self.mk_src_dict(source), 'target': self.mk_src_dict(target), 'opcode': opcode}
+ self.post_event(d)
+ if self.debug > 10:
+ sys.stderr.write('tsbk2c u_reg_resp: mfrid: 0x%x, rv %d sysid %x target %d source %d\n' % (mfrid, rv, sysid, target, source))
+ elif opcode == 0x2d: # U_REG_CMD
+ target = (tsbk >> 40) & 0xffffff
+ source = (tsbk >> 16) & 0xffffff
+ d = {'cc_event': 'u_reg_cmd', 'source': self.mk_src_dict(source), 'target': self.mk_src_dict(target), 'opcode': opcode}
+ self.post_event(d)
+ if self.debug > 10:
+ sys.stderr.write('tsbk2d u_reg_cmd: mfrid: 0x%x, target %d source %d\n' % (mfrid, target, source))
+ elif opcode == 0x2f: # U_DE_REG_ACK
+ wacn = (tsbk >> 52) & 0xfffff
+ sysid = (tsbk >> 40) & 0xfff
+ source = (tsbk >> 16) & 0xffffff
+ d = {'cc_event': 'u_de_reg_ack', 'wacn': wacn, 'tsbk_sysid': sysid, 'source': self.mk_src_dict(source), 'opcode': opcode}
+ self.post_event(d)
+ if self.debug > 10:
+ sys.stderr.write('tsbk2f u_de_reg_ack: mfrid: 0x%x, wacn 0x%x sysid 0x%x source %d\n' % (mfrid, wacn, sysid, source))
+
+ elif opcode == 0x24: # EXT_FNCT_CMD
+ efclass = (tsbk >> 72) & 0xff
+ efoperand = (tsbk >> 64) & 0xff
+ efargs = (tsbk >> 40) & 0xffffff
+ target = (tsbk >> 16) & 0xffffff
+ d = {'cc_event': 'ext_fnct_cmd', 'mfrid': mfrid, 'efclass': efclass, 'efoperand': efoperand, 'efargs': self.mk_src_dict(efargs), 'target': target, 'opcode': opcode}
+ self.post_event(d)
+ if self.debug > 10:
+ sys.stderr.write('tsbk24 ext_fnct_cmd: efclass %d efoperand %d efargs %s target %s\n' % (efclass, efoperand, efargs, target))
+
+
+ else:
+ if self.debug > 1:
+ sys.stderr.write('received unsupported TSBK opcode %x (%x)\n' % (opcode, tsbk))
return updated
def hunt_cc(self, curr_time):
- if self.cc_timeouts < 6:
- return
+ # return True if a tune request for frequency=self.trunk_cc should be issued
+ HUNT_HOLD_TIME = 8.0
+ #if self.cc_timeouts < 6:
+ # return False
+ if self.last_tsbk + HUNT_HOLD_TIME > time.time():
+ return False
+ if self.last_voice_time + HUNT_HOLD_TIME > time.time():
+ return False
+ if time.time() < self.next_hunt_cc:
+ return False
+ self.next_hunt_cc = time.time() + HUNT_HOLD_TIME
self.cc_timeouts = 0
self.cc_list_index += 1
if self.cc_list_index >= len(self.cc_list):
self.cc_list_index = 0
self.trunk_cc = self.cc_list[self.cc_list_index]
- sys.stderr.write('%f set trunk_cc to %s\n' % (curr_time, self.trunk_cc))
-
-def get_int_dict(s):
- if s[0].isdigit():
- return dict.fromkeys([int(d) for d in s.split(',')])
- return dict.fromkeys([int(d) for d in open(s).readlines()])
+ sys.stderr.write('%f %s: cycling to next trunk_cc: %s\n' % (curr_time, self.sysname, self.trunk_cc))
+ if self.trunk_cc != self.last_trunk_cc:
+ self.last_trunk_cc = self.trunk_cc
+ if self.debug >=5:
+ sys.stderr.write('%f %s: control channel change: %f\n' % (curr_time, self.sysname, self.trunk_cc / 1000000.0))
+ return True
+ return True
+
+ def frequency_change_params(self, current_tgid, new_frequency, nac, new_slot, new_frequency_type, curr_time):
+ params = {
+ 'freq': new_frequency,
+ 'tgid': current_tgid,
+ 'offset': self.offset,
+ 'tag': self.get_tag(current_tgid),
+ 'nac': nac,
+ 'system': self.sysname,
+ 'center_frequency': self.center_frequency,
+ 'tdma': new_slot,
+ 'wacn': self.ns_wacn,
+ 'sysid': self.ns_syid,
+ 'srcaddr': self.current_srcaddr,
+ 'grpaddr': self.current_grpaddr,
+ 'alg': self.current_alg,
+ 'algid': self.current_algid,
+ 'channel_type': new_frequency_type,
+ 'keyid': self.current_keyid,
+ 'prio': self.get_prio(current_tgid),
+ 'tag_color': self.get_tag_color(current_tgid),
+ 'srcaddr_color': self.get_unit_id_color(self.current_srcaddr),
+ 'srcaddr_tag': self.get_unit_id_tag(self.current_srcaddr),
+ 'effective_time': curr_time }
+ return params
class rx_ctl (object):
- def __init__(self, debug=0, frequency_set=None, conf_file=None, logfile_workers=None):
+ def __init__(self, debug=0, frequency_set=None, conf_file=None, logfile_workers=None, send_event=None):
class _states(object):
ACQ = 0
CC = 1
@@ -537,23 +1208,29 @@ class rx_ctl (object):
self.wait_until = time.time()
self.configs = {}
self.nacs = []
- self.last_tdma_vf = 0
- self.P2_GRACE_TIME = 1.0 # TODO: make more configurable
self.logfile_workers = logfile_workers
self.active_talkgroups = {}
self.working_frequencies = {}
self.xor_cache = {}
self.last_garbage_collect = 0
+ self.last_command = {'command': None, 'time': time.time()}
if self.logfile_workers:
self.input_rate = self.logfile_workers[0]['demod'].input_rate
+ self.enabled_nacs = None
+ self.next_status_png = time.time()
+ self.send_event = send_event
+ self.status_msg = ''
+ self.next_hunt_time = time.time()
if conf_file:
if conf_file.endswith('.tsv'):
self.build_config_tsv(conf_file)
+ elif conf_file.endswith('.json'):
+ self.build_config_json(conf_file)
else:
self.build_config(conf_file)
- self.nacs = self.configs.keys()
- self.current_nac = self.nacs[0]
+ self.nacs = [int (x) for x in self.configs.keys()]
+ self.current_nac = self.find_next_tsys()
self.current_state = self.states.CC
tsys = self.trunked_systems[self.current_nac]
@@ -564,6 +1241,7 @@ class rx_ctl (object):
self.set_frequency({
'freq': tsys.trunk_cc,
+ 'channel_type': 'cc',
'tgid': None,
'offset': tsys.offset,
'tag': "",
@@ -572,47 +1250,50 @@ class rx_ctl (object):
'center_frequency': tsys.center_frequency,
'tdma': None,
'wacn': None,
- 'sysid': None})
+ 'sysid': None,
+ 'prio': 0,
+ 'tag_color': None })
+
+ def build_config_json(self, conf_file):
+ d = json.loads(open(conf_file).read())
+ chans = [x for x in d['channels'] if x['active'] and x['trunked']]
+ self.configs = { chan['nac']: {'cclist':chan['cclist'],
+ 'offset':0,
+ 'blacklist': {int(tgid):None for tgid in chan['blacklist']},
+ 'whitelist': {int(tgid):None for tgid in chan['whitelist']},
+ 'sysname': chan['name'],
+ 'center_frequency': chan['frequency'],
+ 'modulation': chan['demod_type'],
+ 'tgid_map': {int(tgid): chan['tgids'][tgid] for tgid in chan['tgids'].keys()}}
+ for chan in chans}
+ for nac in self.configs.keys():
+ self.add_trunked_system(nac)
def set_frequency(self, params):
frequency = params['freq']
if frequency and self.frequency_set:
self.frequency_set(params)
+ def enable_status(self, s):
+ if self.debug >= 10:
+ sys.stderr.write('rx_ctl: enable_status: %s\n' % s)
+ nacs = s.split(',')
+ if s and len(nacs):
+ nacs = [int(x) for x in nacs]
+ else:
+ sys.stderr.write('cannot disable all NACs - request ignored\n')
+ return
+ self.enabled_nacs = nacs
+
def add_trunked_system(self, nac):
assert nac not in self.trunked_systems # duplicate nac not allowed
- blacklist = {}
- whitelist = None
- tgid_map = {}
cfg = None
if nac in self.configs:
cfg = self.configs[nac]
- self.trunked_systems[nac] = trunked_system(debug = self.debug, config=cfg)
+ self.trunked_systems[nac] = trunked_system(debug = self.debug, config=cfg, send_event=self.send_event, nac=nac)
def build_config_tsv(self, tsv_filename):
- import csv
- hdrmap = []
- configs = {}
- with open(tsv_filename, 'rb') as csvfile:
- sreader = csv.reader(csvfile, delimiter='\t', quotechar='"', quoting=csv.QUOTE_ALL)
- for row in sreader:
- if not hdrmap:
- # process first line of tsv file - header line
- for hdr in row:
- hdr = hdr.replace(' ', '_')
- hdr = hdr.lower()
- hdrmap.append(hdr)
- continue
- fields = {}
- for i in xrange(len(row)):
- if row[i]:
- fields[hdrmap[i]] = row[i]
- if hdrmap[i] != 'sysname':
- fields[hdrmap[i]] = fields[hdrmap[i]].lower()
- nac = int(fields['nac'], 0)
- configs[nac] = fields
-
- self.setup_config(configs)
+ self.setup_config(load_tsv(tsv_filename))
def build_config(self, config_filename):
import ConfigParser
@@ -629,7 +1310,24 @@ class rx_ctl (object):
configs[nac]['sysname'] = section
self.setup_config(configs)
- def add_default_config(self, nac, cclist=[], offset=0, whitelist=None, blacklist={}, tgid_map={}, sysname=None, center_frequency=None, modulation='cqpsk'):
+ def reload_tags(self, nac):
+ if nac not in self.trunked_systems.keys():
+ return
+ tsys = self.trunked_systems[nac]
+ tgid_tags_file = self.configs[nac]['tgid_tags_file']
+ new_reg = id_registry()
+ read_tags_file(tgid_tags_file, new_reg)
+ tsys.tgid_map = new_reg
+ sys.stderr.write('reloaded %s nac 0x%x\n' % (tgid_tags_file, nac))
+ unit_id_tags_file = self.configs[nac]['unit_id_tags_file']
+ if unit_id_tags_file is None:
+ return
+ new_reg = id_registry()
+ read_tags_file(unit_id_tags_file, new_reg)
+ tsys.unit_id_map = new_reg
+ sys.stderr.write('reloaded %s nac 0x%x\n' % (unit_id_tags_file, nac))
+
+ def add_default_config(self, nac, cclist=[], offset=0, whitelist=None, blacklist={}, tgid_map=None, unit_id_map=None,sysname=None, center_frequency=None, modulation='cqpsk'):
if nac in self.configs.keys():
return
if nac not in self.trunked_systems.keys():
@@ -649,51 +1347,77 @@ class rx_ctl (object):
cclist = [tsys.rfss_chan]
cclist.extend(tsys.secondary.keys())
tsys.cc_list = cclist
- self.configs[nac] = {'cclist':cclist, 'offset':offset, 'whitelist':whitelist, 'blacklist':blacklist, 'tgid_map':tgid_map, 'sysname': sysname, 'center_frequency': center_frequency, 'modulation':modulation}
+ self.configs[nac] = {'cclist':cclist, 'offset':offset, 'whitelist':whitelist, 'blacklist':blacklist, 'tgid_map':tgid_map, 'unit_id_map': unit_id_map, 'sysname': sysname, 'center_frequency': center_frequency, 'modulation':modulation}
self.current_nac = nac
self.current_state = self.states.CC
if nac not in self.nacs:
self.nacs.append(nac)
def setup_config(self, configs):
- for nac in configs:
- self.configs[nac] = {'cclist':[], 'offset':0, 'whitelist':None, 'blacklist':{}, 'tgid_map':{}, 'sysname': configs[nac]['sysname'], 'center_frequency': None}
- for f in configs[nac]['control_channel_list'].split(','):
- self.configs[nac]['cclist'].append(get_frequency(f))
- if 'offset' in configs[nac]:
- self.configs[nac]['offset'] = int(configs[nac]['offset'])
- if 'modulation' in configs[nac]:
- self.configs[nac]['modulation'] = configs[nac]['modulation']
- else:
- self.configs[nac]['modulation'] = 'cqpsk'
- for k in ['whitelist', 'blacklist']:
- if k in configs[nac]:
- self.configs[nac][k] = get_int_dict(configs[nac][k])
- if 'tgid_tags_file' in configs[nac]:
- import csv
- with open(configs[nac]['tgid_tags_file'], 'rb') as csvfile:
- sreader = csv.reader(csvfile, delimiter='\t', quotechar='"', quoting=csv.QUOTE_ALL)
- for row in sreader:
- tgid = int(row[0])
- txt = row[1]
- self.configs[nac]['tgid_map'][tgid] = txt
- if 'center_frequency' in configs[nac]:
- self.configs[nac]['center_frequency'] = get_frequency(configs[nac]['center_frequency'])
-
+ self.configs = make_config(configs)
+ for nac in self.configs.keys():
self.add_trunked_system(nac)
def find_next_tsys(self):
- self.current_id += 1
- if self.current_id >= len(self.nacs):
- self.current_id = 0
- return self.nacs[self.current_id]
+ wrap = 0
+ while True:
+ self.current_id += 1
+ if self.current_id >= len(self.nacs):
+ if wrap:
+ break
+ self.current_id = 0
+ wrap = 1
+ if self.enabled_nacs is not None and self.nacs[self.current_id] not in self.enabled_nacs:
+ continue
+ return self.nacs[self.current_id]
+ return self.nacs[0] ## should not occur
def to_json(self):
+ current_time = time.time()
d = {'json_type': 'trunk_update'}
for nac in self.trunked_systems.keys():
- d[nac] = json.loads(self.trunked_systems[nac].to_json())
+ d[nac] = self.trunked_systems[nac].to_dict()
+ if nac in self.configs.keys() and 'tgid_tags_file' in self.configs[nac]:
+ d[nac]['tgid_tags_file'] = self.configs[nac]['tgid_tags_file']
+ if nac in self.configs.keys() and 'unit_id_tags_file' in self.configs[nac]:
+ d[nac]['unit_id_tags_file'] = self.configs[nac]['unit_id_tags_file']
+ d['data'] = {'last_command': self.last_command['command'],
+ 'last_command_time': int(self.last_command['time'] - current_time),
+ 'tgid_hold': self.tgid_hold,
+ 'tgid_hold_until': int(self.tgid_hold_until - current_time),
+ 'hold_mode': self.hold_mode}
+ d['time'] = current_time
return json.dumps(d)
+ def make_status_png(self):
+ PNG_UPDATE_INTERVAL = 1.0
+ output_file = '../www/images/status.png'
+ tmp_output_file = '../www/images/tmp-status.png'
+ if time.time() < self.next_status_png:
+ return
+ self.next_status_png = time.time() + PNG_UPDATE_INTERVAL
+ status_str = 'OP25-hls hacks (c) Copyright 2020, 2021, KA1RBI\n'
+ status_str += self.status_msg
+ status_str += self.to_string()
+ status = status_str.split('\n')
+ status = [s for s in status if not s.startswith('tbl-id')]
+ create_image(status, imgfile=tmp_output_file, bgcolor="#c0c0c0", windowsize=(640,480))
+ if not os.access(tmp_output_file, os.R_OK):
+ return
+ os.rename(tmp_output_file, output_file)
+
+ def frequency_tracking_expire(self):
+ for nac in self.trunked_systems.keys():
+ self.trunked_systems[nac].frequency_tracking_expire()
+
+ def in_voice_state(self):
+ rc = self.current_state == self.states.TO_VC or self.current_state == self.states.VC
+ return rc
+
+ def dump_tgids(self):
+ for nac in self.trunked_systems.keys():
+ self.trunked_systems[nac].dump_tgids()
+
def to_string(self):
s = ''
for nac in self.trunked_systems:
@@ -702,61 +1426,154 @@ class rx_ctl (object):
return s
def process_qmsg(self, msg):
- type = msg.type()
+ self.frequency_tracking_expire()
+ if self.send_event is not None:
+ self.send_event(None) # periodically sends general status info
+ mtype = msg.type()
updated = 0
curr_time = time.time()
- if type == -2: # request from gui
- cmd = msg.to_string()
+ msgtext = msg.to_string()
+ aa55 = get_ordinals(msgtext[:2])
+ if mtype >= 0 or mtype in [-1, -3, -5, -6, -7]:
+ assert aa55 == 0xaa55
+ msgq_id = get_ordinals(msgtext[2:4])
+ msgtext = msgtext[4:]
+ else:
+ assert aa55 != 0xaa55
+ msgq_id = None
+ if mtype == -7: # P25 phase 1 link control
+ nac = get_ordinals(msgtext[:2])
+ msgtext = msgtext[2:]
+ msg = get_ordinals(msgtext)
+ if self.debug > 10:
+ sys.stderr.write("%f process_qmsg: LC info: %x\n" % (time.time(), msg))
+ opcode = (msg >> 64) & 0x3f
+ if opcode == 40: # rfss
+ lra = (msg >> 56) & 0xff
+ ch1 = (msg >> 40) & 0xffff
+ rfss = (msg >> 32) & 0xff
+ stid = (msg >> 24) & 0xff
+ ch2 = (msg >> 8) & 0xffff
+ ssclass = msg & 0xff
+ if self.debug > 10:
+ sys.stderr.write("%f p25p1 LC: LCRSBX: nac 0x%x lra 0x%x ch1 %x rfss 0x%x stid 0x%x ch2 %x ssclass 0x%x\n" %(time.time(), nac, lra, ch1, rfss, stid, ch2, ssclass))
+ elif opcode == 39: # adjacent
+ lra = (msg >> 56) & 0xff
+ ch1 = (msg >> 40) & 0xffff
+ rfss = (msg >> 32) & 0xff
+ stid = (msg >> 24) & 0xff
+ ch2 = (msg >> 8) & 0xffff
+ flags = msg & 0xff
+ if self.debug > 10:
+ sys.stderr.write("%f p25p1 LC: LCASBX: nac 0x%x lra 0x%x ch1 %x rfss 0x%x stid 0x%x ch2 %x flags 0x%x\n" %(time.time(), nac, lra, ch1, rfss, stid, ch2, flags))
+ else:
+ if self.debug > 0:
+ sys.stderr.write("%f p25p1 LC: unhandled LCO: nac 0x%x 0x%x\n" % (time.time(), nac, opcode))
+ return
+ elif mtype == -3: # P25 call signalling data
if self.debug > 10:
- print "process_qmsg: command: %s" % cmd
- self.update_state(cmd, curr_time)
+ sys.stderr.write("%f process_qmsg: P25 info: %s\n" % (time.time(), msgtext))
+ js = json.loads(msgtext)
+ nac = js['nac']
+ if nac != self.current_nac:
+ sys.stderr.write('warning: nac mismatch: nac %x current_nac %x js %s\n' % (nac, self.current_nac, msgtext))
+ # return
+ if nac not in self.trunked_systems.keys():
+ return
+ tsys = self.trunked_systems[nac]
+ if self.current_state != self.states.CC:
+ tsys.last_voice_time = curr_time
+ if 'srcaddr' in js.keys():
+ tsys.current_srcaddr = js['srcaddr']
+ if 'grpaddr' in js.keys():
+ tsys.current_grpaddr = js['grpaddr']
+ if 'algid' in js.keys():
+ tsys.current_algid = js['algid']
+ if 'alg' in js.keys():
+ tsys.current_alg = js['alg']
+ if 'keyid' in js.keys():
+ tsys.current_keyid = js['keyid']
+ return
+ elif mtype == -2: # request from gui
+ cmd = msgtext
+ if self.debug > 10:
+ sys.stderr.write('process_qmsg: command: %s\n' % cmd)
+ self.update_state(cmd, curr_time, int(msg.arg1())) # self.update_state(cmd, curr_time)
return
- elif type == -1: # timeout
- if self.debug:
- print "process_data_unit timeout"
+ elif mtype == -1: # timeout
+ if self.debug > 0:
+ sys.stderr.write('%f process_data_unit timeout, channel %s\n' % (time.time(), msgq_id))
self.update_state('timeout', curr_time)
if self.logfile_workers:
self.logging_scheduler(curr_time)
return
- elif type < 0:
- print 'unknown message type %d' % (type)
+ elif mtype == -6: # p25 tdma cc
+ # nac is always 1st two bytes
+ nac = get_ordinals(msgtext[:2])
+ msgtext = msgtext[2:]
+ if self.debug > 1:
+ sys.stderr.write('tdma_cc message nac 0x%x text 0x%x len %d\n' % (nac, get_ordinals(msgtext), len(msgtext)))
+ if nac not in self.trunked_systems.keys():
+ sys.stderr.write('tdma_cc received from unexpected NAC 0x%x\n' % nac)
+ return
+ tsys = self.trunked_systems[nac]
+ tsys.decode_tdma_cc(msgtext[1:])
+ return
+ elif mtype < 0:
+ sys.stderr.write('unknown message type %d\n' % (mtype))
return
- s = msg.to_string()
+ s = msgtext
# nac is always 1st two bytes
- nac = (ord(s[0]) << 8) + ord(s[1])
+ nac = get_ordinals(s[:2])
if nac == 0xffff:
- # TDMA
- self.update_state('tdma_duid%d' % type, curr_time)
+ sys.stderr.write('received invalid nac 0xffff, mtype %d msgq_id %s\n' % (mtype, msgq_id))
return
s = s[2:]
if self.debug > 10:
- print "nac %x type %d at %f state %d len %d" %(nac, type, time.time(), self.current_state, len(s))
- if (type == 7 or type == 12) and nac not in self.trunked_systems:
+ sys.stderr.write('nac %x type %d at %f state %d len %d\n' %(nac, mtype, time.time(), self.current_state, len(s)))
+ if (mtype == 7 or mtype == 12) and nac not in self.trunked_systems:
if not self.configs:
# TODO: allow whitelist/blacklist rather than blind automatic-add
self.add_trunked_system(nac)
else:
+ sys.stderr.write("%f NAC %x not configured\n" % (time.time(), nac))
return
- if type == 7: # trunk: TSBK
- t = 0
- for c in s:
- t = (t << 8) + ord(c)
- updated += self.trunked_systems[nac].decode_tsbk(t)
- elif type == 12: # trunk: MBT
- s1 = s[:10]
- s2 = s[10:]
- header = mbt_data = 0
- for c in s1:
- header = (header << 8) + ord(c)
- for c in s2:
- mbt_data = (mbt_data << 8) + ord(c)
+ if nac not in self.trunked_systems.keys():
+ sys.stderr.write('received unknown nac 0x%x, mtype %d len configs %d msgq_id %d\n' % (nac, mtype, len(self.configs.keys()), msgq_id))
+ return
+ tsys = self.trunked_systems[nac]
+ if mtype == 0 or mtype == 5 or mtype == 10: # HDU or LDU1 or LDU2 i.e. voice
+ if self.current_state != self.states.CC:
+ tsys.last_voice_time = curr_time
+ elif mtype == 7: # trunk: TSBK
+ t = get_ordinals(s)
+ updated += tsys.decode_tsbk(t)
+ elif mtype == 12: # trunk: MBT
+ s1 = s[:10] # header without crc
+ s2 = s[12:]
+ header = get_ordinals(s1)
+ mbt_data = get_ordinals(s2)
+
+ fmt = (header >> 72) & 0x1f
+ sap = (header >> 64) & 0x3f
+ src = (header >> 48) & 0xffffff
+ if fmt != 0x17: # only Extended Format MBT presently supported
+ return
+
opcode = (header >> 16) & 0x3f
if self.debug > 10:
- print "type %d at %f state %d len %d/%d opcode %x [%x/%x]" %(type, time.time(), self.current_state, len(s1), len(s2), opcode, header,mbt_data)
- updated += self.trunked_systems[nac].decode_mbt_data(opcode, header << 16, mbt_data << 32)
+ sys.stderr.write('type %d at %f state %d len %d/%d opcode %x [%x/%x]\n' %(mtype, time.time(), self.current_state, len(s1), len(s2), opcode, header,mbt_data))
+ updated += tsys.decode_mbt_data(opcode, src, header << 16, mbt_data << 32)
- if nac != self.current_nac:
- return
+ self.make_status_png()
+
+ #if nac != self.current_nac:
+ # if self.debug > 10: # this is occasionally expected if cycling between different tsys
+ # cnac = self.current_nac
+ # if cnac is None:
+ # cnac = 0
+ # sys.stderr.write("%f received NAC %x does not match expected NAC %x\n" % (time.time(), nac, cnac))
+ # return
if self.logfile_workers:
self.logging_scheduler(curr_time)
@@ -765,7 +1582,7 @@ class rx_ctl (object):
if updated:
self.update_state('update', curr_time)
else:
- self.update_state('duid%d' % type, curr_time)
+ self.update_state('duid%d' % mtype, curr_time)
def find_available_worker(self):
for worker in self.logfile_workers:
@@ -779,7 +1596,7 @@ class rx_ctl (object):
self.working_frequencies[frequency]['worker']['demod'].set_relative_frequency(0)
self.working_frequencies[frequency]['worker']['active'] = False
self.working_frequencies.pop(frequency)
- print '%f release worker frequency %d' % (curr_time, frequency)
+ sys.stderr.write('%f release worker frequency %d\n' % (curr_time, frequency))
def free_talkgroup(self, frequency, tgid, curr_time):
decoder = self.working_frequencies[frequency]['worker']['decoder']
@@ -787,10 +1604,8 @@ class rx_ctl (object):
index = tdma_slot
if tdma_slot is None:
index = 0
- filename = 'idle-channel-%d-%d-%f.wav' % (frequency, index, curr_time)
- decoder.set_output(filename, index=index)
self.working_frequencies[frequency]['tgids'].pop(tgid)
- print '%f release tgid %d frequency %d' % (curr_time, tgid, frequency)
+ sys.stderr.write('%f release tgid %d frequency %d\n' % (curr_time, tgid, frequency))
def logging_scheduler(self, curr_time):
tsys = self.trunked_systems[self.current_nac]
@@ -800,14 +1615,14 @@ class rx_ctl (object):
# see if this tgid active on any other freq(s)
other_freqs = [f for f in self.working_frequencies if f != frequency and tgid in self.working_frequencies[f]['tgids']]
if other_freqs:
- print '%f tgid %d slot %s frequency %d found on other frequencies %s' % (curr_time, tgid, tdma_slot, frequency, ','.join(['%s' % f for f in other_freqs]))
+ sys.stderr.write('%f tgid %d slot %s frequency %d found on other frequencies %s\n' % (curr_time, tgid, tdma_slot, frequency, ','.join(['%s' % f for f in other_freqs])))
for f in other_freqs:
self.free_talkgroup(f, tgid, curr_time)
if not self.working_frequencies[f]['tgids']:
self.free_frequency(f, curr_time)
diff = abs(tsys.center_frequency - frequency)
if diff > self.input_rate/2:
- #print '%f request for frequency %d tgid %d failed, offset %d exceeds maximum %d' % (curr_time, frequency, tgid, diff, self.input_rate/2)
+ #sys.stderr.write('%f request for frequency %d tgid %d failed, offset %d exceeds maximum %d\n' % (curr_time, frequency, tgid, diff, self.input_rate/2))
continue
update = True
@@ -817,25 +1632,28 @@ class rx_ctl (object):
if tgids[tgid]['tdma_slot'] == tdma_slot:
update = False
else:
- print '%f slot switch %s was %s tgid %d frequency %d' % (curr_time, tdma_slot, tgids[tgid]['tdma_slot'], tgid, frequency)
+ sys.stderr.write('%f slot switch %s was %s tgid %d frequency %d\n' % (curr_time, tdma_slot, tgids[tgid]['tdma_slot'], tgid, frequency))
worker = self.working_frequencies[frequency]['worker']
else:
#active_tdma_slots = [tgids[tg]['tdma_slot'] for tg in tgids]
- print '%f new tgid %d slot %s arriving on already active frequency %d' % (curr_time, tgid, tdma_slot, frequency)
+ sys.stderr.write("%f new tgid %d slot %s arriving on already active frequency %d\n" % (curr_time, tgid, tdma_slot, frequency))
+ previous_tgid = [id for id in tgids if tgids[id]['tdma_slot'] == tdma_slot]
+ assert len(previous_tgid) == 1 ## check for logic error
+ self.free_talkgroup(frequency, previous_tgid[0], curr_time)
worker = self.working_frequencies[frequency]['worker']
else:
worker = self.find_available_worker()
if worker is None:
- print '*** error, no free demodulators, freq %d tgid %d' % (frequency, tgid)
+ sys.stderr.write('*** error, no free demodulators, freq %d tgid %d\n' % (frequency, tgid))
continue
self.working_frequencies[frequency] = {'tgids' : {}, 'worker': worker}
worker['demod'].set_relative_frequency(tsys.center_frequency - frequency)
- print '%f starting worker frequency %d tg %d slot %s' % (curr_time, frequency, tgid, tdma_slot)
+ sys.stderr.write('%f starting worker frequency %d tg %d slot %s\n' % (curr_time, frequency, tgid, tdma_slot))
self.working_frequencies[frequency]['tgids'][tgid] = {'updated': curr_time, 'tdma_slot': tdma_slot}
if not update:
continue
filename = 'tgid-%d-%f.wav' % (tgid, curr_time)
- print '%f update frequency %d tg %d slot %s file %s' % (curr_time, frequency, tgid, tdma_slot, filename)
+ sys.stderr.write('%f update frequency %d tg %d slot %s file %s\n' % (curr_time, frequency, tgid, tdma_slot, filename))
# set demod speed, decoder slot, output file name
demod = worker['demod']
decoder = worker['decoder']
@@ -850,6 +1668,7 @@ class rx_ctl (object):
if xorhash not in self.xor_cache:
self.xor_cache[xorhash] = lfsr.p25p2_lfsr(self.current_nac, tsys.ns_syid, tsys.ns_wacn).xor_chars
decoder.set_xormask(self.xor_cache[xorhash], xorhash, index=index)
+ decoder.set_nac(self.current_nac, index=index)
demod.set_omega(symbol_rate)
decoder.set_output(filename, index=index)
@@ -871,10 +1690,13 @@ class rx_ctl (object):
for frequency in gc_frequencies: # expire working frequencies
self.free_frequency(frequency, curr_time)
- def update_state(self, command, curr_time):
+ def update_state(self, command, curr_time, cmd_data = 0): # def update_state(self, command, curr_time):
if not self.configs:
return # run in "manual mode" if no conf
+ if type(command) is not str and isinstance(command, bytes):
+ command = command.decode()
+
nac = self.current_nac
tsys = self.trunked_systems[nac]
@@ -883,74 +1705,140 @@ class rx_ctl (object):
new_state = None
new_nac = None
new_slot = None
+ new_frequency_type = None
+ uplink = None
if command == 'timeout':
if self.current_state == self.states.CC:
if self.debug > 0:
- sys.stderr.write("[%f] control channel timeout\n" % time.time())
+ sys.stderr.write("%f control channel timeout, current CC %d\n" % (time.time(), tsys.trunk_cc))
tsys.cc_timeouts += 1
- elif self.current_state != self.states.CC and curr_time - self.last_tdma_vf > self.P2_GRACE_TIME:
+ elif self.current_state != self.states.CC and tsys.last_voice_time + 1.0 < curr_time:
if self.debug > 0:
- sys.stderr.write("[%f] voice timeout\n" % time.time())
+ sys.stderr.write("%f voice timeout\n" % time.time())
+ if self.hold_mode is False:
+ self.current_tgid = None
+ tsys.current_srcaddr = 0
new_state = self.states.CC
new_frequency = tsys.trunk_cc
+ new_frequency_type = 'cc'
elif command == 'update':
if self.current_state == self.states.CC:
desired_tgid = None
- if self.tgid_hold_until > curr_time:
+ if (self.tgid_hold is not None) and (self.tgid_hold_until > curr_time):
+ if self.debug > 1:
+ sys.stderr.write("%f hold active tg(%s)\n" % (time.time(), self.tgid_hold))
desired_tgid = self.tgid_hold
- new_frequency, new_tgid, tdma_slot = tsys.find_talkgroup(curr_time, tgid=desired_tgid)
+ elif (self.tgid_hold is not None) and (self.hold_mode == False):
+ self.tgid_hold = None
+ new_frequency, new_tgid, tdma_slot, srcaddr, uplink = tsys.find_talkgroup(curr_time, tgid=desired_tgid, hold=self.hold_mode)
if new_frequency:
+ new_frequency_type = 'vc'
+ if self.debug > 0:
+ tslot = tdma_slot if tdma_slot is not None else '-'
+ sys.stderr.write("%f voice update: tg(%s), freq(%s), slot(%s), prio(%d)\n" % (time.time(), new_tgid, new_frequency, tslot, tsys.get_prio(new_tgid)))
+ new_state = self.states.TO_VC
+ self.current_tgid = new_tgid
+ tsys.current_srcaddr = srcaddr
+ self.tgid_hold = new_tgid
+ self.tgid_hold_until = max(curr_time + self.TGID_HOLD_TIME, self.tgid_hold_until)
+ self.wait_until = curr_time + self.TSYS_HOLD_TIME
+ new_slot = tdma_slot
+ elif 0: # # # # # else: # check for priority tgid preemption
+ new_frequency, new_tgid, tdma_slot, srcaddr, uplink = tsys.find_talkgroup(tsys.talkgroups[self.current_tgid]['time'], tgid=self.current_tgid, hold=self.hold_mode)
+ if new_tgid != self.current_tgid:
if self.debug > 0:
- sys.stderr.write("[%f] voice update: tg(%s), freq(%s), slot(%s)\n" % (time.time(), new_tgid, new_frequency, tdma_slot))
+ tslot = tdma_slot if tdma_slot is not None else '-'
+ sys.stderr.write("%f voice preempt: tg(%s), freq(%s), slot(%s), prio(%d)\n" % (time.time(), new_tgid, new_frequency, tslot, tsys.get_prio(new_tgid)))
+ new_frequency_type = 'vc'
new_state = self.states.TO_VC
self.current_tgid = new_tgid
+ tsys.current_srcaddr = srcaddr
+ self.tgid_hold = new_tgid
+ self.tgid_hold_until = max(curr_time + self.TGID_HOLD_TIME, self.tgid_hold_until)
+ self.wait_until = curr_time + self.TSYS_HOLD_TIME
new_slot = tdma_slot
- elif command == 'tdma_duid3': # tdma termination, no channel release (MAC_HANGTIME)
+ else:
+ new_frequency = None
+ elif command == 'duid3' or command == 'tdma_duid3': # termination, no channel release
if self.current_state != self.states.CC:
self.tgid_hold = self.current_tgid
self.tgid_hold_until = max(curr_time + self.TGID_HOLD_TIME, self.tgid_hold_until)
self.wait_until = curr_time + self.TSYS_HOLD_TIME
- self.last_tdma_vf = curr_time
- elif command == 'duid3' or command == 'duid15' or command == 'tdma_duid15': # fdma/tdma termination with channel release
+ elif command == 'duid15' or command == 'tdma_duid15': # termination with channel release
if self.current_state != self.states.CC:
+ if self.debug > 1:
+ sys.stderr.write("%f %s, tg(%d)\n" % (time.time(), command, self.current_tgid))
+ tsys.current_srcaddr = 0
+ tsys.current_grpaddr = 0
+ self.wait_until = curr_time + self.TSYS_HOLD_TIME
+ self.tgid_hold = self.current_tgid
+ self.tgid_hold_until = max(curr_time + self.TGID_HOLD_TIME, self.tgid_hold_until)
+ if self.hold_mode is False:
+ self.current_tgid = None
new_state = self.states.CC
new_frequency = tsys.trunk_cc
+ new_frequency_type = 'cc'
elif command == 'duid0' or command == 'duid5' or command == 'duid10' or command == 'tdma_duid5':
if self.current_state == self.states.TO_VC:
new_state = self.states.VC
self.tgid_hold = self.current_tgid
self.tgid_hold_until = max(curr_time + self.TGID_HOLD_TIME, self.tgid_hold_until)
self.wait_until = curr_time + self.TSYS_HOLD_TIME
- if command == 'tdma_duid5':
- self.last_tdma_vf = curr_time
- elif command == 'duid7' or command == 'duid12':
+ elif command == 'duid7' or command == 'duid12': # tsbk/pdu should never arrive here...
pass
elif command == 'hold':
- if self.hold_mode is False and self.current_tgid:
- self.tgid_hold = self.current_tgid
- self.tgid_hold_until = curr_time + 86400 * 10000
- self.hold_mode = True
+ self.last_command = {'command': command, 'time': curr_time}
+ if self.hold_mode:
+ new_hold_mode = False
+ else:
+ new_hold_mode = True
+ if new_hold_mode and (cmd_data is None or cmd_data < 1):
if self.debug > 0:
- sys.stderr.write ('set hold until %f tgid %s\n' % (self.tgid_hold_until, self.current_tgid))
- elif self.hold_mode is True:
+ sys.stderr.write ('%f set hold failed, unable to determine TGID\n' % (time.time()))
+ new_hold_mode = False
+ if new_hold_mode is False: # unset hold
self.current_tgid = None
self.tgid_hold = None
self.tgid_hold_until = curr_time
- self.hold_mode = False
+ self.hold_mode = new_hold_mode
+ else: # set hold
+ self.tgid_hold = cmd_data
+ self.tgid_hold_until = curr_time + 86400 * 10000
+ self.hold_mode = new_hold_mode
+ if self.debug > 0:
+ sys.stderr.write ('%f set hold tg(%s) until %f\n' % (time.time(), self.tgid_hold, self.tgid_hold_until))
+ if self.debug > 0:
+ sys.stderr.write ('%f set hold tg(%s) until %f mode %s current tgid %s\n' % (time.time(), self.tgid_hold, self.tgid_hold_until, self.hold_mode, self.current_tgid))
+ if self.current_tgid != self.tgid_hold:
+ self.current_tgid = self.tgid_hold
+ self.current_srcaddr = 0
+ self.current_grpaddr = 0
+ self.current_alg = ""
+ self.current_algid = 128
+ self.current_keyid = 0
+ new_state = self.states.CC
+ new_frequency = tsys.trunk_cc
+ new_frequency_type = 'cc'
elif command == 'set_hold':
+ self.last_command = {'command': command, 'time': curr_time}
if self.current_tgid:
self.tgid_hold = self.current_tgid
self.tgid_hold_until = curr_time + 86400 * 10000
self.hold_mode = True
- print 'set hold until %f' % self.tgid_hold_until
+ if self.debug > 0:
+ sys.stderr.write ('%f set hold until %f\n' % (time.time(), self.tgid_hold_until))
elif command == 'unset_hold':
+ self.last_command = {'command': command, 'time': curr_time}
if self.current_tgid:
+ if self.debug > 0:
+ sys.stderr.write ('%f clear hold tg(%s)\n' % (time.time(), self.tgid_hold))
self.current_tgid = None
self.tgid_hold = None
self.tgid_hold_until = curr_time
self.hold_mode = False
elif command == 'skip' or command == 'lockout':
+ self.last_command = {'command': command, 'time': curr_time}
if self.current_tgid:
end_time = None
if command == 'skip':
@@ -960,51 +1848,88 @@ class rx_ctl (object):
self.tgid_hold = None
self.tgid_hold_until = curr_time
self.hold_mode = False
+ tsys.current_srcaddr = 0
if self.current_state != self.states.CC:
new_state = self.states.CC
new_frequency = tsys.trunk_cc
+ new_frequency_type = 'cc'
else:
- print 'update_state: unknown command: %s\n' % command
+ sys.stderr.write('update_state: unknown command: %s\n' % command)
assert 0 == 1
- tsys.hunt_cc(curr_time)
+ if new_frequency is not None and tsys.trunk_cc != tsys.rfss_chan:
+ sys.stderr.write('warning: trunk control channel frequency %f does not match rfss frequency %f\n' % (tsys.trunk_cc/1000000.0, tsys.rfss_chan/1000000.0))
- if self.wait_until <= curr_time and self.tgid_hold_until <= curr_time and new_state is None:
+ hunted_cc = tsys.hunt_cc(curr_time)
+
+ if self.enabled_nacs is not None and self.current_nac not in self.enabled_nacs:
+ tsys.current_srcaddr = 0
+ tsys.current_grpaddr = 0
+ new_nac = self.find_next_tsys()
+ new_state = self.states.CC
+ elif self.current_state != self.states.CC and self.tgid_hold_until <= curr_time and self.hold_mode is False and new_state is None:
+ if self.debug > 1:
+ sys.stderr.write("%f release tg(%s)\n" % (time.time(), self.current_tgid))
+ self.tgid_hold = None
+ self.current_tgid = None
+ tsys.current_srcaddr = 0
+ tsys.current_grpaddr = 0
+ new_state = self.states.CC
+ new_frequency = tsys.trunk_cc
+ new_frequency_type = 'cc'
+ elif self.wait_until <= curr_time and self.tgid_hold_until <= curr_time and self.hold_mode is False and new_state is None:
self.wait_until = curr_time + self.TSYS_HOLD_TIME
+ tsys.current_srcaddr = 0
+ tsys.current_grpaddr = 0
new_nac = self.find_next_tsys()
new_state = self.states.CC
- if new_nac:
+ if new_nac is not None:
nac = self.current_nac = new_nac
tsys = self.trunked_systems[nac]
new_frequency = tsys.trunk_cc
+ new_frequency_type = 'cc'
+ tsys.current_srcaddr = 0
+ tsys.current_grpaddr = 0
self.current_tgid = None
- if new_frequency:
- self.set_frequency({
- 'freq': new_frequency,
- 'tgid': self.current_tgid,
- 'offset': tsys.offset,
- 'tag': tsys.get_tag(self.current_tgid),
- 'nac': nac,
- 'system': tsys.sysname,
- 'center_frequency': tsys.center_frequency,
- 'tdma': new_slot,
- 'wacn': tsys.ns_wacn,
- 'sysid': tsys.ns_syid})
+ if new_frequency is not None:
+ params = tsys.frequency_change_params(self.current_tgid, new_frequency, nac, new_slot, new_frequency_type, curr_time)
+ if uplink is not None and uplink > 0:
+ params['uplink'] = uplink
+ self.status_msg = 'F %f TG %s %s at %s\n' % (params['freq'] / 1000000.0, params['tgid'], params['tag'], time.asctime())
+ self.set_frequency(params)
- if new_state:
+ if new_state is not None:
self.current_state = new_state
+ def parallel_hunt_cc(self):
+ curr_time = time.time()
+ if curr_time < self.next_hunt_time:
+ return
+ self.next_hunt_time = curr_time + 1.0
+ for nac in self.trunked_systems.keys():
+ tsys = self.trunked_systems[nac]
+ rc = tsys.hunt_cc(curr_time)
+ if not rc:
+ continue
+ tgid = None
+ freq = tsys.trunk_cc
+ new_slot = None
+ new_frequency_type = 'cc'
+ params = tsys.frequency_change_params(tgid, freq, nac, new_slot, new_frequency_type, curr_time)
+ self.status_msg = 'F %f TG %s %s at %s\n' % (params['freq'] / 1000000.0, params['tgid'], params['tag'], time.asctime())
+ self.set_frequency(params)
+
def main():
q = 0x3a000012ae01013348704a54
rc = crc16(q,12)
- print "should be zero: %x" % rc
+ sys.stderr.write('should be zero: %x\n' % rc)
assert rc == 0
q = 0x3a001012ae01013348704a54
rc = crc16(q,12)
- print "should be nonzero: %x" % rc
+ sys.stderr.write('should be nonzero: %x\n' % rc)
assert rc != 0
t = trunked_system(debug=255)
diff --git a/op25/gr-op25_repeater/apps/tsvfile.py b/op25/gr-op25_repeater/apps/tsvfile.py
new file mode 100755
index 0000000..867e331
--- /dev/null
+++ b/op25/gr-op25_repeater/apps/tsvfile.py
@@ -0,0 +1,191 @@
+
+# Copyright 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018 Max H. Parke KA1RBI
+#
+# This file is part of OP25
+#
+# OP25 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 3, or (at your option)
+# any later version.
+#
+# OP25 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 OP25; see the file COPYING. If not, write to the Free
+# Software Foundation, Inc., 51 Franklin Street, Boston, MA
+# 02110-1301, USA.
+
+import sys
+import os
+import csv
+
+def get_frequency(f): # return frequency in Hz
+ if f.find('.') == -1: # assume in Hz
+ return int(f)
+ else: # assume in MHz due to '.'
+ return int(float(f) * 1000000)
+
+def get_int_dict(s):
+ # parameter string s is the file name to be read,
+ # except when the first character of s is a digit,
+ # in which case s itself is the comma-separated list of ints
+
+ if s[0].isdigit():
+ return dict.fromkeys([int(d) for d in s.split(',')])
+
+ # create dict by reading from file
+ d = {} # this is the dict
+ with open(s,"r") as f:
+ for v in f:
+ v = v.split("\t",1) # split on tab
+ try:
+ v0 = int(v[0]) # first parameter is tgid or start of tgid range
+ v1 = v0
+ if (len(v) > 1) and (int(v[1]) > v0): # second parameter if present is end of tgid range
+ v1 = int(v[1])
+
+ for tg in range(v0, (v1 + 1)):
+ if tg not in d: # is this a new tg?
+ d[tg] = [] # if so, add to dict (key only, value null)
+ sys.stderr.write('added talkgroup %d from %s\n' % (tg,s))
+
+ except (IndexError, ValueError) as ex:
+ continue
+ f.close()
+ return dict.fromkeys(d)
+
+def utf_ascii(ustr):
+ return (ustr.decode("utf-8")).encode("ascii", "ignore")
+
+class id_registry:
+ def __init__(self):
+ self.cache = {}
+ self.wildcards = {}
+
+ def add(self, id_str, tag, color):
+ if '-' in id_str:
+ a = [int(x) for x in id_str.split('-')]
+ if a[0] >= a[1]:
+ raise AssertionError('invalid ID range in %s' % id_str)
+ for i in range(a[0], a[1]+1):
+ self.cache[i] = {'tag': tag, 'color': color}
+ elif '.' in id_str:
+ rc = id_str.find('.')
+ self.wildcards[id_str] = {'prefix': id_str[:rc], 'len': len(id_str), 'tag': tag, 'color': color, 'type': '.'}
+ elif '*' in id_str:
+ rc = id_str.find('*')
+ self.wildcards[id_str] = {'prefix': id_str[:rc], 'len': 0, 'tag': tag, 'color': color, 'type': '*'}
+ else:
+ self.cache[int(id_str)] = {'tag': tag, 'color': color}
+
+ def lookup(self, id):
+ if id in self.cache.keys():
+ return self.cache[id]
+ id_str = '%d' % id
+ for w in self.wildcards.keys():
+ if not id_str.startswith(self.wildcards[w]['prefix']):
+ continue
+ if self.wildcards[w]['type'] == '.' and len(id_str) != self.wildcards[w]['len']:
+ continue
+ # wildcard matched
+ self.cache[id] = {'tag': self.wildcards[w]['tag'], 'color': self.wildcards[w]['color']}
+ return self.cache[id]
+ # not found in cache, and no wildcard matched
+ self.cache[id] = None
+ return None
+
+ def get_color(self, id):
+ d = self.lookup(id)
+ if not d:
+ return 0
+ return d['color']
+
+ def get_tag(self, id):
+ d = self.lookup(id)
+ if not d:
+ return ""
+ return d['tag']
+
+def load_tsv(tsv_filename):
+ hdrmap = []
+ configs = {}
+ with open(tsv_filename, 'r') as csvfile:
+ sreader = csv.reader(csvfile, delimiter='\t', quotechar='"', quoting=csv.QUOTE_ALL)
+ for row in sreader:
+ if not hdrmap:
+ # process first line of tsv file - header line
+ for hdr in row:
+ hdr = hdr.replace(' ', '_')
+ hdr = hdr.lower()
+ hdrmap.append(hdr)
+ continue
+ fields = {}
+ for i in range(len(row)):
+ if row[i]:
+ fields[hdrmap[i]] = row[i]
+ if hdrmap[i] != 'sysname':
+ fields[hdrmap[i]] = fields[hdrmap[i]].lower()
+ nac = int(fields['nac'], 0)
+ configs[nac] = fields
+ return configs
+
+def read_tags_file(tags_file, result):
+ import csv
+ with open(tags_file, 'r') as csvfile:
+ sreader = csv.reader(csvfile, delimiter='\t', quotechar='"', quoting=csv.QUOTE_ALL)
+ for row in sreader:
+ id_str = row[0]
+ txt = row[1]
+ if len(row) >= 3:
+ try:
+ color = int(row[2])
+ except ValueError as ex:
+ color = 0
+ else:
+ color = 0
+ result.add(id_str, txt, color)
+
+def make_config(configs):
+ result_config = {}
+ for nac in configs:
+ result_config[nac] = {'cclist':[], 'offset':0, 'whitelist':None, 'blacklist':{}, 'tgid_map':id_registry(), 'unit_id_map': id_registry(), 'sysname': configs[nac]['sysname'], 'center_frequency': None}
+ for f in configs[nac]['control_channel_list'].split(','):
+ result_config[nac]['cclist'].append(get_frequency(f))
+ if 'offset' in configs[nac]:
+ result_config[nac]['offset'] = int(configs[nac]['offset'])
+ if 'modulation' in configs[nac]:
+ result_config[nac]['modulation'] = configs[nac]['modulation']
+ else:
+ result_config[nac]['modulation'] = 'cqpsk'
+ for k in ['whitelist', 'blacklist']:
+ if k in configs[nac]:
+ result_config[nac][k] = get_int_dict(configs[nac][k])
+ if 'tgid_tags_file' in configs[nac]:
+ fname = configs[nac]['tgid_tags_file']
+ if ',' in fname:
+ l = fname.split(',')
+ tgid_tags_file = l[0]
+ unit_id_tags_file = l[1]
+ else:
+ tgid_tags_file = fname
+ unit_id_tags_file = None
+ result_config[nac]['tgid_tags_file'] = tgid_tags_file
+ result_config[nac]['unit_id_tags_file'] = unit_id_tags_file
+ read_tags_file(tgid_tags_file, result_config[nac]['tgid_map'])
+ if unit_id_tags_file is not None and os.access(unit_id_tags_file, os.R_OK):
+ read_tags_file(unit_id_tags_file, result_config[nac]['unit_id_map'])
+
+ if 'center_frequency' in configs[nac]:
+ result_config[nac]['center_frequency'] = get_frequency(configs[nac]['center_frequency'])
+ return result_config
+
+def main():
+ import json
+ result = make_config(load_tsv(sys.argv[1]))
+ print (json.dumps(result, indent=4, separators=[',',':'], sort_keys=True))
+
+if __name__ == '__main__':
+ main()
diff --git a/op25/gr-op25_repeater/apps/tx/README-fakecc.txt b/op25/gr-op25_repeater/apps/tx/README-fakecc.txt
new file mode 100644
index 0000000..4d629ce
--- /dev/null
+++ b/op25/gr-op25_repeater/apps/tx/README-fakecc.txt
@@ -0,0 +1,31 @@
+
+Generating and transmitting a fake trunking control channel
+===========================================================
+
+1. After editing, run generate-tsbks.py which should generate
+a file named "p25.out".
+
+2. The tool generates the file packed form; it must be unpacked
+ ./unpack.py -i p25.out -o sym-cc925.dat
+
+3. The unpacked file must be referenced in the json cfg file:
+ .
+ .
+ .
+ "source": "symbols:sym-cc925.dat",
+ .
+ .
+ .
+
+NOTE: in generate_tsbks.py, keys starting with "iden_up"
+are used to define a channel band plan with bandwidth(bw),
+channel spacing, and starting frequency in Hz; TX offset is in
+MHz.
+
+NOTE: with rx.py and multi_tx.py in tandem using the udp option,
+the center frequency must be set in the rx.py trunking TSV
+file equal to the device frequency in the multi_tx config.
+
+As always, the control channel and voice channel frequencies
+must fall inside the band defined by the center freqency and
+sampling rate.
diff --git a/op25/gr-op25_repeater/apps/tx/dstar-cfg.dat b/op25/gr-op25_repeater/apps/tx/dstar-cfg.dat
new file mode 100644
index 0000000..a1451c7
--- /dev/null
+++ b/op25/gr-op25_repeater/apps/tx/dstar-cfg.dat
@@ -0,0 +1,41 @@
+#################################################################################
+#
+# config file for DSTAR TX
+#
+#################################################################################
+#
+# This file is part of OP25
+#
+# This 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 3, 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 General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this software; see the file COPYING. If not, write to
+# the Free Software Foundation, Inc., 51 Franklin Street,
+# Boston, MA 02110-1301, USA.
+#################################################################################
+#
+# NOTE
+#
+# Syntax is unforgiving - no whitespace allowed (outside of comments)
+#
+#################################################################################
+# flags - specify values in hex
+flag1=0
+flag2=0
+flag3=0
+# call sign fields - all have an 8-character limit
+rptcall2=DIRECT
+rptcall1=DIRECT
+urcall=CQCQCQ
+# # # # # # # # # # # # set your callsign in next line
+mycall1=mycall
+# appears to be used as a radio model ID - 4-char limit
+mycall2=OP25
diff --git a/op25/gr-op25_repeater/apps/tx/dv_tx.py b/op25/gr-op25_repeater/apps/tx/dv_tx.py
index d3f6082..c841176 100755
--- a/op25/gr-op25_repeater/apps/tx/dv_tx.py
+++ b/op25/gr-op25_repeater/apps/tx/dv_tx.py
@@ -1,8 +1,8 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
#################################################################################
#
-# Multiprotocol Digital Voice TX (C) Copyright 2017 Max H. Parke KA1RBI
+# Multiprotocol Digital Voice TX (C) Copyright 2017, 2018, 2019, 2020 Max H. Parke KA1RBI
#
# This file is part of OP25
#
@@ -25,8 +25,8 @@
import sys
import os
import math
-from gnuradio import gr, gru, audio, eng_notation
-from gnuradio import filter, blocks, analog, digital
+from gnuradio import gr, audio, eng_notation
+from gnuradio import filter, blocks, analog, digital, fft
from gnuradio.eng_option import eng_option
from optparse import OptionParser
@@ -37,18 +37,25 @@ from math import pi
from op25_c4fm_mod import p25_mod_bf
-RC_FILTER = {'dmr': 'rrc', 'p25': 'rc', 'ysf': 'rrc', 'dstar': None}
+sys.path.append('..')
+from gr_gnuplot import float_sink_f
+
+RC_FILTER = {'dmr': 'rrc', 'p25': 'rc', 'ysf': 'rrc', 'dstar': None, 'nxdn48': 'nxdn48', 'nxdn96': 'nxdn96'}
output_gains = {
'dmr': 5.5,
'dstar': 0.95,
- 'p25': 5.0,
- 'ysf': 5.5
+ 'p25': 4.5,
+ 'ysf': 5.5,
+ 'nxdn48': 1.0,
+ 'nxdn96': 1.0
}
gain_adjust = {
'dmr': 3.0,
'dstar': 7.5,
- 'ysf': 5.0
+ 'ysf': 4.0,
+ 'nxdn48': 1.0,
+ 'nxdn96': 1.0
}
gain_adjust_fullrate = {
'p25': 2.0,
@@ -58,7 +65,9 @@ mod_adjust = { # rough values
'dmr': 0.35,
'dstar': 0.075,
'p25': 0.33,
- 'ysf': 0.42
+ 'ysf': 0.42,
+ 'nxdn48': 1.66667,
+ 'nxdn96': 1.93
}
class my_top_block(gr.top_block):
@@ -79,36 +88,40 @@ class my_top_block(gr.top_block):
parser = OptionParser(option_class=eng_option)
parser.add_option("-a", "--args", type="string", default="", help="device args")
+ parser.add_option("-A", "--alt-modulator-rate", type="int", default=50000, help="when mod rate is not a submutiple of IF rate")
parser.add_option("-b", "--bt", type="float", default=0.5, help="specify bt value")
parser.add_option("-c", "--config-file", type="string", default=None, help="specify the config file name")
parser.add_option("-f", "--file1", type="string", default=None, help="specify the input file slot 1")
parser.add_option("-F", "--file2", type="string", default=None, help="specify the input file slot 2 (DMR)")
parser.add_option("-g", "--gain", type="float", default=1.0, help="input gain")
- parser.add_option("-i", "--if-rate", type="float", default=960000, help="output rate to sdr")
+ parser.add_option("-i", "--if-rate", type="int", default=480000, help="output rate to sdr")
parser.add_option("-I", "--audio-input", type="string", default="", help="pcm input device name. E.g., hw:0,0 or /dev/dsp")
+ parser.add_option("-k", "--symbol-sink", type="string", default=None, help="write symbols to file (optional)")
parser.add_option("-N", "--gains", type="string", default=None, help="gain settings")
parser.add_option("-O", "--audio-output", type="string", default="default", help="pcm output device name. E.g., hw:0,0 or /dev/dsp")
parser.add_option("-o", "--output-file", type="string", default=None, help="specify the output file")
- parser.add_option("-p", "--protocol", type="choice", default=None, choices=('dmr', 'dstar', 'p25', 'ysf'), help="specify protocol: dmr, dstar, p25, ysf")
+ parser.add_option("-p", "--protocol", type="choice", default=None, choices=('dmr', 'dstar', 'p25', 'ysf', 'nxdn48', 'nxdn96'), help="specify protocol: dmr, dstar, p25, ysf, nxdn48, nxdn96")
parser.add_option("-q", "--frequency-correction", type="float", default=0.0, help="ppm")
parser.add_option("-Q", "--frequency", type="float", default=0.0, help="Hz")
parser.add_option("-r", "--repeat", action="store_true", default=False, help="input file repeat")
+ parser.add_option("-P", "--plot-audio", action="store_true", default=False, help="scope input")
parser.add_option("-R", "--fullrate-mode", action="store_true", default=False, help="ysf fullrate")
- parser.add_option("-s", "--sample-rate", type="int", default=48000, help="output sample rate")
+ parser.add_option("-s", "--modulator-rate", type="int", default=48000, help="must be submultiple of IF rate - see also -A")
+ parser.add_option("-S", "--alsa-rate", type="int", default=48000, help="sound source/sink sample rate")
parser.add_option("-t", "--test", type="string", default=None, help="test pattern symbol file")
parser.add_option("-v", "--verbose", type="int", default=0, help="additional output")
(options, args) = parser.parse_args()
max_inputs = 1
- if options.protocol is None:
- print 'protocol [-p] option missing'
+ if options.protocol is None:
+ print ('protocol [-p] option missing')
sys.exit(0)
- if options.protocol == 'ysf' or options.protocol == 'dmr':
- assert options.config_file # dmr and ysf require config file ("-c FILENAME" option)
+ if options.protocol == 'ysf' or options.protocol == 'dmr' or options.protocol == 'dstar' or options.protocol.startswith('nxdn'):
+ assert options.config_file # dstar, dmr, ysf, and nxdn require config file ("-c FILENAME" option)
- output_gain = output_gains[options.protocol]
+ output_gain = output_gains[options.protocol]
if options.test: # input file is in symbols of size=char
ENCODER = blocks.file_source(gr.sizeof_char, options.test, True)
@@ -124,7 +137,7 @@ class my_top_block(gr.top_block):
ENCODER = op25_repeater.dstar_tx_sb(options.verbose, options.config_file)
elif options.protocol == 'p25':
ENCODER = op25_repeater.vocoder(True, # 0=Decode,True=Encode
- 0, # Verbose flag
+ False, # Verbose flag
0, # flex amount
"", # udp ip address
0, # udp port
@@ -135,7 +148,9 @@ class my_top_block(gr.top_block):
ENCODER.set_gain_adjust(gain_adjust_fullrate['ysf'])
else:
ENCODER.set_gain_adjust(gain_adjust['ysf'])
- if options.protocol == 'p25':
+ elif options.protocol.startswith('nxdn'):
+ ENCODER = op25_repeater.nxdn_tx_sb(options.verbose, options.config_file, options.protocol == 'nxdn96')
+ if options.protocol == 'p25' and not options.test:
ENCODER.set_gain_adjust(gain_adjust_fullrate[options.protocol])
elif not options.test and not options.protocol == 'ysf':
ENCODER.set_gain_adjust(gain_adjust[options.protocol])
@@ -145,13 +160,16 @@ class my_top_block(gr.top_block):
if options.file2 and options.protocol == 'dmr':
nfiles += 1
if nfiles < max_inputs and not options.test:
- AUDIO = audio.source(options.sample_rate, options.audio_input)
- lpf_taps = filter.firdes.low_pass(1.0, options.sample_rate, 3400.0, 3400 * 0.1, filter.firdes.WIN_HANN)
+ AUDIO = audio.source(options.alsa_rate, options.audio_input)
+ lpf_taps = filter.firdes.low_pass(1.0, options.alsa_rate, 3400.0, 3400 * 0.1, filter.firdes.WIN_HANN)
audio_rate = 8000
- AUDIO_DECIM = filter.fir_filter_fff (int(options.sample_rate / audio_rate), lpf_taps)
+ AUDIO_DECIM = filter.fir_filter_fff (int(options.alsa_rate / audio_rate), lpf_taps)
AUDIO_SCALE = blocks.multiply_const_ff(32767.0 * options.gain)
AUDIO_F2S = blocks.float_to_short()
self.connect(AUDIO, AUDIO_DECIM, AUDIO_SCALE, AUDIO_F2S)
+ if options.plot_audio:
+ PLOT_F = float_sink_f()
+ self.connect(AUDIO, PLOT_F)
if options.file1:
IN1 = blocks.file_source(gr.sizeof_short, options.file1, options.repeat)
@@ -172,24 +190,42 @@ class my_top_block(gr.top_block):
else:
self.connect(AUDIO_F2S, ENCODER2)
- MOD = p25_mod_bf(output_sample_rate = options.sample_rate, dstar = (options.protocol == 'dstar'), bt = options.bt, rc = RC_FILTER[options.protocol])
+ MOD = p25_mod_bf(output_sample_rate = options.modulator_rate, dstar = (options.protocol == 'dstar'), bt = options.bt, rc = RC_FILTER[options.protocol])
AMP = blocks.multiply_const_ff(output_gain)
if options.output_file:
OUT = blocks.file_sink(gr.sizeof_float, options.output_file)
elif not options.args:
- OUT = audio.sink(options.sample_rate, options.audio_output)
+ OUT = audio.sink(options.alsa_rate, options.audio_output)
+ if options.symbol_sink:
+ SYMBOL_SINK = blocks.file_sink(gr.sizeof_char, options.symbol_sink)
if options.protocol == 'dmr' and not options.test:
self.connect(DMR, MOD)
+ if options.symbol_sink:
+ self.connect(DMR, SYMBOL_SINK)
else:
self.connect(ENCODER, MOD)
+ if options.symbol_sink:
+ self.connect(ENCODER, SYMBOL_SINK)
if options.args:
self.setup_sdr_output(options, mod_adjust[options.protocol])
- interp = filter.rational_resampler_fff(options.if_rate / options.sample_rate, 1)
- self.attn = blocks.multiply_const_cc(0.25)
- self.connect(MOD, AMP, interp, self.fm_modulator, self.attn, self.u)
+ f1 = float(options.if_rate) / options.modulator_rate
+ i1 = int(options.if_rate / options.modulator_rate)
+ if f1 - i1 > 1e-3:
+ f1 = float(options.if_rate) / options.alt_modulator_rate
+ i1 = int(options.if_rate / options.alt_modulator_rate)
+ if f1 - i1 > 1e-3:
+ print ('*** Error, sdr rate %d not an integer multiple of alt modulator rate %d - ratio=%f' % (options.if_rate, options.alt_modulator_rate, f1))
+ sys.exit(0)
+ a_resamp = filter.pfb.arb_resampler_fff(options.alt_modulator_rate / float(options.modulator_rate))
+ sys.stderr.write('adding resampler for rate change %d ===> %d\n' % (options.modulator_rate, options.alt_modulator_rate))
+ interp = filter.rational_resampler_fff(options.if_rate / options.alt_modulator_rate, 1)
+ self.connect(MOD, AMP, a_resamp, interp, self.fm_modulator, self.u)
+ else:
+ interp = filter.rational_resampler_fff(options.if_rate // options.modulator_rate, 1)
+ self.connect(MOD, AMP, interp, self.fm_modulator, self.u)
else:
self.connect(MOD, AMP, OUT)
@@ -204,22 +240,21 @@ class my_top_block(gr.top_block):
gain_names = self.u.get_gain_names()
for name in gain_names:
range = self.u.get_gain_range(name)
- print "gain: name: %s range: start %d stop %d step %d" % (name, range[0].start(), range[0].stop(), range[0].step())
+ print ("gain: name: %s range: start %d stop %d step %d" % (name, range[0].start(), range[0].stop(), range[0].step()))
if options.gains:
for tuple in options.gains.split(","):
name, gain = tuple.split(":")
gain = int(gain)
- print "setting gain %s to %d" % (name, gain)
+ print ("setting gain %s to %d" % (name, gain))
self.u.set_gain(gain, name)
- print 'setting sample rate'
self.u.set_sample_rate(options.if_rate)
self.u.set_center_freq(options.frequency)
self.u.set_freq_corr(options.frequency_correction)
#self.u.set_bandwidth(options.if_rate)
if __name__ == "__main__":
- print 'Multiprotocol Digital Voice TX (C) Copyright 2017 Max H. Parke KA1RBI'
+ print ('Multiprotocol Digital Voice TX (C) Copyright 2017-2020 Max H. Parke KA1RBI')
try:
my_top_block().run()
except KeyboardInterrupt:
diff --git a/op25/gr-op25_repeater/apps/tx/generate-tsbks.py b/op25/gr-op25_repeater/apps/tx/generate-tsbks.py
index f3c80ed..fa1eb01 100755
--- a/op25/gr-op25_repeater/apps/tx/generate-tsbks.py
+++ b/op25/gr-op25_repeater/apps/tx/generate-tsbks.py
@@ -1,4 +1,4 @@
-#! /usr/bin/python
+#! /usr/bin/python3
from p25craft import make_fakecc_tsdu
@@ -8,9 +8,13 @@ if __name__ == '__main__':
params = {
'wacn' : 0xbee00,
'system_id': 0x290,
- 'cc_freq': 925000000,
- 'vc_freq': 924900000,
+ 'cc_freq': 924975000,
+ 'vc_freq': 924925000,
'nac': 0x293,
'subsystem_id': 1,
- 'site_id': 1}
+ 'site_id': 1,
+ 'iden_up_bw' : 12500,
+ 'iden_up_tx_offset' : 25, # MHz
+ 'iden_up_spacing' : 12500,
+ 'iden_up_frequency' : 902012500}
make_fakecc_tsdu(params)
diff --git a/op25/gr-op25_repeater/apps/tx/multi_tx.py b/op25/gr-op25_repeater/apps/tx/multi_tx.py
index 3f93b19..6c5c6dc 100755
--- a/op25/gr-op25_repeater/apps/tx/multi_tx.py
+++ b/op25/gr-op25_repeater/apps/tx/multi_tx.py
@@ -1,8 +1,8 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
#################################################################################
#
-# Multiprotocol Digital Voice TX (C) Copyright 2017 Max H. Parke KA1RBI
+# Multiprotocol Digital Voice TX (C) Copyright 2017, 2018, 2019, 2020 Max H. Parke KA1RBI
#
# This file is part of OP25
#
@@ -24,14 +24,15 @@
"""
-Transmit four simultaneous RF channels (dmr, p25, dstar, and ysf)
+Transmit M simultaneous RF channels via N devices
"""
import sys
import os
import math
-from gnuradio import gr, gru, audio, eng_notation
-from gnuradio import filter, blocks, analog, digital
+import json
+from gnuradio import gr, audio, eng_notation
+from gnuradio import filter, blocks, analog, digital, fft
from gnuradio.eng_option import eng_option
from optparse import OptionParser
@@ -43,13 +44,28 @@ from math import pi
from op25_c4fm_mod import p25_mod_bf
-class pipeline(gr.hier_block2):
- def __init__(self, protocol=None, config_file=None, mod_adjust=None, gain_adjust=None, output_gain=None, if_freq=0, if_rate=0, verbose=0, fullrate_mode=False, sample_rate=0, bt=0, alt_input=None):
- gr.hier_block2.__init__(self, "dv_modulator",
+_def_symbol_rate = 4800
+_def_bt = 0.5
+
+def byteify(input): # thx so
+ if sys.version[0] != '2': # hack, must be a better way
+ return input
+ if isinstance(input, dict):
+ return {byteify(key): byteify(value)
+ for key, value in input.iteritems()}
+ elif isinstance(input, list):
+ return [byteify(element) for element in input]
+ elif isinstance(input, unicode):
+ return input.encode('utf-8')
+ else:
+ return input
+
+class pipeline_sb(gr.hier_block2):
+ def __init__(self, protocol=None, config_file=None, gain_adjust=None, verbose=0, fullrate_mode=False, alt_input=None):
+ gr.hier_block2.__init__(self, "dv_encoder",
gr.io_signature(1, 1, gr.sizeof_short), # Input signature
- gr.io_signature(1, 1, gr.sizeof_gr_complex)) # Output signature
+ gr.io_signature(1, 1, gr.sizeof_char)) # Output signature
- from dv_tx import RC_FILTER
if protocol == 'dmr':
assert config_file
ENCODER = op25_repeater.ambe_encoder_sb(verbose)
@@ -61,10 +77,11 @@ class pipeline(gr.hier_block2):
alt_input = self
self.connect(alt_input, ENCODER2, (DMR, 1))
elif protocol == 'dstar':
- ENCODER = op25_repeater.dstar_tx_sb(verbose, None)
+ assert config_file
+ ENCODER = op25_repeater.dstar_tx_sb(verbose, config_file)
elif protocol == 'p25':
ENCODER = op25_repeater.vocoder(True, # 0=Decode,True=Encode
- 0, # Verbose flag
+ False, # Verbose flag
0, # flex amount
"", # udp ip address
0, # udp port
@@ -72,8 +89,21 @@ class pipeline(gr.hier_block2):
elif protocol == 'ysf':
assert config_file
ENCODER = op25_repeater.ysf_tx_sb(verbose, config_file, fullrate_mode)
+ elif protocol.startswith('nxdn'):
+ assert config_file
+ ENCODER = op25_repeater.nxdn_tx_sb(verbose, config_file, protocol == 'nxdn96')
ENCODER.set_gain_adjust(gain_adjust)
+ if protocol == 'dmr':
+ self.connect(DMR, self)
+ else:
+ self.connect(self, ENCODER, self)
+class mod_pipeline_bc(gr.hier_block2):
+ def __init__(self, protocol=None, mod_adjust=None, output_gain=None, if_freq=0, if_rate=0, verbose=0, sample_rate=0, bt=0):
+ from dv_tx import RC_FILTER
+ gr.hier_block2.__init__(self, "dv_modulator",
+ gr.io_signature(1, 1, gr.sizeof_char), # Input signature
+ gr.io_signature(1, 1, gr.sizeof_gr_complex)) # Output signature
MOD = p25_mod_bf(output_sample_rate = sample_rate, dstar = (protocol == 'dstar'), bt = bt, rc = RC_FILTER[protocol])
AMP = blocks.multiply_const_ff(output_gain)
@@ -83,117 +113,231 @@ class pipeline(gr.hier_block2):
FM_MOD = analog.frequency_modulator_fc (k * mod_adjust)
- if protocol == 'dmr':
- self.connect(DMR, MOD)
- else:
- self.connect(self, ENCODER, MOD)
-
- INTERP = filter.rational_resampler_fff(if_rate / sample_rate, 1)
+ INTERP = filter.rational_resampler_fff(if_rate // sample_rate, 1)
MIXER = blocks.multiply_cc()
LO = analog.sig_source_c(if_rate, analog.GR_SIN_WAVE, if_freq, 1.0, 0)
- self.connect(MOD, AMP, INTERP, FM_MOD, (MIXER, 0))
+ self.connect(self, MOD, AMP, INTERP, FM_MOD, (MIXER, 0))
self.connect(LO, (MIXER, 1))
self.connect(MIXER, self)
-class my_top_block(gr.top_block):
- def __init__(self):
- gr.top_block.__init__(self)
- parser = OptionParser(option_class=eng_option)
+class device(object):
+ def __init__(self, config, tb):
+ self.name = config['name']
+ self.sample_rate = config['rate']
+ self.args = config['args']
+ self.frequency = config['frequency']
+ self.tb = tb
+ self.sum = blocks.add_cc()
+ self.sum_count = 0
+ self.output_throttle = None
- parser.add_option("-a", "--args", type="string", default="", help="device args")
- parser.add_option("-A", "--do-audio", action="store_true", default=False, help="live input audio")
- parser.add_option("-b", "--bt", type="float", default=0.5, help="specify bt value")
- parser.add_option("-f", "--file", type="string", default=None, help="specify the input file (mono 8000 sps S16_LE)")
- parser.add_option("-g", "--gain", type="float", default=1.0, help="input gain")
- parser.add_option("-i", "--if-rate", type="float", default=960000, help="output rate to sdr")
- parser.add_option("-I", "--audio-input", type="string", default="", help="pcm input device name. E.g., hw:0,0 or /dev/dsp")
- parser.add_option("-N", "--gains", type="string", default=None, help="gain settings")
- parser.add_option("-o", "--if-offset", type="float", default=100000, help="channel spacing (Hz)")
- parser.add_option("-q", "--frequency-correction", type="float", default=0.0, help="ppm")
- parser.add_option("-Q", "--frequency", type="float", default=0.0, help="Hz")
- parser.add_option("-r", "--repeat", action="store_true", default=False, help="input file repeat")
- parser.add_option("-R", "--fullrate-mode", action="store_true", default=False, help="ysf fullrate")
- parser.add_option("-s", "--sample-rate", type="int", default=48000, help="output sample rate")
- parser.add_option("-v", "--verbose", type="int", default=0, help="additional output")
- (options, args) = parser.parse_args()
+ def get_sum_p(self):
+ seq = self.sum_count
+ self.sum_count += 1
+ return (self.sum, seq)
- assert options.file # input file name (-f filename) required
+class channel(object):
+ def __init__(self, config, dev, verbosity, msgq = None):
+ sys.stderr.write('channel (dev %s): %s\n' % (dev.name, config))
+ self.device = dev
+ self.name = config['name']
+ self.symbol_rate = _def_symbol_rate
+ if 'symbol_rate' in config.keys():
+ self.symbol_rate = config['symbol_rate']
+ self.config = config
- max_inputs = 1
+def get_protocol(chan):
+ # try to autodetect protocol, return None if failed
+ if chan.config['filter_type'].startswith('nxdn'):
+ if chan.symbol_rate == 2400:
+ return 'nxdn48'
+ else:
+ return 'nxdn96'
+ elif chan.config['filter_type'] == 'rc':
+ return 'p25'
+ elif chan.config['filter_type'] == 'gmsk':
+ return 'dstar'
+ elif chan.config['filter_type'] != 'rrc':
+ return None
+ if 'dmr' in chan.config['name'].lower():
+ return 'dmr'
+ if 'ysf' in chan.config['name'].lower():
+ return 'ysf'
+ return None
- from dv_tx import output_gains, gain_adjust, gain_adjust_fullrate, mod_adjust
+def get_source(config, k, audio_source):
+ if k not in config.keys():
+ return None
+ s = config[k]
+ if s.startswith('audio:'):
+ return audio_source
+ elif s.startswith('udp:'): # S16_LE at 8000 rate
+ hostinfo = s.split(':')
+ hostname = hostinfo[1]
+ udp_port = int(hostinfo[2])
+ bufsize = 32000
+ return blocks.udp_source(gr.sizeof_short, hostname, udp_port, payload_size = bufsize)
+ else:
+ return blocks.file_source(gr.sizeof_short, s, repeat = True)
- if options.do_audio:
- AUDIO = audio.source(options.sample_rate, options.audio_input)
- lpf_taps = filter.firdes.low_pass(1.0, options.sample_rate, 3400.0, 3400 * 0.1, filter.firdes.WIN_HANN)
+class tx_block(gr.top_block):
+ def __init__(self, verbosity, config):
+ self.verbosity = verbosity
+ gr.top_block.__init__(self)
+
+ self.configure_devices(config['devices'])
+ self.configure_channels(config['channels'])
+
+ audio_chans = [chan for chan in self.channels if chan.config['source'].startswith('audio:')]
+ if len(audio_chans):
+ AUDIO = audio.source(options.alsa_rate, options.audio_input)
+ lpf_taps = filter.firdes.low_pass(1.0, options.alsa_rate, 3400.0, 3400 * 0.1, filter.firdes.WIN_HANN)
audio_rate = 8000
- AUDIO_DECIM = filter.fir_filter_fff (int(options.sample_rate / audio_rate), lpf_taps)
+ AUDIO_DECIM = filter.fir_filter_fff (int(options.alsa_rate / audio_rate), lpf_taps)
AUDIO_SCALE = blocks.multiply_const_ff(32767.0 * options.gain)
AUDIO_F2S = blocks.float_to_short()
self.connect(AUDIO, AUDIO_DECIM, AUDIO_SCALE, AUDIO_F2S)
- alt_input = AUDIO_F2S
+ audio_source = AUDIO_F2S
else:
- alt_input = None
-
- SUM = blocks.add_cc()
- protocols = 'dmr p25 dstar ysf'.split()
- input_repeat = True
- for i in xrange(len(protocols)):
- SOURCE = blocks.file_source(gr.sizeof_short, options.file, input_repeat)
- protocol = protocols[i]
- if (options.fullrate_mode and protocol == 'ysf') or protocol == 'p25':
- gain_adj = gain_adjust_fullrate[protocols[i]]
+ audio_source = None
+
+ from dv_tx import output_gains, gain_adjust, gain_adjust_fullrate, mod_adjust
+
+ for chan in self.channels:
+ protocol = get_protocol(chan)
+ if protocol is None:
+ sys.stderr.write('failed to detect protocol, ignoring: %s\n' % (cfg))
+ continue
+ cfg = chan.config
+ dev = chan.device
+ modulator_rate = 24000 ## FIXME
+ bt = _def_bt
+ if 'bt' in cfg.keys():
+ bt = cfg['bt']
+ MOD = mod_pipeline_bc(
+ protocol = protocol,
+ output_gain = output_gains[protocol],
+ mod_adjust = mod_adjust[protocol],
+ if_freq = cfg['frequency'] - dev.frequency,
+ if_rate = dev.sample_rate,
+ sample_rate = modulator_rate,
+ bt = bt)
+ if cfg['source'].startswith('symbols:'):
+ filename = cfg['source'].split(':')[1]
+ source = blocks.file_source(gr.sizeof_char, filename, repeat=True)
+ self.connect(source, MOD, dev.get_sum_p())
else:
- gain_adj = gain_adjust[protocols[i]]
- if protocols[i] == 'dmr':
- cfg = 'dmr-cfg.dat'
- elif protocols[i] == 'ysf':
- cfg = 'ysf-cfg.dat'
+ source = get_source(cfg, 'source', audio_source)
+ source2 = get_source(cfg, 'source2', audio_source)
+ fullrate_mode = False ### TODO
+ if (fullrate_mode and protocol == 'ysf') or protocol == 'p25':
+ gain_adj = gain_adjust_fullrate[protocol]
+ else:
+ gain_adj = gain_adjust[protocol]
+ cfgfile = None
+ if protocol in 'dmr ysf dstar'.split():
+ cfgfile = '%s-cfg.dat' % (protocol)
+ elif protocol.startswith('nxdn'):
+ cfgfile = 'nxdn-cfg.dat'
+ CHANNEL = pipeline_sb(
+ protocol = protocol,
+ gain_adjust = gain_adj,
+ fullrate_mode = fullrate_mode,
+ alt_input = source2,
+ verbose = self.verbosity,
+ config_file = cfgfile)
+ self.connect(source, CHANNEL, MOD, dev.get_sum_p())
+ for dev in self.devices:
+ assert dev.sum_count > 0 # device must have at least one valid channel
+ dev.amp = blocks.multiply_const_cc(1.0 / float(dev.sum_count))
+ if dev.output_throttle is not None:
+ self.connect(dev.sum, dev.amp, dev.output_throttle, dev.u)
else:
- cfg = None
-
- CHANNEL = pipeline(
- protocol = protocols[i],
- output_gain = output_gains[protocols[i]],
- gain_adjust = gain_adj,
- mod_adjust = mod_adjust[protocols[i]],
- if_freq = i * options.if_offset,
- if_rate = options.if_rate,
- sample_rate = options.sample_rate,
- bt = options.bt,
- fullrate_mode = options.fullrate_mode,
- alt_input = alt_input,
- config_file = cfg)
- self.connect(SOURCE, CHANNEL, (SUM, i))
-
- self.u = osmosdr.sink (options.args)
- AMP = blocks.multiply_const_cc(1.0 / float(len(protocols)))
- self.setup_sdr_output(options)
-
- self.connect(SUM, AMP, self.u)
-
- def setup_sdr_output(self, options):
- gain_names = self.u.get_gain_names()
+ self.connect(dev.sum, dev.amp, dev.u)
+
+ def configure_devices(self, config):
+ self.devices = []
+ for cfg in config:
+ dev = device(cfg, self)
+ if cfg['args'].startswith('udp:'):
+ self.setup_udp_output(dev, cfg)
+ else:
+ self.setup_sdr_output(dev, cfg)
+ self.devices.append(dev)
+
+ def find_device(self, chan):
+ for dev in self.devices:
+ d = abs(chan['frequency'] - dev.frequency)
+ nf = dev.sample_rate // 2
+ if d + 6250 <= nf:
+ return dev
+ return None
+
+ def configure_channels(self, config):
+ self.channels = []
+ for cfg in config:
+ dev = self.find_device(cfg)
+ if dev is None:
+ sys.stderr.write('* * * Frequency %d not within spectrum band of any device - ignoring!\n' % cfg['frequency'])
+ continue
+ chan = channel(cfg, dev, self.verbosity, msgq=None)
+ self.channels.append(chan)
+
+ def setup_udp_output(self, dev, config):
+ dev.output_throttle = blocks.throttle(gr.sizeof_gr_complex, config['rate'])
+ hostinfo = config['args'].split(':')
+ hostname = hostinfo[1]
+ udp_port = int(hostinfo[2])
+ dev.u = blocks.udp_sink(gr.sizeof_gr_complex, hostname, udp_port)
+
+ def setup_sdr_output(self, dev, config):
+ dev.u = osmosdr.sink (config['args'])
+ gain_names = dev.u.get_gain_names()
for name in gain_names:
- range = self.u.get_gain_range(name)
- print "gain: name: %s range: start %d stop %d step %d" % (name, range[0].start(), range[0].stop(), range[0].step())
- if options.gains:
- for tuple in options.gains.split(","):
- name, gain = tuple.split(":")
+ range = dev.u.get_gain_range(name)
+ print ("gain: name: %s range: start %d stop %d step %d" % (name, range[0].start(), range[0].stop(), range[0].step()))
+ if config['gains']:
+ for t in config['gains'].split(","):
+ name, gain = t.split(":")
gain = int(gain)
- print "setting gain %s to %d" % (name, gain)
- self.u.set_gain(gain, name)
+ print ("setting gain %s to %d" % (name, gain))
+ dev.u.set_gain(gain, name)
+
+ print ('setting sample rate %d' % config['rate'])
+ dev.u.set_sample_rate(config['rate'])
+ print ('setting SDR tuning frequency %d' % config['frequency'])
+ dev.u.set_center_freq(config['frequency'])
+ dev.u.set_freq_corr(config['ppm'])
+
+class tx_main(object):
+ def __init__(self):
+ parser = OptionParser(option_class=eng_option)
+
+ parser.add_option("-c", "--config-file", type="string", default=None, help="specify config file name")
+ parser.add_option("-v", "--verbosity", type="int", default=0, help="additional output")
+ parser.add_option("-p", "--pause", action="store_true", default=False, help="block on startup")
+ (options, args) = parser.parse_args()
+
+ # wait for gdb
+ if options.pause:
+ print ('Ready for GDB to attach (pid = %d)' % (os.getpid(),))
+ raw_input("Press 'Enter' to continue...")
+
+ if options.config_file == '-':
+ config = json.loads(sys.stdin.read())
+ else:
+ config = json.loads(open(options.config_file).read())
+ self.tb = tx_block(options.verbosity, config = byteify(config))
- print 'setting sample rate'
- self.u.set_sample_rate(options.if_rate)
- self.u.set_center_freq(options.frequency)
- self.u.set_freq_corr(options.frequency_correction)
+ def run(self):
+ try:
+ self.tb.run()
+ except KeyboardInterrupt:
+ self.tb.stop()
if __name__ == "__main__":
- print 'Multiprotocol Digital Voice TX (C) Copyright 2017 Max H. Parke KA1RBI'
- try:
- my_top_block().run()
- except KeyboardInterrupt:
- tb.stop()
+ print ('Multiprotocol Digital Voice TX (C) Copyright 2017-2020 Max H. Parke KA1RBI')
+ tx = tx_main()
+ tx.run()
diff --git a/op25/gr-op25_repeater/apps/tx/nxdn-cfg.dat b/op25/gr-op25_repeater/apps/tx/nxdn-cfg.dat
new file mode 100644
index 0000000..65cfe80
--- /dev/null
+++ b/op25/gr-op25_repeater/apps/tx/nxdn-cfg.dat
@@ -0,0 +1,42 @@
+#################################################################################
+#
+# config file for NXDN TX
+#
+#################################################################################
+#
+# NXDN Encoder (C) Copyright 2020 Max H. Parke KA1RBI
+#
+# This file is part of OP25
+#
+# This 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 3, 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 General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this software; see the file COPYING. If not, write to
+# the Free Software Foundation, Inc., 51 Franklin Street,
+# Boston, MA 02110-1301, USA.
+#################################################################################
+#
+# NOTE
+#
+# Syntax is unforgiving - no whitespace allowed (outside of comments)
+#
+#################################################################################
+ran=0
+# LICH value for conventional voice frames
+lich=0x56
+# LICH value for FACCH frames (nxdn96 only - used as filler, every other frame)
+lich2=0x50
+# note, trunking downlinks appear to use:
+# lich = 0x37 for voice frames
+# lich2 = 0x31 for FACCH filler frames, nxdn96 only
+# other common lich values: 0x21, 0x29, 0x2f
+# data field sent in SACCH / FACCH
+acch=01 00 22 00 01 00 00 00 00 00
diff --git a/op25/gr-op25_repeater/apps/tx/op25_c4fm_mod.py b/op25/gr-op25_repeater/apps/tx/op25_c4fm_mod.py
index ace2be3..4291ee4 100755
--- a/op25/gr-op25_repeater/apps/tx/op25_c4fm_mod.py
+++ b/op25/gr-op25_repeater/apps/tx/op25_c4fm_mod.py
@@ -30,7 +30,7 @@ P25 C4FM pre-modulation block
with additions for RRC (for dmr/ysf) and dstar gmsk
"""
-from gnuradio import gr, gru, eng_notation
+from gnuradio import gr, eng_notation
from gnuradio.digital import modulation_utils
from gnuradio import filter, digital, blocks
from gnuradio.eng_option import eng_option
@@ -49,14 +49,14 @@ _def_span = 13 #desired number of impulse response coeffs, in units of symbols
_def_gmsk_span = 4
_def_bt = 0.25
-def transfer_function_rx():
+def transfer_function_rx(symbol_rate=_def_symbol_rate):
# p25 c4fm de-emphasis filter
# Specs undefined above 2,880 Hz. It would be nice to have a sharper
# rolloff, but this filter is cheap enough....
xfer = [] # frequency domain transfer function
- for f in xrange(0,4800):
+ for f in range(0,symbol_rate):
# D(f)
- t = pi * f / 4800
+ t = pi * f / symbol_rate
if t < 1e-6:
df = 1.0
else:
@@ -64,9 +64,9 @@ def transfer_function_rx():
xfer.append(df)
return xfer
-def transfer_function_tx():
+def transfer_function_tx(symbol_rate=_def_symbol_rate):
xfer = [] # frequency domain transfer function
- for f in xrange(0, 2881): # specs cover 0 - 2,880 Hz
+ for f in range(0, 2881): # specs cover 0 - 2,880 Hz
# H(f)
if f < 1920:
hf = 1.0
@@ -82,9 +82,9 @@ def transfer_function_tx():
xfer.append(pf * hf)
return xfer
-def transfer_function_dmr():
+def transfer_function_dmr(symbol_rate=_def_symbol_rate):
xfer = [] # frequency domain transfer function
- for f in xrange(0, 2881): # specs cover 0 - 2,880 Hz
+ for f in range(0, 2881): # specs cover 0 - 2,880 Hz
if f < 1920:
hf = 1.0
else:
@@ -94,6 +94,43 @@ def transfer_function_dmr():
xfer = np.sqrt(xfer) # root cosine
return xfer
+def _transfer_function_nxdn(symbol_rate, modulator=False):
+ assert symbol_rate == 2400 or symbol_rate == 4800
+ T = 1.0 / symbol_rate
+ a = 0.2 # rolloff
+ fl = int(0.5+(1-a)/(2*T))
+ fh = int(0.5+(1+a)/(2*T))
+
+ xfer = []
+ for f in range(0, symbol_rate):
+ if f < fl:
+ hf = 1.0
+ elif f >= fl and f <= fh:
+ hf = cos((T/(4*a)) * (2*pi*f - pi*(1-a)/T))
+ else:
+ hf = 0.0
+ x = pi * f * T
+ if f <= fh:
+ if x == 0 or sin(x) == 0:
+ df = 1.0
+ else:
+ if modulator:
+ df = sin(x) / x
+ else: # rx mode: demodulator
+ df = x / sin(x)
+ else:
+ df = 0.0
+ xfer.append(hf * df)
+ return xfer
+
+# rx / demod case
+def transfer_function_nxdn(symbol_rate=_def_symbol_rate):
+ return _transfer_function_nxdn(symbol_rate)
+
+# tx / modulator case
+def transfer_function_nxdn_tx(symbol_rate=_def_symbol_rate):
+ return _transfer_function_nxdn(symbol_rate, modulator=True)
+
class c4fm_taps(object):
"""Generate filter coefficients as per P25 C4FM spec"""
def __init__(self, filter_gain = 1.0, sample_rate=_def_output_sample_rate, symbol_rate=_def_symbol_rate, span=_def_span, generator=transfer_function_tx):
@@ -105,8 +142,8 @@ class c4fm_taps(object):
self.generator = generator
def generate(self):
- impulse_response = np.fft.fftshift(np.fft.irfft(self.generator(), self.sample_rate))
- start = np.argmax(impulse_response) - (self.ntaps-1) / 2
+ impulse_response = np.fft.fftshift(np.fft.irfft(self.generator(symbol_rate=self.symbol_rate), self.sample_rate))
+ start = np.argmax(impulse_response) - (self.ntaps-1) // 2
coeffs = impulse_response[start: start+self.ntaps]
gain = self.filter_gain / sum(coeffs)
return coeffs * gain
@@ -122,8 +159,8 @@ class gmsk_taps(object):
self.span = span
self.bt = bt
- self.samples_per_symbol = self.sample_rate / self.symbol_rate
- self.ntaps = self.span * self.samples_per_symbol
+ self.samples_per_symbol = self.sample_rate // self.symbol_rate
+ self.ntaps = self.span * self.samples_per_symbol
def generate(self):
# from gnuradio gr-digital/python/digital/gmsk.py
@@ -175,14 +212,16 @@ class p25_mod_bf(gr.hier_block2):
@type debug: bool
"""
- gr.hier_block2.__init__(self, "p25_c4fm_mod_bf",
+ gr.hier_block2.__init__(self, "p25_c4fm_mod_bf",
gr.io_signature(1, 1, gr.sizeof_char), # Input signature
gr.io_signature(1, 1, gr.sizeof_float)) # Output signature
- input_sample_rate = 4800 # P25 baseband symbol rate
- lcm = gru.lcm(input_sample_rate, output_sample_rate)
- self._interp_factor = int(lcm // input_sample_rate)
- self._decimation = int(lcm // output_sample_rate)
+ input_sample_rate = 4800 # P25/ysf/dmr/dstar baseband symbol rate
+ if rc == 'nxdn48':
+ input_sample_rate = 2400 # only exception is nxdn48 = 2400 rate
+
+ intermediate_rate = 48000
+ self._interp_factor = intermediate_rate // input_sample_rate
self.dstar = dstar
self.bt = bt
@@ -199,15 +238,17 @@ class p25_mod_bf(gr.hier_block2):
self.generator = generator
- assert rc is None or rc == 'rc' or rc == 'rrc'
+ assert rc is None or rc == 'rc' or rc == 'rrc' or rc.startswith('nxdn')
if rc:
- coeffs = filter.firdes.root_raised_cosine(1.0, output_sample_rate, input_sample_rate, 0.2, 91)
+ coeffs = filter.firdes.root_raised_cosine(1.0, intermediate_rate, input_sample_rate, 0.2, 91)
if rc == 'rc':
- coeffs = np.convolve(coeffs, coeffs)
+ coeffs = c4fm_taps(sample_rate=intermediate_rate).generate()
elif self.dstar:
- coeffs = gmsk_taps(sample_rate=output_sample_rate, bt=self.bt).generate()
+ coeffs = gmsk_taps(sample_rate=intermediate_rate, bt=self.bt).generate()
+ elif rc.startswith('nxdn'):
+ coeffs = c4fm_taps(sample_rate=intermediate_rate, generator=transfer_function_nxdn_tx, symbol_rate=input_sample_rate).generate()
elif not rc:
- coeffs = c4fm_taps(sample_rate=output_sample_rate, generator=self.generator).generate()
+ coeffs = c4fm_taps(sample_rate=intermediate_rate, generator=self.generator).generate()
self.filter = filter.interp_fir_filter_fff(self._interp_factor, coeffs)
if verbose:
@@ -217,18 +258,18 @@ class p25_mod_bf(gr.hier_block2):
self._setup_logging()
self.connect(self, self.C2S, self.polarity, self.filter)
- if (self._decimation > 1):
- self.decimator = filter.rational_resampler_fff(1, self._decimation)
- self.connect(self.filter, self.decimator, self)
+ if intermediate_rate != output_sample_rate:
+ self.arb_resamp = filter.pfb.arb_resampler_fff(float(output_sample_rate)/intermediate_rate)
+ self.connect(self.filter, self.arb_resamp, self)
else:
self.connect(self.filter, self)
def _print_verbage(self):
- print "\nModulator:"
- print "interpolation: %d decimation: %d" %(self._interp_factor, self._decimation)
+ print ("\nModulator:")
+ print ("interpolation: %d decimation: %d" %(self._interp_factor, self._decimation))
def _setup_logging(self):
- print "Modulation logging turned on."
+ print ("Modulation logging turned on.")
self.connect(self.C2S,
gr.file_sink(gr.sizeof_float, "tx_chunks2symbols.dat"))
self.connect(self.polarity,
diff --git a/op25/gr-op25_repeater/apps/tx/op25_tx.py b/op25/gr-op25_repeater/apps/tx/op25_tx.py
index 3e7afe4..8d67a47 100755
--- a/op25/gr-op25_repeater/apps/tx/op25_tx.py
+++ b/op25/gr-op25_repeater/apps/tx/op25_tx.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
#
# Copyright 2005,2006,2007 Free Software Foundation, Inc.
#
@@ -41,7 +41,7 @@ running this script when using method B.
"""
from gnuradio import gr, eng_notation, blocks, digital
-from gnuradio import audio, filter, analog
+from gnuradio import audio, filter, analog, fft
from gnuradio.eng_option import eng_option
from optparse import OptionParser
from usrpm import usrp_dbid
diff --git a/op25/gr-op25_repeater/apps/tx/p25craft.py b/op25/gr-op25_repeater/apps/tx/p25craft.py
index dd0f0c9..68ae214 100755
--- a/op25/gr-op25_repeater/apps/tx/p25craft.py
+++ b/op25/gr-op25_repeater/apps/tx/p25craft.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
#
# p25craft.py - utility for crafting APCO P25 packets
#
@@ -52,7 +52,7 @@ quiet = False
outfile = ""
flip = 0x000
quiet = True
-outfile = open('p25.out', 'w')
+outfile = open('p25.out', 'wb')
#####################
@@ -99,7 +99,10 @@ def print_spec(data):
byte = 0
for j in range(4):
byte |= data[i+j] << (6 - j*2)
- outfile.write(struct.pack('B1', (byte ^ flip & 0xff)))
+ s=chr(byte ^ flip & 0xff)
+ if sys.version[0] != '2' and type(s) is str:
+ s = s.encode('latin1')
+ outfile.write(s)
# Split an integer into list of bytes.
def split_bytes(data, len):
@@ -194,26 +197,26 @@ def gf6mult(a, b):
# returns an integer
def rs_36_20_17_encode(data):
matrix = (
- (1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,074,037,034,006,002,007,044,064,026,014,026,044,054,013,077,005),
- (0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,004,017,050,024,011,005,030,057,033,003,002,002,015,016,025,026),
- (0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,007,023,037,046,056,075,043,045,055,021,050,031,045,027,071,062),
- (0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,026,005,007,063,063,027,063,040,006,004,040,045,047,030,075,007),
- (0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,023,073,073,041,072,034,021,051,067,016,031,074,011,021,012,021),
- (0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,024,051,025,023,022,041,074,066,074,065,070,036,067,045,064,001),
- (0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,052,033,014,002,020,006,014,025,052,023,035,074,075,075,043,027),
- (0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,055,062,056,025,073,060,015,030,013,017,020,002,070,055,014,047),
- (0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,054,051,032,065,077,012,054,013,035,032,056,012,075,001,072,063),
- (0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,074,041,030,041,043,022,051,006,064,033,003,047,027,012,055,047),
- (0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,054,070,011,003,013,022,016,057,003,045,072,031,030,056,035,022),
- (0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,051,007,072,030,065,054,006,021,036,063,050,061,064,052,001,060),
- (0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,001,065,032,070,013,044,073,024,012,052,021,055,012,035,014,072),
- (0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,011,070,005,010,065,024,015,077,022,024,024,074,007,044,007,046),
- (0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,006,002,065,011,041,020,045,042,046,054,035,012,040,064,065,033),
- (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,034,031,001,015,044,064,016,024,052,016,006,062,020,013,055,057),
- (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,063,043,025,044,077,063,017,017,064,014,040,074,031,072,054,006),
- (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,071,021,070,044,056,004,030,074,004,023,071,070,063,045,056,043),
- (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,002,001,053,074,002,014,052,074,012,057,024,063,015,042,052,033),
- (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,034,035,002,023,021,027,022,033,064,042,005,073,051,046,073,060))
+ (1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0o74,0o37,0o34,0o06,0o02,0o07,0o44,0o64,0o26,0o14,0o26,0o44,0o54,0o13,0o77,0o05),
+ (0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0o04,0o17,0o50,0o24,0o11,0o05,0o30,0o57,0o33,0o03,0o02,0o02,0o15,0o16,0o25,0o26),
+ (0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0o07,0o23,0o37,0o46,0o56,0o75,0o43,0o45,0o55,0o21,0o50,0o31,0o45,0o27,0o71,0o62),
+ (0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0o26,0o05,0o07,0o63,0o63,0o27,0o63,0o40,0o06,0o04,0o40,0o45,0o47,0o30,0o75,0o07),
+ (0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0o23,0o73,0o73,0o41,0o72,0o34,0o21,0o51,0o67,0o16,0o31,0o74,0o11,0o21,0o12,0o21),
+ (0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0o24,0o51,0o25,0o23,0o22,0o41,0o74,0o66,0o74,0o65,0o70,0o36,0o67,0o45,0o64,0o01),
+ (0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0o52,0o33,0o14,0o02,0o20,0o06,0o14,0o25,0o52,0o23,0o35,0o74,0o75,0o75,0o43,0o27),
+ (0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0o55,0o62,0o56,0o25,0o73,0o60,0o15,0o30,0o13,0o17,0o20,0o02,0o70,0o55,0o14,0o47),
+ (0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0o54,0o51,0o32,0o65,0o77,0o12,0o54,0o13,0o35,0o32,0o56,0o12,0o75,0o01,0o72,0o63),
+ (0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0o74,0o41,0o30,0o41,0o43,0o22,0o51,0o06,0o64,0o33,0o03,0o47,0o27,0o12,0o55,0o47),
+ (0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0o54,0o70,0o11,0o03,0o13,0o22,0o16,0o57,0o03,0o45,0o72,0o31,0o30,0o56,0o35,0o22),
+ (0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0o51,0o07,0o72,0o30,0o65,0o54,0o06,0o21,0o36,0o63,0o50,0o61,0o64,0o52,0o01,0o60),
+ (0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0o01,0o65,0o32,0o70,0o13,0o44,0o73,0o24,0o12,0o52,0o21,0o55,0o12,0o35,0o14,0o72),
+ (0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0o11,0o70,0o05,0o10,0o65,0o24,0o15,0o77,0o22,0o24,0o24,0o74,0o07,0o44,0o07,0o46),
+ (0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0o06,0o02,0o65,0o11,0o41,0o20,0o45,0o42,0o46,0o54,0o35,0o12,0o40,0o64,0o65,0o33),
+ (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0o34,0o31,0o01,0o15,0o44,0o64,0o16,0o24,0o52,0o16,0o06,0o62,0o20,0o13,0o55,0o57),
+ (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0o63,0o43,0o25,0o44,0o77,0o63,0o17,0o17,0o64,0o14,0o40,0o74,0o31,0o72,0o54,0o06),
+ (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0o71,0o21,0o70,0o44,0o56,0o04,0o30,0o74,0o04,0o23,0o71,0o70,0o63,0o45,0o56,0o43),
+ (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0o02,0o01,0o53,0o74,0o02,0o14,0o52,0o74,0o12,0o57,0o24,0o63,0o15,0o42,0o52,0o33),
+ (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0o34,0o35,0o02,0o23,0o21,0o27,0o22,0o33,0o64,0o42,0o05,0o73,0o51,0o46,0o73,0o60))
assert data < 2**120
codeword = [0,] * 36
for i in range(36):
@@ -227,18 +230,18 @@ def rs_36_20_17_encode(data):
# returns an integer
def rs_24_12_13_encode(data):
matrix = (
- (1,0,0,0,0,0,0,0,0,0,0,0,062,044,003,025,014,016,027,003,053,004,036,047),
- (0,1,0,0,0,0,0,0,0,0,0,0,011,012,011,011,016,064,067,055,001,076,026,073),
- (0,0,1,0,0,0,0,0,0,0,0,0,003,001,005,075,014,006,020,044,066,006,070,066),
- (0,0,0,1,0,0,0,0,0,0,0,0,021,070,027,045,016,067,023,064,073,033,044,021),
- (0,0,0,0,1,0,0,0,0,0,0,0,030,022,003,075,015,015,033,015,051,003,053,050),
- (0,0,0,0,0,1,0,0,0,0,0,0,001,041,027,056,076,064,021,053,004,025,001,012),
- (0,0,0,0,0,0,1,0,0,0,0,0,061,076,021,055,076,001,063,035,030,013,064,070),
- (0,0,0,0,0,0,0,1,0,0,0,0,024,022,071,056,021,035,073,042,057,074,043,076),
- (0,0,0,0,0,0,0,0,1,0,0,0,072,042,005,020,043,047,033,056,001,016,013,076),
- (0,0,0,0,0,0,0,0,0,1,0,0,072,014,065,054,035,025,041,016,015,040,071,026),
- (0,0,0,0,0,0,0,0,0,0,1,0,073,065,036,061,042,022,017,004,044,020,025,005),
- (0,0,0,0,0,0,0,0,0,0,0,1,071,005,055,003,071,034,060,011,074,002,041,050))
+ (1,0,0,0,0,0,0,0,0,0,0,0,0o62,0o44,0o03,0o25,0o14,0o16,0o27,0o03,0o53,0o04,0o36,0o47),
+ (0,1,0,0,0,0,0,0,0,0,0,0,0o11,0o12,0o11,0o11,0o16,0o64,0o67,0o55,0o01,0o76,0o26,0o73),
+ (0,0,1,0,0,0,0,0,0,0,0,0,0o03,0o01,0o05,0o75,0o14,0o06,0o20,0o44,0o66,0o06,0o70,0o66),
+ (0,0,0,1,0,0,0,0,0,0,0,0,0o21,0o70,0o27,0o45,0o16,0o67,0o23,0o64,0o73,0o33,0o44,0o21),
+ (0,0,0,0,1,0,0,0,0,0,0,0,0o30,0o22,0o03,0o75,0o15,0o15,0o33,0o15,0o51,0o03,0o53,0o50),
+ (0,0,0,0,0,1,0,0,0,0,0,0,0o01,0o41,0o27,0o56,0o76,0o64,0o21,0o53,0o04,0o25,0o01,0o12),
+ (0,0,0,0,0,0,1,0,0,0,0,0,0o61,0o76,0o21,0o55,0o76,0o01,0o63,0o35,0o30,0o13,0o64,0o70),
+ (0,0,0,0,0,0,0,1,0,0,0,0,0o24,0o22,0o71,0o56,0o21,0o35,0o73,0o42,0o57,0o74,0o43,0o76),
+ (0,0,0,0,0,0,0,0,1,0,0,0,0o72,0o42,0o05,0o20,0o43,0o47,0o33,0o56,0o01,0o16,0o13,0o76),
+ (0,0,0,0,0,0,0,0,0,1,0,0,0o72,0o14,0o65,0o54,0o35,0o25,0o41,0o16,0o15,0o40,0o71,0o26),
+ (0,0,0,0,0,0,0,0,0,0,1,0,0o73,0o65,0o36,0o61,0o42,0o22,0o17,0o04,0o44,0o20,0o25,0o05),
+ (0,0,0,0,0,0,0,0,0,0,0,1,0o71,0o05,0o55,0o03,0o71,0o34,0o60,0o11,0o74,0o02,0o41,0o50))
assert data < 2**72
codeword = [0,] * 24
for i in range(24):
@@ -252,22 +255,22 @@ def rs_24_12_13_encode(data):
# returns an integer
def rs_24_16_9_encode(data):
matrix = (
- (1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,051,045,067,015,064,067,052,012),
- (0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,057,025,063,073,071,022,040,015),
- (0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,005,001,031,004,016,054,025,076),
- (0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,073,007,047,014,041,077,047,011),
- (0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,075,015,051,051,017,067,017,057),
- (0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,020,032,014,042,075,042,070,054),
- (0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,002,075,043,005,001,040,012,064),
- (0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,024,074,015,072,024,026,074,061),
- (0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,042,064,007,022,061,020,040,065),
- (0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,032,032,055,041,057,066,021,077),
- (0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,065,036,025,007,050,016,040,051),
- (0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,064,006,054,032,076,046,014,036),
- (0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,062,063,074,070,005,027,037,046),
- (0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,055,043,034,071,057,076,050,064),
- (0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,024,023,023,005,050,070,042,023),
- (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,067,075,045,060,057,024,006,026))
+ (1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0o51,0o45,0o67,0o15,0o64,0o67,0o52,0o12),
+ (0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0o57,0o25,0o63,0o73,0o71,0o22,0o40,0o15),
+ (0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0o05,0o01,0o31,0o04,0o16,0o54,0o25,0o76),
+ (0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0o73,0o07,0o47,0o14,0o41,0o77,0o47,0o11),
+ (0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0o75,0o15,0o51,0o51,0o17,0o67,0o17,0o57),
+ (0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0o20,0o32,0o14,0o42,0o75,0o42,0o70,0o54),
+ (0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0o02,0o75,0o43,0o05,0o01,0o40,0o12,0o64),
+ (0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0o24,0o74,0o15,0o72,0o24,0o26,0o74,0o61),
+ (0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0o42,0o64,0o07,0o22,0o61,0o20,0o40,0o65),
+ (0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0o32,0o32,0o55,0o41,0o57,0o66,0o21,0o77),
+ (0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0o65,0o36,0o25,0o07,0o50,0o16,0o40,0o51),
+ (0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0o64,0o06,0o54,0o32,0o76,0o46,0o14,0o36),
+ (0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0o62,0o63,0o74,0o70,0o05,0o27,0o37,0o46),
+ (0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0o55,0o43,0o34,0o71,0o57,0o76,0o50,0o64),
+ (0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0o24,0o23,0o23,0o05,0o50,0o70,0o42,0o23),
+ (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0o67,0o75,0o45,0o60,0o57,0o24,0o06,0o26))
assert data < 2**96
codeword = [0,] * 24
for i in range(24):
@@ -280,12 +283,12 @@ def rs_24_16_9_encode(data):
# argument is an integer
# returns an integer
def golay_24_12_8_encode(data):
- matrix = (040006165, 020003073, 010007550, 04003664, 02001732,
- 01006631, 0403315, 0201547, 0106706, 045227, 024476, 014353)
+ matrix = (0o40006165, 0o20003073, 0o10007550, 0o4003664, 0o2001732,
+ 0o1006631, 0o403315, 0o201547, 0o106706, 0o45227, 0o24476, 0o14353)
assert data < 2**12
codeword = 0
for i in range(12):
- if data & (04000 >> i):
+ if data & (0o4000 >> i):
codeword ^= matrix[i]
return codeword
@@ -461,7 +464,7 @@ def trellis_3_4_encode(input):
# returns an integer
def crc_ccitt(data):
assert data >= 0
- assert data <= 0xffffffffffffffffffffL
+ assert data <= 0xffffffffffffffffffff
g = (1 << 12) | (1 << 5) | 1
crc = 0;
for i in range(79, -1, -1):
@@ -495,7 +498,7 @@ def crc_9(serial, data):
assert serial >= 0
assert serial <= 0x7f
assert data >= 0
- assert data <= 0xffffffffffffffffffffffffffffffffL
+ assert data <= 0xffffffffffffffffffffffffffffffff
data |= (serial << 128)
g = (1 << 6) | (1 << 4) | (1 << 3) | 1
crc = 0;
@@ -623,7 +626,7 @@ def construct_lc(lco, mfid, svcopt, s, tgid, dst, src):
def construct_es(mi, algid, kid):
text_out("\tEncryption Sync Word:\n")
- assert mi <= 0xffffffffffffffffffL
+ assert mi <= 0xffffffffffffffffff
assert algid <= 0xff
assert kid <= 0xffff
@@ -646,7 +649,7 @@ def construct_tsbk(lb, p, opcode, mfid, arg):
assert p <= 0x1
assert opcode <= 0x3f
assert mfid <= 0xff
- assert arg <= 0xffffffffffffffffL
+ assert arg <= 0xffffffffffffffff
tsbk = lb << 95
tsbk |= p << 94
@@ -879,7 +882,7 @@ def construct_hdu(nac, ss, mi, mfid, algid, kid, tgid):
assert nac <= 0xfff
assert ss <= 0x3
- assert mi <= 0xffffffffffffffffffL
+ assert mi <= 0xffffffffffffffffff
assert algid <= 0xff
assert kid <= 0xffff
assert tgid <= 0xffff
@@ -918,7 +921,7 @@ def construct_ldu1(nac, ss, imbe, lsd, lco, mfid, svcopt, s, tgid, dst, src):
assert nac <= 0xfff
assert ss <= 0x3
- assert imbe <= 0xffffffffffffffffffffffffffffffffffffL
+ assert imbe <= 0xffffffffffffffffffffffffffffffffffff
assert lsd <= 0xffffffff
assert lco <= 0xff
assert mfid <= 0xff
@@ -975,9 +978,9 @@ def construct_ldu2(nac, ss, imbe, lsd, mi, algid, kid):
assert nac <= 0xfff
assert ss <= 0x3
- assert imbe <= 0xffffffffffffffffffffffffffffffffffffL
+ assert imbe <= 0xffffffffffffffffffffffffffffffffffff
assert lsd <= 0xffffffff
- assert mi <= 0xffffffffffffffffffL
+ assert mi <= 0xffffffffffffffffff
assert algid <= 0xff
assert kid <= 0xffff
@@ -1087,11 +1090,11 @@ def construct_tsdu(nac, ss, blocks, mfid, opcode, arg):
assert blocks <= 0x3
assert mfid <= 0xff
assert opcode <= 0x3f
- assert arg <= 0xffffffffffffffffL
+ assert arg <= 0xffffffffffffffff
duid = 0x7
- numss = (56 + (blocks * 98) + 34) / 35
+ numss = (56 + (blocks * 98) + 34) // 35
ssyms = (ss,) * numss
text_out("\tDUID = %01x\n" % duid)
@@ -1133,11 +1136,11 @@ def construct_tsdu3(nac, ss, blocks, mfid, opcodes, args):
for opcode in opcodes:
assert opcode <= 0x3f
for arg in args:
- assert arg <= 0xffffffffffffffffL
+ assert arg <= 0xffffffffffffffff
duid = 0x7
- numss = (56 + (blocks * 98) + 34) / 35
+ numss = (56 + (blocks * 98) + 34) // 35
ssyms = (ss,) * numss
text_out("\tDUID = %01x\n" % duid)
@@ -1197,7 +1200,7 @@ def construct_cpdu(nac, ss, data, length, an, io, sapid,
data <<= (4 * 8)
data |= packet_crc
- numss = (56 + ((blocks + 1) * 98) + 34) / 35
+ numss = (56 + ((blocks + 1) * 98) + 34) // 35
ssyms = (ss,) * numss
text_out("\tDUID = %01x\n" % duid)
@@ -1222,7 +1225,7 @@ def construct_cpdu(nac, ss, data, length, an, io, sapid,
for i in range(blocks):
text_out("\tConfirmed Packet Data Unit Block:\n")
cpdu_block = (data >> (16 * 8 *
- (blocks - i - 1))) & 0xffffffffffffffffffffffffffffffffL
+ (blocks - i - 1))) & 0xffffffffffffffffffffffffffffffff
# More sophisticated serial number generation required
# for retransmissions.
@@ -1279,7 +1282,7 @@ def construct_rpdu(nac, ss, data, length, io, rclass, rtype,
else:
blocks = 0
- numss = (56 + ((blocks + 1) * 98) + 34) / 35
+ numss = (56 + ((blocks + 1) * 98) + 34) // 35
ssyms = (ss,) * numss
text_out("\tDUID = %01x\n" % duid)
@@ -1301,7 +1304,7 @@ def construct_rpdu(nac, ss, data, length, io, rclass, rtype,
for i in range(blocks):
text_out("\tResponse Packet Data Unit Block:\n")
rpdu_block = (data >> (12 * 8 *
- (blocks - i - 1))) & 0xffffffffffffffffffffffffL
+ (blocks - i - 1))) & 0xffffffffffffffffffffffff
text_out("\t\tData = %024x\n" % rpdu_block)
# I'm assuming 1/2 rate trellis encoding based on the length
@@ -1345,7 +1348,7 @@ def construct_updu(nac, ss, data, length, io, sapid, mfid, llid, dho):
data <<= (4 * 8)
data |= packet_crc
- numss = (56 + ((blocks + 1) * 98) + 34) / 35
+ numss = (56 + ((blocks + 1) * 98) + 34) // 35
ssyms = (ss,) * numss
text_out("\tDUID = %01x\n" % duid)
@@ -1365,7 +1368,7 @@ def construct_updu(nac, ss, data, length, io, sapid, mfid, llid, dho):
for i in range(blocks):
text_out("\tUnconfirmed Packet Data Unit Block:\n")
updu_block = (data >> (12 * 8 *
- (blocks - i - 1))) & 0xffffffffffffffffffffffffL
+ (blocks - i - 1))) & 0xffffffffffffffffffffffff
text_out("\t\tData = %024x\n" % updu_block)
symbols.extend(data_interleave(trellis_1_2_encode(
split_dibits(updu_block, 48))))
@@ -1408,7 +1411,7 @@ def construct_ambt(nac, ss, data, length, io, sapid, mfid, llid, opcode, dbtm):
data <<= (4 * 8)
data |= packet_crc
- numss = (56 + ((blocks + 1) * 98) + 34) / 35
+ numss = (56 + ((blocks + 1) * 98) + 34) // 35
ssyms = (ss,) * numss
text_out("\tDUID = %01x\n" % duid)
@@ -1428,7 +1431,7 @@ def construct_ambt(nac, ss, data, length, io, sapid, mfid, llid, opcode, dbtm):
for i in range(blocks):
text_out("\tMultiple Block Trunking Block:\n")
ambt_block = (data >> (12 * 8 *
- (blocks - i - 1))) & 0xffffffffffffffffffffffffL
+ (blocks - i - 1))) & 0xffffffffffffffffffffffff
text_out("\t\tData = %024x\n" % ambt_block)
symbols.extend(data_interleave(trellis_1_2_encode(
split_dibits(ambt_block, 48))))
@@ -1694,17 +1697,17 @@ def make_fakecc_tsdu(params):
opcodes = []
args = []
op, arg = format_iden_up(0,
- int(12.5 / 0.125),
- (25 * 4),
- int(12.5 / 0.125),
- 902012500/5)
+ params['iden_up_bw'] // 125,
+ params['iden_up_tx_offset'] * 4,
+ params['iden_up_spacing'] // 125,
+ params['iden_up_frequency'] // 5)
opcodes.append(op)
args.append(arg)
op, arg = format_network_status_broadcast(
0,
params['wacn'],
params['system_id'],
- (params['cc_freq'] - 902012500) / 12500,
+ (params['cc_freq'] - params['iden_up_frequency']) // params['iden_up_spacing'],
0x70)
opcodes.append(op)
args.append(arg)
@@ -1713,7 +1716,7 @@ def make_fakecc_tsdu(params):
params['system_id'],
params['subsystem_id'],
params['site_id'],
- (params['cc_freq'] - 902012500) / 12500,
+ (params['cc_freq'] - params['iden_up_frequency']) // params['iden_up_spacing'],
0x70)
opcodes.append(op)
args.append(arg)
@@ -1723,7 +1726,7 @@ def make_fakecc_tsdu(params):
mfid = 0
construct_tsdu3(nac, ss, blocks, mfid, opcodes, args)
ga = 666
- ch = (params['vc_freq'] - 902012500) / 12500
+ ch = (params['vc_freq'] - params['iden_up_frequency']) // params['iden_up_spacing']
opcode, args = format_group_voice_channel_grant_update(ch, ga, ch, ga)
construct_tsdu (nac, ss, blocks, mfid, opcode, args)
@@ -1849,7 +1852,7 @@ if __name__ == "__main__":
assert options.nac <= 0xfff
assert options.ss <= 0b11
- assert options.mi <= 0xffffffffffffffffffL
+ assert options.mi <= 0xffffffffffffffffff
assert options.mfid <= 0xff
assert options.algid <= 0xff
assert options.kid <= 0xffff
@@ -1858,10 +1861,10 @@ if __name__ == "__main__":
assert options.src <= 0xffffff
assert options.dst <= 0xffffff
assert options.lsd <= 0xffffffff
- assert options.lsd1 <= 0xffff
- assert options.lsd2 <= 0xffff
+ assert options.lsd1 is None or options.lsd1 <= 0xffff
+ assert options.lsd2 is None or options.lsd2 <= 0xffff
assert options.pri <= 0x7
- assert options.svcopt <= 0xff
+ assert options.svcopt is None or options.svcopt <= 0xff
assert options.ntsbk >= 1
assert options.ntsbk <= 3
assert options.sapid <= 0x3f
@@ -1872,7 +1875,7 @@ if __name__ == "__main__":
assert options.rtype <= 0x7
assert options.rstatus <= 0x7
assert options.ns <= 0x7
- assert options.arg <= 0xffffffffffffffffL
+ assert options.arg <= 0xffffffffffffffff
if options.quiet:
quiet = True
diff --git a/op25/gr-op25_repeater/apps/tx/testpatterns/1011.pattern b/op25/gr-op25_repeater/apps/tx/testpatterns/1011.pattern
new file mode 100644
index 0000000..2f10ee0
--- /dev/null
+++ b/op25/gr-op25_repeater/apps/tx/testpatterns/1011.pattern
Binary files differ
diff --git a/op25/gr-op25_repeater/apps/tx/testpatterns/afc1011.pattern b/op25/gr-op25_repeater/apps/tx/testpatterns/afc1011.pattern
new file mode 100644
index 0000000..1a11aaf
--- /dev/null
+++ b/op25/gr-op25_repeater/apps/tx/testpatterns/afc1011.pattern
Binary files differ
diff --git a/op25/gr-op25_repeater/apps/tx/testpatterns/bercalhex.pattern b/op25/gr-op25_repeater/apps/tx/testpatterns/bercalhex.pattern
new file mode 100644
index 0000000..d7ecc70
--- /dev/null
+++ b/op25/gr-op25_repeater/apps/tx/testpatterns/bercalhex.pattern
Binary files differ
diff --git a/op25/gr-op25_repeater/apps/tx/testpatterns/busyhex.pattern b/op25/gr-op25_repeater/apps/tx/testpatterns/busyhex.pattern
new file mode 100644
index 0000000..52ccd68
--- /dev/null
+++ b/op25/gr-op25_repeater/apps/tx/testpatterns/busyhex.pattern
Binary files differ
diff --git a/op25/gr-op25_repeater/apps/tx/testpatterns/idlehex.pattern b/op25/gr-op25_repeater/apps/tx/testpatterns/idlehex.pattern
new file mode 100644
index 0000000..89d1d3d
--- /dev/null
+++ b/op25/gr-op25_repeater/apps/tx/testpatterns/idlehex.pattern
Binary files differ
diff --git a/op25/gr-op25_repeater/apps/tx/testpatterns/silencehex.pattern b/op25/gr-op25_repeater/apps/tx/testpatterns/silencehex.pattern
new file mode 100644
index 0000000..051c5d2
--- /dev/null
+++ b/op25/gr-op25_repeater/apps/tx/testpatterns/silencehex.pattern
Binary files differ
diff --git a/op25/gr-op25_repeater/apps/tx/testpatterns/sources/1011hex.dat b/op25/gr-op25_repeater/apps/tx/testpatterns/sources/1011hex.dat
new file mode 100644
index 0000000..3983736
--- /dev/null
+++ b/op25/gr-op25_repeater/apps/tx/testpatterns/sources/1011hex.dat
@@ -0,0 +1,24 @@
+557 5F5 FF7 7FF 293 554 7BC B19 4D0 DCE 24A 124
+0D4 33C 0BE 1B9 184 4FC C16 296 276 0E4 E24 A10
+90D 433 C0B E1B 918 44C FC1 629 627 60E C00 000
+000 003 892 849 0D4 33C 02F 86E 461 13F C16 294
+89D 839 000 000 001 C38 24A 124 350 CF0 2F8 6E4
+184 4FF 058 A58 9D8 3B0 000 000 007 0E2 4A1 240
+D43 3C0 BE1 B91 844 FF0 162 962 760 E6D E5D 548
+ADE 389 284 90D 433 C08 F86 E46 113 FC1 629 624
+D83 BA1 41C 2D2 BA3 890 A12 435 0CF 02F 86E 460
+44F F05 8A5 89D 839 4C8 FB0 235 A4E 24A 124 350
+33C 0BE 1B9 184 4FF 058 296 276 0EC 000 000 00C
+892 849 0D4 33C 0BE 1B8 461 13F C16 296 276 0E4
+557 5F5 FF7 7FF 293 AB8 A4E FB0 9A8 ACE 24A 124
+0D4 33C 0BE 1B9 184 4FC C16 296 276 0EC E24 A10
+90D 433 C0B E1B 918 44C FC1 629 627 60E 400 000
+000 003 892 849 0D4 33C 02F 86E 461 13F C16 294
+89D 83B 000 000 000 038 24A 124 350 CF0 2F8 6E4
+184 4FF 058 A58 9D8 390 000 000 000 0E2 4A1 240
+D43 3C0 BE1 B91 844 FF0 162 962 760 EE0 E00 000
+000 389 284 90D 433 C08 F86 E46 113 FC1 629 624
+D83 9AE 8B4 8B6 493 890 A12 435 0CF 02F 86E 460
+44F F05 8A5 89D 83B 9A8 F4F 1FD 60E 24A 124 350
+33C 0BE 1B9 184 4FF 058 296 276 0E4 000 000 00C
+892 849 0D4 33C 0BE 1B8 461 13F C16 296 276 0EC
diff --git a/op25/gr-op25_repeater/apps/tx/testpatterns/sources/afc1011hex.dat b/op25/gr-op25_repeater/apps/tx/testpatterns/sources/afc1011hex.dat
new file mode 100644
index 0000000..5da20de
--- /dev/null
+++ b/op25/gr-op25_repeater/apps/tx/testpatterns/sources/afc1011hex.dat
@@ -0,0 +1,24 @@
+557 5F5 FF7 7FF 293 557 7BC B19 4D0 DCE 24A 127
+0D4 33C 0BE 1B9 184 4FF C16 296 276 0E4 E24 A13
+90D 433 C0B E1B 918 44F FC1 629 627 60E C00 003
+000 003 892 849 0D4 33F 02F 86E 461 13F C16 297
+89D 839 000 000 001 C3B 24A 124 350 CF0 2F8 6E7
+184 4FF 058 A58 9D8 3B3 000 000 007 0E2 4A1 243
+D43 3C0 BE1 B91 844 FF3 162 962 760 E6D E5D 54B
+ADE 389 284 90D 433 C0B F86 E46 113 FC1 629 627
+D83 BA1 41C 2D2 BA3 893 A12 435 0CF 02F 86E 463
+44F F05 8A5 89D 839 4CB FB0 235 A4E 24A 124 353
+33C 0BE 1B9 184 4FF 05B 296 276 0EC 000 000 00F
+892 849 0D4 33C 0BE 1BB 461 13F C16 296 276 0E7
+557 5F5 FF7 7FF 293 ABB A4E FB0 9A8 ACE 24A 127
+0D4 33C 0BE 1B9 184 4FF C16 296 276 0EC E24 A13
+90D 433 C0B E1B 918 44F FC1 629 627 60E 400 003
+000 003 892 849 0D4 33F 02F 86E 461 13F C16 297
+89D 83B 000 000 000 03B 24A 124 350 CF0 2F8 6E7
+184 4FF 058 A58 9D8 393 000 000 000 0E2 4A1 243
+D43 3C0 BE1 B91 844 FF3 162 962 760 EE0 E00 003
+000 389 284 90D 433 C0B F86 E46 113 FC1 629 627
+D83 9AE 8B4 8B6 493 893 A12 435 0CF 02F 86E 463
+44F F05 8A5 89D 83B 9AB F4F 1FD 60E 24A 124 353
+33C 0BE 1B9 184 4FF 05B 296 276 0E4 000 000 00F
+892 849 0D4 33C 0BE 1BB 461 13F C16 296 276 0EF
diff --git a/op25/gr-op25_repeater/apps/tx/testpatterns/sources/bercalhex.dat b/op25/gr-op25_repeater/apps/tx/testpatterns/sources/bercalhex.dat
new file mode 100644
index 0000000..12a037c
--- /dev/null
+++ b/op25/gr-op25_repeater/apps/tx/testpatterns/sources/bercalhex.dat
@@ -0,0 +1,24 @@
+557 5E5 FF7 6FF 292 554 7AC B19 5D0 DCF 24A 134
+0D4 23C 0BF 1B9 194 4FC D16 297 276 0F4 E24 B10
+90C 433 C1B E1B 818 44D FC1 639 627 70E C01 000
+010 003 992 848 0D4 32C 02F 96E 460 13F C06 294
+99D 838 000 010 001 D38 24B 124 340 CF0 3F8 6E5
+184 4EF 058 B58 9D9 3B0 010 000 107 0E3 4A1 250
+D43 2C0 BE0 B91 854 FF0 062 963 760 E7D E5D 448
+ADF 389 294 90D 533 C09 F86 E56 113 EC1 628 624
+D93 BA1 51C 2D3 BA3 880 A12 535 0CE 02F 87E 460
+54F F04 8A5 88D 839 5C8 FB1 235 A5E 24A 024 351
+33C 0AE 1B9 084 4FE 058 286 276 1EC 001 000 01C
+892 949 0D5 33C 0AE 1B8 561 13E C16 286 276 1E4
+556 5F5 FE7 7FF 393 AB9 A4E FA0 9A8 BCE 24B 124
+0C4 33C 1BE 1B8 184 4EC C16 396 277 0EC E34 A10
+80D 432 C0B E0B 918 54C FC0 629 637 60E 500 001
+000 013 892 949 0D5 33C 03F 86E 561 13E C16 284
+89D 93B 001 000 010 038 34A 125 350 CE0 2F8 7E4
+185 4FF 048 A58 8D8 391 000 010 000 1E2 4A0 240
+D53 3C0 AE1 B90 844 FE0 162 862 761 EE0 E10 000
+100 388 284 91D 433 D08 F87 E46 103 FC1 729 625
+D83 9BE 8B4 9B6 492 890 A02 435 1CF 02E 86E 470
+44F E05 8A4 89D 82B 9A8 E4F 1FC 60E 25A 124 250
+33D 0BE 1A9 184 5FF 059 296 266 0E4 100 001 00C
+882 849 1D4 33D 0BE 1A8 461 03F C17 296 266 0EC
diff --git a/op25/gr-op25_repeater/apps/tx/testpatterns/sources/busyhex.dat b/op25/gr-op25_repeater/apps/tx/testpatterns/sources/busyhex.dat
new file mode 100644
index 0000000..aa2cc16
--- /dev/null
+++ b/op25/gr-op25_repeater/apps/tx/testpatterns/sources/busyhex.dat
@@ -0,0 +1,24 @@
+557 5F5 FF7 7FF 293 555 7BC B19 4D0 DCE 24A 125
+0D4 33C 0BE 1B9 184 4FD C16 296 276 0E4 E24 A11
+90D 433 C0B E1B 918 44D FC1 629 627 60E C00 001
+000 003 892 849 0D4 33D 02F 86E 461 13F C16 295
+89D 839 000 000 001 C39 24A 124 350 CF0 2F8 6E5
+184 4FF 058 A58 9D8 3B1 000 000 007 0E2 4A1 241
+D43 3C0 BE1 B91 844 FF1 162 962 760 E6D E5D 549
+ADE 389 284 90D 433 C09 F86 E46 113 FC1 629 625
+D83 BA1 41C 2D2 BA3 891 A12 435 0CF 02F 86E 461
+44F F05 8A5 89D 839 4C9 FB0 235 A4E 24A 124 351
+33C 0BE 1B9 184 4FF 059 296 276 0EC 000 000 00D
+892 849 0D4 33C 0BE 1B9 461 13F C16 296 276 0E5
+557 5F5 FF7 7FF 293 AB9 A4E FB0 9A8 ACE 24A 125
+0D4 33C 0BE 1B9 184 4FD C16 296 276 0EC E24 A11
+90D 433 C0B E1B 918 44D FC1 629 627 60E 400 001
+000 003 892 849 0D4 33D 02F 86E 461 13F C16 295
+89D 83B 000 000 000 039 24A 124 350 CF0 2F8 6E5
+184 4FF 058 A58 9D8 391 000 000 000 0E2 4A1 241
+D43 3C0 BE1 B91 844 FF1 162 962 760 EE0 E00 001
+000 389 284 90D 433 C09 F86 E46 113 FC1 629 625
+D83 9AE 8B4 8B6 493 891 A12 435 0CF 02F 86E 461
+44F F05 8A5 89D 83B 9A9 F4F 1FD 60E 24A 124 351
+33C 0BE 1B9 184 4FF 059 296 276 0E4 000 000 00D
+892 849 0D4 33C 0BE 1B9 461 13F C16 296 276 0ED
diff --git a/op25/gr-op25_repeater/apps/tx/testpatterns/sources/idlehex.dat b/op25/gr-op25_repeater/apps/tx/testpatterns/sources/idlehex.dat
new file mode 100644
index 0000000..859ece8
--- /dev/null
+++ b/op25/gr-op25_repeater/apps/tx/testpatterns/sources/idlehex.dat
@@ -0,0 +1,24 @@
+557 5F5 FF7 7FF 293 557 7BC B19 4D0 DCE 24A 127
+0D4 33C 0BE 1B9 184 4FF C16 296 276 0E4 E24 A13
+90D 433 C0B E1B 918 44F FC1 629 627 60E C00 003
+000 003 892 849 0D4 33F 02F 86E 461 13F C16 297
+89D 839 000 000 001 C3B 24A 124 350 CF0 2F8 6E7
+184 4FF 058 A58 9D8 3B3 000 000 007 0E2 4A1 243
+D43 3C0 BE1 B91 844 FF3 162 962 760 E6D E5D 54B
+ADE 389 284 90D 433 C0B F86 E46 113 FC1 629 627
+D83 BA1 41C 2D2 BA3 893 A12 435 0CF 02F 86E 463
+44F F05 8A5 89D 839 4CB FB0 235 A4E 24A 124 353
+33C 0BE 1B9 184 4FF 05B 296 276 0EC 000 000 00F
+892 849 0D4 33C 0BE 1BB 461 13F C16 296 276 0E7
+557 5F5 FF7 7FF 293 ABB A4E FB0 9A8 ACE 24A 127
+0D4 33C 0BE 1B9 184 4FF C16 296 276 0EC E24 A13
+90D 433 C0B E1B 918 44F FC1 629 627 60E 400 003
+000 003 892 849 0D4 33F 02F 86E 461 13F C16 297
+89D 83B 000 000 000 03F 24A 124 350 CF0 2F8 6E7
+184 4FF 058 A58 9D8 393 000 000 000 0E2 4A1 243
+D43 3C0 BE1 B91 844 FF3 162 962 760 EE0 E00 003
+000 389 284 90D 433 C0B F86 E46 113 FC1 629 627
+D83 9AE 8B4 8B6 493 893 A12 435 0CF 02F 86E 463
+44F F05 8A5 89D 83B 9AB F4F 1FD 60E 24A 124 353
+33C 0BE 1B9 184 4FF 05B 296 276 0E4 000 000 00F
+892 849 0D4 33C 0BE 1BB 461 13F C16 296 276 0EF
diff --git a/op25/gr-op25_repeater/apps/tx/testpatterns/sources/make-bin.py b/op25/gr-op25_repeater/apps/tx/testpatterns/sources/make-bin.py
new file mode 100755
index 0000000..997c956
--- /dev/null
+++ b/op25/gr-op25_repeater/apps/tx/testpatterns/sources/make-bin.py
@@ -0,0 +1,25 @@
+#! /usr/bin/env python
+
+"""
+utility program to make binary symbol files
+
+reads source file (stdin); writes binary file to stdout
+
+"""
+
+import sys
+
+s = sys.stdin.read()
+s= s.replace(' ', '')
+s= s.replace('\n', '')
+s = s.strip()
+
+dibits = ''
+
+while s:
+ s0 = int(s[0], 16)
+ s = s[1:]
+ dibits += chr(s0>>2)
+ dibits += chr(s0&3)
+
+sys.stdout.write(dibits)
diff --git a/op25/gr-op25_repeater/apps/tx/testpatterns/sources/silencehex.dat b/op25/gr-op25_repeater/apps/tx/testpatterns/sources/silencehex.dat
new file mode 100644
index 0000000..c4cca78
--- /dev/null
+++ b/op25/gr-op25_repeater/apps/tx/testpatterns/sources/silencehex.dat
@@ -0,0 +1,24 @@
+557 5F5 FF7 7FF 8A2 540 FF8 BAA 959 E5A 18B A16
+DE2 E82 693 63D 981 F98 F88 EC6 2B8 011 B10 BA0
+5DE 2E8 269 363 D98 1F8 6F8 8EC 62B 801 800 000
+000 006 C42 E85 DE2 E80 9A4 D8F 660 7E6 F88 EC4
+8AE 004 000 000 001 C6C 10B A17 78B A09 A4D 8F4
+981 F9B E23 B18 AE0 060 000 000 007 1B1 0BA 174
+E2E 826 936 3D9 81F 9BC 88E C62 B80 12D E5D 548
+ADE 6C4 2E8 5DE 2E8 268 4D8 F66 07E 6F8 8EC 628
+E00 6A1 41C 2D2 BA6 C40 BA1 778 BA0 9A4 D8F 660
+1F9 BE2 3B1 8AE 004 4C8 FB0 235 A5B 10B A17 788
+E82 693 63D 981 F9B E20 EC6 2B8 018 000 000 018
+C42 E85 DE2 E82 693 63C 660 7E6 F88 EC6 2B8 010
+557 5F5 FF7 7FF 293 AB8 A4E FB0 9A8 ADB 10B A14
+DE2 E82 693 63D 981 F98 F88 EC6 2B8 019 B10 BA0
+5DE 2E8 269 363 D98 1F8 6F8 8EC 62B 801 000 000
+000 006 C42 E85 DE2 E80 9A4 D8F 660 7E6 F88 EC4
+8AE 006 000 000 000 06C 10B A17 78B A09 A4D 8F4
+981 F9B E23 B18 AE0 040 000 000 000 1B1 0BA 174
+E2E 826 936 3D9 81F 9BC 88E C62 B80 1A0 E00 000
+000 6C4 2E8 5DE 2E8 268 4D8 F66 07E 6F8 8EC 628
+E00 4AE 8B4 8B6 496 C40 BA1 778 BA0 9A4 D8F 660
+1F9 BE2 3B1 8AE 006 9A8 F4F 1FD 61B 10B A17 788
+E82 693 63D 981 F9B E20 EC6 2B8 010 000 000 018
+C42 E85 DE2 E82 693 63C 660 7E6 F88 EC6 2B8 018
diff --git a/op25/gr-op25_repeater/apps/tx/testpatterns/test.wav b/op25/gr-op25_repeater/apps/tx/testpatterns/test.wav
new file mode 100644
index 0000000..f4f1bc6
--- /dev/null
+++ b/op25/gr-op25_repeater/apps/tx/testpatterns/test.wav
Binary files differ
diff --git a/op25/gr-op25_repeater/apps/tx/unpack.py b/op25/gr-op25_repeater/apps/tx/unpack.py
index 7cbf05b..0a8f0ad 100755
--- a/op25/gr-op25_repeater/apps/tx/unpack.py
+++ b/op25/gr-op25_repeater/apps/tx/unpack.py
@@ -1,5 +1,5 @@
-#!/usr/bin/env python
-from gnuradio import gr, gru, audio, eng_notation, blocks
+#!/usr/bin/env python3
+from gnuradio import gr, audio, eng_notation, blocks
from gnuradio.eng_option import eng_option
from optparse import OptionParser
diff --git a/op25/gr-op25_repeater/apps/tx/ysf-cfg.dat b/op25/gr-op25_repeater/apps/tx/ysf-cfg.dat
index b57e151..fb5a358 100644
--- a/op25/gr-op25_repeater/apps/tx/ysf-cfg.dat
+++ b/op25/gr-op25_repeater/apps/tx/ysf-cfg.dat
@@ -48,7 +48,7 @@ voip=0
# call sign data fields (10 byte, except rem12 and rem34 are five byte)
#################################################################################
dest=**********
-src=SRC
+src=KA1RBI
down=down1
up=up1
rem12=rem12
diff --git a/op25/gr-op25_repeater/apps/ui-settings.json b/op25/gr-op25_repeater/apps/ui-settings.json
new file mode 100644
index 0000000..b664cc0
--- /dev/null
+++ b/op25/gr-op25_repeater/apps/ui-settings.json
@@ -0,0 +1,34 @@
+{
+ "valSystemFont": "24",
+ "valTagFont": "24",
+ "valFontStyle": "normal",
+ "sc1": "police pd sheriff so swat law",
+ "sc2": "fd fire",
+ "sc3": "ac amr ccco pw",
+ "sc4": "",
+ "log_len": "2500",
+ "color_main_tag": true,
+ "color_main_sys": false,
+ "smartcolors": true,
+ "log_cc": true,
+ "log_cf": false,
+ "log_tu": false,
+ "log_rx": false,
+ "show_adj": false,
+ "je_joins": true,
+ "je_calls": false,
+ "je_deny": true,
+ "je_log": true,
+ "hide_enc": false,
+ "trailing_zeros": true,
+ "selDispMode": "dark",
+ "acc1": "#790000",
+ "acc2": "#004364",
+ "sysColor": "#3d81e7",
+ "valColor": "#00ffff",
+ "btnColor": "#20ffff",
+ "unk_default": "99",
+ "ani_speed": "250",
+ "showBandPlan": true,
+ "showSlot": true
+} \ No newline at end of file
diff --git a/op25/gr-op25_repeater/apps/util/arb-resample.py b/op25/gr-op25_repeater/apps/util/arb-resample.py
index 56a762f..a0fccbe 100755
--- a/op25/gr-op25_repeater/apps/util/arb-resample.py
+++ b/op25/gr-op25_repeater/apps/util/arb-resample.py
@@ -1,8 +1,8 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
import sys
import math
-from gnuradio import gr, gru, audio, eng_notation, filter, blocks
+from gnuradio import gr, audio, eng_notation, filter, blocks
from gnuradio import analog, digital
from gnuradio.eng_option import eng_option
from optparse import OptionParser
diff --git a/op25/gr-op25_repeater/apps/util/cqpsk-demod-file.py b/op25/gr-op25_repeater/apps/util/cqpsk-demod-file.py
index 051ddf0..65ccec6 100755
--- a/op25/gr-op25_repeater/apps/util/cqpsk-demod-file.py
+++ b/op25/gr-op25_repeater/apps/util/cqpsk-demod-file.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
#
# (C) Copyright 2010, 2014 Max H. Parke, KA1RBI
@@ -16,8 +16,8 @@
import sys
import os
import math
-from gnuradio import gr, gru, audio, eng_notation
-from gnuradio import filter, blocks, analog, digital
+from gnuradio import gr, audio, eng_notation
+from gnuradio import filter, blocks, analog, digital, fft
from gnuradio.eng_option import eng_option
from optparse import OptionParser