2021-05-31 16:22:30 +00:00

59 lines
38 KiB
Go

//
// Copyright 2020 FoxyUtils ehf. All rights reserved.
//
// This is a commercial product and requires a license to operate.
// A trial license can be obtained at https://unidoc.io
//
// DO NOT EDIT: generated by unitwist Go source code obfuscator.
//
// Use of this source code is governed by the UniDoc End User License Agreement
// terms that can be accessed at https://unidoc.io/eula/
// Package format provides support for parsing and evaluating
// spreadsheetml/Excel number formats.
//
// Internally spreadsheets store numbers and dates values as a text
// representation of a floating point number (e.g. 1.2345). This number is then
// displayed in Excel or another spreadsheet viewer differently depending on the
// number fornat of the cell style applied to the cell.
//
// As an example, the same value of 1.2345 can be displayed as:
// - "1" with format "0"
// - "1.2" with format "0.0"
// - "1.23" with format "0.00"
// - "1.235" with format "0.000"
// - "123%" with format "0%"
// - "1 23/100" with fornat "0 0/100"
// - "1.23E+00" with format "0.00E+00"
// - "29:37:41s" with format `[h]:mm:ss"s"`
package format ;import (_a "bytes";_d "fmt";_ea "github.com/unidoc/unioffice";_be "io";_bb "math";_ed "strconv";_bef "strings";_e "time";);func (_fdg *Lexer )nextFmt (){_fdg ._abb =append (_fdg ._abb ,_fdg ._gacg );_fdg ._gacg =Format {}};
// FmtType is the type of a format token.
//go:generate stringer -type=FmtType
type FmtType byte ;
// String returns the string formatted according to the type. In format strings
// this is the fourth item, where '@' is used as a placeholder for text.
func String (v string ,f string )string {_ce :=Parse (f );var _da Format ;if len (_ce )==1{_da =_ce [0];}else if len (_ce )==4{_da =_ce [3];};_fb :=false ;for _ ,_bee :=range _da .Whole {if _bee .Type ==FmtTypeText {_fb =true ;};};if !_fb {return v ;};_ge :=_a .Buffer {};for _ ,_cf :=range _da .Whole {switch _cf .Type {case FmtTypeLiteral :_ge .WriteByte (_cf .Literal );case FmtTypeText :_ge .WriteString (v );};};return _ge .String ();};func _aeb (_dg ,_bde float64 ,_cef Format )[]byte {if len (_cef .Whole )==0{return nil ;};_abd :=_e .Date (1899,12,30,0,0,0,0,_e .UTC );_agb :=_abd .Add (_e .Duration (_bde *float64 (24*_e .Hour )));_agb =_cfc (_agb );_cfb :=_ed .AppendFloat (nil ,_dg ,'f',-1,64);_fgc :=make ([]byte ,0,len (_cfb ));_dac :=0;_ffc :=1;_aee :for _bc :=len (_cef .Whole )-1;_bc >=0;_bc --{_ffa :=len (_cfb )-1-_dac ;_dd :=_cef .Whole [_bc ];switch _dd .Type {case FmtTypeDigit :if _ffa >=0{_fgc =append (_fgc ,_cfb [_ffa ]);_dac ++;_ffc =_bc ;}else {_fgc =append (_fgc ,'0');};case FmtTypeDigitOpt :if _ffa >=0{_fgc =append (_fgc ,_cfb [_ffa ]);_dac ++;_ffc =_bc ;}else {for _gfd :=_bc ;_gfd >=0;_gfd --{_acf :=_cef .Whole [_gfd ];if _acf .Type ==FmtTypeLiteral {_fgc =append (_fgc ,_acf .Literal );};};break _aee ;};case FmtTypeDollar :for _beda :=_dac ;_beda < len (_cfb );_beda ++{_fgc =append (_fgc ,_cfb [len (_cfb )-1-_beda ]);_dac ++;};_fgc =append (_fgc ,'$');case FmtTypeComma :if !_cef ._fe {_fgc =append (_fgc ,',');};case FmtTypeLiteral :_fgc =append (_fgc ,_dd .Literal );case FmtTypeDate :_fgc =append (_fgc ,_aca (_caf (_agb ,_dd .DateTime ))...);case FmtTypeTime :_fgc =append (_fgc ,_aca (_bbc (_agb ,_bde ,_dd .DateTime ))...);default:_ea .Log ("\u0075\u006e\u0073\u0075p\u0070\u006f\u0072\u0074\u0065\u0064\u0020\u0074\u0079\u0070e\u0020i\u006e\u0020\u0077\u0068\u006f\u006c\u0065 \u0025\u0076",_dd );};};_egb :=_aca (_fgc );if _dac < len (_cfb )&&(_dac !=0||_cef ._de ){_gaa :=len (_cfb )-_dac ;_adb :=make ([]byte ,len (_egb )+_gaa );copy (_adb ,_egb [0:_ffc ]);copy (_adb [_ffc :],_cfb [0:]);copy (_adb [_ffc +_gaa :],_egb [_ffc :]);_egb =_adb ;};if _cef ._fe {_cff :=_a .Buffer {};_eda :=0;for _edb :=len (_egb )-1;_edb >=0;_edb --{if !(_egb [_edb ]>='0'&&_egb [_edb ]<='9'){_eda ++;}else {break ;};};for _abdd :=0;_abdd < len (_egb );_abdd ++{_daa :=(len (_egb )-_abdd -_eda );if _daa %3==0&&_daa !=0&&_abdd !=0{_cff .WriteByte (',');};_cff .WriteByte (_egb [_abdd ]);};_egb =_cff .Bytes ();};return _egb ;};var _ad =[...]uint8 {0,14,26,41,53,67,81,94,118,135,146,157,172,183};const _f =1e11;const _efd int =-1;
// AddToken adds a format token to the format.
func (_ab *Format )AddToken (t FmtType ,l []byte ){if _ab ._g {_ab ._g =false ;return ;};switch t {case FmtTypeDecimal :_ab ._de =true ;case FmtTypeUnderscore :_ab ._g =true ;case FmtTypeText :_ab .Whole =append (_ab .Whole ,Token {Type :t });case FmtTypeDate ,FmtTypeTime :_ab .Whole =append (_ab .Whole ,Token {Type :t ,DateTime :string (l )});case FmtTypePercent :_ab ._ag =true ;t =FmtTypeLiteral ;l =[]byte {'%'};fallthrough;case FmtTypeDigitOpt :fallthrough;case FmtTypeLiteral ,FmtTypeDigit ,FmtTypeDollar ,FmtTypeComma :if l ==nil {l =[]byte {0};};for _ ,_ga :=range l {if _ab .IsExponential {_ab .Exponent =append (_ab .Exponent ,Token {Type :t ,Literal :_ga });}else if !_ab ._de {_ab .Whole =append (_ab .Whole ,Token {Type :t ,Literal :_ga });}else {_ab .Fractional =append (_ab .Fractional ,Token {Type :t ,Literal :_ga });};};case FmtTypeDigitOptThousands :_ab ._fe =true ;case FmtTypeFraction :_bed :=_bef .Split (string (l ),"\u002f");if len (_bed )==2{_ab ._ee =true ;_ab ._ff ,_ =_ed .ParseInt (_bed [1],10,64);for _ ,_agf :=range _bed [1]{if _agf =='?'||_agf =='0'{_ab ._bg ++;};};};default:_ea .Log ("\u0075\u006e\u0073u\u0070\u0070\u006f\u0072t\u0065\u0064\u0020\u0070\u0068\u0020\u0074y\u0070\u0065\u0020\u0069\u006e\u0020\u0070\u0061\u0072\u0073\u0065\u0020\u0025\u0076",t );};};func _bbc (_baec _e .Time ,_cec float64 ,_bab string )[]byte {_fff :=[]byte {};_fcb :=0;for _dede :=0;_dede < len (_bab );_dede ++{var _aef string ;if _bab [_dede ]==':'{_aef =string (_bab [_fcb :_dede ]);_fcb =_dede +1;}else if _dede ==len (_bab )-1{_aef =string (_bab [_fcb :_dede +1]);}else {continue ;};switch _aef {case "\u0064":_fff =_baec .AppendFormat (_fff ,"\u0032");case "\u0068":_fff =_baec .AppendFormat (_fff ,"\u0033");case "\u0068\u0068":_fff =_baec .AppendFormat (_fff ,"\u0031\u0035");case "\u006d":_fff =_baec .AppendFormat (_fff ,"\u0034");case "\u006d\u006d":_fff =_baec .AppendFormat (_fff ,"\u0030\u0034");case "\u0073":_fff =_baec .Round (_e .Second ).AppendFormat (_fff ,"\u0035");case "\u0073\u002e\u0030":_fff =_baec .Round (_e .Second /10).AppendFormat (_fff ,"\u0035\u002e\u0030");case "\u0073\u002e\u0030\u0030":_fff =_baec .Round (_e .Second /100).AppendFormat (_fff ,"\u0035\u002e\u0030\u0030");case "\u0073\u002e\u00300\u0030":_fff =_baec .Round (_e .Second /1000).AppendFormat (_fff ,"\u0035\u002e\u00300\u0030");case "\u0073\u0073":_fff =_baec .Round (_e .Second ).AppendFormat (_fff ,"\u0030\u0035");case "\u0073\u0073\u002e\u0030":_fff =_baec .Round (_e .Second /10).AppendFormat (_fff ,"\u0030\u0035\u002e\u0030");case "\u0073\u0073\u002e0\u0030":_fff =_baec .Round (_e .Second /100).AppendFormat (_fff ,"\u0030\u0035\u002e0\u0030");case "\u0073\u0073\u002e\u0030\u0030\u0030":_fff =_baec .Round (_e .Second /1000).AppendFormat (_fff ,"\u0030\u0035\u002e\u0030\u0030\u0030");case "\u0041\u004d\u002fP\u004d":_fff =_baec .AppendFormat (_fff ,"\u0050\u004d");case "\u005b\u0068\u005d":_fff =_ed .AppendInt (_fff ,int64 (_cec *24),10);case "\u005b\u006d\u005d":_fff =_ed .AppendInt (_fff ,int64 (_cec *24*60),10);case "\u005b\u0073\u005d":_fff =_ed .AppendInt (_fff ,int64 (_cec *24*60*60),10);case "":default:_ea .Log ("\u0075\u006e\u0073\u0075\u0070\u0070\u006f\u0072\u0074\u0065\u0064 \u0074\u0069\u006d\u0065\u0020\u0066\u006f\u0072\u006d\u0061t\u0020\u0025\u0073",_aef );};if _bab [_dede ]==':'{_fff =append (_fff ,':');};};return _fff ;};func _ca (_gfgd ,_beb float64 ,_gbd Format )[]byte {if len (_gbd .Fractional )==0{return nil ;};_abeg :=_ed .AppendFloat (nil ,_gfgd ,'f',-1,64);if len (_abeg )> 2{_abeg =_abeg [2:];}else {_abeg =nil ;};_bad :=make ([]byte ,0,len (_abeg ));_bad =append (_bad ,'.');_bce :=0;_gbde :for _gfa :=0;_gfa < len (_gbd .Fractional );_gfa ++{_ead :=_gfa ;_gbg :=_gbd .Fractional [_gfa ];switch _gbg .Type {case FmtTypeDigit :if _ead < len (_abeg ){_bad =append (_bad ,_abeg [_ead ]);_bce ++;}else {_bad =append (_bad ,'0');};case FmtTypeDigitOpt :if _ead >=0{_bad =append (_bad ,_abeg [_ead ]);_bce ++;}else {break _gbde ;};case FmtTypeLiteral :_bad =append (_bad ,_gbg .Literal );default:_ea .Log ("\u0075\u006e\u0073\u0075\u0070\u0070o\u0072\u0074\u0065\u0064\u0020\u0074\u0079\u0070\u0065\u0020\u0069\u006e\u0020f\u0072\u0061\u0063\u0074\u0069\u006f\u006ea\u006c\u0020\u0025\u0076",_gbg );};};return _bad ;};const _ec ="\u0046\u006d\u0074\u0054\u0079\u0070\u0065\u004c\u0069\u0074\u0065\u0072a\u006c\u0046\u006d\u0074\u0054\u0079\u0070\u0065\u0044\u0069\u0067\u0069\u0074\u0046\u006d\u0074\u0054y\u0070\u0065\u0044i\u0067\u0069\u0074\u004f\u0070\u0074\u0046\u006d\u0074\u0054\u0079\u0070\u0065\u0043o\u006d\u006d\u0061\u0046\u006d\u0074\u0054\u0079\u0070\u0065\u0044\u0065\u0063\u0069\u006da\u006c\u0046\u006d\u0074\u0054\u0079\u0070\u0065Pe\u0072\u0063e\u006e\u0074\u0046\u006d\u0074\u0054\u0079\u0070e\u0044\u006f\u006c\u006c\u0061\u0072\u0046\u006d\u0074Ty\u0070\u0065\u0044i\u0067\u0069\u0074\u004f\u0070\u0074\u0054\u0068\u006f\u0075\u0073\u0061n\u0064\u0073\u0046\u006d\u0074\u0054\u0079\u0070\u0065\u0055n\u0064\u0065\u0072\u0073c\u006f\u0072\u0065\u0046\u006d\u0074T\u0079\u0070\u0065\u0044\u0061\u0074\u0065\u0046\u006d\u0074\u0054y\u0070e\u0054\u0069\u006d\u0065\u0046\u006d\u0074\u0054\u0079\u0070\u0065\u0046\u0072\u0061\u0063t\u0069\u006f\u006e\u0046\u006dt\u0054\u0079\u0070\u0065\u0054e\u0078\u0074";func _gb (_edc float64 ,_dce Format ,_fg bool )string {if _dce ._ac {return NumberGeneric (_edc );};_fgg :=make ([]byte ,0,20);_acd :=_bb .Signbit (_edc );_gf :=_bb .Abs (_edc );_eag :=int64 (0);_fbc :=int64 (0);if _dce .IsExponential {for _gf >=10{_fbc ++;_gf /=10;};for _gf < 1{_fbc --;_gf *=10;};}else if _dce ._ag {_gf *=100;}else if _dce ._ee {if _dce ._ff ==0{_cce :=_bb .Pow (10,float64 (_dce ._bg ));_ccd ,_abe :=1.0,1.0;_ =_ccd ;for _gfg :=1.0;_gfg < _cce ;_gfg ++{_ ,_acaf :=_bb .Modf (_gf *float64 (_gfg ));if _acaf < _abe {_abe =_acaf ;_ccd =_gfg ;if _acaf ==0{break ;};};};_dce ._ff =int64 (_ccd );};_eag =int64 (_gf *float64 (_dce ._ff )+0.5);if len (_dce .Whole )> 0&&_eag > _dce ._ff {_eag =int64 (_gf *float64 (_dce ._ff ))%_dce ._ff ;_gf -=float64 (_eag )/float64 (_dce ._ff );}else {_gf -=float64 (_eag )/float64 (_dce ._ff );if _bb .Abs (_gf )< 1{_aad :=true ;for _ ,_acg :=range _dce .Whole {if _acg .Type ==FmtTypeDigitOpt {continue ;};if _acg .Type ==FmtTypeLiteral &&_acg .Literal ==' '{continue ;};_aad =false ;};if _aad {_dce .Whole =nil ;};};};};_gec :=1;for _ ,_bbe :=range _dce .Fractional {if _bbe .Type ==FmtTypeDigit ||_bbe .Type ==FmtTypeDigitOpt {_gec ++;};};_gf +=5*_bb .Pow10 (-_gec );_ae ,_ecd :=_bb .Modf (_gf );_fgg =append (_fgg ,_aeb (_ae ,_edc ,_dce )...);_fgg =append (_fgg ,_ca (_ecd ,_edc ,_dce )...);_fgg =append (_fgg ,_daae (_fbc ,_dce )...);if _dce ._ee {_fgg =_ed .AppendInt (_fgg ,_eag ,10);_fgg =append (_fgg ,'/');_fgg =_ed .AppendInt (_fgg ,_dce ._ff ,10);};if !_fg &&_acd {return "\u002d"+string (_fgg );};return string (_fgg );};const _aa =1e-10;const _aga int =-1;
// Value formats a value as a number or string depending on if it appears to be
// a number or string.
func Value (v string ,f string )string {if IsNumber (v ){_gac ,_ :=_ed .ParseFloat (v ,64);return Number (_gac ,f );};return String (v ,f );};const _ega int =34;type Lexer struct{_gacg Format ;_abb []Format ;};func (_afc *Lexer )Lex (r _be .Reader ){_cac ,_gc ,_dbg :=0,0,0;_fa :=-1;_bbf ,_dae ,_gcb :=0,0,0;_ =_dae ;_ =_gcb ;_daff :=1;_ =_daff ;_gde :=make ([]byte ,4096);_gba :=false ;for !_gba {_gbaa :=0;if _bbf > 0{_gbaa =_gc -_bbf ;};_gc =0;_effd ,_gcba :=r .Read (_gde [_gbaa :]);if _effd ==0||_gcba !=nil {_gba =true ;};_dbg =_effd +_gbaa ;if _dbg < len (_gde ){_fa =_dbg ;};{_cac =_dfa ;_bbf =0;_dae =0;_gcb =0;};{if _gc ==_dbg {goto _ced ;};switch _cac {case 34:goto _aba ;case 35:goto _ebb ;case 0:goto _ebd ;case 36:goto _ggd ;case 37:goto _eedb ;case 1:goto _fbe ;case 2:goto _dgc ;case 38:goto _baa ;case 3:goto _cda ;case 4:goto _efc ;case 39:goto _fca ;case 5:goto _cag ;case 6:goto _dacd ;case 7:goto _deac ;case 8:goto _facb ;case 40:goto _gfb ;case 9:goto _aggd ;case 41:goto _abdca ;case 10:goto _agbf ;case 42:goto _fdc ;case 11:goto _ggb ;case 43:goto _eagb ;case 44:goto _gfae ;case 45:goto _afe ;case 12:goto _gcfg ;case 46:goto _bfd ;case 13:goto _ecg ;case 14:goto _fgcg ;case 15:goto _fea ;case 16:goto _fad ;case 47:goto _ebf ;case 17:goto _ccg ;case 48:goto _cffb ;case 18:goto _efcb ;case 19:goto _dag ;case 20:goto _aeg ;case 49:goto _cgf ;case 50:goto _bacf ;case 21:goto _affd ;case 22:goto _cfe ;case 23:goto _cebc ;case 24:goto _ggcf ;case 25:goto _daab ;case 51:goto _caa ;case 26:goto _ffe ;case 52:goto _aecc ;case 53:goto _deg ;case 54:goto _agfe ;case 55:goto _dccg ;case 56:goto _eaag ;case 57:goto _aebg ;case 27:goto _dgbff ;case 28:goto _gbe ;case 29:goto _bfac ;case 30:goto _aaa ;case 31:goto _degbb ;case 58:goto _cbd ;case 32:goto _fadf ;case 59:goto _dca ;case 33:goto _dab ;case 60:goto _geea ;case 61:goto _gdgb ;case 62:goto _dcab ;};goto _dge ;_fedc :switch _gcb {case 2:{_gc =(_dae )-1;_afc ._gacg .AddToken (FmtTypeDigit ,nil );};case 3:{_gc =(_dae )-1;_afc ._gacg .AddToken (FmtTypeDigitOpt ,nil );};case 5:{_gc =(_dae )-1;};case 8:{_gc =(_dae )-1;_afc ._gacg .AddToken (FmtTypePercent ,nil );};case 13:{_gc =(_dae )-1;_afc ._gacg .AddToken (FmtTypeFraction ,_gde [_bbf :_dae ]);};case 14:{_gc =(_dae )-1;_afc ._gacg .AddToken (FmtTypeDate ,_gde [_bbf :_dae ]);};case 15:{_gc =(_dae )-1;_afc ._gacg .AddToken (FmtTypeTime ,_gde [_bbf :_dae ]);};case 16:{_gc =(_dae )-1;_afc ._gacg .AddToken (FmtTypeTime ,_gde [_bbf :_dae ]);};case 18:{_gc =(_dae )-1;};case 20:{_gc =(_dae )-1;_afc ._gacg .AddToken (FmtTypeLiteral ,_gde [_bbf :_dae ]);};case 21:{_gc =(_dae )-1;_afc ._gacg .AddToken (FmtTypeLiteral ,_gde [_bbf +1:_dae -1]);};};goto _gee ;_fbgd :_gc =(_dae )-1;{_afc ._gacg .AddToken (FmtTypeFraction ,_gde [_bbf :_dae ]);};goto _gee ;_eddd :_gc =(_dae )-1;{_afc ._gacg .AddToken (FmtTypeDigitOpt ,nil );};goto _gee ;_ddf :_dae =_gc +1;{_afc ._gacg .AddToken (FmtTypeDigitOptThousands ,nil );};goto _gee ;_fbgde :_gc =(_dae )-1;{_afc ._gacg .AddToken (FmtTypePercent ,nil );};goto _gee ;_bcaa :_gc =(_dae )-1;{_afc ._gacg .AddToken (FmtTypeDate ,_gde [_bbf :_dae ]);};goto _gee ;_fdgd :_gc =(_dae )-1;{_afc ._gacg .AddToken (FmtTypeDigit ,nil );};goto _gee ;_ccf :_gc =(_dae )-1;{_afc ._gacg .AddToken (FmtTypeTime ,_gde [_bbf :_dae ]);};goto _gee ;_gdg :_gc =(_dae )-1;{_afc ._gacg .AddToken (FmtTypeLiteral ,_gde [_bbf :_dae ]);};goto _gee ;_fecg :_dae =_gc +1;{_afc ._gacg ._ac =true ;};goto _gee ;_efg :_dae =_gc +1;{_afc ._gacg .AddToken (FmtTypeLiteral ,_gde [_bbf :_dae ]);};goto _gee ;_abg :_dae =_gc +1;{_afc ._gacg .AddToken (FmtTypeDollar ,nil );};goto _gee ;_bbcd :_dae =_gc +1;{_afc ._gacg .AddToken (FmtTypeComma ,nil );};goto _gee ;_dfb :_dae =_gc +1;{_afc ._gacg .AddToken (FmtTypeDecimal ,nil );};goto _gee ;_dacc :_dae =_gc +1;{_afc .nextFmt ();};goto _gee ;_ecdd :_dae =_gc +1;{_afc ._gacg .AddToken (FmtTypeText ,nil );};goto _gee ;_edfb :_dae =_gc +1;{_afc ._gacg .AddToken (FmtTypeUnderscore ,nil );};goto _gee ;_fffb :_dae =_gc ;_gc --;{_afc ._gacg .AddToken (FmtTypeLiteral ,_gde [_bbf :_dae ]);};goto _gee ;_gbga :_dae =_gc ;_gc --;{_afc ._gacg .AddToken (FmtTypeLiteral ,_gde [_bbf +1:_dae -1]);};goto _gee ;_efbb :_dae =_gc ;_gc --;{_afc ._gacg .AddToken (FmtTypeDigitOpt ,nil );};goto _gee ;_adfg :_dae =_gc ;_gc --;{_afc ._gacg .AddToken (FmtTypeFraction ,_gde [_bbf :_dae ]);};goto _gee ;_fded :_dae =_gc ;_gc --;{_afc ._gacg .AddToken (FmtTypePercent ,nil );};goto _gee ;_dbf :_dae =_gc ;_gc --;{_afc ._gacg .AddToken (FmtTypeDate ,_gde [_bbf :_dae ]);};goto _gee ;_acgb :_dae =_gc ;_gc --;{_afc ._gacg .AddToken (FmtTypeDigit ,nil );};goto _gee ;_bfbc :_dae =_gc ;_gc --;{_afc ._gacg .AddToken (FmtTypeTime ,_gde [_bbf :_dae ]);};goto _gee ;_adeb :_dae =_gc ;_gc --;{};goto _gee ;_dfc :_dae =_gc +1;{_afc ._gacg .IsExponential =true ;};goto _gee ;_eadd :_dae =_gc +1;{_afc ._gacg .AddToken (FmtTypeLiteral ,_gde [_bbf +1:_dae ]);};goto _gee ;_gee :_bbf =0;if _gc ++;_gc ==_dbg {goto _ffec ;};_aba :_bbf =_gc ;switch _gde [_gc ]{case 34:goto _eedc ;case 35:goto _ceb ;case 36:goto _abg ;case 37:goto _bedg ;case 44:goto _bbcd ;case 46:goto _dfb ;case 47:goto _eafd ;case 48:goto _ffd ;case 58:goto _cfad ;case 59:goto _dacc ;case 63:goto _faf ;case 64:goto _ecdd ;case 65:goto _degb ;case 69:goto _cafb ;case 71:goto _cfeb ;case 91:goto _bcc ;case 92:goto _cfd ;case 95:goto _edfb ;case 100:goto _eafd ;case 104:goto _cfad ;case 109:goto _afcg ;case 115:goto _eeag ;case 121:goto _ege ;};if 49<=_gde [_gc ]&&_gde [_gc ]<=57{goto _adbc ;};goto _efg ;_eedc :_dae =_gc +1;_gcb =20;goto _ffag ;_ffag :if _gc ++;_gc ==_dbg {goto _ceed ;};_ebb :if _gde [_gc ]==34{goto _bcea ;};goto _cgd ;_cgd :if _gc ++;_gc ==_dbg {goto _fbbd ;};_ebd :if _gde [_gc ]==34{goto _bcea ;};goto _cgd ;_bcea :_dae =_gc +1;_gcb =21;goto _cd ;_cd :if _gc ++;_gc ==_dbg {goto _eeac ;};_ggd :if _gde [_gc ]==34{goto _cgd ;};goto _gbga ;_ceb :_dae =_gc +1;_gcb =3;goto _fge ;_fge :if _gc ++;_gc ==_dbg {goto _cfec ;};_eedb :switch _gde [_gc ]{case 35:goto _ecb ;case 37:goto _ecb ;case 44:goto _ggbb ;case 47:goto _cgb ;case 48:goto _ecb ;case 63:goto _ecb ;};goto _efbb ;_ecb :if _gc ++;_gc ==_dbg {goto _aaaf ;};_fbe :switch _gde [_gc ]{case 35:goto _ecb ;case 37:goto _ecb ;case 47:goto _cgb ;case 48:goto _ecb ;case 63:goto _ecb ;};goto _fedc ;_cgb :if _gc ++;_gc ==_dbg {goto _ffcf ;};_dgc :switch _gde [_gc ]{case 35:goto _ebg ;case 37:goto _afa ;case 48:goto _ggc ;case 63:goto _ebg ;};if 49<=_gde [_gc ]&&_gde [_gc ]<=57{goto _dgd ;};goto _fedc ;_ebg :_dae =_gc +1;goto _edg ;_edg :if _gc ++;_gc ==_dbg {goto _bcab ;};_baa :switch _gde [_gc ]{case 35:goto _ebg ;case 37:goto _ebg ;case 44:goto _ebg ;case 46:goto _ebg ;case 48:goto _ebg ;case 63:goto _ebg ;case 65:goto _cafe ;};goto _adfg ;_cafe :if _gc ++;_gc ==_dbg {goto _effc ;};_cda :switch _gde [_gc ]{case 47:goto _gda ;case 77:goto _ecdb ;};goto _fbgd ;_gda :if _gc ++;_gc ==_dbg {goto _bgg ;};_efc :if _gde [_gc ]==80{goto _fgcb ;};goto _fbgd ;_fgcb :_dae =_gc +1;goto _gcf ;_gcf :if _gc ++;_gc ==_dbg {goto _fcg ;};_fca :if _gde [_gc ]==65{goto _cafe ;};goto _adfg ;_ecdb :if _gc ++;_gc ==_dbg {goto _ebc ;};_cag :if _gde [_gc ]==47{goto _fac ;};goto _fbgd ;_fac :if _gc ++;_gc ==_dbg {goto _dfga ;};_dacd :if _gde [_gc ]==80{goto _ffbg ;};goto _fbgd ;_ffbg :if _gc ++;_gc ==_dbg {goto _cfdg ;};_deac :if _gde [_gc ]==77{goto _fgcb ;};goto _fbgd ;_afa :if _gc ++;_gc ==_dbg {goto _eca ;};_facb :switch _gde [_gc ]{case 35:goto _caea ;case 37:goto _eddde ;case 63:goto _caea ;};if 48<=_gde [_gc ]&&_gde [_gc ]<=57{goto _aagb ;};goto _fedc ;_caea :_dae =_gc +1;goto _dfba ;_dfba :if _gc ++;_gc ==_dbg {goto _baae ;};_gfb :switch _gde [_gc ]{case 35:goto _ebg ;case 37:goto _gff ;case 44:goto _ebg ;case 46:goto _ebg ;case 48:goto _ebg ;case 63:goto _ebg ;case 65:goto _cafe ;};goto _adfg ;_gff :if _gc ++;_gc ==_dbg {goto _gfe ;};_aggd :switch _gde [_gc ]{case 35:goto _acb ;case 44:goto _acb ;case 46:goto _acb ;case 48:goto _acb ;case 63:goto _acb ;};goto _fbgd ;_acb :_dae =_gc +1;goto _cgbf ;_cgbf :if _gc ++;_gc ==_dbg {goto _aab ;};_abdca :switch _gde [_gc ]{case 35:goto _acb ;case 44:goto _acb ;case 46:goto _acb ;case 48:goto _acb ;case 63:goto _acb ;case 65:goto _cafe ;};goto _adfg ;_eddde :if _gc ++;_gc ==_dbg {goto _acafd ;};_agbf :if _gde [_gc ]==37{goto _eddde ;};if 48<=_gde [_gc ]&&_gde [_gc ]<=57{goto _aagb ;};goto _fedc ;_aagb :_dae =_gc +1;_gcb =13;goto _cfbc ;_cfbc :if _gc ++;_gc ==_dbg {goto _ecga ;};_fdc :switch _gde [_gc ]{case 35:goto _ebg ;case 37:goto _dba ;case 44:goto _ebg ;case 46:goto _ebg ;case 48:goto _agfb ;case 63:goto _ebg ;case 65:goto _cafe ;};if 49<=_gde [_gc ]&&_gde [_gc ]<=57{goto _aagb ;};goto _adfg ;_dba :if _gc ++;_gc ==_dbg {goto _fbd ;};_ggb :switch _gde [_gc ]{case 35:goto _acb ;case 37:goto _eddde ;case 44:goto _acb ;case 46:goto _acb ;case 63:goto _acb ;};if 48<=_gde [_gc ]&&_gde [_gc ]<=57{goto _aagb ;};goto _fbgd ;_agfb :_dae =_gc +1;goto _eae ;_eae :if _gc ++;_gc ==_dbg {goto _daca ;};_eagb :switch _gde [_gc ]{case 35:goto _ebg ;case 37:goto _agfb ;case 44:goto _ebg ;case 46:goto _ebg ;case 48:goto _agfb ;case 63:goto _ebg ;case 65:goto _cafe ;};if 49<=_gde [_gc ]&&_gde [_gc ]<=57{goto _aagb ;};goto _adfg ;_ggc :_dae =_gc +1;goto _egc ;_egc :if _gc ++;_gc ==_dbg {goto _bdd ;};_gfae :switch _gde [_gc ]{case 35:goto _ebg ;case 37:goto _agfb ;case 44:goto _ebg ;case 46:goto _ebg ;case 48:goto _ggc ;case 63:goto _ebg ;case 65:goto _cafe ;};if 49<=_gde [_gc ]&&_gde [_gc ]<=57{goto _dgd ;};goto _adfg ;_dgd :_dae =_gc +1;goto _fged ;_fged :if _gc ++;_gc ==_dbg {goto _adff ;};_afe :switch _gde [_gc ]{case 35:goto _ebg ;case 37:goto _aagb ;case 44:goto _ebg ;case 46:goto _ebg ;case 48:goto _ggc ;case 63:goto _ebg ;case 65:goto _cafe ;};if 49<=_gde [_gc ]&&_gde [_gc ]<=57{goto _dgd ;};goto _adfg ;_ggbb :if _gc ++;_gc ==_dbg {goto _bacd ;};_gcfg :if _gde [_gc ]==35{goto _ddf ;};goto _eddd ;_bedg :_dae =_gc +1;_gcb =8;goto _baf ;_baf :if _gc ++;_gc ==_dbg {goto _afcb ;};_bfd :switch _gde [_gc ]{case 35:goto _egaf ;case 37:goto _bdf ;case 48:goto _edfbg ;case 63:goto _egaf ;};if 49<=_gde [_gc ]&&_gde [_gc ]<=57{goto _ddge ;};goto _fded ;_egaf :if _gc ++;_gc ==_dbg {goto _adea ;};_ecg :switch _gde [_gc ]{case 35:goto _egaf ;case 47:goto _cgb ;case 48:goto _egaf ;case 63:goto _egaf ;};goto _fbgde ;_bdf :if _gc ++;_gc ==_dbg {goto _fcc ;};_fgcg :if _gde [_gc ]==37{goto _bdf ;};if 48<=_gde [_gc ]&&_gde [_gc ]<=57{goto _ddge ;};goto _fedc ;_ddge :if _gc ++;_gc ==_dbg {goto _agfd ;};_fea :switch _gde [_gc ]{case 37:goto _bdf ;case 47:goto _cgb ;};if 48<=_gde [_gc ]&&_gde [_gc ]<=57{goto _ddge ;};goto _fedc ;_edfbg :if _gc ++;_gc ==_dbg {goto _bace ;};_fad :switch _gde [_gc ]{case 35:goto _egaf ;case 37:goto _bdf ;case 47:goto _cgb ;case 48:goto _edfbg ;case 63:goto _egaf ;};if 49<=_gde [_gc ]&&_gde [_gc ]<=57{goto _ddge ;};goto _fbgde ;_eafd :_dae =_gc +1;goto _dcc ;_dcc :if _gc ++;_gc ==_dbg {goto _dgf ;};_ebf :switch _gde [_gc ]{case 47:goto _eafd ;case 100:goto _eafd ;case 109:goto _eafd ;case 121:goto _bgf ;};goto _dbf ;_bgf :if _gc ++;_gc ==_dbg {goto _cffbb ;};_ccg :if _gde [_gc ]==121{goto _eafd ;};goto _bcaa ;_ffd :_dae =_gc +1;_gcb =2;goto _agd ;_agd :if _gc ++;_gc ==_dbg {goto _cge ;};_cffb :switch _gde [_gc ]{case 35:goto _ecb ;case 37:goto _cfa ;case 47:goto _cgb ;case 48:goto _gbb ;case 63:goto _ecb ;};if 49<=_gde [_gc ]&&_gde [_gc ]<=57{goto _fdcd ;};goto _acgb ;_cfa :if _gc ++;_gc ==_dbg {goto _gbag ;};_efcb :switch _gde [_gc ]{case 35:goto _ecb ;case 37:goto _cfa ;case 47:goto _cgb ;case 48:goto _cfa ;case 63:goto _ecb ;};if 49<=_gde [_gc ]&&_gde [_gc ]<=57{goto _ddge ;};goto _fdgd ;_gbb :if _gc ++;_gc ==_dbg {goto _ggdf ;};_dag :switch _gde [_gc ]{case 35:goto _ecb ;case 37:goto _cfa ;case 47:goto _cgb ;case 48:goto _gbb ;case 63:goto _ecb ;};if 49<=_gde [_gc ]&&_gde [_gc ]<=57{goto _fdcd ;};goto _fdgd ;_fdcd :if _gc ++;_gc ==_dbg {goto _ddd ;};_aeg :switch _gde [_gc ]{case 37:goto _ddge ;case 47:goto _cgb ;};if 48<=_gde [_gc ]&&_gde [_gc ]<=57{goto _fdcd ;};goto _fedc ;_adbc :_dae =_gc +1;_gcb =20;goto _fbbc ;_fbbc :if _gc ++;_gc ==_dbg {goto _bafc ;};_cgf :switch _gde [_gc ]{case 37:goto _ddge ;case 47:goto _cgb ;};if 48<=_gde [_gc ]&&_gde [_gc ]<=57{goto _fdcd ;};goto _fffb ;_cfad :_dae =_gc +1;_gcb =15;goto _dbad ;_dbad :if _gc ++;_gc ==_dbg {goto _gece ;};_bacf :switch _gde [_gc ]{case 58:goto _cfad ;case 65:goto _dfbaf ;case 104:goto _cfad ;case 109:goto _cfad ;case 115:goto _eeag ;};goto _bfbc ;_dfbaf :if _gc ++;_gc ==_dbg {goto _faa ;};_affd :switch _gde [_gc ]{case 47:goto _ebdc ;case 77:goto _eeb ;};goto _fedc ;_ebdc :if _gc ++;_gc ==_dbg {goto _bfc ;};_cfe :if _gde [_gc ]==80{goto _cfad ;};goto _fedc ;_eeb :if _gc ++;_gc ==_dbg {goto _eeace ;};_cebc :if _gde [_gc ]==47{goto _ccb ;};goto _fedc ;_ccb :if _gc ++;_gc ==_dbg {goto _dgbc ;};_ggcf :if _gde [_gc ]==80{goto _ece ;};goto _fedc ;_ece :if _gc ++;_gc ==_dbg {goto _gdd ;};_daab :if _gde [_gc ]==77{goto _cfad ;};goto _fedc ;_eeag :_dae =_gc +1;_gcb =15;goto _ggcb ;_ggcb :if _gc ++;_gc ==_dbg {goto _bggf ;};_caa :switch _gde [_gc ]{case 46:goto _dcg ;case 58:goto _cfad ;case 65:goto _dfbaf ;case 104:goto _cfad ;case 109:goto _cfad ;case 115:goto _eeag ;};goto _bfbc ;_dcg :if _gc ++;_gc ==_dbg {goto _cafg ;};_ffe :if _gde [_gc ]==48{goto _ecc ;};goto _ccf ;_ecc :_dae =_gc +1;_gcb =15;goto _bfbd ;_bfbd :if _gc ++;_gc ==_dbg {goto _eab ;};_aecc :switch _gde [_gc ]{case 48:goto _geed ;case 58:goto _cfad ;case 65:goto _dfbaf ;case 104:goto _cfad ;case 109:goto _cfad ;case 115:goto _eeag ;};goto _bfbc ;_geed :_dae =_gc +1;_gcb =15;goto _bbeg ;_bbeg :if _gc ++;_gc ==_dbg {goto _gffd ;};_deg :switch _gde [_gc ]{case 48:goto _cfad ;case 58:goto _cfad ;case 65:goto _dfbaf ;case 104:goto _cfad ;case 109:goto _cfad ;case 115:goto _eeag ;};goto _bfbc ;_faf :_dae =_gc +1;_gcb =5;goto _ccgg ;_ccgg :if _gc ++;_gc ==_dbg {goto _ebdf ;};_agfe :switch _gde [_gc ]{case 35:goto _ecb ;case 37:goto _ecb ;case 47:goto _cgb ;case 48:goto _ecb ;case 63:goto _ecb ;};goto _adeb ;_degb :_dae =_gc +1;_gcb =20;goto _feba ;_feba :if _gc ++;_gc ==_dbg {goto _eafdd ;};_dccg :switch _gde [_gc ]{case 47:goto _ebdc ;case 77:goto _eeb ;};goto _fffb ;_cafb :if _gc ++;_gc ==_dbg {goto _efca ;};_eaag :switch _gde [_gc ]{case 43:goto _dfc ;case 45:goto _dfc ;};goto _fffb ;_cfeb :_dae =_gc +1;goto _gcc ;_gcc :if _gc ++;_gc ==_dbg {goto _aefa ;};_aebg :if _gde [_gc ]==101{goto _gce ;};goto _fffb ;_gce :if _gc ++;_gc ==_dbg {goto _acae ;};_dgbff :if _gde [_gc ]==110{goto _fbgg ;};goto _gdg ;_fbgg :if _gc ++;_gc ==_dbg {goto _gfad ;};_gbe :if _gde [_gc ]==101{goto _aagd ;};goto _gdg ;_aagd :if _gc ++;_gc ==_dbg {goto _fcd ;};_bfac :if _gde [_gc ]==114{goto _geeg ;};goto _gdg ;_geeg :if _gc ++;_gc ==_dbg {goto _gfbg ;};_aaa :if _gde [_gc ]==97{goto _geb ;};goto _gdg ;_geb :if _gc ++;_gc ==_dbg {goto _bedb ;};_degbb :if _gde [_gc ]==108{goto _fecg ;};goto _gdg ;_bcc :_dae =_gc +1;_gcb =20;goto _gae ;_gae :if _gc ++;_gc ==_dbg {goto _fadfa ;};_cbd :switch _gde [_gc ]{case 104:goto _beff ;case 109:goto _beff ;case 115:goto _beff ;};goto _deee ;_deee :if _gc ++;_gc ==_dbg {goto _bfe ;};_fadf :if _gde [_gc ]==93{goto _add ;};goto _deee ;_add :_dae =_gc +1;_gcb =18;goto _aacb ;_cdd :_dae =_gc +1;_gcb =16;goto _aacb ;_aacb :if _gc ++;_gc ==_dbg {goto _gcg ;};_dca :if _gde [_gc ]==93{goto _add ;};goto _deee ;_beff :if _gc ++;_gc ==_dbg {goto _dfag ;};_dab :if _gde [_gc ]==93{goto _cdd ;};goto _deee ;_cfd :if _gc ++;_gc ==_dbg {goto _beg ;};_geea :goto _eadd ;_afcg :_dae =_gc +1;_gcb =14;goto _eadc ;_eadc :if _gc ++;_gc ==_dbg {goto _accd ;};_gdgb :switch _gde [_gc ]{case 47:goto _eafd ;case 58:goto _cfad ;case 65:goto _dfbaf ;case 100:goto _eafd ;case 104:goto _cfad ;case 109:goto _afcg ;case 115:goto _eeag ;case 121:goto _bgf ;};goto _dbf ;_ege :if _gc ++;_gc ==_dbg {goto _ccge ;};_dcab :if _gde [_gc ]==121{goto _eafd ;};goto _fffb ;_dge :_ffec :_cac =34;goto _ced ;_ceed :_cac =35;goto _ced ;_fbbd :_cac =0;goto _ced ;_eeac :_cac =36;goto _ced ;_cfec :_cac =37;goto _ced ;_aaaf :_cac =1;goto _ced ;_ffcf :_cac =2;goto _ced ;_bcab :_cac =38;goto _ced ;_effc :_cac =3;goto _ced ;_bgg :_cac =4;goto _ced ;_fcg :_cac =39;goto _ced ;_ebc :_cac =5;goto _ced ;_dfga :_cac =6;goto _ced ;_cfdg :_cac =7;goto _ced ;_eca :_cac =8;goto _ced ;_baae :_cac =40;goto _ced ;_gfe :_cac =9;goto _ced ;_aab :_cac =41;goto _ced ;_acafd :_cac =10;goto _ced ;_ecga :_cac =42;goto _ced ;_fbd :_cac =11;goto _ced ;_daca :_cac =43;goto _ced ;_bdd :_cac =44;goto _ced ;_adff :_cac =45;goto _ced ;_bacd :_cac =12;goto _ced ;_afcb :_cac =46;goto _ced ;_adea :_cac =13;goto _ced ;_fcc :_cac =14;goto _ced ;_agfd :_cac =15;goto _ced ;_bace :_cac =16;goto _ced ;_dgf :_cac =47;goto _ced ;_cffbb :_cac =17;goto _ced ;_cge :_cac =48;goto _ced ;_gbag :_cac =18;goto _ced ;_ggdf :_cac =19;goto _ced ;_ddd :_cac =20;goto _ced ;_bafc :_cac =49;goto _ced ;_gece :_cac =50;goto _ced ;_faa :_cac =21;goto _ced ;_bfc :_cac =22;goto _ced ;_eeace :_cac =23;goto _ced ;_dgbc :_cac =24;goto _ced ;_gdd :_cac =25;goto _ced ;_bggf :_cac =51;goto _ced ;_cafg :_cac =26;goto _ced ;_eab :_cac =52;goto _ced ;_gffd :_cac =53;goto _ced ;_ebdf :_cac =54;goto _ced ;_eafdd :_cac =55;goto _ced ;_efca :_cac =56;goto _ced ;_aefa :_cac =57;goto _ced ;_acae :_cac =27;goto _ced ;_gfad :_cac =28;goto _ced ;_fcd :_cac =29;goto _ced ;_gfbg :_cac =30;goto _ced ;_bedb :_cac =31;goto _ced ;_fadfa :_cac =58;goto _ced ;_bfe :_cac =32;goto _ced ;_gcg :_cac =59;goto _ced ;_dfag :_cac =33;goto _ced ;_beg :_cac =60;goto _ced ;_accd :_cac =61;goto _ced ;_ccge :_cac =62;goto _ced ;_ced :{};if _gc ==_fa {switch _cac {case 35:goto _fffb ;case 0:goto _fedc ;case 36:goto _gbga ;case 37:goto _efbb ;case 1:goto _fedc ;case 2:goto _fedc ;case 38:goto _adfg ;case 3:goto _fbgd ;case 4:goto _fbgd ;case 39:goto _adfg ;case 5:goto _fbgd ;case 6:goto _fbgd ;case 7:goto _fbgd ;case 8:goto _fedc ;case 40:goto _adfg ;case 9:goto _fbgd ;case 41:goto _adfg ;case 10:goto _fedc ;case 42:goto _adfg ;case 11:goto _fbgd ;case 43:goto _adfg ;case 44:goto _adfg ;case 45:goto _adfg ;case 12:goto _eddd ;case 46:goto _fded ;case 13:goto _fbgde ;case 14:goto _fedc ;case 15:goto _fedc ;case 16:goto _fbgde ;case 47:goto _dbf ;case 17:goto _bcaa ;case 48:goto _acgb ;case 18:goto _fdgd ;case 19:goto _fdgd ;case 20:goto _fedc ;case 49:goto _fffb ;case 50:goto _bfbc ;case 21:goto _fedc ;case 22:goto _fedc ;case 23:goto _fedc ;case 24:goto _fedc ;case 25:goto _fedc ;case 51:goto _bfbc ;case 26:goto _ccf ;case 52:goto _bfbc ;case 53:goto _bfbc ;case 54:goto _adeb ;case 55:goto _fffb ;case 56:goto _fffb ;case 57:goto _fffb ;case 27:goto _gdg ;case 28:goto _gdg ;case 29:goto _gdg ;case 30:goto _gdg ;case 31:goto _gdg ;case 58:goto _fffb ;case 32:goto _fedc ;case 59:goto _fedc ;case 33:goto _gdg ;case 60:goto _fffb ;case 61:goto _dbf ;case 62:goto _fffb ;};};};if _bbf > 0{copy (_gde [0:],_gde [_bbf :]);};};_ =_fa ;if _cac ==_efd {_ea .Log ("\u0066o\u0072m\u0061\u0074\u0020\u0070\u0061r\u0073\u0065 \u0065\u0072\u0072\u006f\u0072");};};func _feb (_dgb []byte )[]byte {for _fggb :=len (_dgb )-1;_fggb > 0;_fggb --{if _dgb [_fggb ]=='9'+1{_dgb [_fggb ]='0';if _dgb [_fggb -1]=='.'{_fggb --;};_dgb [_fggb -1]++;};};if _dgb [0]=='9'+1{_dgb [0]='0';copy (_dgb [1:],_dgb [0:]);_dgb [0]='1';};return _dgb ;};func _aca (_cc []byte )[]byte {for _abf :=0;_abf < len (_cc )/2;_abf ++{_dc :=len (_cc )-1-_abf ;_cc [_abf ],_cc [_dc ]=_cc [_dc ],_cc [_abf ];};return _cc ;};func _dec (_ded []byte )[]byte {_bf :=len (_ded );_ddg :=false ;_aag :=false ;for _fce :=len (_ded )-1;_fce >=0;_fce --{if _ded [_fce ]=='0'&&!_aag &&!_ddg {_bf =_fce ;}else if _ded [_fce ]=='.'{_ddg =true ;}else {_aag =true ;};};if _ddg &&_aag {if _ded [_bf -1]=='.'{_bf --;};return _ded [0:_bf ];};return _ded ;};func (_af FmtType )String ()string {if _af >=FmtType (len (_ad )-1){return _d .Sprintf ("F\u006d\u0074\u0054\u0079\u0070\u0065\u0028\u0025\u0064\u0029",_af );};return _ec [_ad [_af ]:_ad [_af +1]];};func _acc (_cae int64 )int64 {if _cae < 0{return -_cae ;};return _cae ;};
// Number is used to format a number with a format string. If the format
// string is empty, then General number formatting is used which attempts to mimic
// Excel's general formatting.
func Number (v float64 ,f string )string {if f ==""||f =="\u0047e\u006e\u0065\u0072\u0061\u006c"||f =="\u0040"{return NumberGeneric (v );};_c :=Parse (f );if len (_c )==1{return _gb (v ,_c [0],false );}else if len (_c )> 1&&v < 0{return _gb (v ,_c [1],true );}else if len (_c )> 2&&v ==0{return _gb (v ,_c [2],false );};return _gb (v ,_c [0],false );};
// NumberGeneric formats the number with the generic format which attemps to
// mimic Excel's general formatting.
func NumberGeneric (v float64 )string {if _bb .Abs (v )>=_f ||_bb .Abs (v )<=_aa &&v !=0{return _adec (v );};_ade :=make ([]byte ,0,15);_ade =_ed .AppendFloat (_ade ,v ,'f',-1,64);if len (_ade )> 11{_efb :=_ade [11]-'0';if _efb >=5&&_efb <=9{_ade [10]++;_ade =_ade [0:11];_ade =_feb (_ade );};_ade =_ade [0:11];}else if len (_ade )==11{if _ade [len (_ade )-1]=='9'{_ade [len (_ade )-1]++;_ade =_feb (_ade );};};_ade =_dec (_ade );return string (_ade );};func IsNumber (data string )(_fec bool ){_edd ,_beeg ,_eea :=0,0,len (data );_fde :=len (data );_fee ,_aac ,_dcee :=0,0,0;_ =_aac ;_ =_dcee ;_ =_fee ;{_edd =_gd ;_fee =0;_aac =0;_dcee =0;};{if _beeg ==_eea {goto _efe ;};switch _edd {case 0:goto _dea ;case 1:goto _bebd ;case 2:goto _edf ;case 3:goto _aff ;case 4:goto _ddb ;case 5:goto _cee ;case 6:goto _cb ;case 7:goto _fbg ;};goto _dcf ;_eff :_aac =_beeg ;_beeg --;{_fec =false ;};goto _fgge ;_dfgb :_aac =_beeg ;_beeg --;{_fec =_aac ==len (data );};goto _fgge ;_cad :_aac =_beeg ;_beeg --;{_fec =_aac ==len (data );};goto _fgge ;_age :switch _dcee {case 2:{_beeg =(_aac )-1;_fec =_aac ==len (data );};case 3:{_beeg =(_aac )-1;_fec =false ;};};goto _fgge ;_fgge :_fee =0;if _beeg ++;_beeg ==_eea {goto _eed ;};_dea :_fee =_beeg ;switch data [_beeg ]{case 43:goto _gab ;case 45:goto _gab ;};if 48<=data [_beeg ]&&data [_beeg ]<=57{goto _cg ;};goto _bbeb ;_bbeb :if _beeg ++;_beeg ==_eea {goto _dcec ;};_bebd :goto _bbeb ;_gab :if _beeg ++;_beeg ==_eea {goto _fgd ;};_edf :if 48<=data [_beeg ]&&data [_beeg ]<=57{goto _cg ;};goto _bbeb ;_cg :if _beeg ++;_beeg ==_eea {goto _adc ;};_aff :if data [_beeg ]==46{goto _bfb ;};if 48<=data [_beeg ]&&data [_beeg ]<=57{goto _cg ;};goto _bbeb ;_bfb :if _beeg ++;_beeg ==_eea {goto _abeb ;};_ddb :if 48<=data [_beeg ]&&data [_beeg ]<=57{goto _gag ;};goto _bbeb ;_gag :if _beeg ++;_beeg ==_eea {goto _febd ;};_cee :if data [_beeg ]==69{goto _fcf ;};if 48<=data [_beeg ]&&data [_beeg ]<=57{goto _gag ;};goto _bbeb ;_fcf :if _beeg ++;_beeg ==_eea {goto _fbb ;};_cb :switch data [_beeg ]{case 43:goto _deab ;case 45:goto _deab ;};goto _bbeb ;_deab :_aac =_beeg +1;_dcee =3;goto _beef ;_eb :_aac =_beeg +1;_dcee =2;goto _beef ;_beef :if _beeg ++;_beeg ==_eea {goto _daad ;};_fbg :if 48<=data [_beeg ]&&data [_beeg ]<=57{goto _eb ;};goto _bbeb ;_dcf :_eed :_edd =0;goto _efe ;_dcec :_edd =1;goto _efe ;_fgd :_edd =2;goto _efe ;_adc :_edd =3;goto _efe ;_abeb :_edd =4;goto _efe ;_febd :_edd =5;goto _efe ;_fbb :_edd =6;goto _efe ;_daad :_edd =7;goto _efe ;_efe :{};if _beeg ==_fde {switch _edd {case 1:goto _eff ;case 2:goto _eff ;case 3:goto _dfgb ;case 4:goto _eff ;case 5:goto _cad ;case 6:goto _eff ;case 7:goto _age ;};};};if _edd ==_efd {return false ;};return ;};const _bdee int =34;const (FmtTypeLiteral FmtType =iota ;FmtTypeDigit ;FmtTypeDigitOpt ;FmtTypeComma ;FmtTypeDecimal ;FmtTypePercent ;FmtTypeDollar ;FmtTypeDigitOptThousands ;FmtTypeUnderscore ;FmtTypeDate ;FmtTypeTime ;FmtTypeFraction ;FmtTypeText ;);func Parse (s string )[]Format {_cgc :=Lexer {};_cgc .Lex (_bef .NewReader (s ));_cgc ._abb =append (_cgc ._abb ,_cgc ._gacg );return _cgc ._abb ;};const _dfa int =34;func _cfc (_cde _e .Time )_e .Time {_cde =_cde .UTC ();return _e .Date (_cde .Year (),_cde .Month (),_cde .Day (),_cde .Hour (),_cde .Minute (),_cde .Second (),_cde .Nanosecond (),_e .Local );};func _caf (_dgg _e .Time ,_db string )[]byte {_dbc :=[]byte {};_eaa :=0;for _abdc :=0;_abdc < len (_db );_abdc ++{var _dfg string ;if _db [_abdc ]=='/'{_dfg =string (_db [_eaa :_abdc ]);_eaa =_abdc +1;}else if _abdc ==len (_db )-1{_dfg =string (_db [_eaa :_abdc +1]);}else {continue ;};switch _dfg {case "\u0079\u0079":_dbc =_dgg .AppendFormat (_dbc ,"\u0030\u0036");case "\u0079\u0079\u0079\u0079":_dbc =_dgg .AppendFormat (_dbc ,"\u0032\u0030\u0030\u0036");case "\u006d":_dbc =_dgg .AppendFormat (_dbc ,"\u0031");case "\u006d\u006d":_dbc =_dgg .AppendFormat (_dbc ,"\u0030\u0031");case "\u006d\u006d\u006d":_dbc =_dgg .AppendFormat (_dbc ,"\u004a\u0061\u006e");case "\u006d\u006d\u006d\u006d":_dbc =_dgg .AppendFormat (_dbc ,"\u004aa\u006e\u0075\u0061\u0072\u0079");case "\u006d\u006d\u006dm\u006d":switch _dgg .Month (){case _e .January ,_e .July ,_e .June :_dbc =append (_dbc ,'J');case _e .February :_dbc =append (_dbc ,'M');case _e .March ,_e .May :_dbc =append (_dbc ,'M');case _e .April ,_e .August :_dbc =append (_dbc ,'A');case _e .September :_dbc =append (_dbc ,'S');case _e .October :_dbc =append (_dbc ,'O');case _e .November :_dbc =append (_dbc ,'N');case _e .December :_dbc =append (_dbc ,'D');};case "\u0064":_dbc =_dgg .AppendFormat (_dbc ,"\u0032");case "\u0064\u0064":_dbc =_dgg .AppendFormat (_dbc ,"\u0030\u0032");case "\u0064\u0064\u0064":_dbc =_dgg .AppendFormat (_dbc ,"\u004d\u006f\u006e");case "\u0064\u0064\u0064\u0064":_dbc =_dgg .AppendFormat (_dbc ,"\u004d\u006f\u006e\u0064\u0061\u0079");default:_ea .Log ("\u0075\u006e\u0073\u0075\u0070\u0070\u006f\u0072\u0074\u0065\u0064 \u0064\u0061\u0074\u0065\u0020\u0066\u006f\u0072\u006d\u0061t\u0020\u0025\u0073",_dfg );};if _db [_abdc ]=='/'{_dbc =append (_dbc ,'/');};};return _dbc ;};
// Token is a format token in the Excel format string.
type Token struct{Type FmtType ;Literal byte ;DateTime string ;};const _gg int =0;func _adec (_fed float64 )string {_adf :=_ed .FormatFloat (_fed ,'E',-1,64);_efbd :=_ed .FormatFloat (_fed ,'E',5,64);if len (_adf )< len (_efbd ){return _ed .FormatFloat (_fed ,'E',2,64);};return _efbd ;};const _eaf int =0;func _daae (_bae int64 ,_agc Format )[]byte {if !_agc .IsExponential ||len (_agc .Exponent )==0{return nil ;};_cefg :=_ed .AppendInt (nil ,_acc (_bae ),10);_bac :=make ([]byte ,0,len (_cefg )+2);_bac =append (_bac ,'E');if _bae >=0{_bac =append (_bac ,'+');}else {_bac =append (_bac ,'-');_bae *=-1;};_geg :=0;_fga :for _aec :=len (_agc .Exponent )-1;_aec >=0;_aec --{_bca :=len (_cefg )-1-_geg ;_egf :=_agc .Exponent [_aec ];switch _egf .Type {case FmtTypeDigit :if _bca >=0{_bac =append (_bac ,_cefg [_bca ]);_geg ++;}else {_bac =append (_bac ,'0');};case FmtTypeDigitOpt :if _bca >=0{_bac =append (_bac ,_cefg [_bca ]);_geg ++;}else {for _bge :=_aec ;_bge >=0;_bge --{_df :=_agc .Exponent [_bge ];if _df .Type ==FmtTypeLiteral {_bac =append (_bac ,_df .Literal );};};break _fga ;};case FmtTypeLiteral :_bac =append (_bac ,_egf .Literal );default:_ea .Log ("\u0075\u006e\u0073\u0075\u0070\u0070\u006f\u0072\u0074\u0065\u0064 \u0074\u0079\u0070\u0065\u0020\u0069\u006e\u0020\u0065\u0078p\u0020\u0025\u0076",_egf );};};if _geg < len (_cefg ){_bac =append (_bac ,_cefg [len (_cefg )-_geg -1:_geg -1]...);};_aca (_bac [2:]);return _bac ;};const _gd int =0;
// Format is a parsed number format.
type Format struct{Whole []Token ;Fractional []Token ;Exponent []Token ;IsExponential bool ;_ee bool ;_ag bool ;_ac bool ;_fe bool ;_g bool ;_de bool ;_ff int64 ;_bg int ;};