// NewDefaultLayout creates a new Layout in the default format (top-down)
321334
func NewDefaultLayout(state *Peco) *BasicLayout {
	return &BasicLayout{
		StatusBar: NewStatusBar(state.Screen(), AnchorBottom, 0+extraOffset, state.Styles()),
		// The prompt is at the top
		prompt: NewUserPrompt(state.Screen(), AnchorTop, 0, state.Prompt(), state.Styles()),
		// The list area is at the top, after the prompt
		// It's also displayed top-to-bottom order
		list: NewListArea(state.Screen(), AnchorTop, 1, true, state.Styles()),
	}
}
1350392
func NewDefaultConfig() *Config {
	endpoint, _ := url.Parse(defaultEndpoint)

	return &Config{
		Endpoint: endpoint,
		// zone.ee can take up to 5min to propagate according to the support
		PropagationTimeout: env.GetOrDefaultSecond("ZONEEE_PROPAGATION_TIMEOUT", 5*time.Minute),
		PollingInterval:    env.GetOrDefaultSecond("ZONEEE_POLLING_INTERVAL", 5*time.Second),
		HTTPClient: &http.Client{
			Timeout: env.GetOrDefaultSecond("ZONEEE_HTTP_TIMEOUT", 30*time.Second),
		},
	}
}
678538
func NewDefaultWrapper(message string) Wrapper {
	spinner := NewDefaultSpinner(message)
	interactiveMode := OutputDeviceIsTerminal()
	return NewWrapper(spinner, interactiveMode)
}
1128517
func NewDefaultConfig() *Config {
	return &Config{
		TTL:                env.GetOrDefaultInt("GODADDY_TTL", minTTL),
		PropagationTimeout: env.GetOrDefaultSecond("GODADDY_PROPAGATION_TIMEOUT", 120*time.Second),
		PollingInterval:    env.GetOrDefaultSecond("GODADDY_POLLING_INTERVAL", 2*time.Second),
		SequenceInterval:   env.GetOrDefaultSecond("GODADDY_SEQUENCE_INTERVAL", dns01.DefaultPropagationTimeout),
		HTTPClient: &http.Client{
			Timeout: env.GetOrDefaultSecond("GODADDY_HTTP_TIMEOUT", 30*time.Second),
		},
	}
}
1273409
func StyleTextDefaults() Style {
	font, _ := GetDefaultFont()
	return Style{
		Show:      true,
		Font:      font,
		FontColor: DefaultTextColor,
		FontSize:  DefaultTitleFontSize,
	}
}
526333
func NewDefaultListener(p *Project) chan<- events.Event {
	l := defaultListener{
		listenChan: make(chan events.Event),
		project:    p,
	}
	go l.start()
	return l.listenChan
}
542262
func (v *Box) PackStartDefaults(child IWidget) {
	deprecated_since(2, 14, 0, "gtk_box_pack_start_defaults()")
	C.gtk_box_pack_start_defaults(BOX(v), ToNative(child))
}
708133
func NewDefaults() (*args.GeneratorArgs, *CustomArgs) {
	genericArgs := args.Default().WithoutDefaultFlagParsing()
	customArgs := &CustomArgs{
		SingleDirectory: false,
	}
	genericArgs.CustomArgs = customArgs

	if pkg := codegenutil.CurrentPackage(); len(pkg) != 0 {
		genericArgs.OutputPackagePath = path.Join(pkg, "pkg/client/informers")
		customArgs.VersionedClientSetPackage = path.Join(pkg, "pkg/client/clientset/versioned")
		customArgs.InternalClientSetPackage = path.Join(pkg, "pkg/client/clientset/internalversion")
		customArgs.ListersPackage = path.Join(pkg, "pkg/client/listers")
	}

	return genericArgs, customArgs
}
1299712
func NewDefaultConfig() *Config {
	return &Config{
		TTL:                env.GetOrDefaultInt("DNSIMPLE_TTL", dns01.DefaultTTL),
		PropagationTimeout: env.GetOrDefaultSecond("DNSIMPLE_PROPAGATION_TIMEOUT", dns01.DefaultPropagationTimeout),
		PollingInterval:    env.GetOrDefaultSecond("DNSIMPLE_POLLING_INTERVAL", dns01.DefaultPollingInterval),
	}
}
1339770
func (l *LabelResult) GetDefault() bool {
	if l == nil || l.Default == nil {
		return false
	}
	return *l.Default
}
606195
func NewDefaultConfig() *Config {
	return &Config{
		PropagationTimeout: env.GetOrDefaultSecond("EASYDNS_PROPAGATION_TIMEOUT", dns01.DefaultPropagationTimeout),
		SequenceInterval:   env.GetOrDefaultSecond("EASYDNS_SEQUENCE_INTERVAL", dns01.DefaultPropagationTimeout),
		PollingInterval:    env.GetOrDefaultSecond("EASYDNS_POLLING_INTERVAL", dns01.DefaultPollingInterval),
		TTL:                env.GetOrDefaultInt("EASYDNS_TTL", dns01.DefaultTTL),
		HTTPClient: &http.Client{
			Timeout: env.GetOrDefaultSecond("EASYDNS_HTTP_TIMEOUT", 30*time.Second),
		},
	}
}
102660
func NewDefaultReaderProtocols() map[string]ReaderProtocolConfig {
	return map[string]ReaderProtocolConfig{
		"":                            {Binary: true},
		binaryWebSocketProtocol:       {Binary: true},
		base64BinaryWebSocketProtocol: {Binary: false},
	}
}
829871
func NewDefaultConfig() *Config {
	return &Config{
		BaseURL:            env.GetOrDefaultString(baseURLEnvVar, defaultBaseURL),
		TTL:                env.GetOrDefaultInt(ttlEnvVar, minTTL),
		PropagationTimeout: env.GetOrDefaultSecond(propagationTimeoutEnvVar, 120*time.Second),
		PollingInterval:    env.GetOrDefaultSecond(pollingIntervalEnvVar, 2*time.Second),
		HTTPClient: &http.Client{
			Timeout: env.GetOrDefaultSecond(httpTimeoutEnvVar, 30*time.Second),
		},
	}
}
211871
func SetupDefaultConfig(uidConfig *Config) *Config {

	defaultConfig := DefaultConfig()

	if uidConfig.ReleasePath == "" {
		uidConfig.ReleasePath = defaultConfig.ReleasePath
	}
	if uidConfig.StoredPath == "" {
		uidConfig.StoredPath = defaultConfig.StoredPath
	}
	if uidConfig.EventMetadataExtractor == nil {
		uidConfig.EventMetadataExtractor = defaultConfig.EventMetadataExtractor
	}

	return uidConfig
}
826632
func (provider *Provider) Layout(name string, eventScope app.EventScope) (*template.Template, error) {
	if name == "" {
		name = goathtml.DefaultLayout
	}
	tmpl, ok := provider.layouts[name]
	if ok {
		return tmpl, nil
	}
	return provider.layout(name, eventScope)
}
856362
func ParseAndGetLayout(date string) (time.Time, string, error) {
	if len(strings.TrimSpace(date)) == 0 {
		return time.Time{}, "", errors.New("Empty string cannot be parsed to date")
	}
	// Check standard date formats first.
	for _, f := range standardDateFormats {
		if t, err := time.Parse(f, date); err == nil {
			return t, f, nil
		}
	}
	s := strings.ToLower(date)
	layout := &bytes.Buffer{}
	prefix := getPrefix(s)
	layout.WriteString(prefix)
	s = strings.TrimPrefix(s, prefix)

	// Check for day of week.
	for _, d := range daysOfWeek {
		if strings.HasPrefix(s, d) {
			s = strings.TrimPrefix(s, d)
			layout.WriteString(formatEEEE)
		}
	}
	for _, d := range daysOfWeekShort {
		if strings.HasPrefix(s, d) {
			s = strings.TrimPrefix(s, d)
			layout.WriteString(formatEEE)
		}
	}

	// Get rid of prefix and suffix.
	prefix = getPrefix(s)
	separators := separatorRegex.FindAllStringSubmatch(s, -1)
	if len(prefix) > 0 {
		s = strings.TrimPrefix(s, prefix)
		layout.WriteString(prefix)
		separators = separators[1:]
	}
	var suffix string
	if len(separators) > 0 && strings.HasSuffix(s, separators[len(separators)-1][0]) {
		suffix = separators[len(separators)-1][0]
		s = strings.TrimSuffix(s, suffix)
		separators = separators[:len(separators)-1]
	}

	// Narrow down formats needed to check.
	// TODO: Make more efficient by checking fewer formats variations.
	var formats []string
	containsTime := containsTime(date)
	containsTimezone := containsTimezone(date)
	var onlyTime bool
	if containsLongMonth(s) {
		formats = dateFormatsWithLongMonth
	} else if containsShortMonth(s) {
		formats = dateFormatsWithShortMonth
	} else if (len(separators) <= 3 && containsTime && containsTimezone) || (len(separators) <= 2 && containsTime) {
		if containsTimezone {
			formats = getCombinations(timeFormats, timeZoneFormats, false)
		} else {
			formats = timeFormats
		}
		onlyTime = true
	} else if len(separators) == 0 {
		// If the date is all munged together, assume year is first rather than month.
		formats = dateFormatsNumericYearFirst
	} else {
		formats = dateFormatsNumeric
	}
	if containsTimezone {
		// time.Parse only accepts uppercase timezones names, so need to convert back.
		if tz := timezoneRegex.FindStringSubmatch(date); len(tz) > 0 {
			s = strings.Replace(s, strings.ToLower(tz[0]), tz[0], -1)
		}
	}

	// Check possible formats.
	for _, f := range formats {
		variations := getVariations(f, containsTime && !onlyTime, containsTimezone && !onlyTime)
		var correct string
		for _, v := range variations {
			if strings.Contains(v, ":") {
				v = strings.Replace(v, ":", ".", -1)
			}
			l := formatWithSeparators(v, separators)
			if _, err := time.Parse(l, s); err == nil {
				correct = l
				break
			}
		}
		if len(correct) > 0 {
			layout.WriteString(correct)
			break
		}
	}
	layout.WriteString(suffix)

	// Return Date and format.
	date = strings.Replace(date, "AM", "am", -1)
	date = strings.Replace(date, "PM", "pm", -1)
	t, err := time.Parse(layout.String(), date)
	if err != nil {
		return time.Time{}, "", err
	}
	return t, layout.String(), err
}
425263
func (m *Manifest) NewAdapterOrDefault(name string, dir Direction) Adapter {
	if len(name) == 0 {
		name = BasicAdapterName
	}

	a := m.NewAdapter(name, dir)
	if a == nil {
		tracerx.Printf("Defaulting to basic transfer adapter since %q did not exist", name)
		a = m.NewAdapter(BasicAdapterName, dir)
	}
	return a
}