├── .gitattributes ├── .gitignore ├── BlazorInputMask.gif ├── BlazorInputMask.sln ├── BlazorInputMask ├── App.razor ├── BlazorInputMask.csproj ├── InputChanged.cs ├── Pages │ ├── Error.razor │ ├── Index.razor │ ├── Index2.razor │ ├── Index3.razor │ ├── Index4.razor │ └── _Host.cshtml ├── Program.cs ├── Properties │ └── launchSettings.json ├── Shared │ ├── InputMask.razor │ ├── MainLayout.razor │ ├── NavMenu.razor │ └── SurveyPrompt.razor ├── User.cs ├── _Imports.razor ├── appsettings.Development.json ├── appsettings.json └── wwwroot │ ├── css │ ├── bootstrap │ │ ├── bootstrap.min.css │ │ └── bootstrap.min.css.map │ ├── open-iconic │ │ ├── FONT-LICENSE │ │ ├── ICON-LICENSE │ │ ├── README.md │ │ └── font │ │ │ ├── css │ │ │ └── open-iconic-bootstrap.min.css │ │ │ └── fonts │ │ │ ├── open-iconic.eot │ │ │ ├── open-iconic.otf │ │ │ ├── open-iconic.svg │ │ │ ├── open-iconic.ttf │ │ │ └── open-iconic.woff │ └── site.css │ ├── favicon.ico │ └── js │ ├── IMask.js │ └── main.js ├── InputChanges.cs ├── README.md └── license.md /.gitattributes: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # Set default behavior to automatically normalize line endings. 3 | ############################################################################### 4 | * text=auto 5 | 6 | ############################################################################### 7 | # Set default behavior for command prompt diff. 8 | # 9 | # This is need for earlier builds of msysgit that does not have it on by 10 | # default for csharp files. 11 | # Note: This is only used by command line 12 | ############################################################################### 13 | #*.cs diff=csharp 14 | 15 | ############################################################################### 16 | # Set the merge driver for project and solution files 17 | # 18 | # Merging from the command prompt will add diff markers to the files if there 19 | # are conflicts (Merging from VS is not affected by the settings below, in VS 20 | # the diff markers are never inserted). Diff markers may cause the following 21 | # file extensions to fail to load in VS. An alternative would be to treat 22 | # these files as binary and thus will always conflict and require user 23 | # intervention with every merge. To do so, just uncomment the entries below 24 | ############################################################################### 25 | #*.sln merge=binary 26 | #*.csproj merge=binary 27 | #*.vbproj merge=binary 28 | #*.vcxproj merge=binary 29 | #*.vcproj merge=binary 30 | #*.dbproj merge=binary 31 | #*.fsproj merge=binary 32 | #*.lsproj merge=binary 33 | #*.wixproj merge=binary 34 | #*.modelproj merge=binary 35 | #*.sqlproj merge=binary 36 | #*.wwaproj merge=binary 37 | 38 | ############################################################################### 39 | # behavior for image files 40 | # 41 | # image files are treated as binary by default. 42 | ############################################################################### 43 | #*.jpg binary 44 | #*.png binary 45 | #*.gif binary 46 | 47 | ############################################################################### 48 | # diff behavior for common document formats 49 | # 50 | # Convert binary document formats to text before diffing them. This feature 51 | # is only available from the command line. Turn it on by uncommenting the 52 | # entries below. 53 | ############################################################################### 54 | #*.doc diff=astextplain 55 | #*.DOC diff=astextplain 56 | #*.docx diff=astextplain 57 | #*.DOCX diff=astextplain 58 | #*.dot diff=astextplain 59 | #*.DOT diff=astextplain 60 | #*.pdf diff=astextplain 61 | #*.PDF diff=astextplain 62 | #*.rtf diff=astextplain 63 | #*.RTF diff=astextplain 64 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | ## 4 | ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore 5 | 6 | # User-specific files 7 | *.rsuser 8 | *.suo 9 | *.user 10 | *.userosscache 11 | *.sln.docstates 12 | 13 | # User-specific files (MonoDevelop/Xamarin Studio) 14 | *.userprefs 15 | 16 | # Build results 17 | [Dd]ebug/ 18 | [Dd]ebugPublic/ 19 | [Rr]elease/ 20 | [Rr]eleases/ 21 | x64/ 22 | x86/ 23 | [Aa][Rr][Mm]/ 24 | [Aa][Rr][Mm]64/ 25 | bld/ 26 | [Bb]in/ 27 | [Oo]bj/ 28 | [Ll]og/ 29 | 30 | # Visual Studio 2015/2017 cache/options directory 31 | .vs/ 32 | # Uncomment if you have tasks that create the project's static files in wwwroot 33 | #wwwroot/ 34 | 35 | # Visual Studio 2017 auto generated files 36 | Generated\ Files/ 37 | 38 | # MSTest test Results 39 | [Tt]est[Rr]esult*/ 40 | [Bb]uild[Ll]og.* 41 | 42 | # NUNIT 43 | *.VisualState.xml 44 | TestResult.xml 45 | 46 | # Build Results of an ATL Project 47 | [Dd]ebugPS/ 48 | [Rr]eleasePS/ 49 | dlldata.c 50 | 51 | # Benchmark Results 52 | BenchmarkDotNet.Artifacts/ 53 | 54 | # .NET Core 55 | project.lock.json 56 | project.fragment.lock.json 57 | artifacts/ 58 | 59 | # StyleCop 60 | StyleCopReport.xml 61 | 62 | # Files built by Visual Studio 63 | *_i.c 64 | *_p.c 65 | *_h.h 66 | *.ilk 67 | *.meta 68 | *.obj 69 | *.iobj 70 | *.pch 71 | *.pdb 72 | *.ipdb 73 | *.pgc 74 | *.pgd 75 | *.rsp 76 | *.sbr 77 | *.tlb 78 | *.tli 79 | *.tlh 80 | *.tmp 81 | *.tmp_proj 82 | *_wpftmp.csproj 83 | *.log 84 | *.vspscc 85 | *.vssscc 86 | .builds 87 | *.pidb 88 | *.svclog 89 | *.scc 90 | 91 | # Chutzpah Test files 92 | _Chutzpah* 93 | 94 | # Visual C++ cache files 95 | ipch/ 96 | *.aps 97 | *.ncb 98 | *.opendb 99 | *.opensdf 100 | *.sdf 101 | *.cachefile 102 | *.VC.db 103 | *.VC.VC.opendb 104 | 105 | # Visual Studio profiler 106 | *.psess 107 | *.vsp 108 | *.vspx 109 | *.sap 110 | 111 | # Visual Studio Trace Files 112 | *.e2e 113 | 114 | # TFS 2012 Local Workspace 115 | $tf/ 116 | 117 | # Guidance Automation Toolkit 118 | *.gpState 119 | 120 | # ReSharper is a .NET coding add-in 121 | _ReSharper*/ 122 | *.[Rr]e[Ss]harper 123 | *.DotSettings.user 124 | 125 | # JustCode is a .NET coding add-in 126 | .JustCode 127 | 128 | # TeamCity is a build add-in 129 | _TeamCity* 130 | 131 | # DotCover is a Code Coverage Tool 132 | *.dotCover 133 | 134 | # AxoCover is a Code Coverage Tool 135 | .axoCover/* 136 | !.axoCover/settings.json 137 | 138 | # Visual Studio code coverage results 139 | *.coverage 140 | *.coveragexml 141 | 142 | # NCrunch 143 | _NCrunch_* 144 | .*crunch*.local.xml 145 | nCrunchTemp_* 146 | 147 | # MightyMoose 148 | *.mm.* 149 | AutoTest.Net/ 150 | 151 | # Web workbench (sass) 152 | .sass-cache/ 153 | 154 | # Installshield output folder 155 | [Ee]xpress/ 156 | 157 | # DocProject is a documentation generator add-in 158 | DocProject/buildhelp/ 159 | DocProject/Help/*.HxT 160 | DocProject/Help/*.HxC 161 | DocProject/Help/*.hhc 162 | DocProject/Help/*.hhk 163 | DocProject/Help/*.hhp 164 | DocProject/Help/Html2 165 | DocProject/Help/html 166 | 167 | # Click-Once directory 168 | publish/ 169 | 170 | # Publish Web Output 171 | *.[Pp]ublish.xml 172 | *.azurePubxml 173 | # Note: Comment the next line if you want to checkin your web deploy settings, 174 | # but database connection strings (with potential passwords) will be unencrypted 175 | *.pubxml 176 | *.publishproj 177 | 178 | # Microsoft Azure Web App publish settings. Comment the next line if you want to 179 | # checkin your Azure Web App publish settings, but sensitive information contained 180 | # in these scripts will be unencrypted 181 | PublishScripts/ 182 | 183 | # NuGet Packages 184 | *.nupkg 185 | # The packages folder can be ignored because of Package Restore 186 | **/[Pp]ackages/* 187 | # except build/, which is used as an MSBuild target. 188 | !**/[Pp]ackages/build/ 189 | # Uncomment if necessary however generally it will be regenerated when needed 190 | #!**/[Pp]ackages/repositories.config 191 | # NuGet v3's project.json files produces more ignorable files 192 | *.nuget.props 193 | *.nuget.targets 194 | 195 | # Microsoft Azure Build Output 196 | csx/ 197 | *.build.csdef 198 | 199 | # Microsoft Azure Emulator 200 | ecf/ 201 | rcf/ 202 | 203 | # Windows Store app package directories and files 204 | AppPackages/ 205 | BundleArtifacts/ 206 | Package.StoreAssociation.xml 207 | _pkginfo.txt 208 | *.appx 209 | 210 | # Visual Studio cache files 211 | # files ending in .cache can be ignored 212 | *.[Cc]ache 213 | # but keep track of directories ending in .cache 214 | !?*.[Cc]ache/ 215 | 216 | # Others 217 | ClientBin/ 218 | ~$* 219 | *~ 220 | *.dbmdl 221 | *.dbproj.schemaview 222 | *.jfm 223 | *.pfx 224 | *.publishsettings 225 | orleans.codegen.cs 226 | 227 | # Including strong name files can present a security risk 228 | # (https://github.com/github/gitignore/pull/2483#issue-259490424) 229 | #*.snk 230 | 231 | # Since there are multiple workflows, uncomment next line to ignore bower_components 232 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) 233 | #bower_components/ 234 | 235 | # RIA/Silverlight projects 236 | Generated_Code/ 237 | 238 | # Backup & report files from converting an old project file 239 | # to a newer Visual Studio version. Backup files are not needed, 240 | # because we have git ;-) 241 | _UpgradeReport_Files/ 242 | Backup*/ 243 | UpgradeLog*.XML 244 | UpgradeLog*.htm 245 | ServiceFabricBackup/ 246 | *.rptproj.bak 247 | 248 | # SQL Server files 249 | *.mdf 250 | *.ldf 251 | *.ndf 252 | 253 | # Business Intelligence projects 254 | *.rdl.data 255 | *.bim.layout 256 | *.bim_*.settings 257 | *.rptproj.rsuser 258 | *- Backup*.rdl 259 | 260 | # Microsoft Fakes 261 | FakesAssemblies/ 262 | 263 | # GhostDoc plugin setting file 264 | *.GhostDoc.xml 265 | 266 | # Node.js Tools for Visual Studio 267 | .ntvs_analysis.dat 268 | node_modules/ 269 | 270 | # Visual Studio 6 build log 271 | *.plg 272 | 273 | # Visual Studio 6 workspace options file 274 | *.opt 275 | 276 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.) 277 | *.vbw 278 | 279 | # Visual Studio LightSwitch build output 280 | **/*.HTMLClient/GeneratedArtifacts 281 | **/*.DesktopClient/GeneratedArtifacts 282 | **/*.DesktopClient/ModelManifest.xml 283 | **/*.Server/GeneratedArtifacts 284 | **/*.Server/ModelManifest.xml 285 | _Pvt_Extensions 286 | 287 | # Paket dependency manager 288 | .paket/paket.exe 289 | paket-files/ 290 | 291 | # FAKE - F# Make 292 | .fake/ 293 | 294 | # JetBrains Rider 295 | .idea/ 296 | *.sln.iml 297 | 298 | # CodeRush personal settings 299 | .cr/personal 300 | 301 | # Python Tools for Visual Studio (PTVS) 302 | __pycache__/ 303 | *.pyc 304 | 305 | # Cake - Uncomment if you are using it 306 | # tools/** 307 | # !tools/packages.config 308 | 309 | # Tabs Studio 310 | *.tss 311 | 312 | # Telerik's JustMock configuration file 313 | *.jmconfig 314 | 315 | # BizTalk build output 316 | *.btp.cs 317 | *.btm.cs 318 | *.odx.cs 319 | *.xsd.cs 320 | 321 | # OpenCover UI analysis results 322 | OpenCover/ 323 | 324 | # Azure Stream Analytics local run output 325 | ASALocalRun/ 326 | 327 | # MSBuild Binary and Structured Log 328 | *.binlog 329 | 330 | # NVidia Nsight GPU debugger configuration file 331 | *.nvuser 332 | 333 | # MFractors (Xamarin productivity tool) working folder 334 | .mfractor/ 335 | 336 | # Local History for Visual Studio 337 | .localhistory/ 338 | 339 | # BeatPulse healthcheck temp database 340 | healthchecksdb 341 | /BlazorInputMask.sln 342 | /BlazorInputMask/wwwroot/js/main.js 343 | -------------------------------------------------------------------------------- /BlazorInputMask.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raphadesa/BlazorInputMask/507bac04e5493a88de23e14a1e7ec2d07001cc03/BlazorInputMask.gif -------------------------------------------------------------------------------- /BlazorInputMask.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 17 4 | VisualStudioVersion = 17.4.33403.182 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlazorInputMask", "BlazorInputMask\BlazorInputMask.csproj", "{6339FAD0-36D6-4E37-BF49-5F93B9D45BAF}" 7 | EndProject 8 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Éléments de solution", "Éléments de solution", "{F4BC73B1-FD96-4B28-BFBA-94E0AB55577F}" 9 | EndProject 10 | Global 11 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 12 | Debug|Any CPU = Debug|Any CPU 13 | Release|Any CPU = Release|Any CPU 14 | EndGlobalSection 15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 16 | {6339FAD0-36D6-4E37-BF49-5F93B9D45BAF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 17 | {6339FAD0-36D6-4E37-BF49-5F93B9D45BAF}.Debug|Any CPU.Build.0 = Debug|Any CPU 18 | {6339FAD0-36D6-4E37-BF49-5F93B9D45BAF}.Release|Any CPU.ActiveCfg = Release|Any CPU 19 | {6339FAD0-36D6-4E37-BF49-5F93B9D45BAF}.Release|Any CPU.Build.0 = Release|Any CPU 20 | EndGlobalSection 21 | GlobalSection(SolutionProperties) = preSolution 22 | HideSolutionNode = FALSE 23 | EndGlobalSection 24 | GlobalSection(ExtensibilityGlobals) = postSolution 25 | SolutionGuid = {9C186864-A66B-4DE2-823C-79F0AF5AA120} 26 | EndGlobalSection 27 | EndGlobal 28 | -------------------------------------------------------------------------------- /BlazorInputMask/App.razor: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 |

Sorry, there's nothing at this address.

