diff --git a/.filenesting.json b/.filenesting.json
index dc0c3dbbb..d883937ec 100644
--- a/.filenesting.json
+++ b/.filenesting.json
@@ -25,6 +25,10 @@
},
"extensionToExtension": {
"add": {
+ ".esm.js": [
+ ".cs",
+ ".razor"
+ ],
".js": [
".cs",
".razor",
diff --git a/src/BootstrapBlazor/Components/BarcodeReader/BarcodeReader.esm.js b/src/BootstrapBlazor/Components/BarcodeReader/BarcodeReader.esm.js
new file mode 100644
index 000000000..bac6ebd4c
--- /dev/null
+++ b/src/BootstrapBlazor/Components/BarcodeReader/BarcodeReader.esm.js
@@ -0,0 +1,84 @@
+let codeReader = null;
+
+export function bb_barcode(el, method, auto, obj) {
+ var $el = $(el);
+ codeReader = new ZXing.BrowserMultiFormatReader();
+
+ if ($el.attr('data-scan') === 'Camera') {
+ codeReader.getVideoInputDevices().then((videoInputDevices) => {
+ obj.invokeMethodAsync("InitDevices", videoInputDevices).then(() => {
+ if (auto && videoInputDevices.length > 0) {
+ var button = $el.find('button[data-method="scan"]');
+ var data_method = $el.attr('data-scan');
+ if (data_method === 'Camera') button.trigger('click');
+ }
+ });
+ });
+ }
+
+ $el.on('click', 'button[data-method]', function () {
+ var data_method = $(this).attr('data-method');
+ if (data_method === 'scan') {
+ obj.invokeMethodAsync("Start");
+ var deviceId = $el.find('.dropdown-item.active').attr('data-val');
+ var video = $el.find('video').attr('id');
+ codeReader.decodeFromVideoDevice(deviceId, video, (result, err) => {
+ if (result) {
+ $.bb_vibrate();
+ console.log(result.text);
+ obj.invokeMethodAsync("GetResult", result.text);
+
+ var autostop = $el.attr('data-autostop') === 'true';
+ if (autostop) {
+ codeReader.reset();
+ }
+ }
+ if (err && !(err instanceof ZXing.NotFoundException)) {
+ console.error(err)
+ obj.invokeMethodAsync('GetError', err);
+ }
+ });
+ }
+ else if (data_method === 'scanImage') {
+ codeReader = new ZXing.BrowserMultiFormatReader();
+ $el.find(':file').remove();
+ var $img = $('.scanner-image');
+ var $file = $('');
+ $el.append($file);
+
+ $file.on('change', function () {
+ if (this.files.length === 0) {
+ return;
+ }
+ var reader = new FileReader();
+ reader.onloadend = function (e) {
+ $img.attr('src', e.target.result);
+ codeReader.decodeFromImage($img[0]).then((result) => {
+ if (result) {
+ $.bb_vibrate();
+ console.log(result.text);
+ obj.invokeMethodAsync('GetResult', result.text);
+ }
+ }).catch((err) => {
+ if (err) {
+ console.log(err)
+ obj.invokeMethodAsync('GetError', err.message);
+ }
+ })
+ };
+ reader.readAsDataURL(this.files[0]);
+ })
+ $file.trigger('click');
+ }
+ else if (data_method === 'close') {
+ codeReader.reset();
+ obj.invokeMethodAsync("Stop");
+ }
+ });
+};
+
+export function bb_barcode_dispose() {
+ if (codeReader != null) {
+ codeReader.reset();
+ }
+};
diff --git a/src/BootstrapBlazor/Components/BarcodeReader/BarcodeReader.js b/src/BootstrapBlazor/Components/BarcodeReader/BarcodeReader.js
deleted file mode 100644
index f4842bddb..000000000
--- a/src/BootstrapBlazor/Components/BarcodeReader/BarcodeReader.js
+++ /dev/null
@@ -1,94 +0,0 @@
-(function ($) {
- $.extend({
- bb_vibrate: function () {
- if ('vibrate' in window.navigator) {
- window.navigator.vibrate([200, 100, 200]);
- var handler = window.setTimeout(function () {
- window.clearTimeout(handler);
- window.navigator.vibrate([]);
- }, 1000);
- }
- },
- bb_barcode: function (el, obj, method, auto) {
- var $el = $(el);
- var codeReader = new ZXing.BrowserMultiFormatReader();
-
- if (method === 'dispose') {
- codeReader.reset();
- return;
- }
-
- if ($el.attr('data-scan') === 'Camera') {
- codeReader.getVideoInputDevices().then((videoInputDevices) => {
- obj.invokeMethodAsync("InitDevices", videoInputDevices).then(() => {
- if (auto && videoInputDevices.length > 0) {
- var button = $el.find('button[data-method="scan"]');
- var data_method = $el.attr('data-scan');
- if (data_method === 'Camera') button.trigger('click');
- }
- });
- });
- }
-
- $el.on('click', 'button[data-method]', function () {
- var data_method = $(this).attr('data-method');
- if (data_method === 'scan') {
- obj.invokeMethodAsync("Start");
- var deviceId = $el.find('.dropdown-item.active').attr('data-val');
- var video = $el.find('video').attr('id');
- codeReader.decodeFromVideoDevice(deviceId, video, (result, err) => {
- if (result) {
- $.bb_vibrate();
- console.log(result.text);
- obj.invokeMethodAsync("GetResult", result.text);
-
- var autostop = $el.attr('data-autostop') === 'true';
- if (autostop) {
- codeReader.reset();
- }
- }
- if (err && !(err instanceof ZXing.NotFoundException)) {
- console.error(err)
- obj.invokeMethodAsync('GetError', err);
- }
- });
- }
- else if (data_method === 'scanImage') {
- codeReader = new ZXing.BrowserMultiFormatReader();
- $el.find(':file').remove();
- var $img = $('.scanner-image');
- var $file = $('');
- $el.append($file);
-
- $file.on('change', function () {
- if (this.files.length === 0) {
- return;
- }
- var reader = new FileReader();
- reader.onloadend = function (e) {
- $img.attr('src', e.target.result);
- codeReader.decodeFromImage($img[0]).then((result) => {
- if (result) {
- $.bb_vibrate();
- console.log(result.text);
- obj.invokeMethodAsync('GetResult', result.text);
- }
- }).catch((err) => {
- if (err) {
- console.log(err)
- obj.invokeMethodAsync('GetError', err.message);
- }
- })
- };
- reader.readAsDataURL(this.files[0]);
- })
- $file.trigger('click');
- }
- else if (data_method === 'close') {
- codeReader.reset();
- obj.invokeMethodAsync("Stop");
- }
- });
- }
- });
-})(jQuery);
diff --git a/src/BootstrapBlazor/Components/BarcodeReader/BarcodeReader.razor.cs b/src/BootstrapBlazor/Components/BarcodeReader/BarcodeReader.razor.cs
index e0bcda1a9..8d6408842 100644
--- a/src/BootstrapBlazor/Components/BarcodeReader/BarcodeReader.razor.cs
+++ b/src/BootstrapBlazor/Components/BarcodeReader/BarcodeReader.razor.cs
@@ -13,7 +13,7 @@ namespace BootstrapBlazor.Components;
///
public partial class BarcodeReader : IAsyncDisposable
{
- private JSInterop? Interop { get; set; }
+ private JSModule? Module { get; set; }
private string AutoStopString => AutoStop ? "true" : "false";
@@ -147,8 +147,8 @@ public partial class BarcodeReader : IAsyncDisposable
{
if (firstRender)
{
- Interop = new JSInterop(JSRuntime);
- await Interop.InvokeVoidAsync(this, ScannerElement, "bb_barcode", "init", AutoStart);
+ Module = await JSRuntime.LoadModule("barcodereader.bundle.js", this);
+ await Module.InvokeVoidAsync("bb_barcode", ScannerElement, "init", AutoStart);
}
}
@@ -222,24 +222,21 @@ public partial class BarcodeReader : IAsyncDisposable
/// DisposeAsyncCore 方法
///
///
- ///
protected virtual async ValueTask DisposeAsyncCore(bool disposing)
{
if (disposing)
{
- if (Interop != null)
+ if (Module != null)
{
- await Interop.InvokeVoidAsync(this, ScannerElement, "bb_barcode", "dispose");
- Interop.Dispose();
- Interop = null;
+ await Module.InvokeVoidAsync("bb_barcode_dispose");
+ await Module.DisposeAsync();
}
}
}
///
- ///
+ /// DisposeAsync 方法
///
- ///
public async ValueTask DisposeAsync()
{
await DisposeAsyncCore(true);
diff --git a/src/BootstrapBlazor/wwwroot/lib/barcodereader/zxing.min.js b/src/BootstrapBlazor/Components/BarcodeReader/zxing.esm.js
similarity index 100%
rename from src/BootstrapBlazor/wwwroot/lib/barcodereader/zxing.min.js
rename to src/BootstrapBlazor/Components/BarcodeReader/zxing.esm.js
diff --git a/src/BootstrapBlazor/Extensions/JSRuntimeExtensions.cs b/src/BootstrapBlazor/Extensions/JSRuntimeExtensions.cs
index 297caf849..72bb4d32c 100644
--- a/src/BootstrapBlazor/Extensions/JSRuntimeExtensions.cs
+++ b/src/BootstrapBlazor/Extensions/JSRuntimeExtensions.cs
@@ -81,7 +81,7 @@ internal static class JSRuntimeExtensions
}
///
- ///
+ /// IJSRuntime 扩展方法 动态加载脚本 脚本目录为 modules
///
///
///
@@ -93,15 +93,16 @@ internal static class JSRuntimeExtensions
}
///
- ///
+ /// IJSRuntime 扩展方法 动态加载脚本 脚本目录为 modules
///
+ ///
///
- ///
+ ///
+ ///
///
- public static async Task LoadModule(this IJSRuntime jsRuntime, TComponent component) where TComponent : ComponentBase
+ public static async Task> LoadModule(this IJSRuntime jsRuntime, string path, TValue value) where TValue : class
{
- var fileName = $"{component.GetType().Name}.js";
- var jSObjectReference = await jsRuntime.InvokeAsync(identifier: "import", $"./_content/BootstrapBlazor/modules/{fileName}");
- return new JSModule(jSObjectReference);
+ var jSObjectReference = await jsRuntime.InvokeAsync(identifier: "import", $"./_content/BootstrapBlazor/modules/{path}");
+ return new JSModule(jSObjectReference, value);
}
}
diff --git a/src/BootstrapBlazor/Utils/JSInterop.cs b/src/BootstrapBlazor/Utils/JSInterop.cs
index 5d5b0dbec..ebf0b4e35 100644
--- a/src/BootstrapBlazor/Utils/JSInterop.cs
+++ b/src/BootstrapBlazor/Utils/JSInterop.cs
@@ -117,8 +117,11 @@ public class JSInterop : IDisposable where TValue : class
{
if (disposing)
{
- _objRef?.Dispose();
- _objRef = null;
+ if (_objRef != null)
+ {
+ _objRef.Dispose();
+ _objRef = null;
+ }
}
}
diff --git a/src/BootstrapBlazor/Utils/JSModule.cs b/src/BootstrapBlazor/Utils/JSModule.cs
index 4187f336c..c290fbf20 100644
--- a/src/BootstrapBlazor/Utils/JSModule.cs
+++ b/src/BootstrapBlazor/Utils/JSModule.cs
@@ -11,11 +11,14 @@ namespace BootstrapBlazor.Components;
///
public class JSModule : IAsyncDisposable
{
+ ///
+ /// IJSObjectReference 实例
+ ///
[NotNull]
- private IJSObjectReference? Module { get; set; }
+ protected IJSObjectReference? Module { get; set; }
///
- ///
+ /// 构造函数
///
///
public JSModule(IJSObjectReference? jSObjectReference)
@@ -24,12 +27,20 @@ public class JSModule : IAsyncDisposable
}
///
- ///
+ /// InvokeVoidAsync 方法
///
///
///
///
- public ValueTask InvokeVoidAsync(string identifier, params object[] args) => Module.InvokeVoidAsync(identifier, args);
+ public virtual ValueTask InvokeVoidAsync(string identifier, params object?[] args) => Module.InvokeVoidAsync(identifier, args);
+
+ ///
+ /// InvokeVoidAsync 方法
+ ///
+ ///
+ ///
+ ///
+ public virtual ValueTask InvokeAsync(string identifier, params object?[] args) => Module.InvokeAsync(identifier, args);
///
/// Dispose 方法
@@ -56,3 +67,55 @@ public class JSModule : IAsyncDisposable
GC.SuppressFinalize(this);
}
}
+
+///
+/// 模块加载器
+///
+///
+public class JSModule : JSModule where TValue : class
+{
+ ///
+ /// DotNetReference 实例
+ ///
+ protected DotNetObjectReference DotNetReference { get; set; }
+
+ ///
+ /// 构造函数
+ ///
+ ///
+ ///
+ public JSModule(IJSObjectReference? jSObjectReference, TValue value) : base(jSObjectReference)
+ {
+ DotNetReference = DotNetObjectReference.Create(value);
+ }
+
+ ///
+ /// InvokeVoidAsync 方法
+ ///
+ ///
+ ///
+ ///
+ public override ValueTask InvokeVoidAsync(string identifier, params object?[] args)
+ {
+ var paras = new List
"].join("");this.$dialog=this.ui.dialog({title:this.lang.options.help,fade:this.options.dialogsFade,body:this.createShortcutList(),footer:e,callback:function(t){t.find(".modal-body,.note-modal-body").css({"max-height":300,overflow:"scroll"})}}).render().appendTo(t)}},{key:"destroy",value:function(){this.ui.hideDialog(this.$dialog),this.$dialog.remove()}},{key:"createShortcutList",value:function(){var t=this,n=this.options.keyMap[H.isMac?"mac":"pc"];return Object.keys(n).map((function(o){var i=n[o],r=e()('');return r.append(e()("").css({width:180,"margin-right":10})).append(e()("").html(t.context.memo("help."+i)||i)),r.html()})).join("")}},{key:"showHelpDialog",value:function(){var t=this;return e().Deferred((function(e){t.ui.onDialogShown(t.$dialog,(function(){t.context.triggerEvent("dialog.shown"),e.resolve()})),t.ui.showDialog(t.$dialog)})).promise()}},{key:"show",value:function(){var t=this;this.context.invoke("editor.saveRange"),this.showHelpDialog().then((function(){t.context.invoke("editor.restoreRange")}))}}])&&We(n.prototype,o),i&&We(n,i),t}();function qe(t,e){for(var n=0;n0}},{key:"initialize",value:function(){var t=this;this.lastWordRange=null,this.matchingWord=null,this.$popover=this.ui.popover({className:"note-hint-popover",hideArrow:!0,direction:""}).render().appendTo(this.options.container),this.$popover.hide(),this.$content=this.$popover.find(".popover-content,.note-popover-content"),this.$content.on("click",".note-hint-item",(function(n){t.$content.find(".active").removeClass("active"),e()(n.currentTarget).addClass("active"),t.replace()})),this.$popover.on("mousedown",(function(t){t.preventDefault()}))}},{key:"destroy",value:function(){this.$popover.remove()}},{key:"selectItem",value:function(t){this.$content.find(".active").removeClass("active"),t.addClass("active"),this.$content[0].scrollTop=t[0].offsetTop-this.$content.innerHeight()/2}},{key:"moveDown",value:function(){var t=this.$content.find(".note-hint-item.active"),e=t.next();if(e.length)this.selectItem(e);else{var n=t.parent().next();n.length||(n=this.$content.find(".note-hint-group").first()),this.selectItem(n.find(".note-hint-item").first())}}},{key:"moveUp",value:function(){var t=this.$content.find(".note-hint-item.active"),e=t.prev();if(e.length)this.selectItem(e);else{var n=t.parent().prev();n.length||(n=this.$content.find(".note-hint-group").last()),this.selectItem(n.find(".note-hint-item").last())}}},{key:"replace",value:function(){var t=this.$content.find(".note-hint-item.active");if(t.length){var n=this.nodeFromItem(t);if(null!==this.matchingWord&&0===this.matchingWord.length)this.lastWordRange.so=this.lastWordRange.eo;else if(null!==this.matchingWord&&this.matchingWord.length>0&&!this.lastWordRange.isCollapsed()){var o=this.lastWordRange.eo-this.lastWordRange.so-this.matchingWord.length;o>0&&(this.lastWordRange.so+=o)}if(this.lastWordRange.insertNode(n),"next"===this.options.hintSelect){var i=document.createTextNode("");e()(n).after(i),jt.createFromNodeBefore(i).select()}else jt.createFromNodeAfter(n).select();this.lastWordRange=null,this.hide(),this.context.invoke("editor.focus"),this.context.triggerEvent("change",this.$editable.html(),this.$editable)}}},{key:"nodeFromItem",value:function(t){var e=this.hints[t.data("index")],n=t.data("item"),o=e.content?e.content(n):n;return"string"==typeof o&&(o=Dt.createText(o)),o}},{key:"createItemTemplates",value:function(t,n){var o=this.hints[t];return n.map((function(n){var i=e()('');return i.append(o.template?o.template(n):n+""),i.data({index:t,item:n}),i}))}},{key:"handleKeydown",value:function(t){this.$popover.is(":visible")&&(t.keyCode===Kt.code.ENTER?(t.preventDefault(),this.replace()):t.keyCode===Kt.code.UP?(t.preventDefault(),this.moveUp()):t.keyCode===Kt.code.DOWN&&(t.preventDefault(),this.moveDown()))}},{key:"searchKeyword",value:function(t,e,n){var o=this.hints[t];if(o&&o.match.test(e)&&o.search){var i=o.match.exec(e);this.matchingWord=i[0],o.search(i[1],n)}else n()}},{key:"createGroup",value:function(t,n){var o=this,i=e()('');return this.searchKeyword(t,n,(function(e){(e=e||[]).length&&(i.html(o.createItemTemplates(t,e)),o.show())})),i}},{key:"handleKeyup",value:function(t){var n=this;if(!W.contains([Kt.code.ENTER,Kt.code.UP,Kt.code.DOWN],t.keyCode)){var o,i,r=this.context.invoke("editor.getLastRange");if("words"===this.options.hintMode){if(o=r.getWordsRange(r),i=o.toString(),this.hints.forEach((function(t){if(t.match.test(i))return o=r.getWordsMatchRange(t.match),!1})),!o)return void this.hide();i=o.toString()}else o=r.getWordRange(),i=o.toString();if(this.hints.length&&i){this.$content.empty();var a=z.rect2bnd(W.last(o.getClientRects())),s=e()(this.options.container).offset();a&&(a.top-=s.top,a.left-=s.left,this.$popover.hide(),this.lastWordRange=o,this.hints.forEach((function(t,e){t.match.test(i)&&n.createGroup(e,i).appendTo(n.$content)})),this.$content.find(".note-hint-item:first").addClass("active"),"top"===this.direction?this.$popover.css({left:a.left,top:a.top-this.$popover.outerHeight()-5}):this.$popover.css({left:a.left,top:a.top+a.height+5}))}else this.hide()}}},{key:"show",value:function(){this.$popover.show()}},{key:"hide",value:function(){this.$popover.hide()}}])&&_e(n.prototype,o),i&&_e(n,i),t}();e().summernote=e().extend(e().summernote,{version:"0.8.18",plugins:{},dom:Dt,range:jt,lists:W,options:{langInfo:e().summernote.lang["en-US"],editing:!0,modules:{editor:oe,clipboard:re,dropzone:se,codeview:de,statusbar:fe,fullscreen:me,handle:ge,hintPopover:Ge,autoLink:ke,autoSync:Ce,autoReplace:Se,placeholder:Ee,buttons:$e,toolbar:Pe,linkDialog:Le,linkPopover:Fe,imageDialog:He,imagePopover:ze,tablePopover:Oe,videoDialog:je,helpDialog:Ke,airPopover:Ve},buttons:{},lang:"en-US",followingToolbar:!1,toolbarPosition:"top",otherStaticBar:"",codeviewKeepButton:!1,toolbar:[["style",["style"]],["font",["bold","underline","clear"]],["fontname",["fontname"]],["color",["color"]],["para",["ul","ol","paragraph"]],["table",["table"]],["insert",["link","picture","video"]],["view",["fullscreen","codeview","help"]]],popatmouse:!0,popover:{image:[["resize",["resizeFull","resizeHalf","resizeQuarter","resizeNone"]],["float",["floatLeft","floatRight","floatNone"]],["remove",["removeMedia"]]],link:[["link",["linkDialogShow","unlink"]]],table:[["add",["addRowDown","addRowUp","addColLeft","addColRight"]],["delete",["deleteRow","deleteCol","deleteTable"]]],air:[["color",["color"]],["font",["bold","underline","clear"]],["para",["ul","paragraph"]],["table",["table"]],["insert",["link","picture"]],["view",["fullscreen","codeview"]]]},airMode:!1,overrideContextMenu:!1,width:null,height:null,linkTargetBlank:!0,useProtocol:!0,defaultProtocol:"http://",focus:!1,tabDisabled:!1,tabSize:4,styleWithCSS:!1,shortcuts:!0,textareaAutoSync:!0,tooltip:"auto",container:null,maxTextLength:0,blockquoteBreakingLevel:2,spellCheck:!0,disableGrammar:!1,placeholder:null,inheritPlaceholder:!1,recordEveryKeystroke:!1,historyLimit:200,showDomainOnlyForAutolink:!1,hintMode:"word",hintSelect:"after",hintDirection:"bottom",styleTags:["p","blockquote","pre","h1","h2","h3","h4","h5","h6"],fontNames:["Arial","Arial Black","Comic Sans MS","Courier New","Helvetica Neue","Helvetica","Impact","Lucida Grande","Tahoma","Times New Roman","Verdana"],fontNamesIgnoreCheck:[],addDefaultFonts:!0,fontSizes:["8","9","10","11","12","14","18","24","36"],fontSizeUnits:["px","pt"],colors:[["#000000","#424242","#636363","#9C9C94","#CEC6CE","#EFEFEF","#F7F7F7","#FFFFFF"],["#FF0000","#FF9C00","#FFFF00","#00FF00","#00FFFF","#0000FF","#9C00FF","#FF00FF"],["#F7C6CE","#FFE7CE","#FFEFC6","#D6EFD6","#CEDEE7","#CEE7F7","#D6D6E7","#E7D6DE"],["#E79C9C","#FFC69C","#FFE79C","#B5D6A5","#A5C6CE","#9CC6EF","#B5A5D6","#D6A5BD"],["#E76363","#F7AD6B","#FFD663","#94BD7B","#73A5AD","#6BADDE","#8C7BC6","#C67BA5"],["#CE0000","#E79439","#EFC631","#6BA54A","#4A7B8C","#3984C6","#634AA5","#A54A7B"],["#9C0000","#B56308","#BD9400","#397B21","#104A5A","#085294","#311873","#731842"],["#630000","#7B3900","#846300","#295218","#083139","#003163","#21104A","#4A1031"]],colorsName:[["Black","Tundora","Dove Gray","Star Dust","Pale Slate","Gallery","Alabaster","White"],["Red","Orange Peel","Yellow","Green","Cyan","Blue","Electric Violet","Magenta"],["Azalea","Karry","Egg White","Zanah","Botticelli","Tropical Blue","Mischka","Twilight"],["Tonys Pink","Peach Orange","Cream Brulee","Sprout","Casper","Perano","Cold Purple","Careys Pink"],["Mandy","Rajah","Dandelion","Olivine","Gulf Stream","Viking","Blue Marguerite","Puce"],["Guardsman Red","Fire Bush","Golden Dream","Chelsea Cucumber","Smalt Blue","Boston Blue","Butterfly Bush","Cadillac"],["Sangria","Mai Tai","Buddha Gold","Forest Green","Eden","Venice Blue","Meteorite","Claret"],["Rosewood","Cinnamon","Olive","Parsley","Tiber","Midnight Blue","Valentino","Loulou"]],colorButton:{foreColor:"#000000",backColor:"#FFFF00"},lineHeights:["1.0","1.2","1.4","1.5","1.6","1.8","2.0","3.0"],tableClassName:"table table-bordered",insertTableMaxSize:{col:10,row:10},dialogsInBody:!1,dialogsFade:!1,maximumImageFileSize:null,acceptImageFileTypes:"image/*",callbacks:{onBeforeCommand:null,onBlur:null,onBlurCodeview:null,onChange:null,onChangeCodeview:null,onDialogShown:null,onEnter:null,onFocus:null,onImageLinkInsert:null,onImageUpload:null,onImageUploadError:null,onInit:null,onKeydown:null,onKeyup:null,onMousedown:null,onMouseup:null,onPaste:null,onScroll:null},codemirror:{mode:"text/html",htmlMode:!0,lineNumbers:!0},codeviewFilter:!0,codeviewFilterRegex:/<\/*(?:applet|b(?:ase|gsound|link)|embed|frame(?:set)?|ilayer|l(?:ayer|ink)|meta|object|s(?:cript|tyle)|t(?:itle|extarea)|xml)[^>]*?>/gi,codeviewIframeFilter:!0,codeviewIframeWhitelistSrc:[],codeviewIframeWhitelistSrcBase:["www.youtube.com","www.youtube-nocookie.com","www.facebook.com","vine.co","instagram.com","player.vimeo.com","www.dailymotion.com","player.youku.com","jumpingbean.tv","v.qq.com"],keyMap:{pc:{ESC:"escape",ENTER:"insertParagraph","CTRL+Z":"undo","CTRL+Y":"redo",TAB:"tab","SHIFT+TAB":"untab","CTRL+B":"bold","CTRL+I":"italic","CTRL+U":"underline","CTRL+SHIFT+S":"strikethrough","CTRL+BACKSLASH":"removeFormat","CTRL+SHIFT+L":"justifyLeft","CTRL+SHIFT+E":"justifyCenter","CTRL+SHIFT+R":"justifyRight","CTRL+SHIFT+J":"justifyFull","CTRL+SHIFT+NUM7":"insertUnorderedList","CTRL+SHIFT+NUM8":"insertOrderedList","CTRL+LEFTBRACKET":"outdent","CTRL+RIGHTBRACKET":"indent","CTRL+NUM0":"formatPara","CTRL+NUM1":"formatH1","CTRL+NUM2":"formatH2","CTRL+NUM3":"formatH3","CTRL+NUM4":"formatH4","CTRL+NUM5":"formatH5","CTRL+NUM6":"formatH6","CTRL+ENTER":"insertHorizontalRule","CTRL+K":"linkDialog.show"},mac:{ESC:"escape",ENTER:"insertParagraph","CMD+Z":"undo","CMD+SHIFT+Z":"redo",TAB:"tab","SHIFT+TAB":"untab","CMD+B":"bold","CMD+I":"italic","CMD+U":"underline","CMD+SHIFT+S":"strikethrough","CMD+BACKSLASH":"removeFormat","CMD+SHIFT+L":"justifyLeft","CMD+SHIFT+E":"justifyCenter","CMD+SHIFT+R":"justifyRight","CMD+SHIFT+J":"justifyFull","CMD+SHIFT+NUM7":"insertUnorderedList","CMD+SHIFT+NUM8":"insertOrderedList","CMD+LEFTBRACKET":"outdent","CMD+RIGHTBRACKET":"indent","CMD+NUM0":"formatPara","CMD+NUM1":"formatH1","CMD+NUM2":"formatH2","CMD+NUM3":"formatH3","CMD+NUM4":"formatH4","CMD+NUM5":"formatH5","CMD+NUM6":"formatH6","CMD+ENTER":"insertHorizontalRule","CMD+K":"linkDialog.show"}},icons:{align:"note-icon-align",alignCenter:"note-icon-align-center",alignJustify:"note-icon-align-justify",alignLeft:"note-icon-align-left",alignRight:"note-icon-align-right",rowBelow:"note-icon-row-below",colBefore:"note-icon-col-before",colAfter:"note-icon-col-after",rowAbove:"note-icon-row-above",rowRemove:"note-icon-row-remove",colRemove:"note-icon-col-remove",indent:"note-icon-align-indent",outdent:"note-icon-align-outdent",arrowsAlt:"note-icon-arrows-alt",bold:"note-icon-bold",caret:"note-icon-caret",circle:"note-icon-circle",close:"note-icon-close",code:"note-icon-code",eraser:"note-icon-eraser",floatLeft:"note-icon-float-left",floatRight:"note-icon-float-right",font:"note-icon-font",frame:"note-icon-frame",italic:"note-icon-italic",link:"note-icon-link",unlink:"note-icon-chain-broken",magic:"note-icon-magic",menuCheck:"note-icon-menu-check",minus:"note-icon-minus",orderedlist:"note-icon-orderedlist",pencil:"note-icon-pencil",picture:"note-icon-picture",question:"note-icon-question",redo:"note-icon-redo",rollback:"note-icon-rollback",square:"note-icon-square",strikethrough:"note-icon-strikethrough",subscript:"note-icon-subscript",superscript:"note-icon-superscript",table:"note-icon-table",textHeight:"note-icon-text-height",trash:"note-icon-trash",underline:"note-icon-underline",undo:"note-icon-undo",unorderedlist:"note-icon-unorderedlist",video:"note-icon-video"}}}),e().summernote=e().extend(e().summernote,{ui_template:T,interface:"bs5"}),e().summernote.options.styleTags=["p",{title:"Blockquote",tag:"blockquote",className:"blockquote",value:"blockquote"},"pre","h1","h2","h3","h4","h5","h6"]})(),i})()}));
-(function(n,t){typeof define=="function"&&(define.amd||define.cmd)?define(function(){return t(n)}):typeof exports=="object"?module.exports=t(n):n.Browser=t(n)})(typeof self!="undefined"?self:this,function(n){var r=n||{},t=typeof n.navigator!="undefined"?n.navigator:{},i=function(n,i){var r=t.mimeTypes;for(var u in r)if(r[u][n]==i)return!0;return!1};return function(n){var u=n||t.userAgent||{},f=this,e={Trident:u.indexOf("Trident")>-1||u.indexOf("NET CLR")>-1,Presto:u.indexOf("Presto")>-1,WebKit:u.indexOf("AppleWebKit")>-1,Gecko:u.indexOf("Gecko/")>-1,KHTML:u.indexOf("KHTML/")>-1,Safari:u.indexOf("Safari")>-1,Chrome:u.indexOf("Chrome")>-1||u.indexOf("CriOS")>-1,IE:u.indexOf("MSIE")>-1||u.indexOf("Trident")>-1,Edge:u.indexOf("Edge")>-1||u.indexOf("Edg/")>-1,Firefox:u.indexOf("Firefox")>-1||u.indexOf("FxiOS")>-1,"Firefox Focus":u.indexOf("Focus")>-1,Chromium:u.indexOf("Chromium")>-1,Opera:u.indexOf("Opera")>-1||u.indexOf("OPR")>-1,Vivaldi:u.indexOf("Vivaldi")>-1,Yandex:u.indexOf("YaBrowser")>-1,Arora:u.indexOf("Arora")>-1,Lunascape:u.indexOf("Lunascape")>-1,QupZilla:u.indexOf("QupZilla")>-1,"Coc Coc":u.indexOf("coc_coc_browser")>-1,Kindle:u.indexOf("Kindle")>-1||u.indexOf("Silk/")>-1,Iceweasel:u.indexOf("Iceweasel")>-1,Konqueror:u.indexOf("Konqueror")>-1,Iceape:u.indexOf("Iceape")>-1,SeaMonkey:u.indexOf("SeaMonkey")>-1,Epiphany:u.indexOf("Epiphany")>-1,"360":u.indexOf("QihooBrowser")>-1||u.indexOf("QHBrowser")>-1,"360EE":u.indexOf("360EE")>-1,"360SE":u.indexOf("360SE")>-1,UC:u.indexOf("UCBrowser")>-1||u.indexOf(" UBrowser")>-1||u.indexOf("UCWEB")>-1,QQBrowser:u.indexOf("QQBrowser")>-1,QQ:u.indexOf("QQ/")>-1,Baidu:u.indexOf("Baidu")>-1||u.indexOf("BIDUBrowser")>-1||u.indexOf("baidubrowser")>-1||u.indexOf("baiduboxapp")>-1||u.indexOf("BaiduHD")>-1,Maxthon:u.indexOf("Maxthon")>-1,Sogou:u.indexOf("MetaSr")>-1||u.indexOf("Sogou")>-1,Liebao:u.indexOf("LBBROWSER")>-1||u.indexOf("LieBaoFast")>-1,"2345Explorer":u.indexOf("2345Explorer")>-1||u.indexOf("Mb2345Browser")>-1||u.indexOf("2345chrome")>-1,"115Browser":u.indexOf("115Browser")>-1,TheWorld:u.indexOf("TheWorld")>-1,XiaoMi:u.indexOf("MiuiBrowser")>-1,Quark:u.indexOf("Quark")>-1,Qiyu:u.indexOf("Qiyu")>-1,Wechat:u.indexOf("MicroMessenger")>-1,WechatWork:u.indexOf("wxwork/")>-1,Taobao:u.indexOf("AliApp(TB")>-1,Alipay:u.indexOf("AliApp(AP")>-1,Weibo:u.indexOf("Weibo")>-1,Douban:u.indexOf("com.douban.frodo")>-1,Suning:u.indexOf("SNEBUY-APP")>-1,iQiYi:u.indexOf("IqiyiApp")>-1,DingTalk:u.indexOf("DingTalk")>-1,Huawei:u.indexOf("HuaweiBrowser")>-1||u.indexOf("HUAWEI/")>-1||u.indexOf("HONOR")>-1,Vivo:u.indexOf("VivoBrowser")>-1,Windows:u.indexOf("Windows")>-1,Linux:u.indexOf("Linux")>-1||u.indexOf("X11")>-1,"Mac OS":u.indexOf("Macintosh")>-1,Android:u.indexOf("Android")>-1||u.indexOf("Adr")>-1,HarmonyOS:u.indexOf("HarmonyOS")>-1,Ubuntu:u.indexOf("Ubuntu")>-1,FreeBSD:u.indexOf("FreeBSD")>-1,Debian:u.indexOf("Debian")>-1,"Windows Phone":u.indexOf("IEMobile")>-1||u.indexOf("Windows Phone")>-1,BlackBerry:u.indexOf("BlackBerry")>-1||u.indexOf("RIM")>-1,MeeGo:u.indexOf("MeeGo")>-1,Symbian:u.indexOf("Symbian")>-1,iOS:u.indexOf("like Mac OS X")>-1,"Chrome OS":u.indexOf("CrOS")>-1,WebOS:u.indexOf("hpwOS")>-1,Mobile:u.indexOf("Mobi")>-1||u.indexOf("iPh")>-1||u.indexOf("480")>-1,Tablet:u.indexOf("Tablet")>-1||u.indexOf("Pad")>-1||u.indexOf("Nexus 7")>-1},o=!1,s,h,c,l,v,y,a;r.chrome&&(s=u.replace(/^.*Chrome\/([\d]+).*$/,"$1"),r.chrome.adblock2345||r.chrome.common2345?e["2345Explorer"]=!0:i("type","application/360softmgrplugin")||i("type","application/mozilla-npqihooquicklogin")?o=!0:s>36&&r.showModalDialog?o=!0:s>45&&(o=i("type","application/vnd.chromium.remoting-viewer"),!o&&s>=69&&(o=i("type","application/hwepass2001.installepass2001")||i("type","application/asx"))));e.Mobile?e.Mobile=!(u.indexOf("iPad")>-1):o&&(i("type","application/gameplugin")?e["360SE"]=!0:t&&typeof t.connection!="undefined"&&typeof t.connection.saveData=="undefined"?e["360SE"]=!0:e["360EE"]=!0);e.Baidu&&e.Opera?e.Baidu=!1:e.iOS&&(e.Safari=!0);h={engine:["WebKit","Trident","Gecko","Presto","KHTML"],browser:["Safari","Chrome","Edge","IE","Firefox","Firefox Focus","Chromium","Opera","Vivaldi","Yandex","Arora","Lunascape","QupZilla","Coc Coc","Kindle","Iceweasel","Konqueror","Iceape","SeaMonkey","Epiphany","XiaoMi","Vivo","360","360SE","360EE","UC","QQBrowser","QQ","Huawei","Baidu","Maxthon","Sogou","Liebao","2345Explorer","115Browser","TheWorld","Quark","Qiyu","Wechat","WechatWork","Taobao","Alipay","Weibo","Douban","Suning","iQiYi","DingTalk"],os:["Windows","Linux","Mac OS","Android","HarmonyOS","Ubuntu","FreeBSD","Debian","iOS","Windows Phone","BlackBerry","MeeGo","Symbian","Chrome OS","WebOS"],device:["Mobile","Tablet"]};f.device="PC";f.language=function(){var i=t.browserLanguage||t.language,n=i.split("-");return n[1]&&(n[1]=n[1].toUpperCase()),n.join("_")}();for(c in h)for(l=0;l-1&&(n=u.replace(/^.*LieBaoFast\/([\d.]+).*$/,"$1")),t={"57":"6.5","49":"6.0","46":"5.9","42":"5.3","39":"5.2","34":"5.0","29":"4.5","21":"4.0"},i=u.replace(/^.*Chrome\/([\d]+).*$/,"$1"),n||t[i]||""},"2345Explorer":function(){var n=navigator.userAgent.replace(/^.*Chrome\/([\d]+).*$/,"$1");return{"69":"10.0","55":"9.9"}[n]||u.replace(/^.*2345Explorer\/([\d.]+).*$/,"$1").replace(/^.*Mb2345Browser\/([\d.]+).*$/,"$1")},"115Browser":function(){return u.replace(/^.*115Browser\/([\d.]+).*$/,"$1")},TheWorld:function(){return u.replace(/^.*TheWorld ([\d.]+).*$/,"$1")},XiaoMi:function(){return u.replace(/^.*MiuiBrowser\/([\d.]+).*$/,"$1")},Vivo:function(){return u.replace(/^.*VivoBrowser\/([\d.]+).*$/,"$1")},Quark:function(){return u.replace(/^.*Quark\/([\d.]+).*$/,"$1")},Qiyu:function(){return u.replace(/^.*Qiyu\/([\d.]+).*$/,"$1")},Wechat:function(){return u.replace(/^.*MicroMessenger\/([\d.]+).*$/,"$1")},WechatWork:function(){return u.replace(/^.*wxwork\/([\d.]+).*$/,"$1")},Taobao:function(){return u.replace(/^.*AliApp\(TB\/([\d.]+).*$/,"$1")},Alipay:function(){return u.replace(/^.*AliApp\(AP\/([\d.]+).*$/,"$1")},Weibo:function(){return u.replace(/^.*weibo__([\d.]+).*$/,"$1")},Douban:function(){return u.replace(/^.*com.douban.frodo\/([\d.]+).*$/,"$1")},Suning:function(){return u.replace(/^.*SNEBUY-APP([\d.]+).*$/,"$1")},iQiYi:function(){return u.replace(/^.*IqiyiVersion\/([\d.]+).*$/,"$1")},DingTalk:function(){return u.replace(/^.*DingTalk\/([\d.]+).*$/,"$1")},Huawei:function(){return u.replace(/^.*Version\/([\d.]+).*$/,"$1").replace(/^.*HuaweiBrowser\/([\d.]+).*$/,"$1")}};f.version="";a[f.browser]&&(f.version=a[f.browser](),f.version==u&&(f.version=""));f.browser=="Chrome"&&u.match(/\S+Browser/)&&(f.browser=u.match(/\S+Browser/)[0],f.version=u.replace(/^.*Browser\/([\d.]+).*$/,"$1"));f.browser=="Firefox"&&(window.clientInformation||!window.u2f)&&(f.browser+=" Nightly");f.browser=="Edge"?f.engine=f.version>"75"?"Blink":"EdgeHTML":e.Chrome&&f.engine=="WebKit"&&parseInt(a.Chrome())>27?f.engine="Blink":f.browser=="Opera"&&parseInt(f.version)>12?f.engine="Blink":f.browser=="Yandex"&&(f.engine="Blink")}}),function(n){function r(t){return this.each(function(){var u=n(this),r=u.data(i.DATA_KEY),f=typeof t=="object"&&t;r?r.update(f):u.data(i.DATA_KEY,r=new i(this,f))})}var i=function(t,i){this.$element=n(t);this.options=n.extend({},i);this.init()},t;i.VERSION="5.1.0";i.Author="argo@163.com";i.DATA_KEY="lgb.SliderCaptcha";t=i.prototype;t.init=function(){this.initDOM();this.initImg();this.bindEvents()};t.initDOM=function(){var u=this.$element.find("canvas:first")[0].getContext("2d"),t=this.$element.find("canvas:last")[0],f=t.getContext("2d"),e=this.$element.find(".captcha-load"),i=this.$element.find(".captcha-footer"),o=i.find(".captcha-bar-bg"),s=this.$element.find(".captcha-bar"),r=this.$element.find(".captcha-bar-text"),h=this.$element.find(".captcha-refresh"),c=r.attr("data-text");n.extend(this,{canvas:u,block:t,bar:f,$load:e,$footer:i,$barLeft:o,$slider:s,$barText:r,$refresh:h,barText:c})};t.initImg=function(){var i=function(n,t){var i=this.options.sideLength,f=this.options.diameter,e=Math.PI,r=this.options.offsetX,u=this.options.offsetY;n.beginPath();n.moveTo(r,u);n.arc(r+i/2,u-f+2,f,.72*e,2.26*e);n.lineTo(r+i,u);n.arc(r+i+f-2,u+i/2,f,1.21*e,2.78*e);n.lineTo(r+i,u+i);n.lineTo(r,u+i);n.arc(r+f-2,u+i/2,f+.4,2.76*e,1.24*e,!0);n.lineTo(r,u);n.lineWidth=2;n.fillStyle="rgba(255, 255, 255, 0.7)";n.strokeStyle="rgba(255, 255, 255, 0.7)";n.stroke();n[t]();n.globalCompositeOperation="destination-over"},t=new Image,n;t.src=this.options.imageUrl;n=this;t.onload=function(){i.call(n,n.canvas,"fill");i.call(n,n.bar,"clip");n.canvas.drawImage(t,0,0,n.options.width,n.options.height);n.bar.drawImage(t,0,0,n.options.width,n.options.height);var r=n.options.offsetY-n.options.diameter*2-1,u=n.bar.getImageData(n.options.offsetX-3,r,n.options.barWidth,n.options.barWidth);n.block.width=n.options.barWidth;n.bar.putImageData(u,0,r)};t.onerror=function(){n.$load.text($load.attr("data-failed")).addClass("text-danger")}};t.bindEvents=function(){var n=this,t=0,i=0,r=[];this.$slider.drag(function(r){n.$barText.addClass("d-none");t=r.clientX||r.touches[0].clientX;i=r.clientY||r.touches[0].clientY},function(u){var o=u.clientX||u.touches[0].clientX,s=u.clientY||u.touches[0].clientY,f=o-t,h=s-i,e;if(f<0||f+40>n.options.width)return!1;n.$slider.css({left:f-1+"px"});e=(n.options.width-60)/(n.options.width-40)*f;n.block.style.left=e+"px";n.$footer.addClass("is-move");n.$barLeft.css({width:f+4+"px"});r.push(Math.round(h))},function(i){var f=i.clientX||i.changedTouches[0].clientX,u;n.$footer.removeClass("is-move");u=Math.ceil((n.options.width-60)/(n.options.width-40)*(f-t)+3);n.verify(u,r)});this.$refresh.on("click",function(){n.options.barText=n.$barText.attr("data-text")})};t.verify=function(n,t){var r=this.options.remoteObj.obj,u=this.options.remoteObj.method,i=this;r.invokeMethodAsync(u,n,t).then(function(n){n?(i.$footer.addClass("is-valid"),i.options.barText=i.$barText.attr("data-text")):(i.$footer.addClass("is-invalid"),setTimeout(function(){i.$refresh.trigger("click");i.options.barText=i.$barText.attr("data-try")},1e3))})};t.update=function(t){n.extend(this.options,t);this.resetCanvas();this.initImg();this.resetBar()};t.resetCanvas=function(){this.canvas.clearRect(0,0,this.options.width,this.options.height);this.bar.clearRect(0,0,this.options.width,this.options.height);this.block.width=this.options.width;this.block.style.left=0;this.$load.text(this.$load.attr("data-load")).removeClass("text-danger")};t.resetBar=function(){this.$footer.removeClass("is-invalid is-valid");this.$barText.text(this.options.barText).removeClass("d-none");this.$slider.css({left:"0px"});this.$barLeft.css({width:"0px"})};n.fn.sliderCaptcha=r;n.fn.sliderCaptcha.Constructor=i;n.extend({captcha:function(t,i,r,u){u.remoteObj={obj:i,method:r};n(t).sliderCaptcha(u)}})}(jQuery),function(n){n.isFunction(Date.prototype.format)||(Date.prototype.format=function(n){var i={"M+":this.getMonth()+1,"d+":this.getDate(),"h+":this.getHours()%12==0?12:this.getHours()%12,"H+":this.getHours(),"m+":this.getMinutes(),"s+":this.getSeconds(),"q+":Math.floor((this.getMonth()+3)/3),S:this.getMilliseconds()},t;/(y+)/.test(n)&&(n=n.replace(RegExp.$1,(this.getFullYear()+"").substr(4-RegExp.$1.length)));/(E+)/.test(n)&&(n=n.replace(RegExp.$1,(RegExp.$1.length>1?RegExp.$1.length>2?"星期":"周":"")+{0:"日",1:"一",2:"二",3:"三",4:"四",5:"五",6:"六"}[this.getDay()]));for(t in i)new RegExp("("+t+")").test(n)&&(n=n.replace(RegExp.$1,RegExp.$1.length===1?i[t]:("00"+i[t]).substr((""+i[t]).length)));return n});n.browser={versions:function(){var n=navigator.userAgent;return{trident:n.indexOf("Trident")>-1,presto:n.indexOf("Presto")>-1,webKit:n.indexOf("AppleWebKit")>-1,gecko:n.indexOf("Gecko")>-1&&n.indexOf("KHTML")===-1,mobile:!!n.match(/AppleWebKit.*Mobile.*/),ios:!!n.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),android:n.indexOf("Android")>-1||n.indexOf("Linux")>-1,iPhone:n.indexOf("iPhone")>-1,iPod:n.indexOf("iPod")>-1,iPad:n.indexOf("iPad")>-1,mac:n.indexOf("Macintosh")>-1,webApp:n.indexOf("Safari")===-1}}(),language:(navigator.browserLanguage||navigator.language).toLowerCase()};Array.prototype.indexOf=function(n){for(var t=0;t-1&&this.splice(t,1)};n.extend({format:function(t,i){return i===undefined||i===null?null:(arguments.length>2&&i.constructor!==Array&&(i=n.makeArray(arguments).slice(1)),i.constructor!==Array&&(i=[i]),n.each(i,function(n,i){t=t.replace(new RegExp("\\{"+n+"\\}","g"),function(){return i})}),t)},getUID:function(n){n||(n="b");do n+=~~(Math.random()*1e6);while(document.getElementById(n));return n},webClient:function(t,i,r){var u={},f=new Browser;u.Browser=f.browser+" "+f.version;u.Os=f.os+" "+f.osVersion;u.Device=f.device;u.Language=f.language;u.Engine=f.engine;u.UserAgent=navigator.userAgent;n.ajax({type:"GET",url:i,success:function(n){t.invokeMethodAsync(r,n.Id,n.Ip,u.Os,u.Browser,u.Device,u.Language,u.Engine,u.UserAgent)},error:function(){console.error("Please add UseBootstrapBlazor middleware");t.invokeMethodAsync(r,"","",u.Os,u.Browser,u.Device,u.Language,u.Engine,u.UserAgent)}})}});n.fn.extend({drag:function(t,i,r){var u=n(this),o=function(i){i.preventDefault();i.stopPropagation();document.addEventListener("mousemove",f);document.addEventListener("touchmove",f);document.addEventListener("mouseup",e);document.addEventListener("touchend",e);n.isFunction(t)&&t.call(u,i)},f=function(t){t.touches&&t.touches.length>1||n.isFunction(i)&&i.call(u,t)},e=function(t){n.isFunction(r)&&r.call(u,t);window.setTimeout(function(){document.removeEventListener("mousemove",f);document.removeEventListener("touchmove",f);document.removeEventListener("mouseup",e);document.removeEventListener("touchend",e)},100)};u.on("mousedown",o);u.on("touchstart",o)},touchScale:function(t,i){i=n.extend({max:null,min:.195},i);var f=this[0],r={scale:1},u=n(this);f.addEventListener("touchstart",function(n){var i=n.touches,u=i[0],t=i[1];n.preventDefault();r.pageX=u.pageX;r.pageY=u.pageY;r.moveable=!0;t&&(r.pageX2=t.pageX,r.pageY2=t.pageY);r.originScale=r.scale||1});document.addEventListener("touchmove",function(f){if(r.moveable){var s=f.touches,h=s[0],o=s[1];if(o){f.preventDefault();u.hasClass("transition-none")||u.addClass("transition-none");r.pageX2||(r.pageX2=o.pageX);r.pageY2||(r.pageY2=o.pageY);var c=function(n,t){return Math.hypot(t.x-n.x,t.y-n.y)},l=c({x:h.pageX,y:h.pageY},{x:o.pageX,y:o.pageY})/c({x:r.pageX,y:r.pageY},{x:r.pageX2,y:r.pageY2}),e=r.originScale*l;i.max!=null&&e>i.max&&(e=i.max);i.min!=null&&e-1});t.length===0&&(t=document.createElement("script"),t.setAttribute("src",n),document.body.appendChild(t))},r=function(n){var i,t;const r=[...document.getElementsByTagName("script")];for(i=r.filter(function(t){return t.src.indexOf(n)>-1}),t=0;t-1});t.length===0&&(t=document.createElement("link"),t.setAttribute("href",n),t.setAttribute("rel","stylesheet"),document.getElementsByTagName("head")[0].appendChild(t))},f=function(){var t,n;const i=[...document.getElementsByTagName("link")];for(t=i.filter(function(n){return n.href.indexOf(content)>-1}),n=0;n<\/div>');o==="inline"&&u.addClass("form-inline");e.children().each(function(e,o){var s=n(o),c=s.data("toggle")==="row",h=r._getColSpan(s);c?n("<\/div>").addClass(r._calc(h)).appendTo(u).append(s):(f=s.prop("tagName")==="LABEL",f?(i===null&&(i=n("
<\/div>").addClass(r._calc(h))),i.append(s)):(f=!1,i==null&&(i=n("
<\/div>").addClass(r._calc(h))),i.append(s),t==null?i.appendTo(u):i.appendTo(t),i=null))});t==null&&e.append(u)},_layout_parent_row:function(){var t=this.$element.data("target"),i=n('[data-uid="'+t+'"]'),r=n('
<\/div>').appendTo(i);this._layout_column(r)},_calc:function(n){var t=this.options.itemsPerRow,i;return n>0&&(t=t*n),i="col-12",t!==12&&(i="col-12 col-sm-"+t),i},_getColSpan:function(n){var t=parseInt(n.data("colspan"));return isNaN(t)&&(t=0),t}});n.fn.grid=i;n.fn.grid.Constructor=t}(jQuery),function(n){function r(i){return this.each(function(){var u=n(this),r=u.data(t.DATA_KEY),f=typeof i=="object"&&i;r||u.data(t.DATA_KEY,r=new t(this,f));typeof i=="string"&&/active/.test(i)&&r[i].apply(r)})}var t=function(t,i){this.$element=n(t);this.$header=this.$element.find(".tabs-header");this.$wrap=this.$header.find(".tabs-nav-wrap");this.$scroll=this.$wrap.find(".tabs-nav-scroll");this.$tab=this.$scroll.find(".tabs-nav");this.options=n.extend({},i);this.init()},i;t.VERSION="5.1.0";t.Author="argo@163.com";t.DATA_KEY="lgb.Tab";i=t.prototype;i.init=function(){var t=this;n(window).on("resize",function(){t.resize()});this.active()};i.fixSize=function(){var n=this.$element.height(),t=this.$element.width();this.$element.css({height:n+"px",width:t+"px"})};i.resize=function(){var n,t,i,r,u;this.vertical=this.$element.hasClass("tabs-left")||this.$element.hasClass("tabs-right");this.horizontal=this.$element.hasClass("tabs-top")||this.$element.hasClass("tabs-bottom");n=this.$tab.find(".tabs-item:last");n.length>0&&(this.vertical?(this.$wrap.css({height:this.$element.height()+"px"}),t=this.$tab.height(),i=n.position().top+n.outerHeight(),i
0?this.$scroll.scrollTop(t+s):(f=u-t,f<0&&this.$scroll.scrollTop(t+f));r.css({width:"2px",transform:"translateY("+u+"px)"})}else{var e=n.position().left,y=e+n.outerWidth(),i=this.$scroll.scrollLeft(),p=this.$scroll.width(),h=y-i-p;h>0?this.$scroll.scrollLeft(i+h):(o=e-i,o<0&&this.$scroll.scrollLeft(i+o));c=n.width();l=e+parseInt(n.css("paddingLeft"));r.css({width:c+"px",transform:"translateX("+l+"px)"})}};n.fn.lgbTab=r;n.fn.lgbTab.Constructor=t}(jQuery),function(n){n.extend({bb_ajax:function(t,i,r){r=JSON.stringify(r);var u=null;return(n.ajax({url:t,data:r,method:i,contentType:"application/json",dataType:"json","async":!1,success:function(n){u=n},error:function(){return null}}),u==null)?null:JSON.stringify(u)},bb_ajax_goto:function(n){window.location.href=n}})}(jQuery),function(n){n.extend({bb_anchor:function(t){var i=n(t);i.on("click",function(t){var f,u,r,e,o;t.preventDefault();f=n(i.data("target"));u=i.data("container");u||(u=window);r=f.offset().top;e=f.css("marginTop").replace("px","");e&&(r=r-parseInt(e));o=i.data("offset");o&&(r=r-parseInt(o));n(u).scrollTop(r)})}})}(jQuery),function(n){n(function(){n(document).on("click",".anchor-link",function(){var t=n(this),i=t.attr("id"),r,u,f;i&&(r=t.attr("data-title"),u=window.location.origin+window.location.pathname+"#"+i,n.bb_copyText(u),t.tooltip({title:r}),t.tooltip("show"),f=window.setTimeout(function(){window.clearTimeout(f);t.tooltip("dispose")},1e3))})})}(jQuery),function(n){n.extend({bb_autoScrollItem:function(t,i){var s=n(t),r=s.find(".dropdown-list"),e=parseInt(r.css("max-height").replace("px",""))/2,u=r.children("li:first").outerHeight(),h=u*i,f=Math.floor(e/u),o;r.children().removeClass("active");o=r.children().length;ie?r.scrollTop(u*(i>f?i-f:i)):i<=f&&r.scrollTop(0)},bb_setDebounce:function(t,i){var f=n(t),u;let r;u=["ArrowUp","ArrowDown","Escape","Enter"];f.on("keyup",function(n){u.indexOf(n.key)<1&&r?(clearTimeout(r),n.stopPropagation(),r=setTimeout(function(){r=null;n.target.dispatchEvent(n.originalEvent)},i)):r=setTimeout(function(){},i)})}})}(jQuery),function(n){n.extend({bb_auto_redirect:function(t,i,r){var u={},f=1,e=window.setInterval(function(){n(document).off("mousemove").one("mousemove",function(n){(u.screenX!==n.screenX||u.screenY!==n.screenY)&&(u.screenX=n.screenX,u.screenY=n.screenY,f=1)});n(document).off("keydown").one("keydown",function(){f=1})},1e3),o=window.setInterval(function(){f++>i&&(window.clearInterval(o),window.clearInterval(e),t.invokeMethodAsync(r))},1e3)}})}(jQuery),function(n){n.extend({bb_vibrate:function(){if("vibrate"in window.navigator){window.navigator.vibrate([200,100,200]);var n=window.setTimeout(function(){window.clearTimeout(n);window.navigator.vibrate([])},1e3)}},bb_barcode:function(t,i,r,u){var f=n(t),e=new ZXing.BrowserMultiFormatReader;if(r==="dispose"){e.reset();return}f.attr("data-scan")==="Camera"&&e.getVideoInputDevices().then(n=>{i.invokeMethodAsync("InitDevices",n).then(()=>{if(u&&n.length>0){var t=f.find('button[data-method="scan"]'),i=f.attr("data-scan");i==="Camera"&&t.trigger("click")}})});f.on("click","button[data-method]",function(){var r=n(this).attr("data-method"),o,s,u,t;if(r==="scan")i.invokeMethodAsync("Start"),o=f.find(".dropdown-item.active").attr("data-val"),s=f.find("video").attr("id"),e.decodeFromVideoDevice(o,s,(t,r)=>{if(t){n.bb_vibrate();console.log(t.text);i.invokeMethodAsync("GetResult",t.text);var u=f.attr("data-autostop")==="true";u&&e.reset()}!r||r instanceof ZXing.NotFoundException||(console.error(r),i.invokeMethodAsync("GetError",r))});else if(r==="scanImage"){e=new ZXing.BrowserMultiFormatReader;f.find(":file").remove();u=n(".scanner-image");t=n('');f.append(t);t.on("change",function(){if(this.files.length!==0){var t=new FileReader;t.onloadend=function(t){u.attr("src",t.target.result);e.decodeFromImage(u[0]).then(t=>{t&&(n.bb_vibrate(),console.log(t.text),i.invokeMethodAsync("GetResult",t.text))}).catch(n=>{n&&(console.log(n),i.invokeMethodAsync("GetError",n.message))})};t.readAsDataURL(this.files[0])}});t.trigger("click")}else r==="close"&&(e.reset(),i.invokeMethodAsync("Stop"))})}})}(jQuery),function(n){n.extend({bb_camera:function(t,i,r,u,f,e){var o=n(t),h=function(n,t){n.pause();n.srcObject=null;t.stop()},c,s;if(r==="stop"){c=o.find("video")[0];s=o.data("bb_video_track");s&&h(c,s);return}navigator.mediaDevices.enumerateDevices().then(function(t){var l=t.filter(function(n){return n.kind==="videoinput"}),r,s,a,c;i.invokeMethodAsync("InitDevices",l).then(()=>{u&&l.length>0&&o.find('button[data-method="play"]').trigger("click")});r=o.find("video")[0];s=o.find("canvas")[0];s.width=f;s.height=e;a=s.getContext("2d");o.on("click","button[data-method]",async function(){var l=n(this).attr("data-method"),t,v,u;if(l==="play"){var w=n(this).attr("data-camera"),y=o.find(".dropdown-item.active").attr("data-val"),p={video:{facingMode:w,width:f,height:e},audio:!1};y!==""&&(p.video.deviceId={exact:y});navigator.mediaDevices.getUserMedia(p).then(n=>{r.srcObject=n,r.play(),c=n.getTracks()[0],o.data("bb_video_track",c),i.invokeMethodAsync("Start")}).catch(n=>{console.log(n),i.invokeMethodAsync("GetError",n.message)})}else if(l==="stop")h(r,c),i.invokeMethodAsync("Stop");else if(l==="capture"){for(a.drawImage(r,0,0,f,e),t=s.toDataURL(),v=30720;t.length>v;)u=t.substr(0,v),console.log(u),await i.invokeMethodAsync("Capture",u),t=t.substr(u.length);t.length>0&&await i.invokeMethodAsync("Capture",t);await i.invokeMethodAsync("Capture","__BB__%END%__BB__")}})})}})}(jQuery),function(n){n.extend({bb_card_collapse:function(t){var i=n(t);i.on("click",function(){var i=n(this).toggleClass("is-open"),t=i.closest(".card").find(".card-body");t.length===1&&(t.is(":hidden")&&t.parent().toggleClass("collapsed"),t.slideToggle("fade",function(){var t=n(this);t.is(":hidden")&&t.parent().toggleClass("collapsed")}))})}})}(jQuery),function(n){n.extend({bb_carousel:function(t){var r=n(t).carousel(),i=null;r.hover(function(){var t,r,u;i!=null&&window.clearTimeout(i);t=n(this);r=t.find("[data-bs-slide]");r.removeClass("d-none");u=window.setTimeout(function(){window.clearTimeout(u);t.addClass("hover")},10)},function(){var t=n(this),r=t.find("[data-bs-slide]");t.removeClass("hover");i=window.setTimeout(function(){window.clearTimeout(i);r.addClass("d-none")},300)})}})}(jQuery),function(n){n.extend({bb_copyText:function(n){if(navigator.clipboard)navigator.clipboard.writeText(n);else{if(typeof ele!="string")return!1;var t=document.createElement("input");t.setAttribute("type","text");t.setAttribute("value",n);document.body.appendChild(t);t.select();document.execCommand("copy");document.body.removeChild(t)}}})}(jQuery),function(n){n.extend({bb_collapse:function(t){var i=n(t),r=null;i.hasClass("is-accordion")&&(r="["+t.getAttributeNames().pop()+"]");n.each(i.children(".accordion-item"),function(){var u=n(this),i=u.children(".accordion-collapse"),t=i.attr("id"),f;t||(t=n.getUID(),i.attr("id",t),r!=null&&i.attr("data-bs-parent",r),f=u.find('[data-bs-toggle="collapse"]'),f.attr("data-bs-target","#"+t).attr("aria-controls",t))});i.find(".tree .tree-item > .fa").on("click",function(){var t=n(this).parent();t.find('[data-bs-toggle="collapse"]').trigger("click")});if(i.parent().hasClass("menu"))i.on("click",".nav-link:not(.collapse)",function(){var r=n(this),t;for(i.find(".active").removeClass("active"),r.addClass("active"),t=r.closest(".accordion");t.length>0;)t.children(".accordion-header").find(".nav-link").addClass("active"),t=t.parent().closest(".accordion")})}})}(jQuery),function(n){n.extend({bb_console:function(t){var u=n(t),i=u.find('[data-scroll="auto"]'),r;i.length>0&&(r=i.find(".console-window"),i.scrollTop(r.height()))}})}(jQuery),function(n){n.extend({bb_timePicker:function(t){var i=n(t);return i.find(".time-spinner-item").height()},bb_timecell:function(t,i,r,u){var f=n(t);f.find(".time-spinner-list").on("mousewheel wheel",function(n){var t=n.originalEvent.wheelDeltaY||-n.originalEvent.deltaY;return t>0?i.invokeMethodAsync(r):i.invokeMethodAsync(u),!1})}})}(jQuery),function(n){n.extend({bb_form_load:function(t,i){var r=n(t);i==="show"?r.addClass("show"):r.removeClass("show")}})}(jQuery),function(n){n.extend({bb_download_wasm:function(n,t,i){var u=BINDING.conv_string(n),e=BINDING.conv_string(t),o=Blazor.platform.toUint8Array(i),s=new File([o],u,{type:e}),f=URL.createObjectURL(s),r=document.createElement("a");document.body.appendChild(r);r.href=f;r.download=u;r.target="_self";r.click();URL.revokeObjectURL(f)},bb_download:function(t,i,r){var f=n.bb_create_url(t,i,r),u=document.createElement("a");document.body.appendChild(u);u.href=f;u.download=t;u.target="_self";u.click();URL.revokeObjectURL(f)},bb_create_url_wasm:function(n,t,i){var r=BINDING.conv_string(n),u=BINDING.conv_string(t),f=Blazor.platform.toUint8Array(i),e=new File([f],r,{type:u});return URL.createObjectURL(e)},bb_create_url:function(t,i,r){typeof r=="string"&&(r=n.base64DecToArr(r));var u=r,f=new File([u],t,{type:i});return URL.createObjectURL(f)},b64ToUint6:function(n){return n>64&&n<91?n-65:n>96&&n<123?n-71:n>47&&n<58?n+4:n===43?62:n===47?63:0},base64DecToArr:function(t,i){for(var h=t.replace(/[^A-Za-z0-9\+\/]/g,""),u=h.length,c=i?Math.ceil((u*3+1>>2)/i)*i:u*3+1>>2,l=new Uint8Array(c),f,e,o=0,s=0,r=0;r>>(16>>>f&24)&255;o=0}return l}})}(jQuery),function(n){n.extend({bb_drawer:function(t,i){var r=n(t),u;i?(r.addClass("is-open"),n("body").addClass("overflow-hidden")):r.hasClass("is-open")&&(r.removeClass("is-open").addClass("is-close"),u=window.setTimeout(function(){window.clearTimeout(u);r.removeClass("is-close");n("body").removeClass("overflow-hidden")},350))}})}(jQuery),function(n){n.extend({bb_html5edit:function(t,i){if(n.isFunction(n.fn.summernote)){var r=n(t),u=typeof i=="object"&&i;return/destroy|hide/.test(i)?r.toggleClass("open").summernote(i):typeof i=="string"?r.hasClass("open")?r.summernote(i):r.html():(u=n.extend({focus:!0,lang:"zh-CN",height:80,dialogsInBody:!0},u),r.on("click",u,function(t,i){var u=n(this).tooltip("hide"),r=n.extend({placeholder:u.attr("placeholder")},t.data,i||{});r.obj.invokeMethodAsync("GetToolBar").then(t=>{var i=u.toggleClass("open").summernote(n.extend({callbacks:{onChange:function(n){r.obj.invokeMethodAsync(r.method,n)}},toolbar:t},r)).next().find(".note-toolbar").on("click","button[data-method]",{note:u,op:r},function(t){var r=n(this),i,u;switch(r.attr("data-method")){case"submit":r.tooltip("dispose");i=t.data.note.toggleClass("open");u=i.summernote("code");i.summernote("destroy");t.data.op.obj.invokeMethodAsync(t.data.op.method,u)}}),f=n('