From: Kilian Saffran Date: Thu, 13 Oct 2022 17:55:55 +0000 (+0200) Subject: v221013 X-Git-Url: http://cloud.dks.lu/git/?a=commitdiff_plain;h=b8c077e4db7510f01b55d8485757d8e3c16cd0a3;p=pot_lu.git v221013 --- diff --git a/.vscode/settings.json b/.vscode/settings.json index b317e6b2..4fe9fb3e 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -3,10 +3,6 @@ "*.html.mustache": "html", "*.js.mustache": "javascript" }, - "perlSyntax.includePaths": [ - "C:/Users/ksaff/Workspace/pot_lu/app/lib/perl5","C:/Users/ksaff/Workspace/pot_lu/app/lib","C:/Users/ksaff/Workspace/pot_lu/website/api/lib","D:/Workspace/pot_lu/app/lib/perl5","D:/Workspace/pot_lu/app/lib","D:/Workspace/pot_lu/website/api/lib" -], -"es6-css-minify.minifyOnSave": "no", "git.ignoreLimitWarning": true, "tidyHtml.formatOnSave": false, "tidyHtml.optionsTidy": { diff --git a/11111111-1111-1111-1111-111111111111 Ale.txt b/11111111-1111-1111-1111-111111111111 Ale.txt new file mode 100644 index 00000000..f13a932e --- /dev/null +++ b/11111111-1111-1111-1111-111111111111 Ale.txt @@ -0,0 +1,6 @@ +11111111-1111-1111-1111-111111111111 Alexander Silva 04782852fd6a80 +b13ede48-2bd0-7359-cb18-dbea81809541 Dorothé Roos 04746252fd6a80 +56a0bbf9-08df-460c-b60e-d91c1d314154 Daniela Pesch 04781452fd6a80 + + +sqlite3 --header .hourtrax/hourtrax.sqlite "select * from badges where id_staff in ('11111111-1111-1111-1111-111111111111','b13ede48-2bd0-7359-cb18-dbea81809541','56a0bbf9-08df-460c-b60e-d91c1d314154');" \ No newline at end of file diff --git a/DeveloperReadMe.md b/DeveloperReadMe.md index c420e36a..7c2a9ace 100644 --- a/DeveloperReadMe.md +++ b/DeveloperReadMe.md @@ -91,10 +91,13 @@ Install required Modules: ^: `install Algorithm::Diff Apache::LogFormat::Compiler AppConfig Archive::Tar Archive::Zip Audio::FLAC::Header Authen::SASL B::Hooks::EndOfScope BSD::Resource Business::Tax::VAT::Validation CGI CGI::Compile CGI::Emulate::PSGI CGI::Session CPAN::Meta::Check Canary::Stability Capture::Tiny Class::Inspector Class::Load Class::Load::XS Class::Method::Modifiers Clone Cookie::Baker Cpanel::JSON::XS Crypt::CBC Crypt::PasswdMD5 Crypt::RC4 Crypt::Random::Source Crypt::Rijndael Crypt::Rijndael::PP DBD::PgPP DBD::SQLite DBD::mysql DBI Danga::Socket Data::OptList Date::Parse Devel::Caller Devel::GlobalDestruction Devel::OverloadInfo Devel::StackTrace Devel::StackTrace::AsHTML Digest::HMAC Digest::Perl::MD5 Digest::SHA Digest::SHA::PurePerl Dist::CheckConflicts Email::Address Email::Address::XS Email::Date::Format Email::MIME Email::MIME::ContentType Email::MIME::Encodings Email::MessageID Email::Simple Encode Encode::Locale Error Eval::Closure Exporter::Tiny ExtUtils::Config ExtUtils::Helpers ExtUtils::InstallPaths File::Copy::Recursive File::KeePass File::Listing File::Path File::ShareDir File::ShareDir::Install File::pushd Filesys::Notify::Simple Font::TTF Getopt::ArgvFile HTML::Parser HTML::Tagset HTML::Tree HTTP::Cookies HTTP::Daemon HTTP::Date HTTP::Entity::Parser HTTP::Headers::Fast HTTP::Message HTTP::MultiPartParser HTTP::Negotiate Hash::MultiValue IO::AIO IO::HTML IO::Socket::SSL IO::String IO::Stringy IO::Tty IPC::Run3 Image::Size JSON JSON::MaybeXS LWP::MediaTypes LWP::Protocol::https List::Util Locale::Maketext Locale::Maketext::Lexicon Locale::Msgfmt MIME::Lite MIME::Type::FileName MIME::Types MLDBM MP3::Info MP4::Info MRO::Compat MailTools Math::Base::Convert Module::Build Module::Build::Tiny Module::Find Module::Implementation Module::Runtime Module::Runtime::Conflicts Module::ScanDeps Module::Signature Moo Moose MooseX::Params::Validate Mozilla::CA Net Net::HTTP Net::OpenSSH Net::SSLeay OLE::Storage_Lite Ogg::Vorbis::Header::PurePerl PAR PAR::Dist PAR::Packer PDF::API2 PDF::Table POSIX::strftime::Compiler Package::DeprecationManager Package::Stash Package::Stash::XS PadWalker Params::Util Params::Validate Path::Tiny Perl Perlbal Plack Plack::App::EventSource Plack::Middleware::DirIndex Readonly Role::Tiny SQL::Statement Smart::Comments Sort::Naturally Spreadsheet::ParseExcel Spreadsheet::XLSX Starlight Stream::Buffered String::HexConvert String::Random Sub::Exporter Sub::Exporter::Progressive Sub::Identify Sub::Install Sub::Name Sub::Quote Sub::Uplevel Sys::Syscall Template Template::DBI Term::ReadKey Term::ReadLine Term::ShellUI Test::CleanNamespaces Test::Deep Test::Exception Test::Fatal Test::File Test::MockTime Test::Needs Test::NoWarnings Test::Pod Test::Requires Test::RequiresInternet Test::SharedFork Test::TCP Test::Time Test::Warn Test::Warnings Test::utf8 Text::Soundex Text::Unidecode Tk::Getopt Try::Tiny Type::Tiny URI URI::Encode UUID::Tiny Variable::Magic WWW::Form::UrlEncoded WWW::RobotRules XML::NamespaceSupport XML::Parser XML::SAX XML::SAX::Base XML::SAX::Expat XML::Simple common::sense install libwww::perl namespace::clean version` -Archive::Tar Archive::Zip Audio::FLAC::Header Digest::Perl::MD5 Digest::SHA Digest::SHA::PurePerl Digest::SHA Email::Address Email::Address::XS Email::Date::Format Email::MIME Email::MIME::ContentType Email::MIME::Encodings Email::MessageID Email::Simple Encode Encode::Locale File::Copy::Recursive File::KeePass Filesys::Notify::Simple Font::TTF File::Find::Rule Net::SSLeay +Archive::Tar Archive::Zip Audio::FLAC::Header Digest::Perl::MD5 Digest::SHA Digest::SHA::PurePerl Digest::SHA Email::Address EmailFile::Copy::Recursive File::KeePass::Address::XS Email::Date::Format Email::MIME Email::MIME::ContentType Email::MIME::Encodings Email::MessageID Email::Simple Encode Encode::Locale File::Copy::Recursive File::KeePass Filesys::Notify::Simple Font::TTF File::Find::Rule Net::SSLeay -MP3::Info MP4::Info Image::Size MailTools Ogg::Vorbis::Header::PurePerl PAR PAR::Dist PAR::Packer Plack::Middleware::DirIndex PadWalker PDF::API2 Starlight Template URI::Encode UUID::Tiny Template::DBI MIME::Lite MIME::Type::FileName MIME::Types IO::Tty +MP3::Info MP4::Info Image::Size Ogg::Vorbis::Header::PurePerl PAR PAR::Dist PAR::Packer Plack::Middleware::DirIndex PadWalker PDF::API2 Starlight Template URI::Encode Template::DBI MIME::Lite MIME::Type::FileName MIME::Types IO::Tty --- +PDF::API2 +UUID::Tiny +MailTools Setup Apache diff --git a/app/css/theme.css b/app/css/theme.css index 413cb5de..2fca9fd8 100644 --- a/app/css/theme.css +++ b/app/css/theme.css @@ -971,6 +971,3 @@ a.inlinebtn:focus #help_page hr { border-top: 1px solid #757575; } - - - diff --git a/app/db.php b/app/db.php index 612ac208..f34ee9f4 100644 --- a/app/db.php +++ b/app/db.php @@ -261,6 +261,7 @@ } $usql = "UPDATE ".$schema.".".$db->securetext($p["table"])." SET ".$db->securetext($p["column"])."=".$val." WHERE id='".$db->securetext($p["id"])."';"; + file_put_contents("log/sqlx.log",date('Y-m-d H:i:s').":".$usql."\n", FILE_APPEND); $html["result"] = $db->exec($usql); } } diff --git a/app/lib/POT/Period.php b/app/lib/POT/Period.php index ee39b12f..7cc99d05 100644 --- a/app/lib/POT/Period.php +++ b/app/lib/POT/Period.php @@ -36,10 +36,12 @@ class Period{ select '".$prd["id"]."' as id_reportperiod,id_staff from ".$schema.".staffcontract sc left join ".$schema.".staff st on (st.id=sc.id_staff) where st.isdeleted is null and sc.enddate is null or ( sc.startdate between date('".$prdstart["rpstart"]."') and date ('".$prdend["rpend"]."')) or (sc.enddate between date('".$prdstart["rpstart"]."') and date('".$prdend["rpend"]."')) on conflict on constraint uniq_staffreportperiod_cal do nothing returning id_staff;"); + $st = new Staff($this->dbh, $this->cfg); foreach ($staff as $s){ //add staff period row - $this->setStaffPeriodDays($schema,$prd["id"],$s["id"]); - $this->updateStaffPeriod($schema,$prd["id"],$s["id"]); + $st->setStaffContractDays($schema,$s["id_staff"]); + $this->setStaffPeriodDays($schema,$prd["id"],$s["id_staff"]); + $this->updateStaffPeriod($schema,$prd["id"],$s["id_staff"]); } return $prd["id"]; } @@ -49,7 +51,7 @@ class Period{ return $ret; } -public function getMonthsByStaff($schema,$id_staff,$id_groups){ +public function getMonthsByStaff($schema,$id_staff,$id_groups=null){ $where = ""; $wgroups = ""; if (isset($id_staff) && $id_staff != null){ @@ -512,8 +514,8 @@ public function updatePeriodDaySums($schema,$dayids){ from ( select id, recuperationhours,vacancyhours,vacillhours,vacextrahours,otherpaidhours,payedpause,partunemplhours,nighthours, case when timestart1 is not null and timeend1 is not null then case when timeend1 < timestart1 then '24:00:00'::interval + timeend1::interval - timestart1::interval else timeend1::interval - timestart1::interval end else '00:00:00'::interval end as dt1, case when timestart2 is not null and timeend2 is not null then case when timeend2 < timestart2 then '24:00:00'::interval + timeend2::interval - timestart2::interval else timeend2::interval - timestart2::interval end else '00:00:00'::interval end as dt2, - case when pausestart1 is not null and pauseend1 is not null then case when pauseend1 < pausestart1 then '24:00:00'::interval + pauseend1::interval - pausestart1::interval else pauseend1::interval - pausestart1::interval end else '00:00:00'::interval end as pdt1, - case when pausestart2 is not null and pauseend2 is not null then case when pauseend2 < pausestart2 then '24:00:00'::interval + pauseend2::interval - pausestart2::interval else pauseend2::interval - pausestart2::interval end else '00:00:00'::interval end as pdt2, + case when pausestart1 is not null and pauseend1 is not null and pausestart1 < timestart1 then case when pauseend1 < pausestart1 then '24:00:00'::interval + pauseend1::interval - pausestart1::interval else pauseend1::interval - pausestart1::interval end else '00:00:00'::interval end as pdt1, + case when pausestart2 is not null and pauseend2 is not null and pausestart2 < timestart2 then case when pauseend2 < pausestart2 then '24:00:00'::interval + pauseend2::interval - pausestart2::interval else pauseend2::interval - pausestart2::interval end else '00:00:00'::interval end as pdt2, case when timestart2 is not null and timeend1 is not null and timestart1 is not null and timeend2 is not null then timestart2::interval - timeend1::interval else null end as interruption, diff --git a/app/lib/POT/Staff.php b/app/lib/POT/Staff.php index 358cbac5..90e184f2 100644 --- a/app/lib/POT/Staff.php +++ b/app/lib/POT/Staff.php @@ -56,13 +56,13 @@ public function setStaffContractDays($schema ,$id_staff){ startdate >= date((select min(startdate) from ".$schema.".staffcontract where id_staff='".$id_staff."')) or date((select min(startdate) from ".$schema.".staffcontract where id_staff='".$id_staff."')) between startdate and enddate order by startdate,enddate;"; $perioddata = $this->dbh->queryarray($periodssql); - + $stopdate = $this->dbh->query("select enddate from ".$schema.".staffcontract where id_staff='".$id_staff."' order by enddate desc nulls first limit 1;"); $period = new Period($this->dbh,$this->cfg); foreach ($perioddata as $pp){ - $period->setStaffPeriodDays($schema,$pp["id"],$id_staff); $this->dbh->exec("INSERT INTO ".$schema.".staffreportperiod (id_reportperiod, id_staff) VALUES ('".$pp["id"]."','".$id_staff."') on conflict on constraint uniq_staffreportperiod_cal do nothing;"); + $period->setStaffPeriodDays($schema,$pp["id"],$id_staff); } $cpsql = "select reportperiodunit,reportperiodlength from public.companies where schemata='".$schema."'"; $rprol = $this->dbh->query($cpsql); diff --git a/app/lib/POT/TimeTracker.php b/app/lib/POT/TimeTracker.php index 8e2534e0..8be8e895 100644 --- a/app/lib/POT/TimeTracker.php +++ b/app/lib/POT/TimeTracker.php @@ -135,7 +135,7 @@ public function setTracker($schema,$tracker,$data){ $cmd = 'bin/setstaff.sh \''.$cmd.'\''; } - //error_log("CMD to SEND:". $cmd); + file_put_contents("log/sendtimetrack.log",date("Y-m-d H:i:s").";CMD to SEND:Host:".print_r($hh,true).": ". $cmd."\n",FILE_APPEND); $res = array(); foreach ($hh as $host){ $res[$host] = $this->exec_curl('{"cl":"ssh","fn":"exec","host":"'.$host.'","cmd":"'.$cmd.'"}'); @@ -216,6 +216,8 @@ public function setTracker($schema,$tracker,$data){ xx.fritime,xx.frientry,xx.friexit, xx.sattime,xx.satentry,xx.satexit, xx.suntime,xx.sunentry,xx.sunexit, + zz.monthstamptime as amonthsum, + uu.workhours as amonthwork,uu.hoursdiff as amonthdiff, xx.weeksum from ( select st.id as id_staff,st.staffnumber,coalesce(st.surname || ' ','') || coalesce(st.prename,'') as staffname,gg.groupname from ".$schema.".staffcontract sc join ".$schema.".staff st on (st.id=sc.id_staff) left join ".$schema.".staffgroups gg on (gg.id=st.id_staffgroup) where (sc.enddate >= date(date_trunc('week',date('".$date."'))) or enddate is null) and sc.startdate <= date(date_trunc('week',date('".$date."')) + interval '6 days') @@ -252,7 +254,35 @@ public function setTracker($schema,$tracker,$data){ case when sum(coalesce((stamp_out-stamp_in)::interval,'00:00:00')) >= '06:00:00'::interval then sum(coalesce((stamp_out-stamp_in)::interval,'00:00:00')) - '00:30:00'::interval else sum(coalesce((stamp_out-stamp_in)::interval,'00:00:00')) end as daystamptime, date_part('isodow',daydate) as dow,daydate from ".$schema.".timetracker tt where tt.daydate between date_trunc('week',date('".$date."')) and date(date_trunc('week',date('".$date."')) + interval '6 days') group by tt.id_staff,daydate - ) ttd group by id_staff,cw) xx on yy.id_staff=xx.id_staff order by staffnumber,staffname;"; + ) ttd group by id_staff,cw) xx on yy.id_staff=xx.id_staff left join ( + select id_staff,to_char(sum(daystamptime),'HH24:MI') as monthstamptime from ( + select id_staff, + daydate, + case when sum(coalesce((stamp_out-stamp_in)::interval,'00:00:00')) >= '06:00:00'::interval then sum(coalesce((stamp_out-stamp_in)::interval,'00:00:00')) - '00:30:00'::interval else sum(coalesce((stamp_out-stamp_in)::interval,'00:00:00')) end as daystamptime, + date_part('isodow',daydate) as dow,daydate + from ".$schema.".timetracker tt where tt.daydate between date_trunc('month',date('".$date."')) and date(date_trunc('month',date('".$date."')) + interval '1 Month' - interval '1 day') group by tt.id_staff,daydate) uu group by uu.id_staff + ) zz on yy.id_staff=zz.id_staff + left join ( + select + pdu.id_staff, + coalesce(case when position('-' in to_char(sum(pdu.dayhours)-sum(pdu.contracthours), 'HH24:MI'::text)) > 0 then '-' || replace(to_char(sum(pdu.dayhours)-sum(pdu.contracthours), 'HH24:MI'::text),'-','') else to_char(sum(pdu.dayhours)-sum(pdu.contracthours), 'HH24:MI'::text) end,'00:00') as hoursdiff, + coalesce(to_char(sum(pdu.contracthours), 'HH24:MI'::text),'00:00') as contracthours, + coalesce(to_char(sum(pdu.workhours), 'HH24:MI'::text),'00:00') as workhours, + coalesce(to_char(sum(pdu.dayhours), 'HH24:MI'::text),'00:00') as dayhours + from ".$schema.".staffreportperioddays pdu + join ( + select id as id_reportperiod,date(date_trunc('month',date(substartdate))) as splitter,date(substartdate) as startdate, date(date(substartdate) + subinterval::interval - interval '1 day') as enddate from ( + select rpx.id,rpx.subinterval, date(generate_series(rpx.startdate::timestamp,rpx.enddate::timestamp,rpx.subinterval::interval)) as substartdate from ".$schema.".reportperiod rpx + ) gp + ) psplit on (pdu.daydate between psplit.startdate and psplit.enddate) + join ".$schema.".staffreportperiod srp on (pdu.id_staff=srp.id_staff and srp.id_reportperiod=psplit.id_reportperiod) + join ".$schema.".reportperiod rp on (rp.id=srp.id_reportperiod) + join ".$schema.".staff st on (pdu.id_staff=st.id) + LEFT JOIN ".$schema.".staffgroups sgr ON st.id_staffgroup = sgr.id + WHERE st.isdeleted IS null and daydate between date_trunc('month',date('".$date."')) and date(date_trunc('month',date('".$date."')) + interval '1 Month' - interval '1 day') + group by srp.id,pdu.id_staff,psplit.id_reportperiod,psplit.splitter,sgr.groupname + ) uu on yy.id_staff=uu.id_staff + order by staffnumber,staffname;"; return $this->dbh->queryarray($xsql); } diff --git a/app/lib/config.php b/app/lib/config.php index 237cdb6f..25caaa83 100644 --- a/app/lib/config.php +++ b/app/lib/config.php @@ -24,7 +24,7 @@ "user" => 'potlu2_user', "password" => 'dMY8xGB6cBLzrDGE', "logfile" => "log/sql.log", - "debug" => 0 + "debug" => 1 ), "htxuser" => "htx", "htxpwd" => "Aib5aevo", diff --git a/app/lib/version.php b/app/lib/version.php index c63b8031..383bf1c9 100644 --- a/app/lib/version.php +++ b/app/lib/version.php @@ -1,5 +1,5 @@ -
+
diff --git a/app/tmpl/module/index.html b/app/tmpl/module/index.html index dfb9298b..7199f47a 100644 --- a/app/tmpl/module/index.html +++ b/app/tmpl/module/index.html @@ -70,7 +70,20 @@ {{ lbl.newpassword }} - + {% if (debug == '1') %} +
+
+

{{ lbl.staff }}

+
+ +
+ {% endif %} {{ include('block/dlgterms.html') }} {{ include('block/dlg_newpassword.html') }} diff --git a/app/tmpl/module/periods/periodday.js b/app/tmpl/module/periods/periodday.js index 24935511..05377ab6 100644 --- a/app/tmpl/module/periods/periodday.js +++ b/app/tmpl/module/periods/periodday.js @@ -74,7 +74,7 @@ let periodday = { wpdata["fn"] ="saveform"; wpdata["table"]="staffreportperioddays"; wpdata["schemata"] = schemata; - //console.log(wpdata); + console.log("DayData to save",wpdata); showdataloaddlg('','
{{ lbl.waitmsg }}
'); // console.log("start save day data",wpdata); // postData("db.php",wpdata).then(data => { diff --git a/app/tmpl/module/periods/reportperiod.js b/app/tmpl/module/periods/reportperiod.js index 6e55b4a6..ce9d3bd4 100644 --- a/app/tmpl/module/periods/reportperiod.js +++ b/app/tmpl/module/periods/reportperiod.js @@ -189,7 +189,8 @@ let reportperiod ={ } else { postData("db.php",{"fn":"add_reportperiod","schemata":schemata}).then(nrepid => { //console.log(nrepid); - reportperiod.gettbldata(); + reportperiod.gettbldatafilter(); + //reportperiod.gettbldata(); }).catch(err => { console.log(err)}); } diff --git a/app/tmpl/module/periods/staffperiodweeks.js b/app/tmpl/module/periods/staffperiodweeks.js index 160c19b9..46ff1add 100644 --- a/app/tmpl/module/periods/staffperiodweeks.js +++ b/app/tmpl/module/periods/staffperiodweeks.js @@ -201,9 +201,10 @@ let staffperiodweeks = { //console.log("Data to Set",data2.result); //staffperiodweeks.tbl.redraw(); staffperiodweeks.tbl.setData(data2.result.data).then(dd => { - if (staffperiodweeks.selectedid != null){ - staffperiodweeks.tbl.selectRow(staffperiodweeks.selectedid); - staffperiodweeks.tbl.scrollToRow(staffperiodweeks.selectedid, "center", false); + console.log("PeriodDay selected ID",periodday.selectedid); + if (periodday.selectedid != null){ + staffperiodweeks.tbl.selectRow(periodday.selectedid); + staffperiodweeks.tbl.scrollToRow(periodday.selectedid, "center", false); } }); @@ -333,7 +334,7 @@ let staffperiodweeks = { let sel = staffperiodweeks.tbl.getSelectedData(); let selrp = staffperiodweeks.parenttbl.getSelectedData(); if (sel.length > 0){ - staffperiodweeks.selectedid = sel[0].id; + periodday.selectedid = sel[0].id; asel = []; for (s=0;s 0){ - staffperiodweeks.selectedid = sel[0].id; + periodday.selectedid = sel[0].id; asel = []; for (s=0;s 0){ - staffperiodweeks.selectedid = sel[0].id; + periodday.selectedid = sel[0].id; let id_workplan = staffperiodweeks.choices["id_workplan"].selected(); let keepvac = document.getElementById("keepvacancy").checked; let keeprec = document.getElementById("keeprecuperation").checked; @@ -400,7 +401,14 @@ let staffperiodweeks = { }, settransferdiff(){ - } + }, + updateWeekHours: function(){ + let selrp = staffperiodweeks.parenttbl.getSelectedData(); + postData("db.php",{"cl":"Period","fn":"updateStaffPeriod","schema":schemata,"id_period":selrp[0].id_reportperiod,"id_staff":selrp[0].id_staff}).then( data => { + //dataform.formsaved({}); + // closedataloaddlg(); + }).catch(e => {closedataloaddlg();}); + }, }; let nullFormatter = function(cell, formatterParams){ diff --git a/app/tmpl/module/staff/staff.js b/app/tmpl/module/staff/staff.js index 776987e0..d632a5bc 100644 --- a/app/tmpl/module/staff/staff.js +++ b/app/tmpl/module/staff/staff.js @@ -31,7 +31,7 @@ let staff ={ mode: 'inline', display: 'block', width: '100%', - height: '150', + height: '97', popupDisplay: 'full', buttonList: [ ['bold', 'underline','italic','strike','fontSize','fontColor'] diff --git a/app/tmpl/module/staff/staffmonths.js b/app/tmpl/module/staff/staffmonths.js index b30ce2e5..2bc5a710 100644 --- a/app/tmpl/module/staff/staffmonths.js +++ b/app/tmpl/module/staff/staffmonths.js @@ -49,8 +49,11 @@ let staffmonths = { gettbldata: function(){ //console.log("stafftable data"); postData("db.php",{ "cl":"Period","fn":"getMonthsByStaff","schema":schemata,"id_staff":staff.current_id,"id_groups":'{{session.staffgroups}}'}).then(data => { - //console.log("staffdata",data); - staffmonths.tbl.setData(data.result.data); + //console.log("staffmonth Data",data); + if (data.result.data){ + staffmonths.tbl.setData(data.result.data); + } + }); }, diff --git a/app/tmpl/module/timeclock/timeclock.js b/app/tmpl/module/timeclock/timeclock.js index d3240342..d977fdfb 100644 --- a/app/tmpl/module/timeclock/timeclock.js +++ b/app/tmpl/module/timeclock/timeclock.js @@ -55,8 +55,16 @@ let timeclock = { columns: [ { title: "{{ lbl.staffnumber }}",field: "staffnumber",headerFilter:"input",frozen:true,tooltip:false}, { title: "{{ lbl.staffname }}",field: "staffname",headerFilter:"input", frozen: true,tooltip:false}, - { title: "{{ lbl.weektotal }}",field: "weeksum",headerSort: false,width:100,formatter:boldFormatter, frozen: true,tooltip:false}, - { title: "{{ lbl.monthtotal }}",field: "monthsum",headerSort: false,width:100,formatter:boldFormatter, frozen: true,tooltip:false}, + { title: "{{ lbl.month }}",frozen: true, + columns: [ + {title:'Soll',field:"amonthwork",headerSort: false,width:70,tooltip:false,formatter:}, + {title:'Ist',field:"amonthsum",headerSort: false,width:70,tooltip:false}, + // {title:'Diff',field:"monthdiff",headerSort: false,width:60,tooltip:false}, + ] + }, + { title: "{{ lbl.weektotal }}",field: "weeksum",headerSort: false,width:70,formatter:boldFormatter, frozen: true,tooltip:false}, + + //{ title: "{{ lbl.monthtotal }}",field: "monthsum",headerSort: false,width:100,formatter:boldFormatter, frozen: true,tooltip:false}, { title: "DD.MM.YYYY", columns: [ {title:'',field:"monentry",headerSort: false,width:60,tooltip:true}, diff --git a/app/tmpl/module/timetrack/app.js b/app/tmpl/module/timetrack/app.js index bbd63dab..5a472575 100644 --- a/app/tmpl/module/timetrack/app.js +++ b/app/tmpl/module/timetrack/app.js @@ -3,7 +3,7 @@ -let preferences= {"lang":"fr"}; +let pref= {"lang":"fr"}; let app = { currentview: null, @@ -58,6 +58,9 @@ let app = { } document.addEventListener("DOMContentLoaded", function() { + if (!pref.companyid){ + app.viewpanel('trackerconfig'); + } //preferences = usersystem.getPref('hourtrax'); //console.log("Content loaded",preferences); //db.connect(usersystem.dataPath() + preferences.db); diff --git a/app/tmpl/module/timetrack/panels/config.html b/app/tmpl/module/timetrack/panels/config.html new file mode 100644 index 00000000..2683efea --- /dev/null +++ b/app/tmpl/module/timetrack/panels/config.html @@ -0,0 +1,26 @@ +
+
+
Settings!
+ + + + +
+
+
+
+ + +
+
+ + +
+
+ + +
+
+
+
\ No newline at end of file diff --git a/app/tmpl/module/timetrack/panels/pincode.html b/app/tmpl/module/timetrack/panels/pincode.html new file mode 100644 index 00000000..9a1deb12 --- /dev/null +++ b/app/tmpl/module/timetrack/panels/pincode.html @@ -0,0 +1,37 @@ + + \ No newline at end of file diff --git a/app/tmpl/module/timetrack/panels/scanbadge.html b/app/tmpl/module/timetrack/panels/scanbadge.html new file mode 100644 index 00000000..20baff56 --- /dev/null +++ b/app/tmpl/module/timetrack/panels/scanbadge.html @@ -0,0 +1,16 @@ + +
+
+
Scan badge!
+ + + + +
+
+
+
+ +
+
\ No newline at end of file diff --git a/app/tmpl/module/timetrack/panels/screensaver.html b/app/tmpl/module/timetrack/panels/screensaver.html new file mode 100644 index 00000000..333f441e --- /dev/null +++ b/app/tmpl/module/timetrack/panels/screensaver.html @@ -0,0 +1,5 @@ + +
+
+ +
\ No newline at end of file diff --git a/app/tmpl/module/timetrack/panels/statusmsg.html b/app/tmpl/module/timetrack/panels/statusmsg.html new file mode 100644 index 00000000..e688cd21 --- /dev/null +++ b/app/tmpl/module/timetrack/panels/statusmsg.html @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/app/tmpl/module/timetrack/panels/timetrack.html b/app/tmpl/module/timetrack/panels/timetrack.html new file mode 100644 index 00000000..21e19c9e --- /dev/null +++ b/app/tmpl/module/timetrack/panels/timetrack.html @@ -0,0 +1,51 @@ + \ No newline at end of file diff --git a/app/tmpl/module/timetrack/panels/userlist.html b/app/tmpl/module/timetrack/panels/userlist.html new file mode 100644 index 00000000..127024ee --- /dev/null +++ b/app/tmpl/module/timetrack/panels/userlist.html @@ -0,0 +1,12 @@ + +
+
+
Sélectionner votre nom!
+ + + + + +
+
+
\ No newline at end of file diff --git a/app/tmpl/module/timetrack/timeclock.js b/app/tmpl/module/timetrack/timeclock.js new file mode 100644 index 00000000..1c3d1cff --- /dev/null +++ b/app/tmpl/module/timetrack/timeclock.js @@ -0,0 +1,360 @@ + +let timeclock = { + current_index: null, + current_staff_id: null, + currentpanel: null, + currentwday: null, + tbl: null, + lasttrack: null, + interval: null, + lang: pref.lang, + userdata: [], + weekdays:['sun','mon','tue','wed','thu','fri','sat'], + currentuserlist: 1, + intervaltime: pref.timeout, + loadscreensaver: function(){ + timeclock.lang = "fr"; + ////console.log("Load screensaver"); + timeclock.currentpanel = 'screensaver'; + timeclock.currentuser= null; + //shell.nfcunload(); + timeclock.stopCheckIdle(); + app.viewpanel('screensaver'); + return false; + }, + loadstatus: function(msg){ + if (msg == null){ + msg = ''; + } + document.getElementById("statusmsg").innerHTML=msg; + app.viewpanel('status'); + setTimeout('timeclock.loadscreensaver()',3000); + }, + loadusers: function(){ + ////console.log("Load users"); + timeclock.currentpanel = 'users'; + timeclock.current_staff_id=null; + + if (pref.pinview == "1"){ + document.getElementById("btn_haspincode").style.display = 'block'; + } else { + document.getElementById("btn_haspincode").style.display = 'none'; + } + //shell.nfcwaitbadge(); + app.viewpanel('users'); + timeclock.startCheckIdle(); + return false; + }, + loaduserlist: function(){ + timeclock.stopCheckIdle(); + //shell.nfcunload(); + let ulist = ""; + db.queryarray("select * from (select st.id,coalesce(st.prename,'') as prename,coalesce(st.surname,'') as surname, count(fp.id) as badgecount,st.pin, fp.id as nfcuid from staff st left join badges fp on (st.id=fp.id_staff) group by st.id order by st.surname,st.prename) where badgecount > 0 order by surname,prename;").then(data => { + ////console.log("userdata",data); + timeclock.userdata = data; + if (timeclock.userdata.length > 24){ + document.getElementById("mnubtn_usersprev").style.display = 'block'; + document.getElementById("mnubtn_usersnext").style.display = 'block'; + } + ulistnum = 1; + for (i=0; i < timeclock.userdata.length;i++){ + ulist += ''; + if (i == 23) {ulistnum++;ulist += ''; + document.getElementById('userlists').innerHTML=ulist; + app.viewpanel('userlist'); + }); + return false; + }, + + prevusers: function(){ + let ulx = document.getElementsByClassName("userlistdata"); + ////console.log(ulx); + if (timeclock.currentuserlist == 1 ){ return false;} + for (u=0;u 0 order by surname,prename;").then(data => { + + let ulist = document.getElementById("userlistbadge"); + ulist.innerHTML =''; + for (i=0; i < data.length;i++){ + var uadata = '
  • '+ + ''+ data[i].surname + ' ' + data[i].prename +'
    ('+data[i].nfcuid+')
    '; + //console.log("has pin:",data[i].pin,pref.pinview); + if ((pref.pinview == "1") && (data[i].pin != null)){ + //console.log("set pin button!"); + uadata += '×Pin'; + } + uadata += '×'+ + '×'+ + '
  • '; + ulist.insertAdjacentHTML("beforeend",uadata); + } + }); + }, + cleanpincode: function(iduser){ + db.exec("UPDATE staff set pin=null where id='"+iduser+"'").then(data => { + timeclock.loadbadges(); + }); + }, + addbadge: function(){ + document.getElementById("addbagescanimg").style.display ='block'; + document.getElementById("addusertobadge").style.display ='none'; + //.nfcimportid(); + app.viewpanel('addbadge'); + }, + setbadgetouser: function(nuid){ + db.queryarray("select * from (select st.id,coalesce(st.prename,'') as prename,coalesce(st.surname,'') as surname, count(fp.id) as badgecount from staff st left join badges fp on (st.id=fp.id_staff) group by st.id order by st.surname,st.prename) where badgecount == 0 order by surname,prename;").then(data => { + document.getElementById("addbagescanimg").style.display ='none'; + document.getElementById("addusertobadge").style.display ='block'; + let ulist = document.getElementById("userlistnobadge"); + ulist.innerHTML =''; + for (i=0; i < data.length;i++){ + ulist.insertAdjacentHTML("beforeend",'
  • '+ data[i].surname + ' ' + data[i].prename +'
  • '); + } + }); + }, + savebadge: function(nuid,staffid){ + let sql = "REPLACE INTO badges (id,id_staff,type) VALUES ('" +nuid+"','" +staffid+"','nfc');"; + db.exec(sql).then(data => { + syncdata.sendnfcuid(staffid); + app.snackbar('Badge Added','green'); + timeclock.loadbadges(); + }).catch(e => { + app.snackbar('error on saving','red'); + timeclock.loadbadges();} + ); + }, + removebadge: function(staffid){ + let sql = "DELETE FROM badges where id_staff='" +staffid+"';"; + db.exec(sql).then(data => { + syncdata.sendnfcuid(staffid); + app.snackbar('badge deleted!','green'); + timeclock.loadbadges(); + }).catch(e => { + app.snackbar('error on saving','red'); + timeclock.loadbadges();} + ); + }, + loadpincode: function(uindex){ + + timeclock.current_index = uindex; + + //console.log("Current Index",timeclock.current_index); + //console.log("Current Userdata",timeclock.userdata[timeclock.current_index]); + timeclock.selectfield('pincode','pincode2'); + document.getElementById("pincode").value=""; + document.getElementById("pincode2").value=""; + if (timeclock.current_index == null){ + document.getElementById("lbl_username").innerHTML = "Administrator"; + //load admin + document.getElementById("pincode2").style.display="none"; + } else { + //load user + document.getElementById("lbl_username").innerHTML = timeclock.userdata[timeclock.current_index].surname + " " + timeclock.userdata[timeclock.current_index].prename; + if (timeclock.userdata[timeclock.current_index].pin == null){ + document.getElementById("pincode2").style.display="inline"; + } else { + document.getElementById("pincode2").style.display="none"; + } + } + + timeclock.startCheckIdle(); + app.viewpanel('pincode'); + return false; + }, + checkuserpin: function(){ + timeclock.stopCheckIdle(); + let pcode = document.getElementById("pincode").value; + //console.log(pcode +" = " + pref.pincode ); + //console.log('CIndex',timeclock.current_index); + if (document.getElementById("pincode2").style.display == 'inline'){ + if (document.getElementById("pincode2").value != document.getElementById("pincode").value){ + document.getElementById("pincode").value = ""; + document.getElementById("pincode2").value = ""; + timeclock.startCheckIdle(); + app.snackbar(lang['fr'].pincode_notsame,'red'); + return false; + } else { + db.exec("UPDATE staff SET pin='"+document.getElementById("pincode").value+ "' where id='"+timeclock.userdata[timeclock.current_index].id+"';").then(data => { + timeclock.current_staff_id = timeclock.userdata[timeclock.current_index].id; + timeclock.loadtimetrack(); + }).catch(e => { app.snackbar("Erreur de sauvegarde!",'red');}); + + } + } + else if ((timeclock.current_index == null) && (pcode == pref.pincode)){ + ////console.log("goto badge registration"); + app.viewpanel("admin"); + } else if ((timeclock.current_index != null) && (timeclock.userdata[timeclock.current_index].pin = document.getElementById("pincode").value)){ + timeclock.current_staff_id = timeclock.userdata[timeclock.current_index].id; + timeclock.loadtimetrack(); + } + else { + document.getElementById("pincode").value = ""; + timeclock.startCheckIdle(); + app.snackbar(lang['fr'].pinerrormsg,'red'); + } + return false; + }, + selectfield: function(fid,fid2){ + timeclock.pinfield = fid; + document.getElementById(fid).style.backgroundColor = 'yellow'; + document.getElementById(fid2).style.backgroundColor = 'white'; + }, + loadtimetrack: function(){ + timeclock.stopCheckIdle(); + document.getElementById("btntrackin").disabled = true; + document.getElementById("btntrackout").disabled = true; + var sql = "select tt.id,st.id as id_staff,st.lang,st.isenabled,date('now','localtime') as today,strftime('%w',date('now','localtime')) as weekday,date('now','-1 day','localtime') as yesterday,strftime('%H:%M',time('now','localtime')) as timenow,st.prename,st.surname,st.monstart,st.monend,st.tuestart,st.tueend,st.wedstart,st.wedend,st.thustart,st.thuend,st.fristart,st.friend,st.satstart,st.satend,st.sunstart,st.sunend,tt.daydate,tt.stamp_in,tt.stamp_out from staff st left join timetracks tt on (st.id=tt.id_staff) where st.id='" + timeclock.current_staff_id + "' or tt.stamp_in=(select max(stamp_in) as stamp_in from timetracks where id_staff='" + timeclock.current_staff_id + "') order by tt.stamp_in DESC LIMIT 1;"; + db.query(sql).then(trdata => { + //console.log("userdata",trdata); + + let ulang = timeclock.lang; + if (trdata.lang != null){ + ulang = trdata.lang; + timeclock.lang=trdata.lang; + } + if (trdata.isenabled != '1'){ + app.snackbar(lang[ulang].badge_notauthorized,'red'); + timeclock.startCheckIdle(); + return false; + } else { + app.setlanguage(ulang); + } + let today = trdata.today; + let yesterday = trdata.yesterday; + let hournow = trdata.timenow; + let weekday = timeclock.weekdays[trdata.weekday]; + let regmsg = ""; + if (trdata){ + timeclock.lasttrack = trdata; + + } + let notimeauth = false; + if ((trdata[weekday + "start"] != null) || (trdata[weekday + "end"] != null)){ + + if ((trdata[weekday + "start"] > hournow) || (trdata[weekday + "end"] < hournow)){ + notimeauth =true; + } + if (trdata[weekday + "start"] != null){ + regmsg += lang[ulang].msgstarttime+"
    "; + } + if (trdata[weekday + "end"] != null) { + regmsg += lang[ulang].msgendtime+"
    "; + } + } + if (notimeauth == true){ + regmsg = regmsg.replace(/%%daystarttime%%/g,trdata[weekday + "start"]).replace(/%%dayendtime%%/g,trdata[weekday + "end"]); + timeclock.loadstatus(regmsg); + return false; + } + document.getElementById("username").innerHTML = trdata.surname+" " + trdata.prename; + if (trdata.stamp_in != null && trdata.stamp_out == null){ + if (((trdata.daydate == yesterday) && (hournow < "06:00:00")) || (trdata.daydate == today)){ + document.getElementById("btntrackout").disabled = false; + } else { + document.getElementById("btntrackin").disabled = false; + } + } else { + document.getElementById("btntrackin").disabled = false; + } + app.viewpanel('timetrack'); + timeclock.startCheckIdle(); + }).catch(e => { + //console.log("SQL error: " + e); + document.getElementById("btntrackin").disabled = false; + timeclock.startCheckIdle(); + return false; + }); + + }, + setTrack:function (direction){ + let sql = ""; + db.newuuid().then(newid => { + var syncid=newid.id; + if (direction == 'in'){ + sql = "INSERT INTO timetracks (id,id_staff,daydate, stamp_in) VALUES ('"+ newid.id+"','"+timeclock.current_staff_id+"',date('now','localtime'),datetime('now','localtime'));"; + } else if (direction == 'out'){ + syncid=timeclock.lasttrack.id; + sql = "UPDATE timetracks SET stamp_out=datetime('now','localtime') where id_staff='"+ timeclock.current_staff_id+"' and id='"+timeclock.lasttrack.id+"';"; + } + + ////console.log("SET TrackSQL",sql); + db.exec(sql).then(data => { + //console.log("LANG:" + timeclock.lang); + var msgreg = lang[timeclock.lang].msgtrackregistered; + timeclock.loadstatus(msgreg); + syncdata.track(syncid); + }).catch(e => { + app.snackbar('ERROR on saving (1)!','red'); + }); + + }).catch(e => { + app.snackbar('ERROR on saving (2)!','red'); + }); + + + +}, + checkIdle: function (){ + if (timeclock.intervaltime <= 0){ + timeclock.loadscreensaver(); + } else { + document.getElementById("timer").innerHTML = timeclock.intervaltime; + timeclock.intervaltime = timeclock.intervaltime - 1; + } +}, +startCheckIdle: function (){ + window.clearInterval(timeclock.interval); + timeclock.intervaltime = pref.timeout; + document.getElementById("timer").style.display = 'block'; + + timeclock.interval = window.setInterval("timeclock.checkIdle()",1000); + +}, +stopCheckIdle: function (){ + document.getElementById("timer").style.display = 'none'; + window.clearInterval(timeclock.interval); +}, +setPinValue: function(key){ + var cobj = document.getElementById(timeclock.pinfield); + var cpin = cobj.value; + cobj.value = cpin + key; + return false; +}, +clearUserPin: function(){ + document.getElementById(timeclock.pinfield).value = ""; + return false; +} + + +} diff --git a/app/tmpl/timetrack.html b/app/tmpl/timetrack.html index d2456710..2c1523fa 100644 --- a/app/tmpl/timetrack.html +++ b/app/tmpl/timetrack.html @@ -7,74 +7,17 @@ POT - TimeTrack - -
    - -
    -
    - -
    - - - - - + +
    + {{ include("module/timetrack/panels/config.html")}} + {{ include("module/timetrack/panels/screensaver.html")}} + {{ include("module/timetrack/panels/scanbadge.html")}} + {{ include("module/timetrack/panels/userlist.html")}} + {{ include("module/timetrack/panels/timetrack.html")}} + {{ include("module/timetrack/panels/statusmsg.html")}} + {{ include("module/timetrack/panels/pincode.html")}} - + - - +
    @@ -170,6 +77,6 @@ - + diff --git a/icons/Accounting_01.svg b/icons/Accounting_01.svg new file mode 100644 index 00000000..bd28c94f --- /dev/null +++ b/icons/Accounting_01.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/icons/Data_Add.svg b/icons/Data_Add.svg new file mode 100644 index 00000000..d791206f --- /dev/null +++ b/icons/Data_Add.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/icons/Data_Copy.svg b/icons/Data_Copy.svg new file mode 100644 index 00000000..8e9c30c6 --- /dev/null +++ b/icons/Data_Copy.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/icons/Data_Delete.svg b/icons/Data_Delete.svg new file mode 100644 index 00000000..bba5aeb0 --- /dev/null +++ b/icons/Data_Delete.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/icons/Data_Import.svg b/icons/Data_Import.svg new file mode 100644 index 00000000..d73e8430 --- /dev/null +++ b/icons/Data_Import.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/icons/Data_Information.svg b/icons/Data_Information.svg new file mode 100644 index 00000000..c8139b75 --- /dev/null +++ b/icons/Data_Information.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/icons/Data_Network.svg b/icons/Data_Network.svg new file mode 100644 index 00000000..bbabb01c --- /dev/null +++ b/icons/Data_Network.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/icons/Data_Replace.svg b/icons/Data_Replace.svg new file mode 100644 index 00000000..a37ffa6f --- /dev/null +++ b/icons/Data_Replace.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/icons/Data_Synchronize.svg b/icons/Data_Synchronize.svg new file mode 100644 index 00000000..2bc30d75 --- /dev/null +++ b/icons/Data_Synchronize.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/icons/Document_Music.svg b/icons/Document_Music.svg new file mode 100644 index 00000000..95ac7e0d --- /dev/null +++ b/icons/Document_Music.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/icons/E_Service_01.svg b/icons/E_Service_01.svg new file mode 100644 index 00000000..2474b04f --- /dev/null +++ b/icons/E_Service_01.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/icons/Euro_Tag.svg b/icons/Euro_Tag.svg new file mode 100644 index 00000000..c6d4736a --- /dev/null +++ b/icons/Euro_Tag.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/icons/Exit___03.svg b/icons/Exit___03.svg new file mode 100644 index 00000000..422872d2 --- /dev/null +++ b/icons/Exit___03.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/icons/Export___02.svg b/icons/Export___02.svg new file mode 100644 index 00000000..a4eaf408 --- /dev/null +++ b/icons/Export___02.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/icons/Folder_Open_01.svg b/icons/Folder_Open_01.svg new file mode 100644 index 00000000..66c9c4a2 --- /dev/null +++ b/icons/Folder_Open_01.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/icons/Graduate_Degree.svg b/icons/Graduate_Degree.svg new file mode 100644 index 00000000..01f9db3e --- /dev/null +++ b/icons/Graduate_Degree.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/icons/Import__02.svg b/icons/Import__02.svg new file mode 100644 index 00000000..17a78f70 --- /dev/null +++ b/icons/Import__02.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/icons/Internet_Facilities.svg b/icons/Internet_Facilities.svg new file mode 100644 index 00000000..cc74b2b2 --- /dev/null +++ b/icons/Internet_Facilities.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/icons/Location__02.svg b/icons/Location__02.svg new file mode 100644 index 00000000..5f43a8ec --- /dev/null +++ b/icons/Location__02.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/icons/Lock_Information.svg b/icons/Lock_Information.svg new file mode 100644 index 00000000..912f19ae --- /dev/null +++ b/icons/Lock_Information.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/icons/MS_System_settings_Configuration_Manger_02.svg b/icons/MS_System_settings_Configuration_Manger_02.svg new file mode 100644 index 00000000..61bc7ca1 --- /dev/null +++ b/icons/MS_System_settings_Configuration_Manger_02.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/icons/Microsoft_Excel_2013_01.svg b/icons/Microsoft_Excel_2013_01.svg new file mode 100644 index 00000000..6c14cc2b --- /dev/null +++ b/icons/Microsoft_Excel_2013_01.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/icons/Office.svg b/icons/Office.svg new file mode 100644 index 00000000..aed572e0 --- /dev/null +++ b/icons/Office.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/icons/Out.svg b/icons/Out.svg new file mode 100644 index 00000000..4b16d40d --- /dev/null +++ b/icons/Out.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/icons/Payment_02.svg b/icons/Payment_02.svg new file mode 100644 index 00000000..9af60acf --- /dev/null +++ b/icons/Payment_02.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/icons/Pending_Invoice.svg b/icons/Pending_Invoice.svg new file mode 100644 index 00000000..dd8f4826 --- /dev/null +++ b/icons/Pending_Invoice.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/icons/Product_Box.svg b/icons/Product_Box.svg new file mode 100644 index 00000000..9cb14f37 --- /dev/null +++ b/icons/Product_Box.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/icons/Product_Box_With_Disc.svg b/icons/Product_Box_With_Disc.svg new file mode 100644 index 00000000..01e34ac5 --- /dev/null +++ b/icons/Product_Box_With_Disc.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/icons/Receipt.svg b/icons/Receipt.svg new file mode 100644 index 00000000..e119c21a --- /dev/null +++ b/icons/Receipt.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/icons/Sand_Clock__01.svg b/icons/Sand_Clock__01.svg new file mode 100644 index 00000000..fb95791a --- /dev/null +++ b/icons/Sand_Clock__01.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/icons/Save_As.svg b/icons/Save_As.svg new file mode 100644 index 00000000..459843de --- /dev/null +++ b/icons/Save_As.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/icons/Scale.svg b/icons/Scale.svg new file mode 100644 index 00000000..149a0bd4 --- /dev/null +++ b/icons/Scale.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/icons/Shopping_02.svg b/icons/Shopping_02.svg new file mode 100644 index 00000000..bbe6144b --- /dev/null +++ b/icons/Shopping_02.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/icons/Show.svg b/icons/Show.svg new file mode 100644 index 00000000..0685f131 --- /dev/null +++ b/icons/Show.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/icons/Sync___03.svg b/icons/Sync___03.svg new file mode 100644 index 00000000..28e19788 --- /dev/null +++ b/icons/Sync___03.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/icons/Team_02.svg b/icons/Team_02.svg new file mode 100644 index 00000000..e5871bae --- /dev/null +++ b/icons/Team_02.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/icons/Timer.svg b/icons/Timer.svg new file mode 100644 index 00000000..0d671911 --- /dev/null +++ b/icons/Timer.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/icons/User_Group.svg b/icons/User_Group.svg new file mode 100644 index 00000000..d9a90798 --- /dev/null +++ b/icons/User_Group.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/icons/Web.svg b/icons/Web.svg new file mode 100644 index 00000000..25b0bfff --- /dev/null +++ b/icons/Web.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/icons/add_user.svg b/icons/add_user.svg new file mode 100644 index 00000000..24cea400 --- /dev/null +++ b/icons/add_user.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/icons/addressbook.svg b/icons/addressbook.svg new file mode 100644 index 00000000..b9439448 --- /dev/null +++ b/icons/addressbook.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/icons/app.svg b/icons/app.svg new file mode 100644 index 00000000..acfbeae1 --- /dev/null +++ b/icons/app.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/icons/arrow_down.svg b/icons/arrow_down.svg new file mode 100644 index 00000000..89e7185e --- /dev/null +++ b/icons/arrow_down.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/icons/arrow_up.svg b/icons/arrow_up.svg new file mode 100644 index 00000000..eedcaa81 --- /dev/null +++ b/icons/arrow_up.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/icons/arrowhead_down.svg b/icons/arrowhead_down.svg new file mode 100644 index 00000000..e77ecc7c --- /dev/null +++ b/icons/arrowhead_down.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/icons/arrowhead_up.svg b/icons/arrowhead_up.svg new file mode 100644 index 00000000..7b47ae66 --- /dev/null +++ b/icons/arrowhead_up.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/icons/bill.svg b/icons/bill.svg new file mode 100644 index 00000000..b891cd29 --- /dev/null +++ b/icons/bill.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/icons/cash_register.svg b/icons/cash_register.svg new file mode 100644 index 00000000..64290ff7 --- /dev/null +++ b/icons/cash_register.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/icons/cheque.svg b/icons/cheque.svg new file mode 100644 index 00000000..8a3148de --- /dev/null +++ b/icons/cheque.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/icons/clipboard.svg b/icons/clipboard.svg new file mode 100644 index 00000000..c79c16c6 --- /dev/null +++ b/icons/clipboard.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/icons/clock.svg b/icons/clock.svg new file mode 100644 index 00000000..54d008ea --- /dev/null +++ b/icons/clock.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/icons/closed.svg b/icons/closed.svg new file mode 100644 index 00000000..a6c22a2e --- /dev/null +++ b/icons/closed.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/icons/cloud_upload.svg b/icons/cloud_upload.svg new file mode 100644 index 00000000..7773d035 --- /dev/null +++ b/icons/cloud_upload.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/icons/contacts_edit.svg b/icons/contacts_edit.svg new file mode 100644 index 00000000..11dbea7c --- /dev/null +++ b/icons/contacts_edit.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/icons/contatcs.svg b/icons/contatcs.svg new file mode 100644 index 00000000..f8f1f125 --- /dev/null +++ b/icons/contatcs.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/icons/creditcard.svg b/icons/creditcard.svg new file mode 100644 index 00000000..a6d63627 --- /dev/null +++ b/icons/creditcard.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/icons/info_circle.svg b/icons/info_circle.svg new file mode 100644 index 00000000..0c87a6d6 --- /dev/null +++ b/icons/info_circle.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/icons/users.svg b/icons/users.svg new file mode 100644 index 00000000..b92977c2 --- /dev/null +++ b/icons/users.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/pointeuse/.hourtrax/auth.clear.passwd b/pointeuse/.hourtrax/auth.clear.passwd new file mode 100644 index 00000000..565877f5 --- /dev/null +++ b/pointeuse/.hourtrax/auth.clear.passwd @@ -0,0 +1 @@ +kilian=fb1ia1ka \ No newline at end of file diff --git a/pointeuse/.hourtrax/auth.passwd b/pointeuse/.hourtrax/auth.passwd new file mode 100644 index 00000000..2f4bd9ab --- /dev/null +++ b/pointeuse/.hourtrax/auth.passwd @@ -0,0 +1 @@ +kilian=0ecf731e2426a8a469f06e9f4a3bcbed6f8071d9d3e3ef7ef5fd9165021e27ec \ No newline at end of file diff --git a/pointeuse/.hourtrax/hourtrax.conf b/pointeuse/.hourtrax/hourtrax.conf new file mode 100644 index 00000000..aeeb2790 --- /dev/null +++ b/pointeuse/.hourtrax/hourtrax.conf @@ -0,0 +1,15 @@ +daemon=0 +datapath=/mnt/c/Users/kilian/Workspace/hourtrax/.hourtrax +pidfile=hourtrax.pid +dbfile=hourtrax.sqlite +pwdfile=auth.passwd +debug=1 +timeout=30 +port=8080 +#mode=deployment +mode=development +potuser=ksaffran@dks.lu +potpwd=ntHesDUDWeQVs +potschema=portanova +poturl=http://app.pot.lan +name=elch-pointeuse \ No newline at end of file diff --git a/pointeuse/.hourtrax/hourtrax.json b/pointeuse/.hourtrax/hourtrax.json new file mode 100644 index 00000000..8c7891a1 --- /dev/null +++ b/pointeuse/.hourtrax/hourtrax.json @@ -0,0 +1,5 @@ +{ + "type":"fingerprint", + "db": "hourtrax.sqlite", + "timeout":30 +} \ No newline at end of file diff --git a/pointeuse/.hourtrax/hourtrax.sql b/pointeuse/.hourtrax/hourtrax.sql new file mode 100644 index 00000000..d1759223 --- /dev/null +++ b/pointeuse/.hourtrax/hourtrax.sql @@ -0,0 +1,66 @@ +CREATE TABLE badges ( id text, id_staff text, type text, primary key (id) ); + + + +CREATE TABLE staff ( + id TEXT NOT NULL, + staffnumber TEXT, + prename TEXT, + surname TEXT, + pin TEXT, + rfid TEXT, + isblocked BOOLEAN, + isdisabled BOOLEAN, + isdeleted BOOLEAN, + modified DATETIME DEFAULT (datetime('now','localtime')), + created DATETIME DEFAULT (datetime('now','localtime')), + PRIMARY KEY (id) +); +CREATE TABLE timetracks ( + id text not null, + id_staff TEXT, + daydate date, + stamp_in DATETIME, + stamp_out DATETIME, + tracktype TEXT, + modified DATETIME DEFAULT (datetime('now','localtime')), + created DATETIME DEFAULT (datetime('now','localtime')), + primary key (id) +); +CREATE TABLE fingerprints ( + id_staff TEXT, + fingerhash TEXT, + fingertype integer, + modified DATETIME DEFAULT (datetime('now','localtime')), + created DATETIME DEFAULT (datetime('now','localtime')), + primary key (id_staff,fingerhash) +); +CREATE TABLE staffworktimes ( + id TEXT not null, + id_staff TEXT, + daydate date, + starttime1 TEXT, + endtime1 TEXT, + starttime2 TEXT, + endtime2 TEXT, + modified DATETIME DEFAULT (datetime('now','localtime')), + created DATETIME DEFAULT (datetime('now','localtime')), + primary key (id) +); +CREATE TRIGGER trg_staff_upd UPDATE ON staff + BEGIN + UPDATE staff SET modified=datetime('now','localtime') WHERE id = NEW.id; + END; +CREATE TRIGGER trg_timetracks_upd UPDATE ON timetracks + BEGIN + UPDATE timetracks SET modified=datetime('now','localtime') WHERE id = NEW.id; + END; +CREATE TRIGGER trg_staffworktimes_upd UPDATE ON staffworktimes + BEGIN + UPDATE staffworktimes SET modified=datetime('now','localtime') WHERE id = NEW.id; + END; + CREATE TRIGGER trg_fingerprints_upd UPDATE ON staff + BEGIN + --UPDATE staffworktimes SET modified=datetime('now','localtime') WHERE id_staff = NEW.id_staff and fingertype= NEW.fingertype; + END; + alter table staff add column monstart TEXT;alter table staff add column monend TEXT;alter table staff add column tuestart TEXT;alter table staff add column tueend TEXT;alter table staff add column wedstart TEXT;alter table staff add column wedend TEXT;alter table staff add column thustart TEXT;alter table staff add column thuend TEXT;alter table staff add column fristart TEXT;alter table staff add column friend TEXT;alter table staff add column satstart TEXT;alter table staff add column satend TEXT;alter table staff add column sunstart TEXT;alter table staff add column sunend TEXT; diff --git a/pointeuse/.hourtrax/hourtrax.sqlite b/pointeuse/.hourtrax/hourtrax.sqlite new file mode 100644 index 00000000..4759d313 Binary files /dev/null and b/pointeuse/.hourtrax/hourtrax.sqlite differ diff --git a/pointeuse/.hourtrax/potsync.conf b/pointeuse/.hourtrax/potsync.conf new file mode 100644 index 00000000..7267af79 --- /dev/null +++ b/pointeuse/.hourtrax/potsync.conf @@ -0,0 +1,6 @@ +USERAGENT=POT Hourtrax +POTAPIKEY=6b9c80d2-9153-11eb-8558-efa3f9982293 +POTAPIURL=http://app.pot.lan/potapp/api.php +POTSCHEMA=alicehartmann +POTLASTSYNCFROMSERVER= +POTLASTSYNCTOSERVER= diff --git a/pointeuse/.hourtrax/staff.json b/pointeuse/.hourtrax/staff.json new file mode 100644 index 00000000..e69de29b diff --git a/pointeuse/.hourtrax/sync.conf b/pointeuse/.hourtrax/sync.conf new file mode 100644 index 00000000..8ecb978f --- /dev/null +++ b/pointeuse/.hourtrax/sync.conf @@ -0,0 +1,6 @@ +htxuser="htx" +htxpwd="Aib5aevo" +htxurl="https://htx.plandutravail.lu/htx/api.php" +htxschema="demo" +htxstation="dhart-pot03" +HOSTS=(172.16.10.186 172.16.10.170 172.16.10.186) \ No newline at end of file diff --git a/pointeuse/dev/.config/lxsession/LXDE-pi/autostart b/pointeuse/dev/.config/lxsession/LXDE-pi/autostart new file mode 100644 index 00000000..2c98ce92 --- /dev/null +++ b/pointeuse/dev/.config/lxsession/LXDE-pi/autostart @@ -0,0 +1,6 @@ +#@lxpanel --profile LXDE-pi +#@pcmanfm --desktop --profile LXDE-pi +#@xscreensaver -no-splash +#@point-rpi +@/home/dks/bin/startapp.sh + diff --git a/pointeuse/dev/DKS-VPN-dks-hourtraxtest.ovpn b/pointeuse/dev/DKS-VPN-dks-hourtraxtest.ovpn new file mode 100644 index 00000000..0793f27d --- /dev/null +++ b/pointeuse/dev/DKS-VPN-dks-hourtraxtest.ovpn @@ -0,0 +1,153 @@ +client +dev tun +proto udp +remote vsrv01.dks.lu 1098 +remote arandks.lu 1098 + +remote-random +resolv-retry infinite +nobind +persist-key +persist-tun +mute-replay-warnings + +-----BEGIN CERTIFICATE----- +MIIDHjCCAgagAwIBAgIJAK61AhpxApOUMA0GCSqGSIb3DQEBCwUAMA8xDTALBgNV +BAMMBGFyYW4wHhcNMTcxMjE4MTM0MTIyWhcNMjcxMjE2MTM0MTIyWjAPMQ0wCwYD +VQQDDARhcmFuMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA1TydPk4X +8YyPjXI0htiMsM9C5jP0iH/Hgl7w+t0NL6fvcJhwy8BntJ/FRlS/GFoszmH+0zSt +pVeymgEwSQ2SrZixSkln2XhbTIH/NUEHosdllECJgj83W0Kpbtms8Cs6/FfhvMB4 +4o/GnN/mkmA9kslguStksV2vQh98Os9rw5gEKM5qFYO5FYUZIIrcsLgyzztPpw4H +vhrAzxuuu+zg9cOGAihlWV+CSlQJDZyC9hH9xal8UsTlYn9HFqVjr39k7OJg0WC6 +gyjQ92nzqEw49Jkb3NMAarF0zPcP25WV97Aq7EDZV/G8LZbg4p+xCrkz2iUJttu1 +CZjhS9uNsvIAYQIDAQABo30wezAdBgNVHQ4EFgQUqVEvl+MVxdWqNx36igfxqjrJ +f9QwPwYDVR0jBDgwNoAUqVEvl+MVxdWqNx36igfxqjrJf9ShE6QRMA8xDTALBgNV +BAMMBGFyYW6CCQCutQIacQKTlDAMBgNVHRMEBTADAQH/MAsGA1UdDwQEAwIBBjAN +BgkqhkiG9w0BAQsFAAOCAQEAysh4aGsnv4CebGvzZ9mZlmK5o4JTj4bqRw8sFe4h +wW/bZ0ggMnnvNZF1VJJgO/UQQq2gIiOw7zLrlSmPHIhRPkQspemk6uU0m2h6K9rn +AnX3qeVP5dXbZsqr1jI1/aCzxSW5hu6WUfR3Q+u1pGm9HePhrRJj0djW8Kd7UO+s +PfpIN9gbfLoLnAfCJIc3BccBoD5IqU4s7vleekQGCJHloT5S3MefiIUg7d8leW4V +8PiCohkgHwMOZy3ACy1ZPuT92x+7JCaNV56X7iT3GZhkyQ4tSKu3UpMFkz8obYKw +8RrNsXXBRWgnuakkMY6wHJJZBPJn+qDrWbO7nxVTOqY22g== +-----END CERTIFICATE----- + + +Certificate: + Data: + Version: 3 (0x2) + Serial Number: + 1f:72:81:5c:11:93:98:f3:ab:da:e0:8e:19:74:cd:57 + Signature Algorithm: sha256WithRSAEncryption + Issuer: CN=aran + Validity + Not Before: Oct 27 08:51:46 2020 GMT + Not After : Oct 25 08:51:46 2030 GMT + Subject: CN=dks-hourtraxtest + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + Public-Key: (2048 bit) + Modulus: + 00:a8:62:e0:84:c5:db:87:18:f3:e1:4e:8d:45:e2: + 15:d5:36:69:71:df:fa:9b:73:6f:d8:78:6d:f9:7c: + d4:34:06:e4:af:a2:31:41:dc:ec:f0:9f:6e:ce:6c: + 33:a5:d0:b0:d2:04:c5:a7:dd:55:aa:55:79:80:2c: + 13:5b:89:75:fd:b6:a6:e4:9f:39:8d:40:59:d1:5b: + 83:e6:c6:c0:0a:42:89:70:c2:cc:67:ea:61:39:51: + 32:36:7c:77:78:4f:99:ec:f0:0e:2f:b7:c7:98:df: + 9b:9a:3e:6b:4d:ce:b4:6e:82:21:b5:23:f5:37:12: + 2c:62:f2:e1:95:56:af:cb:77:71:ec:e7:86:b6:ed: + 95:44:3c:75:c9:7b:33:0a:da:9d:2f:75:9d:9d:5c: + 01:f0:8a:99:68:1d:7f:c0:9d:e9:3f:54:50:ce:0e: + 15:b9:39:a0:a2:f4:21:ee:ec:50:9a:c2:e2:de:91: + 75:77:16:7d:32:c9:32:b8:6b:ae:81:1b:3b:69:bf: + b1:5e:d2:16:10:4b:ad:c3:43:20:96:65:59:ff:a1: + 4c:b8:0e:e6:4b:b7:88:17:cf:97:97:a6:c1:67:ff: + a9:82:44:81:06:be:57:75:22:c2:02:d8:55:8d:aa: + 85:e5:84:46:7c:a9:67:a0:3a:47:71:04:1a:83:3f: + 9a:3d + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Basic Constraints: + CA:FALSE + X509v3 Subject Key Identifier: + AB:70:9E:30:68:BA:3B:A9:6E:4C:E3:DA:D7:48:7D:3E:F8:77:85:43 + X509v3 Authority Key Identifier: + keyid:A9:51:2F:97:E3:15:C5:D5:AA:37:1D:FA:8A:07:F1:AA:3A:C9:7F:D4 + DirName:/CN=aran + serial:AE:B5:02:1A:71:02:93:94 + + X509v3 Extended Key Usage: + TLS Web Client Authentication + X509v3 Key Usage: + Digital Signature + Signature Algorithm: sha256WithRSAEncryption + 6b:ea:b4:0d:1a:2a:4b:fc:80:3f:71:d7:e2:cf:50:23:07:bc: + 11:36:de:c2:a1:84:de:15:69:46:a1:24:ed:d0:2b:fe:9f:7e: + 12:46:69:1f:44:78:e7:e7:60:4a:19:82:6c:76:49:4b:76:31: + 46:7b:d3:6e:6e:b6:a4:93:75:9c:87:af:bf:fa:05:b1:97:d9: + c1:a0:6e:68:e3:f4:f2:21:fc:59:48:8e:d3:7e:d5:44:df:e7: + 49:04:17:6d:93:db:69:7c:90:f4:1a:d5:92:03:cf:53:c1:bf: + 8f:3b:56:8a:46:9c:03:10:0e:bf:5a:27:2a:06:9d:4e:e5:78: + 6e:87:00:46:ec:21:4d:a1:bc:fe:e9:c1:9c:f3:b2:95:18:69: + e9:61:b8:0a:6c:ee:1d:12:ff:93:b6:3d:b5:ba:ca:52:c7:88: + 90:50:2d:55:12:84:12:a7:8c:dc:4f:a7:70:51:d0:4d:cb:66: + 8e:9a:ab:b1:07:88:d8:3f:6d:1c:6b:24:97:4b:80:ee:5d:01: + c8:d9:a9:bc:ce:7a:c1:a1:b1:6f:23:28:13:42:e6:0a:2d:ed: + dc:62:e8:ad:62:54:e9:23:11:c9:fa:e9:c3:85:fd:39:a9:8b: + db:e5:91:99:35:fe:f1:78:b4:4a:a4:ab:67:fe:53:55:00:45: + cc:1b:66:ea +-----BEGIN CERTIFICATE----- +MIIDRTCCAi2gAwIBAgIQH3KBXBGTmPOr2uCOGXTNVzANBgkqhkiG9w0BAQsFADAP +MQ0wCwYDVQQDDARhcmFuMB4XDTIwMTAyNzA4NTE0NloXDTMwMTAyNTA4NTE0Nlow +GzEZMBcGA1UEAwwQZGtzLWhvdXJ0cmF4dGVzdDCCASIwDQYJKoZIhvcNAQEBBQAD +ggEPADCCAQoCggEBAKhi4ITF24cY8+FOjUXiFdU2aXHf+ptzb9h4bfl81DQG5K+i +MUHc7PCfbs5sM6XQsNIExafdVapVeYAsE1uJdf22puSfOY1AWdFbg+bGwApCiXDC +zGfqYTlRMjZ8d3hPmezwDi+3x5jfm5o+a03OtG6CIbUj9TcSLGLy4ZVWr8t3cezn +hrbtlUQ8dcl7MwranS91nZ1cAfCKmWgdf8Cd6T9UUM4OFbk5oKL0Ie7sUJrC4t6R +dXcWfTLJMrhrroEbO2m/sV7SFhBLrcNDIJZlWf+hTLgO5ku3iBfPl5emwWf/qYJE +gQa+V3UiwgLYVY2qheWERnypZ6A6R3EEGoM/mj0CAwEAAaOBkDCBjTAJBgNVHRME +AjAAMB0GA1UdDgQWBBSrcJ4waLo7qW5M49rXSH0++HeFQzA/BgNVHSMEODA2gBSp +US+X4xXF1ao3HfqKB/GqOsl/1KETpBEwDzENMAsGA1UEAwwEYXJhboIJAK61Ahpx +ApOUMBMGA1UdJQQMMAoGCCsGAQUFBwMCMAsGA1UdDwQEAwIHgDANBgkqhkiG9w0B +AQsFAAOCAQEAa+q0DRoqS/yAP3HX4s9QIwe8ETbewqGE3hVpRqEk7dAr/p9+EkZp +H0R45+dgShmCbHZJS3YxRnvTbm62pJN1nIevv/oFsZfZwaBuaOP08iH8WUiO037V +RN/nSQQXbZPbaXyQ9BrVkgPPU8G/jztWikacAxAOv1onKgadTuV4bocARuwhTaG8 +/unBnPOylRhp6WG4CmzuHRL/k7Y9tbrKUseIkFAtVRKEEqeM3E+ncFHQTctmjpqr +sQeI2D9tHGskl0uA7l0ByNmpvM56waGxbyMoE0LmCi3t3GLorWJU6SMRyfrpw4X9 +OamL2+WRmTX+8Xi0SqSrZ/5TVQBFzBtm6g== +-----END CERTIFICATE----- + + +-----BEGIN PRIVATE KEY----- +MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCoYuCExduHGPPh +To1F4hXVNmlx3/qbc2/YeG35fNQ0BuSvojFB3Ozwn27ObDOl0LDSBMWn3VWqVXmA +LBNbiXX9tqbknzmNQFnRW4PmxsAKQolwwsxn6mE5UTI2fHd4T5ns8A4vt8eY35ua +PmtNzrRugiG1I/U3Eixi8uGVVq/Ld3Hs54a27ZVEPHXJezMK2p0vdZ2dXAHwiplo +HX/Anek/VFDODhW5OaCi9CHu7FCawuLekXV3Fn0yyTK4a66BGztpv7Fe0hYQS63D +QyCWZVn/oUy4DuZLt4gXz5eXpsFn/6mCRIEGvld1IsIC2FWNqoXlhEZ8qWegOkdx +BBqDP5o9AgMBAAECggEAaTy6s2BxDiMDMNoGIxnkqUeDaT8hggwIZ9MEcHuaqBVy +0W3duRsZHl2WQ/6N3ODr0aZX3czP4E/hSsDBLGFh07pW3eXBc003lUfLzOyEUyU4 +frfQRlXOg6MCbdkmVZPyUInLY/lJDnsZ5bGDILLCQ5qi9HHPrKZ4BTNk1w/BeLhf +Z2CVRMMb3TxDTqozco31dyhz+kBjYK6qVk6mmWnLVLEOTowL3Nblv+titUZ7kqOv +zbJzPoFV562jQ181hNoF7ANb01K8Kb/Wu3V7ScT9ARrKNC6vUgvjZ61/CwLp+kSM +oheAU/CEALwHEQqESJ1C9eGuruE0XCmLIRq4CT70xQKBgQDVNstIPpNDZ6mgOK3O +bcdk+8U042tyTCElpmUMK6yaN4cvdQPy5jjUoSE0pD+4YWGhf5AtlwSDt4pdUY/W +kgFYBYqjcCa8aL75BLwM6wxR6fRCyBoMThWsX0N9Ep4jqN9J6raiSK+AmANTUucT +e+r7XIn8sG374gGrxv29Cn7yjwKBgQDKLTHPK+ejV7tmjQYn/RZelvEo6gN59Cnh +unOgGescM4GVrZoZd+1pV+Zyz0BRY/EbKVojuYQBiax0lKNfwXPvhDmbBNwxLoWL +7cvUgPOGNlDFqsYyfp2HxYRXt83NZYiSAHGCsZPPyXp1+XpiaCQCPkv+NHXaH+yS +uO6zf78ccwKBgC7QxzXnt4IXYuFxUIiBBkUgGx8PyGniWWzg6lMPy+hYxPAgq2tM +LbJSZu4eGnerujoxvkCkZjNdu53d6M1eZbkkDlrwpzC7dyNKbNgRTDU4P4/iTAXj +p1Kf4Du4OMzvqYebZ9qeRxrfReunymE21lO27/1x59RkvaUwHkrB4Tn1AoGBAK0K +46/7VyaiZ56No7BEWYoaTU0EhncyOUqfyGlG5cncd9RBozybPhPFDVRE+TrwfKQP +z7v2A/tA999MfUzvCij+FkQNc92QgPNUU/qNaGH+SUH2Oe9sGa7kqrJdeoOLnMnC +IWWIUggt3WfuYQarNe7JnUd1ZU2Nt3GZYY03EL7rAoGAfo5Wku2uopyMoXaY22dr +GsATfARJl8ElzlGZsrDiIc/IgOZ8iW9m09GYhD+rvrQ5JQnMAGp0Kwaywxvbm0iu +ica5EvlmC+YYHq9ZhVmtrhSDaEkHHcg6uK5/Y1Bde+wSepHFKYuUnNXIXF4K0fDM +FA8Wa4lSMpexLi/4loLf+gE= +-----END PRIVATE KEY----- + +comp-lzo +verb 3 +mute 20 +cipher AES-256-CBC diff --git a/pointeuse/dev/UART-Fignerprint-RaspberryPi.tar.gz b/pointeuse/dev/UART-Fignerprint-RaspberryPi.tar.gz new file mode 100644 index 00000000..c99dbd22 Binary files /dev/null and b/pointeuse/dev/UART-Fignerprint-RaspberryPi.tar.gz differ diff --git a/pointeuse/dev/UART_Fingerprint_Sensor_(C)_User_Manual_en.pdf b/pointeuse/dev/UART_Fingerprint_Sensor_(C)_User_Manual_en.pdf new file mode 100644 index 00000000..594a676c Binary files /dev/null and b/pointeuse/dev/UART_Fingerprint_Sensor_(C)_User_Manual_en.pdf differ diff --git a/pointeuse/dev/db/dumpdb.sh b/pointeuse/dev/db/dumpdb.sh new file mode 100644 index 00000000..6d193e65 --- /dev/null +++ b/pointeuse/dev/db/dumpdb.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +CALLDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +sqlite3 "${CALLDIR}/../../data/hourtrax.sqlite" ".dump" > "${CALLDIR}/hourtrax.sqlite.dump.sql" +sqlite3 "${CALLDIR}/../../data/hourtrax.sqlite" ".schema" > "${CALLDIR}/hourtrax.sqlite.schema.sql" \ No newline at end of file diff --git a/pointeuse/dev/db/hourtrax.backup.sql b/pointeuse/dev/db/hourtrax.backup.sql new file mode 100644 index 00000000..7c0800bf --- /dev/null +++ b/pointeuse/dev/db/hourtrax.backup.sql @@ -0,0 +1,98 @@ +PRAGMA foreign_keys=OFF; +BEGIN TRANSACTION; +CREATE TABLE staff ( + id integer primary key autoincrement not null, + prename TEXT, + surname TEXT, + pin TEXT, + blocked BOOLEAN, + disabled BOOLEAN, + lastmodified DATETIME DEFAULT (datetime('now','localtime')), + weekhours TIME, + dailyhours TIME, + pausehours TIME +); +INSERT INTO staff VALUES(1,'Jennie','KENTON',NULL,NULL,NULL,'2019-11-21 16:07:55',NULL,NULL,NULL); +INSERT INTO staff VALUES(2,'Daniela','Acito',NULL,NULL,NULL,'2019-11-21 16:07:57',NULL,NULL,NULL); +INSERT INTO staff VALUES(3,'Aphrodite','Lyons',NULL,NULL,NULL,'2019-11-21 16:07:57',NULL,NULL,NULL); +INSERT INTO staff VALUES(4,'Liberty','Daugherty',NULL,NULL,NULL,'2019-11-21 16:07:57',NULL,NULL,NULL); +INSERT INTO staff VALUES(5,'Lee','Austin',NULL,NULL,NULL,'2019-11-21 16:07:58',NULL,NULL,NULL); +INSERT INTO staff VALUES(6,'Casey','Michael',NULL,NULL,NULL,'2019-11-21 16:07:58',NULL,NULL,NULL); +INSERT INTO staff VALUES(7,'Josephine','Higgins',NULL,NULL,NULL,'2019-11-21 16:07:58',NULL,NULL,NULL); +INSERT INTO staff VALUES(8,'Prescott','Terrell',NULL,NULL,NULL,'2019-11-21 16:07:58',NULL,NULL,NULL); +INSERT INTO staff VALUES(9,'Zelda','Mcdonald',NULL,NULL,NULL,'2019-11-21 16:07:58',NULL,NULL,NULL); +INSERT INTO staff VALUES(10,'Merrill','Blackwell',NULL,NULL,NULL,'2019-11-21 16:07:58',NULL,NULL,NULL); +INSERT INTO staff VALUES(11,'Caleb','Vance',NULL,NULL,NULL,'2019-11-21 16:07:58',NULL,NULL,NULL); +INSERT INTO staff VALUES(12,'Walker','Singleton',NULL,NULL,NULL,'2019-11-21 16:07:58',NULL,NULL,NULL); +INSERT INTO staff VALUES(13,'Rhea','Romero',NULL,NULL,NULL,'2019-11-21 16:07:58',NULL,NULL,NULL); +INSERT INTO staff VALUES(14,'Chiquita','Simmons',NULL,NULL,NULL,'2019-11-21 16:07:59',NULL,NULL,NULL); +INSERT INTO staff VALUES(15,'Quinn','Mcpherson',NULL,NULL,NULL,'2019-11-21 16:07:59',NULL,NULL,NULL); +INSERT INTO staff VALUES(16,'Nomlanga','Ortega',NULL,NULL,NULL,'2019-11-21 16:07:59',NULL,NULL,NULL); +INSERT INTO staff VALUES(17,'Freya','Mccormick',NULL,NULL,NULL,'2019-11-21 16:07:59',NULL,NULL,NULL); +INSERT INTO staff VALUES(18,'Kiara','Dickerson',NULL,NULL,NULL,'2019-11-21 16:07:59',NULL,NULL,NULL); +INSERT INTO staff VALUES(19,'Kendall','Watson',NULL,NULL,NULL,'2019-11-21 16:07:59',NULL,NULL,NULL); +INSERT INTO staff VALUES(20,'Portia','Knowles',NULL,NULL,NULL,'2019-11-21 16:07:59',NULL,NULL,NULL); +INSERT INTO staff VALUES(21,'Breanna','Ortega',NULL,NULL,NULL,'2019-11-21 16:07:59',NULL,NULL,NULL); +INSERT INTO staff VALUES(22,'Xander','Mason',NULL,NULL,NULL,'2019-11-21 16:07:59',NULL,NULL,NULL); +INSERT INTO staff VALUES(23,'Jaden','Huff',NULL,NULL,NULL,'2019-11-21 16:07:59',NULL,NULL,NULL); +INSERT INTO staff VALUES(24,'Levi','Harrington',NULL,NULL,NULL,'2019-11-21 16:08:00',NULL,NULL,NULL); +INSERT INTO staff VALUES(25,'Buffy','Baker',NULL,NULL,NULL,'2019-11-21 16:08:00',NULL,NULL,NULL); +INSERT INTO staff VALUES(26,'Kiara','Aguilar',NULL,NULL,NULL,'2019-11-21 16:08:00',NULL,NULL,NULL); +INSERT INTO staff VALUES(27,'Piper','Abbott',NULL,NULL,NULL,'2019-11-21 16:08:00',NULL,NULL,NULL); +INSERT INTO staff VALUES(28,'Jerome','Fuller',NULL,NULL,NULL,'2019-11-21 16:08:00',NULL,NULL,NULL); +INSERT INTO staff VALUES(29,'Nasim','Green',NULL,NULL,NULL,'2019-11-21 16:08:00',NULL,NULL,NULL); +INSERT INTO staff VALUES(30,'Jakeem','Carpenter',NULL,NULL,NULL,'2019-11-21 16:08:00',NULL,NULL,NULL); +INSERT INTO staff VALUES(31,'Randall','Simpson',NULL,NULL,NULL,'2019-11-21 16:08:00',NULL,NULL,NULL); +INSERT INTO staff VALUES(32,'Jonas','Stewart',NULL,NULL,NULL,'2019-11-21 16:08:00',NULL,NULL,NULL); +CREATE TABLE preferences ( + id INTEGER PRIMARY KEY AUTOINCREMENT, + ident TEXT, + page TEXT, + preferences TEXT, + modified DATETIME DEFAULT (datetime('now','localtime')) +); +CREATE TABLE hours ( + id integer primary key autoincrement not null, + id_staff integer, + stamp_in DATETIME, + stamp_out DATETIME, + lastmodified DATETIME DEFAULT (datetime('now','localtime')) +, tracktype TEXT); +INSERT INTO hours VALUES(1,1,'2019-11-18 08:04:00','2019-11-18 16:02:00','2019-11-21 15:59:26',NULL); +INSERT INTO hours VALUES(2,1,'2019-11-19 07:58:00','2019-11-19 12:01:00','2019-11-21 16:00:10',NULL); +INSERT INTO hours VALUES(3,1,'2019-11-19 13:03:00','2019-11-19 16:07:00','2019-11-21 15:59:28',NULL); +INSERT INTO hours VALUES(4,1,'2019-11-20 09:30:00','2019-11-20 12:30:00','2019-11-21 16:02:33',NULL); +INSERT INTO hours VALUES(5,1,'2019-11-20 13:30:00','2019-11-20 17:04:00','2019-11-21 16:02:33',NULL); +INSERT INTO hours VALUES(6,1,'2019-11-21 07:30:00','2019-11-21 11:59:00','2019-11-21 16:03:40',NULL); +INSERT INTO hours VALUES(7,1,'2019-11-21 07:30:00','2019-11-21 11:59:00','2019-11-21 16:03:42',NULL); +INSERT INTO hours VALUES(8,1,'2019-11-18 10:01:00','2019-11-18 10:34:00','2019-11-21 16:09:08','pause'); +CREATE TABLE fingerprints ( + id integer primary key autoincrement not null, + id_staff integer, + fingerhash TEXT, + fingersensorpos integer, + fingertype integer, + lastmodified DATETIME DEFAULT (datetime('now','localtime')) +); +DELETE FROM sqlite_sequence; +INSERT INTO sqlite_sequence VALUES('hours',8); +INSERT INTO sqlite_sequence VALUES('staff',32); +CREATE VIEW vw_staff as +SELECT id, prename, surname, pin, blocked, disabled, lastmodified, weekhours, dailyhours, pausehours FROM staff; +CREATE TRIGGER trg_preferences_upd UPDATE ON preferences + BEGIN + UPDATE preferences SET lastmodified=datetime('now','localtime') WHERE id = NEW.id; + END; +CREATE TRIGGER trg_fingerprints_upd UPDATE ON fingerprints + BEGIN + UPDATE fingerprints SET lastmodified=datetime('now','localtime') WHERE id = NEW.id; + END; +CREATE TRIGGER trg_staff_upd UPDATE ON staff + BEGIN + UPDATE staff SET lastmodified=datetime('now','localtime') WHERE id = NEW.id; + END; +CREATE TRIGGER trg_hours_upd UPDATE ON hours + BEGIN + UPDATE hours SET lastmodified=datetime('now','localtime') WHERE id = NEW.id; + END; +COMMIT; diff --git a/pointeuse/dev/db/hourtrax.sql b/pointeuse/dev/db/hourtrax.sql new file mode 100644 index 00000000..6a6c2af6 --- /dev/null +++ b/pointeuse/dev/db/hourtrax.sql @@ -0,0 +1,61 @@ +CREATE TABLE staff ( + id TEXT NOT NULL, + staffnumber TEXT, + prename TEXT, + surname TEXT, + pin TEXT, + rfid TEXT, + isblocked BOOLEAN, + isdisabled BOOLEAN, + isdeleted BOOLEAN, + modified DATETIME DEFAULT (datetime('now','localtime')), + created DATETIME DEFAULT (datetime('now','localtime')), + PRIMARY KEY (id) +); +CREATE TABLE timetracks ( + id text not null, + id_staff TEXT, + daydate date, + stamp_in DATETIME, + stamp_out DATETIME, + tracktype TEXT, + modified DATETIME DEFAULT (datetime('now','localtime')), + created DATETIME DEFAULT (datetime('now','localtime')), + primary key (id) +); +CREATE TABLE fingerprints ( + id_staff TEXT, + fingerhash TEXT, + fingertype integer, + modified DATETIME DEFAULT (datetime('now','localtime')), + created DATETIME DEFAULT (datetime('now','localtime')), + primary key (id_staff,fingerhash) +); +CREATE TABLE staffworktimes ( + id TEXT not null, + id_staff TEXT, + daydate date, + starttime1 TEXT, + endtime1 TEXT, + starttime2 TEXT, + endtime2 TEXT, + modified DATETIME DEFAULT (datetime('now','localtime')), + created DATETIME DEFAULT (datetime('now','localtime')), + primary key (id) +); +CREATE TRIGGER trg_staff_upd UPDATE ON staff + BEGIN + UPDATE staff SET modified=datetime('now','localtime') WHERE id = NEW.id; + END; +CREATE TRIGGER trg_timetracks_upd UPDATE ON staff + BEGIN + UPDATE timetracks SET modified=datetime('now','localtime') WHERE id = NEW.id; + END; +CREATE TRIGGER trg_staffworktimes_upd UPDATE ON staff + BEGIN + UPDATE staffworktimes SET modified=datetime('now','localtime') WHERE id = NEW.id; + END; + CREATE TRIGGER trg_fingerprints_upd UPDATE ON staff + BEGIN + UPDATE staffworktimes SET modified=datetime('now','localtime') WHERE id_staff = NEW.id_staff and fingertype= NEW.fingertype; + END; diff --git a/pointeuse/dev/db/hourtrax.sqlite b/pointeuse/dev/db/hourtrax.sqlite new file mode 100644 index 00000000..98990254 Binary files /dev/null and b/pointeuse/dev/db/hourtrax.sqlite differ diff --git a/pointeuse/dev/db/hourtrax.sqlite.dump.sql b/pointeuse/dev/db/hourtrax.sqlite.dump.sql new file mode 100644 index 00000000..47171bde --- /dev/null +++ b/pointeuse/dev/db/hourtrax.sqlite.dump.sql @@ -0,0 +1,112 @@ +PRAGMA foreign_keys=OFF; +BEGIN TRANSACTION; +CREATE TABLE staff ( + id integer primary key autoincrement not null, + prename TEXT, + surname TEXT, + pin TEXT, + blocked BOOLEAN, + disabled BOOLEAN, + lastmodified DATETIME DEFAULT CURRENT_TIMESTAMP +, weekhours TIME, dailyhours TIME, pausehours TIME, fingerhash TEXT, fingerpos INTEGER); +INSERT INTO staff VALUES(1,'Barbara','BORNAN COLON','1234',NULL,NULL,'2019-10-23 08:49:39',NULL,NULL,NULL,NULL,NULL); +INSERT INTO staff VALUES(2,'Amandine','Lammens','1234',NULL,NULL,'2019-10-23 08:49:39',NULL,NULL,NULL,NULL,NULL); +INSERT INTO staff VALUES(3,'Audrey','MAQUINISTA GRACA',NULL,NULL,NULL,'2019-10-23 08:49:39',NULL,NULL,NULL,NULL,NULL); +INSERT INTO staff VALUES(4,'Jennie','KENTON','1234',NULL,NULL,'2019-10-23 08:49:39',NULL,NULL,NULL,'59b11d663488e01c1cee21ed4a2a14658e0b1fe0a20f2928c77c7522134849a5',0); +INSERT INTO staff VALUES(5,'Daniela','Acito','0000',NULL,NULL,'2019-10-23 08:49:39',NULL,NULL,NULL,NULL,NULL); +INSERT INTO staff VALUES(6,'Aphrodite','Lyons',NULL,NULL,NULL,'2019-10-27 17:57:26',NULL,NULL,NULL,NULL,NULL); +INSERT INTO staff VALUES(7,'Liberty','Daugherty','1234',NULL,NULL,'2019-10-27 17:57:26',NULL,NULL,NULL,NULL,NULL); +INSERT INTO staff VALUES(8,'Lee','Austin','4567',NULL,NULL,'2019-10-27 17:57:26',NULL,NULL,NULL,NULL,NULL); +INSERT INTO staff VALUES(9,'Casey','Michael',NULL,NULL,NULL,'2019-10-27 17:57:26',NULL,NULL,NULL,NULL,NULL); +INSERT INTO staff VALUES(10,'Josephine','Higgins',NULL,NULL,NULL,'2019-10-27 17:57:26',NULL,NULL,NULL,NULL,NULL); +INSERT INTO staff VALUES(11,'Prescott','Terrell',NULL,NULL,NULL,'2019-10-27 17:57:26',NULL,NULL,NULL,NULL,NULL); +INSERT INTO staff VALUES(12,'Zelda','Mcdonald',NULL,NULL,NULL,'2019-10-27 17:57:26',NULL,NULL,NULL,NULL,NULL); +INSERT INTO staff VALUES(13,'Merrill','Blackwell','1234',NULL,NULL,'2019-10-27 17:57:26',NULL,NULL,NULL,NULL,NULL); +INSERT INTO staff VALUES(14,'Caleb','Vance',NULL,NULL,NULL,'2019-10-27 17:57:26',NULL,NULL,NULL,NULL,NULL); +INSERT INTO staff VALUES(15,'Walker','Singleton',NULL,NULL,NULL,'2019-10-27 17:57:26',NULL,NULL,NULL,NULL,NULL); +INSERT INTO staff VALUES(16,'Rhea','Romero',NULL,NULL,NULL,'2019-10-27 17:58:05',NULL,NULL,NULL,NULL,NULL); +INSERT INTO staff VALUES(17,'Chiquita','Simmons',NULL,NULL,NULL,'2019-10-27 17:58:05',NULL,NULL,NULL,NULL,NULL); +INSERT INTO staff VALUES(18,'Quinn','Mcpherson',NULL,NULL,NULL,'2019-10-27 17:58:05',NULL,NULL,NULL,NULL,NULL); +INSERT INTO staff VALUES(19,'Nomlanga','Ortega',NULL,NULL,NULL,'2019-10-27 17:58:05',NULL,NULL,NULL,NULL,NULL); +INSERT INTO staff VALUES(20,'Freya','Mccormick',NULL,NULL,NULL,'2019-10-27 17:58:05',NULL,NULL,NULL,NULL,NULL); +INSERT INTO staff VALUES(21,'Kiara','Dickerson',NULL,NULL,NULL,'2019-10-27 17:58:05',NULL,NULL,NULL,NULL,NULL); +INSERT INTO staff VALUES(22,'Kendall','Watson',NULL,NULL,NULL,'2019-10-27 17:58:05',NULL,NULL,NULL,NULL,NULL); +INSERT INTO staff VALUES(23,'Portia','Knowles',NULL,NULL,NULL,'2019-10-27 17:58:05',NULL,NULL,NULL,NULL,NULL); +INSERT INTO staff VALUES(24,'Breanna','Ortega',NULL,NULL,NULL,'2019-10-27 17:58:05',NULL,NULL,NULL,NULL,NULL); +INSERT INTO staff VALUES(25,'Xander','Mason',NULL,NULL,NULL,'2019-10-27 17:58:05',NULL,NULL,NULL,NULL,NULL); +INSERT INTO staff VALUES(26,'Jaden','Huff',NULL,NULL,NULL,'2019-10-27 18:01:08',NULL,NULL,NULL,NULL,NULL); +INSERT INTO staff VALUES(27,'Levi','Harrington',NULL,NULL,NULL,'2019-10-27 18:01:08',NULL,NULL,NULL,NULL,NULL); +INSERT INTO staff VALUES(28,'Buffy','Baker',NULL,NULL,NULL,'2019-10-27 18:01:08',NULL,NULL,NULL,NULL,NULL); +INSERT INTO staff VALUES(29,'Kiara','Aguilar',NULL,NULL,NULL,'2019-10-27 18:01:08',NULL,NULL,NULL,NULL,NULL); +INSERT INTO staff VALUES(30,'Piper','Abbott',NULL,NULL,NULL,'2019-10-27 18:01:08',NULL,NULL,NULL,NULL,NULL); +INSERT INTO staff VALUES(31,'Jerome','Fuller',NULL,NULL,NULL,'2019-10-27 18:01:08',NULL,NULL,NULL,NULL,NULL); +INSERT INTO staff VALUES(32,'Nasim','Green',NULL,NULL,NULL,'2019-10-27 18:01:08',NULL,NULL,NULL,NULL,NULL); +INSERT INTO staff VALUES(33,'Jakeem','Carpenter',NULL,NULL,NULL,'2019-10-27 18:01:08',NULL,NULL,NULL,NULL,NULL); +INSERT INTO staff VALUES(34,'Randall','Simpson',NULL,NULL,NULL,'2019-10-27 18:01:08',NULL,NULL,NULL,NULL,NULL); +INSERT INTO staff VALUES(35,'Jonas','Stewart',NULL,NULL,NULL,'2019-10-27 18:01:08',NULL,NULL,NULL,NULL,NULL); +CREATE TABLE preferences ( + id INTEGER PRIMARY KEY AUTOINCREMENT, + ident TEXT, + page TEXT, + preferences TEXT, + modified DATETIME DEFAULT CURRENT_TIMESTAMP, + created DATETIME DEFAULT CURRENT_TIMESTAMP +); +CREATE TABLE hours ( + id integer primary key autoincrement not null, + id_staff integer, + stamp_in DATETIME, + stamp_out DATETIME, + lastmodified DATETIME DEFAULT CURRENT_TIMESTAMP +); +INSERT INTO hours VALUES(1,1,'2019-11-12 08:00','2019-11-12 15:00','2019-11-13 14:51:09'); +INSERT INTO hours VALUES(2,1,'2019-11-13 08:00:00','2019-11-13 17:00:00','2019-11-13 14:51:09'); +INSERT INTO hours VALUES(3,1,'2019-11-14 08:00','2019-11-15 13:30','2019-11-13 14:51:09'); +INSERT INTO hours VALUES(4,1,'2019-11-15 16:15:17',NULL,'2019-11-13 14:51:09'); +INSERT INTO hours VALUES(5,1,'2019-11-16 08:39:46','2019-11-16 09:11:24','2019-11-13 14:51:09'); +INSERT INTO hours VALUES(6,2,'2018-02-07 08:40:29','2018-02-07 09:11:35','2018-02-07 08:40:29'); +INSERT INTO hours VALUES(7,1,'2018-02-07 09:11:46',NULL,'2018-02-07 09:11:46'); +INSERT INTO hours VALUES(8,1,'2019-11-17 11:54:16','2019-11-17 11:54:42','2019-11-13 14:51:09'); +INSERT INTO hours VALUES(9,1,'2018-02-07 11:55:27','2018-02-07 12:23:19','2018-02-07 11:55:27'); +INSERT INTO hours VALUES(10,1,'2019-10-23 10:06:59','2019-10-23 10:07:11','2019-10-23 10:06:59'); +INSERT INTO hours VALUES(11,1,'2019-10-23 10:07:34',NULL,'2019-10-23 10:07:34'); +INSERT INTO hours VALUES(12,1,'2019-10-23 10:08:28',NULL,'2019-10-23 10:08:28'); +INSERT INTO hours VALUES(13,1,'2019-10-29 08:41:49',NULL,'2019-10-29 08:41:49'); +INSERT INTO hours VALUES(14,4,'2019-10-30 09:32:27','2019-10-30 09:36:38','2019-10-30 09:32:27'); +INSERT INTO hours VALUES(15,4,'2019-10-30 09:40:45','2019-10-30 09:41:59','2019-10-30 09:40:45'); +INSERT INTO hours VALUES(16,4,'2019-10-30 09:42:14','2019-10-30 16:23:41','2019-10-30 09:42:14'); +CREATE TABLE fingerprints ( + id integer primary key autoincrement not null, + id_staff integer, + fingerhash TEXT, + fingersensorpos integer, + fingertype integer, + lastmodified DATETIME DEFAULT CURRENT_TIMESTAMP +); +CREATE TABLE preferences2 ( + id INTEGER PRIMARY KEY AUTOINCREMENT, + ident TEXT, + page TEXT, + preferences TEXT, + modified DATETIME DEFAULT (datetime('now','localtime')) +); +INSERT INTO preferences2 VALUES(1,'TEST',NULL,NULL,'2019-11-11 11:50:40'); +DELETE FROM sqlite_sequence; +INSERT INTO sqlite_sequence VALUES('staff',35); +INSERT INTO sqlite_sequence VALUES('hours',17); +INSERT INTO sqlite_sequence VALUES('preferences2',1); +CREATE VIEW vw_staff as +SELECT id, prename, surname, pin, blocked, disabled, lastmodified, weekhours, dailyhours, pausehours FROM staff; +CREATE TRIGGER trg_fingerprints_upd UPDATE ON fingerprints + BEGIN + UPDATE fingerprints SET lastmodified=datetime('now','localtime') WHERE id = NEW.id; + END; +CREATE TRIGGER trg_staff_upd UPDATE ON staff + BEGIN + UPDATE staff SET lastmodified=datetime('now','localtime') WHERE id = NEW.id; + END; +CREATE TRIGGER trg_hours_upd UPDATE ON hours + BEGIN + UPDATE hours SET lastmodified=datetime('now','localtime') WHERE id = NEW.id; + END; +COMMIT; diff --git a/pointeuse/dev/db/hourtrax.sqlite.schema.sql b/pointeuse/dev/db/hourtrax.sqlite.schema.sql new file mode 100644 index 00000000..d1622218 --- /dev/null +++ b/pointeuse/dev/db/hourtrax.sqlite.schema.sql @@ -0,0 +1,53 @@ +CREATE TABLE staff ( + id integer primary key autoincrement not null, + prename TEXT, + surname TEXT, + pin TEXT, + blocked BOOLEAN, + disabled BOOLEAN, + lastmodified DATETIME DEFAULT (datetime('now','localtime')), + weekhours TIME, + dailyhours TIME, + pausehours TIME +); +CREATE TABLE preferences ( + id INTEGER PRIMARY KEY AUTOINCREMENT, + ident TEXT, + page TEXT, + preferences TEXT, + modified DATETIME DEFAULT (datetime('now','localtime')) +); +CREATE VIEW vw_staff as +SELECT id, prename, surname, pin, blocked, disabled, lastmodified, weekhours, dailyhours, pausehours FROM staff; + +CREATE TABLE hours ( + id integer primary key autoincrement not null, + id_staff integer, + stamp_in DATETIME, + stamp_out DATETIME, + lastmodified DATETIME DEFAULT (datetime('now','localtime')) +); +CREATE TABLE fingerprints ( + id integer primary key autoincrement not null, + id_staff integer, + fingerhash TEXT, + fingersensorpos integer, + fingertype integer, + lastmodified DATETIME DEFAULT (datetime('now','localtime')) +); +CREATE TRIGGER trg_preferences_upd UPDATE ON preferences + BEGIN + UPDATE preferences SET lastmodified=datetime('now','localtime') WHERE id = NEW.id; + END; +CREATE TRIGGER trg_fingerprints_upd UPDATE ON fingerprints + BEGIN + UPDATE fingerprints SET lastmodified=datetime('now','localtime') WHERE id = NEW.id; + END; +CREATE TRIGGER trg_staff_upd UPDATE ON staff + BEGIN + UPDATE staff SET lastmodified=datetime('now','localtime') WHERE id = NEW.id; + END; +CREATE TRIGGER trg_hours_upd UPDATE ON hours + BEGIN + UPDATE hours SET lastmodified=datetime('now','localtime') WHERE id = NEW.id; + END; \ No newline at end of file diff --git a/pointeuse/dev/db/hourtrax.sqlite.testdata.sql b/pointeuse/dev/db/hourtrax.sqlite.testdata.sql new file mode 100644 index 00000000..2db2d844 --- /dev/null +++ b/pointeuse/dev/db/hourtrax.sqlite.testdata.sql @@ -0,0 +1,32 @@ +INSERT INTO staff (prename, surname) VALUES( 'Jennie', 'KENTON'); +INSERT INTO staff (prename, surname) VALUES( 'Daniela', 'Acito'); +INSERT INTO staff (prename, surname) VALUES( 'Aphrodite', 'Lyons'); +INSERT INTO staff (prename, surname) VALUES( 'Liberty', 'Daugherty'); +INSERT INTO staff (prename, surname) VALUES( 'Lee', 'Austin'); +INSERT INTO staff (prename, surname) VALUES( 'Casey', 'Michael'); +INSERT INTO staff (prename, surname) VALUES( 'Josephine', 'Higgins'); +INSERT INTO staff (prename, surname) VALUES( 'Prescott', 'Terrell'); +INSERT INTO staff (prename, surname) VALUES( 'Zelda', 'Mcdonald'); +INSERT INTO staff (prename, surname) VALUES( 'Merrill', 'Blackwell'); +INSERT INTO staff (prename, surname) VALUES( 'Caleb', 'Vance'); +INSERT INTO staff (prename, surname) VALUES( 'Walker', 'Singleton'); +INSERT INTO staff (prename, surname) VALUES( 'Rhea', 'Romero'); +INSERT INTO staff (prename, surname) VALUES( 'Chiquita', 'Simmons'); +INSERT INTO staff (prename, surname) VALUES( 'Quinn', 'Mcpherson'); +INSERT INTO staff (prename, surname) VALUES( 'Nomlanga', 'Ortega'); +INSERT INTO staff (prename, surname) VALUES( 'Freya', 'Mccormick'); +INSERT INTO staff (prename, surname) VALUES( 'Kiara', 'Dickerson'); +INSERT INTO staff (prename, surname) VALUES( 'Kendall', 'Watson'); +INSERT INTO staff (prename, surname) VALUES( 'Portia', 'Knowles'); +INSERT INTO staff (prename, surname) VALUES( 'Breanna', 'Ortega'); +INSERT INTO staff (prename, surname) VALUES( 'Xander', 'Mason'); +INSERT INTO staff (prename, surname) VALUES( 'Jaden', 'Huff'); +INSERT INTO staff (prename, surname) VALUES( 'Levi', 'Harrington'); +INSERT INTO staff (prename, surname) VALUES( 'Buffy', 'Baker'); +INSERT INTO staff (prename, surname) VALUES( 'Kiara', 'Aguilar'); +INSERT INTO staff (prename, surname) VALUES( 'Piper', 'Abbott'); +INSERT INTO staff (prename, surname) VALUES( 'Jerome', 'Fuller'); +INSERT INTO staff (prename, surname) VALUES( 'Nasim', 'Green'); +INSERT INTO staff (prename, surname) VALUES( 'Jakeem', 'Carpenter'); +INSERT INTO staff (prename, surname) VALUES( 'Randall', 'Simpson'); +INSERT INTO staff (prename, surname) VALUES( 'Jonas', 'Stewart'); diff --git a/pointeuse/dev/db/hourtrax_dev.sql b/pointeuse/dev/db/hourtrax_dev.sql new file mode 100644 index 00000000..81bac3fe --- /dev/null +++ b/pointeuse/dev/db/hourtrax_dev.sql @@ -0,0 +1,52 @@ +PRAGMA foreign_keys=OFF; +BEGIN TRANSACTION; +CREATE TABLE "staff" ( + id TEXT primary key not null, + prename TEXT, + surname TEXT, + pin TEXT, + loginattemps integer, + blocked integer, + lastmodified DATETIME DEFAULT CURRENT_TIMESTAMP +); +INSERT INTO "staff" VALUES('a69d71b8-2e76-4d28-bf4d-475c4086dcf8','Barbara','BORNAN COLON','1234',NULL,NULL,'2018-01-29 08:13:04'); +INSERT INTO "staff" VALUES('fa9c1e71-07c7-4c10-a4bc-3c98bfdab8c3','Amandine','Lammens',NULL,NULL,NULL,'2018-01-28 10:52:45'); +INSERT INTO "staff" VALUES('4d982724-0d60-466f-bd75-b9d1b99305f1','Audrey','MAQUINISTA GRACA',NULL,NULL,NULL,'2018-01-28 10:52:45'); +INSERT INTO "staff" VALUES('cb791aec-47d4-4b2a-b338-68d5ac6001b7','Jennie','KENTON',NULL,NULL,NULL,'2018-01-28 10:52:45'); +INSERT INTO "staff" VALUES('f1a3bbb4-eb7d-485e-a902-cd0024339645','Daniela','Acito ',NULL,NULL,NULL,'2018-01-28 10:52:46'); +CREATE TABLE "contract" ( + id integer primary key autoincrement not null, + idstaff TEXT NOT NULL, + startdate DATE DEFAULT CURRENT_DATE, + weekhours REAL DEFAULT 40.0, + lastmodified DATETIME DEFAULT CURRENT_TIMESTAMP +); +INSERT INTO "contract" VALUES(1,'a69d71b8-2e76-4d28-bf4d-475c4086dcf8','2015-01-27',40.0,'2018-01-28 10:52:46'); +INSERT INTO "contract" VALUES(2,'fa9c1e71-07c7-4c10-a4bc-3c98bfdab8c3','2013-04-01',40.0,'2018-01-28 10:52:46'); +INSERT INTO "contract" VALUES(3,'4d982724-0d60-466f-bd75-b9d1b99305f1','2015-05-01',40.0,'2018-01-28 10:52:46'); +INSERT INTO "contract" VALUES(4,'cb791aec-47d4-4b2a-b338-68d5ac6001b7','2013-11-25',40.0,'2018-01-28 10:52:46'); +INSERT INTO "contract" VALUES(5,'f1a3bbb4-eb7d-485e-a902-cd0024339645','2016-03-07',40.0,'2018-01-28 10:52:47'); +CREATE TABLE "hours" ( + id integer primary key autoincrement not null, + idstaff TEXT, + stamp_in DATETIME, + stamp_out DATETIME, + direction TEXT, + section TEXT, + lastmodified DATETIME DEFAULT CURRENT_TIMESTAMP +); +INSERT INTO "hours" VALUES(4,'a69d71b8-2e76-4d28-bf4d-475c4086dcf8','2018-01-01 08:00:00','2018-01-01 17:00:00',NULL,NULL,'2018-01-29 09:24:52'); +INSERT INTO "hours" VALUES(14,'a69d71b8-2e76-4d28-bf4d-475c4086dcf8','2018-01-02 08:00:00','2018-01-02 17:00:00',NULL,NULL,'2018-01-29 09:44:10'); +INSERT INTO "hours" VALUES(15,'a69d71b8-2e76-4d28-bf4d-475c4086dcf8','2018-01-07 08:00:00','2018-01-07 16:30:00',NULL,NULL,'2018-01-29 09:44:40'); +DELETE FROM sqlite_sequence; +INSERT INTO "sqlite_sequence" VALUES('contract',5); +INSERT INTO "sqlite_sequence" VALUES('hours',15); +CREATE TRIGGER trg_staff_upd UPDATE ON staff + BEGIN + UPDATE staff SET lastmodified=CURRENT_TIMESTAMP WHERE id = NEW.id; + END; +CREATE TRIGGER trg_contract_upd UPDATE ON contract + BEGIN + UPDATE contract SET lastmodified=CURRENT_TIMESTAMP WHERE id = NEW.id; + END; +COMMIT; diff --git a/pointeuse/dev/devfingerread.pl b/pointeuse/dev/devfingerread.pl new file mode 100644 index 00000000..2cc64aeb --- /dev/null +++ b/pointeuse/dev/devfingerread.pl @@ -0,0 +1,36 @@ +#!C:\Strawberry\perl\bin\perl.exe +use strict; +use Getopt::Long; +use File::Basename; +my $timeout = 0; +GetOptions("timeout|t=s" => \$timeout); +$b=0; +unlink(dirname($0).'/fpstop.txt'); +my $ret=""; +my $cnt = 0; +while($b==0){ + if (-f dirname($0).'/fpstop.txt'){ + exit(0); + } + if (-f dirname($0).'/fpread.txt'){ + open(FF,dirname($0).'/fpread.txt'); + while (my $l = ){ + chomp($l); + $ret .= $l; + } + close(FF); + unlink(dirname($0).'/fpread.txt'); + $b=1; + } + sleep(1); + if ($timeout > 0){ + if ($cnt > $timeout){ + print "timedout\n"; + exit(1); + } + $cnt++; + } +} + +print $ret."\n"; +exit(0); \ No newline at end of file diff --git a/pointeuse/dev/devfingerunload.pl b/pointeuse/dev/devfingerunload.pl new file mode 100644 index 00000000..7fbc6ca3 --- /dev/null +++ b/pointeuse/dev/devfingerunload.pl @@ -0,0 +1,5 @@ +#!C:\Strawberry\perl\bin\perl.exe +use strict; +open(FF,">".dirname($0).'/fpstop.txt'); +close(FF); +exit(0); \ No newline at end of file diff --git a/pointeuse/dev/devfingerwrite.pl b/pointeuse/dev/devfingerwrite.pl new file mode 100644 index 00000000..4ed4159f --- /dev/null +++ b/pointeuse/dev/devfingerwrite.pl @@ -0,0 +1,37 @@ +#!C:\Strawberry\perl\bin\perl.exe +use strict; +use Getopt::Long; +use File::Basename; +my $timeout = 0; +GetOptions("timeout|t=s" => \$timeout); +$b=0; +unlink(dirname($0).'/fpstop.txt'); +my $ret=""; +my $cnt = 0; +while($b==0){ + if (-f dirname($0).'/fpstop.txt'){ + unlink(dirname($0).'/fpstop.txt'); + exit(0); + } + if (-f dirname($0).'/fpwrite.txt'){ + open(FF,dirname($0).'/fpwrite.txt'); + while (my $l = ){ + chomp($l); + $ret .= $l; + } + close(FF); + unlink(dirname($0).'/fpwrite.txt'); + $b=1; + } + sleep(1); + if ($timeout > 0){ + if ($cnt > $timeout){ + print "timedout\n"; + exit(1); + } + $cnt++; + } +} + +print $ret."\n"; +exit(0); \ No newline at end of file diff --git a/pointeuse/dev/fpall.py b/pointeuse/dev/fpall.py new file mode 100644 index 00000000..a02c5103 --- /dev/null +++ b/pointeuse/dev/fpall.py @@ -0,0 +1,358 @@ +#!/usr/bin/env python3.5 +# -*- coding:utf-8 -*- + +import serial +import time +import threading +import sys +import RPi.GPIO as GPIO + + + +TRUE = 1 +FALSE = 0 + +# Basic response message definition +ACK_SUCCESS = 0x00 +ACK_FAIL = 0x01 +ACK_FULL = 0x04 +ACK_NO_USER = 0x05 +ACK_TIMEOUT = 0x08 +ACK_GO_OUT = 0x0F # The center of the fingerprint is out of alignment with sensor + +# User information definition +ACK_ALL_USER = 0x00 +ACK_GUEST_USER = 0x01 +ACK_NORMAL_USER = 0x02 +ACK_MASTER_USER = 0x03 + +USER_MAX_CNT = 1000 # Maximum fingerprint number + +# Command definition +CMD_HEAD = 0xF5 +CMD_TAIL = 0xF5 +CMD_ADD_1 = 0x01 +CMD_ADD_2 = 0x02 +CMD_ADD_3 = 0x03 +CMD_MATCH = 0x0C +CMD_DEL = 0x04 +CMD_DEL_ALL = 0x05 +CMD_USER_CNT = 0x09 +CMD_COM_LEV = 0x28 +CMD_LP_MODE = 0x2C +CMD_TIMEOUT = 0x2E + +CMD_FINGER_DETECTED = 0x14 + + + +Finger_WAKE_Pin = 23 +Finger_RST_Pin = 24 + +GPIO.setmode(GPIO.BCM) +GPIO.setwarnings(False) +GPIO.setup(Finger_WAKE_Pin, GPIO.IN) +GPIO.setup(Finger_RST_Pin, GPIO.OUT) +GPIO.setup(Finger_RST_Pin, GPIO.OUT, initial=GPIO.HIGH) + +g_rx_buf = [] +PC_Command_RxBuf = [] +Finger_SleepFlag = 0 + +#rLock = threading.RLock() +ser = serial.Serial("/dev/ttyS0", 19200) + +#*************************************************************************** +# @brief send a command, and wait for the response of module +#***************************************************************************/ +def TxAndRxCmd(command_buf, rx_bytes_need, timeout): + global g_rx_buf + CheckSum = 0 + tx_buf = [] + tx = "" + + tx_buf.append(CMD_HEAD) + for byte in command_buf: + tx_buf.append(byte) + CheckSum ^= byte + + tx_buf.append(CheckSum) + tx_buf.append(CMD_TAIL) + + for i in tx_buf: + tx += chr(i) + + ser.flushInput() + ser.write(tx) + + g_rx_buf = [] + time_before = time.time() + time_after = time.time() + while time_after - time_before < timeout and len(g_rx_buf) < rx_bytes_need: # Waiting for response + bytes_can_recv = ser.inWaiting() + if bytes_can_recv != 0: + g_rx_buf += ser.read(bytes_can_recv) + time_after = time.time() + + for i in range(len(g_rx_buf)): + g_rx_buf[i] = ord(g_rx_buf[i]) + + if len(g_rx_buf) != rx_bytes_need: + return ACK_TIMEOUT + if g_rx_buf[0] != CMD_HEAD: + return ACK_FAIL + if g_rx_buf[rx_bytes_need - 1] != CMD_TAIL: + return ACK_FAIL + if g_rx_buf[1] != tx_buf[1]: + return ACK_FAIL + + CheckSum = 0 + for index, byte in enumerate(g_rx_buf): + if index == 0: + continue + if index == 6: + if CheckSum != byte: + return ACK_FAIL + CheckSum ^= byte + return ACK_SUCCESS; + +#*************************************************************************** +# @brief Get Compare Level +#***************************************************************************/ +def GetCompareLevel(): + global g_rx_buf + command_buf = [CMD_COM_LEV, 0, 0, 1, 0] + r = TxAndRxCmd(command_buf, 8, 0.1) + if r == ACK_TIMEOUT: + return ACK_TIMEOUT + if r == ACK_SUCCESS and g_rx_buf[4] == ACK_SUCCESS: + return g_rx_buf[3] + else: + return 0xFF + +#*************************************************************************** +# @brief Set Compare Level,the default value is 5, +# can be set to 0-9, the bigger, the stricter +#***************************************************************************/ +def SetCompareLevel(level): + global g_rx_buf + command_buf = [CMD_COM_LEV, 0, level, 0, 0] + r = TxAndRxCmd(command_buf, 8, 0.1) + + if r == ACK_TIMEOUT: + return ACK_TIMEOUT + if r == ACK_SUCCESS and g_rx_buf[4] == ACK_SUCCESS: + return g_rx_buf[3] + else: + return 0xFF + +#*************************************************************************** +# @brief Query the number of existing fingerprints +#***************************************************************************/ +def GetUserCount(): + global g_rx_buf + command_buf = [CMD_USER_CNT, 0, 0, 0, 0] + r = TxAndRxCmd(command_buf, 8, 0.1) + if r == ACK_TIMEOUT: + return ACK_TIMEOUT + if r == ACK_SUCCESS and g_rx_buf[4] == ACK_SUCCESS: + return g_rx_buf[3] + else: + return 0xFF +#*************************************************************************** +# @brief Get the time that fingerprint collection wait timeout +#***************************************************************************/ +def GetTimeOut(): + global g_rx_buf + command_buf = [CMD_TIMEOUT, 0, 0, 1, 0] + r = TxAndRxCmd(command_buf, 8, 0.1) + if r == ACK_TIMEOUT: + return ACK_TIMEOUT + if r == ACK_SUCCESS and g_rx_buf[4] == ACK_SUCCESS: + return g_rx_buf[3] + else: + return 0xFF + + +#*************************************************************************** +# @brief Register fingerprint +#***************************************************************************/ +def AddUser(): + global g_rx_buf + r = GetUserCount() + if r >= USER_MAX_CNT: + return ACK_FULL + + command_buf = [CMD_ADD_1, 0, r+1, 3, 0] + print(g_rx_buf) + r = TxAndRxCmd(command_buf, 8, 6) + if r == ACK_TIMEOUT: + return ACK_TIMEOUT + if r == ACK_SUCCESS and g_rx_buf[4] == ACK_SUCCESS: + command_buf[0] = CMD_ADD_3 + r = TxAndRxCmd(command_buf, 8, 6) + print(g_rx_buf) + if r == ACK_TIMEOUT: + return ACK_TIMEOUT + if r == ACK_SUCCESS and g_rx_buf[4] == ACK_SUCCESS: + return ACK_SUCCESS + else: + return ACK_FAIL + else: + return ACK_FAIL + + +#*************************************************************************** +# @brief Clear fingerprints +#***************************************************************************/ +def ClearAllUser(): + global g_rx_buf + command_buf = [CMD_DEL_ALL, 0, 0, 0, 0] + r = TxAndRxCmd(command_buf, 8, 5) + if r == ACK_TIMEOUT: + return ACK_TIMEOUT + if r == ACK_SUCCESS and g_rx_buf[4] == ACK_SUCCESS: + return ACK_SUCCESS + else: + return ACK_FAIL + + + #*************************************************************************** +# @brief Check if user ID is between 1 and 3 +#***************************************************************************/ +def IsMasterUser(user_id): + if user_id == 1 or user_id == 2 or user_id == 3: + return TRUE + else: + return FALSE + +#*************************************************************************** +# @brief Fingerprint matching +#***************************************************************************/ +def VerifyUser(): + global g_rx_buf + command_buf = [CMD_MATCH, 0, 0, 0, 0] + r = TxAndRxCmd(command_buf, 8, 5); + print g_rx_uf + if r == ACK_TIMEOUT: + return ACK_TIMEOUT + if r == ACK_SUCCESS and IsMasterUser(g_rx_buf[4]) == TRUE: + return ACK_SUCCESS + elif g_rx_buf[4] == ACK_NO_USER: + return ACK_NO_USER + elif g_rx_buf[4] == ACK_TIMEOUT: + return ACK_TIMEOUT + else: + return ACK_GO_OUT # The center of the fingerprint is out of alignment with sensor + + +#*************************************************************************** +# @brief Analysis the command from PC terminal +#***************************************************************************/ +def Analysis_PC_Command(command): + global Finger_SleepFlag + + if command == "CMD1" and Finger_SleepFlag != 1: + print ("Number of fingerprints already available: %d" % GetUserCount()) + elif command == "CMD2" and Finger_SleepFlag != 1: + print ("Add fingerprint (Put your finger on sensor until successfully/failed information returned) ") + r = AddUser() + if r == ACK_SUCCESS: + print ("Fingerprint added successfully !") + elif r == ACK_FAIL: + print ("Failed: Please try to place the center of the fingerprint flat to sensor, or this fingerprint already exists !") + elif r == ACK_FULL: + print ("Failed: The fingerprint library is full !") + elif command == "CMD3" and Finger_SleepFlag != 1: + print ("Waiting Finger......Please try to place the center of the fingerprint flat to sensor !") + r = VerifyUser() + if r == ACK_SUCCESS: + print ("Matching successful !") + elif r == ACK_NO_USER: + print ("Failed: This fingerprint was not found in the library !") + elif r == ACK_TIMEOUT: + print ("Failed: Time out !") + elif r == ACK_GO_OUT: + print ("Failed: Please try to place the center of the fingerprint flat to sensor !") + elif command == "CMD4" and Finger_SleepFlag != 1: + ClearAllUser() + print ("All fingerprints have been cleared !") + elif command == "CMD5" and Finger_SleepFlag != 1: + GPIO.output(Finger_RST_Pin, GPIO.LOW) + Finger_SleepFlag = 1 + print ("Module has entered sleep mode: you can use the finger Automatic wake-up function, in this mode, only CMD6 is valid, send CMD6 to pull up the RST pin of module, so that the module exits sleep !") + elif command == "CMD6": + Finger_SleepFlag = 0 + GPIO.output(Finger_RST_Pin, GPIO.HIGH) + print ("The module is awake. All commands are valid !") + else: + print ("commands are invalid !") + +#*************************************************************************** +# @brief If you enter the sleep mode, then open the Automatic wake-up function of the finger, +# begin to check if the finger is pressed, and then start the module and match +#***************************************************************************/ +def Auto_Verify_Finger(): + while True: + # If you enter the sleep mode, then open the Automatic wake-up function of the finger, + # begin to check if the finger is pressed, and then start the module and match + if Finger_SleepFlag == 1: + if GPIO.input(Finger_WAKE_Pin) == 1: # If you press your finger + time.sleep(0.01) + if GPIO.input(Finger_WAKE_Pin) == 1: + GPIO.output(Finger_RST_Pin, GPIO.HIGH) # Pull up the RST to start the module and start matching the fingers + time.sleep(0.25) # Wait for module to start + print ("Waiting Finger......Please try to place the center of the fingerprint flat to sensor !") + r = VerifyUser() + if r == ACK_SUCCESS: + print ("Matching successful !") + elif r == ACK_NO_USER: + print ("Failed: This fingerprint was not found in the library !") + elif r == ACK_TIMEOUT: + print ("Failed: Time out !") + elif r == ACK_GO_OUT: + print ("Failed: Please try to place the center of the fingerprint flat to sensor !") + + #After the matching action is completed, drag RST down to sleep + #and continue to wait for your fingers to press + GPIO.output(Finger_RST_Pin, GPIO.LOW) + time.sleep(0.2) + +def main(): + + GPIO.output(Finger_RST_Pin, GPIO.LOW) + time.sleep(0.25) + GPIO.output(Finger_RST_Pin, GPIO.HIGH) + time.sleep(0.25) # Wait for module to start + while SetCompareLevel(5) != 5: + print ("***ERROR***: Please ensure that the module power supply is 3.3V or 5V, the serial line connection is correct.") + time.sleep(1) + print ("***************************** WaveShare Capacitive Fingerprint Reader Test *****************************") + print ("Compare Level: 5 (can be set to 0-9, the bigger, the stricter)") + print ("Number of fingerprints already available: %d " % GetUserCount()) + print (" send commands to operate the module: ") + print (" CMD1 : Query the number of existing fingerprints") + print (" CMD2 : Registered fingerprint (Put your finger on the sensor until successfully/failed information returned) ") + print (" CMD3 : Fingerprint matching (Send the command, put your finger on sensor) ") + print (" CMD4 : Clear fingerprints ") + print (" CMD5 : Switch to sleep mode, you can use the finger Automatic wake-up function (In this state, only CMD6 is valid. When a finger is placed on the sensor,the module is awakened and the finger is matched, without sending commands to match each time. The CMD6 can be used to wake up) ") + print (" CMD6 : Wake up and make all commands valid ") + print ("***************************** WaveShare Capacitive Fingerprint Reader Test ***************************** ") + + t = threading.Thread(target=Auto_Verify_Finger) + t.setDaemon(True) + t.start() + + while True: + str = raw_input("Please input command (CMD1-CMD6):") + Analysis_PC_Command(str) + +if __name__ == '__main__': + try: + main() + except KeyboardInterrupt: + if ser != None: + ser.close() + GPIO.cleanup() + print("\n\n Test finished ! \n") + sys.exit() diff --git a/pointeuse/dev/hourtrax.pl b/pointeuse/dev/hourtrax.pl new file mode 100644 index 00000000..77997389 --- /dev/null +++ b/pointeuse/dev/hourtrax.pl @@ -0,0 +1,121 @@ +#!/usr/bin/env perl +use strict; +#use lib ($ENV{HOME}.'/perl5/lib/perl5'); +use File::Basename; +use Getopt::Long; +use Time::HiRes; +use Data::Dumper; +use Plack::Builder; +use Plack::App::File; +#use Plack::App::WrapCGI; +use Plack::Middleware::Auth::Basic; +use Plack::Middleware::DirIndex; +use Plack::Request; +use Plack::Runner; +use Getopt::Long; +use Digest::SHA::PurePerl qw(sha256_hex); +use Cwd; +use FindBin qw($RealBin); +use lib ($RealBin.'/lib'); +use Module::DB; +my $cfgfile =""; +GetOptions("config|c=s" => \$cfgfile); +if (! -e $cfgfile ){ + print STDERR "Hourtrax Server no config-file found!\n"; + exit(1); +} +our $cfg = &readconfig(); +print $^O."\n"; +print $RealBin."\n"; +print Dumper($cfg); +#my $datapath=$ENV{HOME}.'/.hourtrax'; +# if ($^O eq "MSWin32"){ +# $datapath = getcwd().'/data'; +# } elsif ($^O eq "darwin"){ +# $datapath = getcwd().'/data'; +# } +#my $webdir = dirname($RealBin).'/web'; +print "datapath:".$cfg->{datapath}."\n"; +my @match = grep { /par-.*inc$/} @INC; + +if (($cfg->{daemon} == 1)){ + use POSIX qw(setsid); + #open STDIN, '/dev/null' or die "Can't read /dev/null: $!"; + # open STDOUT, '>/dev/null' or die "Can't write to /dev/null: $!"; + # open STDERR, '>/dev/null' or die "Can't write to /dev/null: $!"; + + die "cannot start process $!" unless defined (my $child = fork); + exit 0 if $child; + setsid() or die "cannot start new session $!"; + chdir('/'); + umask(0); + system("echo ".$$." > ".$cfg->{datapath}.'/'.$cfg->{pidfile}); +} + +my $basedir = dirname($0); +if (scalar(@match) > 0){ + $basedir = $match[0]; +} + +my $cfgpath = ""; + + + +# my $name = basename($0); +# $name =~ s/srv\.pl$//; +# $name =~ s/srv\.exe$//; +# $name = lc($name); + +sub authen_cb { + my($username, $password, $env) = @_; + my $auth = 0; + print "Check AUTH\n"; + my $pwd = sha256_hex($password); + print "$username=$pwd\n"; + print $cfg->{datapath}.'/'.$cfg->{pwdfile}."\n"; + if (-e $cfg->{datapath}.'/'.$cfg->{pwdfile}){ + open(AUTH,$cfg->{datapath}.'/'.$cfg->{pwdfile}); + while (my $l = ){ + chomp($l); + if ($l eq $username.'='.$pwd){ + $auth = 1; + last; + } + } + close(AUTH); + } + return $auth; + } + +sub readconfig(){ + my $retcfg = (); + open(CFG,$cfgfile); + while (my $l = ){ + chomp($l); + $l =~ s/^\s+//; + $l =~ s/\s+$//; + if (($l eq "") || ($l =~ /^#/) || ($l =~ /^;/)){next;} + my ($k,$v) = $l =~ m/(\w+)\s*=\s*(.*)$/; + $retcfg->{lc($k)} = $v; + } + close(CFG); + return $retcfg; +} + +my $allapp = builder { + enable_if { $_[0]->{REMOTE_ADDR} ne 'localhost' && $_[0]->{REMOTE_ADDR} ne '127.0.0.1' } "Auth::Basic", authenticator => \&authen_cb; + enable "Plack::Middleware::DirIndex", dir_index => 'index.html'; + mount "/sync" => Module::DB->new({dbfile => $cfg->{datapath}.'/'.$cfg->{dbfile}})->to_app; + #mount "/" => Plack::App::File->new(root => $RealBin."/htdocs")->to_app; +}; + + +my @args = ("-p",$cfg->{port},"--error-log",$cfg->{datapath}."/error.log","--access-log",$cfg->{datapath}."/access.log","--timeout",$cfg->{timeout}); +#,"--error-log",$datapath."/error.log","--access-log",$datapath."/access.log"); +my $runner = Plack::Runner->new(server => 'Starlight', env => $cfg->{mode}, ipv6 => '1' );#env => , test ,deployment +$runner->parse_options(@args); +$runner->run($allapp); + +print "Started\n"; + + diff --git a/pointeuse/dev/install.txt b/pointeuse/dev/install.txt new file mode 100644 index 00000000..54dc5d33 --- /dev/null +++ b/pointeuse/dev/install.txt @@ -0,0 +1,7 @@ +#UART disable serial +cmdline.txt +=========== +console=serial0,115200 console=tty1 root=PARTUUID=d9b3f436-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait quiet splash plymouth.ignore-serial-consoles +default: +-------- +console=serial0,115200 console=tty1 root=PARTUUID=d9b3f436-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait quiet splash \ No newline at end of file diff --git a/pointeuse/dev/lib/DB/PgSQL.pm b/pointeuse/dev/lib/DB/PgSQL.pm new file mode 100644 index 00000000..cc5e875e --- /dev/null +++ b/pointeuse/dev/lib/DB/PgSQL.pm @@ -0,0 +1,348 @@ +package DB::PgSQL; + +use strict; +use DBI; +use File::Basename; +use DBD::PgPP; +use URI::Encode qw(uri_encode uri_decode); +use Encode; +use Data::Dumper; +use Text::Unidecode; + + +sub new { + my $class = shift; + my $p = shift; + my $self = bless {}, $class; + $self->{debug} = 1; + $self->{dbh} = DBI->connect("DBI:PgPP:dbname=".$p->{dbname},$p->{dbuser},$p->{dbpasswd},{PrintError=>1,RaiseError=>1,AutoCommit=>1}) or return "query Connection Error!".$!; + return $self; +} + +sub disconnect(){ + my $self = shift; + return $self->{dbh}->disconnect(); +} + +sub securetext(){ + my $self = shift; + my $text = shift; + $text =~ s/'/''/g; + return $text; +} + +sub value(){ + my $self = shift; + my $text = shift; + if ($text eq ""){ + return 'null'; + } + return "'".$text."'"; +} + +sub logerror(){ + my $self = shift; + my $fn = shift; + my $stat = shift; + + return (); +} + +sub newuuid(){ + my $self = shift; + my $rx = $self->query("SELECT uuid_in(md5(random()::text || clock_timestamp()::text)::cstring) as id;"); + return $rx->{id}; +} + +sub query_unenc(){ + my $self = shift; + my $stat = shift; + + my $retdata = (); + $stat = encode("utf8", $stat); + if ($self->{debug} == 1){ + print STDERR "QUERY_UNENC:\n".$stat."\n===\n"; + } + my $sth = $self->{dbh}->prepare($stat) or return $self->logerror("query_unenc",$stat); + + + $sth->execute() or return $self->logerror("query_unenc",$stat); + + my $data = $sth->fetchrow_hashref(); + foreach my $k (keys %{$data}){ + $retdata->{$k} = $data->{$k};#decode("utf-8",$data->{$k}); + } + + $sth->finish(); + + return $retdata; +} + +sub query(){ + my $self = shift; + my $stat = shift; + my $retdata = (); + $stat = encode("utf8", $stat); + if ($self->{debug} == 1){ + print STDERR "QUERY:\n".$stat."\n===\n"; + } + my $sth = $self->{dbh}->prepare($stat) or return $self->logerror("query",$stat); + + $sth->execute() or return $self->logerror("query",$stat); + + my $data = $sth->fetchrow_hashref(); + foreach my $k (keys %{$data}){ + $retdata->{$k} = decode("utf-8",$data->{$k}); + } + + $sth->finish(); + + return $retdata; +} + +sub querybykey(){ + my $self = shift; + my $key = shift; + my $stat = shift; + my $retdata =(); + if ($self->{debug} == 1){ + print STDERR "QUERYBYKEY:\n".$stat."\n===\n"; + } + my $sth = $self->{dbh}->prepare($stat) or return $self->logerror("querybykey",$stat); + $sth->execute() or return $self->logerror("querybykey",$stat); + while(my $data = $sth->fetchrow_hashref()) + { + if (exists $data->{$key}){ + foreach my $k (keys %{$data}){ + $retdata->{$data->{$key}}{$k} =decode("utf-8",$data->{$k}); + } + } + } + if (keys(%{$retdata}) == 0){ + $retdata =(); + } + $sth->finish(); + return $retdata; +} + +sub querysorted(){ + my $self = shift; + my $stat = shift; + my $retdata = (); + if ($stat !~ /sessions/){ + if ($self->{debug} == 1){ + print STDERR "QUERYSORTED:\n".$stat."\n===\n"; + } + } + my $sth = $self->{dbh}->prepare($stat) or return $self->logerror("querysorted",$stat); + $sth->execute() or return $self->logerror("querysorted",$stat); + my $count = 0; + while(my $data = $sth->fetchrow_hashref()){ + foreach my $k (keys %{$data}){ + if ($data->{$k} =~ /^{.*}$/){ + $retdata->{$count}->{$k} = JSON::PP::decode_json($data->{$k}); + } else { + $retdata->{$count}->{$k} = decode("utf-8",$data->{$k}); + } + } + $count++; + } + $sth->finish(); + return $retdata; +} + +sub exec(){ + my $self = shift; + my $stat = shift; + my $retdata; + $stat = encode("UTF-8", $stat); + if ($self->{debug} == 1){ + print STDERR "EXEC:\n".$stat."\n===\n"; + } + my $sth = $self->{dbh}->prepare($stat) or return $self->logerror("exec",$stat); + $retdata->{success} = $self->{dbh}->do($stat) or return $self->logerror("exec",$stat); + return $retdata; +} + +sub queryarray(){ + my $self = shift; + my $stat = shift; + my @retdata = (); + my $res = $self->querysorted($stat); + foreach my $r (sort {$a <=> $b} keys(%{$res})){ + push(@retdata,$res->{$r}); + } + return \@retdata; +} + + +# sub create_ddl_insert(){ +# my $self = shift; +# my $data = shift; +# my $fields = (); +# my @ddl = (); +# foreach my $f (keys(%{$data})){ +# if (($f =~ /\_/) && ($f !~ /^ident_/) && ($f !~ /\_id$/)){ +# my $t = substr($f,0,index($f,"_")); +# my $c = substr($f,length($t)+1); +# $fields->{$t}->{$c} = $data->{$f}; +# } elsif ($f =~ /^ident_/){ +# my $f2 = $f; +# $f2 =~ s/^ident_//; + +# my $t = substr($f2,0,index($f2,"_")); +# my $c = substr($f2,length($t)+1); +# if ($c ne "id"){ +# $fields->{$t}->{$c} = $data->{$f}; +# } +# } + +# } +# foreach my $tb (keys(%{$fields})){ +# my @sqlcol = (); +# my @sqlval = (); +# foreach my $c (keys(%{$fields->{$tb}})){ +# my $v = $fields->{$tb}->{$c}; +# $v =~ s/'/''/g; +# push (@sqlcol,$c); +# if ($v eq ''){ +# $v = 'null'; +# } else { +# $v = "'".$v."'"; +# } +# push (@sqlval,$v); +# } +# push(@ddl,"INSERT INTO ".$tb." (".join(",",@sqlcol).") VALUES (".join(",",@sqlval).") returning id;"); +# } +# return @ddl; +# } + + +# sub create_ddl_update(){ +# my $self = shift; +# my $data = shift; +# my $fields = (); +# my @ddl = (); +# foreach my $f (keys(%{$data})){ +# if ($f =~ /^ident_/){ +# my $fx = substr($f,6); +# my $t = substr($fx,0,index($fx,"_")); +# my $c = substr($fx,length($t)+1); +# $fields->{$t}->{cond}->{$c} = $data->{$f}; +# } elsif ( ($f !~ /^ident/) && ($f =~ /.+\_.+/) ){ +# my $t = substr($f,0,index($f,"_")); +# my $c = substr($f,length($t)+1); +# $fields->{$t}->{fields}->{$c} = $data->{$f}; +# } +# } +# foreach my $tb (keys(%{$fields})){ +# my @sqlupd = (); +# my @sqlcond = (); +# foreach my $c (keys(%{$fields->{$tb}->{fields}})){ + +# my $v = $fields->{$tb}->{fields}->{$c}; +# $v =~ s/'/''/g; + +# if ($c =~ /-/){ +# my @jp = split('-',$c); +# if ($v eq ''){ +# $v = 'null'; +# } else { +# $v = '"'.$v.'"'; +# } +# $c = 'jsonb_set(to_jsonb('.$jp[0].'),\'{"'.$jp[1].'"}\',\''.$v.'\')::json'; +# push (@sqlupd,$jp[0]."=".$c); +# }else { +# if ($v eq ''){ +# $v = 'null'; +# } else { +# $v = "'".$v."'"; +# } +# push (@sqlupd,$c."=".$v); +# } + +# } +# foreach my $c (keys(%{$fields->{$tb}->{cond}})){ +# my $v = $fields->{$tb}->{cond}->{$c}; +# $v =~ s/'/''/g; +# if ($v eq ''){ +# $v = 'null'; +# } else { +# $v = "'".$v."'"; +# } +# push (@sqlcond,$c."=".$v); +# } +# push(@ddl,"UPDATE ".$tb." SET ".join(",",@sqlupd)." WHERE ".join(" AND ",@sqlcond).";"); +# } + +# return @ddl; +# } + +# sub create_cnt_statement(){ +# my $self = shift; +# my $data = shift; +# my $fields = (); +# my @ddl = (); +# foreach my $f (keys(%{$data})){ +# if ($f =~ /^ident_/){ +# my $fx = substr($f,6); +# my $t = substr($fx,0,index($fx,"_")); +# my $c = substr($fx,length($t)+1); +# $fields->{$t}->{cond}->{$c} = $data->{$f}; +# } +# } +# foreach my $tb (keys(%{$fields})){ +# my @sqlcond = (); +# foreach my $c (keys(%{$fields->{$tb}->{cond}})){ +# my $v = $fields->{$tb}->{cond}->{$c}; +# $v =~ s/'/''/g; +# if ($v eq ''){ +# $v = 'null'; +# } else { +# $v = "'".$v."'"; +# } +# push (@sqlcond,$c."=".$v); +# } + +# push(@ddl,"SELECT count(*) as cnt from ".$tb." WHERE ".join(" AND ",@sqlcond).";"); +# } +# return @ddl; +# } + +# sub create_ddl_delete(){ +# my $self = shift; +# my $data = shift; +# my $fields = (); +# my @ddl = (); +# my @refcols = (); +# my $refdata = (); +# foreach my $f (keys(%{$data})){ +# if ($f =~ /^ident_/){ +# my ($t,$c) = $f =~ m/ident_(.+)\_(.+)/; + +# $fields->{$t}->{cond}->{$c} = $data->{$f}; +# push(@refcols,"'".$c.'_'.$t."'"); +# $refdata->{$c.'_'.$t} = $data->{$f}; +# } +# } +# foreach my $tb (keys(%{$fields})){ +# my @sqlcond = (); +# foreach my $c (keys(%{$fields->{$tb}->{cond}})){ +# my $v = $fields->{$tb}->{cond}->{$c}; +# $v =~ s/'/''/g; +# push (@sqlcond,$c."='".$v."'"); +# } +# push(@ddl,"DELETE FROM ".$tb." WHERE ".join(" AND ",@sqlcond).";"); +# } +# return @ddl; +# } + +sub textunidecode(){ + my $self = shift; + my $text = shift; + $text = lc(unidecode(decode("utf-8",$text))); + $text =~ s/^[a-z0-9]//g; + return $text; +} + +1; diff --git a/pointeuse/dev/lib/DB/SQLite.pm b/pointeuse/dev/lib/DB/SQLite.pm new file mode 100644 index 00000000..a2e544ca --- /dev/null +++ b/pointeuse/dev/lib/DB/SQLite.pm @@ -0,0 +1,348 @@ +package DB::SQLite; + +use strict; +use DBI; +use File::Basename; +use DBD::SQLite; +use URI::Encode qw(uri_encode uri_decode); +use Encode; +use Data::Dumper; +use Text::Unidecode; + + +sub new { + my $class = shift; + my $p = shift; + my $self = bless {}, $class; + $self->{debug} = 1; + $self->{dbh} = DBI->connect("DBI:SQLite:dbname=".$p->{dbfile},'','',{PrintError=>1,RaiseError=>1,AutoCommit=>1}) or return "query Connection Error!".$!; + return $self; +} + +sub disconnect(){ + my $self = shift; + return $self->{dbh}->disconnect(); +} + +sub securetext(){ + my $self = shift; + my $text = shift; + $text =~ s/'/''/g; + return $text; +} + +sub value(){ + my $self = shift; + my $text = shift; + if ($text eq ""){ + return 'null'; + } + return "'".$text."'"; +} + +sub logerror(){ + my $self = shift; + my $fn = shift; + my $stat = shift; + + return (); +} + +sub newuuid(){ + my $self = shift; + my $rx = $self->query("SELECT lower(hex( randomblob(4)) || '-' || hex( randomblob(2)) || '-' || hex( randomblob(2)) || '-' || hex( randomblob(2)) || '-' || hex(randomblob(6))) as id;"); + return $rx->{id}; +} + +sub query_unenc(){ + my $self = shift; + my $stat = shift; + + my $retdata = (); + $stat = encode("utf8", $stat); + if ($self->{debug} == 1){ + print STDERR "QUERY_UNENC:\n".$stat."\n===\n"; + } + my $sth = $self->{dbh}->prepare($stat) or return $self->logerror("query_unenc",$stat); + + + $sth->execute() or return $self->logerror("query_unenc",$stat); + + my $data = $sth->fetchrow_hashref(); + foreach my $k (keys %{$data}){ + $retdata->{$k} = $data->{$k};#decode("utf-8",$data->{$k}); + } + + $sth->finish(); + + return $retdata; +} + +sub query(){ + my $self = shift; + my $stat = shift; + my $retdata = (); + $stat = encode("utf8", $stat); + if ($self->{debug} == 1){ + print STDERR "QUERY:\n".$stat."\n===\n"; + } + my $sth = $self->{dbh}->prepare($stat) or return $self->logerror("query",$stat); + + $sth->execute() or return $self->logerror("query",$stat); + + my $data = $sth->fetchrow_hashref(); + foreach my $k (keys %{$data}){ + $retdata->{$k} = decode("utf-8",$data->{$k}); + } + + $sth->finish(); + + return $retdata; +} + +sub querybykey(){ + my $self = shift; + my $key = shift; + my $stat = shift; + my $retdata =(); + if ($self->{debug} == 1){ + print STDERR "QUERYBYKEY:\n".$stat."\n===\n"; + } + my $sth = $self->{dbh}->prepare($stat) or return $self->logerror("querybykey",$stat); + $sth->execute() or return $self->logerror("querybykey",$stat); + while(my $data = $sth->fetchrow_hashref()) + { + if (exists $data->{$key}){ + foreach my $k (keys %{$data}){ + $retdata->{$data->{$key}}{$k} =decode("utf-8",$data->{$k}); + } + } + } + if (keys(%{$retdata}) == 0){ + $retdata =(); + } + $sth->finish(); + return $retdata; +} + +sub querysorted(){ + my $self = shift; + my $stat = shift; + my $retdata = (); + if ($stat !~ /sessions/){ + if ($self->{debug} == 1){ + print STDERR "QUERYSORTED:\n".$stat."\n===\n"; + } + } + my $sth = $self->{dbh}->prepare($stat) or return $self->logerror("querysorted",$stat); + $sth->execute() or return $self->logerror("querysorted",$stat); + my $count = 0; + while(my $data = $sth->fetchrow_hashref()){ + foreach my $k (keys %{$data}){ + if ($data->{$k} =~ /^{.*}$/){ + $retdata->{$count}->{$k} = JSON::PP::decode_json($data->{$k}); + } else { + $retdata->{$count}->{$k} = decode("utf-8",$data->{$k}); + } + } + $count++; + } + $sth->finish(); + return $retdata; +} + +sub exec(){ + my $self = shift; + my $stat = shift; + my $retdata; + $stat = encode("UTF-8", $stat); + if ($self->{debug} == 1){ + print STDERR "EXEC:\n".$stat."\n===\n"; + } + my $sth = $self->{dbh}->prepare($stat) or return $self->logerror("exec",$stat); + $retdata->{success} = $self->{dbh}->do($stat) or return $self->logerror("exec",$stat); + return $retdata; +} + +sub queryarray(){ + my $self = shift; + my $stat = shift; + my @retdata = (); + my $res = $self->querysorted($stat); + foreach my $r (sort {$a <=> $b} keys(%{$res})){ + push(@retdata,$res->{$r}); + } + return \@retdata; +} + + +sub create_ddl_insert(){ + my $self = shift; + my $data = shift; + my $fields = (); + my @ddl = (); + foreach my $f (keys(%{$data})){ + if (($f =~ /\_/) && ($f !~ /^ident_/) && ($f !~ /\_id$/)){ + my $t = substr($f,0,index($f,"_")); + my $c = substr($f,length($t)+1); + $fields->{$t}->{$c} = $data->{$f}; + } elsif ($f =~ /^ident_/){ + my $f2 = $f; + $f2 =~ s/^ident_//; + + my $t = substr($f2,0,index($f2,"_")); + my $c = substr($f2,length($t)+1); + if ($c ne "id"){ + $fields->{$t}->{$c} = $data->{$f}; + } + } + + } + foreach my $tb (keys(%{$fields})){ + my @sqlcol = (); + my @sqlval = (); + foreach my $c (keys(%{$fields->{$tb}})){ + my $v = $fields->{$tb}->{$c}; + $v =~ s/'/''/g; + push (@sqlcol,$c); + if ($v eq ''){ + $v = 'null'; + } else { + $v = "'".$v."'"; + } + push (@sqlval,$v); + } + push(@ddl,"INSERT INTO ".$tb." (".join(",",@sqlcol).") VALUES (".join(",",@sqlval).") returning id;"); + } + return @ddl; +} + + +sub create_ddl_update(){ + my $self = shift; + my $data = shift; + my $fields = (); + my @ddl = (); + foreach my $f (keys(%{$data})){ + if ($f =~ /^ident_/){ + my $fx = substr($f,6); + my $t = substr($fx,0,index($fx,"_")); + my $c = substr($fx,length($t)+1); + $fields->{$t}->{cond}->{$c} = $data->{$f}; + } elsif ( ($f !~ /^ident/) && ($f =~ /.+\_.+/) ){ + my $t = substr($f,0,index($f,"_")); + my $c = substr($f,length($t)+1); + $fields->{$t}->{fields}->{$c} = $data->{$f}; + } + } + foreach my $tb (keys(%{$fields})){ + my @sqlupd = (); + my @sqlcond = (); + foreach my $c (keys(%{$fields->{$tb}->{fields}})){ + + my $v = $fields->{$tb}->{fields}->{$c}; + $v =~ s/'/''/g; + + if ($c =~ /-/){ + my @jp = split('-',$c); + if ($v eq ''){ + $v = 'null'; + } else { + $v = '"'.$v.'"'; + } + $c = 'jsonb_set(to_jsonb('.$jp[0].'),\'{"'.$jp[1].'"}\',\''.$v.'\')::json'; + push (@sqlupd,$jp[0]."=".$c); + }else { + if ($v eq ''){ + $v = 'null'; + } else { + $v = "'".$v."'"; + } + push (@sqlupd,$c."=".$v); + } + + } + foreach my $c (keys(%{$fields->{$tb}->{cond}})){ + my $v = $fields->{$tb}->{cond}->{$c}; + $v =~ s/'/''/g; + if ($v eq ''){ + $v = 'null'; + } else { + $v = "'".$v."'"; + } + push (@sqlcond,$c."=".$v); + } + push(@ddl,"UPDATE ".$tb." SET ".join(",",@sqlupd)." WHERE ".join(" AND ",@sqlcond).";"); + } + + return @ddl; +} + +sub create_cnt_statement(){ + my $self = shift; + my $data = shift; + my $fields = (); + my @ddl = (); + foreach my $f (keys(%{$data})){ + if ($f =~ /^ident_/){ + my $fx = substr($f,6); + my $t = substr($fx,0,index($fx,"_")); + my $c = substr($fx,length($t)+1); + $fields->{$t}->{cond}->{$c} = $data->{$f}; + } + } + foreach my $tb (keys(%{$fields})){ + my @sqlcond = (); + foreach my $c (keys(%{$fields->{$tb}->{cond}})){ + my $v = $fields->{$tb}->{cond}->{$c}; + $v =~ s/'/''/g; + if ($v eq ''){ + $v = 'null'; + } else { + $v = "'".$v."'"; + } + push (@sqlcond,$c."=".$v); + } + + push(@ddl,"SELECT count(*) as cnt from ".$tb." WHERE ".join(" AND ",@sqlcond).";"); + } + return @ddl; +} + +sub create_ddl_delete(){ + my $self = shift; + my $data = shift; + my $fields = (); + my @ddl = (); + my @refcols = (); + my $refdata = (); + foreach my $f (keys(%{$data})){ + if ($f =~ /^ident_/){ + my ($t,$c) = $f =~ m/ident_(.+)\_(.+)/; + + $fields->{$t}->{cond}->{$c} = $data->{$f}; + push(@refcols,"'".$c.'_'.$t."'"); + $refdata->{$c.'_'.$t} = $data->{$f}; + } + } + foreach my $tb (keys(%{$fields})){ + my @sqlcond = (); + foreach my $c (keys(%{$fields->{$tb}->{cond}})){ + my $v = $fields->{$tb}->{cond}->{$c}; + $v =~ s/'/''/g; + push (@sqlcond,$c."='".$v."'"); + } + push(@ddl,"DELETE FROM ".$tb." WHERE ".join(" AND ",@sqlcond).";"); + } + return @ddl; +} + +sub textunidecode(){ + my $self = shift; + my $text = shift; + $text = lc(unidecode(decode("utf-8",$text))); + $text =~ s/^[a-z0-9]//g; + return $text; +} + +1; diff --git a/pointeuse/dev/lib/Module/DB.pm b/pointeuse/dev/lib/Module/DB.pm new file mode 100644 index 00000000..2c4df264 --- /dev/null +++ b/pointeuse/dev/lib/Module/DB.pm @@ -0,0 +1,105 @@ +package Module::DB; + +use strict; +use warnings; +use parent qw(Plack::Component); +use Plack::Request; +use File::Basename; + +use Encode; +use JSON::PP; +use DB::SQLite; + +sub call { + my($self, $env) = @_; + if (($env->{REMOTE_ADDR} =~ "^127\.0\.") && + ($env->{REMOTE_ADDR} =~ "^10\.") && + ($env->{REMOTE_ADDR} =~ "^172\.16\.") && + ($env->{REMOTE_ADDR} =~ "^192\.168\.")) { + return [ + 404, + [ 'Content-Type' => "text/html",'Cache-Control' => 'no-store, no-cache, must-revalidate' ], + [ "Sorry no remote access allowed!" ] + ]; + } + #$self->_app->($env); + return $self->sqlite($env); +} + +sub sqlite { + my $self = shift; + my $env = shift; + my $html->{result} = (); + my $ct="application/json"; + my $status=200; + my $req = Plack::Request->new($env); + my $res = (); + my $db = DB::SQLite->new({dbfile => $self->{dbfile}}); + my @param = $req->param; + my $p = (); + my $json = JSON::PP->new(); + #$json->convert_blessed(1); + # $json->allow_blessed(1); + foreach my $pp (@param){ + $p->{$pp} = $req->param($pp); + } + if ($req->raw_body =~ /^\{.*\}$/){ + my $pnew = $json->decode($req->raw_body); + $html->{pnew} = $pnew; + foreach my $pn (keys(%{$pnew})){ + $p->{$pn} = $pnew->{$pn}; + } + } + $html->{raw_body} = $req->raw_body; + + # if (exists($p->{POSTDATA})){ + # my $pjson = JSON::PP::decode_json($p->{POSTDATA}); + # foreach my $k (keys(%{$pjson})){ + # $p->{$k} = $pjson->{$k}; + # } + # } + $html->{params} = $p; + #$html->{params} = $req->; + + if (exists($p->{get})){ + + } elsif (exists($p->{fn})){ + + } elsif (exists($p->{save})){ + + } elsif (exists($p->{sql})){ + if (exists($p->{type})) { + my $q = $p->{sql}; + my $t = $p->{type}; + if ($t eq "querybykey"){ + $res = $db->querybykey($p->{key},$q); + } elsif ($t eq "query"){ + $res = $db->query($q); + }elsif ($t eq "querysorted"){ + $res = $db->querysorted($q); + } elsif ($t eq "queryarray"){ + $res = $db->queryarray($q); + } elsif ($t eq "exec"){ + $res = $db->exec($q); + } + $html->{result}->{sqldata} = $res; + + } + } else { + + + return [ + 400, + [ 'Content-Type' => $ct.'; charset=utf-8','Cache-Control' => 'no-store, no-cache, must-revalidate', 'Access-Control-Allow-Origin'=> '*' ], + [ $json->encode($html) ] + ]; + } + + return [ + 200, + [ 'Content-Type' => $ct.'; charset=utf-8','Cache-Control' => 'no-store, no-cache, must-revalidate', 'Access-Control-Allow-Origin'=> '*' ], + [ $json->encode($html) ] + ]; +}; + +1; \ No newline at end of file diff --git a/pointeuse/dev/lib/Module/Staff.pm b/pointeuse/dev/lib/Module/Staff.pm new file mode 100644 index 00000000..18cab300 --- /dev/null +++ b/pointeuse/dev/lib/Module/Staff.pm @@ -0,0 +1,85 @@ +package Module::Staff; + +use strict; +use warnings; +use parent qw(Plack::Component); +use Plack::Request; +use File::Basename; + +use Encode; +use JSON::PP; +use DB::SQLite; +use POT::TimeTracker::Staff; + +sub call { + my($self, $env) = @_; + if (($env->{REMOTE_ADDR} =~ "^127\.0\.") && + ($env->{REMOTE_ADDR} =~ "^10\.") && + ($env->{REMOTE_ADDR} =~ "^172\.16\.") && + ($env->{REMOTE_ADDR} =~ "^192\.168\.")) { + return [ + 404, + [ 'Content-Type' => "text/html",'Cache-Control' => 'no-store, no-cache, must-revalidate' ], + [ "Sorry no remote access allowed!" ] + ]; + } + my $db = DB::SQLite->new({dbfile => $self->{dbfile}}); + my $json = JSON::PP->new(); + #$json->convert_blessed(1); + # $json->allow_blessed(1); + foreach my $pp (@param){ + $p->{$pp} = $req->param($pp); + } + if ($req->raw_body =~ /^\{.*\}$/){ + my $pnew = $json->decode($req->raw_body); + $html->{pnew} = $pnew; + foreach my $pn (keys(%{$pnew})){ + $p->{$pn} = $pnew->{$pn}; + } + } + my $st = POT::timetracker::Staff->new({db => $db}); + if ($env->{PATH_INFO} =~ /^\/set/){ + if (ref($p->{data}) eq "ARRAY"){ + foreach my $s (@{$p->{data}}){ + $html->{result} = $st->setStaff($p->{data}->{$s}); + } + } + if (exists($p->{id})){ + $html->{result} = $st->setStaff($p); + } + } + if ($env->{PATH_INFO} =~ ) + elsif ($env->{PATH_INFO} =~ /^\/worktimes/){ + if (ref($p->{data}) eq "ARRAY"){ + foreach my $s (@{$p->{data}}){ + $html->{result} = $st->setWorktimes($p->{data}->{$s}); + } + } + if (exists($p->{id})){ + $html->{result} = $st->setWorktimes($p); + } + } + elsif ($env->{PATH_INFO} =~ /^\/cleanfingerprint/){ + if (ref($p->{data}) eq "ARRAY"){ + foreach my $s (@{$p->{data}}){ + $html->{result} = $st->cleanFingerPrint($p->{data}->{$s}->{id}); + } + } + if (exists($p->{id})){ + $html->{result} = $st->cleanFingerPrint($p->{data}->{$s}->{id}); + } + } + else { + return [ + 400, + [ 'Content-Type' => $ct.'; charset=utf-8','Cache-Control' => 'no-store, no-cache, must-revalidate', 'Access-Control-Allow-Origin'=> '*' ], + [ $json->encode($html) ] + ]; + } + return [ + 200, + [ 'Content-Type' => $ct.'; charset=utf-8','Cache-Control' => 'no-store, no-cache, must-revalidate', 'Access-Control-Allow-Origin'=> '*' ], + [ $json->encode($html) ] + ]; + +} diff --git a/pointeuse/dev/lib/POT/TimeTracker/Staff.pm b/pointeuse/dev/lib/POT/TimeTracker/Staff.pm new file mode 100644 index 00000000..3f0f05fe --- /dev/null +++ b/pointeuse/dev/lib/POT/TimeTracker/Staff.pm @@ -0,0 +1,58 @@ +package POT::Staff; + +use strict; +use Data::Dumper; +use FindBin qw($RealBin); + +sub new { + my $class = shift; + my $p = shift; + my $self = bless {}, $class; + $self->{db} = $p->{db}; + return $self; +} + +sub SetStaff(){ + my $self = shift; + my $data = shift; + my $ret = (); + my $sql = "REPLACE INTO staff (id,prename,surname,isdisabled,isdeleted) VALUES (".$self->{db}->value($data->{id}).",".$self->{db}->value($data->{prename}).",".$self->{db}->value($data->{surname}).",".(($data->{istimetrackenabled} eq "1")?'null':"'1'").",".$self->{db}->value($data->{isdeleted}).");"; + $ret->{sql} = $sql; + $ret->{result}= $self->{db}->exec($sql); + return $ret; +} + +sub SetWorktimes(){ + my $self = shift; + my $data = shift; + my $ret = (); + my $sql = "REPLACE INTO staffworktimes (id,id_staff,starttime1,endtime1,starttime2,endtime2) VALUES (".$self->{db}->value($data->{id}).",".$self->{db}->value($data->{id_staff}).",".$self->{db}->value($data->{timestart1}).",".$self->{db}->value($data->{timeend1}).",".$self->{db}->value($data->{timestart2}).",".$self->{db}->value($data->{timeend2}).");"; + $ret->{sql} = $sql; + $ret->{result}= $self->{db}->exec($sql); + return $ret; +} + +sub CleanFingerPrint(){ + my $self = shift; + my $id_staff = shift; + my $sql = "select * from fingerprints where id_staff='".$id_staff."';"; + my $fps = $self->{db}->querysorted($sql); + my $ret = (); + foreach my $f (keys(%{$fps})){ + my $fpsdata = $fps->{$f}; + $fpsdata =~ s/\s+//g; + $fpsdata =~ s/\[//g; + $fpsdata =~ s/\]//g; + my @fpsa = split(",",$fpsdata); + my $hb = $fpsa[1]; + my $lb = $fpsa[2]; + my $cmd = $RealBin."/fp.py delete 30 $hb $lb"; + $ret->{cmd} .= $cmd."\n"; + + } + my $delsql = "DELETE FROM fingerprints where id_staff='".$id_staff."';"; + $ret->{sql} = $delsql; + $ret->{result}= $self->{db}->exec($delsql); + return $ret; +} +1; \ No newline at end of file diff --git a/pointeuse/dev/main.py b/pointeuse/dev/main.py new file mode 100644 index 00000000..bf9ce768 --- /dev/null +++ b/pointeuse/dev/main.py @@ -0,0 +1,357 @@ +#!/usr/bin/env python3.5 +# -*- coding:utf-8 -*- + +import serial +import time +import threading +import sys +import RPi.GPIO as GPIO + + + +TRUE = 1 +FALSE = 0 + +# Basic response message definition +ACK_SUCCESS = 0x00 +ACK_FAIL = 0x01 +ACK_FULL = 0x04 +ACK_NO_USER = 0x05 +ACK_TIMEOUT = 0x08 +ACK_GO_OUT = 0x0F # The center of the fingerprint is out of alignment with sensor + +# User information definition +ACK_ALL_USER = 0x00 +ACK_GUEST_USER = 0x01 +ACK_NORMAL_USER = 0x02 +ACK_MASTER_USER = 0x03 + +USER_MAX_CNT = 1000 # Maximum fingerprint number + +# Command definition +CMD_HEAD = 0xF5 +CMD_TAIL = 0xF5 +CMD_ADD_1 = 0x01 +CMD_ADD_2 = 0x02 +CMD_ADD_3 = 0x03 +CMD_MATCH = 0x0C +CMD_DEL = 0x04 +CMD_DEL_ALL = 0x05 +CMD_USER_CNT = 0x09 +CMD_COM_LEV = 0x28 +CMD_LP_MODE = 0x2C +CMD_TIMEOUT = 0x2E + +CMD_FINGER_DETECTED = 0x14 + + + +Finger_WAKE_Pin = 23 +Finger_RST_Pin = 24 + +GPIO.setmode(GPIO.BCM) +GPIO.setwarnings(False) +GPIO.setup(Finger_WAKE_Pin, GPIO.IN) +GPIO.setup(Finger_RST_Pin, GPIO.OUT) +GPIO.setup(Finger_RST_Pin, GPIO.OUT, initial=GPIO.HIGH) + +g_rx_buf = [] +PC_Command_RxBuf = [] +Finger_SleepFlag = 0 + +#rLock = threading.RLock() +ser = serial.Serial("/dev/ttyS0", 19200) + +#*************************************************************************** +# @brief send a command, and wait for the response of module +#***************************************************************************/ +def TxAndRxCmd(command_buf, rx_bytes_need, timeout): + global g_rx_buf + CheckSum = 0 + tx_buf = [] + tx = "" + + tx_buf.append(CMD_HEAD) + for byte in command_buf: + tx_buf.append(byte) + CheckSum ^= byte + + tx_buf.append(CheckSum) + tx_buf.append(CMD_TAIL) + + for i in tx_buf: + tx += chr(i) + + ser.flushInput() + ser.write(tx) + + g_rx_buf = [] + time_before = time.time() + time_after = time.time() + while time_after - time_before < timeout and len(g_rx_buf) < rx_bytes_need: # Waiting for response + bytes_can_recv = ser.inWaiting() + if bytes_can_recv != 0: + g_rx_buf += ser.read(bytes_can_recv) + time_after = time.time() + + for i in range(len(g_rx_buf)): + g_rx_buf[i] = ord(g_rx_buf[i]) + + if len(g_rx_buf) != rx_bytes_need: + return ACK_TIMEOUT + if g_rx_buf[0] != CMD_HEAD: + return ACK_FAIL + if g_rx_buf[rx_bytes_need - 1] != CMD_TAIL: + return ACK_FAIL + if g_rx_buf[1] != tx_buf[1]: + return ACK_FAIL + + CheckSum = 0 + for index, byte in enumerate(g_rx_buf): + if index == 0: + continue + if index == 6: + if CheckSum != byte: + return ACK_FAIL + CheckSum ^= byte + return ACK_SUCCESS; + +#*************************************************************************** +# @brief Get Compare Level +#***************************************************************************/ +def GetCompareLevel(): + global g_rx_buf + command_buf = [CMD_COM_LEV, 0, 0, 1, 0] + r = TxAndRxCmd(command_buf, 8, 0.1) + if r == ACK_TIMEOUT: + return ACK_TIMEOUT + if r == ACK_SUCCESS and g_rx_buf[4] == ACK_SUCCESS: + return g_rx_buf[3] + else: + return 0xFF + +#*************************************************************************** +# @brief Set Compare Level,the default value is 5, +# can be set to 0-9, the bigger, the stricter +#***************************************************************************/ +def SetCompareLevel(level): + global g_rx_buf + command_buf = [CMD_COM_LEV, 0, level, 0, 0] + r = TxAndRxCmd(command_buf, 8, 0.1) + + if r == ACK_TIMEOUT: + return ACK_TIMEOUT + if r == ACK_SUCCESS and g_rx_buf[4] == ACK_SUCCESS: + return g_rx_buf[3] + else: + return 0xFF + +#*************************************************************************** +# @brief Query the number of existing fingerprints +#***************************************************************************/ +def GetUserCount(): + global g_rx_buf + command_buf = [CMD_USER_CNT, 0, 0, 0, 0] + r = TxAndRxCmd(command_buf, 8, 0.1) + if r == ACK_TIMEOUT: + return ACK_TIMEOUT + if r == ACK_SUCCESS and g_rx_buf[4] == ACK_SUCCESS: + return g_rx_buf[3] + else: + return 0xFF +#*************************************************************************** +# @brief Get the time that fingerprint collection wait timeout +#***************************************************************************/ +def GetTimeOut(): + global g_rx_buf + command_buf = [CMD_TIMEOUT, 0, 0, 1, 0] + r = TxAndRxCmd(command_buf, 8, 0.1) + if r == ACK_TIMEOUT: + return ACK_TIMEOUT + if r == ACK_SUCCESS and g_rx_buf[4] == ACK_SUCCESS: + return g_rx_buf[3] + else: + return 0xFF + + +#*************************************************************************** +# @brief Register fingerprint +#***************************************************************************/ +def AddUser(): + global g_rx_buf + r = GetUserCount() + if r >= USER_MAX_CNT: + return ACK_FULL + + command_buf = [CMD_ADD_1, 0, r+1, 3, 0] + print(g_rx_buf) + r = TxAndRxCmd(command_buf, 8, 6) + if r == ACK_TIMEOUT: + return ACK_TIMEOUT + if r == ACK_SUCCESS and g_rx_buf[4] == ACK_SUCCESS: + command_buf[0] = CMD_ADD_3 + r = TxAndRxCmd(command_buf, 8, 6) + print(g_rx_buf) + if r == ACK_TIMEOUT: + return ACK_TIMEOUT + if r == ACK_SUCCESS and g_rx_buf[4] == ACK_SUCCESS: + return ACK_SUCCESS + else: + return ACK_FAIL + else: + return ACK_FAIL + + +#*************************************************************************** +# @brief Clear fingerprints +#***************************************************************************/ +def ClearAllUser(): + global g_rx_buf + command_buf = [CMD_DEL_ALL, 0, 0, 0, 0] + r = TxAndRxCmd(command_buf, 8, 5) + if r == ACK_TIMEOUT: + return ACK_TIMEOUT + if r == ACK_SUCCESS and g_rx_buf[4] == ACK_SUCCESS: + return ACK_SUCCESS + else: + return ACK_FAIL + + + #*************************************************************************** +# @brief Check if user ID is between 1 and 3 +#***************************************************************************/ +def IsMasterUser(user_id): + if user_id == 1 or user_id == 2 or user_id == 3: + return TRUE + else: + return FALSE + +#*************************************************************************** +# @brief Fingerprint matching +#***************************************************************************/ +def VerifyUser(): + global g_rx_buf + command_buf = [CMD_MATCH, 0, 0, 0, 0] + r = TxAndRxCmd(command_buf, 8, 5); + if r == ACK_TIMEOUT: + return ACK_TIMEOUT + if r == ACK_SUCCESS and IsMasterUser(g_rx_buf[4]) == TRUE: + return ACK_SUCCESS + elif g_rx_buf[4] == ACK_NO_USER: + return ACK_NO_USER + elif g_rx_buf[4] == ACK_TIMEOUT: + return ACK_TIMEOUT + else: + return ACK_GO_OUT # The center of the fingerprint is out of alignment with sensor + + +#*************************************************************************** +# @brief Analysis the command from PC terminal +#***************************************************************************/ +def Analysis_PC_Command(command): + global Finger_SleepFlag + + if command == "CMD1" and Finger_SleepFlag != 1: + print ("Number of fingerprints already available: %d" % GetUserCount()) + elif command == "CMD2" and Finger_SleepFlag != 1: + print ("Add fingerprint (Put your finger on sensor until successfully/failed information returned) ") + r = AddUser() + if r == ACK_SUCCESS: + print ("Fingerprint added successfully !") + elif r == ACK_FAIL: + print ("Failed: Please try to place the center of the fingerprint flat to sensor, or this fingerprint already exists !") + elif r == ACK_FULL: + print ("Failed: The fingerprint library is full !") + elif command == "CMD3" and Finger_SleepFlag != 1: + print ("Waiting Finger......Please try to place the center of the fingerprint flat to sensor !") + r = VerifyUser() + if r == ACK_SUCCESS: + print ("Matching successful !") + elif r == ACK_NO_USER: + print ("Failed: This fingerprint was not found in the library !") + elif r == ACK_TIMEOUT: + print ("Failed: Time out !") + elif r == ACK_GO_OUT: + print ("Failed: Please try to place the center of the fingerprint flat to sensor !") + elif command == "CMD4" and Finger_SleepFlag != 1: + ClearAllUser() + print ("All fingerprints have been cleared !") + elif command == "CMD5" and Finger_SleepFlag != 1: + GPIO.output(Finger_RST_Pin, GPIO.LOW) + Finger_SleepFlag = 1 + print ("Module has entered sleep mode: you can use the finger Automatic wake-up function, in this mode, only CMD6 is valid, send CMD6 to pull up the RST pin of module, so that the module exits sleep !") + elif command == "CMD6": + Finger_SleepFlag = 0 + GPIO.output(Finger_RST_Pin, GPIO.HIGH) + print ("The module is awake. All commands are valid !") + else: + print ("commands are invalid !") + +#*************************************************************************** +# @brief If you enter the sleep mode, then open the Automatic wake-up function of the finger, +# begin to check if the finger is pressed, and then start the module and match +#***************************************************************************/ +def Auto_Verify_Finger(): + while True: + # If you enter the sleep mode, then open the Automatic wake-up function of the finger, + # begin to check if the finger is pressed, and then start the module and match + if Finger_SleepFlag == 1: + if GPIO.input(Finger_WAKE_Pin) == 1: # If you press your finger + time.sleep(0.01) + if GPIO.input(Finger_WAKE_Pin) == 1: + GPIO.output(Finger_RST_Pin, GPIO.HIGH) # Pull up the RST to start the module and start matching the fingers + time.sleep(0.25) # Wait for module to start + print ("Waiting Finger......Please try to place the center of the fingerprint flat to sensor !") + r = VerifyUser() + if r == ACK_SUCCESS: + print ("Matching successful !") + elif r == ACK_NO_USER: + print ("Failed: This fingerprint was not found in the library !") + elif r == ACK_TIMEOUT: + print ("Failed: Time out !") + elif r == ACK_GO_OUT: + print ("Failed: Please try to place the center of the fingerprint flat to sensor !") + + #After the matching action is completed, drag RST down to sleep + #and continue to wait for your fingers to press + GPIO.output(Finger_RST_Pin, GPIO.LOW) + time.sleep(0.2) + +def main(): + + GPIO.output(Finger_RST_Pin, GPIO.LOW) + time.sleep(0.25) + GPIO.output(Finger_RST_Pin, GPIO.HIGH) + time.sleep(0.25) # Wait for module to start + while SetCompareLevel(5) != 5: + print ("***ERROR***: Please ensure that the module power supply is 3.3V or 5V, the serial line connection is correct.") + time.sleep(1) + print ("***************************** WaveShare Capacitive Fingerprint Reader Test *****************************") + print ("Compare Level: 5 (can be set to 0-9, the bigger, the stricter)") + print ("Number of fingerprints already available: %d " % GetUserCount()) + print (" send commands to operate the module: ") + print (" CMD1 : Query the number of existing fingerprints") + print (" CMD2 : Registered fingerprint (Put your finger on the sensor until successfully/failed information returned) ") + print (" CMD3 : Fingerprint matching (Send the command, put your finger on sensor) ") + print (" CMD4 : Clear fingerprints ") + print (" CMD5 : Switch to sleep mode, you can use the finger Automatic wake-up function (In this state, only CMD6 is valid. When a finger is placed on the sensor,the module is awakened and the finger is matched, without sending commands to match each time. The CMD6 can be used to wake up) ") + print (" CMD6 : Wake up and make all commands valid ") + print ("***************************** WaveShare Capacitive Fingerprint Reader Test ***************************** ") + + t = threading.Thread(target=Auto_Verify_Finger) + t.setDaemon(True) + t.start() + + while True: + str = raw_input("Please input command (CMD1-CMD6):") + Analysis_PC_Command(str) + +if __name__ == '__main__': + try: + main() + except KeyboardInterrupt: + if ser != None: + ser.close() + GPIO.cleanup() + print("\n\n Test finished ! \n") + sys.exit() diff --git a/pointeuse/dev/new_install/fileto_change.txt b/pointeuse/dev/new_install/fileto_change.txt new file mode 100644 index 00000000..a21b9171 --- /dev/null +++ b/pointeuse/dev/new_install/fileto_change.txt @@ -0,0 +1,27 @@ +cd / && tar czvf /home/dks/hourtrax_syssource.tar.gz \ +/etc/ssh/sshd_config \ +/etc/systemd/system/autologin@.service \ +/etc/sudoers \ +/etc/modules \ +/boot/config.txt \ +/var/spool/cron/crontabs/dks \ +/etc/openvpn/DKS-VPN-dks-hourtrax.conf \ +/etc/modprobe.d/raspi-blacklist.conf \ +/usr/share/plymouth/themes/pix/splash.png \ +/etc/lightdm/lightdm.conf \ +/etc/xdg/openbox/menu.xml \ +/etc/xdg/lxsession/LXDE-pi/sshpwd.sh \ +/etc/xdg/lxsession/LXDE-pi/autostart \ +/etc/xdg/lxsession/LXDE/autostart +cd / && tar czvf /home/dks/hourtrax_source.tar.gz \ +/home/dks/bin \ +/home/dks/tmp \ +/home/dks/share \ +/home/dks/web \ +/home/dks/data \ +/home/dks/splash.png \ +/home/dks/perl5 \ +/home/dks/.config/lxsession/LXDE-pi/autostart \ +/home/dks/.profile + +sudo apt-get install cryptsetup openvpn \ No newline at end of file diff --git a/pointeuse/dev/new_install/history.txt b/pointeuse/dev/new_install/history.txt new file mode 100644 index 00000000..767cb6ab --- /dev/null +++ b/pointeuse/dev/new_install/history.txt @@ -0,0 +1,292 @@ + 1 cd /etc/xdg/autostart/ + 2 ls + 3 cat pprompt.desktop + 4 cat /etc/xdg/lxsession/LXDE-pi/sshpwd.sh + 5 vim.tiny /etc/xdg/lxsession/LXDE-pi/sshpwd.sh + 6 cat /etc/xdg/lxsession/LXDE-pi/sshpwd.sh + 7 ls + 8 cat lxpolkit.desktop + 9 cd .. + 10 ls + 11 cd openbox/ + 12 ls + 13 cat autostart + 14 cd LXDE/ + 15 ls + 16 cat menu.xml + 17 cd .. + 18 cd .. + 19 ls + 20 cd autostart/ + 21 ls + 22 cat lxkeymap.desktop + 23 cat /etc/xdg/lxsession/LXDE-pi/autokey.sh + 24 ps ax + 25 ps ax + 26 kill -9 745 + 27 ps ax + 28 kill -9 744 + 29 ps ax + 30 ls + 31 cat lxpolkit.desktop + 32 ls + 33 cd .. + 34 ls + 35 cd lxpanel/ + 36 ls + 37 cat launchtaskbar.cfg + 38 ls + 39 cd default/panels/ + 40 ls + 41 cat panel + 42 cd + 43 exit + 44 systemctl daemon-reload + 45 exit + 46 systemctl daemon-reload + 47 systemctl start autologin@tty1 + 48 sudo deluser -remove-home pi + 49 ps ax + 50 systemctl stop autologin@tty1 + 51 sudo deluser -remove-home pi + 52 cd /home/ + 53 ls + 54 shutdown -r now + 55 cd /etc/xdg/ + 56 ls + 57 cd lxsession/ + 58 ls + 59 cd LXDE-pi/ + 60 ls + 61 ls -l + 62 cta autostart + 63 cat autostart + 64 vim.tiny autostart + 65 cd .. + 66 cd LXDE + 67 ls + 68 cat autostart + 69 cd .. + 70 exit + 71 cd /etc/xdg/openbox/ + 72 ls + 73 cat autostart + 74 cat lxde-pi-rc.xml + 75 cd /etc/lightdm/ + 76 ls + 77 vim.tiny lightdm.conf + 78 grep xserver-command lightdm.conf + 79 sed /etc/lightdm/lightdm.conf -e 's/#xserver-command=X/xserver-command=X -nocursor/' + 80 sed /etc/lightdm/lightdm.conf -i -e 's/#xserver-command=X/xserver-command=X -nocursor/' + 81 exit + 82 cd /etc/lightdm/ + 83 ls + 84 cat pi-greeter.conf + 85 kill -9 1704 + 86 ls + 87 cat lightdm.conf + 88 cat lightdm.conf cd .. + 89 cd .. + 90 ls + 91 cd X11/ + 92 grep -Rn Xorg + 93 cd .. + 94 cd xdg/ + 95 grep -Rn Xorg + 96 cd .. + 97 find . -name xsetroot + 98 find . -name "xinitrc" + 99 cat X11/xinit/xinitrc + 100 cat /etc/X11/Xsession + 101 ps ax + 102 cd /usr/sbin/ + 103 sl + 104 ls + 105 cat pi-greeter + 106 ls + 107 pi-greeter --help + 108 ls + 109 cd /etc/xdg/systemd/ + 110 ls + 111 ls + 112 ls -l + 113 cat user + 114 cd user + 115 ls + 116 ls + 117 cd .. + 118 shutdown -r now + 119 cd /var/log/ + 120 ls + 121 ls -ltr + 122 cat auth.log + 123 ls + 124 cd lightdm/ + 125 ls + 126 ls -l + 127 cat lightdm.log + 128 cat x-0.log + 129 cd + 130 cd /etc/lightdm/ + 131 ls + 132 vim.tiny lightdm.conf + 133 shutdown -r now + 134 cd /etc/lightdm/ + 135 vim.tiny lightdm.conf + 136 ps ax + 137 export DISPLAY="0.0" + 138 startx + 139 exit + 140 ps ax + 141 apt-cache search chromium + 142 apt-get install chromium-browser + 143 chromium-browser -kiosk + 144 chromium-browser -kiosk "http://www.dks.lu" + 145 exit + 146 startlxde-pi + 147 export DISPLAY=0.0 + 148 startlxde-pi + 149 export DISPLAY=:.0 + 150 startlxde-pi + 151 export DISPLAY=:0.0 + 152 startlxde-pi + 153 cat /usr/share/X11/xorg.conf.d/99-fbturbo.conf + 154 fdisk /dev/sda + 155 fdisk -l + 156 fdisk /dev/sda + 157 fdisk -l + 158 fdisk /dev/sda + 159 fdisk -l + 160 dd bs=4K if=/dev/random of=/dev/sda1 + 161 dd bs=4K if=/dev/urandom of=/dev/sda1 + 162 fdisk -l + 163 cryptsetup -yuh sha256 -caes-xts-plain -s 256 luksFormat/dev/sda1 + 164 cryptsetup -yvh sha256 -caes-xts-plain -s 256 luksFormat/dev/sda1 + 165 cryptsetup -yvh sha256 -caes-xts-plain -s 256 luksFormat /dev/sda1 + 166 cryptsetup luksOpen /dev/sda1 2fcc2458-0278-11e8-8829-33f2eb7606e8 + 167 mkfs.ext3 /dev/mapper/2fcc2458-0278-11e8-8829-33f2eb7606e8 + 168 id dks + 169 mount -o uid=1001,gid=1001 /dev/mapper/2fcc2458-0278-11e8-8829-33f2eb7606e8 /mnt + 170 mount -t ext3 -o uid=1001,gid=1001 /dev/mapper/2fcc2458-0278-11e8-8829-33f2eb7606e8 /mnt + 171 mount /dev/mapper/2fcc2458-0278-11e8-8829-33f2eb7606e8 /mnt + 172 chmod -R dks:dks /mnt + 173 chown -R dks:dks /mnt + 174 cryptsetup luksClose /dev/mapper/2fcc2458-0278-11e8-8829-33f2eb7606e8 + 175 ls + 176 ls + 177 cd /mnt/ + 178 ls + 179 mkdir testdata + 180 ls + 181 umount /mnt + 182 cd + 183 umount /mnt + 184 cryptsetup luksClose /dev/mapper/2fcc2458-0278-11e8-8829-33f2eb7606e8 + 185 mount /dev/mapper/2fcc2458-0278-11e8-8829-33f2eb7606e8 /mnt + 186 cryptsetup luksOpen /dev/sda1 secret + 187 mkfs.ext3 /dev/mapper/secret + 188 mount /dev/mapper/secret /mnt + 189 cd /mnt/ + 190 ls + 191 umount /mnt + 192 cd + 193 umount /mnt + 194 cryptsetup close luksClose /dev/mapper/secret + 195 cryptsetup luksClose /dev/mapper/secret + 196 cryptsetup luksOpen /dev/sda1 2fcc2458-0278-11e8-8829-33f2eb7606e8 + 197 mount /dev/mapper/2fcc2458-0278-11e8-8829-33f2eb7606e8 /mnt + 198 cd /mnt/ + 199 ls + 200 df -h + 201 umount /mnt + 202 cd + 203 umount /mnt + 204 mkfs.ext3 /dev/mapper/2fcc2458-0278-11e8-8829-33f2eb7606e8 + 205 mount /dev/mapper/2fcc2458-0278-11e8-8829-33f2eb7606e8 /mnt + 206 cd /mnt + 207 ls -al + 208 cd + 209 cryptsetup -v my_disk_mapper + 210 cryptsetup -v /dev/sda1 + 211 cryptsetup + 212 cryptsetup -v 2fcc2458-0278-11e8-8829-33f2eb7606e8 + 213 mount /dev/mapper/2fcc2458-0278-11e8-8829-33f2eb7606e8 /mnt + 214 cd /mnt + 215 ls + 216 mkdir testsetup + 217 cd .. + 218 umount /mnt + 219 cryptsetup luksClose /dev/mapper/2fcc2458-0278-11e8-8829-33f2eb7606e8 + 220 cryptsetup luksOpen /dev/sda1 2fcc2458-0278-11e8-8829-33f2eb7606e8 + 221 cryptsetup -v 2fcc2458-0278-11e8-8829-33f2eb7606e8 + 222 cryptsetup --help + 223 cryptsetup status 2fcc2458-0278-11e8-8829-33f2eb7606e8 + 224 mount /dev/mapper/2fcc2458-0278-11e8-8829-33f2eb7606e8 /mnt + 225 cd /mnt/ + 226 ls + 227 cd + 228 umount /mnt + 229 exit + 230 apt-get search aescrypt + 231 apt-cache search aescrypt + 232 apt-cache search aes + 233 apt-cache search crypt + 234 fdisk -l + 235 exit + 236 apt-get install cryptsetup + 237 cat /etc/modules + 238 modprobe dm_crypt + 239 echo dm_crypt >> /etc/modules + 240 cat /etc/modules + 241 uuid + 242 uuid + 243 cd /etc/xdg/openbox/ + 244 ls + 245 cat autostart + 246 ls + 247 cat menu.xml + 248 vim.tiny menu.xml + 249 cp menu.xml menu.xml.orig + 250 vim.tiny menu.xml + 251 cd .. + 252 ls + 253 cd .. + 254 sl + 255 ls + 256 cd lightdm/ + 257 ls + 258 cat lightdm.conf + 259 cd + 260 cd /home/dks/ + 261 ls + 262 ls -al + 263 cd .config/ + 264 ls + 265 cd openbox/ + 266 ls + 267 cat lxde-pi-rc.xml + 268 ls + 269 cd .. + 270 ls + 271 ls -l + 272 cd lxsession/LXDE-pi/ + 273 ls + 274 cat autostart + 275 exit + 276 apt-cache search smbclient + 277 cd /mnt/ + 278 ls + 279 ls -l + 280 mount -t cifs -ouser=kilian,pass=fb1ia1ka,rw //home-backup/mirror /mnt + 281 ls + 282 cd .. + 283 ls + 284 cd mnt/ + 285 ls + 286 cd + 287 mount + 288 umount /mnt + 289 exit + 290 history + 291 history + 292 history > history.txt diff --git a/pointeuse/dev/new_install/hourtrax.sqlite b/pointeuse/dev/new_install/hourtrax.sqlite new file mode 100644 index 00000000..59b7e72c Binary files /dev/null and b/pointeuse/dev/new_install/hourtrax.sqlite differ diff --git a/pointeuse/dev/new_install/install_steps.txt b/pointeuse/dev/new_install/install_steps.txt new file mode 100644 index 00000000..6e03df7b --- /dev/null +++ b/pointeuse/dev/new_install/install_steps.txt @@ -0,0 +1,49 @@ +#flash drive +#add to boot partition: file "SSH" +#rpi 3 B year 2015 -> set bootflag with sd-card +#: echo program_usb_boot_mode=1 | sudo tee -a /boot/config.txt +#add row "lcd_rotate=2" to /boot/config.txt +#login as pi +~: sudo sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config +~: sudo sed -i 's/#Port 22/Port 3587/' /etc/ssh/sshd_config +~: sudo service ssh restart +~: echo 'echo -e "mai5ia7a\nmai5ia7a" | sudo -S passwd' > tmp.sh && bash tmp.sh && rm tmp.sh +#login as root (Port 3587) +~: update-rc.d "ssh" enable +~: groupadd dks +~: useradd dks -c DKS -g dks -G adm,sudo -s /bin/bash -d /home/dks +~: echo 'echo -e "sai4seip\nsai4seip" | passwd dks' > tmp.sh && bash tmp.sh && rm tmp.sh +echo 'echo -e "sai4seip\nsai4seip" | passwd pi' > tmp.sh && bash tmp.sh && rm tmp.sh +~: mkdir -p /home/dks +~: chown dks:dks /home/dks +~: cp /usr/share/zoneinfo/Europe/Luxembourg /etc/localtime +~: sed -i 's/XKBLAYOUT="gb"/XKBLAYOUT="de"/' /etc/default/keyboard +~: sed -i "s/raspberrypi/hourtrax/" /etc/hosts +~: echo "hourtrax" > /etc/hostname +~: hostnamectl set-hostname hourtrax +~: sed -i 's/agetty --autologin pi/agetty --autologin dks/' /etc/systemd/system/autologin@.service + +usermod -G adm,sudo,dialout,gpio dks +sed -i 's/autologin-user=pi/autologin-user=dks/' /etc/lightdm/lightdm.conf +sed -i 's/#xserver-command=X/xserver-command=X -nocursor' /etc/lightdm/lightdm.conf +sed -i 's/#net.ipv4.ip_forward=1/net.ipv4.ip_forward=1/' /etc/sysctl.conf +sysctl -p +echo "#!/bin/bash" > /etc/xdg/lxsession/LXDE-pi/sshpwd.sh +êcho "@/home/dks/bin/startapp.sh" > /etc/xdg/lxsession/LXDE-pi/autostart + +echo "#bt" >> /etc/modprobe.d/raspi-blacklist.conf +echo "blacklist btbcm" >> /etc/modprobe.d/raspi-blacklist.conf +echo "blacklist hci_uart" >> /etc/modprobe.d/raspi-blacklist.conf + +echo '' > /etc/xdg/openbox/menu.xml +echo '' >> /etc/xdg/openbox/menu.xml +echo '' >> /etc/xdg/openbox/menu.xml +echo '' >> /etc/xdg/openbox/menu.xml +#set /etc/sudoers s/%sudo ALL=(ALL:ALL) ALL/%sudo ALL=(ALL:ALL) NOPASSWD:ALL/ +#after file transfers +cp /home/dks/splash.png /usr/share/plymouth/themes/pix/splash.png + +#fingerprint +echo "deb http://apt.pm-codeworks.de buster main" | sudo tee -a /etc/apt/sources.list +wget -O - http://apt.pm-codeworks.de/pm-codeworks.de.gpg | sudo apt-key add - +sudo apt-get -y install python-fingerprint \ No newline at end of file diff --git a/pointeuse/dev/new_install/pi_groups.txt b/pointeuse/dev/new_install/pi_groups.txt new file mode 100644 index 00000000..e8fa08e0 --- /dev/null +++ b/pointeuse/dev/new_install/pi_groups.txt @@ -0,0 +1,2 @@ +uid=1000(pi) gid=1000(pi) groups=1000(pi),4(adm),20(dialout),24(cdrom),27(sudo),29(audio),44(video),46(plugdev),60(games),100(users),105(input),109(netdev),999(spi),998(i2c),997(gpio) + diff --git a/pointeuse/dev/potsync.sh b/pointeuse/dev/potsync.sh new file mode 100644 index 00000000..bd45a057 --- /dev/null +++ b/pointeuse/dev/potsync.sh @@ -0,0 +1,31 @@ +#!/bin/bash +CALLDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +ACTION=$1 +HNAME=`hostname` +CFGPATH=${HOME}/.hourtrax +source ${CFGPATH}/hourtrax.conf +UA="POT Hourtrax/${HNAME}/v1.0.0" +CTIME=`date +%Y%m%d%H%M%S` +if [[ "${ACTION}" == "login" || ! -e ${CFGPATH}/potcookie.txt ]] +then + curl -v -silent -A "${UA}" -X POST -d "btnlogin=1&login=${potuser}&password=${potpwd}" ${poturl} 2>&1 | grep "Set-Cookie" | head -n 1 | awk -F";" '{ print $1 }' | sed -e 's/< Set-Cookie:\s//' > ${CFGPATH}/potcookie.txt + #echo "COOKIE:" + #cat ${CFGPATH}/potcookie.txt + #echo "----" +fi + + +if [ "${ACTION}" == "getusers" ] +then + COOKIE=`cat ${CFGPATH}/potcookie.txt` + curl --cookie "${COOKIE}" -A "${UA}" -X POST -d "get=getusers&schemata=${potschema}" ${poturl}/synctimetrack.cgi > ${CFGPATH}/sync/${potschema}_${CTIME}.json + perl ${CALLDIR}/updatedata.pl -c ${CFGPATH}/hourtrax.conf -d ${CFGPATH}/sync/${potschema}_${CTIME}.json +fi + +if [ "${ACTION}" == "getpotdata" ] +then + COOKIE=`cat ${CFGPATH}/potcookie.txt` + curl --cookie "${COOKIE}" -A "${UA}" -X POST -d "get=getpotdata&schemata=${potschema}" ${poturl}/synctimetrack.cgi > ${CFGPATH}/sync/${potschema}_${CTIME}.json + perl ${CALLDIR}/updatedata.pl -c ${CFGPATH}/hourtrax.conf -d ${CFGPATH}/sync/${potschema}_${CTIME}.json +fi +#GSmO4BwBEJ4aA \ No newline at end of file diff --git a/pointeuse/dev/sourcefiles.local.txt b/pointeuse/dev/sourcefiles.local.txt new file mode 100644 index 00000000..df510c4d --- /dev/null +++ b/pointeuse/dev/sourcefiles.local.txt @@ -0,0 +1,408 @@ +./CGI/api/db.cgi|3144 +./CGI/api/fingerprint.cgi|3359 +./CGI/api/fingerunload.cgi|1602 +./CGI/api/index.cgi|4333 +./CGI/api/lib/dksconfig.pm|1022 +./CGI/api/lib/dksdb.pm|11300 +./CGI/api/service.cgi|4844 +./CGI/api/system.cgi|4448 +./CGI/index.cgi|2666 +./CGI/tmpl/app/hourtrax/index.tt|2984 +./CGI/tmpl/app/hourtrax/module/members/index.js|3987 +./CGI/tmpl/app/hourtrax/module/members/index.tt|3416 +./CGI/tmpl/app/hourtrax/module/timetrack/index.js|2017 +./CGI/tmpl/app/hourtrax/module/timetrack/index.tt|401 +./CGI/tmpl/app/hourtrax/module/timetrack/usertimetrack.js|5633 +./CGI/tmpl/app/hourtrax/module/timetrack/usertimetrack.tt|3132 +./CGI/tmpl/app/system/hourtrax/index.js|0 +./CGI/tmpl/app/system/hourtrax/index.tt|0 +./CGI/tmpl/app/system/index.tt|2888 +./CGI/tmpl/app/system/network/index.js|0 +./CGI/tmpl/app/system/network/index.tt|1193 +./CGI/tmpl/app/system/vpn/index.js|0 +./CGI/tmpl/app/system/vpn/index.tt|0 +./CGI/tmpl/app/timeclock/index.js|15742 +./CGI/tmpl/app/timeclock/index.tt|9644 +./CGI/tmpl/block/snackbar.tt|25 +./CGI/tmpl/macro/fields.tt|8091 +./CGI/tmpl/skeleton/app.tt|82 +./CGI/tmpl/skeleton/file.tt|82 +./CGI/tmpl/skeleton/index.tt|1861 +./CGI/tmpl/skeleton/module.tt|3361 +./hourtrax.pl|3252 +./htdocs/css/admin.css|5127 +./htdocs/css/clock.css|6290 +./htdocs/css/clock2.css|72 +./htdocs/css/w3pro.css|26847 +./htdocs/img/dks_1000.png|68554 +./htdocs/img/fingerprint/finger1.svg|4819 +./htdocs/img/fingerprint/finger2.svg|4963 +./htdocs/img/fingerprint/finger3.svg|4796 +./htdocs/img/fingerprint/finger4.svg|4768 +./htdocs/img/fingerprint/finger5.svg|4788 +./htdocs/img/fingerprint/fingerprint-check.svg|5525 +./htdocs/img/fingerprint/fingerprint-crosshair.svg|6148 +./htdocs/img/fingerprint/fingerprint-remove.svg|5587 +./htdocs/img/fingerprint/fingerprint-remove_white.svg|5720 +./htdocs/img/fingerprint/fingerprint-scanning-index.svg|7393 +./htdocs/img/fingerprint/fingerprint-scanning.svg|6064 +./htdocs/img/fingerprint/fingerprint-search.svg|17333 +./htdocs/img/fingerprint/fingerprint-simple.svg|5706 +./htdocs/img/hourtrax.png|23443 +./htdocs/img/hourtrax.svg|10430 +./htdocs/img/icons/address.svg|800 +./htdocs/img/icons/address_white.svg|812 +./htdocs/img/icons/Adobe_Acrobat.svg|3436 +./htdocs/img/icons/Adobe_PDF_Export.svg|2730 +./htdocs/img/icons/Agreement_01.svg|5234 +./htdocs/img/icons/apps.svg|781 +./htdocs/img/icons/apps_white.svg|793 +./htdocs/img/icons/archive.svg|273 +./htdocs/img/icons/archive_white.svg|285 +./htdocs/img/icons/Bill.svg|3185 +./htdocs/img/icons/calendar.svg|954 +./htdocs/img/icons/calendar_white.svg|966 +./htdocs/img/icons/clocktime.svg|1122 +./htdocs/img/icons/clocktime_white.svg|1117 +./htdocs/img/icons/club.svg|823 +./htdocs/img/icons/club_white.svg|835 +./htdocs/img/icons/clubs.svg|1033 +./htdocs/img/icons/clubs_white.svg|1045 +./htdocs/img/icons/code.svg|589 +./htdocs/img/icons/cube.svg|365 +./htdocs/img/icons/cube_white.svg|378 +./htdocs/img/icons/cubelight.svg|1023 +./htdocs/img/icons/cubelight_white.svg|1036 +./htdocs/img/icons/dashboard.svg|1085 +./htdocs/img/icons/dashboard_white.svg|1098 +./htdocs/img/icons/Document_Save.svg|729 +./htdocs/img/icons/download.svg|339 +./htdocs/img/icons/download_white.svg|351 +./htdocs/img/icons/duplicate.svg|430 +./htdocs/img/icons/duplicate_white.svg|442 +./htdocs/img/icons/edit.svg|712 +./htdocs/img/icons/edit_white.svg|725 +./htdocs/img/icons/file/dir.png|6937 +./htdocs/img/icons/file/doc.png|6455 +./htdocs/img/icons/file/docx.png|6455 +./htdocs/img/icons/file/file.png|4540 +./htdocs/img/icons/file/jpg.png|6297 +./htdocs/img/icons/file/pdf.png|8783 +./htdocs/img/icons/file/png.png|6297 +./htdocs/img/icons/file/txt.png|6049 +./htdocs/img/icons/file/xls.png|6065 +./htdocs/img/icons/file/xlsx.png|6065 +./htdocs/img/icons/file.svg|272 +./htdocs/img/icons/file_white.svg|284 +./htdocs/img/icons/folder.svg|404 +./htdocs/img/icons/folder_white.svg|417 +./htdocs/img/icons/globe.svg|1242 +./htdocs/img/icons/globe_white.svg|1254 +./htdocs/img/icons/group.svg|1994 +./htdocs/img/icons/group_white.svg|2006 +./htdocs/img/icons/history.svg|1284 +./htdocs/img/icons/history_white.svg|1296 +./htdocs/img/icons/inbox.svg|413 +./htdocs/img/icons/inbox_white.svg|425 +./htdocs/img/icons/library.svg|968 +./htdocs/img/icons/library_white.svg|980 +./htdocs/img/icons/license.svg|478 +./htdocs/img/icons/license_white.svg|490 +./htdocs/img/icons/list.svg|640 +./htdocs/img/icons/list_white.svg|652 +./htdocs/img/icons/logout.svg|402 +./htdocs/img/icons/logout_white.svg|414 +./htdocs/img/icons/menu.svg|336 +./htdocs/img/icons/menu_white.svg|348 +./htdocs/img/icons/newspaper.svg|812 +./htdocs/img/icons/newspaper_white.svg|824 +./htdocs/img/icons/numberlist.svg|908 +./htdocs/img/icons/numberlist_white.svg|920 +./htdocs/img/icons/package.svg|408 +./htdocs/img/icons/package_white.svg|420 +./htdocs/img/icons/pictures.svg|1420 +./htdocs/img/icons/pictures_white.svg|1436 +./htdocs/img/icons/plus.svg|535 +./htdocs/img/icons/plus_white.svg|547 +./htdocs/img/icons/remove.svg|816 +./htdocs/img/icons/remove_white.svg|828 +./htdocs/img/icons/Save.svg|477 +./htdocs/img/icons/squares.svg|502 +./htdocs/img/icons/squares_white.svg|514 +./htdocs/img/icons/target.svg|780 +./htdocs/img/icons/target_white.svg|792 +./htdocs/img/icons/user.svg|780 +./htdocs/img/icons/user_white.svg|792 +./htdocs/js/admin.js|3246 +./htdocs/js/fieldsave.js|1447 +./htdocs/js/formsave.js|6063 +./htdocs/js/moduleglobal.js|839 +./htdocs/js/request.js|5308 +./htdocs/vendor/choices/base.css|2314 +./htdocs/vendor/choices/base.min.css|1604 +./htdocs/vendor/choices/choices.css|8095 +./htdocs/vendor/choices/choices.js|217424 +./htdocs/vendor/choices/choices.min.css|6735 +./htdocs/vendor/choices/choices.min.js|91604 +./htdocs/vendor/choices/scripts/choices.js|217424 +./htdocs/vendor/choices/scripts/choices.min.js|91604 +./htdocs/vendor/flatpickr/flatpickr.css|18831 +./htdocs/vendor/flatpickr/flatpickr.js|118042 +./htdocs/vendor/flatpickr/flatpickr.min.css|15954 +./htdocs/vendor/flatpickr/flatpickr.min.js|48368 +./htdocs/vendor/flatpickr/ie.css|260 +./htdocs/vendor/flatpickr/index.d.ts|138 +./htdocs/vendor/flatpickr/l10n/de.d.ts|2272 +./htdocs/vendor/flatpickr/l10n/de.js|1757 +./htdocs/vendor/flatpickr/l10n/default.d.ts|104 +./htdocs/vendor/flatpickr/l10n/default.js|2150 +./htdocs/vendor/flatpickr/l10n/fr.d.ts|2272 +./htdocs/vendor/flatpickr/l10n/fr.js|1893 +./htdocs/vendor/flatpickr/l10n/lu.d.ts|2314 +./htdocs/vendor/flatpickr/l10n/lu.js|1802 +./htdocs/vendor/flatpickr/plugins/confirmDate/confirmDate.css|373 +./htdocs/vendor/flatpickr/plugins/confirmDate/confirmDate.d.ts|272 +./htdocs/vendor/flatpickr/plugins/confirmDate/confirmDate.js|4236 +./htdocs/vendor/flatpickr/plugins/labelPlugin/labelPlugin.d.ts|114 +./htdocs/vendor/flatpickr/plugins/labelPlugin/labelPlugin.js|964 +./htdocs/vendor/flatpickr/plugins/minMaxTimePlugin.d.ts|491 +./htdocs/vendor/flatpickr/plugins/minMaxTimePlugin.js|12399 +./htdocs/vendor/flatpickr/plugins/monthSelect/index.d.ts|367 +./htdocs/vendor/flatpickr/plugins/monthSelect/index.js|7757 +./htdocs/vendor/flatpickr/plugins/monthSelect/style.css|1561 +./htdocs/vendor/flatpickr/plugins/monthSelect/tests.spec.d.ts|11 +./htdocs/vendor/flatpickr/plugins/rangePlugin.d.ts|312 +./htdocs/vendor/flatpickr/plugins/rangePlugin.js|6475 +./htdocs/vendor/flatpickr/plugins/scrollPlugin.d.ts|113 +./htdocs/vendor/flatpickr/plugins/scrollPlugin.js|2026 +./htdocs/vendor/flatpickr/plugins/weekSelect/weekSelect.d.ts|218 +./htdocs/vendor/flatpickr/plugins/weekSelect/weekSelect.js|3500 +./htdocs/vendor/flatpickr/themes/airbnb.css|21148 +./htdocs/vendor/flatpickr/themes/confetti.css|19048 +./htdocs/vendor/flatpickr/themes/dark.css|18875 +./htdocs/vendor/flatpickr/themes/light.css|18996 +./htdocs/vendor/flatpickr/themes/material_blue.css|19048 +./htdocs/vendor/flatpickr/themes/material_green.css|19048 +./htdocs/vendor/flatpickr/themes/material_orange.css|19048 +./htdocs/vendor/flatpickr/themes/material_red.css|19048 +./htdocs/vendor/flatpickr/types/globals.d.ts|546 +./htdocs/vendor/flatpickr/types/instance.d.ts|4386 +./htdocs/vendor/flatpickr/types/locale.d.ts|2263 +./htdocs/vendor/flatpickr/types/options.d.ts|4564 +./htdocs/vendor/flatpickr/typings.d.ts|1001 +./htdocs/vendor/flatpickr/utils/dates.d.ts|922 +./htdocs/vendor/flatpickr/utils/dom.d.ts|585 +./htdocs/vendor/flatpickr/utils/formatting.d.ts|834 +./htdocs/vendor/flatpickr/utils/index.d.ts|393 +./htdocs/vendor/flatpickr/utils/polyfills.d.ts|0 +./htdocs/vendor/jspdf/jspdf.min.js|307591 +./htdocs/vendor/jspdf/jspdf.plugin.autotable.js|71296 +./htdocs/vendor/jspdf/jspdf.plugin.autotable.min.js|30274 +./htdocs/vendor/jsxlsx/cpexcel.js|471033 +./htdocs/vendor/jsxlsx/jszip.js|288108 +./htdocs/vendor/jsxlsx/LICENSE|11356 +./htdocs/vendor/jsxlsx/shim.min.js|5651 +./htdocs/vendor/jsxlsx/xlsx.core.min.js|477227 +./htdocs/vendor/jsxlsx/xlsx.core.min.map|717898 +./htdocs/vendor/jsxlsx/xlsx.extendscript.js|992249 +./htdocs/vendor/jsxlsx/xlsx.full.min.js|921331 +./htdocs/vendor/jsxlsx/xlsx.full.min.map|841224 +./htdocs/vendor/jsxlsx/xlsx.js|696439 +./htdocs/vendor/jsxlsx/xlsx.min.js|397226 +./htdocs/vendor/jsxlsx/xlsx.min.map|586186 +./htdocs/vendor/moment/moment-with-locales.min.js|330190 +./htdocs/vendor/moment/moment.min.js|51746 +./htdocs/vendor/tabulator/css/bootstrap/tabulator_bootstrap.css|19703 +./htdocs/vendor/tabulator/css/bootstrap/tabulator_bootstrap.min.css|17088 +./htdocs/vendor/tabulator/css/bootstrap/tabulator_bootstrap.min.css.map|27442 +./htdocs/vendor/tabulator/css/bootstrap/tabulator_bootstrap4.css|25548 +./htdocs/vendor/tabulator/css/bootstrap/tabulator_bootstrap4.min.css|22258 +./htdocs/vendor/tabulator/css/bootstrap/tabulator_bootstrap4.min.css.map|34724 +./htdocs/vendor/tabulator/css/bulma/tabulator_bulma.css|19945 +./htdocs/vendor/tabulator/css/bulma/tabulator_bulma.min.css|17240 +./htdocs/vendor/tabulator/css/bulma/tabulator_bulma.min.css.map|27793 +./htdocs/vendor/tabulator/css/semantic-ui/tabulator_semantic-ui.css|31861 +./htdocs/vendor/tabulator/css/semantic-ui/tabulator_semantic-ui.min.css|23042 +./htdocs/vendor/tabulator/css/semantic-ui/tabulator_semantic-ui.min.css.map|42076 +./htdocs/vendor/tabulator/css/tabulator.css|18678 +./htdocs/vendor/tabulator/css/tabulator.min.css|16153 +./htdocs/vendor/tabulator/css/tabulator.min.css.map|30054 +./htdocs/vendor/tabulator/css/tabulator_midnight.css|18806 +./htdocs/vendor/tabulator/css/tabulator_midnight.min.css|16278 +./htdocs/vendor/tabulator/css/tabulator_midnight.min.css.map|30296 +./htdocs/vendor/tabulator/css/tabulator_modern.css|19468 +./htdocs/vendor/tabulator/css/tabulator_modern.min.css|16838 +./htdocs/vendor/tabulator/css/tabulator_modern.min.css.map|31647 +./htdocs/vendor/tabulator/css/tabulator_simple.css|18618 +./htdocs/vendor/tabulator/css/tabulator_simple.min.css|16106 +./htdocs/vendor/tabulator/css/tabulator_simple.min.css.map|30033 +./htdocs/vendor/tabulator/css/tabulator_site.css|18507 +./htdocs/vendor/tabulator/css/tabulator_site.min.css|16002 +./htdocs/vendor/tabulator/css/tabulator_site.min.css.map|30389 +./htdocs/vendor/tabulator/js/jquery_wrapper.js|1421 +./htdocs/vendor/tabulator/js/jquery_wrapper.min.js|699 +./htdocs/vendor/tabulator/js/modules/accessor.js|2558 +./htdocs/vendor/tabulator/js/modules/accessor.min.js|1455 +./htdocs/vendor/tabulator/js/modules/ajax.js|11994 +./htdocs/vendor/tabulator/js/modules/ajax.min.js|8042 +./htdocs/vendor/tabulator/js/modules/calculation_colums.js|11664 +./htdocs/vendor/tabulator/js/modules/calculation_colums.min.js|7402 +./htdocs/vendor/tabulator/js/modules/clipboard.js|25291 +./htdocs/vendor/tabulator/js/modules/clipboard.min.js|14993 +./htdocs/vendor/tabulator/js/modules/data_tree.js|8748 +./htdocs/vendor/tabulator/js/modules/data_tree.min.js|5983 +./htdocs/vendor/tabulator/js/modules/download.js|20203 +./htdocs/vendor/tabulator/js/modules/download.min.js|9822 +./htdocs/vendor/tabulator/js/modules/edit.js|43160 +./htdocs/vendor/tabulator/js/modules/edit.min.js|22312 +./htdocs/vendor/tabulator/js/modules/filter.js|20848 +./htdocs/vendor/tabulator/js/modules/filter.min.js|11513 +./htdocs/vendor/tabulator/js/modules/format.js|21000 +./htdocs/vendor/tabulator/js/modules/format.min.js|12537 +./htdocs/vendor/tabulator/js/modules/frozen_columns.js|6116 +./htdocs/vendor/tabulator/js/modules/frozen_columns.min.js|3946 +./htdocs/vendor/tabulator/js/modules/frozen_rows.js|2249 +./htdocs/vendor/tabulator/js/modules/frozen_rows.min.js|1645 +./htdocs/vendor/tabulator/js/modules/group_rows.js|25932 +./htdocs/vendor/tabulator/js/modules/group_rows.min.js|17645 +./htdocs/vendor/tabulator/js/modules/history.js|3203 +./htdocs/vendor/tabulator/js/modules/history.min.js|2270 +./htdocs/vendor/tabulator/js/modules/html_table_export.js|10649 +./htdocs/vendor/tabulator/js/modules/html_table_export.min.js|6930 +./htdocs/vendor/tabulator/js/modules/html_table_import.js|5208 +./htdocs/vendor/tabulator/js/modules/html_table_import.min.js|2721 +./htdocs/vendor/tabulator/js/modules/keybindings.js|8003 +./htdocs/vendor/tabulator/js/modules/keybindings.min.js|5002 +./htdocs/vendor/tabulator/js/modules/moveable_columns.js|8666 +./htdocs/vendor/tabulator/js/modules/moveable_columns.min.js|5383 +./htdocs/vendor/tabulator/js/modules/moveable_rows.js|16514 +./htdocs/vendor/tabulator/js/modules/moveable_rows.min.js|11212 +./htdocs/vendor/tabulator/js/modules/mutator.js|2940 +./htdocs/vendor/tabulator/js/modules/mutator.min.js|1722 +./htdocs/vendor/tabulator/js/modules/page.js|16067 +./htdocs/vendor/tabulator/js/modules/page.min.js|10966 +./htdocs/vendor/tabulator/js/modules/persistence.js|4822 +./htdocs/vendor/tabulator/js/modules/persistence.min.js|2767 +./htdocs/vendor/tabulator/js/modules/print.js|3008 +./htdocs/vendor/tabulator/js/modules/print.min.js|2306 +./htdocs/vendor/tabulator/js/modules/reactive_data.js|5286 +./htdocs/vendor/tabulator/js/modules/reactive_data.min.js|3051 +./htdocs/vendor/tabulator/js/modules/resize_columns.js|5035 +./htdocs/vendor/tabulator/js/modules/resize_columns.min.js|3034 +./htdocs/vendor/tabulator/js/modules/resize_rows.js|2885 +./htdocs/vendor/tabulator/js/modules/resize_rows.min.js|1741 +./htdocs/vendor/tabulator/js/modules/resize_table.js|895 +./htdocs/vendor/tabulator/js/modules/resize_table.min.js|669 +./htdocs/vendor/tabulator/js/modules/responsive_layout.js|6313 +./htdocs/vendor/tabulator/js/modules/responsive_layout.min.js|4016 +./htdocs/vendor/tabulator/js/modules/select_row.js|9355 +./htdocs/vendor/tabulator/js/modules/select_row.min.js|5969 +./htdocs/vendor/tabulator/js/modules/sort.js|13879 +./htdocs/vendor/tabulator/js/modules/sort.min.js|7200 +./htdocs/vendor/tabulator/js/modules/validate.js|5230 +./htdocs/vendor/tabulator/js/modules/validate.min.js|2576 +./htdocs/vendor/tabulator/js/tabulator.js|531228 +./htdocs/vendor/tabulator/js/tabulator.min.js|301937 +./htdocs/vendor/tabulator/js/tabulator_core.js|190661 +./htdocs/vendor/tabulator/js/tabulator_core.min.js|117292 +./htdocs/vendor/tinymce/changelog.txt|92798 +./htdocs/vendor/tinymce/js/tinymce/jquery.tinymce.min.js|3561 +./htdocs/vendor/tinymce/js/tinymce/langs/de.js|10334 +./htdocs/vendor/tinymce/js/tinymce/langs/fr_FR.js|10140 +./htdocs/vendor/tinymce/js/tinymce/langs/readme.md|151 +./htdocs/vendor/tinymce/js/tinymce/license.txt|26945 +./htdocs/vendor/tinymce/js/tinymce/plugins/advlist/plugin.min.js|2226 +./htdocs/vendor/tinymce/js/tinymce/plugins/anchor/plugin.min.js|1426 +./htdocs/vendor/tinymce/js/tinymce/plugins/autolink/plugin.min.js|2127 +./htdocs/vendor/tinymce/js/tinymce/plugins/autoresize/plugin.min.js|2074 +./htdocs/vendor/tinymce/js/tinymce/plugins/autosave/plugin.min.js|3083 +./htdocs/vendor/tinymce/js/tinymce/plugins/bbcode/plugin.min.js|2850 +./htdocs/vendor/tinymce/js/tinymce/plugins/charmap/plugin.min.js|8601 +./htdocs/vendor/tinymce/js/tinymce/plugins/code/plugin.min.js|1024 +./htdocs/vendor/tinymce/js/tinymce/plugins/codesample/css/prism.css|2472 +./htdocs/vendor/tinymce/js/tinymce/plugins/codesample/plugin.min.js|19415 +./htdocs/vendor/tinymce/js/tinymce/plugins/colorpicker/plugin.min.js|1349 +./htdocs/vendor/tinymce/js/tinymce/plugins/contextmenu/plugin.min.js|1824 +./htdocs/vendor/tinymce/js/tinymce/plugins/directionality/plugin.min.js|857 +./htdocs/vendor/tinymce/js/tinymce/plugins/emoticons/img/smiley-cool.gif|354 +./htdocs/vendor/tinymce/js/tinymce/plugins/emoticons/img/smiley-cry.gif|329 +./htdocs/vendor/tinymce/js/tinymce/plugins/emoticons/img/smiley-embarassed.gif|331 +./htdocs/vendor/tinymce/js/tinymce/plugins/emoticons/img/smiley-foot-in-mouth.gif|342 +./htdocs/vendor/tinymce/js/tinymce/plugins/emoticons/img/smiley-frown.gif|340 +./htdocs/vendor/tinymce/js/tinymce/plugins/emoticons/img/smiley-innocent.gif|336 +./htdocs/vendor/tinymce/js/tinymce/plugins/emoticons/img/smiley-kiss.gif|338 +./htdocs/vendor/tinymce/js/tinymce/plugins/emoticons/img/smiley-laughing.gif|343 +./htdocs/vendor/tinymce/js/tinymce/plugins/emoticons/img/smiley-money-mouth.gif|321 +./htdocs/vendor/tinymce/js/tinymce/plugins/emoticons/img/smiley-sealed.gif|323 +./htdocs/vendor/tinymce/js/tinymce/plugins/emoticons/img/smiley-smile.gif|344 +./htdocs/vendor/tinymce/js/tinymce/plugins/emoticons/img/smiley-surprised.gif|338 +./htdocs/vendor/tinymce/js/tinymce/plugins/emoticons/img/smiley-tongue-out.gif|328 +./htdocs/vendor/tinymce/js/tinymce/plugins/emoticons/img/smiley-undecided.gif|337 +./htdocs/vendor/tinymce/js/tinymce/plugins/emoticons/img/smiley-wink.gif|350 +./htdocs/vendor/tinymce/js/tinymce/plugins/emoticons/img/smiley-yell.gif|336 +./htdocs/vendor/tinymce/js/tinymce/plugins/emoticons/plugin.min.js|1071 +./htdocs/vendor/tinymce/js/tinymce/plugins/fullpage/plugin.min.js|7168 +./htdocs/vendor/tinymce/js/tinymce/plugins/fullscreen/plugin.min.js|2161 +./htdocs/vendor/tinymce/js/tinymce/plugins/help/img/logo.png|13208 +./htdocs/vendor/tinymce/js/tinymce/plugins/help/plugin.min.js|9992 +./htdocs/vendor/tinymce/js/tinymce/plugins/hr/plugin.min.js|428 +./htdocs/vendor/tinymce/js/tinymce/plugins/image/plugin.min.js|18255 +./htdocs/vendor/tinymce/js/tinymce/plugins/imagetools/plugin.min.js|36525 +./htdocs/vendor/tinymce/js/tinymce/plugins/importcss/plugin.min.js|3167 +./htdocs/vendor/tinymce/js/tinymce/plugins/insertdatetime/plugin.min.js|2633 +./htdocs/vendor/tinymce/js/tinymce/plugins/legacyoutput/plugin.min.js|3402 +./htdocs/vendor/tinymce/js/tinymce/plugins/link/plugin.min.js|8919 +./htdocs/vendor/tinymce/js/tinymce/plugins/lists/plugin.min.js|14256 +./htdocs/vendor/tinymce/js/tinymce/plugins/media/plugin.min.js|15064 +./htdocs/vendor/tinymce/js/tinymce/plugins/nonbreaking/plugin.min.js|1012 +./htdocs/vendor/tinymce/js/tinymce/plugins/noneditable/plugin.min.js|1540 +./htdocs/vendor/tinymce/js/tinymce/plugins/pagebreak/plugin.min.js|1436 +./htdocs/vendor/tinymce/js/tinymce/plugins/paste/plugin.min.js|21601 +./htdocs/vendor/tinymce/js/tinymce/plugins/preview/plugin.min.js|2044 +./htdocs/vendor/tinymce/js/tinymce/plugins/print/plugin.min.js|366 +./htdocs/vendor/tinymce/js/tinymce/plugins/save/plugin.min.js|1426 +./htdocs/vendor/tinymce/js/tinymce/plugins/searchreplace/plugin.min.js|7358 +./htdocs/vendor/tinymce/js/tinymce/plugins/spellchecker/plugin.min.js|10184 +./htdocs/vendor/tinymce/js/tinymce/plugins/tabfocus/plugin.min.js|1631 +./htdocs/vendor/tinymce/js/tinymce/plugins/table/plugin.min.js|135387 +./htdocs/vendor/tinymce/js/tinymce/plugins/template/plugin.min.js|5414 +./htdocs/vendor/tinymce/js/tinymce/plugins/textcolor/plugin.min.js|4924 +./htdocs/vendor/tinymce/js/tinymce/plugins/textpattern/plugin.min.js|4412 +./htdocs/vendor/tinymce/js/tinymce/plugins/toc/plugin.min.js|2941 +./htdocs/vendor/tinymce/js/tinymce/plugins/visualblocks/css/visualblocks.css|5627 +./htdocs/vendor/tinymce/js/tinymce/plugins/visualblocks/plugin.min.js|1691 +./htdocs/vendor/tinymce/js/tinymce/plugins/visualchars/plugin.min.js|6294 +./htdocs/vendor/tinymce/js/tinymce/plugins/wordcount/plugin.min.js|10937 +./htdocs/vendor/tinymce/js/tinymce/skins/lightgray/content.inline.min.css|3375 +./htdocs/vendor/tinymce/js/tinymce/skins/lightgray/content.min.css|3781 +./htdocs/vendor/tinymce/js/tinymce/skins/lightgray/content.mobile.min.css|234 +./htdocs/vendor/tinymce/js/tinymce/skins/lightgray/fonts/tinymce-mobile.woff|4624 +./htdocs/vendor/tinymce/js/tinymce/skins/lightgray/fonts/tinymce-small.eot|9492 +./htdocs/vendor/tinymce/js/tinymce/skins/lightgray/fonts/tinymce-small.svg|24789 +./htdocs/vendor/tinymce/js/tinymce/skins/lightgray/fonts/tinymce-small.ttf|9304 +./htdocs/vendor/tinymce/js/tinymce/skins/lightgray/fonts/tinymce-small.woff|9380 +./htdocs/vendor/tinymce/js/tinymce/skins/lightgray/fonts/tinymce.eot|18808 +./htdocs/vendor/tinymce/js/tinymce/skins/lightgray/fonts/tinymce.svg|46119 +./htdocs/vendor/tinymce/js/tinymce/skins/lightgray/fonts/tinymce.ttf|18644 +./htdocs/vendor/tinymce/js/tinymce/skins/lightgray/fonts/tinymce.woff|18720 +./htdocs/vendor/tinymce/js/tinymce/skins/lightgray/img/anchor.gif|53 +./htdocs/vendor/tinymce/js/tinymce/skins/lightgray/img/loader.gif|2608 +./htdocs/vendor/tinymce/js/tinymce/skins/lightgray/img/object.gif|152 +./htdocs/vendor/tinymce/js/tinymce/skins/lightgray/img/trans.gif|43 +./htdocs/vendor/tinymce/js/tinymce/skins/lightgray/skin.min.css|43950 +./htdocs/vendor/tinymce/js/tinymce/skins/lightgray/skin.mobile.min.css|28006 +./htdocs/vendor/tinymce/js/tinymce/themes/inlite/theme.min.js|137124 +./htdocs/vendor/tinymce/js/tinymce/themes/mobile/theme.min.js|174158 +./htdocs/vendor/tinymce/js/tinymce/themes/modern/theme.min.js|135904 +./htdocs/vendor/tinymce/js/tinymce/tinymce.min.js|350402 +./htdocs/vendor/tinymce/LICENSE.TXT|26945 +./tools/fingerdelete.py|1219 +./tools/fingerenroll.py|2747 +./tools/fingerindex.py|1176 +./tools/fingerledoff.py|583 +./tools/fingerledon.py|582 +./tools/fingersearch.py|1962 +./tools/fpunload.sh|520 +./tools/pyfingerprint2/__init__.py|175 +./tools/pyfingerprint2/pyfingerprint.orig.py|44719 +./tools/pyfingerprint2/pyfingerprint.py|45813 diff --git a/pointeuse/dev/sourcefiles.remote.txt b/pointeuse/dev/sourcefiles.remote.txt new file mode 100644 index 00000000..7d1040ff --- /dev/null +++ b/pointeuse/dev/sourcefiles.remote.txt @@ -0,0 +1,412 @@ +./CGI/api/db.cgi|3027 +./CGI/api/fingerprint.cgi|4338 +./CGI/api/index.cgi|4333 +./CGI/api/lib/dksconfig.pm|1022 +./CGI/api/lib/dksdb.pm|11300 +./CGI/api/service.cgi|4844 +./CGI/api/system.cgi|4448 +./CGI/index.cgi|2667 +./CGI/tmpl/app/hourtrax/index.tt|2984 +./CGI/tmpl/app/hourtrax/module/members/index.js|3913 +./CGI/tmpl/app/hourtrax/module/members/index.tt|3416 +./CGI/tmpl/app/hourtrax/module/settings/index.js|0 +./CGI/tmpl/app/hourtrax/module/settings/index.tt|1192 +./CGI/tmpl/app/hourtrax/module/timetrack/index.js|2017 +./CGI/tmpl/app/hourtrax/module/timetrack/index.tt|401 +./CGI/tmpl/app/hourtrax/module/timetrack/usertimetrack.js|5633 +./CGI/tmpl/app/hourtrax/module/timetrack/usertimetrack.tt|3132 +./CGI/tmpl/app/system/hourtrax/index.js|0 +./CGI/tmpl/app/system/hourtrax/index.tt|0 +./CGI/tmpl/app/system/index.tt|2888 +./CGI/tmpl/app/system/network/index.js|0 +./CGI/tmpl/app/system/network/index.tt|1193 +./CGI/tmpl/app/system/vpn/index.js|0 +./CGI/tmpl/app/system/vpn/index.tt|0 +./CGI/tmpl/app/timeclock/index.js|14470 +./CGI/tmpl/app/timeclock/index.tt|9073 +./CGI/tmpl/block/snackbar.tt|25 +./CGI/tmpl/macro/fields.tt|8091 +./CGI/tmpl/skeleton/app.tt|82 +./CGI/tmpl/skeleton/file.tt|82 +./CGI/tmpl/skeleton/index.tt|1861 +./CGI/tmpl/skeleton/module.tt|3361 +./hourtrax.pl|3246 +./htdocs/css/admin.css|5127 +./htdocs/css/clock2.css|72 +./htdocs/css/clock.css|6290 +./htdocs/css/w3pro.css|26847 +./htdocs/img/dks_1000.png|68554 +./htdocs/img/fingerprint/finger1.svg|4819 +./htdocs/img/fingerprint/finger2.svg|4963 +./htdocs/img/fingerprint/finger3.svg|4796 +./htdocs/img/fingerprint/finger4.svg|4768 +./htdocs/img/fingerprint/finger5.svg|4788 +./htdocs/img/fingerprint/fingerprint-check.svg|5525 +./htdocs/img/fingerprint/fingerprint-crosshair.svg|6148 +./htdocs/img/fingerprint/fingerprint-remove.svg|5587 +./htdocs/img/fingerprint/fingerprint-remove_white.svg|5720 +./htdocs/img/fingerprint/fingerprint-scanning-index.svg|7393 +./htdocs/img/fingerprint/fingerprint-scanning.svg|6064 +./htdocs/img/fingerprint/fingerprint-search.svg|17333 +./htdocs/img/fingerprint/fingerprint-simple.svg|5706 +./htdocs/img/hourtrax.png|23443 +./htdocs/img/hourtrax.svg|10430 +./htdocs/img/icons/address.svg|800 +./htdocs/img/icons/address_white.svg|812 +./htdocs/img/icons/Adobe_Acrobat.svg|3436 +./htdocs/img/icons/Adobe_PDF_Export.svg|2730 +./htdocs/img/icons/Agreement_01.svg|5234 +./htdocs/img/icons/apps.svg|781 +./htdocs/img/icons/apps_white.svg|793 +./htdocs/img/icons/archive.svg|273 +./htdocs/img/icons/archive_white.svg|285 +./htdocs/img/icons/Bill.svg|3185 +./htdocs/img/icons/calendar.svg|954 +./htdocs/img/icons/calendar_white.svg|966 +./htdocs/img/icons/clocktime.svg|1122 +./htdocs/img/icons/clocktime_white.svg|1117 +./htdocs/img/icons/clubs.svg|1033 +./htdocs/img/icons/club.svg|823 +./htdocs/img/icons/clubs_white.svg|1045 +./htdocs/img/icons/club_white.svg|835 +./htdocs/img/icons/code.svg|589 +./htdocs/img/icons/cubelight.svg|1023 +./htdocs/img/icons/cubelight_white.svg|1036 +./htdocs/img/icons/cube.svg|365 +./htdocs/img/icons/cube_white.svg|378 +./htdocs/img/icons/dashboard.svg|1085 +./htdocs/img/icons/dashboard_white.svg|1098 +./htdocs/img/icons/Document_Save.svg|729 +./htdocs/img/icons/download.svg|339 +./htdocs/img/icons/download_white.svg|351 +./htdocs/img/icons/duplicate.svg|430 +./htdocs/img/icons/duplicate_white.svg|442 +./htdocs/img/icons/edit.svg|712 +./htdocs/img/icons/edit_white.svg|725 +./htdocs/img/icons/file/dir.png|6937 +./htdocs/img/icons/file/doc.png|6455 +./htdocs/img/icons/file/docx.png|6455 +./htdocs/img/icons/file/file.png|4540 +./htdocs/img/icons/file/jpg.png|6297 +./htdocs/img/icons/file/pdf.png|8783 +./htdocs/img/icons/file/png.png|6297 +./htdocs/img/icons/file.svg|272 +./htdocs/img/icons/file/txt.png|6049 +./htdocs/img/icons/file_white.svg|284 +./htdocs/img/icons/file/xls.png|6065 +./htdocs/img/icons/file/xlsx.png|6065 +./htdocs/img/icons/folder.svg|404 +./htdocs/img/icons/folder_white.svg|417 +./htdocs/img/icons/globe.svg|1242 +./htdocs/img/icons/globe_white.svg|1254 +./htdocs/img/icons/group.svg|1994 +./htdocs/img/icons/group_white.svg|2006 +./htdocs/img/icons/history.svg|1284 +./htdocs/img/icons/history_white.svg|1296 +./htdocs/img/icons/inbox.svg|413 +./htdocs/img/icons/inbox_white.svg|425 +./htdocs/img/icons/library.svg|968 +./htdocs/img/icons/library_white.svg|980 +./htdocs/img/icons/license.svg|478 +./htdocs/img/icons/license_white.svg|490 +./htdocs/img/icons/list.svg|640 +./htdocs/img/icons/list_white.svg|652 +./htdocs/img/icons/logout.svg|402 +./htdocs/img/icons/logout_white.svg|414 +./htdocs/img/icons/menu.svg|336 +./htdocs/img/icons/menu_white.svg|348 +./htdocs/img/icons/newspaper.svg|812 +./htdocs/img/icons/newspaper_white.svg|824 +./htdocs/img/icons/numberlist.svg|908 +./htdocs/img/icons/numberlist_white.svg|920 +./htdocs/img/icons/package.svg|408 +./htdocs/img/icons/package_white.svg|420 +./htdocs/img/icons/pictures.svg|1420 +./htdocs/img/icons/pictures_white.svg|1436 +./htdocs/img/icons/plus.svg|535 +./htdocs/img/icons/plus_white.svg|547 +./htdocs/img/icons/remove.svg|816 +./htdocs/img/icons/remove_white.svg|828 +./htdocs/img/icons/Save.svg|477 +./htdocs/img/icons/squares.svg|502 +./htdocs/img/icons/squares_white.svg|514 +./htdocs/img/icons/target.svg|780 +./htdocs/img/icons/target_white.svg|792 +./htdocs/img/icons/user.svg|780 +./htdocs/img/icons/user_white.svg|792 +./htdocs/js/admin_ht.js|12992 +./htdocs/js/admin.js|3246 +./htdocs/js/fieldsave.js|1445 +./htdocs/js/formsave.js|6063 +./htdocs/js/moduleglobal.js|839 +./htdocs/js/request.js|5300 +./htdocs/js/sysconfig.js|5904 +./htdocs/vendor/choices/base.css|2314 +./htdocs/vendor/choices/base.min.css|1604 +./htdocs/vendor/choices/choices.css|8095 +./htdocs/vendor/choices/choices.js|217424 +./htdocs/vendor/choices/choices.min.css|6735 +./htdocs/vendor/choices/choices.min.js|91604 +./htdocs/vendor/choices/scripts/choices.js|217424 +./htdocs/vendor/choices/scripts/choices.min.js|91604 +./htdocs/vendor/flatpickr/flatpickr.css|18831 +./htdocs/vendor/flatpickr/flatpickr.js|118042 +./htdocs/vendor/flatpickr/flatpickr.min.css|15954 +./htdocs/vendor/flatpickr/flatpickr.min.js|48368 +./htdocs/vendor/flatpickr/ie.css|260 +./htdocs/vendor/flatpickr/index.d.ts|138 +./htdocs/vendor/flatpickr/l10n/de.d.ts|2272 +./htdocs/vendor/flatpickr/l10n/default.d.ts|104 +./htdocs/vendor/flatpickr/l10n/default.js|2150 +./htdocs/vendor/flatpickr/l10n/de.js|1757 +./htdocs/vendor/flatpickr/l10n/fr.d.ts|2272 +./htdocs/vendor/flatpickr/l10n/fr.js|1893 +./htdocs/vendor/flatpickr/l10n/lu.d.ts|2314 +./htdocs/vendor/flatpickr/l10n/lu.js|1802 +./htdocs/vendor/flatpickr/plugins/confirmDate/confirmDate.css|373 +./htdocs/vendor/flatpickr/plugins/confirmDate/confirmDate.d.ts|272 +./htdocs/vendor/flatpickr/plugins/confirmDate/confirmDate.js|4236 +./htdocs/vendor/flatpickr/plugins/labelPlugin/labelPlugin.d.ts|114 +./htdocs/vendor/flatpickr/plugins/labelPlugin/labelPlugin.js|964 +./htdocs/vendor/flatpickr/plugins/minMaxTimePlugin.d.ts|491 +./htdocs/vendor/flatpickr/plugins/minMaxTimePlugin.js|12399 +./htdocs/vendor/flatpickr/plugins/monthSelect/index.d.ts|367 +./htdocs/vendor/flatpickr/plugins/monthSelect/index.js|7757 +./htdocs/vendor/flatpickr/plugins/monthSelect/style.css|1561 +./htdocs/vendor/flatpickr/plugins/monthSelect/tests.spec.d.ts|11 +./htdocs/vendor/flatpickr/plugins/rangePlugin.d.ts|312 +./htdocs/vendor/flatpickr/plugins/rangePlugin.js|6475 +./htdocs/vendor/flatpickr/plugins/scrollPlugin.d.ts|113 +./htdocs/vendor/flatpickr/plugins/scrollPlugin.js|2026 +./htdocs/vendor/flatpickr/plugins/weekSelect/weekSelect.d.ts|218 +./htdocs/vendor/flatpickr/plugins/weekSelect/weekSelect.js|3500 +./htdocs/vendor/flatpickr/themes/airbnb.css|21148 +./htdocs/vendor/flatpickr/themes/confetti.css|19048 +./htdocs/vendor/flatpickr/themes/dark.css|18875 +./htdocs/vendor/flatpickr/themes/light.css|18996 +./htdocs/vendor/flatpickr/themes/material_blue.css|19048 +./htdocs/vendor/flatpickr/themes/material_green.css|19048 +./htdocs/vendor/flatpickr/themes/material_orange.css|19048 +./htdocs/vendor/flatpickr/themes/material_red.css|19048 +./htdocs/vendor/flatpickr/types/globals.d.ts|546 +./htdocs/vendor/flatpickr/types/instance.d.ts|4386 +./htdocs/vendor/flatpickr/types/locale.d.ts|2263 +./htdocs/vendor/flatpickr/types/options.d.ts|4564 +./htdocs/vendor/flatpickr/typings.d.ts|1001 +./htdocs/vendor/flatpickr/utils/dates.d.ts|922 +./htdocs/vendor/flatpickr/utils/dom.d.ts|585 +./htdocs/vendor/flatpickr/utils/formatting.d.ts|834 +./htdocs/vendor/flatpickr/utils/index.d.ts|393 +./htdocs/vendor/flatpickr/utils/polyfills.d.ts|0 +./htdocs/vendor/jspdf/jspdf.min.js|307591 +./htdocs/vendor/jspdf/jspdf.plugin.autotable.js|71296 +./htdocs/vendor/jspdf/jspdf.plugin.autotable.min.js|30274 +./htdocs/vendor/jsxlsx/cpexcel.js|471033 +./htdocs/vendor/jsxlsx/jszip.js|288108 +./htdocs/vendor/jsxlsx/LICENSE|11356 +./htdocs/vendor/jsxlsx/shim.min.js|5651 +./htdocs/vendor/jsxlsx/xlsx.core.min.js|477227 +./htdocs/vendor/jsxlsx/xlsx.core.min.map|717898 +./htdocs/vendor/jsxlsx/xlsx.extendscript.js|992249 +./htdocs/vendor/jsxlsx/xlsx.full.min.js|921331 +./htdocs/vendor/jsxlsx/xlsx.full.min.map|841224 +./htdocs/vendor/jsxlsx/xlsx.js|696439 +./htdocs/vendor/jsxlsx/xlsx.min.js|397226 +./htdocs/vendor/jsxlsx/xlsx.min.map|586186 +./htdocs/vendor/moment/moment.min.js|51746 +./htdocs/vendor/moment/moment-with-locales.min.js|330190 +./htdocs/vendor/tabulator/css/bootstrap/tabulator_bootstrap4.css|25548 +./htdocs/vendor/tabulator/css/bootstrap/tabulator_bootstrap4.min.css|22258 +./htdocs/vendor/tabulator/css/bootstrap/tabulator_bootstrap4.min.css.map|34724 +./htdocs/vendor/tabulator/css/bootstrap/tabulator_bootstrap.css|19703 +./htdocs/vendor/tabulator/css/bootstrap/tabulator_bootstrap.min.css|17088 +./htdocs/vendor/tabulator/css/bootstrap/tabulator_bootstrap.min.css.map|27442 +./htdocs/vendor/tabulator/css/bulma/tabulator_bulma.css|19945 +./htdocs/vendor/tabulator/css/bulma/tabulator_bulma.min.css|17240 +./htdocs/vendor/tabulator/css/bulma/tabulator_bulma.min.css.map|27793 +./htdocs/vendor/tabulator/css/semantic-ui/tabulator_semantic-ui.css|31861 +./htdocs/vendor/tabulator/css/semantic-ui/tabulator_semantic-ui.min.css|23042 +./htdocs/vendor/tabulator/css/semantic-ui/tabulator_semantic-ui.min.css.map|42076 +./htdocs/vendor/tabulator/css/tabulator.css|18678 +./htdocs/vendor/tabulator/css/tabulator_midnight.css|18806 +./htdocs/vendor/tabulator/css/tabulator_midnight.min.css|16278 +./htdocs/vendor/tabulator/css/tabulator_midnight.min.css.map|30296 +./htdocs/vendor/tabulator/css/tabulator.min.css|16153 +./htdocs/vendor/tabulator/css/tabulator.min.css.map|30054 +./htdocs/vendor/tabulator/css/tabulator_modern.css|19468 +./htdocs/vendor/tabulator/css/tabulator_modern.min.css|16838 +./htdocs/vendor/tabulator/css/tabulator_modern.min.css.map|31647 +./htdocs/vendor/tabulator/css/tabulator_simple.css|18618 +./htdocs/vendor/tabulator/css/tabulator_simple.min.css|16106 +./htdocs/vendor/tabulator/css/tabulator_simple.min.css.map|30033 +./htdocs/vendor/tabulator/css/tabulator_site.css|18507 +./htdocs/vendor/tabulator/css/tabulator_site.min.css|16002 +./htdocs/vendor/tabulator/css/tabulator_site.min.css.map|30389 +./htdocs/vendor/tabulator/js/jquery_wrapper.js|1421 +./htdocs/vendor/tabulator/js/jquery_wrapper.min.js|699 +./htdocs/vendor/tabulator/js/modules/accessor.js|2558 +./htdocs/vendor/tabulator/js/modules/accessor.min.js|1455 +./htdocs/vendor/tabulator/js/modules/ajax.js|11994 +./htdocs/vendor/tabulator/js/modules/ajax.min.js|8042 +./htdocs/vendor/tabulator/js/modules/calculation_colums.js|11664 +./htdocs/vendor/tabulator/js/modules/calculation_colums.min.js|7402 +./htdocs/vendor/tabulator/js/modules/clipboard.js|25291 +./htdocs/vendor/tabulator/js/modules/clipboard.min.js|14993 +./htdocs/vendor/tabulator/js/modules/data_tree.js|8748 +./htdocs/vendor/tabulator/js/modules/data_tree.min.js|5983 +./htdocs/vendor/tabulator/js/modules/download.js|20203 +./htdocs/vendor/tabulator/js/modules/download.min.js|9822 +./htdocs/vendor/tabulator/js/modules/edit.js|43160 +./htdocs/vendor/tabulator/js/modules/edit.min.js|22312 +./htdocs/vendor/tabulator/js/modules/filter.js|20848 +./htdocs/vendor/tabulator/js/modules/filter.min.js|11513 +./htdocs/vendor/tabulator/js/modules/format.js|21000 +./htdocs/vendor/tabulator/js/modules/format.min.js|12537 +./htdocs/vendor/tabulator/js/modules/frozen_columns.js|6116 +./htdocs/vendor/tabulator/js/modules/frozen_columns.min.js|3946 +./htdocs/vendor/tabulator/js/modules/frozen_rows.js|2249 +./htdocs/vendor/tabulator/js/modules/frozen_rows.min.js|1645 +./htdocs/vendor/tabulator/js/modules/group_rows.js|25932 +./htdocs/vendor/tabulator/js/modules/group_rows.min.js|17645 +./htdocs/vendor/tabulator/js/modules/history.js|3203 +./htdocs/vendor/tabulator/js/modules/history.min.js|2270 +./htdocs/vendor/tabulator/js/modules/html_table_export.js|10649 +./htdocs/vendor/tabulator/js/modules/html_table_export.min.js|6930 +./htdocs/vendor/tabulator/js/modules/html_table_import.js|5208 +./htdocs/vendor/tabulator/js/modules/html_table_import.min.js|2721 +./htdocs/vendor/tabulator/js/modules/keybindings.js|8003 +./htdocs/vendor/tabulator/js/modules/keybindings.min.js|5002 +./htdocs/vendor/tabulator/js/modules/moveable_columns.js|8666 +./htdocs/vendor/tabulator/js/modules/moveable_columns.min.js|5383 +./htdocs/vendor/tabulator/js/modules/moveable_rows.js|16514 +./htdocs/vendor/tabulator/js/modules/moveable_rows.min.js|11212 +./htdocs/vendor/tabulator/js/modules/mutator.js|2940 +./htdocs/vendor/tabulator/js/modules/mutator.min.js|1722 +./htdocs/vendor/tabulator/js/modules/page.js|16067 +./htdocs/vendor/tabulator/js/modules/page.min.js|10966 +./htdocs/vendor/tabulator/js/modules/persistence.js|4822 +./htdocs/vendor/tabulator/js/modules/persistence.min.js|2767 +./htdocs/vendor/tabulator/js/modules/print.js|3008 +./htdocs/vendor/tabulator/js/modules/print.min.js|2306 +./htdocs/vendor/tabulator/js/modules/reactive_data.js|5286 +./htdocs/vendor/tabulator/js/modules/reactive_data.min.js|3051 +./htdocs/vendor/tabulator/js/modules/resize_columns.js|5035 +./htdocs/vendor/tabulator/js/modules/resize_columns.min.js|3034 +./htdocs/vendor/tabulator/js/modules/resize_rows.js|2885 +./htdocs/vendor/tabulator/js/modules/resize_rows.min.js|1741 +./htdocs/vendor/tabulator/js/modules/resize_table.js|895 +./htdocs/vendor/tabulator/js/modules/resize_table.min.js|669 +./htdocs/vendor/tabulator/js/modules/responsive_layout.js|6313 +./htdocs/vendor/tabulator/js/modules/responsive_layout.min.js|4016 +./htdocs/vendor/tabulator/js/modules/select_row.js|9355 +./htdocs/vendor/tabulator/js/modules/select_row.min.js|5969 +./htdocs/vendor/tabulator/js/modules/sort.js|13879 +./htdocs/vendor/tabulator/js/modules/sort.min.js|7200 +./htdocs/vendor/tabulator/js/modules/validate.js|5230 +./htdocs/vendor/tabulator/js/modules/validate.min.js|2576 +./htdocs/vendor/tabulator/js/tabulator_core.js|190661 +./htdocs/vendor/tabulator/js/tabulator_core.min.js|117292 +./htdocs/vendor/tabulator/js/tabulator.js|531228 +./htdocs/vendor/tabulator/js/tabulator.min.js|301937 +./htdocs/vendor/tinymce/changelog.txt|92798 +./htdocs/vendor/tinymce/js/tinymce/jquery.tinymce.min.js|3561 +./htdocs/vendor/tinymce/js/tinymce/langs/de.js|10334 +./htdocs/vendor/tinymce/js/tinymce/langs/fr_FR.js|10140 +./htdocs/vendor/tinymce/js/tinymce/langs/readme.md|151 +./htdocs/vendor/tinymce/js/tinymce/license.txt|26945 +./htdocs/vendor/tinymce/js/tinymce/plugins/advlist/plugin.min.js|2226 +./htdocs/vendor/tinymce/js/tinymce/plugins/anchor/plugin.min.js|1426 +./htdocs/vendor/tinymce/js/tinymce/plugins/autolink/plugin.min.js|2127 +./htdocs/vendor/tinymce/js/tinymce/plugins/autoresize/plugin.min.js|2074 +./htdocs/vendor/tinymce/js/tinymce/plugins/autosave/plugin.min.js|3083 +./htdocs/vendor/tinymce/js/tinymce/plugins/bbcode/plugin.min.js|2850 +./htdocs/vendor/tinymce/js/tinymce/plugins/charmap/plugin.min.js|8601 +./htdocs/vendor/tinymce/js/tinymce/plugins/code/plugin.min.js|1024 +./htdocs/vendor/tinymce/js/tinymce/plugins/codesample/css/prism.css|2472 +./htdocs/vendor/tinymce/js/tinymce/plugins/codesample/plugin.min.js|19415 +./htdocs/vendor/tinymce/js/tinymce/plugins/colorpicker/plugin.min.js|1349 +./htdocs/vendor/tinymce/js/tinymce/plugins/contextmenu/plugin.min.js|1824 +./htdocs/vendor/tinymce/js/tinymce/plugins/directionality/plugin.min.js|857 +./htdocs/vendor/tinymce/js/tinymce/plugins/emoticons/img/smiley-cool.gif|354 +./htdocs/vendor/tinymce/js/tinymce/plugins/emoticons/img/smiley-cry.gif|329 +./htdocs/vendor/tinymce/js/tinymce/plugins/emoticons/img/smiley-embarassed.gif|331 +./htdocs/vendor/tinymce/js/tinymce/plugins/emoticons/img/smiley-foot-in-mouth.gif|342 +./htdocs/vendor/tinymce/js/tinymce/plugins/emoticons/img/smiley-frown.gif|340 +./htdocs/vendor/tinymce/js/tinymce/plugins/emoticons/img/smiley-innocent.gif|336 +./htdocs/vendor/tinymce/js/tinymce/plugins/emoticons/img/smiley-kiss.gif|338 +./htdocs/vendor/tinymce/js/tinymce/plugins/emoticons/img/smiley-laughing.gif|343 +./htdocs/vendor/tinymce/js/tinymce/plugins/emoticons/img/smiley-money-mouth.gif|321 +./htdocs/vendor/tinymce/js/tinymce/plugins/emoticons/img/smiley-sealed.gif|323 +./htdocs/vendor/tinymce/js/tinymce/plugins/emoticons/img/smiley-smile.gif|344 +./htdocs/vendor/tinymce/js/tinymce/plugins/emoticons/img/smiley-surprised.gif|338 +./htdocs/vendor/tinymce/js/tinymce/plugins/emoticons/img/smiley-tongue-out.gif|328 +./htdocs/vendor/tinymce/js/tinymce/plugins/emoticons/img/smiley-undecided.gif|337 +./htdocs/vendor/tinymce/js/tinymce/plugins/emoticons/img/smiley-wink.gif|350 +./htdocs/vendor/tinymce/js/tinymce/plugins/emoticons/img/smiley-yell.gif|336 +./htdocs/vendor/tinymce/js/tinymce/plugins/emoticons/plugin.min.js|1071 +./htdocs/vendor/tinymce/js/tinymce/plugins/fullpage/plugin.min.js|7168 +./htdocs/vendor/tinymce/js/tinymce/plugins/fullscreen/plugin.min.js|2161 +./htdocs/vendor/tinymce/js/tinymce/plugins/help/img/logo.png|13208 +./htdocs/vendor/tinymce/js/tinymce/plugins/help/plugin.min.js|9992 +./htdocs/vendor/tinymce/js/tinymce/plugins/hr/plugin.min.js|428 +./htdocs/vendor/tinymce/js/tinymce/plugins/image/plugin.min.js|18255 +./htdocs/vendor/tinymce/js/tinymce/plugins/imagetools/plugin.min.js|36525 +./htdocs/vendor/tinymce/js/tinymce/plugins/importcss/plugin.min.js|3167 +./htdocs/vendor/tinymce/js/tinymce/plugins/insertdatetime/plugin.min.js|2633 +./htdocs/vendor/tinymce/js/tinymce/plugins/legacyoutput/plugin.min.js|3402 +./htdocs/vendor/tinymce/js/tinymce/plugins/link/plugin.min.js|8919 +./htdocs/vendor/tinymce/js/tinymce/plugins/lists/plugin.min.js|14256 +./htdocs/vendor/tinymce/js/tinymce/plugins/media/plugin.min.js|15064 +./htdocs/vendor/tinymce/js/tinymce/plugins/nonbreaking/plugin.min.js|1012 +./htdocs/vendor/tinymce/js/tinymce/plugins/noneditable/plugin.min.js|1540 +./htdocs/vendor/tinymce/js/tinymce/plugins/pagebreak/plugin.min.js|1436 +./htdocs/vendor/tinymce/js/tinymce/plugins/paste/plugin.min.js|21601 +./htdocs/vendor/tinymce/js/tinymce/plugins/preview/plugin.min.js|2044 +./htdocs/vendor/tinymce/js/tinymce/plugins/print/plugin.min.js|366 +./htdocs/vendor/tinymce/js/tinymce/plugins/save/plugin.min.js|1426 +./htdocs/vendor/tinymce/js/tinymce/plugins/searchreplace/plugin.min.js|7358 +./htdocs/vendor/tinymce/js/tinymce/plugins/spellchecker/plugin.min.js|10184 +./htdocs/vendor/tinymce/js/tinymce/plugins/tabfocus/plugin.min.js|1631 +./htdocs/vendor/tinymce/js/tinymce/plugins/table/plugin.min.js|135387 +./htdocs/vendor/tinymce/js/tinymce/plugins/template/plugin.min.js|5414 +./htdocs/vendor/tinymce/js/tinymce/plugins/textcolor/plugin.min.js|4924 +./htdocs/vendor/tinymce/js/tinymce/plugins/textpattern/plugin.min.js|4412 +./htdocs/vendor/tinymce/js/tinymce/plugins/toc/plugin.min.js|2941 +./htdocs/vendor/tinymce/js/tinymce/plugins/visualblocks/css/visualblocks.css|5627 +./htdocs/vendor/tinymce/js/tinymce/plugins/visualblocks/plugin.min.js|1691 +./htdocs/vendor/tinymce/js/tinymce/plugins/visualchars/plugin.min.js|6294 +./htdocs/vendor/tinymce/js/tinymce/plugins/wordcount/plugin.min.js|10937 +./htdocs/vendor/tinymce/js/tinymce/skins/lightgray/content.inline.min.css|3375 +./htdocs/vendor/tinymce/js/tinymce/skins/lightgray/content.min.css|3781 +./htdocs/vendor/tinymce/js/tinymce/skins/lightgray/content.mobile.min.css|234 +./htdocs/vendor/tinymce/js/tinymce/skins/lightgray/fonts/tinymce.eot|18808 +./htdocs/vendor/tinymce/js/tinymce/skins/lightgray/fonts/tinymce-mobile.woff|4624 +./htdocs/vendor/tinymce/js/tinymce/skins/lightgray/fonts/tinymce-small.eot|9492 +./htdocs/vendor/tinymce/js/tinymce/skins/lightgray/fonts/tinymce-small.svg|24789 +./htdocs/vendor/tinymce/js/tinymce/skins/lightgray/fonts/tinymce-small.ttf|9304 +./htdocs/vendor/tinymce/js/tinymce/skins/lightgray/fonts/tinymce-small.woff|9380 +./htdocs/vendor/tinymce/js/tinymce/skins/lightgray/fonts/tinymce.svg|46119 +./htdocs/vendor/tinymce/js/tinymce/skins/lightgray/fonts/tinymce.ttf|18644 +./htdocs/vendor/tinymce/js/tinymce/skins/lightgray/fonts/tinymce.woff|18720 +./htdocs/vendor/tinymce/js/tinymce/skins/lightgray/img/anchor.gif|53 +./htdocs/vendor/tinymce/js/tinymce/skins/lightgray/img/loader.gif|2608 +./htdocs/vendor/tinymce/js/tinymce/skins/lightgray/img/object.gif|152 +./htdocs/vendor/tinymce/js/tinymce/skins/lightgray/img/trans.gif|43 +./htdocs/vendor/tinymce/js/tinymce/skins/lightgray/skin.min.css|43950 +./htdocs/vendor/tinymce/js/tinymce/skins/lightgray/skin.mobile.min.css|28006 +./htdocs/vendor/tinymce/js/tinymce/themes/inlite/theme.min.js|137124 +./htdocs/vendor/tinymce/js/tinymce/themes/mobile/theme.min.js|174158 +./htdocs/vendor/tinymce/js/tinymce/themes/modern/theme.min.js|135904 +./htdocs/vendor/tinymce/js/tinymce/tinymce.min.js|350402 +./htdocs/vendor/tinymce/LICENSE.TXT|26945 +./tools/fingerdelete.py|1219 +./tools/fingerenroll.py|2747 +./tools/fingerindex.py|1176 +./tools/fingerledoff.py|583 +./tools/fingerledon.py|582 +./tools/fingersearch.py|1962 +./tools/pyfingerprint2/__init__.py|175 +./tools/pyfingerprint2/__init__.pyc|297 +./tools/pyfingerprint2/pyfingerprint.orig.py|44719 +./tools/pyfingerprint2/pyfingerprint.py|45813 +./tools/pyfingerprint2/pyfingerprint.pyc|31042 diff --git a/pointeuse/dev/splash.png b/pointeuse/dev/splash.png new file mode 100644 index 00000000..118c3f76 Binary files /dev/null and b/pointeuse/dev/splash.png differ diff --git a/pointeuse/dev/splash.xcf b/pointeuse/dev/splash.xcf new file mode 100644 index 00000000..909ac0ed Binary files /dev/null and b/pointeuse/dev/splash.xcf differ diff --git a/pointeuse/dev/syncdb.pl b/pointeuse/dev/syncdb.pl new file mode 100644 index 00000000..1e78afe4 --- /dev/null +++ b/pointeuse/dev/syncdb.pl @@ -0,0 +1,48 @@ +#!/home/dks/perl5/perlbrew/perls/perl-5.28.1/bin/perl +use strict; +use FindBin qw($Bin); +# use lib ('CGI/api/lib/perl5'); +# use lib ('CGI/api/lib'); +use lib ($Bin.'/CGI/api/lib/perl5'); +use lib ($Bin.'/CGI/api/lib'); +# use CGI::Carp qw/fatalsToBrowser/; +use File::Basename; +use JSON::PP; +use Getopt::Long; +use dksconfig qw/$sitecfg/; +use dksdb; +use Encode; +my $sql = ""; +my @allsql = (); +my $file = ""; +GetOptions("sql|s=s" => \$sql,"file|f=s" => \$file); +if ($sql ne ""){ + @allsql = split(";",$sql); +} +elsif ($file ne "" && -e $file){ + my $strfile = ""; + open(SQF,$file); + while (my $l = ){ + $strfile .= $l; + } + close(SQF); + @allsql = split(";",$strfile); +} +my $db = dksdb->new(); +my $qall = (); +my $cnt = 0; +foreach my $sq (@allsql){ + my $qres = (); + if ($sq eq ""){next;} + if (lc($sql) =~ /^\s*select/){ + $qall->{$cnt} = $db->query($sq.";"); + } else { + $qall->{$cnt} = $db->exec($sq.";"); + } + $cnt++; +} +my $json = JSON::PP->new->utf8; +$json->pretty(1); +print $json->encode($qall); + + diff --git a/pointeuse/dev/syncdev.sh b/pointeuse/dev/syncdev.sh new file mode 100644 index 00000000..413fe1dd --- /dev/null +++ b/pointeuse/dev/syncdev.sh @@ -0,0 +1,93 @@ +#!/bin/bash +ACTION=$1 +REMOTEFOLDER="/home/dks/bin/hourtrax" +SSHUSER="dks" +SSHPORT="22" +SSHHOST="hourtrax" +SYNCOS=`uname` +CALLDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +cd "../bin/hourtrax" +echo "SYSTEM: "${SYNCOS} +if [ "${SYNCOS}" == "Darwin" ] +then + find . -type f -exec stat -f "%N|%z" {} \; | grep -v ".DS_Store" > ../../dev/sourcefiles.local.txt +else + find . -type f -printf "%p|%s\n" | sort > ../../dev/sourcefiles.local.txt +fi +ssh -p ${SSHPORT} ${SSHUSER}@${SSHHOST} 'cd '${REMOTEFOLDER}' && find . -type f -printf "%p|%s\n" | sort' > ../../dev/sourcefiles.remote.txt + +CDATE=`date +"%F"` +echo "To update:" +UPDFILES=`diff -y -W 200 ${CALLDIR}/sourcefiles.local.txt ${CALLDIR}/sourcefiles.remote.txt | grep " |" | awk '{ print $1 }' | cut -d"|" -f 1 | grep -v ".htaccess" | grep -v ".git" | grep -v "/data/" | grep -v "/media/"` +echo ${UPDFILES} +echo "" +echo "new files:" +INSFILES=`diff -y -W 200 ${CALLDIR}/sourcefiles.local.txt ${CALLDIR}/sourcefiles.remote.txt | grep " <" | awk '{ print $1 }' | cut -d"|" -f 1 | grep -v ".htaccess" | grep -v ".git" | grep -v "/data/" | grep -v "/media/"` +echo ${INSFILES} +echo "" +echo "only online or OLD files:" +diff -y -W 200 ${CALLDIR}/sourcefiles.remote.txt ${CALLDIR}/sourcefiles.local.txt | grep " <" | awk '{ print $1 }' +echo "" +echo "----------------------------" +echo "" +#cd ${CALLDIR} + +# cd .. +if [ -e ${CALLDIR}/update_${CDATE}.tar.gz ] +then + rm ${CALLDIR}/update_${CDATE}.tar.gz +fi +# if [ -e ${CALLDIR}/download_${CDATE}.tar.gz ] +# then +# rm ${CALLDIR}/download_${CDATE}.tar.gz +# fi +if [ "${UPDFILES}" != "" ] || [ "${INSFILES}" != "" ] +then + echo "TAR package:" + tar czvf ${CALLDIR}/update_${CDATE}.tar.gz ${UPDFILES} ${INSFILES} + #tar tzvf ${CALLDIR}/update_${CDATE}.tar.gz +fi +if [ "${ACTION}" == "upload" ] +then + echo "upload/Install files" + if [ -e ${CALLDIR}/update_${CDATE}.tar.gz ] + then + scp -P ${SSHPORT} ${CALLDIR}/update_${CDATE}.tar.gz ${SSHUSER}@${SSHHOST}:${REMOTEFOLDER} + ssh -p ${SSHPORT} ${SSHUSER}@${SSHHOST} 'cd '${REMOTEFOLDER}' && tar xzvf update_'${CDATE}'.tar.gz && rm update_'${CDATE}'.tar.gz' + else + echo "NO Files to Install/upload!" + fi +fi +if [ -e ${CALLDIR}/update_${CDATE}.tar.gz ] +then + rm ${CALLDIR}/update_${CDATE}.tar.gz +fi + +# if [ "${ACTION}" == "remoteclean" ] +# then +# echo "clean remote files" +# # if [ -e ${CALLDIR}/update_${CDATE}.tar.gz ] +# # then +# # scp -P ${SSHPORT} ${CALLDIR}/update_${CDATE}.tar.gz ${SSHUSER}@${SSHHOST}:${REMOTEFOLDER} +# # ssh -p ${SSHPORT} ${SSHUSER}@${SSHHOST} 'cd '${REMOTEFOLDER}' && tar xzvf update_'${CDATE}'.tar.gz && rm update_'${CDATE}'.tar.gz' +# # else +# # echo "NO Files to Install/upload!" +# # fi +# fi + + +# if [ "${ACTION}" == "download" ] +# then +# echo "download files" +# # if [ -e ${CALLDIR}/update_${CDATE}.tar.gz ] +# # then +# # scp -P ${SSHPORT} ${CALLDIR}/update_${CDATE}.tar.gz ${SSHUSER}@${SSHHOST}:${REMOTEFOLDER} +# # ssh -p ${SSHPORT} ${SSHUSER}@${SSHHOST} 'cd '${REMOTEFOLDER}' && tar xzvf update_'${CDATE}'.tar.gz && rm update_'${CDATE}'.tar.gz' +# # else +# # echo "NO Files to Install/upload!" +# # fi +# fi +# if [ -e ${CALLDIR}/update_${CDATE}.tar.gz ] +# then +# rm ${CALLDIR}/update_${CDATE}.tar.gz +# fi diff --git a/pointeuse/dev/sys/boot/config.txt b/pointeuse/dev/sys/boot/config.txt new file mode 100644 index 00000000..da872e1f --- /dev/null +++ b/pointeuse/dev/sys/boot/config.txt @@ -0,0 +1,57 @@ +# For more options and information see +# http://rpf.io/configtxt +# Some settings may impact device functionality. See link above for details + +# uncomment if you get no picture on HDMI for a default "safe" mode +#hdmi_safe=1 + +# uncomment this if your display has a black border of unused pixels visible +# and your display can output without overscan +#disable_overscan=1 + +# uncomment the following to adjust overscan. Use positive numbers if console +# goes off screen, and negative if there is too much border +#overscan_left=16 +#overscan_right=16 +#overscan_top=16 +#overscan_bottom=16 + +# uncomment to force a console size. By default it will be display's size minus +# overscan. +#framebuffer_width=1280 +#framebuffer_height=720 + +# uncomment if hdmi display is not detected and composite is being output +#hdmi_force_hotplug=1 + +# uncomment to force a specific HDMI mode (this will force VGA) +#hdmi_group=1 +#hdmi_mode=1 + +# uncomment to force a HDMI mode rather than DVI. This can make audio work in +# DMT (computer monitor) modes +#hdmi_drive=2 + +# uncomment to increase signal to HDMI, if you have interference, blanking, or +# no display +#config_hdmi_boost=4 + +# uncomment for composite PAL +#sdtv_mode=2 + +#uncomment to overclock the arm. 700 MHz is the default. +#arm_freq=800 + +# Uncomment some or all of these to enable the optional hardware interfaces +#dtparam=i2c_arm=on +#dtparam=i2s=on +#dtparam=spi=on + +# Uncomment this to enable the lirc-rpi module +#dtoverlay=lirc-rpi + +# Additional overlays and parameters are documented /boot/overlays/README + +# Enable audio (loads snd_bcm2835) +dtparam=audio=on +lcd_rotate=2 diff --git a/pointeuse/dev/sys/etc/lightdm/lightdm.conf b/pointeuse/dev/sys/etc/lightdm/lightdm.conf new file mode 100644 index 00000000..9e8aff7a --- /dev/null +++ b/pointeuse/dev/sys/etc/lightdm/lightdm.conf @@ -0,0 +1,165 @@ +# +# General configuration +# +# start-default-seat = True to always start one seat if none are defined in the configuration +# greeter-user = User to run greeter as +# minimum-display-number = Minimum display number to use for X servers +# minimum-vt = First VT to run displays on +# lock-memory = True to prevent memory from being paged to disk +# user-authority-in-system-dir = True if session authority should be in the system location +# guest-account-script = Script to be run to setup guest account +# logind-check-graphical = True to on start seats that are marked as graphical by logind +# log-directory = Directory to log information to +# run-directory = Directory to put running state in +# cache-directory = Directory to cache to +# sessions-directory = Directory to find sessions +# remote-sessions-directory = Directory to find remote sessions +# greeters-directory = Directory to find greeters +# backup-logs = True to move add a .old suffix to old log files when opening new ones +# +[LightDM] +#start-default-seat=true +#greeter-user=lightdm +#minimum-display-number=0 +#minimum-vt=7 +#lock-memory=true +#user-authority-in-system-dir=false +#guest-account-script=guest-account +#logind-check-graphical=false +#log-directory=/var/log/lightdm +#run-directory=/var/run/lightdm +#cache-directory=/var/cache/lightdm +#sessions-directory=/usr/share/lightdm/sessions:/usr/share/xsessions:/usr/share/wayland-sessions +#remote-sessions-directory=/usr/share/lightdm/remote-sessions +#greeters-directory=/usr/share/lightdm/greeters:/usr/share/xgreeters +#backup-logs=true + +# +# Seat configuration +# +# Seat configuration is matched against the seat name glob in the section, for example: +# [Seat:*] matches all seats and is applied first. +# [Seat:seat0] matches the seat named "seat0". +# [Seat:seat-thin-client*] matches all seats that have names that start with "seat-thin-client". +# +# type = Seat type (xlocal, xremote, unity) +# pam-service = PAM service to use for login +# pam-autologin-service = PAM service to use for autologin +# pam-greeter-service = PAM service to use for greeters +# xserver-command = X server command to run (can also contain arguments e.g. X -special-option) +# xmir-command = Xmir server command to run (can also contain arguments e.g. Xmir -special-option) +# xserver-config = Config file to pass to X server +# xserver-layout = Layout to pass to X server +# xserver-allow-tcp = True if TCP/IP connections are allowed to this X server +# xserver-share = True if the X server is shared for both greeter and session +# xserver-hostname = Hostname of X server (only for type=xremote) +# xserver-display-number = Display number of X server (only for type=xremote) +# xdmcp-manager = XDMCP manager to connect to (implies xserver-allow-tcp=true) +# xdmcp-port = XDMCP UDP/IP port to communicate on +# xdmcp-key = Authentication key to use for XDM-AUTHENTICATION-1 (stored in keys.conf) +# unity-compositor-command = Unity compositor command to run (can also contain arguments e.g. unity-system-compositor -special-option) +# unity-compositor-timeout = Number of seconds to wait for compositor to start +# greeter-session = Session to load for greeter +# greeter-hide-users = True to hide the user list +# greeter-allow-guest = True if the greeter should show a guest login option +# greeter-show-manual-login = True if the greeter should offer a manual login option +# greeter-show-remote-login = True if the greeter should offer a remote login option +# user-session = Session to load for users +# allow-user-switching = True if allowed to switch users +# allow-guest = True if guest login is allowed +# guest-session = Session to load for guests (overrides user-session) +# session-wrapper = Wrapper script to run session with +# greeter-wrapper = Wrapper script to run greeter with +# guest-wrapper = Wrapper script to run guest sessions with +# display-setup-script = Script to run when starting a greeter session (runs as root) +# display-stopped-script = Script to run after stopping the display server (runs as root) +# greeter-setup-script = Script to run when starting a greeter (runs as root) +# session-setup-script = Script to run when starting a user session (runs as root) +# session-cleanup-script = Script to run when quitting a user session (runs as root) +# autologin-guest = True to log in as guest by default +# autologin-user = User to log in with by default (overrides autologin-guest) +# autologin-user-timeout = Number of seconds to wait before loading default user +# autologin-session = Session to load for automatic login (overrides user-session) +# autologin-in-background = True if autologin session should not be immediately activated +# exit-on-failure = True if the daemon should exit if this seat fails +# +[Seat:*] +#type=xlocal +#pam-service=lightdm +#pam-autologin-service=lightdm-autologin +#pam-greeter-service=lightdm-greeter +xserver-command=X -nocursor +#xmir-command=Xmir +#xserver-config= +#xserver-layout= +#xserver-allow-tcp=false +#xserver-share=true +#xserver-hostname= +#xserver-display-number= +#xdmcp-manager= +#xdmcp-port=177 +#xdmcp-key= +#unity-compositor-command=unity-system-compositor +#unity-compositor-timeout=60 +greeter-session=pi-greeter +greeter-hide-users=false +#greeter-allow-guest=true +#greeter-show-manual-login=false +#greeter-show-remote-login=true +#user-session=default +#allow-user-switching=true +#allow-guest=true +#guest-session= +#session-wrapper=lightdm-session +#greeter-wrapper= +#guest-wrapper= +#display-setup-script= +#display-stopped-script= +#greeter-setup-script= +#session-setup-script= +#session-cleanup-script= +#autologin-guest=false +autologin-user=dks +#autologin-user-timeout=0 +#autologin-in-background=false +#autologin-session= +#exit-on-failure=false + +# +# XDMCP Server configuration +# +# enabled = True if XDMCP connections should be allowed +# port = UDP/IP port to listen for connections on +# listen-address = Host/address to listen for XDMCP connections (use all addresses if not present) +# key = Authentication key to use for XDM-AUTHENTICATION-1 or blank to not use authentication (stored in keys.conf) +# hostname = Hostname to report to XDMCP clients (defaults to system hostname if unset) +# +# The authentication key is a 56 bit DES key specified in hex as 0xnnnnnnnnnnnnnn. Alternatively +# it can be a word and the first 7 characters are used as the key. +# +[XDMCPServer] +#enabled=false +#port=177 +#listen-address= +#key= +#hostname= + +# +# VNC Server configuration +# +# enabled = True if VNC connections should be allowed +# command = Command to run Xvnc server with +# port = TCP/IP port to listen for connections on +# listen-address = Host/address to listen for VNC connections (use all addresses if not present) +# width = Width of display to use +# height = Height of display to use +# depth = Color depth of display to use +# +[VNCServer] +#enabled=false +#command=Xvnc +#port=5900 +#listen-address= +#width=1024 +#height=768 +#depth=8 diff --git a/pointeuse/dev/sys/etc/modprobe.d/raspi-blacklist.conf b/pointeuse/dev/sys/etc/modprobe.d/raspi-blacklist.conf new file mode 100644 index 00000000..6ba6d452 --- /dev/null +++ b/pointeuse/dev/sys/etc/modprobe.d/raspi-blacklist.conf @@ -0,0 +1,4 @@ +#bt +blacklist btbcm +blacklist hci_uart + diff --git a/pointeuse/dev/sys/etc/modules b/pointeuse/dev/sys/etc/modules new file mode 100644 index 00000000..77aa6bb9 --- /dev/null +++ b/pointeuse/dev/sys/etc/modules @@ -0,0 +1,7 @@ +# /etc/modules: kernel modules to load at boot time. +# +# This file contains the names of kernel modules that should be loaded +# at boot time, one per line. Lines beginning with "#" are ignored. + +i2c-dev +dm_crypt diff --git a/pointeuse/dev/sys/etc/openvpn/DKS-VPN-dks-hourtrax.conf b/pointeuse/dev/sys/etc/openvpn/DKS-VPN-dks-hourtrax.conf new file mode 100644 index 00000000..8cd495fa --- /dev/null +++ b/pointeuse/dev/sys/etc/openvpn/DKS-VPN-dks-hourtrax.conf @@ -0,0 +1,153 @@ +client +dev tun +proto udp +remote aran.sysaki.com 1098 +remote aran.dks.lu 1098 + +remote-random +resolv-retry infinite +nobind +persist-key +persist-tun +mute-replay-warnings + +-----BEGIN CERTIFICATE----- +MIIDHjCCAgagAwIBAgIJAK61AhpxApOUMA0GCSqGSIb3DQEBCwUAMA8xDTALBgNV +BAMMBGFyYW4wHhcNMTcxMjE4MTM0MTIyWhcNMjcxMjE2MTM0MTIyWjAPMQ0wCwYD +VQQDDARhcmFuMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA1TydPk4X +8YyPjXI0htiMsM9C5jP0iH/Hgl7w+t0NL6fvcJhwy8BntJ/FRlS/GFoszmH+0zSt +pVeymgEwSQ2SrZixSkln2XhbTIH/NUEHosdllECJgj83W0Kpbtms8Cs6/FfhvMB4 +4o/GnN/mkmA9kslguStksV2vQh98Os9rw5gEKM5qFYO5FYUZIIrcsLgyzztPpw4H +vhrAzxuuu+zg9cOGAihlWV+CSlQJDZyC9hH9xal8UsTlYn9HFqVjr39k7OJg0WC6 +gyjQ92nzqEw49Jkb3NMAarF0zPcP25WV97Aq7EDZV/G8LZbg4p+xCrkz2iUJttu1 +CZjhS9uNsvIAYQIDAQABo30wezAdBgNVHQ4EFgQUqVEvl+MVxdWqNx36igfxqjrJ +f9QwPwYDVR0jBDgwNoAUqVEvl+MVxdWqNx36igfxqjrJf9ShE6QRMA8xDTALBgNV +BAMMBGFyYW6CCQCutQIacQKTlDAMBgNVHRMEBTADAQH/MAsGA1UdDwQEAwIBBjAN +BgkqhkiG9w0BAQsFAAOCAQEAysh4aGsnv4CebGvzZ9mZlmK5o4JTj4bqRw8sFe4h +wW/bZ0ggMnnvNZF1VJJgO/UQQq2gIiOw7zLrlSmPHIhRPkQspemk6uU0m2h6K9rn +AnX3qeVP5dXbZsqr1jI1/aCzxSW5hu6WUfR3Q+u1pGm9HePhrRJj0djW8Kd7UO+s +PfpIN9gbfLoLnAfCJIc3BccBoD5IqU4s7vleekQGCJHloT5S3MefiIUg7d8leW4V +8PiCohkgHwMOZy3ACy1ZPuT92x+7JCaNV56X7iT3GZhkyQ4tSKu3UpMFkz8obYKw +8RrNsXXBRWgnuakkMY6wHJJZBPJn+qDrWbO7nxVTOqY22g== +-----END CERTIFICATE----- + + +Certificate: + Data: + Version: 3 (0x2) + Serial Number: + 76:24:55:b4:57:ee:a0:c0:7b:e2:b5:a0:5c:3d:80:3d + Signature Algorithm: sha256WithRSAEncryption + Issuer: CN=aran + Validity + Not Before: Feb 6 07:54:45 2018 GMT + Not After : Feb 4 07:54:45 2028 GMT + Subject: CN=dks-hourtrax + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + Public-Key: (2048 bit) + Modulus: + 00:b1:67:a4:6b:28:de:50:03:da:b0:48:19:5d:28: + f4:b7:43:68:2c:6d:41:bc:b8:76:ff:b7:93:2f:93: + f5:d1:fc:90:27:6b:1b:f2:84:0d:5e:dc:be:1f:77: + 77:bb:66:34:43:ac:7e:35:13:df:90:54:31:e9:67: + 44:76:a7:e1:70:61:10:bc:3d:84:0d:75:8d:2c:b3: + 06:d0:5a:c0:20:2f:0b:e2:15:5e:3f:38:61:ed:fa: + d8:8e:03:cd:c9:07:94:25:eb:ab:59:4a:7e:92:10: + 5d:1a:ee:de:31:35:14:a4:52:f2:79:5c:11:6e:e8: + ef:6c:57:69:a1:94:74:96:b7:e0:dc:ba:a5:b3:b4: + 33:65:79:b6:e7:de:aa:1a:d2:c3:9a:7f:6d:73:35: + 82:a4:fb:1e:13:2b:c7:96:5c:d9:d9:23:1b:6a:80: + 8d:17:22:69:09:88:85:03:be:6e:4b:11:d2:05:a9: + 51:7d:bf:a0:a4:e1:55:cb:27:10:4d:3b:fd:b9:cc: + a5:0c:5a:de:6e:95:5c:e9:4e:53:70:df:8f:06:1b: + 56:67:46:91:08:39:f4:bb:74:ae:18:90:39:1b:b1: + 51:64:5c:bf:58:fb:18:90:0a:ec:ac:68:98:2d:54: + cc:a1:1c:b4:9d:be:6d:ee:16:8a:ed:9a:56:2a:11: + 6e:37 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Basic Constraints: + CA:FALSE + X509v3 Subject Key Identifier: + FE:5D:3F:2A:41:EE:A5:C2:50:D0:9B:CF:89:EB:25:9C:61:3A:67:FF + X509v3 Authority Key Identifier: + keyid:A9:51:2F:97:E3:15:C5:D5:AA:37:1D:FA:8A:07:F1:AA:3A:C9:7F:D4 + DirName:/CN=aran + serial:AE:B5:02:1A:71:02:93:94 + + X509v3 Extended Key Usage: + TLS Web Client Authentication + X509v3 Key Usage: + Digital Signature + Signature Algorithm: sha256WithRSAEncryption + 49:3d:9c:8e:10:37:3e:ba:6d:ac:2f:6e:65:60:01:ed:01:70: + 49:b5:16:af:29:3b:68:ca:85:58:9f:88:ff:14:5e:ae:03:0d: + 65:99:9d:0e:6b:66:98:ad:f1:55:9c:75:f1:c7:fb:e6:61:68: + d6:69:03:48:4f:08:18:d5:ae:60:55:18:70:b4:ab:63:05:b5: + 54:c7:f7:d0:8b:86:4b:34:3f:50:5c:6f:be:c1:5a:1b:22:cc: + 24:59:76:e0:8c:c6:32:37:76:ab:bc:2d:63:27:be:2e:a6:5b: + 86:90:1d:a5:4d:a6:9a:17:ed:57:76:f7:c7:65:f0:2b:29:84: + a8:f3:35:5c:66:4d:f2:38:4f:79:df:b4:c1:07:66:3f:87:d0: + 13:fc:5b:3b:ea:da:db:ab:32:2e:72:f3:84:be:0d:e9:7e:c6: + 16:22:a9:b7:28:f5:cf:89:51:11:51:9d:bb:ac:fc:1e:fb:85: + 27:31:74:bd:6d:64:1b:d5:d6:d8:31:ff:ee:3f:9c:17:04:6c: + a3:3a:64:3b:22:88:78:75:3e:37:9d:b1:8b:a2:e8:7a:6f:0f: + af:9b:2c:a7:0a:dc:af:4a:f3:e5:3b:6e:97:c4:cf:2e:0e:64: + 71:2e:c8:51:32:90:9a:53:95:be:a9:d1:bd:ea:cb:9b:0a:9d: + 03:5b:04:85 +-----BEGIN CERTIFICATE----- +MIIDQTCCAimgAwIBAgIQdiRVtFfuoMB74rWgXD2APTANBgkqhkiG9w0BAQsFADAP +MQ0wCwYDVQQDDARhcmFuMB4XDTE4MDIwNjA3NTQ0NVoXDTI4MDIwNDA3NTQ0NVow +FzEVMBMGA1UEAwwMZGtzLWhvdXJ0cmF4MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A +MIIBCgKCAQEAsWekayjeUAPasEgZXSj0t0NoLG1BvLh2/7eTL5P10fyQJ2sb8oQN +Xty+H3d3u2Y0Q6x+NRPfkFQx6WdEdqfhcGEQvD2EDXWNLLMG0FrAIC8L4hVePzhh +7frYjgPNyQeUJeurWUp+khBdGu7eMTUUpFLyeVwRbujvbFdpoZR0lrfg3Lqls7Qz +ZXm2596qGtLDmn9tczWCpPseEyvHllzZ2SMbaoCNFyJpCYiFA75uSxHSBalRfb+g +pOFVyycQTTv9ucylDFrebpVc6U5TcN+PBhtWZ0aRCDn0u3SuGJA5G7FRZFy/WPsY +kArsrGiYLVTMoRy0nb5t7haK7ZpWKhFuNwIDAQABo4GQMIGNMAkGA1UdEwQCMAAw +HQYDVR0OBBYEFP5dPypB7qXCUNCbz4nrJZxhOmf/MD8GA1UdIwQ4MDaAFKlRL5fj +FcXVqjcd+ooH8ao6yX/UoROkETAPMQ0wCwYDVQQDDARhcmFuggkArrUCGnECk5Qw +EwYDVR0lBAwwCgYIKwYBBQUHAwIwCwYDVR0PBAQDAgeAMA0GCSqGSIb3DQEBCwUA +A4IBAQBJPZyOEDc+um2sL25lYAHtAXBJtRavKTtoyoVYn4j/FF6uAw1lmZ0Oa2aY +rfFVnHXxx/vmYWjWaQNITwgY1a5gVRhwtKtjBbVUx/fQi4ZLND9QXG++wVobIswk +WXbgjMYyN3arvC1jJ74upluGkB2lTaaaF+1XdvfHZfArKYSo8zVcZk3yOE9537TB +B2Y/h9AT/Fs76trbqzIucvOEvg3pfsYWIqm3KPXPiVERUZ27rPwe+4UnMXS9bWQb +1dbYMf/uP5wXBGyjOmQ7Ioh4dT43nbGLouh6bw+vmyynCtyvSvPlO26XxM8uDmRx +LshRMpCaU5W+qdG96subCp0DWwSF +-----END CERTIFICATE----- + + +-----BEGIN PRIVATE KEY----- +MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCxZ6RrKN5QA9qw +SBldKPS3Q2gsbUG8uHb/t5Mvk/XR/JAnaxvyhA1e3L4fd3e7ZjRDrH41E9+QVDHp +Z0R2p+FwYRC8PYQNdY0sswbQWsAgLwviFV4/OGHt+tiOA83JB5Ql66tZSn6SEF0a +7t4xNRSkUvJ5XBFu6O9sV2mhlHSWt+DcuqWztDNlebbn3qoa0sOaf21zNYKk+x4T +K8eWXNnZIxtqgI0XImkJiIUDvm5LEdIFqVF9v6Ck4VXLJxBNO/25zKUMWt5ulVzp +TlNw348GG1ZnRpEIOfS7dK4YkDkbsVFkXL9Y+xiQCuysaJgtVMyhHLSdvm3uFort +mlYqEW43AgMBAAECggEAdIXkwtX3H4tIitzwe/Y4tl65/+RLd0+aKeBD9s4yehhv +/tQlaSc/OP24iyaHKDm7Pm///ZDuGPiUSAAiQeWG969ptJqbL9P0RFXatePFqd38 +6iSq4M+B0zQeJTluYwptTnL6+w0pEXtaDCS1IJEC2+P3i6rjcHvjNsA7i3vdEFji +Prze6oZ/UoJIGn97V+qePCmcY1raD5SUeHz/tgB1qY3zq9TdjS953pijJKlXgXVM +pI/WhovKKYFmnbTVsY9WaMXvJz3MTrCosk9LIDdVOIei7m1GI+vQoGS9I3YhFogs +8qNweEJLLF6wi3tXrur5ZYTIqBYHtrE88RsnfWDqAQKBgQDfdOVTrzoCGVcNPLTK +nj7qpEfOgJS/1dSRgcH2MGKqPl+fPbqoCXEWKQicAbuVRWKKzvjHon+IvMn1ymgF +u31uePVtF0adHJP389d5VeeeO7Tl3t50an+k+cPTpRudmpfpUaH+SE7BpXv8V9B+ +eES92r5zhr2xEuVewBIPoyr8twKBgQDLPc3jdsjZpIYheYsP1yDyuFgi8cau7mqw +4v/KmcyuOAIHlrZB6V+XkNpL0U0gWOdrH4pgEdTKhtu/lycAKNS4AJkJLqE3dQQx +c3LAdtlQ9NuHoY/SxP2wcZlFEeQsGUpj4azg/bibGh/RNsy5vi6EW8hfrTwvtvfq +cruGN66agQKBgEwj7bxdGbv7XHEzPTtJPpD/V0RjBcx0FRFbkHbNt+Dgjf6Zrw9w +4Cq34qod4QgU82Xu7lA/64rxITPyOw2w/CV3a9E3PCVuxnCXktVSUzDUkWg+T7iF +TWcuf+6O9OD3+0lSOouFoehT9fJfDbj6TBoQ/hIpWFuM38EwWzce1xfzAoGAN9b1 +OGesa0+uoofYUzPSE53eaUtwQSO0IIFdsfZrq/orZJZd4OITp3re3zHUNOz4OBBk +XlzH0BUZTxxiVMLjHuLbKRCsrqXxzvxfLM36iymbHzqeX1RMNywe5kEyJYOVUrfw +XaiYDdUxpLOfr/C2qxrkhJT+EkX8+2cmaovl5wECgYEAmO7l3iVoEET9HrxuvinL +OC600K0iIpNNAIWSywGa4V04WBXrGNMx3SAkxEdQblrSIE1dPxsJnq+clvSyqeo5 +PLi7mSs/XpE7HffjYMhtyzv+UKUCfvbRsjIDH2/Ka6WZZalBw4I0aKcWYvvqACly +FX4rIxtOEaNSC9J07tCgN1A= +-----END PRIVATE KEY----- + +comp-lzo +verb 3 +mute 20 +cipher AES-256-CBC diff --git a/pointeuse/dev/sys/etc/ssh/sshd_config b/pointeuse/dev/sys/etc/ssh/sshd_config new file mode 100644 index 00000000..1a565b62 --- /dev/null +++ b/pointeuse/dev/sys/etc/ssh/sshd_config @@ -0,0 +1,123 @@ +# $OpenBSD: sshd_config,v 1.100 2016/08/15 12:32:04 naddy Exp $ + +# This is the sshd server system-wide configuration file. See +# sshd_config(5) for more information. + +# This sshd was compiled with PATH=/usr/bin:/bin:/usr/sbin:/sbin + +# The strategy used for options in the default sshd_config shipped with +# OpenSSH is to specify options with their default value where +# possible, but leave them commented. Uncommented options override the +# default value. + +Port 3587 +#AddressFamily any +#ListenAddress 0.0.0.0 +#ListenAddress :: + +#HostKey /etc/ssh/ssh_host_rsa_key +#HostKey /etc/ssh/ssh_host_ecdsa_key +#HostKey /etc/ssh/ssh_host_ed25519_key + +# Ciphers and keying +#RekeyLimit default none + +# Logging +#SyslogFacility AUTH +#LogLevel INFO + +# Authentication: + +#LoginGraceTime 2m +#PermitRootLogin prohibit-password +#StrictModes yes +#MaxAuthTries 6 +#MaxSessions 10 + +#PubkeyAuthentication yes + +# Expect .ssh/authorized_keys2 to be disregarded by default in future. +#AuthorizedKeysFile .ssh/authorized_keys .ssh/authorized_keys2 + +#AuthorizedPrincipalsFile none + +#AuthorizedKeysCommand none +#AuthorizedKeysCommandUser nobody + +# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts +#HostbasedAuthentication no +# Change to yes if you don't trust ~/.ssh/known_hosts for +# HostbasedAuthentication +#IgnoreUserKnownHosts no +# Don't read the user's ~/.rhosts and ~/.shosts files +#IgnoreRhosts yes + +# To disable tunneled clear text passwords, change to no here! +#PasswordAuthentication yes +#PermitEmptyPasswords no + +# Change to yes to enable challenge-response passwords (beware issues with +# some PAM modules and threads) +ChallengeResponseAuthentication no + +# Kerberos options +#KerberosAuthentication no +#KerberosOrLocalPasswd yes +#KerberosTicketCleanup yes +#KerberosGetAFSToken no + +# GSSAPI options +#GSSAPIAuthentication no +#GSSAPICleanupCredentials yes +#GSSAPIStrictAcceptorCheck yes +#GSSAPIKeyExchange no + +# Set this to 'yes' to enable PAM authentication, account processing, +# and session processing. If this is enabled, PAM authentication will +# be allowed through the ChallengeResponseAuthentication and +# PasswordAuthentication. Depending on your PAM configuration, +# PAM authentication via ChallengeResponseAuthentication may bypass +# the setting of "PermitRootLogin without-password". +# If you just want the PAM account and session checks to run without +# PAM authentication, then enable this but set PasswordAuthentication +# and ChallengeResponseAuthentication to 'no'. +UsePAM yes + +#AllowAgentForwarding yes +#AllowTcpForwarding yes +#GatewayPorts no +X11Forwarding yes +#X11DisplayOffset 10 +#X11UseLocalhost yes +#PermitTTY yes +PrintMotd no +#PrintLastLog yes +#TCPKeepAlive yes +#UseLogin no +#UsePrivilegeSeparation sandbox +#PermitUserEnvironment no +#Compression delayed +#ClientAliveInterval 0 +#ClientAliveCountMax 3 +#UseDNS no +#PidFile /var/run/sshd.pid +#MaxStartups 10:30:100 +#PermitTunnel no +#ChrootDirectory none +#VersionAddendum none + +# no default banner path +#Banner none + +# Allow client to pass locale environment variables +AcceptEnv LANG LC_* + +# override default of no subsystems +Subsystem sftp /usr/lib/openssh/sftp-server + +# Example of overriding settings on a per-user basis +#Match User anoncvs +# X11Forwarding no +# AllowTcpForwarding no +# PermitTTY no +# ForceCommand cvs server diff --git a/pointeuse/dev/sys/etc/sudoers b/pointeuse/dev/sys/etc/sudoers new file mode 100644 index 00000000..6b5b7e46 --- /dev/null +++ b/pointeuse/dev/sys/etc/sudoers @@ -0,0 +1,27 @@ +# +# This file MUST be edited with the 'visudo' command as root. +# +# Please consider adding local content in /etc/sudoers.d/ instead of +# directly modifying this file. +# +# See the man page for details on how to write a sudoers file. +# +Defaults env_reset +Defaults mail_badpass +Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" + +# Host alias specification + +# User alias specification + +# Cmnd alias specification + +# User privilege specification +root ALL=(ALL:ALL) ALL + +# Allow members of group sudo to execute any command +%sudo ALL=(ALL:ALL) NOPASSWD:ALL + +# See sudoers(5) for more information on "#include" directives: + +#includedir /etc/sudoers.d diff --git a/pointeuse/dev/sys/etc/systemd/system/autologin@.service b/pointeuse/dev/sys/etc/systemd/system/autologin@.service new file mode 100644 index 00000000..79276af3 --- /dev/null +++ b/pointeuse/dev/sys/etc/systemd/system/autologin@.service @@ -0,0 +1,47 @@ +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU Lesser General Public License as published by +# the Free Software Foundation; either version 2.1 of the License, or +# (at your option) any later version. + +[Unit] +Description=Getty on %I +Documentation=man:agetty(8) man:systemd-getty-generator(8) +Documentation=http://0pointer.de/blog/projects/serial-console.html +After=systemd-user-sessions.service plymouth-quit-wait.service +After=rc-local.service + +# If additional gettys are spawned during boot then we should make +# sure that this is synchronized before getty.target, even though +# getty.target didn't actually pull it in. +Before=getty.target +IgnoreOnIsolate=yes + +# On systems without virtual consoles, don't start any getty. Note +# that serial gettys are covered by serial-getty@.service, not this +# unit. +ConditionPathExists=/dev/tty0 + +[Service] +# the VT is cleared by TTYVTDisallocate +ExecStart=-/sbin/agetty --autologin dks --noclear %I $TERM +Type=idle +Restart=always +RestartSec=0 +UtmpIdentifier=%I +TTYPath=/dev/%I +TTYReset=yes +TTYVHangup=yes +TTYVTDisallocate=yes +KillMode=process +IgnoreSIGPIPE=no +SendSIGHUP=yes + +# Unset locale for the console getty since the console has problems +# displaying some internationalized messages. +Environment=LANG= LANGUAGE= LC_CTYPE= LC_NUMERIC= LC_TIME= LC_COLLATE= LC_MONETARY= LC_MESSAGES= LC_PAPER= LC_NAME= LC_ADDRESS= LC_TELEPHONE= LC_MEASUREMENT= LC_IDENTIFICATION= + +[Install] +WantedBy=getty.target +DefaultInstance=tty1 diff --git a/pointeuse/dev/sys/etc/xdg/lxsession/LXDE-pi/autostart b/pointeuse/dev/sys/etc/xdg/lxsession/LXDE-pi/autostart new file mode 100644 index 00000000..ebef229b --- /dev/null +++ b/pointeuse/dev/sys/etc/xdg/lxsession/LXDE-pi/autostart @@ -0,0 +1,6 @@ +#@lxpanel --profile LXDE-pi +#@pcmanfm --desktop --profile LXDE-pi +#@xscreensaver -no-splash +#@point-rpi +@/home/dks/bin/mountdrives.pl -m + diff --git a/pointeuse/dev/sys/etc/xdg/lxsession/LXDE-pi/sshpwd.sh b/pointeuse/dev/sys/etc/xdg/lxsession/LXDE-pi/sshpwd.sh new file mode 100644 index 00000000..cd4e4f18 --- /dev/null +++ b/pointeuse/dev/sys/etc/xdg/lxsession/LXDE-pi/sshpwd.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +#export TEXTDOMAIN=pprompt + +#. gettext.sh + +#if [ -e /run/sshwarn ] ; then +# zenity --warning --no-wrap --text="$(gettext "SSH is enabled and the default password for the 'pi' user has not been changed.\nThis is a security risk - please login as the 'pi' user and run Raspberry Pi Configuration to set a new password.")" +#fi + + diff --git a/pointeuse/dev/sys/etc/xdg/lxsession/LXDE/autostart b/pointeuse/dev/sys/etc/xdg/lxsession/LXDE/autostart new file mode 100644 index 00000000..0575b764 --- /dev/null +++ b/pointeuse/dev/sys/etc/xdg/lxsession/LXDE/autostart @@ -0,0 +1,11 @@ + +#@lxpanel --profile LXDE +#@pcmanfm --desktop --profile LXDE +#screen saver and screen blank +@xset s off +@xset -dpms +@xset s noblank +#@xscreensaver -no-splash + +@xmodmap -e "pointer = 1 10 9 8 7 6 5 4 3 2" + diff --git a/pointeuse/dev/sys/etc/xdg/openbox/menu.xml b/pointeuse/dev/sys/etc/xdg/openbox/menu.xml new file mode 100644 index 00000000..9f2f01ff --- /dev/null +++ b/pointeuse/dev/sys/etc/xdg/openbox/menu.xml @@ -0,0 +1,11 @@ + + + + + + + + diff --git a/pointeuse/dev/sys/usr/share/plymouth/themes/pix/splash.png b/pointeuse/dev/sys/usr/share/plymouth/themes/pix/splash.png new file mode 100644 index 00000000..c392eae4 Binary files /dev/null and b/pointeuse/dev/sys/usr/share/plymouth/themes/pix/splash.png differ diff --git a/pointeuse/dev/sys/var/spool/cron/crontabs/dks b/pointeuse/dev/sys/var/spool/cron/crontabs/dks new file mode 100644 index 00000000..4d78dc9b --- /dev/null +++ b/pointeuse/dev/sys/var/spool/cron/crontabs/dks @@ -0,0 +1,28 @@ +# Edit this file to introduce tasks to be run by cron. +# +# Each task to run has to be defined through a single line +# indicating with different fields when the task will be run +# and what command to run for the task +# +# To define the time you can provide concrete values for +# minute (m), hour (h), day of month (dom), month (mon), +# and day of week (dow) or use '*' in these fields (for 'any').# +# Notice that tasks will be started based on the cron's system +# daemon's notion of time and timezones. +# +# Output of the crontab jobs (including errors) is sent through +# email to the user the crontab file belongs to (unless redirected). +# +# For example, you can run a backup of all your user accounts +# at 5 a.m every week with: +# 0 5 * * 1 tar -zcf /var/backups/home.tgz /home/ +# +# For more information see the manual pages of crontab(5) and cron(8) +# +# m h dom mon dow command +HOME=/home/dks +PATH=/home/dks/bin:/sbin:/usr/sbin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin +MAILTO= +SHELL=/bin/bash +0 1 * * * /home/dks/bin/syncdb.pl + diff --git a/pointeuse/dev/tmp.sql b/pointeuse/dev/tmp.sql new file mode 100644 index 00000000..25a5ad81 --- /dev/null +++ b/pointeuse/dev/tmp.sql @@ -0,0 +1,37 @@ +INSERT INTO staff VALUES(11,'Jon','Morais',NULL,NULL,NULL,'2019-11-15 11:18:32',NULL,NULL,NULL); +--INSERT INTO staff VALUES(12,'Loic','Leparree',NULL,NULL,1,'2020-01-03 12:06:20',NULL,NULL,NULL); +--INSERT INTO staff VALUES(13,'Kevin','Trevisan',NULL,NULL,1,'2019-12-19 08:35:05',NULL,NULL,NULL); +--INSERT INTO staff VALUES(14,'Aguinaldo','Furtodo Jardim',NULL,NULL,1,'2020-02-06 12:58:05',NULL,NULL,NULL); +INSERT INTO staff VALUES(15,'Humberto','Lima Texeira Neves',NULL,NULL,NULL,'2019-11-15 12:15:59',NULL,NULL,NULL); +INSERT INTO staff VALUES(16,'Francelino','Medina',NULL,NULL,NULL,'2019-11-15 12:16:19',NULL,NULL,NULL); +--INSERT INTO staff VALUES(17,'Joselin','Salazar Acosta',NULL,NULL,1,'2020-01-03 12:06:30',NULL,NULL,NULL); +--INSERT INTO staff VALUES(18,'Carmelina','Santos',NULL,NULL,1,'2020-01-03 12:06:38',NULL,NULL,NULL); +--INSERT INTO staff VALUES(19,'Augustin','Soko Belinga',NULL,NULL,1,'2020-01-03 12:06:46',NULL,NULL,NULL); +--INSERT INTO staff VALUES(20,'Mathieu','Dubernet',NULL,NULL,1,'2020-05-29 08:37:54',NULL,NULL,NULL); +--INSERT INTO staff VALUES(21,'Svenja','Oberweis',NULL,NULL,1,'2019-12-19 08:33:57',NULL,NULL,NULL); +INSERT INTO staff VALUES(22,'Marianne','Lambion',NULL,NULL,NULL,'2019-11-15 12:21:48',NULL,NULL,NULL); +INSERT INTO staff VALUES(23,'EMRE','Pinarci',NULL,NULL,NULL,'2019-11-19 10:27:33',NULL,NULL,NULL); +--INSERT INTO staff VALUES(24,'Antonio','Palermo',NULL,NULL,1,'2020-01-03 12:06:56',NULL,NULL,NULL); +--INSERT INTO staff VALUES(25,'Fanny','Malaise',NULL,NULL,1,'2020-02-06 12:58:19',NULL,NULL,NULL); +INSERT INTO staff VALUES(27,'Florian','Goffaux',NULL,NULL,NULL,'2019-12-20 14:43:50',NULL,NULL,NULL); +--INSERT INTO staff VALUES(28,'Hannibal','Verdier',NULL,NULL,1,'2020-07-22 12:26:25',NULL,NULL,NULL); +--INSERT INTO staff VALUES(29,'Pascal','Toulouse',NULL,NULL,1,'2020-07-22 12:26:34',NULL,NULL,NULL); +--INSERT INTO staff VALUES(30,'Kiran','Kiranjit',NULL,NULL,1,'2020-05-29 08:38:13',NULL,NULL,NULL); +--INSERT INTO staff VALUES(31,'Pascal','Toulouse',NULL,NULL,1,'2020-02-06 12:58:54',NULL,NULL,NULL); +INSERT INTO staff VALUES(32,'Emel','Gokdag',NULL,NULL,NULL,'2020-07-03 09:41:44',NULL,NULL,NULL); +--INSERT INTO staff VALUES(33,'Fanny','Bourgogne',NULL,NULL,1,'2020-07-22 12:26:43',NULL,NULL,NULL); +INSERT INTO staff VALUES(34,'Roni','Da Costa Lima',NULL,NULL,NULL,'2020-05-29 08:39:21',NULL,NULL,NULL); +INSERT INTO staff VALUES(35,'Crisanto','Da Cruz Monteiro ',NULL,NULL,NULL,'2020-05-29 08:39:44',NULL,NULL,NULL); +INSERT INTO staff VALUES(36,'Romain','Serrier',NULL,NULL,NULL,'2020-05-29 08:40:12',NULL,NULL,NULL); +--INSERT INTO staff VALUES(37,'Imed Eddine','annule Alaya',NULL,NULL,1,'2020-06-03 10:35:54',NULL,NULL,NULL); +--INSERT INTO staff VALUES(38,'Imed Eddine','Alaya',NULL,NULL,1,'2020-07-22 12:26:53',NULL,NULL,NULL); +--INSERT INTO staff VALUES(39,'Daniele','Laterza',NULL,NULL,1,'2020-07-03 09:41:32',NULL,NULL,NULL); +INSERT INTO staff VALUES(40,'Daniele','Laterza',NULL,NULL,NULL,'2020-06-17 08:42:14',NULL,NULL,NULL); +INSERT INTO staff VALUES(41,'Julie','Christophe',NULL,NULL,NULL,'2020-06-17 08:42:31',NULL,NULL,NULL); +INSERT INTO staff VALUES(42,'Valentin','Perrot',NULL,NULL,NULL,'2020-07-09 07:23:33',NULL,NULL,NULL); +--INSERT INTO staff VALUES(43,'Kevin','Wafflart',NULL,NULL,NULL,'2020-08-25 14:57:54',NULL,NULL,NULL); +INSERT INTO staff VALUES(44,'Kelven','Frances Santos',NULL,NULL,NULL,'2020-07-22 12:27:40',NULL,NULL,NULL); +INSERT INTO staff VALUES(45,'Ly Lï','OGE',NULL,NULL,NULL,'2020-08-07 14:07:15',NULL,NULL,NULL); +INSERT INTO staff VALUES(46,'Kevin 2','Wafflart',NULL,NULL,NULL,'2020-08-25 14:58:35',NULL,NULL,NULL); +INSERT INTO staff VALUES(47,'Glenn','Kaufmann',NULL,NULL,NULL,'2020-09-01 15:03:17',NULL,NULL,NULL); +INSERT INTO staff VALUES(48,'Angélique','Vacossin',NULL,NULL,NULL,'2020-10-06 08:14:20',NULL,NULL,NULL); diff --git a/pointeuse/dev/tools/fingerdelete.py b/pointeuse/dev/tools/fingerdelete.py new file mode 100644 index 00000000..420a7536 --- /dev/null +++ b/pointeuse/dev/tools/fingerdelete.py @@ -0,0 +1,47 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +""" +PyFingerprint +Copyright (C) 2015 Bastian Raschke +All rights reserved. + +""" +import sys +from pyfingerprint2.pyfingerprint import PyFingerprint +if len(sys.argv) == 1: + print ('Error: No position!'); + exit(1) + +## Deletes a finger from sensor +## + + +## Tries to initialize the sensor +try: + f = PyFingerprint('/dev/ttyUSB0', 57600, 0xFFFFFFFF, 0x00000000) + + if ( f.verifyPassword() == False ): + raise ValueError('The given fingerprint sensor password is wrong!') + +except Exception as e: + print('The fingerprint sensor could not be initialized!') + print('Exception message: ' + str(e)) + exit(1) + +## Gets some sensor information +#print('Currently used templates: ' + str(f.getTemplateCount()) +'/'+ str(f.getStorageCapacity())) + +## Tries to delete the template of the finger +try: + allpos = sys.argv[1].split(',') + for i in range(len(allpos)): + positionNumber = int(allpos[i]) + if ( f.deleteTemplate(positionNumber) == True ): + True + print('Template ' + str(positionNumber) +' deleted!') + +except Exception as e: + print('Operation failed!') + print('Exception message: ' + str(e)) + exit(1) diff --git a/pointeuse/dev/tools/fingerenroll.py b/pointeuse/dev/tools/fingerenroll.py new file mode 100644 index 00000000..a56eb0a5 --- /dev/null +++ b/pointeuse/dev/tools/fingerenroll.py @@ -0,0 +1,90 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +""" +PyFingerprint +Copyright (C) 2015 Bastian Raschke +All rights reserved. + +""" +import hashlib +import time +from pyfingerprint2.pyfingerprint import PyFingerprint + + +## Enrolls new finger +## + +## Tries to initialize the sensor +try: + f = PyFingerprint('/dev/ttyUSB0', 57600, 0xFFFFFFFF, 0x00000000) + + if ( f.verifyPassword() == False ): + raise ValueError('The given fingerprint sensor password is wrong!') + +except Exception as e: + print('The fingerprint sensor could not be initialized!') + print('Exception message: ' + str(e)) + exit(1) + +## Gets some sensor information +#print('Currently used templates: ' + str(f.getTemplateCount()) +'/'+ str(f.getStorageCapacity())) + +## Tries to enroll new finger +try: + #print('Waiting for finger...') + + ## Wait that finger is read + while ( f.readImage() == False ): + pass + + ## Converts read image to characteristics and stores it in charbuffer 1 + f.convertImage(0x01) + + ## Checks if finger is already enrolled + result = f.searchTemplate() + positionNumber = result[0] + + if ( positionNumber >= 0 ): + characterics = str(f.downloadCharacteristics(0x01)).encode('utf-8') + + ## Hashes characteristics of template + #print('SHA-2 hash of template: ' + hashlib.sha256(characterics).hexdigest()) + print('POS:' + str(positionNumber) + ';HASH:' + hashlib.sha256(characterics).hexdigest()) + #print('Template already exists at position #' + str(positionNumber)) + exit(0) + + # print('Remove finger...') + # time.sleep(2) + + # print('Waiting for same finger again...') + + # ## Wait that finger is read again + # while ( f.readImage() == False ): + # pass + + # ## Converts read image to characteristics and stores it in charbuffer 2 + # f.convertImage(0x02) + + # ## Compares the charbuffers + # if ( f.compareCharacteristics() == 0 ): + # raise Exception('Fingers do not match') + + ## Creates a template + f.createTemplate() + + ## Saves template at new position number + positionNumber = f.storeTemplate() + f.loadTemplate(positionNumber, 0x01) + ## Downloads the characteristics of template loaded in charbuffer 1 + characterics = str(f.downloadCharacteristics(0x01)).encode('utf-8') + ## Hashes characteristics of template + #print('SHA-2 hash of template: ' + hashlib.sha256(characterics).hexdigest()) + print('POS:' + str(positionNumber) + ';HASH:' + hashlib.sha256(characterics).hexdigest()) + #print('Finger enrolled successfully!') + #print('New template position #' + str(positionNumber)) + +except Exception as e: + print('Operation failed!') + print('Exception message: ' + str(e)) + exit(1) diff --git a/pointeuse/dev/tools/fingerindex.py b/pointeuse/dev/tools/fingerindex.py new file mode 100644 index 00000000..997af542 --- /dev/null +++ b/pointeuse/dev/tools/fingerindex.py @@ -0,0 +1,46 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +""" +PyFingerprint +Copyright (C) 2015 Bastian Raschke +All rights reserved. + +""" + +from pyfingerprint2.pyfingerprint import PyFingerprint + + +## Shows the template index table +## + +## Tries to initialize the sensor +try: + f = PyFingerprint('/dev/ttyUSB0', 57600, 0xFFFFFFFF, 0x00000000) + + if ( f.verifyPassword() == False ): + raise ValueError('The given fingerprint sensor password is wrong!') + +except Exception as e: + print('The fingerprint sensor could not be initialized!') + print('Exception message: ' + str(e)) + exit(1) + +## Gets some sensor information +print('Currently used templates: ' + str(f.getTemplateCount()) +'/'+ str(f.getStorageCapacity())) + +## Tries to show a template index table page +try: + page = input('Please enter the index page (0, 1, 2, 3) you want to see: ') + page = int(page) + + tableIndex = f.getTemplateIndex(page) + + for i in range(0, len(tableIndex)): + print('Template at position #' + str(i) + ' is used: ' + str(tableIndex[i])) + +except Exception as e: + print('Operation failed!') + print('Exception message: ' + str(e)) + exit(1) + diff --git a/pointeuse/dev/tools/fingerledoff.py b/pointeuse/dev/tools/fingerledoff.py new file mode 100644 index 00000000..1eec425d --- /dev/null +++ b/pointeuse/dev/tools/fingerledoff.py @@ -0,0 +1,27 @@ +""" +PyFingerprint +Copyright (C) 2015 Bastian Raschke +All rights reserved. + +""" + +import time +from pyfingerprint2.pyfingerprint import PyFingerprint + + +## Enrolls new finger +## + +## Tries to initialize the sensor +try: + f = PyFingerprint('/dev/ttyUSB0', 57600, 0xFFFFFFFF, 0x00000000) + + if ( f.verifyPassword() == False ): + raise ValueError('The given fingerprint sensor password is wrong!') + +except Exception as e: + print('The fingerprint sensor could not be initialized!') + print('Exception message: ' + str(e)) + exit(1) + +f.setLEDoff() diff --git a/pointeuse/dev/tools/fingerledon.py b/pointeuse/dev/tools/fingerledon.py new file mode 100644 index 00000000..8a08f7fd --- /dev/null +++ b/pointeuse/dev/tools/fingerledon.py @@ -0,0 +1,27 @@ +""" +PyFingerprint +Copyright (C) 2015 Bastian Raschke +All rights reserved. + +""" + +import time +from pyfingerprint2.pyfingerprint import PyFingerprint + + +## Enrolls new finger +## + +## Tries to initialize the sensor +try: + f = PyFingerprint('/dev/ttyUSB0', 57600, 0xFFFFFFFF, 0x00000000) + + if ( f.verifyPassword() == False ): + raise ValueError('The given fingerprint sensor password is wrong!') + +except Exception as e: + print('The fingerprint sensor could not be initialized!') + print('Exception message: ' + str(e)) + exit(1) + +f.setLEDon() diff --git a/pointeuse/dev/tools/fingersearch.py b/pointeuse/dev/tools/fingersearch.py new file mode 100644 index 00000000..f8c73ab6 --- /dev/null +++ b/pointeuse/dev/tools/fingersearch.py @@ -0,0 +1,69 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +""" +PyFingerprint +Copyright (C) 2015 Bastian Raschke +All rights reserved. + +""" + +import hashlib +from pyfingerprint2.pyfingerprint import PyFingerprint + + +## Search for a finger +## + +## Tries to initialize the sensor +try: + f = PyFingerprint('/dev/ttyUSB0', 57600, 0xFFFFFFFF, 0x00000000) + + if ( f.verifyPassword() == False ): + raise ValueError('The given fingerprint sensor password is wrong!') + +except Exception as e: + print('The fingerprint sensor could not be initialized!') + print('Exception message: ' + str(e)) + exit(1) + +## Gets some sensor information +#print('Currently used templates: ' + str(f.getTemplateCount()) +'/'+ str(f.getStorageCapacity())) + +## Tries to search the finger and calculate hash +try: + #print('Waiting for finger...') + + ## Wait that finger is read + while ( f.readImage() == False ): + pass + + ## Converts read image to characteristics and stores it in charbuffer 1 + f.convertImage(0x01) + + ## Searchs template + result = f.searchTemplate() + + positionNumber = result[0] + accuracyScore = result[1] + + if ( positionNumber == -1 ): + print('No match found!') + exit(0) + else: + #print('Found template at position #' + str(positionNumber)) + #print('The accuracy score is: ' + str(accuracyScore)) + ## Loads the found template to charbuffer 1 + f.loadTemplate(positionNumber, 0x01) + + ## Downloads the characteristics of template loaded in charbuffer 1 + characterics = str(f.downloadCharacteristics(0x01)).encode('utf-8') + + ## Hashes characteristics of template + #print('SHA-2 hash of template: ' + hashlib.sha256(characterics).hexdigest()) + print('POS:' + str(positionNumber) + ';HASH:' + hashlib.sha256(characterics).hexdigest()) + +except Exception as e: + print('Operation failed!') + print('Exception message: ' + str(e)) + exit(1) diff --git a/pointeuse/dev/tools/fpunload.sh b/pointeuse/dev/tools/fpunload.sh new file mode 100644 index 00000000..fed21abf --- /dev/null +++ b/pointeuse/dev/tools/fpunload.sh @@ -0,0 +1,19 @@ +#!/bin/bash +CALLDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +echo ${CALLDIR} +CGISCR=`ps ax | grep fingerprint | grep -v "grep" | awk '{ print $1 }' | xargs` +echo "CGI PID:"${CGISCR} +if [ "${CGISCR}" != "" ] +then + echo "KILL PID:"${CGISCR} + sudo kill -15 ${CGISCR} +fi + +FPSCR=`ps ax | grep finger | grep -v "grep" | awk '{ print $1 }' | xargs` +echo "FS PID:"${FPSCR} +if [ "${FPSCR}" != "" ] +then + echo "FS PID:"${FPSCR} + sudo kill -15 ${FPSCR} +fi +python ${CALLDIR}"/fingerledoff.py" diff --git a/pointeuse/dev/tools/pyfingerprint2/__init__.py b/pointeuse/dev/tools/pyfingerprint2/__init__.py new file mode 100644 index 00000000..48822208 --- /dev/null +++ b/pointeuse/dev/tools/pyfingerprint2/__init__.py @@ -0,0 +1,11 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +""" +PyFingerprint +Copyright (C) 2015 Bastian Raschke +All rights reserved. + +""" + +__version__ = '1.5' diff --git a/pointeuse/dev/tools/pyfingerprint2/pyfingerprint.orig.py b/pointeuse/dev/tools/pyfingerprint2/pyfingerprint.orig.py new file mode 100644 index 00000000..af2f6632 --- /dev/null +++ b/pointeuse/dev/tools/pyfingerprint2/pyfingerprint.orig.py @@ -0,0 +1,1326 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +""" +PyFingerprint +Copyright (C) 2015 Bastian Raschke +All rights reserved. + +""" + +import os +import serial +from PIL import Image +import struct + + +## Baotou start byte +FINGERPRINT_STARTCODE = 0xEF01 + +## Packet identification +## + +FINGERPRINT_COMMANDPACKET = 0x01 + +FINGERPRINT_ACKPACKET = 0x07 +FINGERPRINT_DATAPACKET = 0x02 +FINGERPRINT_ENDDATAPACKET = 0x08 + +## Instruction codes +## + +FINGERPRINT_VERIFYPASSWORD = 0x13 +FINGERPRINT_SETPASSWORD = 0x12 +FINGERPRINT_SETADDRESS = 0x15 +FINGERPRINT_SETSYSTEMPARAMETER = 0x0E +FINGERPRINT_GETSYSTEMPARAMETERS = 0x0F +FINGERPRINT_TEMPLATEINDEX = 0x1F +FINGERPRINT_TEMPLATECOUNT = 0x1D + +FINGERPRINT_READIMAGE = 0x01 + +## Note: The documentation mean upload to host computer. +FINGERPRINT_DOWNLOADIMAGE = 0x0A + +FINGERPRINT_CONVERTIMAGE = 0x02 + +FINGERPRINT_CREATETEMPLATE = 0x05 +FINGERPRINT_STORETEMPLATE = 0x06 +FINGERPRINT_SEARCHTEMPLATE = 0x04 +FINGERPRINT_LOADTEMPLATE = 0x07 +FINGERPRINT_DELETETEMPLATE = 0x0C + +FINGERPRINT_CLEARDATABASE = 0x0D +FINGERPRINT_GENERATERANDOMNUMBER = 0x14 +FINGERPRINT_COMPARECHARACTERISTICS = 0x03 + +## Note: The documentation mean download from host computer. +FINGERPRINT_UPLOADCHARACTERISTICS = 0x09 + +## Note: The documentation mean upload to host computer. +FINGERPRINT_DOWNLOADCHARACTERISTICS = 0x08 + +## Packet reply confirmations +## + +FINGERPRINT_OK = 0x00 +FINGERPRINT_ERROR_COMMUNICATION = 0x01 + +FINGERPRINT_ERROR_WRONGPASSWORD = 0x13 + +FINGERPRINT_ERROR_INVALIDREGISTER = 0x1A + +FINGERPRINT_ERROR_NOFINGER = 0x02 +FINGERPRINT_ERROR_READIMAGE = 0x03 + +FINGERPRINT_ERROR_MESSYIMAGE = 0x06 +FINGERPRINT_ERROR_FEWFEATUREPOINTS = 0x07 +FINGERPRINT_ERROR_INVALIDIMAGE = 0x15 + +FINGERPRINT_ERROR_CHARACTERISTICSMISMATCH = 0x0A + +FINGERPRINT_ERROR_INVALIDPOSITION = 0x0B +FINGERPRINT_ERROR_FLASH = 0x18 + +FINGERPRINT_ERROR_NOTEMPLATEFOUND = 0x09 + +FINGERPRINT_ERROR_LOADTEMPLATE = 0x0C + +FINGERPRINT_ERROR_DELETETEMPLATE = 0x10 + +FINGERPRINT_ERROR_CLEARDATABASE = 0x11 + +FINGERPRINT_ERROR_NOTMATCHING = 0x08 + +FINGERPRINT_ERROR_DOWNLOADIMAGE = 0x0F +FINGERPRINT_ERROR_DOWNLOADCHARACTERISTICS = 0x0D + +## Unknown error codes +## + +FINGERPRINT_ADDRCODE = 0x20 +FINGERPRINT_PASSVERIFY = 0x21 + +FINGERPRINT_PACKETRESPONSEFAIL = 0x0E + +FINGERPRINT_ERROR_TIMEOUT = 0xFF +FINGERPRINT_ERROR_BADPACKET = 0xFE + + +class PyFingerprint(object): + """ + A python written library for the ZhianTec ZFM-20 fingerprint sensor. + + @attribute integer(4 bytes) __address + Address to connect to sensor. + + @attribute integer(4 bytes) __password + Password to connect to sensor. + + @attribute Serial __serial + UART serial connection via PySerial. + """ + __address = None + __password = None + __serial = None + + def __init__(self, port = '/dev/ttyUSB0', baudRate = 57600, address = 0xFFFFFFFF, password = 0x00000000): + """ + Constructor + + @param string port + @param integer baudRate + @param integer(4 bytes) address + @param integer(4 bytes) password + """ + + if ( os.path.exists(port) == False ): + raise ValueError('The fingerprint sensor port "' + port + '" was not found!') + + if ( baudRate < 9600 or baudRate > 115200 or baudRate % 9600 != 0 ): + raise ValueError('The given baudrate is invalid!') + + if ( address < 0x00000000 or address > 0xFFFFFFFF ): + raise ValueError('The given address is invalid!') + + if ( password < 0x00000000 or password > 0xFFFFFFFF ): + raise ValueError('The given password is invalid!') + + self.__address = address + self.__password = password + + ## Initialize PySerial connection + self.__serial = serial.Serial(port = port, baudrate = baudRate, bytesize = serial.EIGHTBITS, timeout = 2) + + if ( self.__serial.isOpen() == True ): + self.__serial.close() + + self.__serial.open() + + def __del__(self): + """ + Destructor + + """ + + ## Close connection if still established + if ( self.__serial is not None and self.__serial.isOpen() == True ): + self.__serial.close() + + def __rightShift(self, n, x): + """ + Shift a byte. + + @param integer n + @param integer x + @return integer + """ + + return (n >> x & 0xFF) + + def __leftShift(self, n, x): + """ + Shift a byte. + + @param integer n + @param integer x + @return integer + """ + + return (n << x) + + def __bitAtPosition(self, n, p): + """ + Get the bit of n at position p. + + @param integer n + @param integer p + @return integer + """ + + ## A bitshift 2 ^ p + twoP = 1 << p + + ## Binary AND composition (on both positions must be a 1) + ## This can only happen at position p + result = n & twoP + return int(result > 0) + + def __byteToString(self, byte): + """ + Converts a byte to string. + + @param byte byte + @return string + """ + + return struct.pack('@B', byte) + + def __stringToByte(self, string): + """ + Convert one "string" byte (like '0xFF') to real integer byte (0xFF). + + @param string string + @return byte + """ + + return struct.unpack('@B', string)[0] + + def __writePacket(self, packetType, packetPayload): + """ + Send a packet to fingerprint sensor. + + @param integer(1 byte) packetType + @param tuple packetPayload + + @return void + """ + + ## Write header (one byte at once) + self.__serial.write(self.__byteToString(self.__rightShift(FINGERPRINT_STARTCODE, 8))) + self.__serial.write(self.__byteToString(self.__rightShift(FINGERPRINT_STARTCODE, 0))) + + self.__serial.write(self.__byteToString(self.__rightShift(self.__address, 24))) + self.__serial.write(self.__byteToString(self.__rightShift(self.__address, 16))) + self.__serial.write(self.__byteToString(self.__rightShift(self.__address, 8))) + self.__serial.write(self.__byteToString(self.__rightShift(self.__address, 0))) + + self.__serial.write(self.__byteToString(packetType)) + + ## The packet length = package payload (n bytes) + checksum (2 bytes) + packetLength = len(packetPayload) + 2 + + self.__serial.write(self.__byteToString(self.__rightShift(packetLength, 8))) + self.__serial.write(self.__byteToString(self.__rightShift(packetLength, 0))) + + ## The packet checksum = packet type (1 byte) + packet length (2 bytes) + payload (n bytes) + packetChecksum = packetType + self.__rightShift(packetLength, 8) + self.__rightShift(packetLength, 0) + + ## Write payload + for i in range(0, len(packetPayload)): + self.__serial.write(self.__byteToString(packetPayload[i])) + packetChecksum += packetPayload[i] + + ## Write checksum (2 bytes) + self.__serial.write(self.__byteToString(self.__rightShift(packetChecksum, 8))) + self.__serial.write(self.__byteToString(self.__rightShift(packetChecksum, 0))) + + def __readPacket(self): + """ + Receive a packet from fingerprint sensor. + + Return a tuple that contain the following information: + 0: integer(1 byte) The packet type. + 1: integer(n bytes) The packet payload. + + @return tuple + """ + + receivedPacketData = [] + i = 0 + + while ( True ): + + ## Read one byte + receivedFragment = self.__serial.read() + + if ( len(receivedFragment) != 0 ): + receivedFragment = self.__stringToByte(receivedFragment) + ## print 'Received packet fragment = ' + hex(receivedFragment) + + ## Insert byte if packet seems valid + receivedPacketData.insert(i, receivedFragment) + i += 1 + + ## Packet could be complete (the minimal packet size is 12 bytes) + if ( i >= 12 ): + + ## Check the packet header + if ( receivedPacketData[0] != self.__rightShift(FINGERPRINT_STARTCODE, 8) or receivedPacketData[1] != self.__rightShift(FINGERPRINT_STARTCODE, 0) ): + raise Exception('The received packet do not begin with a valid header!') + + ## Calculate packet payload length (combine the 2 length bytes) + packetPayloadLength = self.__leftShift(receivedPacketData[7], 8) + packetPayloadLength = packetPayloadLength | self.__leftShift(receivedPacketData[8], 0) + + ## Check if the packet is still fully received + ## Condition: index counter < packet payload length + packet frame + if ( i < packetPayloadLength + 9 ): + continue + + ## At this point the packet should be fully received + + packetType = receivedPacketData[6] + + ## Calculate checksum: + ## checksum = packet type (1 byte) + packet length (2 bytes) + packet payload (n bytes) + packetChecksum = packetType + receivedPacketData[7] + receivedPacketData[8] + + packetPayload = [] + + ## Collect package payload (ignore the last 2 checksum bytes) + for j in range(9, 9 + packetPayloadLength - 2): + packetPayload.append(receivedPacketData[j]) + packetChecksum += receivedPacketData[j] + + ## Calculate full checksum of the 2 separate checksum bytes + receivedChecksum = self.__leftShift(receivedPacketData[i - 2], 8) + receivedChecksum = receivedChecksum | self.__leftShift(receivedPacketData[i - 1], 0) + + if ( receivedChecksum != packetChecksum ): + raise Exception('The received packet is corrupted (the checksum is wrong)!') + + return (packetType, packetPayload) + + def verifyPassword(self): + """ + Verify password of the fingerprint sensor. + + @return boolean + """ + + packetPayload = ( + FINGERPRINT_VERIFYPASSWORD, + self.__rightShift(self.__password, 24), + self.__rightShift(self.__password, 16), + self.__rightShift(self.__password, 8), + self.__rightShift(self.__password, 0), + ) + + self.__writePacket(FINGERPRINT_COMMANDPACKET, packetPayload) + receivedPacket = self.__readPacket() + + receivedPacketType = receivedPacket[0] + receivedPacketPayload = receivedPacket[1] + + if ( receivedPacketType != FINGERPRINT_ACKPACKET ): + raise Exception('The received packet is no ack packet!') + + ## DEBUG: Sensor password is correct + if ( receivedPacketPayload[0] == FINGERPRINT_OK ): + return True + + elif ( receivedPacketPayload[0] == FINGERPRINT_ERROR_COMMUNICATION ): + raise Exception('Communication error') + + elif ( receivedPacketPayload[0] == FINGERPRINT_ADDRCODE ): + raise Exception('The address is wrong') + + ## DEBUG: Sensor password is wrong + elif ( receivedPacketPayload[0] == FINGERPRINT_ERROR_WRONGPASSWORD ): + return False + + else: + raise Exception('Unknown error '+ hex(receivedPacketPayload[0])) + + def setPassword(self, newPassword): + """ + Set the password of the sensor. + + @param integer(4 bytes) newPassword + @return boolean + """ + + ## Validate the password (maximum 4 bytes) + if ( newPassword < 0x00000000 or newPassword > 0xFFFFFFFF ): + raise ValueError('The given password is invalid!') + + packetPayload = ( + FINGERPRINT_SETPASSWORD, + self.__rightShift(newPassword, 24), + self.__rightShift(newPassword, 16), + self.__rightShift(newPassword, 8), + self.__rightShift(newPassword, 0), + ) + + self.__writePacket(FINGERPRINT_COMMANDPACKET, packetPayload) + receivedPacket = self.__readPacket() + + receivedPacketType = receivedPacket[0] + receivedPacketPayload = receivedPacket[1] + + if ( receivedPacketType != FINGERPRINT_ACKPACKET ): + raise Exception('The received packet is no ack packet!') + + ## DEBUG: Password set was successful + if ( receivedPacketPayload[0] == FINGERPRINT_OK ): + self.__password = newPassword + return True + + elif ( receivedPacketPayload[0] == FINGERPRINT_ERROR_COMMUNICATION ): + raise Exception('Communication error') + + else: + raise Exception('Unknown error '+ hex(receivedPacketPayload[0])) + + def setAddress(self, newAddress): + """ + Set the module address of the sensor. + + @param integer(4 bytes) newAddress + @return boolean + """ + + ## Validate the address (maximum 4 bytes) + if ( newAddress < 0x00000000 or newAddress > 0xFFFFFFFF ): + raise ValueError('The given address is invalid!') + + packetPayload = ( + FINGERPRINT_SETADDRESS, + self.__rightShift(newAddress, 24), + self.__rightShift(newAddress, 16), + self.__rightShift(newAddress, 8), + self.__rightShift(newAddress, 0), + ) + + self.__writePacket(FINGERPRINT_COMMANDPACKET, packetPayload) + receivedPacket = self.__readPacket() + + receivedPacketType = receivedPacket[0] + receivedPacketPayload = receivedPacket[1] + + if ( receivedPacketType != FINGERPRINT_ACKPACKET ): + raise Exception('The received packet is no ack packet!') + + ## DEBUG: Address set was successful + if ( receivedPacketPayload[0] == FINGERPRINT_OK ): + self.__address = newAddress + return True + + elif ( receivedPacketPayload[0] == FINGERPRINT_ERROR_COMMUNICATION ): + raise Exception('Communication error') + + else: + raise Exception('Unknown error '+ hex(receivedPacketPayload[0])) + + def setSystemParameter(self, parameterNumber, parameterValue): + """ + Set a system parameter of the sensor. + + @param integer(1 byte) parameterNumber + @param integer(1 byte) parameterValue + @return boolean + """ + + ## Validate the baudrate parameter + if ( parameterNumber == 4 ): + + if ( parameterValue < 1 or parameterValue > 12 ): + raise ValueError('The given baudrate parameter is invalid!') + + ## Validate the security level parameter + elif ( parameterNumber == 5 ): + + if ( parameterValue < 1 or parameterValue > 5 ): + raise ValueError('The given security level parameter is invalid!') + + ## Validate the package length parameter + elif ( parameterNumber == 6 ): + + if ( parameterValue < 0 or parameterValue > 3 ): + raise ValueError('The given package length parameter is invalid!') + + ## The parameter number is not valid + else: + raise ValueError('The given parameter number is invalid!') + + packetPayload = ( + FINGERPRINT_SETSYSTEMPARAMETER, + parameterNumber, + parameterValue, + ) + + self.__writePacket(FINGERPRINT_COMMANDPACKET, packetPayload) + receivedPacket = self.__readPacket() + + receivedPacketType = receivedPacket[0] + receivedPacketPayload = receivedPacket[1] + + if ( receivedPacketType != FINGERPRINT_ACKPACKET ): + raise Exception('The received packet is no ack packet!') + + ## DEBUG: Parameter set was successful + if ( receivedPacketPayload[0] == FINGERPRINT_OK ): + return True + + elif ( receivedPacketPayload[0] == FINGERPRINT_ERROR_COMMUNICATION ): + raise Exception('Communication error') + + elif ( receivedPacketPayload[0] == FINGERPRINT_ERROR_INVALIDREGISTER ): + raise Exception('Invalid register number') + + else: + raise Exception('Unknown error '+ hex(receivedPacketPayload[0])) + + def getSystemParameters(self): + """ + Get all available system information of the sensor. + + Return a tuple that contain the following information: + 0: integer(2 bytes) The status register. + 1: integer(2 bytes) The system id. + 2: integer(2 bytes) The storage capacity. + 3: integer(2 bytes) The security level. + 4: integer(4 bytes) The sensor address. + 5: integer(2 bytes) The packet length. + 6: integer(2 bytes) The baudrate. + + @return tuple + """ + + packetPayload = ( + FINGERPRINT_GETSYSTEMPARAMETERS, + ) + + self.__writePacket(FINGERPRINT_COMMANDPACKET, packetPayload) + receivedPacket = self.__readPacket() + + receivedPacketType = receivedPacket[0] + receivedPacketPayload = receivedPacket[1] + + if ( receivedPacketType != FINGERPRINT_ACKPACKET ): + raise Exception('The received packet is no ack packet!') + + ## DEBUG: Read successfully + if ( receivedPacketPayload[0] == FINGERPRINT_OK ): + + statusRegister = self.__leftShift(receivedPacketPayload[1], 8) | self.__leftShift(receivedPacketPayload[2], 0) + systemID = self.__leftShift(receivedPacketPayload[3], 8) | self.__leftShift(receivedPacketPayload[4], 0) + storageCapacity = self.__leftShift(receivedPacketPayload[5], 8) | self.__leftShift(receivedPacketPayload[6], 0) + securityLevel = self.__leftShift(receivedPacketPayload[7], 8) | self.__leftShift(receivedPacketPayload[8], 0) + deviceAddress = ((receivedPacketPayload[9] << 8 | receivedPacketPayload[10]) << 8 | receivedPacketPayload[11]) << 8 | receivedPacketPayload[12] ## TODO + packetLength = self.__leftShift(receivedPacketPayload[13], 8) | self.__leftShift(receivedPacketPayload[14], 0) + baudRate = self.__leftShift(receivedPacketPayload[15], 8) | self.__leftShift(receivedPacketPayload[16], 0) + + return (statusRegister, systemID, storageCapacity, securityLevel, deviceAddress, packetLength, baudRate) + + elif ( receivedPacketPayload[0] == FINGERPRINT_ERROR_COMMUNICATION ): + raise Exception('Communication error') + + else: + raise Exception('Unknown error '+ hex(receivedPacketPayload[0])) + + def getTemplateIndex(self, page): + """ + Get a list of the template positions with usage indicator. + + @param integer(1 byte) page + @return list + """ + + if ( page < 0 or page > 3 ): + raise ValueError('The given index page is invalid!') + + packetPayload = ( + FINGERPRINT_TEMPLATEINDEX, + page, + ) + + self.__writePacket(FINGERPRINT_COMMANDPACKET, packetPayload) + receivedPacket = self.__readPacket() + + receivedPacketType = receivedPacket[0] + receivedPacketPayload = receivedPacket[1] + + if ( receivedPacketType != FINGERPRINT_ACKPACKET ): + raise Exception('The received packet is no ack packet!') + + ## DEBUG: Read index table successfully + if ( receivedPacketPayload[0] == FINGERPRINT_OK ): + + templateIndex = [] + + ## Contain the table page bytes (skip the first status byte) + pageElements = receivedPacketPayload[1:] + + for pageElement in pageElements: + ## Test every bit (bit = template position is used indicator) of a table page element + for p in range(0, 7 + 1): + positionIsUsed = (self.__bitAtPosition(pageElement, p) == 1) + templateIndex.append(positionIsUsed) + + return templateIndex + + elif ( receivedPacketPayload[0] == FINGERPRINT_ERROR_COMMUNICATION ): + raise Exception('Communication error') + + else: + raise Exception('Unknown error '+ hex(receivedPacketPayload[0])) + + def getTemplateCount(self): + """ + Get the number of stored templates. + + @return integer(2 bytes) + """ + + packetPayload = ( + FINGERPRINT_TEMPLATECOUNT, + ) + + self.__writePacket(FINGERPRINT_COMMANDPACKET, packetPayload) + receivedPacket = self.__readPacket() + + receivedPacketType = receivedPacket[0] + receivedPacketPayload = receivedPacket[1] + + if ( receivedPacketType != FINGERPRINT_ACKPACKET ): + raise Exception('The received packet is no ack packet!') + + ## DEBUG: Read successfully + if ( receivedPacketPayload[0] == FINGERPRINT_OK ): + templateCount = self.__leftShift(receivedPacketPayload[1], 8) + templateCount = templateCount | self.__leftShift(receivedPacketPayload[2], 0) + return templateCount + + elif ( receivedPacketPayload[0] == FINGERPRINT_ERROR_COMMUNICATION ): + raise Exception('Communication error') + + else: + raise Exception('Unknown error '+ hex(receivedPacketPayload[0])) + + def readImage(self): + """ + Read the image of a finger and stores it in ImageBuffer. + + @return boolean + """ + + packetPayload = ( + FINGERPRINT_READIMAGE, + ) + + self.__writePacket(FINGERPRINT_COMMANDPACKET, packetPayload) + receivedPacket = self.__readPacket() + + receivedPacketType = receivedPacket[0] + receivedPacketPayload = receivedPacket[1] + + if ( receivedPacketType != FINGERPRINT_ACKPACKET ): + raise Exception('The received packet is no ack packet!') + + ## DEBUG: Image read successful + if ( receivedPacketPayload[0] == FINGERPRINT_OK ): + return True + + elif ( receivedPacketPayload[0] == FINGERPRINT_ERROR_COMMUNICATION ): + raise Exception('Communication error') + + ## DEBUG: No finger found + elif ( receivedPacketPayload[0] == FINGERPRINT_ERROR_NOFINGER ): + return False + + elif ( receivedPacketPayload[0] == FINGERPRINT_ERROR_READIMAGE ): + raise Exception('Could not read image') + + else: + raise Exception('Unknown error '+ hex(receivedPacketPayload[0])) + + ## TODO: + ## Implementation of uploadImage() + + def downloadImage(self, imageDestination): + """ + Download the image of a finger to host computer. + + @param string imageDestination + @return void + """ + + destinationDirectory = os.path.dirname(imageDestination) + + if ( os.access(destinationDirectory, os.W_OK) == False ): + raise ValueError('The given destination directory "' + destinationDirectory + '" is not writable!') + + packetPayload = ( + FINGERPRINT_DOWNLOADIMAGE, + ) + + self.__writePacket(FINGERPRINT_COMMANDPACKET, packetPayload) + + ## Get first reply packet + receivedPacket = self.__readPacket() + + receivedPacketType = receivedPacket[0] + receivedPacketPayload = receivedPacket[1] + + if ( receivedPacketType != FINGERPRINT_ACKPACKET ): + raise Exception('The received packet is no ack packet!') + + ## DEBUG: The sensor will sent follow-up packets + if ( receivedPacketPayload[0] == FINGERPRINT_OK ): + pass + + elif ( receivedPacketPayload[0] == FINGERPRINT_ERROR_COMMUNICATION ): + raise Exception('Communication error') + + elif ( receivedPacketPayload[0] == FINGERPRINT_ERROR_DOWNLOADIMAGE ): + raise Exception('Could not download image') + + else: + raise Exception('Unknown error '+ hex(receivedPacketPayload[0])) + + ## Initialize image library + resultImage = Image.new('L', (256, 288), 'white') + pixels = resultImage.load() + + ## Y coordinate of current pixel + line = 0 + + ## Get follow-up data packets until the last data packet is received + while ( receivedPacketType != FINGERPRINT_ENDDATAPACKET ): + + receivedPacket = self.__readPacket() + + receivedPacketType = receivedPacket[0] + receivedPacketPayload = receivedPacket[1] + + if ( receivedPacketType != FINGERPRINT_DATAPACKET and receivedPacketType != FINGERPRINT_ENDDATAPACKET ): + raise Exception('The received packet is no data packet!') + + ## X coordinate of current pixel + x = 0 + + for i in range(0, len(receivedPacketPayload)): + + ## Thanks to Danylo Esterman for the "multiple with 17" improvement: + + ## Draw left 4 Bits one byte of package + pixels[x, line] = (receivedPacketPayload[i] >> 4) * 17 + x = x + 1 + + ## Draw right 4 Bits one byte of package + pixels[x, line] = (receivedPacketPayload[i] & 0b00001111) * 17 + x = x + 1 + + line = line + 1 + + resultImage.save(imageDestination) + + def convertImage(self, charBufferNumber = 0x01): + """ + Convert the image in ImageBuffer to finger characteristics and store in CharBuffer1 or CharBuffer2. + + @param integer(1 byte) charBufferNumber + @return boolean + """ + + if ( charBufferNumber != 0x01 and charBufferNumber != 0x02 ): + raise ValueError('The given charbuffer number is invalid!') + + packetPayload = ( + FINGERPRINT_CONVERTIMAGE, + charBufferNumber, + ) + + self.__writePacket(FINGERPRINT_COMMANDPACKET, packetPayload) + receivedPacket = self.__readPacket() + + receivedPacketType = receivedPacket[0] + receivedPacketPayload = receivedPacket[1] + + if ( receivedPacketType != FINGERPRINT_ACKPACKET ): + raise Exception('The received packet is no ack packet!') + + ## DEBUG: Image converted + if ( receivedPacketPayload[0] == FINGERPRINT_OK ): + return True + + elif ( receivedPacketPayload[0] == FINGERPRINT_ERROR_COMMUNICATION ): + raise Exception('Communication error') + + elif ( receivedPacketPayload[0] == FINGERPRINT_ERROR_MESSYIMAGE ): + raise Exception('The image is too messy') + + elif ( receivedPacketPayload[0] == FINGERPRINT_ERROR_FEWFEATUREPOINTS ): + raise Exception('The image contains too few feature points') + + elif ( receivedPacketPayload[0] == FINGERPRINT_ERROR_INVALIDIMAGE ): + raise Exception('The image is invalid') + + else: + raise Exception('Unknown error '+ hex(receivedPacketPayload[0])) + + def createTemplate(self): + """ + Combine the characteristics which are stored in CharBuffer1 and CharBuffer2 to a template. + The created template will be stored again in CharBuffer1 and CharBuffer2 as the same. + + @return boolean + """ + + packetPayload = ( + FINGERPRINT_CREATETEMPLATE, + ) + + self.__writePacket(FINGERPRINT_COMMANDPACKET, packetPayload) + receivedPacket = self.__readPacket() + + receivedPacketType = receivedPacket[0] + receivedPacketPayload = receivedPacket[1] + + if ( receivedPacketType != FINGERPRINT_ACKPACKET ): + raise Exception('The received packet is no ack packet!') + + ## DEBUG: Template created successful + if ( receivedPacketPayload[0] == FINGERPRINT_OK ): + return True + + elif ( receivedPacketPayload[0] == FINGERPRINT_ERROR_COMMUNICATION ): + raise Exception('Communication error') + + ## DEBUG: The characteristics not matching + elif ( receivedPacketPayload[0] == FINGERPRINT_ERROR_CHARACTERISTICSMISMATCH ): + return False + + else: + raise Exception('Unknown error '+ hex(receivedPacketPayload[0])) + + def storeTemplate(self, positionNumber = -1, charBufferNumber = 0x01): + """ + Save a template from the specified CharBuffer to the given position number. + + @param integer(2 bytes) positionNumber + @param integer(1 byte) charBufferNumber + @return integer + """ + + ## Find a free index + if ( positionNumber == -1 ): + for page in range(0, 4): + ## Free index found? + if ( positionNumber >= 0 ): + break + + templateIndex = self.getTemplateIndex(page) + + for i in range(0, len(templateIndex)): + ## Index not used? + if ( templateIndex[i] == False ): + positionNumber = (len(templateIndex) * page) + i + break + + if ( positionNumber < 0x0000 or positionNumber >= self.getStorageCapacity() ): + raise ValueError('The given position number is invalid!') + + if ( charBufferNumber != 0x01 and charBufferNumber != 0x02 ): + raise ValueError('The given charbuffer number is invalid!') + + packetPayload = ( + FINGERPRINT_STORETEMPLATE, + charBufferNumber, + self.__rightShift(positionNumber, 8), + self.__rightShift(positionNumber, 0), + ) + + self.__writePacket(FINGERPRINT_COMMANDPACKET, packetPayload) + receivedPacket = self.__readPacket() + + receivedPacketType = receivedPacket[0] + receivedPacketPayload = receivedPacket[1] + + if ( receivedPacketType != FINGERPRINT_ACKPACKET ): + raise Exception('The received packet is no ack packet!') + + ## DEBUG: Template stored successful + if ( receivedPacketPayload[0] == FINGERPRINT_OK ): + return positionNumber + + elif ( receivedPacketPayload[0] == FINGERPRINT_ERROR_COMMUNICATION ): + raise Exception('Communication error') + + elif ( receivedPacketPayload[0] == FINGERPRINT_ERROR_INVALIDPOSITION ): + raise Exception('Could not store template in that position') + + elif ( receivedPacketPayload[0] == FINGERPRINT_ERROR_FLASH ): + raise Exception('Error writing to flash') + + else: + raise Exception('Unknown error '+ hex(receivedPacketPayload[0])) + + def searchTemplate(self): + """ + Search the finger characteristics in CharBuffer in database. + + Return a tuple that contain the following information: + 0: integer(2 bytes) The position number of found template. + 1: integer(2 bytes) The accuracy score of found template. + + @return tuple + """ + + ## CharBuffer1 and CharBuffer2 are the same in this case + charBufferNumber = 0x01 + + ## Begin search at index 0 + positionStart = 0x0000 + templatesCount = self.getStorageCapacity() + + packetPayload = ( + FINGERPRINT_SEARCHTEMPLATE, + charBufferNumber, + self.__rightShift(positionStart, 8), + self.__rightShift(positionStart, 0), + self.__rightShift(templatesCount, 8), + self.__rightShift(templatesCount, 0), + ) + + self.__writePacket(FINGERPRINT_COMMANDPACKET, packetPayload) + receivedPacket = self.__readPacket() + + receivedPacketType = receivedPacket[0] + receivedPacketPayload = receivedPacket[1] + + if ( receivedPacketType != FINGERPRINT_ACKPACKET ): + raise Exception('The received packet is no ack packet!') + + ## DEBUG: Found template + if ( receivedPacketPayload[0] == FINGERPRINT_OK ): + + positionNumber = self.__leftShift(receivedPacketPayload[1], 8) + positionNumber = positionNumber | self.__leftShift(receivedPacketPayload[2], 0) + + accuracyScore = self.__leftShift(receivedPacketPayload[3], 8) + accuracyScore = accuracyScore | self.__leftShift(receivedPacketPayload[4], 0) + + return (positionNumber, accuracyScore) + + elif ( receivedPacketPayload[0] == FINGERPRINT_ERROR_COMMUNICATION ): + raise Exception('Communication error') + + ## DEBUG: Did not found a matching template + elif ( receivedPacketPayload[0] == FINGERPRINT_ERROR_NOTEMPLATEFOUND ): + return (-1, -1) + + else: + raise Exception('Unknown error '+ hex(receivedPacketPayload[0])) + + def loadTemplate(self, positionNumber, charBufferNumber = 0x01): + """ + Load an existing template specified by position number to specified CharBuffer. + + @param integer(2 bytes) positionNumber + @param integer(1 byte) charBufferNumber + @return boolean + """ + + if ( positionNumber < 0x0000 or positionNumber >= self.getStorageCapacity() ): + raise ValueError('The given position number is invalid!') + + if ( charBufferNumber != 0x01 and charBufferNumber != 0x02 ): + raise ValueError('The given charbuffer number is invalid!') + + packetPayload = ( + FINGERPRINT_LOADTEMPLATE, + charBufferNumber, + self.__rightShift(positionNumber, 8), + self.__rightShift(positionNumber, 0), + ) + + self.__writePacket(FINGERPRINT_COMMANDPACKET, packetPayload) + receivedPacket = self.__readPacket() + + receivedPacketType = receivedPacket[0] + receivedPacketPayload = receivedPacket[1] + + if ( receivedPacketType != FINGERPRINT_ACKPACKET ): + raise Exception('The received packet is no ack packet!') + + ## DEBUG: Template loaded successful + if ( receivedPacketPayload[0] == FINGERPRINT_OK ): + return True + + elif ( receivedPacketPayload[0] == FINGERPRINT_ERROR_COMMUNICATION ): + raise Exception('Communication error') + + elif ( receivedPacketPayload[0] == FINGERPRINT_ERROR_LOADTEMPLATE ): + raise Exception('The template could not be read') + + elif ( receivedPacketPayload[0] == FINGERPRINT_ERROR_INVALIDPOSITION ): + raise Exception('Could not load template from that position') + + else: + raise Exception('Unknown error '+ hex(receivedPacketPayload[0])) + + def deleteTemplate(self, positionNumber, count = 1): + """ + Delete templates from fingerprint database. Per default one. + + @param integer(2 bytes) positionNumber + @param integer(2 bytes) count + @return boolean + """ + + capacity = self.getStorageCapacity() + + if ( positionNumber < 0x0000 or positionNumber >= capacity ): + raise ValueError('The given position number is invalid!') + + if ( count < 0x0000 or count > capacity - positionNumber ): + raise ValueError('The given count is invalid!') + + packetPayload = ( + FINGERPRINT_DELETETEMPLATE, + self.__rightShift(positionNumber, 8), + self.__rightShift(positionNumber, 0), + self.__rightShift(count, 8), + self.__rightShift(count, 0), + ) + + self.__writePacket(FINGERPRINT_COMMANDPACKET, packetPayload) + receivedPacket = self.__readPacket() + + receivedPacketType = receivedPacket[0] + receivedPacketPayload = receivedPacket[1] + + if ( receivedPacketType != FINGERPRINT_ACKPACKET ): + raise Exception('The received packet is no ack packet!') + + ## DEBUG: Template deleted successful + if ( receivedPacketPayload[0] == FINGERPRINT_OK ): + return True + + elif ( receivedPacketPayload[0] == FINGERPRINT_ERROR_COMMUNICATION ): + raise Exception('Communication error') + + elif ( receivedPacketPayload[0] == FINGERPRINT_ERROR_INVALIDPOSITION ): + raise Exception('Invalid position') + + ## DEBUG: Could not delete template + elif ( receivedPacketPayload[0] == FINGERPRINT_ERROR_DELETETEMPLATE ): + return False + + else: + raise Exception('Unknown error '+ hex(receivedPacketPayload[0])) + + def clearDatabase(self): + """ + Clear the complete template database. + + @return boolean + """ + + packetPayload = ( + FINGERPRINT_CLEARDATABASE, + ) + + self.__writePacket(FINGERPRINT_COMMANDPACKET, packetPayload) + receivedPacket = self.__readPacket() + + receivedPacketType = receivedPacket[0] + receivedPacketPayload = receivedPacket[1] + + if ( receivedPacketType != FINGERPRINT_ACKPACKET ): + raise Exception('The received packet is no ack packet!') + + ## DEBUG: Database cleared successful + if ( receivedPacketPayload[0] == FINGERPRINT_OK ): + return True + + elif ( receivedPacketPayload[0] == FINGERPRINT_ERROR_COMMUNICATION ): + raise Exception('Communication error') + + ## DEBUG: Could not clear database + elif ( receivedPacketPayload[0] == FINGERPRINT_ERROR_CLEARDATABASE ): + return False + + else: + raise Exception('Unknown error '+ hex(receivedPacketPayload[0])) + + def compareCharacteristics(self): + """ + Compare the finger characteristics of CharBuffer1 with CharBuffer2 and return the accuracy score. + + @return integer(2 bytes) + """ + + packetPayload = ( + FINGERPRINT_COMPARECHARACTERISTICS, + ) + + self.__writePacket(FINGERPRINT_COMMANDPACKET, packetPayload) + receivedPacket = self.__readPacket() + + receivedPacketType = receivedPacket[0] + receivedPacketPayload = receivedPacket[1] + + if ( receivedPacketType != FINGERPRINT_ACKPACKET ): + raise Exception('The received packet is no ack packet!') + + ## DEBUG: Comparison successful + if ( receivedPacketPayload[0] == FINGERPRINT_OK ): + accuracyScore = self.__leftShift(receivedPacketPayload[1], 8) + accuracyScore = accuracyScore | self.__leftShift(receivedPacketPayload[2], 0) + return accuracyScore + + elif ( receivedPacketPayload[0] == FINGERPRINT_ERROR_COMMUNICATION ): + raise Exception('Communication error') + + ## DEBUG: The characteristics do not matching + elif ( receivedPacketPayload[0] == FINGERPRINT_ERROR_NOTMATCHING ): + return 0 + + else: + raise Exception('Unknown error '+ hex(receivedPacketPayload[0])) + + def uploadCharacteristics(self, charBufferNumber = 0x01, characteristicsData = [0]): + """ + Upload finger characteristics to CharBuffer1 or CharBuffer2. + + @author: David Gilson + + @param integer(1 byte) charBufferNumber + @param integer(list) characteristicsData + + @return boolean + Return true if everything is right. + """ + + if ( charBufferNumber != 0x01 and charBufferNumber != 0x02 ): + raise ValueError('The given charbuffer number is invalid!') + + if ( characteristicsData == [0] ): + raise ValueError('The characteristics data is required!') + + maxPacketSize = self.getMaxPacketSize() + + ## Upload command + + packetPayload = ( + FINGERPRINT_UPLOADCHARACTERISTICS, + charBufferNumber + ) + + self.__writePacket(FINGERPRINT_COMMANDPACKET, packetPayload) + + ## Get first reply packet + receivedPacket = self.__readPacket() + + receivedPacketType = receivedPacket[0] + receivedPacketPayload = receivedPacket[1] + + if ( receivedPacketType != FINGERPRINT_ACKPACKET ): + raise Exception('The received packet is no ack packet!') + + ## DEBUG: The sensor will sent follow-up packets + if ( receivedPacketPayload[0] == FINGERPRINT_OK ): + pass + + elif ( receivedPacketPayload[0] == FINGERPRINT_ERROR_COMMUNICATION ): + raise Exception('Communication error') + + elif ( receivedPacketPayload[0] == FINGERPRINT_PACKETRESPONSEFAIL ): + raise Exception('Could not upload characteristics') + + else: + raise Exception('Unknown error '+ hex(receivedPacketPayload[0])) + + ## Upload data packets + packetNbr = len(characteristicsData) / maxPacketSize + + if ( packetNbr <= 1 ): + self.__writePacket(FINGERPRINT_ENDDATAPACKET, characteristicsData) + else: + i = 1 + while ( i < packetNbr ): + lfrom = (i-1) * maxPacketSize + lto = lfrom + maxPacketSize + self.__writePacket(FINGERPRINT_DATAPACKET, characteristicsData[lfrom:lto]) + i += 1 + + lfrom = (i-1) * maxPacketSize + lto = lfrom + maxPacketSize + self.__writePacket(FINGERPRINT_ENDDATAPACKET, characteristicsData[lfrom:lto]) + + ## Verify uploaded characteristics + characterics = self.downloadCharacteristics(charBufferNumber) + return (characterics == characteristicsData) + + def getMaxPacketSize(self): + """ + Get the maximum allowed size of packet by sensor. + + @author: David Gilson + + @return int + Return the max size. Default 32 bytes. + """ + + packetMaxSizeType = self.getSystemParameters()[5] + + if (packetMaxSizeType == 1): + return 64 + elif (packetMaxSizeType == 2): + return 128 + elif (packetMaxSizeType == 3): + return 256 + else: + return 32 + + def getStorageCapacity(self): + """ + Get the sensor storage capacity. + + @return int + The storage capacity. + """ + + return self.getSystemParameters()[2] + + def generateRandomNumber(self): + """ + Generate a random 32-bit decimal number. + + @author: Philipp Meisberger + + @return int + The generated random number + """ + packetPayload = ( + FINGERPRINT_GENERATERANDOMNUMBER, + ) + + self.__writePacket(FINGERPRINT_COMMANDPACKET, packetPayload) + receivedPacket = self.__readPacket() + + receivedPacketType = receivedPacket[0] + receivedPacketPayload = receivedPacket[1] + + if ( receivedPacketType != FINGERPRINT_ACKPACKET ): + raise Exception('The received packet is no ack packet!') + + if ( receivedPacketPayload[0] == FINGERPRINT_OK ): + pass + + elif ( receivedPacketPayload[0] == FINGERPRINT_ERROR_COMMUNICATION ): + raise Exception('Communication error') + + else: + raise Exception('Unknown error '+ hex(receivedPacketPayload[0])) + + number = 0 + number = number | self.__leftShift(receivedPacketPayload[1], 24) + number = number | self.__leftShift(receivedPacketPayload[2], 16) + number = number | self.__leftShift(receivedPacketPayload[3], 8) + number = number | self.__leftShift(receivedPacketPayload[4], 0) + return number + + def downloadCharacteristics(self, charBufferNumber = 0x01): + """ + Download the finger characteristics of CharBuffer1 or CharBuffer2. + + @param integer(1 byte) charBufferNumber + + @return list + Return a list that contains 512 integer(1 byte) elements of the characteristic. + """ + + if ( charBufferNumber != 0x01 and charBufferNumber != 0x02 ): + raise ValueError('The given charbuffer number is invalid!') + + packetPayload = ( + FINGERPRINT_DOWNLOADCHARACTERISTICS, + charBufferNumber, + ) + + self.__writePacket(FINGERPRINT_COMMANDPACKET, packetPayload) + + ## Get first reply packet + receivedPacket = self.__readPacket() + + receivedPacketType = receivedPacket[0] + receivedPacketPayload = receivedPacket[1] + + if ( receivedPacketType != FINGERPRINT_ACKPACKET ): + raise Exception('The received packet is no ack packet!') + + ## DEBUG: The sensor will sent follow-up packets + if ( receivedPacketPayload[0] == FINGERPRINT_OK ): + pass + + elif ( receivedPacketPayload[0] == FINGERPRINT_ERROR_COMMUNICATION ): + raise Exception('Communication error') + + elif ( receivedPacketPayload[0] == FINGERPRINT_ERROR_DOWNLOADCHARACTERISTICS ): + raise Exception('Could not download characteristics') + + else: + raise Exception('Unknown error '+ hex(receivedPacketPayload[0])) + + completePayload = [] + + ## Get follow-up data packets until the last data packet is received + while ( receivedPacketType != FINGERPRINT_ENDDATAPACKET ): + + receivedPacket = self.__readPacket() + + receivedPacketType = receivedPacket[0] + receivedPacketPayload = receivedPacket[1] + + if ( receivedPacketType != FINGERPRINT_DATAPACKET and receivedPacketType != FINGERPRINT_ENDDATAPACKET ): + raise Exception('The received packet is no data packet!') + + for i in range(0, len(receivedPacketPayload)): + completePayload.append(receivedPacketPayload[i]) + + return completePayload diff --git a/pointeuse/dev/tools/pyfingerprint2/pyfingerprint.py b/pointeuse/dev/tools/pyfingerprint2/pyfingerprint.py new file mode 100644 index 00000000..f5e8d191 --- /dev/null +++ b/pointeuse/dev/tools/pyfingerprint2/pyfingerprint.py @@ -0,0 +1,1358 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +""" +PyFingerprint +Copyright (C) 2015 Bastian Raschke +All rights reserved. + +""" + +import os +import serial +from PIL import Image +import struct + + +## Baotou start byte +FINGERPRINT_STARTCODE = 0xEF01 + +## Packet identification +## + +FINGERPRINT_COMMANDPACKET = 0x01 + +FINGERPRINT_ACKPACKET = 0x07 +FINGERPRINT_DATAPACKET = 0x02 +FINGERPRINT_ENDDATAPACKET = 0x08 + +## Instruction codes +## + +FINGERPRINT_VERIFYPASSWORD = 0x13 +FINGERPRINT_SETPASSWORD = 0x12 +FINGERPRINT_SETADDRESS = 0x15 +FINGERPRINT_SETSYSTEMPARAMETER = 0x0E +FINGERPRINT_GETSYSTEMPARAMETERS = 0x0F +FINGERPRINT_TEMPLATEINDEX = 0x1F +FINGERPRINT_TEMPLATECOUNT = 0x1D + +FINGERPRINT_READIMAGE = 0x01 + +## Note: The documentation mean upload to host computer. +FINGERPRINT_DOWNLOADIMAGE = 0x0A + +FINGERPRINT_CONVERTIMAGE = 0x02 + +FINGERPRINT_CREATETEMPLATE = 0x05 +FINGERPRINT_STORETEMPLATE = 0x06 +FINGERPRINT_SEARCHTEMPLATE = 0x04 +FINGERPRINT_LOADTEMPLATE = 0x07 +FINGERPRINT_DELETETEMPLATE = 0x0C + +FINGERPRINT_CLEARDATABASE = 0x0D +FINGERPRINT_GENERATERANDOMNUMBER = 0x14 +FINGERPRINT_COMPARECHARACTERISTICS = 0x03 + +## Note: The documentation mean download from host computer. +FINGERPRINT_UPLOADCHARACTERISTICS = 0x09 + +## Note: The documentation mean upload to host computer. +FINGERPRINT_DOWNLOADCHARACTERISTICS = 0x08 +## LED +FINGERPRINT_LEDON = 0x50 +FINGERPRINT_LEDOFF = 0x51 +## Packet reply confirmations +## + +FINGERPRINT_OK = 0x00 +FINGERPRINT_ERROR_COMMUNICATION = 0x01 + +FINGERPRINT_ERROR_WRONGPASSWORD = 0x13 + +FINGERPRINT_ERROR_INVALIDREGISTER = 0x1A + +FINGERPRINT_ERROR_NOFINGER = 0x02 +FINGERPRINT_ERROR_READIMAGE = 0x03 + +FINGERPRINT_ERROR_MESSYIMAGE = 0x06 +FINGERPRINT_ERROR_FEWFEATUREPOINTS = 0x07 +FINGERPRINT_ERROR_INVALIDIMAGE = 0x15 + +FINGERPRINT_ERROR_CHARACTERISTICSMISMATCH = 0x0A + +FINGERPRINT_ERROR_INVALIDPOSITION = 0x0B +FINGERPRINT_ERROR_FLASH = 0x18 + +FINGERPRINT_ERROR_NOTEMPLATEFOUND = 0x09 + +FINGERPRINT_ERROR_LOADTEMPLATE = 0x0C + +FINGERPRINT_ERROR_DELETETEMPLATE = 0x10 + +FINGERPRINT_ERROR_CLEARDATABASE = 0x11 + +FINGERPRINT_ERROR_NOTMATCHING = 0x08 + +FINGERPRINT_ERROR_DOWNLOADIMAGE = 0x0F +FINGERPRINT_ERROR_DOWNLOADCHARACTERISTICS = 0x0D + +## Unknown error codes +## + +FINGERPRINT_ADDRCODE = 0x20 +FINGERPRINT_PASSVERIFY = 0x21 + +FINGERPRINT_PACKETRESPONSEFAIL = 0x0E + +FINGERPRINT_ERROR_TIMEOUT = 0xFF +FINGERPRINT_ERROR_BADPACKET = 0xFE + + +class PyFingerprint(object): + """ + A python written library for the ZhianTec ZFM-20 fingerprint sensor. + + @attribute integer(4 bytes) __address + Address to connect to sensor. + + @attribute integer(4 bytes) __password + Password to connect to sensor. + + @attribute Serial __serial + UART serial connection via PySerial. + """ + __address = None + __password = None + __serial = None + + def __init__(self, port = '/dev/ttyUSB0', baudRate = 57600, address = 0xFFFFFFFF, password = 0x00000000): + """ + Constructor + + @param string port + @param integer baudRate + @param integer(4 bytes) address + @param integer(4 bytes) password + """ + + if ( os.path.exists(port) == False ): + raise ValueError('The fingerprint sensor port "' + port + '" was not found!') + + if ( baudRate < 9600 or baudRate > 115200 or baudRate % 9600 != 0 ): + raise ValueError('The given baudrate is invalid!') + + if ( address < 0x00000000 or address > 0xFFFFFFFF ): + raise ValueError('The given address is invalid!') + + if ( password < 0x00000000 or password > 0xFFFFFFFF ): + raise ValueError('The given password is invalid!') + + self.__address = address + self.__password = password + + ## Initialize PySerial connection + self.__serial = serial.Serial(port = port, baudrate = baudRate, bytesize = serial.EIGHTBITS, timeout = 2) + + if ( self.__serial.isOpen() == True ): + self.__serial.close() + + self.__serial.open() + + def __del__(self): + """ + Destructor + + """ + + ## Close connection if still established + if ( self.__serial is not None and self.__serial.isOpen() == True ): + self.__serial.close() + + def __rightShift(self, n, x): + """ + Shift a byte. + + @param integer n + @param integer x + @return integer + """ + + return (n >> x & 0xFF) + + def __leftShift(self, n, x): + """ + Shift a byte. + + @param integer n + @param integer x + @return integer + """ + + return (n << x) + + def __bitAtPosition(self, n, p): + """ + Get the bit of n at position p. + + @param integer n + @param integer p + @return integer + """ + + ## A bitshift 2 ^ p + twoP = 1 << p + + ## Binary AND composition (on both positions must be a 1) + ## This can only happen at position p + result = n & twoP + return int(result > 0) + + def __byteToString(self, byte): + """ + Converts a byte to string. + + @param byte byte + @return string + """ + + return struct.pack('@B', byte) + + def __stringToByte(self, string): + """ + Convert one "string" byte (like '0xFF') to real integer byte (0xFF). + + @param string string + @return byte + """ + + return struct.unpack('@B', string)[0] + + def __writePacket(self, packetType, packetPayload): + """ + Send a packet to fingerprint sensor. + + @param integer(1 byte) packetType + @param tuple packetPayload + + @return void + """ + + ## Write header (one byte at once) + self.__serial.write(self.__byteToString(self.__rightShift(FINGERPRINT_STARTCODE, 8))) + self.__serial.write(self.__byteToString(self.__rightShift(FINGERPRINT_STARTCODE, 0))) + + self.__serial.write(self.__byteToString(self.__rightShift(self.__address, 24))) + self.__serial.write(self.__byteToString(self.__rightShift(self.__address, 16))) + self.__serial.write(self.__byteToString(self.__rightShift(self.__address, 8))) + self.__serial.write(self.__byteToString(self.__rightShift(self.__address, 0))) + + self.__serial.write(self.__byteToString(packetType)) + + ## The packet length = package payload (n bytes) + checksum (2 bytes) + packetLength = len(packetPayload) + 2 + + self.__serial.write(self.__byteToString(self.__rightShift(packetLength, 8))) + self.__serial.write(self.__byteToString(self.__rightShift(packetLength, 0))) + + ## The packet checksum = packet type (1 byte) + packet length (2 bytes) + payload (n bytes) + packetChecksum = packetType + self.__rightShift(packetLength, 8) + self.__rightShift(packetLength, 0) + + ## Write payload + for i in range(0, len(packetPayload)): + self.__serial.write(self.__byteToString(packetPayload[i])) + packetChecksum += packetPayload[i] + + ## Write checksum (2 bytes) + self.__serial.write(self.__byteToString(self.__rightShift(packetChecksum, 8))) + self.__serial.write(self.__byteToString(self.__rightShift(packetChecksum, 0))) + + def __readPacket(self): + """ + Receive a packet from fingerprint sensor. + + Return a tuple that contain the following information: + 0: integer(1 byte) The packet type. + 1: integer(n bytes) The packet payload. + + @return tuple + """ + + receivedPacketData = [] + i = 0 + + while ( True ): + + ## Read one byte + receivedFragment = self.__serial.read() + + if ( len(receivedFragment) != 0 ): + receivedFragment = self.__stringToByte(receivedFragment) + ## print 'Received packet fragment = ' + hex(receivedFragment) + + ## Insert byte if packet seems valid + receivedPacketData.insert(i, receivedFragment) + i += 1 + + ## Packet could be complete (the minimal packet size is 12 bytes) + if ( i >= 12 ): + + ## Check the packet header + if ( receivedPacketData[0] != self.__rightShift(FINGERPRINT_STARTCODE, 8) or receivedPacketData[1] != self.__rightShift(FINGERPRINT_STARTCODE, 0) ): + raise Exception('The received packet do not begin with a valid header!') + + ## Calculate packet payload length (combine the 2 length bytes) + packetPayloadLength = self.__leftShift(receivedPacketData[7], 8) + packetPayloadLength = packetPayloadLength | self.__leftShift(receivedPacketData[8], 0) + + ## Check if the packet is still fully received + ## Condition: index counter < packet payload length + packet frame + if ( i < packetPayloadLength + 9 ): + continue + + ## At this point the packet should be fully received + + packetType = receivedPacketData[6] + + ## Calculate checksum: + ## checksum = packet type (1 byte) + packet length (2 bytes) + packet payload (n bytes) + packetChecksum = packetType + receivedPacketData[7] + receivedPacketData[8] + + packetPayload = [] + + ## Collect package payload (ignore the last 2 checksum bytes) + for j in range(9, 9 + packetPayloadLength - 2): + packetPayload.append(receivedPacketData[j]) + packetChecksum += receivedPacketData[j] + + ## Calculate full checksum of the 2 separate checksum bytes + receivedChecksum = self.__leftShift(receivedPacketData[i - 2], 8) + receivedChecksum = receivedChecksum | self.__leftShift(receivedPacketData[i - 1], 0) + + if ( receivedChecksum != packetChecksum ): + raise Exception('The received packet is corrupted (the checksum is wrong)!') + + return (packetType, packetPayload) + + def verifyPassword(self): + """ + Verify password of the fingerprint sensor. + + @return boolean + """ + + packetPayload = ( + FINGERPRINT_VERIFYPASSWORD, + self.__rightShift(self.__password, 24), + self.__rightShift(self.__password, 16), + self.__rightShift(self.__password, 8), + self.__rightShift(self.__password, 0), + ) + + self.__writePacket(FINGERPRINT_COMMANDPACKET, packetPayload) + receivedPacket = self.__readPacket() + + receivedPacketType = receivedPacket[0] + receivedPacketPayload = receivedPacket[1] + + if ( receivedPacketType != FINGERPRINT_ACKPACKET ): + raise Exception('The received packet is no ack packet!') + + ## DEBUG: Sensor password is correct + if ( receivedPacketPayload[0] == FINGERPRINT_OK ): + return True + + elif ( receivedPacketPayload[0] == FINGERPRINT_ERROR_COMMUNICATION ): + raise Exception('Communication error') + + elif ( receivedPacketPayload[0] == FINGERPRINT_ADDRCODE ): + raise Exception('The address is wrong') + + ## DEBUG: Sensor password is wrong + elif ( receivedPacketPayload[0] == FINGERPRINT_ERROR_WRONGPASSWORD ): + return False + + else: + raise Exception('Unknown error '+ hex(receivedPacketPayload[0])) + + def setPassword(self, newPassword): + """ + Set the password of the sensor. + + @param integer(4 bytes) newPassword + @return boolean + """ + + ## Validate the password (maximum 4 bytes) + if ( newPassword < 0x00000000 or newPassword > 0xFFFFFFFF ): + raise ValueError('The given password is invalid!') + + packetPayload = ( + FINGERPRINT_SETPASSWORD, + self.__rightShift(newPassword, 24), + self.__rightShift(newPassword, 16), + self.__rightShift(newPassword, 8), + self.__rightShift(newPassword, 0), + ) + + self.__writePacket(FINGERPRINT_COMMANDPACKET, packetPayload) + receivedPacket = self.__readPacket() + + receivedPacketType = receivedPacket[0] + receivedPacketPayload = receivedPacket[1] + + if ( receivedPacketType != FINGERPRINT_ACKPACKET ): + raise Exception('The received packet is no ack packet!') + + ## DEBUG: Password set was successful + if ( receivedPacketPayload[0] == FINGERPRINT_OK ): + self.__password = newPassword + return True + + elif ( receivedPacketPayload[0] == FINGERPRINT_ERROR_COMMUNICATION ): + raise Exception('Communication error') + + else: + raise Exception('Unknown error '+ hex(receivedPacketPayload[0])) + + def setAddress(self, newAddress): + """ + Set the module address of the sensor. + + @param integer(4 bytes) newAddress + @return boolean + """ + + ## Validate the address (maximum 4 bytes) + if ( newAddress < 0x00000000 or newAddress > 0xFFFFFFFF ): + raise ValueError('The given address is invalid!') + + packetPayload = ( + FINGERPRINT_SETADDRESS, + self.__rightShift(newAddress, 24), + self.__rightShift(newAddress, 16), + self.__rightShift(newAddress, 8), + self.__rightShift(newAddress, 0), + ) + + self.__writePacket(FINGERPRINT_COMMANDPACKET, packetPayload) + receivedPacket = self.__readPacket() + + receivedPacketType = receivedPacket[0] + receivedPacketPayload = receivedPacket[1] + + if ( receivedPacketType != FINGERPRINT_ACKPACKET ): + raise Exception('The received packet is no ack packet!') + + ## DEBUG: Address set was successful + if ( receivedPacketPayload[0] == FINGERPRINT_OK ): + self.__address = newAddress + return True + + elif ( receivedPacketPayload[0] == FINGERPRINT_ERROR_COMMUNICATION ): + raise Exception('Communication error') + + else: + raise Exception('Unknown error '+ hex(receivedPacketPayload[0])) + + def setSystemParameter(self, parameterNumber, parameterValue): + """ + Set a system parameter of the sensor. + + @param integer(1 byte) parameterNumber + @param integer(1 byte) parameterValue + @return boolean + """ + + ## Validate the baudrate parameter + if ( parameterNumber == 4 ): + + if ( parameterValue < 1 or parameterValue > 12 ): + raise ValueError('The given baudrate parameter is invalid!') + + ## Validate the security level parameter + elif ( parameterNumber == 5 ): + + if ( parameterValue < 1 or parameterValue > 5 ): + raise ValueError('The given security level parameter is invalid!') + + ## Validate the package length parameter + elif ( parameterNumber == 6 ): + + if ( parameterValue < 0 or parameterValue > 3 ): + raise ValueError('The given package length parameter is invalid!') + + ## The parameter number is not valid + else: + raise ValueError('The given parameter number is invalid!') + + packetPayload = ( + FINGERPRINT_SETSYSTEMPARAMETER, + parameterNumber, + parameterValue, + ) + + self.__writePacket(FINGERPRINT_COMMANDPACKET, packetPayload) + receivedPacket = self.__readPacket() + + receivedPacketType = receivedPacket[0] + receivedPacketPayload = receivedPacket[1] + + if ( receivedPacketType != FINGERPRINT_ACKPACKET ): + raise Exception('The received packet is no ack packet!') + + ## DEBUG: Parameter set was successful + if ( receivedPacketPayload[0] == FINGERPRINT_OK ): + return True + + elif ( receivedPacketPayload[0] == FINGERPRINT_ERROR_COMMUNICATION ): + raise Exception('Communication error') + + elif ( receivedPacketPayload[0] == FINGERPRINT_ERROR_INVALIDREGISTER ): + raise Exception('Invalid register number') + + else: + raise Exception('Unknown error '+ hex(receivedPacketPayload[0])) + + + def getSystemParameters(self): + """ + Get all available system information of the sensor. + + Return a tuple that contain the following information: + 0: integer(2 bytes) The status register. + 1: integer(2 bytes) The system id. + 2: integer(2 bytes) The storage capacity. + 3: integer(2 bytes) The security level. + 4: integer(4 bytes) The sensor address. + 5: integer(2 bytes) The packet length. + 6: integer(2 bytes) The baudrate. + + @return tuple + """ + + packetPayload = ( + FINGERPRINT_GETSYSTEMPARAMETERS, + ) + + self.__writePacket(FINGERPRINT_COMMANDPACKET, packetPayload) + receivedPacket = self.__readPacket() + + receivedPacketType = receivedPacket[0] + receivedPacketPayload = receivedPacket[1] + + if ( receivedPacketType != FINGERPRINT_ACKPACKET ): + raise Exception('The received packet is no ack packet!') + + ## DEBUG: Read successfully + if ( receivedPacketPayload[0] == FINGERPRINT_OK ): + + statusRegister = self.__leftShift(receivedPacketPayload[1], 8) | self.__leftShift(receivedPacketPayload[2], 0) + systemID = self.__leftShift(receivedPacketPayload[3], 8) | self.__leftShift(receivedPacketPayload[4], 0) + storageCapacity = self.__leftShift(receivedPacketPayload[5], 8) | self.__leftShift(receivedPacketPayload[6], 0) + securityLevel = self.__leftShift(receivedPacketPayload[7], 8) | self.__leftShift(receivedPacketPayload[8], 0) + deviceAddress = ((receivedPacketPayload[9] << 8 | receivedPacketPayload[10]) << 8 | receivedPacketPayload[11]) << 8 | receivedPacketPayload[12] ## TODO + packetLength = self.__leftShift(receivedPacketPayload[13], 8) | self.__leftShift(receivedPacketPayload[14], 0) + baudRate = self.__leftShift(receivedPacketPayload[15], 8) | self.__leftShift(receivedPacketPayload[16], 0) + + return (statusRegister, systemID, storageCapacity, securityLevel, deviceAddress, packetLength, baudRate) + + elif ( receivedPacketPayload[0] == FINGERPRINT_ERROR_COMMUNICATION ): + raise Exception('Communication error') + + else: + raise Exception('Unknown error '+ hex(receivedPacketPayload[0])) + + def getTemplateIndex(self, page): + """ + Get a list of the template positions with usage indicator. + + @param integer(1 byte) page + @return list + """ + + if ( page < 0 or page > 3 ): + raise ValueError('The given index page is invalid!') + + packetPayload = ( + FINGERPRINT_TEMPLATEINDEX, + page, + ) + + self.__writePacket(FINGERPRINT_COMMANDPACKET, packetPayload) + receivedPacket = self.__readPacket() + + receivedPacketType = receivedPacket[0] + receivedPacketPayload = receivedPacket[1] + + if ( receivedPacketType != FINGERPRINT_ACKPACKET ): + raise Exception('The received packet is no ack packet!') + + ## DEBUG: Read index table successfully + if ( receivedPacketPayload[0] == FINGERPRINT_OK ): + + templateIndex = [] + + ## Contain the table page bytes (skip the first status byte) + pageElements = receivedPacketPayload[1:] + + for pageElement in pageElements: + ## Test every bit (bit = template position is used indicator) of a table page element + for p in range(0, 7 + 1): + positionIsUsed = (self.__bitAtPosition(pageElement, p) == 1) + templateIndex.append(positionIsUsed) + + return templateIndex + + elif ( receivedPacketPayload[0] == FINGERPRINT_ERROR_COMMUNICATION ): + raise Exception('Communication error') + + else: + raise Exception('Unknown error '+ hex(receivedPacketPayload[0])) + + def getTemplateCount(self): + """ + Get the number of stored templates. + + @return integer(2 bytes) + """ + + packetPayload = ( + FINGERPRINT_TEMPLATECOUNT, + ) + + self.__writePacket(FINGERPRINT_COMMANDPACKET, packetPayload) + receivedPacket = self.__readPacket() + + receivedPacketType = receivedPacket[0] + receivedPacketPayload = receivedPacket[1] + + if ( receivedPacketType != FINGERPRINT_ACKPACKET ): + raise Exception('The received packet is no ack packet!') + + ## DEBUG: Read successfully + if ( receivedPacketPayload[0] == FINGERPRINT_OK ): + templateCount = self.__leftShift(receivedPacketPayload[1], 8) + templateCount = templateCount | self.__leftShift(receivedPacketPayload[2], 0) + return templateCount + + elif ( receivedPacketPayload[0] == FINGERPRINT_ERROR_COMMUNICATION ): + raise Exception('Communication error') + + else: + raise Exception('Unknown error '+ hex(receivedPacketPayload[0])) + + def readImage(self): + """ + Read the image of a finger and stores it in ImageBuffer. + + @return boolean + """ + + packetPayload = ( + FINGERPRINT_READIMAGE, + ) + + self.__writePacket(FINGERPRINT_COMMANDPACKET, packetPayload) + receivedPacket = self.__readPacket() + + receivedPacketType = receivedPacket[0] + receivedPacketPayload = receivedPacket[1] + + if ( receivedPacketType != FINGERPRINT_ACKPACKET ): + raise Exception('The received packet is no ack packet!') + + ## DEBUG: Image read successful + if ( receivedPacketPayload[0] == FINGERPRINT_OK ): + return True + + elif ( receivedPacketPayload[0] == FINGERPRINT_ERROR_COMMUNICATION ): + raise Exception('Communication error') + + ## DEBUG: No finger found + elif ( receivedPacketPayload[0] == FINGERPRINT_ERROR_NOFINGER ): + return False + + elif ( receivedPacketPayload[0] == FINGERPRINT_ERROR_READIMAGE ): + raise Exception('Could not read image') + + else: + raise Exception('Unknown error '+ hex(receivedPacketPayload[0])) + + ## TODO: + ## Implementation of uploadImage() + def setLEDoff(self): + packetPayload = ( + FINGERPRINT_LEDOFF, + ) + + self.__writePacket(FINGERPRINT_COMMANDPACKET, packetPayload) + + ## Get first reply packet + receivedPacket = self.__readPacket() + receivedPacketType = receivedPacket[0] + receivedPacketPayload = receivedPacket[1] + if ( receivedPacketPayload[0] == FINGERPRINT_OK ): + return True + else: + raise Exception('Unknown error '+ hex(receivedPacketPayload[0])) + def setLEDon(self): + packetPayload = ( + FINGERPRINT_LEDON, + ) + + self.__writePacket(FINGERPRINT_COMMANDPACKET, packetPayload) + + ## Get first reply packet + receivedPacket = self.__readPacket() + receivedPacketType = receivedPacket[0] + receivedPacketPayload = receivedPacket[1] + if ( receivedPacketPayload[0] == FINGERPRINT_OK ): + return True + else: + raise Exception('Unknown error '+ hex(receivedPacketPayload[0])) + def downloadImage(self, imageDestination): + """ + Download the image of a finger to host computer. + + @param string imageDestination + @return void + """ + + destinationDirectory = os.path.dirname(imageDestination) + + if ( os.access(destinationDirectory, os.W_OK) == False ): + raise ValueError('The given destination directory "' + destinationDirectory + '" is not writable!') + + packetPayload = ( + FINGERPRINT_DOWNLOADIMAGE, + ) + + self.__writePacket(FINGERPRINT_COMMANDPACKET, packetPayload) + + ## Get first reply packet + receivedPacket = self.__readPacket() + + receivedPacketType = receivedPacket[0] + receivedPacketPayload = receivedPacket[1] + + if ( receivedPacketType != FINGERPRINT_ACKPACKET ): + raise Exception('The received packet is no ack packet!') + + ## DEBUG: The sensor will sent follow-up packets + if ( receivedPacketPayload[0] == FINGERPRINT_OK ): + pass + + elif ( receivedPacketPayload[0] == FINGERPRINT_ERROR_COMMUNICATION ): + raise Exception('Communication error') + + elif ( receivedPacketPayload[0] == FINGERPRINT_ERROR_DOWNLOADIMAGE ): + raise Exception('Could not download image') + + else: + raise Exception('Unknown error '+ hex(receivedPacketPayload[0])) + + ## Initialize image library + resultImage = Image.new('L', (256, 288), 'white') + pixels = resultImage.load() + + ## Y coordinate of current pixel + line = 0 + + ## Get follow-up data packets until the last data packet is received + while ( receivedPacketType != FINGERPRINT_ENDDATAPACKET ): + + receivedPacket = self.__readPacket() + + receivedPacketType = receivedPacket[0] + receivedPacketPayload = receivedPacket[1] + + if ( receivedPacketType != FINGERPRINT_DATAPACKET and receivedPacketType != FINGERPRINT_ENDDATAPACKET ): + raise Exception('The received packet is no data packet!') + + ## X coordinate of current pixel + x = 0 + + for i in range(0, len(receivedPacketPayload)): + + ## Thanks to Danylo Esterman for the "multiple with 17" improvement: + + ## Draw left 4 Bits one byte of package + pixels[x, line] = (receivedPacketPayload[i] >> 4) * 17 + x = x + 1 + + ## Draw right 4 Bits one byte of package + pixels[x, line] = (receivedPacketPayload[i] & 0b00001111) * 17 + x = x + 1 + + line = line + 1 + + resultImage.save(imageDestination) + + def convertImage(self, charBufferNumber = 0x01): + """ + Convert the image in ImageBuffer to finger characteristics and store in CharBuffer1 or CharBuffer2. + + @param integer(1 byte) charBufferNumber + @return boolean + """ + + if ( charBufferNumber != 0x01 and charBufferNumber != 0x02 ): + raise ValueError('The given charbuffer number is invalid!') + + packetPayload = ( + FINGERPRINT_CONVERTIMAGE, + charBufferNumber, + ) + + self.__writePacket(FINGERPRINT_COMMANDPACKET, packetPayload) + receivedPacket = self.__readPacket() + + receivedPacketType = receivedPacket[0] + receivedPacketPayload = receivedPacket[1] + + if ( receivedPacketType != FINGERPRINT_ACKPACKET ): + raise Exception('The received packet is no ack packet!') + + ## DEBUG: Image converted + if ( receivedPacketPayload[0] == FINGERPRINT_OK ): + return True + + elif ( receivedPacketPayload[0] == FINGERPRINT_ERROR_COMMUNICATION ): + raise Exception('Communication error') + + elif ( receivedPacketPayload[0] == FINGERPRINT_ERROR_MESSYIMAGE ): + raise Exception('The image is too messy') + + elif ( receivedPacketPayload[0] == FINGERPRINT_ERROR_FEWFEATUREPOINTS ): + raise Exception('The image contains too few feature points') + + elif ( receivedPacketPayload[0] == FINGERPRINT_ERROR_INVALIDIMAGE ): + raise Exception('The image is invalid') + + else: + raise Exception('Unknown error '+ hex(receivedPacketPayload[0])) + + def createTemplate(self): + """ + Combine the characteristics which are stored in CharBuffer1 and CharBuffer2 to a template. + The created template will be stored again in CharBuffer1 and CharBuffer2 as the same. + + @return boolean + """ + + packetPayload = ( + FINGERPRINT_CREATETEMPLATE, + ) + + self.__writePacket(FINGERPRINT_COMMANDPACKET, packetPayload) + receivedPacket = self.__readPacket() + + receivedPacketType = receivedPacket[0] + receivedPacketPayload = receivedPacket[1] + + if ( receivedPacketType != FINGERPRINT_ACKPACKET ): + raise Exception('The received packet is no ack packet!') + + ## DEBUG: Template created successful + if ( receivedPacketPayload[0] == FINGERPRINT_OK ): + return True + + elif ( receivedPacketPayload[0] == FINGERPRINT_ERROR_COMMUNICATION ): + raise Exception('Communication error') + + ## DEBUG: The characteristics not matching + elif ( receivedPacketPayload[0] == FINGERPRINT_ERROR_CHARACTERISTICSMISMATCH ): + return False + + else: + raise Exception('Unknown error '+ hex(receivedPacketPayload[0])) + + def storeTemplate(self, positionNumber = -1, charBufferNumber = 0x01): + """ + Save a template from the specified CharBuffer to the given position number. + + @param integer(2 bytes) positionNumber + @param integer(1 byte) charBufferNumber + @return integer + """ + + ## Find a free index + if ( positionNumber == -1 ): + for page in range(0, 4): + ## Free index found? + if ( positionNumber >= 0 ): + break + + templateIndex = self.getTemplateIndex(page) + + for i in range(0, len(templateIndex)): + ## Index not used? + if ( templateIndex[i] == False ): + positionNumber = (len(templateIndex) * page) + i + break + + if ( positionNumber < 0x0000 or positionNumber >= self.getStorageCapacity() ): + raise ValueError('The given position number is invalid!') + + if ( charBufferNumber != 0x01 and charBufferNumber != 0x02 ): + raise ValueError('The given charbuffer number is invalid!') + + packetPayload = ( + FINGERPRINT_STORETEMPLATE, + charBufferNumber, + self.__rightShift(positionNumber, 8), + self.__rightShift(positionNumber, 0), + ) + + self.__writePacket(FINGERPRINT_COMMANDPACKET, packetPayload) + receivedPacket = self.__readPacket() + + receivedPacketType = receivedPacket[0] + receivedPacketPayload = receivedPacket[1] + + if ( receivedPacketType != FINGERPRINT_ACKPACKET ): + raise Exception('The received packet is no ack packet!') + + ## DEBUG: Template stored successful + if ( receivedPacketPayload[0] == FINGERPRINT_OK ): + return positionNumber + + elif ( receivedPacketPayload[0] == FINGERPRINT_ERROR_COMMUNICATION ): + raise Exception('Communication error') + + elif ( receivedPacketPayload[0] == FINGERPRINT_ERROR_INVALIDPOSITION ): + raise Exception('Could not store template in that position') + + elif ( receivedPacketPayload[0] == FINGERPRINT_ERROR_FLASH ): + raise Exception('Error writing to flash') + + else: + raise Exception('Unknown error '+ hex(receivedPacketPayload[0])) + + def searchTemplate(self): + """ + Search the finger characteristics in CharBuffer in database. + + Return a tuple that contain the following information: + 0: integer(2 bytes) The position number of found template. + 1: integer(2 bytes) The accuracy score of found template. + + @return tuple + """ + + ## CharBuffer1 and CharBuffer2 are the same in this case + charBufferNumber = 0x01 + + ## Begin search at index 0 + positionStart = 0x0000 + templatesCount = self.getStorageCapacity() + + packetPayload = ( + FINGERPRINT_SEARCHTEMPLATE, + charBufferNumber, + self.__rightShift(positionStart, 8), + self.__rightShift(positionStart, 0), + self.__rightShift(templatesCount, 8), + self.__rightShift(templatesCount, 0), + ) + + self.__writePacket(FINGERPRINT_COMMANDPACKET, packetPayload) + receivedPacket = self.__readPacket() + + receivedPacketType = receivedPacket[0] + receivedPacketPayload = receivedPacket[1] + + if ( receivedPacketType != FINGERPRINT_ACKPACKET ): + raise Exception('The received packet is no ack packet!') + + ## DEBUG: Found template + if ( receivedPacketPayload[0] == FINGERPRINT_OK ): + + positionNumber = self.__leftShift(receivedPacketPayload[1], 8) + positionNumber = positionNumber | self.__leftShift(receivedPacketPayload[2], 0) + + accuracyScore = self.__leftShift(receivedPacketPayload[3], 8) + accuracyScore = accuracyScore | self.__leftShift(receivedPacketPayload[4], 0) + + return (positionNumber, accuracyScore) + + elif ( receivedPacketPayload[0] == FINGERPRINT_ERROR_COMMUNICATION ): + raise Exception('Communication error') + + ## DEBUG: Did not found a matching template + elif ( receivedPacketPayload[0] == FINGERPRINT_ERROR_NOTEMPLATEFOUND ): + return (-1, -1) + + else: + raise Exception('Unknown error '+ hex(receivedPacketPayload[0])) + + def loadTemplate(self, positionNumber, charBufferNumber = 0x01): + """ + Load an existing template specified by position number to specified CharBuffer. + + @param integer(2 bytes) positionNumber + @param integer(1 byte) charBufferNumber + @return boolean + """ + + if ( positionNumber < 0x0000 or positionNumber >= self.getStorageCapacity() ): + raise ValueError('The given position number is invalid!') + + if ( charBufferNumber != 0x01 and charBufferNumber != 0x02 ): + raise ValueError('The given charbuffer number is invalid!') + + packetPayload = ( + FINGERPRINT_LOADTEMPLATE, + charBufferNumber, + self.__rightShift(positionNumber, 8), + self.__rightShift(positionNumber, 0), + ) + + self.__writePacket(FINGERPRINT_COMMANDPACKET, packetPayload) + receivedPacket = self.__readPacket() + + receivedPacketType = receivedPacket[0] + receivedPacketPayload = receivedPacket[1] + + if ( receivedPacketType != FINGERPRINT_ACKPACKET ): + raise Exception('The received packet is no ack packet!') + + ## DEBUG: Template loaded successful + if ( receivedPacketPayload[0] == FINGERPRINT_OK ): + return True + + elif ( receivedPacketPayload[0] == FINGERPRINT_ERROR_COMMUNICATION ): + raise Exception('Communication error') + + elif ( receivedPacketPayload[0] == FINGERPRINT_ERROR_LOADTEMPLATE ): + raise Exception('The template could not be read') + + elif ( receivedPacketPayload[0] == FINGERPRINT_ERROR_INVALIDPOSITION ): + raise Exception('Could not load template from that position') + + else: + raise Exception('Unknown error '+ hex(receivedPacketPayload[0])) + + def deleteTemplate(self, positionNumber, count = 1): + """ + Delete templates from fingerprint database. Per default one. + + @param integer(2 bytes) positionNumber + @param integer(2 bytes) count + @return boolean + """ + + capacity = self.getStorageCapacity() + + if ( positionNumber < 0x0000 or positionNumber >= capacity ): + raise ValueError('The given position number is invalid!') + + if ( count < 0x0000 or count > capacity - positionNumber ): + raise ValueError('The given count is invalid!') + + packetPayload = ( + FINGERPRINT_DELETETEMPLATE, + self.__rightShift(positionNumber, 8), + self.__rightShift(positionNumber, 0), + self.__rightShift(count, 8), + self.__rightShift(count, 0), + ) + + self.__writePacket(FINGERPRINT_COMMANDPACKET, packetPayload) + receivedPacket = self.__readPacket() + + receivedPacketType = receivedPacket[0] + receivedPacketPayload = receivedPacket[1] + + if ( receivedPacketType != FINGERPRINT_ACKPACKET ): + raise Exception('The received packet is no ack packet!') + + ## DEBUG: Template deleted successful + if ( receivedPacketPayload[0] == FINGERPRINT_OK ): + return True + + elif ( receivedPacketPayload[0] == FINGERPRINT_ERROR_COMMUNICATION ): + raise Exception('Communication error') + + elif ( receivedPacketPayload[0] == FINGERPRINT_ERROR_INVALIDPOSITION ): + raise Exception('Invalid position') + + ## DEBUG: Could not delete template + elif ( receivedPacketPayload[0] == FINGERPRINT_ERROR_DELETETEMPLATE ): + return False + + else: + raise Exception('Unknown error '+ hex(receivedPacketPayload[0])) + + def clearDatabase(self): + """ + Clear the complete template database. + + @return boolean + """ + + packetPayload = ( + FINGERPRINT_CLEARDATABASE, + ) + + self.__writePacket(FINGERPRINT_COMMANDPACKET, packetPayload) + receivedPacket = self.__readPacket() + + receivedPacketType = receivedPacket[0] + receivedPacketPayload = receivedPacket[1] + + if ( receivedPacketType != FINGERPRINT_ACKPACKET ): + raise Exception('The received packet is no ack packet!') + + ## DEBUG: Database cleared successful + if ( receivedPacketPayload[0] == FINGERPRINT_OK ): + return True + + elif ( receivedPacketPayload[0] == FINGERPRINT_ERROR_COMMUNICATION ): + raise Exception('Communication error') + + ## DEBUG: Could not clear database + elif ( receivedPacketPayload[0] == FINGERPRINT_ERROR_CLEARDATABASE ): + return False + + else: + raise Exception('Unknown error '+ hex(receivedPacketPayload[0])) + + def compareCharacteristics(self): + """ + Compare the finger characteristics of CharBuffer1 with CharBuffer2 and return the accuracy score. + + @return integer(2 bytes) + """ + + packetPayload = ( + FINGERPRINT_COMPARECHARACTERISTICS, + ) + + self.__writePacket(FINGERPRINT_COMMANDPACKET, packetPayload) + receivedPacket = self.__readPacket() + + receivedPacketType = receivedPacket[0] + receivedPacketPayload = receivedPacket[1] + + if ( receivedPacketType != FINGERPRINT_ACKPACKET ): + raise Exception('The received packet is no ack packet!') + + ## DEBUG: Comparison successful + if ( receivedPacketPayload[0] == FINGERPRINT_OK ): + accuracyScore = self.__leftShift(receivedPacketPayload[1], 8) + accuracyScore = accuracyScore | self.__leftShift(receivedPacketPayload[2], 0) + return accuracyScore + + elif ( receivedPacketPayload[0] == FINGERPRINT_ERROR_COMMUNICATION ): + raise Exception('Communication error') + + ## DEBUG: The characteristics do not matching + elif ( receivedPacketPayload[0] == FINGERPRINT_ERROR_NOTMATCHING ): + return 0 + + else: + raise Exception('Unknown error '+ hex(receivedPacketPayload[0])) + + def uploadCharacteristics(self, charBufferNumber = 0x01, characteristicsData = [0]): + """ + Upload finger characteristics to CharBuffer1 or CharBuffer2. + + @author: David Gilson + + @param integer(1 byte) charBufferNumber + @param integer(list) characteristicsData + + @return boolean + Return true if everything is right. + """ + + if ( charBufferNumber != 0x01 and charBufferNumber != 0x02 ): + raise ValueError('The given charbuffer number is invalid!') + + if ( characteristicsData == [0] ): + raise ValueError('The characteristics data is required!') + + maxPacketSize = self.getMaxPacketSize() + + ## Upload command + + packetPayload = ( + FINGERPRINT_UPLOADCHARACTERISTICS, + charBufferNumber + ) + + self.__writePacket(FINGERPRINT_COMMANDPACKET, packetPayload) + + ## Get first reply packet + receivedPacket = self.__readPacket() + + receivedPacketType = receivedPacket[0] + receivedPacketPayload = receivedPacket[1] + + if ( receivedPacketType != FINGERPRINT_ACKPACKET ): + raise Exception('The received packet is no ack packet!') + + ## DEBUG: The sensor will sent follow-up packets + if ( receivedPacketPayload[0] == FINGERPRINT_OK ): + pass + + elif ( receivedPacketPayload[0] == FINGERPRINT_ERROR_COMMUNICATION ): + raise Exception('Communication error') + + elif ( receivedPacketPayload[0] == FINGERPRINT_PACKETRESPONSEFAIL ): + raise Exception('Could not upload characteristics') + + else: + raise Exception('Unknown error '+ hex(receivedPacketPayload[0])) + + ## Upload data packets + packetNbr = len(characteristicsData) / maxPacketSize + + if ( packetNbr <= 1 ): + self.__writePacket(FINGERPRINT_ENDDATAPACKET, characteristicsData) + else: + i = 1 + while ( i < packetNbr ): + lfrom = (i-1) * maxPacketSize + lto = lfrom + maxPacketSize + self.__writePacket(FINGERPRINT_DATAPACKET, characteristicsData[lfrom:lto]) + i += 1 + + lfrom = (i-1) * maxPacketSize + lto = lfrom + maxPacketSize + self.__writePacket(FINGERPRINT_ENDDATAPACKET, characteristicsData[lfrom:lto]) + + ## Verify uploaded characteristics + characterics = self.downloadCharacteristics(charBufferNumber) + return (characterics == characteristicsData) + + def getMaxPacketSize(self): + """ + Get the maximum allowed size of packet by sensor. + + @author: David Gilson + + @return int + Return the max size. Default 32 bytes. + """ + + packetMaxSizeType = self.getSystemParameters()[5] + + if (packetMaxSizeType == 1): + return 64 + elif (packetMaxSizeType == 2): + return 128 + elif (packetMaxSizeType == 3): + return 256 + else: + return 32 + + def getStorageCapacity(self): + """ + Get the sensor storage capacity. + + @return int + The storage capacity. + """ + + return self.getSystemParameters()[2] + + def generateRandomNumber(self): + """ + Generate a random 32-bit decimal number. + + @author: Philipp Meisberger + + @return int + The generated random number + """ + packetPayload = ( + FINGERPRINT_GENERATERANDOMNUMBER, + ) + + self.__writePacket(FINGERPRINT_COMMANDPACKET, packetPayload) + receivedPacket = self.__readPacket() + + receivedPacketType = receivedPacket[0] + receivedPacketPayload = receivedPacket[1] + + if ( receivedPacketType != FINGERPRINT_ACKPACKET ): + raise Exception('The received packet is no ack packet!') + + if ( receivedPacketPayload[0] == FINGERPRINT_OK ): + pass + + elif ( receivedPacketPayload[0] == FINGERPRINT_ERROR_COMMUNICATION ): + raise Exception('Communication error') + + else: + raise Exception('Unknown error '+ hex(receivedPacketPayload[0])) + + number = 0 + number = number | self.__leftShift(receivedPacketPayload[1], 24) + number = number | self.__leftShift(receivedPacketPayload[2], 16) + number = number | self.__leftShift(receivedPacketPayload[3], 8) + number = number | self.__leftShift(receivedPacketPayload[4], 0) + return number + + def downloadCharacteristics(self, charBufferNumber = 0x01): + """ + Download the finger characteristics of CharBuffer1 or CharBuffer2. + + @param integer(1 byte) charBufferNumber + + @return list + Return a list that contains 512 integer(1 byte) elements of the characteristic. + """ + + if ( charBufferNumber != 0x01 and charBufferNumber != 0x02 ): + raise ValueError('The given charbuffer number is invalid!') + + packetPayload = ( + FINGERPRINT_DOWNLOADCHARACTERISTICS, + charBufferNumber, + ) + + self.__writePacket(FINGERPRINT_COMMANDPACKET, packetPayload) + + ## Get first reply packet + receivedPacket = self.__readPacket() + + receivedPacketType = receivedPacket[0] + receivedPacketPayload = receivedPacket[1] + + if ( receivedPacketType != FINGERPRINT_ACKPACKET ): + raise Exception('The received packet is no ack packet!') + + ## DEBUG: The sensor will sent follow-up packets + if ( receivedPacketPayload[0] == FINGERPRINT_OK ): + pass + + elif ( receivedPacketPayload[0] == FINGERPRINT_ERROR_COMMUNICATION ): + raise Exception('Communication error') + + elif ( receivedPacketPayload[0] == FINGERPRINT_ERROR_DOWNLOADCHARACTERISTICS ): + raise Exception('Could not download characteristics') + + else: + raise Exception('Unknown error '+ hex(receivedPacketPayload[0])) + + completePayload = [] + + ## Get follow-up data packets until the last data packet is received + while ( receivedPacketType != FINGERPRINT_ENDDATAPACKET ): + + receivedPacket = self.__readPacket() + + receivedPacketType = receivedPacket[0] + receivedPacketPayload = receivedPacket[1] + + if ( receivedPacketType != FINGERPRINT_DATAPACKET and receivedPacketType != FINGERPRINT_ENDDATAPACKET ): + raise Exception('The received packet is no data packet!') + + for i in range(0, len(receivedPacketPayload)): + completePayload.append(receivedPacketPayload[i]) + + return completePayload diff --git a/pointeuse/dev/updatedata.pl b/pointeuse/dev/updatedata.pl new file mode 100644 index 00000000..abc7402c --- /dev/null +++ b/pointeuse/dev/updatedata.pl @@ -0,0 +1,75 @@ +#!/usr/bin/env perl +use strict; +use Getopt::Long; +use Data::Dumper; +use File::Basename; +use FindBin qw($RealBin); +use JSON::PP; +use lib (dirname($RealBin).'/lib'); +use DB::SQLite; +my $cfgfile = ""; +my $datafile =""; +GetOptions("cfg|c=s" => \$cfgfile, "data|d=s" => \$datafile); + +if (! -e $cfgfile){ + print "no configfile!\n"; + exit(1); +} +if (! -e $datafile){ + print "no datafile!\n"; + exit(1); +} +my $cfg = &readconfig(); +if (! -e $cfg->{datapath}.'/'.$cfg->{dbfile}){ + print "no database ".$cfg->{datapath}.'/'.$cfg->{dbfile}." found!\n"; + exit(1); +} + +my $jdata = &readdatafile(); +my $db = DB::SQLite->new({dbfile => $cfg->{datapath}.'/'.$cfg->{dbfile}}); +my @k = keys(%{$jdata->{result}}); +foreach my $fn (keys(%{$jdata->{result}})){ + foreach my $j (keys(%{$jdata->{$fn}->{data}})){ + my $data = $jdata->{result}->{$fn}->{$j}; + #print Dumper($user); + if ($fn eq "getusers"){ + my $sql = "REPLACE INTO staff (id,prename,surname,isdisabled,isdeleted) VALUES (".$db->value($data->{id}).",".$db->value($data->{prename}).",".$db->value($data->{surname}).",".(($data->{istimetrackenabled} eq "1")?'null':"'1'").",".$db->value($data->{isdeleted}).");"; + print $sql."\n"; + $db->exec($sql); + } elsif ($fn eq "getpotdata"){ + my $sql = "REPLACE INTO staffworktimes (id,id_staff,starttime1,endtime1,starttime2,endtime2) VALUES (".$db->value($data->{id}).",".$db->value($data->{id_staff}).",".$db->value($data->{timestart1}).",".$db->value($data->{timeend1}).",".$db->value($data->{timestart2}).",".$db->value($data->{timeend2}).");"; + print $sql."\n"; + $db->exec($sql); + } + + } +} + +#unlink($datafile); + + +sub readconfig(){ + my $retcfg = (); + open(CFG,$cfgfile); + while (my $l = ){ + chomp($l); + $l =~ s/^\s+//; + $l =~ s/\s+$//; + if (($l eq "") || ($l =~ /^#/) || ($l =~ /^;/)){next;} + my ($k,$v) = $l =~ m/(\w+)\s*=\s*(.*)$/; + $retcfg->{lc($k)} = $v; + } + close(CFG); + return $retcfg; +} + +sub readdatafile(){ + my $strdata = ""; + open(CFG,$datafile); + while (my $l = ){ + chomp($l); + $strdata .= $l; + } + close(CFG); + return JSON::PP::decode_json($strdata); +} \ No newline at end of file diff --git a/pointeuse/install/.hourtrax/hourtrax.json b/pointeuse/install/.hourtrax/hourtrax.json new file mode 100644 index 00000000..35a0710f --- /dev/null +++ b/pointeuse/install/.hourtrax/hourtrax.json @@ -0,0 +1,8 @@ +{ + "type":"fingerprint", + "db": "hourtrax.sqlite", + "timeout":30, + "flextime":-1, + "binpath":"", + "pincode":"12345678" +} \ No newline at end of file diff --git a/pointeuse/install/.hourtrax/hourtrax.sqlite b/pointeuse/install/.hourtrax/hourtrax.sqlite new file mode 100644 index 00000000..e69de29b diff --git a/pointeuse/install/.hourtrax/ht.sql b/pointeuse/install/.hourtrax/ht.sql new file mode 100644 index 00000000..61ef17af --- /dev/null +++ b/pointeuse/install/.hourtrax/ht.sql @@ -0,0 +1,71 @@ +CREATE TABLE staff ( + id TEXT NOT NULL, + staffnumber TEXT, + prename TEXT, + surname TEXT, + pin TEXT, + rfid TEXT, + isblocked BOOLEAN, + isdisabled BOOLEAN, + isdeleted BOOLEAN, + fixtime integer, + lang text, + timetrackers text, + restriction text, + modified DATETIME DEFAULT (datetime('now','localtime')), + created DATETIME DEFAULT (datetime('now','localtime')), + PRIMARY KEY (id) +); +CREATE TABLE timetracks ( + id text not null, + id_staff TEXT, + daydate date, + stamp_in DATETIME, + stamp_out DATETIME, + tracktype TEXT, + modified DATETIME DEFAULT (datetime('now','localtime')), + created DATETIME DEFAULT (datetime('now','localtime')), + primary key (id) +); +CREATE TABLE fingerprints ( + id_staff TEXT, + fingerhash TEXT, + fingertype integer, + modified DATETIME DEFAULT (datetime('now','localtime')), + created DATETIME DEFAULT (datetime('now','localtime')), + primary key (id_staff,fingerhash) +); +CREATE TABLE badges ( + id text, + id_staff text, + type text, + primary key (id) +); +CREATE TABLE staffworktimes ( + id TEXT not null, + id_staff TEXT, + daydate date, + starttime1 TEXT, + endtime1 TEXT, + starttime2 TEXT, + endtime2 TEXT, + modified DATETIME DEFAULT (datetime('now','localtime')), + created DATETIME DEFAULT (datetime('now','localtime')), + primary key (id) +); +CREATE TRIGGER trg_staff_upd UPDATE ON staff + BEGIN + UPDATE staff SET modified=datetime('now','localtime') WHERE id = NEW.id; + END; +CREATE TRIGGER trg_timetracks_upd UPDATE ON staff + BEGIN + UPDATE timetracks SET modified=datetime('now','localtime') WHERE id = NEW.id; + END; +CREATE TRIGGER trg_staffworktimes_upd UPDATE ON staff + BEGIN + UPDATE staffworktimes SET modified=datetime('now','localtime') WHERE id = NEW.id; + END; + CREATE TRIGGER trg_fingerprints_upd UPDATE ON staff + BEGIN + UPDATE staffworktimes SET modified=datetime('now','localtime') WHERE id_staff = NEW.id_staff and fingertype= NEW.fingertype; + END; diff --git a/pointeuse/install/.hourtrax/sync.conf b/pointeuse/install/.hourtrax/sync.conf new file mode 100644 index 00000000..397be2c5 --- /dev/null +++ b/pointeuse/install/.hourtrax/sync.conf @@ -0,0 +1,7 @@ +#HOSTS=(172.16.10.198 172.16.10.194 172.16.10.202) +HOSTS= +SYNCSERVER="172.16.10.190" +SCHEMA="demo50" +RUSER="pot" +RPWD= +RPORT="3587" diff --git a/pointeuse/install/bin/clearfingerprint.sh b/pointeuse/install/bin/clearfingerprint.sh new file mode 100644 index 00000000..ffdcd777 --- /dev/null +++ b/pointeuse/install/bin/clearfingerprint.sh @@ -0,0 +1,19 @@ +#!/bin/bash +CALLDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +if [[ $# -eq 0 ]] +then + echo "No args!" + exit 0 +fi +IDSTAFF=$1 +db=${HOME}"/.hourtrax/hourtrax.sqlite" +HASHDATA=(`sqlite3 $db "select fingerhash from fingerprints where id_staff='"${IDSTAFF}"';"`) +#echo ${HASHDATA} +sqlite3 $db "delete from fingerprints where id_staff='"${IDSTAFF}"';" +for h in "${!HASHDATA[@]}" + do + #echo ${HASHDATA[$h]} + TEST=(`echo "${HASHDATA[$h]}" | tr -d [] | awk -F"," '{ print $1" "$2}'`) + #echo "${CALLDIR}/fp.py deleteuser 30 ${TEST[0]} ${TEST[1]}" + ${CALLDIR}/fp.py deleteuser 30 ${TEST[0]} ${TEST[1]} +done \ No newline at end of file diff --git a/pointeuse/install/bin/electron/electron-v9.3.2-linux-armv7l.zip b/pointeuse/install/bin/electron/electron-v9.3.2-linux-armv7l.zip new file mode 100644 index 00000000..e99f79f8 Binary files /dev/null and b/pointeuse/install/bin/electron/electron-v9.3.2-linux-armv7l.zip differ diff --git a/pointeuse/install/bin/electron/resources/app/css/fonts/appicons.svg b/pointeuse/install/bin/electron/resources/app/css/fonts/appicons.svg new file mode 100644 index 00000000..b8fcc207 --- /dev/null +++ b/pointeuse/install/bin/electron/resources/app/css/fonts/appicons.svg @@ -0,0 +1,106 @@ + + + +Generated by IcoMoon + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/pointeuse/install/bin/electron/resources/app/css/fonts/appicons.ttf b/pointeuse/install/bin/electron/resources/app/css/fonts/appicons.ttf new file mode 100644 index 00000000..6d6ee677 Binary files /dev/null and b/pointeuse/install/bin/electron/resources/app/css/fonts/appicons.ttf differ diff --git a/pointeuse/install/bin/electron/resources/app/css/fonts/appicons.woff b/pointeuse/install/bin/electron/resources/app/css/fonts/appicons.woff new file mode 100644 index 00000000..1f5af252 Binary files /dev/null and b/pointeuse/install/bin/electron/resources/app/css/fonts/appicons.woff differ diff --git a/pointeuse/install/bin/electron/resources/app/css/icons.css b/pointeuse/install/bin/electron/resources/app/css/icons.css new file mode 100644 index 00000000..ea428d77 --- /dev/null +++ b/pointeuse/install/bin/electron/resources/app/css/icons.css @@ -0,0 +1,314 @@ +@font-face { + font-family: 'appicons'; + src: + url('fonts/appicons.ttf?1lkxku') format('truetype'), + url('fonts/appicons.woff?1lkxku') format('woff'), + url('fonts/appicons.svg?1lkxku#appicons') format('svg'); + font-weight: normal; + font-style: normal; + font-display: block; +} + +[class^="icon-"], [class*=" icon-"] { + /* use !important to prevent issues with browser extensions that change fonts */ + font-family: 'appicons' !important; + speak: never; + font-style: normal; + font-weight: normal; + font-variant: normal; + text-transform: none; + line-height: 1; + + /* Better Font Rendering =========== */ + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +.icon-hwbagde:before { + content: "\e939"; +} +.icon-rotate_screen:before { + content: "\e938"; +} +.icon-reboot:before { + content: "\e900"; +} +.icon-shutdown:before { + content: "\e901"; +} +.icon-pause:before { + content: "\e902"; +} +.icon-calendar:before { + content: "\e903"; +} +.icon-clocktime:before { + content: "\e904"; +} +.icon-cube:before { + content: "\e905"; +} +.icon-cubelight:before { + content: "\e906"; +} +.icon-dashboard:before { + content: "\e907"; +} +.icon-history:before { + content: "\e908"; +} +.icon-shop:before { + content: "\e909"; +} +.icon-template:before { + content: "\e90a"; +} +.icon-remove:before { + content: "\e90b"; +} +.icon-access:before { + content: "\e90c"; +} +.icon-address:before { + content: "\e90d"; +} +.icon-apps:before { + content: "\e90e"; +} +.icon-archive:before { + content: "\e90f"; +} +.icon-calendar1:before { + content: "\e910"; +} +.icon-code:before { + content: "\e911"; +} +.icon-coin:before { + content: "\e912"; +} +.icon-cube1:before { + content: "\e913"; +} +.icon-cubelight1:before { + content: "\e914"; +} +.icon-dashboard1:before { + content: "\e915"; +} +.icon-datarefresh:before { + content: "\e916"; +} +.icon-documentsave:before { + content: "\e917"; +} +.icon-documents:before { + content: "\e918"; +} +.icon-download:before { + content: "\e919"; +} +.icon-duplicate1:before { + content: "\e91a"; +} +.icon-edit:before { + content: "\e91b"; +} +.icon-excel:before { + content: "\e91c"; +} +.icon-expand:before { + content: "\e91d"; +} +.icon-file:before { + content: "\e91e"; +} +.icon-Floppy:before { + content: "\e91f"; +} +.icon-folder:before { + content: "\e920"; +} +.icon-folder_add:before { + content: "\e921"; +} +.icon-folder_delete:before { + content: "\e922"; +} +.icon-folder_find:before { + content: "\e923"; +} +.icon-globe:before { + content: "\e924"; +} +.icon-group:before { + content: "\e925"; +} +.icon-home:before { + content: "\e926"; +} +.icon-inbox:before { + content: "\e927"; +} +.icon-library:before { + content: "\e928"; +} +.icon-license:before { + content: "\e929"; +} +.icon-list:before { + content: "\e92a"; +} +.icon-log:before { + content: "\e92b"; +} +.icon-logout:before { + content: "\e92c"; +} +.icon-menu:before { + content: "\e92d"; +} +.icon-newspaper:before { + content: "\e92e"; +} +.icon-numberlist:before { + content: "\e92f"; +} +.icon-package:before { + content: "\e930"; +} +.icon-dataset:before { + content: "\e931"; +} +.icon-check:before { + content: "\e932"; +} +.icon-pay:before { + content: "\e933"; +} +.icon-pdf:before { + content: "\e934"; +} +.icon-pdfexport:before { + content: "\e935"; +} +.icon-pictures:before { + content: "\e936"; +} +.icon-plus:before { + content: "\e937"; +} +.icon-staff:before { + content: "\e943"; +} +.icon-back:before { + content: "\e944"; +} +.icon-next:before { + content: "\e945"; +} +.icon-sendemail:before { + content: "\e946"; +} +.icon-exit:before { + content: "\e947"; +} +.icon-key:before { + content: "\e948"; +} +.icon-duplicate:before { + content: "\e949"; +} +.icon-paste:before { + content: "\e94a"; +} +.icon-copy:before { + content: "\e94b"; +} +.icon-replace:before { + content: "\e94c"; +} +.icon-week:before { + content: "\e94d"; +} +.icon-baggage:before { + content: "\e94e"; +} +.icon-trash:before { + content: "\e94f"; +} +.icon-erase:before { + content: "\e950"; +} +.icon-untitled:before { + content: "\e951"; +} +.icon-untitled1:before { + content: "\e952"; +} +.icon-projects:before { + content: "\e953"; +} +.icon-usertime:before { + content: "\e954"; +} +.icon-finger1:before { + content: "\e955"; +} +.icon-finger2:before { + content: "\e956"; +} +.icon-finger3:before { + content: "\e957"; +} +.icon-finger4:before { + content: "\e958"; +} +.icon-finger5:before { + content: "\e959"; +} +.icon-fingerprint-check:before { + content: "\e95a"; +} +.icon-fingerprint-crosshair:before { + content: "\e95b"; +} +.icon-fingerprint-remove:before { + content: "\e95c"; +} +.icon-rename:before { + content: "\e95d"; +} +.icon-fingerprint-scanning:before { + content: "\e95e"; +} +.icon-untitled2:before { + content: "\e971"; +} +.icon-fingerprint-search:before { + content: "\e972"; +} +.icon-fingerprint-simple:before { + content: "\e973"; +} +.icon-settings:before { + content: "\e974"; +} +.icon-Save:before { + content: "\e975"; +} +.icon-squares:before { + content: "\e976"; +} +.icon-table:before { + content: "\e977"; +} +.icon-upload:before { + content: "\e978"; +} +.icon-user:before { + content: "\e979"; +} +.icon-entry:before { + content: "\e97a"; +} diff --git a/pointeuse/install/bin/electron/resources/app/css/theme.css b/pointeuse/install/bin/electron/resources/app/css/theme.css new file mode 100644 index 00000000..3b34ae9a --- /dev/null +++ b/pointeuse/install/bin/electron/resources/app/css/theme.css @@ -0,0 +1,992 @@ +/* W3PRO.CSS 4.13 June 2019 by Jan Egil and Borge Refsnes */ +html{box-sizing:border-box}*,*:before,*:after{box-sizing:inherit} +/* Extract from normalize.css by Nicolas Gallagher and Jonathan Neal git.io/normalize */ +html{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0} +html,body {-webkit-user-select: none;-ms-user-select: none;user-select: none;-moz-user-select:none;} +article,aside,details,figcaption,figure,footer,header,main,menu,nav,section{display:block}summary{display:list-item} +audio,canvas,progress,video{display:inline-block}progress{vertical-align:baseline} +audio:not([controls]){display:none;height:0}[hidden],template{display:none} +a{background-color:transparent}a:active,a:hover{outline-width:0} +abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted} +b,strong{font-weight:bolder}dfn{font-style:italic}mark{background:#ff0;color:#000} +small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline} +sub{bottom:-0.25em}sup{top:-0.5em}figure{margin:1em 40px}img{border-style:none} +code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}hr{box-sizing:content-box;height:0;overflow:visible} +button,input,select,textarea,optgroup{font:inherit;margin:0}optgroup{font-weight:bold} +button,input{overflow:visible}button,select{text-transform:none} +button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button} +button::-moz-focus-inner,[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner{border-style:none;padding:0} +button:-moz-focusring,[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring{outline:1px dotted ButtonText} +fieldset{border:1px solid #c0c0c0;margin:0 2px;padding:.35em .625em .75em} +legend{color:inherit;display:table;max-width:100%;padding:0;white-space:normal}textarea{overflow:auto} +[type=checkbox],[type=radio]{padding:0} +[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto} +[type=search]{-webkit-appearance:textfield;outline-offset:-2px} +[type=search]::-webkit-search-decoration{-webkit-appearance:none} +::-webkit-file-upload-button{-webkit-appearance:button;font:inherit} +/* End extract */ +/* html,body { + background-color: #52638e; +} */ +html,body{font-family:Verdana,sans-serif;font-size:10pt;line-height:1.5}html{overflow-x:hidden} +h1{font-size:36px}h2{font-size:30px}h3{font-size:24px}h4{font-size:20px}h5{font-size:18px}h6{font-size:16px}.serif{font-family:serif} +h1,h2,h3,h4,h5,h6{font-family:"Segoe UI",Arial,sans-serif;font-weight:400;margin: 0}.wide{letter-spacing:4px} +hr{border:0;border-top:1px solid #eee;margin:20px 0} +.img{max-width:100%;height:auto; vertical-align:middle}a{color:inherit} +.table,.table-all{border-collapse:collapse;border-spacing:0;width:100%;display:table}.table-all{border:1px solid #ccc} +.bordered tr,.table-all tr{border-bottom:1px solid #ddd}.striped tbody tr:nth-child(even){background-color:#f1f1f1} +.table-all tr:nth-child(odd){background-color:#fff}.table-all tr:nth-child(even){background-color:#f1f1f1} +.hoverable tbody tr:hover,.ul.hoverable li:hover{background-color:#ccc}.centered tr th,.centered tr td{text-align:center} +.table td,.table th,.table-all td,.table-all th{padding:8px 8px;display:table-cell;text-align:left;vertical-align:top} +.table th:first-child,.table td:first-child,.table-all th:first-child,.table-all td:first-child{padding-left:16px} +.btn,.button{border:none;display:inline-block;padding:8px 16px;vertical-align:middle;overflow:hidden;text-decoration:none;color:inherit;background-color:inherit;text-align:center;cursor:pointer;white-space:nowrap} +/*.btn:hover{box-shadow:0 8px 16px 0 rgba(0,0,0,0.2),0 6px 20px 0 rgba(0,0,0,0.19)}*/ +.btn,.button{-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none} +.disabled,.btn:disabled,.button:disabled{cursor:not-allowed;background-color: #e6e6e6}.disabled *,:disabled *{pointer-events:none} +.btn.disabled:hover,.btn:disabled:hover{box-shadow:none} +.badge,.tag{background-color:#000;color:#fff;display:inline-block;padding-left:8px;padding-right:8px;text-align:center}.badge{border-radius:50%} +.ul{list-style-type:none;padding:0;margin:0}.ul li{padding:8px 16px;border-bottom:1px solid #ddd}.ul li:last-child{border-bottom:none} +.tooltip,.display-container{position:relative}.tooltip .text{display:none}.tooltip:hover .text{display:inline-block} +.ripple:active{opacity:0.5}.ripple{transition:opacity 0s} +.input{padding:6px;display:block;border: 1px solid #ccc;width:100%;background-color: #fff; }/*#e8f0fe*/ +.select{padding:2px 0; display:block;width:100%;border:1px solid #ccc;background-color: #fff;} +.dropdown-click,.dropdown-hover{position:relative;display:inline-block;cursor:pointer} +.dropdown-hover:hover .dropdown-content{display:block; } +.dropdown-hover:first-child,.dropdown-click:hover{background-color:#ccc;color:#000} +.dropdown-hover:hover > .button:first-child,.dropdown-click:hover > .button:first-child{background-color:#ccc;color:#000} +.dropdown-content{cursor:auto;color:#000;background-color:#fff;display:none;position:absolute;min-width:160px;margin:0;padding:0;z-index:1} +.check,.radio{width:24px;height:24px;position:relative;top:6px} +.sidebar{height:100%;width:160px;background-color:#fff;position:fixed!important;z-index:1;overflow:auto} +.bar-block .dropdown-hover,.bar-block .dropdown-click{width:100%} +.bar-block .dropdown-hover .dropdown-content,.bar-block .dropdown-click .dropdown-content{min-width:100%} +.bar-block .dropdown-hover .button,.bar-block .dropdown-click .button{width:100%;text-align:left;padding:8px 16px} +.main,#main{transition:margin-left .4s} +.modal{z-index:3;display:none;padding-top:100px;position:fixed;left:0;top:0;width:100%;height:100%;overflow:auto;background-color:rgb(0,0,0);background-color:rgba(0,0,0,0.4)} +.modal-content{margin:auto;background-color:#fff;position:relative;padding:0;outline:0;width:600px} +.bar{width:100%}.center .bar{display:inline-block;width:auto} +.bar .bar-item{padding:8px 16px;float:left;width:auto;border:none;display:block;outline:0} +.bar .dropdown-hover,.bar .dropdown-click{position:static;float:left} +.bar .button{white-space:normal} +.bar-block .bar-item{width:100%;display:block;padding:8px 16px;text-align:left;border:none;white-space:normal;float:none;outline:0} +.bar-block.center .bar-item{text-align:center}.block{display:block;width:100%} +.responsive{display:block;overflow-x:auto} +.container:after,.container:before,.datapanel:after,.datapanel:before,.row:after,.row:before,.row-padding:after,.row-padding:before, +.cell-row:before,.cell-row:after,.clear:after,.clear:before,.bar:before,.bar:after{content:"";display:table;clear:both} +.col,.half,.third,.twothird,.threequarter,.quarter,.fifth,.twofifth,.threefifth,.fourfifth{float:left;width:100%} +.col.s1{width:8.33333%}.col.s2{width:16.66666%}.col.s3{width:24.99999%}.col.s4{width:33.33333%} +.col.s5{width:41.66666%}.col.s6{width:49.99999%}.col.s7{width:58.33333%}.col.s8{width:66.66666%} +.col.s9{width:74.99999%}.col.s10{width:83.33333%}.col.s11{width:91.66666%}.col.s12{width:99.99999%} +@media (min-width:601px){.col.m1{width:8.33333%}.col.m2{width:16.66666%}.col.m3,.quarter{width:24.99999%}.col.m4,.third{width:33.33333%}.fifth{width:20%;min-width:100px} +.col.m5{width:41.66666%}.col.m6,.half{width:49.99999%}.col.m7{width:58.33333%}.col.m8,.twothird{width:66.66666%} +.col.m9,.threequarter{width:74.99999%}.col.m10{width:83.33333%}.col.m11{width:91.66666%}.col.m12{width:99.99999%}.twofifth{width:40%}.threefifth{width:60%}.fourfifth{width:80%}} +@media (min-width:993px){.col.l1{width:8.33333%}.col.l2{width:16.66666%}.col.l3{width:24.99999%}.col.l4{width:33.33333%} +.col.l5{width:41.66666%}.col.l6{width:49.99999%}.col.l7{width:58.33333%}.col.l8{width:66.66666%} +.col.l9{width:74.99999%}.col.l10{width:83.33333%}.col.l11{width:91.66666%}.col.l12{width:99.99999%}} +.rest{overflow:hidden}.stretch{margin-left:-16px;margin-right:-16px} +.content,.auto{margin-left:auto;margin-right:auto}.content{max-width:980px}.auto{max-width:1140px} +.cell-row{display:table;width:100%}.cell{display:table-cell;vertical-align: top;} +.cell-top{vertical-align:top}.cell-middle{vertical-align:middle}.cell-bottom{vertical-align:bottom} +.hide{display:none!important}.show-block,.show{display:block!important}.show-inline-block{display:inline-block!important} +@media (max-width:1205px){.auto{max-width:95%}} +@media (max-width:600px){.modal-content{margin:0 10px;width:auto!important}.modal{padding-top:30px} +.dropdown-hover.mobile .dropdown-content,.dropdown-click.mobile .dropdown-content{position:relative} +.hide-small{display:none!important}.mobile{display:block;width:100%!important}.bar-item.mobile,.dropdown-hover.mobile,.dropdown-click.mobile{text-align:center} +.dropdown-hover.mobile,.dropdown-hover.mobile .btn,.dropdown-hover.mobile .button,.dropdown-click.mobile,.dropdown-click.mobile .btn,.dropdown-click.mobile .button{width:100%}} +@media (max-width:768px){.modal-content{width:500px}.modal{padding-top:50px}} +@media (min-width:993px){.modal-content{width:900px}.hide-large{display:none!important}.sidebar.collapse{display:block!important}} +@media (max-width:992px) and (min-width:601px){.hide-medium{display:none!important}} +@media (max-width:992px){.sidebar.collapse{display:none}.main{margin-left:0!important;margin-right:0!important}.auto{max-width:100%}} +.top,.bottom{position:fixed;width:100%;z-index:1}.top{top:0}.bottom{bottom:0} +.overlay{position:fixed;display:none;width:100%;height:100%;top:0;left:0;right:0;bottom:0;background-color:rgba(0,0,0,0.5);z-index:2} +.display-topleft{position:absolute;left:0;top:0}.display-topright{position:absolute;right:0;top:0} +.display-bottomleft{position:absolute;left:0;bottom:0}.display-bottomright{position:absolute;right:0;bottom:0} +.display-middle{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%)} +.display-left{position:absolute;top:50%;left:0%;transform:translate(0%,-50%);-ms-transform:translate(-0%,-50%)} +.display-left2{position:absolute;top:50%;left:125px;transform:translate(0%,-50%);-ms-transform:translate(-0%,-50%)} +.display-right{position:absolute;top:50%;right:0%;transform:translate(0%,-50%);-ms-transform:translate(0%,-50%)} +.display-topmiddle{position:absolute;left:50%;top:0;transform:translate(-50%,0%);-ms-transform:translate(-50%,0%)} +.display-bottommiddle{position:absolute;left:50%;bottom:0;transform:translate(-50%,0%);-ms-transform:translate(-50%,0%)} +.display-container:hover .display-hover{display:block}.display-container:hover span.display-hover{display:inline-block}.display-hover{display:none} +.display-position{position:absolute} +.circle{border-radius:50%} +.round-small{border-radius:2px}.round,.round-medium{border-radius:4px}.round-large{border-radius:8px}.round-xlarge{border-radius:16px}.round-xxlarge{border-radius:32px} +.row-padding,.row-padding>.half,.row-padding>.third,.row-padding>.twothird,.row-padding>.threequarter,.row-padding>.quarter,.row-padding>.col{padding:0 8px} +.container,.datapanel{padding:0.01em 8px}.datapanel{margin-top:8px;margin-bottom:8px} +.code,.codespan{font-family:Consolas,"courier new";font-size:16px} +.code{width:auto;background-color:#fff;padding:8px 12px;border-left:4px solid #4CAF50;word-wrap:break-word} +.codespan{color:crimson;background-color:#f1f1f1;padding-left:4px;padding-right:4px;font-size:110%} +.card,.card-2{box-shadow:0 2px 5px 0 rgba(0,0,0,0.16)} +.card-4,.hover-shadow:hover{box-shadow:0 4px 10px 0 rgba(0,0,0,0.2),0 4px 20px 0 rgba(0,0,0,0.19)} +.spin{animation:spin 2s infinite linear}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(359deg)}} +.animate-fading{animation:fading 2s infinite}@keyframes fading{0%{opacity:0}50%{opacity:1}100%{opacity:0}} +.animate-opacity{animation:opac 0.8s}@keyframes opac{from{opacity:0} to{opacity:1}} +.animate-top{position:relative;animation:animatetop 1s}@keyframes animatetop{from{top:-300px;opacity:0} to{top:0;opacity:1}} +.animate-left{position:relative;animation:animateleft 0.4s}@keyframes animateleft{from{left:-300px;opacity:0} to{left:0;opacity:1}} +.animate-right{position:relative;animation:animateright 0.4s}@keyframes animateright{from{right:-300px;opacity:0} to{right:0;opacity:1}} +.animate-bottom{position:relative;animation:animatebottom 1s}@keyframes animatebottom{from{bottom:-300px;opacity:0} to{bottom:0;opacity:1}} +.animate-zoom {animation:animatezoom 0.6s}@keyframes animatezoom{from{transform:scale(0)} to{transform:scale(1)}} +.animate-input{transition:width 0.4s ease-in-out}.animate-input:focus{width:100%!important} +.opacity,.hover-opacity:hover{opacity:0.60}.opacity-off,.hover-opacity-off:hover{opacity:1} +.opacity-max{opacity:0.25}.opacity-min{opacity:0.75} +.greyscale-max,.grayscale-max,.hover-greyscale:hover,.hover-grayscale:hover{filter:grayscale(100%)} +.greyscale,.grayscale{filter:grayscale(75%)}.greyscale-min,.grayscale-min{filter:grayscale(50%)} +.sepia{filter:sepia(75%)}.sepia-max,.hover-sepia:hover{filter:sepia(100%)}.sepia-min{filter:sepia(50%)} +.tiny{font-size:10px!important}.small{font-size:12px!important}.medium{font-size:15px!important}.large{font-size:18px!important} +.xlarge{font-size:24px!important}.xxlarge{font-size:36px!important}.xxxlarge{font-size:48px!important}.jumbo{font-size:64px!important} +.left-align{text-align:left!important}.right-align{text-align:right!important}.justify{text-align:justify!important}.center{text-align:center!important} +.border-0{border:0!important}.border{border:1px solid #ccc!important} +.border-top{border-top:1px solid #ccc!important}.border-bottom{border-bottom:1px solid #ccc!important} +.border-left{border-left:1px solid #ccc!important}.border-right{border-right:1px solid #ccc!important} +.topbar{border-top:6px solid #ccc!important}.bottombar{border-bottom:6px solid #ccc!important} +.leftbar{border-left:6px solid #ccc!important}.rightbar{border-right:6px solid #ccc!important} +.section,.code{margin-top:16px!important;margin-bottom:16px!important} +.margin{margin:16px!important}.margin-top{margin-top:16px!important}.margin-bottom{margin-bottom:16px!important} +.margin-left{margin-left:16px!important}.margin-right{margin-right:16px!important} +.padding-small{padding:4px 8px!important}.padding{padding:8px 16px!important}.padding-large{padding:12px 24px!important} +.padding-16{padding-top:16px!important;padding-bottom:16px!important}.padding-24{padding-top:24px!important;padding-bottom:24px!important} +.padding-32{padding-top:32px!important;padding-bottom:32px!important}.padding-48{padding-top:48px!important;padding-bottom:48px!important} +.padding-64{padding-top:64px!important;padding-bottom:64px!important} +.left{float:left!important}.right{float:right!important} +/*.button:hover{color:#fff!important;background-color:#343434!important}*/ +.transparent,.hover-none:hover{background-color:transparent!important} +.hover-none:hover{box-shadow:none!important} +/* DEFAULT COLORS */ +.amber,.hover-amber:hover{color:#000!important;background-color:#ffc107!important} +.aqua,.hover-aqua:hover{color:#000!important;background-color:#00ffff!important} +.blue,.hover-blue:hover{color:#fff!important;background-color:#2196F3!important} +.light-blue,.hover-light-blue:hover{color:#000!important;background-color:#87CEEB!important} +.brown,.hover-brown:hover{color:#fff!important;background-color:#795548!important} +.cyan,.hover-cyan:hover{color:#000!important;background-color:#00bcd4!important} +.blue-grey,.hover-blue-grey:hover{color:#fff!important;background-color:#607d8b!important} +.green,.hover-green:hover{color:#fff!important;background-color:#4CAF50!important} +.light-green,.hover-light-green:hover{color:#000!important;background-color:#8bc34a!important} +.indigo,.hover-indigo:hover{color:#fff!important;background-color:#3f51b5!important} +.khaki,.hover-khaki:hover{color:#000!important;background-color:#f0e68c!important} +.lime,.hover-lime:hover{color:#000!important;background-color:#cddc39!important} +.orange,.hover-orange:hover{color:#000!important;background-color:#ff9800!important} +.deep-orange,.hover-deep-orange:hover{color:#fff!important;background-color:#ff5722!important} +.pink,.hover-pink:hover{color:#fff!important;background-color:#e91e63!important} +.purple,.hover-purple:hover{color:#fff!important;background-color:#9c27b0!important} +.deep-purple,.hover-deep-purple:hover{color:#fff!important;background-color:#673ab7!important} +.red,.hover-red:hover{color:#fff!important;background-color:#f44336!important} +.sand,.hover-sand:hover{color:#000!important;background-color:#fdf5e6!important} +.teal,.hover-teal:hover{color:#fff!important;background-color:#009688!important} +.yellow,.hover-yellow:hover{color:#000!important;background-color:#ffeb3b!important} +.white,.hover-white:hover{color:#000!important;background-color:#fff!important} +.black,.hover-black:hover{color:#fff!important;background-color:#000!important} +.grey,.hover-grey:hover{color:#000!important;background-color:#9e9e9e!important} +.light-grey,.hover-light-grey:hover{color:#000!important;background-color:#f1f1f1!important} +.dark-grey,.hover-dark-grey:hover{color:#fff!important;background-color:#616161!important} +.pale-red,.hover-pale-red:hover{color:#000!important;background-color:#ffe7e7!important}.pale-green,.hover-pale-green:hover{color:#000!important;background-color:#e7ffe7!important} +.pale-yellow,.hover-pale-yellow:hover{color:#000!important;background-color:#ffffd7!important}.pale-blue,.hover-pale-blue:hover{color:#000!important;background-color:#e7ffff!important} +.text-align-right { text-align: right;} +.text-amber,.hover-text-amber:hover{color:#ffc107!important} +.text-aqua,.hover-text-aqua:hover{color:#00ffff!important} +.text-blue,.hover-text-blue:hover{color:#2196F3!important} +.text-light-blue,.hover-text-light-blue:hover{color:#87CEEB!important} +.text-brown,.hover-text-brown:hover{color:#795548!important} +.text-cyan,.hover-text-cyan:hover{color:#00bcd4!important} +.text-blue-grey,.hover-text-blue-grey:hover{color:#607d8b!important} +.text-green,.hover-text-green:hover{color:#4CAF50!important} +.text-light-green,.hover-text-light-green:hover{color:#8bc34a!important} +.text-indigo,.hover-text-indigo:hover{color:#3f51b5!important} +.text-khaki,.hover-text-khaki:hover{color:#b4aa50!important} +.text-lime,.hover-text-lime:hover{color:#cddc39!important} +.text-orange,.hover-text-orange:hover{color:#ff9800!important} +.text-deep-orange,.hover-text-deep-orange:hover{color:#ff5722!important} +.text-pink,.hover-text-pink:hover{color:#e91e63!important} +.text-purple,.hover-text-purple:hover{color:#9c27b0!important} +.text-deep-purple,.hover-text-deep-purple:hover{color:#673ab7!important} +.text-red,.hover-text-red:hover{color:#f44336!important} +.text-sand,.hover-text-sand:hover{color:#fdf5e6!important} +.text-teal,.hover-text-teal:hover{color:#009688!important} +.text-yellow,.hover-text-yellow:hover{color:#d2be0e!important} +.text-white,.hover-text-white:hover{color:#fff!important} +.text-black,.hover-text-black:hover{color:#000!important} +.text-grey,.hover-text-grey:hover{color:#757575!important} +.text-light-grey,.hover-text-light-grey:hover{color:#f1f1f1!important} +.text-dark-grey,.hover-text-dark-grey:hover{color:#3a3a3a!important} +.border-amber,.hover-border-amber:hover{border-color:#ffc107!important} +.border-aqua,.hover-border-aqua:hover{border-color:#00ffff!important} +.border-blue,.hover-border-blue:hover{border-color:#2196F3!important} +.border-light-blue,.hover-border-light-blue:hover{border-color:#87CEEB!important} +.border-brown,.hover-border-brown:hover{border-color:#795548!important} +.border-cyan,.hover-border-cyan:hover{border-color:#00bcd4!important} +.border-blue-grey,.hover-blue-grey:hover{border-color:#607d8b!important} +.border-green,.hover-border-green:hover{border-color:#4CAF50!important} +.border-light-green,.hover-border-light-green:hover{border-color:#8bc34a!important} +.border-indigo,.hover-border-indigo:hover{border-color:#3f51b5!important} +.border-khaki,.hover-border-khaki:hover{border-color:#f0e68c!important} +.border-lime,.hover-border-lime:hover{border-color:#cddc39!important} +.border-orange,.hover-border-orange:hover{border-color:#ff9800!important} +.border-deep-orange,.hover-border-deep-orange:hover{border-color:#ff5722!important} +.border-pink,.hover-border-pink:hover{border-color:#e91e63!important} +.border-purple,.hover-border-purple:hover{border-color:#9c27b0!important} +.border-deep-purple,.hover-border-deep-purple:hover{border-color:#673ab7!important} +.border-red,.hover-border-red:hover{border-color:#f44336!important} +.border-sand,.hover-border-sand:hover{border-color:#fdf5e6!important} +.border-teal,.hover-border-teal:hover{border-color:#009688!important} +.border-yellow,.hover-border-yellow:hover{border-color:#ffeb3b!important} +.border-white,.hover-border-white:hover{border-color:#fff!important} +.border-black,.hover-border-black:hover{border-color:#000!important} +.border-grey,.hover-border-grey:hover{border-color:#9e9e9e!important} +.border-light-grey,.hover-border-light-grey:hover{border-color:#f1f1f1!important} +.border-dark-grey,.hover-border-dark-grey:hover{border-color:#616161!important} +.border-pale-red,.hover-border-pale-red:hover{border-color:#ffe7e7!important}.border-pale-green,.hover-border-pale-green:hover{border-color:#e7ffe7!important} +.border-pale-yellow,.hover-border-pale-yellow:hover{border-color:#ffffd7!important}.border-pale-blue,.hover-border-pale-blue:hover{border-color:#e7ffff!important} +/* DEFAULT THEME */ +.theme-l5 {color:#000 !important; background-color:#f6f8fc !important} +.theme-l4 {color:#000 !important; background-color:#e1e9f6 !important} +.theme-l3 {color:#000 !important; background-color:#c3d3ed !important} +.theme-l2 {color:#000 !important; background-color:#a5bee4 !important} +.theme-l1 {color:#fff !important; background-color:#88a8db !important} +.theme-d1 {color:#fff !important; background-color:#5180cb !important} +.theme-d2 {color:#fff !important; background-color:#3a6fc3 !important} +.theme-d3 {color:#fff !important; background-color:#3361aa !important} +.theme-d4 {color:#fff !important; background-color:#2c5392 !important} +.theme-d5 {color:#fff !important; background-color:#24457a !important} + +.theme-light {color:#000 !important; background-color:#f6f8fc !important} +.theme-dark {color:#fff !important; background-color:#24457a !important} +.theme-action {color:#fff !important; background-color:#24457a !important} + +.theme {color:#fff !important; background-color:#6a92d3 !important} +.text-theme {color:#6a92d3 !important} +.border-theme {border-color:#6a92d3 !important} + +.hover-theme:hover {color:#fff !important; background-color:#6a92d3 !important} +.hover-text-theme:hover {color:#6a92d3 !important} +.hover-border-theme:hover {border-color:#6a92d3 !important} + +/* .label { color: #000; font-size: 8pt;} */ +/* #main {margin-left: 210px;} */ +/* @media (max-width:768px){ + #sidebar { display: none;} + #main { margin-left: 0px;} +} */ + +.info-panel { + padding: 3px; + color: #ff4500; + border: 1px solid #ff4500; + background-color: #f89774; +} + +.error-panel { + padding: 3px; + color: #ff0000; + border: 1px solid #ff0000; + background-color: #fcb2b2; +} + +.table { + table-layout: fixed; +} + +.text-line-through { text-decoration: line-through; } + +#snackbar { + visibility: hidden; + min-width: 250px; + margin-left: -125px; + background-color: #333; + color: #fff; + text-align: center; + + padding: 16px; + position: fixed; + z-index: 1; + left: 50%; + bottom: 30px; + font-size: 17px; +} + +#snackbar.show { + visibility: visible; + -webkit-animation: fadein 0.5s, fadeout 0.5s 2.5s; + animation: fadein 0.5s, fadeout 0.5s 2.5s; +} + +#timer { + /* border: 1px solid red; */ + display: block; + position: absolute; + width: 60px; + height: 60px; + top: 0px; + left: calc(50vw - 30px); + z-index: 50; + display: none; +} + +@-webkit-keyframes fadein { + from {bottom: 0; opacity: 0;} + to {bottom: 30px; opacity: 1;} +} + +@keyframes fadein { + from {bottom: 0; opacity: 0;} + to {bottom: 30px; opacity: 1;} +} + +@-webkit-keyframes fadeout { + from {bottom: 30px; opacity: 1;} + to {bottom: 0; opacity: 0;} +} + +@keyframes fadeout { + from {bottom: 30px; opacity: 1;} + to {bottom: 0; opacity: 0;} +} + +.tabulator-header-filter > input { + background-color: #fff; + border: 1px solid #ccc; + font-weight: normal; +} + +.readonly { + pointer-events:none; + color: #000!important; + background-color: #d3d3d3!important; +} + + + +.right-side-bg { + background: url("../img/bg1.jpg"); + background-size: cover; + min-height: 100vh; +} + + + + +/* .mceContentBody { + background: #fff; + color:#000; +} */ + +/* .tabulator-row-even { + background-color: #757575; +} */ + + +button +{ + background-color: #f4f4f4; + border: 1pt solid #cccccc; + font-size: 10pt; + color: #000; + line-height: 1line; + text-align: center; +} +button:hover +{ + background-color: #343434; +} +button:pressed +{ + background-color: #343434; +} +button:focus +{ + background-color: #343434; +} + + + + +header +{ + background-color: #fff; + box-sizing: border-box; +} + + +.actionbtn { + background-color: #293146; + color: #fff; +} + +::-webkit-input-placeholder +{ + color: rgba(60.3922%,60.3922%,60.3922%,1); +} + + +textarea +{ + background-color: #fff; + border-top-color: rgba(80%,80%,80%,1); + border-right-color: rgba(80%,80%,80%,1); + border-bottom-color: rgba(80%,80%,80%,1); + border-left-color: rgba(80%,80%,80%,1); + border-top-style: solid; + border-right-style: solid; + border-bottom-style: solid; + border-left-style: solid; + border-top-width: 1pt; + border-right-width: 1pt; + border-bottom-width: 1pt; + border-left-width: 1pt; + font-size: 11pt; + color: #000; + line-height: 1line; + text-align: left; + /* margin-top: 0.88em; + margin-right: 0.75em; + margin-bottom: 0.63em; + margin-left: 0.75em; + top: 0pt; + right: 30pt; + bottom: 0pt; + left: 0pt; + position: absolute; + box-sizing: border-box; */ +} +textarea:focus +{ + border-top-color: rgba(0%,43.9216%,81.1765%,1); + border-right-color: rgba(0%,43.9216%,81.1765%,1); + border-bottom-color: rgba(0%,43.9216%,81.1765%,1); + border-left-color: rgba(0%,43.9216%,81.1765%,1); +} +textarea:placeholder +{ + color: rgba(80%,80%,80%,1); +} +/* textarea .text +{ + +} */ +textarea .scrollbar_track +{ + width: 30pt; + top: 0pt; + right: 0pt; + bottom: 0pt; + position: absolute; + box-sizing: border-box; +} + + +footer +{ + background-color: #fff; + box-sizing: border-box; +} + + +/* div.group_container +{ + background-color: #e3e3e3; + border-top-color: rgba(80%,80%,80%,1); + border-right-color: rgba(80%,80%,80%,1); + border-bottom-color: rgba(80%,80%,80%,1); + border-left-color: rgba(80%,80%,80%,1); + border-top-style: solid; + border-right-style: solid; + border-bottom-style: solid; + border-left-style: solid; + border-top-width: 1pt; + border-right-width: 1pt; + border-bottom-width: 1pt; + border-left-width: 1pt; + padding-top: 4px; + padding-bottom: 8px; +} */ + +/* Custom Styles */ +/* .ListView_Default +{ + + background-color: rgba(0%,0%,0%,0); + border-top-style: none; + border-right-style: none; + border-bottom-style: none; + border-left-style: none; + + color: #000; + text-align: left; + margin-top: 2pt; + margin-right: 2pt; + margin-bottom: 2pt; + margin-left: 2pt; +} + */ + +/* button.btnNavigation +{ + + background-color: rgba(0%,0%,0%,0); + + font-family: -fm-font-family(Arial,Arial-BoldMT); + font-weight: bold; + font-size: 10pt; + color: #fff; + padding-top: 0pt; + padding-right: 0pt; + padding-bottom: 0pt; + padding-left: 0pt; +} */ + +div.PageListHeader +{ + border-top-color: rgba(80%,80%,80%,1); + border-right-color: rgba(80%,80%,80%,1); + border-bottom-color: rgba(80%,80%,80%,1); + border-left-color: rgba(80%,80%,80%,1); + border-top-style: solid; + border-right-style: solid; + border-bottom-style: solid; + border-left-style: solid; + border-top-width: 1pt; + border-right-width: 1pt; + border-bottom-width: 1pt; + border-left-width: 1pt; + color: #fff; + -fm-text-vertical-align: center; +} +div.PageListHeader .inner_border +{ + padding-top: 5pt; + padding-right: 5pt; + padding-bottom: 5pt; + padding-left: 5pt; +} + +.moduletoolbar +{ + background-color: #293146; + color: #fff; +} + +div.BodySectionHeader +{ + font-family: -fm-font-family(Arial,Arial-BoldMT); + font-weight: bold; +} + + +div.PageHeadTitle +{ + font-size: 18pt; + color: #fff; +} + +div.SubHeadTitle +{ + font-size: 13pt; + color: #fff; +} + +div.SectionHeader +{ + + background-color: rgba(22.3529%,26.6667%,38.4314%,1); + +} + +button.toolbarbtn +{ + border: 0.5px solid #c6c6c6; + background-color: rgba(0%,0%,0%,0); + color: #fff; +} +/*button.toolbarbtn:hover +{ + + background-color: #343434; + color: #fff; +}*/ +button.toolbarbtn:pressed +{ + + background-color: rgba(20.3922%,20.3922%,20.3922%,1); + color: #fff; +} +button.toolbarbtn:focus +{ + border-top-color: rgba(80%,80%,80%,1); + border-right-color: rgba(80%,80%,80%,1); + border-bottom-color: rgba(80%,80%,80%,1); + border-left-color: rgba(80%,80%,80%,1); +} + + +a.toolbarbtn +{ + border: 0.5px solid #c6c6c6; + background-color: rgba(0%,0%,0%,0); + color: #fff; + text-align: center; + text-decoration: unset; +} +/*a.toolbarbtn:hover +{ + + background-color: rgba(20.3922%,20.3922%,20.3922%,1); + color: #fff; +}*/ +a.toolbarbtn:pressed +{ + background-color: rgba(20.3922%,20.3922%,20.3922%,1); + color: #fff; +} +a.toolbarbtn:focus +{ + border-top-color: rgba(80%,80%,80%,1); + border-right-color: rgba(80%,80%,80%,1); + border-bottom-color: rgba(80%,80%,80%,1); + border-left-color: rgba(80%,80%,80%,1); +} + +button.bodybtn +{ + font-size: 14px; + padding: 10px 10px; + margin: 10px 10px; + border: 0.5px solid #aaaaaa; + background-color: #c6c6c6; + color: #000; + border-radius: 3px; +} +/*button.bodybtn:hover +{ + + background-color: rgba(20.3922%,20.3922%,20.3922%,1); + color: #fff; +}*/ +button.bodybtn:pressed +{ + + background-color: rgba(20.3922%,20.3922%,20.3922%,1); + color: #fff; +} +button.bodybtn:focus +{ + border-top-color: rgba(80%,80%,80%,1); + border-right-color: rgba(80%,80%,80%,1); + border-bottom-color: rgba(80%,80%,80%,1); + border-left-color: rgba(80%,80%,80%,1); +} + + +a.bodybtn +{ + border: 0.5px solid #c6c6c6; + + background-color: rgba(0%,0%,0%,0); + + color: #000; + text-align: center; + text-decoration: unset; +} +/*a.bodybtn:hover +{ + + background-color: rgba(20.3922%,20.3922%,20.3922%,1); + color: #fff; +}*/ +a.bodybtn:pressed +{ + background-color: rgba(20.3922%,20.3922%,20.3922%,1); + color: #fff; +} +a.bodybtn:focus +{ + border-top-color: rgba(80%,80%,80%,1); + border-right-color: rgba(80%,80%,80%,1); + border-bottom-color: rgba(80%,80%,80%,1); + border-left-color: rgba(80%,80%,80%,1); +} + + +div.toolbar +{ + + background-color: rgba(32.1569%,38.8235%,55.6863%,1); + +} + +div.sectiontoolbar +{ + margin-top: 8px; + margin-bottom: 8px; + background-color: rgb(97, 98, 100); + +} + + + + +::-webkit-scrollbar { +-webkit-appearance: none; +width: 10px; +} + +::-webkit-scrollbar-track { + background-color: rgba(80%, 80%, 80%, .5); +} + +::-webkit-scrollbar-thumb { +border-radius: 0px; +background-color: rgba(0, 0, 0, .5); +-webkit-box-shadow: 0 0 1px rgba(255, 255, 255, .5); +} + +div.portaltextheader { + padding: 2px; + border: 1px solid white; +} + + + + + +select { + /* -webkit-appearance: none; */ + display: block; + color: #000; + line-height: 1line; + text-align: left; + padding: 3.5px; + width: 100%; + max-width: 100%; + box-sizing: border-box; + margin: 0; + border: 1px solid #cccccc; + /* box-shadow: 0 1px 0 1px rgba(0,0,0,.04); */ + border-radius: 0px; + font-weight: normal; + font-size: 11pt; + background-color: #fff; + /* background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23000%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E'), + linear-gradient(to bottom, #fff 0%,#fff 100%); + background-repeat: no-repeat, repeat; + background-position: right .7em top 50%, 0 0; + background-size: .65em auto, 100%; */ +} + + +/* option { + appearance: none; + border: 1px solid 0070cf; + padding: 2px; +} */ +select:focus +{ + border: 1px solid #3a6fc3; + border-radius: unset; +} + + +::-webkit-select-placeholder +{ + color: #9a9a9a; +} + + + + + + + +/* input[type=date]::-webkit-inner-spin-button, +input[type=date]::-webkit-outer-spin-button { + display: none; +} */ + +:focus { + outline: unset; +} + +input +{ + background-color: #ffffff; + border: 1px solid #cccccc; + font-weight: normal; + font-size: 11pt; + color: #000000; + line-height: 1line; + text-align: left; + width:100%; + padding:2px; + display:block; + border-radius: unset; +} +/* input:focus +{ + border: #0070cf; +} */ + +input:focus { + border: 1px solid #3a6fc3; + border-radius: unset; +} + +input[readonly=true]{ + color: #000!important; + background-color: #d3d3d3!important; +} + +input[type=number]::-webkit-inner-spin-button, +input[type=number]::-webkit-outer-spin-button { + -webkit-appearance: none; + margin: 0; +} +/* input[type=checkbox]{ + appearance: none; + display:inline-block; + font-size: 24px!important; + border: 1px solid green; +} */ + +input[class=currency] { + padding: 2px; + padding-right: 12px; + text-align: right; + background-image: url('data:image/svg+xml,%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20width=%22225%22%20height=%22300%22%3E%3Cpath%20stroke=%22none%22%20d=%22m%20224.99996,16.22698%20-8.11342,36.41161%20q%20-24.14255,-19.78892%20-54.61741,-19.78892%20-41.3588,0%20-65.00658,23.74671%20-23.647774,23.7467%20-28.397115,53.23215%20l%20134.960355,0%20-5.14505,26.71508%20-132.981532,0%20-0.395848,7.71771%200.395848,18.20566%20127.242642,0%20-5.14505,26.71508%20-117.941954,0%20q%207.519719,40.17154%2032.552754,59.06997%2025.03303,18.89844%2056.49745,18.89844%2037.20302,0%2057.98149,-19.59107%20l%200,40.9631%20Q%20192.34828,300%20162.26913,300%2053.034301,300%2030.474864,189.18206%20l%20-30.474864,0%205.738751,-26.71508%2020.580475,0%20q%20-0.395708,-4.74934%20-0.395708,-17.80995%20l%200,-8.11342%20-25.923518,0%205.738751,-26.71508%2023.152999,0%20Q%2039.181988,55.21112%2076.583149,27.60556%20113.98417,0%20163.06069,0%20199.868,0%20224.99996,16.22698%20z%22%20/%3E%0A%3C/svg%3E'), + linear-gradient(to bottom, #fff 0%,#fff 100%); + background-repeat: no-repeat, repeat; + background-position: right 2px top 50%, 0 0; + background-size: 9px auto, 100%; +} + +input[class=currency]:read-only { + background-image: url('data:image/svg+xml,%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20width=%22225%22%20height=%22300%22%3E%3Cpath%20stroke=%22none%22%20d=%22m%20224.99996,16.22698%20-8.11342,36.41161%20q%20-24.14255,-19.78892%20-54.61741,-19.78892%20-41.3588,0%20-65.00658,23.74671%20-23.647774,23.7467%20-28.397115,53.23215%20l%20134.960355,0%20-5.14505,26.71508%20-132.981532,0%20-0.395848,7.71771%200.395848,18.20566%20127.242642,0%20-5.14505,26.71508%20-117.941954,0%20q%207.519719,40.17154%2032.552754,59.06997%2025.03303,18.89844%2056.49745,18.89844%2037.20302,0%2057.98149,-19.59107%20l%200,40.9631%20Q%20192.34828,300%20162.26913,300%2053.034301,300%2030.474864,189.18206%20l%20-30.474864,0%205.738751,-26.71508%2020.580475,0%20q%20-0.395708,-4.74934%20-0.395708,-17.80995%20l%200,-8.11342%20-25.923518,0%205.738751,-26.71508%2023.152999,0%20Q%2039.181988,55.21112%2076.583149,27.60556%20113.98417,0%20163.06069,0%20199.868,0%20224.99996,16.22698%20z%22%20/%3E%0A%3C/svg%3E'), + linear-gradient(to bottom, #d3d3d3 0%,#d3d3d3 100%); +} + +input[class=percent] { + padding: 2px; + padding-right: 12px; + text-align: right; + background-image: url('data:image/svg+xml,%3Csvg%20xmlns=%22http://www.w3.org/2000/svg%22%20width=%22256%22%20height=%22232%22%20version=%221.0%22%3E%3Cg%20transform=%22translate(-112.3674,-128.3649)%22%3E%3Cpath%20style=%22fill:black;fill-opacity:1;stroke:none%22%20d=%22M%20317.1674,257.53698%20C%20308.53463,257.53708%20301.73774,261.20839%20296.77671,268.55094%20C%20291.91449,275.89365%20289.48349,286.1138%20289.48368,299.2114%20C%20289.48349,312.11067%20291.91449,322.2812%20296.77671,329.72303%20C%20301.73774,337.06568%20308.53463,340.737%20317.1674,340.73698%20C%20325.60128,340.737%20332.24934,337.06568%20337.11159,329.72303%20C%20342.07258,322.2812%20344.5532,312.11067%20344.55345,299.2114%20C%20344.5532,286.21302%20342.07258,276.04249%20337.11159,268.69977%20C%20332.24934,261.25801%20325.60128,257.53708%20317.1674,257.53698%20M%20317.1674,238.63466%20C%20332.84469,238.63477%20345.29739,244.09213%20354.52554,255.00675%20C%20363.75318,265.92157%20368.36713,280.65644%20368.3674,299.2114%20C%20368.36713,317.76648%20363.70357,332.50135%20354.37671,343.41605%20C%20345.14855,354.23156%20332.74546,359.6393%20317.1674,359.63931%20C%20301.29123,359.6393%20288.7393,354.23156%20279.51159,343.41605%20C%20270.28351,332.50135%20265.66956,317.76648%20265.66973,299.2114%20C%20265.66956,280.55721%20270.28351,265.82234%20279.51159,255.00675%20C%20288.83853,244.09213%20301.39045,238.63477%20317.1674,238.63466%20M%20163.5674,147.9928%20C%20155.03401,147.993%20148.28673,151.71393%20143.32554,159.15559%20C%20138.46349,166.49841%20136.03248,176.61933%20136.03252,189.51838%20C%20136.03248,202.61621%20138.46349,212.83635%20143.32554,220.17884%20C%20148.18751,227.52161%20154.93479,231.19292%20163.5674,231.1928%20C%20172.19989,231.19292%20178.94717,227.52161%20183.80926,220.17884%20C%20188.77041,212.83635%20191.25103,202.61621%20191.25113,189.51838%20C%20191.25103,176.71856%20188.77041,166.59764%20183.80926,159.15559%20C%20178.84794,151.71393%20172.10066,147.993%20163.5674,147.9928%20M%20297.9674,129.09047%20L%20321.78136,129.09047%20L%20182.7674,359.63931%20L%20158.95345,359.63931%20L%20297.9674,129.09047%20M%20163.5674,129.09047%20C%20179.24484,129.0907%20191.74715,134.54806%20201.07438,145.46256%20C%20210.4014,156.27827%20215.06496,170.96352%20215.06508,189.51838%20C%20215.06496,208.27201%20210.4014,223.05649%20201.07438,233.87187%20C%20191.84638,244.68748%20179.34406,250.09523%20163.5674,250.09512%20C%20147.79061,250.09523%20135.28829,244.68748%20126.06043,233.87187%20C%20116.93172,222.95727%20112.36739,208.17279%20112.3674,189.51838%20C%20112.36739,171.06275%20116.98134,156.37749%20126.20926,145.46256%20C%20135.43713,134.54806%20147.88983,129.0907%20163.5674,129.09047%22%20/%3E%3C/g%3E%3C/svg%3E'), + linear-gradient(to bottom, #fff 0%,#fff 100%); + background-repeat: no-repeat, repeat; + background-position: right 2px top 50%, 0 0; + background-size: 9px auto, 100%; +} + + +label { + height: 12.8px!important; + color: #000; + font-size: 8pt; +} + + + +input[type="checkbox"] { + display: block; + -webkit-appearance:none;/* Hides the default checkbox style */ + height:29.66px; + width:29.66px; + cursor:pointer; + position:relative; + -webkit-transition: .15s; + border-radius: unset; + border: 1px solid #cccccc; + background-color:#fff; + } + + input[type="checkbox"]:checked { + background-color:#9ABCEA; + } + + input[type="checkbox"]:before, input[type="checkbox"]:checked:before { + position:absolute; + top:0; + left:0; + width:100%; + height:100%; + line-height:2em; + text-align:center; + color:#000; + content: ''; + } + + input[type="checkbox"]:checked:before { + font-size: 11pt; + content: '✔'; + } + + input[type="checkbox"]:hover:before { + background:rgba(255,255,255,0.3); + } + + +:focus { + outline: 1px solid #607d8b; +} + +.modal-content > header { + background-color: #293146; + color: #fff; + padding:8px!important; + margin-bottom: 10px; +} + +.modal-content > header > h2 { + font-size: 13pt; +} + +.modal-content > footer { + + /* padding:0.01em 8px; */ + text-align:right!important; + color:#000!important; + background-color:#c6c6c6!important; + margin-top: 6px; + padding-top:8px!important; + padding-bottom:8px!important; +} + +.modal-content > header:after,.modal-content > header:before,.modal-content > footer:after,.modal-content > footer:before { + content:"";display:table;clear:both +} + +span[class^="icon"]::after { + content: "\A"; + white-space: pre; +} + +.inlinebtn { + position: relative; + height: 28px; + margin-top: -28px; + margin-left: -20px; + padding: 4px 8px; + border: 0!important; + float: right; +} + +#loader { + position: absolute; + left: 50%; + top: 50%; + z-index: 1; + width: 150px; + height: 150px; + margin: -75px 0 0 -75px; + border: 16px solid #f3f3f3; + border-radius: 50%; + border-top: 16px solid #3498db; + width: 120px; + height: 120px; + -webkit-animation: spin 2s linear infinite; + animation: spin 2s linear infinite; +} + +@-webkit-keyframes spin { + 0% { -webkit-transform: rotate(0deg); } + 100% { -webkit-transform: rotate(360deg); } +} + +@keyframes spin { + 0% { transform: rotate(0deg); } + 100% { transform: rotate(360deg); } +} + diff --git a/pointeuse/install/bin/electron/resources/app/img/POT-logo.png b/pointeuse/install/bin/electron/resources/app/img/POT-logo.png new file mode 100644 index 00000000..e2c80285 Binary files /dev/null and b/pointeuse/install/bin/electron/resources/app/img/POT-logo.png differ diff --git a/pointeuse/install/bin/electron/resources/app/img/Thumbs.db b/pointeuse/install/bin/electron/resources/app/img/Thumbs.db new file mode 100644 index 00000000..ef7a0ce6 Binary files /dev/null and b/pointeuse/install/bin/electron/resources/app/img/Thumbs.db differ diff --git a/pointeuse/install/bin/electron/resources/app/img/dks_1000.png b/pointeuse/install/bin/electron/resources/app/img/dks_1000.png new file mode 100644 index 00000000..87b44eb9 Binary files /dev/null and b/pointeuse/install/bin/electron/resources/app/img/dks_1000.png differ diff --git a/pointeuse/install/bin/electron/resources/app/img/favicon/Thumbs.db b/pointeuse/install/bin/electron/resources/app/img/favicon/Thumbs.db new file mode 100644 index 00000000..bf6568b6 Binary files /dev/null and b/pointeuse/install/bin/electron/resources/app/img/favicon/Thumbs.db differ diff --git a/pointeuse/install/bin/electron/resources/app/img/favicon/android-icon-144x144.png b/pointeuse/install/bin/electron/resources/app/img/favicon/android-icon-144x144.png new file mode 100644 index 00000000..6aa79d8f Binary files /dev/null and b/pointeuse/install/bin/electron/resources/app/img/favicon/android-icon-144x144.png differ diff --git a/pointeuse/install/bin/electron/resources/app/img/favicon/android-icon-192x192.png b/pointeuse/install/bin/electron/resources/app/img/favicon/android-icon-192x192.png new file mode 100644 index 00000000..f58a3e61 Binary files /dev/null and b/pointeuse/install/bin/electron/resources/app/img/favicon/android-icon-192x192.png differ diff --git a/pointeuse/install/bin/electron/resources/app/img/favicon/android-icon-36x36.png b/pointeuse/install/bin/electron/resources/app/img/favicon/android-icon-36x36.png new file mode 100644 index 00000000..f52eed77 Binary files /dev/null and b/pointeuse/install/bin/electron/resources/app/img/favicon/android-icon-36x36.png differ diff --git a/pointeuse/install/bin/electron/resources/app/img/favicon/android-icon-48x48.png b/pointeuse/install/bin/electron/resources/app/img/favicon/android-icon-48x48.png new file mode 100644 index 00000000..d5beba19 Binary files /dev/null and b/pointeuse/install/bin/electron/resources/app/img/favicon/android-icon-48x48.png differ diff --git a/pointeuse/install/bin/electron/resources/app/img/favicon/android-icon-72x72.png b/pointeuse/install/bin/electron/resources/app/img/favicon/android-icon-72x72.png new file mode 100644 index 00000000..7c7f324a Binary files /dev/null and b/pointeuse/install/bin/electron/resources/app/img/favicon/android-icon-72x72.png differ diff --git a/pointeuse/install/bin/electron/resources/app/img/favicon/android-icon-96x96.png b/pointeuse/install/bin/electron/resources/app/img/favicon/android-icon-96x96.png new file mode 100644 index 00000000..38484ee8 Binary files /dev/null and b/pointeuse/install/bin/electron/resources/app/img/favicon/android-icon-96x96.png differ diff --git a/pointeuse/install/bin/electron/resources/app/img/favicon/apple-icon-114x114.png b/pointeuse/install/bin/electron/resources/app/img/favicon/apple-icon-114x114.png new file mode 100644 index 00000000..3d448dda Binary files /dev/null and b/pointeuse/install/bin/electron/resources/app/img/favicon/apple-icon-114x114.png differ diff --git a/pointeuse/install/bin/electron/resources/app/img/favicon/apple-icon-120x120.png b/pointeuse/install/bin/electron/resources/app/img/favicon/apple-icon-120x120.png new file mode 100644 index 00000000..99a1a39d Binary files /dev/null and b/pointeuse/install/bin/electron/resources/app/img/favicon/apple-icon-120x120.png differ diff --git a/pointeuse/install/bin/electron/resources/app/img/favicon/apple-icon-144x144.png b/pointeuse/install/bin/electron/resources/app/img/favicon/apple-icon-144x144.png new file mode 100644 index 00000000..6aa79d8f Binary files /dev/null and b/pointeuse/install/bin/electron/resources/app/img/favicon/apple-icon-144x144.png differ diff --git a/pointeuse/install/bin/electron/resources/app/img/favicon/apple-icon-152x152.png b/pointeuse/install/bin/electron/resources/app/img/favicon/apple-icon-152x152.png new file mode 100644 index 00000000..3ee41433 Binary files /dev/null and b/pointeuse/install/bin/electron/resources/app/img/favicon/apple-icon-152x152.png differ diff --git a/pointeuse/install/bin/electron/resources/app/img/favicon/apple-icon-180x180.png b/pointeuse/install/bin/electron/resources/app/img/favicon/apple-icon-180x180.png new file mode 100644 index 00000000..7541cce1 Binary files /dev/null and b/pointeuse/install/bin/electron/resources/app/img/favicon/apple-icon-180x180.png differ diff --git a/pointeuse/install/bin/electron/resources/app/img/favicon/apple-icon-57x57.png b/pointeuse/install/bin/electron/resources/app/img/favicon/apple-icon-57x57.png new file mode 100644 index 00000000..58d5700c Binary files /dev/null and b/pointeuse/install/bin/electron/resources/app/img/favicon/apple-icon-57x57.png differ diff --git a/pointeuse/install/bin/electron/resources/app/img/favicon/apple-icon-60x60.png b/pointeuse/install/bin/electron/resources/app/img/favicon/apple-icon-60x60.png new file mode 100644 index 00000000..31a3f78c Binary files /dev/null and b/pointeuse/install/bin/electron/resources/app/img/favicon/apple-icon-60x60.png differ diff --git a/pointeuse/install/bin/electron/resources/app/img/favicon/apple-icon-72x72.png b/pointeuse/install/bin/electron/resources/app/img/favicon/apple-icon-72x72.png new file mode 100644 index 00000000..7c7f324a Binary files /dev/null and b/pointeuse/install/bin/electron/resources/app/img/favicon/apple-icon-72x72.png differ diff --git a/pointeuse/install/bin/electron/resources/app/img/favicon/apple-icon-76x76.png b/pointeuse/install/bin/electron/resources/app/img/favicon/apple-icon-76x76.png new file mode 100644 index 00000000..bd288840 Binary files /dev/null and b/pointeuse/install/bin/electron/resources/app/img/favicon/apple-icon-76x76.png differ diff --git a/pointeuse/install/bin/electron/resources/app/img/favicon/apple-icon-precomposed.png b/pointeuse/install/bin/electron/resources/app/img/favicon/apple-icon-precomposed.png new file mode 100644 index 00000000..cd3635a6 Binary files /dev/null and b/pointeuse/install/bin/electron/resources/app/img/favicon/apple-icon-precomposed.png differ diff --git a/pointeuse/install/bin/electron/resources/app/img/favicon/apple-icon.png b/pointeuse/install/bin/electron/resources/app/img/favicon/apple-icon.png new file mode 100644 index 00000000..cd3635a6 Binary files /dev/null and b/pointeuse/install/bin/electron/resources/app/img/favicon/apple-icon.png differ diff --git a/pointeuse/install/bin/electron/resources/app/img/favicon/browserconfig.xml b/pointeuse/install/bin/electron/resources/app/img/favicon/browserconfig.xml new file mode 100644 index 00000000..c5541482 --- /dev/null +++ b/pointeuse/install/bin/electron/resources/app/img/favicon/browserconfig.xml @@ -0,0 +1,2 @@ + +#ffffff \ No newline at end of file diff --git a/pointeuse/install/bin/electron/resources/app/img/favicon/favicon-16x16.png b/pointeuse/install/bin/electron/resources/app/img/favicon/favicon-16x16.png new file mode 100644 index 00000000..09adf921 Binary files /dev/null and b/pointeuse/install/bin/electron/resources/app/img/favicon/favicon-16x16.png differ diff --git a/pointeuse/install/bin/electron/resources/app/img/favicon/favicon-32x32.png b/pointeuse/install/bin/electron/resources/app/img/favicon/favicon-32x32.png new file mode 100644 index 00000000..3281e250 Binary files /dev/null and b/pointeuse/install/bin/electron/resources/app/img/favicon/favicon-32x32.png differ diff --git a/pointeuse/install/bin/electron/resources/app/img/favicon/favicon-96x96.png b/pointeuse/install/bin/electron/resources/app/img/favicon/favicon-96x96.png new file mode 100644 index 00000000..38484ee8 Binary files /dev/null and b/pointeuse/install/bin/electron/resources/app/img/favicon/favicon-96x96.png differ diff --git a/pointeuse/install/bin/electron/resources/app/img/favicon/favicon.ico b/pointeuse/install/bin/electron/resources/app/img/favicon/favicon.ico new file mode 100644 index 00000000..bbf93a15 Binary files /dev/null and b/pointeuse/install/bin/electron/resources/app/img/favicon/favicon.ico differ diff --git a/pointeuse/install/bin/electron/resources/app/img/favicon/manifest.json b/pointeuse/install/bin/electron/resources/app/img/favicon/manifest.json new file mode 100644 index 00000000..013d4a6a --- /dev/null +++ b/pointeuse/install/bin/electron/resources/app/img/favicon/manifest.json @@ -0,0 +1,41 @@ +{ + "name": "App", + "icons": [ + { + "src": "\/android-icon-36x36.png", + "sizes": "36x36", + "type": "image\/png", + "density": "0.75" + }, + { + "src": "\/android-icon-48x48.png", + "sizes": "48x48", + "type": "image\/png", + "density": "1.0" + }, + { + "src": "\/android-icon-72x72.png", + "sizes": "72x72", + "type": "image\/png", + "density": "1.5" + }, + { + "src": "\/android-icon-96x96.png", + "sizes": "96x96", + "type": "image\/png", + "density": "2.0" + }, + { + "src": "\/android-icon-144x144.png", + "sizes": "144x144", + "type": "image\/png", + "density": "3.0" + }, + { + "src": "\/android-icon-192x192.png", + "sizes": "192x192", + "type": "image\/png", + "density": "4.0" + } + ] +} \ No newline at end of file diff --git a/pointeuse/install/bin/electron/resources/app/img/favicon/ms-icon-144x144.png b/pointeuse/install/bin/electron/resources/app/img/favicon/ms-icon-144x144.png new file mode 100644 index 00000000..6aa79d8f Binary files /dev/null and b/pointeuse/install/bin/electron/resources/app/img/favicon/ms-icon-144x144.png differ diff --git a/pointeuse/install/bin/electron/resources/app/img/favicon/ms-icon-150x150.png b/pointeuse/install/bin/electron/resources/app/img/favicon/ms-icon-150x150.png new file mode 100644 index 00000000..b08e5629 Binary files /dev/null and b/pointeuse/install/bin/electron/resources/app/img/favicon/ms-icon-150x150.png differ diff --git a/pointeuse/install/bin/electron/resources/app/img/favicon/ms-icon-310x310.png b/pointeuse/install/bin/electron/resources/app/img/favicon/ms-icon-310x310.png new file mode 100644 index 00000000..12046d82 Binary files /dev/null and b/pointeuse/install/bin/electron/resources/app/img/favicon/ms-icon-310x310.png differ diff --git a/pointeuse/install/bin/electron/resources/app/img/favicon/ms-icon-70x70.png b/pointeuse/install/bin/electron/resources/app/img/favicon/ms-icon-70x70.png new file mode 100644 index 00000000..5135560d Binary files /dev/null and b/pointeuse/install/bin/electron/resources/app/img/favicon/ms-icon-70x70.png differ diff --git a/pointeuse/install/bin/electron/resources/app/img/fingerprint/finger1.svg b/pointeuse/install/bin/electron/resources/app/img/fingerprint/finger1.svg new file mode 100644 index 00000000..a787ffaa --- /dev/null +++ b/pointeuse/install/bin/electron/resources/app/img/fingerprint/finger1.svg @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/pointeuse/install/bin/electron/resources/app/img/fingerprint/finger2.svg b/pointeuse/install/bin/electron/resources/app/img/fingerprint/finger2.svg new file mode 100644 index 00000000..6453559f --- /dev/null +++ b/pointeuse/install/bin/electron/resources/app/img/fingerprint/finger2.svg @@ -0,0 +1,82 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/pointeuse/install/bin/electron/resources/app/img/fingerprint/finger3.svg b/pointeuse/install/bin/electron/resources/app/img/fingerprint/finger3.svg new file mode 100644 index 00000000..71aa5578 --- /dev/null +++ b/pointeuse/install/bin/electron/resources/app/img/fingerprint/finger3.svg @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/pointeuse/install/bin/electron/resources/app/img/fingerprint/finger4.svg b/pointeuse/install/bin/electron/resources/app/img/fingerprint/finger4.svg new file mode 100644 index 00000000..2ebb62ee --- /dev/null +++ b/pointeuse/install/bin/electron/resources/app/img/fingerprint/finger4.svg @@ -0,0 +1,78 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/pointeuse/install/bin/electron/resources/app/img/fingerprint/finger5.svg b/pointeuse/install/bin/electron/resources/app/img/fingerprint/finger5.svg new file mode 100644 index 00000000..5aa57294 --- /dev/null +++ b/pointeuse/install/bin/electron/resources/app/img/fingerprint/finger5.svg @@ -0,0 +1,79 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/pointeuse/install/bin/electron/resources/app/img/fingerprint/fingerprint-check.svg b/pointeuse/install/bin/electron/resources/app/img/fingerprint/fingerprint-check.svg new file mode 100644 index 00000000..3634d284 --- /dev/null +++ b/pointeuse/install/bin/electron/resources/app/img/fingerprint/fingerprint-check.svg @@ -0,0 +1,86 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/pointeuse/install/bin/electron/resources/app/img/fingerprint/fingerprint-crosshair.svg b/pointeuse/install/bin/electron/resources/app/img/fingerprint/fingerprint-crosshair.svg new file mode 100644 index 00000000..ea827513 --- /dev/null +++ b/pointeuse/install/bin/electron/resources/app/img/fingerprint/fingerprint-crosshair.svg @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/pointeuse/install/bin/electron/resources/app/img/fingerprint/fingerprint-remove.svg b/pointeuse/install/bin/electron/resources/app/img/fingerprint/fingerprint-remove.svg new file mode 100644 index 00000000..a28f7fda --- /dev/null +++ b/pointeuse/install/bin/electron/resources/app/img/fingerprint/fingerprint-remove.svg @@ -0,0 +1,86 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/pointeuse/install/bin/electron/resources/app/img/fingerprint/fingerprint-remove_white.svg b/pointeuse/install/bin/electron/resources/app/img/fingerprint/fingerprint-remove_white.svg new file mode 100644 index 00000000..6b7bcf19 --- /dev/null +++ b/pointeuse/install/bin/electron/resources/app/img/fingerprint/fingerprint-remove_white.svg @@ -0,0 +1,86 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/pointeuse/install/bin/electron/resources/app/img/fingerprint/fingerprint-scanning-index.svg b/pointeuse/install/bin/electron/resources/app/img/fingerprint/fingerprint-scanning-index.svg new file mode 100644 index 00000000..21375690 --- /dev/null +++ b/pointeuse/install/bin/electron/resources/app/img/fingerprint/fingerprint-scanning-index.svg @@ -0,0 +1,109 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/pointeuse/install/bin/electron/resources/app/img/fingerprint/fingerprint-scanning.svg b/pointeuse/install/bin/electron/resources/app/img/fingerprint/fingerprint-scanning.svg new file mode 100644 index 00000000..db82b5e0 --- /dev/null +++ b/pointeuse/install/bin/electron/resources/app/img/fingerprint/fingerprint-scanning.svg @@ -0,0 +1,90 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/pointeuse/install/bin/electron/resources/app/img/fingerprint/fingerprint-search.svg b/pointeuse/install/bin/electron/resources/app/img/fingerprint/fingerprint-search.svg new file mode 100644 index 00000000..77b2cb6c --- /dev/null +++ b/pointeuse/install/bin/electron/resources/app/img/fingerprint/fingerprint-search.svg @@ -0,0 +1,203 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/pointeuse/install/bin/electron/resources/app/img/fingerprint/fingerprint-simple.svg b/pointeuse/install/bin/electron/resources/app/img/fingerprint/fingerprint-simple.svg new file mode 100644 index 00000000..174630bf --- /dev/null +++ b/pointeuse/install/bin/electron/resources/app/img/fingerprint/fingerprint-simple.svg @@ -0,0 +1,87 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/pointeuse/install/bin/electron/resources/app/img/hourtrax copy.svg b/pointeuse/install/bin/electron/resources/app/img/hourtrax copy.svg new file mode 100644 index 00000000..05f00e2a --- /dev/null +++ b/pointeuse/install/bin/electron/resources/app/img/hourtrax copy.svg @@ -0,0 +1,90 @@ + + + + + + + image/svg+xml + + + + + + + Hourtrax + + + + + + + + + + + + + + + diff --git a/pointeuse/install/bin/electron/resources/app/img/hourtrax.png b/pointeuse/install/bin/electron/resources/app/img/hourtrax.png new file mode 100644 index 00000000..13998623 Binary files /dev/null and b/pointeuse/install/bin/electron/resources/app/img/hourtrax.png differ diff --git a/pointeuse/install/bin/electron/resources/app/img/hourtrax.svg b/pointeuse/install/bin/electron/resources/app/img/hourtrax.svg new file mode 100644 index 00000000..05f00e2a --- /dev/null +++ b/pointeuse/install/bin/electron/resources/app/img/hourtrax.svg @@ -0,0 +1,90 @@ + + + + + + + image/svg+xml + + + + + + + Hourtrax + + + + + + + + + + + + + + + diff --git a/pointeuse/install/bin/electron/resources/app/img/hwbagde.svg b/pointeuse/install/bin/electron/resources/app/img/hwbagde.svg new file mode 100644 index 00000000..a2aef029 --- /dev/null +++ b/pointeuse/install/bin/electron/resources/app/img/hwbagde.svg @@ -0,0 +1,60 @@ + + + + + + + + image/svg+xml + + + + + + + + + diff --git a/pointeuse/install/bin/electron/resources/app/img/key-fob.png b/pointeuse/install/bin/electron/resources/app/img/key-fob.png new file mode 100644 index 00000000..d8356db8 Binary files /dev/null and b/pointeuse/install/bin/electron/resources/app/img/key-fob.png differ diff --git a/pointeuse/install/bin/electron/resources/app/img/logo_512.png b/pointeuse/install/bin/electron/resources/app/img/logo_512.png new file mode 100644 index 00000000..37e20687 Binary files /dev/null and b/pointeuse/install/bin/electron/resources/app/img/logo_512.png differ diff --git a/pointeuse/install/bin/electron/resources/app/img/nfc-scan.svg b/pointeuse/install/bin/electron/resources/app/img/nfc-scan.svg new file mode 100644 index 00000000..62800bed --- /dev/null +++ b/pointeuse/install/bin/electron/resources/app/img/nfc-scan.svg @@ -0,0 +1,210 @@ + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/pointeuse/install/bin/electron/resources/app/img/nfc-scan_alt.svg b/pointeuse/install/bin/electron/resources/app/img/nfc-scan_alt.svg new file mode 100644 index 00000000..d1bc262b --- /dev/null +++ b/pointeuse/install/bin/electron/resources/app/img/nfc-scan_alt.svg @@ -0,0 +1,99 @@ + +image/svg+xml diff --git a/pointeuse/install/bin/electron/resources/app/img/pot.svg b/pointeuse/install/bin/electron/resources/app/img/pot.svg new file mode 100644 index 00000000..931803d8 --- /dev/null +++ b/pointeuse/install/bin/electron/resources/app/img/pot.svg @@ -0,0 +1,260 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/pointeuse/install/bin/electron/resources/app/img/poticon512.png b/pointeuse/install/bin/electron/resources/app/img/poticon512.png new file mode 100644 index 00000000..bce391c2 Binary files /dev/null and b/pointeuse/install/bin/electron/resources/app/img/poticon512.png differ diff --git a/pointeuse/install/bin/electron/resources/app/img/potlogowhite.svg b/pointeuse/install/bin/electron/resources/app/img/potlogowhite.svg new file mode 100644 index 00000000..7c2ec3bb --- /dev/null +++ b/pointeuse/install/bin/electron/resources/app/img/potlogowhite.svg @@ -0,0 +1,133 @@ + +image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/pointeuse/install/bin/electron/resources/app/img/pottop.png b/pointeuse/install/bin/electron/resources/app/img/pottop.png new file mode 100644 index 00000000..5f159c55 Binary files /dev/null and b/pointeuse/install/bin/electron/resources/app/img/pottop.png differ diff --git a/pointeuse/install/bin/electron/resources/app/img/toplogo.png b/pointeuse/install/bin/electron/resources/app/img/toplogo.png new file mode 100644 index 00000000..37e20687 Binary files /dev/null and b/pointeuse/install/bin/electron/resources/app/img/toplogo.png differ diff --git a/pointeuse/install/bin/electron/resources/app/img/touch.svg b/pointeuse/install/bin/electron/resources/app/img/touch.svg new file mode 100644 index 00000000..33b7615c --- /dev/null +++ b/pointeuse/install/bin/electron/resources/app/img/touch.svg @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/pointeuse/install/bin/electron/resources/app/index.fingerprint.html b/pointeuse/install/bin/electron/resources/app/index.fingerprint.html new file mode 100644 index 00000000..3838ea52 --- /dev/null +++ b/pointeuse/install/bin/electron/resources/app/index.fingerprint.html @@ -0,0 +1,162 @@ + + + + + + + + Time Clock - FingerPrint + + +
    + +

    + +
    + + + + + + + + + + + + + + +
    +
    +
    + + + + + + + + + + diff --git a/pointeuse/install/bin/electron/resources/app/index.nfc.html b/pointeuse/install/bin/electron/resources/app/index.nfc.html new file mode 100644 index 00000000..999f4ed4 --- /dev/null +++ b/pointeuse/install/bin/electron/resources/app/index.nfc.html @@ -0,0 +1,180 @@ + + + + + + + + Time Clock - NFC + + +
    + +

    + +
    + + + + + + + + + + + + + +
    +
    + + + + + + + + + + diff --git a/pointeuse/install/bin/electron/resources/app/js/app.js b/pointeuse/install/bin/electron/resources/app/js/app.js new file mode 100644 index 00000000..388f32a8 --- /dev/null +++ b/pointeuse/install/bin/electron/resources/app/js/app.js @@ -0,0 +1,65 @@ +//const fs = require('fs'); +//const os = require('os'); + + +let cfgpath = os.homedir() + '/.hourtrax/'; +let binpath = os.homedir() + '/bin/'; +let preferences= {}; + +let app = { + currentview: null, + + viewpanel: function(pnlname){ + let panels = document.getElementsByClassName("panel"); + //console.log("change panel to " + pnlname); + app.currentview = pnlname; + for (let p=0;pZugriff gewährt!", +// "-1":"Erreur/Fehler! Veuillez essayer de placer le centre de l'empreinte digitale à plat sur le capteur, ou cette empreinte existe déjà!
    Versuchen Sie bitte, die Mitte des Fingerabdrucks flach auf den Sensor zu legen, sonst ist der Fingerabdruck bereits vorhanden.", +// "2":"l'empreinte digitale a été sauvegardée!
    Der Fingerabdruck wurde gespeichert!", + +// "-4": "Erreur/Fehler! La bibliothèque d'empreintes digitales est pleine! Prière de contacter le Support!
    Die Fingerabdruck-Bibliothek ist voll! Bitte kontaktieren Sie den Support!", +// "-5":"Erreur/Fehler! Utilisateur non verifé! Veuillez essayer de placer le centre de l'empreinte digitale à plat sur le capteur!
    Nicht verifizierter Benutzer! Bitte versuchen Sie, die Mitte des Fingerabdrucks flach auf den Sensor zu legen!", +// "-8":"Timed Out!" + +// } + +let fingerprint ={ + unload: function(){ + //console.log(binpath +'fpunload.sh'); + const fpunload = spawn('bash', ['/home/pot/bin/fpunload.sh','']); + //const fpunload = spawn('bash', ["-c",binpath +'/fpunload.sh','']); + fpunload.stdout.on('data', (data) => { + console.log(`fpunload stdout: ${data}`); + }); + + fpunload.stderr.on('data', (data) => { + console.error(`fpunload stderr: ${data}`); + }); + + fpunload.on('close', (code) => { + console.log(`fpunload child process exited with code ${code}`); + }); + }, + read: function(){ + console.log("Read Start",moment(new Date()).format('hh:mm:ss')); + timeclock.startCheckIdle(); + console.log("execute",binpath + 'fpread.sh'); + const fpread = spawn('python', ['/home/pot/bin/fp.py', 'read',preferences.timeout]); + //const fpread = spawn('bash', ['-c',binpath + '/fpread.sh', 'read',preferences.timeout]); + fpread.stdout.on('data', (data) => { + console.log(`fpread stdout: ${data}`); + console.log("Read OUT End",moment(new Date()).format('hh:mm:ss')); + + if (data.toString().startsWith("u")){ + //var user=data.toString(); + var user = data.toString().replace(/^u/,''); + console.log("fp user",user); + var rsql = "select id_staff,fingerhash,fingertype from fingerprints where fingerhash='"+user+"' and id_staff='"+timeclock.userdata[timeclock.current_index].id+"';"; + console.log("rsql",rsql); + db.query(rsql).then(fpdata => { + console.log("fpdata",fpdata); + if (fpdata){ + console.log("data compared",fpdata) + timeclock.loadtimetrack(); + app.snackbar(lang["de"]["fp_ok"],'green'); + } else { + fingerprint.read(); + app.snackbar(lang["de"]["fp_notok"],'red'); + } + }).catch(e => { + console.log("db error",e); + fingerprint.read(); + app.snackbar(lang["de"]["fp_notok"],'red'); + }) + } else { + app.snackbar(lang["de"]["fp_notok"],'red'); + fingerprint.read(); + } + + + }); + + fpread.stderr.on('data', (data) => { + console.log("Read ERR end",moment(new Date()).format('hh:mm:ss')); + console.error(`fpread stderr: ${data}`); + if (data == "8"){ + timeclock.loadusers(); + } else { + + } + }); + + fpread.on('close', (code) => { + console.log(`Read CLOSE ${code} end`,moment(new Date()).format('hh:mm:ss')); + //console.log(`fpread: child process exited with code ${code}`); + if (`${code}` != "0" ){ + timeclock.loadusers(); + } + }); + }, + write: function(){ + console.log("Write Start",moment(new Date()).format('hh:mm:ss')); + //const fpwrite = spawn('bash', ["-c",binpath + '/fp.py', 'write',preferences.timeout]); + const fpwrite = spawn('python', ['/home/pot/bin/fp.py', 'write',preferences.timeout]); + timeclock.startCheckIdle(); + fpwrite.stdout.on('data', (data) => { + console.log("Write OUT End",moment(new Date()).format('hh:mm:ss')); + console.log("Write result",`${data}`); + console.log(data.toString()); + if (data.toString().startsWith("au")){ + var newuser = data.toString().replace(/^au/,''); + console.log("write FP to User:",timeclock.current_index,timeclock.writefinger,newuser); + db.exec("REPLACE INTO fingerprints (id_staff,fingerhash,fingertype) VALUES ('"+ timeclock.userdata[timeclock.current_index].id +"','"+ newuser +"','"+ timeclock.writefinger +"');").then(dbdata => { + console.log("newfinger db sql",dbdata); + document.getElementById("regfinger"+ timeclock.writefinger).classList.add("orange"); + app.snackbar(lang["de"]["fp_saved"],'green'); + document.getElementById("btnwritefinger").classList.remove("green"); + //fingerprint.write(); + } + ).catch(e =>{ + console.log("errordb",e); + app.snackbar(lang["de"]["fp_notok"],'red'); + document.getElementById("btnwritefinger").classList.remove("green"); + //fingerprint.write(); + }); + } else { + app.snackbar(lang["de"]["fp_notok"],'red'); + document.getElementById("btnwritefinger").classList.remove("green"); + //fingerprint.write(); + } + + }); + + fpwrite.stderr.on('data', (data) => { + console.log("Write ERR end",moment(new Date()).format('hh:mm:ss')); + console.error(`fpwrite: ${data}`); + if (data == "8"){ + timeclock.loadusers(); + } else { + + } + + }); + + fpwrite.on('close', (code) => { + console.log(`Write CLOSE ${code} end`,moment(new Date()).format('hh:mm:ss')); + if (`${code}` != "0" ){ + timeclock.loadusers(); + } + //console.log(`fpwrite: child process exited with code ${code}`); + }); + } +} \ No newline at end of file diff --git a/pointeuse/install/bin/electron/resources/app/js/lang.js b/pointeuse/install/bin/electron/resources/app/js/lang.js new file mode 100644 index 00000000..e2d849e1 --- /dev/null +++ b/pointeuse/install/bin/electron/resources/app/js/lang.js @@ -0,0 +1,75 @@ + + +let lang = {"de": +{"pinerrormsg":"Pin-Code nicht korrekt!", +"msgplacefinger":"Legen Sie einen Ihrer registrierten Finger auf den Fingerabdruck-Sensor", +"cancel":"abbrechen", +"msgchoosename":"Scan Badge!", +"msgattention":"Achtung!", +"msgstarttime":"Sie dürfen sich erst ab %%daystarttime%% Uhr einloggen!", +"msgendtime":"Sie müssen sich vor %%dayendtime%% Uhr ausloggen!", +"enterpincode":"Pincode eingeben:", +"registerfinger":"Registrierung", +"close":"schließen", +"selectfinger":"einen Finger auswählen", +"msgstartregister":"klicken Sie unten, um die Registrierung zu starten, dann legen Sie Ihren Finger auf den Fingerabdruck-Sensor", +"tracking":"Stechuhr", +"trackin":"Einloggen", +"trackout":"Ausloggen", +"endpause":"Ende Pause", +"startpause":"Start Pause", +"weekview":"Wochenübersicht", +"msgtrackregistered":"Danke,
    der Vorgang wurde gespeichert!", +"fp_ok":"Zugriff gewährt!", +"fp_notok":"Fingerabdruck nicht erkannt!", +"fp_saved":"Der Fingerabdruck wurde gespeichert", +"fplib_full":"Die Fingerabdruck-Bibliothek ist voll! Bitte kontaktieren Sie den Support!", +"timeout":"Timed Out!", +"badge_unknown":"unbekannter Badge!", +"badge_added":"Badge wurde hinzugefügt!", +"badge_removed":"Badge wurde entfernt!", +"badge_notauthorized":"Badge nicht zugelaasen!", +"pincode_notsame":"Pincodes nicht identisch!" +}}; + +lang["fr"] = { + "pinerrormsg":"Code-Pin incorrecte!", + "msgplacefinger":"Mettez un de vos doigts enregistrés sur l'emprinte digitale", +"cancel":"abandonner", +"msgchoosename":"Scan Badge!", +"msgattention":"Attention!", +"msgstarttime":"vous êtes autorisés à pointer l'entrée à partir de %%daystartime%%h!", +"msgendtime":"vous devez pointer la sortie avant %%dayendtime%%h!", +"enterpincode":"entrer Code-Pin:", +"registerfinger":"Enregistrement", +"close":"fermer", +"selectfinger":"sélectionner un doigt", +"msgstartregister":"cliquer ci-dessous pour commencer l'enreigistrement, puis mettez le doigt sur l'emprinte digitale", +"tracking":"pointage", +"trackin":"Entrée", +"trackout":"Sortie", +"endpause":"Fin Pause", +"startpause":"Début Pause", +"weekview":"Semaine courrante", +"msgtrackregistered":"Merci,
    le pointage a été sauvegardé!", +"fp_ok":"Accès authorisé!", +"fp_notok":"empr. digitale pas reconue!", +"fp_saved":"empr. digitale a été sauvegardée", +"fplib_full":"la Biblio des empr. digitale est plein! contactez le Support!", +"timeout":"Timed Out!", +"badge_unknown":"Badge inconnue!", +"badge_added":"Badge a été ajouté!", +"badge_removed":"Badge supprimé!", +"badge_notauthorized":"Badge non authorisé!", +"pincode_notsame":"codes PIN pas identiques!" +}; + +// let fpmsg={ "0": "Accès autorisé!
    !", +// "-1":"Erreur/Fehler! Veuillez essayer de placer le centre de l'empreinte digitale à plat sur le capteur, ou cette empreinte existe déjà!
    Versuchen Sie bitte, die Mitte des Fingerabdrucks flach auf den Sensor zu legen, sonst ist der Fingerabdruck bereits vorhanden.", +// "2":"l'empreinte digitale a été sauvegardée!
    !", + +// "-4": "Erreur/Fehler! La bibliothèque d'empreintes digitales est pleine! Prière de contacter le Support!
    ", +// "-5":"Erreur/Fehler! Utilisateur non verifé! Veuillez essayer de placer le centre de l'empreinte digitale à plat sur le capteur!
    Nicht verifizierter Benutzer! Bitte versuchen Sie, die Mitte des Fingerabdrucks flach auf den Sensor zu legen!", +// "-8":"Timed Out!" + +// } diff --git a/pointeuse/install/bin/electron/resources/app/js/renderer.js b/pointeuse/install/bin/electron/resources/app/js/renderer.js new file mode 100644 index 00000000..230fa104 --- /dev/null +++ b/pointeuse/install/bin/electron/resources/app/js/renderer.js @@ -0,0 +1,36 @@ +const fs = require('fs'); +const os = require('os'); +let usersystem = { + dataPath: function(){ + return os.homedir() + '/.hourtrax/'; + }, + readDir: function(dir){ + files = fs.readdirSync(os.datapath() + dir); + console.log("Dir parse:" + dir,JSON.stringify(files)); + return files; + }, + setPref: function(key,data){ + + console.log("Set Pref",key,data); + if ((typeof data == 'object') || (typeof data == 'array')){ + data = JSON.stringify(data); + } + let result = fs.writeFileSync(this.dataPath() + key + ".json", data); + return result; + }, + getPref: function(key){ + console.log("get Pref key",key); + //console.log("getPreference:" + this.profilepath() + key + ".json"); + let data = null; + if (fs.existsSync(this.dataPath() + key + ".json")){ + //console.log("Read Key:" + key); + let data = fs.readFileSync(this.dataPath() + key + ".json", 'utf-8'); + if (data.startsWith("{") || data.startsWith("[")){ + data = JSON.parse(data); + } + return data; + } + console.log("get Pref data",data); + return data; + }, +} \ No newline at end of file diff --git a/pointeuse/install/bin/electron/resources/app/js/shell.js b/pointeuse/install/bin/electron/resources/app/js/shell.js new file mode 100644 index 00000000..aa356f7b --- /dev/null +++ b/pointeuse/install/bin/electron/resources/app/js/shell.js @@ -0,0 +1,156 @@ +const { spawn } = require('child_process'); + +let shell = { + scanwlans: function(){ + const scanwlan = spawn('bash', ['/home/pot/bin/scanwlan.sh','get']); + scanwlan.stdout.on('data', (data) => { + console.log(`scanwlan stdout: ${data}`); + }); + + scanwlan.stderr.on('data', (data) => { + console.error(`scanwlan stderr: ${data}`); + }); + + scanwlan.on('close', (code) => { + console.log(`scanwlan exit code ${code}`); + }); + }, + netstatus: function(){ + const netstatus = spawn('bash', ['ip --json addr show']); + netstatus.stdout.on('data', (data) => { + console.log(`netstatus stout: ${data}`); + }); + + netstatus.stderr.on('data', (data) => { + console.error(`netstatus stderr: ${data}`); + }); + + netstatus.on('close', (code) => { + console.log(`netstatus: exit code ${code}`); + }); + }, + savewlan: function(ssid,psk){ + const netstatus = spawn('bash', ['/home/pot/bin/savewlan.sh','"'+ ssid+'"',psk]); + netstatus.stdout.on('data', (data) => { + console.log(`netstatus stout: ${data}`); + }); + + netstatus.stderr.on('data', (data) => { + console.error(`netstatus stderr: ${data}`); + }); + + netstatus.on('close', (code) => { + console.log(`netstatus: exit code ${code}`); + }); + }, + shutdown: function(){ + const sh_shutdown = spawn('bash', ['/home/pot/bin/shutdown.sh']); + sh_shutdown.stdout.on('data', (data) => { + console.log(`sh_shutdown stout: ${data}`); + }); + + sh_shutdown.stderr.on('data', (data) => { + console.error(`sh_shutdown stderr: ${data}`); + }); + + sh_shutdown.on('close', (code) => { + console.log(`sh_shutdown: exit code ${code}`); + }); + }, + reboot: function(){ + const sh_reboot = spawn('bash', ['/home/pot/bin/reboot.sh']); + sh_reboot.stdout.on('data', (data) => { + console.log(`sh_reboot stout: ${data}`); + }); + + sh_reboot.stderr.on('data', (data) => { + console.error(`sh_reboot stderr: ${data}`); + }); + + sh_reboot.on('close', (code) => { + console.log(`sh_reboot: exit code ${code}`); + }); + }, + turnscreen: function(){ + const sh_turnscreen = spawn('bash', ['/home/pot/bin/turnscreen.sh']); + sh_turnscreen.stdout.on('data', (data) => { + //alert(`"DATA" + ${data}`); + console.log(`sh_turnscreen stout: ${data}`); + }); + + sh_turnscreen.stderr.on('data', (data) => { + console.error(`sh_turnscreen stderr: ${data}`); + }); + + sh_turnscreen.on('close', (code) => { + console.log(`sh_turnscreen: exit code ${code}`); + }); + }, + nfcimportid: function(){ + const sh_nfcimport = spawn('bash', ['/home/pot/bin/nfcimportid.sh']); + console.log("NFC import started!") + sh_nfcimport.stdout.on('data', (data) => { + console.log(`sh_nfcimport stout: ${data}`); + let nuid=data.toString().replace(/^UID:/,'').replace(/\n/g,''); + if (nuid != ""){ + timeclock.setbadgetouser(nuid); + } else { + app.snackbar("Badge not recognized!",'red'); + timeclock.loadbadges(); + } + }); + + sh_nfcimport.stderr.on('data', (data) => { + console.error(`sh_nfcimport stderr: ${data}`); + + + }); + + sh_nfcimport.on('close', (code) => { + console.log(`sh_nfcimport: exit code ${code}`); + }); + }, + nfcunload: function(){ + const sh_nfcunload = spawn('bash', ['/home/pot/bin/nfcunload.sh']); + timeclock.current_staff_id=''; + sh_nfcunload.stdout.on('data', (data) => { + console.log(`sh_nfcunload stout: ${data}`); + }); + + sh_nfcunload.stderr.on('data', (data) => { + console.error(`sh_nfcunload stderr: ${data}`); + }); + + sh_nfcunload.on('close', (code) => { + console.log(`sh_nfcunload: exit code ${code}`); + }); + }, + nfcwaitbadge: function(){ + const sh_nfcwaitbadge = spawn('bash', ['/home/pot/bin/nfcreadbadge.sh']); + timeclock.current_staff_id=''; + sh_nfcwaitbadge.stdout.on('data', (data) => { + console.log(`sh_nfcwaitbadge stout: ${data}`); + timeclock.current_staff_id=data.toString().replace(/^STAFFID:/,'').replace(/\n/g,''); + console.log("C St:->" + timeclock.current_staff_id + "<-",timeclock.current_staff_id.length); + //timeclock.userdata=usersystem.getPref('staff/' + timeclock.current_staff_id); + //console.log("Staffdata from file:",JSON.stringify(timeclock.userdata)); + if (timeclock.current_staff_id.length > 35){ + timeclock.loadtimetrack(); + } else { + app.snackbar("Unknown Badge",'red'); + timeclock.loadusers(); + } + + + }); + + sh_nfcwaitbadge.stderr.on('data', (data) => { + console.error(`sh_nfcwaitbadge stderr: ${data}`); + }); + + sh_nfcwaitbadge.on('close', (code) => { + console.log(`sh_nfcwaitbadge: exit code ${code}`); + }); + } +} + diff --git a/pointeuse/install/bin/electron/resources/app/js/sqlite.js b/pointeuse/install/bin/electron/resources/app/js/sqlite.js new file mode 100644 index 00000000..d4ab683c --- /dev/null +++ b/pointeuse/install/bin/electron/resources/app/js/sqlite.js @@ -0,0 +1,93 @@ +const sqlite3 = require('sqlite3').verbose(); + +let db = { + dbh: null, + connect: function(dbfile){ + //console.log("connect to" + dbfile); + if (db.dbh != null){ + db.disconnect(); + } + db.dbh = new sqlite3.Database(dbfile); + }, + query: function(sql){ + if (preferences.debug==1){ + console.log("query sql:",sql); + } + return new Promise((resolve, reject) => { + db.dbh.get(`${sql}`, (err, row) => { + if (err) { + reject(err); // optional: you might choose to swallow errors. + } else { + resolve(row); // accumulate the data + } + }); + }); + }, + queryarray: function(sql){ + if (preferences.debug==1){ + console.log("queryarray sql:",sql); + } + return new Promise((resolve, reject) => { + let queries = []; + //console.log("Query array",sql); + db.dbh.each(`${sql}`, (err, row) => { + //console.log("XXOK");; + if (err) { + reject(err); // optional: you might choose to swallow errors. + } else { + queries.push(row); // accumulate the data + } + }, (err, n) => { + //console.log("XXNO",err,n); + if (err) { + reject(err); // optional: again, you might choose to swallow this error. + } else { + resolve(queries); // resolve the promise + } + }); + }); + }, + querybykey: function(key,sql){ + if (preferences.debug==1){ + console.log("querybykey sql:",sql); + } + return new Promise((resolve, reject) => { + let ret = {} + db.dbh.each(`${sql}`, (err, row) => { + if (err) { + reject(err); // optional: you might choose to swallow errors. + } else { + ret[row[key]] = row; + } + }, (err, n) => { + if (err) { + reject(err); // optional: again, you might choose to swallow this error. + } else { + resolve(ret); // resolve the promise + } + }); + }); + }, + exec: function(sql,callback){ + if (preferences.debug==1){ + console.log("exec sql:",sql); + } + return new Promise((resolve, reject) => { + + db.dbh.exec(sql, (err,n) => { + if (err) { + reject(err); // optional: you might choose to swallow errors. + } else { + resolve(n); // accumulate the data + } + }); + }); + }, + newuuid: function(){ + return db.query("SELECT lower(hex( randomblob(4)) || '-' || hex( randomblob(2)) || '-' || hex( randomblob(2)) || '-' || hex( randomblob(2)) || '-' || hex(randomblob(6))) as id;"); + }, + disconnect: function(){ + db.dbh = null; + } +} + diff --git a/pointeuse/install/bin/electron/resources/app/js/sync.js b/pointeuse/install/bin/electron/resources/app/js/sync.js new file mode 100644 index 00000000..53d40154 --- /dev/null +++ b/pointeuse/install/bin/electron/resources/app/js/sync.js @@ -0,0 +1,19 @@ +let syncdata ={ + track: function(id){ + console.log("Send track id " + id); + var child = spawn('bash', ['/home/pot/bin/sendtrack.sh',id], { + detached: true, + stdio: [ 'ignore', 'ignore', 'ignore' ] + }); + child.unref(); + }, + sendnfcuid: function(staffid){ + console.log("Send badge id_staff " + staffid); + var child = spawn('bash', ['/home/pot/bin/sendnfcuid.sh',staffid], { + detached: true, + stdio: [ 'ignore', 'ignore', 'ignore' ] + }); + child.unref(); + } +} + diff --git a/pointeuse/install/bin/electron/resources/app/js/timecalc.js b/pointeuse/install/bin/electron/resources/app/js/timecalc.js new file mode 100644 index 00000000..489f487b --- /dev/null +++ b/pointeuse/install/bin/electron/resources/app/js/timecalc.js @@ -0,0 +1,129 @@ +let timecalc = { + MinutesToTime:function (minutes) { + //console.log("MtoT: " + minutes); + if ((minutes == null) || (minutes == "")){ return "00:00";}; + let hours = parseInt(minutes/60); + let restminutes = minutes-(hours*60); + //console.log("H:" + hours + " M:" +restminutes); + //console.log("H:" + timecalc.lpad(hours,2,'0') + " M:" +timecalc.lpad(restminutes,2,'0')); + return timecalc.lpad(hours,2,'0') + ":"+ timecalc.lpad(restminutes,2,'0'); + }, + TimeToMinutes:function (strtime){ + let hours = parseInt(strtime.substring(0,2)) * 60; + let minutes = parseInt(strtime.substring(3,5)); + //console.log(hours +"+" + minutes); + return hours+minutes; + }, + lpad: function(str, length,padString) { + let xstr = str.toString(); + //console.log("xstr" + xstr); + while (xstr.length < length){xstr = padString + xstr}; + return xstr; + }, + mondayBefore: function(sdate){ + if (sdate == null){ + sdate=new Date(); + } + let day = sdate.getDay(); + let prevMonday = new Date(); + if(sdate.getDay() == 0){ + prevMonday = new Date().setDate(sdate.getDate() - 0); + } + else{ + prevMonday = new Date().setDate(sdate.getDate() - day); + } + return new Date(prevMonday); + }, + sundayAfter: function(sdate){ + let nextSunday = new Date(); + }, + StringToTime: function(strin){ + strin = strin.substring(0,5); + strin = strin.replace(/\D/g,''); + if (strin.length == 0){ return "";} + if (strin.length <= 2){ + if (strin > "23") {return ""} else { + return timecalc.lpad(strin,2,'0')+":00"; + } + } else if (strin.length == 3){ + let hours = strin.substring(0,1); + let minutes = strin.substring(1,3); + if (minutes > "59"){ return "";} + return timecalc.lpad(hours,2,'0')+ ":"+ timecalc.lpad(minutes,2,'0'); + } else if (strin.length == 4){ + let hours = strin.substring(0,2); + let minutes = strin.substring(2,4); + if ((hours > "23") || (minutes > "59")){return "";} + return timecalc.lpad(hours,2,'0')+ ":"+ timecalc.lpad(minutes,2,'0'); + } + return ""; + }, + StringToInterval: function(strin){ + + if (strin.indexOf(":") > 0){ + let spl = strin.split(":"); + hours = spl[0].replace(/\D/g,''); + if (hours == ""){ + hours = "0"; + } + minutes = spl[1].replace(/\D/g,''); + if (minutes > "59"){ + minutes = "0"; + } + return hours + ":" + timecalc.lpad(minutes,2,'0'); + } + if (strin == ""){ return "";} + strin = strin.replace(/\D/g,''); + return strin + ":00"; + + }, + MinutesToInterval: function(minutes){ + if ((minutes == null) || (minutes == "")){ return "0:00";} + let prep =""; + if (minutes < 0){ + prep = "-"; + minutes = minutes * -1; + } + let hours = parseInt(minutes/60); + let restminutes = minutes-(hours*60); + return prep+hours+ ":"+ timecalc.lpad(restminutes,2,'0'); + }, + IntervalToMinutes: function(strin){ + if (strin == "" || strin == null){ + return 0; + } + let mult = 1; + if (strin.startsWith("-")){ + mult = -1; + strin = strin.replace(/-/g,''); + } + let spl = strin.split(":"); + let hours = parseInt(spl[0]) * 60; + let minutes = parseInt(spl[1]); + return (hours+minutes) * mult; + }, + validateTime(obj){ + obj.value = timecalc.StringToTime(obj.value); + return false; + }, + validateInterval(obj){ + obj.value = timecalc.StringToInterval(obj.value); + return false; + }, + // multiplyInterval(obj,factor){ + // let mval = timecalc.IntervalToMinutes(obj.value) * factor; + // obj.value = timecalc.MinutesToInterval(mval); + // return false; + // }, + copyInterval(obj,idobjout,factor){ + if (factor){ + let mval = timecalc.IntervalToMinutes(obj.value) * factor; + document.getElementById(idobjout).value = timecalc.MinutesToInterval(mval); + }else { + document.getElementById(idobjout).value=obj.value; + } + if (document.getElementById(idobjout).value == '0:00'){ + document.getElementById(idobjout).value = ''; + } + } +} diff --git a/pointeuse/install/bin/electron/resources/app/js/timeclock.fingerprint.js b/pointeuse/install/bin/electron/resources/app/js/timeclock.fingerprint.js new file mode 100644 index 00000000..550902ce --- /dev/null +++ b/pointeuse/install/bin/electron/resources/app/js/timeclock.fingerprint.js @@ -0,0 +1,333 @@ + +let timeclock = { + current_index: null, + currentuser: null, + currentpanel: null, + currentwday: null, + //tbl: null, + lasttrack: null, + interval: null, + userdata: [], + currentuserlist: 1, + intervaltime: preferences.timeout, + writefinger: null, + loadscreensaver: function(){ + console.log("Load screensaver"); + timeclock.currentpanel = 'screensaver'; + timeclock.currentuser= null; + fingerprint.unload(); + timeclock.stopCheckIdle(); + app.viewpanel('screensaver'); + return false; + }, + checkuserpin: function(){ + timeclock.stopCheckIdle(); + let pcode = document.getElementById("pincode").value; + if ((timeclock.current_index == 'admin') && (pcode == preferences.pincode)){ + app.viewpanel("admin"); + } else if (pcode == timeclock.userdata[timeclock.current_index].pin){ + //console.log("goto fingerprint registration"); + timeclock.loadfingerwriter(); + } else { + document.getElementById("pincode").value = ""; + timeclock.startCheckIdle(); + app.snackbar(lang[timeclock.userdata[timeclock.current_index].lang].pinerrormsg,'red'); + } + return false; + }, + loadstatus: function(msg){ + if (msg == null){ + msg = ''; + } + document.getElementById("statusmsg").innerHTML=msg; + //console.log("Load status"); + //timeclock.currentpanel = 'status'; + //timeclock.currentuser= null; + fingerprint.unload(); + //timeclock.tbl.clearData(); + app.viewpanel('status'); + setTimeout('timeclock.loadusers()',3000); + }, + loadusers: function(){ + console.log("Load users"); + timeclock.currentpanel = 'users'; + timeclock.currentuser= null; + fingerprint.unload(); + //timeclock.tbl.clearData(); + timeclock.currentwday= moment().format('ddd').toLowerCase(); + db.queryarray("select * from (select st.id,coalesce(st.prename,'') as prename,coalesce(st.surname,'') as surname, st.pin, count(fp.fingerhash) as fingercount,lang,"+timeclock.currentwday+"start,"+timeclock.currentwday+"end from staff st left join fingerprints fp on (st.id=fp.id_staff) where st.isenabled=true group by st.id order by st.surname,st.prename) where LENGTH(pin) > 3 or fingercount > 0 order by surname,prename;").then(data => { + let ulist = '
    '; + console.log(data); + timeclock.userdata = data; + if (timeclock.userdata.length > 24){ + document.getElementById("mnubtn_usersprev").style.display = 'block'; + document.getElementById("mnubtn_usersnext").style.display = 'block'; + } + ulistnum = 1; + for (i=0; i < timeclock.userdata.length;i++){ + //style="padding: 8px 12px!important;" + //if (timeclock.userdata[i].fingercount == 0 && timeclock.userdata[i].pin != ""){ + ulist += ''; + if (i == 23) {ulistnum++;ulist += '
    '; + document.getElementById('userlists').innerHTML=ulist; + }); + app.viewpanel('users'); + timeclock.startCheckIdle(); + return false; + }, + userselected: function(i){ + console.log("user selected!"); + var ctime= moment().format("HH:MM"); + + let showstartend=false; + let regmsg = lang[timeclock.userdata[i].lang].msgattention+"
    "; + let haswdaystart = timeclock.userdata[i][timeclock.currentwday + "start"]; + let haswdayend = timeclock.userdata[i][timeclock.currentwday + "end"]; + console.log("start:" + haswdaystart + " - END: " + haswdayend + " - CTIME: " + ctime); + if (timeclock.userdata[i].lang) { app.setlanguage(timeclock.userdata[i].lang);} + else { app.setlanguage("fr");} + if ((haswdaystart != null) && (ctime < haswdaystart)){ + regmsg += lang[timeclock.userdata[i].lang].msgstarttime+"
    "; + showstartend=true; + } + if ((haswdayend != null) && (ctime > haswdayend)){ + regmsg += lang[timeclock.userdata[i].lang].msgendtime; + showstartend=true; + } + if (showstartend == true){ + regmsg = regmsg.replace(/%%daystarttime%%/g,haswdaystart).replace(/%%dayendtime%%/g,hasdayend); + timeclock.loadstatus(regmsg); + } + else if (timeclock.userdata[i].fingercount == 0 && timeclock.userdata[i].pin != ""){ + timeclock.loadpincode(i); + } else if (timeclock.userdata[i].fingercount > 0) { + timeclock.loadfingerprint(i); + } + return false; + }, + prevusers: function(){ + let ulx = document.getElementsByClassName("userlistdata"); + console.log(ulx); + if (timeclock.currentuserlist == 1 ){ return false;} + for (u=0;u { + console.log("fingertype got!",data); + for (var d in data){ + document.getElementById("finger"+ data[d].fingertype).style.display = 'block'; + } + + fingerprint.read(); + + app.viewpanel('readfinger'); + timeclock.startCheckIdle(); + }).catch(e => { + console.log("fingerprints error!"); + }); + return false; + }, + registerfinger: function(obj,finger){ + timeclock.writefinger = finger; + var allfingers = document.getElementsByClassName("wfreg"); + for(var i=0;i { + timeclock.gettabledata(); + if (trdata){ + timeclock.lasttrack = trdata; + } + document.getElementById("lasttrack").innerHTML = "Dernier Pointage" + ((trdata.dspdaydate)?trdata.dspdaydate:"") + " "+ ((trdata.dspstamp_in)?" Entrée:" + trdata.dspstamp_in:"N/A") + " Sortie: " +((trdata.dspstamp_out)?trdata.dspstamp_out:"N/A") + ""; + let today = moment().format("YYYY-MM-DD"); + let yesterday = moment().add(-1, 'days').format("YYYY-MM-DD"); + let hournow = moment().format("HH:mm"); + console.log("today:" + today + " => now: " + hournow); + if ((trdata == null) || (trdata.stamp_in != null && trdata.stamp_out != null)){ + document.getElementById("btntrackin").disabled = false; + //document.getElementById("btntrackout").disabled = false; + } else if (trdata.stamp_in != null && trdata.stamp_out == null){ + if (((trdata.daydate == yesterday) && (hournow < "06:00")) || (trdata.daydate == today)){ + document.getElementById("btntrackout").disabled = false; + } else { + document.getElementById("btntrackin").disabled = false; + } + } + app.viewpanel('timetrack'); + timeclock.startCheckIdle(); + }).catch(e => { + console.log("SQL error: " + e); + document.getElementById("btntrackin").disabled = false; + //document.getElementById("btntrackout").disabled = false; + app.viewpanel('timetrack'); + timeclock.startCheckIdle(); + }); + + }, + setTrack:function (direction){ + let sql = ""; + db.newuuid().then(newid => { + var syncid=newid.id; + if (direction == 'in'){ + sql = "INSERT INTO timetracks (id,id_staff,daydate, stamp_in) VALUES ('"+ newid.id+"','"+timeclock.userdata[timeclock.current_index].id+"',date('now','localtime'),datetime('now','localtime'));"; + } else if (direction == 'out'){ + syncid=timeclock.lasttrack.id; + sql = "UPDATE timetracks SET stamp_out=datetime('now','localtime') where id_staff='"+ timeclock.userdata[timeclock.current_index].id+"' and id='"+timeclock.lasttrack.id+"';"; + } + + console.log("SET TrackSQL",sql); + db.exec(sql).then(data => { + var msgreg = lang["fr"].msgtrackregistered; + if (timeclock.userdata[timeclock.current_index].lang){ + msgreg = lang[timeclock.userdata[timeclock.current_index].lang].msgtrackregistered; + } + //app.snackbar('le pointage a été enregistré!','green'); + timeclock.loadstatus(msgreg); + syncdata.track(syncid); + + //timeclock.loadusers(); + }).catch(e => { + app.snackbar(e + ' erreur 1 d\'enregistrement du pointage!','red'); + }); + + }).catch(e => { + app.snackbar('erreur 2 d\'enregistrement du pointage!','red'); + }); + + + +}, + checkIdle: function (){ + //console.log("check idle"); + if (timeclock.intervaltime <= 0){ + //console.log("change view"); + timeclock.loadscreensaver(); + //req.reqdata("POST","fingerunload.cgi",{"fn":"unload"},noaction); + } else { + document.getElementById("timer").innerHTML = timeclock.intervaltime; + timeclock.intervaltime = timeclock.intervaltime - 1; + + //console.log(intervaltime); + } +}, +startCheckIdle: function (){ + window.clearInterval(timeclock.interval); + timeclock.intervaltime = preferences.timeout; + document.getElementById("timer").style.display = 'block'; + + timeclock.interval = window.setInterval("timeclock.checkIdle()",1000); + +}, +stopCheckIdle: function (){ + document.getElementById("timer").style.display = 'none'; + window.clearInterval(timeclock.interval); +}, +inittable: function (){ +// timeclock.tbl = new Tabulator("#tbl_weektracks", { +// headerSort:false, +// height: "370px", +// layout:"fitColumns", +// locale:"fr", +// columns: [ +// {title:"Date", field:"dspdaydate",align: "center"}, +// {title:"Entrée",align: "right",field:"dspstamp_in"}, +// {title:"Sortie",align: "right",field:"dspstamp_out"} +// ] +// }); +}, +setPinValue: function(key){ + var cobj = document.getElementById("pincode"); + var cpin = cobj.value; + cobj.value = cpin + key; + return false; +}, +clearUserPin: function(){ + document.getElementById("pincode").value = ""; + return false; +}, +gettabledata: function(){ + // db.queryarray("select id,id_staff,strftime('%d/%m/%Y',daydate) as dspdaydate,strftime('%H:%M',stamp_in) as dspstamp_in,strftime('%H:%M',stamp_out) as dspstamp_out from timetracks where strftime('%W',daydate) = strftime('%W',date('now','localtime')) and id_staff='" + timeclock.userdata[timeclock.current_index].id +"' order by daydate,stamp_in,stamp_out;").then(tbldata => { + // timeclock.tbl.setData(tbldata); + // }); +} + +} diff --git a/pointeuse/install/bin/electron/resources/app/js/timeclock.nfc.js b/pointeuse/install/bin/electron/resources/app/js/timeclock.nfc.js new file mode 100644 index 00000000..82903bb8 --- /dev/null +++ b/pointeuse/install/bin/electron/resources/app/js/timeclock.nfc.js @@ -0,0 +1,359 @@ + +let timeclock = { + current_index: null, + current_staff_id: null, + currentpanel: null, + currentwday: null, + tbl: null, + lasttrack: null, + interval: null, + lang: preferences.lang, + userdata: [], + weekdays:['sun','mon','tue','wed','thu','fri','sat'], + currentuserlist: 1, + intervaltime: preferences.timeout, + loadscreensaver: function(){ + timeclock.lang = "fr"; + console.log("Load screensaver"); + timeclock.currentpanel = 'screensaver'; + timeclock.currentuser= null; + shell.nfcunload(); + timeclock.stopCheckIdle(); + app.viewpanel('screensaver'); + return false; + }, + loadstatus: function(msg){ + if (msg == null){ + msg = ''; + } + document.getElementById("statusmsg").innerHTML=msg; + app.viewpanel('status'); + setTimeout('timeclock.loadscreensaver()',3000); + }, + loadusers: function(){ + console.log("Load users"); + timeclock.currentpanel = 'users'; + timeclock.current_staff_id=null; + if (preferences.pinview == "1"){ + document.getElementById("btn_haspincode").style.display = 'block'; + } else { + document.getElementById("btn_haspincode").style.display = 'none'; + } + shell.nfcwaitbadge(); + app.viewpanel('users'); + timeclock.startCheckIdle(); + return false; + }, + loaduserlist: function(){ + timeclock.stopCheckIdle(); + shell.nfcunload(); + let ulist = ""; + db.queryarray("select * from (select st.id,coalesce(st.prename,'') as prename,coalesce(st.surname,'') as surname, count(fp.id) as badgecount,st.pin, fp.id as nfcuid from staff st left join badges fp on (st.id=fp.id_staff) group by st.id order by st.surname,st.prename) where badgecount > 0 order by surname,prename;").then(data => { + console.log("userdata",data); + timeclock.userdata = data; + if (timeclock.userdata.length > 24){ + document.getElementById("mnubtn_usersprev").style.display = 'block'; + document.getElementById("mnubtn_usersnext").style.display = 'block'; + } + ulistnum = 1; + for (i=0; i < timeclock.userdata.length;i++){ + ulist += ''; + if (i == 23) {ulistnum++;ulist += '
    '; + document.getElementById('userlists').innerHTML=ulist; + app.viewpanel('userlist'); + }); + return false; + }, + + prevusers: function(){ + let ulx = document.getElementsByClassName("userlistdata"); + console.log(ulx); + if (timeclock.currentuserlist == 1 ){ return false;} + for (u=0;u 0 order by surname,prename;").then(data => { + + let ulist = document.getElementById("userlistbadge"); + ulist.innerHTML =''; + for (i=0; i < data.length;i++){ + var uadata = '
  • '+ + ''+ data[i].surname + ' ' + data[i].prename +'
    ('+data[i].nfcuid+')
    '; + console.log("has pin:",data[i].pin,preferences.pinview); + if ((preferences.pinview == "1") && (data[i].pin != null)){ + console.log("set pin button!"); + uadata += '×Pin'; + } + uadata += '×'+ + '×'+ + '
  • '; + ulist.insertAdjacentHTML("beforeend",uadata); + } + }); + }, + cleanpincode: function(iduser){ + db.exec("UPDATE staff set pin=null where id='"+iduser+"'").then(data => { + timeclock.loadbadges(); + }); + }, + addbadge: function(){ + document.getElementById("addbagescanimg").style.display ='block'; + document.getElementById("addusertobadge").style.display ='none'; + shell.nfcimportid(); + app.viewpanel('addbadge'); + }, + setbadgetouser: function(nuid){ + db.queryarray("select * from (select st.id,coalesce(st.prename,'') as prename,coalesce(st.surname,'') as surname, count(fp.id) as badgecount from staff st left join badges fp on (st.id=fp.id_staff) group by st.id order by st.surname,st.prename) where badgecount == 0 order by surname,prename;").then(data => { + document.getElementById("addbagescanimg").style.display ='none'; + document.getElementById("addusertobadge").style.display ='block'; + let ulist = document.getElementById("userlistnobadge"); + ulist.innerHTML =''; + for (i=0; i < data.length;i++){ + ulist.insertAdjacentHTML("beforeend",'
  • '+ data[i].surname + ' ' + data[i].prename +'
  • '); + } + }); + }, + savebadge: function(nuid,staffid){ + let sql = "REPLACE INTO badges (id,id_staff,type) VALUES ('" +nuid+"','" +staffid+"','nfc');"; + db.exec(sql).then(data => { + syncdata.sendnfcuid(staffid); + app.snackbar('Badge Added','green'); + timeclock.loadbadges(); + }).catch(e => { + app.snackbar('error on saving','red'); + timeclock.loadbadges();} + ); + }, + removebadge: function(staffid){ + let sql = "DELETE FROM badges where id_staff='" +staffid+"';"; + db.exec(sql).then(data => { + syncdata.sendnfcuid(staffid); + app.snackbar('badge deleted!','green'); + timeclock.loadbadges(); + }).catch(e => { + app.snackbar('error on saving','red'); + timeclock.loadbadges();} + ); + }, + loadpincode: function(uindex){ + + timeclock.current_index = uindex; + + console.log("Current Index",timeclock.current_index); + console.log("Current Userdata",timeclock.userdata[timeclock.current_index]); + timeclock.selectfield('pincode','pincode2'); + document.getElementById("pincode").value=""; + document.getElementById("pincode2").value=""; + if (timeclock.current_index == null){ + document.getElementById("lbl_username").innerHTML = "Administrator"; + //load admin + document.getElementById("pincode2").style.display="none"; + } else { + //load user + document.getElementById("lbl_username").innerHTML = timeclock.userdata[timeclock.current_index].surname + " " + timeclock.userdata[timeclock.current_index].prename; + if (timeclock.userdata[timeclock.current_index].pin == null){ + document.getElementById("pincode2").style.display="inline"; + } else { + document.getElementById("pincode2").style.display="none"; + } + } + + timeclock.startCheckIdle(); + app.viewpanel('pincode'); + return false; + }, + checkuserpin: function(){ + timeclock.stopCheckIdle(); + let pcode = document.getElementById("pincode").value; + console.log(pcode +" = " + preferences.pincode ); + console.log('CIndex',timeclock.current_index); + if (document.getElementById("pincode2").style.display == 'inline'){ + if (document.getElementById("pincode2").value != document.getElementById("pincode").value){ + document.getElementById("pincode").value = ""; + document.getElementById("pincode2").value = ""; + timeclock.startCheckIdle(); + app.snackbar(lang['fr'].pincode_notsame,'red'); + return false; + } else { + db.exec("UPDATE staff SET pin='"+document.getElementById("pincode").value+ "' where id='"+timeclock.userdata[timeclock.current_index].id+"';").then(data => { + timeclock.current_staff_id = timeclock.userdata[timeclock.current_index].id; + timeclock.loadtimetrack(); + }).catch(e => { app.snackbar("Erreur de sauvegarde!",'red');}); + + } + } + else if ((timeclock.current_index == null) && (pcode == preferences.pincode)){ + //console.log("goto badge registration"); + app.viewpanel("admin"); + } else if ((timeclock.current_index != null) && (timeclock.userdata[timeclock.current_index].pin = document.getElementById("pincode").value)){ + timeclock.current_staff_id = timeclock.userdata[timeclock.current_index].id; + timeclock.loadtimetrack(); + } + else { + document.getElementById("pincode").value = ""; + timeclock.startCheckIdle(); + app.snackbar(lang['fr'].pinerrormsg,'red'); + } + return false; + }, + selectfield: function(fid,fid2){ + timeclock.pinfield = fid; + document.getElementById(fid).style.backgroundColor = 'yellow'; + document.getElementById(fid2).style.backgroundColor = 'white'; + }, + loadtimetrack: function(){ + timeclock.stopCheckIdle(); + document.getElementById("btntrackin").disabled = true; + document.getElementById("btntrackout").disabled = true; + var sql = "select tt.id,st.id as id_staff,st.lang,st.isenabled,date('now','localtime') as today,strftime('%w',date('now','localtime')) as weekday,date('now','-1 day','localtime') as yesterday,strftime('%H:%M',time('now','localtime')) as timenow,st.prename,st.surname,st.monstart,st.monend,st.tuestart,st.tueend,st.wedstart,st.wedend,st.thustart,st.thuend,st.fristart,st.friend,st.satstart,st.satend,st.sunstart,st.sunend,tt.daydate,tt.stamp_in,tt.stamp_out from staff st left join timetracks tt on (st.id=tt.id_staff) where st.id='" + timeclock.current_staff_id + "' or tt.stamp_in=(select max(stamp_in) as stamp_in from timetracks where id_staff='" + timeclock.current_staff_id + "') order by tt.stamp_in DESC LIMIT 1;"; + db.query(sql).then(trdata => { + console.log("userdata",trdata); + + let ulang = timeclock.lang; + if (trdata.lang != null){ + ulang = trdata.lang; + timeclock.lang=trdata.lang; + } + if (trdata.isenabled != '1'){ + app.snackbar(lang[ulang].badge_notauthorized,'red'); + timeclock.startCheckIdle(); + return false; + } else { + app.setlanguage(ulang); + } + let today = trdata.today; + let yesterday = trdata.yesterday; + let hournow = trdata.timenow; + let weekday = timeclock.weekdays[trdata.weekday]; + let regmsg = ""; + if (trdata){ + timeclock.lasttrack = trdata; + + } + let notimeauth = false; + if ((trdata[weekday + "start"] != null) || (trdata[weekday + "end"] != null)){ + + if ((trdata[weekday + "start"] > hournow) || (trdata[weekday + "end"] < hournow)){ + notimeauth =true; + } + if (trdata[weekday + "start"] != null){ + regmsg += lang[ulang].msgstarttime+"
    "; + } + if (trdata[weekday + "end"] != null) { + regmsg += lang[ulang].msgendtime+"
    "; + } + } + if (notimeauth == true){ + regmsg = regmsg.replace(/%%daystarttime%%/g,trdata[weekday + "start"]).replace(/%%dayendtime%%/g,trdata[weekday + "end"]); + timeclock.loadstatus(regmsg); + return false; + } + document.getElementById("username").innerHTML = trdata.surname+" " + trdata.prename; + if (trdata.stamp_in != null && trdata.stamp_out == null){ + if (((trdata.daydate == yesterday) && (hournow < "06:00:00")) || (trdata.daydate == today)){ + document.getElementById("btntrackout").disabled = false; + } else { + document.getElementById("btntrackin").disabled = false; + } + } else { + document.getElementById("btntrackin").disabled = false; + } + app.viewpanel('timetrack'); + timeclock.startCheckIdle(); + }).catch(e => { + console.log("SQL error: " + e); + document.getElementById("btntrackin").disabled = false; + timeclock.startCheckIdle(); + return false; + }); + + }, + setTrack:function (direction){ + let sql = ""; + db.newuuid().then(newid => { + var syncid=newid.id; + if (direction == 'in'){ + sql = "INSERT INTO timetracks (id,id_staff,daydate, stamp_in) VALUES ('"+ newid.id+"','"+timeclock.current_staff_id+"',date('now','localtime'),datetime('now','localtime'));"; + } else if (direction == 'out'){ + syncid=timeclock.lasttrack.id; + sql = "UPDATE timetracks SET stamp_out=datetime('now','localtime') where id_staff='"+ timeclock.current_staff_id+"' and id='"+timeclock.lasttrack.id+"';"; + } + + //console.log("SET TrackSQL",sql); + db.exec(sql).then(data => { + console.log("LANG:" + timeclock.lang); + var msgreg = lang[timeclock.lang].msgtrackregistered; + timeclock.loadstatus(msgreg); + syncdata.track(syncid); + }).catch(e => { + app.snackbar('ERROR on saving (1)!','red'); + }); + + }).catch(e => { + app.snackbar('ERROR on saving (2)!','red'); + }); + + + +}, + checkIdle: function (){ + if (timeclock.intervaltime <= 0){ + timeclock.loadscreensaver(); + } else { + document.getElementById("timer").innerHTML = timeclock.intervaltime; + timeclock.intervaltime = timeclock.intervaltime - 1; + } +}, +startCheckIdle: function (){ + window.clearInterval(timeclock.interval); + timeclock.intervaltime = preferences.timeout; + document.getElementById("timer").style.display = 'block'; + + timeclock.interval = window.setInterval("timeclock.checkIdle()",1000); + +}, +stopCheckIdle: function (){ + document.getElementById("timer").style.display = 'none'; + window.clearInterval(timeclock.interval); +}, +setPinValue: function(key){ + var cobj = document.getElementById(timeclock.pinfield); + var cpin = cobj.value; + cobj.value = cpin + key; + return false; +}, +clearUserPin: function(){ + document.getElementById(timeclock.pinfield).value = ""; + return false; +} + + +} diff --git a/pointeuse/install/bin/electron/resources/app/main.js b/pointeuse/install/bin/electron/resources/app/main.js new file mode 100644 index 00000000..5707b362 --- /dev/null +++ b/pointeuse/install/bin/electron/resources/app/main.js @@ -0,0 +1,65 @@ +const {app, BrowserWindow} = require('electron') +const os = require('os') +const fs = require('fs') + +app.disableHardwareAcceleration() + +let mainWindow +let cdate = new Date(); +console.log(cdate.toString() + ": Start App") +function createWindow () { + let appcfg = localcfg(); + if (appcfg == null){ + console.log("No Config found!") + app.quit() + } + mainWindow = new BrowserWindow({ + show: true, + width: 800, + height: 470 , + frame: false, + webPreferences: { + nodeIntegration: true, + worldSafeExecuteJavaScript: true, + defaultEncoding: 'UTF-8', + enableRemoteModule: true, + } + }) + mainWindow.setMenu(null) + mainWindow.setBackgroundColor('#000'); + if (os.platform() != "win32"){ + mainWindow.maximize() + mainWindow.setFullScreen(true) + } + + console.log("Path:" + __dirname); + mainWindow.loadFile("index."+ appcfg.type +".html") + mainWindow.show() + mainWindow.on('closed', () => { + mainWindow = null + }) +} + +function localcfg(){ + var data = null; + cfgfile = os.homedir() + '/.hourtrax/hourtrax.json'; + if (fs.existsSync(cfgfile)){ + var data = fs.readFileSync(cfgfile, 'utf-8'); + if (data.startsWith("{") || data.startsWith("[")){ + data = JSON.parse(data); + } + return data; + } + return data; +} + +app.on('ready', createWindow) +app.on('window-all-closed', () => { + app.quit() +}) + +app.on('activate', () => { + if (mainWindow === null) { + createWindow() + } +}) diff --git a/pointeuse/install/bin/electron/resources/app/package-lock.json b/pointeuse/install/bin/electron/resources/app/package-lock.json new file mode 100644 index 00000000..99e17afa --- /dev/null +++ b/pointeuse/install/bin/electron/resources/app/package-lock.json @@ -0,0 +1,938 @@ +{ + "name": "Hourtrax", + "version": "1.0.0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "abbrev": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", + "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==" + }, + "ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "optional": true, + "requires": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" + }, + "aproba": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", + "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==" + }, + "are-we-there-yet": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz", + "integrity": "sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w==", + "requires": { + "delegates": "^1.0.0", + "readable-stream": "^2.0.6" + } + }, + "asn1": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", + "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", + "optional": true, + "requires": { + "safer-buffer": "~2.1.0" + } + }, + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=", + "optional": true + }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", + "optional": true + }, + "aws-sign2": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", + "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=", + "optional": true + }, + "aws4": { + "version": "1.10.1", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.10.1.tgz", + "integrity": "sha512-zg7Hz2k5lI8kb7U32998pRRFin7zJlkfezGJjUc2heaD4Pw2wObakCDVzkKztTm/Ln7eiVvYsjqak0Ed4LkMDA==", + "optional": true + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" + }, + "bcrypt-pbkdf": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", + "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", + "optional": true, + "requires": { + "tweetnacl": "^0.14.3" + } + }, + "block-stream": { + "version": "0.0.9", + "resolved": "https://registry.npmjs.org/block-stream/-/block-stream-0.0.9.tgz", + "integrity": "sha1-E+v+d4oDIFz+A3UUgeu0szAMEmo=", + "optional": true, + "requires": { + "inherits": "~2.0.0" + } + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "caseless": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=", + "optional": true + }, + "chownr": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", + "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==" + }, + "code-point-at": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=" + }, + "combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "optional": true, + "requires": { + "delayed-stream": "~1.0.0" + } + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" + }, + "console-control-strings": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", + "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=" + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" + }, + "dashdash": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", + "optional": true, + "requires": { + "assert-plus": "^1.0.0" + } + }, + "debug": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", + "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "requires": { + "ms": "^2.1.1" + } + }, + "deep-extend": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", + "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==" + }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", + "optional": true + }, + "delegates": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", + "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=" + }, + "detect-libc": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", + "integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=" + }, + "ecc-jsbn": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", + "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", + "optional": true, + "requires": { + "jsbn": "~0.1.0", + "safer-buffer": "^2.1.0" + } + }, + "extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", + "optional": true + }, + "extsprintf": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", + "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=", + "optional": true + }, + "fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "optional": true + }, + "fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "optional": true + }, + "forever-agent": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=", + "optional": true + }, + "form-data": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", + "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", + "optional": true, + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + } + }, + "fs-minipass": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.7.tgz", + "integrity": "sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA==", + "requires": { + "minipass": "^2.6.0" + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" + }, + "fstream": { + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/fstream/-/fstream-1.0.12.tgz", + "integrity": "sha512-WvJ193OHa0GHPEL+AycEJgxvBEwyfRkN1vhjca23OaPVMCaLCXTd5qAu82AjTcgP1UJmytkOKb63Ypde7raDIg==", + "optional": true, + "requires": { + "graceful-fs": "^4.1.2", + "inherits": "~2.0.0", + "mkdirp": ">=0.5 0", + "rimraf": "2" + } + }, + "gauge": { + "version": "2.7.4", + "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", + "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=", + "requires": { + "aproba": "^1.0.3", + "console-control-strings": "^1.0.0", + "has-unicode": "^2.0.0", + "object-assign": "^4.1.0", + "signal-exit": "^3.0.0", + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wide-align": "^1.1.0" + } + }, + "getpass": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", + "optional": true, + "requires": { + "assert-plus": "^1.0.0" + } + }, + "glob": { + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", + "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "graceful-fs": { + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.4.tgz", + "integrity": "sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw==", + "optional": true + }, + "har-schema": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", + "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=", + "optional": true + }, + "har-validator": { + "version": "5.1.5", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz", + "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", + "optional": true, + "requires": { + "ajv": "^6.12.3", + "har-schema": "^2.0.0" + } + }, + "has-unicode": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", + "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=" + }, + "http-signature": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", + "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", + "optional": true, + "requires": { + "assert-plus": "^1.0.0", + "jsprim": "^1.2.2", + "sshpk": "^1.7.0" + } + }, + "iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + }, + "ignore-walk": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-3.0.3.tgz", + "integrity": "sha512-m7o6xuOaT1aqheYHKf8W6J5pYH85ZI9w077erOzLje3JsB1gkafkAhHHY19dqjulgIZHFm32Cp5uNZgcQqdJKw==", + "requires": { + "minimatch": "^3.0.4" + } + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "ini": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==" + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=", + "optional": true + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "optional": true + }, + "isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=", + "optional": true + }, + "jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", + "optional": true + }, + "json-schema": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", + "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=", + "optional": true + }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "optional": true + }, + "json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", + "optional": true + }, + "jsprim": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", + "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", + "optional": true, + "requires": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.2.3", + "verror": "1.10.0" + } + }, + "mime-db": { + "version": "1.44.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.44.0.tgz", + "integrity": "sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg==", + "optional": true + }, + "mime-types": { + "version": "2.1.27", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.27.tgz", + "integrity": "sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w==", + "optional": true, + "requires": { + "mime-db": "1.44.0" + } + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" + }, + "minipass": { + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.9.0.tgz", + "integrity": "sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg==", + "requires": { + "safe-buffer": "^5.1.2", + "yallist": "^3.0.0" + } + }, + "minizlib": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-1.3.3.tgz", + "integrity": "sha512-6ZYMOEnmVsdCeTJVE0W9ZD+pVnE8h9Hma/iOwwRDsdQoePpoX56/8B6z3P9VNwppJuBKNRuFDRNRqRWexT9G9Q==", + "requires": { + "minipass": "^2.9.0" + } + }, + "mkdirp": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", + "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", + "requires": { + "minimist": "^1.2.5" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + }, + "needle": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/needle/-/needle-2.5.2.tgz", + "integrity": "sha512-LbRIwS9BfkPvNwNHlsA41Q29kL2L/6VaOJ0qisM5lLWsTV3nP15abO5ITL6L81zqFhzjRKDAYjpcBcwM0AVvLQ==", + "requires": { + "debug": "^3.2.6", + "iconv-lite": "^0.4.4", + "sax": "^1.2.4" + } + }, + "node-addon-api": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-2.0.0.tgz", + "integrity": "sha512-ASCL5U13as7HhOExbT6OlWJJUV/lLzL2voOSP1UVehpRD8FbSrSDjfScK/KwAvVTI5AS6r4VwbOMlIqtvRidnA==" + }, + "node-gyp": { + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-3.8.0.tgz", + "integrity": "sha512-3g8lYefrRRzvGeSowdJKAKyks8oUpLEd/DyPV4eMhVlhJ0aNaZqIrNUIPuEWWTAoPqyFkfGrM67MC69baqn6vA==", + "optional": true, + "requires": { + "fstream": "^1.0.0", + "glob": "^7.0.3", + "graceful-fs": "^4.1.2", + "mkdirp": "^0.5.0", + "nopt": "2 || 3", + "npmlog": "0 || 1 || 2 || 3 || 4", + "osenv": "0", + "request": "^2.87.0", + "rimraf": "2", + "semver": "~5.3.0", + "tar": "^2.0.0", + "which": "1" + } + }, + "node-pre-gyp": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/node-pre-gyp/-/node-pre-gyp-0.11.0.tgz", + "integrity": "sha512-TwWAOZb0j7e9eGaf9esRx3ZcLaE5tQ2lvYy1pb5IAaG1a2e2Kv5Lms1Y4hpj+ciXJRofIxxlt5haeQ/2ANeE0Q==", + "requires": { + "detect-libc": "^1.0.2", + "mkdirp": "^0.5.1", + "needle": "^2.2.1", + "nopt": "^4.0.1", + "npm-packlist": "^1.1.6", + "npmlog": "^4.0.2", + "rc": "^1.2.7", + "rimraf": "^2.6.1", + "semver": "^5.3.0", + "tar": "^4" + }, + "dependencies": { + "nopt": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.3.tgz", + "integrity": "sha512-CvaGwVMztSMJLOeXPrez7fyfObdZqNUK1cPAEzLHrTybIua9pMdmmPR5YwtfNftIOMv3DPUhFaxsZMNTQO20Kg==", + "requires": { + "abbrev": "1", + "osenv": "^0.1.4" + } + }, + "tar": { + "version": "4.4.13", + "resolved": "https://registry.npmjs.org/tar/-/tar-4.4.13.tgz", + "integrity": "sha512-w2VwSrBoHa5BsSyH+KxEqeQBAllHhccyMFVHtGtdMpF4W7IRWfZjFiQceJPChOeTsSDVUpER2T8FA93pr0L+QA==", + "requires": { + "chownr": "^1.1.1", + "fs-minipass": "^1.2.5", + "minipass": "^2.8.6", + "minizlib": "^1.2.1", + "mkdirp": "^0.5.0", + "safe-buffer": "^5.1.2", + "yallist": "^3.0.3" + } + } + } + }, + "nopt": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", + "integrity": "sha1-xkZdvwirzU2zWTF/eaxopkayj/k=", + "optional": true, + "requires": { + "abbrev": "1" + } + }, + "npm-bundled": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-1.1.1.tgz", + "integrity": "sha512-gqkfgGePhTpAEgUsGEgcq1rqPXA+tv/aVBlgEzfXwA1yiUJF7xtEt3CtVwOjNYQOVknDk0F20w58Fnm3EtG0fA==", + "requires": { + "npm-normalize-package-bin": "^1.0.1" + } + }, + "npm-normalize-package-bin": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-1.0.1.tgz", + "integrity": "sha512-EPfafl6JL5/rU+ot6P3gRSCpPDW5VmIzX959Ob1+ySFUuuYHWHekXpwdUZcKP5C+DS4GEtdJluwBjnsNDl+fSA==" + }, + "npm-packlist": { + "version": "1.4.8", + "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-1.4.8.tgz", + "integrity": "sha512-5+AZgwru5IevF5ZdnFglB5wNlHG1AOOuw28WhUq8/8emhBmLv6jX5by4WJCh7lW0uSYZYS6DXqIsyZVIXRZU9A==", + "requires": { + "ignore-walk": "^3.0.1", + "npm-bundled": "^1.0.1", + "npm-normalize-package-bin": "^1.0.1" + } + }, + "npmlog": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz", + "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", + "requires": { + "are-we-there-yet": "~1.1.2", + "console-control-strings": "~1.1.0", + "gauge": "~2.7.3", + "set-blocking": "~2.0.0" + } + }, + "number-is-nan": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=" + }, + "oauth-sign": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", + "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", + "optional": true + }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "requires": { + "wrappy": "1" + } + }, + "os-homedir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", + "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=" + }, + "os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=" + }, + "osenv": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz", + "integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==", + "requires": { + "os-homedir": "^1.0.0", + "os-tmpdir": "^1.0.0" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" + }, + "performance-now": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", + "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=", + "optional": true + }, + "process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" + }, + "psl": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", + "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==", + "optional": true + }, + "punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "optional": true + }, + "qs": { + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", + "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==", + "optional": true + }, + "rc": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", + "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", + "requires": { + "deep-extend": "^0.6.0", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" + } + }, + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "request": { + "version": "2.88.2", + "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", + "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", + "optional": true, + "requires": { + "aws-sign2": "~0.7.0", + "aws4": "^1.8.0", + "caseless": "~0.12.0", + "combined-stream": "~1.0.6", + "extend": "~3.0.2", + "forever-agent": "~0.6.1", + "form-data": "~2.3.2", + "har-validator": "~5.1.3", + "http-signature": "~1.2.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.19", + "oauth-sign": "~0.9.0", + "performance-now": "^2.1.0", + "qs": "~6.5.2", + "safe-buffer": "^5.1.2", + "tough-cookie": "~2.5.0", + "tunnel-agent": "^0.6.0", + "uuid": "^3.3.2" + } + }, + "rimraf": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", + "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", + "requires": { + "glob": "^7.1.3" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + }, + "sax": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", + "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==" + }, + "semver": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz", + "integrity": "sha1-myzl094C0XxgEq0yaqa00M9U+U8=" + }, + "set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" + }, + "signal-exit": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz", + "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==" + }, + "sqlite3": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/sqlite3/-/sqlite3-5.0.0.tgz", + "integrity": "sha512-rjvqHFUaSGnzxDy2AHCwhHy6Zp6MNJzCPGYju4kD8yi6bze4d1/zMTg6C7JI49b7/EM7jKMTvyfN/4ylBKdwfw==", + "requires": { + "node-addon-api": "2.0.0", + "node-gyp": "3.x", + "node-pre-gyp": "^0.11.0" + } + }, + "sshpk": { + "version": "1.16.1", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz", + "integrity": "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==", + "optional": true, + "requires": { + "asn1": "~0.2.3", + "assert-plus": "^1.0.0", + "bcrypt-pbkdf": "^1.0.0", + "dashdash": "^1.12.0", + "ecc-jsbn": "~0.1.1", + "getpass": "^0.1.1", + "jsbn": "~0.1.0", + "safer-buffer": "^2.0.2", + "tweetnacl": "~0.14.0" + } + }, + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=" + }, + "tar": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/tar/-/tar-2.2.2.tgz", + "integrity": "sha512-FCEhQ/4rE1zYv9rYXJw/msRqsnmlje5jHP6huWeBZ704jUTy02c5AZyWujpMR1ax6mVw9NyJMfuK2CMDWVIfgA==", + "optional": true, + "requires": { + "block-stream": "*", + "fstream": "^1.0.12", + "inherits": "2" + } + }, + "tough-cookie": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", + "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", + "optional": true, + "requires": { + "psl": "^1.1.28", + "punycode": "^2.1.1" + } + }, + "tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", + "optional": true, + "requires": { + "safe-buffer": "^5.0.1" + } + }, + "tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", + "optional": true + }, + "uri-js": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.0.tgz", + "integrity": "sha512-B0yRTzYdUCCn9n+F4+Gh4yIDtMQcaJsmYBDsTSG8g/OejKBodLQ2IHfN3bM7jUsRXndopT7OIXWdYqc1fjmV6g==", + "optional": true, + "requires": { + "punycode": "^2.1.0" + } + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" + }, + "uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", + "optional": true + }, + "verror": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", + "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", + "optional": true, + "requires": { + "assert-plus": "^1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "^1.2.0" + } + }, + "which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "optional": true, + "requires": { + "isexe": "^2.0.0" + } + }, + "wide-align": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", + "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", + "requires": { + "string-width": "^1.0.2 || 2" + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + }, + "yallist": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==" + } + } +} diff --git a/pointeuse/install/bin/electron/resources/app/package.json b/pointeuse/install/bin/electron/resources/app/package.json new file mode 100644 index 00000000..3d27b5fc --- /dev/null +++ b/pointeuse/install/bin/electron/resources/app/package.json @@ -0,0 +1,10 @@ +{ + "name": "Hourtrax", + "version": "1.0.0", + "main": "main.js", + "author": "POT s.à r.l.", + "license": "UNLICENSED", + "dependencies": { + "sqlite3": "^5.0.0" + } +} diff --git a/pointeuse/install/bin/electron/resources/app/vendor/moment/locales.js b/pointeuse/install/bin/electron/resources/app/vendor/moment/locales.js new file mode 100644 index 00000000..caabe6a1 --- /dev/null +++ b/pointeuse/install/bin/electron/resources/app/vendor/moment/locales.js @@ -0,0 +1,12105 @@ +;(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' + && typeof require === 'function' ? factory(require('../moment')) : + typeof define === 'function' && define.amd ? define(['../moment'], factory) : + factory(global.moment) +}(this, (function (moment) { 'use strict'; + + //! moment.js locale configuration + + moment.defineLocale('af', { + months: 'Januarie_Februarie_Maart_April_Mei_Junie_Julie_Augustus_September_Oktober_November_Desember'.split( + '_' + ), + monthsShort: 'Jan_Feb_Mrt_Apr_Mei_Jun_Jul_Aug_Sep_Okt_Nov_Des'.split('_'), + weekdays: 'Sondag_Maandag_Dinsdag_Woensdag_Donderdag_Vrydag_Saterdag'.split( + '_' + ), + weekdaysShort: 'Son_Maa_Din_Woe_Don_Vry_Sat'.split('_'), + weekdaysMin: 'So_Ma_Di_Wo_Do_Vr_Sa'.split('_'), + meridiemParse: /vm|nm/i, + isPM: function (input) { + return /^nm$/i.test(input); + }, + meridiem: function (hours, minutes, isLower) { + if (hours < 12) { + return isLower ? 'vm' : 'VM'; + } else { + return isLower ? 'nm' : 'NM'; + } + }, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[Vandag om] LT', + nextDay: '[Môre om] LT', + nextWeek: 'dddd [om] LT', + lastDay: '[Gister om] LT', + lastWeek: '[Laas] dddd [om] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'oor %s', + past: '%s gelede', + s: "'n paar sekondes", + ss: '%d sekondes', + m: "'n minuut", + mm: '%d minute', + h: "'n uur", + hh: '%d ure', + d: "'n dag", + dd: '%d dae', + M: "'n maand", + MM: '%d maande', + y: "'n jaar", + yy: '%d jaar', + }, + dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/, + ordinal: function (number) { + return ( + number + + (number === 1 || number === 8 || number >= 20 ? 'ste' : 'de') + ); // Thanks to Joris Röling : https://github.com/jjupiter + }, + week: { + dow: 1, // Maandag is die eerste dag van die week. + doy: 4, // Die week wat die 4de Januarie bevat is die eerste week van die jaar. + }, + }); + + //! moment.js locale configuration + + var pluralForm = function (n) { + return n === 0 + ? 0 + : n === 1 + ? 1 + : n === 2 + ? 2 + : n % 100 >= 3 && n % 100 <= 10 + ? 3 + : n % 100 >= 11 + ? 4 + : 5; + }, + plurals = { + s: [ + 'أقل من ثانية', + 'ثانية واحدة', + ['ثانيتان', 'ثانيتين'], + '%d ثوان', + '%d ثانية', + '%d ثانية', + ], + m: [ + 'أقل من دقيقة', + 'دقيقة واحدة', + ['دقيقتان', 'دقيقتين'], + '%d دقائق', + '%d دقيقة', + '%d دقيقة', + ], + h: [ + 'أقل من ساعة', + 'ساعة واحدة', + ['ساعتان', 'ساعتين'], + '%d ساعات', + '%d ساعة', + '%d ساعة', + ], + d: [ + 'أقل من يوم', + 'يوم واحد', + ['يومان', 'يومين'], + '%d أيام', + '%d يومًا', + '%d يوم', + ], + M: [ + 'أقل من شهر', + 'شهر واحد', + ['شهران', 'شهرين'], + '%d أشهر', + '%d شهرا', + '%d شهر', + ], + y: [ + 'أقل من عام', + 'عام واحد', + ['عامان', 'عامين'], + '%d أعوام', + '%d عامًا', + '%d عام', + ], + }, + pluralize = function (u) { + return function (number, withoutSuffix, string, isFuture) { + var f = pluralForm(number), + str = plurals[u][pluralForm(number)]; + if (f === 2) { + str = str[withoutSuffix ? 0 : 1]; + } + return str.replace(/%d/i, number); + }; + }, + months = [ + 'جانفي', + 'فيفري', + 'مارس', + 'أفريل', + 'ماي', + 'جوان', + 'جويلية', + 'أوت', + 'سبتمبر', + 'أكتوبر', + 'نوفمبر', + 'ديسمبر', + ]; + + moment.defineLocale('ar-dz', { + months: months, + monthsShort: months, + weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'), + weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'), + weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'D/\u200FM/\u200FYYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd D MMMM YYYY HH:mm', + }, + meridiemParse: /ص|م/, + isPM: function (input) { + return 'م' === input; + }, + meridiem: function (hour, minute, isLower) { + if (hour < 12) { + return 'ص'; + } else { + return 'م'; + } + }, + calendar: { + sameDay: '[اليوم عند الساعة] LT', + nextDay: '[غدًا عند الساعة] LT', + nextWeek: 'dddd [عند الساعة] LT', + lastDay: '[أمس عند الساعة] LT', + lastWeek: 'dddd [عند الساعة] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'بعد %s', + past: 'منذ %s', + s: pluralize('s'), + ss: pluralize('s'), + m: pluralize('m'), + mm: pluralize('m'), + h: pluralize('h'), + hh: pluralize('h'), + d: pluralize('d'), + dd: pluralize('d'), + M: pluralize('M'), + MM: pluralize('M'), + y: pluralize('y'), + yy: pluralize('y'), + }, + postformat: function (string) { + return string.replace(/,/g, '،'); + }, + week: { + dow: 0, // Sunday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + moment.defineLocale('ar-kw', { + months: 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split( + '_' + ), + monthsShort: 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split( + '_' + ), + weekdays: 'الأحد_الإتنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'), + weekdaysShort: 'احد_اتنين_ثلاثاء_اربعاء_خميس_جمعة_سبت'.split('_'), + weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[اليوم على الساعة] LT', + nextDay: '[غدا على الساعة] LT', + nextWeek: 'dddd [على الساعة] LT', + lastDay: '[أمس على الساعة] LT', + lastWeek: 'dddd [على الساعة] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'في %s', + past: 'منذ %s', + s: 'ثوان', + ss: '%d ثانية', + m: 'دقيقة', + mm: '%d دقائق', + h: 'ساعة', + hh: '%d ساعات', + d: 'يوم', + dd: '%d أيام', + M: 'شهر', + MM: '%d أشهر', + y: 'سنة', + yy: '%d سنوات', + }, + week: { + dow: 0, // Sunday is the first day of the week. + doy: 12, // The week that contains Jan 12th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var symbolMap = { + '1': '1', + '2': '2', + '3': '3', + '4': '4', + '5': '5', + '6': '6', + '7': '7', + '8': '8', + '9': '9', + '0': '0', + }, + pluralForm$1 = function (n) { + return n === 0 + ? 0 + : n === 1 + ? 1 + : n === 2 + ? 2 + : n % 100 >= 3 && n % 100 <= 10 + ? 3 + : n % 100 >= 11 + ? 4 + : 5; + }, + plurals$1 = { + s: [ + 'أقل من ثانية', + 'ثانية واحدة', + ['ثانيتان', 'ثانيتين'], + '%d ثوان', + '%d ثانية', + '%d ثانية', + ], + m: [ + 'أقل من دقيقة', + 'دقيقة واحدة', + ['دقيقتان', 'دقيقتين'], + '%d دقائق', + '%d دقيقة', + '%d دقيقة', + ], + h: [ + 'أقل من ساعة', + 'ساعة واحدة', + ['ساعتان', 'ساعتين'], + '%d ساعات', + '%d ساعة', + '%d ساعة', + ], + d: [ + 'أقل من يوم', + 'يوم واحد', + ['يومان', 'يومين'], + '%d أيام', + '%d يومًا', + '%d يوم', + ], + M: [ + 'أقل من شهر', + 'شهر واحد', + ['شهران', 'شهرين'], + '%d أشهر', + '%d شهرا', + '%d شهر', + ], + y: [ + 'أقل من عام', + 'عام واحد', + ['عامان', 'عامين'], + '%d أعوام', + '%d عامًا', + '%d عام', + ], + }, + pluralize$1 = function (u) { + return function (number, withoutSuffix, string, isFuture) { + var f = pluralForm$1(number), + str = plurals$1[u][pluralForm$1(number)]; + if (f === 2) { + str = str[withoutSuffix ? 0 : 1]; + } + return str.replace(/%d/i, number); + }; + }, + months$1 = [ + 'يناير', + 'فبراير', + 'مارس', + 'أبريل', + 'مايو', + 'يونيو', + 'يوليو', + 'أغسطس', + 'سبتمبر', + 'أكتوبر', + 'نوفمبر', + 'ديسمبر', + ]; + + moment.defineLocale('ar-ly', { + months: months$1, + monthsShort: months$1, + weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'), + weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'), + weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'D/\u200FM/\u200FYYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd D MMMM YYYY HH:mm', + }, + meridiemParse: /ص|م/, + isPM: function (input) { + return 'م' === input; + }, + meridiem: function (hour, minute, isLower) { + if (hour < 12) { + return 'ص'; + } else { + return 'م'; + } + }, + calendar: { + sameDay: '[اليوم عند الساعة] LT', + nextDay: '[غدًا عند الساعة] LT', + nextWeek: 'dddd [عند الساعة] LT', + lastDay: '[أمس عند الساعة] LT', + lastWeek: 'dddd [عند الساعة] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'بعد %s', + past: 'منذ %s', + s: pluralize$1('s'), + ss: pluralize$1('s'), + m: pluralize$1('m'), + mm: pluralize$1('m'), + h: pluralize$1('h'), + hh: pluralize$1('h'), + d: pluralize$1('d'), + dd: pluralize$1('d'), + M: pluralize$1('M'), + MM: pluralize$1('M'), + y: pluralize$1('y'), + yy: pluralize$1('y'), + }, + preparse: function (string) { + return string.replace(/،/g, ','); + }, + postformat: function (string) { + return string + .replace(/\d/g, function (match) { + return symbolMap[match]; + }) + .replace(/,/g, '،'); + }, + week: { + dow: 6, // Saturday is the first day of the week. + doy: 12, // The week that contains Jan 12th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + moment.defineLocale('ar-ma', { + months: 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split( + '_' + ), + monthsShort: 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split( + '_' + ), + weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'), + weekdaysShort: 'احد_اثنين_ثلاثاء_اربعاء_خميس_جمعة_سبت'.split('_'), + weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[اليوم على الساعة] LT', + nextDay: '[غدا على الساعة] LT', + nextWeek: 'dddd [على الساعة] LT', + lastDay: '[أمس على الساعة] LT', + lastWeek: 'dddd [على الساعة] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'في %s', + past: 'منذ %s', + s: 'ثوان', + ss: '%d ثانية', + m: 'دقيقة', + mm: '%d دقائق', + h: 'ساعة', + hh: '%d ساعات', + d: 'يوم', + dd: '%d أيام', + M: 'شهر', + MM: '%d أشهر', + y: 'سنة', + yy: '%d سنوات', + }, + week: { + dow: 6, // Saturday is the first day of the week. + doy: 12, // The week that contains Jan 12th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var symbolMap$1 = { + '1': '١', + '2': '٢', + '3': '٣', + '4': '٤', + '5': '٥', + '6': '٦', + '7': '٧', + '8': '٨', + '9': '٩', + '0': '٠', + }, + numberMap = { + '١': '1', + '٢': '2', + '٣': '3', + '٤': '4', + '٥': '5', + '٦': '6', + '٧': '7', + '٨': '8', + '٩': '9', + '٠': '0', + }; + + moment.defineLocale('ar-sa', { + months: 'يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split( + '_' + ), + monthsShort: 'يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split( + '_' + ), + weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'), + weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'), + weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd D MMMM YYYY HH:mm', + }, + meridiemParse: /ص|م/, + isPM: function (input) { + return 'م' === input; + }, + meridiem: function (hour, minute, isLower) { + if (hour < 12) { + return 'ص'; + } else { + return 'م'; + } + }, + calendar: { + sameDay: '[اليوم على الساعة] LT', + nextDay: '[غدا على الساعة] LT', + nextWeek: 'dddd [على الساعة] LT', + lastDay: '[أمس على الساعة] LT', + lastWeek: 'dddd [على الساعة] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'في %s', + past: 'منذ %s', + s: 'ثوان', + ss: '%d ثانية', + m: 'دقيقة', + mm: '%d دقائق', + h: 'ساعة', + hh: '%d ساعات', + d: 'يوم', + dd: '%d أيام', + M: 'شهر', + MM: '%d أشهر', + y: 'سنة', + yy: '%d سنوات', + }, + preparse: function (string) { + return string + .replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) { + return numberMap[match]; + }) + .replace(/،/g, ','); + }, + postformat: function (string) { + return string + .replace(/\d/g, function (match) { + return symbolMap$1[match]; + }) + .replace(/,/g, '،'); + }, + week: { + dow: 0, // Sunday is the first day of the week. + doy: 6, // The week that contains Jan 6th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + moment.defineLocale('ar-tn', { + months: 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split( + '_' + ), + monthsShort: 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split( + '_' + ), + weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'), + weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'), + weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[اليوم على الساعة] LT', + nextDay: '[غدا على الساعة] LT', + nextWeek: 'dddd [على الساعة] LT', + lastDay: '[أمس على الساعة] LT', + lastWeek: 'dddd [على الساعة] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'في %s', + past: 'منذ %s', + s: 'ثوان', + ss: '%d ثانية', + m: 'دقيقة', + mm: '%d دقائق', + h: 'ساعة', + hh: '%d ساعات', + d: 'يوم', + dd: '%d أيام', + M: 'شهر', + MM: '%d أشهر', + y: 'سنة', + yy: '%d سنوات', + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var symbolMap$2 = { + '1': '١', + '2': '٢', + '3': '٣', + '4': '٤', + '5': '٥', + '6': '٦', + '7': '٧', + '8': '٨', + '9': '٩', + '0': '٠', + }, + numberMap$1 = { + '١': '1', + '٢': '2', + '٣': '3', + '٤': '4', + '٥': '5', + '٦': '6', + '٧': '7', + '٨': '8', + '٩': '9', + '٠': '0', + }, + pluralForm$2 = function (n) { + return n === 0 + ? 0 + : n === 1 + ? 1 + : n === 2 + ? 2 + : n % 100 >= 3 && n % 100 <= 10 + ? 3 + : n % 100 >= 11 + ? 4 + : 5; + }, + plurals$2 = { + s: [ + 'أقل من ثانية', + 'ثانية واحدة', + ['ثانيتان', 'ثانيتين'], + '%d ثوان', + '%d ثانية', + '%d ثانية', + ], + m: [ + 'أقل من دقيقة', + 'دقيقة واحدة', + ['دقيقتان', 'دقيقتين'], + '%d دقائق', + '%d دقيقة', + '%d دقيقة', + ], + h: [ + 'أقل من ساعة', + 'ساعة واحدة', + ['ساعتان', 'ساعتين'], + '%d ساعات', + '%d ساعة', + '%d ساعة', + ], + d: [ + 'أقل من يوم', + 'يوم واحد', + ['يومان', 'يومين'], + '%d أيام', + '%d يومًا', + '%d يوم', + ], + M: [ + 'أقل من شهر', + 'شهر واحد', + ['شهران', 'شهرين'], + '%d أشهر', + '%d شهرا', + '%d شهر', + ], + y: [ + 'أقل من عام', + 'عام واحد', + ['عامان', 'عامين'], + '%d أعوام', + '%d عامًا', + '%d عام', + ], + }, + pluralize$2 = function (u) { + return function (number, withoutSuffix, string, isFuture) { + var f = pluralForm$2(number), + str = plurals$2[u][pluralForm$2(number)]; + if (f === 2) { + str = str[withoutSuffix ? 0 : 1]; + } + return str.replace(/%d/i, number); + }; + }, + months$2 = [ + 'يناير', + 'فبراير', + 'مارس', + 'أبريل', + 'مايو', + 'يونيو', + 'يوليو', + 'أغسطس', + 'سبتمبر', + 'أكتوبر', + 'نوفمبر', + 'ديسمبر', + ]; + + moment.defineLocale('ar', { + months: months$2, + monthsShort: months$2, + weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'), + weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'), + weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'D/\u200FM/\u200FYYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd D MMMM YYYY HH:mm', + }, + meridiemParse: /ص|م/, + isPM: function (input) { + return 'م' === input; + }, + meridiem: function (hour, minute, isLower) { + if (hour < 12) { + return 'ص'; + } else { + return 'م'; + } + }, + calendar: { + sameDay: '[اليوم عند الساعة] LT', + nextDay: '[غدًا عند الساعة] LT', + nextWeek: 'dddd [عند الساعة] LT', + lastDay: '[أمس عند الساعة] LT', + lastWeek: 'dddd [عند الساعة] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'بعد %s', + past: 'منذ %s', + s: pluralize$2('s'), + ss: pluralize$2('s'), + m: pluralize$2('m'), + mm: pluralize$2('m'), + h: pluralize$2('h'), + hh: pluralize$2('h'), + d: pluralize$2('d'), + dd: pluralize$2('d'), + M: pluralize$2('M'), + MM: pluralize$2('M'), + y: pluralize$2('y'), + yy: pluralize$2('y'), + }, + preparse: function (string) { + return string + .replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) { + return numberMap$1[match]; + }) + .replace(/،/g, ','); + }, + postformat: function (string) { + return string + .replace(/\d/g, function (match) { + return symbolMap$2[match]; + }) + .replace(/,/g, '،'); + }, + week: { + dow: 6, // Saturday is the first day of the week. + doy: 12, // The week that contains Jan 12th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var suffixes = { + 1: '-inci', + 5: '-inci', + 8: '-inci', + 70: '-inci', + 80: '-inci', + 2: '-nci', + 7: '-nci', + 20: '-nci', + 50: '-nci', + 3: '-üncü', + 4: '-üncü', + 100: '-üncü', + 6: '-ncı', + 9: '-uncu', + 10: '-uncu', + 30: '-uncu', + 60: '-ıncı', + 90: '-ıncı', + }; + + moment.defineLocale('az', { + months: 'yanvar_fevral_mart_aprel_may_iyun_iyul_avqust_sentyabr_oktyabr_noyabr_dekabr'.split( + '_' + ), + monthsShort: 'yan_fev_mar_apr_may_iyn_iyl_avq_sen_okt_noy_dek'.split('_'), + weekdays: 'Bazar_Bazar ertəsi_Çərşənbə axşamı_Çərşənbə_Cümə axşamı_Cümə_Şənbə'.split( + '_' + ), + weekdaysShort: 'Baz_BzE_ÇAx_Çər_CAx_Cüm_Şən'.split('_'), + weekdaysMin: 'Bz_BE_ÇA_Çə_CA_Cü_Şə'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[bugün saat] LT', + nextDay: '[sabah saat] LT', + nextWeek: '[gələn həftə] dddd [saat] LT', + lastDay: '[dünən] LT', + lastWeek: '[keçən həftə] dddd [saat] LT', + sameElse: 'L', + }, + relativeTime: { + future: '%s sonra', + past: '%s əvvəl', + s: 'bir neçə saniyə', + ss: '%d saniyə', + m: 'bir dəqiqə', + mm: '%d dəqiqə', + h: 'bir saat', + hh: '%d saat', + d: 'bir gün', + dd: '%d gün', + M: 'bir ay', + MM: '%d ay', + y: 'bir il', + yy: '%d il', + }, + meridiemParse: /gecə|səhər|gündüz|axşam/, + isPM: function (input) { + return /^(gündüz|axşam)$/.test(input); + }, + meridiem: function (hour, minute, isLower) { + if (hour < 4) { + return 'gecə'; + } else if (hour < 12) { + return 'səhər'; + } else if (hour < 17) { + return 'gündüz'; + } else { + return 'axşam'; + } + }, + dayOfMonthOrdinalParse: /\d{1,2}-(ıncı|inci|nci|üncü|ncı|uncu)/, + ordinal: function (number) { + if (number === 0) { + // special case for zero + return number + '-ıncı'; + } + var a = number % 10, + b = (number % 100) - a, + c = number >= 100 ? 100 : null; + return number + (suffixes[a] || suffixes[b] || suffixes[c]); + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 7, // The week that contains Jan 7th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + function plural(word, num) { + var forms = word.split('_'); + return num % 10 === 1 && num % 100 !== 11 + ? forms[0] + : num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20) + ? forms[1] + : forms[2]; + } + function relativeTimeWithPlural(number, withoutSuffix, key) { + var format = { + ss: withoutSuffix ? 'секунда_секунды_секунд' : 'секунду_секунды_секунд', + mm: withoutSuffix ? 'хвіліна_хвіліны_хвілін' : 'хвіліну_хвіліны_хвілін', + hh: withoutSuffix ? 'гадзіна_гадзіны_гадзін' : 'гадзіну_гадзіны_гадзін', + dd: 'дзень_дні_дзён', + MM: 'месяц_месяцы_месяцаў', + yy: 'год_гады_гадоў', + }; + if (key === 'm') { + return withoutSuffix ? 'хвіліна' : 'хвіліну'; + } else if (key === 'h') { + return withoutSuffix ? 'гадзіна' : 'гадзіну'; + } else { + return number + ' ' + plural(format[key], +number); + } + } + + moment.defineLocale('be', { + months: { + format: 'студзеня_лютага_сакавіка_красавіка_траўня_чэрвеня_ліпеня_жніўня_верасня_кастрычніка_лістапада_снежня'.split( + '_' + ), + standalone: 'студзень_люты_сакавік_красавік_травень_чэрвень_ліпень_жнівень_верасень_кастрычнік_лістапад_снежань'.split( + '_' + ), + }, + monthsShort: 'студ_лют_сак_крас_трав_чэрв_ліп_жнів_вер_каст_ліст_снеж'.split( + '_' + ), + weekdays: { + format: 'нядзелю_панядзелак_аўторак_сераду_чацвер_пятніцу_суботу'.split( + '_' + ), + standalone: 'нядзеля_панядзелак_аўторак_серада_чацвер_пятніца_субота'.split( + '_' + ), + isFormat: /\[ ?[Ууў] ?(?:мінулую|наступную)? ?\] ?dddd/, + }, + weekdaysShort: 'нд_пн_ат_ср_чц_пт_сб'.split('_'), + weekdaysMin: 'нд_пн_ат_ср_чц_пт_сб'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D MMMM YYYY г.', + LLL: 'D MMMM YYYY г., HH:mm', + LLLL: 'dddd, D MMMM YYYY г., HH:mm', + }, + calendar: { + sameDay: '[Сёння ў] LT', + nextDay: '[Заўтра ў] LT', + lastDay: '[Учора ў] LT', + nextWeek: function () { + return '[У] dddd [ў] LT'; + }, + lastWeek: function () { + switch (this.day()) { + case 0: + case 3: + case 5: + case 6: + return '[У мінулую] dddd [ў] LT'; + case 1: + case 2: + case 4: + return '[У мінулы] dddd [ў] LT'; + } + }, + sameElse: 'L', + }, + relativeTime: { + future: 'праз %s', + past: '%s таму', + s: 'некалькі секунд', + m: relativeTimeWithPlural, + mm: relativeTimeWithPlural, + h: relativeTimeWithPlural, + hh: relativeTimeWithPlural, + d: 'дзень', + dd: relativeTimeWithPlural, + M: 'месяц', + MM: relativeTimeWithPlural, + y: 'год', + yy: relativeTimeWithPlural, + }, + meridiemParse: /ночы|раніцы|дня|вечара/, + isPM: function (input) { + return /^(дня|вечара)$/.test(input); + }, + meridiem: function (hour, minute, isLower) { + if (hour < 4) { + return 'ночы'; + } else if (hour < 12) { + return 'раніцы'; + } else if (hour < 17) { + return 'дня'; + } else { + return 'вечара'; + } + }, + dayOfMonthOrdinalParse: /\d{1,2}-(і|ы|га)/, + ordinal: function (number, period) { + switch (period) { + case 'M': + case 'd': + case 'DDD': + case 'w': + case 'W': + return (number % 10 === 2 || number % 10 === 3) && + number % 100 !== 12 && + number % 100 !== 13 + ? number + '-і' + : number + '-ы'; + case 'D': + return number + '-га'; + default: + return number; + } + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 7, // The week that contains Jan 7th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + moment.defineLocale('bg', { + months: 'януари_февруари_март_април_май_юни_юли_август_септември_октомври_ноември_декември'.split( + '_' + ), + monthsShort: 'яну_фев_мар_апр_май_юни_юли_авг_сеп_окт_ное_дек'.split('_'), + weekdays: 'неделя_понеделник_вторник_сряда_четвъртък_петък_събота'.split( + '_' + ), + weekdaysShort: 'нед_пон_вто_сря_чет_пет_съб'.split('_'), + weekdaysMin: 'нд_пн_вт_ср_чт_пт_сб'.split('_'), + longDateFormat: { + LT: 'H:mm', + LTS: 'H:mm:ss', + L: 'D.MM.YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY H:mm', + LLLL: 'dddd, D MMMM YYYY H:mm', + }, + calendar: { + sameDay: '[Днес в] LT', + nextDay: '[Утре в] LT', + nextWeek: 'dddd [в] LT', + lastDay: '[Вчера в] LT', + lastWeek: function () { + switch (this.day()) { + case 0: + case 3: + case 6: + return '[Миналата] dddd [в] LT'; + case 1: + case 2: + case 4: + case 5: + return '[Миналия] dddd [в] LT'; + } + }, + sameElse: 'L', + }, + relativeTime: { + future: 'след %s', + past: 'преди %s', + s: 'няколко секунди', + ss: '%d секунди', + m: 'минута', + mm: '%d минути', + h: 'час', + hh: '%d часа', + d: 'ден', + dd: '%d дена', + M: 'месец', + MM: '%d месеца', + y: 'година', + yy: '%d години', + }, + dayOfMonthOrdinalParse: /\d{1,2}-(ев|ен|ти|ви|ри|ми)/, + ordinal: function (number) { + var lastDigit = number % 10, + last2Digits = number % 100; + if (number === 0) { + return number + '-ев'; + } else if (last2Digits === 0) { + return number + '-ен'; + } else if (last2Digits > 10 && last2Digits < 20) { + return number + '-ти'; + } else if (lastDigit === 1) { + return number + '-ви'; + } else if (lastDigit === 2) { + return number + '-ри'; + } else if (lastDigit === 7 || lastDigit === 8) { + return number + '-ми'; + } else { + return number + '-ти'; + } + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 7, // The week that contains Jan 7th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + moment.defineLocale('bm', { + months: 'Zanwuyekalo_Fewuruyekalo_Marisikalo_Awirilikalo_Mɛkalo_Zuwɛnkalo_Zuluyekalo_Utikalo_Sɛtanburukalo_ɔkutɔburukalo_Nowanburukalo_Desanburukalo'.split( + '_' + ), + monthsShort: 'Zan_Few_Mar_Awi_Mɛ_Zuw_Zul_Uti_Sɛt_ɔku_Now_Des'.split('_'), + weekdays: 'Kari_Ntɛnɛn_Tarata_Araba_Alamisa_Juma_Sibiri'.split('_'), + weekdaysShort: 'Kar_Ntɛ_Tar_Ara_Ala_Jum_Sib'.split('_'), + weekdaysMin: 'Ka_Nt_Ta_Ar_Al_Ju_Si'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'MMMM [tile] D [san] YYYY', + LLL: 'MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm', + LLLL: 'dddd MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm', + }, + calendar: { + sameDay: '[Bi lɛrɛ] LT', + nextDay: '[Sini lɛrɛ] LT', + nextWeek: 'dddd [don lɛrɛ] LT', + lastDay: '[Kunu lɛrɛ] LT', + lastWeek: 'dddd [tɛmɛnen lɛrɛ] LT', + sameElse: 'L', + }, + relativeTime: { + future: '%s kɔnɔ', + past: 'a bɛ %s bɔ', + s: 'sanga dama dama', + ss: 'sekondi %d', + m: 'miniti kelen', + mm: 'miniti %d', + h: 'lɛrɛ kelen', + hh: 'lɛrɛ %d', + d: 'tile kelen', + dd: 'tile %d', + M: 'kalo kelen', + MM: 'kalo %d', + y: 'san kelen', + yy: 'san %d', + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var symbolMap$3 = { + '1': '১', + '2': '২', + '3': '৩', + '4': '৪', + '5': '৫', + '6': '৬', + '7': '৭', + '8': '৮', + '9': '৯', + '0': '০', + }, + numberMap$2 = { + '১': '1', + '২': '2', + '৩': '3', + '৪': '4', + '৫': '5', + '৬': '6', + '৭': '7', + '৮': '8', + '৯': '9', + '০': '0', + }; + + moment.defineLocale('bn', { + months: 'জানুয়ারি_ফেব্রুয়ারি_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্টেম্বর_অক্টোবর_নভেম্বর_ডিসেম্বর'.split( + '_' + ), + monthsShort: 'জানু_ফেব্রু_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্ট_অক্টো_নভে_ডিসে'.split( + '_' + ), + weekdays: 'রবিবার_সোমবার_মঙ্গলবার_বুধবার_বৃহস্পতিবার_শুক্রবার_শনিবার'.split( + '_' + ), + weekdaysShort: 'রবি_সোম_মঙ্গল_বুধ_বৃহস্পতি_শুক্র_শনি'.split('_'), + weekdaysMin: 'রবি_সোম_মঙ্গল_বুধ_বৃহ_শুক্র_শনি'.split('_'), + longDateFormat: { + LT: 'A h:mm সময়', + LTS: 'A h:mm:ss সময়', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY, A h:mm সময়', + LLLL: 'dddd, D MMMM YYYY, A h:mm সময়', + }, + calendar: { + sameDay: '[আজ] LT', + nextDay: '[আগামীকাল] LT', + nextWeek: 'dddd, LT', + lastDay: '[গতকাল] LT', + lastWeek: '[গত] dddd, LT', + sameElse: 'L', + }, + relativeTime: { + future: '%s পরে', + past: '%s আগে', + s: 'কয়েক সেকেন্ড', + ss: '%d সেকেন্ড', + m: 'এক মিনিট', + mm: '%d মিনিট', + h: 'এক ঘন্টা', + hh: '%d ঘন্টা', + d: 'এক দিন', + dd: '%d দিন', + M: 'এক মাস', + MM: '%d মাস', + y: 'এক বছর', + yy: '%d বছর', + }, + preparse: function (string) { + return string.replace(/[১২৩৪৫৬৭৮৯০]/g, function (match) { + return numberMap$2[match]; + }); + }, + postformat: function (string) { + return string.replace(/\d/g, function (match) { + return symbolMap$3[match]; + }); + }, + meridiemParse: /রাত|সকাল|দুপুর|বিকাল|রাত/, + meridiemHour: function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if ( + (meridiem === 'রাত' && hour >= 4) || + (meridiem === 'দুপুর' && hour < 5) || + meridiem === 'বিকাল' + ) { + return hour + 12; + } else { + return hour; + } + }, + meridiem: function (hour, minute, isLower) { + if (hour < 4) { + return 'রাত'; + } else if (hour < 10) { + return 'সকাল'; + } else if (hour < 17) { + return 'দুপুর'; + } else if (hour < 20) { + return 'বিকাল'; + } else { + return 'রাত'; + } + }, + week: { + dow: 0, // Sunday is the first day of the week. + doy: 6, // The week that contains Jan 6th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var symbolMap$4 = { + '1': '༡', + '2': '༢', + '3': '༣', + '4': '༤', + '5': '༥', + '6': '༦', + '7': '༧', + '8': '༨', + '9': '༩', + '0': '༠', + }, + numberMap$3 = { + '༡': '1', + '༢': '2', + '༣': '3', + '༤': '4', + '༥': '5', + '༦': '6', + '༧': '7', + '༨': '8', + '༩': '9', + '༠': '0', + }; + + moment.defineLocale('bo', { + months: 'ཟླ་བ་དང་པོ_ཟླ་བ་གཉིས་པ_ཟླ་བ་གསུམ་པ_ཟླ་བ་བཞི་པ_ཟླ་བ་ལྔ་པ_ཟླ་བ་དྲུག་པ_ཟླ་བ་བདུན་པ_ཟླ་བ་བརྒྱད་པ_ཟླ་བ་དགུ་པ_ཟླ་བ་བཅུ་པ_ཟླ་བ་བཅུ་གཅིག་པ_ཟླ་བ་བཅུ་གཉིས་པ'.split( + '_' + ), + monthsShort: 'ཟླ་1_ཟླ་2_ཟླ་3_ཟླ་4_ཟླ་5_ཟླ་6_ཟླ་7_ཟླ་8_ཟླ་9_ཟླ་10_ཟླ་11_ཟླ་12'.split( + '_' + ), + monthsShortRegex: /^(ཟླ་\d{1,2})/, + monthsParseExact: true, + weekdays: 'གཟའ་ཉི་མ་_གཟའ་ཟླ་བ་_གཟའ་མིག་དམར་_གཟའ་ལྷག་པ་_གཟའ་ཕུར་བུ_གཟའ་པ་སངས་_གཟའ་སྤེན་པ་'.split( + '_' + ), + weekdaysShort: 'ཉི་མ་_ཟླ་བ་_མིག་དམར་_ལྷག་པ་_ཕུར་བུ_པ་སངས་_སྤེན་པ་'.split( + '_' + ), + weekdaysMin: 'ཉི_ཟླ_མིག_ལྷག_ཕུར_སངས_སྤེན'.split('_'), + longDateFormat: { + LT: 'A h:mm', + LTS: 'A h:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY, A h:mm', + LLLL: 'dddd, D MMMM YYYY, A h:mm', + }, + calendar: { + sameDay: '[དི་རིང] LT', + nextDay: '[སང་ཉིན] LT', + nextWeek: '[བདུན་ཕྲག་རྗེས་མ], LT', + lastDay: '[ཁ་སང] LT', + lastWeek: '[བདུན་ཕྲག་མཐའ་མ] dddd, LT', + sameElse: 'L', + }, + relativeTime: { + future: '%s ལ་', + past: '%s སྔན་ལ', + s: 'ལམ་སང', + ss: '%d སྐར་ཆ།', + m: 'སྐར་མ་གཅིག', + mm: '%d སྐར་མ', + h: 'ཆུ་ཚོད་གཅིག', + hh: '%d ཆུ་ཚོད', + d: 'ཉིན་གཅིག', + dd: '%d ཉིན་', + M: 'ཟླ་བ་གཅིག', + MM: '%d ཟླ་བ', + y: 'ལོ་གཅིག', + yy: '%d ལོ', + }, + preparse: function (string) { + return string.replace(/[༡༢༣༤༥༦༧༨༩༠]/g, function (match) { + return numberMap$3[match]; + }); + }, + postformat: function (string) { + return string.replace(/\d/g, function (match) { + return symbolMap$4[match]; + }); + }, + meridiemParse: /མཚན་མོ|ཞོགས་ཀས|ཉིན་གུང|དགོང་དག|མཚན་མོ/, + meridiemHour: function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if ( + (meridiem === 'མཚན་མོ' && hour >= 4) || + (meridiem === 'ཉིན་གུང' && hour < 5) || + meridiem === 'དགོང་དག' + ) { + return hour + 12; + } else { + return hour; + } + }, + meridiem: function (hour, minute, isLower) { + if (hour < 4) { + return 'མཚན་མོ'; + } else if (hour < 10) { + return 'ཞོགས་ཀས'; + } else if (hour < 17) { + return 'ཉིན་གུང'; + } else if (hour < 20) { + return 'དགོང་དག'; + } else { + return 'མཚན་མོ'; + } + }, + week: { + dow: 0, // Sunday is the first day of the week. + doy: 6, // The week that contains Jan 6th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + function relativeTimeWithMutation(number, withoutSuffix, key) { + var format = { + mm: 'munutenn', + MM: 'miz', + dd: 'devezh', + }; + return number + ' ' + mutation(format[key], number); + } + function specialMutationForYears(number) { + switch (lastNumber(number)) { + case 1: + case 3: + case 4: + case 5: + case 9: + return number + ' bloaz'; + default: + return number + ' vloaz'; + } + } + function lastNumber(number) { + if (number > 9) { + return lastNumber(number % 10); + } + return number; + } + function mutation(text, number) { + if (number === 2) { + return softMutation(text); + } + return text; + } + function softMutation(text) { + var mutationTable = { + m: 'v', + b: 'v', + d: 'z', + }; + if (mutationTable[text.charAt(0)] === undefined) { + return text; + } + return mutationTable[text.charAt(0)] + text.substring(1); + } + + var monthsParse = [ + /^gen/i, + /^c[ʼ\']hwe/i, + /^meu/i, + /^ebr/i, + /^mae/i, + /^(mez|eve)/i, + /^gou/i, + /^eos/i, + /^gwe/i, + /^her/i, + /^du/i, + /^ker/i, + ], + monthsRegex = /^(genver|c[ʼ\']hwevrer|meurzh|ebrel|mae|mezheven|gouere|eost|gwengolo|here|du|kerzu|gen|c[ʼ\']hwe|meu|ebr|mae|eve|gou|eos|gwe|her|du|ker)/i, + monthsStrictRegex = /^(genver|c[ʼ\']hwevrer|meurzh|ebrel|mae|mezheven|gouere|eost|gwengolo|here|du|kerzu)/i, + monthsShortStrictRegex = /^(gen|c[ʼ\']hwe|meu|ebr|mae|eve|gou|eos|gwe|her|du|ker)/i, + fullWeekdaysParse = [ + /^sul/i, + /^lun/i, + /^meurzh/i, + /^merc[ʼ\']her/i, + /^yaou/i, + /^gwener/i, + /^sadorn/i, + ], + shortWeekdaysParse = [ + /^Sul/i, + /^Lun/i, + /^Meu/i, + /^Mer/i, + /^Yao/i, + /^Gwe/i, + /^Sad/i, + ], + minWeekdaysParse = [ + /^Su/i, + /^Lu/i, + /^Me([^r]|$)/i, + /^Mer/i, + /^Ya/i, + /^Gw/i, + /^Sa/i, + ]; + + moment.defineLocale('br', { + months: 'Genver_Cʼhwevrer_Meurzh_Ebrel_Mae_Mezheven_Gouere_Eost_Gwengolo_Here_Du_Kerzu'.split( + '_' + ), + monthsShort: 'Gen_Cʼhwe_Meu_Ebr_Mae_Eve_Gou_Eos_Gwe_Her_Du_Ker'.split('_'), + weekdays: 'Sul_Lun_Meurzh_Mercʼher_Yaou_Gwener_Sadorn'.split('_'), + weekdaysShort: 'Sul_Lun_Meu_Mer_Yao_Gwe_Sad'.split('_'), + weekdaysMin: 'Su_Lu_Me_Mer_Ya_Gw_Sa'.split('_'), + weekdaysParse: minWeekdaysParse, + fullWeekdaysParse: fullWeekdaysParse, + shortWeekdaysParse: shortWeekdaysParse, + minWeekdaysParse: minWeekdaysParse, + + monthsRegex: monthsRegex, + monthsShortRegex: monthsRegex, + monthsStrictRegex: monthsStrictRegex, + monthsShortStrictRegex: monthsShortStrictRegex, + monthsParse: monthsParse, + longMonthsParse: monthsParse, + shortMonthsParse: monthsParse, + + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D [a viz] MMMM YYYY', + LLL: 'D [a viz] MMMM YYYY HH:mm', + LLLL: 'dddd, D [a viz] MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[Hiziv da] LT', + nextDay: '[Warcʼhoazh da] LT', + nextWeek: 'dddd [da] LT', + lastDay: '[Decʼh da] LT', + lastWeek: 'dddd [paset da] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'a-benn %s', + past: '%s ʼzo', + s: 'un nebeud segondennoù', + ss: '%d eilenn', + m: 'ur vunutenn', + mm: relativeTimeWithMutation, + h: 'un eur', + hh: '%d eur', + d: 'un devezh', + dd: relativeTimeWithMutation, + M: 'ur miz', + MM: relativeTimeWithMutation, + y: 'ur bloaz', + yy: specialMutationForYears, + }, + dayOfMonthOrdinalParse: /\d{1,2}(añ|vet)/, + ordinal: function (number) { + var output = number === 1 ? 'añ' : 'vet'; + return number + output; + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + meridiemParse: /a.m.|g.m./, // goude merenn | a-raok merenn + isPM: function (token) { + return token === 'g.m.'; + }, + meridiem: function (hour, minute, isLower) { + return hour < 12 ? 'a.m.' : 'g.m.'; + }, + }); + + //! moment.js locale configuration + + function translate(number, withoutSuffix, key) { + var result = number + ' '; + switch (key) { + case 'ss': + if (number === 1) { + result += 'sekunda'; + } else if (number === 2 || number === 3 || number === 4) { + result += 'sekunde'; + } else { + result += 'sekundi'; + } + return result; + case 'm': + return withoutSuffix ? 'jedna minuta' : 'jedne minute'; + case 'mm': + if (number === 1) { + result += 'minuta'; + } else if (number === 2 || number === 3 || number === 4) { + result += 'minute'; + } else { + result += 'minuta'; + } + return result; + case 'h': + return withoutSuffix ? 'jedan sat' : 'jednog sata'; + case 'hh': + if (number === 1) { + result += 'sat'; + } else if (number === 2 || number === 3 || number === 4) { + result += 'sata'; + } else { + result += 'sati'; + } + return result; + case 'dd': + if (number === 1) { + result += 'dan'; + } else { + result += 'dana'; + } + return result; + case 'MM': + if (number === 1) { + result += 'mjesec'; + } else if (number === 2 || number === 3 || number === 4) { + result += 'mjeseca'; + } else { + result += 'mjeseci'; + } + return result; + case 'yy': + if (number === 1) { + result += 'godina'; + } else if (number === 2 || number === 3 || number === 4) { + result += 'godine'; + } else { + result += 'godina'; + } + return result; + } + } + + moment.defineLocale('bs', { + months: 'januar_februar_mart_april_maj_juni_juli_august_septembar_oktobar_novembar_decembar'.split( + '_' + ), + monthsShort: 'jan._feb._mar._apr._maj._jun._jul._aug._sep._okt._nov._dec.'.split( + '_' + ), + monthsParseExact: true, + weekdays: 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split( + '_' + ), + weekdaysShort: 'ned._pon._uto._sri._čet._pet._sub.'.split('_'), + weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'H:mm', + LTS: 'H:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D. MMMM YYYY', + LLL: 'D. MMMM YYYY H:mm', + LLLL: 'dddd, D. MMMM YYYY H:mm', + }, + calendar: { + sameDay: '[danas u] LT', + nextDay: '[sutra u] LT', + nextWeek: function () { + switch (this.day()) { + case 0: + return '[u] [nedjelju] [u] LT'; + case 3: + return '[u] [srijedu] [u] LT'; + case 6: + return '[u] [subotu] [u] LT'; + case 1: + case 2: + case 4: + case 5: + return '[u] dddd [u] LT'; + } + }, + lastDay: '[jučer u] LT', + lastWeek: function () { + switch (this.day()) { + case 0: + case 3: + return '[prošlu] dddd [u] LT'; + case 6: + return '[prošle] [subote] [u] LT'; + case 1: + case 2: + case 4: + case 5: + return '[prošli] dddd [u] LT'; + } + }, + sameElse: 'L', + }, + relativeTime: { + future: 'za %s', + past: 'prije %s', + s: 'par sekundi', + ss: translate, + m: translate, + mm: translate, + h: translate, + hh: translate, + d: 'dan', + dd: translate, + M: 'mjesec', + MM: translate, + y: 'godinu', + yy: translate, + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal: '%d.', + week: { + dow: 1, // Monday is the first day of the week. + doy: 7, // The week that contains Jan 7th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + moment.defineLocale('ca', { + months: { + standalone: 'gener_febrer_març_abril_maig_juny_juliol_agost_setembre_octubre_novembre_desembre'.split( + '_' + ), + format: "de gener_de febrer_de març_d'abril_de maig_de juny_de juliol_d'agost_de setembre_d'octubre_de novembre_de desembre".split( + '_' + ), + isFormat: /D[oD]?(\s)+MMMM/, + }, + monthsShort: 'gen._febr._març_abr._maig_juny_jul._ag._set._oct._nov._des.'.split( + '_' + ), + monthsParseExact: true, + weekdays: 'diumenge_dilluns_dimarts_dimecres_dijous_divendres_dissabte'.split( + '_' + ), + weekdaysShort: 'dg._dl._dt._dc._dj._dv._ds.'.split('_'), + weekdaysMin: 'dg_dl_dt_dc_dj_dv_ds'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'H:mm', + LTS: 'H:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM [de] YYYY', + ll: 'D MMM YYYY', + LLL: 'D MMMM [de] YYYY [a les] H:mm', + lll: 'D MMM YYYY, H:mm', + LLLL: 'dddd D MMMM [de] YYYY [a les] H:mm', + llll: 'ddd D MMM YYYY, H:mm', + }, + calendar: { + sameDay: function () { + return '[avui a ' + (this.hours() !== 1 ? 'les' : 'la') + '] LT'; + }, + nextDay: function () { + return '[demà a ' + (this.hours() !== 1 ? 'les' : 'la') + '] LT'; + }, + nextWeek: function () { + return 'dddd [a ' + (this.hours() !== 1 ? 'les' : 'la') + '] LT'; + }, + lastDay: function () { + return '[ahir a ' + (this.hours() !== 1 ? 'les' : 'la') + '] LT'; + }, + lastWeek: function () { + return ( + '[el] dddd [passat a ' + + (this.hours() !== 1 ? 'les' : 'la') + + '] LT' + ); + }, + sameElse: 'L', + }, + relativeTime: { + future: "d'aquí %s", + past: 'fa %s', + s: 'uns segons', + ss: '%d segons', + m: 'un minut', + mm: '%d minuts', + h: 'una hora', + hh: '%d hores', + d: 'un dia', + dd: '%d dies', + M: 'un mes', + MM: '%d mesos', + y: 'un any', + yy: '%d anys', + }, + dayOfMonthOrdinalParse: /\d{1,2}(r|n|t|è|a)/, + ordinal: function (number, period) { + var output = + number === 1 + ? 'r' + : number === 2 + ? 'n' + : number === 3 + ? 'r' + : number === 4 + ? 't' + : 'è'; + if (period === 'w' || period === 'W') { + output = 'a'; + } + return number + output; + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var months$3 = 'leden_únor_březen_duben_květen_červen_červenec_srpen_září_říjen_listopad_prosinec'.split( + '_' + ), + monthsShort = 'led_úno_bře_dub_kvě_čvn_čvc_srp_zář_říj_lis_pro'.split('_'), + monthsParse$1 = [ + /^led/i, + /^úno/i, + /^bře/i, + /^dub/i, + /^kvě/i, + /^(čvn|červen$|června)/i, + /^(čvc|červenec|července)/i, + /^srp/i, + /^zář/i, + /^říj/i, + /^lis/i, + /^pro/i, + ], + // NOTE: 'červen' is substring of 'červenec'; therefore 'červenec' must precede 'červen' in the regex to be fully matched. + // Otherwise parser matches '1. červenec' as '1. červen' + 'ec'. + monthsRegex$1 = /^(leden|únor|březen|duben|květen|červenec|července|červen|června|srpen|září|říjen|listopad|prosinec|led|úno|bře|dub|kvě|čvn|čvc|srp|zář|říj|lis|pro)/i; + + function plural$1(n) { + return n > 1 && n < 5 && ~~(n / 10) !== 1; + } + function translate$1(number, withoutSuffix, key, isFuture) { + var result = number + ' '; + switch (key) { + case 's': // a few seconds / in a few seconds / a few seconds ago + return withoutSuffix || isFuture ? 'pár sekund' : 'pár sekundami'; + case 'ss': // 9 seconds / in 9 seconds / 9 seconds ago + if (withoutSuffix || isFuture) { + return result + (plural$1(number) ? 'sekundy' : 'sekund'); + } else { + return result + 'sekundami'; + } + case 'm': // a minute / in a minute / a minute ago + return withoutSuffix ? 'minuta' : isFuture ? 'minutu' : 'minutou'; + case 'mm': // 9 minutes / in 9 minutes / 9 minutes ago + if (withoutSuffix || isFuture) { + return result + (plural$1(number) ? 'minuty' : 'minut'); + } else { + return result + 'minutami'; + } + case 'h': // an hour / in an hour / an hour ago + return withoutSuffix ? 'hodina' : isFuture ? 'hodinu' : 'hodinou'; + case 'hh': // 9 hours / in 9 hours / 9 hours ago + if (withoutSuffix || isFuture) { + return result + (plural$1(number) ? 'hodiny' : 'hodin'); + } else { + return result + 'hodinami'; + } + case 'd': // a day / in a day / a day ago + return withoutSuffix || isFuture ? 'den' : 'dnem'; + case 'dd': // 9 days / in 9 days / 9 days ago + if (withoutSuffix || isFuture) { + return result + (plural$1(number) ? 'dny' : 'dní'); + } else { + return result + 'dny'; + } + case 'M': // a month / in a month / a month ago + return withoutSuffix || isFuture ? 'měsíc' : 'měsícem'; + case 'MM': // 9 months / in 9 months / 9 months ago + if (withoutSuffix || isFuture) { + return result + (plural$1(number) ? 'měsíce' : 'měsíců'); + } else { + return result + 'měsíci'; + } + case 'y': // a year / in a year / a year ago + return withoutSuffix || isFuture ? 'rok' : 'rokem'; + case 'yy': // 9 years / in 9 years / 9 years ago + if (withoutSuffix || isFuture) { + return result + (plural$1(number) ? 'roky' : 'let'); + } else { + return result + 'lety'; + } + } + } + + moment.defineLocale('cs', { + months: months$3, + monthsShort: monthsShort, + monthsRegex: monthsRegex$1, + monthsShortRegex: monthsRegex$1, + // NOTE: 'červen' is substring of 'červenec'; therefore 'červenec' must precede 'červen' in the regex to be fully matched. + // Otherwise parser matches '1. červenec' as '1. červen' + 'ec'. + monthsStrictRegex: /^(leden|ledna|února|únor|březen|března|duben|dubna|květen|května|červenec|července|červen|června|srpen|srpna|září|říjen|října|listopadu|listopad|prosinec|prosince)/i, + monthsShortStrictRegex: /^(led|úno|bře|dub|kvě|čvn|čvc|srp|zář|říj|lis|pro)/i, + monthsParse: monthsParse$1, + longMonthsParse: monthsParse$1, + shortMonthsParse: monthsParse$1, + weekdays: 'neděle_pondělí_úterý_středa_čtvrtek_pátek_sobota'.split('_'), + weekdaysShort: 'ne_po_út_st_čt_pá_so'.split('_'), + weekdaysMin: 'ne_po_út_st_čt_pá_so'.split('_'), + longDateFormat: { + LT: 'H:mm', + LTS: 'H:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D. MMMM YYYY', + LLL: 'D. MMMM YYYY H:mm', + LLLL: 'dddd D. MMMM YYYY H:mm', + l: 'D. M. YYYY', + }, + calendar: { + sameDay: '[dnes v] LT', + nextDay: '[zítra v] LT', + nextWeek: function () { + switch (this.day()) { + case 0: + return '[v neděli v] LT'; + case 1: + case 2: + return '[v] dddd [v] LT'; + case 3: + return '[ve středu v] LT'; + case 4: + return '[ve čtvrtek v] LT'; + case 5: + return '[v pátek v] LT'; + case 6: + return '[v sobotu v] LT'; + } + }, + lastDay: '[včera v] LT', + lastWeek: function () { + switch (this.day()) { + case 0: + return '[minulou neděli v] LT'; + case 1: + case 2: + return '[minulé] dddd [v] LT'; + case 3: + return '[minulou středu v] LT'; + case 4: + case 5: + return '[minulý] dddd [v] LT'; + case 6: + return '[minulou sobotu v] LT'; + } + }, + sameElse: 'L', + }, + relativeTime: { + future: 'za %s', + past: 'před %s', + s: translate$1, + ss: translate$1, + m: translate$1, + mm: translate$1, + h: translate$1, + hh: translate$1, + d: translate$1, + dd: translate$1, + M: translate$1, + MM: translate$1, + y: translate$1, + yy: translate$1, + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal: '%d.', + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + moment.defineLocale('cv', { + months: 'кӑрлач_нарӑс_пуш_ака_май_ҫӗртме_утӑ_ҫурла_авӑн_юпа_чӳк_раштав'.split( + '_' + ), + monthsShort: 'кӑр_нар_пуш_ака_май_ҫӗр_утӑ_ҫур_авн_юпа_чӳк_раш'.split('_'), + weekdays: 'вырсарникун_тунтикун_ытларикун_юнкун_кӗҫнерникун_эрнекун_шӑматкун'.split( + '_' + ), + weekdaysShort: 'выр_тун_ытл_юн_кӗҫ_эрн_шӑм'.split('_'), + weekdaysMin: 'вр_тн_ыт_юн_кҫ_эр_шм'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD-MM-YYYY', + LL: 'YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ]', + LLL: 'YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm', + LLLL: 'dddd, YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm', + }, + calendar: { + sameDay: '[Паян] LT [сехетре]', + nextDay: '[Ыран] LT [сехетре]', + lastDay: '[Ӗнер] LT [сехетре]', + nextWeek: '[Ҫитес] dddd LT [сехетре]', + lastWeek: '[Иртнӗ] dddd LT [сехетре]', + sameElse: 'L', + }, + relativeTime: { + future: function (output) { + var affix = /сехет$/i.exec(output) + ? 'рен' + : /ҫул$/i.exec(output) + ? 'тан' + : 'ран'; + return output + affix; + }, + past: '%s каялла', + s: 'пӗр-ик ҫеккунт', + ss: '%d ҫеккунт', + m: 'пӗр минут', + mm: '%d минут', + h: 'пӗр сехет', + hh: '%d сехет', + d: 'пӗр кун', + dd: '%d кун', + M: 'пӗр уйӑх', + MM: '%d уйӑх', + y: 'пӗр ҫул', + yy: '%d ҫул', + }, + dayOfMonthOrdinalParse: /\d{1,2}-мӗш/, + ordinal: '%d-мӗш', + week: { + dow: 1, // Monday is the first day of the week. + doy: 7, // The week that contains Jan 7th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + moment.defineLocale('cy', { + months: 'Ionawr_Chwefror_Mawrth_Ebrill_Mai_Mehefin_Gorffennaf_Awst_Medi_Hydref_Tachwedd_Rhagfyr'.split( + '_' + ), + monthsShort: 'Ion_Chwe_Maw_Ebr_Mai_Meh_Gor_Aws_Med_Hyd_Tach_Rhag'.split( + '_' + ), + weekdays: 'Dydd Sul_Dydd Llun_Dydd Mawrth_Dydd Mercher_Dydd Iau_Dydd Gwener_Dydd Sadwrn'.split( + '_' + ), + weekdaysShort: 'Sul_Llun_Maw_Mer_Iau_Gwe_Sad'.split('_'), + weekdaysMin: 'Su_Ll_Ma_Me_Ia_Gw_Sa'.split('_'), + weekdaysParseExact: true, + // time formats are the same as en-gb + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[Heddiw am] LT', + nextDay: '[Yfory am] LT', + nextWeek: 'dddd [am] LT', + lastDay: '[Ddoe am] LT', + lastWeek: 'dddd [diwethaf am] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'mewn %s', + past: '%s yn ôl', + s: 'ychydig eiliadau', + ss: '%d eiliad', + m: 'munud', + mm: '%d munud', + h: 'awr', + hh: '%d awr', + d: 'diwrnod', + dd: '%d diwrnod', + M: 'mis', + MM: '%d mis', + y: 'blwyddyn', + yy: '%d flynedd', + }, + dayOfMonthOrdinalParse: /\d{1,2}(fed|ain|af|il|ydd|ed|eg)/, + // traditional ordinal numbers above 31 are not commonly used in colloquial Welsh + ordinal: function (number) { + var b = number, + output = '', + lookup = [ + '', + 'af', + 'il', + 'ydd', + 'ydd', + 'ed', + 'ed', + 'ed', + 'fed', + 'fed', + 'fed', // 1af to 10fed + 'eg', + 'fed', + 'eg', + 'eg', + 'fed', + 'eg', + 'eg', + 'fed', + 'eg', + 'fed', // 11eg to 20fed + ]; + if (b > 20) { + if (b === 40 || b === 50 || b === 60 || b === 80 || b === 100) { + output = 'fed'; // not 30ain, 70ain or 90ain + } else { + output = 'ain'; + } + } else if (b > 0) { + output = lookup[b]; + } + return number + output; + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + moment.defineLocale('da', { + months: 'januar_februar_marts_april_maj_juni_juli_august_september_oktober_november_december'.split( + '_' + ), + monthsShort: 'jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec'.split('_'), + weekdays: 'søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag'.split('_'), + weekdaysShort: 'søn_man_tir_ons_tor_fre_lør'.split('_'), + weekdaysMin: 'sø_ma_ti_on_to_fr_lø'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D. MMMM YYYY', + LLL: 'D. MMMM YYYY HH:mm', + LLLL: 'dddd [d.] D. MMMM YYYY [kl.] HH:mm', + }, + calendar: { + sameDay: '[i dag kl.] LT', + nextDay: '[i morgen kl.] LT', + nextWeek: 'på dddd [kl.] LT', + lastDay: '[i går kl.] LT', + lastWeek: '[i] dddd[s kl.] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'om %s', + past: '%s siden', + s: 'få sekunder', + ss: '%d sekunder', + m: 'et minut', + mm: '%d minutter', + h: 'en time', + hh: '%d timer', + d: 'en dag', + dd: '%d dage', + M: 'en måned', + MM: '%d måneder', + y: 'et år', + yy: '%d år', + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal: '%d.', + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + function processRelativeTime(number, withoutSuffix, key, isFuture) { + var format = { + m: ['eine Minute', 'einer Minute'], + h: ['eine Stunde', 'einer Stunde'], + d: ['ein Tag', 'einem Tag'], + dd: [number + ' Tage', number + ' Tagen'], + w: ['eine Woche', 'einer Woche'], + M: ['ein Monat', 'einem Monat'], + MM: [number + ' Monate', number + ' Monaten'], + y: ['ein Jahr', 'einem Jahr'], + yy: [number + ' Jahre', number + ' Jahren'], + }; + return withoutSuffix ? format[key][0] : format[key][1]; + } + + moment.defineLocale('de-at', { + months: 'Jänner_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split( + '_' + ), + monthsShort: 'Jän._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split( + '_' + ), + monthsParseExact: true, + weekdays: 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split( + '_' + ), + weekdaysShort: 'So._Mo._Di._Mi._Do._Fr._Sa.'.split('_'), + weekdaysMin: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D. MMMM YYYY', + LLL: 'D. MMMM YYYY HH:mm', + LLLL: 'dddd, D. MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[heute um] LT [Uhr]', + sameElse: 'L', + nextDay: '[morgen um] LT [Uhr]', + nextWeek: 'dddd [um] LT [Uhr]', + lastDay: '[gestern um] LT [Uhr]', + lastWeek: '[letzten] dddd [um] LT [Uhr]', + }, + relativeTime: { + future: 'in %s', + past: 'vor %s', + s: 'ein paar Sekunden', + ss: '%d Sekunden', + m: processRelativeTime, + mm: '%d Minuten', + h: processRelativeTime, + hh: '%d Stunden', + d: processRelativeTime, + dd: processRelativeTime, + w: processRelativeTime, + ww: '%d Wochen', + M: processRelativeTime, + MM: processRelativeTime, + y: processRelativeTime, + yy: processRelativeTime, + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal: '%d.', + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + function processRelativeTime$1(number, withoutSuffix, key, isFuture) { + var format = { + m: ['eine Minute', 'einer Minute'], + h: ['eine Stunde', 'einer Stunde'], + d: ['ein Tag', 'einem Tag'], + dd: [number + ' Tage', number + ' Tagen'], + w: ['eine Woche', 'einer Woche'], + M: ['ein Monat', 'einem Monat'], + MM: [number + ' Monate', number + ' Monaten'], + y: ['ein Jahr', 'einem Jahr'], + yy: [number + ' Jahre', number + ' Jahren'], + }; + return withoutSuffix ? format[key][0] : format[key][1]; + } + + moment.defineLocale('de-ch', { + months: 'Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split( + '_' + ), + monthsShort: 'Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split( + '_' + ), + monthsParseExact: true, + weekdays: 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split( + '_' + ), + weekdaysShort: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'), + weekdaysMin: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D. MMMM YYYY', + LLL: 'D. MMMM YYYY HH:mm', + LLLL: 'dddd, D. MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[heute um] LT [Uhr]', + sameElse: 'L', + nextDay: '[morgen um] LT [Uhr]', + nextWeek: 'dddd [um] LT [Uhr]', + lastDay: '[gestern um] LT [Uhr]', + lastWeek: '[letzten] dddd [um] LT [Uhr]', + }, + relativeTime: { + future: 'in %s', + past: 'vor %s', + s: 'ein paar Sekunden', + ss: '%d Sekunden', + m: processRelativeTime$1, + mm: '%d Minuten', + h: processRelativeTime$1, + hh: '%d Stunden', + d: processRelativeTime$1, + dd: processRelativeTime$1, + w: processRelativeTime$1, + ww: '%d Wochen', + M: processRelativeTime$1, + MM: processRelativeTime$1, + y: processRelativeTime$1, + yy: processRelativeTime$1, + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal: '%d.', + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + function processRelativeTime$2(number, withoutSuffix, key, isFuture) { + var format = { + m: ['eine Minute', 'einer Minute'], + h: ['eine Stunde', 'einer Stunde'], + d: ['ein Tag', 'einem Tag'], + dd: [number + ' Tage', number + ' Tagen'], + w: ['eine Woche', 'einer Woche'], + M: ['ein Monat', 'einem Monat'], + MM: [number + ' Monate', number + ' Monaten'], + y: ['ein Jahr', 'einem Jahr'], + yy: [number + ' Jahre', number + ' Jahren'], + }; + return withoutSuffix ? format[key][0] : format[key][1]; + } + + moment.defineLocale('de', { + months: 'Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split( + '_' + ), + monthsShort: 'Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split( + '_' + ), + monthsParseExact: true, + weekdays: 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split( + '_' + ), + weekdaysShort: 'So._Mo._Di._Mi._Do._Fr._Sa.'.split('_'), + weekdaysMin: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D. MMMM YYYY', + LLL: 'D. MMMM YYYY HH:mm', + LLLL: 'dddd, D. MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[heute um] LT [Uhr]', + sameElse: 'L', + nextDay: '[morgen um] LT [Uhr]', + nextWeek: 'dddd [um] LT [Uhr]', + lastDay: '[gestern um] LT [Uhr]', + lastWeek: '[letzten] dddd [um] LT [Uhr]', + }, + relativeTime: { + future: 'in %s', + past: 'vor %s', + s: 'ein paar Sekunden', + ss: '%d Sekunden', + m: processRelativeTime$2, + mm: '%d Minuten', + h: processRelativeTime$2, + hh: '%d Stunden', + d: processRelativeTime$2, + dd: processRelativeTime$2, + w: processRelativeTime$2, + ww: '%d Wochen', + M: processRelativeTime$2, + MM: processRelativeTime$2, + y: processRelativeTime$2, + yy: processRelativeTime$2, + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal: '%d.', + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var months$4 = [ + 'ޖެނުއަރީ', + 'ފެބްރުއަރީ', + 'މާރިޗު', + 'އޭޕްރީލު', + 'މޭ', + 'ޖޫން', + 'ޖުލައި', + 'އޯގަސްޓު', + 'ސެޕްޓެމްބަރު', + 'އޮކްޓޯބަރު', + 'ނޮވެމްބަރު', + 'ޑިސެމްބަރު', + ], + weekdays = [ + 'އާދިއްތަ', + 'ހޯމަ', + 'އަންގާރަ', + 'ބުދަ', + 'ބުރާސްފަތި', + 'ހުކުރު', + 'ހޮނިހިރު', + ]; + + moment.defineLocale('dv', { + months: months$4, + monthsShort: months$4, + weekdays: weekdays, + weekdaysShort: weekdays, + weekdaysMin: 'އާދި_ހޯމަ_އަން_ބުދަ_ބުރާ_ހުކު_ހޮނި'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'D/M/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd D MMMM YYYY HH:mm', + }, + meridiemParse: /މކ|މފ/, + isPM: function (input) { + return 'މފ' === input; + }, + meridiem: function (hour, minute, isLower) { + if (hour < 12) { + return 'މކ'; + } else { + return 'މފ'; + } + }, + calendar: { + sameDay: '[މިއަދު] LT', + nextDay: '[މާދަމާ] LT', + nextWeek: 'dddd LT', + lastDay: '[އިއްޔެ] LT', + lastWeek: '[ފާއިތުވި] dddd LT', + sameElse: 'L', + }, + relativeTime: { + future: 'ތެރޭގައި %s', + past: 'ކުރިން %s', + s: 'ސިކުންތުކޮޅެއް', + ss: 'd% ސިކުންތު', + m: 'މިނިޓެއް', + mm: 'މިނިޓު %d', + h: 'ގަޑިއިރެއް', + hh: 'ގަޑިއިރު %d', + d: 'ދުވަހެއް', + dd: 'ދުވަސް %d', + M: 'މަހެއް', + MM: 'މަސް %d', + y: 'އަހަރެއް', + yy: 'އަހަރު %d', + }, + preparse: function (string) { + return string.replace(/،/g, ','); + }, + postformat: function (string) { + return string.replace(/,/g, '،'); + }, + week: { + dow: 7, // Sunday is the first day of the week. + doy: 12, // The week that contains Jan 12th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + function isFunction(input) { + return ( + (typeof Function !== 'undefined' && input instanceof Function) || + Object.prototype.toString.call(input) === '[object Function]' + ); + } + + moment.defineLocale('el', { + monthsNominativeEl: 'Ιανουάριος_Φεβρουάριος_Μάρτιος_Απρίλιος_Μάιος_Ιούνιος_Ιούλιος_Αύγουστος_Σεπτέμβριος_Οκτώβριος_Νοέμβριος_Δεκέμβριος'.split( + '_' + ), + monthsGenitiveEl: 'Ιανουαρίου_Φεβρουαρίου_Μαρτίου_Απριλίου_Μαΐου_Ιουνίου_Ιουλίου_Αυγούστου_Σεπτεμβρίου_Οκτωβρίου_Νοεμβρίου_Δεκεμβρίου'.split( + '_' + ), + months: function (momentToFormat, format) { + if (!momentToFormat) { + return this._monthsNominativeEl; + } else if ( + typeof format === 'string' && + /D/.test(format.substring(0, format.indexOf('MMMM'))) + ) { + // if there is a day number before 'MMMM' + return this._monthsGenitiveEl[momentToFormat.month()]; + } else { + return this._monthsNominativeEl[momentToFormat.month()]; + } + }, + monthsShort: 'Ιαν_Φεβ_Μαρ_Απρ_Μαϊ_Ιουν_Ιουλ_Αυγ_Σεπ_Οκτ_Νοε_Δεκ'.split('_'), + weekdays: 'Κυριακή_Δευτέρα_Τρίτη_Τετάρτη_Πέμπτη_Παρασκευή_Σάββατο'.split( + '_' + ), + weekdaysShort: 'Κυρ_Δευ_Τρι_Τετ_Πεμ_Παρ_Σαβ'.split('_'), + weekdaysMin: 'Κυ_Δε_Τρ_Τε_Πε_Πα_Σα'.split('_'), + meridiem: function (hours, minutes, isLower) { + if (hours > 11) { + return isLower ? 'μμ' : 'ΜΜ'; + } else { + return isLower ? 'πμ' : 'ΠΜ'; + } + }, + isPM: function (input) { + return (input + '').toLowerCase()[0] === 'μ'; + }, + meridiemParse: /[ΠΜ]\.?Μ?\.?/i, + longDateFormat: { + LT: 'h:mm A', + LTS: 'h:mm:ss A', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY h:mm A', + LLLL: 'dddd, D MMMM YYYY h:mm A', + }, + calendarEl: { + sameDay: '[Σήμερα {}] LT', + nextDay: '[Αύριο {}] LT', + nextWeek: 'dddd [{}] LT', + lastDay: '[Χθες {}] LT', + lastWeek: function () { + switch (this.day()) { + case 6: + return '[το προηγούμενο] dddd [{}] LT'; + default: + return '[την προηγούμενη] dddd [{}] LT'; + } + }, + sameElse: 'L', + }, + calendar: function (key, mom) { + var output = this._calendarEl[key], + hours = mom && mom.hours(); + if (isFunction(output)) { + output = output.apply(mom); + } + return output.replace('{}', hours % 12 === 1 ? 'στη' : 'στις'); + }, + relativeTime: { + future: 'σε %s', + past: '%s πριν', + s: 'λίγα δευτερόλεπτα', + ss: '%d δευτερόλεπτα', + m: 'ένα λεπτό', + mm: '%d λεπτά', + h: 'μία ώρα', + hh: '%d ώρες', + d: 'μία μέρα', + dd: '%d μέρες', + M: 'ένας μήνας', + MM: '%d μήνες', + y: 'ένας χρόνος', + yy: '%d χρόνια', + }, + dayOfMonthOrdinalParse: /\d{1,2}η/, + ordinal: '%dη', + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4st is the first week of the year. + }, + }); + + //! moment.js locale configuration + + moment.defineLocale('en-au', { + months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split( + '_' + ), + monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'), + weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split( + '_' + ), + weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'), + weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'), + longDateFormat: { + LT: 'h:mm A', + LTS: 'h:mm:ss A', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY h:mm A', + LLLL: 'dddd, D MMMM YYYY h:mm A', + }, + calendar: { + sameDay: '[Today at] LT', + nextDay: '[Tomorrow at] LT', + nextWeek: 'dddd [at] LT', + lastDay: '[Yesterday at] LT', + lastWeek: '[Last] dddd [at] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'in %s', + past: '%s ago', + s: 'a few seconds', + ss: '%d seconds', + m: 'a minute', + mm: '%d minutes', + h: 'an hour', + hh: '%d hours', + d: 'a day', + dd: '%d days', + M: 'a month', + MM: '%d months', + y: 'a year', + yy: '%d years', + }, + dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/, + ordinal: function (number) { + var b = number % 10, + output = + ~~((number % 100) / 10) === 1 + ? 'th' + : b === 1 + ? 'st' + : b === 2 + ? 'nd' + : b === 3 + ? 'rd' + : 'th'; + return number + output; + }, + week: { + dow: 0, // Sunday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + moment.defineLocale('en-ca', { + months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split( + '_' + ), + monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'), + weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split( + '_' + ), + weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'), + weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'), + longDateFormat: { + LT: 'h:mm A', + LTS: 'h:mm:ss A', + L: 'YYYY-MM-DD', + LL: 'MMMM D, YYYY', + LLL: 'MMMM D, YYYY h:mm A', + LLLL: 'dddd, MMMM D, YYYY h:mm A', + }, + calendar: { + sameDay: '[Today at] LT', + nextDay: '[Tomorrow at] LT', + nextWeek: 'dddd [at] LT', + lastDay: '[Yesterday at] LT', + lastWeek: '[Last] dddd [at] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'in %s', + past: '%s ago', + s: 'a few seconds', + ss: '%d seconds', + m: 'a minute', + mm: '%d minutes', + h: 'an hour', + hh: '%d hours', + d: 'a day', + dd: '%d days', + M: 'a month', + MM: '%d months', + y: 'a year', + yy: '%d years', + }, + dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/, + ordinal: function (number) { + var b = number % 10, + output = + ~~((number % 100) / 10) === 1 + ? 'th' + : b === 1 + ? 'st' + : b === 2 + ? 'nd' + : b === 3 + ? 'rd' + : 'th'; + return number + output; + }, + }); + + //! moment.js locale configuration + + moment.defineLocale('en-gb', { + months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split( + '_' + ), + monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'), + weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split( + '_' + ), + weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'), + weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[Today at] LT', + nextDay: '[Tomorrow at] LT', + nextWeek: 'dddd [at] LT', + lastDay: '[Yesterday at] LT', + lastWeek: '[Last] dddd [at] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'in %s', + past: '%s ago', + s: 'a few seconds', + ss: '%d seconds', + m: 'a minute', + mm: '%d minutes', + h: 'an hour', + hh: '%d hours', + d: 'a day', + dd: '%d days', + M: 'a month', + MM: '%d months', + y: 'a year', + yy: '%d years', + }, + dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/, + ordinal: function (number) { + var b = number % 10, + output = + ~~((number % 100) / 10) === 1 + ? 'th' + : b === 1 + ? 'st' + : b === 2 + ? 'nd' + : b === 3 + ? 'rd' + : 'th'; + return number + output; + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + moment.defineLocale('en-ie', { + months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split( + '_' + ), + monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'), + weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split( + '_' + ), + weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'), + weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[Today at] LT', + nextDay: '[Tomorrow at] LT', + nextWeek: 'dddd [at] LT', + lastDay: '[Yesterday at] LT', + lastWeek: '[Last] dddd [at] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'in %s', + past: '%s ago', + s: 'a few seconds', + ss: '%d seconds', + m: 'a minute', + mm: '%d minutes', + h: 'an hour', + hh: '%d hours', + d: 'a day', + dd: '%d days', + M: 'a month', + MM: '%d months', + y: 'a year', + yy: '%d years', + }, + dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/, + ordinal: function (number) { + var b = number % 10, + output = + ~~((number % 100) / 10) === 1 + ? 'th' + : b === 1 + ? 'st' + : b === 2 + ? 'nd' + : b === 3 + ? 'rd' + : 'th'; + return number + output; + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + moment.defineLocale('en-il', { + months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split( + '_' + ), + monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'), + weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split( + '_' + ), + weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'), + weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[Today at] LT', + nextDay: '[Tomorrow at] LT', + nextWeek: 'dddd [at] LT', + lastDay: '[Yesterday at] LT', + lastWeek: '[Last] dddd [at] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'in %s', + past: '%s ago', + s: 'a few seconds', + ss: '%d seconds', + m: 'a minute', + mm: '%d minutes', + h: 'an hour', + hh: '%d hours', + d: 'a day', + dd: '%d days', + M: 'a month', + MM: '%d months', + y: 'a year', + yy: '%d years', + }, + dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/, + ordinal: function (number) { + var b = number % 10, + output = + ~~((number % 100) / 10) === 1 + ? 'th' + : b === 1 + ? 'st' + : b === 2 + ? 'nd' + : b === 3 + ? 'rd' + : 'th'; + return number + output; + }, + }); + + //! moment.js locale configuration + + moment.defineLocale('en-in', { + months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split( + '_' + ), + monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'), + weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split( + '_' + ), + weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'), + weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'), + longDateFormat: { + LT: 'h:mm A', + LTS: 'h:mm:ss A', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY h:mm A', + LLLL: 'dddd, D MMMM YYYY h:mm A', + }, + calendar: { + sameDay: '[Today at] LT', + nextDay: '[Tomorrow at] LT', + nextWeek: 'dddd [at] LT', + lastDay: '[Yesterday at] LT', + lastWeek: '[Last] dddd [at] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'in %s', + past: '%s ago', + s: 'a few seconds', + ss: '%d seconds', + m: 'a minute', + mm: '%d minutes', + h: 'an hour', + hh: '%d hours', + d: 'a day', + dd: '%d days', + M: 'a month', + MM: '%d months', + y: 'a year', + yy: '%d years', + }, + dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/, + ordinal: function (number) { + var b = number % 10, + output = + ~~((number % 100) / 10) === 1 + ? 'th' + : b === 1 + ? 'st' + : b === 2 + ? 'nd' + : b === 3 + ? 'rd' + : 'th'; + return number + output; + }, + week: { + dow: 0, // Sunday is the first day of the week. + doy: 6, // The week that contains Jan 1st is the first week of the year. + }, + }); + + //! moment.js locale configuration + + moment.defineLocale('en-nz', { + months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split( + '_' + ), + monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'), + weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split( + '_' + ), + weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'), + weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'), + longDateFormat: { + LT: 'h:mm A', + LTS: 'h:mm:ss A', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY h:mm A', + LLLL: 'dddd, D MMMM YYYY h:mm A', + }, + calendar: { + sameDay: '[Today at] LT', + nextDay: '[Tomorrow at] LT', + nextWeek: 'dddd [at] LT', + lastDay: '[Yesterday at] LT', + lastWeek: '[Last] dddd [at] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'in %s', + past: '%s ago', + s: 'a few seconds', + ss: '%d seconds', + m: 'a minute', + mm: '%d minutes', + h: 'an hour', + hh: '%d hours', + d: 'a day', + dd: '%d days', + M: 'a month', + MM: '%d months', + y: 'a year', + yy: '%d years', + }, + dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/, + ordinal: function (number) { + var b = number % 10, + output = + ~~((number % 100) / 10) === 1 + ? 'th' + : b === 1 + ? 'st' + : b === 2 + ? 'nd' + : b === 3 + ? 'rd' + : 'th'; + return number + output; + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + moment.defineLocale('en-sg', { + months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split( + '_' + ), + monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'), + weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split( + '_' + ), + weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'), + weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[Today at] LT', + nextDay: '[Tomorrow at] LT', + nextWeek: 'dddd [at] LT', + lastDay: '[Yesterday at] LT', + lastWeek: '[Last] dddd [at] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'in %s', + past: '%s ago', + s: 'a few seconds', + ss: '%d seconds', + m: 'a minute', + mm: '%d minutes', + h: 'an hour', + hh: '%d hours', + d: 'a day', + dd: '%d days', + M: 'a month', + MM: '%d months', + y: 'a year', + yy: '%d years', + }, + dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/, + ordinal: function (number) { + var b = number % 10, + output = + ~~((number % 100) / 10) === 1 + ? 'th' + : b === 1 + ? 'st' + : b === 2 + ? 'nd' + : b === 3 + ? 'rd' + : 'th'; + return number + output; + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + moment.defineLocale('eo', { + months: 'januaro_februaro_marto_aprilo_majo_junio_julio_aŭgusto_septembro_oktobro_novembro_decembro'.split( + '_' + ), + monthsShort: 'jan_feb_mart_apr_maj_jun_jul_aŭg_sept_okt_nov_dec'.split('_'), + weekdays: 'dimanĉo_lundo_mardo_merkredo_ĵaŭdo_vendredo_sabato'.split('_'), + weekdaysShort: 'dim_lun_mard_merk_ĵaŭ_ven_sab'.split('_'), + weekdaysMin: 'di_lu_ma_me_ĵa_ve_sa'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'YYYY-MM-DD', + LL: '[la] D[-an de] MMMM, YYYY', + LLL: '[la] D[-an de] MMMM, YYYY HH:mm', + LLLL: 'dddd[n], [la] D[-an de] MMMM, YYYY HH:mm', + llll: 'ddd, [la] D[-an de] MMM, YYYY HH:mm', + }, + meridiemParse: /[ap]\.t\.m/i, + isPM: function (input) { + return input.charAt(0).toLowerCase() === 'p'; + }, + meridiem: function (hours, minutes, isLower) { + if (hours > 11) { + return isLower ? 'p.t.m.' : 'P.T.M.'; + } else { + return isLower ? 'a.t.m.' : 'A.T.M.'; + } + }, + calendar: { + sameDay: '[Hodiaŭ je] LT', + nextDay: '[Morgaŭ je] LT', + nextWeek: 'dddd[n je] LT', + lastDay: '[Hieraŭ je] LT', + lastWeek: '[pasintan] dddd[n je] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'post %s', + past: 'antaŭ %s', + s: 'kelkaj sekundoj', + ss: '%d sekundoj', + m: 'unu minuto', + mm: '%d minutoj', + h: 'unu horo', + hh: '%d horoj', + d: 'unu tago', //ne 'diurno', ĉar estas uzita por proksimumo + dd: '%d tagoj', + M: 'unu monato', + MM: '%d monatoj', + y: 'unu jaro', + yy: '%d jaroj', + }, + dayOfMonthOrdinalParse: /\d{1,2}a/, + ordinal: '%da', + week: { + dow: 1, // Monday is the first day of the week. + doy: 7, // The week that contains Jan 7th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var monthsShortDot = 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split( + '_' + ), + monthsShort$1 = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'), + monthsParse$2 = [ + /^ene/i, + /^feb/i, + /^mar/i, + /^abr/i, + /^may/i, + /^jun/i, + /^jul/i, + /^ago/i, + /^sep/i, + /^oct/i, + /^nov/i, + /^dic/i, + ], + monthsRegex$2 = /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i; + + moment.defineLocale('es-do', { + months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split( + '_' + ), + monthsShort: function (m, format) { + if (!m) { + return monthsShortDot; + } else if (/-MMM-/.test(format)) { + return monthsShort$1[m.month()]; + } else { + return monthsShortDot[m.month()]; + } + }, + monthsRegex: monthsRegex$2, + monthsShortRegex: monthsRegex$2, + monthsStrictRegex: /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i, + monthsShortStrictRegex: /^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i, + monthsParse: monthsParse$2, + longMonthsParse: monthsParse$2, + shortMonthsParse: monthsParse$2, + weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'), + weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'), + weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'h:mm A', + LTS: 'h:mm:ss A', + L: 'DD/MM/YYYY', + LL: 'D [de] MMMM [de] YYYY', + LLL: 'D [de] MMMM [de] YYYY h:mm A', + LLLL: 'dddd, D [de] MMMM [de] YYYY h:mm A', + }, + calendar: { + sameDay: function () { + return '[hoy a la' + (this.hours() !== 1 ? 's' : '') + '] LT'; + }, + nextDay: function () { + return '[mañana a la' + (this.hours() !== 1 ? 's' : '') + '] LT'; + }, + nextWeek: function () { + return 'dddd [a la' + (this.hours() !== 1 ? 's' : '') + '] LT'; + }, + lastDay: function () { + return '[ayer a la' + (this.hours() !== 1 ? 's' : '') + '] LT'; + }, + lastWeek: function () { + return ( + '[el] dddd [pasado a la' + + (this.hours() !== 1 ? 's' : '') + + '] LT' + ); + }, + sameElse: 'L', + }, + relativeTime: { + future: 'en %s', + past: 'hace %s', + s: 'unos segundos', + ss: '%d segundos', + m: 'un minuto', + mm: '%d minutos', + h: 'una hora', + hh: '%d horas', + d: 'un día', + dd: '%d días', + M: 'un mes', + MM: '%d meses', + y: 'un año', + yy: '%d años', + }, + dayOfMonthOrdinalParse: /\d{1,2}º/, + ordinal: '%dº', + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var monthsShortDot$1 = 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split( + '_' + ), + monthsShort$2 = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'), + monthsParse$3 = [ + /^ene/i, + /^feb/i, + /^mar/i, + /^abr/i, + /^may/i, + /^jun/i, + /^jul/i, + /^ago/i, + /^sep/i, + /^oct/i, + /^nov/i, + /^dic/i, + ], + monthsRegex$3 = /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i; + + moment.defineLocale('es-us', { + months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split( + '_' + ), + monthsShort: function (m, format) { + if (!m) { + return monthsShortDot$1; + } else if (/-MMM-/.test(format)) { + return monthsShort$2[m.month()]; + } else { + return monthsShortDot$1[m.month()]; + } + }, + monthsRegex: monthsRegex$3, + monthsShortRegex: monthsRegex$3, + monthsStrictRegex: /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i, + monthsShortStrictRegex: /^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i, + monthsParse: monthsParse$3, + longMonthsParse: monthsParse$3, + shortMonthsParse: monthsParse$3, + weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'), + weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'), + weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'h:mm A', + LTS: 'h:mm:ss A', + L: 'MM/DD/YYYY', + LL: 'D [de] MMMM [de] YYYY', + LLL: 'D [de] MMMM [de] YYYY h:mm A', + LLLL: 'dddd, D [de] MMMM [de] YYYY h:mm A', + }, + calendar: { + sameDay: function () { + return '[hoy a la' + (this.hours() !== 1 ? 's' : '') + '] LT'; + }, + nextDay: function () { + return '[mañana a la' + (this.hours() !== 1 ? 's' : '') + '] LT'; + }, + nextWeek: function () { + return 'dddd [a la' + (this.hours() !== 1 ? 's' : '') + '] LT'; + }, + lastDay: function () { + return '[ayer a la' + (this.hours() !== 1 ? 's' : '') + '] LT'; + }, + lastWeek: function () { + return ( + '[el] dddd [pasado a la' + + (this.hours() !== 1 ? 's' : '') + + '] LT' + ); + }, + sameElse: 'L', + }, + relativeTime: { + future: 'en %s', + past: 'hace %s', + s: 'unos segundos', + ss: '%d segundos', + m: 'un minuto', + mm: '%d minutos', + h: 'una hora', + hh: '%d horas', + d: 'un día', + dd: '%d días', + M: 'un mes', + MM: '%d meses', + y: 'un año', + yy: '%d años', + }, + dayOfMonthOrdinalParse: /\d{1,2}º/, + ordinal: '%dº', + week: { + dow: 0, // Sunday is the first day of the week. + doy: 6, // The week that contains Jan 6th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var monthsShortDot$2 = 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split( + '_' + ), + monthsShort$3 = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'), + monthsParse$4 = [ + /^ene/i, + /^feb/i, + /^mar/i, + /^abr/i, + /^may/i, + /^jun/i, + /^jul/i, + /^ago/i, + /^sep/i, + /^oct/i, + /^nov/i, + /^dic/i, + ], + monthsRegex$4 = /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i; + + moment.defineLocale('es', { + months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split( + '_' + ), + monthsShort: function (m, format) { + if (!m) { + return monthsShortDot$2; + } else if (/-MMM-/.test(format)) { + return monthsShort$3[m.month()]; + } else { + return monthsShortDot$2[m.month()]; + } + }, + monthsRegex: monthsRegex$4, + monthsShortRegex: monthsRegex$4, + monthsStrictRegex: /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i, + monthsShortStrictRegex: /^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i, + monthsParse: monthsParse$4, + longMonthsParse: monthsParse$4, + shortMonthsParse: monthsParse$4, + weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'), + weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'), + weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'H:mm', + LTS: 'H:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D [de] MMMM [de] YYYY', + LLL: 'D [de] MMMM [de] YYYY H:mm', + LLLL: 'dddd, D [de] MMMM [de] YYYY H:mm', + }, + calendar: { + sameDay: function () { + return '[hoy a la' + (this.hours() !== 1 ? 's' : '') + '] LT'; + }, + nextDay: function () { + return '[mañana a la' + (this.hours() !== 1 ? 's' : '') + '] LT'; + }, + nextWeek: function () { + return 'dddd [a la' + (this.hours() !== 1 ? 's' : '') + '] LT'; + }, + lastDay: function () { + return '[ayer a la' + (this.hours() !== 1 ? 's' : '') + '] LT'; + }, + lastWeek: function () { + return ( + '[el] dddd [pasado a la' + + (this.hours() !== 1 ? 's' : '') + + '] LT' + ); + }, + sameElse: 'L', + }, + relativeTime: { + future: 'en %s', + past: 'hace %s', + s: 'unos segundos', + ss: '%d segundos', + m: 'un minuto', + mm: '%d minutos', + h: 'una hora', + hh: '%d horas', + d: 'un día', + dd: '%d días', + M: 'un mes', + MM: '%d meses', + y: 'un año', + yy: '%d años', + }, + dayOfMonthOrdinalParse: /\d{1,2}º/, + ordinal: '%dº', + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + invalidDate: 'Fecha inválida', + }); + + //! moment.js locale configuration + + function processRelativeTime$3(number, withoutSuffix, key, isFuture) { + var format = { + s: ['mõne sekundi', 'mõni sekund', 'paar sekundit'], + ss: [number + 'sekundi', number + 'sekundit'], + m: ['ühe minuti', 'üks minut'], + mm: [number + ' minuti', number + ' minutit'], + h: ['ühe tunni', 'tund aega', 'üks tund'], + hh: [number + ' tunni', number + ' tundi'], + d: ['ühe päeva', 'üks päev'], + M: ['kuu aja', 'kuu aega', 'üks kuu'], + MM: [number + ' kuu', number + ' kuud'], + y: ['ühe aasta', 'aasta', 'üks aasta'], + yy: [number + ' aasta', number + ' aastat'], + }; + if (withoutSuffix) { + return format[key][2] ? format[key][2] : format[key][1]; + } + return isFuture ? format[key][0] : format[key][1]; + } + + moment.defineLocale('et', { + months: 'jaanuar_veebruar_märts_aprill_mai_juuni_juuli_august_september_oktoober_november_detsember'.split( + '_' + ), + monthsShort: 'jaan_veebr_märts_apr_mai_juuni_juuli_aug_sept_okt_nov_dets'.split( + '_' + ), + weekdays: 'pühapäev_esmaspäev_teisipäev_kolmapäev_neljapäev_reede_laupäev'.split( + '_' + ), + weekdaysShort: 'P_E_T_K_N_R_L'.split('_'), + weekdaysMin: 'P_E_T_K_N_R_L'.split('_'), + longDateFormat: { + LT: 'H:mm', + LTS: 'H:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D. MMMM YYYY', + LLL: 'D. MMMM YYYY H:mm', + LLLL: 'dddd, D. MMMM YYYY H:mm', + }, + calendar: { + sameDay: '[Täna,] LT', + nextDay: '[Homme,] LT', + nextWeek: '[Järgmine] dddd LT', + lastDay: '[Eile,] LT', + lastWeek: '[Eelmine] dddd LT', + sameElse: 'L', + }, + relativeTime: { + future: '%s pärast', + past: '%s tagasi', + s: processRelativeTime$3, + ss: processRelativeTime$3, + m: processRelativeTime$3, + mm: processRelativeTime$3, + h: processRelativeTime$3, + hh: processRelativeTime$3, + d: processRelativeTime$3, + dd: '%d päeva', + M: processRelativeTime$3, + MM: processRelativeTime$3, + y: processRelativeTime$3, + yy: processRelativeTime$3, + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal: '%d.', + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + moment.defineLocale('eu', { + months: 'urtarrila_otsaila_martxoa_apirila_maiatza_ekaina_uztaila_abuztua_iraila_urria_azaroa_abendua'.split( + '_' + ), + monthsShort: 'urt._ots._mar._api._mai._eka._uzt._abu._ira._urr._aza._abe.'.split( + '_' + ), + monthsParseExact: true, + weekdays: 'igandea_astelehena_asteartea_asteazkena_osteguna_ostirala_larunbata'.split( + '_' + ), + weekdaysShort: 'ig._al._ar._az._og._ol._lr.'.split('_'), + weekdaysMin: 'ig_al_ar_az_og_ol_lr'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'YYYY-MM-DD', + LL: 'YYYY[ko] MMMM[ren] D[a]', + LLL: 'YYYY[ko] MMMM[ren] D[a] HH:mm', + LLLL: 'dddd, YYYY[ko] MMMM[ren] D[a] HH:mm', + l: 'YYYY-M-D', + ll: 'YYYY[ko] MMM D[a]', + lll: 'YYYY[ko] MMM D[a] HH:mm', + llll: 'ddd, YYYY[ko] MMM D[a] HH:mm', + }, + calendar: { + sameDay: '[gaur] LT[etan]', + nextDay: '[bihar] LT[etan]', + nextWeek: 'dddd LT[etan]', + lastDay: '[atzo] LT[etan]', + lastWeek: '[aurreko] dddd LT[etan]', + sameElse: 'L', + }, + relativeTime: { + future: '%s barru', + past: 'duela %s', + s: 'segundo batzuk', + ss: '%d segundo', + m: 'minutu bat', + mm: '%d minutu', + h: 'ordu bat', + hh: '%d ordu', + d: 'egun bat', + dd: '%d egun', + M: 'hilabete bat', + MM: '%d hilabete', + y: 'urte bat', + yy: '%d urte', + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal: '%d.', + week: { + dow: 1, // Monday is the first day of the week. + doy: 7, // The week that contains Jan 7th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var symbolMap$5 = { + '1': '۱', + '2': '۲', + '3': '۳', + '4': '۴', + '5': '۵', + '6': '۶', + '7': '۷', + '8': '۸', + '9': '۹', + '0': '۰', + }, + numberMap$4 = { + '۱': '1', + '۲': '2', + '۳': '3', + '۴': '4', + '۵': '5', + '۶': '6', + '۷': '7', + '۸': '8', + '۹': '9', + '۰': '0', + }; + + moment.defineLocale('fa', { + months: 'ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر'.split( + '_' + ), + monthsShort: 'ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر'.split( + '_' + ), + weekdays: 'یک\u200cشنبه_دوشنبه_سه\u200cشنبه_چهارشنبه_پنج\u200cشنبه_جمعه_شنبه'.split( + '_' + ), + weekdaysShort: 'یک\u200cشنبه_دوشنبه_سه\u200cشنبه_چهارشنبه_پنج\u200cشنبه_جمعه_شنبه'.split( + '_' + ), + weekdaysMin: 'ی_د_س_چ_پ_ج_ش'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm', + }, + meridiemParse: /قبل از ظهر|بعد از ظهر/, + isPM: function (input) { + return /بعد از ظهر/.test(input); + }, + meridiem: function (hour, minute, isLower) { + if (hour < 12) { + return 'قبل از ظهر'; + } else { + return 'بعد از ظهر'; + } + }, + calendar: { + sameDay: '[امروز ساعت] LT', + nextDay: '[فردا ساعت] LT', + nextWeek: 'dddd [ساعت] LT', + lastDay: '[دیروز ساعت] LT', + lastWeek: 'dddd [پیش] [ساعت] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'در %s', + past: '%s پیش', + s: 'چند ثانیه', + ss: '%d ثانیه', + m: 'یک دقیقه', + mm: '%d دقیقه', + h: 'یک ساعت', + hh: '%d ساعت', + d: 'یک روز', + dd: '%d روز', + M: 'یک ماه', + MM: '%d ماه', + y: 'یک سال', + yy: '%d سال', + }, + preparse: function (string) { + return string + .replace(/[۰-۹]/g, function (match) { + return numberMap$4[match]; + }) + .replace(/،/g, ','); + }, + postformat: function (string) { + return string + .replace(/\d/g, function (match) { + return symbolMap$5[match]; + }) + .replace(/,/g, '،'); + }, + dayOfMonthOrdinalParse: /\d{1,2}م/, + ordinal: '%dم', + week: { + dow: 6, // Saturday is the first day of the week. + doy: 12, // The week that contains Jan 12th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var numbersPast = 'nolla yksi kaksi kolme neljä viisi kuusi seitsemän kahdeksan yhdeksän'.split( + ' ' + ), + numbersFuture = [ + 'nolla', + 'yhden', + 'kahden', + 'kolmen', + 'neljän', + 'viiden', + 'kuuden', + numbersPast[7], + numbersPast[8], + numbersPast[9], + ]; + function translate$2(number, withoutSuffix, key, isFuture) { + var result = ''; + switch (key) { + case 's': + return isFuture ? 'muutaman sekunnin' : 'muutama sekunti'; + case 'ss': + result = isFuture ? 'sekunnin' : 'sekuntia'; + break; + case 'm': + return isFuture ? 'minuutin' : 'minuutti'; + case 'mm': + result = isFuture ? 'minuutin' : 'minuuttia'; + break; + case 'h': + return isFuture ? 'tunnin' : 'tunti'; + case 'hh': + result = isFuture ? 'tunnin' : 'tuntia'; + break; + case 'd': + return isFuture ? 'päivän' : 'päivä'; + case 'dd': + result = isFuture ? 'päivän' : 'päivää'; + break; + case 'M': + return isFuture ? 'kuukauden' : 'kuukausi'; + case 'MM': + result = isFuture ? 'kuukauden' : 'kuukautta'; + break; + case 'y': + return isFuture ? 'vuoden' : 'vuosi'; + case 'yy': + result = isFuture ? 'vuoden' : 'vuotta'; + break; + } + result = verbalNumber(number, isFuture) + ' ' + result; + return result; + } + function verbalNumber(number, isFuture) { + return number < 10 + ? isFuture + ? numbersFuture[number] + : numbersPast[number] + : number; + } + + moment.defineLocale('fi', { + months: 'tammikuu_helmikuu_maaliskuu_huhtikuu_toukokuu_kesäkuu_heinäkuu_elokuu_syyskuu_lokakuu_marraskuu_joulukuu'.split( + '_' + ), + monthsShort: 'tammi_helmi_maalis_huhti_touko_kesä_heinä_elo_syys_loka_marras_joulu'.split( + '_' + ), + weekdays: 'sunnuntai_maanantai_tiistai_keskiviikko_torstai_perjantai_lauantai'.split( + '_' + ), + weekdaysShort: 'su_ma_ti_ke_to_pe_la'.split('_'), + weekdaysMin: 'su_ma_ti_ke_to_pe_la'.split('_'), + longDateFormat: { + LT: 'HH.mm', + LTS: 'HH.mm.ss', + L: 'DD.MM.YYYY', + LL: 'Do MMMM[ta] YYYY', + LLL: 'Do MMMM[ta] YYYY, [klo] HH.mm', + LLLL: 'dddd, Do MMMM[ta] YYYY, [klo] HH.mm', + l: 'D.M.YYYY', + ll: 'Do MMM YYYY', + lll: 'Do MMM YYYY, [klo] HH.mm', + llll: 'ddd, Do MMM YYYY, [klo] HH.mm', + }, + calendar: { + sameDay: '[tänään] [klo] LT', + nextDay: '[huomenna] [klo] LT', + nextWeek: 'dddd [klo] LT', + lastDay: '[eilen] [klo] LT', + lastWeek: '[viime] dddd[na] [klo] LT', + sameElse: 'L', + }, + relativeTime: { + future: '%s päästä', + past: '%s sitten', + s: translate$2, + ss: translate$2, + m: translate$2, + mm: translate$2, + h: translate$2, + hh: translate$2, + d: translate$2, + dd: translate$2, + M: translate$2, + MM: translate$2, + y: translate$2, + yy: translate$2, + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal: '%d.', + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + moment.defineLocale('fil', { + months: 'Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre'.split( + '_' + ), + monthsShort: 'Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis'.split('_'), + weekdays: 'Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado'.split( + '_' + ), + weekdaysShort: 'Lin_Lun_Mar_Miy_Huw_Biy_Sab'.split('_'), + weekdaysMin: 'Li_Lu_Ma_Mi_Hu_Bi_Sab'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'MM/D/YYYY', + LL: 'MMMM D, YYYY', + LLL: 'MMMM D, YYYY HH:mm', + LLLL: 'dddd, MMMM DD, YYYY HH:mm', + }, + calendar: { + sameDay: 'LT [ngayong araw]', + nextDay: '[Bukas ng] LT', + nextWeek: 'LT [sa susunod na] dddd', + lastDay: 'LT [kahapon]', + lastWeek: 'LT [noong nakaraang] dddd', + sameElse: 'L', + }, + relativeTime: { + future: 'sa loob ng %s', + past: '%s ang nakalipas', + s: 'ilang segundo', + ss: '%d segundo', + m: 'isang minuto', + mm: '%d minuto', + h: 'isang oras', + hh: '%d oras', + d: 'isang araw', + dd: '%d araw', + M: 'isang buwan', + MM: '%d buwan', + y: 'isang taon', + yy: '%d taon', + }, + dayOfMonthOrdinalParse: /\d{1,2}/, + ordinal: function (number) { + return number; + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + moment.defineLocale('fo', { + months: 'januar_februar_mars_apríl_mai_juni_juli_august_september_oktober_november_desember'.split( + '_' + ), + monthsShort: 'jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des'.split('_'), + weekdays: 'sunnudagur_mánadagur_týsdagur_mikudagur_hósdagur_fríggjadagur_leygardagur'.split( + '_' + ), + weekdaysShort: 'sun_mán_týs_mik_hós_frí_ley'.split('_'), + weekdaysMin: 'su_má_tý_mi_hó_fr_le'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd D. MMMM, YYYY HH:mm', + }, + calendar: { + sameDay: '[Í dag kl.] LT', + nextDay: '[Í morgin kl.] LT', + nextWeek: 'dddd [kl.] LT', + lastDay: '[Í gjár kl.] LT', + lastWeek: '[síðstu] dddd [kl] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'um %s', + past: '%s síðani', + s: 'fá sekund', + ss: '%d sekundir', + m: 'ein minuttur', + mm: '%d minuttir', + h: 'ein tími', + hh: '%d tímar', + d: 'ein dagur', + dd: '%d dagar', + M: 'ein mánaður', + MM: '%d mánaðir', + y: 'eitt ár', + yy: '%d ár', + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal: '%d.', + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + moment.defineLocale('fr-ca', { + months: 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split( + '_' + ), + monthsShort: 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split( + '_' + ), + monthsParseExact: true, + weekdays: 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'), + weekdaysShort: 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'), + weekdaysMin: 'di_lu_ma_me_je_ve_sa'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'YYYY-MM-DD', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[Aujourd’hui à] LT', + nextDay: '[Demain à] LT', + nextWeek: 'dddd [à] LT', + lastDay: '[Hier à] LT', + lastWeek: 'dddd [dernier à] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'dans %s', + past: 'il y a %s', + s: 'quelques secondes', + ss: '%d secondes', + m: 'une minute', + mm: '%d minutes', + h: 'une heure', + hh: '%d heures', + d: 'un jour', + dd: '%d jours', + M: 'un mois', + MM: '%d mois', + y: 'un an', + yy: '%d ans', + }, + dayOfMonthOrdinalParse: /\d{1,2}(er|e)/, + ordinal: function (number, period) { + switch (period) { + // Words with masculine grammatical gender: mois, trimestre, jour + default: + case 'M': + case 'Q': + case 'D': + case 'DDD': + case 'd': + return number + (number === 1 ? 'er' : 'e'); + + // Words with feminine grammatical gender: semaine + case 'w': + case 'W': + return number + (number === 1 ? 're' : 'e'); + } + }, + }); + + //! moment.js locale configuration + + moment.defineLocale('fr-ch', { + months: 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split( + '_' + ), + monthsShort: 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split( + '_' + ), + monthsParseExact: true, + weekdays: 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'), + weekdaysShort: 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'), + weekdaysMin: 'di_lu_ma_me_je_ve_sa'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[Aujourd’hui à] LT', + nextDay: '[Demain à] LT', + nextWeek: 'dddd [à] LT', + lastDay: '[Hier à] LT', + lastWeek: 'dddd [dernier à] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'dans %s', + past: 'il y a %s', + s: 'quelques secondes', + ss: '%d secondes', + m: 'une minute', + mm: '%d minutes', + h: 'une heure', + hh: '%d heures', + d: 'un jour', + dd: '%d jours', + M: 'un mois', + MM: '%d mois', + y: 'un an', + yy: '%d ans', + }, + dayOfMonthOrdinalParse: /\d{1,2}(er|e)/, + ordinal: function (number, period) { + switch (period) { + // Words with masculine grammatical gender: mois, trimestre, jour + default: + case 'M': + case 'Q': + case 'D': + case 'DDD': + case 'd': + return number + (number === 1 ? 'er' : 'e'); + + // Words with feminine grammatical gender: semaine + case 'w': + case 'W': + return number + (number === 1 ? 're' : 'e'); + } + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var monthsStrictRegex$1 = /^(janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i, + monthsShortStrictRegex$1 = /(janv\.?|févr\.?|mars|avr\.?|mai|juin|juil\.?|août|sept\.?|oct\.?|nov\.?|déc\.?)/i, + monthsRegex$5 = /(janv\.?|févr\.?|mars|avr\.?|mai|juin|juil\.?|août|sept\.?|oct\.?|nov\.?|déc\.?|janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i, + monthsParse$5 = [ + /^janv/i, + /^févr/i, + /^mars/i, + /^avr/i, + /^mai/i, + /^juin/i, + /^juil/i, + /^août/i, + /^sept/i, + /^oct/i, + /^nov/i, + /^déc/i, + ]; + + moment.defineLocale('fr', { + months: 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split( + '_' + ), + monthsShort: 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split( + '_' + ), + monthsRegex: monthsRegex$5, + monthsShortRegex: monthsRegex$5, + monthsStrictRegex: monthsStrictRegex$1, + monthsShortStrictRegex: monthsShortStrictRegex$1, + monthsParse: monthsParse$5, + longMonthsParse: monthsParse$5, + shortMonthsParse: monthsParse$5, + weekdays: 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'), + weekdaysShort: 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'), + weekdaysMin: 'di_lu_ma_me_je_ve_sa'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[Aujourd’hui à] LT', + nextDay: '[Demain à] LT', + nextWeek: 'dddd [à] LT', + lastDay: '[Hier à] LT', + lastWeek: 'dddd [dernier à] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'dans %s', + past: 'il y a %s', + s: 'quelques secondes', + ss: '%d secondes', + m: 'une minute', + mm: '%d minutes', + h: 'une heure', + hh: '%d heures', + d: 'un jour', + dd: '%d jours', + M: 'un mois', + MM: '%d mois', + y: 'un an', + yy: '%d ans', + }, + dayOfMonthOrdinalParse: /\d{1,2}(er|)/, + ordinal: function (number, period) { + switch (period) { + // TODO: Return 'e' when day of month > 1. Move this case inside + // block for masculine words below. + // See https://github.com/moment/moment/issues/3375 + case 'D': + return number + (number === 1 ? 'er' : ''); + + // Words with masculine grammatical gender: mois, trimestre, jour + default: + case 'M': + case 'Q': + case 'DDD': + case 'd': + return number + (number === 1 ? 'er' : 'e'); + + // Words with feminine grammatical gender: semaine + case 'w': + case 'W': + return number + (number === 1 ? 're' : 'e'); + } + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var monthsShortWithDots = 'jan._feb._mrt._apr._mai_jun._jul._aug._sep._okt._nov._des.'.split( + '_' + ), + monthsShortWithoutDots = 'jan_feb_mrt_apr_mai_jun_jul_aug_sep_okt_nov_des'.split( + '_' + ); + + moment.defineLocale('fy', { + months: 'jannewaris_febrewaris_maart_april_maaie_juny_july_augustus_septimber_oktober_novimber_desimber'.split( + '_' + ), + monthsShort: function (m, format) { + if (!m) { + return monthsShortWithDots; + } else if (/-MMM-/.test(format)) { + return monthsShortWithoutDots[m.month()]; + } else { + return monthsShortWithDots[m.month()]; + } + }, + monthsParseExact: true, + weekdays: 'snein_moandei_tiisdei_woansdei_tongersdei_freed_sneon'.split( + '_' + ), + weekdaysShort: 'si._mo._ti._wo._to._fr._so.'.split('_'), + weekdaysMin: 'Si_Mo_Ti_Wo_To_Fr_So'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD-MM-YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[hjoed om] LT', + nextDay: '[moarn om] LT', + nextWeek: 'dddd [om] LT', + lastDay: '[juster om] LT', + lastWeek: '[ôfrûne] dddd [om] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'oer %s', + past: '%s lyn', + s: 'in pear sekonden', + ss: '%d sekonden', + m: 'ien minút', + mm: '%d minuten', + h: 'ien oere', + hh: '%d oeren', + d: 'ien dei', + dd: '%d dagen', + M: 'ien moanne', + MM: '%d moannen', + y: 'ien jier', + yy: '%d jierren', + }, + dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/, + ordinal: function (number) { + return ( + number + + (number === 1 || number === 8 || number >= 20 ? 'ste' : 'de') + ); + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var months$5 = [ + 'Eanáir', + 'Feabhra', + 'Márta', + 'Aibreán', + 'Bealtaine', + 'Meitheamh', + 'Iúil', + 'Lúnasa', + 'Meán Fómhair', + 'Deireadh Fómhair', + 'Samhain', + 'Nollaig', + ], + monthsShort$4 = [ + 'Ean', + 'Feabh', + 'Márt', + 'Aib', + 'Beal', + 'Meith', + 'Iúil', + 'Lún', + 'M.F.', + 'D.F.', + 'Samh', + 'Noll', + ], + weekdays$1 = [ + 'Dé Domhnaigh', + 'Dé Luain', + 'Dé Máirt', + 'Dé Céadaoin', + 'Déardaoin', + 'Dé hAoine', + 'Dé Sathairn', + ], + weekdaysShort = ['Domh', 'Luan', 'Máirt', 'Céad', 'Déar', 'Aoine', 'Sath'], + weekdaysMin = ['Do', 'Lu', 'Má', 'Cé', 'Dé', 'A', 'Sa']; + + moment.defineLocale('ga', { + months: months$5, + monthsShort: monthsShort$4, + monthsParseExact: true, + weekdays: weekdays$1, + weekdaysShort: weekdaysShort, + weekdaysMin: weekdaysMin, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[Inniu ag] LT', + nextDay: '[Amárach ag] LT', + nextWeek: 'dddd [ag] LT', + lastDay: '[Inné ag] LT', + lastWeek: 'dddd [seo caite] [ag] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'i %s', + past: '%s ó shin', + s: 'cúpla soicind', + ss: '%d soicind', + m: 'nóiméad', + mm: '%d nóiméad', + h: 'uair an chloig', + hh: '%d uair an chloig', + d: 'lá', + dd: '%d lá', + M: 'mí', + MM: '%d míonna', + y: 'bliain', + yy: '%d bliain', + }, + dayOfMonthOrdinalParse: /\d{1,2}(d|na|mh)/, + ordinal: function (number) { + var output = number === 1 ? 'd' : number % 10 === 2 ? 'na' : 'mh'; + return number + output; + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var months$6 = [ + 'Am Faoilleach', + 'An Gearran', + 'Am Màrt', + 'An Giblean', + 'An Cèitean', + 'An t-Ògmhios', + 'An t-Iuchar', + 'An Lùnastal', + 'An t-Sultain', + 'An Dàmhair', + 'An t-Samhain', + 'An Dùbhlachd', + ], + monthsShort$5 = [ + 'Faoi', + 'Gear', + 'Màrt', + 'Gibl', + 'Cèit', + 'Ògmh', + 'Iuch', + 'Lùn', + 'Sult', + 'Dàmh', + 'Samh', + 'Dùbh', + ], + weekdays$2 = [ + 'Didòmhnaich', + 'Diluain', + 'Dimàirt', + 'Diciadain', + 'Diardaoin', + 'Dihaoine', + 'Disathairne', + ], + weekdaysShort$1 = ['Did', 'Dil', 'Dim', 'Dic', 'Dia', 'Dih', 'Dis'], + weekdaysMin$1 = ['Dò', 'Lu', 'Mà', 'Ci', 'Ar', 'Ha', 'Sa']; + + moment.defineLocale('gd', { + months: months$6, + monthsShort: monthsShort$5, + monthsParseExact: true, + weekdays: weekdays$2, + weekdaysShort: weekdaysShort$1, + weekdaysMin: weekdaysMin$1, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[An-diugh aig] LT', + nextDay: '[A-màireach aig] LT', + nextWeek: 'dddd [aig] LT', + lastDay: '[An-dè aig] LT', + lastWeek: 'dddd [seo chaidh] [aig] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'ann an %s', + past: 'bho chionn %s', + s: 'beagan diogan', + ss: '%d diogan', + m: 'mionaid', + mm: '%d mionaidean', + h: 'uair', + hh: '%d uairean', + d: 'latha', + dd: '%d latha', + M: 'mìos', + MM: '%d mìosan', + y: 'bliadhna', + yy: '%d bliadhna', + }, + dayOfMonthOrdinalParse: /\d{1,2}(d|na|mh)/, + ordinal: function (number) { + var output = number === 1 ? 'd' : number % 10 === 2 ? 'na' : 'mh'; + return number + output; + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + moment.defineLocale('gl', { + months: 'xaneiro_febreiro_marzo_abril_maio_xuño_xullo_agosto_setembro_outubro_novembro_decembro'.split( + '_' + ), + monthsShort: 'xan._feb._mar._abr._mai._xuñ._xul._ago._set._out._nov._dec.'.split( + '_' + ), + monthsParseExact: true, + weekdays: 'domingo_luns_martes_mércores_xoves_venres_sábado'.split('_'), + weekdaysShort: 'dom._lun._mar._mér._xov._ven._sáb.'.split('_'), + weekdaysMin: 'do_lu_ma_mé_xo_ve_sá'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'H:mm', + LTS: 'H:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D [de] MMMM [de] YYYY', + LLL: 'D [de] MMMM [de] YYYY H:mm', + LLLL: 'dddd, D [de] MMMM [de] YYYY H:mm', + }, + calendar: { + sameDay: function () { + return '[hoxe ' + (this.hours() !== 1 ? 'ás' : 'á') + '] LT'; + }, + nextDay: function () { + return '[mañá ' + (this.hours() !== 1 ? 'ás' : 'á') + '] LT'; + }, + nextWeek: function () { + return 'dddd [' + (this.hours() !== 1 ? 'ás' : 'a') + '] LT'; + }, + lastDay: function () { + return '[onte ' + (this.hours() !== 1 ? 'á' : 'a') + '] LT'; + }, + lastWeek: function () { + return ( + '[o] dddd [pasado ' + (this.hours() !== 1 ? 'ás' : 'a') + '] LT' + ); + }, + sameElse: 'L', + }, + relativeTime: { + future: function (str) { + if (str.indexOf('un') === 0) { + return 'n' + str; + } + return 'en ' + str; + }, + past: 'hai %s', + s: 'uns segundos', + ss: '%d segundos', + m: 'un minuto', + mm: '%d minutos', + h: 'unha hora', + hh: '%d horas', + d: 'un día', + dd: '%d días', + M: 'un mes', + MM: '%d meses', + y: 'un ano', + yy: '%d anos', + }, + dayOfMonthOrdinalParse: /\d{1,2}º/, + ordinal: '%dº', + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + function processRelativeTime$4(number, withoutSuffix, key, isFuture) { + var format = { + s: ['थोडया सॅकंडांनी', 'थोडे सॅकंड'], + ss: [number + ' सॅकंडांनी', number + ' सॅकंड'], + m: ['एका मिणटान', 'एक मिनूट'], + mm: [number + ' मिणटांनी', number + ' मिणटां'], + h: ['एका वरान', 'एक वर'], + hh: [number + ' वरांनी', number + ' वरां'], + d: ['एका दिसान', 'एक दीस'], + dd: [number + ' दिसांनी', number + ' दीस'], + M: ['एका म्हयन्यान', 'एक म्हयनो'], + MM: [number + ' म्हयन्यानी', number + ' म्हयने'], + y: ['एका वर्सान', 'एक वर्स'], + yy: [number + ' वर्सांनी', number + ' वर्सां'], + }; + return isFuture ? format[key][0] : format[key][1]; + } + + moment.defineLocale('gom-deva', { + months: { + standalone: 'जानेवारी_फेब्रुवारी_मार्च_एप्रील_मे_जून_जुलय_ऑगस्ट_सप्टेंबर_ऑक्टोबर_नोव्हेंबर_डिसेंबर'.split( + '_' + ), + format: 'जानेवारीच्या_फेब्रुवारीच्या_मार्चाच्या_एप्रीलाच्या_मेयाच्या_जूनाच्या_जुलयाच्या_ऑगस्टाच्या_सप्टेंबराच्या_ऑक्टोबराच्या_नोव्हेंबराच्या_डिसेंबराच्या'.split( + '_' + ), + isFormat: /MMMM(\s)+D[oD]?/, + }, + monthsShort: 'जाने._फेब्रु._मार्च_एप्री._मे_जून_जुल._ऑग._सप्टें._ऑक्टो._नोव्हें._डिसें.'.split( + '_' + ), + monthsParseExact: true, + weekdays: 'आयतार_सोमार_मंगळार_बुधवार_बिरेस्तार_सुक्रार_शेनवार'.split('_'), + weekdaysShort: 'आयत._सोम._मंगळ._बुध._ब्रेस्त._सुक्र._शेन.'.split('_'), + weekdaysMin: 'आ_सो_मं_बु_ब्रे_सु_शे'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'A h:mm [वाजतां]', + LTS: 'A h:mm:ss [वाजतां]', + L: 'DD-MM-YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY A h:mm [वाजतां]', + LLLL: 'dddd, MMMM Do, YYYY, A h:mm [वाजतां]', + llll: 'ddd, D MMM YYYY, A h:mm [वाजतां]', + }, + calendar: { + sameDay: '[आयज] LT', + nextDay: '[फाल्यां] LT', + nextWeek: '[फुडलो] dddd[,] LT', + lastDay: '[काल] LT', + lastWeek: '[फाटलो] dddd[,] LT', + sameElse: 'L', + }, + relativeTime: { + future: '%s', + past: '%s आदीं', + s: processRelativeTime$4, + ss: processRelativeTime$4, + m: processRelativeTime$4, + mm: processRelativeTime$4, + h: processRelativeTime$4, + hh: processRelativeTime$4, + d: processRelativeTime$4, + dd: processRelativeTime$4, + M: processRelativeTime$4, + MM: processRelativeTime$4, + y: processRelativeTime$4, + yy: processRelativeTime$4, + }, + dayOfMonthOrdinalParse: /\d{1,2}(वेर)/, + ordinal: function (number, period) { + switch (period) { + // the ordinal 'वेर' only applies to day of the month + case 'D': + return number + 'वेर'; + default: + case 'M': + case 'Q': + case 'DDD': + case 'd': + case 'w': + case 'W': + return number; + } + }, + week: { + dow: 0, // Sunday is the first day of the week + doy: 3, // The week that contains Jan 4th is the first week of the year (7 + 0 - 4) + }, + meridiemParse: /राती|सकाळीं|दनपारां|सांजे/, + meridiemHour: function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === 'राती') { + return hour < 4 ? hour : hour + 12; + } else if (meridiem === 'सकाळीं') { + return hour; + } else if (meridiem === 'दनपारां') { + return hour > 12 ? hour : hour + 12; + } else if (meridiem === 'सांजे') { + return hour + 12; + } + }, + meridiem: function (hour, minute, isLower) { + if (hour < 4) { + return 'राती'; + } else if (hour < 12) { + return 'सकाळीं'; + } else if (hour < 16) { + return 'दनपारां'; + } else if (hour < 20) { + return 'सांजे'; + } else { + return 'राती'; + } + }, + }); + + //! moment.js locale configuration + + function processRelativeTime$5(number, withoutSuffix, key, isFuture) { + var format = { + s: ['thoddea sekondamni', 'thodde sekond'], + ss: [number + ' sekondamni', number + ' sekond'], + m: ['eka mintan', 'ek minut'], + mm: [number + ' mintamni', number + ' mintam'], + h: ['eka voran', 'ek vor'], + hh: [number + ' voramni', number + ' voram'], + d: ['eka disan', 'ek dis'], + dd: [number + ' disamni', number + ' dis'], + M: ['eka mhoinean', 'ek mhoino'], + MM: [number + ' mhoineamni', number + ' mhoine'], + y: ['eka vorsan', 'ek voros'], + yy: [number + ' vorsamni', number + ' vorsam'], + }; + return isFuture ? format[key][0] : format[key][1]; + } + + moment.defineLocale('gom-latn', { + months: { + standalone: 'Janer_Febrer_Mars_Abril_Mai_Jun_Julai_Agost_Setembr_Otubr_Novembr_Dezembr'.split( + '_' + ), + format: 'Janerachea_Febrerachea_Marsachea_Abrilachea_Maiachea_Junachea_Julaiachea_Agostachea_Setembrachea_Otubrachea_Novembrachea_Dezembrachea'.split( + '_' + ), + isFormat: /MMMM(\s)+D[oD]?/, + }, + monthsShort: 'Jan._Feb._Mars_Abr._Mai_Jun_Jul._Ago._Set._Otu._Nov._Dez.'.split( + '_' + ), + monthsParseExact: true, + weekdays: "Aitar_Somar_Mongllar_Budhvar_Birestar_Sukrar_Son'var".split('_'), + weekdaysShort: 'Ait._Som._Mon._Bud._Bre._Suk._Son.'.split('_'), + weekdaysMin: 'Ai_Sm_Mo_Bu_Br_Su_Sn'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'A h:mm [vazta]', + LTS: 'A h:mm:ss [vazta]', + L: 'DD-MM-YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY A h:mm [vazta]', + LLLL: 'dddd, MMMM Do, YYYY, A h:mm [vazta]', + llll: 'ddd, D MMM YYYY, A h:mm [vazta]', + }, + calendar: { + sameDay: '[Aiz] LT', + nextDay: '[Faleam] LT', + nextWeek: '[Fuddlo] dddd[,] LT', + lastDay: '[Kal] LT', + lastWeek: '[Fattlo] dddd[,] LT', + sameElse: 'L', + }, + relativeTime: { + future: '%s', + past: '%s adim', + s: processRelativeTime$5, + ss: processRelativeTime$5, + m: processRelativeTime$5, + mm: processRelativeTime$5, + h: processRelativeTime$5, + hh: processRelativeTime$5, + d: processRelativeTime$5, + dd: processRelativeTime$5, + M: processRelativeTime$5, + MM: processRelativeTime$5, + y: processRelativeTime$5, + yy: processRelativeTime$5, + }, + dayOfMonthOrdinalParse: /\d{1,2}(er)/, + ordinal: function (number, period) { + switch (period) { + // the ordinal 'er' only applies to day of the month + case 'D': + return number + 'er'; + default: + case 'M': + case 'Q': + case 'DDD': + case 'd': + case 'w': + case 'W': + return number; + } + }, + week: { + dow: 0, // Sunday is the first day of the week + doy: 3, // The week that contains Jan 4th is the first week of the year (7 + 0 - 4) + }, + meridiemParse: /rati|sokallim|donparam|sanje/, + meridiemHour: function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === 'rati') { + return hour < 4 ? hour : hour + 12; + } else if (meridiem === 'sokallim') { + return hour; + } else if (meridiem === 'donparam') { + return hour > 12 ? hour : hour + 12; + } else if (meridiem === 'sanje') { + return hour + 12; + } + }, + meridiem: function (hour, minute, isLower) { + if (hour < 4) { + return 'rati'; + } else if (hour < 12) { + return 'sokallim'; + } else if (hour < 16) { + return 'donparam'; + } else if (hour < 20) { + return 'sanje'; + } else { + return 'rati'; + } + }, + }); + + //! moment.js locale configuration + + var symbolMap$6 = { + '1': '૧', + '2': '૨', + '3': '૩', + '4': '૪', + '5': '૫', + '6': '૬', + '7': '૭', + '8': '૮', + '9': '૯', + '0': '૦', + }, + numberMap$5 = { + '૧': '1', + '૨': '2', + '૩': '3', + '૪': '4', + '૫': '5', + '૬': '6', + '૭': '7', + '૮': '8', + '૯': '9', + '૦': '0', + }; + + moment.defineLocale('gu', { + months: 'જાન્યુઆરી_ફેબ્રુઆરી_માર્ચ_એપ્રિલ_મે_જૂન_જુલાઈ_ઑગસ્ટ_સપ્ટેમ્બર_ઑક્ટ્બર_નવેમ્બર_ડિસેમ્બર'.split( + '_' + ), + monthsShort: 'જાન્યુ._ફેબ્રુ._માર્ચ_એપ્રિ._મે_જૂન_જુલા._ઑગ._સપ્ટે._ઑક્ટ્._નવે._ડિસે.'.split( + '_' + ), + monthsParseExact: true, + weekdays: 'રવિવાર_સોમવાર_મંગળવાર_બુધ્વાર_ગુરુવાર_શુક્રવાર_શનિવાર'.split( + '_' + ), + weekdaysShort: 'રવિ_સોમ_મંગળ_બુધ્_ગુરુ_શુક્ર_શનિ'.split('_'), + weekdaysMin: 'ર_સો_મં_બુ_ગુ_શુ_શ'.split('_'), + longDateFormat: { + LT: 'A h:mm વાગ્યે', + LTS: 'A h:mm:ss વાગ્યે', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY, A h:mm વાગ્યે', + LLLL: 'dddd, D MMMM YYYY, A h:mm વાગ્યે', + }, + calendar: { + sameDay: '[આજ] LT', + nextDay: '[કાલે] LT', + nextWeek: 'dddd, LT', + lastDay: '[ગઇકાલે] LT', + lastWeek: '[પાછલા] dddd, LT', + sameElse: 'L', + }, + relativeTime: { + future: '%s મા', + past: '%s પહેલા', + s: 'અમુક પળો', + ss: '%d સેકંડ', + m: 'એક મિનિટ', + mm: '%d મિનિટ', + h: 'એક કલાક', + hh: '%d કલાક', + d: 'એક દિવસ', + dd: '%d દિવસ', + M: 'એક મહિનો', + MM: '%d મહિનો', + y: 'એક વર્ષ', + yy: '%d વર્ષ', + }, + preparse: function (string) { + return string.replace(/[૧૨૩૪૫૬૭૮૯૦]/g, function (match) { + return numberMap$5[match]; + }); + }, + postformat: function (string) { + return string.replace(/\d/g, function (match) { + return symbolMap$6[match]; + }); + }, + // Gujarati notation for meridiems are quite fuzzy in practice. While there exists + // a rigid notion of a 'Pahar' it is not used as rigidly in modern Gujarati. + meridiemParse: /રાત|બપોર|સવાર|સાંજ/, + meridiemHour: function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === 'રાત') { + return hour < 4 ? hour : hour + 12; + } else if (meridiem === 'સવાર') { + return hour; + } else if (meridiem === 'બપોર') { + return hour >= 10 ? hour : hour + 12; + } else if (meridiem === 'સાંજ') { + return hour + 12; + } + }, + meridiem: function (hour, minute, isLower) { + if (hour < 4) { + return 'રાત'; + } else if (hour < 10) { + return 'સવાર'; + } else if (hour < 17) { + return 'બપોર'; + } else if (hour < 20) { + return 'સાંજ'; + } else { + return 'રાત'; + } + }, + week: { + dow: 0, // Sunday is the first day of the week. + doy: 6, // The week that contains Jan 6th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + moment.defineLocale('he', { + months: 'ינואר_פברואר_מרץ_אפריל_מאי_יוני_יולי_אוגוסט_ספטמבר_אוקטובר_נובמבר_דצמבר'.split( + '_' + ), + monthsShort: 'ינו׳_פבר׳_מרץ_אפר׳_מאי_יוני_יולי_אוג׳_ספט׳_אוק׳_נוב׳_דצמ׳'.split( + '_' + ), + weekdays: 'ראשון_שני_שלישי_רביעי_חמישי_שישי_שבת'.split('_'), + weekdaysShort: 'א׳_ב׳_ג׳_ד׳_ה׳_ו׳_ש׳'.split('_'), + weekdaysMin: 'א_ב_ג_ד_ה_ו_ש'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D [ב]MMMM YYYY', + LLL: 'D [ב]MMMM YYYY HH:mm', + LLLL: 'dddd, D [ב]MMMM YYYY HH:mm', + l: 'D/M/YYYY', + ll: 'D MMM YYYY', + lll: 'D MMM YYYY HH:mm', + llll: 'ddd, D MMM YYYY HH:mm', + }, + calendar: { + sameDay: '[היום ב־]LT', + nextDay: '[מחר ב־]LT', + nextWeek: 'dddd [בשעה] LT', + lastDay: '[אתמול ב־]LT', + lastWeek: '[ביום] dddd [האחרון בשעה] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'בעוד %s', + past: 'לפני %s', + s: 'מספר שניות', + ss: '%d שניות', + m: 'דקה', + mm: '%d דקות', + h: 'שעה', + hh: function (number) { + if (number === 2) { + return 'שעתיים'; + } + return number + ' שעות'; + }, + d: 'יום', + dd: function (number) { + if (number === 2) { + return 'יומיים'; + } + return number + ' ימים'; + }, + M: 'חודש', + MM: function (number) { + if (number === 2) { + return 'חודשיים'; + } + return number + ' חודשים'; + }, + y: 'שנה', + yy: function (number) { + if (number === 2) { + return 'שנתיים'; + } else if (number % 10 === 0 && number !== 10) { + return number + ' שנה'; + } + return number + ' שנים'; + }, + }, + meridiemParse: /אחה"צ|לפנה"צ|אחרי הצהריים|לפני הצהריים|לפנות בוקר|בבוקר|בערב/i, + isPM: function (input) { + return /^(אחה"צ|אחרי הצהריים|בערב)$/.test(input); + }, + meridiem: function (hour, minute, isLower) { + if (hour < 5) { + return 'לפנות בוקר'; + } else if (hour < 10) { + return 'בבוקר'; + } else if (hour < 12) { + return isLower ? 'לפנה"צ' : 'לפני הצהריים'; + } else if (hour < 18) { + return isLower ? 'אחה"צ' : 'אחרי הצהריים'; + } else { + return 'בערב'; + } + }, + }); + + //! moment.js locale configuration + + var symbolMap$7 = { + '1': '१', + '2': '२', + '3': '३', + '4': '४', + '5': '५', + '6': '६', + '7': '७', + '8': '८', + '9': '९', + '0': '०', + }, + numberMap$6 = { + '१': '1', + '२': '2', + '३': '3', + '४': '4', + '५': '5', + '६': '6', + '७': '7', + '८': '8', + '९': '9', + '०': '0', + }; + + moment.defineLocale('hi', { + months: 'जनवरी_फ़रवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितम्बर_अक्टूबर_नवम्बर_दिसम्बर'.split( + '_' + ), + monthsShort: 'जन._फ़र._मार्च_अप्रै._मई_जून_जुल._अग._सित._अक्टू._नव._दिस.'.split( + '_' + ), + monthsParseExact: true, + weekdays: 'रविवार_सोमवार_मंगलवार_बुधवार_गुरूवार_शुक्रवार_शनिवार'.split('_'), + weekdaysShort: 'रवि_सोम_मंगल_बुध_गुरू_शुक्र_शनि'.split('_'), + weekdaysMin: 'र_सो_मं_बु_गु_शु_श'.split('_'), + longDateFormat: { + LT: 'A h:mm बजे', + LTS: 'A h:mm:ss बजे', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY, A h:mm बजे', + LLLL: 'dddd, D MMMM YYYY, A h:mm बजे', + }, + calendar: { + sameDay: '[आज] LT', + nextDay: '[कल] LT', + nextWeek: 'dddd, LT', + lastDay: '[कल] LT', + lastWeek: '[पिछले] dddd, LT', + sameElse: 'L', + }, + relativeTime: { + future: '%s में', + past: '%s पहले', + s: 'कुछ ही क्षण', + ss: '%d सेकंड', + m: 'एक मिनट', + mm: '%d मिनट', + h: 'एक घंटा', + hh: '%d घंटे', + d: 'एक दिन', + dd: '%d दिन', + M: 'एक महीने', + MM: '%d महीने', + y: 'एक वर्ष', + yy: '%d वर्ष', + }, + preparse: function (string) { + return string.replace(/[१२३४५६७८९०]/g, function (match) { + return numberMap$6[match]; + }); + }, + postformat: function (string) { + return string.replace(/\d/g, function (match) { + return symbolMap$7[match]; + }); + }, + // Hindi notation for meridiems are quite fuzzy in practice. While there exists + // a rigid notion of a 'Pahar' it is not used as rigidly in modern Hindi. + meridiemParse: /रात|सुबह|दोपहर|शाम/, + meridiemHour: function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === 'रात') { + return hour < 4 ? hour : hour + 12; + } else if (meridiem === 'सुबह') { + return hour; + } else if (meridiem === 'दोपहर') { + return hour >= 10 ? hour : hour + 12; + } else if (meridiem === 'शाम') { + return hour + 12; + } + }, + meridiem: function (hour, minute, isLower) { + if (hour < 4) { + return 'रात'; + } else if (hour < 10) { + return 'सुबह'; + } else if (hour < 17) { + return 'दोपहर'; + } else if (hour < 20) { + return 'शाम'; + } else { + return 'रात'; + } + }, + week: { + dow: 0, // Sunday is the first day of the week. + doy: 6, // The week that contains Jan 6th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + function translate$3(number, withoutSuffix, key) { + var result = number + ' '; + switch (key) { + case 'ss': + if (number === 1) { + result += 'sekunda'; + } else if (number === 2 || number === 3 || number === 4) { + result += 'sekunde'; + } else { + result += 'sekundi'; + } + return result; + case 'm': + return withoutSuffix ? 'jedna minuta' : 'jedne minute'; + case 'mm': + if (number === 1) { + result += 'minuta'; + } else if (number === 2 || number === 3 || number === 4) { + result += 'minute'; + } else { + result += 'minuta'; + } + return result; + case 'h': + return withoutSuffix ? 'jedan sat' : 'jednog sata'; + case 'hh': + if (number === 1) { + result += 'sat'; + } else if (number === 2 || number === 3 || number === 4) { + result += 'sata'; + } else { + result += 'sati'; + } + return result; + case 'dd': + if (number === 1) { + result += 'dan'; + } else { + result += 'dana'; + } + return result; + case 'MM': + if (number === 1) { + result += 'mjesec'; + } else if (number === 2 || number === 3 || number === 4) { + result += 'mjeseca'; + } else { + result += 'mjeseci'; + } + return result; + case 'yy': + if (number === 1) { + result += 'godina'; + } else if (number === 2 || number === 3 || number === 4) { + result += 'godine'; + } else { + result += 'godina'; + } + return result; + } + } + + moment.defineLocale('hr', { + months: { + format: 'siječnja_veljače_ožujka_travnja_svibnja_lipnja_srpnja_kolovoza_rujna_listopada_studenoga_prosinca'.split( + '_' + ), + standalone: 'siječanj_veljača_ožujak_travanj_svibanj_lipanj_srpanj_kolovoz_rujan_listopad_studeni_prosinac'.split( + '_' + ), + }, + monthsShort: 'sij._velj._ožu._tra._svi._lip._srp._kol._ruj._lis._stu._pro.'.split( + '_' + ), + monthsParseExact: true, + weekdays: 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split( + '_' + ), + weekdaysShort: 'ned._pon._uto._sri._čet._pet._sub.'.split('_'), + weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'H:mm', + LTS: 'H:mm:ss', + L: 'DD.MM.YYYY', + LL: 'Do MMMM YYYY', + LLL: 'Do MMMM YYYY H:mm', + LLLL: 'dddd, Do MMMM YYYY H:mm', + }, + calendar: { + sameDay: '[danas u] LT', + nextDay: '[sutra u] LT', + nextWeek: function () { + switch (this.day()) { + case 0: + return '[u] [nedjelju] [u] LT'; + case 3: + return '[u] [srijedu] [u] LT'; + case 6: + return '[u] [subotu] [u] LT'; + case 1: + case 2: + case 4: + case 5: + return '[u] dddd [u] LT'; + } + }, + lastDay: '[jučer u] LT', + lastWeek: function () { + switch (this.day()) { + case 0: + return '[prošlu] [nedjelju] [u] LT'; + case 3: + return '[prošlu] [srijedu] [u] LT'; + case 6: + return '[prošle] [subote] [u] LT'; + case 1: + case 2: + case 4: + case 5: + return '[prošli] dddd [u] LT'; + } + }, + sameElse: 'L', + }, + relativeTime: { + future: 'za %s', + past: 'prije %s', + s: 'par sekundi', + ss: translate$3, + m: translate$3, + mm: translate$3, + h: translate$3, + hh: translate$3, + d: 'dan', + dd: translate$3, + M: 'mjesec', + MM: translate$3, + y: 'godinu', + yy: translate$3, + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal: '%d.', + week: { + dow: 1, // Monday is the first day of the week. + doy: 7, // The week that contains Jan 7th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var weekEndings = 'vasárnap hétfőn kedden szerdán csütörtökön pénteken szombaton'.split( + ' ' + ); + function translate$4(number, withoutSuffix, key, isFuture) { + var num = number; + switch (key) { + case 's': + return isFuture || withoutSuffix + ? 'néhány másodperc' + : 'néhány másodperce'; + case 'ss': + return num + (isFuture || withoutSuffix) + ? ' másodperc' + : ' másodperce'; + case 'm': + return 'egy' + (isFuture || withoutSuffix ? ' perc' : ' perce'); + case 'mm': + return num + (isFuture || withoutSuffix ? ' perc' : ' perce'); + case 'h': + return 'egy' + (isFuture || withoutSuffix ? ' óra' : ' órája'); + case 'hh': + return num + (isFuture || withoutSuffix ? ' óra' : ' órája'); + case 'd': + return 'egy' + (isFuture || withoutSuffix ? ' nap' : ' napja'); + case 'dd': + return num + (isFuture || withoutSuffix ? ' nap' : ' napja'); + case 'M': + return 'egy' + (isFuture || withoutSuffix ? ' hónap' : ' hónapja'); + case 'MM': + return num + (isFuture || withoutSuffix ? ' hónap' : ' hónapja'); + case 'y': + return 'egy' + (isFuture || withoutSuffix ? ' év' : ' éve'); + case 'yy': + return num + (isFuture || withoutSuffix ? ' év' : ' éve'); + } + return ''; + } + function week(isFuture) { + return ( + (isFuture ? '' : '[múlt] ') + + '[' + + weekEndings[this.day()] + + '] LT[-kor]' + ); + } + + moment.defineLocale('hu', { + months: 'január_február_március_április_május_június_július_augusztus_szeptember_október_november_december'.split( + '_' + ), + monthsShort: 'jan_feb_márc_ápr_máj_jún_júl_aug_szept_okt_nov_dec'.split( + '_' + ), + weekdays: 'vasárnap_hétfő_kedd_szerda_csütörtök_péntek_szombat'.split('_'), + weekdaysShort: 'vas_hét_kedd_sze_csüt_pén_szo'.split('_'), + weekdaysMin: 'v_h_k_sze_cs_p_szo'.split('_'), + longDateFormat: { + LT: 'H:mm', + LTS: 'H:mm:ss', + L: 'YYYY.MM.DD.', + LL: 'YYYY. MMMM D.', + LLL: 'YYYY. MMMM D. H:mm', + LLLL: 'YYYY. MMMM D., dddd H:mm', + }, + meridiemParse: /de|du/i, + isPM: function (input) { + return input.charAt(1).toLowerCase() === 'u'; + }, + meridiem: function (hours, minutes, isLower) { + if (hours < 12) { + return isLower === true ? 'de' : 'DE'; + } else { + return isLower === true ? 'du' : 'DU'; + } + }, + calendar: { + sameDay: '[ma] LT[-kor]', + nextDay: '[holnap] LT[-kor]', + nextWeek: function () { + return week.call(this, true); + }, + lastDay: '[tegnap] LT[-kor]', + lastWeek: function () { + return week.call(this, false); + }, + sameElse: 'L', + }, + relativeTime: { + future: '%s múlva', + past: '%s', + s: translate$4, + ss: translate$4, + m: translate$4, + mm: translate$4, + h: translate$4, + hh: translate$4, + d: translate$4, + dd: translate$4, + M: translate$4, + MM: translate$4, + y: translate$4, + yy: translate$4, + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal: '%d.', + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + moment.defineLocale('hy-am', { + months: { + format: 'հունվարի_փետրվարի_մարտի_ապրիլի_մայիսի_հունիսի_հուլիսի_օգոստոսի_սեպտեմբերի_հոկտեմբերի_նոյեմբերի_դեկտեմբերի'.split( + '_' + ), + standalone: 'հունվար_փետրվար_մարտ_ապրիլ_մայիս_հունիս_հուլիս_օգոստոս_սեպտեմբեր_հոկտեմբեր_նոյեմբեր_դեկտեմբեր'.split( + '_' + ), + }, + monthsShort: 'հնվ_փտր_մրտ_ապր_մյս_հնս_հլս_օգս_սպտ_հկտ_նմբ_դկտ'.split('_'), + weekdays: 'կիրակի_երկուշաբթի_երեքշաբթի_չորեքշաբթի_հինգշաբթի_ուրբաթ_շաբաթ'.split( + '_' + ), + weekdaysShort: 'կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ'.split('_'), + weekdaysMin: 'կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D MMMM YYYY թ.', + LLL: 'D MMMM YYYY թ., HH:mm', + LLLL: 'dddd, D MMMM YYYY թ., HH:mm', + }, + calendar: { + sameDay: '[այսօր] LT', + nextDay: '[վաղը] LT', + lastDay: '[երեկ] LT', + nextWeek: function () { + return 'dddd [օրը ժամը] LT'; + }, + lastWeek: function () { + return '[անցած] dddd [օրը ժամը] LT'; + }, + sameElse: 'L', + }, + relativeTime: { + future: '%s հետո', + past: '%s առաջ', + s: 'մի քանի վայրկյան', + ss: '%d վայրկյան', + m: 'րոպե', + mm: '%d րոպե', + h: 'ժամ', + hh: '%d ժամ', + d: 'օր', + dd: '%d օր', + M: 'ամիս', + MM: '%d ամիս', + y: 'տարի', + yy: '%d տարի', + }, + meridiemParse: /գիշերվա|առավոտվա|ցերեկվա|երեկոյան/, + isPM: function (input) { + return /^(ցերեկվա|երեկոյան)$/.test(input); + }, + meridiem: function (hour) { + if (hour < 4) { + return 'գիշերվա'; + } else if (hour < 12) { + return 'առավոտվա'; + } else if (hour < 17) { + return 'ցերեկվա'; + } else { + return 'երեկոյան'; + } + }, + dayOfMonthOrdinalParse: /\d{1,2}|\d{1,2}-(ին|րդ)/, + ordinal: function (number, period) { + switch (period) { + case 'DDD': + case 'w': + case 'W': + case 'DDDo': + if (number === 1) { + return number + '-ին'; + } + return number + '-րդ'; + default: + return number; + } + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 7, // The week that contains Jan 7th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + moment.defineLocale('id', { + months: 'Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_November_Desember'.split( + '_' + ), + monthsShort: 'Jan_Feb_Mar_Apr_Mei_Jun_Jul_Agt_Sep_Okt_Nov_Des'.split('_'), + weekdays: 'Minggu_Senin_Selasa_Rabu_Kamis_Jumat_Sabtu'.split('_'), + weekdaysShort: 'Min_Sen_Sel_Rab_Kam_Jum_Sab'.split('_'), + weekdaysMin: 'Mg_Sn_Sl_Rb_Km_Jm_Sb'.split('_'), + longDateFormat: { + LT: 'HH.mm', + LTS: 'HH.mm.ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY [pukul] HH.mm', + LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm', + }, + meridiemParse: /pagi|siang|sore|malam/, + meridiemHour: function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === 'pagi') { + return hour; + } else if (meridiem === 'siang') { + return hour >= 11 ? hour : hour + 12; + } else if (meridiem === 'sore' || meridiem === 'malam') { + return hour + 12; + } + }, + meridiem: function (hours, minutes, isLower) { + if (hours < 11) { + return 'pagi'; + } else if (hours < 15) { + return 'siang'; + } else if (hours < 19) { + return 'sore'; + } else { + return 'malam'; + } + }, + calendar: { + sameDay: '[Hari ini pukul] LT', + nextDay: '[Besok pukul] LT', + nextWeek: 'dddd [pukul] LT', + lastDay: '[Kemarin pukul] LT', + lastWeek: 'dddd [lalu pukul] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'dalam %s', + past: '%s yang lalu', + s: 'beberapa detik', + ss: '%d detik', + m: 'semenit', + mm: '%d menit', + h: 'sejam', + hh: '%d jam', + d: 'sehari', + dd: '%d hari', + M: 'sebulan', + MM: '%d bulan', + y: 'setahun', + yy: '%d tahun', + }, + week: { + dow: 0, // Sunday is the first day of the week. + doy: 6, // The week that contains Jan 6th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + function plural$2(n) { + if (n % 100 === 11) { + return true; + } else if (n % 10 === 1) { + return false; + } + return true; + } + function translate$5(number, withoutSuffix, key, isFuture) { + var result = number + ' '; + switch (key) { + case 's': + return withoutSuffix || isFuture + ? 'nokkrar sekúndur' + : 'nokkrum sekúndum'; + case 'ss': + if (plural$2(number)) { + return ( + result + + (withoutSuffix || isFuture ? 'sekúndur' : 'sekúndum') + ); + } + return result + 'sekúnda'; + case 'm': + return withoutSuffix ? 'mínúta' : 'mínútu'; + case 'mm': + if (plural$2(number)) { + return ( + result + (withoutSuffix || isFuture ? 'mínútur' : 'mínútum') + ); + } else if (withoutSuffix) { + return result + 'mínúta'; + } + return result + 'mínútu'; + case 'hh': + if (plural$2(number)) { + return ( + result + + (withoutSuffix || isFuture + ? 'klukkustundir' + : 'klukkustundum') + ); + } + return result + 'klukkustund'; + case 'd': + if (withoutSuffix) { + return 'dagur'; + } + return isFuture ? 'dag' : 'degi'; + case 'dd': + if (plural$2(number)) { + if (withoutSuffix) { + return result + 'dagar'; + } + return result + (isFuture ? 'daga' : 'dögum'); + } else if (withoutSuffix) { + return result + 'dagur'; + } + return result + (isFuture ? 'dag' : 'degi'); + case 'M': + if (withoutSuffix) { + return 'mánuður'; + } + return isFuture ? 'mánuð' : 'mánuði'; + case 'MM': + if (plural$2(number)) { + if (withoutSuffix) { + return result + 'mánuðir'; + } + return result + (isFuture ? 'mánuði' : 'mánuðum'); + } else if (withoutSuffix) { + return result + 'mánuður'; + } + return result + (isFuture ? 'mánuð' : 'mánuði'); + case 'y': + return withoutSuffix || isFuture ? 'ár' : 'ári'; + case 'yy': + if (plural$2(number)) { + return result + (withoutSuffix || isFuture ? 'ár' : 'árum'); + } + return result + (withoutSuffix || isFuture ? 'ár' : 'ári'); + } + } + + moment.defineLocale('is', { + months: 'janúar_febrúar_mars_apríl_maí_júní_júlí_ágúst_september_október_nóvember_desember'.split( + '_' + ), + monthsShort: 'jan_feb_mar_apr_maí_jún_júl_ágú_sep_okt_nóv_des'.split('_'), + weekdays: 'sunnudagur_mánudagur_þriðjudagur_miðvikudagur_fimmtudagur_föstudagur_laugardagur'.split( + '_' + ), + weekdaysShort: 'sun_mán_þri_mið_fim_fös_lau'.split('_'), + weekdaysMin: 'Su_Má_Þr_Mi_Fi_Fö_La'.split('_'), + longDateFormat: { + LT: 'H:mm', + LTS: 'H:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D. MMMM YYYY', + LLL: 'D. MMMM YYYY [kl.] H:mm', + LLLL: 'dddd, D. MMMM YYYY [kl.] H:mm', + }, + calendar: { + sameDay: '[í dag kl.] LT', + nextDay: '[á morgun kl.] LT', + nextWeek: 'dddd [kl.] LT', + lastDay: '[í gær kl.] LT', + lastWeek: '[síðasta] dddd [kl.] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'eftir %s', + past: 'fyrir %s síðan', + s: translate$5, + ss: translate$5, + m: translate$5, + mm: translate$5, + h: 'klukkustund', + hh: translate$5, + d: translate$5, + dd: translate$5, + M: translate$5, + MM: translate$5, + y: translate$5, + yy: translate$5, + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal: '%d.', + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + moment.defineLocale('it-ch', { + months: 'gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre'.split( + '_' + ), + monthsShort: 'gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic'.split('_'), + weekdays: 'domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato'.split( + '_' + ), + weekdaysShort: 'dom_lun_mar_mer_gio_ven_sab'.split('_'), + weekdaysMin: 'do_lu_ma_me_gi_ve_sa'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[Oggi alle] LT', + nextDay: '[Domani alle] LT', + nextWeek: 'dddd [alle] LT', + lastDay: '[Ieri alle] LT', + lastWeek: function () { + switch (this.day()) { + case 0: + return '[la scorsa] dddd [alle] LT'; + default: + return '[lo scorso] dddd [alle] LT'; + } + }, + sameElse: 'L', + }, + relativeTime: { + future: function (s) { + return (/^[0-9].+$/.test(s) ? 'tra' : 'in') + ' ' + s; + }, + past: '%s fa', + s: 'alcuni secondi', + ss: '%d secondi', + m: 'un minuto', + mm: '%d minuti', + h: "un'ora", + hh: '%d ore', + d: 'un giorno', + dd: '%d giorni', + M: 'un mese', + MM: '%d mesi', + y: 'un anno', + yy: '%d anni', + }, + dayOfMonthOrdinalParse: /\d{1,2}º/, + ordinal: '%dº', + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + moment.defineLocale('it', { + months: 'gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre'.split( + '_' + ), + monthsShort: 'gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic'.split('_'), + weekdays: 'domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato'.split( + '_' + ), + weekdaysShort: 'dom_lun_mar_mer_gio_ven_sab'.split('_'), + weekdaysMin: 'do_lu_ma_me_gi_ve_sa'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: function () { + return ( + '[Oggi a' + + (this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : "ll'") + + ']LT' + ); + }, + nextDay: function () { + return ( + '[Domani a' + + (this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : "ll'") + + ']LT' + ); + }, + nextWeek: function () { + return ( + 'dddd [a' + + (this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : "ll'") + + ']LT' + ); + }, + lastDay: function () { + return ( + '[Ieri a' + + (this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : "ll'") + + ']LT' + ); + }, + lastWeek: function () { + switch (this.day()) { + case 0: + return ( + '[La scorsa] dddd [a' + + (this.hours() > 1 + ? 'lle ' + : this.hours() === 0 + ? ' ' + : "ll'") + + ']LT' + ); + default: + return ( + '[Lo scorso] dddd [a' + + (this.hours() > 1 + ? 'lle ' + : this.hours() === 0 + ? ' ' + : "ll'") + + ']LT' + ); + } + }, + sameElse: 'L', + }, + relativeTime: { + future: 'tra %s', + past: '%s fa', + s: 'alcuni secondi', + ss: '%d secondi', + m: 'un minuto', + mm: '%d minuti', + h: "un'ora", + hh: '%d ore', + d: 'un giorno', + dd: '%d giorni', + M: 'un mese', + MM: '%d mesi', + y: 'un anno', + yy: '%d anni', + }, + dayOfMonthOrdinalParse: /\d{1,2}º/, + ordinal: '%dº', + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + moment.defineLocale('ja', { + eras: [ + { + since: '2019-05-01', + offset: 1, + name: '令和', + narrow: '㋿', + abbr: 'R', + }, + { + since: '1989-01-08', + until: '2019-04-30', + offset: 1, + name: '平成', + narrow: '㍻', + abbr: 'H', + }, + { + since: '1926-12-25', + until: '1989-01-07', + offset: 1, + name: '昭和', + narrow: '㍼', + abbr: 'S', + }, + { + since: '1912-07-30', + until: '1926-12-24', + offset: 1, + name: '大正', + narrow: '㍽', + abbr: 'T', + }, + { + since: '1873-01-01', + until: '1912-07-29', + offset: 6, + name: '明治', + narrow: '㍾', + abbr: 'M', + }, + { + since: '0001-01-01', + until: '1873-12-31', + offset: 1, + name: '西暦', + narrow: 'AD', + abbr: 'AD', + }, + { + since: '0000-12-31', + until: -Infinity, + offset: 1, + name: '紀元前', + narrow: 'BC', + abbr: 'BC', + }, + ], + eraYearOrdinalRegex: /(元|\d+)年/, + eraYearOrdinalParse: function (input, match) { + return match[1] === '元' ? 1 : parseInt(match[1] || input, 10); + }, + months: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'), + monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split( + '_' + ), + weekdays: '日曜日_月曜日_火曜日_水曜日_木曜日_金曜日_土曜日'.split('_'), + weekdaysShort: '日_月_火_水_木_金_土'.split('_'), + weekdaysMin: '日_月_火_水_木_金_土'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'YYYY/MM/DD', + LL: 'YYYY年M月D日', + LLL: 'YYYY年M月D日 HH:mm', + LLLL: 'YYYY年M月D日 dddd HH:mm', + l: 'YYYY/MM/DD', + ll: 'YYYY年M月D日', + lll: 'YYYY年M月D日 HH:mm', + llll: 'YYYY年M月D日(ddd) HH:mm', + }, + meridiemParse: /午前|午後/i, + isPM: function (input) { + return input === '午後'; + }, + meridiem: function (hour, minute, isLower) { + if (hour < 12) { + return '午前'; + } else { + return '午後'; + } + }, + calendar: { + sameDay: '[今日] LT', + nextDay: '[明日] LT', + nextWeek: function (now) { + if (now.week() !== this.week()) { + return '[来週]dddd LT'; + } else { + return 'dddd LT'; + } + }, + lastDay: '[昨日] LT', + lastWeek: function (now) { + if (this.week() !== now.week()) { + return '[先週]dddd LT'; + } else { + return 'dddd LT'; + } + }, + sameElse: 'L', + }, + dayOfMonthOrdinalParse: /\d{1,2}日/, + ordinal: function (number, period) { + switch (period) { + case 'y': + return number === 1 ? '元年' : number + '年'; + case 'd': + case 'D': + case 'DDD': + return number + '日'; + default: + return number; + } + }, + relativeTime: { + future: '%s後', + past: '%s前', + s: '数秒', + ss: '%d秒', + m: '1分', + mm: '%d分', + h: '1時間', + hh: '%d時間', + d: '1日', + dd: '%d日', + M: '1ヶ月', + MM: '%dヶ月', + y: '1年', + yy: '%d年', + }, + }); + + //! moment.js locale configuration + + moment.defineLocale('jv', { + months: 'Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_Nopember_Desember'.split( + '_' + ), + monthsShort: 'Jan_Feb_Mar_Apr_Mei_Jun_Jul_Ags_Sep_Okt_Nop_Des'.split('_'), + weekdays: 'Minggu_Senen_Seloso_Rebu_Kemis_Jemuwah_Septu'.split('_'), + weekdaysShort: 'Min_Sen_Sel_Reb_Kem_Jem_Sep'.split('_'), + weekdaysMin: 'Mg_Sn_Sl_Rb_Km_Jm_Sp'.split('_'), + longDateFormat: { + LT: 'HH.mm', + LTS: 'HH.mm.ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY [pukul] HH.mm', + LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm', + }, + meridiemParse: /enjing|siyang|sonten|ndalu/, + meridiemHour: function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === 'enjing') { + return hour; + } else if (meridiem === 'siyang') { + return hour >= 11 ? hour : hour + 12; + } else if (meridiem === 'sonten' || meridiem === 'ndalu') { + return hour + 12; + } + }, + meridiem: function (hours, minutes, isLower) { + if (hours < 11) { + return 'enjing'; + } else if (hours < 15) { + return 'siyang'; + } else if (hours < 19) { + return 'sonten'; + } else { + return 'ndalu'; + } + }, + calendar: { + sameDay: '[Dinten puniko pukul] LT', + nextDay: '[Mbenjang pukul] LT', + nextWeek: 'dddd [pukul] LT', + lastDay: '[Kala wingi pukul] LT', + lastWeek: 'dddd [kepengker pukul] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'wonten ing %s', + past: '%s ingkang kepengker', + s: 'sawetawis detik', + ss: '%d detik', + m: 'setunggal menit', + mm: '%d menit', + h: 'setunggal jam', + hh: '%d jam', + d: 'sedinten', + dd: '%d dinten', + M: 'sewulan', + MM: '%d wulan', + y: 'setaun', + yy: '%d taun', + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 7, // The week that contains Jan 7th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + moment.defineLocale('ka', { + months: 'იანვარი_თებერვალი_მარტი_აპრილი_მაისი_ივნისი_ივლისი_აგვისტო_სექტემბერი_ოქტომბერი_ნოემბერი_დეკემბერი'.split( + '_' + ), + monthsShort: 'იან_თებ_მარ_აპრ_მაი_ივნ_ივლ_აგვ_სექ_ოქტ_ნოე_დეკ'.split('_'), + weekdays: { + standalone: 'კვირა_ორშაბათი_სამშაბათი_ოთხშაბათი_ხუთშაბათი_პარასკევი_შაბათი'.split( + '_' + ), + format: 'კვირას_ორშაბათს_სამშაბათს_ოთხშაბათს_ხუთშაბათს_პარასკევს_შაბათს'.split( + '_' + ), + isFormat: /(წინა|შემდეგ)/, + }, + weekdaysShort: 'კვი_ორშ_სამ_ოთხ_ხუთ_პარ_შაბ'.split('_'), + weekdaysMin: 'კვ_ორ_სა_ოთ_ხუ_პა_შა'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[დღეს] LT[-ზე]', + nextDay: '[ხვალ] LT[-ზე]', + lastDay: '[გუშინ] LT[-ზე]', + nextWeek: '[შემდეგ] dddd LT[-ზე]', + lastWeek: '[წინა] dddd LT-ზე', + sameElse: 'L', + }, + relativeTime: { + future: function (s) { + return s.replace(/(წამ|წუთ|საათ|წელ|დღ|თვ)(ი|ე)/, function ( + $0, + $1, + $2 + ) { + return $2 === 'ი' ? $1 + 'ში' : $1 + $2 + 'ში'; + }); + }, + past: function (s) { + if (/(წამი|წუთი|საათი|დღე|თვე)/.test(s)) { + return s.replace(/(ი|ე)$/, 'ის წინ'); + } + if (/წელი/.test(s)) { + return s.replace(/წელი$/, 'წლის წინ'); + } + return s; + }, + s: 'რამდენიმე წამი', + ss: '%d წამი', + m: 'წუთი', + mm: '%d წუთი', + h: 'საათი', + hh: '%d საათი', + d: 'დღე', + dd: '%d დღე', + M: 'თვე', + MM: '%d თვე', + y: 'წელი', + yy: '%d წელი', + }, + dayOfMonthOrdinalParse: /0|1-ლი|მე-\d{1,2}|\d{1,2}-ე/, + ordinal: function (number) { + if (number === 0) { + return number; + } + if (number === 1) { + return number + '-ლი'; + } + if ( + number < 20 || + (number <= 100 && number % 20 === 0) || + number % 100 === 0 + ) { + return 'მე-' + number; + } + return number + '-ე'; + }, + week: { + dow: 1, + doy: 7, + }, + }); + + //! moment.js locale configuration + + var suffixes$1 = { + 0: '-ші', + 1: '-ші', + 2: '-ші', + 3: '-ші', + 4: '-ші', + 5: '-ші', + 6: '-шы', + 7: '-ші', + 8: '-ші', + 9: '-шы', + 10: '-шы', + 20: '-шы', + 30: '-шы', + 40: '-шы', + 50: '-ші', + 60: '-шы', + 70: '-ші', + 80: '-ші', + 90: '-шы', + 100: '-ші', + }; + + moment.defineLocale('kk', { + months: 'қаңтар_ақпан_наурыз_сәуір_мамыр_маусым_шілде_тамыз_қыркүйек_қазан_қараша_желтоқсан'.split( + '_' + ), + monthsShort: 'қаң_ақп_нау_сәу_мам_мау_шіл_там_қыр_қаз_қар_жел'.split('_'), + weekdays: 'жексенбі_дүйсенбі_сейсенбі_сәрсенбі_бейсенбі_жұма_сенбі'.split( + '_' + ), + weekdaysShort: 'жек_дүй_сей_сәр_бей_жұм_сен'.split('_'), + weekdaysMin: 'жк_дй_сй_ср_бй_жм_сн'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[Бүгін сағат] LT', + nextDay: '[Ертең сағат] LT', + nextWeek: 'dddd [сағат] LT', + lastDay: '[Кеше сағат] LT', + lastWeek: '[Өткен аптаның] dddd [сағат] LT', + sameElse: 'L', + }, + relativeTime: { + future: '%s ішінде', + past: '%s бұрын', + s: 'бірнеше секунд', + ss: '%d секунд', + m: 'бір минут', + mm: '%d минут', + h: 'бір сағат', + hh: '%d сағат', + d: 'бір күн', + dd: '%d күн', + M: 'бір ай', + MM: '%d ай', + y: 'бір жыл', + yy: '%d жыл', + }, + dayOfMonthOrdinalParse: /\d{1,2}-(ші|шы)/, + ordinal: function (number) { + var a = number % 10, + b = number >= 100 ? 100 : null; + return number + (suffixes$1[number] || suffixes$1[a] || suffixes$1[b]); + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 7, // The week that contains Jan 7th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var symbolMap$8 = { + '1': '១', + '2': '២', + '3': '៣', + '4': '៤', + '5': '៥', + '6': '៦', + '7': '៧', + '8': '៨', + '9': '៩', + '0': '០', + }, + numberMap$7 = { + '១': '1', + '២': '2', + '៣': '3', + '៤': '4', + '៥': '5', + '៦': '6', + '៧': '7', + '៨': '8', + '៩': '9', + '០': '0', + }; + + moment.defineLocale('km', { + months: 'មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ'.split( + '_' + ), + monthsShort: 'មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ'.split( + '_' + ), + weekdays: 'អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍'.split('_'), + weekdaysShort: 'អា_ច_អ_ព_ព្រ_សុ_ស'.split('_'), + weekdaysMin: 'អា_ច_អ_ព_ព្រ_សុ_ស'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm', + }, + meridiemParse: /ព្រឹក|ល្ងាច/, + isPM: function (input) { + return input === 'ល្ងាច'; + }, + meridiem: function (hour, minute, isLower) { + if (hour < 12) { + return 'ព្រឹក'; + } else { + return 'ល្ងាច'; + } + }, + calendar: { + sameDay: '[ថ្ងៃនេះ ម៉ោង] LT', + nextDay: '[ស្អែក ម៉ោង] LT', + nextWeek: 'dddd [ម៉ោង] LT', + lastDay: '[ម្សិលមិញ ម៉ោង] LT', + lastWeek: 'dddd [សប្តាហ៍មុន] [ម៉ោង] LT', + sameElse: 'L', + }, + relativeTime: { + future: '%sទៀត', + past: '%sមុន', + s: 'ប៉ុន្មានវិនាទី', + ss: '%d វិនាទី', + m: 'មួយនាទី', + mm: '%d នាទី', + h: 'មួយម៉ោង', + hh: '%d ម៉ោង', + d: 'មួយថ្ងៃ', + dd: '%d ថ្ងៃ', + M: 'មួយខែ', + MM: '%d ខែ', + y: 'មួយឆ្នាំ', + yy: '%d ឆ្នាំ', + }, + dayOfMonthOrdinalParse: /ទី\d{1,2}/, + ordinal: 'ទី%d', + preparse: function (string) { + return string.replace(/[១២៣៤៥៦៧៨៩០]/g, function (match) { + return numberMap$7[match]; + }); + }, + postformat: function (string) { + return string.replace(/\d/g, function (match) { + return symbolMap$8[match]; + }); + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var symbolMap$9 = { + '1': '೧', + '2': '೨', + '3': '೩', + '4': '೪', + '5': '೫', + '6': '೬', + '7': '೭', + '8': '೮', + '9': '೯', + '0': '೦', + }, + numberMap$8 = { + '೧': '1', + '೨': '2', + '೩': '3', + '೪': '4', + '೫': '5', + '೬': '6', + '೭': '7', + '೮': '8', + '೯': '9', + '೦': '0', + }; + + moment.defineLocale('kn', { + months: 'ಜನವರಿ_ಫೆಬ್ರವರಿ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂಬರ್_ಅಕ್ಟೋಬರ್_ನವೆಂಬರ್_ಡಿಸೆಂಬರ್'.split( + '_' + ), + monthsShort: 'ಜನ_ಫೆಬ್ರ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂ_ಅಕ್ಟೋ_ನವೆಂ_ಡಿಸೆಂ'.split( + '_' + ), + monthsParseExact: true, + weekdays: 'ಭಾನುವಾರ_ಸೋಮವಾರ_ಮಂಗಳವಾರ_ಬುಧವಾರ_ಗುರುವಾರ_ಶುಕ್ರವಾರ_ಶನಿವಾರ'.split( + '_' + ), + weekdaysShort: 'ಭಾನು_ಸೋಮ_ಮಂಗಳ_ಬುಧ_ಗುರು_ಶುಕ್ರ_ಶನಿ'.split('_'), + weekdaysMin: 'ಭಾ_ಸೋ_ಮಂ_ಬು_ಗು_ಶು_ಶ'.split('_'), + longDateFormat: { + LT: 'A h:mm', + LTS: 'A h:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY, A h:mm', + LLLL: 'dddd, D MMMM YYYY, A h:mm', + }, + calendar: { + sameDay: '[ಇಂದು] LT', + nextDay: '[ನಾಳೆ] LT', + nextWeek: 'dddd, LT', + lastDay: '[ನಿನ್ನೆ] LT', + lastWeek: '[ಕೊನೆಯ] dddd, LT', + sameElse: 'L', + }, + relativeTime: { + future: '%s ನಂತರ', + past: '%s ಹಿಂದೆ', + s: 'ಕೆಲವು ಕ್ಷಣಗಳು', + ss: '%d ಸೆಕೆಂಡುಗಳು', + m: 'ಒಂದು ನಿಮಿಷ', + mm: '%d ನಿಮಿಷ', + h: 'ಒಂದು ಗಂಟೆ', + hh: '%d ಗಂಟೆ', + d: 'ಒಂದು ದಿನ', + dd: '%d ದಿನ', + M: 'ಒಂದು ತಿಂಗಳು', + MM: '%d ತಿಂಗಳು', + y: 'ಒಂದು ವರ್ಷ', + yy: '%d ವರ್ಷ', + }, + preparse: function (string) { + return string.replace(/[೧೨೩೪೫೬೭೮೯೦]/g, function (match) { + return numberMap$8[match]; + }); + }, + postformat: function (string) { + return string.replace(/\d/g, function (match) { + return symbolMap$9[match]; + }); + }, + meridiemParse: /ರಾತ್ರಿ|ಬೆಳಿಗ್ಗೆ|ಮಧ್ಯಾಹ್ನ|ಸಂಜೆ/, + meridiemHour: function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === 'ರಾತ್ರಿ') { + return hour < 4 ? hour : hour + 12; + } else if (meridiem === 'ಬೆಳಿಗ್ಗೆ') { + return hour; + } else if (meridiem === 'ಮಧ್ಯಾಹ್ನ') { + return hour >= 10 ? hour : hour + 12; + } else if (meridiem === 'ಸಂಜೆ') { + return hour + 12; + } + }, + meridiem: function (hour, minute, isLower) { + if (hour < 4) { + return 'ರಾತ್ರಿ'; + } else if (hour < 10) { + return 'ಬೆಳಿಗ್ಗೆ'; + } else if (hour < 17) { + return 'ಮಧ್ಯಾಹ್ನ'; + } else if (hour < 20) { + return 'ಸಂಜೆ'; + } else { + return 'ರಾತ್ರಿ'; + } + }, + dayOfMonthOrdinalParse: /\d{1,2}(ನೇ)/, + ordinal: function (number) { + return number + 'ನೇ'; + }, + week: { + dow: 0, // Sunday is the first day of the week. + doy: 6, // The week that contains Jan 6th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + moment.defineLocale('ko', { + months: '1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월'.split('_'), + monthsShort: '1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월'.split( + '_' + ), + weekdays: '일요일_월요일_화요일_수요일_목요일_금요일_토요일'.split('_'), + weekdaysShort: '일_월_화_수_목_금_토'.split('_'), + weekdaysMin: '일_월_화_수_목_금_토'.split('_'), + longDateFormat: { + LT: 'A h:mm', + LTS: 'A h:mm:ss', + L: 'YYYY.MM.DD.', + LL: 'YYYY년 MMMM D일', + LLL: 'YYYY년 MMMM D일 A h:mm', + LLLL: 'YYYY년 MMMM D일 dddd A h:mm', + l: 'YYYY.MM.DD.', + ll: 'YYYY년 MMMM D일', + lll: 'YYYY년 MMMM D일 A h:mm', + llll: 'YYYY년 MMMM D일 dddd A h:mm', + }, + calendar: { + sameDay: '오늘 LT', + nextDay: '내일 LT', + nextWeek: 'dddd LT', + lastDay: '어제 LT', + lastWeek: '지난주 dddd LT', + sameElse: 'L', + }, + relativeTime: { + future: '%s 후', + past: '%s 전', + s: '몇 초', + ss: '%d초', + m: '1분', + mm: '%d분', + h: '한 시간', + hh: '%d시간', + d: '하루', + dd: '%d일', + M: '한 달', + MM: '%d달', + y: '일 년', + yy: '%d년', + }, + dayOfMonthOrdinalParse: /\d{1,2}(일|월|주)/, + ordinal: function (number, period) { + switch (period) { + case 'd': + case 'D': + case 'DDD': + return number + '일'; + case 'M': + return number + '월'; + case 'w': + case 'W': + return number + '주'; + default: + return number; + } + }, + meridiemParse: /오전|오후/, + isPM: function (token) { + return token === '오후'; + }, + meridiem: function (hour, minute, isUpper) { + return hour < 12 ? '오전' : '오후'; + }, + }); + + //! moment.js locale configuration + + var symbolMap$a = { + '1': '١', + '2': '٢', + '3': '٣', + '4': '٤', + '5': '٥', + '6': '٦', + '7': '٧', + '8': '٨', + '9': '٩', + '0': '٠', + }, + numberMap$9 = { + '١': '1', + '٢': '2', + '٣': '3', + '٤': '4', + '٥': '5', + '٦': '6', + '٧': '7', + '٨': '8', + '٩': '9', + '٠': '0', + }, + months$7 = [ + 'کانونی دووەم', + 'شوبات', + 'ئازار', + 'نیسان', + 'ئایار', + 'حوزەیران', + 'تەمموز', + 'ئاب', + 'ئەیلوول', + 'تشرینی یەكەم', + 'تشرینی دووەم', + 'كانونی یەکەم', + ]; + + moment.defineLocale('ku', { + months: months$7, + monthsShort: months$7, + weekdays: 'یه‌كشه‌ممه‌_دووشه‌ممه‌_سێشه‌ممه‌_چوارشه‌ممه‌_پێنجشه‌ممه‌_هه‌ینی_شه‌ممه‌'.split( + '_' + ), + weekdaysShort: 'یه‌كشه‌م_دووشه‌م_سێشه‌م_چوارشه‌م_پێنجشه‌م_هه‌ینی_شه‌ممه‌'.split( + '_' + ), + weekdaysMin: 'ی_د_س_چ_پ_ه_ش'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm', + }, + meridiemParse: /ئێواره‌|به‌یانی/, + isPM: function (input) { + return /ئێواره‌/.test(input); + }, + meridiem: function (hour, minute, isLower) { + if (hour < 12) { + return 'به‌یانی'; + } else { + return 'ئێواره‌'; + } + }, + calendar: { + sameDay: '[ئه‌مرۆ كاتژمێر] LT', + nextDay: '[به‌یانی كاتژمێر] LT', + nextWeek: 'dddd [كاتژمێر] LT', + lastDay: '[دوێنێ كاتژمێر] LT', + lastWeek: 'dddd [كاتژمێر] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'له‌ %s', + past: '%s', + s: 'چه‌ند چركه‌یه‌ك', + ss: 'چركه‌ %d', + m: 'یه‌ك خوله‌ك', + mm: '%d خوله‌ك', + h: 'یه‌ك كاتژمێر', + hh: '%d كاتژمێر', + d: 'یه‌ك ڕۆژ', + dd: '%d ڕۆژ', + M: 'یه‌ك مانگ', + MM: '%d مانگ', + y: 'یه‌ك ساڵ', + yy: '%d ساڵ', + }, + preparse: function (string) { + return string + .replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) { + return numberMap$9[match]; + }) + .replace(/،/g, ','); + }, + postformat: function (string) { + return string + .replace(/\d/g, function (match) { + return symbolMap$a[match]; + }) + .replace(/,/g, '،'); + }, + week: { + dow: 6, // Saturday is the first day of the week. + doy: 12, // The week that contains Jan 12th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var suffixes$2 = { + 0: '-чү', + 1: '-чи', + 2: '-чи', + 3: '-чү', + 4: '-чү', + 5: '-чи', + 6: '-чы', + 7: '-чи', + 8: '-чи', + 9: '-чу', + 10: '-чу', + 20: '-чы', + 30: '-чу', + 40: '-чы', + 50: '-чү', + 60: '-чы', + 70: '-чи', + 80: '-чи', + 90: '-чу', + 100: '-чү', + }; + + moment.defineLocale('ky', { + months: 'январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь'.split( + '_' + ), + monthsShort: 'янв_фев_март_апр_май_июнь_июль_авг_сен_окт_ноя_дек'.split( + '_' + ), + weekdays: 'Жекшемби_Дүйшөмбү_Шейшемби_Шаршемби_Бейшемби_Жума_Ишемби'.split( + '_' + ), + weekdaysShort: 'Жек_Дүй_Шей_Шар_Бей_Жум_Ише'.split('_'), + weekdaysMin: 'Жк_Дй_Шй_Шр_Бй_Жм_Иш'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[Бүгүн саат] LT', + nextDay: '[Эртең саат] LT', + nextWeek: 'dddd [саат] LT', + lastDay: '[Кечээ саат] LT', + lastWeek: '[Өткөн аптанын] dddd [күнү] [саат] LT', + sameElse: 'L', + }, + relativeTime: { + future: '%s ичинде', + past: '%s мурун', + s: 'бирнече секунд', + ss: '%d секунд', + m: 'бир мүнөт', + mm: '%d мүнөт', + h: 'бир саат', + hh: '%d саат', + d: 'бир күн', + dd: '%d күн', + M: 'бир ай', + MM: '%d ай', + y: 'бир жыл', + yy: '%d жыл', + }, + dayOfMonthOrdinalParse: /\d{1,2}-(чи|чы|чү|чу)/, + ordinal: function (number) { + var a = number % 10, + b = number >= 100 ? 100 : null; + return number + (suffixes$2[number] || suffixes$2[a] || suffixes$2[b]); + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 7, // The week that contains Jan 7th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + function processRelativeTime$6(number, withoutSuffix, key, isFuture) { + var format = { + m: ['eng Minutt', 'enger Minutt'], + h: ['eng Stonn', 'enger Stonn'], + d: ['een Dag', 'engem Dag'], + M: ['ee Mount', 'engem Mount'], + y: ['ee Joer', 'engem Joer'], + }; + return withoutSuffix ? format[key][0] : format[key][1]; + } + function processFutureTime(string) { + var number = string.substr(0, string.indexOf(' ')); + if (eifelerRegelAppliesToNumber(number)) { + return 'a ' + string; + } + return 'an ' + string; + } + function processPastTime(string) { + var number = string.substr(0, string.indexOf(' ')); + if (eifelerRegelAppliesToNumber(number)) { + return 'viru ' + string; + } + return 'virun ' + string; + } + /** + * Returns true if the word before the given number loses the '-n' ending. + * e.g. 'an 10 Deeg' but 'a 5 Deeg' + * + * @param number {integer} + * @returns {boolean} + */ + function eifelerRegelAppliesToNumber(number) { + number = parseInt(number, 10); + if (isNaN(number)) { + return false; + } + if (number < 0) { + // Negative Number --> always true + return true; + } else if (number < 10) { + // Only 1 digit + if (4 <= number && number <= 7) { + return true; + } + return false; + } else if (number < 100) { + // 2 digits + var lastDigit = number % 10, + firstDigit = number / 10; + if (lastDigit === 0) { + return eifelerRegelAppliesToNumber(firstDigit); + } + return eifelerRegelAppliesToNumber(lastDigit); + } else if (number < 10000) { + // 3 or 4 digits --> recursively check first digit + while (number >= 10) { + number = number / 10; + } + return eifelerRegelAppliesToNumber(number); + } else { + // Anything larger than 4 digits: recursively check first n-3 digits + number = number / 1000; + return eifelerRegelAppliesToNumber(number); + } + } + + moment.defineLocale('lb', { + months: 'Januar_Februar_Mäerz_Abrëll_Mee_Juni_Juli_August_September_Oktober_November_Dezember'.split( + '_' + ), + monthsShort: 'Jan._Febr._Mrz._Abr._Mee_Jun._Jul._Aug._Sept._Okt._Nov._Dez.'.split( + '_' + ), + monthsParseExact: true, + weekdays: 'Sonndeg_Méindeg_Dënschdeg_Mëttwoch_Donneschdeg_Freideg_Samschdeg'.split( + '_' + ), + weekdaysShort: 'So._Mé._Dë._Më._Do._Fr._Sa.'.split('_'), + weekdaysMin: 'So_Mé_Dë_Më_Do_Fr_Sa'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'H:mm [Auer]', + LTS: 'H:mm:ss [Auer]', + L: 'DD.MM.YYYY', + LL: 'D. MMMM YYYY', + LLL: 'D. MMMM YYYY H:mm [Auer]', + LLLL: 'dddd, D. MMMM YYYY H:mm [Auer]', + }, + calendar: { + sameDay: '[Haut um] LT', + sameElse: 'L', + nextDay: '[Muer um] LT', + nextWeek: 'dddd [um] LT', + lastDay: '[Gëschter um] LT', + lastWeek: function () { + // Different date string for 'Dënschdeg' (Tuesday) and 'Donneschdeg' (Thursday) due to phonological rule + switch (this.day()) { + case 2: + case 4: + return '[Leschten] dddd [um] LT'; + default: + return '[Leschte] dddd [um] LT'; + } + }, + }, + relativeTime: { + future: processFutureTime, + past: processPastTime, + s: 'e puer Sekonnen', + ss: '%d Sekonnen', + m: processRelativeTime$6, + mm: '%d Minutten', + h: processRelativeTime$6, + hh: '%d Stonnen', + d: processRelativeTime$6, + dd: '%d Deeg', + M: processRelativeTime$6, + MM: '%d Méint', + y: processRelativeTime$6, + yy: '%d Joer', + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal: '%d.', + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + moment.defineLocale('lo', { + months: 'ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ'.split( + '_' + ), + monthsShort: 'ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ'.split( + '_' + ), + weekdays: 'ອາທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ'.split('_'), + weekdaysShort: 'ທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ'.split('_'), + weekdaysMin: 'ທ_ຈ_ອຄ_ພ_ພຫ_ສກ_ສ'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'ວັນdddd D MMMM YYYY HH:mm', + }, + meridiemParse: /ຕອນເຊົ້າ|ຕອນແລງ/, + isPM: function (input) { + return input === 'ຕອນແລງ'; + }, + meridiem: function (hour, minute, isLower) { + if (hour < 12) { + return 'ຕອນເຊົ້າ'; + } else { + return 'ຕອນແລງ'; + } + }, + calendar: { + sameDay: '[ມື້ນີ້ເວລາ] LT', + nextDay: '[ມື້ອື່ນເວລາ] LT', + nextWeek: '[ວັນ]dddd[ໜ້າເວລາ] LT', + lastDay: '[ມື້ວານນີ້ເວລາ] LT', + lastWeek: '[ວັນ]dddd[ແລ້ວນີ້ເວລາ] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'ອີກ %s', + past: '%sຜ່ານມາ', + s: 'ບໍ່ເທົ່າໃດວິນາທີ', + ss: '%d ວິນາທີ', + m: '1 ນາທີ', + mm: '%d ນາທີ', + h: '1 ຊົ່ວໂມງ', + hh: '%d ຊົ່ວໂມງ', + d: '1 ມື້', + dd: '%d ມື້', + M: '1 ເດືອນ', + MM: '%d ເດືອນ', + y: '1 ປີ', + yy: '%d ປີ', + }, + dayOfMonthOrdinalParse: /(ທີ່)\d{1,2}/, + ordinal: function (number) { + return 'ທີ່' + number; + }, + }); + + //! moment.js locale configuration + + var units = { + ss: 'sekundė_sekundžių_sekundes', + m: 'minutė_minutės_minutę', + mm: 'minutės_minučių_minutes', + h: 'valanda_valandos_valandą', + hh: 'valandos_valandų_valandas', + d: 'diena_dienos_dieną', + dd: 'dienos_dienų_dienas', + M: 'mėnuo_mėnesio_mėnesį', + MM: 'mėnesiai_mėnesių_mėnesius', + y: 'metai_metų_metus', + yy: 'metai_metų_metus', + }; + function translateSeconds(number, withoutSuffix, key, isFuture) { + if (withoutSuffix) { + return 'kelios sekundės'; + } else { + return isFuture ? 'kelių sekundžių' : 'kelias sekundes'; + } + } + function translateSingular(number, withoutSuffix, key, isFuture) { + return withoutSuffix + ? forms(key)[0] + : isFuture + ? forms(key)[1] + : forms(key)[2]; + } + function special(number) { + return number % 10 === 0 || (number > 10 && number < 20); + } + function forms(key) { + return units[key].split('_'); + } + function translate$6(number, withoutSuffix, key, isFuture) { + var result = number + ' '; + if (number === 1) { + return ( + result + translateSingular(number, withoutSuffix, key[0], isFuture) + ); + } else if (withoutSuffix) { + return result + (special(number) ? forms(key)[1] : forms(key)[0]); + } else { + if (isFuture) { + return result + forms(key)[1]; + } else { + return result + (special(number) ? forms(key)[1] : forms(key)[2]); + } + } + } + moment.defineLocale('lt', { + months: { + format: 'sausio_vasario_kovo_balandžio_gegužės_birželio_liepos_rugpjūčio_rugsėjo_spalio_lapkričio_gruodžio'.split( + '_' + ), + standalone: 'sausis_vasaris_kovas_balandis_gegužė_birželis_liepa_rugpjūtis_rugsėjis_spalis_lapkritis_gruodis'.split( + '_' + ), + isFormat: /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?|MMMM?(\[[^\[\]]*\]|\s)+D[oD]?/, + }, + monthsShort: 'sau_vas_kov_bal_geg_bir_lie_rgp_rgs_spa_lap_grd'.split('_'), + weekdays: { + format: 'sekmadienį_pirmadienį_antradienį_trečiadienį_ketvirtadienį_penktadienį_šeštadienį'.split( + '_' + ), + standalone: 'sekmadienis_pirmadienis_antradienis_trečiadienis_ketvirtadienis_penktadienis_šeštadienis'.split( + '_' + ), + isFormat: /dddd HH:mm/, + }, + weekdaysShort: 'Sek_Pir_Ant_Tre_Ket_Pen_Šeš'.split('_'), + weekdaysMin: 'S_P_A_T_K_Pn_Š'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'YYYY-MM-DD', + LL: 'YYYY [m.] MMMM D [d.]', + LLL: 'YYYY [m.] MMMM D [d.], HH:mm [val.]', + LLLL: 'YYYY [m.] MMMM D [d.], dddd, HH:mm [val.]', + l: 'YYYY-MM-DD', + ll: 'YYYY [m.] MMMM D [d.]', + lll: 'YYYY [m.] MMMM D [d.], HH:mm [val.]', + llll: 'YYYY [m.] MMMM D [d.], ddd, HH:mm [val.]', + }, + calendar: { + sameDay: '[Šiandien] LT', + nextDay: '[Rytoj] LT', + nextWeek: 'dddd LT', + lastDay: '[Vakar] LT', + lastWeek: '[Praėjusį] dddd LT', + sameElse: 'L', + }, + relativeTime: { + future: 'po %s', + past: 'prieš %s', + s: translateSeconds, + ss: translate$6, + m: translateSingular, + mm: translate$6, + h: translateSingular, + hh: translate$6, + d: translateSingular, + dd: translate$6, + M: translateSingular, + MM: translate$6, + y: translateSingular, + yy: translate$6, + }, + dayOfMonthOrdinalParse: /\d{1,2}-oji/, + ordinal: function (number) { + return number + '-oji'; + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var units$1 = { + ss: 'sekundes_sekundēm_sekunde_sekundes'.split('_'), + m: 'minūtes_minūtēm_minūte_minūtes'.split('_'), + mm: 'minūtes_minūtēm_minūte_minūtes'.split('_'), + h: 'stundas_stundām_stunda_stundas'.split('_'), + hh: 'stundas_stundām_stunda_stundas'.split('_'), + d: 'dienas_dienām_diena_dienas'.split('_'), + dd: 'dienas_dienām_diena_dienas'.split('_'), + M: 'mēneša_mēnešiem_mēnesis_mēneši'.split('_'), + MM: 'mēneša_mēnešiem_mēnesis_mēneši'.split('_'), + y: 'gada_gadiem_gads_gadi'.split('_'), + yy: 'gada_gadiem_gads_gadi'.split('_'), + }; + /** + * @param withoutSuffix boolean true = a length of time; false = before/after a period of time. + */ + function format(forms, number, withoutSuffix) { + if (withoutSuffix) { + // E.g. "21 minūte", "3 minūtes". + return number % 10 === 1 && number % 100 !== 11 ? forms[2] : forms[3]; + } else { + // E.g. "21 minūtes" as in "pēc 21 minūtes". + // E.g. "3 minūtēm" as in "pēc 3 minūtēm". + return number % 10 === 1 && number % 100 !== 11 ? forms[0] : forms[1]; + } + } + function relativeTimeWithPlural$1(number, withoutSuffix, key) { + return number + ' ' + format(units$1[key], number, withoutSuffix); + } + function relativeTimeWithSingular(number, withoutSuffix, key) { + return format(units$1[key], number, withoutSuffix); + } + function relativeSeconds(number, withoutSuffix) { + return withoutSuffix ? 'dažas sekundes' : 'dažām sekundēm'; + } + + moment.defineLocale('lv', { + months: 'janvāris_februāris_marts_aprīlis_maijs_jūnijs_jūlijs_augusts_septembris_oktobris_novembris_decembris'.split( + '_' + ), + monthsShort: 'jan_feb_mar_apr_mai_jūn_jūl_aug_sep_okt_nov_dec'.split('_'), + weekdays: 'svētdiena_pirmdiena_otrdiena_trešdiena_ceturtdiena_piektdiena_sestdiena'.split( + '_' + ), + weekdaysShort: 'Sv_P_O_T_C_Pk_S'.split('_'), + weekdaysMin: 'Sv_P_O_T_C_Pk_S'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD.MM.YYYY.', + LL: 'YYYY. [gada] D. MMMM', + LLL: 'YYYY. [gada] D. MMMM, HH:mm', + LLLL: 'YYYY. [gada] D. MMMM, dddd, HH:mm', + }, + calendar: { + sameDay: '[Šodien pulksten] LT', + nextDay: '[Rīt pulksten] LT', + nextWeek: 'dddd [pulksten] LT', + lastDay: '[Vakar pulksten] LT', + lastWeek: '[Pagājušā] dddd [pulksten] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'pēc %s', + past: 'pirms %s', + s: relativeSeconds, + ss: relativeTimeWithPlural$1, + m: relativeTimeWithSingular, + mm: relativeTimeWithPlural$1, + h: relativeTimeWithSingular, + hh: relativeTimeWithPlural$1, + d: relativeTimeWithSingular, + dd: relativeTimeWithPlural$1, + M: relativeTimeWithSingular, + MM: relativeTimeWithPlural$1, + y: relativeTimeWithSingular, + yy: relativeTimeWithPlural$1, + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal: '%d.', + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var translator = { + words: { + //Different grammatical cases + ss: ['sekund', 'sekunda', 'sekundi'], + m: ['jedan minut', 'jednog minuta'], + mm: ['minut', 'minuta', 'minuta'], + h: ['jedan sat', 'jednog sata'], + hh: ['sat', 'sata', 'sati'], + dd: ['dan', 'dana', 'dana'], + MM: ['mjesec', 'mjeseca', 'mjeseci'], + yy: ['godina', 'godine', 'godina'], + }, + correctGrammaticalCase: function (number, wordKey) { + return number === 1 + ? wordKey[0] + : number >= 2 && number <= 4 + ? wordKey[1] + : wordKey[2]; + }, + translate: function (number, withoutSuffix, key) { + var wordKey = translator.words[key]; + if (key.length === 1) { + return withoutSuffix ? wordKey[0] : wordKey[1]; + } else { + return ( + number + + ' ' + + translator.correctGrammaticalCase(number, wordKey) + ); + } + }, + }; + + moment.defineLocale('me', { + months: 'januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar'.split( + '_' + ), + monthsShort: 'jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.'.split( + '_' + ), + monthsParseExact: true, + weekdays: 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split( + '_' + ), + weekdaysShort: 'ned._pon._uto._sri._čet._pet._sub.'.split('_'), + weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'H:mm', + LTS: 'H:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D. MMMM YYYY', + LLL: 'D. MMMM YYYY H:mm', + LLLL: 'dddd, D. MMMM YYYY H:mm', + }, + calendar: { + sameDay: '[danas u] LT', + nextDay: '[sjutra u] LT', + + nextWeek: function () { + switch (this.day()) { + case 0: + return '[u] [nedjelju] [u] LT'; + case 3: + return '[u] [srijedu] [u] LT'; + case 6: + return '[u] [subotu] [u] LT'; + case 1: + case 2: + case 4: + case 5: + return '[u] dddd [u] LT'; + } + }, + lastDay: '[juče u] LT', + lastWeek: function () { + var lastWeekDays = [ + '[prošle] [nedjelje] [u] LT', + '[prošlog] [ponedjeljka] [u] LT', + '[prošlog] [utorka] [u] LT', + '[prošle] [srijede] [u] LT', + '[prošlog] [četvrtka] [u] LT', + '[prošlog] [petka] [u] LT', + '[prošle] [subote] [u] LT', + ]; + return lastWeekDays[this.day()]; + }, + sameElse: 'L', + }, + relativeTime: { + future: 'za %s', + past: 'prije %s', + s: 'nekoliko sekundi', + ss: translator.translate, + m: translator.translate, + mm: translator.translate, + h: translator.translate, + hh: translator.translate, + d: 'dan', + dd: translator.translate, + M: 'mjesec', + MM: translator.translate, + y: 'godinu', + yy: translator.translate, + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal: '%d.', + week: { + dow: 1, // Monday is the first day of the week. + doy: 7, // The week that contains Jan 7th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + moment.defineLocale('mi', { + months: 'Kohi-tāte_Hui-tanguru_Poutū-te-rangi_Paenga-whāwhā_Haratua_Pipiri_Hōngoingoi_Here-turi-kōkā_Mahuru_Whiringa-ā-nuku_Whiringa-ā-rangi_Hakihea'.split( + '_' + ), + monthsShort: 'Kohi_Hui_Pou_Pae_Hara_Pipi_Hōngoi_Here_Mahu_Whi-nu_Whi-ra_Haki'.split( + '_' + ), + monthsRegex: /(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i, + monthsStrictRegex: /(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i, + monthsShortRegex: /(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i, + monthsShortStrictRegex: /(?:['a-z\u0101\u014D\u016B]+\-?){1,2}/i, + weekdays: 'Rātapu_Mane_Tūrei_Wenerei_Tāite_Paraire_Hātarei'.split('_'), + weekdaysShort: 'Ta_Ma_Tū_We_Tāi_Pa_Hā'.split('_'), + weekdaysMin: 'Ta_Ma_Tū_We_Tāi_Pa_Hā'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY [i] HH:mm', + LLLL: 'dddd, D MMMM YYYY [i] HH:mm', + }, + calendar: { + sameDay: '[i teie mahana, i] LT', + nextDay: '[apopo i] LT', + nextWeek: 'dddd [i] LT', + lastDay: '[inanahi i] LT', + lastWeek: 'dddd [whakamutunga i] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'i roto i %s', + past: '%s i mua', + s: 'te hēkona ruarua', + ss: '%d hēkona', + m: 'he meneti', + mm: '%d meneti', + h: 'te haora', + hh: '%d haora', + d: 'he ra', + dd: '%d ra', + M: 'he marama', + MM: '%d marama', + y: 'he tau', + yy: '%d tau', + }, + dayOfMonthOrdinalParse: /\d{1,2}º/, + ordinal: '%dº', + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + moment.defineLocale('mk', { + months: 'јануари_февруари_март_април_мај_јуни_јули_август_септември_октомври_ноември_декември'.split( + '_' + ), + monthsShort: 'јан_фев_мар_апр_мај_јун_јул_авг_сеп_окт_ное_дек'.split('_'), + weekdays: 'недела_понеделник_вторник_среда_четврток_петок_сабота'.split( + '_' + ), + weekdaysShort: 'нед_пон_вто_сре_чет_пет_саб'.split('_'), + weekdaysMin: 'нe_пo_вт_ср_че_пе_сa'.split('_'), + longDateFormat: { + LT: 'H:mm', + LTS: 'H:mm:ss', + L: 'D.MM.YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY H:mm', + LLLL: 'dddd, D MMMM YYYY H:mm', + }, + calendar: { + sameDay: '[Денес во] LT', + nextDay: '[Утре во] LT', + nextWeek: '[Во] dddd [во] LT', + lastDay: '[Вчера во] LT', + lastWeek: function () { + switch (this.day()) { + case 0: + case 3: + case 6: + return '[Изминатата] dddd [во] LT'; + case 1: + case 2: + case 4: + case 5: + return '[Изминатиот] dddd [во] LT'; + } + }, + sameElse: 'L', + }, + relativeTime: { + future: 'за %s', + past: 'пред %s', + s: 'неколку секунди', + ss: '%d секунди', + m: 'една минута', + mm: '%d минути', + h: 'еден час', + hh: '%d часа', + d: 'еден ден', + dd: '%d дена', + M: 'еден месец', + MM: '%d месеци', + y: 'една година', + yy: '%d години', + }, + dayOfMonthOrdinalParse: /\d{1,2}-(ев|ен|ти|ви|ри|ми)/, + ordinal: function (number) { + var lastDigit = number % 10, + last2Digits = number % 100; + if (number === 0) { + return number + '-ев'; + } else if (last2Digits === 0) { + return number + '-ен'; + } else if (last2Digits > 10 && last2Digits < 20) { + return number + '-ти'; + } else if (lastDigit === 1) { + return number + '-ви'; + } else if (lastDigit === 2) { + return number + '-ри'; + } else if (lastDigit === 7 || lastDigit === 8) { + return number + '-ми'; + } else { + return number + '-ти'; + } + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 7, // The week that contains Jan 7th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + moment.defineLocale('ml', { + months: 'ജനുവരി_ഫെബ്രുവരി_മാർച്ച്_ഏപ്രിൽ_മേയ്_ജൂൺ_ജൂലൈ_ഓഗസ്റ്റ്_സെപ്റ്റംബർ_ഒക്ടോബർ_നവംബർ_ഡിസംബർ'.split( + '_' + ), + monthsShort: 'ജനു._ഫെബ്രു._മാർ._ഏപ്രി._മേയ്_ജൂൺ_ജൂലൈ._ഓഗ._സെപ്റ്റ._ഒക്ടോ._നവം._ഡിസം.'.split( + '_' + ), + monthsParseExact: true, + weekdays: 'ഞായറാഴ്ച_തിങ്കളാഴ്ച_ചൊവ്വാഴ്ച_ബുധനാഴ്ച_വ്യാഴാഴ്ച_വെള്ളിയാഴ്ച_ശനിയാഴ്ച'.split( + '_' + ), + weekdaysShort: 'ഞായർ_തിങ്കൾ_ചൊവ്വ_ബുധൻ_വ്യാഴം_വെള്ളി_ശനി'.split('_'), + weekdaysMin: 'ഞാ_തി_ചൊ_ബു_വ്യാ_വെ_ശ'.split('_'), + longDateFormat: { + LT: 'A h:mm -നു', + LTS: 'A h:mm:ss -നു', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY, A h:mm -നു', + LLLL: 'dddd, D MMMM YYYY, A h:mm -നു', + }, + calendar: { + sameDay: '[ഇന്ന്] LT', + nextDay: '[നാളെ] LT', + nextWeek: 'dddd, LT', + lastDay: '[ഇന്നലെ] LT', + lastWeek: '[കഴിഞ്ഞ] dddd, LT', + sameElse: 'L', + }, + relativeTime: { + future: '%s കഴിഞ്ഞ്', + past: '%s മുൻപ്', + s: 'അൽപ നിമിഷങ്ങൾ', + ss: '%d സെക്കൻഡ്', + m: 'ഒരു മിനിറ്റ്', + mm: '%d മിനിറ്റ്', + h: 'ഒരു മണിക്കൂർ', + hh: '%d മണിക്കൂർ', + d: 'ഒരു ദിവസം', + dd: '%d ദിവസം', + M: 'ഒരു മാസം', + MM: '%d മാസം', + y: 'ഒരു വർഷം', + yy: '%d വർഷം', + }, + meridiemParse: /രാത്രി|രാവിലെ|ഉച്ച കഴിഞ്ഞ്|വൈകുന്നേരം|രാത്രി/i, + meridiemHour: function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if ( + (meridiem === 'രാത്രി' && hour >= 4) || + meridiem === 'ഉച്ച കഴിഞ്ഞ്' || + meridiem === 'വൈകുന്നേരം' + ) { + return hour + 12; + } else { + return hour; + } + }, + meridiem: function (hour, minute, isLower) { + if (hour < 4) { + return 'രാത്രി'; + } else if (hour < 12) { + return 'രാവിലെ'; + } else if (hour < 17) { + return 'ഉച്ച കഴിഞ്ഞ്'; + } else if (hour < 20) { + return 'വൈകുന്നേരം'; + } else { + return 'രാത്രി'; + } + }, + }); + + //! moment.js locale configuration + + function translate$7(number, withoutSuffix, key, isFuture) { + switch (key) { + case 's': + return withoutSuffix ? 'хэдхэн секунд' : 'хэдхэн секундын'; + case 'ss': + return number + (withoutSuffix ? ' секунд' : ' секундын'); + case 'm': + case 'mm': + return number + (withoutSuffix ? ' минут' : ' минутын'); + case 'h': + case 'hh': + return number + (withoutSuffix ? ' цаг' : ' цагийн'); + case 'd': + case 'dd': + return number + (withoutSuffix ? ' өдөр' : ' өдрийн'); + case 'M': + case 'MM': + return number + (withoutSuffix ? ' сар' : ' сарын'); + case 'y': + case 'yy': + return number + (withoutSuffix ? ' жил' : ' жилийн'); + default: + return number; + } + } + + moment.defineLocale('mn', { + months: 'Нэгдүгээр сар_Хоёрдугаар сар_Гуравдугаар сар_Дөрөвдүгээр сар_Тавдугаар сар_Зургадугаар сар_Долдугаар сар_Наймдугаар сар_Есдүгээр сар_Аравдугаар сар_Арван нэгдүгээр сар_Арван хоёрдугаар сар'.split( + '_' + ), + monthsShort: '1 сар_2 сар_3 сар_4 сар_5 сар_6 сар_7 сар_8 сар_9 сар_10 сар_11 сар_12 сар'.split( + '_' + ), + monthsParseExact: true, + weekdays: 'Ням_Даваа_Мягмар_Лхагва_Пүрэв_Баасан_Бямба'.split('_'), + weekdaysShort: 'Ням_Дав_Мяг_Лха_Пүр_Баа_Бям'.split('_'), + weekdaysMin: 'Ня_Да_Мя_Лх_Пү_Ба_Бя'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'YYYY-MM-DD', + LL: 'YYYY оны MMMMын D', + LLL: 'YYYY оны MMMMын D HH:mm', + LLLL: 'dddd, YYYY оны MMMMын D HH:mm', + }, + meridiemParse: /ҮӨ|ҮХ/i, + isPM: function (input) { + return input === 'ҮХ'; + }, + meridiem: function (hour, minute, isLower) { + if (hour < 12) { + return 'ҮӨ'; + } else { + return 'ҮХ'; + } + }, + calendar: { + sameDay: '[Өнөөдөр] LT', + nextDay: '[Маргааш] LT', + nextWeek: '[Ирэх] dddd LT', + lastDay: '[Өчигдөр] LT', + lastWeek: '[Өнгөрсөн] dddd LT', + sameElse: 'L', + }, + relativeTime: { + future: '%s дараа', + past: '%s өмнө', + s: translate$7, + ss: translate$7, + m: translate$7, + mm: translate$7, + h: translate$7, + hh: translate$7, + d: translate$7, + dd: translate$7, + M: translate$7, + MM: translate$7, + y: translate$7, + yy: translate$7, + }, + dayOfMonthOrdinalParse: /\d{1,2} өдөр/, + ordinal: function (number, period) { + switch (period) { + case 'd': + case 'D': + case 'DDD': + return number + ' өдөр'; + default: + return number; + } + }, + }); + + //! moment.js locale configuration + + var symbolMap$b = { + '1': '१', + '2': '२', + '3': '३', + '4': '४', + '5': '५', + '6': '६', + '7': '७', + '8': '८', + '9': '९', + '0': '०', + }, + numberMap$a = { + '१': '1', + '२': '2', + '३': '3', + '४': '4', + '५': '5', + '६': '6', + '७': '7', + '८': '8', + '९': '9', + '०': '0', + }; + + function relativeTimeMr(number, withoutSuffix, string, isFuture) { + var output = ''; + if (withoutSuffix) { + switch (string) { + case 's': + output = 'काही सेकंद'; + break; + case 'ss': + output = '%d सेकंद'; + break; + case 'm': + output = 'एक मिनिट'; + break; + case 'mm': + output = '%d मिनिटे'; + break; + case 'h': + output = 'एक तास'; + break; + case 'hh': + output = '%d तास'; + break; + case 'd': + output = 'एक दिवस'; + break; + case 'dd': + output = '%d दिवस'; + break; + case 'M': + output = 'एक महिना'; + break; + case 'MM': + output = '%d महिने'; + break; + case 'y': + output = 'एक वर्ष'; + break; + case 'yy': + output = '%d वर्षे'; + break; + } + } else { + switch (string) { + case 's': + output = 'काही सेकंदां'; + break; + case 'ss': + output = '%d सेकंदां'; + break; + case 'm': + output = 'एका मिनिटा'; + break; + case 'mm': + output = '%d मिनिटां'; + break; + case 'h': + output = 'एका तासा'; + break; + case 'hh': + output = '%d तासां'; + break; + case 'd': + output = 'एका दिवसा'; + break; + case 'dd': + output = '%d दिवसां'; + break; + case 'M': + output = 'एका महिन्या'; + break; + case 'MM': + output = '%d महिन्यां'; + break; + case 'y': + output = 'एका वर्षा'; + break; + case 'yy': + output = '%d वर्षां'; + break; + } + } + return output.replace(/%d/i, number); + } + + moment.defineLocale('mr', { + months: 'जानेवारी_फेब्रुवारी_मार्च_एप्रिल_मे_जून_जुलै_ऑगस्ट_सप्टेंबर_ऑक्टोबर_नोव्हेंबर_डिसेंबर'.split( + '_' + ), + monthsShort: 'जाने._फेब्रु._मार्च._एप्रि._मे._जून._जुलै._ऑग._सप्टें._ऑक्टो._नोव्हें._डिसें.'.split( + '_' + ), + monthsParseExact: true, + weekdays: 'रविवार_सोमवार_मंगळवार_बुधवार_गुरूवार_शुक्रवार_शनिवार'.split('_'), + weekdaysShort: 'रवि_सोम_मंगळ_बुध_गुरू_शुक्र_शनि'.split('_'), + weekdaysMin: 'र_सो_मं_बु_गु_शु_श'.split('_'), + longDateFormat: { + LT: 'A h:mm वाजता', + LTS: 'A h:mm:ss वाजता', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY, A h:mm वाजता', + LLLL: 'dddd, D MMMM YYYY, A h:mm वाजता', + }, + calendar: { + sameDay: '[आज] LT', + nextDay: '[उद्या] LT', + nextWeek: 'dddd, LT', + lastDay: '[काल] LT', + lastWeek: '[मागील] dddd, LT', + sameElse: 'L', + }, + relativeTime: { + future: '%sमध्ये', + past: '%sपूर्वी', + s: relativeTimeMr, + ss: relativeTimeMr, + m: relativeTimeMr, + mm: relativeTimeMr, + h: relativeTimeMr, + hh: relativeTimeMr, + d: relativeTimeMr, + dd: relativeTimeMr, + M: relativeTimeMr, + MM: relativeTimeMr, + y: relativeTimeMr, + yy: relativeTimeMr, + }, + preparse: function (string) { + return string.replace(/[१२३४५६७८९०]/g, function (match) { + return numberMap$a[match]; + }); + }, + postformat: function (string) { + return string.replace(/\d/g, function (match) { + return symbolMap$b[match]; + }); + }, + meridiemParse: /पहाटे|सकाळी|दुपारी|सायंकाळी|रात्री/, + meridiemHour: function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === 'पहाटे' || meridiem === 'सकाळी') { + return hour; + } else if ( + meridiem === 'दुपारी' || + meridiem === 'सायंकाळी' || + meridiem === 'रात्री' + ) { + return hour >= 12 ? hour : hour + 12; + } + }, + meridiem: function (hour, minute, isLower) { + if (hour >= 0 && hour < 6) { + return 'पहाटे'; + } else if (hour < 12) { + return 'सकाळी'; + } else if (hour < 17) { + return 'दुपारी'; + } else if (hour < 20) { + return 'सायंकाळी'; + } else { + return 'रात्री'; + } + }, + week: { + dow: 0, // Sunday is the first day of the week. + doy: 6, // The week that contains Jan 6th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + moment.defineLocale('ms-my', { + months: 'Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember'.split( + '_' + ), + monthsShort: 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis'.split('_'), + weekdays: 'Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu'.split('_'), + weekdaysShort: 'Ahd_Isn_Sel_Rab_Kha_Jum_Sab'.split('_'), + weekdaysMin: 'Ah_Is_Sl_Rb_Km_Jm_Sb'.split('_'), + longDateFormat: { + LT: 'HH.mm', + LTS: 'HH.mm.ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY [pukul] HH.mm', + LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm', + }, + meridiemParse: /pagi|tengahari|petang|malam/, + meridiemHour: function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === 'pagi') { + return hour; + } else if (meridiem === 'tengahari') { + return hour >= 11 ? hour : hour + 12; + } else if (meridiem === 'petang' || meridiem === 'malam') { + return hour + 12; + } + }, + meridiem: function (hours, minutes, isLower) { + if (hours < 11) { + return 'pagi'; + } else if (hours < 15) { + return 'tengahari'; + } else if (hours < 19) { + return 'petang'; + } else { + return 'malam'; + } + }, + calendar: { + sameDay: '[Hari ini pukul] LT', + nextDay: '[Esok pukul] LT', + nextWeek: 'dddd [pukul] LT', + lastDay: '[Kelmarin pukul] LT', + lastWeek: 'dddd [lepas pukul] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'dalam %s', + past: '%s yang lepas', + s: 'beberapa saat', + ss: '%d saat', + m: 'seminit', + mm: '%d minit', + h: 'sejam', + hh: '%d jam', + d: 'sehari', + dd: '%d hari', + M: 'sebulan', + MM: '%d bulan', + y: 'setahun', + yy: '%d tahun', + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 7, // The week that contains Jan 7th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + moment.defineLocale('ms', { + months: 'Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember'.split( + '_' + ), + monthsShort: 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis'.split('_'), + weekdays: 'Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu'.split('_'), + weekdaysShort: 'Ahd_Isn_Sel_Rab_Kha_Jum_Sab'.split('_'), + weekdaysMin: 'Ah_Is_Sl_Rb_Km_Jm_Sb'.split('_'), + longDateFormat: { + LT: 'HH.mm', + LTS: 'HH.mm.ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY [pukul] HH.mm', + LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm', + }, + meridiemParse: /pagi|tengahari|petang|malam/, + meridiemHour: function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === 'pagi') { + return hour; + } else if (meridiem === 'tengahari') { + return hour >= 11 ? hour : hour + 12; + } else if (meridiem === 'petang' || meridiem === 'malam') { + return hour + 12; + } + }, + meridiem: function (hours, minutes, isLower) { + if (hours < 11) { + return 'pagi'; + } else if (hours < 15) { + return 'tengahari'; + } else if (hours < 19) { + return 'petang'; + } else { + return 'malam'; + } + }, + calendar: { + sameDay: '[Hari ini pukul] LT', + nextDay: '[Esok pukul] LT', + nextWeek: 'dddd [pukul] LT', + lastDay: '[Kelmarin pukul] LT', + lastWeek: 'dddd [lepas pukul] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'dalam %s', + past: '%s yang lepas', + s: 'beberapa saat', + ss: '%d saat', + m: 'seminit', + mm: '%d minit', + h: 'sejam', + hh: '%d jam', + d: 'sehari', + dd: '%d hari', + M: 'sebulan', + MM: '%d bulan', + y: 'setahun', + yy: '%d tahun', + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 7, // The week that contains Jan 7th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + moment.defineLocale('mt', { + months: 'Jannar_Frar_Marzu_April_Mejju_Ġunju_Lulju_Awwissu_Settembru_Ottubru_Novembru_Diċembru'.split( + '_' + ), + monthsShort: 'Jan_Fra_Mar_Apr_Mej_Ġun_Lul_Aww_Set_Ott_Nov_Diċ'.split('_'), + weekdays: 'Il-Ħadd_It-Tnejn_It-Tlieta_L-Erbgħa_Il-Ħamis_Il-Ġimgħa_Is-Sibt'.split( + '_' + ), + weekdaysShort: 'Ħad_Tne_Tli_Erb_Ħam_Ġim_Sib'.split('_'), + weekdaysMin: 'Ħa_Tn_Tl_Er_Ħa_Ġi_Si'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[Illum fil-]LT', + nextDay: '[Għada fil-]LT', + nextWeek: 'dddd [fil-]LT', + lastDay: '[Il-bieraħ fil-]LT', + lastWeek: 'dddd [li għadda] [fil-]LT', + sameElse: 'L', + }, + relativeTime: { + future: 'f’ %s', + past: '%s ilu', + s: 'ftit sekondi', + ss: '%d sekondi', + m: 'minuta', + mm: '%d minuti', + h: 'siegħa', + hh: '%d siegħat', + d: 'ġurnata', + dd: '%d ġranet', + M: 'xahar', + MM: '%d xhur', + y: 'sena', + yy: '%d sni', + }, + dayOfMonthOrdinalParse: /\d{1,2}º/, + ordinal: '%dº', + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var symbolMap$c = { + '1': '၁', + '2': '၂', + '3': '၃', + '4': '၄', + '5': '၅', + '6': '၆', + '7': '၇', + '8': '၈', + '9': '၉', + '0': '၀', + }, + numberMap$b = { + '၁': '1', + '၂': '2', + '၃': '3', + '၄': '4', + '၅': '5', + '၆': '6', + '၇': '7', + '၈': '8', + '၉': '9', + '၀': '0', + }; + + moment.defineLocale('my', { + months: 'ဇန်နဝါရီ_ဖေဖော်ဝါရီ_မတ်_ဧပြီ_မေ_ဇွန်_ဇူလိုင်_သြဂုတ်_စက်တင်ဘာ_အောက်တိုဘာ_နိုဝင်ဘာ_ဒီဇင်ဘာ'.split( + '_' + ), + monthsShort: 'ဇန်_ဖေ_မတ်_ပြီ_မေ_ဇွန်_လိုင်_သြ_စက်_အောက်_နို_ဒီ'.split('_'), + weekdays: 'တနင်္ဂနွေ_တနင်္လာ_အင်္ဂါ_ဗုဒ္ဓဟူး_ကြာသပတေး_သောကြာ_စနေ'.split( + '_' + ), + weekdaysShort: 'နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ'.split('_'), + weekdaysMin: 'နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ'.split('_'), + + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[ယနေ.] LT [မှာ]', + nextDay: '[မနက်ဖြန်] LT [မှာ]', + nextWeek: 'dddd LT [မှာ]', + lastDay: '[မနေ.က] LT [မှာ]', + lastWeek: '[ပြီးခဲ့သော] dddd LT [မှာ]', + sameElse: 'L', + }, + relativeTime: { + future: 'လာမည့် %s မှာ', + past: 'လွန်ခဲ့သော %s က', + s: 'စက္ကန်.အနည်းငယ်', + ss: '%d စက္ကန့်', + m: 'တစ်မိနစ်', + mm: '%d မိနစ်', + h: 'တစ်နာရီ', + hh: '%d နာရီ', + d: 'တစ်ရက်', + dd: '%d ရက်', + M: 'တစ်လ', + MM: '%d လ', + y: 'တစ်နှစ်', + yy: '%d နှစ်', + }, + preparse: function (string) { + return string.replace(/[၁၂၃၄၅၆၇၈၉၀]/g, function (match) { + return numberMap$b[match]; + }); + }, + postformat: function (string) { + return string.replace(/\d/g, function (match) { + return symbolMap$c[match]; + }); + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + moment.defineLocale('nb', { + months: 'januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember'.split( + '_' + ), + monthsShort: 'jan._feb._mars_apr._mai_juni_juli_aug._sep._okt._nov._des.'.split( + '_' + ), + monthsParseExact: true, + weekdays: 'søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag'.split('_'), + weekdaysShort: 'sø._ma._ti._on._to._fr._lø.'.split('_'), + weekdaysMin: 'sø_ma_ti_on_to_fr_lø'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D. MMMM YYYY', + LLL: 'D. MMMM YYYY [kl.] HH:mm', + LLLL: 'dddd D. MMMM YYYY [kl.] HH:mm', + }, + calendar: { + sameDay: '[i dag kl.] LT', + nextDay: '[i morgen kl.] LT', + nextWeek: 'dddd [kl.] LT', + lastDay: '[i går kl.] LT', + lastWeek: '[forrige] dddd [kl.] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'om %s', + past: '%s siden', + s: 'noen sekunder', + ss: '%d sekunder', + m: 'ett minutt', + mm: '%d minutter', + h: 'en time', + hh: '%d timer', + d: 'en dag', + dd: '%d dager', + M: 'en måned', + MM: '%d måneder', + y: 'ett år', + yy: '%d år', + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal: '%d.', + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var symbolMap$d = { + '1': '१', + '2': '२', + '3': '३', + '4': '४', + '5': '५', + '6': '६', + '7': '७', + '8': '८', + '9': '९', + '0': '०', + }, + numberMap$c = { + '१': '1', + '२': '2', + '३': '3', + '४': '4', + '५': '5', + '६': '6', + '७': '7', + '८': '8', + '९': '9', + '०': '0', + }; + + moment.defineLocale('ne', { + months: 'जनवरी_फेब्रुवरी_मार्च_अप्रिल_मई_जुन_जुलाई_अगष्ट_सेप्टेम्बर_अक्टोबर_नोभेम्बर_डिसेम्बर'.split( + '_' + ), + monthsShort: 'जन._फेब्रु._मार्च_अप्रि._मई_जुन_जुलाई._अग._सेप्ट._अक्टो._नोभे._डिसे.'.split( + '_' + ), + monthsParseExact: true, + weekdays: 'आइतबार_सोमबार_मङ्गलबार_बुधबार_बिहिबार_शुक्रबार_शनिबार'.split( + '_' + ), + weekdaysShort: 'आइत._सोम._मङ्गल._बुध._बिहि._शुक्र._शनि.'.split('_'), + weekdaysMin: 'आ._सो._मं._बु._बि._शु._श.'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'Aको h:mm बजे', + LTS: 'Aको h:mm:ss बजे', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY, Aको h:mm बजे', + LLLL: 'dddd, D MMMM YYYY, Aको h:mm बजे', + }, + preparse: function (string) { + return string.replace(/[१२३४५६७८९०]/g, function (match) { + return numberMap$c[match]; + }); + }, + postformat: function (string) { + return string.replace(/\d/g, function (match) { + return symbolMap$d[match]; + }); + }, + meridiemParse: /राति|बिहान|दिउँसो|साँझ/, + meridiemHour: function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === 'राति') { + return hour < 4 ? hour : hour + 12; + } else if (meridiem === 'बिहान') { + return hour; + } else if (meridiem === 'दिउँसो') { + return hour >= 10 ? hour : hour + 12; + } else if (meridiem === 'साँझ') { + return hour + 12; + } + }, + meridiem: function (hour, minute, isLower) { + if (hour < 3) { + return 'राति'; + } else if (hour < 12) { + return 'बिहान'; + } else if (hour < 16) { + return 'दिउँसो'; + } else if (hour < 20) { + return 'साँझ'; + } else { + return 'राति'; + } + }, + calendar: { + sameDay: '[आज] LT', + nextDay: '[भोलि] LT', + nextWeek: '[आउँदो] dddd[,] LT', + lastDay: '[हिजो] LT', + lastWeek: '[गएको] dddd[,] LT', + sameElse: 'L', + }, + relativeTime: { + future: '%sमा', + past: '%s अगाडि', + s: 'केही क्षण', + ss: '%d सेकेण्ड', + m: 'एक मिनेट', + mm: '%d मिनेट', + h: 'एक घण्टा', + hh: '%d घण्टा', + d: 'एक दिन', + dd: '%d दिन', + M: 'एक महिना', + MM: '%d महिना', + y: 'एक बर्ष', + yy: '%d बर्ष', + }, + week: { + dow: 0, // Sunday is the first day of the week. + doy: 6, // The week that contains Jan 6th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var monthsShortWithDots$1 = 'jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.'.split( + '_' + ), + monthsShortWithoutDots$1 = 'jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec'.split( + '_' + ), + monthsParse$6 = [ + /^jan/i, + /^feb/i, + /^maart|mrt.?$/i, + /^apr/i, + /^mei$/i, + /^jun[i.]?$/i, + /^jul[i.]?$/i, + /^aug/i, + /^sep/i, + /^okt/i, + /^nov/i, + /^dec/i, + ], + monthsRegex$6 = /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i; + + moment.defineLocale('nl-be', { + months: 'januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december'.split( + '_' + ), + monthsShort: function (m, format) { + if (!m) { + return monthsShortWithDots$1; + } else if (/-MMM-/.test(format)) { + return monthsShortWithoutDots$1[m.month()]; + } else { + return monthsShortWithDots$1[m.month()]; + } + }, + + monthsRegex: monthsRegex$6, + monthsShortRegex: monthsRegex$6, + monthsStrictRegex: /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i, + monthsShortStrictRegex: /^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i, + + monthsParse: monthsParse$6, + longMonthsParse: monthsParse$6, + shortMonthsParse: monthsParse$6, + + weekdays: 'zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag'.split( + '_' + ), + weekdaysShort: 'zo._ma._di._wo._do._vr._za.'.split('_'), + weekdaysMin: 'zo_ma_di_wo_do_vr_za'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[vandaag om] LT', + nextDay: '[morgen om] LT', + nextWeek: 'dddd [om] LT', + lastDay: '[gisteren om] LT', + lastWeek: '[afgelopen] dddd [om] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'over %s', + past: '%s geleden', + s: 'een paar seconden', + ss: '%d seconden', + m: 'één minuut', + mm: '%d minuten', + h: 'één uur', + hh: '%d uur', + d: 'één dag', + dd: '%d dagen', + M: 'één maand', + MM: '%d maanden', + y: 'één jaar', + yy: '%d jaar', + }, + dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/, + ordinal: function (number) { + return ( + number + + (number === 1 || number === 8 || number >= 20 ? 'ste' : 'de') + ); + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var monthsShortWithDots$2 = 'jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.'.split( + '_' + ), + monthsShortWithoutDots$2 = 'jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec'.split( + '_' + ), + monthsParse$7 = [ + /^jan/i, + /^feb/i, + /^maart|mrt.?$/i, + /^apr/i, + /^mei$/i, + /^jun[i.]?$/i, + /^jul[i.]?$/i, + /^aug/i, + /^sep/i, + /^okt/i, + /^nov/i, + /^dec/i, + ], + monthsRegex$7 = /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i; + + moment.defineLocale('nl', { + months: 'januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december'.split( + '_' + ), + monthsShort: function (m, format) { + if (!m) { + return monthsShortWithDots$2; + } else if (/-MMM-/.test(format)) { + return monthsShortWithoutDots$2[m.month()]; + } else { + return monthsShortWithDots$2[m.month()]; + } + }, + + monthsRegex: monthsRegex$7, + monthsShortRegex: monthsRegex$7, + monthsStrictRegex: /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i, + monthsShortStrictRegex: /^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i, + + monthsParse: monthsParse$7, + longMonthsParse: monthsParse$7, + shortMonthsParse: monthsParse$7, + + weekdays: 'zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag'.split( + '_' + ), + weekdaysShort: 'zo._ma._di._wo._do._vr._za.'.split('_'), + weekdaysMin: 'zo_ma_di_wo_do_vr_za'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD-MM-YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[vandaag om] LT', + nextDay: '[morgen om] LT', + nextWeek: 'dddd [om] LT', + lastDay: '[gisteren om] LT', + lastWeek: '[afgelopen] dddd [om] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'over %s', + past: '%s geleden', + s: 'een paar seconden', + ss: '%d seconden', + m: 'één minuut', + mm: '%d minuten', + h: 'één uur', + hh: '%d uur', + d: 'één dag', + dd: '%d dagen', + M: 'één maand', + MM: '%d maanden', + y: 'één jaar', + yy: '%d jaar', + }, + dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/, + ordinal: function (number) { + return ( + number + + (number === 1 || number === 8 || number >= 20 ? 'ste' : 'de') + ); + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + moment.defineLocale('nn', { + months: 'januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember'.split( + '_' + ), + monthsShort: 'jan._feb._mars_apr._mai_juni_juli_aug._sep._okt._nov._des.'.split( + '_' + ), + monthsParseExact: true, + weekdays: 'sundag_måndag_tysdag_onsdag_torsdag_fredag_laurdag'.split('_'), + weekdaysShort: 'su._må._ty._on._to._fr._lau.'.split('_'), + weekdaysMin: 'su_må_ty_on_to_fr_la'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D. MMMM YYYY', + LLL: 'D. MMMM YYYY [kl.] H:mm', + LLLL: 'dddd D. MMMM YYYY [kl.] HH:mm', + }, + calendar: { + sameDay: '[I dag klokka] LT', + nextDay: '[I morgon klokka] LT', + nextWeek: 'dddd [klokka] LT', + lastDay: '[I går klokka] LT', + lastWeek: '[Føregåande] dddd [klokka] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'om %s', + past: '%s sidan', + s: 'nokre sekund', + ss: '%d sekund', + m: 'eit minutt', + mm: '%d minutt', + h: 'ein time', + hh: '%d timar', + d: 'ein dag', + dd: '%d dagar', + M: 'ein månad', + MM: '%d månader', + y: 'eit år', + yy: '%d år', + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal: '%d.', + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + moment.defineLocale('oc-lnc', { + months: { + standalone: 'genièr_febrièr_març_abril_mai_junh_julhet_agost_setembre_octòbre_novembre_decembre'.split( + '_' + ), + format: "de genièr_de febrièr_de març_d'abril_de mai_de junh_de julhet_d'agost_de setembre_d'octòbre_de novembre_de decembre".split( + '_' + ), + isFormat: /D[oD]?(\s)+MMMM/, + }, + monthsShort: 'gen._febr._març_abr._mai_junh_julh._ago._set._oct._nov._dec.'.split( + '_' + ), + monthsParseExact: true, + weekdays: 'dimenge_diluns_dimars_dimècres_dijòus_divendres_dissabte'.split( + '_' + ), + weekdaysShort: 'dg._dl._dm._dc._dj._dv._ds.'.split('_'), + weekdaysMin: 'dg_dl_dm_dc_dj_dv_ds'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'H:mm', + LTS: 'H:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM [de] YYYY', + ll: 'D MMM YYYY', + LLL: 'D MMMM [de] YYYY [a] H:mm', + lll: 'D MMM YYYY, H:mm', + LLLL: 'dddd D MMMM [de] YYYY [a] H:mm', + llll: 'ddd D MMM YYYY, H:mm', + }, + calendar: { + sameDay: '[uèi a] LT', + nextDay: '[deman a] LT', + nextWeek: 'dddd [a] LT', + lastDay: '[ièr a] LT', + lastWeek: 'dddd [passat a] LT', + sameElse: 'L', + }, + relativeTime: { + future: "d'aquí %s", + past: 'fa %s', + s: 'unas segondas', + ss: '%d segondas', + m: 'una minuta', + mm: '%d minutas', + h: 'una ora', + hh: '%d oras', + d: 'un jorn', + dd: '%d jorns', + M: 'un mes', + MM: '%d meses', + y: 'un an', + yy: '%d ans', + }, + dayOfMonthOrdinalParse: /\d{1,2}(r|n|t|è|a)/, + ordinal: function (number, period) { + var output = + number === 1 + ? 'r' + : number === 2 + ? 'n' + : number === 3 + ? 'r' + : number === 4 + ? 't' + : 'è'; + if (period === 'w' || period === 'W') { + output = 'a'; + } + return number + output; + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, + }, + }); + + //! moment.js locale configuration + + var symbolMap$e = { + '1': '੧', + '2': '੨', + '3': '੩', + '4': '੪', + '5': '੫', + '6': '੬', + '7': '੭', + '8': '੮', + '9': '੯', + '0': '੦', + }, + numberMap$d = { + '੧': '1', + '੨': '2', + '੩': '3', + '੪': '4', + '੫': '5', + '੬': '6', + '੭': '7', + '੮': '8', + '੯': '9', + '੦': '0', + }; + + moment.defineLocale('pa-in', { + // There are months name as per Nanakshahi Calendar but they are not used as rigidly in modern Punjabi. + months: 'ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ'.split( + '_' + ), + monthsShort: 'ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ'.split( + '_' + ), + weekdays: 'ਐਤਵਾਰ_ਸੋਮਵਾਰ_ਮੰਗਲਵਾਰ_ਬੁਧਵਾਰ_ਵੀਰਵਾਰ_ਸ਼ੁੱਕਰਵਾਰ_ਸ਼ਨੀਚਰਵਾਰ'.split( + '_' + ), + weekdaysShort: 'ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ'.split('_'), + weekdaysMin: 'ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ'.split('_'), + longDateFormat: { + LT: 'A h:mm ਵਜੇ', + LTS: 'A h:mm:ss ਵਜੇ', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY, A h:mm ਵਜੇ', + LLLL: 'dddd, D MMMM YYYY, A h:mm ਵਜੇ', + }, + calendar: { + sameDay: '[ਅਜ] LT', + nextDay: '[ਕਲ] LT', + nextWeek: '[ਅਗਲਾ] dddd, LT', + lastDay: '[ਕਲ] LT', + lastWeek: '[ਪਿਛਲੇ] dddd, LT', + sameElse: 'L', + }, + relativeTime: { + future: '%s ਵਿੱਚ', + past: '%s ਪਿਛਲੇ', + s: 'ਕੁਝ ਸਕਿੰਟ', + ss: '%d ਸਕਿੰਟ', + m: 'ਇਕ ਮਿੰਟ', + mm: '%d ਮਿੰਟ', + h: 'ਇੱਕ ਘੰਟਾ', + hh: '%d ਘੰਟੇ', + d: 'ਇੱਕ ਦਿਨ', + dd: '%d ਦਿਨ', + M: 'ਇੱਕ ਮਹੀਨਾ', + MM: '%d ਮਹੀਨੇ', + y: 'ਇੱਕ ਸਾਲ', + yy: '%d ਸਾਲ', + }, + preparse: function (string) { + return string.replace(/[੧੨੩੪੫੬੭੮੯੦]/g, function (match) { + return numberMap$d[match]; + }); + }, + postformat: function (string) { + return string.replace(/\d/g, function (match) { + return symbolMap$e[match]; + }); + }, + // Punjabi notation for meridiems are quite fuzzy in practice. While there exists + // a rigid notion of a 'Pahar' it is not used as rigidly in modern Punjabi. + meridiemParse: /ਰਾਤ|ਸਵੇਰ|ਦੁਪਹਿਰ|ਸ਼ਾਮ/, + meridiemHour: function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === 'ਰਾਤ') { + return hour < 4 ? hour : hour + 12; + } else if (meridiem === 'ਸਵੇਰ') { + return hour; + } else if (meridiem === 'ਦੁਪਹਿਰ') { + return hour >= 10 ? hour : hour + 12; + } else if (meridiem === 'ਸ਼ਾਮ') { + return hour + 12; + } + }, + meridiem: function (hour, minute, isLower) { + if (hour < 4) { + return 'ਰਾਤ'; + } else if (hour < 10) { + return 'ਸਵੇਰ'; + } else if (hour < 17) { + return 'ਦੁਪਹਿਰ'; + } else if (hour < 20) { + return 'ਸ਼ਾਮ'; + } else { + return 'ਰਾਤ'; + } + }, + week: { + dow: 0, // Sunday is the first day of the week. + doy: 6, // The week that contains Jan 6th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var monthsNominative = 'styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień'.split( + '_' + ), + monthsSubjective = 'stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_września_października_listopada_grudnia'.split( + '_' + ); + function plural$3(n) { + return n % 10 < 5 && n % 10 > 1 && ~~(n / 10) % 10 !== 1; + } + function translate$8(number, withoutSuffix, key) { + var result = number + ' '; + switch (key) { + case 'ss': + return result + (plural$3(number) ? 'sekundy' : 'sekund'); + case 'm': + return withoutSuffix ? 'minuta' : 'minutę'; + case 'mm': + return result + (plural$3(number) ? 'minuty' : 'minut'); + case 'h': + return withoutSuffix ? 'godzina' : 'godzinę'; + case 'hh': + return result + (plural$3(number) ? 'godziny' : 'godzin'); + case 'MM': + return result + (plural$3(number) ? 'miesiące' : 'miesięcy'); + case 'yy': + return result + (plural$3(number) ? 'lata' : 'lat'); + } + } + + moment.defineLocale('pl', { + months: function (momentToFormat, format) { + if (!momentToFormat) { + return monthsNominative; + } else if (format === '') { + // Hack: if format empty we know this is used to generate + // RegExp by moment. Give then back both valid forms of months + // in RegExp ready format. + return ( + '(' + + monthsSubjective[momentToFormat.month()] + + '|' + + monthsNominative[momentToFormat.month()] + + ')' + ); + } else if (/D MMMM/.test(format)) { + return monthsSubjective[momentToFormat.month()]; + } else { + return monthsNominative[momentToFormat.month()]; + } + }, + monthsShort: 'sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru'.split('_'), + weekdays: 'niedziela_poniedziałek_wtorek_środa_czwartek_piątek_sobota'.split( + '_' + ), + weekdaysShort: 'ndz_pon_wt_śr_czw_pt_sob'.split('_'), + weekdaysMin: 'Nd_Pn_Wt_Śr_Cz_Pt_So'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[Dziś o] LT', + nextDay: '[Jutro o] LT', + nextWeek: function () { + switch (this.day()) { + case 0: + return '[W niedzielę o] LT'; + + case 2: + return '[We wtorek o] LT'; + + case 3: + return '[W środę o] LT'; + + case 6: + return '[W sobotę o] LT'; + + default: + return '[W] dddd [o] LT'; + } + }, + lastDay: '[Wczoraj o] LT', + lastWeek: function () { + switch (this.day()) { + case 0: + return '[W zeszłą niedzielę o] LT'; + case 3: + return '[W zeszłą środę o] LT'; + case 6: + return '[W zeszłą sobotę o] LT'; + default: + return '[W zeszły] dddd [o] LT'; + } + }, + sameElse: 'L', + }, + relativeTime: { + future: 'za %s', + past: '%s temu', + s: 'kilka sekund', + ss: translate$8, + m: translate$8, + mm: translate$8, + h: translate$8, + hh: translate$8, + d: '1 dzień', + dd: '%d dni', + M: 'miesiąc', + MM: translate$8, + y: 'rok', + yy: translate$8, + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal: '%d.', + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + moment.defineLocale('pt-br', { + months: 'janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro'.split( + '_' + ), + monthsShort: 'jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez'.split('_'), + weekdays: 'domingo_segunda-feira_terça-feira_quarta-feira_quinta-feira_sexta-feira_sábado'.split( + '_' + ), + weekdaysShort: 'dom_seg_ter_qua_qui_sex_sáb'.split('_'), + weekdaysMin: 'do_2ª_3ª_4ª_5ª_6ª_sá'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D [de] MMMM [de] YYYY', + LLL: 'D [de] MMMM [de] YYYY [às] HH:mm', + LLLL: 'dddd, D [de] MMMM [de] YYYY [às] HH:mm', + }, + calendar: { + sameDay: '[Hoje às] LT', + nextDay: '[Amanhã às] LT', + nextWeek: 'dddd [às] LT', + lastDay: '[Ontem às] LT', + lastWeek: function () { + return this.day() === 0 || this.day() === 6 + ? '[Último] dddd [às] LT' // Saturday + Sunday + : '[Última] dddd [às] LT'; // Monday - Friday + }, + sameElse: 'L', + }, + relativeTime: { + future: 'em %s', + past: 'há %s', + s: 'poucos segundos', + ss: '%d segundos', + m: 'um minuto', + mm: '%d minutos', + h: 'uma hora', + hh: '%d horas', + d: 'um dia', + dd: '%d dias', + M: 'um mês', + MM: '%d meses', + y: 'um ano', + yy: '%d anos', + }, + dayOfMonthOrdinalParse: /\d{1,2}º/, + ordinal: '%dº', + }); + + //! moment.js locale configuration + + moment.defineLocale('pt', { + months: 'janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro'.split( + '_' + ), + monthsShort: 'jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez'.split('_'), + weekdays: 'Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado'.split( + '_' + ), + weekdaysShort: 'Dom_Seg_Ter_Qua_Qui_Sex_Sáb'.split('_'), + weekdaysMin: 'Do_2ª_3ª_4ª_5ª_6ª_Sá'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D [de] MMMM [de] YYYY', + LLL: 'D [de] MMMM [de] YYYY HH:mm', + LLLL: 'dddd, D [de] MMMM [de] YYYY HH:mm', + }, + calendar: { + sameDay: '[Hoje às] LT', + nextDay: '[Amanhã às] LT', + nextWeek: 'dddd [às] LT', + lastDay: '[Ontem às] LT', + lastWeek: function () { + return this.day() === 0 || this.day() === 6 + ? '[Último] dddd [às] LT' // Saturday + Sunday + : '[Última] dddd [às] LT'; // Monday - Friday + }, + sameElse: 'L', + }, + relativeTime: { + future: 'em %s', + past: 'há %s', + s: 'segundos', + ss: '%d segundos', + m: 'um minuto', + mm: '%d minutos', + h: 'uma hora', + hh: '%d horas', + d: 'um dia', + dd: '%d dias', + M: 'um mês', + MM: '%d meses', + y: 'um ano', + yy: '%d anos', + }, + dayOfMonthOrdinalParse: /\d{1,2}º/, + ordinal: '%dº', + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + function relativeTimeWithPlural$2(number, withoutSuffix, key) { + var format = { + ss: 'secunde', + mm: 'minute', + hh: 'ore', + dd: 'zile', + MM: 'luni', + yy: 'ani', + }, + separator = ' '; + if (number % 100 >= 20 || (number >= 100 && number % 100 === 0)) { + separator = ' de '; + } + return number + separator + format[key]; + } + + moment.defineLocale('ro', { + months: 'ianuarie_februarie_martie_aprilie_mai_iunie_iulie_august_septembrie_octombrie_noiembrie_decembrie'.split( + '_' + ), + monthsShort: 'ian._feb._mart._apr._mai_iun._iul._aug._sept._oct._nov._dec.'.split( + '_' + ), + monthsParseExact: true, + weekdays: 'duminică_luni_marți_miercuri_joi_vineri_sâmbătă'.split('_'), + weekdaysShort: 'Dum_Lun_Mar_Mie_Joi_Vin_Sâm'.split('_'), + weekdaysMin: 'Du_Lu_Ma_Mi_Jo_Vi_Sâ'.split('_'), + longDateFormat: { + LT: 'H:mm', + LTS: 'H:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY H:mm', + LLLL: 'dddd, D MMMM YYYY H:mm', + }, + calendar: { + sameDay: '[azi la] LT', + nextDay: '[mâine la] LT', + nextWeek: 'dddd [la] LT', + lastDay: '[ieri la] LT', + lastWeek: '[fosta] dddd [la] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'peste %s', + past: '%s în urmă', + s: 'câteva secunde', + ss: relativeTimeWithPlural$2, + m: 'un minut', + mm: relativeTimeWithPlural$2, + h: 'o oră', + hh: relativeTimeWithPlural$2, + d: 'o zi', + dd: relativeTimeWithPlural$2, + M: 'o lună', + MM: relativeTimeWithPlural$2, + y: 'un an', + yy: relativeTimeWithPlural$2, + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 7, // The week that contains Jan 7th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + function plural$4(word, num) { + var forms = word.split('_'); + return num % 10 === 1 && num % 100 !== 11 + ? forms[0] + : num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20) + ? forms[1] + : forms[2]; + } + function relativeTimeWithPlural$3(number, withoutSuffix, key) { + var format = { + ss: withoutSuffix ? 'секунда_секунды_секунд' : 'секунду_секунды_секунд', + mm: withoutSuffix ? 'минута_минуты_минут' : 'минуту_минуты_минут', + hh: 'час_часа_часов', + dd: 'день_дня_дней', + MM: 'месяц_месяца_месяцев', + yy: 'год_года_лет', + }; + if (key === 'm') { + return withoutSuffix ? 'минута' : 'минуту'; + } else { + return number + ' ' + plural$4(format[key], +number); + } + } + var monthsParse$8 = [ + /^янв/i, + /^фев/i, + /^мар/i, + /^апр/i, + /^ма[йя]/i, + /^июн/i, + /^июл/i, + /^авг/i, + /^сен/i, + /^окт/i, + /^ноя/i, + /^дек/i, + ]; + + // http://new.gramota.ru/spravka/rules/139-prop : § 103 + // Сокращения месяцев: http://new.gramota.ru/spravka/buro/search-answer?s=242637 + // CLDR data: http://www.unicode.org/cldr/charts/28/summary/ru.html#1753 + moment.defineLocale('ru', { + months: { + format: 'января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря'.split( + '_' + ), + standalone: 'январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь'.split( + '_' + ), + }, + monthsShort: { + // по CLDR именно "июл." и "июн.", но какой смысл менять букву на точку? + format: 'янв._февр._мар._апр._мая_июня_июля_авг._сент._окт._нояб._дек.'.split( + '_' + ), + standalone: 'янв._февр._март_апр._май_июнь_июль_авг._сент._окт._нояб._дек.'.split( + '_' + ), + }, + weekdays: { + standalone: 'воскресенье_понедельник_вторник_среда_четверг_пятница_суббота'.split( + '_' + ), + format: 'воскресенье_понедельник_вторник_среду_четверг_пятницу_субботу'.split( + '_' + ), + isFormat: /\[ ?[Вв] ?(?:прошлую|следующую|эту)? ?] ?dddd/, + }, + weekdaysShort: 'вс_пн_вт_ср_чт_пт_сб'.split('_'), + weekdaysMin: 'вс_пн_вт_ср_чт_пт_сб'.split('_'), + monthsParse: monthsParse$8, + longMonthsParse: monthsParse$8, + shortMonthsParse: monthsParse$8, + + // полные названия с падежами, по три буквы, для некоторых, по 4 буквы, сокращения с точкой и без точки + monthsRegex: /^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i, + + // копия предыдущего + monthsShortRegex: /^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i, + + // полные названия с падежами + monthsStrictRegex: /^(январ[яь]|феврал[яь]|марта?|апрел[яь]|ма[яй]|июн[яь]|июл[яь]|августа?|сентябр[яь]|октябр[яь]|ноябр[яь]|декабр[яь])/i, + + // Выражение, которое соответствует только сокращённым формам + monthsShortStrictRegex: /^(янв\.|февр?\.|мар[т.]|апр\.|ма[яй]|июн[ья.]|июл[ья.]|авг\.|сент?\.|окт\.|нояб?\.|дек\.)/i, + longDateFormat: { + LT: 'H:mm', + LTS: 'H:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D MMMM YYYY г.', + LLL: 'D MMMM YYYY г., H:mm', + LLLL: 'dddd, D MMMM YYYY г., H:mm', + }, + calendar: { + sameDay: '[Сегодня, в] LT', + nextDay: '[Завтра, в] LT', + lastDay: '[Вчера, в] LT', + nextWeek: function (now) { + if (now.week() !== this.week()) { + switch (this.day()) { + case 0: + return '[В следующее] dddd, [в] LT'; + case 1: + case 2: + case 4: + return '[В следующий] dddd, [в] LT'; + case 3: + case 5: + case 6: + return '[В следующую] dddd, [в] LT'; + } + } else { + if (this.day() === 2) { + return '[Во] dddd, [в] LT'; + } else { + return '[В] dddd, [в] LT'; + } + } + }, + lastWeek: function (now) { + if (now.week() !== this.week()) { + switch (this.day()) { + case 0: + return '[В прошлое] dddd, [в] LT'; + case 1: + case 2: + case 4: + return '[В прошлый] dddd, [в] LT'; + case 3: + case 5: + case 6: + return '[В прошлую] dddd, [в] LT'; + } + } else { + if (this.day() === 2) { + return '[Во] dddd, [в] LT'; + } else { + return '[В] dddd, [в] LT'; + } + } + }, + sameElse: 'L', + }, + relativeTime: { + future: 'через %s', + past: '%s назад', + s: 'несколько секунд', + ss: relativeTimeWithPlural$3, + m: relativeTimeWithPlural$3, + mm: relativeTimeWithPlural$3, + h: 'час', + hh: relativeTimeWithPlural$3, + d: 'день', + dd: relativeTimeWithPlural$3, + M: 'месяц', + MM: relativeTimeWithPlural$3, + y: 'год', + yy: relativeTimeWithPlural$3, + }, + meridiemParse: /ночи|утра|дня|вечера/i, + isPM: function (input) { + return /^(дня|вечера)$/.test(input); + }, + meridiem: function (hour, minute, isLower) { + if (hour < 4) { + return 'ночи'; + } else if (hour < 12) { + return 'утра'; + } else if (hour < 17) { + return 'дня'; + } else { + return 'вечера'; + } + }, + dayOfMonthOrdinalParse: /\d{1,2}-(й|го|я)/, + ordinal: function (number, period) { + switch (period) { + case 'M': + case 'd': + case 'DDD': + return number + '-й'; + case 'D': + return number + '-го'; + case 'w': + case 'W': + return number + '-я'; + default: + return number; + } + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var months$8 = [ + 'جنوري', + 'فيبروري', + 'مارچ', + 'اپريل', + 'مئي', + 'جون', + 'جولاءِ', + 'آگسٽ', + 'سيپٽمبر', + 'آڪٽوبر', + 'نومبر', + 'ڊسمبر', + ], + days = ['آچر', 'سومر', 'اڱارو', 'اربع', 'خميس', 'جمع', 'ڇنڇر']; + + moment.defineLocale('sd', { + months: months$8, + monthsShort: months$8, + weekdays: days, + weekdaysShort: days, + weekdaysMin: days, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd، D MMMM YYYY HH:mm', + }, + meridiemParse: /صبح|شام/, + isPM: function (input) { + return 'شام' === input; + }, + meridiem: function (hour, minute, isLower) { + if (hour < 12) { + return 'صبح'; + } + return 'شام'; + }, + calendar: { + sameDay: '[اڄ] LT', + nextDay: '[سڀاڻي] LT', + nextWeek: 'dddd [اڳين هفتي تي] LT', + lastDay: '[ڪالهه] LT', + lastWeek: '[گزريل هفتي] dddd [تي] LT', + sameElse: 'L', + }, + relativeTime: { + future: '%s پوء', + past: '%s اڳ', + s: 'چند سيڪنڊ', + ss: '%d سيڪنڊ', + m: 'هڪ منٽ', + mm: '%d منٽ', + h: 'هڪ ڪلاڪ', + hh: '%d ڪلاڪ', + d: 'هڪ ڏينهن', + dd: '%d ڏينهن', + M: 'هڪ مهينو', + MM: '%d مهينا', + y: 'هڪ سال', + yy: '%d سال', + }, + preparse: function (string) { + return string.replace(/،/g, ','); + }, + postformat: function (string) { + return string.replace(/,/g, '،'); + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + moment.defineLocale('se', { + months: 'ođđajagemánnu_guovvamánnu_njukčamánnu_cuoŋománnu_miessemánnu_geassemánnu_suoidnemánnu_borgemánnu_čakčamánnu_golggotmánnu_skábmamánnu_juovlamánnu'.split( + '_' + ), + monthsShort: 'ođđj_guov_njuk_cuo_mies_geas_suoi_borg_čakč_golg_skáb_juov'.split( + '_' + ), + weekdays: 'sotnabeaivi_vuossárga_maŋŋebárga_gaskavahkku_duorastat_bearjadat_lávvardat'.split( + '_' + ), + weekdaysShort: 'sotn_vuos_maŋ_gask_duor_bear_láv'.split('_'), + weekdaysMin: 's_v_m_g_d_b_L'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD.MM.YYYY', + LL: 'MMMM D. [b.] YYYY', + LLL: 'MMMM D. [b.] YYYY [ti.] HH:mm', + LLLL: 'dddd, MMMM D. [b.] YYYY [ti.] HH:mm', + }, + calendar: { + sameDay: '[otne ti] LT', + nextDay: '[ihttin ti] LT', + nextWeek: 'dddd [ti] LT', + lastDay: '[ikte ti] LT', + lastWeek: '[ovddit] dddd [ti] LT', + sameElse: 'L', + }, + relativeTime: { + future: '%s geažes', + past: 'maŋit %s', + s: 'moadde sekunddat', + ss: '%d sekunddat', + m: 'okta minuhta', + mm: '%d minuhtat', + h: 'okta diimmu', + hh: '%d diimmut', + d: 'okta beaivi', + dd: '%d beaivvit', + M: 'okta mánnu', + MM: '%d mánut', + y: 'okta jahki', + yy: '%d jagit', + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal: '%d.', + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + /*jshint -W100*/ + moment.defineLocale('si', { + months: 'ජනවාරි_පෙබරවාරි_මාර්තු_අප්‍රේල්_මැයි_ජූනි_ජූලි_අගෝස්තු_සැප්තැම්බර්_ඔක්තෝබර්_නොවැම්බර්_දෙසැම්බර්'.split( + '_' + ), + monthsShort: 'ජන_පෙබ_මාර්_අප්_මැයි_ජූනි_ජූලි_අගෝ_සැප්_ඔක්_නොවැ_දෙසැ'.split( + '_' + ), + weekdays: 'ඉරිදා_සඳුදා_අඟහරුවාදා_බදාදා_බ්‍රහස්පතින්දා_සිකුරාදා_සෙනසුරාදා'.split( + '_' + ), + weekdaysShort: 'ඉරි_සඳු_අඟ_බදා_බ්‍රහ_සිකු_සෙන'.split('_'), + weekdaysMin: 'ඉ_ස_අ_බ_බ්‍ර_සි_සෙ'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'a h:mm', + LTS: 'a h:mm:ss', + L: 'YYYY/MM/DD', + LL: 'YYYY MMMM D', + LLL: 'YYYY MMMM D, a h:mm', + LLLL: 'YYYY MMMM D [වැනි] dddd, a h:mm:ss', + }, + calendar: { + sameDay: '[අද] LT[ට]', + nextDay: '[හෙට] LT[ට]', + nextWeek: 'dddd LT[ට]', + lastDay: '[ඊයේ] LT[ට]', + lastWeek: '[පසුගිය] dddd LT[ට]', + sameElse: 'L', + }, + relativeTime: { + future: '%sකින්', + past: '%sකට පෙර', + s: 'තත්පර කිහිපය', + ss: 'තත්පර %d', + m: 'මිනිත්තුව', + mm: 'මිනිත්තු %d', + h: 'පැය', + hh: 'පැය %d', + d: 'දිනය', + dd: 'දින %d', + M: 'මාසය', + MM: 'මාස %d', + y: 'වසර', + yy: 'වසර %d', + }, + dayOfMonthOrdinalParse: /\d{1,2} වැනි/, + ordinal: function (number) { + return number + ' වැනි'; + }, + meridiemParse: /පෙර වරු|පස් වරු|පෙ.ව|ප.ව./, + isPM: function (input) { + return input === 'ප.ව.' || input === 'පස් වරු'; + }, + meridiem: function (hours, minutes, isLower) { + if (hours > 11) { + return isLower ? 'ප.ව.' : 'පස් වරු'; + } else { + return isLower ? 'පෙ.ව.' : 'පෙර වරු'; + } + }, + }); + + //! moment.js locale configuration + + var months$9 = 'január_február_marec_apríl_máj_jún_júl_august_september_október_november_december'.split( + '_' + ), + monthsShort$6 = 'jan_feb_mar_apr_máj_jún_júl_aug_sep_okt_nov_dec'.split('_'); + function plural$5(n) { + return n > 1 && n < 5; + } + function translate$9(number, withoutSuffix, key, isFuture) { + var result = number + ' '; + switch (key) { + case 's': // a few seconds / in a few seconds / a few seconds ago + return withoutSuffix || isFuture ? 'pár sekúnd' : 'pár sekundami'; + case 'ss': // 9 seconds / in 9 seconds / 9 seconds ago + if (withoutSuffix || isFuture) { + return result + (plural$5(number) ? 'sekundy' : 'sekúnd'); + } else { + return result + 'sekundami'; + } + case 'm': // a minute / in a minute / a minute ago + return withoutSuffix ? 'minúta' : isFuture ? 'minútu' : 'minútou'; + case 'mm': // 9 minutes / in 9 minutes / 9 minutes ago + if (withoutSuffix || isFuture) { + return result + (plural$5(number) ? 'minúty' : 'minút'); + } else { + return result + 'minútami'; + } + case 'h': // an hour / in an hour / an hour ago + return withoutSuffix ? 'hodina' : isFuture ? 'hodinu' : 'hodinou'; + case 'hh': // 9 hours / in 9 hours / 9 hours ago + if (withoutSuffix || isFuture) { + return result + (plural$5(number) ? 'hodiny' : 'hodín'); + } else { + return result + 'hodinami'; + } + case 'd': // a day / in a day / a day ago + return withoutSuffix || isFuture ? 'deň' : 'dňom'; + case 'dd': // 9 days / in 9 days / 9 days ago + if (withoutSuffix || isFuture) { + return result + (plural$5(number) ? 'dni' : 'dní'); + } else { + return result + 'dňami'; + } + case 'M': // a month / in a month / a month ago + return withoutSuffix || isFuture ? 'mesiac' : 'mesiacom'; + case 'MM': // 9 months / in 9 months / 9 months ago + if (withoutSuffix || isFuture) { + return result + (plural$5(number) ? 'mesiace' : 'mesiacov'); + } else { + return result + 'mesiacmi'; + } + case 'y': // a year / in a year / a year ago + return withoutSuffix || isFuture ? 'rok' : 'rokom'; + case 'yy': // 9 years / in 9 years / 9 years ago + if (withoutSuffix || isFuture) { + return result + (plural$5(number) ? 'roky' : 'rokov'); + } else { + return result + 'rokmi'; + } + } + } + + moment.defineLocale('sk', { + months: months$9, + monthsShort: monthsShort$6, + weekdays: 'nedeľa_pondelok_utorok_streda_štvrtok_piatok_sobota'.split('_'), + weekdaysShort: 'ne_po_ut_st_št_pi_so'.split('_'), + weekdaysMin: 'ne_po_ut_st_št_pi_so'.split('_'), + longDateFormat: { + LT: 'H:mm', + LTS: 'H:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D. MMMM YYYY', + LLL: 'D. MMMM YYYY H:mm', + LLLL: 'dddd D. MMMM YYYY H:mm', + }, + calendar: { + sameDay: '[dnes o] LT', + nextDay: '[zajtra o] LT', + nextWeek: function () { + switch (this.day()) { + case 0: + return '[v nedeľu o] LT'; + case 1: + case 2: + return '[v] dddd [o] LT'; + case 3: + return '[v stredu o] LT'; + case 4: + return '[vo štvrtok o] LT'; + case 5: + return '[v piatok o] LT'; + case 6: + return '[v sobotu o] LT'; + } + }, + lastDay: '[včera o] LT', + lastWeek: function () { + switch (this.day()) { + case 0: + return '[minulú nedeľu o] LT'; + case 1: + case 2: + return '[minulý] dddd [o] LT'; + case 3: + return '[minulú stredu o] LT'; + case 4: + case 5: + return '[minulý] dddd [o] LT'; + case 6: + return '[minulú sobotu o] LT'; + } + }, + sameElse: 'L', + }, + relativeTime: { + future: 'za %s', + past: 'pred %s', + s: translate$9, + ss: translate$9, + m: translate$9, + mm: translate$9, + h: translate$9, + hh: translate$9, + d: translate$9, + dd: translate$9, + M: translate$9, + MM: translate$9, + y: translate$9, + yy: translate$9, + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal: '%d.', + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + function processRelativeTime$7(number, withoutSuffix, key, isFuture) { + var result = number + ' '; + switch (key) { + case 's': + return withoutSuffix || isFuture + ? 'nekaj sekund' + : 'nekaj sekundami'; + case 'ss': + if (number === 1) { + result += withoutSuffix ? 'sekundo' : 'sekundi'; + } else if (number === 2) { + result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah'; + } else if (number < 5) { + result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah'; + } else { + result += 'sekund'; + } + return result; + case 'm': + return withoutSuffix ? 'ena minuta' : 'eno minuto'; + case 'mm': + if (number === 1) { + result += withoutSuffix ? 'minuta' : 'minuto'; + } else if (number === 2) { + result += withoutSuffix || isFuture ? 'minuti' : 'minutama'; + } else if (number < 5) { + result += withoutSuffix || isFuture ? 'minute' : 'minutami'; + } else { + result += withoutSuffix || isFuture ? 'minut' : 'minutami'; + } + return result; + case 'h': + return withoutSuffix ? 'ena ura' : 'eno uro'; + case 'hh': + if (number === 1) { + result += withoutSuffix ? 'ura' : 'uro'; + } else if (number === 2) { + result += withoutSuffix || isFuture ? 'uri' : 'urama'; + } else if (number < 5) { + result += withoutSuffix || isFuture ? 'ure' : 'urami'; + } else { + result += withoutSuffix || isFuture ? 'ur' : 'urami'; + } + return result; + case 'd': + return withoutSuffix || isFuture ? 'en dan' : 'enim dnem'; + case 'dd': + if (number === 1) { + result += withoutSuffix || isFuture ? 'dan' : 'dnem'; + } else if (number === 2) { + result += withoutSuffix || isFuture ? 'dni' : 'dnevoma'; + } else { + result += withoutSuffix || isFuture ? 'dni' : 'dnevi'; + } + return result; + case 'M': + return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem'; + case 'MM': + if (number === 1) { + result += withoutSuffix || isFuture ? 'mesec' : 'mesecem'; + } else if (number === 2) { + result += withoutSuffix || isFuture ? 'meseca' : 'mesecema'; + } else if (number < 5) { + result += withoutSuffix || isFuture ? 'mesece' : 'meseci'; + } else { + result += withoutSuffix || isFuture ? 'mesecev' : 'meseci'; + } + return result; + case 'y': + return withoutSuffix || isFuture ? 'eno leto' : 'enim letom'; + case 'yy': + if (number === 1) { + result += withoutSuffix || isFuture ? 'leto' : 'letom'; + } else if (number === 2) { + result += withoutSuffix || isFuture ? 'leti' : 'letoma'; + } else if (number < 5) { + result += withoutSuffix || isFuture ? 'leta' : 'leti'; + } else { + result += withoutSuffix || isFuture ? 'let' : 'leti'; + } + return result; + } + } + + moment.defineLocale('sl', { + months: 'januar_februar_marec_april_maj_junij_julij_avgust_september_oktober_november_december'.split( + '_' + ), + monthsShort: 'jan._feb._mar._apr._maj._jun._jul._avg._sep._okt._nov._dec.'.split( + '_' + ), + monthsParseExact: true, + weekdays: 'nedelja_ponedeljek_torek_sreda_četrtek_petek_sobota'.split('_'), + weekdaysShort: 'ned._pon._tor._sre._čet._pet._sob.'.split('_'), + weekdaysMin: 'ne_po_to_sr_če_pe_so'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'H:mm', + LTS: 'H:mm:ss', + L: 'DD. MM. YYYY', + LL: 'D. MMMM YYYY', + LLL: 'D. MMMM YYYY H:mm', + LLLL: 'dddd, D. MMMM YYYY H:mm', + }, + calendar: { + sameDay: '[danes ob] LT', + nextDay: '[jutri ob] LT', + + nextWeek: function () { + switch (this.day()) { + case 0: + return '[v] [nedeljo] [ob] LT'; + case 3: + return '[v] [sredo] [ob] LT'; + case 6: + return '[v] [soboto] [ob] LT'; + case 1: + case 2: + case 4: + case 5: + return '[v] dddd [ob] LT'; + } + }, + lastDay: '[včeraj ob] LT', + lastWeek: function () { + switch (this.day()) { + case 0: + return '[prejšnjo] [nedeljo] [ob] LT'; + case 3: + return '[prejšnjo] [sredo] [ob] LT'; + case 6: + return '[prejšnjo] [soboto] [ob] LT'; + case 1: + case 2: + case 4: + case 5: + return '[prejšnji] dddd [ob] LT'; + } + }, + sameElse: 'L', + }, + relativeTime: { + future: 'čez %s', + past: 'pred %s', + s: processRelativeTime$7, + ss: processRelativeTime$7, + m: processRelativeTime$7, + mm: processRelativeTime$7, + h: processRelativeTime$7, + hh: processRelativeTime$7, + d: processRelativeTime$7, + dd: processRelativeTime$7, + M: processRelativeTime$7, + MM: processRelativeTime$7, + y: processRelativeTime$7, + yy: processRelativeTime$7, + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal: '%d.', + week: { + dow: 1, // Monday is the first day of the week. + doy: 7, // The week that contains Jan 7th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + moment.defineLocale('sq', { + months: 'Janar_Shkurt_Mars_Prill_Maj_Qershor_Korrik_Gusht_Shtator_Tetor_Nëntor_Dhjetor'.split( + '_' + ), + monthsShort: 'Jan_Shk_Mar_Pri_Maj_Qer_Kor_Gus_Sht_Tet_Nën_Dhj'.split('_'), + weekdays: 'E Diel_E Hënë_E Martë_E Mërkurë_E Enjte_E Premte_E Shtunë'.split( + '_' + ), + weekdaysShort: 'Die_Hën_Mar_Mër_Enj_Pre_Sht'.split('_'), + weekdaysMin: 'D_H_Ma_Më_E_P_Sh'.split('_'), + weekdaysParseExact: true, + meridiemParse: /PD|MD/, + isPM: function (input) { + return input.charAt(0) === 'M'; + }, + meridiem: function (hours, minutes, isLower) { + return hours < 12 ? 'PD' : 'MD'; + }, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[Sot në] LT', + nextDay: '[Nesër në] LT', + nextWeek: 'dddd [në] LT', + lastDay: '[Dje në] LT', + lastWeek: 'dddd [e kaluar në] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'në %s', + past: '%s më parë', + s: 'disa sekonda', + ss: '%d sekonda', + m: 'një minutë', + mm: '%d minuta', + h: 'një orë', + hh: '%d orë', + d: 'një ditë', + dd: '%d ditë', + M: 'një muaj', + MM: '%d muaj', + y: 'një vit', + yy: '%d vite', + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal: '%d.', + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var translator$1 = { + words: { + //Different grammatical cases + ss: ['секунда', 'секунде', 'секунди'], + m: ['један минут', 'једне минуте'], + mm: ['минут', 'минуте', 'минута'], + h: ['један сат', 'једног сата'], + hh: ['сат', 'сата', 'сати'], + dd: ['дан', 'дана', 'дана'], + MM: ['месец', 'месеца', 'месеци'], + yy: ['година', 'године', 'година'], + }, + correctGrammaticalCase: function (number, wordKey) { + return number === 1 + ? wordKey[0] + : number >= 2 && number <= 4 + ? wordKey[1] + : wordKey[2]; + }, + translate: function (number, withoutSuffix, key) { + var wordKey = translator$1.words[key]; + if (key.length === 1) { + return withoutSuffix ? wordKey[0] : wordKey[1]; + } else { + return ( + number + + ' ' + + translator$1.correctGrammaticalCase(number, wordKey) + ); + } + }, + }; + + moment.defineLocale('sr-cyrl', { + months: 'јануар_фебруар_март_април_мај_јун_јул_август_септембар_октобар_новембар_децембар'.split( + '_' + ), + monthsShort: 'јан._феб._мар._апр._мај_јун_јул_авг._сеп._окт._нов._дец.'.split( + '_' + ), + monthsParseExact: true, + weekdays: 'недеља_понедељак_уторак_среда_четвртак_петак_субота'.split('_'), + weekdaysShort: 'нед._пон._уто._сре._чет._пет._суб.'.split('_'), + weekdaysMin: 'не_по_ут_ср_че_пе_су'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'H:mm', + LTS: 'H:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D. MMMM YYYY', + LLL: 'D. MMMM YYYY H:mm', + LLLL: 'dddd, D. MMMM YYYY H:mm', + }, + calendar: { + sameDay: '[данас у] LT', + nextDay: '[сутра у] LT', + nextWeek: function () { + switch (this.day()) { + case 0: + return '[у] [недељу] [у] LT'; + case 3: + return '[у] [среду] [у] LT'; + case 6: + return '[у] [суботу] [у] LT'; + case 1: + case 2: + case 4: + case 5: + return '[у] dddd [у] LT'; + } + }, + lastDay: '[јуче у] LT', + lastWeek: function () { + var lastWeekDays = [ + '[прошле] [недеље] [у] LT', + '[прошлог] [понедељка] [у] LT', + '[прошлог] [уторка] [у] LT', + '[прошле] [среде] [у] LT', + '[прошлог] [четвртка] [у] LT', + '[прошлог] [петка] [у] LT', + '[прошле] [суботе] [у] LT', + ]; + return lastWeekDays[this.day()]; + }, + sameElse: 'L', + }, + relativeTime: { + future: 'за %s', + past: 'пре %s', + s: 'неколико секунди', + ss: translator$1.translate, + m: translator$1.translate, + mm: translator$1.translate, + h: translator$1.translate, + hh: translator$1.translate, + d: 'дан', + dd: translator$1.translate, + M: 'месец', + MM: translator$1.translate, + y: 'годину', + yy: translator$1.translate, + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal: '%d.', + week: { + dow: 1, // Monday is the first day of the week. + doy: 7, // The week that contains Jan 7th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var translator$2 = { + words: { + //Different grammatical cases + ss: ['sekunda', 'sekunde', 'sekundi'], + m: ['jedan minut', 'jedne minute'], + mm: ['minut', 'minute', 'minuta'], + h: ['jedan sat', 'jednog sata'], + hh: ['sat', 'sata', 'sati'], + dd: ['dan', 'dana', 'dana'], + MM: ['mesec', 'meseca', 'meseci'], + yy: ['godina', 'godine', 'godina'], + }, + correctGrammaticalCase: function (number, wordKey) { + return number === 1 + ? wordKey[0] + : number >= 2 && number <= 4 + ? wordKey[1] + : wordKey[2]; + }, + translate: function (number, withoutSuffix, key) { + var wordKey = translator$2.words[key]; + if (key.length === 1) { + return withoutSuffix ? wordKey[0] : wordKey[1]; + } else { + return ( + number + + ' ' + + translator$2.correctGrammaticalCase(number, wordKey) + ); + } + }, + }; + + moment.defineLocale('sr', { + months: 'januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar'.split( + '_' + ), + monthsShort: 'jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.'.split( + '_' + ), + monthsParseExact: true, + weekdays: 'nedelja_ponedeljak_utorak_sreda_četvrtak_petak_subota'.split( + '_' + ), + weekdaysShort: 'ned._pon._uto._sre._čet._pet._sub.'.split('_'), + weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'H:mm', + LTS: 'H:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D. MMMM YYYY', + LLL: 'D. MMMM YYYY H:mm', + LLLL: 'dddd, D. MMMM YYYY H:mm', + }, + calendar: { + sameDay: '[danas u] LT', + nextDay: '[sutra u] LT', + nextWeek: function () { + switch (this.day()) { + case 0: + return '[u] [nedelju] [u] LT'; + case 3: + return '[u] [sredu] [u] LT'; + case 6: + return '[u] [subotu] [u] LT'; + case 1: + case 2: + case 4: + case 5: + return '[u] dddd [u] LT'; + } + }, + lastDay: '[juče u] LT', + lastWeek: function () { + var lastWeekDays = [ + '[prošle] [nedelje] [u] LT', + '[prošlog] [ponedeljka] [u] LT', + '[prošlog] [utorka] [u] LT', + '[prošle] [srede] [u] LT', + '[prošlog] [četvrtka] [u] LT', + '[prošlog] [petka] [u] LT', + '[prošle] [subote] [u] LT', + ]; + return lastWeekDays[this.day()]; + }, + sameElse: 'L', + }, + relativeTime: { + future: 'za %s', + past: 'pre %s', + s: 'nekoliko sekundi', + ss: translator$2.translate, + m: translator$2.translate, + mm: translator$2.translate, + h: translator$2.translate, + hh: translator$2.translate, + d: 'dan', + dd: translator$2.translate, + M: 'mesec', + MM: translator$2.translate, + y: 'godinu', + yy: translator$2.translate, + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal: '%d.', + week: { + dow: 1, // Monday is the first day of the week. + doy: 7, // The week that contains Jan 7th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + moment.defineLocale('ss', { + months: "Bhimbidvwane_Indlovana_Indlov'lenkhulu_Mabasa_Inkhwekhweti_Inhlaba_Kholwane_Ingci_Inyoni_Imphala_Lweti_Ingongoni".split( + '_' + ), + monthsShort: 'Bhi_Ina_Inu_Mab_Ink_Inh_Kho_Igc_Iny_Imp_Lwe_Igo'.split('_'), + weekdays: 'Lisontfo_Umsombuluko_Lesibili_Lesitsatfu_Lesine_Lesihlanu_Umgcibelo'.split( + '_' + ), + weekdaysShort: 'Lis_Umb_Lsb_Les_Lsi_Lsh_Umg'.split('_'), + weekdaysMin: 'Li_Us_Lb_Lt_Ls_Lh_Ug'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'h:mm A', + LTS: 'h:mm:ss A', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY h:mm A', + LLLL: 'dddd, D MMMM YYYY h:mm A', + }, + calendar: { + sameDay: '[Namuhla nga] LT', + nextDay: '[Kusasa nga] LT', + nextWeek: 'dddd [nga] LT', + lastDay: '[Itolo nga] LT', + lastWeek: 'dddd [leliphelile] [nga] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'nga %s', + past: 'wenteka nga %s', + s: 'emizuzwana lomcane', + ss: '%d mzuzwana', + m: 'umzuzu', + mm: '%d emizuzu', + h: 'lihora', + hh: '%d emahora', + d: 'lilanga', + dd: '%d emalanga', + M: 'inyanga', + MM: '%d tinyanga', + y: 'umnyaka', + yy: '%d iminyaka', + }, + meridiemParse: /ekuseni|emini|entsambama|ebusuku/, + meridiem: function (hours, minutes, isLower) { + if (hours < 11) { + return 'ekuseni'; + } else if (hours < 15) { + return 'emini'; + } else if (hours < 19) { + return 'entsambama'; + } else { + return 'ebusuku'; + } + }, + meridiemHour: function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === 'ekuseni') { + return hour; + } else if (meridiem === 'emini') { + return hour >= 11 ? hour : hour + 12; + } else if (meridiem === 'entsambama' || meridiem === 'ebusuku') { + if (hour === 0) { + return 0; + } + return hour + 12; + } + }, + dayOfMonthOrdinalParse: /\d{1,2}/, + ordinal: '%d', + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + moment.defineLocale('sv', { + months: 'januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december'.split( + '_' + ), + monthsShort: 'jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec'.split('_'), + weekdays: 'söndag_måndag_tisdag_onsdag_torsdag_fredag_lördag'.split('_'), + weekdaysShort: 'sön_mån_tis_ons_tor_fre_lör'.split('_'), + weekdaysMin: 'sö_må_ti_on_to_fr_lö'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'YYYY-MM-DD', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY [kl.] HH:mm', + LLLL: 'dddd D MMMM YYYY [kl.] HH:mm', + lll: 'D MMM YYYY HH:mm', + llll: 'ddd D MMM YYYY HH:mm', + }, + calendar: { + sameDay: '[Idag] LT', + nextDay: '[Imorgon] LT', + lastDay: '[Igår] LT', + nextWeek: '[På] dddd LT', + lastWeek: '[I] dddd[s] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'om %s', + past: 'för %s sedan', + s: 'några sekunder', + ss: '%d sekunder', + m: 'en minut', + mm: '%d minuter', + h: 'en timme', + hh: '%d timmar', + d: 'en dag', + dd: '%d dagar', + M: 'en månad', + MM: '%d månader', + y: 'ett år', + yy: '%d år', + }, + dayOfMonthOrdinalParse: /\d{1,2}(\:e|\:a)/, + ordinal: function (number) { + var b = number % 10, + output = + ~~((number % 100) / 10) === 1 + ? ':e' + : b === 1 + ? ':a' + : b === 2 + ? ':a' + : b === 3 + ? ':e' + : ':e'; + return number + output; + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + moment.defineLocale('sw', { + months: 'Januari_Februari_Machi_Aprili_Mei_Juni_Julai_Agosti_Septemba_Oktoba_Novemba_Desemba'.split( + '_' + ), + monthsShort: 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ago_Sep_Okt_Nov_Des'.split('_'), + weekdays: 'Jumapili_Jumatatu_Jumanne_Jumatano_Alhamisi_Ijumaa_Jumamosi'.split( + '_' + ), + weekdaysShort: 'Jpl_Jtat_Jnne_Jtan_Alh_Ijm_Jmos'.split('_'), + weekdaysMin: 'J2_J3_J4_J5_Al_Ij_J1'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'hh:mm A', + LTS: 'HH:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[leo saa] LT', + nextDay: '[kesho saa] LT', + nextWeek: '[wiki ijayo] dddd [saat] LT', + lastDay: '[jana] LT', + lastWeek: '[wiki iliyopita] dddd [saat] LT', + sameElse: 'L', + }, + relativeTime: { + future: '%s baadaye', + past: 'tokea %s', + s: 'hivi punde', + ss: 'sekunde %d', + m: 'dakika moja', + mm: 'dakika %d', + h: 'saa limoja', + hh: 'masaa %d', + d: 'siku moja', + dd: 'siku %d', + M: 'mwezi mmoja', + MM: 'miezi %d', + y: 'mwaka mmoja', + yy: 'miaka %d', + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 7, // The week that contains Jan 7th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var symbolMap$f = { + '1': '௧', + '2': '௨', + '3': '௩', + '4': '௪', + '5': '௫', + '6': '௬', + '7': '௭', + '8': '௮', + '9': '௯', + '0': '௦', + }, + numberMap$e = { + '௧': '1', + '௨': '2', + '௩': '3', + '௪': '4', + '௫': '5', + '௬': '6', + '௭': '7', + '௮': '8', + '௯': '9', + '௦': '0', + }; + + moment.defineLocale('ta', { + months: 'ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்'.split( + '_' + ), + monthsShort: 'ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்'.split( + '_' + ), + weekdays: 'ஞாயிற்றுக்கிழமை_திங்கட்கிழமை_செவ்வாய்கிழமை_புதன்கிழமை_வியாழக்கிழமை_வெள்ளிக்கிழமை_சனிக்கிழமை'.split( + '_' + ), + weekdaysShort: 'ஞாயிறு_திங்கள்_செவ்வாய்_புதன்_வியாழன்_வெள்ளி_சனி'.split( + '_' + ), + weekdaysMin: 'ஞா_தி_செ_பு_வி_வெ_ச'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY, HH:mm', + LLLL: 'dddd, D MMMM YYYY, HH:mm', + }, + calendar: { + sameDay: '[இன்று] LT', + nextDay: '[நாளை] LT', + nextWeek: 'dddd, LT', + lastDay: '[நேற்று] LT', + lastWeek: '[கடந்த வாரம்] dddd, LT', + sameElse: 'L', + }, + relativeTime: { + future: '%s இல்', + past: '%s முன்', + s: 'ஒரு சில விநாடிகள்', + ss: '%d விநாடிகள்', + m: 'ஒரு நிமிடம்', + mm: '%d நிமிடங்கள்', + h: 'ஒரு மணி நேரம்', + hh: '%d மணி நேரம்', + d: 'ஒரு நாள்', + dd: '%d நாட்கள்', + M: 'ஒரு மாதம்', + MM: '%d மாதங்கள்', + y: 'ஒரு வருடம்', + yy: '%d ஆண்டுகள்', + }, + dayOfMonthOrdinalParse: /\d{1,2}வது/, + ordinal: function (number) { + return number + 'வது'; + }, + preparse: function (string) { + return string.replace(/[௧௨௩௪௫௬௭௮௯௦]/g, function (match) { + return numberMap$e[match]; + }); + }, + postformat: function (string) { + return string.replace(/\d/g, function (match) { + return symbolMap$f[match]; + }); + }, + // refer http://ta.wikipedia.org/s/1er1 + meridiemParse: /யாமம்|வைகறை|காலை|நண்பகல்|எற்பாடு|மாலை/, + meridiem: function (hour, minute, isLower) { + if (hour < 2) { + return ' யாமம்'; + } else if (hour < 6) { + return ' வைகறை'; // வைகறை + } else if (hour < 10) { + return ' காலை'; // காலை + } else if (hour < 14) { + return ' நண்பகல்'; // நண்பகல் + } else if (hour < 18) { + return ' எற்பாடு'; // எற்பாடு + } else if (hour < 22) { + return ' மாலை'; // மாலை + } else { + return ' யாமம்'; + } + }, + meridiemHour: function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === 'யாமம்') { + return hour < 2 ? hour : hour + 12; + } else if (meridiem === 'வைகறை' || meridiem === 'காலை') { + return hour; + } else if (meridiem === 'நண்பகல்') { + return hour >= 10 ? hour : hour + 12; + } else { + return hour + 12; + } + }, + week: { + dow: 0, // Sunday is the first day of the week. + doy: 6, // The week that contains Jan 6th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + moment.defineLocale('te', { + months: 'జనవరి_ఫిబ్రవరి_మార్చి_ఏప్రిల్_మే_జూన్_జులై_ఆగస్టు_సెప్టెంబర్_అక్టోబర్_నవంబర్_డిసెంబర్'.split( + '_' + ), + monthsShort: 'జన._ఫిబ్ర._మార్చి_ఏప్రి._మే_జూన్_జులై_ఆగ._సెప్._అక్టో._నవ._డిసె.'.split( + '_' + ), + monthsParseExact: true, + weekdays: 'ఆదివారం_సోమవారం_మంగళవారం_బుధవారం_గురువారం_శుక్రవారం_శనివారం'.split( + '_' + ), + weekdaysShort: 'ఆది_సోమ_మంగళ_బుధ_గురు_శుక్ర_శని'.split('_'), + weekdaysMin: 'ఆ_సో_మం_బు_గు_శు_శ'.split('_'), + longDateFormat: { + LT: 'A h:mm', + LTS: 'A h:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY, A h:mm', + LLLL: 'dddd, D MMMM YYYY, A h:mm', + }, + calendar: { + sameDay: '[నేడు] LT', + nextDay: '[రేపు] LT', + nextWeek: 'dddd, LT', + lastDay: '[నిన్న] LT', + lastWeek: '[గత] dddd, LT', + sameElse: 'L', + }, + relativeTime: { + future: '%s లో', + past: '%s క్రితం', + s: 'కొన్ని క్షణాలు', + ss: '%d సెకన్లు', + m: 'ఒక నిమిషం', + mm: '%d నిమిషాలు', + h: 'ఒక గంట', + hh: '%d గంటలు', + d: 'ఒక రోజు', + dd: '%d రోజులు', + M: 'ఒక నెల', + MM: '%d నెలలు', + y: 'ఒక సంవత్సరం', + yy: '%d సంవత్సరాలు', + }, + dayOfMonthOrdinalParse: /\d{1,2}వ/, + ordinal: '%dవ', + meridiemParse: /రాత్రి|ఉదయం|మధ్యాహ్నం|సాయంత్రం/, + meridiemHour: function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === 'రాత్రి') { + return hour < 4 ? hour : hour + 12; + } else if (meridiem === 'ఉదయం') { + return hour; + } else if (meridiem === 'మధ్యాహ్నం') { + return hour >= 10 ? hour : hour + 12; + } else if (meridiem === 'సాయంత్రం') { + return hour + 12; + } + }, + meridiem: function (hour, minute, isLower) { + if (hour < 4) { + return 'రాత్రి'; + } else if (hour < 10) { + return 'ఉదయం'; + } else if (hour < 17) { + return 'మధ్యాహ్నం'; + } else if (hour < 20) { + return 'సాయంత్రం'; + } else { + return 'రాత్రి'; + } + }, + week: { + dow: 0, // Sunday is the first day of the week. + doy: 6, // The week that contains Jan 6th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + moment.defineLocale('tet', { + months: 'Janeiru_Fevereiru_Marsu_Abril_Maiu_Juñu_Jullu_Agustu_Setembru_Outubru_Novembru_Dezembru'.split( + '_' + ), + monthsShort: 'Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez'.split('_'), + weekdays: 'Domingu_Segunda_Tersa_Kuarta_Kinta_Sesta_Sabadu'.split('_'), + weekdaysShort: 'Dom_Seg_Ters_Kua_Kint_Sest_Sab'.split('_'), + weekdaysMin: 'Do_Seg_Te_Ku_Ki_Ses_Sa'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[Ohin iha] LT', + nextDay: '[Aban iha] LT', + nextWeek: 'dddd [iha] LT', + lastDay: '[Horiseik iha] LT', + lastWeek: 'dddd [semana kotuk] [iha] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'iha %s', + past: '%s liuba', + s: 'segundu balun', + ss: 'segundu %d', + m: 'minutu ida', + mm: 'minutu %d', + h: 'oras ida', + hh: 'oras %d', + d: 'loron ida', + dd: 'loron %d', + M: 'fulan ida', + MM: 'fulan %d', + y: 'tinan ida', + yy: 'tinan %d', + }, + dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/, + ordinal: function (number) { + var b = number % 10, + output = + ~~((number % 100) / 10) === 1 + ? 'th' + : b === 1 + ? 'st' + : b === 2 + ? 'nd' + : b === 3 + ? 'rd' + : 'th'; + return number + output; + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var suffixes$3 = { + 0: '-ум', + 1: '-ум', + 2: '-юм', + 3: '-юм', + 4: '-ум', + 5: '-ум', + 6: '-ум', + 7: '-ум', + 8: '-ум', + 9: '-ум', + 10: '-ум', + 12: '-ум', + 13: '-ум', + 20: '-ум', + 30: '-юм', + 40: '-ум', + 50: '-ум', + 60: '-ум', + 70: '-ум', + 80: '-ум', + 90: '-ум', + 100: '-ум', + }; + + moment.defineLocale('tg', { + months: 'январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр'.split( + '_' + ), + monthsShort: 'янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек'.split('_'), + weekdays: 'якшанбе_душанбе_сешанбе_чоршанбе_панҷшанбе_ҷумъа_шанбе'.split( + '_' + ), + weekdaysShort: 'яшб_дшб_сшб_чшб_пшб_ҷум_шнб'.split('_'), + weekdaysMin: 'яш_дш_сш_чш_пш_ҷм_шб'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[Имрӯз соати] LT', + nextDay: '[Пагоҳ соати] LT', + lastDay: '[Дирӯз соати] LT', + nextWeek: 'dddd[и] [ҳафтаи оянда соати] LT', + lastWeek: 'dddd[и] [ҳафтаи гузашта соати] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'баъди %s', + past: '%s пеш', + s: 'якчанд сония', + m: 'як дақиқа', + mm: '%d дақиқа', + h: 'як соат', + hh: '%d соат', + d: 'як рӯз', + dd: '%d рӯз', + M: 'як моҳ', + MM: '%d моҳ', + y: 'як сол', + yy: '%d сол', + }, + meridiemParse: /шаб|субҳ|рӯз|бегоҳ/, + meridiemHour: function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === 'шаб') { + return hour < 4 ? hour : hour + 12; + } else if (meridiem === 'субҳ') { + return hour; + } else if (meridiem === 'рӯз') { + return hour >= 11 ? hour : hour + 12; + } else if (meridiem === 'бегоҳ') { + return hour + 12; + } + }, + meridiem: function (hour, minute, isLower) { + if (hour < 4) { + return 'шаб'; + } else if (hour < 11) { + return 'субҳ'; + } else if (hour < 16) { + return 'рӯз'; + } else if (hour < 19) { + return 'бегоҳ'; + } else { + return 'шаб'; + } + }, + dayOfMonthOrdinalParse: /\d{1,2}-(ум|юм)/, + ordinal: function (number) { + var a = number % 10, + b = number >= 100 ? 100 : null; + return number + (suffixes$3[number] || suffixes$3[a] || suffixes$3[b]); + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 7, // The week that contains Jan 1th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + moment.defineLocale('th', { + months: 'มกราคม_กุมภาพันธ์_มีนาคม_เมษายน_พฤษภาคม_มิถุนายน_กรกฎาคม_สิงหาคม_กันยายน_ตุลาคม_พฤศจิกายน_ธันวาคม'.split( + '_' + ), + monthsShort: 'ม.ค._ก.พ._มี.ค._เม.ย._พ.ค._มิ.ย._ก.ค._ส.ค._ก.ย._ต.ค._พ.ย._ธ.ค.'.split( + '_' + ), + monthsParseExact: true, + weekdays: 'อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัสบดี_ศุกร์_เสาร์'.split('_'), + weekdaysShort: 'อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัส_ศุกร์_เสาร์'.split('_'), // yes, three characters difference + weekdaysMin: 'อา._จ._อ._พ._พฤ._ศ._ส.'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'H:mm', + LTS: 'H:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY เวลา H:mm', + LLLL: 'วันddddที่ D MMMM YYYY เวลา H:mm', + }, + meridiemParse: /ก่อนเที่ยง|หลังเที่ยง/, + isPM: function (input) { + return input === 'หลังเที่ยง'; + }, + meridiem: function (hour, minute, isLower) { + if (hour < 12) { + return 'ก่อนเที่ยง'; + } else { + return 'หลังเที่ยง'; + } + }, + calendar: { + sameDay: '[วันนี้ เวลา] LT', + nextDay: '[พรุ่งนี้ เวลา] LT', + nextWeek: 'dddd[หน้า เวลา] LT', + lastDay: '[เมื่อวานนี้ เวลา] LT', + lastWeek: '[วัน]dddd[ที่แล้ว เวลา] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'อีก %s', + past: '%sที่แล้ว', + s: 'ไม่กี่วินาที', + ss: '%d วินาที', + m: '1 นาที', + mm: '%d นาที', + h: '1 ชั่วโมง', + hh: '%d ชั่วโมง', + d: '1 วัน', + dd: '%d วัน', + M: '1 เดือน', + MM: '%d เดือน', + y: '1 ปี', + yy: '%d ปี', + }, + }); + + //! moment.js locale configuration + + var suffixes$4 = { + 1: "'inji", + 5: "'inji", + 8: "'inji", + 70: "'inji", + 80: "'inji", + 2: "'nji", + 7: "'nji", + 20: "'nji", + 50: "'nji", + 3: "'ünji", + 4: "'ünji", + 100: "'ünji", + 6: "'njy", + 9: "'unjy", + 10: "'unjy", + 30: "'unjy", + 60: "'ynjy", + 90: "'ynjy", + }; + + moment.defineLocale('tk', { + months: 'Ýanwar_Fewral_Mart_Aprel_Maý_Iýun_Iýul_Awgust_Sentýabr_Oktýabr_Noýabr_Dekabr'.split( + '_' + ), + monthsShort: 'Ýan_Few_Mar_Apr_Maý_Iýn_Iýl_Awg_Sen_Okt_Noý_Dek'.split('_'), + weekdays: 'Ýekşenbe_Duşenbe_Sişenbe_Çarşenbe_Penşenbe_Anna_Şenbe'.split( + '_' + ), + weekdaysShort: 'Ýek_Duş_Siş_Çar_Pen_Ann_Şen'.split('_'), + weekdaysMin: 'Ýk_Dş_Sş_Çr_Pn_An_Şn'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[bugün sagat] LT', + nextDay: '[ertir sagat] LT', + nextWeek: '[indiki] dddd [sagat] LT', + lastDay: '[düýn] LT', + lastWeek: '[geçen] dddd [sagat] LT', + sameElse: 'L', + }, + relativeTime: { + future: '%s soň', + past: '%s öň', + s: 'birnäçe sekunt', + m: 'bir minut', + mm: '%d minut', + h: 'bir sagat', + hh: '%d sagat', + d: 'bir gün', + dd: '%d gün', + M: 'bir aý', + MM: '%d aý', + y: 'bir ýyl', + yy: '%d ýyl', + }, + ordinal: function (number, period) { + switch (period) { + case 'd': + case 'D': + case 'Do': + case 'DD': + return number; + default: + if (number === 0) { + // special case for zero + return number + "'unjy"; + } + var a = number % 10, + b = (number % 100) - a, + c = number >= 100 ? 100 : null; + return number + (suffixes$4[a] || suffixes$4[b] || suffixes$4[c]); + } + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 7, // The week that contains Jan 7th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + moment.defineLocale('tl-ph', { + months: 'Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre'.split( + '_' + ), + monthsShort: 'Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis'.split('_'), + weekdays: 'Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado'.split( + '_' + ), + weekdaysShort: 'Lin_Lun_Mar_Miy_Huw_Biy_Sab'.split('_'), + weekdaysMin: 'Li_Lu_Ma_Mi_Hu_Bi_Sab'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'MM/D/YYYY', + LL: 'MMMM D, YYYY', + LLL: 'MMMM D, YYYY HH:mm', + LLLL: 'dddd, MMMM DD, YYYY HH:mm', + }, + calendar: { + sameDay: 'LT [ngayong araw]', + nextDay: '[Bukas ng] LT', + nextWeek: 'LT [sa susunod na] dddd', + lastDay: 'LT [kahapon]', + lastWeek: 'LT [noong nakaraang] dddd', + sameElse: 'L', + }, + relativeTime: { + future: 'sa loob ng %s', + past: '%s ang nakalipas', + s: 'ilang segundo', + ss: '%d segundo', + m: 'isang minuto', + mm: '%d minuto', + h: 'isang oras', + hh: '%d oras', + d: 'isang araw', + dd: '%d araw', + M: 'isang buwan', + MM: '%d buwan', + y: 'isang taon', + yy: '%d taon', + }, + dayOfMonthOrdinalParse: /\d{1,2}/, + ordinal: function (number) { + return number; + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var numbersNouns = 'pagh_wa’_cha’_wej_loS_vagh_jav_Soch_chorgh_Hut'.split('_'); + + function translateFuture(output) { + var time = output; + time = + output.indexOf('jaj') !== -1 + ? time.slice(0, -3) + 'leS' + : output.indexOf('jar') !== -1 + ? time.slice(0, -3) + 'waQ' + : output.indexOf('DIS') !== -1 + ? time.slice(0, -3) + 'nem' + : time + ' pIq'; + return time; + } + + function translatePast(output) { + var time = output; + time = + output.indexOf('jaj') !== -1 + ? time.slice(0, -3) + 'Hu’' + : output.indexOf('jar') !== -1 + ? time.slice(0, -3) + 'wen' + : output.indexOf('DIS') !== -1 + ? time.slice(0, -3) + 'ben' + : time + ' ret'; + return time; + } + + function translate$a(number, withoutSuffix, string, isFuture) { + var numberNoun = numberAsNoun(number); + switch (string) { + case 'ss': + return numberNoun + ' lup'; + case 'mm': + return numberNoun + ' tup'; + case 'hh': + return numberNoun + ' rep'; + case 'dd': + return numberNoun + ' jaj'; + case 'MM': + return numberNoun + ' jar'; + case 'yy': + return numberNoun + ' DIS'; + } + } + + function numberAsNoun(number) { + var hundred = Math.floor((number % 1000) / 100), + ten = Math.floor((number % 100) / 10), + one = number % 10, + word = ''; + if (hundred > 0) { + word += numbersNouns[hundred] + 'vatlh'; + } + if (ten > 0) { + word += (word !== '' ? ' ' : '') + numbersNouns[ten] + 'maH'; + } + if (one > 0) { + word += (word !== '' ? ' ' : '') + numbersNouns[one]; + } + return word === '' ? 'pagh' : word; + } + + moment.defineLocale('tlh', { + months: 'tera’ jar wa’_tera’ jar cha’_tera’ jar wej_tera’ jar loS_tera’ jar vagh_tera’ jar jav_tera’ jar Soch_tera’ jar chorgh_tera’ jar Hut_tera’ jar wa’maH_tera’ jar wa’maH wa’_tera’ jar wa’maH cha’'.split( + '_' + ), + monthsShort: 'jar wa’_jar cha’_jar wej_jar loS_jar vagh_jar jav_jar Soch_jar chorgh_jar Hut_jar wa’maH_jar wa’maH wa’_jar wa’maH cha’'.split( + '_' + ), + monthsParseExact: true, + weekdays: 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split( + '_' + ), + weekdaysShort: 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split( + '_' + ), + weekdaysMin: 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split( + '_' + ), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[DaHjaj] LT', + nextDay: '[wa’leS] LT', + nextWeek: 'LLL', + lastDay: '[wa’Hu’] LT', + lastWeek: 'LLL', + sameElse: 'L', + }, + relativeTime: { + future: translateFuture, + past: translatePast, + s: 'puS lup', + ss: translate$a, + m: 'wa’ tup', + mm: translate$a, + h: 'wa’ rep', + hh: translate$a, + d: 'wa’ jaj', + dd: translate$a, + M: 'wa’ jar', + MM: translate$a, + y: 'wa’ DIS', + yy: translate$a, + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal: '%d.', + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var suffixes$5 = { + 1: "'inci", + 5: "'inci", + 8: "'inci", + 70: "'inci", + 80: "'inci", + 2: "'nci", + 7: "'nci", + 20: "'nci", + 50: "'nci", + 3: "'üncü", + 4: "'üncü", + 100: "'üncü", + 6: "'ncı", + 9: "'uncu", + 10: "'uncu", + 30: "'uncu", + 60: "'ıncı", + 90: "'ıncı", + }; + + moment.defineLocale('tr', { + months: 'Ocak_Şubat_Mart_Nisan_Mayıs_Haziran_Temmuz_Ağustos_Eylül_Ekim_Kasım_Aralık'.split( + '_' + ), + monthsShort: 'Oca_Şub_Mar_Nis_May_Haz_Tem_Ağu_Eyl_Eki_Kas_Ara'.split('_'), + weekdays: 'Pazar_Pazartesi_Salı_Çarşamba_Perşembe_Cuma_Cumartesi'.split( + '_' + ), + weekdaysShort: 'Paz_Pts_Sal_Çar_Per_Cum_Cts'.split('_'), + weekdaysMin: 'Pz_Pt_Sa_Ça_Pe_Cu_Ct'.split('_'), + meridiem: function (hours, minutes, isLower) { + if (hours < 12) { + return isLower ? 'öö' : 'ÖÖ'; + } else { + return isLower ? 'ös' : 'ÖS'; + } + }, + meridiemParse: /öö|ÖÖ|ös|ÖS/, + isPM: function (input) { + return input === 'ös' || input === 'ÖS'; + }, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[bugün saat] LT', + nextDay: '[yarın saat] LT', + nextWeek: '[gelecek] dddd [saat] LT', + lastDay: '[dün] LT', + lastWeek: '[geçen] dddd [saat] LT', + sameElse: 'L', + }, + relativeTime: { + future: '%s sonra', + past: '%s önce', + s: 'birkaç saniye', + ss: '%d saniye', + m: 'bir dakika', + mm: '%d dakika', + h: 'bir saat', + hh: '%d saat', + d: 'bir gün', + dd: '%d gün', + M: 'bir ay', + MM: '%d ay', + y: 'bir yıl', + yy: '%d yıl', + }, + ordinal: function (number, period) { + switch (period) { + case 'd': + case 'D': + case 'Do': + case 'DD': + return number; + default: + if (number === 0) { + // special case for zero + return number + "'ıncı"; + } + var a = number % 10, + b = (number % 100) - a, + c = number >= 100 ? 100 : null; + return number + (suffixes$5[a] || suffixes$5[b] || suffixes$5[c]); + } + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 7, // The week that contains Jan 7th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + // After the year there should be a slash and the amount of years since December 26, 1979 in Roman numerals. + // This is currently too difficult (maybe even impossible) to add. + moment.defineLocale('tzl', { + months: 'Januar_Fevraglh_Març_Avrïu_Mai_Gün_Julia_Guscht_Setemvar_Listopäts_Noemvar_Zecemvar'.split( + '_' + ), + monthsShort: 'Jan_Fev_Mar_Avr_Mai_Gün_Jul_Gus_Set_Lis_Noe_Zec'.split('_'), + weekdays: 'Súladi_Lúneçi_Maitzi_Márcuri_Xhúadi_Viénerçi_Sáturi'.split('_'), + weekdaysShort: 'Súl_Lún_Mai_Már_Xhú_Vié_Sát'.split('_'), + weekdaysMin: 'Sú_Lú_Ma_Má_Xh_Vi_Sá'.split('_'), + longDateFormat: { + LT: 'HH.mm', + LTS: 'HH.mm.ss', + L: 'DD.MM.YYYY', + LL: 'D. MMMM [dallas] YYYY', + LLL: 'D. MMMM [dallas] YYYY HH.mm', + LLLL: 'dddd, [li] D. MMMM [dallas] YYYY HH.mm', + }, + meridiemParse: /d\'o|d\'a/i, + isPM: function (input) { + return "d'o" === input.toLowerCase(); + }, + meridiem: function (hours, minutes, isLower) { + if (hours > 11) { + return isLower ? "d'o" : "D'O"; + } else { + return isLower ? "d'a" : "D'A"; + } + }, + calendar: { + sameDay: '[oxhi à] LT', + nextDay: '[demà à] LT', + nextWeek: 'dddd [à] LT', + lastDay: '[ieiri à] LT', + lastWeek: '[sür el] dddd [lasteu à] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'osprei %s', + past: 'ja%s', + s: processRelativeTime$8, + ss: processRelativeTime$8, + m: processRelativeTime$8, + mm: processRelativeTime$8, + h: processRelativeTime$8, + hh: processRelativeTime$8, + d: processRelativeTime$8, + dd: processRelativeTime$8, + M: processRelativeTime$8, + MM: processRelativeTime$8, + y: processRelativeTime$8, + yy: processRelativeTime$8, + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal: '%d.', + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + function processRelativeTime$8(number, withoutSuffix, key, isFuture) { + var format = { + s: ['viensas secunds', "'iensas secunds"], + ss: [number + ' secunds', '' + number + ' secunds'], + m: ["'n míut", "'iens míut"], + mm: [number + ' míuts', '' + number + ' míuts'], + h: ["'n þora", "'iensa þora"], + hh: [number + ' þoras', '' + number + ' þoras'], + d: ["'n ziua", "'iensa ziua"], + dd: [number + ' ziuas', '' + number + ' ziuas'], + M: ["'n mes", "'iens mes"], + MM: [number + ' mesen', '' + number + ' mesen'], + y: ["'n ar", "'iens ar"], + yy: [number + ' ars', '' + number + ' ars'], + }; + return isFuture + ? format[key][0] + : withoutSuffix + ? format[key][0] + : format[key][1]; + } + + //! moment.js locale configuration + + moment.defineLocale('tzm-latn', { + months: 'innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir'.split( + '_' + ), + monthsShort: 'innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir'.split( + '_' + ), + weekdays: 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'), + weekdaysShort: 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'), + weekdaysMin: 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[asdkh g] LT', + nextDay: '[aska g] LT', + nextWeek: 'dddd [g] LT', + lastDay: '[assant g] LT', + lastWeek: 'dddd [g] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'dadkh s yan %s', + past: 'yan %s', + s: 'imik', + ss: '%d imik', + m: 'minuḍ', + mm: '%d minuḍ', + h: 'saɛa', + hh: '%d tassaɛin', + d: 'ass', + dd: '%d ossan', + M: 'ayowr', + MM: '%d iyyirn', + y: 'asgas', + yy: '%d isgasn', + }, + week: { + dow: 6, // Saturday is the first day of the week. + doy: 12, // The week that contains Jan 12th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + moment.defineLocale('tzm', { + months: 'ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ'.split( + '_' + ), + monthsShort: 'ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ'.split( + '_' + ), + weekdays: 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'), + weekdaysShort: 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'), + weekdaysMin: 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[ⴰⵙⴷⵅ ⴴ] LT', + nextDay: '[ⴰⵙⴽⴰ ⴴ] LT', + nextWeek: 'dddd [ⴴ] LT', + lastDay: '[ⴰⵚⴰⵏⵜ ⴴ] LT', + lastWeek: 'dddd [ⴴ] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'ⴷⴰⴷⵅ ⵙ ⵢⴰⵏ %s', + past: 'ⵢⴰⵏ %s', + s: 'ⵉⵎⵉⴽ', + ss: '%d ⵉⵎⵉⴽ', + m: 'ⵎⵉⵏⵓⴺ', + mm: '%d ⵎⵉⵏⵓⴺ', + h: 'ⵙⴰⵄⴰ', + hh: '%d ⵜⴰⵙⵙⴰⵄⵉⵏ', + d: 'ⴰⵙⵙ', + dd: '%d oⵙⵙⴰⵏ', + M: 'ⴰⵢoⵓⵔ', + MM: '%d ⵉⵢⵢⵉⵔⵏ', + y: 'ⴰⵙⴳⴰⵙ', + yy: '%d ⵉⵙⴳⴰⵙⵏ', + }, + week: { + dow: 6, // Saturday is the first day of the week. + doy: 12, // The week that contains Jan 12th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + moment.defineLocale('ug-cn', { + months: 'يانۋار_فېۋرال_مارت_ئاپرېل_ماي_ئىيۇن_ئىيۇل_ئاۋغۇست_سېنتەبىر_ئۆكتەبىر_نويابىر_دېكابىر'.split( + '_' + ), + monthsShort: 'يانۋار_فېۋرال_مارت_ئاپرېل_ماي_ئىيۇن_ئىيۇل_ئاۋغۇست_سېنتەبىر_ئۆكتەبىر_نويابىر_دېكابىر'.split( + '_' + ), + weekdays: 'يەكشەنبە_دۈشەنبە_سەيشەنبە_چارشەنبە_پەيشەنبە_جۈمە_شەنبە'.split( + '_' + ), + weekdaysShort: 'يە_دۈ_سە_چا_پە_جۈ_شە'.split('_'), + weekdaysMin: 'يە_دۈ_سە_چا_پە_جۈ_شە'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'YYYY-MM-DD', + LL: 'YYYY-يىلىM-ئاينىڭD-كۈنى', + LLL: 'YYYY-يىلىM-ئاينىڭD-كۈنى، HH:mm', + LLLL: 'dddd، YYYY-يىلىM-ئاينىڭD-كۈنى، HH:mm', + }, + meridiemParse: /يېرىم كېچە|سەھەر|چۈشتىن بۇرۇن|چۈش|چۈشتىن كېيىن|كەچ/, + meridiemHour: function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if ( + meridiem === 'يېرىم كېچە' || + meridiem === 'سەھەر' || + meridiem === 'چۈشتىن بۇرۇن' + ) { + return hour; + } else if (meridiem === 'چۈشتىن كېيىن' || meridiem === 'كەچ') { + return hour + 12; + } else { + return hour >= 11 ? hour : hour + 12; + } + }, + meridiem: function (hour, minute, isLower) { + var hm = hour * 100 + minute; + if (hm < 600) { + return 'يېرىم كېچە'; + } else if (hm < 900) { + return 'سەھەر'; + } else if (hm < 1130) { + return 'چۈشتىن بۇرۇن'; + } else if (hm < 1230) { + return 'چۈش'; + } else if (hm < 1800) { + return 'چۈشتىن كېيىن'; + } else { + return 'كەچ'; + } + }, + calendar: { + sameDay: '[بۈگۈن سائەت] LT', + nextDay: '[ئەتە سائەت] LT', + nextWeek: '[كېلەركى] dddd [سائەت] LT', + lastDay: '[تۆنۈگۈن] LT', + lastWeek: '[ئالدىنقى] dddd [سائەت] LT', + sameElse: 'L', + }, + relativeTime: { + future: '%s كېيىن', + past: '%s بۇرۇن', + s: 'نەچچە سېكونت', + ss: '%d سېكونت', + m: 'بىر مىنۇت', + mm: '%d مىنۇت', + h: 'بىر سائەت', + hh: '%d سائەت', + d: 'بىر كۈن', + dd: '%d كۈن', + M: 'بىر ئاي', + MM: '%d ئاي', + y: 'بىر يىل', + yy: '%d يىل', + }, + + dayOfMonthOrdinalParse: /\d{1,2}(-كۈنى|-ئاي|-ھەپتە)/, + ordinal: function (number, period) { + switch (period) { + case 'd': + case 'D': + case 'DDD': + return number + '-كۈنى'; + case 'w': + case 'W': + return number + '-ھەپتە'; + default: + return number; + } + }, + preparse: function (string) { + return string.replace(/،/g, ','); + }, + postformat: function (string) { + return string.replace(/,/g, '،'); + }, + week: { + // GB/T 7408-1994《数据元和交换格式·信息交换·日期和时间表示法》与ISO 8601:1988等效 + dow: 1, // Monday is the first day of the week. + doy: 7, // The week that contains Jan 1st is the first week of the year. + }, + }); + + //! moment.js locale configuration + + function plural$6(word, num) { + var forms = word.split('_'); + return num % 10 === 1 && num % 100 !== 11 + ? forms[0] + : num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20) + ? forms[1] + : forms[2]; + } + function relativeTimeWithPlural$4(number, withoutSuffix, key) { + var format = { + ss: withoutSuffix ? 'секунда_секунди_секунд' : 'секунду_секунди_секунд', + mm: withoutSuffix ? 'хвилина_хвилини_хвилин' : 'хвилину_хвилини_хвилин', + hh: withoutSuffix ? 'година_години_годин' : 'годину_години_годин', + dd: 'день_дні_днів', + MM: 'місяць_місяці_місяців', + yy: 'рік_роки_років', + }; + if (key === 'm') { + return withoutSuffix ? 'хвилина' : 'хвилину'; + } else if (key === 'h') { + return withoutSuffix ? 'година' : 'годину'; + } else { + return number + ' ' + plural$6(format[key], +number); + } + } + function weekdaysCaseReplace(m, format) { + var weekdays = { + nominative: 'неділя_понеділок_вівторок_середа_четвер_п’ятниця_субота'.split( + '_' + ), + accusative: 'неділю_понеділок_вівторок_середу_четвер_п’ятницю_суботу'.split( + '_' + ), + genitive: 'неділі_понеділка_вівторка_середи_четверга_п’ятниці_суботи'.split( + '_' + ), + }, + nounCase; + + if (m === true) { + return weekdays['nominative'] + .slice(1, 7) + .concat(weekdays['nominative'].slice(0, 1)); + } + if (!m) { + return weekdays['nominative']; + } + + nounCase = /(\[[ВвУу]\]) ?dddd/.test(format) + ? 'accusative' + : /\[?(?:минулої|наступної)? ?\] ?dddd/.test(format) + ? 'genitive' + : 'nominative'; + return weekdays[nounCase][m.day()]; + } + function processHoursFunction(str) { + return function () { + return str + 'о' + (this.hours() === 11 ? 'б' : '') + '] LT'; + }; + } + + moment.defineLocale('uk', { + months: { + format: 'січня_лютого_березня_квітня_травня_червня_липня_серпня_вересня_жовтня_листопада_грудня'.split( + '_' + ), + standalone: 'січень_лютий_березень_квітень_травень_червень_липень_серпень_вересень_жовтень_листопад_грудень'.split( + '_' + ), + }, + monthsShort: 'січ_лют_бер_квіт_трав_черв_лип_серп_вер_жовт_лист_груд'.split( + '_' + ), + weekdays: weekdaysCaseReplace, + weekdaysShort: 'нд_пн_вт_ср_чт_пт_сб'.split('_'), + weekdaysMin: 'нд_пн_вт_ср_чт_пт_сб'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D MMMM YYYY р.', + LLL: 'D MMMM YYYY р., HH:mm', + LLLL: 'dddd, D MMMM YYYY р., HH:mm', + }, + calendar: { + sameDay: processHoursFunction('[Сьогодні '), + nextDay: processHoursFunction('[Завтра '), + lastDay: processHoursFunction('[Вчора '), + nextWeek: processHoursFunction('[У] dddd ['), + lastWeek: function () { + switch (this.day()) { + case 0: + case 3: + case 5: + case 6: + return processHoursFunction('[Минулої] dddd [').call(this); + case 1: + case 2: + case 4: + return processHoursFunction('[Минулого] dddd [').call(this); + } + }, + sameElse: 'L', + }, + relativeTime: { + future: 'за %s', + past: '%s тому', + s: 'декілька секунд', + ss: relativeTimeWithPlural$4, + m: relativeTimeWithPlural$4, + mm: relativeTimeWithPlural$4, + h: 'годину', + hh: relativeTimeWithPlural$4, + d: 'день', + dd: relativeTimeWithPlural$4, + M: 'місяць', + MM: relativeTimeWithPlural$4, + y: 'рік', + yy: relativeTimeWithPlural$4, + }, + // M. E.: those two are virtually unused but a user might want to implement them for his/her website for some reason + meridiemParse: /ночі|ранку|дня|вечора/, + isPM: function (input) { + return /^(дня|вечора)$/.test(input); + }, + meridiem: function (hour, minute, isLower) { + if (hour < 4) { + return 'ночі'; + } else if (hour < 12) { + return 'ранку'; + } else if (hour < 17) { + return 'дня'; + } else { + return 'вечора'; + } + }, + dayOfMonthOrdinalParse: /\d{1,2}-(й|го)/, + ordinal: function (number, period) { + switch (period) { + case 'M': + case 'd': + case 'DDD': + case 'w': + case 'W': + return number + '-й'; + case 'D': + return number + '-го'; + default: + return number; + } + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 7, // The week that contains Jan 7th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var months$a = [ + 'جنوری', + 'فروری', + 'مارچ', + 'اپریل', + 'مئی', + 'جون', + 'جولائی', + 'اگست', + 'ستمبر', + 'اکتوبر', + 'نومبر', + 'دسمبر', + ], + days$1 = ['اتوار', 'پیر', 'منگل', 'بدھ', 'جمعرات', 'جمعہ', 'ہفتہ']; + + moment.defineLocale('ur', { + months: months$a, + monthsShort: months$a, + weekdays: days$1, + weekdaysShort: days$1, + weekdaysMin: days$1, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd، D MMMM YYYY HH:mm', + }, + meridiemParse: /صبح|شام/, + isPM: function (input) { + return 'شام' === input; + }, + meridiem: function (hour, minute, isLower) { + if (hour < 12) { + return 'صبح'; + } + return 'شام'; + }, + calendar: { + sameDay: '[آج بوقت] LT', + nextDay: '[کل بوقت] LT', + nextWeek: 'dddd [بوقت] LT', + lastDay: '[گذشتہ روز بوقت] LT', + lastWeek: '[گذشتہ] dddd [بوقت] LT', + sameElse: 'L', + }, + relativeTime: { + future: '%s بعد', + past: '%s قبل', + s: 'چند سیکنڈ', + ss: '%d سیکنڈ', + m: 'ایک منٹ', + mm: '%d منٹ', + h: 'ایک گھنٹہ', + hh: '%d گھنٹے', + d: 'ایک دن', + dd: '%d دن', + M: 'ایک ماہ', + MM: '%d ماہ', + y: 'ایک سال', + yy: '%d سال', + }, + preparse: function (string) { + return string.replace(/،/g, ','); + }, + postformat: function (string) { + return string.replace(/,/g, '،'); + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + moment.defineLocale('uz-latn', { + months: 'Yanvar_Fevral_Mart_Aprel_May_Iyun_Iyul_Avgust_Sentabr_Oktabr_Noyabr_Dekabr'.split( + '_' + ), + monthsShort: 'Yan_Fev_Mar_Apr_May_Iyun_Iyul_Avg_Sen_Okt_Noy_Dek'.split('_'), + weekdays: 'Yakshanba_Dushanba_Seshanba_Chorshanba_Payshanba_Juma_Shanba'.split( + '_' + ), + weekdaysShort: 'Yak_Dush_Sesh_Chor_Pay_Jum_Shan'.split('_'), + weekdaysMin: 'Ya_Du_Se_Cho_Pa_Ju_Sha'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'D MMMM YYYY, dddd HH:mm', + }, + calendar: { + sameDay: '[Bugun soat] LT [da]', + nextDay: '[Ertaga] LT [da]', + nextWeek: 'dddd [kuni soat] LT [da]', + lastDay: '[Kecha soat] LT [da]', + lastWeek: "[O'tgan] dddd [kuni soat] LT [da]", + sameElse: 'L', + }, + relativeTime: { + future: 'Yaqin %s ichida', + past: 'Bir necha %s oldin', + s: 'soniya', + ss: '%d soniya', + m: 'bir daqiqa', + mm: '%d daqiqa', + h: 'bir soat', + hh: '%d soat', + d: 'bir kun', + dd: '%d kun', + M: 'bir oy', + MM: '%d oy', + y: 'bir yil', + yy: '%d yil', + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 7, // The week that contains Jan 7th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + moment.defineLocale('uz', { + months: 'январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр'.split( + '_' + ), + monthsShort: 'янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек'.split('_'), + weekdays: 'Якшанба_Душанба_Сешанба_Чоршанба_Пайшанба_Жума_Шанба'.split('_'), + weekdaysShort: 'Якш_Душ_Сеш_Чор_Пай_Жум_Шан'.split('_'), + weekdaysMin: 'Як_Ду_Се_Чо_Па_Жу_Ша'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'D MMMM YYYY, dddd HH:mm', + }, + calendar: { + sameDay: '[Бугун соат] LT [да]', + nextDay: '[Эртага] LT [да]', + nextWeek: 'dddd [куни соат] LT [да]', + lastDay: '[Кеча соат] LT [да]', + lastWeek: '[Утган] dddd [куни соат] LT [да]', + sameElse: 'L', + }, + relativeTime: { + future: 'Якин %s ичида', + past: 'Бир неча %s олдин', + s: 'фурсат', + ss: '%d фурсат', + m: 'бир дакика', + mm: '%d дакика', + h: 'бир соат', + hh: '%d соат', + d: 'бир кун', + dd: '%d кун', + M: 'бир ой', + MM: '%d ой', + y: 'бир йил', + yy: '%d йил', + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 7, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + moment.defineLocale('vi', { + months: 'tháng 1_tháng 2_tháng 3_tháng 4_tháng 5_tháng 6_tháng 7_tháng 8_tháng 9_tháng 10_tháng 11_tháng 12'.split( + '_' + ), + monthsShort: 'Thg 01_Thg 02_Thg 03_Thg 04_Thg 05_Thg 06_Thg 07_Thg 08_Thg 09_Thg 10_Thg 11_Thg 12'.split( + '_' + ), + monthsParseExact: true, + weekdays: 'chủ nhật_thứ hai_thứ ba_thứ tư_thứ năm_thứ sáu_thứ bảy'.split( + '_' + ), + weekdaysShort: 'CN_T2_T3_T4_T5_T6_T7'.split('_'), + weekdaysMin: 'CN_T2_T3_T4_T5_T6_T7'.split('_'), + weekdaysParseExact: true, + meridiemParse: /sa|ch/i, + isPM: function (input) { + return /^ch$/i.test(input); + }, + meridiem: function (hours, minutes, isLower) { + if (hours < 12) { + return isLower ? 'sa' : 'SA'; + } else { + return isLower ? 'ch' : 'CH'; + } + }, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM [năm] YYYY', + LLL: 'D MMMM [năm] YYYY HH:mm', + LLLL: 'dddd, D MMMM [năm] YYYY HH:mm', + l: 'DD/M/YYYY', + ll: 'D MMM YYYY', + lll: 'D MMM YYYY HH:mm', + llll: 'ddd, D MMM YYYY HH:mm', + }, + calendar: { + sameDay: '[Hôm nay lúc] LT', + nextDay: '[Ngày mai lúc] LT', + nextWeek: 'dddd [tuần tới lúc] LT', + lastDay: '[Hôm qua lúc] LT', + lastWeek: 'dddd [tuần trước lúc] LT', + sameElse: 'L', + }, + relativeTime: { + future: '%s tới', + past: '%s trước', + s: 'vài giây', + ss: '%d giây', + m: 'một phút', + mm: '%d phút', + h: 'một giờ', + hh: '%d giờ', + d: 'một ngày', + dd: '%d ngày', + M: 'một tháng', + MM: '%d tháng', + y: 'một năm', + yy: '%d năm', + }, + dayOfMonthOrdinalParse: /\d{1,2}/, + ordinal: function (number) { + return number; + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + moment.defineLocale('x-pseudo', { + months: 'J~áñúá~rý_F~ébrú~árý_~Márc~h_Áp~ríl_~Máý_~Júñé~_Júl~ý_Áú~gúst~_Sép~témb~ér_Ó~ctób~ér_Ñ~óvém~bér_~Décé~mbér'.split( + '_' + ), + monthsShort: 'J~áñ_~Féb_~Már_~Ápr_~Máý_~Júñ_~Júl_~Áúg_~Sép_~Óct_~Ñóv_~Déc'.split( + '_' + ), + monthsParseExact: true, + weekdays: 'S~úñdá~ý_Mó~ñdáý~_Túé~sdáý~_Wéd~ñésd~áý_T~húrs~dáý_~Fríd~áý_S~átúr~dáý'.split( + '_' + ), + weekdaysShort: 'S~úñ_~Móñ_~Túé_~Wéd_~Thú_~Frí_~Sát'.split('_'), + weekdaysMin: 'S~ú_Mó~_Tú_~Wé_T~h_Fr~_Sá'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'HH:mm', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[T~ódá~ý át] LT', + nextDay: '[T~ómó~rró~w át] LT', + nextWeek: 'dddd [át] LT', + lastDay: '[Ý~ést~érdá~ý át] LT', + lastWeek: '[L~ást] dddd [át] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'í~ñ %s', + past: '%s á~gó', + s: 'á ~féw ~sécó~ñds', + ss: '%d s~écóñ~ds', + m: 'á ~míñ~úté', + mm: '%d m~íñú~tés', + h: 'á~ñ hó~úr', + hh: '%d h~óúrs', + d: 'á ~dáý', + dd: '%d d~áýs', + M: 'á ~móñ~th', + MM: '%d m~óñt~hs', + y: 'á ~ýéár', + yy: '%d ý~éárs', + }, + dayOfMonthOrdinalParse: /\d{1,2}(th|st|nd|rd)/, + ordinal: function (number) { + var b = number % 10, + output = + ~~((number % 100) / 10) === 1 + ? 'th' + : b === 1 + ? 'st' + : b === 2 + ? 'nd' + : b === 3 + ? 'rd' + : 'th'; + return number + output; + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + moment.defineLocale('yo', { + months: 'Sẹ́rẹ́_Èrèlè_Ẹrẹ̀nà_Ìgbé_Èbibi_Òkùdu_Agẹmo_Ògún_Owewe_Ọ̀wàrà_Bélú_Ọ̀pẹ̀̀'.split( + '_' + ), + monthsShort: 'Sẹ́r_Èrl_Ẹrn_Ìgb_Èbi_Òkù_Agẹ_Ògú_Owe_Ọ̀wà_Bél_Ọ̀pẹ̀̀'.split('_'), + weekdays: 'Àìkú_Ajé_Ìsẹ́gun_Ọjọ́rú_Ọjọ́bọ_Ẹtì_Àbámẹ́ta'.split('_'), + weekdaysShort: 'Àìk_Ajé_Ìsẹ́_Ọjr_Ọjb_Ẹtì_Àbá'.split('_'), + weekdaysMin: 'Àì_Aj_Ìs_Ọr_Ọb_Ẹt_Àb'.split('_'), + longDateFormat: { + LT: 'h:mm A', + LTS: 'h:mm:ss A', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY h:mm A', + LLLL: 'dddd, D MMMM YYYY h:mm A', + }, + calendar: { + sameDay: '[Ònì ni] LT', + nextDay: '[Ọ̀la ni] LT', + nextWeek: "dddd [Ọsẹ̀ tón'bọ] [ni] LT", + lastDay: '[Àna ni] LT', + lastWeek: 'dddd [Ọsẹ̀ tólọ́] [ni] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'ní %s', + past: '%s kọjá', + s: 'ìsẹjú aayá die', + ss: 'aayá %d', + m: 'ìsẹjú kan', + mm: 'ìsẹjú %d', + h: 'wákati kan', + hh: 'wákati %d', + d: 'ọjọ́ kan', + dd: 'ọjọ́ %d', + M: 'osù kan', + MM: 'osù %d', + y: 'ọdún kan', + yy: 'ọdún %d', + }, + dayOfMonthOrdinalParse: /ọjọ́\s\d{1,2}/, + ordinal: 'ọjọ́ %d', + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + moment.defineLocale('zh-cn', { + months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split( + '_' + ), + monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split( + '_' + ), + weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'), + weekdaysShort: '周日_周一_周二_周三_周四_周五_周六'.split('_'), + weekdaysMin: '日_一_二_三_四_五_六'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'YYYY/MM/DD', + LL: 'YYYY年M月D日', + LLL: 'YYYY年M月D日Ah点mm分', + LLLL: 'YYYY年M月D日ddddAh点mm分', + l: 'YYYY/M/D', + ll: 'YYYY年M月D日', + lll: 'YYYY年M月D日 HH:mm', + llll: 'YYYY年M月D日dddd HH:mm', + }, + meridiemParse: /凌晨|早上|上午|中午|下午|晚上/, + meridiemHour: function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') { + return hour; + } else if (meridiem === '下午' || meridiem === '晚上') { + return hour + 12; + } else { + // '中午' + return hour >= 11 ? hour : hour + 12; + } + }, + meridiem: function (hour, minute, isLower) { + var hm = hour * 100 + minute; + if (hm < 600) { + return '凌晨'; + } else if (hm < 900) { + return '早上'; + } else if (hm < 1130) { + return '上午'; + } else if (hm < 1230) { + return '中午'; + } else if (hm < 1800) { + return '下午'; + } else { + return '晚上'; + } + }, + calendar: { + sameDay: '[今天]LT', + nextDay: '[明天]LT', + nextWeek: function (now) { + if (now.week() !== this.week()) { + return '[下]dddLT'; + } else { + return '[本]dddLT'; + } + }, + lastDay: '[昨天]LT', + lastWeek: function (now) { + if (this.week() !== now.week()) { + return '[上]dddLT'; + } else { + return '[本]dddLT'; + } + }, + sameElse: 'L', + }, + dayOfMonthOrdinalParse: /\d{1,2}(日|月|周)/, + ordinal: function (number, period) { + switch (period) { + case 'd': + case 'D': + case 'DDD': + return number + '日'; + case 'M': + return number + '月'; + case 'w': + case 'W': + return number + '周'; + default: + return number; + } + }, + relativeTime: { + future: '%s后', + past: '%s前', + s: '几秒', + ss: '%d 秒', + m: '1 分钟', + mm: '%d 分钟', + h: '1 小时', + hh: '%d 小时', + d: '1 天', + dd: '%d 天', + M: '1 个月', + MM: '%d 个月', + y: '1 年', + yy: '%d 年', + }, + week: { + // GB/T 7408-1994《数据元和交换格式·信息交换·日期和时间表示法》与ISO 8601:1988等效 + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + moment.defineLocale('zh-hk', { + months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split( + '_' + ), + monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split( + '_' + ), + weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'), + weekdaysShort: '週日_週一_週二_週三_週四_週五_週六'.split('_'), + weekdaysMin: '日_一_二_三_四_五_六'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'YYYY/MM/DD', + LL: 'YYYY年M月D日', + LLL: 'YYYY年M月D日 HH:mm', + LLLL: 'YYYY年M月D日dddd HH:mm', + l: 'YYYY/M/D', + ll: 'YYYY年M月D日', + lll: 'YYYY年M月D日 HH:mm', + llll: 'YYYY年M月D日dddd HH:mm', + }, + meridiemParse: /凌晨|早上|上午|中午|下午|晚上/, + meridiemHour: function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') { + return hour; + } else if (meridiem === '中午') { + return hour >= 11 ? hour : hour + 12; + } else if (meridiem === '下午' || meridiem === '晚上') { + return hour + 12; + } + }, + meridiem: function (hour, minute, isLower) { + var hm = hour * 100 + minute; + if (hm < 600) { + return '凌晨'; + } else if (hm < 900) { + return '早上'; + } else if (hm < 1200) { + return '上午'; + } else if (hm === 1200) { + return '中午'; + } else if (hm < 1800) { + return '下午'; + } else { + return '晚上'; + } + }, + calendar: { + sameDay: '[今天]LT', + nextDay: '[明天]LT', + nextWeek: '[下]ddddLT', + lastDay: '[昨天]LT', + lastWeek: '[上]ddddLT', + sameElse: 'L', + }, + dayOfMonthOrdinalParse: /\d{1,2}(日|月|週)/, + ordinal: function (number, period) { + switch (period) { + case 'd': + case 'D': + case 'DDD': + return number + '日'; + case 'M': + return number + '月'; + case 'w': + case 'W': + return number + '週'; + default: + return number; + } + }, + relativeTime: { + future: '%s後', + past: '%s前', + s: '幾秒', + ss: '%d 秒', + m: '1 分鐘', + mm: '%d 分鐘', + h: '1 小時', + hh: '%d 小時', + d: '1 天', + dd: '%d 天', + M: '1 個月', + MM: '%d 個月', + y: '1 年', + yy: '%d 年', + }, + }); + + //! moment.js locale configuration + + moment.defineLocale('zh-mo', { + months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split( + '_' + ), + monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split( + '_' + ), + weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'), + weekdaysShort: '週日_週一_週二_週三_週四_週五_週六'.split('_'), + weekdaysMin: '日_一_二_三_四_五_六'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'YYYY年M月D日', + LLL: 'YYYY年M月D日 HH:mm', + LLLL: 'YYYY年M月D日dddd HH:mm', + l: 'D/M/YYYY', + ll: 'YYYY年M月D日', + lll: 'YYYY年M月D日 HH:mm', + llll: 'YYYY年M月D日dddd HH:mm', + }, + meridiemParse: /凌晨|早上|上午|中午|下午|晚上/, + meridiemHour: function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') { + return hour; + } else if (meridiem === '中午') { + return hour >= 11 ? hour : hour + 12; + } else if (meridiem === '下午' || meridiem === '晚上') { + return hour + 12; + } + }, + meridiem: function (hour, minute, isLower) { + var hm = hour * 100 + minute; + if (hm < 600) { + return '凌晨'; + } else if (hm < 900) { + return '早上'; + } else if (hm < 1130) { + return '上午'; + } else if (hm < 1230) { + return '中午'; + } else if (hm < 1800) { + return '下午'; + } else { + return '晚上'; + } + }, + calendar: { + sameDay: '[今天] LT', + nextDay: '[明天] LT', + nextWeek: '[下]dddd LT', + lastDay: '[昨天] LT', + lastWeek: '[上]dddd LT', + sameElse: 'L', + }, + dayOfMonthOrdinalParse: /\d{1,2}(日|月|週)/, + ordinal: function (number, period) { + switch (period) { + case 'd': + case 'D': + case 'DDD': + return number + '日'; + case 'M': + return number + '月'; + case 'w': + case 'W': + return number + '週'; + default: + return number; + } + }, + relativeTime: { + future: '%s內', + past: '%s前', + s: '幾秒', + ss: '%d 秒', + m: '1 分鐘', + mm: '%d 分鐘', + h: '1 小時', + hh: '%d 小時', + d: '1 天', + dd: '%d 天', + M: '1 個月', + MM: '%d 個月', + y: '1 年', + yy: '%d 年', + }, + }); + + //! moment.js locale configuration + + moment.defineLocale('zh-tw', { + months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split( + '_' + ), + monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split( + '_' + ), + weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'), + weekdaysShort: '週日_週一_週二_週三_週四_週五_週六'.split('_'), + weekdaysMin: '日_一_二_三_四_五_六'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'YYYY/MM/DD', + LL: 'YYYY年M月D日', + LLL: 'YYYY年M月D日 HH:mm', + LLLL: 'YYYY年M月D日dddd HH:mm', + l: 'YYYY/M/D', + ll: 'YYYY年M月D日', + lll: 'YYYY年M月D日 HH:mm', + llll: 'YYYY年M月D日dddd HH:mm', + }, + meridiemParse: /凌晨|早上|上午|中午|下午|晚上/, + meridiemHour: function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') { + return hour; + } else if (meridiem === '中午') { + return hour >= 11 ? hour : hour + 12; + } else if (meridiem === '下午' || meridiem === '晚上') { + return hour + 12; + } + }, + meridiem: function (hour, minute, isLower) { + var hm = hour * 100 + minute; + if (hm < 600) { + return '凌晨'; + } else if (hm < 900) { + return '早上'; + } else if (hm < 1130) { + return '上午'; + } else if (hm < 1230) { + return '中午'; + } else if (hm < 1800) { + return '下午'; + } else { + return '晚上'; + } + }, + calendar: { + sameDay: '[今天] LT', + nextDay: '[明天] LT', + nextWeek: '[下]dddd LT', + lastDay: '[昨天] LT', + lastWeek: '[上]dddd LT', + sameElse: 'L', + }, + dayOfMonthOrdinalParse: /\d{1,2}(日|月|週)/, + ordinal: function (number, period) { + switch (period) { + case 'd': + case 'D': + case 'DDD': + return number + '日'; + case 'M': + return number + '月'; + case 'w': + case 'W': + return number + '週'; + default: + return number; + } + }, + relativeTime: { + future: '%s後', + past: '%s前', + s: '幾秒', + ss: '%d 秒', + m: '1 分鐘', + mm: '%d 分鐘', + h: '1 小時', + hh: '%d 小時', + d: '1 天', + dd: '%d 天', + M: '1 個月', + MM: '%d 個月', + y: '1 年', + yy: '%d 年', + }, + }); + + moment.locale('en'); + + return moment; + +}))); diff --git a/pointeuse/install/bin/electron/resources/app/vendor/moment/locales.min.js b/pointeuse/install/bin/electron/resources/app/vendor/moment/locales.min.js new file mode 100644 index 00000000..56da071a --- /dev/null +++ b/pointeuse/install/bin/electron/resources/app/vendor/moment/locales.min.js @@ -0,0 +1,2 @@ +!function(e,a){"object"==typeof exports&&"undefined"!=typeof module&&"function"==typeof require?a(require("../moment")):"function"==typeof define&&define.amd?define(["../moment"],a):a(e.moment)}(this,function(e){"use strict";e.defineLocale("af",{months:"Januarie_Februarie_Maart_April_Mei_Junie_Julie_Augustus_September_Oktober_November_Desember".split("_"),monthsShort:"Jan_Feb_Mrt_Apr_Mei_Jun_Jul_Aug_Sep_Okt_Nov_Des".split("_"),weekdays:"Sondag_Maandag_Dinsdag_Woensdag_Donderdag_Vrydag_Saterdag".split("_"),weekdaysShort:"Son_Maa_Din_Woe_Don_Vry_Sat".split("_"),weekdaysMin:"So_Ma_Di_Wo_Do_Vr_Sa".split("_"),meridiemParse:/vm|nm/i,isPM:function(e){return/^nm$/i.test(e)},meridiem:function(e,a,_){return e<12?_?"vm":"VM":_?"nm":"NM"},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Vandag om] LT",nextDay:"[M\xf4re om] LT",nextWeek:"dddd [om] LT",lastDay:"[Gister om] LT",lastWeek:"[Laas] dddd [om] LT",sameElse:"L"},relativeTime:{future:"oor %s",past:"%s gelede",s:"'n paar sekondes",ss:"%d sekondes",m:"'n minuut",mm:"%d minute",h:"'n uur",hh:"%d ure",d:"'n dag",dd:"%d dae",M:"'n maand",MM:"%d maande",y:"'n jaar",yy:"%d jaar"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(1===e||8===e||20<=e?"ste":"de")},week:{dow:1,doy:4}});function r(e){return 0===e?0:1===e?1:2===e?2:3<=e%100&&e%100<=10?3:11<=e%100?4:5}function a(n){return function(e,a,_,s){var d=r(e),t=i[n][r(e)];return 2===d&&(t=t[a?0:1]),t.replace(/%d/i,e)}}var i={s:["\u0623\u0642\u0644 \u0645\u0646 \u062b\u0627\u0646\u064a\u0629","\u062b\u0627\u0646\u064a\u0629 \u0648\u0627\u062d\u062f\u0629",["\u062b\u0627\u0646\u064a\u062a\u0627\u0646","\u062b\u0627\u0646\u064a\u062a\u064a\u0646"],"%d \u062b\u0648\u0627\u0646","%d \u062b\u0627\u0646\u064a\u0629","%d \u062b\u0627\u0646\u064a\u0629"],m:["\u0623\u0642\u0644 \u0645\u0646 \u062f\u0642\u064a\u0642\u0629","\u062f\u0642\u064a\u0642\u0629 \u0648\u0627\u062d\u062f\u0629",["\u062f\u0642\u064a\u0642\u062a\u0627\u0646","\u062f\u0642\u064a\u0642\u062a\u064a\u0646"],"%d \u062f\u0642\u0627\u0626\u0642","%d \u062f\u0642\u064a\u0642\u0629","%d \u062f\u0642\u064a\u0642\u0629"],h:["\u0623\u0642\u0644 \u0645\u0646 \u0633\u0627\u0639\u0629","\u0633\u0627\u0639\u0629 \u0648\u0627\u062d\u062f\u0629",["\u0633\u0627\u0639\u062a\u0627\u0646","\u0633\u0627\u0639\u062a\u064a\u0646"],"%d \u0633\u0627\u0639\u0627\u062a","%d \u0633\u0627\u0639\u0629","%d \u0633\u0627\u0639\u0629"],d:["\u0623\u0642\u0644 \u0645\u0646 \u064a\u0648\u0645","\u064a\u0648\u0645 \u0648\u0627\u062d\u062f",["\u064a\u0648\u0645\u0627\u0646","\u064a\u0648\u0645\u064a\u0646"],"%d \u0623\u064a\u0627\u0645","%d \u064a\u0648\u0645\u064b\u0627","%d \u064a\u0648\u0645"],M:["\u0623\u0642\u0644 \u0645\u0646 \u0634\u0647\u0631","\u0634\u0647\u0631 \u0648\u0627\u062d\u062f",["\u0634\u0647\u0631\u0627\u0646","\u0634\u0647\u0631\u064a\u0646"],"%d \u0623\u0634\u0647\u0631","%d \u0634\u0647\u0631\u0627","%d \u0634\u0647\u0631"],y:["\u0623\u0642\u0644 \u0645\u0646 \u0639\u0627\u0645","\u0639\u0627\u0645 \u0648\u0627\u062d\u062f",["\u0639\u0627\u0645\u0627\u0646","\u0639\u0627\u0645\u064a\u0646"],"%d \u0623\u0639\u0648\u0627\u0645","%d \u0639\u0627\u0645\u064b\u0627","%d \u0639\u0627\u0645"]},_=["\u062c\u0627\u0646\u0641\u064a","\u0641\u064a\u0641\u0631\u064a","\u0645\u0627\u0631\u0633","\u0623\u0641\u0631\u064a\u0644","\u0645\u0627\u064a","\u062c\u0648\u0627\u0646","\u062c\u0648\u064a\u0644\u064a\u0629","\u0623\u0648\u062a","\u0633\u0628\u062a\u0645\u0628\u0631","\u0623\u0643\u062a\u0648\u0628\u0631","\u0646\u0648\u0641\u0645\u0628\u0631","\u062f\u064a\u0633\u0645\u0628\u0631"];e.defineLocale("ar-dz",{months:_,monthsShort:_,weekdays:"\u0627\u0644\u0623\u062d\u062f_\u0627\u0644\u0625\u062b\u0646\u064a\u0646_\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621_\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621_\u0627\u0644\u062e\u0645\u064a\u0633_\u0627\u0644\u062c\u0645\u0639\u0629_\u0627\u0644\u0633\u0628\u062a".split("_"),weekdaysShort:"\u0623\u062d\u062f_\u0625\u062b\u0646\u064a\u0646_\u062b\u0644\u0627\u062b\u0627\u0621_\u0623\u0631\u0628\u0639\u0627\u0621_\u062e\u0645\u064a\u0633_\u062c\u0645\u0639\u0629_\u0633\u0628\u062a".split("_"),weekdaysMin:"\u062d_\u0646_\u062b_\u0631_\u062e_\u062c_\u0633".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/\u200fM/\u200fYYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/\u0635|\u0645/,isPM:function(e){return"\u0645"===e},meridiem:function(e,a,_){return e<12?"\u0635":"\u0645"},calendar:{sameDay:"[\u0627\u0644\u064a\u0648\u0645 \u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextDay:"[\u063a\u062f\u064b\u0627 \u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextWeek:"dddd [\u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastDay:"[\u0623\u0645\u0633 \u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastWeek:"dddd [\u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",sameElse:"L"},relativeTime:{future:"\u0628\u0639\u062f %s",past:"\u0645\u0646\u0630 %s",s:a("s"),ss:a("s"),m:a("m"),mm:a("m"),h:a("h"),hh:a("h"),d:a("d"),dd:a("d"),M:a("M"),MM:a("M"),y:a("y"),yy:a("y")},postformat:function(e){return e.replace(/,/g,"\u060c")},week:{dow:0,doy:4}}),e.defineLocale("ar-kw",{months:"\u064a\u0646\u0627\u064a\u0631_\u0641\u0628\u0631\u0627\u064a\u0631_\u0645\u0627\u0631\u0633_\u0623\u0628\u0631\u064a\u0644_\u0645\u0627\u064a_\u064a\u0648\u0646\u064a\u0648_\u064a\u0648\u0644\u064a\u0648\u0632_\u063a\u0634\u062a_\u0634\u062a\u0646\u0628\u0631_\u0623\u0643\u062a\u0648\u0628\u0631_\u0646\u0648\u0646\u0628\u0631_\u062f\u062c\u0646\u0628\u0631".split("_"),monthsShort:"\u064a\u0646\u0627\u064a\u0631_\u0641\u0628\u0631\u0627\u064a\u0631_\u0645\u0627\u0631\u0633_\u0623\u0628\u0631\u064a\u0644_\u0645\u0627\u064a_\u064a\u0648\u0646\u064a\u0648_\u064a\u0648\u0644\u064a\u0648\u0632_\u063a\u0634\u062a_\u0634\u062a\u0646\u0628\u0631_\u0623\u0643\u062a\u0648\u0628\u0631_\u0646\u0648\u0646\u0628\u0631_\u062f\u062c\u0646\u0628\u0631".split("_"),weekdays:"\u0627\u0644\u0623\u062d\u062f_\u0627\u0644\u0625\u062a\u0646\u064a\u0646_\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621_\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621_\u0627\u0644\u062e\u0645\u064a\u0633_\u0627\u0644\u062c\u0645\u0639\u0629_\u0627\u0644\u0633\u0628\u062a".split("_"),weekdaysShort:"\u0627\u062d\u062f_\u0627\u062a\u0646\u064a\u0646_\u062b\u0644\u0627\u062b\u0627\u0621_\u0627\u0631\u0628\u0639\u0627\u0621_\u062e\u0645\u064a\u0633_\u062c\u0645\u0639\u0629_\u0633\u0628\u062a".split("_"),weekdaysMin:"\u062d_\u0646_\u062b_\u0631_\u062e_\u062c_\u0633".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[\u0627\u0644\u064a\u0648\u0645 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextDay:"[\u063a\u062f\u0627 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextWeek:"dddd [\u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastDay:"[\u0623\u0645\u0633 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastWeek:"dddd [\u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",sameElse:"L"},relativeTime:{future:"\u0641\u064a %s",past:"\u0645\u0646\u0630 %s",s:"\u062b\u0648\u0627\u0646",ss:"%d \u062b\u0627\u0646\u064a\u0629",m:"\u062f\u0642\u064a\u0642\u0629",mm:"%d \u062f\u0642\u0627\u0626\u0642",h:"\u0633\u0627\u0639\u0629",hh:"%d \u0633\u0627\u0639\u0627\u062a",d:"\u064a\u0648\u0645",dd:"%d \u0623\u064a\u0627\u0645",M:"\u0634\u0647\u0631",MM:"%d \u0623\u0634\u0647\u0631",y:"\u0633\u0646\u0629",yy:"%d \u0633\u0646\u0648\u0627\u062a"},week:{dow:0,doy:12}});function m(e){return 0===e?0:1===e?1:2===e?2:3<=e%100&&e%100<=10?3:11<=e%100?4:5}function s(n){return function(e,a,_,s){var d=m(e),t=o[n][m(e)];return 2===d&&(t=t[a?0:1]),t.replace(/%d/i,e)}}var d={1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",0:"0"},o={s:["\u0623\u0642\u0644 \u0645\u0646 \u062b\u0627\u0646\u064a\u0629","\u062b\u0627\u0646\u064a\u0629 \u0648\u0627\u062d\u062f\u0629",["\u062b\u0627\u0646\u064a\u062a\u0627\u0646","\u062b\u0627\u0646\u064a\u062a\u064a\u0646"],"%d \u062b\u0648\u0627\u0646","%d \u062b\u0627\u0646\u064a\u0629","%d \u062b\u0627\u0646\u064a\u0629"],m:["\u0623\u0642\u0644 \u0645\u0646 \u062f\u0642\u064a\u0642\u0629","\u062f\u0642\u064a\u0642\u0629 \u0648\u0627\u062d\u062f\u0629",["\u062f\u0642\u064a\u0642\u062a\u0627\u0646","\u062f\u0642\u064a\u0642\u062a\u064a\u0646"],"%d \u062f\u0642\u0627\u0626\u0642","%d \u062f\u0642\u064a\u0642\u0629","%d \u062f\u0642\u064a\u0642\u0629"],h:["\u0623\u0642\u0644 \u0645\u0646 \u0633\u0627\u0639\u0629","\u0633\u0627\u0639\u0629 \u0648\u0627\u062d\u062f\u0629",["\u0633\u0627\u0639\u062a\u0627\u0646","\u0633\u0627\u0639\u062a\u064a\u0646"],"%d \u0633\u0627\u0639\u0627\u062a","%d \u0633\u0627\u0639\u0629","%d \u0633\u0627\u0639\u0629"],d:["\u0623\u0642\u0644 \u0645\u0646 \u064a\u0648\u0645","\u064a\u0648\u0645 \u0648\u0627\u062d\u062f",["\u064a\u0648\u0645\u0627\u0646","\u064a\u0648\u0645\u064a\u0646"],"%d \u0623\u064a\u0627\u0645","%d \u064a\u0648\u0645\u064b\u0627","%d \u064a\u0648\u0645"],M:["\u0623\u0642\u0644 \u0645\u0646 \u0634\u0647\u0631","\u0634\u0647\u0631 \u0648\u0627\u062d\u062f",["\u0634\u0647\u0631\u0627\u0646","\u0634\u0647\u0631\u064a\u0646"],"%d \u0623\u0634\u0647\u0631","%d \u0634\u0647\u0631\u0627","%d \u0634\u0647\u0631"],y:["\u0623\u0642\u0644 \u0645\u0646 \u0639\u0627\u0645","\u0639\u0627\u0645 \u0648\u0627\u062d\u062f",["\u0639\u0627\u0645\u0627\u0646","\u0639\u0627\u0645\u064a\u0646"],"%d \u0623\u0639\u0648\u0627\u0645","%d \u0639\u0627\u0645\u064b\u0627","%d \u0639\u0627\u0645"]},t=["\u064a\u0646\u0627\u064a\u0631","\u0641\u0628\u0631\u0627\u064a\u0631","\u0645\u0627\u0631\u0633","\u0623\u0628\u0631\u064a\u0644","\u0645\u0627\u064a\u0648","\u064a\u0648\u0646\u064a\u0648","\u064a\u0648\u0644\u064a\u0648","\u0623\u063a\u0633\u0637\u0633","\u0633\u0628\u062a\u0645\u0628\u0631","\u0623\u0643\u062a\u0648\u0628\u0631","\u0646\u0648\u0641\u0645\u0628\u0631","\u062f\u064a\u0633\u0645\u0628\u0631"];e.defineLocale("ar-ly",{months:t,monthsShort:t,weekdays:"\u0627\u0644\u0623\u062d\u062f_\u0627\u0644\u0625\u062b\u0646\u064a\u0646_\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621_\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621_\u0627\u0644\u062e\u0645\u064a\u0633_\u0627\u0644\u062c\u0645\u0639\u0629_\u0627\u0644\u0633\u0628\u062a".split("_"),weekdaysShort:"\u0623\u062d\u062f_\u0625\u062b\u0646\u064a\u0646_\u062b\u0644\u0627\u062b\u0627\u0621_\u0623\u0631\u0628\u0639\u0627\u0621_\u062e\u0645\u064a\u0633_\u062c\u0645\u0639\u0629_\u0633\u0628\u062a".split("_"),weekdaysMin:"\u062d_\u0646_\u062b_\u0631_\u062e_\u062c_\u0633".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/\u200fM/\u200fYYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/\u0635|\u0645/,isPM:function(e){return"\u0645"===e},meridiem:function(e,a,_){return e<12?"\u0635":"\u0645"},calendar:{sameDay:"[\u0627\u0644\u064a\u0648\u0645 \u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextDay:"[\u063a\u062f\u064b\u0627 \u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextWeek:"dddd [\u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastDay:"[\u0623\u0645\u0633 \u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastWeek:"dddd [\u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",sameElse:"L"},relativeTime:{future:"\u0628\u0639\u062f %s",past:"\u0645\u0646\u0630 %s",s:s("s"),ss:s("s"),m:s("m"),mm:s("m"),h:s("h"),hh:s("h"),d:s("d"),dd:s("d"),M:s("M"),MM:s("M"),y:s("y"),yy:s("y")},preparse:function(e){return e.replace(/\u060c/g,",")},postformat:function(e){return e.replace(/\d/g,function(e){return d[e]}).replace(/,/g,"\u060c")},week:{dow:6,doy:12}}),e.defineLocale("ar-ma",{months:"\u064a\u0646\u0627\u064a\u0631_\u0641\u0628\u0631\u0627\u064a\u0631_\u0645\u0627\u0631\u0633_\u0623\u0628\u0631\u064a\u0644_\u0645\u0627\u064a_\u064a\u0648\u0646\u064a\u0648_\u064a\u0648\u0644\u064a\u0648\u0632_\u063a\u0634\u062a_\u0634\u062a\u0646\u0628\u0631_\u0623\u0643\u062a\u0648\u0628\u0631_\u0646\u0648\u0646\u0628\u0631_\u062f\u062c\u0646\u0628\u0631".split("_"),monthsShort:"\u064a\u0646\u0627\u064a\u0631_\u0641\u0628\u0631\u0627\u064a\u0631_\u0645\u0627\u0631\u0633_\u0623\u0628\u0631\u064a\u0644_\u0645\u0627\u064a_\u064a\u0648\u0646\u064a\u0648_\u064a\u0648\u0644\u064a\u0648\u0632_\u063a\u0634\u062a_\u0634\u062a\u0646\u0628\u0631_\u0623\u0643\u062a\u0648\u0628\u0631_\u0646\u0648\u0646\u0628\u0631_\u062f\u062c\u0646\u0628\u0631".split("_"),weekdays:"\u0627\u0644\u0623\u062d\u062f_\u0627\u0644\u0625\u062b\u0646\u064a\u0646_\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621_\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621_\u0627\u0644\u062e\u0645\u064a\u0633_\u0627\u0644\u062c\u0645\u0639\u0629_\u0627\u0644\u0633\u0628\u062a".split("_"),weekdaysShort:"\u0627\u062d\u062f_\u0627\u062b\u0646\u064a\u0646_\u062b\u0644\u0627\u062b\u0627\u0621_\u0627\u0631\u0628\u0639\u0627\u0621_\u062e\u0645\u064a\u0633_\u062c\u0645\u0639\u0629_\u0633\u0628\u062a".split("_"),weekdaysMin:"\u062d_\u0646_\u062b_\u0631_\u062e_\u062c_\u0633".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[\u0627\u0644\u064a\u0648\u0645 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextDay:"[\u063a\u062f\u0627 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextWeek:"dddd [\u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastDay:"[\u0623\u0645\u0633 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastWeek:"dddd [\u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",sameElse:"L"},relativeTime:{future:"\u0641\u064a %s",past:"\u0645\u0646\u0630 %s",s:"\u062b\u0648\u0627\u0646",ss:"%d \u062b\u0627\u0646\u064a\u0629",m:"\u062f\u0642\u064a\u0642\u0629",mm:"%d \u062f\u0642\u0627\u0626\u0642",h:"\u0633\u0627\u0639\u0629",hh:"%d \u0633\u0627\u0639\u0627\u062a",d:"\u064a\u0648\u0645",dd:"%d \u0623\u064a\u0627\u0645",M:"\u0634\u0647\u0631",MM:"%d \u0623\u0634\u0647\u0631",y:"\u0633\u0646\u0629",yy:"%d \u0633\u0646\u0648\u0627\u062a"},week:{dow:6,doy:12}});var n={1:"\u0661",2:"\u0662",3:"\u0663",4:"\u0664",5:"\u0665",6:"\u0666",7:"\u0667",8:"\u0668",9:"\u0669",0:"\u0660"},u={"\u0661":"1","\u0662":"2","\u0663":"3","\u0664":"4","\u0665":"5","\u0666":"6","\u0667":"7","\u0668":"8","\u0669":"9","\u0660":"0"};e.defineLocale("ar-sa",{months:"\u064a\u0646\u0627\u064a\u0631_\u0641\u0628\u0631\u0627\u064a\u0631_\u0645\u0627\u0631\u0633_\u0623\u0628\u0631\u064a\u0644_\u0645\u0627\u064a\u0648_\u064a\u0648\u0646\u064a\u0648_\u064a\u0648\u0644\u064a\u0648_\u0623\u063a\u0633\u0637\u0633_\u0633\u0628\u062a\u0645\u0628\u0631_\u0623\u0643\u062a\u0648\u0628\u0631_\u0646\u0648\u0641\u0645\u0628\u0631_\u062f\u064a\u0633\u0645\u0628\u0631".split("_"),monthsShort:"\u064a\u0646\u0627\u064a\u0631_\u0641\u0628\u0631\u0627\u064a\u0631_\u0645\u0627\u0631\u0633_\u0623\u0628\u0631\u064a\u0644_\u0645\u0627\u064a\u0648_\u064a\u0648\u0646\u064a\u0648_\u064a\u0648\u0644\u064a\u0648_\u0623\u063a\u0633\u0637\u0633_\u0633\u0628\u062a\u0645\u0628\u0631_\u0623\u0643\u062a\u0648\u0628\u0631_\u0646\u0648\u0641\u0645\u0628\u0631_\u062f\u064a\u0633\u0645\u0628\u0631".split("_"),weekdays:"\u0627\u0644\u0623\u062d\u062f_\u0627\u0644\u0625\u062b\u0646\u064a\u0646_\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621_\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621_\u0627\u0644\u062e\u0645\u064a\u0633_\u0627\u0644\u062c\u0645\u0639\u0629_\u0627\u0644\u0633\u0628\u062a".split("_"),weekdaysShort:"\u0623\u062d\u062f_\u0625\u062b\u0646\u064a\u0646_\u062b\u0644\u0627\u062b\u0627\u0621_\u0623\u0631\u0628\u0639\u0627\u0621_\u062e\u0645\u064a\u0633_\u062c\u0645\u0639\u0629_\u0633\u0628\u062a".split("_"),weekdaysMin:"\u062d_\u0646_\u062b_\u0631_\u062e_\u062c_\u0633".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/\u0635|\u0645/,isPM:function(e){return"\u0645"===e},meridiem:function(e,a,_){return e<12?"\u0635":"\u0645"},calendar:{sameDay:"[\u0627\u0644\u064a\u0648\u0645 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextDay:"[\u063a\u062f\u0627 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextWeek:"dddd [\u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastDay:"[\u0623\u0645\u0633 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastWeek:"dddd [\u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",sameElse:"L"},relativeTime:{future:"\u0641\u064a %s",past:"\u0645\u0646\u0630 %s",s:"\u062b\u0648\u0627\u0646",ss:"%d \u062b\u0627\u0646\u064a\u0629",m:"\u062f\u0642\u064a\u0642\u0629",mm:"%d \u062f\u0642\u0627\u0626\u0642",h:"\u0633\u0627\u0639\u0629",hh:"%d \u0633\u0627\u0639\u0627\u062a",d:"\u064a\u0648\u0645",dd:"%d \u0623\u064a\u0627\u0645",M:"\u0634\u0647\u0631",MM:"%d \u0623\u0634\u0647\u0631",y:"\u0633\u0646\u0629",yy:"%d \u0633\u0646\u0648\u0627\u062a"},preparse:function(e){return e.replace(/[\u0661\u0662\u0663\u0664\u0665\u0666\u0667\u0668\u0669\u0660]/g,function(e){return u[e]}).replace(/\u060c/g,",")},postformat:function(e){return e.replace(/\d/g,function(e){return n[e]}).replace(/,/g,"\u060c")},week:{dow:0,doy:6}}),e.defineLocale("ar-tn",{months:"\u062c\u0627\u0646\u0641\u064a_\u0641\u064a\u0641\u0631\u064a_\u0645\u0627\u0631\u0633_\u0623\u0641\u0631\u064a\u0644_\u0645\u0627\u064a_\u062c\u0648\u0627\u0646_\u062c\u0648\u064a\u0644\u064a\u0629_\u0623\u0648\u062a_\u0633\u0628\u062a\u0645\u0628\u0631_\u0623\u0643\u062a\u0648\u0628\u0631_\u0646\u0648\u0641\u0645\u0628\u0631_\u062f\u064a\u0633\u0645\u0628\u0631".split("_"),monthsShort:"\u062c\u0627\u0646\u0641\u064a_\u0641\u064a\u0641\u0631\u064a_\u0645\u0627\u0631\u0633_\u0623\u0641\u0631\u064a\u0644_\u0645\u0627\u064a_\u062c\u0648\u0627\u0646_\u062c\u0648\u064a\u0644\u064a\u0629_\u0623\u0648\u062a_\u0633\u0628\u062a\u0645\u0628\u0631_\u0623\u0643\u062a\u0648\u0628\u0631_\u0646\u0648\u0641\u0645\u0628\u0631_\u062f\u064a\u0633\u0645\u0628\u0631".split("_"),weekdays:"\u0627\u0644\u0623\u062d\u062f_\u0627\u0644\u0625\u062b\u0646\u064a\u0646_\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621_\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621_\u0627\u0644\u062e\u0645\u064a\u0633_\u0627\u0644\u062c\u0645\u0639\u0629_\u0627\u0644\u0633\u0628\u062a".split("_"),weekdaysShort:"\u0623\u062d\u062f_\u0625\u062b\u0646\u064a\u0646_\u062b\u0644\u0627\u062b\u0627\u0621_\u0623\u0631\u0628\u0639\u0627\u0621_\u062e\u0645\u064a\u0633_\u062c\u0645\u0639\u0629_\u0633\u0628\u062a".split("_"),weekdaysMin:"\u062d_\u0646_\u062b_\u0631_\u062e_\u062c_\u0633".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[\u0627\u0644\u064a\u0648\u0645 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextDay:"[\u063a\u062f\u0627 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextWeek:"dddd [\u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastDay:"[\u0623\u0645\u0633 \u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastWeek:"dddd [\u0639\u0644\u0649 \u0627\u0644\u0633\u0627\u0639\u0629] LT",sameElse:"L"},relativeTime:{future:"\u0641\u064a %s",past:"\u0645\u0646\u0630 %s",s:"\u062b\u0648\u0627\u0646",ss:"%d \u062b\u0627\u0646\u064a\u0629",m:"\u062f\u0642\u064a\u0642\u0629",mm:"%d \u062f\u0642\u0627\u0626\u0642",h:"\u0633\u0627\u0639\u0629",hh:"%d \u0633\u0627\u0639\u0627\u062a",d:"\u064a\u0648\u0645",dd:"%d \u0623\u064a\u0627\u0645",M:"\u0634\u0647\u0631",MM:"%d \u0623\u0634\u0647\u0631",y:"\u0633\u0646\u0629",yy:"%d \u0633\u0646\u0648\u0627\u062a"},week:{dow:1,doy:4}});function l(e){return 0===e?0:1===e?1:2===e?2:3<=e%100&&e%100<=10?3:11<=e%100?4:5}function M(n){return function(e,a,_,s){var d=l(e),t=h[n][l(e)];return 2===d&&(t=t[a?0:1]),t.replace(/%d/i,e)}}var L={1:"\u0661",2:"\u0662",3:"\u0663",4:"\u0664",5:"\u0665",6:"\u0666",7:"\u0667",8:"\u0668",9:"\u0669",0:"\u0660"},Y={"\u0661":"1","\u0662":"2","\u0663":"3","\u0664":"4","\u0665":"5","\u0666":"6","\u0667":"7","\u0668":"8","\u0669":"9","\u0660":"0"},h={s:["\u0623\u0642\u0644 \u0645\u0646 \u062b\u0627\u0646\u064a\u0629","\u062b\u0627\u0646\u064a\u0629 \u0648\u0627\u062d\u062f\u0629",["\u062b\u0627\u0646\u064a\u062a\u0627\u0646","\u062b\u0627\u0646\u064a\u062a\u064a\u0646"],"%d \u062b\u0648\u0627\u0646","%d \u062b\u0627\u0646\u064a\u0629","%d \u062b\u0627\u0646\u064a\u0629"],m:["\u0623\u0642\u0644 \u0645\u0646 \u062f\u0642\u064a\u0642\u0629","\u062f\u0642\u064a\u0642\u0629 \u0648\u0627\u062d\u062f\u0629",["\u062f\u0642\u064a\u0642\u062a\u0627\u0646","\u062f\u0642\u064a\u0642\u062a\u064a\u0646"],"%d \u062f\u0642\u0627\u0626\u0642","%d \u062f\u0642\u064a\u0642\u0629","%d \u062f\u0642\u064a\u0642\u0629"],h:["\u0623\u0642\u0644 \u0645\u0646 \u0633\u0627\u0639\u0629","\u0633\u0627\u0639\u0629 \u0648\u0627\u062d\u062f\u0629",["\u0633\u0627\u0639\u062a\u0627\u0646","\u0633\u0627\u0639\u062a\u064a\u0646"],"%d \u0633\u0627\u0639\u0627\u062a","%d \u0633\u0627\u0639\u0629","%d \u0633\u0627\u0639\u0629"],d:["\u0623\u0642\u0644 \u0645\u0646 \u064a\u0648\u0645","\u064a\u0648\u0645 \u0648\u0627\u062d\u062f",["\u064a\u0648\u0645\u0627\u0646","\u064a\u0648\u0645\u064a\u0646"],"%d \u0623\u064a\u0627\u0645","%d \u064a\u0648\u0645\u064b\u0627","%d \u064a\u0648\u0645"],M:["\u0623\u0642\u0644 \u0645\u0646 \u0634\u0647\u0631","\u0634\u0647\u0631 \u0648\u0627\u062d\u062f",["\u0634\u0647\u0631\u0627\u0646","\u0634\u0647\u0631\u064a\u0646"],"%d \u0623\u0634\u0647\u0631","%d \u0634\u0647\u0631\u0627","%d \u0634\u0647\u0631"],y:["\u0623\u0642\u0644 \u0645\u0646 \u0639\u0627\u0645","\u0639\u0627\u0645 \u0648\u0627\u062d\u062f",["\u0639\u0627\u0645\u0627\u0646","\u0639\u0627\u0645\u064a\u0646"],"%d \u0623\u0639\u0648\u0627\u0645","%d \u0639\u0627\u0645\u064b\u0627","%d \u0639\u0627\u0645"]},y=["\u064a\u0646\u0627\u064a\u0631","\u0641\u0628\u0631\u0627\u064a\u0631","\u0645\u0627\u0631\u0633","\u0623\u0628\u0631\u064a\u0644","\u0645\u0627\u064a\u0648","\u064a\u0648\u0646\u064a\u0648","\u064a\u0648\u0644\u064a\u0648","\u0623\u063a\u0633\u0637\u0633","\u0633\u0628\u062a\u0645\u0628\u0631","\u0623\u0643\u062a\u0648\u0628\u0631","\u0646\u0648\u0641\u0645\u0628\u0631","\u062f\u064a\u0633\u0645\u0628\u0631"];e.defineLocale("ar",{months:y,monthsShort:y,weekdays:"\u0627\u0644\u0623\u062d\u062f_\u0627\u0644\u0625\u062b\u0646\u064a\u0646_\u0627\u0644\u062b\u0644\u0627\u062b\u0627\u0621_\u0627\u0644\u0623\u0631\u0628\u0639\u0627\u0621_\u0627\u0644\u062e\u0645\u064a\u0633_\u0627\u0644\u062c\u0645\u0639\u0629_\u0627\u0644\u0633\u0628\u062a".split("_"),weekdaysShort:"\u0623\u062d\u062f_\u0625\u062b\u0646\u064a\u0646_\u062b\u0644\u0627\u062b\u0627\u0621_\u0623\u0631\u0628\u0639\u0627\u0621_\u062e\u0645\u064a\u0633_\u062c\u0645\u0639\u0629_\u0633\u0628\u062a".split("_"),weekdaysMin:"\u062d_\u0646_\u062b_\u0631_\u062e_\u062c_\u0633".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/\u200fM/\u200fYYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/\u0635|\u0645/,isPM:function(e){return"\u0645"===e},meridiem:function(e,a,_){return e<12?"\u0635":"\u0645"},calendar:{sameDay:"[\u0627\u0644\u064a\u0648\u0645 \u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextDay:"[\u063a\u062f\u064b\u0627 \u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",nextWeek:"dddd [\u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastDay:"[\u0623\u0645\u0633 \u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",lastWeek:"dddd [\u0639\u0646\u062f \u0627\u0644\u0633\u0627\u0639\u0629] LT",sameElse:"L"},relativeTime:{future:"\u0628\u0639\u062f %s",past:"\u0645\u0646\u0630 %s",s:M("s"),ss:M("s"),m:M("m"),mm:M("m"),h:M("h"),hh:M("h"),d:M("d"),dd:M("d"),M:M("M"),MM:M("M"),y:M("y"),yy:M("y")},preparse:function(e){return e.replace(/[\u0661\u0662\u0663\u0664\u0665\u0666\u0667\u0668\u0669\u0660]/g,function(e){return Y[e]}).replace(/\u060c/g,",")},postformat:function(e){return e.replace(/\d/g,function(e){return L[e]}).replace(/,/g,"\u060c")},week:{dow:6,doy:12}});var c={1:"-inci",5:"-inci",8:"-inci",70:"-inci",80:"-inci",2:"-nci",7:"-nci",20:"-nci",50:"-nci",3:"-\xfcnc\xfc",4:"-\xfcnc\xfc",100:"-\xfcnc\xfc",6:"-nc\u0131",9:"-uncu",10:"-uncu",30:"-uncu",60:"-\u0131nc\u0131",90:"-\u0131nc\u0131"};function k(e,a,_){var s,d;return"m"===_?a?"\u0445\u0432\u0456\u043b\u0456\u043d\u0430":"\u0445\u0432\u0456\u043b\u0456\u043d\u0443":"h"===_?a?"\u0433\u0430\u0434\u0437\u0456\u043d\u0430":"\u0433\u0430\u0434\u0437\u0456\u043d\u0443":e+" "+(s=+e,d={ss:a?"\u0441\u0435\u043a\u0443\u043d\u0434\u0430_\u0441\u0435\u043a\u0443\u043d\u0434\u044b_\u0441\u0435\u043a\u0443\u043d\u0434":"\u0441\u0435\u043a\u0443\u043d\u0434\u0443_\u0441\u0435\u043a\u0443\u043d\u0434\u044b_\u0441\u0435\u043a\u0443\u043d\u0434",mm:a?"\u0445\u0432\u0456\u043b\u0456\u043d\u0430_\u0445\u0432\u0456\u043b\u0456\u043d\u044b_\u0445\u0432\u0456\u043b\u0456\u043d":"\u0445\u0432\u0456\u043b\u0456\u043d\u0443_\u0445\u0432\u0456\u043b\u0456\u043d\u044b_\u0445\u0432\u0456\u043b\u0456\u043d",hh:a?"\u0433\u0430\u0434\u0437\u0456\u043d\u0430_\u0433\u0430\u0434\u0437\u0456\u043d\u044b_\u0433\u0430\u0434\u0437\u0456\u043d":"\u0433\u0430\u0434\u0437\u0456\u043d\u0443_\u0433\u0430\u0434\u0437\u0456\u043d\u044b_\u0433\u0430\u0434\u0437\u0456\u043d",dd:"\u0434\u0437\u0435\u043d\u044c_\u0434\u043d\u0456_\u0434\u0437\u0451\u043d",MM:"\u043c\u0435\u0441\u044f\u0446_\u043c\u0435\u0441\u044f\u0446\u044b_\u043c\u0435\u0441\u044f\u0446\u0430\u045e",yy:"\u0433\u043e\u0434_\u0433\u0430\u0434\u044b_\u0433\u0430\u0434\u043e\u045e"}[_].split("_"),s%10==1&&s%100!=11?d[0]:2<=s%10&&s%10<=4&&(s%100<10||20<=s%100)?d[1]:d[2])}e.defineLocale("az",{months:"yanvar_fevral_mart_aprel_may_iyun_iyul_avqust_sentyabr_oktyabr_noyabr_dekabr".split("_"),monthsShort:"yan_fev_mar_apr_may_iyn_iyl_avq_sen_okt_noy_dek".split("_"),weekdays:"Bazar_Bazar ert\u0259si_\xc7\u0259r\u015f\u0259nb\u0259 ax\u015fam\u0131_\xc7\u0259r\u015f\u0259nb\u0259_C\xfcm\u0259 ax\u015fam\u0131_C\xfcm\u0259_\u015e\u0259nb\u0259".split("_"),weekdaysShort:"Baz_BzE_\xc7Ax_\xc7\u0259r_CAx_C\xfcm_\u015e\u0259n".split("_"),weekdaysMin:"Bz_BE_\xc7A_\xc7\u0259_CA_C\xfc_\u015e\u0259".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[bug\xfcn saat] LT",nextDay:"[sabah saat] LT",nextWeek:"[g\u0259l\u0259n h\u0259ft\u0259] dddd [saat] LT",lastDay:"[d\xfcn\u0259n] LT",lastWeek:"[ke\xe7\u0259n h\u0259ft\u0259] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s sonra",past:"%s \u0259vv\u0259l",s:"bir ne\xe7\u0259 saniy\u0259",ss:"%d saniy\u0259",m:"bir d\u0259qiq\u0259",mm:"%d d\u0259qiq\u0259",h:"bir saat",hh:"%d saat",d:"bir g\xfcn",dd:"%d g\xfcn",M:"bir ay",MM:"%d ay",y:"bir il",yy:"%d il"},meridiemParse:/gec\u0259|s\u0259h\u0259r|g\xfcnd\xfcz|ax\u015fam/,isPM:function(e){return/^(g\xfcnd\xfcz|ax\u015fam)$/.test(e)},meridiem:function(e,a,_){return e<4?"gec\u0259":e<12?"s\u0259h\u0259r":e<17?"g\xfcnd\xfcz":"ax\u015fam"},dayOfMonthOrdinalParse:/\d{1,2}-(\u0131nc\u0131|inci|nci|\xfcnc\xfc|nc\u0131|uncu)/,ordinal:function(e){if(0===e)return e+"-\u0131nc\u0131";var a=e%10;return e+(c[a]||c[e%100-a]||c[100<=e?100:null])},week:{dow:1,doy:7}}),e.defineLocale("be",{months:{format:"\u0441\u0442\u0443\u0434\u0437\u0435\u043d\u044f_\u043b\u044e\u0442\u0430\u0433\u0430_\u0441\u0430\u043a\u0430\u0432\u0456\u043a\u0430_\u043a\u0440\u0430\u0441\u0430\u0432\u0456\u043a\u0430_\u0442\u0440\u0430\u045e\u043d\u044f_\u0447\u044d\u0440\u0432\u0435\u043d\u044f_\u043b\u0456\u043f\u0435\u043d\u044f_\u0436\u043d\u0456\u045e\u043d\u044f_\u0432\u0435\u0440\u0430\u0441\u043d\u044f_\u043a\u0430\u0441\u0442\u0440\u044b\u0447\u043d\u0456\u043a\u0430_\u043b\u0456\u0441\u0442\u0430\u043f\u0430\u0434\u0430_\u0441\u043d\u0435\u0436\u043d\u044f".split("_"),standalone:"\u0441\u0442\u0443\u0434\u0437\u0435\u043d\u044c_\u043b\u044e\u0442\u044b_\u0441\u0430\u043a\u0430\u0432\u0456\u043a_\u043a\u0440\u0430\u0441\u0430\u0432\u0456\u043a_\u0442\u0440\u0430\u0432\u0435\u043d\u044c_\u0447\u044d\u0440\u0432\u0435\u043d\u044c_\u043b\u0456\u043f\u0435\u043d\u044c_\u0436\u043d\u0456\u0432\u0435\u043d\u044c_\u0432\u0435\u0440\u0430\u0441\u0435\u043d\u044c_\u043a\u0430\u0441\u0442\u0440\u044b\u0447\u043d\u0456\u043a_\u043b\u0456\u0441\u0442\u0430\u043f\u0430\u0434_\u0441\u043d\u0435\u0436\u0430\u043d\u044c".split("_")},monthsShort:"\u0441\u0442\u0443\u0434_\u043b\u044e\u0442_\u0441\u0430\u043a_\u043a\u0440\u0430\u0441_\u0442\u0440\u0430\u0432_\u0447\u044d\u0440\u0432_\u043b\u0456\u043f_\u0436\u043d\u0456\u0432_\u0432\u0435\u0440_\u043a\u0430\u0441\u0442_\u043b\u0456\u0441\u0442_\u0441\u043d\u0435\u0436".split("_"),weekdays:{format:"\u043d\u044f\u0434\u0437\u0435\u043b\u044e_\u043f\u0430\u043d\u044f\u0434\u0437\u0435\u043b\u0430\u043a_\u0430\u045e\u0442\u043e\u0440\u0430\u043a_\u0441\u0435\u0440\u0430\u0434\u0443_\u0447\u0430\u0446\u0432\u0435\u0440_\u043f\u044f\u0442\u043d\u0456\u0446\u0443_\u0441\u0443\u0431\u043e\u0442\u0443".split("_"),standalone:"\u043d\u044f\u0434\u0437\u0435\u043b\u044f_\u043f\u0430\u043d\u044f\u0434\u0437\u0435\u043b\u0430\u043a_\u0430\u045e\u0442\u043e\u0440\u0430\u043a_\u0441\u0435\u0440\u0430\u0434\u0430_\u0447\u0430\u0446\u0432\u0435\u0440_\u043f\u044f\u0442\u043d\u0456\u0446\u0430_\u0441\u0443\u0431\u043e\u0442\u0430".split("_"),isFormat:/\[ ?[\u0423\u0443\u045e] ?(?:\u043c\u0456\u043d\u0443\u043b\u0443\u044e|\u043d\u0430\u0441\u0442\u0443\u043f\u043d\u0443\u044e)? ?\] ?dddd/},weekdaysShort:"\u043d\u0434_\u043f\u043d_\u0430\u0442_\u0441\u0440_\u0447\u0446_\u043f\u0442_\u0441\u0431".split("_"),weekdaysMin:"\u043d\u0434_\u043f\u043d_\u0430\u0442_\u0441\u0440_\u0447\u0446_\u043f\u0442_\u0441\u0431".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY \u0433.",LLL:"D MMMM YYYY \u0433., HH:mm",LLLL:"dddd, D MMMM YYYY \u0433., HH:mm"},calendar:{sameDay:"[\u0421\u0451\u043d\u043d\u044f \u045e] LT",nextDay:"[\u0417\u0430\u045e\u0442\u0440\u0430 \u045e] LT",lastDay:"[\u0423\u0447\u043e\u0440\u0430 \u045e] LT",nextWeek:function(){return"[\u0423] dddd [\u045e] LT"},lastWeek:function(){switch(this.day()){case 0:case 3:case 5:case 6:return"[\u0423 \u043c\u0456\u043d\u0443\u043b\u0443\u044e] dddd [\u045e] LT";case 1:case 2:case 4:return"[\u0423 \u043c\u0456\u043d\u0443\u043b\u044b] dddd [\u045e] LT"}},sameElse:"L"},relativeTime:{future:"\u043f\u0440\u0430\u0437 %s",past:"%s \u0442\u0430\u043c\u0443",s:"\u043d\u0435\u043a\u0430\u043b\u044c\u043a\u0456 \u0441\u0435\u043a\u0443\u043d\u0434",m:k,mm:k,h:k,hh:k,d:"\u0434\u0437\u0435\u043d\u044c",dd:k,M:"\u043c\u0435\u0441\u044f\u0446",MM:k,y:"\u0433\u043e\u0434",yy:k},meridiemParse:/\u043d\u043e\u0447\u044b|\u0440\u0430\u043d\u0456\u0446\u044b|\u0434\u043d\u044f|\u0432\u0435\u0447\u0430\u0440\u0430/,isPM:function(e){return/^(\u0434\u043d\u044f|\u0432\u0435\u0447\u0430\u0440\u0430)$/.test(e)},meridiem:function(e,a,_){return e<4?"\u043d\u043e\u0447\u044b":e<12?"\u0440\u0430\u043d\u0456\u0446\u044b":e<17?"\u0434\u043d\u044f":"\u0432\u0435\u0447\u0430\u0440\u0430"},dayOfMonthOrdinalParse:/\d{1,2}-(\u0456|\u044b|\u0433\u0430)/,ordinal:function(e,a){switch(a){case"M":case"d":case"DDD":case"w":case"W":return e%10!=2&&e%10!=3||e%100==12||e%100==13?e+"-\u044b":e+"-\u0456";case"D":return e+"-\u0433\u0430";default:return e}},week:{dow:1,doy:7}}),e.defineLocale("bg",{months:"\u044f\u043d\u0443\u0430\u0440\u0438_\u0444\u0435\u0432\u0440\u0443\u0430\u0440\u0438_\u043c\u0430\u0440\u0442_\u0430\u043f\u0440\u0438\u043b_\u043c\u0430\u0439_\u044e\u043d\u0438_\u044e\u043b\u0438_\u0430\u0432\u0433\u0443\u0441\u0442_\u0441\u0435\u043f\u0442\u0435\u043c\u0432\u0440\u0438_\u043e\u043a\u0442\u043e\u043c\u0432\u0440\u0438_\u043d\u043e\u0435\u043c\u0432\u0440\u0438_\u0434\u0435\u043a\u0435\u043c\u0432\u0440\u0438".split("_"),monthsShort:"\u044f\u043d\u0443_\u0444\u0435\u0432_\u043c\u0430\u0440_\u0430\u043f\u0440_\u043c\u0430\u0439_\u044e\u043d\u0438_\u044e\u043b\u0438_\u0430\u0432\u0433_\u0441\u0435\u043f_\u043e\u043a\u0442_\u043d\u043e\u0435_\u0434\u0435\u043a".split("_"),weekdays:"\u043d\u0435\u0434\u0435\u043b\u044f_\u043f\u043e\u043d\u0435\u0434\u0435\u043b\u043d\u0438\u043a_\u0432\u0442\u043e\u0440\u043d\u0438\u043a_\u0441\u0440\u044f\u0434\u0430_\u0447\u0435\u0442\u0432\u044a\u0440\u0442\u044a\u043a_\u043f\u0435\u0442\u044a\u043a_\u0441\u044a\u0431\u043e\u0442\u0430".split("_"),weekdaysShort:"\u043d\u0435\u0434_\u043f\u043e\u043d_\u0432\u0442\u043e_\u0441\u0440\u044f_\u0447\u0435\u0442_\u043f\u0435\u0442_\u0441\u044a\u0431".split("_"),weekdaysMin:"\u043d\u0434_\u043f\u043d_\u0432\u0442_\u0441\u0440_\u0447\u0442_\u043f\u0442_\u0441\u0431".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"D.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd, D MMMM YYYY H:mm"},calendar:{sameDay:"[\u0414\u043d\u0435\u0441 \u0432] LT",nextDay:"[\u0423\u0442\u0440\u0435 \u0432] LT",nextWeek:"dddd [\u0432] LT",lastDay:"[\u0412\u0447\u0435\u0440\u0430 \u0432] LT",lastWeek:function(){switch(this.day()){case 0:case 3:case 6:return"[\u041c\u0438\u043d\u0430\u043b\u0430\u0442\u0430] dddd [\u0432] LT";case 1:case 2:case 4:case 5:return"[\u041c\u0438\u043d\u0430\u043b\u0438\u044f] dddd [\u0432] LT"}},sameElse:"L"},relativeTime:{future:"\u0441\u043b\u0435\u0434 %s",past:"\u043f\u0440\u0435\u0434\u0438 %s",s:"\u043d\u044f\u043a\u043e\u043b\u043a\u043e \u0441\u0435\u043a\u0443\u043d\u0434\u0438",ss:"%d \u0441\u0435\u043a\u0443\u043d\u0434\u0438",m:"\u043c\u0438\u043d\u0443\u0442\u0430",mm:"%d \u043c\u0438\u043d\u0443\u0442\u0438",h:"\u0447\u0430\u0441",hh:"%d \u0447\u0430\u0441\u0430",d:"\u0434\u0435\u043d",dd:"%d \u0434\u0435\u043d\u0430",M:"\u043c\u0435\u0441\u0435\u0446",MM:"%d \u043c\u0435\u0441\u0435\u0446\u0430",y:"\u0433\u043e\u0434\u0438\u043d\u0430",yy:"%d \u0433\u043e\u0434\u0438\u043d\u0438"},dayOfMonthOrdinalParse:/\d{1,2}-(\u0435\u0432|\u0435\u043d|\u0442\u0438|\u0432\u0438|\u0440\u0438|\u043c\u0438)/,ordinal:function(e){var a=e%10,_=e%100;return 0===e?e+"-\u0435\u0432":0==_?e+"-\u0435\u043d":10<_&&_<20?e+"-\u0442\u0438":1==a?e+"-\u0432\u0438":2==a?e+"-\u0440\u0438":7==a||8==a?e+"-\u043c\u0438":e+"-\u0442\u0438"},week:{dow:1,doy:7}}),e.defineLocale("bm",{months:"Zanwuyekalo_Fewuruyekalo_Marisikalo_Awirilikalo_M\u025bkalo_Zuw\u025bnkalo_Zuluyekalo_Utikalo_S\u025btanburukalo_\u0254kut\u0254burukalo_Nowanburukalo_Desanburukalo".split("_"),monthsShort:"Zan_Few_Mar_Awi_M\u025b_Zuw_Zul_Uti_S\u025bt_\u0254ku_Now_Des".split("_"),weekdays:"Kari_Nt\u025bn\u025bn_Tarata_Araba_Alamisa_Juma_Sibiri".split("_"),weekdaysShort:"Kar_Nt\u025b_Tar_Ara_Ala_Jum_Sib".split("_"),weekdaysMin:"Ka_Nt_Ta_Ar_Al_Ju_Si".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"MMMM [tile] D [san] YYYY",LLL:"MMMM [tile] D [san] YYYY [l\u025br\u025b] HH:mm",LLLL:"dddd MMMM [tile] D [san] YYYY [l\u025br\u025b] HH:mm"},calendar:{sameDay:"[Bi l\u025br\u025b] LT",nextDay:"[Sini l\u025br\u025b] LT",nextWeek:"dddd [don l\u025br\u025b] LT",lastDay:"[Kunu l\u025br\u025b] LT",lastWeek:"dddd [t\u025bm\u025bnen l\u025br\u025b] LT",sameElse:"L"},relativeTime:{future:"%s k\u0254n\u0254",past:"a b\u025b %s b\u0254",s:"sanga dama dama",ss:"sekondi %d",m:"miniti kelen",mm:"miniti %d",h:"l\u025br\u025b kelen",hh:"l\u025br\u025b %d",d:"tile kelen",dd:"tile %d",M:"kalo kelen",MM:"kalo %d",y:"san kelen",yy:"san %d"},week:{dow:1,doy:4}});var D={1:"\u09e7",2:"\u09e8",3:"\u09e9",4:"\u09ea",5:"\u09eb",6:"\u09ec",7:"\u09ed",8:"\u09ee",9:"\u09ef",0:"\u09e6"},p={"\u09e7":"1","\u09e8":"2","\u09e9":"3","\u09ea":"4","\u09eb":"5","\u09ec":"6","\u09ed":"7","\u09ee":"8","\u09ef":"9","\u09e6":"0"};e.defineLocale("bn",{months:"\u099c\u09be\u09a8\u09c1\u09df\u09be\u09b0\u09bf_\u09ab\u09c7\u09ac\u09cd\u09b0\u09c1\u09df\u09be\u09b0\u09bf_\u09ae\u09be\u09b0\u09cd\u099a_\u098f\u09aa\u09cd\u09b0\u09bf\u09b2_\u09ae\u09c7_\u099c\u09c1\u09a8_\u099c\u09c1\u09b2\u09be\u0987_\u0986\u0997\u09b8\u09cd\u099f_\u09b8\u09c7\u09aa\u09cd\u099f\u09c7\u09ae\u09cd\u09ac\u09b0_\u0985\u0995\u09cd\u099f\u09cb\u09ac\u09b0_\u09a8\u09ad\u09c7\u09ae\u09cd\u09ac\u09b0_\u09a1\u09bf\u09b8\u09c7\u09ae\u09cd\u09ac\u09b0".split("_"),monthsShort:"\u099c\u09be\u09a8\u09c1_\u09ab\u09c7\u09ac\u09cd\u09b0\u09c1_\u09ae\u09be\u09b0\u09cd\u099a_\u098f\u09aa\u09cd\u09b0\u09bf\u09b2_\u09ae\u09c7_\u099c\u09c1\u09a8_\u099c\u09c1\u09b2\u09be\u0987_\u0986\u0997\u09b8\u09cd\u099f_\u09b8\u09c7\u09aa\u09cd\u099f_\u0985\u0995\u09cd\u099f\u09cb_\u09a8\u09ad\u09c7_\u09a1\u09bf\u09b8\u09c7".split("_"),weekdays:"\u09b0\u09ac\u09bf\u09ac\u09be\u09b0_\u09b8\u09cb\u09ae\u09ac\u09be\u09b0_\u09ae\u0999\u09cd\u0997\u09b2\u09ac\u09be\u09b0_\u09ac\u09c1\u09a7\u09ac\u09be\u09b0_\u09ac\u09c3\u09b9\u09b8\u09cd\u09aa\u09a4\u09bf\u09ac\u09be\u09b0_\u09b6\u09c1\u0995\u09cd\u09b0\u09ac\u09be\u09b0_\u09b6\u09a8\u09bf\u09ac\u09be\u09b0".split("_"),weekdaysShort:"\u09b0\u09ac\u09bf_\u09b8\u09cb\u09ae_\u09ae\u0999\u09cd\u0997\u09b2_\u09ac\u09c1\u09a7_\u09ac\u09c3\u09b9\u09b8\u09cd\u09aa\u09a4\u09bf_\u09b6\u09c1\u0995\u09cd\u09b0_\u09b6\u09a8\u09bf".split("_"),weekdaysMin:"\u09b0\u09ac\u09bf_\u09b8\u09cb\u09ae_\u09ae\u0999\u09cd\u0997\u09b2_\u09ac\u09c1\u09a7_\u09ac\u09c3\u09b9_\u09b6\u09c1\u0995\u09cd\u09b0_\u09b6\u09a8\u09bf".split("_"),longDateFormat:{LT:"A h:mm \u09b8\u09ae\u09df",LTS:"A h:mm:ss \u09b8\u09ae\u09df",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm \u09b8\u09ae\u09df",LLLL:"dddd, D MMMM YYYY, A h:mm \u09b8\u09ae\u09df"},calendar:{sameDay:"[\u0986\u099c] LT",nextDay:"[\u0986\u0997\u09be\u09ae\u09c0\u0995\u09be\u09b2] LT",nextWeek:"dddd, LT",lastDay:"[\u0997\u09a4\u0995\u09be\u09b2] LT",lastWeek:"[\u0997\u09a4] dddd, LT",sameElse:"L"},relativeTime:{future:"%s \u09aa\u09b0\u09c7",past:"%s \u0986\u0997\u09c7",s:"\u0995\u09df\u09c7\u0995 \u09b8\u09c7\u0995\u09c7\u09a8\u09cd\u09a1",ss:"%d \u09b8\u09c7\u0995\u09c7\u09a8\u09cd\u09a1",m:"\u098f\u0995 \u09ae\u09bf\u09a8\u09bf\u099f",mm:"%d \u09ae\u09bf\u09a8\u09bf\u099f",h:"\u098f\u0995 \u0998\u09a8\u09cd\u099f\u09be",hh:"%d \u0998\u09a8\u09cd\u099f\u09be",d:"\u098f\u0995 \u09a6\u09bf\u09a8",dd:"%d \u09a6\u09bf\u09a8",M:"\u098f\u0995 \u09ae\u09be\u09b8",MM:"%d \u09ae\u09be\u09b8",y:"\u098f\u0995 \u09ac\u099b\u09b0",yy:"%d \u09ac\u099b\u09b0"},preparse:function(e){return e.replace(/[\u09e7\u09e8\u09e9\u09ea\u09eb\u09ec\u09ed\u09ee\u09ef\u09e6]/g,function(e){return p[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return D[e]})},meridiemParse:/\u09b0\u09be\u09a4|\u09b8\u0995\u09be\u09b2|\u09a6\u09c1\u09aa\u09c1\u09b0|\u09ac\u09bf\u0995\u09be\u09b2|\u09b0\u09be\u09a4/,meridiemHour:function(e,a){return 12===e&&(e=0),"\u09b0\u09be\u09a4"===a&&4<=e||"\u09a6\u09c1\u09aa\u09c1\u09b0"===a&&e<5||"\u09ac\u09bf\u0995\u09be\u09b2"===a?e+12:e},meridiem:function(e,a,_){return e<4?"\u09b0\u09be\u09a4":e<10?"\u09b8\u0995\u09be\u09b2":e<17?"\u09a6\u09c1\u09aa\u09c1\u09b0":e<20?"\u09ac\u09bf\u0995\u09be\u09b2":"\u09b0\u09be\u09a4"},week:{dow:0,doy:6}});var T={1:"\u0f21",2:"\u0f22",3:"\u0f23",4:"\u0f24",5:"\u0f25",6:"\u0f26",7:"\u0f27",8:"\u0f28",9:"\u0f29",0:"\u0f20"},f={"\u0f21":"1","\u0f22":"2","\u0f23":"3","\u0f24":"4","\u0f25":"5","\u0f26":"6","\u0f27":"7","\u0f28":"8","\u0f29":"9","\u0f20":"0"};function g(e,a,_){var s;return e+" "+(s={mm:"munutenn",MM:"miz",dd:"devezh"}[_],2!==e?s:function(e){var a={m:"v",b:"v",d:"z"};return void 0!==a[e.charAt(0)]?a[e.charAt(0)]+e.substring(1):e}(s))}e.defineLocale("bo",{months:"\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f51\u0f44\u0f0b\u0f54\u0f7c_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f42\u0f49\u0f72\u0f66\u0f0b\u0f54_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f42\u0f66\u0f74\u0f58\u0f0b\u0f54_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f56\u0f5e\u0f72\u0f0b\u0f54_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f63\u0f94\u0f0b\u0f54_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f51\u0fb2\u0f74\u0f42\u0f0b\u0f54_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f56\u0f51\u0f74\u0f53\u0f0b\u0f54_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f56\u0f62\u0f92\u0fb1\u0f51\u0f0b\u0f54_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f51\u0f42\u0f74\u0f0b\u0f54_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f56\u0f45\u0f74\u0f0b\u0f54_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f56\u0f45\u0f74\u0f0b\u0f42\u0f45\u0f72\u0f42\u0f0b\u0f54_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f56\u0f45\u0f74\u0f0b\u0f42\u0f49\u0f72\u0f66\u0f0b\u0f54".split("_"),monthsShort:"\u0f5f\u0fb3\u0f0b1_\u0f5f\u0fb3\u0f0b2_\u0f5f\u0fb3\u0f0b3_\u0f5f\u0fb3\u0f0b4_\u0f5f\u0fb3\u0f0b5_\u0f5f\u0fb3\u0f0b6_\u0f5f\u0fb3\u0f0b7_\u0f5f\u0fb3\u0f0b8_\u0f5f\u0fb3\u0f0b9_\u0f5f\u0fb3\u0f0b10_\u0f5f\u0fb3\u0f0b11_\u0f5f\u0fb3\u0f0b12".split("_"),monthsShortRegex:/^(\u0f5f\u0fb3\u0f0b\d{1,2})/,monthsParseExact:!0,weekdays:"\u0f42\u0f5f\u0f60\u0f0b\u0f49\u0f72\u0f0b\u0f58\u0f0b_\u0f42\u0f5f\u0f60\u0f0b\u0f5f\u0fb3\u0f0b\u0f56\u0f0b_\u0f42\u0f5f\u0f60\u0f0b\u0f58\u0f72\u0f42\u0f0b\u0f51\u0f58\u0f62\u0f0b_\u0f42\u0f5f\u0f60\u0f0b\u0f63\u0fb7\u0f42\u0f0b\u0f54\u0f0b_\u0f42\u0f5f\u0f60\u0f0b\u0f55\u0f74\u0f62\u0f0b\u0f56\u0f74_\u0f42\u0f5f\u0f60\u0f0b\u0f54\u0f0b\u0f66\u0f44\u0f66\u0f0b_\u0f42\u0f5f\u0f60\u0f0b\u0f66\u0fa4\u0f7a\u0f53\u0f0b\u0f54\u0f0b".split("_"),weekdaysShort:"\u0f49\u0f72\u0f0b\u0f58\u0f0b_\u0f5f\u0fb3\u0f0b\u0f56\u0f0b_\u0f58\u0f72\u0f42\u0f0b\u0f51\u0f58\u0f62\u0f0b_\u0f63\u0fb7\u0f42\u0f0b\u0f54\u0f0b_\u0f55\u0f74\u0f62\u0f0b\u0f56\u0f74_\u0f54\u0f0b\u0f66\u0f44\u0f66\u0f0b_\u0f66\u0fa4\u0f7a\u0f53\u0f0b\u0f54\u0f0b".split("_"),weekdaysMin:"\u0f49\u0f72_\u0f5f\u0fb3_\u0f58\u0f72\u0f42_\u0f63\u0fb7\u0f42_\u0f55\u0f74\u0f62_\u0f66\u0f44\u0f66_\u0f66\u0fa4\u0f7a\u0f53".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm",LLLL:"dddd, D MMMM YYYY, A h:mm"},calendar:{sameDay:"[\u0f51\u0f72\u0f0b\u0f62\u0f72\u0f44] LT",nextDay:"[\u0f66\u0f44\u0f0b\u0f49\u0f72\u0f53] LT",nextWeek:"[\u0f56\u0f51\u0f74\u0f53\u0f0b\u0f55\u0fb2\u0f42\u0f0b\u0f62\u0f97\u0f7a\u0f66\u0f0b\u0f58], LT",lastDay:"[\u0f41\u0f0b\u0f66\u0f44] LT",lastWeek:"[\u0f56\u0f51\u0f74\u0f53\u0f0b\u0f55\u0fb2\u0f42\u0f0b\u0f58\u0f50\u0f60\u0f0b\u0f58] dddd, LT",sameElse:"L"},relativeTime:{future:"%s \u0f63\u0f0b",past:"%s \u0f66\u0f94\u0f53\u0f0b\u0f63",s:"\u0f63\u0f58\u0f0b\u0f66\u0f44",ss:"%d \u0f66\u0f90\u0f62\u0f0b\u0f46\u0f0d",m:"\u0f66\u0f90\u0f62\u0f0b\u0f58\u0f0b\u0f42\u0f45\u0f72\u0f42",mm:"%d \u0f66\u0f90\u0f62\u0f0b\u0f58",h:"\u0f46\u0f74\u0f0b\u0f5a\u0f7c\u0f51\u0f0b\u0f42\u0f45\u0f72\u0f42",hh:"%d \u0f46\u0f74\u0f0b\u0f5a\u0f7c\u0f51",d:"\u0f49\u0f72\u0f53\u0f0b\u0f42\u0f45\u0f72\u0f42",dd:"%d \u0f49\u0f72\u0f53\u0f0b",M:"\u0f5f\u0fb3\u0f0b\u0f56\u0f0b\u0f42\u0f45\u0f72\u0f42",MM:"%d \u0f5f\u0fb3\u0f0b\u0f56",y:"\u0f63\u0f7c\u0f0b\u0f42\u0f45\u0f72\u0f42",yy:"%d \u0f63\u0f7c"},preparse:function(e){return e.replace(/[\u0f21\u0f22\u0f23\u0f24\u0f25\u0f26\u0f27\u0f28\u0f29\u0f20]/g,function(e){return f[e]})},postformat:function(e){return e.replace(/\d/g,function(e){return T[e]})},meridiemParse:/\u0f58\u0f5a\u0f53\u0f0b\u0f58\u0f7c|\u0f5e\u0f7c\u0f42\u0f66\u0f0b\u0f40\u0f66|\u0f49\u0f72\u0f53\u0f0b\u0f42\u0f74\u0f44|\u0f51\u0f42\u0f7c\u0f44\u0f0b\u0f51\u0f42|\u0f58\u0f5a\u0f53\u0f0b\u0f58\u0f7c/,meridiemHour:function(e,a){return 12===e&&(e=0),"\u0f58\u0f5a\u0f53\u0f0b\u0f58\u0f7c"===a&&4<=e||"\u0f49\u0f72\u0f53\u0f0b\u0f42\u0f74\u0f44"===a&&e<5||"\u0f51\u0f42\u0f7c\u0f44\u0f0b\u0f51\u0f42"===a?e+12:e},meridiem:function(e,a,_){return e<4?"\u0f58\u0f5a\u0f53\u0f0b\u0f58\u0f7c":e<10?"\u0f5e\u0f7c\u0f42\u0f66\u0f0b\u0f40\u0f66":e<17?"\u0f49\u0f72\u0f53\u0f0b\u0f42\u0f74\u0f44":e<20?"\u0f51\u0f42\u0f7c\u0f44\u0f0b\u0f51\u0f42":"\u0f58\u0f5a\u0f53\u0f0b\u0f58\u0f7c"},week:{dow:0,doy:6}});var w=[/^gen/i,/^c[\u02bc\']hwe/i,/^meu/i,/^ebr/i,/^mae/i,/^(mez|eve)/i,/^gou/i,/^eos/i,/^gwe/i,/^her/i,/^du/i,/^ker/i],H=/^(genver|c[\u02bc\']hwevrer|meurzh|ebrel|mae|mezheven|gouere|eost|gwengolo|here|du|kerzu|gen|c[\u02bc\']hwe|meu|ebr|mae|eve|gou|eos|gwe|her|du|ker)/i,b=[/^Su/i,/^Lu/i,/^Me([^r]|$)/i,/^Mer/i,/^Ya/i,/^Gw/i,/^Sa/i];function v(e,a,_){var s=e+" ";switch(_){case"ss":return s+=1===e?"sekunda":2===e||3===e||4===e?"sekunde":"sekundi";case"m":return a?"jedna minuta":"jedne minute";case"mm":return s+=1!==e&&(2===e||3===e||4===e)?"minute":"minuta";case"h":return a?"jedan sat":"jednog sata";case"hh":return s+=1===e?"sat":2===e||3===e||4===e?"sata":"sati";case"dd":return s+=1===e?"dan":"dana";case"MM":return s+=1===e?"mjesec":2===e||3===e||4===e?"mjeseca":"mjeseci";case"yy":return s+=1!==e&&(2===e||3===e||4===e)?"godine":"godina"}}e.defineLocale("br",{months:"Genver_C\u02bchwevrer_Meurzh_Ebrel_Mae_Mezheven_Gouere_Eost_Gwengolo_Here_Du_Kerzu".split("_"),monthsShort:"Gen_C\u02bchwe_Meu_Ebr_Mae_Eve_Gou_Eos_Gwe_Her_Du_Ker".split("_"),weekdays:"Sul_Lun_Meurzh_Merc\u02bcher_Yaou_Gwener_Sadorn".split("_"),weekdaysShort:"Sul_Lun_Meu_Mer_Yao_Gwe_Sad".split("_"),weekdaysMin:"Su_Lu_Me_Mer_Ya_Gw_Sa".split("_"),weekdaysParse:b,fullWeekdaysParse:[/^sul/i,/^lun/i,/^meurzh/i,/^merc[\u02bc\']her/i,/^yaou/i,/^gwener/i,/^sadorn/i],shortWeekdaysParse:[/^Sul/i,/^Lun/i,/^Meu/i,/^Mer/i,/^Yao/i,/^Gwe/i,/^Sad/i],minWeekdaysParse:b,monthsRegex:H,monthsShortRegex:H,monthsStrictRegex:/^(genver|c[\u02bc\']hwevrer|meurzh|ebrel|mae|mezheven|gouere|eost|gwengolo|here|du|kerzu)/i,monthsShortStrictRegex:/^(gen|c[\u02bc\']hwe|meu|ebr|mae|eve|gou|eos|gwe|her|du|ker)/i,monthsParse:w,longMonthsParse:w,shortMonthsParse:w,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [a viz] MMMM YYYY",LLL:"D [a viz] MMMM YYYY HH:mm",LLLL:"dddd, D [a viz] MMMM YYYY HH:mm"},calendar:{sameDay:"[Hiziv da] LT",nextDay:"[Warc\u02bchoazh da] LT",nextWeek:"dddd [da] LT",lastDay:"[Dec\u02bch da] LT",lastWeek:"dddd [paset da] LT",sameElse:"L"},relativeTime:{future:"a-benn %s",past:"%s \u02bczo",s:"un nebeud segondenno\xf9",ss:"%d eilenn",m:"ur vunutenn",mm:g,h:"un eur",hh:"%d eur",d:"un devezh",dd:g,M:"ur miz",MM:g,y:"ur bloaz",yy:function(e){switch(function e(a){if(9>> 0, + i; + + for (i = 0; i < len; i++) { + if (i in t && fun.call(this, t[i], i, t)) { + return true; + } + } + + return false; + }; + } + + function isValid(m) { + if (m._isValid == null) { + var flags = getParsingFlags(m), + parsedParts = some.call(flags.parsedDateParts, function (i) { + return i != null; + }), + isNowValid = + !isNaN(m._d.getTime()) && + flags.overflow < 0 && + !flags.empty && + !flags.invalidEra && + !flags.invalidMonth && + !flags.invalidWeekday && + !flags.weekdayMismatch && + !flags.nullInput && + !flags.invalidFormat && + !flags.userInvalidated && + (!flags.meridiem || (flags.meridiem && parsedParts)); + + if (m._strict) { + isNowValid = + isNowValid && + flags.charsLeftOver === 0 && + flags.unusedTokens.length === 0 && + flags.bigHour === undefined; + } + + if (Object.isFrozen == null || !Object.isFrozen(m)) { + m._isValid = isNowValid; + } else { + return isNowValid; + } + } + return m._isValid; + } + + function createInvalid(flags) { + var m = createUTC(NaN); + if (flags != null) { + extend(getParsingFlags(m), flags); + } else { + getParsingFlags(m).userInvalidated = true; + } + + return m; + } + + // Plugins that add properties should also add the key here (null value), + // so we can properly clone ourselves. + var momentProperties = (hooks.momentProperties = []), + updateInProgress = false; + + function copyConfig(to, from) { + var i, prop, val; + + if (!isUndefined(from._isAMomentObject)) { + to._isAMomentObject = from._isAMomentObject; + } + if (!isUndefined(from._i)) { + to._i = from._i; + } + if (!isUndefined(from._f)) { + to._f = from._f; + } + if (!isUndefined(from._l)) { + to._l = from._l; + } + if (!isUndefined(from._strict)) { + to._strict = from._strict; + } + if (!isUndefined(from._tzm)) { + to._tzm = from._tzm; + } + if (!isUndefined(from._isUTC)) { + to._isUTC = from._isUTC; + } + if (!isUndefined(from._offset)) { + to._offset = from._offset; + } + if (!isUndefined(from._pf)) { + to._pf = getParsingFlags(from); + } + if (!isUndefined(from._locale)) { + to._locale = from._locale; + } + + if (momentProperties.length > 0) { + for (i = 0; i < momentProperties.length; i++) { + prop = momentProperties[i]; + val = from[prop]; + if (!isUndefined(val)) { + to[prop] = val; + } + } + } + + return to; + } + + // Moment prototype object + function Moment(config) { + copyConfig(this, config); + this._d = new Date(config._d != null ? config._d.getTime() : NaN); + if (!this.isValid()) { + this._d = new Date(NaN); + } + // Prevent infinite loop in case updateOffset creates new moment + // objects. + if (updateInProgress === false) { + updateInProgress = true; + hooks.updateOffset(this); + updateInProgress = false; + } + } + + function isMoment(obj) { + return ( + obj instanceof Moment || (obj != null && obj._isAMomentObject != null) + ); + } + + function warn(msg) { + if ( + hooks.suppressDeprecationWarnings === false && + typeof console !== 'undefined' && + console.warn + ) { + console.warn('Deprecation warning: ' + msg); + } + } + + function deprecate(msg, fn) { + var firstTime = true; + + return extend(function () { + if (hooks.deprecationHandler != null) { + hooks.deprecationHandler(null, msg); + } + if (firstTime) { + var args = [], + arg, + i, + key; + for (i = 0; i < arguments.length; i++) { + arg = ''; + if (typeof arguments[i] === 'object') { + arg += '\n[' + i + '] '; + for (key in arguments[0]) { + if (hasOwnProp(arguments[0], key)) { + arg += key + ': ' + arguments[0][key] + ', '; + } + } + arg = arg.slice(0, -2); // Remove trailing comma and space + } else { + arg = arguments[i]; + } + args.push(arg); + } + warn( + msg + + '\nArguments: ' + + Array.prototype.slice.call(args).join('') + + '\n' + + new Error().stack + ); + firstTime = false; + } + return fn.apply(this, arguments); + }, fn); + } + + var deprecations = {}; + + function deprecateSimple(name, msg) { + if (hooks.deprecationHandler != null) { + hooks.deprecationHandler(name, msg); + } + if (!deprecations[name]) { + warn(msg); + deprecations[name] = true; + } + } + + hooks.suppressDeprecationWarnings = false; + hooks.deprecationHandler = null; + + function isFunction(input) { + return ( + (typeof Function !== 'undefined' && input instanceof Function) || + Object.prototype.toString.call(input) === '[object Function]' + ); + } + + function set(config) { + var prop, i; + for (i in config) { + if (hasOwnProp(config, i)) { + prop = config[i]; + if (isFunction(prop)) { + this[i] = prop; + } else { + this['_' + i] = prop; + } + } + } + this._config = config; + // Lenient ordinal parsing accepts just a number in addition to + // number + (possibly) stuff coming from _dayOfMonthOrdinalParse. + // TODO: Remove "ordinalParse" fallback in next major release. + this._dayOfMonthOrdinalParseLenient = new RegExp( + (this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) + + '|' + + /\d{1,2}/.source + ); + } + + function mergeConfigs(parentConfig, childConfig) { + var res = extend({}, parentConfig), + prop; + for (prop in childConfig) { + if (hasOwnProp(childConfig, prop)) { + if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) { + res[prop] = {}; + extend(res[prop], parentConfig[prop]); + extend(res[prop], childConfig[prop]); + } else if (childConfig[prop] != null) { + res[prop] = childConfig[prop]; + } else { + delete res[prop]; + } + } + } + for (prop in parentConfig) { + if ( + hasOwnProp(parentConfig, prop) && + !hasOwnProp(childConfig, prop) && + isObject(parentConfig[prop]) + ) { + // make sure changes to properties don't modify parent config + res[prop] = extend({}, res[prop]); + } + } + return res; + } + + function Locale(config) { + if (config != null) { + this.set(config); + } + } + + var keys; + + if (Object.keys) { + keys = Object.keys; + } else { + keys = function (obj) { + var i, + res = []; + for (i in obj) { + if (hasOwnProp(obj, i)) { + res.push(i); + } + } + return res; + }; + } + + var defaultCalendar = { + sameDay: '[Today at] LT', + nextDay: '[Tomorrow at] LT', + nextWeek: 'dddd [at] LT', + lastDay: '[Yesterday at] LT', + lastWeek: '[Last] dddd [at] LT', + sameElse: 'L', + }; + + function calendar(key, mom, now) { + var output = this._calendar[key] || this._calendar['sameElse']; + return isFunction(output) ? output.call(mom, now) : output; + } + + function zeroFill(number, targetLength, forceSign) { + var absNumber = '' + Math.abs(number), + zerosToFill = targetLength - absNumber.length, + sign = number >= 0; + return ( + (sign ? (forceSign ? '+' : '') : '-') + + Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) + + absNumber + ); + } + + var formattingTokens = /(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g, + localFormattingTokens = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g, + formatFunctions = {}, + formatTokenFunctions = {}; + + // token: 'M' + // padded: ['MM', 2] + // ordinal: 'Mo' + // callback: function () { this.month() + 1 } + function addFormatToken(token, padded, ordinal, callback) { + var func = callback; + if (typeof callback === 'string') { + func = function () { + return this[callback](); + }; + } + if (token) { + formatTokenFunctions[token] = func; + } + if (padded) { + formatTokenFunctions[padded[0]] = function () { + return zeroFill(func.apply(this, arguments), padded[1], padded[2]); + }; + } + if (ordinal) { + formatTokenFunctions[ordinal] = function () { + return this.localeData().ordinal( + func.apply(this, arguments), + token + ); + }; + } + } + + function removeFormattingTokens(input) { + if (input.match(/\[[\s\S]/)) { + return input.replace(/^\[|\]$/g, ''); + } + return input.replace(/\\/g, ''); + } + + function makeFormatFunction(format) { + var array = format.match(formattingTokens), + i, + length; + + for (i = 0, length = array.length; i < length; i++) { + if (formatTokenFunctions[array[i]]) { + array[i] = formatTokenFunctions[array[i]]; + } else { + array[i] = removeFormattingTokens(array[i]); + } + } + + return function (mom) { + var output = '', + i; + for (i = 0; i < length; i++) { + output += isFunction(array[i]) + ? array[i].call(mom, format) + : array[i]; + } + return output; + }; + } + + // format date using native date object + function formatMoment(m, format) { + if (!m.isValid()) { + return m.localeData().invalidDate(); + } + + format = expandFormat(format, m.localeData()); + formatFunctions[format] = + formatFunctions[format] || makeFormatFunction(format); + + return formatFunctions[format](m); + } + + function expandFormat(format, locale) { + var i = 5; + + function replaceLongDateFormatTokens(input) { + return locale.longDateFormat(input) || input; + } + + localFormattingTokens.lastIndex = 0; + while (i >= 0 && localFormattingTokens.test(format)) { + format = format.replace( + localFormattingTokens, + replaceLongDateFormatTokens + ); + localFormattingTokens.lastIndex = 0; + i -= 1; + } + + return format; + } + + var defaultLongDateFormat = { + LTS: 'h:mm:ss A', + LT: 'h:mm A', + L: 'MM/DD/YYYY', + LL: 'MMMM D, YYYY', + LLL: 'MMMM D, YYYY h:mm A', + LLLL: 'dddd, MMMM D, YYYY h:mm A', + }; + + function longDateFormat(key) { + var format = this._longDateFormat[key], + formatUpper = this._longDateFormat[key.toUpperCase()]; + + if (format || !formatUpper) { + return format; + } + + this._longDateFormat[key] = formatUpper + .match(formattingTokens) + .map(function (tok) { + if ( + tok === 'MMMM' || + tok === 'MM' || + tok === 'DD' || + tok === 'dddd' + ) { + return tok.slice(1); + } + return tok; + }) + .join(''); + + return this._longDateFormat[key]; + } + + var defaultInvalidDate = 'Invalid date'; + + function invalidDate() { + return this._invalidDate; + } + + var defaultOrdinal = '%d', + defaultDayOfMonthOrdinalParse = /\d{1,2}/; + + function ordinal(number) { + return this._ordinal.replace('%d', number); + } + + var defaultRelativeTime = { + future: 'in %s', + past: '%s ago', + s: 'a few seconds', + ss: '%d seconds', + m: 'a minute', + mm: '%d minutes', + h: 'an hour', + hh: '%d hours', + d: 'a day', + dd: '%d days', + w: 'a week', + ww: '%d weeks', + M: 'a month', + MM: '%d months', + y: 'a year', + yy: '%d years', + }; + + function relativeTime(number, withoutSuffix, string, isFuture) { + var output = this._relativeTime[string]; + return isFunction(output) + ? output(number, withoutSuffix, string, isFuture) + : output.replace(/%d/i, number); + } + + function pastFuture(diff, output) { + var format = this._relativeTime[diff > 0 ? 'future' : 'past']; + return isFunction(format) ? format(output) : format.replace(/%s/i, output); + } + + var aliases = {}; + + function addUnitAlias(unit, shorthand) { + var lowerCase = unit.toLowerCase(); + aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit; + } + + function normalizeUnits(units) { + return typeof units === 'string' + ? aliases[units] || aliases[units.toLowerCase()] + : undefined; + } + + function normalizeObjectUnits(inputObject) { + var normalizedInput = {}, + normalizedProp, + prop; + + for (prop in inputObject) { + if (hasOwnProp(inputObject, prop)) { + normalizedProp = normalizeUnits(prop); + if (normalizedProp) { + normalizedInput[normalizedProp] = inputObject[prop]; + } + } + } + + return normalizedInput; + } + + var priorities = {}; + + function addUnitPriority(unit, priority) { + priorities[unit] = priority; + } + + function getPrioritizedUnits(unitsObj) { + var units = [], + u; + for (u in unitsObj) { + if (hasOwnProp(unitsObj, u)) { + units.push({ unit: u, priority: priorities[u] }); + } + } + units.sort(function (a, b) { + return a.priority - b.priority; + }); + return units; + } + + function isLeapYear(year) { + return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0; + } + + function absFloor(number) { + if (number < 0) { + // -0 -> 0 + return Math.ceil(number) || 0; + } else { + return Math.floor(number); + } + } + + function toInt(argumentForCoercion) { + var coercedNumber = +argumentForCoercion, + value = 0; + + if (coercedNumber !== 0 && isFinite(coercedNumber)) { + value = absFloor(coercedNumber); + } + + return value; + } + + function makeGetSet(unit, keepTime) { + return function (value) { + if (value != null) { + set$1(this, unit, value); + hooks.updateOffset(this, keepTime); + return this; + } else { + return get(this, unit); + } + }; + } + + function get(mom, unit) { + return mom.isValid() + ? mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]() + : NaN; + } + + function set$1(mom, unit, value) { + if (mom.isValid() && !isNaN(value)) { + if ( + unit === 'FullYear' && + isLeapYear(mom.year()) && + mom.month() === 1 && + mom.date() === 29 + ) { + value = toInt(value); + mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit]( + value, + mom.month(), + daysInMonth(value, mom.month()) + ); + } else { + mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value); + } + } + } + + // MOMENTS + + function stringGet(units) { + units = normalizeUnits(units); + if (isFunction(this[units])) { + return this[units](); + } + return this; + } + + function stringSet(units, value) { + if (typeof units === 'object') { + units = normalizeObjectUnits(units); + var prioritized = getPrioritizedUnits(units), + i; + for (i = 0; i < prioritized.length; i++) { + this[prioritized[i].unit](units[prioritized[i].unit]); + } + } else { + units = normalizeUnits(units); + if (isFunction(this[units])) { + return this[units](value); + } + } + return this; + } + + var match1 = /\d/, // 0 - 9 + match2 = /\d\d/, // 00 - 99 + match3 = /\d{3}/, // 000 - 999 + match4 = /\d{4}/, // 0000 - 9999 + match6 = /[+-]?\d{6}/, // -999999 - 999999 + match1to2 = /\d\d?/, // 0 - 99 + match3to4 = /\d\d\d\d?/, // 999 - 9999 + match5to6 = /\d\d\d\d\d\d?/, // 99999 - 999999 + match1to3 = /\d{1,3}/, // 0 - 999 + match1to4 = /\d{1,4}/, // 0 - 9999 + match1to6 = /[+-]?\d{1,6}/, // -999999 - 999999 + matchUnsigned = /\d+/, // 0 - inf + matchSigned = /[+-]?\d+/, // -inf - inf + matchOffset = /Z|[+-]\d\d:?\d\d/gi, // +00:00 -00:00 +0000 -0000 or Z + matchShortOffset = /Z|[+-]\d\d(?::?\d\d)?/gi, // +00 -00 +00:00 -00:00 +0000 -0000 or Z + matchTimestamp = /[+-]?\d+(\.\d{1,3})?/, // 123456789 123456789.123 + // any word (or two) characters or numbers including two/three word month in arabic. + // includes scottish gaelic two word and hyphenated months + matchWord = /[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i, + regexes; + + regexes = {}; + + function addRegexToken(token, regex, strictRegex) { + regexes[token] = isFunction(regex) + ? regex + : function (isStrict, localeData) { + return isStrict && strictRegex ? strictRegex : regex; + }; + } + + function getParseRegexForToken(token, config) { + if (!hasOwnProp(regexes, token)) { + return new RegExp(unescapeFormat(token)); + } + + return regexes[token](config._strict, config._locale); + } + + // Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript + function unescapeFormat(s) { + return regexEscape( + s + .replace('\\', '') + .replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g, function ( + matched, + p1, + p2, + p3, + p4 + ) { + return p1 || p2 || p3 || p4; + }) + ); + } + + function regexEscape(s) { + return s.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&'); + } + + var tokens = {}; + + function addParseToken(token, callback) { + var i, + func = callback; + if (typeof token === 'string') { + token = [token]; + } + if (isNumber(callback)) { + func = function (input, array) { + array[callback] = toInt(input); + }; + } + for (i = 0; i < token.length; i++) { + tokens[token[i]] = func; + } + } + + function addWeekParseToken(token, callback) { + addParseToken(token, function (input, array, config, token) { + config._w = config._w || {}; + callback(input, config._w, config, token); + }); + } + + function addTimeToArrayFromToken(token, input, config) { + if (input != null && hasOwnProp(tokens, token)) { + tokens[token](input, config._a, config, token); + } + } + + var YEAR = 0, + MONTH = 1, + DATE = 2, + HOUR = 3, + MINUTE = 4, + SECOND = 5, + MILLISECOND = 6, + WEEK = 7, + WEEKDAY = 8; + + function mod(n, x) { + return ((n % x) + x) % x; + } + + var indexOf; + + if (Array.prototype.indexOf) { + indexOf = Array.prototype.indexOf; + } else { + indexOf = function (o) { + // I know + var i; + for (i = 0; i < this.length; ++i) { + if (this[i] === o) { + return i; + } + } + return -1; + }; + } + + function daysInMonth(year, month) { + if (isNaN(year) || isNaN(month)) { + return NaN; + } + var modMonth = mod(month, 12); + year += (month - modMonth) / 12; + return modMonth === 1 + ? isLeapYear(year) + ? 29 + : 28 + : 31 - ((modMonth % 7) % 2); + } + + // FORMATTING + + addFormatToken('M', ['MM', 2], 'Mo', function () { + return this.month() + 1; + }); + + addFormatToken('MMM', 0, 0, function (format) { + return this.localeData().monthsShort(this, format); + }); + + addFormatToken('MMMM', 0, 0, function (format) { + return this.localeData().months(this, format); + }); + + // ALIASES + + addUnitAlias('month', 'M'); + + // PRIORITY + + addUnitPriority('month', 8); + + // PARSING + + addRegexToken('M', match1to2); + addRegexToken('MM', match1to2, match2); + addRegexToken('MMM', function (isStrict, locale) { + return locale.monthsShortRegex(isStrict); + }); + addRegexToken('MMMM', function (isStrict, locale) { + return locale.monthsRegex(isStrict); + }); + + addParseToken(['M', 'MM'], function (input, array) { + array[MONTH] = toInt(input) - 1; + }); + + addParseToken(['MMM', 'MMMM'], function (input, array, config, token) { + var month = config._locale.monthsParse(input, token, config._strict); + // if we didn't find a month name, mark the date as invalid. + if (month != null) { + array[MONTH] = month; + } else { + getParsingFlags(config).invalidMonth = input; + } + }); + + // LOCALES + + var defaultLocaleMonths = 'January_February_March_April_May_June_July_August_September_October_November_December'.split( + '_' + ), + defaultLocaleMonthsShort = 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split( + '_' + ), + MONTHS_IN_FORMAT = /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/, + defaultMonthsShortRegex = matchWord, + defaultMonthsRegex = matchWord; + + function localeMonths(m, format) { + if (!m) { + return isArray(this._months) + ? this._months + : this._months['standalone']; + } + return isArray(this._months) + ? this._months[m.month()] + : this._months[ + (this._months.isFormat || MONTHS_IN_FORMAT).test(format) + ? 'format' + : 'standalone' + ][m.month()]; + } + + function localeMonthsShort(m, format) { + if (!m) { + return isArray(this._monthsShort) + ? this._monthsShort + : this._monthsShort['standalone']; + } + return isArray(this._monthsShort) + ? this._monthsShort[m.month()] + : this._monthsShort[ + MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone' + ][m.month()]; + } + + function handleStrictParse(monthName, format, strict) { + var i, + ii, + mom, + llc = monthName.toLocaleLowerCase(); + if (!this._monthsParse) { + // this is not used + this._monthsParse = []; + this._longMonthsParse = []; + this._shortMonthsParse = []; + for (i = 0; i < 12; ++i) { + mom = createUTC([2000, i]); + this._shortMonthsParse[i] = this.monthsShort( + mom, + '' + ).toLocaleLowerCase(); + this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase(); + } + } + + if (strict) { + if (format === 'MMM') { + ii = indexOf.call(this._shortMonthsParse, llc); + return ii !== -1 ? ii : null; + } else { + ii = indexOf.call(this._longMonthsParse, llc); + return ii !== -1 ? ii : null; + } + } else { + if (format === 'MMM') { + ii = indexOf.call(this._shortMonthsParse, llc); + if (ii !== -1) { + return ii; + } + ii = indexOf.call(this._longMonthsParse, llc); + return ii !== -1 ? ii : null; + } else { + ii = indexOf.call(this._longMonthsParse, llc); + if (ii !== -1) { + return ii; + } + ii = indexOf.call(this._shortMonthsParse, llc); + return ii !== -1 ? ii : null; + } + } + } + + function localeMonthsParse(monthName, format, strict) { + var i, mom, regex; + + if (this._monthsParseExact) { + return handleStrictParse.call(this, monthName, format, strict); + } + + if (!this._monthsParse) { + this._monthsParse = []; + this._longMonthsParse = []; + this._shortMonthsParse = []; + } + + // TODO: add sorting + // Sorting makes sure if one month (or abbr) is a prefix of another + // see sorting in computeMonthsParse + for (i = 0; i < 12; i++) { + // make the regex if we don't have it already + mom = createUTC([2000, i]); + if (strict && !this._longMonthsParse[i]) { + this._longMonthsParse[i] = new RegExp( + '^' + this.months(mom, '').replace('.', '') + '$', + 'i' + ); + this._shortMonthsParse[i] = new RegExp( + '^' + this.monthsShort(mom, '').replace('.', '') + '$', + 'i' + ); + } + if (!strict && !this._monthsParse[i]) { + regex = + '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, ''); + this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i'); + } + // test the regex + if ( + strict && + format === 'MMMM' && + this._longMonthsParse[i].test(monthName) + ) { + return i; + } else if ( + strict && + format === 'MMM' && + this._shortMonthsParse[i].test(monthName) + ) { + return i; + } else if (!strict && this._monthsParse[i].test(monthName)) { + return i; + } + } + } + + // MOMENTS + + function setMonth(mom, value) { + var dayOfMonth; + + if (!mom.isValid()) { + // No op + return mom; + } + + if (typeof value === 'string') { + if (/^\d+$/.test(value)) { + value = toInt(value); + } else { + value = mom.localeData().monthsParse(value); + // TODO: Another silent failure? + if (!isNumber(value)) { + return mom; + } + } + } + + dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value)); + mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth); + return mom; + } + + function getSetMonth(value) { + if (value != null) { + setMonth(this, value); + hooks.updateOffset(this, true); + return this; + } else { + return get(this, 'Month'); + } + } + + function getDaysInMonth() { + return daysInMonth(this.year(), this.month()); + } + + function monthsShortRegex(isStrict) { + if (this._monthsParseExact) { + if (!hasOwnProp(this, '_monthsRegex')) { + computeMonthsParse.call(this); + } + if (isStrict) { + return this._monthsShortStrictRegex; + } else { + return this._monthsShortRegex; + } + } else { + if (!hasOwnProp(this, '_monthsShortRegex')) { + this._monthsShortRegex = defaultMonthsShortRegex; + } + return this._monthsShortStrictRegex && isStrict + ? this._monthsShortStrictRegex + : this._monthsShortRegex; + } + } + + function monthsRegex(isStrict) { + if (this._monthsParseExact) { + if (!hasOwnProp(this, '_monthsRegex')) { + computeMonthsParse.call(this); + } + if (isStrict) { + return this._monthsStrictRegex; + } else { + return this._monthsRegex; + } + } else { + if (!hasOwnProp(this, '_monthsRegex')) { + this._monthsRegex = defaultMonthsRegex; + } + return this._monthsStrictRegex && isStrict + ? this._monthsStrictRegex + : this._monthsRegex; + } + } + + function computeMonthsParse() { + function cmpLenRev(a, b) { + return b.length - a.length; + } + + var shortPieces = [], + longPieces = [], + mixedPieces = [], + i, + mom; + for (i = 0; i < 12; i++) { + // make the regex if we don't have it already + mom = createUTC([2000, i]); + shortPieces.push(this.monthsShort(mom, '')); + longPieces.push(this.months(mom, '')); + mixedPieces.push(this.months(mom, '')); + mixedPieces.push(this.monthsShort(mom, '')); + } + // Sorting makes sure if one month (or abbr) is a prefix of another it + // will match the longer piece. + shortPieces.sort(cmpLenRev); + longPieces.sort(cmpLenRev); + mixedPieces.sort(cmpLenRev); + for (i = 0; i < 12; i++) { + shortPieces[i] = regexEscape(shortPieces[i]); + longPieces[i] = regexEscape(longPieces[i]); + } + for (i = 0; i < 24; i++) { + mixedPieces[i] = regexEscape(mixedPieces[i]); + } + + this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i'); + this._monthsShortRegex = this._monthsRegex; + this._monthsStrictRegex = new RegExp( + '^(' + longPieces.join('|') + ')', + 'i' + ); + this._monthsShortStrictRegex = new RegExp( + '^(' + shortPieces.join('|') + ')', + 'i' + ); + } + + // FORMATTING + + addFormatToken('Y', 0, 0, function () { + var y = this.year(); + return y <= 9999 ? zeroFill(y, 4) : '+' + y; + }); + + addFormatToken(0, ['YY', 2], 0, function () { + return this.year() % 100; + }); + + addFormatToken(0, ['YYYY', 4], 0, 'year'); + addFormatToken(0, ['YYYYY', 5], 0, 'year'); + addFormatToken(0, ['YYYYYY', 6, true], 0, 'year'); + + // ALIASES + + addUnitAlias('year', 'y'); + + // PRIORITIES + + addUnitPriority('year', 1); + + // PARSING + + addRegexToken('Y', matchSigned); + addRegexToken('YY', match1to2, match2); + addRegexToken('YYYY', match1to4, match4); + addRegexToken('YYYYY', match1to6, match6); + addRegexToken('YYYYYY', match1to6, match6); + + addParseToken(['YYYYY', 'YYYYYY'], YEAR); + addParseToken('YYYY', function (input, array) { + array[YEAR] = + input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input); + }); + addParseToken('YY', function (input, array) { + array[YEAR] = hooks.parseTwoDigitYear(input); + }); + addParseToken('Y', function (input, array) { + array[YEAR] = parseInt(input, 10); + }); + + // HELPERS + + function daysInYear(year) { + return isLeapYear(year) ? 366 : 365; + } + + // HOOKS + + hooks.parseTwoDigitYear = function (input) { + return toInt(input) + (toInt(input) > 68 ? 1900 : 2000); + }; + + // MOMENTS + + var getSetYear = makeGetSet('FullYear', true); + + function getIsLeapYear() { + return isLeapYear(this.year()); + } + + function createDate(y, m, d, h, M, s, ms) { + // can't just apply() to create a date: + // https://stackoverflow.com/q/181348 + var date; + // the date constructor remaps years 0-99 to 1900-1999 + if (y < 100 && y >= 0) { + // preserve leap years using a full 400 year cycle, then reset + date = new Date(y + 400, m, d, h, M, s, ms); + if (isFinite(date.getFullYear())) { + date.setFullYear(y); + } + } else { + date = new Date(y, m, d, h, M, s, ms); + } + + return date; + } + + function createUTCDate(y) { + var date, args; + // the Date.UTC function remaps years 0-99 to 1900-1999 + if (y < 100 && y >= 0) { + args = Array.prototype.slice.call(arguments); + // preserve leap years using a full 400 year cycle, then reset + args[0] = y + 400; + date = new Date(Date.UTC.apply(null, args)); + if (isFinite(date.getUTCFullYear())) { + date.setUTCFullYear(y); + } + } else { + date = new Date(Date.UTC.apply(null, arguments)); + } + + return date; + } + + // start-of-first-week - start-of-year + function firstWeekOffset(year, dow, doy) { + var // first-week day -- which january is always in the first week (4 for iso, 1 for other) + fwd = 7 + dow - doy, + // first-week day local weekday -- which local weekday is fwd + fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7; + + return -fwdlw + fwd - 1; + } + + // https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday + function dayOfYearFromWeeks(year, week, weekday, dow, doy) { + var localWeekday = (7 + weekday - dow) % 7, + weekOffset = firstWeekOffset(year, dow, doy), + dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset, + resYear, + resDayOfYear; + + if (dayOfYear <= 0) { + resYear = year - 1; + resDayOfYear = daysInYear(resYear) + dayOfYear; + } else if (dayOfYear > daysInYear(year)) { + resYear = year + 1; + resDayOfYear = dayOfYear - daysInYear(year); + } else { + resYear = year; + resDayOfYear = dayOfYear; + } + + return { + year: resYear, + dayOfYear: resDayOfYear, + }; + } + + function weekOfYear(mom, dow, doy) { + var weekOffset = firstWeekOffset(mom.year(), dow, doy), + week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1, + resWeek, + resYear; + + if (week < 1) { + resYear = mom.year() - 1; + resWeek = week + weeksInYear(resYear, dow, doy); + } else if (week > weeksInYear(mom.year(), dow, doy)) { + resWeek = week - weeksInYear(mom.year(), dow, doy); + resYear = mom.year() + 1; + } else { + resYear = mom.year(); + resWeek = week; + } + + return { + week: resWeek, + year: resYear, + }; + } + + function weeksInYear(year, dow, doy) { + var weekOffset = firstWeekOffset(year, dow, doy), + weekOffsetNext = firstWeekOffset(year + 1, dow, doy); + return (daysInYear(year) - weekOffset + weekOffsetNext) / 7; + } + + // FORMATTING + + addFormatToken('w', ['ww', 2], 'wo', 'week'); + addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek'); + + // ALIASES + + addUnitAlias('week', 'w'); + addUnitAlias('isoWeek', 'W'); + + // PRIORITIES + + addUnitPriority('week', 5); + addUnitPriority('isoWeek', 5); + + // PARSING + + addRegexToken('w', match1to2); + addRegexToken('ww', match1to2, match2); + addRegexToken('W', match1to2); + addRegexToken('WW', match1to2, match2); + + addWeekParseToken(['w', 'ww', 'W', 'WW'], function ( + input, + week, + config, + token + ) { + week[token.substr(0, 1)] = toInt(input); + }); + + // HELPERS + + // LOCALES + + function localeWeek(mom) { + return weekOfYear(mom, this._week.dow, this._week.doy).week; + } + + var defaultLocaleWeek = { + dow: 0, // Sunday is the first day of the week. + doy: 6, // The week that contains Jan 6th is the first week of the year. + }; + + function localeFirstDayOfWeek() { + return this._week.dow; + } + + function localeFirstDayOfYear() { + return this._week.doy; + } + + // MOMENTS + + function getSetWeek(input) { + var week = this.localeData().week(this); + return input == null ? week : this.add((input - week) * 7, 'd'); + } + + function getSetISOWeek(input) { + var week = weekOfYear(this, 1, 4).week; + return input == null ? week : this.add((input - week) * 7, 'd'); + } + + // FORMATTING + + addFormatToken('d', 0, 'do', 'day'); + + addFormatToken('dd', 0, 0, function (format) { + return this.localeData().weekdaysMin(this, format); + }); + + addFormatToken('ddd', 0, 0, function (format) { + return this.localeData().weekdaysShort(this, format); + }); + + addFormatToken('dddd', 0, 0, function (format) { + return this.localeData().weekdays(this, format); + }); + + addFormatToken('e', 0, 0, 'weekday'); + addFormatToken('E', 0, 0, 'isoWeekday'); + + // ALIASES + + addUnitAlias('day', 'd'); + addUnitAlias('weekday', 'e'); + addUnitAlias('isoWeekday', 'E'); + + // PRIORITY + addUnitPriority('day', 11); + addUnitPriority('weekday', 11); + addUnitPriority('isoWeekday', 11); + + // PARSING + + addRegexToken('d', match1to2); + addRegexToken('e', match1to2); + addRegexToken('E', match1to2); + addRegexToken('dd', function (isStrict, locale) { + return locale.weekdaysMinRegex(isStrict); + }); + addRegexToken('ddd', function (isStrict, locale) { + return locale.weekdaysShortRegex(isStrict); + }); + addRegexToken('dddd', function (isStrict, locale) { + return locale.weekdaysRegex(isStrict); + }); + + addWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) { + var weekday = config._locale.weekdaysParse(input, token, config._strict); + // if we didn't get a weekday name, mark the date as invalid + if (weekday != null) { + week.d = weekday; + } else { + getParsingFlags(config).invalidWeekday = input; + } + }); + + addWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) { + week[token] = toInt(input); + }); + + // HELPERS + + function parseWeekday(input, locale) { + if (typeof input !== 'string') { + return input; + } + + if (!isNaN(input)) { + return parseInt(input, 10); + } + + input = locale.weekdaysParse(input); + if (typeof input === 'number') { + return input; + } + + return null; + } + + function parseIsoWeekday(input, locale) { + if (typeof input === 'string') { + return locale.weekdaysParse(input) % 7 || 7; + } + return isNaN(input) ? null : input; + } + + // LOCALES + function shiftWeekdays(ws, n) { + return ws.slice(n, 7).concat(ws.slice(0, n)); + } + + var defaultLocaleWeekdays = 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split( + '_' + ), + defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'), + defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'), + defaultWeekdaysRegex = matchWord, + defaultWeekdaysShortRegex = matchWord, + defaultWeekdaysMinRegex = matchWord; + + function localeWeekdays(m, format) { + var weekdays = isArray(this._weekdays) + ? this._weekdays + : this._weekdays[ + m && m !== true && this._weekdays.isFormat.test(format) + ? 'format' + : 'standalone' + ]; + return m === true + ? shiftWeekdays(weekdays, this._week.dow) + : m + ? weekdays[m.day()] + : weekdays; + } + + function localeWeekdaysShort(m) { + return m === true + ? shiftWeekdays(this._weekdaysShort, this._week.dow) + : m + ? this._weekdaysShort[m.day()] + : this._weekdaysShort; + } + + function localeWeekdaysMin(m) { + return m === true + ? shiftWeekdays(this._weekdaysMin, this._week.dow) + : m + ? this._weekdaysMin[m.day()] + : this._weekdaysMin; + } + + function handleStrictParse$1(weekdayName, format, strict) { + var i, + ii, + mom, + llc = weekdayName.toLocaleLowerCase(); + if (!this._weekdaysParse) { + this._weekdaysParse = []; + this._shortWeekdaysParse = []; + this._minWeekdaysParse = []; + + for (i = 0; i < 7; ++i) { + mom = createUTC([2000, 1]).day(i); + this._minWeekdaysParse[i] = this.weekdaysMin( + mom, + '' + ).toLocaleLowerCase(); + this._shortWeekdaysParse[i] = this.weekdaysShort( + mom, + '' + ).toLocaleLowerCase(); + this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase(); + } + } + + if (strict) { + if (format === 'dddd') { + ii = indexOf.call(this._weekdaysParse, llc); + return ii !== -1 ? ii : null; + } else if (format === 'ddd') { + ii = indexOf.call(this._shortWeekdaysParse, llc); + return ii !== -1 ? ii : null; + } else { + ii = indexOf.call(this._minWeekdaysParse, llc); + return ii !== -1 ? ii : null; + } + } else { + if (format === 'dddd') { + ii = indexOf.call(this._weekdaysParse, llc); + if (ii !== -1) { + return ii; + } + ii = indexOf.call(this._shortWeekdaysParse, llc); + if (ii !== -1) { + return ii; + } + ii = indexOf.call(this._minWeekdaysParse, llc); + return ii !== -1 ? ii : null; + } else if (format === 'ddd') { + ii = indexOf.call(this._shortWeekdaysParse, llc); + if (ii !== -1) { + return ii; + } + ii = indexOf.call(this._weekdaysParse, llc); + if (ii !== -1) { + return ii; + } + ii = indexOf.call(this._minWeekdaysParse, llc); + return ii !== -1 ? ii : null; + } else { + ii = indexOf.call(this._minWeekdaysParse, llc); + if (ii !== -1) { + return ii; + } + ii = indexOf.call(this._weekdaysParse, llc); + if (ii !== -1) { + return ii; + } + ii = indexOf.call(this._shortWeekdaysParse, llc); + return ii !== -1 ? ii : null; + } + } + } + + function localeWeekdaysParse(weekdayName, format, strict) { + var i, mom, regex; + + if (this._weekdaysParseExact) { + return handleStrictParse$1.call(this, weekdayName, format, strict); + } + + if (!this._weekdaysParse) { + this._weekdaysParse = []; + this._minWeekdaysParse = []; + this._shortWeekdaysParse = []; + this._fullWeekdaysParse = []; + } + + for (i = 0; i < 7; i++) { + // make the regex if we don't have it already + + mom = createUTC([2000, 1]).day(i); + if (strict && !this._fullWeekdaysParse[i]) { + this._fullWeekdaysParse[i] = new RegExp( + '^' + this.weekdays(mom, '').replace('.', '\\.?') + '$', + 'i' + ); + this._shortWeekdaysParse[i] = new RegExp( + '^' + this.weekdaysShort(mom, '').replace('.', '\\.?') + '$', + 'i' + ); + this._minWeekdaysParse[i] = new RegExp( + '^' + this.weekdaysMin(mom, '').replace('.', '\\.?') + '$', + 'i' + ); + } + if (!this._weekdaysParse[i]) { + regex = + '^' + + this.weekdays(mom, '') + + '|^' + + this.weekdaysShort(mom, '') + + '|^' + + this.weekdaysMin(mom, ''); + this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i'); + } + // test the regex + if ( + strict && + format === 'dddd' && + this._fullWeekdaysParse[i].test(weekdayName) + ) { + return i; + } else if ( + strict && + format === 'ddd' && + this._shortWeekdaysParse[i].test(weekdayName) + ) { + return i; + } else if ( + strict && + format === 'dd' && + this._minWeekdaysParse[i].test(weekdayName) + ) { + return i; + } else if (!strict && this._weekdaysParse[i].test(weekdayName)) { + return i; + } + } + } + + // MOMENTS + + function getSetDayOfWeek(input) { + if (!this.isValid()) { + return input != null ? this : NaN; + } + var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay(); + if (input != null) { + input = parseWeekday(input, this.localeData()); + return this.add(input - day, 'd'); + } else { + return day; + } + } + + function getSetLocaleDayOfWeek(input) { + if (!this.isValid()) { + return input != null ? this : NaN; + } + var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7; + return input == null ? weekday : this.add(input - weekday, 'd'); + } + + function getSetISODayOfWeek(input) { + if (!this.isValid()) { + return input != null ? this : NaN; + } + + // behaves the same as moment#day except + // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6) + // as a setter, sunday should belong to the previous week. + + if (input != null) { + var weekday = parseIsoWeekday(input, this.localeData()); + return this.day(this.day() % 7 ? weekday : weekday - 7); + } else { + return this.day() || 7; + } + } + + function weekdaysRegex(isStrict) { + if (this._weekdaysParseExact) { + if (!hasOwnProp(this, '_weekdaysRegex')) { + computeWeekdaysParse.call(this); + } + if (isStrict) { + return this._weekdaysStrictRegex; + } else { + return this._weekdaysRegex; + } + } else { + if (!hasOwnProp(this, '_weekdaysRegex')) { + this._weekdaysRegex = defaultWeekdaysRegex; + } + return this._weekdaysStrictRegex && isStrict + ? this._weekdaysStrictRegex + : this._weekdaysRegex; + } + } + + function weekdaysShortRegex(isStrict) { + if (this._weekdaysParseExact) { + if (!hasOwnProp(this, '_weekdaysRegex')) { + computeWeekdaysParse.call(this); + } + if (isStrict) { + return this._weekdaysShortStrictRegex; + } else { + return this._weekdaysShortRegex; + } + } else { + if (!hasOwnProp(this, '_weekdaysShortRegex')) { + this._weekdaysShortRegex = defaultWeekdaysShortRegex; + } + return this._weekdaysShortStrictRegex && isStrict + ? this._weekdaysShortStrictRegex + : this._weekdaysShortRegex; + } + } + + function weekdaysMinRegex(isStrict) { + if (this._weekdaysParseExact) { + if (!hasOwnProp(this, '_weekdaysRegex')) { + computeWeekdaysParse.call(this); + } + if (isStrict) { + return this._weekdaysMinStrictRegex; + } else { + return this._weekdaysMinRegex; + } + } else { + if (!hasOwnProp(this, '_weekdaysMinRegex')) { + this._weekdaysMinRegex = defaultWeekdaysMinRegex; + } + return this._weekdaysMinStrictRegex && isStrict + ? this._weekdaysMinStrictRegex + : this._weekdaysMinRegex; + } + } + + function computeWeekdaysParse() { + function cmpLenRev(a, b) { + return b.length - a.length; + } + + var minPieces = [], + shortPieces = [], + longPieces = [], + mixedPieces = [], + i, + mom, + minp, + shortp, + longp; + for (i = 0; i < 7; i++) { + // make the regex if we don't have it already + mom = createUTC([2000, 1]).day(i); + minp = regexEscape(this.weekdaysMin(mom, '')); + shortp = regexEscape(this.weekdaysShort(mom, '')); + longp = regexEscape(this.weekdays(mom, '')); + minPieces.push(minp); + shortPieces.push(shortp); + longPieces.push(longp); + mixedPieces.push(minp); + mixedPieces.push(shortp); + mixedPieces.push(longp); + } + // Sorting makes sure if one weekday (or abbr) is a prefix of another it + // will match the longer piece. + minPieces.sort(cmpLenRev); + shortPieces.sort(cmpLenRev); + longPieces.sort(cmpLenRev); + mixedPieces.sort(cmpLenRev); + + this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i'); + this._weekdaysShortRegex = this._weekdaysRegex; + this._weekdaysMinRegex = this._weekdaysRegex; + + this._weekdaysStrictRegex = new RegExp( + '^(' + longPieces.join('|') + ')', + 'i' + ); + this._weekdaysShortStrictRegex = new RegExp( + '^(' + shortPieces.join('|') + ')', + 'i' + ); + this._weekdaysMinStrictRegex = new RegExp( + '^(' + minPieces.join('|') + ')', + 'i' + ); + } + + // FORMATTING + + function hFormat() { + return this.hours() % 12 || 12; + } + + function kFormat() { + return this.hours() || 24; + } + + addFormatToken('H', ['HH', 2], 0, 'hour'); + addFormatToken('h', ['hh', 2], 0, hFormat); + addFormatToken('k', ['kk', 2], 0, kFormat); + + addFormatToken('hmm', 0, 0, function () { + return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2); + }); + + addFormatToken('hmmss', 0, 0, function () { + return ( + '' + + hFormat.apply(this) + + zeroFill(this.minutes(), 2) + + zeroFill(this.seconds(), 2) + ); + }); + + addFormatToken('Hmm', 0, 0, function () { + return '' + this.hours() + zeroFill(this.minutes(), 2); + }); + + addFormatToken('Hmmss', 0, 0, function () { + return ( + '' + + this.hours() + + zeroFill(this.minutes(), 2) + + zeroFill(this.seconds(), 2) + ); + }); + + function meridiem(token, lowercase) { + addFormatToken(token, 0, 0, function () { + return this.localeData().meridiem( + this.hours(), + this.minutes(), + lowercase + ); + }); + } + + meridiem('a', true); + meridiem('A', false); + + // ALIASES + + addUnitAlias('hour', 'h'); + + // PRIORITY + addUnitPriority('hour', 13); + + // PARSING + + function matchMeridiem(isStrict, locale) { + return locale._meridiemParse; + } + + addRegexToken('a', matchMeridiem); + addRegexToken('A', matchMeridiem); + addRegexToken('H', match1to2); + addRegexToken('h', match1to2); + addRegexToken('k', match1to2); + addRegexToken('HH', match1to2, match2); + addRegexToken('hh', match1to2, match2); + addRegexToken('kk', match1to2, match2); + + addRegexToken('hmm', match3to4); + addRegexToken('hmmss', match5to6); + addRegexToken('Hmm', match3to4); + addRegexToken('Hmmss', match5to6); + + addParseToken(['H', 'HH'], HOUR); + addParseToken(['k', 'kk'], function (input, array, config) { + var kInput = toInt(input); + array[HOUR] = kInput === 24 ? 0 : kInput; + }); + addParseToken(['a', 'A'], function (input, array, config) { + config._isPm = config._locale.isPM(input); + config._meridiem = input; + }); + addParseToken(['h', 'hh'], function (input, array, config) { + array[HOUR] = toInt(input); + getParsingFlags(config).bigHour = true; + }); + addParseToken('hmm', function (input, array, config) { + var pos = input.length - 2; + array[HOUR] = toInt(input.substr(0, pos)); + array[MINUTE] = toInt(input.substr(pos)); + getParsingFlags(config).bigHour = true; + }); + addParseToken('hmmss', function (input, array, config) { + var pos1 = input.length - 4, + pos2 = input.length - 2; + array[HOUR] = toInt(input.substr(0, pos1)); + array[MINUTE] = toInt(input.substr(pos1, 2)); + array[SECOND] = toInt(input.substr(pos2)); + getParsingFlags(config).bigHour = true; + }); + addParseToken('Hmm', function (input, array, config) { + var pos = input.length - 2; + array[HOUR] = toInt(input.substr(0, pos)); + array[MINUTE] = toInt(input.substr(pos)); + }); + addParseToken('Hmmss', function (input, array, config) { + var pos1 = input.length - 4, + pos2 = input.length - 2; + array[HOUR] = toInt(input.substr(0, pos1)); + array[MINUTE] = toInt(input.substr(pos1, 2)); + array[SECOND] = toInt(input.substr(pos2)); + }); + + // LOCALES + + function localeIsPM(input) { + // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays + // Using charAt should be more compatible. + return (input + '').toLowerCase().charAt(0) === 'p'; + } + + var defaultLocaleMeridiemParse = /[ap]\.?m?\.?/i, + // Setting the hour should keep the time, because the user explicitly + // specified which hour they want. So trying to maintain the same hour (in + // a new timezone) makes sense. Adding/subtracting hours does not follow + // this rule. + getSetHour = makeGetSet('Hours', true); + + function localeMeridiem(hours, minutes, isLower) { + if (hours > 11) { + return isLower ? 'pm' : 'PM'; + } else { + return isLower ? 'am' : 'AM'; + } + } + + var baseConfig = { + calendar: defaultCalendar, + longDateFormat: defaultLongDateFormat, + invalidDate: defaultInvalidDate, + ordinal: defaultOrdinal, + dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse, + relativeTime: defaultRelativeTime, + + months: defaultLocaleMonths, + monthsShort: defaultLocaleMonthsShort, + + week: defaultLocaleWeek, + + weekdays: defaultLocaleWeekdays, + weekdaysMin: defaultLocaleWeekdaysMin, + weekdaysShort: defaultLocaleWeekdaysShort, + + meridiemParse: defaultLocaleMeridiemParse, + }; + + // internal storage for locale config files + var locales = {}, + localeFamilies = {}, + globalLocale; + + function commonPrefix(arr1, arr2) { + var i, + minl = Math.min(arr1.length, arr2.length); + for (i = 0; i < minl; i += 1) { + if (arr1[i] !== arr2[i]) { + return i; + } + } + return minl; + } + + function normalizeLocale(key) { + return key ? key.toLowerCase().replace('_', '-') : key; + } + + // pick the locale from the array + // try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each + // substring from most specific to least, but move to the next array item if it's a more specific variant than the current root + function chooseLocale(names) { + var i = 0, + j, + next, + locale, + split; + + while (i < names.length) { + split = normalizeLocale(names[i]).split('-'); + j = split.length; + next = normalizeLocale(names[i + 1]); + next = next ? next.split('-') : null; + while (j > 0) { + locale = loadLocale(split.slice(0, j).join('-')); + if (locale) { + return locale; + } + if ( + next && + next.length >= j && + commonPrefix(split, next) >= j - 1 + ) { + //the next array item is better than a shallower substring of this one + break; + } + j--; + } + i++; + } + return globalLocale; + } + + function loadLocale(name) { + var oldLocale = null, + aliasedRequire; + // TODO: Find a better way to register and load all the locales in Node + if ( + locales[name] === undefined && + typeof module !== 'undefined' && + module && + module.exports + ) { + try { + oldLocale = globalLocale._abbr; + aliasedRequire = require; + aliasedRequire('./locale/' + name); + getSetGlobalLocale(oldLocale); + } catch (e) { + // mark as not found to avoid repeating expensive file require call causing high CPU + // when trying to find en-US, en_US, en-us for every format call + locales[name] = null; // null means not found + } + } + return locales[name]; + } + + // This function will load locale and then set the global locale. If + // no arguments are passed in, it will simply return the current global + // locale key. + function getSetGlobalLocale(key, values) { + var data; + if (key) { + if (isUndefined(values)) { + data = getLocale(key); + } else { + data = defineLocale(key, values); + } + + if (data) { + // moment.duration._locale = moment._locale = data; + globalLocale = data; + } else { + if (typeof console !== 'undefined' && console.warn) { + //warn user if arguments are passed but the locale could not be set + console.warn( + 'Locale ' + key + ' not found. Did you forget to load it?' + ); + } + } + } + + return globalLocale._abbr; + } + + function defineLocale(name, config) { + if (config !== null) { + var locale, + parentConfig = baseConfig; + config.abbr = name; + if (locales[name] != null) { + deprecateSimple( + 'defineLocaleOverride', + 'use moment.updateLocale(localeName, config) to change ' + + 'an existing locale. moment.defineLocale(localeName, ' + + 'config) should only be used for creating a new locale ' + + 'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.' + ); + parentConfig = locales[name]._config; + } else if (config.parentLocale != null) { + if (locales[config.parentLocale] != null) { + parentConfig = locales[config.parentLocale]._config; + } else { + locale = loadLocale(config.parentLocale); + if (locale != null) { + parentConfig = locale._config; + } else { + if (!localeFamilies[config.parentLocale]) { + localeFamilies[config.parentLocale] = []; + } + localeFamilies[config.parentLocale].push({ + name: name, + config: config, + }); + return null; + } + } + } + locales[name] = new Locale(mergeConfigs(parentConfig, config)); + + if (localeFamilies[name]) { + localeFamilies[name].forEach(function (x) { + defineLocale(x.name, x.config); + }); + } + + // backwards compat for now: also set the locale + // make sure we set the locale AFTER all child locales have been + // created, so we won't end up with the child locale set. + getSetGlobalLocale(name); + + return locales[name]; + } else { + // useful for testing + delete locales[name]; + return null; + } + } + + function updateLocale(name, config) { + if (config != null) { + var locale, + tmpLocale, + parentConfig = baseConfig; + + if (locales[name] != null && locales[name].parentLocale != null) { + // Update existing child locale in-place to avoid memory-leaks + locales[name].set(mergeConfigs(locales[name]._config, config)); + } else { + // MERGE + tmpLocale = loadLocale(name); + if (tmpLocale != null) { + parentConfig = tmpLocale._config; + } + config = mergeConfigs(parentConfig, config); + if (tmpLocale == null) { + // updateLocale is called for creating a new locale + // Set abbr so it will have a name (getters return + // undefined otherwise). + config.abbr = name; + } + locale = new Locale(config); + locale.parentLocale = locales[name]; + locales[name] = locale; + } + + // backwards compat for now: also set the locale + getSetGlobalLocale(name); + } else { + // pass null for config to unupdate, useful for tests + if (locales[name] != null) { + if (locales[name].parentLocale != null) { + locales[name] = locales[name].parentLocale; + if (name === getSetGlobalLocale()) { + getSetGlobalLocale(name); + } + } else if (locales[name] != null) { + delete locales[name]; + } + } + } + return locales[name]; + } + + // returns locale data + function getLocale(key) { + var locale; + + if (key && key._locale && key._locale._abbr) { + key = key._locale._abbr; + } + + if (!key) { + return globalLocale; + } + + if (!isArray(key)) { + //short-circuit everything else + locale = loadLocale(key); + if (locale) { + return locale; + } + key = [key]; + } + + return chooseLocale(key); + } + + function listLocales() { + return keys(locales); + } + + function checkOverflow(m) { + var overflow, + a = m._a; + + if (a && getParsingFlags(m).overflow === -2) { + overflow = + a[MONTH] < 0 || a[MONTH] > 11 + ? MONTH + : a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH]) + ? DATE + : a[HOUR] < 0 || + a[HOUR] > 24 || + (a[HOUR] === 24 && + (a[MINUTE] !== 0 || + a[SECOND] !== 0 || + a[MILLISECOND] !== 0)) + ? HOUR + : a[MINUTE] < 0 || a[MINUTE] > 59 + ? MINUTE + : a[SECOND] < 0 || a[SECOND] > 59 + ? SECOND + : a[MILLISECOND] < 0 || a[MILLISECOND] > 999 + ? MILLISECOND + : -1; + + if ( + getParsingFlags(m)._overflowDayOfYear && + (overflow < YEAR || overflow > DATE) + ) { + overflow = DATE; + } + if (getParsingFlags(m)._overflowWeeks && overflow === -1) { + overflow = WEEK; + } + if (getParsingFlags(m)._overflowWeekday && overflow === -1) { + overflow = WEEKDAY; + } + + getParsingFlags(m).overflow = overflow; + } + + return m; + } + + // iso 8601 regex + // 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00) + var extendedIsoRegex = /^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/, + basicIsoRegex = /^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/, + tzRegex = /Z|[+-]\d\d(?::?\d\d)?/, + isoDates = [ + ['YYYYYY-MM-DD', /[+-]\d{6}-\d\d-\d\d/], + ['YYYY-MM-DD', /\d{4}-\d\d-\d\d/], + ['GGGG-[W]WW-E', /\d{4}-W\d\d-\d/], + ['GGGG-[W]WW', /\d{4}-W\d\d/, false], + ['YYYY-DDD', /\d{4}-\d{3}/], + ['YYYY-MM', /\d{4}-\d\d/, false], + ['YYYYYYMMDD', /[+-]\d{10}/], + ['YYYYMMDD', /\d{8}/], + ['GGGG[W]WWE', /\d{4}W\d{3}/], + ['GGGG[W]WW', /\d{4}W\d{2}/, false], + ['YYYYDDD', /\d{7}/], + ['YYYYMM', /\d{6}/, false], + ['YYYY', /\d{4}/, false], + ], + // iso time formats and regexes + isoTimes = [ + ['HH:mm:ss.SSSS', /\d\d:\d\d:\d\d\.\d+/], + ['HH:mm:ss,SSSS', /\d\d:\d\d:\d\d,\d+/], + ['HH:mm:ss', /\d\d:\d\d:\d\d/], + ['HH:mm', /\d\d:\d\d/], + ['HHmmss.SSSS', /\d\d\d\d\d\d\.\d+/], + ['HHmmss,SSSS', /\d\d\d\d\d\d,\d+/], + ['HHmmss', /\d\d\d\d\d\d/], + ['HHmm', /\d\d\d\d/], + ['HH', /\d\d/], + ], + aspNetJsonRegex = /^\/?Date\((-?\d+)/i, + // RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3 + rfc2822 = /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/, + obsOffsets = { + UT: 0, + GMT: 0, + EDT: -4 * 60, + EST: -5 * 60, + CDT: -5 * 60, + CST: -6 * 60, + MDT: -6 * 60, + MST: -7 * 60, + PDT: -7 * 60, + PST: -8 * 60, + }; + + // date from iso format + function configFromISO(config) { + var i, + l, + string = config._i, + match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string), + allowTime, + dateFormat, + timeFormat, + tzFormat; + + if (match) { + getParsingFlags(config).iso = true; + + for (i = 0, l = isoDates.length; i < l; i++) { + if (isoDates[i][1].exec(match[1])) { + dateFormat = isoDates[i][0]; + allowTime = isoDates[i][2] !== false; + break; + } + } + if (dateFormat == null) { + config._isValid = false; + return; + } + if (match[3]) { + for (i = 0, l = isoTimes.length; i < l; i++) { + if (isoTimes[i][1].exec(match[3])) { + // match[2] should be 'T' or space + timeFormat = (match[2] || ' ') + isoTimes[i][0]; + break; + } + } + if (timeFormat == null) { + config._isValid = false; + return; + } + } + if (!allowTime && timeFormat != null) { + config._isValid = false; + return; + } + if (match[4]) { + if (tzRegex.exec(match[4])) { + tzFormat = 'Z'; + } else { + config._isValid = false; + return; + } + } + config._f = dateFormat + (timeFormat || '') + (tzFormat || ''); + configFromStringAndFormat(config); + } else { + config._isValid = false; + } + } + + function extractFromRFC2822Strings( + yearStr, + monthStr, + dayStr, + hourStr, + minuteStr, + secondStr + ) { + var result = [ + untruncateYear(yearStr), + defaultLocaleMonthsShort.indexOf(monthStr), + parseInt(dayStr, 10), + parseInt(hourStr, 10), + parseInt(minuteStr, 10), + ]; + + if (secondStr) { + result.push(parseInt(secondStr, 10)); + } + + return result; + } + + function untruncateYear(yearStr) { + var year = parseInt(yearStr, 10); + if (year <= 49) { + return 2000 + year; + } else if (year <= 999) { + return 1900 + year; + } + return year; + } + + function preprocessRFC2822(s) { + // Remove comments and folding whitespace and replace multiple-spaces with a single space + return s + .replace(/\([^)]*\)|[\n\t]/g, ' ') + .replace(/(\s\s+)/g, ' ') + .replace(/^\s\s*/, '') + .replace(/\s\s*$/, ''); + } + + function checkWeekday(weekdayStr, parsedInput, config) { + if (weekdayStr) { + // TODO: Replace the vanilla JS Date object with an independent day-of-week check. + var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr), + weekdayActual = new Date( + parsedInput[0], + parsedInput[1], + parsedInput[2] + ).getDay(); + if (weekdayProvided !== weekdayActual) { + getParsingFlags(config).weekdayMismatch = true; + config._isValid = false; + return false; + } + } + return true; + } + + function calculateOffset(obsOffset, militaryOffset, numOffset) { + if (obsOffset) { + return obsOffsets[obsOffset]; + } else if (militaryOffset) { + // the only allowed military tz is Z + return 0; + } else { + var hm = parseInt(numOffset, 10), + m = hm % 100, + h = (hm - m) / 100; + return h * 60 + m; + } + } + + // date and time from ref 2822 format + function configFromRFC2822(config) { + var match = rfc2822.exec(preprocessRFC2822(config._i)), + parsedArray; + if (match) { + parsedArray = extractFromRFC2822Strings( + match[4], + match[3], + match[2], + match[5], + match[6], + match[7] + ); + if (!checkWeekday(match[1], parsedArray, config)) { + return; + } + + config._a = parsedArray; + config._tzm = calculateOffset(match[8], match[9], match[10]); + + config._d = createUTCDate.apply(null, config._a); + config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm); + + getParsingFlags(config).rfc2822 = true; + } else { + config._isValid = false; + } + } + + // date from 1) ASP.NET, 2) ISO, 3) RFC 2822 formats, or 4) optional fallback if parsing isn't strict + function configFromString(config) { + var matched = aspNetJsonRegex.exec(config._i); + if (matched !== null) { + config._d = new Date(+matched[1]); + return; + } + + configFromISO(config); + if (config._isValid === false) { + delete config._isValid; + } else { + return; + } + + configFromRFC2822(config); + if (config._isValid === false) { + delete config._isValid; + } else { + return; + } + + if (config._strict) { + config._isValid = false; + } else { + // Final attempt, use Input Fallback + hooks.createFromInputFallback(config); + } + } + + hooks.createFromInputFallback = deprecate( + 'value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' + + 'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' + + 'discouraged and will be removed in an upcoming major release. Please refer to ' + + 'http://momentjs.com/guides/#/warnings/js-date/ for more info.', + function (config) { + config._d = new Date(config._i + (config._useUTC ? ' UTC' : '')); + } + ); + + // Pick the first defined of two or three arguments. + function defaults(a, b, c) { + if (a != null) { + return a; + } + if (b != null) { + return b; + } + return c; + } + + function currentDateArray(config) { + // hooks is actually the exported moment object + var nowValue = new Date(hooks.now()); + if (config._useUTC) { + return [ + nowValue.getUTCFullYear(), + nowValue.getUTCMonth(), + nowValue.getUTCDate(), + ]; + } + return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()]; + } + + // convert an array to a date. + // the array should mirror the parameters below + // note: all values past the year are optional and will default to the lowest possible value. + // [year, month, day , hour, minute, second, millisecond] + function configFromArray(config) { + var i, + date, + input = [], + currentDate, + expectedWeekday, + yearToUse; + + if (config._d) { + return; + } + + currentDate = currentDateArray(config); + + //compute day of the year from weeks and weekdays + if (config._w && config._a[DATE] == null && config._a[MONTH] == null) { + dayOfYearFromWeekInfo(config); + } + + //if the day of the year is set, figure out what it is + if (config._dayOfYear != null) { + yearToUse = defaults(config._a[YEAR], currentDate[YEAR]); + + if ( + config._dayOfYear > daysInYear(yearToUse) || + config._dayOfYear === 0 + ) { + getParsingFlags(config)._overflowDayOfYear = true; + } + + date = createUTCDate(yearToUse, 0, config._dayOfYear); + config._a[MONTH] = date.getUTCMonth(); + config._a[DATE] = date.getUTCDate(); + } + + // Default to current date. + // * if no year, month, day of month are given, default to today + // * if day of month is given, default month and year + // * if month is given, default only year + // * if year is given, don't default anything + for (i = 0; i < 3 && config._a[i] == null; ++i) { + config._a[i] = input[i] = currentDate[i]; + } + + // Zero out whatever was not defaulted, including time + for (; i < 7; i++) { + config._a[i] = input[i] = + config._a[i] == null ? (i === 2 ? 1 : 0) : config._a[i]; + } + + // Check for 24:00:00.000 + if ( + config._a[HOUR] === 24 && + config._a[MINUTE] === 0 && + config._a[SECOND] === 0 && + config._a[MILLISECOND] === 0 + ) { + config._nextDay = true; + config._a[HOUR] = 0; + } + + config._d = (config._useUTC ? createUTCDate : createDate).apply( + null, + input + ); + expectedWeekday = config._useUTC + ? config._d.getUTCDay() + : config._d.getDay(); + + // Apply timezone offset from input. The actual utcOffset can be changed + // with parseZone. + if (config._tzm != null) { + config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm); + } + + if (config._nextDay) { + config._a[HOUR] = 24; + } + + // check for mismatching day of week + if ( + config._w && + typeof config._w.d !== 'undefined' && + config._w.d !== expectedWeekday + ) { + getParsingFlags(config).weekdayMismatch = true; + } + } + + function dayOfYearFromWeekInfo(config) { + var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow, curWeek; + + w = config._w; + if (w.GG != null || w.W != null || w.E != null) { + dow = 1; + doy = 4; + + // TODO: We need to take the current isoWeekYear, but that depends on + // how we interpret now (local, utc, fixed offset). So create + // a now version of current config (take local/utc/offset flags, and + // create now). + weekYear = defaults( + w.GG, + config._a[YEAR], + weekOfYear(createLocal(), 1, 4).year + ); + week = defaults(w.W, 1); + weekday = defaults(w.E, 1); + if (weekday < 1 || weekday > 7) { + weekdayOverflow = true; + } + } else { + dow = config._locale._week.dow; + doy = config._locale._week.doy; + + curWeek = weekOfYear(createLocal(), dow, doy); + + weekYear = defaults(w.gg, config._a[YEAR], curWeek.year); + + // Default to current week. + week = defaults(w.w, curWeek.week); + + if (w.d != null) { + // weekday -- low day numbers are considered next week + weekday = w.d; + if (weekday < 0 || weekday > 6) { + weekdayOverflow = true; + } + } else if (w.e != null) { + // local weekday -- counting starts from beginning of week + weekday = w.e + dow; + if (w.e < 0 || w.e > 6) { + weekdayOverflow = true; + } + } else { + // default to beginning of week + weekday = dow; + } + } + if (week < 1 || week > weeksInYear(weekYear, dow, doy)) { + getParsingFlags(config)._overflowWeeks = true; + } else if (weekdayOverflow != null) { + getParsingFlags(config)._overflowWeekday = true; + } else { + temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy); + config._a[YEAR] = temp.year; + config._dayOfYear = temp.dayOfYear; + } + } + + // constant that refers to the ISO standard + hooks.ISO_8601 = function () {}; + + // constant that refers to the RFC 2822 form + hooks.RFC_2822 = function () {}; + + // date from string and format string + function configFromStringAndFormat(config) { + // TODO: Move this to another part of the creation flow to prevent circular deps + if (config._f === hooks.ISO_8601) { + configFromISO(config); + return; + } + if (config._f === hooks.RFC_2822) { + configFromRFC2822(config); + return; + } + config._a = []; + getParsingFlags(config).empty = true; + + // This array is used to make a Date, either with `new Date` or `Date.UTC` + var string = '' + config._i, + i, + parsedInput, + tokens, + token, + skipped, + stringLength = string.length, + totalParsedInputLength = 0, + era; + + tokens = + expandFormat(config._f, config._locale).match(formattingTokens) || []; + + for (i = 0; i < tokens.length; i++) { + token = tokens[i]; + parsedInput = (string.match(getParseRegexForToken(token, config)) || + [])[0]; + if (parsedInput) { + skipped = string.substr(0, string.indexOf(parsedInput)); + if (skipped.length > 0) { + getParsingFlags(config).unusedInput.push(skipped); + } + string = string.slice( + string.indexOf(parsedInput) + parsedInput.length + ); + totalParsedInputLength += parsedInput.length; + } + // don't parse if it's not a known token + if (formatTokenFunctions[token]) { + if (parsedInput) { + getParsingFlags(config).empty = false; + } else { + getParsingFlags(config).unusedTokens.push(token); + } + addTimeToArrayFromToken(token, parsedInput, config); + } else if (config._strict && !parsedInput) { + getParsingFlags(config).unusedTokens.push(token); + } + } + + // add remaining unparsed input length to the string + getParsingFlags(config).charsLeftOver = + stringLength - totalParsedInputLength; + if (string.length > 0) { + getParsingFlags(config).unusedInput.push(string); + } + + // clear _12h flag if hour is <= 12 + if ( + config._a[HOUR] <= 12 && + getParsingFlags(config).bigHour === true && + config._a[HOUR] > 0 + ) { + getParsingFlags(config).bigHour = undefined; + } + + getParsingFlags(config).parsedDateParts = config._a.slice(0); + getParsingFlags(config).meridiem = config._meridiem; + // handle meridiem + config._a[HOUR] = meridiemFixWrap( + config._locale, + config._a[HOUR], + config._meridiem + ); + + // handle era + era = getParsingFlags(config).era; + if (era !== null) { + config._a[YEAR] = config._locale.erasConvertYear(era, config._a[YEAR]); + } + + configFromArray(config); + checkOverflow(config); + } + + function meridiemFixWrap(locale, hour, meridiem) { + var isPm; + + if (meridiem == null) { + // nothing to do + return hour; + } + if (locale.meridiemHour != null) { + return locale.meridiemHour(hour, meridiem); + } else if (locale.isPM != null) { + // Fallback + isPm = locale.isPM(meridiem); + if (isPm && hour < 12) { + hour += 12; + } + if (!isPm && hour === 12) { + hour = 0; + } + return hour; + } else { + // this is not supposed to happen + return hour; + } + } + + // date from string and array of format strings + function configFromStringAndArray(config) { + var tempConfig, + bestMoment, + scoreToBeat, + i, + currentScore, + validFormatFound, + bestFormatIsValid = false; + + if (config._f.length === 0) { + getParsingFlags(config).invalidFormat = true; + config._d = new Date(NaN); + return; + } + + for (i = 0; i < config._f.length; i++) { + currentScore = 0; + validFormatFound = false; + tempConfig = copyConfig({}, config); + if (config._useUTC != null) { + tempConfig._useUTC = config._useUTC; + } + tempConfig._f = config._f[i]; + configFromStringAndFormat(tempConfig); + + if (isValid(tempConfig)) { + validFormatFound = true; + } + + // if there is any input that was not parsed add a penalty for that format + currentScore += getParsingFlags(tempConfig).charsLeftOver; + + //or tokens + currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10; + + getParsingFlags(tempConfig).score = currentScore; + + if (!bestFormatIsValid) { + if ( + scoreToBeat == null || + currentScore < scoreToBeat || + validFormatFound + ) { + scoreToBeat = currentScore; + bestMoment = tempConfig; + if (validFormatFound) { + bestFormatIsValid = true; + } + } + } else { + if (currentScore < scoreToBeat) { + scoreToBeat = currentScore; + bestMoment = tempConfig; + } + } + } + + extend(config, bestMoment || tempConfig); + } + + function configFromObject(config) { + if (config._d) { + return; + } + + var i = normalizeObjectUnits(config._i), + dayOrDate = i.day === undefined ? i.date : i.day; + config._a = map( + [i.year, i.month, dayOrDate, i.hour, i.minute, i.second, i.millisecond], + function (obj) { + return obj && parseInt(obj, 10); + } + ); + + configFromArray(config); + } + + function createFromConfig(config) { + var res = new Moment(checkOverflow(prepareConfig(config))); + if (res._nextDay) { + // Adding is smart enough around DST + res.add(1, 'd'); + res._nextDay = undefined; + } + + return res; + } + + function prepareConfig(config) { + var input = config._i, + format = config._f; + + config._locale = config._locale || getLocale(config._l); + + if (input === null || (format === undefined && input === '')) { + return createInvalid({ nullInput: true }); + } + + if (typeof input === 'string') { + config._i = input = config._locale.preparse(input); + } + + if (isMoment(input)) { + return new Moment(checkOverflow(input)); + } else if (isDate(input)) { + config._d = input; + } else if (isArray(format)) { + configFromStringAndArray(config); + } else if (format) { + configFromStringAndFormat(config); + } else { + configFromInput(config); + } + + if (!isValid(config)) { + config._d = null; + } + + return config; + } + + function configFromInput(config) { + var input = config._i; + if (isUndefined(input)) { + config._d = new Date(hooks.now()); + } else if (isDate(input)) { + config._d = new Date(input.valueOf()); + } else if (typeof input === 'string') { + configFromString(config); + } else if (isArray(input)) { + config._a = map(input.slice(0), function (obj) { + return parseInt(obj, 10); + }); + configFromArray(config); + } else if (isObject(input)) { + configFromObject(config); + } else if (isNumber(input)) { + // from milliseconds + config._d = new Date(input); + } else { + hooks.createFromInputFallback(config); + } + } + + function createLocalOrUTC(input, format, locale, strict, isUTC) { + var c = {}; + + if (format === true || format === false) { + strict = format; + format = undefined; + } + + if (locale === true || locale === false) { + strict = locale; + locale = undefined; + } + + if ( + (isObject(input) && isObjectEmpty(input)) || + (isArray(input) && input.length === 0) + ) { + input = undefined; + } + // object construction must be done this way. + // https://github.com/moment/moment/issues/1423 + c._isAMomentObject = true; + c._useUTC = c._isUTC = isUTC; + c._l = locale; + c._i = input; + c._f = format; + c._strict = strict; + + return createFromConfig(c); + } + + function createLocal(input, format, locale, strict) { + return createLocalOrUTC(input, format, locale, strict, false); + } + + var prototypeMin = deprecate( + 'moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/', + function () { + var other = createLocal.apply(null, arguments); + if (this.isValid() && other.isValid()) { + return other < this ? this : other; + } else { + return createInvalid(); + } + } + ), + prototypeMax = deprecate( + 'moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/', + function () { + var other = createLocal.apply(null, arguments); + if (this.isValid() && other.isValid()) { + return other > this ? this : other; + } else { + return createInvalid(); + } + } + ); + + // Pick a moment m from moments so that m[fn](other) is true for all + // other. This relies on the function fn to be transitive. + // + // moments should either be an array of moment objects or an array, whose + // first element is an array of moment objects. + function pickBy(fn, moments) { + var res, i; + if (moments.length === 1 && isArray(moments[0])) { + moments = moments[0]; + } + if (!moments.length) { + return createLocal(); + } + res = moments[0]; + for (i = 1; i < moments.length; ++i) { + if (!moments[i].isValid() || moments[i][fn](res)) { + res = moments[i]; + } + } + return res; + } + + // TODO: Use [].sort instead? + function min() { + var args = [].slice.call(arguments, 0); + + return pickBy('isBefore', args); + } + + function max() { + var args = [].slice.call(arguments, 0); + + return pickBy('isAfter', args); + } + + var now = function () { + return Date.now ? Date.now() : +new Date(); + }; + + var ordering = [ + 'year', + 'quarter', + 'month', + 'week', + 'day', + 'hour', + 'minute', + 'second', + 'millisecond', + ]; + + function isDurationValid(m) { + var key, + unitHasDecimal = false, + i; + for (key in m) { + if ( + hasOwnProp(m, key) && + !( + indexOf.call(ordering, key) !== -1 && + (m[key] == null || !isNaN(m[key])) + ) + ) { + return false; + } + } + + for (i = 0; i < ordering.length; ++i) { + if (m[ordering[i]]) { + if (unitHasDecimal) { + return false; // only allow non-integers for smallest unit + } + if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) { + unitHasDecimal = true; + } + } + } + + return true; + } + + function isValid$1() { + return this._isValid; + } + + function createInvalid$1() { + return createDuration(NaN); + } + + function Duration(duration) { + var normalizedInput = normalizeObjectUnits(duration), + years = normalizedInput.year || 0, + quarters = normalizedInput.quarter || 0, + months = normalizedInput.month || 0, + weeks = normalizedInput.week || normalizedInput.isoWeek || 0, + days = normalizedInput.day || 0, + hours = normalizedInput.hour || 0, + minutes = normalizedInput.minute || 0, + seconds = normalizedInput.second || 0, + milliseconds = normalizedInput.millisecond || 0; + + this._isValid = isDurationValid(normalizedInput); + + // representation for dateAddRemove + this._milliseconds = + +milliseconds + + seconds * 1e3 + // 1000 + minutes * 6e4 + // 1000 * 60 + hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978 + // Because of dateAddRemove treats 24 hours as different from a + // day when working around DST, we need to store them separately + this._days = +days + weeks * 7; + // It is impossible to translate months into days without knowing + // which months you are are talking about, so we have to store + // it separately. + this._months = +months + quarters * 3 + years * 12; + + this._data = {}; + + this._locale = getLocale(); + + this._bubble(); + } + + function isDuration(obj) { + return obj instanceof Duration; + } + + function absRound(number) { + if (number < 0) { + return Math.round(-1 * number) * -1; + } else { + return Math.round(number); + } + } + + // compare two arrays, return the number of differences + function compareArrays(array1, array2, dontConvert) { + var len = Math.min(array1.length, array2.length), + lengthDiff = Math.abs(array1.length - array2.length), + diffs = 0, + i; + for (i = 0; i < len; i++) { + if ( + (dontConvert && array1[i] !== array2[i]) || + (!dontConvert && toInt(array1[i]) !== toInt(array2[i])) + ) { + diffs++; + } + } + return diffs + lengthDiff; + } + + // FORMATTING + + function offset(token, separator) { + addFormatToken(token, 0, 0, function () { + var offset = this.utcOffset(), + sign = '+'; + if (offset < 0) { + offset = -offset; + sign = '-'; + } + return ( + sign + + zeroFill(~~(offset / 60), 2) + + separator + + zeroFill(~~offset % 60, 2) + ); + }); + } + + offset('Z', ':'); + offset('ZZ', ''); + + // PARSING + + addRegexToken('Z', matchShortOffset); + addRegexToken('ZZ', matchShortOffset); + addParseToken(['Z', 'ZZ'], function (input, array, config) { + config._useUTC = true; + config._tzm = offsetFromString(matchShortOffset, input); + }); + + // HELPERS + + // timezone chunker + // '+10:00' > ['10', '00'] + // '-1530' > ['-15', '30'] + var chunkOffset = /([\+\-]|\d\d)/gi; + + function offsetFromString(matcher, string) { + var matches = (string || '').match(matcher), + chunk, + parts, + minutes; + + if (matches === null) { + return null; + } + + chunk = matches[matches.length - 1] || []; + parts = (chunk + '').match(chunkOffset) || ['-', 0, 0]; + minutes = +(parts[1] * 60) + toInt(parts[2]); + + return minutes === 0 ? 0 : parts[0] === '+' ? minutes : -minutes; + } + + // Return a moment from input, that is local/utc/zone equivalent to model. + function cloneWithOffset(input, model) { + var res, diff; + if (model._isUTC) { + res = model.clone(); + diff = + (isMoment(input) || isDate(input) + ? input.valueOf() + : createLocal(input).valueOf()) - res.valueOf(); + // Use low-level api, because this fn is low-level api. + res._d.setTime(res._d.valueOf() + diff); + hooks.updateOffset(res, false); + return res; + } else { + return createLocal(input).local(); + } + } + + function getDateOffset(m) { + // On Firefox.24 Date#getTimezoneOffset returns a floating point. + // https://github.com/moment/moment/pull/1871 + return -Math.round(m._d.getTimezoneOffset()); + } + + // HOOKS + + // This function will be called whenever a moment is mutated. + // It is intended to keep the offset in sync with the timezone. + hooks.updateOffset = function () {}; + + // MOMENTS + + // keepLocalTime = true means only change the timezone, without + // affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]--> + // 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset + // +0200, so we adjust the time as needed, to be valid. + // + // Keeping the time actually adds/subtracts (one hour) + // from the actual represented time. That is why we call updateOffset + // a second time. In case it wants us to change the offset again + // _changeInProgress == true case, then we have to adjust, because + // there is no such time in the given timezone. + function getSetOffset(input, keepLocalTime, keepMinutes) { + var offset = this._offset || 0, + localAdjust; + if (!this.isValid()) { + return input != null ? this : NaN; + } + if (input != null) { + if (typeof input === 'string') { + input = offsetFromString(matchShortOffset, input); + if (input === null) { + return this; + } + } else if (Math.abs(input) < 16 && !keepMinutes) { + input = input * 60; + } + if (!this._isUTC && keepLocalTime) { + localAdjust = getDateOffset(this); + } + this._offset = input; + this._isUTC = true; + if (localAdjust != null) { + this.add(localAdjust, 'm'); + } + if (offset !== input) { + if (!keepLocalTime || this._changeInProgress) { + addSubtract( + this, + createDuration(input - offset, 'm'), + 1, + false + ); + } else if (!this._changeInProgress) { + this._changeInProgress = true; + hooks.updateOffset(this, true); + this._changeInProgress = null; + } + } + return this; + } else { + return this._isUTC ? offset : getDateOffset(this); + } + } + + function getSetZone(input, keepLocalTime) { + if (input != null) { + if (typeof input !== 'string') { + input = -input; + } + + this.utcOffset(input, keepLocalTime); + + return this; + } else { + return -this.utcOffset(); + } + } + + function setOffsetToUTC(keepLocalTime) { + return this.utcOffset(0, keepLocalTime); + } + + function setOffsetToLocal(keepLocalTime) { + if (this._isUTC) { + this.utcOffset(0, keepLocalTime); + this._isUTC = false; + + if (keepLocalTime) { + this.subtract(getDateOffset(this), 'm'); + } + } + return this; + } + + function setOffsetToParsedOffset() { + if (this._tzm != null) { + this.utcOffset(this._tzm, false, true); + } else if (typeof this._i === 'string') { + var tZone = offsetFromString(matchOffset, this._i); + if (tZone != null) { + this.utcOffset(tZone); + } else { + this.utcOffset(0, true); + } + } + return this; + } + + function hasAlignedHourOffset(input) { + if (!this.isValid()) { + return false; + } + input = input ? createLocal(input).utcOffset() : 0; + + return (this.utcOffset() - input) % 60 === 0; + } + + function isDaylightSavingTime() { + return ( + this.utcOffset() > this.clone().month(0).utcOffset() || + this.utcOffset() > this.clone().month(5).utcOffset() + ); + } + + function isDaylightSavingTimeShifted() { + if (!isUndefined(this._isDSTShifted)) { + return this._isDSTShifted; + } + + var c = {}, + other; + + copyConfig(c, this); + c = prepareConfig(c); + + if (c._a) { + other = c._isUTC ? createUTC(c._a) : createLocal(c._a); + this._isDSTShifted = + this.isValid() && compareArrays(c._a, other.toArray()) > 0; + } else { + this._isDSTShifted = false; + } + + return this._isDSTShifted; + } + + function isLocal() { + return this.isValid() ? !this._isUTC : false; + } + + function isUtcOffset() { + return this.isValid() ? this._isUTC : false; + } + + function isUtc() { + return this.isValid() ? this._isUTC && this._offset === 0 : false; + } + + // ASP.NET json date format regex + var aspNetRegex = /^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/, + // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html + // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere + // and further modified to allow for strings containing both week and day + isoRegex = /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/; + + function createDuration(input, key) { + var duration = input, + // matching against regexp is expensive, do it on demand + match = null, + sign, + ret, + diffRes; + + if (isDuration(input)) { + duration = { + ms: input._milliseconds, + d: input._days, + M: input._months, + }; + } else if (isNumber(input) || !isNaN(+input)) { + duration = {}; + if (key) { + duration[key] = +input; + } else { + duration.milliseconds = +input; + } + } else if ((match = aspNetRegex.exec(input))) { + sign = match[1] === '-' ? -1 : 1; + duration = { + y: 0, + d: toInt(match[DATE]) * sign, + h: toInt(match[HOUR]) * sign, + m: toInt(match[MINUTE]) * sign, + s: toInt(match[SECOND]) * sign, + ms: toInt(absRound(match[MILLISECOND] * 1000)) * sign, // the millisecond decimal point is included in the match + }; + } else if ((match = isoRegex.exec(input))) { + sign = match[1] === '-' ? -1 : 1; + duration = { + y: parseIso(match[2], sign), + M: parseIso(match[3], sign), + w: parseIso(match[4], sign), + d: parseIso(match[5], sign), + h: parseIso(match[6], sign), + m: parseIso(match[7], sign), + s: parseIso(match[8], sign), + }; + } else if (duration == null) { + // checks for null or undefined + duration = {}; + } else if ( + typeof duration === 'object' && + ('from' in duration || 'to' in duration) + ) { + diffRes = momentsDifference( + createLocal(duration.from), + createLocal(duration.to) + ); + + duration = {}; + duration.ms = diffRes.milliseconds; + duration.M = diffRes.months; + } + + ret = new Duration(duration); + + if (isDuration(input) && hasOwnProp(input, '_locale')) { + ret._locale = input._locale; + } + + if (isDuration(input) && hasOwnProp(input, '_isValid')) { + ret._isValid = input._isValid; + } + + return ret; + } + + createDuration.fn = Duration.prototype; + createDuration.invalid = createInvalid$1; + + function parseIso(inp, sign) { + // We'd normally use ~~inp for this, but unfortunately it also + // converts floats to ints. + // inp may be undefined, so careful calling replace on it. + var res = inp && parseFloat(inp.replace(',', '.')); + // apply sign while we're at it + return (isNaN(res) ? 0 : res) * sign; + } + + function positiveMomentsDifference(base, other) { + var res = {}; + + res.months = + other.month() - base.month() + (other.year() - base.year()) * 12; + if (base.clone().add(res.months, 'M').isAfter(other)) { + --res.months; + } + + res.milliseconds = +other - +base.clone().add(res.months, 'M'); + + return res; + } + + function momentsDifference(base, other) { + var res; + if (!(base.isValid() && other.isValid())) { + return { milliseconds: 0, months: 0 }; + } + + other = cloneWithOffset(other, base); + if (base.isBefore(other)) { + res = positiveMomentsDifference(base, other); + } else { + res = positiveMomentsDifference(other, base); + res.milliseconds = -res.milliseconds; + res.months = -res.months; + } + + return res; + } + + // TODO: remove 'name' arg after deprecation is removed + function createAdder(direction, name) { + return function (val, period) { + var dur, tmp; + //invert the arguments, but complain about it + if (period !== null && !isNaN(+period)) { + deprecateSimple( + name, + 'moment().' + + name + + '(period, number) is deprecated. Please use moment().' + + name + + '(number, period). ' + + 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.' + ); + tmp = val; + val = period; + period = tmp; + } + + dur = createDuration(val, period); + addSubtract(this, dur, direction); + return this; + }; + } + + function addSubtract(mom, duration, isAdding, updateOffset) { + var milliseconds = duration._milliseconds, + days = absRound(duration._days), + months = absRound(duration._months); + + if (!mom.isValid()) { + // No op + return; + } + + updateOffset = updateOffset == null ? true : updateOffset; + + if (months) { + setMonth(mom, get(mom, 'Month') + months * isAdding); + } + if (days) { + set$1(mom, 'Date', get(mom, 'Date') + days * isAdding); + } + if (milliseconds) { + mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding); + } + if (updateOffset) { + hooks.updateOffset(mom, days || months); + } + } + + var add = createAdder(1, 'add'), + subtract = createAdder(-1, 'subtract'); + + function isString(input) { + return typeof input === 'string' || input instanceof String; + } + + // type MomentInput = Moment | Date | string | number | (number | string)[] | MomentInputObject | void; // null | undefined + function isMomentInput(input) { + return ( + isMoment(input) || + isDate(input) || + isString(input) || + isNumber(input) || + isNumberOrStringArray(input) || + isMomentInputObject(input) || + input === null || + input === undefined + ); + } + + function isMomentInputObject(input) { + var objectTest = isObject(input) && !isObjectEmpty(input), + propertyTest = false, + properties = [ + 'years', + 'year', + 'y', + 'months', + 'month', + 'M', + 'days', + 'day', + 'd', + 'dates', + 'date', + 'D', + 'hours', + 'hour', + 'h', + 'minutes', + 'minute', + 'm', + 'seconds', + 'second', + 's', + 'milliseconds', + 'millisecond', + 'ms', + ], + i, + property; + + for (i = 0; i < properties.length; i += 1) { + property = properties[i]; + propertyTest = propertyTest || hasOwnProp(input, property); + } + + return objectTest && propertyTest; + } + + function isNumberOrStringArray(input) { + var arrayTest = isArray(input), + dataTypeTest = false; + if (arrayTest) { + dataTypeTest = + input.filter(function (item) { + return !isNumber(item) && isString(input); + }).length === 0; + } + return arrayTest && dataTypeTest; + } + + function isCalendarSpec(input) { + var objectTest = isObject(input) && !isObjectEmpty(input), + propertyTest = false, + properties = [ + 'sameDay', + 'nextDay', + 'lastDay', + 'nextWeek', + 'lastWeek', + 'sameElse', + ], + i, + property; + + for (i = 0; i < properties.length; i += 1) { + property = properties[i]; + propertyTest = propertyTest || hasOwnProp(input, property); + } + + return objectTest && propertyTest; + } + + function getCalendarFormat(myMoment, now) { + var diff = myMoment.diff(now, 'days', true); + return diff < -6 + ? 'sameElse' + : diff < -1 + ? 'lastWeek' + : diff < 0 + ? 'lastDay' + : diff < 1 + ? 'sameDay' + : diff < 2 + ? 'nextDay' + : diff < 7 + ? 'nextWeek' + : 'sameElse'; + } + + function calendar$1(time, formats) { + // Support for single parameter, formats only overload to the calendar function + if (arguments.length === 1) { + if (isMomentInput(arguments[0])) { + time = arguments[0]; + formats = undefined; + } else if (isCalendarSpec(arguments[0])) { + formats = arguments[0]; + time = undefined; + } + } + // We want to compare the start of today, vs this. + // Getting start-of-today depends on whether we're local/utc/offset or not. + var now = time || createLocal(), + sod = cloneWithOffset(now, this).startOf('day'), + format = hooks.calendarFormat(this, sod) || 'sameElse', + output = + formats && + (isFunction(formats[format]) + ? formats[format].call(this, now) + : formats[format]); + + return this.format( + output || this.localeData().calendar(format, this, createLocal(now)) + ); + } + + function clone() { + return new Moment(this); + } + + function isAfter(input, units) { + var localInput = isMoment(input) ? input : createLocal(input); + if (!(this.isValid() && localInput.isValid())) { + return false; + } + units = normalizeUnits(units) || 'millisecond'; + if (units === 'millisecond') { + return this.valueOf() > localInput.valueOf(); + } else { + return localInput.valueOf() < this.clone().startOf(units).valueOf(); + } + } + + function isBefore(input, units) { + var localInput = isMoment(input) ? input : createLocal(input); + if (!(this.isValid() && localInput.isValid())) { + return false; + } + units = normalizeUnits(units) || 'millisecond'; + if (units === 'millisecond') { + return this.valueOf() < localInput.valueOf(); + } else { + return this.clone().endOf(units).valueOf() < localInput.valueOf(); + } + } + + function isBetween(from, to, units, inclusivity) { + var localFrom = isMoment(from) ? from : createLocal(from), + localTo = isMoment(to) ? to : createLocal(to); + if (!(this.isValid() && localFrom.isValid() && localTo.isValid())) { + return false; + } + inclusivity = inclusivity || '()'; + return ( + (inclusivity[0] === '(' + ? this.isAfter(localFrom, units) + : !this.isBefore(localFrom, units)) && + (inclusivity[1] === ')' + ? this.isBefore(localTo, units) + : !this.isAfter(localTo, units)) + ); + } + + function isSame(input, units) { + var localInput = isMoment(input) ? input : createLocal(input), + inputMs; + if (!(this.isValid() && localInput.isValid())) { + return false; + } + units = normalizeUnits(units) || 'millisecond'; + if (units === 'millisecond') { + return this.valueOf() === localInput.valueOf(); + } else { + inputMs = localInput.valueOf(); + return ( + this.clone().startOf(units).valueOf() <= inputMs && + inputMs <= this.clone().endOf(units).valueOf() + ); + } + } + + function isSameOrAfter(input, units) { + return this.isSame(input, units) || this.isAfter(input, units); + } + + function isSameOrBefore(input, units) { + return this.isSame(input, units) || this.isBefore(input, units); + } + + function diff(input, units, asFloat) { + var that, zoneDelta, output; + + if (!this.isValid()) { + return NaN; + } + + that = cloneWithOffset(input, this); + + if (!that.isValid()) { + return NaN; + } + + zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4; + + units = normalizeUnits(units); + + switch (units) { + case 'year': + output = monthDiff(this, that) / 12; + break; + case 'month': + output = monthDiff(this, that); + break; + case 'quarter': + output = monthDiff(this, that) / 3; + break; + case 'second': + output = (this - that) / 1e3; + break; // 1000 + case 'minute': + output = (this - that) / 6e4; + break; // 1000 * 60 + case 'hour': + output = (this - that) / 36e5; + break; // 1000 * 60 * 60 + case 'day': + output = (this - that - zoneDelta) / 864e5; + break; // 1000 * 60 * 60 * 24, negate dst + case 'week': + output = (this - that - zoneDelta) / 6048e5; + break; // 1000 * 60 * 60 * 24 * 7, negate dst + default: + output = this - that; + } + + return asFloat ? output : absFloor(output); + } + + function monthDiff(a, b) { + if (a.date() < b.date()) { + // end-of-month calculations work correct when the start month has more + // days than the end month. + return -monthDiff(b, a); + } + // difference in months + var wholeMonthDiff = (b.year() - a.year()) * 12 + (b.month() - a.month()), + // b is in (anchor - 1 month, anchor + 1 month) + anchor = a.clone().add(wholeMonthDiff, 'months'), + anchor2, + adjust; + + if (b - anchor < 0) { + anchor2 = a.clone().add(wholeMonthDiff - 1, 'months'); + // linear across the month + adjust = (b - anchor) / (anchor - anchor2); + } else { + anchor2 = a.clone().add(wholeMonthDiff + 1, 'months'); + // linear across the month + adjust = (b - anchor) / (anchor2 - anchor); + } + + //check for negative zero, return zero if negative zero + return -(wholeMonthDiff + adjust) || 0; + } + + hooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ'; + hooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]'; + + function toString() { + return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ'); + } + + function toISOString(keepOffset) { + if (!this.isValid()) { + return null; + } + var utc = keepOffset !== true, + m = utc ? this.clone().utc() : this; + if (m.year() < 0 || m.year() > 9999) { + return formatMoment( + m, + utc + ? 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]' + : 'YYYYYY-MM-DD[T]HH:mm:ss.SSSZ' + ); + } + if (isFunction(Date.prototype.toISOString)) { + // native implementation is ~50x faster, use it when we can + if (utc) { + return this.toDate().toISOString(); + } else { + return new Date(this.valueOf() + this.utcOffset() * 60 * 1000) + .toISOString() + .replace('Z', formatMoment(m, 'Z')); + } + } + return formatMoment( + m, + utc ? 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYY-MM-DD[T]HH:mm:ss.SSSZ' + ); + } + + /** + * Return a human readable representation of a moment that can + * also be evaluated to get a new moment which is the same + * + * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects + */ + function inspect() { + if (!this.isValid()) { + return 'moment.invalid(/* ' + this._i + ' */)'; + } + var func = 'moment', + zone = '', + prefix, + year, + datetime, + suffix; + if (!this.isLocal()) { + func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone'; + zone = 'Z'; + } + prefix = '[' + func + '("]'; + year = 0 <= this.year() && this.year() <= 9999 ? 'YYYY' : 'YYYYYY'; + datetime = '-MM-DD[T]HH:mm:ss.SSS'; + suffix = zone + '[")]'; + + return this.format(prefix + year + datetime + suffix); + } + + function format(inputString) { + if (!inputString) { + inputString = this.isUtc() + ? hooks.defaultFormatUtc + : hooks.defaultFormat; + } + var output = formatMoment(this, inputString); + return this.localeData().postformat(output); + } + + function from(time, withoutSuffix) { + if ( + this.isValid() && + ((isMoment(time) && time.isValid()) || createLocal(time).isValid()) + ) { + return createDuration({ to: this, from: time }) + .locale(this.locale()) + .humanize(!withoutSuffix); + } else { + return this.localeData().invalidDate(); + } + } + + function fromNow(withoutSuffix) { + return this.from(createLocal(), withoutSuffix); + } + + function to(time, withoutSuffix) { + if ( + this.isValid() && + ((isMoment(time) && time.isValid()) || createLocal(time).isValid()) + ) { + return createDuration({ from: this, to: time }) + .locale(this.locale()) + .humanize(!withoutSuffix); + } else { + return this.localeData().invalidDate(); + } + } + + function toNow(withoutSuffix) { + return this.to(createLocal(), withoutSuffix); + } + + // If passed a locale key, it will set the locale for this + // instance. Otherwise, it will return the locale configuration + // variables for this instance. + function locale(key) { + var newLocaleData; + + if (key === undefined) { + return this._locale._abbr; + } else { + newLocaleData = getLocale(key); + if (newLocaleData != null) { + this._locale = newLocaleData; + } + return this; + } + } + + var lang = deprecate( + 'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.', + function (key) { + if (key === undefined) { + return this.localeData(); + } else { + return this.locale(key); + } + } + ); + + function localeData() { + return this._locale; + } + + var MS_PER_SECOND = 1000, + MS_PER_MINUTE = 60 * MS_PER_SECOND, + MS_PER_HOUR = 60 * MS_PER_MINUTE, + MS_PER_400_YEARS = (365 * 400 + 97) * 24 * MS_PER_HOUR; + + // actual modulo - handles negative numbers (for dates before 1970): + function mod$1(dividend, divisor) { + return ((dividend % divisor) + divisor) % divisor; + } + + function localStartOfDate(y, m, d) { + // the date constructor remaps years 0-99 to 1900-1999 + if (y < 100 && y >= 0) { + // preserve leap years using a full 400 year cycle, then reset + return new Date(y + 400, m, d) - MS_PER_400_YEARS; + } else { + return new Date(y, m, d).valueOf(); + } + } + + function utcStartOfDate(y, m, d) { + // Date.UTC remaps years 0-99 to 1900-1999 + if (y < 100 && y >= 0) { + // preserve leap years using a full 400 year cycle, then reset + return Date.UTC(y + 400, m, d) - MS_PER_400_YEARS; + } else { + return Date.UTC(y, m, d); + } + } + + function startOf(units) { + var time, startOfDate; + units = normalizeUnits(units); + if (units === undefined || units === 'millisecond' || !this.isValid()) { + return this; + } + + startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate; + + switch (units) { + case 'year': + time = startOfDate(this.year(), 0, 1); + break; + case 'quarter': + time = startOfDate( + this.year(), + this.month() - (this.month() % 3), + 1 + ); + break; + case 'month': + time = startOfDate(this.year(), this.month(), 1); + break; + case 'week': + time = startOfDate( + this.year(), + this.month(), + this.date() - this.weekday() + ); + break; + case 'isoWeek': + time = startOfDate( + this.year(), + this.month(), + this.date() - (this.isoWeekday() - 1) + ); + break; + case 'day': + case 'date': + time = startOfDate(this.year(), this.month(), this.date()); + break; + case 'hour': + time = this._d.valueOf(); + time -= mod$1( + time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE), + MS_PER_HOUR + ); + break; + case 'minute': + time = this._d.valueOf(); + time -= mod$1(time, MS_PER_MINUTE); + break; + case 'second': + time = this._d.valueOf(); + time -= mod$1(time, MS_PER_SECOND); + break; + } + + this._d.setTime(time); + hooks.updateOffset(this, true); + return this; + } + + function endOf(units) { + var time, startOfDate; + units = normalizeUnits(units); + if (units === undefined || units === 'millisecond' || !this.isValid()) { + return this; + } + + startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate; + + switch (units) { + case 'year': + time = startOfDate(this.year() + 1, 0, 1) - 1; + break; + case 'quarter': + time = + startOfDate( + this.year(), + this.month() - (this.month() % 3) + 3, + 1 + ) - 1; + break; + case 'month': + time = startOfDate(this.year(), this.month() + 1, 1) - 1; + break; + case 'week': + time = + startOfDate( + this.year(), + this.month(), + this.date() - this.weekday() + 7 + ) - 1; + break; + case 'isoWeek': + time = + startOfDate( + this.year(), + this.month(), + this.date() - (this.isoWeekday() - 1) + 7 + ) - 1; + break; + case 'day': + case 'date': + time = startOfDate(this.year(), this.month(), this.date() + 1) - 1; + break; + case 'hour': + time = this._d.valueOf(); + time += + MS_PER_HOUR - + mod$1( + time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE), + MS_PER_HOUR + ) - + 1; + break; + case 'minute': + time = this._d.valueOf(); + time += MS_PER_MINUTE - mod$1(time, MS_PER_MINUTE) - 1; + break; + case 'second': + time = this._d.valueOf(); + time += MS_PER_SECOND - mod$1(time, MS_PER_SECOND) - 1; + break; + } + + this._d.setTime(time); + hooks.updateOffset(this, true); + return this; + } + + function valueOf() { + return this._d.valueOf() - (this._offset || 0) * 60000; + } + + function unix() { + return Math.floor(this.valueOf() / 1000); + } + + function toDate() { + return new Date(this.valueOf()); + } + + function toArray() { + var m = this; + return [ + m.year(), + m.month(), + m.date(), + m.hour(), + m.minute(), + m.second(), + m.millisecond(), + ]; + } + + function toObject() { + var m = this; + return { + years: m.year(), + months: m.month(), + date: m.date(), + hours: m.hours(), + minutes: m.minutes(), + seconds: m.seconds(), + milliseconds: m.milliseconds(), + }; + } + + function toJSON() { + // new Date(NaN).toJSON() === null + return this.isValid() ? this.toISOString() : null; + } + + function isValid$2() { + return isValid(this); + } + + function parsingFlags() { + return extend({}, getParsingFlags(this)); + } + + function invalidAt() { + return getParsingFlags(this).overflow; + } + + function creationData() { + return { + input: this._i, + format: this._f, + locale: this._locale, + isUTC: this._isUTC, + strict: this._strict, + }; + } + + addFormatToken('N', 0, 0, 'eraAbbr'); + addFormatToken('NN', 0, 0, 'eraAbbr'); + addFormatToken('NNN', 0, 0, 'eraAbbr'); + addFormatToken('NNNN', 0, 0, 'eraName'); + addFormatToken('NNNNN', 0, 0, 'eraNarrow'); + + addFormatToken('y', ['y', 1], 'yo', 'eraYear'); + addFormatToken('y', ['yy', 2], 0, 'eraYear'); + addFormatToken('y', ['yyy', 3], 0, 'eraYear'); + addFormatToken('y', ['yyyy', 4], 0, 'eraYear'); + + addRegexToken('N', matchEraAbbr); + addRegexToken('NN', matchEraAbbr); + addRegexToken('NNN', matchEraAbbr); + addRegexToken('NNNN', matchEraName); + addRegexToken('NNNNN', matchEraNarrow); + + addParseToken(['N', 'NN', 'NNN', 'NNNN', 'NNNNN'], function ( + input, + array, + config, + token + ) { + var era = config._locale.erasParse(input, token, config._strict); + if (era) { + getParsingFlags(config).era = era; + } else { + getParsingFlags(config).invalidEra = input; + } + }); + + addRegexToken('y', matchUnsigned); + addRegexToken('yy', matchUnsigned); + addRegexToken('yyy', matchUnsigned); + addRegexToken('yyyy', matchUnsigned); + addRegexToken('yo', matchEraYearOrdinal); + + addParseToken(['y', 'yy', 'yyy', 'yyyy'], YEAR); + addParseToken(['yo'], function (input, array, config, token) { + var match; + if (config._locale._eraYearOrdinalRegex) { + match = input.match(config._locale._eraYearOrdinalRegex); + } + + if (config._locale.eraYearOrdinalParse) { + array[YEAR] = config._locale.eraYearOrdinalParse(input, match); + } else { + array[YEAR] = parseInt(input, 10); + } + }); + + function localeEras(m, format) { + var i, + l, + date, + eras = this._eras || getLocale('en')._eras; + for (i = 0, l = eras.length; i < l; ++i) { + switch (typeof eras[i].since) { + case 'string': + // truncate time + date = hooks(eras[i].since).startOf('day'); + eras[i].since = date.valueOf(); + break; + } + + switch (typeof eras[i].until) { + case 'undefined': + eras[i].until = +Infinity; + break; + case 'string': + // truncate time + date = hooks(eras[i].until).startOf('day').valueOf(); + eras[i].until = date.valueOf(); + break; + } + } + return eras; + } + + function localeErasParse(eraName, format, strict) { + var i, + l, + eras = this.eras(), + name, + abbr, + narrow; + eraName = eraName.toUpperCase(); + + for (i = 0, l = eras.length; i < l; ++i) { + name = eras[i].name.toUpperCase(); + abbr = eras[i].abbr.toUpperCase(); + narrow = eras[i].narrow.toUpperCase(); + + if (strict) { + switch (format) { + case 'N': + case 'NN': + case 'NNN': + if (abbr === eraName) { + return eras[i]; + } + break; + + case 'NNNN': + if (name === eraName) { + return eras[i]; + } + break; + + case 'NNNNN': + if (narrow === eraName) { + return eras[i]; + } + break; + } + } else if ([name, abbr, narrow].indexOf(eraName) >= 0) { + return eras[i]; + } + } + } + + function localeErasConvertYear(era, year) { + var dir = era.since <= era.until ? +1 : -1; + if (year === undefined) { + return hooks(era.since).year(); + } else { + return hooks(era.since).year() + (year - era.offset) * dir; + } + } + + function getEraName() { + var i, + l, + val, + eras = this.localeData().eras(); + for (i = 0, l = eras.length; i < l; ++i) { + // truncate time + val = this.clone().startOf('day').valueOf(); + + if (eras[i].since <= val && val <= eras[i].until) { + return eras[i].name; + } + if (eras[i].until <= val && val <= eras[i].since) { + return eras[i].name; + } + } + + return ''; + } + + function getEraNarrow() { + var i, + l, + val, + eras = this.localeData().eras(); + for (i = 0, l = eras.length; i < l; ++i) { + // truncate time + val = this.clone().startOf('day').valueOf(); + + if (eras[i].since <= val && val <= eras[i].until) { + return eras[i].narrow; + } + if (eras[i].until <= val && val <= eras[i].since) { + return eras[i].narrow; + } + } + + return ''; + } + + function getEraAbbr() { + var i, + l, + val, + eras = this.localeData().eras(); + for (i = 0, l = eras.length; i < l; ++i) { + // truncate time + val = this.clone().startOf('day').valueOf(); + + if (eras[i].since <= val && val <= eras[i].until) { + return eras[i].abbr; + } + if (eras[i].until <= val && val <= eras[i].since) { + return eras[i].abbr; + } + } + + return ''; + } + + function getEraYear() { + var i, + l, + dir, + val, + eras = this.localeData().eras(); + for (i = 0, l = eras.length; i < l; ++i) { + dir = eras[i].since <= eras[i].until ? +1 : -1; + + // truncate time + val = this.clone().startOf('day').valueOf(); + + if ( + (eras[i].since <= val && val <= eras[i].until) || + (eras[i].until <= val && val <= eras[i].since) + ) { + return ( + (this.year() - hooks(eras[i].since).year()) * dir + + eras[i].offset + ); + } + } + + return this.year(); + } + + function erasNameRegex(isStrict) { + if (!hasOwnProp(this, '_erasNameRegex')) { + computeErasParse.call(this); + } + return isStrict ? this._erasNameRegex : this._erasRegex; + } + + function erasAbbrRegex(isStrict) { + if (!hasOwnProp(this, '_erasAbbrRegex')) { + computeErasParse.call(this); + } + return isStrict ? this._erasAbbrRegex : this._erasRegex; + } + + function erasNarrowRegex(isStrict) { + if (!hasOwnProp(this, '_erasNarrowRegex')) { + computeErasParse.call(this); + } + return isStrict ? this._erasNarrowRegex : this._erasRegex; + } + + function matchEraAbbr(isStrict, locale) { + return locale.erasAbbrRegex(isStrict); + } + + function matchEraName(isStrict, locale) { + return locale.erasNameRegex(isStrict); + } + + function matchEraNarrow(isStrict, locale) { + return locale.erasNarrowRegex(isStrict); + } + + function matchEraYearOrdinal(isStrict, locale) { + return locale._eraYearOrdinalRegex || matchUnsigned; + } + + function computeErasParse() { + var abbrPieces = [], + namePieces = [], + narrowPieces = [], + mixedPieces = [], + i, + l, + eras = this.eras(); + + for (i = 0, l = eras.length; i < l; ++i) { + namePieces.push(regexEscape(eras[i].name)); + abbrPieces.push(regexEscape(eras[i].abbr)); + narrowPieces.push(regexEscape(eras[i].narrow)); + + mixedPieces.push(regexEscape(eras[i].name)); + mixedPieces.push(regexEscape(eras[i].abbr)); + mixedPieces.push(regexEscape(eras[i].narrow)); + } + + this._erasRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i'); + this._erasNameRegex = new RegExp('^(' + namePieces.join('|') + ')', 'i'); + this._erasAbbrRegex = new RegExp('^(' + abbrPieces.join('|') + ')', 'i'); + this._erasNarrowRegex = new RegExp( + '^(' + narrowPieces.join('|') + ')', + 'i' + ); + } + + // FORMATTING + + addFormatToken(0, ['gg', 2], 0, function () { + return this.weekYear() % 100; + }); + + addFormatToken(0, ['GG', 2], 0, function () { + return this.isoWeekYear() % 100; + }); + + function addWeekYearFormatToken(token, getter) { + addFormatToken(0, [token, token.length], 0, getter); + } + + addWeekYearFormatToken('gggg', 'weekYear'); + addWeekYearFormatToken('ggggg', 'weekYear'); + addWeekYearFormatToken('GGGG', 'isoWeekYear'); + addWeekYearFormatToken('GGGGG', 'isoWeekYear'); + + // ALIASES + + addUnitAlias('weekYear', 'gg'); + addUnitAlias('isoWeekYear', 'GG'); + + // PRIORITY + + addUnitPriority('weekYear', 1); + addUnitPriority('isoWeekYear', 1); + + // PARSING + + addRegexToken('G', matchSigned); + addRegexToken('g', matchSigned); + addRegexToken('GG', match1to2, match2); + addRegexToken('gg', match1to2, match2); + addRegexToken('GGGG', match1to4, match4); + addRegexToken('gggg', match1to4, match4); + addRegexToken('GGGGG', match1to6, match6); + addRegexToken('ggggg', match1to6, match6); + + addWeekParseToken(['gggg', 'ggggg', 'GGGG', 'GGGGG'], function ( + input, + week, + config, + token + ) { + week[token.substr(0, 2)] = toInt(input); + }); + + addWeekParseToken(['gg', 'GG'], function (input, week, config, token) { + week[token] = hooks.parseTwoDigitYear(input); + }); + + // MOMENTS + + function getSetWeekYear(input) { + return getSetWeekYearHelper.call( + this, + input, + this.week(), + this.weekday(), + this.localeData()._week.dow, + this.localeData()._week.doy + ); + } + + function getSetISOWeekYear(input) { + return getSetWeekYearHelper.call( + this, + input, + this.isoWeek(), + this.isoWeekday(), + 1, + 4 + ); + } + + function getISOWeeksInYear() { + return weeksInYear(this.year(), 1, 4); + } + + function getISOWeeksInISOWeekYear() { + return weeksInYear(this.isoWeekYear(), 1, 4); + } + + function getWeeksInYear() { + var weekInfo = this.localeData()._week; + return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy); + } + + function getWeeksInWeekYear() { + var weekInfo = this.localeData()._week; + return weeksInYear(this.weekYear(), weekInfo.dow, weekInfo.doy); + } + + function getSetWeekYearHelper(input, week, weekday, dow, doy) { + var weeksTarget; + if (input == null) { + return weekOfYear(this, dow, doy).year; + } else { + weeksTarget = weeksInYear(input, dow, doy); + if (week > weeksTarget) { + week = weeksTarget; + } + return setWeekAll.call(this, input, week, weekday, dow, doy); + } + } + + function setWeekAll(weekYear, week, weekday, dow, doy) { + var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy), + date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear); + + this.year(date.getUTCFullYear()); + this.month(date.getUTCMonth()); + this.date(date.getUTCDate()); + return this; + } + + // FORMATTING + + addFormatToken('Q', 0, 'Qo', 'quarter'); + + // ALIASES + + addUnitAlias('quarter', 'Q'); + + // PRIORITY + + addUnitPriority('quarter', 7); + + // PARSING + + addRegexToken('Q', match1); + addParseToken('Q', function (input, array) { + array[MONTH] = (toInt(input) - 1) * 3; + }); + + // MOMENTS + + function getSetQuarter(input) { + return input == null + ? Math.ceil((this.month() + 1) / 3) + : this.month((input - 1) * 3 + (this.month() % 3)); + } + + // FORMATTING + + addFormatToken('D', ['DD', 2], 'Do', 'date'); + + // ALIASES + + addUnitAlias('date', 'D'); + + // PRIORITY + addUnitPriority('date', 9); + + // PARSING + + addRegexToken('D', match1to2); + addRegexToken('DD', match1to2, match2); + addRegexToken('Do', function (isStrict, locale) { + // TODO: Remove "ordinalParse" fallback in next major release. + return isStrict + ? locale._dayOfMonthOrdinalParse || locale._ordinalParse + : locale._dayOfMonthOrdinalParseLenient; + }); + + addParseToken(['D', 'DD'], DATE); + addParseToken('Do', function (input, array) { + array[DATE] = toInt(input.match(match1to2)[0]); + }); + + // MOMENTS + + var getSetDayOfMonth = makeGetSet('Date', true); + + // FORMATTING + + addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear'); + + // ALIASES + + addUnitAlias('dayOfYear', 'DDD'); + + // PRIORITY + addUnitPriority('dayOfYear', 4); + + // PARSING + + addRegexToken('DDD', match1to3); + addRegexToken('DDDD', match3); + addParseToken(['DDD', 'DDDD'], function (input, array, config) { + config._dayOfYear = toInt(input); + }); + + // HELPERS + + // MOMENTS + + function getSetDayOfYear(input) { + var dayOfYear = + Math.round( + (this.clone().startOf('day') - this.clone().startOf('year')) / 864e5 + ) + 1; + return input == null ? dayOfYear : this.add(input - dayOfYear, 'd'); + } + + // FORMATTING + + addFormatToken('m', ['mm', 2], 0, 'minute'); + + // ALIASES + + addUnitAlias('minute', 'm'); + + // PRIORITY + + addUnitPriority('minute', 14); + + // PARSING + + addRegexToken('m', match1to2); + addRegexToken('mm', match1to2, match2); + addParseToken(['m', 'mm'], MINUTE); + + // MOMENTS + + var getSetMinute = makeGetSet('Minutes', false); + + // FORMATTING + + addFormatToken('s', ['ss', 2], 0, 'second'); + + // ALIASES + + addUnitAlias('second', 's'); + + // PRIORITY + + addUnitPriority('second', 15); + + // PARSING + + addRegexToken('s', match1to2); + addRegexToken('ss', match1to2, match2); + addParseToken(['s', 'ss'], SECOND); + + // MOMENTS + + var getSetSecond = makeGetSet('Seconds', false); + + // FORMATTING + + addFormatToken('S', 0, 0, function () { + return ~~(this.millisecond() / 100); + }); + + addFormatToken(0, ['SS', 2], 0, function () { + return ~~(this.millisecond() / 10); + }); + + addFormatToken(0, ['SSS', 3], 0, 'millisecond'); + addFormatToken(0, ['SSSS', 4], 0, function () { + return this.millisecond() * 10; + }); + addFormatToken(0, ['SSSSS', 5], 0, function () { + return this.millisecond() * 100; + }); + addFormatToken(0, ['SSSSSS', 6], 0, function () { + return this.millisecond() * 1000; + }); + addFormatToken(0, ['SSSSSSS', 7], 0, function () { + return this.millisecond() * 10000; + }); + addFormatToken(0, ['SSSSSSSS', 8], 0, function () { + return this.millisecond() * 100000; + }); + addFormatToken(0, ['SSSSSSSSS', 9], 0, function () { + return this.millisecond() * 1000000; + }); + + // ALIASES + + addUnitAlias('millisecond', 'ms'); + + // PRIORITY + + addUnitPriority('millisecond', 16); + + // PARSING + + addRegexToken('S', match1to3, match1); + addRegexToken('SS', match1to3, match2); + addRegexToken('SSS', match1to3, match3); + + var token, getSetMillisecond; + for (token = 'SSSS'; token.length <= 9; token += 'S') { + addRegexToken(token, matchUnsigned); + } + + function parseMs(input, array) { + array[MILLISECOND] = toInt(('0.' + input) * 1000); + } + + for (token = 'S'; token.length <= 9; token += 'S') { + addParseToken(token, parseMs); + } + + getSetMillisecond = makeGetSet('Milliseconds', false); + + // FORMATTING + + addFormatToken('z', 0, 0, 'zoneAbbr'); + addFormatToken('zz', 0, 0, 'zoneName'); + + // MOMENTS + + function getZoneAbbr() { + return this._isUTC ? 'UTC' : ''; + } + + function getZoneName() { + return this._isUTC ? 'Coordinated Universal Time' : ''; + } + + var proto = Moment.prototype; + + proto.add = add; + proto.calendar = calendar$1; + proto.clone = clone; + proto.diff = diff; + proto.endOf = endOf; + proto.format = format; + proto.from = from; + proto.fromNow = fromNow; + proto.to = to; + proto.toNow = toNow; + proto.get = stringGet; + proto.invalidAt = invalidAt; + proto.isAfter = isAfter; + proto.isBefore = isBefore; + proto.isBetween = isBetween; + proto.isSame = isSame; + proto.isSameOrAfter = isSameOrAfter; + proto.isSameOrBefore = isSameOrBefore; + proto.isValid = isValid$2; + proto.lang = lang; + proto.locale = locale; + proto.localeData = localeData; + proto.max = prototypeMax; + proto.min = prototypeMin; + proto.parsingFlags = parsingFlags; + proto.set = stringSet; + proto.startOf = startOf; + proto.subtract = subtract; + proto.toArray = toArray; + proto.toObject = toObject; + proto.toDate = toDate; + proto.toISOString = toISOString; + proto.inspect = inspect; + if (typeof Symbol !== 'undefined' && Symbol.for != null) { + proto[Symbol.for('nodejs.util.inspect.custom')] = function () { + return 'Moment<' + this.format() + '>'; + }; + } + proto.toJSON = toJSON; + proto.toString = toString; + proto.unix = unix; + proto.valueOf = valueOf; + proto.creationData = creationData; + proto.eraName = getEraName; + proto.eraNarrow = getEraNarrow; + proto.eraAbbr = getEraAbbr; + proto.eraYear = getEraYear; + proto.year = getSetYear; + proto.isLeapYear = getIsLeapYear; + proto.weekYear = getSetWeekYear; + proto.isoWeekYear = getSetISOWeekYear; + proto.quarter = proto.quarters = getSetQuarter; + proto.month = getSetMonth; + proto.daysInMonth = getDaysInMonth; + proto.week = proto.weeks = getSetWeek; + proto.isoWeek = proto.isoWeeks = getSetISOWeek; + proto.weeksInYear = getWeeksInYear; + proto.weeksInWeekYear = getWeeksInWeekYear; + proto.isoWeeksInYear = getISOWeeksInYear; + proto.isoWeeksInISOWeekYear = getISOWeeksInISOWeekYear; + proto.date = getSetDayOfMonth; + proto.day = proto.days = getSetDayOfWeek; + proto.weekday = getSetLocaleDayOfWeek; + proto.isoWeekday = getSetISODayOfWeek; + proto.dayOfYear = getSetDayOfYear; + proto.hour = proto.hours = getSetHour; + proto.minute = proto.minutes = getSetMinute; + proto.second = proto.seconds = getSetSecond; + proto.millisecond = proto.milliseconds = getSetMillisecond; + proto.utcOffset = getSetOffset; + proto.utc = setOffsetToUTC; + proto.local = setOffsetToLocal; + proto.parseZone = setOffsetToParsedOffset; + proto.hasAlignedHourOffset = hasAlignedHourOffset; + proto.isDST = isDaylightSavingTime; + proto.isLocal = isLocal; + proto.isUtcOffset = isUtcOffset; + proto.isUtc = isUtc; + proto.isUTC = isUtc; + proto.zoneAbbr = getZoneAbbr; + proto.zoneName = getZoneName; + proto.dates = deprecate( + 'dates accessor is deprecated. Use date instead.', + getSetDayOfMonth + ); + proto.months = deprecate( + 'months accessor is deprecated. Use month instead', + getSetMonth + ); + proto.years = deprecate( + 'years accessor is deprecated. Use year instead', + getSetYear + ); + proto.zone = deprecate( + 'moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/', + getSetZone + ); + proto.isDSTShifted = deprecate( + 'isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information', + isDaylightSavingTimeShifted + ); + + function createUnix(input) { + return createLocal(input * 1000); + } + + function createInZone() { + return createLocal.apply(null, arguments).parseZone(); + } + + function preParsePostFormat(string) { + return string; + } + + var proto$1 = Locale.prototype; + + proto$1.calendar = calendar; + proto$1.longDateFormat = longDateFormat; + proto$1.invalidDate = invalidDate; + proto$1.ordinal = ordinal; + proto$1.preparse = preParsePostFormat; + proto$1.postformat = preParsePostFormat; + proto$1.relativeTime = relativeTime; + proto$1.pastFuture = pastFuture; + proto$1.set = set; + proto$1.eras = localeEras; + proto$1.erasParse = localeErasParse; + proto$1.erasConvertYear = localeErasConvertYear; + proto$1.erasAbbrRegex = erasAbbrRegex; + proto$1.erasNameRegex = erasNameRegex; + proto$1.erasNarrowRegex = erasNarrowRegex; + + proto$1.months = localeMonths; + proto$1.monthsShort = localeMonthsShort; + proto$1.monthsParse = localeMonthsParse; + proto$1.monthsRegex = monthsRegex; + proto$1.monthsShortRegex = monthsShortRegex; + proto$1.week = localeWeek; + proto$1.firstDayOfYear = localeFirstDayOfYear; + proto$1.firstDayOfWeek = localeFirstDayOfWeek; + + proto$1.weekdays = localeWeekdays; + proto$1.weekdaysMin = localeWeekdaysMin; + proto$1.weekdaysShort = localeWeekdaysShort; + proto$1.weekdaysParse = localeWeekdaysParse; + + proto$1.weekdaysRegex = weekdaysRegex; + proto$1.weekdaysShortRegex = weekdaysShortRegex; + proto$1.weekdaysMinRegex = weekdaysMinRegex; + + proto$1.isPM = localeIsPM; + proto$1.meridiem = localeMeridiem; + + function get$1(format, index, field, setter) { + var locale = getLocale(), + utc = createUTC().set(setter, index); + return locale[field](utc, format); + } + + function listMonthsImpl(format, index, field) { + if (isNumber(format)) { + index = format; + format = undefined; + } + + format = format || ''; + + if (index != null) { + return get$1(format, index, field, 'month'); + } + + var i, + out = []; + for (i = 0; i < 12; i++) { + out[i] = get$1(format, i, field, 'month'); + } + return out; + } + + // () + // (5) + // (fmt, 5) + // (fmt) + // (true) + // (true, 5) + // (true, fmt, 5) + // (true, fmt) + function listWeekdaysImpl(localeSorted, format, index, field) { + if (typeof localeSorted === 'boolean') { + if (isNumber(format)) { + index = format; + format = undefined; + } + + format = format || ''; + } else { + format = localeSorted; + index = format; + localeSorted = false; + + if (isNumber(format)) { + index = format; + format = undefined; + } + + format = format || ''; + } + + var locale = getLocale(), + shift = localeSorted ? locale._week.dow : 0, + i, + out = []; + + if (index != null) { + return get$1(format, (index + shift) % 7, field, 'day'); + } + + for (i = 0; i < 7; i++) { + out[i] = get$1(format, (i + shift) % 7, field, 'day'); + } + return out; + } + + function listMonths(format, index) { + return listMonthsImpl(format, index, 'months'); + } + + function listMonthsShort(format, index) { + return listMonthsImpl(format, index, 'monthsShort'); + } + + function listWeekdays(localeSorted, format, index) { + return listWeekdaysImpl(localeSorted, format, index, 'weekdays'); + } + + function listWeekdaysShort(localeSorted, format, index) { + return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort'); + } + + function listWeekdaysMin(localeSorted, format, index) { + return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin'); + } + + getSetGlobalLocale('en', { + eras: [ + { + since: '0001-01-01', + until: +Infinity, + offset: 1, + name: 'Anno Domini', + narrow: 'AD', + abbr: 'AD', + }, + { + since: '0000-12-31', + until: -Infinity, + offset: 1, + name: 'Before Christ', + narrow: 'BC', + abbr: 'BC', + }, + ], + dayOfMonthOrdinalParse: /\d{1,2}(th|st|nd|rd)/, + ordinal: function (number) { + var b = number % 10, + output = + toInt((number % 100) / 10) === 1 + ? 'th' + : b === 1 + ? 'st' + : b === 2 + ? 'nd' + : b === 3 + ? 'rd' + : 'th'; + return number + output; + }, + }); + + // Side effect imports + + hooks.lang = deprecate( + 'moment.lang is deprecated. Use moment.locale instead.', + getSetGlobalLocale + ); + hooks.langData = deprecate( + 'moment.langData is deprecated. Use moment.localeData instead.', + getLocale + ); + + var mathAbs = Math.abs; + + function abs() { + var data = this._data; + + this._milliseconds = mathAbs(this._milliseconds); + this._days = mathAbs(this._days); + this._months = mathAbs(this._months); + + data.milliseconds = mathAbs(data.milliseconds); + data.seconds = mathAbs(data.seconds); + data.minutes = mathAbs(data.minutes); + data.hours = mathAbs(data.hours); + data.months = mathAbs(data.months); + data.years = mathAbs(data.years); + + return this; + } + + function addSubtract$1(duration, input, value, direction) { + var other = createDuration(input, value); + + duration._milliseconds += direction * other._milliseconds; + duration._days += direction * other._days; + duration._months += direction * other._months; + + return duration._bubble(); + } + + // supports only 2.0-style add(1, 's') or add(duration) + function add$1(input, value) { + return addSubtract$1(this, input, value, 1); + } + + // supports only 2.0-style subtract(1, 's') or subtract(duration) + function subtract$1(input, value) { + return addSubtract$1(this, input, value, -1); + } + + function absCeil(number) { + if (number < 0) { + return Math.floor(number); + } else { + return Math.ceil(number); + } + } + + function bubble() { + var milliseconds = this._milliseconds, + days = this._days, + months = this._months, + data = this._data, + seconds, + minutes, + hours, + years, + monthsFromDays; + + // if we have a mix of positive and negative values, bubble down first + // check: https://github.com/moment/moment/issues/2166 + if ( + !( + (milliseconds >= 0 && days >= 0 && months >= 0) || + (milliseconds <= 0 && days <= 0 && months <= 0) + ) + ) { + milliseconds += absCeil(monthsToDays(months) + days) * 864e5; + days = 0; + months = 0; + } + + // The following code bubbles up values, see the tests for + // examples of what that means. + data.milliseconds = milliseconds % 1000; + + seconds = absFloor(milliseconds / 1000); + data.seconds = seconds % 60; + + minutes = absFloor(seconds / 60); + data.minutes = minutes % 60; + + hours = absFloor(minutes / 60); + data.hours = hours % 24; + + days += absFloor(hours / 24); + + // convert days to months + monthsFromDays = absFloor(daysToMonths(days)); + months += monthsFromDays; + days -= absCeil(monthsToDays(monthsFromDays)); + + // 12 months -> 1 year + years = absFloor(months / 12); + months %= 12; + + data.days = days; + data.months = months; + data.years = years; + + return this; + } + + function daysToMonths(days) { + // 400 years have 146097 days (taking into account leap year rules) + // 400 years have 12 months === 4800 + return (days * 4800) / 146097; + } + + function monthsToDays(months) { + // the reverse of daysToMonths + return (months * 146097) / 4800; + } + + function as(units) { + if (!this.isValid()) { + return NaN; + } + var days, + months, + milliseconds = this._milliseconds; + + units = normalizeUnits(units); + + if (units === 'month' || units === 'quarter' || units === 'year') { + days = this._days + milliseconds / 864e5; + months = this._months + daysToMonths(days); + switch (units) { + case 'month': + return months; + case 'quarter': + return months / 3; + case 'year': + return months / 12; + } + } else { + // handle milliseconds separately because of floating point math errors (issue #1867) + days = this._days + Math.round(monthsToDays(this._months)); + switch (units) { + case 'week': + return days / 7 + milliseconds / 6048e5; + case 'day': + return days + milliseconds / 864e5; + case 'hour': + return days * 24 + milliseconds / 36e5; + case 'minute': + return days * 1440 + milliseconds / 6e4; + case 'second': + return days * 86400 + milliseconds / 1000; + // Math.floor prevents floating point math errors here + case 'millisecond': + return Math.floor(days * 864e5) + milliseconds; + default: + throw new Error('Unknown unit ' + units); + } + } + } + + // TODO: Use this.as('ms')? + function valueOf$1() { + if (!this.isValid()) { + return NaN; + } + return ( + this._milliseconds + + this._days * 864e5 + + (this._months % 12) * 2592e6 + + toInt(this._months / 12) * 31536e6 + ); + } + + function makeAs(alias) { + return function () { + return this.as(alias); + }; + } + + var asMilliseconds = makeAs('ms'), + asSeconds = makeAs('s'), + asMinutes = makeAs('m'), + asHours = makeAs('h'), + asDays = makeAs('d'), + asWeeks = makeAs('w'), + asMonths = makeAs('M'), + asQuarters = makeAs('Q'), + asYears = makeAs('y'); + + function clone$1() { + return createDuration(this); + } + + function get$2(units) { + units = normalizeUnits(units); + return this.isValid() ? this[units + 's']() : NaN; + } + + function makeGetter(name) { + return function () { + return this.isValid() ? this._data[name] : NaN; + }; + } + + var milliseconds = makeGetter('milliseconds'), + seconds = makeGetter('seconds'), + minutes = makeGetter('minutes'), + hours = makeGetter('hours'), + days = makeGetter('days'), + months = makeGetter('months'), + years = makeGetter('years'); + + function weeks() { + return absFloor(this.days() / 7); + } + + var round = Math.round, + thresholds = { + ss: 44, // a few seconds to seconds + s: 45, // seconds to minute + m: 45, // minutes to hour + h: 22, // hours to day + d: 26, // days to month/week + w: null, // weeks to month + M: 11, // months to year + }; + + // helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize + function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) { + return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture); + } + + function relativeTime$1(posNegDuration, withoutSuffix, thresholds, locale) { + var duration = createDuration(posNegDuration).abs(), + seconds = round(duration.as('s')), + minutes = round(duration.as('m')), + hours = round(duration.as('h')), + days = round(duration.as('d')), + months = round(duration.as('M')), + weeks = round(duration.as('w')), + years = round(duration.as('y')), + a = + (seconds <= thresholds.ss && ['s', seconds]) || + (seconds < thresholds.s && ['ss', seconds]) || + (minutes <= 1 && ['m']) || + (minutes < thresholds.m && ['mm', minutes]) || + (hours <= 1 && ['h']) || + (hours < thresholds.h && ['hh', hours]) || + (days <= 1 && ['d']) || + (days < thresholds.d && ['dd', days]); + + if (thresholds.w != null) { + a = + a || + (weeks <= 1 && ['w']) || + (weeks < thresholds.w && ['ww', weeks]); + } + a = a || + (months <= 1 && ['M']) || + (months < thresholds.M && ['MM', months]) || + (years <= 1 && ['y']) || ['yy', years]; + + a[2] = withoutSuffix; + a[3] = +posNegDuration > 0; + a[4] = locale; + return substituteTimeAgo.apply(null, a); + } + + // This function allows you to set the rounding function for relative time strings + function getSetRelativeTimeRounding(roundingFunction) { + if (roundingFunction === undefined) { + return round; + } + if (typeof roundingFunction === 'function') { + round = roundingFunction; + return true; + } + return false; + } + + // This function allows you to set a threshold for relative time strings + function getSetRelativeTimeThreshold(threshold, limit) { + if (thresholds[threshold] === undefined) { + return false; + } + if (limit === undefined) { + return thresholds[threshold]; + } + thresholds[threshold] = limit; + if (threshold === 's') { + thresholds.ss = limit - 1; + } + return true; + } + + function humanize(argWithSuffix, argThresholds) { + if (!this.isValid()) { + return this.localeData().invalidDate(); + } + + var withSuffix = false, + th = thresholds, + locale, + output; + + if (typeof argWithSuffix === 'object') { + argThresholds = argWithSuffix; + argWithSuffix = false; + } + if (typeof argWithSuffix === 'boolean') { + withSuffix = argWithSuffix; + } + if (typeof argThresholds === 'object') { + th = Object.assign({}, thresholds, argThresholds); + if (argThresholds.s != null && argThresholds.ss == null) { + th.ss = argThresholds.s - 1; + } + } + + locale = this.localeData(); + output = relativeTime$1(this, !withSuffix, th, locale); + + if (withSuffix) { + output = locale.pastFuture(+this, output); + } + + return locale.postformat(output); + } + + var abs$1 = Math.abs; + + function sign(x) { + return (x > 0) - (x < 0) || +x; + } + + function toISOString$1() { + // for ISO strings we do not use the normal bubbling rules: + // * milliseconds bubble up until they become hours + // * days do not bubble at all + // * months bubble up until they become years + // This is because there is no context-free conversion between hours and days + // (think of clock changes) + // and also not between days and months (28-31 days per month) + if (!this.isValid()) { + return this.localeData().invalidDate(); + } + + var seconds = abs$1(this._milliseconds) / 1000, + days = abs$1(this._days), + months = abs$1(this._months), + minutes, + hours, + years, + s, + total = this.asSeconds(), + totalSign, + ymSign, + daysSign, + hmsSign; + + if (!total) { + // this is the same as C#'s (Noda) and python (isodate)... + // but not other JS (goog.date) + return 'P0D'; + } + + // 3600 seconds -> 60 minutes -> 1 hour + minutes = absFloor(seconds / 60); + hours = absFloor(minutes / 60); + seconds %= 60; + minutes %= 60; + + // 12 months -> 1 year + years = absFloor(months / 12); + months %= 12; + + // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js + s = seconds ? seconds.toFixed(3).replace(/\.?0+$/, '') : ''; + + totalSign = total < 0 ? '-' : ''; + ymSign = sign(this._months) !== sign(total) ? '-' : ''; + daysSign = sign(this._days) !== sign(total) ? '-' : ''; + hmsSign = sign(this._milliseconds) !== sign(total) ? '-' : ''; + + return ( + totalSign + + 'P' + + (years ? ymSign + years + 'Y' : '') + + (months ? ymSign + months + 'M' : '') + + (days ? daysSign + days + 'D' : '') + + (hours || minutes || seconds ? 'T' : '') + + (hours ? hmsSign + hours + 'H' : '') + + (minutes ? hmsSign + minutes + 'M' : '') + + (seconds ? hmsSign + s + 'S' : '') + ); + } + + var proto$2 = Duration.prototype; + + proto$2.isValid = isValid$1; + proto$2.abs = abs; + proto$2.add = add$1; + proto$2.subtract = subtract$1; + proto$2.as = as; + proto$2.asMilliseconds = asMilliseconds; + proto$2.asSeconds = asSeconds; + proto$2.asMinutes = asMinutes; + proto$2.asHours = asHours; + proto$2.asDays = asDays; + proto$2.asWeeks = asWeeks; + proto$2.asMonths = asMonths; + proto$2.asQuarters = asQuarters; + proto$2.asYears = asYears; + proto$2.valueOf = valueOf$1; + proto$2._bubble = bubble; + proto$2.clone = clone$1; + proto$2.get = get$2; + proto$2.milliseconds = milliseconds; + proto$2.seconds = seconds; + proto$2.minutes = minutes; + proto$2.hours = hours; + proto$2.days = days; + proto$2.weeks = weeks; + proto$2.months = months; + proto$2.years = years; + proto$2.humanize = humanize; + proto$2.toISOString = toISOString$1; + proto$2.toString = toISOString$1; + proto$2.toJSON = toISOString$1; + proto$2.locale = locale; + proto$2.localeData = localeData; + + proto$2.toIsoString = deprecate( + 'toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)', + toISOString$1 + ); + proto$2.lang = lang; + + // FORMATTING + + addFormatToken('X', 0, 0, 'unix'); + addFormatToken('x', 0, 0, 'valueOf'); + + // PARSING + + addRegexToken('x', matchSigned); + addRegexToken('X', matchTimestamp); + addParseToken('X', function (input, array, config) { + config._d = new Date(parseFloat(input) * 1000); + }); + addParseToken('x', function (input, array, config) { + config._d = new Date(toInt(input)); + }); + + //! moment.js + + hooks.version = '2.28.0'; + + setHookCallback(createLocal); + + hooks.fn = proto; + hooks.min = min; + hooks.max = max; + hooks.now = now; + hooks.utc = createUTC; + hooks.unix = createUnix; + hooks.months = listMonths; + hooks.isDate = isDate; + hooks.locale = getSetGlobalLocale; + hooks.invalid = createInvalid; + hooks.duration = createDuration; + hooks.isMoment = isMoment; + hooks.weekdays = listWeekdays; + hooks.parseZone = createInZone; + hooks.localeData = getLocale; + hooks.isDuration = isDuration; + hooks.monthsShort = listMonthsShort; + hooks.weekdaysMin = listWeekdaysMin; + hooks.defineLocale = defineLocale; + hooks.updateLocale = updateLocale; + hooks.locales = listLocales; + hooks.weekdaysShort = listWeekdaysShort; + hooks.normalizeUnits = normalizeUnits; + hooks.relativeTimeRounding = getSetRelativeTimeRounding; + hooks.relativeTimeThreshold = getSetRelativeTimeThreshold; + hooks.calendarFormat = getCalendarFormat; + hooks.prototype = proto; + + // currently HTML5 input type only supports 24-hour formats + hooks.HTML5_FMT = { + DATETIME_LOCAL: 'YYYY-MM-DDTHH:mm', // + DATETIME_LOCAL_SECONDS: 'YYYY-MM-DDTHH:mm:ss', // + DATETIME_LOCAL_MS: 'YYYY-MM-DDTHH:mm:ss.SSS', // + DATE: 'YYYY-MM-DD', // + TIME: 'HH:mm', // + TIME_SECONDS: 'HH:mm:ss', // + TIME_MS: 'HH:mm:ss.SSS', // + WEEK: 'GGGG-[W]WW', // + MONTH: 'YYYY-MM', // + }; + + //! moment.js locale configuration + + hooks.defineLocale('af', { + months: 'Januarie_Februarie_Maart_April_Mei_Junie_Julie_Augustus_September_Oktober_November_Desember'.split( + '_' + ), + monthsShort: 'Jan_Feb_Mrt_Apr_Mei_Jun_Jul_Aug_Sep_Okt_Nov_Des'.split('_'), + weekdays: 'Sondag_Maandag_Dinsdag_Woensdag_Donderdag_Vrydag_Saterdag'.split( + '_' + ), + weekdaysShort: 'Son_Maa_Din_Woe_Don_Vry_Sat'.split('_'), + weekdaysMin: 'So_Ma_Di_Wo_Do_Vr_Sa'.split('_'), + meridiemParse: /vm|nm/i, + isPM: function (input) { + return /^nm$/i.test(input); + }, + meridiem: function (hours, minutes, isLower) { + if (hours < 12) { + return isLower ? 'vm' : 'VM'; + } else { + return isLower ? 'nm' : 'NM'; + } + }, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[Vandag om] LT', + nextDay: '[Môre om] LT', + nextWeek: 'dddd [om] LT', + lastDay: '[Gister om] LT', + lastWeek: '[Laas] dddd [om] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'oor %s', + past: '%s gelede', + s: "'n paar sekondes", + ss: '%d sekondes', + m: "'n minuut", + mm: '%d minute', + h: "'n uur", + hh: '%d ure', + d: "'n dag", + dd: '%d dae', + M: "'n maand", + MM: '%d maande', + y: "'n jaar", + yy: '%d jaar', + }, + dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/, + ordinal: function (number) { + return ( + number + + (number === 1 || number === 8 || number >= 20 ? 'ste' : 'de') + ); // Thanks to Joris Röling : https://github.com/jjupiter + }, + week: { + dow: 1, // Maandag is die eerste dag van die week. + doy: 4, // Die week wat die 4de Januarie bevat is die eerste week van die jaar. + }, + }); + + //! moment.js locale configuration + + var pluralForm = function (n) { + return n === 0 + ? 0 + : n === 1 + ? 1 + : n === 2 + ? 2 + : n % 100 >= 3 && n % 100 <= 10 + ? 3 + : n % 100 >= 11 + ? 4 + : 5; + }, + plurals = { + s: [ + 'أقل من ثانية', + 'ثانية واحدة', + ['ثانيتان', 'ثانيتين'], + '%d ثوان', + '%d ثانية', + '%d ثانية', + ], + m: [ + 'أقل من دقيقة', + 'دقيقة واحدة', + ['دقيقتان', 'دقيقتين'], + '%d دقائق', + '%d دقيقة', + '%d دقيقة', + ], + h: [ + 'أقل من ساعة', + 'ساعة واحدة', + ['ساعتان', 'ساعتين'], + '%d ساعات', + '%d ساعة', + '%d ساعة', + ], + d: [ + 'أقل من يوم', + 'يوم واحد', + ['يومان', 'يومين'], + '%d أيام', + '%d يومًا', + '%d يوم', + ], + M: [ + 'أقل من شهر', + 'شهر واحد', + ['شهران', 'شهرين'], + '%d أشهر', + '%d شهرا', + '%d شهر', + ], + y: [ + 'أقل من عام', + 'عام واحد', + ['عامان', 'عامين'], + '%d أعوام', + '%d عامًا', + '%d عام', + ], + }, + pluralize = function (u) { + return function (number, withoutSuffix, string, isFuture) { + var f = pluralForm(number), + str = plurals[u][pluralForm(number)]; + if (f === 2) { + str = str[withoutSuffix ? 0 : 1]; + } + return str.replace(/%d/i, number); + }; + }, + months$1 = [ + 'جانفي', + 'فيفري', + 'مارس', + 'أفريل', + 'ماي', + 'جوان', + 'جويلية', + 'أوت', + 'سبتمبر', + 'أكتوبر', + 'نوفمبر', + 'ديسمبر', + ]; + + hooks.defineLocale('ar-dz', { + months: months$1, + monthsShort: months$1, + weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'), + weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'), + weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'D/\u200FM/\u200FYYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd D MMMM YYYY HH:mm', + }, + meridiemParse: /ص|م/, + isPM: function (input) { + return 'م' === input; + }, + meridiem: function (hour, minute, isLower) { + if (hour < 12) { + return 'ص'; + } else { + return 'م'; + } + }, + calendar: { + sameDay: '[اليوم عند الساعة] LT', + nextDay: '[غدًا عند الساعة] LT', + nextWeek: 'dddd [عند الساعة] LT', + lastDay: '[أمس عند الساعة] LT', + lastWeek: 'dddd [عند الساعة] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'بعد %s', + past: 'منذ %s', + s: pluralize('s'), + ss: pluralize('s'), + m: pluralize('m'), + mm: pluralize('m'), + h: pluralize('h'), + hh: pluralize('h'), + d: pluralize('d'), + dd: pluralize('d'), + M: pluralize('M'), + MM: pluralize('M'), + y: pluralize('y'), + yy: pluralize('y'), + }, + postformat: function (string) { + return string.replace(/,/g, '،'); + }, + week: { + dow: 0, // Sunday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + hooks.defineLocale('ar-kw', { + months: 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split( + '_' + ), + monthsShort: 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split( + '_' + ), + weekdays: 'الأحد_الإتنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'), + weekdaysShort: 'احد_اتنين_ثلاثاء_اربعاء_خميس_جمعة_سبت'.split('_'), + weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[اليوم على الساعة] LT', + nextDay: '[غدا على الساعة] LT', + nextWeek: 'dddd [على الساعة] LT', + lastDay: '[أمس على الساعة] LT', + lastWeek: 'dddd [على الساعة] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'في %s', + past: 'منذ %s', + s: 'ثوان', + ss: '%d ثانية', + m: 'دقيقة', + mm: '%d دقائق', + h: 'ساعة', + hh: '%d ساعات', + d: 'يوم', + dd: '%d أيام', + M: 'شهر', + MM: '%d أشهر', + y: 'سنة', + yy: '%d سنوات', + }, + week: { + dow: 0, // Sunday is the first day of the week. + doy: 12, // The week that contains Jan 12th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var symbolMap = { + '1': '1', + '2': '2', + '3': '3', + '4': '4', + '5': '5', + '6': '6', + '7': '7', + '8': '8', + '9': '9', + '0': '0', + }, + pluralForm$1 = function (n) { + return n === 0 + ? 0 + : n === 1 + ? 1 + : n === 2 + ? 2 + : n % 100 >= 3 && n % 100 <= 10 + ? 3 + : n % 100 >= 11 + ? 4 + : 5; + }, + plurals$1 = { + s: [ + 'أقل من ثانية', + 'ثانية واحدة', + ['ثانيتان', 'ثانيتين'], + '%d ثوان', + '%d ثانية', + '%d ثانية', + ], + m: [ + 'أقل من دقيقة', + 'دقيقة واحدة', + ['دقيقتان', 'دقيقتين'], + '%d دقائق', + '%d دقيقة', + '%d دقيقة', + ], + h: [ + 'أقل من ساعة', + 'ساعة واحدة', + ['ساعتان', 'ساعتين'], + '%d ساعات', + '%d ساعة', + '%d ساعة', + ], + d: [ + 'أقل من يوم', + 'يوم واحد', + ['يومان', 'يومين'], + '%d أيام', + '%d يومًا', + '%d يوم', + ], + M: [ + 'أقل من شهر', + 'شهر واحد', + ['شهران', 'شهرين'], + '%d أشهر', + '%d شهرا', + '%d شهر', + ], + y: [ + 'أقل من عام', + 'عام واحد', + ['عامان', 'عامين'], + '%d أعوام', + '%d عامًا', + '%d عام', + ], + }, + pluralize$1 = function (u) { + return function (number, withoutSuffix, string, isFuture) { + var f = pluralForm$1(number), + str = plurals$1[u][pluralForm$1(number)]; + if (f === 2) { + str = str[withoutSuffix ? 0 : 1]; + } + return str.replace(/%d/i, number); + }; + }, + months$2 = [ + 'يناير', + 'فبراير', + 'مارس', + 'أبريل', + 'مايو', + 'يونيو', + 'يوليو', + 'أغسطس', + 'سبتمبر', + 'أكتوبر', + 'نوفمبر', + 'ديسمبر', + ]; + + hooks.defineLocale('ar-ly', { + months: months$2, + monthsShort: months$2, + weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'), + weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'), + weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'D/\u200FM/\u200FYYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd D MMMM YYYY HH:mm', + }, + meridiemParse: /ص|م/, + isPM: function (input) { + return 'م' === input; + }, + meridiem: function (hour, minute, isLower) { + if (hour < 12) { + return 'ص'; + } else { + return 'م'; + } + }, + calendar: { + sameDay: '[اليوم عند الساعة] LT', + nextDay: '[غدًا عند الساعة] LT', + nextWeek: 'dddd [عند الساعة] LT', + lastDay: '[أمس عند الساعة] LT', + lastWeek: 'dddd [عند الساعة] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'بعد %s', + past: 'منذ %s', + s: pluralize$1('s'), + ss: pluralize$1('s'), + m: pluralize$1('m'), + mm: pluralize$1('m'), + h: pluralize$1('h'), + hh: pluralize$1('h'), + d: pluralize$1('d'), + dd: pluralize$1('d'), + M: pluralize$1('M'), + MM: pluralize$1('M'), + y: pluralize$1('y'), + yy: pluralize$1('y'), + }, + preparse: function (string) { + return string.replace(/،/g, ','); + }, + postformat: function (string) { + return string + .replace(/\d/g, function (match) { + return symbolMap[match]; + }) + .replace(/,/g, '،'); + }, + week: { + dow: 6, // Saturday is the first day of the week. + doy: 12, // The week that contains Jan 12th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + hooks.defineLocale('ar-ma', { + months: 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split( + '_' + ), + monthsShort: 'يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر'.split( + '_' + ), + weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'), + weekdaysShort: 'احد_اثنين_ثلاثاء_اربعاء_خميس_جمعة_سبت'.split('_'), + weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[اليوم على الساعة] LT', + nextDay: '[غدا على الساعة] LT', + nextWeek: 'dddd [على الساعة] LT', + lastDay: '[أمس على الساعة] LT', + lastWeek: 'dddd [على الساعة] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'في %s', + past: 'منذ %s', + s: 'ثوان', + ss: '%d ثانية', + m: 'دقيقة', + mm: '%d دقائق', + h: 'ساعة', + hh: '%d ساعات', + d: 'يوم', + dd: '%d أيام', + M: 'شهر', + MM: '%d أشهر', + y: 'سنة', + yy: '%d سنوات', + }, + week: { + dow: 6, // Saturday is the first day of the week. + doy: 12, // The week that contains Jan 12th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var symbolMap$1 = { + '1': '١', + '2': '٢', + '3': '٣', + '4': '٤', + '5': '٥', + '6': '٦', + '7': '٧', + '8': '٨', + '9': '٩', + '0': '٠', + }, + numberMap = { + '١': '1', + '٢': '2', + '٣': '3', + '٤': '4', + '٥': '5', + '٦': '6', + '٧': '7', + '٨': '8', + '٩': '9', + '٠': '0', + }; + + hooks.defineLocale('ar-sa', { + months: 'يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split( + '_' + ), + monthsShort: 'يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split( + '_' + ), + weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'), + weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'), + weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd D MMMM YYYY HH:mm', + }, + meridiemParse: /ص|م/, + isPM: function (input) { + return 'م' === input; + }, + meridiem: function (hour, minute, isLower) { + if (hour < 12) { + return 'ص'; + } else { + return 'م'; + } + }, + calendar: { + sameDay: '[اليوم على الساعة] LT', + nextDay: '[غدا على الساعة] LT', + nextWeek: 'dddd [على الساعة] LT', + lastDay: '[أمس على الساعة] LT', + lastWeek: 'dddd [على الساعة] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'في %s', + past: 'منذ %s', + s: 'ثوان', + ss: '%d ثانية', + m: 'دقيقة', + mm: '%d دقائق', + h: 'ساعة', + hh: '%d ساعات', + d: 'يوم', + dd: '%d أيام', + M: 'شهر', + MM: '%d أشهر', + y: 'سنة', + yy: '%d سنوات', + }, + preparse: function (string) { + return string + .replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) { + return numberMap[match]; + }) + .replace(/،/g, ','); + }, + postformat: function (string) { + return string + .replace(/\d/g, function (match) { + return symbolMap$1[match]; + }) + .replace(/,/g, '،'); + }, + week: { + dow: 0, // Sunday is the first day of the week. + doy: 6, // The week that contains Jan 6th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + hooks.defineLocale('ar-tn', { + months: 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split( + '_' + ), + monthsShort: 'جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر'.split( + '_' + ), + weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'), + weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'), + weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[اليوم على الساعة] LT', + nextDay: '[غدا على الساعة] LT', + nextWeek: 'dddd [على الساعة] LT', + lastDay: '[أمس على الساعة] LT', + lastWeek: 'dddd [على الساعة] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'في %s', + past: 'منذ %s', + s: 'ثوان', + ss: '%d ثانية', + m: 'دقيقة', + mm: '%d دقائق', + h: 'ساعة', + hh: '%d ساعات', + d: 'يوم', + dd: '%d أيام', + M: 'شهر', + MM: '%d أشهر', + y: 'سنة', + yy: '%d سنوات', + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var symbolMap$2 = { + '1': '١', + '2': '٢', + '3': '٣', + '4': '٤', + '5': '٥', + '6': '٦', + '7': '٧', + '8': '٨', + '9': '٩', + '0': '٠', + }, + numberMap$1 = { + '١': '1', + '٢': '2', + '٣': '3', + '٤': '4', + '٥': '5', + '٦': '6', + '٧': '7', + '٨': '8', + '٩': '9', + '٠': '0', + }, + pluralForm$2 = function (n) { + return n === 0 + ? 0 + : n === 1 + ? 1 + : n === 2 + ? 2 + : n % 100 >= 3 && n % 100 <= 10 + ? 3 + : n % 100 >= 11 + ? 4 + : 5; + }, + plurals$2 = { + s: [ + 'أقل من ثانية', + 'ثانية واحدة', + ['ثانيتان', 'ثانيتين'], + '%d ثوان', + '%d ثانية', + '%d ثانية', + ], + m: [ + 'أقل من دقيقة', + 'دقيقة واحدة', + ['دقيقتان', 'دقيقتين'], + '%d دقائق', + '%d دقيقة', + '%d دقيقة', + ], + h: [ + 'أقل من ساعة', + 'ساعة واحدة', + ['ساعتان', 'ساعتين'], + '%d ساعات', + '%d ساعة', + '%d ساعة', + ], + d: [ + 'أقل من يوم', + 'يوم واحد', + ['يومان', 'يومين'], + '%d أيام', + '%d يومًا', + '%d يوم', + ], + M: [ + 'أقل من شهر', + 'شهر واحد', + ['شهران', 'شهرين'], + '%d أشهر', + '%d شهرا', + '%d شهر', + ], + y: [ + 'أقل من عام', + 'عام واحد', + ['عامان', 'عامين'], + '%d أعوام', + '%d عامًا', + '%d عام', + ], + }, + pluralize$2 = function (u) { + return function (number, withoutSuffix, string, isFuture) { + var f = pluralForm$2(number), + str = plurals$2[u][pluralForm$2(number)]; + if (f === 2) { + str = str[withoutSuffix ? 0 : 1]; + } + return str.replace(/%d/i, number); + }; + }, + months$3 = [ + 'يناير', + 'فبراير', + 'مارس', + 'أبريل', + 'مايو', + 'يونيو', + 'يوليو', + 'أغسطس', + 'سبتمبر', + 'أكتوبر', + 'نوفمبر', + 'ديسمبر', + ]; + + hooks.defineLocale('ar', { + months: months$3, + monthsShort: months$3, + weekdays: 'الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت'.split('_'), + weekdaysShort: 'أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت'.split('_'), + weekdaysMin: 'ح_ن_ث_ر_خ_ج_س'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'D/\u200FM/\u200FYYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd D MMMM YYYY HH:mm', + }, + meridiemParse: /ص|م/, + isPM: function (input) { + return 'م' === input; + }, + meridiem: function (hour, minute, isLower) { + if (hour < 12) { + return 'ص'; + } else { + return 'م'; + } + }, + calendar: { + sameDay: '[اليوم عند الساعة] LT', + nextDay: '[غدًا عند الساعة] LT', + nextWeek: 'dddd [عند الساعة] LT', + lastDay: '[أمس عند الساعة] LT', + lastWeek: 'dddd [عند الساعة] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'بعد %s', + past: 'منذ %s', + s: pluralize$2('s'), + ss: pluralize$2('s'), + m: pluralize$2('m'), + mm: pluralize$2('m'), + h: pluralize$2('h'), + hh: pluralize$2('h'), + d: pluralize$2('d'), + dd: pluralize$2('d'), + M: pluralize$2('M'), + MM: pluralize$2('M'), + y: pluralize$2('y'), + yy: pluralize$2('y'), + }, + preparse: function (string) { + return string + .replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) { + return numberMap$1[match]; + }) + .replace(/،/g, ','); + }, + postformat: function (string) { + return string + .replace(/\d/g, function (match) { + return symbolMap$2[match]; + }) + .replace(/,/g, '،'); + }, + week: { + dow: 6, // Saturday is the first day of the week. + doy: 12, // The week that contains Jan 12th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var suffixes = { + 1: '-inci', + 5: '-inci', + 8: '-inci', + 70: '-inci', + 80: '-inci', + 2: '-nci', + 7: '-nci', + 20: '-nci', + 50: '-nci', + 3: '-üncü', + 4: '-üncü', + 100: '-üncü', + 6: '-ncı', + 9: '-uncu', + 10: '-uncu', + 30: '-uncu', + 60: '-ıncı', + 90: '-ıncı', + }; + + hooks.defineLocale('az', { + months: 'yanvar_fevral_mart_aprel_may_iyun_iyul_avqust_sentyabr_oktyabr_noyabr_dekabr'.split( + '_' + ), + monthsShort: 'yan_fev_mar_apr_may_iyn_iyl_avq_sen_okt_noy_dek'.split('_'), + weekdays: 'Bazar_Bazar ertəsi_Çərşənbə axşamı_Çərşənbə_Cümə axşamı_Cümə_Şənbə'.split( + '_' + ), + weekdaysShort: 'Baz_BzE_ÇAx_Çər_CAx_Cüm_Şən'.split('_'), + weekdaysMin: 'Bz_BE_ÇA_Çə_CA_Cü_Şə'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[bugün saat] LT', + nextDay: '[sabah saat] LT', + nextWeek: '[gələn həftə] dddd [saat] LT', + lastDay: '[dünən] LT', + lastWeek: '[keçən həftə] dddd [saat] LT', + sameElse: 'L', + }, + relativeTime: { + future: '%s sonra', + past: '%s əvvəl', + s: 'bir neçə saniyə', + ss: '%d saniyə', + m: 'bir dəqiqə', + mm: '%d dəqiqə', + h: 'bir saat', + hh: '%d saat', + d: 'bir gün', + dd: '%d gün', + M: 'bir ay', + MM: '%d ay', + y: 'bir il', + yy: '%d il', + }, + meridiemParse: /gecə|səhər|gündüz|axşam/, + isPM: function (input) { + return /^(gündüz|axşam)$/.test(input); + }, + meridiem: function (hour, minute, isLower) { + if (hour < 4) { + return 'gecə'; + } else if (hour < 12) { + return 'səhər'; + } else if (hour < 17) { + return 'gündüz'; + } else { + return 'axşam'; + } + }, + dayOfMonthOrdinalParse: /\d{1,2}-(ıncı|inci|nci|üncü|ncı|uncu)/, + ordinal: function (number) { + if (number === 0) { + // special case for zero + return number + '-ıncı'; + } + var a = number % 10, + b = (number % 100) - a, + c = number >= 100 ? 100 : null; + return number + (suffixes[a] || suffixes[b] || suffixes[c]); + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 7, // The week that contains Jan 7th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + function plural(word, num) { + var forms = word.split('_'); + return num % 10 === 1 && num % 100 !== 11 + ? forms[0] + : num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20) + ? forms[1] + : forms[2]; + } + function relativeTimeWithPlural(number, withoutSuffix, key) { + var format = { + ss: withoutSuffix ? 'секунда_секунды_секунд' : 'секунду_секунды_секунд', + mm: withoutSuffix ? 'хвіліна_хвіліны_хвілін' : 'хвіліну_хвіліны_хвілін', + hh: withoutSuffix ? 'гадзіна_гадзіны_гадзін' : 'гадзіну_гадзіны_гадзін', + dd: 'дзень_дні_дзён', + MM: 'месяц_месяцы_месяцаў', + yy: 'год_гады_гадоў', + }; + if (key === 'm') { + return withoutSuffix ? 'хвіліна' : 'хвіліну'; + } else if (key === 'h') { + return withoutSuffix ? 'гадзіна' : 'гадзіну'; + } else { + return number + ' ' + plural(format[key], +number); + } + } + + hooks.defineLocale('be', { + months: { + format: 'студзеня_лютага_сакавіка_красавіка_траўня_чэрвеня_ліпеня_жніўня_верасня_кастрычніка_лістапада_снежня'.split( + '_' + ), + standalone: 'студзень_люты_сакавік_красавік_травень_чэрвень_ліпень_жнівень_верасень_кастрычнік_лістапад_снежань'.split( + '_' + ), + }, + monthsShort: 'студ_лют_сак_крас_трав_чэрв_ліп_жнів_вер_каст_ліст_снеж'.split( + '_' + ), + weekdays: { + format: 'нядзелю_панядзелак_аўторак_сераду_чацвер_пятніцу_суботу'.split( + '_' + ), + standalone: 'нядзеля_панядзелак_аўторак_серада_чацвер_пятніца_субота'.split( + '_' + ), + isFormat: /\[ ?[Ууў] ?(?:мінулую|наступную)? ?\] ?dddd/, + }, + weekdaysShort: 'нд_пн_ат_ср_чц_пт_сб'.split('_'), + weekdaysMin: 'нд_пн_ат_ср_чц_пт_сб'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D MMMM YYYY г.', + LLL: 'D MMMM YYYY г., HH:mm', + LLLL: 'dddd, D MMMM YYYY г., HH:mm', + }, + calendar: { + sameDay: '[Сёння ў] LT', + nextDay: '[Заўтра ў] LT', + lastDay: '[Учора ў] LT', + nextWeek: function () { + return '[У] dddd [ў] LT'; + }, + lastWeek: function () { + switch (this.day()) { + case 0: + case 3: + case 5: + case 6: + return '[У мінулую] dddd [ў] LT'; + case 1: + case 2: + case 4: + return '[У мінулы] dddd [ў] LT'; + } + }, + sameElse: 'L', + }, + relativeTime: { + future: 'праз %s', + past: '%s таму', + s: 'некалькі секунд', + m: relativeTimeWithPlural, + mm: relativeTimeWithPlural, + h: relativeTimeWithPlural, + hh: relativeTimeWithPlural, + d: 'дзень', + dd: relativeTimeWithPlural, + M: 'месяц', + MM: relativeTimeWithPlural, + y: 'год', + yy: relativeTimeWithPlural, + }, + meridiemParse: /ночы|раніцы|дня|вечара/, + isPM: function (input) { + return /^(дня|вечара)$/.test(input); + }, + meridiem: function (hour, minute, isLower) { + if (hour < 4) { + return 'ночы'; + } else if (hour < 12) { + return 'раніцы'; + } else if (hour < 17) { + return 'дня'; + } else { + return 'вечара'; + } + }, + dayOfMonthOrdinalParse: /\d{1,2}-(і|ы|га)/, + ordinal: function (number, period) { + switch (period) { + case 'M': + case 'd': + case 'DDD': + case 'w': + case 'W': + return (number % 10 === 2 || number % 10 === 3) && + number % 100 !== 12 && + number % 100 !== 13 + ? number + '-і' + : number + '-ы'; + case 'D': + return number + '-га'; + default: + return number; + } + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 7, // The week that contains Jan 7th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + hooks.defineLocale('bg', { + months: 'януари_февруари_март_април_май_юни_юли_август_септември_октомври_ноември_декември'.split( + '_' + ), + monthsShort: 'яну_фев_мар_апр_май_юни_юли_авг_сеп_окт_ное_дек'.split('_'), + weekdays: 'неделя_понеделник_вторник_сряда_четвъртък_петък_събота'.split( + '_' + ), + weekdaysShort: 'нед_пон_вто_сря_чет_пет_съб'.split('_'), + weekdaysMin: 'нд_пн_вт_ср_чт_пт_сб'.split('_'), + longDateFormat: { + LT: 'H:mm', + LTS: 'H:mm:ss', + L: 'D.MM.YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY H:mm', + LLLL: 'dddd, D MMMM YYYY H:mm', + }, + calendar: { + sameDay: '[Днес в] LT', + nextDay: '[Утре в] LT', + nextWeek: 'dddd [в] LT', + lastDay: '[Вчера в] LT', + lastWeek: function () { + switch (this.day()) { + case 0: + case 3: + case 6: + return '[Миналата] dddd [в] LT'; + case 1: + case 2: + case 4: + case 5: + return '[Миналия] dddd [в] LT'; + } + }, + sameElse: 'L', + }, + relativeTime: { + future: 'след %s', + past: 'преди %s', + s: 'няколко секунди', + ss: '%d секунди', + m: 'минута', + mm: '%d минути', + h: 'час', + hh: '%d часа', + d: 'ден', + dd: '%d дена', + M: 'месец', + MM: '%d месеца', + y: 'година', + yy: '%d години', + }, + dayOfMonthOrdinalParse: /\d{1,2}-(ев|ен|ти|ви|ри|ми)/, + ordinal: function (number) { + var lastDigit = number % 10, + last2Digits = number % 100; + if (number === 0) { + return number + '-ев'; + } else if (last2Digits === 0) { + return number + '-ен'; + } else if (last2Digits > 10 && last2Digits < 20) { + return number + '-ти'; + } else if (lastDigit === 1) { + return number + '-ви'; + } else if (lastDigit === 2) { + return number + '-ри'; + } else if (lastDigit === 7 || lastDigit === 8) { + return number + '-ми'; + } else { + return number + '-ти'; + } + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 7, // The week that contains Jan 7th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + hooks.defineLocale('bm', { + months: 'Zanwuyekalo_Fewuruyekalo_Marisikalo_Awirilikalo_Mɛkalo_Zuwɛnkalo_Zuluyekalo_Utikalo_Sɛtanburukalo_ɔkutɔburukalo_Nowanburukalo_Desanburukalo'.split( + '_' + ), + monthsShort: 'Zan_Few_Mar_Awi_Mɛ_Zuw_Zul_Uti_Sɛt_ɔku_Now_Des'.split('_'), + weekdays: 'Kari_Ntɛnɛn_Tarata_Araba_Alamisa_Juma_Sibiri'.split('_'), + weekdaysShort: 'Kar_Ntɛ_Tar_Ara_Ala_Jum_Sib'.split('_'), + weekdaysMin: 'Ka_Nt_Ta_Ar_Al_Ju_Si'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'MMMM [tile] D [san] YYYY', + LLL: 'MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm', + LLLL: 'dddd MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm', + }, + calendar: { + sameDay: '[Bi lɛrɛ] LT', + nextDay: '[Sini lɛrɛ] LT', + nextWeek: 'dddd [don lɛrɛ] LT', + lastDay: '[Kunu lɛrɛ] LT', + lastWeek: 'dddd [tɛmɛnen lɛrɛ] LT', + sameElse: 'L', + }, + relativeTime: { + future: '%s kɔnɔ', + past: 'a bɛ %s bɔ', + s: 'sanga dama dama', + ss: 'sekondi %d', + m: 'miniti kelen', + mm: 'miniti %d', + h: 'lɛrɛ kelen', + hh: 'lɛrɛ %d', + d: 'tile kelen', + dd: 'tile %d', + M: 'kalo kelen', + MM: 'kalo %d', + y: 'san kelen', + yy: 'san %d', + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var symbolMap$3 = { + '1': '১', + '2': '২', + '3': '৩', + '4': '৪', + '5': '৫', + '6': '৬', + '7': '৭', + '8': '৮', + '9': '৯', + '0': '০', + }, + numberMap$2 = { + '১': '1', + '২': '2', + '৩': '3', + '৪': '4', + '৫': '5', + '৬': '6', + '৭': '7', + '৮': '8', + '৯': '9', + '০': '0', + }; + + hooks.defineLocale('bn', { + months: 'জানুয়ারি_ফেব্রুয়ারি_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্টেম্বর_অক্টোবর_নভেম্বর_ডিসেম্বর'.split( + '_' + ), + monthsShort: 'জানু_ফেব্রু_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্ট_অক্টো_নভে_ডিসে'.split( + '_' + ), + weekdays: 'রবিবার_সোমবার_মঙ্গলবার_বুধবার_বৃহস্পতিবার_শুক্রবার_শনিবার'.split( + '_' + ), + weekdaysShort: 'রবি_সোম_মঙ্গল_বুধ_বৃহস্পতি_শুক্র_শনি'.split('_'), + weekdaysMin: 'রবি_সোম_মঙ্গল_বুধ_বৃহ_শুক্র_শনি'.split('_'), + longDateFormat: { + LT: 'A h:mm সময়', + LTS: 'A h:mm:ss সময়', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY, A h:mm সময়', + LLLL: 'dddd, D MMMM YYYY, A h:mm সময়', + }, + calendar: { + sameDay: '[আজ] LT', + nextDay: '[আগামীকাল] LT', + nextWeek: 'dddd, LT', + lastDay: '[গতকাল] LT', + lastWeek: '[গত] dddd, LT', + sameElse: 'L', + }, + relativeTime: { + future: '%s পরে', + past: '%s আগে', + s: 'কয়েক সেকেন্ড', + ss: '%d সেকেন্ড', + m: 'এক মিনিট', + mm: '%d মিনিট', + h: 'এক ঘন্টা', + hh: '%d ঘন্টা', + d: 'এক দিন', + dd: '%d দিন', + M: 'এক মাস', + MM: '%d মাস', + y: 'এক বছর', + yy: '%d বছর', + }, + preparse: function (string) { + return string.replace(/[১২৩৪৫৬৭৮৯০]/g, function (match) { + return numberMap$2[match]; + }); + }, + postformat: function (string) { + return string.replace(/\d/g, function (match) { + return symbolMap$3[match]; + }); + }, + meridiemParse: /রাত|সকাল|দুপুর|বিকাল|রাত/, + meridiemHour: function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if ( + (meridiem === 'রাত' && hour >= 4) || + (meridiem === 'দুপুর' && hour < 5) || + meridiem === 'বিকাল' + ) { + return hour + 12; + } else { + return hour; + } + }, + meridiem: function (hour, minute, isLower) { + if (hour < 4) { + return 'রাত'; + } else if (hour < 10) { + return 'সকাল'; + } else if (hour < 17) { + return 'দুপুর'; + } else if (hour < 20) { + return 'বিকাল'; + } else { + return 'রাত'; + } + }, + week: { + dow: 0, // Sunday is the first day of the week. + doy: 6, // The week that contains Jan 6th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var symbolMap$4 = { + '1': '༡', + '2': '༢', + '3': '༣', + '4': '༤', + '5': '༥', + '6': '༦', + '7': '༧', + '8': '༨', + '9': '༩', + '0': '༠', + }, + numberMap$3 = { + '༡': '1', + '༢': '2', + '༣': '3', + '༤': '4', + '༥': '5', + '༦': '6', + '༧': '7', + '༨': '8', + '༩': '9', + '༠': '0', + }; + + hooks.defineLocale('bo', { + months: 'ཟླ་བ་དང་པོ_ཟླ་བ་གཉིས་པ_ཟླ་བ་གསུམ་པ_ཟླ་བ་བཞི་པ_ཟླ་བ་ལྔ་པ_ཟླ་བ་དྲུག་པ_ཟླ་བ་བདུན་པ_ཟླ་བ་བརྒྱད་པ_ཟླ་བ་དགུ་པ_ཟླ་བ་བཅུ་པ_ཟླ་བ་བཅུ་གཅིག་པ_ཟླ་བ་བཅུ་གཉིས་པ'.split( + '_' + ), + monthsShort: 'ཟླ་1_ཟླ་2_ཟླ་3_ཟླ་4_ཟླ་5_ཟླ་6_ཟླ་7_ཟླ་8_ཟླ་9_ཟླ་10_ཟླ་11_ཟླ་12'.split( + '_' + ), + monthsShortRegex: /^(ཟླ་\d{1,2})/, + monthsParseExact: true, + weekdays: 'གཟའ་ཉི་མ་_གཟའ་ཟླ་བ་_གཟའ་མིག་དམར་_གཟའ་ལྷག་པ་_གཟའ་ཕུར་བུ_གཟའ་པ་སངས་_གཟའ་སྤེན་པ་'.split( + '_' + ), + weekdaysShort: 'ཉི་མ་_ཟླ་བ་_མིག་དམར་_ལྷག་པ་_ཕུར་བུ_པ་སངས་_སྤེན་པ་'.split( + '_' + ), + weekdaysMin: 'ཉི_ཟླ_མིག_ལྷག_ཕུར_སངས_སྤེན'.split('_'), + longDateFormat: { + LT: 'A h:mm', + LTS: 'A h:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY, A h:mm', + LLLL: 'dddd, D MMMM YYYY, A h:mm', + }, + calendar: { + sameDay: '[དི་རིང] LT', + nextDay: '[སང་ཉིན] LT', + nextWeek: '[བདུན་ཕྲག་རྗེས་མ], LT', + lastDay: '[ཁ་སང] LT', + lastWeek: '[བདུན་ཕྲག་མཐའ་མ] dddd, LT', + sameElse: 'L', + }, + relativeTime: { + future: '%s ལ་', + past: '%s སྔན་ལ', + s: 'ལམ་སང', + ss: '%d སྐར་ཆ།', + m: 'སྐར་མ་གཅིག', + mm: '%d སྐར་མ', + h: 'ཆུ་ཚོད་གཅིག', + hh: '%d ཆུ་ཚོད', + d: 'ཉིན་གཅིག', + dd: '%d ཉིན་', + M: 'ཟླ་བ་གཅིག', + MM: '%d ཟླ་བ', + y: 'ལོ་གཅིག', + yy: '%d ལོ', + }, + preparse: function (string) { + return string.replace(/[༡༢༣༤༥༦༧༨༩༠]/g, function (match) { + return numberMap$3[match]; + }); + }, + postformat: function (string) { + return string.replace(/\d/g, function (match) { + return symbolMap$4[match]; + }); + }, + meridiemParse: /མཚན་མོ|ཞོགས་ཀས|ཉིན་གུང|དགོང་དག|མཚན་མོ/, + meridiemHour: function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if ( + (meridiem === 'མཚན་མོ' && hour >= 4) || + (meridiem === 'ཉིན་གུང' && hour < 5) || + meridiem === 'དགོང་དག' + ) { + return hour + 12; + } else { + return hour; + } + }, + meridiem: function (hour, minute, isLower) { + if (hour < 4) { + return 'མཚན་མོ'; + } else if (hour < 10) { + return 'ཞོགས་ཀས'; + } else if (hour < 17) { + return 'ཉིན་གུང'; + } else if (hour < 20) { + return 'དགོང་དག'; + } else { + return 'མཚན་མོ'; + } + }, + week: { + dow: 0, // Sunday is the first day of the week. + doy: 6, // The week that contains Jan 6th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + function relativeTimeWithMutation(number, withoutSuffix, key) { + var format = { + mm: 'munutenn', + MM: 'miz', + dd: 'devezh', + }; + return number + ' ' + mutation(format[key], number); + } + function specialMutationForYears(number) { + switch (lastNumber(number)) { + case 1: + case 3: + case 4: + case 5: + case 9: + return number + ' bloaz'; + default: + return number + ' vloaz'; + } + } + function lastNumber(number) { + if (number > 9) { + return lastNumber(number % 10); + } + return number; + } + function mutation(text, number) { + if (number === 2) { + return softMutation(text); + } + return text; + } + function softMutation(text) { + var mutationTable = { + m: 'v', + b: 'v', + d: 'z', + }; + if (mutationTable[text.charAt(0)] === undefined) { + return text; + } + return mutationTable[text.charAt(0)] + text.substring(1); + } + + var monthsParse = [ + /^gen/i, + /^c[ʼ\']hwe/i, + /^meu/i, + /^ebr/i, + /^mae/i, + /^(mez|eve)/i, + /^gou/i, + /^eos/i, + /^gwe/i, + /^her/i, + /^du/i, + /^ker/i, + ], + monthsRegex$1 = /^(genver|c[ʼ\']hwevrer|meurzh|ebrel|mae|mezheven|gouere|eost|gwengolo|here|du|kerzu|gen|c[ʼ\']hwe|meu|ebr|mae|eve|gou|eos|gwe|her|du|ker)/i, + monthsStrictRegex = /^(genver|c[ʼ\']hwevrer|meurzh|ebrel|mae|mezheven|gouere|eost|gwengolo|here|du|kerzu)/i, + monthsShortStrictRegex = /^(gen|c[ʼ\']hwe|meu|ebr|mae|eve|gou|eos|gwe|her|du|ker)/i, + fullWeekdaysParse = [ + /^sul/i, + /^lun/i, + /^meurzh/i, + /^merc[ʼ\']her/i, + /^yaou/i, + /^gwener/i, + /^sadorn/i, + ], + shortWeekdaysParse = [ + /^Sul/i, + /^Lun/i, + /^Meu/i, + /^Mer/i, + /^Yao/i, + /^Gwe/i, + /^Sad/i, + ], + minWeekdaysParse = [ + /^Su/i, + /^Lu/i, + /^Me([^r]|$)/i, + /^Mer/i, + /^Ya/i, + /^Gw/i, + /^Sa/i, + ]; + + hooks.defineLocale('br', { + months: 'Genver_Cʼhwevrer_Meurzh_Ebrel_Mae_Mezheven_Gouere_Eost_Gwengolo_Here_Du_Kerzu'.split( + '_' + ), + monthsShort: 'Gen_Cʼhwe_Meu_Ebr_Mae_Eve_Gou_Eos_Gwe_Her_Du_Ker'.split('_'), + weekdays: 'Sul_Lun_Meurzh_Mercʼher_Yaou_Gwener_Sadorn'.split('_'), + weekdaysShort: 'Sul_Lun_Meu_Mer_Yao_Gwe_Sad'.split('_'), + weekdaysMin: 'Su_Lu_Me_Mer_Ya_Gw_Sa'.split('_'), + weekdaysParse: minWeekdaysParse, + fullWeekdaysParse: fullWeekdaysParse, + shortWeekdaysParse: shortWeekdaysParse, + minWeekdaysParse: minWeekdaysParse, + + monthsRegex: monthsRegex$1, + monthsShortRegex: monthsRegex$1, + monthsStrictRegex: monthsStrictRegex, + monthsShortStrictRegex: monthsShortStrictRegex, + monthsParse: monthsParse, + longMonthsParse: monthsParse, + shortMonthsParse: monthsParse, + + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D [a viz] MMMM YYYY', + LLL: 'D [a viz] MMMM YYYY HH:mm', + LLLL: 'dddd, D [a viz] MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[Hiziv da] LT', + nextDay: '[Warcʼhoazh da] LT', + nextWeek: 'dddd [da] LT', + lastDay: '[Decʼh da] LT', + lastWeek: 'dddd [paset da] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'a-benn %s', + past: '%s ʼzo', + s: 'un nebeud segondennoù', + ss: '%d eilenn', + m: 'ur vunutenn', + mm: relativeTimeWithMutation, + h: 'un eur', + hh: '%d eur', + d: 'un devezh', + dd: relativeTimeWithMutation, + M: 'ur miz', + MM: relativeTimeWithMutation, + y: 'ur bloaz', + yy: specialMutationForYears, + }, + dayOfMonthOrdinalParse: /\d{1,2}(añ|vet)/, + ordinal: function (number) { + var output = number === 1 ? 'añ' : 'vet'; + return number + output; + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + meridiemParse: /a.m.|g.m./, // goude merenn | a-raok merenn + isPM: function (token) { + return token === 'g.m.'; + }, + meridiem: function (hour, minute, isLower) { + return hour < 12 ? 'a.m.' : 'g.m.'; + }, + }); + + //! moment.js locale configuration + + function translate(number, withoutSuffix, key) { + var result = number + ' '; + switch (key) { + case 'ss': + if (number === 1) { + result += 'sekunda'; + } else if (number === 2 || number === 3 || number === 4) { + result += 'sekunde'; + } else { + result += 'sekundi'; + } + return result; + case 'm': + return withoutSuffix ? 'jedna minuta' : 'jedne minute'; + case 'mm': + if (number === 1) { + result += 'minuta'; + } else if (number === 2 || number === 3 || number === 4) { + result += 'minute'; + } else { + result += 'minuta'; + } + return result; + case 'h': + return withoutSuffix ? 'jedan sat' : 'jednog sata'; + case 'hh': + if (number === 1) { + result += 'sat'; + } else if (number === 2 || number === 3 || number === 4) { + result += 'sata'; + } else { + result += 'sati'; + } + return result; + case 'dd': + if (number === 1) { + result += 'dan'; + } else { + result += 'dana'; + } + return result; + case 'MM': + if (number === 1) { + result += 'mjesec'; + } else if (number === 2 || number === 3 || number === 4) { + result += 'mjeseca'; + } else { + result += 'mjeseci'; + } + return result; + case 'yy': + if (number === 1) { + result += 'godina'; + } else if (number === 2 || number === 3 || number === 4) { + result += 'godine'; + } else { + result += 'godina'; + } + return result; + } + } + + hooks.defineLocale('bs', { + months: 'januar_februar_mart_april_maj_juni_juli_august_septembar_oktobar_novembar_decembar'.split( + '_' + ), + monthsShort: 'jan._feb._mar._apr._maj._jun._jul._aug._sep._okt._nov._dec.'.split( + '_' + ), + monthsParseExact: true, + weekdays: 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split( + '_' + ), + weekdaysShort: 'ned._pon._uto._sri._čet._pet._sub.'.split('_'), + weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'H:mm', + LTS: 'H:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D. MMMM YYYY', + LLL: 'D. MMMM YYYY H:mm', + LLLL: 'dddd, D. MMMM YYYY H:mm', + }, + calendar: { + sameDay: '[danas u] LT', + nextDay: '[sutra u] LT', + nextWeek: function () { + switch (this.day()) { + case 0: + return '[u] [nedjelju] [u] LT'; + case 3: + return '[u] [srijedu] [u] LT'; + case 6: + return '[u] [subotu] [u] LT'; + case 1: + case 2: + case 4: + case 5: + return '[u] dddd [u] LT'; + } + }, + lastDay: '[jučer u] LT', + lastWeek: function () { + switch (this.day()) { + case 0: + case 3: + return '[prošlu] dddd [u] LT'; + case 6: + return '[prošle] [subote] [u] LT'; + case 1: + case 2: + case 4: + case 5: + return '[prošli] dddd [u] LT'; + } + }, + sameElse: 'L', + }, + relativeTime: { + future: 'za %s', + past: 'prije %s', + s: 'par sekundi', + ss: translate, + m: translate, + mm: translate, + h: translate, + hh: translate, + d: 'dan', + dd: translate, + M: 'mjesec', + MM: translate, + y: 'godinu', + yy: translate, + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal: '%d.', + week: { + dow: 1, // Monday is the first day of the week. + doy: 7, // The week that contains Jan 7th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + hooks.defineLocale('ca', { + months: { + standalone: 'gener_febrer_març_abril_maig_juny_juliol_agost_setembre_octubre_novembre_desembre'.split( + '_' + ), + format: "de gener_de febrer_de març_d'abril_de maig_de juny_de juliol_d'agost_de setembre_d'octubre_de novembre_de desembre".split( + '_' + ), + isFormat: /D[oD]?(\s)+MMMM/, + }, + monthsShort: 'gen._febr._març_abr._maig_juny_jul._ag._set._oct._nov._des.'.split( + '_' + ), + monthsParseExact: true, + weekdays: 'diumenge_dilluns_dimarts_dimecres_dijous_divendres_dissabte'.split( + '_' + ), + weekdaysShort: 'dg._dl._dt._dc._dj._dv._ds.'.split('_'), + weekdaysMin: 'dg_dl_dt_dc_dj_dv_ds'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'H:mm', + LTS: 'H:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM [de] YYYY', + ll: 'D MMM YYYY', + LLL: 'D MMMM [de] YYYY [a les] H:mm', + lll: 'D MMM YYYY, H:mm', + LLLL: 'dddd D MMMM [de] YYYY [a les] H:mm', + llll: 'ddd D MMM YYYY, H:mm', + }, + calendar: { + sameDay: function () { + return '[avui a ' + (this.hours() !== 1 ? 'les' : 'la') + '] LT'; + }, + nextDay: function () { + return '[demà a ' + (this.hours() !== 1 ? 'les' : 'la') + '] LT'; + }, + nextWeek: function () { + return 'dddd [a ' + (this.hours() !== 1 ? 'les' : 'la') + '] LT'; + }, + lastDay: function () { + return '[ahir a ' + (this.hours() !== 1 ? 'les' : 'la') + '] LT'; + }, + lastWeek: function () { + return ( + '[el] dddd [passat a ' + + (this.hours() !== 1 ? 'les' : 'la') + + '] LT' + ); + }, + sameElse: 'L', + }, + relativeTime: { + future: "d'aquí %s", + past: 'fa %s', + s: 'uns segons', + ss: '%d segons', + m: 'un minut', + mm: '%d minuts', + h: 'una hora', + hh: '%d hores', + d: 'un dia', + dd: '%d dies', + M: 'un mes', + MM: '%d mesos', + y: 'un any', + yy: '%d anys', + }, + dayOfMonthOrdinalParse: /\d{1,2}(r|n|t|è|a)/, + ordinal: function (number, period) { + var output = + number === 1 + ? 'r' + : number === 2 + ? 'n' + : number === 3 + ? 'r' + : number === 4 + ? 't' + : 'è'; + if (period === 'w' || period === 'W') { + output = 'a'; + } + return number + output; + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var months$4 = 'leden_únor_březen_duben_květen_červen_červenec_srpen_září_říjen_listopad_prosinec'.split( + '_' + ), + monthsShort = 'led_úno_bře_dub_kvě_čvn_čvc_srp_zář_říj_lis_pro'.split('_'), + monthsParse$1 = [ + /^led/i, + /^úno/i, + /^bře/i, + /^dub/i, + /^kvě/i, + /^(čvn|červen$|června)/i, + /^(čvc|červenec|července)/i, + /^srp/i, + /^zář/i, + /^říj/i, + /^lis/i, + /^pro/i, + ], + // NOTE: 'červen' is substring of 'červenec'; therefore 'červenec' must precede 'červen' in the regex to be fully matched. + // Otherwise parser matches '1. červenec' as '1. červen' + 'ec'. + monthsRegex$2 = /^(leden|únor|březen|duben|květen|červenec|července|červen|června|srpen|září|říjen|listopad|prosinec|led|úno|bře|dub|kvě|čvn|čvc|srp|zář|říj|lis|pro)/i; + + function plural$1(n) { + return n > 1 && n < 5 && ~~(n / 10) !== 1; + } + function translate$1(number, withoutSuffix, key, isFuture) { + var result = number + ' '; + switch (key) { + case 's': // a few seconds / in a few seconds / a few seconds ago + return withoutSuffix || isFuture ? 'pár sekund' : 'pár sekundami'; + case 'ss': // 9 seconds / in 9 seconds / 9 seconds ago + if (withoutSuffix || isFuture) { + return result + (plural$1(number) ? 'sekundy' : 'sekund'); + } else { + return result + 'sekundami'; + } + case 'm': // a minute / in a minute / a minute ago + return withoutSuffix ? 'minuta' : isFuture ? 'minutu' : 'minutou'; + case 'mm': // 9 minutes / in 9 minutes / 9 minutes ago + if (withoutSuffix || isFuture) { + return result + (plural$1(number) ? 'minuty' : 'minut'); + } else { + return result + 'minutami'; + } + case 'h': // an hour / in an hour / an hour ago + return withoutSuffix ? 'hodina' : isFuture ? 'hodinu' : 'hodinou'; + case 'hh': // 9 hours / in 9 hours / 9 hours ago + if (withoutSuffix || isFuture) { + return result + (plural$1(number) ? 'hodiny' : 'hodin'); + } else { + return result + 'hodinami'; + } + case 'd': // a day / in a day / a day ago + return withoutSuffix || isFuture ? 'den' : 'dnem'; + case 'dd': // 9 days / in 9 days / 9 days ago + if (withoutSuffix || isFuture) { + return result + (plural$1(number) ? 'dny' : 'dní'); + } else { + return result + 'dny'; + } + case 'M': // a month / in a month / a month ago + return withoutSuffix || isFuture ? 'měsíc' : 'měsícem'; + case 'MM': // 9 months / in 9 months / 9 months ago + if (withoutSuffix || isFuture) { + return result + (plural$1(number) ? 'měsíce' : 'měsíců'); + } else { + return result + 'měsíci'; + } + case 'y': // a year / in a year / a year ago + return withoutSuffix || isFuture ? 'rok' : 'rokem'; + case 'yy': // 9 years / in 9 years / 9 years ago + if (withoutSuffix || isFuture) { + return result + (plural$1(number) ? 'roky' : 'let'); + } else { + return result + 'lety'; + } + } + } + + hooks.defineLocale('cs', { + months: months$4, + monthsShort: monthsShort, + monthsRegex: monthsRegex$2, + monthsShortRegex: monthsRegex$2, + // NOTE: 'červen' is substring of 'červenec'; therefore 'červenec' must precede 'červen' in the regex to be fully matched. + // Otherwise parser matches '1. červenec' as '1. červen' + 'ec'. + monthsStrictRegex: /^(leden|ledna|února|únor|březen|března|duben|dubna|květen|května|červenec|července|červen|června|srpen|srpna|září|říjen|října|listopadu|listopad|prosinec|prosince)/i, + monthsShortStrictRegex: /^(led|úno|bře|dub|kvě|čvn|čvc|srp|zář|říj|lis|pro)/i, + monthsParse: monthsParse$1, + longMonthsParse: monthsParse$1, + shortMonthsParse: monthsParse$1, + weekdays: 'neděle_pondělí_úterý_středa_čtvrtek_pátek_sobota'.split('_'), + weekdaysShort: 'ne_po_út_st_čt_pá_so'.split('_'), + weekdaysMin: 'ne_po_út_st_čt_pá_so'.split('_'), + longDateFormat: { + LT: 'H:mm', + LTS: 'H:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D. MMMM YYYY', + LLL: 'D. MMMM YYYY H:mm', + LLLL: 'dddd D. MMMM YYYY H:mm', + l: 'D. M. YYYY', + }, + calendar: { + sameDay: '[dnes v] LT', + nextDay: '[zítra v] LT', + nextWeek: function () { + switch (this.day()) { + case 0: + return '[v neděli v] LT'; + case 1: + case 2: + return '[v] dddd [v] LT'; + case 3: + return '[ve středu v] LT'; + case 4: + return '[ve čtvrtek v] LT'; + case 5: + return '[v pátek v] LT'; + case 6: + return '[v sobotu v] LT'; + } + }, + lastDay: '[včera v] LT', + lastWeek: function () { + switch (this.day()) { + case 0: + return '[minulou neděli v] LT'; + case 1: + case 2: + return '[minulé] dddd [v] LT'; + case 3: + return '[minulou středu v] LT'; + case 4: + case 5: + return '[minulý] dddd [v] LT'; + case 6: + return '[minulou sobotu v] LT'; + } + }, + sameElse: 'L', + }, + relativeTime: { + future: 'za %s', + past: 'před %s', + s: translate$1, + ss: translate$1, + m: translate$1, + mm: translate$1, + h: translate$1, + hh: translate$1, + d: translate$1, + dd: translate$1, + M: translate$1, + MM: translate$1, + y: translate$1, + yy: translate$1, + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal: '%d.', + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + hooks.defineLocale('cv', { + months: 'кӑрлач_нарӑс_пуш_ака_май_ҫӗртме_утӑ_ҫурла_авӑн_юпа_чӳк_раштав'.split( + '_' + ), + monthsShort: 'кӑр_нар_пуш_ака_май_ҫӗр_утӑ_ҫур_авн_юпа_чӳк_раш'.split('_'), + weekdays: 'вырсарникун_тунтикун_ытларикун_юнкун_кӗҫнерникун_эрнекун_шӑматкун'.split( + '_' + ), + weekdaysShort: 'выр_тун_ытл_юн_кӗҫ_эрн_шӑм'.split('_'), + weekdaysMin: 'вр_тн_ыт_юн_кҫ_эр_шм'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD-MM-YYYY', + LL: 'YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ]', + LLL: 'YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm', + LLLL: 'dddd, YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm', + }, + calendar: { + sameDay: '[Паян] LT [сехетре]', + nextDay: '[Ыран] LT [сехетре]', + lastDay: '[Ӗнер] LT [сехетре]', + nextWeek: '[Ҫитес] dddd LT [сехетре]', + lastWeek: '[Иртнӗ] dddd LT [сехетре]', + sameElse: 'L', + }, + relativeTime: { + future: function (output) { + var affix = /сехет$/i.exec(output) + ? 'рен' + : /ҫул$/i.exec(output) + ? 'тан' + : 'ран'; + return output + affix; + }, + past: '%s каялла', + s: 'пӗр-ик ҫеккунт', + ss: '%d ҫеккунт', + m: 'пӗр минут', + mm: '%d минут', + h: 'пӗр сехет', + hh: '%d сехет', + d: 'пӗр кун', + dd: '%d кун', + M: 'пӗр уйӑх', + MM: '%d уйӑх', + y: 'пӗр ҫул', + yy: '%d ҫул', + }, + dayOfMonthOrdinalParse: /\d{1,2}-мӗш/, + ordinal: '%d-мӗш', + week: { + dow: 1, // Monday is the first day of the week. + doy: 7, // The week that contains Jan 7th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + hooks.defineLocale('cy', { + months: 'Ionawr_Chwefror_Mawrth_Ebrill_Mai_Mehefin_Gorffennaf_Awst_Medi_Hydref_Tachwedd_Rhagfyr'.split( + '_' + ), + monthsShort: 'Ion_Chwe_Maw_Ebr_Mai_Meh_Gor_Aws_Med_Hyd_Tach_Rhag'.split( + '_' + ), + weekdays: 'Dydd Sul_Dydd Llun_Dydd Mawrth_Dydd Mercher_Dydd Iau_Dydd Gwener_Dydd Sadwrn'.split( + '_' + ), + weekdaysShort: 'Sul_Llun_Maw_Mer_Iau_Gwe_Sad'.split('_'), + weekdaysMin: 'Su_Ll_Ma_Me_Ia_Gw_Sa'.split('_'), + weekdaysParseExact: true, + // time formats are the same as en-gb + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[Heddiw am] LT', + nextDay: '[Yfory am] LT', + nextWeek: 'dddd [am] LT', + lastDay: '[Ddoe am] LT', + lastWeek: 'dddd [diwethaf am] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'mewn %s', + past: '%s yn ôl', + s: 'ychydig eiliadau', + ss: '%d eiliad', + m: 'munud', + mm: '%d munud', + h: 'awr', + hh: '%d awr', + d: 'diwrnod', + dd: '%d diwrnod', + M: 'mis', + MM: '%d mis', + y: 'blwyddyn', + yy: '%d flynedd', + }, + dayOfMonthOrdinalParse: /\d{1,2}(fed|ain|af|il|ydd|ed|eg)/, + // traditional ordinal numbers above 31 are not commonly used in colloquial Welsh + ordinal: function (number) { + var b = number, + output = '', + lookup = [ + '', + 'af', + 'il', + 'ydd', + 'ydd', + 'ed', + 'ed', + 'ed', + 'fed', + 'fed', + 'fed', // 1af to 10fed + 'eg', + 'fed', + 'eg', + 'eg', + 'fed', + 'eg', + 'eg', + 'fed', + 'eg', + 'fed', // 11eg to 20fed + ]; + if (b > 20) { + if (b === 40 || b === 50 || b === 60 || b === 80 || b === 100) { + output = 'fed'; // not 30ain, 70ain or 90ain + } else { + output = 'ain'; + } + } else if (b > 0) { + output = lookup[b]; + } + return number + output; + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + hooks.defineLocale('da', { + months: 'januar_februar_marts_april_maj_juni_juli_august_september_oktober_november_december'.split( + '_' + ), + monthsShort: 'jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec'.split('_'), + weekdays: 'søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag'.split('_'), + weekdaysShort: 'søn_man_tir_ons_tor_fre_lør'.split('_'), + weekdaysMin: 'sø_ma_ti_on_to_fr_lø'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D. MMMM YYYY', + LLL: 'D. MMMM YYYY HH:mm', + LLLL: 'dddd [d.] D. MMMM YYYY [kl.] HH:mm', + }, + calendar: { + sameDay: '[i dag kl.] LT', + nextDay: '[i morgen kl.] LT', + nextWeek: 'på dddd [kl.] LT', + lastDay: '[i går kl.] LT', + lastWeek: '[i] dddd[s kl.] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'om %s', + past: '%s siden', + s: 'få sekunder', + ss: '%d sekunder', + m: 'et minut', + mm: '%d minutter', + h: 'en time', + hh: '%d timer', + d: 'en dag', + dd: '%d dage', + M: 'en måned', + MM: '%d måneder', + y: 'et år', + yy: '%d år', + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal: '%d.', + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + function processRelativeTime(number, withoutSuffix, key, isFuture) { + var format = { + m: ['eine Minute', 'einer Minute'], + h: ['eine Stunde', 'einer Stunde'], + d: ['ein Tag', 'einem Tag'], + dd: [number + ' Tage', number + ' Tagen'], + w: ['eine Woche', 'einer Woche'], + M: ['ein Monat', 'einem Monat'], + MM: [number + ' Monate', number + ' Monaten'], + y: ['ein Jahr', 'einem Jahr'], + yy: [number + ' Jahre', number + ' Jahren'], + }; + return withoutSuffix ? format[key][0] : format[key][1]; + } + + hooks.defineLocale('de-at', { + months: 'Jänner_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split( + '_' + ), + monthsShort: 'Jän._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split( + '_' + ), + monthsParseExact: true, + weekdays: 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split( + '_' + ), + weekdaysShort: 'So._Mo._Di._Mi._Do._Fr._Sa.'.split('_'), + weekdaysMin: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D. MMMM YYYY', + LLL: 'D. MMMM YYYY HH:mm', + LLLL: 'dddd, D. MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[heute um] LT [Uhr]', + sameElse: 'L', + nextDay: '[morgen um] LT [Uhr]', + nextWeek: 'dddd [um] LT [Uhr]', + lastDay: '[gestern um] LT [Uhr]', + lastWeek: '[letzten] dddd [um] LT [Uhr]', + }, + relativeTime: { + future: 'in %s', + past: 'vor %s', + s: 'ein paar Sekunden', + ss: '%d Sekunden', + m: processRelativeTime, + mm: '%d Minuten', + h: processRelativeTime, + hh: '%d Stunden', + d: processRelativeTime, + dd: processRelativeTime, + w: processRelativeTime, + ww: '%d Wochen', + M: processRelativeTime, + MM: processRelativeTime, + y: processRelativeTime, + yy: processRelativeTime, + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal: '%d.', + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + function processRelativeTime$1(number, withoutSuffix, key, isFuture) { + var format = { + m: ['eine Minute', 'einer Minute'], + h: ['eine Stunde', 'einer Stunde'], + d: ['ein Tag', 'einem Tag'], + dd: [number + ' Tage', number + ' Tagen'], + w: ['eine Woche', 'einer Woche'], + M: ['ein Monat', 'einem Monat'], + MM: [number + ' Monate', number + ' Monaten'], + y: ['ein Jahr', 'einem Jahr'], + yy: [number + ' Jahre', number + ' Jahren'], + }; + return withoutSuffix ? format[key][0] : format[key][1]; + } + + hooks.defineLocale('de-ch', { + months: 'Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split( + '_' + ), + monthsShort: 'Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split( + '_' + ), + monthsParseExact: true, + weekdays: 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split( + '_' + ), + weekdaysShort: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'), + weekdaysMin: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D. MMMM YYYY', + LLL: 'D. MMMM YYYY HH:mm', + LLLL: 'dddd, D. MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[heute um] LT [Uhr]', + sameElse: 'L', + nextDay: '[morgen um] LT [Uhr]', + nextWeek: 'dddd [um] LT [Uhr]', + lastDay: '[gestern um] LT [Uhr]', + lastWeek: '[letzten] dddd [um] LT [Uhr]', + }, + relativeTime: { + future: 'in %s', + past: 'vor %s', + s: 'ein paar Sekunden', + ss: '%d Sekunden', + m: processRelativeTime$1, + mm: '%d Minuten', + h: processRelativeTime$1, + hh: '%d Stunden', + d: processRelativeTime$1, + dd: processRelativeTime$1, + w: processRelativeTime$1, + ww: '%d Wochen', + M: processRelativeTime$1, + MM: processRelativeTime$1, + y: processRelativeTime$1, + yy: processRelativeTime$1, + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal: '%d.', + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + function processRelativeTime$2(number, withoutSuffix, key, isFuture) { + var format = { + m: ['eine Minute', 'einer Minute'], + h: ['eine Stunde', 'einer Stunde'], + d: ['ein Tag', 'einem Tag'], + dd: [number + ' Tage', number + ' Tagen'], + w: ['eine Woche', 'einer Woche'], + M: ['ein Monat', 'einem Monat'], + MM: [number + ' Monate', number + ' Monaten'], + y: ['ein Jahr', 'einem Jahr'], + yy: [number + ' Jahre', number + ' Jahren'], + }; + return withoutSuffix ? format[key][0] : format[key][1]; + } + + hooks.defineLocale('de', { + months: 'Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember'.split( + '_' + ), + monthsShort: 'Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.'.split( + '_' + ), + monthsParseExact: true, + weekdays: 'Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag'.split( + '_' + ), + weekdaysShort: 'So._Mo._Di._Mi._Do._Fr._Sa.'.split('_'), + weekdaysMin: 'So_Mo_Di_Mi_Do_Fr_Sa'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D. MMMM YYYY', + LLL: 'D. MMMM YYYY HH:mm', + LLLL: 'dddd, D. MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[heute um] LT [Uhr]', + sameElse: 'L', + nextDay: '[morgen um] LT [Uhr]', + nextWeek: 'dddd [um] LT [Uhr]', + lastDay: '[gestern um] LT [Uhr]', + lastWeek: '[letzten] dddd [um] LT [Uhr]', + }, + relativeTime: { + future: 'in %s', + past: 'vor %s', + s: 'ein paar Sekunden', + ss: '%d Sekunden', + m: processRelativeTime$2, + mm: '%d Minuten', + h: processRelativeTime$2, + hh: '%d Stunden', + d: processRelativeTime$2, + dd: processRelativeTime$2, + w: processRelativeTime$2, + ww: '%d Wochen', + M: processRelativeTime$2, + MM: processRelativeTime$2, + y: processRelativeTime$2, + yy: processRelativeTime$2, + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal: '%d.', + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var months$5 = [ + 'ޖެނުއަރީ', + 'ފެބްރުއަރީ', + 'މާރިޗު', + 'އޭޕްރީލު', + 'މޭ', + 'ޖޫން', + 'ޖުލައި', + 'އޯގަސްޓު', + 'ސެޕްޓެމްބަރު', + 'އޮކްޓޯބަރު', + 'ނޮވެމްބަރު', + 'ޑިސެމްބަރު', + ], + weekdays = [ + 'އާދިއްތަ', + 'ހޯމަ', + 'އަންގާރަ', + 'ބުދަ', + 'ބުރާސްފަތި', + 'ހުކުރު', + 'ހޮނިހިރު', + ]; + + hooks.defineLocale('dv', { + months: months$5, + monthsShort: months$5, + weekdays: weekdays, + weekdaysShort: weekdays, + weekdaysMin: 'އާދި_ހޯމަ_އަން_ބުދަ_ބުރާ_ހުކު_ހޮނި'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'D/M/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd D MMMM YYYY HH:mm', + }, + meridiemParse: /މކ|މފ/, + isPM: function (input) { + return 'މފ' === input; + }, + meridiem: function (hour, minute, isLower) { + if (hour < 12) { + return 'މކ'; + } else { + return 'މފ'; + } + }, + calendar: { + sameDay: '[މިއަދު] LT', + nextDay: '[މާދަމާ] LT', + nextWeek: 'dddd LT', + lastDay: '[އިއްޔެ] LT', + lastWeek: '[ފާއިތުވި] dddd LT', + sameElse: 'L', + }, + relativeTime: { + future: 'ތެރޭގައި %s', + past: 'ކުރިން %s', + s: 'ސިކުންތުކޮޅެއް', + ss: 'd% ސިކުންތު', + m: 'މިނިޓެއް', + mm: 'މިނިޓު %d', + h: 'ގަޑިއިރެއް', + hh: 'ގަޑިއިރު %d', + d: 'ދުވަހެއް', + dd: 'ދުވަސް %d', + M: 'މަހެއް', + MM: 'މަސް %d', + y: 'އަހަރެއް', + yy: 'އަހަރު %d', + }, + preparse: function (string) { + return string.replace(/،/g, ','); + }, + postformat: function (string) { + return string.replace(/,/g, '،'); + }, + week: { + dow: 7, // Sunday is the first day of the week. + doy: 12, // The week that contains Jan 12th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + function isFunction$1(input) { + return ( + (typeof Function !== 'undefined' && input instanceof Function) || + Object.prototype.toString.call(input) === '[object Function]' + ); + } + + hooks.defineLocale('el', { + monthsNominativeEl: 'Ιανουάριος_Φεβρουάριος_Μάρτιος_Απρίλιος_Μάιος_Ιούνιος_Ιούλιος_Αύγουστος_Σεπτέμβριος_Οκτώβριος_Νοέμβριος_Δεκέμβριος'.split( + '_' + ), + monthsGenitiveEl: 'Ιανουαρίου_Φεβρουαρίου_Μαρτίου_Απριλίου_Μαΐου_Ιουνίου_Ιουλίου_Αυγούστου_Σεπτεμβρίου_Οκτωβρίου_Νοεμβρίου_Δεκεμβρίου'.split( + '_' + ), + months: function (momentToFormat, format) { + if (!momentToFormat) { + return this._monthsNominativeEl; + } else if ( + typeof format === 'string' && + /D/.test(format.substring(0, format.indexOf('MMMM'))) + ) { + // if there is a day number before 'MMMM' + return this._monthsGenitiveEl[momentToFormat.month()]; + } else { + return this._monthsNominativeEl[momentToFormat.month()]; + } + }, + monthsShort: 'Ιαν_Φεβ_Μαρ_Απρ_Μαϊ_Ιουν_Ιουλ_Αυγ_Σεπ_Οκτ_Νοε_Δεκ'.split('_'), + weekdays: 'Κυριακή_Δευτέρα_Τρίτη_Τετάρτη_Πέμπτη_Παρασκευή_Σάββατο'.split( + '_' + ), + weekdaysShort: 'Κυρ_Δευ_Τρι_Τετ_Πεμ_Παρ_Σαβ'.split('_'), + weekdaysMin: 'Κυ_Δε_Τρ_Τε_Πε_Πα_Σα'.split('_'), + meridiem: function (hours, minutes, isLower) { + if (hours > 11) { + return isLower ? 'μμ' : 'ΜΜ'; + } else { + return isLower ? 'πμ' : 'ΠΜ'; + } + }, + isPM: function (input) { + return (input + '').toLowerCase()[0] === 'μ'; + }, + meridiemParse: /[ΠΜ]\.?Μ?\.?/i, + longDateFormat: { + LT: 'h:mm A', + LTS: 'h:mm:ss A', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY h:mm A', + LLLL: 'dddd, D MMMM YYYY h:mm A', + }, + calendarEl: { + sameDay: '[Σήμερα {}] LT', + nextDay: '[Αύριο {}] LT', + nextWeek: 'dddd [{}] LT', + lastDay: '[Χθες {}] LT', + lastWeek: function () { + switch (this.day()) { + case 6: + return '[το προηγούμενο] dddd [{}] LT'; + default: + return '[την προηγούμενη] dddd [{}] LT'; + } + }, + sameElse: 'L', + }, + calendar: function (key, mom) { + var output = this._calendarEl[key], + hours = mom && mom.hours(); + if (isFunction$1(output)) { + output = output.apply(mom); + } + return output.replace('{}', hours % 12 === 1 ? 'στη' : 'στις'); + }, + relativeTime: { + future: 'σε %s', + past: '%s πριν', + s: 'λίγα δευτερόλεπτα', + ss: '%d δευτερόλεπτα', + m: 'ένα λεπτό', + mm: '%d λεπτά', + h: 'μία ώρα', + hh: '%d ώρες', + d: 'μία μέρα', + dd: '%d μέρες', + M: 'ένας μήνας', + MM: '%d μήνες', + y: 'ένας χρόνος', + yy: '%d χρόνια', + }, + dayOfMonthOrdinalParse: /\d{1,2}η/, + ordinal: '%dη', + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4st is the first week of the year. + }, + }); + + //! moment.js locale configuration + + hooks.defineLocale('en-au', { + months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split( + '_' + ), + monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'), + weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split( + '_' + ), + weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'), + weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'), + longDateFormat: { + LT: 'h:mm A', + LTS: 'h:mm:ss A', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY h:mm A', + LLLL: 'dddd, D MMMM YYYY h:mm A', + }, + calendar: { + sameDay: '[Today at] LT', + nextDay: '[Tomorrow at] LT', + nextWeek: 'dddd [at] LT', + lastDay: '[Yesterday at] LT', + lastWeek: '[Last] dddd [at] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'in %s', + past: '%s ago', + s: 'a few seconds', + ss: '%d seconds', + m: 'a minute', + mm: '%d minutes', + h: 'an hour', + hh: '%d hours', + d: 'a day', + dd: '%d days', + M: 'a month', + MM: '%d months', + y: 'a year', + yy: '%d years', + }, + dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/, + ordinal: function (number) { + var b = number % 10, + output = + ~~((number % 100) / 10) === 1 + ? 'th' + : b === 1 + ? 'st' + : b === 2 + ? 'nd' + : b === 3 + ? 'rd' + : 'th'; + return number + output; + }, + week: { + dow: 0, // Sunday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + hooks.defineLocale('en-ca', { + months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split( + '_' + ), + monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'), + weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split( + '_' + ), + weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'), + weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'), + longDateFormat: { + LT: 'h:mm A', + LTS: 'h:mm:ss A', + L: 'YYYY-MM-DD', + LL: 'MMMM D, YYYY', + LLL: 'MMMM D, YYYY h:mm A', + LLLL: 'dddd, MMMM D, YYYY h:mm A', + }, + calendar: { + sameDay: '[Today at] LT', + nextDay: '[Tomorrow at] LT', + nextWeek: 'dddd [at] LT', + lastDay: '[Yesterday at] LT', + lastWeek: '[Last] dddd [at] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'in %s', + past: '%s ago', + s: 'a few seconds', + ss: '%d seconds', + m: 'a minute', + mm: '%d minutes', + h: 'an hour', + hh: '%d hours', + d: 'a day', + dd: '%d days', + M: 'a month', + MM: '%d months', + y: 'a year', + yy: '%d years', + }, + dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/, + ordinal: function (number) { + var b = number % 10, + output = + ~~((number % 100) / 10) === 1 + ? 'th' + : b === 1 + ? 'st' + : b === 2 + ? 'nd' + : b === 3 + ? 'rd' + : 'th'; + return number + output; + }, + }); + + //! moment.js locale configuration + + hooks.defineLocale('en-gb', { + months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split( + '_' + ), + monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'), + weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split( + '_' + ), + weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'), + weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[Today at] LT', + nextDay: '[Tomorrow at] LT', + nextWeek: 'dddd [at] LT', + lastDay: '[Yesterday at] LT', + lastWeek: '[Last] dddd [at] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'in %s', + past: '%s ago', + s: 'a few seconds', + ss: '%d seconds', + m: 'a minute', + mm: '%d minutes', + h: 'an hour', + hh: '%d hours', + d: 'a day', + dd: '%d days', + M: 'a month', + MM: '%d months', + y: 'a year', + yy: '%d years', + }, + dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/, + ordinal: function (number) { + var b = number % 10, + output = + ~~((number % 100) / 10) === 1 + ? 'th' + : b === 1 + ? 'st' + : b === 2 + ? 'nd' + : b === 3 + ? 'rd' + : 'th'; + return number + output; + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + hooks.defineLocale('en-ie', { + months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split( + '_' + ), + monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'), + weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split( + '_' + ), + weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'), + weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[Today at] LT', + nextDay: '[Tomorrow at] LT', + nextWeek: 'dddd [at] LT', + lastDay: '[Yesterday at] LT', + lastWeek: '[Last] dddd [at] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'in %s', + past: '%s ago', + s: 'a few seconds', + ss: '%d seconds', + m: 'a minute', + mm: '%d minutes', + h: 'an hour', + hh: '%d hours', + d: 'a day', + dd: '%d days', + M: 'a month', + MM: '%d months', + y: 'a year', + yy: '%d years', + }, + dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/, + ordinal: function (number) { + var b = number % 10, + output = + ~~((number % 100) / 10) === 1 + ? 'th' + : b === 1 + ? 'st' + : b === 2 + ? 'nd' + : b === 3 + ? 'rd' + : 'th'; + return number + output; + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + hooks.defineLocale('en-il', { + months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split( + '_' + ), + monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'), + weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split( + '_' + ), + weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'), + weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[Today at] LT', + nextDay: '[Tomorrow at] LT', + nextWeek: 'dddd [at] LT', + lastDay: '[Yesterday at] LT', + lastWeek: '[Last] dddd [at] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'in %s', + past: '%s ago', + s: 'a few seconds', + ss: '%d seconds', + m: 'a minute', + mm: '%d minutes', + h: 'an hour', + hh: '%d hours', + d: 'a day', + dd: '%d days', + M: 'a month', + MM: '%d months', + y: 'a year', + yy: '%d years', + }, + dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/, + ordinal: function (number) { + var b = number % 10, + output = + ~~((number % 100) / 10) === 1 + ? 'th' + : b === 1 + ? 'st' + : b === 2 + ? 'nd' + : b === 3 + ? 'rd' + : 'th'; + return number + output; + }, + }); + + //! moment.js locale configuration + + hooks.defineLocale('en-in', { + months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split( + '_' + ), + monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'), + weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split( + '_' + ), + weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'), + weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'), + longDateFormat: { + LT: 'h:mm A', + LTS: 'h:mm:ss A', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY h:mm A', + LLLL: 'dddd, D MMMM YYYY h:mm A', + }, + calendar: { + sameDay: '[Today at] LT', + nextDay: '[Tomorrow at] LT', + nextWeek: 'dddd [at] LT', + lastDay: '[Yesterday at] LT', + lastWeek: '[Last] dddd [at] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'in %s', + past: '%s ago', + s: 'a few seconds', + ss: '%d seconds', + m: 'a minute', + mm: '%d minutes', + h: 'an hour', + hh: '%d hours', + d: 'a day', + dd: '%d days', + M: 'a month', + MM: '%d months', + y: 'a year', + yy: '%d years', + }, + dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/, + ordinal: function (number) { + var b = number % 10, + output = + ~~((number % 100) / 10) === 1 + ? 'th' + : b === 1 + ? 'st' + : b === 2 + ? 'nd' + : b === 3 + ? 'rd' + : 'th'; + return number + output; + }, + week: { + dow: 0, // Sunday is the first day of the week. + doy: 6, // The week that contains Jan 1st is the first week of the year. + }, + }); + + //! moment.js locale configuration + + hooks.defineLocale('en-nz', { + months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split( + '_' + ), + monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'), + weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split( + '_' + ), + weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'), + weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'), + longDateFormat: { + LT: 'h:mm A', + LTS: 'h:mm:ss A', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY h:mm A', + LLLL: 'dddd, D MMMM YYYY h:mm A', + }, + calendar: { + sameDay: '[Today at] LT', + nextDay: '[Tomorrow at] LT', + nextWeek: 'dddd [at] LT', + lastDay: '[Yesterday at] LT', + lastWeek: '[Last] dddd [at] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'in %s', + past: '%s ago', + s: 'a few seconds', + ss: '%d seconds', + m: 'a minute', + mm: '%d minutes', + h: 'an hour', + hh: '%d hours', + d: 'a day', + dd: '%d days', + M: 'a month', + MM: '%d months', + y: 'a year', + yy: '%d years', + }, + dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/, + ordinal: function (number) { + var b = number % 10, + output = + ~~((number % 100) / 10) === 1 + ? 'th' + : b === 1 + ? 'st' + : b === 2 + ? 'nd' + : b === 3 + ? 'rd' + : 'th'; + return number + output; + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + hooks.defineLocale('en-sg', { + months: 'January_February_March_April_May_June_July_August_September_October_November_December'.split( + '_' + ), + monthsShort: 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'), + weekdays: 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split( + '_' + ), + weekdaysShort: 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'), + weekdaysMin: 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[Today at] LT', + nextDay: '[Tomorrow at] LT', + nextWeek: 'dddd [at] LT', + lastDay: '[Yesterday at] LT', + lastWeek: '[Last] dddd [at] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'in %s', + past: '%s ago', + s: 'a few seconds', + ss: '%d seconds', + m: 'a minute', + mm: '%d minutes', + h: 'an hour', + hh: '%d hours', + d: 'a day', + dd: '%d days', + M: 'a month', + MM: '%d months', + y: 'a year', + yy: '%d years', + }, + dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/, + ordinal: function (number) { + var b = number % 10, + output = + ~~((number % 100) / 10) === 1 + ? 'th' + : b === 1 + ? 'st' + : b === 2 + ? 'nd' + : b === 3 + ? 'rd' + : 'th'; + return number + output; + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + hooks.defineLocale('eo', { + months: 'januaro_februaro_marto_aprilo_majo_junio_julio_aŭgusto_septembro_oktobro_novembro_decembro'.split( + '_' + ), + monthsShort: 'jan_feb_mart_apr_maj_jun_jul_aŭg_sept_okt_nov_dec'.split('_'), + weekdays: 'dimanĉo_lundo_mardo_merkredo_ĵaŭdo_vendredo_sabato'.split('_'), + weekdaysShort: 'dim_lun_mard_merk_ĵaŭ_ven_sab'.split('_'), + weekdaysMin: 'di_lu_ma_me_ĵa_ve_sa'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'YYYY-MM-DD', + LL: '[la] D[-an de] MMMM, YYYY', + LLL: '[la] D[-an de] MMMM, YYYY HH:mm', + LLLL: 'dddd[n], [la] D[-an de] MMMM, YYYY HH:mm', + llll: 'ddd, [la] D[-an de] MMM, YYYY HH:mm', + }, + meridiemParse: /[ap]\.t\.m/i, + isPM: function (input) { + return input.charAt(0).toLowerCase() === 'p'; + }, + meridiem: function (hours, minutes, isLower) { + if (hours > 11) { + return isLower ? 'p.t.m.' : 'P.T.M.'; + } else { + return isLower ? 'a.t.m.' : 'A.T.M.'; + } + }, + calendar: { + sameDay: '[Hodiaŭ je] LT', + nextDay: '[Morgaŭ je] LT', + nextWeek: 'dddd[n je] LT', + lastDay: '[Hieraŭ je] LT', + lastWeek: '[pasintan] dddd[n je] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'post %s', + past: 'antaŭ %s', + s: 'kelkaj sekundoj', + ss: '%d sekundoj', + m: 'unu minuto', + mm: '%d minutoj', + h: 'unu horo', + hh: '%d horoj', + d: 'unu tago', //ne 'diurno', ĉar estas uzita por proksimumo + dd: '%d tagoj', + M: 'unu monato', + MM: '%d monatoj', + y: 'unu jaro', + yy: '%d jaroj', + }, + dayOfMonthOrdinalParse: /\d{1,2}a/, + ordinal: '%da', + week: { + dow: 1, // Monday is the first day of the week. + doy: 7, // The week that contains Jan 7th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var monthsShortDot = 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split( + '_' + ), + monthsShort$1 = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'), + monthsParse$2 = [ + /^ene/i, + /^feb/i, + /^mar/i, + /^abr/i, + /^may/i, + /^jun/i, + /^jul/i, + /^ago/i, + /^sep/i, + /^oct/i, + /^nov/i, + /^dic/i, + ], + monthsRegex$3 = /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i; + + hooks.defineLocale('es-do', { + months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split( + '_' + ), + monthsShort: function (m, format) { + if (!m) { + return monthsShortDot; + } else if (/-MMM-/.test(format)) { + return monthsShort$1[m.month()]; + } else { + return monthsShortDot[m.month()]; + } + }, + monthsRegex: monthsRegex$3, + monthsShortRegex: monthsRegex$3, + monthsStrictRegex: /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i, + monthsShortStrictRegex: /^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i, + monthsParse: monthsParse$2, + longMonthsParse: monthsParse$2, + shortMonthsParse: monthsParse$2, + weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'), + weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'), + weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'h:mm A', + LTS: 'h:mm:ss A', + L: 'DD/MM/YYYY', + LL: 'D [de] MMMM [de] YYYY', + LLL: 'D [de] MMMM [de] YYYY h:mm A', + LLLL: 'dddd, D [de] MMMM [de] YYYY h:mm A', + }, + calendar: { + sameDay: function () { + return '[hoy a la' + (this.hours() !== 1 ? 's' : '') + '] LT'; + }, + nextDay: function () { + return '[mañana a la' + (this.hours() !== 1 ? 's' : '') + '] LT'; + }, + nextWeek: function () { + return 'dddd [a la' + (this.hours() !== 1 ? 's' : '') + '] LT'; + }, + lastDay: function () { + return '[ayer a la' + (this.hours() !== 1 ? 's' : '') + '] LT'; + }, + lastWeek: function () { + return ( + '[el] dddd [pasado a la' + + (this.hours() !== 1 ? 's' : '') + + '] LT' + ); + }, + sameElse: 'L', + }, + relativeTime: { + future: 'en %s', + past: 'hace %s', + s: 'unos segundos', + ss: '%d segundos', + m: 'un minuto', + mm: '%d minutos', + h: 'una hora', + hh: '%d horas', + d: 'un día', + dd: '%d días', + M: 'un mes', + MM: '%d meses', + y: 'un año', + yy: '%d años', + }, + dayOfMonthOrdinalParse: /\d{1,2}º/, + ordinal: '%dº', + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var monthsShortDot$1 = 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split( + '_' + ), + monthsShort$2 = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'), + monthsParse$3 = [ + /^ene/i, + /^feb/i, + /^mar/i, + /^abr/i, + /^may/i, + /^jun/i, + /^jul/i, + /^ago/i, + /^sep/i, + /^oct/i, + /^nov/i, + /^dic/i, + ], + monthsRegex$4 = /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i; + + hooks.defineLocale('es-us', { + months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split( + '_' + ), + monthsShort: function (m, format) { + if (!m) { + return monthsShortDot$1; + } else if (/-MMM-/.test(format)) { + return monthsShort$2[m.month()]; + } else { + return monthsShortDot$1[m.month()]; + } + }, + monthsRegex: monthsRegex$4, + monthsShortRegex: monthsRegex$4, + monthsStrictRegex: /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i, + monthsShortStrictRegex: /^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i, + monthsParse: monthsParse$3, + longMonthsParse: monthsParse$3, + shortMonthsParse: monthsParse$3, + weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'), + weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'), + weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'h:mm A', + LTS: 'h:mm:ss A', + L: 'MM/DD/YYYY', + LL: 'D [de] MMMM [de] YYYY', + LLL: 'D [de] MMMM [de] YYYY h:mm A', + LLLL: 'dddd, D [de] MMMM [de] YYYY h:mm A', + }, + calendar: { + sameDay: function () { + return '[hoy a la' + (this.hours() !== 1 ? 's' : '') + '] LT'; + }, + nextDay: function () { + return '[mañana a la' + (this.hours() !== 1 ? 's' : '') + '] LT'; + }, + nextWeek: function () { + return 'dddd [a la' + (this.hours() !== 1 ? 's' : '') + '] LT'; + }, + lastDay: function () { + return '[ayer a la' + (this.hours() !== 1 ? 's' : '') + '] LT'; + }, + lastWeek: function () { + return ( + '[el] dddd [pasado a la' + + (this.hours() !== 1 ? 's' : '') + + '] LT' + ); + }, + sameElse: 'L', + }, + relativeTime: { + future: 'en %s', + past: 'hace %s', + s: 'unos segundos', + ss: '%d segundos', + m: 'un minuto', + mm: '%d minutos', + h: 'una hora', + hh: '%d horas', + d: 'un día', + dd: '%d días', + M: 'un mes', + MM: '%d meses', + y: 'un año', + yy: '%d años', + }, + dayOfMonthOrdinalParse: /\d{1,2}º/, + ordinal: '%dº', + week: { + dow: 0, // Sunday is the first day of the week. + doy: 6, // The week that contains Jan 6th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var monthsShortDot$2 = 'ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.'.split( + '_' + ), + monthsShort$3 = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'), + monthsParse$4 = [ + /^ene/i, + /^feb/i, + /^mar/i, + /^abr/i, + /^may/i, + /^jun/i, + /^jul/i, + /^ago/i, + /^sep/i, + /^oct/i, + /^nov/i, + /^dic/i, + ], + monthsRegex$5 = /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i; + + hooks.defineLocale('es', { + months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split( + '_' + ), + monthsShort: function (m, format) { + if (!m) { + return monthsShortDot$2; + } else if (/-MMM-/.test(format)) { + return monthsShort$3[m.month()]; + } else { + return monthsShortDot$2[m.month()]; + } + }, + monthsRegex: monthsRegex$5, + monthsShortRegex: monthsRegex$5, + monthsStrictRegex: /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i, + monthsShortStrictRegex: /^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i, + monthsParse: monthsParse$4, + longMonthsParse: monthsParse$4, + shortMonthsParse: monthsParse$4, + weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'), + weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'), + weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'H:mm', + LTS: 'H:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D [de] MMMM [de] YYYY', + LLL: 'D [de] MMMM [de] YYYY H:mm', + LLLL: 'dddd, D [de] MMMM [de] YYYY H:mm', + }, + calendar: { + sameDay: function () { + return '[hoy a la' + (this.hours() !== 1 ? 's' : '') + '] LT'; + }, + nextDay: function () { + return '[mañana a la' + (this.hours() !== 1 ? 's' : '') + '] LT'; + }, + nextWeek: function () { + return 'dddd [a la' + (this.hours() !== 1 ? 's' : '') + '] LT'; + }, + lastDay: function () { + return '[ayer a la' + (this.hours() !== 1 ? 's' : '') + '] LT'; + }, + lastWeek: function () { + return ( + '[el] dddd [pasado a la' + + (this.hours() !== 1 ? 's' : '') + + '] LT' + ); + }, + sameElse: 'L', + }, + relativeTime: { + future: 'en %s', + past: 'hace %s', + s: 'unos segundos', + ss: '%d segundos', + m: 'un minuto', + mm: '%d minutos', + h: 'una hora', + hh: '%d horas', + d: 'un día', + dd: '%d días', + M: 'un mes', + MM: '%d meses', + y: 'un año', + yy: '%d años', + }, + dayOfMonthOrdinalParse: /\d{1,2}º/, + ordinal: '%dº', + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + invalidDate: 'Fecha inválida', + }); + + //! moment.js locale configuration + + function processRelativeTime$3(number, withoutSuffix, key, isFuture) { + var format = { + s: ['mõne sekundi', 'mõni sekund', 'paar sekundit'], + ss: [number + 'sekundi', number + 'sekundit'], + m: ['ühe minuti', 'üks minut'], + mm: [number + ' minuti', number + ' minutit'], + h: ['ühe tunni', 'tund aega', 'üks tund'], + hh: [number + ' tunni', number + ' tundi'], + d: ['ühe päeva', 'üks päev'], + M: ['kuu aja', 'kuu aega', 'üks kuu'], + MM: [number + ' kuu', number + ' kuud'], + y: ['ühe aasta', 'aasta', 'üks aasta'], + yy: [number + ' aasta', number + ' aastat'], + }; + if (withoutSuffix) { + return format[key][2] ? format[key][2] : format[key][1]; + } + return isFuture ? format[key][0] : format[key][1]; + } + + hooks.defineLocale('et', { + months: 'jaanuar_veebruar_märts_aprill_mai_juuni_juuli_august_september_oktoober_november_detsember'.split( + '_' + ), + monthsShort: 'jaan_veebr_märts_apr_mai_juuni_juuli_aug_sept_okt_nov_dets'.split( + '_' + ), + weekdays: 'pühapäev_esmaspäev_teisipäev_kolmapäev_neljapäev_reede_laupäev'.split( + '_' + ), + weekdaysShort: 'P_E_T_K_N_R_L'.split('_'), + weekdaysMin: 'P_E_T_K_N_R_L'.split('_'), + longDateFormat: { + LT: 'H:mm', + LTS: 'H:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D. MMMM YYYY', + LLL: 'D. MMMM YYYY H:mm', + LLLL: 'dddd, D. MMMM YYYY H:mm', + }, + calendar: { + sameDay: '[Täna,] LT', + nextDay: '[Homme,] LT', + nextWeek: '[Järgmine] dddd LT', + lastDay: '[Eile,] LT', + lastWeek: '[Eelmine] dddd LT', + sameElse: 'L', + }, + relativeTime: { + future: '%s pärast', + past: '%s tagasi', + s: processRelativeTime$3, + ss: processRelativeTime$3, + m: processRelativeTime$3, + mm: processRelativeTime$3, + h: processRelativeTime$3, + hh: processRelativeTime$3, + d: processRelativeTime$3, + dd: '%d päeva', + M: processRelativeTime$3, + MM: processRelativeTime$3, + y: processRelativeTime$3, + yy: processRelativeTime$3, + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal: '%d.', + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + hooks.defineLocale('eu', { + months: 'urtarrila_otsaila_martxoa_apirila_maiatza_ekaina_uztaila_abuztua_iraila_urria_azaroa_abendua'.split( + '_' + ), + monthsShort: 'urt._ots._mar._api._mai._eka._uzt._abu._ira._urr._aza._abe.'.split( + '_' + ), + monthsParseExact: true, + weekdays: 'igandea_astelehena_asteartea_asteazkena_osteguna_ostirala_larunbata'.split( + '_' + ), + weekdaysShort: 'ig._al._ar._az._og._ol._lr.'.split('_'), + weekdaysMin: 'ig_al_ar_az_og_ol_lr'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'YYYY-MM-DD', + LL: 'YYYY[ko] MMMM[ren] D[a]', + LLL: 'YYYY[ko] MMMM[ren] D[a] HH:mm', + LLLL: 'dddd, YYYY[ko] MMMM[ren] D[a] HH:mm', + l: 'YYYY-M-D', + ll: 'YYYY[ko] MMM D[a]', + lll: 'YYYY[ko] MMM D[a] HH:mm', + llll: 'ddd, YYYY[ko] MMM D[a] HH:mm', + }, + calendar: { + sameDay: '[gaur] LT[etan]', + nextDay: '[bihar] LT[etan]', + nextWeek: 'dddd LT[etan]', + lastDay: '[atzo] LT[etan]', + lastWeek: '[aurreko] dddd LT[etan]', + sameElse: 'L', + }, + relativeTime: { + future: '%s barru', + past: 'duela %s', + s: 'segundo batzuk', + ss: '%d segundo', + m: 'minutu bat', + mm: '%d minutu', + h: 'ordu bat', + hh: '%d ordu', + d: 'egun bat', + dd: '%d egun', + M: 'hilabete bat', + MM: '%d hilabete', + y: 'urte bat', + yy: '%d urte', + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal: '%d.', + week: { + dow: 1, // Monday is the first day of the week. + doy: 7, // The week that contains Jan 7th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var symbolMap$5 = { + '1': '۱', + '2': '۲', + '3': '۳', + '4': '۴', + '5': '۵', + '6': '۶', + '7': '۷', + '8': '۸', + '9': '۹', + '0': '۰', + }, + numberMap$4 = { + '۱': '1', + '۲': '2', + '۳': '3', + '۴': '4', + '۵': '5', + '۶': '6', + '۷': '7', + '۸': '8', + '۹': '9', + '۰': '0', + }; + + hooks.defineLocale('fa', { + months: 'ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر'.split( + '_' + ), + monthsShort: 'ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر'.split( + '_' + ), + weekdays: 'یک\u200cشنبه_دوشنبه_سه\u200cشنبه_چهارشنبه_پنج\u200cشنبه_جمعه_شنبه'.split( + '_' + ), + weekdaysShort: 'یک\u200cشنبه_دوشنبه_سه\u200cشنبه_چهارشنبه_پنج\u200cشنبه_جمعه_شنبه'.split( + '_' + ), + weekdaysMin: 'ی_د_س_چ_پ_ج_ش'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm', + }, + meridiemParse: /قبل از ظهر|بعد از ظهر/, + isPM: function (input) { + return /بعد از ظهر/.test(input); + }, + meridiem: function (hour, minute, isLower) { + if (hour < 12) { + return 'قبل از ظهر'; + } else { + return 'بعد از ظهر'; + } + }, + calendar: { + sameDay: '[امروز ساعت] LT', + nextDay: '[فردا ساعت] LT', + nextWeek: 'dddd [ساعت] LT', + lastDay: '[دیروز ساعت] LT', + lastWeek: 'dddd [پیش] [ساعت] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'در %s', + past: '%s پیش', + s: 'چند ثانیه', + ss: '%d ثانیه', + m: 'یک دقیقه', + mm: '%d دقیقه', + h: 'یک ساعت', + hh: '%d ساعت', + d: 'یک روز', + dd: '%d روز', + M: 'یک ماه', + MM: '%d ماه', + y: 'یک سال', + yy: '%d سال', + }, + preparse: function (string) { + return string + .replace(/[۰-۹]/g, function (match) { + return numberMap$4[match]; + }) + .replace(/،/g, ','); + }, + postformat: function (string) { + return string + .replace(/\d/g, function (match) { + return symbolMap$5[match]; + }) + .replace(/,/g, '،'); + }, + dayOfMonthOrdinalParse: /\d{1,2}م/, + ordinal: '%dم', + week: { + dow: 6, // Saturday is the first day of the week. + doy: 12, // The week that contains Jan 12th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var numbersPast = 'nolla yksi kaksi kolme neljä viisi kuusi seitsemän kahdeksan yhdeksän'.split( + ' ' + ), + numbersFuture = [ + 'nolla', + 'yhden', + 'kahden', + 'kolmen', + 'neljän', + 'viiden', + 'kuuden', + numbersPast[7], + numbersPast[8], + numbersPast[9], + ]; + function translate$2(number, withoutSuffix, key, isFuture) { + var result = ''; + switch (key) { + case 's': + return isFuture ? 'muutaman sekunnin' : 'muutama sekunti'; + case 'ss': + result = isFuture ? 'sekunnin' : 'sekuntia'; + break; + case 'm': + return isFuture ? 'minuutin' : 'minuutti'; + case 'mm': + result = isFuture ? 'minuutin' : 'minuuttia'; + break; + case 'h': + return isFuture ? 'tunnin' : 'tunti'; + case 'hh': + result = isFuture ? 'tunnin' : 'tuntia'; + break; + case 'd': + return isFuture ? 'päivän' : 'päivä'; + case 'dd': + result = isFuture ? 'päivän' : 'päivää'; + break; + case 'M': + return isFuture ? 'kuukauden' : 'kuukausi'; + case 'MM': + result = isFuture ? 'kuukauden' : 'kuukautta'; + break; + case 'y': + return isFuture ? 'vuoden' : 'vuosi'; + case 'yy': + result = isFuture ? 'vuoden' : 'vuotta'; + break; + } + result = verbalNumber(number, isFuture) + ' ' + result; + return result; + } + function verbalNumber(number, isFuture) { + return number < 10 + ? isFuture + ? numbersFuture[number] + : numbersPast[number] + : number; + } + + hooks.defineLocale('fi', { + months: 'tammikuu_helmikuu_maaliskuu_huhtikuu_toukokuu_kesäkuu_heinäkuu_elokuu_syyskuu_lokakuu_marraskuu_joulukuu'.split( + '_' + ), + monthsShort: 'tammi_helmi_maalis_huhti_touko_kesä_heinä_elo_syys_loka_marras_joulu'.split( + '_' + ), + weekdays: 'sunnuntai_maanantai_tiistai_keskiviikko_torstai_perjantai_lauantai'.split( + '_' + ), + weekdaysShort: 'su_ma_ti_ke_to_pe_la'.split('_'), + weekdaysMin: 'su_ma_ti_ke_to_pe_la'.split('_'), + longDateFormat: { + LT: 'HH.mm', + LTS: 'HH.mm.ss', + L: 'DD.MM.YYYY', + LL: 'Do MMMM[ta] YYYY', + LLL: 'Do MMMM[ta] YYYY, [klo] HH.mm', + LLLL: 'dddd, Do MMMM[ta] YYYY, [klo] HH.mm', + l: 'D.M.YYYY', + ll: 'Do MMM YYYY', + lll: 'Do MMM YYYY, [klo] HH.mm', + llll: 'ddd, Do MMM YYYY, [klo] HH.mm', + }, + calendar: { + sameDay: '[tänään] [klo] LT', + nextDay: '[huomenna] [klo] LT', + nextWeek: 'dddd [klo] LT', + lastDay: '[eilen] [klo] LT', + lastWeek: '[viime] dddd[na] [klo] LT', + sameElse: 'L', + }, + relativeTime: { + future: '%s päästä', + past: '%s sitten', + s: translate$2, + ss: translate$2, + m: translate$2, + mm: translate$2, + h: translate$2, + hh: translate$2, + d: translate$2, + dd: translate$2, + M: translate$2, + MM: translate$2, + y: translate$2, + yy: translate$2, + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal: '%d.', + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + hooks.defineLocale('fil', { + months: 'Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre'.split( + '_' + ), + monthsShort: 'Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis'.split('_'), + weekdays: 'Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado'.split( + '_' + ), + weekdaysShort: 'Lin_Lun_Mar_Miy_Huw_Biy_Sab'.split('_'), + weekdaysMin: 'Li_Lu_Ma_Mi_Hu_Bi_Sab'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'MM/D/YYYY', + LL: 'MMMM D, YYYY', + LLL: 'MMMM D, YYYY HH:mm', + LLLL: 'dddd, MMMM DD, YYYY HH:mm', + }, + calendar: { + sameDay: 'LT [ngayong araw]', + nextDay: '[Bukas ng] LT', + nextWeek: 'LT [sa susunod na] dddd', + lastDay: 'LT [kahapon]', + lastWeek: 'LT [noong nakaraang] dddd', + sameElse: 'L', + }, + relativeTime: { + future: 'sa loob ng %s', + past: '%s ang nakalipas', + s: 'ilang segundo', + ss: '%d segundo', + m: 'isang minuto', + mm: '%d minuto', + h: 'isang oras', + hh: '%d oras', + d: 'isang araw', + dd: '%d araw', + M: 'isang buwan', + MM: '%d buwan', + y: 'isang taon', + yy: '%d taon', + }, + dayOfMonthOrdinalParse: /\d{1,2}/, + ordinal: function (number) { + return number; + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + hooks.defineLocale('fo', { + months: 'januar_februar_mars_apríl_mai_juni_juli_august_september_oktober_november_desember'.split( + '_' + ), + monthsShort: 'jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des'.split('_'), + weekdays: 'sunnudagur_mánadagur_týsdagur_mikudagur_hósdagur_fríggjadagur_leygardagur'.split( + '_' + ), + weekdaysShort: 'sun_mán_týs_mik_hós_frí_ley'.split('_'), + weekdaysMin: 'su_má_tý_mi_hó_fr_le'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd D. MMMM, YYYY HH:mm', + }, + calendar: { + sameDay: '[Í dag kl.] LT', + nextDay: '[Í morgin kl.] LT', + nextWeek: 'dddd [kl.] LT', + lastDay: '[Í gjár kl.] LT', + lastWeek: '[síðstu] dddd [kl] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'um %s', + past: '%s síðani', + s: 'fá sekund', + ss: '%d sekundir', + m: 'ein minuttur', + mm: '%d minuttir', + h: 'ein tími', + hh: '%d tímar', + d: 'ein dagur', + dd: '%d dagar', + M: 'ein mánaður', + MM: '%d mánaðir', + y: 'eitt ár', + yy: '%d ár', + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal: '%d.', + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + hooks.defineLocale('fr-ca', { + months: 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split( + '_' + ), + monthsShort: 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split( + '_' + ), + monthsParseExact: true, + weekdays: 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'), + weekdaysShort: 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'), + weekdaysMin: 'di_lu_ma_me_je_ve_sa'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'YYYY-MM-DD', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[Aujourd’hui à] LT', + nextDay: '[Demain à] LT', + nextWeek: 'dddd [à] LT', + lastDay: '[Hier à] LT', + lastWeek: 'dddd [dernier à] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'dans %s', + past: 'il y a %s', + s: 'quelques secondes', + ss: '%d secondes', + m: 'une minute', + mm: '%d minutes', + h: 'une heure', + hh: '%d heures', + d: 'un jour', + dd: '%d jours', + M: 'un mois', + MM: '%d mois', + y: 'un an', + yy: '%d ans', + }, + dayOfMonthOrdinalParse: /\d{1,2}(er|e)/, + ordinal: function (number, period) { + switch (period) { + // Words with masculine grammatical gender: mois, trimestre, jour + default: + case 'M': + case 'Q': + case 'D': + case 'DDD': + case 'd': + return number + (number === 1 ? 'er' : 'e'); + + // Words with feminine grammatical gender: semaine + case 'w': + case 'W': + return number + (number === 1 ? 're' : 'e'); + } + }, + }); + + //! moment.js locale configuration + + hooks.defineLocale('fr-ch', { + months: 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split( + '_' + ), + monthsShort: 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split( + '_' + ), + monthsParseExact: true, + weekdays: 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'), + weekdaysShort: 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'), + weekdaysMin: 'di_lu_ma_me_je_ve_sa'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[Aujourd’hui à] LT', + nextDay: '[Demain à] LT', + nextWeek: 'dddd [à] LT', + lastDay: '[Hier à] LT', + lastWeek: 'dddd [dernier à] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'dans %s', + past: 'il y a %s', + s: 'quelques secondes', + ss: '%d secondes', + m: 'une minute', + mm: '%d minutes', + h: 'une heure', + hh: '%d heures', + d: 'un jour', + dd: '%d jours', + M: 'un mois', + MM: '%d mois', + y: 'un an', + yy: '%d ans', + }, + dayOfMonthOrdinalParse: /\d{1,2}(er|e)/, + ordinal: function (number, period) { + switch (period) { + // Words with masculine grammatical gender: mois, trimestre, jour + default: + case 'M': + case 'Q': + case 'D': + case 'DDD': + case 'd': + return number + (number === 1 ? 'er' : 'e'); + + // Words with feminine grammatical gender: semaine + case 'w': + case 'W': + return number + (number === 1 ? 're' : 'e'); + } + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var monthsStrictRegex$1 = /^(janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i, + monthsShortStrictRegex$1 = /(janv\.?|févr\.?|mars|avr\.?|mai|juin|juil\.?|août|sept\.?|oct\.?|nov\.?|déc\.?)/i, + monthsRegex$6 = /(janv\.?|févr\.?|mars|avr\.?|mai|juin|juil\.?|août|sept\.?|oct\.?|nov\.?|déc\.?|janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i, + monthsParse$5 = [ + /^janv/i, + /^févr/i, + /^mars/i, + /^avr/i, + /^mai/i, + /^juin/i, + /^juil/i, + /^août/i, + /^sept/i, + /^oct/i, + /^nov/i, + /^déc/i, + ]; + + hooks.defineLocale('fr', { + months: 'janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre'.split( + '_' + ), + monthsShort: 'janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.'.split( + '_' + ), + monthsRegex: monthsRegex$6, + monthsShortRegex: monthsRegex$6, + monthsStrictRegex: monthsStrictRegex$1, + monthsShortStrictRegex: monthsShortStrictRegex$1, + monthsParse: monthsParse$5, + longMonthsParse: monthsParse$5, + shortMonthsParse: monthsParse$5, + weekdays: 'dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi'.split('_'), + weekdaysShort: 'dim._lun._mar._mer._jeu._ven._sam.'.split('_'), + weekdaysMin: 'di_lu_ma_me_je_ve_sa'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[Aujourd’hui à] LT', + nextDay: '[Demain à] LT', + nextWeek: 'dddd [à] LT', + lastDay: '[Hier à] LT', + lastWeek: 'dddd [dernier à] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'dans %s', + past: 'il y a %s', + s: 'quelques secondes', + ss: '%d secondes', + m: 'une minute', + mm: '%d minutes', + h: 'une heure', + hh: '%d heures', + d: 'un jour', + dd: '%d jours', + M: 'un mois', + MM: '%d mois', + y: 'un an', + yy: '%d ans', + }, + dayOfMonthOrdinalParse: /\d{1,2}(er|)/, + ordinal: function (number, period) { + switch (period) { + // TODO: Return 'e' when day of month > 1. Move this case inside + // block for masculine words below. + // See https://github.com/moment/moment/issues/3375 + case 'D': + return number + (number === 1 ? 'er' : ''); + + // Words with masculine grammatical gender: mois, trimestre, jour + default: + case 'M': + case 'Q': + case 'DDD': + case 'd': + return number + (number === 1 ? 'er' : 'e'); + + // Words with feminine grammatical gender: semaine + case 'w': + case 'W': + return number + (number === 1 ? 're' : 'e'); + } + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var monthsShortWithDots = 'jan._feb._mrt._apr._mai_jun._jul._aug._sep._okt._nov._des.'.split( + '_' + ), + monthsShortWithoutDots = 'jan_feb_mrt_apr_mai_jun_jul_aug_sep_okt_nov_des'.split( + '_' + ); + + hooks.defineLocale('fy', { + months: 'jannewaris_febrewaris_maart_april_maaie_juny_july_augustus_septimber_oktober_novimber_desimber'.split( + '_' + ), + monthsShort: function (m, format) { + if (!m) { + return monthsShortWithDots; + } else if (/-MMM-/.test(format)) { + return monthsShortWithoutDots[m.month()]; + } else { + return monthsShortWithDots[m.month()]; + } + }, + monthsParseExact: true, + weekdays: 'snein_moandei_tiisdei_woansdei_tongersdei_freed_sneon'.split( + '_' + ), + weekdaysShort: 'si._mo._ti._wo._to._fr._so.'.split('_'), + weekdaysMin: 'Si_Mo_Ti_Wo_To_Fr_So'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD-MM-YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[hjoed om] LT', + nextDay: '[moarn om] LT', + nextWeek: 'dddd [om] LT', + lastDay: '[juster om] LT', + lastWeek: '[ôfrûne] dddd [om] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'oer %s', + past: '%s lyn', + s: 'in pear sekonden', + ss: '%d sekonden', + m: 'ien minút', + mm: '%d minuten', + h: 'ien oere', + hh: '%d oeren', + d: 'ien dei', + dd: '%d dagen', + M: 'ien moanne', + MM: '%d moannen', + y: 'ien jier', + yy: '%d jierren', + }, + dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/, + ordinal: function (number) { + return ( + number + + (number === 1 || number === 8 || number >= 20 ? 'ste' : 'de') + ); + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var months$6 = [ + 'Eanáir', + 'Feabhra', + 'Márta', + 'Aibreán', + 'Bealtaine', + 'Meitheamh', + 'Iúil', + 'Lúnasa', + 'Meán Fómhair', + 'Deireadh Fómhair', + 'Samhain', + 'Nollaig', + ], + monthsShort$4 = [ + 'Ean', + 'Feabh', + 'Márt', + 'Aib', + 'Beal', + 'Meith', + 'Iúil', + 'Lún', + 'M.F.', + 'D.F.', + 'Samh', + 'Noll', + ], + weekdays$1 = [ + 'Dé Domhnaigh', + 'Dé Luain', + 'Dé Máirt', + 'Dé Céadaoin', + 'Déardaoin', + 'Dé hAoine', + 'Dé Sathairn', + ], + weekdaysShort = ['Domh', 'Luan', 'Máirt', 'Céad', 'Déar', 'Aoine', 'Sath'], + weekdaysMin = ['Do', 'Lu', 'Má', 'Cé', 'Dé', 'A', 'Sa']; + + hooks.defineLocale('ga', { + months: months$6, + monthsShort: monthsShort$4, + monthsParseExact: true, + weekdays: weekdays$1, + weekdaysShort: weekdaysShort, + weekdaysMin: weekdaysMin, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[Inniu ag] LT', + nextDay: '[Amárach ag] LT', + nextWeek: 'dddd [ag] LT', + lastDay: '[Inné ag] LT', + lastWeek: 'dddd [seo caite] [ag] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'i %s', + past: '%s ó shin', + s: 'cúpla soicind', + ss: '%d soicind', + m: 'nóiméad', + mm: '%d nóiméad', + h: 'uair an chloig', + hh: '%d uair an chloig', + d: 'lá', + dd: '%d lá', + M: 'mí', + MM: '%d míonna', + y: 'bliain', + yy: '%d bliain', + }, + dayOfMonthOrdinalParse: /\d{1,2}(d|na|mh)/, + ordinal: function (number) { + var output = number === 1 ? 'd' : number % 10 === 2 ? 'na' : 'mh'; + return number + output; + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var months$7 = [ + 'Am Faoilleach', + 'An Gearran', + 'Am Màrt', + 'An Giblean', + 'An Cèitean', + 'An t-Ògmhios', + 'An t-Iuchar', + 'An Lùnastal', + 'An t-Sultain', + 'An Dàmhair', + 'An t-Samhain', + 'An Dùbhlachd', + ], + monthsShort$5 = [ + 'Faoi', + 'Gear', + 'Màrt', + 'Gibl', + 'Cèit', + 'Ògmh', + 'Iuch', + 'Lùn', + 'Sult', + 'Dàmh', + 'Samh', + 'Dùbh', + ], + weekdays$2 = [ + 'Didòmhnaich', + 'Diluain', + 'Dimàirt', + 'Diciadain', + 'Diardaoin', + 'Dihaoine', + 'Disathairne', + ], + weekdaysShort$1 = ['Did', 'Dil', 'Dim', 'Dic', 'Dia', 'Dih', 'Dis'], + weekdaysMin$1 = ['Dò', 'Lu', 'Mà', 'Ci', 'Ar', 'Ha', 'Sa']; + + hooks.defineLocale('gd', { + months: months$7, + monthsShort: monthsShort$5, + monthsParseExact: true, + weekdays: weekdays$2, + weekdaysShort: weekdaysShort$1, + weekdaysMin: weekdaysMin$1, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[An-diugh aig] LT', + nextDay: '[A-màireach aig] LT', + nextWeek: 'dddd [aig] LT', + lastDay: '[An-dè aig] LT', + lastWeek: 'dddd [seo chaidh] [aig] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'ann an %s', + past: 'bho chionn %s', + s: 'beagan diogan', + ss: '%d diogan', + m: 'mionaid', + mm: '%d mionaidean', + h: 'uair', + hh: '%d uairean', + d: 'latha', + dd: '%d latha', + M: 'mìos', + MM: '%d mìosan', + y: 'bliadhna', + yy: '%d bliadhna', + }, + dayOfMonthOrdinalParse: /\d{1,2}(d|na|mh)/, + ordinal: function (number) { + var output = number === 1 ? 'd' : number % 10 === 2 ? 'na' : 'mh'; + return number + output; + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + hooks.defineLocale('gl', { + months: 'xaneiro_febreiro_marzo_abril_maio_xuño_xullo_agosto_setembro_outubro_novembro_decembro'.split( + '_' + ), + monthsShort: 'xan._feb._mar._abr._mai._xuñ._xul._ago._set._out._nov._dec.'.split( + '_' + ), + monthsParseExact: true, + weekdays: 'domingo_luns_martes_mércores_xoves_venres_sábado'.split('_'), + weekdaysShort: 'dom._lun._mar._mér._xov._ven._sáb.'.split('_'), + weekdaysMin: 'do_lu_ma_mé_xo_ve_sá'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'H:mm', + LTS: 'H:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D [de] MMMM [de] YYYY', + LLL: 'D [de] MMMM [de] YYYY H:mm', + LLLL: 'dddd, D [de] MMMM [de] YYYY H:mm', + }, + calendar: { + sameDay: function () { + return '[hoxe ' + (this.hours() !== 1 ? 'ás' : 'á') + '] LT'; + }, + nextDay: function () { + return '[mañá ' + (this.hours() !== 1 ? 'ás' : 'á') + '] LT'; + }, + nextWeek: function () { + return 'dddd [' + (this.hours() !== 1 ? 'ás' : 'a') + '] LT'; + }, + lastDay: function () { + return '[onte ' + (this.hours() !== 1 ? 'á' : 'a') + '] LT'; + }, + lastWeek: function () { + return ( + '[o] dddd [pasado ' + (this.hours() !== 1 ? 'ás' : 'a') + '] LT' + ); + }, + sameElse: 'L', + }, + relativeTime: { + future: function (str) { + if (str.indexOf('un') === 0) { + return 'n' + str; + } + return 'en ' + str; + }, + past: 'hai %s', + s: 'uns segundos', + ss: '%d segundos', + m: 'un minuto', + mm: '%d minutos', + h: 'unha hora', + hh: '%d horas', + d: 'un día', + dd: '%d días', + M: 'un mes', + MM: '%d meses', + y: 'un ano', + yy: '%d anos', + }, + dayOfMonthOrdinalParse: /\d{1,2}º/, + ordinal: '%dº', + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + function processRelativeTime$4(number, withoutSuffix, key, isFuture) { + var format = { + s: ['थोडया सॅकंडांनी', 'थोडे सॅकंड'], + ss: [number + ' सॅकंडांनी', number + ' सॅकंड'], + m: ['एका मिणटान', 'एक मिनूट'], + mm: [number + ' मिणटांनी', number + ' मिणटां'], + h: ['एका वरान', 'एक वर'], + hh: [number + ' वरांनी', number + ' वरां'], + d: ['एका दिसान', 'एक दीस'], + dd: [number + ' दिसांनी', number + ' दीस'], + M: ['एका म्हयन्यान', 'एक म्हयनो'], + MM: [number + ' म्हयन्यानी', number + ' म्हयने'], + y: ['एका वर्सान', 'एक वर्स'], + yy: [number + ' वर्सांनी', number + ' वर्सां'], + }; + return isFuture ? format[key][0] : format[key][1]; + } + + hooks.defineLocale('gom-deva', { + months: { + standalone: 'जानेवारी_फेब्रुवारी_मार्च_एप्रील_मे_जून_जुलय_ऑगस्ट_सप्टेंबर_ऑक्टोबर_नोव्हेंबर_डिसेंबर'.split( + '_' + ), + format: 'जानेवारीच्या_फेब्रुवारीच्या_मार्चाच्या_एप्रीलाच्या_मेयाच्या_जूनाच्या_जुलयाच्या_ऑगस्टाच्या_सप्टेंबराच्या_ऑक्टोबराच्या_नोव्हेंबराच्या_डिसेंबराच्या'.split( + '_' + ), + isFormat: /MMMM(\s)+D[oD]?/, + }, + monthsShort: 'जाने._फेब्रु._मार्च_एप्री._मे_जून_जुल._ऑग._सप्टें._ऑक्टो._नोव्हें._डिसें.'.split( + '_' + ), + monthsParseExact: true, + weekdays: 'आयतार_सोमार_मंगळार_बुधवार_बिरेस्तार_सुक्रार_शेनवार'.split('_'), + weekdaysShort: 'आयत._सोम._मंगळ._बुध._ब्रेस्त._सुक्र._शेन.'.split('_'), + weekdaysMin: 'आ_सो_मं_बु_ब्रे_सु_शे'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'A h:mm [वाजतां]', + LTS: 'A h:mm:ss [वाजतां]', + L: 'DD-MM-YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY A h:mm [वाजतां]', + LLLL: 'dddd, MMMM Do, YYYY, A h:mm [वाजतां]', + llll: 'ddd, D MMM YYYY, A h:mm [वाजतां]', + }, + calendar: { + sameDay: '[आयज] LT', + nextDay: '[फाल्यां] LT', + nextWeek: '[फुडलो] dddd[,] LT', + lastDay: '[काल] LT', + lastWeek: '[फाटलो] dddd[,] LT', + sameElse: 'L', + }, + relativeTime: { + future: '%s', + past: '%s आदीं', + s: processRelativeTime$4, + ss: processRelativeTime$4, + m: processRelativeTime$4, + mm: processRelativeTime$4, + h: processRelativeTime$4, + hh: processRelativeTime$4, + d: processRelativeTime$4, + dd: processRelativeTime$4, + M: processRelativeTime$4, + MM: processRelativeTime$4, + y: processRelativeTime$4, + yy: processRelativeTime$4, + }, + dayOfMonthOrdinalParse: /\d{1,2}(वेर)/, + ordinal: function (number, period) { + switch (period) { + // the ordinal 'वेर' only applies to day of the month + case 'D': + return number + 'वेर'; + default: + case 'M': + case 'Q': + case 'DDD': + case 'd': + case 'w': + case 'W': + return number; + } + }, + week: { + dow: 0, // Sunday is the first day of the week + doy: 3, // The week that contains Jan 4th is the first week of the year (7 + 0 - 4) + }, + meridiemParse: /राती|सकाळीं|दनपारां|सांजे/, + meridiemHour: function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === 'राती') { + return hour < 4 ? hour : hour + 12; + } else if (meridiem === 'सकाळीं') { + return hour; + } else if (meridiem === 'दनपारां') { + return hour > 12 ? hour : hour + 12; + } else if (meridiem === 'सांजे') { + return hour + 12; + } + }, + meridiem: function (hour, minute, isLower) { + if (hour < 4) { + return 'राती'; + } else if (hour < 12) { + return 'सकाळीं'; + } else if (hour < 16) { + return 'दनपारां'; + } else if (hour < 20) { + return 'सांजे'; + } else { + return 'राती'; + } + }, + }); + + //! moment.js locale configuration + + function processRelativeTime$5(number, withoutSuffix, key, isFuture) { + var format = { + s: ['thoddea sekondamni', 'thodde sekond'], + ss: [number + ' sekondamni', number + ' sekond'], + m: ['eka mintan', 'ek minut'], + mm: [number + ' mintamni', number + ' mintam'], + h: ['eka voran', 'ek vor'], + hh: [number + ' voramni', number + ' voram'], + d: ['eka disan', 'ek dis'], + dd: [number + ' disamni', number + ' dis'], + M: ['eka mhoinean', 'ek mhoino'], + MM: [number + ' mhoineamni', number + ' mhoine'], + y: ['eka vorsan', 'ek voros'], + yy: [number + ' vorsamni', number + ' vorsam'], + }; + return isFuture ? format[key][0] : format[key][1]; + } + + hooks.defineLocale('gom-latn', { + months: { + standalone: 'Janer_Febrer_Mars_Abril_Mai_Jun_Julai_Agost_Setembr_Otubr_Novembr_Dezembr'.split( + '_' + ), + format: 'Janerachea_Febrerachea_Marsachea_Abrilachea_Maiachea_Junachea_Julaiachea_Agostachea_Setembrachea_Otubrachea_Novembrachea_Dezembrachea'.split( + '_' + ), + isFormat: /MMMM(\s)+D[oD]?/, + }, + monthsShort: 'Jan._Feb._Mars_Abr._Mai_Jun_Jul._Ago._Set._Otu._Nov._Dez.'.split( + '_' + ), + monthsParseExact: true, + weekdays: "Aitar_Somar_Mongllar_Budhvar_Birestar_Sukrar_Son'var".split('_'), + weekdaysShort: 'Ait._Som._Mon._Bud._Bre._Suk._Son.'.split('_'), + weekdaysMin: 'Ai_Sm_Mo_Bu_Br_Su_Sn'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'A h:mm [vazta]', + LTS: 'A h:mm:ss [vazta]', + L: 'DD-MM-YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY A h:mm [vazta]', + LLLL: 'dddd, MMMM Do, YYYY, A h:mm [vazta]', + llll: 'ddd, D MMM YYYY, A h:mm [vazta]', + }, + calendar: { + sameDay: '[Aiz] LT', + nextDay: '[Faleam] LT', + nextWeek: '[Fuddlo] dddd[,] LT', + lastDay: '[Kal] LT', + lastWeek: '[Fattlo] dddd[,] LT', + sameElse: 'L', + }, + relativeTime: { + future: '%s', + past: '%s adim', + s: processRelativeTime$5, + ss: processRelativeTime$5, + m: processRelativeTime$5, + mm: processRelativeTime$5, + h: processRelativeTime$5, + hh: processRelativeTime$5, + d: processRelativeTime$5, + dd: processRelativeTime$5, + M: processRelativeTime$5, + MM: processRelativeTime$5, + y: processRelativeTime$5, + yy: processRelativeTime$5, + }, + dayOfMonthOrdinalParse: /\d{1,2}(er)/, + ordinal: function (number, period) { + switch (period) { + // the ordinal 'er' only applies to day of the month + case 'D': + return number + 'er'; + default: + case 'M': + case 'Q': + case 'DDD': + case 'd': + case 'w': + case 'W': + return number; + } + }, + week: { + dow: 0, // Sunday is the first day of the week + doy: 3, // The week that contains Jan 4th is the first week of the year (7 + 0 - 4) + }, + meridiemParse: /rati|sokallim|donparam|sanje/, + meridiemHour: function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === 'rati') { + return hour < 4 ? hour : hour + 12; + } else if (meridiem === 'sokallim') { + return hour; + } else if (meridiem === 'donparam') { + return hour > 12 ? hour : hour + 12; + } else if (meridiem === 'sanje') { + return hour + 12; + } + }, + meridiem: function (hour, minute, isLower) { + if (hour < 4) { + return 'rati'; + } else if (hour < 12) { + return 'sokallim'; + } else if (hour < 16) { + return 'donparam'; + } else if (hour < 20) { + return 'sanje'; + } else { + return 'rati'; + } + }, + }); + + //! moment.js locale configuration + + var symbolMap$6 = { + '1': '૧', + '2': '૨', + '3': '૩', + '4': '૪', + '5': '૫', + '6': '૬', + '7': '૭', + '8': '૮', + '9': '૯', + '0': '૦', + }, + numberMap$5 = { + '૧': '1', + '૨': '2', + '૩': '3', + '૪': '4', + '૫': '5', + '૬': '6', + '૭': '7', + '૮': '8', + '૯': '9', + '૦': '0', + }; + + hooks.defineLocale('gu', { + months: 'જાન્યુઆરી_ફેબ્રુઆરી_માર્ચ_એપ્રિલ_મે_જૂન_જુલાઈ_ઑગસ્ટ_સપ્ટેમ્બર_ઑક્ટ્બર_નવેમ્બર_ડિસેમ્બર'.split( + '_' + ), + monthsShort: 'જાન્યુ._ફેબ્રુ._માર્ચ_એપ્રિ._મે_જૂન_જુલા._ઑગ._સપ્ટે._ઑક્ટ્._નવે._ડિસે.'.split( + '_' + ), + monthsParseExact: true, + weekdays: 'રવિવાર_સોમવાર_મંગળવાર_બુધ્વાર_ગુરુવાર_શુક્રવાર_શનિવાર'.split( + '_' + ), + weekdaysShort: 'રવિ_સોમ_મંગળ_બુધ્_ગુરુ_શુક્ર_શનિ'.split('_'), + weekdaysMin: 'ર_સો_મં_બુ_ગુ_શુ_શ'.split('_'), + longDateFormat: { + LT: 'A h:mm વાગ્યે', + LTS: 'A h:mm:ss વાગ્યે', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY, A h:mm વાગ્યે', + LLLL: 'dddd, D MMMM YYYY, A h:mm વાગ્યે', + }, + calendar: { + sameDay: '[આજ] LT', + nextDay: '[કાલે] LT', + nextWeek: 'dddd, LT', + lastDay: '[ગઇકાલે] LT', + lastWeek: '[પાછલા] dddd, LT', + sameElse: 'L', + }, + relativeTime: { + future: '%s મા', + past: '%s પહેલા', + s: 'અમુક પળો', + ss: '%d સેકંડ', + m: 'એક મિનિટ', + mm: '%d મિનિટ', + h: 'એક કલાક', + hh: '%d કલાક', + d: 'એક દિવસ', + dd: '%d દિવસ', + M: 'એક મહિનો', + MM: '%d મહિનો', + y: 'એક વર્ષ', + yy: '%d વર્ષ', + }, + preparse: function (string) { + return string.replace(/[૧૨૩૪૫૬૭૮૯૦]/g, function (match) { + return numberMap$5[match]; + }); + }, + postformat: function (string) { + return string.replace(/\d/g, function (match) { + return symbolMap$6[match]; + }); + }, + // Gujarati notation for meridiems are quite fuzzy in practice. While there exists + // a rigid notion of a 'Pahar' it is not used as rigidly in modern Gujarati. + meridiemParse: /રાત|બપોર|સવાર|સાંજ/, + meridiemHour: function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === 'રાત') { + return hour < 4 ? hour : hour + 12; + } else if (meridiem === 'સવાર') { + return hour; + } else if (meridiem === 'બપોર') { + return hour >= 10 ? hour : hour + 12; + } else if (meridiem === 'સાંજ') { + return hour + 12; + } + }, + meridiem: function (hour, minute, isLower) { + if (hour < 4) { + return 'રાત'; + } else if (hour < 10) { + return 'સવાર'; + } else if (hour < 17) { + return 'બપોર'; + } else if (hour < 20) { + return 'સાંજ'; + } else { + return 'રાત'; + } + }, + week: { + dow: 0, // Sunday is the first day of the week. + doy: 6, // The week that contains Jan 6th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + hooks.defineLocale('he', { + months: 'ינואר_פברואר_מרץ_אפריל_מאי_יוני_יולי_אוגוסט_ספטמבר_אוקטובר_נובמבר_דצמבר'.split( + '_' + ), + monthsShort: 'ינו׳_פבר׳_מרץ_אפר׳_מאי_יוני_יולי_אוג׳_ספט׳_אוק׳_נוב׳_דצמ׳'.split( + '_' + ), + weekdays: 'ראשון_שני_שלישי_רביעי_חמישי_שישי_שבת'.split('_'), + weekdaysShort: 'א׳_ב׳_ג׳_ד׳_ה׳_ו׳_ש׳'.split('_'), + weekdaysMin: 'א_ב_ג_ד_ה_ו_ש'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D [ב]MMMM YYYY', + LLL: 'D [ב]MMMM YYYY HH:mm', + LLLL: 'dddd, D [ב]MMMM YYYY HH:mm', + l: 'D/M/YYYY', + ll: 'D MMM YYYY', + lll: 'D MMM YYYY HH:mm', + llll: 'ddd, D MMM YYYY HH:mm', + }, + calendar: { + sameDay: '[היום ב־]LT', + nextDay: '[מחר ב־]LT', + nextWeek: 'dddd [בשעה] LT', + lastDay: '[אתמול ב־]LT', + lastWeek: '[ביום] dddd [האחרון בשעה] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'בעוד %s', + past: 'לפני %s', + s: 'מספר שניות', + ss: '%d שניות', + m: 'דקה', + mm: '%d דקות', + h: 'שעה', + hh: function (number) { + if (number === 2) { + return 'שעתיים'; + } + return number + ' שעות'; + }, + d: 'יום', + dd: function (number) { + if (number === 2) { + return 'יומיים'; + } + return number + ' ימים'; + }, + M: 'חודש', + MM: function (number) { + if (number === 2) { + return 'חודשיים'; + } + return number + ' חודשים'; + }, + y: 'שנה', + yy: function (number) { + if (number === 2) { + return 'שנתיים'; + } else if (number % 10 === 0 && number !== 10) { + return number + ' שנה'; + } + return number + ' שנים'; + }, + }, + meridiemParse: /אחה"צ|לפנה"צ|אחרי הצהריים|לפני הצהריים|לפנות בוקר|בבוקר|בערב/i, + isPM: function (input) { + return /^(אחה"צ|אחרי הצהריים|בערב)$/.test(input); + }, + meridiem: function (hour, minute, isLower) { + if (hour < 5) { + return 'לפנות בוקר'; + } else if (hour < 10) { + return 'בבוקר'; + } else if (hour < 12) { + return isLower ? 'לפנה"צ' : 'לפני הצהריים'; + } else if (hour < 18) { + return isLower ? 'אחה"צ' : 'אחרי הצהריים'; + } else { + return 'בערב'; + } + }, + }); + + //! moment.js locale configuration + + var symbolMap$7 = { + '1': '१', + '2': '२', + '3': '३', + '4': '४', + '5': '५', + '6': '६', + '7': '७', + '8': '८', + '9': '९', + '0': '०', + }, + numberMap$6 = { + '१': '1', + '२': '2', + '३': '3', + '४': '4', + '५': '5', + '६': '6', + '७': '7', + '८': '8', + '९': '9', + '०': '0', + }; + + hooks.defineLocale('hi', { + months: 'जनवरी_फ़रवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितम्बर_अक्टूबर_नवम्बर_दिसम्बर'.split( + '_' + ), + monthsShort: 'जन._फ़र._मार्च_अप्रै._मई_जून_जुल._अग._सित._अक्टू._नव._दिस.'.split( + '_' + ), + monthsParseExact: true, + weekdays: 'रविवार_सोमवार_मंगलवार_बुधवार_गुरूवार_शुक्रवार_शनिवार'.split('_'), + weekdaysShort: 'रवि_सोम_मंगल_बुध_गुरू_शुक्र_शनि'.split('_'), + weekdaysMin: 'र_सो_मं_बु_गु_शु_श'.split('_'), + longDateFormat: { + LT: 'A h:mm बजे', + LTS: 'A h:mm:ss बजे', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY, A h:mm बजे', + LLLL: 'dddd, D MMMM YYYY, A h:mm बजे', + }, + calendar: { + sameDay: '[आज] LT', + nextDay: '[कल] LT', + nextWeek: 'dddd, LT', + lastDay: '[कल] LT', + lastWeek: '[पिछले] dddd, LT', + sameElse: 'L', + }, + relativeTime: { + future: '%s में', + past: '%s पहले', + s: 'कुछ ही क्षण', + ss: '%d सेकंड', + m: 'एक मिनट', + mm: '%d मिनट', + h: 'एक घंटा', + hh: '%d घंटे', + d: 'एक दिन', + dd: '%d दिन', + M: 'एक महीने', + MM: '%d महीने', + y: 'एक वर्ष', + yy: '%d वर्ष', + }, + preparse: function (string) { + return string.replace(/[१२३४५६७८९०]/g, function (match) { + return numberMap$6[match]; + }); + }, + postformat: function (string) { + return string.replace(/\d/g, function (match) { + return symbolMap$7[match]; + }); + }, + // Hindi notation for meridiems are quite fuzzy in practice. While there exists + // a rigid notion of a 'Pahar' it is not used as rigidly in modern Hindi. + meridiemParse: /रात|सुबह|दोपहर|शाम/, + meridiemHour: function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === 'रात') { + return hour < 4 ? hour : hour + 12; + } else if (meridiem === 'सुबह') { + return hour; + } else if (meridiem === 'दोपहर') { + return hour >= 10 ? hour : hour + 12; + } else if (meridiem === 'शाम') { + return hour + 12; + } + }, + meridiem: function (hour, minute, isLower) { + if (hour < 4) { + return 'रात'; + } else if (hour < 10) { + return 'सुबह'; + } else if (hour < 17) { + return 'दोपहर'; + } else if (hour < 20) { + return 'शाम'; + } else { + return 'रात'; + } + }, + week: { + dow: 0, // Sunday is the first day of the week. + doy: 6, // The week that contains Jan 6th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + function translate$3(number, withoutSuffix, key) { + var result = number + ' '; + switch (key) { + case 'ss': + if (number === 1) { + result += 'sekunda'; + } else if (number === 2 || number === 3 || number === 4) { + result += 'sekunde'; + } else { + result += 'sekundi'; + } + return result; + case 'm': + return withoutSuffix ? 'jedna minuta' : 'jedne minute'; + case 'mm': + if (number === 1) { + result += 'minuta'; + } else if (number === 2 || number === 3 || number === 4) { + result += 'minute'; + } else { + result += 'minuta'; + } + return result; + case 'h': + return withoutSuffix ? 'jedan sat' : 'jednog sata'; + case 'hh': + if (number === 1) { + result += 'sat'; + } else if (number === 2 || number === 3 || number === 4) { + result += 'sata'; + } else { + result += 'sati'; + } + return result; + case 'dd': + if (number === 1) { + result += 'dan'; + } else { + result += 'dana'; + } + return result; + case 'MM': + if (number === 1) { + result += 'mjesec'; + } else if (number === 2 || number === 3 || number === 4) { + result += 'mjeseca'; + } else { + result += 'mjeseci'; + } + return result; + case 'yy': + if (number === 1) { + result += 'godina'; + } else if (number === 2 || number === 3 || number === 4) { + result += 'godine'; + } else { + result += 'godina'; + } + return result; + } + } + + hooks.defineLocale('hr', { + months: { + format: 'siječnja_veljače_ožujka_travnja_svibnja_lipnja_srpnja_kolovoza_rujna_listopada_studenoga_prosinca'.split( + '_' + ), + standalone: 'siječanj_veljača_ožujak_travanj_svibanj_lipanj_srpanj_kolovoz_rujan_listopad_studeni_prosinac'.split( + '_' + ), + }, + monthsShort: 'sij._velj._ožu._tra._svi._lip._srp._kol._ruj._lis._stu._pro.'.split( + '_' + ), + monthsParseExact: true, + weekdays: 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split( + '_' + ), + weekdaysShort: 'ned._pon._uto._sri._čet._pet._sub.'.split('_'), + weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'H:mm', + LTS: 'H:mm:ss', + L: 'DD.MM.YYYY', + LL: 'Do MMMM YYYY', + LLL: 'Do MMMM YYYY H:mm', + LLLL: 'dddd, Do MMMM YYYY H:mm', + }, + calendar: { + sameDay: '[danas u] LT', + nextDay: '[sutra u] LT', + nextWeek: function () { + switch (this.day()) { + case 0: + return '[u] [nedjelju] [u] LT'; + case 3: + return '[u] [srijedu] [u] LT'; + case 6: + return '[u] [subotu] [u] LT'; + case 1: + case 2: + case 4: + case 5: + return '[u] dddd [u] LT'; + } + }, + lastDay: '[jučer u] LT', + lastWeek: function () { + switch (this.day()) { + case 0: + return '[prošlu] [nedjelju] [u] LT'; + case 3: + return '[prošlu] [srijedu] [u] LT'; + case 6: + return '[prošle] [subote] [u] LT'; + case 1: + case 2: + case 4: + case 5: + return '[prošli] dddd [u] LT'; + } + }, + sameElse: 'L', + }, + relativeTime: { + future: 'za %s', + past: 'prije %s', + s: 'par sekundi', + ss: translate$3, + m: translate$3, + mm: translate$3, + h: translate$3, + hh: translate$3, + d: 'dan', + dd: translate$3, + M: 'mjesec', + MM: translate$3, + y: 'godinu', + yy: translate$3, + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal: '%d.', + week: { + dow: 1, // Monday is the first day of the week. + doy: 7, // The week that contains Jan 7th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var weekEndings = 'vasárnap hétfőn kedden szerdán csütörtökön pénteken szombaton'.split( + ' ' + ); + function translate$4(number, withoutSuffix, key, isFuture) { + var num = number; + switch (key) { + case 's': + return isFuture || withoutSuffix + ? 'néhány másodperc' + : 'néhány másodperce'; + case 'ss': + return num + (isFuture || withoutSuffix) + ? ' másodperc' + : ' másodperce'; + case 'm': + return 'egy' + (isFuture || withoutSuffix ? ' perc' : ' perce'); + case 'mm': + return num + (isFuture || withoutSuffix ? ' perc' : ' perce'); + case 'h': + return 'egy' + (isFuture || withoutSuffix ? ' óra' : ' órája'); + case 'hh': + return num + (isFuture || withoutSuffix ? ' óra' : ' órája'); + case 'd': + return 'egy' + (isFuture || withoutSuffix ? ' nap' : ' napja'); + case 'dd': + return num + (isFuture || withoutSuffix ? ' nap' : ' napja'); + case 'M': + return 'egy' + (isFuture || withoutSuffix ? ' hónap' : ' hónapja'); + case 'MM': + return num + (isFuture || withoutSuffix ? ' hónap' : ' hónapja'); + case 'y': + return 'egy' + (isFuture || withoutSuffix ? ' év' : ' éve'); + case 'yy': + return num + (isFuture || withoutSuffix ? ' év' : ' éve'); + } + return ''; + } + function week(isFuture) { + return ( + (isFuture ? '' : '[múlt] ') + + '[' + + weekEndings[this.day()] + + '] LT[-kor]' + ); + } + + hooks.defineLocale('hu', { + months: 'január_február_március_április_május_június_július_augusztus_szeptember_október_november_december'.split( + '_' + ), + monthsShort: 'jan_feb_márc_ápr_máj_jún_júl_aug_szept_okt_nov_dec'.split( + '_' + ), + weekdays: 'vasárnap_hétfő_kedd_szerda_csütörtök_péntek_szombat'.split('_'), + weekdaysShort: 'vas_hét_kedd_sze_csüt_pén_szo'.split('_'), + weekdaysMin: 'v_h_k_sze_cs_p_szo'.split('_'), + longDateFormat: { + LT: 'H:mm', + LTS: 'H:mm:ss', + L: 'YYYY.MM.DD.', + LL: 'YYYY. MMMM D.', + LLL: 'YYYY. MMMM D. H:mm', + LLLL: 'YYYY. MMMM D., dddd H:mm', + }, + meridiemParse: /de|du/i, + isPM: function (input) { + return input.charAt(1).toLowerCase() === 'u'; + }, + meridiem: function (hours, minutes, isLower) { + if (hours < 12) { + return isLower === true ? 'de' : 'DE'; + } else { + return isLower === true ? 'du' : 'DU'; + } + }, + calendar: { + sameDay: '[ma] LT[-kor]', + nextDay: '[holnap] LT[-kor]', + nextWeek: function () { + return week.call(this, true); + }, + lastDay: '[tegnap] LT[-kor]', + lastWeek: function () { + return week.call(this, false); + }, + sameElse: 'L', + }, + relativeTime: { + future: '%s múlva', + past: '%s', + s: translate$4, + ss: translate$4, + m: translate$4, + mm: translate$4, + h: translate$4, + hh: translate$4, + d: translate$4, + dd: translate$4, + M: translate$4, + MM: translate$4, + y: translate$4, + yy: translate$4, + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal: '%d.', + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + hooks.defineLocale('hy-am', { + months: { + format: 'հունվարի_փետրվարի_մարտի_ապրիլի_մայիսի_հունիսի_հուլիսի_օգոստոսի_սեպտեմբերի_հոկտեմբերի_նոյեմբերի_դեկտեմբերի'.split( + '_' + ), + standalone: 'հունվար_փետրվար_մարտ_ապրիլ_մայիս_հունիս_հուլիս_օգոստոս_սեպտեմբեր_հոկտեմբեր_նոյեմբեր_դեկտեմբեր'.split( + '_' + ), + }, + monthsShort: 'հնվ_փտր_մրտ_ապր_մյս_հնս_հլս_օգս_սպտ_հկտ_նմբ_դկտ'.split('_'), + weekdays: 'կիրակի_երկուշաբթի_երեքշաբթի_չորեքշաբթի_հինգշաբթի_ուրբաթ_շաբաթ'.split( + '_' + ), + weekdaysShort: 'կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ'.split('_'), + weekdaysMin: 'կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D MMMM YYYY թ.', + LLL: 'D MMMM YYYY թ., HH:mm', + LLLL: 'dddd, D MMMM YYYY թ., HH:mm', + }, + calendar: { + sameDay: '[այսօր] LT', + nextDay: '[վաղը] LT', + lastDay: '[երեկ] LT', + nextWeek: function () { + return 'dddd [օրը ժամը] LT'; + }, + lastWeek: function () { + return '[անցած] dddd [օրը ժամը] LT'; + }, + sameElse: 'L', + }, + relativeTime: { + future: '%s հետո', + past: '%s առաջ', + s: 'մի քանի վայրկյան', + ss: '%d վայրկյան', + m: 'րոպե', + mm: '%d րոպե', + h: 'ժամ', + hh: '%d ժամ', + d: 'օր', + dd: '%d օր', + M: 'ամիս', + MM: '%d ամիս', + y: 'տարի', + yy: '%d տարի', + }, + meridiemParse: /գիշերվա|առավոտվա|ցերեկվա|երեկոյան/, + isPM: function (input) { + return /^(ցերեկվա|երեկոյան)$/.test(input); + }, + meridiem: function (hour) { + if (hour < 4) { + return 'գիշերվա'; + } else if (hour < 12) { + return 'առավոտվա'; + } else if (hour < 17) { + return 'ցերեկվա'; + } else { + return 'երեկոյան'; + } + }, + dayOfMonthOrdinalParse: /\d{1,2}|\d{1,2}-(ին|րդ)/, + ordinal: function (number, period) { + switch (period) { + case 'DDD': + case 'w': + case 'W': + case 'DDDo': + if (number === 1) { + return number + '-ին'; + } + return number + '-րդ'; + default: + return number; + } + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 7, // The week that contains Jan 7th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + hooks.defineLocale('id', { + months: 'Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_November_Desember'.split( + '_' + ), + monthsShort: 'Jan_Feb_Mar_Apr_Mei_Jun_Jul_Agt_Sep_Okt_Nov_Des'.split('_'), + weekdays: 'Minggu_Senin_Selasa_Rabu_Kamis_Jumat_Sabtu'.split('_'), + weekdaysShort: 'Min_Sen_Sel_Rab_Kam_Jum_Sab'.split('_'), + weekdaysMin: 'Mg_Sn_Sl_Rb_Km_Jm_Sb'.split('_'), + longDateFormat: { + LT: 'HH.mm', + LTS: 'HH.mm.ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY [pukul] HH.mm', + LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm', + }, + meridiemParse: /pagi|siang|sore|malam/, + meridiemHour: function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === 'pagi') { + return hour; + } else if (meridiem === 'siang') { + return hour >= 11 ? hour : hour + 12; + } else if (meridiem === 'sore' || meridiem === 'malam') { + return hour + 12; + } + }, + meridiem: function (hours, minutes, isLower) { + if (hours < 11) { + return 'pagi'; + } else if (hours < 15) { + return 'siang'; + } else if (hours < 19) { + return 'sore'; + } else { + return 'malam'; + } + }, + calendar: { + sameDay: '[Hari ini pukul] LT', + nextDay: '[Besok pukul] LT', + nextWeek: 'dddd [pukul] LT', + lastDay: '[Kemarin pukul] LT', + lastWeek: 'dddd [lalu pukul] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'dalam %s', + past: '%s yang lalu', + s: 'beberapa detik', + ss: '%d detik', + m: 'semenit', + mm: '%d menit', + h: 'sejam', + hh: '%d jam', + d: 'sehari', + dd: '%d hari', + M: 'sebulan', + MM: '%d bulan', + y: 'setahun', + yy: '%d tahun', + }, + week: { + dow: 0, // Sunday is the first day of the week. + doy: 6, // The week that contains Jan 6th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + function plural$2(n) { + if (n % 100 === 11) { + return true; + } else if (n % 10 === 1) { + return false; + } + return true; + } + function translate$5(number, withoutSuffix, key, isFuture) { + var result = number + ' '; + switch (key) { + case 's': + return withoutSuffix || isFuture + ? 'nokkrar sekúndur' + : 'nokkrum sekúndum'; + case 'ss': + if (plural$2(number)) { + return ( + result + + (withoutSuffix || isFuture ? 'sekúndur' : 'sekúndum') + ); + } + return result + 'sekúnda'; + case 'm': + return withoutSuffix ? 'mínúta' : 'mínútu'; + case 'mm': + if (plural$2(number)) { + return ( + result + (withoutSuffix || isFuture ? 'mínútur' : 'mínútum') + ); + } else if (withoutSuffix) { + return result + 'mínúta'; + } + return result + 'mínútu'; + case 'hh': + if (plural$2(number)) { + return ( + result + + (withoutSuffix || isFuture + ? 'klukkustundir' + : 'klukkustundum') + ); + } + return result + 'klukkustund'; + case 'd': + if (withoutSuffix) { + return 'dagur'; + } + return isFuture ? 'dag' : 'degi'; + case 'dd': + if (plural$2(number)) { + if (withoutSuffix) { + return result + 'dagar'; + } + return result + (isFuture ? 'daga' : 'dögum'); + } else if (withoutSuffix) { + return result + 'dagur'; + } + return result + (isFuture ? 'dag' : 'degi'); + case 'M': + if (withoutSuffix) { + return 'mánuður'; + } + return isFuture ? 'mánuð' : 'mánuði'; + case 'MM': + if (plural$2(number)) { + if (withoutSuffix) { + return result + 'mánuðir'; + } + return result + (isFuture ? 'mánuði' : 'mánuðum'); + } else if (withoutSuffix) { + return result + 'mánuður'; + } + return result + (isFuture ? 'mánuð' : 'mánuði'); + case 'y': + return withoutSuffix || isFuture ? 'ár' : 'ári'; + case 'yy': + if (plural$2(number)) { + return result + (withoutSuffix || isFuture ? 'ár' : 'árum'); + } + return result + (withoutSuffix || isFuture ? 'ár' : 'ári'); + } + } + + hooks.defineLocale('is', { + months: 'janúar_febrúar_mars_apríl_maí_júní_júlí_ágúst_september_október_nóvember_desember'.split( + '_' + ), + monthsShort: 'jan_feb_mar_apr_maí_jún_júl_ágú_sep_okt_nóv_des'.split('_'), + weekdays: 'sunnudagur_mánudagur_þriðjudagur_miðvikudagur_fimmtudagur_föstudagur_laugardagur'.split( + '_' + ), + weekdaysShort: 'sun_mán_þri_mið_fim_fös_lau'.split('_'), + weekdaysMin: 'Su_Má_Þr_Mi_Fi_Fö_La'.split('_'), + longDateFormat: { + LT: 'H:mm', + LTS: 'H:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D. MMMM YYYY', + LLL: 'D. MMMM YYYY [kl.] H:mm', + LLLL: 'dddd, D. MMMM YYYY [kl.] H:mm', + }, + calendar: { + sameDay: '[í dag kl.] LT', + nextDay: '[á morgun kl.] LT', + nextWeek: 'dddd [kl.] LT', + lastDay: '[í gær kl.] LT', + lastWeek: '[síðasta] dddd [kl.] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'eftir %s', + past: 'fyrir %s síðan', + s: translate$5, + ss: translate$5, + m: translate$5, + mm: translate$5, + h: 'klukkustund', + hh: translate$5, + d: translate$5, + dd: translate$5, + M: translate$5, + MM: translate$5, + y: translate$5, + yy: translate$5, + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal: '%d.', + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + hooks.defineLocale('it-ch', { + months: 'gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre'.split( + '_' + ), + monthsShort: 'gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic'.split('_'), + weekdays: 'domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato'.split( + '_' + ), + weekdaysShort: 'dom_lun_mar_mer_gio_ven_sab'.split('_'), + weekdaysMin: 'do_lu_ma_me_gi_ve_sa'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[Oggi alle] LT', + nextDay: '[Domani alle] LT', + nextWeek: 'dddd [alle] LT', + lastDay: '[Ieri alle] LT', + lastWeek: function () { + switch (this.day()) { + case 0: + return '[la scorsa] dddd [alle] LT'; + default: + return '[lo scorso] dddd [alle] LT'; + } + }, + sameElse: 'L', + }, + relativeTime: { + future: function (s) { + return (/^[0-9].+$/.test(s) ? 'tra' : 'in') + ' ' + s; + }, + past: '%s fa', + s: 'alcuni secondi', + ss: '%d secondi', + m: 'un minuto', + mm: '%d minuti', + h: "un'ora", + hh: '%d ore', + d: 'un giorno', + dd: '%d giorni', + M: 'un mese', + MM: '%d mesi', + y: 'un anno', + yy: '%d anni', + }, + dayOfMonthOrdinalParse: /\d{1,2}º/, + ordinal: '%dº', + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + hooks.defineLocale('it', { + months: 'gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre'.split( + '_' + ), + monthsShort: 'gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic'.split('_'), + weekdays: 'domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato'.split( + '_' + ), + weekdaysShort: 'dom_lun_mar_mer_gio_ven_sab'.split('_'), + weekdaysMin: 'do_lu_ma_me_gi_ve_sa'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: function () { + return ( + '[Oggi a' + + (this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : "ll'") + + ']LT' + ); + }, + nextDay: function () { + return ( + '[Domani a' + + (this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : "ll'") + + ']LT' + ); + }, + nextWeek: function () { + return ( + 'dddd [a' + + (this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : "ll'") + + ']LT' + ); + }, + lastDay: function () { + return ( + '[Ieri a' + + (this.hours() > 1 ? 'lle ' : this.hours() === 0 ? ' ' : "ll'") + + ']LT' + ); + }, + lastWeek: function () { + switch (this.day()) { + case 0: + return ( + '[La scorsa] dddd [a' + + (this.hours() > 1 + ? 'lle ' + : this.hours() === 0 + ? ' ' + : "ll'") + + ']LT' + ); + default: + return ( + '[Lo scorso] dddd [a' + + (this.hours() > 1 + ? 'lle ' + : this.hours() === 0 + ? ' ' + : "ll'") + + ']LT' + ); + } + }, + sameElse: 'L', + }, + relativeTime: { + future: 'tra %s', + past: '%s fa', + s: 'alcuni secondi', + ss: '%d secondi', + m: 'un minuto', + mm: '%d minuti', + h: "un'ora", + hh: '%d ore', + d: 'un giorno', + dd: '%d giorni', + M: 'un mese', + MM: '%d mesi', + y: 'un anno', + yy: '%d anni', + }, + dayOfMonthOrdinalParse: /\d{1,2}º/, + ordinal: '%dº', + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + hooks.defineLocale('ja', { + eras: [ + { + since: '2019-05-01', + offset: 1, + name: '令和', + narrow: '㋿', + abbr: 'R', + }, + { + since: '1989-01-08', + until: '2019-04-30', + offset: 1, + name: '平成', + narrow: '㍻', + abbr: 'H', + }, + { + since: '1926-12-25', + until: '1989-01-07', + offset: 1, + name: '昭和', + narrow: '㍼', + abbr: 'S', + }, + { + since: '1912-07-30', + until: '1926-12-24', + offset: 1, + name: '大正', + narrow: '㍽', + abbr: 'T', + }, + { + since: '1873-01-01', + until: '1912-07-29', + offset: 6, + name: '明治', + narrow: '㍾', + abbr: 'M', + }, + { + since: '0001-01-01', + until: '1873-12-31', + offset: 1, + name: '西暦', + narrow: 'AD', + abbr: 'AD', + }, + { + since: '0000-12-31', + until: -Infinity, + offset: 1, + name: '紀元前', + narrow: 'BC', + abbr: 'BC', + }, + ], + eraYearOrdinalRegex: /(元|\d+)年/, + eraYearOrdinalParse: function (input, match) { + return match[1] === '元' ? 1 : parseInt(match[1] || input, 10); + }, + months: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split('_'), + monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split( + '_' + ), + weekdays: '日曜日_月曜日_火曜日_水曜日_木曜日_金曜日_土曜日'.split('_'), + weekdaysShort: '日_月_火_水_木_金_土'.split('_'), + weekdaysMin: '日_月_火_水_木_金_土'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'YYYY/MM/DD', + LL: 'YYYY年M月D日', + LLL: 'YYYY年M月D日 HH:mm', + LLLL: 'YYYY年M月D日 dddd HH:mm', + l: 'YYYY/MM/DD', + ll: 'YYYY年M月D日', + lll: 'YYYY年M月D日 HH:mm', + llll: 'YYYY年M月D日(ddd) HH:mm', + }, + meridiemParse: /午前|午後/i, + isPM: function (input) { + return input === '午後'; + }, + meridiem: function (hour, minute, isLower) { + if (hour < 12) { + return '午前'; + } else { + return '午後'; + } + }, + calendar: { + sameDay: '[今日] LT', + nextDay: '[明日] LT', + nextWeek: function (now) { + if (now.week() !== this.week()) { + return '[来週]dddd LT'; + } else { + return 'dddd LT'; + } + }, + lastDay: '[昨日] LT', + lastWeek: function (now) { + if (this.week() !== now.week()) { + return '[先週]dddd LT'; + } else { + return 'dddd LT'; + } + }, + sameElse: 'L', + }, + dayOfMonthOrdinalParse: /\d{1,2}日/, + ordinal: function (number, period) { + switch (period) { + case 'y': + return number === 1 ? '元年' : number + '年'; + case 'd': + case 'D': + case 'DDD': + return number + '日'; + default: + return number; + } + }, + relativeTime: { + future: '%s後', + past: '%s前', + s: '数秒', + ss: '%d秒', + m: '1分', + mm: '%d分', + h: '1時間', + hh: '%d時間', + d: '1日', + dd: '%d日', + M: '1ヶ月', + MM: '%dヶ月', + y: '1年', + yy: '%d年', + }, + }); + + //! moment.js locale configuration + + hooks.defineLocale('jv', { + months: 'Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_Nopember_Desember'.split( + '_' + ), + monthsShort: 'Jan_Feb_Mar_Apr_Mei_Jun_Jul_Ags_Sep_Okt_Nop_Des'.split('_'), + weekdays: 'Minggu_Senen_Seloso_Rebu_Kemis_Jemuwah_Septu'.split('_'), + weekdaysShort: 'Min_Sen_Sel_Reb_Kem_Jem_Sep'.split('_'), + weekdaysMin: 'Mg_Sn_Sl_Rb_Km_Jm_Sp'.split('_'), + longDateFormat: { + LT: 'HH.mm', + LTS: 'HH.mm.ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY [pukul] HH.mm', + LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm', + }, + meridiemParse: /enjing|siyang|sonten|ndalu/, + meridiemHour: function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === 'enjing') { + return hour; + } else if (meridiem === 'siyang') { + return hour >= 11 ? hour : hour + 12; + } else if (meridiem === 'sonten' || meridiem === 'ndalu') { + return hour + 12; + } + }, + meridiem: function (hours, minutes, isLower) { + if (hours < 11) { + return 'enjing'; + } else if (hours < 15) { + return 'siyang'; + } else if (hours < 19) { + return 'sonten'; + } else { + return 'ndalu'; + } + }, + calendar: { + sameDay: '[Dinten puniko pukul] LT', + nextDay: '[Mbenjang pukul] LT', + nextWeek: 'dddd [pukul] LT', + lastDay: '[Kala wingi pukul] LT', + lastWeek: 'dddd [kepengker pukul] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'wonten ing %s', + past: '%s ingkang kepengker', + s: 'sawetawis detik', + ss: '%d detik', + m: 'setunggal menit', + mm: '%d menit', + h: 'setunggal jam', + hh: '%d jam', + d: 'sedinten', + dd: '%d dinten', + M: 'sewulan', + MM: '%d wulan', + y: 'setaun', + yy: '%d taun', + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 7, // The week that contains Jan 7th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + hooks.defineLocale('ka', { + months: 'იანვარი_თებერვალი_მარტი_აპრილი_მაისი_ივნისი_ივლისი_აგვისტო_სექტემბერი_ოქტომბერი_ნოემბერი_დეკემბერი'.split( + '_' + ), + monthsShort: 'იან_თებ_მარ_აპრ_მაი_ივნ_ივლ_აგვ_სექ_ოქტ_ნოე_დეკ'.split('_'), + weekdays: { + standalone: 'კვირა_ორშაბათი_სამშაბათი_ოთხშაბათი_ხუთშაბათი_პარასკევი_შაბათი'.split( + '_' + ), + format: 'კვირას_ორშაბათს_სამშაბათს_ოთხშაბათს_ხუთშაბათს_პარასკევს_შაბათს'.split( + '_' + ), + isFormat: /(წინა|შემდეგ)/, + }, + weekdaysShort: 'კვი_ორშ_სამ_ოთხ_ხუთ_პარ_შაბ'.split('_'), + weekdaysMin: 'კვ_ორ_სა_ოთ_ხუ_პა_შა'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[დღეს] LT[-ზე]', + nextDay: '[ხვალ] LT[-ზე]', + lastDay: '[გუშინ] LT[-ზე]', + nextWeek: '[შემდეგ] dddd LT[-ზე]', + lastWeek: '[წინა] dddd LT-ზე', + sameElse: 'L', + }, + relativeTime: { + future: function (s) { + return s.replace(/(წამ|წუთ|საათ|წელ|დღ|თვ)(ი|ე)/, function ( + $0, + $1, + $2 + ) { + return $2 === 'ი' ? $1 + 'ში' : $1 + $2 + 'ში'; + }); + }, + past: function (s) { + if (/(წამი|წუთი|საათი|დღე|თვე)/.test(s)) { + return s.replace(/(ი|ე)$/, 'ის წინ'); + } + if (/წელი/.test(s)) { + return s.replace(/წელი$/, 'წლის წინ'); + } + return s; + }, + s: 'რამდენიმე წამი', + ss: '%d წამი', + m: 'წუთი', + mm: '%d წუთი', + h: 'საათი', + hh: '%d საათი', + d: 'დღე', + dd: '%d დღე', + M: 'თვე', + MM: '%d თვე', + y: 'წელი', + yy: '%d წელი', + }, + dayOfMonthOrdinalParse: /0|1-ლი|მე-\d{1,2}|\d{1,2}-ე/, + ordinal: function (number) { + if (number === 0) { + return number; + } + if (number === 1) { + return number + '-ლი'; + } + if ( + number < 20 || + (number <= 100 && number % 20 === 0) || + number % 100 === 0 + ) { + return 'მე-' + number; + } + return number + '-ე'; + }, + week: { + dow: 1, + doy: 7, + }, + }); + + //! moment.js locale configuration + + var suffixes$1 = { + 0: '-ші', + 1: '-ші', + 2: '-ші', + 3: '-ші', + 4: '-ші', + 5: '-ші', + 6: '-шы', + 7: '-ші', + 8: '-ші', + 9: '-шы', + 10: '-шы', + 20: '-шы', + 30: '-шы', + 40: '-шы', + 50: '-ші', + 60: '-шы', + 70: '-ші', + 80: '-ші', + 90: '-шы', + 100: '-ші', + }; + + hooks.defineLocale('kk', { + months: 'қаңтар_ақпан_наурыз_сәуір_мамыр_маусым_шілде_тамыз_қыркүйек_қазан_қараша_желтоқсан'.split( + '_' + ), + monthsShort: 'қаң_ақп_нау_сәу_мам_мау_шіл_там_қыр_қаз_қар_жел'.split('_'), + weekdays: 'жексенбі_дүйсенбі_сейсенбі_сәрсенбі_бейсенбі_жұма_сенбі'.split( + '_' + ), + weekdaysShort: 'жек_дүй_сей_сәр_бей_жұм_сен'.split('_'), + weekdaysMin: 'жк_дй_сй_ср_бй_жм_сн'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[Бүгін сағат] LT', + nextDay: '[Ертең сағат] LT', + nextWeek: 'dddd [сағат] LT', + lastDay: '[Кеше сағат] LT', + lastWeek: '[Өткен аптаның] dddd [сағат] LT', + sameElse: 'L', + }, + relativeTime: { + future: '%s ішінде', + past: '%s бұрын', + s: 'бірнеше секунд', + ss: '%d секунд', + m: 'бір минут', + mm: '%d минут', + h: 'бір сағат', + hh: '%d сағат', + d: 'бір күн', + dd: '%d күн', + M: 'бір ай', + MM: '%d ай', + y: 'бір жыл', + yy: '%d жыл', + }, + dayOfMonthOrdinalParse: /\d{1,2}-(ші|шы)/, + ordinal: function (number) { + var a = number % 10, + b = number >= 100 ? 100 : null; + return number + (suffixes$1[number] || suffixes$1[a] || suffixes$1[b]); + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 7, // The week that contains Jan 7th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var symbolMap$8 = { + '1': '១', + '2': '២', + '3': '៣', + '4': '៤', + '5': '៥', + '6': '៦', + '7': '៧', + '8': '៨', + '9': '៩', + '0': '០', + }, + numberMap$7 = { + '១': '1', + '២': '2', + '៣': '3', + '៤': '4', + '៥': '5', + '៦': '6', + '៧': '7', + '៨': '8', + '៩': '9', + '០': '0', + }; + + hooks.defineLocale('km', { + months: 'មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ'.split( + '_' + ), + monthsShort: 'មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ'.split( + '_' + ), + weekdays: 'អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍'.split('_'), + weekdaysShort: 'អា_ច_អ_ព_ព្រ_សុ_ស'.split('_'), + weekdaysMin: 'អា_ច_អ_ព_ព្រ_សុ_ស'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm', + }, + meridiemParse: /ព្រឹក|ល្ងាច/, + isPM: function (input) { + return input === 'ល្ងាច'; + }, + meridiem: function (hour, minute, isLower) { + if (hour < 12) { + return 'ព្រឹក'; + } else { + return 'ល្ងាច'; + } + }, + calendar: { + sameDay: '[ថ្ងៃនេះ ម៉ោង] LT', + nextDay: '[ស្អែក ម៉ោង] LT', + nextWeek: 'dddd [ម៉ោង] LT', + lastDay: '[ម្សិលមិញ ម៉ោង] LT', + lastWeek: 'dddd [សប្តាហ៍មុន] [ម៉ោង] LT', + sameElse: 'L', + }, + relativeTime: { + future: '%sទៀត', + past: '%sមុន', + s: 'ប៉ុន្មានវិនាទី', + ss: '%d វិនាទី', + m: 'មួយនាទី', + mm: '%d នាទី', + h: 'មួយម៉ោង', + hh: '%d ម៉ោង', + d: 'មួយថ្ងៃ', + dd: '%d ថ្ងៃ', + M: 'មួយខែ', + MM: '%d ខែ', + y: 'មួយឆ្នាំ', + yy: '%d ឆ្នាំ', + }, + dayOfMonthOrdinalParse: /ទី\d{1,2}/, + ordinal: 'ទី%d', + preparse: function (string) { + return string.replace(/[១២៣៤៥៦៧៨៩០]/g, function (match) { + return numberMap$7[match]; + }); + }, + postformat: function (string) { + return string.replace(/\d/g, function (match) { + return symbolMap$8[match]; + }); + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var symbolMap$9 = { + '1': '೧', + '2': '೨', + '3': '೩', + '4': '೪', + '5': '೫', + '6': '೬', + '7': '೭', + '8': '೮', + '9': '೯', + '0': '೦', + }, + numberMap$8 = { + '೧': '1', + '೨': '2', + '೩': '3', + '೪': '4', + '೫': '5', + '೬': '6', + '೭': '7', + '೮': '8', + '೯': '9', + '೦': '0', + }; + + hooks.defineLocale('kn', { + months: 'ಜನವರಿ_ಫೆಬ್ರವರಿ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂಬರ್_ಅಕ್ಟೋಬರ್_ನವೆಂಬರ್_ಡಿಸೆಂಬರ್'.split( + '_' + ), + monthsShort: 'ಜನ_ಫೆಬ್ರ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂ_ಅಕ್ಟೋ_ನವೆಂ_ಡಿಸೆಂ'.split( + '_' + ), + monthsParseExact: true, + weekdays: 'ಭಾನುವಾರ_ಸೋಮವಾರ_ಮಂಗಳವಾರ_ಬುಧವಾರ_ಗುರುವಾರ_ಶುಕ್ರವಾರ_ಶನಿವಾರ'.split( + '_' + ), + weekdaysShort: 'ಭಾನು_ಸೋಮ_ಮಂಗಳ_ಬುಧ_ಗುರು_ಶುಕ್ರ_ಶನಿ'.split('_'), + weekdaysMin: 'ಭಾ_ಸೋ_ಮಂ_ಬು_ಗು_ಶು_ಶ'.split('_'), + longDateFormat: { + LT: 'A h:mm', + LTS: 'A h:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY, A h:mm', + LLLL: 'dddd, D MMMM YYYY, A h:mm', + }, + calendar: { + sameDay: '[ಇಂದು] LT', + nextDay: '[ನಾಳೆ] LT', + nextWeek: 'dddd, LT', + lastDay: '[ನಿನ್ನೆ] LT', + lastWeek: '[ಕೊನೆಯ] dddd, LT', + sameElse: 'L', + }, + relativeTime: { + future: '%s ನಂತರ', + past: '%s ಹಿಂದೆ', + s: 'ಕೆಲವು ಕ್ಷಣಗಳು', + ss: '%d ಸೆಕೆಂಡುಗಳು', + m: 'ಒಂದು ನಿಮಿಷ', + mm: '%d ನಿಮಿಷ', + h: 'ಒಂದು ಗಂಟೆ', + hh: '%d ಗಂಟೆ', + d: 'ಒಂದು ದಿನ', + dd: '%d ದಿನ', + M: 'ಒಂದು ತಿಂಗಳು', + MM: '%d ತಿಂಗಳು', + y: 'ಒಂದು ವರ್ಷ', + yy: '%d ವರ್ಷ', + }, + preparse: function (string) { + return string.replace(/[೧೨೩೪೫೬೭೮೯೦]/g, function (match) { + return numberMap$8[match]; + }); + }, + postformat: function (string) { + return string.replace(/\d/g, function (match) { + return symbolMap$9[match]; + }); + }, + meridiemParse: /ರಾತ್ರಿ|ಬೆಳಿಗ್ಗೆ|ಮಧ್ಯಾಹ್ನ|ಸಂಜೆ/, + meridiemHour: function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === 'ರಾತ್ರಿ') { + return hour < 4 ? hour : hour + 12; + } else if (meridiem === 'ಬೆಳಿಗ್ಗೆ') { + return hour; + } else if (meridiem === 'ಮಧ್ಯಾಹ್ನ') { + return hour >= 10 ? hour : hour + 12; + } else if (meridiem === 'ಸಂಜೆ') { + return hour + 12; + } + }, + meridiem: function (hour, minute, isLower) { + if (hour < 4) { + return 'ರಾತ್ರಿ'; + } else if (hour < 10) { + return 'ಬೆಳಿಗ್ಗೆ'; + } else if (hour < 17) { + return 'ಮಧ್ಯಾಹ್ನ'; + } else if (hour < 20) { + return 'ಸಂಜೆ'; + } else { + return 'ರಾತ್ರಿ'; + } + }, + dayOfMonthOrdinalParse: /\d{1,2}(ನೇ)/, + ordinal: function (number) { + return number + 'ನೇ'; + }, + week: { + dow: 0, // Sunday is the first day of the week. + doy: 6, // The week that contains Jan 6th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + hooks.defineLocale('ko', { + months: '1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월'.split('_'), + monthsShort: '1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월'.split( + '_' + ), + weekdays: '일요일_월요일_화요일_수요일_목요일_금요일_토요일'.split('_'), + weekdaysShort: '일_월_화_수_목_금_토'.split('_'), + weekdaysMin: '일_월_화_수_목_금_토'.split('_'), + longDateFormat: { + LT: 'A h:mm', + LTS: 'A h:mm:ss', + L: 'YYYY.MM.DD.', + LL: 'YYYY년 MMMM D일', + LLL: 'YYYY년 MMMM D일 A h:mm', + LLLL: 'YYYY년 MMMM D일 dddd A h:mm', + l: 'YYYY.MM.DD.', + ll: 'YYYY년 MMMM D일', + lll: 'YYYY년 MMMM D일 A h:mm', + llll: 'YYYY년 MMMM D일 dddd A h:mm', + }, + calendar: { + sameDay: '오늘 LT', + nextDay: '내일 LT', + nextWeek: 'dddd LT', + lastDay: '어제 LT', + lastWeek: '지난주 dddd LT', + sameElse: 'L', + }, + relativeTime: { + future: '%s 후', + past: '%s 전', + s: '몇 초', + ss: '%d초', + m: '1분', + mm: '%d분', + h: '한 시간', + hh: '%d시간', + d: '하루', + dd: '%d일', + M: '한 달', + MM: '%d달', + y: '일 년', + yy: '%d년', + }, + dayOfMonthOrdinalParse: /\d{1,2}(일|월|주)/, + ordinal: function (number, period) { + switch (period) { + case 'd': + case 'D': + case 'DDD': + return number + '일'; + case 'M': + return number + '월'; + case 'w': + case 'W': + return number + '주'; + default: + return number; + } + }, + meridiemParse: /오전|오후/, + isPM: function (token) { + return token === '오후'; + }, + meridiem: function (hour, minute, isUpper) { + return hour < 12 ? '오전' : '오후'; + }, + }); + + //! moment.js locale configuration + + var symbolMap$a = { + '1': '١', + '2': '٢', + '3': '٣', + '4': '٤', + '5': '٥', + '6': '٦', + '7': '٧', + '8': '٨', + '9': '٩', + '0': '٠', + }, + numberMap$9 = { + '١': '1', + '٢': '2', + '٣': '3', + '٤': '4', + '٥': '5', + '٦': '6', + '٧': '7', + '٨': '8', + '٩': '9', + '٠': '0', + }, + months$8 = [ + 'کانونی دووەم', + 'شوبات', + 'ئازار', + 'نیسان', + 'ئایار', + 'حوزەیران', + 'تەمموز', + 'ئاب', + 'ئەیلوول', + 'تشرینی یەكەم', + 'تشرینی دووەم', + 'كانونی یەکەم', + ]; + + hooks.defineLocale('ku', { + months: months$8, + monthsShort: months$8, + weekdays: 'یه‌كشه‌ممه‌_دووشه‌ممه‌_سێشه‌ممه‌_چوارشه‌ممه‌_پێنجشه‌ممه‌_هه‌ینی_شه‌ممه‌'.split( + '_' + ), + weekdaysShort: 'یه‌كشه‌م_دووشه‌م_سێشه‌م_چوارشه‌م_پێنجشه‌م_هه‌ینی_شه‌ممه‌'.split( + '_' + ), + weekdaysMin: 'ی_د_س_چ_پ_ه_ش'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm', + }, + meridiemParse: /ئێواره‌|به‌یانی/, + isPM: function (input) { + return /ئێواره‌/.test(input); + }, + meridiem: function (hour, minute, isLower) { + if (hour < 12) { + return 'به‌یانی'; + } else { + return 'ئێواره‌'; + } + }, + calendar: { + sameDay: '[ئه‌مرۆ كاتژمێر] LT', + nextDay: '[به‌یانی كاتژمێر] LT', + nextWeek: 'dddd [كاتژمێر] LT', + lastDay: '[دوێنێ كاتژمێر] LT', + lastWeek: 'dddd [كاتژمێر] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'له‌ %s', + past: '%s', + s: 'چه‌ند چركه‌یه‌ك', + ss: 'چركه‌ %d', + m: 'یه‌ك خوله‌ك', + mm: '%d خوله‌ك', + h: 'یه‌ك كاتژمێر', + hh: '%d كاتژمێر', + d: 'یه‌ك ڕۆژ', + dd: '%d ڕۆژ', + M: 'یه‌ك مانگ', + MM: '%d مانگ', + y: 'یه‌ك ساڵ', + yy: '%d ساڵ', + }, + preparse: function (string) { + return string + .replace(/[١٢٣٤٥٦٧٨٩٠]/g, function (match) { + return numberMap$9[match]; + }) + .replace(/،/g, ','); + }, + postformat: function (string) { + return string + .replace(/\d/g, function (match) { + return symbolMap$a[match]; + }) + .replace(/,/g, '،'); + }, + week: { + dow: 6, // Saturday is the first day of the week. + doy: 12, // The week that contains Jan 12th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var suffixes$2 = { + 0: '-чү', + 1: '-чи', + 2: '-чи', + 3: '-чү', + 4: '-чү', + 5: '-чи', + 6: '-чы', + 7: '-чи', + 8: '-чи', + 9: '-чу', + 10: '-чу', + 20: '-чы', + 30: '-чу', + 40: '-чы', + 50: '-чү', + 60: '-чы', + 70: '-чи', + 80: '-чи', + 90: '-чу', + 100: '-чү', + }; + + hooks.defineLocale('ky', { + months: 'январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь'.split( + '_' + ), + monthsShort: 'янв_фев_март_апр_май_июнь_июль_авг_сен_окт_ноя_дек'.split( + '_' + ), + weekdays: 'Жекшемби_Дүйшөмбү_Шейшемби_Шаршемби_Бейшемби_Жума_Ишемби'.split( + '_' + ), + weekdaysShort: 'Жек_Дүй_Шей_Шар_Бей_Жум_Ише'.split('_'), + weekdaysMin: 'Жк_Дй_Шй_Шр_Бй_Жм_Иш'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[Бүгүн саат] LT', + nextDay: '[Эртең саат] LT', + nextWeek: 'dddd [саат] LT', + lastDay: '[Кечээ саат] LT', + lastWeek: '[Өткөн аптанын] dddd [күнү] [саат] LT', + sameElse: 'L', + }, + relativeTime: { + future: '%s ичинде', + past: '%s мурун', + s: 'бирнече секунд', + ss: '%d секунд', + m: 'бир мүнөт', + mm: '%d мүнөт', + h: 'бир саат', + hh: '%d саат', + d: 'бир күн', + dd: '%d күн', + M: 'бир ай', + MM: '%d ай', + y: 'бир жыл', + yy: '%d жыл', + }, + dayOfMonthOrdinalParse: /\d{1,2}-(чи|чы|чү|чу)/, + ordinal: function (number) { + var a = number % 10, + b = number >= 100 ? 100 : null; + return number + (suffixes$2[number] || suffixes$2[a] || suffixes$2[b]); + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 7, // The week that contains Jan 7th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + function processRelativeTime$6(number, withoutSuffix, key, isFuture) { + var format = { + m: ['eng Minutt', 'enger Minutt'], + h: ['eng Stonn', 'enger Stonn'], + d: ['een Dag', 'engem Dag'], + M: ['ee Mount', 'engem Mount'], + y: ['ee Joer', 'engem Joer'], + }; + return withoutSuffix ? format[key][0] : format[key][1]; + } + function processFutureTime(string) { + var number = string.substr(0, string.indexOf(' ')); + if (eifelerRegelAppliesToNumber(number)) { + return 'a ' + string; + } + return 'an ' + string; + } + function processPastTime(string) { + var number = string.substr(0, string.indexOf(' ')); + if (eifelerRegelAppliesToNumber(number)) { + return 'viru ' + string; + } + return 'virun ' + string; + } + /** + * Returns true if the word before the given number loses the '-n' ending. + * e.g. 'an 10 Deeg' but 'a 5 Deeg' + * + * @param number {integer} + * @returns {boolean} + */ + function eifelerRegelAppliesToNumber(number) { + number = parseInt(number, 10); + if (isNaN(number)) { + return false; + } + if (number < 0) { + // Negative Number --> always true + return true; + } else if (number < 10) { + // Only 1 digit + if (4 <= number && number <= 7) { + return true; + } + return false; + } else if (number < 100) { + // 2 digits + var lastDigit = number % 10, + firstDigit = number / 10; + if (lastDigit === 0) { + return eifelerRegelAppliesToNumber(firstDigit); + } + return eifelerRegelAppliesToNumber(lastDigit); + } else if (number < 10000) { + // 3 or 4 digits --> recursively check first digit + while (number >= 10) { + number = number / 10; + } + return eifelerRegelAppliesToNumber(number); + } else { + // Anything larger than 4 digits: recursively check first n-3 digits + number = number / 1000; + return eifelerRegelAppliesToNumber(number); + } + } + + hooks.defineLocale('lb', { + months: 'Januar_Februar_Mäerz_Abrëll_Mee_Juni_Juli_August_September_Oktober_November_Dezember'.split( + '_' + ), + monthsShort: 'Jan._Febr._Mrz._Abr._Mee_Jun._Jul._Aug._Sept._Okt._Nov._Dez.'.split( + '_' + ), + monthsParseExact: true, + weekdays: 'Sonndeg_Méindeg_Dënschdeg_Mëttwoch_Donneschdeg_Freideg_Samschdeg'.split( + '_' + ), + weekdaysShort: 'So._Mé._Dë._Më._Do._Fr._Sa.'.split('_'), + weekdaysMin: 'So_Mé_Dë_Më_Do_Fr_Sa'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'H:mm [Auer]', + LTS: 'H:mm:ss [Auer]', + L: 'DD.MM.YYYY', + LL: 'D. MMMM YYYY', + LLL: 'D. MMMM YYYY H:mm [Auer]', + LLLL: 'dddd, D. MMMM YYYY H:mm [Auer]', + }, + calendar: { + sameDay: '[Haut um] LT', + sameElse: 'L', + nextDay: '[Muer um] LT', + nextWeek: 'dddd [um] LT', + lastDay: '[Gëschter um] LT', + lastWeek: function () { + // Different date string for 'Dënschdeg' (Tuesday) and 'Donneschdeg' (Thursday) due to phonological rule + switch (this.day()) { + case 2: + case 4: + return '[Leschten] dddd [um] LT'; + default: + return '[Leschte] dddd [um] LT'; + } + }, + }, + relativeTime: { + future: processFutureTime, + past: processPastTime, + s: 'e puer Sekonnen', + ss: '%d Sekonnen', + m: processRelativeTime$6, + mm: '%d Minutten', + h: processRelativeTime$6, + hh: '%d Stonnen', + d: processRelativeTime$6, + dd: '%d Deeg', + M: processRelativeTime$6, + MM: '%d Méint', + y: processRelativeTime$6, + yy: '%d Joer', + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal: '%d.', + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + hooks.defineLocale('lo', { + months: 'ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ'.split( + '_' + ), + monthsShort: 'ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ'.split( + '_' + ), + weekdays: 'ອາທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ'.split('_'), + weekdaysShort: 'ທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ'.split('_'), + weekdaysMin: 'ທ_ຈ_ອຄ_ພ_ພຫ_ສກ_ສ'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'ວັນdddd D MMMM YYYY HH:mm', + }, + meridiemParse: /ຕອນເຊົ້າ|ຕອນແລງ/, + isPM: function (input) { + return input === 'ຕອນແລງ'; + }, + meridiem: function (hour, minute, isLower) { + if (hour < 12) { + return 'ຕອນເຊົ້າ'; + } else { + return 'ຕອນແລງ'; + } + }, + calendar: { + sameDay: '[ມື້ນີ້ເວລາ] LT', + nextDay: '[ມື້ອື່ນເວລາ] LT', + nextWeek: '[ວັນ]dddd[ໜ້າເວລາ] LT', + lastDay: '[ມື້ວານນີ້ເວລາ] LT', + lastWeek: '[ວັນ]dddd[ແລ້ວນີ້ເວລາ] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'ອີກ %s', + past: '%sຜ່ານມາ', + s: 'ບໍ່ເທົ່າໃດວິນາທີ', + ss: '%d ວິນາທີ', + m: '1 ນາທີ', + mm: '%d ນາທີ', + h: '1 ຊົ່ວໂມງ', + hh: '%d ຊົ່ວໂມງ', + d: '1 ມື້', + dd: '%d ມື້', + M: '1 ເດືອນ', + MM: '%d ເດືອນ', + y: '1 ປີ', + yy: '%d ປີ', + }, + dayOfMonthOrdinalParse: /(ທີ່)\d{1,2}/, + ordinal: function (number) { + return 'ທີ່' + number; + }, + }); + + //! moment.js locale configuration + + var units = { + ss: 'sekundė_sekundžių_sekundes', + m: 'minutė_minutės_minutę', + mm: 'minutės_minučių_minutes', + h: 'valanda_valandos_valandą', + hh: 'valandos_valandų_valandas', + d: 'diena_dienos_dieną', + dd: 'dienos_dienų_dienas', + M: 'mėnuo_mėnesio_mėnesį', + MM: 'mėnesiai_mėnesių_mėnesius', + y: 'metai_metų_metus', + yy: 'metai_metų_metus', + }; + function translateSeconds(number, withoutSuffix, key, isFuture) { + if (withoutSuffix) { + return 'kelios sekundės'; + } else { + return isFuture ? 'kelių sekundžių' : 'kelias sekundes'; + } + } + function translateSingular(number, withoutSuffix, key, isFuture) { + return withoutSuffix + ? forms(key)[0] + : isFuture + ? forms(key)[1] + : forms(key)[2]; + } + function special(number) { + return number % 10 === 0 || (number > 10 && number < 20); + } + function forms(key) { + return units[key].split('_'); + } + function translate$6(number, withoutSuffix, key, isFuture) { + var result = number + ' '; + if (number === 1) { + return ( + result + translateSingular(number, withoutSuffix, key[0], isFuture) + ); + } else if (withoutSuffix) { + return result + (special(number) ? forms(key)[1] : forms(key)[0]); + } else { + if (isFuture) { + return result + forms(key)[1]; + } else { + return result + (special(number) ? forms(key)[1] : forms(key)[2]); + } + } + } + hooks.defineLocale('lt', { + months: { + format: 'sausio_vasario_kovo_balandžio_gegužės_birželio_liepos_rugpjūčio_rugsėjo_spalio_lapkričio_gruodžio'.split( + '_' + ), + standalone: 'sausis_vasaris_kovas_balandis_gegužė_birželis_liepa_rugpjūtis_rugsėjis_spalis_lapkritis_gruodis'.split( + '_' + ), + isFormat: /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?|MMMM?(\[[^\[\]]*\]|\s)+D[oD]?/, + }, + monthsShort: 'sau_vas_kov_bal_geg_bir_lie_rgp_rgs_spa_lap_grd'.split('_'), + weekdays: { + format: 'sekmadienį_pirmadienį_antradienį_trečiadienį_ketvirtadienį_penktadienį_šeštadienį'.split( + '_' + ), + standalone: 'sekmadienis_pirmadienis_antradienis_trečiadienis_ketvirtadienis_penktadienis_šeštadienis'.split( + '_' + ), + isFormat: /dddd HH:mm/, + }, + weekdaysShort: 'Sek_Pir_Ant_Tre_Ket_Pen_Šeš'.split('_'), + weekdaysMin: 'S_P_A_T_K_Pn_Š'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'YYYY-MM-DD', + LL: 'YYYY [m.] MMMM D [d.]', + LLL: 'YYYY [m.] MMMM D [d.], HH:mm [val.]', + LLLL: 'YYYY [m.] MMMM D [d.], dddd, HH:mm [val.]', + l: 'YYYY-MM-DD', + ll: 'YYYY [m.] MMMM D [d.]', + lll: 'YYYY [m.] MMMM D [d.], HH:mm [val.]', + llll: 'YYYY [m.] MMMM D [d.], ddd, HH:mm [val.]', + }, + calendar: { + sameDay: '[Šiandien] LT', + nextDay: '[Rytoj] LT', + nextWeek: 'dddd LT', + lastDay: '[Vakar] LT', + lastWeek: '[Praėjusį] dddd LT', + sameElse: 'L', + }, + relativeTime: { + future: 'po %s', + past: 'prieš %s', + s: translateSeconds, + ss: translate$6, + m: translateSingular, + mm: translate$6, + h: translateSingular, + hh: translate$6, + d: translateSingular, + dd: translate$6, + M: translateSingular, + MM: translate$6, + y: translateSingular, + yy: translate$6, + }, + dayOfMonthOrdinalParse: /\d{1,2}-oji/, + ordinal: function (number) { + return number + '-oji'; + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var units$1 = { + ss: 'sekundes_sekundēm_sekunde_sekundes'.split('_'), + m: 'minūtes_minūtēm_minūte_minūtes'.split('_'), + mm: 'minūtes_minūtēm_minūte_minūtes'.split('_'), + h: 'stundas_stundām_stunda_stundas'.split('_'), + hh: 'stundas_stundām_stunda_stundas'.split('_'), + d: 'dienas_dienām_diena_dienas'.split('_'), + dd: 'dienas_dienām_diena_dienas'.split('_'), + M: 'mēneša_mēnešiem_mēnesis_mēneši'.split('_'), + MM: 'mēneša_mēnešiem_mēnesis_mēneši'.split('_'), + y: 'gada_gadiem_gads_gadi'.split('_'), + yy: 'gada_gadiem_gads_gadi'.split('_'), + }; + /** + * @param withoutSuffix boolean true = a length of time; false = before/after a period of time. + */ + function format$1(forms, number, withoutSuffix) { + if (withoutSuffix) { + // E.g. "21 minūte", "3 minūtes". + return number % 10 === 1 && number % 100 !== 11 ? forms[2] : forms[3]; + } else { + // E.g. "21 minūtes" as in "pēc 21 minūtes". + // E.g. "3 minūtēm" as in "pēc 3 minūtēm". + return number % 10 === 1 && number % 100 !== 11 ? forms[0] : forms[1]; + } + } + function relativeTimeWithPlural$1(number, withoutSuffix, key) { + return number + ' ' + format$1(units$1[key], number, withoutSuffix); + } + function relativeTimeWithSingular(number, withoutSuffix, key) { + return format$1(units$1[key], number, withoutSuffix); + } + function relativeSeconds(number, withoutSuffix) { + return withoutSuffix ? 'dažas sekundes' : 'dažām sekundēm'; + } + + hooks.defineLocale('lv', { + months: 'janvāris_februāris_marts_aprīlis_maijs_jūnijs_jūlijs_augusts_septembris_oktobris_novembris_decembris'.split( + '_' + ), + monthsShort: 'jan_feb_mar_apr_mai_jūn_jūl_aug_sep_okt_nov_dec'.split('_'), + weekdays: 'svētdiena_pirmdiena_otrdiena_trešdiena_ceturtdiena_piektdiena_sestdiena'.split( + '_' + ), + weekdaysShort: 'Sv_P_O_T_C_Pk_S'.split('_'), + weekdaysMin: 'Sv_P_O_T_C_Pk_S'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD.MM.YYYY.', + LL: 'YYYY. [gada] D. MMMM', + LLL: 'YYYY. [gada] D. MMMM, HH:mm', + LLLL: 'YYYY. [gada] D. MMMM, dddd, HH:mm', + }, + calendar: { + sameDay: '[Šodien pulksten] LT', + nextDay: '[Rīt pulksten] LT', + nextWeek: 'dddd [pulksten] LT', + lastDay: '[Vakar pulksten] LT', + lastWeek: '[Pagājušā] dddd [pulksten] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'pēc %s', + past: 'pirms %s', + s: relativeSeconds, + ss: relativeTimeWithPlural$1, + m: relativeTimeWithSingular, + mm: relativeTimeWithPlural$1, + h: relativeTimeWithSingular, + hh: relativeTimeWithPlural$1, + d: relativeTimeWithSingular, + dd: relativeTimeWithPlural$1, + M: relativeTimeWithSingular, + MM: relativeTimeWithPlural$1, + y: relativeTimeWithSingular, + yy: relativeTimeWithPlural$1, + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal: '%d.', + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var translator = { + words: { + //Different grammatical cases + ss: ['sekund', 'sekunda', 'sekundi'], + m: ['jedan minut', 'jednog minuta'], + mm: ['minut', 'minuta', 'minuta'], + h: ['jedan sat', 'jednog sata'], + hh: ['sat', 'sata', 'sati'], + dd: ['dan', 'dana', 'dana'], + MM: ['mjesec', 'mjeseca', 'mjeseci'], + yy: ['godina', 'godine', 'godina'], + }, + correctGrammaticalCase: function (number, wordKey) { + return number === 1 + ? wordKey[0] + : number >= 2 && number <= 4 + ? wordKey[1] + : wordKey[2]; + }, + translate: function (number, withoutSuffix, key) { + var wordKey = translator.words[key]; + if (key.length === 1) { + return withoutSuffix ? wordKey[0] : wordKey[1]; + } else { + return ( + number + + ' ' + + translator.correctGrammaticalCase(number, wordKey) + ); + } + }, + }; + + hooks.defineLocale('me', { + months: 'januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar'.split( + '_' + ), + monthsShort: 'jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.'.split( + '_' + ), + monthsParseExact: true, + weekdays: 'nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota'.split( + '_' + ), + weekdaysShort: 'ned._pon._uto._sri._čet._pet._sub.'.split('_'), + weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'H:mm', + LTS: 'H:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D. MMMM YYYY', + LLL: 'D. MMMM YYYY H:mm', + LLLL: 'dddd, D. MMMM YYYY H:mm', + }, + calendar: { + sameDay: '[danas u] LT', + nextDay: '[sjutra u] LT', + + nextWeek: function () { + switch (this.day()) { + case 0: + return '[u] [nedjelju] [u] LT'; + case 3: + return '[u] [srijedu] [u] LT'; + case 6: + return '[u] [subotu] [u] LT'; + case 1: + case 2: + case 4: + case 5: + return '[u] dddd [u] LT'; + } + }, + lastDay: '[juče u] LT', + lastWeek: function () { + var lastWeekDays = [ + '[prošle] [nedjelje] [u] LT', + '[prošlog] [ponedjeljka] [u] LT', + '[prošlog] [utorka] [u] LT', + '[prošle] [srijede] [u] LT', + '[prošlog] [četvrtka] [u] LT', + '[prošlog] [petka] [u] LT', + '[prošle] [subote] [u] LT', + ]; + return lastWeekDays[this.day()]; + }, + sameElse: 'L', + }, + relativeTime: { + future: 'za %s', + past: 'prije %s', + s: 'nekoliko sekundi', + ss: translator.translate, + m: translator.translate, + mm: translator.translate, + h: translator.translate, + hh: translator.translate, + d: 'dan', + dd: translator.translate, + M: 'mjesec', + MM: translator.translate, + y: 'godinu', + yy: translator.translate, + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal: '%d.', + week: { + dow: 1, // Monday is the first day of the week. + doy: 7, // The week that contains Jan 7th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + hooks.defineLocale('mi', { + months: 'Kohi-tāte_Hui-tanguru_Poutū-te-rangi_Paenga-whāwhā_Haratua_Pipiri_Hōngoingoi_Here-turi-kōkā_Mahuru_Whiringa-ā-nuku_Whiringa-ā-rangi_Hakihea'.split( + '_' + ), + monthsShort: 'Kohi_Hui_Pou_Pae_Hara_Pipi_Hōngoi_Here_Mahu_Whi-nu_Whi-ra_Haki'.split( + '_' + ), + monthsRegex: /(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i, + monthsStrictRegex: /(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i, + monthsShortRegex: /(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i, + monthsShortStrictRegex: /(?:['a-z\u0101\u014D\u016B]+\-?){1,2}/i, + weekdays: 'Rātapu_Mane_Tūrei_Wenerei_Tāite_Paraire_Hātarei'.split('_'), + weekdaysShort: 'Ta_Ma_Tū_We_Tāi_Pa_Hā'.split('_'), + weekdaysMin: 'Ta_Ma_Tū_We_Tāi_Pa_Hā'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY [i] HH:mm', + LLLL: 'dddd, D MMMM YYYY [i] HH:mm', + }, + calendar: { + sameDay: '[i teie mahana, i] LT', + nextDay: '[apopo i] LT', + nextWeek: 'dddd [i] LT', + lastDay: '[inanahi i] LT', + lastWeek: 'dddd [whakamutunga i] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'i roto i %s', + past: '%s i mua', + s: 'te hēkona ruarua', + ss: '%d hēkona', + m: 'he meneti', + mm: '%d meneti', + h: 'te haora', + hh: '%d haora', + d: 'he ra', + dd: '%d ra', + M: 'he marama', + MM: '%d marama', + y: 'he tau', + yy: '%d tau', + }, + dayOfMonthOrdinalParse: /\d{1,2}º/, + ordinal: '%dº', + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + hooks.defineLocale('mk', { + months: 'јануари_февруари_март_април_мај_јуни_јули_август_септември_октомври_ноември_декември'.split( + '_' + ), + monthsShort: 'јан_фев_мар_апр_мај_јун_јул_авг_сеп_окт_ное_дек'.split('_'), + weekdays: 'недела_понеделник_вторник_среда_четврток_петок_сабота'.split( + '_' + ), + weekdaysShort: 'нед_пон_вто_сре_чет_пет_саб'.split('_'), + weekdaysMin: 'нe_пo_вт_ср_че_пе_сa'.split('_'), + longDateFormat: { + LT: 'H:mm', + LTS: 'H:mm:ss', + L: 'D.MM.YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY H:mm', + LLLL: 'dddd, D MMMM YYYY H:mm', + }, + calendar: { + sameDay: '[Денес во] LT', + nextDay: '[Утре во] LT', + nextWeek: '[Во] dddd [во] LT', + lastDay: '[Вчера во] LT', + lastWeek: function () { + switch (this.day()) { + case 0: + case 3: + case 6: + return '[Изминатата] dddd [во] LT'; + case 1: + case 2: + case 4: + case 5: + return '[Изминатиот] dddd [во] LT'; + } + }, + sameElse: 'L', + }, + relativeTime: { + future: 'за %s', + past: 'пред %s', + s: 'неколку секунди', + ss: '%d секунди', + m: 'една минута', + mm: '%d минути', + h: 'еден час', + hh: '%d часа', + d: 'еден ден', + dd: '%d дена', + M: 'еден месец', + MM: '%d месеци', + y: 'една година', + yy: '%d години', + }, + dayOfMonthOrdinalParse: /\d{1,2}-(ев|ен|ти|ви|ри|ми)/, + ordinal: function (number) { + var lastDigit = number % 10, + last2Digits = number % 100; + if (number === 0) { + return number + '-ев'; + } else if (last2Digits === 0) { + return number + '-ен'; + } else if (last2Digits > 10 && last2Digits < 20) { + return number + '-ти'; + } else if (lastDigit === 1) { + return number + '-ви'; + } else if (lastDigit === 2) { + return number + '-ри'; + } else if (lastDigit === 7 || lastDigit === 8) { + return number + '-ми'; + } else { + return number + '-ти'; + } + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 7, // The week that contains Jan 7th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + hooks.defineLocale('ml', { + months: 'ജനുവരി_ഫെബ്രുവരി_മാർച്ച്_ഏപ്രിൽ_മേയ്_ജൂൺ_ജൂലൈ_ഓഗസ്റ്റ്_സെപ്റ്റംബർ_ഒക്ടോബർ_നവംബർ_ഡിസംബർ'.split( + '_' + ), + monthsShort: 'ജനു._ഫെബ്രു._മാർ._ഏപ്രി._മേയ്_ജൂൺ_ജൂലൈ._ഓഗ._സെപ്റ്റ._ഒക്ടോ._നവം._ഡിസം.'.split( + '_' + ), + monthsParseExact: true, + weekdays: 'ഞായറാഴ്ച_തിങ്കളാഴ്ച_ചൊവ്വാഴ്ച_ബുധനാഴ്ച_വ്യാഴാഴ്ച_വെള്ളിയാഴ്ച_ശനിയാഴ്ച'.split( + '_' + ), + weekdaysShort: 'ഞായർ_തിങ്കൾ_ചൊവ്വ_ബുധൻ_വ്യാഴം_വെള്ളി_ശനി'.split('_'), + weekdaysMin: 'ഞാ_തി_ചൊ_ബു_വ്യാ_വെ_ശ'.split('_'), + longDateFormat: { + LT: 'A h:mm -നു', + LTS: 'A h:mm:ss -നു', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY, A h:mm -നു', + LLLL: 'dddd, D MMMM YYYY, A h:mm -നു', + }, + calendar: { + sameDay: '[ഇന്ന്] LT', + nextDay: '[നാളെ] LT', + nextWeek: 'dddd, LT', + lastDay: '[ഇന്നലെ] LT', + lastWeek: '[കഴിഞ്ഞ] dddd, LT', + sameElse: 'L', + }, + relativeTime: { + future: '%s കഴിഞ്ഞ്', + past: '%s മുൻപ്', + s: 'അൽപ നിമിഷങ്ങൾ', + ss: '%d സെക്കൻഡ്', + m: 'ഒരു മിനിറ്റ്', + mm: '%d മിനിറ്റ്', + h: 'ഒരു മണിക്കൂർ', + hh: '%d മണിക്കൂർ', + d: 'ഒരു ദിവസം', + dd: '%d ദിവസം', + M: 'ഒരു മാസം', + MM: '%d മാസം', + y: 'ഒരു വർഷം', + yy: '%d വർഷം', + }, + meridiemParse: /രാത്രി|രാവിലെ|ഉച്ച കഴിഞ്ഞ്|വൈകുന്നേരം|രാത്രി/i, + meridiemHour: function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if ( + (meridiem === 'രാത്രി' && hour >= 4) || + meridiem === 'ഉച്ച കഴിഞ്ഞ്' || + meridiem === 'വൈകുന്നേരം' + ) { + return hour + 12; + } else { + return hour; + } + }, + meridiem: function (hour, minute, isLower) { + if (hour < 4) { + return 'രാത്രി'; + } else if (hour < 12) { + return 'രാവിലെ'; + } else if (hour < 17) { + return 'ഉച്ച കഴിഞ്ഞ്'; + } else if (hour < 20) { + return 'വൈകുന്നേരം'; + } else { + return 'രാത്രി'; + } + }, + }); + + //! moment.js locale configuration + + function translate$7(number, withoutSuffix, key, isFuture) { + switch (key) { + case 's': + return withoutSuffix ? 'хэдхэн секунд' : 'хэдхэн секундын'; + case 'ss': + return number + (withoutSuffix ? ' секунд' : ' секундын'); + case 'm': + case 'mm': + return number + (withoutSuffix ? ' минут' : ' минутын'); + case 'h': + case 'hh': + return number + (withoutSuffix ? ' цаг' : ' цагийн'); + case 'd': + case 'dd': + return number + (withoutSuffix ? ' өдөр' : ' өдрийн'); + case 'M': + case 'MM': + return number + (withoutSuffix ? ' сар' : ' сарын'); + case 'y': + case 'yy': + return number + (withoutSuffix ? ' жил' : ' жилийн'); + default: + return number; + } + } + + hooks.defineLocale('mn', { + months: 'Нэгдүгээр сар_Хоёрдугаар сар_Гуравдугаар сар_Дөрөвдүгээр сар_Тавдугаар сар_Зургадугаар сар_Долдугаар сар_Наймдугаар сар_Есдүгээр сар_Аравдугаар сар_Арван нэгдүгээр сар_Арван хоёрдугаар сар'.split( + '_' + ), + monthsShort: '1 сар_2 сар_3 сар_4 сар_5 сар_6 сар_7 сар_8 сар_9 сар_10 сар_11 сар_12 сар'.split( + '_' + ), + monthsParseExact: true, + weekdays: 'Ням_Даваа_Мягмар_Лхагва_Пүрэв_Баасан_Бямба'.split('_'), + weekdaysShort: 'Ням_Дав_Мяг_Лха_Пүр_Баа_Бям'.split('_'), + weekdaysMin: 'Ня_Да_Мя_Лх_Пү_Ба_Бя'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'YYYY-MM-DD', + LL: 'YYYY оны MMMMын D', + LLL: 'YYYY оны MMMMын D HH:mm', + LLLL: 'dddd, YYYY оны MMMMын D HH:mm', + }, + meridiemParse: /ҮӨ|ҮХ/i, + isPM: function (input) { + return input === 'ҮХ'; + }, + meridiem: function (hour, minute, isLower) { + if (hour < 12) { + return 'ҮӨ'; + } else { + return 'ҮХ'; + } + }, + calendar: { + sameDay: '[Өнөөдөр] LT', + nextDay: '[Маргааш] LT', + nextWeek: '[Ирэх] dddd LT', + lastDay: '[Өчигдөр] LT', + lastWeek: '[Өнгөрсөн] dddd LT', + sameElse: 'L', + }, + relativeTime: { + future: '%s дараа', + past: '%s өмнө', + s: translate$7, + ss: translate$7, + m: translate$7, + mm: translate$7, + h: translate$7, + hh: translate$7, + d: translate$7, + dd: translate$7, + M: translate$7, + MM: translate$7, + y: translate$7, + yy: translate$7, + }, + dayOfMonthOrdinalParse: /\d{1,2} өдөр/, + ordinal: function (number, period) { + switch (period) { + case 'd': + case 'D': + case 'DDD': + return number + ' өдөр'; + default: + return number; + } + }, + }); + + //! moment.js locale configuration + + var symbolMap$b = { + '1': '१', + '2': '२', + '3': '३', + '4': '४', + '5': '५', + '6': '६', + '7': '७', + '8': '८', + '9': '९', + '0': '०', + }, + numberMap$a = { + '१': '1', + '२': '2', + '३': '3', + '४': '4', + '५': '5', + '६': '6', + '७': '7', + '८': '8', + '९': '9', + '०': '0', + }; + + function relativeTimeMr(number, withoutSuffix, string, isFuture) { + var output = ''; + if (withoutSuffix) { + switch (string) { + case 's': + output = 'काही सेकंद'; + break; + case 'ss': + output = '%d सेकंद'; + break; + case 'm': + output = 'एक मिनिट'; + break; + case 'mm': + output = '%d मिनिटे'; + break; + case 'h': + output = 'एक तास'; + break; + case 'hh': + output = '%d तास'; + break; + case 'd': + output = 'एक दिवस'; + break; + case 'dd': + output = '%d दिवस'; + break; + case 'M': + output = 'एक महिना'; + break; + case 'MM': + output = '%d महिने'; + break; + case 'y': + output = 'एक वर्ष'; + break; + case 'yy': + output = '%d वर्षे'; + break; + } + } else { + switch (string) { + case 's': + output = 'काही सेकंदां'; + break; + case 'ss': + output = '%d सेकंदां'; + break; + case 'm': + output = 'एका मिनिटा'; + break; + case 'mm': + output = '%d मिनिटां'; + break; + case 'h': + output = 'एका तासा'; + break; + case 'hh': + output = '%d तासां'; + break; + case 'd': + output = 'एका दिवसा'; + break; + case 'dd': + output = '%d दिवसां'; + break; + case 'M': + output = 'एका महिन्या'; + break; + case 'MM': + output = '%d महिन्यां'; + break; + case 'y': + output = 'एका वर्षा'; + break; + case 'yy': + output = '%d वर्षां'; + break; + } + } + return output.replace(/%d/i, number); + } + + hooks.defineLocale('mr', { + months: 'जानेवारी_फेब्रुवारी_मार्च_एप्रिल_मे_जून_जुलै_ऑगस्ट_सप्टेंबर_ऑक्टोबर_नोव्हेंबर_डिसेंबर'.split( + '_' + ), + monthsShort: 'जाने._फेब्रु._मार्च._एप्रि._मे._जून._जुलै._ऑग._सप्टें._ऑक्टो._नोव्हें._डिसें.'.split( + '_' + ), + monthsParseExact: true, + weekdays: 'रविवार_सोमवार_मंगळवार_बुधवार_गुरूवार_शुक्रवार_शनिवार'.split('_'), + weekdaysShort: 'रवि_सोम_मंगळ_बुध_गुरू_शुक्र_शनि'.split('_'), + weekdaysMin: 'र_सो_मं_बु_गु_शु_श'.split('_'), + longDateFormat: { + LT: 'A h:mm वाजता', + LTS: 'A h:mm:ss वाजता', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY, A h:mm वाजता', + LLLL: 'dddd, D MMMM YYYY, A h:mm वाजता', + }, + calendar: { + sameDay: '[आज] LT', + nextDay: '[उद्या] LT', + nextWeek: 'dddd, LT', + lastDay: '[काल] LT', + lastWeek: '[मागील] dddd, LT', + sameElse: 'L', + }, + relativeTime: { + future: '%sमध्ये', + past: '%sपूर्वी', + s: relativeTimeMr, + ss: relativeTimeMr, + m: relativeTimeMr, + mm: relativeTimeMr, + h: relativeTimeMr, + hh: relativeTimeMr, + d: relativeTimeMr, + dd: relativeTimeMr, + M: relativeTimeMr, + MM: relativeTimeMr, + y: relativeTimeMr, + yy: relativeTimeMr, + }, + preparse: function (string) { + return string.replace(/[१२३४५६७८९०]/g, function (match) { + return numberMap$a[match]; + }); + }, + postformat: function (string) { + return string.replace(/\d/g, function (match) { + return symbolMap$b[match]; + }); + }, + meridiemParse: /पहाटे|सकाळी|दुपारी|सायंकाळी|रात्री/, + meridiemHour: function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === 'पहाटे' || meridiem === 'सकाळी') { + return hour; + } else if ( + meridiem === 'दुपारी' || + meridiem === 'सायंकाळी' || + meridiem === 'रात्री' + ) { + return hour >= 12 ? hour : hour + 12; + } + }, + meridiem: function (hour, minute, isLower) { + if (hour >= 0 && hour < 6) { + return 'पहाटे'; + } else if (hour < 12) { + return 'सकाळी'; + } else if (hour < 17) { + return 'दुपारी'; + } else if (hour < 20) { + return 'सायंकाळी'; + } else { + return 'रात्री'; + } + }, + week: { + dow: 0, // Sunday is the first day of the week. + doy: 6, // The week that contains Jan 6th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + hooks.defineLocale('ms-my', { + months: 'Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember'.split( + '_' + ), + monthsShort: 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis'.split('_'), + weekdays: 'Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu'.split('_'), + weekdaysShort: 'Ahd_Isn_Sel_Rab_Kha_Jum_Sab'.split('_'), + weekdaysMin: 'Ah_Is_Sl_Rb_Km_Jm_Sb'.split('_'), + longDateFormat: { + LT: 'HH.mm', + LTS: 'HH.mm.ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY [pukul] HH.mm', + LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm', + }, + meridiemParse: /pagi|tengahari|petang|malam/, + meridiemHour: function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === 'pagi') { + return hour; + } else if (meridiem === 'tengahari') { + return hour >= 11 ? hour : hour + 12; + } else if (meridiem === 'petang' || meridiem === 'malam') { + return hour + 12; + } + }, + meridiem: function (hours, minutes, isLower) { + if (hours < 11) { + return 'pagi'; + } else if (hours < 15) { + return 'tengahari'; + } else if (hours < 19) { + return 'petang'; + } else { + return 'malam'; + } + }, + calendar: { + sameDay: '[Hari ini pukul] LT', + nextDay: '[Esok pukul] LT', + nextWeek: 'dddd [pukul] LT', + lastDay: '[Kelmarin pukul] LT', + lastWeek: 'dddd [lepas pukul] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'dalam %s', + past: '%s yang lepas', + s: 'beberapa saat', + ss: '%d saat', + m: 'seminit', + mm: '%d minit', + h: 'sejam', + hh: '%d jam', + d: 'sehari', + dd: '%d hari', + M: 'sebulan', + MM: '%d bulan', + y: 'setahun', + yy: '%d tahun', + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 7, // The week that contains Jan 7th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + hooks.defineLocale('ms', { + months: 'Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember'.split( + '_' + ), + monthsShort: 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis'.split('_'), + weekdays: 'Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu'.split('_'), + weekdaysShort: 'Ahd_Isn_Sel_Rab_Kha_Jum_Sab'.split('_'), + weekdaysMin: 'Ah_Is_Sl_Rb_Km_Jm_Sb'.split('_'), + longDateFormat: { + LT: 'HH.mm', + LTS: 'HH.mm.ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY [pukul] HH.mm', + LLLL: 'dddd, D MMMM YYYY [pukul] HH.mm', + }, + meridiemParse: /pagi|tengahari|petang|malam/, + meridiemHour: function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === 'pagi') { + return hour; + } else if (meridiem === 'tengahari') { + return hour >= 11 ? hour : hour + 12; + } else if (meridiem === 'petang' || meridiem === 'malam') { + return hour + 12; + } + }, + meridiem: function (hours, minutes, isLower) { + if (hours < 11) { + return 'pagi'; + } else if (hours < 15) { + return 'tengahari'; + } else if (hours < 19) { + return 'petang'; + } else { + return 'malam'; + } + }, + calendar: { + sameDay: '[Hari ini pukul] LT', + nextDay: '[Esok pukul] LT', + nextWeek: 'dddd [pukul] LT', + lastDay: '[Kelmarin pukul] LT', + lastWeek: 'dddd [lepas pukul] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'dalam %s', + past: '%s yang lepas', + s: 'beberapa saat', + ss: '%d saat', + m: 'seminit', + mm: '%d minit', + h: 'sejam', + hh: '%d jam', + d: 'sehari', + dd: '%d hari', + M: 'sebulan', + MM: '%d bulan', + y: 'setahun', + yy: '%d tahun', + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 7, // The week that contains Jan 7th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + hooks.defineLocale('mt', { + months: 'Jannar_Frar_Marzu_April_Mejju_Ġunju_Lulju_Awwissu_Settembru_Ottubru_Novembru_Diċembru'.split( + '_' + ), + monthsShort: 'Jan_Fra_Mar_Apr_Mej_Ġun_Lul_Aww_Set_Ott_Nov_Diċ'.split('_'), + weekdays: 'Il-Ħadd_It-Tnejn_It-Tlieta_L-Erbgħa_Il-Ħamis_Il-Ġimgħa_Is-Sibt'.split( + '_' + ), + weekdaysShort: 'Ħad_Tne_Tli_Erb_Ħam_Ġim_Sib'.split('_'), + weekdaysMin: 'Ħa_Tn_Tl_Er_Ħa_Ġi_Si'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[Illum fil-]LT', + nextDay: '[Għada fil-]LT', + nextWeek: 'dddd [fil-]LT', + lastDay: '[Il-bieraħ fil-]LT', + lastWeek: 'dddd [li għadda] [fil-]LT', + sameElse: 'L', + }, + relativeTime: { + future: 'f’ %s', + past: '%s ilu', + s: 'ftit sekondi', + ss: '%d sekondi', + m: 'minuta', + mm: '%d minuti', + h: 'siegħa', + hh: '%d siegħat', + d: 'ġurnata', + dd: '%d ġranet', + M: 'xahar', + MM: '%d xhur', + y: 'sena', + yy: '%d sni', + }, + dayOfMonthOrdinalParse: /\d{1,2}º/, + ordinal: '%dº', + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var symbolMap$c = { + '1': '၁', + '2': '၂', + '3': '၃', + '4': '၄', + '5': '၅', + '6': '၆', + '7': '၇', + '8': '၈', + '9': '၉', + '0': '၀', + }, + numberMap$b = { + '၁': '1', + '၂': '2', + '၃': '3', + '၄': '4', + '၅': '5', + '၆': '6', + '၇': '7', + '၈': '8', + '၉': '9', + '၀': '0', + }; + + hooks.defineLocale('my', { + months: 'ဇန်နဝါရီ_ဖေဖော်ဝါရီ_မတ်_ဧပြီ_မေ_ဇွန်_ဇူလိုင်_သြဂုတ်_စက်တင်ဘာ_အောက်တိုဘာ_နိုဝင်ဘာ_ဒီဇင်ဘာ'.split( + '_' + ), + monthsShort: 'ဇန်_ဖေ_မတ်_ပြီ_မေ_ဇွန်_လိုင်_သြ_စက်_အောက်_နို_ဒီ'.split('_'), + weekdays: 'တနင်္ဂနွေ_တနင်္လာ_အင်္ဂါ_ဗုဒ္ဓဟူး_ကြာသပတေး_သောကြာ_စနေ'.split( + '_' + ), + weekdaysShort: 'နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ'.split('_'), + weekdaysMin: 'နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ'.split('_'), + + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[ယနေ.] LT [မှာ]', + nextDay: '[မနက်ဖြန်] LT [မှာ]', + nextWeek: 'dddd LT [မှာ]', + lastDay: '[မနေ.က] LT [မှာ]', + lastWeek: '[ပြီးခဲ့သော] dddd LT [မှာ]', + sameElse: 'L', + }, + relativeTime: { + future: 'လာမည့် %s မှာ', + past: 'လွန်ခဲ့သော %s က', + s: 'စက္ကန်.အနည်းငယ်', + ss: '%d စက္ကန့်', + m: 'တစ်မိနစ်', + mm: '%d မိနစ်', + h: 'တစ်နာရီ', + hh: '%d နာရီ', + d: 'တစ်ရက်', + dd: '%d ရက်', + M: 'တစ်လ', + MM: '%d လ', + y: 'တစ်နှစ်', + yy: '%d နှစ်', + }, + preparse: function (string) { + return string.replace(/[၁၂၃၄၅၆၇၈၉၀]/g, function (match) { + return numberMap$b[match]; + }); + }, + postformat: function (string) { + return string.replace(/\d/g, function (match) { + return symbolMap$c[match]; + }); + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + hooks.defineLocale('nb', { + months: 'januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember'.split( + '_' + ), + monthsShort: 'jan._feb._mars_apr._mai_juni_juli_aug._sep._okt._nov._des.'.split( + '_' + ), + monthsParseExact: true, + weekdays: 'søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag'.split('_'), + weekdaysShort: 'sø._ma._ti._on._to._fr._lø.'.split('_'), + weekdaysMin: 'sø_ma_ti_on_to_fr_lø'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D. MMMM YYYY', + LLL: 'D. MMMM YYYY [kl.] HH:mm', + LLLL: 'dddd D. MMMM YYYY [kl.] HH:mm', + }, + calendar: { + sameDay: '[i dag kl.] LT', + nextDay: '[i morgen kl.] LT', + nextWeek: 'dddd [kl.] LT', + lastDay: '[i går kl.] LT', + lastWeek: '[forrige] dddd [kl.] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'om %s', + past: '%s siden', + s: 'noen sekunder', + ss: '%d sekunder', + m: 'ett minutt', + mm: '%d minutter', + h: 'en time', + hh: '%d timer', + d: 'en dag', + dd: '%d dager', + M: 'en måned', + MM: '%d måneder', + y: 'ett år', + yy: '%d år', + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal: '%d.', + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var symbolMap$d = { + '1': '१', + '2': '२', + '3': '३', + '4': '४', + '5': '५', + '6': '६', + '7': '७', + '8': '८', + '9': '९', + '0': '०', + }, + numberMap$c = { + '१': '1', + '२': '2', + '३': '3', + '४': '4', + '५': '5', + '६': '6', + '७': '7', + '८': '8', + '९': '9', + '०': '0', + }; + + hooks.defineLocale('ne', { + months: 'जनवरी_फेब्रुवरी_मार्च_अप्रिल_मई_जुन_जुलाई_अगष्ट_सेप्टेम्बर_अक्टोबर_नोभेम्बर_डिसेम्बर'.split( + '_' + ), + monthsShort: 'जन._फेब्रु._मार्च_अप्रि._मई_जुन_जुलाई._अग._सेप्ट._अक्टो._नोभे._डिसे.'.split( + '_' + ), + monthsParseExact: true, + weekdays: 'आइतबार_सोमबार_मङ्गलबार_बुधबार_बिहिबार_शुक्रबार_शनिबार'.split( + '_' + ), + weekdaysShort: 'आइत._सोम._मङ्गल._बुध._बिहि._शुक्र._शनि.'.split('_'), + weekdaysMin: 'आ._सो._मं._बु._बि._शु._श.'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'Aको h:mm बजे', + LTS: 'Aको h:mm:ss बजे', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY, Aको h:mm बजे', + LLLL: 'dddd, D MMMM YYYY, Aको h:mm बजे', + }, + preparse: function (string) { + return string.replace(/[१२३४५६७८९०]/g, function (match) { + return numberMap$c[match]; + }); + }, + postformat: function (string) { + return string.replace(/\d/g, function (match) { + return symbolMap$d[match]; + }); + }, + meridiemParse: /राति|बिहान|दिउँसो|साँझ/, + meridiemHour: function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === 'राति') { + return hour < 4 ? hour : hour + 12; + } else if (meridiem === 'बिहान') { + return hour; + } else if (meridiem === 'दिउँसो') { + return hour >= 10 ? hour : hour + 12; + } else if (meridiem === 'साँझ') { + return hour + 12; + } + }, + meridiem: function (hour, minute, isLower) { + if (hour < 3) { + return 'राति'; + } else if (hour < 12) { + return 'बिहान'; + } else if (hour < 16) { + return 'दिउँसो'; + } else if (hour < 20) { + return 'साँझ'; + } else { + return 'राति'; + } + }, + calendar: { + sameDay: '[आज] LT', + nextDay: '[भोलि] LT', + nextWeek: '[आउँदो] dddd[,] LT', + lastDay: '[हिजो] LT', + lastWeek: '[गएको] dddd[,] LT', + sameElse: 'L', + }, + relativeTime: { + future: '%sमा', + past: '%s अगाडि', + s: 'केही क्षण', + ss: '%d सेकेण्ड', + m: 'एक मिनेट', + mm: '%d मिनेट', + h: 'एक घण्टा', + hh: '%d घण्टा', + d: 'एक दिन', + dd: '%d दिन', + M: 'एक महिना', + MM: '%d महिना', + y: 'एक बर्ष', + yy: '%d बर्ष', + }, + week: { + dow: 0, // Sunday is the first day of the week. + doy: 6, // The week that contains Jan 6th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var monthsShortWithDots$1 = 'jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.'.split( + '_' + ), + monthsShortWithoutDots$1 = 'jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec'.split( + '_' + ), + monthsParse$6 = [ + /^jan/i, + /^feb/i, + /^maart|mrt.?$/i, + /^apr/i, + /^mei$/i, + /^jun[i.]?$/i, + /^jul[i.]?$/i, + /^aug/i, + /^sep/i, + /^okt/i, + /^nov/i, + /^dec/i, + ], + monthsRegex$7 = /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i; + + hooks.defineLocale('nl-be', { + months: 'januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december'.split( + '_' + ), + monthsShort: function (m, format) { + if (!m) { + return monthsShortWithDots$1; + } else if (/-MMM-/.test(format)) { + return monthsShortWithoutDots$1[m.month()]; + } else { + return monthsShortWithDots$1[m.month()]; + } + }, + + monthsRegex: monthsRegex$7, + monthsShortRegex: monthsRegex$7, + monthsStrictRegex: /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i, + monthsShortStrictRegex: /^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i, + + monthsParse: monthsParse$6, + longMonthsParse: monthsParse$6, + shortMonthsParse: monthsParse$6, + + weekdays: 'zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag'.split( + '_' + ), + weekdaysShort: 'zo._ma._di._wo._do._vr._za.'.split('_'), + weekdaysMin: 'zo_ma_di_wo_do_vr_za'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[vandaag om] LT', + nextDay: '[morgen om] LT', + nextWeek: 'dddd [om] LT', + lastDay: '[gisteren om] LT', + lastWeek: '[afgelopen] dddd [om] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'over %s', + past: '%s geleden', + s: 'een paar seconden', + ss: '%d seconden', + m: 'één minuut', + mm: '%d minuten', + h: 'één uur', + hh: '%d uur', + d: 'één dag', + dd: '%d dagen', + M: 'één maand', + MM: '%d maanden', + y: 'één jaar', + yy: '%d jaar', + }, + dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/, + ordinal: function (number) { + return ( + number + + (number === 1 || number === 8 || number >= 20 ? 'ste' : 'de') + ); + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var monthsShortWithDots$2 = 'jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.'.split( + '_' + ), + monthsShortWithoutDots$2 = 'jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec'.split( + '_' + ), + monthsParse$7 = [ + /^jan/i, + /^feb/i, + /^maart|mrt.?$/i, + /^apr/i, + /^mei$/i, + /^jun[i.]?$/i, + /^jul[i.]?$/i, + /^aug/i, + /^sep/i, + /^okt/i, + /^nov/i, + /^dec/i, + ], + monthsRegex$8 = /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i; + + hooks.defineLocale('nl', { + months: 'januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december'.split( + '_' + ), + monthsShort: function (m, format) { + if (!m) { + return monthsShortWithDots$2; + } else if (/-MMM-/.test(format)) { + return monthsShortWithoutDots$2[m.month()]; + } else { + return monthsShortWithDots$2[m.month()]; + } + }, + + monthsRegex: monthsRegex$8, + monthsShortRegex: monthsRegex$8, + monthsStrictRegex: /^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i, + monthsShortStrictRegex: /^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i, + + monthsParse: monthsParse$7, + longMonthsParse: monthsParse$7, + shortMonthsParse: monthsParse$7, + + weekdays: 'zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag'.split( + '_' + ), + weekdaysShort: 'zo._ma._di._wo._do._vr._za.'.split('_'), + weekdaysMin: 'zo_ma_di_wo_do_vr_za'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD-MM-YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[vandaag om] LT', + nextDay: '[morgen om] LT', + nextWeek: 'dddd [om] LT', + lastDay: '[gisteren om] LT', + lastWeek: '[afgelopen] dddd [om] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'over %s', + past: '%s geleden', + s: 'een paar seconden', + ss: '%d seconden', + m: 'één minuut', + mm: '%d minuten', + h: 'één uur', + hh: '%d uur', + d: 'één dag', + dd: '%d dagen', + M: 'één maand', + MM: '%d maanden', + y: 'één jaar', + yy: '%d jaar', + }, + dayOfMonthOrdinalParse: /\d{1,2}(ste|de)/, + ordinal: function (number) { + return ( + number + + (number === 1 || number === 8 || number >= 20 ? 'ste' : 'de') + ); + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + hooks.defineLocale('nn', { + months: 'januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember'.split( + '_' + ), + monthsShort: 'jan._feb._mars_apr._mai_juni_juli_aug._sep._okt._nov._des.'.split( + '_' + ), + monthsParseExact: true, + weekdays: 'sundag_måndag_tysdag_onsdag_torsdag_fredag_laurdag'.split('_'), + weekdaysShort: 'su._må._ty._on._to._fr._lau.'.split('_'), + weekdaysMin: 'su_må_ty_on_to_fr_la'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D. MMMM YYYY', + LLL: 'D. MMMM YYYY [kl.] H:mm', + LLLL: 'dddd D. MMMM YYYY [kl.] HH:mm', + }, + calendar: { + sameDay: '[I dag klokka] LT', + nextDay: '[I morgon klokka] LT', + nextWeek: 'dddd [klokka] LT', + lastDay: '[I går klokka] LT', + lastWeek: '[Føregåande] dddd [klokka] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'om %s', + past: '%s sidan', + s: 'nokre sekund', + ss: '%d sekund', + m: 'eit minutt', + mm: '%d minutt', + h: 'ein time', + hh: '%d timar', + d: 'ein dag', + dd: '%d dagar', + M: 'ein månad', + MM: '%d månader', + y: 'eit år', + yy: '%d år', + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal: '%d.', + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + hooks.defineLocale('oc-lnc', { + months: { + standalone: 'genièr_febrièr_març_abril_mai_junh_julhet_agost_setembre_octòbre_novembre_decembre'.split( + '_' + ), + format: "de genièr_de febrièr_de març_d'abril_de mai_de junh_de julhet_d'agost_de setembre_d'octòbre_de novembre_de decembre".split( + '_' + ), + isFormat: /D[oD]?(\s)+MMMM/, + }, + monthsShort: 'gen._febr._març_abr._mai_junh_julh._ago._set._oct._nov._dec.'.split( + '_' + ), + monthsParseExact: true, + weekdays: 'dimenge_diluns_dimars_dimècres_dijòus_divendres_dissabte'.split( + '_' + ), + weekdaysShort: 'dg._dl._dm._dc._dj._dv._ds.'.split('_'), + weekdaysMin: 'dg_dl_dm_dc_dj_dv_ds'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'H:mm', + LTS: 'H:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM [de] YYYY', + ll: 'D MMM YYYY', + LLL: 'D MMMM [de] YYYY [a] H:mm', + lll: 'D MMM YYYY, H:mm', + LLLL: 'dddd D MMMM [de] YYYY [a] H:mm', + llll: 'ddd D MMM YYYY, H:mm', + }, + calendar: { + sameDay: '[uèi a] LT', + nextDay: '[deman a] LT', + nextWeek: 'dddd [a] LT', + lastDay: '[ièr a] LT', + lastWeek: 'dddd [passat a] LT', + sameElse: 'L', + }, + relativeTime: { + future: "d'aquí %s", + past: 'fa %s', + s: 'unas segondas', + ss: '%d segondas', + m: 'una minuta', + mm: '%d minutas', + h: 'una ora', + hh: '%d oras', + d: 'un jorn', + dd: '%d jorns', + M: 'un mes', + MM: '%d meses', + y: 'un an', + yy: '%d ans', + }, + dayOfMonthOrdinalParse: /\d{1,2}(r|n|t|è|a)/, + ordinal: function (number, period) { + var output = + number === 1 + ? 'r' + : number === 2 + ? 'n' + : number === 3 + ? 'r' + : number === 4 + ? 't' + : 'è'; + if (period === 'w' || period === 'W') { + output = 'a'; + } + return number + output; + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, + }, + }); + + //! moment.js locale configuration + + var symbolMap$e = { + '1': '੧', + '2': '੨', + '3': '੩', + '4': '੪', + '5': '੫', + '6': '੬', + '7': '੭', + '8': '੮', + '9': '੯', + '0': '੦', + }, + numberMap$d = { + '੧': '1', + '੨': '2', + '੩': '3', + '੪': '4', + '੫': '5', + '੬': '6', + '੭': '7', + '੮': '8', + '੯': '9', + '੦': '0', + }; + + hooks.defineLocale('pa-in', { + // There are months name as per Nanakshahi Calendar but they are not used as rigidly in modern Punjabi. + months: 'ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ'.split( + '_' + ), + monthsShort: 'ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ'.split( + '_' + ), + weekdays: 'ਐਤਵਾਰ_ਸੋਮਵਾਰ_ਮੰਗਲਵਾਰ_ਬੁਧਵਾਰ_ਵੀਰਵਾਰ_ਸ਼ੁੱਕਰਵਾਰ_ਸ਼ਨੀਚਰਵਾਰ'.split( + '_' + ), + weekdaysShort: 'ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ'.split('_'), + weekdaysMin: 'ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ'.split('_'), + longDateFormat: { + LT: 'A h:mm ਵਜੇ', + LTS: 'A h:mm:ss ਵਜੇ', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY, A h:mm ਵਜੇ', + LLLL: 'dddd, D MMMM YYYY, A h:mm ਵਜੇ', + }, + calendar: { + sameDay: '[ਅਜ] LT', + nextDay: '[ਕਲ] LT', + nextWeek: '[ਅਗਲਾ] dddd, LT', + lastDay: '[ਕਲ] LT', + lastWeek: '[ਪਿਛਲੇ] dddd, LT', + sameElse: 'L', + }, + relativeTime: { + future: '%s ਵਿੱਚ', + past: '%s ਪਿਛਲੇ', + s: 'ਕੁਝ ਸਕਿੰਟ', + ss: '%d ਸਕਿੰਟ', + m: 'ਇਕ ਮਿੰਟ', + mm: '%d ਮਿੰਟ', + h: 'ਇੱਕ ਘੰਟਾ', + hh: '%d ਘੰਟੇ', + d: 'ਇੱਕ ਦਿਨ', + dd: '%d ਦਿਨ', + M: 'ਇੱਕ ਮਹੀਨਾ', + MM: '%d ਮਹੀਨੇ', + y: 'ਇੱਕ ਸਾਲ', + yy: '%d ਸਾਲ', + }, + preparse: function (string) { + return string.replace(/[੧੨੩੪੫੬੭੮੯੦]/g, function (match) { + return numberMap$d[match]; + }); + }, + postformat: function (string) { + return string.replace(/\d/g, function (match) { + return symbolMap$e[match]; + }); + }, + // Punjabi notation for meridiems are quite fuzzy in practice. While there exists + // a rigid notion of a 'Pahar' it is not used as rigidly in modern Punjabi. + meridiemParse: /ਰਾਤ|ਸਵੇਰ|ਦੁਪਹਿਰ|ਸ਼ਾਮ/, + meridiemHour: function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === 'ਰਾਤ') { + return hour < 4 ? hour : hour + 12; + } else if (meridiem === 'ਸਵੇਰ') { + return hour; + } else if (meridiem === 'ਦੁਪਹਿਰ') { + return hour >= 10 ? hour : hour + 12; + } else if (meridiem === 'ਸ਼ਾਮ') { + return hour + 12; + } + }, + meridiem: function (hour, minute, isLower) { + if (hour < 4) { + return 'ਰਾਤ'; + } else if (hour < 10) { + return 'ਸਵੇਰ'; + } else if (hour < 17) { + return 'ਦੁਪਹਿਰ'; + } else if (hour < 20) { + return 'ਸ਼ਾਮ'; + } else { + return 'ਰਾਤ'; + } + }, + week: { + dow: 0, // Sunday is the first day of the week. + doy: 6, // The week that contains Jan 6th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var monthsNominative = 'styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień'.split( + '_' + ), + monthsSubjective = 'stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_września_października_listopada_grudnia'.split( + '_' + ); + function plural$3(n) { + return n % 10 < 5 && n % 10 > 1 && ~~(n / 10) % 10 !== 1; + } + function translate$8(number, withoutSuffix, key) { + var result = number + ' '; + switch (key) { + case 'ss': + return result + (plural$3(number) ? 'sekundy' : 'sekund'); + case 'm': + return withoutSuffix ? 'minuta' : 'minutę'; + case 'mm': + return result + (plural$3(number) ? 'minuty' : 'minut'); + case 'h': + return withoutSuffix ? 'godzina' : 'godzinę'; + case 'hh': + return result + (plural$3(number) ? 'godziny' : 'godzin'); + case 'MM': + return result + (plural$3(number) ? 'miesiące' : 'miesięcy'); + case 'yy': + return result + (plural$3(number) ? 'lata' : 'lat'); + } + } + + hooks.defineLocale('pl', { + months: function (momentToFormat, format) { + if (!momentToFormat) { + return monthsNominative; + } else if (format === '') { + // Hack: if format empty we know this is used to generate + // RegExp by moment. Give then back both valid forms of months + // in RegExp ready format. + return ( + '(' + + monthsSubjective[momentToFormat.month()] + + '|' + + monthsNominative[momentToFormat.month()] + + ')' + ); + } else if (/D MMMM/.test(format)) { + return monthsSubjective[momentToFormat.month()]; + } else { + return monthsNominative[momentToFormat.month()]; + } + }, + monthsShort: 'sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru'.split('_'), + weekdays: 'niedziela_poniedziałek_wtorek_środa_czwartek_piątek_sobota'.split( + '_' + ), + weekdaysShort: 'ndz_pon_wt_śr_czw_pt_sob'.split('_'), + weekdaysMin: 'Nd_Pn_Wt_Śr_Cz_Pt_So'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[Dziś o] LT', + nextDay: '[Jutro o] LT', + nextWeek: function () { + switch (this.day()) { + case 0: + return '[W niedzielę o] LT'; + + case 2: + return '[We wtorek o] LT'; + + case 3: + return '[W środę o] LT'; + + case 6: + return '[W sobotę o] LT'; + + default: + return '[W] dddd [o] LT'; + } + }, + lastDay: '[Wczoraj o] LT', + lastWeek: function () { + switch (this.day()) { + case 0: + return '[W zeszłą niedzielę o] LT'; + case 3: + return '[W zeszłą środę o] LT'; + case 6: + return '[W zeszłą sobotę o] LT'; + default: + return '[W zeszły] dddd [o] LT'; + } + }, + sameElse: 'L', + }, + relativeTime: { + future: 'za %s', + past: '%s temu', + s: 'kilka sekund', + ss: translate$8, + m: translate$8, + mm: translate$8, + h: translate$8, + hh: translate$8, + d: '1 dzień', + dd: '%d dni', + M: 'miesiąc', + MM: translate$8, + y: 'rok', + yy: translate$8, + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal: '%d.', + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + hooks.defineLocale('pt-br', { + months: 'janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro'.split( + '_' + ), + monthsShort: 'jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez'.split('_'), + weekdays: 'domingo_segunda-feira_terça-feira_quarta-feira_quinta-feira_sexta-feira_sábado'.split( + '_' + ), + weekdaysShort: 'dom_seg_ter_qua_qui_sex_sáb'.split('_'), + weekdaysMin: 'do_2ª_3ª_4ª_5ª_6ª_sá'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D [de] MMMM [de] YYYY', + LLL: 'D [de] MMMM [de] YYYY [às] HH:mm', + LLLL: 'dddd, D [de] MMMM [de] YYYY [às] HH:mm', + }, + calendar: { + sameDay: '[Hoje às] LT', + nextDay: '[Amanhã às] LT', + nextWeek: 'dddd [às] LT', + lastDay: '[Ontem às] LT', + lastWeek: function () { + return this.day() === 0 || this.day() === 6 + ? '[Último] dddd [às] LT' // Saturday + Sunday + : '[Última] dddd [às] LT'; // Monday - Friday + }, + sameElse: 'L', + }, + relativeTime: { + future: 'em %s', + past: 'há %s', + s: 'poucos segundos', + ss: '%d segundos', + m: 'um minuto', + mm: '%d minutos', + h: 'uma hora', + hh: '%d horas', + d: 'um dia', + dd: '%d dias', + M: 'um mês', + MM: '%d meses', + y: 'um ano', + yy: '%d anos', + }, + dayOfMonthOrdinalParse: /\d{1,2}º/, + ordinal: '%dº', + }); + + //! moment.js locale configuration + + hooks.defineLocale('pt', { + months: 'janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro'.split( + '_' + ), + monthsShort: 'jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez'.split('_'), + weekdays: 'Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado'.split( + '_' + ), + weekdaysShort: 'Dom_Seg_Ter_Qua_Qui_Sex_Sáb'.split('_'), + weekdaysMin: 'Do_2ª_3ª_4ª_5ª_6ª_Sá'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D [de] MMMM [de] YYYY', + LLL: 'D [de] MMMM [de] YYYY HH:mm', + LLLL: 'dddd, D [de] MMMM [de] YYYY HH:mm', + }, + calendar: { + sameDay: '[Hoje às] LT', + nextDay: '[Amanhã às] LT', + nextWeek: 'dddd [às] LT', + lastDay: '[Ontem às] LT', + lastWeek: function () { + return this.day() === 0 || this.day() === 6 + ? '[Último] dddd [às] LT' // Saturday + Sunday + : '[Última] dddd [às] LT'; // Monday - Friday + }, + sameElse: 'L', + }, + relativeTime: { + future: 'em %s', + past: 'há %s', + s: 'segundos', + ss: '%d segundos', + m: 'um minuto', + mm: '%d minutos', + h: 'uma hora', + hh: '%d horas', + d: 'um dia', + dd: '%d dias', + M: 'um mês', + MM: '%d meses', + y: 'um ano', + yy: '%d anos', + }, + dayOfMonthOrdinalParse: /\d{1,2}º/, + ordinal: '%dº', + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + function relativeTimeWithPlural$2(number, withoutSuffix, key) { + var format = { + ss: 'secunde', + mm: 'minute', + hh: 'ore', + dd: 'zile', + MM: 'luni', + yy: 'ani', + }, + separator = ' '; + if (number % 100 >= 20 || (number >= 100 && number % 100 === 0)) { + separator = ' de '; + } + return number + separator + format[key]; + } + + hooks.defineLocale('ro', { + months: 'ianuarie_februarie_martie_aprilie_mai_iunie_iulie_august_septembrie_octombrie_noiembrie_decembrie'.split( + '_' + ), + monthsShort: 'ian._feb._mart._apr._mai_iun._iul._aug._sept._oct._nov._dec.'.split( + '_' + ), + monthsParseExact: true, + weekdays: 'duminică_luni_marți_miercuri_joi_vineri_sâmbătă'.split('_'), + weekdaysShort: 'Dum_Lun_Mar_Mie_Joi_Vin_Sâm'.split('_'), + weekdaysMin: 'Du_Lu_Ma_Mi_Jo_Vi_Sâ'.split('_'), + longDateFormat: { + LT: 'H:mm', + LTS: 'H:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY H:mm', + LLLL: 'dddd, D MMMM YYYY H:mm', + }, + calendar: { + sameDay: '[azi la] LT', + nextDay: '[mâine la] LT', + nextWeek: 'dddd [la] LT', + lastDay: '[ieri la] LT', + lastWeek: '[fosta] dddd [la] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'peste %s', + past: '%s în urmă', + s: 'câteva secunde', + ss: relativeTimeWithPlural$2, + m: 'un minut', + mm: relativeTimeWithPlural$2, + h: 'o oră', + hh: relativeTimeWithPlural$2, + d: 'o zi', + dd: relativeTimeWithPlural$2, + M: 'o lună', + MM: relativeTimeWithPlural$2, + y: 'un an', + yy: relativeTimeWithPlural$2, + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 7, // The week that contains Jan 7th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + function plural$4(word, num) { + var forms = word.split('_'); + return num % 10 === 1 && num % 100 !== 11 + ? forms[0] + : num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20) + ? forms[1] + : forms[2]; + } + function relativeTimeWithPlural$3(number, withoutSuffix, key) { + var format = { + ss: withoutSuffix ? 'секунда_секунды_секунд' : 'секунду_секунды_секунд', + mm: withoutSuffix ? 'минута_минуты_минут' : 'минуту_минуты_минут', + hh: 'час_часа_часов', + dd: 'день_дня_дней', + MM: 'месяц_месяца_месяцев', + yy: 'год_года_лет', + }; + if (key === 'm') { + return withoutSuffix ? 'минута' : 'минуту'; + } else { + return number + ' ' + plural$4(format[key], +number); + } + } + var monthsParse$8 = [ + /^янв/i, + /^фев/i, + /^мар/i, + /^апр/i, + /^ма[йя]/i, + /^июн/i, + /^июл/i, + /^авг/i, + /^сен/i, + /^окт/i, + /^ноя/i, + /^дек/i, + ]; + + // http://new.gramota.ru/spravka/rules/139-prop : § 103 + // Сокращения месяцев: http://new.gramota.ru/spravka/buro/search-answer?s=242637 + // CLDR data: http://www.unicode.org/cldr/charts/28/summary/ru.html#1753 + hooks.defineLocale('ru', { + months: { + format: 'января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря'.split( + '_' + ), + standalone: 'январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь'.split( + '_' + ), + }, + monthsShort: { + // по CLDR именно "июл." и "июн.", но какой смысл менять букву на точку? + format: 'янв._февр._мар._апр._мая_июня_июля_авг._сент._окт._нояб._дек.'.split( + '_' + ), + standalone: 'янв._февр._март_апр._май_июнь_июль_авг._сент._окт._нояб._дек.'.split( + '_' + ), + }, + weekdays: { + standalone: 'воскресенье_понедельник_вторник_среда_четверг_пятница_суббота'.split( + '_' + ), + format: 'воскресенье_понедельник_вторник_среду_четверг_пятницу_субботу'.split( + '_' + ), + isFormat: /\[ ?[Вв] ?(?:прошлую|следующую|эту)? ?] ?dddd/, + }, + weekdaysShort: 'вс_пн_вт_ср_чт_пт_сб'.split('_'), + weekdaysMin: 'вс_пн_вт_ср_чт_пт_сб'.split('_'), + monthsParse: monthsParse$8, + longMonthsParse: monthsParse$8, + shortMonthsParse: monthsParse$8, + + // полные названия с падежами, по три буквы, для некоторых, по 4 буквы, сокращения с точкой и без точки + monthsRegex: /^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i, + + // копия предыдущего + monthsShortRegex: /^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i, + + // полные названия с падежами + monthsStrictRegex: /^(январ[яь]|феврал[яь]|марта?|апрел[яь]|ма[яй]|июн[яь]|июл[яь]|августа?|сентябр[яь]|октябр[яь]|ноябр[яь]|декабр[яь])/i, + + // Выражение, которое соответствует только сокращённым формам + monthsShortStrictRegex: /^(янв\.|февр?\.|мар[т.]|апр\.|ма[яй]|июн[ья.]|июл[ья.]|авг\.|сент?\.|окт\.|нояб?\.|дек\.)/i, + longDateFormat: { + LT: 'H:mm', + LTS: 'H:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D MMMM YYYY г.', + LLL: 'D MMMM YYYY г., H:mm', + LLLL: 'dddd, D MMMM YYYY г., H:mm', + }, + calendar: { + sameDay: '[Сегодня, в] LT', + nextDay: '[Завтра, в] LT', + lastDay: '[Вчера, в] LT', + nextWeek: function (now) { + if (now.week() !== this.week()) { + switch (this.day()) { + case 0: + return '[В следующее] dddd, [в] LT'; + case 1: + case 2: + case 4: + return '[В следующий] dddd, [в] LT'; + case 3: + case 5: + case 6: + return '[В следующую] dddd, [в] LT'; + } + } else { + if (this.day() === 2) { + return '[Во] dddd, [в] LT'; + } else { + return '[В] dddd, [в] LT'; + } + } + }, + lastWeek: function (now) { + if (now.week() !== this.week()) { + switch (this.day()) { + case 0: + return '[В прошлое] dddd, [в] LT'; + case 1: + case 2: + case 4: + return '[В прошлый] dddd, [в] LT'; + case 3: + case 5: + case 6: + return '[В прошлую] dddd, [в] LT'; + } + } else { + if (this.day() === 2) { + return '[Во] dddd, [в] LT'; + } else { + return '[В] dddd, [в] LT'; + } + } + }, + sameElse: 'L', + }, + relativeTime: { + future: 'через %s', + past: '%s назад', + s: 'несколько секунд', + ss: relativeTimeWithPlural$3, + m: relativeTimeWithPlural$3, + mm: relativeTimeWithPlural$3, + h: 'час', + hh: relativeTimeWithPlural$3, + d: 'день', + dd: relativeTimeWithPlural$3, + M: 'месяц', + MM: relativeTimeWithPlural$3, + y: 'год', + yy: relativeTimeWithPlural$3, + }, + meridiemParse: /ночи|утра|дня|вечера/i, + isPM: function (input) { + return /^(дня|вечера)$/.test(input); + }, + meridiem: function (hour, minute, isLower) { + if (hour < 4) { + return 'ночи'; + } else if (hour < 12) { + return 'утра'; + } else if (hour < 17) { + return 'дня'; + } else { + return 'вечера'; + } + }, + dayOfMonthOrdinalParse: /\d{1,2}-(й|го|я)/, + ordinal: function (number, period) { + switch (period) { + case 'M': + case 'd': + case 'DDD': + return number + '-й'; + case 'D': + return number + '-го'; + case 'w': + case 'W': + return number + '-я'; + default: + return number; + } + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var months$9 = [ + 'جنوري', + 'فيبروري', + 'مارچ', + 'اپريل', + 'مئي', + 'جون', + 'جولاءِ', + 'آگسٽ', + 'سيپٽمبر', + 'آڪٽوبر', + 'نومبر', + 'ڊسمبر', + ], + days$1 = ['آچر', 'سومر', 'اڱارو', 'اربع', 'خميس', 'جمع', 'ڇنڇر']; + + hooks.defineLocale('sd', { + months: months$9, + monthsShort: months$9, + weekdays: days$1, + weekdaysShort: days$1, + weekdaysMin: days$1, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd، D MMMM YYYY HH:mm', + }, + meridiemParse: /صبح|شام/, + isPM: function (input) { + return 'شام' === input; + }, + meridiem: function (hour, minute, isLower) { + if (hour < 12) { + return 'صبح'; + } + return 'شام'; + }, + calendar: { + sameDay: '[اڄ] LT', + nextDay: '[سڀاڻي] LT', + nextWeek: 'dddd [اڳين هفتي تي] LT', + lastDay: '[ڪالهه] LT', + lastWeek: '[گزريل هفتي] dddd [تي] LT', + sameElse: 'L', + }, + relativeTime: { + future: '%s پوء', + past: '%s اڳ', + s: 'چند سيڪنڊ', + ss: '%d سيڪنڊ', + m: 'هڪ منٽ', + mm: '%d منٽ', + h: 'هڪ ڪلاڪ', + hh: '%d ڪلاڪ', + d: 'هڪ ڏينهن', + dd: '%d ڏينهن', + M: 'هڪ مهينو', + MM: '%d مهينا', + y: 'هڪ سال', + yy: '%d سال', + }, + preparse: function (string) { + return string.replace(/،/g, ','); + }, + postformat: function (string) { + return string.replace(/,/g, '،'); + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + hooks.defineLocale('se', { + months: 'ođđajagemánnu_guovvamánnu_njukčamánnu_cuoŋománnu_miessemánnu_geassemánnu_suoidnemánnu_borgemánnu_čakčamánnu_golggotmánnu_skábmamánnu_juovlamánnu'.split( + '_' + ), + monthsShort: 'ođđj_guov_njuk_cuo_mies_geas_suoi_borg_čakč_golg_skáb_juov'.split( + '_' + ), + weekdays: 'sotnabeaivi_vuossárga_maŋŋebárga_gaskavahkku_duorastat_bearjadat_lávvardat'.split( + '_' + ), + weekdaysShort: 'sotn_vuos_maŋ_gask_duor_bear_láv'.split('_'), + weekdaysMin: 's_v_m_g_d_b_L'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD.MM.YYYY', + LL: 'MMMM D. [b.] YYYY', + LLL: 'MMMM D. [b.] YYYY [ti.] HH:mm', + LLLL: 'dddd, MMMM D. [b.] YYYY [ti.] HH:mm', + }, + calendar: { + sameDay: '[otne ti] LT', + nextDay: '[ihttin ti] LT', + nextWeek: 'dddd [ti] LT', + lastDay: '[ikte ti] LT', + lastWeek: '[ovddit] dddd [ti] LT', + sameElse: 'L', + }, + relativeTime: { + future: '%s geažes', + past: 'maŋit %s', + s: 'moadde sekunddat', + ss: '%d sekunddat', + m: 'okta minuhta', + mm: '%d minuhtat', + h: 'okta diimmu', + hh: '%d diimmut', + d: 'okta beaivi', + dd: '%d beaivvit', + M: 'okta mánnu', + MM: '%d mánut', + y: 'okta jahki', + yy: '%d jagit', + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal: '%d.', + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + /*jshint -W100*/ + hooks.defineLocale('si', { + months: 'ජනවාරි_පෙබරවාරි_මාර්තු_අප්‍රේල්_මැයි_ජූනි_ජූලි_අගෝස්තු_සැප්තැම්බර්_ඔක්තෝබර්_නොවැම්බර්_දෙසැම්බර්'.split( + '_' + ), + monthsShort: 'ජන_පෙබ_මාර්_අප්_මැයි_ජූනි_ජූලි_අගෝ_සැප්_ඔක්_නොවැ_දෙසැ'.split( + '_' + ), + weekdays: 'ඉරිදා_සඳුදා_අඟහරුවාදා_බදාදා_බ්‍රහස්පතින්දා_සිකුරාදා_සෙනසුරාදා'.split( + '_' + ), + weekdaysShort: 'ඉරි_සඳු_අඟ_බදා_බ්‍රහ_සිකු_සෙන'.split('_'), + weekdaysMin: 'ඉ_ස_අ_බ_බ්‍ර_සි_සෙ'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'a h:mm', + LTS: 'a h:mm:ss', + L: 'YYYY/MM/DD', + LL: 'YYYY MMMM D', + LLL: 'YYYY MMMM D, a h:mm', + LLLL: 'YYYY MMMM D [වැනි] dddd, a h:mm:ss', + }, + calendar: { + sameDay: '[අද] LT[ට]', + nextDay: '[හෙට] LT[ට]', + nextWeek: 'dddd LT[ට]', + lastDay: '[ඊයේ] LT[ට]', + lastWeek: '[පසුගිය] dddd LT[ට]', + sameElse: 'L', + }, + relativeTime: { + future: '%sකින්', + past: '%sකට පෙර', + s: 'තත්පර කිහිපය', + ss: 'තත්පර %d', + m: 'මිනිත්තුව', + mm: 'මිනිත්තු %d', + h: 'පැය', + hh: 'පැය %d', + d: 'දිනය', + dd: 'දින %d', + M: 'මාසය', + MM: 'මාස %d', + y: 'වසර', + yy: 'වසර %d', + }, + dayOfMonthOrdinalParse: /\d{1,2} වැනි/, + ordinal: function (number) { + return number + ' වැනි'; + }, + meridiemParse: /පෙර වරු|පස් වරු|පෙ.ව|ප.ව./, + isPM: function (input) { + return input === 'ප.ව.' || input === 'පස් වරු'; + }, + meridiem: function (hours, minutes, isLower) { + if (hours > 11) { + return isLower ? 'ප.ව.' : 'පස් වරු'; + } else { + return isLower ? 'පෙ.ව.' : 'පෙර වරු'; + } + }, + }); + + //! moment.js locale configuration + + var months$a = 'január_február_marec_apríl_máj_jún_júl_august_september_október_november_december'.split( + '_' + ), + monthsShort$6 = 'jan_feb_mar_apr_máj_jún_júl_aug_sep_okt_nov_dec'.split('_'); + function plural$5(n) { + return n > 1 && n < 5; + } + function translate$9(number, withoutSuffix, key, isFuture) { + var result = number + ' '; + switch (key) { + case 's': // a few seconds / in a few seconds / a few seconds ago + return withoutSuffix || isFuture ? 'pár sekúnd' : 'pár sekundami'; + case 'ss': // 9 seconds / in 9 seconds / 9 seconds ago + if (withoutSuffix || isFuture) { + return result + (plural$5(number) ? 'sekundy' : 'sekúnd'); + } else { + return result + 'sekundami'; + } + case 'm': // a minute / in a minute / a minute ago + return withoutSuffix ? 'minúta' : isFuture ? 'minútu' : 'minútou'; + case 'mm': // 9 minutes / in 9 minutes / 9 minutes ago + if (withoutSuffix || isFuture) { + return result + (plural$5(number) ? 'minúty' : 'minút'); + } else { + return result + 'minútami'; + } + case 'h': // an hour / in an hour / an hour ago + return withoutSuffix ? 'hodina' : isFuture ? 'hodinu' : 'hodinou'; + case 'hh': // 9 hours / in 9 hours / 9 hours ago + if (withoutSuffix || isFuture) { + return result + (plural$5(number) ? 'hodiny' : 'hodín'); + } else { + return result + 'hodinami'; + } + case 'd': // a day / in a day / a day ago + return withoutSuffix || isFuture ? 'deň' : 'dňom'; + case 'dd': // 9 days / in 9 days / 9 days ago + if (withoutSuffix || isFuture) { + return result + (plural$5(number) ? 'dni' : 'dní'); + } else { + return result + 'dňami'; + } + case 'M': // a month / in a month / a month ago + return withoutSuffix || isFuture ? 'mesiac' : 'mesiacom'; + case 'MM': // 9 months / in 9 months / 9 months ago + if (withoutSuffix || isFuture) { + return result + (plural$5(number) ? 'mesiace' : 'mesiacov'); + } else { + return result + 'mesiacmi'; + } + case 'y': // a year / in a year / a year ago + return withoutSuffix || isFuture ? 'rok' : 'rokom'; + case 'yy': // 9 years / in 9 years / 9 years ago + if (withoutSuffix || isFuture) { + return result + (plural$5(number) ? 'roky' : 'rokov'); + } else { + return result + 'rokmi'; + } + } + } + + hooks.defineLocale('sk', { + months: months$a, + monthsShort: monthsShort$6, + weekdays: 'nedeľa_pondelok_utorok_streda_štvrtok_piatok_sobota'.split('_'), + weekdaysShort: 'ne_po_ut_st_št_pi_so'.split('_'), + weekdaysMin: 'ne_po_ut_st_št_pi_so'.split('_'), + longDateFormat: { + LT: 'H:mm', + LTS: 'H:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D. MMMM YYYY', + LLL: 'D. MMMM YYYY H:mm', + LLLL: 'dddd D. MMMM YYYY H:mm', + }, + calendar: { + sameDay: '[dnes o] LT', + nextDay: '[zajtra o] LT', + nextWeek: function () { + switch (this.day()) { + case 0: + return '[v nedeľu o] LT'; + case 1: + case 2: + return '[v] dddd [o] LT'; + case 3: + return '[v stredu o] LT'; + case 4: + return '[vo štvrtok o] LT'; + case 5: + return '[v piatok o] LT'; + case 6: + return '[v sobotu o] LT'; + } + }, + lastDay: '[včera o] LT', + lastWeek: function () { + switch (this.day()) { + case 0: + return '[minulú nedeľu o] LT'; + case 1: + case 2: + return '[minulý] dddd [o] LT'; + case 3: + return '[minulú stredu o] LT'; + case 4: + case 5: + return '[minulý] dddd [o] LT'; + case 6: + return '[minulú sobotu o] LT'; + } + }, + sameElse: 'L', + }, + relativeTime: { + future: 'za %s', + past: 'pred %s', + s: translate$9, + ss: translate$9, + m: translate$9, + mm: translate$9, + h: translate$9, + hh: translate$9, + d: translate$9, + dd: translate$9, + M: translate$9, + MM: translate$9, + y: translate$9, + yy: translate$9, + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal: '%d.', + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + function processRelativeTime$7(number, withoutSuffix, key, isFuture) { + var result = number + ' '; + switch (key) { + case 's': + return withoutSuffix || isFuture + ? 'nekaj sekund' + : 'nekaj sekundami'; + case 'ss': + if (number === 1) { + result += withoutSuffix ? 'sekundo' : 'sekundi'; + } else if (number === 2) { + result += withoutSuffix || isFuture ? 'sekundi' : 'sekundah'; + } else if (number < 5) { + result += withoutSuffix || isFuture ? 'sekunde' : 'sekundah'; + } else { + result += 'sekund'; + } + return result; + case 'm': + return withoutSuffix ? 'ena minuta' : 'eno minuto'; + case 'mm': + if (number === 1) { + result += withoutSuffix ? 'minuta' : 'minuto'; + } else if (number === 2) { + result += withoutSuffix || isFuture ? 'minuti' : 'minutama'; + } else if (number < 5) { + result += withoutSuffix || isFuture ? 'minute' : 'minutami'; + } else { + result += withoutSuffix || isFuture ? 'minut' : 'minutami'; + } + return result; + case 'h': + return withoutSuffix ? 'ena ura' : 'eno uro'; + case 'hh': + if (number === 1) { + result += withoutSuffix ? 'ura' : 'uro'; + } else if (number === 2) { + result += withoutSuffix || isFuture ? 'uri' : 'urama'; + } else if (number < 5) { + result += withoutSuffix || isFuture ? 'ure' : 'urami'; + } else { + result += withoutSuffix || isFuture ? 'ur' : 'urami'; + } + return result; + case 'd': + return withoutSuffix || isFuture ? 'en dan' : 'enim dnem'; + case 'dd': + if (number === 1) { + result += withoutSuffix || isFuture ? 'dan' : 'dnem'; + } else if (number === 2) { + result += withoutSuffix || isFuture ? 'dni' : 'dnevoma'; + } else { + result += withoutSuffix || isFuture ? 'dni' : 'dnevi'; + } + return result; + case 'M': + return withoutSuffix || isFuture ? 'en mesec' : 'enim mesecem'; + case 'MM': + if (number === 1) { + result += withoutSuffix || isFuture ? 'mesec' : 'mesecem'; + } else if (number === 2) { + result += withoutSuffix || isFuture ? 'meseca' : 'mesecema'; + } else if (number < 5) { + result += withoutSuffix || isFuture ? 'mesece' : 'meseci'; + } else { + result += withoutSuffix || isFuture ? 'mesecev' : 'meseci'; + } + return result; + case 'y': + return withoutSuffix || isFuture ? 'eno leto' : 'enim letom'; + case 'yy': + if (number === 1) { + result += withoutSuffix || isFuture ? 'leto' : 'letom'; + } else if (number === 2) { + result += withoutSuffix || isFuture ? 'leti' : 'letoma'; + } else if (number < 5) { + result += withoutSuffix || isFuture ? 'leta' : 'leti'; + } else { + result += withoutSuffix || isFuture ? 'let' : 'leti'; + } + return result; + } + } + + hooks.defineLocale('sl', { + months: 'januar_februar_marec_april_maj_junij_julij_avgust_september_oktober_november_december'.split( + '_' + ), + monthsShort: 'jan._feb._mar._apr._maj._jun._jul._avg._sep._okt._nov._dec.'.split( + '_' + ), + monthsParseExact: true, + weekdays: 'nedelja_ponedeljek_torek_sreda_četrtek_petek_sobota'.split('_'), + weekdaysShort: 'ned._pon._tor._sre._čet._pet._sob.'.split('_'), + weekdaysMin: 'ne_po_to_sr_če_pe_so'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'H:mm', + LTS: 'H:mm:ss', + L: 'DD. MM. YYYY', + LL: 'D. MMMM YYYY', + LLL: 'D. MMMM YYYY H:mm', + LLLL: 'dddd, D. MMMM YYYY H:mm', + }, + calendar: { + sameDay: '[danes ob] LT', + nextDay: '[jutri ob] LT', + + nextWeek: function () { + switch (this.day()) { + case 0: + return '[v] [nedeljo] [ob] LT'; + case 3: + return '[v] [sredo] [ob] LT'; + case 6: + return '[v] [soboto] [ob] LT'; + case 1: + case 2: + case 4: + case 5: + return '[v] dddd [ob] LT'; + } + }, + lastDay: '[včeraj ob] LT', + lastWeek: function () { + switch (this.day()) { + case 0: + return '[prejšnjo] [nedeljo] [ob] LT'; + case 3: + return '[prejšnjo] [sredo] [ob] LT'; + case 6: + return '[prejšnjo] [soboto] [ob] LT'; + case 1: + case 2: + case 4: + case 5: + return '[prejšnji] dddd [ob] LT'; + } + }, + sameElse: 'L', + }, + relativeTime: { + future: 'čez %s', + past: 'pred %s', + s: processRelativeTime$7, + ss: processRelativeTime$7, + m: processRelativeTime$7, + mm: processRelativeTime$7, + h: processRelativeTime$7, + hh: processRelativeTime$7, + d: processRelativeTime$7, + dd: processRelativeTime$7, + M: processRelativeTime$7, + MM: processRelativeTime$7, + y: processRelativeTime$7, + yy: processRelativeTime$7, + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal: '%d.', + week: { + dow: 1, // Monday is the first day of the week. + doy: 7, // The week that contains Jan 7th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + hooks.defineLocale('sq', { + months: 'Janar_Shkurt_Mars_Prill_Maj_Qershor_Korrik_Gusht_Shtator_Tetor_Nëntor_Dhjetor'.split( + '_' + ), + monthsShort: 'Jan_Shk_Mar_Pri_Maj_Qer_Kor_Gus_Sht_Tet_Nën_Dhj'.split('_'), + weekdays: 'E Diel_E Hënë_E Martë_E Mërkurë_E Enjte_E Premte_E Shtunë'.split( + '_' + ), + weekdaysShort: 'Die_Hën_Mar_Mër_Enj_Pre_Sht'.split('_'), + weekdaysMin: 'D_H_Ma_Më_E_P_Sh'.split('_'), + weekdaysParseExact: true, + meridiemParse: /PD|MD/, + isPM: function (input) { + return input.charAt(0) === 'M'; + }, + meridiem: function (hours, minutes, isLower) { + return hours < 12 ? 'PD' : 'MD'; + }, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[Sot në] LT', + nextDay: '[Nesër në] LT', + nextWeek: 'dddd [në] LT', + lastDay: '[Dje në] LT', + lastWeek: 'dddd [e kaluar në] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'në %s', + past: '%s më parë', + s: 'disa sekonda', + ss: '%d sekonda', + m: 'një minutë', + mm: '%d minuta', + h: 'një orë', + hh: '%d orë', + d: 'një ditë', + dd: '%d ditë', + M: 'një muaj', + MM: '%d muaj', + y: 'një vit', + yy: '%d vite', + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal: '%d.', + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var translator$1 = { + words: { + //Different grammatical cases + ss: ['секунда', 'секунде', 'секунди'], + m: ['један минут', 'једне минуте'], + mm: ['минут', 'минуте', 'минута'], + h: ['један сат', 'једног сата'], + hh: ['сат', 'сата', 'сати'], + dd: ['дан', 'дана', 'дана'], + MM: ['месец', 'месеца', 'месеци'], + yy: ['година', 'године', 'година'], + }, + correctGrammaticalCase: function (number, wordKey) { + return number === 1 + ? wordKey[0] + : number >= 2 && number <= 4 + ? wordKey[1] + : wordKey[2]; + }, + translate: function (number, withoutSuffix, key) { + var wordKey = translator$1.words[key]; + if (key.length === 1) { + return withoutSuffix ? wordKey[0] : wordKey[1]; + } else { + return ( + number + + ' ' + + translator$1.correctGrammaticalCase(number, wordKey) + ); + } + }, + }; + + hooks.defineLocale('sr-cyrl', { + months: 'јануар_фебруар_март_април_мај_јун_јул_август_септембар_октобар_новембар_децембар'.split( + '_' + ), + monthsShort: 'јан._феб._мар._апр._мај_јун_јул_авг._сеп._окт._нов._дец.'.split( + '_' + ), + monthsParseExact: true, + weekdays: 'недеља_понедељак_уторак_среда_четвртак_петак_субота'.split('_'), + weekdaysShort: 'нед._пон._уто._сре._чет._пет._суб.'.split('_'), + weekdaysMin: 'не_по_ут_ср_че_пе_су'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'H:mm', + LTS: 'H:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D. MMMM YYYY', + LLL: 'D. MMMM YYYY H:mm', + LLLL: 'dddd, D. MMMM YYYY H:mm', + }, + calendar: { + sameDay: '[данас у] LT', + nextDay: '[сутра у] LT', + nextWeek: function () { + switch (this.day()) { + case 0: + return '[у] [недељу] [у] LT'; + case 3: + return '[у] [среду] [у] LT'; + case 6: + return '[у] [суботу] [у] LT'; + case 1: + case 2: + case 4: + case 5: + return '[у] dddd [у] LT'; + } + }, + lastDay: '[јуче у] LT', + lastWeek: function () { + var lastWeekDays = [ + '[прошле] [недеље] [у] LT', + '[прошлог] [понедељка] [у] LT', + '[прошлог] [уторка] [у] LT', + '[прошле] [среде] [у] LT', + '[прошлог] [четвртка] [у] LT', + '[прошлог] [петка] [у] LT', + '[прошле] [суботе] [у] LT', + ]; + return lastWeekDays[this.day()]; + }, + sameElse: 'L', + }, + relativeTime: { + future: 'за %s', + past: 'пре %s', + s: 'неколико секунди', + ss: translator$1.translate, + m: translator$1.translate, + mm: translator$1.translate, + h: translator$1.translate, + hh: translator$1.translate, + d: 'дан', + dd: translator$1.translate, + M: 'месец', + MM: translator$1.translate, + y: 'годину', + yy: translator$1.translate, + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal: '%d.', + week: { + dow: 1, // Monday is the first day of the week. + doy: 7, // The week that contains Jan 7th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var translator$2 = { + words: { + //Different grammatical cases + ss: ['sekunda', 'sekunde', 'sekundi'], + m: ['jedan minut', 'jedne minute'], + mm: ['minut', 'minute', 'minuta'], + h: ['jedan sat', 'jednog sata'], + hh: ['sat', 'sata', 'sati'], + dd: ['dan', 'dana', 'dana'], + MM: ['mesec', 'meseca', 'meseci'], + yy: ['godina', 'godine', 'godina'], + }, + correctGrammaticalCase: function (number, wordKey) { + return number === 1 + ? wordKey[0] + : number >= 2 && number <= 4 + ? wordKey[1] + : wordKey[2]; + }, + translate: function (number, withoutSuffix, key) { + var wordKey = translator$2.words[key]; + if (key.length === 1) { + return withoutSuffix ? wordKey[0] : wordKey[1]; + } else { + return ( + number + + ' ' + + translator$2.correctGrammaticalCase(number, wordKey) + ); + } + }, + }; + + hooks.defineLocale('sr', { + months: 'januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar'.split( + '_' + ), + monthsShort: 'jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.'.split( + '_' + ), + monthsParseExact: true, + weekdays: 'nedelja_ponedeljak_utorak_sreda_četvrtak_petak_subota'.split( + '_' + ), + weekdaysShort: 'ned._pon._uto._sre._čet._pet._sub.'.split('_'), + weekdaysMin: 'ne_po_ut_sr_če_pe_su'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'H:mm', + LTS: 'H:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D. MMMM YYYY', + LLL: 'D. MMMM YYYY H:mm', + LLLL: 'dddd, D. MMMM YYYY H:mm', + }, + calendar: { + sameDay: '[danas u] LT', + nextDay: '[sutra u] LT', + nextWeek: function () { + switch (this.day()) { + case 0: + return '[u] [nedelju] [u] LT'; + case 3: + return '[u] [sredu] [u] LT'; + case 6: + return '[u] [subotu] [u] LT'; + case 1: + case 2: + case 4: + case 5: + return '[u] dddd [u] LT'; + } + }, + lastDay: '[juče u] LT', + lastWeek: function () { + var lastWeekDays = [ + '[prošle] [nedelje] [u] LT', + '[prošlog] [ponedeljka] [u] LT', + '[prošlog] [utorka] [u] LT', + '[prošle] [srede] [u] LT', + '[prošlog] [četvrtka] [u] LT', + '[prošlog] [petka] [u] LT', + '[prošle] [subote] [u] LT', + ]; + return lastWeekDays[this.day()]; + }, + sameElse: 'L', + }, + relativeTime: { + future: 'za %s', + past: 'pre %s', + s: 'nekoliko sekundi', + ss: translator$2.translate, + m: translator$2.translate, + mm: translator$2.translate, + h: translator$2.translate, + hh: translator$2.translate, + d: 'dan', + dd: translator$2.translate, + M: 'mesec', + MM: translator$2.translate, + y: 'godinu', + yy: translator$2.translate, + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal: '%d.', + week: { + dow: 1, // Monday is the first day of the week. + doy: 7, // The week that contains Jan 7th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + hooks.defineLocale('ss', { + months: "Bhimbidvwane_Indlovana_Indlov'lenkhulu_Mabasa_Inkhwekhweti_Inhlaba_Kholwane_Ingci_Inyoni_Imphala_Lweti_Ingongoni".split( + '_' + ), + monthsShort: 'Bhi_Ina_Inu_Mab_Ink_Inh_Kho_Igc_Iny_Imp_Lwe_Igo'.split('_'), + weekdays: 'Lisontfo_Umsombuluko_Lesibili_Lesitsatfu_Lesine_Lesihlanu_Umgcibelo'.split( + '_' + ), + weekdaysShort: 'Lis_Umb_Lsb_Les_Lsi_Lsh_Umg'.split('_'), + weekdaysMin: 'Li_Us_Lb_Lt_Ls_Lh_Ug'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'h:mm A', + LTS: 'h:mm:ss A', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY h:mm A', + LLLL: 'dddd, D MMMM YYYY h:mm A', + }, + calendar: { + sameDay: '[Namuhla nga] LT', + nextDay: '[Kusasa nga] LT', + nextWeek: 'dddd [nga] LT', + lastDay: '[Itolo nga] LT', + lastWeek: 'dddd [leliphelile] [nga] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'nga %s', + past: 'wenteka nga %s', + s: 'emizuzwana lomcane', + ss: '%d mzuzwana', + m: 'umzuzu', + mm: '%d emizuzu', + h: 'lihora', + hh: '%d emahora', + d: 'lilanga', + dd: '%d emalanga', + M: 'inyanga', + MM: '%d tinyanga', + y: 'umnyaka', + yy: '%d iminyaka', + }, + meridiemParse: /ekuseni|emini|entsambama|ebusuku/, + meridiem: function (hours, minutes, isLower) { + if (hours < 11) { + return 'ekuseni'; + } else if (hours < 15) { + return 'emini'; + } else if (hours < 19) { + return 'entsambama'; + } else { + return 'ebusuku'; + } + }, + meridiemHour: function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === 'ekuseni') { + return hour; + } else if (meridiem === 'emini') { + return hour >= 11 ? hour : hour + 12; + } else if (meridiem === 'entsambama' || meridiem === 'ebusuku') { + if (hour === 0) { + return 0; + } + return hour + 12; + } + }, + dayOfMonthOrdinalParse: /\d{1,2}/, + ordinal: '%d', + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + hooks.defineLocale('sv', { + months: 'januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december'.split( + '_' + ), + monthsShort: 'jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec'.split('_'), + weekdays: 'söndag_måndag_tisdag_onsdag_torsdag_fredag_lördag'.split('_'), + weekdaysShort: 'sön_mån_tis_ons_tor_fre_lör'.split('_'), + weekdaysMin: 'sö_må_ti_on_to_fr_lö'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'YYYY-MM-DD', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY [kl.] HH:mm', + LLLL: 'dddd D MMMM YYYY [kl.] HH:mm', + lll: 'D MMM YYYY HH:mm', + llll: 'ddd D MMM YYYY HH:mm', + }, + calendar: { + sameDay: '[Idag] LT', + nextDay: '[Imorgon] LT', + lastDay: '[Igår] LT', + nextWeek: '[På] dddd LT', + lastWeek: '[I] dddd[s] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'om %s', + past: 'för %s sedan', + s: 'några sekunder', + ss: '%d sekunder', + m: 'en minut', + mm: '%d minuter', + h: 'en timme', + hh: '%d timmar', + d: 'en dag', + dd: '%d dagar', + M: 'en månad', + MM: '%d månader', + y: 'ett år', + yy: '%d år', + }, + dayOfMonthOrdinalParse: /\d{1,2}(\:e|\:a)/, + ordinal: function (number) { + var b = number % 10, + output = + ~~((number % 100) / 10) === 1 + ? ':e' + : b === 1 + ? ':a' + : b === 2 + ? ':a' + : b === 3 + ? ':e' + : ':e'; + return number + output; + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + hooks.defineLocale('sw', { + months: 'Januari_Februari_Machi_Aprili_Mei_Juni_Julai_Agosti_Septemba_Oktoba_Novemba_Desemba'.split( + '_' + ), + monthsShort: 'Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ago_Sep_Okt_Nov_Des'.split('_'), + weekdays: 'Jumapili_Jumatatu_Jumanne_Jumatano_Alhamisi_Ijumaa_Jumamosi'.split( + '_' + ), + weekdaysShort: 'Jpl_Jtat_Jnne_Jtan_Alh_Ijm_Jmos'.split('_'), + weekdaysMin: 'J2_J3_J4_J5_Al_Ij_J1'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'hh:mm A', + LTS: 'HH:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[leo saa] LT', + nextDay: '[kesho saa] LT', + nextWeek: '[wiki ijayo] dddd [saat] LT', + lastDay: '[jana] LT', + lastWeek: '[wiki iliyopita] dddd [saat] LT', + sameElse: 'L', + }, + relativeTime: { + future: '%s baadaye', + past: 'tokea %s', + s: 'hivi punde', + ss: 'sekunde %d', + m: 'dakika moja', + mm: 'dakika %d', + h: 'saa limoja', + hh: 'masaa %d', + d: 'siku moja', + dd: 'siku %d', + M: 'mwezi mmoja', + MM: 'miezi %d', + y: 'mwaka mmoja', + yy: 'miaka %d', + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 7, // The week that contains Jan 7th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var symbolMap$f = { + '1': '௧', + '2': '௨', + '3': '௩', + '4': '௪', + '5': '௫', + '6': '௬', + '7': '௭', + '8': '௮', + '9': '௯', + '0': '௦', + }, + numberMap$e = { + '௧': '1', + '௨': '2', + '௩': '3', + '௪': '4', + '௫': '5', + '௬': '6', + '௭': '7', + '௮': '8', + '௯': '9', + '௦': '0', + }; + + hooks.defineLocale('ta', { + months: 'ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்'.split( + '_' + ), + monthsShort: 'ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்'.split( + '_' + ), + weekdays: 'ஞாயிற்றுக்கிழமை_திங்கட்கிழமை_செவ்வாய்கிழமை_புதன்கிழமை_வியாழக்கிழமை_வெள்ளிக்கிழமை_சனிக்கிழமை'.split( + '_' + ), + weekdaysShort: 'ஞாயிறு_திங்கள்_செவ்வாய்_புதன்_வியாழன்_வெள்ளி_சனி'.split( + '_' + ), + weekdaysMin: 'ஞா_தி_செ_பு_வி_வெ_ச'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY, HH:mm', + LLLL: 'dddd, D MMMM YYYY, HH:mm', + }, + calendar: { + sameDay: '[இன்று] LT', + nextDay: '[நாளை] LT', + nextWeek: 'dddd, LT', + lastDay: '[நேற்று] LT', + lastWeek: '[கடந்த வாரம்] dddd, LT', + sameElse: 'L', + }, + relativeTime: { + future: '%s இல்', + past: '%s முன்', + s: 'ஒரு சில விநாடிகள்', + ss: '%d விநாடிகள்', + m: 'ஒரு நிமிடம்', + mm: '%d நிமிடங்கள்', + h: 'ஒரு மணி நேரம்', + hh: '%d மணி நேரம்', + d: 'ஒரு நாள்', + dd: '%d நாட்கள்', + M: 'ஒரு மாதம்', + MM: '%d மாதங்கள்', + y: 'ஒரு வருடம்', + yy: '%d ஆண்டுகள்', + }, + dayOfMonthOrdinalParse: /\d{1,2}வது/, + ordinal: function (number) { + return number + 'வது'; + }, + preparse: function (string) { + return string.replace(/[௧௨௩௪௫௬௭௮௯௦]/g, function (match) { + return numberMap$e[match]; + }); + }, + postformat: function (string) { + return string.replace(/\d/g, function (match) { + return symbolMap$f[match]; + }); + }, + // refer http://ta.wikipedia.org/s/1er1 + meridiemParse: /யாமம்|வைகறை|காலை|நண்பகல்|எற்பாடு|மாலை/, + meridiem: function (hour, minute, isLower) { + if (hour < 2) { + return ' யாமம்'; + } else if (hour < 6) { + return ' வைகறை'; // வைகறை + } else if (hour < 10) { + return ' காலை'; // காலை + } else if (hour < 14) { + return ' நண்பகல்'; // நண்பகல் + } else if (hour < 18) { + return ' எற்பாடு'; // எற்பாடு + } else if (hour < 22) { + return ' மாலை'; // மாலை + } else { + return ' யாமம்'; + } + }, + meridiemHour: function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === 'யாமம்') { + return hour < 2 ? hour : hour + 12; + } else if (meridiem === 'வைகறை' || meridiem === 'காலை') { + return hour; + } else if (meridiem === 'நண்பகல்') { + return hour >= 10 ? hour : hour + 12; + } else { + return hour + 12; + } + }, + week: { + dow: 0, // Sunday is the first day of the week. + doy: 6, // The week that contains Jan 6th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + hooks.defineLocale('te', { + months: 'జనవరి_ఫిబ్రవరి_మార్చి_ఏప్రిల్_మే_జూన్_జులై_ఆగస్టు_సెప్టెంబర్_అక్టోబర్_నవంబర్_డిసెంబర్'.split( + '_' + ), + monthsShort: 'జన._ఫిబ్ర._మార్చి_ఏప్రి._మే_జూన్_జులై_ఆగ._సెప్._అక్టో._నవ._డిసె.'.split( + '_' + ), + monthsParseExact: true, + weekdays: 'ఆదివారం_సోమవారం_మంగళవారం_బుధవారం_గురువారం_శుక్రవారం_శనివారం'.split( + '_' + ), + weekdaysShort: 'ఆది_సోమ_మంగళ_బుధ_గురు_శుక్ర_శని'.split('_'), + weekdaysMin: 'ఆ_సో_మం_బు_గు_శు_శ'.split('_'), + longDateFormat: { + LT: 'A h:mm', + LTS: 'A h:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY, A h:mm', + LLLL: 'dddd, D MMMM YYYY, A h:mm', + }, + calendar: { + sameDay: '[నేడు] LT', + nextDay: '[రేపు] LT', + nextWeek: 'dddd, LT', + lastDay: '[నిన్న] LT', + lastWeek: '[గత] dddd, LT', + sameElse: 'L', + }, + relativeTime: { + future: '%s లో', + past: '%s క్రితం', + s: 'కొన్ని క్షణాలు', + ss: '%d సెకన్లు', + m: 'ఒక నిమిషం', + mm: '%d నిమిషాలు', + h: 'ఒక గంట', + hh: '%d గంటలు', + d: 'ఒక రోజు', + dd: '%d రోజులు', + M: 'ఒక నెల', + MM: '%d నెలలు', + y: 'ఒక సంవత్సరం', + yy: '%d సంవత్సరాలు', + }, + dayOfMonthOrdinalParse: /\d{1,2}వ/, + ordinal: '%dవ', + meridiemParse: /రాత్రి|ఉదయం|మధ్యాహ్నం|సాయంత్రం/, + meridiemHour: function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === 'రాత్రి') { + return hour < 4 ? hour : hour + 12; + } else if (meridiem === 'ఉదయం') { + return hour; + } else if (meridiem === 'మధ్యాహ్నం') { + return hour >= 10 ? hour : hour + 12; + } else if (meridiem === 'సాయంత్రం') { + return hour + 12; + } + }, + meridiem: function (hour, minute, isLower) { + if (hour < 4) { + return 'రాత్రి'; + } else if (hour < 10) { + return 'ఉదయం'; + } else if (hour < 17) { + return 'మధ్యాహ్నం'; + } else if (hour < 20) { + return 'సాయంత్రం'; + } else { + return 'రాత్రి'; + } + }, + week: { + dow: 0, // Sunday is the first day of the week. + doy: 6, // The week that contains Jan 6th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + hooks.defineLocale('tet', { + months: 'Janeiru_Fevereiru_Marsu_Abril_Maiu_Juñu_Jullu_Agustu_Setembru_Outubru_Novembru_Dezembru'.split( + '_' + ), + monthsShort: 'Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez'.split('_'), + weekdays: 'Domingu_Segunda_Tersa_Kuarta_Kinta_Sesta_Sabadu'.split('_'), + weekdaysShort: 'Dom_Seg_Ters_Kua_Kint_Sest_Sab'.split('_'), + weekdaysMin: 'Do_Seg_Te_Ku_Ki_Ses_Sa'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[Ohin iha] LT', + nextDay: '[Aban iha] LT', + nextWeek: 'dddd [iha] LT', + lastDay: '[Horiseik iha] LT', + lastWeek: 'dddd [semana kotuk] [iha] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'iha %s', + past: '%s liuba', + s: 'segundu balun', + ss: 'segundu %d', + m: 'minutu ida', + mm: 'minutu %d', + h: 'oras ida', + hh: 'oras %d', + d: 'loron ida', + dd: 'loron %d', + M: 'fulan ida', + MM: 'fulan %d', + y: 'tinan ida', + yy: 'tinan %d', + }, + dayOfMonthOrdinalParse: /\d{1,2}(st|nd|rd|th)/, + ordinal: function (number) { + var b = number % 10, + output = + ~~((number % 100) / 10) === 1 + ? 'th' + : b === 1 + ? 'st' + : b === 2 + ? 'nd' + : b === 3 + ? 'rd' + : 'th'; + return number + output; + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var suffixes$3 = { + 0: '-ум', + 1: '-ум', + 2: '-юм', + 3: '-юм', + 4: '-ум', + 5: '-ум', + 6: '-ум', + 7: '-ум', + 8: '-ум', + 9: '-ум', + 10: '-ум', + 12: '-ум', + 13: '-ум', + 20: '-ум', + 30: '-юм', + 40: '-ум', + 50: '-ум', + 60: '-ум', + 70: '-ум', + 80: '-ум', + 90: '-ум', + 100: '-ум', + }; + + hooks.defineLocale('tg', { + months: 'январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр'.split( + '_' + ), + monthsShort: 'янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек'.split('_'), + weekdays: 'якшанбе_душанбе_сешанбе_чоршанбе_панҷшанбе_ҷумъа_шанбе'.split( + '_' + ), + weekdaysShort: 'яшб_дшб_сшб_чшб_пшб_ҷум_шнб'.split('_'), + weekdaysMin: 'яш_дш_сш_чш_пш_ҷм_шб'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[Имрӯз соати] LT', + nextDay: '[Пагоҳ соати] LT', + lastDay: '[Дирӯз соати] LT', + nextWeek: 'dddd[и] [ҳафтаи оянда соати] LT', + lastWeek: 'dddd[и] [ҳафтаи гузашта соати] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'баъди %s', + past: '%s пеш', + s: 'якчанд сония', + m: 'як дақиқа', + mm: '%d дақиқа', + h: 'як соат', + hh: '%d соат', + d: 'як рӯз', + dd: '%d рӯз', + M: 'як моҳ', + MM: '%d моҳ', + y: 'як сол', + yy: '%d сол', + }, + meridiemParse: /шаб|субҳ|рӯз|бегоҳ/, + meridiemHour: function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === 'шаб') { + return hour < 4 ? hour : hour + 12; + } else if (meridiem === 'субҳ') { + return hour; + } else if (meridiem === 'рӯз') { + return hour >= 11 ? hour : hour + 12; + } else if (meridiem === 'бегоҳ') { + return hour + 12; + } + }, + meridiem: function (hour, minute, isLower) { + if (hour < 4) { + return 'шаб'; + } else if (hour < 11) { + return 'субҳ'; + } else if (hour < 16) { + return 'рӯз'; + } else if (hour < 19) { + return 'бегоҳ'; + } else { + return 'шаб'; + } + }, + dayOfMonthOrdinalParse: /\d{1,2}-(ум|юм)/, + ordinal: function (number) { + var a = number % 10, + b = number >= 100 ? 100 : null; + return number + (suffixes$3[number] || suffixes$3[a] || suffixes$3[b]); + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 7, // The week that contains Jan 1th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + hooks.defineLocale('th', { + months: 'มกราคม_กุมภาพันธ์_มีนาคม_เมษายน_พฤษภาคม_มิถุนายน_กรกฎาคม_สิงหาคม_กันยายน_ตุลาคม_พฤศจิกายน_ธันวาคม'.split( + '_' + ), + monthsShort: 'ม.ค._ก.พ._มี.ค._เม.ย._พ.ค._มิ.ย._ก.ค._ส.ค._ก.ย._ต.ค._พ.ย._ธ.ค.'.split( + '_' + ), + monthsParseExact: true, + weekdays: 'อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัสบดี_ศุกร์_เสาร์'.split('_'), + weekdaysShort: 'อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัส_ศุกร์_เสาร์'.split('_'), // yes, three characters difference + weekdaysMin: 'อา._จ._อ._พ._พฤ._ศ._ส.'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'H:mm', + LTS: 'H:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY เวลา H:mm', + LLLL: 'วันddddที่ D MMMM YYYY เวลา H:mm', + }, + meridiemParse: /ก่อนเที่ยง|หลังเที่ยง/, + isPM: function (input) { + return input === 'หลังเที่ยง'; + }, + meridiem: function (hour, minute, isLower) { + if (hour < 12) { + return 'ก่อนเที่ยง'; + } else { + return 'หลังเที่ยง'; + } + }, + calendar: { + sameDay: '[วันนี้ เวลา] LT', + nextDay: '[พรุ่งนี้ เวลา] LT', + nextWeek: 'dddd[หน้า เวลา] LT', + lastDay: '[เมื่อวานนี้ เวลา] LT', + lastWeek: '[วัน]dddd[ที่แล้ว เวลา] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'อีก %s', + past: '%sที่แล้ว', + s: 'ไม่กี่วินาที', + ss: '%d วินาที', + m: '1 นาที', + mm: '%d นาที', + h: '1 ชั่วโมง', + hh: '%d ชั่วโมง', + d: '1 วัน', + dd: '%d วัน', + M: '1 เดือน', + MM: '%d เดือน', + y: '1 ปี', + yy: '%d ปี', + }, + }); + + //! moment.js locale configuration + + var suffixes$4 = { + 1: "'inji", + 5: "'inji", + 8: "'inji", + 70: "'inji", + 80: "'inji", + 2: "'nji", + 7: "'nji", + 20: "'nji", + 50: "'nji", + 3: "'ünji", + 4: "'ünji", + 100: "'ünji", + 6: "'njy", + 9: "'unjy", + 10: "'unjy", + 30: "'unjy", + 60: "'ynjy", + 90: "'ynjy", + }; + + hooks.defineLocale('tk', { + months: 'Ýanwar_Fewral_Mart_Aprel_Maý_Iýun_Iýul_Awgust_Sentýabr_Oktýabr_Noýabr_Dekabr'.split( + '_' + ), + monthsShort: 'Ýan_Few_Mar_Apr_Maý_Iýn_Iýl_Awg_Sen_Okt_Noý_Dek'.split('_'), + weekdays: 'Ýekşenbe_Duşenbe_Sişenbe_Çarşenbe_Penşenbe_Anna_Şenbe'.split( + '_' + ), + weekdaysShort: 'Ýek_Duş_Siş_Çar_Pen_Ann_Şen'.split('_'), + weekdaysMin: 'Ýk_Dş_Sş_Çr_Pn_An_Şn'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[bugün sagat] LT', + nextDay: '[ertir sagat] LT', + nextWeek: '[indiki] dddd [sagat] LT', + lastDay: '[düýn] LT', + lastWeek: '[geçen] dddd [sagat] LT', + sameElse: 'L', + }, + relativeTime: { + future: '%s soň', + past: '%s öň', + s: 'birnäçe sekunt', + m: 'bir minut', + mm: '%d minut', + h: 'bir sagat', + hh: '%d sagat', + d: 'bir gün', + dd: '%d gün', + M: 'bir aý', + MM: '%d aý', + y: 'bir ýyl', + yy: '%d ýyl', + }, + ordinal: function (number, period) { + switch (period) { + case 'd': + case 'D': + case 'Do': + case 'DD': + return number; + default: + if (number === 0) { + // special case for zero + return number + "'unjy"; + } + var a = number % 10, + b = (number % 100) - a, + c = number >= 100 ? 100 : null; + return number + (suffixes$4[a] || suffixes$4[b] || suffixes$4[c]); + } + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 7, // The week that contains Jan 7th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + hooks.defineLocale('tl-ph', { + months: 'Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre'.split( + '_' + ), + monthsShort: 'Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis'.split('_'), + weekdays: 'Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado'.split( + '_' + ), + weekdaysShort: 'Lin_Lun_Mar_Miy_Huw_Biy_Sab'.split('_'), + weekdaysMin: 'Li_Lu_Ma_Mi_Hu_Bi_Sab'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'MM/D/YYYY', + LL: 'MMMM D, YYYY', + LLL: 'MMMM D, YYYY HH:mm', + LLLL: 'dddd, MMMM DD, YYYY HH:mm', + }, + calendar: { + sameDay: 'LT [ngayong araw]', + nextDay: '[Bukas ng] LT', + nextWeek: 'LT [sa susunod na] dddd', + lastDay: 'LT [kahapon]', + lastWeek: 'LT [noong nakaraang] dddd', + sameElse: 'L', + }, + relativeTime: { + future: 'sa loob ng %s', + past: '%s ang nakalipas', + s: 'ilang segundo', + ss: '%d segundo', + m: 'isang minuto', + mm: '%d minuto', + h: 'isang oras', + hh: '%d oras', + d: 'isang araw', + dd: '%d araw', + M: 'isang buwan', + MM: '%d buwan', + y: 'isang taon', + yy: '%d taon', + }, + dayOfMonthOrdinalParse: /\d{1,2}/, + ordinal: function (number) { + return number; + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var numbersNouns = 'pagh_wa’_cha’_wej_loS_vagh_jav_Soch_chorgh_Hut'.split('_'); + + function translateFuture(output) { + var time = output; + time = + output.indexOf('jaj') !== -1 + ? time.slice(0, -3) + 'leS' + : output.indexOf('jar') !== -1 + ? time.slice(0, -3) + 'waQ' + : output.indexOf('DIS') !== -1 + ? time.slice(0, -3) + 'nem' + : time + ' pIq'; + return time; + } + + function translatePast(output) { + var time = output; + time = + output.indexOf('jaj') !== -1 + ? time.slice(0, -3) + 'Hu’' + : output.indexOf('jar') !== -1 + ? time.slice(0, -3) + 'wen' + : output.indexOf('DIS') !== -1 + ? time.slice(0, -3) + 'ben' + : time + ' ret'; + return time; + } + + function translate$a(number, withoutSuffix, string, isFuture) { + var numberNoun = numberAsNoun(number); + switch (string) { + case 'ss': + return numberNoun + ' lup'; + case 'mm': + return numberNoun + ' tup'; + case 'hh': + return numberNoun + ' rep'; + case 'dd': + return numberNoun + ' jaj'; + case 'MM': + return numberNoun + ' jar'; + case 'yy': + return numberNoun + ' DIS'; + } + } + + function numberAsNoun(number) { + var hundred = Math.floor((number % 1000) / 100), + ten = Math.floor((number % 100) / 10), + one = number % 10, + word = ''; + if (hundred > 0) { + word += numbersNouns[hundred] + 'vatlh'; + } + if (ten > 0) { + word += (word !== '' ? ' ' : '') + numbersNouns[ten] + 'maH'; + } + if (one > 0) { + word += (word !== '' ? ' ' : '') + numbersNouns[one]; + } + return word === '' ? 'pagh' : word; + } + + hooks.defineLocale('tlh', { + months: 'tera’ jar wa’_tera’ jar cha’_tera’ jar wej_tera’ jar loS_tera’ jar vagh_tera’ jar jav_tera’ jar Soch_tera’ jar chorgh_tera’ jar Hut_tera’ jar wa’maH_tera’ jar wa’maH wa’_tera’ jar wa’maH cha’'.split( + '_' + ), + monthsShort: 'jar wa’_jar cha’_jar wej_jar loS_jar vagh_jar jav_jar Soch_jar chorgh_jar Hut_jar wa’maH_jar wa’maH wa’_jar wa’maH cha’'.split( + '_' + ), + monthsParseExact: true, + weekdays: 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split( + '_' + ), + weekdaysShort: 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split( + '_' + ), + weekdaysMin: 'lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj'.split( + '_' + ), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[DaHjaj] LT', + nextDay: '[wa’leS] LT', + nextWeek: 'LLL', + lastDay: '[wa’Hu’] LT', + lastWeek: 'LLL', + sameElse: 'L', + }, + relativeTime: { + future: translateFuture, + past: translatePast, + s: 'puS lup', + ss: translate$a, + m: 'wa’ tup', + mm: translate$a, + h: 'wa’ rep', + hh: translate$a, + d: 'wa’ jaj', + dd: translate$a, + M: 'wa’ jar', + MM: translate$a, + y: 'wa’ DIS', + yy: translate$a, + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal: '%d.', + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var suffixes$5 = { + 1: "'inci", + 5: "'inci", + 8: "'inci", + 70: "'inci", + 80: "'inci", + 2: "'nci", + 7: "'nci", + 20: "'nci", + 50: "'nci", + 3: "'üncü", + 4: "'üncü", + 100: "'üncü", + 6: "'ncı", + 9: "'uncu", + 10: "'uncu", + 30: "'uncu", + 60: "'ıncı", + 90: "'ıncı", + }; + + hooks.defineLocale('tr', { + months: 'Ocak_Şubat_Mart_Nisan_Mayıs_Haziran_Temmuz_Ağustos_Eylül_Ekim_Kasım_Aralık'.split( + '_' + ), + monthsShort: 'Oca_Şub_Mar_Nis_May_Haz_Tem_Ağu_Eyl_Eki_Kas_Ara'.split('_'), + weekdays: 'Pazar_Pazartesi_Salı_Çarşamba_Perşembe_Cuma_Cumartesi'.split( + '_' + ), + weekdaysShort: 'Paz_Pts_Sal_Çar_Per_Cum_Cts'.split('_'), + weekdaysMin: 'Pz_Pt_Sa_Ça_Pe_Cu_Ct'.split('_'), + meridiem: function (hours, minutes, isLower) { + if (hours < 12) { + return isLower ? 'öö' : 'ÖÖ'; + } else { + return isLower ? 'ös' : 'ÖS'; + } + }, + meridiemParse: /öö|ÖÖ|ös|ÖS/, + isPM: function (input) { + return input === 'ös' || input === 'ÖS'; + }, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[bugün saat] LT', + nextDay: '[yarın saat] LT', + nextWeek: '[gelecek] dddd [saat] LT', + lastDay: '[dün] LT', + lastWeek: '[geçen] dddd [saat] LT', + sameElse: 'L', + }, + relativeTime: { + future: '%s sonra', + past: '%s önce', + s: 'birkaç saniye', + ss: '%d saniye', + m: 'bir dakika', + mm: '%d dakika', + h: 'bir saat', + hh: '%d saat', + d: 'bir gün', + dd: '%d gün', + M: 'bir ay', + MM: '%d ay', + y: 'bir yıl', + yy: '%d yıl', + }, + ordinal: function (number, period) { + switch (period) { + case 'd': + case 'D': + case 'Do': + case 'DD': + return number; + default: + if (number === 0) { + // special case for zero + return number + "'ıncı"; + } + var a = number % 10, + b = (number % 100) - a, + c = number >= 100 ? 100 : null; + return number + (suffixes$5[a] || suffixes$5[b] || suffixes$5[c]); + } + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 7, // The week that contains Jan 7th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + // After the year there should be a slash and the amount of years since December 26, 1979 in Roman numerals. + // This is currently too difficult (maybe even impossible) to add. + hooks.defineLocale('tzl', { + months: 'Januar_Fevraglh_Març_Avrïu_Mai_Gün_Julia_Guscht_Setemvar_Listopäts_Noemvar_Zecemvar'.split( + '_' + ), + monthsShort: 'Jan_Fev_Mar_Avr_Mai_Gün_Jul_Gus_Set_Lis_Noe_Zec'.split('_'), + weekdays: 'Súladi_Lúneçi_Maitzi_Márcuri_Xhúadi_Viénerçi_Sáturi'.split('_'), + weekdaysShort: 'Súl_Lún_Mai_Már_Xhú_Vié_Sát'.split('_'), + weekdaysMin: 'Sú_Lú_Ma_Má_Xh_Vi_Sá'.split('_'), + longDateFormat: { + LT: 'HH.mm', + LTS: 'HH.mm.ss', + L: 'DD.MM.YYYY', + LL: 'D. MMMM [dallas] YYYY', + LLL: 'D. MMMM [dallas] YYYY HH.mm', + LLLL: 'dddd, [li] D. MMMM [dallas] YYYY HH.mm', + }, + meridiemParse: /d\'o|d\'a/i, + isPM: function (input) { + return "d'o" === input.toLowerCase(); + }, + meridiem: function (hours, minutes, isLower) { + if (hours > 11) { + return isLower ? "d'o" : "D'O"; + } else { + return isLower ? "d'a" : "D'A"; + } + }, + calendar: { + sameDay: '[oxhi à] LT', + nextDay: '[demà à] LT', + nextWeek: 'dddd [à] LT', + lastDay: '[ieiri à] LT', + lastWeek: '[sür el] dddd [lasteu à] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'osprei %s', + past: 'ja%s', + s: processRelativeTime$8, + ss: processRelativeTime$8, + m: processRelativeTime$8, + mm: processRelativeTime$8, + h: processRelativeTime$8, + hh: processRelativeTime$8, + d: processRelativeTime$8, + dd: processRelativeTime$8, + M: processRelativeTime$8, + MM: processRelativeTime$8, + y: processRelativeTime$8, + yy: processRelativeTime$8, + }, + dayOfMonthOrdinalParse: /\d{1,2}\./, + ordinal: '%d.', + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + function processRelativeTime$8(number, withoutSuffix, key, isFuture) { + var format = { + s: ['viensas secunds', "'iensas secunds"], + ss: [number + ' secunds', '' + number + ' secunds'], + m: ["'n míut", "'iens míut"], + mm: [number + ' míuts', '' + number + ' míuts'], + h: ["'n þora", "'iensa þora"], + hh: [number + ' þoras', '' + number + ' þoras'], + d: ["'n ziua", "'iensa ziua"], + dd: [number + ' ziuas', '' + number + ' ziuas'], + M: ["'n mes", "'iens mes"], + MM: [number + ' mesen', '' + number + ' mesen'], + y: ["'n ar", "'iens ar"], + yy: [number + ' ars', '' + number + ' ars'], + }; + return isFuture + ? format[key][0] + : withoutSuffix + ? format[key][0] + : format[key][1]; + } + + //! moment.js locale configuration + + hooks.defineLocale('tzm-latn', { + months: 'innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir'.split( + '_' + ), + monthsShort: 'innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir'.split( + '_' + ), + weekdays: 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'), + weekdaysShort: 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'), + weekdaysMin: 'asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[asdkh g] LT', + nextDay: '[aska g] LT', + nextWeek: 'dddd [g] LT', + lastDay: '[assant g] LT', + lastWeek: 'dddd [g] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'dadkh s yan %s', + past: 'yan %s', + s: 'imik', + ss: '%d imik', + m: 'minuḍ', + mm: '%d minuḍ', + h: 'saɛa', + hh: '%d tassaɛin', + d: 'ass', + dd: '%d ossan', + M: 'ayowr', + MM: '%d iyyirn', + y: 'asgas', + yy: '%d isgasn', + }, + week: { + dow: 6, // Saturday is the first day of the week. + doy: 12, // The week that contains Jan 12th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + hooks.defineLocale('tzm', { + months: 'ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ'.split( + '_' + ), + monthsShort: 'ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ'.split( + '_' + ), + weekdays: 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'), + weekdaysShort: 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'), + weekdaysMin: 'ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[ⴰⵙⴷⵅ ⴴ] LT', + nextDay: '[ⴰⵙⴽⴰ ⴴ] LT', + nextWeek: 'dddd [ⴴ] LT', + lastDay: '[ⴰⵚⴰⵏⵜ ⴴ] LT', + lastWeek: 'dddd [ⴴ] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'ⴷⴰⴷⵅ ⵙ ⵢⴰⵏ %s', + past: 'ⵢⴰⵏ %s', + s: 'ⵉⵎⵉⴽ', + ss: '%d ⵉⵎⵉⴽ', + m: 'ⵎⵉⵏⵓⴺ', + mm: '%d ⵎⵉⵏⵓⴺ', + h: 'ⵙⴰⵄⴰ', + hh: '%d ⵜⴰⵙⵙⴰⵄⵉⵏ', + d: 'ⴰⵙⵙ', + dd: '%d oⵙⵙⴰⵏ', + M: 'ⴰⵢoⵓⵔ', + MM: '%d ⵉⵢⵢⵉⵔⵏ', + y: 'ⴰⵙⴳⴰⵙ', + yy: '%d ⵉⵙⴳⴰⵙⵏ', + }, + week: { + dow: 6, // Saturday is the first day of the week. + doy: 12, // The week that contains Jan 12th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + hooks.defineLocale('ug-cn', { + months: 'يانۋار_فېۋرال_مارت_ئاپرېل_ماي_ئىيۇن_ئىيۇل_ئاۋغۇست_سېنتەبىر_ئۆكتەبىر_نويابىر_دېكابىر'.split( + '_' + ), + monthsShort: 'يانۋار_فېۋرال_مارت_ئاپرېل_ماي_ئىيۇن_ئىيۇل_ئاۋغۇست_سېنتەبىر_ئۆكتەبىر_نويابىر_دېكابىر'.split( + '_' + ), + weekdays: 'يەكشەنبە_دۈشەنبە_سەيشەنبە_چارشەنبە_پەيشەنبە_جۈمە_شەنبە'.split( + '_' + ), + weekdaysShort: 'يە_دۈ_سە_چا_پە_جۈ_شە'.split('_'), + weekdaysMin: 'يە_دۈ_سە_چا_پە_جۈ_شە'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'YYYY-MM-DD', + LL: 'YYYY-يىلىM-ئاينىڭD-كۈنى', + LLL: 'YYYY-يىلىM-ئاينىڭD-كۈنى، HH:mm', + LLLL: 'dddd، YYYY-يىلىM-ئاينىڭD-كۈنى، HH:mm', + }, + meridiemParse: /يېرىم كېچە|سەھەر|چۈشتىن بۇرۇن|چۈش|چۈشتىن كېيىن|كەچ/, + meridiemHour: function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if ( + meridiem === 'يېرىم كېچە' || + meridiem === 'سەھەر' || + meridiem === 'چۈشتىن بۇرۇن' + ) { + return hour; + } else if (meridiem === 'چۈشتىن كېيىن' || meridiem === 'كەچ') { + return hour + 12; + } else { + return hour >= 11 ? hour : hour + 12; + } + }, + meridiem: function (hour, minute, isLower) { + var hm = hour * 100 + minute; + if (hm < 600) { + return 'يېرىم كېچە'; + } else if (hm < 900) { + return 'سەھەر'; + } else if (hm < 1130) { + return 'چۈشتىن بۇرۇن'; + } else if (hm < 1230) { + return 'چۈش'; + } else if (hm < 1800) { + return 'چۈشتىن كېيىن'; + } else { + return 'كەچ'; + } + }, + calendar: { + sameDay: '[بۈگۈن سائەت] LT', + nextDay: '[ئەتە سائەت] LT', + nextWeek: '[كېلەركى] dddd [سائەت] LT', + lastDay: '[تۆنۈگۈن] LT', + lastWeek: '[ئالدىنقى] dddd [سائەت] LT', + sameElse: 'L', + }, + relativeTime: { + future: '%s كېيىن', + past: '%s بۇرۇن', + s: 'نەچچە سېكونت', + ss: '%d سېكونت', + m: 'بىر مىنۇت', + mm: '%d مىنۇت', + h: 'بىر سائەت', + hh: '%d سائەت', + d: 'بىر كۈن', + dd: '%d كۈن', + M: 'بىر ئاي', + MM: '%d ئاي', + y: 'بىر يىل', + yy: '%d يىل', + }, + + dayOfMonthOrdinalParse: /\d{1,2}(-كۈنى|-ئاي|-ھەپتە)/, + ordinal: function (number, period) { + switch (period) { + case 'd': + case 'D': + case 'DDD': + return number + '-كۈنى'; + case 'w': + case 'W': + return number + '-ھەپتە'; + default: + return number; + } + }, + preparse: function (string) { + return string.replace(/،/g, ','); + }, + postformat: function (string) { + return string.replace(/,/g, '،'); + }, + week: { + // GB/T 7408-1994《数据元和交换格式·信息交换·日期和时间表示法》与ISO 8601:1988等效 + dow: 1, // Monday is the first day of the week. + doy: 7, // The week that contains Jan 1st is the first week of the year. + }, + }); + + //! moment.js locale configuration + + function plural$6(word, num) { + var forms = word.split('_'); + return num % 10 === 1 && num % 100 !== 11 + ? forms[0] + : num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20) + ? forms[1] + : forms[2]; + } + function relativeTimeWithPlural$4(number, withoutSuffix, key) { + var format = { + ss: withoutSuffix ? 'секунда_секунди_секунд' : 'секунду_секунди_секунд', + mm: withoutSuffix ? 'хвилина_хвилини_хвилин' : 'хвилину_хвилини_хвилин', + hh: withoutSuffix ? 'година_години_годин' : 'годину_години_годин', + dd: 'день_дні_днів', + MM: 'місяць_місяці_місяців', + yy: 'рік_роки_років', + }; + if (key === 'm') { + return withoutSuffix ? 'хвилина' : 'хвилину'; + } else if (key === 'h') { + return withoutSuffix ? 'година' : 'годину'; + } else { + return number + ' ' + plural$6(format[key], +number); + } + } + function weekdaysCaseReplace(m, format) { + var weekdays = { + nominative: 'неділя_понеділок_вівторок_середа_четвер_п’ятниця_субота'.split( + '_' + ), + accusative: 'неділю_понеділок_вівторок_середу_четвер_п’ятницю_суботу'.split( + '_' + ), + genitive: 'неділі_понеділка_вівторка_середи_четверга_п’ятниці_суботи'.split( + '_' + ), + }, + nounCase; + + if (m === true) { + return weekdays['nominative'] + .slice(1, 7) + .concat(weekdays['nominative'].slice(0, 1)); + } + if (!m) { + return weekdays['nominative']; + } + + nounCase = /(\[[ВвУу]\]) ?dddd/.test(format) + ? 'accusative' + : /\[?(?:минулої|наступної)? ?\] ?dddd/.test(format) + ? 'genitive' + : 'nominative'; + return weekdays[nounCase][m.day()]; + } + function processHoursFunction(str) { + return function () { + return str + 'о' + (this.hours() === 11 ? 'б' : '') + '] LT'; + }; + } + + hooks.defineLocale('uk', { + months: { + format: 'січня_лютого_березня_квітня_травня_червня_липня_серпня_вересня_жовтня_листопада_грудня'.split( + '_' + ), + standalone: 'січень_лютий_березень_квітень_травень_червень_липень_серпень_вересень_жовтень_листопад_грудень'.split( + '_' + ), + }, + monthsShort: 'січ_лют_бер_квіт_трав_черв_лип_серп_вер_жовт_лист_груд'.split( + '_' + ), + weekdays: weekdaysCaseReplace, + weekdaysShort: 'нд_пн_вт_ср_чт_пт_сб'.split('_'), + weekdaysMin: 'нд_пн_вт_ср_чт_пт_сб'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD.MM.YYYY', + LL: 'D MMMM YYYY р.', + LLL: 'D MMMM YYYY р., HH:mm', + LLLL: 'dddd, D MMMM YYYY р., HH:mm', + }, + calendar: { + sameDay: processHoursFunction('[Сьогодні '), + nextDay: processHoursFunction('[Завтра '), + lastDay: processHoursFunction('[Вчора '), + nextWeek: processHoursFunction('[У] dddd ['), + lastWeek: function () { + switch (this.day()) { + case 0: + case 3: + case 5: + case 6: + return processHoursFunction('[Минулої] dddd [').call(this); + case 1: + case 2: + case 4: + return processHoursFunction('[Минулого] dddd [').call(this); + } + }, + sameElse: 'L', + }, + relativeTime: { + future: 'за %s', + past: '%s тому', + s: 'декілька секунд', + ss: relativeTimeWithPlural$4, + m: relativeTimeWithPlural$4, + mm: relativeTimeWithPlural$4, + h: 'годину', + hh: relativeTimeWithPlural$4, + d: 'день', + dd: relativeTimeWithPlural$4, + M: 'місяць', + MM: relativeTimeWithPlural$4, + y: 'рік', + yy: relativeTimeWithPlural$4, + }, + // M. E.: those two are virtually unused but a user might want to implement them for his/her website for some reason + meridiemParse: /ночі|ранку|дня|вечора/, + isPM: function (input) { + return /^(дня|вечора)$/.test(input); + }, + meridiem: function (hour, minute, isLower) { + if (hour < 4) { + return 'ночі'; + } else if (hour < 12) { + return 'ранку'; + } else if (hour < 17) { + return 'дня'; + } else { + return 'вечора'; + } + }, + dayOfMonthOrdinalParse: /\d{1,2}-(й|го)/, + ordinal: function (number, period) { + switch (period) { + case 'M': + case 'd': + case 'DDD': + case 'w': + case 'W': + return number + '-й'; + case 'D': + return number + '-го'; + default: + return number; + } + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 7, // The week that contains Jan 7th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + var months$b = [ + 'جنوری', + 'فروری', + 'مارچ', + 'اپریل', + 'مئی', + 'جون', + 'جولائی', + 'اگست', + 'ستمبر', + 'اکتوبر', + 'نومبر', + 'دسمبر', + ], + days$2 = ['اتوار', 'پیر', 'منگل', 'بدھ', 'جمعرات', 'جمعہ', 'ہفتہ']; + + hooks.defineLocale('ur', { + months: months$b, + monthsShort: months$b, + weekdays: days$2, + weekdaysShort: days$2, + weekdaysMin: days$2, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd، D MMMM YYYY HH:mm', + }, + meridiemParse: /صبح|شام/, + isPM: function (input) { + return 'شام' === input; + }, + meridiem: function (hour, minute, isLower) { + if (hour < 12) { + return 'صبح'; + } + return 'شام'; + }, + calendar: { + sameDay: '[آج بوقت] LT', + nextDay: '[کل بوقت] LT', + nextWeek: 'dddd [بوقت] LT', + lastDay: '[گذشتہ روز بوقت] LT', + lastWeek: '[گذشتہ] dddd [بوقت] LT', + sameElse: 'L', + }, + relativeTime: { + future: '%s بعد', + past: '%s قبل', + s: 'چند سیکنڈ', + ss: '%d سیکنڈ', + m: 'ایک منٹ', + mm: '%d منٹ', + h: 'ایک گھنٹہ', + hh: '%d گھنٹے', + d: 'ایک دن', + dd: '%d دن', + M: 'ایک ماہ', + MM: '%d ماہ', + y: 'ایک سال', + yy: '%d سال', + }, + preparse: function (string) { + return string.replace(/،/g, ','); + }, + postformat: function (string) { + return string.replace(/,/g, '،'); + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + hooks.defineLocale('uz-latn', { + months: 'Yanvar_Fevral_Mart_Aprel_May_Iyun_Iyul_Avgust_Sentabr_Oktabr_Noyabr_Dekabr'.split( + '_' + ), + monthsShort: 'Yan_Fev_Mar_Apr_May_Iyun_Iyul_Avg_Sen_Okt_Noy_Dek'.split('_'), + weekdays: 'Yakshanba_Dushanba_Seshanba_Chorshanba_Payshanba_Juma_Shanba'.split( + '_' + ), + weekdaysShort: 'Yak_Dush_Sesh_Chor_Pay_Jum_Shan'.split('_'), + weekdaysMin: 'Ya_Du_Se_Cho_Pa_Ju_Sha'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'D MMMM YYYY, dddd HH:mm', + }, + calendar: { + sameDay: '[Bugun soat] LT [da]', + nextDay: '[Ertaga] LT [da]', + nextWeek: 'dddd [kuni soat] LT [da]', + lastDay: '[Kecha soat] LT [da]', + lastWeek: "[O'tgan] dddd [kuni soat] LT [da]", + sameElse: 'L', + }, + relativeTime: { + future: 'Yaqin %s ichida', + past: 'Bir necha %s oldin', + s: 'soniya', + ss: '%d soniya', + m: 'bir daqiqa', + mm: '%d daqiqa', + h: 'bir soat', + hh: '%d soat', + d: 'bir kun', + dd: '%d kun', + M: 'bir oy', + MM: '%d oy', + y: 'bir yil', + yy: '%d yil', + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 7, // The week that contains Jan 7th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + hooks.defineLocale('uz', { + months: 'январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр'.split( + '_' + ), + monthsShort: 'янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек'.split('_'), + weekdays: 'Якшанба_Душанба_Сешанба_Чоршанба_Пайшанба_Жума_Шанба'.split('_'), + weekdaysShort: 'Якш_Душ_Сеш_Чор_Пай_Жум_Шан'.split('_'), + weekdaysMin: 'Як_Ду_Се_Чо_Па_Жу_Ша'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'D MMMM YYYY, dddd HH:mm', + }, + calendar: { + sameDay: '[Бугун соат] LT [да]', + nextDay: '[Эртага] LT [да]', + nextWeek: 'dddd [куни соат] LT [да]', + lastDay: '[Кеча соат] LT [да]', + lastWeek: '[Утган] dddd [куни соат] LT [да]', + sameElse: 'L', + }, + relativeTime: { + future: 'Якин %s ичида', + past: 'Бир неча %s олдин', + s: 'фурсат', + ss: '%d фурсат', + m: 'бир дакика', + mm: '%d дакика', + h: 'бир соат', + hh: '%d соат', + d: 'бир кун', + dd: '%d кун', + M: 'бир ой', + MM: '%d ой', + y: 'бир йил', + yy: '%d йил', + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 7, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + hooks.defineLocale('vi', { + months: 'tháng 1_tháng 2_tháng 3_tháng 4_tháng 5_tháng 6_tháng 7_tháng 8_tháng 9_tháng 10_tháng 11_tháng 12'.split( + '_' + ), + monthsShort: 'Thg 01_Thg 02_Thg 03_Thg 04_Thg 05_Thg 06_Thg 07_Thg 08_Thg 09_Thg 10_Thg 11_Thg 12'.split( + '_' + ), + monthsParseExact: true, + weekdays: 'chủ nhật_thứ hai_thứ ba_thứ tư_thứ năm_thứ sáu_thứ bảy'.split( + '_' + ), + weekdaysShort: 'CN_T2_T3_T4_T5_T6_T7'.split('_'), + weekdaysMin: 'CN_T2_T3_T4_T5_T6_T7'.split('_'), + weekdaysParseExact: true, + meridiemParse: /sa|ch/i, + isPM: function (input) { + return /^ch$/i.test(input); + }, + meridiem: function (hours, minutes, isLower) { + if (hours < 12) { + return isLower ? 'sa' : 'SA'; + } else { + return isLower ? 'ch' : 'CH'; + } + }, + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'D MMMM [năm] YYYY', + LLL: 'D MMMM [năm] YYYY HH:mm', + LLLL: 'dddd, D MMMM [năm] YYYY HH:mm', + l: 'DD/M/YYYY', + ll: 'D MMM YYYY', + lll: 'D MMM YYYY HH:mm', + llll: 'ddd, D MMM YYYY HH:mm', + }, + calendar: { + sameDay: '[Hôm nay lúc] LT', + nextDay: '[Ngày mai lúc] LT', + nextWeek: 'dddd [tuần tới lúc] LT', + lastDay: '[Hôm qua lúc] LT', + lastWeek: 'dddd [tuần trước lúc] LT', + sameElse: 'L', + }, + relativeTime: { + future: '%s tới', + past: '%s trước', + s: 'vài giây', + ss: '%d giây', + m: 'một phút', + mm: '%d phút', + h: 'một giờ', + hh: '%d giờ', + d: 'một ngày', + dd: '%d ngày', + M: 'một tháng', + MM: '%d tháng', + y: 'một năm', + yy: '%d năm', + }, + dayOfMonthOrdinalParse: /\d{1,2}/, + ordinal: function (number) { + return number; + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + hooks.defineLocale('x-pseudo', { + months: 'J~áñúá~rý_F~ébrú~árý_~Márc~h_Áp~ríl_~Máý_~Júñé~_Júl~ý_Áú~gúst~_Sép~témb~ér_Ó~ctób~ér_Ñ~óvém~bér_~Décé~mbér'.split( + '_' + ), + monthsShort: 'J~áñ_~Féb_~Már_~Ápr_~Máý_~Júñ_~Júl_~Áúg_~Sép_~Óct_~Ñóv_~Déc'.split( + '_' + ), + monthsParseExact: true, + weekdays: 'S~úñdá~ý_Mó~ñdáý~_Túé~sdáý~_Wéd~ñésd~áý_T~húrs~dáý_~Fríd~áý_S~átúr~dáý'.split( + '_' + ), + weekdaysShort: 'S~úñ_~Móñ_~Túé_~Wéd_~Thú_~Frí_~Sát'.split('_'), + weekdaysMin: 'S~ú_Mó~_Tú_~Wé_T~h_Fr~_Sá'.split('_'), + weekdaysParseExact: true, + longDateFormat: { + LT: 'HH:mm', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY HH:mm', + LLLL: 'dddd, D MMMM YYYY HH:mm', + }, + calendar: { + sameDay: '[T~ódá~ý át] LT', + nextDay: '[T~ómó~rró~w át] LT', + nextWeek: 'dddd [át] LT', + lastDay: '[Ý~ést~érdá~ý át] LT', + lastWeek: '[L~ást] dddd [át] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'í~ñ %s', + past: '%s á~gó', + s: 'á ~féw ~sécó~ñds', + ss: '%d s~écóñ~ds', + m: 'á ~míñ~úté', + mm: '%d m~íñú~tés', + h: 'á~ñ hó~úr', + hh: '%d h~óúrs', + d: 'á ~dáý', + dd: '%d d~áýs', + M: 'á ~móñ~th', + MM: '%d m~óñt~hs', + y: 'á ~ýéár', + yy: '%d ý~éárs', + }, + dayOfMonthOrdinalParse: /\d{1,2}(th|st|nd|rd)/, + ordinal: function (number) { + var b = number % 10, + output = + ~~((number % 100) / 10) === 1 + ? 'th' + : b === 1 + ? 'st' + : b === 2 + ? 'nd' + : b === 3 + ? 'rd' + : 'th'; + return number + output; + }, + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + hooks.defineLocale('yo', { + months: 'Sẹ́rẹ́_Èrèlè_Ẹrẹ̀nà_Ìgbé_Èbibi_Òkùdu_Agẹmo_Ògún_Owewe_Ọ̀wàrà_Bélú_Ọ̀pẹ̀̀'.split( + '_' + ), + monthsShort: 'Sẹ́r_Èrl_Ẹrn_Ìgb_Èbi_Òkù_Agẹ_Ògú_Owe_Ọ̀wà_Bél_Ọ̀pẹ̀̀'.split('_'), + weekdays: 'Àìkú_Ajé_Ìsẹ́gun_Ọjọ́rú_Ọjọ́bọ_Ẹtì_Àbámẹ́ta'.split('_'), + weekdaysShort: 'Àìk_Ajé_Ìsẹ́_Ọjr_Ọjb_Ẹtì_Àbá'.split('_'), + weekdaysMin: 'Àì_Aj_Ìs_Ọr_Ọb_Ẹt_Àb'.split('_'), + longDateFormat: { + LT: 'h:mm A', + LTS: 'h:mm:ss A', + L: 'DD/MM/YYYY', + LL: 'D MMMM YYYY', + LLL: 'D MMMM YYYY h:mm A', + LLLL: 'dddd, D MMMM YYYY h:mm A', + }, + calendar: { + sameDay: '[Ònì ni] LT', + nextDay: '[Ọ̀la ni] LT', + nextWeek: "dddd [Ọsẹ̀ tón'bọ] [ni] LT", + lastDay: '[Àna ni] LT', + lastWeek: 'dddd [Ọsẹ̀ tólọ́] [ni] LT', + sameElse: 'L', + }, + relativeTime: { + future: 'ní %s', + past: '%s kọjá', + s: 'ìsẹjú aayá die', + ss: 'aayá %d', + m: 'ìsẹjú kan', + mm: 'ìsẹjú %d', + h: 'wákati kan', + hh: 'wákati %d', + d: 'ọjọ́ kan', + dd: 'ọjọ́ %d', + M: 'osù kan', + MM: 'osù %d', + y: 'ọdún kan', + yy: 'ọdún %d', + }, + dayOfMonthOrdinalParse: /ọjọ́\s\d{1,2}/, + ordinal: 'ọjọ́ %d', + week: { + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + hooks.defineLocale('zh-cn', { + months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split( + '_' + ), + monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split( + '_' + ), + weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'), + weekdaysShort: '周日_周一_周二_周三_周四_周五_周六'.split('_'), + weekdaysMin: '日_一_二_三_四_五_六'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'YYYY/MM/DD', + LL: 'YYYY年M月D日', + LLL: 'YYYY年M月D日Ah点mm分', + LLLL: 'YYYY年M月D日ddddAh点mm分', + l: 'YYYY/M/D', + ll: 'YYYY年M月D日', + lll: 'YYYY年M月D日 HH:mm', + llll: 'YYYY年M月D日dddd HH:mm', + }, + meridiemParse: /凌晨|早上|上午|中午|下午|晚上/, + meridiemHour: function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') { + return hour; + } else if (meridiem === '下午' || meridiem === '晚上') { + return hour + 12; + } else { + // '中午' + return hour >= 11 ? hour : hour + 12; + } + }, + meridiem: function (hour, minute, isLower) { + var hm = hour * 100 + minute; + if (hm < 600) { + return '凌晨'; + } else if (hm < 900) { + return '早上'; + } else if (hm < 1130) { + return '上午'; + } else if (hm < 1230) { + return '中午'; + } else if (hm < 1800) { + return '下午'; + } else { + return '晚上'; + } + }, + calendar: { + sameDay: '[今天]LT', + nextDay: '[明天]LT', + nextWeek: function (now) { + if (now.week() !== this.week()) { + return '[下]dddLT'; + } else { + return '[本]dddLT'; + } + }, + lastDay: '[昨天]LT', + lastWeek: function (now) { + if (this.week() !== now.week()) { + return '[上]dddLT'; + } else { + return '[本]dddLT'; + } + }, + sameElse: 'L', + }, + dayOfMonthOrdinalParse: /\d{1,2}(日|月|周)/, + ordinal: function (number, period) { + switch (period) { + case 'd': + case 'D': + case 'DDD': + return number + '日'; + case 'M': + return number + '月'; + case 'w': + case 'W': + return number + '周'; + default: + return number; + } + }, + relativeTime: { + future: '%s后', + past: '%s前', + s: '几秒', + ss: '%d 秒', + m: '1 分钟', + mm: '%d 分钟', + h: '1 小时', + hh: '%d 小时', + d: '1 天', + dd: '%d 天', + M: '1 个月', + MM: '%d 个月', + y: '1 年', + yy: '%d 年', + }, + week: { + // GB/T 7408-1994《数据元和交换格式·信息交换·日期和时间表示法》与ISO 8601:1988等效 + dow: 1, // Monday is the first day of the week. + doy: 4, // The week that contains Jan 4th is the first week of the year. + }, + }); + + //! moment.js locale configuration + + hooks.defineLocale('zh-hk', { + months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split( + '_' + ), + monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split( + '_' + ), + weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'), + weekdaysShort: '週日_週一_週二_週三_週四_週五_週六'.split('_'), + weekdaysMin: '日_一_二_三_四_五_六'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'YYYY/MM/DD', + LL: 'YYYY年M月D日', + LLL: 'YYYY年M月D日 HH:mm', + LLLL: 'YYYY年M月D日dddd HH:mm', + l: 'YYYY/M/D', + ll: 'YYYY年M月D日', + lll: 'YYYY年M月D日 HH:mm', + llll: 'YYYY年M月D日dddd HH:mm', + }, + meridiemParse: /凌晨|早上|上午|中午|下午|晚上/, + meridiemHour: function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') { + return hour; + } else if (meridiem === '中午') { + return hour >= 11 ? hour : hour + 12; + } else if (meridiem === '下午' || meridiem === '晚上') { + return hour + 12; + } + }, + meridiem: function (hour, minute, isLower) { + var hm = hour * 100 + minute; + if (hm < 600) { + return '凌晨'; + } else if (hm < 900) { + return '早上'; + } else if (hm < 1200) { + return '上午'; + } else if (hm === 1200) { + return '中午'; + } else if (hm < 1800) { + return '下午'; + } else { + return '晚上'; + } + }, + calendar: { + sameDay: '[今天]LT', + nextDay: '[明天]LT', + nextWeek: '[下]ddddLT', + lastDay: '[昨天]LT', + lastWeek: '[上]ddddLT', + sameElse: 'L', + }, + dayOfMonthOrdinalParse: /\d{1,2}(日|月|週)/, + ordinal: function (number, period) { + switch (period) { + case 'd': + case 'D': + case 'DDD': + return number + '日'; + case 'M': + return number + '月'; + case 'w': + case 'W': + return number + '週'; + default: + return number; + } + }, + relativeTime: { + future: '%s後', + past: '%s前', + s: '幾秒', + ss: '%d 秒', + m: '1 分鐘', + mm: '%d 分鐘', + h: '1 小時', + hh: '%d 小時', + d: '1 天', + dd: '%d 天', + M: '1 個月', + MM: '%d 個月', + y: '1 年', + yy: '%d 年', + }, + }); + + //! moment.js locale configuration + + hooks.defineLocale('zh-mo', { + months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split( + '_' + ), + monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split( + '_' + ), + weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'), + weekdaysShort: '週日_週一_週二_週三_週四_週五_週六'.split('_'), + weekdaysMin: '日_一_二_三_四_五_六'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'DD/MM/YYYY', + LL: 'YYYY年M月D日', + LLL: 'YYYY年M月D日 HH:mm', + LLLL: 'YYYY年M月D日dddd HH:mm', + l: 'D/M/YYYY', + ll: 'YYYY年M月D日', + lll: 'YYYY年M月D日 HH:mm', + llll: 'YYYY年M月D日dddd HH:mm', + }, + meridiemParse: /凌晨|早上|上午|中午|下午|晚上/, + meridiemHour: function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') { + return hour; + } else if (meridiem === '中午') { + return hour >= 11 ? hour : hour + 12; + } else if (meridiem === '下午' || meridiem === '晚上') { + return hour + 12; + } + }, + meridiem: function (hour, minute, isLower) { + var hm = hour * 100 + minute; + if (hm < 600) { + return '凌晨'; + } else if (hm < 900) { + return '早上'; + } else if (hm < 1130) { + return '上午'; + } else if (hm < 1230) { + return '中午'; + } else if (hm < 1800) { + return '下午'; + } else { + return '晚上'; + } + }, + calendar: { + sameDay: '[今天] LT', + nextDay: '[明天] LT', + nextWeek: '[下]dddd LT', + lastDay: '[昨天] LT', + lastWeek: '[上]dddd LT', + sameElse: 'L', + }, + dayOfMonthOrdinalParse: /\d{1,2}(日|月|週)/, + ordinal: function (number, period) { + switch (period) { + case 'd': + case 'D': + case 'DDD': + return number + '日'; + case 'M': + return number + '月'; + case 'w': + case 'W': + return number + '週'; + default: + return number; + } + }, + relativeTime: { + future: '%s內', + past: '%s前', + s: '幾秒', + ss: '%d 秒', + m: '1 分鐘', + mm: '%d 分鐘', + h: '1 小時', + hh: '%d 小時', + d: '1 天', + dd: '%d 天', + M: '1 個月', + MM: '%d 個月', + y: '1 年', + yy: '%d 年', + }, + }); + + //! moment.js locale configuration + + hooks.defineLocale('zh-tw', { + months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split( + '_' + ), + monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split( + '_' + ), + weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'), + weekdaysShort: '週日_週一_週二_週三_週四_週五_週六'.split('_'), + weekdaysMin: '日_一_二_三_四_五_六'.split('_'), + longDateFormat: { + LT: 'HH:mm', + LTS: 'HH:mm:ss', + L: 'YYYY/MM/DD', + LL: 'YYYY年M月D日', + LLL: 'YYYY年M月D日 HH:mm', + LLLL: 'YYYY年M月D日dddd HH:mm', + l: 'YYYY/M/D', + ll: 'YYYY年M月D日', + lll: 'YYYY年M月D日 HH:mm', + llll: 'YYYY年M月D日dddd HH:mm', + }, + meridiemParse: /凌晨|早上|上午|中午|下午|晚上/, + meridiemHour: function (hour, meridiem) { + if (hour === 12) { + hour = 0; + } + if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') { + return hour; + } else if (meridiem === '中午') { + return hour >= 11 ? hour : hour + 12; + } else if (meridiem === '下午' || meridiem === '晚上') { + return hour + 12; + } + }, + meridiem: function (hour, minute, isLower) { + var hm = hour * 100 + minute; + if (hm < 600) { + return '凌晨'; + } else if (hm < 900) { + return '早上'; + } else if (hm < 1130) { + return '上午'; + } else if (hm < 1230) { + return '中午'; + } else if (hm < 1800) { + return '下午'; + } else { + return '晚上'; + } + }, + calendar: { + sameDay: '[今天] LT', + nextDay: '[明天] LT', + nextWeek: '[下]dddd LT', + lastDay: '[昨天] LT', + lastWeek: '[上]dddd LT', + sameElse: 'L', + }, + dayOfMonthOrdinalParse: /\d{1,2}(日|月|週)/, + ordinal: function (number, period) { + switch (period) { + case 'd': + case 'D': + case 'DDD': + return number + '日'; + case 'M': + return number + '月'; + case 'w': + case 'W': + return number + '週'; + default: + return number; + } + }, + relativeTime: { + future: '%s後', + past: '%s前', + s: '幾秒', + ss: '%d 秒', + m: '1 分鐘', + mm: '%d 分鐘', + h: '1 小時', + hh: '%d 小時', + d: '1 天', + dd: '%d 天', + M: '1 個月', + MM: '%d 個月', + y: '1 年', + yy: '%d 年', + }, + }); + + hooks.locale('en'); + + return hooks; + +}))); diff --git a/pointeuse/install/bin/electron/resources/app/vendor/moment/moment-with-locales.min.js b/pointeuse/install/bin/electron/resources/app/vendor/moment/moment-with-locales.min.js new file mode 100644 index 00000000..f1f8abad --- /dev/null +++ b/pointeuse/install/bin/electron/resources/app/vendor/moment/moment-with-locales.min.js @@ -0,0 +1,2 @@ +!function(e,a){"object"==typeof exports&&"undefined"!=typeof module?module.exports=a():"function"==typeof define&&define.amd?define(a):e.moment=a()}(this,function(){"use strict";var e,n;function M(){return e.apply(null,arguments)}function _(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function i(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function h(e,a){return Object.prototype.hasOwnProperty.call(e,a)}function o(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;for(var a in e)if(h(e,a))return;return 1}function r(e){return void 0===e}function m(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function d(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function u(e,a){for(var t=[],s=0;s>>0,s=0;sFe(e)?(r=e+1,d-Fe(e)):(r=e,d);return{year:r,dayOfYear:_}}function Ce(e,a,t){var s,n,r=Je(e.year(),a,t),d=Math.floor((e.dayOfYear()-r-1)/7)+1;return d<1?s=d+Ie(n=e.year()-1,a,t):d>Ie(e.year(),a,t)?(s=d-Ie(e.year(),a,t),n=e.year()+1):(n=e.year(),s=d),{week:s,year:n}}function Ie(e,a,t){var s=Je(e,a,t),n=Je(e+1,a,t);return(Fe(e)-s+n)/7}W("w",["ww",2],"wo","week"),W("W",["WW",2],"Wo","isoWeek"),z("week","w"),z("isoWeek","W"),C("week",5),C("isoWeek",5),le("w",ae),le("ww",ae,$),le("W",ae),le("WW",ae,$),Ye(["w","ww","W","WW"],function(e,a,t,s){a[s.substr(0,1)]=G(e)});function Ue(e,a){return e.slice(a,7).concat(e.slice(0,a))}W("d",0,"do","day"),W("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),W("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),W("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),W("e",0,0,"weekday"),W("E",0,0,"isoWeekday"),z("day","d"),z("weekday","e"),z("isoWeekday","E"),C("day",11),C("weekday",11),C("isoWeekday",11),le("d",ae),le("e",ae),le("E",ae),le("dd",function(e,a){return a.weekdaysMinRegex(e)}),le("ddd",function(e,a){return a.weekdaysShortRegex(e)}),le("dddd",function(e,a){return a.weekdaysRegex(e)}),Ye(["dd","ddd","dddd"],function(e,a,t,s){var n=t._locale.weekdaysParse(e,s,t._strict);null!=n?a.d=n:L(t).invalidWeekday=e}),Ye(["d","e","E"],function(e,a,t,s){a[s]=G(e)});var Ge="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Ve="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Be="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Ke=ue,qe=ue,Ze=ue;function $e(){function e(e,a){return a.length-e.length}for(var a,t,s,n,r=[],d=[],_=[],i=[],o=0;o<7;o++)a=c([2e3,1]).day(o),t=he(this.weekdaysMin(a,"")),s=he(this.weekdaysShort(a,"")),n=he(this.weekdays(a,"")),r.push(t),d.push(s),_.push(n),i.push(t),i.push(s),i.push(n);r.sort(e),d.sort(e),_.sort(e),i.sort(e),this._weekdaysRegex=new RegExp("^("+i.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+_.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+d.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+r.join("|")+")","i")}function Qe(){return this.hours()%12||12}function Xe(e,a){W(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),a)})}function ea(e,a){return a._meridiemParse}W("H",["HH",2],0,"hour"),W("h",["hh",2],0,Qe),W("k",["kk",2],0,function(){return this.hours()||24}),W("hmm",0,0,function(){return""+Qe.apply(this)+S(this.minutes(),2)}),W("hmmss",0,0,function(){return""+Qe.apply(this)+S(this.minutes(),2)+S(this.seconds(),2)}),W("Hmm",0,0,function(){return""+this.hours()+S(this.minutes(),2)}),W("Hmmss",0,0,function(){return""+this.hours()+S(this.minutes(),2)+S(this.seconds(),2)}),Xe("a",!0),Xe("A",!1),z("hour","h"),C("hour",13),le("a",ea),le("A",ea),le("H",ae),le("h",ae),le("k",ae),le("HH",ae,$),le("hh",ae,$),le("kk",ae,$),le("hmm",te),le("hmmss",se),le("Hmm",te),le("Hmmss",se),Le(["H","HH"],De),Le(["k","kk"],function(e,a,t){var s=G(e);a[De]=24===s?0:s}),Le(["a","A"],function(e,a,t){t._isPm=t._locale.isPM(e),t._meridiem=e}),Le(["h","hh"],function(e,a,t){a[De]=G(e),L(t).bigHour=!0}),Le("hmm",function(e,a,t){var s=e.length-2;a[De]=G(e.substr(0,s)),a[Te]=G(e.substr(s)),L(t).bigHour=!0}),Le("hmmss",function(e,a,t){var s=e.length-4,n=e.length-2;a[De]=G(e.substr(0,s)),a[Te]=G(e.substr(s,2)),a[ge]=G(e.substr(n)),L(t).bigHour=!0}),Le("Hmm",function(e,a,t){var s=e.length-2;a[De]=G(e.substr(0,s)),a[Te]=G(e.substr(s))}),Le("Hmmss",function(e,a,t){var s=e.length-4,n=e.length-2;a[De]=G(e.substr(0,s)),a[Te]=G(e.substr(s,2)),a[ge]=G(e.substr(n))});var aa=V("Hours",!0);var ta,sa={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:Se,monthsShort:je,week:{dow:0,doy:6},weekdays:Ge,weekdaysMin:Be,weekdaysShort:Ve,meridiemParse:/[ap]\.?m?\.?/i},na={},ra={};function da(e){return e?e.toLowerCase().replace("_","-"):e}function _a(e){for(var a,t,s,n,r=0;r=a&&function(e,a){for(var t=Math.min(e.length,a.length),s=0;s=a-1)break;a--}r++}return ta}function ia(a){var e;if(void 0===na[a]&&"undefined"!=typeof module&&module&&module.exports)try{e=ta._abbr,require("./locale/"+a),oa(e)}catch(e){na[a]=null}return na[a]}function oa(e,a){var t;return e&&((t=r(a)?ua(e):ma(e,a))?ta=t:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),ta._abbr}function ma(e,a){if(null===a)return delete na[e],null;var t,s=sa;if(a.abbr=e,null!=na[e])w("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),s=na[e]._config;else if(null!=a.parentLocale)if(null!=na[a.parentLocale])s=na[a.parentLocale]._config;else{if(null==(t=ia(a.parentLocale)))return ra[a.parentLocale]||(ra[a.parentLocale]=[]),ra[a.parentLocale].push({name:e,config:a}),null;s=t._config}return na[e]=new H(b(s,a)),ra[e]&&ra[e].forEach(function(e){ma(e.name,e.config)}),oa(e),na[e]}function ua(e){var a;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return ta;if(!_(e)){if(a=ia(e))return a;e=[e]}return _a(e)}function la(e){var a,t=e._a;return t&&-2===L(e).overflow&&(a=t[pe]<0||11He(t[fe],t[pe])?ke:t[De]<0||24Ie(t,r,d)?L(e)._overflowWeeks=!0:null!=i?L(e)._overflowWeekday=!0:(_=Re(t,s,n,r,d),e._a[fe]=_.year,e._dayOfYear=_.dayOfYear)}(e),null!=e._dayOfYear&&(r=ga(e._a[fe],s[fe]),(e._dayOfYear>Fe(r)||0===e._dayOfYear)&&(L(e)._overflowDayOfYear=!0),t=Ne(r,0,e._dayOfYear),e._a[pe]=t.getUTCMonth(),e._a[ke]=t.getUTCDate()),a=0;a<3&&null==e._a[a];++a)e._a[a]=i[a]=s[a];for(;a<7;a++)e._a[a]=i[a]=null==e._a[a]?2===a?1:0:e._a[a];24===e._a[De]&&0===e._a[Te]&&0===e._a[ge]&&0===e._a[we]&&(e._nextDay=!0,e._a[De]=0),e._d=(e._useUTC?Ne:function(e,a,t,s,n,r,d){var _;return e<100&&0<=e?(_=new Date(e+400,a,t,s,n,r,d),isFinite(_.getFullYear())&&_.setFullYear(e)):_=new Date(e,a,t,s,n,r,d),_}).apply(null,i),n=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[De]=24),e._w&&void 0!==e._w.d&&e._w.d!==n&&(L(e).weekdayMismatch=!0)}}function va(e){if(e._f!==M.ISO_8601)if(e._f!==M.RFC_2822){e._a=[],L(e).empty=!0;for(var a,t,s,n,r,d,_,i=""+e._i,o=i.length,m=0,u=E(e._f,e._locale).match(j)||[],l=0;lt.valueOf():t.valueOf()"}),yt.toJSON=function(){return this.isValid()?this.toISOString():null},yt.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},yt.unix=function(){return Math.floor(this.valueOf()/1e3)},yt.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},yt.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},yt.eraName=function(){for(var e,a=this.localeData().eras(),t=0,s=a.length;tthis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},yt.isLocal=function(){return!!this.isValid()&&!this._isUTC},yt.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},yt.isUtc=Ca,yt.isUTC=Ca,yt.zoneAbbr=function(){return this._isUTC?"UTC":""},yt.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},yt.dates=t("dates accessor is deprecated. Use date instead.",lt),yt.months=t("months accessor is deprecated. Use month instead",Ae),yt.years=t("years accessor is deprecated. Use year instead",ze),yt.zone=t("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(e,a){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,a),this):-this.utcOffset()}),yt.isDSTShifted=t("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){if(!r(this._isDSTShifted))return this._isDSTShifted;var e,a={};return p(a,this),(a=ba(a))._a?(e=(a._isUTC?c:Sa)(a._a),this._isDSTShifted=this.isValid()&&0>> 0, + i; + + for (i = 0; i < len; i++) { + if (i in t && fun.call(this, t[i], i, t)) { + return true; + } + } + + return false; + }; + } + + function isValid(m) { + if (m._isValid == null) { + var flags = getParsingFlags(m), + parsedParts = some.call(flags.parsedDateParts, function (i) { + return i != null; + }), + isNowValid = + !isNaN(m._d.getTime()) && + flags.overflow < 0 && + !flags.empty && + !flags.invalidEra && + !flags.invalidMonth && + !flags.invalidWeekday && + !flags.weekdayMismatch && + !flags.nullInput && + !flags.invalidFormat && + !flags.userInvalidated && + (!flags.meridiem || (flags.meridiem && parsedParts)); + + if (m._strict) { + isNowValid = + isNowValid && + flags.charsLeftOver === 0 && + flags.unusedTokens.length === 0 && + flags.bigHour === undefined; + } + + if (Object.isFrozen == null || !Object.isFrozen(m)) { + m._isValid = isNowValid; + } else { + return isNowValid; + } + } + return m._isValid; + } + + function createInvalid(flags) { + var m = createUTC(NaN); + if (flags != null) { + extend(getParsingFlags(m), flags); + } else { + getParsingFlags(m).userInvalidated = true; + } + + return m; + } + + // Plugins that add properties should also add the key here (null value), + // so we can properly clone ourselves. + var momentProperties = (hooks.momentProperties = []), + updateInProgress = false; + + function copyConfig(to, from) { + var i, prop, val; + + if (!isUndefined(from._isAMomentObject)) { + to._isAMomentObject = from._isAMomentObject; + } + if (!isUndefined(from._i)) { + to._i = from._i; + } + if (!isUndefined(from._f)) { + to._f = from._f; + } + if (!isUndefined(from._l)) { + to._l = from._l; + } + if (!isUndefined(from._strict)) { + to._strict = from._strict; + } + if (!isUndefined(from._tzm)) { + to._tzm = from._tzm; + } + if (!isUndefined(from._isUTC)) { + to._isUTC = from._isUTC; + } + if (!isUndefined(from._offset)) { + to._offset = from._offset; + } + if (!isUndefined(from._pf)) { + to._pf = getParsingFlags(from); + } + if (!isUndefined(from._locale)) { + to._locale = from._locale; + } + + if (momentProperties.length > 0) { + for (i = 0; i < momentProperties.length; i++) { + prop = momentProperties[i]; + val = from[prop]; + if (!isUndefined(val)) { + to[prop] = val; + } + } + } + + return to; + } + + // Moment prototype object + function Moment(config) { + copyConfig(this, config); + this._d = new Date(config._d != null ? config._d.getTime() : NaN); + if (!this.isValid()) { + this._d = new Date(NaN); + } + // Prevent infinite loop in case updateOffset creates new moment + // objects. + if (updateInProgress === false) { + updateInProgress = true; + hooks.updateOffset(this); + updateInProgress = false; + } + } + + function isMoment(obj) { + return ( + obj instanceof Moment || (obj != null && obj._isAMomentObject != null) + ); + } + + function warn(msg) { + if ( + hooks.suppressDeprecationWarnings === false && + typeof console !== 'undefined' && + console.warn + ) { + console.warn('Deprecation warning: ' + msg); + } + } + + function deprecate(msg, fn) { + var firstTime = true; + + return extend(function () { + if (hooks.deprecationHandler != null) { + hooks.deprecationHandler(null, msg); + } + if (firstTime) { + var args = [], + arg, + i, + key; + for (i = 0; i < arguments.length; i++) { + arg = ''; + if (typeof arguments[i] === 'object') { + arg += '\n[' + i + '] '; + for (key in arguments[0]) { + if (hasOwnProp(arguments[0], key)) { + arg += key + ': ' + arguments[0][key] + ', '; + } + } + arg = arg.slice(0, -2); // Remove trailing comma and space + } else { + arg = arguments[i]; + } + args.push(arg); + } + warn( + msg + + '\nArguments: ' + + Array.prototype.slice.call(args).join('') + + '\n' + + new Error().stack + ); + firstTime = false; + } + return fn.apply(this, arguments); + }, fn); + } + + var deprecations = {}; + + function deprecateSimple(name, msg) { + if (hooks.deprecationHandler != null) { + hooks.deprecationHandler(name, msg); + } + if (!deprecations[name]) { + warn(msg); + deprecations[name] = true; + } + } + + hooks.suppressDeprecationWarnings = false; + hooks.deprecationHandler = null; + + function isFunction(input) { + return ( + (typeof Function !== 'undefined' && input instanceof Function) || + Object.prototype.toString.call(input) === '[object Function]' + ); + } + + function set(config) { + var prop, i; + for (i in config) { + if (hasOwnProp(config, i)) { + prop = config[i]; + if (isFunction(prop)) { + this[i] = prop; + } else { + this['_' + i] = prop; + } + } + } + this._config = config; + // Lenient ordinal parsing accepts just a number in addition to + // number + (possibly) stuff coming from _dayOfMonthOrdinalParse. + // TODO: Remove "ordinalParse" fallback in next major release. + this._dayOfMonthOrdinalParseLenient = new RegExp( + (this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) + + '|' + + /\d{1,2}/.source + ); + } + + function mergeConfigs(parentConfig, childConfig) { + var res = extend({}, parentConfig), + prop; + for (prop in childConfig) { + if (hasOwnProp(childConfig, prop)) { + if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) { + res[prop] = {}; + extend(res[prop], parentConfig[prop]); + extend(res[prop], childConfig[prop]); + } else if (childConfig[prop] != null) { + res[prop] = childConfig[prop]; + } else { + delete res[prop]; + } + } + } + for (prop in parentConfig) { + if ( + hasOwnProp(parentConfig, prop) && + !hasOwnProp(childConfig, prop) && + isObject(parentConfig[prop]) + ) { + // make sure changes to properties don't modify parent config + res[prop] = extend({}, res[prop]); + } + } + return res; + } + + function Locale(config) { + if (config != null) { + this.set(config); + } + } + + var keys; + + if (Object.keys) { + keys = Object.keys; + } else { + keys = function (obj) { + var i, + res = []; + for (i in obj) { + if (hasOwnProp(obj, i)) { + res.push(i); + } + } + return res; + }; + } + + var defaultCalendar = { + sameDay: '[Today at] LT', + nextDay: '[Tomorrow at] LT', + nextWeek: 'dddd [at] LT', + lastDay: '[Yesterday at] LT', + lastWeek: '[Last] dddd [at] LT', + sameElse: 'L', + }; + + function calendar(key, mom, now) { + var output = this._calendar[key] || this._calendar['sameElse']; + return isFunction(output) ? output.call(mom, now) : output; + } + + function zeroFill(number, targetLength, forceSign) { + var absNumber = '' + Math.abs(number), + zerosToFill = targetLength - absNumber.length, + sign = number >= 0; + return ( + (sign ? (forceSign ? '+' : '') : '-') + + Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) + + absNumber + ); + } + + var formattingTokens = /(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g, + localFormattingTokens = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g, + formatFunctions = {}, + formatTokenFunctions = {}; + + // token: 'M' + // padded: ['MM', 2] + // ordinal: 'Mo' + // callback: function () { this.month() + 1 } + function addFormatToken(token, padded, ordinal, callback) { + var func = callback; + if (typeof callback === 'string') { + func = function () { + return this[callback](); + }; + } + if (token) { + formatTokenFunctions[token] = func; + } + if (padded) { + formatTokenFunctions[padded[0]] = function () { + return zeroFill(func.apply(this, arguments), padded[1], padded[2]); + }; + } + if (ordinal) { + formatTokenFunctions[ordinal] = function () { + return this.localeData().ordinal( + func.apply(this, arguments), + token + ); + }; + } + } + + function removeFormattingTokens(input) { + if (input.match(/\[[\s\S]/)) { + return input.replace(/^\[|\]$/g, ''); + } + return input.replace(/\\/g, ''); + } + + function makeFormatFunction(format) { + var array = format.match(formattingTokens), + i, + length; + + for (i = 0, length = array.length; i < length; i++) { + if (formatTokenFunctions[array[i]]) { + array[i] = formatTokenFunctions[array[i]]; + } else { + array[i] = removeFormattingTokens(array[i]); + } + } + + return function (mom) { + var output = '', + i; + for (i = 0; i < length; i++) { + output += isFunction(array[i]) + ? array[i].call(mom, format) + : array[i]; + } + return output; + }; + } + + // format date using native date object + function formatMoment(m, format) { + if (!m.isValid()) { + return m.localeData().invalidDate(); + } + + format = expandFormat(format, m.localeData()); + formatFunctions[format] = + formatFunctions[format] || makeFormatFunction(format); + + return formatFunctions[format](m); + } + + function expandFormat(format, locale) { + var i = 5; + + function replaceLongDateFormatTokens(input) { + return locale.longDateFormat(input) || input; + } + + localFormattingTokens.lastIndex = 0; + while (i >= 0 && localFormattingTokens.test(format)) { + format = format.replace( + localFormattingTokens, + replaceLongDateFormatTokens + ); + localFormattingTokens.lastIndex = 0; + i -= 1; + } + + return format; + } + + var defaultLongDateFormat = { + LTS: 'h:mm:ss A', + LT: 'h:mm A', + L: 'MM/DD/YYYY', + LL: 'MMMM D, YYYY', + LLL: 'MMMM D, YYYY h:mm A', + LLLL: 'dddd, MMMM D, YYYY h:mm A', + }; + + function longDateFormat(key) { + var format = this._longDateFormat[key], + formatUpper = this._longDateFormat[key.toUpperCase()]; + + if (format || !formatUpper) { + return format; + } + + this._longDateFormat[key] = formatUpper + .match(formattingTokens) + .map(function (tok) { + if ( + tok === 'MMMM' || + tok === 'MM' || + tok === 'DD' || + tok === 'dddd' + ) { + return tok.slice(1); + } + return tok; + }) + .join(''); + + return this._longDateFormat[key]; + } + + var defaultInvalidDate = 'Invalid date'; + + function invalidDate() { + return this._invalidDate; + } + + var defaultOrdinal = '%d', + defaultDayOfMonthOrdinalParse = /\d{1,2}/; + + function ordinal(number) { + return this._ordinal.replace('%d', number); + } + + var defaultRelativeTime = { + future: 'in %s', + past: '%s ago', + s: 'a few seconds', + ss: '%d seconds', + m: 'a minute', + mm: '%d minutes', + h: 'an hour', + hh: '%d hours', + d: 'a day', + dd: '%d days', + w: 'a week', + ww: '%d weeks', + M: 'a month', + MM: '%d months', + y: 'a year', + yy: '%d years', + }; + + function relativeTime(number, withoutSuffix, string, isFuture) { + var output = this._relativeTime[string]; + return isFunction(output) + ? output(number, withoutSuffix, string, isFuture) + : output.replace(/%d/i, number); + } + + function pastFuture(diff, output) { + var format = this._relativeTime[diff > 0 ? 'future' : 'past']; + return isFunction(format) ? format(output) : format.replace(/%s/i, output); + } + + var aliases = {}; + + function addUnitAlias(unit, shorthand) { + var lowerCase = unit.toLowerCase(); + aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit; + } + + function normalizeUnits(units) { + return typeof units === 'string' + ? aliases[units] || aliases[units.toLowerCase()] + : undefined; + } + + function normalizeObjectUnits(inputObject) { + var normalizedInput = {}, + normalizedProp, + prop; + + for (prop in inputObject) { + if (hasOwnProp(inputObject, prop)) { + normalizedProp = normalizeUnits(prop); + if (normalizedProp) { + normalizedInput[normalizedProp] = inputObject[prop]; + } + } + } + + return normalizedInput; + } + + var priorities = {}; + + function addUnitPriority(unit, priority) { + priorities[unit] = priority; + } + + function getPrioritizedUnits(unitsObj) { + var units = [], + u; + for (u in unitsObj) { + if (hasOwnProp(unitsObj, u)) { + units.push({ unit: u, priority: priorities[u] }); + } + } + units.sort(function (a, b) { + return a.priority - b.priority; + }); + return units; + } + + function isLeapYear(year) { + return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0; + } + + function absFloor(number) { + if (number < 0) { + // -0 -> 0 + return Math.ceil(number) || 0; + } else { + return Math.floor(number); + } + } + + function toInt(argumentForCoercion) { + var coercedNumber = +argumentForCoercion, + value = 0; + + if (coercedNumber !== 0 && isFinite(coercedNumber)) { + value = absFloor(coercedNumber); + } + + return value; + } + + function makeGetSet(unit, keepTime) { + return function (value) { + if (value != null) { + set$1(this, unit, value); + hooks.updateOffset(this, keepTime); + return this; + } else { + return get(this, unit); + } + }; + } + + function get(mom, unit) { + return mom.isValid() + ? mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]() + : NaN; + } + + function set$1(mom, unit, value) { + if (mom.isValid() && !isNaN(value)) { + if ( + unit === 'FullYear' && + isLeapYear(mom.year()) && + mom.month() === 1 && + mom.date() === 29 + ) { + value = toInt(value); + mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit]( + value, + mom.month(), + daysInMonth(value, mom.month()) + ); + } else { + mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value); + } + } + } + + // MOMENTS + + function stringGet(units) { + units = normalizeUnits(units); + if (isFunction(this[units])) { + return this[units](); + } + return this; + } + + function stringSet(units, value) { + if (typeof units === 'object') { + units = normalizeObjectUnits(units); + var prioritized = getPrioritizedUnits(units), + i; + for (i = 0; i < prioritized.length; i++) { + this[prioritized[i].unit](units[prioritized[i].unit]); + } + } else { + units = normalizeUnits(units); + if (isFunction(this[units])) { + return this[units](value); + } + } + return this; + } + + var match1 = /\d/, // 0 - 9 + match2 = /\d\d/, // 00 - 99 + match3 = /\d{3}/, // 000 - 999 + match4 = /\d{4}/, // 0000 - 9999 + match6 = /[+-]?\d{6}/, // -999999 - 999999 + match1to2 = /\d\d?/, // 0 - 99 + match3to4 = /\d\d\d\d?/, // 999 - 9999 + match5to6 = /\d\d\d\d\d\d?/, // 99999 - 999999 + match1to3 = /\d{1,3}/, // 0 - 999 + match1to4 = /\d{1,4}/, // 0 - 9999 + match1to6 = /[+-]?\d{1,6}/, // -999999 - 999999 + matchUnsigned = /\d+/, // 0 - inf + matchSigned = /[+-]?\d+/, // -inf - inf + matchOffset = /Z|[+-]\d\d:?\d\d/gi, // +00:00 -00:00 +0000 -0000 or Z + matchShortOffset = /Z|[+-]\d\d(?::?\d\d)?/gi, // +00 -00 +00:00 -00:00 +0000 -0000 or Z + matchTimestamp = /[+-]?\d+(\.\d{1,3})?/, // 123456789 123456789.123 + // any word (or two) characters or numbers including two/three word month in arabic. + // includes scottish gaelic two word and hyphenated months + matchWord = /[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i, + regexes; + + regexes = {}; + + function addRegexToken(token, regex, strictRegex) { + regexes[token] = isFunction(regex) + ? regex + : function (isStrict, localeData) { + return isStrict && strictRegex ? strictRegex : regex; + }; + } + + function getParseRegexForToken(token, config) { + if (!hasOwnProp(regexes, token)) { + return new RegExp(unescapeFormat(token)); + } + + return regexes[token](config._strict, config._locale); + } + + // Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript + function unescapeFormat(s) { + return regexEscape( + s + .replace('\\', '') + .replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g, function ( + matched, + p1, + p2, + p3, + p4 + ) { + return p1 || p2 || p3 || p4; + }) + ); + } + + function regexEscape(s) { + return s.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&'); + } + + var tokens = {}; + + function addParseToken(token, callback) { + var i, + func = callback; + if (typeof token === 'string') { + token = [token]; + } + if (isNumber(callback)) { + func = function (input, array) { + array[callback] = toInt(input); + }; + } + for (i = 0; i < token.length; i++) { + tokens[token[i]] = func; + } + } + + function addWeekParseToken(token, callback) { + addParseToken(token, function (input, array, config, token) { + config._w = config._w || {}; + callback(input, config._w, config, token); + }); + } + + function addTimeToArrayFromToken(token, input, config) { + if (input != null && hasOwnProp(tokens, token)) { + tokens[token](input, config._a, config, token); + } + } + + var YEAR = 0, + MONTH = 1, + DATE = 2, + HOUR = 3, + MINUTE = 4, + SECOND = 5, + MILLISECOND = 6, + WEEK = 7, + WEEKDAY = 8; + + function mod(n, x) { + return ((n % x) + x) % x; + } + + var indexOf; + + if (Array.prototype.indexOf) { + indexOf = Array.prototype.indexOf; + } else { + indexOf = function (o) { + // I know + var i; + for (i = 0; i < this.length; ++i) { + if (this[i] === o) { + return i; + } + } + return -1; + }; + } + + function daysInMonth(year, month) { + if (isNaN(year) || isNaN(month)) { + return NaN; + } + var modMonth = mod(month, 12); + year += (month - modMonth) / 12; + return modMonth === 1 + ? isLeapYear(year) + ? 29 + : 28 + : 31 - ((modMonth % 7) % 2); + } + + // FORMATTING + + addFormatToken('M', ['MM', 2], 'Mo', function () { + return this.month() + 1; + }); + + addFormatToken('MMM', 0, 0, function (format) { + return this.localeData().monthsShort(this, format); + }); + + addFormatToken('MMMM', 0, 0, function (format) { + return this.localeData().months(this, format); + }); + + // ALIASES + + addUnitAlias('month', 'M'); + + // PRIORITY + + addUnitPriority('month', 8); + + // PARSING + + addRegexToken('M', match1to2); + addRegexToken('MM', match1to2, match2); + addRegexToken('MMM', function (isStrict, locale) { + return locale.monthsShortRegex(isStrict); + }); + addRegexToken('MMMM', function (isStrict, locale) { + return locale.monthsRegex(isStrict); + }); + + addParseToken(['M', 'MM'], function (input, array) { + array[MONTH] = toInt(input) - 1; + }); + + addParseToken(['MMM', 'MMMM'], function (input, array, config, token) { + var month = config._locale.monthsParse(input, token, config._strict); + // if we didn't find a month name, mark the date as invalid. + if (month != null) { + array[MONTH] = month; + } else { + getParsingFlags(config).invalidMonth = input; + } + }); + + // LOCALES + + var defaultLocaleMonths = 'January_February_March_April_May_June_July_August_September_October_November_December'.split( + '_' + ), + defaultLocaleMonthsShort = 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split( + '_' + ), + MONTHS_IN_FORMAT = /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/, + defaultMonthsShortRegex = matchWord, + defaultMonthsRegex = matchWord; + + function localeMonths(m, format) { + if (!m) { + return isArray(this._months) + ? this._months + : this._months['standalone']; + } + return isArray(this._months) + ? this._months[m.month()] + : this._months[ + (this._months.isFormat || MONTHS_IN_FORMAT).test(format) + ? 'format' + : 'standalone' + ][m.month()]; + } + + function localeMonthsShort(m, format) { + if (!m) { + return isArray(this._monthsShort) + ? this._monthsShort + : this._monthsShort['standalone']; + } + return isArray(this._monthsShort) + ? this._monthsShort[m.month()] + : this._monthsShort[ + MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone' + ][m.month()]; + } + + function handleStrictParse(monthName, format, strict) { + var i, + ii, + mom, + llc = monthName.toLocaleLowerCase(); + if (!this._monthsParse) { + // this is not used + this._monthsParse = []; + this._longMonthsParse = []; + this._shortMonthsParse = []; + for (i = 0; i < 12; ++i) { + mom = createUTC([2000, i]); + this._shortMonthsParse[i] = this.monthsShort( + mom, + '' + ).toLocaleLowerCase(); + this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase(); + } + } + + if (strict) { + if (format === 'MMM') { + ii = indexOf.call(this._shortMonthsParse, llc); + return ii !== -1 ? ii : null; + } else { + ii = indexOf.call(this._longMonthsParse, llc); + return ii !== -1 ? ii : null; + } + } else { + if (format === 'MMM') { + ii = indexOf.call(this._shortMonthsParse, llc); + if (ii !== -1) { + return ii; + } + ii = indexOf.call(this._longMonthsParse, llc); + return ii !== -1 ? ii : null; + } else { + ii = indexOf.call(this._longMonthsParse, llc); + if (ii !== -1) { + return ii; + } + ii = indexOf.call(this._shortMonthsParse, llc); + return ii !== -1 ? ii : null; + } + } + } + + function localeMonthsParse(monthName, format, strict) { + var i, mom, regex; + + if (this._monthsParseExact) { + return handleStrictParse.call(this, monthName, format, strict); + } + + if (!this._monthsParse) { + this._monthsParse = []; + this._longMonthsParse = []; + this._shortMonthsParse = []; + } + + // TODO: add sorting + // Sorting makes sure if one month (or abbr) is a prefix of another + // see sorting in computeMonthsParse + for (i = 0; i < 12; i++) { + // make the regex if we don't have it already + mom = createUTC([2000, i]); + if (strict && !this._longMonthsParse[i]) { + this._longMonthsParse[i] = new RegExp( + '^' + this.months(mom, '').replace('.', '') + '$', + 'i' + ); + this._shortMonthsParse[i] = new RegExp( + '^' + this.monthsShort(mom, '').replace('.', '') + '$', + 'i' + ); + } + if (!strict && !this._monthsParse[i]) { + regex = + '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, ''); + this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i'); + } + // test the regex + if ( + strict && + format === 'MMMM' && + this._longMonthsParse[i].test(monthName) + ) { + return i; + } else if ( + strict && + format === 'MMM' && + this._shortMonthsParse[i].test(monthName) + ) { + return i; + } else if (!strict && this._monthsParse[i].test(monthName)) { + return i; + } + } + } + + // MOMENTS + + function setMonth(mom, value) { + var dayOfMonth; + + if (!mom.isValid()) { + // No op + return mom; + } + + if (typeof value === 'string') { + if (/^\d+$/.test(value)) { + value = toInt(value); + } else { + value = mom.localeData().monthsParse(value); + // TODO: Another silent failure? + if (!isNumber(value)) { + return mom; + } + } + } + + dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value)); + mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth); + return mom; + } + + function getSetMonth(value) { + if (value != null) { + setMonth(this, value); + hooks.updateOffset(this, true); + return this; + } else { + return get(this, 'Month'); + } + } + + function getDaysInMonth() { + return daysInMonth(this.year(), this.month()); + } + + function monthsShortRegex(isStrict) { + if (this._monthsParseExact) { + if (!hasOwnProp(this, '_monthsRegex')) { + computeMonthsParse.call(this); + } + if (isStrict) { + return this._monthsShortStrictRegex; + } else { + return this._monthsShortRegex; + } + } else { + if (!hasOwnProp(this, '_monthsShortRegex')) { + this._monthsShortRegex = defaultMonthsShortRegex; + } + return this._monthsShortStrictRegex && isStrict + ? this._monthsShortStrictRegex + : this._monthsShortRegex; + } + } + + function monthsRegex(isStrict) { + if (this._monthsParseExact) { + if (!hasOwnProp(this, '_monthsRegex')) { + computeMonthsParse.call(this); + } + if (isStrict) { + return this._monthsStrictRegex; + } else { + return this._monthsRegex; + } + } else { + if (!hasOwnProp(this, '_monthsRegex')) { + this._monthsRegex = defaultMonthsRegex; + } + return this._monthsStrictRegex && isStrict + ? this._monthsStrictRegex + : this._monthsRegex; + } + } + + function computeMonthsParse() { + function cmpLenRev(a, b) { + return b.length - a.length; + } + + var shortPieces = [], + longPieces = [], + mixedPieces = [], + i, + mom; + for (i = 0; i < 12; i++) { + // make the regex if we don't have it already + mom = createUTC([2000, i]); + shortPieces.push(this.monthsShort(mom, '')); + longPieces.push(this.months(mom, '')); + mixedPieces.push(this.months(mom, '')); + mixedPieces.push(this.monthsShort(mom, '')); + } + // Sorting makes sure if one month (or abbr) is a prefix of another it + // will match the longer piece. + shortPieces.sort(cmpLenRev); + longPieces.sort(cmpLenRev); + mixedPieces.sort(cmpLenRev); + for (i = 0; i < 12; i++) { + shortPieces[i] = regexEscape(shortPieces[i]); + longPieces[i] = regexEscape(longPieces[i]); + } + for (i = 0; i < 24; i++) { + mixedPieces[i] = regexEscape(mixedPieces[i]); + } + + this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i'); + this._monthsShortRegex = this._monthsRegex; + this._monthsStrictRegex = new RegExp( + '^(' + longPieces.join('|') + ')', + 'i' + ); + this._monthsShortStrictRegex = new RegExp( + '^(' + shortPieces.join('|') + ')', + 'i' + ); + } + + // FORMATTING + + addFormatToken('Y', 0, 0, function () { + var y = this.year(); + return y <= 9999 ? zeroFill(y, 4) : '+' + y; + }); + + addFormatToken(0, ['YY', 2], 0, function () { + return this.year() % 100; + }); + + addFormatToken(0, ['YYYY', 4], 0, 'year'); + addFormatToken(0, ['YYYYY', 5], 0, 'year'); + addFormatToken(0, ['YYYYYY', 6, true], 0, 'year'); + + // ALIASES + + addUnitAlias('year', 'y'); + + // PRIORITIES + + addUnitPriority('year', 1); + + // PARSING + + addRegexToken('Y', matchSigned); + addRegexToken('YY', match1to2, match2); + addRegexToken('YYYY', match1to4, match4); + addRegexToken('YYYYY', match1to6, match6); + addRegexToken('YYYYYY', match1to6, match6); + + addParseToken(['YYYYY', 'YYYYYY'], YEAR); + addParseToken('YYYY', function (input, array) { + array[YEAR] = + input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input); + }); + addParseToken('YY', function (input, array) { + array[YEAR] = hooks.parseTwoDigitYear(input); + }); + addParseToken('Y', function (input, array) { + array[YEAR] = parseInt(input, 10); + }); + + // HELPERS + + function daysInYear(year) { + return isLeapYear(year) ? 366 : 365; + } + + // HOOKS + + hooks.parseTwoDigitYear = function (input) { + return toInt(input) + (toInt(input) > 68 ? 1900 : 2000); + }; + + // MOMENTS + + var getSetYear = makeGetSet('FullYear', true); + + function getIsLeapYear() { + return isLeapYear(this.year()); + } + + function createDate(y, m, d, h, M, s, ms) { + // can't just apply() to create a date: + // https://stackoverflow.com/q/181348 + var date; + // the date constructor remaps years 0-99 to 1900-1999 + if (y < 100 && y >= 0) { + // preserve leap years using a full 400 year cycle, then reset + date = new Date(y + 400, m, d, h, M, s, ms); + if (isFinite(date.getFullYear())) { + date.setFullYear(y); + } + } else { + date = new Date(y, m, d, h, M, s, ms); + } + + return date; + } + + function createUTCDate(y) { + var date, args; + // the Date.UTC function remaps years 0-99 to 1900-1999 + if (y < 100 && y >= 0) { + args = Array.prototype.slice.call(arguments); + // preserve leap years using a full 400 year cycle, then reset + args[0] = y + 400; + date = new Date(Date.UTC.apply(null, args)); + if (isFinite(date.getUTCFullYear())) { + date.setUTCFullYear(y); + } + } else { + date = new Date(Date.UTC.apply(null, arguments)); + } + + return date; + } + + // start-of-first-week - start-of-year + function firstWeekOffset(year, dow, doy) { + var // first-week day -- which january is always in the first week (4 for iso, 1 for other) + fwd = 7 + dow - doy, + // first-week day local weekday -- which local weekday is fwd + fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7; + + return -fwdlw + fwd - 1; + } + + // https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday + function dayOfYearFromWeeks(year, week, weekday, dow, doy) { + var localWeekday = (7 + weekday - dow) % 7, + weekOffset = firstWeekOffset(year, dow, doy), + dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset, + resYear, + resDayOfYear; + + if (dayOfYear <= 0) { + resYear = year - 1; + resDayOfYear = daysInYear(resYear) + dayOfYear; + } else if (dayOfYear > daysInYear(year)) { + resYear = year + 1; + resDayOfYear = dayOfYear - daysInYear(year); + } else { + resYear = year; + resDayOfYear = dayOfYear; + } + + return { + year: resYear, + dayOfYear: resDayOfYear, + }; + } + + function weekOfYear(mom, dow, doy) { + var weekOffset = firstWeekOffset(mom.year(), dow, doy), + week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1, + resWeek, + resYear; + + if (week < 1) { + resYear = mom.year() - 1; + resWeek = week + weeksInYear(resYear, dow, doy); + } else if (week > weeksInYear(mom.year(), dow, doy)) { + resWeek = week - weeksInYear(mom.year(), dow, doy); + resYear = mom.year() + 1; + } else { + resYear = mom.year(); + resWeek = week; + } + + return { + week: resWeek, + year: resYear, + }; + } + + function weeksInYear(year, dow, doy) { + var weekOffset = firstWeekOffset(year, dow, doy), + weekOffsetNext = firstWeekOffset(year + 1, dow, doy); + return (daysInYear(year) - weekOffset + weekOffsetNext) / 7; + } + + // FORMATTING + + addFormatToken('w', ['ww', 2], 'wo', 'week'); + addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek'); + + // ALIASES + + addUnitAlias('week', 'w'); + addUnitAlias('isoWeek', 'W'); + + // PRIORITIES + + addUnitPriority('week', 5); + addUnitPriority('isoWeek', 5); + + // PARSING + + addRegexToken('w', match1to2); + addRegexToken('ww', match1to2, match2); + addRegexToken('W', match1to2); + addRegexToken('WW', match1to2, match2); + + addWeekParseToken(['w', 'ww', 'W', 'WW'], function ( + input, + week, + config, + token + ) { + week[token.substr(0, 1)] = toInt(input); + }); + + // HELPERS + + // LOCALES + + function localeWeek(mom) { + return weekOfYear(mom, this._week.dow, this._week.doy).week; + } + + var defaultLocaleWeek = { + dow: 0, // Sunday is the first day of the week. + doy: 6, // The week that contains Jan 6th is the first week of the year. + }; + + function localeFirstDayOfWeek() { + return this._week.dow; + } + + function localeFirstDayOfYear() { + return this._week.doy; + } + + // MOMENTS + + function getSetWeek(input) { + var week = this.localeData().week(this); + return input == null ? week : this.add((input - week) * 7, 'd'); + } + + function getSetISOWeek(input) { + var week = weekOfYear(this, 1, 4).week; + return input == null ? week : this.add((input - week) * 7, 'd'); + } + + // FORMATTING + + addFormatToken('d', 0, 'do', 'day'); + + addFormatToken('dd', 0, 0, function (format) { + return this.localeData().weekdaysMin(this, format); + }); + + addFormatToken('ddd', 0, 0, function (format) { + return this.localeData().weekdaysShort(this, format); + }); + + addFormatToken('dddd', 0, 0, function (format) { + return this.localeData().weekdays(this, format); + }); + + addFormatToken('e', 0, 0, 'weekday'); + addFormatToken('E', 0, 0, 'isoWeekday'); + + // ALIASES + + addUnitAlias('day', 'd'); + addUnitAlias('weekday', 'e'); + addUnitAlias('isoWeekday', 'E'); + + // PRIORITY + addUnitPriority('day', 11); + addUnitPriority('weekday', 11); + addUnitPriority('isoWeekday', 11); + + // PARSING + + addRegexToken('d', match1to2); + addRegexToken('e', match1to2); + addRegexToken('E', match1to2); + addRegexToken('dd', function (isStrict, locale) { + return locale.weekdaysMinRegex(isStrict); + }); + addRegexToken('ddd', function (isStrict, locale) { + return locale.weekdaysShortRegex(isStrict); + }); + addRegexToken('dddd', function (isStrict, locale) { + return locale.weekdaysRegex(isStrict); + }); + + addWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) { + var weekday = config._locale.weekdaysParse(input, token, config._strict); + // if we didn't get a weekday name, mark the date as invalid + if (weekday != null) { + week.d = weekday; + } else { + getParsingFlags(config).invalidWeekday = input; + } + }); + + addWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) { + week[token] = toInt(input); + }); + + // HELPERS + + function parseWeekday(input, locale) { + if (typeof input !== 'string') { + return input; + } + + if (!isNaN(input)) { + return parseInt(input, 10); + } + + input = locale.weekdaysParse(input); + if (typeof input === 'number') { + return input; + } + + return null; + } + + function parseIsoWeekday(input, locale) { + if (typeof input === 'string') { + return locale.weekdaysParse(input) % 7 || 7; + } + return isNaN(input) ? null : input; + } + + // LOCALES + function shiftWeekdays(ws, n) { + return ws.slice(n, 7).concat(ws.slice(0, n)); + } + + var defaultLocaleWeekdays = 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split( + '_' + ), + defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'), + defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'), + defaultWeekdaysRegex = matchWord, + defaultWeekdaysShortRegex = matchWord, + defaultWeekdaysMinRegex = matchWord; + + function localeWeekdays(m, format) { + var weekdays = isArray(this._weekdays) + ? this._weekdays + : this._weekdays[ + m && m !== true && this._weekdays.isFormat.test(format) + ? 'format' + : 'standalone' + ]; + return m === true + ? shiftWeekdays(weekdays, this._week.dow) + : m + ? weekdays[m.day()] + : weekdays; + } + + function localeWeekdaysShort(m) { + return m === true + ? shiftWeekdays(this._weekdaysShort, this._week.dow) + : m + ? this._weekdaysShort[m.day()] + : this._weekdaysShort; + } + + function localeWeekdaysMin(m) { + return m === true + ? shiftWeekdays(this._weekdaysMin, this._week.dow) + : m + ? this._weekdaysMin[m.day()] + : this._weekdaysMin; + } + + function handleStrictParse$1(weekdayName, format, strict) { + var i, + ii, + mom, + llc = weekdayName.toLocaleLowerCase(); + if (!this._weekdaysParse) { + this._weekdaysParse = []; + this._shortWeekdaysParse = []; + this._minWeekdaysParse = []; + + for (i = 0; i < 7; ++i) { + mom = createUTC([2000, 1]).day(i); + this._minWeekdaysParse[i] = this.weekdaysMin( + mom, + '' + ).toLocaleLowerCase(); + this._shortWeekdaysParse[i] = this.weekdaysShort( + mom, + '' + ).toLocaleLowerCase(); + this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase(); + } + } + + if (strict) { + if (format === 'dddd') { + ii = indexOf.call(this._weekdaysParse, llc); + return ii !== -1 ? ii : null; + } else if (format === 'ddd') { + ii = indexOf.call(this._shortWeekdaysParse, llc); + return ii !== -1 ? ii : null; + } else { + ii = indexOf.call(this._minWeekdaysParse, llc); + return ii !== -1 ? ii : null; + } + } else { + if (format === 'dddd') { + ii = indexOf.call(this._weekdaysParse, llc); + if (ii !== -1) { + return ii; + } + ii = indexOf.call(this._shortWeekdaysParse, llc); + if (ii !== -1) { + return ii; + } + ii = indexOf.call(this._minWeekdaysParse, llc); + return ii !== -1 ? ii : null; + } else if (format === 'ddd') { + ii = indexOf.call(this._shortWeekdaysParse, llc); + if (ii !== -1) { + return ii; + } + ii = indexOf.call(this._weekdaysParse, llc); + if (ii !== -1) { + return ii; + } + ii = indexOf.call(this._minWeekdaysParse, llc); + return ii !== -1 ? ii : null; + } else { + ii = indexOf.call(this._minWeekdaysParse, llc); + if (ii !== -1) { + return ii; + } + ii = indexOf.call(this._weekdaysParse, llc); + if (ii !== -1) { + return ii; + } + ii = indexOf.call(this._shortWeekdaysParse, llc); + return ii !== -1 ? ii : null; + } + } + } + + function localeWeekdaysParse(weekdayName, format, strict) { + var i, mom, regex; + + if (this._weekdaysParseExact) { + return handleStrictParse$1.call(this, weekdayName, format, strict); + } + + if (!this._weekdaysParse) { + this._weekdaysParse = []; + this._minWeekdaysParse = []; + this._shortWeekdaysParse = []; + this._fullWeekdaysParse = []; + } + + for (i = 0; i < 7; i++) { + // make the regex if we don't have it already + + mom = createUTC([2000, 1]).day(i); + if (strict && !this._fullWeekdaysParse[i]) { + this._fullWeekdaysParse[i] = new RegExp( + '^' + this.weekdays(mom, '').replace('.', '\\.?') + '$', + 'i' + ); + this._shortWeekdaysParse[i] = new RegExp( + '^' + this.weekdaysShort(mom, '').replace('.', '\\.?') + '$', + 'i' + ); + this._minWeekdaysParse[i] = new RegExp( + '^' + this.weekdaysMin(mom, '').replace('.', '\\.?') + '$', + 'i' + ); + } + if (!this._weekdaysParse[i]) { + regex = + '^' + + this.weekdays(mom, '') + + '|^' + + this.weekdaysShort(mom, '') + + '|^' + + this.weekdaysMin(mom, ''); + this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i'); + } + // test the regex + if ( + strict && + format === 'dddd' && + this._fullWeekdaysParse[i].test(weekdayName) + ) { + return i; + } else if ( + strict && + format === 'ddd' && + this._shortWeekdaysParse[i].test(weekdayName) + ) { + return i; + } else if ( + strict && + format === 'dd' && + this._minWeekdaysParse[i].test(weekdayName) + ) { + return i; + } else if (!strict && this._weekdaysParse[i].test(weekdayName)) { + return i; + } + } + } + + // MOMENTS + + function getSetDayOfWeek(input) { + if (!this.isValid()) { + return input != null ? this : NaN; + } + var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay(); + if (input != null) { + input = parseWeekday(input, this.localeData()); + return this.add(input - day, 'd'); + } else { + return day; + } + } + + function getSetLocaleDayOfWeek(input) { + if (!this.isValid()) { + return input != null ? this : NaN; + } + var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7; + return input == null ? weekday : this.add(input - weekday, 'd'); + } + + function getSetISODayOfWeek(input) { + if (!this.isValid()) { + return input != null ? this : NaN; + } + + // behaves the same as moment#day except + // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6) + // as a setter, sunday should belong to the previous week. + + if (input != null) { + var weekday = parseIsoWeekday(input, this.localeData()); + return this.day(this.day() % 7 ? weekday : weekday - 7); + } else { + return this.day() || 7; + } + } + + function weekdaysRegex(isStrict) { + if (this._weekdaysParseExact) { + if (!hasOwnProp(this, '_weekdaysRegex')) { + computeWeekdaysParse.call(this); + } + if (isStrict) { + return this._weekdaysStrictRegex; + } else { + return this._weekdaysRegex; + } + } else { + if (!hasOwnProp(this, '_weekdaysRegex')) { + this._weekdaysRegex = defaultWeekdaysRegex; + } + return this._weekdaysStrictRegex && isStrict + ? this._weekdaysStrictRegex + : this._weekdaysRegex; + } + } + + function weekdaysShortRegex(isStrict) { + if (this._weekdaysParseExact) { + if (!hasOwnProp(this, '_weekdaysRegex')) { + computeWeekdaysParse.call(this); + } + if (isStrict) { + return this._weekdaysShortStrictRegex; + } else { + return this._weekdaysShortRegex; + } + } else { + if (!hasOwnProp(this, '_weekdaysShortRegex')) { + this._weekdaysShortRegex = defaultWeekdaysShortRegex; + } + return this._weekdaysShortStrictRegex && isStrict + ? this._weekdaysShortStrictRegex + : this._weekdaysShortRegex; + } + } + + function weekdaysMinRegex(isStrict) { + if (this._weekdaysParseExact) { + if (!hasOwnProp(this, '_weekdaysRegex')) { + computeWeekdaysParse.call(this); + } + if (isStrict) { + return this._weekdaysMinStrictRegex; + } else { + return this._weekdaysMinRegex; + } + } else { + if (!hasOwnProp(this, '_weekdaysMinRegex')) { + this._weekdaysMinRegex = defaultWeekdaysMinRegex; + } + return this._weekdaysMinStrictRegex && isStrict + ? this._weekdaysMinStrictRegex + : this._weekdaysMinRegex; + } + } + + function computeWeekdaysParse() { + function cmpLenRev(a, b) { + return b.length - a.length; + } + + var minPieces = [], + shortPieces = [], + longPieces = [], + mixedPieces = [], + i, + mom, + minp, + shortp, + longp; + for (i = 0; i < 7; i++) { + // make the regex if we don't have it already + mom = createUTC([2000, 1]).day(i); + minp = regexEscape(this.weekdaysMin(mom, '')); + shortp = regexEscape(this.weekdaysShort(mom, '')); + longp = regexEscape(this.weekdays(mom, '')); + minPieces.push(minp); + shortPieces.push(shortp); + longPieces.push(longp); + mixedPieces.push(minp); + mixedPieces.push(shortp); + mixedPieces.push(longp); + } + // Sorting makes sure if one weekday (or abbr) is a prefix of another it + // will match the longer piece. + minPieces.sort(cmpLenRev); + shortPieces.sort(cmpLenRev); + longPieces.sort(cmpLenRev); + mixedPieces.sort(cmpLenRev); + + this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i'); + this._weekdaysShortRegex = this._weekdaysRegex; + this._weekdaysMinRegex = this._weekdaysRegex; + + this._weekdaysStrictRegex = new RegExp( + '^(' + longPieces.join('|') + ')', + 'i' + ); + this._weekdaysShortStrictRegex = new RegExp( + '^(' + shortPieces.join('|') + ')', + 'i' + ); + this._weekdaysMinStrictRegex = new RegExp( + '^(' + minPieces.join('|') + ')', + 'i' + ); + } + + // FORMATTING + + function hFormat() { + return this.hours() % 12 || 12; + } + + function kFormat() { + return this.hours() || 24; + } + + addFormatToken('H', ['HH', 2], 0, 'hour'); + addFormatToken('h', ['hh', 2], 0, hFormat); + addFormatToken('k', ['kk', 2], 0, kFormat); + + addFormatToken('hmm', 0, 0, function () { + return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2); + }); + + addFormatToken('hmmss', 0, 0, function () { + return ( + '' + + hFormat.apply(this) + + zeroFill(this.minutes(), 2) + + zeroFill(this.seconds(), 2) + ); + }); + + addFormatToken('Hmm', 0, 0, function () { + return '' + this.hours() + zeroFill(this.minutes(), 2); + }); + + addFormatToken('Hmmss', 0, 0, function () { + return ( + '' + + this.hours() + + zeroFill(this.minutes(), 2) + + zeroFill(this.seconds(), 2) + ); + }); + + function meridiem(token, lowercase) { + addFormatToken(token, 0, 0, function () { + return this.localeData().meridiem( + this.hours(), + this.minutes(), + lowercase + ); + }); + } + + meridiem('a', true); + meridiem('A', false); + + // ALIASES + + addUnitAlias('hour', 'h'); + + // PRIORITY + addUnitPriority('hour', 13); + + // PARSING + + function matchMeridiem(isStrict, locale) { + return locale._meridiemParse; + } + + addRegexToken('a', matchMeridiem); + addRegexToken('A', matchMeridiem); + addRegexToken('H', match1to2); + addRegexToken('h', match1to2); + addRegexToken('k', match1to2); + addRegexToken('HH', match1to2, match2); + addRegexToken('hh', match1to2, match2); + addRegexToken('kk', match1to2, match2); + + addRegexToken('hmm', match3to4); + addRegexToken('hmmss', match5to6); + addRegexToken('Hmm', match3to4); + addRegexToken('Hmmss', match5to6); + + addParseToken(['H', 'HH'], HOUR); + addParseToken(['k', 'kk'], function (input, array, config) { + var kInput = toInt(input); + array[HOUR] = kInput === 24 ? 0 : kInput; + }); + addParseToken(['a', 'A'], function (input, array, config) { + config._isPm = config._locale.isPM(input); + config._meridiem = input; + }); + addParseToken(['h', 'hh'], function (input, array, config) { + array[HOUR] = toInt(input); + getParsingFlags(config).bigHour = true; + }); + addParseToken('hmm', function (input, array, config) { + var pos = input.length - 2; + array[HOUR] = toInt(input.substr(0, pos)); + array[MINUTE] = toInt(input.substr(pos)); + getParsingFlags(config).bigHour = true; + }); + addParseToken('hmmss', function (input, array, config) { + var pos1 = input.length - 4, + pos2 = input.length - 2; + array[HOUR] = toInt(input.substr(0, pos1)); + array[MINUTE] = toInt(input.substr(pos1, 2)); + array[SECOND] = toInt(input.substr(pos2)); + getParsingFlags(config).bigHour = true; + }); + addParseToken('Hmm', function (input, array, config) { + var pos = input.length - 2; + array[HOUR] = toInt(input.substr(0, pos)); + array[MINUTE] = toInt(input.substr(pos)); + }); + addParseToken('Hmmss', function (input, array, config) { + var pos1 = input.length - 4, + pos2 = input.length - 2; + array[HOUR] = toInt(input.substr(0, pos1)); + array[MINUTE] = toInt(input.substr(pos1, 2)); + array[SECOND] = toInt(input.substr(pos2)); + }); + + // LOCALES + + function localeIsPM(input) { + // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays + // Using charAt should be more compatible. + return (input + '').toLowerCase().charAt(0) === 'p'; + } + + var defaultLocaleMeridiemParse = /[ap]\.?m?\.?/i, + // Setting the hour should keep the time, because the user explicitly + // specified which hour they want. So trying to maintain the same hour (in + // a new timezone) makes sense. Adding/subtracting hours does not follow + // this rule. + getSetHour = makeGetSet('Hours', true); + + function localeMeridiem(hours, minutes, isLower) { + if (hours > 11) { + return isLower ? 'pm' : 'PM'; + } else { + return isLower ? 'am' : 'AM'; + } + } + + var baseConfig = { + calendar: defaultCalendar, + longDateFormat: defaultLongDateFormat, + invalidDate: defaultInvalidDate, + ordinal: defaultOrdinal, + dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse, + relativeTime: defaultRelativeTime, + + months: defaultLocaleMonths, + monthsShort: defaultLocaleMonthsShort, + + week: defaultLocaleWeek, + + weekdays: defaultLocaleWeekdays, + weekdaysMin: defaultLocaleWeekdaysMin, + weekdaysShort: defaultLocaleWeekdaysShort, + + meridiemParse: defaultLocaleMeridiemParse, + }; + + // internal storage for locale config files + var locales = {}, + localeFamilies = {}, + globalLocale; + + function commonPrefix(arr1, arr2) { + var i, + minl = Math.min(arr1.length, arr2.length); + for (i = 0; i < minl; i += 1) { + if (arr1[i] !== arr2[i]) { + return i; + } + } + return minl; + } + + function normalizeLocale(key) { + return key ? key.toLowerCase().replace('_', '-') : key; + } + + // pick the locale from the array + // try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each + // substring from most specific to least, but move to the next array item if it's a more specific variant than the current root + function chooseLocale(names) { + var i = 0, + j, + next, + locale, + split; + + while (i < names.length) { + split = normalizeLocale(names[i]).split('-'); + j = split.length; + next = normalizeLocale(names[i + 1]); + next = next ? next.split('-') : null; + while (j > 0) { + locale = loadLocale(split.slice(0, j).join('-')); + if (locale) { + return locale; + } + if ( + next && + next.length >= j && + commonPrefix(split, next) >= j - 1 + ) { + //the next array item is better than a shallower substring of this one + break; + } + j--; + } + i++; + } + return globalLocale; + } + + function loadLocale(name) { + var oldLocale = null, + aliasedRequire; + // TODO: Find a better way to register and load all the locales in Node + if ( + locales[name] === undefined && + typeof module !== 'undefined' && + module && + module.exports + ) { + try { + oldLocale = globalLocale._abbr; + aliasedRequire = require; + aliasedRequire('./locale/' + name); + getSetGlobalLocale(oldLocale); + } catch (e) { + // mark as not found to avoid repeating expensive file require call causing high CPU + // when trying to find en-US, en_US, en-us for every format call + locales[name] = null; // null means not found + } + } + return locales[name]; + } + + // This function will load locale and then set the global locale. If + // no arguments are passed in, it will simply return the current global + // locale key. + function getSetGlobalLocale(key, values) { + var data; + if (key) { + if (isUndefined(values)) { + data = getLocale(key); + } else { + data = defineLocale(key, values); + } + + if (data) { + // moment.duration._locale = moment._locale = data; + globalLocale = data; + } else { + if (typeof console !== 'undefined' && console.warn) { + //warn user if arguments are passed but the locale could not be set + console.warn( + 'Locale ' + key + ' not found. Did you forget to load it?' + ); + } + } + } + + return globalLocale._abbr; + } + + function defineLocale(name, config) { + if (config !== null) { + var locale, + parentConfig = baseConfig; + config.abbr = name; + if (locales[name] != null) { + deprecateSimple( + 'defineLocaleOverride', + 'use moment.updateLocale(localeName, config) to change ' + + 'an existing locale. moment.defineLocale(localeName, ' + + 'config) should only be used for creating a new locale ' + + 'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.' + ); + parentConfig = locales[name]._config; + } else if (config.parentLocale != null) { + if (locales[config.parentLocale] != null) { + parentConfig = locales[config.parentLocale]._config; + } else { + locale = loadLocale(config.parentLocale); + if (locale != null) { + parentConfig = locale._config; + } else { + if (!localeFamilies[config.parentLocale]) { + localeFamilies[config.parentLocale] = []; + } + localeFamilies[config.parentLocale].push({ + name: name, + config: config, + }); + return null; + } + } + } + locales[name] = new Locale(mergeConfigs(parentConfig, config)); + + if (localeFamilies[name]) { + localeFamilies[name].forEach(function (x) { + defineLocale(x.name, x.config); + }); + } + + // backwards compat for now: also set the locale + // make sure we set the locale AFTER all child locales have been + // created, so we won't end up with the child locale set. + getSetGlobalLocale(name); + + return locales[name]; + } else { + // useful for testing + delete locales[name]; + return null; + } + } + + function updateLocale(name, config) { + if (config != null) { + var locale, + tmpLocale, + parentConfig = baseConfig; + + if (locales[name] != null && locales[name].parentLocale != null) { + // Update existing child locale in-place to avoid memory-leaks + locales[name].set(mergeConfigs(locales[name]._config, config)); + } else { + // MERGE + tmpLocale = loadLocale(name); + if (tmpLocale != null) { + parentConfig = tmpLocale._config; + } + config = mergeConfigs(parentConfig, config); + if (tmpLocale == null) { + // updateLocale is called for creating a new locale + // Set abbr so it will have a name (getters return + // undefined otherwise). + config.abbr = name; + } + locale = new Locale(config); + locale.parentLocale = locales[name]; + locales[name] = locale; + } + + // backwards compat for now: also set the locale + getSetGlobalLocale(name); + } else { + // pass null for config to unupdate, useful for tests + if (locales[name] != null) { + if (locales[name].parentLocale != null) { + locales[name] = locales[name].parentLocale; + if (name === getSetGlobalLocale()) { + getSetGlobalLocale(name); + } + } else if (locales[name] != null) { + delete locales[name]; + } + } + } + return locales[name]; + } + + // returns locale data + function getLocale(key) { + var locale; + + if (key && key._locale && key._locale._abbr) { + key = key._locale._abbr; + } + + if (!key) { + return globalLocale; + } + + if (!isArray(key)) { + //short-circuit everything else + locale = loadLocale(key); + if (locale) { + return locale; + } + key = [key]; + } + + return chooseLocale(key); + } + + function listLocales() { + return keys(locales); + } + + function checkOverflow(m) { + var overflow, + a = m._a; + + if (a && getParsingFlags(m).overflow === -2) { + overflow = + a[MONTH] < 0 || a[MONTH] > 11 + ? MONTH + : a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH]) + ? DATE + : a[HOUR] < 0 || + a[HOUR] > 24 || + (a[HOUR] === 24 && + (a[MINUTE] !== 0 || + a[SECOND] !== 0 || + a[MILLISECOND] !== 0)) + ? HOUR + : a[MINUTE] < 0 || a[MINUTE] > 59 + ? MINUTE + : a[SECOND] < 0 || a[SECOND] > 59 + ? SECOND + : a[MILLISECOND] < 0 || a[MILLISECOND] > 999 + ? MILLISECOND + : -1; + + if ( + getParsingFlags(m)._overflowDayOfYear && + (overflow < YEAR || overflow > DATE) + ) { + overflow = DATE; + } + if (getParsingFlags(m)._overflowWeeks && overflow === -1) { + overflow = WEEK; + } + if (getParsingFlags(m)._overflowWeekday && overflow === -1) { + overflow = WEEKDAY; + } + + getParsingFlags(m).overflow = overflow; + } + + return m; + } + + // iso 8601 regex + // 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00) + var extendedIsoRegex = /^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/, + basicIsoRegex = /^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/, + tzRegex = /Z|[+-]\d\d(?::?\d\d)?/, + isoDates = [ + ['YYYYYY-MM-DD', /[+-]\d{6}-\d\d-\d\d/], + ['YYYY-MM-DD', /\d{4}-\d\d-\d\d/], + ['GGGG-[W]WW-E', /\d{4}-W\d\d-\d/], + ['GGGG-[W]WW', /\d{4}-W\d\d/, false], + ['YYYY-DDD', /\d{4}-\d{3}/], + ['YYYY-MM', /\d{4}-\d\d/, false], + ['YYYYYYMMDD', /[+-]\d{10}/], + ['YYYYMMDD', /\d{8}/], + ['GGGG[W]WWE', /\d{4}W\d{3}/], + ['GGGG[W]WW', /\d{4}W\d{2}/, false], + ['YYYYDDD', /\d{7}/], + ['YYYYMM', /\d{6}/, false], + ['YYYY', /\d{4}/, false], + ], + // iso time formats and regexes + isoTimes = [ + ['HH:mm:ss.SSSS', /\d\d:\d\d:\d\d\.\d+/], + ['HH:mm:ss,SSSS', /\d\d:\d\d:\d\d,\d+/], + ['HH:mm:ss', /\d\d:\d\d:\d\d/], + ['HH:mm', /\d\d:\d\d/], + ['HHmmss.SSSS', /\d\d\d\d\d\d\.\d+/], + ['HHmmss,SSSS', /\d\d\d\d\d\d,\d+/], + ['HHmmss', /\d\d\d\d\d\d/], + ['HHmm', /\d\d\d\d/], + ['HH', /\d\d/], + ], + aspNetJsonRegex = /^\/?Date\((-?\d+)/i, + // RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3 + rfc2822 = /^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/, + obsOffsets = { + UT: 0, + GMT: 0, + EDT: -4 * 60, + EST: -5 * 60, + CDT: -5 * 60, + CST: -6 * 60, + MDT: -6 * 60, + MST: -7 * 60, + PDT: -7 * 60, + PST: -8 * 60, + }; + + // date from iso format + function configFromISO(config) { + var i, + l, + string = config._i, + match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string), + allowTime, + dateFormat, + timeFormat, + tzFormat; + + if (match) { + getParsingFlags(config).iso = true; + + for (i = 0, l = isoDates.length; i < l; i++) { + if (isoDates[i][1].exec(match[1])) { + dateFormat = isoDates[i][0]; + allowTime = isoDates[i][2] !== false; + break; + } + } + if (dateFormat == null) { + config._isValid = false; + return; + } + if (match[3]) { + for (i = 0, l = isoTimes.length; i < l; i++) { + if (isoTimes[i][1].exec(match[3])) { + // match[2] should be 'T' or space + timeFormat = (match[2] || ' ') + isoTimes[i][0]; + break; + } + } + if (timeFormat == null) { + config._isValid = false; + return; + } + } + if (!allowTime && timeFormat != null) { + config._isValid = false; + return; + } + if (match[4]) { + if (tzRegex.exec(match[4])) { + tzFormat = 'Z'; + } else { + config._isValid = false; + return; + } + } + config._f = dateFormat + (timeFormat || '') + (tzFormat || ''); + configFromStringAndFormat(config); + } else { + config._isValid = false; + } + } + + function extractFromRFC2822Strings( + yearStr, + monthStr, + dayStr, + hourStr, + minuteStr, + secondStr + ) { + var result = [ + untruncateYear(yearStr), + defaultLocaleMonthsShort.indexOf(monthStr), + parseInt(dayStr, 10), + parseInt(hourStr, 10), + parseInt(minuteStr, 10), + ]; + + if (secondStr) { + result.push(parseInt(secondStr, 10)); + } + + return result; + } + + function untruncateYear(yearStr) { + var year = parseInt(yearStr, 10); + if (year <= 49) { + return 2000 + year; + } else if (year <= 999) { + return 1900 + year; + } + return year; + } + + function preprocessRFC2822(s) { + // Remove comments and folding whitespace and replace multiple-spaces with a single space + return s + .replace(/\([^)]*\)|[\n\t]/g, ' ') + .replace(/(\s\s+)/g, ' ') + .replace(/^\s\s*/, '') + .replace(/\s\s*$/, ''); + } + + function checkWeekday(weekdayStr, parsedInput, config) { + if (weekdayStr) { + // TODO: Replace the vanilla JS Date object with an independent day-of-week check. + var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr), + weekdayActual = new Date( + parsedInput[0], + parsedInput[1], + parsedInput[2] + ).getDay(); + if (weekdayProvided !== weekdayActual) { + getParsingFlags(config).weekdayMismatch = true; + config._isValid = false; + return false; + } + } + return true; + } + + function calculateOffset(obsOffset, militaryOffset, numOffset) { + if (obsOffset) { + return obsOffsets[obsOffset]; + } else if (militaryOffset) { + // the only allowed military tz is Z + return 0; + } else { + var hm = parseInt(numOffset, 10), + m = hm % 100, + h = (hm - m) / 100; + return h * 60 + m; + } + } + + // date and time from ref 2822 format + function configFromRFC2822(config) { + var match = rfc2822.exec(preprocessRFC2822(config._i)), + parsedArray; + if (match) { + parsedArray = extractFromRFC2822Strings( + match[4], + match[3], + match[2], + match[5], + match[6], + match[7] + ); + if (!checkWeekday(match[1], parsedArray, config)) { + return; + } + + config._a = parsedArray; + config._tzm = calculateOffset(match[8], match[9], match[10]); + + config._d = createUTCDate.apply(null, config._a); + config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm); + + getParsingFlags(config).rfc2822 = true; + } else { + config._isValid = false; + } + } + + // date from 1) ASP.NET, 2) ISO, 3) RFC 2822 formats, or 4) optional fallback if parsing isn't strict + function configFromString(config) { + var matched = aspNetJsonRegex.exec(config._i); + if (matched !== null) { + config._d = new Date(+matched[1]); + return; + } + + configFromISO(config); + if (config._isValid === false) { + delete config._isValid; + } else { + return; + } + + configFromRFC2822(config); + if (config._isValid === false) { + delete config._isValid; + } else { + return; + } + + if (config._strict) { + config._isValid = false; + } else { + // Final attempt, use Input Fallback + hooks.createFromInputFallback(config); + } + } + + hooks.createFromInputFallback = deprecate( + 'value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' + + 'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' + + 'discouraged and will be removed in an upcoming major release. Please refer to ' + + 'http://momentjs.com/guides/#/warnings/js-date/ for more info.', + function (config) { + config._d = new Date(config._i + (config._useUTC ? ' UTC' : '')); + } + ); + + // Pick the first defined of two or three arguments. + function defaults(a, b, c) { + if (a != null) { + return a; + } + if (b != null) { + return b; + } + return c; + } + + function currentDateArray(config) { + // hooks is actually the exported moment object + var nowValue = new Date(hooks.now()); + if (config._useUTC) { + return [ + nowValue.getUTCFullYear(), + nowValue.getUTCMonth(), + nowValue.getUTCDate(), + ]; + } + return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()]; + } + + // convert an array to a date. + // the array should mirror the parameters below + // note: all values past the year are optional and will default to the lowest possible value. + // [year, month, day , hour, minute, second, millisecond] + function configFromArray(config) { + var i, + date, + input = [], + currentDate, + expectedWeekday, + yearToUse; + + if (config._d) { + return; + } + + currentDate = currentDateArray(config); + + //compute day of the year from weeks and weekdays + if (config._w && config._a[DATE] == null && config._a[MONTH] == null) { + dayOfYearFromWeekInfo(config); + } + + //if the day of the year is set, figure out what it is + if (config._dayOfYear != null) { + yearToUse = defaults(config._a[YEAR], currentDate[YEAR]); + + if ( + config._dayOfYear > daysInYear(yearToUse) || + config._dayOfYear === 0 + ) { + getParsingFlags(config)._overflowDayOfYear = true; + } + + date = createUTCDate(yearToUse, 0, config._dayOfYear); + config._a[MONTH] = date.getUTCMonth(); + config._a[DATE] = date.getUTCDate(); + } + + // Default to current date. + // * if no year, month, day of month are given, default to today + // * if day of month is given, default month and year + // * if month is given, default only year + // * if year is given, don't default anything + for (i = 0; i < 3 && config._a[i] == null; ++i) { + config._a[i] = input[i] = currentDate[i]; + } + + // Zero out whatever was not defaulted, including time + for (; i < 7; i++) { + config._a[i] = input[i] = + config._a[i] == null ? (i === 2 ? 1 : 0) : config._a[i]; + } + + // Check for 24:00:00.000 + if ( + config._a[HOUR] === 24 && + config._a[MINUTE] === 0 && + config._a[SECOND] === 0 && + config._a[MILLISECOND] === 0 + ) { + config._nextDay = true; + config._a[HOUR] = 0; + } + + config._d = (config._useUTC ? createUTCDate : createDate).apply( + null, + input + ); + expectedWeekday = config._useUTC + ? config._d.getUTCDay() + : config._d.getDay(); + + // Apply timezone offset from input. The actual utcOffset can be changed + // with parseZone. + if (config._tzm != null) { + config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm); + } + + if (config._nextDay) { + config._a[HOUR] = 24; + } + + // check for mismatching day of week + if ( + config._w && + typeof config._w.d !== 'undefined' && + config._w.d !== expectedWeekday + ) { + getParsingFlags(config).weekdayMismatch = true; + } + } + + function dayOfYearFromWeekInfo(config) { + var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow, curWeek; + + w = config._w; + if (w.GG != null || w.W != null || w.E != null) { + dow = 1; + doy = 4; + + // TODO: We need to take the current isoWeekYear, but that depends on + // how we interpret now (local, utc, fixed offset). So create + // a now version of current config (take local/utc/offset flags, and + // create now). + weekYear = defaults( + w.GG, + config._a[YEAR], + weekOfYear(createLocal(), 1, 4).year + ); + week = defaults(w.W, 1); + weekday = defaults(w.E, 1); + if (weekday < 1 || weekday > 7) { + weekdayOverflow = true; + } + } else { + dow = config._locale._week.dow; + doy = config._locale._week.doy; + + curWeek = weekOfYear(createLocal(), dow, doy); + + weekYear = defaults(w.gg, config._a[YEAR], curWeek.year); + + // Default to current week. + week = defaults(w.w, curWeek.week); + + if (w.d != null) { + // weekday -- low day numbers are considered next week + weekday = w.d; + if (weekday < 0 || weekday > 6) { + weekdayOverflow = true; + } + } else if (w.e != null) { + // local weekday -- counting starts from beginning of week + weekday = w.e + dow; + if (w.e < 0 || w.e > 6) { + weekdayOverflow = true; + } + } else { + // default to beginning of week + weekday = dow; + } + } + if (week < 1 || week > weeksInYear(weekYear, dow, doy)) { + getParsingFlags(config)._overflowWeeks = true; + } else if (weekdayOverflow != null) { + getParsingFlags(config)._overflowWeekday = true; + } else { + temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy); + config._a[YEAR] = temp.year; + config._dayOfYear = temp.dayOfYear; + } + } + + // constant that refers to the ISO standard + hooks.ISO_8601 = function () {}; + + // constant that refers to the RFC 2822 form + hooks.RFC_2822 = function () {}; + + // date from string and format string + function configFromStringAndFormat(config) { + // TODO: Move this to another part of the creation flow to prevent circular deps + if (config._f === hooks.ISO_8601) { + configFromISO(config); + return; + } + if (config._f === hooks.RFC_2822) { + configFromRFC2822(config); + return; + } + config._a = []; + getParsingFlags(config).empty = true; + + // This array is used to make a Date, either with `new Date` or `Date.UTC` + var string = '' + config._i, + i, + parsedInput, + tokens, + token, + skipped, + stringLength = string.length, + totalParsedInputLength = 0, + era; + + tokens = + expandFormat(config._f, config._locale).match(formattingTokens) || []; + + for (i = 0; i < tokens.length; i++) { + token = tokens[i]; + parsedInput = (string.match(getParseRegexForToken(token, config)) || + [])[0]; + if (parsedInput) { + skipped = string.substr(0, string.indexOf(parsedInput)); + if (skipped.length > 0) { + getParsingFlags(config).unusedInput.push(skipped); + } + string = string.slice( + string.indexOf(parsedInput) + parsedInput.length + ); + totalParsedInputLength += parsedInput.length; + } + // don't parse if it's not a known token + if (formatTokenFunctions[token]) { + if (parsedInput) { + getParsingFlags(config).empty = false; + } else { + getParsingFlags(config).unusedTokens.push(token); + } + addTimeToArrayFromToken(token, parsedInput, config); + } else if (config._strict && !parsedInput) { + getParsingFlags(config).unusedTokens.push(token); + } + } + + // add remaining unparsed input length to the string + getParsingFlags(config).charsLeftOver = + stringLength - totalParsedInputLength; + if (string.length > 0) { + getParsingFlags(config).unusedInput.push(string); + } + + // clear _12h flag if hour is <= 12 + if ( + config._a[HOUR] <= 12 && + getParsingFlags(config).bigHour === true && + config._a[HOUR] > 0 + ) { + getParsingFlags(config).bigHour = undefined; + } + + getParsingFlags(config).parsedDateParts = config._a.slice(0); + getParsingFlags(config).meridiem = config._meridiem; + // handle meridiem + config._a[HOUR] = meridiemFixWrap( + config._locale, + config._a[HOUR], + config._meridiem + ); + + // handle era + era = getParsingFlags(config).era; + if (era !== null) { + config._a[YEAR] = config._locale.erasConvertYear(era, config._a[YEAR]); + } + + configFromArray(config); + checkOverflow(config); + } + + function meridiemFixWrap(locale, hour, meridiem) { + var isPm; + + if (meridiem == null) { + // nothing to do + return hour; + } + if (locale.meridiemHour != null) { + return locale.meridiemHour(hour, meridiem); + } else if (locale.isPM != null) { + // Fallback + isPm = locale.isPM(meridiem); + if (isPm && hour < 12) { + hour += 12; + } + if (!isPm && hour === 12) { + hour = 0; + } + return hour; + } else { + // this is not supposed to happen + return hour; + } + } + + // date from string and array of format strings + function configFromStringAndArray(config) { + var tempConfig, + bestMoment, + scoreToBeat, + i, + currentScore, + validFormatFound, + bestFormatIsValid = false; + + if (config._f.length === 0) { + getParsingFlags(config).invalidFormat = true; + config._d = new Date(NaN); + return; + } + + for (i = 0; i < config._f.length; i++) { + currentScore = 0; + validFormatFound = false; + tempConfig = copyConfig({}, config); + if (config._useUTC != null) { + tempConfig._useUTC = config._useUTC; + } + tempConfig._f = config._f[i]; + configFromStringAndFormat(tempConfig); + + if (isValid(tempConfig)) { + validFormatFound = true; + } + + // if there is any input that was not parsed add a penalty for that format + currentScore += getParsingFlags(tempConfig).charsLeftOver; + + //or tokens + currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10; + + getParsingFlags(tempConfig).score = currentScore; + + if (!bestFormatIsValid) { + if ( + scoreToBeat == null || + currentScore < scoreToBeat || + validFormatFound + ) { + scoreToBeat = currentScore; + bestMoment = tempConfig; + if (validFormatFound) { + bestFormatIsValid = true; + } + } + } else { + if (currentScore < scoreToBeat) { + scoreToBeat = currentScore; + bestMoment = tempConfig; + } + } + } + + extend(config, bestMoment || tempConfig); + } + + function configFromObject(config) { + if (config._d) { + return; + } + + var i = normalizeObjectUnits(config._i), + dayOrDate = i.day === undefined ? i.date : i.day; + config._a = map( + [i.year, i.month, dayOrDate, i.hour, i.minute, i.second, i.millisecond], + function (obj) { + return obj && parseInt(obj, 10); + } + ); + + configFromArray(config); + } + + function createFromConfig(config) { + var res = new Moment(checkOverflow(prepareConfig(config))); + if (res._nextDay) { + // Adding is smart enough around DST + res.add(1, 'd'); + res._nextDay = undefined; + } + + return res; + } + + function prepareConfig(config) { + var input = config._i, + format = config._f; + + config._locale = config._locale || getLocale(config._l); + + if (input === null || (format === undefined && input === '')) { + return createInvalid({ nullInput: true }); + } + + if (typeof input === 'string') { + config._i = input = config._locale.preparse(input); + } + + if (isMoment(input)) { + return new Moment(checkOverflow(input)); + } else if (isDate(input)) { + config._d = input; + } else if (isArray(format)) { + configFromStringAndArray(config); + } else if (format) { + configFromStringAndFormat(config); + } else { + configFromInput(config); + } + + if (!isValid(config)) { + config._d = null; + } + + return config; + } + + function configFromInput(config) { + var input = config._i; + if (isUndefined(input)) { + config._d = new Date(hooks.now()); + } else if (isDate(input)) { + config._d = new Date(input.valueOf()); + } else if (typeof input === 'string') { + configFromString(config); + } else if (isArray(input)) { + config._a = map(input.slice(0), function (obj) { + return parseInt(obj, 10); + }); + configFromArray(config); + } else if (isObject(input)) { + configFromObject(config); + } else if (isNumber(input)) { + // from milliseconds + config._d = new Date(input); + } else { + hooks.createFromInputFallback(config); + } + } + + function createLocalOrUTC(input, format, locale, strict, isUTC) { + var c = {}; + + if (format === true || format === false) { + strict = format; + format = undefined; + } + + if (locale === true || locale === false) { + strict = locale; + locale = undefined; + } + + if ( + (isObject(input) && isObjectEmpty(input)) || + (isArray(input) && input.length === 0) + ) { + input = undefined; + } + // object construction must be done this way. + // https://github.com/moment/moment/issues/1423 + c._isAMomentObject = true; + c._useUTC = c._isUTC = isUTC; + c._l = locale; + c._i = input; + c._f = format; + c._strict = strict; + + return createFromConfig(c); + } + + function createLocal(input, format, locale, strict) { + return createLocalOrUTC(input, format, locale, strict, false); + } + + var prototypeMin = deprecate( + 'moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/', + function () { + var other = createLocal.apply(null, arguments); + if (this.isValid() && other.isValid()) { + return other < this ? this : other; + } else { + return createInvalid(); + } + } + ), + prototypeMax = deprecate( + 'moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/', + function () { + var other = createLocal.apply(null, arguments); + if (this.isValid() && other.isValid()) { + return other > this ? this : other; + } else { + return createInvalid(); + } + } + ); + + // Pick a moment m from moments so that m[fn](other) is true for all + // other. This relies on the function fn to be transitive. + // + // moments should either be an array of moment objects or an array, whose + // first element is an array of moment objects. + function pickBy(fn, moments) { + var res, i; + if (moments.length === 1 && isArray(moments[0])) { + moments = moments[0]; + } + if (!moments.length) { + return createLocal(); + } + res = moments[0]; + for (i = 1; i < moments.length; ++i) { + if (!moments[i].isValid() || moments[i][fn](res)) { + res = moments[i]; + } + } + return res; + } + + // TODO: Use [].sort instead? + function min() { + var args = [].slice.call(arguments, 0); + + return pickBy('isBefore', args); + } + + function max() { + var args = [].slice.call(arguments, 0); + + return pickBy('isAfter', args); + } + + var now = function () { + return Date.now ? Date.now() : +new Date(); + }; + + var ordering = [ + 'year', + 'quarter', + 'month', + 'week', + 'day', + 'hour', + 'minute', + 'second', + 'millisecond', + ]; + + function isDurationValid(m) { + var key, + unitHasDecimal = false, + i; + for (key in m) { + if ( + hasOwnProp(m, key) && + !( + indexOf.call(ordering, key) !== -1 && + (m[key] == null || !isNaN(m[key])) + ) + ) { + return false; + } + } + + for (i = 0; i < ordering.length; ++i) { + if (m[ordering[i]]) { + if (unitHasDecimal) { + return false; // only allow non-integers for smallest unit + } + if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) { + unitHasDecimal = true; + } + } + } + + return true; + } + + function isValid$1() { + return this._isValid; + } + + function createInvalid$1() { + return createDuration(NaN); + } + + function Duration(duration) { + var normalizedInput = normalizeObjectUnits(duration), + years = normalizedInput.year || 0, + quarters = normalizedInput.quarter || 0, + months = normalizedInput.month || 0, + weeks = normalizedInput.week || normalizedInput.isoWeek || 0, + days = normalizedInput.day || 0, + hours = normalizedInput.hour || 0, + minutes = normalizedInput.minute || 0, + seconds = normalizedInput.second || 0, + milliseconds = normalizedInput.millisecond || 0; + + this._isValid = isDurationValid(normalizedInput); + + // representation for dateAddRemove + this._milliseconds = + +milliseconds + + seconds * 1e3 + // 1000 + minutes * 6e4 + // 1000 * 60 + hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978 + // Because of dateAddRemove treats 24 hours as different from a + // day when working around DST, we need to store them separately + this._days = +days + weeks * 7; + // It is impossible to translate months into days without knowing + // which months you are are talking about, so we have to store + // it separately. + this._months = +months + quarters * 3 + years * 12; + + this._data = {}; + + this._locale = getLocale(); + + this._bubble(); + } + + function isDuration(obj) { + return obj instanceof Duration; + } + + function absRound(number) { + if (number < 0) { + return Math.round(-1 * number) * -1; + } else { + return Math.round(number); + } + } + + // compare two arrays, return the number of differences + function compareArrays(array1, array2, dontConvert) { + var len = Math.min(array1.length, array2.length), + lengthDiff = Math.abs(array1.length - array2.length), + diffs = 0, + i; + for (i = 0; i < len; i++) { + if ( + (dontConvert && array1[i] !== array2[i]) || + (!dontConvert && toInt(array1[i]) !== toInt(array2[i])) + ) { + diffs++; + } + } + return diffs + lengthDiff; + } + + // FORMATTING + + function offset(token, separator) { + addFormatToken(token, 0, 0, function () { + var offset = this.utcOffset(), + sign = '+'; + if (offset < 0) { + offset = -offset; + sign = '-'; + } + return ( + sign + + zeroFill(~~(offset / 60), 2) + + separator + + zeroFill(~~offset % 60, 2) + ); + }); + } + + offset('Z', ':'); + offset('ZZ', ''); + + // PARSING + + addRegexToken('Z', matchShortOffset); + addRegexToken('ZZ', matchShortOffset); + addParseToken(['Z', 'ZZ'], function (input, array, config) { + config._useUTC = true; + config._tzm = offsetFromString(matchShortOffset, input); + }); + + // HELPERS + + // timezone chunker + // '+10:00' > ['10', '00'] + // '-1530' > ['-15', '30'] + var chunkOffset = /([\+\-]|\d\d)/gi; + + function offsetFromString(matcher, string) { + var matches = (string || '').match(matcher), + chunk, + parts, + minutes; + + if (matches === null) { + return null; + } + + chunk = matches[matches.length - 1] || []; + parts = (chunk + '').match(chunkOffset) || ['-', 0, 0]; + minutes = +(parts[1] * 60) + toInt(parts[2]); + + return minutes === 0 ? 0 : parts[0] === '+' ? minutes : -minutes; + } + + // Return a moment from input, that is local/utc/zone equivalent to model. + function cloneWithOffset(input, model) { + var res, diff; + if (model._isUTC) { + res = model.clone(); + diff = + (isMoment(input) || isDate(input) + ? input.valueOf() + : createLocal(input).valueOf()) - res.valueOf(); + // Use low-level api, because this fn is low-level api. + res._d.setTime(res._d.valueOf() + diff); + hooks.updateOffset(res, false); + return res; + } else { + return createLocal(input).local(); + } + } + + function getDateOffset(m) { + // On Firefox.24 Date#getTimezoneOffset returns a floating point. + // https://github.com/moment/moment/pull/1871 + return -Math.round(m._d.getTimezoneOffset()); + } + + // HOOKS + + // This function will be called whenever a moment is mutated. + // It is intended to keep the offset in sync with the timezone. + hooks.updateOffset = function () {}; + + // MOMENTS + + // keepLocalTime = true means only change the timezone, without + // affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]--> + // 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset + // +0200, so we adjust the time as needed, to be valid. + // + // Keeping the time actually adds/subtracts (one hour) + // from the actual represented time. That is why we call updateOffset + // a second time. In case it wants us to change the offset again + // _changeInProgress == true case, then we have to adjust, because + // there is no such time in the given timezone. + function getSetOffset(input, keepLocalTime, keepMinutes) { + var offset = this._offset || 0, + localAdjust; + if (!this.isValid()) { + return input != null ? this : NaN; + } + if (input != null) { + if (typeof input === 'string') { + input = offsetFromString(matchShortOffset, input); + if (input === null) { + return this; + } + } else if (Math.abs(input) < 16 && !keepMinutes) { + input = input * 60; + } + if (!this._isUTC && keepLocalTime) { + localAdjust = getDateOffset(this); + } + this._offset = input; + this._isUTC = true; + if (localAdjust != null) { + this.add(localAdjust, 'm'); + } + if (offset !== input) { + if (!keepLocalTime || this._changeInProgress) { + addSubtract( + this, + createDuration(input - offset, 'm'), + 1, + false + ); + } else if (!this._changeInProgress) { + this._changeInProgress = true; + hooks.updateOffset(this, true); + this._changeInProgress = null; + } + } + return this; + } else { + return this._isUTC ? offset : getDateOffset(this); + } + } + + function getSetZone(input, keepLocalTime) { + if (input != null) { + if (typeof input !== 'string') { + input = -input; + } + + this.utcOffset(input, keepLocalTime); + + return this; + } else { + return -this.utcOffset(); + } + } + + function setOffsetToUTC(keepLocalTime) { + return this.utcOffset(0, keepLocalTime); + } + + function setOffsetToLocal(keepLocalTime) { + if (this._isUTC) { + this.utcOffset(0, keepLocalTime); + this._isUTC = false; + + if (keepLocalTime) { + this.subtract(getDateOffset(this), 'm'); + } + } + return this; + } + + function setOffsetToParsedOffset() { + if (this._tzm != null) { + this.utcOffset(this._tzm, false, true); + } else if (typeof this._i === 'string') { + var tZone = offsetFromString(matchOffset, this._i); + if (tZone != null) { + this.utcOffset(tZone); + } else { + this.utcOffset(0, true); + } + } + return this; + } + + function hasAlignedHourOffset(input) { + if (!this.isValid()) { + return false; + } + input = input ? createLocal(input).utcOffset() : 0; + + return (this.utcOffset() - input) % 60 === 0; + } + + function isDaylightSavingTime() { + return ( + this.utcOffset() > this.clone().month(0).utcOffset() || + this.utcOffset() > this.clone().month(5).utcOffset() + ); + } + + function isDaylightSavingTimeShifted() { + if (!isUndefined(this._isDSTShifted)) { + return this._isDSTShifted; + } + + var c = {}, + other; + + copyConfig(c, this); + c = prepareConfig(c); + + if (c._a) { + other = c._isUTC ? createUTC(c._a) : createLocal(c._a); + this._isDSTShifted = + this.isValid() && compareArrays(c._a, other.toArray()) > 0; + } else { + this._isDSTShifted = false; + } + + return this._isDSTShifted; + } + + function isLocal() { + return this.isValid() ? !this._isUTC : false; + } + + function isUtcOffset() { + return this.isValid() ? this._isUTC : false; + } + + function isUtc() { + return this.isValid() ? this._isUTC && this._offset === 0 : false; + } + + // ASP.NET json date format regex + var aspNetRegex = /^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/, + // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html + // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere + // and further modified to allow for strings containing both week and day + isoRegex = /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/; + + function createDuration(input, key) { + var duration = input, + // matching against regexp is expensive, do it on demand + match = null, + sign, + ret, + diffRes; + + if (isDuration(input)) { + duration = { + ms: input._milliseconds, + d: input._days, + M: input._months, + }; + } else if (isNumber(input) || !isNaN(+input)) { + duration = {}; + if (key) { + duration[key] = +input; + } else { + duration.milliseconds = +input; + } + } else if ((match = aspNetRegex.exec(input))) { + sign = match[1] === '-' ? -1 : 1; + duration = { + y: 0, + d: toInt(match[DATE]) * sign, + h: toInt(match[HOUR]) * sign, + m: toInt(match[MINUTE]) * sign, + s: toInt(match[SECOND]) * sign, + ms: toInt(absRound(match[MILLISECOND] * 1000)) * sign, // the millisecond decimal point is included in the match + }; + } else if ((match = isoRegex.exec(input))) { + sign = match[1] === '-' ? -1 : 1; + duration = { + y: parseIso(match[2], sign), + M: parseIso(match[3], sign), + w: parseIso(match[4], sign), + d: parseIso(match[5], sign), + h: parseIso(match[6], sign), + m: parseIso(match[7], sign), + s: parseIso(match[8], sign), + }; + } else if (duration == null) { + // checks for null or undefined + duration = {}; + } else if ( + typeof duration === 'object' && + ('from' in duration || 'to' in duration) + ) { + diffRes = momentsDifference( + createLocal(duration.from), + createLocal(duration.to) + ); + + duration = {}; + duration.ms = diffRes.milliseconds; + duration.M = diffRes.months; + } + + ret = new Duration(duration); + + if (isDuration(input) && hasOwnProp(input, '_locale')) { + ret._locale = input._locale; + } + + if (isDuration(input) && hasOwnProp(input, '_isValid')) { + ret._isValid = input._isValid; + } + + return ret; + } + + createDuration.fn = Duration.prototype; + createDuration.invalid = createInvalid$1; + + function parseIso(inp, sign) { + // We'd normally use ~~inp for this, but unfortunately it also + // converts floats to ints. + // inp may be undefined, so careful calling replace on it. + var res = inp && parseFloat(inp.replace(',', '.')); + // apply sign while we're at it + return (isNaN(res) ? 0 : res) * sign; + } + + function positiveMomentsDifference(base, other) { + var res = {}; + + res.months = + other.month() - base.month() + (other.year() - base.year()) * 12; + if (base.clone().add(res.months, 'M').isAfter(other)) { + --res.months; + } + + res.milliseconds = +other - +base.clone().add(res.months, 'M'); + + return res; + } + + function momentsDifference(base, other) { + var res; + if (!(base.isValid() && other.isValid())) { + return { milliseconds: 0, months: 0 }; + } + + other = cloneWithOffset(other, base); + if (base.isBefore(other)) { + res = positiveMomentsDifference(base, other); + } else { + res = positiveMomentsDifference(other, base); + res.milliseconds = -res.milliseconds; + res.months = -res.months; + } + + return res; + } + + // TODO: remove 'name' arg after deprecation is removed + function createAdder(direction, name) { + return function (val, period) { + var dur, tmp; + //invert the arguments, but complain about it + if (period !== null && !isNaN(+period)) { + deprecateSimple( + name, + 'moment().' + + name + + '(period, number) is deprecated. Please use moment().' + + name + + '(number, period). ' + + 'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.' + ); + tmp = val; + val = period; + period = tmp; + } + + dur = createDuration(val, period); + addSubtract(this, dur, direction); + return this; + }; + } + + function addSubtract(mom, duration, isAdding, updateOffset) { + var milliseconds = duration._milliseconds, + days = absRound(duration._days), + months = absRound(duration._months); + + if (!mom.isValid()) { + // No op + return; + } + + updateOffset = updateOffset == null ? true : updateOffset; + + if (months) { + setMonth(mom, get(mom, 'Month') + months * isAdding); + } + if (days) { + set$1(mom, 'Date', get(mom, 'Date') + days * isAdding); + } + if (milliseconds) { + mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding); + } + if (updateOffset) { + hooks.updateOffset(mom, days || months); + } + } + + var add = createAdder(1, 'add'), + subtract = createAdder(-1, 'subtract'); + + function isString(input) { + return typeof input === 'string' || input instanceof String; + } + + // type MomentInput = Moment | Date | string | number | (number | string)[] | MomentInputObject | void; // null | undefined + function isMomentInput(input) { + return ( + isMoment(input) || + isDate(input) || + isString(input) || + isNumber(input) || + isNumberOrStringArray(input) || + isMomentInputObject(input) || + input === null || + input === undefined + ); + } + + function isMomentInputObject(input) { + var objectTest = isObject(input) && !isObjectEmpty(input), + propertyTest = false, + properties = [ + 'years', + 'year', + 'y', + 'months', + 'month', + 'M', + 'days', + 'day', + 'd', + 'dates', + 'date', + 'D', + 'hours', + 'hour', + 'h', + 'minutes', + 'minute', + 'm', + 'seconds', + 'second', + 's', + 'milliseconds', + 'millisecond', + 'ms', + ], + i, + property; + + for (i = 0; i < properties.length; i += 1) { + property = properties[i]; + propertyTest = propertyTest || hasOwnProp(input, property); + } + + return objectTest && propertyTest; + } + + function isNumberOrStringArray(input) { + var arrayTest = isArray(input), + dataTypeTest = false; + if (arrayTest) { + dataTypeTest = + input.filter(function (item) { + return !isNumber(item) && isString(input); + }).length === 0; + } + return arrayTest && dataTypeTest; + } + + function isCalendarSpec(input) { + var objectTest = isObject(input) && !isObjectEmpty(input), + propertyTest = false, + properties = [ + 'sameDay', + 'nextDay', + 'lastDay', + 'nextWeek', + 'lastWeek', + 'sameElse', + ], + i, + property; + + for (i = 0; i < properties.length; i += 1) { + property = properties[i]; + propertyTest = propertyTest || hasOwnProp(input, property); + } + + return objectTest && propertyTest; + } + + function getCalendarFormat(myMoment, now) { + var diff = myMoment.diff(now, 'days', true); + return diff < -6 + ? 'sameElse' + : diff < -1 + ? 'lastWeek' + : diff < 0 + ? 'lastDay' + : diff < 1 + ? 'sameDay' + : diff < 2 + ? 'nextDay' + : diff < 7 + ? 'nextWeek' + : 'sameElse'; + } + + function calendar$1(time, formats) { + // Support for single parameter, formats only overload to the calendar function + if (arguments.length === 1) { + if (isMomentInput(arguments[0])) { + time = arguments[0]; + formats = undefined; + } else if (isCalendarSpec(arguments[0])) { + formats = arguments[0]; + time = undefined; + } + } + // We want to compare the start of today, vs this. + // Getting start-of-today depends on whether we're local/utc/offset or not. + var now = time || createLocal(), + sod = cloneWithOffset(now, this).startOf('day'), + format = hooks.calendarFormat(this, sod) || 'sameElse', + output = + formats && + (isFunction(formats[format]) + ? formats[format].call(this, now) + : formats[format]); + + return this.format( + output || this.localeData().calendar(format, this, createLocal(now)) + ); + } + + function clone() { + return new Moment(this); + } + + function isAfter(input, units) { + var localInput = isMoment(input) ? input : createLocal(input); + if (!(this.isValid() && localInput.isValid())) { + return false; + } + units = normalizeUnits(units) || 'millisecond'; + if (units === 'millisecond') { + return this.valueOf() > localInput.valueOf(); + } else { + return localInput.valueOf() < this.clone().startOf(units).valueOf(); + } + } + + function isBefore(input, units) { + var localInput = isMoment(input) ? input : createLocal(input); + if (!(this.isValid() && localInput.isValid())) { + return false; + } + units = normalizeUnits(units) || 'millisecond'; + if (units === 'millisecond') { + return this.valueOf() < localInput.valueOf(); + } else { + return this.clone().endOf(units).valueOf() < localInput.valueOf(); + } + } + + function isBetween(from, to, units, inclusivity) { + var localFrom = isMoment(from) ? from : createLocal(from), + localTo = isMoment(to) ? to : createLocal(to); + if (!(this.isValid() && localFrom.isValid() && localTo.isValid())) { + return false; + } + inclusivity = inclusivity || '()'; + return ( + (inclusivity[0] === '(' + ? this.isAfter(localFrom, units) + : !this.isBefore(localFrom, units)) && + (inclusivity[1] === ')' + ? this.isBefore(localTo, units) + : !this.isAfter(localTo, units)) + ); + } + + function isSame(input, units) { + var localInput = isMoment(input) ? input : createLocal(input), + inputMs; + if (!(this.isValid() && localInput.isValid())) { + return false; + } + units = normalizeUnits(units) || 'millisecond'; + if (units === 'millisecond') { + return this.valueOf() === localInput.valueOf(); + } else { + inputMs = localInput.valueOf(); + return ( + this.clone().startOf(units).valueOf() <= inputMs && + inputMs <= this.clone().endOf(units).valueOf() + ); + } + } + + function isSameOrAfter(input, units) { + return this.isSame(input, units) || this.isAfter(input, units); + } + + function isSameOrBefore(input, units) { + return this.isSame(input, units) || this.isBefore(input, units); + } + + function diff(input, units, asFloat) { + var that, zoneDelta, output; + + if (!this.isValid()) { + return NaN; + } + + that = cloneWithOffset(input, this); + + if (!that.isValid()) { + return NaN; + } + + zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4; + + units = normalizeUnits(units); + + switch (units) { + case 'year': + output = monthDiff(this, that) / 12; + break; + case 'month': + output = monthDiff(this, that); + break; + case 'quarter': + output = monthDiff(this, that) / 3; + break; + case 'second': + output = (this - that) / 1e3; + break; // 1000 + case 'minute': + output = (this - that) / 6e4; + break; // 1000 * 60 + case 'hour': + output = (this - that) / 36e5; + break; // 1000 * 60 * 60 + case 'day': + output = (this - that - zoneDelta) / 864e5; + break; // 1000 * 60 * 60 * 24, negate dst + case 'week': + output = (this - that - zoneDelta) / 6048e5; + break; // 1000 * 60 * 60 * 24 * 7, negate dst + default: + output = this - that; + } + + return asFloat ? output : absFloor(output); + } + + function monthDiff(a, b) { + if (a.date() < b.date()) { + // end-of-month calculations work correct when the start month has more + // days than the end month. + return -monthDiff(b, a); + } + // difference in months + var wholeMonthDiff = (b.year() - a.year()) * 12 + (b.month() - a.month()), + // b is in (anchor - 1 month, anchor + 1 month) + anchor = a.clone().add(wholeMonthDiff, 'months'), + anchor2, + adjust; + + if (b - anchor < 0) { + anchor2 = a.clone().add(wholeMonthDiff - 1, 'months'); + // linear across the month + adjust = (b - anchor) / (anchor - anchor2); + } else { + anchor2 = a.clone().add(wholeMonthDiff + 1, 'months'); + // linear across the month + adjust = (b - anchor) / (anchor2 - anchor); + } + + //check for negative zero, return zero if negative zero + return -(wholeMonthDiff + adjust) || 0; + } + + hooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ'; + hooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]'; + + function toString() { + return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ'); + } + + function toISOString(keepOffset) { + if (!this.isValid()) { + return null; + } + var utc = keepOffset !== true, + m = utc ? this.clone().utc() : this; + if (m.year() < 0 || m.year() > 9999) { + return formatMoment( + m, + utc + ? 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]' + : 'YYYYYY-MM-DD[T]HH:mm:ss.SSSZ' + ); + } + if (isFunction(Date.prototype.toISOString)) { + // native implementation is ~50x faster, use it when we can + if (utc) { + return this.toDate().toISOString(); + } else { + return new Date(this.valueOf() + this.utcOffset() * 60 * 1000) + .toISOString() + .replace('Z', formatMoment(m, 'Z')); + } + } + return formatMoment( + m, + utc ? 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYY-MM-DD[T]HH:mm:ss.SSSZ' + ); + } + + /** + * Return a human readable representation of a moment that can + * also be evaluated to get a new moment which is the same + * + * @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects + */ + function inspect() { + if (!this.isValid()) { + return 'moment.invalid(/* ' + this._i + ' */)'; + } + var func = 'moment', + zone = '', + prefix, + year, + datetime, + suffix; + if (!this.isLocal()) { + func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone'; + zone = 'Z'; + } + prefix = '[' + func + '("]'; + year = 0 <= this.year() && this.year() <= 9999 ? 'YYYY' : 'YYYYYY'; + datetime = '-MM-DD[T]HH:mm:ss.SSS'; + suffix = zone + '[")]'; + + return this.format(prefix + year + datetime + suffix); + } + + function format(inputString) { + if (!inputString) { + inputString = this.isUtc() + ? hooks.defaultFormatUtc + : hooks.defaultFormat; + } + var output = formatMoment(this, inputString); + return this.localeData().postformat(output); + } + + function from(time, withoutSuffix) { + if ( + this.isValid() && + ((isMoment(time) && time.isValid()) || createLocal(time).isValid()) + ) { + return createDuration({ to: this, from: time }) + .locale(this.locale()) + .humanize(!withoutSuffix); + } else { + return this.localeData().invalidDate(); + } + } + + function fromNow(withoutSuffix) { + return this.from(createLocal(), withoutSuffix); + } + + function to(time, withoutSuffix) { + if ( + this.isValid() && + ((isMoment(time) && time.isValid()) || createLocal(time).isValid()) + ) { + return createDuration({ from: this, to: time }) + .locale(this.locale()) + .humanize(!withoutSuffix); + } else { + return this.localeData().invalidDate(); + } + } + + function toNow(withoutSuffix) { + return this.to(createLocal(), withoutSuffix); + } + + // If passed a locale key, it will set the locale for this + // instance. Otherwise, it will return the locale configuration + // variables for this instance. + function locale(key) { + var newLocaleData; + + if (key === undefined) { + return this._locale._abbr; + } else { + newLocaleData = getLocale(key); + if (newLocaleData != null) { + this._locale = newLocaleData; + } + return this; + } + } + + var lang = deprecate( + 'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.', + function (key) { + if (key === undefined) { + return this.localeData(); + } else { + return this.locale(key); + } + } + ); + + function localeData() { + return this._locale; + } + + var MS_PER_SECOND = 1000, + MS_PER_MINUTE = 60 * MS_PER_SECOND, + MS_PER_HOUR = 60 * MS_PER_MINUTE, + MS_PER_400_YEARS = (365 * 400 + 97) * 24 * MS_PER_HOUR; + + // actual modulo - handles negative numbers (for dates before 1970): + function mod$1(dividend, divisor) { + return ((dividend % divisor) + divisor) % divisor; + } + + function localStartOfDate(y, m, d) { + // the date constructor remaps years 0-99 to 1900-1999 + if (y < 100 && y >= 0) { + // preserve leap years using a full 400 year cycle, then reset + return new Date(y + 400, m, d) - MS_PER_400_YEARS; + } else { + return new Date(y, m, d).valueOf(); + } + } + + function utcStartOfDate(y, m, d) { + // Date.UTC remaps years 0-99 to 1900-1999 + if (y < 100 && y >= 0) { + // preserve leap years using a full 400 year cycle, then reset + return Date.UTC(y + 400, m, d) - MS_PER_400_YEARS; + } else { + return Date.UTC(y, m, d); + } + } + + function startOf(units) { + var time, startOfDate; + units = normalizeUnits(units); + if (units === undefined || units === 'millisecond' || !this.isValid()) { + return this; + } + + startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate; + + switch (units) { + case 'year': + time = startOfDate(this.year(), 0, 1); + break; + case 'quarter': + time = startOfDate( + this.year(), + this.month() - (this.month() % 3), + 1 + ); + break; + case 'month': + time = startOfDate(this.year(), this.month(), 1); + break; + case 'week': + time = startOfDate( + this.year(), + this.month(), + this.date() - this.weekday() + ); + break; + case 'isoWeek': + time = startOfDate( + this.year(), + this.month(), + this.date() - (this.isoWeekday() - 1) + ); + break; + case 'day': + case 'date': + time = startOfDate(this.year(), this.month(), this.date()); + break; + case 'hour': + time = this._d.valueOf(); + time -= mod$1( + time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE), + MS_PER_HOUR + ); + break; + case 'minute': + time = this._d.valueOf(); + time -= mod$1(time, MS_PER_MINUTE); + break; + case 'second': + time = this._d.valueOf(); + time -= mod$1(time, MS_PER_SECOND); + break; + } + + this._d.setTime(time); + hooks.updateOffset(this, true); + return this; + } + + function endOf(units) { + var time, startOfDate; + units = normalizeUnits(units); + if (units === undefined || units === 'millisecond' || !this.isValid()) { + return this; + } + + startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate; + + switch (units) { + case 'year': + time = startOfDate(this.year() + 1, 0, 1) - 1; + break; + case 'quarter': + time = + startOfDate( + this.year(), + this.month() - (this.month() % 3) + 3, + 1 + ) - 1; + break; + case 'month': + time = startOfDate(this.year(), this.month() + 1, 1) - 1; + break; + case 'week': + time = + startOfDate( + this.year(), + this.month(), + this.date() - this.weekday() + 7 + ) - 1; + break; + case 'isoWeek': + time = + startOfDate( + this.year(), + this.month(), + this.date() - (this.isoWeekday() - 1) + 7 + ) - 1; + break; + case 'day': + case 'date': + time = startOfDate(this.year(), this.month(), this.date() + 1) - 1; + break; + case 'hour': + time = this._d.valueOf(); + time += + MS_PER_HOUR - + mod$1( + time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE), + MS_PER_HOUR + ) - + 1; + break; + case 'minute': + time = this._d.valueOf(); + time += MS_PER_MINUTE - mod$1(time, MS_PER_MINUTE) - 1; + break; + case 'second': + time = this._d.valueOf(); + time += MS_PER_SECOND - mod$1(time, MS_PER_SECOND) - 1; + break; + } + + this._d.setTime(time); + hooks.updateOffset(this, true); + return this; + } + + function valueOf() { + return this._d.valueOf() - (this._offset || 0) * 60000; + } + + function unix() { + return Math.floor(this.valueOf() / 1000); + } + + function toDate() { + return new Date(this.valueOf()); + } + + function toArray() { + var m = this; + return [ + m.year(), + m.month(), + m.date(), + m.hour(), + m.minute(), + m.second(), + m.millisecond(), + ]; + } + + function toObject() { + var m = this; + return { + years: m.year(), + months: m.month(), + date: m.date(), + hours: m.hours(), + minutes: m.minutes(), + seconds: m.seconds(), + milliseconds: m.milliseconds(), + }; + } + + function toJSON() { + // new Date(NaN).toJSON() === null + return this.isValid() ? this.toISOString() : null; + } + + function isValid$2() { + return isValid(this); + } + + function parsingFlags() { + return extend({}, getParsingFlags(this)); + } + + function invalidAt() { + return getParsingFlags(this).overflow; + } + + function creationData() { + return { + input: this._i, + format: this._f, + locale: this._locale, + isUTC: this._isUTC, + strict: this._strict, + }; + } + + addFormatToken('N', 0, 0, 'eraAbbr'); + addFormatToken('NN', 0, 0, 'eraAbbr'); + addFormatToken('NNN', 0, 0, 'eraAbbr'); + addFormatToken('NNNN', 0, 0, 'eraName'); + addFormatToken('NNNNN', 0, 0, 'eraNarrow'); + + addFormatToken('y', ['y', 1], 'yo', 'eraYear'); + addFormatToken('y', ['yy', 2], 0, 'eraYear'); + addFormatToken('y', ['yyy', 3], 0, 'eraYear'); + addFormatToken('y', ['yyyy', 4], 0, 'eraYear'); + + addRegexToken('N', matchEraAbbr); + addRegexToken('NN', matchEraAbbr); + addRegexToken('NNN', matchEraAbbr); + addRegexToken('NNNN', matchEraName); + addRegexToken('NNNNN', matchEraNarrow); + + addParseToken(['N', 'NN', 'NNN', 'NNNN', 'NNNNN'], function ( + input, + array, + config, + token + ) { + var era = config._locale.erasParse(input, token, config._strict); + if (era) { + getParsingFlags(config).era = era; + } else { + getParsingFlags(config).invalidEra = input; + } + }); + + addRegexToken('y', matchUnsigned); + addRegexToken('yy', matchUnsigned); + addRegexToken('yyy', matchUnsigned); + addRegexToken('yyyy', matchUnsigned); + addRegexToken('yo', matchEraYearOrdinal); + + addParseToken(['y', 'yy', 'yyy', 'yyyy'], YEAR); + addParseToken(['yo'], function (input, array, config, token) { + var match; + if (config._locale._eraYearOrdinalRegex) { + match = input.match(config._locale._eraYearOrdinalRegex); + } + + if (config._locale.eraYearOrdinalParse) { + array[YEAR] = config._locale.eraYearOrdinalParse(input, match); + } else { + array[YEAR] = parseInt(input, 10); + } + }); + + function localeEras(m, format) { + var i, + l, + date, + eras = this._eras || getLocale('en')._eras; + for (i = 0, l = eras.length; i < l; ++i) { + switch (typeof eras[i].since) { + case 'string': + // truncate time + date = hooks(eras[i].since).startOf('day'); + eras[i].since = date.valueOf(); + break; + } + + switch (typeof eras[i].until) { + case 'undefined': + eras[i].until = +Infinity; + break; + case 'string': + // truncate time + date = hooks(eras[i].until).startOf('day').valueOf(); + eras[i].until = date.valueOf(); + break; + } + } + return eras; + } + + function localeErasParse(eraName, format, strict) { + var i, + l, + eras = this.eras(), + name, + abbr, + narrow; + eraName = eraName.toUpperCase(); + + for (i = 0, l = eras.length; i < l; ++i) { + name = eras[i].name.toUpperCase(); + abbr = eras[i].abbr.toUpperCase(); + narrow = eras[i].narrow.toUpperCase(); + + if (strict) { + switch (format) { + case 'N': + case 'NN': + case 'NNN': + if (abbr === eraName) { + return eras[i]; + } + break; + + case 'NNNN': + if (name === eraName) { + return eras[i]; + } + break; + + case 'NNNNN': + if (narrow === eraName) { + return eras[i]; + } + break; + } + } else if ([name, abbr, narrow].indexOf(eraName) >= 0) { + return eras[i]; + } + } + } + + function localeErasConvertYear(era, year) { + var dir = era.since <= era.until ? +1 : -1; + if (year === undefined) { + return hooks(era.since).year(); + } else { + return hooks(era.since).year() + (year - era.offset) * dir; + } + } + + function getEraName() { + var i, + l, + val, + eras = this.localeData().eras(); + for (i = 0, l = eras.length; i < l; ++i) { + // truncate time + val = this.startOf('day').valueOf(); + + if (eras[i].since <= val && val <= eras[i].until) { + return eras[i].name; + } + if (eras[i].until <= val && val <= eras[i].since) { + return eras[i].name; + } + } + + return ''; + } + + function getEraNarrow() { + var i, + l, + val, + eras = this.localeData().eras(); + for (i = 0, l = eras.length; i < l; ++i) { + // truncate time + val = this.startOf('day').valueOf(); + + if (eras[i].since <= val && val <= eras[i].until) { + return eras[i].narrow; + } + if (eras[i].until <= val && val <= eras[i].since) { + return eras[i].narrow; + } + } + + return ''; + } + + function getEraAbbr() { + var i, + l, + val, + eras = this.localeData().eras(); + for (i = 0, l = eras.length; i < l; ++i) { + // truncate time + val = this.startOf('day').valueOf(); + + if (eras[i].since <= val && val <= eras[i].until) { + return eras[i].abbr; + } + if (eras[i].until <= val && val <= eras[i].since) { + return eras[i].abbr; + } + } + + return ''; + } + + function getEraYear() { + var i, + l, + dir, + val, + eras = this.localeData().eras(); + for (i = 0, l = eras.length; i < l; ++i) { + dir = eras[i].since <= eras[i].until ? +1 : -1; + + // truncate time + val = this.startOf('day').valueOf(); + + if ( + (eras[i].since <= val && val <= eras[i].until) || + (eras[i].until <= val && val <= eras[i].since) + ) { + return ( + (this.year() - hooks(eras[i].since).year()) * dir + + eras[i].offset + ); + } + } + + return this.year(); + } + + function erasNameRegex(isStrict) { + if (!hasOwnProp(this, '_erasNameRegex')) { + computeErasParse.call(this); + } + return isStrict ? this._erasNameRegex : this._erasRegex; + } + + function erasAbbrRegex(isStrict) { + if (!hasOwnProp(this, '_erasAbbrRegex')) { + computeErasParse.call(this); + } + return isStrict ? this._erasAbbrRegex : this._erasRegex; + } + + function erasNarrowRegex(isStrict) { + if (!hasOwnProp(this, '_erasNarrowRegex')) { + computeErasParse.call(this); + } + return isStrict ? this._erasNarrowRegex : this._erasRegex; + } + + function matchEraAbbr(isStrict, locale) { + return locale.erasAbbrRegex(isStrict); + } + + function matchEraName(isStrict, locale) { + return locale.erasNameRegex(isStrict); + } + + function matchEraNarrow(isStrict, locale) { + return locale.erasNarrowRegex(isStrict); + } + + function matchEraYearOrdinal(isStrict, locale) { + return locale._eraYearOrdinalRegex || matchUnsigned; + } + + function computeErasParse() { + var abbrPieces = [], + namePieces = [], + narrowPieces = [], + mixedPieces = [], + i, + l, + eras = this.eras(); + + for (i = 0, l = eras.length; i < l; ++i) { + namePieces.push(regexEscape(eras[i].name)); + abbrPieces.push(regexEscape(eras[i].abbr)); + narrowPieces.push(regexEscape(eras[i].narrow)); + + mixedPieces.push(regexEscape(eras[i].name)); + mixedPieces.push(regexEscape(eras[i].abbr)); + mixedPieces.push(regexEscape(eras[i].narrow)); + } + + this._erasRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i'); + this._erasNameRegex = new RegExp('^(' + namePieces.join('|') + ')', 'i'); + this._erasAbbrRegex = new RegExp('^(' + abbrPieces.join('|') + ')', 'i'); + this._erasNarrowRegex = new RegExp( + '^(' + narrowPieces.join('|') + ')', + 'i' + ); + } + + // FORMATTING + + addFormatToken(0, ['gg', 2], 0, function () { + return this.weekYear() % 100; + }); + + addFormatToken(0, ['GG', 2], 0, function () { + return this.isoWeekYear() % 100; + }); + + function addWeekYearFormatToken(token, getter) { + addFormatToken(0, [token, token.length], 0, getter); + } + + addWeekYearFormatToken('gggg', 'weekYear'); + addWeekYearFormatToken('ggggg', 'weekYear'); + addWeekYearFormatToken('GGGG', 'isoWeekYear'); + addWeekYearFormatToken('GGGGG', 'isoWeekYear'); + + // ALIASES + + addUnitAlias('weekYear', 'gg'); + addUnitAlias('isoWeekYear', 'GG'); + + // PRIORITY + + addUnitPriority('weekYear', 1); + addUnitPriority('isoWeekYear', 1); + + // PARSING + + addRegexToken('G', matchSigned); + addRegexToken('g', matchSigned); + addRegexToken('GG', match1to2, match2); + addRegexToken('gg', match1to2, match2); + addRegexToken('GGGG', match1to4, match4); + addRegexToken('gggg', match1to4, match4); + addRegexToken('GGGGG', match1to6, match6); + addRegexToken('ggggg', match1to6, match6); + + addWeekParseToken(['gggg', 'ggggg', 'GGGG', 'GGGGG'], function ( + input, + week, + config, + token + ) { + week[token.substr(0, 2)] = toInt(input); + }); + + addWeekParseToken(['gg', 'GG'], function (input, week, config, token) { + week[token] = hooks.parseTwoDigitYear(input); + }); + + // MOMENTS + + function getSetWeekYear(input) { + return getSetWeekYearHelper.call( + this, + input, + this.week(), + this.weekday(), + this.localeData()._week.dow, + this.localeData()._week.doy + ); + } + + function getSetISOWeekYear(input) { + return getSetWeekYearHelper.call( + this, + input, + this.isoWeek(), + this.isoWeekday(), + 1, + 4 + ); + } + + function getISOWeeksInYear() { + return weeksInYear(this.year(), 1, 4); + } + + function getISOWeeksInISOWeekYear() { + return weeksInYear(this.isoWeekYear(), 1, 4); + } + + function getWeeksInYear() { + var weekInfo = this.localeData()._week; + return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy); + } + + function getWeeksInWeekYear() { + var weekInfo = this.localeData()._week; + return weeksInYear(this.weekYear(), weekInfo.dow, weekInfo.doy); + } + + function getSetWeekYearHelper(input, week, weekday, dow, doy) { + var weeksTarget; + if (input == null) { + return weekOfYear(this, dow, doy).year; + } else { + weeksTarget = weeksInYear(input, dow, doy); + if (week > weeksTarget) { + week = weeksTarget; + } + return setWeekAll.call(this, input, week, weekday, dow, doy); + } + } + + function setWeekAll(weekYear, week, weekday, dow, doy) { + var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy), + date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear); + + this.year(date.getUTCFullYear()); + this.month(date.getUTCMonth()); + this.date(date.getUTCDate()); + return this; + } + + // FORMATTING + + addFormatToken('Q', 0, 'Qo', 'quarter'); + + // ALIASES + + addUnitAlias('quarter', 'Q'); + + // PRIORITY + + addUnitPriority('quarter', 7); + + // PARSING + + addRegexToken('Q', match1); + addParseToken('Q', function (input, array) { + array[MONTH] = (toInt(input) - 1) * 3; + }); + + // MOMENTS + + function getSetQuarter(input) { + return input == null + ? Math.ceil((this.month() + 1) / 3) + : this.month((input - 1) * 3 + (this.month() % 3)); + } + + // FORMATTING + + addFormatToken('D', ['DD', 2], 'Do', 'date'); + + // ALIASES + + addUnitAlias('date', 'D'); + + // PRIORITY + addUnitPriority('date', 9); + + // PARSING + + addRegexToken('D', match1to2); + addRegexToken('DD', match1to2, match2); + addRegexToken('Do', function (isStrict, locale) { + // TODO: Remove "ordinalParse" fallback in next major release. + return isStrict + ? locale._dayOfMonthOrdinalParse || locale._ordinalParse + : locale._dayOfMonthOrdinalParseLenient; + }); + + addParseToken(['D', 'DD'], DATE); + addParseToken('Do', function (input, array) { + array[DATE] = toInt(input.match(match1to2)[0]); + }); + + // MOMENTS + + var getSetDayOfMonth = makeGetSet('Date', true); + + // FORMATTING + + addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear'); + + // ALIASES + + addUnitAlias('dayOfYear', 'DDD'); + + // PRIORITY + addUnitPriority('dayOfYear', 4); + + // PARSING + + addRegexToken('DDD', match1to3); + addRegexToken('DDDD', match3); + addParseToken(['DDD', 'DDDD'], function (input, array, config) { + config._dayOfYear = toInt(input); + }); + + // HELPERS + + // MOMENTS + + function getSetDayOfYear(input) { + var dayOfYear = + Math.round( + (this.clone().startOf('day') - this.clone().startOf('year')) / 864e5 + ) + 1; + return input == null ? dayOfYear : this.add(input - dayOfYear, 'd'); + } + + // FORMATTING + + addFormatToken('m', ['mm', 2], 0, 'minute'); + + // ALIASES + + addUnitAlias('minute', 'm'); + + // PRIORITY + + addUnitPriority('minute', 14); + + // PARSING + + addRegexToken('m', match1to2); + addRegexToken('mm', match1to2, match2); + addParseToken(['m', 'mm'], MINUTE); + + // MOMENTS + + var getSetMinute = makeGetSet('Minutes', false); + + // FORMATTING + + addFormatToken('s', ['ss', 2], 0, 'second'); + + // ALIASES + + addUnitAlias('second', 's'); + + // PRIORITY + + addUnitPriority('second', 15); + + // PARSING + + addRegexToken('s', match1to2); + addRegexToken('ss', match1to2, match2); + addParseToken(['s', 'ss'], SECOND); + + // MOMENTS + + var getSetSecond = makeGetSet('Seconds', false); + + // FORMATTING + + addFormatToken('S', 0, 0, function () { + return ~~(this.millisecond() / 100); + }); + + addFormatToken(0, ['SS', 2], 0, function () { + return ~~(this.millisecond() / 10); + }); + + addFormatToken(0, ['SSS', 3], 0, 'millisecond'); + addFormatToken(0, ['SSSS', 4], 0, function () { + return this.millisecond() * 10; + }); + addFormatToken(0, ['SSSSS', 5], 0, function () { + return this.millisecond() * 100; + }); + addFormatToken(0, ['SSSSSS', 6], 0, function () { + return this.millisecond() * 1000; + }); + addFormatToken(0, ['SSSSSSS', 7], 0, function () { + return this.millisecond() * 10000; + }); + addFormatToken(0, ['SSSSSSSS', 8], 0, function () { + return this.millisecond() * 100000; + }); + addFormatToken(0, ['SSSSSSSSS', 9], 0, function () { + return this.millisecond() * 1000000; + }); + + // ALIASES + + addUnitAlias('millisecond', 'ms'); + + // PRIORITY + + addUnitPriority('millisecond', 16); + + // PARSING + + addRegexToken('S', match1to3, match1); + addRegexToken('SS', match1to3, match2); + addRegexToken('SSS', match1to3, match3); + + var token, getSetMillisecond; + for (token = 'SSSS'; token.length <= 9; token += 'S') { + addRegexToken(token, matchUnsigned); + } + + function parseMs(input, array) { + array[MILLISECOND] = toInt(('0.' + input) * 1000); + } + + for (token = 'S'; token.length <= 9; token += 'S') { + addParseToken(token, parseMs); + } + + getSetMillisecond = makeGetSet('Milliseconds', false); + + // FORMATTING + + addFormatToken('z', 0, 0, 'zoneAbbr'); + addFormatToken('zz', 0, 0, 'zoneName'); + + // MOMENTS + + function getZoneAbbr() { + return this._isUTC ? 'UTC' : ''; + } + + function getZoneName() { + return this._isUTC ? 'Coordinated Universal Time' : ''; + } + + var proto = Moment.prototype; + + proto.add = add; + proto.calendar = calendar$1; + proto.clone = clone; + proto.diff = diff; + proto.endOf = endOf; + proto.format = format; + proto.from = from; + proto.fromNow = fromNow; + proto.to = to; + proto.toNow = toNow; + proto.get = stringGet; + proto.invalidAt = invalidAt; + proto.isAfter = isAfter; + proto.isBefore = isBefore; + proto.isBetween = isBetween; + proto.isSame = isSame; + proto.isSameOrAfter = isSameOrAfter; + proto.isSameOrBefore = isSameOrBefore; + proto.isValid = isValid$2; + proto.lang = lang; + proto.locale = locale; + proto.localeData = localeData; + proto.max = prototypeMax; + proto.min = prototypeMin; + proto.parsingFlags = parsingFlags; + proto.set = stringSet; + proto.startOf = startOf; + proto.subtract = subtract; + proto.toArray = toArray; + proto.toObject = toObject; + proto.toDate = toDate; + proto.toISOString = toISOString; + proto.inspect = inspect; + if (typeof Symbol !== 'undefined' && Symbol.for != null) { + proto[Symbol.for('nodejs.util.inspect.custom')] = function () { + return 'Moment<' + this.format() + '>'; + }; + } + proto.toJSON = toJSON; + proto.toString = toString; + proto.unix = unix; + proto.valueOf = valueOf; + proto.creationData = creationData; + proto.eraName = getEraName; + proto.eraNarrow = getEraNarrow; + proto.eraAbbr = getEraAbbr; + proto.eraYear = getEraYear; + proto.year = getSetYear; + proto.isLeapYear = getIsLeapYear; + proto.weekYear = getSetWeekYear; + proto.isoWeekYear = getSetISOWeekYear; + proto.quarter = proto.quarters = getSetQuarter; + proto.month = getSetMonth; + proto.daysInMonth = getDaysInMonth; + proto.week = proto.weeks = getSetWeek; + proto.isoWeek = proto.isoWeeks = getSetISOWeek; + proto.weeksInYear = getWeeksInYear; + proto.weeksInWeekYear = getWeeksInWeekYear; + proto.isoWeeksInYear = getISOWeeksInYear; + proto.isoWeeksInISOWeekYear = getISOWeeksInISOWeekYear; + proto.date = getSetDayOfMonth; + proto.day = proto.days = getSetDayOfWeek; + proto.weekday = getSetLocaleDayOfWeek; + proto.isoWeekday = getSetISODayOfWeek; + proto.dayOfYear = getSetDayOfYear; + proto.hour = proto.hours = getSetHour; + proto.minute = proto.minutes = getSetMinute; + proto.second = proto.seconds = getSetSecond; + proto.millisecond = proto.milliseconds = getSetMillisecond; + proto.utcOffset = getSetOffset; + proto.utc = setOffsetToUTC; + proto.local = setOffsetToLocal; + proto.parseZone = setOffsetToParsedOffset; + proto.hasAlignedHourOffset = hasAlignedHourOffset; + proto.isDST = isDaylightSavingTime; + proto.isLocal = isLocal; + proto.isUtcOffset = isUtcOffset; + proto.isUtc = isUtc; + proto.isUTC = isUtc; + proto.zoneAbbr = getZoneAbbr; + proto.zoneName = getZoneName; + proto.dates = deprecate( + 'dates accessor is deprecated. Use date instead.', + getSetDayOfMonth + ); + proto.months = deprecate( + 'months accessor is deprecated. Use month instead', + getSetMonth + ); + proto.years = deprecate( + 'years accessor is deprecated. Use year instead', + getSetYear + ); + proto.zone = deprecate( + 'moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/', + getSetZone + ); + proto.isDSTShifted = deprecate( + 'isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information', + isDaylightSavingTimeShifted + ); + + function createUnix(input) { + return createLocal(input * 1000); + } + + function createInZone() { + return createLocal.apply(null, arguments).parseZone(); + } + + function preParsePostFormat(string) { + return string; + } + + var proto$1 = Locale.prototype; + + proto$1.calendar = calendar; + proto$1.longDateFormat = longDateFormat; + proto$1.invalidDate = invalidDate; + proto$1.ordinal = ordinal; + proto$1.preparse = preParsePostFormat; + proto$1.postformat = preParsePostFormat; + proto$1.relativeTime = relativeTime; + proto$1.pastFuture = pastFuture; + proto$1.set = set; + proto$1.eras = localeEras; + proto$1.erasParse = localeErasParse; + proto$1.erasConvertYear = localeErasConvertYear; + proto$1.erasAbbrRegex = erasAbbrRegex; + proto$1.erasNameRegex = erasNameRegex; + proto$1.erasNarrowRegex = erasNarrowRegex; + + proto$1.months = localeMonths; + proto$1.monthsShort = localeMonthsShort; + proto$1.monthsParse = localeMonthsParse; + proto$1.monthsRegex = monthsRegex; + proto$1.monthsShortRegex = monthsShortRegex; + proto$1.week = localeWeek; + proto$1.firstDayOfYear = localeFirstDayOfYear; + proto$1.firstDayOfWeek = localeFirstDayOfWeek; + + proto$1.weekdays = localeWeekdays; + proto$1.weekdaysMin = localeWeekdaysMin; + proto$1.weekdaysShort = localeWeekdaysShort; + proto$1.weekdaysParse = localeWeekdaysParse; + + proto$1.weekdaysRegex = weekdaysRegex; + proto$1.weekdaysShortRegex = weekdaysShortRegex; + proto$1.weekdaysMinRegex = weekdaysMinRegex; + + proto$1.isPM = localeIsPM; + proto$1.meridiem = localeMeridiem; + + function get$1(format, index, field, setter) { + var locale = getLocale(), + utc = createUTC().set(setter, index); + return locale[field](utc, format); + } + + function listMonthsImpl(format, index, field) { + if (isNumber(format)) { + index = format; + format = undefined; + } + + format = format || ''; + + if (index != null) { + return get$1(format, index, field, 'month'); + } + + var i, + out = []; + for (i = 0; i < 12; i++) { + out[i] = get$1(format, i, field, 'month'); + } + return out; + } + + // () + // (5) + // (fmt, 5) + // (fmt) + // (true) + // (true, 5) + // (true, fmt, 5) + // (true, fmt) + function listWeekdaysImpl(localeSorted, format, index, field) { + if (typeof localeSorted === 'boolean') { + if (isNumber(format)) { + index = format; + format = undefined; + } + + format = format || ''; + } else { + format = localeSorted; + index = format; + localeSorted = false; + + if (isNumber(format)) { + index = format; + format = undefined; + } + + format = format || ''; + } + + var locale = getLocale(), + shift = localeSorted ? locale._week.dow : 0, + i, + out = []; + + if (index != null) { + return get$1(format, (index + shift) % 7, field, 'day'); + } + + for (i = 0; i < 7; i++) { + out[i] = get$1(format, (i + shift) % 7, field, 'day'); + } + return out; + } + + function listMonths(format, index) { + return listMonthsImpl(format, index, 'months'); + } + + function listMonthsShort(format, index) { + return listMonthsImpl(format, index, 'monthsShort'); + } + + function listWeekdays(localeSorted, format, index) { + return listWeekdaysImpl(localeSorted, format, index, 'weekdays'); + } + + function listWeekdaysShort(localeSorted, format, index) { + return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort'); + } + + function listWeekdaysMin(localeSorted, format, index) { + return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin'); + } + + getSetGlobalLocale('en', { + eras: [ + { + since: '0001-01-01', + until: +Infinity, + offset: 1, + name: 'Anno Domini', + narrow: 'AD', + abbr: 'AD', + }, + { + since: '0000-12-31', + until: -Infinity, + offset: 1, + name: 'Before Christ', + narrow: 'BC', + abbr: 'BC', + }, + ], + dayOfMonthOrdinalParse: /\d{1,2}(th|st|nd|rd)/, + ordinal: function (number) { + var b = number % 10, + output = + toInt((number % 100) / 10) === 1 + ? 'th' + : b === 1 + ? 'st' + : b === 2 + ? 'nd' + : b === 3 + ? 'rd' + : 'th'; + return number + output; + }, + }); + + // Side effect imports + + hooks.lang = deprecate( + 'moment.lang is deprecated. Use moment.locale instead.', + getSetGlobalLocale + ); + hooks.langData = deprecate( + 'moment.langData is deprecated. Use moment.localeData instead.', + getLocale + ); + + var mathAbs = Math.abs; + + function abs() { + var data = this._data; + + this._milliseconds = mathAbs(this._milliseconds); + this._days = mathAbs(this._days); + this._months = mathAbs(this._months); + + data.milliseconds = mathAbs(data.milliseconds); + data.seconds = mathAbs(data.seconds); + data.minutes = mathAbs(data.minutes); + data.hours = mathAbs(data.hours); + data.months = mathAbs(data.months); + data.years = mathAbs(data.years); + + return this; + } + + function addSubtract$1(duration, input, value, direction) { + var other = createDuration(input, value); + + duration._milliseconds += direction * other._milliseconds; + duration._days += direction * other._days; + duration._months += direction * other._months; + + return duration._bubble(); + } + + // supports only 2.0-style add(1, 's') or add(duration) + function add$1(input, value) { + return addSubtract$1(this, input, value, 1); + } + + // supports only 2.0-style subtract(1, 's') or subtract(duration) + function subtract$1(input, value) { + return addSubtract$1(this, input, value, -1); + } + + function absCeil(number) { + if (number < 0) { + return Math.floor(number); + } else { + return Math.ceil(number); + } + } + + function bubble() { + var milliseconds = this._milliseconds, + days = this._days, + months = this._months, + data = this._data, + seconds, + minutes, + hours, + years, + monthsFromDays; + + // if we have a mix of positive and negative values, bubble down first + // check: https://github.com/moment/moment/issues/2166 + if ( + !( + (milliseconds >= 0 && days >= 0 && months >= 0) || + (milliseconds <= 0 && days <= 0 && months <= 0) + ) + ) { + milliseconds += absCeil(monthsToDays(months) + days) * 864e5; + days = 0; + months = 0; + } + + // The following code bubbles up values, see the tests for + // examples of what that means. + data.milliseconds = milliseconds % 1000; + + seconds = absFloor(milliseconds / 1000); + data.seconds = seconds % 60; + + minutes = absFloor(seconds / 60); + data.minutes = minutes % 60; + + hours = absFloor(minutes / 60); + data.hours = hours % 24; + + days += absFloor(hours / 24); + + // convert days to months + monthsFromDays = absFloor(daysToMonths(days)); + months += monthsFromDays; + days -= absCeil(monthsToDays(monthsFromDays)); + + // 12 months -> 1 year + years = absFloor(months / 12); + months %= 12; + + data.days = days; + data.months = months; + data.years = years; + + return this; + } + + function daysToMonths(days) { + // 400 years have 146097 days (taking into account leap year rules) + // 400 years have 12 months === 4800 + return (days * 4800) / 146097; + } + + function monthsToDays(months) { + // the reverse of daysToMonths + return (months * 146097) / 4800; + } + + function as(units) { + if (!this.isValid()) { + return NaN; + } + var days, + months, + milliseconds = this._milliseconds; + + units = normalizeUnits(units); + + if (units === 'month' || units === 'quarter' || units === 'year') { + days = this._days + milliseconds / 864e5; + months = this._months + daysToMonths(days); + switch (units) { + case 'month': + return months; + case 'quarter': + return months / 3; + case 'year': + return months / 12; + } + } else { + // handle milliseconds separately because of floating point math errors (issue #1867) + days = this._days + Math.round(monthsToDays(this._months)); + switch (units) { + case 'week': + return days / 7 + milliseconds / 6048e5; + case 'day': + return days + milliseconds / 864e5; + case 'hour': + return days * 24 + milliseconds / 36e5; + case 'minute': + return days * 1440 + milliseconds / 6e4; + case 'second': + return days * 86400 + milliseconds / 1000; + // Math.floor prevents floating point math errors here + case 'millisecond': + return Math.floor(days * 864e5) + milliseconds; + default: + throw new Error('Unknown unit ' + units); + } + } + } + + // TODO: Use this.as('ms')? + function valueOf$1() { + if (!this.isValid()) { + return NaN; + } + return ( + this._milliseconds + + this._days * 864e5 + + (this._months % 12) * 2592e6 + + toInt(this._months / 12) * 31536e6 + ); + } + + function makeAs(alias) { + return function () { + return this.as(alias); + }; + } + + var asMilliseconds = makeAs('ms'), + asSeconds = makeAs('s'), + asMinutes = makeAs('m'), + asHours = makeAs('h'), + asDays = makeAs('d'), + asWeeks = makeAs('w'), + asMonths = makeAs('M'), + asQuarters = makeAs('Q'), + asYears = makeAs('y'); + + function clone$1() { + return createDuration(this); + } + + function get$2(units) { + units = normalizeUnits(units); + return this.isValid() ? this[units + 's']() : NaN; + } + + function makeGetter(name) { + return function () { + return this.isValid() ? this._data[name] : NaN; + }; + } + + var milliseconds = makeGetter('milliseconds'), + seconds = makeGetter('seconds'), + minutes = makeGetter('minutes'), + hours = makeGetter('hours'), + days = makeGetter('days'), + months = makeGetter('months'), + years = makeGetter('years'); + + function weeks() { + return absFloor(this.days() / 7); + } + + var round = Math.round, + thresholds = { + ss: 44, // a few seconds to seconds + s: 45, // seconds to minute + m: 45, // minutes to hour + h: 22, // hours to day + d: 26, // days to month/week + w: null, // weeks to month + M: 11, // months to year + }; + + // helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize + function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) { + return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture); + } + + function relativeTime$1(posNegDuration, withoutSuffix, thresholds, locale) { + var duration = createDuration(posNegDuration).abs(), + seconds = round(duration.as('s')), + minutes = round(duration.as('m')), + hours = round(duration.as('h')), + days = round(duration.as('d')), + months = round(duration.as('M')), + weeks = round(duration.as('w')), + years = round(duration.as('y')), + a = + (seconds <= thresholds.ss && ['s', seconds]) || + (seconds < thresholds.s && ['ss', seconds]) || + (minutes <= 1 && ['m']) || + (minutes < thresholds.m && ['mm', minutes]) || + (hours <= 1 && ['h']) || + (hours < thresholds.h && ['hh', hours]) || + (days <= 1 && ['d']) || + (days < thresholds.d && ['dd', days]); + + if (thresholds.w != null) { + a = + a || + (weeks <= 1 && ['w']) || + (weeks < thresholds.w && ['ww', weeks]); + } + a = a || + (months <= 1 && ['M']) || + (months < thresholds.M && ['MM', months]) || + (years <= 1 && ['y']) || ['yy', years]; + + a[2] = withoutSuffix; + a[3] = +posNegDuration > 0; + a[4] = locale; + return substituteTimeAgo.apply(null, a); + } + + // This function allows you to set the rounding function for relative time strings + function getSetRelativeTimeRounding(roundingFunction) { + if (roundingFunction === undefined) { + return round; + } + if (typeof roundingFunction === 'function') { + round = roundingFunction; + return true; + } + return false; + } + + // This function allows you to set a threshold for relative time strings + function getSetRelativeTimeThreshold(threshold, limit) { + if (thresholds[threshold] === undefined) { + return false; + } + if (limit === undefined) { + return thresholds[threshold]; + } + thresholds[threshold] = limit; + if (threshold === 's') { + thresholds.ss = limit - 1; + } + return true; + } + + function humanize(argWithSuffix, argThresholds) { + if (!this.isValid()) { + return this.localeData().invalidDate(); + } + + var withSuffix = false, + th = thresholds, + locale, + output; + + if (typeof argWithSuffix === 'object') { + argThresholds = argWithSuffix; + argWithSuffix = false; + } + if (typeof argWithSuffix === 'boolean') { + withSuffix = argWithSuffix; + } + if (typeof argThresholds === 'object') { + th = Object.assign({}, thresholds, argThresholds); + if (argThresholds.s != null && argThresholds.ss == null) { + th.ss = argThresholds.s - 1; + } + } + + locale = this.localeData(); + output = relativeTime$1(this, !withSuffix, th, locale); + + if (withSuffix) { + output = locale.pastFuture(+this, output); + } + + return locale.postformat(output); + } + + var abs$1 = Math.abs; + + function sign(x) { + return (x > 0) - (x < 0) || +x; + } + + function toISOString$1() { + // for ISO strings we do not use the normal bubbling rules: + // * milliseconds bubble up until they become hours + // * days do not bubble at all + // * months bubble up until they become years + // This is because there is no context-free conversion between hours and days + // (think of clock changes) + // and also not between days and months (28-31 days per month) + if (!this.isValid()) { + return this.localeData().invalidDate(); + } + + var seconds = abs$1(this._milliseconds) / 1000, + days = abs$1(this._days), + months = abs$1(this._months), + minutes, + hours, + years, + s, + total = this.asSeconds(), + totalSign, + ymSign, + daysSign, + hmsSign; + + if (!total) { + // this is the same as C#'s (Noda) and python (isodate)... + // but not other JS (goog.date) + return 'P0D'; + } + + // 3600 seconds -> 60 minutes -> 1 hour + minutes = absFloor(seconds / 60); + hours = absFloor(minutes / 60); + seconds %= 60; + minutes %= 60; + + // 12 months -> 1 year + years = absFloor(months / 12); + months %= 12; + + // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js + s = seconds ? seconds.toFixed(3).replace(/\.?0+$/, '') : ''; + + totalSign = total < 0 ? '-' : ''; + ymSign = sign(this._months) !== sign(total) ? '-' : ''; + daysSign = sign(this._days) !== sign(total) ? '-' : ''; + hmsSign = sign(this._milliseconds) !== sign(total) ? '-' : ''; + + return ( + totalSign + + 'P' + + (years ? ymSign + years + 'Y' : '') + + (months ? ymSign + months + 'M' : '') + + (days ? daysSign + days + 'D' : '') + + (hours || minutes || seconds ? 'T' : '') + + (hours ? hmsSign + hours + 'H' : '') + + (minutes ? hmsSign + minutes + 'M' : '') + + (seconds ? hmsSign + s + 'S' : '') + ); + } + + var proto$2 = Duration.prototype; + + proto$2.isValid = isValid$1; + proto$2.abs = abs; + proto$2.add = add$1; + proto$2.subtract = subtract$1; + proto$2.as = as; + proto$2.asMilliseconds = asMilliseconds; + proto$2.asSeconds = asSeconds; + proto$2.asMinutes = asMinutes; + proto$2.asHours = asHours; + proto$2.asDays = asDays; + proto$2.asWeeks = asWeeks; + proto$2.asMonths = asMonths; + proto$2.asQuarters = asQuarters; + proto$2.asYears = asYears; + proto$2.valueOf = valueOf$1; + proto$2._bubble = bubble; + proto$2.clone = clone$1; + proto$2.get = get$2; + proto$2.milliseconds = milliseconds; + proto$2.seconds = seconds; + proto$2.minutes = minutes; + proto$2.hours = hours; + proto$2.days = days; + proto$2.weeks = weeks; + proto$2.months = months; + proto$2.years = years; + proto$2.humanize = humanize; + proto$2.toISOString = toISOString$1; + proto$2.toString = toISOString$1; + proto$2.toJSON = toISOString$1; + proto$2.locale = locale; + proto$2.localeData = localeData; + + proto$2.toIsoString = deprecate( + 'toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)', + toISOString$1 + ); + proto$2.lang = lang; + + // FORMATTING + + addFormatToken('X', 0, 0, 'unix'); + addFormatToken('x', 0, 0, 'valueOf'); + + // PARSING + + addRegexToken('x', matchSigned); + addRegexToken('X', matchTimestamp); + addParseToken('X', function (input, array, config) { + config._d = new Date(parseFloat(input) * 1000); + }); + addParseToken('x', function (input, array, config) { + config._d = new Date(toInt(input)); + }); + + //! moment.js + + hooks.version = '2.27.0'; + + setHookCallback(createLocal); + + hooks.fn = proto; + hooks.min = min; + hooks.max = max; + hooks.now = now; + hooks.utc = createUTC; + hooks.unix = createUnix; + hooks.months = listMonths; + hooks.isDate = isDate; + hooks.locale = getSetGlobalLocale; + hooks.invalid = createInvalid; + hooks.duration = createDuration; + hooks.isMoment = isMoment; + hooks.weekdays = listWeekdays; + hooks.parseZone = createInZone; + hooks.localeData = getLocale; + hooks.isDuration = isDuration; + hooks.monthsShort = listMonthsShort; + hooks.weekdaysMin = listWeekdaysMin; + hooks.defineLocale = defineLocale; + hooks.updateLocale = updateLocale; + hooks.locales = listLocales; + hooks.weekdaysShort = listWeekdaysShort; + hooks.normalizeUnits = normalizeUnits; + hooks.relativeTimeRounding = getSetRelativeTimeRounding; + hooks.relativeTimeThreshold = getSetRelativeTimeThreshold; + hooks.calendarFormat = getCalendarFormat; + hooks.prototype = proto; + + // currently HTML5 input type only supports 24-hour formats + hooks.HTML5_FMT = { + DATETIME_LOCAL: 'YYYY-MM-DDTHH:mm', // + DATETIME_LOCAL_SECONDS: 'YYYY-MM-DDTHH:mm:ss', // + DATETIME_LOCAL_MS: 'YYYY-MM-DDTHH:mm:ss.SSS', // + DATE: 'YYYY-MM-DD', // + TIME: 'HH:mm', // + TIME_SECONDS: 'HH:mm:ss', // + TIME_MS: 'HH:mm:ss.SSS', // + WEEK: 'GGGG-[W]WW', // + MONTH: 'YYYY-MM', // + }; + + return hooks; + +}))); diff --git a/pointeuse/install/bin/electron/resources/app/vendor/moment/moment.min.js b/pointeuse/install/bin/electron/resources/app/vendor/moment/moment.min.js new file mode 100644 index 00000000..36f8628c --- /dev/null +++ b/pointeuse/install/bin/electron/resources/app/vendor/moment/moment.min.js @@ -0,0 +1,2 @@ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.moment=t()}(this,function(){"use strict";var e,i;function f(){return e.apply(null,arguments)}function o(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function u(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function m(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function l(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;for(var t in e)if(m(e,t))return;return 1}function r(e){return void 0===e}function h(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function a(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function d(e,t){for(var n=[],s=0;s>>0,s=0;sFe(e)?(r=e+1,a-Fe(e)):(r=e,a);return{year:r,dayOfYear:o}}function Ae(e,t,n){var s,i,r=Ge(e.year(),t,n),a=Math.floor((e.dayOfYear()-r-1)/7)+1;return a<1?s=a+je(i=e.year()-1,t,n):a>je(e.year(),t,n)?(s=a-je(e.year(),t,n),i=e.year()+1):(i=e.year(),s=a),{week:s,year:i}}function je(e,t,n){var s=Ge(e,t,n),i=Ge(e+1,t,n);return(Fe(e)-s+i)/7}C("w",["ww",2],"wo","week"),C("W",["WW",2],"Wo","isoWeek"),L("week","w"),L("isoWeek","W"),A("week",5),A("isoWeek",5),ce("w",te),ce("ww",te,Q),ce("W",te),ce("WW",te,Q),ge(["w","ww","W","WW"],function(e,t,n,s){t[s.substr(0,1)]=Z(e)});function Ie(e,t){return e.slice(t,7).concat(e.slice(0,t))}C("d",0,"do","day"),C("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),C("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),C("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),C("e",0,0,"weekday"),C("E",0,0,"isoWeekday"),L("day","d"),L("weekday","e"),L("isoWeekday","E"),A("day",11),A("weekday",11),A("isoWeekday",11),ce("d",te),ce("e",te),ce("E",te),ce("dd",function(e,t){return t.weekdaysMinRegex(e)}),ce("ddd",function(e,t){return t.weekdaysShortRegex(e)}),ce("dddd",function(e,t){return t.weekdaysRegex(e)}),ge(["dd","ddd","dddd"],function(e,t,n,s){var i=n._locale.weekdaysParse(e,s,n._strict);null!=i?t.d=i:y(n).invalidWeekday=e}),ge(["d","e","E"],function(e,t,n,s){t[s]=Z(e)});var Ze="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),ze="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),$e="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),qe=de,Be=de,Je=de;function Qe(){function e(e,t){return t.length-e.length}for(var t,n,s,i,r=[],a=[],o=[],u=[],l=0;l<7;l++)t=_([2e3,1]).day(l),n=me(this.weekdaysMin(t,"")),s=me(this.weekdaysShort(t,"")),i=me(this.weekdays(t,"")),r.push(n),a.push(s),o.push(i),u.push(n),u.push(s),u.push(i);r.sort(e),a.sort(e),o.sort(e),u.sort(e),this._weekdaysRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+r.join("|")+")","i")}function Xe(){return this.hours()%12||12}function Ke(e,t){C(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function et(e,t){return t._meridiemParse}C("H",["HH",2],0,"hour"),C("h",["hh",2],0,Xe),C("k",["kk",2],0,function(){return this.hours()||24}),C("hmm",0,0,function(){return""+Xe.apply(this)+T(this.minutes(),2)}),C("hmmss",0,0,function(){return""+Xe.apply(this)+T(this.minutes(),2)+T(this.seconds(),2)}),C("Hmm",0,0,function(){return""+this.hours()+T(this.minutes(),2)}),C("Hmmss",0,0,function(){return""+this.hours()+T(this.minutes(),2)+T(this.seconds(),2)}),Ke("a",!0),Ke("A",!1),L("hour","h"),A("hour",13),ce("a",et),ce("A",et),ce("H",te),ce("h",te),ce("k",te),ce("HH",te,Q),ce("hh",te,Q),ce("kk",te,Q),ce("hmm",ne),ce("hmmss",se),ce("Hmm",ne),ce("Hmmss",se),ye(["H","HH"],Me),ye(["k","kk"],function(e,t,n){var s=Z(e);t[Me]=24===s?0:s}),ye(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e}),ye(["h","hh"],function(e,t,n){t[Me]=Z(e),y(n).bigHour=!0}),ye("hmm",function(e,t,n){var s=e.length-2;t[Me]=Z(e.substr(0,s)),t[De]=Z(e.substr(s)),y(n).bigHour=!0}),ye("hmmss",function(e,t,n){var s=e.length-4,i=e.length-2;t[Me]=Z(e.substr(0,s)),t[De]=Z(e.substr(s,2)),t[Se]=Z(e.substr(i)),y(n).bigHour=!0}),ye("Hmm",function(e,t,n){var s=e.length-2;t[Me]=Z(e.substr(0,s)),t[De]=Z(e.substr(s))}),ye("Hmmss",function(e,t,n){var s=e.length-4,i=e.length-2;t[Me]=Z(e.substr(0,s)),t[De]=Z(e.substr(s,2)),t[Se]=Z(e.substr(i))});var tt=z("Hours",!0);var nt,st={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:Te,monthsShort:Ne,week:{dow:0,doy:6},weekdays:Ze,weekdaysMin:$e,weekdaysShort:ze,meridiemParse:/[ap]\.?m?\.?/i},it={},rt={};function at(e){return e?e.toLowerCase().replace("_","-"):e}function ot(e){for(var t,n,s,i,r=0;r=t&&function(e,t){for(var n=Math.min(e.length,t.length),s=0;s=t-1)break;t--}r++}return nt}function ut(t){var e;if(void 0===it[t]&&"undefined"!=typeof module&&module&&module.exports)try{e=nt._abbr,require("./locale/"+t),lt(e)}catch(e){it[t]=null}return it[t]}function lt(e,t){var n;return e&&((n=r(t)?dt(e):ht(e,t))?nt=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),nt._abbr}function ht(e,t){if(null===t)return delete it[e],null;var n,s=st;if(t.abbr=e,null!=it[e])Y("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),s=it[e]._config;else if(null!=t.parentLocale)if(null!=it[t.parentLocale])s=it[t.parentLocale]._config;else{if(null==(n=ut(t.parentLocale)))return rt[t.parentLocale]||(rt[t.parentLocale]=[]),rt[t.parentLocale].push({name:e,config:t}),null;s=n._config}return it[e]=new x(b(s,t)),rt[e]&&rt[e].forEach(function(e){ht(e.name,e.config)}),lt(e),it[e]}function dt(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return nt;if(!o(e)){if(t=ut(e))return t;e=[e]}return ot(e)}function ct(e){var t,n=e._a;return n&&-2===y(e).overflow&&(t=n[ve]<0||11xe(n[pe],n[ve])?ke:n[Me]<0||24je(n,r,a)?y(e)._overflowWeeks=!0:null!=u?y(e)._overflowWeekday=!0:(o=Ee(n,s,i,r,a),e._a[pe]=o.year,e._dayOfYear=o.dayOfYear)}(e),null!=e._dayOfYear&&(r=St(e._a[pe],s[pe]),(e._dayOfYear>Fe(r)||0===e._dayOfYear)&&(y(e)._overflowDayOfYear=!0),n=Ve(r,0,e._dayOfYear),e._a[ve]=n.getUTCMonth(),e._a[ke]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=u[t]=s[t];for(;t<7;t++)e._a[t]=u[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[Me]&&0===e._a[De]&&0===e._a[Se]&&0===e._a[Ye]&&(e._nextDay=!0,e._a[Me]=0),e._d=(e._useUTC?Ve:function(e,t,n,s,i,r,a){var o;return e<100&&0<=e?(o=new Date(e+400,t,n,s,i,r,a),isFinite(o.getFullYear())&&o.setFullYear(e)):o=new Date(e,t,n,s,i,r,a),o}).apply(null,u),i=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[Me]=24),e._w&&void 0!==e._w.d&&e._w.d!==i&&(y(e).weekdayMismatch=!0)}}function Ot(e){if(e._f!==f.ISO_8601)if(e._f!==f.RFC_2822){e._a=[],y(e).empty=!0;for(var t,n,s,i,r,a,o,u=""+e._i,l=u.length,h=0,d=H(e._f,e._locale).match(N)||[],c=0;cn.valueOf():n.valueOf()"}),pn.toJSON=function(){return this.isValid()?this.toISOString():null},pn.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},pn.unix=function(){return Math.floor(this.valueOf()/1e3)},pn.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},pn.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},pn.eraName=function(){for(var e,t=this.localeData().eras(),n=0,s=t.length;nthis.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},pn.isLocal=function(){return!!this.isValid()&&!this._isUTC},pn.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},pn.isUtc=At,pn.isUTC=At,pn.zoneAbbr=function(){return this._isUTC?"UTC":""},pn.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},pn.dates=n("dates accessor is deprecated. Use date instead.",fn),pn.months=n("months accessor is deprecated. Use month instead",Ue),pn.years=n("years accessor is deprecated. Use year instead",Le),pn.zone=n("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}),pn.isDSTShifted=n("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){if(!r(this._isDSTShifted))return this._isDSTShifted;var e,t={};return v(t,this),(t=bt(t))._a?(e=(t._isUTC?_:Tt)(t._a),this._isDSTShifted=this.isValid()&&0 ${OUTFILE} +JLEN=`jq length ${OUTFILE}` +JLEN=`calc ${JLEN} - 1` +for i in $(seq 0 ${JLEN}) +do + echo $i + CID=`jq ".[$i].id" ${OUTFILE} | sed 's/"//g;'` + echo "$i => ${CID}" + jq ".[$i]" ${OUTFILE} > ${OUTPATH}"/"${CID}".json" + + cat ${OUTPATH}"/"${CID}".json" +done + +#timetracks +OUTPATH="${HOME}/.hourtrax/timetracks" +if [[ ! -d "${OUTPATH}" ]] +then + mkdir "${OUTPATH}" +fi +rm -rf "${HOME}/.hourtrax/timetracks/*" +OUTFILE="${OUTPATH}.json" +/usr/local/bin/sqlite3 -json "${HOME}/.hourtrax/hourtrax.sqlite" "select id,id_staff,daydate,stamp_in,stamp_out,tracktype from timetracks;" > ${OUTFILE} +JLEN=`jq length ${OUTFILE}` +JLEN=`calc ${JLEN} - 1` +for i in $(seq 0 ${JLEN}) +do + echo $i + CIDSTAFF=`jq ".[$i].id_staff" ${OUTFILE} | sed 's/"//g;'` + STPIN=`jq ".[$i].stamp_in" ${OUTFILE} | sed 's/"//g;'` + CTS=`date +"%Y%m%d%H%M%S%3N" --date="${STPIN}"` + echo "$i => ${CIDSTAFF} ${CTS}" + if [[ ! -d ${OUTPATH}"/"${CIDSTAFF} ]] + then + mkdir ${OUTPATH}"/"${CIDSTAFF} + fi + jq ".[$i]" ${OUTFILE} > ${OUTPATH}"/"${CIDSTAFF}"/"${CIDSTAFF}"_"${CTS}".json" + + cat ${OUTPATH}"/"${CIDSTAFF}"/"${CIDSTAFF}"_"${CTS}".json" +done + +#NOUSE!!!!badges +OUTPATH="${HOME}/.hourtrax/badges" +if [[ ! -d "${OUTPATH}" ]] +then + mkdir "${OUTPATH}" +fi + +# OUTFILE="${OUTPATH}.json" +# /usr/local/bin/sqlite3 -json "${HOME}/.hourtrax/hourtrax.sqlite" "select id,type,id_staff from badges;" > ${OUTFILE} +# JLEN=`jq length ${OUTFILE}` +# JLEN=`calc ${JLEN} - 1` +# for i in $(seq 0 ${JLEN}) +# do +# echo $i +# CID=`jq ".[$i].id" ${OUTFILE} | sed 's/"//g;'` +# echo "$i => ${CID}" +# jq ".[$i]" ${OUTFILE} > ${OUTPATH}"/"${CID}".json" + +# cat ${OUTPATH}"/"${CID}".json" +# done diff --git a/pointeuse/install/bin/fp.py b/pointeuse/install/bin/fp.py new file mode 100644 index 00000000..2bc90ff8 --- /dev/null +++ b/pointeuse/install/bin/fp.py @@ -0,0 +1,326 @@ +#!/usr/bin/env python +# -*- coding:utf-8 -*- + +import serial +import time +import sys +import RPi.GPIO as GPIO + +MYCMD=sys.argv[1] +MYTIMEOUT=int(sys.argv[2]) +MYLEVEL=5 +MYLOW=-1 +MYHIGH=-1 +MYPERM=1 +#if len(sys.argv) == 4: +# MYLEVEL=int(sys.argv[3]) +if MYCMD == "deleteuser" or MYCMD == "replaceuser": + MYHIGH=int(sys.argv[3]) + MYLOW=int(sys.argv[4]) +elif MYCMD == "write": + if len(sys.argv) == 4: + MYPERM=int(sys.argv[3]) +# elif len(sys.argv) == 4: +# MYLEVEL=int(sys.argv[3]) + +TRUE = 1 +FALSE = 0 + +# Basic response message definition +ACK_SUCCESS = 0x00 +ACK_FAIL = 0x01 +ACK_FULL = 0x04 +ACK_NO_USER = 0x05 +ACK_TIMEOUT = 0x08 +ACK_GO_OUT = 0x0F # The center of the fingersys.stdout.write is out of alignment with sensor + +# User information definition +ACK_ALL_USER = 0x00 +ACK_GUEST_USER = 0x01 +ACK_NORMAL_USER = 0x02 +ACK_MASTER_USER = 0x03 + +USER_MAX_CNT = 1000 # Maximum fingersys.stdout.write number + +# Command definition +CMD_HEAD = 0xF5 +CMD_TAIL = 0xF5 +CMD_ADD_1 = 0x01 +CMD_ADD_2 = 0x02 +CMD_ADD_3 = 0x03 +CMD_MATCH = 0x0C +CMD_DEL = 0x04 +CMD_DEL_ALL = 0x05 +CMD_USER_CNT = 0x09 +CMD_COM_LEV = 0x28 +CMD_LP_MODE = 0x2C +CMD_TIMEOUT = 0x2E +CMD_ALLUSERS = 0x2B + +CMD_FINGER_DETECTED = 0x14 + + + +Finger_WAKE_Pin = 23 +Finger_RST_Pin = 24 + +GPIO.setmode(GPIO.BCM) +GPIO.setwarnings(False) +GPIO.setup(Finger_WAKE_Pin, GPIO.IN) +GPIO.setup(Finger_RST_Pin, GPIO.OUT) +GPIO.setup(Finger_RST_Pin, GPIO.OUT, initial=GPIO.HIGH) + +g_rx_buf = [] +PC_Command_RxBuf = [] +Finger_SleepFlag = 1 + +ser = serial.Serial("/dev/ttyS0", 19200) + + +def TxAndRxCmd(command_buf, rx_bytes_need, timeout): + global g_rx_buf + CheckSum = 0 + tx_buf = [] + tx = "" + + tx_buf.append(CMD_HEAD) + for byte in command_buf: + tx_buf.append(byte) + CheckSum ^= byte + + tx_buf.append(CheckSum) + tx_buf.append(CMD_TAIL) + + for i in tx_buf: + tx += chr(i) + + ser.flushInput() + ser.write(tx) + + g_rx_buf = [] + time_before = time.time() + time_after = time.time() + while time_after - time_before < timeout and len(g_rx_buf) < rx_bytes_need: # Waiting for response + bytes_can_recv = ser.inWaiting() + if bytes_can_recv != 0: + g_rx_buf += ser.read(bytes_can_recv) + time_after = time.time() + + for i in range(len(g_rx_buf)): + g_rx_buf[i] = ord(g_rx_buf[i]) + + if len(g_rx_buf) != rx_bytes_need: + return ACK_TIMEOUT * -1 + if g_rx_buf[0] != CMD_HEAD: + return ACK_FAIL * -1 + if g_rx_buf[rx_bytes_need - 1] != CMD_TAIL: + return ACK_FAIL * -1 + if g_rx_buf[1] != tx_buf[1]: + return ACK_FAIL * -1 + + CheckSum = 0 + for index, byte in enumerate(g_rx_buf): + if index == 0: + continue + if index == 6: + if CheckSum != byte: + return ACK_FAIL * -1 + CheckSum ^= byte + return ACK_SUCCESS + + +def GetCompareLevel(): + global g_rx_buf + command_buf = [CMD_COM_LEV, 0, 0, 1, 0] + r = TxAndRxCmd(command_buf, 8, 0.1) + if r == ACK_TIMEOUT: + return ACK_TIMEOUT * -1 + if r == ACK_SUCCESS and g_rx_buf[4] == ACK_SUCCESS: + return g_rx_buf[3] + else: + return 0xFF + + +def SetCompareLevel(level): + global g_rx_buf + command_buf = [CMD_COM_LEV, 0, level, 0, 0] + r = TxAndRxCmd(command_buf, 8, 0.1) + + if r == ACK_TIMEOUT: + return ACK_TIMEOUT * -1 + if r == ACK_SUCCESS and g_rx_buf[4] == ACK_SUCCESS: + return g_rx_buf[3] + else: + return 0xFF + + +def GetUserCount(): + global g_rx_buf + command_buf = [CMD_USER_CNT, 0, 0, 0, 0] + r = TxAndRxCmd(command_buf, 8, 0.1) + if r == ACK_TIMEOUT: + return ACK_TIMEOUT + if r == ACK_SUCCESS and g_rx_buf[4] == ACK_SUCCESS: + return g_rx_buf[3] + else: + return 0xFF + +def GetTimeOut(): + global g_rx_buf + command_buf = [CMD_TIMEOUT, 0, 0, 1, 0] + r = TxAndRxCmd(command_buf, 8, 0.1) + if r == ACK_TIMEOUT: + return ACK_TIMEOUT * -1 + if r == ACK_SUCCESS and g_rx_buf[4] == ACK_SUCCESS: + return g_rx_buf[3] + else: + return 0xFF + + +def AddUser(perm): + global g_rx_buf,MYTIMEOUT + r = GetUserCount() + #sys.stdout.write ("users" + str(r)) + if r >= USER_MAX_CNT: + return ACK_FULL * -1 + + command_buf = [CMD_ADD_1, 0, r+1, perm, 0] + r = TxAndRxCmd(command_buf, 8, MYTIMEOUT) + #sys.stdout.write("1:" + str(g_rx_buf)) + if r == ACK_TIMEOUT: + return ACK_TIMEOUT * -1 + if r == ACK_SUCCESS and g_rx_buf[4] == ACK_SUCCESS: + command_buf[0] = CMD_ADD_3 + r = TxAndRxCmd(command_buf, 8, MYTIMEOUT) + #sys.stdout.write("2:" + str(g_rx_buf)) + if r == ACK_TIMEOUT: + return ACK_TIMEOUT * -1 + if r == ACK_SUCCESS and g_rx_buf[4] == ACK_SUCCESS: + sys.stdout.write("a") + r = VerifyUser() + return r + else: + return ACK_FAIL * -1 + else: + return ACK_FAIL * -1 + +def ReplaceUser(highbit,lowbit): + global g_rx_buf,MYTIMEOUT + r = DeleteUser(highbit,lowbit) + if r == ACK_SUCCESS: + r = AddUser(MYPERM) + return r + +def DeleteUser(highbit,lowbit): + global g_rx_buf,MYTIMEOUT + if highbit == -1: + return ACK_GO_OUT * -1 + if lowbit == -1: + return ACK_GO_OUT * -1 + command_buf = [CMD_DEL, highbit, lowbit, 0, 0] + #print("CMD",command_buf) + r = TxAndRxCmd(command_buf, 8, MYTIMEOUT) + #print(g_rx_buf) + if r == ACK_FAIL: + return ACK_FAIL * -1 + if r == ACK_SUCCESS: + return ACK_SUCCESS + +def ClearAllUser(): + global g_rx_buf + command_buf = [CMD_DEL_ALL, 0, 0, 0, 0] + r = TxAndRxCmd(command_buf, 8, 5) + if r == ACK_TIMEOUT: + return ACK_TIMEOUT * -1 + if r == ACK_SUCCESS and g_rx_buf[4] == ACK_SUCCESS: + return ACK_SUCCESS + else: + return ACK_FAIL * -1 + +def GetAllUsers(): + global g_rx_buf + command_buf = [CMD_ALLUSERS, 0, 0, 0, 0] + r = TxAndRxCmd(command_buf, 8, 20) + print(g_rx_buf) + if r == ACK_TIMEOUT: + return ACK_TIMEOUT * -1 + if r == ACK_SUCCESS: + return ACK_SUCCESS + else: + return ACK_FAIL * -1 + + #*************************************************************************** +# @brief Check if user ID is between 1 and 3 +#***************************************************************************/ +def IsMasterUser(user_id): + if user_id == 1 or user_id == 2 or user_id == 3: + return TRUE + else: + return FALSE + +def VerifyUser(): + global g_rx_buf,MYTIMEOUT + command_buf = [CMD_MATCH, 0, 0, 0, 0] + r = TxAndRxCmd(command_buf, 8, MYTIMEOUT) + #sys.stdout.write("v" + str(g_rx_buf)) + if r == ACK_TIMEOUT: + return str(ACK_TIMEOUT * -1) + if r == ACK_SUCCESS and IsMasterUser(g_rx_buf[4]) == TRUE: + #ACK_SUCCESS + return "u["+ str(g_rx_buf[2])+',' + str(g_rx_buf[3])+',' + str(g_rx_buf[4])+',' + str(g_rx_buf[6]) +"]" + else: + return "-" + str(ACK_NO_USER) # The center of the fingersys.stdout.write is out of alignment with sensor + +def ExitApp(reason): + if ser != None: + ser.close() + GPIO.cleanup() + sys.stdout.write(reason) + sys.exit() + +def Analysis_PC_Command(command): + global Finger_SleepFlag + #exitmsg = "-50" + if command == "count": + ExitApp(str(GetUserCount())) + elif command == "write": + r = AddUser(MYPERM) + ExitApp(str(r)) + elif command == "read": + r = VerifyUser() + ExitApp(str(r)) + elif command == "clearall": + r = ClearAllUser() + ExitApp(str(r)) + elif command == "gettimeout": + r = GetTimeOut() + ExitApp(str(r)) + elif command == "allusers": + r = GetAllUsers() + ExitApp(str(r)) + elif command == "deleteuser": + r = DeleteUser(MYHIGH,MYLOW) + ExitApp(str(r)) + elif command == "replaceuser": + r = ReplaceUser(MYHIGH,MYLOW) + ExitApp(str(r)) + else: + ExitApp("-99") + ExitApp("-100") + + +def main(): + + GPIO.output(Finger_RST_Pin, GPIO.LOW) + time.sleep(0.25) + GPIO.output(Finger_RST_Pin, GPIO.HIGH) + time.sleep(0.25) # Wait for module to start + if SetCompareLevel(MYLEVEL) != MYLEVEL: + ExitApp("-20") + Analysis_PC_Command(MYCMD) + +if __name__ == '__main__': + try: + main() + except KeyboardInterrupt: + ExitApp("-30") \ No newline at end of file diff --git a/pointeuse/install/bin/fpunload.sh b/pointeuse/install/bin/fpunload.sh new file mode 100644 index 00000000..fe8fc6fa --- /dev/null +++ b/pointeuse/install/bin/fpunload.sh @@ -0,0 +1,7 @@ +#!/bin/bash +MYPID=`ps ax | grep fp.py | grep -v "grep" | head -n 1 | awk '{ print $1 }'` +if [ "${MYPID}" != "" ] +then + kill ${MYPID} +fi + diff --git a/pointeuse/install/bin/nfcimportid.sh b/pointeuse/install/bin/nfcimportid.sh new file mode 100644 index 00000000..c03d3377 --- /dev/null +++ b/pointeuse/install/bin/nfcimportid.sh @@ -0,0 +1,38 @@ +#!/bin/bash +CALLDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +CMD='sudo '${CALLDIR}'/nfcread' +RUNS=`ps ax | grep nfcread | head -n 1 | awk '{ print $1 }'` +if [[ ${RUNS} == "" ]] +then + kill ${RUNS} +fi +#NDATA=$(`sudo nfc-poll`) +#NUID=`echo "${NDATA}" | grep UID: | sed 's/UID://' | sed 's/ //g'` +#echo ${NUID} +# RUN=1 + +# while [ $RUN == 1 ] +# do + RES=`$CMD` + #echo "->"${RES}"<-" + if [[ "${RES}" == *UID* ]] + then + #echo "UID Found" + IFS=$'\n' + + for r in ${RES[@]} + do + NL=${r//[[:space:]]/} + if [[ "${NL}" == UID* ]] + then + NUID=`echo ${NL} | awk -F":" '{ print $2 }'` + fi + done + IFS=' ' + if [[ "${NUID}" != "" ]] + then + echo "UID:"${NUID} + RUN=2 + fi + fi +# done \ No newline at end of file diff --git a/pointeuse/install/bin/nfcread.c b/pointeuse/install/bin/nfcread.c new file mode 100644 index 00000000..90389b0d --- /dev/null +++ b/pointeuse/install/bin/nfcread.c @@ -0,0 +1,85 @@ +// To compile this simple example: +// $ gcc -o quick_start_example1 quick_start_example1.c -lnfc + +#include +#include + +static void +print_hex(const uint8_t *pbtData, const size_t szBytes) +{ + size_t szPos; + + for (szPos = 0; szPos < szBytes; szPos++) { + printf("%02x ", pbtData[szPos]); + } + printf("\n"); + print_hex() +} + +int +main(int argc, const char *argv[]) +{ + nfc_device *pnd; + nfc_target nt; + + // Allocate only a pointer to nfc_context + nfc_context *context; + + // Initialize libnfc and set the nfc_context + nfc_init(&context); + if (context == NULL) { + printf("Unable to init libnfc (malloc)\n"); + exit(EXIT_FAILURE); + } + + // Display libnfc version + const char *acLibnfcVersion = nfc_version(); + (void)argc; + //printf("%s uses libnfc %s\n", argv[0], acLibnfcVersion); + + // Open, using the first available NFC device which can be in order of selection: + // - default device specified using environment variable or + // - first specified device in libnfc.conf (/etc/nfc) or + // - first specified device in device-configuration directory (/etc/nfc/devices.d) or + // - first auto-detected (if feature is not disabled in libnfc.conf) device + pnd = nfc_open(context, NULL); + + if (pnd == NULL) { + printf("ERROR: %s\n", "Unable to open NFC device."); + exit(EXIT_FAILURE); + } + // Set opened NFC device to initiator mode + if (nfc_initiator_init(pnd) < 0) { + nfc_perror(pnd, "nfc_initiator_init"); + exit(EXIT_FAILURE); + } + + //printf("NFC reader: %s opened\n", nfc_device_get_name(pnd)); + + // Poll for a ISO14443A (MIFARE) tag + const nfc_modulation nmMifare = { + .nmt = NMT_ISO14443A, + .nbr = NBR_106, + }; + if (nfc_initiator_select_passive_target(pnd, nmMifare, NULL, 0, &nt) > 0) { + //printf("The following (NFC) ISO14443A tag was found:\n"); + //printf(" ATQA (SENS_RES): "); + //print_hex(nt.nti.nai.abtAtqa, 2); + printf("UID:"); + //printf("UID (NFCID%c): ", (nt.nti.nai.abtUid[0] == 0x08 ? '3' : '1')); + print_hex(nt.nti.nai.abtUid, nt.nti.nai.szUidLen); + //printf(" SAK (SEL_RES): "); + print_hex(&nt.nti.nai.btSak, 1); + //if (nt.nti.nai.szAtsLen) { + // printf(" ATS (ATR): "); + // print_hex(nt.nti.nai.abtAts, nt.nti.nai.szAtsLen); + //} + } else { + printf("no badge"); + } + // Close NFC device + nfc_close(pnd); + // Release the context + nfc_exit(context); + exit(EXIT_SUCCESS); +} \ No newline at end of file diff --git a/pointeuse/install/bin/nfcreadbadge.sh b/pointeuse/install/bin/nfcreadbadge.sh new file mode 100644 index 00000000..f7646e70 --- /dev/null +++ b/pointeuse/install/bin/nfcreadbadge.sh @@ -0,0 +1,43 @@ +#!/bin/bash +CALLDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +CMD='sudo '${CALLDIR}'/nfcread' +RUNS=`ps ax | grep nfcread | head -n 1 | awk '{ print $1 }'` +if [[ ${RUNS} == "" ]] +then + kill ${RUNS} +fi +#NDATA=$(`sudo nfc-poll`) +#NUID=`echo "${NDATA}" | grep UID: | sed 's/UID://' | sed 's/ //g'` +#echo ${NUID} +# RUN=1 + +# while [ $RUN == 1 ] +# do + RES=`$CMD` + #echo "->"${RES}"<-" + if [[ "${RES}" == *UID* ]] + then + #echo "UID Found" + IFS=$'\n' + + for r in ${RES[@]} + do + NL=${r//[[:space:]]/} + if [[ "${NL}" == UID* ]] + then + NUID=`echo ${NL} | awk -F":" '{ print $2 }'` + #echo "UIDFOUND:"${NUID} + fi + done + IFS=' ' + if [[ "${NUID}" != "" ]] + then + STAFFID=`sqlite3 ~/.hourtrax/hourtrax.sqlite "select id_staff from badges where id='"${NUID}"' and type='nfc';"` + #STAFFID=`jq -s ".[] | select( .nfcuid==\"${NUID}\" ) | .id" .hourtrax/staff/*.json + echo "STAFFID:"${STAFFID} + RUN=2 + fi + fi + # +# done + diff --git a/pointeuse/install/bin/nfcunload.sh b/pointeuse/install/bin/nfcunload.sh new file mode 100644 index 00000000..f7010406 --- /dev/null +++ b/pointeuse/install/bin/nfcunload.sh @@ -0,0 +1,6 @@ +#!/bin/bash +MYPID=`ps ax | grep nfcread | grep -v "grep" | head -n 1 | awk '{ print $1 }'` +if [ "${MYPID}" != "" ] +then + sudo kill ${MYPID} +fi \ No newline at end of file diff --git a/pointeuse/install/bin/reboot.sh b/pointeuse/install/bin/reboot.sh new file mode 100644 index 00000000..475b2dde --- /dev/null +++ b/pointeuse/install/bin/reboot.sh @@ -0,0 +1,2 @@ +#!/bin/bash +sudo shutdown -r now \ No newline at end of file diff --git a/pointeuse/install/bin/resetgui.sh b/pointeuse/install/bin/resetgui.sh new file mode 100644 index 00000000..3b912312 --- /dev/null +++ b/pointeuse/install/bin/resetgui.sh @@ -0,0 +1,6 @@ +#!/bin/bash +export DISPLAY=:0 +TPID=`ps ax | grep electron | head -n 1 | awk '{ print $1 }'` +kill $TPI +${HOME}/bin/startapp.sh + diff --git a/pointeuse/install/bin/savewlan.sh b/pointeuse/install/bin/savewlan.sh new file mode 100644 index 00000000..8c6ba014 --- /dev/null +++ b/pointeuse/install/bin/savewlan.sh @@ -0,0 +1,33 @@ +#!/bin/bash + +WLANFILE="/etc/wpa_supplicant/wpa_supplicant.conf" +WLANDATA='ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev +update_config=1 +country=LU + +network={ + ssid="'$1'" + psk="'$2'" + priority=1 + id_str="local" +} + +network={ \ + ssid="ksphone" \ + psk="flk2kilx" + priority=1 + id_str="support" +} + +network={ + ssid="EireLAN24" + psk="daataalt2602@" + priority=2 + id_str="install" +}' +sudo echo ${WLANDATA} > ${WLANFILE} +sudo wpa_cli -i wlan0 reconfigure +#sudo dhclient -r wlan0 +#sudo ifdown wlan0 +#sudo ifup wlan0 +#sudo dhclient -v wlan0 \ No newline at end of file diff --git a/pointeuse/install/bin/scanwlan.sh b/pointeuse/install/bin/scanwlan.sh new file mode 100644 index 00000000..cd26358c --- /dev/null +++ b/pointeuse/install/bin/scanwlan.sh @@ -0,0 +1,30 @@ +#!/bin/bash + +IFS=$'\n'; set -f; +WLANS=(`sudo iwlist wlan0 scan`) +OUTPUT="" +for w in "${!WLANS[@]}" +do + #echo $w + if [[ "${WLANS[$w]}" =~ "Cell " ]] + then + CELLDATA=`echo "${WLANS[$w]}" | sed 's/^[ \t]*//' | awk '{ print $2 }'` + if [[ "${OUTPUT}" != "" ]] + then + OUTPUT=${OUTPUT}"," + fi + OUTPUT=${OUTPUT}'{"id":"'${CELLDATA}'",' + fi + if [[ "${WLANS[$w]}" =~ "ESSID:" ]] + then + #echo ${WLANS[$w]} + SDATA=`echo "${WLANS[$w]}" | sed 's/^[ \t]*//' | sed 's/ESSID://g'` + OUTPUT=${OUTPUT}'"SSID":'${SDATA}'}' + fi + if [[ "${WLANS[$w]}" =~ "Quality=" ]] + then + QDATA=`echo "${WLANS[$w]}" | sed 's/^[ \t]*//' | awk '{ print $1 }' | sed 's/Quality=//g'` + OUTPUT=${OUTPUT}'"quality":"'${QDATA}'",' + fi +done +echo "["${OUTPUT}"]" \ No newline at end of file diff --git a/pointeuse/install/bin/sendnfcuid.sh b/pointeuse/install/bin/sendnfcuid.sh new file mode 100644 index 00000000..0b6e3fb3 --- /dev/null +++ b/pointeuse/install/bin/sendnfcuid.sh @@ -0,0 +1,59 @@ +#!/bin/bash +CALLDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +. ${HOME}/.hourtrax/sync.conf +CDATE=`date +"%Y%m%d"` +LOGFILE=${HOME}/log/${CDATE}".log" +if [[ $# -eq 0 ]] +then + echo "No args!" >> ${LOGFILE} + exit 0 +fi +STAFFID=$1 +# HOSTS=(172.16.10.186 172.16.10.170 172.16.10.186) +# #HOSTS=(172.16.10.198 172.16.10.194 172.16.10.202) +# SYNCSERVER="172.16.10.190" +# SCHEMA="demo50" +# RUSER="pot" +# RPORT="3587" +OWNHOST=`ip addr show dev tun0 | grep "inet " | awk '{print $2 }'` +IFS=' +' +TDATA=(`/usr/local/bin/sqlite3 -header -quote ${HOME}/.hourtrax/hourtrax.sqlite "select * from badges where id_staff='"${STAFFID}"';"`) + +COLS=${TDATA[0]//\'/} +SQL="REPLACE INTO badges ("${COLS}") VALUES (${TDATA[1]});" +if [ "${COLS}" == "" ] +then + SQL="DELETE FROM badges WHERE id_staff='${STAFFID}';" +fi + +echo "SQL:"${SQL} >> ${LOGFILE} + +RCMD='/usr/local/bin/sqlite3 -echo .hourtrax/hourtrax.sqlite "'${SQL}'"' +RSERVERCMD='bin/setdata.sh "'${SCHEMA}'" "'${SQL}'"' +echo "SEND TO server "${SYNCSERVER}" SCHEMA "${SCHEMA} >> ${LOGFILE} +SSHRET=`ssh -p ${RPORT} ${RUSER}@${SYNCSERVER} "${RSERVERCMD}"` +echo "SSH return: ${SSHRET}" >> ${LOGFILE} + +for h in ${HOSTS[@]} +do + if [ "$h" != "${OWNHOST}" ] + then + echo "Transfer to "$h >> ${LOGFILE} + SSHRET=`ssh -p ${RPORT} ${RUSER}@$h "$RCMD"` + echo "SSH return: ${SSHRET}" >> ${LOGFILE} + fi +done + + + + +# DATABYID=`/usr/local/bin/sqlite3 -json ${HOME}/.hourtrax/hourtrax.sqlite "select * from timetracks where id='"${TRACKID}"';"`; +# # #echo "Data to send: "${DATABYID} +# HNAME=`hostname` +# curl -k -A "${USERAGENT}" -H "pot-tracker: ${HNAME}" \ +# -H "pot-schema: ${POTSCHEMA}" \ +# -H "pot-api-key: ${POTAPIKEY}" \ +# --request POST \ +# --data "cl=TimeTracker&fn=setTracker&schema=${POTSCHEMA}&tracker=${HNAME}&data=${DATABYID}" \ +# ${POTAPIURL} \ No newline at end of file diff --git a/pointeuse/install/bin/sendtrack.sh b/pointeuse/install/bin/sendtrack.sh new file mode 100644 index 00000000..26251462 --- /dev/null +++ b/pointeuse/install/bin/sendtrack.sh @@ -0,0 +1,54 @@ +#!/bin/bash +CALLDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +. ${HOME}/.hourtrax/sync.conf +CDATE=`date +"%Y%m%d"` +LOGFILE=${HOME}/log/${CDATE}".log" +if [[ $# -eq 0 ]] +then + echo "No args!" >> ${LOGFILE} + exit 0 +fi +TRACKID=$1 +# HOSTS=(172.16.10.186 172.16.10.170 172.16.10.186) +# #HOSTS=(172.16.10.198 172.16.10.194 172.16.10.202) +# SYNCSERVER="172.16.10.190" +# SCHEMA="demo50" +# RUSER="pot" +# RPORT="3587" +OWNHOST=`ip addr show dev tun0 | grep "inet " | awk '{print $2 }'` +IFS=' +' +TDATA=(`/usr/local/bin/sqlite3 -header -quote ${HOME}/.hourtrax/hourtrax.sqlite "select * from timetracks where id='"${TRACKID}"';"`) + +COLS=${TDATA[0]//\'/} +SQL="REPLACE INTO timetracks ("${COLS}") VALUES (${TDATA[1]});" +echo "SQL:"${SQL} >> ${LOGFILE} + +RCMD='/usr/local/bin/sqlite3 -echo .hourtrax/hourtrax.sqlite "'${SQL}'"' +RSERVERCMD='bin/settrack.sh "'${SCHEMA}'" "'${SQL}'"' +echo "SEND TO server "${SYNCSERVER}" SCHEMA "${SCHEMA} >> ${HOME}/log/${CDATE}".log" +SSHRET=`ssh -p ${RPORT} ${RUSER}@${SYNCSERVER} "${RSERVERCMD}"` +echo "SSH return: ${SSHRET}" >> ${LOGFILE} + +for h in ${HOSTS[@]} +do + if [ "$h" != "${OWNHOST}" ] + then + echo "Transfer to "$h >> ${LOGFILE} + SSHRET=`ssh -p ${RPORT} ${RUSER}@$h "$RCMD"` + echo "SSH return: ${SSHRET}" >> ${LOGFILE} + fi +done + + + + +# DATABYID=`/usr/local/bin/sqlite3 -json ${HOME}/.hourtrax/hourtrax.sqlite "select * from timetracks where id='"${TRACKID}"';"`; +# # #echo "Data to send: "${DATABYID} +# HNAME=`hostname` +# curl -k -A "${USERAGENT}" -H "pot-tracker: ${HNAME}" \ +# -H "pot-schema: ${POTSCHEMA}" \ +# -H "pot-api-key: ${POTAPIKEY}" \ +# --request POST \ +# --data "cl=TimeTracker&fn=setTracker&schema=${POTSCHEMA}&tracker=${HNAME}&data=${DATABYID}" \ +# ${POTAPIURL} \ No newline at end of file diff --git a/pointeuse/install/bin/setstaff.sh b/pointeuse/install/bin/setstaff.sh new file mode 100644 index 00000000..0a3794cb --- /dev/null +++ b/pointeuse/install/bin/setstaff.sh @@ -0,0 +1,61 @@ +#!/bin/bash +CALLDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +if [[ $# -eq 0 ]] +then + echo "No args!" + exit 0 +fi + +#$db="/mnt/c/Users/ksaff/Workspace/hourtrax/.hourtrax/hourtrax.sqlite" +db=${HOME}"/.hourtrax/hourtrax.sqlite" +params=$1 +params=${params//[\[|\$|\]|\{|\}|\']} + +#eval ${params} +IFS=';' +stdata=(`echo "$params"`) +HASID="0" +USERID="" +CDATE=`date +"%F %T"` +declare -a acol +declare -a aval +declare -a aupd +for s in "${stdata[@]}" +do + IFS='=' + cold=(`echo "$s"`) + acol=(${acol[@]} ${cold[0]}) + if [ "${cold[0]}" == "id" ]; then + HASID="1" + USERID=${cold[1]}; + fi + if [ "${cold[1]}" == "" ]; then + val='null' + else + val="'"${cold[1]}"'" + fi + if [ "${cold[0]}" != "id" ] && [ "${cold[0]}" != "pin" ]; then + IFS=$'\n' + cupd=${cold[0]}"="$val + aupd=(${aupd[@]} $cupd) + fi + + aval=(${aval[@]} $val) +done + +IFS='|' +scol=$(IFS=',' ; echo "${acol[*]}") +sval=$(IFS=',' ; echo "${aval[*]}") +supd=$(IFS=',' ; echo "${aupd[*]}") + +sql="INSERT INTO staff ("$scol") VALUES ("$sval") ON CONFLICT(id) DO UPDATE SET "$supd" WHERE excluded.id='"$USERID"';" +if [[ "$HASID" == "1" ]]; then + sqlite3 $db "$sql" + echo $sql + echo $sql >> ${HOME}'/.hourtrax/staffupd.log' + +else + echo ${stdata}" has no ID!" >> ${HOME}.'/.hourtrax/staffupd.log' +fi + + diff --git a/pointeuse/install/bin/shutdown.sh b/pointeuse/install/bin/shutdown.sh new file mode 100644 index 00000000..d3835a92 --- /dev/null +++ b/pointeuse/install/bin/shutdown.sh @@ -0,0 +1,2 @@ +#!/bin/bash +sudo shutdown -h now \ No newline at end of file diff --git a/pointeuse/install/bin/startapp.sh b/pointeuse/install/bin/startapp.sh new file mode 100644 index 00000000..4380397f --- /dev/null +++ b/pointeuse/install/bin/startapp.sh @@ -0,0 +1,6 @@ +#!/bin/bash +#/home/dks/bin/mountdrives.pl -m && +rm -rf ${HOME}"/cache/Hourtrax" && +#/home/dks/bin/hourtrax/hourtrax.pl && +${HOME}/bin/electron/electron & +xset dpms 0 0 60 & \ No newline at end of file diff --git a/pointeuse/install/bin/syncdown.pl b/pointeuse/install/bin/syncdown.pl new file mode 100644 index 00000000..16b6c3cb --- /dev/null +++ b/pointeuse/install/bin/syncdown.pl @@ -0,0 +1,29 @@ +#!/usr/bin/env perl + +use strict; +use JSON::PP; +my $cfg = &readconfig($ENV{HOME}.'/.hourtrax/sync.conf'); + +my $sql = "select id,prename,surname,isdeleted,case when istimetrackenabled is null or timetrackers LIKE '%".$cfg->{htxstation}."%' then true else null end as isdisabled, timetrackerlang as lang,timetrackerfixtime as fixtime,timetrackerpin as pin, timetrackerrestriction as restriction from ".$cfg->{htxschema}.".staff"; + +my $cmd = 'curl -H "Content-type: application/json" --user "'.$cfg->{htxuser}.':'.$cfg->{htxpwd}.'" -X POST --data \'{"fn":"queryarray","cl":"data","sql":"'.$sql.'"}\' '.$cfg->{htxurl}; + + +print $cmd."\n"; +my $res = `$cmd`; + +print $res."\n"; + +sub readconfig($file){ + my $file = shift; + my $ncfg = (); + open(CFG,$file); + while (my $l = ){ + chomp($l); + if (($l =~ /^#/ ) || ($l eq "")) { next;} + my ($k,$v) = $l =~ m/^(.+)="(.+)"/; + $ncfg->{$k} = $v; + } + close(CFG); + return $ncfg; +} diff --git a/pointeuse/install/bin/turnscreen.sh b/pointeuse/install/bin/turnscreen.sh new file mode 100644 index 00000000..16718a8c --- /dev/null +++ b/pointeuse/install/bin/turnscreen.sh @@ -0,0 +1,12 @@ +#!/bin/bash +CUR_LCD=`grep lcd_rotate /boot/config.txt` +if [[ "${CUR_LCD}" == "lcd_rotate=2" ]] +then + #echo "is 2" + sudo sed -i 's/lcd_rotate/#lcd_rotate/' /boot/config.txt +else + #echo "is 0" + sudo sed -i 's/#lcd_rotate/lcd_rotate/' /boot/config.txt +fi +echo "${CUR_LCD}"; +sudo shutdown -r now diff --git a/pointeuse/install/create_pkg.sh b/pointeuse/install/create_pkg.sh new file mode 100644 index 00000000..a9bf588e --- /dev/null +++ b/pointeuse/install/create_pkg.sh @@ -0,0 +1 @@ +#!/bin/bash diff --git a/pointeuse/install/installpot01.sh b/pointeuse/install/installpot01.sh new file mode 100644 index 00000000..d23676aa --- /dev/null +++ b/pointeuse/install/installpot01.sh @@ -0,0 +1,83 @@ +#!/bin/bash + +#sudo -i + +NEWHOST=$1 +echo ${NEWHOST} +update-rc.d "ssh" enable +echo 'echo -e "mai5ia7a\nmai5ia7a" | passwd' > tmp.sh && bash tmp.sh && rm tmp.sh +sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config +sed -i 's/#Port.*/Port 3587/' /etc/ssh/sshd_config +service ssh restart +cp /usr/share/zoneinfo/Europe/Luxembourg /etc/localtime + +groupadd pot +useradd pot -c pot -g pot -G adm,sudo,crontab,dialout,gpio -s /bin/bash -d /home/pot +echo 'echo -e "sai4seip\nsai4seip" | passwd pot' > tmp.sh && bash tmp.sh && rm tmp.sh +mkdir -p /home/pot +chown pot:pot /home/pot +echo "lcd_rotate=2" >> /boot/config.txt +echo "enable_uart=1" >> /boot/config.txt +chmod 660 /etc/sudoers +sed -i 's/\%sudo.*/%sudo ALL=(ALL:ALL) NOPASSWD:ALL/' /etc/sudoers +chmod 440 /etc/sudoers + + +systemctl stop autologin@tty1 +sed -i -e "s/autologin pi/autologin pot/" /etc/systemd/system/autologin@.service +sed -i -e 's/pi/pot/' /etc/systemd/system/getty@tty1.service.d/autologin.conf +#NEWHOST="ldin-hourtrax" +hostnamectl set-hostname ${NEWHOST} +sed -i -e "s/127.0.1.1.*/127.0.1.1\t${NEWHOST}/" /etc/hosts +#apt-get update +apt-get update +apt-get install -y wget curl unzip openvpn sqlite3 libnfc5 libnfc-bin libnfc-examples i2c-tools +curl -sL https://deb.nodesource.com/setup_12.x | bash - +apt-get install -y nodejs +sed -i -e 's/MinProtocol/#MinProtocol/' /etc/ssl/openssl.cnf +sed -i -e 's/CipherString/#CipherString/' /etc/ssl/openssl.cnf +#echo "lcd_rotate=2" >> /boot/config.txt +sed -i -e 's/#xserver-command=X/xserver-command=X -nocursor/' /etc/lightdm/lightdm.conf +sed -i -e 's/#net.ipv4.ip_forward=1/net.ipv4.ip_forward=1/' /etc/sysctl.conf +sysctl -p +echo "#!/bin/bash" > /etc/xdg/lxsession/LXDE-pi/sshpwd.sh +sed -i -e "s/^autologin-user=pi/autologin-user=pot/" /etc/lightdm/lightdm.conf +sed -i -e "s/@/#@/" /etc/xdg/lxsession/LXDE-pi/autostart +sed -i -e "s/@/#@/" /etc/xdg/lxsession/LXDE/autostart +# echo "@xset s off" >> /etc/xdg/lxsession/LXDE-pi/autostart +# echo "@xset -dpms" >> /etc/xdg/lxsession/LXDE-pi/autostart +# echo "@xset s noblank" >> /etc/xdg/lxsession/LXDE-pi/autostart +echo 'country=LU' >> /etc/wpa_supplicant/wpa_supplicant.conf +echo '' >> /etc/wpa_supplicant/wpa_supplicant.conf +echo 'network={' >> /etc/wpa_supplicant/wpa_supplicant.conf +echo ' ssid="ksphone"' >> /etc/wpa_supplicant/wpa_supplicant.conf +echo ' priority=2' >> /etc/wpa_supplicant/wpa_supplicant.conf +echo ' psk="flk2kilx"' >> /etc/wpa_supplicant/wpa_supplicant.conf +echo '}' >> /etc/wpa_supplicant/wpa_supplicant.conf +echo 'network={' >> /etc/wpa_supplicant/wpa_supplicant.conf +echo ' ssid="EireLAN24"' >> /etc/wpa_supplicant/wpa_supplicant.conf +echo ' priority=1' >> /etc/wpa_supplicant/wpa_supplicant.conf +echo ' psk="daataalt2602@"' >> /etc/wpa_supplicant/wpa_supplicant.conf +echo '}' >> /etc/wpa_supplicant/wpa_supplicant.conf +echo '' > /etc/xdg/openbox/menu.xml +echo '' >> /etc/xdg/openbox/menu.xml +echo '' >> /etc/xdg/openbox/menu.xml +echo '' >> /etc/xdg/openbox/menu.xml + + +rm /etc/xdg/autostart/xdg-user-dirs.desktop +rm /etc/xdg/autostart/pprompt.desktop +rm /etc/xdg/autostart/xcompmgr.desktop +rm /etc/xdg/autostart/piwiz.desktop +rm /etc/xdg/autostart/lxpolkit.desktop +sudo rfkill unblock all +shutdown -r now + + + +#shutdown -r now + + + + + diff --git a/pointeuse/install/installpot02.sh b/pointeuse/install/installpot02.sh new file mode 100644 index 00000000..2181b34d --- /dev/null +++ b/pointeuse/install/installpot02.sh @@ -0,0 +1,73 @@ + +#export USERNAME="pot" +#NEWHOST="ldin-hourtrax" +if [ "$(id -u)" != 0 ]; then + echo 'Sorry, you need to run this script with sudo' + exit 1 +fi +NEWHOST=$1 +echo ${NEWHOST} +cd /home/pot +curl -O http://dksserver/installers/pot/pot.tar.gz && tar xzvf pot.tar.gz +chown -R pot:pot /home/pot/bin +chown -R pot:pot /home/pot/.hourtrax +echo "@/home/pot/bin/startapp.sh" > /etc/xdg/lxsession/LXDE-pi/autostart +cp ${HOME}/bin/sqlite3 /usr/local/bin/sqlite3 +cp /home/pot/splash.png /usr/share/plymouth/themes/pix/splash.png +userdel pi +rm -r /home/pi + +rfkill unblock all +wpa_cli -i wlan0 reconfigure + +su - pot +mkdir ${HOME}/log +cd ${HOME}/.hourtrax +sqlite3 hourtrax.sqlite < ht.sql +chmod +x ${HOME}/bin/*.sh +#cp "/home/pot/vpn/DKS-VPN-"${NEWHOST}".ovpn" "/etc/openvpn/DKS-VPN-"${NEWHOST}.".conf" +#systemctl enable openvpn@DKS-VPN-${NEWHOST}.service + +exit +#enable i2c +echo '>>> Enable I2C' +if grep -q 'i2c-bcm2708' /etc/modules; then + echo 'Seems i2c-bcm2708 module already exists, skip this step.' +else + echo 'i2c-bcm2708' >> /etc/modules +fi +if grep -q 'i2c-dev' /etc/modules; then + echo 'Seems i2c-dev module already exists, skip this step.' +else + echo 'i2c-dev' >> /etc/modules +fi +if grep -q 'dtparam=i2c1=on' /boot/config.txt; then + echo 'Seems i2c1 parameter already set, skip this step.' +else + echo 'dtparam=i2c1=on' >> /boot/config.txt +fi +if grep -q 'dtparam=i2c_arm=on' /boot/config.txt; then + echo 'Seems i2c_arm parameter already set, skip this step.' +else + echo 'dtparam=i2c_arm=on' >> /boot/config.txt +fi +if [ -f /etc/modprobe.d/raspi-blacklist.conf ]; then + sed -i 's/^blacklist spi-bcm2708/#blacklist spi-bcm2708/' /etc/modprobe.d/raspi-blacklist.conf + sed -i 's/^blacklist i2c-bcm2708/#blacklist i2c-bcm2708/' /etc/modprobe.d/raspi-blacklist.conf +else + echo 'File raspi-blacklist.conf does not exist, skip this step.' +fi + +# echo '>>> Install i2c-tools' +# if hash i2cget 2>/dev/null; then +# echo 'Seems i2c-tools is installed already, skip this step.' +# else +# apt-get install -y i2c-tools +# fi + +systemctl reboot -i + + + + +# for fingerprint on gpio \ No newline at end of file diff --git a/pointeuse/install/installvpnkey.sh b/pointeuse/install/installvpnkey.sh new file mode 100644 index 00000000..47576a38 --- /dev/null +++ b/pointeuse/install/installvpnkey.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +#curl -s http://dksserver/installers/installpot01.sh | bash -s kaji-pot10dhart-pot03 +#curl -s http://dksserver/installers/installpot02.sh | bash -s kaji-pot10 dhart-pot03 +#curl -s http://dksserver/installers/installvpnkey.sh | bash -s kaji-pot10 +NEWHOST=$1 +cd /etc/openvpn +curl -O http://dksserver/installers/pot/vpn/DKS-VPN-${NEWHOST}.ovpn +mv DKS-VPN-${NEWHOST}.ovpn DKS-VPN-${NEWHOST}.conf +systemctl enable openvpn@DKS-VPN-${NEWHOST}.service +update-rc.d openvpn enable +service openvpn start + diff --git a/pointeuse/install/linkstationtoserver.sh b/pointeuse/install/linkstationtoserver.sh new file mode 100644 index 00000000..3cbbafd3 --- /dev/null +++ b/pointeuse/install/linkstationtoserver.sh @@ -0,0 +1,22 @@ +#!/bin/bash +#webserver for communication pot app to badge station +#DKSVPN2 Server (intermediate2) +cd ~ +ssh-keygen -t rsa -N '' -f ~/.ssh/id_rsa <<< y +ssh-copy-id pot@188.34.195.60 +# ~: ssh-keygen -q -t rsa -N '' -f ~/.ssh/id_rsa <<&1 >/dev/null +# ~: echo $? +# -->0 + +ssh -p 3587 dks@188.34.195.60 +#get station vpnIP +SCHEMA= +STATIONIP=? +#/home/dks/public_html/htx/data/hosts/{STATION}.json +echo '{ "sshuser":"pot","sshpwd":"sai4seip","sshport":"3587","sshhost":"${STATIONIP}"}' >> /home/dks/public_html/htx/data/hosts/{STATION}.json + +#scriptserver for communication from badge station to potapp +ssh -p 3587 pot@188.34.195.60 +mkdir /home/pot/data/${SCHEMA} +SCHEMADATA= +scp -P 3587 .hourtrax/hourtrax.sqlite /home/pot/data/${SCHEMA}/ \ No newline at end of file diff --git a/pointeuse/install/splash.png b/pointeuse/install/splash.png new file mode 100644 index 00000000..118c3f76 Binary files /dev/null and b/pointeuse/install/splash.png differ diff --git a/pointeuse/server/home/dks/bin/checkcert.sh b/pointeuse/server/home/dks/bin/checkcert.sh new file mode 100644 index 00000000..4321806e --- /dev/null +++ b/pointeuse/server/home/dks/bin/checkcert.sh @@ -0,0 +1,41 @@ +#!/bin/bash +CALLDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +PREEXEC='service apache2 stop' +POSTEXEC='service apache2 start' +IFS=' +' +CERTS=(`certbot certificates | grep -a1 "VALID:"`) +DOMAIN="" +VALID="" +for c in "${CERTS[@]}" +do + #echo "~:"$c + if [[ "$c" =~ "Domains" ]] + then + DOMAIN=`echo "$c" | awk '{ print $2 }'` + #echo "Domain:"${DOMAIN}"<-" + VALID="" + fi + if [[ "$c" =~ "VALID:" ]] + then + VALID=`echo "$c" | awk -F"VALID" '{ print $2 }' | sed -e 's/[^0-9]//g'` + #echo "Valid:"$VALID"<-" + fi + + if [ "${VALID}" != "" ] && [ "${DOMAIN}" != "" ] + then + if [[ "${VALID}" < "35" ]] + then + $PREEXEC && + certbot renew --standalone -d ${DOMAIN} + $POSTEXEC + DOMAIN="" + VALID="" + else + echo "Domain ${DOMAIN} Certificate still valid ${VALID} days" + DOMAIN="" + VALID="" + fi + fi +done + diff --git a/pointeuse/server/home/dks/bin/lib/ConfigFile.pm b/pointeuse/server/home/dks/bin/lib/ConfigFile.pm new file mode 100644 index 00000000..ae7a6f7c --- /dev/null +++ b/pointeuse/server/home/dks/bin/lib/ConfigFile.pm @@ -0,0 +1,57 @@ +package ConfigFile; + +use strict; +use JSON::PP; +use POSIX qw/strftime/; +sub new { + my $class = shift; + my $p = shift; + my $self = bless {}, $class; + $self->{logfile} = $p->{logfile}; + return $self; +} + +sub read_conf(){ + my $self = shift; + my $cfile = shift; + my $retcfg = (); + open(CFG,$cfile); + while (my $l = ){ + chomp($l); + $l =~ s/^\s+//; + $l =~ s/\s+$//; + if (($l eq "") || ($l =~ /^#/) || ($l =~ /^;/)){next;} + my ($k,$v) = $l =~ m/(\w+)\s*=\s*(.*)$/; + $retcfg->{lc($k)} = $v; + } + close(CFG); + return $retcfg; +} + +sub read_json(){ + my $self = shift; + my $jfile = shift; + my $strdata = ""; + open(CFG,$jfile); + while (my $l = ){ + chomp($l); + $strdata .= $l; + } + close(CFG); + return JSON::PP::decode_json($strdata); +} + +sub writelog(){ + my $self = shift; + my $type = shift; + my $system = shift; + my $action = shift; + my $msg = shift; + $msg =~ s/\r//g; + $msg =~ s/\n//g; + open(LOG,">>".$self->{logfile}); + print LOG strftime('%Y-%m-%d %H:%M:%S',localtime()).";".$type.";".$system.";".$action.";".$msg."\n"; + close(LOG); +} + +1; \ No newline at end of file diff --git a/pointeuse/server/home/dks/bin/lib/DB/PgSQL.pm b/pointeuse/server/home/dks/bin/lib/DB/PgSQL.pm new file mode 100644 index 00000000..5971e5bf --- /dev/null +++ b/pointeuse/server/home/dks/bin/lib/DB/PgSQL.pm @@ -0,0 +1,349 @@ +package DB::PgSQL; + +use strict; +use DBI; +use File::Basename; +use DBD::PgPP; +use URI::Encode qw(uri_encode uri_decode); +use Encode; +use Data::Dumper; +use Text::Unidecode; + + +sub new { + my $class = shift; + my $p = shift; + my $self = bless {}, $class; + $self->{debug} = 1; + $self->{dbh} = DBI->connect("DBI:PgPP:dbname=".$p->{dbname}.":host=".$p->{dbhost},$p->{dbuser},$p->{dbpasswd},{PrintError=>1,RaiseError=>1,AutoCommit=>1}) or return "query Connection Error!".$!; + return $self; +} + +sub disconnect(){ + my $self = shift; + return $self->{dbh}->disconnect(); +} + +sub securetext(){ + my $self = shift; + my $text = shift; + $text =~ s/'/''/g; + return $text; +} + +sub value(){ + my $self = shift; + my $text = shift; + if ($text eq ""){ + return 'null'; + } + return "'".$text."'"; +} + +sub logerror(){ + my $self = shift; + my $fn = shift; + my $stat = shift; + + return (); +} + +sub newuuid(){ + my $self = shift; + my $rx = $self->query("SELECT uuid_in(md5(random()::text || clock_timestamp()::text)::cstring) as id;"); + return $rx->{id}; +} + +sub query_unenc(){ + my $self = shift; + my $stat = shift; + + my $retdata = (); + $stat = encode("utf8", $stat); + if ($self->{debug} == 1){ + print STDERR "QUERY_UNENC:\n".$stat."\n===\n"; + } + my $sth = $self->{dbh}->prepare($stat) or return $self->logerror("query_unenc",$stat); + + + $sth->execute() or return $self->logerror("query_unenc",$stat); + + my $data = $sth->fetchrow_hashref(); + foreach my $k (keys %{$data}){ + $retdata->{$k} = $data->{$k};#decode("utf-8",$data->{$k}); + } + + $sth->finish(); + + return $retdata; +} + +sub query(){ + my $self = shift; + my $stat = shift; + my $retdata = (); + $stat = encode("utf8", $stat); + if ($self->{debug} == 1){ + print STDERR "QUERY:\n".$stat."\n===\n"; + } + my $sth = $self->{dbh}->prepare($stat) or return $self->logerror("query",$stat); + + $sth->execute() or return $self->logerror("query",$stat); + + my $data = $sth->fetchrow_hashref(); + foreach my $k (keys %{$data}){ + $retdata->{$k} = decode("utf-8",$data->{$k}); + } + + $sth->finish(); + + return $retdata; +} + +sub querybykey(){ + my $self = shift; + my $key = shift; + my $stat = shift; + my $retdata =(); + if ($self->{debug} == 1){ + print STDERR "QUERYBYKEY:\n".$stat."\n===\n"; + } + my $sth = $self->{dbh}->prepare($stat) or return $self->logerror("querybykey",$stat); + $sth->execute() or return $self->logerror("querybykey",$stat); + while(my $data = $sth->fetchrow_hashref()) + { + if (exists $data->{$key}){ + foreach my $k (keys %{$data}){ + $retdata->{$data->{$key}}{$k} =decode("utf-8",$data->{$k}); + } + } + } + if (keys(%{$retdata}) == 0){ + $retdata =(); + } + $sth->finish(); + return $retdata; +} + +sub querysorted(){ + my $self = shift; + my $stat = shift; + my $retdata = (); + if ($stat !~ /sessions/){ + if ($self->{debug} == 1){ + print STDERR "QUERYSORTED:\n".$stat."\n===\n"; + } + } + my $sth = $self->{dbh}->prepare($stat) or return $self->logerror("querysorted",$stat); + $sth->execute() or return $self->logerror("querysorted",$stat); + my $count = 0; + while(my $data = $sth->fetchrow_hashref()){ + foreach my $k (keys %{$data}){ + if ($data->{$k} =~ /^{.*}$/){ + $retdata->{$count}->{$k} = JSON::PP::decode_json($data->{$k}); + } else { + $retdata->{$count}->{$k} = decode("utf-8",$data->{$k}); + } + } + $count++; + } + $sth->finish(); + return $retdata; +} + +sub exec(){ + my $self = shift; + my $stat = shift; + my $retdata; + $stat = encode("UTF-8", $stat); + if ($self->{debug} == 1){ + print STDERR "EXEC:\n".$stat."\n===\n"; + } + my $sth = $self->{dbh}->prepare($stat) or return $self->logerror("exec",$stat); + $retdata->{success} = $self->{dbh}->do($stat) or return $self->logerror("exec",$stat); + return $retdata; +} + +sub queryarray(){ + my $self = shift; + my $stat = shift; + my @retdata = (); + my $res = $self->querysorted($stat); + foreach my $r (sort {$a <=> $b} keys(%{$res})){ + push(@retdata,$res->{$r}); + } + return \@retdata; +} + + +# sub create_ddl_insert(){ +# my $self = shift; +# my $data = shift; +# my $fields = (); +# my @ddl = (); +# foreach my $f (keys(%{$data})){ +# if (($f =~ /\_/) && ($f !~ /^ident_/) && ($f !~ /\_id$/)){ +# my $t = substr($f,0,index($f,"_")); +# my $c = substr($f,length($t)+1); +# $fields->{$t}->{$c} = $data->{$f}; +# } elsif ($f =~ /^ident_/){ +# my $f2 = $f; +# $f2 =~ s/^ident_//; + +# my $t = substr($f2,0,index($f2,"_")); +# my $c = substr($f2,length($t)+1); +# if ($c ne "id"){ +# $fields->{$t}->{$c} = $data->{$f}; +# } +# } + +# } +# foreach my $tb (keys(%{$fields})){ +# my @sqlcol = (); +# my @sqlval = (); +# foreach my $c (keys(%{$fields->{$tb}})){ +# my $v = $fields->{$tb}->{$c}; +# $v =~ s/'/''/g; +# push (@sqlcol,$c); +# if ($v eq ''){ +# $v = 'null'; +# } else { +# $v = "'".$v."'"; +# } +# push (@sqlval,$v); +# } +# push(@ddl,"INSERT INTO ".$tb." (".join(",",@sqlcol).") VALUES (".join(",",@sqlval).") returning id;"); +# } +# return @ddl; +# } + + +# sub create_ddl_update(){ +# my $self = shift; +# my $data = shift; +# my $fields = (); +# my @ddl = (); +# foreach my $f (keys(%{$data})){ +# if ($f =~ /^ident_/){ +# my $fx = substr($f,6); +# my $t = substr($fx,0,index($fx,"_")); +# my $c = substr($fx,length($t)+1); +# $fields->{$t}->{cond}->{$c} = $data->{$f}; +# } elsif ( ($f !~ /^ident/) && ($f =~ /.+\_.+/) ){ +# my $t = substr($f,0,index($f,"_")); +# my $c = substr($f,length($t)+1); +# $fields->{$t}->{fields}->{$c} = $data->{$f}; +# } +# } +# foreach my $tb (keys(%{$fields})){ +# my @sqlupd = (); +# my @sqlcond = (); +# foreach my $c (keys(%{$fields->{$tb}->{fields}})){ + +# my $v = $fields->{$tb}->{fields}->{$c}; +# $v =~ s/'/''/g; + +# if ($c =~ /-/){ +# my @jp = split('-',$c); +# if ($v eq ''){ +# $v = 'null'; +# } else { +# $v = '"'.$v.'"'; +# } +# $c = 'jsonb_set(to_jsonb('.$jp[0].'),\'{"'.$jp[1].'"}\',\''.$v.'\')::json'; +# push (@sqlupd,$jp[0]."=".$c); +# }else { +# if ($v eq ''){ +# $v = 'null'; +# } else { +# $v = "'".$v."'"; +# } +# push (@sqlupd,$c."=".$v); +# } + +# } +# foreach my $c (keys(%{$fields->{$tb}->{cond}})){ +# my $v = $fields->{$tb}->{cond}->{$c}; +# $v =~ s/'/''/g; +# if ($v eq ''){ +# $v = 'null'; +# } else { +# $v = "'".$v."'"; +# } +# push (@sqlcond,$c."=".$v); +# } +# push(@ddl,"UPDATE ".$tb." SET ".join(",",@sqlupd)." WHERE ".join(" AND ",@sqlcond).";"); +# } + +# return @ddl; +# } + +# sub create_cnt_statement(){ +# my $self = shift; +# my $data = shift; +# my $fields = (); +# my @ddl = (); +# foreach my $f (keys(%{$data})){ +# if ($f =~ /^ident_/){ +# my $fx = substr($f,6); +# my $t = substr($fx,0,index($fx,"_")); +# my $c = substr($fx,length($t)+1); +# $fields->{$t}->{cond}->{$c} = $data->{$f}; +# } +# } +# foreach my $tb (keys(%{$fields})){ +# my @sqlcond = (); +# foreach my $c (keys(%{$fields->{$tb}->{cond}})){ +# my $v = $fields->{$tb}->{cond}->{$c}; +# $v =~ s/'/''/g; +# if ($v eq ''){ +# $v = 'null'; +# } else { +# $v = "'".$v."'"; +# } +# push (@sqlcond,$c."=".$v); +# } + +# push(@ddl,"SELECT count(*) as cnt from ".$tb." WHERE ".join(" AND ",@sqlcond).";"); +# } +# return @ddl; +# } + +# sub create_ddl_delete(){ +# my $self = shift; +# my $data = shift; +# my $fields = (); +# my @ddl = (); +# my @refcols = (); +# my $refdata = (); +# foreach my $f (keys(%{$data})){ +# if ($f =~ /^ident_/){ +# my ($t,$c) = $f =~ m/ident_(.+)\_(.+)/; + +# $fields->{$t}->{cond}->{$c} = $data->{$f}; +# push(@refcols,"'".$c.'_'.$t."'"); +# $refdata->{$c.'_'.$t} = $data->{$f}; +# } +# } +# foreach my $tb (keys(%{$fields})){ +# my @sqlcond = (); +# foreach my $c (keys(%{$fields->{$tb}->{cond}})){ +# my $v = $fields->{$tb}->{cond}->{$c}; +# $v =~ s/'/''/g; +# push (@sqlcond,$c."='".$v."'"); +# } +# push(@ddl,"DELETE FROM ".$tb." WHERE ".join(" AND ",@sqlcond).";"); +# } +# return @ddl; +# } + +sub textunidecode(){ + my $self = shift; + my $text = shift; + $text = lc(unidecode(decode("utf-8",$text))); + $text =~ s/^[a-z0-9]//g; + return $text; +} + +1; + diff --git a/pointeuse/server/home/dks/bin/lib/DB/SQLite.pm b/pointeuse/server/home/dks/bin/lib/DB/SQLite.pm new file mode 100644 index 00000000..b76e4b7f --- /dev/null +++ b/pointeuse/server/home/dks/bin/lib/DB/SQLite.pm @@ -0,0 +1,349 @@ +package DB::SQLite; + +use strict; +use DBI; +use File::Basename; +use DBD::SQLite; +use URI::Encode qw(uri_encode uri_decode); +use Encode; +use Data::Dumper; +use Text::Unidecode; + + +sub new { + my $class = shift; + my $p = shift; + my $self = bless {}, $class; + $self->{debug} = 1; + $self->{dbh} = DBI->connect("DBI:SQLite:dbname=".$p->{dbfile},'','',{PrintError=>1,RaiseError=>1,AutoCommit=>1}) or return "query Connection Error!".$!; + return $self; +} + +sub disconnect(){ + my $self = shift; + return $self->{dbh}->disconnect(); +} + +sub securetext(){ + my $self = shift; + my $text = shift; + $text =~ s/'/''/g; + return $text; +} + +sub value(){ + my $self = shift; + my $text = shift; + if ($text eq ""){ + return 'null'; + } + return "'".$text."'"; +} + +sub logerror(){ + my $self = shift; + my $fn = shift; + my $stat = shift; + + return (); +} + +sub newuuid(){ + my $self = shift; + my $rx = $self->query("SELECT lower(hex( randomblob(4)) || '-' || hex( randomblob(2)) || '-' || hex( randomblob(2)) || '-' || hex( randomblob(2)) || '-' || hex(randomblob(6))) as id;"); + return $rx->{id}; +} + +sub query_unenc(){ + my $self = shift; + my $stat = shift; + + my $retdata = (); + $stat = encode("utf8", $stat); + if ($self->{debug} == 1){ + print STDERR "QUERY_UNENC:\n".$stat."\n===\n"; + } + my $sth = $self->{dbh}->prepare($stat) or return $self->logerror("query_unenc",$stat); + + + $sth->execute() or return $self->logerror("query_unenc",$stat); + + my $data = $sth->fetchrow_hashref(); + foreach my $k (keys %{$data}){ + $retdata->{$k} = $data->{$k};#decode("utf-8",$data->{$k}); + } + + $sth->finish(); + + return $retdata; +} + +sub query(){ + my $self = shift; + my $stat = shift; + my $retdata = (); + $stat = encode("utf8", $stat); + if ($self->{debug} == 1){ + print STDERR "QUERY:\n".$stat."\n===\n"; + } + my $sth = $self->{dbh}->prepare($stat) or return $self->logerror("query",$stat); + + $sth->execute() or return $self->logerror("query",$stat); + + my $data = $sth->fetchrow_hashref(); + foreach my $k (keys %{$data}){ + $retdata->{$k} = decode("utf-8",$data->{$k}); + } + + $sth->finish(); + + return $retdata; +} + +sub querybykey(){ + my $self = shift; + my $key = shift; + my $stat = shift; + my $retdata =(); + if ($self->{debug} == 1){ + print STDERR "QUERYBYKEY:\n".$stat."\n===\n"; + } + my $sth = $self->{dbh}->prepare($stat) or return $self->logerror("querybykey",$stat); + $sth->execute() or return $self->logerror("querybykey",$stat); + while(my $data = $sth->fetchrow_hashref()) + { + if (exists $data->{$key}){ + foreach my $k (keys %{$data}){ + $retdata->{$data->{$key}}{$k} =decode("utf-8",$data->{$k}); + } + } + } + if (keys(%{$retdata}) == 0){ + $retdata =(); + } + $sth->finish(); + return $retdata; +} + +sub querysorted(){ + my $self = shift; + my $stat = shift; + my $retdata = (); + if ($stat !~ /sessions/){ + if ($self->{debug} == 1){ + print STDERR "QUERYSORTED:\n".$stat."\n===\n"; + } + } + my $sth = $self->{dbh}->prepare($stat) or return $self->logerror("querysorted",$stat); + $sth->execute() or return $self->logerror("querysorted",$stat); + my $count = 0; + while(my $data = $sth->fetchrow_hashref()){ + foreach my $k (keys %{$data}){ + if ($data->{$k} =~ /^{.*}$/){ + $retdata->{$count}->{$k} = JSON::PP::decode_json($data->{$k}); + } else { + $retdata->{$count}->{$k} = decode("utf-8",$data->{$k}); + } + } + $count++; + } + $sth->finish(); + return $retdata; +} + +sub exec(){ + my $self = shift; + my $stat = shift; + my $retdata; + $stat = encode("UTF-8", $stat); + if ($self->{debug} == 1){ + print STDERR "EXEC:\n".$stat."\n===\n"; + } + my $sth = $self->{dbh}->prepare($stat) or return $self->logerror("exec",$stat); + $retdata->{success} = $self->{dbh}->do($stat) or return $self->logerror("exec",$stat); + return $retdata; +} + +sub queryarray(){ + my $self = shift; + my $stat = shift; + my @retdata = (); + my $res = $self->querysorted($stat); + foreach my $r (sort {$a <=> $b} keys(%{$res})){ + push(@retdata,$res->{$r}); + } + return \@retdata; +} + + +sub create_ddl_insert(){ + my $self = shift; + my $data = shift; + my $fields = (); + my @ddl = (); + foreach my $f (keys(%{$data})){ + if (($f =~ /\_/) && ($f !~ /^ident_/) && ($f !~ /\_id$/)){ + my $t = substr($f,0,index($f,"_")); + my $c = substr($f,length($t)+1); + $fields->{$t}->{$c} = $data->{$f}; + } elsif ($f =~ /^ident_/){ + my $f2 = $f; + $f2 =~ s/^ident_//; + + my $t = substr($f2,0,index($f2,"_")); + my $c = substr($f2,length($t)+1); + if ($c ne "id"){ + $fields->{$t}->{$c} = $data->{$f}; + } + } + + } + foreach my $tb (keys(%{$fields})){ + my @sqlcol = (); + my @sqlval = (); + foreach my $c (keys(%{$fields->{$tb}})){ + my $v = $fields->{$tb}->{$c}; + $v =~ s/'/''/g; + push (@sqlcol,$c); + if ($v eq ''){ + $v = 'null'; + } else { + $v = "'".$v."'"; + } + push (@sqlval,$v); + } + push(@ddl,"INSERT INTO ".$tb." (".join(",",@sqlcol).") VALUES (".join(",",@sqlval).") returning id;"); + } + return @ddl; +} + + +sub create_ddl_update(){ + my $self = shift; + my $data = shift; + my $fields = (); + my @ddl = (); + foreach my $f (keys(%{$data})){ + if ($f =~ /^ident_/){ + my $fx = substr($f,6); + my $t = substr($fx,0,index($fx,"_")); + my $c = substr($fx,length($t)+1); + $fields->{$t}->{cond}->{$c} = $data->{$f}; + } elsif ( ($f !~ /^ident/) && ($f =~ /.+\_.+/) ){ + my $t = substr($f,0,index($f,"_")); + my $c = substr($f,length($t)+1); + $fields->{$t}->{fields}->{$c} = $data->{$f}; + } + } + foreach my $tb (keys(%{$fields})){ + my @sqlupd = (); + my @sqlcond = (); + foreach my $c (keys(%{$fields->{$tb}->{fields}})){ + + my $v = $fields->{$tb}->{fields}->{$c}; + $v =~ s/'/''/g; + + if ($c =~ /-/){ + my @jp = split('-',$c); + if ($v eq ''){ + $v = 'null'; + } else { + $v = '"'.$v.'"'; + } + $c = 'jsonb_set(to_jsonb('.$jp[0].'),\'{"'.$jp[1].'"}\',\''.$v.'\')::json'; + push (@sqlupd,$jp[0]."=".$c); + }else { + if ($v eq ''){ + $v = 'null'; + } else { + $v = "'".$v."'"; + } + push (@sqlupd,$c."=".$v); + } + + } + foreach my $c (keys(%{$fields->{$tb}->{cond}})){ + my $v = $fields->{$tb}->{cond}->{$c}; + $v =~ s/'/''/g; + if ($v eq ''){ + $v = 'null'; + } else { + $v = "'".$v."'"; + } + push (@sqlcond,$c."=".$v); + } + push(@ddl,"UPDATE ".$tb." SET ".join(",",@sqlupd)." WHERE ".join(" AND ",@sqlcond).";"); + } + + return @ddl; +} + +sub create_cnt_statement(){ + my $self = shift; + my $data = shift; + my $fields = (); + my @ddl = (); + foreach my $f (keys(%{$data})){ + if ($f =~ /^ident_/){ + my $fx = substr($f,6); + my $t = substr($fx,0,index($fx,"_")); + my $c = substr($fx,length($t)+1); + $fields->{$t}->{cond}->{$c} = $data->{$f}; + } + } + foreach my $tb (keys(%{$fields})){ + my @sqlcond = (); + foreach my $c (keys(%{$fields->{$tb}->{cond}})){ + my $v = $fields->{$tb}->{cond}->{$c}; + $v =~ s/'/''/g; + if ($v eq ''){ + $v = 'null'; + } else { + $v = "'".$v."'"; + } + push (@sqlcond,$c."=".$v); + } + + push(@ddl,"SELECT count(*) as cnt from ".$tb." WHERE ".join(" AND ",@sqlcond).";"); + } + return @ddl; +} + +sub create_ddl_delete(){ + my $self = shift; + my $data = shift; + my $fields = (); + my @ddl = (); + my @refcols = (); + my $refdata = (); + foreach my $f (keys(%{$data})){ + if ($f =~ /^ident_/){ + my ($t,$c) = $f =~ m/ident_(.+)\_(.+)/; + + $fields->{$t}->{cond}->{$c} = $data->{$f}; + push(@refcols,"'".$c.'_'.$t."'"); + $refdata->{$c.'_'.$t} = $data->{$f}; + } + } + foreach my $tb (keys(%{$fields})){ + my @sqlcond = (); + foreach my $c (keys(%{$fields->{$tb}->{cond}})){ + my $v = $fields->{$tb}->{cond}->{$c}; + $v =~ s/'/''/g; + push (@sqlcond,$c."='".$v."'"); + } + push(@ddl,"DELETE FROM ".$tb." WHERE ".join(" AND ",@sqlcond).";"); + } + return @ddl; +} + +sub textunidecode(){ + my $self = shift; + my $text = shift; + $text = lc(unidecode(decode("utf-8",$text))); + $text =~ s/^[a-z0-9]//g; + return $text; +} + +1; + diff --git a/pointeuse/server/home/dks/bin/lib/SSH.pm b/pointeuse/server/home/dks/bin/lib/SSH.pm new file mode 100644 index 00000000..ce20cf88 --- /dev/null +++ b/pointeuse/server/home/dks/bin/lib/SSH.pm @@ -0,0 +1,61 @@ +package SSH; + +use strict; +use Net::OpenSSH; +use Data::Dumper; +sub new { + my $class = shift; + my $p = shift; + my $self = bless {}, $class; + $self->{opts} = $p->{opts}; + $self->{host} = $p->{host}; + return $self; +} + +sub execremote(){ + my $self = shift; + my $cmd = shift; + print $cmd."\n"; + #my $stx = 0; + my $ssh = Net::OpenSSH->new($self->{host},%{$self->{opts}}); + if ($ssh->error){ + print "Couldn't establish SSH connection: ". $ssh->error; + return 1; + } + my $stx =$ssh->system($cmd); + #returns true (1) on success + if ($stx == 1){ + $stx = 0; + } + if ($ssh->error){ + print "remote cmd failed!". $ssh->error; + return 1; + } + return $stx; +} + +sub piperemote(){ + my $self = shift; + my $cmd = shift; + $cmd =~ s/"/\\\"/g; + my $sshcmd = 'ssh -o ConnectTimeout=10 -p '.$self->{opts}->{port}.' '.$self->{opts}->{user}.'@'.$self->{host}.' "'.$cmd.'"'; + #print $sshcmd."\n--\n"; + #print "\n---\n".$sshcmd."\n---\n"; + my $out = `$sshcmd`; +# print "pipe cmd:".$cmd." - to:".$self->{host}."-".Dumper($self->{opts})."\n"; +# my $ssh = Net::OpenSSH->new($self->{host},%{$self->{opts}}); +# if ($ssh->error){ +# print "Couldn't establish SSH connection: ". $ssh->error; +# return 1; +# } +# #print $cmd."\n"; +# my $out = $ssh->capture($cmd); +# if ($ssh->error){ +# print "remote cmd failed!". $ssh->error; +# return $out; +# } + #print $out; + return $out; +} + +1; diff --git a/pointeuse/server/home/dks/bin/sync_pot_to_timetracker.pl b/pointeuse/server/home/dks/bin/sync_pot_to_timetracker.pl new file mode 100644 index 00000000..5f9ab354 --- /dev/null +++ b/pointeuse/server/home/dks/bin/sync_pot_to_timetracker.pl @@ -0,0 +1,120 @@ +#!/usr/bin/env perl +use strict; +use Getopt::Long; +use Data::Dumper; +use File::Basename; +use FindBin qw($RealBin); +use JSON::PP; +use lib (dirname($RealBin).'/lib'); +use DB::PgSQL; +use ConfigFile; +use SSH; +use POSIX qw/strftime/; +# check if running +#print "PID:".$$."\n"; +my $cmd = 'ps ax | grep '.basename($0).' | grep -v "grep" | awk \'{ print $1 }\''; +my $cfgpath = dirname($RealBin).'/conf'; +my $logpath = dirname($RealBin).'/log'; +my $cfgdata = ConfigFile->new({logfile => $logpath.'/'.strftime('%Y-%m-%d',localtime()).'.log'}); +#print $cmd."\n"; +my $isrunning = `$cmd`; +chomp($isrunning); +#print "Result:".$isrunning."\n"; +if ($isrunning ne "$$"){ + $cfgdata->writelog("script","params","start","script already running on PID:$$!"); + print basename($0)." already runs!\n"; + exit(1); +} + + + +my $timetracker = ""; +my $system = ""; +GetOptions( "timetracker|t=s" => \$timetracker); +print "start htx(down) sync pot to timetracker $timetracker\n"; + +if (($timetracker eq "") || (! -e $cfgpath.'/'.$timetracker.'.conf')){ + $cfgdata->writelog("script","params","start","no timetracker in params!"); + print "no timetracker!\n"; + exit(2); +} +my $ttcfgfile = dirname($RealBin).'/conf/'.$timetracker.'.conf'; +my $ttcfg = $cfgdata->read_conf($ttcfgfile); +#print Dumper($ttcfg); +if (exists($ttcfg->{syncdb}) && exists($ttcfg->{syncschema}) && ($ttcfg->{syncdb} ne "") && ($ttcfg->{syncschema} ne "") && -f $cfgpath.'/'.$ttcfg->{syncdb}.'.conf'){ + my $ttssh = SSH->new({host => $ttcfg->{sshhost},opts => {user => $ttcfg->{sshuser}, password => $ttcfg->{sshpwd}, port => $ttcfg->{sshport}, strict_mode => 0}}); + my $syscfgfile = dirname($RealBin).'/conf/'.$ttcfg->{syncdb}.'.conf'; + my $syscfg = $cfgdata->read_conf($syscfgfile); + #print Dumper($syscfg); + my $sysdb = DB::PgSQL->new({dbname => $syscfg->{dbname},dbhost => $syscfg->{dbhost},dbuser=>$syscfg->{dbuser}, dbpasswd => $syscfg->{dbpasswd}}); + my $newts = $sysdb->query("select to_char(now(),'YYYY-MM-DD HH24:MI:SS') as newts;"); + my $staffsql = "select id,prename,surname,istimetrackenabled,isdeleted from ".$ttcfg->{syncschema}.".staff"; + if (exists($ttcfg->{lastsyncdown}) && ($ttcfg->{lastsyncdown} =~ /\d\d\d\d-\d\d-\d\d \d\d:\d\d:\d\d/)){ + my $tmpsyncdate = substr($ttcfg->{lastsyncdown},0,16); + $staffsql .= " where modified > to_timestamp('".$tmpsyncdate."','YYYY-MM-DD HH24:MI')"; + } + $staffsql .= ";"; + my $st = $sysdb->querysorted($staffsql); + foreach my $s (keys(%{$st})){ + my $ttsql = "REPLACE INTO staff (id,prename,surname,isdisabled,isdeleted) VALUES (".$sysdb->value($st->{$s}->{id}).",".$sysdb->value($st->{$s}->{prename}).",".$sysdb->value($st->{$s}->{surname}).",".(($st->{$s}->{istimetrackenabled} eq "1")?'null':"'1'").",".$sysdb->value($st->{$s}->{isdeleted}).");"; + + my $cmd = 'sqlite3 "'.$ttcfg->{datapath}.'/'.$ttcfg->{dbfile}.'" "'.$ttsql.'"'; + $cfgdata->writelog("ssh","syncdown","sql",$cmd); + #print $cmd."\n"; + my $out = $ttssh->piperemote($cmd); + if ($out eq ""){ + print $ttcfg->{sshhost}." noting to update or Connection timed out!\n"; + exit(3); + } + } + #print "New TS: ".$newts->{newts}."\n"; + my $replts = "sed -i 's/^lastsyncdown=.*/lastsyncdown=".$newts->{newts}."/' ".$ttcfgfile; + my $out = `$replts`; + if ($out ne ""){ + $cfgdata->writelog("config","sed","errror","error writing timetamp to config ".$timetracker.".conf!".$out); + } + #print "newcfg\n"; + #print $out."\n"; +} else { + $cfgdata->writelog("script","params","start","no System DB or schema found!"); + print "no System DB or schema found!\n"; + exit(2); +} +# if (($system eq "") || (! -e $cfgpath.'/'.$system.'.conf')){ +# $cfgdata->writelog("script","params","start","no system in params!"); +# print "no system\n"; +# exit(3); +# } + +#$sysdb-> +#if (! -e $cfg->{datapath}.'/'.$cfg->{dbfile}){ +# print "no database ".$cfg->{datapath}.'/'.$cfg->{dbfile}." found!\n"; +# exit(1); +#} + +#my $jdata = &readdatafile(); +#my $db = DB::SQLite->new({dbfile => $cfg->{datapath}.'/'.$cfg->{dbfile}}); +#my @k = keys(%{$jdata->{result}}); +#foreach my $fn (keys(%{$jdata->{result}})){ +# foreach my $j (keys(%{$jdata->{$fn}->{data}})){ +# my $data = $jdata->{result}->{$fn}->{$j}; + #print Dumper($user); +# if ($fn eq "getusers"){ +# my $sql = "REPLACE INTO staff (id,prename,surname,isdisabled,isdeleted) VALUES (".$db->value($data->{id}).",".$db->value($data->{prename}).",".$db->value($data->{surname}).",".(($data->{istimetrackenabled} eq "1")?'null':"'1'").",".$db->value($data->{isdeleted}).");"; +# print $sql."\n"; +# $db->exec($sql); +# } elsif ($fn eq "getpotdata"){ +# my $sql = "REPLACE INTO staffworktimes (id,id_staff,starttime1,endtime1,starttime2,endtime2) VALUES (".$db->value($data->{id}).",".$db->value($data->{id_staff}).",".$db->value($data->{timestart1}).",".$db->value($data->{timeend1}).",".$db->value($data->{timestart2}).",".$db->value($data->{timeend2}).");"; +# print $sql."\n"; +# $db->exec($sql); +# } + +# } +#} + +#unlink($datafile); + + + + + diff --git a/pointeuse/server/home/dks/bin/sync_timetracker_to_pot.pl b/pointeuse/server/home/dks/bin/sync_timetracker_to_pot.pl new file mode 100644 index 00000000..5401bb63 --- /dev/null +++ b/pointeuse/server/home/dks/bin/sync_timetracker_to_pot.pl @@ -0,0 +1,131 @@ +#!/usr/bin/env perl +use strict; +use Getopt::Long; +use Data::Dumper; +use File::Basename; +use FindBin qw($RealBin); +use JSON::PP; +use lib (dirname($RealBin).'/lib'); +use DB::PgSQL; +use ConfigFile; +use SSH; +use POSIX qw/strftime/; +# check if running +#print "PID:".$$."\n"; +my $cmd = 'ps ax | grep '.basename($0).' | grep -v "grep" | awk \'{ print $1 }\''; +my $cfgpath = dirname($RealBin).'/conf'; +my $logpath = dirname($RealBin).'/log'; +my $cfgdata = ConfigFile->new({logfile => $logpath.'/'.strftime('%Y-%m-%d',localtime()).'.log'}); +#print $cmd."\n"; +my $isrunning = `$cmd`; +chomp($isrunning); +#print "Result:".$isrunning."\n"; +if ($isrunning ne "$$"){ + $cfgdata->writelog("script","params","start","script already running on PID:$$!"); + print basename($0)." already runs!\n"; + exit(1); +} + + + +my $timetracker = ""; +my $system = ""; +GetOptions( "timetracker|t=s" => \$timetracker); +print "start htx(up) sync timetracker $timetracker to pot\n"; + +if (($timetracker eq "") || (! -e $cfgpath.'/'.$timetracker.'.conf')){ + $cfgdata->writelog("script","params","start","no timetracker in params!"); + print "no timetracker!\n"; + exit(2); +} +my $ttcfgfile = dirname($RealBin).'/conf/'.$timetracker.'.conf'; +my $ttcfg = $cfgdata->read_conf($ttcfgfile); +#print Dumper($ttcfg); +if (exists($ttcfg->{syncdb}) && exists($ttcfg->{syncschema}) && ($ttcfg->{syncdb} ne "") && ($ttcfg->{syncschema} ne "") && -f $cfgpath.'/'.$ttcfg->{syncdb}.'.conf'){ + my $ttssh = SSH->new({host => $ttcfg->{sshhost},opts => {user => $ttcfg->{sshuser}, password => $ttcfg->{sshpwd}, port => $ttcfg->{sshport}, strict_mode => 0}}); + my $syscfgfile = dirname($RealBin).'/conf/'.$ttcfg->{syncdb}.'.conf'; + my $syscfg = $cfgdata->read_conf($syscfgfile); + #print Dumper($syscfg); + my $sysdb = DB::PgSQL->new({dbname => $syscfg->{dbname},dbhost => $syscfg->{dbhost},dbuser=>$syscfg->{dbuser}, dbpasswd => $syscfg->{dbpasswd}}); + my $newts = $sysdb->query("select to_char(now(),'YYYY-MM-DD HH24:MI:SS') as newts;"); + my $ttsql = "select id,id_staff,stamp_in,stamp_out from timetracks "; + if (exists($ttcfg->{lastsyncup}) && ($ttcfg->{lastsyncup} =~ /\d\d\d\d-\d\d-\d\d \d\d:\d\d:\d\d/)){ + $ttsql .= " where stamp_in >= '".$ttcfg->{lastsyncup}."' or stamp_out >= '".$ttcfg->{lastsyncup}."'"; + } + $ttsql .= ";"; + my $cmd = 'sqlite3 "'.$ttcfg->{datapath}.'/'.$ttcfg->{dbfile}.'" "'.$ttsql.'"'; + + $cfgdata->writelog("ssh","syncup","sqlite",$cmd); + my $out = $ttssh->piperemote($cmd); + #print "->$out<-\n"; + if ($out eq ""){ + print $ttcfg->{sshhost}.": nothing to update or Connection Time Out!\n"; + exit(3); + } + #print $out; + my @ttdata = split("\n",$out); + #print Dumper(@ttdata); + foreach my $tt (@ttdata){ + #print $tt."\n"; + chomp($tt); + my @cols = split(/\|/,$tt); + #print Dumper(@cols); + my $sysrowsql = "INSERT INTO ".$ttcfg->{syncschema}.".timetracker (id,id_staff,daydate,stamp_in) VALUES ('".$cols[0]."','".$cols[1]."',date('".substr($cols[2],0,10)."'),'".$cols[2]."') on conflict on constraint timetracker_pkey do nothing;"; + if ($cols[3] ne ""){ + $sysrowsql .= "UPDATE ".$ttcfg->{syncschema}.".timetracker set stamp_out='".$cols[3]."' where stamp_out is null and id='".$cols[0]."';"; + } + #print $sysrowsql."\n--\n"; + $cfgdata->writelog("pot","syncup","sql",$sysrowsql); + my $st = $sysdb->exec($sysrowsql); + } + print "New TS: ".$newts->{newts}."\n"; + # + my $replts = "sed -i 's/^lastsyncup=.*/lastsyncup=".$newts->{newts}."/' ".$ttcfgfile; + $out = `$replts`; + if ($out ne ""){ + $cfgdata->writelog("config","sed","errror","error writing timetamp to config ".$timetracker.".conf!".$out); + } + +} else { + $cfgdata->writelog("script","params","start","no System DB or schema found!"); + print "no System DB or schema found!\n"; + exit(2); +} +# if (($system eq "") || (! -e $cfgpath.'/'.$system.'.conf')){ +# $cfgdata->writelog("script","params","start","no system in params!"); +# print "no system\n"; +# exit(3); +# } + +#$sysdb-> +#if (! -e $cfg->{datapath}.'/'.$cfg->{dbfile}){ +# print "no database ".$cfg->{datapath}.'/'.$cfg->{dbfile}." found!\n"; +# exit(1); +#} + +#my $jdata = &readdatafile(); +#my $db = DB::SQLite->new({dbfile => $cfg->{datapath}.'/'.$cfg->{dbfile}}); +#my @k = keys(%{$jdata->{result}}); +#foreach my $fn (keys(%{$jdata->{result}})){ +# foreach my $j (keys(%{$jdata->{$fn}->{data}})){ +# my $data = $jdata->{result}->{$fn}->{$j}; + #print Dumper($user); +# if ($fn eq "getusers"){ +# my $sql = "REPLACE INTO staff (id,prename,surname,isdisabled,isdeleted) VALUES (".$db->value($data->{id}).",".$db->value($data->{prename}).",".$db->value($data->{surname}).",".(($data->{istimetrackenabled} eq "1")?'null':"'1'").",".$db->value($data->{isdeleted}).");"; +# print $sql."\n"; +# $db->exec($sql); +# } elsif ($fn eq "getpotdata"){ +# my $sql = "REPLACE INTO staffworktimes (id,id_staff,starttime1,endtime1,starttime2,endtime2) VALUES (".$db->value($data->{id}).",".$db->value($data->{id_staff}).",".$db->value($data->{timestart1}).",".$db->value($data->{timeend1}).",".$db->value($data->{timestart2}).",".$db->value($data->{timeend2}).");"; +# print $sql."\n"; +# $db->exec($sql); +# } + +# } +#} + +#unlink($datafile); + + + + + diff --git a/pointeuse/server/home/dks/bin/syncpot_alicehartmann.sh b/pointeuse/server/home/dks/bin/syncpot_alicehartmann.sh new file mode 100644 index 00000000..8de03705 --- /dev/null +++ b/pointeuse/server/home/dks/bin/syncpot_alicehartmann.sh @@ -0,0 +1,9 @@ +#!/bin/bash +PERLBINARY="/home/posdab/perl5/perlbrew/perls/perl-5.28.2/bin/perl" +${PERLBINARY} /home/posdab/pot/bin/htx_syncup.pl -t dhartmann01 +${PERLBINARY} /home/posdab/pot/bin/htx_syncdown.pl -t dhartmann01 +${PERLBINARY} /home/posdab/pot/bin/htx_syncup.pl -t dhartmann02 +${PERLBINARY} /home/posdab/pot/bin/htx_syncdown.pl -t dhartmann02 +${PERLBINARY} /home/posdab/pot/bin/htx_syncup.pl -t dhartmann03 +${PERLBINARY} /home/posdab/pot/bin/htx_syncdown.pl -t dhartmann03 + diff --git a/pointeuse/server/home/dks/bin/syncpot_elch.sh b/pointeuse/server/home/dks/bin/syncpot_elch.sh new file mode 100644 index 00000000..e476f700 --- /dev/null +++ b/pointeuse/server/home/dks/bin/syncpot_elch.sh @@ -0,0 +1,5 @@ +#!/bin/bash +PERLBINARY="/home/posdab/perl5/perlbrew/perls/perl-5.28.2/bin/perl" +${PERLBINARY} /home/posdab/pot/bin/htx_syncup.pl -t elch +${PERLBINARY} /home/posdab/pot/bin/htx_syncdown.pl -t elch + diff --git a/pointeuse/server/home/dks/bin/syncpot_ldiner.sh b/pointeuse/server/home/dks/bin/syncpot_ldiner.sh new file mode 100644 index 00000000..9d255a72 --- /dev/null +++ b/pointeuse/server/home/dks/bin/syncpot_ldiner.sh @@ -0,0 +1,5 @@ +#!/bin/bash +PERLBINARY="/home/posdab/perl5/perlbrew/perls/perl-5.28.2/bin/perl" +${PERLBINARY} /home/posdab/pot/bin/htx_syncup.pl -t lousdiner +${PERLBINARY} /home/posdab/pot/bin/htx_syncdown.pl -t lousdiner + diff --git a/pointeuse/server/home/dks/bin/testsync.sh b/pointeuse/server/home/dks/bin/testsync.sh new file mode 100644 index 00000000..bbd61d4a --- /dev/null +++ b/pointeuse/server/home/dks/bin/testsync.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +curl -H "Content-type: application/json" --user "kilian:fb1ia1ka" \ +-X POST --data '{"fn":"queryarray","cl":"data","sql":"select * from alicehartmann.staff"}' https://htx.plandutravail.lu/htx/api.php \ No newline at end of file diff --git a/pointeuse/server/home/dks/conf/dhartmann01.conf b/pointeuse/server/home/dks/conf/dhartmann01.conf new file mode 100644 index 00000000..f8035bef --- /dev/null +++ b/pointeuse/server/home/dks/conf/dhartmann01.conf @@ -0,0 +1,11 @@ +datapath=/home/pot/.hourtrax +dbfile=hourtrax.sqlite +sshuser=pot +sshpwd=sai4seip +sshhost=172.16.10.170 +sshport=3587 +syncschema=alicehartmann +syncdb=pot +lastsyncup=2021-01-22 08:57:44 +lastsyncdown=2021-02-03 14:45:11 + diff --git a/pointeuse/server/home/dks/conf/dhartmann02.conf b/pointeuse/server/home/dks/conf/dhartmann02.conf new file mode 100644 index 00000000..7dd71e92 --- /dev/null +++ b/pointeuse/server/home/dks/conf/dhartmann02.conf @@ -0,0 +1,11 @@ +datapath=/home/pot/.hourtrax +dbfile=hourtrax.sqlite +sshuser=pot +sshpwd=sai4seip +sshhost=172.16.10.174 +sshport=3587 +syncschema=alicehartmann +syncdb=pot +lastsyncup=2021-04-07 07:15:21 +lastsyncdown=2021-02-03 14:45:12 + diff --git a/pointeuse/server/home/dks/conf/dhartmann03.conf b/pointeuse/server/home/dks/conf/dhartmann03.conf new file mode 100644 index 00000000..f5ff6a13 --- /dev/null +++ b/pointeuse/server/home/dks/conf/dhartmann03.conf @@ -0,0 +1,11 @@ +datapath=/home/pot/.hourtrax +dbfile=hourtrax.sqlite +sshuser=pot +sshpwd=sai4seip +sshhost=172.16.10.178 +sshport=3587 +syncschema=alicehartmann +syncdb=pot +lastsyncup=2021-01-22 08:50:50 +lastsyncdown=2021-02-03 14:45:23 + diff --git a/pointeuse/server/home/dks/conf/elch.conf b/pointeuse/server/home/dks/conf/elch.conf new file mode 100644 index 00000000..d145e30e --- /dev/null +++ b/pointeuse/server/home/dks/conf/elch.conf @@ -0,0 +1,17 @@ +datapath=/home/dks/.hourtrax +dbfile=hourtrax.sqlite +#mode=deployment +#mode=development +sshuser=dks +sshpwd=sai4seip +sshhost=172.16.10.154 +#synctype=ssh +sshport=3587 +syncschema=elch +syncdb=pot +#dbuser=potlu2_user +#dbpasswd=dMY8xGB6cBLzrDGE +#dbhost=sql12.your-server.de +#dbname=potlu2_db +lastsyncup=2021-01-22 08:05:01 +lastsyncdown=2021-01-27 20:05:02 diff --git a/pointeuse/server/home/dks/conf/lousdiner.conf b/pointeuse/server/home/dks/conf/lousdiner.conf new file mode 100644 index 00000000..01831298 --- /dev/null +++ b/pointeuse/server/home/dks/conf/lousdiner.conf @@ -0,0 +1,12 @@ +datapath=/home/pot/.hourtrax +dbfile=hourtrax.sqlite +sshuser=pot +sshpwd=sai4seip +sshhost=172.16.10.182 +sshport=3587 +syncschema=lousdiner +syncdb=pot +lastsyncup=2021-02-08 11:00:26 +lastsyncdown= + + diff --git a/pointeuse/server/home/dks/conf/pot.conf b/pointeuse/server/home/dks/conf/pot.conf new file mode 100644 index 00000000..bcdddcd2 --- /dev/null +++ b/pointeuse/server/home/dks/conf/pot.conf @@ -0,0 +1,5 @@ +mode=development +dbuser=potlu2_user +dbpasswd=dMY8xGB6cBLzrDGE +dbhost=sql12.your-server.de +dbname=potlu2_db diff --git a/pointeuse/server/home/dks/public_html/.htaccess b/pointeuse/server/home/dks/public_html/.htaccess new file mode 100644 index 00000000..70100976 --- /dev/null +++ b/pointeuse/server/home/dks/public_html/.htaccess @@ -0,0 +1,8 @@ +#RewriteEngine on +DirectoryIndex index.html index.php +#AddHandler cgi-script .cgi +#AuthType Basic +#AuthName "Restricted" +#AuthUserFile /home/dks/public_html/.htpasswd +#Require valid-user +# diff --git a/pointeuse/server/home/dks/public_html/.htpasswd b/pointeuse/server/home/dks/public_html/.htpasswd new file mode 100644 index 00000000..deead716 --- /dev/null +++ b/pointeuse/server/home/dks/public_html/.htpasswd @@ -0,0 +1,2 @@ +kilian:$apr1$ap8gpaKM$pfrcK1QINojzNYqocelTy. +htx:$apr1$knL66PWn$qiwrkdbOzs3I86ZNLJjS5/ diff --git a/pointeuse/server/home/dks/public_html/htx/.htaccess b/pointeuse/server/home/dks/public_html/htx/.htaccess new file mode 100644 index 00000000..87ad1088 --- /dev/null +++ b/pointeuse/server/home/dks/public_html/htx/.htaccess @@ -0,0 +1,5 @@ +AuthType Basic +AuthName "Restricted" +AuthUserFile /home/dks/public_html/.htpasswd +Require valid-user + diff --git a/pointeuse/server/home/dks/public_html/htx/api.php b/pointeuse/server/home/dks/public_html/htx/api.php new file mode 100644 index 00000000..f79a4a1f --- /dev/null +++ b/pointeuse/server/home/dks/public_html/htx/api.php @@ -0,0 +1,72 @@ + $value) + { + if ((is_file("lib/".$value) && strpos($value,'.') !== 0) && substr_compare($value, ".php", -strlen(".php")) === 0){ + require("lib/".$value); + } + } + $moduleclasses = scandir("lib/modules"); + foreach ($moduleclasses as $key => $value) + { + if ((is_file("lib/modules/".$value) && strpos($value,'.') !== 0) && substr_compare($value, ".php", -strlen(".php")) === 0){ + //error_log($value); + require("lib/modules/".$value); + } + } + + $db = new database($cfg["db"]); + // $sess = new session($db); + $vars = array(); + $html = array(); + // if (isset($_COOKIE[$cfg["cookie"]])){ + // $vars["sid"] = $_COOKIE[$cfg["cookie"]]; + // } + // if (isset($vars["sid"]) && ($vars["sid"] != "")){ + // $vars["session"] = $sess->getSession($vars["sid"]); + // } else { + // error_log("No Session!"); + // } + $params = array(); + // $html["session"] = $vars["session"]; + //error_log(print_r($vars,true)); + $params = json_decode(file_get_contents('php://input'), true); + //$params =$_GET; + //$html["params"] = $params; + //$html["cfg"] = $cfg; + file_put_contents("data/params.log",date('Y-m-d H:i:s').":".print_r($params,true)."\n",FILE_APPEND); + if (isset($params["cl"]) && isset($params["fn"]) && $params["cl"] != "database"){ + if (class_exists($params["cl"])) { + $strclass=$params["cl"]; + $cl = new $strclass($db,$cfg); + if (!method_exists($cl,$params["fn"])){ + $html["error"] = "class ".$params["cl"]."->method ".$params["fn"]." does not exist!"; + } + $r = new ReflectionMethod($strclass, $params["fn"]); + $metparams = $r->getParameters(); + $fnp = array(); + $prcnt = 0; + foreach ($metparams as $p) { + if (isset($params[$p->getName()])){ + array_push($fnp,$params[$p->getName()]); + } + if ($p->isOptional() === false){ + $prcnt++; + } + $html["fnparams"][$p->getName()] = (($p->isOptional() === true)?"optional":"required"); + } + if (count($fnp) < $prcnt){ + $html["error"] = "Function has ".$prcnt." required parameters!"; + } else { + $html["data"] = call_user_func_array(array($cl, $params["fn"]), $fnp); + } + } else { + $html["error"] = "class ".$params["cl"]." does not exist!"; + } + } + header('Content-Type: application/json'); + echo json_encode($html); + +?> diff --git a/pointeuse/server/home/dks/public_html/htx/cmds.log b/pointeuse/server/home/dks/public_html/htx/cmds.log new file mode 100644 index 00000000..6a67a8ca --- /dev/null +++ b/pointeuse/server/home/dks/public_html/htx/cmds.log @@ -0,0 +1,195 @@ +dhart-pot02;bin/clearfingerprint.sh c606a41a-613b-7e1d-64a4-13375a44e85fdhart-pot03;bin/clearfingerprint.sh c606a41a-613b-7e1d-64a4-13375a44e85fdhart-pot02;bin/clearfingerprint.sh c606a41a-613b-7e1d-64a4-13375a44e85fdhart-pot03;bin/clearfingerprint.sh c606a41a-613b-7e1d-64a4-13375a44e85fdhart-pot02;bin/clearfingerprint.sh 6f8036b4-338f-a581-2256-4e8c59646836dhart-pot03;bin/clearfingerprint.sh 6f8036b4-338f-a581-2256-4e8c59646836dhart-pot02;bin/setstaff.sh 'id=;staffnumber=;prename=;surname=;isenabled=;pin=;fixtime=;lang=;restriction=;timetrackers=;'dhart-pot03;bin/setstaff.sh 'id=;staffnumber=;prename=;surname=;isenabled=;pin=;fixtime=;lang=;restriction=;timetrackers=;'dhart-pot02;bin/setstaff.sh 'id=;staffnumber=;prename=;surname=;isenabled=;pin=;fixtime=;lang=;restriction=;timetrackers=;' +dhart-pot03;bin/setstaff.sh 'id=;staffnumber=;prename=;surname=;isenabled=;pin=;fixtime=;lang=;restriction=;timetrackers=;' +dhart-pot02;bin/setstaff.sh 'id=;staffnumber=;prename=;surname=;isenabled=;pin=;fixtime=;lang=;restriction=;timetrackers=;' +dhart-pot03;bin/setstaff.sh 'id=;staffnumber=;prename=;surname=;isenabled=;pin=;fixtime=;lang=;restriction=;timetrackers=;' +dhart-pot02;bin/setstaff.sh 'id=c606a41a-613b-7e1d-64a4-13375a44e85f;staffnumber=;prename=Alpar-Bela;surname=Fabian;isenabled=;pin=1234;fixtime=;lang=de;restriction=;' +dhart-pot03;bin/setstaff.sh 'id=c606a41a-613b-7e1d-64a4-13375a44e85f;staffnumber=;prename=Alpar-Bela;surname=Fabian;isenabled=;pin=1234;fixtime=;lang=de;restriction=;' +dhart-pot02;bin/setstaff.sh 'id=c606a41a-613b-7e1d-64a4-13375a44e85f;staffnumber=;prename=Alpar-Bela;surname=Fabian;isenabled=1;pin=1234;fixtime=;lang=de;restriction=;' +dhart-pot03;bin/setstaff.sh 'id=c606a41a-613b-7e1d-64a4-13375a44e85f;staffnumber=;prename=Alpar-Bela;surname=Fabian;isenabled=1;pin=1234;fixtime=;lang=de;restriction=;' +dhart-pot02;bin/clearfingerprint.sh c606a41a-613b-7e1d-64a4-13375a44e85f +dhart-pot03;bin/clearfingerprint.sh c606a41a-613b-7e1d-64a4-13375a44e85f +2021-04-20 07:48:56;dhart-hourtrax01;ls +2021-04-20 08:00:49;dhart-hourtrax01;ls +2021-04-20 08:02:45;dhart-hourtrax01;bin/setstaff.sh 'id=cc63023b-4892-c29c-787d-088392d58b88;staffnumber=;prename=Catia;surname=;isenabled=1;pin=1234;fixtime=;lang=de;restriction=;' +2021-04-20 08:03:58;dhart-hourtrax01;bin/setstaff.sh 'id=cc63023b-4892-c29c-787d-088392d58b88;staffnumber=;prename=Catia;surname=;isenabled=1;pin=1234;fixtime=;lang=de;restriction=;' +2021-04-25 18:38:56;dhart-hourtrax01;bin/setstaff.sh 'id=cc63023b-4892-c29c-787d-088392d58b88;staffnumber=;prename=Catia;surname=;isenabled=1;pin=1234;fixtime=;lang=de;restriction=;monstart=12:00:00;monend=14:00:00;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=10:00:00;sunend=16:00:00;' +2021-04-25 18:45:55;dhart-hourtrax01;bin/setstaff.sh 'id=cc63023b-4892-c29c-787d-088392d58b88;staffnumber=;prename=Catia;surname=;isenabled=1;pin=1234;fixtime=;lang=de;restriction=;monstart=12:00:00;monend=14:00:00;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=10:00:00;sunend=16:00:00;' +2021-04-25 18:48:26;dhart-hourtrax01;bin/setstaff.sh 'id=cc63023b-4892-c29c-787d-088392d58b88;staffnumber=;prename=Catia;surname=;isenabled=1;pin=1234;fixtime=;lang=de;restriction=;monstart=12:00:00;monend=14:00:00;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=10:00:00;sunend=16:00:00;' +2021-04-25 18:53:42;dhart-hourtrax01;bin/setstaff.sh 'id=cc63023b-4892-c29c-787d-088392d58b88;staffnumber=;prename=Catia;surname=;isenabled=1;pin=1234;fixtime=;lang=de;restriction=;monstart=12:00;monend=14:00;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=10:00;sunend=16:00;' +2021-04-26 14:21:36;dhart-pot01;bin/setstaff.sh 'id=f58b0cce-2466-1b6c-befc-033cc2d0422a;staffnumber=01;prename=Markus;surname=Pusch;isenabled=1;pin=1234;fixtime=;lang=de;restriction=;monstart=08:00;monend=;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=;sunend=;' +2021-04-26 14:21:37;dhart-pot02;bin/setstaff.sh 'id=f58b0cce-2466-1b6c-befc-033cc2d0422a;staffnumber=01;prename=Markus;surname=Pusch;isenabled=1;pin=1234;fixtime=;lang=de;restriction=;monstart=08:00;monend=;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=;sunend=;' +2021-04-26 14:21:39;dhart-pot03;bin/setstaff.sh 'id=f58b0cce-2466-1b6c-befc-033cc2d0422a;staffnumber=01;prename=Markus;surname=Pusch;isenabled=1;pin=1234;fixtime=;lang=de;restriction=;monstart=08:00;monend=;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=;sunend=;' +2021-04-26 14:23:01;dhart-pot01;bin/setstaff.sh 'id=f58b0cce-2466-1b6c-befc-033cc2d0422a;staffnumber=01;prename=Markus;surname=Pusch;isenabled=1;pin=1234;fixtime=;lang=de;restriction=;monstart=08:00;monend=17:30;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=;sunend=;' +2021-04-26 14:23:02;dhart-pot02;bin/setstaff.sh 'id=f58b0cce-2466-1b6c-befc-033cc2d0422a;staffnumber=01;prename=Markus;surname=Pusch;isenabled=1;pin=1234;fixtime=;lang=de;restriction=;monstart=08:00;monend=17:30;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=;sunend=;' +2021-04-26 14:23:04;dhart-pot03;bin/setstaff.sh 'id=f58b0cce-2466-1b6c-befc-033cc2d0422a;staffnumber=01;prename=Markus;surname=Pusch;isenabled=1;pin=1234;fixtime=;lang=de;restriction=;monstart=08:00;monend=17:30;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=;sunend=;' +2021-05-16 15:10:35;vince-pot06;bin/setstaff.sh 'id=3465d3a7-a883-624c-f677-17864861a2d5;staffnumber=;prename=Naomie Goue ;surname=Edwige Gname;isenabled=1;pin=1234;fixtime=;lang=fr;restriction=;monstart=;monend=;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=;sunend=;' +2021-05-16 15:11:41;vince-pot06;bin/setstaff.sh 'id=3465d3a7-a883-624c-f677-17864861a2d5;staffnumber=;prename=Naomie Goue ;surname=Edwige Gname;isenabled=1;pin=1234;fixtime=;lang=fr;restriction=;monstart=;monend=;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=;sunend=;' +2021-05-16 15:12:45;vince-pot06;bin/setstaff.sh 'id=e9a88e20-dc82-820e-f615-68302a180759;staffnumber=;prename=Christine-Marie;surname=DOUMB'A DOUMBE;isenabled=1;pin=1234;fixtime=;lang=fr;restriction=;monstart=;monend=;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=;sunend=;' +2021-05-16 15:13:53;vince-pot06;bin/setstaff.sh 'id=2c3ded86-8f2c-0c9b-1dc1-64412989407f;staffnumber=;prename=Thomas;surname=Marie;isenabled=1;pin=1234;fixtime=;lang=fr;restriction=;monstart=;monend=;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=;sunend=;' +2021-05-16 15:14:48;vince-pot06;bin/setstaff.sh 'id=5d020c34-f057-5b13-e47e-7ce73003e230;staffnumber=;prename=Michael;surname=Grimalt;isenabled=1;pin=1234;fixtime=;lang=fr;restriction=;monstart=;monend=;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=;sunend=;' +2021-05-16 15:18:31;vince-pot06;bin/setstaff.sh 'id=e9a88e20-dc82-820e-f615-68302a180759;staffnumber=;prename=Christine-Marie;surname=DOUMB'A DOUMBE;isenabled=1;pin=1234;fixtime=;lang=fr;restriction=;monstart=;monend=;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=;sunend=;' +2021-05-16 15:27:27;vince-pot06;bin/setstaff.sh 'id=3465d3a7-a883-624c-f677-17864861a2d5;staffnumber=;prename=Naomie Goue ;surname=Edwige Gname;isenabled=1;pin=1234;fixtime=;lang=fr;restriction=;monstart=;monend=;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=;sunend=;' +2021-05-16 15:30:36;vince-pot06;bin/setstaff.sh 'id=3465d3a7-a883-624c-f677-17864861a2d5;staffnumber=;prename=Naomie Goue ;surname=Edwige Gname;isenabled=1;pin=1234;fixtime=;lang=fr;restriction=;monstart=;monend=;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=;sunend=;' +2021-05-16 15:36:48;vince-pot06;Send CMD:bin/setstaff.sh 'id=3465d3a7-a883-624c-f677-17864861a2d5;staffnumber=;prename=Naomie Goue ;surname=Edwige Gname;isenabled=1;pin=1234;fixtime=;lang=fr;restriction=;monstart=;monend=;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=;sunend=;' +2021-05-16 15:36:48;vince-pot06;Connected +2021-05-16 15:36:48;vince-pot06;Exec Done +2021-05-16 15:38:49;vince-pot06;Send CMD:bin/setstaff.sh 'id=e9a88e20-dc82-820e-f615-68302a180759;staffnumber=;prename=Christine-Marie;surname=DOUMB A DOUMBE;isenabled=1;pin=1234;fixtime=;lang=fr;restriction=;monstart=;monend=;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=;sunend=;' +2021-05-16 15:38:50;vince-pot06;Connected +2021-05-16 15:38:50;vince-pot06;Exec Done +2021-05-16 15:43:48;vince-pot06;Send CMD:bin/setstaff.sh 'id=e9a88e20-dc82-820e-f615-68302a180759;staffnumber=;prename=Christine-Marie;surname=DOUMBA DOUMBE;isenabled=1;pin=1234;fixtime=;lang=fr;restriction=;monstart=;monend=;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=;sunend=;' +2021-05-16 15:43:48;vince-pot06;Connected +2021-05-16 15:43:49;vince-pot06;Exec Done +2021-05-17 10:11:53;dhart-pot01;Send CMD:bin/setstaff.sh 'id=213e619d-1149-69d4-de57-997a16cd3d21;staffnumber=;prename=Celia;surname=Guerreiro;isenabled=1;pin=1234;fixtime=;lang=de;restriction=;monstart=;monend=;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=;sunend=;' +2021-05-17 10:11:53;dhart-pot01;Connected +2021-05-17 10:11:54;dhart-pot01;Exec Done +2021-05-17 10:12:24;dhart-pot03;Send CMD:bin/setstaff.sh 'id=213e619d-1149-69d4-de57-997a16cd3d21;staffnumber=;prename=Celia;surname=Guerreiro;isenabled=1;pin=1234;fixtime=;lang=de;restriction=;monstart=;monend=;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=;sunend=;' +2021-05-17 10:12:25;dhart-pot03;Connected +2021-05-17 10:12:25;dhart-pot03;Exec Done +2021-05-17 10:12:55;dhart-pot02;Send CMD:bin/setstaff.sh 'id=213e619d-1149-69d4-de57-997a16cd3d21;staffnumber=;prename=Celia;surname=Guerreiro;isenabled=1;pin=1234;fixtime=;lang=de;restriction=;monstart=;monend=;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=;sunend=;' +2021-05-17 10:12:57;dhart-pot02;Connected +2021-05-17 10:12:57;dhart-pot02;Exec Done +2021-05-17 10:16:42;dhart-pot02;Send CMD:bin/setstaff.sh 'id=5c9b540e-6a25-433b-6522-9c6c4f36c9d3;staffnumber=6;prename=Csilla;surname=Gego;isenabled=1;pin=1234;fixtime=;lang=de;restriction=;monstart=;monend=;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=;sunend=;' +2021-05-17 10:16:43;dhart-pot02;Connected +2021-05-17 10:16:43;dhart-pot02;Exec Done +2021-05-17 10:21:55;dhart-pot02;Send CMD:bin/setstaff.sh 'id=35531775-6a9f-e7b9-fbbd-aa914656137b;staffnumber=5;prename=Zsolt;surname=Biro;isenabled=1;pin=1234;fixtime=;lang=de;restriction=;monstart=;monend=;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=;sunend=;' +2021-05-17 10:21:56;dhart-pot02;Connected +2021-05-17 10:21:57;dhart-pot02;Exec Done +2021-05-18 11:31:15;vince-pot06;Send CMD:bin/setstaff.sh 'id=1f2b91e5-2ac4-509c-b054-ec7f5a22e0c3;staffnumber=;prename=Valentina;surname=Lauria;isenabled=1;pin=1234;fixtime=;lang=fr;restriction=;monstart=;monend=;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=;sunend=;' +2021-05-18 11:31:15;vince-pot06;Connected +2021-05-18 11:31:15;vince-pot06;Exec Done +2021-05-18 11:40:19;vince-pot06;Send CMD:bin/setstaff.sh 'id=998f0d4b-3e14-6198-53b1-7e117944921e;staffnumber=;prename=Neza;surname=;isenabled=1;pin=1234;fixtime=;lang=fr;restriction=;monstart=;monend=;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=;sunend=;' +2021-05-18 11:40:20;vince-pot06;Connected +2021-05-18 11:40:20;vince-pot06;Exec Done +2021-05-18 11:41:04;vince-pot06;Send CMD:bin/setstaff.sh 'id=410d087c-15c7-6e72-4811-6e44f2056916;staffnumber=;prename=Christian;surname=Grimalt;isenabled=1;pin=1234;fixtime=;lang=fr;restriction=;monstart=;monend=;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=;sunend=;' +2021-05-18 11:41:04;vince-pot06;Connected +2021-05-18 11:41:05;vince-pot06;Exec Done +2021-05-18 11:41:40;vince-pot06;Send CMD:bin/setstaff.sh 'id=a924e42f-fdd7-e970-8149-fd8efe26f6e7;staffnumber=;prename=Enver;surname=Sabanovic;isenabled=1;pin=1234;fixtime=;lang=fr;restriction=;monstart=;monend=;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=;sunend=;' +2021-05-18 11:41:40;vince-pot06;Connected +2021-05-18 11:41:40;vince-pot06;Exec Done +2021-05-18 11:42:25;vince-pot06;Send CMD:bin/setstaff.sh 'id=6f107d15-f1ff-f618-970b-19197d7a95e5;staffnumber=;prename=Jorge;surname=Tovar;isenabled=1;pin=1234;fixtime=;lang=fr;restriction=;monstart=;monend=;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=;sunend=;' +2021-05-18 11:42:26;vince-pot06;Connected +2021-05-18 11:42:26;vince-pot06;Exec Done +2021-05-18 11:43:27;vince-pot06;Send CMD:bin/setstaff.sh 'id=954ae8a3-4bf8-909a-54a3-31f3c8e2af8b;staffnumber=;prename=José;surname=Maria;isenabled=1;pin=1234;fixtime=;lang=fr;restriction=;monstart=;monend=;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=;sunend=;' +2021-05-18 11:43:27;vince-pot06;Connected +2021-05-18 11:43:28;vince-pot06;Exec Done +2021-05-18 11:44:06;vince-pot06;Send CMD:bin/setstaff.sh 'id=2c3ded86-8f2c-0c9b-1dc1-64412989407f;staffnumber=;prename=Thomas;surname=Marie;isenabled=1;pin=1234;fixtime=;lang=fr;restriction=;monstart=;monend=;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=;sunend=;' +2021-05-18 11:44:06;vince-pot06;Connected +2021-05-18 11:44:06;vince-pot06;Exec Done +2021-05-18 11:44:47;vince-pot06;Send CMD:bin/setstaff.sh 'id=af7bf290-b154-0f7b-4484-05bec10ea033;staffnumber=;prename=Andrea;surname=Del Rosario;isenabled=1;pin=1234;fixtime=;lang=fr;restriction=;monstart=;monend=;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=;sunend=;' +2021-05-18 11:44:47;vince-pot06;Connected +2021-05-18 11:44:47;vince-pot06;Exec Done +2021-05-18 11:45:32;vince-pot06;Send CMD:bin/setstaff.sh 'id=7ec669d5-b348-1523-2768-2339e1f83b70;staffnumber=;prename=Anna;surname=Mesto;isenabled=1;pin=1234;fixtime=;lang=fr;restriction=;monstart=;monend=;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=;sunend=;' +2021-05-18 11:45:33;vince-pot06;Connected +2021-05-18 11:45:33;vince-pot06;Exec Done +2021-05-18 11:46:21;vince-pot06;Send CMD:bin/setstaff.sh 'id=be1bc843-b54d-92a0-814d-2b7e34b4b927;staffnumber=;prename=Vanessa;surname=Volpi;isenabled=1;pin=1234;fixtime=;lang=fr;restriction=;monstart=;monend=;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=;sunend=;' +2021-05-18 11:46:22;vince-pot06;Connected +2021-05-18 11:46:22;vince-pot06;Exec Done +2021-05-18 11:47:24;vince-pot06;Send CMD:bin/setstaff.sh 'id=5d020c34-f057-5b13-e47e-7ce73003e230;staffnumber=;prename=Michael;surname=Grimalt;isenabled=1;pin=1234;fixtime=;lang=fr;restriction=;monstart=;monend=;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=;sunend=;' +2021-05-18 11:47:24;vince-pot06;Connected +2021-05-18 11:47:25;vince-pot06;Exec Done +2021-05-18 11:48:08;vince-pot06;Send CMD:bin/setstaff.sh 'id=327be400-18a2-cdc7-898a-c8b5c3c3b0ee;staffnumber=;prename=Mattia;surname=Pascolini;isenabled=1;pin=1234;fixtime=;lang=fr;restriction=;monstart=;monend=;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=;sunend=;' +2021-05-18 11:48:08;vince-pot06;Connected +2021-05-18 11:48:09;vince-pot06;Exec Done +2021-05-18 11:48:52;vince-pot06;Send CMD:bin/setstaff.sh 'id=63d25b04-0486-d233-f145-377054ba5d11;staffnumber=;prename=Olivier;surname=Zimmermann;isenabled=1;pin=1234;fixtime=;lang=fr;restriction=;monstart=;monend=;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=;sunend=;' +2021-05-18 11:48:52;vince-pot06;Connected +2021-05-18 11:48:53;vince-pot06;Exec Done +2021-05-19 15:17:22;dhart-pot01;Send CMD:bin/setstaff.sh 'id=5c9b540e-6a25-433b-6522-9c6c4f36c9d3;staffnumber=6;prename=Csilla;surname=Gego;isenabled=1;pin=1234;fixtime=;lang=de;restriction=;monstart=;monend=;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=;sunend=;' +2021-05-19 15:17:23;dhart-pot01;Connected +2021-05-19 15:17:23;dhart-pot01;Exec Done +2021-05-19 15:17:53;dhart-pot02;Send CMD:bin/setstaff.sh 'id=5c9b540e-6a25-433b-6522-9c6c4f36c9d3;staffnumber=6;prename=Csilla;surname=Gego;isenabled=1;pin=1234;fixtime=;lang=de;restriction=;monstart=;monend=;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=;sunend=;' +2021-05-19 15:17:54;dhart-pot02;Connected +2021-05-19 15:17:54;dhart-pot02;Exec Done +2021-05-19 15:18:30;dhart-pot01;Send CMD:bin/setstaff.sh 'id=35531775-6a9f-e7b9-fbbd-aa914656137b;staffnumber=5;prename=Zsolt;surname=Biro;isenabled=1;pin=1234;fixtime=;lang=de;restriction=;monstart=;monend=;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=;sunend=;' +2021-05-19 15:18:30;dhart-pot01;Connected +2021-05-19 15:18:31;dhart-pot01;Exec Done +2021-05-19 15:19:01;dhart-pot02;Send CMD:bin/setstaff.sh 'id=35531775-6a9f-e7b9-fbbd-aa914656137b;staffnumber=5;prename=Zsolt;surname=Biro;isenabled=1;pin=1234;fixtime=;lang=de;restriction=;monstart=;monend=;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=;sunend=;' +2021-05-19 15:19:01;dhart-pot02;Connected +2021-05-19 15:19:02;dhart-pot02;Exec Done +2021-05-19 15:20:44;dhart-pot03;Send CMD:bin/setstaff.sh 'id=213e619d-1149-69d4-de57-997a16cd3d21;staffnumber=;prename=Celia;surname=Guerreiro;isenabled=1;pin=1234;fixtime=;lang=de;restriction=;monstart=;monend=;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=;sunend=;' +2021-05-19 15:20:45;dhart-pot03;Connected +2021-05-19 15:20:45;dhart-pot03;Exec Done +2021-05-20 15:04:24;dhart-pot01;Send CMD:bin/setstaff.sh 'id=a3a22aa2-8c0e-a2df-80b5-ac180161ccf5;staffnumber=02;prename=Krystian;surname=Swietlik;isenabled=1;pin=1234;fixtime=5;lang=de;restriction=;monstart=06:50;monend=15:30;tuestart=06:50;tueend=15:40;wedstart=06:50;wedend=15:40;thustart=06:50;thuend=15:40;fristart=06:50;friend=15:40;satstart=06:50;satend=15:40;sunstart=;sunend=;' +2021-05-20 15:04:25;dhart-pot01;Connected +2021-05-20 15:04:25;dhart-pot01;Exec Done +2021-05-20 15:04:55;dhart-pot02;Send CMD:bin/setstaff.sh 'id=a3a22aa2-8c0e-a2df-80b5-ac180161ccf5;staffnumber=02;prename=Krystian;surname=Swietlik;isenabled=1;pin=1234;fixtime=5;lang=de;restriction=;monstart=06:50;monend=15:30;tuestart=06:50;tueend=15:40;wedstart=06:50;wedend=15:40;thustart=06:50;thuend=15:40;fristart=06:50;friend=15:40;satstart=06:50;satend=15:40;sunstart=;sunend=;' +2021-05-20 15:04:56;dhart-pot02;Connected +2021-05-20 15:04:56;dhart-pot02;Exec Done +2021-05-25 08:03:06;dolvi-pot07;Send CMD:bin/setstaff.sh 'id=50e446df-14ca-87b6-f443-2cd70b33e069;staffnumber=;prename=Danielle;surname=Simon;isenabled=1;pin=;fixtime=;lang=fr;restriction=;monstart=;monend=;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=;sunend=;' +2021-05-25 08:03:06;dolvi-pot07;Connected +2021-05-25 08:03:07;dolvi-pot07;Exec Done +2021-05-25 08:04:07;dolvi-pot07;Send CMD:bin/setstaff.sh 'id=440afd12-38a6-8b64-b68a-77b88ecf5c75;staffnumber=;prename=Antonio;surname=Borges;isenabled=1;pin=;fixtime=;lang=fr;restriction=;monstart=;monend=;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=;sunend=;' +2021-05-25 08:04:08;dolvi-pot07;Connected +2021-05-25 08:04:08;dolvi-pot07;Exec Done +2021-05-25 08:04:48;dolvi-pot07;Send CMD:bin/setstaff.sh 'id=8ad632ef-aa14-468d-ede6-283cb9c1ce24;staffnumber=;prename=Antonio;surname=Delgado;isenabled=1;pin=;fixtime=;lang=fr;restriction=;monstart=;monend=;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=;sunend=;' +2021-05-25 08:04:48;dolvi-pot07;Connected +2021-05-25 08:04:48;dolvi-pot07;Exec Done +2021-05-25 08:06:07;dolvi-pot07;Send CMD:bin/setstaff.sh 'id=813c99cd-fe76-c8ef-4352-65fda02ddb7f;staffnumber=;prename=Gezim;surname=Hoxha;isenabled=1;pin=;fixtime=;lang=fr;restriction=;monstart=;monend=;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=;sunend=;' +2021-05-25 08:06:07;dolvi-pot07;Connected +2021-05-25 08:06:08;dolvi-pot07;Exec Done +2021-05-25 08:06:47;dolvi-pot07;Send CMD:bin/setstaff.sh 'id=a32da709-0202-71c4-43c9-bc89fdf5aaba;staffnumber=;prename=Manu;surname=Lopes;isenabled=1;pin=;fixtime=;lang=fr;restriction=;monstart=;monend=;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=;sunend=;' +2021-05-25 08:06:48;dolvi-pot07;Connected +2021-05-25 08:06:48;dolvi-pot07;Exec Done +2021-05-25 08:07:27;dolvi-pot07;Send CMD:bin/setstaff.sh 'id=e5c70de3-366c-4b2a-1af0-aed175cf37c0;staffnumber=;prename=Teodoro;surname=Lopes;isenabled=1;pin=;fixtime=;lang=fr;restriction=;monstart=;monend=;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=;sunend=;' +2021-05-25 08:07:28;dolvi-pot07;Connected +2021-05-25 08:07:28;dolvi-pot07;Exec Done +2021-05-25 08:08:11;dolvi-pot07;Send CMD:bin/setstaff.sh 'id=29488caf-66ac-84e6-ab9b-1aebadd8bcf2;staffnumber=;prename=Silvino;surname=Rodrigues;isenabled=1;pin=;fixtime=;lang=fr;restriction=;monstart=;monend=;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=;sunend=;' +2021-05-25 08:08:12;dolvi-pot07;Connected +2021-05-25 08:08:12;dolvi-pot07;Exec Done +2021-05-25 08:08:53;dolvi-pot07;Send CMD:bin/setstaff.sh 'id=cd20d578-869c-693f-db20-198cca57cbe5;staffnumber=;prename=Resmija;surname=Kurtovic;isenabled=1;pin=;fixtime=;lang=fr;restriction=;monstart=;monend=;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=;sunend=;' +2021-05-25 08:08:53;dolvi-pot07;Connected +2021-05-25 08:08:53;dolvi-pot07;Exec Done +2021-05-25 08:09:34;dolvi-pot07;Send CMD:bin/setstaff.sh 'id=eb5819bb-6268-3485-1845-2c1806f71b5c;staffnumber=;prename=Oksana;surname=Pensato ;isenabled=1;pin=;fixtime=;lang=fr;restriction=;monstart=;monend=;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=;sunend=;' +2021-05-25 08:09:35;dolvi-pot07;Connected +2021-05-25 08:09:35;dolvi-pot07;Exec Done +2021-05-25 08:10:18;dolvi-pot07;Send CMD:bin/setstaff.sh 'id=10d324ef-e2da-a461-5b3b-ae0705d8d301;staffnumber=;prename=Carlos;surname=Rodrigues Gomes;isenabled=1;pin=;fixtime=;lang=fr;restriction=;monstart=;monend=;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=;sunend=;' +2021-05-25 08:10:18;dolvi-pot07;Connected +2021-05-25 08:10:18;dolvi-pot07;Exec Done +2021-05-25 08:11:25;dolvi-pot07;Send CMD:bin/setstaff.sh 'id=f6d9f93a-45cc-cd89-d73d-ce62392f4b3b;staffnumber=;prename=Paul;surname=Schumeng;isenabled=1;pin=;fixtime=;lang=fr;restriction=;monstart=;monend=;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=;sunend=;' +2021-05-25 08:11:26;dolvi-pot07;Connected +2021-05-25 08:11:26;dolvi-pot07;Exec Done +2021-05-25 08:12:22;dolvi-pot07;Send CMD:bin/setstaff.sh 'id=3ba9019c-5397-5cef-3e3d-c4d3f66a2c07;staffnumber=;prename=Magalie;surname=Caron;isenabled=1;pin=;fixtime=;lang=fr;restriction=;monstart=;monend=;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=;sunend=;' +2021-05-25 08:12:22;dolvi-pot07;Connected +2021-05-25 08:12:23;dolvi-pot07;Exec Done +2021-05-25 08:13:21;dolvi-pot07;Send CMD:bin/setstaff.sh 'id=8842ec2c-3eee-8bcb-4242-2ee0c477e169;staffnumber=;prename=Evgeniy;surname=Mikhaylov;isenabled=1;pin=;fixtime=;lang=fr;restriction=;monstart=;monend=;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=;sunend=;' +2021-05-25 08:13:21;dolvi-pot07;Connected +2021-05-25 08:13:21;dolvi-pot07;Exec Done +2021-05-25 08:14:09;dolvi-pot07;Send CMD:bin/setstaff.sh 'id=d8e44d1a-359c-055b-72dc-343c57fdfb76;staffnumber=;prename=Lydia;surname=Muller;isenabled=1;pin=;fixtime=;lang=fr;restriction=;monstart=;monend=;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=;sunend=;' +2021-05-25 08:14:09;dolvi-pot07;Connected +2021-05-25 08:14:09;dolvi-pot07;Exec Done +2021-05-25 08:14:54;dolvi-pot07;Send CMD:bin/setstaff.sh 'id=c21502ac-0d4c-07da-8692-d2e1ace8cd56;staffnumber=;prename=Laura;surname=Ferrara;isenabled=1;pin=;fixtime=;lang=fr;restriction=;monstart=;monend=;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=;sunend=;' +2021-05-25 08:14:54;dolvi-pot07;Connected +2021-05-25 08:14:55;dolvi-pot07;Exec Done +2021-05-25 08:15:50;dolvi-pot07;Send CMD:bin/setstaff.sh 'id=259e0687-463b-7c35-af11-c55afbf46a58;staffnumber=;prename=Abdou Aziz;surname=Mbodj;isenabled=1;pin=;fixtime=;lang=fr;restriction=;monstart=;monend=;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=;sunend=;' +2021-05-25 08:15:51;dolvi-pot07;Connected +2021-05-25 08:15:51;dolvi-pot07;Exec Done +2021-05-25 08:16:42;dolvi-pot07;Send CMD:bin/setstaff.sh 'id=0aa23353-9daa-cf0d-e075-17913f9c662c;staffnumber=;prename=Pascaol;surname=Simoes;isenabled=1;pin=;fixtime=;lang=fr;restriction=;monstart=;monend=;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=;sunend=;' +2021-05-25 08:16:43;dolvi-pot07;Connected +2021-05-25 08:16:43;dolvi-pot07;Exec Done +2021-05-25 08:17:31;dolvi-pot07;Send CMD:bin/setstaff.sh 'id=5bb844ec-5b72-5707-c985-fee51a201046;staffnumber=;prename=Caterina;surname=Venanzi;isenabled=1;pin=;fixtime=;lang=fr;restriction=;monstart=;monend=;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=;sunend=;' +2021-05-25 08:17:32;dolvi-pot07;Connected +2021-05-25 08:17:32;dolvi-pot07;Exec Done +2021-06-01 14:53:49;dhart-pot01;Send CMD:bin/setstaff.sh 'id=6f8036b4-338f-a581-2256-4e8c59646836;staffnumber=04;prename=Mathieu;surname=Cox;isenabled=1;pin=1234;fixtime=;lang=de;restriction=;monstart=06:50;monend=15:40;tuestart=06:50;tueend=15:40;wedstart=06:50;wedend=15:40;thustart=06:50;thuend=15:40;fristart=06:50;friend=15:40;satstart=06:50;satend=15:40;sunstart=;sunend=;' +2021-06-01 14:54:51;dhart-pot02;Send CMD:bin/setstaff.sh 'id=6f8036b4-338f-a581-2256-4e8c59646836;staffnumber=04;prename=Mathieu;surname=Cox;isenabled=1;pin=1234;fixtime=;lang=de;restriction=;monstart=06:50;monend=15:40;tuestart=06:50;tueend=15:40;wedstart=06:50;wedend=15:40;thustart=06:50;thuend=15:40;fristart=06:50;friend=15:40;satstart=06:50;satend=15:40;sunstart=;sunend=;' +2021-06-01 14:54:52;dhart-pot02;Connected +2021-06-01 14:54:52;dhart-pot02;Exec Done +2021-06-01 14:55:22;dhart-pot03;Send CMD:bin/setstaff.sh 'id=6f8036b4-338f-a581-2256-4e8c59646836;staffnumber=04;prename=Mathieu;surname=Cox;isenabled=1;pin=1234;fixtime=;lang=de;restriction=;monstart=06:50;monend=15:40;tuestart=06:50;tueend=15:40;wedstart=06:50;wedend=15:40;thustart=06:50;thuend=15:40;fristart=06:50;friend=15:40;satstart=06:50;satend=15:40;sunstart=;sunend=;' +2021-06-01 14:55:23;dhart-pot03;Connected +2021-06-01 14:55:23;dhart-pot03;Exec Done +2021-06-03 12:52:13;dhart-pot03;Send CMD:bin/setstaff.sh 'id=c606a41a-613b-7e1d-64a4-13375a44e85f;staffnumber=;prename=Alpar-Bela;surname=Fabian;isenabled=;pin=1234;fixtime=;lang=de;restriction=;monstart=;monend=;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=;sunend=;' +2021-06-03 12:52:14;dhart-pot03;Connected +2021-06-03 12:52:15;dhart-pot03;Exec Done +2021-06-03 12:52:45;dhart-pot02;Send CMD:bin/setstaff.sh 'id=c606a41a-613b-7e1d-64a4-13375a44e85f;staffnumber=;prename=Alpar-Bela;surname=Fabian;isenabled=;pin=1234;fixtime=;lang=de;restriction=;monstart=;monend=;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=;sunend=;' +2021-06-03 12:52:46;dhart-pot02;Connected +2021-06-03 12:52:46;dhart-pot02;Exec Done +2021-06-09 07:51:01;dhart-pot01;Send CMD:bin/setstaff.sh 'id=b5a21377-6cd5-b954-255a-d3c2a0f42960;staffnumber=6;prename=Laszlo;surname=Biro;isenabled=1;pin=1112;fixtime=;lang=de;restriction=;monstart=;monend=;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=;sunend=;' +2021-06-09 07:51:01;dhart-pot01;Connected +2021-06-09 07:51:02;dhart-pot01;Exec Done +2021-06-09 07:51:02;dhart-pot02;Send CMD:bin/setstaff.sh 'id=b5a21377-6cd5-b954-255a-d3c2a0f42960;staffnumber=6;prename=Laszlo;surname=Biro;isenabled=1;pin=1112;fixtime=;lang=de;restriction=;monstart=;monend=;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=;sunend=;' +2021-06-09 07:51:03;dhart-pot02;Connected +2021-06-09 07:51:03;dhart-pot02;Exec Done +2021-06-09 07:51:43;dhart-pot03;Send CMD:bin/setstaff.sh 'id=c606a41a-613b-7e1d-64a4-13375a44e85f;staffnumber=;prename=Alpar-Bela;surname=Fabian;isenabled=;pin=1234;fixtime=;lang=de;restriction=;monstart=;monend=;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=;sunend=;' +2021-06-09 07:51:44;dhart-pot03;Connected +2021-06-09 07:51:44;dhart-pot03;Exec Done +2021-06-09 07:51:44;dhart-pot02;Send CMD:bin/setstaff.sh 'id=c606a41a-613b-7e1d-64a4-13375a44e85f;staffnumber=;prename=Alpar-Bela;surname=Fabian;isenabled=;pin=1234;fixtime=;lang=de;restriction=;monstart=;monend=;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=;sunend=;' +2021-06-09 07:51:45;dhart-pot02;Connected +2021-06-09 07:51:46;dhart-pot02;Exec Done diff --git a/pointeuse/server/home/dks/public_html/htx/data/.htaccess b/pointeuse/server/home/dks/public_html/htx/data/.htaccess new file mode 100644 index 00000000..a7a56f7e --- /dev/null +++ b/pointeuse/server/home/dks/public_html/htx/data/.htaccess @@ -0,0 +1 @@ +Require all denied \ No newline at end of file diff --git a/pointeuse/server/home/dks/public_html/htx/data/hosts/dhart-hourtrax01.json b/pointeuse/server/home/dks/public_html/htx/data/hosts/dhart-hourtrax01.json new file mode 100644 index 00000000..81f03354 --- /dev/null +++ b/pointeuse/server/home/dks/public_html/htx/data/hosts/dhart-hourtrax01.json @@ -0,0 +1,5 @@ +{ + "sshuser":"pot", + "sshpwd":"sai4seip", + "sshport":"3587", + "sshhost":"172.16.10.170"} diff --git a/pointeuse/server/home/dks/public_html/htx/data/hosts/dhart-pot01.json b/pointeuse/server/home/dks/public_html/htx/data/hosts/dhart-pot01.json new file mode 100644 index 00000000..99e5c130 --- /dev/null +++ b/pointeuse/server/home/dks/public_html/htx/data/hosts/dhart-pot01.json @@ -0,0 +1,5 @@ +{ + "sshuser":"pot", + "sshpwd":"sai4seip", + "sshport":"3587", + "sshhost":"172.16.10.194"} diff --git a/pointeuse/server/home/dks/public_html/htx/data/hosts/dhart-pot02.json b/pointeuse/server/home/dks/public_html/htx/data/hosts/dhart-pot02.json new file mode 100644 index 00000000..871582dd --- /dev/null +++ b/pointeuse/server/home/dks/public_html/htx/data/hosts/dhart-pot02.json @@ -0,0 +1,6 @@ +{ + "sshuser":"pot", + "sshpwd":"sai4seip", + "sshport":"3587", + "sshhost":"172.16.10.202" +} diff --git a/pointeuse/server/home/dks/public_html/htx/data/hosts/dhart-pot03.json b/pointeuse/server/home/dks/public_html/htx/data/hosts/dhart-pot03.json new file mode 100644 index 00000000..6c26352d --- /dev/null +++ b/pointeuse/server/home/dks/public_html/htx/data/hosts/dhart-pot03.json @@ -0,0 +1,6 @@ +{ + "sshuser":"pot", + "sshpwd":"sai4seip", + "sshport":"3587", + "sshhost":"172.16.10.198" +} diff --git a/pointeuse/server/home/dks/public_html/htx/data/hosts/dksserver.json b/pointeuse/server/home/dks/public_html/htx/data/hosts/dksserver.json new file mode 100644 index 00000000..e9534df9 --- /dev/null +++ b/pointeuse/server/home/dks/public_html/htx/data/hosts/dksserver.json @@ -0,0 +1,6 @@ +{ + "sshuser":"dks", + "sshpwd":"sai4seip", + "sshport":"3587", + "sshhost":"172.16.10.186" +} \ No newline at end of file diff --git a/pointeuse/server/home/dks/public_html/htx/data/hosts/dolvi-pot07.json b/pointeuse/server/home/dks/public_html/htx/data/hosts/dolvi-pot07.json new file mode 100644 index 00000000..a7e2a298 --- /dev/null +++ b/pointeuse/server/home/dks/public_html/htx/data/hosts/dolvi-pot07.json @@ -0,0 +1,6 @@ +{ + "sshuser":"pot", + "sshpwd":"sai4seip", + "sshport":"3587", + "sshhost":"172.16.10.214" +} diff --git a/pointeuse/server/home/dks/public_html/htx/data/hosts/elch-pothourtrax.json b/pointeuse/server/home/dks/public_html/htx/data/hosts/elch-pothourtrax.json new file mode 100644 index 00000000..88df13e9 --- /dev/null +++ b/pointeuse/server/home/dks/public_html/htx/data/hosts/elch-pothourtrax.json @@ -0,0 +1,6 @@ +{ + "sshuser":"pot", + "sshpwd":"sai4seip", + "sshport":"3587", + "sshhost":"172.16.10.160" +} \ No newline at end of file diff --git a/pointeuse/server/home/dks/public_html/htx/data/hosts/ldin-hourtrax.json b/pointeuse/server/home/dks/public_html/htx/data/hosts/ldin-hourtrax.json new file mode 100644 index 00000000..2183323a --- /dev/null +++ b/pointeuse/server/home/dks/public_html/htx/data/hosts/ldin-hourtrax.json @@ -0,0 +1,6 @@ +{ + "sshuser":"pot", + "sshpwd":"sai4seip", + "sshport":"3587", + "sshhost":"172.16.10.180" +} \ No newline at end of file diff --git a/pointeuse/server/home/dks/public_html/htx/data/hosts/vince-pot06.json b/pointeuse/server/home/dks/public_html/htx/data/hosts/vince-pot06.json new file mode 100644 index 00000000..722c6c25 --- /dev/null +++ b/pointeuse/server/home/dks/public_html/htx/data/hosts/vince-pot06.json @@ -0,0 +1,5 @@ +{ + "sshuser":"pot", + "sshpwd":"sai4seip", + "sshport":"3587", + "sshhost":"172.16.10.210"} diff --git a/pointeuse/server/home/dks/public_html/htx/data/params.log b/pointeuse/server/home/dks/public_html/htx/data/params.log new file mode 100644 index 00000000..6df0a79d --- /dev/null +++ b/pointeuse/server/home/dks/public_html/htx/data/params.log @@ -0,0 +1,614 @@ +2021-04-20 08:00:49:Array +( + [cl] => ssh + [fn] => exec + [host] => dhart-hourtrax01 + [cmd] => ls +) +2021-04-20 08:02:45:1 +2021-04-20 08:03:58:Array +( + [cl] => ssh + [fn] => exec + [host] => dhart-hourtrax01 + [cmd] => bin/setstaff.sh 'id=cc63023b-4892-c29c-787d-088392d58b88;staffnumber=;prename=Catia;surname=;isenabled=1;pin=1234;fixtime=;lang=de;restriction=;' +) + +2021-04-25 18:38:56:Array +( + [cl] => ssh + [fn] => exec + [host] => dhart-hourtrax01 + [cmd] => bin/setstaff.sh 'id=cc63023b-4892-c29c-787d-088392d58b88;staffnumber=;prename=Catia;surname=;isenabled=1;pin=1234;fixtime=;lang=de;restriction=;monstart=12:00:00;monend=14:00:00;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=10:00:00;sunend=16:00:00;' +) + +2021-04-25 18:45:55:Array +( + [cl] => ssh + [fn] => exec + [host] => dhart-hourtrax01 + [cmd] => bin/setstaff.sh 'id=cc63023b-4892-c29c-787d-088392d58b88;staffnumber=;prename=Catia;surname=;isenabled=1;pin=1234;fixtime=;lang=de;restriction=;monstart=12:00:00;monend=14:00:00;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=10:00:00;sunend=16:00:00;' +) + +2021-04-25 18:48:26:Array +( + [cl] => ssh + [fn] => exec + [host] => dhart-hourtrax01 + [cmd] => bin/setstaff.sh 'id=cc63023b-4892-c29c-787d-088392d58b88;staffnumber=;prename=Catia;surname=;isenabled=1;pin=1234;fixtime=;lang=de;restriction=;monstart=12:00:00;monend=14:00:00;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=10:00:00;sunend=16:00:00;' +) + +2021-04-25 18:53:42:Array +( + [cl] => ssh + [fn] => exec + [host] => dhart-hourtrax01 + [cmd] => bin/setstaff.sh 'id=cc63023b-4892-c29c-787d-088392d58b88;staffnumber=;prename=Catia;surname=;isenabled=1;pin=1234;fixtime=;lang=de;restriction=;monstart=12:00;monend=14:00;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=10:00;sunend=16:00;' +) + +2021-04-26 14:21:36:Array +( + [cl] => ssh + [fn] => exec + [host] => dhart-pot01 + [cmd] => bin/setstaff.sh 'id=f58b0cce-2466-1b6c-befc-033cc2d0422a;staffnumber=01;prename=Markus;surname=Pusch;isenabled=1;pin=1234;fixtime=;lang=de;restriction=;monstart=08:00;monend=;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=;sunend=;' +) + +2021-04-26 14:21:37:Array +( + [cl] => ssh + [fn] => exec + [host] => dhart-pot02 + [cmd] => bin/setstaff.sh 'id=f58b0cce-2466-1b6c-befc-033cc2d0422a;staffnumber=01;prename=Markus;surname=Pusch;isenabled=1;pin=1234;fixtime=;lang=de;restriction=;monstart=08:00;monend=;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=;sunend=;' +) + +2021-04-26 14:21:38:Array +( + [cl] => ssh + [fn] => exec + [host] => dhart-pot03 + [cmd] => bin/setstaff.sh 'id=f58b0cce-2466-1b6c-befc-033cc2d0422a;staffnumber=01;prename=Markus;surname=Pusch;isenabled=1;pin=1234;fixtime=;lang=de;restriction=;monstart=08:00;monend=;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=;sunend=;' +) + +2021-04-26 14:22:59:Array +( + [cl] => ssh + [fn] => exec + [host] => dhart-pot01 + [cmd] => bin/setstaff.sh 'id=f58b0cce-2466-1b6c-befc-033cc2d0422a;staffnumber=01;prename=Markus;surname=Pusch;isenabled=1;pin=1234;fixtime=;lang=de;restriction=;monstart=08:00;monend=17:30;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=;sunend=;' +) + +2021-04-26 14:23:01:Array +( + [cl] => ssh + [fn] => exec + [host] => dhart-pot02 + [cmd] => bin/setstaff.sh 'id=f58b0cce-2466-1b6c-befc-033cc2d0422a;staffnumber=01;prename=Markus;surname=Pusch;isenabled=1;pin=1234;fixtime=;lang=de;restriction=;monstart=08:00;monend=17:30;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=;sunend=;' +) + +2021-04-26 14:23:03:Array +( + [cl] => ssh + [fn] => exec + [host] => dhart-pot03 + [cmd] => bin/setstaff.sh 'id=f58b0cce-2466-1b6c-befc-033cc2d0422a;staffnumber=01;prename=Markus;surname=Pusch;isenabled=1;pin=1234;fixtime=;lang=de;restriction=;monstart=08:00;monend=17:30;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=;sunend=;' +) + +2021-05-16 14:58:27:Array +( + [cl] => ssh + [fn] => exec + [host] => vince-pot06 + [cmd] => bin/setstaff.sh 'id=3465d3a7-a883-624c-f677-17864861a2d5;staffnumber=;prename=Naomie Goue ;surname=Edwige Gname;isenabled=1;pin=1234;fixtime=;lang=fr;restriction=;monstart=;monend=;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=;sunend=;' +) + +2021-05-16 15:05:13: +2021-05-16 15:10:34:Array +( + [cl] => ssh + [fn] => exec + [host] => vince-pot06 + [cmd] => bin/setstaff.sh 'id=3465d3a7-a883-624c-f677-17864861a2d5;staffnumber=;prename=Naomie Goue ;surname=Edwige Gname;isenabled=1;pin=1234;fixtime=;lang=fr;restriction=;monstart=;monend=;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=;sunend=;' +) + +2021-05-16 15:11:41:Array +( + [cl] => ssh + [fn] => exec + [host] => vince-pot06 + [cmd] => bin/setstaff.sh 'id=3465d3a7-a883-624c-f677-17864861a2d5;staffnumber=;prename=Naomie Goue ;surname=Edwige Gname;isenabled=1;pin=1234;fixtime=;lang=fr;restriction=;monstart=;monend=;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=;sunend=;' +) + +2021-05-16 15:12:44:Array +( + [cl] => ssh + [fn] => exec + [host] => vince-pot06 + [cmd] => bin/setstaff.sh 'id=e9a88e20-dc82-820e-f615-68302a180759;staffnumber=;prename=Christine-Marie;surname=DOUMB'A DOUMBE;isenabled=1;pin=1234;fixtime=;lang=fr;restriction=;monstart=;monend=;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=;sunend=;' +) + +2021-05-16 15:13:52:Array +( + [cl] => ssh + [fn] => exec + [host] => vince-pot06 + [cmd] => bin/setstaff.sh 'id=2c3ded86-8f2c-0c9b-1dc1-64412989407f;staffnumber=;prename=Thomas;surname=Marie;isenabled=1;pin=1234;fixtime=;lang=fr;restriction=;monstart=;monend=;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=;sunend=;' +) + +2021-05-16 15:14:48:Array +( + [cl] => ssh + [fn] => exec + [host] => vince-pot06 + [cmd] => bin/setstaff.sh 'id=5d020c34-f057-5b13-e47e-7ce73003e230;staffnumber=;prename=Michael;surname=Grimalt;isenabled=1;pin=1234;fixtime=;lang=fr;restriction=;monstart=;monend=;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=;sunend=;' +) + +2021-05-16 15:18:31:Array +( + [cl] => ssh + [fn] => exec + [host] => vince-pot06 + [cmd] => bin/setstaff.sh 'id=e9a88e20-dc82-820e-f615-68302a180759;staffnumber=;prename=Christine-Marie;surname=DOUMB'A DOUMBE;isenabled=1;pin=1234;fixtime=;lang=fr;restriction=;monstart=;monend=;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=;sunend=;' +) + +2021-05-16 15:24:11: +2021-05-16 15:25:45: +2021-05-16 15:27:27:Array +( + [cl] => ssh + [fn] => exec + [host] => vince-pot06 + [cmd] => bin/setstaff.sh 'id=3465d3a7-a883-624c-f677-17864861a2d5;staffnumber=;prename=Naomie Goue ;surname=Edwige Gname;isenabled=1;pin=1234;fixtime=;lang=fr;restriction=;monstart=;monend=;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=;sunend=;' +) + +2021-05-16 15:29:53: +2021-05-16 15:30:36:Array +( + [cl] => ssh + [fn] => exec + [host] => vince-pot06 + [cmd] => bin/setstaff.sh 'id=3465d3a7-a883-624c-f677-17864861a2d5;staffnumber=;prename=Naomie Goue ;surname=Edwige Gname;isenabled=1;pin=1234;fixtime=;lang=fr;restriction=;monstart=;monend=;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=;sunend=;' +) + +2021-05-16 15:36:09: +2021-05-16 15:36:48:Array +( + [cl] => ssh + [fn] => exec + [host] => vince-pot06 + [cmd] => bin/setstaff.sh 'id=3465d3a7-a883-624c-f677-17864861a2d5;staffnumber=;prename=Naomie Goue ;surname=Edwige Gname;isenabled=1;pin=1234;fixtime=;lang=fr;restriction=;monstart=;monend=;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=;sunend=;' +) + +2021-05-16 15:38:49:Array +( + [cl] => ssh + [fn] => exec + [host] => vince-pot06 + [cmd] => bin/setstaff.sh 'id=e9a88e20-dc82-820e-f615-68302a180759;staffnumber=;prename=Christine-Marie;surname=DOUMB A DOUMBE;isenabled=1;pin=1234;fixtime=;lang=fr;restriction=;monstart=;monend=;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=;sunend=;' +) + +2021-05-16 15:42:22: +2021-05-16 15:43:48:Array +( + [cl] => ssh + [fn] => exec + [host] => vince-pot06 + [cmd] => bin/setstaff.sh 'id=e9a88e20-dc82-820e-f615-68302a180759;staffnumber=;prename=Christine-Marie;surname=DOUMBA DOUMBE;isenabled=1;pin=1234;fixtime=;lang=fr;restriction=;monstart=;monend=;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=;sunend=;' +) + +2021-05-17 10:11:53:Array +( + [cl] => ssh + [fn] => exec + [host] => dhart-pot01 + [cmd] => bin/setstaff.sh 'id=213e619d-1149-69d4-de57-997a16cd3d21;staffnumber=;prename=Celia;surname=Guerreiro;isenabled=1;pin=1234;fixtime=;lang=de;restriction=;monstart=;monend=;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=;sunend=;' +) + +2021-05-17 10:12:24:Array +( + [cl] => ssh + [fn] => exec + [host] => dhart-pot03 + [cmd] => bin/setstaff.sh 'id=213e619d-1149-69d4-de57-997a16cd3d21;staffnumber=;prename=Celia;surname=Guerreiro;isenabled=1;pin=1234;fixtime=;lang=de;restriction=;monstart=;monend=;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=;sunend=;' +) + +2021-05-17 10:12:55:Array +( + [cl] => ssh + [fn] => exec + [host] => dhart-pot02 + [cmd] => bin/setstaff.sh 'id=213e619d-1149-69d4-de57-997a16cd3d21;staffnumber=;prename=Celia;surname=Guerreiro;isenabled=1;pin=1234;fixtime=;lang=de;restriction=;monstart=;monend=;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=;sunend=;' +) + +2021-05-17 10:16:42:Array +( + [cl] => ssh + [fn] => exec + [host] => dhart-pot02 + [cmd] => bin/setstaff.sh 'id=5c9b540e-6a25-433b-6522-9c6c4f36c9d3;staffnumber=6;prename=Csilla;surname=Gego;isenabled=1;pin=1234;fixtime=;lang=de;restriction=;monstart=;monend=;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=;sunend=;' +) + +2021-05-17 10:21:55:Array +( + [cl] => ssh + [fn] => exec + [host] => dhart-pot02 + [cmd] => bin/setstaff.sh 'id=35531775-6a9f-e7b9-fbbd-aa914656137b;staffnumber=5;prename=Zsolt;surname=Biro;isenabled=1;pin=1234;fixtime=;lang=de;restriction=;monstart=;monend=;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=;sunend=;' +) + +2021-05-18 11:31:15:Array +( + [cl] => ssh + [fn] => exec + [host] => vince-pot06 + [cmd] => bin/setstaff.sh 'id=1f2b91e5-2ac4-509c-b054-ec7f5a22e0c3;staffnumber=;prename=Valentina;surname=Lauria;isenabled=1;pin=1234;fixtime=;lang=fr;restriction=;monstart=;monend=;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=;sunend=;' +) + +2021-05-18 11:40:19:Array +( + [cl] => ssh + [fn] => exec + [host] => vince-pot06 + [cmd] => bin/setstaff.sh 'id=998f0d4b-3e14-6198-53b1-7e117944921e;staffnumber=;prename=Neza;surname=;isenabled=1;pin=1234;fixtime=;lang=fr;restriction=;monstart=;monend=;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=;sunend=;' +) + +2021-05-18 11:41:04:Array +( + [cl] => ssh + [fn] => exec + [host] => vince-pot06 + [cmd] => bin/setstaff.sh 'id=410d087c-15c7-6e72-4811-6e44f2056916;staffnumber=;prename=Christian;surname=Grimalt;isenabled=1;pin=1234;fixtime=;lang=fr;restriction=;monstart=;monend=;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=;sunend=;' +) + +2021-05-18 11:41:40:Array +( + [cl] => ssh + [fn] => exec + [host] => vince-pot06 + [cmd] => bin/setstaff.sh 'id=a924e42f-fdd7-e970-8149-fd8efe26f6e7;staffnumber=;prename=Enver;surname=Sabanovic;isenabled=1;pin=1234;fixtime=;lang=fr;restriction=;monstart=;monend=;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=;sunend=;' +) + +2021-05-18 11:42:25:Array +( + [cl] => ssh + [fn] => exec + [host] => vince-pot06 + [cmd] => bin/setstaff.sh 'id=6f107d15-f1ff-f618-970b-19197d7a95e5;staffnumber=;prename=Jorge;surname=Tovar;isenabled=1;pin=1234;fixtime=;lang=fr;restriction=;monstart=;monend=;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=;sunend=;' +) + +2021-05-18 11:43:27:Array +( + [cl] => ssh + [fn] => exec + [host] => vince-pot06 + [cmd] => bin/setstaff.sh 'id=954ae8a3-4bf8-909a-54a3-31f3c8e2af8b;staffnumber=;prename=José;surname=Maria;isenabled=1;pin=1234;fixtime=;lang=fr;restriction=;monstart=;monend=;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=;sunend=;' +) + +2021-05-18 11:44:06:Array +( + [cl] => ssh + [fn] => exec + [host] => vince-pot06 + [cmd] => bin/setstaff.sh 'id=2c3ded86-8f2c-0c9b-1dc1-64412989407f;staffnumber=;prename=Thomas;surname=Marie;isenabled=1;pin=1234;fixtime=;lang=fr;restriction=;monstart=;monend=;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=;sunend=;' +) + +2021-05-18 11:44:47:Array +( + [cl] => ssh + [fn] => exec + [host] => vince-pot06 + [cmd] => bin/setstaff.sh 'id=af7bf290-b154-0f7b-4484-05bec10ea033;staffnumber=;prename=Andrea;surname=Del Rosario;isenabled=1;pin=1234;fixtime=;lang=fr;restriction=;monstart=;monend=;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=;sunend=;' +) + +2021-05-18 11:45:32:Array +( + [cl] => ssh + [fn] => exec + [host] => vince-pot06 + [cmd] => bin/setstaff.sh 'id=7ec669d5-b348-1523-2768-2339e1f83b70;staffnumber=;prename=Anna;surname=Mesto;isenabled=1;pin=1234;fixtime=;lang=fr;restriction=;monstart=;monend=;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=;sunend=;' +) + +2021-05-18 11:46:21:Array +( + [cl] => ssh + [fn] => exec + [host] => vince-pot06 + [cmd] => bin/setstaff.sh 'id=be1bc843-b54d-92a0-814d-2b7e34b4b927;staffnumber=;prename=Vanessa;surname=Volpi;isenabled=1;pin=1234;fixtime=;lang=fr;restriction=;monstart=;monend=;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=;sunend=;' +) + +2021-05-18 11:47:24:Array +( + [cl] => ssh + [fn] => exec + [host] => vince-pot06 + [cmd] => bin/setstaff.sh 'id=5d020c34-f057-5b13-e47e-7ce73003e230;staffnumber=;prename=Michael;surname=Grimalt;isenabled=1;pin=1234;fixtime=;lang=fr;restriction=;monstart=;monend=;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=;sunend=;' +) + +2021-05-18 11:48:08:Array +( + [cl] => ssh + [fn] => exec + [host] => vince-pot06 + [cmd] => bin/setstaff.sh 'id=327be400-18a2-cdc7-898a-c8b5c3c3b0ee;staffnumber=;prename=Mattia;surname=Pascolini;isenabled=1;pin=1234;fixtime=;lang=fr;restriction=;monstart=;monend=;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=;sunend=;' +) + +2021-05-18 11:48:52:Array +( + [cl] => ssh + [fn] => exec + [host] => vince-pot06 + [cmd] => bin/setstaff.sh 'id=63d25b04-0486-d233-f145-377054ba5d11;staffnumber=;prename=Olivier;surname=Zimmermann;isenabled=1;pin=1234;fixtime=;lang=fr;restriction=;monstart=;monend=;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=;sunend=;' +) + +2021-05-19 15:17:22:Array +( + [cl] => ssh + [fn] => exec + [host] => dhart-pot01 + [cmd] => bin/setstaff.sh 'id=5c9b540e-6a25-433b-6522-9c6c4f36c9d3;staffnumber=6;prename=Csilla;surname=Gego;isenabled=1;pin=1234;fixtime=;lang=de;restriction=;monstart=;monend=;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=;sunend=;' +) + +2021-05-19 15:17:53:Array +( + [cl] => ssh + [fn] => exec + [host] => dhart-pot02 + [cmd] => bin/setstaff.sh 'id=5c9b540e-6a25-433b-6522-9c6c4f36c9d3;staffnumber=6;prename=Csilla;surname=Gego;isenabled=1;pin=1234;fixtime=;lang=de;restriction=;monstart=;monend=;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=;sunend=;' +) + +2021-05-19 15:18:30:Array +( + [cl] => ssh + [fn] => exec + [host] => dhart-pot01 + [cmd] => bin/setstaff.sh 'id=35531775-6a9f-e7b9-fbbd-aa914656137b;staffnumber=5;prename=Zsolt;surname=Biro;isenabled=1;pin=1234;fixtime=;lang=de;restriction=;monstart=;monend=;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=;sunend=;' +) + +2021-05-19 15:19:01:Array +( + [cl] => ssh + [fn] => exec + [host] => dhart-pot02 + [cmd] => bin/setstaff.sh 'id=35531775-6a9f-e7b9-fbbd-aa914656137b;staffnumber=5;prename=Zsolt;surname=Biro;isenabled=1;pin=1234;fixtime=;lang=de;restriction=;monstart=;monend=;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=;sunend=;' +) + +2021-05-19 15:20:44:Array +( + [cl] => ssh + [fn] => exec + [host] => dhart-pot03 + [cmd] => bin/setstaff.sh 'id=213e619d-1149-69d4-de57-997a16cd3d21;staffnumber=;prename=Celia;surname=Guerreiro;isenabled=1;pin=1234;fixtime=;lang=de;restriction=;monstart=;monend=;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=;sunend=;' +) + +2021-05-20 15:04:24:Array +( + [cl] => ssh + [fn] => exec + [host] => dhart-pot01 + [cmd] => bin/setstaff.sh 'id=a3a22aa2-8c0e-a2df-80b5-ac180161ccf5;staffnumber=02;prename=Krystian;surname=Swietlik;isenabled=1;pin=1234;fixtime=5;lang=de;restriction=;monstart=06:50;monend=15:30;tuestart=06:50;tueend=15:40;wedstart=06:50;wedend=15:40;thustart=06:50;thuend=15:40;fristart=06:50;friend=15:40;satstart=06:50;satend=15:40;sunstart=;sunend=;' +) + +2021-05-20 15:04:55:Array +( + [cl] => ssh + [fn] => exec + [host] => dhart-pot02 + [cmd] => bin/setstaff.sh 'id=a3a22aa2-8c0e-a2df-80b5-ac180161ccf5;staffnumber=02;prename=Krystian;surname=Swietlik;isenabled=1;pin=1234;fixtime=5;lang=de;restriction=;monstart=06:50;monend=15:30;tuestart=06:50;tueend=15:40;wedstart=06:50;wedend=15:40;thustart=06:50;thuend=15:40;fristart=06:50;friend=15:40;satstart=06:50;satend=15:40;sunstart=;sunend=;' +) + +2021-05-25 08:03:06:Array +( + [cl] => ssh + [fn] => exec + [host] => dolvi-pot07 + [cmd] => bin/setstaff.sh 'id=50e446df-14ca-87b6-f443-2cd70b33e069;staffnumber=;prename=Danielle;surname=Simon;isenabled=1;pin=;fixtime=;lang=fr;restriction=;monstart=;monend=;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=;sunend=;' +) + +2021-05-25 08:04:07:Array +( + [cl] => ssh + [fn] => exec + [host] => dolvi-pot07 + [cmd] => bin/setstaff.sh 'id=440afd12-38a6-8b64-b68a-77b88ecf5c75;staffnumber=;prename=Antonio;surname=Borges;isenabled=1;pin=;fixtime=;lang=fr;restriction=;monstart=;monend=;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=;sunend=;' +) + +2021-05-25 08:04:48:Array +( + [cl] => ssh + [fn] => exec + [host] => dolvi-pot07 + [cmd] => bin/setstaff.sh 'id=8ad632ef-aa14-468d-ede6-283cb9c1ce24;staffnumber=;prename=Antonio;surname=Delgado;isenabled=1;pin=;fixtime=;lang=fr;restriction=;monstart=;monend=;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=;sunend=;' +) + +2021-05-25 08:06:07:Array +( + [cl] => ssh + [fn] => exec + [host] => dolvi-pot07 + [cmd] => bin/setstaff.sh 'id=813c99cd-fe76-c8ef-4352-65fda02ddb7f;staffnumber=;prename=Gezim;surname=Hoxha;isenabled=1;pin=;fixtime=;lang=fr;restriction=;monstart=;monend=;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=;sunend=;' +) + +2021-05-25 08:06:47:Array +( + [cl] => ssh + [fn] => exec + [host] => dolvi-pot07 + [cmd] => bin/setstaff.sh 'id=a32da709-0202-71c4-43c9-bc89fdf5aaba;staffnumber=;prename=Manu;surname=Lopes;isenabled=1;pin=;fixtime=;lang=fr;restriction=;monstart=;monend=;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=;sunend=;' +) + +2021-05-25 08:07:27:Array +( + [cl] => ssh + [fn] => exec + [host] => dolvi-pot07 + [cmd] => bin/setstaff.sh 'id=e5c70de3-366c-4b2a-1af0-aed175cf37c0;staffnumber=;prename=Teodoro;surname=Lopes;isenabled=1;pin=;fixtime=;lang=fr;restriction=;monstart=;monend=;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=;sunend=;' +) + +2021-05-25 08:08:11:Array +( + [cl] => ssh + [fn] => exec + [host] => dolvi-pot07 + [cmd] => bin/setstaff.sh 'id=29488caf-66ac-84e6-ab9b-1aebadd8bcf2;staffnumber=;prename=Silvino;surname=Rodrigues;isenabled=1;pin=;fixtime=;lang=fr;restriction=;monstart=;monend=;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=;sunend=;' +) + +2021-05-25 08:08:53:Array +( + [cl] => ssh + [fn] => exec + [host] => dolvi-pot07 + [cmd] => bin/setstaff.sh 'id=cd20d578-869c-693f-db20-198cca57cbe5;staffnumber=;prename=Resmija;surname=Kurtovic;isenabled=1;pin=;fixtime=;lang=fr;restriction=;monstart=;monend=;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=;sunend=;' +) + +2021-05-25 08:09:34:Array +( + [cl] => ssh + [fn] => exec + [host] => dolvi-pot07 + [cmd] => bin/setstaff.sh 'id=eb5819bb-6268-3485-1845-2c1806f71b5c;staffnumber=;prename=Oksana;surname=Pensato ;isenabled=1;pin=;fixtime=;lang=fr;restriction=;monstart=;monend=;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=;sunend=;' +) + +2021-05-25 08:10:18:Array +( + [cl] => ssh + [fn] => exec + [host] => dolvi-pot07 + [cmd] => bin/setstaff.sh 'id=10d324ef-e2da-a461-5b3b-ae0705d8d301;staffnumber=;prename=Carlos;surname=Rodrigues Gomes;isenabled=1;pin=;fixtime=;lang=fr;restriction=;monstart=;monend=;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=;sunend=;' +) + +2021-05-25 08:11:25:Array +( + [cl] => ssh + [fn] => exec + [host] => dolvi-pot07 + [cmd] => bin/setstaff.sh 'id=f6d9f93a-45cc-cd89-d73d-ce62392f4b3b;staffnumber=;prename=Paul;surname=Schumeng;isenabled=1;pin=;fixtime=;lang=fr;restriction=;monstart=;monend=;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=;sunend=;' +) + +2021-05-25 08:12:22:Array +( + [cl] => ssh + [fn] => exec + [host] => dolvi-pot07 + [cmd] => bin/setstaff.sh 'id=3ba9019c-5397-5cef-3e3d-c4d3f66a2c07;staffnumber=;prename=Magalie;surname=Caron;isenabled=1;pin=;fixtime=;lang=fr;restriction=;monstart=;monend=;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=;sunend=;' +) + +2021-05-25 08:13:21:Array +( + [cl] => ssh + [fn] => exec + [host] => dolvi-pot07 + [cmd] => bin/setstaff.sh 'id=8842ec2c-3eee-8bcb-4242-2ee0c477e169;staffnumber=;prename=Evgeniy;surname=Mikhaylov;isenabled=1;pin=;fixtime=;lang=fr;restriction=;monstart=;monend=;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=;sunend=;' +) + +2021-05-25 08:14:09:Array +( + [cl] => ssh + [fn] => exec + [host] => dolvi-pot07 + [cmd] => bin/setstaff.sh 'id=d8e44d1a-359c-055b-72dc-343c57fdfb76;staffnumber=;prename=Lydia;surname=Muller;isenabled=1;pin=;fixtime=;lang=fr;restriction=;monstart=;monend=;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=;sunend=;' +) + +2021-05-25 08:14:54:Array +( + [cl] => ssh + [fn] => exec + [host] => dolvi-pot07 + [cmd] => bin/setstaff.sh 'id=c21502ac-0d4c-07da-8692-d2e1ace8cd56;staffnumber=;prename=Laura;surname=Ferrara;isenabled=1;pin=;fixtime=;lang=fr;restriction=;monstart=;monend=;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=;sunend=;' +) + +2021-05-25 08:15:50:Array +( + [cl] => ssh + [fn] => exec + [host] => dolvi-pot07 + [cmd] => bin/setstaff.sh 'id=259e0687-463b-7c35-af11-c55afbf46a58;staffnumber=;prename=Abdou Aziz;surname=Mbodj;isenabled=1;pin=;fixtime=;lang=fr;restriction=;monstart=;monend=;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=;sunend=;' +) + +2021-05-25 08:16:42:Array +( + [cl] => ssh + [fn] => exec + [host] => dolvi-pot07 + [cmd] => bin/setstaff.sh 'id=0aa23353-9daa-cf0d-e075-17913f9c662c;staffnumber=;prename=Pascaol;surname=Simoes;isenabled=1;pin=;fixtime=;lang=fr;restriction=;monstart=;monend=;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=;sunend=;' +) + +2021-05-25 08:17:31:Array +( + [cl] => ssh + [fn] => exec + [host] => dolvi-pot07 + [cmd] => bin/setstaff.sh 'id=5bb844ec-5b72-5707-c985-fee51a201046;staffnumber=;prename=Caterina;surname=Venanzi;isenabled=1;pin=;fixtime=;lang=fr;restriction=;monstart=;monend=;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=;sunend=;' +) + +2021-06-01 14:53:49:Array +( + [cl] => ssh + [fn] => exec + [host] => dhart-pot01 + [cmd] => bin/setstaff.sh 'id=6f8036b4-338f-a581-2256-4e8c59646836;staffnumber=04;prename=Mathieu;surname=Cox;isenabled=1;pin=1234;fixtime=;lang=de;restriction=;monstart=06:50;monend=15:40;tuestart=06:50;tueend=15:40;wedstart=06:50;wedend=15:40;thustart=06:50;thuend=15:40;fristart=06:50;friend=15:40;satstart=06:50;satend=15:40;sunstart=;sunend=;' +) + +2021-06-01 14:54:51:Array +( + [cl] => ssh + [fn] => exec + [host] => dhart-pot02 + [cmd] => bin/setstaff.sh 'id=6f8036b4-338f-a581-2256-4e8c59646836;staffnumber=04;prename=Mathieu;surname=Cox;isenabled=1;pin=1234;fixtime=;lang=de;restriction=;monstart=06:50;monend=15:40;tuestart=06:50;tueend=15:40;wedstart=06:50;wedend=15:40;thustart=06:50;thuend=15:40;fristart=06:50;friend=15:40;satstart=06:50;satend=15:40;sunstart=;sunend=;' +) + +2021-06-01 14:55:22:Array +( + [cl] => ssh + [fn] => exec + [host] => dhart-pot03 + [cmd] => bin/setstaff.sh 'id=6f8036b4-338f-a581-2256-4e8c59646836;staffnumber=04;prename=Mathieu;surname=Cox;isenabled=1;pin=1234;fixtime=;lang=de;restriction=;monstart=06:50;monend=15:40;tuestart=06:50;tueend=15:40;wedstart=06:50;wedend=15:40;thustart=06:50;thuend=15:40;fristart=06:50;friend=15:40;satstart=06:50;satend=15:40;sunstart=;sunend=;' +) + +2021-06-03 12:52:13:Array +( + [cl] => ssh + [fn] => exec + [host] => dhart-pot03 + [cmd] => bin/setstaff.sh 'id=c606a41a-613b-7e1d-64a4-13375a44e85f;staffnumber=;prename=Alpar-Bela;surname=Fabian;isenabled=;pin=1234;fixtime=;lang=de;restriction=;monstart=;monend=;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=;sunend=;' +) + +2021-06-03 12:52:45:Array +( + [cl] => ssh + [fn] => exec + [host] => dhart-pot02 + [cmd] => bin/setstaff.sh 'id=c606a41a-613b-7e1d-64a4-13375a44e85f;staffnumber=;prename=Alpar-Bela;surname=Fabian;isenabled=;pin=1234;fixtime=;lang=de;restriction=;monstart=;monend=;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=;sunend=;' +) + +2021-06-09 07:51:01:Array +( + [cl] => ssh + [fn] => exec + [host] => dhart-pot01 + [cmd] => bin/setstaff.sh 'id=b5a21377-6cd5-b954-255a-d3c2a0f42960;staffnumber=6;prename=Laszlo;surname=Biro;isenabled=1;pin=1112;fixtime=;lang=de;restriction=;monstart=;monend=;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=;sunend=;' +) + +2021-06-09 07:51:02:Array +( + [cl] => ssh + [fn] => exec + [host] => dhart-pot02 + [cmd] => bin/setstaff.sh 'id=b5a21377-6cd5-b954-255a-d3c2a0f42960;staffnumber=6;prename=Laszlo;surname=Biro;isenabled=1;pin=1112;fixtime=;lang=de;restriction=;monstart=;monend=;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=;sunend=;' +) + +2021-06-09 07:51:43:Array +( + [cl] => ssh + [fn] => exec + [host] => dhart-pot03 + [cmd] => bin/setstaff.sh 'id=c606a41a-613b-7e1d-64a4-13375a44e85f;staffnumber=;prename=Alpar-Bela;surname=Fabian;isenabled=;pin=1234;fixtime=;lang=de;restriction=;monstart=;monend=;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=;sunend=;' +) + +2021-06-09 07:51:44:Array +( + [cl] => ssh + [fn] => exec + [host] => dhart-pot02 + [cmd] => bin/setstaff.sh 'id=c606a41a-613b-7e1d-64a4-13375a44e85f;staffnumber=;prename=Alpar-Bela;surname=Fabian;isenabled=;pin=1234;fixtime=;lang=de;restriction=;monstart=;monend=;tuestart=;tueend=;wedstart=;wedend=;thustart=;thuend=;fristart=;friend=;satstart=;satend=;sunstart=;sunend=;' +) + diff --git a/pointeuse/server/home/dks/public_html/htx/index.html b/pointeuse/server/home/dks/public_html/htx/index.html new file mode 100644 index 00000000..e69de29b diff --git a/pointeuse/server/home/dks/public_html/htx/index.php b/pointeuse/server/home/dks/public_html/htx/index.php new file mode 100644 index 00000000..b660a5f0 --- /dev/null +++ b/pointeuse/server/home/dks/public_html/htx/index.php @@ -0,0 +1,71 @@ + $value) + { + if ((is_file("lib/".$value) && strpos($value,'.') !== 0) && substr_compare($value, ".php", -strlen(".php")) === 0){ + require("lib/".$value); + } + } + $moduleclasses = scandir("lib/modules"); + foreach ($moduleclasses as $key => $value) + { + if ((is_file("lib/modules/".$value) && strpos($value,'.') !== 0) && substr_compare($value, ".php", -strlen(".php")) === 0){ + error_log($value); + require("lib/modules/".$value); + } + } + + $db = new database($cfg["db"]); + // $sess = new session($db); + $vars = array(); + $html = array(); + // if (isset($_COOKIE[$cfg["cookie"]])){ + // $vars["sid"] = $_COOKIE[$cfg["cookie"]]; + // } + // if (isset($vars["sid"]) && ($vars["sid"] != "")){ + // $vars["session"] = $sess->getSession($vars["sid"]); + // } else { + // error_log("No Session!"); + // } + $params = array(); + // $html["session"] = $vars["session"]; + //error_log(print_r($vars,true)); + $params = json_decode(file_get_contents('php://input'), true); + //$params =$_GET; + $html["params"] = $params; + //$html["cfg"] = $cfg; + if (isset($params["cl"]) && isset($params["fn"]) && $params["cl"] != "database"){ + if (class_exists($params["cl"])) { + $strclass=$params["cl"]; + $cl = new $strclass($db,$cfg); + if (!method_exists($cl,$params["fn"])){ + $html["error"] = "class ".$params["cl"]."->method ".$params["fn"]." does not exist!"; + } + $r = new ReflectionMethod($strclass, $params["fn"]); + $metparams = $r->getParameters(); + $fnp = array(); + $prcnt = 0; + foreach ($metparams as $p) { + if (isset($params[$p->getName()])){ + array_push($fnp,$params[$p->getName()]); + } + if ($p->isOptional() === false){ + $prcnt++; + } + $html["fnparams"][$p->getName()] = (($p->isOptional() === true)?"optional":"required"); + } + if (count($fnp) < $prcnt){ + $html["error"] = "Function has ".$prcnt." required parameters!"; + } else { + $html["data"] = call_user_func_array(array($cl, $params["fn"]), $fnp); + } + } else { + $html["error"] = "class ".$params["cl"]." does not exist!"; + } + } + header('Content-Type: application/json'); + echo json_encode($html); + +?> \ No newline at end of file diff --git a/pointeuse/server/home/dks/public_html/htx/lib/config.php b/pointeuse/server/home/dks/public_html/htx/lib/config.php new file mode 100644 index 00000000..38b4d091 --- /dev/null +++ b/pointeuse/server/home/dks/public_html/htx/lib/config.php @@ -0,0 +1,33 @@ + substr(dirname($_SERVER["SCRIPT_FILENAME"]),strlen($_SERVER["DOCUMENT_ROOT"])).'/', + "webdocroot" => $_SERVER["DOCUMENT_ROOT"].'/'.substr(dirname($_SERVER["SCRIPT_FILENAME"]),strlen($_SERVER["DOCUMENT_ROOT"])).'/', + "authfile" => "/home/dks/public_html/.htpasswd", + "datapath" => "data", + "ovpn" => array( + "serverhost" => "88.99.170.20", + "sshuser" => "posdab", + "sshpwd" => "lee7yoh6", + "sshport" => "3587" + ), + // "db"=> array( + // "type" => "pgsql", + // "host" => "sql12.your-server.de", + // "dbname" => "potlu2_db", + // "user" => "potlu2_user", + // "password" => "dMY8xGB6cBLzrDGE", + // ), + "db"=> array( + "type" => "pgsql", + "host" => "172.16.10.6", + "dbname" => "potlu2_db", + "user" => "potlu2_user", + "password" => "dMY8xGB6cBLzrDGE", + ), + "tmppath" => "tmp", + "toolspath" => "bin", + "version" => date("YmdHis"), + "minify" => "", + ); + +?> \ No newline at end of file diff --git a/pointeuse/server/home/dks/public_html/htx/lib/database.php b/pointeuse/server/home/dks/public_html/htx/lib/database.php new file mode 100644 index 00000000..54e8d480 --- /dev/null +++ b/pointeuse/server/home/dks/public_html/htx/lib/database.php @@ -0,0 +1,158 @@ +dbconf = $pdbconf; + try { + //'mysql:host=;dbname=', $user, password + //'sqlite:/opt/databases/mydb.sq3 + //pgsql:host=localhost;port=5432;dbname=testdb;user=bruce;password=mypass + //error_log("connect: ".'sqlite:'.$this->dbconf["dbfile"]); + if ($this->dbconf["type"] == "pgsql"){ + $this->conn = new PDO($this->dbconf["type"].':host='.$this->dbconf["host"].';port=5432;dbname='.$this->dbconf["dbname"],$this->dbconf["user"],$this->dbconf["password"]); + } else if ($this->dbconf["type"] == "sqlite") { + $this->conn = new PDO('sqlite:'.$this->dbconf["dbfile"],'',''); + } + //$this->conn = new PDO('pgsql:'.$this->dbconf["dbfile"],'',''); + //$this->conn = new PDO('pgsql:'.$this->dbconf["dbfile"],'',''); + } catch(PDOException $e){ + error_log("Connection Error: ".$e->getMessage()); + } + } + + public function securetext($text){ + return str_replace("'","''",$text); + } + public function value($text){ + if (($text == "") || ($text == null)){ + return 'null'; + } + return "'".$this->securetext($text)."'"; + } + + public function query($sql){ + $result = array(); + if ($this->debug == 1){ + //error_log("QUERY:".$sql); + } + try { + if ($this->conn){ + $sth = $this->conn->prepare($sql); + $sth->execute(); + $result = $sth->fetch(PDO::FETCH_ASSOC); + return $result; + } + } catch(PDOException $e){ + error_log("QUERY ERROR: ".$sql); + } + return $result; + } + + public function querybykey($key,$sql){ + $result = null; + $kresult = array(); + if ($this->debug == 1){ + //error_log("QUERYbykey: ".$sql); + } + try { + if ($this->conn){ + $sth = $this->conn->prepare($sql); + $sth->execute(); + $result = $sth->fetchAll(PDO::FETCH_ASSOC); + foreach($result as $r){ + $kresult[$r[$key]] = $r; + } + + return $kresult; + } + } catch (PDOException $e){ + error_log("QUERYBYKEY ERROR: ".$sql); + } + return $result; + } + + public function queryarray($sql){ + $result = null; + if ($this->debug == 1){ + //error_log("QUERYARRAY: ".$sql); + } + try { + if ($this->conn){ + $sth = $this->conn->prepare($sql); + $sth->execute(); + $result = $sth->fetchAll(PDO::FETCH_ASSOC); + return $result; + } + } catch (PDOException $e){ + error_log("QUERYARRAY ERROR: ".$sql); + } + return $result; + } + + public function exec($sql){ + if ($this->debug == 1){ + error_log("EXEC: ".$sql); + } + try { + if ($this->conn){ + return $this->conn->exec($sql); + } + } catch (PDOException $e){ + error_log("EXEC ERROR: ".$sql); + } + return -1; + } + + public function createUpdateDDL($schema,$table,$idents,$data){ + $da = array(); + $di = array(); + foreach ($data as $col => $val){ + array_push($da,$col."=".$this->value($val)); + } + foreach ($idents as $col => $val){ + array_push($di,$col."=".$this->value($val)); + } + if ($schema != null){$schema = $schema.".";} + $updsql = "UPDATE ".$schema.$table." SET ".join(",",$da)." WHERE ".join(" AND ",$di).";"; + return $updsql; + } + + public function createInsertDDL($schema,$table,$data){ + $dc = array(); + $dv = array(); + foreach ($data as $col => $val){ + array_push($dc,$col); + array_push($dv,$this->value($val)); + } + if ($schema != null){$schema = $schema.".";} + $inssql = "INSERT INTO ".$schema.$table." (".join(",",$dc).") VALUES (".join(",",$dv).");"; + return $inssql; + } + public function createReplaceDDL($table,$data){ + $dc = array(); + $dv = array(); + foreach ($data as $col => $val){ + array_push($dc,$col); + array_push($dv,$this->value($val)); + } + $inssql = "REPLACE INTO ".$table." (".join(",",$dc).") VALUES (".join(",",$dv).");"; + return $inssql; + } + + public function newuuid(){ + if ($this->dbconf["type"] == "sqlite"){ + $nid = $this->query("SELECT lower(hex( randomblob(4)) || '-' || hex( randomblob(2)) || '-' || hex( randomblob(2)) || '-' || hex( randomblob(2)) || '-' || hex(randomblob(6))) as id;"); + } else if ($this->dbconf["type"] == "pgsql"){ + $nid = $this->query("SELECT uuid_in(md5(random()::text || clock_timestamp()::text)::cstring) as id"); + } + + return $nid["id"]; + } + + public function __destruct(){ + $this->conn = null; + } +} +?> \ No newline at end of file diff --git a/pointeuse/server/home/dks/public_html/htx/lib/dksssh.php b/pointeuse/server/home/dks/public_html/htx/lib/dksssh.php new file mode 100644 index 00000000..eea19196 --- /dev/null +++ b/pointeuse/server/home/dks/public_html/htx/lib/dksssh.php @@ -0,0 +1,65 @@ +cfg = $cfg; + if (!($this->conn = ssh2_connect($this->cfg->sshhost, $this->cfg->sshport))) { + file_put_contents('cmds.log',$this->cfg->sshhost." connection FAILED!"."\n",FILE_APPAEND); + throw new Exception('Cannot connect to server'); + } + #$fingerprint = ssh2_fingerprint($this->connection, SSH2_FINGERPRINT_MD5 | SSH2_FINGERPRINT_HEX); + #if (strcmp($this->ssh_server_fp, $fingerprint) !== 0) { + # throw new Exception('Unable to verify server identity!'); + #} + //error_log(print_r($this->cfg,true)); + if (!ssh2_auth_password($this->conn, $this->cfg->sshuser, $this->cfg->sshpwd)) { + throw new Exception('USER Autentication rejected by server'); + } + } + public function __destruct(){ + $this->disconnect(); + } + public function hasConnection(){ + if ($this->conn != null){ return true;} + return false; + } + public function connect($cfg) { + //array("sshhost" => "","sshuser" => "","sshport" => "","sshfp" => "","sshpwd" =>"", "pubfile" => "", "privfile" =>"") + $this->cfg = $cfg; + if (!($this->conn = ssh2_connect($this->cfg->sshhost, $this->cfg->sshport))) { + file_put_contents('cmds.log',$this->cfg->sshhost." connection FAILED!"."\n",FILE_APPEND); + throw new Exception('Cannot connect to server'); + } + #$fingerprint = ssh2_fingerprint($this->connection, SSH2_FINGERPRINT_MD5 | SSH2_FINGERPRINT_HEX); + #if (strcmp($this->ssh_server_fp, $fingerprint) !== 0) { + # throw new Exception('Unable to verify server identity!'); + #} + //error_log(print_r($this->cfg,true)); + if (!ssh2_auth_password($this->conn, $this->cfg->sshuser, $this->cfg->sshpwd)) { + throw new Exception('USER Autentication rejected by server'); + } + } + public function exec($cmd) { + $data = null; + if ($this->conn){ + if (!($stream = ssh2_exec($this->conn, $cmd))) { + file_put_contents('cmds.log',$cmd." FAILED!"."\n".FILE_APPEND); + throw new Exception('SSH command failed'); + } + stream_set_blocking($stream, true); + $data = ""; + while ($buf = fread($stream, 4096)) { + $data .= $buf; + } + fclose($stream); + } + return $data; + } + public function disconnect() { + #$this->exec('echo "EXITING" && exit;'); + $this->conn = null; + } + +} +?> \ No newline at end of file diff --git a/pointeuse/server/home/dks/public_html/htx/lib/modules/data.php b/pointeuse/server/home/dks/public_html/htx/lib/modules/data.php new file mode 100644 index 00000000..3d0e32f6 --- /dev/null +++ b/pointeuse/server/home/dks/public_html/htx/lib/modules/data.php @@ -0,0 +1,28 @@ +dbh = $dblink; + $this->cfg = $cfg; + } + public function __destruct(){ + $this->dbh = null; + } + public function query($sql){ + return $this->dbh->query($sql); + } + public function queryarray($sql){ + return $this->dbh->queryarray($sql); + } + public function querybykey($key,$sql){ + return $this->dbh->querybykey($key,$sql); + } + public function exec($sql){ + return $this->dbh->exec($sql); + } + public function newuuid(){ + return $this->dbh->newuuid(); + } +} +?> \ No newline at end of file diff --git a/pointeuse/server/home/dks/public_html/htx/lib/modules/ovpn.php b/pointeuse/server/home/dks/public_html/htx/lib/modules/ovpn.php new file mode 100644 index 00000000..38279e07 --- /dev/null +++ b/pointeuse/server/home/dks/public_html/htx/lib/modules/ovpn.php @@ -0,0 +1,33 @@ +dbh = $dblink; + $this->cfg = $cfg; + } + public function __destruct(){ + $this->dbh = null; + } + + public function getOnlineClients($name = null){ + $ovpnssh = new dksssh(); + $sshsrv = array("sshhost"=> $this->cfg["ovpn"]["serverhost"], + "sshuser" => $this->cfg["ovpn"]["sshuser"] , + "sshpwd" => $this->cfg["ovpn"]["sshpwd"], + "sshport" => $this->cfg["ovpn"]["sshport"] + ); + $strres = ""; + if ($name != null){ + $strres = $ovpnssh->exec("bin/syncstationdb.pl -st ".$name,$sshsrv); + } else { + $strres = $ovpnssh->exec("bin/syncstationdb.pl -l",$sshsrv); + } + $ret = null; + if ($strres != ""){ + $ret = json_decode($strres); + } + return $res; + } +} +?> \ No newline at end of file diff --git a/pointeuse/server/home/dks/public_html/htx/lib/modules/ssh.php b/pointeuse/server/home/dks/public_html/htx/lib/modules/ssh.php new file mode 100644 index 00000000..193f6668 --- /dev/null +++ b/pointeuse/server/home/dks/public_html/htx/lib/modules/ssh.php @@ -0,0 +1,59 @@ +dbh = $dblink; + $this->cfg = $cfg; + } + public function __destruct(){ + $this->dbh = null; + } + + public function exec($host,$cmd){ + $sshcfg = null; + $retdata = null; + $hfile = $this->cfg["datapath"].'/hosts/'.$host.".json"; + file_put_contents('cmds.log',date("Y-m-d H:i:s").";".$host.";Send CMD:".$cmd."\n",FILE_APPEND); + if (file_exists($hfile)){ + $sshcfg = json_decode(file_get_contents($hfile)); + } else { + return array("error" => "Host ".$hfile." unknown!"); + } + if ($sshcfg != null){ + $ssh = new dksssh($sshcfg); + if ($ssh->hasConnection()){ + file_put_contents('cmds.log',date("Y-m-d H:i:s").";".$host.";Connected\n",FILE_APPEND); + $retdata = $ssh->exec($cmd); + file_put_contents('cmds.log',date("Y-m-d H:i:s").";".$host.";Exec Done\n",FILE_APPEND); + } else { + return array("error" => "Connection error!"); + } + + } + return array("output" => $retdata); + } + + // public function update_station_staff($schema,$id_staff,$data){ + // //get staff data from pot db + // if (file_exists($this->cfg["datapath"].'/'.$schema.".sqlite")){ + // $stdata = $this->dbh->query("select id,surname,prename,timetrackerpin as pin,timetrackerlang as language,timetrackers as trackers,timetrackerrestriction as restriction,isdeleted,case when istimetrackerenabled is not true then true else false end as isdisabled from ".$schema.".staff where id='".$id_staff."';"); + // $csqlite = new database(array("type" => "sqlite","dbfile" => $this->cfg["datapath"].'/'.$schema.".sqlite")); + // $sql = $csqlite->createReplaceDDL("staff",$stadata); + // $csqlite->exec($sql); + // } + + // //insert into local sqlite db + // //update databases on stations + // } + + // public function update_track($schema,$stampds,$src){ + // //update trackdata in trackdb put in $stamp; + // //if (trfrom == station) + // //sync to station + // //if (trfrom == db) + // //sync to pot db + // } + +} +?> diff --git a/pointeuse/server/home/dks/public_html/index.html b/pointeuse/server/home/dks/public_html/index.html new file mode 100644 index 00000000..788961ea --- /dev/null +++ b/pointeuse/server/home/dks/public_html/index.html @@ -0,0 +1,3 @@ +

    system works!

    + + diff --git a/pointeuse/server/home/dks/public_html/index.php b/pointeuse/server/home/dks/public_html/index.php new file mode 100644 index 00000000..5f3cf5c1 --- /dev/null +++ b/pointeuse/server/home/dks/public_html/index.php @@ -0,0 +1,5 @@ + diff --git a/pointeuse/vpn/DKS-VPN-dbs-hourtrax.ovpn b/pointeuse/vpn/DKS-VPN-dbs-hourtrax.ovpn new file mode 100644 index 00000000..f5b5d7e9 --- /dev/null +++ b/pointeuse/vpn/DKS-VPN-dbs-hourtrax.ovpn @@ -0,0 +1,153 @@ +client +dev tun +proto udp +remote vsrv01.dks.lu 1098 +remote arandks.lu 1098 + +remote-random +resolv-retry infinite +nobind +persist-key +persist-tun +mute-replay-warnings + +-----BEGIN CERTIFICATE----- +MIIDHjCCAgagAwIBAgIJAK61AhpxApOUMA0GCSqGSIb3DQEBCwUAMA8xDTALBgNV +BAMMBGFyYW4wHhcNMTcxMjE4MTM0MTIyWhcNMjcxMjE2MTM0MTIyWjAPMQ0wCwYD +VQQDDARhcmFuMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA1TydPk4X +8YyPjXI0htiMsM9C5jP0iH/Hgl7w+t0NL6fvcJhwy8BntJ/FRlS/GFoszmH+0zSt +pVeymgEwSQ2SrZixSkln2XhbTIH/NUEHosdllECJgj83W0Kpbtms8Cs6/FfhvMB4 +4o/GnN/mkmA9kslguStksV2vQh98Os9rw5gEKM5qFYO5FYUZIIrcsLgyzztPpw4H +vhrAzxuuu+zg9cOGAihlWV+CSlQJDZyC9hH9xal8UsTlYn9HFqVjr39k7OJg0WC6 +gyjQ92nzqEw49Jkb3NMAarF0zPcP25WV97Aq7EDZV/G8LZbg4p+xCrkz2iUJttu1 +CZjhS9uNsvIAYQIDAQABo30wezAdBgNVHQ4EFgQUqVEvl+MVxdWqNx36igfxqjrJ +f9QwPwYDVR0jBDgwNoAUqVEvl+MVxdWqNx36igfxqjrJf9ShE6QRMA8xDTALBgNV +BAMMBGFyYW6CCQCutQIacQKTlDAMBgNVHRMEBTADAQH/MAsGA1UdDwQEAwIBBjAN +BgkqhkiG9w0BAQsFAAOCAQEAysh4aGsnv4CebGvzZ9mZlmK5o4JTj4bqRw8sFe4h +wW/bZ0ggMnnvNZF1VJJgO/UQQq2gIiOw7zLrlSmPHIhRPkQspemk6uU0m2h6K9rn +AnX3qeVP5dXbZsqr1jI1/aCzxSW5hu6WUfR3Q+u1pGm9HePhrRJj0djW8Kd7UO+s +PfpIN9gbfLoLnAfCJIc3BccBoD5IqU4s7vleekQGCJHloT5S3MefiIUg7d8leW4V +8PiCohkgHwMOZy3ACy1ZPuT92x+7JCaNV56X7iT3GZhkyQ4tSKu3UpMFkz8obYKw +8RrNsXXBRWgnuakkMY6wHJJZBPJn+qDrWbO7nxVTOqY22g== +-----END CERTIFICATE----- + + +Certificate: + Data: + Version: 3 (0x2) + Serial Number: + be:8b:8f:9b:b2:f9:6b:8b:12:b5:6e:d1:f2:a3:dc:f4 + Signature Algorithm: sha256WithRSAEncryption + Issuer: CN=aran + Validity + Not Before: Nov 7 10:59:12 2019 GMT + Not After : Nov 4 10:59:12 2029 GMT + Subject: CN=dbs-hourtrax + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + Public-Key: (2048 bit) + Modulus: + 00:c1:64:7f:84:7c:1d:b0:45:11:12:22:46:3d:9d: + 85:29:c6:8b:5b:20:7a:3c:56:92:9f:d4:02:4a:b6: + 3f:1d:08:6b:e9:cd:21:54:24:3e:c7:38:51:db:09: + 75:0a:1a:b1:d8:dd:a2:e7:1e:c3:dd:78:ee:6c:d6: + c4:cf:65:3b:0f:42:3d:d5:c0:67:ca:8c:37:55:03: + a5:32:45:58:ed:65:b4:ae:74:0f:99:9a:23:3e:1a: + f7:b4:64:52:86:8f:17:ff:98:d8:d9:b8:82:5f:ba: + 22:9b:10:ba:19:0c:36:c9:82:54:99:20:7a:c8:1b: + d6:84:db:39:79:2e:0c:ac:a1:d0:18:ac:e8:47:c3: + 41:bf:80:32:d6:2c:b5:e4:2a:bf:cf:61:56:92:90: + 6a:df:92:74:52:52:1d:3e:14:b0:fd:55:5a:41:a5: + de:7e:2d:cf:7a:04:a6:44:4a:a9:f2:fe:60:2a:89: + 0c:53:a5:69:f8:92:8c:6c:de:24:1a:6c:cc:f9:43: + 26:71:9d:cc:f0:d1:3c:75:3f:b6:bf:c5:9a:02:06: + d4:49:f8:3c:e2:58:72:5c:86:9a:dc:0a:61:ef:92: + 35:9b:ff:33:86:6b:48:fe:40:b6:e9:a6:9f:1b:25: + 12:78:dc:81:83:64:cb:ba:b9:8c:4e:90:52:cc:f9: + 80:51 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Basic Constraints: + CA:FALSE + X509v3 Subject Key Identifier: + A9:A4:B5:C8:AA:D9:EA:BF:59:D3:C4:6E:0C:A1:43:92:E7:DF:0E:EC + X509v3 Authority Key Identifier: + keyid:A9:51:2F:97:E3:15:C5:D5:AA:37:1D:FA:8A:07:F1:AA:3A:C9:7F:D4 + DirName:/CN=aran + serial:AE:B5:02:1A:71:02:93:94 + + X509v3 Extended Key Usage: + TLS Web Client Authentication + X509v3 Key Usage: + Digital Signature + Signature Algorithm: sha256WithRSAEncryption + 0f:e0:45:49:d3:96:90:7d:d7:8f:4d:35:b3:7e:f4:b3:4b:af: + 4c:97:68:25:d7:3b:48:cc:9b:e4:4b:d5:61:bd:a8:f0:d5:df: + 60:b0:c1:c0:cc:1a:39:b4:49:b4:dc:39:41:52:1a:10:22:2a: + 7e:04:64:83:6a:b2:af:76:69:c5:5a:74:e0:26:97:23:df:d7: + 23:a1:34:e4:35:74:4b:f8:59:47:44:91:6f:31:dc:0f:05:96: + f0:76:2d:47:b6:28:cf:f6:a6:9b:ae:32:d0:54:84:0b:d7:f0: + cf:b5:e5:ed:19:1a:72:df:db:b9:fb:82:93:e3:ee:aa:09:c0: + dd:71:82:d4:9d:c0:6b:82:63:58:fa:0f:5b:5d:c3:f7:86:44: + b5:be:21:37:cf:3e:5b:82:b5:e7:46:fe:c3:03:94:a4:49:27: + df:ab:f6:79:39:1a:4f:4c:db:0b:4d:bc:72:c8:80:36:16:b0: + c0:52:53:52:75:86:9c:04:10:04:fc:8b:be:40:91:61:81:f6: + 07:6b:a5:89:db:b1:7a:eb:50:19:ad:39:8a:a3:da:bd:f6:ed: + d7:70:e7:43:c9:df:3c:28:49:ce:ac:5c:94:1f:b1:54:c3:69: + da:f2:f7:36:a4:8e:a3:98:e8:ee:9e:59:03:90:69:08:22:1b: + bc:48:b3:b6 +-----BEGIN CERTIFICATE----- +MIIDQjCCAiqgAwIBAgIRAL6Lj5uy+WuLErVu0fKj3PQwDQYJKoZIhvcNAQELBQAw +DzENMAsGA1UEAwwEYXJhbjAeFw0xOTExMDcxMDU5MTJaFw0yOTExMDQxMDU5MTJa +MBcxFTATBgNVBAMMDGRicy1ob3VydHJheDCCASIwDQYJKoZIhvcNAQEBBQADggEP +ADCCAQoCggEBAMFkf4R8HbBFERIiRj2dhSnGi1sgejxWkp/UAkq2Px0Ia+nNIVQk +Psc4UdsJdQoasdjdoucew9147mzWxM9lOw9CPdXAZ8qMN1UDpTJFWO1ltK50D5ma +Iz4a97RkUoaPF/+Y2Nm4gl+6IpsQuhkMNsmCVJkgesgb1oTbOXkuDKyh0Bis6EfD +Qb+AMtYsteQqv89hVpKQat+SdFJSHT4UsP1VWkGl3n4tz3oEpkRKqfL+YCqJDFOl +afiSjGzeJBpszPlDJnGdzPDRPHU/tr/FmgIG1En4POJYclyGmtwKYe+SNZv/M4Zr +SP5AtummnxslEnjcgYNky7q5jE6QUsz5gFECAwEAAaOBkDCBjTAJBgNVHRMEAjAA +MB0GA1UdDgQWBBSppLXIqtnqv1nTxG4MoUOS598O7DA/BgNVHSMEODA2gBSpUS+X +4xXF1ao3HfqKB/GqOsl/1KETpBEwDzENMAsGA1UEAwwEYXJhboIJAK61AhpxApOU +MBMGA1UdJQQMMAoGCCsGAQUFBwMCMAsGA1UdDwQEAwIHgDANBgkqhkiG9w0BAQsF +AAOCAQEAD+BFSdOWkH3Xj001s370s0uvTJdoJdc7SMyb5EvVYb2o8NXfYLDBwMwa +ObRJtNw5QVIaECIqfgRkg2qyr3ZpxVp04CaXI9/XI6E05DV0S/hZR0SRbzHcDwWW +8HYtR7Yoz/amm64y0FSEC9fwz7Xl7Rkact/bufuCk+PuqgnA3XGC1J3Aa4JjWPoP +W13D94ZEtb4hN88+W4K150b+wwOUpEkn36v2eTkaT0zbC028csiANhawwFJTUnWG +nAQQBPyLvkCRYYH2B2uliduxeutQGa05iqPavfbt13DnQ8nfPChJzqxclB+xVMNp +2vL3NqSOo5jo7p5ZA5BpCCIbvEiztg== +-----END CERTIFICATE----- + + +-----BEGIN PRIVATE KEY----- +MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDBZH+EfB2wRRES +IkY9nYUpxotbIHo8VpKf1AJKtj8dCGvpzSFUJD7HOFHbCXUKGrHY3aLnHsPdeO5s +1sTPZTsPQj3VwGfKjDdVA6UyRVjtZbSudA+ZmiM+Gve0ZFKGjxf/mNjZuIJfuiKb +ELoZDDbJglSZIHrIG9aE2zl5LgysodAYrOhHw0G/gDLWLLXkKr/PYVaSkGrfknRS +Uh0+FLD9VVpBpd5+Lc96BKZESqny/mAqiQxTpWn4koxs3iQabMz5QyZxnczw0Tx1 +P7a/xZoCBtRJ+DziWHJchprcCmHvkjWb/zOGa0j+QLbppp8bJRJ43IGDZMu6uYxO +kFLM+YBRAgMBAAECggEAMBTyd1f8caTaV63Z1NvjDb3lS+TJP1Mu5Tnqz/R7wJYl +bl2n2amhShrAjzrMtJRqf0arh9boT5oPfVPwXrgGdQa9JPXPWFaAM0zSt6ryLyPI +Rk9oyYG/HWPLDjibJAVTrCKuV4M+NtqqW+9OtYeJ35PdwKyImlQBg8qVgYFneUva +SWu7SoTHxF3hT5RGOnAfkWtI+ep5sdxH7b9ptEkevRznahA0aysnFwaAcPTTQsX0 +E5hdTJzkWJ4hgEgyQCgzZMfJgCgGW/Uz2AxhnZhcPtK0lVEn8y/N0ZzTbWSaTMeu +5Wp9noVfIP7w7AWWknnVxKzrM4zSbOAysow549+OoQKBgQD8+LHVgikwZd0OTmVC +9GGaPtx5mMznNoH+DJv01EFd9UAGdg+NJfiRtC6dYAs3rFDprbk7ac5sjgepN229 +vHR7BPmWzZCMcoiMRotnVVyN9eAdZy0lYBqiQ7ZY5JSpg8sW2AQWUYE5BrLkkSI4 +YHuvKJE24SlvFJwDD5BiGN4dnQKBgQDDtTTZK5k3AgFSQj9USdZgJLnd7k2XY3au +3S3K13IuU4jcJ3kORGMVNBKwUdyGTHC1p3IBaiKj9rYXfU6sz55VNO/AOJgJmSg7 +VWHMuroWplO4jQuNFjbiVMoFCOYft4GuaZZzgjrS8ENJ3LxK81d3Ih+dtS3p1d4x +4ShHrgUJRQKBgQDm245u6nnsUQmLJMAEekEYIoXR8kAMQRIgZiFtLMb6l/X174gB +p8VQMr7Xn+6cwASXPJLuRYC8UGFta8gafwFNwxyDItXnVh6G5VoS0zPD2b7NFnt8 +wFeN/X1LYk7I5B1Sm5AfTgI/qH1ZWZmBGYvGLZ9YFeNaG9TEdk+tNkR9gQKBgCrY +pTVWgji0y61Cq7K8Z56s67RW083tDLLD4Z6jBHB4AWKRkcM53adquxy3D1ynp5Vd +j2wX3HWhMcR6vpq+6Z8l88dVnJOdYF19F+hGiS8kQvgIiRreXi22+nOXuyn+dvnE +TBgFzvMXfuPQ27hdBi0i32EbpW2oUPkCnlrzEk8xAoGAcLR9CGVUzUkJ83jpoqoB +O+hrzY9hLX3+HLnfAJjeNNk5LlSuDJbhjIRc/xAA/SAgayPMWy+7mp9gMFBV6O6n +9y8ag4sGSXasTBJuFJlQ1S80Ct5igx1aDFGQOjtBXPWGCjuLPJwgLDq0GcSrSf6W +Z+ygH5b1eq3wkGPVCvgJEqQ= +-----END PRIVATE KEY----- + +comp-lzo +verb 3 +mute 20 +cipher AES-256-CBC diff --git a/pointeuse/vpn/DKS-VPN-dhart-hourtrax01.ovpn b/pointeuse/vpn/DKS-VPN-dhart-hourtrax01.ovpn new file mode 100644 index 00000000..6c1ca364 --- /dev/null +++ b/pointeuse/vpn/DKS-VPN-dhart-hourtrax01.ovpn @@ -0,0 +1,153 @@ +client +dev tun +proto udp +remote vsrv01.dks.lu 1098 +remote arandks.lu 1098 + +remote-random +resolv-retry infinite +nobind +persist-key +persist-tun +mute-replay-warnings + +-----BEGIN CERTIFICATE----- +MIIDHjCCAgagAwIBAgIJAK61AhpxApOUMA0GCSqGSIb3DQEBCwUAMA8xDTALBgNV +BAMMBGFyYW4wHhcNMTcxMjE4MTM0MTIyWhcNMjcxMjE2MTM0MTIyWjAPMQ0wCwYD +VQQDDARhcmFuMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA1TydPk4X +8YyPjXI0htiMsM9C5jP0iH/Hgl7w+t0NL6fvcJhwy8BntJ/FRlS/GFoszmH+0zSt +pVeymgEwSQ2SrZixSkln2XhbTIH/NUEHosdllECJgj83W0Kpbtms8Cs6/FfhvMB4 +4o/GnN/mkmA9kslguStksV2vQh98Os9rw5gEKM5qFYO5FYUZIIrcsLgyzztPpw4H +vhrAzxuuu+zg9cOGAihlWV+CSlQJDZyC9hH9xal8UsTlYn9HFqVjr39k7OJg0WC6 +gyjQ92nzqEw49Jkb3NMAarF0zPcP25WV97Aq7EDZV/G8LZbg4p+xCrkz2iUJttu1 +CZjhS9uNsvIAYQIDAQABo30wezAdBgNVHQ4EFgQUqVEvl+MVxdWqNx36igfxqjrJ +f9QwPwYDVR0jBDgwNoAUqVEvl+MVxdWqNx36igfxqjrJf9ShE6QRMA8xDTALBgNV +BAMMBGFyYW6CCQCutQIacQKTlDAMBgNVHRMEBTADAQH/MAsGA1UdDwQEAwIBBjAN +BgkqhkiG9w0BAQsFAAOCAQEAysh4aGsnv4CebGvzZ9mZlmK5o4JTj4bqRw8sFe4h +wW/bZ0ggMnnvNZF1VJJgO/UQQq2gIiOw7zLrlSmPHIhRPkQspemk6uU0m2h6K9rn +AnX3qeVP5dXbZsqr1jI1/aCzxSW5hu6WUfR3Q+u1pGm9HePhrRJj0djW8Kd7UO+s +PfpIN9gbfLoLnAfCJIc3BccBoD5IqU4s7vleekQGCJHloT5S3MefiIUg7d8leW4V +8PiCohkgHwMOZy3ACy1ZPuT92x+7JCaNV56X7iT3GZhkyQ4tSKu3UpMFkz8obYKw +8RrNsXXBRWgnuakkMY6wHJJZBPJn+qDrWbO7nxVTOqY22g== +-----END CERTIFICATE----- + + +Certificate: + Data: + Version: 3 (0x2) + Serial Number: + 77:af:a0:10:be:9e:06:bd:43:fe:d0:5f:c0:3f:79:66 + Signature Algorithm: sha256WithRSAEncryption + Issuer: CN=aran + Validity + Not Before: Jan 13 15:13:04 2021 GMT + Not After : Jan 11 15:13:04 2031 GMT + Subject: CN=dhart-hourtrax01 + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + Public-Key: (2048 bit) + Modulus: + 00:b4:38:00:8e:31:7b:f6:56:cf:5a:ec:8a:96:77: + c1:89:d2:8d:4f:d8:8f:c7:73:05:37:7e:05:81:51: + 2e:81:34:3c:5a:2a:42:87:f8:80:d6:9a:4c:6b:80: + c1:50:4a:22:a8:dd:79:89:b3:1c:a6:5f:e4:5e:b6: + 02:a0:5f:49:09:03:13:e0:bf:c8:4a:1f:88:45:f7: + 58:e9:56:5c:e1:cd:b5:5e:f8:70:24:39:cd:e4:fd: + fc:60:44:5c:68:2c:4d:76:cf:9f:9a:5a:5e:01:8c: + 55:aa:76:6c:fe:95:a6:e8:d2:b3:9b:66:25:39:4e: + 32:1a:9b:db:79:bf:92:12:06:92:b7:e9:60:cf:d6: + c8:10:f7:d0:c4:3b:7e:32:cb:91:c5:c8:b8:d5:03: + 2f:3b:a1:76:2d:3d:76:f2:3d:e9:bf:b2:91:82:6f: + bc:dc:44:a3:93:68:b5:42:a4:fc:49:cc:93:2e:52: + c7:90:5e:f0:0a:e3:f8:55:f9:4f:4f:2b:51:e7:38: + d9:49:a3:1d:a2:c5:de:76:35:24:f7:32:7f:8f:56: + 68:33:a0:8d:98:bf:2a:1e:1c:88:4f:64:8a:06:b2: + 26:c1:64:56:3b:92:40:5d:37:03:03:0e:10:b9:5e: + 2e:e3:02:32:16:c5:74:c4:40:40:4a:fd:31:e1:0d: + 9f:1b + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Basic Constraints: + CA:FALSE + X509v3 Subject Key Identifier: + D3:05:48:E6:F9:CC:20:1B:19:A5:3E:A5:7C:18:31:AA:F5:30:23:FF + X509v3 Authority Key Identifier: + keyid:A9:51:2F:97:E3:15:C5:D5:AA:37:1D:FA:8A:07:F1:AA:3A:C9:7F:D4 + DirName:/CN=aran + serial:AE:B5:02:1A:71:02:93:94 + + X509v3 Extended Key Usage: + TLS Web Client Authentication + X509v3 Key Usage: + Digital Signature + Signature Algorithm: sha256WithRSAEncryption + 8a:6a:80:62:5c:6f:34:b4:c9:94:ff:2e:a2:b1:40:de:28:7f: + 73:0e:8f:8b:6f:6d:f3:96:30:95:7d:9d:e2:a8:f0:e9:86:2d: + 72:27:08:d6:51:ba:a7:0f:a6:a9:c8:85:b0:c3:3a:4e:62:c3: + 3d:22:f9:19:14:41:a6:e0:5d:6c:a7:a4:3a:0e:f5:91:c6:e7: + ae:a8:ac:74:ca:c8:df:08:e7:a9:a1:9c:1c:69:ef:f6:de:23: + 0a:6f:5c:62:7d:3e:30:e1:d1:dc:59:c4:54:e8:69:fc:52:51: + d5:22:d7:9e:ba:15:5d:28:a8:00:6b:3f:4c:61:3c:f8:ba:4e: + 0b:be:15:5f:7c:a0:f7:d9:c0:eb:00:15:6d:59:87:ee:d1:56: + c3:9f:3d:eb:ce:c0:aa:5e:d4:08:f1:d4:48:52:92:a5:31:25: + 1c:57:0c:f2:86:ec:d1:7a:b5:3d:d7:71:17:de:de:e6:2e:08: + 97:a3:4a:63:1b:a9:0e:00:bd:d9:1f:b8:df:84:55:e0:f1:a9: + ce:d7:8e:5b:ca:3d:a5:60:11:c0:f2:11:b8:33:6e:fb:20:57: + d2:02:ab:4b:32:61:52:29:7e:b4:fa:1e:e6:35:17:6d:9f:08: + a2:c7:f1:f7:1f:e7:fd:23:bd:e2:41:d7:a0:6a:4b:6c:05:76: + 2b:c7:9f:f1 +-----BEGIN CERTIFICATE----- +MIIDRTCCAi2gAwIBAgIQd6+gEL6eBr1D/tBfwD95ZjANBgkqhkiG9w0BAQsFADAP +MQ0wCwYDVQQDDARhcmFuMB4XDTIxMDExMzE1MTMwNFoXDTMxMDExMTE1MTMwNFow +GzEZMBcGA1UEAwwQZGhhcnQtaG91cnRyYXgwMTCCASIwDQYJKoZIhvcNAQEBBQAD +ggEPADCCAQoCggEBALQ4AI4xe/ZWz1rsipZ3wYnSjU/Yj8dzBTd+BYFRLoE0PFoq +Qof4gNaaTGuAwVBKIqjdeYmzHKZf5F62AqBfSQkDE+C/yEofiEX3WOlWXOHNtV74 +cCQ5zeT9/GBEXGgsTXbPn5paXgGMVap2bP6VpujSs5tmJTlOMhqb23m/khIGkrfp +YM/WyBD30MQ7fjLLkcXIuNUDLzuhdi09dvI96b+ykYJvvNxEo5NotUKk/EnMky5S +x5Be8Arj+FX5T08rUec42UmjHaLF3nY1JPcyf49WaDOgjZi/Kh4ciE9kigayJsFk +VjuSQF03AwMOELleLuMCMhbFdMRAQEr9MeENnxsCAwEAAaOBkDCBjTAJBgNVHRME +AjAAMB0GA1UdDgQWBBTTBUjm+cwgGxmlPqV8GDGq9TAj/zA/BgNVHSMEODA2gBSp +US+X4xXF1ao3HfqKB/GqOsl/1KETpBEwDzENMAsGA1UEAwwEYXJhboIJAK61Ahpx +ApOUMBMGA1UdJQQMMAoGCCsGAQUFBwMCMAsGA1UdDwQEAwIHgDANBgkqhkiG9w0B +AQsFAAOCAQEAimqAYlxvNLTJlP8uorFA3ih/cw6Pi29t85YwlX2d4qjw6YYtcicI +1lG6pw+mqciFsMM6TmLDPSL5GRRBpuBdbKekOg71kcbnrqisdMrI3wjnqaGcHGnv +9t4jCm9cYn0+MOHR3FnEVOhp/FJR1SLXnroVXSioAGs/TGE8+LpOC74VX3yg99nA +6wAVbVmH7tFWw589687Aql7UCPHUSFKSpTElHFcM8obs0Xq1PddxF97e5i4Il6NK +YxupDgC92R+434RV4PGpzteOW8o9pWARwPIRuDNu+yBX0gKrSzJhUil+tPoe5jUX +bZ8Iosfx9x/n/SO94kHXoGpLbAV2K8ef8Q== +-----END CERTIFICATE----- + + +-----BEGIN PRIVATE KEY----- +MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQC0OACOMXv2Vs9a +7IqWd8GJ0o1P2I/HcwU3fgWBUS6BNDxaKkKH+IDWmkxrgMFQSiKo3XmJsxymX+Re +tgKgX0kJAxPgv8hKH4hF91jpVlzhzbVe+HAkOc3k/fxgRFxoLE12z5+aWl4BjFWq +dmz+labo0rObZiU5TjIam9t5v5ISBpK36WDP1sgQ99DEO34yy5HFyLjVAy87oXYt +PXbyPem/spGCb7zcRKOTaLVCpPxJzJMuUseQXvAK4/hV+U9PK1HnONlJox2ixd52 +NST3Mn+PVmgzoI2YvyoeHIhPZIoGsibBZFY7kkBdNwMDDhC5Xi7jAjIWxXTEQEBK +/THhDZ8bAgMBAAECggEADs12xjcsTmyM9ZPuQjOt8usXblKEZMZ+zDMOsrN/VV98 +AY/tDQwNURM1abMWrciZFjOy0uuiU8wWjuz2REPvVM0q6c/23JfAcrbBV9EfKfDi +j91qIJ+a2M8/1oxm5quU5UhifKQlio0DUFAP3c1e+0qrM/1s20sf9G2O1m40ykQa +k4rIdKdnzXwasYsWnjjrx96En7PmkGkE4V8dk2YUTI7/7fVrI7tKaPjHbOdzVYkH +45MDsfn6bItUwdiOxP63AY4ThPFU1g/lkfCb8f+wWRJId8Hy5BW9/pVcdMCtRjbA +4uC++W/Emadskbm2fIsfWzYURDFdhNu7fZe8iu/qoQKBgQDmdm3G8oKj5azcuEnI +ZluzmgMVQpV0y+J7gqq4Y0VgS3iVApNweLguwUDg7Fu263S2Ec6cxuh75+6w1ofe +j9gi4SvIpnzcCct+uyfnjryfA+pBtGJz35e6SmBz/YRELC97y4C0HPZAhoeDPavt +TL2DnCpsNQ/7OLqy9Y3viBR6SwKBgQDIMEwvypkHo9rB8C5ip2lyjyb3BjSNSj5G +mLEiyNEUMgNFvUms09uuBQhgEzBjI9SiKMplbOJv1OGHW87QNz2wFLHYzekPjHuz +As6QptNDSNwrWI8PNibQlyFHcDYQjBZgH4ToEUIRLUkxb/UUboA9Z2YWt0IFESUv +TD7KwcRscQKBgHtm5pkkubcxAEKfm0JnLKsayJPVt1l24qrn6Koa3ccWIlcHrhMH +UPgYGrlVVja4FSJ4nn1sNIhERJcECHSv6TekAmHKZAkeZYxSgqeG0pEC86iDAkSx +cPkbYlI5aV1nm3VaHmxTJbifUGiB2VGTSdbzA/Q05X3Lfozc10dvQifJAoGBALNq +3g2DRc4cI+bnjZsrsg1TkbeZ3yW2ocQB+9hSJVk1TcuGT+7O3jfEGPKKoDZqmZtQ +db2bbgKOyCbZuKzSpb4XfiHywmwGG6Of42Svr+7A8VsD/wvCG92dZd0yC7Ke6zrx +ZNvdA9qDPPNLBVtvgg4Giu/XBRundy1B55EvQw1xAoGANOBb6VCblKtG4XBq6Nml +98+oBZoVBI4q6DvisKAYIBFBcNgneAJyg0gaGwTAT0WwOJKn+swIBXeqoyz4iZBY +JUm5fJv8vHgPP6g/w1rtXekhQvyJC1fQxcEQskzRPmv/DGh+b5cRW1vnA/Z3PweV +YdX6gbGaYtPdhVaZbDz+2ks= +-----END PRIVATE KEY----- + +comp-lzo +verb 3 +mute 20 +cipher AES-256-CBC diff --git a/pointeuse/vpn/DKS-VPN-dhart-hourtrax02.ovpn b/pointeuse/vpn/DKS-VPN-dhart-hourtrax02.ovpn new file mode 100644 index 00000000..159dec34 --- /dev/null +++ b/pointeuse/vpn/DKS-VPN-dhart-hourtrax02.ovpn @@ -0,0 +1,153 @@ +client +dev tun +proto udp +remote vsrv01.dks.lu 1098 +remote arandks.lu 1098 + +remote-random +resolv-retry infinite +nobind +persist-key +persist-tun +mute-replay-warnings + +-----BEGIN CERTIFICATE----- +MIIDHjCCAgagAwIBAgIJAK61AhpxApOUMA0GCSqGSIb3DQEBCwUAMA8xDTALBgNV +BAMMBGFyYW4wHhcNMTcxMjE4MTM0MTIyWhcNMjcxMjE2MTM0MTIyWjAPMQ0wCwYD +VQQDDARhcmFuMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA1TydPk4X +8YyPjXI0htiMsM9C5jP0iH/Hgl7w+t0NL6fvcJhwy8BntJ/FRlS/GFoszmH+0zSt +pVeymgEwSQ2SrZixSkln2XhbTIH/NUEHosdllECJgj83W0Kpbtms8Cs6/FfhvMB4 +4o/GnN/mkmA9kslguStksV2vQh98Os9rw5gEKM5qFYO5FYUZIIrcsLgyzztPpw4H +vhrAzxuuu+zg9cOGAihlWV+CSlQJDZyC9hH9xal8UsTlYn9HFqVjr39k7OJg0WC6 +gyjQ92nzqEw49Jkb3NMAarF0zPcP25WV97Aq7EDZV/G8LZbg4p+xCrkz2iUJttu1 +CZjhS9uNsvIAYQIDAQABo30wezAdBgNVHQ4EFgQUqVEvl+MVxdWqNx36igfxqjrJ +f9QwPwYDVR0jBDgwNoAUqVEvl+MVxdWqNx36igfxqjrJf9ShE6QRMA8xDTALBgNV +BAMMBGFyYW6CCQCutQIacQKTlDAMBgNVHRMEBTADAQH/MAsGA1UdDwQEAwIBBjAN +BgkqhkiG9w0BAQsFAAOCAQEAysh4aGsnv4CebGvzZ9mZlmK5o4JTj4bqRw8sFe4h +wW/bZ0ggMnnvNZF1VJJgO/UQQq2gIiOw7zLrlSmPHIhRPkQspemk6uU0m2h6K9rn +AnX3qeVP5dXbZsqr1jI1/aCzxSW5hu6WUfR3Q+u1pGm9HePhrRJj0djW8Kd7UO+s +PfpIN9gbfLoLnAfCJIc3BccBoD5IqU4s7vleekQGCJHloT5S3MefiIUg7d8leW4V +8PiCohkgHwMOZy3ACy1ZPuT92x+7JCaNV56X7iT3GZhkyQ4tSKu3UpMFkz8obYKw +8RrNsXXBRWgnuakkMY6wHJJZBPJn+qDrWbO7nxVTOqY22g== +-----END CERTIFICATE----- + + +Certificate: + Data: + Version: 3 (0x2) + Serial Number: + fb:8e:c6:a9:ef:9e:17:b8:3a:86:ec:04:96:91:18:0b + Signature Algorithm: sha256WithRSAEncryption + Issuer: CN=aran + Validity + Not Before: Jan 13 15:13:10 2021 GMT + Not After : Jan 11 15:13:10 2031 GMT + Subject: CN=dhart-hourtrax02 + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + Public-Key: (2048 bit) + Modulus: + 00:c1:c4:ea:b8:e1:58:6f:94:cf:6a:ca:da:b3:b4: + b0:90:1c:70:11:62:c6:ea:6c:1a:59:af:f0:e7:41: + 92:82:13:4e:51:aa:74:a9:8e:63:bb:4b:cd:f3:31: + 36:4e:f9:a1:86:10:5f:91:74:b2:fe:0b:30:bc:a7: + f3:0e:55:71:9e:a0:b6:34:e8:a1:f7:36:bf:91:86: + 35:27:f1:ba:ef:e5:09:53:19:62:6c:e1:2a:14:be: + d3:bd:cb:4c:0b:5f:3f:15:b4:9f:97:3e:bd:fe:ab: + 79:37:fa:65:1a:c5:c2:ff:31:da:39:51:ea:9f:5d: + 80:6b:a9:56:1e:40:87:38:c7:59:59:6d:06:41:d2: + 53:11:ee:82:00:e8:b0:cc:a3:7f:8a:17:61:d6:e6: + 26:92:2e:0b:2d:24:5e:c5:30:c0:19:fb:0e:b7:5a: + b6:66:93:ad:5e:54:7b:65:f5:ec:1c:1d:b0:c1:df: + f2:bb:c6:57:1f:8d:3d:d1:9e:55:a0:63:a6:09:e6: + 2b:8f:11:87:9a:67:a7:8e:7c:91:d4:57:2b:57:f8: + a9:eb:fb:73:2d:37:28:e6:90:23:0f:a8:74:53:b1: + bc:b0:66:2b:15:21:e9:f9:b5:30:62:5c:45:86:95: + 2a:17:61:e2:9e:f9:2c:ca:e5:a4:38:c0:1e:5c:da: + 10:e1 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Basic Constraints: + CA:FALSE + X509v3 Subject Key Identifier: + FA:D7:5E:07:2F:91:5A:E7:38:D9:2A:5D:1D:F3:67:90:E9:A5:E0:67 + X509v3 Authority Key Identifier: + keyid:A9:51:2F:97:E3:15:C5:D5:AA:37:1D:FA:8A:07:F1:AA:3A:C9:7F:D4 + DirName:/CN=aran + serial:AE:B5:02:1A:71:02:93:94 + + X509v3 Extended Key Usage: + TLS Web Client Authentication + X509v3 Key Usage: + Digital Signature + Signature Algorithm: sha256WithRSAEncryption + 29:35:2e:99:f1:8f:bd:e7:74:a9:4c:62:e4:3d:8c:98:a1:ad: + 26:0f:05:49:86:62:d0:67:e0:70:eb:e4:85:79:02:68:e6:a3: + 29:3a:50:41:f5:59:98:14:de:62:12:74:4b:13:0d:02:3b:66: + 0e:a2:17:dc:7f:95:a3:2a:76:51:49:e9:3a:c7:5a:76:ce:61: + 74:06:b1:c6:7a:50:c6:a2:46:63:7e:4e:2b:1c:49:e1:25:ec: + 65:91:2e:13:10:54:c7:f2:36:d1:ed:61:64:a8:b4:72:38:5d: + 41:3e:fa:dd:79:cc:72:b3:13:4e:bd:9b:2b:85:c3:8d:bf:ba: + 90:0e:26:61:ab:2c:5e:48:ea:27:f6:3d:5e:49:06:9d:28:68: + 96:98:46:d1:2e:c9:6d:67:27:ff:0e:a6:43:e9:a2:cc:bb:35: + 1c:fa:ed:09:f5:3d:fe:97:58:ee:b7:86:0c:38:5a:ff:54:41: + b5:39:40:4b:5e:71:c3:bf:09:e7:bb:fe:ba:a0:8b:31:d8:6e: + c9:ea:ea:fc:da:85:f7:fd:0c:12:5f:09:7f:75:2b:29:a2:ba: + 5a:82:f1:ce:93:76:fe:e1:86:a2:d7:69:3a:e4:e6:e2:37:76: + 54:e6:90:b9:b3:1a:01:77:cf:4b:1f:a1:31:76:95:a1:38:b7: + f0:5b:be:d6 +-----BEGIN CERTIFICATE----- +MIIDRjCCAi6gAwIBAgIRAPuOxqnvnhe4OobsBJaRGAswDQYJKoZIhvcNAQELBQAw +DzENMAsGA1UEAwwEYXJhbjAeFw0yMTAxMTMxNTEzMTBaFw0zMTAxMTExNTEzMTBa +MBsxGTAXBgNVBAMMEGRoYXJ0LWhvdXJ0cmF4MDIwggEiMA0GCSqGSIb3DQEBAQUA +A4IBDwAwggEKAoIBAQDBxOq44VhvlM9qytqztLCQHHARYsbqbBpZr/DnQZKCE05R +qnSpjmO7S83zMTZO+aGGEF+RdLL+CzC8p/MOVXGeoLY06KH3Nr+RhjUn8brv5QlT +GWJs4SoUvtO9y0wLXz8VtJ+XPr3+q3k3+mUaxcL/Mdo5UeqfXYBrqVYeQIc4x1lZ +bQZB0lMR7oIA6LDMo3+KF2HW5iaSLgstJF7FMMAZ+w63WrZmk61eVHtl9ewcHbDB +3/K7xlcfjT3RnlWgY6YJ5iuPEYeaZ6eOfJHUVytX+Knr+3MtNyjmkCMPqHRTsbyw +ZisVIen5tTBiXEWGlSoXYeKe+SzK5aQ4wB5c2hDhAgMBAAGjgZAwgY0wCQYDVR0T +BAIwADAdBgNVHQ4EFgQU+tdeBy+RWuc42SpdHfNnkOml4GcwPwYDVR0jBDgwNoAU +qVEvl+MVxdWqNx36igfxqjrJf9ShE6QRMA8xDTALBgNVBAMMBGFyYW6CCQCutQIa +cQKTlDATBgNVHSUEDDAKBggrBgEFBQcDAjALBgNVHQ8EBAMCB4AwDQYJKoZIhvcN +AQELBQADggEBACk1Lpnxj73ndKlMYuQ9jJihrSYPBUmGYtBn4HDr5IV5Amjmoyk6 +UEH1WZgU3mISdEsTDQI7Zg6iF9x/laMqdlFJ6TrHWnbOYXQGscZ6UMaiRmN+Tisc +SeEl7GWRLhMQVMfyNtHtYWSotHI4XUE++t15zHKzE069myuFw42/upAOJmGrLF5I +6if2PV5JBp0oaJaYRtEuyW1nJ/8OpkPposy7NRz67Qn1Pf6XWO63hgw4Wv9UQbU5 +QEteccO/Cee7/rqgizHYbsnq6vzahff9DBJfCX91KymiulqC8c6Tdv7hhqLXaTrk +5uI3dlTmkLmzGgF3z0sfoTF2laE4t/BbvtY= +-----END CERTIFICATE----- + + +-----BEGIN PRIVATE KEY----- +MIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQDBxOq44VhvlM9q +ytqztLCQHHARYsbqbBpZr/DnQZKCE05RqnSpjmO7S83zMTZO+aGGEF+RdLL+CzC8 +p/MOVXGeoLY06KH3Nr+RhjUn8brv5QlTGWJs4SoUvtO9y0wLXz8VtJ+XPr3+q3k3 ++mUaxcL/Mdo5UeqfXYBrqVYeQIc4x1lZbQZB0lMR7oIA6LDMo3+KF2HW5iaSLgst +JF7FMMAZ+w63WrZmk61eVHtl9ewcHbDB3/K7xlcfjT3RnlWgY6YJ5iuPEYeaZ6eO +fJHUVytX+Knr+3MtNyjmkCMPqHRTsbywZisVIen5tTBiXEWGlSoXYeKe+SzK5aQ4 +wB5c2hDhAgMBAAECggEAB4rZtB6ZaaZ6OGbzAmG7KbDhr9uPcJqKoAkYMHg98rA7 +sTQYXG09dpHpz1iQC5zt66EBh1Dqkrbuy7kh3eH3jTwmO4L+ovfPlyOJOCfRpfrd +VQ285g4RrEMNTOr3581qUDb6q1F25c3Y5xPpEZS3FWXkX6zPnCpwkEBEKONMICqY +9PSDqUkyB74StXV3InWvIEakNPeSjggEPs/+dLXA9nzoSQBEudTefDRjNp9u/2G7 +RWjaWrfezugIUqSfYUCjc+X2Zqfz1TRIdCbZXu0gQd7BaaDyzsoE1ExIsqNDnGBS +upEoHttIOSPUZnJaKGuoLrxysFvxFSrdpL1tzpDAHQKBgQDpk7VXHpWzyoZkoO9g +Cq8ii24aK2+taDoM23mhNAWV76cdmSrvClWcgOv2cNT4V3oWJ5FtrCwWMKz4o1h1 +nmcWNg6gKlpYAxy5CTJq0yZuZLpiUQ83YM2IGLE2HrAPczjE72NPU7DmvvCWjW5o +oC5R3Oy/vcxznxqQupfToCfqvwKBgQDUXuix3gH8Atr5MctLWJowCm0FEyY9MVJl +zMaclKjwieB1ZGDHP/vNHozOHRrEuJ+5mP1bqISGTJ8eRsO3E4vlLIMeJcJGqAo9 +DaODpx/CkgAIWCbla8pOYfrspekD3yywagRLcmxjbPBmn8RbRFm8/khvxOmK/3FH +g97HYDcMXwKBgA08o7A2OYGg3pDhVe95a4dno2u0PnXzTCbiYTgzfIWMuUnCHl7B +lSxzWevzZP5V5sNOpr0yXqU7SPImP6MawPjPQ3DsNYZ7VqtdzA+lu63R44Yi1dvr +jnpB+/j3MD8P5o2yi0w5j/Ljqzq89R7UxQs6m+gZ13ZN8/FzwZrqnph9AoGAdZ6P +EBveS34lWwi6CGPtGZhcowflENUlRp5wjb5EBtzGBR5v/0qvof4+i9VQww1h4UAb +ak1eAKelJPaaZOYdf/L0N5lADTP6X7ATFNJV48RK4lQ4Tq4xYNIhUDnfYTaUoKxG +7qZT44ktaBkqfkXP0b2fzs9nbYVmbu5ZT2E5e88CgYBRJGWptWUucPG2PXMr5Shr +VKLRiS5P4Y1YE503RvheKnlC0AR7At7Hc8gJSvZ+oc4Q7kTnhqkrMu1GaCsHLKA7 +mnY4VH8EQwS2IO3PpwGYISi2Sq8rv8EDAF7C42YtZ03AJhGALIxQhu2bEoOvIg/R +2GvHapt2pttoDs9yUCanVQ== +-----END PRIVATE KEY----- + +comp-lzo +verb 3 +mute 20 +cipher AES-256-CBC diff --git a/pointeuse/vpn/DKS-VPN-dhart-hourtrax03.ovpn b/pointeuse/vpn/DKS-VPN-dhart-hourtrax03.ovpn new file mode 100644 index 00000000..298ddd2b --- /dev/null +++ b/pointeuse/vpn/DKS-VPN-dhart-hourtrax03.ovpn @@ -0,0 +1,153 @@ +client +dev tun +proto udp +remote vsrv01.dks.lu 1098 +remote arandks.lu 1098 + +remote-random +resolv-retry infinite +nobind +persist-key +persist-tun +mute-replay-warnings + +-----BEGIN CERTIFICATE----- +MIIDHjCCAgagAwIBAgIJAK61AhpxApOUMA0GCSqGSIb3DQEBCwUAMA8xDTALBgNV +BAMMBGFyYW4wHhcNMTcxMjE4MTM0MTIyWhcNMjcxMjE2MTM0MTIyWjAPMQ0wCwYD +VQQDDARhcmFuMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA1TydPk4X +8YyPjXI0htiMsM9C5jP0iH/Hgl7w+t0NL6fvcJhwy8BntJ/FRlS/GFoszmH+0zSt +pVeymgEwSQ2SrZixSkln2XhbTIH/NUEHosdllECJgj83W0Kpbtms8Cs6/FfhvMB4 +4o/GnN/mkmA9kslguStksV2vQh98Os9rw5gEKM5qFYO5FYUZIIrcsLgyzztPpw4H +vhrAzxuuu+zg9cOGAihlWV+CSlQJDZyC9hH9xal8UsTlYn9HFqVjr39k7OJg0WC6 +gyjQ92nzqEw49Jkb3NMAarF0zPcP25WV97Aq7EDZV/G8LZbg4p+xCrkz2iUJttu1 +CZjhS9uNsvIAYQIDAQABo30wezAdBgNVHQ4EFgQUqVEvl+MVxdWqNx36igfxqjrJ +f9QwPwYDVR0jBDgwNoAUqVEvl+MVxdWqNx36igfxqjrJf9ShE6QRMA8xDTALBgNV +BAMMBGFyYW6CCQCutQIacQKTlDAMBgNVHRMEBTADAQH/MAsGA1UdDwQEAwIBBjAN +BgkqhkiG9w0BAQsFAAOCAQEAysh4aGsnv4CebGvzZ9mZlmK5o4JTj4bqRw8sFe4h +wW/bZ0ggMnnvNZF1VJJgO/UQQq2gIiOw7zLrlSmPHIhRPkQspemk6uU0m2h6K9rn +AnX3qeVP5dXbZsqr1jI1/aCzxSW5hu6WUfR3Q+u1pGm9HePhrRJj0djW8Kd7UO+s +PfpIN9gbfLoLnAfCJIc3BccBoD5IqU4s7vleekQGCJHloT5S3MefiIUg7d8leW4V +8PiCohkgHwMOZy3ACy1ZPuT92x+7JCaNV56X7iT3GZhkyQ4tSKu3UpMFkz8obYKw +8RrNsXXBRWgnuakkMY6wHJJZBPJn+qDrWbO7nxVTOqY22g== +-----END CERTIFICATE----- + + +Certificate: + Data: + Version: 3 (0x2) + Serial Number: + 12:8c:b0:dc:13:cf:d4:14:63:bc:16:91:d8:1c:b4:a5 + Signature Algorithm: sha256WithRSAEncryption + Issuer: CN=aran + Validity + Not Before: Jan 13 15:13:13 2021 GMT + Not After : Jan 11 15:13:13 2031 GMT + Subject: CN=dhart-hourtrax03 + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + Public-Key: (2048 bit) + Modulus: + 00:c8:38:21:cd:97:b3:5d:e6:34:a9:35:31:17:75: + 5c:f4:77:1d:62:85:b9:60:ae:b3:35:8d:16:1c:69: + f0:53:16:0b:42:01:bb:a1:34:38:46:9c:cc:a1:e2: + f2:03:fa:8d:89:4f:58:90:d2:b2:14:ae:3e:01:4e: + cf:54:e3:dd:cf:15:1b:79:01:8c:c7:ca:43:e0:2b: + 2c:e1:dd:3e:e5:12:d0:9d:b4:00:ce:2a:e9:cb:fe: + d5:38:4b:24:6a:f8:57:61:bf:a7:0e:61:12:d0:4a: + ed:22:d5:90:e8:c0:68:53:1b:9f:82:28:20:a2:77: + 2c:ca:94:55:b8:40:8a:d1:da:43:77:0a:0c:5c:96: + 56:98:6e:cc:f7:63:0e:d3:78:41:0c:1f:b0:22:4d: + 02:5f:4b:e8:5c:37:40:4e:b7:6e:7d:4a:17:25:9a: + a8:1c:ad:1d:66:7e:36:83:88:62:98:79:fa:12:75: + 16:c7:70:9c:d1:cc:11:49:34:b4:71:92:ed:db:e5: + a2:b1:0e:32:13:74:60:56:10:82:ff:8f:98:59:a0: + 74:99:ed:3f:ad:49:b0:73:83:84:45:bb:cf:52:be: + df:f7:16:12:fa:98:21:b0:23:ef:1c:44:95:f2:19: + 87:b0:2c:35:c0:0b:3a:a3:fd:76:0d:dd:82:82:28: + 4b:a5 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Basic Constraints: + CA:FALSE + X509v3 Subject Key Identifier: + 50:DD:89:D0:4B:59:17:A0:8D:07:9C:8F:D7:3D:E5:01:30:3B:6A:50 + X509v3 Authority Key Identifier: + keyid:A9:51:2F:97:E3:15:C5:D5:AA:37:1D:FA:8A:07:F1:AA:3A:C9:7F:D4 + DirName:/CN=aran + serial:AE:B5:02:1A:71:02:93:94 + + X509v3 Extended Key Usage: + TLS Web Client Authentication + X509v3 Key Usage: + Digital Signature + Signature Algorithm: sha256WithRSAEncryption + 05:cd:0d:04:05:ed:db:53:97:01:ce:dc:47:37:9d:ce:e9:ad: + 1a:d4:a0:d6:58:60:a1:86:91:87:57:33:75:3f:d5:c5:12:b6: + 8e:e3:b2:74:fe:40:ab:4a:90:46:a1:77:d6:ce:75:e4:a9:0e: + e8:12:da:c6:f1:8c:0c:ea:62:1e:f0:d9:d2:e8:7d:1f:24:6f: + 2e:72:ee:ce:20:9f:9e:74:eb:be:d5:1f:7a:7d:ec:33:d1:8a: + 24:3a:89:64:97:0f:59:18:10:7c:71:84:a6:22:e3:f5:42:25: + 4c:33:76:96:56:2f:b6:63:85:c8:f1:b9:6b:9e:c1:f0:ad:6b: + a2:4d:34:7d:2b:d9:f0:d0:7a:67:0e:1c:38:7a:1d:d8:a4:04: + 09:58:24:e3:81:ad:0c:5f:6d:fe:15:57:bd:36:14:32:63:c4: + 6a:dd:dd:bb:59:4a:e4:35:b3:26:6c:ce:81:eb:cd:bd:ce:4b: + 41:4a:79:86:20:31:a5:da:f5:62:9d:52:04:9e:5d:cc:bd:16: + 43:25:e8:7c:02:fb:81:dc:7e:b2:91:46:80:97:a5:d7:2f:18: + 4d:92:4a:b0:1d:ac:c8:f1:cf:30:08:69:8a:53:0c:8d:57:0b: + 47:83:e2:d6:dd:fe:6e:82:66:d8:86:c4:3e:9d:c6:22:fd:a0: + 71:60:33:db +-----BEGIN CERTIFICATE----- +MIIDRTCCAi2gAwIBAgIQEoyw3BPP1BRjvBaR2By0pTANBgkqhkiG9w0BAQsFADAP +MQ0wCwYDVQQDDARhcmFuMB4XDTIxMDExMzE1MTMxM1oXDTMxMDExMTE1MTMxM1ow +GzEZMBcGA1UEAwwQZGhhcnQtaG91cnRyYXgwMzCCASIwDQYJKoZIhvcNAQEBBQAD +ggEPADCCAQoCggEBAMg4Ic2Xs13mNKk1MRd1XPR3HWKFuWCuszWNFhxp8FMWC0IB +u6E0OEaczKHi8gP6jYlPWJDSshSuPgFOz1Tj3c8VG3kBjMfKQ+ArLOHdPuUS0J20 +AM4q6cv+1ThLJGr4V2G/pw5hEtBK7SLVkOjAaFMbn4IoIKJ3LMqUVbhAitHaQ3cK +DFyWVphuzPdjDtN4QQwfsCJNAl9L6Fw3QE63bn1KFyWaqBytHWZ+NoOIYph5+hJ1 +FsdwnNHMEUk0tHGS7dvlorEOMhN0YFYQgv+PmFmgdJntP61JsHODhEW7z1K+3/cW +EvqYIbAj7xxElfIZh7AsNcALOqP9dg3dgoIoS6UCAwEAAaOBkDCBjTAJBgNVHRME +AjAAMB0GA1UdDgQWBBRQ3YnQS1kXoI0HnI/XPeUBMDtqUDA/BgNVHSMEODA2gBSp +US+X4xXF1ao3HfqKB/GqOsl/1KETpBEwDzENMAsGA1UEAwwEYXJhboIJAK61Ahpx +ApOUMBMGA1UdJQQMMAoGCCsGAQUFBwMCMAsGA1UdDwQEAwIHgDANBgkqhkiG9w0B +AQsFAAOCAQEABc0NBAXt21OXAc7cRzedzumtGtSg1lhgoYaRh1czdT/VxRK2juOy +dP5Aq0qQRqF31s515KkO6BLaxvGMDOpiHvDZ0uh9HyRvLnLuziCfnnTrvtUfen3s +M9GKJDqJZJcPWRgQfHGEpiLj9UIlTDN2llYvtmOFyPG5a57B8K1rok00fSvZ8NB6 +Zw4cOHod2KQECVgk44GtDF9t/hVXvTYUMmPEat3du1lK5DWzJmzOgevNvc5LQUp5 +hiAxpdr1Yp1SBJ5dzL0WQyXofAL7gdx+spFGgJel1y8YTZJKsB2syPHPMAhpilMM +jVcLR4Pi1t3+boJm2IbEPp3GIv2gcWAz2w== +-----END CERTIFICATE----- + + +-----BEGIN PRIVATE KEY----- +MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDIOCHNl7Nd5jSp +NTEXdVz0dx1ihblgrrM1jRYcafBTFgtCAbuhNDhGnMyh4vID+o2JT1iQ0rIUrj4B +Ts9U493PFRt5AYzHykPgKyzh3T7lEtCdtADOKunL/tU4SyRq+Fdhv6cOYRLQSu0i +1ZDowGhTG5+CKCCidyzKlFW4QIrR2kN3CgxcllaYbsz3Yw7TeEEMH7AiTQJfS+hc +N0BOt259ShclmqgcrR1mfjaDiGKYefoSdRbHcJzRzBFJNLRxku3b5aKxDjITdGBW +EIL/j5hZoHSZ7T+tSbBzg4RFu89Svt/3FhL6mCGwI+8cRJXyGYewLDXACzqj/XYN +3YKCKEulAgMBAAECggEAa0gIdM0QQwQSu4fQ4iz0vdkFWcElb3Sseck7S8ZIC30I +Uznye5IrhUqHK0cbPp6GMEjfv9nlqccjWjgMSARA2bEJo3D9KiBq9jasOen+xWer +eJT2yYGc/L1zKlK5FMg0qh+zN7U0C3/aSIv+tXhDbiSi927g7azFx1ZsB+otd/tz +dtG5jJOTTtvuQwjUmp4oJ0ktcGP7E1DV7ru0ifDnhNmmJqWdstkKbIUbpy2T6BUX +5psZm2q1QVWgnPpTUg/bTF0suSaazsctPqyn1ZwlOkszEYiS5XIyEaR8Ijqh4oFH +E7Mk0DKh06XRRBqcvpVxlBDOMfPLL+2ccfgNGYPMEQKBgQD9fNEl88wF63TZMLgt +MzgfWu5UTfulqM4qWHI0ocz2f/nDlKTU+Eid6XEj6u7paIsFOQ5I2ImpxTH0CR7U +6q5Fnb8/o2VQEw9kMx2AIQFysc6G038eMQ9vKhtckqMXyx5tZr+QOeJyX025pwHr +dvo4AEISgWjGArP5c5CoicG0DwKBgQDKNCfPLklAamEdKY6vj7m9ZhDPcHZBC2+0 ++mWyMvTH59fXsLe9U6RKucu5A1FlM0AcN9SfDc9aih3vRj78vi//fUdq99LJaL7U +Bv/pOIP6gmdsvA06MtoO3pLGV5IceaLE0YZNEraLfXR0x9gFEup4pYuVNoNzHZ8g +3et2UUaBCwKBgQDktsYPNFYV0Ujw3qCPR/OPdwArWOGBqzm5w2voSUUh9H5rFadT +8WGz+Xl4KvW96/HjmINm/tnXMHHN+pyzB7yOW7K/vLIg+dGdWvF3NlCUKBJsXFAJ +8cI3Twq5ECXPxhmCJH8bpt7Gy27Z3/I/fm5uMO1svQ7H+pBgtwEC0KjRyQKBgDkQ +NPfcCSIbo2J2euUCu5k+t5nDFCxRDOpXC+IZTUkpHZmqLoBInYHVIzAIRq03pG0S +OHfWjuDvP3lqKpZrGeKROVlvrNXYMJpni0sG/v/wUz21aEo3VaCCoYtF5V8R2KSQ +uMUBdfCxq+7VAxqTdwYrOdQXOUuAXYsJ9cxDLZF3AoGBAL8TZn3smo8Cw8TV17jM +oi0s+RXG6dxakUmGBldyiGAkTOX9dEVeEHArCtUUdqAeJD0fqrL4XOn/qUviCmhg +tWKxMGfgHaIEi+HCONRrMyPYlTaH/1k0MnsHF8CBrD1TuZPgpjR14xrq/Ie2Bjjm +fwFio7XUfCla6TSo9d5UXWeW +-----END PRIVATE KEY----- + +comp-lzo +verb 3 +mute 20 +cipher AES-256-CBC diff --git a/pointeuse/vpn/DKS-VPN-dks-hourtrax.ovpn b/pointeuse/vpn/DKS-VPN-dks-hourtrax.ovpn new file mode 100644 index 00000000..8cd495fa --- /dev/null +++ b/pointeuse/vpn/DKS-VPN-dks-hourtrax.ovpn @@ -0,0 +1,153 @@ +client +dev tun +proto udp +remote aran.sysaki.com 1098 +remote aran.dks.lu 1098 + +remote-random +resolv-retry infinite +nobind +persist-key +persist-tun +mute-replay-warnings + +-----BEGIN CERTIFICATE----- +MIIDHjCCAgagAwIBAgIJAK61AhpxApOUMA0GCSqGSIb3DQEBCwUAMA8xDTALBgNV +BAMMBGFyYW4wHhcNMTcxMjE4MTM0MTIyWhcNMjcxMjE2MTM0MTIyWjAPMQ0wCwYD +VQQDDARhcmFuMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA1TydPk4X +8YyPjXI0htiMsM9C5jP0iH/Hgl7w+t0NL6fvcJhwy8BntJ/FRlS/GFoszmH+0zSt +pVeymgEwSQ2SrZixSkln2XhbTIH/NUEHosdllECJgj83W0Kpbtms8Cs6/FfhvMB4 +4o/GnN/mkmA9kslguStksV2vQh98Os9rw5gEKM5qFYO5FYUZIIrcsLgyzztPpw4H +vhrAzxuuu+zg9cOGAihlWV+CSlQJDZyC9hH9xal8UsTlYn9HFqVjr39k7OJg0WC6 +gyjQ92nzqEw49Jkb3NMAarF0zPcP25WV97Aq7EDZV/G8LZbg4p+xCrkz2iUJttu1 +CZjhS9uNsvIAYQIDAQABo30wezAdBgNVHQ4EFgQUqVEvl+MVxdWqNx36igfxqjrJ +f9QwPwYDVR0jBDgwNoAUqVEvl+MVxdWqNx36igfxqjrJf9ShE6QRMA8xDTALBgNV +BAMMBGFyYW6CCQCutQIacQKTlDAMBgNVHRMEBTADAQH/MAsGA1UdDwQEAwIBBjAN +BgkqhkiG9w0BAQsFAAOCAQEAysh4aGsnv4CebGvzZ9mZlmK5o4JTj4bqRw8sFe4h +wW/bZ0ggMnnvNZF1VJJgO/UQQq2gIiOw7zLrlSmPHIhRPkQspemk6uU0m2h6K9rn +AnX3qeVP5dXbZsqr1jI1/aCzxSW5hu6WUfR3Q+u1pGm9HePhrRJj0djW8Kd7UO+s +PfpIN9gbfLoLnAfCJIc3BccBoD5IqU4s7vleekQGCJHloT5S3MefiIUg7d8leW4V +8PiCohkgHwMOZy3ACy1ZPuT92x+7JCaNV56X7iT3GZhkyQ4tSKu3UpMFkz8obYKw +8RrNsXXBRWgnuakkMY6wHJJZBPJn+qDrWbO7nxVTOqY22g== +-----END CERTIFICATE----- + + +Certificate: + Data: + Version: 3 (0x2) + Serial Number: + 76:24:55:b4:57:ee:a0:c0:7b:e2:b5:a0:5c:3d:80:3d + Signature Algorithm: sha256WithRSAEncryption + Issuer: CN=aran + Validity + Not Before: Feb 6 07:54:45 2018 GMT + Not After : Feb 4 07:54:45 2028 GMT + Subject: CN=dks-hourtrax + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + Public-Key: (2048 bit) + Modulus: + 00:b1:67:a4:6b:28:de:50:03:da:b0:48:19:5d:28: + f4:b7:43:68:2c:6d:41:bc:b8:76:ff:b7:93:2f:93: + f5:d1:fc:90:27:6b:1b:f2:84:0d:5e:dc:be:1f:77: + 77:bb:66:34:43:ac:7e:35:13:df:90:54:31:e9:67: + 44:76:a7:e1:70:61:10:bc:3d:84:0d:75:8d:2c:b3: + 06:d0:5a:c0:20:2f:0b:e2:15:5e:3f:38:61:ed:fa: + d8:8e:03:cd:c9:07:94:25:eb:ab:59:4a:7e:92:10: + 5d:1a:ee:de:31:35:14:a4:52:f2:79:5c:11:6e:e8: + ef:6c:57:69:a1:94:74:96:b7:e0:dc:ba:a5:b3:b4: + 33:65:79:b6:e7:de:aa:1a:d2:c3:9a:7f:6d:73:35: + 82:a4:fb:1e:13:2b:c7:96:5c:d9:d9:23:1b:6a:80: + 8d:17:22:69:09:88:85:03:be:6e:4b:11:d2:05:a9: + 51:7d:bf:a0:a4:e1:55:cb:27:10:4d:3b:fd:b9:cc: + a5:0c:5a:de:6e:95:5c:e9:4e:53:70:df:8f:06:1b: + 56:67:46:91:08:39:f4:bb:74:ae:18:90:39:1b:b1: + 51:64:5c:bf:58:fb:18:90:0a:ec:ac:68:98:2d:54: + cc:a1:1c:b4:9d:be:6d:ee:16:8a:ed:9a:56:2a:11: + 6e:37 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Basic Constraints: + CA:FALSE + X509v3 Subject Key Identifier: + FE:5D:3F:2A:41:EE:A5:C2:50:D0:9B:CF:89:EB:25:9C:61:3A:67:FF + X509v3 Authority Key Identifier: + keyid:A9:51:2F:97:E3:15:C5:D5:AA:37:1D:FA:8A:07:F1:AA:3A:C9:7F:D4 + DirName:/CN=aran + serial:AE:B5:02:1A:71:02:93:94 + + X509v3 Extended Key Usage: + TLS Web Client Authentication + X509v3 Key Usage: + Digital Signature + Signature Algorithm: sha256WithRSAEncryption + 49:3d:9c:8e:10:37:3e:ba:6d:ac:2f:6e:65:60:01:ed:01:70: + 49:b5:16:af:29:3b:68:ca:85:58:9f:88:ff:14:5e:ae:03:0d: + 65:99:9d:0e:6b:66:98:ad:f1:55:9c:75:f1:c7:fb:e6:61:68: + d6:69:03:48:4f:08:18:d5:ae:60:55:18:70:b4:ab:63:05:b5: + 54:c7:f7:d0:8b:86:4b:34:3f:50:5c:6f:be:c1:5a:1b:22:cc: + 24:59:76:e0:8c:c6:32:37:76:ab:bc:2d:63:27:be:2e:a6:5b: + 86:90:1d:a5:4d:a6:9a:17:ed:57:76:f7:c7:65:f0:2b:29:84: + a8:f3:35:5c:66:4d:f2:38:4f:79:df:b4:c1:07:66:3f:87:d0: + 13:fc:5b:3b:ea:da:db:ab:32:2e:72:f3:84:be:0d:e9:7e:c6: + 16:22:a9:b7:28:f5:cf:89:51:11:51:9d:bb:ac:fc:1e:fb:85: + 27:31:74:bd:6d:64:1b:d5:d6:d8:31:ff:ee:3f:9c:17:04:6c: + a3:3a:64:3b:22:88:78:75:3e:37:9d:b1:8b:a2:e8:7a:6f:0f: + af:9b:2c:a7:0a:dc:af:4a:f3:e5:3b:6e:97:c4:cf:2e:0e:64: + 71:2e:c8:51:32:90:9a:53:95:be:a9:d1:bd:ea:cb:9b:0a:9d: + 03:5b:04:85 +-----BEGIN CERTIFICATE----- +MIIDQTCCAimgAwIBAgIQdiRVtFfuoMB74rWgXD2APTANBgkqhkiG9w0BAQsFADAP +MQ0wCwYDVQQDDARhcmFuMB4XDTE4MDIwNjA3NTQ0NVoXDTI4MDIwNDA3NTQ0NVow +FzEVMBMGA1UEAwwMZGtzLWhvdXJ0cmF4MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A +MIIBCgKCAQEAsWekayjeUAPasEgZXSj0t0NoLG1BvLh2/7eTL5P10fyQJ2sb8oQN +Xty+H3d3u2Y0Q6x+NRPfkFQx6WdEdqfhcGEQvD2EDXWNLLMG0FrAIC8L4hVePzhh +7frYjgPNyQeUJeurWUp+khBdGu7eMTUUpFLyeVwRbujvbFdpoZR0lrfg3Lqls7Qz +ZXm2596qGtLDmn9tczWCpPseEyvHllzZ2SMbaoCNFyJpCYiFA75uSxHSBalRfb+g +pOFVyycQTTv9ucylDFrebpVc6U5TcN+PBhtWZ0aRCDn0u3SuGJA5G7FRZFy/WPsY +kArsrGiYLVTMoRy0nb5t7haK7ZpWKhFuNwIDAQABo4GQMIGNMAkGA1UdEwQCMAAw +HQYDVR0OBBYEFP5dPypB7qXCUNCbz4nrJZxhOmf/MD8GA1UdIwQ4MDaAFKlRL5fj +FcXVqjcd+ooH8ao6yX/UoROkETAPMQ0wCwYDVQQDDARhcmFuggkArrUCGnECk5Qw +EwYDVR0lBAwwCgYIKwYBBQUHAwIwCwYDVR0PBAQDAgeAMA0GCSqGSIb3DQEBCwUA +A4IBAQBJPZyOEDc+um2sL25lYAHtAXBJtRavKTtoyoVYn4j/FF6uAw1lmZ0Oa2aY +rfFVnHXxx/vmYWjWaQNITwgY1a5gVRhwtKtjBbVUx/fQi4ZLND9QXG++wVobIswk +WXbgjMYyN3arvC1jJ74upluGkB2lTaaaF+1XdvfHZfArKYSo8zVcZk3yOE9537TB +B2Y/h9AT/Fs76trbqzIucvOEvg3pfsYWIqm3KPXPiVERUZ27rPwe+4UnMXS9bWQb +1dbYMf/uP5wXBGyjOmQ7Ioh4dT43nbGLouh6bw+vmyynCtyvSvPlO26XxM8uDmRx +LshRMpCaU5W+qdG96subCp0DWwSF +-----END CERTIFICATE----- + + +-----BEGIN PRIVATE KEY----- +MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCxZ6RrKN5QA9qw +SBldKPS3Q2gsbUG8uHb/t5Mvk/XR/JAnaxvyhA1e3L4fd3e7ZjRDrH41E9+QVDHp +Z0R2p+FwYRC8PYQNdY0sswbQWsAgLwviFV4/OGHt+tiOA83JB5Ql66tZSn6SEF0a +7t4xNRSkUvJ5XBFu6O9sV2mhlHSWt+DcuqWztDNlebbn3qoa0sOaf21zNYKk+x4T +K8eWXNnZIxtqgI0XImkJiIUDvm5LEdIFqVF9v6Ck4VXLJxBNO/25zKUMWt5ulVzp +TlNw348GG1ZnRpEIOfS7dK4YkDkbsVFkXL9Y+xiQCuysaJgtVMyhHLSdvm3uFort +mlYqEW43AgMBAAECggEAdIXkwtX3H4tIitzwe/Y4tl65/+RLd0+aKeBD9s4yehhv +/tQlaSc/OP24iyaHKDm7Pm///ZDuGPiUSAAiQeWG969ptJqbL9P0RFXatePFqd38 +6iSq4M+B0zQeJTluYwptTnL6+w0pEXtaDCS1IJEC2+P3i6rjcHvjNsA7i3vdEFji +Prze6oZ/UoJIGn97V+qePCmcY1raD5SUeHz/tgB1qY3zq9TdjS953pijJKlXgXVM +pI/WhovKKYFmnbTVsY9WaMXvJz3MTrCosk9LIDdVOIei7m1GI+vQoGS9I3YhFogs +8qNweEJLLF6wi3tXrur5ZYTIqBYHtrE88RsnfWDqAQKBgQDfdOVTrzoCGVcNPLTK +nj7qpEfOgJS/1dSRgcH2MGKqPl+fPbqoCXEWKQicAbuVRWKKzvjHon+IvMn1ymgF +u31uePVtF0adHJP389d5VeeeO7Tl3t50an+k+cPTpRudmpfpUaH+SE7BpXv8V9B+ +eES92r5zhr2xEuVewBIPoyr8twKBgQDLPc3jdsjZpIYheYsP1yDyuFgi8cau7mqw +4v/KmcyuOAIHlrZB6V+XkNpL0U0gWOdrH4pgEdTKhtu/lycAKNS4AJkJLqE3dQQx +c3LAdtlQ9NuHoY/SxP2wcZlFEeQsGUpj4azg/bibGh/RNsy5vi6EW8hfrTwvtvfq +cruGN66agQKBgEwj7bxdGbv7XHEzPTtJPpD/V0RjBcx0FRFbkHbNt+Dgjf6Zrw9w +4Cq34qod4QgU82Xu7lA/64rxITPyOw2w/CV3a9E3PCVuxnCXktVSUzDUkWg+T7iF +TWcuf+6O9OD3+0lSOouFoehT9fJfDbj6TBoQ/hIpWFuM38EwWzce1xfzAoGAN9b1 +OGesa0+uoofYUzPSE53eaUtwQSO0IIFdsfZrq/orZJZd4OITp3re3zHUNOz4OBBk +XlzH0BUZTxxiVMLjHuLbKRCsrqXxzvxfLM36iymbHzqeX1RMNywe5kEyJYOVUrfw +XaiYDdUxpLOfr/C2qxrkhJT+EkX8+2cmaovl5wECgYEAmO7l3iVoEET9HrxuvinL +OC600K0iIpNNAIWSywGa4V04WBXrGNMx3SAkxEdQblrSIE1dPxsJnq+clvSyqeo5 +PLi7mSs/XpE7HffjYMhtyzv+UKUCfvbRsjIDH2/Ka6WZZalBw4I0aKcWYvvqACly +FX4rIxtOEaNSC9J07tCgN1A= +-----END PRIVATE KEY----- + +comp-lzo +verb 3 +mute 20 +cipher AES-256-CBC diff --git a/pointeuse/vpn/DKS-VPN-dks-hourtraxtest.ovpn b/pointeuse/vpn/DKS-VPN-dks-hourtraxtest.ovpn new file mode 100644 index 00000000..0793f27d --- /dev/null +++ b/pointeuse/vpn/DKS-VPN-dks-hourtraxtest.ovpn @@ -0,0 +1,153 @@ +client +dev tun +proto udp +remote vsrv01.dks.lu 1098 +remote arandks.lu 1098 + +remote-random +resolv-retry infinite +nobind +persist-key +persist-tun +mute-replay-warnings + +-----BEGIN CERTIFICATE----- +MIIDHjCCAgagAwIBAgIJAK61AhpxApOUMA0GCSqGSIb3DQEBCwUAMA8xDTALBgNV +BAMMBGFyYW4wHhcNMTcxMjE4MTM0MTIyWhcNMjcxMjE2MTM0MTIyWjAPMQ0wCwYD +VQQDDARhcmFuMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA1TydPk4X +8YyPjXI0htiMsM9C5jP0iH/Hgl7w+t0NL6fvcJhwy8BntJ/FRlS/GFoszmH+0zSt +pVeymgEwSQ2SrZixSkln2XhbTIH/NUEHosdllECJgj83W0Kpbtms8Cs6/FfhvMB4 +4o/GnN/mkmA9kslguStksV2vQh98Os9rw5gEKM5qFYO5FYUZIIrcsLgyzztPpw4H +vhrAzxuuu+zg9cOGAihlWV+CSlQJDZyC9hH9xal8UsTlYn9HFqVjr39k7OJg0WC6 +gyjQ92nzqEw49Jkb3NMAarF0zPcP25WV97Aq7EDZV/G8LZbg4p+xCrkz2iUJttu1 +CZjhS9uNsvIAYQIDAQABo30wezAdBgNVHQ4EFgQUqVEvl+MVxdWqNx36igfxqjrJ +f9QwPwYDVR0jBDgwNoAUqVEvl+MVxdWqNx36igfxqjrJf9ShE6QRMA8xDTALBgNV +BAMMBGFyYW6CCQCutQIacQKTlDAMBgNVHRMEBTADAQH/MAsGA1UdDwQEAwIBBjAN +BgkqhkiG9w0BAQsFAAOCAQEAysh4aGsnv4CebGvzZ9mZlmK5o4JTj4bqRw8sFe4h +wW/bZ0ggMnnvNZF1VJJgO/UQQq2gIiOw7zLrlSmPHIhRPkQspemk6uU0m2h6K9rn +AnX3qeVP5dXbZsqr1jI1/aCzxSW5hu6WUfR3Q+u1pGm9HePhrRJj0djW8Kd7UO+s +PfpIN9gbfLoLnAfCJIc3BccBoD5IqU4s7vleekQGCJHloT5S3MefiIUg7d8leW4V +8PiCohkgHwMOZy3ACy1ZPuT92x+7JCaNV56X7iT3GZhkyQ4tSKu3UpMFkz8obYKw +8RrNsXXBRWgnuakkMY6wHJJZBPJn+qDrWbO7nxVTOqY22g== +-----END CERTIFICATE----- + + +Certificate: + Data: + Version: 3 (0x2) + Serial Number: + 1f:72:81:5c:11:93:98:f3:ab:da:e0:8e:19:74:cd:57 + Signature Algorithm: sha256WithRSAEncryption + Issuer: CN=aran + Validity + Not Before: Oct 27 08:51:46 2020 GMT + Not After : Oct 25 08:51:46 2030 GMT + Subject: CN=dks-hourtraxtest + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + Public-Key: (2048 bit) + Modulus: + 00:a8:62:e0:84:c5:db:87:18:f3:e1:4e:8d:45:e2: + 15:d5:36:69:71:df:fa:9b:73:6f:d8:78:6d:f9:7c: + d4:34:06:e4:af:a2:31:41:dc:ec:f0:9f:6e:ce:6c: + 33:a5:d0:b0:d2:04:c5:a7:dd:55:aa:55:79:80:2c: + 13:5b:89:75:fd:b6:a6:e4:9f:39:8d:40:59:d1:5b: + 83:e6:c6:c0:0a:42:89:70:c2:cc:67:ea:61:39:51: + 32:36:7c:77:78:4f:99:ec:f0:0e:2f:b7:c7:98:df: + 9b:9a:3e:6b:4d:ce:b4:6e:82:21:b5:23:f5:37:12: + 2c:62:f2:e1:95:56:af:cb:77:71:ec:e7:86:b6:ed: + 95:44:3c:75:c9:7b:33:0a:da:9d:2f:75:9d:9d:5c: + 01:f0:8a:99:68:1d:7f:c0:9d:e9:3f:54:50:ce:0e: + 15:b9:39:a0:a2:f4:21:ee:ec:50:9a:c2:e2:de:91: + 75:77:16:7d:32:c9:32:b8:6b:ae:81:1b:3b:69:bf: + b1:5e:d2:16:10:4b:ad:c3:43:20:96:65:59:ff:a1: + 4c:b8:0e:e6:4b:b7:88:17:cf:97:97:a6:c1:67:ff: + a9:82:44:81:06:be:57:75:22:c2:02:d8:55:8d:aa: + 85:e5:84:46:7c:a9:67:a0:3a:47:71:04:1a:83:3f: + 9a:3d + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Basic Constraints: + CA:FALSE + X509v3 Subject Key Identifier: + AB:70:9E:30:68:BA:3B:A9:6E:4C:E3:DA:D7:48:7D:3E:F8:77:85:43 + X509v3 Authority Key Identifier: + keyid:A9:51:2F:97:E3:15:C5:D5:AA:37:1D:FA:8A:07:F1:AA:3A:C9:7F:D4 + DirName:/CN=aran + serial:AE:B5:02:1A:71:02:93:94 + + X509v3 Extended Key Usage: + TLS Web Client Authentication + X509v3 Key Usage: + Digital Signature + Signature Algorithm: sha256WithRSAEncryption + 6b:ea:b4:0d:1a:2a:4b:fc:80:3f:71:d7:e2:cf:50:23:07:bc: + 11:36:de:c2:a1:84:de:15:69:46:a1:24:ed:d0:2b:fe:9f:7e: + 12:46:69:1f:44:78:e7:e7:60:4a:19:82:6c:76:49:4b:76:31: + 46:7b:d3:6e:6e:b6:a4:93:75:9c:87:af:bf:fa:05:b1:97:d9: + c1:a0:6e:68:e3:f4:f2:21:fc:59:48:8e:d3:7e:d5:44:df:e7: + 49:04:17:6d:93:db:69:7c:90:f4:1a:d5:92:03:cf:53:c1:bf: + 8f:3b:56:8a:46:9c:03:10:0e:bf:5a:27:2a:06:9d:4e:e5:78: + 6e:87:00:46:ec:21:4d:a1:bc:fe:e9:c1:9c:f3:b2:95:18:69: + e9:61:b8:0a:6c:ee:1d:12:ff:93:b6:3d:b5:ba:ca:52:c7:88: + 90:50:2d:55:12:84:12:a7:8c:dc:4f:a7:70:51:d0:4d:cb:66: + 8e:9a:ab:b1:07:88:d8:3f:6d:1c:6b:24:97:4b:80:ee:5d:01: + c8:d9:a9:bc:ce:7a:c1:a1:b1:6f:23:28:13:42:e6:0a:2d:ed: + dc:62:e8:ad:62:54:e9:23:11:c9:fa:e9:c3:85:fd:39:a9:8b: + db:e5:91:99:35:fe:f1:78:b4:4a:a4:ab:67:fe:53:55:00:45: + cc:1b:66:ea +-----BEGIN CERTIFICATE----- +MIIDRTCCAi2gAwIBAgIQH3KBXBGTmPOr2uCOGXTNVzANBgkqhkiG9w0BAQsFADAP +MQ0wCwYDVQQDDARhcmFuMB4XDTIwMTAyNzA4NTE0NloXDTMwMTAyNTA4NTE0Nlow +GzEZMBcGA1UEAwwQZGtzLWhvdXJ0cmF4dGVzdDCCASIwDQYJKoZIhvcNAQEBBQAD +ggEPADCCAQoCggEBAKhi4ITF24cY8+FOjUXiFdU2aXHf+ptzb9h4bfl81DQG5K+i +MUHc7PCfbs5sM6XQsNIExafdVapVeYAsE1uJdf22puSfOY1AWdFbg+bGwApCiXDC +zGfqYTlRMjZ8d3hPmezwDi+3x5jfm5o+a03OtG6CIbUj9TcSLGLy4ZVWr8t3cezn +hrbtlUQ8dcl7MwranS91nZ1cAfCKmWgdf8Cd6T9UUM4OFbk5oKL0Ie7sUJrC4t6R +dXcWfTLJMrhrroEbO2m/sV7SFhBLrcNDIJZlWf+hTLgO5ku3iBfPl5emwWf/qYJE +gQa+V3UiwgLYVY2qheWERnypZ6A6R3EEGoM/mj0CAwEAAaOBkDCBjTAJBgNVHRME +AjAAMB0GA1UdDgQWBBSrcJ4waLo7qW5M49rXSH0++HeFQzA/BgNVHSMEODA2gBSp +US+X4xXF1ao3HfqKB/GqOsl/1KETpBEwDzENMAsGA1UEAwwEYXJhboIJAK61Ahpx +ApOUMBMGA1UdJQQMMAoGCCsGAQUFBwMCMAsGA1UdDwQEAwIHgDANBgkqhkiG9w0B +AQsFAAOCAQEAa+q0DRoqS/yAP3HX4s9QIwe8ETbewqGE3hVpRqEk7dAr/p9+EkZp +H0R45+dgShmCbHZJS3YxRnvTbm62pJN1nIevv/oFsZfZwaBuaOP08iH8WUiO037V +RN/nSQQXbZPbaXyQ9BrVkgPPU8G/jztWikacAxAOv1onKgadTuV4bocARuwhTaG8 +/unBnPOylRhp6WG4CmzuHRL/k7Y9tbrKUseIkFAtVRKEEqeM3E+ncFHQTctmjpqr +sQeI2D9tHGskl0uA7l0ByNmpvM56waGxbyMoE0LmCi3t3GLorWJU6SMRyfrpw4X9 +OamL2+WRmTX+8Xi0SqSrZ/5TVQBFzBtm6g== +-----END CERTIFICATE----- + + +-----BEGIN PRIVATE KEY----- +MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCoYuCExduHGPPh +To1F4hXVNmlx3/qbc2/YeG35fNQ0BuSvojFB3Ozwn27ObDOl0LDSBMWn3VWqVXmA +LBNbiXX9tqbknzmNQFnRW4PmxsAKQolwwsxn6mE5UTI2fHd4T5ns8A4vt8eY35ua +PmtNzrRugiG1I/U3Eixi8uGVVq/Ld3Hs54a27ZVEPHXJezMK2p0vdZ2dXAHwiplo +HX/Anek/VFDODhW5OaCi9CHu7FCawuLekXV3Fn0yyTK4a66BGztpv7Fe0hYQS63D +QyCWZVn/oUy4DuZLt4gXz5eXpsFn/6mCRIEGvld1IsIC2FWNqoXlhEZ8qWegOkdx +BBqDP5o9AgMBAAECggEAaTy6s2BxDiMDMNoGIxnkqUeDaT8hggwIZ9MEcHuaqBVy +0W3duRsZHl2WQ/6N3ODr0aZX3czP4E/hSsDBLGFh07pW3eXBc003lUfLzOyEUyU4 +frfQRlXOg6MCbdkmVZPyUInLY/lJDnsZ5bGDILLCQ5qi9HHPrKZ4BTNk1w/BeLhf +Z2CVRMMb3TxDTqozco31dyhz+kBjYK6qVk6mmWnLVLEOTowL3Nblv+titUZ7kqOv +zbJzPoFV562jQ181hNoF7ANb01K8Kb/Wu3V7ScT9ARrKNC6vUgvjZ61/CwLp+kSM +oheAU/CEALwHEQqESJ1C9eGuruE0XCmLIRq4CT70xQKBgQDVNstIPpNDZ6mgOK3O +bcdk+8U042tyTCElpmUMK6yaN4cvdQPy5jjUoSE0pD+4YWGhf5AtlwSDt4pdUY/W +kgFYBYqjcCa8aL75BLwM6wxR6fRCyBoMThWsX0N9Ep4jqN9J6raiSK+AmANTUucT +e+r7XIn8sG374gGrxv29Cn7yjwKBgQDKLTHPK+ejV7tmjQYn/RZelvEo6gN59Cnh +unOgGescM4GVrZoZd+1pV+Zyz0BRY/EbKVojuYQBiax0lKNfwXPvhDmbBNwxLoWL +7cvUgPOGNlDFqsYyfp2HxYRXt83NZYiSAHGCsZPPyXp1+XpiaCQCPkv+NHXaH+yS +uO6zf78ccwKBgC7QxzXnt4IXYuFxUIiBBkUgGx8PyGniWWzg6lMPy+hYxPAgq2tM +LbJSZu4eGnerujoxvkCkZjNdu53d6M1eZbkkDlrwpzC7dyNKbNgRTDU4P4/iTAXj +p1Kf4Du4OMzvqYebZ9qeRxrfReunymE21lO27/1x59RkvaUwHkrB4Tn1AoGBAK0K +46/7VyaiZ56No7BEWYoaTU0EhncyOUqfyGlG5cncd9RBozybPhPFDVRE+TrwfKQP +z7v2A/tA999MfUzvCij+FkQNc92QgPNUU/qNaGH+SUH2Oe9sGa7kqrJdeoOLnMnC +IWWIUggt3WfuYQarNe7JnUd1ZU2Nt3GZYY03EL7rAoGAfo5Wku2uopyMoXaY22dr +GsATfARJl8ElzlGZsrDiIc/IgOZ8iW9m09GYhD+rvrQ5JQnMAGp0Kwaywxvbm0iu +ica5EvlmC+YYHq9ZhVmtrhSDaEkHHcg6uK5/Y1Bde+wSepHFKYuUnNXIXF4K0fDM +FA8Wa4lSMpexLi/4loLf+gE= +-----END PRIVATE KEY----- + +comp-lzo +verb 3 +mute 20 +cipher AES-256-CBC diff --git a/pointeuse/vpn/DKS-VPN-dolvi-pot08.ovpn b/pointeuse/vpn/DKS-VPN-dolvi-pot08.ovpn new file mode 100644 index 00000000..16e37923 --- /dev/null +++ b/pointeuse/vpn/DKS-VPN-dolvi-pot08.ovpn @@ -0,0 +1,153 @@ +client +dev tun +proto udp +remote vsrv01.dks.lu 1098 +remote arandks.lu 1098 + +remote-random +resolv-retry infinite +nobind +persist-key +persist-tun +mute-replay-warnings + +-----BEGIN CERTIFICATE----- +MIIDHjCCAgagAwIBAgIJAK61AhpxApOUMA0GCSqGSIb3DQEBCwUAMA8xDTALBgNV +BAMMBGFyYW4wHhcNMTcxMjE4MTM0MTIyWhcNMjcxMjE2MTM0MTIyWjAPMQ0wCwYD +VQQDDARhcmFuMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA1TydPk4X +8YyPjXI0htiMsM9C5jP0iH/Hgl7w+t0NL6fvcJhwy8BntJ/FRlS/GFoszmH+0zSt +pVeymgEwSQ2SrZixSkln2XhbTIH/NUEHosdllECJgj83W0Kpbtms8Cs6/FfhvMB4 +4o/GnN/mkmA9kslguStksV2vQh98Os9rw5gEKM5qFYO5FYUZIIrcsLgyzztPpw4H +vhrAzxuuu+zg9cOGAihlWV+CSlQJDZyC9hH9xal8UsTlYn9HFqVjr39k7OJg0WC6 +gyjQ92nzqEw49Jkb3NMAarF0zPcP25WV97Aq7EDZV/G8LZbg4p+xCrkz2iUJttu1 +CZjhS9uNsvIAYQIDAQABo30wezAdBgNVHQ4EFgQUqVEvl+MVxdWqNx36igfxqjrJ +f9QwPwYDVR0jBDgwNoAUqVEvl+MVxdWqNx36igfxqjrJf9ShE6QRMA8xDTALBgNV +BAMMBGFyYW6CCQCutQIacQKTlDAMBgNVHRMEBTADAQH/MAsGA1UdDwQEAwIBBjAN +BgkqhkiG9w0BAQsFAAOCAQEAysh4aGsnv4CebGvzZ9mZlmK5o4JTj4bqRw8sFe4h +wW/bZ0ggMnnvNZF1VJJgO/UQQq2gIiOw7zLrlSmPHIhRPkQspemk6uU0m2h6K9rn +AnX3qeVP5dXbZsqr1jI1/aCzxSW5hu6WUfR3Q+u1pGm9HePhrRJj0djW8Kd7UO+s +PfpIN9gbfLoLnAfCJIc3BccBoD5IqU4s7vleekQGCJHloT5S3MefiIUg7d8leW4V +8PiCohkgHwMOZy3ACy1ZPuT92x+7JCaNV56X7iT3GZhkyQ4tSKu3UpMFkz8obYKw +8RrNsXXBRWgnuakkMY6wHJJZBPJn+qDrWbO7nxVTOqY22g== +-----END CERTIFICATE----- + + +Certificate: + Data: + Version: 3 (0x2) + Serial Number: + 7a:d0:78:9d:88:12:62:97:b8:d7:c0:47:67:db:94:28 + Signature Algorithm: sha256WithRSAEncryption + Issuer: CN=aran + Validity + Not Before: Sep 28 13:31:01 2021 GMT + Not After : Sep 26 13:31:01 2031 GMT + Subject: CN=dolvi-pot08 + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + Public-Key: (2048 bit) + Modulus: + 00:d4:47:4e:d0:e6:4a:63:c8:3e:c2:8f:a3:d6:e9: + 15:79:42:c2:74:0e:23:ed:b4:7c:e4:ed:5f:40:62: + 13:03:0c:ed:52:03:ef:87:70:a7:43:53:48:f6:23: + 74:22:86:9c:67:cc:cf:04:cf:36:03:fc:ac:a8:ae: + 08:64:bb:46:d8:55:67:0d:32:19:ae:ab:49:28:49: + 0f:79:41:69:82:5c:5b:d0:49:e3:cb:78:99:d3:2e: + 26:88:dd:bc:2d:a0:a6:0d:b5:ef:d7:68:e9:e2:c5: + cd:23:ea:de:81:1f:f9:af:fe:9e:45:58:9e:97:61: + f4:f8:a5:a5:52:5e:b9:84:9f:bf:da:83:17:26:d4: + 71:62:cf:7e:5f:52:28:4f:e5:f3:9c:18:06:50:d3: + f1:25:38:05:d9:31:ab:f1:81:ce:7b:57:94:5b:59: + 00:0b:12:96:5c:bc:8b:26:59:52:cf:56:82:80:34: + 7f:31:11:3f:89:cc:b2:fa:8f:97:1a:5a:a3:a9:06: + c1:2e:42:88:a7:9d:31:1e:a2:63:ce:99:9f:ba:23: + 52:27:b1:3b:03:e2:d7:d4:f8:8a:9b:6f:d0:ec:f9: + 1d:73:58:b1:1f:ce:27:27:f5:cd:09:74:a2:db:c2: + 0b:25:9e:86:a8:9d:5e:3a:df:c3:14:ce:88:e8:f5: + 7d:d5 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Basic Constraints: + CA:FALSE + X509v3 Subject Key Identifier: + BC:01:50:63:6B:2A:B5:A1:43:DB:A9:A2:A2:A8:B2:CD:7C:FA:EE:43 + X509v3 Authority Key Identifier: + keyid:A9:51:2F:97:E3:15:C5:D5:AA:37:1D:FA:8A:07:F1:AA:3A:C9:7F:D4 + DirName:/CN=aran + serial:AE:B5:02:1A:71:02:93:94 + + X509v3 Extended Key Usage: + TLS Web Client Authentication + X509v3 Key Usage: + Digital Signature + Signature Algorithm: sha256WithRSAEncryption + 8a:87:6c:ef:0f:34:c2:ec:43:26:6a:7d:2e:78:c0:57:9d:a7: + b0:c4:ec:d4:b0:5e:56:98:0b:58:47:f3:db:c0:b1:cd:a7:48: + 35:67:c8:01:4c:67:fc:73:21:06:ed:34:7c:80:a0:82:12:c9: + 21:2e:1a:7b:e7:bf:b9:00:f2:d4:f5:e8:77:12:f3:d4:38:de: + 0c:d7:cc:64:24:a1:66:b5:6a:29:f8:9f:c8:40:f9:c2:ec:3d: + 8d:5e:34:15:e9:cd:dc:8e:6e:0f:94:c2:95:22:7f:43:ee:2e: + 26:ec:ea:85:6a:54:5e:b7:53:09:43:55:b1:bc:6f:16:c4:16: + 88:1e:b1:5a:59:68:44:4f:40:03:c0:ea:fa:eb:ef:51:b0:c2: + 8d:ad:cc:55:85:7a:33:21:ca:3f:df:8e:e0:c2:b6:7d:64:4e: + 75:6a:28:f0:e2:6d:57:b8:e5:ca:7a:0e:72:5d:39:49:78:11: + e3:bd:34:1e:1f:bb:2d:5d:14:84:f2:5b:4b:18:17:96:d7:b8: + 57:d3:de:b0:b5:c7:3f:88:68:6f:cd:62:3e:ab:b8:64:64:92: + e1:77:66:ed:d6:f5:3b:dd:ac:2c:8c:1e:ce:13:b2:7c:ce:bb: + b8:dd:14:02:e2:b8:5d:08:a7:b6:61:4a:c1:05:08:b3:e4:d6: + 7c:a1:8a:4b +-----BEGIN CERTIFICATE----- +MIIDQDCCAiigAwIBAgIQetB4nYgSYpe418BHZ9uUKDANBgkqhkiG9w0BAQsFADAP +MQ0wCwYDVQQDDARhcmFuMB4XDTIxMDkyODEzMzEwMVoXDTMxMDkyNjEzMzEwMVow +FjEUMBIGA1UEAwwLZG9sdmktcG90MDgwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAw +ggEKAoIBAQDUR07Q5kpjyD7Cj6PW6RV5QsJ0DiPttHzk7V9AYhMDDO1SA++HcKdD +U0j2I3QihpxnzM8EzzYD/Kyorghku0bYVWcNMhmuq0koSQ95QWmCXFvQSePLeJnT +LiaI3bwtoKYNte/XaOnixc0j6t6BH/mv/p5FWJ6XYfT4paVSXrmEn7/agxcm1HFi +z35fUihP5fOcGAZQ0/ElOAXZMavxgc57V5RbWQALEpZcvIsmWVLPVoKANH8xET+J +zLL6j5caWqOpBsEuQoinnTEeomPOmZ+6I1InsTsD4tfU+Iqbb9Ds+R1zWLEfzicn +9c0JdKLbwgslnoaonV4638MUzojo9X3VAgMBAAGjgZAwgY0wCQYDVR0TBAIwADAd +BgNVHQ4EFgQUvAFQY2sqtaFD26mioqiyzXz67kMwPwYDVR0jBDgwNoAUqVEvl+MV +xdWqNx36igfxqjrJf9ShE6QRMA8xDTALBgNVBAMMBGFyYW6CCQCutQIacQKTlDAT +BgNVHSUEDDAKBggrBgEFBQcDAjALBgNVHQ8EBAMCB4AwDQYJKoZIhvcNAQELBQAD +ggEBAIqHbO8PNMLsQyZqfS54wFedp7DE7NSwXlaYC1hH89vAsc2nSDVnyAFMZ/xz +IQbtNHyAoIISySEuGnvnv7kA8tT16HcS89Q43gzXzGQkoWa1ain4n8hA+cLsPY1e +NBXpzdyObg+UwpUif0PuLibs6oVqVF63UwlDVbG8bxbEFogesVpZaERPQAPA6vrr +71Gwwo2tzFWFejMhyj/fjuDCtn1kTnVqKPDibVe45cp6DnJdOUl4EeO9NB4fuy1d +FITyW0sYF5bXuFfT3rC1xz+IaG/NYj6ruGRkkuF3Zu3W9TvdrCyMHs4TsnzOu7jd +FALiuF0Ip7ZhSsEFCLPk1nyhiks= +-----END CERTIFICATE----- + + +-----BEGIN PRIVATE KEY----- +MIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQDUR07Q5kpjyD7C +j6PW6RV5QsJ0DiPttHzk7V9AYhMDDO1SA++HcKdDU0j2I3QihpxnzM8EzzYD/Kyo +rghku0bYVWcNMhmuq0koSQ95QWmCXFvQSePLeJnTLiaI3bwtoKYNte/XaOnixc0j +6t6BH/mv/p5FWJ6XYfT4paVSXrmEn7/agxcm1HFiz35fUihP5fOcGAZQ0/ElOAXZ +Mavxgc57V5RbWQALEpZcvIsmWVLPVoKANH8xET+JzLL6j5caWqOpBsEuQoinnTEe +omPOmZ+6I1InsTsD4tfU+Iqbb9Ds+R1zWLEfzicn9c0JdKLbwgslnoaonV4638MU +zojo9X3VAgMBAAECggEAOzdxKyEy20b/CvNa9xaqYNtYt1tCdosE1C/LhIBXYWB3 +y4tBhHzOjB9tmQwm14LJmsMtdOAA53fTCnMR8Fe12Z9pUesJ8wnhLJXE9URkFHOD +QUV7gEUyVBDpuwBwACJycByyvVqM9C/NnBlm3Ip48rmKmTmxc/Vliv9acPHvuqj7 +n6f1M6FhaCtEhMkVzOy3kd1AtT1fQNXTvIwMcziFkzsXD8zmhkW7NP89zrS3vfjW +NEkCi6aLKhR+n8+MOrG3CqZdTj5ESGUQcnQ4ZbdJ30sRp7IrpF1YW5QDzfFZHU34 ++4Q9SPRg7v339blY4ZWfw9T4nUCt6rrh4l55oFhr+QKBgQDsKhZOHWWunPSBYQuR +W52LZjrQ5wT2Lu8Yi8V+RRzFQIXxxM8V6QPZ8jO1fYzLmaRFrISBhf3eDd3mitbN +MUKuOeNJeIy99aGek4Ds/YIc2H26sWdQBl+5m/9DJZQQaO+j9EYIRC3mxiGy7Xjl +feyplArYNKDG7Pnamr7+ui9HwwKBgQDmG6L23COpvfnz8lnSRSfxCb5dymYl63zQ +QVrptr5AQ6/32ldNwsdUKzUWGegUWUiKqsEQDwpvgZhASqr7OaODyC1MWTacTv3i +lynwHDxJ2oxYYe5ZPb5P3RwgeiCMFHmiI8kFe+hBdIYQl3hbRw7NSUGBqzlKfjJa +4/kiolpihwKBgQDG/Yt/1GtaHuwym8e4ef6cd841OYNHwDI8d4E4LRnZ5s018wQe +zREuslL5qMlawKHXB087J+DKGtsPp4roqIor7aDixk2ovfCpglYO2mioz43ZIiQQ +HN7JsXT7ag2BajoJ5wifbHtUyTuZ3ViR3nHsTU558JZMJ1874EnwroaqKwKBgQDI +zd9Fu8/nZeDFMH2P0EfNwan9oQ3JE5plBlN21sFpxWe/TCuZsVtPKTF3av4rG8sB +L4exIt8Bdb9Og5p4B9GYw8w77zKH7ysBXNb9MTavYGfPDQ75k7cLbLIJ6WmTtJ58 +juvyvDFvRWdk/TnLtdPF86KVrL0fM8dvp7gWsEVd6wKBgQDo4SpMn4GFtMU9BRwr +HdNjjHO6keooLykgeHtLiJ4eXZNTp5tmXAGFma7h2gwqQM0802chrpn0kdl0heLL +kfs3+XncWbJ6PXtDMSPrq0pKQ2TTnoE9ocKy+XmwaU4jC5NwjJdQdCJV+BkHf7MD +qUvdMuF18PDlDxydnrmzI/Zwug== +-----END PRIVATE KEY----- + +comp-lzo +verb 3 +mute 20 +cipher AES-256-CBC diff --git a/pointeuse/vpn/DKS-VPN-elch-hourtrax.ovpn b/pointeuse/vpn/DKS-VPN-elch-hourtrax.ovpn new file mode 100644 index 00000000..335ac6cd --- /dev/null +++ b/pointeuse/vpn/DKS-VPN-elch-hourtrax.ovpn @@ -0,0 +1,153 @@ +client +dev tun +proto udp +remote vsrv01.dks.lu 1098 +remote arandks.lu 1098 + +remote-random +resolv-retry infinite +nobind +persist-key +persist-tun +mute-replay-warnings + +-----BEGIN CERTIFICATE----- +MIIDHjCCAgagAwIBAgIJAK61AhpxApOUMA0GCSqGSIb3DQEBCwUAMA8xDTALBgNV +BAMMBGFyYW4wHhcNMTcxMjE4MTM0MTIyWhcNMjcxMjE2MTM0MTIyWjAPMQ0wCwYD +VQQDDARhcmFuMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA1TydPk4X +8YyPjXI0htiMsM9C5jP0iH/Hgl7w+t0NL6fvcJhwy8BntJ/FRlS/GFoszmH+0zSt +pVeymgEwSQ2SrZixSkln2XhbTIH/NUEHosdllECJgj83W0Kpbtms8Cs6/FfhvMB4 +4o/GnN/mkmA9kslguStksV2vQh98Os9rw5gEKM5qFYO5FYUZIIrcsLgyzztPpw4H +vhrAzxuuu+zg9cOGAihlWV+CSlQJDZyC9hH9xal8UsTlYn9HFqVjr39k7OJg0WC6 +gyjQ92nzqEw49Jkb3NMAarF0zPcP25WV97Aq7EDZV/G8LZbg4p+xCrkz2iUJttu1 +CZjhS9uNsvIAYQIDAQABo30wezAdBgNVHQ4EFgQUqVEvl+MVxdWqNx36igfxqjrJ +f9QwPwYDVR0jBDgwNoAUqVEvl+MVxdWqNx36igfxqjrJf9ShE6QRMA8xDTALBgNV +BAMMBGFyYW6CCQCutQIacQKTlDAMBgNVHRMEBTADAQH/MAsGA1UdDwQEAwIBBjAN +BgkqhkiG9w0BAQsFAAOCAQEAysh4aGsnv4CebGvzZ9mZlmK5o4JTj4bqRw8sFe4h +wW/bZ0ggMnnvNZF1VJJgO/UQQq2gIiOw7zLrlSmPHIhRPkQspemk6uU0m2h6K9rn +AnX3qeVP5dXbZsqr1jI1/aCzxSW5hu6WUfR3Q+u1pGm9HePhrRJj0djW8Kd7UO+s +PfpIN9gbfLoLnAfCJIc3BccBoD5IqU4s7vleekQGCJHloT5S3MefiIUg7d8leW4V +8PiCohkgHwMOZy3ACy1ZPuT92x+7JCaNV56X7iT3GZhkyQ4tSKu3UpMFkz8obYKw +8RrNsXXBRWgnuakkMY6wHJJZBPJn+qDrWbO7nxVTOqY22g== +-----END CERTIFICATE----- + + +Certificate: + Data: + Version: 3 (0x2) + Serial Number: + fe:63:1c:b4:2d:96:58:d5:24:ec:f1:bf:eb:a7:2a:c8 + Signature Algorithm: sha256WithRSAEncryption + Issuer: CN=aran + Validity + Not Before: Nov 11 12:45:16 2019 GMT + Not After : Nov 8 12:45:16 2029 GMT + Subject: CN=elch-hourtrax + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + Public-Key: (2048 bit) + Modulus: + 00:a9:af:3a:46:7b:91:d2:0e:aa:4a:77:58:be:ea: + 69:31:8f:2c:8f:d3:ab:a6:b9:7f:86:f0:69:bd:84: + 03:00:e7:db:c9:19:91:12:7e:fc:67:40:a4:a0:d2: + 66:04:59:b6:89:8e:0c:e9:96:d3:ed:49:10:af:a0: + 23:9f:58:ca:ea:85:a1:4d:f0:27:15:d5:1e:32:64: + 5b:12:8f:74:7d:f4:1c:c4:20:42:14:be:7f:3b:ab: + 32:b5:2d:06:e1:38:2f:a3:a8:42:1c:89:7e:1d:81: + 62:7d:41:8c:38:8f:7e:53:68:b4:65:52:39:de:5d: + ea:cd:f6:05:37:2f:23:12:70:22:a9:af:cc:a0:14: + cf:f7:78:c1:dc:15:27:79:2f:8e:10:97:8f:65:67: + 13:4e:ff:9b:e6:7f:4c:cb:2d:08:a6:8f:62:2d:bc: + 93:07:90:c8:6b:73:53:1c:94:83:7b:bc:da:a8:dd: + 54:11:3f:6d:11:f4:08:b4:dd:47:0a:8c:7b:83:e0: + df:35:64:9e:e6:30:59:c0:c8:c5:91:66:66:90:84: + 9f:75:0c:df:24:11:c2:0a:36:ab:25:9a:6c:ce:ee: + 1c:69:f6:c3:fa:6c:a6:a8:00:47:0b:6c:90:f1:14: + e8:ae:f1:ed:5e:54:6d:52:e0:48:3b:fc:2c:f2:de: + b6:3b + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Basic Constraints: + CA:FALSE + X509v3 Subject Key Identifier: + 8F:C0:64:75:FA:14:9A:9A:D2:76:E1:D9:E1:CC:97:3C:3E:F7:0E:1D + X509v3 Authority Key Identifier: + keyid:A9:51:2F:97:E3:15:C5:D5:AA:37:1D:FA:8A:07:F1:AA:3A:C9:7F:D4 + DirName:/CN=aran + serial:AE:B5:02:1A:71:02:93:94 + + X509v3 Extended Key Usage: + TLS Web Client Authentication + X509v3 Key Usage: + Digital Signature + Signature Algorithm: sha256WithRSAEncryption + 6d:ec:8a:be:2e:e0:a8:95:42:49:01:7a:2f:f9:af:b9:80:a7: + 73:c5:5e:06:e6:dc:37:b1:4c:46:62:0e:39:c2:cc:d2:66:3d: + 8c:49:52:bd:5d:39:a1:ad:79:8a:98:32:85:cb:fd:c3:56:a3: + 15:25:38:12:aa:f1:f1:5e:6b:84:04:2c:3d:95:ce:2a:43:8d: + 3a:57:08:b8:47:26:82:61:ab:7b:28:82:03:39:a1:cd:20:33: + 35:a6:0f:c3:1a:5d:c4:91:88:59:27:d7:29:25:c3:6b:0c:40: + 37:0d:3b:ce:4f:38:30:4d:86:e6:ba:1e:af:1f:d9:37:be:1e: + 23:e7:8e:dc:80:ba:01:4f:ad:61:c7:14:6e:e0:63:95:33:56: + 51:ca:39:b9:eb:a9:02:03:75:ec:10:f0:68:44:38:d2:cf:26: + a7:8e:25:e8:1b:c0:d8:4c:fa:29:6d:8f:05:b0:cb:b5:9a:03: + d8:4c:db:11:99:db:6b:ba:85:37:ef:c1:08:1b:b7:73:c3:ea: + 0d:4f:d0:4b:fc:ea:fe:a5:b2:c2:dd:24:3a:a5:b1:6c:f8:2c: + 91:d9:37:cb:0a:38:d2:b6:79:c1:63:be:72:f7:95:8f:80:aa: + 0c:ab:21:20:74:c2:a1:8f:ba:9e:15:d3:ba:ea:ee:4b:9b:dc: + 1f:b7:53:2f +-----BEGIN CERTIFICATE----- +MIIDQzCCAiugAwIBAgIRAP5jHLQtlljVJOzxv+unKsgwDQYJKoZIhvcNAQELBQAw +DzENMAsGA1UEAwwEYXJhbjAeFw0xOTExMTExMjQ1MTZaFw0yOTExMDgxMjQ1MTZa +MBgxFjAUBgNVBAMMDWVsY2gtaG91cnRyYXgwggEiMA0GCSqGSIb3DQEBAQUAA4IB +DwAwggEKAoIBAQCprzpGe5HSDqpKd1i+6mkxjyyP06umuX+G8Gm9hAMA59vJGZES +fvxnQKSg0mYEWbaJjgzpltPtSRCvoCOfWMrqhaFN8CcV1R4yZFsSj3R99BzEIEIU +vn87qzK1LQbhOC+jqEIciX4dgWJ9QYw4j35TaLRlUjneXerN9gU3LyMScCKpr8yg +FM/3eMHcFSd5L44Ql49lZxNO/5vmf0zLLQimj2ItvJMHkMhrc1MclIN7vNqo3VQR +P20R9Ai03UcKjHuD4N81ZJ7mMFnAyMWRZmaQhJ91DN8kEcIKNqslmmzO7hxp9sP6 +bKaoAEcLbJDxFOiu8e1eVG1S4Eg7/Czy3rY7AgMBAAGjgZAwgY0wCQYDVR0TBAIw +ADAdBgNVHQ4EFgQUj8BkdfoUmprSduHZ4cyXPD73Dh0wPwYDVR0jBDgwNoAUqVEv +l+MVxdWqNx36igfxqjrJf9ShE6QRMA8xDTALBgNVBAMMBGFyYW6CCQCutQIacQKT +lDATBgNVHSUEDDAKBggrBgEFBQcDAjALBgNVHQ8EBAMCB4AwDQYJKoZIhvcNAQEL +BQADggEBAG3sir4u4KiVQkkBei/5r7mAp3PFXgbm3DexTEZiDjnCzNJmPYxJUr1d +OaGteYqYMoXL/cNWoxUlOBKq8fFea4QELD2VzipDjTpXCLhHJoJhq3soggM5oc0g +MzWmD8MaXcSRiFkn1yklw2sMQDcNO85PODBNhua6Hq8f2Te+HiPnjtyAugFPrWHH +FG7gY5UzVlHKObnrqQIDdewQ8GhEONLPJqeOJegbwNhM+iltjwWwy7WaA9hM2xGZ +22u6hTfvwQgbt3PD6g1P0Ev86v6lssLdJDqlsWz4LJHZN8sKONK2ecFjvnL3lY+A +qgyrISB0wqGPup4V07rq7kub3B+3Uy8= +-----END CERTIFICATE----- + + +-----BEGIN PRIVATE KEY----- +MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCprzpGe5HSDqpK +d1i+6mkxjyyP06umuX+G8Gm9hAMA59vJGZESfvxnQKSg0mYEWbaJjgzpltPtSRCv +oCOfWMrqhaFN8CcV1R4yZFsSj3R99BzEIEIUvn87qzK1LQbhOC+jqEIciX4dgWJ9 +QYw4j35TaLRlUjneXerN9gU3LyMScCKpr8ygFM/3eMHcFSd5L44Ql49lZxNO/5vm +f0zLLQimj2ItvJMHkMhrc1MclIN7vNqo3VQRP20R9Ai03UcKjHuD4N81ZJ7mMFnA +yMWRZmaQhJ91DN8kEcIKNqslmmzO7hxp9sP6bKaoAEcLbJDxFOiu8e1eVG1S4Eg7 +/Czy3rY7AgMBAAECggEBAIiLIgjPrQLsnCn6KebPeMDRpplCSrGKOc3bLiu7zDLx +YNJNiYjpuLBZu2BSjpdXneTI8ykRHw6lqhC5e5DhgcAAslGmO7181qTUTtj7qVEl +m/RSxPouZPIeDFrwlcWsUeGPJ0wRc/PIRvnmQjDNf2kdK3URGtIOn0EHhSDoBH/z +fisgOgbe96+/isEPPSDAHwXIy63uAg0+Vv/a2pJ37NkZlACD2kIkNJiXNHN/S1Qk +Q4GDXoq7HeEmiT3jCxeuI+w4bEncIvlhsMUIWNtfhM3a3n9V9qnUT8nURSjJNRKs +TbdUXh6rv9e7G757xuMLzfkHCwFzT4lBX1V+aljPL+ECgYEA3xqQj7LEkOo9yXI2 +8D47lh1Pq6Fbm71mHUYzsR9BvJXR+lYo2XO5/UbUU2sqRbG1iDNi3F0JE1Yum9ak +h91ektFGUi1+dcc+UG6auRGO/u49op66yjCZWr5jr+Ta6f7XGc/aMxU2+0Zv3saR +Og+qR+IFrA5cBpIEvRGgtV05kisCgYEAwrRCmwMatet0A/CFVn8qAeloeWZ0srtA +kqOvMQbBOnps1DkcIZXTuNfqLn/ZZnnBYiYlQpy73A4Rjs6eXwT63QL9JgRRxCUB +Vht4u39W8Lx8tA+VlJ/Yh52C+mmxL8ursJ6xkNs4Xa5kmZmhHYmui1I06K96B7Gz +9r3ihMv7NDECgYBu0zhaWXgxcFqO9fB6eL+Kuza3UCk8fOH7ysKkyp0R++5Zh3E1 +S7ppKUURxxsxkaxWYwhJ5OE8PMRcX0xNvVZcYh6ndbfq87VtqPOs2R8KXfg6DtVE +2M1k+Ux1tJ5WPGRHiyud0n0EZyHtLQA5Mkzo9krRBDUMgn5eGSKW1R9jDwKBgEHw +cHo08+/WXMUUyOOBT4W0OZibtTvupLDE1IkjA3+9hGvfJ4LMThbUsM+spsDIzVBj +IM1NbWXaMeIOYZ5GfnspDvi4D8UAz1INHbdKKfR/sS/98yeRdvB+zKPn9YT9UhkP +tY0cYRuA+zr1x5XMUhuG7Lo863P9n7gZmMRmnJ2RAoGAelEGMi5Vb3bcOAJHf2nm +macOP9YCy/gOeaRxyGDSczP4LMZEOmgBrhzbJKFeJHqNnhni4cJZLWj3/ITNdYB6 +97qmmRdCZaT6MWPMSIK6kxsIKROixI4nGyAGQAuz/9x1NDj/nxdBvob3qnocJ3M8 +r5ZtvNbbLxCU4POk2hgBLec= +-----END PRIVATE KEY----- + +comp-lzo +verb 3 +mute 20 +cipher AES-256-CBC diff --git a/pointeuse/vpn/DKS-VPN-elch-pothourtrax.ovpn b/pointeuse/vpn/DKS-VPN-elch-pothourtrax.ovpn new file mode 100644 index 00000000..2a30ccfb --- /dev/null +++ b/pointeuse/vpn/DKS-VPN-elch-pothourtrax.ovpn @@ -0,0 +1,153 @@ +client +dev tun +proto udp +remote vsrv01.dks.lu 1098 +remote arandks.lu 1098 + +remote-random +resolv-retry infinite +nobind +persist-key +persist-tun +mute-replay-warnings + +-----BEGIN CERTIFICATE----- +MIIDHjCCAgagAwIBAgIJAK61AhpxApOUMA0GCSqGSIb3DQEBCwUAMA8xDTALBgNV +BAMMBGFyYW4wHhcNMTcxMjE4MTM0MTIyWhcNMjcxMjE2MTM0MTIyWjAPMQ0wCwYD +VQQDDARhcmFuMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA1TydPk4X +8YyPjXI0htiMsM9C5jP0iH/Hgl7w+t0NL6fvcJhwy8BntJ/FRlS/GFoszmH+0zSt +pVeymgEwSQ2SrZixSkln2XhbTIH/NUEHosdllECJgj83W0Kpbtms8Cs6/FfhvMB4 +4o/GnN/mkmA9kslguStksV2vQh98Os9rw5gEKM5qFYO5FYUZIIrcsLgyzztPpw4H +vhrAzxuuu+zg9cOGAihlWV+CSlQJDZyC9hH9xal8UsTlYn9HFqVjr39k7OJg0WC6 +gyjQ92nzqEw49Jkb3NMAarF0zPcP25WV97Aq7EDZV/G8LZbg4p+xCrkz2iUJttu1 +CZjhS9uNsvIAYQIDAQABo30wezAdBgNVHQ4EFgQUqVEvl+MVxdWqNx36igfxqjrJ +f9QwPwYDVR0jBDgwNoAUqVEvl+MVxdWqNx36igfxqjrJf9ShE6QRMA8xDTALBgNV +BAMMBGFyYW6CCQCutQIacQKTlDAMBgNVHRMEBTADAQH/MAsGA1UdDwQEAwIBBjAN +BgkqhkiG9w0BAQsFAAOCAQEAysh4aGsnv4CebGvzZ9mZlmK5o4JTj4bqRw8sFe4h +wW/bZ0ggMnnvNZF1VJJgO/UQQq2gIiOw7zLrlSmPHIhRPkQspemk6uU0m2h6K9rn +AnX3qeVP5dXbZsqr1jI1/aCzxSW5hu6WUfR3Q+u1pGm9HePhrRJj0djW8Kd7UO+s +PfpIN9gbfLoLnAfCJIc3BccBoD5IqU4s7vleekQGCJHloT5S3MefiIUg7d8leW4V +8PiCohkgHwMOZy3ACy1ZPuT92x+7JCaNV56X7iT3GZhkyQ4tSKu3UpMFkz8obYKw +8RrNsXXBRWgnuakkMY6wHJJZBPJn+qDrWbO7nxVTOqY22g== +-----END CERTIFICATE----- + + +Certificate: + Data: + Version: 3 (0x2) + Serial Number: + c4:c0:c3:8d:67:2c:9b:42:0f:10:ef:f5:fc:54:16:00 + Signature Algorithm: sha256WithRSAEncryption + Issuer: CN=aran + Validity + Not Before: Oct 13 06:25:55 2020 GMT + Not After : Oct 11 06:25:55 2030 GMT + Subject: CN=elch-pothourtrax + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + Public-Key: (2048 bit) + Modulus: + 00:a3:b7:b9:00:85:3a:35:67:08:ba:25:1a:a9:99: + ed:f7:80:68:a7:2f:db:61:7f:3c:60:c3:21:98:7e: + ab:37:ea:73:84:a0:11:ce:8d:cd:35:24:99:aa:00: + fc:98:5e:8a:30:7a:7d:5a:bc:b7:94:ee:a0:7d:2a: + 42:30:ee:63:bd:99:29:82:09:75:17:c1:c0:99:33: + 82:0b:ed:cd:0c:cd:ec:f5:70:c8:f9:2d:fe:ec:5f: + d4:88:85:00:84:2c:22:ae:05:10:c6:df:65:1b:f0: + 34:e3:fc:0b:c2:e3:01:86:04:af:96:6f:b2:ab:4f: + 9a:3f:43:6e:48:5e:9f:cd:2c:3d:6a:49:93:4e:94: + c3:be:e3:55:af:3e:9c:ac:1c:8b:9c:e9:9a:38:4f: + 85:88:6f:71:94:f9:cc:ec:1b:d8:4c:36:57:89:42: + b3:99:af:9a:33:95:8a:1f:5c:b2:bd:0d:2b:7a:e6: + fc:43:fc:a8:f2:d0:31:11:4f:66:c7:09:b7:14:ab: + a9:aa:97:13:a1:39:f3:0e:6f:c6:a3:ea:dd:ed:32: + d3:55:db:49:20:5c:ff:42:68:52:bc:7e:1c:51:20: + 09:c7:90:e4:d8:95:87:31:3a:18:95:10:7f:12:99: + f0:10:6c:a2:cf:1c:a3:74:8b:3a:4a:81:c7:ef:ff: + 44:83 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Basic Constraints: + CA:FALSE + X509v3 Subject Key Identifier: + 45:F5:93:99:6D:CF:E9:ED:79:92:4B:5E:5B:C9:6E:F0:53:CC:6E:3C + X509v3 Authority Key Identifier: + keyid:A9:51:2F:97:E3:15:C5:D5:AA:37:1D:FA:8A:07:F1:AA:3A:C9:7F:D4 + DirName:/CN=aran + serial:AE:B5:02:1A:71:02:93:94 + + X509v3 Extended Key Usage: + TLS Web Client Authentication + X509v3 Key Usage: + Digital Signature + Signature Algorithm: sha256WithRSAEncryption + 81:fb:51:14:fc:fe:00:99:ef:da:46:94:ec:0b:72:74:4a:26: + af:c8:1a:1c:03:bb:f7:d8:fb:d9:b3:be:73:e7:49:b0:96:e9: + 2b:4b:85:5d:91:e5:fd:49:b7:10:f0:8b:da:18:3d:a0:99:1e: + 4a:44:a0:4d:89:94:1a:28:cb:79:d4:85:f4:3a:20:1c:66:51: + 43:fc:46:e5:dd:e7:45:f7:48:90:61:9d:28:2b:2b:37:f8:c2: + de:16:80:24:57:bd:89:7e:07:b8:b6:be:30:5e:da:3a:24:5e: + 1f:3d:a0:09:89:ee:bf:b4:db:0f:dc:ab:a6:1b:85:05:2f:d9: + 08:0c:3f:bc:14:05:49:01:9c:a9:7c:13:5b:e0:f6:ed:59:e5: + 3f:11:d6:8d:fb:b7:8d:07:a0:6a:9e:dc:52:90:5b:eb:18:1d: + 9e:d9:90:6d:42:e8:9b:3f:e4:73:b7:a5:c1:01:ce:8a:52:aa: + 8c:e4:d9:e2:9a:0b:38:9a:8f:22:99:80:a4:2a:fe:05:2a:28: + 19:74:96:c5:d7:b6:75:51:7e:f2:80:ea:df:78:55:f0:65:99: + 0e:e1:13:8b:4f:13:f6:49:0f:61:bd:74:c4:7b:1d:86:49:81: + 8b:b5:82:7e:01:ec:ea:96:ad:3f:04:95:6e:c1:43:0c:e7:37: + d7:b5:d8:c3 +-----BEGIN CERTIFICATE----- +MIIDRjCCAi6gAwIBAgIRAMTAw41nLJtCDxDv9fxUFgAwDQYJKoZIhvcNAQELBQAw +DzENMAsGA1UEAwwEYXJhbjAeFw0yMDEwMTMwNjI1NTVaFw0zMDEwMTEwNjI1NTVa +MBsxGTAXBgNVBAMMEGVsY2gtcG90aG91cnRyYXgwggEiMA0GCSqGSIb3DQEBAQUA +A4IBDwAwggEKAoIBAQCjt7kAhTo1Zwi6JRqpme33gGinL9thfzxgwyGYfqs36nOE +oBHOjc01JJmqAPyYXoowen1avLeU7qB9KkIw7mO9mSmCCXUXwcCZM4IL7c0Mzez1 +cMj5Lf7sX9SIhQCELCKuBRDG32Ub8DTj/AvC4wGGBK+Wb7KrT5o/Q25IXp/NLD1q +SZNOlMO+41WvPpysHIuc6Zo4T4WIb3GU+czsG9hMNleJQrOZr5ozlYofXLK9DSt6 +5vxD/Kjy0DERT2bHCbcUq6mqlxOhOfMOb8aj6t3tMtNV20kgXP9CaFK8fhxRIAnH +kOTYlYcxOhiVEH8SmfAQbKLPHKN0izpKgcfv/0SDAgMBAAGjgZAwgY0wCQYDVR0T +BAIwADAdBgNVHQ4EFgQURfWTmW3P6e15kkteW8lu8FPMbjwwPwYDVR0jBDgwNoAU +qVEvl+MVxdWqNx36igfxqjrJf9ShE6QRMA8xDTALBgNVBAMMBGFyYW6CCQCutQIa +cQKTlDATBgNVHSUEDDAKBggrBgEFBQcDAjALBgNVHQ8EBAMCB4AwDQYJKoZIhvcN +AQELBQADggEBAIH7URT8/gCZ79pGlOwLcnRKJq/IGhwDu/fY+9mzvnPnSbCW6StL +hV2R5f1JtxDwi9oYPaCZHkpEoE2JlBooy3nUhfQ6IBxmUUP8RuXd50X3SJBhnSgr +Kzf4wt4WgCRXvYl+B7i2vjBe2jokXh89oAmJ7r+02w/cq6YbhQUv2QgMP7wUBUkB +nKl8E1vg9u1Z5T8R1o37t40HoGqe3FKQW+sYHZ7ZkG1C6Js/5HO3pcEBzopSqozk +2eKaCziajyKZgKQq/gUqKBl0lsXXtnVRfvKA6t94VfBlmQ7hE4tPE/ZJD2G9dMR7 +HYZJgYu1gn4B7OqWrT8ElW7BQwznN9e12MM= +-----END CERTIFICATE----- + + +-----BEGIN PRIVATE KEY----- +MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCjt7kAhTo1Zwi6 +JRqpme33gGinL9thfzxgwyGYfqs36nOEoBHOjc01JJmqAPyYXoowen1avLeU7qB9 +KkIw7mO9mSmCCXUXwcCZM4IL7c0Mzez1cMj5Lf7sX9SIhQCELCKuBRDG32Ub8DTj +/AvC4wGGBK+Wb7KrT5o/Q25IXp/NLD1qSZNOlMO+41WvPpysHIuc6Zo4T4WIb3GU ++czsG9hMNleJQrOZr5ozlYofXLK9DSt65vxD/Kjy0DERT2bHCbcUq6mqlxOhOfMO +b8aj6t3tMtNV20kgXP9CaFK8fhxRIAnHkOTYlYcxOhiVEH8SmfAQbKLPHKN0izpK +gcfv/0SDAgMBAAECggEAe4fjFdtw4l6OHTZl+dbl0byYOp5HoDdLLY/Ox6u8MYK8 +CzRke0BPuGuXbskzzxx2lMG32EFRHBU6D3dVXmph4+uvgCj2qyhM1MwisjGKaMDw +rPmfCzWDhoOAcEo664AJ4th7ojNprT0AC45gqXpz6dWbT52UaOK1dkrA6eZMGZi0 +xTTxbVCp1PY7QCxi66hr7uhAuvp5NLoDyjTKRC/Ml8Vf5523A3Ibc/IGFAwexhZD +0x9RxLvOJCvS5Dy9IPrwNhK/+cQGCcyijZQ6/+3Q1AFtUfLe7kZGklPXdr/uauuz +yWVHHEzGO1doERAJgyfTmNBUzvu+iHsQw/StpWATAQKBgQDVDGzY4dJnC+8SHUsN +gGjCKl1lJb8Sy1t334bho6u/mEbflAUPeqWFMon5pNbQdKG+tsEwTDwif1tqEnwt +96sVM+Lc3q00JErlaTZfGGS2KjmVdeT2YoPb2tnPodz/79OXOW83jItom0nn7R0r +obGfPNy22dERgA5pYAiivnzpwQKBgQDEuUyGuf0KwqEu5tL68bQETW2ScAMjJwCc +aKFf4ilqspRIlXLTZsaUkvnEEln4A79KtyXIIvYHkxO+2LmEOAlsijiJ+EeuJxNq +EtDuQjmAZFEmVVU7mD85Kk+vj4HYrpGwzrawAw43hGvcKnX1QYAcOa7ZymgRCZyQ +pN3r+j3XQwKBgQDFtTwloJryyd5YPxrxMqME3O/C995zgIgnnCW9q3es25GZ1fFE +Rhromtfz9gbrd/DJ3Ss2uOhtUybwLqtStS3tBTOYqISviKaAcrzkTuzXKCQ8ESYj +h5S6KERNLPa8BEGlasVNFX4h20ogkqipXupIzeA9R7F+vgmhvF8HOCMPgQKBgB2W +hSUKWj3BEj8cpoTpz5qKDr3krQQffJ8JuaPTP0l1/ImCONgE8D8ub/SGkhOUdLQH +Id6dK4XuIB0nOZfiWcCCdYiC2D0gUXI1zEjZmw5tiCsM0Jn7Bx9Q9tU/71aowu7l +2GJWw0+kUhi2JjGyHVOhdWP6ZnaRjIPQ2DQC2kRDAoGAHFAz8gOYRuOrQ5g52GZB +PxytRUmK4G7euqZK9hhjaMEP1Rk5QNdlnXRQc/87atG91j7bWAV+CrohqQtNWYFu +5i932D2qcqneRTeVknzWF/jWcFhrZ/56TOdx04mqshLpPQWDTlVSJUExGl+zhE8A +doCIXeDtmRHnpn6JX+np+to= +-----END PRIVATE KEY----- + +comp-lzo +verb 3 +mute 20 +cipher AES-256-CBC diff --git a/pointeuse/vpn/DKS-VPN-lanx-pot01.ovpn b/pointeuse/vpn/DKS-VPN-lanx-pot01.ovpn new file mode 100644 index 00000000..fe4e38ca --- /dev/null +++ b/pointeuse/vpn/DKS-VPN-lanx-pot01.ovpn @@ -0,0 +1,153 @@ +client +dev tun +proto udp +remote vsrv01.dks.lu 1098 +remote arandks.lu 1098 + +remote-random +resolv-retry infinite +nobind +persist-key +persist-tun +mute-replay-warnings + +-----BEGIN CERTIFICATE----- +MIIDHjCCAgagAwIBAgIJAK61AhpxApOUMA0GCSqGSIb3DQEBCwUAMA8xDTALBgNV +BAMMBGFyYW4wHhcNMTcxMjE4MTM0MTIyWhcNMjcxMjE2MTM0MTIyWjAPMQ0wCwYD +VQQDDARhcmFuMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA1TydPk4X +8YyPjXI0htiMsM9C5jP0iH/Hgl7w+t0NL6fvcJhwy8BntJ/FRlS/GFoszmH+0zSt +pVeymgEwSQ2SrZixSkln2XhbTIH/NUEHosdllECJgj83W0Kpbtms8Cs6/FfhvMB4 +4o/GnN/mkmA9kslguStksV2vQh98Os9rw5gEKM5qFYO5FYUZIIrcsLgyzztPpw4H +vhrAzxuuu+zg9cOGAihlWV+CSlQJDZyC9hH9xal8UsTlYn9HFqVjr39k7OJg0WC6 +gyjQ92nzqEw49Jkb3NMAarF0zPcP25WV97Aq7EDZV/G8LZbg4p+xCrkz2iUJttu1 +CZjhS9uNsvIAYQIDAQABo30wezAdBgNVHQ4EFgQUqVEvl+MVxdWqNx36igfxqjrJ +f9QwPwYDVR0jBDgwNoAUqVEvl+MVxdWqNx36igfxqjrJf9ShE6QRMA8xDTALBgNV +BAMMBGFyYW6CCQCutQIacQKTlDAMBgNVHRMEBTADAQH/MAsGA1UdDwQEAwIBBjAN +BgkqhkiG9w0BAQsFAAOCAQEAysh4aGsnv4CebGvzZ9mZlmK5o4JTj4bqRw8sFe4h +wW/bZ0ggMnnvNZF1VJJgO/UQQq2gIiOw7zLrlSmPHIhRPkQspemk6uU0m2h6K9rn +AnX3qeVP5dXbZsqr1jI1/aCzxSW5hu6WUfR3Q+u1pGm9HePhrRJj0djW8Kd7UO+s +PfpIN9gbfLoLnAfCJIc3BccBoD5IqU4s7vleekQGCJHloT5S3MefiIUg7d8leW4V +8PiCohkgHwMOZy3ACy1ZPuT92x+7JCaNV56X7iT3GZhkyQ4tSKu3UpMFkz8obYKw +8RrNsXXBRWgnuakkMY6wHJJZBPJn+qDrWbO7nxVTOqY22g== +-----END CERTIFICATE----- + + +Certificate: + Data: + Version: 3 (0x2) + Serial Number: + 13:b3:4f:08:ae:61:af:ff:68:f2:2c:16:89:63:8c:59 + Signature Algorithm: sha256WithRSAEncryption + Issuer: CN=aran + Validity + Not Before: Mar 6 09:41:06 2022 GMT + Not After : Mar 3 09:41:06 2032 GMT + Subject: CN=lanx-pot01 + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + Public-Key: (2048 bit) + Modulus: + 00:b8:3e:f0:7f:21:b2:da:ce:37:1c:63:03:83:b5: + 3f:92:8a:6e:eb:da:af:82:ef:72:4d:e0:d5:dc:6c: + 58:65:40:10:a7:a3:03:eb:53:c9:a2:e1:57:79:63: + 8c:1f:a7:b9:4e:ed:d0:e6:94:c8:2a:0e:e0:e3:65: + 0f:8d:b1:1a:04:6c:31:20:4c:f1:50:74:68:e3:cc: + a2:4e:93:ff:b2:e9:95:d5:1e:66:4a:14:72:19:3f: + ab:0b:b9:d1:71:35:95:03:e7:a4:0c:2c:93:1f:1a: + 6f:c3:81:df:93:ca:66:fc:32:60:81:88:74:f7:ae: + d1:a6:93:9a:ca:70:da:42:7e:34:5d:74:34:87:aa: + f0:74:0f:47:cd:d9:5c:06:33:f7:3d:1a:4b:b8:51: + 52:d2:1d:27:95:03:17:12:9c:8e:5f:87:e3:27:c1: + 9a:60:fb:58:9d:c0:82:22:16:94:75:f8:ee:a4:22: + 92:b0:e0:a7:7c:67:69:5e:3b:14:92:84:26:c5:2c: + d5:a1:86:e3:fb:99:e0:4b:88:bb:c5:53:19:2d:e6: + fb:e4:91:bd:ba:46:9c:50:dc:58:61:4e:e0:51:24: + ae:65:3b:83:e8:79:e5:82:7f:80:52:f1:10:d8:32: + 51:10:40:69:0f:68:b2:ff:c8:30:1b:ea:c9:b1:4e: + 8f:c5 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Basic Constraints: + CA:FALSE + X509v3 Subject Key Identifier: + 97:DA:B9:3C:39:7A:18:30:69:76:6B:FB:1B:82:8C:57:C3:B5:89:88 + X509v3 Authority Key Identifier: + keyid:A9:51:2F:97:E3:15:C5:D5:AA:37:1D:FA:8A:07:F1:AA:3A:C9:7F:D4 + DirName:/CN=aran + serial:AE:B5:02:1A:71:02:93:94 + + X509v3 Extended Key Usage: + TLS Web Client Authentication + X509v3 Key Usage: + Digital Signature + Signature Algorithm: sha256WithRSAEncryption + 5a:06:61:0c:e3:cf:3f:ee:5c:bf:20:93:0a:76:72:61:fb:2a: + 04:ce:98:6b:03:3b:1f:2a:d5:cb:97:10:0a:a1:78:fd:7f:c9: + 39:f1:fc:2f:03:1f:51:b7:5d:fd:f1:d2:8c:d4:7f:6d:07:5a: + cf:59:43:1b:8f:ed:e6:af:56:ba:f4:a4:93:07:19:f5:a7:52: + ae:09:65:70:e1:16:dc:36:f4:80:cf:bc:07:37:5d:5e:19:77: + 8b:4b:79:ca:76:9a:3a:c7:97:c9:4b:d8:34:68:f0:af:ce:f0: + 81:65:bc:a3:d9:79:47:4c:c8:f2:87:77:32:a1:2d:74:e0:d3: + 3e:35:09:9b:a5:65:0c:3e:e7:d0:5f:3b:c5:a7:76:72:3e:d1: + ad:3d:9d:20:92:fe:d1:ae:69:af:15:56:07:b4:9c:9b:6e:51: + f2:0b:7a:68:33:1a:e1:c6:7d:ab:3c:c2:04:46:6e:f8:40:f9: + f6:dd:b0:2b:6a:b1:51:6e:78:f3:1c:29:10:a3:b3:81:f8:c7: + ce:82:ab:22:0d:64:d7:5a:8c:ec:f0:dc:2a:1b:f5:4f:23:0b: + b1:6c:46:ec:bc:87:ba:9e:04:f2:84:b5:fd:40:f4:03:0f:b7: + 03:ce:6f:37:7e:34:01:36:3f:55:d7:73:af:81:5f:c9:c2:e6: + 9f:fc:12:c1 +-----BEGIN CERTIFICATE----- +MIIDPzCCAiegAwIBAgIQE7NPCK5hr/9o8iwWiWOMWTANBgkqhkiG9w0BAQsFADAP +MQ0wCwYDVQQDDARhcmFuMB4XDTIyMDMwNjA5NDEwNloXDTMyMDMwMzA5NDEwNlow +FTETMBEGA1UEAwwKbGFueC1wb3QwMTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCC +AQoCggEBALg+8H8hstrONxxjA4O1P5KKbuvar4Lvck3g1dxsWGVAEKejA+tTyaLh +V3ljjB+nuU7t0OaUyCoO4ONlD42xGgRsMSBM8VB0aOPMok6T/7LpldUeZkoUchk/ +qwu50XE1lQPnpAwskx8ab8OB35PKZvwyYIGIdPeu0aaTmspw2kJ+NF10NIeq8HQP +R83ZXAYz9z0aS7hRUtIdJ5UDFxKcjl+H4yfBmmD7WJ3AgiIWlHX47qQikrDgp3xn +aV47FJKEJsUs1aGG4/uZ4EuIu8VTGS3m++SRvbpGnFDcWGFO4FEkrmU7g+h55YJ/ +gFLxENgyURBAaQ9osv/IMBvqybFOj8UCAwEAAaOBkDCBjTAJBgNVHRMEAjAAMB0G +A1UdDgQWBBSX2rk8OXoYMGl2a/sbgoxXw7WJiDA/BgNVHSMEODA2gBSpUS+X4xXF +1ao3HfqKB/GqOsl/1KETpBEwDzENMAsGA1UEAwwEYXJhboIJAK61AhpxApOUMBMG +A1UdJQQMMAoGCCsGAQUFBwMCMAsGA1UdDwQEAwIHgDANBgkqhkiG9w0BAQsFAAOC +AQEAWgZhDOPPP+5cvyCTCnZyYfsqBM6YawM7HyrVy5cQCqF4/X/JOfH8LwMfUbdd +/fHSjNR/bQdaz1lDG4/t5q9WuvSkkwcZ9adSrgllcOEW3Db0gM+8BzddXhl3i0t5 +ynaaOseXyUvYNGjwr87wgWW8o9l5R0zI8od3MqEtdODTPjUJm6VlDD7n0F87xad2 +cj7RrT2dIJL+0a5prxVWB7Scm25R8gt6aDMa4cZ9qzzCBEZu+ED59t2wK2qxUW54 +8xwpEKOzgfjHzoKrIg1k11qM7PDcKhv1TyMLsWxG7LyHup4E8oS1/UD0Aw+3A85v +N340ATY/Vddzr4FfycLmn/wSwQ== +-----END CERTIFICATE----- + + +-----BEGIN PRIVATE KEY----- +MIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQC4PvB/IbLazjcc +YwODtT+Sim7r2q+C73JN4NXcbFhlQBCnowPrU8mi4Vd5Y4wfp7lO7dDmlMgqDuDj +ZQ+NsRoEbDEgTPFQdGjjzKJOk/+y6ZXVHmZKFHIZP6sLudFxNZUD56QMLJMfGm/D +gd+Tymb8MmCBiHT3rtGmk5rKcNpCfjRddDSHqvB0D0fN2VwGM/c9Gku4UVLSHSeV +AxcSnI5fh+MnwZpg+1idwIIiFpR1+O6kIpKw4Kd8Z2leOxSShCbFLNWhhuP7meBL +iLvFUxkt5vvkkb26RpxQ3FhhTuBRJK5lO4PoeeWCf4BS8RDYMlEQQGkPaLL/yDAb +6smxTo/FAgMBAAECggEAetDJs5UdCinIJs4Bu7wIAoDw65s8v4UppqwnIuW+DtAj +yfsqU6XolQCtNKec8kT1i52PUQUAYLjGRA5LzeGuPCB6ptNjUIQonyD7WHHjUrnO +POAkw2DZpecA97IH4PUcvhudCNh1wZf3xFVAWd3jxF04Y2A4yBnqeqWN20Ba3VLs +MK9jX8WhMhRbAFBnPOq3wBlp1aROHY2HIKt2EseG8UrwjT33M+wLeVXFoCxygNO8 +2WDJYVGkOT4dstznxtJUxCexhOsRpwxRkb41wNlnBzvAJzmmG9+MGkuQfkcBGfDm +NmGl9JwMz+V1mXe1O5w+MgEtwevOIBppdNbHyPjOgQKBgQDw34STdGVVUSo5TmbM +/qlmoFaOUX0QDVanmq3Fp3w24PDKaAw5R67MuAHMfccVfS48Ahi0K4PAtDRiupu4 +cVh626FyJS3E2Y77zxmYC3ZL4FyYGtUXK9yVG56uPMqHib4VisCiYLxz1TUv+pBg +zj6P5QAAaHc1+O1jWRBpAegM1QKBgQDD0QiIqt0+1M6YQzXOCki0z4dh2b4xh4Rc +Jg6hXvObsDmhbSxYrzzGX0Yp55I5x/0Afn5xkjm4gZuWFhOVWSUKWWXB8gN07zaL +wOpX2bLwV4t+vQKZd8XswcEBjST2Gkjcz2rJlbLRQPvx9WgFME2W6rmVUoPV9WyE +Z/+Jw+UvMQKBgQDdRqi3AQ16FAbzABgmJ6gdVBxPv4JhNa+uZsVONy9ABuKNPopE +MJrfDAbzAXTbQ9UuYUqqcPMnGySosf8NsGp06sDkaE0kciwNHVLIv3bb+290d+nb +0HpiLC5YqBXx71LE3WNbh/x3eJzUx5zMoYsNi3S160HgPh5tzsrpfEvdRQKBgQCv +pHN0K1czAa2idD7x5tWaob/87FQmlzkJcvWSl9oJn4PCIWwyzFTGVzVXZykJfTKa +W9xNQO1Xa6JEeN7uCr0n0FJvKgchv2R87PkG/fX8kXpFn4KSaBX4LT9ThehOe/s5 +XS+bTBTOj+yt9wNsDAy8vyTiJNaud2r0RVi4mSedMQKBgQCHgciRzkIuvfYv0K0g +I1nxr3lp0Y9Tnic/Y8NHHJMfyy4SIj/0H0T6fNP7OJidSnlo5nyX7LRBeCZnNHrT +VzufV2yCvvKepj+X6BUn3W5QGJsmbZZ9Zw/ZLP2waqMNlMosiDcnBQsO4Lw4/Rs/ +SH6toGlJqIj7iD/GEyHwgdw5Yg== +-----END PRIVATE KEY----- + +comp-lzo +verb 3 +mute 20 +cipher AES-256-CBC diff --git a/pointeuse/vpn/DKS-VPN-ldin-hourtrax.ovpn b/pointeuse/vpn/DKS-VPN-ldin-hourtrax.ovpn new file mode 100644 index 00000000..bf06068b --- /dev/null +++ b/pointeuse/vpn/DKS-VPN-ldin-hourtrax.ovpn @@ -0,0 +1,153 @@ +client +dev tun +proto udp +remote vsrv01.dks.lu 1098 +remote arandks.lu 1098 + +remote-random +resolv-retry infinite +nobind +persist-key +persist-tun +mute-replay-warnings + +-----BEGIN CERTIFICATE----- +MIIDHjCCAgagAwIBAgIJAK61AhpxApOUMA0GCSqGSIb3DQEBCwUAMA8xDTALBgNV +BAMMBGFyYW4wHhcNMTcxMjE4MTM0MTIyWhcNMjcxMjE2MTM0MTIyWjAPMQ0wCwYD +VQQDDARhcmFuMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA1TydPk4X +8YyPjXI0htiMsM9C5jP0iH/Hgl7w+t0NL6fvcJhwy8BntJ/FRlS/GFoszmH+0zSt +pVeymgEwSQ2SrZixSkln2XhbTIH/NUEHosdllECJgj83W0Kpbtms8Cs6/FfhvMB4 +4o/GnN/mkmA9kslguStksV2vQh98Os9rw5gEKM5qFYO5FYUZIIrcsLgyzztPpw4H +vhrAzxuuu+zg9cOGAihlWV+CSlQJDZyC9hH9xal8UsTlYn9HFqVjr39k7OJg0WC6 +gyjQ92nzqEw49Jkb3NMAarF0zPcP25WV97Aq7EDZV/G8LZbg4p+xCrkz2iUJttu1 +CZjhS9uNsvIAYQIDAQABo30wezAdBgNVHQ4EFgQUqVEvl+MVxdWqNx36igfxqjrJ +f9QwPwYDVR0jBDgwNoAUqVEvl+MVxdWqNx36igfxqjrJf9ShE6QRMA8xDTALBgNV +BAMMBGFyYW6CCQCutQIacQKTlDAMBgNVHRMEBTADAQH/MAsGA1UdDwQEAwIBBjAN +BgkqhkiG9w0BAQsFAAOCAQEAysh4aGsnv4CebGvzZ9mZlmK5o4JTj4bqRw8sFe4h +wW/bZ0ggMnnvNZF1VJJgO/UQQq2gIiOw7zLrlSmPHIhRPkQspemk6uU0m2h6K9rn +AnX3qeVP5dXbZsqr1jI1/aCzxSW5hu6WUfR3Q+u1pGm9HePhrRJj0djW8Kd7UO+s +PfpIN9gbfLoLnAfCJIc3BccBoD5IqU4s7vleekQGCJHloT5S3MefiIUg7d8leW4V +8PiCohkgHwMOZy3ACy1ZPuT92x+7JCaNV56X7iT3GZhkyQ4tSKu3UpMFkz8obYKw +8RrNsXXBRWgnuakkMY6wHJJZBPJn+qDrWbO7nxVTOqY22g== +-----END CERTIFICATE----- + + +Certificate: + Data: + Version: 3 (0x2) + Serial Number: + 69:24:03:c7:c4:fb:5d:0e:9c:75:98:ca:31:79:79:40 + Signature Algorithm: sha256WithRSAEncryption + Issuer: CN=aran + Validity + Not Before: Jan 31 15:14:25 2021 GMT + Not After : Jan 29 15:14:25 2031 GMT + Subject: CN=ldin-hourtrax + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + Public-Key: (2048 bit) + Modulus: + 00:c7:e7:3b:52:90:cd:d1:c3:d6:a1:b3:f5:dd:c8: + 3b:e5:44:7c:24:11:2c:3d:9c:17:97:00:2d:a7:9b: + 36:e9:11:74:a1:ff:1e:f8:78:7d:08:54:98:50:71: + b4:bb:fc:15:7c:d1:ea:c3:64:03:a8:52:ac:26:d1: + b2:83:52:40:83:1d:67:c7:35:9c:e2:4a:7b:42:ca: + 69:b9:64:1c:78:ab:a9:41:81:1f:3c:e0:6e:94:1b: + 01:7c:e3:67:48:d5:97:45:71:e3:b8:ea:13:82:c2: + f4:89:ec:a4:19:09:59:5b:d4:2b:80:0b:f6:59:6e: + de:a5:4c:c7:13:cf:9f:fb:f2:a2:7c:bd:69:43:de: + bb:a5:5d:04:02:99:e1:79:40:b9:e4:f7:f6:c9:e7: + 93:07:16:c2:bd:87:c6:1d:b0:97:c6:15:bc:0f:0d: + 22:2a:a0:91:d7:5e:10:39:61:02:77:ad:61:d8:15: + 47:d2:37:05:56:64:71:c5:a1:3f:af:dc:62:06:3e: + 81:9d:ab:57:b6:ac:96:a2:7a:ee:a7:3c:5b:18:dd: + cc:13:4f:32:9f:0c:3c:88:f5:5b:ef:8d:ae:5e:3a: + fb:ff:c2:2d:58:49:4f:47:41:ef:84:d0:75:84:99: + 73:93:e8:54:ca:a9:ec:65:6b:13:54:bc:76:dd:cf: + 07:e3 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Basic Constraints: + CA:FALSE + X509v3 Subject Key Identifier: + 5D:14:14:8F:4C:8E:19:D1:1D:42:A5:D5:D1:5D:59:BC:1F:4D:F9:ED + X509v3 Authority Key Identifier: + keyid:A9:51:2F:97:E3:15:C5:D5:AA:37:1D:FA:8A:07:F1:AA:3A:C9:7F:D4 + DirName:/CN=aran + serial:AE:B5:02:1A:71:02:93:94 + + X509v3 Extended Key Usage: + TLS Web Client Authentication + X509v3 Key Usage: + Digital Signature + Signature Algorithm: sha256WithRSAEncryption + ce:24:bd:c0:65:52:83:45:96:62:f7:14:27:31:87:6c:92:21: + f2:e8:7a:23:ca:3d:a8:d3:3d:86:08:5c:b0:53:60:d3:13:d6: + e4:8f:cf:69:b2:f2:d0:dc:87:88:e8:9a:21:22:26:19:ed:a1: + 40:e9:95:83:43:81:41:0f:e4:22:ab:b1:df:8e:c5:74:3b:85: + 57:f5:9e:a9:b8:71:6d:29:fe:be:54:bb:06:9d:9d:00:72:df: + 74:3c:11:1b:6b:89:06:7a:97:dc:0e:67:80:09:9a:50:6b:69: + 08:20:6e:86:d7:f8:49:d9:cd:21:8e:b7:a2:9c:ef:25:d5:51: + b5:96:36:e1:29:b3:c5:0a:8e:c7:8e:b9:c3:38:70:01:ab:f4: + 0b:97:ae:e2:20:09:35:fc:77:0c:0f:e2:35:ca:78:19:3c:d9: + 3d:a7:8b:f4:63:0b:ce:91:40:e8:36:af:83:88:81:76:02:0e: + 75:5c:85:7c:f1:25:6f:fb:8a:f3:e7:d2:3f:c0:d0:14:8c:62: + fe:e5:5c:83:16:47:4f:7a:7b:46:8a:e5:fe:cc:12:b6:60:9a: + 5e:08:4e:64:f5:6d:a6:7f:b2:8c:9a:1a:95:86:22:0d:29:88: + 45:dd:ef:6b:90:48:49:ff:92:30:c8:d0:d0:c2:80:2b:eb:c5: + bc:98:3d:ca +-----BEGIN CERTIFICATE----- +MIIDQjCCAiqgAwIBAgIQaSQDx8T7XQ6cdZjKMXl5QDANBgkqhkiG9w0BAQsFADAP +MQ0wCwYDVQQDDARhcmFuMB4XDTIxMDEzMTE1MTQyNVoXDTMxMDEyOTE1MTQyNVow +GDEWMBQGA1UEAwwNbGRpbi1ob3VydHJheDCCASIwDQYJKoZIhvcNAQEBBQADggEP +ADCCAQoCggEBAMfnO1KQzdHD1qGz9d3IO+VEfCQRLD2cF5cALaebNukRdKH/Hvh4 +fQhUmFBxtLv8FXzR6sNkA6hSrCbRsoNSQIMdZ8c1nOJKe0LKablkHHirqUGBHzzg +bpQbAXzjZ0jVl0Vx47jqE4LC9InspBkJWVvUK4AL9llu3qVMxxPPn/vyony9aUPe +u6VdBAKZ4XlAueT39snnkwcWwr2Hxh2wl8YVvA8NIiqgkddeEDlhAnetYdgVR9I3 +BVZkccWhP6/cYgY+gZ2rV7aslqJ67qc8WxjdzBNPMp8MPIj1W++Nrl46+//CLVhJ +T0dB74TQdYSZc5PoVMqp7GVrE1S8dt3PB+MCAwEAAaOBkDCBjTAJBgNVHRMEAjAA +MB0GA1UdDgQWBBRdFBSPTI4Z0R1CpdXRXVm8H0357TA/BgNVHSMEODA2gBSpUS+X +4xXF1ao3HfqKB/GqOsl/1KETpBEwDzENMAsGA1UEAwwEYXJhboIJAK61AhpxApOU +MBMGA1UdJQQMMAoGCCsGAQUFBwMCMAsGA1UdDwQEAwIHgDANBgkqhkiG9w0BAQsF +AAOCAQEAziS9wGVSg0WWYvcUJzGHbJIh8uh6I8o9qNM9hghcsFNg0xPW5I/PabLy +0NyHiOiaISImGe2hQOmVg0OBQQ/kIqux347FdDuFV/WeqbhxbSn+vlS7Bp2dAHLf +dDwRG2uJBnqX3A5ngAmaUGtpCCBuhtf4SdnNIY63opzvJdVRtZY24SmzxQqOx465 +wzhwAav0C5eu4iAJNfx3DA/iNcp4GTzZPaeL9GMLzpFA6Davg4iBdgIOdVyFfPEl +b/uK8+fSP8DQFIxi/uVcgxZHT3p7Rorl/swStmCaXghOZPVtpn+yjJoalYYiDSmI +Rd3va5BISf+SMMjQ0MKAK+vFvJg9yg== +-----END CERTIFICATE----- + + +-----BEGIN PRIVATE KEY----- +MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDH5ztSkM3Rw9ah +s/XdyDvlRHwkESw9nBeXAC2nmzbpEXSh/x74eH0IVJhQcbS7/BV80erDZAOoUqwm +0bKDUkCDHWfHNZziSntCymm5ZBx4q6lBgR884G6UGwF842dI1ZdFceO46hOCwvSJ +7KQZCVlb1CuAC/ZZbt6lTMcTz5/78qJ8vWlD3rulXQQCmeF5QLnk9/bJ55MHFsK9 +h8YdsJfGFbwPDSIqoJHXXhA5YQJ3rWHYFUfSNwVWZHHFoT+v3GIGPoGdq1e2rJai +eu6nPFsY3cwTTzKfDDyI9Vvvja5eOvv/wi1YSU9HQe+E0HWEmXOT6FTKqexlaxNU +vHbdzwfjAgMBAAECggEATht8Y2Nu+CJED8SoMbMWLBvZQaJwHdaKpRaNwCp2hxSp +9M4hRMaXXBTpuqzjCHyTzMScrSG8CB3dZAGVdZhC2rg3n2/ET+r4RH2gV67VLRUt +ugmAsiGjMz1mFG0qIxxJ0fmRF+RmITaZo/aRm7K6dpXtNUf3RrR6TC42rvf2M9PF +0C+ksWAfC0ZtWl3WqcF2/86WbwZR8MxAffmuXHDb+eADdKmbtrgw7Fq0QRzENGF2 +aP7HZ+Nk9GUU89a7wuIcctErp0DHGFn9bhuWrVQyXsgc1p+F0Ul8/9+u7YKyNyRJ +2Eu5VV0rq1MXPv1n97lN1JTIx2qNkUa2wx5TsRI3CQKBgQD3AS24ZM/eKbg1m0sX +5glj1H+Fjb+tZG+QD5vU9XhZLECKY11Zg5pSwtR5Ya0bGBevCxnMr4yvCaFfAqLp +dUw/HU7TOw1bGmep+/u3FNKDntue0Ibd7gbwvfrTXxPHTuf2ABfLLEFaSAeVWC2F +6jh7qnm0skgGEPkXZPwChezUlwKBgQDPLu18iRLMxgnpjuUgQWMi/E9kIefODPZN +rgKIUIbHZWrPT4+rN5sW2xOvdStjUWl2bsGXwsso4maVyWKIjw+rDauGbpHOfeL+ +TfiQ6If5+jVoFmGN9S3SdmKMCA6nlr4Dqdp0PHYoE/wS1UOK3omU7hg+0eDde+bS +YSt8snCUlQKBgFupFE5ZGspWsQUzm6pCszlYofntoDO4Ea5kHG/qp75vrYOtW/bb +32jW5AInPRXQ2vkaJXjPrGVILZoUYGBCJwlE1vuL7mjgY5ew6rgGAhjV2qoUt/ej +XO/5kBrgLXbI0Ut4vVuoEJhwImBJWJtZT5yUppVnk1Ks+cK0ttA44qoBAoGBAKxY +eDvxds8bKqG8OcPEQOiYhJ5iSgcw5y8lQnwMqKF0Lw63O2cNgZjYsx5w1J/w2E8p +wScyZnfjJb0SYkIA5+K+I2JX1ji0pcAwMkaw+HQs/IJSo+JIA08hJccg6LfmgLhh +chThOtUKEtXDzETX7BEUotyXEHyOFiwJovg/I8GlAoGBALKaEk1+zBXlqnZ4a2Mr +omaCR6dL2UydLqhaW3zTfnkHarx4K6LHDEZscyANyKXRikJdAuyqw0skMONjq1g6 +Ek8X3mAShBmlurTezjsUFsZq7QwUUZLqds+f/5plfgvOscDS6RQg6YZOtunpuXw8 +gbzvRh8eAvn58Bl1R8kMqVt5 +-----END PRIVATE KEY----- + +comp-lzo +verb 3 +mute 20 +cipher AES-256-CBC