代码提交_摄像头开发
After Width: | Height: | Size: 835 KiB |
|
@ -0,0 +1 @@
|
|||
import{B as e,A as t}from"./index-B9cYO4uo.js";const s=a=>t("/api/AddCamera",a),i=a=>e("/api/GetCameraList",a),m=a=>e("/api/DeleteCamera",a),n=a=>t("/api/EditCamera",a),C=a=>e("/api/GetCameraDetails",a);export{s as A,m as D,n as E,i as G,C as a};
|
After Width: | Height: | Size: 8.7 KiB |
After Width: | Height: | Size: 16 KiB |
After Width: | Height: | Size: 6.8 KiB |
After Width: | Height: | Size: 5.8 KiB |
|
@ -0,0 +1 @@
|
|||
.PageContent[data-v-ff6be5f5]{width:100%;height:100%}.WebToolbar[data-v-ff6be5f5]{width:100%;height:.375rem;background-color:#fff;padding:.10417rem;display:flex;justify-content:space-between}.WebToolbar[data-v-ff6be5f5] .el-form-item__content{width:1.33333rem!important;height:.16667rem!important}.WebToolbar[data-v-ff6be5f5] .el-input,.WebToolbar[data-v-ff6be5f5] .el-select{width:1.33333rem!important}.WebToolbar[data-v-ff6be5f5] .el-form-item__label{color:#666!important}.ButtonAssembly .el-button[data-v-ff6be5f5]{width:.4375rem;height:.20833rem;border:none;font-weight:400;font-size:.07292rem;border-radius:.01042rem}.ButtonAssembly .el-button img[data-v-ff6be5f5]{width:.08333rem;height:.08333rem;margin-right:.04167rem}.ButtonAssembly .el-button[data-v-ff6be5f5]:nth-child(1){background-color:#007afc}.ButtonAssembly .el-button[data-v-ff6be5f5]:nth-child(2){background-color:#f2f3f5}.Tabulation[data-v-ff6be5f5]{width:100%;height:calc(100% - .375rem);background-color:#fff;margin-top:.07292rem;padding:.10417rem}.Tabulation .actionBar[data-v-ff6be5f5]{display:flex;justify-content:space-between}.Tabulation .actionBar h1[data-v-ff6be5f5]{font-weight:500;font-size:.10417rem;color:#1d2129;line-height:.14583rem;font-family:Microsoft YaHei,Microsoft YaHei}.Tabulation .Worktop .el-button[data-v-ff6be5f5]{border:.00521rem solid #007afc;font-weight:400;font-size:.07292rem;color:#007afc}.Tabulation .Worktop .el-button[data-v-ff6be5f5]:hover{background-color:transparent}.Tabulation .Worktop .BlueBack[data-v-ff6be5f5]{background:#007afc;border-radius:.01042rem;font-weight:400;font-size:.07292rem;color:#fff;line-height:.11458rem}.Tabulation .Worktop .BlueBack img[data-v-ff6be5f5]{width:.08333rem;height:.08333rem;margin-right:.04167rem}.Tabulation .Worktop .BlueBack[data-v-ff6be5f5]:hover{background-color:#007afc}.Tabulation .Worktop .Delete[data-v-ff6be5f5]{background:#f2f3f5;border-radius:.01042rem;font-weight:400;font-size:.07292rem;color:#1d2129;line-height:.11458rem;border:none}.Tabulation .Worktop .Delete img[data-v-ff6be5f5]{width:.08333rem;height:.08333rem;margin-right:.04167rem}.Tabulation .Worktop .Delete[data-v-ff6be5f5]:hover{background-color:#f2f3f5}.Tabulation .ExaminationForm[data-v-ff6be5f5]{margin-top:.08333rem;background-color:#07a}.Tabulation .el-table tr[data-v-ff6be5f5],.Tabulation .el-table td[data-v-ff6be5f5]{height:.21354rem}.Tabulation[data-v-ff6be5f5] th{background-color:#e5e6eb}.el-pagination[data-v-ff6be5f5]{float:right;background-color:#fff!important;margin-top:.09375rem}[data-v-ff6be5f5] .el-pager li.is-active{background-color:#b5d8f1!important;font-weight:400;color:#007afc!important}[data-v-ff6be5f5] .el-table--enable-row-hover .el-table__body tr:hover>td{background-color:#b5d8f1!important}[data-v-ff6be5f5] .el-select,[data-v-ff6be5f5] .el-input{width:1.45833rem!important}.example[data-v-ff6be5f5]{margin-left:.10417rem;color:red}.backInformation[data-v-ff6be5f5] .el-input{width:1.45833rem!important;height:.625rem!important}.dialog-footer[data-v-ff6be5f5]{width:100%;text-align:center}[data-v-ff6be5f5] .el-textarea__inner{width:1.45833rem!important}.user-name[data-v-ff6be5f5],.register[data-v-ff6be5f5]{cursor:pointer}.functionalUnit[data-v-ff6be5f5]{margin-left:.10417rem;display:flex}.functionalUnit .el-button[data-v-ff6be5f5]{width:.4375rem;height:.20833rem;border:none;font-weight:400;font-size:.07292rem;border-radius:.01042rem;color:#fff}.functionalUnit .el-button img[data-v-ff6be5f5]{width:.08333rem;height:.08333rem;margin-right:.04167rem}.functionalUnit .el-button[data-v-ff6be5f5]:nth-child(1){background-color:#2192ba}.functionalUnit .el-button[data-v-ff6be5f5]:nth-child(2){background-color:#17c85f}.TabularTitle[data-v-ff6be5f5]{font-size:.07292rem;color:#747272;font-weight:700;margin-bottom:.05208rem}.pagination[data-v-ff6be5f5]{width:100%;height:.15625rem}.pagination[data-v-ff6be5f5] .el-pagination{margin-top:.04688rem!important}.addSlip .el-button[data-v-ff6be5f5]{border:none;background-color:#07a;margin-top:.04167rem;color:#fff}.addSlip[data-v-ff6be5f5] .el-pagination{margin-top:.04167rem!important}.ml-3[data-v-ff6be5f5]{margin-left:.10417rem}.upload-file-uploader[data-v-ff6be5f5]{width:50%}.el-upload-list .el-upload-list__item[data-v-ff6be5f5]{width:33%!important;float:left;margin-left:-2.00521rem;margin-top:.13021rem}.el-upload-list .el-upload-list__item[data-v-ff6be5f5] .horizontal-list ul .el-upload-list__item{width:33%!important;float:left;margin-top:.13021rem}.el-upload-list .el-upload-list__item[data-v-ff6be5f5] .el-link__inner{display:inline-flex;justify-content:center;align-items:center;width:1.04167rem}
|
|
@ -0,0 +1 @@
|
|||
import{A as o}from"./index-B9cYO4uo.js";const r=a=>o("/api/Login",a),n=a=>o("/api/ChangePassword",a);export{n as C,r as a};
|
|
@ -0,0 +1 @@
|
|||
.PageContent[data-v-0dbc9791]{width:100%;height:100%}.WebToolbar[data-v-0dbc9791]{width:100%;height:.375rem;background-color:#fff;padding:.10417rem;display:flex;justify-content:space-between}.WebToolbar[data-v-0dbc9791] .el-form-item__content{width:1.33333rem!important;height:.16667rem!important}.WebToolbar[data-v-0dbc9791] .el-input,.WebToolbar[data-v-0dbc9791] .el-select{width:1.33333rem!important}.WebToolbar[data-v-0dbc9791] .el-form-item__label{color:#666!important}.ButtonAssembly .el-button[data-v-0dbc9791]{width:.4375rem;height:.20833rem;border:none;font-weight:400;font-size:.07292rem;border-radius:.01042rem}.ButtonAssembly .el-button img[data-v-0dbc9791]{width:.08333rem;height:.08333rem;margin-right:.04167rem}.ButtonAssembly .el-button[data-v-0dbc9791]:nth-child(1){background-color:#007afc}.ButtonAssembly .el-button[data-v-0dbc9791]:nth-child(2){background-color:#f2f3f5}.Tabulation[data-v-0dbc9791]{width:100%;height:calc(100% - .375rem);background-color:#fff;margin-top:.07292rem;padding:.10417rem}.Tabulation .actionBar[data-v-0dbc9791]{display:flex;justify-content:space-between}.Tabulation .actionBar h1[data-v-0dbc9791]{font-weight:500;font-size:.10417rem;color:#1d2129;line-height:.14583rem;font-family:Microsoft YaHei,Microsoft YaHei}.Tabulation .Worktop .el-button[data-v-0dbc9791]{border:.00521rem solid #007afc;font-weight:400;font-size:.07292rem;color:#007afc}.Tabulation .Worktop .el-button[data-v-0dbc9791]:hover{background-color:transparent}.Tabulation .Worktop .BlueBack[data-v-0dbc9791]{background:#007afc;border-radius:.01042rem;font-weight:400;font-size:.07292rem;color:#fff;line-height:.11458rem}.Tabulation .Worktop .BlueBack img[data-v-0dbc9791]{width:.08333rem;height:.08333rem;margin-right:.04167rem}.Tabulation .Worktop .BlueBack[data-v-0dbc9791]:hover{background-color:#007afc}.Tabulation .Worktop .Delete[data-v-0dbc9791]{background:#f2f3f5;border-radius:.01042rem;font-weight:400;font-size:.07292rem;color:#1d2129;line-height:.11458rem;border:none}.Tabulation .Worktop .Delete img[data-v-0dbc9791]{width:.08333rem;height:.08333rem;margin-right:.04167rem}.Tabulation .Worktop .Delete[data-v-0dbc9791]:hover{background-color:#f2f3f5}.Tabulation .ExaminationForm[data-v-0dbc9791]{margin-top:.08333rem;background-color:#07a}.Tabulation .el-table tr[data-v-0dbc9791],.Tabulation .el-table td[data-v-0dbc9791]{height:.21354rem}.Tabulation[data-v-0dbc9791] th{background-color:#e5e6eb}.el-pagination[data-v-0dbc9791]{float:right;background-color:#fff!important;margin-top:.09375rem}[data-v-0dbc9791] .el-pager li.is-active{background-color:#b5d8f1!important;font-weight:400;color:#007afc!important}[data-v-0dbc9791] .el-table--enable-row-hover .el-table__body tr:hover>td{background-color:#b5d8f1!important}[data-v-0dbc9791] .el-select,[data-v-0dbc9791] .el-input{width:1.45833rem!important}.example[data-v-0dbc9791]{margin-left:.10417rem;color:red}.backInformation[data-v-0dbc9791] .el-input{width:1.45833rem!important;height:.625rem!important}.dialog-footer[data-v-0dbc9791]{width:100%;text-align:center}[data-v-0dbc9791] .el-textarea__inner{width:1.45833rem!important}.user-name[data-v-0dbc9791],.register[data-v-0dbc9791]{cursor:pointer}.functionalUnit[data-v-0dbc9791]{margin-left:.10417rem;display:flex}.functionalUnit .el-button[data-v-0dbc9791]{width:.4375rem;height:.20833rem;border:none;font-weight:400;font-size:.07292rem;border-radius:.01042rem;color:#fff}.functionalUnit .el-button img[data-v-0dbc9791]{width:.08333rem;height:.08333rem;margin-right:.04167rem}.functionalUnit .el-button[data-v-0dbc9791]:nth-child(1){background-color:#2192ba}.functionalUnit .el-button[data-v-0dbc9791]:nth-child(2){background-color:#17c85f}.TabularTitle[data-v-0dbc9791]{font-size:.07292rem;color:#747272;font-weight:700;margin-bottom:.05208rem}.pagination[data-v-0dbc9791]{width:100%;height:.15625rem}.pagination[data-v-0dbc9791] .el-pagination{margin-top:.04688rem!important}.addSlip .el-button[data-v-0dbc9791]{border:none;background-color:#07a;margin-top:.04167rem;color:#fff}.addSlip[data-v-0dbc9791] .el-pagination{margin-top:.04167rem!important}.ml-3[data-v-0dbc9791]{margin-left:.10417rem}.upload-file-uploader[data-v-0dbc9791]{width:50%}.el-upload-list .el-upload-list__item[data-v-0dbc9791]{width:33%!important;float:left;margin-left:-2.00521rem;margin-top:.13021rem}.el-upload-list .el-upload-list__item[data-v-0dbc9791] .horizontal-list ul .el-upload-list__item{width:33%!important;float:left;margin-top:.13021rem}.el-upload-list .el-upload-list__item[data-v-0dbc9791] .el-link__inner{display:inline-flex;justify-content:center;align-items:center;width:1.04167rem}
|
|
@ -0,0 +1 @@
|
|||
.loginPage[data-v-5ad117d8]{width:100vw;height:100vh;overflow:hidden}.loginLayout[data-v-5ad117d8]{width:100%;height:100%;background:url(./Login-C7EmqzAv.png) no-repeat;background-size:100% 100%;display:flex;align-items:center;justify-content:center}.loginTitle[data-v-5ad117d8]{display:flex;justify-content:center;margin-bottom:.1875rem}.loginTitle img[data-v-5ad117d8]{width:.3125rem;height:.3125rem;margin-right:.125rem}.loginTitle p[data-v-5ad117d8]{height:.23958rem;line-height:.23958rem;font-family:DouyinSansBold;font-weight:700;font-size:.19792rem;color:#007afc;margin-top:.05729rem;letter-spacing:.00521rem}.loginInput[data-v-5ad117d8]{width:2.63542rem;height:2.09375rem;background:#fdfffd;box-shadow:0 0 .0625rem #a0c2b64a;border-radius:.05208rem;padding:0 .32813rem;overflow:hidden}.loginInput p[data-v-5ad117d8]{width:100%;text-align:center;font-weight:400;font-size:.10417rem;color:#333;line-height:.15625rem;margin-top:.26042rem;margin-bottom:.27083rem}.loginInput .el-button[data-v-5ad117d8]{width:1.97917rem;height:.26042rem;background:#007afc;border:none;border-radius:.01042rem;font-weight:400;font-size:.08333rem;color:#fff;line-height:.125rem}.login_from .el-input[data-v-5ad117d8]{height:.26042rem;border:.00521rem solid #007afc}.login_from .el-form-item--default[data-v-5ad117d8]{margin-bottom:.15625rem}.login_from[data-v-5ad117d8] .el-input__wrapper{border-radius:0!important;box-shadow:none!important}.login_from[data-v-5ad117d8] .el-input__wrapper:hover{box-shadow:none!important}[data-v-5ad117d8] .el-input{--el-input-focus-border-color: transparent !important}
|
|
@ -0,0 +1 @@
|
|||
.PageContent[data-v-3afad2e6]{width:100%;height:100%}.WebToolbar[data-v-3afad2e6]{width:100%;height:.375rem;background-color:#fff;padding:.10417rem;display:flex;justify-content:space-between}.WebToolbar[data-v-3afad2e6] .el-form-item__content{width:1.33333rem!important;height:.16667rem!important}.WebToolbar[data-v-3afad2e6] .el-input,.WebToolbar[data-v-3afad2e6] .el-select{width:1.33333rem!important}.WebToolbar[data-v-3afad2e6] .el-form-item__label{color:#666!important}.ButtonAssembly .el-button[data-v-3afad2e6]{width:.4375rem;height:.20833rem;border:none;font-weight:400;font-size:.07292rem;border-radius:.01042rem}.ButtonAssembly .el-button img[data-v-3afad2e6]{width:.08333rem;height:.08333rem;margin-right:.04167rem}.ButtonAssembly .el-button[data-v-3afad2e6]:nth-child(1){background-color:#007afc}.ButtonAssembly .el-button[data-v-3afad2e6]:nth-child(2){background-color:#f2f3f5}.Tabulation[data-v-3afad2e6]{width:100%;height:calc(100% - .375rem);background-color:#fff;margin-top:.07292rem;padding:.10417rem}.Tabulation .actionBar[data-v-3afad2e6]{display:flex;justify-content:space-between}.Tabulation .actionBar h1[data-v-3afad2e6]{font-weight:500;font-size:.10417rem;color:#1d2129;line-height:.14583rem;font-family:Microsoft YaHei,Microsoft YaHei}.Tabulation .Worktop .el-button[data-v-3afad2e6]{border:.00521rem solid #007afc;font-weight:400;font-size:.07292rem;color:#007afc}.Tabulation .Worktop .el-button[data-v-3afad2e6]:hover{background-color:transparent}.Tabulation .Worktop .BlueBack[data-v-3afad2e6]{background:#007afc;border-radius:.01042rem;font-weight:400;font-size:.07292rem;color:#fff;line-height:.11458rem}.Tabulation .Worktop .BlueBack img[data-v-3afad2e6]{width:.08333rem;height:.08333rem;margin-right:.04167rem}.Tabulation .Worktop .BlueBack[data-v-3afad2e6]:hover{background-color:#007afc}.Tabulation .Worktop .Delete[data-v-3afad2e6]{background:#f2f3f5;border-radius:.01042rem;font-weight:400;font-size:.07292rem;color:#1d2129;line-height:.11458rem;border:none}.Tabulation .Worktop .Delete img[data-v-3afad2e6]{width:.08333rem;height:.08333rem;margin-right:.04167rem}.Tabulation .Worktop .Delete[data-v-3afad2e6]:hover{background-color:#f2f3f5}.Tabulation .ExaminationForm[data-v-3afad2e6]{margin-top:.08333rem;background-color:#07a}.Tabulation .el-table tr[data-v-3afad2e6],.Tabulation .el-table td[data-v-3afad2e6]{height:.21354rem}.Tabulation[data-v-3afad2e6] th{background-color:#e5e6eb}.el-pagination[data-v-3afad2e6]{float:right;background-color:#fff!important;margin-top:.09375rem}[data-v-3afad2e6] .el-pager li.is-active{background-color:#b5d8f1!important;font-weight:400;color:#007afc!important}[data-v-3afad2e6] .el-table--enable-row-hover .el-table__body tr:hover>td{background-color:#b5d8f1!important}[data-v-3afad2e6] .el-select,[data-v-3afad2e6] .el-input{width:1.45833rem!important}.example[data-v-3afad2e6]{margin-left:.10417rem;color:red}.backInformation[data-v-3afad2e6] .el-input{width:1.45833rem!important;height:.625rem!important}.dialog-footer[data-v-3afad2e6]{width:100%;text-align:center}[data-v-3afad2e6] .el-textarea__inner{width:1.45833rem!important}.user-name[data-v-3afad2e6],.register[data-v-3afad2e6]{cursor:pointer}.functionalUnit[data-v-3afad2e6]{margin-left:.10417rem;display:flex}.functionalUnit .el-button[data-v-3afad2e6]{width:.4375rem;height:.20833rem;border:none;font-weight:400;font-size:.07292rem;border-radius:.01042rem;color:#fff}.functionalUnit .el-button img[data-v-3afad2e6]{width:.08333rem;height:.08333rem;margin-right:.04167rem}.functionalUnit .el-button[data-v-3afad2e6]:nth-child(1){background-color:#2192ba}.functionalUnit .el-button[data-v-3afad2e6]:nth-child(2){background-color:#17c85f}.TabularTitle[data-v-3afad2e6]{font-size:.07292rem;color:#747272;font-weight:700;margin-bottom:.05208rem}.pagination[data-v-3afad2e6]{width:100%;height:.15625rem}.pagination[data-v-3afad2e6] .el-pagination{margin-top:.04688rem!important}.addSlip .el-button[data-v-3afad2e6]{border:none;background-color:#07a;margin-top:.04167rem;color:#fff}.addSlip[data-v-3afad2e6] .el-pagination{margin-top:.04167rem!important}.ml-3[data-v-3afad2e6]{margin-left:.10417rem}.upload-file-uploader[data-v-3afad2e6]{width:50%}.el-upload-list .el-upload-list__item[data-v-3afad2e6]{width:33%!important;float:left;margin-left:-2.00521rem;margin-top:.13021rem}.el-upload-list .el-upload-list__item[data-v-3afad2e6] .horizontal-list ul .el-upload-list__item{width:33%!important;float:left;margin-top:.13021rem}.el-upload-list .el-upload-list__item[data-v-3afad2e6] .el-link__inner{display:inline-flex;justify-content:center;align-items:center;width:1.04167rem}
|
|
@ -0,0 +1 @@
|
|||
.PageContent[data-v-d7224c1a]{width:100%;height:100%}.WebToolbar[data-v-d7224c1a]{width:100%;height:.375rem;background-color:#fff;padding:.10417rem;display:flex;justify-content:space-between}.WebToolbar[data-v-d7224c1a] .el-form-item__content{width:1.33333rem!important;height:.16667rem!important}.WebToolbar[data-v-d7224c1a] .el-input,.WebToolbar[data-v-d7224c1a] .el-select{width:1.33333rem!important}.WebToolbar[data-v-d7224c1a] .el-form-item__label{color:#666!important}.ButtonAssembly .el-button[data-v-d7224c1a]{width:.4375rem;height:.20833rem;border:none;font-weight:400;font-size:.07292rem;border-radius:.01042rem}.ButtonAssembly .el-button img[data-v-d7224c1a]{width:.08333rem;height:.08333rem;margin-right:.04167rem}.ButtonAssembly .el-button[data-v-d7224c1a]:nth-child(1){background-color:#007afc}.ButtonAssembly .el-button[data-v-d7224c1a]:nth-child(2){background-color:#f2f3f5}.Tabulation[data-v-d7224c1a]{width:100%;height:calc(100% - .375rem);background-color:#fff;margin-top:.07292rem;padding:.10417rem}.Tabulation .actionBar[data-v-d7224c1a]{display:flex;justify-content:space-between}.Tabulation .actionBar h1[data-v-d7224c1a]{font-weight:500;font-size:.10417rem;color:#1d2129;line-height:.14583rem;font-family:Microsoft YaHei,Microsoft YaHei}.Tabulation .Worktop .el-button[data-v-d7224c1a]{border:.00521rem solid #007afc;font-weight:400;font-size:.07292rem;color:#007afc}.Tabulation .Worktop .el-button[data-v-d7224c1a]:hover{background-color:transparent}.Tabulation .Worktop .BlueBack[data-v-d7224c1a]{background:#007afc;border-radius:.01042rem;font-weight:400;font-size:.07292rem;color:#fff;line-height:.11458rem}.Tabulation .Worktop .BlueBack img[data-v-d7224c1a]{width:.08333rem;height:.08333rem;margin-right:.04167rem}.Tabulation .Worktop .BlueBack[data-v-d7224c1a]:hover{background-color:#007afc}.Tabulation .Worktop .Delete[data-v-d7224c1a]{background:#f2f3f5;border-radius:.01042rem;font-weight:400;font-size:.07292rem;color:#1d2129;line-height:.11458rem;border:none}.Tabulation .Worktop .Delete img[data-v-d7224c1a]{width:.08333rem;height:.08333rem;margin-right:.04167rem}.Tabulation .Worktop .Delete[data-v-d7224c1a]:hover{background-color:#f2f3f5}.Tabulation .ExaminationForm[data-v-d7224c1a]{margin-top:.08333rem;background-color:#07a}.Tabulation .el-table tr[data-v-d7224c1a],.Tabulation .el-table td[data-v-d7224c1a]{height:.21354rem}.Tabulation[data-v-d7224c1a] th{background-color:#e5e6eb}.el-pagination[data-v-d7224c1a]{float:right;background-color:#fff!important;margin-top:.09375rem}[data-v-d7224c1a] .el-pager li.is-active{background-color:#b5d8f1!important;font-weight:400;color:#007afc!important}[data-v-d7224c1a] .el-table--enable-row-hover .el-table__body tr:hover>td{background-color:#b5d8f1!important}[data-v-d7224c1a] .el-select,[data-v-d7224c1a] .el-input{width:1.45833rem!important}.example[data-v-d7224c1a]{margin-left:.10417rem;color:red}.backInformation[data-v-d7224c1a] .el-input{width:1.45833rem!important;height:.625rem!important}.dialog-footer[data-v-d7224c1a]{width:100%;text-align:center}[data-v-d7224c1a] .el-textarea__inner{width:1.45833rem!important}.user-name[data-v-d7224c1a],.register[data-v-d7224c1a]{cursor:pointer}.functionalUnit[data-v-d7224c1a]{margin-left:.10417rem;display:flex}.functionalUnit .el-button[data-v-d7224c1a]{width:.4375rem;height:.20833rem;border:none;font-weight:400;font-size:.07292rem;border-radius:.01042rem;color:#fff}.functionalUnit .el-button img[data-v-d7224c1a]{width:.08333rem;height:.08333rem;margin-right:.04167rem}.functionalUnit .el-button[data-v-d7224c1a]:nth-child(1){background-color:#2192ba}.functionalUnit .el-button[data-v-d7224c1a]:nth-child(2){background-color:#17c85f}.TabularTitle[data-v-d7224c1a]{font-size:.07292rem;color:#747272;font-weight:700;margin-bottom:.05208rem}.pagination[data-v-d7224c1a]{width:100%;height:.15625rem}.pagination[data-v-d7224c1a] .el-pagination{margin-top:.04688rem!important}.addSlip .el-button[data-v-d7224c1a]{border:none;background-color:#07a;margin-top:.04167rem;color:#fff}.addSlip[data-v-d7224c1a] .el-pagination{margin-top:.04167rem!important}.ml-3[data-v-d7224c1a]{margin-left:.10417rem}.upload-file-uploader[data-v-d7224c1a]{width:50%}.el-upload-list .el-upload-list__item[data-v-d7224c1a]{width:33%!important;float:left;margin-left:-2.00521rem;margin-top:.13021rem}.el-upload-list .el-upload-list__item[data-v-d7224c1a] .horizontal-list ul .el-upload-list__item{width:33%!important;float:left;margin-top:.13021rem}.el-upload-list .el-upload-list__item[data-v-d7224c1a] .el-link__inner{display:inline-flex;justify-content:center;align-items:center;width:1.04167rem}
|
|
@ -0,0 +1 @@
|
|||
.PageContent[data-v-b9d9a180]{width:100%;height:100%}.WebToolbar[data-v-b9d9a180]{width:100%;height:.375rem;background-color:#fff;padding:.10417rem;display:flex;justify-content:space-between}.WebToolbar[data-v-b9d9a180] .el-form-item__content{width:1.33333rem!important;height:.16667rem!important}.WebToolbar[data-v-b9d9a180] .el-input,.WebToolbar[data-v-b9d9a180] .el-select{width:1.33333rem!important}.WebToolbar[data-v-b9d9a180] .el-form-item__label{color:#666!important}.ButtonAssembly .el-button[data-v-b9d9a180]{width:.4375rem;height:.20833rem;border:none;font-weight:400;font-size:.07292rem;border-radius:.01042rem}.ButtonAssembly .el-button img[data-v-b9d9a180]{width:.08333rem;height:.08333rem;margin-right:.04167rem}.ButtonAssembly .el-button[data-v-b9d9a180]:nth-child(1){background-color:#007afc}.ButtonAssembly .el-button[data-v-b9d9a180]:nth-child(2){background-color:#f2f3f5}.Tabulation[data-v-b9d9a180]{width:100%;height:calc(100% - .375rem);background-color:#fff;margin-top:.07292rem;padding:.10417rem}.Tabulation .actionBar[data-v-b9d9a180]{display:flex;justify-content:space-between}.Tabulation .actionBar h1[data-v-b9d9a180]{font-weight:500;font-size:.10417rem;color:#1d2129;line-height:.14583rem;font-family:Microsoft YaHei,Microsoft YaHei}.Tabulation .Worktop .el-button[data-v-b9d9a180]{border:.00521rem solid #007afc;font-weight:400;font-size:.07292rem;color:#007afc}.Tabulation .Worktop .el-button[data-v-b9d9a180]:hover{background-color:transparent}.Tabulation .Worktop .BlueBack[data-v-b9d9a180]{background:#007afc;border-radius:.01042rem;font-weight:400;font-size:.07292rem;color:#fff;line-height:.11458rem}.Tabulation .Worktop .BlueBack img[data-v-b9d9a180]{width:.08333rem;height:.08333rem;margin-right:.04167rem}.Tabulation .Worktop .BlueBack[data-v-b9d9a180]:hover{background-color:#007afc}.Tabulation .Worktop .Delete[data-v-b9d9a180]{background:#f2f3f5;border-radius:.01042rem;font-weight:400;font-size:.07292rem;color:#1d2129;line-height:.11458rem;border:none}.Tabulation .Worktop .Delete img[data-v-b9d9a180]{width:.08333rem;height:.08333rem;margin-right:.04167rem}.Tabulation .Worktop .Delete[data-v-b9d9a180]:hover{background-color:#f2f3f5}.Tabulation .ExaminationForm[data-v-b9d9a180]{margin-top:.08333rem;background-color:#07a}.Tabulation .el-table tr[data-v-b9d9a180],.Tabulation .el-table td[data-v-b9d9a180]{height:.21354rem}.Tabulation[data-v-b9d9a180] th{background-color:#e5e6eb}.el-pagination[data-v-b9d9a180]{float:right;background-color:#fff!important;margin-top:.09375rem}[data-v-b9d9a180] .el-pager li.is-active{background-color:#b5d8f1!important;font-weight:400;color:#007afc!important}[data-v-b9d9a180] .el-table--enable-row-hover .el-table__body tr:hover>td{background-color:#b5d8f1!important}[data-v-b9d9a180] .el-select,[data-v-b9d9a180] .el-input{width:1.45833rem!important}.example[data-v-b9d9a180]{margin-left:.10417rem;color:red}.backInformation[data-v-b9d9a180] .el-input{width:1.45833rem!important;height:.625rem!important}.dialog-footer[data-v-b9d9a180]{width:100%;text-align:center}[data-v-b9d9a180] .el-textarea__inner{width:1.45833rem!important}.user-name[data-v-b9d9a180],.register[data-v-b9d9a180]{cursor:pointer}.functionalUnit[data-v-b9d9a180]{margin-left:.10417rem;display:flex}.functionalUnit .el-button[data-v-b9d9a180]{width:.4375rem;height:.20833rem;border:none;font-weight:400;font-size:.07292rem;border-radius:.01042rem;color:#fff}.functionalUnit .el-button img[data-v-b9d9a180]{width:.08333rem;height:.08333rem;margin-right:.04167rem}.functionalUnit .el-button[data-v-b9d9a180]:nth-child(1){background-color:#2192ba}.functionalUnit .el-button[data-v-b9d9a180]:nth-child(2){background-color:#17c85f}.TabularTitle[data-v-b9d9a180]{font-size:.07292rem;color:#747272;font-weight:700;margin-bottom:.05208rem}.pagination[data-v-b9d9a180]{width:100%;height:.15625rem}.pagination[data-v-b9d9a180] .el-pagination{margin-top:.04688rem!important}.addSlip .el-button[data-v-b9d9a180]{border:none;background-color:#07a;margin-top:.04167rem;color:#fff}.addSlip[data-v-b9d9a180] .el-pagination{margin-top:.04167rem!important}.ml-3[data-v-b9d9a180]{margin-left:.10417rem}.upload-file-uploader[data-v-b9d9a180]{width:50%}.el-upload-list .el-upload-list__item[data-v-b9d9a180]{width:33%!important;float:left;margin-left:-2.00521rem;margin-top:.13021rem}.el-upload-list .el-upload-list__item[data-v-b9d9a180] .horizontal-list ul .el-upload-list__item{width:33%!important;float:left;margin-top:.13021rem}.el-upload-list .el-upload-list__item[data-v-b9d9a180] .el-link__inner{display:inline-flex;justify-content:center;align-items:center;width:1.04167rem}
|
|
@ -0,0 +1 @@
|
|||
.PageContent[data-v-7cf3458f]{width:100%;height:100%}.WebToolbar[data-v-7cf3458f]{width:100%;height:.375rem;background-color:#fff;padding:.10417rem;display:flex;justify-content:space-between}.WebToolbar[data-v-7cf3458f] .el-form-item__content{width:1.33333rem!important;height:.16667rem!important}.WebToolbar[data-v-7cf3458f] .el-input,.WebToolbar[data-v-7cf3458f] .el-select{width:1.33333rem!important}.WebToolbar[data-v-7cf3458f] .el-form-item__label{color:#666!important}.ButtonAssembly .el-button[data-v-7cf3458f]{width:.4375rem;height:.20833rem;border:none;font-weight:400;font-size:.07292rem;border-radius:.01042rem}.ButtonAssembly .el-button img[data-v-7cf3458f]{width:.08333rem;height:.08333rem;margin-right:.04167rem}.ButtonAssembly .el-button[data-v-7cf3458f]:nth-child(1){background-color:#007afc}.ButtonAssembly .el-button[data-v-7cf3458f]:nth-child(2){background-color:#f2f3f5}.Tabulation[data-v-7cf3458f]{width:100%;height:calc(100% - .375rem);background-color:#fff;margin-top:.07292rem;padding:.10417rem}.Tabulation .actionBar[data-v-7cf3458f]{display:flex;justify-content:space-between}.Tabulation .actionBar h1[data-v-7cf3458f]{font-weight:500;font-size:.10417rem;color:#1d2129;line-height:.14583rem;font-family:Microsoft YaHei,Microsoft YaHei}.Tabulation .Worktop .el-button[data-v-7cf3458f]{border:.00521rem solid #007afc;font-weight:400;font-size:.07292rem;color:#007afc}.Tabulation .Worktop .el-button[data-v-7cf3458f]:hover{background-color:transparent}.Tabulation .Worktop .BlueBack[data-v-7cf3458f]{background:#007afc;border-radius:.01042rem;font-weight:400;font-size:.07292rem;color:#fff;line-height:.11458rem}.Tabulation .Worktop .BlueBack img[data-v-7cf3458f]{width:.08333rem;height:.08333rem;margin-right:.04167rem}.Tabulation .Worktop .BlueBack[data-v-7cf3458f]:hover{background-color:#007afc}.Tabulation .Worktop .Delete[data-v-7cf3458f]{background:#f2f3f5;border-radius:.01042rem;font-weight:400;font-size:.07292rem;color:#1d2129;line-height:.11458rem;border:none}.Tabulation .Worktop .Delete img[data-v-7cf3458f]{width:.08333rem;height:.08333rem;margin-right:.04167rem}.Tabulation .Worktop .Delete[data-v-7cf3458f]:hover{background-color:#f2f3f5}.Tabulation .ExaminationForm[data-v-7cf3458f]{margin-top:.08333rem;background-color:#07a}.Tabulation .el-table tr[data-v-7cf3458f],.Tabulation .el-table td[data-v-7cf3458f]{height:.21354rem}.Tabulation[data-v-7cf3458f] th{background-color:#e5e6eb}.el-pagination[data-v-7cf3458f]{float:right;background-color:#fff!important;margin-top:.09375rem}[data-v-7cf3458f] .el-pager li.is-active{background-color:#b5d8f1!important;font-weight:400;color:#007afc!important}[data-v-7cf3458f] .el-table--enable-row-hover .el-table__body tr:hover>td{background-color:#b5d8f1!important}[data-v-7cf3458f] .el-select,[data-v-7cf3458f] .el-input{width:1.45833rem!important}.example[data-v-7cf3458f]{margin-left:.10417rem;color:red}.backInformation[data-v-7cf3458f] .el-input{width:1.45833rem!important;height:.625rem!important}.dialog-footer[data-v-7cf3458f]{width:100%;text-align:center}[data-v-7cf3458f] .el-textarea__inner{width:1.45833rem!important}.user-name[data-v-7cf3458f],.register[data-v-7cf3458f]{cursor:pointer}.functionalUnit[data-v-7cf3458f]{margin-left:.10417rem;display:flex}.functionalUnit .el-button[data-v-7cf3458f]{width:.4375rem;height:.20833rem;border:none;font-weight:400;font-size:.07292rem;border-radius:.01042rem;color:#fff}.functionalUnit .el-button img[data-v-7cf3458f]{width:.08333rem;height:.08333rem;margin-right:.04167rem}.functionalUnit .el-button[data-v-7cf3458f]:nth-child(1){background-color:#2192ba}.functionalUnit .el-button[data-v-7cf3458f]:nth-child(2){background-color:#17c85f}.TabularTitle[data-v-7cf3458f]{font-size:.07292rem;color:#747272;font-weight:700;margin-bottom:.05208rem}.pagination[data-v-7cf3458f]{width:100%;height:.15625rem}.pagination[data-v-7cf3458f] .el-pagination{margin-top:.04688rem!important}.addSlip .el-button[data-v-7cf3458f]{border:none;background-color:#07a;margin-top:.04167rem;color:#fff}.addSlip[data-v-7cf3458f] .el-pagination{margin-top:.04167rem!important}.ml-3[data-v-7cf3458f]{margin-left:.10417rem}.upload-file-uploader[data-v-7cf3458f]{width:50%}.el-upload-list .el-upload-list__item[data-v-7cf3458f]{width:33%!important;float:left;margin-left:-2.00521rem;margin-top:.13021rem}.el-upload-list .el-upload-list__item[data-v-7cf3458f] .horizontal-list ul .el-upload-list__item{width:33%!important;float:left;margin-top:.13021rem}.el-upload-list .el-upload-list__item[data-v-7cf3458f] .el-link__inner{display:inline-flex;justify-content:center;align-items:center;width:1.04167rem}
|
|
@ -0,0 +1 @@
|
|||
.tag-list .el-tag[data-v-34fc3834]{background:#4555521a;color:#455552;margin-right:.05208rem;cursor:pointer}.tag-list .el-tag.isActive[data-v-34fc3834]{background:#4555521a;color:#455552}.tag-list .el-tag.isActive[data-v-34fc3834] .el-icon{color:#455552}[data-v-34fc3834] .el-tag__close{color:#455552!important}[data-v-34fc3834] .el-tag__close:hover{background-color:transparent!important}.common-layout[data-v-867ac451]{width:100vw;height:100vh;overflow:hidden}.layout[data-v-867ac451]{width:100%;height:100%}.el-menu[data-v-867ac451]{border:none}.el-header[data-v-867ac451]{width:100%;height:.3125rem;background-color:#fff;padding:0}.ContainerConent[data-v-867ac451]{width:100%;height:calc(100% - .3125rem);background-color:#f6f9f8}.el-aside[data-v-867ac451]{width:1.04167rem;height:100%;background-color:#fff}.mainContent[data-v-867ac451]{width:100%;height:100%;display:block;padding:.08854rem .10417rem}.Tool[data-v-867ac451],.Tool .el-tabs[data-v-867ac451]{width:100%;height:.125rem}.Tool[data-v-867ac451] .el-tabs__header{border:none!important}.Tool[data-v-867ac451] .el-tabs__item{width:.45833rem;height:.125rem;background-color:#4555521a}.el-main[data-v-867ac451]{padding:0;height:calc(100% - .17708rem);width:100%;margin-top:.08333rem;overflow:hidden}.el-menu-item.is-active[data-v-867ac451]{color:#007afc;background:#ecf5ff}.iconfont[data-v-867ac451]{margin-right:.08333rem}.Administrator[data-v-867ac451]{float:right;height:100%;display:flex;align-items:center;justify-content:center;margin-right:.20833rem;cursor:pointer}[data-v-867ac451] .el-dropdown-link{border:none!important}[data-v-867ac451] .example-showcase .el-dropdown-link{cursor:pointer;color:var(--el-color-primary);display:flex;align-items:center}
|
|
@ -0,0 +1 @@
|
|||
import{_ as M,a as N}from"./reset-C9wGeSio.js";import{B as L,_ as q,v as G,a as v,r as m,o as W,b as d,c as f,d as y,e as t,f as e,w as l,g as I,F as $,n as j,t as A,H,i as R,I as U,p as J,j as K,z as O,E as C,q as Q}from"./index-B9cYO4uo.js";const X=s=>L("/api/GetLogList",s),Y=s=>L("/api/DeleteLog",s),u=s=>(J("data-v-0dbc9791"),s=s(),K(),s),Z={class:"PageContent"},ee={class:"WebToolbar"},te={class:"FormComponent"},ae={class:"ButtonAssembly"},oe=u(()=>t("img",{src:M,alt:""},null,-1)),ne=u(()=>t("span",null,"查询",-1)),le=u(()=>t("img",{src:N,alt:""},null,-1)),se=u(()=>t("span",null,"重置",-1)),ce={class:"Tabulation"},ie=u(()=>t("div",{class:"actionBar"},[t("h1",null,"日志列表"),t("div",{class:"Worktop"})],-1)),re={class:"ExaminationForm"},de={__name:"index",setup(s){G();const r=v({}),n=v({PageIndex:1,PageSize:10}),b=m(0),P=m([{label:"新增"},{label:"编辑"},{label:"删除"},{label:"登录"}]),h=m([]);function T(a){if(a!=-1)return(n.PageIndex-1)*n.PageSize+a+1}function z(){n.PageIndex=1,_()}function S(){r.PageIndex=1,r.PageSize=10,r.LogType="",_()}const B=a=>{n.PageSize=a,_()},k=a=>{n.PageIndex=a,_()};function _(){let a={PageIndex:n.PageIndex,PageSize:n.PageSize,LogType:r.LogType};X(a).then(o=>{o.code==0&&(h.value=o.data.data,b.value=o.data.total)}).catch(o=>{console.log(o)})}function w(a){let o={LogId:a.LogId};O.confirm("确定要删除吗?",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{Y(o).then(c=>{c.code==0?(C({message:"删除成功",type:"success"}),_()):C.error((c==null?void 0:c.data)||"删除失败")}).catch(c=>{console.log(c)})})}return W(()=>{_()}),(a,o)=>{const c=d("el-option"),D=d("el-select"),E=d("el-form-item"),F=d("el-form"),g=d("el-button"),p=d("el-table-column"),V=d("el-pagination");return f(),y("div",Z,[t("div",ee,[t("div",te,[e(F,{inline:!0,model:r,class:"demo-form-inline"},{default:l(()=>[e(E,{label:"通知类型"},{default:l(()=>[e(D,{modelValue:r.LogType,"onUpdate:modelValue":o[0]||(o[0]=i=>r.LogType=i),placeholder:"请选择通知类型",clearable:""},{default:l(()=>[(f(!0),y($,null,j(P.value,(i,x)=>(f(),Q(c,{label:i.label,value:i.label,key:x},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1},8,["model"])]),t("div",ae,[e(g,{style:{color:"#fff"},onClick:z},{default:l(()=>[oe,ne]),_:1}),e(g,{style:{color:"#1d2129"},onClick:S},{default:l(()=>[le,se]),_:1})])]),t("div",ce,[ie,t("div",re,[e(I(U),{ref:"multipleTableRef",data:h.value,style:{width:"100%"}},{default:l(()=>[e(p,{label:"序号",width:"80px",align:"center"},{default:l(i=>[t("span",null,A(T(i.$index)),1)]),_:1}),e(p,{property:"LogType",label:"通知类型",align:"center"}),e(p,{property:"CreateTime",label:"产生时间",align:"center"}),e(p,{property:"Content",label:"内容",align:"center"}),e(p,{property:"",label:"操作",align:"center"},{default:l(i=>[e(g,{size:"mini",type:"text",icon:I(H),onClick:x=>w(i.row)},{default:l(()=>[R("删除")]),_:2},1032,["icon","onClick"])]),_:1})]),_:1},8,["data"]),e(V,{"current-page":n.PageIndex,"page-size":n.PageSize,small:a.small,layout:"total, prev, pager, next",total:b.value,onSizeChange:B,onCurrentChange:k},null,8,["current-page","page-size","small","total"])])])])}}},ue=q(de,[["__scopeId","data-v-0dbc9791"]]);export{ue as default};
|
|
@ -0,0 +1 @@
|
|||
.PageContent[data-v-f1e92130]{width:100%;height:100%}.WebToolbar[data-v-f1e92130]{width:100%;height:.375rem;background-color:#fff;padding:.10417rem;display:flex;justify-content:space-between}.WebToolbar[data-v-f1e92130] .el-form-item__content{width:1.33333rem!important;height:.16667rem!important}.WebToolbar[data-v-f1e92130] .el-input,.WebToolbar[data-v-f1e92130] .el-select{width:1.33333rem!important}.WebToolbar[data-v-f1e92130] .el-form-item__label{color:#666!important}.ButtonAssembly .el-button[data-v-f1e92130]{width:.4375rem;height:.20833rem;border:none;font-weight:400;font-size:.07292rem;border-radius:.01042rem}.ButtonAssembly .el-button img[data-v-f1e92130]{width:.08333rem;height:.08333rem;margin-right:.04167rem}.ButtonAssembly .el-button[data-v-f1e92130]:nth-child(1){background-color:#007afc}.ButtonAssembly .el-button[data-v-f1e92130]:nth-child(2){background-color:#f2f3f5}.Tabulation[data-v-f1e92130]{width:100%;height:calc(100% - .375rem);background-color:#fff;margin-top:.07292rem;padding:.10417rem}.Tabulation .actionBar[data-v-f1e92130]{display:flex;justify-content:space-between}.Tabulation .actionBar h1[data-v-f1e92130]{font-weight:500;font-size:.10417rem;color:#1d2129;line-height:.14583rem;font-family:Microsoft YaHei,Microsoft YaHei}.Tabulation .Worktop .el-button[data-v-f1e92130]{border:.00521rem solid #007afc;font-weight:400;font-size:.07292rem;color:#007afc}.Tabulation .Worktop .el-button[data-v-f1e92130]:hover{background-color:transparent}.Tabulation .Worktop .BlueBack[data-v-f1e92130]{background:#007afc;border-radius:.01042rem;font-weight:400;font-size:.07292rem;color:#fff;line-height:.11458rem}.Tabulation .Worktop .BlueBack img[data-v-f1e92130]{width:.08333rem;height:.08333rem;margin-right:.04167rem}.Tabulation .Worktop .BlueBack[data-v-f1e92130]:hover{background-color:#007afc}.Tabulation .Worktop .Delete[data-v-f1e92130]{background:#f2f3f5;border-radius:.01042rem;font-weight:400;font-size:.07292rem;color:#1d2129;line-height:.11458rem;border:none}.Tabulation .Worktop .Delete img[data-v-f1e92130]{width:.08333rem;height:.08333rem;margin-right:.04167rem}.Tabulation .Worktop .Delete[data-v-f1e92130]:hover{background-color:#f2f3f5}.Tabulation .ExaminationForm[data-v-f1e92130]{margin-top:.08333rem;background-color:#07a}.Tabulation .el-table tr[data-v-f1e92130],.Tabulation .el-table td[data-v-f1e92130]{height:.21354rem}.Tabulation[data-v-f1e92130] th{background-color:#e5e6eb}.el-pagination[data-v-f1e92130]{float:right;background-color:#fff!important;margin-top:.09375rem}[data-v-f1e92130] .el-pager li.is-active{background-color:#b5d8f1!important;font-weight:400;color:#007afc!important}[data-v-f1e92130] .el-table--enable-row-hover .el-table__body tr:hover>td{background-color:#b5d8f1!important}[data-v-f1e92130] .el-select,[data-v-f1e92130] .el-input{width:1.45833rem!important}.example[data-v-f1e92130]{margin-left:.10417rem;color:red}.backInformation[data-v-f1e92130] .el-input{width:1.45833rem!important;height:.625rem!important}.dialog-footer[data-v-f1e92130]{width:100%;text-align:center}[data-v-f1e92130] .el-textarea__inner{width:1.45833rem!important}.user-name[data-v-f1e92130],.register[data-v-f1e92130]{cursor:pointer}.functionalUnit[data-v-f1e92130]{margin-left:.10417rem;display:flex}.functionalUnit .el-button[data-v-f1e92130]{width:.4375rem;height:.20833rem;border:none;font-weight:400;font-size:.07292rem;border-radius:.01042rem;color:#fff}.functionalUnit .el-button img[data-v-f1e92130]{width:.08333rem;height:.08333rem;margin-right:.04167rem}.functionalUnit .el-button[data-v-f1e92130]:nth-child(1){background-color:#2192ba}.functionalUnit .el-button[data-v-f1e92130]:nth-child(2){background-color:#17c85f}.TabularTitle[data-v-f1e92130]{font-size:.07292rem;color:#747272;font-weight:700;margin-bottom:.05208rem}.pagination[data-v-f1e92130]{width:100%;height:.15625rem}.pagination[data-v-f1e92130] .el-pagination{margin-top:.04688rem!important}.addSlip .el-button[data-v-f1e92130]{border:none;background-color:#07a;margin-top:.04167rem;color:#fff}.addSlip[data-v-f1e92130] .el-pagination{margin-top:.04167rem!important}.ml-3[data-v-f1e92130]{margin-left:.10417rem}.upload-file-uploader[data-v-f1e92130]{width:50%}.el-upload-list .el-upload-list__item[data-v-f1e92130]{width:33%!important;float:left;margin-left:-2.00521rem;margin-top:.13021rem}.el-upload-list .el-upload-list__item[data-v-f1e92130] .horizontal-list ul .el-upload-list__item{width:33%!important;float:left;margin-top:.13021rem}.el-upload-list .el-upload-list__item[data-v-f1e92130] .el-link__inner{display:inline-flex;justify-content:center;align-items:center;width:1.04167rem}
|
|
@ -0,0 +1 @@
|
|||
import{_ as E,r as _,a as f,o as V,u as x,b as d,c as S,d as b,e as l,f as r,w as p,g,h as k,l as B,i as C,p as P,j as M,E as F}from"./index-B9cYO4uo.js";import{a as L}from"./index-BPax3Sb9.js";import{J as Q}from"./JSEncrypt-D3I3x59l.js";import{G as z}from"./jurisdiction-C3q3siAR.js";const h=i=>(P("data-v-5ad117d8"),i=i(),M(),i),G={class:"loginPage"},K={class:"loginLayout"},T={class:"Login-content"},q=h(()=>l("div",{class:"loginTitle"},[l("p",null,"后台管理系统")],-1)),H={class:"loginInput"},J=h(()=>l("p",null,"欢迎登录",-1)),R={class:"login_from"},U={__name:"index",setup(i){const I=_("default"),w=_(),s=f({login_name:"",password:""}),u=_(null);V(()=>{u.value=new Q,u.value.setPublicKey("MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAmIZgs2im/ZaxPeQC1dvLGh8lBpmnknjpcjwk6G9zNVKHaVz/hKkcT+yquZjjcFD5Va8GpyrIBpA+EVSVN6pPwqqtmDNjiY9VTo3PPbhN5H43dyJDgm+h+/lAeoxe2r4NWveYNUNABp+nC0HWqc+cAt8EsjshpEbjI6mS9UubZoHrQWABw1Cm5PM4FaJreI1GduzUsfeFXC6TrsEEEjzWjjAUPh8XkCmlpyzXiCo+A3zbYRX2/Lu14jnsaQM6+y7KjdpH3pDEGpZyat3oFXX/KbSfnr4khUxy4jJH/lkqh6FcQWQbA43QVIgJ41ZSAGsjt2r0TicTYfRtI3HdCBcIVwIDAQAB")});const y=x(),N=async()=>{const c=u.value.encrypt(s.password);try{const o=await L({login_name:s.login_name,password:c});if(o.code===0){F({message:"登录成功",type:"success"}),localStorage.setItem("token",o.data.token),localStorage.setItem("ReviewerId",o.data.user_id),localStorage.setItem("Reviewer",o.data.real_name),localStorage.setItem("auth_data",o.data.auth_data);let t=[],e="",m=localStorage.getItem("auth_data").split(",");z().then(n=>{n.code==0&&(n.data.forEach((a,A)=>{m.forEach((j,X)=>{if(a.Id==j)return a.Name=="权限管理"?e="jurisdiction":a.Name=="排班表管理"?e="schedule":a.Name=="摄像头管理"?e="cameraManagement":a.Name=="预置位管理"?e="prePositionManagement":a.Name=="文本管理"?e="TrainingManage":a.Name=="人员管理"?e="personnelManagement":a.Name=="用户管理"?e="userManagement":a.Name=="日志管理"&&(e="journal"),t.push({path:e,meta:{sort:A,title:a.Name,icon:"icon-chengji"}})})}),localStorage.setItem("routerList",JSON.stringify(t)))}).catch(n=>{console.log(n)}),await y.push("/schedule"),location.reload()}else alert("密码错误")}catch{alert("请求失败")}},v=f({password:[{required:!0,trigger:"blur",message:"请输入密码"},{validator:(c,o,t)=>{if(o==="")t(new Error("请输入密码"));else{const e=o.length;e<5||e>20?t(new Error("密码长度为5-20")):t()}},trigger:"blur"}]});return(c,o)=>{const t=d("el-input"),e=d("el-form-item"),m=d("el-button"),n=d("el-form");return S(),b("div",G,[l("div",K,[l("div",T,[q,l("div",H,[J,l("div",R,[r(n,{ref_key:"ruleFormRef",ref:w,style:{"max-width":"600px"},model:s,rules:v,"label-width":"auto",class:"demo-ruleForm",size:I.value,"status-icon":""},{default:p(()=>[r(e,{label:"",prop:"login_name"},{default:p(()=>[r(t,{modelValue:s.login_name,"onUpdate:modelValue":o[0]||(o[0]=a=>s.login_name=a),placeholder:"请输入账号","prefix-icon":g(k)},null,8,["modelValue","prefix-icon"])]),_:1}),r(e,{label:"",prop:"password"},{default:p(()=>[r(t,{type:"password",modelValue:s.password,"onUpdate:modelValue":o[1]||(o[1]=a=>s.password=a),placeholder:"请输入密码","prefix-icon":g(B)},null,8,["modelValue","prefix-icon"])]),_:1}),r(m,{onClick:N},{default:p(()=>[C("登录")]),_:1})]),_:1},8,["model","rules","size"])])])])])])}}},$=E(U,[["__scopeId","data-v-5ad117d8"]]);export{$ as default};
|
|
@ -0,0 +1 @@
|
|||
import{B as t,A as o}from"./index-B9cYO4uo.js";const a=e=>o("/api/AddRole",e),r=e=>t("/api/GetRoleList",e),l=e=>t("/api/GetAuth",e),i=e=>t("/api/DeleteRole",e),n=e=>t("/api/GetRoleDetails",e),R=e=>o("/api/EditRole",e);export{a as A,i as D,R as E,l as G,r as a,n as b};
|
After Width: | Height: | Size: 8.5 KiB |
After Width: | Height: | Size: 5.8 KiB |
After Width: | Height: | Size: 4.1 KiB |
After Width: | Height: | Size: 7.4 KiB |
|
@ -0,0 +1 @@
|
|||
const A="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAU1JREFUOE+lk7ErhWEUh59fGRUjdcuiGAhloJgpC3+BgZvFIgMDuXczGpTFH6AYDIRSBgsbk8VA7mA0GGw/ndt7b6/runfw1jd8ne8855zvOa/451Fjvu0eYBEYBbqBF+BU0lWzWj8AtleAPeALuAY+gSFgHLgEipIqOagOsL0EHAK7QFlSQKrH9ghwkl7HJAW4eqqA1PYTsC9pu1mrtvuAO+BI0lojYB3YAnrzyk3+z6/vah0cAx2SFlpJsT0IRKcxxkM+wgVQkVRsAygAb8CEpPsccBDaJE22AcwBZ2nU9xwwkzQF5PEviO0YtZAXyjXeRhCYbnSdTG0kxbP5UuWASL4BOtMynQMfwACwCsynzkqSyj80ZgsTyTvAclrjWij8h+YpoBRPDfLrLqR2O4BQ1gW85iPZjgKbwLCk56aAdhfUdn8k1y20S2gV/wZp+3oRp2AgowAAAABJRU5ErkJggg==",g="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAXtJREFUOE+tkz9IQlEUxr9z35OkSYm3BY05NBYtDa94QlPoywcOruFQ0OLe2tBQQ0OQQ+Cmvmdb8DQcAoNWB9dmCYWWwLwn7gPFv4TZ3e7lnN+93/edS1hy0ZL9mAKYphkOGZEsQ6TBHAORDqBJkgu9j04exmpE55Xdasl7VJePAQ5se0PTuMKgGDEKkuSrKhJMJoA0CC2A7wFx7RfdoHcIME1TDxnRNzCF+xKHz677Pipv3zna1KE9gbGuXjUFiB8nT1nQlewjNtmsQJZjexQ0Y1vtpwCWYzeIuemXvJNZxirA6Hm16CbHJFiO/cmSz2pl72GRZIYeWKlkh4lztWIl/zdAIAFNv+TOlDCAWqnEBRG6frFyMyYh7iTOGeJynomqWMUsNLRIcs4ve7eTMYZDRrQxL8ZgRgSeQPzda3d26vX61y+DxAXJeIEGCEl7TMgQuNXvU2I05lmjrIfWolkWlAGwBUAHo0kkC712925w88CT//9Mi0Soan8AUdCfEQAHklMAAAAASUVORK5CYII=";export{A as _,g as a};
|
After Width: | Height: | Size: 44 KiB |
After Width: | Height: | Size: 192 KiB |
|
@ -0,0 +1,72 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
|
||||
<body>
|
||||
|
||||
<video id="pre" width="100%" height="100%" controls="controls" autoplay="autoplay">
|
||||
<source src="" type="video/mp4">
|
||||
Your browser does not support the video tag.
|
||||
</video>
|
||||
|
||||
<script type="text/javascript">
|
||||
// import md5 from 'js-md5'
|
||||
// APPKEY = "f8db0c75";
|
||||
// SECRET = "41455e9d614643569a53bd338d095062";
|
||||
// OPENAPI_IP_PORT_HTTP = "http://127.0.0.1:80";
|
||||
// ITF_ADDRESS_GET_DEFAULT_USER_UUID = "/openapi/service/base/user/getDefaultUserUuid";
|
||||
// ITF_ADDRESS_GET_CAMERAS = "/openapi/service/vss/res/getCameras";
|
||||
|
||||
|
||||
var para = getParams(window.location.href);
|
||||
console.log(para["CameraUuid"])
|
||||
document.getElementById("pre").src="http://10.20.146.131:6713/mag/hls/"+para["CameraUuid"]+"/0/live.m3u8";
|
||||
// var data1 = testGetDefaultUserUUID();
|
||||
// var data2 = testGetCameras();
|
||||
|
||||
|
||||
|
||||
|
||||
// function testGetDefaultUserUUID() {
|
||||
// url = OPENAPI_IP_PORT_HTTP + ITF_ADDRESS_GET_DEFAULT_USER_UUID;
|
||||
// data = { "appkey": APPKEY, "time": Date.now() };
|
||||
// str = JSON.stringify(data);
|
||||
// callurl = url + "?token=" + md5(url + str + SECRET);
|
||||
|
||||
// $.ajax({ /* url 地址可以是 /get-json/ 的方式 * 也可以是 http://www.qfedu.com/get-json/ 的方式 */
|
||||
// url: callurl,
|
||||
// type: 'POST',
|
||||
// async: false,
|
||||
// dataType: 'json',
|
||||
// data: str,
|
||||
// success: function (res) {
|
||||
// // 成功处理逻辑
|
||||
// console.log(res)
|
||||
// }, error: function (res) {
|
||||
// // 错误时处理逻辑
|
||||
// console.log(res)
|
||||
// }
|
||||
// });
|
||||
|
||||
// }
|
||||
|
||||
|
||||
// function testGetCameras() {
|
||||
// url = OPENAPI_IP_PORT_HTTP + ITF_ADDRESS_GET_CAMERAS;
|
||||
// data = { "appkey": APPKEY, "time": Date.now() ,"pageNo": 1,"pageSize":1000};
|
||||
// }
|
||||
|
||||
|
||||
function getParams(url) {
|
||||
const regex = /[?&]([^=#]+)=([^&#]*)/g;
|
||||
const params = {};
|
||||
let match;
|
||||
while (match = regex.exec(url)) {
|
||||
params[decodeURIComponent(match[1])] = decodeURIComponent(match[2]);
|
||||
}
|
||||
return params;
|
||||
}
|
||||
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
|
@ -0,0 +1,517 @@
|
|||
<!doctype html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title></title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta http-equiv="Pragma" content="no-cache" />
|
||||
<meta http-equiv="Cache-Control" content="no-cache, must-revalidate" />
|
||||
<meta http-equiv="Expires" content="0" />
|
||||
<script>
|
||||
document.write("<link type='text/css' href='../demo.css?version=" + new Date().getTime() + "' rel='stylesheet' />");
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body style="
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
">
|
||||
<div class="left">
|
||||
<div id="divPlugin" class="plugin"></div>
|
||||
<fieldset class="login">
|
||||
<legend>登录</legend>
|
||||
<table cellpadding="0" cellspacing="3" border="0">
|
||||
<tr>
|
||||
<td class="tt">IP地址</td>
|
||||
<td><input id="loginip" type="text" class="txt" /></td>
|
||||
<td class="tt">端口号</td>
|
||||
<td><input id="port" type="text" class="txt" value="80" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tt">用户名</td>
|
||||
<td><input id="username" type="text" class="txt" /></td>
|
||||
<td class="tt">密码</td>
|
||||
<td><input id="password" type="password" class="txt" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tt">设备端口</td>
|
||||
<td colspan="2"><input id="deviceport" type="text" class="txt" />(可选参数)</td>
|
||||
<td>
|
||||
窗口分割数
|
||||
<select class="sel2" onchange="changeWndNum(this.value);">
|
||||
<option value="1" selected>1x1</option>
|
||||
<option value="2">2x2</option>
|
||||
<option value="3">3x3</option>
|
||||
<option value="4">4x4</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tt">RTSP端口</td>
|
||||
<td colspan="3"><input id="rtspport" type="text" class="txt" />(可选参数)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="4">
|
||||
<input type="button" class="btn" value="登录" onclick="clickLogin();" />
|
||||
<input type="button" class="btn" value="退出" onclick="clickLogout();" />
|
||||
<input type="button" class="btn2" value="获取基本信息" onclick="clickGetDeviceInfo();" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tt">已登录设备</td>
|
||||
<td>
|
||||
<select id="ip" class="sel" onchange="getChannelInfo();getDevicePort();"></select>
|
||||
</td>
|
||||
<td class="tt">通道列表</td>
|
||||
<td>
|
||||
<select id="channels" class="sel"></select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<!-- <input type="button" class="btn2" value="开始取流" onclick="clickGetStream();" /> -->
|
||||
<input type="button" class="btn2" value="开始预览" onclick="clickStartRealPlay();" />
|
||||
</td>
|
||||
<td>
|
||||
<input type="button" class="btn2" value="停止预览" onclick="clickStopRealPlay();" />
|
||||
</td>
|
||||
<td>
|
||||
<input type="button" class="btn2" value="设置文本叠加" onclick="setTextOverlay();" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
<fieldset class="ipchannel">
|
||||
<legend>数字通道</legend>
|
||||
<table width="100%" cellpadding="0" cellspacing="3" border="0">
|
||||
<tr>
|
||||
<td><input type="button" class="btn" value="获取数字通道列表" onclick="clickGetDigitalChannelInfo();" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<div class="digitaltdiv">
|
||||
<table id="digitalchannellist" class="digitalchannellist" cellpadding="0" cellspacing="0"
|
||||
border="0"></table>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
<fieldset class="localconfig">
|
||||
<legend>本地配置</legend>
|
||||
<table cellpadding="0" cellspacing="3" border="0">
|
||||
<tr>
|
||||
<td class="tt">播放性能</td>
|
||||
<td>
|
||||
<select id="netsPreach" name="netsPreach" class="sel">
|
||||
<option value="0">最短延时</option>
|
||||
<option value="1">实时性好</option>
|
||||
<option value="2">均衡</option>
|
||||
<option value="3">流畅性好</option>
|
||||
</select>
|
||||
</td>
|
||||
<td class="tt">图像尺寸</td>
|
||||
<td>
|
||||
<select id="wndSize" name="wndSize" class="sel">
|
||||
<option value="0">充满</option>
|
||||
<option value="1">4:3</option>
|
||||
<option value="2">16:9</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tt">规则信息</td>
|
||||
<td>
|
||||
<select id="rulesInfo" name="rulesInfo" class="sel">
|
||||
<option value="1">启用</option>
|
||||
<option value="0">禁用</option>
|
||||
</select>
|
||||
</td>
|
||||
<td class="tt">抓图文件格式</td>
|
||||
<td>
|
||||
<select id="captureFileFormat" name="captureFileFormat" class="sel">
|
||||
<option value="0">JPEG</option>
|
||||
<option value="1">BMP</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tt">录像文件打包大小</td>
|
||||
<td>
|
||||
<select id="packSize" name="packSize" class="sel">
|
||||
<option value="0">256M</option>
|
||||
<option value="1">512M</option>
|
||||
<option value="2">1G</option>
|
||||
</select>
|
||||
</td>
|
||||
<td class="tt">协议类型</td>
|
||||
<td>
|
||||
<select id="protocolType" name="protocolType" class="sel">
|
||||
<option value="0">TCP</option>
|
||||
<option value="2">UDP</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tt">录像文件保存路径</td>
|
||||
<td colspan="3"><input id="recordPath" type="text" class="txt" /> <input type="button"
|
||||
class="btn" value="浏览" onclick="clickOpenFileDlg('recordPath', 0);" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tt">回放下载保存路径</td>
|
||||
<td colspan="3"><input id="downloadPath" type="text" class="txt" /> <input type="button"
|
||||
class="btn" value="浏览" onclick="clickOpenFileDlg('downloadPath', 0);" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tt">预览抓图保存路径</td>
|
||||
<td colspan="3"><input id="previewPicPath" type="text" class="txt" /> <input type="button"
|
||||
class="btn" value="浏览" onclick="clickOpenFileDlg('previewPicPath', 0);" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tt">回放抓图保存路径</td>
|
||||
<td colspan="3"><input id="playbackPicPath" type="text" class="txt" /> <input type="button"
|
||||
class="btn" value="浏览" onclick="clickOpenFileDlg('playbackPicPath', 0);" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tt">回放剪辑保存路径</td>
|
||||
<td colspan="3"><input id="playbackFilePath" type="text" class="txt" /> <input type="button"
|
||||
class="btn" value="浏览" onclick="clickOpenFileDlg('playbackFilePath', 0);" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tt">设备抓图保存路径</td>
|
||||
<td colspan="3"><input id="devicePicPath" type="text" class="txt" /> <input type="button"
|
||||
class="btn" value="浏览" onclick="clickOpenFileDlg('devicePicPath', 0);" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="4"><input type="button" class="btn" value="获取"
|
||||
onclick="clickGetLocalCfg();" /> <input type="button" class="btn" value="设置"
|
||||
onclick="clickSetLocalCfg();" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
</div>
|
||||
<!-- <div class="left">
|
||||
<fieldset class="preview">
|
||||
<legend>预览</legend>
|
||||
<table cellpadding="0" cellspacing="3" border="0">
|
||||
<tr>
|
||||
<td class="tt">码流类型</td>
|
||||
<td>
|
||||
<select id="streamtype" class="sel">
|
||||
<option value="1">主码流</option>
|
||||
<option value="2">子码流</option>
|
||||
<option value="3">第三码流</option>
|
||||
<option value="4">转码码流</option>
|
||||
</select>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tt">音量</td>
|
||||
<td>
|
||||
<input type="text" id="volume" class="txt" value="50" maxlength="3" /> <input type="button" class="btn" value="设置" onclick="clickSetVolume();" />(范围:0~100)
|
||||
</td>
|
||||
<td>
|
||||
<input type="button" class="btn" value="打开声音" onclick="clickOpenSound();" />
|
||||
<input type="button" class="btn" value="关闭声音" onclick="clickCloseSound();" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tt">对讲通道</td>
|
||||
<td>
|
||||
<select id="audiochannels" class="sel">
|
||||
|
||||
</select>
|
||||
<input type="button" class="btn" value="获取通道" onclick="clickGetAudioInfo();" />
|
||||
</td>
|
||||
<td>
|
||||
<input type="button" class="btn" value="开始对讲" onclick="clickStartVoiceTalk();" />
|
||||
<input type="button" class="btn" value="停止对讲" onclick="clickStopVoiceTalk();" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3">
|
||||
<input type="button" class="btn" value="抓图" onclick="clickCapturePic();" />
|
||||
<input type="button" class="btn" value="抓图上传" onclick="clickCapturePicData();" />
|
||||
<input type="button" class="btn" value="开始录像" onclick="clickStartRecord('realplay');" />
|
||||
<input type="button" class="btn" value="停止录像" onclick="clickStopRecord('realplay');" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3">
|
||||
<input type="button" class="btn2" value="启用电子放大" onclick="clickEnableEZoom();" />
|
||||
<input type="button" class="btn2" value="禁用电子放大" onclick="clickDisableEZoom();" />
|
||||
<input type="button" class="btn2" value="启用3D放大" onclick="clickEnable3DZoom();" />
|
||||
<input type="button" class="btn2" value="禁用3D放大" onclick="clickDisable3DZoom();" />
|
||||
<input id="fullbtn" type="button" class="btn" value="全屏" onclick="clickFullScreen();" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3">
|
||||
分辨率:<input id="resolutionWidth" type="text" class="txt" /> x <input id="resolutionHeight" type="text" class="txt" />
|
||||
<input type="button" class="btn" value="设备抓图" onclick="clickDeviceCapturePic();" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
<fieldset class="draw">
|
||||
<legend>绘图</legend>
|
||||
<table cellpadding="0" cellspacing="3" border="0">
|
||||
<tr>
|
||||
<td>
|
||||
<input type="button" class="btn" value="启用绘制" onclick="clickEnableDraw();" />
|
||||
<input type="button" class="btn" value="禁用绘制" onclick="clickDisableDraw();" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
图形ID:<input id="snapId" type="text" class="txt" />
|
||||
名称:<input id="snapName" type="text" class="txt" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="button" class="btn" value="添加图形" onclick="clickAddSnapPolygon()" />
|
||||
<input type="button" class="btn" value="删除图形" onclick="clickDelSnapPolygon()" />
|
||||
<input type="button" class="btn" value="编辑图形" onclick="clickEditSnapPolygon()" />
|
||||
<input type="button" class="btn" value="停止编辑" onclick="clickStopSnapPolygon()" />
|
||||
<input type="button" class="btn" value="获取图形" onclick="clickGetSnapPolygon()" />
|
||||
<input type="button" class="btn" value="设置图形" onclick="clickSetSnapPolygon()" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="button" class="btn" value="清空图形" onclick="clickDelAllSnapPolygon()" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
<fieldset class="ptz">
|
||||
<legend>云台控制</legend>
|
||||
<table cellpadding="0" cellspacing="3" border="0" class="left">
|
||||
<tr>
|
||||
<td>
|
||||
<input type="button" class="btn" value="左上" onmousedown="mouseDownPTZControl(5);" onmouseup="mouseUpPTZControl();" />
|
||||
<input type="button" class="btn" value="上" onmousedown="mouseDownPTZControl(1);" onmouseup="mouseUpPTZControl();" />
|
||||
<input type="button" class="btn" value="右上" onmousedown="mouseDownPTZControl(7);" onmouseup="mouseUpPTZControl();" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="button" class="btn" value="左" onmousedown="mouseDownPTZControl(3);" onmouseup="mouseUpPTZControl();" />
|
||||
<input type="button" class="btn" value="自动" onclick="mouseDownPTZControl(9);" />
|
||||
<input type="button" class="btn" value="右" onmousedown="mouseDownPTZControl(4);" onmouseup="mouseUpPTZControl();" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="button" class="btn" value="左下" onmousedown="mouseDownPTZControl(6);" onmouseup="mouseUpPTZControl();" />
|
||||
<input type="button" class="btn" value="下" onmousedown="mouseDownPTZControl(2);" onmouseup="mouseUpPTZControl();" />
|
||||
<input type="button" class="btn" value="右下" onmousedown="mouseDownPTZControl(8);" onmouseup="mouseUpPTZControl();" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table cellpadding="0" cellspacing="3" border="0" class="left">
|
||||
<tr>
|
||||
<td class="tt">云台速度</td>
|
||||
<td>
|
||||
<select id="ptzspeed" class="sel">
|
||||
<option value="1">1</option>
|
||||
<option value="2">2</option>
|
||||
<option value="3">3</option>
|
||||
<option value="4" selected>4</option>
|
||||
<option value="5">5</option>
|
||||
<option value="6">6</option>
|
||||
<option value="7">7</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tt">预置点号</td>
|
||||
<td><input id="preset" type="text" class="txt" value="1" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<input type="button" class="btn" value="设置" onclick="clickSetPreset();" />
|
||||
<input type="button" class="btn" value="调用" onclick="clickGoPreset();" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table cellpadding="0" cellspacing="3" border="0" class="left">
|
||||
<tr>
|
||||
<td class="tt"><input type="button" class="btn2" value="变倍+" onmousedown="PTZZoomIn()" onmouseup="PTZZoomStop()"></td>
|
||||
<td><input type="button" class="btn2" value="变倍-" onmousedown="PTZZoomout()" onmouseup="PTZZoomStop()"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tt"><input type="button" class="btn2" value="变焦+" onmousedown="PTZFocusIn()" onmouseup="PTZFoucusStop()"></td>
|
||||
<td><input type="button" class="btn2" value="变焦-" onmousedown="PTZFoucusOut()" onmouseup="PTZFoucusStop()"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tt"><input type="button" class="btn2" value="光圈+" onmousedown="PTZIrisIn()" onmouseup="PTZIrisStop()"></td>
|
||||
<td><input type="button" class="btn2" value="光圈-" onmousedown="PTZIrisOut()" onmouseup="PTZIrisStop()"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
<fieldset class="playback">
|
||||
<legend>回放</legend>
|
||||
<table width="100%" cellpadding="0" cellspacing="3" border="0">
|
||||
<tr>
|
||||
<td class="tt">码流类型</td>
|
||||
<td>
|
||||
<select id="record_streamtype" class="sel">
|
||||
<option value="1">主码流</option>
|
||||
<option value="2">子码流</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tt">开始时间</td>
|
||||
<td>
|
||||
<input id="starttime" type="text" class="txt" value="2013-12-10 00:00:00" />(时间格式:2013-11-11 12:34:56)
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tt">结束时间</td>
|
||||
<td>
|
||||
<input id="endtime" type="text" class="txt" value="2013-12-11 23:59:59" />
|
||||
<input type="button" class="btn" value="搜索" onclick="clickRecordSearch(0);" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tt">按时间下载开始时间</td>
|
||||
<td>
|
||||
<input id="downloadstarttime" type="text" class="txt" value="2013-12-10 00:00:00" />(时间格式:2013-11-11 12:34:56)
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tt">按时间下载结束时间</td>
|
||||
<td>
|
||||
<input id="downloadendtime" type="text" class="txt" value="2013-12-11 23:59:59" />
|
||||
<input type="button" class="btn" value="下载" onclick="clickStartDownloadRecordByTime();" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<div id="searchdiv" class="searchdiv">
|
||||
<table id="searchlist" class="searchlist" cellpadding="0" cellspacing="0" border="0"></table>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<input type="button" class="btn2" value="开始回放" onclick="clickStartPlayback();" />
|
||||
<input type="button" class="btn2" value="停止回放" onclick="clickStopPlayback();" />
|
||||
<input id="btnReverse" type="button" class="btn" value="倒放" onclick="clickReversePlayback();" />
|
||||
<input type="button" class="btn" value="单帧" onclick="clickFrame();" />
|
||||
<input id="transstream" type="checkbox" class="vtop" /> 启用转码码流
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<input type="button" class="btn" value="暂停" onclick="clickPause();" />
|
||||
<input type="button" class="btn" value="恢复" onclick="clickResume();" />
|
||||
<input type="button" class="btn" value="慢放" onclick="clickPlaySlow();" />
|
||||
<input type="button" class="btn" value="快放" onclick="clickPlayFast();" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<input type="button" class="btn" value="抓图" onclick="clickCapturePic();" />
|
||||
<input type="button" class="btn2" value="开始剪辑" onclick="clickStartRecord('playback');" />
|
||||
<input type="button" class="btn2" value="停止剪辑" onclick="clickStopRecord('playback');" />
|
||||
<input type="button" class="btn2" value="OSD时间" onclick="clickGetOSDTime();" /> <input id="osdtime" type="text" class="txt" readonly />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
<fieldset class="maintain">
|
||||
<legend>系统维护</legend>
|
||||
<table width="100%" cellpadding="0" cellspacing="3" border="0">
|
||||
<tr>
|
||||
<td>
|
||||
<input id="edfpassword" type="password">
|
||||
<input type="button" class="btn2" value="导出配置文件" onclick="clickExportDeviceConfig();" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="button" id="checkVersion" class="btn2" value="检查插件版本" onclick="clickCheckPluginVersion();" />
|
||||
<input type="button" id="remoteconfig" class="btn2" value="远程配置库" onclick="clickRemoteConfig();" />
|
||||
<input type="button" class="btn2" value="恢复默认参数" onclick="clickRestoreDefault();" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input id="configFile" type="text" class="txt" /> <input type="button" class="btn" value="浏览" onclick="clickOpenFileDlg('configFile', 1);" /> <input type="button" class="btn2" value="导入配置文件" onclick="clickImportDeviceConfig();" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input id="upgradeFile" type="text" class="txt" /> <input type="button" class="btn" value="浏览" onclick="clickOpenFileDlg('upgradeFile', 1);" /> <input type="button" class="btn2" value="升级" onclick="clickStartUpgrade();" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
<fieldset class="ipparse">
|
||||
<legend>设备IP解析</legend>
|
||||
<table cellpadding="0" cellspacing="3" border="0">
|
||||
<tr>
|
||||
<td class="tt">模式</td>
|
||||
<td colspan="3">
|
||||
<select id="devicemode" class="sel" onchange="changeIPMode(this.value);">
|
||||
<option value="1">IPServer</option>
|
||||
<option value="2">HiDDNS</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tt">服务器地址</td>
|
||||
<td><input id="serveraddress" type="text" class="txt" value="" /></td>
|
||||
<td class="tt">端口号</td>
|
||||
<td><input id="serverport" type="text" class="txt" value="7071" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tt">设备标识</td>
|
||||
<td><input id="deviceid" type="text" class="txt" value="" /></td>
|
||||
<td class="tt"> </td>
|
||||
<td><input type="button" class="btn" value="获取设备IP" onclick="clickGetDeviceIP();" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
</div>
|
||||
<div class="left">
|
||||
<fieldset class="operate">
|
||||
<legend>操作信息</legend>
|
||||
<div id="opinfo" class="opinfo"></div>
|
||||
</fieldset>
|
||||
<fieldset class="callback">
|
||||
<legend>事件回调信息</legend>
|
||||
<div id="cbinfo" class="cbinfo"></div>
|
||||
</fieldset>
|
||||
</div> -->
|
||||
</body>
|
||||
<script src="../jquery-1.7.1.min.js"></script>
|
||||
<script src="../codebase/encryption/AES.js"></script>
|
||||
<script src="../codebase/encryption/cryptico.min.js"></script>
|
||||
<!-- <script src="../codebase/encryption/encryption.js"></script> -->
|
||||
<script src="../codebase/encryption/crypto-3.1.2.min.js"></script>
|
||||
<script id="videonode" src="../codebase/webVideoCtrl.js"></script>
|
||||
<script src="demo.js"></script>
|
||||
<script>
|
||||
function playVideo(device,drvData) {
|
||||
console.log(device,'deviceId',drvData);
|
||||
clickLogin(device.CameraChannel, drvData)
|
||||
}
|
||||
|
||||
function clickStartPlaybackList(deviceId, startTime, endTime) {
|
||||
//deviceId 通道号 2013-12-10 00:00:00 2013-12-10 00:00:00
|
||||
$("#channels").val(deviceId)
|
||||
$("#starttime").val(startTime)
|
||||
$("#endtime").val(endTime)
|
||||
clickLogin(parseInt(deviceId), 'playback')
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
</html>
|
|
@ -0,0 +1,106 @@
|
|||
var dbits,canary=244837814094590,j_lm=(canary&16777215)==15715070;function BigInteger(a,b,c){a!=null&&("number"==typeof a?this.fromNumber(a,b,c):b==null&&"string"!=typeof a?this.fromString(a,256):this.fromString(a,b))}function nbi(){return new BigInteger(null)}function am1(a,b,c,d,e,g){for(;--g>=0;){var h=b*this[a++]+c[d]+e,e=Math.floor(h/67108864);c[d++]=h&67108863}return e}
|
||||
function am2(a,b,c,d,e,g){var h=b&32767;for(b>>=15;--g>=0;){var f=this[a]&32767,o=this[a++]>>15,p=b*f+o*h,f=h*f+((p&32767)<<15)+c[d]+(e&1073741823),e=(f>>>30)+(p>>>15)+b*o+(e>>>30);c[d++]=f&1073741823}return e}function am3(a,b,c,d,e,g){var h=b&16383;for(b>>=14;--g>=0;){var f=this[a]&16383,o=this[a++]>>14,p=b*f+o*h,f=h*f+((p&16383)<<14)+c[d]+e,e=(f>>28)+(p>>14)+b*o;c[d++]=f&268435455}return e}
|
||||
j_lm&&navigator.appName=="Microsoft Internet Explorer"?(BigInteger.prototype.am=am2,dbits=30):j_lm&&navigator.appName!="Netscape"?(BigInteger.prototype.am=am1,dbits=26):(BigInteger.prototype.am=am3,dbits=28);BigInteger.prototype.DB=dbits;BigInteger.prototype.DM=(1<<dbits)-1;BigInteger.prototype.DV=1<<dbits;var BI_FP=52;BigInteger.prototype.FV=Math.pow(2,BI_FP);BigInteger.prototype.F1=BI_FP-dbits;BigInteger.prototype.F2=2*dbits-BI_FP;var BI_RM="0123456789abcdefghijklmnopqrstuvwxyz",BI_RC=[],rr,vv;
|
||||
rr="0".charCodeAt(0);for(vv=0;vv<=9;++vv)BI_RC[rr++]=vv;rr="a".charCodeAt(0);for(vv=10;vv<36;++vv)BI_RC[rr++]=vv;rr="A".charCodeAt(0);for(vv=10;vv<36;++vv)BI_RC[rr++]=vv;function int2char(a){return BI_RM.charAt(a)}function intAt(a,b){var c=BI_RC[a.charCodeAt(b)];return c==null?-1:c}function bnpCopyTo(a){for(var b=this.t-1;b>=0;--b)a[b]=this[b];a.t=this.t;a.s=this.s}function bnpFromInt(a){this.t=1;this.s=a<0?-1:0;a>0?this[0]=a:a<-1?this[0]=a+DV:this.t=0}
|
||||
function nbv(a){var b=nbi();b.fromInt(a);return b}
|
||||
function bnpFromString(a,b){var c;if(b==16)c=4;else if(b==8)c=3;else if(b==256)c=8;else if(b==2)c=1;else if(b==32)c=5;else if(b==4)c=2;else{this.fromRadix(a,b);return}this.s=this.t=0;for(var d=a.length,e=!1,g=0;--d>=0;){var h=c==8?a[d]&255:intAt(a,d);h<0?a.charAt(d)=="-"&&(e=!0):(e=!1,g==0?this[this.t++]=h:g+c>this.DB?(this[this.t-1]|=(h&(1<<this.DB-g)-1)<<g,this[this.t++]=h>>this.DB-g):this[this.t-1]|=h<<g,g+=c,g>=this.DB&&(g-=this.DB))}if(c==8&&(a[0]&128)!=0)this.s=-1,g>0&&(this[this.t-1]|=(1<<
|
||||
this.DB-g)-1<<g);this.clamp();e&&BigInteger.ZERO.subTo(this,this)}function bnpClamp(){for(var a=this.s&this.DM;this.t>0&&this[this.t-1]==a;)--this.t}
|
||||
function bnToString(a){if(this.s<0)return"-"+this.negate().toString(a);if(a==16)a=4;else if(a==8)a=3;else if(a==2)a=1;else if(a==32)a=5;else if(a==64)a=6;else if(a==4)a=2;else return this.toRadix(a);var b=(1<<a)-1,c,d=!1,e="",g=this.t,h=this.DB-g*this.DB%a;if(g-- >0){if(h<this.DB&&(c=this[g]>>h)>0)d=!0,e=int2char(c);for(;g>=0;)h<a?(c=(this[g]&(1<<h)-1)<<a-h,c|=this[--g]>>(h+=this.DB-a)):(c=this[g]>>(h-=a)&b,h<=0&&(h+=this.DB,--g)),c>0&&(d=!0),d&&(e+=int2char(c))}return d?e:"0"}
|
||||
function bnNegate(){var a=nbi();BigInteger.ZERO.subTo(this,a);return a}function bnAbs(){return this.s<0?this.negate():this}function bnCompareTo(a){var b=this.s-a.s;if(b!=0)return b;var c=this.t,b=c-a.t;if(b!=0)return b;for(;--c>=0;)if((b=this[c]-a[c])!=0)return b;return 0}function nbits(a){var b=1,c;if((c=a>>>16)!=0)a=c,b+=16;if((c=a>>8)!=0)a=c,b+=8;if((c=a>>4)!=0)a=c,b+=4;if((c=a>>2)!=0)a=c,b+=2;a>>1!=0&&(b+=1);return b}
|
||||
function bnBitLength(){return this.t<=0?0:this.DB*(this.t-1)+nbits(this[this.t-1]^this.s&this.DM)}function bnpDLShiftTo(a,b){var c;for(c=this.t-1;c>=0;--c)b[c+a]=this[c];for(c=a-1;c>=0;--c)b[c]=0;b.t=this.t+a;b.s=this.s}function bnpDRShiftTo(a,b){for(var c=a;c<this.t;++c)b[c-a]=this[c];b.t=Math.max(this.t-a,0);b.s=this.s}
|
||||
function bnpLShiftTo(a,b){var c=a%this.DB,d=this.DB-c,e=(1<<d)-1,g=Math.floor(a/this.DB),h=this.s<<c&this.DM,f;for(f=this.t-1;f>=0;--f)b[f+g+1]=this[f]>>d|h,h=(this[f]&e)<<c;for(f=g-1;f>=0;--f)b[f]=0;b[g]=h;b.t=this.t+g+1;b.s=this.s;b.clamp()}
|
||||
function bnpRShiftTo(a,b){b.s=this.s;var c=Math.floor(a/this.DB);if(c>=this.t)b.t=0;else{var d=a%this.DB,e=this.DB-d,g=(1<<d)-1;b[0]=this[c]>>d;for(var h=c+1;h<this.t;++h)b[h-c-1]|=(this[h]&g)<<e,b[h-c]=this[h]>>d;d>0&&(b[this.t-c-1]|=(this.s&g)<<e);b.t=this.t-c;b.clamp()}}
|
||||
function bnpSubTo(a,b){for(var c=0,d=0,e=Math.min(a.t,this.t);c<e;)d+=this[c]-a[c],b[c++]=d&this.DM,d>>=this.DB;if(a.t<this.t){for(d-=a.s;c<this.t;)d+=this[c],b[c++]=d&this.DM,d>>=this.DB;d+=this.s}else{for(d+=this.s;c<a.t;)d-=a[c],b[c++]=d&this.DM,d>>=this.DB;d-=a.s}b.s=d<0?-1:0;d<-1?b[c++]=this.DV+d:d>0&&(b[c++]=d);b.t=c;b.clamp()}
|
||||
function bnpMultiplyTo(a,b){var c=this.abs(),d=a.abs(),e=c.t;for(b.t=e+d.t;--e>=0;)b[e]=0;for(e=0;e<d.t;++e)b[e+c.t]=c.am(0,d[e],b,e,0,c.t);b.s=0;b.clamp();this.s!=a.s&&BigInteger.ZERO.subTo(b,b)}function bnpSquareTo(a){for(var b=this.abs(),c=a.t=2*b.t;--c>=0;)a[c]=0;for(c=0;c<b.t-1;++c){var d=b.am(c,b[c],a,2*c,0,1);if((a[c+b.t]+=b.am(c+1,2*b[c],a,2*c+1,d,b.t-c-1))>=b.DV)a[c+b.t]-=b.DV,a[c+b.t+1]=1}a.t>0&&(a[a.t-1]+=b.am(c,b[c],a,2*c,0,1));a.s=0;a.clamp()}
|
||||
function bnpDivRemTo(a,b,c){var d=a.abs();if(!(d.t<=0)){var e=this.abs();if(e.t<d.t)b!=null&&b.fromInt(0),c!=null&&this.copyTo(c);else{c==null&&(c=nbi());var g=nbi(),h=this.s,a=a.s,f=this.DB-nbits(d[d.t-1]);f>0?(d.lShiftTo(f,g),e.lShiftTo(f,c)):(d.copyTo(g),e.copyTo(c));d=g.t;e=g[d-1];if(e!=0){var o=e*(1<<this.F1)+(d>1?g[d-2]>>this.F2:0),p=this.FV/o,o=(1<<this.F1)/o,q=1<<this.F2,n=c.t,k=n-d,j=b==null?nbi():b;g.dlShiftTo(k,j);c.compareTo(j)>=0&&(c[c.t++]=1,c.subTo(j,c));BigInteger.ONE.dlShiftTo(d,
|
||||
j);for(j.subTo(g,g);g.t<d;)g[g.t++]=0;for(;--k>=0;){var l=c[--n]==e?this.DM:Math.floor(c[n]*p+(c[n-1]+q)*o);if((c[n]+=g.am(0,l,c,k,0,d))<l){g.dlShiftTo(k,j);for(c.subTo(j,c);c[n]<--l;)c.subTo(j,c)}}b!=null&&(c.drShiftTo(d,b),h!=a&&BigInteger.ZERO.subTo(b,b));c.t=d;c.clamp();f>0&&c.rShiftTo(f,c);h<0&&BigInteger.ZERO.subTo(c,c)}}}}function bnMod(a){var b=nbi();this.abs().divRemTo(a,null,b);this.s<0&&b.compareTo(BigInteger.ZERO)>0&&a.subTo(b,b);return b}function Classic(a){this.m=a}
|
||||
function cConvert(a){return a.s<0||a.compareTo(this.m)>=0?a.mod(this.m):a}function cRevert(a){return a}function cReduce(a){a.divRemTo(this.m,null,a)}function cMulTo(a,b,c){a.multiplyTo(b,c);this.reduce(c)}function cSqrTo(a,b){a.squareTo(b);this.reduce(b)}Classic.prototype.convert=cConvert;Classic.prototype.revert=cRevert;Classic.prototype.reduce=cReduce;Classic.prototype.mulTo=cMulTo;Classic.prototype.sqrTo=cSqrTo;
|
||||
function bnpInvDigit(){if(this.t<1)return 0;var a=this[0];if((a&1)==0)return 0;var b=a&3,b=b*(2-(a&15)*b)&15,b=b*(2-(a&255)*b)&255,b=b*(2-((a&65535)*b&65535))&65535,b=b*(2-a*b%this.DV)%this.DV;return b>0?this.DV-b:-b}function Montgomery(a){this.m=a;this.mp=a.invDigit();this.mpl=this.mp&32767;this.mph=this.mp>>15;this.um=(1<<a.DB-15)-1;this.mt2=2*a.t}
|
||||
function montConvert(a){var b=nbi();a.abs().dlShiftTo(this.m.t,b);b.divRemTo(this.m,null,b);a.s<0&&b.compareTo(BigInteger.ZERO)>0&&this.m.subTo(b,b);return b}function montRevert(a){var b=nbi();a.copyTo(b);this.reduce(b);return b}
|
||||
function montReduce(a){for(;a.t<=this.mt2;)a[a.t++]=0;for(var b=0;b<this.m.t;++b){var c=a[b]&32767,d=c*this.mpl+((c*this.mph+(a[b]>>15)*this.mpl&this.um)<<15)&a.DM,c=b+this.m.t;for(a[c]+=this.m.am(0,d,a,b,0,this.m.t);a[c]>=a.DV;)a[c]-=a.DV,a[++c]++}a.clamp();a.drShiftTo(this.m.t,a);a.compareTo(this.m)>=0&&a.subTo(this.m,a)}function montSqrTo(a,b){a.squareTo(b);this.reduce(b)}function montMulTo(a,b,c){a.multiplyTo(b,c);this.reduce(c)}Montgomery.prototype.convert=montConvert;
|
||||
Montgomery.prototype.revert=montRevert;Montgomery.prototype.reduce=montReduce;Montgomery.prototype.mulTo=montMulTo;Montgomery.prototype.sqrTo=montSqrTo;function bnpIsEven(){return(this.t>0?this[0]&1:this.s)==0}function bnpExp(a,b){if(a>4294967295||a<1)return BigInteger.ONE;var c=nbi(),d=nbi(),e=b.convert(this),g=nbits(a)-1;for(e.copyTo(c);--g>=0;)if(b.sqrTo(c,d),(a&1<<g)>0)b.mulTo(d,e,c);else var h=c,c=d,d=h;return b.revert(c)}
|
||||
function bnModPowInt(a,b){var c;c=a<256||b.isEven()?new Classic(b):new Montgomery(b);return this.exp(a,c)}BigInteger.prototype.copyTo=bnpCopyTo;BigInteger.prototype.fromInt=bnpFromInt;BigInteger.prototype.fromString=bnpFromString;BigInteger.prototype.clamp=bnpClamp;BigInteger.prototype.dlShiftTo=bnpDLShiftTo;BigInteger.prototype.drShiftTo=bnpDRShiftTo;BigInteger.prototype.lShiftTo=bnpLShiftTo;BigInteger.prototype.rShiftTo=bnpRShiftTo;BigInteger.prototype.subTo=bnpSubTo;
|
||||
BigInteger.prototype.multiplyTo=bnpMultiplyTo;BigInteger.prototype.squareTo=bnpSquareTo;BigInteger.prototype.divRemTo=bnpDivRemTo;BigInteger.prototype.invDigit=bnpInvDigit;BigInteger.prototype.isEven=bnpIsEven;BigInteger.prototype.exp=bnpExp;BigInteger.prototype.toString=bnToString;BigInteger.prototype.negate=bnNegate;BigInteger.prototype.abs=bnAbs;BigInteger.prototype.compareTo=bnCompareTo;BigInteger.prototype.bitLength=bnBitLength;BigInteger.prototype.mod=bnMod;BigInteger.prototype.modPowInt=bnModPowInt;
|
||||
BigInteger.ZERO=nbv(0);BigInteger.ONE=nbv(1);function bnClone(){var a=nbi();this.copyTo(a);return a}function bnIntValue(){if(this.s<0)if(this.t==1)return this[0]-this.DV;else{if(this.t==0)return-1}else if(this.t==1)return this[0];else if(this.t==0)return 0;return(this[1]&(1<<32-this.DB)-1)<<this.DB|this[0]}function bnByteValue(){return this.t==0?this.s:this[0]<<24>>24}function bnShortValue(){return this.t==0?this.s:this[0]<<16>>16}
|
||||
function bnpChunkSize(a){return Math.floor(Math.LN2*this.DB/Math.log(a))}function bnSigNum(){return this.s<0?-1:this.t<=0||this.t==1&&this[0]<=0?0:1}function bnpToRadix(a){a==null&&(a=10);if(this.signum()==0||a<2||a>36)return"0";var b=this.chunkSize(a),b=Math.pow(a,b),c=nbv(b),d=nbi(),e=nbi(),g="";for(this.divRemTo(c,d,e);d.signum()>0;)g=(b+e.intValue()).toString(a).substr(1)+g,d.divRemTo(c,d,e);return e.intValue().toString(a)+g}
|
||||
function bnpFromRadix(a,b){this.fromInt(0);b==null&&(b=10);for(var c=this.chunkSize(b),d=Math.pow(b,c),e=!1,g=0,h=0,f=0;f<a.length;++f){var o=intAt(a,f);o<0?a.charAt(f)=="-"&&this.signum()==0&&(e=!0):(h=b*h+o,++g>=c&&(this.dMultiply(d),this.dAddOffset(h,0),h=g=0))}g>0&&(this.dMultiply(Math.pow(b,g)),this.dAddOffset(h,0));e&&BigInteger.ZERO.subTo(this,this)}
|
||||
function bnpFromNumber(a,b,c){if("number"==typeof b)if(a<2)this.fromInt(1);else{this.fromNumber(a,c);this.testBit(a-1)||this.bitwiseTo(BigInteger.ONE.shiftLeft(a-1),op_or,this);for(this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(b);)this.dAddOffset(2,0),this.bitLength()>a&&this.subTo(BigInteger.ONE.shiftLeft(a-1),this)}else{var c=[],d=a&7;c.length=(a>>3)+1;b.nextBytes(c);d>0?c[0]&=(1<<d)-1:c[0]=0;this.fromString(c,256)}}
|
||||
function bnToByteArray(){var a=this.t,b=[];b[0]=this.s;var c=this.DB-a*this.DB%8,d,e=0;if(a-- >0){if(c<this.DB&&(d=this[a]>>c)!=(this.s&this.DM)>>c)b[e++]=d|this.s<<this.DB-c;for(;a>=0;)if(c<8?(d=(this[a]&(1<<c)-1)<<8-c,d|=this[--a]>>(c+=this.DB-8)):(d=this[a]>>(c-=8)&255,c<=0&&(c+=this.DB,--a)),(d&128)!=0&&(d|=-256),e==0&&(this.s&128)!=(d&128)&&++e,e>0||d!=this.s)b[e++]=d}return b}function bnEquals(a){return this.compareTo(a)==0}function bnMin(a){return this.compareTo(a)<0?this:a}
|
||||
function bnMax(a){return this.compareTo(a)>0?this:a}function bnpBitwiseTo(a,b,c){var d,e,g=Math.min(a.t,this.t);for(d=0;d<g;++d)c[d]=b(this[d],a[d]);if(a.t<this.t){e=a.s&this.DM;for(d=g;d<this.t;++d)c[d]=b(this[d],e);c.t=this.t}else{e=this.s&this.DM;for(d=g;d<a.t;++d)c[d]=b(e,a[d]);c.t=a.t}c.s=b(this.s,a.s);c.clamp()}function op_and(a,b){return a&b}function bnAnd(a){var b=nbi();this.bitwiseTo(a,op_and,b);return b}function op_or(a,b){return a|b}
|
||||
function bnOr(a){var b=nbi();this.bitwiseTo(a,op_or,b);return b}function op_xor(a,b){return a^b}function bnXor(a){var b=nbi();this.bitwiseTo(a,op_xor,b);return b}function op_andnot(a,b){return a&~b}function bnAndNot(a){var b=nbi();this.bitwiseTo(a,op_andnot,b);return b}function bnNot(){for(var a=nbi(),b=0;b<this.t;++b)a[b]=this.DM&~this[b];a.t=this.t;a.s=~this.s;return a}function bnShiftLeft(a){var b=nbi();a<0?this.rShiftTo(-a,b):this.lShiftTo(a,b);return b}
|
||||
function bnShiftRight(a){var b=nbi();a<0?this.lShiftTo(-a,b):this.rShiftTo(a,b);return b}function lbit(a){if(a==0)return-1;var b=0;(a&65535)==0&&(a>>=16,b+=16);(a&255)==0&&(a>>=8,b+=8);(a&15)==0&&(a>>=4,b+=4);(a&3)==0&&(a>>=2,b+=2);(a&1)==0&&++b;return b}function bnGetLowestSetBit(){for(var a=0;a<this.t;++a)if(this[a]!=0)return a*this.DB+lbit(this[a]);return this.s<0?this.t*this.DB:-1}function cbit(a){for(var b=0;a!=0;)a&=a-1,++b;return b}
|
||||
function bnBitCount(){for(var a=0,b=this.s&this.DM,c=0;c<this.t;++c)a+=cbit(this[c]^b);return a}function bnTestBit(a){var b=Math.floor(a/this.DB);return b>=this.t?this.s!=0:(this[b]&1<<a%this.DB)!=0}function bnpChangeBit(a,b){var c=BigInteger.ONE.shiftLeft(a);this.bitwiseTo(c,b,c);return c}function bnSetBit(a){return this.changeBit(a,op_or)}function bnClearBit(a){return this.changeBit(a,op_andnot)}function bnFlipBit(a){return this.changeBit(a,op_xor)}
|
||||
function bnpAddTo(a,b){for(var c=0,d=0,e=Math.min(a.t,this.t);c<e;)d+=this[c]+a[c],b[c++]=d&this.DM,d>>=this.DB;if(a.t<this.t){for(d+=a.s;c<this.t;)d+=this[c],b[c++]=d&this.DM,d>>=this.DB;d+=this.s}else{for(d+=this.s;c<a.t;)d+=a[c],b[c++]=d&this.DM,d>>=this.DB;d+=a.s}b.s=d<0?-1:0;d>0?b[c++]=d:d<-1&&(b[c++]=this.DV+d);b.t=c;b.clamp()}function bnAdd(a){var b=nbi();this.addTo(a,b);return b}function bnSubtract(a){var b=nbi();this.subTo(a,b);return b}
|
||||
function bnMultiply(a){var b=nbi();this.multiplyTo(a,b);return b}function bnSquare(){var a=nbi();this.squareTo(a);return a}function bnDivide(a){var b=nbi();this.divRemTo(a,b,null);return b}function bnRemainder(a){var b=nbi();this.divRemTo(a,null,b);return b}function bnDivideAndRemainder(a){var b=nbi(),c=nbi();this.divRemTo(a,b,c);return[b,c]}function bnpDMultiply(a){this[this.t]=this.am(0,a-1,this,0,0,this.t);++this.t;this.clamp()}
|
||||
function bnpDAddOffset(a,b){if(a!=0){for(;this.t<=b;)this[this.t++]=0;for(this[b]+=a;this[b]>=this.DV;)this[b]-=this.DV,++b>=this.t&&(this[this.t++]=0),++this[b]}}function NullExp(){}function nNop(a){return a}function nMulTo(a,b,c){a.multiplyTo(b,c)}function nSqrTo(a,b){a.squareTo(b)}NullExp.prototype.convert=nNop;NullExp.prototype.revert=nNop;NullExp.prototype.mulTo=nMulTo;NullExp.prototype.sqrTo=nSqrTo;function bnPow(a){return this.exp(a,new NullExp)}
|
||||
function bnpMultiplyLowerTo(a,b,c){var d=Math.min(this.t+a.t,b);c.s=0;for(c.t=d;d>0;)c[--d]=0;var e;for(e=c.t-this.t;d<e;++d)c[d+this.t]=this.am(0,a[d],c,d,0,this.t);for(e=Math.min(a.t,b);d<e;++d)this.am(0,a[d],c,d,0,b-d);c.clamp()}function bnpMultiplyUpperTo(a,b,c){--b;var d=c.t=this.t+a.t-b;for(c.s=0;--d>=0;)c[d]=0;for(d=Math.max(b-this.t,0);d<a.t;++d)c[this.t+d-b]=this.am(b-d,a[d],c,0,0,this.t+d-b);c.clamp();c.drShiftTo(1,c)}
|
||||
function Barrett(a){this.r2=nbi();this.q3=nbi();BigInteger.ONE.dlShiftTo(2*a.t,this.r2);this.mu=this.r2.divide(a);this.m=a}function barrettConvert(a){if(a.s<0||a.t>2*this.m.t)return a.mod(this.m);else if(a.compareTo(this.m)<0)return a;else{var b=nbi();a.copyTo(b);this.reduce(b);return b}}function barrettRevert(a){return a}
|
||||
function barrettReduce(a){a.drShiftTo(this.m.t-1,this.r2);if(a.t>this.m.t+1)a.t=this.m.t+1,a.clamp();this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3);for(this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);a.compareTo(this.r2)<0;)a.dAddOffset(1,this.m.t+1);for(a.subTo(this.r2,a);a.compareTo(this.m)>=0;)a.subTo(this.m,a)}function barrettSqrTo(a,b){a.squareTo(b);this.reduce(b)}function barrettMulTo(a,b,c){a.multiplyTo(b,c);this.reduce(c)}Barrett.prototype.convert=barrettConvert;
|
||||
Barrett.prototype.revert=barrettRevert;Barrett.prototype.reduce=barrettReduce;Barrett.prototype.mulTo=barrettMulTo;Barrett.prototype.sqrTo=barrettSqrTo;
|
||||
function bnModPow(a,b){var c=a.bitLength(),d,e=nbv(1),g;if(c<=0)return e;else d=c<18?1:c<48?3:c<144?4:c<768?5:6;g=c<8?new Classic(b):b.isEven()?new Barrett(b):new Montgomery(b);var h=[],f=3,o=d-1,p=(1<<d)-1;h[1]=g.convert(this);if(d>1){c=nbi();for(g.sqrTo(h[1],c);f<=p;)h[f]=nbi(),g.mulTo(c,h[f-2],h[f]),f+=2}for(var q=a.t-1,n,k=!0,j=nbi(),c=nbits(a[q])-1;q>=0;){c>=o?n=a[q]>>c-o&p:(n=(a[q]&(1<<c+1)-1)<<o-c,q>0&&(n|=a[q-1]>>this.DB+c-o));for(f=d;(n&1)==0;)n>>=1,--f;if((c-=f)<0)c+=this.DB,--q;if(k)h[n].copyTo(e),
|
||||
k=!1;else{for(;f>1;)g.sqrTo(e,j),g.sqrTo(j,e),f-=2;f>0?g.sqrTo(e,j):(f=e,e=j,j=f);g.mulTo(j,h[n],e)}for(;q>=0&&(a[q]&1<<c)==0;)g.sqrTo(e,j),f=e,e=j,j=f,--c<0&&(c=this.DB-1,--q)}return g.revert(e)}
|
||||
function bnGCD(a){var b=this.s<0?this.negate():this.clone(),a=a.s<0?a.negate():a.clone();if(b.compareTo(a)<0)var c=b,b=a,a=c;var c=b.getLowestSetBit(),d=a.getLowestSetBit();if(d<0)return b;c<d&&(d=c);d>0&&(b.rShiftTo(d,b),a.rShiftTo(d,a));for(;b.signum()>0;)(c=b.getLowestSetBit())>0&&b.rShiftTo(c,b),(c=a.getLowestSetBit())>0&&a.rShiftTo(c,a),b.compareTo(a)>=0?(b.subTo(a,b),b.rShiftTo(1,b)):(a.subTo(b,a),a.rShiftTo(1,a));d>0&&a.lShiftTo(d,a);return a}
|
||||
function bnpModInt(a){if(a<=0)return 0;var b=this.DV%a,c=this.s<0?a-1:0;if(this.t>0)if(b==0)c=this[0]%a;else for(var d=this.t-1;d>=0;--d)c=(b*c+this[d])%a;return c}
|
||||
function bnModInverse(a){var b=a.isEven();if(this.isEven()&&b||a.signum()==0)return BigInteger.ZERO;for(var c=a.clone(),d=this.clone(),e=nbv(1),g=nbv(0),h=nbv(0),f=nbv(1);c.signum()!=0;){for(;c.isEven();){c.rShiftTo(1,c);if(b){if(!e.isEven()||!g.isEven())e.addTo(this,e),g.subTo(a,g);e.rShiftTo(1,e)}else g.isEven()||g.subTo(a,g);g.rShiftTo(1,g)}for(;d.isEven();){d.rShiftTo(1,d);if(b){if(!h.isEven()||!f.isEven())h.addTo(this,h),f.subTo(a,f);h.rShiftTo(1,h)}else f.isEven()||f.subTo(a,f);f.rShiftTo(1,
|
||||
f)}c.compareTo(d)>=0?(c.subTo(d,c),b&&e.subTo(h,e),g.subTo(f,g)):(d.subTo(c,d),b&&h.subTo(e,h),f.subTo(g,f))}if(d.compareTo(BigInteger.ONE)!=0)return BigInteger.ZERO;if(f.compareTo(a)>=0)return f.subtract(a);if(f.signum()<0)f.addTo(a,f);else return f;return f.signum()<0?f.add(a):f}
|
||||
var lowprimes=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,
|
||||
733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],lplim=67108864/lowprimes[lowprimes.length-1];
|
||||
function bnIsProbablePrime(a){var b,c=this.abs();if(c.t==1&&c[0]<=lowprimes[lowprimes.length-1]){for(b=0;b<lowprimes.length;++b)if(c[0]==lowprimes[b])return!0;return!1}if(c.isEven())return!1;for(b=1;b<lowprimes.length;){for(var d=lowprimes[b],e=b+1;e<lowprimes.length&&d<lplim;)d*=lowprimes[e++];for(d=c.modInt(d);b<e;)if(d%lowprimes[b++]==0)return!1}return c.millerRabin(a)}
|
||||
function bnpMillerRabin(a){var b=this.subtract(BigInteger.ONE),c=b.getLowestSetBit();if(c<=0)return!1;var d=b.shiftRight(c),a=a+1>>1;if(a>lowprimes.length)a=lowprimes.length;for(var e=nbi(),g=0;g<a;++g){e.fromInt(lowprimes[Math.floor(Math.random()*lowprimes.length)]);var h=e.modPow(d,this);if(h.compareTo(BigInteger.ONE)!=0&&h.compareTo(b)!=0){for(var f=1;f++<c&&h.compareTo(b)!=0;)if(h=h.modPowInt(2,this),h.compareTo(BigInteger.ONE)==0)return!1;if(h.compareTo(b)!=0)return!1}}return!0}
|
||||
BigInteger.prototype.chunkSize=bnpChunkSize;BigInteger.prototype.toRadix=bnpToRadix;BigInteger.prototype.fromRadix=bnpFromRadix;BigInteger.prototype.fromNumber=bnpFromNumber;BigInteger.prototype.bitwiseTo=bnpBitwiseTo;BigInteger.prototype.changeBit=bnpChangeBit;BigInteger.prototype.addTo=bnpAddTo;BigInteger.prototype.dMultiply=bnpDMultiply;BigInteger.prototype.dAddOffset=bnpDAddOffset;BigInteger.prototype.multiplyLowerTo=bnpMultiplyLowerTo;BigInteger.prototype.multiplyUpperTo=bnpMultiplyUpperTo;
|
||||
BigInteger.prototype.modInt=bnpModInt;BigInteger.prototype.millerRabin=bnpMillerRabin;BigInteger.prototype.clone=bnClone;BigInteger.prototype.intValue=bnIntValue;BigInteger.prototype.byteValue=bnByteValue;BigInteger.prototype.shortValue=bnShortValue;BigInteger.prototype.signum=bnSigNum;BigInteger.prototype.toByteArray=bnToByteArray;BigInteger.prototype.equals=bnEquals;BigInteger.prototype.min=bnMin;BigInteger.prototype.max=bnMax;BigInteger.prototype.and=bnAnd;BigInteger.prototype.or=bnOr;
|
||||
BigInteger.prototype.xor=bnXor;BigInteger.prototype.andNot=bnAndNot;BigInteger.prototype.not=bnNot;BigInteger.prototype.shiftLeft=bnShiftLeft;BigInteger.prototype.shiftRight=bnShiftRight;BigInteger.prototype.getLowestSetBit=bnGetLowestSetBit;BigInteger.prototype.bitCount=bnBitCount;BigInteger.prototype.testBit=bnTestBit;BigInteger.prototype.setBit=bnSetBit;BigInteger.prototype.clearBit=bnClearBit;BigInteger.prototype.flipBit=bnFlipBit;BigInteger.prototype.add=bnAdd;BigInteger.prototype.subtract=bnSubtract;
|
||||
BigInteger.prototype.multiply=bnMultiply;BigInteger.prototype.divide=bnDivide;BigInteger.prototype.remainder=bnRemainder;BigInteger.prototype.divideAndRemainder=bnDivideAndRemainder;BigInteger.prototype.modPow=bnModPow;BigInteger.prototype.modInverse=bnModInverse;BigInteger.prototype.pow=bnPow;BigInteger.prototype.gcd=bnGCD;BigInteger.prototype.isProbablePrime=bnIsProbablePrime;BigInteger.prototype.square=bnSquare;
|
||||
(function(a,b,c,d,e,g,h){function f(a){var b,d,e=this,g=a.length,f=0,h=e.i=e.j=e.m=0;e.S=[];e.c=[];for(g||(a=[g++]);f<c;)e.S[f]=f++;for(f=0;f<c;f++)b=e.S[f],h=h+b+a[f%g]&c-1,d=e.S[h],e.S[f]=d,e.S[h]=b;e.g=function(a){var b=e.S,d=e.i+1&c-1,g=b[d],f=e.j+g&c-1,h=b[f];b[d]=h;b[f]=g;for(var k=b[g+h&c-1];--a;)d=d+1&c-1,g=b[d],f=f+g&c-1,h=b[f],b[d]=h,b[f]=g,k=k*c+b[g+h&c-1];e.i=d;e.j=f;return k};e.g(c)}function o(a,b,c,d,e){c=[];e=typeof a;if(b&&e=="object")for(d in a)if(d.indexOf("S")<5)try{c.push(o(a[d],
|
||||
b-1))}catch(g){}return c.length?c:a+(e!="string"?"\x00":"")}function p(a,b,d,e){a+="";for(e=d=0;e<a.length;e++){var g=b,f=e&c-1,h=(d^=b[e&c-1]*19)+a.charCodeAt(e);g[f]=h&c-1}a="";for(e in b)a+=String.fromCharCode(b[e]);return a}b.seedrandom=function(q,n){var k=[],j,q=p(o(n?[q,a]:arguments.length?q:[(new Date).getTime(),a,window],3),k);j=new f(k);p(j.S,a);b.random=function(){for(var a=j.g(d),b=h,f=0;a<e;)a=(a+f)*c,b*=c,f=j.g(1);for(;a>=g;)a/=2,b/=2,f>>>=1;return(a+f)/b};return q};h=b.pow(c,d);e=b.pow(2,
|
||||
e);g=e*2;p(b.random(),a)})([],Math,256,6,52);function SeededRandom(){}function SRnextBytes(a){var b;for(b=0;b<a.length;b++)a[b]=Math.floor(Math.random()*256)}SeededRandom.prototype.nextBytes=SRnextBytes;function Arcfour(){this.j=this.i=0;this.S=[]}function ARC4init(a){var b,c,d;for(b=0;b<256;++b)this.S[b]=b;for(b=c=0;b<256;++b)c=c+this.S[b]+a[b%a.length]&255,d=this.S[b],this.S[b]=this.S[c],this.S[c]=d;this.j=this.i=0}
|
||||
function ARC4next(){var a;this.i=this.i+1&255;this.j=this.j+this.S[this.i]&255;a=this.S[this.i];this.S[this.i]=this.S[this.j];this.S[this.j]=a;return this.S[a+this.S[this.i]&255]}Arcfour.prototype.init=ARC4init;Arcfour.prototype.next=ARC4next;function prng_newstate(){return new Arcfour}var rng_psize=256,rng_state,rng_pool,rng_pptr;
|
||||
function rng_seed_int(a){rng_pool[rng_pptr++]^=a&255;rng_pool[rng_pptr++]^=a>>8&255;rng_pool[rng_pptr++]^=a>>16&255;rng_pool[rng_pptr++]^=a>>24&255;rng_pptr>=rng_psize&&(rng_pptr-=rng_psize)}function rng_seed_time(){rng_seed_int((new Date).getTime())}
|
||||
if(rng_pool==null){rng_pool=[];rng_pptr=0;var t;if(navigator.appName=="Netscape"&&navigator.appVersion<"5"&&window.crypto){var z=window.crypto.random(32);for(t=0;t<z.length;++t)rng_pool[rng_pptr++]=z.charCodeAt(t)&255}for(;rng_pptr<rng_psize;)t=Math.floor(65536*Math.random()),rng_pool[rng_pptr++]=t>>>8,rng_pool[rng_pptr++]=t&255;rng_pptr=0;rng_seed_time()}
|
||||
function rng_get_byte(){if(rng_state==null){rng_seed_time();rng_state=prng_newstate();rng_state.init(rng_pool);for(rng_pptr=0;rng_pptr<rng_pool.length;++rng_pptr)rng_pool[rng_pptr]=0;rng_pptr=0}return rng_state.next()}function rng_get_bytes(a){var b;for(b=0;b<a.length;++b)a[b]=rng_get_byte()}function SecureRandom(){}SecureRandom.prototype.nextBytes=rng_get_bytes;
|
||||
function SHA256(a){function b(a,b){var c=(a&65535)+(b&65535);return(a>>16)+(b>>16)+(c>>16)<<16|c&65535}function c(a,b){return a>>>b|a<<32-b}a=function(a){for(var a=a.replace(/\r\n/g,"\n"),b="",c=0;c<a.length;c++){var h=a.charCodeAt(c);h<128?b+=String.fromCharCode(h):(h>127&&h<2048?b+=String.fromCharCode(h>>6|192):(b+=String.fromCharCode(h>>12|224),b+=String.fromCharCode(h>>6&63|128)),b+=String.fromCharCode(h&63|128))}return b}(a);return function(a){for(var b="",c=0;c<a.length*4;c++)b+="0123456789abcdef".charAt(a[c>>
|
||||
2]>>(3-c%4)*8+4&15)+"0123456789abcdef".charAt(a[c>>2]>>(3-c%4)*8&15);return b}(function(a,e){var g=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,
|
||||
2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],f=Array(64),o,p,q,n,k,j,l,m,s,r,u,w;a[e>>5]|=128<<24-e%32;a[(e+64>>9<<4)+15]=e;for(s=0;s<a.length;s+=16){o=h[0];p=h[1];q=h[2];n=h[3];
|
||||
k=h[4];j=h[5];l=h[6];m=h[7];for(r=0;r<64;r++)f[r]=r<16?a[r+s]:b(b(b(c(f[r-2],17)^c(f[r-2],19)^f[r-2]>>>10,f[r-7]),c(f[r-15],7)^c(f[r-15],18)^f[r-15]>>>3),f[r-16]),u=b(b(b(b(m,c(k,6)^c(k,11)^c(k,25)),k&j^~k&l),g[r]),f[r]),w=b(c(o,2)^c(o,13)^c(o,22),o&p^o&q^p&q),m=l,l=j,j=k,k=b(n,u),n=q,q=p,p=o,o=b(u,w);h[0]=b(o,h[0]);h[1]=b(p,h[1]);h[2]=b(q,h[2]);h[3]=b(n,h[3]);h[4]=b(k,h[4]);h[5]=b(j,h[5]);h[6]=b(l,h[6]);h[7]=b(m,h[7])}return h}(function(a){for(var b=[],c=0;c<a.length*8;c+=8)b[c>>5]|=(a.charCodeAt(c/
|
||||
8)&255)<<24-c%32;return b}(a),a.length*8))}var sha256={hex:function(a){return SHA256(a)}};
|
||||
function SHA1(a){function b(a,b){return a<<b|a>>>32-b}function c(a){var b="",c,d;for(c=7;c>=0;c--)d=a>>>c*4&15,b+=d.toString(16);return b}var d,e,g=Array(80),h=1732584193,f=4023233417,o=2562383102,p=271733878,q=3285377520,n,k,j,l,m,a=function(a){for(var a=a.replace(/\r\n/g,"\n"),b="",c=0;c<a.length;c++){var d=a.charCodeAt(c);d<128?b+=String.fromCharCode(d):(d>127&&d<2048?b+=String.fromCharCode(d>>6|192):(b+=String.fromCharCode(d>>12|224),b+=String.fromCharCode(d>>6&63|128)),b+=String.fromCharCode(d&
|
||||
63|128))}return b}(a);n=a.length;var s=[];for(d=0;d<n-3;d+=4)e=a.charCodeAt(d)<<24|a.charCodeAt(d+1)<<16|a.charCodeAt(d+2)<<8|a.charCodeAt(d+3),s.push(e);switch(n%4){case 0:d=2147483648;break;case 1:d=a.charCodeAt(n-1)<<24|8388608;break;case 2:d=a.charCodeAt(n-2)<<24|a.charCodeAt(n-1)<<16|32768;break;case 3:d=a.charCodeAt(n-3)<<24|a.charCodeAt(n-2)<<16|a.charCodeAt(n-1)<<8|128}for(s.push(d);s.length%16!=14;)s.push(0);s.push(n>>>29);s.push(n<<3&4294967295);for(a=0;a<s.length;a+=16){for(d=0;d<16;d++)g[d]=
|
||||
s[a+d];for(d=16;d<=79;d++)g[d]=b(g[d-3]^g[d-8]^g[d-14]^g[d-16],1);e=h;n=f;k=o;j=p;l=q;for(d=0;d<=19;d++)m=b(e,5)+(n&k|~n&j)+l+g[d]+1518500249&4294967295,l=j,j=k,k=b(n,30),n=e,e=m;for(d=20;d<=39;d++)m=b(e,5)+(n^k^j)+l+g[d]+1859775393&4294967295,l=j,j=k,k=b(n,30),n=e,e=m;for(d=40;d<=59;d++)m=b(e,5)+(n&k|n&j|k&j)+l+g[d]+2400959708&4294967295,l=j,j=k,k=b(n,30),n=e,e=m;for(d=60;d<=79;d++)m=b(e,5)+(n^k^j)+l+g[d]+3395469782&4294967295,l=j,j=k,k=b(n,30),n=e,e=m;h=h+e&4294967295;f=f+n&4294967295;o=o+k&4294967295;
|
||||
p=p+j&4294967295;q=q+l&4294967295}m=c(h)+c(f)+c(o)+c(p)+c(q);return m.toLowerCase()}
|
||||
var sha1={hex:function(a){return SHA1(a)}},MD5=function(a){function b(a,b){var c,d,e,f,g;e=a&2147483648;f=b&2147483648;c=a&1073741824;d=b&1073741824;g=(a&1073741823)+(b&1073741823);return c&d?g^2147483648^e^f:c|d?g&1073741824?g^3221225472^e^f:g^1073741824^e^f:g^e^f}function c(a,c,d,e,f,g,h){a=b(a,b(b(c&d|~c&e,f),h));return b(a<<g|a>>>32-g,c)}function d(a,c,d,e,f,g,h){a=b(a,b(b(c&e|d&~e,f),h));return b(a<<g|a>>>32-g,c)}function e(a,c,d,e,f,g,h){a=b(a,b(b(c^d^e,f),h));return b(a<<g|a>>>32-g,c)}function g(a,
|
||||
c,d,e,f,g,h){a=b(a,b(b(d^(c|~e),f),h));return b(a<<g|a>>>32-g,c)}function h(a){var b="",c="",d;for(d=0;d<=3;d++)c=a>>>d*8&255,c="0"+c.toString(16),b+=c.substr(c.length-2,2);return b}var f=[],o,p,q,n,k,j,l,m,a=function(a){for(var a=a.replace(/\r\n/g,"\n"),b="",c=0;c<a.length;c++){var d=a.charCodeAt(c);d<128?b+=String.fromCharCode(d):(d>127&&d<2048?b+=String.fromCharCode(d>>6|192):(b+=String.fromCharCode(d>>12|224),b+=String.fromCharCode(d>>6&63|128)),b+=String.fromCharCode(d&63|128))}return b}(a),
|
||||
f=function(a){var b,c=a.length;b=c+8;for(var d=((b-b%64)/64+1)*16,e=Array(d-1),f=0,g=0;g<c;)b=(g-g%4)/4,f=g%4*8,e[b]|=a.charCodeAt(g)<<f,g++;e[(g-g%4)/4]|=128<<g%4*8;e[d-2]=c<<3;e[d-1]=c>>>29;return e}(a);k=1732584193;j=4023233417;l=2562383102;m=271733878;for(a=0;a<f.length;a+=16)o=k,p=j,q=l,n=m,k=c(k,j,l,m,f[a+0],7,3614090360),m=c(m,k,j,l,f[a+1],12,3905402710),l=c(l,m,k,j,f[a+2],17,606105819),j=c(j,l,m,k,f[a+3],22,3250441966),k=c(k,j,l,m,f[a+4],7,4118548399),m=c(m,k,j,l,f[a+5],12,1200080426),l=c(l,
|
||||
m,k,j,f[a+6],17,2821735955),j=c(j,l,m,k,f[a+7],22,4249261313),k=c(k,j,l,m,f[a+8],7,1770035416),m=c(m,k,j,l,f[a+9],12,2336552879),l=c(l,m,k,j,f[a+10],17,4294925233),j=c(j,l,m,k,f[a+11],22,2304563134),k=c(k,j,l,m,f[a+12],7,1804603682),m=c(m,k,j,l,f[a+13],12,4254626195),l=c(l,m,k,j,f[a+14],17,2792965006),j=c(j,l,m,k,f[a+15],22,1236535329),k=d(k,j,l,m,f[a+1],5,4129170786),m=d(m,k,j,l,f[a+6],9,3225465664),l=d(l,m,k,j,f[a+11],14,643717713),j=d(j,l,m,k,f[a+0],20,3921069994),k=d(k,j,l,m,f[a+5],5,3593408605),
|
||||
m=d(m,k,j,l,f[a+10],9,38016083),l=d(l,m,k,j,f[a+15],14,3634488961),j=d(j,l,m,k,f[a+4],20,3889429448),k=d(k,j,l,m,f[a+9],5,568446438),m=d(m,k,j,l,f[a+14],9,3275163606),l=d(l,m,k,j,f[a+3],14,4107603335),j=d(j,l,m,k,f[a+8],20,1163531501),k=d(k,j,l,m,f[a+13],5,2850285829),m=d(m,k,j,l,f[a+2],9,4243563512),l=d(l,m,k,j,f[a+7],14,1735328473),j=d(j,l,m,k,f[a+12],20,2368359562),k=e(k,j,l,m,f[a+5],4,4294588738),m=e(m,k,j,l,f[a+8],11,2272392833),l=e(l,m,k,j,f[a+11],16,1839030562),j=e(j,l,m,k,f[a+14],23,4259657740),
|
||||
k=e(k,j,l,m,f[a+1],4,2763975236),m=e(m,k,j,l,f[a+4],11,1272893353),l=e(l,m,k,j,f[a+7],16,4139469664),j=e(j,l,m,k,f[a+10],23,3200236656),k=e(k,j,l,m,f[a+13],4,681279174),m=e(m,k,j,l,f[a+0],11,3936430074),l=e(l,m,k,j,f[a+3],16,3572445317),j=e(j,l,m,k,f[a+6],23,76029189),k=e(k,j,l,m,f[a+9],4,3654602809),m=e(m,k,j,l,f[a+12],11,3873151461),l=e(l,m,k,j,f[a+15],16,530742520),j=e(j,l,m,k,f[a+2],23,3299628645),k=g(k,j,l,m,f[a+0],6,4096336452),m=g(m,k,j,l,f[a+7],10,1126891415),l=g(l,m,k,j,f[a+14],15,2878612391),
|
||||
j=g(j,l,m,k,f[a+5],21,4237533241),k=g(k,j,l,m,f[a+12],6,1700485571),m=g(m,k,j,l,f[a+3],10,2399980690),l=g(l,m,k,j,f[a+10],15,4293915773),j=g(j,l,m,k,f[a+1],21,2240044497),k=g(k,j,l,m,f[a+8],6,1873313359),m=g(m,k,j,l,f[a+15],10,4264355552),l=g(l,m,k,j,f[a+6],15,2734768916),j=g(j,l,m,k,f[a+13],21,1309151649),k=g(k,j,l,m,f[a+4],6,4149444226),m=g(m,k,j,l,f[a+11],10,3174756917),l=g(l,m,k,j,f[a+2],15,718787259),j=g(j,l,m,k,f[a+9],21,3951481745),k=b(k,o),j=b(j,p),l=b(l,q),m=b(m,n);return(h(k)+h(j)+h(l)+
|
||||
h(m)).toLowerCase()};function parseBigInt(a,b){return new BigInteger(a,b)}function linebrk(a,b){for(var c="",d=0;d+b<a.length;)c+=a.substring(d,d+b)+"\n",d+=b;return c+a.substring(d,a.length)}function byte2Hex(a){return a<16?"0"+a.toString(16):a.toString(16)}
|
||||
function pkcs1pad2(a,b){if(b<a.length+11)throw"Message too long for RSA (n="+b+", l="+a.length+")";for(var c=[],d=a.length-1;d>=0&&b>0;){var e=a.charCodeAt(d--);e<128?c[--b]=e:e>127&&e<2048?(c[--b]=e&63|128,c[--b]=e>>6|192):(c[--b]=e&63|128,c[--b]=e>>6&63|128,c[--b]=e>>12|224)}c[--b]=0;d=new SecureRandom;for(e=[];b>2;){for(e[0]=0;e[0]==0;)d.nextBytes(e);c[--b]=e[0]}c[--b]=2;c[--b]=0;return new BigInteger(c)}
|
||||
function RSAKey(){this.n=null;this.e=0;this.coeff=this.dmq1=this.dmp1=this.q=this.p=this.d=null}function RSASetPublic(a,b){a!=null&&b!=null&&a.length>0&&b.length>0?(this.n=parseBigInt(a,16),this.e=parseInt(b,16)):alert("Invalid RSA public key")}function RSADoPublic(a){return a.modPowInt(this.e,this.n)}function RSAEncrypt(a){a=pkcs1pad2(a,this.n.bitLength()+7>>3);if(a==null)return null;a=this.doPublic(a);if(a==null)return null;a=a.toString(16);return(a.length&1)==0?a:"0"+a}
|
||||
RSAKey.prototype.doPublic=RSADoPublic;RSAKey.prototype.setPublic=RSASetPublic;RSAKey.prototype.encrypt=RSAEncrypt;function pkcs1unpad2(a,b){for(var c=a.toByteArray(),d=0;d<c.length&&c[d]==0;)++d;if(c.length-d!=b-1||c[d]!=2)return null;for(++d;c[d]!=0;)if(++d>=c.length)return null;for(var e="";++d<c.length;){var g=c[d]&255;g<128?e+=String.fromCharCode(g):g>191&&g<224?(e+=String.fromCharCode((g&31)<<6|c[d+1]&63),++d):(e+=String.fromCharCode((g&15)<<12|(c[d+1]&63)<<6|c[d+2]&63),d+=2)}return e}
|
||||
function RSASetPrivate(a,b,c){a!=null&&b!=null&&a.length>0&&b.length>0?(this.n=parseBigInt(a,16),this.e=parseInt(b,16),this.d=parseBigInt(c,16)):alert("Invalid RSA private key")}
|
||||
function RSASetPrivateEx(a,b,c,d,e,g,h,f){a!=null&&b!=null&&a.length>0&&b.length>0?(this.n=parseBigInt(a,16),this.e=parseInt(b,16),this.d=parseBigInt(c,16),this.p=parseBigInt(d,16),this.q=parseBigInt(e,16),this.dmp1=parseBigInt(g,16),this.dmq1=parseBigInt(h,16),this.coeff=parseBigInt(f,16)):alert("Invalid RSA private key")}
|
||||
function RSAGenerate(a,b){var c=new SeededRandom,d=a>>1;this.e=parseInt(b,16);for(var e=new BigInteger(b,16);;){for(;;)if(this.p=new BigInteger(a-d,1,c),this.p.subtract(BigInteger.ONE).gcd(e).compareTo(BigInteger.ONE)==0&&this.p.isProbablePrime(10))break;for(;;)if(this.q=new BigInteger(d,1,c),this.q.subtract(BigInteger.ONE).gcd(e).compareTo(BigInteger.ONE)==0&&this.q.isProbablePrime(10))break;if(this.p.compareTo(this.q)<=0){var g=this.p;this.p=this.q;this.q=g}var g=this.p.subtract(BigInteger.ONE),
|
||||
h=this.q.subtract(BigInteger.ONE),f=g.multiply(h);if(f.gcd(e).compareTo(BigInteger.ONE)==0){this.n=this.p.multiply(this.q);this.d=e.modInverse(f);this.dmp1=this.d.mod(g);this.dmq1=this.d.mod(h);this.coeff=this.q.modInverse(this.p);break}}}
|
||||
function RSADoPrivate(a){if(this.p==null||this.q==null)return a.modPow(this.d,this.n);for(var b=a.mod(this.p).modPow(this.dmp1,this.p),a=a.mod(this.q).modPow(this.dmq1,this.q);b.compareTo(a)<0;)b=b.add(this.p);return b.subtract(a).multiply(this.coeff).mod(this.p).multiply(this.q).add(a)}function RSADecrypt(a){a=this.doPrivate(parseBigInt(a,16));return a==null?null:pkcs1unpad2(a,this.n.bitLength()+7>>3)}RSAKey.prototype.doPrivate=RSADoPrivate;RSAKey.prototype.setPrivate=RSASetPrivate;
|
||||
RSAKey.prototype.setPrivateEx=RSASetPrivateEx;RSAKey.prototype.generate=RSAGenerate;RSAKey.prototype.decrypt=RSADecrypt;var _RSASIGN_DIHEAD=[];_RSASIGN_DIHEAD.sha1="3021300906052b0e03021a05000414";_RSASIGN_DIHEAD.sha256="3031300d060960864801650304020105000420";var _RSASIGN_HASHHEXFUNC=[];_RSASIGN_HASHHEXFUNC.sha1=sha1.hex;_RSASIGN_HASHHEXFUNC.sha256=sha256.hex;
|
||||
function _rsasign_getHexPaddedDigestInfoForString(a,b,c){b/=4;for(var a=(0,_RSASIGN_HASHHEXFUNC[c])(a),c="00"+_RSASIGN_DIHEAD[c]+a,a="",b=b-4-c.length,d=0;d<b;d+=2)a+="ff";return sPaddedMessageHex="0001"+a+c}function _rsasign_signString(a,b){var c=_rsasign_getHexPaddedDigestInfoForString(a,this.n.bitLength(),b);return this.doPrivate(parseBigInt(c,16)).toString(16)}
|
||||
function _rsasign_signStringWithSHA1(a){a=_rsasign_getHexPaddedDigestInfoForString(a,this.n.bitLength(),"sha1");return this.doPrivate(parseBigInt(a,16)).toString(16)}function _rsasign_signStringWithSHA256(a){a=_rsasign_getHexPaddedDigestInfoForString(a,this.n.bitLength(),"sha256");return this.doPrivate(parseBigInt(a,16)).toString(16)}function _rsasign_getDecryptSignatureBI(a,b,c){var d=new RSAKey;d.setPublic(b,c);return d.doPublic(a)}
|
||||
function _rsasign_getHexDigestInfoFromSig(a,b,c){return _rsasign_getDecryptSignatureBI(a,b,c).toString(16).replace(/^1f+00/,"")}function _rsasign_getAlgNameAndHashFromHexDisgestInfo(a){for(var b in _RSASIGN_DIHEAD){var c=_RSASIGN_DIHEAD[b],d=c.length;if(a.substring(0,d)==c)return[b,a.substring(d)]}return[]}
|
||||
function _rsasign_verifySignatureWithArgs(a,b,c,d){b=_rsasign_getHexDigestInfoFromSig(b,c,d);c=_rsasign_getAlgNameAndHashFromHexDisgestInfo(b);if(c.length==0)return!1;b=c[1];a=(0,_RSASIGN_HASHHEXFUNC[c[0]])(a);return b==a}function _rsasign_verifyHexSignatureForMessage(a,b){var c=parseBigInt(a,16);return _rsasign_verifySignatureWithArgs(b,c,this.n.toString(16),this.e.toString(16))}
|
||||
function _rsasign_verifyString(a,b){var b=b.replace(/[ \n]+/g,""),c=this.doPublic(parseBigInt(b,16)).toString(16).replace(/^1f+00/,""),d=_rsasign_getAlgNameAndHashFromHexDisgestInfo(c);if(d.length==0)return!1;c=d[1];d=(0,_RSASIGN_HASHHEXFUNC[d[0]])(a);return c==d}RSAKey.prototype.signString=_rsasign_signString;RSAKey.prototype.signStringWithSHA1=_rsasign_signStringWithSHA1;RSAKey.prototype.signStringWithSHA256=_rsasign_signStringWithSHA256;RSAKey.prototype.verifyString=_rsasign_verifyString;
|
||||
RSAKey.prototype.verifyHexSignatureForMessage=_rsasign_verifyHexSignatureForMessage;
|
||||
var aes=function(){var a={Sbox:[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,
|
||||
95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22],ShiftRowTab:[0,5,10,15,4,9,14,3,8,13,2,7,12,1,6,11]};a.Init=
|
||||
function(){a.Sbox_Inv=Array(256);for(var b=0;b<256;b++)a.Sbox_Inv[a.Sbox[b]]=b;a.ShiftRowTab_Inv=Array(16);for(b=0;b<16;b++)a.ShiftRowTab_Inv[a.ShiftRowTab[b]]=b;a.xtime=Array(256);for(b=0;b<128;b++)a.xtime[b]=b<<1,a.xtime[128+b]=b<<1^27};a.Done=function(){delete a.Sbox_Inv;delete a.ShiftRowTab_Inv;delete a.xtime};a.ExpandKey=function(b){var c=b.length,d,e=1;switch(c){case 16:d=176;break;case 24:d=208;break;case 32:d=240;break;default:alert("my.ExpandKey: Only key lengths of 16, 24 or 32 bytes allowed!")}for(var g=
|
||||
c;g<d;g+=4){var h=b.slice(g-4,g);if(g%c==0){if(h=[a.Sbox[h[1]]^e,a.Sbox[h[2]],a.Sbox[h[3]],a.Sbox[h[0]]],(e<<=1)>=256)e^=283}else c>24&&g%c==16&&(h=[a.Sbox[h[0]],a.Sbox[h[1]],a.Sbox[h[2]],a.Sbox[h[3]]]);for(var f=0;f<4;f++)b[g+f]=b[g+f-c]^h[f]}};a.Encrypt=function(b,c){var d=c.length;a.AddRoundKey(b,c.slice(0,16));for(var e=16;e<d-16;e+=16)a.SubBytes(b,a.Sbox),a.ShiftRows(b,a.ShiftRowTab),a.MixColumns(b),a.AddRoundKey(b,c.slice(e,e+16));a.SubBytes(b,a.Sbox);a.ShiftRows(b,a.ShiftRowTab);a.AddRoundKey(b,
|
||||
c.slice(e,d))};a.Decrypt=function(b,c){var d=c.length;a.AddRoundKey(b,c.slice(d-16,d));a.ShiftRows(b,a.ShiftRowTab_Inv);a.SubBytes(b,a.Sbox_Inv);for(d-=32;d>=16;d-=16)a.AddRoundKey(b,c.slice(d,d+16)),a.MixColumns_Inv(b),a.ShiftRows(b,a.ShiftRowTab_Inv),a.SubBytes(b,a.Sbox_Inv);a.AddRoundKey(b,c.slice(0,16))};a.SubBytes=function(a,c){for(var d=0;d<16;d++)a[d]=c[a[d]]};a.AddRoundKey=function(a,c){for(var d=0;d<16;d++)a[d]^=c[d]};a.ShiftRows=function(a,c){for(var d=[].concat(a),e=0;e<16;e++)a[e]=d[c[e]]};
|
||||
a.MixColumns=function(b){for(var c=0;c<16;c+=4){var d=b[c+0],e=b[c+1],g=b[c+2],h=b[c+3],f=d^e^g^h;b[c+0]^=f^a.xtime[d^e];b[c+1]^=f^a.xtime[e^g];b[c+2]^=f^a.xtime[g^h];b[c+3]^=f^a.xtime[h^d]}};a.MixColumns_Inv=function(b){for(var c=0;c<16;c+=4){var d=b[c+0],e=b[c+1],g=b[c+2],h=b[c+3],f=d^e^g^h,o=a.xtime[f],p=a.xtime[a.xtime[o^d^g]]^f;f^=a.xtime[a.xtime[o^e^h]];b[c+0]^=p^a.xtime[d^e];b[c+1]^=f^a.xtime[e^g];b[c+2]^=p^a.xtime[g^h];b[c+3]^=f^a.xtime[h^d]}};return a}(),cryptico=function(){var a={};aes.Init();
|
||||
a.b256to64=function(a){var c,d,e,g="",h=0,f=0,o=a.length;for(e=0;e<o;e++)d=a.charCodeAt(e),f==0?(g+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(d>>2&63),c=(d&3)<<4):f==1?(g+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(c|d>>4&15),c=(d&15)<<2):f==2&&(g+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(c|d>>6&3),h+=1,g+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(d&63)),h+=1,f+=1,f==3&&
|
||||
(f=0);f>0&&(g+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(c),g+="=");f==1&&(g+="=");return g};a.b64to256=function(a){var c,d,e="",g=0,h=0,f=a.length;for(d=0;d<f;d++)c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(a.charAt(d)),c>=0&&(g&&(e+=String.fromCharCode(h|c>>6-g&255)),g=g+2&7,h=c<<g&255);return e};a.b16to64=function(a){var c,d,e="";a.length%2==1&&(a="0"+a);for(c=0;c+3<=a.length;c+=3)d=parseInt(a.substring(c,c+3),16),e+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(d>>
|
||||
6)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(d&63);c+1==a.length?(d=parseInt(a.substring(c,c+1),16),e+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(d<<2)):c+2==a.length&&(d=parseInt(a.substring(c,c+2),16),e+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(d>>2)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((d&3)<<4));for(;(e.length&3)>0;)e+="=";return e};a.b64to16=function(a){var c="",
|
||||
d,e=0,g;for(d=0;d<a.length;++d){if(a.charAt(d)=="=")break;v="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(a.charAt(d));v<0||(e==0?(c+=int2char(v>>2),g=v&3,e=1):e==1?(c+=int2char(g<<2|v>>4),g=v&15,e=2):e==2?(c+=int2char(g),c+=int2char(v>>2),g=v&3,e=3):(c+=int2char(g<<2|v>>4),c+=int2char(v&15),e=0))}e==1&&(c+=int2char(g<<2));return c};a.string2bytes=function(a){for(var c=[],d=0;d<a.length;d++)c.push(a.charCodeAt(d));return c};a.bytes2string=function(a){for(var c="",d=0;d<
|
||||
a.length;d++)c+=String.fromCharCode(a[d]);return c};a.blockXOR=function(a,c){for(var d=Array(16),e=0;e<16;e++)d[e]=a[e]^c[e];return d};a.blockIV=function(){var a=new SecureRandom,c=Array(16);a.nextBytes(c);return c};a.pad16=function(a){var c=a.slice(0),d=(16-a.length%16)%16;for(i=a.length;i<a.length+d;i++)c.push(0);return c};a.depad=function(a){for(a=a.slice(0);a[a.length-1]==0;)a=a.slice(0,a.length-1);return a};a.encryptAESCBC=function(b,c){var d=c.slice(0);aes.ExpandKey(d);for(var e=a.string2bytes(b),
|
||||
e=a.pad16(e),g=a.blockIV(),h=0;h<e.length/16;h++){var f=e.slice(h*16,h*16+16),o=g.slice(h*16,h*16+16),f=a.blockXOR(o,f);aes.Encrypt(f,d);g=g.concat(f)}d=a.bytes2string(g);return a.b256to64(d)};a.decryptAESCBC=function(b,c){var d=c.slice(0);aes.ExpandKey(d);for(var b=a.b64to256(b),e=a.string2bytes(b),g=[],h=1;h<e.length/16;h++){var f=e.slice(h*16,h*16+16),o=e.slice((h-1)*16,(h-1)*16+16);aes.Decrypt(f,d);f=a.blockXOR(o,f);g=g.concat(f)}g=a.depad(g);return a.bytes2string(g)};a.wrap60=function(a){for(var c=
|
||||
"",d=0;d<a.length;d++)d%60==0&&d!=0&&(c+="\n"),c+=a[d];return c};a.generateAESKey=function(){var a=Array(16);(new SecureRandom).nextBytes(a);return a};a.generateRSAKey=function(a,c){Math.seedrandom(sha256.hex(a));var d=new RSAKey;d.generate(c,"10001");return d};a.publicKeyString=function(b){return pubkey=b.n.toString(16)};a.publicKeyID=function(a){return MD5(a)};a.publicKeyFromString=function(b){var b=b.split("|")[0],c=new RSAKey;c.setPublic(b,"10001");return c};a.encrypt=function(b,
|
||||
c,d){var e="";try{var h=a.publicKeyFromString(c);e+=h.encrypt(b)+"?"}catch(f){return{status:"Invalid public key"}};return{status:"success",cipher:e}};a.decrypt=function(b,c){var d=b.split("?"),e=c.decrypt(d[0]);return{status:"success",plaintext:e,signature:"unsigned"}};return a}();
|
|
@ -0,0 +1,621 @@
|
|||
(function() {
|
||||
var Nr = 10;
|
||||
// convert two-dimensional indicies to one-dim array indices
|
||||
var I00 = 0;
|
||||
var I01 = 1;
|
||||
var I02 = 2;
|
||||
var I03 = 3;
|
||||
var I10 = 4;
|
||||
var I11 = 5;
|
||||
var I12 = 6;
|
||||
var I13 = 7;
|
||||
var I20 = 8;
|
||||
var I21 = 9;
|
||||
var I22 = 10;
|
||||
var I23 = 11;
|
||||
var I30 = 12;
|
||||
var I31 = 13;
|
||||
var I32 = 14;
|
||||
var I33 = 15;
|
||||
|
||||
// S-Box substitution table
|
||||
var S_enc = new Array(
|
||||
0x63, 0x7c, 0x77, 0x7b, 0xf2, 0x6b, 0x6f, 0xc5,
|
||||
0x30, 0x01, 0x67, 0x2b, 0xfe, 0xd7, 0xab, 0x76,
|
||||
0xca, 0x82, 0xc9, 0x7d, 0xfa, 0x59, 0x47, 0xf0,
|
||||
0xad, 0xd4, 0xa2, 0xaf, 0x9c, 0xa4, 0x72, 0xc0,
|
||||
0xb7, 0xfd, 0x93, 0x26, 0x36, 0x3f, 0xf7, 0xcc,
|
||||
0x34, 0xa5, 0xe5, 0xf1, 0x71, 0xd8, 0x31, 0x15,
|
||||
0x04, 0xc7, 0x23, 0xc3, 0x18, 0x96, 0x05, 0x9a,
|
||||
0x07, 0x12, 0x80, 0xe2, 0xeb, 0x27, 0xb2, 0x75,
|
||||
0x09, 0x83, 0x2c, 0x1a, 0x1b, 0x6e, 0x5a, 0xa0,
|
||||
0x52, 0x3b, 0xd6, 0xb3, 0x29, 0xe3, 0x2f, 0x84,
|
||||
0x53, 0xd1, 0x00, 0xed, 0x20, 0xfc, 0xb1, 0x5b,
|
||||
0x6a, 0xcb, 0xbe, 0x39, 0x4a, 0x4c, 0x58, 0xcf,
|
||||
0xd0, 0xef, 0xaa, 0xfb, 0x43, 0x4d, 0x33, 0x85,
|
||||
0x45, 0xf9, 0x02, 0x7f, 0x50, 0x3c, 0x9f, 0xa8,
|
||||
0x51, 0xa3, 0x40, 0x8f, 0x92, 0x9d, 0x38, 0xf5,
|
||||
0xbc, 0xb6, 0xda, 0x21, 0x10, 0xff, 0xf3, 0xd2,
|
||||
0xcd, 0x0c, 0x13, 0xec, 0x5f, 0x97, 0x44, 0x17,
|
||||
0xc4, 0xa7, 0x7e, 0x3d, 0x64, 0x5d, 0x19, 0x73,
|
||||
0x60, 0x81, 0x4f, 0xdc, 0x22, 0x2a, 0x90, 0x88,
|
||||
0x46, 0xee, 0xb8, 0x14, 0xde, 0x5e, 0x0b, 0xdb,
|
||||
0xe0, 0x32, 0x3a, 0x0a, 0x49, 0x06, 0x24, 0x5c,
|
||||
0xc2, 0xd3, 0xac, 0x62, 0x91, 0x95, 0xe4, 0x79,
|
||||
0xe7, 0xc8, 0x37, 0x6d, 0x8d, 0xd5, 0x4e, 0xa9,
|
||||
0x6c, 0x56, 0xf4, 0xea, 0x65, 0x7a, 0xae, 0x08,
|
||||
0xba, 0x78, 0x25, 0x2e, 0x1c, 0xa6, 0xb4, 0xc6,
|
||||
0xe8, 0xdd, 0x74, 0x1f, 0x4b, 0xbd, 0x8b, 0x8a,
|
||||
0x70, 0x3e, 0xb5, 0x66, 0x48, 0x03, 0xf6, 0x0e,
|
||||
0x61, 0x35, 0x57, 0xb9, 0x86, 0xc1, 0x1d, 0x9e,
|
||||
0xe1, 0xf8, 0x98, 0x11, 0x69, 0xd9, 0x8e, 0x94,
|
||||
0x9b, 0x1e, 0x87, 0xe9, 0xce, 0x55, 0x28, 0xdf,
|
||||
0x8c, 0xa1, 0x89, 0x0d, 0xbf, 0xe6, 0x42, 0x68,
|
||||
0x41, 0x99, 0x2d, 0x0f, 0xb0, 0x54, 0xbb, 0x16);
|
||||
|
||||
// inverse S-Box for decryptions
|
||||
var S_dec = new Array(
|
||||
0x52, 0x09, 0x6a, 0xd5, 0x30, 0x36, 0xa5, 0x38,
|
||||
0xbf, 0x40, 0xa3, 0x9e, 0x81, 0xf3, 0xd7, 0xfb,
|
||||
0x7c, 0xe3, 0x39, 0x82, 0x9b, 0x2f, 0xff, 0x87,
|
||||
0x34, 0x8e, 0x43, 0x44, 0xc4, 0xde, 0xe9, 0xcb,
|
||||
0x54, 0x7b, 0x94, 0x32, 0xa6, 0xc2, 0x23, 0x3d,
|
||||
0xee, 0x4c, 0x95, 0x0b, 0x42, 0xfa, 0xc3, 0x4e,
|
||||
0x08, 0x2e, 0xa1, 0x66, 0x28, 0xd9, 0x24, 0xb2,
|
||||
0x76, 0x5b, 0xa2, 0x49, 0x6d, 0x8b, 0xd1, 0x25,
|
||||
0x72, 0xf8, 0xf6, 0x64, 0x86, 0x68, 0x98, 0x16,
|
||||
0xd4, 0xa4, 0x5c, 0xcc, 0x5d, 0x65, 0xb6, 0x92,
|
||||
0x6c, 0x70, 0x48, 0x50, 0xfd, 0xed, 0xb9, 0xda,
|
||||
0x5e, 0x15, 0x46, 0x57, 0xa7, 0x8d, 0x9d, 0x84,
|
||||
0x90, 0xd8, 0xab, 0x00, 0x8c, 0xbc, 0xd3, 0x0a,
|
||||
0xf7, 0xe4, 0x58, 0x05, 0xb8, 0xb3, 0x45, 0x06,
|
||||
0xd0, 0x2c, 0x1e, 0x8f, 0xca, 0x3f, 0x0f, 0x02,
|
||||
0xc1, 0xaf, 0xbd, 0x03, 0x01, 0x13, 0x8a, 0x6b,
|
||||
0x3a, 0x91, 0x11, 0x41, 0x4f, 0x67, 0xdc, 0xea,
|
||||
0x97, 0xf2, 0xcf, 0xce, 0xf0, 0xb4, 0xe6, 0x73,
|
||||
0x96, 0xac, 0x74, 0x22, 0xe7, 0xad, 0x35, 0x85,
|
||||
0xe2, 0xf9, 0x37, 0xe8, 0x1c, 0x75, 0xdf, 0x6e,
|
||||
0x47, 0xf1, 0x1a, 0x71, 0x1d, 0x29, 0xc5, 0x89,
|
||||
0x6f, 0xb7, 0x62, 0x0e, 0xaa, 0x18, 0xbe, 0x1b,
|
||||
0xfc, 0x56, 0x3e, 0x4b, 0xc6, 0xd2, 0x79, 0x20,
|
||||
0x9a, 0xdb, 0xc0, 0xfe, 0x78, 0xcd, 0x5a, 0xf4,
|
||||
0x1f, 0xdd, 0xa8, 0x33, 0x88, 0x07, 0xc7, 0x31,
|
||||
0xb1, 0x12, 0x10, 0x59, 0x27, 0x80, 0xec, 0x5f,
|
||||
0x60, 0x51, 0x7f, 0xa9, 0x19, 0xb5, 0x4a, 0x0d,
|
||||
0x2d, 0xe5, 0x7a, 0x9f, 0x93, 0xc9, 0x9c, 0xef,
|
||||
0xa0, 0xe0, 0x3b, 0x4d, 0xae, 0x2a, 0xf5, 0xb0,
|
||||
0xc8, 0xeb, 0xbb, 0x3c, 0x83, 0x53, 0x99, 0x61,
|
||||
0x17, 0x2b, 0x04, 0x7e, 0xba, 0x77, 0xd6, 0x26,
|
||||
0xe1, 0x69, 0x14, 0x63, 0x55, 0x21, 0x0c, 0x7d);
|
||||
|
||||
function cvt_hex8 (val) {
|
||||
var vh = (val>>>4)&0x0f;
|
||||
return vh.toString(16) + (val&0x0f).toString(16);
|
||||
}
|
||||
function cvt_byte (str) {
|
||||
// get the first hex digit
|
||||
var val1 = str.charCodeAt(0);
|
||||
// do some error checking
|
||||
if (val1 >= 48 && val1 <= 57) {
|
||||
// have a valid digit 0-9
|
||||
val1 -= 48;
|
||||
} else if (val1 >= 65 && val1 <= 70) {
|
||||
// have a valid digit A-F
|
||||
val1 -= 55;
|
||||
} else if (val1 >= 97 && val1 <= 102) {
|
||||
// have a valid digit A-F
|
||||
val1 -= 87;
|
||||
} else {
|
||||
// not 0-9 or A-F, complain
|
||||
console.log( str.charAt(1)+" is not a valid hex digit" );
|
||||
return -1;
|
||||
}
|
||||
// get the second hex digit
|
||||
var val2 = str.charCodeAt(1);
|
||||
// do some error checking
|
||||
if ( val2 >= 48 && val2 <= 57 ) {
|
||||
// have a valid digit 0-9
|
||||
val2 -= 48;
|
||||
} else if ( val2 >= 65 && val2 <= 70 ) {
|
||||
// have a valid digit A-F
|
||||
val2 -= 55;
|
||||
} else if ( val2 >= 97 && val2 <= 102 ) {
|
||||
// have a valid digit A-F
|
||||
val2 -= 87;
|
||||
} else {
|
||||
// not 0-9 or A-F, complain
|
||||
console.log( str.charAt(2)+" is not a valid hex digit" );
|
||||
return -1;
|
||||
}
|
||||
// all is ok, return the value
|
||||
return val1*16 + val2;
|
||||
}
|
||||
|
||||
// conversion function for non-constant subscripts
|
||||
// assume subscript range 0..3
|
||||
function I(x,y) {
|
||||
return (x*4) + y;
|
||||
}
|
||||
|
||||
// remove spaces from input
|
||||
function remove_spaces(instr) {
|
||||
var i;
|
||||
var outstr = "";
|
||||
for(i=0; i<instr.length; i++) {
|
||||
if ( instr.charAt(i) != " " )
|
||||
// not a space, include it
|
||||
outstr += instr.charAt(i);
|
||||
}
|
||||
return outstr;
|
||||
}
|
||||
|
||||
// get the message to encrypt/decrypt or the key
|
||||
// return as a 16-byte array
|
||||
function get_value(str, isASCII) {
|
||||
var dbyte = new Array(16);
|
||||
var i;
|
||||
var val; // one hex digit
|
||||
if (isASCII) {
|
||||
// check length of data
|
||||
if (str.length > 16) {
|
||||
console.log("is too long, using the first 16 ASCII characters" );
|
||||
}
|
||||
// have ASCII data
|
||||
// 16 characters?
|
||||
if (str.length >= 16) {
|
||||
// 16 or more characters
|
||||
for(i=0; i<16; i++) {
|
||||
dbyte[i] = str.charCodeAt(i);
|
||||
}
|
||||
} else {
|
||||
// less than 16 characters - fill with NULLs
|
||||
for(i=0; i<str.length; i++) {
|
||||
dbyte[i] = str.charCodeAt(i);
|
||||
}
|
||||
for( i=str.length; i<16; i++) {
|
||||
dbyte[i] = 0;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// have hex data - remove any spaces they used, then convert
|
||||
//str = remove_spaces(str);
|
||||
// check length of data
|
||||
if ( str.length != 32 ) {
|
||||
//console.log("\tget_value:\tstr = " + str + "\tisASCII = " + isASCII); //isASCII = false
|
||||
console.log("length wrong: Is " + str.length + " hex digits, but must be 128 bits (32 hex digits)");
|
||||
dbyte[0] = -1;
|
||||
return dbyte;
|
||||
}
|
||||
for( i=0; i<16; i++ ) {
|
||||
// isolate and convert this substring
|
||||
dbyte[i] = cvt_byte( str.substr(i*2,2) );
|
||||
if( dbyte[i] < 0 ) {
|
||||
// have an error
|
||||
dbyte[0] = -1;
|
||||
return dbyte;
|
||||
}
|
||||
}
|
||||
}
|
||||
// return successful conversion
|
||||
return dbyte;
|
||||
}
|
||||
//do the AES GF(2**8) multiplication
|
||||
// do this by the shift-and-"add" approach
|
||||
function aes_mul(a, b) {
|
||||
var res = 0;
|
||||
while(a > 0) {
|
||||
if((a&1) != 0)
|
||||
res = res ^ b; // "add" to the result
|
||||
a >>>= 1; // shift a to get next higher-order bit
|
||||
b <<= 1; // shift multiplier also
|
||||
}
|
||||
// now reduce it modulo x**8 + x**4 + x**3 + x + 1
|
||||
var hbit = 0x10000; // bit to test if we need to take action
|
||||
var modulus = 0x11b00; // modulus - XOR by this to change value
|
||||
while(hbit >= 0x100) {
|
||||
if ((res & hbit) != 0) {
|
||||
res ^= modulus; // XOR with the modulus
|
||||
}
|
||||
// prepare for the next loop
|
||||
hbit >>= 1;
|
||||
modulus >>= 1;
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
// apply the S-box substitution to the key expansion
|
||||
function SubWord(word_ary) {
|
||||
var i;
|
||||
for(i=0; i<16; i++) {
|
||||
word_ary[i] = S_enc[word_ary[i]];
|
||||
}
|
||||
return word_ary;
|
||||
}
|
||||
|
||||
// rotate the bytes in a word
|
||||
function RotWord(word_ary) {
|
||||
return new Array(word_ary[1], word_ary[2], word_ary[3], word_ary[0]);
|
||||
}
|
||||
|
||||
// calculate the first item Rcon[i] = { x^(i-1), 0, 0, 0 }
|
||||
// note we only return the first item
|
||||
function Rcon(exp) {
|
||||
var val = 2;
|
||||
var result = 1;
|
||||
|
||||
// remember to calculate x^(exp-1)
|
||||
exp--;
|
||||
|
||||
// process the exponent using normal shift and multiply
|
||||
while ( exp > 0 )
|
||||
{
|
||||
if ( (exp & 1) != 0 )
|
||||
result = aes_mul( result, val );
|
||||
|
||||
// square the value
|
||||
val = aes_mul( val, val );
|
||||
|
||||
// move to the next bit
|
||||
exp >>= 1;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
// round key generation
|
||||
// return a byte array with the expanded key information
|
||||
function key_expand( key )
|
||||
{
|
||||
var temp = new Array(4);
|
||||
var i, j;
|
||||
var w = new Array(4*(Nr+1));
|
||||
|
||||
// copy initial key stuff
|
||||
for( i=0; i<16; i++ )
|
||||
{
|
||||
w[i] = key[i];
|
||||
}
|
||||
|
||||
// generate rest of key schedule using 32-bit words
|
||||
i = 4;
|
||||
while ( i < 4*(Nr+1)) // blocksize * ( rounds + 1 )
|
||||
{
|
||||
// copy word W[i-1] to temp
|
||||
for( j=0; j<4; j++ )
|
||||
temp[j] = w[(i-1)*4+j];
|
||||
|
||||
if ( i % 4 == 0)
|
||||
{
|
||||
// temp = SubWord(RotWord(temp)) ^ Rcon[i/4];
|
||||
temp = RotWord( temp );
|
||||
temp = SubWord( temp );
|
||||
temp[0] ^= Rcon( i>>>2 );
|
||||
}
|
||||
|
||||
// word = word ^ temp
|
||||
for( j=0; j<4; j++ )
|
||||
w[i*4+j] = w[(i-4)*4+j] ^ temp[j];
|
||||
|
||||
i++;
|
||||
}
|
||||
|
||||
return w;
|
||||
}
|
||||
|
||||
// do S-Box substitution
|
||||
function SubBytes(state, Sbox)
|
||||
{
|
||||
var i;
|
||||
|
||||
for( i=0; i<16; i++ )
|
||||
state[i] = Sbox[ state[i] ];
|
||||
|
||||
return state;
|
||||
}
|
||||
|
||||
// shift each row as appropriate
|
||||
function ShiftRows(state)
|
||||
{
|
||||
var t0, t1, t2, t3;
|
||||
|
||||
// top row (row 0) isn't shifted
|
||||
|
||||
// next row (row 1) rotated left 1 place
|
||||
t0 = state[I10];
|
||||
t1 = state[I11];
|
||||
t2 = state[I12];
|
||||
t3 = state[I13];
|
||||
state[I10] = t1;
|
||||
state[I11] = t2;
|
||||
state[I12] = t3;
|
||||
state[I13] = t0;
|
||||
|
||||
// next row (row 2) rotated left 2 places
|
||||
t0 = state[I20];
|
||||
t1 = state[I21];
|
||||
t2 = state[I22];
|
||||
t3 = state[I23];
|
||||
state[I20] = t2;
|
||||
state[I21] = t3;
|
||||
state[I22] = t0;
|
||||
state[I23] = t1;
|
||||
|
||||
// bottom row (row 3) rotated left 3 places
|
||||
t0 = state[I30];
|
||||
t1 = state[I31];
|
||||
t2 = state[I32];
|
||||
t3 = state[I33];
|
||||
state[I30] = t3;
|
||||
state[I31] = t0;
|
||||
state[I32] = t1;
|
||||
state[I33] = t2;
|
||||
|
||||
return state;
|
||||
}
|
||||
|
||||
// inverset shift each row as appropriate
|
||||
function InvShiftRows(state)
|
||||
{
|
||||
var t0, t1, t2, t3;
|
||||
|
||||
// top row (row 0) isn't shifted
|
||||
|
||||
// next row (row 1) rotated left 1 place
|
||||
t0 = state[I10];
|
||||
t1 = state[I11];
|
||||
t2 = state[I12];
|
||||
t3 = state[I13];
|
||||
state[I10] = t3;
|
||||
state[I11] = t0;
|
||||
state[I12] = t1;
|
||||
state[I13] = t2;
|
||||
|
||||
// next row (row 2) rotated left 2 places
|
||||
t0 = state[I20];
|
||||
t1 = state[I21];
|
||||
t2 = state[I22];
|
||||
t3 = state[I23];
|
||||
state[I20] = t2;
|
||||
state[I21] = t3;
|
||||
state[I22] = t0;
|
||||
state[I23] = t1;
|
||||
|
||||
// bottom row (row 3) rotated left 3 places
|
||||
t0 = state[I30];
|
||||
t1 = state[I31];
|
||||
t2 = state[I32];
|
||||
t3 = state[I33];
|
||||
state[I30] = t1;
|
||||
state[I31] = t2;
|
||||
state[I32] = t3;
|
||||
state[I33] = t0;
|
||||
|
||||
return state;
|
||||
}
|
||||
|
||||
// process column info
|
||||
function MixColumns(state)
|
||||
{
|
||||
var col;
|
||||
var c0, c1, c2, c3;
|
||||
|
||||
for( col=0; col<4; col++ )
|
||||
{
|
||||
c0 = state[I(0,col)];
|
||||
c1 = state[I(1,col)];
|
||||
c2 = state[I(2,col)];
|
||||
c3 = state[I(3,col)];
|
||||
|
||||
// do mixing, and put back into array
|
||||
state[I(0,col)] = aes_mul(2,c0) ^ aes_mul(3,c1) ^ c2 ^ c3;
|
||||
state[I(1,col)] = c0 ^ aes_mul(2,c1) ^ aes_mul(3,c2) ^ c3;
|
||||
state[I(2,col)] = c0 ^ c1 ^ aes_mul(2,c2) ^ aes_mul(3,c3);
|
||||
state[I(3,col)] = aes_mul(3,c0) ^ c1 ^ c2 ^ aes_mul(2,c3);
|
||||
}
|
||||
|
||||
return state;
|
||||
}
|
||||
|
||||
// inverse process column info
|
||||
function InvMixColumns(state)
|
||||
{
|
||||
var col;
|
||||
var c0, c1, c2, c3;
|
||||
|
||||
for( col=0; col<4; col++ )
|
||||
{
|
||||
c0 = state[I(0,col)];
|
||||
c1 = state[I(1,col)];
|
||||
c2 = state[I(2,col)];
|
||||
c3 = state[I(3,col)];
|
||||
|
||||
// do inverse mixing, and put back into array
|
||||
state[I(0,col)] = aes_mul(0x0e,c0) ^ aes_mul(0x0b,c1)
|
||||
^ aes_mul(0x0d,c2) ^ aes_mul(0x09,c3);
|
||||
state[I(1,col)] = aes_mul(0x09,c0) ^ aes_mul(0x0e,c1)
|
||||
^ aes_mul(0x0b,c2) ^ aes_mul(0x0d,c3);
|
||||
state[I(2,col)] = aes_mul(0x0d,c0) ^ aes_mul(0x09,c1)
|
||||
^ aes_mul(0x0e,c2) ^ aes_mul(0x0b,c3);
|
||||
state[I(3,col)] = aes_mul(0x0b,c0) ^ aes_mul(0x0d,c1)
|
||||
^ aes_mul(0x09,c2) ^ aes_mul(0x0e,c3);
|
||||
}
|
||||
|
||||
return state;
|
||||
}
|
||||
|
||||
// insert subkey information
|
||||
function AddRoundKey( state, w, base )
|
||||
{
|
||||
var col;
|
||||
|
||||
for( col=0; col<4; col++ )
|
||||
{
|
||||
state[I(0,col)] ^= w[base+col*4];
|
||||
state[I(1,col)] ^= w[base+col*4+1];
|
||||
state[I(2,col)] ^= w[base+col*4+2];
|
||||
state[I(3,col)] ^= w[base+col*4+3];
|
||||
}
|
||||
|
||||
return state;
|
||||
}
|
||||
|
||||
// return a transposed array
|
||||
function transpose( msg )
|
||||
{
|
||||
var row, col;
|
||||
var state = new Array( 16 );
|
||||
|
||||
for( row=0; row<4; row++ )
|
||||
for( col=0; col<4; col++ )
|
||||
state[I(row,col)] = msg[I(col,row)];
|
||||
|
||||
return state;
|
||||
}
|
||||
|
||||
// final AES state
|
||||
var AES_output = new Array(16);
|
||||
|
||||
// format AES output
|
||||
// -- uses the global array DES_output
|
||||
function format_AES_output(bASCII)
|
||||
{
|
||||
var i;
|
||||
var bits;
|
||||
var str="";
|
||||
|
||||
// what type of data do we have to work with?
|
||||
if (bASCII)
|
||||
{
|
||||
// convert each set of bits back to ASCII
|
||||
for( i=0; i<16; i++ )
|
||||
str += String.fromCharCode( AES_output[i] );
|
||||
}
|
||||
else
|
||||
{
|
||||
// output hexdecimal data (insert spaces)
|
||||
str = cvt_hex8( AES_output[0] );
|
||||
for( i=1; i<16; i++ )
|
||||
{
|
||||
str += "" + cvt_hex8( AES_output[i] );
|
||||
}
|
||||
}
|
||||
return str;
|
||||
}
|
||||
|
||||
// do encrytion
|
||||
function aes_encrypt(str, key, bASCII)
|
||||
{
|
||||
//console.log(" aes_encrypt:\tstr = " + str + "\tkey = " + key + "\t bASCII = " + bASCII);
|
||||
var w = new Array( 4*(Nr+1) ); // subkey information
|
||||
var state = new Array( 16 ); // working state
|
||||
var round;
|
||||
|
||||
//accumulated_output_info = "";
|
||||
|
||||
// get the message from the user
|
||||
// also check if it is ASCII or hex
|
||||
var msg = get_value(str, bASCII);
|
||||
|
||||
// problems??
|
||||
if ( msg[0] < 0 )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// get the key from the user
|
||||
var key = get_value(key, false);
|
||||
// problems??
|
||||
if ( key[0] < 0 )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// expand the key
|
||||
w = key_expand( key );
|
||||
|
||||
// initial state = message in columns (transposed from what we input)
|
||||
state = transpose( msg );
|
||||
|
||||
// display the round key - Transpose due to the way it is stored/used
|
||||
state = AddRoundKey(state, w, 0);
|
||||
|
||||
for( round=1; round<Nr; round++ )
|
||||
{
|
||||
state = SubBytes(state, S_enc);
|
||||
state = ShiftRows(state);
|
||||
state = MixColumns(state);
|
||||
// display the round key - Transpose due to the way it is stored/used
|
||||
// note here the spec uses 32-bit words, we are using bytes, so an extra *4
|
||||
state = AddRoundKey(state, w, round*4*4);
|
||||
}
|
||||
|
||||
SubBytes(state, S_enc);
|
||||
ShiftRows(state);
|
||||
AddRoundKey(state, w, Nr*4*4);
|
||||
|
||||
// process output
|
||||
AES_output = transpose( state );
|
||||
var szOutput = format_AES_output(!bASCII);
|
||||
return szOutput;
|
||||
}
|
||||
|
||||
// do decryption
|
||||
function aes_decrypt(str, key, bASCII)
|
||||
{
|
||||
//console.log(" aes_decrypt:\tstr = " + str + "\tkey = " + key + "\tbASCII = " + bASCII);
|
||||
var w = new Array( 4*(Nr+1) ); // subkey information
|
||||
var state = new Array( 16 ); // working state
|
||||
var round;
|
||||
|
||||
//accumulated_output_info = "";
|
||||
|
||||
// get the message from the user
|
||||
// also check if it is ASCII or hex
|
||||
var msg = get_value(str, bASCII);
|
||||
|
||||
// problems??
|
||||
if ( msg[0] < 0 )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// get the key from the user
|
||||
var key = get_value(key, false);
|
||||
// problems??
|
||||
if ( key[0] < 0 )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// expand the key
|
||||
w = key_expand( key );
|
||||
|
||||
// initial state = message
|
||||
state = transpose( msg );
|
||||
// display the round key - Transpose due to the way it is stored/used
|
||||
state = AddRoundKey(state, w, Nr*4*4);
|
||||
|
||||
for( round=Nr-1; round>=1; round-- )
|
||||
{
|
||||
state = InvShiftRows(state);
|
||||
state = SubBytes(state, S_dec);
|
||||
// display the round key - Transpose due to the way it is stored/used
|
||||
// note here the spec uses 32-bit words, we are using bytes, so an extra *4
|
||||
state = AddRoundKey(state, w, round*4*4);
|
||||
state = InvMixColumns(state);
|
||||
}
|
||||
|
||||
InvShiftRows(state);
|
||||
SubBytes(state, S_dec);
|
||||
AddRoundKey(state, w, 0);
|
||||
|
||||
// process output
|
||||
AES_output = transpose( state );
|
||||
var szOutput = format_AES_output(!bASCII);
|
||||
return szOutput;
|
||||
}
|
||||
window.aes_encrypt = aes_encrypt;
|
||||
window.aes_decrypt = aes_decrypt;
|
||||
window.console = window.console || {
|
||||
log: function() {}
|
||||
};
|
||||
}());
|
|
@ -0,0 +1,106 @@
|
|||
var dbits,canary=244837814094590,j_lm=(canary&16777215)==15715070;function BigInteger(a,b,c){a!=null&&("number"==typeof a?this.fromNumber(a,b,c):b==null&&"string"!=typeof a?this.fromString(a,256):this.fromString(a,b))}function nbi(){return new BigInteger(null)}function am1(a,b,c,d,e,g){for(;--g>=0;){var h=b*this[a++]+c[d]+e,e=Math.floor(h/67108864);c[d++]=h&67108863}return e}
|
||||
function am2(a,b,c,d,e,g){var h=b&32767;for(b>>=15;--g>=0;){var f=this[a]&32767,o=this[a++]>>15,p=b*f+o*h,f=h*f+((p&32767)<<15)+c[d]+(e&1073741823),e=(f>>>30)+(p>>>15)+b*o+(e>>>30);c[d++]=f&1073741823}return e}function am3(a,b,c,d,e,g){var h=b&16383;for(b>>=14;--g>=0;){var f=this[a]&16383,o=this[a++]>>14,p=b*f+o*h,f=h*f+((p&16383)<<14)+c[d]+e,e=(f>>28)+(p>>14)+b*o;c[d++]=f&268435455}return e}
|
||||
j_lm&&navigator.appName=="Microsoft Internet Explorer"?(BigInteger.prototype.am=am2,dbits=30):j_lm&&navigator.appName!="Netscape"?(BigInteger.prototype.am=am1,dbits=26):(BigInteger.prototype.am=am3,dbits=28);BigInteger.prototype.DB=dbits;BigInteger.prototype.DM=(1<<dbits)-1;BigInteger.prototype.DV=1<<dbits;var BI_FP=52;BigInteger.prototype.FV=Math.pow(2,BI_FP);BigInteger.prototype.F1=BI_FP-dbits;BigInteger.prototype.F2=2*dbits-BI_FP;var BI_RM="0123456789abcdefghijklmnopqrstuvwxyz",BI_RC=[],rr,vv;
|
||||
rr="0".charCodeAt(0);for(vv=0;vv<=9;++vv)BI_RC[rr++]=vv;rr="a".charCodeAt(0);for(vv=10;vv<36;++vv)BI_RC[rr++]=vv;rr="A".charCodeAt(0);for(vv=10;vv<36;++vv)BI_RC[rr++]=vv;function int2char(a){return BI_RM.charAt(a)}function intAt(a,b){var c=BI_RC[a.charCodeAt(b)];return c==null?-1:c}function bnpCopyTo(a){for(var b=this.t-1;b>=0;--b)a[b]=this[b];a.t=this.t;a.s=this.s}function bnpFromInt(a){this.t=1;this.s=a<0?-1:0;a>0?this[0]=a:a<-1?this[0]=a+DV:this.t=0}
|
||||
function nbv(a){var b=nbi();b.fromInt(a);return b}
|
||||
function bnpFromString(a,b){var c;if(b==16)c=4;else if(b==8)c=3;else if(b==256)c=8;else if(b==2)c=1;else if(b==32)c=5;else if(b==4)c=2;else{this.fromRadix(a,b);return}this.s=this.t=0;for(var d=a.length,e=!1,g=0;--d>=0;){var h=c==8?a[d]&255:intAt(a,d);h<0?a.charAt(d)=="-"&&(e=!0):(e=!1,g==0?this[this.t++]=h:g+c>this.DB?(this[this.t-1]|=(h&(1<<this.DB-g)-1)<<g,this[this.t++]=h>>this.DB-g):this[this.t-1]|=h<<g,g+=c,g>=this.DB&&(g-=this.DB))}if(c==8&&(a[0]&128)!=0)this.s=-1,g>0&&(this[this.t-1]|=(1<<
|
||||
this.DB-g)-1<<g);this.clamp();e&&BigInteger.ZERO.subTo(this,this)}function bnpClamp(){for(var a=this.s&this.DM;this.t>0&&this[this.t-1]==a;)--this.t}
|
||||
function bnToString(a){if(this.s<0)return"-"+this.negate().toString(a);if(a==16)a=4;else if(a==8)a=3;else if(a==2)a=1;else if(a==32)a=5;else if(a==64)a=6;else if(a==4)a=2;else return this.toRadix(a);var b=(1<<a)-1,c,d=!1,e="",g=this.t,h=this.DB-g*this.DB%a;if(g-- >0){if(h<this.DB&&(c=this[g]>>h)>0)d=!0,e=int2char(c);for(;g>=0;)h<a?(c=(this[g]&(1<<h)-1)<<a-h,c|=this[--g]>>(h+=this.DB-a)):(c=this[g]>>(h-=a)&b,h<=0&&(h+=this.DB,--g)),c>0&&(d=!0),d&&(e+=int2char(c))}return d?e:"0"}
|
||||
function bnNegate(){var a=nbi();BigInteger.ZERO.subTo(this,a);return a}function bnAbs(){return this.s<0?this.negate():this}function bnCompareTo(a){var b=this.s-a.s;if(b!=0)return b;var c=this.t,b=c-a.t;if(b!=0)return b;for(;--c>=0;)if((b=this[c]-a[c])!=0)return b;return 0}function nbits(a){var b=1,c;if((c=a>>>16)!=0)a=c,b+=16;if((c=a>>8)!=0)a=c,b+=8;if((c=a>>4)!=0)a=c,b+=4;if((c=a>>2)!=0)a=c,b+=2;a>>1!=0&&(b+=1);return b}
|
||||
function bnBitLength(){return this.t<=0?0:this.DB*(this.t-1)+nbits(this[this.t-1]^this.s&this.DM)}function bnpDLShiftTo(a,b){var c;for(c=this.t-1;c>=0;--c)b[c+a]=this[c];for(c=a-1;c>=0;--c)b[c]=0;b.t=this.t+a;b.s=this.s}function bnpDRShiftTo(a,b){for(var c=a;c<this.t;++c)b[c-a]=this[c];b.t=Math.max(this.t-a,0);b.s=this.s}
|
||||
function bnpLShiftTo(a,b){var c=a%this.DB,d=this.DB-c,e=(1<<d)-1,g=Math.floor(a/this.DB),h=this.s<<c&this.DM,f;for(f=this.t-1;f>=0;--f)b[f+g+1]=this[f]>>d|h,h=(this[f]&e)<<c;for(f=g-1;f>=0;--f)b[f]=0;b[g]=h;b.t=this.t+g+1;b.s=this.s;b.clamp()}
|
||||
function bnpRShiftTo(a,b){b.s=this.s;var c=Math.floor(a/this.DB);if(c>=this.t)b.t=0;else{var d=a%this.DB,e=this.DB-d,g=(1<<d)-1;b[0]=this[c]>>d;for(var h=c+1;h<this.t;++h)b[h-c-1]|=(this[h]&g)<<e,b[h-c]=this[h]>>d;d>0&&(b[this.t-c-1]|=(this.s&g)<<e);b.t=this.t-c;b.clamp()}}
|
||||
function bnpSubTo(a,b){for(var c=0,d=0,e=Math.min(a.t,this.t);c<e;)d+=this[c]-a[c],b[c++]=d&this.DM,d>>=this.DB;if(a.t<this.t){for(d-=a.s;c<this.t;)d+=this[c],b[c++]=d&this.DM,d>>=this.DB;d+=this.s}else{for(d+=this.s;c<a.t;)d-=a[c],b[c++]=d&this.DM,d>>=this.DB;d-=a.s}b.s=d<0?-1:0;d<-1?b[c++]=this.DV+d:d>0&&(b[c++]=d);b.t=c;b.clamp()}
|
||||
function bnpMultiplyTo(a,b){var c=this.abs(),d=a.abs(),e=c.t;for(b.t=e+d.t;--e>=0;)b[e]=0;for(e=0;e<d.t;++e)b[e+c.t]=c.am(0,d[e],b,e,0,c.t);b.s=0;b.clamp();this.s!=a.s&&BigInteger.ZERO.subTo(b,b)}function bnpSquareTo(a){for(var b=this.abs(),c=a.t=2*b.t;--c>=0;)a[c]=0;for(c=0;c<b.t-1;++c){var d=b.am(c,b[c],a,2*c,0,1);if((a[c+b.t]+=b.am(c+1,2*b[c],a,2*c+1,d,b.t-c-1))>=b.DV)a[c+b.t]-=b.DV,a[c+b.t+1]=1}a.t>0&&(a[a.t-1]+=b.am(c,b[c],a,2*c,0,1));a.s=0;a.clamp()}
|
||||
function bnpDivRemTo(a,b,c){var d=a.abs();if(!(d.t<=0)){var e=this.abs();if(e.t<d.t)b!=null&&b.fromInt(0),c!=null&&this.copyTo(c);else{c==null&&(c=nbi());var g=nbi(),h=this.s,a=a.s,f=this.DB-nbits(d[d.t-1]);f>0?(d.lShiftTo(f,g),e.lShiftTo(f,c)):(d.copyTo(g),e.copyTo(c));d=g.t;e=g[d-1];if(e!=0){var o=e*(1<<this.F1)+(d>1?g[d-2]>>this.F2:0),p=this.FV/o,o=(1<<this.F1)/o,q=1<<this.F2,n=c.t,k=n-d,j=b==null?nbi():b;g.dlShiftTo(k,j);c.compareTo(j)>=0&&(c[c.t++]=1,c.subTo(j,c));BigInteger.ONE.dlShiftTo(d,
|
||||
j);for(j.subTo(g,g);g.t<d;)g[g.t++]=0;for(;--k>=0;){var l=c[--n]==e?this.DM:Math.floor(c[n]*p+(c[n-1]+q)*o);if((c[n]+=g.am(0,l,c,k,0,d))<l){g.dlShiftTo(k,j);for(c.subTo(j,c);c[n]<--l;)c.subTo(j,c)}}b!=null&&(c.drShiftTo(d,b),h!=a&&BigInteger.ZERO.subTo(b,b));c.t=d;c.clamp();f>0&&c.rShiftTo(f,c);h<0&&BigInteger.ZERO.subTo(c,c)}}}}function bnMod(a){var b=nbi();this.abs().divRemTo(a,null,b);this.s<0&&b.compareTo(BigInteger.ZERO)>0&&a.subTo(b,b);return b}function Classic(a){this.m=a}
|
||||
function cConvert(a){return a.s<0||a.compareTo(this.m)>=0?a.mod(this.m):a}function cRevert(a){return a}function cReduce(a){a.divRemTo(this.m,null,a)}function cMulTo(a,b,c){a.multiplyTo(b,c);this.reduce(c)}function cSqrTo(a,b){a.squareTo(b);this.reduce(b)}Classic.prototype.convert=cConvert;Classic.prototype.revert=cRevert;Classic.prototype.reduce=cReduce;Classic.prototype.mulTo=cMulTo;Classic.prototype.sqrTo=cSqrTo;
|
||||
function bnpInvDigit(){if(this.t<1)return 0;var a=this[0];if((a&1)==0)return 0;var b=a&3,b=b*(2-(a&15)*b)&15,b=b*(2-(a&255)*b)&255,b=b*(2-((a&65535)*b&65535))&65535,b=b*(2-a*b%this.DV)%this.DV;return b>0?this.DV-b:-b}function Montgomery(a){this.m=a;this.mp=a.invDigit();this.mpl=this.mp&32767;this.mph=this.mp>>15;this.um=(1<<a.DB-15)-1;this.mt2=2*a.t}
|
||||
function montConvert(a){var b=nbi();a.abs().dlShiftTo(this.m.t,b);b.divRemTo(this.m,null,b);a.s<0&&b.compareTo(BigInteger.ZERO)>0&&this.m.subTo(b,b);return b}function montRevert(a){var b=nbi();a.copyTo(b);this.reduce(b);return b}
|
||||
function montReduce(a){for(;a.t<=this.mt2;)a[a.t++]=0;for(var b=0;b<this.m.t;++b){var c=a[b]&32767,d=c*this.mpl+((c*this.mph+(a[b]>>15)*this.mpl&this.um)<<15)&a.DM,c=b+this.m.t;for(a[c]+=this.m.am(0,d,a,b,0,this.m.t);a[c]>=a.DV;)a[c]-=a.DV,a[++c]++}a.clamp();a.drShiftTo(this.m.t,a);a.compareTo(this.m)>=0&&a.subTo(this.m,a)}function montSqrTo(a,b){a.squareTo(b);this.reduce(b)}function montMulTo(a,b,c){a.multiplyTo(b,c);this.reduce(c)}Montgomery.prototype.convert=montConvert;
|
||||
Montgomery.prototype.revert=montRevert;Montgomery.prototype.reduce=montReduce;Montgomery.prototype.mulTo=montMulTo;Montgomery.prototype.sqrTo=montSqrTo;function bnpIsEven(){return(this.t>0?this[0]&1:this.s)==0}function bnpExp(a,b){if(a>4294967295||a<1)return BigInteger.ONE;var c=nbi(),d=nbi(),e=b.convert(this),g=nbits(a)-1;for(e.copyTo(c);--g>=0;)if(b.sqrTo(c,d),(a&1<<g)>0)b.mulTo(d,e,c);else var h=c,c=d,d=h;return b.revert(c)}
|
||||
function bnModPowInt(a,b){var c;c=a<256||b.isEven()?new Classic(b):new Montgomery(b);return this.exp(a,c)}BigInteger.prototype.copyTo=bnpCopyTo;BigInteger.prototype.fromInt=bnpFromInt;BigInteger.prototype.fromString=bnpFromString;BigInteger.prototype.clamp=bnpClamp;BigInteger.prototype.dlShiftTo=bnpDLShiftTo;BigInteger.prototype.drShiftTo=bnpDRShiftTo;BigInteger.prototype.lShiftTo=bnpLShiftTo;BigInteger.prototype.rShiftTo=bnpRShiftTo;BigInteger.prototype.subTo=bnpSubTo;
|
||||
BigInteger.prototype.multiplyTo=bnpMultiplyTo;BigInteger.prototype.squareTo=bnpSquareTo;BigInteger.prototype.divRemTo=bnpDivRemTo;BigInteger.prototype.invDigit=bnpInvDigit;BigInteger.prototype.isEven=bnpIsEven;BigInteger.prototype.exp=bnpExp;BigInteger.prototype.toString=bnToString;BigInteger.prototype.negate=bnNegate;BigInteger.prototype.abs=bnAbs;BigInteger.prototype.compareTo=bnCompareTo;BigInteger.prototype.bitLength=bnBitLength;BigInteger.prototype.mod=bnMod;BigInteger.prototype.modPowInt=bnModPowInt;
|
||||
BigInteger.ZERO=nbv(0);BigInteger.ONE=nbv(1);function bnClone(){var a=nbi();this.copyTo(a);return a}function bnIntValue(){if(this.s<0)if(this.t==1)return this[0]-this.DV;else{if(this.t==0)return-1}else if(this.t==1)return this[0];else if(this.t==0)return 0;return(this[1]&(1<<32-this.DB)-1)<<this.DB|this[0]}function bnByteValue(){return this.t==0?this.s:this[0]<<24>>24}function bnShortValue(){return this.t==0?this.s:this[0]<<16>>16}
|
||||
function bnpChunkSize(a){return Math.floor(Math.LN2*this.DB/Math.log(a))}function bnSigNum(){return this.s<0?-1:this.t<=0||this.t==1&&this[0]<=0?0:1}function bnpToRadix(a){a==null&&(a=10);if(this.signum()==0||a<2||a>36)return"0";var b=this.chunkSize(a),b=Math.pow(a,b),c=nbv(b),d=nbi(),e=nbi(),g="";for(this.divRemTo(c,d,e);d.signum()>0;)g=(b+e.intValue()).toString(a).substr(1)+g,d.divRemTo(c,d,e);return e.intValue().toString(a)+g}
|
||||
function bnpFromRadix(a,b){this.fromInt(0);b==null&&(b=10);for(var c=this.chunkSize(b),d=Math.pow(b,c),e=!1,g=0,h=0,f=0;f<a.length;++f){var o=intAt(a,f);o<0?a.charAt(f)=="-"&&this.signum()==0&&(e=!0):(h=b*h+o,++g>=c&&(this.dMultiply(d),this.dAddOffset(h,0),h=g=0))}g>0&&(this.dMultiply(Math.pow(b,g)),this.dAddOffset(h,0));e&&BigInteger.ZERO.subTo(this,this)}
|
||||
function bnpFromNumber(a,b,c){if("number"==typeof b)if(a<2)this.fromInt(1);else{this.fromNumber(a,c);this.testBit(a-1)||this.bitwiseTo(BigInteger.ONE.shiftLeft(a-1),op_or,this);for(this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(b);)this.dAddOffset(2,0),this.bitLength()>a&&this.subTo(BigInteger.ONE.shiftLeft(a-1),this)}else{var c=[],d=a&7;c.length=(a>>3)+1;b.nextBytes(c);d>0?c[0]&=(1<<d)-1:c[0]=0;this.fromString(c,256)}}
|
||||
function bnToByteArray(){var a=this.t,b=[];b[0]=this.s;var c=this.DB-a*this.DB%8,d,e=0;if(a-- >0){if(c<this.DB&&(d=this[a]>>c)!=(this.s&this.DM)>>c)b[e++]=d|this.s<<this.DB-c;for(;a>=0;)if(c<8?(d=(this[a]&(1<<c)-1)<<8-c,d|=this[--a]>>(c+=this.DB-8)):(d=this[a]>>(c-=8)&255,c<=0&&(c+=this.DB,--a)),(d&128)!=0&&(d|=-256),e==0&&(this.s&128)!=(d&128)&&++e,e>0||d!=this.s)b[e++]=d}return b}function bnEquals(a){return this.compareTo(a)==0}function bnMin(a){return this.compareTo(a)<0?this:a}
|
||||
function bnMax(a){return this.compareTo(a)>0?this:a}function bnpBitwiseTo(a,b,c){var d,e,g=Math.min(a.t,this.t);for(d=0;d<g;++d)c[d]=b(this[d],a[d]);if(a.t<this.t){e=a.s&this.DM;for(d=g;d<this.t;++d)c[d]=b(this[d],e);c.t=this.t}else{e=this.s&this.DM;for(d=g;d<a.t;++d)c[d]=b(e,a[d]);c.t=a.t}c.s=b(this.s,a.s);c.clamp()}function op_and(a,b){return a&b}function bnAnd(a){var b=nbi();this.bitwiseTo(a,op_and,b);return b}function op_or(a,b){return a|b}
|
||||
function bnOr(a){var b=nbi();this.bitwiseTo(a,op_or,b);return b}function op_xor(a,b){return a^b}function bnXor(a){var b=nbi();this.bitwiseTo(a,op_xor,b);return b}function op_andnot(a,b){return a&~b}function bnAndNot(a){var b=nbi();this.bitwiseTo(a,op_andnot,b);return b}function bnNot(){for(var a=nbi(),b=0;b<this.t;++b)a[b]=this.DM&~this[b];a.t=this.t;a.s=~this.s;return a}function bnShiftLeft(a){var b=nbi();a<0?this.rShiftTo(-a,b):this.lShiftTo(a,b);return b}
|
||||
function bnShiftRight(a){var b=nbi();a<0?this.lShiftTo(-a,b):this.rShiftTo(a,b);return b}function lbit(a){if(a==0)return-1;var b=0;(a&65535)==0&&(a>>=16,b+=16);(a&255)==0&&(a>>=8,b+=8);(a&15)==0&&(a>>=4,b+=4);(a&3)==0&&(a>>=2,b+=2);(a&1)==0&&++b;return b}function bnGetLowestSetBit(){for(var a=0;a<this.t;++a)if(this[a]!=0)return a*this.DB+lbit(this[a]);return this.s<0?this.t*this.DB:-1}function cbit(a){for(var b=0;a!=0;)a&=a-1,++b;return b}
|
||||
function bnBitCount(){for(var a=0,b=this.s&this.DM,c=0;c<this.t;++c)a+=cbit(this[c]^b);return a}function bnTestBit(a){var b=Math.floor(a/this.DB);return b>=this.t?this.s!=0:(this[b]&1<<a%this.DB)!=0}function bnpChangeBit(a,b){var c=BigInteger.ONE.shiftLeft(a);this.bitwiseTo(c,b,c);return c}function bnSetBit(a){return this.changeBit(a,op_or)}function bnClearBit(a){return this.changeBit(a,op_andnot)}function bnFlipBit(a){return this.changeBit(a,op_xor)}
|
||||
function bnpAddTo(a,b){for(var c=0,d=0,e=Math.min(a.t,this.t);c<e;)d+=this[c]+a[c],b[c++]=d&this.DM,d>>=this.DB;if(a.t<this.t){for(d+=a.s;c<this.t;)d+=this[c],b[c++]=d&this.DM,d>>=this.DB;d+=this.s}else{for(d+=this.s;c<a.t;)d+=a[c],b[c++]=d&this.DM,d>>=this.DB;d+=a.s}b.s=d<0?-1:0;d>0?b[c++]=d:d<-1&&(b[c++]=this.DV+d);b.t=c;b.clamp()}function bnAdd(a){var b=nbi();this.addTo(a,b);return b}function bnSubtract(a){var b=nbi();this.subTo(a,b);return b}
|
||||
function bnMultiply(a){var b=nbi();this.multiplyTo(a,b);return b}function bnSquare(){var a=nbi();this.squareTo(a);return a}function bnDivide(a){var b=nbi();this.divRemTo(a,b,null);return b}function bnRemainder(a){var b=nbi();this.divRemTo(a,null,b);return b}function bnDivideAndRemainder(a){var b=nbi(),c=nbi();this.divRemTo(a,b,c);return[b,c]}function bnpDMultiply(a){this[this.t]=this.am(0,a-1,this,0,0,this.t);++this.t;this.clamp()}
|
||||
function bnpDAddOffset(a,b){if(a!=0){for(;this.t<=b;)this[this.t++]=0;for(this[b]+=a;this[b]>=this.DV;)this[b]-=this.DV,++b>=this.t&&(this[this.t++]=0),++this[b]}}function NullExp(){}function nNop(a){return a}function nMulTo(a,b,c){a.multiplyTo(b,c)}function nSqrTo(a,b){a.squareTo(b)}NullExp.prototype.convert=nNop;NullExp.prototype.revert=nNop;NullExp.prototype.mulTo=nMulTo;NullExp.prototype.sqrTo=nSqrTo;function bnPow(a){return this.exp(a,new NullExp)}
|
||||
function bnpMultiplyLowerTo(a,b,c){var d=Math.min(this.t+a.t,b);c.s=0;for(c.t=d;d>0;)c[--d]=0;var e;for(e=c.t-this.t;d<e;++d)c[d+this.t]=this.am(0,a[d],c,d,0,this.t);for(e=Math.min(a.t,b);d<e;++d)this.am(0,a[d],c,d,0,b-d);c.clamp()}function bnpMultiplyUpperTo(a,b,c){--b;var d=c.t=this.t+a.t-b;for(c.s=0;--d>=0;)c[d]=0;for(d=Math.max(b-this.t,0);d<a.t;++d)c[this.t+d-b]=this.am(b-d,a[d],c,0,0,this.t+d-b);c.clamp();c.drShiftTo(1,c)}
|
||||
function Barrett(a){this.r2=nbi();this.q3=nbi();BigInteger.ONE.dlShiftTo(2*a.t,this.r2);this.mu=this.r2.divide(a);this.m=a}function barrettConvert(a){if(a.s<0||a.t>2*this.m.t)return a.mod(this.m);else if(a.compareTo(this.m)<0)return a;else{var b=nbi();a.copyTo(b);this.reduce(b);return b}}function barrettRevert(a){return a}
|
||||
function barrettReduce(a){a.drShiftTo(this.m.t-1,this.r2);if(a.t>this.m.t+1)a.t=this.m.t+1,a.clamp();this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3);for(this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);a.compareTo(this.r2)<0;)a.dAddOffset(1,this.m.t+1);for(a.subTo(this.r2,a);a.compareTo(this.m)>=0;)a.subTo(this.m,a)}function barrettSqrTo(a,b){a.squareTo(b);this.reduce(b)}function barrettMulTo(a,b,c){a.multiplyTo(b,c);this.reduce(c)}Barrett.prototype.convert=barrettConvert;
|
||||
Barrett.prototype.revert=barrettRevert;Barrett.prototype.reduce=barrettReduce;Barrett.prototype.mulTo=barrettMulTo;Barrett.prototype.sqrTo=barrettSqrTo;
|
||||
function bnModPow(a,b){var c=a.bitLength(),d,e=nbv(1),g;if(c<=0)return e;else d=c<18?1:c<48?3:c<144?4:c<768?5:6;g=c<8?new Classic(b):b.isEven()?new Barrett(b):new Montgomery(b);var h=[],f=3,o=d-1,p=(1<<d)-1;h[1]=g.convert(this);if(d>1){c=nbi();for(g.sqrTo(h[1],c);f<=p;)h[f]=nbi(),g.mulTo(c,h[f-2],h[f]),f+=2}for(var q=a.t-1,n,k=!0,j=nbi(),c=nbits(a[q])-1;q>=0;){c>=o?n=a[q]>>c-o&p:(n=(a[q]&(1<<c+1)-1)<<o-c,q>0&&(n|=a[q-1]>>this.DB+c-o));for(f=d;(n&1)==0;)n>>=1,--f;if((c-=f)<0)c+=this.DB,--q;if(k)h[n].copyTo(e),
|
||||
k=!1;else{for(;f>1;)g.sqrTo(e,j),g.sqrTo(j,e),f-=2;f>0?g.sqrTo(e,j):(f=e,e=j,j=f);g.mulTo(j,h[n],e)}for(;q>=0&&(a[q]&1<<c)==0;)g.sqrTo(e,j),f=e,e=j,j=f,--c<0&&(c=this.DB-1,--q)}return g.revert(e)}
|
||||
function bnGCD(a){var b=this.s<0?this.negate():this.clone(),a=a.s<0?a.negate():a.clone();if(b.compareTo(a)<0)var c=b,b=a,a=c;var c=b.getLowestSetBit(),d=a.getLowestSetBit();if(d<0)return b;c<d&&(d=c);d>0&&(b.rShiftTo(d,b),a.rShiftTo(d,a));for(;b.signum()>0;)(c=b.getLowestSetBit())>0&&b.rShiftTo(c,b),(c=a.getLowestSetBit())>0&&a.rShiftTo(c,a),b.compareTo(a)>=0?(b.subTo(a,b),b.rShiftTo(1,b)):(a.subTo(b,a),a.rShiftTo(1,a));d>0&&a.lShiftTo(d,a);return a}
|
||||
function bnpModInt(a){if(a<=0)return 0;var b=this.DV%a,c=this.s<0?a-1:0;if(this.t>0)if(b==0)c=this[0]%a;else for(var d=this.t-1;d>=0;--d)c=(b*c+this[d])%a;return c}
|
||||
function bnModInverse(a){var b=a.isEven();if(this.isEven()&&b||a.signum()==0)return BigInteger.ZERO;for(var c=a.clone(),d=this.clone(),e=nbv(1),g=nbv(0),h=nbv(0),f=nbv(1);c.signum()!=0;){for(;c.isEven();){c.rShiftTo(1,c);if(b){if(!e.isEven()||!g.isEven())e.addTo(this,e),g.subTo(a,g);e.rShiftTo(1,e)}else g.isEven()||g.subTo(a,g);g.rShiftTo(1,g)}for(;d.isEven();){d.rShiftTo(1,d);if(b){if(!h.isEven()||!f.isEven())h.addTo(this,h),f.subTo(a,f);h.rShiftTo(1,h)}else f.isEven()||f.subTo(a,f);f.rShiftTo(1,
|
||||
f)}c.compareTo(d)>=0?(c.subTo(d,c),b&&e.subTo(h,e),g.subTo(f,g)):(d.subTo(c,d),b&&h.subTo(e,h),f.subTo(g,f))}if(d.compareTo(BigInteger.ONE)!=0)return BigInteger.ZERO;if(f.compareTo(a)>=0)return f.subtract(a);if(f.signum()<0)f.addTo(a,f);else return f;return f.signum()<0?f.add(a):f}
|
||||
var lowprimes=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,
|
||||
733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],lplim=67108864/lowprimes[lowprimes.length-1];
|
||||
function bnIsProbablePrime(a){var b,c=this.abs();if(c.t==1&&c[0]<=lowprimes[lowprimes.length-1]){for(b=0;b<lowprimes.length;++b)if(c[0]==lowprimes[b])return!0;return!1}if(c.isEven())return!1;for(b=1;b<lowprimes.length;){for(var d=lowprimes[b],e=b+1;e<lowprimes.length&&d<lplim;)d*=lowprimes[e++];for(d=c.modInt(d);b<e;)if(d%lowprimes[b++]==0)return!1}return c.millerRabin(a)}
|
||||
function bnpMillerRabin(a){var b=this.subtract(BigInteger.ONE),c=b.getLowestSetBit();if(c<=0)return!1;var d=b.shiftRight(c),a=a+1>>1;if(a>lowprimes.length)a=lowprimes.length;for(var e=nbi(),g=0;g<a;++g){e.fromInt(lowprimes[Math.floor(Math.random()*lowprimes.length)]);var h=e.modPow(d,this);if(h.compareTo(BigInteger.ONE)!=0&&h.compareTo(b)!=0){for(var f=1;f++<c&&h.compareTo(b)!=0;)if(h=h.modPowInt(2,this),h.compareTo(BigInteger.ONE)==0)return!1;if(h.compareTo(b)!=0)return!1}}return!0}
|
||||
BigInteger.prototype.chunkSize=bnpChunkSize;BigInteger.prototype.toRadix=bnpToRadix;BigInteger.prototype.fromRadix=bnpFromRadix;BigInteger.prototype.fromNumber=bnpFromNumber;BigInteger.prototype.bitwiseTo=bnpBitwiseTo;BigInteger.prototype.changeBit=bnpChangeBit;BigInteger.prototype.addTo=bnpAddTo;BigInteger.prototype.dMultiply=bnpDMultiply;BigInteger.prototype.dAddOffset=bnpDAddOffset;BigInteger.prototype.multiplyLowerTo=bnpMultiplyLowerTo;BigInteger.prototype.multiplyUpperTo=bnpMultiplyUpperTo;
|
||||
BigInteger.prototype.modInt=bnpModInt;BigInteger.prototype.millerRabin=bnpMillerRabin;BigInteger.prototype.clone=bnClone;BigInteger.prototype.intValue=bnIntValue;BigInteger.prototype.byteValue=bnByteValue;BigInteger.prototype.shortValue=bnShortValue;BigInteger.prototype.signum=bnSigNum;BigInteger.prototype.toByteArray=bnToByteArray;BigInteger.prototype.equals=bnEquals;BigInteger.prototype.min=bnMin;BigInteger.prototype.max=bnMax;BigInteger.prototype.and=bnAnd;BigInteger.prototype.or=bnOr;
|
||||
BigInteger.prototype.xor=bnXor;BigInteger.prototype.andNot=bnAndNot;BigInteger.prototype.not=bnNot;BigInteger.prototype.shiftLeft=bnShiftLeft;BigInteger.prototype.shiftRight=bnShiftRight;BigInteger.prototype.getLowestSetBit=bnGetLowestSetBit;BigInteger.prototype.bitCount=bnBitCount;BigInteger.prototype.testBit=bnTestBit;BigInteger.prototype.setBit=bnSetBit;BigInteger.prototype.clearBit=bnClearBit;BigInteger.prototype.flipBit=bnFlipBit;BigInteger.prototype.add=bnAdd;BigInteger.prototype.subtract=bnSubtract;
|
||||
BigInteger.prototype.multiply=bnMultiply;BigInteger.prototype.divide=bnDivide;BigInteger.prototype.remainder=bnRemainder;BigInteger.prototype.divideAndRemainder=bnDivideAndRemainder;BigInteger.prototype.modPow=bnModPow;BigInteger.prototype.modInverse=bnModInverse;BigInteger.prototype.pow=bnPow;BigInteger.prototype.gcd=bnGCD;BigInteger.prototype.isProbablePrime=bnIsProbablePrime;BigInteger.prototype.square=bnSquare;
|
||||
(function(a,b,c,d,e,g,h){function f(a){var b,d,e=this,g=a.length,f=0,h=e.i=e.j=e.m=0;e.S=[];e.c=[];for(g||(a=[g++]);f<c;)e.S[f]=f++;for(f=0;f<c;f++)b=e.S[f],h=h+b+a[f%g]&c-1,d=e.S[h],e.S[f]=d,e.S[h]=b;e.g=function(a){var b=e.S,d=e.i+1&c-1,g=b[d],f=e.j+g&c-1,h=b[f];b[d]=h;b[f]=g;for(var k=b[g+h&c-1];--a;)d=d+1&c-1,g=b[d],f=f+g&c-1,h=b[f],b[d]=h,b[f]=g,k=k*c+b[g+h&c-1];e.i=d;e.j=f;return k};e.g(c)}function o(a,b,c,d,e){c=[];e=typeof a;if(b&&e=="object")for(d in a)if(d.indexOf("S")<5)try{c.push(o(a[d],
|
||||
b-1))}catch(g){}return c.length?c:a+(e!="string"?"\x00":"")}function p(a,b,d,e){a+="";for(e=d=0;e<a.length;e++){var g=b,f=e&c-1,h=(d^=b[e&c-1]*19)+a.charCodeAt(e);g[f]=h&c-1}a="";for(e in b)a+=String.fromCharCode(b[e]);return a}b.seedrandom=function(q,n){var k=[],j,q=p(o(n?[q,a]:arguments.length?q:[(new Date).getTime(),a,window],3),k);j=new f(k);p(j.S,a);b.random=function(){for(var a=j.g(d),b=h,f=0;a<e;)a=(a+f)*c,b*=c,f=j.g(1);for(;a>=g;)a/=2,b/=2,f>>>=1;return(a+f)/b};return q};h=b.pow(c,d);e=b.pow(2,
|
||||
e);g=e*2;p(b.random(),a)})([],Math,256,6,52);function SeededRandom(){}function SRnextBytes(a){var b;for(b=0;b<a.length;b++)a[b]=Math.floor(Math.random()*256)}SeededRandom.prototype.nextBytes=SRnextBytes;function Arcfour(){this.j=this.i=0;this.S=[]}function ARC4init(a){var b,c,d;for(b=0;b<256;++b)this.S[b]=b;for(b=c=0;b<256;++b)c=c+this.S[b]+a[b%a.length]&255,d=this.S[b],this.S[b]=this.S[c],this.S[c]=d;this.j=this.i=0}
|
||||
function ARC4next(){var a;this.i=this.i+1&255;this.j=this.j+this.S[this.i]&255;a=this.S[this.i];this.S[this.i]=this.S[this.j];this.S[this.j]=a;return this.S[a+this.S[this.i]&255]}Arcfour.prototype.init=ARC4init;Arcfour.prototype.next=ARC4next;function prng_newstate(){return new Arcfour}var rng_psize=256,rng_state,rng_pool,rng_pptr;
|
||||
function rng_seed_int(a){rng_pool[rng_pptr++]^=a&255;rng_pool[rng_pptr++]^=a>>8&255;rng_pool[rng_pptr++]^=a>>16&255;rng_pool[rng_pptr++]^=a>>24&255;rng_pptr>=rng_psize&&(rng_pptr-=rng_psize)}function rng_seed_time(){rng_seed_int((new Date).getTime())}
|
||||
if(rng_pool==null){rng_pool=[];rng_pptr=0;var t;if(navigator.appName=="Netscape"&&navigator.appVersion<"5"&&window.crypto){var z=window.crypto.random(32);for(t=0;t<z.length;++t)rng_pool[rng_pptr++]=z.charCodeAt(t)&255}for(;rng_pptr<rng_psize;)t=Math.floor(65536*Math.random()),rng_pool[rng_pptr++]=t>>>8,rng_pool[rng_pptr++]=t&255;rng_pptr=0;rng_seed_time()}
|
||||
function rng_get_byte(){if(rng_state==null){rng_seed_time();rng_state=prng_newstate();rng_state.init(rng_pool);for(rng_pptr=0;rng_pptr<rng_pool.length;++rng_pptr)rng_pool[rng_pptr]=0;rng_pptr=0}return rng_state.next()}function rng_get_bytes(a){var b;for(b=0;b<a.length;++b)a[b]=rng_get_byte()}function SecureRandom(){}SecureRandom.prototype.nextBytes=rng_get_bytes;
|
||||
function SHA256(a){function b(a,b){var c=(a&65535)+(b&65535);return(a>>16)+(b>>16)+(c>>16)<<16|c&65535}function c(a,b){return a>>>b|a<<32-b}a=function(a){for(var a=a.replace(/\r\n/g,"\n"),b="",c=0;c<a.length;c++){var h=a.charCodeAt(c);h<128?b+=String.fromCharCode(h):(h>127&&h<2048?b+=String.fromCharCode(h>>6|192):(b+=String.fromCharCode(h>>12|224),b+=String.fromCharCode(h>>6&63|128)),b+=String.fromCharCode(h&63|128))}return b}(a);return function(a){for(var b="",c=0;c<a.length*4;c++)b+="0123456789abcdef".charAt(a[c>>
|
||||
2]>>(3-c%4)*8+4&15)+"0123456789abcdef".charAt(a[c>>2]>>(3-c%4)*8&15);return b}(function(a,e){var g=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,
|
||||
2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],f=Array(64),o,p,q,n,k,j,l,m,s,r,u,w;a[e>>5]|=128<<24-e%32;a[(e+64>>9<<4)+15]=e;for(s=0;s<a.length;s+=16){o=h[0];p=h[1];q=h[2];n=h[3];
|
||||
k=h[4];j=h[5];l=h[6];m=h[7];for(r=0;r<64;r++)f[r]=r<16?a[r+s]:b(b(b(c(f[r-2],17)^c(f[r-2],19)^f[r-2]>>>10,f[r-7]),c(f[r-15],7)^c(f[r-15],18)^f[r-15]>>>3),f[r-16]),u=b(b(b(b(m,c(k,6)^c(k,11)^c(k,25)),k&j^~k&l),g[r]),f[r]),w=b(c(o,2)^c(o,13)^c(o,22),o&p^o&q^p&q),m=l,l=j,j=k,k=b(n,u),n=q,q=p,p=o,o=b(u,w);h[0]=b(o,h[0]);h[1]=b(p,h[1]);h[2]=b(q,h[2]);h[3]=b(n,h[3]);h[4]=b(k,h[4]);h[5]=b(j,h[5]);h[6]=b(l,h[6]);h[7]=b(m,h[7])}return h}(function(a){for(var b=[],c=0;c<a.length*8;c+=8)b[c>>5]|=(a.charCodeAt(c/
|
||||
8)&255)<<24-c%32;return b}(a),a.length*8))}var sha256={hex:function(a){return SHA256(a)}};
|
||||
function SHA1(a){function b(a,b){return a<<b|a>>>32-b}function c(a){var b="",c,d;for(c=7;c>=0;c--)d=a>>>c*4&15,b+=d.toString(16);return b}var d,e,g=Array(80),h=1732584193,f=4023233417,o=2562383102,p=271733878,q=3285377520,n,k,j,l,m,a=function(a){for(var a=a.replace(/\r\n/g,"\n"),b="",c=0;c<a.length;c++){var d=a.charCodeAt(c);d<128?b+=String.fromCharCode(d):(d>127&&d<2048?b+=String.fromCharCode(d>>6|192):(b+=String.fromCharCode(d>>12|224),b+=String.fromCharCode(d>>6&63|128)),b+=String.fromCharCode(d&
|
||||
63|128))}return b}(a);n=a.length;var s=[];for(d=0;d<n-3;d+=4)e=a.charCodeAt(d)<<24|a.charCodeAt(d+1)<<16|a.charCodeAt(d+2)<<8|a.charCodeAt(d+3),s.push(e);switch(n%4){case 0:d=2147483648;break;case 1:d=a.charCodeAt(n-1)<<24|8388608;break;case 2:d=a.charCodeAt(n-2)<<24|a.charCodeAt(n-1)<<16|32768;break;case 3:d=a.charCodeAt(n-3)<<24|a.charCodeAt(n-2)<<16|a.charCodeAt(n-1)<<8|128}for(s.push(d);s.length%16!=14;)s.push(0);s.push(n>>>29);s.push(n<<3&4294967295);for(a=0;a<s.length;a+=16){for(d=0;d<16;d++)g[d]=
|
||||
s[a+d];for(d=16;d<=79;d++)g[d]=b(g[d-3]^g[d-8]^g[d-14]^g[d-16],1);e=h;n=f;k=o;j=p;l=q;for(d=0;d<=19;d++)m=b(e,5)+(n&k|~n&j)+l+g[d]+1518500249&4294967295,l=j,j=k,k=b(n,30),n=e,e=m;for(d=20;d<=39;d++)m=b(e,5)+(n^k^j)+l+g[d]+1859775393&4294967295,l=j,j=k,k=b(n,30),n=e,e=m;for(d=40;d<=59;d++)m=b(e,5)+(n&k|n&j|k&j)+l+g[d]+2400959708&4294967295,l=j,j=k,k=b(n,30),n=e,e=m;for(d=60;d<=79;d++)m=b(e,5)+(n^k^j)+l+g[d]+3395469782&4294967295,l=j,j=k,k=b(n,30),n=e,e=m;h=h+e&4294967295;f=f+n&4294967295;o=o+k&4294967295;
|
||||
p=p+j&4294967295;q=q+l&4294967295}m=c(h)+c(f)+c(o)+c(p)+c(q);return m.toLowerCase()}
|
||||
var sha1={hex:function(a){return SHA1(a)}},MD5=function(a){function b(a,b){var c,d,e,f,g;e=a&2147483648;f=b&2147483648;c=a&1073741824;d=b&1073741824;g=(a&1073741823)+(b&1073741823);return c&d?g^2147483648^e^f:c|d?g&1073741824?g^3221225472^e^f:g^1073741824^e^f:g^e^f}function c(a,c,d,e,f,g,h){a=b(a,b(b(c&d|~c&e,f),h));return b(a<<g|a>>>32-g,c)}function d(a,c,d,e,f,g,h){a=b(a,b(b(c&e|d&~e,f),h));return b(a<<g|a>>>32-g,c)}function e(a,c,d,e,f,g,h){a=b(a,b(b(c^d^e,f),h));return b(a<<g|a>>>32-g,c)}function g(a,
|
||||
c,d,e,f,g,h){a=b(a,b(b(d^(c|~e),f),h));return b(a<<g|a>>>32-g,c)}function h(a){var b="",c="",d;for(d=0;d<=3;d++)c=a>>>d*8&255,c="0"+c.toString(16),b+=c.substr(c.length-2,2);return b}var f=[],o,p,q,n,k,j,l,m,a=function(a){for(var a=a.replace(/\r\n/g,"\n"),b="",c=0;c<a.length;c++){var d=a.charCodeAt(c);d<128?b+=String.fromCharCode(d):(d>127&&d<2048?b+=String.fromCharCode(d>>6|192):(b+=String.fromCharCode(d>>12|224),b+=String.fromCharCode(d>>6&63|128)),b+=String.fromCharCode(d&63|128))}return b}(a),
|
||||
f=function(a){var b,c=a.length;b=c+8;for(var d=((b-b%64)/64+1)*16,e=Array(d-1),f=0,g=0;g<c;)b=(g-g%4)/4,f=g%4*8,e[b]|=a.charCodeAt(g)<<f,g++;e[(g-g%4)/4]|=128<<g%4*8;e[d-2]=c<<3;e[d-1]=c>>>29;return e}(a);k=1732584193;j=4023233417;l=2562383102;m=271733878;for(a=0;a<f.length;a+=16)o=k,p=j,q=l,n=m,k=c(k,j,l,m,f[a+0],7,3614090360),m=c(m,k,j,l,f[a+1],12,3905402710),l=c(l,m,k,j,f[a+2],17,606105819),j=c(j,l,m,k,f[a+3],22,3250441966),k=c(k,j,l,m,f[a+4],7,4118548399),m=c(m,k,j,l,f[a+5],12,1200080426),l=c(l,
|
||||
m,k,j,f[a+6],17,2821735955),j=c(j,l,m,k,f[a+7],22,4249261313),k=c(k,j,l,m,f[a+8],7,1770035416),m=c(m,k,j,l,f[a+9],12,2336552879),l=c(l,m,k,j,f[a+10],17,4294925233),j=c(j,l,m,k,f[a+11],22,2304563134),k=c(k,j,l,m,f[a+12],7,1804603682),m=c(m,k,j,l,f[a+13],12,4254626195),l=c(l,m,k,j,f[a+14],17,2792965006),j=c(j,l,m,k,f[a+15],22,1236535329),k=d(k,j,l,m,f[a+1],5,4129170786),m=d(m,k,j,l,f[a+6],9,3225465664),l=d(l,m,k,j,f[a+11],14,643717713),j=d(j,l,m,k,f[a+0],20,3921069994),k=d(k,j,l,m,f[a+5],5,3593408605),
|
||||
m=d(m,k,j,l,f[a+10],9,38016083),l=d(l,m,k,j,f[a+15],14,3634488961),j=d(j,l,m,k,f[a+4],20,3889429448),k=d(k,j,l,m,f[a+9],5,568446438),m=d(m,k,j,l,f[a+14],9,3275163606),l=d(l,m,k,j,f[a+3],14,4107603335),j=d(j,l,m,k,f[a+8],20,1163531501),k=d(k,j,l,m,f[a+13],5,2850285829),m=d(m,k,j,l,f[a+2],9,4243563512),l=d(l,m,k,j,f[a+7],14,1735328473),j=d(j,l,m,k,f[a+12],20,2368359562),k=e(k,j,l,m,f[a+5],4,4294588738),m=e(m,k,j,l,f[a+8],11,2272392833),l=e(l,m,k,j,f[a+11],16,1839030562),j=e(j,l,m,k,f[a+14],23,4259657740),
|
||||
k=e(k,j,l,m,f[a+1],4,2763975236),m=e(m,k,j,l,f[a+4],11,1272893353),l=e(l,m,k,j,f[a+7],16,4139469664),j=e(j,l,m,k,f[a+10],23,3200236656),k=e(k,j,l,m,f[a+13],4,681279174),m=e(m,k,j,l,f[a+0],11,3936430074),l=e(l,m,k,j,f[a+3],16,3572445317),j=e(j,l,m,k,f[a+6],23,76029189),k=e(k,j,l,m,f[a+9],4,3654602809),m=e(m,k,j,l,f[a+12],11,3873151461),l=e(l,m,k,j,f[a+15],16,530742520),j=e(j,l,m,k,f[a+2],23,3299628645),k=g(k,j,l,m,f[a+0],6,4096336452),m=g(m,k,j,l,f[a+7],10,1126891415),l=g(l,m,k,j,f[a+14],15,2878612391),
|
||||
j=g(j,l,m,k,f[a+5],21,4237533241),k=g(k,j,l,m,f[a+12],6,1700485571),m=g(m,k,j,l,f[a+3],10,2399980690),l=g(l,m,k,j,f[a+10],15,4293915773),j=g(j,l,m,k,f[a+1],21,2240044497),k=g(k,j,l,m,f[a+8],6,1873313359),m=g(m,k,j,l,f[a+15],10,4264355552),l=g(l,m,k,j,f[a+6],15,2734768916),j=g(j,l,m,k,f[a+13],21,1309151649),k=g(k,j,l,m,f[a+4],6,4149444226),m=g(m,k,j,l,f[a+11],10,3174756917),l=g(l,m,k,j,f[a+2],15,718787259),j=g(j,l,m,k,f[a+9],21,3951481745),k=b(k,o),j=b(j,p),l=b(l,q),m=b(m,n);return(h(k)+h(j)+h(l)+
|
||||
h(m)).toLowerCase()};function parseBigInt(a,b){return new BigInteger(a,b)}function linebrk(a,b){for(var c="",d=0;d+b<a.length;)c+=a.substring(d,d+b)+"\n",d+=b;return c+a.substring(d,a.length)}function byte2Hex(a){return a<16?"0"+a.toString(16):a.toString(16)}
|
||||
function pkcs1pad2(a,b){if(b<a.length+11)throw"Message too long for RSA (n="+b+", l="+a.length+")";for(var c=[],d=a.length-1;d>=0&&b>0;){var e=a.charCodeAt(d--);e<128?c[--b]=e:e>127&&e<2048?(c[--b]=e&63|128,c[--b]=e>>6|192):(c[--b]=e&63|128,c[--b]=e>>6&63|128,c[--b]=e>>12|224)}c[--b]=0;d=new SecureRandom;for(e=[];b>2;){for(e[0]=0;e[0]==0;)d.nextBytes(e);c[--b]=e[0]}c[--b]=2;c[--b]=0;return new BigInteger(c)}
|
||||
function RSAKey(){this.n=null;this.e=0;this.coeff=this.dmq1=this.dmp1=this.q=this.p=this.d=null}function RSASetPublic(a,b){a!=null&&b!=null&&a.length>0&&b.length>0?(this.n=parseBigInt(a,16),this.e=parseInt(b,16)):alert("Invalid RSA public key")}function RSADoPublic(a){return a.modPowInt(this.e,this.n)}function RSAEncrypt(a){a=pkcs1pad2(a,this.n.bitLength()+7>>3);if(a==null)return null;a=this.doPublic(a);if(a==null)return null;a=a.toString(16);return(a.length&1)==0?a:"0"+a}
|
||||
RSAKey.prototype.doPublic=RSADoPublic;RSAKey.prototype.setPublic=RSASetPublic;RSAKey.prototype.encrypt=RSAEncrypt;function pkcs1unpad2(a,b){for(var c=a.toByteArray(),d=0;d<c.length&&c[d]==0;)++d;if(c.length-d!=b-1||c[d]!=2)return null;for(++d;c[d]!=0;)if(++d>=c.length)return null;for(var e="";++d<c.length;){var g=c[d]&255;g<128?e+=String.fromCharCode(g):g>191&&g<224?(e+=String.fromCharCode((g&31)<<6|c[d+1]&63),++d):(e+=String.fromCharCode((g&15)<<12|(c[d+1]&63)<<6|c[d+2]&63),d+=2)}return e}
|
||||
function RSASetPrivate(a,b,c){a!=null&&b!=null&&a.length>0&&b.length>0?(this.n=parseBigInt(a,16),this.e=parseInt(b,16),this.d=parseBigInt(c,16)):alert("Invalid RSA private key")}
|
||||
function RSASetPrivateEx(a,b,c,d,e,g,h,f){a!=null&&b!=null&&a.length>0&&b.length>0?(this.n=parseBigInt(a,16),this.e=parseInt(b,16),this.d=parseBigInt(c,16),this.p=parseBigInt(d,16),this.q=parseBigInt(e,16),this.dmp1=parseBigInt(g,16),this.dmq1=parseBigInt(h,16),this.coeff=parseBigInt(f,16)):alert("Invalid RSA private key")}
|
||||
function RSAGenerate(a,b){var c=new SeededRandom,d=a>>1;this.e=parseInt(b,16);for(var e=new BigInteger(b,16);;){for(;;)if(this.p=new BigInteger(a-d,1,c),this.p.subtract(BigInteger.ONE).gcd(e).compareTo(BigInteger.ONE)==0&&this.p.isProbablePrime(10))break;for(;;)if(this.q=new BigInteger(d,1,c),this.q.subtract(BigInteger.ONE).gcd(e).compareTo(BigInteger.ONE)==0&&this.q.isProbablePrime(10))break;if(this.p.compareTo(this.q)<=0){var g=this.p;this.p=this.q;this.q=g}var g=this.p.subtract(BigInteger.ONE),
|
||||
h=this.q.subtract(BigInteger.ONE),f=g.multiply(h);if(f.gcd(e).compareTo(BigInteger.ONE)==0){this.n=this.p.multiply(this.q);this.d=e.modInverse(f);this.dmp1=this.d.mod(g);this.dmq1=this.d.mod(h);this.coeff=this.q.modInverse(this.p);break}}}
|
||||
function RSADoPrivate(a){if(this.p==null||this.q==null)return a.modPow(this.d,this.n);for(var b=a.mod(this.p).modPow(this.dmp1,this.p),a=a.mod(this.q).modPow(this.dmq1,this.q);b.compareTo(a)<0;)b=b.add(this.p);return b.subtract(a).multiply(this.coeff).mod(this.p).multiply(this.q).add(a)}function RSADecrypt(a){a=this.doPrivate(parseBigInt(a,16));return a==null?null:pkcs1unpad2(a,this.n.bitLength()+7>>3)}RSAKey.prototype.doPrivate=RSADoPrivate;RSAKey.prototype.setPrivate=RSASetPrivate;
|
||||
RSAKey.prototype.setPrivateEx=RSASetPrivateEx;RSAKey.prototype.generate=RSAGenerate;RSAKey.prototype.decrypt=RSADecrypt;var _RSASIGN_DIHEAD=[];_RSASIGN_DIHEAD.sha1="3021300906052b0e03021a05000414";_RSASIGN_DIHEAD.sha256="3031300d060960864801650304020105000420";var _RSASIGN_HASHHEXFUNC=[];_RSASIGN_HASHHEXFUNC.sha1=sha1.hex;_RSASIGN_HASHHEXFUNC.sha256=sha256.hex;
|
||||
function _rsasign_getHexPaddedDigestInfoForString(a,b,c){b/=4;for(var a=(0,_RSASIGN_HASHHEXFUNC[c])(a),c="00"+_RSASIGN_DIHEAD[c]+a,a="",b=b-4-c.length,d=0;d<b;d+=2)a+="ff";return sPaddedMessageHex="0001"+a+c}function _rsasign_signString(a,b){var c=_rsasign_getHexPaddedDigestInfoForString(a,this.n.bitLength(),b);return this.doPrivate(parseBigInt(c,16)).toString(16)}
|
||||
function _rsasign_signStringWithSHA1(a){a=_rsasign_getHexPaddedDigestInfoForString(a,this.n.bitLength(),"sha1");return this.doPrivate(parseBigInt(a,16)).toString(16)}function _rsasign_signStringWithSHA256(a){a=_rsasign_getHexPaddedDigestInfoForString(a,this.n.bitLength(),"sha256");return this.doPrivate(parseBigInt(a,16)).toString(16)}function _rsasign_getDecryptSignatureBI(a,b,c){var d=new RSAKey;d.setPublic(b,c);return d.doPublic(a)}
|
||||
function _rsasign_getHexDigestInfoFromSig(a,b,c){return _rsasign_getDecryptSignatureBI(a,b,c).toString(16).replace(/^1f+00/,"")}function _rsasign_getAlgNameAndHashFromHexDisgestInfo(a){for(var b in _RSASIGN_DIHEAD){var c=_RSASIGN_DIHEAD[b],d=c.length;if(a.substring(0,d)==c)return[b,a.substring(d)]}return[]}
|
||||
function _rsasign_verifySignatureWithArgs(a,b,c,d){b=_rsasign_getHexDigestInfoFromSig(b,c,d);c=_rsasign_getAlgNameAndHashFromHexDisgestInfo(b);if(c.length==0)return!1;b=c[1];a=(0,_RSASIGN_HASHHEXFUNC[c[0]])(a);return b==a}function _rsasign_verifyHexSignatureForMessage(a,b){var c=parseBigInt(a,16);return _rsasign_verifySignatureWithArgs(b,c,this.n.toString(16),this.e.toString(16))}
|
||||
function _rsasign_verifyString(a,b){var b=b.replace(/[ \n]+/g,""),c=this.doPublic(parseBigInt(b,16)).toString(16).replace(/^1f+00/,""),d=_rsasign_getAlgNameAndHashFromHexDisgestInfo(c);if(d.length==0)return!1;c=d[1];d=(0,_RSASIGN_HASHHEXFUNC[d[0]])(a);return c==d}RSAKey.prototype.signString=_rsasign_signString;RSAKey.prototype.signStringWithSHA1=_rsasign_signStringWithSHA1;RSAKey.prototype.signStringWithSHA256=_rsasign_signStringWithSHA256;RSAKey.prototype.verifyString=_rsasign_verifyString;
|
||||
RSAKey.prototype.verifyHexSignatureForMessage=_rsasign_verifyHexSignatureForMessage;
|
||||
var aes=function(){var a={Sbox:[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,
|
||||
95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22],ShiftRowTab:[0,5,10,15,4,9,14,3,8,13,2,7,12,1,6,11]};a.Init=
|
||||
function(){a.Sbox_Inv=Array(256);for(var b=0;b<256;b++)a.Sbox_Inv[a.Sbox[b]]=b;a.ShiftRowTab_Inv=Array(16);for(b=0;b<16;b++)a.ShiftRowTab_Inv[a.ShiftRowTab[b]]=b;a.xtime=Array(256);for(b=0;b<128;b++)a.xtime[b]=b<<1,a.xtime[128+b]=b<<1^27};a.Done=function(){delete a.Sbox_Inv;delete a.ShiftRowTab_Inv;delete a.xtime};a.ExpandKey=function(b){var c=b.length,d,e=1;switch(c){case 16:d=176;break;case 24:d=208;break;case 32:d=240;break;default:alert("my.ExpandKey: Only key lengths of 16, 24 or 32 bytes allowed!")}for(var g=
|
||||
c;g<d;g+=4){var h=b.slice(g-4,g);if(g%c==0){if(h=[a.Sbox[h[1]]^e,a.Sbox[h[2]],a.Sbox[h[3]],a.Sbox[h[0]]],(e<<=1)>=256)e^=283}else c>24&&g%c==16&&(h=[a.Sbox[h[0]],a.Sbox[h[1]],a.Sbox[h[2]],a.Sbox[h[3]]]);for(var f=0;f<4;f++)b[g+f]=b[g+f-c]^h[f]}};a.Encrypt=function(b,c){var d=c.length;a.AddRoundKey(b,c.slice(0,16));for(var e=16;e<d-16;e+=16)a.SubBytes(b,a.Sbox),a.ShiftRows(b,a.ShiftRowTab),a.MixColumns(b),a.AddRoundKey(b,c.slice(e,e+16));a.SubBytes(b,a.Sbox);a.ShiftRows(b,a.ShiftRowTab);a.AddRoundKey(b,
|
||||
c.slice(e,d))};a.Decrypt=function(b,c){var d=c.length;a.AddRoundKey(b,c.slice(d-16,d));a.ShiftRows(b,a.ShiftRowTab_Inv);a.SubBytes(b,a.Sbox_Inv);for(d-=32;d>=16;d-=16)a.AddRoundKey(b,c.slice(d,d+16)),a.MixColumns_Inv(b),a.ShiftRows(b,a.ShiftRowTab_Inv),a.SubBytes(b,a.Sbox_Inv);a.AddRoundKey(b,c.slice(0,16))};a.SubBytes=function(a,c){for(var d=0;d<16;d++)a[d]=c[a[d]]};a.AddRoundKey=function(a,c){for(var d=0;d<16;d++)a[d]^=c[d]};a.ShiftRows=function(a,c){for(var d=[].concat(a),e=0;e<16;e++)a[e]=d[c[e]]};
|
||||
a.MixColumns=function(b){for(var c=0;c<16;c+=4){var d=b[c+0],e=b[c+1],g=b[c+2],h=b[c+3],f=d^e^g^h;b[c+0]^=f^a.xtime[d^e];b[c+1]^=f^a.xtime[e^g];b[c+2]^=f^a.xtime[g^h];b[c+3]^=f^a.xtime[h^d]}};a.MixColumns_Inv=function(b){for(var c=0;c<16;c+=4){var d=b[c+0],e=b[c+1],g=b[c+2],h=b[c+3],f=d^e^g^h,o=a.xtime[f],p=a.xtime[a.xtime[o^d^g]]^f;f^=a.xtime[a.xtime[o^e^h]];b[c+0]^=p^a.xtime[d^e];b[c+1]^=f^a.xtime[e^g];b[c+2]^=p^a.xtime[g^h];b[c+3]^=f^a.xtime[h^d]}};return a}(),cryptico=function(){var a={};aes.Init();
|
||||
a.b256to64=function(a){var c,d,e,g="",h=0,f=0,o=a.length;for(e=0;e<o;e++)d=a.charCodeAt(e),f==0?(g+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(d>>2&63),c=(d&3)<<4):f==1?(g+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(c|d>>4&15),c=(d&15)<<2):f==2&&(g+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(c|d>>6&3),h+=1,g+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(d&63)),h+=1,f+=1,f==3&&
|
||||
(f=0);f>0&&(g+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(c),g+="=");f==1&&(g+="=");return g};a.b64to256=function(a){var c,d,e="",g=0,h=0,f=a.length;for(d=0;d<f;d++)c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(a.charAt(d)),c>=0&&(g&&(e+=String.fromCharCode(h|c>>6-g&255)),g=g+2&7,h=c<<g&255);return e};a.b16to64=function(a){var c,d,e="";a.length%2==1&&(a="0"+a);for(c=0;c+3<=a.length;c+=3)d=parseInt(a.substring(c,c+3),16),e+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(d>>
|
||||
6)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(d&63);c+1==a.length?(d=parseInt(a.substring(c,c+1),16),e+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(d<<2)):c+2==a.length&&(d=parseInt(a.substring(c,c+2),16),e+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(d>>2)+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((d&3)<<4));for(;(e.length&3)>0;)e+="=";return e};a.b64to16=function(a){var c="",
|
||||
d,e=0,g;for(d=0;d<a.length;++d){if(a.charAt(d)=="=")break;v="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(a.charAt(d));v<0||(e==0?(c+=int2char(v>>2),g=v&3,e=1):e==1?(c+=int2char(g<<2|v>>4),g=v&15,e=2):e==2?(c+=int2char(g),c+=int2char(v>>2),g=v&3,e=3):(c+=int2char(g<<2|v>>4),c+=int2char(v&15),e=0))}e==1&&(c+=int2char(g<<2));return c};a.string2bytes=function(a){for(var c=[],d=0;d<a.length;d++)c.push(a.charCodeAt(d));return c};a.bytes2string=function(a){for(var c="",d=0;d<
|
||||
a.length;d++)c+=String.fromCharCode(a[d]);return c};a.blockXOR=function(a,c){for(var d=Array(16),e=0;e<16;e++)d[e]=a[e]^c[e];return d};a.blockIV=function(){var a=new SecureRandom,c=Array(16);a.nextBytes(c);return c};a.pad16=function(a){var c=a.slice(0),d=(16-a.length%16)%16;for(i=a.length;i<a.length+d;i++)c.push(0);return c};a.depad=function(a){for(a=a.slice(0);a[a.length-1]==0;)a=a.slice(0,a.length-1);return a};a.encryptAESCBC=function(b,c){var d=c.slice(0);aes.ExpandKey(d);for(var e=a.string2bytes(b),
|
||||
e=a.pad16(e),g=a.blockIV(),h=0;h<e.length/16;h++){var f=e.slice(h*16,h*16+16),o=g.slice(h*16,h*16+16),f=a.blockXOR(o,f);aes.Encrypt(f,d);g=g.concat(f)}d=a.bytes2string(g);return a.b256to64(d)};a.decryptAESCBC=function(b,c){var d=c.slice(0);aes.ExpandKey(d);for(var b=a.b64to256(b),e=a.string2bytes(b),g=[],h=1;h<e.length/16;h++){var f=e.slice(h*16,h*16+16),o=e.slice((h-1)*16,(h-1)*16+16);aes.Decrypt(f,d);f=a.blockXOR(o,f);g=g.concat(f)}g=a.depad(g);return a.bytes2string(g)};a.wrap60=function(a){for(var c=
|
||||
"",d=0;d<a.length;d++)d%60==0&&d!=0&&(c+="\n"),c+=a[d];return c};a.generateAESKey=function(){var a=Array(16);(new SecureRandom).nextBytes(a);return a};a.generateRSAKey=function(a,c){Math.seedrandom(sha256.hex(a));var d=new RSAKey;d.generate(c,"10001");return d};a.publicKeyString=function(b){return pubkey=b.n.toString(16)};a.publicKeyID=function(a){return MD5(a)};a.publicKeyFromString=function(b){var b=b.split("|")[0],c=new RSAKey;c.setPublic(b,"10001");return c};a.encrypt=function(b,
|
||||
c,d){var e="";try{var h=a.publicKeyFromString(c);e+=h.encrypt(b)+"?"}catch(f){return{status:"Invalid public key"}};return{status:"success",cipher:e}};a.decrypt=function(b,c){var d=b.split("?"),e=c.decrypt(d[0]);return{status:"success",plaintext:e,signature:"unsigned"}};return a}();
|
|
@ -0,0 +1,35 @@
|
|||
/*
|
||||
CryptoJS v3.1.2
|
||||
code.google.com/p/crypto-js
|
||||
(c) 2009-2013 by Jeff Mott. All rights reserved.
|
||||
code.google.com/p/crypto-js/wiki/License
|
||||
*/
|
||||
var CryptoJS=CryptoJS||function(u,p){var d={},l=d.lib={},s=function(){},t=l.Base={extend:function(a){s.prototype=this;var c=new s;a&&c.mixIn(a);c.hasOwnProperty("init")||(c.init=function(){c.$super.init.apply(this,arguments)});c.init.prototype=c;c.$super=this;return c},create:function(){var a=this.extend();a.init.apply(a,arguments);return a},init:function(){},mixIn:function(a){for(var c in a)a.hasOwnProperty(c)&&(this[c]=a[c]);a.hasOwnProperty("toString")&&(this.toString=a.toString)},clone:function(){return this.init.prototype.extend(this)}},
|
||||
r=l.WordArray=t.extend({init:function(a,c){a=this.words=a||[];this.sigBytes=c!=p?c:4*a.length},toString:function(a){return(a||v).stringify(this)},concat:function(a){var c=this.words,e=a.words,j=this.sigBytes;a=a.sigBytes;this.clamp();if(j%4)for(var k=0;k<a;k++)c[j+k>>>2]|=(e[k>>>2]>>>24-8*(k%4)&255)<<24-8*((j+k)%4);else if(65535<e.length)for(k=0;k<a;k+=4)c[j+k>>>2]=e[k>>>2];else c.push.apply(c,e);this.sigBytes+=a;return this},clamp:function(){var a=this.words,c=this.sigBytes;a[c>>>2]&=4294967295<<
|
||||
32-8*(c%4);a.length=u.ceil(c/4)},clone:function(){var a=t.clone.call(this);a.words=this.words.slice(0);return a},random:function(a){for(var c=[],e=0;e<a;e+=4)c.push(4294967296*u.random()|0);return new r.init(c,a)}}),w=d.enc={},v=w.Hex={stringify:function(a){var c=a.words;a=a.sigBytes;for(var e=[],j=0;j<a;j++){var k=c[j>>>2]>>>24-8*(j%4)&255;e.push((k>>>4).toString(16));e.push((k&15).toString(16))}return e.join("")},parse:function(a){for(var c=a.length,e=[],j=0;j<c;j+=2)e[j>>>3]|=parseInt(a.substr(j,
|
||||
2),16)<<24-4*(j%8);return new r.init(e,c/2)}},b=w.Latin1={stringify:function(a){var c=a.words;a=a.sigBytes;for(var e=[],j=0;j<a;j++)e.push(String.fromCharCode(c[j>>>2]>>>24-8*(j%4)&255));return e.join("")},parse:function(a){for(var c=a.length,e=[],j=0;j<c;j++)e[j>>>2]|=(a.charCodeAt(j)&255)<<24-8*(j%4);return new r.init(e,c)}},x=w.Utf8={stringify:function(a){try{return decodeURIComponent(escape(b.stringify(a)))}catch(c){throw Error("Malformed UTF-8 data");}},parse:function(a){return b.parse(unescape(encodeURIComponent(a)))}},
|
||||
q=l.BufferedBlockAlgorithm=t.extend({reset:function(){this._data=new r.init;this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=x.parse(a));this._data.concat(a);this._nDataBytes+=a.sigBytes},_process:function(a){var c=this._data,e=c.words,j=c.sigBytes,k=this.blockSize,b=j/(4*k),b=a?u.ceil(b):u.max((b|0)-this._minBufferSize,0);a=b*k;j=u.min(4*a,j);if(a){for(var q=0;q<a;q+=k)this._doProcessBlock(e,q);q=e.splice(0,a);c.sigBytes-=j}return new r.init(q,j)},clone:function(){var a=t.clone.call(this);
|
||||
a._data=this._data.clone();return a},_minBufferSize:0});l.Hasher=q.extend({cfg:t.extend(),init:function(a){this.cfg=this.cfg.extend(a);this.reset()},reset:function(){q.reset.call(this);this._doReset()},update:function(a){this._append(a);this._process();return this},finalize:function(a){a&&this._append(a);return this._doFinalize()},blockSize:16,_createHelper:function(a){return function(b,e){return(new a.init(e)).finalize(b)}},_createHmacHelper:function(a){return function(b,e){return(new n.HMAC.init(a,
|
||||
e)).finalize(b)}}});var n=d.algo={};return d}(Math);
|
||||
(function(){var u=CryptoJS,p=u.lib.WordArray;u.enc.Base64={stringify:function(d){var l=d.words,p=d.sigBytes,t=this._map;d.clamp();d=[];for(var r=0;r<p;r+=3)for(var w=(l[r>>>2]>>>24-8*(r%4)&255)<<16|(l[r+1>>>2]>>>24-8*((r+1)%4)&255)<<8|l[r+2>>>2]>>>24-8*((r+2)%4)&255,v=0;4>v&&r+0.75*v<p;v++)d.push(t.charAt(w>>>6*(3-v)&63));if(l=t.charAt(64))for(;d.length%4;)d.push(l);return d.join("")},parse:function(d){var l=d.length,s=this._map,t=s.charAt(64);t&&(t=d.indexOf(t),-1!=t&&(l=t));for(var t=[],r=0,w=0;w<
|
||||
l;w++)if(w%4){var v=s.indexOf(d.charAt(w-1))<<2*(w%4),b=s.indexOf(d.charAt(w))>>>6-2*(w%4);t[r>>>2]|=(v|b)<<24-8*(r%4);r++}return p.create(t,r)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}})();
|
||||
(function(u){function p(b,n,a,c,e,j,k){b=b+(n&a|~n&c)+e+k;return(b<<j|b>>>32-j)+n}function d(b,n,a,c,e,j,k){b=b+(n&c|a&~c)+e+k;return(b<<j|b>>>32-j)+n}function l(b,n,a,c,e,j,k){b=b+(n^a^c)+e+k;return(b<<j|b>>>32-j)+n}function s(b,n,a,c,e,j,k){b=b+(a^(n|~c))+e+k;return(b<<j|b>>>32-j)+n}for(var t=CryptoJS,r=t.lib,w=r.WordArray,v=r.Hasher,r=t.algo,b=[],x=0;64>x;x++)b[x]=4294967296*u.abs(u.sin(x+1))|0;r=r.MD5=v.extend({_doReset:function(){this._hash=new w.init([1732584193,4023233417,2562383102,271733878])},
|
||||
_doProcessBlock:function(q,n){for(var a=0;16>a;a++){var c=n+a,e=q[c];q[c]=(e<<8|e>>>24)&16711935|(e<<24|e>>>8)&4278255360}var a=this._hash.words,c=q[n+0],e=q[n+1],j=q[n+2],k=q[n+3],z=q[n+4],r=q[n+5],t=q[n+6],w=q[n+7],v=q[n+8],A=q[n+9],B=q[n+10],C=q[n+11],u=q[n+12],D=q[n+13],E=q[n+14],x=q[n+15],f=a[0],m=a[1],g=a[2],h=a[3],f=p(f,m,g,h,c,7,b[0]),h=p(h,f,m,g,e,12,b[1]),g=p(g,h,f,m,j,17,b[2]),m=p(m,g,h,f,k,22,b[3]),f=p(f,m,g,h,z,7,b[4]),h=p(h,f,m,g,r,12,b[5]),g=p(g,h,f,m,t,17,b[6]),m=p(m,g,h,f,w,22,b[7]),
|
||||
f=p(f,m,g,h,v,7,b[8]),h=p(h,f,m,g,A,12,b[9]),g=p(g,h,f,m,B,17,b[10]),m=p(m,g,h,f,C,22,b[11]),f=p(f,m,g,h,u,7,b[12]),h=p(h,f,m,g,D,12,b[13]),g=p(g,h,f,m,E,17,b[14]),m=p(m,g,h,f,x,22,b[15]),f=d(f,m,g,h,e,5,b[16]),h=d(h,f,m,g,t,9,b[17]),g=d(g,h,f,m,C,14,b[18]),m=d(m,g,h,f,c,20,b[19]),f=d(f,m,g,h,r,5,b[20]),h=d(h,f,m,g,B,9,b[21]),g=d(g,h,f,m,x,14,b[22]),m=d(m,g,h,f,z,20,b[23]),f=d(f,m,g,h,A,5,b[24]),h=d(h,f,m,g,E,9,b[25]),g=d(g,h,f,m,k,14,b[26]),m=d(m,g,h,f,v,20,b[27]),f=d(f,m,g,h,D,5,b[28]),h=d(h,f,
|
||||
m,g,j,9,b[29]),g=d(g,h,f,m,w,14,b[30]),m=d(m,g,h,f,u,20,b[31]),f=l(f,m,g,h,r,4,b[32]),h=l(h,f,m,g,v,11,b[33]),g=l(g,h,f,m,C,16,b[34]),m=l(m,g,h,f,E,23,b[35]),f=l(f,m,g,h,e,4,b[36]),h=l(h,f,m,g,z,11,b[37]),g=l(g,h,f,m,w,16,b[38]),m=l(m,g,h,f,B,23,b[39]),f=l(f,m,g,h,D,4,b[40]),h=l(h,f,m,g,c,11,b[41]),g=l(g,h,f,m,k,16,b[42]),m=l(m,g,h,f,t,23,b[43]),f=l(f,m,g,h,A,4,b[44]),h=l(h,f,m,g,u,11,b[45]),g=l(g,h,f,m,x,16,b[46]),m=l(m,g,h,f,j,23,b[47]),f=s(f,m,g,h,c,6,b[48]),h=s(h,f,m,g,w,10,b[49]),g=s(g,h,f,m,
|
||||
E,15,b[50]),m=s(m,g,h,f,r,21,b[51]),f=s(f,m,g,h,u,6,b[52]),h=s(h,f,m,g,k,10,b[53]),g=s(g,h,f,m,B,15,b[54]),m=s(m,g,h,f,e,21,b[55]),f=s(f,m,g,h,v,6,b[56]),h=s(h,f,m,g,x,10,b[57]),g=s(g,h,f,m,t,15,b[58]),m=s(m,g,h,f,D,21,b[59]),f=s(f,m,g,h,z,6,b[60]),h=s(h,f,m,g,C,10,b[61]),g=s(g,h,f,m,j,15,b[62]),m=s(m,g,h,f,A,21,b[63]);a[0]=a[0]+f|0;a[1]=a[1]+m|0;a[2]=a[2]+g|0;a[3]=a[3]+h|0},_doFinalize:function(){var b=this._data,n=b.words,a=8*this._nDataBytes,c=8*b.sigBytes;n[c>>>5]|=128<<24-c%32;var e=u.floor(a/
|
||||
4294967296);n[(c+64>>>9<<4)+15]=(e<<8|e>>>24)&16711935|(e<<24|e>>>8)&4278255360;n[(c+64>>>9<<4)+14]=(a<<8|a>>>24)&16711935|(a<<24|a>>>8)&4278255360;b.sigBytes=4*(n.length+1);this._process();b=this._hash;n=b.words;for(a=0;4>a;a++)c=n[a],n[a]=(c<<8|c>>>24)&16711935|(c<<24|c>>>8)&4278255360;return b},clone:function(){var b=v.clone.call(this);b._hash=this._hash.clone();return b}});t.MD5=v._createHelper(r);t.HmacMD5=v._createHmacHelper(r)})(Math);
|
||||
(function(){var u=CryptoJS,p=u.lib,d=p.Base,l=p.WordArray,p=u.algo,s=p.EvpKDF=d.extend({cfg:d.extend({keySize:4,hasher:p.MD5,iterations:1}),init:function(d){this.cfg=this.cfg.extend(d)},compute:function(d,r){for(var p=this.cfg,s=p.hasher.create(),b=l.create(),u=b.words,q=p.keySize,p=p.iterations;u.length<q;){n&&s.update(n);var n=s.update(d).finalize(r);s.reset();for(var a=1;a<p;a++)n=s.finalize(n),s.reset();b.concat(n)}b.sigBytes=4*q;return b}});u.EvpKDF=function(d,l,p){return s.create(p).compute(d,
|
||||
l)}})();
|
||||
CryptoJS.lib.Cipher||function(u){var p=CryptoJS,d=p.lib,l=d.Base,s=d.WordArray,t=d.BufferedBlockAlgorithm,r=p.enc.Base64,w=p.algo.EvpKDF,v=d.Cipher=t.extend({cfg:l.extend(),createEncryptor:function(e,a){return this.create(this._ENC_XFORM_MODE,e,a)},createDecryptor:function(e,a){return this.create(this._DEC_XFORM_MODE,e,a)},init:function(e,a,b){this.cfg=this.cfg.extend(b);this._xformMode=e;this._key=a;this.reset()},reset:function(){t.reset.call(this);this._doReset()},process:function(e){this._append(e);return this._process()},
|
||||
finalize:function(e){e&&this._append(e);return this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(e){return{encrypt:function(b,k,d){return("string"==typeof k?c:a).encrypt(e,b,k,d)},decrypt:function(b,k,d){return("string"==typeof k?c:a).decrypt(e,b,k,d)}}}});d.StreamCipher=v.extend({_doFinalize:function(){return this._process(!0)},blockSize:1});var b=p.mode={},x=function(e,a,b){var c=this._iv;c?this._iv=u:c=this._prevBlock;for(var d=0;d<b;d++)e[a+d]^=
|
||||
c[d]},q=(d.BlockCipherMode=l.extend({createEncryptor:function(e,a){return this.Encryptor.create(e,a)},createDecryptor:function(e,a){return this.Decryptor.create(e,a)},init:function(e,a){this._cipher=e;this._iv=a}})).extend();q.Encryptor=q.extend({processBlock:function(e,a){var b=this._cipher,c=b.blockSize;x.call(this,e,a,c);b.encryptBlock(e,a);this._prevBlock=e.slice(a,a+c)}});q.Decryptor=q.extend({processBlock:function(e,a){var b=this._cipher,c=b.blockSize,d=e.slice(a,a+c);b.decryptBlock(e,a);x.call(this,
|
||||
e,a,c);this._prevBlock=d}});b=b.CBC=q;q=(p.pad={}).Pkcs7={pad:function(a,b){for(var c=4*b,c=c-a.sigBytes%c,d=c<<24|c<<16|c<<8|c,l=[],n=0;n<c;n+=4)l.push(d);c=s.create(l,c);a.concat(c)},unpad:function(a){a.sigBytes-=a.words[a.sigBytes-1>>>2]&255}};d.BlockCipher=v.extend({cfg:v.cfg.extend({mode:b,padding:q}),reset:function(){v.reset.call(this);var a=this.cfg,b=a.iv,a=a.mode;if(this._xformMode==this._ENC_XFORM_MODE)var c=a.createEncryptor;else c=a.createDecryptor,this._minBufferSize=1;this._mode=c.call(a,
|
||||
this,b&&b.words)},_doProcessBlock:function(a,b){this._mode.processBlock(a,b)},_doFinalize:function(){var a=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){a.pad(this._data,this.blockSize);var b=this._process(!0)}else b=this._process(!0),a.unpad(b);return b},blockSize:4});var n=d.CipherParams=l.extend({init:function(a){this.mixIn(a)},toString:function(a){return(a||this.formatter).stringify(this)}}),b=(p.format={}).OpenSSL={stringify:function(a){var b=a.ciphertext;a=a.salt;return(a?s.create([1398893684,
|
||||
1701076831]).concat(a).concat(b):b).toString(r)},parse:function(a){a=r.parse(a);var b=a.words;if(1398893684==b[0]&&1701076831==b[1]){var c=s.create(b.slice(2,4));b.splice(0,4);a.sigBytes-=16}return n.create({ciphertext:a,salt:c})}},a=d.SerializableCipher=l.extend({cfg:l.extend({format:b}),encrypt:function(a,b,c,d){d=this.cfg.extend(d);var l=a.createEncryptor(c,d);b=l.finalize(b);l=l.cfg;return n.create({ciphertext:b,key:c,iv:l.iv,algorithm:a,mode:l.mode,padding:l.padding,blockSize:a.blockSize,formatter:d.format})},
|
||||
decrypt:function(a,b,c,d){d=this.cfg.extend(d);b=this._parse(b,d.format);return a.createDecryptor(c,d).finalize(b.ciphertext)},_parse:function(a,b){return"string"==typeof a?b.parse(a,this):a}}),p=(p.kdf={}).OpenSSL={execute:function(a,b,c,d){d||(d=s.random(8));a=w.create({keySize:b+c}).compute(a,d);c=s.create(a.words.slice(b),4*c);a.sigBytes=4*b;return n.create({key:a,iv:c,salt:d})}},c=d.PasswordBasedCipher=a.extend({cfg:a.cfg.extend({kdf:p}),encrypt:function(b,c,d,l){l=this.cfg.extend(l);d=l.kdf.execute(d,
|
||||
b.keySize,b.ivSize);l.iv=d.iv;b=a.encrypt.call(this,b,c,d.key,l);b.mixIn(d);return b},decrypt:function(b,c,d,l){l=this.cfg.extend(l);c=this._parse(c,l.format);d=l.kdf.execute(d,b.keySize,b.ivSize,c.salt);l.iv=d.iv;return a.decrypt.call(this,b,c,d.key,l)}})}();
|
||||
(function(){for(var u=CryptoJS,p=u.lib.BlockCipher,d=u.algo,l=[],s=[],t=[],r=[],w=[],v=[],b=[],x=[],q=[],n=[],a=[],c=0;256>c;c++)a[c]=128>c?c<<1:c<<1^283;for(var e=0,j=0,c=0;256>c;c++){var k=j^j<<1^j<<2^j<<3^j<<4,k=k>>>8^k&255^99;l[e]=k;s[k]=e;var z=a[e],F=a[z],G=a[F],y=257*a[k]^16843008*k;t[e]=y<<24|y>>>8;r[e]=y<<16|y>>>16;w[e]=y<<8|y>>>24;v[e]=y;y=16843009*G^65537*F^257*z^16843008*e;b[k]=y<<24|y>>>8;x[k]=y<<16|y>>>16;q[k]=y<<8|y>>>24;n[k]=y;e?(e=z^a[a[a[G^z]]],j^=a[a[j]]):e=j=1}var H=[0,1,2,4,8,
|
||||
16,32,64,128,27,54],d=d.AES=p.extend({_doReset:function(){for(var a=this._key,c=a.words,d=a.sigBytes/4,a=4*((this._nRounds=d+6)+1),e=this._keySchedule=[],j=0;j<a;j++)if(j<d)e[j]=c[j];else{var k=e[j-1];j%d?6<d&&4==j%d&&(k=l[k>>>24]<<24|l[k>>>16&255]<<16|l[k>>>8&255]<<8|l[k&255]):(k=k<<8|k>>>24,k=l[k>>>24]<<24|l[k>>>16&255]<<16|l[k>>>8&255]<<8|l[k&255],k^=H[j/d|0]<<24);e[j]=e[j-d]^k}c=this._invKeySchedule=[];for(d=0;d<a;d++)j=a-d,k=d%4?e[j]:e[j-4],c[d]=4>d||4>=j?k:b[l[k>>>24]]^x[l[k>>>16&255]]^q[l[k>>>
|
||||
8&255]]^n[l[k&255]]},encryptBlock:function(a,b){this._doCryptBlock(a,b,this._keySchedule,t,r,w,v,l)},decryptBlock:function(a,c){var d=a[c+1];a[c+1]=a[c+3];a[c+3]=d;this._doCryptBlock(a,c,this._invKeySchedule,b,x,q,n,s);d=a[c+1];a[c+1]=a[c+3];a[c+3]=d},_doCryptBlock:function(a,b,c,d,e,j,l,f){for(var m=this._nRounds,g=a[b]^c[0],h=a[b+1]^c[1],k=a[b+2]^c[2],n=a[b+3]^c[3],p=4,r=1;r<m;r++)var q=d[g>>>24]^e[h>>>16&255]^j[k>>>8&255]^l[n&255]^c[p++],s=d[h>>>24]^e[k>>>16&255]^j[n>>>8&255]^l[g&255]^c[p++],t=
|
||||
d[k>>>24]^e[n>>>16&255]^j[g>>>8&255]^l[h&255]^c[p++],n=d[n>>>24]^e[g>>>16&255]^j[h>>>8&255]^l[k&255]^c[p++],g=q,h=s,k=t;q=(f[g>>>24]<<24|f[h>>>16&255]<<16|f[k>>>8&255]<<8|f[n&255])^c[p++];s=(f[h>>>24]<<24|f[k>>>16&255]<<16|f[n>>>8&255]<<8|f[g&255])^c[p++];t=(f[k>>>24]<<24|f[n>>>16&255]<<16|f[g>>>8&255]<<8|f[h&255])^c[p++];n=(f[n>>>24]<<24|f[g>>>16&255]<<16|f[h>>>8&255]<<8|f[k&255])^c[p++];a[b]=q;a[b+1]=s;a[b+2]=t;a[b+3]=n},keySize:8});u.AES=p._createHelper(d)})();
|
|
@ -0,0 +1,111 @@
|
|||
define(function(require, exports, module) {
|
||||
var _oCommon, _oUtils, _oBase64;
|
||||
|
||||
require("websdk");
|
||||
_oCommon = require("common");
|
||||
_oUtils = require("utils");
|
||||
_oBase64 = require("base64");
|
||||
|
||||
function EncryptionFac () {}
|
||||
|
||||
EncryptionFac.prototype.encrypt = function (oStr, iRSABits, bBase64Encrypted, cbFun) {
|
||||
//var that = this;
|
||||
var iBits = 1024;
|
||||
|
||||
if (iRSABits) {
|
||||
iBits = iRSABits;
|
||||
}
|
||||
|
||||
var szPassPhrase = new Date() + "",
|
||||
szMattsRSAkey = cryptico.generateRSAKey(szPassPhrase, iBits),
|
||||
szPublicKeyString = cryptico.publicKeyString(szMattsRSAkey),
|
||||
szXml = "<?xml version='1.0' encoding='UTF-8'?><PublicKey><key>" + _oBase64.encode(szPublicKeyString) + "</key></PublicKey>",
|
||||
oXmlDoc = _oUtils.parseXmlFromStr(szXml);
|
||||
|
||||
WebSDK.WSDK_Request(_oCommon.m_szHostName, _oCommon.m_iHttpProtocal, _oCommon.m_iHttpPort, {
|
||||
cmd: "challenge",
|
||||
type: "POST",
|
||||
data: oXmlDoc,
|
||||
success: function (status, xmlDoc) {
|
||||
var szDecryptionResult = cryptico.decrypt(_oBase64.decode(_oUtils.nodeValue(xmlDoc, "key")), szMattsRSAkey);
|
||||
if(szDecryptionResult.plaintext != null) {
|
||||
var szKey,szEncryptPassword;
|
||||
var aResult = [];
|
||||
if (iBits === 256) {
|
||||
szKey = _oUtils.toHex(szDecryptionResult.plaintext);
|
||||
} else {
|
||||
szKey = szDecryptionResult.plaintext;
|
||||
}
|
||||
|
||||
szEncryptPassword = aes_encrypt(szDecryptionResult.plaintext.substring(0, 16), szKey, true);
|
||||
|
||||
if("function" === typeof cbFun) {
|
||||
if("string" === typeof oStr) {
|
||||
bBase64Encrypted && ( oStr = _oBase64.encode(oStr) );
|
||||
cbFun( _oBase64.encode( szEncryptPassword + _oUtils.encodeAES(oStr, szKey, "", "ecb") ) );
|
||||
} else if("[object Array]" === Object.prototype.toString.call(oStr)) {
|
||||
for(var i = 0, iArrayLen = oStr.length; i < iArrayLen; i++) {
|
||||
bBase64Encrypted && ( oStr[i] = _oBase64.encode(oStr[i]) );
|
||||
var szTemp = szEncryptPassword + _oUtils.encodeAES(oStr[i], szKey, "", "ecb");
|
||||
aResult.push( _oBase64.encode(szTemp) );
|
||||
}
|
||||
cbFun(aResult);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
EncryptionFac.prototype.encryptSync = function (oStr, iRSABits, bBase64Encrypted) {
|
||||
//var that = this;
|
||||
var iBits = 1024;
|
||||
var aResult = [];
|
||||
|
||||
if (iRSABits) {
|
||||
iBits = iRSABits;
|
||||
}
|
||||
|
||||
var szPassPhrase = new Date() + "",
|
||||
szMattsRSAkey = cryptico.generateRSAKey(szPassPhrase, iBits),
|
||||
szPublicKeyString = cryptico.publicKeyString(szMattsRSAkey),
|
||||
szXml = "<?xml version='1.0' encoding='UTF-8'?><PublicKey><key>" + _oBase64.encode(szPublicKeyString) + "</key></PublicKey>",
|
||||
oXmlDoc = _oUtils.parseXmlFromStr(szXml);
|
||||
|
||||
WebSDK.WSDK_Request(_oCommon.m_szHostName, _oCommon.m_iHttpProtocal, _oCommon.m_iHttpPort, {
|
||||
cmd: "challenge",
|
||||
type: "POST",
|
||||
async: false,
|
||||
data: oXmlDoc,
|
||||
success: function (status, xmlDoc) {
|
||||
var szDecryptionResult = cryptico.decrypt(_oBase64.decode(_oUtils.nodeValue(xmlDoc, "key")), szMattsRSAkey);
|
||||
if(szDecryptionResult.plaintext != null) {
|
||||
var szKey, szEncryptPassword;
|
||||
if (iBits === 256) {
|
||||
szKey = _oUtils.toHex(szDecryptionResult.plaintext);
|
||||
} else {
|
||||
szKey = szDecryptionResult.plaintext;
|
||||
}
|
||||
szEncryptPassword = aes_encrypt(szDecryptionResult.plaintext.substring(0, 16), szKey, true);
|
||||
if("string" === typeof oStr) {
|
||||
bBase64Encrypted && ( oStr = _oBase64.encode(oStr) );
|
||||
aResult.push( _oBase64.encode( szEncryptPassword + _oUtils.encodeAES(oStr, szKey, "", "ecb") ) );
|
||||
} else {
|
||||
for(var i = 0, iArrayLen = oStr.length; i < iArrayLen; i++) {
|
||||
bBase64Encrypted && ( oStr[i] = _oBase64.encode(oStr[i]) );
|
||||
var szTemp = szEncryptPassword + _oUtils.encodeAES(oStr[i], szKey, "", "ecb");
|
||||
aResult.push( _oBase64.encode(szTemp) );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
if("string" === typeof oStr) {
|
||||
return aResult[0];
|
||||
} else {
|
||||
return aResult;
|
||||
}
|
||||
};
|
||||
|
||||
module.exports = new EncryptionFac();
|
||||
});
|
|
@ -0,0 +1,90 @@
|
|||
/*jslint browser: true */ /*global jQuery: true */
|
||||
|
||||
/**
|
||||
* jQuery Cookie plugin
|
||||
*
|
||||
* Copyright (c) 2010 Klaus Hartl (stilbuero.de)
|
||||
* Dual licensed under the MIT and GPL licenses:
|
||||
* http://www.opensource.org/licenses/mit-license.php
|
||||
* http://www.gnu.org/licenses/gpl.html
|
||||
*
|
||||
*/
|
||||
|
||||
// TODO JsDoc
|
||||
|
||||
/**
|
||||
* Create a cookie with the given key and value and other optional parameters.
|
||||
*
|
||||
* @example $.cookie('the_cookie', 'the_value');
|
||||
* @desc Set the value of a cookie.
|
||||
* @example $.cookie('the_cookie', 'the_value', { expires: 7, path: '/', domain: 'jquery.com', secure: true });
|
||||
* @desc Create a cookie with all available options.
|
||||
* @example $.cookie('the_cookie', 'the_value');
|
||||
* @desc Create a session cookie.
|
||||
* @example $.cookie('the_cookie', null);
|
||||
* @desc Delete a cookie by passing null as value. Keep in mind that you have to use the same path and domain
|
||||
* used when the cookie was set.
|
||||
*
|
||||
* @param String key The key of the cookie.
|
||||
* @param String value The value of the cookie.
|
||||
* @param Object options An object literal containing key/value pairs to provide optional cookie attributes.
|
||||
* @option Number|Date expires Either an integer specifying the expiration date from now on in days or a Date object.
|
||||
* If a negative value is specified (e.g. a date in the past), the cookie will be deleted.
|
||||
* If set to null or omitted, the cookie will be a session cookie and will not be retained
|
||||
* when the the browser exits.
|
||||
* @option String path The value of the path atribute of the cookie (default: path of page that created the cookie).
|
||||
* @option String domain The value of the domain attribute of the cookie (default: domain of page that created the cookie).
|
||||
* @option Boolean secure If true, the secure attribute of the cookie will be set and the cookie transmission will
|
||||
* require a secure protocol (like HTTPS).
|
||||
* @type undefined
|
||||
*
|
||||
* @name $.cookie
|
||||
* @cat Plugins/Cookie
|
||||
* @author Klaus Hartl/klaus.hartl@stilbuero.de
|
||||
*/
|
||||
|
||||
/**
|
||||
* Get the value of a cookie with the given key.
|
||||
*
|
||||
* @example $.cookie('the_cookie');
|
||||
* @desc Get the value of a cookie.
|
||||
*
|
||||
* @param String key The key of the cookie.
|
||||
* @return The value of the cookie.
|
||||
* @type String
|
||||
*
|
||||
* @name $.cookie
|
||||
* @cat Plugins/Cookie
|
||||
* @author Klaus Hartl/klaus.hartl@stilbuero.de
|
||||
*/
|
||||
|
||||
jQuery.cookie = function (key, value, options) {
|
||||
|
||||
// key and value given, set cookie...
|
||||
if (arguments.length > 1 && (value === null || typeof value !== "object")) {
|
||||
options = jQuery.extend({}, options);
|
||||
|
||||
if (value === null) {
|
||||
options.expires = -1;
|
||||
}
|
||||
|
||||
if (typeof options.expires === 'number') {
|
||||
var days = options.expires, t = options.expires = new Date();
|
||||
t.setDate(t.getDate() + days);
|
||||
}
|
||||
|
||||
return (document.cookie = [
|
||||
encodeURIComponent(key), '=',
|
||||
options.raw ? String(value) : encodeURIComponent(String(value)),
|
||||
options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE
|
||||
options.path ? '; path=' + options.path : '; path=/',
|
||||
options.domain ? '; domain=' + options.domain : '',
|
||||
options.secure ? '; secure' : ''
|
||||
].join(''));
|
||||
}
|
||||
|
||||
// key and possibly options given, get cookie...
|
||||
options = value || {};
|
||||
var result, decode = options.raw ? function (s) { return s; } : decodeURIComponent;
|
||||
return (result = new RegExp('(?:^|; )' + encodeURIComponent(key) + '=([^;]*)').exec(document.cookie)) ? decode(result[1]) : null;
|
||||
};
|
|
@ -0,0 +1,223 @@
|
|||
/**
|
||||
* Created by wangweijie5 on 2016/12/16.
|
||||
*/
|
||||
|
||||
"use strict";
|
||||
|
||||
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
||||
|
||||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||||
|
||||
var __instance = function () {
|
||||
var instance = void 0;
|
||||
return function (newInstance) {
|
||||
if (newInstance) instance = newInstance;
|
||||
return instance;
|
||||
};
|
||||
}();
|
||||
|
||||
var AudioRenderer = function () {
|
||||
function AudioRenderer() {
|
||||
_classCallCheck(this, AudioRenderer);
|
||||
|
||||
if (__instance()) return __instance();
|
||||
|
||||
// 确保只有单例
|
||||
if (AudioRenderer.unique !== undefined) {
|
||||
return AudioRenderer.unique;
|
||||
}
|
||||
|
||||
AudioRenderer.unique = this;
|
||||
|
||||
this.oAudioContext = null;
|
||||
this.currentVolume = 0.8; // 初始音量
|
||||
this.bSetVolume = false;
|
||||
this.gainNode = null;
|
||||
this.iWndNum = -1; // 窗口号
|
||||
this.mVolumes = new Map(); // 用于存储所有音量
|
||||
|
||||
// Init AudioContext
|
||||
var AudioContext = window.AudioContext || window.webkitAudioContext;
|
||||
this.oAudioContext = new AudioContext();
|
||||
|
||||
this.writeString = function (view, offset, string) {
|
||||
for (var i = 0; i < string.length; i++) {
|
||||
view.setUint8(offset + i, string.charCodeAt(i));
|
||||
}
|
||||
};
|
||||
|
||||
this.setBufferToDataview = function (output, offset, input) {
|
||||
for (var i = 0; i < input.length; i++, offset++) {
|
||||
output.setUint8(offset, input[i]);
|
||||
}
|
||||
};
|
||||
|
||||
__instance(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* @synopsis 音频播放
|
||||
*
|
||||
* @param dataBuf [IN] 音频缓存
|
||||
* @param dataLen [IN] 缓存长度
|
||||
* @param audioInfo [IN] 音频参数
|
||||
*
|
||||
* @returns 状态码
|
||||
*/
|
||||
|
||||
|
||||
_createClass(AudioRenderer, [{
|
||||
key: 'Play',
|
||||
value: function Play(dataBuf, dataLen, audioInfo) {
|
||||
var bufferData = new ArrayBuffer(44 + dataLen);
|
||||
var viewTalk = new DataView(bufferData);
|
||||
var sampleRates = audioInfo.samplesPerSec;
|
||||
var channels = audioInfo.channels;
|
||||
var bitsPerSample = audioInfo.bitsPerSample;
|
||||
|
||||
/* RIFF identifier */
|
||||
this.writeString(viewTalk, 0, 'RIFF');
|
||||
/* file length */
|
||||
viewTalk.setUint32(4, 32 + dataLen * 2, true);
|
||||
/* RIFF type */
|
||||
this.writeString(viewTalk, 8, 'WAVE');
|
||||
/* format chunk identifier */
|
||||
this.writeString(viewTalk, 12, 'fmt ');
|
||||
/* format chunk length */
|
||||
viewTalk.setUint32(16, 16, true);
|
||||
/* sample format (raw) */
|
||||
viewTalk.setUint16(20, 1, true);
|
||||
/* channel count */
|
||||
viewTalk.setUint16(22, channels, true);
|
||||
/* sample rate */
|
||||
viewTalk.setUint32(24, sampleRates, true);
|
||||
/* byte rate (sample rate * block align) */
|
||||
viewTalk.setUint32(28, sampleRates * 2, true);
|
||||
/* block align (channel count * bytes per sample)/8 */
|
||||
viewTalk.setUint16(32, channels * bitsPerSample / 8, true);
|
||||
/* bits per sample */
|
||||
viewTalk.setUint16(34, bitsPerSample, true);
|
||||
/* data chunk identifier */
|
||||
this.writeString(viewTalk, 36, 'data');
|
||||
/* data chunk length */
|
||||
viewTalk.setUint32(40, dataLen, true);
|
||||
this.setBufferToDataview(viewTalk, 44, dataBuf);
|
||||
|
||||
var self = this;
|
||||
this.oAudioContext.decodeAudioData(viewTalk.buffer, function (buffer) {
|
||||
|
||||
var bufferSource = self.oAudioContext.createBufferSource();
|
||||
if (bufferSource == null) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
bufferSource.buffer = buffer;
|
||||
bufferSource.start(0);
|
||||
|
||||
if (self.gainNode == null || self.bSetVolume) {
|
||||
self.gainNode = self.oAudioContext.createGain();
|
||||
// self.gainNode.gain.value = self.currentVolume;
|
||||
// // self.currentVolume = self.gainNode.gain.value;
|
||||
// self.gainNode.connect(self.oAudioContext.destination);
|
||||
|
||||
self.bSetVolume = false;
|
||||
}
|
||||
|
||||
self.gainNode.gain.value = self.currentVolume;
|
||||
// self.currentVolume = self.gainNode.gain.value;
|
||||
self.gainNode.connect(self.oAudioContext.destination);
|
||||
|
||||
bufferSource.connect(self.gainNode);
|
||||
}, function (e) {
|
||||
console.log("decode error");
|
||||
return -1;
|
||||
});
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* @synopsis 停止播放
|
||||
*
|
||||
* @returns 返回音量
|
||||
*/
|
||||
|
||||
}, {
|
||||
key: 'Stop',
|
||||
value: function Stop() {
|
||||
if (this.gainNode != null) {
|
||||
this.gainNode.disconnect();
|
||||
this.gainNode = null;
|
||||
}
|
||||
|
||||
// this.oAudioContext.close();
|
||||
|
||||
// AudioRenderer.unique = undefined;
|
||||
// __instance() = null;
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @synopsis 设置音量
|
||||
*
|
||||
* @param iVolume [IN] 音量
|
||||
*
|
||||
* @returns 状态码
|
||||
*/
|
||||
|
||||
}, {
|
||||
key: 'SetVolume',
|
||||
value: function SetVolume(iVolume) {
|
||||
this.bSetVolume = true;
|
||||
this.currentVolume = iVolume;
|
||||
|
||||
// 储存当前窗口设置音量值
|
||||
this.mVolumes.set(this.iWndNum, iVolume);
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @synopsis 设置窗口号
|
||||
*
|
||||
* @param iWndNum [IN] 窗口号
|
||||
*
|
||||
* @returns 状态码
|
||||
*/
|
||||
|
||||
}, {
|
||||
key: 'SetWndNum',
|
||||
value: function SetWndNum(iWndNum) {
|
||||
this.iWndNum = iWndNum;
|
||||
|
||||
// 获取当前窗口设置音量值
|
||||
var iVolume = this.mVolumes.get(iWndNum);
|
||||
if (iVolume == undefined) {
|
||||
iVolume = 0.8; // 默认音量
|
||||
}
|
||||
this.currentVolume = iVolume;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @synopsis 获取音量
|
||||
*
|
||||
* @returns 返回音量
|
||||
*/
|
||||
|
||||
}, {
|
||||
key: 'GetVolume',
|
||||
value: function GetVolume() {
|
||||
// 获取当前窗口设置音量值
|
||||
var iVolume = this.mVolumes.get(this.iWndNum);
|
||||
if (iVolume == undefined) {
|
||||
iVolume = 0.8; // 默认音量
|
||||
}
|
||||
|
||||
return iVolume;
|
||||
}
|
||||
}]);
|
||||
|
||||
return AudioRenderer;
|
||||
}();
|
||||
ap
|
|
@ -0,0 +1,521 @@
|
|||
/**
|
||||
* Created by wangweijie5 on 2016/12/5.
|
||||
*/
|
||||
(function (event) {
|
||||
const AUDIO_TYPE = 0; // 音频
|
||||
const VIDEO_TYPE = 1; // 视频
|
||||
const PRIVT_TYPE = 2; // 私有帧
|
||||
|
||||
const PLAYM4_AUDIO_FRAME = 100; // 音频帧
|
||||
const PLAYM4_VIDEO_FRAME = 101; // 视频帧
|
||||
|
||||
const HK_TRUE = 1; // true
|
||||
const PLAYM4_NOT_KEYFRAME = 48; // 非关键帧
|
||||
const PLAYM4_NEED_MORE_DATA = 31; // 需要更多数据才能解析
|
||||
const PLAYM4_SYS_NOT_SUPPORT = 16; // 不支持
|
||||
|
||||
importScripts('Decoder.js');
|
||||
Module.postRun.push(function () {
|
||||
postMessage({'function': "loaded"});
|
||||
});
|
||||
|
||||
var iStreamMode = 0; // 流模式
|
||||
|
||||
var bOpenMode = false;
|
||||
var bOpenStream = false;
|
||||
|
||||
var funGetFrameData = null;
|
||||
|
||||
onmessage = function (event)
|
||||
{
|
||||
var eventData = event.data;
|
||||
var res = 0;
|
||||
switch (eventData.command)
|
||||
{
|
||||
case "SetStreamOpenMode":
|
||||
iStreamMode = eventData.data;
|
||||
res = Module._SetStreamOpenMode(iStreamMode);
|
||||
if (res !== HK_TRUE)
|
||||
{
|
||||
postMessage({'function': "SetStreamOpenMode", 'errorCode': res});
|
||||
return;
|
||||
}
|
||||
bOpenMode = true;
|
||||
break;
|
||||
|
||||
case "OpenStream":
|
||||
// 接收到的数据
|
||||
var iHeadLen = eventData.dataSize;
|
||||
var pHead = Module._malloc(iHeadLen + 4);
|
||||
if (pHead === null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
var aHead = Module.HEAPU8.subarray(pHead, pHead + iHeadLen);
|
||||
aHead.set(eventData.data);
|
||||
|
||||
res = Module._OpenStream(pHead, iHeadLen, eventData.bufPoolSize);
|
||||
postMessage({'function': "OpenStream", 'errorCode': res});
|
||||
if (res !== HK_TRUE)
|
||||
{
|
||||
//释放内存
|
||||
Module._free(pHead);
|
||||
pHead = null;
|
||||
return;
|
||||
}
|
||||
bOpenStream = true;
|
||||
|
||||
// 加4字节长度信息
|
||||
var a32 = new Uint32Array([iHeadLen]);
|
||||
var a8 = new Uint8Array(a32.buffer);
|
||||
var tempBuf = new Uint8Array(iHeadLen + 4);
|
||||
tempBuf.set(a8, 0);
|
||||
tempBuf.set(eventData.data, 4);
|
||||
a32 = null;
|
||||
a8 = null;
|
||||
|
||||
aHead = Module.HEAPU8.subarray(pHead, pHead + iHeadLen + 4);
|
||||
aHead.set(tempBuf);
|
||||
tempBuf = null;
|
||||
|
||||
res = Module._InputData(pHead, iHeadLen + 4);
|
||||
if (res !== HK_TRUE)
|
||||
{
|
||||
postMessage({'function': "InputData", 'errorCode': res});
|
||||
Module._free(pHead);
|
||||
pHead = null;
|
||||
return;
|
||||
}
|
||||
|
||||
// 释放内存
|
||||
Module._free(pHead);
|
||||
pHead = null;
|
||||
|
||||
if (funGetFrameData === null) {
|
||||
funGetFrameData = Module.cwrap('GetFrameData', 'number');
|
||||
}
|
||||
|
||||
if (iStreamMode === 0) {
|
||||
// Module._GetFrameData();
|
||||
funGetFrameData();
|
||||
}
|
||||
break;
|
||||
|
||||
case "InputData":
|
||||
// 接收到的数据
|
||||
var iLen = eventData.dataSize;
|
||||
//console.log("DecodeWorker-InputData-len:%d", iLen);
|
||||
|
||||
if (iLen > 0)
|
||||
{
|
||||
var pInputData = Module._malloc(iLen);
|
||||
if (pInputData === null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
var inputData = new Uint8Array(eventData.data);
|
||||
// var aInputData = Module.HEAPU8.subarray(pInputData, pInputData + iLen);
|
||||
// aInputData.set(inputData);
|
||||
Module.writeArrayToMemory(inputData, pInputData);
|
||||
inputData = null;
|
||||
|
||||
res = Module._InputData(pInputData, iLen);
|
||||
//console.log("DecodeWorker-InputData-ret:%d", res);
|
||||
if (res !== HK_TRUE)
|
||||
{
|
||||
if (res === 98)
|
||||
{
|
||||
res = 1;
|
||||
}
|
||||
postMessage({'function': "InputData", 'errorCode': res});
|
||||
}
|
||||
Module._free(pInputData);
|
||||
pData = null;
|
||||
}
|
||||
|
||||
/////////////////////
|
||||
if (funGetFrameData === null)
|
||||
{
|
||||
funGetFrameData = Module.cwrap('GetFrameData', 'number');
|
||||
}
|
||||
|
||||
while (bOpenMode && bOpenStream)
|
||||
{
|
||||
var ret = getFrameData(funGetFrameData);
|
||||
// var ret = getFrameData();
|
||||
|
||||
// 直到获取视频帧或数据不足为止
|
||||
if (PLAYM4_VIDEO_FRAME === ret || PLAYM4_NEED_MORE_DATA === ret)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case "SetSecretKey":
|
||||
var keyLen = eventData.nKeyLen;
|
||||
var pKeyData = Module._malloc(keyLen);
|
||||
if (pKeyData === null) {
|
||||
return;
|
||||
}
|
||||
var nKeySize = eventData.data.length
|
||||
var bufData = stringToBytes (eventData.data);
|
||||
var aKeyData = Module.HEAPU8.subarray(pKeyData, pKeyData + keyLen);
|
||||
aKeyData.set(new Uint8Array(bufData));
|
||||
|
||||
res = Module._SetSecretKey(eventData.nKeyType, pKeyData, keyLen, nKeySize);
|
||||
if (res !== HK_TRUE) {
|
||||
postMessage({'function': "SetSecretKey", 'errorCode': res});
|
||||
Module._free(pKeyData);
|
||||
pKeyData = null;
|
||||
return;
|
||||
}
|
||||
|
||||
Module._free(pKeyData);
|
||||
pKeyData = null;
|
||||
break;
|
||||
|
||||
case "GetBMP":
|
||||
var nBMPWidth = eventData.width;
|
||||
var nBMPHeight = eventData.height;
|
||||
var pYUVData = eventData.data;
|
||||
var nYUVSize = nBMPWidth * nBMPHeight * 3 / 2;
|
||||
var oBMPCropRect = eventData.rect;
|
||||
|
||||
var pDataYUV = Module._malloc(nYUVSize);
|
||||
if (pDataYUV === null) {
|
||||
return;
|
||||
}
|
||||
|
||||
Module.writeArrayToMemory(new Uint8Array(pYUVData, 0, nYUVSize), pDataYUV);
|
||||
|
||||
// 分配BMP空间
|
||||
var nBmpSize = nBMPWidth * nBMPHeight * 4 + 60;
|
||||
var pBmpData = Module._malloc(nBmpSize);
|
||||
var pBmpSize = Module._malloc(4);
|
||||
if (pBmpData === null || pBmpSize === null) {
|
||||
Module._free(pDataYUV);
|
||||
pDataYUV = null;
|
||||
|
||||
if (pBmpData != null) {
|
||||
Module._free(pBmpData);
|
||||
pBmpData = null;
|
||||
}
|
||||
|
||||
if (pBmpSize != null) {
|
||||
Module._free(pBmpSize);
|
||||
pBmpSize = null;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
Module._memset(pBmpSize, nBmpSize, 4); // 防止bmp截图出现输入数据过大的错误码
|
||||
|
||||
res = Module._GetBMP(pDataYUV, nYUVSize, pBmpData, pBmpSize,
|
||||
oBMPCropRect.left, oBMPCropRect.top, oBMPCropRect.right, oBMPCropRect.bottom);
|
||||
if (res !== HK_TRUE) {
|
||||
postMessage({'function': "GetBMP", 'errorCode': res});
|
||||
Module._free(pDataYUV);
|
||||
pDataYUV = null;
|
||||
Module._free(pBmpData);
|
||||
pBmpData = null;
|
||||
Module._free(pBmpSize);
|
||||
pBmpSize = null;
|
||||
return;
|
||||
}
|
||||
|
||||
// 获取BMP图片大小
|
||||
var nBmpDataSize = Module.getValue(pBmpSize, "i32");
|
||||
|
||||
// 获取BMP图片数据
|
||||
var aBmpData = new Uint8Array(nBmpDataSize);
|
||||
aBmpData.set(Module.HEAPU8.subarray(pBmpData, pBmpData + nBmpDataSize));
|
||||
|
||||
postMessage({'function': "GetBMP", 'data': aBmpData, 'errorCode': res}, [aBmpData.buffer]);
|
||||
|
||||
if (pDataYUV != null) {
|
||||
Module._free(pDataYUV);
|
||||
pDataYUV = null;
|
||||
}
|
||||
if (pBmpData != null) {
|
||||
Module._free(pBmpData);
|
||||
pBmpData = null;
|
||||
}
|
||||
if (pBmpSize != null) {
|
||||
Module._free(pBmpSize);
|
||||
pBmpSize = null;
|
||||
}
|
||||
break;
|
||||
|
||||
case "GetJPEG":
|
||||
var nJpegWidth = eventData.width;
|
||||
var nJpegHeight = eventData.height;
|
||||
var pYUVData1 = eventData.data;
|
||||
var nYUVSize1 = nJpegWidth * nJpegHeight * 3 / 2;
|
||||
var oJpegCropRect = eventData.rect;
|
||||
|
||||
var pDataYUV1 = Module._malloc(nYUVSize1);
|
||||
if (pDataYUV1 === null) {
|
||||
return;
|
||||
}
|
||||
|
||||
Module.writeArrayToMemory(new Uint8Array(pYUVData1, 0, nYUVSize1), pDataYUV1);
|
||||
|
||||
// 分配JPEG空间
|
||||
var pJpegData = Module._malloc(nYUVSize1);
|
||||
var pJpegSize = Module._malloc(4);
|
||||
if (pJpegData === null || pJpegSize === null) {
|
||||
if (pJpegData != null) {
|
||||
Module._free(pJpegData);
|
||||
pJpegData = null;
|
||||
}
|
||||
|
||||
if (pJpegSize != null) {
|
||||
Module._free(pJpegSize);
|
||||
pJpegSize = null;
|
||||
}
|
||||
|
||||
if (pDataYUV1 != null) {
|
||||
Module._free(pDataYUV1);
|
||||
pDataYUV1 = null;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
Module.setValue(pJpegSize, nJpegWidth * nJpegHeight * 2, "i32"); // JPEG抓图,输入缓冲长度不小于当前帧YUV大小
|
||||
|
||||
res = Module._GetJPEG(pDataYUV1, nYUVSize1, pJpegData, pJpegSize,
|
||||
oJpegCropRect.left, oJpegCropRect.top, oJpegCropRect.right, oJpegCropRect.bottom);
|
||||
if (res !== HK_TRUE) {
|
||||
postMessage({'function': "GetJPEG", 'errorCode': res});
|
||||
if (pJpegData != null) {
|
||||
Module._free(pJpegData);
|
||||
pJpegData = null;
|
||||
}
|
||||
|
||||
if (pJpegSize != null) {
|
||||
Module._free(pJpegSize);
|
||||
pJpegSize = null;
|
||||
}
|
||||
|
||||
if (pDataYUV1 != null) {
|
||||
Module._free(pDataYUV1);
|
||||
pDataYUV1 = null;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
// 获取JPEG图片大小
|
||||
var nJpegSize = Module.getValue(pJpegSize, "i32");
|
||||
|
||||
// 获取JPEG图片数据
|
||||
var aJpegData = new Uint8Array(nJpegSize);
|
||||
aJpegData.set(Module.HEAPU8.subarray(pJpegData, pJpegData + nJpegSize));
|
||||
|
||||
postMessage({'function': "GetJPEG", 'data': aJpegData, 'errorCode': res}, [aJpegData.buffer]);
|
||||
|
||||
ajpegSizeData = null;
|
||||
aJpegData = null;
|
||||
|
||||
if (pDataYUV1 != null) {
|
||||
Module._free(pDataYUV1);
|
||||
pDataYUV1 = null;
|
||||
}
|
||||
if (pJpegData != null) {
|
||||
Module._free(pJpegData);
|
||||
pJpegData = null;
|
||||
}
|
||||
if (pJpegSize != null) {
|
||||
Module._free(pJpegSize);
|
||||
pJpegSize = null;
|
||||
}
|
||||
break;
|
||||
|
||||
case "SetDecodeFrameType":
|
||||
var nFrameType = eventData.data;
|
||||
res = Module._SetDecodeFrameType(nFrameType);
|
||||
if (res !== HK_TRUE) {
|
||||
postMessage({'function': "SetDecodeFrameType", 'errorCode': res});
|
||||
return;
|
||||
}
|
||||
break;
|
||||
|
||||
case "DisplayRegion":
|
||||
var nRegionNum = eventData.nRegionNum;
|
||||
var srcRect = eventData.srcRect;
|
||||
var hDestWnd = eventData.hDestWnd;
|
||||
var bEnable = eventData.bEnable;
|
||||
|
||||
res = Module._SetDisplayRegion(nRegionNum, srcRect, hDestWnd, bEnable);
|
||||
if (res !== HK_TRUE) {
|
||||
postMessage({'function': "DisplayRegion", 'errorCode': res});
|
||||
return;
|
||||
}
|
||||
break;
|
||||
|
||||
case "CloseStream":
|
||||
res = Module._CloseStream();
|
||||
if (res !== HK_TRUE) {
|
||||
postMessage({'function': "CloseStream", 'errorCode': res});
|
||||
return;
|
||||
}
|
||||
break;
|
||||
|
||||
case "SetIFrameDecInterval":
|
||||
Module._SetIFrameDecInterval(eventData.data);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
||||
function getOSDTime(oFrameInfo) {
|
||||
var iYear = oFrameInfo.year;
|
||||
var iMonth = oFrameInfo.month;
|
||||
var iDay = oFrameInfo.day;
|
||||
var iHour = oFrameInfo.hour;
|
||||
var iMinute = oFrameInfo.minute;
|
||||
var iSecond = oFrameInfo.second;
|
||||
|
||||
if (iMonth < 10) {
|
||||
iMonth = "0" + iMonth;
|
||||
}
|
||||
if (iDay < 10) {
|
||||
iDay = "0" + iDay;
|
||||
}
|
||||
if (iHour < 10) {
|
||||
iHour = "0" + iHour;
|
||||
}
|
||||
if (iMinute < 10) {
|
||||
iMinute = "0" + iMinute;
|
||||
}
|
||||
if (iSecond < 10) {
|
||||
iSecond = "0" + iSecond;
|
||||
}
|
||||
|
||||
return iYear + "-" + iMonth + "-" + iDay + " " + iHour + ":" + iMinute + ":" + iSecond;
|
||||
}
|
||||
|
||||
// 获取帧数据
|
||||
function getFrameData(fun)
|
||||
{
|
||||
// function getFrameData() {
|
||||
// 获取帧数据
|
||||
// var res = Module._GetFrameData();
|
||||
var res = fun();
|
||||
|
||||
if (res === HK_TRUE)
|
||||
{
|
||||
var oFrameInfo = Module._GetFrameInfo();
|
||||
//console.log("getFrameData-ok:%d %d %d %d %d %d \n", oFrameInfo.year, oFrameInfo.month, oFrameInfo.day, oFrameInfo.hour, oFrameInfo.minute, oFrameInfo.second);
|
||||
|
||||
switch (oFrameInfo.frameType)
|
||||
{
|
||||
case AUDIO_TYPE:
|
||||
var iSize = oFrameInfo.frameSize;
|
||||
if (0 === iSize)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
var pPCM = Module._GetFrameBuffer();
|
||||
// var audioBuf = new ArrayBuffer(iSize);
|
||||
var aPCMData = new Uint8Array(iSize);
|
||||
aPCMData.set(Module.HEAPU8.subarray(pPCM, pPCM + iSize));
|
||||
|
||||
postMessage({
|
||||
'function': "GetFrameData", 'type': "audioType", 'data': aPCMData.buffer,
|
||||
'frameInfo': oFrameInfo, 'errorCode': res
|
||||
}, [aPCMData.buffer]);
|
||||
|
||||
oFrameInfo = null;
|
||||
pPCM = null;
|
||||
audioBuf = null;
|
||||
aPCMData = null;
|
||||
return PLAYM4_AUDIO_FRAME;
|
||||
|
||||
case VIDEO_TYPE:
|
||||
var szOSDTime = getOSDTime(oFrameInfo);
|
||||
|
||||
var iWidth = oFrameInfo.width;
|
||||
var iHeight = oFrameInfo.height;
|
||||
|
||||
var iYUVSize = iWidth * iHeight * 3 / 2;
|
||||
if (0 === iYUVSize)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
var pYUV = Module._GetFrameBuffer();
|
||||
|
||||
// 图像数据渲染后压回,若从主码流切到子码流,存在数组大小与图像大小不匹配现象
|
||||
var aYUVData = new Uint8Array(iYUVSize);
|
||||
aYUVData.set(Module.HEAPU8.subarray(pYUV, pYUV + iYUVSize));
|
||||
|
||||
postMessage({
|
||||
'function': "GetFrameData", 'type': "videoType", 'data': aYUVData.buffer,
|
||||
'dataLen': aYUVData.length, 'osd': szOSDTime, 'frameInfo': oFrameInfo, 'errorCode': res
|
||||
}, [aYUVData.buffer]);
|
||||
|
||||
oFrameInfo = null;
|
||||
pYUV = null;
|
||||
buf = null;
|
||||
aYUVData = null;
|
||||
return PLAYM4_VIDEO_FRAME;
|
||||
|
||||
case PRIVT_TYPE:
|
||||
postMessage({
|
||||
'function': "GetFrameData", 'type': "", 'data': null,
|
||||
'dataLen': -1, 'osd': 0, 'frameInfo': null, 'errorCode': PLAYM4_SYS_NOT_SUPPORT
|
||||
});
|
||||
return PLAYM4_SYS_NOT_SUPPORT;
|
||||
|
||||
default:
|
||||
postMessage({
|
||||
'function': "GetFrameData", 'type': "", 'data': null,
|
||||
'dataLen': -1, 'osd': 0, 'frameInfo': null, 'errorCode': PLAYM4_SYS_NOT_SUPPORT
|
||||
});
|
||||
return PLAYM4_SYS_NOT_SUPPORT;
|
||||
}
|
||||
} else {
|
||||
if (PLAYM4_NEED_MORE_DATA === res || PLAYM4_SYS_NOT_SUPPORT === res) {
|
||||
postMessage({
|
||||
'function': "GetFrameData", 'type': "", 'data': null,
|
||||
'dataLen': -1, 'osd': 0, 'frameInfo': null, 'errorCode': res
|
||||
});
|
||||
}
|
||||
|
||||
return res;
|
||||
}
|
||||
}
|
||||
|
||||
// 开始计算时间
|
||||
function startTime() {
|
||||
return new Date().getTime();
|
||||
}
|
||||
|
||||
// 结束计算时间
|
||||
function endTime() {
|
||||
return new Date().getTime();
|
||||
}
|
||||
|
||||
// 字母字符串转byte数组
|
||||
function stringToBytes ( str ) {
|
||||
var ch, st, re = [];
|
||||
for (var i = 0; i < str.length; i++ ) {
|
||||
ch = str.charCodeAt(i); // get char
|
||||
st = []; // set up "stack"
|
||||
do {
|
||||
st.push( ch & 0xFF ); // push byte to stack
|
||||
ch = ch >> 8; // shift value down by 1 byte
|
||||
}
|
||||
while ( ch );
|
||||
// add stack contents to result
|
||||
// done because chars have "wrong" endianness
|
||||
re = re.concat( st.reverse() );
|
||||
}
|
||||
// return an array of bytes
|
||||
return re;
|
||||
}
|
||||
})();
|
|
@ -0,0 +1,337 @@
|
|||
"use strict";
|
||||
|
||||
var vertexYUVShader = [
|
||||
'attribute vec4 vertexPos;',
|
||||
'attribute vec2 texturePos;',
|
||||
'varying vec2 textureCoord;',
|
||||
|
||||
'void main()',
|
||||
'{',
|
||||
'gl_Position = vertexPos;',
|
||||
'textureCoord = texturePos;',
|
||||
'}'
|
||||
].join('\n');
|
||||
|
||||
var fragmentYUVShader = [
|
||||
'precision highp float;',
|
||||
'varying highp vec2 textureCoord;',
|
||||
'uniform sampler2D ySampler;',
|
||||
'uniform sampler2D uSampler;',
|
||||
'uniform sampler2D vSampler;',
|
||||
'const mat4 YUV2RGB = mat4',
|
||||
'(',
|
||||
'1.1643828125, 0, 1.59602734375, -.87078515625,',
|
||||
'1.1643828125, -.39176171875, -.81296875, .52959375,',
|
||||
'1.1643828125, 2.017234375, 0, -1.081390625,',
|
||||
'0, 0, 0, 1',
|
||||
');',
|
||||
|
||||
'void main(void) {',
|
||||
'highp float y = texture2D(ySampler, textureCoord).r;',
|
||||
'highp float u = texture2D(uSampler, textureCoord).r;',
|
||||
'highp float v = texture2D(vSampler, textureCoord).r;',
|
||||
'gl_FragColor = vec4(y, u, v, 1) * YUV2RGB;',
|
||||
'}'
|
||||
].join('\n');
|
||||
|
||||
(function (root, factory) {
|
||||
root.SuperRender = factory();
|
||||
}(this, function () {
|
||||
|
||||
function RenderManager(canvas) {
|
||||
|
||||
this.canvasElement = document.getElementById(canvas);
|
||||
|
||||
this.initContextGL();
|
||||
|
||||
if(this.contextGL) {
|
||||
this.YUVProgram = this.initProgram(vertexYUVShader, fragmentYUVShader);
|
||||
this.initBuffers();
|
||||
this.initTextures();
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* 初始化WebGL上下文
|
||||
*/
|
||||
RenderManager.prototype.initContextGL = function() {
|
||||
|
||||
var canvas = this.canvasElement;
|
||||
|
||||
var gl = null;
|
||||
|
||||
try {
|
||||
gl = canvas.getContext("webgl") || canvas.getContext("experimental-webgl");
|
||||
} catch (e) {
|
||||
gl = null;
|
||||
}
|
||||
|
||||
if(!gl || typeof gl.getParameter !== "function") {
|
||||
gl = null;
|
||||
}
|
||||
|
||||
this.contextGL = gl;
|
||||
|
||||
console.log("WebGL1.0");
|
||||
};
|
||||
|
||||
/**
|
||||
* 初始化着色器程序
|
||||
* @param vertexShaderScript 顶点着色器脚本
|
||||
* @param fragmentShaderScript 片段着色器脚本
|
||||
*/
|
||||
RenderManager.prototype.initProgram = function(vertexShaderScript, fragmentShaderScript) {
|
||||
|
||||
var gl = this.contextGL;
|
||||
|
||||
var vertexShader = gl.createShader(gl.VERTEX_SHADER);
|
||||
gl.shaderSource(vertexShader, vertexShaderScript);
|
||||
gl.compileShader(vertexShader);
|
||||
if(!gl.getShaderParameter(vertexShader, gl.COMPILE_STATUS)) {
|
||||
console.log('Vertex shader failed to compile: ' + gl.getShaderInfoLog(vertexShader));
|
||||
}
|
||||
|
||||
var fragmentShader = gl.createShader(gl.FRAGMENT_SHADER);
|
||||
gl.shaderSource(fragmentShader, fragmentShaderScript);
|
||||
gl.compileShader(fragmentShader);
|
||||
if(!gl.getShaderParameter(fragmentShader, gl.COMPILE_STATUS)) {
|
||||
console.log('Fragment shader failed to compile: ' + gl.getShaderInfoLog(fragmentShader));
|
||||
}
|
||||
|
||||
var program = gl.createProgram();
|
||||
gl.attachShader(program, vertexShader);
|
||||
gl.attachShader(program, fragmentShader);
|
||||
gl.linkProgram(program);
|
||||
if(!gl.getProgramParameter(program, gl.LINK_STATUS)) {
|
||||
console.log('Program failed to compile: ' + gl.getProgramInfoLog(program));
|
||||
}
|
||||
|
||||
gl.deleteShader(vertexShader);
|
||||
gl.deleteShader(fragmentShader);
|
||||
|
||||
return program;
|
||||
};
|
||||
|
||||
/**
|
||||
* 初始化数据缓存
|
||||
*/
|
||||
RenderManager.prototype.initBuffers = function() {
|
||||
|
||||
var gl = this.contextGL;
|
||||
|
||||
var vertexPosBuffer = gl.createBuffer();
|
||||
gl.bindBuffer(gl.ARRAY_BUFFER, vertexPosBuffer);
|
||||
gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([1, 1, -1, 1, 1, -1, -1, -1]), gl.STATIC_DRAW);
|
||||
gl.bindBuffer(gl.ARRAY_BUFFER, null);
|
||||
|
||||
var texturePosBuffer = gl.createBuffer();
|
||||
gl.bindBuffer(gl.ARRAY_BUFFER, texturePosBuffer);
|
||||
gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([1, 0, 0, 0, 1, 1, 0, 1]), gl.DYNAMIC_DRAW);
|
||||
gl.bindBuffer(gl.ARRAY_BUFFER, null);
|
||||
|
||||
this.vertexPosBuffer = vertexPosBuffer;
|
||||
this.texturePosBuffer = texturePosBuffer;
|
||||
};
|
||||
|
||||
/**
|
||||
* 初始化YUV纹理
|
||||
*/
|
||||
RenderManager.prototype.initTextures = function() {
|
||||
|
||||
var gl = this.contextGL;
|
||||
|
||||
var program = this.YUVProgram;
|
||||
gl.useProgram(program);
|
||||
|
||||
var yTextureRef = this.initTexture();
|
||||
var ySamplerRef = gl.getUniformLocation(program, 'ySampler');
|
||||
gl.uniform1i(ySamplerRef, 0);
|
||||
this.yTextureRef = yTextureRef;
|
||||
|
||||
var uTextureRef = this.initTexture();
|
||||
var uSamplerRef = gl.getUniformLocation(program, 'uSampler');
|
||||
gl.uniform1i(uSamplerRef, 1);
|
||||
this.uTextureRef = uTextureRef;
|
||||
|
||||
var vTextureRef = this.initTexture();
|
||||
var vSamplerRef = gl.getUniformLocation(program, 'vSampler');
|
||||
gl.uniform1i(vSamplerRef, 2);
|
||||
this.vTextureRef = vTextureRef;
|
||||
|
||||
gl.useProgram(null);
|
||||
};
|
||||
|
||||
/**
|
||||
* 创建纹理
|
||||
*/
|
||||
RenderManager.prototype.initTexture = function() {
|
||||
|
||||
var gl = this.contextGL;
|
||||
|
||||
var textureRef = gl.createTexture();
|
||||
gl.bindTexture(gl.TEXTURE_2D, textureRef);
|
||||
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);
|
||||
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);
|
||||
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
|
||||
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
|
||||
gl.bindTexture(gl.TEXTURE_2D, null);
|
||||
|
||||
return textureRef;
|
||||
};
|
||||
|
||||
/**
|
||||
* 显示帧数据
|
||||
* @param nWidth 宽度
|
||||
* @param nHeight 高度
|
||||
* @param nHeight 帧数据
|
||||
*/
|
||||
RenderManager.prototype.SR_DisplayFrameData = function(nWidth, nHeight, pData) {
|
||||
|
||||
if(nWidth <= 0 || nHeight <= 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var gl = this.contextGL;
|
||||
|
||||
if(null == pData)
|
||||
{
|
||||
gl.clearColor(0.0, 0.0, 0.0, 0.0);
|
||||
gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
|
||||
return;
|
||||
}
|
||||
|
||||
var canvas = this.canvasElement;
|
||||
|
||||
this.nWindowWidth = canvas.width;
|
||||
this.nWindowHeight = canvas.height;
|
||||
|
||||
var nWindowWidth = this.nWindowWidth;
|
||||
var nWindowHeight = this.nWindowHeight;
|
||||
|
||||
gl.clearColor(0.8, 0.8, 1.0, 1.0);
|
||||
gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
|
||||
|
||||
gl.viewport(0, 0, nWindowWidth, nWindowHeight);
|
||||
|
||||
this.updateFrameData(nWidth, nHeight, pData);
|
||||
|
||||
var program = this.YUVProgram;
|
||||
gl.useProgram(program);
|
||||
|
||||
var vertexPosBuffer = this.vertexPosBuffer;
|
||||
gl.bindBuffer(gl.ARRAY_BUFFER, vertexPosBuffer);
|
||||
var vertexPosRef = gl.getAttribLocation(program, 'vertexPos');
|
||||
gl.enableVertexAttribArray(vertexPosRef);
|
||||
gl.vertexAttribPointer(vertexPosRef, 2, gl.FLOAT, false, 0, 0);
|
||||
gl.bindBuffer(gl.ARRAY_BUFFER, null);
|
||||
|
||||
var texturePosBuffer = this.texturePosBuffer;
|
||||
gl.bindBuffer(gl.ARRAY_BUFFER, texturePosBuffer);
|
||||
var texturePosRef = gl.getAttribLocation(program, 'texturePos');
|
||||
gl.enableVertexAttribArray(texturePosRef);
|
||||
gl.vertexAttribPointer(texturePosRef, 2, gl.FLOAT, false, 0, 0);
|
||||
gl.bindBuffer(gl.ARRAY_BUFFER, null);
|
||||
|
||||
gl.drawArrays(gl.TRIANGLE_STRIP, 0, 4);
|
||||
|
||||
gl.disableVertexAttribArray(vertexPosRef);
|
||||
gl.disableVertexAttribArray(texturePosRef);
|
||||
|
||||
gl.useProgram(null);
|
||||
};
|
||||
|
||||
/**
|
||||
* 上传YUV数据到纹理
|
||||
* @param nWidth 宽度
|
||||
* @param nHeight 高度
|
||||
* @param nHeight 帧数据
|
||||
*/
|
||||
RenderManager.prototype.updateFrameData = function(width, height, data) {
|
||||
|
||||
var gl = this.contextGL;
|
||||
|
||||
var yTextureRef = this.yTextureRef;
|
||||
var uTextureRef = this.uTextureRef;
|
||||
var vTextureRef = this.vTextureRef;
|
||||
|
||||
var i420Data = data;
|
||||
|
||||
var yDataLength = width * height;
|
||||
var yData = i420Data.subarray(0, yDataLength);
|
||||
gl.activeTexture(gl.TEXTURE0);
|
||||
gl.bindTexture(gl.TEXTURE_2D, yTextureRef);
|
||||
gl.texImage2D(gl.TEXTURE_2D, 0, gl.LUMINANCE, width, height, 0, gl.LUMINANCE, gl.UNSIGNED_BYTE, yData);
|
||||
|
||||
var cbDataLength = width/2 * height/2;
|
||||
var cbData = i420Data.subarray(yDataLength, yDataLength + cbDataLength);
|
||||
gl.activeTexture(gl.TEXTURE1);
|
||||
gl.bindTexture(gl.TEXTURE_2D, uTextureRef);
|
||||
gl.texImage2D(gl.TEXTURE_2D, 0, gl.LUMINANCE, width/2, height/2, 0, gl.LUMINANCE, gl.UNSIGNED_BYTE, cbData);
|
||||
|
||||
var crDataLength = cbDataLength;
|
||||
var crData = i420Data.subarray(yDataLength + cbDataLength, yDataLength + cbDataLength + crDataLength);
|
||||
gl.activeTexture(gl.TEXTURE2);
|
||||
gl.bindTexture(gl.TEXTURE_2D, vTextureRef);
|
||||
gl.texImage2D(gl.TEXTURE_2D, 0, gl.LUMINANCE, width/2, height/2, 0, gl.LUMINANCE, gl.UNSIGNED_BYTE, crData);
|
||||
};
|
||||
|
||||
/**
|
||||
* 设置显示区域
|
||||
* @param stDisplayRect 显示区域
|
||||
*/
|
||||
RenderManager.prototype.SR_SetDisplayRect = function(stDisplayRect) {
|
||||
|
||||
var gl = this.contextGL;
|
||||
|
||||
var nWindowWidth = this.nWindowWidth;
|
||||
var nWindowHeight = this.nWindowHeight;
|
||||
|
||||
var texturePosValues = null;
|
||||
|
||||
if(stDisplayRect && nWindowWidth > 0 && nWindowHeight > 0) {
|
||||
var fLeft = stDisplayRect.left / nWindowWidth;
|
||||
var fTop = stDisplayRect.top / nWindowHeight;
|
||||
var fRight = stDisplayRect.right / nWindowWidth;
|
||||
var fBottom = stDisplayRect.bottom / nWindowHeight;
|
||||
|
||||
texturePosValues = new Float32Array([fRight, fTop, fLeft, fTop, fRight, fBottom, fLeft, fBottom]);
|
||||
}
|
||||
else {
|
||||
texturePosValues = new Float32Array([1, 0, 0, 0, 1, 1, 0, 1]);
|
||||
}
|
||||
|
||||
var texturePosBuffer = this.texturePosBuffer;
|
||||
|
||||
gl.bindBuffer(gl.ARRAY_BUFFER, texturePosBuffer);
|
||||
gl.bufferSubData(gl.ARRAY_BUFFER, 0, texturePosValues);
|
||||
gl.bindBuffer(gl.ARRAY_BUFFER, null);
|
||||
};
|
||||
|
||||
/**
|
||||
* 释放显示资源
|
||||
*/
|
||||
RenderManager.prototype.SR_Destroy = function() {
|
||||
|
||||
var gl = this.contextGL;
|
||||
|
||||
var YUVProgram = this.YUVProgram;
|
||||
gl.deleteProgram(YUVProgram);
|
||||
|
||||
var vertexPosBuffer = this.vertexPosBuffer;
|
||||
var texturePosBuffer = this.texturePosBuffer;
|
||||
|
||||
gl.deleteBuffer(vertexPosBuffer);
|
||||
gl.deleteBuffer(texturePosBuffer);
|
||||
|
||||
var yTextureRef = this.yTextureRef;
|
||||
var uTextureRef = this.uTextureRef;
|
||||
var vTextureRef = this.vTextureRef;
|
||||
gl.deleteTexture(yTextureRef);
|
||||
gl.deleteTexture(uTextureRef);
|
||||
gl.deleteTexture(vTextureRef);
|
||||
};
|
||||
|
||||
return RenderManager;
|
||||
|
||||
}));
|
|
@ -0,0 +1 @@
|
|||
!function(){function e(){var e=new XMLHttpRequest;return e.open("GET","SystemTransform.js.mem"),e.responseType="arraybuffer",e.send(),e}self.Module={memoryInitializerRequest:e()},importScripts("SystemTransform.js"),Module.postRun.push(function(){postMessage({type:"loaded"})}),onmessage=function(e){var a=e.data;if("create"===a.type){var t=a.len,r=Module._malloc(t),o=Module.HEAPU8.subarray(r,r+t);o.set(new Uint8Array(a.buf));var s=a.packType,l=Module._ST_Create(r,t,s);0!=l?console.log("_ST_Create failed!"):(Module._ST_Start(),postMessage({type:"created"}))}else if("inputData"===a.type){var u=a.len,n=Module._malloc(u),o=Module.HEAPU8.subarray(n,n+u);o.set(new Uint8Array(a.buf));var l=Module._ST_InputData(0,n,u);Module._free(n)}else"release"===a.type&&(Module._ST_Stop(),Module._ST_Release(),close())}}();
|
|
@ -0,0 +1,98 @@
|
|||
/*
|
||||
|
||||
uuid.js - Version 0.2
|
||||
JavaScript Class to create a UUID like identifier
|
||||
*/
|
||||
|
||||
// On creation of a UUID object, set it's initial value
|
||||
function UUID(){
|
||||
this.id = this.createUUID();
|
||||
}
|
||||
|
||||
// When asked what this Object is, lie and return it's value
|
||||
UUID.prototype.valueOf = function(){ return this.id; }
|
||||
UUID.prototype.toString = function(){ return this.id; }
|
||||
|
||||
//
|
||||
// INSTANCE SPECIFIC METHODS
|
||||
//
|
||||
|
||||
UUID.prototype.createUUID = function(){
|
||||
//
|
||||
// Loose interpretation of the specification DCE 1.1: Remote Procedure Call
|
||||
// described at http://www.opengroup.org/onlinepubs/009629399/apdxa.htm#tagtcjh_37
|
||||
// since JavaScript doesn't allow access to internal systems, the last 48 bits
|
||||
// of the node section is made up using a series of random numbers (6 octets long).
|
||||
//
|
||||
var dg = new Date(1582, 10, 15, 0, 0, 0, 0);
|
||||
var dc = new Date();
|
||||
var t = dc.getTime() - dg.getTime();
|
||||
var h = '-';
|
||||
var tl = UUID.getIntegerBits(t,0,31);
|
||||
var tm = UUID.getIntegerBits(t,32,47);
|
||||
var thv = UUID.getIntegerBits(t,48,59) + '1'; // version 1, security version is 2
|
||||
var csar = UUID.getIntegerBits(UUID.rand(4095),0,7);
|
||||
var csl = UUID.getIntegerBits(UUID.rand(4095),0,7);
|
||||
|
||||
// since detection of anything about the machine/browser is far to buggy,
|
||||
// include some more random numbers here
|
||||
// if NIC or an IP can be obtained reliably, that should be put in
|
||||
// here instead.
|
||||
var n = UUID.getIntegerBits(UUID.rand(8191),0,7) +
|
||||
UUID.getIntegerBits(UUID.rand(8191),8,15) +
|
||||
UUID.getIntegerBits(UUID.rand(8191),0,7) +
|
||||
UUID.getIntegerBits(UUID.rand(8191),8,15) +
|
||||
UUID.getIntegerBits(UUID.rand(8191),0,15); // this last number is two octets long
|
||||
return tl + h + tm + h + thv + h + csar + csl + h + n;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// GENERAL METHODS (Not instance specific)
|
||||
//
|
||||
|
||||
|
||||
// Pull out only certain bits from a very large integer, used to get the time
|
||||
// code information for the first part of a UUID. Will return zero's if there
|
||||
// aren't enough bits to shift where it needs to.
|
||||
UUID.getIntegerBits = function(val,start,end){
|
||||
var base16 = UUID.returnBase(val,16);
|
||||
var quadArray = new Array();
|
||||
var quadString = '';
|
||||
var i = 0;
|
||||
for(i=0;i<base16.length;i++){
|
||||
quadArray.push(base16.substring(i,i+1));
|
||||
}
|
||||
for(i=Math.floor(start/4);i<=Math.floor(end/4);i++){
|
||||
if(!quadArray[i] || quadArray[i] == '') quadString += '0';
|
||||
else quadString += quadArray[i];
|
||||
}
|
||||
return quadString;
|
||||
}
|
||||
|
||||
// Numeric Base Conversion algorithm from irt.org
|
||||
// In base 16: 0=0, 5=5, 10=A, 15=F
|
||||
UUID.returnBase = function(number, base){
|
||||
//
|
||||
// Copyright 1996-2006 irt.org, All Rights Reserved.
|
||||
//
|
||||
// Downloaded from: http://www.irt.org/script/146.htm
|
||||
// modified to work in this class by Erik Giberti
|
||||
var convert = ['0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'];
|
||||
if (number < base) var output = convert[number];
|
||||
else {
|
||||
var MSD = '' + Math.floor(number / base);
|
||||
var LSD = number - MSD*base;
|
||||
if (MSD >= base) var output = this.returnBase(MSD,base) + convert[LSD];
|
||||
else var output = convert[MSD] + convert[LSD];
|
||||
}
|
||||
return output;
|
||||
}
|
||||
|
||||
// pick a random number within a range of numbers
|
||||
// int b rand(int a); where 0 <= b <= a
|
||||
UUID.rand = function(max){
|
||||
return Math.floor(Math.random() * max);
|
||||
}
|
||||
|
||||
// end of UUID class file
|
|
@ -0,0 +1,407 @@
|
|||
@charset "utf-8";
|
||||
*
|
||||
{
|
||||
margin:0;
|
||||
padding:0;
|
||||
}
|
||||
html
|
||||
{
|
||||
width:100%;
|
||||
height:100%;
|
||||
font-size:12px;
|
||||
font-family:Arial, Helvetica, sans-serif;
|
||||
-webkit-text-size-adjust:none;
|
||||
background:#FFFFFF;
|
||||
}
|
||||
body
|
||||
{
|
||||
/*padding:5px;*/
|
||||
}
|
||||
select
|
||||
{
|
||||
height:20px;
|
||||
line-height:20px;
|
||||
}
|
||||
.left
|
||||
{
|
||||
float:left;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.freeze
|
||||
{
|
||||
position:absolute;
|
||||
text-align:center;
|
||||
background:#343434;
|
||||
color:#FFFFFF;
|
||||
font-size:26px;
|
||||
font-weight:bold;
|
||||
filter:alpha(opacity=60);
|
||||
opacity:0.6;
|
||||
}
|
||||
.vtop
|
||||
{
|
||||
vertical-align:middle;
|
||||
margin-top:-1px;
|
||||
}
|
||||
/*插件*/
|
||||
.plugin
|
||||
{
|
||||
width:100%;
|
||||
height:100%;
|
||||
/*width:500px;*/
|
||||
/*height:300px;*/
|
||||
}
|
||||
fieldset
|
||||
{
|
||||
display:none;
|
||||
}
|
||||
/*本地配置*/
|
||||
.localconfig
|
||||
{
|
||||
width:480px;
|
||||
padding:10px;
|
||||
border:1px solid #7F9DB9;
|
||||
}
|
||||
.localconfig .tt
|
||||
{
|
||||
width:125px;
|
||||
}
|
||||
.localconfig .txt
|
||||
{
|
||||
width:310px;
|
||||
}
|
||||
.localconfig .txt2
|
||||
{
|
||||
width:300px;
|
||||
}
|
||||
.localconfig .btn
|
||||
{
|
||||
width:45px;
|
||||
height:22px;
|
||||
line-height:18px;
|
||||
}
|
||||
.localconfig .sel
|
||||
{
|
||||
width:120px;
|
||||
}
|
||||
/*登录*/
|
||||
.login
|
||||
{
|
||||
width:480px;
|
||||
padding:10px;
|
||||
border:1px solid #7F9DB9;
|
||||
}
|
||||
.login .tt
|
||||
{
|
||||
width:100px;
|
||||
}
|
||||
.login .txt
|
||||
{
|
||||
width:130px;
|
||||
}
|
||||
.login .btn
|
||||
{
|
||||
width:45px;
|
||||
height:22px;
|
||||
line-height:18px;
|
||||
}
|
||||
.login .btn2
|
||||
{
|
||||
width:100px;
|
||||
height:22px;
|
||||
line-height:18px;
|
||||
}
|
||||
.login .sel
|
||||
{
|
||||
width:130px;
|
||||
}
|
||||
.login .sel2
|
||||
{
|
||||
width:65px;
|
||||
}
|
||||
/*数字通道*/
|
||||
.ipchannel
|
||||
{
|
||||
width:480px;
|
||||
padding:10px;
|
||||
border:1px solid #7F9DB9;
|
||||
}
|
||||
.ipchannel .btn
|
||||
{
|
||||
width:130px;
|
||||
height:22px;
|
||||
line-height:18px;
|
||||
}
|
||||
.ipchannel .digitaltdiv
|
||||
{
|
||||
height:100px;
|
||||
overflow:hidden;
|
||||
overflow-y:auto;
|
||||
border:1px solid #7F9DB9;
|
||||
font-size:11px;
|
||||
}
|
||||
.ipchannel .digitalchannellist th, .ipchannel .digitalchannellist td
|
||||
{
|
||||
padding:2px;
|
||||
border:1px solid #7F9DB9;
|
||||
border-collapse:collapse;
|
||||
white-space:nowrap;
|
||||
}
|
||||
/*预览*/
|
||||
.preview
|
||||
{
|
||||
width:450px;
|
||||
padding:10px;
|
||||
padding-top:0;
|
||||
margin-left:10px;
|
||||
border:1px solid #7F9DB9;
|
||||
}
|
||||
.preview .tt
|
||||
{
|
||||
width:60px;
|
||||
}
|
||||
.preview .txt
|
||||
{
|
||||
width:30px;
|
||||
}
|
||||
.preview .btn
|
||||
{
|
||||
width:70px;
|
||||
height:22px;
|
||||
line-height:18px;
|
||||
}
|
||||
.preview .btn2
|
||||
{
|
||||
width:90px;
|
||||
height:22px;
|
||||
line-height:18px;
|
||||
}
|
||||
.preview .sel
|
||||
{
|
||||
width:105px;
|
||||
}
|
||||
/*云台*/
|
||||
.ptz
|
||||
{
|
||||
width:450px;
|
||||
padding:10px;
|
||||
margin-left:10px;
|
||||
border:1px solid #7F9DB9;
|
||||
}
|
||||
.ptz .tt
|
||||
{
|
||||
width:60px;
|
||||
}
|
||||
.ptz .txt
|
||||
{
|
||||
width:60px;
|
||||
}
|
||||
.ptz .btn
|
||||
{
|
||||
width:45px;
|
||||
height:22px;
|
||||
line-height:18px;
|
||||
}
|
||||
.ptz .btn2
|
||||
{
|
||||
width:60px;
|
||||
height:22px;
|
||||
line-height:18px;
|
||||
}
|
||||
.ptz .sel
|
||||
{
|
||||
width:65px;
|
||||
}
|
||||
/*视频参数*/
|
||||
.videoparam
|
||||
{
|
||||
width:450px;
|
||||
padding:10px;
|
||||
margin-left:10px;
|
||||
border:1px solid #7F9DB9;
|
||||
}
|
||||
.videoparam .tt
|
||||
{
|
||||
width:60px;
|
||||
}
|
||||
.videoparam .txt
|
||||
{
|
||||
width:60px;
|
||||
}
|
||||
.videoparam .btn
|
||||
{
|
||||
width:45px;
|
||||
height:22px;
|
||||
line-height:18px;
|
||||
}
|
||||
.videoparam .sel
|
||||
{
|
||||
width:65px;
|
||||
}
|
||||
/*回放*/
|
||||
.playback
|
||||
{
|
||||
width:450px;
|
||||
padding:10px;
|
||||
margin-left:10px;
|
||||
border:1px solid #7F9DB9;
|
||||
}
|
||||
.playback .tt
|
||||
{
|
||||
width:60px;
|
||||
}
|
||||
.playback .txt
|
||||
{
|
||||
width:140px;
|
||||
}
|
||||
.playback .btn
|
||||
{
|
||||
width:45px;
|
||||
height:22px;
|
||||
line-height:18px;
|
||||
}
|
||||
.playback .btn2
|
||||
{
|
||||
width:70px;
|
||||
height:22px;
|
||||
line-height:18px;
|
||||
}
|
||||
.playback .sel
|
||||
{
|
||||
width:142px;
|
||||
}
|
||||
.playback .searchdiv
|
||||
{
|
||||
height:100px;
|
||||
overflow:hidden;
|
||||
overflow-y:auto;
|
||||
border:1px solid #7F9DB9;
|
||||
font-size:11px;
|
||||
}
|
||||
.playback .searchlist th, .playback .searchlist td
|
||||
{
|
||||
padding:2px;
|
||||
border:1px solid #7F9DB9;
|
||||
border-collapse:collapse;
|
||||
white-space:nowrap;
|
||||
}
|
||||
/*系统维护*/
|
||||
.maintain
|
||||
{
|
||||
width:450px;
|
||||
padding:10px;
|
||||
margin-left:10px;
|
||||
border:1px solid #7F9DB9;
|
||||
}
|
||||
.maintain .tt
|
||||
{
|
||||
width:60px;
|
||||
}
|
||||
.maintain .txt
|
||||
{
|
||||
width:280px;
|
||||
}
|
||||
.maintain .btn
|
||||
{
|
||||
width:45px;
|
||||
height:22px;
|
||||
line-height:18px;
|
||||
}
|
||||
.maintain .btn2
|
||||
{
|
||||
width:100px;
|
||||
height:22px;
|
||||
line-height:18px;
|
||||
}
|
||||
.maintain .sel
|
||||
{
|
||||
width:65px;
|
||||
}
|
||||
/*操作信息*/
|
||||
.operate
|
||||
{
|
||||
width:450px;
|
||||
padding:10px;
|
||||
margin-left:10px;
|
||||
border:1px solid #7F9DB9;
|
||||
}
|
||||
.operate .opinfo
|
||||
{
|
||||
height:150px;
|
||||
border:1px solid #7F9DB9;
|
||||
overflow:auto;
|
||||
}
|
||||
/*事件回调*/
|
||||
.callback
|
||||
{
|
||||
width:450px;
|
||||
padding:10px;
|
||||
margin-left:10px;
|
||||
border:1px solid #7F9DB9;
|
||||
}
|
||||
.callback .cbinfo
|
||||
{
|
||||
height:114px;
|
||||
border:1px solid #7F9DB9;
|
||||
overflow:auto;
|
||||
}
|
||||
/*IP解析*/
|
||||
.ipparse
|
||||
{
|
||||
width:450px;
|
||||
padding:10px;
|
||||
margin-left:10px;
|
||||
border:1px solid #7F9DB9;
|
||||
}
|
||||
.ipparse .tt
|
||||
{
|
||||
width:85px;
|
||||
}
|
||||
.ipparse .txt
|
||||
{
|
||||
width:130px;
|
||||
}
|
||||
.ipparse .btn
|
||||
{
|
||||
width:90px;
|
||||
height:22px;
|
||||
line-height:18px;
|
||||
}
|
||||
.ipparse .sel
|
||||
{
|
||||
width:130px;
|
||||
}
|
||||
/*绘图*/
|
||||
.draw
|
||||
{
|
||||
width:450px;
|
||||
padding:10px;
|
||||
padding-top:0;
|
||||
margin-left:10px;
|
||||
border:1px solid #7F9DB9;
|
||||
}
|
||||
.draw .tt
|
||||
{
|
||||
width:60px;
|
||||
}
|
||||
.draw .txt
|
||||
{
|
||||
width:140px;
|
||||
}
|
||||
.draw .btn
|
||||
{
|
||||
width:70px;
|
||||
height:22px;
|
||||
line-height:18px;
|
||||
}
|
||||
.draw .btn2
|
||||
{
|
||||
width:100px;
|
||||
height:22px;
|
||||
line-height:18px;
|
||||
}
|
||||
.draw .sel
|
||||
{
|
||||
width:105px;
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<title></title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta http-equiv="Pragma" content="no-cache" />
|
||||
<meta http-equiv="Cache-Control" content="no-cache, must-revalidate" />
|
||||
<meta http-equiv="Expires" content="0" />
|
||||
</head>
|
||||
<body>
|
||||
</body>
|
||||
<script>
|
||||
var szLanguage = (navigator.language || navigator.browserLanguage).toLowerCase();
|
||||
szLanguage = szLanguage.substring(0, 2);
|
||||
if ("zh" === szLanguage) {
|
||||
window.location.href = "cn/demo.html";
|
||||
}
|
||||
</script>
|
||||
</html>
|
|
@ -0,0 +1,18 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<!-- <link rel="icon" type="image/svg+xml" href="/vite.svg" /> -->
|
||||
<link rel="icon" type="image/svg+xml" href="./vite.png" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>阜阳大屏可视化
|
||||
</title>
|
||||
<!-- <link rel="stylesheet" href="//at.alicdn.com/t/c/font_4490429_ym69s57vxr.css"> -->
|
||||
|
||||
<script type="module" crossorigin src="./assets/index-B9cYO4uo.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="./assets/index-BK_ECgu2.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
</body>
|
||||
</html>
|
After Width: | Height: | Size: 5.5 KiB |
After Width: | Height: | Size: 111 KiB |
|
@ -0,0 +1 @@
|
|||
Version = 2.2.9
|
|
@ -0,0 +1,219 @@
|
|||
@charset "utf-8";
|
||||
* {
|
||||
margin:0;
|
||||
padding:0;
|
||||
}
|
||||
html {
|
||||
width:100%;
|
||||
height:100%;
|
||||
font-size:12px;
|
||||
font-family:Arial, Helvetica, sans-serif;
|
||||
-webkit-text-size-adjust:none;
|
||||
background:#FFFFFF;
|
||||
overflow: hidden;
|
||||
}
|
||||
body {
|
||||
/* padding:10px; */
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
/* overflow: scroll; */
|
||||
}
|
||||
.h5-left{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.h5-left,
|
||||
.h5-right {
|
||||
|
||||
float: left;
|
||||
margin-right: 20px;
|
||||
}
|
||||
.fn-padl10 {
|
||||
padding-left: 10px;
|
||||
}
|
||||
.fn-marl10 {
|
||||
margin-left: 10px;
|
||||
}
|
||||
.fn-clear {
|
||||
clear: both;
|
||||
}
|
||||
.fn-overflow {
|
||||
overflow: hidden;
|
||||
}
|
||||
.fn-width100 {
|
||||
width: 100px;
|
||||
}
|
||||
.fn-marl10 {
|
||||
margin-left: 10px;
|
||||
}
|
||||
.fn-marl150 {
|
||||
margin-left: 150px;
|
||||
}
|
||||
.fn-mart10 {
|
||||
margin-top: 10px;
|
||||
}
|
||||
.fn-fontBlue {
|
||||
color: blue;
|
||||
}
|
||||
.fn-fontRed {
|
||||
color: red !important;
|
||||
}
|
||||
.fn-lightBorder {
|
||||
border: 1px solid rgb(255, 204, 0) !important;
|
||||
}
|
||||
.fn-normalBorder {
|
||||
border: 1px solid rgb(125, 125, 125) !important;
|
||||
}
|
||||
fieldset {
|
||||
display:block;
|
||||
margin-top: 10px;
|
||||
}
|
||||
fieldset legend{
|
||||
font-size: 14px;
|
||||
}
|
||||
.h5-play-wrap {
|
||||
/* width: 500px;
|
||||
height: 300px; */
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: #000;
|
||||
border: 1px solid #333;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
.h5-fieldset-wrap {
|
||||
width: 520px;
|
||||
padding: 10px;
|
||||
border: 1px solid #333;
|
||||
}
|
||||
.h5-form-item {
|
||||
float: left;
|
||||
height: auto;
|
||||
overflow: hidden;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
.h5-form-item label {
|
||||
width: 80px;
|
||||
display: inline-block;
|
||||
}
|
||||
.h5-form-item input {
|
||||
width: 130px;
|
||||
}
|
||||
.h5-form-item select {
|
||||
width: 134px;
|
||||
}
|
||||
.h5-form-item span {
|
||||
width: 60px;
|
||||
}
|
||||
.h5-form-item .h5-button {
|
||||
width: 80px;
|
||||
height: 30px;
|
||||
font-size: 12px;
|
||||
}
|
||||
.h5-ptz-wrap {
|
||||
width: 210px;
|
||||
float: left;
|
||||
}
|
||||
.h5-step-wrap {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.h5-zoomfocus-wrap {
|
||||
width: 200px;
|
||||
float: left;
|
||||
}
|
||||
.h5-preset-wrap {
|
||||
float: left;
|
||||
margin-top: 10px;
|
||||
}
|
||||
.h5-ptz-wrap .h5-button {
|
||||
width: 60px;
|
||||
height: 30px;
|
||||
margin-bottom: 3px;
|
||||
}
|
||||
.h5-zoomfocus-wrap .h5-button {
|
||||
width: 80px;
|
||||
height: 30px;
|
||||
margin-bottom: 3px;
|
||||
}
|
||||
.h5-preset-wrap .h5-button {
|
||||
width: 60px;
|
||||
height: 30px;
|
||||
margin-bottom: 3px;
|
||||
}
|
||||
.h5-preset-wrap input {
|
||||
width: 130px;
|
||||
}
|
||||
.h5-table {
|
||||
border-collapse: collapse;
|
||||
background: #ddd;
|
||||
width: 600px;
|
||||
float: left;
|
||||
height: 300px;
|
||||
display: block;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
.h5-table tbody tr:nth-child(odd) {
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.h5-table tr td{
|
||||
text-align: center;
|
||||
padding: 5px 0;
|
||||
border: 1px solid #999;
|
||||
}
|
||||
.h5-table tr:hover{
|
||||
cursor: text;
|
||||
}
|
||||
a.i-download {
|
||||
display: block;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
margin: 0 auto;
|
||||
cursor: pointer;
|
||||
background: #cccccc;
|
||||
border-radius: 50%;
|
||||
}
|
||||
a.i-download:hover {
|
||||
background: #999;
|
||||
}
|
||||
.h5-page {
|
||||
text-align: right;
|
||||
margin-top: 10px;
|
||||
margin-right: 18px;
|
||||
display: block;
|
||||
float: left;
|
||||
}
|
||||
.h5-ul {
|
||||
float: left;
|
||||
background: #ccc;
|
||||
list-style: none;
|
||||
max-height: 250px;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
.h5-ul li {
|
||||
cursor: pointer;
|
||||
height: 20px;
|
||||
line-height: 20px;
|
||||
}
|
||||
.h5-ul li:hover {
|
||||
background-color: #eee;
|
||||
}
|
||||
.video_loading{
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
color: #fff;
|
||||
}
|
||||
.h5-menu-list {
|
||||
margin-top: 40px;
|
||||
background-color: #ccc;
|
||||
}
|
||||
.h5-menu-list li {
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
font-size: 20px;
|
||||
cursor: pointer;
|
||||
}
|
||||
.h5-menu-list li:hover {
|
||||
background-color: #eee;
|
||||
}
|
|
@ -0,0 +1,272 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta http-equiv="Pragma" content="no-cache" />
|
||||
<meta http-equiv="Cache-Control" content="no-cache, must-revalidate" />
|
||||
<meta http-equiv="Expires" content="0" />
|
||||
<link rel="stylesheet" href="css/style.css">
|
||||
<style>
|
||||
.h5-fieldset-wrap,.h5-middle{
|
||||
display: none !important;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="h5-left">
|
||||
<div class="h5-play-wrap">
|
||||
</div>
|
||||
<fieldset class="h5-fieldset-wrap">
|
||||
<legend>登录</legend>
|
||||
<div class="h5-form-item">
|
||||
<label>设备ip</label>
|
||||
<input type="text" id="h5_ip" >
|
||||
</div>
|
||||
<div class="h5-form-item fn-padl10">
|
||||
<label>端口</label>
|
||||
<input type="text" id="h5_port" value="80">
|
||||
</div>
|
||||
<div class="h5-form-item">
|
||||
<label>用户名</label>
|
||||
<input type="text" id="h5_user">
|
||||
</div>
|
||||
<div class="h5-form-item fn-padl10">
|
||||
<label>密码</label>
|
||||
<input type="text" id="h5_password">
|
||||
</div>
|
||||
<div class="h5-form-item" style="margin-left: 228px;">
|
||||
<label>窗口分割</label>
|
||||
<select class="h5-select" sel-for="onChangeWdnNum">
|
||||
<option value="1" selected="">1x1</option>
|
||||
<option value="2">2x2</option>
|
||||
<option value="3">3x3</option>
|
||||
<option value="4">4x4</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="h5-form-item fn-clear" style="height: 30px;">
|
||||
<input type="button" value="登录" class="h5-button" btn-for="onLogin">
|
||||
<input type="button" value="注销" class="h5-button fn-marl10" btn-for="onLogout">
|
||||
<label class="fn-padl10">登录状态:</label>
|
||||
<span style="color: red;" id="h5_loginState">未登录</span>
|
||||
</div>
|
||||
</fieldset>
|
||||
<fieldset class="h5-fieldset-wrap">
|
||||
<legend>预览</legend>
|
||||
<div class="h5-form-item">
|
||||
<label>通道列表</label>
|
||||
</div>
|
||||
<ul class="h5-ul" id="h5_channel_list">
|
||||
</ul>
|
||||
<div class="h5-form-item fn-padl10">
|
||||
<label>码流类型</label>
|
||||
<select id="h5_stream" sel-for="onChangeStream"></select>
|
||||
</div>
|
||||
<div class="h5-form-item fn-mart10">
|
||||
<label>音量</label>
|
||||
<input type="range" id="h5_volume" min="0" max="1" step="0.1" value="0.5">
|
||||
<span id="h5_volume_value"></span>
|
||||
<span>(范围:0~1)</span>
|
||||
</div>
|
||||
<div class="h5-form-item fn-clear" style="display: none;">
|
||||
<input type="button" class="h5-button" value="开始预览" btn-for="onPreview">
|
||||
<input type="button" class="h5-button fn-marl10" value="停止预览" btn-for="onStopPreview">
|
||||
</div>
|
||||
<div class="h5-form-item fn-clear">
|
||||
<input type="button" class="h5-button" value="打开声音" btn-for="onTurnOnSound">
|
||||
<input type="button" class="h5-button fn-marl10" value="关闭声音" btn-for="onTurnSoundOff">
|
||||
<input type="button" class="h5-button fn-marl10" value="开始对讲" btn-for="onStartTalk">
|
||||
<input type="button" class="h5-button fn-marl10" value="停止对讲" btn-for="onStopTalk">
|
||||
</div>
|
||||
<div class="h5-form-item fn-clear">
|
||||
<input type="button" class="h5-button" value="抓图" btn-for="onSnap">
|
||||
<input type="button" class="h5-button fn-marl10" value="开始录像" btn-for="onStartRecord">
|
||||
<input type="button" class="h5-button fn-marl10" value="停止录像" btn-for="onStopRecord">
|
||||
<input type="button" class="h5-button fn-marl10" value="全屏" btn-for="onSetFull">
|
||||
</div>
|
||||
<div class="h5-form-item fn-clear">
|
||||
<input type="button" class="h5-button" style="width: 100px;" value="开启电子放大" btn-for="onStartEnlarge">
|
||||
<input type="button" class="h5-button fn-marl10" style="width: 100px;" value="关闭电子放大"
|
||||
btn-for="onStopEnlarge">
|
||||
</div>
|
||||
<div class="h5-form-item fn-clear">
|
||||
<input type="button" class="h5-button" style="width: 100px;" value="开启区域放大"
|
||||
btn-for="onStartGridEnlarge">
|
||||
<input type="button" class="h5-button fn-marl10" style="width: 100px;" value="关闭区域放大"
|
||||
btn-for="onCloseGridEnlarge">
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
<div class="h5-middle">
|
||||
<fieldset class="h5-fieldset-wrap">
|
||||
<legend>云台控制</legend>
|
||||
<div class="h5-step-wrap">
|
||||
<span>步长(1-8):</span>
|
||||
<select id="h5_ptz_step" style="width: 130px;">
|
||||
<option value="1">1</option>
|
||||
<option value="2">2</option>
|
||||
<option value="3">3</option>
|
||||
<option value="4">4</option>
|
||||
<option value="5" selected="">5</option>
|
||||
<option value="6">6</option>
|
||||
<option value="7">7</option>
|
||||
<option value="8">8</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="h5-ptz-wrap" title="云台按钮操作界面">
|
||||
<input type="button" class="h5-button" value="左上" onmousedown="onHandlePTZ('LeftUp', false)"
|
||||
onmouseup="onHandlePTZ('LeftUp', true)">
|
||||
<input type="button" class="h5-button" value="上" onmousedown="onHandlePTZ('Up', false)"
|
||||
onmouseup="onHandlePTZ('Up', true)">
|
||||
<input type="button" class="h5-button" value="右上" onmousedown="onHandlePTZ('RightUp', false)"
|
||||
onmouseup="onHandlePTZ('RightUp', true)">
|
||||
<input type="button" class="h5-button" value="左" onmousedown="onHandlePTZ('Left', false)"
|
||||
onmouseup="onHandlePTZ('Left', true)">
|
||||
<input type="button" class="h5-button" value="自动" onmousedown="onHandlePTZ('Auto', false)"
|
||||
onmouseup="onHandlePTZ('Auto', true)">
|
||||
<input type="button" class="h5-button" value="右" onmousedown="onHandlePTZ('Right', false)"
|
||||
onmouseup="onHandlePTZ('Right', true)">
|
||||
<input type="button" class="h5-button" value="左下" onmousedown="onHandlePTZ('LeftDown', false)"
|
||||
onmouseup="onHandlePTZ('LeftDown', true)">
|
||||
<input type="button" class="h5-button" value="下" onmousedown="onHandlePTZ('Down', false)"
|
||||
onmouseup="onHandlePTZ('Down', true)">
|
||||
<input type="button" class="h5-button" value="右下" onmousedown="onHandlePTZ('RightDown', false)"
|
||||
onmouseup="onHandlePTZ('RightDown', true)">
|
||||
</div>
|
||||
<div class="h5-zoomfocus-wrap" title="变倍聚焦操作界面">
|
||||
<input type="button" class="h5-button" value="变倍-" onmousedown="onHandlePTZ('ZoomWide', false)"
|
||||
onmouseup="onHandlePTZ('ZoomWide', true)">
|
||||
<input type="button" class="h5-button" value="变倍+" onmousedown="onHandlePTZ('ZoomTele', false)"
|
||||
onmouseup="onHandlePTZ('ZoomTele', true)">
|
||||
<input type="button" class="h5-button" value="聚焦-" onmousedown="onHandlePTZ('FocusFar', false)"
|
||||
onmouseup="onHandlePTZ('FocusFar', true)">
|
||||
<input type="button" class="h5-button" value="聚焦+" onmousedown="onHandlePTZ('FocusNear', false)"
|
||||
onmouseup="onHandlePTZ('FocusNear', true)">
|
||||
<input type="button" class="h5-button" value="光圈-" onmousedown="onHandlePTZ('IrisSmall', false)"
|
||||
onmouseup="onHandlePTZ('IrisSmall', true)">
|
||||
<input type="button" class="h5-button" value="光圈+" onmousedown="onHandlePTZ('IrisLarge', false)"
|
||||
onmouseup="onHandlePTZ('IrisLarge', true)">
|
||||
</div>
|
||||
<div class="h5-preset-wrap" title="预置点操作界面">
|
||||
<div class="h5-item-form" style="margin-bottom: 10px;">
|
||||
<label>预置点:</label>
|
||||
<input type="text" id="h5_preset">
|
||||
</div>
|
||||
<input type="button" class="h5-button" value="查看" onclick="onHandlePTZ('GotoPreset', false)">
|
||||
<input type="button" class="h5-button" value="增加" onclick="onHandlePTZ('SetPreset', false)">
|
||||
<input type="button" class="h5-button" value="删除" onclick="onHandlePTZ('ClearPreset', false)">
|
||||
</div>
|
||||
</fieldset>
|
||||
<fieldset class="h5-fieldset-wrap" style="width: 600px;">
|
||||
<legend>录像回放</legend>
|
||||
<div class="h5-form-item">
|
||||
<label>开始时间</label>
|
||||
<input type="datetime-local" step="1" style="width: 170px;" id="h5_startTime">
|
||||
</div>
|
||||
<div class="h5-form-item" style="margin-left: 20px;">
|
||||
<label>结束时间</label>
|
||||
<input type="datetime-local" step="1" style="width: 170px;" id="h5_endTime">
|
||||
</div>
|
||||
<div class="h5-form-item">
|
||||
<label>通道列表</label>
|
||||
<select class="h5-select" id="h5_playback_channel"></select>
|
||||
<input type="button" class="h5-button fn-marl10" value="搜索" btn-for="onSearchRecord">
|
||||
</div>
|
||||
<table class="h5-table" id="h5_table">
|
||||
<thead>
|
||||
<tr>
|
||||
<td style="width: 50px;"><input type="checkbox" btn-for="onCheckAll" id="h5_checkAll"></td>
|
||||
<td style="width: 50px;">索引</td>
|
||||
<td style="width: 260px;">时间</td>
|
||||
<td style="width: 85px;">文件大小(KB)</td>
|
||||
<td style="width: 165px;">时间戳</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="h5-form-item fn-mart10">
|
||||
<input type="button" btn-for="onDownload" class="h5-button" value="下载">
|
||||
<span style="width: 40px">下载进度:<span id="h5_down_process" style="width: 50px"></span></span>
|
||||
<input type="button" btn-for="stopDownLoad" class="h5-button" value="取消下载">
|
||||
<a id="h5_first" class="h5-link" style="margin-left: 128px;" href="javascript:;">首页</a>
|
||||
<a id="h5_pre" class="h5-link" href="javascript:;">上页</a>
|
||||
<span>
|
||||
<span id="h5_curPage">2</span>/<span id="h5_totalPage">5</span>
|
||||
</span>
|
||||
<a id="h5_next" class="h5-link" href="javascript:;">下页</a>
|
||||
<a id="h5_last" class="h5-link" href="javascript:;">末页</a>
|
||||
<input type="text" style="width: 30px;" id="h5_goNumber">
|
||||
<input type="button" value="GO!" id="h5_goPage" style="width: 40px">
|
||||
</div>
|
||||
<div class="h5-form-item fn-mart10">
|
||||
<input type="button" value="开始回放(双击列表行)" disabled class="h5-button" style="width: 145px;"
|
||||
btn-for="onPausePlayback">
|
||||
<input type="button" value="暂停" class="h5-button" btn-for="onPausePlayback">
|
||||
<input type="button" value="继续" class="h5-button" btn-for="onContinuePlayback">
|
||||
<input type="button" value="结束回放" class="h5-button" btn-for="onClosePlayback">
|
||||
</div>
|
||||
<div class="h5-form-item fn-mart10" style="display: none;">
|
||||
<span>当前播放秒数</span>
|
||||
<span id="h5_curTime">--</span>
|
||||
<span>/</span>
|
||||
<span id="h5_totalTime">--</span>
|
||||
<input type="text" id="h5_goTime" style="width: 50px;">
|
||||
<input type="button" class="h5-button" btn-for="onGoTime" value="GO!">
|
||||
</div>
|
||||
<div class="h5-form-item fn-mart10">
|
||||
<label>裁剪起始时间</label>
|
||||
<input type="datetime-local" step="1" style="width: 200px;" id="h5_cutStartTime">
|
||||
<span> - </span>
|
||||
<input type="datetime-local" step="1" style="width: 200px;" id="h5_cutEndTime">
|
||||
</div>
|
||||
<div class="h5-form-item fn-mart10">
|
||||
<input type="button" class="h5-button" style="width:200px" btn-for="onStartCut" value="开始裁剪(先勾选一个录像)" />
|
||||
<span>裁剪进度:<span id="h5_cut_process"></span></span>
|
||||
</div>
|
||||
<div class="h5-form-item fn-mart10">
|
||||
<input type="button" btn-for="stopDownLoad" class="h5-button" value="取消裁剪">
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
</div>
|
||||
<script src="module/PlayerControl.js"></script>
|
||||
<script src="index.js"></script>
|
||||
<script>
|
||||
function setPlayer(ip, playerTime, playerEndTime, startTime, endTime) {
|
||||
// 默认登录参数为通道号,开始时间戳,结束时间戳,日期格式开始时间,日期格式结束时间
|
||||
// onLogin(0,3599,1711990805)
|
||||
console.log('ip',ip)
|
||||
console.log('playerTime',playerTime)
|
||||
console.log('playerEndTime',playerEndTime)
|
||||
onLogin(parseInt(ip) - 1, playerTime, playerEndTime)
|
||||
|
||||
//设置开始时间结束时间
|
||||
// $('#h5_startTime').value = '2024-04-02T00:00:00';
|
||||
$('#h5_startTime').value = startTime
|
||||
// $('#h5_endTime').value = '2024-04-02T23:59:59';
|
||||
$('#h5_endTime').value = endTime
|
||||
}
|
||||
// window.setPlayerA = setPlayer
|
||||
// 设置播放器
|
||||
// setPlayer(0,3599,1711990805,'2024-04-02T00:00:00','2024-04-02T01:30:00')
|
||||
function playerFun(val, playerStartTime, playerEndTime) {
|
||||
//下标,不是通道号,开始时间戳,结束时间戳,
|
||||
// 播放第一个视频
|
||||
let player = document.querySelectorAll('#h5_table tbody tr')[val];
|
||||
let dom1 = player.childNodes[1];
|
||||
let value1 = dom1.innerText - 1;
|
||||
let url1 = recordArr[value1].FilePath;
|
||||
onStopPreview();
|
||||
//是否是回放,回放视频的url,回放视频的索引。是否是切换码流导致的重新拉流,
|
||||
onPreview(true, url1, value1, false, playerStartTime,playerEndTime);
|
||||
// setTimeout(() => {
|
||||
// goTime(time)
|
||||
// }, 1500)
|
||||
}
|
||||
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
|
@ -0,0 +1,279 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta http-equiv="Pragma" content="no-cache" />
|
||||
<meta http-equiv="Cache-Control" content="no-cache, must-revalidate" />
|
||||
<meta http-equiv="Expires" content="0" />
|
||||
<link rel="stylesheet" href="css/style.css">
|
||||
<style>
|
||||
.h5-fieldset-wrap,.h5-middle{
|
||||
display: none !important;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="h5-left">
|
||||
<div class="h5-play-wrap">
|
||||
</div>
|
||||
<fieldset class="h5-fieldset-wrap">
|
||||
<legend>登录</legend>
|
||||
<div class="h5-form-item">
|
||||
<label>设备ip</label>
|
||||
<input type="text" id="h5_ip" >
|
||||
</div>
|
||||
<div class="h5-form-item fn-padl10">
|
||||
<label>端口</label>
|
||||
<input type="text" id="h5_port" value="80">
|
||||
</div>
|
||||
<div class="h5-form-item">
|
||||
<label>用户名</label>
|
||||
<input type="text" id="h5_user">
|
||||
</div>
|
||||
<div class="h5-form-item fn-padl10">
|
||||
<label>密码</label>
|
||||
<input type="text" id="h5_password">
|
||||
</div>
|
||||
<div class="h5-form-item" style="margin-left: 228px;">
|
||||
<label>窗口分割</label>
|
||||
<select class="h5-select" sel-for="onChangeWdnNum">
|
||||
<option value="1" selected="">1x1</option>
|
||||
<option value="2">2x2</option>
|
||||
<option value="3">3x3</option>
|
||||
<option value="4">4x4</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="h5-form-item fn-clear" style="height: 30px;">
|
||||
<input type="button" value="登录" class="h5-button" btn-for="onLogin">
|
||||
<input type="button" value="注销" class="h5-button fn-marl10" btn-for="onLogout">
|
||||
<label class="fn-padl10">登录状态:</label>
|
||||
<span style="color: red;" id="h5_loginState">未登录</span>
|
||||
</div>
|
||||
</fieldset>
|
||||
<fieldset class="h5-fieldset-wrap">
|
||||
<legend>预览</legend>
|
||||
<div class="h5-form-item">
|
||||
<label>通道列表</label>
|
||||
</div>
|
||||
<ul class="h5-ul" id="h5_channel_list">
|
||||
</ul>
|
||||
<div class="h5-form-item fn-padl10">
|
||||
<label>码流类型</label>
|
||||
<select id="h5_stream" sel-for="onChangeStream"></select>
|
||||
</div>
|
||||
<div class="h5-form-item fn-mart10">
|
||||
<label>音量</label>
|
||||
<input type="range" id="h5_volume" min="0" max="1" step="0.1" value="0.5">
|
||||
<span id="h5_volume_value"></span>
|
||||
<span>(范围:0~1)</span>
|
||||
</div>
|
||||
<div class="h5-form-item fn-clear" style="display: none;">
|
||||
<input type="button" class="h5-button" value="开始预览" btn-for="onPreview">
|
||||
<input type="button" class="h5-button fn-marl10" value="停止预览" btn-for="onStopPreview">
|
||||
</div>
|
||||
<div class="h5-form-item fn-clear">
|
||||
<input type="button" class="h5-button" value="打开声音" btn-for="onTurnOnSound">
|
||||
<input type="button" class="h5-button fn-marl10" value="关闭声音" btn-for="onTurnSoundOff">
|
||||
<input type="button" class="h5-button fn-marl10" value="开始对讲" btn-for="onStartTalk">
|
||||
<input type="button" class="h5-button fn-marl10" value="停止对讲" btn-for="onStopTalk">
|
||||
</div>
|
||||
<div class="h5-form-item fn-clear">
|
||||
<input type="button" class="h5-button" value="抓图" btn-for="onSnap">
|
||||
<input type="button" class="h5-button fn-marl10" value="开始录像" btn-for="onStartRecord">
|
||||
<input type="button" class="h5-button fn-marl10" value="停止录像" btn-for="onStopRecord">
|
||||
<input type="button" class="h5-button fn-marl10" value="全屏" btn-for="onSetFull">
|
||||
</div>
|
||||
<div class="h5-form-item fn-clear">
|
||||
<input type="button" class="h5-button" style="width: 100px;" value="开启电子放大" btn-for="onStartEnlarge">
|
||||
<input type="button" class="h5-button fn-marl10" style="width: 100px;" value="关闭电子放大"
|
||||
btn-for="onStopEnlarge">
|
||||
</div>
|
||||
<div class="h5-form-item fn-clear">
|
||||
<input type="button" class="h5-button" style="width: 100px;" value="开启区域放大"
|
||||
btn-for="onStartGridEnlarge">
|
||||
<input type="button" class="h5-button fn-marl10" style="width: 100px;" value="关闭区域放大"
|
||||
btn-for="onCloseGridEnlarge">
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
<div class="h5-middle">
|
||||
<fieldset class="h5-fieldset-wrap">
|
||||
<legend>云台控制</legend>
|
||||
<div class="h5-step-wrap">
|
||||
<span>步长(1-8):</span>
|
||||
<select id="h5_ptz_step" style="width: 130px;">
|
||||
<option value="1">1</option>
|
||||
<option value="2">2</option>
|
||||
<option value="3">3</option>
|
||||
<option value="4">4</option>
|
||||
<option value="5" selected="">5</option>
|
||||
<option value="6">6</option>
|
||||
<option value="7">7</option>
|
||||
<option value="8">8</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="h5-ptz-wrap" title="云台按钮操作界面">
|
||||
<input type="button" class="h5-button" value="左上" onmousedown="onHandlePTZ('LeftUp', false)"
|
||||
onmouseup="onHandlePTZ('LeftUp', true)">
|
||||
<input type="button" class="h5-button" value="上" onmousedown="onHandlePTZ('Up', false)"
|
||||
onmouseup="onHandlePTZ('Up', true)">
|
||||
<input type="button" class="h5-button" value="右上" onmousedown="onHandlePTZ('RightUp', false)"
|
||||
onmouseup="onHandlePTZ('RightUp', true)">
|
||||
<input type="button" class="h5-button" value="左" onmousedown="onHandlePTZ('Left', false)"
|
||||
onmouseup="onHandlePTZ('Left', true)">
|
||||
<input type="button" class="h5-button" value="自动" onmousedown="onHandlePTZ('Auto', false)"
|
||||
onmouseup="onHandlePTZ('Auto', true)">
|
||||
<input type="button" class="h5-button" value="右" onmousedown="onHandlePTZ('Right', false)"
|
||||
onmouseup="onHandlePTZ('Right', true)">
|
||||
<input type="button" class="h5-button" value="左下" onmousedown="onHandlePTZ('LeftDown', false)"
|
||||
onmouseup="onHandlePTZ('LeftDown', true)">
|
||||
<input type="button" class="h5-button" value="下" onmousedown="onHandlePTZ('Down', false)"
|
||||
onmouseup="onHandlePTZ('Down', true)">
|
||||
<input type="button" class="h5-button" value="右下" onmousedown="onHandlePTZ('RightDown', false)"
|
||||
onmouseup="onHandlePTZ('RightDown', true)">
|
||||
</div>
|
||||
<div class="h5-zoomfocus-wrap" title="变倍聚焦操作界面">
|
||||
<input type="button" class="h5-button" value="变倍-" onmousedown="onHandlePTZ('ZoomWide', false)"
|
||||
onmouseup="onHandlePTZ('ZoomWide', true)">
|
||||
<input type="button" class="h5-button" value="变倍+" onmousedown="onHandlePTZ('ZoomTele', false)"
|
||||
onmouseup="onHandlePTZ('ZoomTele', true)">
|
||||
<input type="button" class="h5-button" value="聚焦-" onmousedown="onHandlePTZ('FocusFar', false)"
|
||||
onmouseup="onHandlePTZ('FocusFar', true)">
|
||||
<input type="button" class="h5-button" value="聚焦+" onmousedown="onHandlePTZ('FocusNear', false)"
|
||||
onmouseup="onHandlePTZ('FocusNear', true)">
|
||||
<input type="button" class="h5-button" value="光圈-" onmousedown="onHandlePTZ('IrisSmall', false)"
|
||||
onmouseup="onHandlePTZ('IrisSmall', true)">
|
||||
<input type="button" class="h5-button" value="光圈+" onmousedown="onHandlePTZ('IrisLarge', false)"
|
||||
onmouseup="onHandlePTZ('IrisLarge', true)">
|
||||
</div>
|
||||
<div class="h5-preset-wrap" title="预置点操作界面">
|
||||
<div class="h5-item-form" style="margin-bottom: 10px;">
|
||||
<label>预置点:</label>
|
||||
<input type="text" id="h5_preset">
|
||||
</div>
|
||||
<input type="button" class="h5-button" value="查看" onclick="onHandlePTZ('GotoPreset', false)">
|
||||
<input type="button" class="h5-button" value="增加" onclick="onHandlePTZ('SetPreset', false)">
|
||||
<input type="button" class="h5-button" value="删除" onclick="onHandlePTZ('ClearPreset', false)">
|
||||
</div>
|
||||
</fieldset>
|
||||
<fieldset class="h5-fieldset-wrap" style="width: 600px;">
|
||||
<legend>录像回放</legend>
|
||||
<div class="h5-form-item">
|
||||
<label>开始时间</label>
|
||||
<input type="datetime-local" step="1" style="width: 170px;" id="h5_startTime">
|
||||
</div>
|
||||
<div class="h5-form-item" style="margin-left: 20px;">
|
||||
<label>结束时间</label>
|
||||
<input type="datetime-local" step="1" style="width: 170px;" id="h5_endTime">
|
||||
</div>
|
||||
<div class="h5-form-item">
|
||||
<label>通道列表</label>
|
||||
<select class="h5-select" id="h5_playback_channel"></select>
|
||||
<input type="button" class="h5-button fn-marl10" value="搜索" btn-for="onSearchRecord">
|
||||
</div>
|
||||
<table class="h5-table" id="h5_table">
|
||||
<thead>
|
||||
<tr>
|
||||
<td style="width: 50px;"><input type="checkbox" btn-for="onCheckAll" id="h5_checkAll"></td>
|
||||
<td style="width: 50px;">索引</td>
|
||||
<td style="width: 260px;">时间</td>
|
||||
<td style="width: 85px;">文件大小(KB)</td>
|
||||
<td style="width: 165px;">时间戳</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="h5-form-item fn-mart10">
|
||||
<input type="button" btn-for="onDownload" class="h5-button" value="下载">
|
||||
<span style="width: 40px">下载进度:<span id="h5_down_process" style="width: 50px"></span></span>
|
||||
<input type="button" btn-for="stopDownLoad" class="h5-button" value="取消下载">
|
||||
<a id="h5_first" class="h5-link" style="margin-left: 128px;" href="javascript:;">首页</a>
|
||||
<a id="h5_pre" class="h5-link" href="javascript:;">上页</a>
|
||||
<span>
|
||||
<span id="h5_curPage">2</span>/<span id="h5_totalPage">5</span>
|
||||
</span>
|
||||
<a id="h5_next" class="h5-link" href="javascript:;">下页</a>
|
||||
<a id="h5_last" class="h5-link" href="javascript:;">末页</a>
|
||||
<input type="text" style="width: 30px;" id="h5_goNumber">
|
||||
<input type="button" value="GO!" id="h5_goPage" style="width: 40px">
|
||||
</div>
|
||||
<div class="h5-form-item fn-mart10">
|
||||
<input type="button" value="开始回放(双击列表行)" disabled class="h5-button" style="width: 145px;"
|
||||
btn-for="onPausePlayback">
|
||||
<input type="button" value="暂停" class="h5-button" btn-for="onPausePlayback">
|
||||
<input type="button" value="继续" class="h5-button" btn-for="onContinuePlayback">
|
||||
<input type="button" value="结束回放" class="h5-button" btn-for="onClosePlayback">
|
||||
</div>
|
||||
<div class="h5-form-item fn-mart10" style="display: none;">
|
||||
<span>当前播放秒数</span>
|
||||
<span id="h5_curTime">--</span>
|
||||
<span>/</span>
|
||||
<span id="h5_totalTime">--</span>
|
||||
<input type="text" id="h5_goTime" style="width: 50px;">
|
||||
<input type="button" class="h5-button" btn-for="onGoTime" value="GO!">
|
||||
</div>
|
||||
<div class="h5-form-item fn-mart10">
|
||||
<label>裁剪起始时间</label>
|
||||
<input type="datetime-local" step="1" style="width: 200px;" id="h5_cutStartTime">
|
||||
<span> - </span>
|
||||
<input type="datetime-local" step="1" style="width: 200px;" id="h5_cutEndTime">
|
||||
</div>
|
||||
<div class="h5-form-item fn-mart10">
|
||||
<input type="button" class="h5-button" style="width:200px" btn-for="onStartCut" value="开始裁剪(先勾选一个录像)" />
|
||||
<span>裁剪进度:<span id="h5_cut_process"></span></span>
|
||||
</div>
|
||||
<div class="h5-form-item fn-mart10">
|
||||
<input type="button" btn-for="stopDownLoad" class="h5-button" value="取消裁剪">
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
</div>
|
||||
<script src="module/PlayerControl.js"></script>
|
||||
<script src="realTime.js"></script>
|
||||
<script>
|
||||
// 设置监控设备播放
|
||||
function setPlayerA(device,drvData){
|
||||
console.log(device,'wwww',drvData);
|
||||
// 监控编号赋值
|
||||
channel = device.CameraChannel - 1
|
||||
if($loginState.innerText==="已登录"){
|
||||
onPreview(drvData,false)
|
||||
}else{
|
||||
onLogin(device.CameraChannel,drvData)
|
||||
}
|
||||
}
|
||||
|
||||
// function setPlayer(ip, playerTime, playerEndTime, startTime, endTime) {
|
||||
// // 默认登录参数为通道号
|
||||
// // onLogin(0,3599,1711990805)
|
||||
// onLogin(ip, playerTime, playerEndTime)
|
||||
|
||||
// //设置开始时间结束时间
|
||||
// // $('#h5_startTime').value = '2024-04-02T00:00:00';
|
||||
// $('#h5_startTime').value = startTime
|
||||
// // $('#h5_endTime').value = '2024-04-02T23:59:59';
|
||||
// $('#h5_endTime').value = endTime
|
||||
// }
|
||||
// window.setPlayerA = setPlayer
|
||||
// // 设置播放器
|
||||
// // setPlayer(0,3599,1711990805,'2024-04-02T00:00:00','2024-04-02T01:30:00')
|
||||
// function playerFun(val, time, playerEndTime) {
|
||||
// // 播放第一个视频
|
||||
// let player = document.querySelectorAll('#h5_table tbody tr')[val];
|
||||
// let dom1 = player.childNodes[1];
|
||||
// let value1 = dom1.innerText - 1;
|
||||
// let url1 = recordArr[value1].FilePath;
|
||||
// onStopPreview();
|
||||
// onPreview(true, url1, value1, null, playerEndTime);
|
||||
// setTimeout(() => {
|
||||
// goTime(time)
|
||||
// }, 1500)
|
||||
// }
|
||||
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
|
@ -2,7 +2,8 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
||||
<!-- <link rel="icon" type="image/svg+xml" href="/vite.svg" /> -->
|
||||
<link rel="icon" type="image/svg+xml" href="/vite.png" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>阜阳大屏可视化
|
||||
</title>
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
"less": "^4.2.0",
|
||||
"less-loader": "^12.2.0",
|
||||
"moment": "^2.30.1",
|
||||
"mqtt": "^5.10.1",
|
||||
"pinia": "^2.1.7",
|
||||
"postcss-pxtorem": "^6.1.0",
|
||||
"vue": "^3.4.15",
|
||||
|
@ -89,6 +90,17 @@
|
|||
"node": ">=6.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/runtime": {
|
||||
"version": "7.25.9",
|
||||
"resolved": "https://registry.npmmirror.com/@babel/runtime/-/runtime-7.25.9.tgz",
|
||||
"integrity": "sha512-4zpTHZ9Cm6L9L+uIqghQX8ZXg8HKFcjYO3qHoO8zTmRm6HQUJ8SSJ+KRvbMBZn0EGVlT4DRYeQ/6hjlyXBh+Kg==",
|
||||
"dependencies": {
|
||||
"regenerator-runtime": "^0.14.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6.9.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@babel/types": {
|
||||
"version": "7.24.0",
|
||||
"resolved": "https://registry.npmmirror.com/@babel/types/-/types-7.24.0.tgz",
|
||||
|
@ -931,17 +943,37 @@
|
|||
"version": "20.11.26",
|
||||
"resolved": "https://registry.npmmirror.com/@types/node/-/node-20.11.26.tgz",
|
||||
"integrity": "sha512-YwOMmyhNnAWijOBQweOJnQPl068Oqd4K3OFbTc6AHJwzweUwwWG3GIFY74OKks2PJUDkQPeddOQES9mLn1CTEQ==",
|
||||
"devOptional": true,
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"undici-types": "~5.26.4"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/readable-stream": {
|
||||
"version": "4.0.15",
|
||||
"resolved": "https://registry.npmmirror.com/@types/readable-stream/-/readable-stream-4.0.15.tgz",
|
||||
"integrity": "sha512-oAZ3kw+kJFkEqyh7xORZOku1YAKvsFTogRY8kVl4vHpEKiDkfnSA/My8haRE7fvmix5Zyy+1pwzOi7yycGLBJw==",
|
||||
"dependencies": {
|
||||
"@types/node": "*",
|
||||
"safe-buffer": "~5.1.1"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/readable-stream/node_modules/safe-buffer": {
|
||||
"version": "5.1.2",
|
||||
"resolved": "https://registry.npmmirror.com/safe-buffer/-/safe-buffer-5.1.2.tgz",
|
||||
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
|
||||
},
|
||||
"node_modules/@types/web-bluetooth": {
|
||||
"version": "0.0.16",
|
||||
"resolved": "https://registry.npmmirror.com/@types/web-bluetooth/-/web-bluetooth-0.0.16.tgz",
|
||||
"integrity": "sha512-oh8q2Zc32S6gd/j50GowEjKLoOVOwHP/bWVjKJInBwQqdOYMdPrf1oVlelTlyfFK3CKxL1uahMDAr+vy8T7yMQ=="
|
||||
},
|
||||
"node_modules/@types/ws": {
|
||||
"version": "8.5.12",
|
||||
"resolved": "https://registry.npmmirror.com/@types/ws/-/ws-8.5.12.tgz",
|
||||
"integrity": "sha512-3tPRkv1EtkDpzlgyKyI8pGsGZAGPEaXeu0DOj5DI25Ja91bdAYddYHbADRYVrZMRbfW+1l5YwXVDKohDJNQxkQ==",
|
||||
"dependencies": {
|
||||
"@types/node": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/@ungap/structured-clone": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmmirror.com/@ungap/structured-clone/-/structured-clone-1.2.0.tgz",
|
||||
|
@ -1314,6 +1346,17 @@
|
|||
"devOptional": true,
|
||||
"peer": true
|
||||
},
|
||||
"node_modules/abort-controller": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmmirror.com/abort-controller/-/abort-controller-3.0.0.tgz",
|
||||
"integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==",
|
||||
"dependencies": {
|
||||
"event-target-shim": "^5.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6.5"
|
||||
}
|
||||
},
|
||||
"node_modules/acorn": {
|
||||
"version": "8.11.3",
|
||||
"resolved": "https://registry.npmmirror.com/acorn/-/acorn-8.11.3.tgz",
|
||||
|
@ -1599,6 +1642,25 @@
|
|||
"integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/base64-js": {
|
||||
"version": "1.5.1",
|
||||
"resolved": "https://registry.npmmirror.com/base64-js/-/base64-js-1.5.1.tgz",
|
||||
"integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==",
|
||||
"funding": [
|
||||
{
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/feross"
|
||||
},
|
||||
{
|
||||
"type": "patreon",
|
||||
"url": "https://www.patreon.com/feross"
|
||||
},
|
||||
{
|
||||
"type": "consulting",
|
||||
"url": "https://feross.org/support"
|
||||
}
|
||||
]
|
||||
},
|
||||
"node_modules/big.js": {
|
||||
"version": "5.2.2",
|
||||
"resolved": "https://registry.npmmirror.com/big.js/-/big.js-5.2.2.tgz",
|
||||
|
@ -1617,6 +1679,17 @@
|
|||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/bl": {
|
||||
"version": "6.0.16",
|
||||
"resolved": "https://registry.npmmirror.com/bl/-/bl-6.0.16.tgz",
|
||||
"integrity": "sha512-V/kz+z2Mx5/6qDfRCilmrukUXcXuCoXKg3/3hDvzKKoSUx8CJKudfIoT29XZc3UE9xBvxs5qictiHdprwtteEg==",
|
||||
"dependencies": {
|
||||
"@types/readable-stream": "^4.0.0",
|
||||
"buffer": "^6.0.3",
|
||||
"inherits": "^2.0.4",
|
||||
"readable-stream": "^4.2.0"
|
||||
}
|
||||
},
|
||||
"node_modules/boolbase": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmmirror.com/boolbase/-/boolbase-1.0.0.tgz",
|
||||
|
@ -1678,12 +1751,33 @@
|
|||
"node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7"
|
||||
}
|
||||
},
|
||||
"node_modules/buffer": {
|
||||
"version": "6.0.3",
|
||||
"resolved": "https://registry.npmmirror.com/buffer/-/buffer-6.0.3.tgz",
|
||||
"integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==",
|
||||
"funding": [
|
||||
{
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/feross"
|
||||
},
|
||||
{
|
||||
"type": "patreon",
|
||||
"url": "https://www.patreon.com/feross"
|
||||
},
|
||||
{
|
||||
"type": "consulting",
|
||||
"url": "https://feross.org/support"
|
||||
}
|
||||
],
|
||||
"dependencies": {
|
||||
"base64-js": "^1.3.1",
|
||||
"ieee754": "^1.2.1"
|
||||
}
|
||||
},
|
||||
"node_modules/buffer-from": {
|
||||
"version": "1.1.2",
|
||||
"resolved": "https://registry.npmmirror.com/buffer-from/-/buffer-from-1.1.2.tgz",
|
||||
"integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==",
|
||||
"devOptional": true,
|
||||
"peer": true
|
||||
"integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ=="
|
||||
},
|
||||
"node_modules/builtin-modules": {
|
||||
"version": "3.3.0",
|
||||
|
@ -1868,12 +1962,44 @@
|
|||
"devOptional": true,
|
||||
"peer": true
|
||||
},
|
||||
"node_modules/commist": {
|
||||
"version": "3.2.0",
|
||||
"resolved": "https://registry.npmmirror.com/commist/-/commist-3.2.0.tgz",
|
||||
"integrity": "sha512-4PIMoPniho+LqXmpS5d3NuGYncG6XWlkBSVGiWycL22dd42OYdUGil2CWuzklaJoNxyxUSpO4MKIBU94viWNAw=="
|
||||
},
|
||||
"node_modules/concat-map": {
|
||||
"version": "0.0.1",
|
||||
"resolved": "https://registry.npmmirror.com/concat-map/-/concat-map-0.0.1.tgz",
|
||||
"integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/concat-stream": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmmirror.com/concat-stream/-/concat-stream-2.0.0.tgz",
|
||||
"integrity": "sha512-MWufYdFw53ccGjCA+Ol7XJYpAlW6/prSMzuPOTRnJGcGzuhLn4Scrz7qf6o8bROZ514ltazcIFJZevcfbo0x7A==",
|
||||
"engines": [
|
||||
"node >= 6.0"
|
||||
],
|
||||
"dependencies": {
|
||||
"buffer-from": "^1.0.0",
|
||||
"inherits": "^2.0.3",
|
||||
"readable-stream": "^3.0.2",
|
||||
"typedarray": "^0.0.6"
|
||||
}
|
||||
},
|
||||
"node_modules/concat-stream/node_modules/readable-stream": {
|
||||
"version": "3.6.2",
|
||||
"resolved": "https://registry.npmmirror.com/readable-stream/-/readable-stream-3.6.2.tgz",
|
||||
"integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==",
|
||||
"dependencies": {
|
||||
"inherits": "^2.0.3",
|
||||
"string_decoder": "^1.1.1",
|
||||
"util-deprecate": "^1.0.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 6"
|
||||
}
|
||||
},
|
||||
"node_modules/copy-anything": {
|
||||
"version": "2.0.6",
|
||||
"resolved": "https://registry.npmmirror.com/copy-anything/-/copy-anything-2.0.6.tgz",
|
||||
|
@ -1925,7 +2051,6 @@
|
|||
"version": "4.3.4",
|
||||
"resolved": "https://registry.npmmirror.com/debug/-/debug-4.3.4.tgz",
|
||||
"integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"ms": "2.1.2"
|
||||
},
|
||||
|
@ -2676,12 +2801,18 @@
|
|||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/event-target-shim": {
|
||||
"version": "5.0.1",
|
||||
"resolved": "https://registry.npmmirror.com/event-target-shim/-/event-target-shim-5.0.1.tgz",
|
||||
"integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==",
|
||||
"engines": {
|
||||
"node": ">=6"
|
||||
}
|
||||
},
|
||||
"node_modules/events": {
|
||||
"version": "3.3.0",
|
||||
"resolved": "https://registry.npmmirror.com/events/-/events-3.3.0.tgz",
|
||||
"integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==",
|
||||
"devOptional": true,
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": ">=0.8.x"
|
||||
}
|
||||
|
@ -2704,6 +2835,23 @@
|
|||
"integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/fast-unique-numbers": {
|
||||
"version": "8.0.13",
|
||||
"resolved": "https://registry.npmmirror.com/fast-unique-numbers/-/fast-unique-numbers-8.0.13.tgz",
|
||||
"integrity": "sha512-7OnTFAVPefgw2eBJ1xj2PGGR9FwYzSUso9decayHgCDX4sJkHLdcsYTytTg+tYv+wKF3U8gJuSBz2jJpQV4u/g==",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.23.8",
|
||||
"tslib": "^2.6.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16.1.0"
|
||||
}
|
||||
},
|
||||
"node_modules/fast-unique-numbers/node_modules/tslib": {
|
||||
"version": "2.8.0",
|
||||
"resolved": "https://registry.npmmirror.com/tslib/-/tslib-2.8.0.tgz",
|
||||
"integrity": "sha512-jWVzBLplnCmoaTr13V9dYbiQ99wvZRd0vNWaDRg+aVYRcjDF3nDksxFDE/+fkXnKhpnUUkmx5pK/v8mCtLVqZA=="
|
||||
},
|
||||
"node_modules/fastq": {
|
||||
"version": "1.17.1",
|
||||
"resolved": "https://registry.npmmirror.com/fastq/-/fastq-1.17.1.tgz",
|
||||
|
@ -3116,6 +3264,11 @@
|
|||
"node": ">= 0.4"
|
||||
}
|
||||
},
|
||||
"node_modules/help-me": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmmirror.com/help-me/-/help-me-5.0.0.tgz",
|
||||
"integrity": "sha512-7xgomUX6ADmcYzFik0HzAxh/73YlKR9bmFzf51CZwR+b6YtzU2m0u49hQCqV6SvlqIqsaxovfwdvbnsw3b/zpg=="
|
||||
},
|
||||
"node_modules/iconv-lite": {
|
||||
"version": "0.6.3",
|
||||
"resolved": "https://registry.npmmirror.com/iconv-lite/-/iconv-lite-0.6.3.tgz",
|
||||
|
@ -3128,6 +3281,25 @@
|
|||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/ieee754": {
|
||||
"version": "1.2.1",
|
||||
"resolved": "https://registry.npmmirror.com/ieee754/-/ieee754-1.2.1.tgz",
|
||||
"integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==",
|
||||
"funding": [
|
||||
{
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/feross"
|
||||
},
|
||||
{
|
||||
"type": "patreon",
|
||||
"url": "https://www.patreon.com/feross"
|
||||
},
|
||||
{
|
||||
"type": "consulting",
|
||||
"url": "https://feross.org/support"
|
||||
}
|
||||
]
|
||||
},
|
||||
"node_modules/ignore": {
|
||||
"version": "5.3.1",
|
||||
"resolved": "https://registry.npmmirror.com/ignore/-/ignore-5.3.1.tgz",
|
||||
|
@ -3187,8 +3359,7 @@
|
|||
"node_modules/inherits": {
|
||||
"version": "2.0.4",
|
||||
"resolved": "https://registry.npmmirror.com/inherits/-/inherits-2.0.4.tgz",
|
||||
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
|
||||
"dev": true
|
||||
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
|
||||
},
|
||||
"node_modules/internal-slot": {
|
||||
"version": "1.0.7",
|
||||
|
@ -3516,6 +3687,15 @@
|
|||
"url": "https://github.com/chalk/supports-color?sponsor=1"
|
||||
}
|
||||
},
|
||||
"node_modules/js-sdsl": {
|
||||
"version": "4.3.0",
|
||||
"resolved": "https://registry.npmmirror.com/js-sdsl/-/js-sdsl-4.3.0.tgz",
|
||||
"integrity": "sha512-mifzlm2+5nZ+lEcLJMoBK0/IH/bDg8XnJfd/Wq6IP+xoCjLZsTOnV2QpxlVbX9bMnkl5PdEjNtBJ9Cj1NjifhQ==",
|
||||
"funding": {
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/js-sdsl"
|
||||
}
|
||||
},
|
||||
"node_modules/js-yaml": {
|
||||
"version": "4.1.0",
|
||||
"resolved": "https://registry.npmmirror.com/js-yaml/-/js-yaml-4.1.0.tgz",
|
||||
|
@ -3823,7 +4003,6 @@
|
|||
"version": "1.2.8",
|
||||
"resolved": "https://registry.npmmirror.com/minimist/-/minimist-1.2.8.tgz",
|
||||
"integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==",
|
||||
"dev": true,
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
|
@ -3836,11 +4015,56 @@
|
|||
"node": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/mqtt": {
|
||||
"version": "5.10.1",
|
||||
"resolved": "https://registry.npmmirror.com/mqtt/-/mqtt-5.10.1.tgz",
|
||||
"integrity": "sha512-hXCOki8sANoQ7w+2OzJzg6qMBxTtrH9RlnVNV8panLZgnl+Gh0J/t4k6r8Az8+C7y3KAcyXtn0mmLixyUom8Sw==",
|
||||
"dependencies": {
|
||||
"@types/readable-stream": "^4.0.5",
|
||||
"@types/ws": "^8.5.9",
|
||||
"commist": "^3.2.0",
|
||||
"concat-stream": "^2.0.0",
|
||||
"debug": "^4.3.4",
|
||||
"help-me": "^5.0.0",
|
||||
"lru-cache": "^10.0.1",
|
||||
"minimist": "^1.2.8",
|
||||
"mqtt-packet": "^9.0.0",
|
||||
"number-allocator": "^1.0.14",
|
||||
"readable-stream": "^4.4.2",
|
||||
"reinterval": "^1.1.0",
|
||||
"rfdc": "^1.3.0",
|
||||
"split2": "^4.2.0",
|
||||
"worker-timers": "^7.1.4",
|
||||
"ws": "^8.17.1"
|
||||
},
|
||||
"bin": {
|
||||
"mqtt": "build/bin/mqtt.js",
|
||||
"mqtt_pub": "build/bin/pub.js",
|
||||
"mqtt_sub": "build/bin/sub.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/mqtt-packet": {
|
||||
"version": "9.0.0",
|
||||
"resolved": "https://registry.npmmirror.com/mqtt-packet/-/mqtt-packet-9.0.0.tgz",
|
||||
"integrity": "sha512-8v+HkX+fwbodsWAZIZTI074XIoxVBOmPeggQuDFCGg1SqNcC+uoRMWu7J6QlJPqIUIJXmjNYYHxBBLr1Y/Df4w==",
|
||||
"dependencies": {
|
||||
"bl": "^6.0.8",
|
||||
"debug": "^4.3.4",
|
||||
"process-nextick-args": "^2.0.1"
|
||||
}
|
||||
},
|
||||
"node_modules/mqtt/node_modules/lru-cache": {
|
||||
"version": "10.4.3",
|
||||
"resolved": "https://registry.npmmirror.com/lru-cache/-/lru-cache-10.4.3.tgz",
|
||||
"integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ=="
|
||||
},
|
||||
"node_modules/ms": {
|
||||
"version": "2.1.2",
|
||||
"resolved": "https://registry.npmmirror.com/ms/-/ms-2.1.2.tgz",
|
||||
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
|
||||
"dev": true
|
||||
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
|
||||
},
|
||||
"node_modules/nanoid": {
|
||||
"version": "3.3.7",
|
||||
|
@ -3920,6 +4144,15 @@
|
|||
"url": "https://github.com/fb55/nth-check?sponsor=1"
|
||||
}
|
||||
},
|
||||
"node_modules/number-allocator": {
|
||||
"version": "1.0.14",
|
||||
"resolved": "https://registry.npmmirror.com/number-allocator/-/number-allocator-1.0.14.tgz",
|
||||
"integrity": "sha512-OrL44UTVAvkKdOdRQZIJpLkAdjXGTRda052sN4sO77bKEzYYqWKMBjQvrJFzqygI99gL6Z4u2xctPW1tB8ErvA==",
|
||||
"dependencies": {
|
||||
"debug": "^4.3.1",
|
||||
"js-sdsl": "4.3.0"
|
||||
}
|
||||
},
|
||||
"node_modules/object-inspect": {
|
||||
"version": "1.13.1",
|
||||
"resolved": "https://registry.npmmirror.com/object-inspect/-/object-inspect-1.13.1.tgz",
|
||||
|
@ -4254,6 +4487,19 @@
|
|||
"node": ">= 0.8.0"
|
||||
}
|
||||
},
|
||||
"node_modules/process": {
|
||||
"version": "0.11.10",
|
||||
"resolved": "https://registry.npmmirror.com/process/-/process-0.11.10.tgz",
|
||||
"integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==",
|
||||
"engines": {
|
||||
"node": ">= 0.6.0"
|
||||
}
|
||||
},
|
||||
"node_modules/process-nextick-args": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmmirror.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz",
|
||||
"integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag=="
|
||||
},
|
||||
"node_modules/proxy-from-env": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmmirror.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz",
|
||||
|
@ -4304,6 +4550,21 @@
|
|||
"safe-buffer": "^5.1.0"
|
||||
}
|
||||
},
|
||||
"node_modules/readable-stream": {
|
||||
"version": "4.5.2",
|
||||
"resolved": "https://registry.npmmirror.com/readable-stream/-/readable-stream-4.5.2.tgz",
|
||||
"integrity": "sha512-yjavECdqeZ3GLXNgRXgeQEdz9fvDDkNKyHnbHRFtOr7/LcfgBcmct7t/ET+HaCTqfh06OzoAxrkN/IfjJBVe+g==",
|
||||
"dependencies": {
|
||||
"abort-controller": "^3.0.0",
|
||||
"buffer": "^6.0.3",
|
||||
"events": "^3.3.0",
|
||||
"process": "^0.11.10",
|
||||
"string_decoder": "^1.3.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/readdirp": {
|
||||
"version": "3.6.0",
|
||||
"resolved": "https://registry.npmmirror.com/readdirp/-/readdirp-3.6.0.tgz",
|
||||
|
@ -4316,6 +4577,11 @@
|
|||
"node": ">=8.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/regenerator-runtime": {
|
||||
"version": "0.14.1",
|
||||
"resolved": "https://registry.npmmirror.com/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz",
|
||||
"integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw=="
|
||||
},
|
||||
"node_modules/regexp.prototype.flags": {
|
||||
"version": "1.5.2",
|
||||
"resolved": "https://registry.npmmirror.com/regexp.prototype.flags/-/regexp.prototype.flags-1.5.2.tgz",
|
||||
|
@ -4334,6 +4600,11 @@
|
|||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/reinterval": {
|
||||
"version": "1.1.0",
|
||||
"resolved": "https://registry.npmmirror.com/reinterval/-/reinterval-1.1.0.tgz",
|
||||
"integrity": "sha512-QIRet3SYrGp0HUHO88jVskiG6seqUGC5iAG7AwI/BV4ypGcuqk9Du6YQBUOUqm9c8pw1eyLoIaONifRua1lsEQ=="
|
||||
},
|
||||
"node_modules/resolve": {
|
||||
"version": "1.22.8",
|
||||
"resolved": "https://registry.npmmirror.com/resolve/-/resolve-1.22.8.tgz",
|
||||
|
@ -4379,6 +4650,11 @@
|
|||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/rfdc": {
|
||||
"version": "1.4.1",
|
||||
"resolved": "https://registry.npmmirror.com/rfdc/-/rfdc-1.4.1.tgz",
|
||||
"integrity": "sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA=="
|
||||
},
|
||||
"node_modules/rimraf": {
|
||||
"version": "3.0.2",
|
||||
"resolved": "https://registry.npmmirror.com/rimraf/-/rimraf-3.0.2.tgz",
|
||||
|
@ -4471,7 +4747,6 @@
|
|||
"version": "5.2.1",
|
||||
"resolved": "https://registry.npmmirror.com/safe-buffer/-/safe-buffer-5.2.1.tgz",
|
||||
"integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==",
|
||||
"devOptional": true,
|
||||
"funding": [
|
||||
{
|
||||
"type": "github",
|
||||
|
@ -4485,8 +4760,7 @@
|
|||
"type": "consulting",
|
||||
"url": "https://feross.org/support"
|
||||
}
|
||||
],
|
||||
"peer": true
|
||||
]
|
||||
},
|
||||
"node_modules/safe-regex-test": {
|
||||
"version": "1.0.3",
|
||||
|
@ -4705,6 +4979,22 @@
|
|||
"source-map": "^0.6.0"
|
||||
}
|
||||
},
|
||||
"node_modules/split2": {
|
||||
"version": "4.2.0",
|
||||
"resolved": "https://registry.npmmirror.com/split2/-/split2-4.2.0.tgz",
|
||||
"integrity": "sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg==",
|
||||
"engines": {
|
||||
"node": ">= 10.x"
|
||||
}
|
||||
},
|
||||
"node_modules/string_decoder": {
|
||||
"version": "1.3.0",
|
||||
"resolved": "https://registry.npmmirror.com/string_decoder/-/string_decoder-1.3.0.tgz",
|
||||
"integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==",
|
||||
"dependencies": {
|
||||
"safe-buffer": "~5.2.0"
|
||||
}
|
||||
},
|
||||
"node_modules/string.prototype.trim": {
|
||||
"version": "1.2.8",
|
||||
"resolved": "https://registry.npmmirror.com/string.prototype.trim/-/string.prototype.trim-1.2.8.tgz",
|
||||
|
@ -5020,6 +5310,11 @@
|
|||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/typedarray": {
|
||||
"version": "0.0.6",
|
||||
"resolved": "https://registry.npmmirror.com/typedarray/-/typedarray-0.0.6.tgz",
|
||||
"integrity": "sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA=="
|
||||
},
|
||||
"node_modules/unbox-primitive": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmmirror.com/unbox-primitive/-/unbox-primitive-1.0.2.tgz",
|
||||
|
@ -5038,9 +5333,7 @@
|
|||
"node_modules/undici-types": {
|
||||
"version": "5.26.5",
|
||||
"resolved": "https://registry.npmmirror.com/undici-types/-/undici-types-5.26.5.tgz",
|
||||
"integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==",
|
||||
"devOptional": true,
|
||||
"peer": true
|
||||
"integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA=="
|
||||
},
|
||||
"node_modules/update-browserslist-db": {
|
||||
"version": "1.0.13",
|
||||
|
@ -5085,8 +5378,7 @@
|
|||
"node_modules/util-deprecate": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmmirror.com/util-deprecate/-/util-deprecate-1.0.2.tgz",
|
||||
"integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==",
|
||||
"dev": true
|
||||
"integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw=="
|
||||
},
|
||||
"node_modules/vite": {
|
||||
"version": "5.1.6",
|
||||
|
@ -5370,12 +5662,78 @@
|
|||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/worker-timers": {
|
||||
"version": "7.1.8",
|
||||
"resolved": "https://registry.npmmirror.com/worker-timers/-/worker-timers-7.1.8.tgz",
|
||||
"integrity": "sha512-R54psRKYVLuzff7c1OTFcq/4Hue5Vlz4bFtNEIarpSiCYhpifHU3aIQI29S84o1j87ePCYqbmEJPqwBTf+3sfw==",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.24.5",
|
||||
"tslib": "^2.6.2",
|
||||
"worker-timers-broker": "^6.1.8",
|
||||
"worker-timers-worker": "^7.0.71"
|
||||
}
|
||||
},
|
||||
"node_modules/worker-timers-broker": {
|
||||
"version": "6.1.8",
|
||||
"resolved": "https://registry.npmmirror.com/worker-timers-broker/-/worker-timers-broker-6.1.8.tgz",
|
||||
"integrity": "sha512-FUCJu9jlK3A8WqLTKXM9E6kAmI/dR1vAJ8dHYLMisLNB/n3GuaFIjJ7pn16ZcD1zCOf7P6H62lWIEBi+yz/zQQ==",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.24.5",
|
||||
"fast-unique-numbers": "^8.0.13",
|
||||
"tslib": "^2.6.2",
|
||||
"worker-timers-worker": "^7.0.71"
|
||||
}
|
||||
},
|
||||
"node_modules/worker-timers-broker/node_modules/tslib": {
|
||||
"version": "2.8.0",
|
||||
"resolved": "https://registry.npmmirror.com/tslib/-/tslib-2.8.0.tgz",
|
||||
"integrity": "sha512-jWVzBLplnCmoaTr13V9dYbiQ99wvZRd0vNWaDRg+aVYRcjDF3nDksxFDE/+fkXnKhpnUUkmx5pK/v8mCtLVqZA=="
|
||||
},
|
||||
"node_modules/worker-timers-worker": {
|
||||
"version": "7.0.71",
|
||||
"resolved": "https://registry.npmmirror.com/worker-timers-worker/-/worker-timers-worker-7.0.71.tgz",
|
||||
"integrity": "sha512-ks/5YKwZsto1c2vmljroppOKCivB/ma97g9y77MAAz2TBBjPPgpoOiS1qYQKIgvGTr2QYPT3XhJWIB6Rj2MVPQ==",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.24.5",
|
||||
"tslib": "^2.6.2"
|
||||
}
|
||||
},
|
||||
"node_modules/worker-timers-worker/node_modules/tslib": {
|
||||
"version": "2.8.0",
|
||||
"resolved": "https://registry.npmmirror.com/tslib/-/tslib-2.8.0.tgz",
|
||||
"integrity": "sha512-jWVzBLplnCmoaTr13V9dYbiQ99wvZRd0vNWaDRg+aVYRcjDF3nDksxFDE/+fkXnKhpnUUkmx5pK/v8mCtLVqZA=="
|
||||
},
|
||||
"node_modules/worker-timers/node_modules/tslib": {
|
||||
"version": "2.8.0",
|
||||
"resolved": "https://registry.npmmirror.com/tslib/-/tslib-2.8.0.tgz",
|
||||
"integrity": "sha512-jWVzBLplnCmoaTr13V9dYbiQ99wvZRd0vNWaDRg+aVYRcjDF3nDksxFDE/+fkXnKhpnUUkmx5pK/v8mCtLVqZA=="
|
||||
},
|
||||
"node_modules/wrappy": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmmirror.com/wrappy/-/wrappy-1.0.2.tgz",
|
||||
"integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/ws": {
|
||||
"version": "8.18.0",
|
||||
"resolved": "https://registry.npmmirror.com/ws/-/ws-8.18.0.tgz",
|
||||
"integrity": "sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==",
|
||||
"engines": {
|
||||
"node": ">=10.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"bufferutil": "^4.0.1",
|
||||
"utf-8-validate": ">=5.0.2"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"bufferutil": {
|
||||
"optional": true
|
||||
},
|
||||
"utf-8-validate": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/xml-name-validator": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmmirror.com/xml-name-validator/-/xml-name-validator-4.0.0.tgz",
|
||||
|
|
13
package.json
|
@ -10,20 +10,21 @@
|
|||
"preview": "vite preview"
|
||||
},
|
||||
"dependencies": {
|
||||
"amfe-flexible": "^2.2.1",
|
||||
"axios": "^1.6.7",
|
||||
"echarts": "^5.5.0",
|
||||
"element-plus": "^2.5.6",
|
||||
"font-awesome": "^4.7.0",
|
||||
"jsencrypt": "^3.3.2",
|
||||
"pinia": "^2.1.7",
|
||||
"vue": "^3.4.15",
|
||||
"vue-router": "^4.2.5",
|
||||
"vue3-seamless-scroll": "^2.0.1",
|
||||
"amfe-flexible": "^2.2.1",
|
||||
"less": "^4.2.0",
|
||||
"less-loader": "^12.2.0",
|
||||
"moment": "^2.30.1",
|
||||
"postcss-pxtorem": "^6.1.0"
|
||||
"mqtt": "^5.10.1",
|
||||
"pinia": "^2.1.7",
|
||||
"postcss-pxtorem": "^6.1.0",
|
||||
"vue": "^3.4.15",
|
||||
"vue-router": "^4.2.5",
|
||||
"vue3-seamless-scroll": "^2.0.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@vitejs/plugin-vue": "^5.0.3",
|
||||
|
|
|
@ -0,0 +1,517 @@
|
|||
<!doctype html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title></title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta http-equiv="Pragma" content="no-cache" />
|
||||
<meta http-equiv="Cache-Control" content="no-cache, must-revalidate" />
|
||||
<meta http-equiv="Expires" content="0" />
|
||||
<script>
|
||||
document.write("<link type='text/css' href='../demo.css?version=" + new Date().getTime() + "' rel='stylesheet' />");
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body style="
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
">
|
||||
<div class="left">
|
||||
<div id="divPlugin" class="plugin"></div>
|
||||
<fieldset class="login">
|
||||
<legend>登录</legend>
|
||||
<table cellpadding="0" cellspacing="3" border="0">
|
||||
<tr>
|
||||
<td class="tt">IP地址</td>
|
||||
<td><input id="loginip" type="text" class="txt" /></td>
|
||||
<td class="tt">端口号</td>
|
||||
<td><input id="port" type="text" class="txt" value="80" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tt">用户名</td>
|
||||
<td><input id="username" type="text" class="txt" /></td>
|
||||
<td class="tt">密码</td>
|
||||
<td><input id="password" type="password" class="txt" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tt">设备端口</td>
|
||||
<td colspan="2"><input id="deviceport" type="text" class="txt" />(可选参数)</td>
|
||||
<td>
|
||||
窗口分割数
|
||||
<select class="sel2" onchange="changeWndNum(this.value);">
|
||||
<option value="1" selected>1x1</option>
|
||||
<option value="2">2x2</option>
|
||||
<option value="3">3x3</option>
|
||||
<option value="4">4x4</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tt">RTSP端口</td>
|
||||
<td colspan="3"><input id="rtspport" type="text" class="txt" />(可选参数)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="4">
|
||||
<input type="button" class="btn" value="登录" onclick="clickLogin();" />
|
||||
<input type="button" class="btn" value="退出" onclick="clickLogout();" />
|
||||
<input type="button" class="btn2" value="获取基本信息" onclick="clickGetDeviceInfo();" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tt">已登录设备</td>
|
||||
<td>
|
||||
<select id="ip" class="sel" onchange="getChannelInfo();getDevicePort();"></select>
|
||||
</td>
|
||||
<td class="tt">通道列表</td>
|
||||
<td>
|
||||
<select id="channels" class="sel"></select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<!-- <input type="button" class="btn2" value="开始取流" onclick="clickGetStream();" /> -->
|
||||
<input type="button" class="btn2" value="开始预览" onclick="clickStartRealPlay();" />
|
||||
</td>
|
||||
<td>
|
||||
<input type="button" class="btn2" value="停止预览" onclick="clickStopRealPlay();" />
|
||||
</td>
|
||||
<td>
|
||||
<input type="button" class="btn2" value="设置文本叠加" onclick="setTextOverlay();" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
<fieldset class="ipchannel">
|
||||
<legend>数字通道</legend>
|
||||
<table width="100%" cellpadding="0" cellspacing="3" border="0">
|
||||
<tr>
|
||||
<td><input type="button" class="btn" value="获取数字通道列表" onclick="clickGetDigitalChannelInfo();" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<div class="digitaltdiv">
|
||||
<table id="digitalchannellist" class="digitalchannellist" cellpadding="0" cellspacing="0"
|
||||
border="0"></table>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
<fieldset class="localconfig">
|
||||
<legend>本地配置</legend>
|
||||
<table cellpadding="0" cellspacing="3" border="0">
|
||||
<tr>
|
||||
<td class="tt">播放性能</td>
|
||||
<td>
|
||||
<select id="netsPreach" name="netsPreach" class="sel">
|
||||
<option value="0">最短延时</option>
|
||||
<option value="1">实时性好</option>
|
||||
<option value="2">均衡</option>
|
||||
<option value="3">流畅性好</option>
|
||||
</select>
|
||||
</td>
|
||||
<td class="tt">图像尺寸</td>
|
||||
<td>
|
||||
<select id="wndSize" name="wndSize" class="sel">
|
||||
<option value="0">充满</option>
|
||||
<option value="1">4:3</option>
|
||||
<option value="2">16:9</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tt">规则信息</td>
|
||||
<td>
|
||||
<select id="rulesInfo" name="rulesInfo" class="sel">
|
||||
<option value="1">启用</option>
|
||||
<option value="0">禁用</option>
|
||||
</select>
|
||||
</td>
|
||||
<td class="tt">抓图文件格式</td>
|
||||
<td>
|
||||
<select id="captureFileFormat" name="captureFileFormat" class="sel">
|
||||
<option value="0">JPEG</option>
|
||||
<option value="1">BMP</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tt">录像文件打包大小</td>
|
||||
<td>
|
||||
<select id="packSize" name="packSize" class="sel">
|
||||
<option value="0">256M</option>
|
||||
<option value="1">512M</option>
|
||||
<option value="2">1G</option>
|
||||
</select>
|
||||
</td>
|
||||
<td class="tt">协议类型</td>
|
||||
<td>
|
||||
<select id="protocolType" name="protocolType" class="sel">
|
||||
<option value="0">TCP</option>
|
||||
<option value="2">UDP</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tt">录像文件保存路径</td>
|
||||
<td colspan="3"><input id="recordPath" type="text" class="txt" /> <input type="button"
|
||||
class="btn" value="浏览" onclick="clickOpenFileDlg('recordPath', 0);" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tt">回放下载保存路径</td>
|
||||
<td colspan="3"><input id="downloadPath" type="text" class="txt" /> <input type="button"
|
||||
class="btn" value="浏览" onclick="clickOpenFileDlg('downloadPath', 0);" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tt">预览抓图保存路径</td>
|
||||
<td colspan="3"><input id="previewPicPath" type="text" class="txt" /> <input type="button"
|
||||
class="btn" value="浏览" onclick="clickOpenFileDlg('previewPicPath', 0);" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tt">回放抓图保存路径</td>
|
||||
<td colspan="3"><input id="playbackPicPath" type="text" class="txt" /> <input type="button"
|
||||
class="btn" value="浏览" onclick="clickOpenFileDlg('playbackPicPath', 0);" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tt">回放剪辑保存路径</td>
|
||||
<td colspan="3"><input id="playbackFilePath" type="text" class="txt" /> <input type="button"
|
||||
class="btn" value="浏览" onclick="clickOpenFileDlg('playbackFilePath', 0);" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tt">设备抓图保存路径</td>
|
||||
<td colspan="3"><input id="devicePicPath" type="text" class="txt" /> <input type="button"
|
||||
class="btn" value="浏览" onclick="clickOpenFileDlg('devicePicPath', 0);" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="4"><input type="button" class="btn" value="获取"
|
||||
onclick="clickGetLocalCfg();" /> <input type="button" class="btn" value="设置"
|
||||
onclick="clickSetLocalCfg();" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
</div>
|
||||
<!-- <div class="left">
|
||||
<fieldset class="preview">
|
||||
<legend>预览</legend>
|
||||
<table cellpadding="0" cellspacing="3" border="0">
|
||||
<tr>
|
||||
<td class="tt">码流类型</td>
|
||||
<td>
|
||||
<select id="streamtype" class="sel">
|
||||
<option value="1">主码流</option>
|
||||
<option value="2">子码流</option>
|
||||
<option value="3">第三码流</option>
|
||||
<option value="4">转码码流</option>
|
||||
</select>
|
||||
</td>
|
||||
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tt">音量</td>
|
||||
<td>
|
||||
<input type="text" id="volume" class="txt" value="50" maxlength="3" /> <input type="button" class="btn" value="设置" onclick="clickSetVolume();" />(范围:0~100)
|
||||
</td>
|
||||
<td>
|
||||
<input type="button" class="btn" value="打开声音" onclick="clickOpenSound();" />
|
||||
<input type="button" class="btn" value="关闭声音" onclick="clickCloseSound();" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tt">对讲通道</td>
|
||||
<td>
|
||||
<select id="audiochannels" class="sel">
|
||||
|
||||
</select>
|
||||
<input type="button" class="btn" value="获取通道" onclick="clickGetAudioInfo();" />
|
||||
</td>
|
||||
<td>
|
||||
<input type="button" class="btn" value="开始对讲" onclick="clickStartVoiceTalk();" />
|
||||
<input type="button" class="btn" value="停止对讲" onclick="clickStopVoiceTalk();" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3">
|
||||
<input type="button" class="btn" value="抓图" onclick="clickCapturePic();" />
|
||||
<input type="button" class="btn" value="抓图上传" onclick="clickCapturePicData();" />
|
||||
<input type="button" class="btn" value="开始录像" onclick="clickStartRecord('realplay');" />
|
||||
<input type="button" class="btn" value="停止录像" onclick="clickStopRecord('realplay');" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3">
|
||||
<input type="button" class="btn2" value="启用电子放大" onclick="clickEnableEZoom();" />
|
||||
<input type="button" class="btn2" value="禁用电子放大" onclick="clickDisableEZoom();" />
|
||||
<input type="button" class="btn2" value="启用3D放大" onclick="clickEnable3DZoom();" />
|
||||
<input type="button" class="btn2" value="禁用3D放大" onclick="clickDisable3DZoom();" />
|
||||
<input id="fullbtn" type="button" class="btn" value="全屏" onclick="clickFullScreen();" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="3">
|
||||
分辨率:<input id="resolutionWidth" type="text" class="txt" /> x <input id="resolutionHeight" type="text" class="txt" />
|
||||
<input type="button" class="btn" value="设备抓图" onclick="clickDeviceCapturePic();" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
<fieldset class="draw">
|
||||
<legend>绘图</legend>
|
||||
<table cellpadding="0" cellspacing="3" border="0">
|
||||
<tr>
|
||||
<td>
|
||||
<input type="button" class="btn" value="启用绘制" onclick="clickEnableDraw();" />
|
||||
<input type="button" class="btn" value="禁用绘制" onclick="clickDisableDraw();" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
图形ID:<input id="snapId" type="text" class="txt" />
|
||||
名称:<input id="snapName" type="text" class="txt" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="button" class="btn" value="添加图形" onclick="clickAddSnapPolygon()" />
|
||||
<input type="button" class="btn" value="删除图形" onclick="clickDelSnapPolygon()" />
|
||||
<input type="button" class="btn" value="编辑图形" onclick="clickEditSnapPolygon()" />
|
||||
<input type="button" class="btn" value="停止编辑" onclick="clickStopSnapPolygon()" />
|
||||
<input type="button" class="btn" value="获取图形" onclick="clickGetSnapPolygon()" />
|
||||
<input type="button" class="btn" value="设置图形" onclick="clickSetSnapPolygon()" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="button" class="btn" value="清空图形" onclick="clickDelAllSnapPolygon()" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
<fieldset class="ptz">
|
||||
<legend>云台控制</legend>
|
||||
<table cellpadding="0" cellspacing="3" border="0" class="left">
|
||||
<tr>
|
||||
<td>
|
||||
<input type="button" class="btn" value="左上" onmousedown="mouseDownPTZControl(5);" onmouseup="mouseUpPTZControl();" />
|
||||
<input type="button" class="btn" value="上" onmousedown="mouseDownPTZControl(1);" onmouseup="mouseUpPTZControl();" />
|
||||
<input type="button" class="btn" value="右上" onmousedown="mouseDownPTZControl(7);" onmouseup="mouseUpPTZControl();" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="button" class="btn" value="左" onmousedown="mouseDownPTZControl(3);" onmouseup="mouseUpPTZControl();" />
|
||||
<input type="button" class="btn" value="自动" onclick="mouseDownPTZControl(9);" />
|
||||
<input type="button" class="btn" value="右" onmousedown="mouseDownPTZControl(4);" onmouseup="mouseUpPTZControl();" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="button" class="btn" value="左下" onmousedown="mouseDownPTZControl(6);" onmouseup="mouseUpPTZControl();" />
|
||||
<input type="button" class="btn" value="下" onmousedown="mouseDownPTZControl(2);" onmouseup="mouseUpPTZControl();" />
|
||||
<input type="button" class="btn" value="右下" onmousedown="mouseDownPTZControl(8);" onmouseup="mouseUpPTZControl();" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table cellpadding="0" cellspacing="3" border="0" class="left">
|
||||
<tr>
|
||||
<td class="tt">云台速度</td>
|
||||
<td>
|
||||
<select id="ptzspeed" class="sel">
|
||||
<option value="1">1</option>
|
||||
<option value="2">2</option>
|
||||
<option value="3">3</option>
|
||||
<option value="4" selected>4</option>
|
||||
<option value="5">5</option>
|
||||
<option value="6">6</option>
|
||||
<option value="7">7</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tt">预置点号</td>
|
||||
<td><input id="preset" type="text" class="txt" value="1" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<input type="button" class="btn" value="设置" onclick="clickSetPreset();" />
|
||||
<input type="button" class="btn" value="调用" onclick="clickGoPreset();" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table cellpadding="0" cellspacing="3" border="0" class="left">
|
||||
<tr>
|
||||
<td class="tt"><input type="button" class="btn2" value="变倍+" onmousedown="PTZZoomIn()" onmouseup="PTZZoomStop()"></td>
|
||||
<td><input type="button" class="btn2" value="变倍-" onmousedown="PTZZoomout()" onmouseup="PTZZoomStop()"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tt"><input type="button" class="btn2" value="变焦+" onmousedown="PTZFocusIn()" onmouseup="PTZFoucusStop()"></td>
|
||||
<td><input type="button" class="btn2" value="变焦-" onmousedown="PTZFoucusOut()" onmouseup="PTZFoucusStop()"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tt"><input type="button" class="btn2" value="光圈+" onmousedown="PTZIrisIn()" onmouseup="PTZIrisStop()"></td>
|
||||
<td><input type="button" class="btn2" value="光圈-" onmousedown="PTZIrisOut()" onmouseup="PTZIrisStop()"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
<fieldset class="playback">
|
||||
<legend>回放</legend>
|
||||
<table width="100%" cellpadding="0" cellspacing="3" border="0">
|
||||
<tr>
|
||||
<td class="tt">码流类型</td>
|
||||
<td>
|
||||
<select id="record_streamtype" class="sel">
|
||||
<option value="1">主码流</option>
|
||||
<option value="2">子码流</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tt">开始时间</td>
|
||||
<td>
|
||||
<input id="starttime" type="text" class="txt" value="2013-12-10 00:00:00" />(时间格式:2013-11-11 12:34:56)
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tt">结束时间</td>
|
||||
<td>
|
||||
<input id="endtime" type="text" class="txt" value="2013-12-11 23:59:59" />
|
||||
<input type="button" class="btn" value="搜索" onclick="clickRecordSearch(0);" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tt">按时间下载开始时间</td>
|
||||
<td>
|
||||
<input id="downloadstarttime" type="text" class="txt" value="2013-12-10 00:00:00" />(时间格式:2013-11-11 12:34:56)
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tt">按时间下载结束时间</td>
|
||||
<td>
|
||||
<input id="downloadendtime" type="text" class="txt" value="2013-12-11 23:59:59" />
|
||||
<input type="button" class="btn" value="下载" onclick="clickStartDownloadRecordByTime();" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<div id="searchdiv" class="searchdiv">
|
||||
<table id="searchlist" class="searchlist" cellpadding="0" cellspacing="0" border="0"></table>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<input type="button" class="btn2" value="开始回放" onclick="clickStartPlayback();" />
|
||||
<input type="button" class="btn2" value="停止回放" onclick="clickStopPlayback();" />
|
||||
<input id="btnReverse" type="button" class="btn" value="倒放" onclick="clickReversePlayback();" />
|
||||
<input type="button" class="btn" value="单帧" onclick="clickFrame();" />
|
||||
<input id="transstream" type="checkbox" class="vtop" /> 启用转码码流
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<input type="button" class="btn" value="暂停" onclick="clickPause();" />
|
||||
<input type="button" class="btn" value="恢复" onclick="clickResume();" />
|
||||
<input type="button" class="btn" value="慢放" onclick="clickPlaySlow();" />
|
||||
<input type="button" class="btn" value="快放" onclick="clickPlayFast();" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<input type="button" class="btn" value="抓图" onclick="clickCapturePic();" />
|
||||
<input type="button" class="btn2" value="开始剪辑" onclick="clickStartRecord('playback');" />
|
||||
<input type="button" class="btn2" value="停止剪辑" onclick="clickStopRecord('playback');" />
|
||||
<input type="button" class="btn2" value="OSD时间" onclick="clickGetOSDTime();" /> <input id="osdtime" type="text" class="txt" readonly />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
<fieldset class="maintain">
|
||||
<legend>系统维护</legend>
|
||||
<table width="100%" cellpadding="0" cellspacing="3" border="0">
|
||||
<tr>
|
||||
<td>
|
||||
<input id="edfpassword" type="password">
|
||||
<input type="button" class="btn2" value="导出配置文件" onclick="clickExportDeviceConfig();" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="button" id="checkVersion" class="btn2" value="检查插件版本" onclick="clickCheckPluginVersion();" />
|
||||
<input type="button" id="remoteconfig" class="btn2" value="远程配置库" onclick="clickRemoteConfig();" />
|
||||
<input type="button" class="btn2" value="恢复默认参数" onclick="clickRestoreDefault();" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input id="configFile" type="text" class="txt" /> <input type="button" class="btn" value="浏览" onclick="clickOpenFileDlg('configFile', 1);" /> <input type="button" class="btn2" value="导入配置文件" onclick="clickImportDeviceConfig();" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input id="upgradeFile" type="text" class="txt" /> <input type="button" class="btn" value="浏览" onclick="clickOpenFileDlg('upgradeFile', 1);" /> <input type="button" class="btn2" value="升级" onclick="clickStartUpgrade();" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
<fieldset class="ipparse">
|
||||
<legend>设备IP解析</legend>
|
||||
<table cellpadding="0" cellspacing="3" border="0">
|
||||
<tr>
|
||||
<td class="tt">模式</td>
|
||||
<td colspan="3">
|
||||
<select id="devicemode" class="sel" onchange="changeIPMode(this.value);">
|
||||
<option value="1">IPServer</option>
|
||||
<option value="2">HiDDNS</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tt">服务器地址</td>
|
||||
<td><input id="serveraddress" type="text" class="txt" value="" /></td>
|
||||
<td class="tt">端口号</td>
|
||||
<td><input id="serverport" type="text" class="txt" value="7071" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tt">设备标识</td>
|
||||
<td><input id="deviceid" type="text" class="txt" value="" /></td>
|
||||
<td class="tt"> </td>
|
||||
<td><input type="button" class="btn" value="获取设备IP" onclick="clickGetDeviceIP();" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
</fieldset>
|
||||
</div>
|
||||
<div class="left">
|
||||
<fieldset class="operate">
|
||||
<legend>操作信息</legend>
|
||||
<div id="opinfo" class="opinfo"></div>
|
||||
</fieldset>
|
||||
<fieldset class="callback">
|
||||
<legend>事件回调信息</legend>
|
||||
<div id="cbinfo" class="cbinfo"></div>
|
||||
</fieldset>
|
||||
</div> -->
|
||||
</body>
|
||||
<script src="../jquery-1.7.1.min.js"></script>
|
||||
<script src="../codebase/encryption/AES.js"></script>
|
||||
<script src="../codebase/encryption/cryptico.min.js"></script>
|
||||
<!-- <script src="../codebase/encryption/encryption.js"></script> -->
|
||||
<script src="../codebase/encryption/crypto-3.1.2.min.js"></script>
|
||||
<script id="videonode" src="../codebase/webVideoCtrl.js"></script>
|
||||
<script src="demo.js"></script>
|
||||
<script>
|
||||
function playVideo(device,drvData) {
|
||||
console.log(device,'deviceId',drvData);
|
||||
clickLogin(device.CameraChannel, drvData)
|
||||
}
|
||||
|
||||
function clickStartPlaybackList(deviceId, startTime, endTime) {
|
||||
//deviceId 通道号 2013-12-10 00:00:00 2013-12-10 00:00:00
|
||||
$("#channels").val(deviceId)
|
||||
$("#starttime").val(startTime)
|
||||
$("#endtime").val(endTime)
|
||||
clickLogin(parseInt(deviceId), 'playback')
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
</html>
|