9 |
10 |
11 |
12 | -------------------------------------------------------------------------------- /BlazorInputMask/BlazorInputMask.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | net7.0 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /BlazorInputMask/InputChanged.cs: -------------------------------------------------------------------------------- 1 | namespace BlazorInputMask 2 | { 3 | public class InputChanged 4 | { 5 | public string value { get; set; } 6 | public string unMaskedValue { get; set; } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /BlazorInputMask/Pages/Error.razor: -------------------------------------------------------------------------------- 1 | @page "/error" 2 | 3 | 4 |

Error.

5 |

An error occurred while processing your request.

6 | 7 |

Development Mode

8 |

9 | Swapping to Development environment will display more detailed information about the error that occurred. 10 |

11 |

12 | The Development environment shouldn't be enabled for deployed applications. 13 | It can result in displaying sensitive information from exceptions to end users. 14 | For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development 15 | and restarting the app. 16 |

-------------------------------------------------------------------------------- /BlazorInputMask/Pages/Index.razor: -------------------------------------------------------------------------------- 1 | @page "/" 2 |

Simple validation

3 | @if (!wasSubmitted) 4 | { 5 | 6 | 7 | 8 |
9 | 10 | 11 |
12 | 13 |
14 | 15 | 16 |
17 | 18 | 19 | 20 |
21 | } 22 | else 23 | { 24 | 28 | } 29 | 30 | 31 | @code{ 32 | 33 | User user = new User(); 34 | bool wasSubmitted { get; set; } 35 | string maskedOnly { get; set; } 36 | string rawValue { get; set; } 37 | private void OnMaskChanged(InputChanged input) 38 | { 39 | rawValue = input.unMaskedValue; 40 | } 41 | 42 | private void Submit() 43 | { 44 | 45 | wasSubmitted = true; 46 | } 47 | 48 | 49 | } -------------------------------------------------------------------------------- /BlazorInputMask/Pages/Index2.razor: -------------------------------------------------------------------------------- 1 | @page "/Index2" 2 |

Simple validation on field change

3 | @if (!wasSubmitted) 4 | { 5 | 6 | 7 | 8 |
9 | 10 | 11 |
12 | 13 |
14 | 15 | 16 |
17 | 18 | 19 | 20 |
21 | } 22 | else 23 | { 24 | 27 | } 28 | 29 | 30 | @code{ 31 | 32 | private User user = new User(); 33 | EditContext editContext { get; set; } 34 | InputMask mask { get; set; } 35 | private bool wasSubmitted { get; set; } 36 | public string maskedOnly { get; set; } 37 | protected override void OnInitialized() 38 | { 39 | editContext = new EditContext(user); 40 | editContext.OnFieldChanged += HandleFieldChanged; 41 | 42 | } 43 | 44 | private void HandleFieldChanged(object sender, FieldChangedEventArgs e) 45 | { 46 | var isValid = editContext.Validate(); 47 | if (isValid) 48 | wasSubmitted = true; 49 | 50 | 51 | } 52 | } 53 | 54 | 55 | -------------------------------------------------------------------------------- /BlazorInputMask/Pages/Index3.razor: -------------------------------------------------------------------------------- 1 | @page "/Index3" 2 |

Mask3

3 | 4 | 5 | 6 | 7 | 8 | 9 |
Current mask :@mask
10 | 11 | @code { 12 | string value { get; set; } 13 | string mask { get; set; } 14 | InputMask inputMask { get; set; } 15 | async Task setMask() 16 | { 17 | var rand = new Random(); 18 | var repeat = rand.Next(1,5); 19 | mask =string.Concat(System.Linq.Enumerable.Repeat("00.",repeat)).TrimEnd('.'); 20 | await inputMask.updateMask(mask); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /BlazorInputMask/Pages/Index4.razor: -------------------------------------------------------------------------------- 1 | @using BlazorInputMask 2 | @page "/Index4" 3 | 4 | 5 | 6 | 7 | 8 |
Current mask @mask
9 | 10 | 11 | @code { 12 | string value { get; set; } 13 | string value2 { get; set; } 14 | string mask { get; set; } 15 | InputMask inputMask { get; set; } 16 | InputMask inputMask2 { get; set; } 17 | async Task Clear() 18 | { 19 | await inputMask.clearValue(); 20 | await inputMask2.clearValue(); 21 | StateHasChanged(); 22 | } 23 | } -------------------------------------------------------------------------------- /BlazorInputMask/Pages/_Host.cshtml: -------------------------------------------------------------------------------- 1 | @page "/" 2 | @namespace BlazorInputMask.Pages 3 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers 4 | @{ 5 | Layout = null; 6 | } 7 | 8 | 9 | 10 | 11 | 12 | 13 | BlazorInputMask 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | An error has occurred. This application may no longer respond until reloaded. 26 | 27 | 28 | An unhandled exception has occurred. See browser dev tools for details. 29 | 30 | Reload 31 | 🗙 32 |
33 | 34 | 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /BlazorInputMask/Program.cs: -------------------------------------------------------------------------------- 1 | using BlazorInputMask; 2 | using Microsoft.AspNetCore.Builder; 3 | using Microsoft.AspNetCore.Components; 4 | using Microsoft.AspNetCore.Components.Web; 5 | using Microsoft.Extensions.DependencyInjection; 6 | using Microsoft.Extensions.Hosting; 7 | 8 | var builder = WebApplication.CreateBuilder(args); 9 | 10 | // Add services to the container. 11 | builder.Services.AddRazorPages(); 12 | builder.Services.AddServerSideBlazor(); 13 | 14 | var app = builder.Build(); 15 | 16 | // Configure the HTTP request pipeline. 17 | if (!app.Environment.IsDevelopment()) 18 | { 19 | app.UseExceptionHandler("/Error"); 20 | // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts. 21 | app.UseHsts(); 22 | } 23 | 24 | app.UseHttpsRedirection(); 25 | 26 | app.UseStaticFiles(); 27 | 28 | app.UseRouting(); 29 | 30 | app.MapBlazorHub(); 31 | app.MapFallbackToPage("/_Host"); 32 | 33 | app.Run(); 34 | -------------------------------------------------------------------------------- /BlazorInputMask/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "iisSettings": { 3 | "windowsAuthentication": false, 4 | "anonymousAuthentication": true, 5 | "iisExpress": { 6 | "applicationUrl": "http://localhost:57915", 7 | "sslPort": 44381 8 | } 9 | }, 10 | "profiles": { 11 | "IIS Express": { 12 | "commandName": "IISExpress", 13 | "launchBrowser": true, 14 | "environmentVariables": { 15 | "ASPNETCORE_ENVIRONMENT": "Development" 16 | } 17 | }, 18 | "BlazorInputMask": { 19 | "commandName": "Project", 20 | "launchBrowser": true, 21 | "applicationUrl": "https://localhost:5001;http://localhost:5000", 22 | "environmentVariables": { 23 | "ASPNETCORE_ENVIRONMENT": "Development" 24 | } 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /BlazorInputMask/Shared/InputMask.razor: -------------------------------------------------------------------------------- 1 | @inject IJSRuntime JSRuntime 2 | @inherits InputBase 3 | 4 | @if (validateOnKeyPress) 5 | { 6 | 7 | } 8 | else 9 | { 10 | 11 | } 12 | 13 | 14 | @code { 15 | 16 | [Parameter] 17 | public string id { get; set; } 18 | [Parameter] 19 | public EventCallback OnChanged { get; set; } 20 | [Parameter] 21 | public bool validateOnKeyPress { get; set; } = true; 22 | protected override void OnInitialized() 23 | { 24 | if (string.IsNullOrEmpty(id)) 25 | id = Guid.NewGuid().ToString(); 26 | } 27 | protected override async Task OnAfterRenderAsync(bool firstRender) 28 | { 29 | if (firstRender) 30 | { 31 | object mask = null; 32 | if (AdditionalAttributes.TryGetValue("data-mask", out mask)) 33 | { 34 | var pattern = mask.ToString(); 35 | var isRegEx = pattern.StartsWith("/") && pattern.EndsWith("/"); 36 | if (isRegEx) 37 | pattern = pattern.TrimStart('/').TrimEnd('/'); 38 | await JSRuntime.InvokeVoidAsync("mask", id, pattern, isRegEx, false, DotNetObjectReference.Create(this)); 39 | } 40 | } 41 | } 42 | 43 | [JSInvokable] 44 | public InputChanged returnValue(InputChanged value) 45 | { 46 | if (!string.IsNullOrEmpty(value.value)) 47 | OnChanged.InvokeAsync(value); 48 | return value; 49 | 50 | } 51 | protected override bool TryParseValueFromString(string value, out string result, out string validationErrorMessage) 52 | { 53 | result = value; 54 | validationErrorMessage = null; 55 | return true; 56 | } 57 | 58 | public async Task updateMask(string mask) 59 | { 60 | var pattern = mask.ToString(); 61 | var isRegEx = pattern.StartsWith("/") && pattern.EndsWith("/"); 62 | if (isRegEx) 63 | pattern = pattern.TrimStart('/').TrimEnd('/'); 64 | await JSRuntime.InvokeVoidAsync("mask", id, pattern, isRegEx, true, DotNetObjectReference.Create(this)); 65 | } 66 | 67 | public async Task clearValue() 68 | { 69 | CurrentValue = null; 70 | await JSRuntime.InvokeVoidAsync("clearValue", id); 71 | 72 | } 73 | } 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | -------------------------------------------------------------------------------- /BlazorInputMask/Shared/MainLayout.razor: -------------------------------------------------------------------------------- 1 | @inherits LayoutComponentBase 2 | 3 | 6 | 7 |
8 |
9 | About 10 |
11 | 12 |
13 | @Body 14 |
15 |
16 | -------------------------------------------------------------------------------- /BlazorInputMask/Shared/NavMenu.razor: -------------------------------------------------------------------------------- 1 |  7 | 8 |
9 | 31 |
32 | 33 | @code { 34 | private bool collapseNavMenu = true; 35 | 36 | private string NavMenuCssClass => collapseNavMenu ? "collapse" : null; 37 | 38 | private void ToggleNavMenu() 39 | { 40 | collapseNavMenu = !collapseNavMenu; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /BlazorInputMask/Shared/SurveyPrompt.razor: -------------------------------------------------------------------------------- 1 |  11 | 12 | @code { 13 | // Demonstrates how a parent component can supply parameters 14 | [Parameter] 15 | public string Title { get; set; } 16 | } 17 | -------------------------------------------------------------------------------- /BlazorInputMask/User.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel.DataAnnotations; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | 7 | namespace BlazorInputMask 8 | { 9 | public class User 10 | { 11 | [Required] 12 | public string Name { get; set; } 13 | [Required] 14 | [RegularExpression(@"^[0][1-9]([.][0-9][0-9]){4}", ErrorMessage="Incorrect phone number !")] 15 | public string Telephone { get; set; } 16 | 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /BlazorInputMask/_Imports.razor: -------------------------------------------------------------------------------- 1 | @using System.Net.Http 2 | @using Microsoft.AspNetCore.Authorization 3 | @using Microsoft.AspNetCore.Components.Authorization 4 | @using Microsoft.AspNetCore.Components.Forms 5 | @using Microsoft.AspNetCore.Components.Routing 6 | @using Microsoft.AspNetCore.Components.Web 7 | @using Microsoft.JSInterop 8 | @using BlazorInputMask 9 | @using BlazorInputMask.Shared 10 | -------------------------------------------------------------------------------- /BlazorInputMask/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "DetailedErrors": true, 3 | "Logging": { 4 | "LogLevel": { 5 | "Default": "Information", 6 | "Microsoft": "Warning", 7 | "Microsoft.Hosting.Lifetime": "Information" 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /BlazorInputMask/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft": "Warning", 6 | "Microsoft.Hosting.Lifetime": "Information" 7 | } 8 | }, 9 | "AllowedHosts": "*" 10 | } 11 | -------------------------------------------------------------------------------- /BlazorInputMask/wwwroot/css/open-iconic/FONT-LICENSE: -------------------------------------------------------------------------------- 1 | SIL OPEN FONT LICENSE Version 1.1 2 | 3 | Copyright (c) 2014 Waybury 4 | 5 | PREAMBLE 6 | The goals of the Open Font License (OFL) are to stimulate worldwide 7 | development of collaborative font projects, to support the font creation 8 | efforts of academic and linguistic communities, and to provide a free and 9 | open framework in which fonts may be shared and improved in partnership 10 | with others. 11 | 12 | The OFL allows the licensed fonts to be used, studied, modified and 13 | redistributed freely as long as they are not sold by themselves. The 14 | fonts, including any derivative works, can be bundled, embedded, 15 | redistributed and/or sold with any software provided that any reserved 16 | names are not used by derivative works. The fonts and derivatives, 17 | however, cannot be released under any other type of license. The 18 | requirement for fonts to remain under this license does not apply 19 | to any document created using the fonts or their derivatives. 20 | 21 | DEFINITIONS 22 | "Font Software" refers to the set of files released by the Copyright 23 | Holder(s) under this license and clearly marked as such. This may 24 | include source files, build scripts and documentation. 25 | 26 | "Reserved Font Name" refers to any names specified as such after the 27 | copyright statement(s). 28 | 29 | "Original Version" refers to the collection of Font Software components as 30 | distributed by the Copyright Holder(s). 31 | 32 | "Modified Version" refers to any derivative made by adding to, deleting, 33 | or substituting -- in part or in whole -- any of the components of the 34 | Original Version, by changing formats or by porting the Font Software to a 35 | new environment. 36 | 37 | "Author" refers to any designer, engineer, programmer, technical 38 | writer or other person who contributed to the Font Software. 39 | 40 | PERMISSION & CONDITIONS 41 | Permission is hereby granted, free of charge, to any person obtaining 42 | a copy of the Font Software, to use, study, copy, merge, embed, modify, 43 | redistribute, and sell modified and unmodified copies of the Font 44 | Software, subject to the following conditions: 45 | 46 | 1) Neither the Font Software nor any of its individual components, 47 | in Original or Modified Versions, may be sold by itself. 48 | 49 | 2) Original or Modified Versions of the Font Software may be bundled, 50 | redistributed and/or sold with any software, provided that each copy 51 | contains the above copyright notice and this license. These can be 52 | included either as stand-alone text files, human-readable headers or 53 | in the appropriate machine-readable metadata fields within text or 54 | binary files as long as those fields can be easily viewed by the user. 55 | 56 | 3) No Modified Version of the Font Software may use the Reserved Font 57 | Name(s) unless explicit written permission is granted by the corresponding 58 | Copyright Holder. This restriction only applies to the primary font name as 59 | presented to the users. 60 | 61 | 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font 62 | Software shall not be used to promote, endorse or advertise any 63 | Modified Version, except to acknowledge the contribution(s) of the 64 | Copyright Holder(s) and the Author(s) or with their explicit written 65 | permission. 66 | 67 | 5) The Font Software, modified or unmodified, in part or in whole, 68 | must be distributed entirely under this license, and must not be 69 | distributed under any other license. The requirement for fonts to 70 | remain under this license does not apply to any document created 71 | using the Font Software. 72 | 73 | TERMINATION 74 | This license becomes null and void if any of the above conditions are 75 | not met. 76 | 77 | DISCLAIMER 78 | THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 79 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF 80 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT 81 | OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE 82 | COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 83 | INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL 84 | DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 85 | FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM 86 | OTHER DEALINGS IN THE FONT SOFTWARE. 87 | -------------------------------------------------------------------------------- /BlazorInputMask/wwwroot/css/open-iconic/ICON-LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Waybury 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. -------------------------------------------------------------------------------- /BlazorInputMask/wwwroot/css/open-iconic/README.md: -------------------------------------------------------------------------------- 1 | [Open Iconic v1.1.1](http://useiconic.com/open) 2 | =========== 3 | 4 | ### Open Iconic is the open source sibling of [Iconic](http://useiconic.com). It is a hyper-legible collection of 223 icons with a tiny footprint—ready to use with Bootstrap and Foundation. [View the collection](http://useiconic.com/open#icons) 5 | 6 | 7 | 8 | ## What's in Open Iconic? 9 | 10 | * 223 icons designed to be legible down to 8 pixels 11 | * Super-light SVG files - 61.8 for the entire set 12 | * SVG sprite—the modern replacement for icon fonts 13 | * Webfont (EOT, OTF, SVG, TTF, WOFF), PNG and WebP formats 14 | * Webfont stylesheets (including versions for Bootstrap and Foundation) in CSS, LESS, SCSS and Stylus formats 15 | * PNG and WebP raster images in 8px, 16px, 24px, 32px, 48px and 64px. 16 | 17 | 18 | ## Getting Started 19 | 20 | #### For code samples and everything else you need to get started with Open Iconic, check out our [Icons](http://useiconic.com/open#icons) and [Reference](http://useiconic.com/open#reference) sections. 21 | 22 | ### General Usage 23 | 24 | #### Using Open Iconic's SVGs 25 | 26 | We like SVGs and we think they're the way to display icons on the web. Since Open Iconic are just basic SVGs, we suggest you display them like you would any other image (don't forget the `alt` attribute). 27 | 28 | ``` 29 | icon name 30 | ``` 31 | 32 | #### Using Open Iconic's SVG Sprite 33 | 34 | Open Iconic also comes in a SVG sprite which allows you to display all the icons in the set with a single request. It's like an icon font, without being a hack. 35 | 36 | Adding an icon from an SVG sprite is a little different than what you're used to, but it's still a piece of cake. *Tip: To make your icons easily style able, we suggest adding a general class to the* `` *tag and a unique class name for each different icon in the* `` *tag.* 37 | 38 | ``` 39 | 40 | 41 | 42 | ``` 43 | 44 | Sizing icons only needs basic CSS. All the icons are in a square format, so just set the `` tag with equal width and height dimensions. 45 | 46 | ``` 47 | .icon { 48 | width: 16px; 49 | height: 16px; 50 | } 51 | ``` 52 | 53 | Coloring icons is even easier. All you need to do is set the `fill` rule on the `` tag. 54 | 55 | ``` 56 | .icon-account-login { 57 | fill: #f00; 58 | } 59 | ``` 60 | 61 | To learn more about SVG Sprites, read [Chris Coyier's guide](http://css-tricks.com/svg-sprites-use-better-icon-fonts/). 62 | 63 | #### Using Open Iconic's Icon Font... 64 | 65 | 66 | ##### …with Bootstrap 67 | 68 | You can find our Bootstrap stylesheets in `font/css/open-iconic-bootstrap.{css, less, scss, styl}` 69 | 70 | 71 | ``` 72 | 73 | ``` 74 | 75 | 76 | ``` 77 | 78 | ``` 79 | 80 | ##### …with Foundation 81 | 82 | You can find our Foundation stylesheets in `font/css/open-iconic-foundation.{css, less, scss, styl}` 83 | 84 | ``` 85 | 86 | ``` 87 | 88 | 89 | ``` 90 | 91 | ``` 92 | 93 | ##### …on its own 94 | 95 | You can find our default stylesheets in `font/css/open-iconic.{css, less, scss, styl}` 96 | 97 | ``` 98 | 99 | ``` 100 | 101 | ``` 102 | 103 | ``` 104 | 105 | 106 | ## License 107 | 108 | ### Icons 109 | 110 | All code (including SVG markup) is under the [MIT License](http://opensource.org/licenses/MIT). 111 | 112 | ### Fonts 113 | 114 | All fonts are under the [SIL Licensed](http://scripts.sil.org/cms/scripts/page.php?item_id=OFL_web). 115 | -------------------------------------------------------------------------------- /BlazorInputMask/wwwroot/css/open-iconic/font/css/open-iconic-bootstrap.min.css: -------------------------------------------------------------------------------- 1 | @font-face{font-family:Icons;src:url(../fonts/open-iconic.eot);src:url(../fonts/open-iconic.eot?#iconic-sm) format('embedded-opentype'),url(../fonts/open-iconic.woff) format('woff'),url(../fonts/open-iconic.ttf) format('truetype'),url(../fonts/open-iconic.otf) format('opentype'),url(../fonts/open-iconic.svg#iconic-sm) format('svg');font-weight:400;font-style:normal}.oi{position:relative;top:1px;display:inline-block;speak:none;font-family:Icons;font-style:normal;font-weight:400;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.oi:empty:before{width:1em;text-align:center;box-sizing:content-box}.oi.oi-align-center:before{text-align:center}.oi.oi-align-left:before{text-align:left}.oi.oi-align-right:before{text-align:right}.oi.oi-flip-horizontal:before{-webkit-transform:scale(-1,1);-ms-transform:scale(-1,1);transform:scale(-1,1)}.oi.oi-flip-vertical:before{-webkit-transform:scale(1,-1);-ms-transform:scale(-1,1);transform:scale(1,-1)}.oi.oi-flip-horizontal-vertical:before{-webkit-transform:scale(-1,-1);-ms-transform:scale(-1,1);transform:scale(-1,-1)}.oi-account-login:before{content:'\e000'}.oi-account-logout:before{content:'\e001'}.oi-action-redo:before{content:'\e002'}.oi-action-undo:before{content:'\e003'}.oi-align-center:before{content:'\e004'}.oi-align-left:before{content:'\e005'}.oi-align-right:before{content:'\e006'}.oi-aperture:before{content:'\e007'}.oi-arrow-bottom:before{content:'\e008'}.oi-arrow-circle-bottom:before{content:'\e009'}.oi-arrow-circle-left:before{content:'\e00a'}.oi-arrow-circle-right:before{content:'\e00b'}.oi-arrow-circle-top:before{content:'\e00c'}.oi-arrow-left:before{content:'\e00d'}.oi-arrow-right:before{content:'\e00e'}.oi-arrow-thick-bottom:before{content:'\e00f'}.oi-arrow-thick-left:before{content:'\e010'}.oi-arrow-thick-right:before{content:'\e011'}.oi-arrow-thick-top:before{content:'\e012'}.oi-arrow-top:before{content:'\e013'}.oi-audio-spectrum:before{content:'\e014'}.oi-audio:before{content:'\e015'}.oi-badge:before{content:'\e016'}.oi-ban:before{content:'\e017'}.oi-bar-chart:before{content:'\e018'}.oi-basket:before{content:'\e019'}.oi-battery-empty:before{content:'\e01a'}.oi-battery-full:before{content:'\e01b'}.oi-beaker:before{content:'\e01c'}.oi-bell:before{content:'\e01d'}.oi-bluetooth:before{content:'\e01e'}.oi-bold:before{content:'\e01f'}.oi-bolt:before{content:'\e020'}.oi-book:before{content:'\e021'}.oi-bookmark:before{content:'\e022'}.oi-box:before{content:'\e023'}.oi-briefcase:before{content:'\e024'}.oi-british-pound:before{content:'\e025'}.oi-browser:before{content:'\e026'}.oi-brush:before{content:'\e027'}.oi-bug:before{content:'\e028'}.oi-bullhorn:before{content:'\e029'}.oi-calculator:before{content:'\e02a'}.oi-calendar:before{content:'\e02b'}.oi-camera-slr:before{content:'\e02c'}.oi-caret-bottom:before{content:'\e02d'}.oi-caret-left:before{content:'\e02e'}.oi-caret-right:before{content:'\e02f'}.oi-caret-top:before{content:'\e030'}.oi-cart:before{content:'\e031'}.oi-chat:before{content:'\e032'}.oi-check:before{content:'\e033'}.oi-chevron-bottom:before{content:'\e034'}.oi-chevron-left:before{content:'\e035'}.oi-chevron-right:before{content:'\e036'}.oi-chevron-top:before{content:'\e037'}.oi-circle-check:before{content:'\e038'}.oi-circle-x:before{content:'\e039'}.oi-clipboard:before{content:'\e03a'}.oi-clock:before{content:'\e03b'}.oi-cloud-download:before{content:'\e03c'}.oi-cloud-upload:before{content:'\e03d'}.oi-cloud:before{content:'\e03e'}.oi-cloudy:before{content:'\e03f'}.oi-code:before{content:'\e040'}.oi-cog:before{content:'\e041'}.oi-collapse-down:before{content:'\e042'}.oi-collapse-left:before{content:'\e043'}.oi-collapse-right:before{content:'\e044'}.oi-collapse-up:before{content:'\e045'}.oi-command:before{content:'\e046'}.oi-comment-square:before{content:'\e047'}.oi-compass:before{content:'\e048'}.oi-contrast:before{content:'\e049'}.oi-copywriting:before{content:'\e04a'}.oi-credit-card:before{content:'\e04b'}.oi-crop:before{content:'\e04c'}.oi-dashboard:before{content:'\e04d'}.oi-data-transfer-download:before{content:'\e04e'}.oi-data-transfer-upload:before{content:'\e04f'}.oi-delete:before{content:'\e050'}.oi-dial:before{content:'\e051'}.oi-document:before{content:'\e052'}.oi-dollar:before{content:'\e053'}.oi-double-quote-sans-left:before{content:'\e054'}.oi-double-quote-sans-right:before{content:'\e055'}.oi-double-quote-serif-left:before{content:'\e056'}.oi-double-quote-serif-right:before{content:'\e057'}.oi-droplet:before{content:'\e058'}.oi-eject:before{content:'\e059'}.oi-elevator:before{content:'\e05a'}.oi-ellipses:before{content:'\e05b'}.oi-envelope-closed:before{content:'\e05c'}.oi-envelope-open:before{content:'\e05d'}.oi-euro:before{content:'\e05e'}.oi-excerpt:before{content:'\e05f'}.oi-expand-down:before{content:'\e060'}.oi-expand-left:before{content:'\e061'}.oi-expand-right:before{content:'\e062'}.oi-expand-up:before{content:'\e063'}.oi-external-link:before{content:'\e064'}.oi-eye:before{content:'\e065'}.oi-eyedropper:before{content:'\e066'}.oi-file:before{content:'\e067'}.oi-fire:before{content:'\e068'}.oi-flag:before{content:'\e069'}.oi-flash:before{content:'\e06a'}.oi-folder:before{content:'\e06b'}.oi-fork:before{content:'\e06c'}.oi-fullscreen-enter:before{content:'\e06d'}.oi-fullscreen-exit:before{content:'\e06e'}.oi-globe:before{content:'\e06f'}.oi-graph:before{content:'\e070'}.oi-grid-four-up:before{content:'\e071'}.oi-grid-three-up:before{content:'\e072'}.oi-grid-two-up:before{content:'\e073'}.oi-hard-drive:before{content:'\e074'}.oi-header:before{content:'\e075'}.oi-headphones:before{content:'\e076'}.oi-heart:before{content:'\e077'}.oi-home:before{content:'\e078'}.oi-image:before{content:'\e079'}.oi-inbox:before{content:'\e07a'}.oi-infinity:before{content:'\e07b'}.oi-info:before{content:'\e07c'}.oi-italic:before{content:'\e07d'}.oi-justify-center:before{content:'\e07e'}.oi-justify-left:before{content:'\e07f'}.oi-justify-right:before{content:'\e080'}.oi-key:before{content:'\e081'}.oi-laptop:before{content:'\e082'}.oi-layers:before{content:'\e083'}.oi-lightbulb:before{content:'\e084'}.oi-link-broken:before{content:'\e085'}.oi-link-intact:before{content:'\e086'}.oi-list-rich:before{content:'\e087'}.oi-list:before{content:'\e088'}.oi-location:before{content:'\e089'}.oi-lock-locked:before{content:'\e08a'}.oi-lock-unlocked:before{content:'\e08b'}.oi-loop-circular:before{content:'\e08c'}.oi-loop-square:before{content:'\e08d'}.oi-loop:before{content:'\e08e'}.oi-magnifying-glass:before{content:'\e08f'}.oi-map-marker:before{content:'\e090'}.oi-map:before{content:'\e091'}.oi-media-pause:before{content:'\e092'}.oi-media-play:before{content:'\e093'}.oi-media-record:before{content:'\e094'}.oi-media-skip-backward:before{content:'\e095'}.oi-media-skip-forward:before{content:'\e096'}.oi-media-step-backward:before{content:'\e097'}.oi-media-step-forward:before{content:'\e098'}.oi-media-stop:before{content:'\e099'}.oi-medical-cross:before{content:'\e09a'}.oi-menu:before{content:'\e09b'}.oi-microphone:before{content:'\e09c'}.oi-minus:before{content:'\e09d'}.oi-monitor:before{content:'\e09e'}.oi-moon:before{content:'\e09f'}.oi-move:before{content:'\e0a0'}.oi-musical-note:before{content:'\e0a1'}.oi-paperclip:before{content:'\e0a2'}.oi-pencil:before{content:'\e0a3'}.oi-people:before{content:'\e0a4'}.oi-person:before{content:'\e0a5'}.oi-phone:before{content:'\e0a6'}.oi-pie-chart:before{content:'\e0a7'}.oi-pin:before{content:'\e0a8'}.oi-play-circle:before{content:'\e0a9'}.oi-plus:before{content:'\e0aa'}.oi-power-standby:before{content:'\e0ab'}.oi-print:before{content:'\e0ac'}.oi-project:before{content:'\e0ad'}.oi-pulse:before{content:'\e0ae'}.oi-puzzle-piece:before{content:'\e0af'}.oi-question-mark:before{content:'\e0b0'}.oi-rain:before{content:'\e0b1'}.oi-random:before{content:'\e0b2'}.oi-reload:before{content:'\e0b3'}.oi-resize-both:before{content:'\e0b4'}.oi-resize-height:before{content:'\e0b5'}.oi-resize-width:before{content:'\e0b6'}.oi-rss-alt:before{content:'\e0b7'}.oi-rss:before{content:'\e0b8'}.oi-script:before{content:'\e0b9'}.oi-share-boxed:before{content:'\e0ba'}.oi-share:before{content:'\e0bb'}.oi-shield:before{content:'\e0bc'}.oi-signal:before{content:'\e0bd'}.oi-signpost:before{content:'\e0be'}.oi-sort-ascending:before{content:'\e0bf'}.oi-sort-descending:before{content:'\e0c0'}.oi-spreadsheet:before{content:'\e0c1'}.oi-star:before{content:'\e0c2'}.oi-sun:before{content:'\e0c3'}.oi-tablet:before{content:'\e0c4'}.oi-tag:before{content:'\e0c5'}.oi-tags:before{content:'\e0c6'}.oi-target:before{content:'\e0c7'}.oi-task:before{content:'\e0c8'}.oi-terminal:before{content:'\e0c9'}.oi-text:before{content:'\e0ca'}.oi-thumb-down:before{content:'\e0cb'}.oi-thumb-up:before{content:'\e0cc'}.oi-timer:before{content:'\e0cd'}.oi-transfer:before{content:'\e0ce'}.oi-trash:before{content:'\e0cf'}.oi-underline:before{content:'\e0d0'}.oi-vertical-align-bottom:before{content:'\e0d1'}.oi-vertical-align-center:before{content:'\e0d2'}.oi-vertical-align-top:before{content:'\e0d3'}.oi-video:before{content:'\e0d4'}.oi-volume-high:before{content:'\e0d5'}.oi-volume-low:before{content:'\e0d6'}.oi-volume-off:before{content:'\e0d7'}.oi-warning:before{content:'\e0d8'}.oi-wifi:before{content:'\e0d9'}.oi-wrench:before{content:'\e0da'}.oi-x:before{content:'\e0db'}.oi-yen:before{content:'\e0dc'}.oi-zoom-in:before{content:'\e0dd'}.oi-zoom-out:before{content:'\e0de'} -------------------------------------------------------------------------------- /BlazorInputMask/wwwroot/css/open-iconic/font/fonts/open-iconic.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raphadesa/BlazorInputMask/507bac04e5493a88de23e14a1e7ec2d07001cc03/BlazorInputMask/wwwroot/css/open-iconic/font/fonts/open-iconic.eot -------------------------------------------------------------------------------- /BlazorInputMask/wwwroot/css/open-iconic/font/fonts/open-iconic.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raphadesa/BlazorInputMask/507bac04e5493a88de23e14a1e7ec2d07001cc03/BlazorInputMask/wwwroot/css/open-iconic/font/fonts/open-iconic.otf -------------------------------------------------------------------------------- /BlazorInputMask/wwwroot/css/open-iconic/font/fonts/open-iconic.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | Created by FontForge 20120731 at Tue Jul 1 20:39:22 2014 9 | By P.J. Onori 10 | Created by P.J. Onori with FontForge 2.0 (http://fontforge.sf.net) 11 | 12 | 13 | 14 | 27 | 28 | 30 | 32 | 34 | 36 | 38 | 40 | 42 | 45 | 47 | 49 | 51 | 53 | 55 | 57 | 59 | 61 | 63 | 65 | 67 | 69 | 71 | 74 | 76 | 79 | 81 | 84 | 86 | 88 | 91 | 93 | 95 | 98 | 100 | 102 | 104 | 106 | 109 | 112 | 115 | 117 | 121 | 123 | 125 | 127 | 130 | 132 | 134 | 136 | 138 | 141 | 143 | 145 | 147 | 149 | 151 | 153 | 155 | 157 | 159 | 162 | 165 | 167 | 169 | 172 | 174 | 177 | 179 | 181 | 183 | 185 | 189 | 191 | 194 | 196 | 198 | 200 | 202 | 205 | 207 | 209 | 211 | 213 | 215 | 218 | 220 | 222 | 224 | 226 | 228 | 230 | 232 | 234 | 236 | 238 | 241 | 243 | 245 | 247 | 249 | 251 | 253 | 256 | 259 | 261 | 263 | 265 | 267 | 269 | 272 | 274 | 276 | 280 | 282 | 285 | 287 | 289 | 292 | 295 | 298 | 300 | 302 | 304 | 306 | 309 | 312 | 314 | 316 | 318 | 320 | 322 | 324 | 326 | 330 | 334 | 338 | 340 | 343 | 345 | 347 | 349 | 351 | 353 | 355 | 358 | 360 | 363 | 365 | 367 | 369 | 371 | 373 | 375 | 377 | 379 | 381 | 383 | 386 | 388 | 390 | 392 | 394 | 396 | 399 | 401 | 404 | 406 | 408 | 410 | 412 | 414 | 416 | 419 | 421 | 423 | 425 | 428 | 431 | 435 | 438 | 440 | 442 | 444 | 446 | 448 | 451 | 453 | 455 | 457 | 460 | 462 | 464 | 466 | 468 | 471 | 473 | 477 | 479 | 481 | 483 | 486 | 488 | 490 | 492 | 494 | 496 | 499 | 501 | 504 | 506 | 509 | 512 | 515 | 517 | 520 | 522 | 524 | 526 | 529 | 532 | 534 | 536 | 539 | 542 | 543 | 544 | -------------------------------------------------------------------------------- /BlazorInputMask/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raphadesa/BlazorInputMask/507bac04e5493a88de23e14a1e7ec2d07001cc03/BlazorInputMask/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf -------------------------------------------------------------------------------- /BlazorInputMask/wwwroot/css/open-iconic/font/fonts/open-iconic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raphadesa/BlazorInputMask/507bac04e5493a88de23e14a1e7ec2d07001cc03/BlazorInputMask/wwwroot/css/open-iconic/font/fonts/open-iconic.woff -------------------------------------------------------------------------------- /BlazorInputMask/wwwroot/css/site.css: -------------------------------------------------------------------------------- 1 | @import url('open-iconic/font/css/open-iconic-bootstrap.min.css'); 2 | 3 | html, body { 4 | font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; 5 | } 6 | 7 | a, .btn-link { 8 | color: #0366d6; 9 | } 10 | 11 | .btn-primary { 12 | color: #fff; 13 | background-color: #1b6ec2; 14 | border-color: #1861ac; 15 | } 16 | 17 | app { 18 | position: relative; 19 | display: flex; 20 | flex-direction: column; 21 | } 22 | 23 | .top-row { 24 | height: 3.5rem; 25 | display: flex; 26 | align-items: center; 27 | } 28 | 29 | .main { 30 | flex: 1; 31 | } 32 | 33 | .main .top-row { 34 | background-color: #f7f7f7; 35 | border-bottom: 1px solid #d6d5d5; 36 | justify-content: flex-end; 37 | } 38 | 39 | .main .top-row > a, .main .top-row .btn-link { 40 | white-space: nowrap; 41 | margin-left: 1.5rem; 42 | } 43 | 44 | .main .top-row a:first-child { 45 | overflow: hidden; 46 | text-overflow: ellipsis; 47 | } 48 | 49 | .sidebar { 50 | background-image: linear-gradient(180deg, rgb(5, 39, 103) 0%, #3a0647 70%); 51 | } 52 | 53 | .sidebar .top-row { 54 | background-color: rgba(0,0,0,0.4); 55 | } 56 | 57 | .sidebar .navbar-brand { 58 | font-size: 1.1rem; 59 | } 60 | 61 | .sidebar .oi { 62 | width: 2rem; 63 | font-size: 1.1rem; 64 | vertical-align: text-top; 65 | top: -2px; 66 | } 67 | 68 | .sidebar .nav-item { 69 | font-size: 0.9rem; 70 | padding-bottom: 0.5rem; 71 | } 72 | 73 | .sidebar .nav-item:first-of-type { 74 | padding-top: 1rem; 75 | } 76 | 77 | .sidebar .nav-item:last-of-type { 78 | padding-bottom: 1rem; 79 | } 80 | 81 | .sidebar .nav-item a { 82 | color: #d7d7d7; 83 | border-radius: 4px; 84 | height: 3rem; 85 | display: flex; 86 | align-items: center; 87 | line-height: 3rem; 88 | } 89 | 90 | .sidebar .nav-item a.active { 91 | background-color: rgba(255,255,255,0.25); 92 | color: white; 93 | } 94 | 95 | .sidebar .nav-item a:hover { 96 | background-color: rgba(255,255,255,0.1); 97 | color: white; 98 | } 99 | 100 | .content { 101 | padding-top: 1.1rem; 102 | } 103 | 104 | .navbar-toggler { 105 | background-color: rgba(255, 255, 255, 0.1); 106 | } 107 | 108 | .valid.modified:not([type=checkbox]) { 109 | outline: 1px solid #26b050; 110 | } 111 | 112 | .invalid { 113 | outline: 1px solid red; 114 | } 115 | 116 | .validation-message { 117 | color: red; 118 | } 119 | 120 | #blazor-error-ui { 121 | background: lightyellow; 122 | bottom: 0; 123 | box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2); 124 | display: none; 125 | left: 0; 126 | padding: 0.6rem 1.25rem 0.7rem 1.25rem; 127 | position: fixed; 128 | width: 100%; 129 | z-index: 1000; 130 | } 131 | 132 | #blazor-error-ui .dismiss { 133 | cursor: pointer; 134 | position: absolute; 135 | right: 0.75rem; 136 | top: 0.5rem; 137 | } 138 | 139 | @media (max-width: 767.98px) { 140 | .main .top-row:not(.auth) { 141 | display: none; 142 | } 143 | 144 | .main .top-row.auth { 145 | justify-content: space-between; 146 | } 147 | 148 | .main .top-row a, .main .top-row .btn-link { 149 | margin-left: 0; 150 | } 151 | } 152 | 153 | @media (min-width: 768px) { 154 | app { 155 | flex-direction: row; 156 | } 157 | 158 | .sidebar { 159 | width: 250px; 160 | height: 100vh; 161 | position: sticky; 162 | top: 0; 163 | } 164 | 165 | .main .top-row { 166 | position: sticky; 167 | top: 0; 168 | } 169 | 170 | .main > div { 171 | padding-left: 2rem !important; 172 | padding-right: 1.5rem !important; 173 | } 174 | 175 | .navbar-toggler { 176 | display: none; 177 | } 178 | 179 | .sidebar .collapse { 180 | /* Never collapse the sidebar for wide screens */ 181 | display: block; 182 | } 183 | } 184 | -------------------------------------------------------------------------------- /BlazorInputMask/wwwroot/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/raphadesa/BlazorInputMask/507bac04e5493a88de23e14a1e7ec2d07001cc03/BlazorInputMask/wwwroot/favicon.ico -------------------------------------------------------------------------------- /BlazorInputMask/wwwroot/js/IMask.js: -------------------------------------------------------------------------------- 1 | !function (t, e) { "object" == typeof exports && "undefined" != typeof module ? e(exports) : "function" == typeof define && define.amd ? define(["exports"], e) : e((t = "undefined" != typeof globalThis ? globalThis : t || self).IMask = {}) }(this, (function (t) { "use strict"; var e = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}, n = function (t) { return t && t.Math == Math && t }, i = n("object" == typeof globalThis && globalThis) || n("object" == typeof window && window) || n("object" == typeof self && self) || n("object" == typeof e && e) || function () { return this }() || Function("return this")(), r = {}, u = function (t) { try { return !!t() } catch (t) { return !0 } }, s = !u((function () { return 7 != Object.defineProperty({}, 1, { get: function () { return 7 } })[1] })), a = !u((function () { var t = function () { }.bind(); return "function" != typeof t || t.hasOwnProperty("prototype") })), o = a, l = Function.prototype.call, h = o ? l.bind(l) : function () { return l.apply(l, arguments) }, c = {}, f = {}.propertyIsEnumerable, p = Object.getOwnPropertyDescriptor, d = p && !f.call({ 1: 2 }, 1); c.f = d ? function (t) { var e = p(this, t); return !!e && e.enumerable } : f; var v, g, k = function (t, e) { return { enumerable: !(1 & t), configurable: !(2 & t), writable: !(4 & t), value: e } }, y = a, m = Function.prototype, b = m.bind, _ = m.call, A = y && b.bind(_, _), C = y ? function (t) { return t && A(t) } : function (t) { return t && function () { return _.apply(t, arguments) } }, E = C, F = E({}.toString), S = E("".slice), w = function (t) { return S(F(t), 8, -1) }, B = C, D = u, x = w, M = i.Object, O = B("".split), P = D((function () { return !M("z").propertyIsEnumerable(0) })) ? function (t) { return "String" == x(t) ? O(t, "") : M(t) } : M, T = i.TypeError, I = function (t) { if (null == t) throw T("Can't call method on " + t); return t }, j = P, R = I, V = function (t) { return j(R(t)) }, L = function (t) { return "function" == typeof t }, N = L, U = function (t) { return "object" == typeof t ? null !== t : N(t) }, z = i, q = L, H = function (t) { return q(t) ? t : void 0 }, Y = function (t, e) { return arguments.length < 2 ? H(z[t]) : z[t] && z[t][e] }, Z = C({}.isPrototypeOf), G = Y("navigator", "userAgent") || "", K = i, $ = G, W = K.process, X = K.Deno, J = W && W.versions || X && X.version, Q = J && J.v8; Q && (g = (v = Q.split("."))[0] > 0 && v[0] < 4 ? 1 : +(v[0] + v[1])), !g && $ && (!(v = $.match(/Edge\/(\d+)/)) || v[1] >= 74) && (v = $.match(/Chrome\/(\d+)/)) && (g = +v[1]); var tt = g, et = u, nt = !!Object.getOwnPropertySymbols && !et((function () { var t = Symbol(); return !String(t) || !(Object(t) instanceof Symbol) || !Symbol.sham && tt && tt < 41 })), it = nt && !Symbol.sham && "symbol" == typeof Symbol.iterator, rt = Y, ut = L, st = Z, at = it, ot = i.Object, lt = at ? function (t) { return "symbol" == typeof t } : function (t) { var e = rt("Symbol"); return ut(e) && st(e.prototype, ot(t)) }, ht = i.String, ct = L, ft = function (t) { try { return ht(t) } catch (t) { return "Object" } }, pt = i.TypeError, dt = function (t) { if (ct(t)) return t; throw pt(ft(t) + " is not a function") }, vt = h, gt = L, kt = U, yt = i.TypeError, mt = { exports: {} }, bt = i, _t = Object.defineProperty, At = function (t, e) { try { _t(bt, t, { value: e, configurable: !0, writable: !0 }) } catch (n) { bt[t] = e } return e }, Ct = At, Et = "__core-js_shared__", Ft = i[Et] || Ct(Et, {}), St = Ft; (mt.exports = function (t, e) { return St[t] || (St[t] = void 0 !== e ? e : {}) })("versions", []).push({ version: "3.21.0", mode: "global", copyright: "© 2014-2022 Denis Pushkarev (zloirock.ru)", license: "https://github.com/zloirock/core-js/blob/v3.21.0/LICENSE", source: "https://github.com/zloirock/core-js" }); var wt = I, Bt = i.Object, Dt = function (t) { return Bt(wt(t)) }, xt = Dt, Mt = C({}.hasOwnProperty), Ot = Object.hasOwn || function (t, e) { return Mt(xt(t), e) }, Pt = C, Tt = 0, It = Math.random(), jt = Pt(1..toString), Rt = function (t) { return "Symbol(" + (void 0 === t ? "" : t) + ")_" + jt(++Tt + It, 36) }, Vt = i, Lt = mt.exports, Nt = Ot, Ut = Rt, zt = nt, qt = it, Ht = Lt("wks"), Yt = Vt.Symbol, Zt = Yt && Yt.for, Gt = qt ? Yt : Yt && Yt.withoutSetter || Ut, Kt = function (t) { if (!Nt(Ht, t) || !zt && "string" != typeof Ht[t]) { var e = "Symbol." + t; zt && Nt(Yt, t) ? Ht[t] = Yt[t] : Ht[t] = qt && Zt ? Zt(e) : Gt(e) } return Ht[t] }, $t = h, Wt = U, Xt = lt, Jt = function (t, e) { var n = t[e]; return null == n ? void 0 : dt(n) }, Qt = function (t, e) { var n, i; if ("string" === e && gt(n = t.toString) && !kt(i = vt(n, t))) return i; if (gt(n = t.valueOf) && !kt(i = vt(n, t))) return i; if ("string" !== e && gt(n = t.toString) && !kt(i = vt(n, t))) return i; throw yt("Can't convert object to primitive value") }, te = Kt, ee = i.TypeError, ne = te("toPrimitive"), ie = function (t, e) { if (!Wt(t) || Xt(t)) return t; var n, i = Jt(t, ne); if (i) { if (void 0 === e && (e = "default"), n = $t(i, t, e), !Wt(n) || Xt(n)) return n; throw ee("Can't convert object to primitive value") } return void 0 === e && (e = "number"), Qt(t, e) }, re = lt, ue = function (t) { var e = ie(t, "string"); return re(e) ? e : e + "" }, se = U, ae = i.document, oe = se(ae) && se(ae.createElement), le = function (t) { return oe ? ae.createElement(t) : {} }, he = !s && !u((function () { return 7 != Object.defineProperty(le("div"), "a", { get: function () { return 7 } }).a })), ce = s, fe = h, pe = c, de = k, ve = V, ge = ue, ke = Ot, ye = he, me = Object.getOwnPropertyDescriptor; r.f = ce ? me : function (t, e) { if (t = ve(t), e = ge(e), ye) try { return me(t, e) } catch (t) { } if (ke(t, e)) return de(!fe(pe.f, t, e), t[e]) }; var be = {}, _e = s && u((function () { return 42 != Object.defineProperty((function () { }), "prototype", { value: 42, writable: !1 }).prototype })), Ae = i, Ce = U, Ee = Ae.String, Fe = Ae.TypeError, Se = function (t) { if (Ce(t)) return t; throw Fe(Ee(t) + " is not an object") }, we = s, Be = he, De = _e, xe = Se, Me = ue, Oe = i.TypeError, Pe = Object.defineProperty, Te = Object.getOwnPropertyDescriptor, Ie = "enumerable", je = "configurable", Re = "writable"; be.f = we ? De ? function (t, e, n) { if (xe(t), e = Me(e), xe(n), "function" == typeof t && "prototype" === e && "value" in n && Re in n && !n.writable) { var i = Te(t, e); i && i.writable && (t[e] = n.value, n = { configurable: je in n ? n.configurable : i.configurable, enumerable: Ie in n ? n.enumerable : i.enumerable, writable: !1 }) } return Pe(t, e, n) } : Pe : function (t, e, n) { if (xe(t), e = Me(e), xe(n), Be) try { return Pe(t, e, n) } catch (t) { } if ("get" in n || "set" in n) throw Oe("Accessors not supported"); return "value" in n && (t[e] = n.value), t }; var Ve = be, Le = k, Ne = s ? function (t, e, n) { return Ve.f(t, e, Le(1, n)) } : function (t, e, n) { return t[e] = n, t }, Ue = { exports: {} }, ze = L, qe = Ft, He = C(Function.toString); ze(qe.inspectSource) || (qe.inspectSource = function (t) { return He(t) }); var Ye, Ze, Ge, Ke = qe.inspectSource, $e = L, We = Ke, Xe = i.WeakMap, Je = $e(Xe) && /native code/.test(We(Xe)), Qe = mt.exports, tn = Rt, en = Qe("keys"), nn = {}, rn = Je, un = i, sn = C, an = U, on = Ne, ln = Ot, hn = Ft, cn = function (t) { return en[t] || (en[t] = tn(t)) }, fn = nn, pn = "Object already initialized", dn = un.TypeError, vn = un.WeakMap; if (rn || hn.state) { var gn = hn.state || (hn.state = new vn), kn = sn(gn.get), yn = sn(gn.has), mn = sn(gn.set); Ye = function (t, e) { if (yn(gn, t)) throw new dn(pn); return e.facade = t, mn(gn, t, e), e }, Ze = function (t) { return kn(gn, t) || {} }, Ge = function (t) { return yn(gn, t) } } else { var bn = cn("state"); fn[bn] = !0, Ye = function (t, e) { if (ln(t, bn)) throw new dn(pn); return e.facade = t, on(t, bn, e), e }, Ze = function (t) { return ln(t, bn) ? t[bn] : {} }, Ge = function (t) { return ln(t, bn) } } var _n = { set: Ye, get: Ze, has: Ge, enforce: function (t) { return Ge(t) ? Ze(t) : Ye(t, {}) }, getterFor: function (t) { return function (e) { var n; if (!an(e) || (n = Ze(e)).type !== t) throw dn("Incompatible receiver, " + t + " required"); return n } } }, An = s, Cn = Ot, En = Function.prototype, Fn = An && Object.getOwnPropertyDescriptor, Sn = Cn(En, "name"), wn = Sn && "something" === function () { }.name, Bn = Sn && (!An || An && Fn(En, "name").configurable), Dn = i, xn = L, Mn = Ot, On = Ne, Pn = At, Tn = Ke, In = { EXISTS: Sn, PROPER: wn, CONFIGURABLE: Bn }.CONFIGURABLE, jn = _n.get, Rn = _n.enforce, Vn = String(String).split("String"); (Ue.exports = function (t, e, n, i) { var r, u = !!i && !!i.unsafe, s = !!i && !!i.enumerable, a = !!i && !!i.noTargetGet, o = i && void 0 !== i.name ? i.name : e; xn(n) && ("Symbol(" === String(o).slice(0, 7) && (o = "[" + String(o).replace(/^Symbol\(([^)]*)\)/, "$1") + "]"), (!Mn(n, "name") || In && n.name !== o) && On(n, "name", o), (r = Rn(n)).source || (r.source = Vn.join("string" == typeof o ? o : ""))), t !== Dn ? (u ? !a && t[e] && (s = !0) : delete t[e], s ? t[e] = n : On(t, e, n)) : s ? t[e] = n : Pn(e, n) })(Function.prototype, "toString", (function () { return xn(this) && jn(this).source || Tn(this) })); var Ln = {}, Nn = Math.ceil, Un = Math.floor, zn = function (t) { var e = +t; return e != e || 0 === e ? 0 : (e > 0 ? Un : Nn)(e) }, qn = zn, Hn = Math.max, Yn = Math.min, Zn = zn, Gn = Math.min, Kn = function (t) { return t > 0 ? Gn(Zn(t), 9007199254740991) : 0 }, $n = Kn, Wn = V, Xn = function (t, e) { var n = qn(t); return n < 0 ? Hn(n + e, 0) : Yn(n, e) }, Jn = function (t) { return $n(t.length) }, Qn = function (t) { return function (e, n, i) { var r, u = Wn(e), s = Jn(u), a = Xn(i, s); if (t && n != n) { for (; s > a;)if ((r = u[a++]) != r) return !0 } else for (; s > a; a++)if ((t || a in u) && u[a] === n) return t || a || 0; return !t && -1 } }, ti = { includes: Qn(!0), indexOf: Qn(!1) }, ei = Ot, ni = V, ii = ti.indexOf, ri = nn, ui = C([].push), si = function (t, e) { var n, i = ni(t), r = 0, u = []; for (n in i) !ei(ri, n) && ei(i, n) && ui(u, n); for (; e.length > r;)ei(i, n = e[r++]) && (~ii(u, n) || ui(u, n)); return u }, ai = ["constructor", "hasOwnProperty", "isPrototypeOf", "propertyIsEnumerable", "toLocaleString", "toString", "valueOf"], oi = si, li = ai.concat("length", "prototype"); Ln.f = Object.getOwnPropertyNames || function (t) { return oi(t, li) }; var hi = {}; hi.f = Object.getOwnPropertySymbols; var ci = Y, fi = Ln, pi = hi, di = Se, vi = C([].concat), gi = ci("Reflect", "ownKeys") || function (t) { var e = fi.f(di(t)), n = pi.f; return n ? vi(e, n(t)) : e }, ki = Ot, yi = gi, mi = r, bi = be, _i = u, Ai = L, Ci = /#|\.prototype\./, Ei = function (t, e) { var n = Si[Fi(t)]; return n == Bi || n != wi && (Ai(e) ? _i(e) : !!e) }, Fi = Ei.normalize = function (t) { return String(t).replace(Ci, ".").toLowerCase() }, Si = Ei.data = {}, wi = Ei.NATIVE = "N", Bi = Ei.POLYFILL = "P", Di = Ei, xi = i, Mi = r.f, Oi = Ne, Pi = Ue.exports, Ti = At, Ii = function (t, e, n) { for (var i = yi(e), r = bi.f, u = mi.f, s = 0; s < i.length; s++) { var a = i[s]; ki(t, a) || n && ki(n, a) || r(t, a, u(e, a)) } }, ji = Di, Ri = function (t, e) { var n, i, r, u, s, a = t.target, o = t.global, l = t.stat; if (n = o ? xi : l ? xi[a] || Ti(a, {}) : (xi[a] || {}).prototype) for (i in e) { if (u = e[i], r = t.noTargetGet ? (s = Mi(n, i)) && s.value : n[i], !ji(o ? i : a + (l ? "." : "#") + i, t.forced) && void 0 !== r) { if (typeof u == typeof r) continue; Ii(u, r) } (t.sham || r && r.sham) && Oi(u, "sham", !0), Pi(n, i, u, t) } }, Vi = si, Li = ai, Ni = Object.keys || function (t) { return Vi(t, Li) }, Ui = s, zi = C, qi = h, Hi = u, Yi = Ni, Zi = hi, Gi = c, Ki = Dt, $i = P, Wi = Object.assign, Xi = Object.defineProperty, Ji = zi([].concat), Qi = !Wi || Hi((function () { if (Ui && 1 !== Wi({ b: 1 }, Wi(Xi({}, "a", { enumerable: !0, get: function () { Xi(this, "b", { value: 3, enumerable: !1 }) } }), { b: 2 })).b) return !0; var t = {}, e = {}, n = Symbol(), i = "abcdefghijklmnopqrst"; return t[n] = 7, i.split("").forEach((function (t) { e[t] = t })), 7 != Wi({}, t)[n] || Yi(Wi({}, e)).join("") != i })) ? function (t, e) { for (var n = Ki(t), i = arguments.length, r = 1, u = Zi.f, s = Gi.f; i > r;)for (var a, o = $i(arguments[r++]), l = u ? Ji(Yi(o), u(o)) : Yi(o), h = l.length, c = 0; h > c;)a = l[c++], Ui && !qi(s, o, a) || (n[a] = o[a]); return n } : Wi, tr = Qi; Ri({ target: "Object", stat: !0, forced: Object.assign !== tr }, { assign: tr }); var er = {}; er[Kt("toStringTag")] = "z"; var nr = i, ir = "[object z]" === String(er), rr = L, ur = w, sr = Kt("toStringTag"), ar = nr.Object, or = "Arguments" == ur(function () { return arguments }()), lr = ir ? ur : function (t) { var e, n, i; return void 0 === t ? "Undefined" : null === t ? "Null" : "string" == typeof (n = function (t, e) { try { return t[e] } catch (t) { } }(e = ar(t), sr)) ? n : or ? ur(e) : "Object" == (i = ur(e)) && rr(e.callee) ? "Arguments" : i }, hr = i.String, cr = function (t) { if ("Symbol" === lr(t)) throw TypeError("Cannot convert a Symbol value to a string"); return hr(t) }, fr = zn, pr = cr, dr = I, vr = i.RangeError, gr = function (t) { var e = pr(dr(this)), n = "", i = fr(t); if (i < 0 || i == 1 / 0) throw vr("Wrong number of repetitions"); for (; i > 0; (i >>>= 1) && (e += e))1 & i && (n += e); return n }; Ri({ target: "String", proto: !0 }, { repeat: gr }); var kr = C, yr = Kn, mr = cr, br = I, _r = kr(gr), Ar = kr("".slice), Cr = Math.ceil, Er = function (t) { return function (e, n, i) { var r, u, s = mr(br(e)), a = yr(n), o = s.length, l = void 0 === i ? " " : mr(i); return a <= o || "" == l ? s : ((u = _r(l, Cr((r = a - o) / l.length))).length > r && (u = Ar(u, 0, r)), t ? s + u : u + s) } }, Fr = { start: Er(!1), end: Er(!0) }, Sr = /Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(G), wr = Fr.start; Ri({ target: "String", proto: !0, forced: Sr }, { padStart: function (t) { return wr(this, t, arguments.length > 1 ? arguments[1] : void 0) } }); var Br = Fr.end; function Dr(t) { return Dr = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (t) { return typeof t } : function (t) { return t && "function" == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t }, Dr(t) } function xr(t, e) { if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function") } function Mr(t, e) { for (var n = 0; n < e.length; n++) { var i = e[n]; i.enumerable = i.enumerable || !1, i.configurable = !0, "value" in i && (i.writable = !0), Object.defineProperty(t, i.key, i) } } function Or(t, e, n) { return e && Mr(t.prototype, e), n && Mr(t, n), Object.defineProperty(t, "prototype", { writable: !1 }), t } function Pr(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && Ir(t, e) } function Tr(t) { return Tr = Object.setPrototypeOf ? Object.getPrototypeOf : function (t) { return t.__proto__ || Object.getPrototypeOf(t) }, Tr(t) } function Ir(t, e) { return Ir = Object.setPrototypeOf || function (t, e) { return t.__proto__ = e, t }, Ir(t, e) } function jr(t, e) { if (null == t) return {}; var n, i, r = function (t, e) { if (null == t) return {}; var n, i, r = {}, u = Object.keys(t); for (i = 0; i < u.length; i++)n = u[i], e.indexOf(n) >= 0 || (r[n] = t[n]); return r }(t, e); if (Object.getOwnPropertySymbols) { var u = Object.getOwnPropertySymbols(t); for (i = 0; i < u.length; i++)n = u[i], e.indexOf(n) >= 0 || Object.prototype.propertyIsEnumerable.call(t, n) && (r[n] = t[n]) } return r } function Rr(t, e) { if (e && ("object" == typeof e || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return function (t) { if (void 0 === t) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return t }(t) } function Vr(t) { var e = function () { if ("undefined" == typeof Reflect || !Reflect.construct) return !1; if (Reflect.construct.sham) return !1; if ("function" == typeof Proxy) return !0; try { return Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], (function () { }))), !0 } catch (t) { return !1 } }(); return function () { var n, i = Tr(t); if (e) { var r = Tr(this).constructor; n = Reflect.construct(i, arguments, r) } else n = i.apply(this, arguments); return Rr(this, n) } } function Lr(t, e) { for (; !Object.prototype.hasOwnProperty.call(t, e) && null !== (t = Tr(t));); return t } function Nr() { return Nr = "undefined" != typeof Reflect && Reflect.get ? Reflect.get : function (t, e, n) { var i = Lr(t, e); if (i) { var r = Object.getOwnPropertyDescriptor(i, e); return r.get ? r.get.call(arguments.length < 3 ? t : n) : r.value } }, Nr.apply(this, arguments) } function Ur(t, e, n, i) { return Ur = "undefined" != typeof Reflect && Reflect.set ? Reflect.set : function (t, e, n, i) { var r, u = Lr(t, e); if (u) { if ((r = Object.getOwnPropertyDescriptor(u, e)).set) return r.set.call(i, n), !0; if (!r.writable) return !1 } if (r = Object.getOwnPropertyDescriptor(i, e)) { if (!r.writable) return !1; r.value = n, Object.defineProperty(i, e, r) } else !function (t, e, n) { e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n }(i, e, n); return !0 }, Ur(t, e, n, i) } function zr(t, e, n, i, r) { if (!Ur(t, e, n, i || t) && r) throw new Error("failed to set property"); return n } function qr(t, e) { return function (t) { if (Array.isArray(t)) return t }(t) || function (t, e) { var n = null == t ? null : "undefined" != typeof Symbol && t[Symbol.iterator] || t["@@iterator"]; if (null == n) return; var i, r, u = [], s = !0, a = !1; try { for (n = n.call(t); !(s = (i = n.next()).done) && (u.push(i.value), !e || u.length !== e); s = !0); } catch (t) { a = !0, r = t } finally { try { s || null == n.return || n.return() } finally { if (a) throw r } } return u }(t, e) || function (t, e) { if (!t) return; if ("string" == typeof t) return Hr(t, e); var n = Object.prototype.toString.call(t).slice(8, -1); "Object" === n && t.constructor && (n = t.constructor.name); if ("Map" === n || "Set" === n) return Array.from(t); if ("Arguments" === n || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return Hr(t, e) }(t, e) || function () { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.") }() } function Hr(t, e) { (null == e || e > t.length) && (e = t.length); for (var n = 0, i = new Array(e); n < e; n++)i[n] = t[n]; return i } Ri({ target: "String", proto: !0, forced: Sr }, { padEnd: function (t) { return Br(this, t, arguments.length > 1 ? arguments[1] : void 0) } }), Ri({ global: !0 }, { globalThis: i }); var Yr = function () { function t(e) { xr(this, t), Object.assign(this, { inserted: "", rawInserted: "", skip: !1, tailShift: 0 }, e) } return Or(t, [{ key: "aggregate", value: function (t) { return this.rawInserted += t.rawInserted, this.skip = this.skip || t.skip, this.inserted += t.inserted, this.tailShift += t.tailShift, this } }, { key: "offset", get: function () { return this.tailShift + this.inserted.length } }]), t }(); function Zr(t) { return "string" == typeof t || t instanceof String } var Gr = "NONE", Kr = "LEFT", $r = "FORCE_LEFT", Wr = "RIGHT", Xr = "FORCE_RIGHT"; function Jr(t) { return t.replace(/([.*+?^=!:${}()|[\]\/\\])/g, "\\$1") } function Qr(t) { return Array.isArray(t) ? t : [t, new Yr] } function tu(t, e) { if (e === t) return !0; var n, i = Array.isArray(e), r = Array.isArray(t); if (i && r) { if (e.length != t.length) return !1; for (n = 0; n < e.length; n++)if (!tu(e[n], t[n])) return !1; return !0 } if (i != r) return !1; if (e && t && "object" === Dr(e) && "object" === Dr(t)) { var u = e instanceof Date, s = t instanceof Date; if (u && s) return e.getTime() == t.getTime(); if (u != s) return !1; var a = e instanceof RegExp, o = t instanceof RegExp; if (a && o) return e.toString() == t.toString(); if (a != o) return !1; var l = Object.keys(e); for (n = 0; n < l.length; n++)if (!Object.prototype.hasOwnProperty.call(t, l[n])) return !1; for (n = 0; n < l.length; n++)if (!tu(t[l[n]], e[l[n]])) return !1; return !0 } return !(!e || !t || "function" != typeof e || "function" != typeof t) && e.toString() === t.toString() } var eu = function () { function t(e, n, i, r) { for (xr(this, t), this.value = e, this.cursorPos = n, this.oldValue = i, this.oldSelection = r; this.value.slice(0, this.startChangePos) !== this.oldValue.slice(0, this.startChangePos);)--this.oldSelection.start } return Or(t, [{ key: "startChangePos", get: function () { return Math.min(this.cursorPos, this.oldSelection.start) } }, { key: "insertedCount", get: function () { return this.cursorPos - this.startChangePos } }, { key: "inserted", get: function () { return this.value.substr(this.startChangePos, this.insertedCount) } }, { key: "removedCount", get: function () { return Math.max(this.oldSelection.end - this.startChangePos || this.oldValue.length - this.value.length, 0) } }, { key: "removed", get: function () { return this.oldValue.substr(this.startChangePos, this.removedCount) } }, { key: "head", get: function () { return this.value.substring(0, this.startChangePos) } }, { key: "tail", get: function () { return this.value.substring(this.startChangePos + this.insertedCount) } }, { key: "removeDirection", get: function () { return !this.removedCount || this.insertedCount ? Gr : this.oldSelection.end !== this.cursorPos && this.oldSelection.start !== this.cursorPos || this.oldSelection.end !== this.oldSelection.start ? Kr : Wr } }]), t }(), nu = function () { function t() { var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : "", n = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 0, i = arguments.length > 2 ? arguments[2] : void 0; xr(this, t), this.value = e, this.from = n, this.stop = i } return Or(t, [{ key: "toString", value: function () { return this.value } }, { key: "extend", value: function (t) { this.value += String(t) } }, { key: "appendTo", value: function (t) { return t.append(this.toString(), { tail: !0 }).aggregate(t._appendPlaceholder()) } }, { key: "state", get: function () { return { value: this.value, from: this.from, stop: this.stop } }, set: function (t) { Object.assign(this, t) } }, { key: "unshift", value: function (t) { if (!this.value.length || null != t && this.from >= t) return ""; var e = this.value[0]; return this.value = this.value.slice(1), e } }, { key: "shift", value: function () { if (!this.value.length) return ""; var t = this.value[this.value.length - 1]; return this.value = this.value.slice(0, -1), t } }]), t }(); function iu(t) { var e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}; return new iu.InputMask(t, e) } var ru = function () { function t(e) { xr(this, t), this._value = "", this._update(Object.assign({}, t.DEFAULTS, e)), this.isInitialized = !0 } return Or(t, [{ key: "updateOptions", value: function (t) { Object.keys(t).length && this.withValueRefresh(this._update.bind(this, t)) } }, { key: "_update", value: function (t) { Object.assign(this, t) } }, { key: "state", get: function () { return { _value: this.value } }, set: function (t) { this._value = t._value } }, { key: "reset", value: function () { this._value = "" } }, { key: "value", get: function () { return this._value }, set: function (t) { this.resolve(t) } }, { key: "resolve", value: function (t) { return this.reset(), this.append(t, { input: !0 }, ""), this.doCommit(), this.value } }, { key: "unmaskedValue", get: function () { return this.value }, set: function (t) { this.reset(), this.append(t, {}, ""), this.doCommit() } }, { key: "typedValue", get: function () { return this.doParse(this.value) }, set: function (t) { this.value = this.doFormat(t) } }, { key: "rawInputValue", get: function () { return this.extractInput(0, this.value.length, { raw: !0 }) }, set: function (t) { this.reset(), this.append(t, { raw: !0 }, ""), this.doCommit() } }, { key: "isComplete", get: function () { return !0 } }, { key: "isFilled", get: function () { return this.isComplete } }, { key: "nearestInputPos", value: function (t, e) { return t } }, { key: "extractInput", value: function () { var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 0, e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : this.value.length; return this.value.slice(t, e) } }, { key: "extractTail", value: function () { var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 0, e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : this.value.length; return new nu(this.extractInput(t, e), t) } }, { key: "appendTail", value: function (t) { return Zr(t) && (t = new nu(String(t))), t.appendTo(this) } }, { key: "_appendCharRaw", value: function (t) { return t ? (this._value += t, new Yr({ inserted: t, rawInserted: t })) : new Yr } }, { key: "_appendChar", value: function (t) { var e, n = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}, i = arguments.length > 2 ? arguments[2] : void 0, r = this.state, u = Qr(this.doPrepare(t, n)), s = qr(u, 2); if (t = s[0], (e = (e = s[1]).aggregate(this._appendCharRaw(t, n))).inserted) { var a, o = !1 !== this.doValidate(n); if (o && null != i) { var l = this.state; !0 === this.overwrite && (a = i.state, i.unshift(this.value.length)); var h = this.appendTail(i); (o = h.rawInserted === i.toString()) && h.inserted || "shift" !== this.overwrite || (this.state = l, a = i.state, i.shift(), o = (h = this.appendTail(i)).rawInserted === i.toString()), o && h.inserted && (this.state = l) } o || (e = new Yr, this.state = r, i && a && (i.state = a)) } return e } }, { key: "_appendPlaceholder", value: function () { return new Yr } }, { key: "_appendEager", value: function () { return new Yr } }, { key: "append", value: function (t, e, n) { if (!Zr(t)) throw new Error("value should be string"); var i = new Yr, r = Zr(n) ? new nu(String(n)) : n; e && e.tail && (e._beforeTailState = this.state); for (var u = 0; u < t.length; ++u)i.aggregate(this._appendChar(t[u], e, r)); return null != r && (i.tailShift += this.appendTail(r).tailShift), this.eager && null != e && e.input && t && i.aggregate(this._appendEager()), i } }, { key: "remove", value: function () { var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 0, e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : this.value.length; return this._value = this.value.slice(0, t) + this.value.slice(e), new Yr } }, { key: "withValueRefresh", value: function (t) { if (this._refreshing || !this.isInitialized) return t(); this._refreshing = !0; var e = this.rawInputValue, n = this.value, i = t(); return this.rawInputValue = e, this.value && this.value !== n && 0 === n.indexOf(this.value) && this.append(n.slice(this.value.length), {}, ""), delete this._refreshing, i } }, { key: "runIsolated", value: function (t) { if (this._isolated || !this.isInitialized) return t(this); this._isolated = !0; var e = this.state, n = t(this); return this.state = e, delete this._isolated, n } }, { key: "doPrepare", value: function (t) { var e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}; return this.prepare ? this.prepare(t, this, e) : t } }, { key: "doValidate", value: function (t) { return (!this.validate || this.validate(this.value, this, t)) && (!this.parent || this.parent.doValidate(t)) } }, { key: "doCommit", value: function () { this.commit && this.commit(this.value, this) } }, { key: "doFormat", value: function (t) { return this.format ? this.format(t, this) : t } }, { key: "doParse", value: function (t) { return this.parse ? this.parse(t, this) : t } }, { key: "splice", value: function (t, e, n, i) { var r, u = t + e, s = this.extractTail(u); this.eager && (i = function (t) { switch (t) { case Kr: return $r; case Wr: return Xr; default: return t } }(i), r = this.extractInput(0, u, { raw: !0 })); var a = this.nearestInputPos(t, e > 1 && 0 !== t && !this.eager ? Gr : i), o = new Yr({ tailShift: a - t }).aggregate(this.remove(a)); if (this.eager && i !== Gr && r === this.rawInputValue) if (i === $r) for (var l; r === this.rawInputValue && (l = this.value.length);)o.aggregate(new Yr({ tailShift: -1 })).aggregate(this.remove(l - 1)); else i === Xr && s.unshift(); return o.aggregate(this.append(n, { input: !0 }, s)) } }, { key: "maskEquals", value: function (t) { return this.mask === t } }]), t }(); function uu(t) { if (null == t) throw new Error("mask property should be defined"); return t instanceof RegExp ? iu.MaskedRegExp : Zr(t) ? iu.MaskedPattern : t instanceof Date || t === Date ? iu.MaskedDate : t instanceof Number || "number" == typeof t || t === Number ? iu.MaskedNumber : Array.isArray(t) || t === Array ? iu.MaskedDynamic : iu.Masked && t.prototype instanceof iu.Masked ? t : t instanceof iu.Masked ? t.constructor : t instanceof Function ? iu.MaskedFunction : (console.warn("Mask not found for mask", t), iu.Masked) } function su(t) { if (iu.Masked && t instanceof iu.Masked) return t; var e = (t = Object.assign({}, t)).mask; if (iu.Masked && e instanceof iu.Masked) return e; var n = uu(e); if (!n) throw new Error("Masked class is not found for provided mask, appropriate module needs to be import manually before creating mask."); return new n(t) } ru.DEFAULTS = { format: function (t) { return t }, parse: function (t) { return t } }, iu.Masked = ru, iu.createMask = su; var au = ["mask"], ou = { 0: /\d/, a: /[\u0041-\u005A\u0061-\u007A\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/, "*": /./ }, lu = function () { function t(e) { xr(this, t); var n = e.mask, i = jr(e, au); this.masked = su({ mask: n }), Object.assign(this, i) } return Or(t, [{ key: "reset", value: function () { this.isFilled = !1, this.masked.reset() } }, { key: "remove", value: function () { var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 0, e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : this.value.length; return 0 === t && e >= 1 ? (this.isFilled = !1, this.masked.remove(t, e)) : new Yr } }, { key: "value", get: function () { return this.masked.value || (this.isFilled && !this.isOptional ? this.placeholderChar : "") } }, { key: "unmaskedValue", get: function () { return this.masked.unmaskedValue } }, { key: "isComplete", get: function () { return Boolean(this.masked.value) || this.isOptional } }, { key: "_appendChar", value: function (t) { var e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}; if (this.isFilled) return new Yr; var n = this.masked.state, i = this.masked._appendChar(t, e); return i.inserted && !1 === this.doValidate(e) && (i.inserted = i.rawInserted = "", this.masked.state = n), i.inserted || this.isOptional || this.lazy || e.input || (i.inserted = this.placeholderChar), i.skip = !i.inserted && !this.isOptional, this.isFilled = Boolean(i.inserted), i } }, { key: "append", value: function () { var t; return (t = this.masked).append.apply(t, arguments) } }, { key: "_appendPlaceholder", value: function () { var t = new Yr; return this.isFilled || this.isOptional || (this.isFilled = !0, t.inserted = this.placeholderChar), t } }, { key: "_appendEager", value: function () { return new Yr } }, { key: "extractTail", value: function () { var t; return (t = this.masked).extractTail.apply(t, arguments) } }, { key: "appendTail", value: function () { var t; return (t = this.masked).appendTail.apply(t, arguments) } }, { key: "extractInput", value: function () { var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 0, e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : this.value.length, n = arguments.length > 2 ? arguments[2] : void 0; return this.masked.extractInput(t, e, n) } }, { key: "nearestInputPos", value: function (t) { var e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : Gr, n = 0, i = this.value.length, r = Math.min(Math.max(t, n), i); switch (e) { case Kr: case $r: return this.isComplete ? r : n; case Wr: case Xr: return this.isComplete ? r : i; default: return r } } }, { key: "doValidate", value: function () { var t, e; return (t = this.masked).doValidate.apply(t, arguments) && (!this.parent || (e = this.parent).doValidate.apply(e, arguments)) } }, { key: "doCommit", value: function () { this.masked.doCommit() } }, { key: "state", get: function () { return { masked: this.masked.state, isFilled: this.isFilled } }, set: function (t) { this.masked.state = t.masked, this.isFilled = t.isFilled } }]), t }(), hu = function () { function t(e) { xr(this, t), Object.assign(this, e), this._value = "", this.isFixed = !0 } return Or(t, [{ key: "value", get: function () { return this._value } }, { key: "unmaskedValue", get: function () { return this.isUnmasking ? this.value : "" } }, { key: "reset", value: function () { this._isRawInput = !1, this._value = "" } }, { key: "remove", value: function () { var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 0, e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : this._value.length; return this._value = this._value.slice(0, t) + this._value.slice(e), this._value || (this._isRawInput = !1), new Yr } }, { key: "nearestInputPos", value: function (t) { var e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : Gr, n = 0, i = this._value.length; switch (e) { case Kr: case $r: return n; default: return i } } }, { key: "extractInput", value: function () { var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 0, e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : this._value.length, n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {}; return n.raw && this._isRawInput && this._value.slice(t, e) || "" } }, { key: "isComplete", get: function () { return !0 } }, { key: "isFilled", get: function () { return Boolean(this._value) } }, { key: "_appendChar", value: function (t) { var e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}, n = new Yr; if (this._value) return n; var i = this.char === t, r = i && (this.isUnmasking || e.input || e.raw) && !this.eager && !e.tail; return r && (n.rawInserted = this.char), this._value = n.inserted = this.char, this._isRawInput = r && (e.raw || e.input), n } }, { key: "_appendEager", value: function () { return this._appendChar(this.char) } }, { key: "_appendPlaceholder", value: function () { var t = new Yr; return this._value || (this._value = t.inserted = this.char), t } }, { key: "extractTail", value: function () { return arguments.length > 1 && void 0 !== arguments[1] || this.value.length, new nu("") } }, { key: "appendTail", value: function (t) { return Zr(t) && (t = new nu(String(t))), t.appendTo(this) } }, { key: "append", value: function (t, e, n) { var i = this._appendChar(t[0], e); return null != n && (i.tailShift += this.appendTail(n).tailShift), i } }, { key: "doCommit", value: function () { } }, { key: "state", get: function () { return { _value: this._value, _isRawInput: this._isRawInput } }, set: function (t) { Object.assign(this, t) } }]), t }(), cu = ["chunks"], fu = function () { function t() { var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : [], n = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 0; xr(this, t), this.chunks = e, this.from = n } return Or(t, [{ key: "toString", value: function () { return this.chunks.map(String).join("") } }, { key: "extend", value: function (e) { if (String(e)) { Zr(e) && (e = new nu(String(e))); var n = this.chunks[this.chunks.length - 1], i = n && (n.stop === e.stop || null == e.stop) && e.from === n.from + n.toString().length; if (e instanceof nu) i ? n.extend(e.toString()) : this.chunks.push(e); else if (e instanceof t) { if (null == e.stop) for (var r; e.chunks.length && null == e.chunks[0].stop;)(r = e.chunks.shift()).from += e.from, this.extend(r); e.toString() && (e.stop = e.blockIndex, this.chunks.push(e)) } } } }, { key: "appendTo", value: function (e) { if (!(e instanceof iu.MaskedPattern)) return new nu(this.toString()).appendTo(e); for (var n = new Yr, i = 0; i < this.chunks.length && !n.skip; ++i) { var r = this.chunks[i], u = e._mapPosToBlock(e.value.length), s = r.stop, a = void 0; if (null != s && (!u || u.index <= s) && ((r instanceof t || e._stops.indexOf(s) >= 0) && n.aggregate(e._appendPlaceholder(s)), a = r instanceof t && e._blocks[s]), a) { var o = a.appendTail(r); o.skip = !1, n.aggregate(o), e._value += o.inserted; var l = r.toString().slice(o.rawInserted.length); l && n.aggregate(e.append(l, { tail: !0 })) } else n.aggregate(e.append(r.toString(), { tail: !0 })) } return n } }, { key: "state", get: function () { return { chunks: this.chunks.map((function (t) { return t.state })), from: this.from, stop: this.stop, blockIndex: this.blockIndex } }, set: function (e) { var n = e.chunks, i = jr(e, cu); Object.assign(this, i), this.chunks = n.map((function (e) { var n = "chunks" in e ? new t : new nu; return n.state = e, n })) } }, { key: "unshift", value: function (t) { if (!this.chunks.length || null != t && this.from >= t) return ""; for (var e = null != t ? t - this.from : t, n = 0; n < this.chunks.length;) { var i = this.chunks[n], r = i.unshift(e); if (i.toString()) { if (!r) break; ++n } else this.chunks.splice(n, 1); if (r) return r } return "" } }, { key: "shift", value: function () { if (!this.chunks.length) return ""; for (var t = this.chunks.length - 1; 0 <= t;) { var e = this.chunks[t], n = e.shift(); if (e.toString()) { if (!n) break; --t } else this.chunks.splice(t, 1); if (n) return n } return "" } }]), t }(), pu = function () { function t(e, n) { xr(this, t), this.masked = e, this._log = []; var i = e._mapPosToBlock(n) || (n < 0 ? { index: 0, offset: 0 } : { index: this.masked._blocks.length, offset: 0 }), r = i.offset, u = i.index; this.offset = r, this.index = u, this.ok = !1 } return Or(t, [{ key: "block", get: function () { return this.masked._blocks[this.index] } }, { key: "pos", get: function () { return this.masked._blockStartPos(this.index) + this.offset } }, { key: "state", get: function () { return { index: this.index, offset: this.offset, ok: this.ok } }, set: function (t) { Object.assign(this, t) } }, { key: "pushState", value: function () { this._log.push(this.state) } }, { key: "popState", value: function () { var t = this._log.pop(); return this.state = t, t } }, { key: "bindBlock", value: function () { this.block || (this.index < 0 && (this.index = 0, this.offset = 0), this.index >= this.masked._blocks.length && (this.index = this.masked._blocks.length - 1, this.offset = this.block.value.length)) } }, { key: "_pushLeft", value: function (t) { for (this.pushState(), this.bindBlock(); 0 <= this.index; --this.index, this.offset = (null === (e = this.block) || void 0 === e ? void 0 : e.value.length) || 0) { var e; if (t()) return this.ok = !0 } return this.ok = !1 } }, { key: "_pushRight", value: function (t) { for (this.pushState(), this.bindBlock(); this.index < this.masked._blocks.length; ++this.index, this.offset = 0)if (t()) return this.ok = !0; return this.ok = !1 } }, { key: "pushLeftBeforeFilled", value: function () { var t = this; return this._pushLeft((function () { if (!t.block.isFixed && t.block.value) return t.offset = t.block.nearestInputPos(t.offset, $r), 0 !== t.offset || void 0 })) } }, { key: "pushLeftBeforeInput", value: function () { var t = this; return this._pushLeft((function () { if (!t.block.isFixed) return t.offset = t.block.nearestInputPos(t.offset, Kr), !0 })) } }, { key: "pushLeftBeforeRequired", value: function () { var t = this; return this._pushLeft((function () { if (!(t.block.isFixed || t.block.isOptional && !t.block.value)) return t.offset = t.block.nearestInputPos(t.offset, Kr), !0 })) } }, { key: "pushRightBeforeFilled", value: function () { var t = this; return this._pushRight((function () { if (!t.block.isFixed && t.block.value) return t.offset = t.block.nearestInputPos(t.offset, Xr), t.offset !== t.block.value.length || void 0 })) } }, { key: "pushRightBeforeInput", value: function () { var t = this; return this._pushRight((function () { if (!t.block.isFixed) return t.offset = t.block.nearestInputPos(t.offset, Gr), !0 })) } }, { key: "pushRightBeforeRequired", value: function () { var t = this; return this._pushRight((function () { if (!(t.block.isFixed || t.block.isOptional && !t.block.value)) return t.offset = t.block.nearestInputPos(t.offset, Gr), !0 })) } }]), t }(), du = function (t) { Pr(n, t); var e = Vr(n); function n() { return xr(this, n), e.apply(this, arguments) } return Or(n, [{ key: "_update", value: function (t) { t.mask && (t.validate = function (e) { return e.search(t.mask) >= 0 }), Nr(Tr(n.prototype), "_update", this).call(this, t) } }]), n }(ru); iu.MaskedRegExp = du; var vu = ["_blocks"], gu = function (t) { Pr(n, t); var e = Vr(n); function n() { var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}; return xr(this, n), t.definitions = Object.assign({}, ou, t.definitions), e.call(this, Object.assign({}, n.DEFAULTS, t)) } return Or(n, [{ key: "_update", value: function () { var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}; t.definitions = Object.assign({}, this.definitions, t.definitions), Nr(Tr(n.prototype), "_update", this).call(this, t), this._rebuildMask() } }, { key: "_rebuildMask", value: function () { var t = this, e = this.definitions; this._blocks = [], this._stops = [], this._maskedBlocks = {}; var i = this.mask; if (i && e) for (var r = !1, u = !1, s = 0; s < i.length; ++s) { if (this.blocks) if ("continue" === function () { var e = i.slice(s), n = Object.keys(t.blocks).filter((function (t) { return 0 === e.indexOf(t) })); n.sort((function (t, e) { return e.length - t.length })); var r = n[0]; if (r) { var u = su(Object.assign({ parent: t, lazy: t.lazy, eager: t.eager, placeholderChar: t.placeholderChar, overwrite: t.overwrite }, t.blocks[r])); return u && (t._blocks.push(u), t._maskedBlocks[r] || (t._maskedBlocks[r] = []), t._maskedBlocks[r].push(t._blocks.length - 1)), s += r.length - 1, "continue" } }()) continue; var a = i[s], o = a in e; if (a !== n.STOP_CHAR) if ("{" !== a && "}" !== a) if ("[" !== a && "]" !== a) { if (a === n.ESCAPE_CHAR) { if (++s, !(a = i[s])) break; o = !1 } var l = o ? new lu({ parent: this, lazy: this.lazy, eager: this.eager, placeholderChar: this.placeholderChar, mask: e[a], isOptional: u }) : new hu({ char: a, eager: this.eager, isUnmasking: r }); this._blocks.push(l) } else u = !u; else r = !r; else this._stops.push(this._blocks.length) } } }, { key: "state", get: function () { return Object.assign({}, Nr(Tr(n.prototype), "state", this), { _blocks: this._blocks.map((function (t) { return t.state })) }) }, set: function (t) { var e = t._blocks, i = jr(t, vu); this._blocks.forEach((function (t, n) { return t.state = e[n] })), zr(Tr(n.prototype), "state", i, this, !0) } }, { key: "reset", value: function () { Nr(Tr(n.prototype), "reset", this).call(this), this._blocks.forEach((function (t) { return t.reset() })) } }, { key: "isComplete", get: function () { return this._blocks.every((function (t) { return t.isComplete })) } }, { key: "isFilled", get: function () { return this._blocks.every((function (t) { return t.isFilled })) } }, { key: "isFixed", get: function () { return this._blocks.every((function (t) { return t.isFixed })) } }, { key: "isOptional", get: function () { return this._blocks.every((function (t) { return t.isOptional })) } }, { key: "doCommit", value: function () { this._blocks.forEach((function (t) { return t.doCommit() })), Nr(Tr(n.prototype), "doCommit", this).call(this) } }, { key: "unmaskedValue", get: function () { return this._blocks.reduce((function (t, e) { return t + e.unmaskedValue }), "") }, set: function (t) { zr(Tr(n.prototype), "unmaskedValue", t, this, !0) } }, { key: "value", get: function () { return this._blocks.reduce((function (t, e) { return t + e.value }), "") }, set: function (t) { zr(Tr(n.prototype), "value", t, this, !0) } }, { key: "appendTail", value: function (t) { return Nr(Tr(n.prototype), "appendTail", this).call(this, t).aggregate(this._appendPlaceholder()) } }, { key: "_appendEager", value: function () { var t, e = new Yr, n = null === (t = this._mapPosToBlock(this.value.length)) || void 0 === t ? void 0 : t.index; if (null == n) return e; this._blocks[n].isFilled && ++n; for (var i = n; i < this._blocks.length; ++i) { var r = this._blocks[i]._appendEager(); if (!r.inserted) break; e.aggregate(r) } return e } }, { key: "_appendCharRaw", value: function (t) { var e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}, n = this._mapPosToBlock(this.value.length), i = new Yr; if (!n) return i; for (var r = n.index; ; ++r) { var u, s = this._blocks[r]; if (!s) break; var a = s._appendChar(t, Object.assign({}, e, { _beforeTailState: null === (u = e._beforeTailState) || void 0 === u ? void 0 : u._blocks[r] })), o = a.skip; if (i.aggregate(a), o || a.rawInserted) break } return i } }, { key: "extractTail", value: function () { var t = this, e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 0, n = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : this.value.length, i = new fu; return e === n || this._forEachBlocksInRange(e, n, (function (e, n, r, u) { var s = e.extractTail(r, u); s.stop = t._findStopBefore(n), s.from = t._blockStartPos(n), s instanceof fu && (s.blockIndex = n), i.extend(s) })), i } }, { key: "extractInput", value: function () { var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 0, e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : this.value.length, n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {}; if (t === e) return ""; var i = ""; return this._forEachBlocksInRange(t, e, (function (t, e, r, u) { i += t.extractInput(r, u, n) })), i } }, { key: "_findStopBefore", value: function (t) { for (var e, n = 0; n < this._stops.length; ++n) { var i = this._stops[n]; if (!(i <= t)) break; e = i } return e } }, { key: "_appendPlaceholder", value: function (t) { var e = this, n = new Yr; if (this.lazy && null == t) return n; var i = this._mapPosToBlock(this.value.length); if (!i) return n; var r = i.index, u = null != t ? t : this._blocks.length; return this._blocks.slice(r, u).forEach((function (i) { if (!i.lazy || null != t) { var r = null != i._blocks ? [i._blocks.length] : [], u = i._appendPlaceholder.apply(i, r); e._value += u.inserted, n.aggregate(u) } })), n } }, { key: "_mapPosToBlock", value: function (t) { for (var e = "", n = 0; n < this._blocks.length; ++n) { var i = this._blocks[n], r = e.length; if (t <= (e += i.value).length) return { index: n, offset: t - r } } } }, { key: "_blockStartPos", value: function (t) { return this._blocks.slice(0, t).reduce((function (t, e) { return t + e.value.length }), 0) } }, { key: "_forEachBlocksInRange", value: function (t) { var e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : this.value.length, n = arguments.length > 2 ? arguments[2] : void 0, i = this._mapPosToBlock(t); if (i) { var r = this._mapPosToBlock(e), u = r && i.index === r.index, s = i.offset, a = r && u ? r.offset : this._blocks[i.index].value.length; if (n(this._blocks[i.index], i.index, s, a), r && !u) { for (var o = i.index + 1; o < r.index; ++o)n(this._blocks[o], o, 0, this._blocks[o].value.length); n(this._blocks[r.index], r.index, 0, r.offset) } } } }, { key: "remove", value: function () { var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 0, e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : this.value.length, i = Nr(Tr(n.prototype), "remove", this).call(this, t, e); return this._forEachBlocksInRange(t, e, (function (t, e, n, r) { i.aggregate(t.remove(n, r)) })), i } }, { key: "nearestInputPos", value: function (t) { var e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : Gr; if (!this._blocks.length) return 0; var n = new pu(this, t); if (e === Gr) return n.pushRightBeforeInput() ? n.pos : (n.popState(), n.pushLeftBeforeInput() ? n.pos : this.value.length); if (e === Kr || e === $r) { if (e === Kr) { if (n.pushRightBeforeFilled(), n.ok && n.pos === t) return t; n.popState() } if (n.pushLeftBeforeInput(), n.pushLeftBeforeRequired(), n.pushLeftBeforeFilled(), e === Kr) { if (n.pushRightBeforeInput(), n.pushRightBeforeRequired(), n.ok && n.pos <= t) return n.pos; if (n.popState(), n.ok && n.pos <= t) return n.pos; n.popState() } return n.ok ? n.pos : e === $r ? 0 : (n.popState(), n.ok ? n.pos : (n.popState(), n.ok ? n.pos : 0)) } return e === Wr || e === Xr ? (n.pushRightBeforeInput(), n.pushRightBeforeRequired(), n.pushRightBeforeFilled() ? n.pos : e === Xr ? this.value.length : (n.popState(), n.ok ? n.pos : (n.popState(), n.ok ? n.pos : this.nearestInputPos(t, Kr)))) : t } }, { key: "maskedBlock", value: function (t) { return this.maskedBlocks(t)[0] } }, { key: "maskedBlocks", value: function (t) { var e = this, n = this._maskedBlocks[t]; return n ? n.map((function (t) { return e._blocks[t] })) : [] } }]), n }(ru); gu.DEFAULTS = { lazy: !0, placeholderChar: "_" }, gu.STOP_CHAR = "`", gu.ESCAPE_CHAR = "\\", gu.InputDefinition = lu, gu.FixedDefinition = hu, iu.MaskedPattern = gu; var ku = function (t) { Pr(n, t); var e = Vr(n); function n() { return xr(this, n), e.apply(this, arguments) } return Or(n, [{ key: "_matchFrom", get: function () { return this.maxLength - String(this.from).length } }, { key: "_update", value: function (t) { t = Object.assign({ to: this.to || 0, from: this.from || 0, maxLength: this.maxLength || 0 }, t); var e = String(t.to).length; null != t.maxLength && (e = Math.max(e, t.maxLength)), t.maxLength = e; for (var i = String(t.from).padStart(e, "0"), r = String(t.to).padStart(e, "0"), u = 0; u < r.length && r[u] === i[u];)++u; t.mask = r.slice(0, u).replace(/0/g, "\\0") + "0".repeat(e - u), Nr(Tr(n.prototype), "_update", this).call(this, t) } }, { key: "isComplete", get: function () { return Nr(Tr(n.prototype), "isComplete", this) && Boolean(this.value) } }, { key: "boundaries", value: function (t) { var e = "", n = "", i = qr(t.match(/^(\D*)(\d*)(\D*)/) || [], 3), r = i[1], u = i[2]; return u && (e = "0".repeat(r.length) + u, n = "9".repeat(r.length) + u), [e = e.padEnd(this.maxLength, "0"), n = n.padEnd(this.maxLength, "9")] } }, { key: "doPrepare", value: function (t) { var e, i = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}, r = Qr(Nr(Tr(n.prototype), "doPrepare", this).call(this, t.replace(/\D/g, ""), i)), u = qr(r, 2); if (t = u[0], e = u[1], !this.autofix || !t) return t; var s = String(this.from).padStart(this.maxLength, "0"), a = String(this.to).padStart(this.maxLength, "0"), o = this.value + t; if (o.length > this.maxLength) return ""; var l = this.boundaries(o), h = qr(l, 2), c = h[0], f = h[1]; return Number(f) < this.from ? s[o.length - 1] : Number(c) > this.to ? "pad" === this.autofix && o.length < this.maxLength ? ["", e.aggregate(this.append(s[o.length - 1] + t, i))] : a[o.length - 1] : t } }, { key: "doValidate", value: function () { var t, e = this.value, i = e.search(/[^0]/); if (-1 === i && e.length <= this._matchFrom) return !0; for (var r = this.boundaries(e), u = qr(r, 2), s = u[0], a = u[1], o = arguments.length, l = new Array(o), h = 0; h < o; h++)l[h] = arguments[h]; return this.from <= Number(a) && Number(s) <= this.to && (t = Nr(Tr(n.prototype), "doValidate", this)).call.apply(t, [this].concat(l)) } }]), n }(gu); iu.MaskedRange = ku; var yu = function (t) { Pr(n, t); var e = Vr(n); function n(t) { return xr(this, n), e.call(this, Object.assign({}, n.DEFAULTS, t)) } return Or(n, [{ key: "_update", value: function (t) { t.mask === Date && delete t.mask, t.pattern && (t.mask = t.pattern); var e = t.blocks; t.blocks = Object.assign({}, n.GET_DEFAULT_BLOCKS()), t.min && (t.blocks.Y.from = t.min.getFullYear()), t.max && (t.blocks.Y.to = t.max.getFullYear()), t.min && t.max && t.blocks.Y.from === t.blocks.Y.to && (t.blocks.m.from = t.min.getMonth() + 1, t.blocks.m.to = t.max.getMonth() + 1, t.blocks.m.from === t.blocks.m.to && (t.blocks.d.from = t.min.getDate(), t.blocks.d.to = t.max.getDate())), Object.assign(t.blocks, this.blocks, e), Object.keys(t.blocks).forEach((function (e) { var n = t.blocks[e]; !("autofix" in n) && "autofix" in t && (n.autofix = t.autofix) })), Nr(Tr(n.prototype), "_update", this).call(this, t) } }, { key: "doValidate", value: function () { for (var t, e = this.date, i = arguments.length, r = new Array(i), u = 0; u < i; u++)r[u] = arguments[u]; return (t = Nr(Tr(n.prototype), "doValidate", this)).call.apply(t, [this].concat(r)) && (!this.isComplete || this.isDateExist(this.value) && null != e && (null == this.min || this.min <= e) && (null == this.max || e <= this.max)) } }, { key: "isDateExist", value: function (t) { return this.format(this.parse(t, this), this).indexOf(t) >= 0 } }, { key: "date", get: function () { return this.typedValue }, set: function (t) { this.typedValue = t } }, { key: "typedValue", get: function () { return this.isComplete ? Nr(Tr(n.prototype), "typedValue", this) : null }, set: function (t) { zr(Tr(n.prototype), "typedValue", t, this, !0) } }, { key: "maskEquals", value: function (t) { return t === Date || Nr(Tr(n.prototype), "maskEquals", this).call(this, t) } }]), n }(gu); yu.DEFAULTS = { pattern: "d{.}`m{.}`Y", format: function (t) { return t ? [String(t.getDate()).padStart(2, "0"), String(t.getMonth() + 1).padStart(2, "0"), t.getFullYear()].join(".") : "" }, parse: function (t) { var e = qr(t.split("."), 3), n = e[0], i = e[1], r = e[2]; return new Date(r, i - 1, n) } }, yu.GET_DEFAULT_BLOCKS = function () { return { d: { mask: ku, from: 1, to: 31, maxLength: 2 }, m: { mask: ku, from: 1, to: 12, maxLength: 2 }, Y: { mask: ku, from: 1900, to: 9999 } } }, iu.MaskedDate = yu; var mu = function () { function t() { xr(this, t) } return Or(t, [{ key: "selectionStart", get: function () { var t; try { t = this._unsafeSelectionStart } catch (t) { } return null != t ? t : this.value.length } }, { key: "selectionEnd", get: function () { var t; try { t = this._unsafeSelectionEnd } catch (t) { } return null != t ? t : this.value.length } }, { key: "select", value: function (t, e) { if (null != t && null != e && (t !== this.selectionStart || e !== this.selectionEnd)) try { this._unsafeSelect(t, e) } catch (t) { } } }, { key: "_unsafeSelect", value: function (t, e) { } }, { key: "isActive", get: function () { return !1 } }, { key: "bindEvents", value: function (t) { } }, { key: "unbindEvents", value: function () { } }]), t }(); iu.MaskElement = mu; var bu = function (t) { Pr(n, t); var e = Vr(n); function n(t) { var i; return xr(this, n), (i = e.call(this)).input = t, i._handlers = {}, i } return Or(n, [{ key: "rootElement", get: function () { var t, e, n; return null !== (t = null === (e = (n = this.input).getRootNode) || void 0 === e ? void 0 : e.call(n)) && void 0 !== t ? t : document } }, { key: "isActive", get: function () { return this.input === this.rootElement.activeElement } }, { key: "_unsafeSelectionStart", get: function () { return this.input.selectionStart } }, { key: "_unsafeSelectionEnd", get: function () { return this.input.selectionEnd } }, { key: "_unsafeSelect", value: function (t, e) { this.input.setSelectionRange(t, e) } }, { key: "value", get: function () { return this.input.value }, set: function (t) { this.input.value = t } }, { key: "bindEvents", value: function (t) { var e = this; Object.keys(t).forEach((function (i) { return e._toggleEventHandler(n.EVENTS_MAP[i], t[i]) })) } }, { key: "unbindEvents", value: function () { var t = this; Object.keys(this._handlers).forEach((function (e) { return t._toggleEventHandler(e) })) } }, { key: "_toggleEventHandler", value: function (t, e) { this._handlers[t] && (this.input.removeEventListener(t, this._handlers[t]), delete this._handlers[t]), e && (this.input.addEventListener(t, e), this._handlers[t] = e) } }]), n }(mu); bu.EVENTS_MAP = { selectionChange: "keydown", input: "input", drop: "drop", click: "click", focus: "focus", commit: "blur" }, iu.HTMLMaskElement = bu; var _u = function (t) { Pr(n, t); var e = Vr(n); function n() { return xr(this, n), e.apply(this, arguments) } return Or(n, [{ key: "_unsafeSelectionStart", get: function () { var t = this.rootElement, e = t.getSelection && t.getSelection(), n = e && e.anchorOffset, i = e && e.focusOffset; return null == i || null == n || n < i ? n : i } }, { key: "_unsafeSelectionEnd", get: function () { var t = this.rootElement, e = t.getSelection && t.getSelection(), n = e && e.anchorOffset, i = e && e.focusOffset; return null == i || null == n || n > i ? n : i } }, { key: "_unsafeSelect", value: function (t, e) { if (this.rootElement.createRange) { var n = this.rootElement.createRange(); n.setStart(this.input.firstChild || this.input, t), n.setEnd(this.input.lastChild || this.input, e); var i = this.rootElement, r = i.getSelection && i.getSelection(); r && (r.removeAllRanges(), r.addRange(n)) } } }, { key: "value", get: function () { return this.input.textContent }, set: function (t) { this.input.textContent = t } }]), n }(bu); iu.HTMLContenteditableMaskElement = _u; var Au = ["mask"], Cu = function () { function t(e, n) { xr(this, t), this.el = e instanceof mu ? e : e.isContentEditable && "INPUT" !== e.tagName && "TEXTAREA" !== e.tagName ? new _u(e) : new bu(e), this.masked = su(n), this._listeners = {}, this._value = "", this._unmaskedValue = "", this._saveSelection = this._saveSelection.bind(this), this._onInput = this._onInput.bind(this), this._onChange = this._onChange.bind(this), this._onDrop = this._onDrop.bind(this), this._onFocus = this._onFocus.bind(this), this._onClick = this._onClick.bind(this), this.alignCursor = this.alignCursor.bind(this), this.alignCursorFriendly = this.alignCursorFriendly.bind(this), this._bindEvents(), this.updateValue(), this._onChange() } return Or(t, [{ key: "mask", get: function () { return this.masked.mask }, set: function (t) { if (!this.maskEquals(t)) if (t instanceof iu.Masked || this.masked.constructor !== uu(t)) { var e = su({ mask: t }); e.unmaskedValue = this.masked.unmaskedValue, this.masked = e } else this.masked.updateOptions({ mask: t }) } }, { key: "maskEquals", value: function (t) { var e; return null == t || (null === (e = this.masked) || void 0 === e ? void 0 : e.maskEquals(t)) } }, { key: "value", get: function () { return this._value }, set: function (t) { this.masked.value = t, this.updateControl(), this.alignCursor() } }, { key: "unmaskedValue", get: function () { return this._unmaskedValue }, set: function (t) { this.masked.unmaskedValue = t, this.updateControl(), this.alignCursor() } }, { key: "typedValue", get: function () { return this.masked.typedValue }, set: function (t) { this.masked.typedValue = t, this.updateControl(), this.alignCursor() } }, { key: "_bindEvents", value: function () { this.el.bindEvents({ selectionChange: this._saveSelection, input: this._onInput, drop: this._onDrop, click: this._onClick, focus: this._onFocus, commit: this._onChange }) } }, { key: "_unbindEvents", value: function () { this.el && this.el.unbindEvents() } }, { key: "_fireEvent", value: function (t) { for (var e = arguments.length, n = new Array(e > 1 ? e - 1 : 0), i = 1; i < e; i++)n[i - 1] = arguments[i]; var r = this._listeners[t]; r && r.forEach((function (t) { return t.apply(void 0, n) })) } }, { key: "selectionStart", get: function () { return this._cursorChanging ? this._changingCursorPos : this.el.selectionStart } }, { key: "cursorPos", get: function () { return this._cursorChanging ? this._changingCursorPos : this.el.selectionEnd }, set: function (t) { this.el && this.el.isActive && (this.el.select(t, t), this._saveSelection()) } }, { key: "_saveSelection", value: function () { this.value !== this.el.value && console.warn("Element value was changed outside of mask. Syncronize mask using `mask.updateValue()` to work properly."), this._selection = { start: this.selectionStart, end: this.cursorPos } } }, { key: "updateValue", value: function () { this.masked.value = this.el.value, this._value = this.masked.value } }, { key: "updateControl", value: function () { var t = this.masked.unmaskedValue, e = this.masked.value, n = this.unmaskedValue !== t || this.value !== e; this._unmaskedValue = t, this._value = e, this.el.value !== e && (this.el.value = e), n && this._fireChangeEvents() } }, { key: "updateOptions", value: function (t) { var e = t.mask, n = jr(t, Au), i = !this.maskEquals(e), r = !tu(this.masked, n); i && (this.mask = e), r && this.masked.updateOptions(n), (i || r) && this.updateControl() } }, { key: "updateCursor", value: function (t) { null != t && (this.cursorPos = t, this._delayUpdateCursor(t)) } }, { key: "_delayUpdateCursor", value: function (t) { var e = this; this._abortUpdateCursor(), this._changingCursorPos = t, this._cursorChanging = setTimeout((function () { e.el && (e.cursorPos = e._changingCursorPos, e._abortUpdateCursor()) }), 10) } }, { key: "_fireChangeEvents", value: function () { this._fireEvent("accept", this._inputEvent), this.masked.isComplete && this._fireEvent("complete", this._inputEvent) } }, { key: "_abortUpdateCursor", value: function () { this._cursorChanging && (clearTimeout(this._cursorChanging), delete this._cursorChanging) } }, { key: "alignCursor", value: function () { this.cursorPos = this.masked.nearestInputPos(this.masked.nearestInputPos(this.cursorPos, Kr)) } }, { key: "alignCursorFriendly", value: function () { this.selectionStart === this.cursorPos && this.alignCursor() } }, { key: "on", value: function (t, e) { return this._listeners[t] || (this._listeners[t] = []), this._listeners[t].push(e), this } }, { key: "off", value: function (t, e) { if (!this._listeners[t]) return this; if (!e) return delete this._listeners[t], this; var n = this._listeners[t].indexOf(e); return n >= 0 && this._listeners[t].splice(n, 1), this } }, { key: "_onInput", value: function (t) { if (this._inputEvent = t, this._abortUpdateCursor(), !this._selection) return this.updateValue(); var e = new eu(this.el.value, this.cursorPos, this.value, this._selection), n = this.masked.rawInputValue, i = this.masked.splice(e.startChangePos, e.removed.length, e.inserted, e.removeDirection).offset, r = n === this.masked.rawInputValue ? e.removeDirection : Gr, u = this.masked.nearestInputPos(e.startChangePos + i, r); r !== Gr && (u = this.masked.nearestInputPos(u, Gr)), this.updateControl(), this.updateCursor(u), delete this._inputEvent } }, { key: "_onChange", value: function () { this.value !== this.el.value && this.updateValue(), this.masked.doCommit(), this.updateControl(), this._saveSelection() } }, { key: "_onDrop", value: function (t) { t.preventDefault(), t.stopPropagation() } }, { key: "_onFocus", value: function (t) { this.alignCursorFriendly() } }, { key: "_onClick", value: function (t) { this.alignCursorFriendly() } }, { key: "destroy", value: function () { this._unbindEvents(), this._listeners.length = 0, delete this.el } }]), t }(); iu.InputMask = Cu; var Eu = function (t) { Pr(n, t); var e = Vr(n); function n() { return xr(this, n), e.apply(this, arguments) } return Or(n, [{ key: "_update", value: function (t) { t.enum && (t.mask = "*".repeat(t.enum[0].length)), Nr(Tr(n.prototype), "_update", this).call(this, t) } }, { key: "doValidate", value: function () { for (var t, e = this, i = arguments.length, r = new Array(i), u = 0; u < i; u++)r[u] = arguments[u]; return this.enum.some((function (t) { return t.indexOf(e.unmaskedValue) >= 0 })) && (t = Nr(Tr(n.prototype), "doValidate", this)).call.apply(t, [this].concat(r)) } }]), n }(gu); iu.MaskedEnum = Eu; var Fu = function (t) { Pr(n, t); var e = Vr(n); function n(t) { return xr(this, n), e.call(this, Object.assign({}, n.DEFAULTS, t)) } return Or(n, [{ key: "_update", value: function (t) { Nr(Tr(n.prototype), "_update", this).call(this, t), this._updateRegExps() } }, { key: "_updateRegExps", value: function () { var t = "^" + (this.allowNegative ? "[+|\\-]?" : ""), e = (this.scale ? "(" + Jr(this.radix) + "\\d{0," + this.scale + "})?" : "") + "$"; this._numberRegExpInput = new RegExp(t + "(0|([1-9]+\\d*))?" + e), this._numberRegExp = new RegExp(t + "\\d*" + e), this._mapToRadixRegExp = new RegExp("[" + this.mapToRadix.map(Jr).join("") + "]", "g"), this._thousandsSeparatorRegExp = new RegExp(Jr(this.thousandsSeparator), "g") } }, { key: "_removeThousandsSeparators", value: function (t) { return t.replace(this._thousandsSeparatorRegExp, "") } }, { key: "_insertThousandsSeparators", value: function (t) { var e = t.split(this.radix); return e[0] = e[0].replace(/\B(?=(\d{3})+(?!\d))/g, this.thousandsSeparator), e.join(this.radix) } }, { key: "doPrepare", value: function (t) { var e; t = t.replace(this._mapToRadixRegExp, this.radix); for (var i = this._removeThousandsSeparators(t), r = arguments.length, u = new Array(r > 1 ? r - 1 : 0), s = 1; s < r; s++)u[s - 1] = arguments[s]; var a = Qr((e = Nr(Tr(n.prototype), "doPrepare", this)).call.apply(e, [this, i].concat(u))), o = qr(a, 2), l = o[0], h = o[1]; return t && !i && (h.skip = !0), [l, h] } }, { key: "_separatorsCount", value: function (t) { for (var e = arguments.length > 1 && void 0 !== arguments[1] && arguments[1], n = 0, i = 0; i < t; ++i)this._value.indexOf(this.thousandsSeparator, i) === i && (++n, e && (t += this.thousandsSeparator.length)); return n } }, { key: "_separatorsCountFromSlice", value: function () { var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : this._value; return this._separatorsCount(this._removeThousandsSeparators(t).length, !0) } }, { key: "extractInput", value: function () { var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 0, e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : this.value.length, i = arguments.length > 2 ? arguments[2] : void 0, r = this._adjustRangeWithSeparators(t, e), u = qr(r, 2); return t = u[0], e = u[1], this._removeThousandsSeparators(Nr(Tr(n.prototype), "extractInput", this).call(this, t, e, i)) } }, { key: "_appendCharRaw", value: function (t) { var e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}; if (!this.thousandsSeparator) return Nr(Tr(n.prototype), "_appendCharRaw", this).call(this, t, e); var i = e.tail && e._beforeTailState ? e._beforeTailState._value : this._value, r = this._separatorsCountFromSlice(i); this._value = this._removeThousandsSeparators(this.value); var u = Nr(Tr(n.prototype), "_appendCharRaw", this).call(this, t, e); this._value = this._insertThousandsSeparators(this._value); var s = e.tail && e._beforeTailState ? e._beforeTailState._value : this._value, a = this._separatorsCountFromSlice(s); return u.tailShift += (a - r) * this.thousandsSeparator.length, u.skip = !u.rawInserted && t === this.thousandsSeparator, u } }, { key: "_findSeparatorAround", value: function (t) { if (this.thousandsSeparator) { var e = t - this.thousandsSeparator.length + 1, n = this.value.indexOf(this.thousandsSeparator, e); if (n <= t) return n } return -1 } }, { key: "_adjustRangeWithSeparators", value: function (t, e) { var n = this._findSeparatorAround(t); n >= 0 && (t = n); var i = this._findSeparatorAround(e); return i >= 0 && (e = i + this.thousandsSeparator.length), [t, e] } }, { key: "remove", value: function () { var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 0, e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : this.value.length, n = this._adjustRangeWithSeparators(t, e), i = qr(n, 2); t = i[0], e = i[1]; var r = this.value.slice(0, t), u = this.value.slice(e), s = this._separatorsCount(r.length); this._value = this._insertThousandsSeparators(this._removeThousandsSeparators(r + u)); var a = this._separatorsCountFromSlice(r); return new Yr({ tailShift: (a - s) * this.thousandsSeparator.length }) } }, { key: "nearestInputPos", value: function (t, e) { if (!this.thousandsSeparator) return t; switch (e) { case Gr: case Kr: case $r: var n = this._findSeparatorAround(t - 1); if (n >= 0) { var i = n + this.thousandsSeparator.length; if (t < i || this.value.length <= i || e === $r) return n } break; case Wr: case Xr: var r = this._findSeparatorAround(t); if (r >= 0) return r + this.thousandsSeparator.length }return t } }, { key: "doValidate", value: function (t) { var e = (t.input ? this._numberRegExpInput : this._numberRegExp).test(this._removeThousandsSeparators(this.value)); if (e) { var i = this.number; e = e && !isNaN(i) && (null == this.min || this.min >= 0 || this.min <= this.number) && (null == this.max || this.max <= 0 || this.number <= this.max) } return e && Nr(Tr(n.prototype), "doValidate", this).call(this, t) } }, { key: "doCommit", value: function () { if (this.value) { var t = this.number, e = t; null != this.min && (e = Math.max(e, this.min)), null != this.max && (e = Math.min(e, this.max)), e !== t && (this.unmaskedValue = String(e)); var i = this.value; this.normalizeZeros && (i = this._normalizeZeros(i)), this.padFractionalZeros && this.scale > 0 && (i = this._padFractionalZeros(i)), this._value = i } Nr(Tr(n.prototype), "doCommit", this).call(this) } }, { key: "_normalizeZeros", value: function (t) { var e = this._removeThousandsSeparators(t).split(this.radix); return e[0] = e[0].replace(/^(\D*)(0*)(\d*)/, (function (t, e, n, i) { return e + i })), t.length && !/\d$/.test(e[0]) && (e[0] = e[0] + "0"), e.length > 1 && (e[1] = e[1].replace(/0*$/, ""), e[1].length || (e.length = 1)), this._insertThousandsSeparators(e.join(this.radix)) } }, { key: "_padFractionalZeros", value: function (t) { if (!t) return t; var e = t.split(this.radix); return e.length < 2 && e.push(""), e[1] = e[1].padEnd(this.scale, "0"), e.join(this.radix) } }, { key: "unmaskedValue", get: function () { return this._removeThousandsSeparators(this._normalizeZeros(this.value)).replace(this.radix, ".") }, set: function (t) { zr(Tr(n.prototype), "unmaskedValue", t.replace(".", this.radix), this, !0) } }, { key: "typedValue", get: function () { return Number(this.unmaskedValue) }, set: function (t) { zr(Tr(n.prototype), "unmaskedValue", String(t), this, !0) } }, { key: "number", get: function () { return this.typedValue }, set: function (t) { this.typedValue = t } }, { key: "allowNegative", get: function () { return this.signed || null != this.min && this.min < 0 || null != this.max && this.max < 0 } }]), n }(ru); Fu.DEFAULTS = { radix: ",", thousandsSeparator: "", mapToRadix: ["."], scale: 2, signed: !1, normalizeZeros: !0, padFractionalZeros: !1 }, iu.MaskedNumber = Fu; var Su = function (t) { Pr(n, t); var e = Vr(n); function n() { return xr(this, n), e.apply(this, arguments) } return Or(n, [{ key: "_update", value: function (t) { t.mask && (t.validate = t.mask), Nr(Tr(n.prototype), "_update", this).call(this, t) } }]), n }(ru); iu.MaskedFunction = Su; var wu = ["compiledMasks", "currentMaskRef", "currentMask"], Bu = function (t) { Pr(n, t); var e = Vr(n); function n(t) { var i; return xr(this, n), (i = e.call(this, Object.assign({}, n.DEFAULTS, t))).currentMask = null, i } return Or(n, [{ key: "_update", value: function (t) { Nr(Tr(n.prototype), "_update", this).call(this, t), "mask" in t && (this.compiledMasks = Array.isArray(t.mask) ? t.mask.map((function (t) { return su(t) })) : []) } }, { key: "_appendCharRaw", value: function (t) { var e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}, n = this._applyDispatch(t, e); return this.currentMask && n.aggregate(this.currentMask._appendChar(t, e)), n } }, { key: "_applyDispatch", value: function () { var t = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : "", e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}, n = e.tail && null != e._beforeTailState ? e._beforeTailState._value : this.value, i = this.rawInputValue, r = e.tail && null != e._beforeTailState ? e._beforeTailState._rawInputValue : i, u = i.slice(r.length), s = this.currentMask, a = new Yr, o = s && s.state; if (this.currentMask = this.doDispatch(t, Object.assign({}, e)), this.currentMask) if (this.currentMask !== s) { if (this.currentMask.reset(), r) { var l = this.currentMask.append(r, { raw: !0 }); a.tailShift = l.inserted.length - n.length } u && (a.tailShift += this.currentMask.append(u, { raw: !0, tail: !0 }).tailShift) } else this.currentMask.state = o; return a } }, { key: "_appendPlaceholder", value: function () { var t = this._applyDispatch.apply(this, arguments); return this.currentMask && t.aggregate(this.currentMask._appendPlaceholder()), t } }, { key: "_appendEager", value: function () { var t = this._applyDispatch.apply(this, arguments); return this.currentMask && t.aggregate(this.currentMask._appendEager()), t } }, { key: "doDispatch", value: function (t) { var e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : {}; return this.dispatch(t, this, e) } }, { key: "doValidate", value: function () { for (var t, e, i = arguments.length, r = new Array(i), u = 0; u < i; u++)r[u] = arguments[u]; return (t = Nr(Tr(n.prototype), "doValidate", this)).call.apply(t, [this].concat(r)) && (!this.currentMask || (e = this.currentMask).doValidate.apply(e, r)) } }, { key: "reset", value: function () { var t; null === (t = this.currentMask) || void 0 === t || t.reset(), this.compiledMasks.forEach((function (t) { return t.reset() })) } }, { key: "value", get: function () { return this.currentMask ? this.currentMask.value : "" }, set: function (t) { zr(Tr(n.prototype), "value", t, this, !0) } }, { key: "unmaskedValue", get: function () { return this.currentMask ? this.currentMask.unmaskedValue : "" }, set: function (t) { zr(Tr(n.prototype), "unmaskedValue", t, this, !0) } }, { key: "typedValue", get: function () { return this.currentMask ? this.currentMask.typedValue : "" }, set: function (t) { var e = String(t); this.currentMask && (this.currentMask.typedValue = t, e = this.currentMask.unmaskedValue), this.unmaskedValue = e } }, { key: "isComplete", get: function () { var t; return Boolean(null === (t = this.currentMask) || void 0 === t ? void 0 : t.isComplete) } }, { key: "isFilled", get: function () { var t; return Boolean(null === (t = this.currentMask) || void 0 === t ? void 0 : t.isFilled) } }, { key: "remove", value: function () { var t, e = new Yr; this.currentMask && e.aggregate((t = this.currentMask).remove.apply(t, arguments)).aggregate(this._applyDispatch()); return e } }, { key: "state", get: function () { return Object.assign({}, Nr(Tr(n.prototype), "state", this), { _rawInputValue: this.rawInputValue, compiledMasks: this.compiledMasks.map((function (t) { return t.state })), currentMaskRef: this.currentMask, currentMask: this.currentMask && this.currentMask.state }) }, set: function (t) { var e = t.compiledMasks, i = t.currentMaskRef, r = t.currentMask, u = jr(t, wu); this.compiledMasks.forEach((function (t, n) { return t.state = e[n] })), null != i && (this.currentMask = i, this.currentMask.state = r), zr(Tr(n.prototype), "state", u, this, !0) } }, { key: "extractInput", value: function () { var t; return this.currentMask ? (t = this.currentMask).extractInput.apply(t, arguments) : "" } }, { key: "extractTail", value: function () { for (var t, e, i = arguments.length, r = new Array(i), u = 0; u < i; u++)r[u] = arguments[u]; return this.currentMask ? (t = this.currentMask).extractTail.apply(t, r) : (e = Nr(Tr(n.prototype), "extractTail", this)).call.apply(e, [this].concat(r)) } }, { key: "doCommit", value: function () { this.currentMask && this.currentMask.doCommit(), Nr(Tr(n.prototype), "doCommit", this).call(this) } }, { key: "nearestInputPos", value: function () { for (var t, e, i = arguments.length, r = new Array(i), u = 0; u < i; u++)r[u] = arguments[u]; return this.currentMask ? (t = this.currentMask).nearestInputPos.apply(t, r) : (e = Nr(Tr(n.prototype), "nearestInputPos", this)).call.apply(e, [this].concat(r)) } }, { key: "overwrite", get: function () { return this.currentMask ? this.currentMask.overwrite : Nr(Tr(n.prototype), "overwrite", this) }, set: function (t) { console.warn('"overwrite" option is not available in dynamic mask, use this option in siblings') } }, { key: "eager", get: function () { return this.currentMask ? this.currentMask.eager : Nr(Tr(n.prototype), "eager", this) }, set: function (t) { console.warn('"eager" option is not available in dynamic mask, use this option in siblings') } }, { key: "maskEquals", value: function (t) { return Array.isArray(t) && this.compiledMasks.every((function (e, n) { var i; return e.maskEquals(null === (i = t[n]) || void 0 === i ? void 0 : i.mask) })) } }]), n }(ru); Bu.DEFAULTS = { dispatch: function (t, e, n) { if (e.compiledMasks.length) { var i = e.rawInputValue, r = e.compiledMasks.map((function (e, r) { return e.reset(), e.append(i, { raw: !0 }), e.append(t, n), { weight: e.rawInputValue.length, index: r } })); return r.sort((function (t, e) { return e.weight - t.weight })), e.compiledMasks[r[0].index] } } }, iu.MaskedDynamic = Bu; var Du = { MASKED: "value", UNMASKED: "unmaskedValue", TYPED: "typedValue" }; function xu(t) { var e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : Du.MASKED, n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : Du.MASKED, i = su(t); return function (t) { return i.runIsolated((function (i) { return i[e] = t, i[n] })) } } function Mu(t) { for (var e = arguments.length, n = new Array(e > 1 ? e - 1 : 0), i = 1; i < e; i++)n[i - 1] = arguments[i]; return xu.apply(void 0, n)(t) } iu.PIPE_TYPE = Du, iu.createPipe = xu, iu.pipe = Mu; try { globalThis.IMask = iu } catch (t) { } t.HTMLContenteditableMaskElement = _u, t.HTMLMaskElement = bu, t.InputMask = Cu, t.MaskElement = mu, t.Masked = ru, t.MaskedDate = yu, t.MaskedDynamic = Bu, t.MaskedEnum = Eu, t.MaskedFunction = Su, t.MaskedNumber = Fu, t.MaskedPattern = gu, t.MaskedRange = ku, t.MaskedRegExp = du, t.PIPE_TYPE = Du, t.createMask = su, t.createPipe = xu, t.default = iu, t.pipe = Mu, Object.defineProperty(t, "__esModule", { value: !0 }) })); 2 | //# sourceMappingURL=imask.min.js.map -------------------------------------------------------------------------------- /BlazorInputMask/wwwroot/js/main.js: -------------------------------------------------------------------------------- 1 |  2 | var customMask = null; 3 | var dictionary = new Map(); 4 | 5 | window.mask = (id, mask, isRegEx, destroy, dotnetHelper) => { 6 | 7 | customMask = dictionary.get(id); 8 | var pattern; 9 | if (isRegEx) 10 | pattern = new RegExp(mask); 11 | else 12 | pattern = mask; 13 | if (customMask != null && destroy) { 14 | customMask.destroy(); 15 | } 16 | customMask = IMask( 17 | document.getElementById(id), { 18 | mask: pattern, 19 | commit: function (value, masked) { 20 | var vm = { value: value, unMaskedValue: this.unmaskedValue }; 21 | dotnetHelper.invokeMethodAsync('returnValue', vm); 22 | } 23 | }); 24 | dictionary.set(id, customMask); 25 | }; 26 | 27 | window.clearValue = (id) => { 28 | customMask = dictionary.get(id); 29 | customMask.masked.reset(); 30 | }; 31 | 32 | -------------------------------------------------------------------------------- /InputChanges.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | public class Class1 4 | { 5 | public Class1() 6 | { 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Blazor Input Mask 2 | 3 | ![](https://71dhfa.am.files.1drv.com/y4mg_oke1rtEzv6OK0aeJHVm9oiTMPcv9SdNA2wSo7ppyzfpT_809MDNljRRP0NUNIAd0uTfkOPhLN8OP2FitMwxV2QoaYEcku1LIRKReqj5gCEQXfCqHPvzEM5z-URuqngkwnV9P6JwLEpO_XA5CBj_yLUk9qcCjjHcYOb50i-QiO2s7M8fAAqf0_MM8HlwBbJQ5rB3YDpLVrvcf47Z7Td0g/BlazorInputMask.gif?psid=1) 4 | 5 | Nuget Package : https://www.nuget.org/packages/BlazorInputMask/ 6 | 7 | Install-Package BlazorInputMask 8 | 9 | Blazor Input Mask (based on https://imask.js.org/) 10 | 11 | Use like that: 12 | 13 | 16 | 17 | In your _Host.cshtml or Index.html file: 18 | 19 |
20 | 21 |

22 | 23 | You can also have the possibility to set an id to the mask (optional), and also retrieve the unmasked value. 24 | 25 | 06-29-2021 : Added parameter - validateOnKeyPress 26 | 27 | Additional help in the demo code here : 28 | 29 | https://github.com/raphadesa/BlazorInputMask/blob/master/BlazorInputMask/Pages/Index.razor 30 | 31 | 06-13-2021 : RegEx support 32 | 33 | Usage : (RegEx must start and end with a slash '/') 34 | 35 | 36 | 37 | 02-12-22 : Added new parameter returnRawValue true by default 38 | 39 | Warning: now return value parameter is not rawValue but returnValue. 40 | 41 | 02-21-2023 : Added function updateMask 42 | 43 | 03-12-2023 : BREAKING CHANGE 44 | 45 | New event has been added: OnChanged, which returns both value and the masked raw value. 46 | 47 | So you don't need to use returnRawValue anymore. 48 | 49 | 10-14-2023 : Added function clearValue 50 | 51 | 03-27-2024 : Upgraded NuGet Package for .NET 8 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /license.md: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 Raphaël Desalbres 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | --------------------------------------------------------------------------------